summaryrefslogtreecommitdiff
path: root/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules')
l---------node_modules/.bin/asar1
l---------node_modules/.bin/dircompare1
l---------node_modules/.bin/electron1
l---------node_modules/.bin/electron-download1
l---------node_modules/.bin/electron-osx-flat1
l---------node_modules/.bin/electron-osx-sign1
l---------node_modules/.bin/electron-packager1
l---------node_modules/.bin/extract-zip1
l---------node_modules/.bin/is-docker1
l---------node_modules/.bin/mkdirp1
l---------node_modules/.bin/node-which1
l---------node_modules/.bin/nugget1
l---------node_modules/.bin/pretty-bytes1
l---------node_modules/.bin/rc1
l---------node_modules/.bin/semver1
l---------node_modules/.bin/sshpk-conv1
l---------node_modules/.bin/sshpk-sign1
l---------node_modules/.bin/sshpk-verify1
l---------node_modules/.bin/strip-indent1
l---------node_modules/.bin/uuid1
-rw-r--r--node_modules/.package-lock.json3023
-rw-r--r--node_modules/@electron/get/LICENSE21
-rw-r--r--node_modules/@electron/get/README.md142
-rw-r--r--node_modules/@electron/get/dist/cjs/Cache.d.ts8
-rw-r--r--node_modules/@electron/get/dist/cjs/Cache.js60
-rw-r--r--node_modules/@electron/get/dist/cjs/Cache.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/Downloader.d.ts3
-rw-r--r--node_modules/@electron/get/dist/cjs/Downloader.js3
-rw-r--r--node_modules/@electron/get/dist/cjs/Downloader.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/GotDownloader.d.ts21
-rw-r--r--node_modules/@electron/get/dist/cjs/GotDownloader.js76
-rw-r--r--node_modules/@electron/get/dist/cjs/GotDownloader.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/artifact-utils.d.ts4
-rw-r--r--node_modules/@electron/get/dist/cjs/artifact-utils.js66
-rw-r--r--node_modules/@electron/get/dist/cjs/artifact-utils.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/downloader-resolver.d.ts3
-rw-r--r--node_modules/@electron/get/dist/cjs/downloader-resolver.js12
-rw-r--r--node_modules/@electron/get/dist/cjs/downloader-resolver.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/index.d.ts18
-rw-r--r--node_modules/@electron/get/dist/cjs/index.js130
-rw-r--r--node_modules/@electron/get/dist/cjs/index.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/proxy.d.ts4
-rw-r--r--node_modules/@electron/get/dist/cjs/proxy.js32
-rw-r--r--node_modules/@electron/get/dist/cjs/proxy.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/types.d.ts129
-rw-r--r--node_modules/@electron/get/dist/cjs/types.js3
-rw-r--r--node_modules/@electron/get/dist/cjs/types.js.map1
-rw-r--r--node_modules/@electron/get/dist/cjs/utils.d.ts25
-rw-r--r--node_modules/@electron/get/dist/cjs/utils.js107
-rw-r--r--node_modules/@electron/get/dist/cjs/utils.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/Cache.d.ts8
-rw-r--r--node_modules/@electron/get/dist/esm/Cache.js57
-rw-r--r--node_modules/@electron/get/dist/esm/Cache.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/Downloader.d.ts3
-rw-r--r--node_modules/@electron/get/dist/esm/Downloader.js1
-rw-r--r--node_modules/@electron/get/dist/esm/Downloader.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/GotDownloader.d.ts21
-rw-r--r--node_modules/@electron/get/dist/esm/GotDownloader.js73
-rw-r--r--node_modules/@electron/get/dist/esm/GotDownloader.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/artifact-utils.d.ts4
-rw-r--r--node_modules/@electron/get/dist/esm/artifact-utils.js61
-rw-r--r--node_modules/@electron/get/dist/esm/artifact-utils.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/downloader-resolver.d.ts3
-rw-r--r--node_modules/@electron/get/dist/esm/downloader-resolver.js9
-rw-r--r--node_modules/@electron/get/dist/esm/downloader-resolver.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/index.d.ts18
-rw-r--r--node_modules/@electron/get/dist/esm/index.js124
-rw-r--r--node_modules/@electron/get/dist/esm/index.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/proxy.d.ts4
-rw-r--r--node_modules/@electron/get/dist/esm/proxy.js29
-rw-r--r--node_modules/@electron/get/dist/esm/proxy.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/types.d.ts129
-rw-r--r--node_modules/@electron/get/dist/esm/types.js1
-rw-r--r--node_modules/@electron/get/dist/esm/types.js.map1
-rw-r--r--node_modules/@electron/get/dist/esm/utils.d.ts25
-rw-r--r--node_modules/@electron/get/dist/esm/utils.js95
-rw-r--r--node_modules/@electron/get/dist/esm/utils.js.map1
l---------node_modules/@electron/get/node_modules/.bin/semver1
-rw-r--r--node_modules/@electron/get/node_modules/debug/LICENSE20
-rw-r--r--node_modules/@electron/get/node_modules/debug/README.md481
-rw-r--r--node_modules/@electron/get/node_modules/debug/package.json59
-rw-r--r--node_modules/@electron/get/node_modules/debug/src/browser.js269
-rw-r--r--node_modules/@electron/get/node_modules/debug/src/common.js274
-rw-r--r--node_modules/@electron/get/node_modules/debug/src/index.js10
-rw-r--r--node_modules/@electron/get/node_modules/debug/src/node.js263
-rw-r--r--node_modules/@electron/get/node_modules/env-paths/index.d.ts101
-rw-r--r--node_modules/@electron/get/node_modules/env-paths/index.js74
-rw-r--r--node_modules/@electron/get/node_modules/env-paths/license9
-rw-r--r--node_modules/@electron/get/node_modules/env-paths/package.json45
-rw-r--r--node_modules/@electron/get/node_modules/env-paths/readme.md115
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/CHANGELOG.md864
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/LICENSE15
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/README.md261
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/copy-sync.js164
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/index.js5
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/copy/copy.js212
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/copy/index.js6
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/empty/index.js48
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/ensure/file.js49
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/ensure/index.js23
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/ensure/link.js61
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-paths.js99
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-type.js31
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink.js63
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/fs/index.js109
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/index.js28
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/json/index.js16
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/json/jsonfile.js12
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json-sync.js18
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json.js27
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/index.js14
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js54
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs.js63
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/win32.js25
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/index.js5
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/move-sync.js47
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/move/index.js6
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/move/move.js65
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/output/index.js40
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/path-exists/index.js12
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/remove/index.js9
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/remove/rimraf.js314
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/util/buffer.js12
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/util/stat.js172
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/lib/util/utimes.js79
-rw-r--r--node_modules/@electron/get/node_modules/fs-extra/package.json69
-rw-r--r--node_modules/@electron/get/node_modules/ms/index.js162
-rw-r--r--node_modules/@electron/get/node_modules/ms/license.md21
-rw-r--r--node_modules/@electron/get/node_modules/ms/package.json37
-rw-r--r--node_modules/@electron/get/node_modules/ms/readme.md60
-rw-r--r--node_modules/@electron/get/node_modules/semver/CHANGELOG.md70
-rw-r--r--node_modules/@electron/get/node_modules/semver/LICENSE15
-rw-r--r--node_modules/@electron/get/node_modules/semver/README.md443
-rwxr-xr-xnode_modules/@electron/get/node_modules/semver/bin/semver.js174
-rw-r--r--node_modules/@electron/get/node_modules/semver/package.json28
-rw-r--r--node_modules/@electron/get/node_modules/semver/range.bnf16
-rw-r--r--node_modules/@electron/get/node_modules/semver/semver.js1596
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/.github/FUNDING.yml2
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/.github/workflows/ci.yml47
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/LICENSE202
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/NEWS.md77
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/README.md92
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/index.d.ts51
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/index.js155
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/index.test-d.ts31
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/package.json79
-rw-r--r--node_modules/@electron/get/node_modules/sumchecker/yarn.lock4756
-rw-r--r--node_modules/@electron/get/package.json101
-rw-r--r--node_modules/@electron/universal/README.md36
-rw-r--r--node_modules/@electron/universal/dist/cjs/asar-utils.d.ts16
-rw-r--r--node_modules/@electron/universal/dist/cjs/asar-utils.js156
-rw-r--r--node_modules/@electron/universal/dist/cjs/asar-utils.js.map1
-rw-r--r--node_modules/@electron/universal/dist/cjs/debug.d.ts2
-rw-r--r--node_modules/@electron/universal/dist/cjs/debug.js6
-rw-r--r--node_modules/@electron/universal/dist/cjs/debug.js.map1
-rw-r--r--node_modules/@electron/universal/dist/cjs/file-utils.d.ts16
-rw-r--r--node_modules/@electron/universal/dist/cjs/file-utils.js71
-rw-r--r--node_modules/@electron/universal/dist/cjs/file-utils.js.map1
-rw-r--r--node_modules/@electron/universal/dist/cjs/index.d.ts34
-rw-r--r--node_modules/@electron/universal/dist/cjs/index.js228
-rw-r--r--node_modules/@electron/universal/dist/cjs/index.js.map1
-rw-r--r--node_modules/@electron/universal/dist/cjs/sha.d.ts1
-rw-r--r--node_modules/@electron/universal/dist/cjs/sha.js19
-rw-r--r--node_modules/@electron/universal/dist/cjs/sha.js.map1
-rw-r--r--node_modules/@electron/universal/dist/esm/asar-utils.d.ts16
-rw-r--r--node_modules/@electron/universal/dist/esm/asar-utils.js153
-rw-r--r--node_modules/@electron/universal/dist/esm/asar-utils.js.map1
-rw-r--r--node_modules/@electron/universal/dist/esm/debug.d.ts2
-rw-r--r--node_modules/@electron/universal/dist/esm/debug.js3
-rw-r--r--node_modules/@electron/universal/dist/esm/debug.js.map1
-rw-r--r--node_modules/@electron/universal/dist/esm/file-utils.d.ts16
-rw-r--r--node_modules/@electron/universal/dist/esm/file-utils.js68
-rw-r--r--node_modules/@electron/universal/dist/esm/file-utils.js.map1
-rw-r--r--node_modules/@electron/universal/dist/esm/index.d.ts34
-rw-r--r--node_modules/@electron/universal/dist/esm/index.js225
-rw-r--r--node_modules/@electron/universal/dist/esm/index.js.map1
-rw-r--r--node_modules/@electron/universal/dist/esm/sha.d.ts1
-rw-r--r--node_modules/@electron/universal/dist/esm/sha.js16
-rw-r--r--node_modules/@electron/universal/dist/esm/sha.js.map1
-rw-r--r--node_modules/@electron/universal/entry-asar/has-asar.js7
-rw-r--r--node_modules/@electron/universal/entry-asar/no-asar.js7
-rw-r--r--node_modules/@electron/universal/node_modules/debug/LICENSE20
-rw-r--r--node_modules/@electron/universal/node_modules/debug/README.md481
-rw-r--r--node_modules/@electron/universal/node_modules/debug/package.json59
-rw-r--r--node_modules/@electron/universal/node_modules/debug/src/browser.js269
-rw-r--r--node_modules/@electron/universal/node_modules/debug/src/common.js274
-rw-r--r--node_modules/@electron/universal/node_modules/debug/src/index.js10
-rw-r--r--node_modules/@electron/universal/node_modules/debug/src/node.js263
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/CHANGELOG.md902
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/LICENSE15
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/README.md264
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/copy-sync.js166
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/index.js5
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/copy/copy.js232
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/copy/index.js6
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/empty/index.js48
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/file.js69
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/index.js23
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/link.js61
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-paths.js99
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-type.js31
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink.js63
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/fs/index.js130
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/index.js27
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/json/index.js16
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/json/jsonfile.js11
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json-sync.js12
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json.js12
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/index.js14
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/make-dir.js141
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/index.js5
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/move-sync.js47
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/move/index.js6
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/move/move.js65
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/output/index.js40
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/path-exists/index.js12
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/remove/index.js9
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/remove/rimraf.js302
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/util/stat.js139
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/lib/util/utimes.js26
-rw-r--r--node_modules/@electron/universal/node_modules/fs-extra/package.json70
-rw-r--r--node_modules/@electron/universal/node_modules/jsonfile/CHANGELOG.md171
-rw-r--r--node_modules/@electron/universal/node_modules/jsonfile/LICENSE15
-rw-r--r--node_modules/@electron/universal/node_modules/jsonfile/README.md230
-rw-r--r--node_modules/@electron/universal/node_modules/jsonfile/index.js88
-rw-r--r--node_modules/@electron/universal/node_modules/jsonfile/package.json40
-rw-r--r--node_modules/@electron/universal/node_modules/jsonfile/utils.js14
-rw-r--r--node_modules/@electron/universal/node_modules/ms/index.js162
-rw-r--r--node_modules/@electron/universal/node_modules/ms/license.md21
-rw-r--r--node_modules/@electron/universal/node_modules/ms/package.json37
-rw-r--r--node_modules/@electron/universal/node_modules/ms/readme.md60
-rw-r--r--node_modules/@electron/universal/node_modules/universalify/LICENSE20
-rw-r--r--node_modules/@electron/universal/node_modules/universalify/README.md76
-rw-r--r--node_modules/@electron/universal/node_modules/universalify/index.js24
-rw-r--r--node_modules/@electron/universal/node_modules/universalify/package.json34
-rw-r--r--node_modules/@electron/universal/package.json64
-rw-r--r--node_modules/@malept/cross-spawn-promise/LICENSE202
-rw-r--r--node_modules/@malept/cross-spawn-promise/README.md27
-rw-r--r--node_modules/@malept/cross-spawn-promise/dist/src/index.d.ts61
-rw-r--r--node_modules/@malept/cross-spawn-promise/dist/src/index.js111
-rw-r--r--node_modules/@malept/cross-spawn-promise/dist/src/index.js.map1
-rw-r--r--node_modules/@malept/cross-spawn-promise/package.json110
-rw-r--r--node_modules/@sindresorhus/is/dist/index.d.ts232
-rw-r--r--node_modules/@sindresorhus/is/dist/index.js434
-rw-r--r--node_modules/@sindresorhus/is/dist/types.d.ts25
-rw-r--r--node_modules/@sindresorhus/is/dist/types.js3
-rw-r--r--node_modules/@sindresorhus/is/license9
-rw-r--r--node_modules/@sindresorhus/is/package.json96
-rw-r--r--node_modules/@sindresorhus/is/readme.md669
-rw-r--r--node_modules/@szmarczak/http-timer/LICENSE21
-rw-r--r--node_modules/@szmarczak/http-timer/README.md93
-rw-r--r--node_modules/@szmarczak/http-timer/dist/source/index.d.ts32
-rw-r--r--node_modules/@szmarczak/http-timer/dist/source/index.js126
-rw-r--r--node_modules/@szmarczak/http-timer/package.json72
-rwxr-xr-xnode_modules/@types/cacheable-request/LICENSE21
-rwxr-xr-xnode_modules/@types/cacheable-request/README.md16
-rwxr-xr-xnode_modules/@types/cacheable-request/index.d.ts137
-rwxr-xr-xnode_modules/@types/cacheable-request/package.json35
-rwxr-xr-xnode_modules/@types/glob/LICENSE21
-rwxr-xr-xnode_modules/@types/glob/README.md16
-rwxr-xr-xnode_modules/@types/glob/index.d.ts91
-rwxr-xr-xnode_modules/@types/glob/package.json43
-rwxr-xr-xnode_modules/@types/http-cache-semantics/LICENSE21
-rwxr-xr-xnode_modules/@types/http-cache-semantics/README.md16
-rwxr-xr-xnode_modules/@types/http-cache-semantics/index.d.ts170
-rwxr-xr-xnode_modules/@types/http-cache-semantics/package.json25
-rwxr-xr-xnode_modules/@types/keyv/LICENSE21
-rwxr-xr-xnode_modules/@types/keyv/README.md16
-rwxr-xr-xnode_modules/@types/keyv/index.d.ts90
-rwxr-xr-xnode_modules/@types/keyv/package.json32
-rwxr-xr-xnode_modules/@types/minimatch/LICENSE21
-rwxr-xr-xnode_modules/@types/minimatch/README.md16
-rwxr-xr-xnode_modules/@types/minimatch/index.d.ts300
-rwxr-xr-xnode_modules/@types/minimatch/package.json35
-rwxr-xr-xnode_modules/@types/node/LICENSE21
-rwxr-xr-xnode_modules/@types/node/README.md16
-rwxr-xr-xnode_modules/@types/node/assert.d.ts911
-rwxr-xr-xnode_modules/@types/node/assert/strict.d.ts8
-rwxr-xr-xnode_modules/@types/node/async_hooks.d.ts501
-rwxr-xr-xnode_modules/@types/node/buffer.d.ts2238
-rwxr-xr-xnode_modules/@types/node/child_process.d.ts1369
-rwxr-xr-xnode_modules/@types/node/cluster.d.ts410
-rwxr-xr-xnode_modules/@types/node/console.d.ts412
-rwxr-xr-xnode_modules/@types/node/constants.d.ts18
-rwxr-xr-xnode_modules/@types/node/crypto.d.ts3961
-rwxr-xr-xnode_modules/@types/node/dgram.d.ts545
-rwxr-xr-xnode_modules/@types/node/diagnostics_channel.d.ts153
-rwxr-xr-xnode_modules/@types/node/dns.d.ts659
-rwxr-xr-xnode_modules/@types/node/dns/promises.d.ts370
-rwxr-xr-xnode_modules/@types/node/domain.d.ts170
-rwxr-xr-xnode_modules/@types/node/events.d.ts641
-rwxr-xr-xnode_modules/@types/node/fs.d.ts3872
-rwxr-xr-xnode_modules/@types/node/fs/promises.d.ts1120
-rwxr-xr-xnode_modules/@types/node/globals.d.ts296
-rwxr-xr-xnode_modules/@types/node/globals.global.d.ts1
-rwxr-xr-xnode_modules/@types/node/http.d.ts1553
-rwxr-xr-xnode_modules/@types/node/http2.d.ts2106
-rwxr-xr-xnode_modules/@types/node/https.d.ts541
-rwxr-xr-xnode_modules/@types/node/index.d.ts132
-rwxr-xr-xnode_modules/@types/node/inspector.d.ts2741
-rwxr-xr-xnode_modules/@types/node/module.d.ts114
-rwxr-xr-xnode_modules/@types/node/net.d.ts838
-rwxr-xr-xnode_modules/@types/node/os.d.ts466
-rwxr-xr-xnode_modules/@types/node/package.json232
-rwxr-xr-xnode_modules/@types/node/path.d.ts191
-rwxr-xr-xnode_modules/@types/node/perf_hooks.d.ts610
-rwxr-xr-xnode_modules/@types/node/process.d.ts1482
-rwxr-xr-xnode_modules/@types/node/punycode.d.ts117
-rwxr-xr-xnode_modules/@types/node/querystring.d.ts131
-rwxr-xr-xnode_modules/@types/node/readline.d.ts653
-rwxr-xr-xnode_modules/@types/node/readline/promises.d.ts143
-rwxr-xr-xnode_modules/@types/node/repl.d.ts424
-rwxr-xr-xnode_modules/@types/node/stream.d.ts1339
-rwxr-xr-xnode_modules/@types/node/stream/consumers.d.ts24
-rwxr-xr-xnode_modules/@types/node/stream/promises.d.ts42
-rwxr-xr-xnode_modules/@types/node/stream/web.d.ts330
-rwxr-xr-xnode_modules/@types/node/string_decoder.d.ts67
-rwxr-xr-xnode_modules/@types/node/test.d.ts314
-rwxr-xr-xnode_modules/@types/node/timers.d.ts94
-rwxr-xr-xnode_modules/@types/node/timers/promises.d.ts68
-rwxr-xr-xnode_modules/@types/node/tls.d.ts1028
-rwxr-xr-xnode_modules/@types/node/trace_events.d.ts171
-rwxr-xr-xnode_modules/@types/node/ts4.8/assert.d.ts911
-rwxr-xr-xnode_modules/@types/node/ts4.8/assert/strict.d.ts8
-rwxr-xr-xnode_modules/@types/node/ts4.8/async_hooks.d.ts501
-rwxr-xr-xnode_modules/@types/node/ts4.8/buffer.d.ts2238
-rwxr-xr-xnode_modules/@types/node/ts4.8/child_process.d.ts1369
-rwxr-xr-xnode_modules/@types/node/ts4.8/cluster.d.ts410
-rwxr-xr-xnode_modules/@types/node/ts4.8/console.d.ts412
-rwxr-xr-xnode_modules/@types/node/ts4.8/constants.d.ts18
-rwxr-xr-xnode_modules/@types/node/ts4.8/crypto.d.ts3961
-rwxr-xr-xnode_modules/@types/node/ts4.8/dgram.d.ts545
-rwxr-xr-xnode_modules/@types/node/ts4.8/diagnostics_channel.d.ts153
-rwxr-xr-xnode_modules/@types/node/ts4.8/dns.d.ts659
-rwxr-xr-xnode_modules/@types/node/ts4.8/dns/promises.d.ts370
-rwxr-xr-xnode_modules/@types/node/ts4.8/domain.d.ts170
-rwxr-xr-xnode_modules/@types/node/ts4.8/events.d.ts641
-rwxr-xr-xnode_modules/@types/node/ts4.8/fs.d.ts3872
-rwxr-xr-xnode_modules/@types/node/ts4.8/fs/promises.d.ts1120
-rwxr-xr-xnode_modules/@types/node/ts4.8/globals.d.ts294
-rwxr-xr-xnode_modules/@types/node/ts4.8/globals.global.d.ts1
-rwxr-xr-xnode_modules/@types/node/ts4.8/http.d.ts1553
-rwxr-xr-xnode_modules/@types/node/ts4.8/http2.d.ts2106
-rwxr-xr-xnode_modules/@types/node/ts4.8/https.d.ts541
-rwxr-xr-xnode_modules/@types/node/ts4.8/index.d.ts87
-rwxr-xr-xnode_modules/@types/node/ts4.8/inspector.d.ts2741
-rwxr-xr-xnode_modules/@types/node/ts4.8/module.d.ts114
-rwxr-xr-xnode_modules/@types/node/ts4.8/net.d.ts838
-rwxr-xr-xnode_modules/@types/node/ts4.8/os.d.ts466
-rwxr-xr-xnode_modules/@types/node/ts4.8/path.d.ts191
-rwxr-xr-xnode_modules/@types/node/ts4.8/perf_hooks.d.ts610
-rwxr-xr-xnode_modules/@types/node/ts4.8/process.d.ts1482
-rwxr-xr-xnode_modules/@types/node/ts4.8/punycode.d.ts117
-rwxr-xr-xnode_modules/@types/node/ts4.8/querystring.d.ts131
-rwxr-xr-xnode_modules/@types/node/ts4.8/readline.d.ts653
-rwxr-xr-xnode_modules/@types/node/ts4.8/readline/promises.d.ts143
-rwxr-xr-xnode_modules/@types/node/ts4.8/repl.d.ts424
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream.d.ts1339
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream/consumers.d.ts24
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream/promises.d.ts42
-rwxr-xr-xnode_modules/@types/node/ts4.8/stream/web.d.ts330
-rwxr-xr-xnode_modules/@types/node/ts4.8/string_decoder.d.ts67
-rwxr-xr-xnode_modules/@types/node/ts4.8/test.d.ts190
-rwxr-xr-xnode_modules/@types/node/ts4.8/timers.d.ts94
-rwxr-xr-xnode_modules/@types/node/ts4.8/timers/promises.d.ts68
-rwxr-xr-xnode_modules/@types/node/ts4.8/tls.d.ts1028
-rwxr-xr-xnode_modules/@types/node/ts4.8/trace_events.d.ts171
-rwxr-xr-xnode_modules/@types/node/ts4.8/tty.d.ts206
-rwxr-xr-xnode_modules/@types/node/ts4.8/url.d.ts897
-rwxr-xr-xnode_modules/@types/node/ts4.8/util.d.ts1792
-rwxr-xr-xnode_modules/@types/node/ts4.8/v8.d.ts396
-rwxr-xr-xnode_modules/@types/node/ts4.8/vm.d.ts509
-rwxr-xr-xnode_modules/@types/node/ts4.8/wasi.d.ts158
-rwxr-xr-xnode_modules/@types/node/ts4.8/worker_threads.d.ts646
-rwxr-xr-xnode_modules/@types/node/ts4.8/zlib.d.ts517
-rwxr-xr-xnode_modules/@types/node/tty.d.ts206
-rwxr-xr-xnode_modules/@types/node/url.d.ts897
-rwxr-xr-xnode_modules/@types/node/util.d.ts1792
-rwxr-xr-xnode_modules/@types/node/v8.d.ts396
-rwxr-xr-xnode_modules/@types/node/vm.d.ts509
-rwxr-xr-xnode_modules/@types/node/wasi.d.ts158
-rwxr-xr-xnode_modules/@types/node/worker_threads.d.ts646
-rwxr-xr-xnode_modules/@types/node/zlib.d.ts517
-rw-r--r--node_modules/@types/responselike/LICENSE21
-rw-r--r--node_modules/@types/responselike/README.md16
-rw-r--r--node_modules/@types/responselike/index.d.ts34
-rw-r--r--node_modules/@types/responselike/package.json25
-rwxr-xr-xnode_modules/@types/yauzl/LICENSE21
-rwxr-xr-xnode_modules/@types/yauzl/README.md16
-rwxr-xr-xnode_modules/@types/yauzl/index.d.ts98
-rwxr-xr-xnode_modules/@types/yauzl/package.json27
-rw-r--r--node_modules/ajv/.tonic_example.js20
-rw-r--r--node_modules/ajv/LICENSE22
-rw-r--r--node_modules/ajv/README.md1497
-rw-r--r--node_modules/ajv/dist/ajv.bundle.js7189
-rw-r--r--node_modules/ajv/dist/ajv.min.js3
-rw-r--r--node_modules/ajv/dist/ajv.min.js.map1
-rw-r--r--node_modules/ajv/lib/ajv.d.ts397
-rw-r--r--node_modules/ajv/lib/ajv.js506
-rw-r--r--node_modules/ajv/lib/cache.js26
-rw-r--r--node_modules/ajv/lib/compile/async.js90
-rw-r--r--node_modules/ajv/lib/compile/equal.js5
-rw-r--r--node_modules/ajv/lib/compile/error_classes.js34
-rw-r--r--node_modules/ajv/lib/compile/formats.js142
-rw-r--r--node_modules/ajv/lib/compile/index.js387
-rw-r--r--node_modules/ajv/lib/compile/resolve.js270
-rw-r--r--node_modules/ajv/lib/compile/rules.js66
-rw-r--r--node_modules/ajv/lib/compile/schema_obj.js9
-rw-r--r--node_modules/ajv/lib/compile/ucs2length.js20
-rw-r--r--node_modules/ajv/lib/compile/util.js239
-rw-r--r--node_modules/ajv/lib/data.js49
-rw-r--r--node_modules/ajv/lib/definition_schema.js37
-rw-r--r--node_modules/ajv/lib/dot/_limit.jst113
-rw-r--r--node_modules/ajv/lib/dot/_limitItems.jst12
-rw-r--r--node_modules/ajv/lib/dot/_limitLength.jst12
-rw-r--r--node_modules/ajv/lib/dot/_limitProperties.jst12
-rw-r--r--node_modules/ajv/lib/dot/allOf.jst32
-rw-r--r--node_modules/ajv/lib/dot/anyOf.jst46
-rw-r--r--node_modules/ajv/lib/dot/coerce.def51
-rw-r--r--node_modules/ajv/lib/dot/comment.jst9
-rw-r--r--node_modules/ajv/lib/dot/const.jst11
-rw-r--r--node_modules/ajv/lib/dot/contains.jst55
-rw-r--r--node_modules/ajv/lib/dot/custom.jst191
-rw-r--r--node_modules/ajv/lib/dot/defaults.def47
-rw-r--r--node_modules/ajv/lib/dot/definitions.def203
-rw-r--r--node_modules/ajv/lib/dot/dependencies.jst79
-rw-r--r--node_modules/ajv/lib/dot/enum.jst30
-rw-r--r--node_modules/ajv/lib/dot/errors.def194
-rw-r--r--node_modules/ajv/lib/dot/format.jst106
-rw-r--r--node_modules/ajv/lib/dot/if.jst73
-rw-r--r--node_modules/ajv/lib/dot/items.jst98
-rw-r--r--node_modules/ajv/lib/dot/missing.def39
-rw-r--r--node_modules/ajv/lib/dot/multipleOf.jst22
-rw-r--r--node_modules/ajv/lib/dot/not.jst43
-rw-r--r--node_modules/ajv/lib/dot/oneOf.jst54
-rw-r--r--node_modules/ajv/lib/dot/pattern.jst14
-rw-r--r--node_modules/ajv/lib/dot/properties.jst245
-rw-r--r--node_modules/ajv/lib/dot/propertyNames.jst52
-rw-r--r--node_modules/ajv/lib/dot/ref.jst85
-rw-r--r--node_modules/ajv/lib/dot/required.jst108
-rw-r--r--node_modules/ajv/lib/dot/uniqueItems.jst62
-rw-r--r--node_modules/ajv/lib/dot/validate.jst276
-rw-r--r--node_modules/ajv/lib/dotjs/README.md3
-rw-r--r--node_modules/ajv/lib/dotjs/_limit.js163
-rw-r--r--node_modules/ajv/lib/dotjs/_limitItems.js80
-rw-r--r--node_modules/ajv/lib/dotjs/_limitLength.js85
-rw-r--r--node_modules/ajv/lib/dotjs/_limitProperties.js80
-rw-r--r--node_modules/ajv/lib/dotjs/allOf.js42
-rw-r--r--node_modules/ajv/lib/dotjs/anyOf.js73
-rw-r--r--node_modules/ajv/lib/dotjs/comment.js14
-rw-r--r--node_modules/ajv/lib/dotjs/const.js56
-rw-r--r--node_modules/ajv/lib/dotjs/contains.js81
-rw-r--r--node_modules/ajv/lib/dotjs/custom.js228
-rw-r--r--node_modules/ajv/lib/dotjs/dependencies.js168
-rw-r--r--node_modules/ajv/lib/dotjs/enum.js66
-rw-r--r--node_modules/ajv/lib/dotjs/format.js150
-rw-r--r--node_modules/ajv/lib/dotjs/if.js103
-rw-r--r--node_modules/ajv/lib/dotjs/index.js33
-rw-r--r--node_modules/ajv/lib/dotjs/items.js140
-rw-r--r--node_modules/ajv/lib/dotjs/multipleOf.js80
-rw-r--r--node_modules/ajv/lib/dotjs/not.js84
-rw-r--r--node_modules/ajv/lib/dotjs/oneOf.js73
-rw-r--r--node_modules/ajv/lib/dotjs/pattern.js75
-rw-r--r--node_modules/ajv/lib/dotjs/properties.js335
-rw-r--r--node_modules/ajv/lib/dotjs/propertyNames.js81
-rw-r--r--node_modules/ajv/lib/dotjs/ref.js124
-rw-r--r--node_modules/ajv/lib/dotjs/required.js270
-rw-r--r--node_modules/ajv/lib/dotjs/uniqueItems.js86
-rw-r--r--node_modules/ajv/lib/dotjs/validate.js482
-rw-r--r--node_modules/ajv/lib/keyword.js146
-rw-r--r--node_modules/ajv/lib/refs/data.json17
-rw-r--r--node_modules/ajv/lib/refs/json-schema-draft-04.json149
-rw-r--r--node_modules/ajv/lib/refs/json-schema-draft-06.json154
-rw-r--r--node_modules/ajv/lib/refs/json-schema-draft-07.json168
-rw-r--r--node_modules/ajv/lib/refs/json-schema-secure.json94
-rw-r--r--node_modules/ajv/package.json106
-rw-r--r--node_modules/ajv/scripts/.eslintrc.yml3
-rw-r--r--node_modules/ajv/scripts/bundle.js61
-rw-r--r--node_modules/ajv/scripts/compile-dots.js73
-rw-r--r--node_modules/ajv/scripts/info10
-rw-r--r--node_modules/ajv/scripts/prepare-tests12
-rw-r--r--node_modules/ajv/scripts/publish-built-version32
-rw-r--r--node_modules/ajv/scripts/travis-gh-pages23
-rw-r--r--node_modules/ansi-regex/index.js4
-rw-r--r--node_modules/ansi-regex/license21
-rw-r--r--node_modules/ansi-regex/package.json64
-rw-r--r--node_modules/ansi-regex/readme.md39
-rw-r--r--node_modules/array-find-index/index.js25
-rw-r--r--node_modules/array-find-index/license21
-rw-r--r--node_modules/array-find-index/package.json35
-rw-r--r--node_modules/array-find-index/readme.md30
-rw-r--r--node_modules/asar/CHANGELOG.md140
-rw-r--r--node_modules/asar/LICENSE.md20
-rw-r--r--node_modules/asar/README.md215
-rwxr-xr-xnode_modules/asar/bin/asar.js84
-rw-r--r--node_modules/asar/lib/asar.js219
-rw-r--r--node_modules/asar/lib/crawlfs.js41
-rw-r--r--node_modules/asar/lib/disk.js123
-rw-r--r--node_modules/asar/lib/filesystem.js151
-rw-r--r--node_modules/asar/lib/index.d.ts90
-rw-r--r--node_modules/asar/lib/integrity.js62
-rw-r--r--node_modules/asar/lib/wrapped-fs.js26
-rw-r--r--node_modules/asar/package.json67
-rw-r--r--node_modules/asn1/LICENSE19
-rw-r--r--node_modules/asn1/README.md50
-rw-r--r--node_modules/asn1/lib/ber/errors.js13
-rw-r--r--node_modules/asn1/lib/ber/index.js27
-rw-r--r--node_modules/asn1/lib/ber/reader.js262
-rw-r--r--node_modules/asn1/lib/ber/types.js36
-rw-r--r--node_modules/asn1/lib/ber/writer.js317
-rw-r--r--node_modules/asn1/lib/index.js20
-rw-r--r--node_modules/asn1/package.json31
-rw-r--r--node_modules/assert-plus/AUTHORS6
-rw-r--r--node_modules/assert-plus/CHANGES.md14
-rw-r--r--node_modules/assert-plus/README.md162
-rw-r--r--node_modules/assert-plus/assert.js211
-rw-r--r--node_modules/assert-plus/package.json23
-rw-r--r--node_modules/asynckit/LICENSE21
-rw-r--r--node_modules/asynckit/README.md233
-rw-r--r--node_modules/asynckit/bench.js76
-rw-r--r--node_modules/asynckit/index.js6
-rw-r--r--node_modules/asynckit/lib/abort.js29
-rw-r--r--node_modules/asynckit/lib/async.js34
-rw-r--r--node_modules/asynckit/lib/defer.js26
-rw-r--r--node_modules/asynckit/lib/iterate.js75
-rw-r--r--node_modules/asynckit/lib/readable_asynckit.js91
-rw-r--r--node_modules/asynckit/lib/readable_parallel.js25
-rw-r--r--node_modules/asynckit/lib/readable_serial.js25
-rw-r--r--node_modules/asynckit/lib/readable_serial_ordered.js29
-rw-r--r--node_modules/asynckit/lib/state.js37
-rw-r--r--node_modules/asynckit/lib/streamify.js141
-rw-r--r--node_modules/asynckit/lib/terminator.js29
-rw-r--r--node_modules/asynckit/package.json63
-rw-r--r--node_modules/asynckit/parallel.js43
-rw-r--r--node_modules/asynckit/serial.js17
-rw-r--r--node_modules/asynckit/serialOrdered.js75
-rw-r--r--node_modules/asynckit/stream.js21
-rw-r--r--node_modules/at-least-node/LICENSE6
-rw-r--r--node_modules/at-least-node/README.md25
-rw-r--r--node_modules/at-least-node/index.js5
-rw-r--r--node_modules/at-least-node/package.json32
-rw-r--r--node_modules/author-regex/LICENSE22
-rw-r--r--node_modules/author-regex/README.md69
-rw-r--r--node_modules/author-regex/index.js13
-rw-r--r--node_modules/author-regex/package.json57
-rw-r--r--node_modules/aws-sign2/LICENSE55
-rw-r--r--node_modules/aws-sign2/README.md4
-rw-r--r--node_modules/aws-sign2/index.js212
-rw-r--r--node_modules/aws-sign2/package.json17
-rw-r--r--node_modules/aws4/.github/FUNDING.yml3
-rw-r--r--node_modules/aws4/.travis.yml9
-rw-r--r--node_modules/aws4/LICENSE19
-rw-r--r--node_modules/aws4/README.md183
-rw-r--r--node_modules/aws4/aws4.js373
-rw-r--r--node_modules/aws4/lru.js96
-rw-r--r--node_modules/aws4/package.json17
-rw-r--r--node_modules/balanced-match/.github/FUNDING.yml2
-rw-r--r--node_modules/balanced-match/LICENSE.md21
-rw-r--r--node_modules/balanced-match/README.md97
-rw-r--r--node_modules/balanced-match/index.js62
-rw-r--r--node_modules/balanced-match/package.json48
-rw-r--r--node_modules/base64-js/LICENSE21
-rw-r--r--node_modules/base64-js/README.md34
-rw-r--r--node_modules/base64-js/base64js.min.js1
-rw-r--r--node_modules/base64-js/index.d.ts3
-rw-r--r--node_modules/base64-js/index.js150
-rw-r--r--node_modules/base64-js/package.json47
-rw-r--r--node_modules/bcrypt-pbkdf/CONTRIBUTING.md13
-rw-r--r--node_modules/bcrypt-pbkdf/LICENSE66
-rw-r--r--node_modules/bcrypt-pbkdf/README.md45
-rw-r--r--node_modules/bcrypt-pbkdf/index.js556
-rw-r--r--node_modules/bcrypt-pbkdf/package.json15
-rw-r--r--node_modules/bluebird/LICENSE21
-rw-r--r--node_modules/bluebird/README.md57
-rw-r--r--node_modules/bluebird/changelog.md1
-rw-r--r--node_modules/bluebird/js/browser/bluebird.core.js3914
-rw-r--r--node_modules/bluebird/js/browser/bluebird.core.min.js31
-rw-r--r--node_modules/bluebird/js/browser/bluebird.js5778
-rw-r--r--node_modules/bluebird/js/browser/bluebird.min.js31
-rw-r--r--node_modules/bluebird/js/release/any.js21
-rw-r--r--node_modules/bluebird/js/release/assert.js55
-rw-r--r--node_modules/bluebird/js/release/async.js120
-rw-r--r--node_modules/bluebird/js/release/bind.js67
-rw-r--r--node_modules/bluebird/js/release/bluebird.js11
-rw-r--r--node_modules/bluebird/js/release/call_get.js123
-rw-r--r--node_modules/bluebird/js/release/cancel.js129
-rw-r--r--node_modules/bluebird/js/release/catch_filter.js42
-rw-r--r--node_modules/bluebird/js/release/context.js69
-rw-r--r--node_modules/bluebird/js/release/debuggability.js1009
-rw-r--r--node_modules/bluebird/js/release/direct_resolve.js46
-rw-r--r--node_modules/bluebird/js/release/each.js30
-rw-r--r--node_modules/bluebird/js/release/errors.js116
-rw-r--r--node_modules/bluebird/js/release/es5.js80
-rw-r--r--node_modules/bluebird/js/release/filter.js12
-rw-r--r--node_modules/bluebird/js/release/finally.js146
-rw-r--r--node_modules/bluebird/js/release/generators.js223
-rw-r--r--node_modules/bluebird/js/release/join.js165
-rw-r--r--node_modules/bluebird/js/release/map.js175
-rw-r--r--node_modules/bluebird/js/release/method.js55
-rw-r--r--node_modules/bluebird/js/release/nodeback.js51
-rw-r--r--node_modules/bluebird/js/release/nodeify.js58
-rw-r--r--node_modules/bluebird/js/release/promise.js819
-rw-r--r--node_modules/bluebird/js/release/promise_array.js186
-rw-r--r--node_modules/bluebird/js/release/promisify.js314
-rw-r--r--node_modules/bluebird/js/release/props.js118
-rw-r--r--node_modules/bluebird/js/release/queue.js73
-rw-r--r--node_modules/bluebird/js/release/race.js49
-rw-r--r--node_modules/bluebird/js/release/reduce.js183
-rw-r--r--node_modules/bluebird/js/release/schedule.js62
-rw-r--r--node_modules/bluebird/js/release/settle.js47
-rw-r--r--node_modules/bluebird/js/release/some.js148
-rw-r--r--node_modules/bluebird/js/release/synchronous_inspection.js103
-rw-r--r--node_modules/bluebird/js/release/thenables.js86
-rw-r--r--node_modules/bluebird/js/release/timers.js93
-rw-r--r--node_modules/bluebird/js/release/using.js226
-rw-r--r--node_modules/bluebird/js/release/util.js421
-rw-r--r--node_modules/bluebird/package.json78
-rw-r--r--node_modules/boolean/.eslintrc.json3
-rw-r--r--node_modules/boolean/.npmpackagejsonlintrc.json3
-rw-r--r--node_modules/boolean/.releaserc.json3
-rw-r--r--node_modules/boolean/CHANGELOG.md70
-rw-r--r--node_modules/boolean/LICENSE.txt8
-rw-r--r--node_modules/boolean/README.md95
-rw-r--r--node_modules/boolean/build/lib/boolean.d.ts2
-rw-r--r--node_modules/boolean/build/lib/boolean.js16
-rw-r--r--node_modules/boolean/build/lib/index.d.ts3
-rw-r--r--node_modules/boolean/build/lib/index.js7
-rw-r--r--node_modules/boolean/build/lib/isBooleanable.d.ts2
-rw-r--r--node_modules/boolean/build/lib/isBooleanable.js19
-rw-r--r--node_modules/boolean/lib/boolean.ts17
-rw-r--r--node_modules/boolean/lib/index.ts4
-rw-r--r--node_modules/boolean/lib/isBooleanable.ts20
-rw-r--r--node_modules/boolean/licenseCheck.json16
-rw-r--r--node_modules/boolean/package.json46
-rw-r--r--node_modules/boolean/tsconfig.json19
-rw-r--r--node_modules/brace-expansion/LICENSE21
-rw-r--r--node_modules/brace-expansion/README.md129
-rw-r--r--node_modules/brace-expansion/index.js201
-rw-r--r--node_modules/brace-expansion/package.json47
-rw-r--r--node_modules/buffer-alloc-unsafe/index.js17
-rw-r--r--node_modules/buffer-alloc-unsafe/package.json24
-rw-r--r--node_modules/buffer-alloc-unsafe/readme.md46
-rw-r--r--node_modules/buffer-alloc/index.js32
-rw-r--r--node_modules/buffer-alloc/package.json26
-rw-r--r--node_modules/buffer-alloc/readme.md43
-rw-r--r--node_modules/buffer-crc32/LICENSE19
-rw-r--r--node_modules/buffer-crc32/README.md47
-rw-r--r--node_modules/buffer-crc32/index.js111
-rw-r--r--node_modules/buffer-crc32/package.json39
-rw-r--r--node_modules/buffer-equal/.travis.yml4
-rw-r--r--node_modules/buffer-equal/LICENSE18
-rw-r--r--node_modules/buffer-equal/README.markdown62
-rw-r--r--node_modules/buffer-equal/example/eq.js14
-rw-r--r--node_modules/buffer-equal/index.js14
-rw-r--r--node_modules/buffer-equal/package.json33
-rw-r--r--node_modules/buffer-equal/test/eq.js35
-rw-r--r--node_modules/buffer-fill/index.js113
-rw-r--r--node_modules/buffer-fill/package.json16
-rw-r--r--node_modules/buffer-fill/readme.md54
-rw-r--r--node_modules/buffer-from/LICENSE21
-rw-r--r--node_modules/buffer-from/index.js69
-rw-r--r--node_modules/buffer-from/package.json19
-rw-r--r--node_modules/buffer-from/readme.md69
-rwxr-xr-xnode_modules/cacheable-lookup/LICENSE21
-rwxr-xr-xnode_modules/cacheable-lookup/README.md240
-rwxr-xr-xnode_modules/cacheable-lookup/index.d.ts139
-rwxr-xr-xnode_modules/cacheable-lookup/package.json45
-rwxr-xr-xnode_modules/cacheable-lookup/source/index.js436
-rw-r--r--node_modules/cacheable-request/LICENSE21
-rw-r--r--node_modules/cacheable-request/README.md206
-rw-r--r--node_modules/cacheable-request/package.json56
-rw-r--r--node_modules/cacheable-request/src/index.js251
-rw-r--r--node_modules/camelcase-keys/index.js12
-rw-r--r--node_modules/camelcase-keys/license21
-rw-r--r--node_modules/camelcase-keys/package.json52
-rw-r--r--node_modules/camelcase-keys/readme.md54
-rw-r--r--node_modules/camelcase/index.js56
-rw-r--r--node_modules/camelcase/license21
-rw-r--r--node_modules/camelcase/package.json39
-rw-r--r--node_modules/camelcase/readme.md57
-rw-r--r--node_modules/caseless/LICENSE28
-rw-r--r--node_modules/caseless/README.md45
-rw-r--r--node_modules/caseless/index.js67
-rw-r--r--node_modules/caseless/package.json27
-rw-r--r--node_modules/caseless/test.js67
-rw-r--r--node_modules/chromium-pickle-js/README.md132
-rw-r--r--node_modules/chromium-pickle-js/lib/exports.js11
-rw-r--r--node_modules/chromium-pickle-js/lib/pickle.js222
-rw-r--r--node_modules/chromium-pickle-js/package.json21
-rw-r--r--node_modules/clone-response/LICENSE21
-rw-r--r--node_modules/clone-response/README.md62
-rw-r--r--node_modules/clone-response/package.json41
-rw-r--r--node_modules/clone-response/src/index.js17
-rw-r--r--node_modules/code-point-at/index.js32
-rw-r--r--node_modules/code-point-at/license21
-rw-r--r--node_modules/code-point-at/package.json38
-rw-r--r--node_modules/code-point-at/readme.md32
-rw-r--r--node_modules/colors/.travis.yml6
-rw-r--r--node_modules/colors/MIT-LICENSE.txt23
-rw-r--r--node_modules/colors/ReadMe.md167
-rw-r--r--node_modules/colors/examples/normal-usage.js74
-rw-r--r--node_modules/colors/examples/safe-string.js76
-rw-r--r--node_modules/colors/lib/colors.js176
-rw-r--r--node_modules/colors/lib/custom/trap.js45
-rw-r--r--node_modules/colors/lib/custom/zalgo.js104
-rw-r--r--node_modules/colors/lib/extendStringPrototype.js118
-rw-r--r--node_modules/colors/lib/index.js12
-rw-r--r--node_modules/colors/lib/maps/america.js12
-rw-r--r--node_modules/colors/lib/maps/rainbow.js13
-rw-r--r--node_modules/colors/lib/maps/random.js8
-rw-r--r--node_modules/colors/lib/maps/zebra.js5
-rw-r--r--node_modules/colors/lib/styles.js77
-rw-r--r--node_modules/colors/lib/system/supports-colors.js61
-rw-r--r--node_modules/colors/package.json21
-rw-r--r--node_modules/colors/safe.js9
-rw-r--r--node_modules/colors/screenshots/colors.pngbin0 -> 79787 bytes
-rw-r--r--node_modules/colors/tests/basic-test.js50
-rw-r--r--node_modules/colors/tests/safe-test.js45
-rw-r--r--node_modules/colors/themes/generic-logging.js12
-rw-r--r--node_modules/combined-stream/License19
-rw-r--r--node_modules/combined-stream/Readme.md138
-rw-r--r--node_modules/combined-stream/lib/combined_stream.js208
-rw-r--r--node_modules/combined-stream/package.json25
-rw-r--r--node_modules/combined-stream/yarn.lock17
-rw-r--r--node_modules/commander/CHANGELOG.md385
-rw-r--r--node_modules/commander/LICENSE22
-rw-r--r--node_modules/commander/Readme.md737
-rw-r--r--node_modules/commander/index.js1756
-rw-r--r--node_modules/commander/package.json48
-rw-r--r--node_modules/commander/typings/index.d.ts386
-rw-r--r--node_modules/compare-version/README.md31
-rw-r--r--node_modules/compare-version/index.js33
-rw-r--r--node_modules/compare-version/package.json32
-rw-r--r--node_modules/concat-map/.travis.yml4
-rw-r--r--node_modules/concat-map/LICENSE18
-rw-r--r--node_modules/concat-map/README.markdown62
-rw-r--r--node_modules/concat-map/example/map.js6
-rw-r--r--node_modules/concat-map/index.js13
-rw-r--r--node_modules/concat-map/package.json43
-rw-r--r--node_modules/concat-map/test/map.js39
-rw-r--r--node_modules/concat-stream/LICENSE24
-rw-r--r--node_modules/concat-stream/index.js144
-rw-r--r--node_modules/concat-stream/node_modules/isarray/.npmignore1
-rw-r--r--node_modules/concat-stream/node_modules/isarray/.travis.yml4
-rw-r--r--node_modules/concat-stream/node_modules/isarray/Makefile6
-rw-r--r--node_modules/concat-stream/node_modules/isarray/README.md60
-rw-r--r--node_modules/concat-stream/node_modules/isarray/component.json19
-rw-r--r--node_modules/concat-stream/node_modules/isarray/index.js5
-rw-r--r--node_modules/concat-stream/node_modules/isarray/package.json45
-rw-r--r--node_modules/concat-stream/node_modules/isarray/test.js20
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/.travis.yml34
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/LICENSE47
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/README.md58
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md60
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/duplex.js1
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/package.json52
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/passthrough.js1
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/readable-browser.js7
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/readable.js19
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/transform.js1
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/writable-browser.js1
-rw-r--r--node_modules/concat-stream/node_modules/readable-stream/writable.js8
-rw-r--r--node_modules/concat-stream/node_modules/safe-buffer/LICENSE21
-rw-r--r--node_modules/concat-stream/node_modules/safe-buffer/README.md584
-rw-r--r--node_modules/concat-stream/node_modules/safe-buffer/index.d.ts187
-rw-r--r--node_modules/concat-stream/node_modules/safe-buffer/index.js62
-rw-r--r--node_modules/concat-stream/node_modules/safe-buffer/package.json37
-rw-r--r--node_modules/concat-stream/node_modules/string_decoder/.travis.yml50
-rw-r--r--node_modules/concat-stream/node_modules/string_decoder/LICENSE48
-rw-r--r--node_modules/concat-stream/node_modules/string_decoder/README.md47
-rw-r--r--node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--node_modules/concat-stream/node_modules/string_decoder/package.json31
-rw-r--r--node_modules/concat-stream/package.json55
-rw-r--r--node_modules/concat-stream/readme.md102
-rw-r--r--node_modules/config-chain/LICENCE22
-rwxr-xr-xnode_modules/config-chain/index.js282
-rw-r--r--node_modules/config-chain/package.json28
-rw-r--r--node_modules/config-chain/readme.markdown257
-rw-r--r--node_modules/core-util-is/LICENSE19
-rw-r--r--node_modules/core-util-is/README.md3
-rw-r--r--node_modules/core-util-is/float.patch604
-rw-r--r--node_modules/core-util-is/lib/util.js107
-rw-r--r--node_modules/core-util-is/package.json32
-rw-r--r--node_modules/core-util-is/test.js68
-rw-r--r--node_modules/cross-spawn-windows-exe/LICENSE202
-rw-r--r--node_modules/cross-spawn-windows-exe/README.md67
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/arch.d.ts6
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/arch.js15
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/arch.js.map1
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/dotnet.d.ts22
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/dotnet.js54
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/dotnet.js.map1
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/exe.d.ts24
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/exe.js60
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/exe.js.map1
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/index.d.ts5
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/index.js19
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/index.js.map1
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/normalize-path.d.ts9
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js38
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js.map1
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/wrapper.d.ts50
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/wrapper.js98
-rw-r--r--node_modules/cross-spawn-windows-exe/dist/src/wrapper.js.map1
-rw-r--r--node_modules/cross-spawn-windows-exe/package.json153
-rw-r--r--node_modules/cross-spawn/CHANGELOG.md130
-rw-r--r--node_modules/cross-spawn/LICENSE21
-rw-r--r--node_modules/cross-spawn/README.md96
-rw-r--r--node_modules/cross-spawn/index.js39
-rw-r--r--node_modules/cross-spawn/lib/enoent.js59
-rw-r--r--node_modules/cross-spawn/lib/parse.js91
-rw-r--r--node_modules/cross-spawn/lib/util/escape.js45
-rw-r--r--node_modules/cross-spawn/lib/util/readShebang.js23
-rw-r--r--node_modules/cross-spawn/lib/util/resolveCommand.js52
-rw-r--r--node_modules/cross-spawn/package.json73
-rw-r--r--node_modules/currently-unhandled/browser.js27
-rw-r--r--node_modules/currently-unhandled/core.js33
-rw-r--r--node_modules/currently-unhandled/index.js12
-rw-r--r--node_modules/currently-unhandled/license21
-rw-r--r--node_modules/currently-unhandled/package.json71
-rw-r--r--node_modules/currently-unhandled/readme.md44
-rw-r--r--node_modules/dashdash/CHANGES.md364
-rw-r--r--node_modules/dashdash/LICENSE.txt24
-rw-r--r--node_modules/dashdash/README.md574
-rw-r--r--node_modules/dashdash/etc/dashdash.bash_completion.in389
-rw-r--r--node_modules/dashdash/lib/dashdash.js1055
-rw-r--r--node_modules/dashdash/package.json26
-rw-r--r--node_modules/debug/CHANGELOG.md395
-rw-r--r--node_modules/debug/LICENSE19
-rw-r--r--node_modules/debug/README.md437
-rw-r--r--node_modules/debug/node.js1
-rw-r--r--node_modules/debug/package.json51
-rw-r--r--node_modules/debug/src/browser.js180
-rw-r--r--node_modules/debug/src/common.js249
-rw-r--r--node_modules/debug/src/index.js12
-rw-r--r--node_modules/debug/src/node.js177
-rw-r--r--node_modules/decamelize/index.js13
-rw-r--r--node_modules/decamelize/license21
-rw-r--r--node_modules/decamelize/package.json38
-rw-r--r--node_modules/decamelize/readme.md48
-rw-r--r--node_modules/decompress-response/index.d.ts22
-rw-r--r--node_modules/decompress-response/index.js58
-rw-r--r--node_modules/decompress-response/license9
-rw-r--r--node_modules/decompress-response/node_modules/mimic-response/index.d.ts17
-rw-r--r--node_modules/decompress-response/node_modules/mimic-response/index.js77
-rw-r--r--node_modules/decompress-response/node_modules/mimic-response/license9
-rw-r--r--node_modules/decompress-response/node_modules/mimic-response/package.json42
-rw-r--r--node_modules/decompress-response/node_modules/mimic-response/readme.md78
-rw-r--r--node_modules/decompress-response/package.json56
-rw-r--r--node_modules/decompress-response/readme.md48
-rw-r--r--node_modules/deep-extend/CHANGELOG.md46
-rw-r--r--node_modules/deep-extend/LICENSE20
-rw-r--r--node_modules/deep-extend/README.md91
-rw-r--r--node_modules/deep-extend/index.js1
-rw-r--r--node_modules/deep-extend/lib/deep-extend.js150
-rw-r--r--node_modules/deep-extend/package.json62
-rw-r--r--node_modules/defer-to-connect/LICENSE21
-rw-r--r--node_modules/defer-to-connect/README.md38
-rw-r--r--node_modules/defer-to-connect/dist/source/index.d.ts10
-rw-r--r--node_modules/defer-to-connect/dist/source/index.js47
-rw-r--r--node_modules/defer-to-connect/package.json71
-rw-r--r--node_modules/define-properties/.editorconfig13
-rw-r--r--node_modules/define-properties/.eslintrc19
-rw-r--r--node_modules/define-properties/.github/FUNDING.yml12
-rw-r--r--node_modules/define-properties/.nycrc9
-rw-r--r--node_modules/define-properties/CHANGELOG.md63
-rw-r--r--node_modules/define-properties/LICENSE21
-rw-r--r--node_modules/define-properties/README.md84
-rw-r--r--node_modules/define-properties/index.js47
-rw-r--r--node_modules/define-properties/node_modules/object-keys/.editorconfig13
-rw-r--r--node_modules/define-properties/node_modules/object-keys/.eslintrc17
-rw-r--r--node_modules/define-properties/node_modules/object-keys/.travis.yml277
-rw-r--r--node_modules/define-properties/node_modules/object-keys/CHANGELOG.md232
-rw-r--r--node_modules/define-properties/node_modules/object-keys/LICENSE21
-rw-r--r--node_modules/define-properties/node_modules/object-keys/README.md76
-rw-r--r--node_modules/define-properties/node_modules/object-keys/implementation.js122
-rw-r--r--node_modules/define-properties/node_modules/object-keys/index.js32
-rw-r--r--node_modules/define-properties/node_modules/object-keys/isArguments.js17
-rw-r--r--node_modules/define-properties/node_modules/object-keys/package.json88
-rw-r--r--node_modules/define-properties/node_modules/object-keys/test/index.js5
-rw-r--r--node_modules/define-properties/package.json66
-rw-r--r--node_modules/delayed-stream/.npmignore1
-rw-r--r--node_modules/delayed-stream/License19
-rw-r--r--node_modules/delayed-stream/Makefile7
-rw-r--r--node_modules/delayed-stream/Readme.md141
-rw-r--r--node_modules/delayed-stream/lib/delayed_stream.js107
-rw-r--r--node_modules/delayed-stream/package.json27
-rw-r--r--node_modules/detect-node/LICENSE21
-rw-r--r--node_modules/detect-node/Readme.md30
-rw-r--r--node_modules/detect-node/browser.js2
-rw-r--r--node_modules/detect-node/index.esm.js2
-rw-r--r--node_modules/detect-node/index.js2
-rw-r--r--node_modules/detect-node/package.json25
-rw-r--r--node_modules/dir-compare/LICENSE22
-rw-r--r--node_modules/dir-compare/README.md374
-rw-r--r--node_modules/dir-compare/node_modules/commander/History.md261
-rw-r--r--node_modules/dir-compare/node_modules/commander/LICENSE22
-rw-r--r--node_modules/dir-compare/node_modules/commander/Readme.md351
-rw-r--r--node_modules/dir-compare/node_modules/commander/index.js1110
-rw-r--r--node_modules/dir-compare/node_modules/commander/package.json33
-rw-r--r--node_modules/dir-compare/node_modules/minimatch/LICENSE15
-rw-r--r--node_modules/dir-compare/node_modules/minimatch/README.md209
-rw-r--r--node_modules/dir-compare/node_modules/minimatch/minimatch.js923
-rw-r--r--node_modules/dir-compare/node_modules/minimatch/package.json30
-rw-r--r--node_modules/dir-compare/package.json59
-rwxr-xr-xnode_modules/dir-compare/src/cli/dircompare.js147
-rw-r--r--node_modules/dir-compare/src/cli/print.js192
-rw-r--r--node_modules/dir-compare/src/compareAsync.js141
-rw-r--r--node_modules/dir-compare/src/compareSync.js90
-rw-r--r--node_modules/dir-compare/src/entry/entryBuilder.js102
-rw-r--r--node_modules/dir-compare/src/entry/entryComparator.js20
-rw-r--r--node_modules/dir-compare/src/entry/entryEquality.js135
-rw-r--r--node_modules/dir-compare/src/entry/entryType.js18
-rw-r--r--node_modules/dir-compare/src/fileCompareHandler/closeFile.js28
-rw-r--r--node_modules/dir-compare/src/fileCompareHandler/defaultFileCompare.js113
-rw-r--r--node_modules/dir-compare/src/fileCompareHandler/lineBasedFileCompare.js196
-rw-r--r--node_modules/dir-compare/src/fs/BufferPool.js46
-rw-r--r--node_modules/dir-compare/src/fs/FileDescriptorQueue.js78
-rw-r--r--node_modules/dir-compare/src/fs/Queue.js63
-rw-r--r--node_modules/dir-compare/src/fs/fsPromise.js26
-rw-r--r--node_modules/dir-compare/src/index.d.ts476
-rw-r--r--node_modules/dir-compare/src/index.js204
-rw-r--r--node_modules/dir-compare/src/nameCompare/defaultNameCompare.js12
-rw-r--r--node_modules/dir-compare/src/resultBuilder/defaultResultBuilderCallback.js27
-rw-r--r--node_modules/dir-compare/src/statistics/statisticsLifecycle.js59
-rw-r--r--node_modules/dir-compare/src/statistics/statisticsUpdate.js62
-rw-r--r--node_modules/dir-compare/src/symlink/loopDetector.js51
-rwxr-xr-xnode_modules/ecc-jsbn/LICENSE21
-rwxr-xr-xnode_modules/ecc-jsbn/README.md8
-rwxr-xr-xnode_modules/ecc-jsbn/index.js58
-rwxr-xr-xnode_modules/ecc-jsbn/lib/LICENSE-jsbn40
-rwxr-xr-xnode_modules/ecc-jsbn/lib/ec.js561
-rwxr-xr-xnode_modules/ecc-jsbn/lib/sec.js170
-rwxr-xr-xnode_modules/ecc-jsbn/package.json40
-rwxr-xr-xnode_modules/ecc-jsbn/test.js14
-rw-r--r--node_modules/electron-download/CODE_OF_CONDUCT.md5
-rw-r--r--node_modules/electron-download/LICENSE29
-rw-r--r--node_modules/electron-download/collaborators.md8
-rw-r--r--node_modules/electron-download/lib/arch.js30
-rwxr-xr-xnode_modules/electron-download/lib/cli.js18
-rw-r--r--node_modules/electron-download/lib/index.js336
-rw-r--r--node_modules/electron-download/package.json64
-rw-r--r--node_modules/electron-download/readme.md106
-rw-r--r--node_modules/electron-notarize/LICENSE7
-rw-r--r--node_modules/electron-notarize/README.md130
-rw-r--r--node_modules/electron-notarize/lib/helpers.d.ts13
-rw-r--r--node_modules/electron-notarize/lib/helpers.js78
-rw-r--r--node_modules/electron-notarize/lib/helpers.js.map1
-rw-r--r--node_modules/electron-notarize/lib/index.d.ts4
-rw-r--r--node_modules/electron-notarize/lib/index.js60
-rw-r--r--node_modules/electron-notarize/lib/index.js.map1
-rw-r--r--node_modules/electron-notarize/lib/legacy.d.ts3
-rw-r--r--node_modules/electron-notarize/lib/legacy.js115
-rw-r--r--node_modules/electron-notarize/lib/legacy.js.map1
-rw-r--r--node_modules/electron-notarize/lib/notarytool.d.ts3
-rw-r--r--node_modules/electron-notarize/lib/notarytool.js100
-rw-r--r--node_modules/electron-notarize/lib/notarytool.js.map1
-rw-r--r--node_modules/electron-notarize/lib/spawn.d.ts7
-rw-r--r--node_modules/electron-notarize/lib/spawn.js23
-rw-r--r--node_modules/electron-notarize/lib/spawn.js.map1
-rw-r--r--node_modules/electron-notarize/lib/staple.d.ts2
-rw-r--r--node_modules/electron-notarize/lib/staple.js29
-rw-r--r--node_modules/electron-notarize/lib/staple.js.map1
-rw-r--r--node_modules/electron-notarize/lib/types.d.ts47
-rw-r--r--node_modules/electron-notarize/lib/types.js2
-rw-r--r--node_modules/electron-notarize/lib/types.js.map1
-rw-r--r--node_modules/electron-notarize/lib/validate-args.d.ts8
-rw-r--r--node_modules/electron-notarize/lib/validate-args.js101
-rw-r--r--node_modules/electron-notarize/lib/validate-args.js.map1
-rw-r--r--node_modules/electron-notarize/node_modules/debug/LICENSE20
-rw-r--r--node_modules/electron-notarize/node_modules/debug/README.md481
-rw-r--r--node_modules/electron-notarize/node_modules/debug/package.json59
-rw-r--r--node_modules/electron-notarize/node_modules/debug/src/browser.js269
-rw-r--r--node_modules/electron-notarize/node_modules/debug/src/common.js274
-rw-r--r--node_modules/electron-notarize/node_modules/debug/src/index.js10
-rw-r--r--node_modules/electron-notarize/node_modules/debug/src/node.js263
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/CHANGELOG.md902
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/LICENSE15
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/README.md264
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/copy-sync.js166
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/index.js5
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/copy/copy.js232
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/copy/index.js6
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/empty/index.js48
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/file.js69
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/index.js23
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/link.js61
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-paths.js99
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-type.js31
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink.js63
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/fs/index.js130
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/index.js27
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/json/index.js16
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/json/jsonfile.js11
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json-sync.js12
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json.js12
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/index.js14
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/make-dir.js141
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/index.js5
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/move-sync.js47
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/move/index.js6
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/move/move.js65
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/output/index.js40
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/path-exists/index.js12
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/remove/index.js9
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/remove/rimraf.js302
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/util/stat.js139
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/lib/util/utimes.js26
-rw-r--r--node_modules/electron-notarize/node_modules/fs-extra/package.json70
-rw-r--r--node_modules/electron-notarize/node_modules/jsonfile/CHANGELOG.md171
-rw-r--r--node_modules/electron-notarize/node_modules/jsonfile/LICENSE15
-rw-r--r--node_modules/electron-notarize/node_modules/jsonfile/README.md230
-rw-r--r--node_modules/electron-notarize/node_modules/jsonfile/index.js88
-rw-r--r--node_modules/electron-notarize/node_modules/jsonfile/package.json40
-rw-r--r--node_modules/electron-notarize/node_modules/jsonfile/utils.js14
-rw-r--r--node_modules/electron-notarize/node_modules/ms/index.js162
-rw-r--r--node_modules/electron-notarize/node_modules/ms/license.md21
-rw-r--r--node_modules/electron-notarize/node_modules/ms/package.json37
-rw-r--r--node_modules/electron-notarize/node_modules/ms/readme.md60
-rw-r--r--node_modules/electron-notarize/node_modules/universalify/LICENSE20
-rw-r--r--node_modules/electron-notarize/node_modules/universalify/README.md76
-rw-r--r--node_modules/electron-notarize/node_modules/universalify/index.js24
-rw-r--r--node_modules/electron-notarize/node_modules/universalify/package.json34
-rw-r--r--node_modules/electron-notarize/package.json45
-rw-r--r--node_modules/electron-osx-sign/LICENSE23
-rw-r--r--node_modules/electron-osx-sign/README.md458
-rw-r--r--node_modules/electron-osx-sign/bin/electron-osx-flat-usage.txt41
-rwxr-xr-xnode_modules/electron-osx-sign/bin/electron-osx-flat.js34
-rw-r--r--node_modules/electron-osx-sign/bin/electron-osx-sign-usage.txt97
-rwxr-xr-xnode_modules/electron-osx-sign/bin/electron-osx-sign.js51
-rw-r--r--node_modules/electron-osx-sign/default.entitlements.darwin.inherit.plist6
-rw-r--r--node_modules/electron-osx-sign/default.entitlements.darwin.plist6
-rwxr-xr-xnode_modules/electron-osx-sign/default.entitlements.mas.inherit.plist10
-rwxr-xr-xnode_modules/electron-osx-sign/default.entitlements.mas.plist8
-rw-r--r--node_modules/electron-osx-sign/flat.js155
-rw-r--r--node_modules/electron-osx-sign/index.d.ts41
-rw-r--r--node_modules/electron-osx-sign/index.js47
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/.coveralls.yml1
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/.eslintrc11
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/.npmignore9
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/.travis.yml14
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/CHANGELOG.md362
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/LICENSE19
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/Makefile50
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/README.md312
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/component.json19
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/karma.conf.js70
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/node.js1
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/package.json49
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/src/browser.js185
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/src/debug.js202
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/src/index.js10
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/src/inspector-log.js15
-rw-r--r--node_modules/electron-osx-sign/node_modules/debug/src/node.js248
-rw-r--r--node_modules/electron-osx-sign/node_modules/ms/index.js152
-rw-r--r--node_modules/electron-osx-sign/node_modules/ms/license.md21
-rw-r--r--node_modules/electron-osx-sign/node_modules/ms/package.json37
-rw-r--r--node_modules/electron-osx-sign/node_modules/ms/readme.md51
-rw-r--r--node_modules/electron-osx-sign/package.json53
-rw-r--r--node_modules/electron-osx-sign/sign.js464
-rw-r--r--node_modules/electron-osx-sign/util-entitlements.js102
-rw-r--r--node_modules/electron-osx-sign/util-identities.js55
-rw-r--r--node_modules/electron-osx-sign/util-provisioning-profiles.js180
-rw-r--r--node_modules/electron-osx-sign/util.js249
-rw-r--r--node_modules/electron-packager/LICENSE23
-rw-r--r--node_modules/electron-packager/NEWS.md944
-rw-r--r--node_modules/electron-packager/README.md206
-rwxr-xr-xnode_modules/electron-packager/bin/electron-packager.js16
-rw-r--r--node_modules/electron-packager/collaborators.md8
-rw-r--r--node_modules/electron-packager/docs/api.md1
-rw-r--r--node_modules/electron-packager/docs/faq.md50
l---------node_modules/electron-packager/node_modules/.bin/extract-zip1
l---------node_modules/electron-packager/node_modules/.bin/semver1
-rw-r--r--node_modules/electron-packager/node_modules/debug/LICENSE20
-rw-r--r--node_modules/electron-packager/node_modules/debug/README.md481
-rw-r--r--node_modules/electron-packager/node_modules/debug/package.json59
-rw-r--r--node_modules/electron-packager/node_modules/debug/src/browser.js269
-rw-r--r--node_modules/electron-packager/node_modules/debug/src/common.js274
-rw-r--r--node_modules/electron-packager/node_modules/debug/src/index.js10
-rw-r--r--node_modules/electron-packager/node_modules/debug/src/node.js263
-rw-r--r--node_modules/electron-packager/node_modules/extract-zip/LICENSE23
-rwxr-xr-xnode_modules/electron-packager/node_modules/extract-zip/cli.js19
-rw-r--r--node_modules/electron-packager/node_modules/extract-zip/index.d.ts21
-rw-r--r--node_modules/electron-packager/node_modules/extract-zip/index.js173
-rw-r--r--node_modules/electron-packager/node_modules/extract-zip/package.json80
-rw-r--r--node_modules/electron-packager/node_modules/extract-zip/readme.md57
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/LICENSE15
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/README.md262
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js169
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js235
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js7
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js39
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js69
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js23
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js64
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js99
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js31
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js82
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js128
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/index.js16
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js16
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js11
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js12
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js12
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js14
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js27
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js21
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js7
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js54
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js75
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js40
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js12
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js22
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/remove/rimraf.js302
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js154
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js26
-rw-r--r--node_modules/electron-packager/node_modules/fs-extra/package.json67
-rw-r--r--node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md171
-rw-r--r--node_modules/electron-packager/node_modules/jsonfile/LICENSE15
-rw-r--r--node_modules/electron-packager/node_modules/jsonfile/README.md230
-rw-r--r--node_modules/electron-packager/node_modules/jsonfile/index.js88
-rw-r--r--node_modules/electron-packager/node_modules/jsonfile/package.json40
-rw-r--r--node_modules/electron-packager/node_modules/jsonfile/utils.js14
-rw-r--r--node_modules/electron-packager/node_modules/ms/index.js162
-rw-r--r--node_modules/electron-packager/node_modules/ms/license.md21
-rw-r--r--node_modules/electron-packager/node_modules/ms/package.json37
-rw-r--r--node_modules/electron-packager/node_modules/ms/readme.md60
-rw-r--r--node_modules/electron-packager/node_modules/semver/LICENSE15
-rw-r--r--node_modules/electron-packager/node_modules/semver/README.md568
-rwxr-xr-xnode_modules/electron-packager/node_modules/semver/bin/semver.js183
-rw-r--r--node_modules/electron-packager/node_modules/semver/classes/comparator.js136
-rw-r--r--node_modules/electron-packager/node_modules/semver/classes/index.js5
-rw-r--r--node_modules/electron-packager/node_modules/semver/classes/range.js519
-rw-r--r--node_modules/electron-packager/node_modules/semver/classes/semver.js287
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/clean.js6
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/cmp.js52
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/coerce.js52
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/compare-build.js7
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/compare-loose.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/compare.js5
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/diff.js23
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/eq.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/gt.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/gte.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/inc.js18
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/lt.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/lte.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/major.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/minor.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/neq.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/parse.js33
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/patch.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/prerelease.js6
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/rcompare.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/rsort.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/satisfies.js10
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/sort.js3
-rw-r--r--node_modules/electron-packager/node_modules/semver/functions/valid.js6
-rw-r--r--node_modules/electron-packager/node_modules/semver/index.js48
-rw-r--r--node_modules/electron-packager/node_modules/semver/internal/constants.js17
-rw-r--r--node_modules/electron-packager/node_modules/semver/internal/debug.js9
-rw-r--r--node_modules/electron-packager/node_modules/semver/internal/identifiers.js23
-rw-r--r--node_modules/electron-packager/node_modules/semver/internal/parse-options.js11
-rw-r--r--node_modules/electron-packager/node_modules/semver/internal/re.js182
-rw-r--r--node_modules/electron-packager/node_modules/semver/package.json75
-rw-r--r--node_modules/electron-packager/node_modules/semver/preload.js2
-rw-r--r--node_modules/electron-packager/node_modules/semver/range.bnf16
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/gtr.js4
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/intersects.js7
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/ltr.js4
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js25
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js24
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/min-version.js61
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/outside.js80
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/simplify.js47
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/subset.js244
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js8
-rw-r--r--node_modules/electron-packager/node_modules/semver/ranges/valid.js11
-rw-r--r--node_modules/electron-packager/node_modules/universalify/LICENSE20
-rw-r--r--node_modules/electron-packager/node_modules/universalify/README.md76
-rw-r--r--node_modules/electron-packager/node_modules/universalify/index.js24
-rw-r--r--node_modules/electron-packager/node_modules/universalify/package.json34
-rw-r--r--node_modules/electron-packager/package.json137
-rw-r--r--node_modules/electron-packager/src/cli.js143
-rw-r--r--node_modules/electron-packager/src/common.js128
-rw-r--r--node_modules/electron-packager/src/copy-filter.js110
-rw-r--r--node_modules/electron-packager/src/download.js37
-rw-r--r--node_modules/electron-packager/src/hooks.js24
-rw-r--r--node_modules/electron-packager/src/index.d.ts568
-rw-r--r--node_modules/electron-packager/src/index.js204
-rw-r--r--node_modules/electron-packager/src/infer.js178
-rw-r--r--node_modules/electron-packager/src/linux.js25
-rw-r--r--node_modules/electron-packager/src/mac.js444
-rw-r--r--node_modules/electron-packager/src/platform.js238
-rw-r--r--node_modules/electron-packager/src/prune.js68
-rw-r--r--node_modules/electron-packager/src/targets.js148
-rw-r--r--node_modules/electron-packager/src/universal.js80
-rw-r--r--node_modules/electron-packager/src/unzip.js7
-rw-r--r--node_modules/electron-packager/src/win32.js113
-rw-r--r--node_modules/electron-packager/usage.txt124
-rw-r--r--node_modules/electron/LICENSE20
-rw-r--r--node_modules/electron/README.md104
-rwxr-xr-xnode_modules/electron/cli.js21
-rw-r--r--node_modules/electron/dist/LICENSE20
-rw-r--r--node_modules/electron/dist/LICENSES.chromium.html39191
-rw-r--r--node_modules/electron/dist/chrome_100_percent.pakbin0 -> 167930 bytes
-rw-r--r--node_modules/electron/dist/chrome_200_percent.pakbin0 -> 250097 bytes
-rwxr-xr-xnode_modules/electron/dist/electronbin0 -> 114927232 bytes
-rw-r--r--node_modules/electron/dist/icudtl.datbin0 -> 10221472 bytes
-rwxr-xr-xnode_modules/electron/dist/libEGL.sobin0 -> 255912 bytes
-rwxr-xr-xnode_modules/electron/dist/libGLESv2.sobin0 -> 6058008 bytes
-rwxr-xr-xnode_modules/electron/dist/libffmpeg.sobin0 -> 3152384 bytes
-rw-r--r--node_modules/electron/dist/locales/am.pakbin0 -> 98876 bytes
-rw-r--r--node_modules/electron/dist/locales/ar.pakbin0 -> 98355 bytes
-rw-r--r--node_modules/electron/dist/locales/bg.pakbin0 -> 107785 bytes
-rw-r--r--node_modules/electron/dist/locales/bn.pakbin0 -> 141700 bytes
-rw-r--r--node_modules/electron/dist/locales/ca.pakbin0 -> 69684 bytes
-rw-r--r--node_modules/electron/dist/locales/cs.pakbin0 -> 71286 bytes
-rw-r--r--node_modules/electron/dist/locales/da.pakbin0 -> 64495 bytes
-rw-r--r--node_modules/electron/dist/locales/de.pakbin0 -> 69605 bytes
-rw-r--r--node_modules/electron/dist/locales/el.pakbin0 -> 120868 bytes
-rw-r--r--node_modules/electron/dist/locales/en-GB.pakbin0 -> 57794 bytes
-rw-r--r--node_modules/electron/dist/locales/en-US.pakbin0 -> 58454 bytes
-rw-r--r--node_modules/electron/dist/locales/es-419.pakbin0 -> 67734 bytes
-rw-r--r--node_modules/electron/dist/locales/es.pakbin0 -> 69955 bytes
-rw-r--r--node_modules/electron/dist/locales/et.pakbin0 -> 62126 bytes
-rw-r--r--node_modules/electron/dist/locales/fa.pakbin0 -> 96162 bytes
-rw-r--r--node_modules/electron/dist/locales/fi.pakbin0 -> 64094 bytes
-rw-r--r--node_modules/electron/dist/locales/fil.pakbin0 -> 70638 bytes
-rw-r--r--node_modules/electron/dist/locales/fr.pakbin0 -> 74894 bytes
-rw-r--r--node_modules/electron/dist/locales/gu.pakbin0 -> 135091 bytes
-rw-r--r--node_modules/electron/dist/locales/he.pakbin0 -> 82975 bytes
-rw-r--r--node_modules/electron/dist/locales/hi.pakbin0 -> 136889 bytes
-rw-r--r--node_modules/electron/dist/locales/hr.pakbin0 -> 67509 bytes
-rw-r--r--node_modules/electron/dist/locales/hu.pakbin0 -> 71474 bytes
-rw-r--r--node_modules/electron/dist/locales/id.pakbin0 -> 61832 bytes
-rw-r--r--node_modules/electron/dist/locales/it.pakbin0 -> 67793 bytes
-rw-r--r--node_modules/electron/dist/locales/ja.pakbin0 -> 82838 bytes
-rw-r--r--node_modules/electron/dist/locales/kn.pakbin0 -> 154435 bytes
-rw-r--r--node_modules/electron/dist/locales/ko.pakbin0 -> 68861 bytes
-rw-r--r--node_modules/electron/dist/locales/lt.pakbin0 -> 73118 bytes
-rw-r--r--node_modules/electron/dist/locales/lv.pakbin0 -> 72479 bytes
-rw-r--r--node_modules/electron/dist/locales/ml.pakbin0 -> 166093 bytes
-rw-r--r--node_modules/electron/dist/locales/mr.pakbin0 -> 137059 bytes
-rw-r--r--node_modules/electron/dist/locales/ms.pakbin0 -> 63213 bytes
-rw-r--r--node_modules/electron/dist/locales/nb.pakbin0 -> 62979 bytes
-rw-r--r--node_modules/electron/dist/locales/nl.pakbin0 -> 66206 bytes
-rw-r--r--node_modules/electron/dist/locales/pl.pakbin0 -> 70634 bytes
-rw-r--r--node_modules/electron/dist/locales/pt-BR.pakbin0 -> 67568 bytes
-rw-r--r--node_modules/electron/dist/locales/pt-PT.pakbin0 -> 67627 bytes
-rw-r--r--node_modules/electron/dist/locales/ro.pakbin0 -> 70283 bytes
-rw-r--r--node_modules/electron/dist/locales/ru.pakbin0 -> 107818 bytes
-rw-r--r--node_modules/electron/dist/locales/sk.pakbin0 -> 72272 bytes
-rw-r--r--node_modules/electron/dist/locales/sl.pakbin0 -> 68269 bytes
-rw-r--r--node_modules/electron/dist/locales/sr.pakbin0 -> 103605 bytes
-rw-r--r--node_modules/electron/dist/locales/sv.pakbin0 -> 62673 bytes
-rw-r--r--node_modules/electron/dist/locales/sw.pakbin0 -> 63799 bytes
-rw-r--r--node_modules/electron/dist/locales/ta.pakbin0 -> 158794 bytes
-rw-r--r--node_modules/electron/dist/locales/te.pakbin0 -> 148480 bytes
-rw-r--r--node_modules/electron/dist/locales/th.pakbin0 -> 127156 bytes
-rw-r--r--node_modules/electron/dist/locales/tr.pakbin0 -> 66469 bytes
-rw-r--r--node_modules/electron/dist/locales/uk.pakbin0 -> 110298 bytes
-rw-r--r--node_modules/electron/dist/locales/vi.pakbin0 -> 76839 bytes
-rw-r--r--node_modules/electron/dist/locales/zh-CN.pakbin0 -> 57750 bytes
-rw-r--r--node_modules/electron/dist/locales/zh-TW.pakbin0 -> 57857 bytes
-rw-r--r--node_modules/electron/dist/natives_blob.binbin0 -> 125011 bytes
-rw-r--r--node_modules/electron/dist/resources.pakbin0 -> 8691077 bytes
-rw-r--r--node_modules/electron/dist/resources/default_app.asarbin0 -> 103215 bytes
-rw-r--r--node_modules/electron/dist/resources/electron.asarbin0 -> 282027 bytes
-rw-r--r--node_modules/electron/dist/snapshot_blob.binbin0 -> 641676 bytes
-rwxr-xr-xnode_modules/electron/dist/swiftshader/libEGL.sobin0 -> 286264 bytes
-rwxr-xr-xnode_modules/electron/dist/swiftshader/libGLESv2.sobin0 -> 2677296 bytes
-rw-r--r--node_modules/electron/dist/v8_context_snapshot.binbin0 -> 1040216 bytes
-rw-r--r--node_modules/electron/dist/version1
-rw-r--r--node_modules/electron/electron.d.ts9861
-rw-r--r--node_modules/electron/index.js18
-rw-r--r--node_modules/electron/install.js66
-rw-r--r--node_modules/electron/node_modules/@types/node/LICENSE21
-rw-r--r--node_modules/electron/node_modules/@types/node/README.md16
-rw-r--r--node_modules/electron/node_modules/@types/node/assert.d.ts99
-rw-r--r--node_modules/electron/node_modules/@types/node/async_hooks.d.ts144
-rw-r--r--node_modules/electron/node_modules/@types/node/base.d.ts19
-rw-r--r--node_modules/electron/node_modules/@types/node/buffer.d.ts16
-rw-r--r--node_modules/electron/node_modules/@types/node/child_process.d.ts369
-rw-r--r--node_modules/electron/node_modules/@types/node/cluster.d.ts260
-rw-r--r--node_modules/electron/node_modules/@types/node/console.d.ts3
-rw-r--r--node_modules/electron/node_modules/@types/node/constants.d.ts449
-rw-r--r--node_modules/electron/node_modules/@types/node/crypto.d.ts613
-rw-r--r--node_modules/electron/node_modules/@types/node/dgram.d.ts97
-rw-r--r--node_modules/electron/node_modules/@types/node/dns.d.ts366
-rw-r--r--node_modules/electron/node_modules/@types/node/domain.d.ts16
-rw-r--r--node_modules/electron/node_modules/@types/node/events.d.ts30
-rw-r--r--node_modules/electron/node_modules/@types/node/fs.d.ts2302
-rw-r--r--node_modules/electron/node_modules/@types/node/globals.d.ts1025
-rw-r--r--node_modules/electron/node_modules/@types/node/http.d.ts273
-rw-r--r--node_modules/electron/node_modules/@types/node/http2.d.ts859
-rw-r--r--node_modules/electron/node_modules/@types/node/https.d.ts51
-rw-r--r--node_modules/electron/node_modules/@types/node/index.d.ts45
-rw-r--r--node_modules/electron/node_modules/@types/node/inspector.d.ts3162
-rw-r--r--node_modules/electron/node_modules/@types/node/module.d.ts3
-rw-r--r--node_modules/electron/node_modules/@types/node/net.d.ts251
-rw-r--r--node_modules/electron/node_modules/@types/node/os.d.ts254
-rw-r--r--node_modules/electron/node_modules/@types/node/package.json201
-rw-r--r--node_modules/electron/node_modules/@types/node/path.d.ts159
-rw-r--r--node_modules/electron/node_modules/@types/node/perf_hooks.d.ts169
-rw-r--r--node_modules/electron/node_modules/@types/node/process.d.ts3
-rw-r--r--node_modules/electron/node_modules/@types/node/punycode.d.ts68
-rw-r--r--node_modules/electron/node_modules/@types/node/querystring.d.ts17
-rw-r--r--node_modules/electron/node_modules/@types/node/readline.d.ts143
-rw-r--r--node_modules/electron/node_modules/@types/node/repl.d.ts380
-rw-r--r--node_modules/electron/node_modules/@types/node/stream.d.ts313
-rw-r--r--node_modules/electron/node_modules/@types/node/string_decoder.d.ts9
-rw-r--r--node_modules/electron/node_modules/@types/node/timers.d.ts16
-rw-r--r--node_modules/electron/node_modules/@types/node/tls.d.ts459
-rw-r--r--node_modules/electron/node_modules/@types/node/trace_events.d.ts61
-rw-r--r--node_modules/electron/node_modules/@types/node/ts3.6/assert.d.ts73
-rw-r--r--node_modules/electron/node_modules/@types/node/ts3.6/base.d.ts54
-rw-r--r--node_modules/electron/node_modules/@types/node/ts3.6/index.d.ts6
-rw-r--r--node_modules/electron/node_modules/@types/node/tty.d.ts17
-rw-r--r--node_modules/electron/node_modules/@types/node/url.d.ts104
-rw-r--r--node_modules/electron/node_modules/@types/node/util.d.ts187
-rw-r--r--node_modules/electron/node_modules/@types/node/v8.d.ts28
-rw-r--r--node_modules/electron/node_modules/@types/node/vm.d.ts79
-rw-r--r--node_modules/electron/node_modules/@types/node/worker_threads.d.ts124
-rw-r--r--node_modules/electron/node_modules/@types/node/zlib.d.ts327
-rw-r--r--node_modules/electron/package.json38
-rw-r--r--node_modules/electron/path.txt1
-rw-r--r--node_modules/encodeurl/HISTORY.md14
-rw-r--r--node_modules/encodeurl/LICENSE22
-rw-r--r--node_modules/encodeurl/README.md128
-rw-r--r--node_modules/encodeurl/index.js60
-rw-r--r--node_modules/encodeurl/package.json40
-rw-r--r--node_modules/end-of-stream/LICENSE21
-rw-r--r--node_modules/end-of-stream/README.md54
-rw-r--r--node_modules/end-of-stream/index.js94
-rw-r--r--node_modules/end-of-stream/package.json37
-rw-r--r--node_modules/env-paths/index.js69
-rw-r--r--node_modules/env-paths/license21
-rw-r--r--node_modules/env-paths/package.json46
-rw-r--r--node_modules/env-paths/readme.md71
-rw-r--r--node_modules/error-ex/LICENSE21
-rw-r--r--node_modules/error-ex/README.md144
-rw-r--r--node_modules/error-ex/index.js141
-rw-r--r--node_modules/error-ex/package.json46
-rw-r--r--node_modules/es6-error/CHANGELOG.md26
-rw-r--r--node_modules/es6-error/LICENSE.md21
-rw-r--r--node_modules/es6-error/README.md59
-rw-r--r--node_modules/es6-error/es6/index.js72
-rw-r--r--node_modules/es6-error/lib/index.js79
-rw-r--r--node_modules/es6-error/package.json48
-rw-r--r--node_modules/es6-error/typings/index.d.ts1
-rw-r--r--node_modules/escape-string-regexp/index.d.ts18
-rw-r--r--node_modules/escape-string-regexp/index.js13
-rw-r--r--node_modules/escape-string-regexp/license9
-rw-r--r--node_modules/escape-string-regexp/package.json38
-rw-r--r--node_modules/escape-string-regexp/readme.md34
-rw-r--r--node_modules/extend/.editorconfig20
-rw-r--r--node_modules/extend/.eslintrc17
-rw-r--r--node_modules/extend/.jscs.json175
-rw-r--r--node_modules/extend/.travis.yml230
-rw-r--r--node_modules/extend/CHANGELOG.md83
-rw-r--r--node_modules/extend/LICENSE23
-rw-r--r--node_modules/extend/README.md81
-rw-r--r--node_modules/extend/component.json32
-rw-r--r--node_modules/extend/index.js117
-rw-r--r--node_modules/extend/package.json42
-rw-r--r--node_modules/extract-zip/.travis.yml9
-rw-r--r--node_modules/extract-zip/CONTRIBUTING.md1
-rw-r--r--node_modules/extract-zip/LICENSE23
-rwxr-xr-xnode_modules/extract-zip/cli.js20
-rw-r--r--node_modules/extract-zip/index.js211
-rw-r--r--node_modules/extract-zip/node_modules/debug/.coveralls.yml1
-rw-r--r--node_modules/extract-zip/node_modules/debug/.eslintrc11
-rw-r--r--node_modules/extract-zip/node_modules/debug/.npmignore9
-rw-r--r--node_modules/extract-zip/node_modules/debug/.travis.yml14
-rw-r--r--node_modules/extract-zip/node_modules/debug/CHANGELOG.md362
-rw-r--r--node_modules/extract-zip/node_modules/debug/LICENSE19
-rw-r--r--node_modules/extract-zip/node_modules/debug/Makefile50
-rw-r--r--node_modules/extract-zip/node_modules/debug/README.md312
-rw-r--r--node_modules/extract-zip/node_modules/debug/component.json19
-rw-r--r--node_modules/extract-zip/node_modules/debug/karma.conf.js70
-rw-r--r--node_modules/extract-zip/node_modules/debug/node.js1
-rw-r--r--node_modules/extract-zip/node_modules/debug/package.json49
-rw-r--r--node_modules/extract-zip/node_modules/debug/src/browser.js185
-rw-r--r--node_modules/extract-zip/node_modules/debug/src/debug.js202
-rw-r--r--node_modules/extract-zip/node_modules/debug/src/index.js10
-rw-r--r--node_modules/extract-zip/node_modules/debug/src/inspector-log.js15
-rw-r--r--node_modules/extract-zip/node_modules/debug/src/node.js248
-rw-r--r--node_modules/extract-zip/node_modules/ms/index.js152
-rw-r--r--node_modules/extract-zip/node_modules/ms/license.md21
-rw-r--r--node_modules/extract-zip/node_modules/ms/package.json37
-rw-r--r--node_modules/extract-zip/node_modules/ms/readme.md51
-rw-r--r--node_modules/extract-zip/package.json35
-rw-r--r--node_modules/extract-zip/readme.md49
-rw-r--r--node_modules/extsprintf/.gitmodules0
-rw-r--r--node_modules/extsprintf/.npmignore2
-rw-r--r--node_modules/extsprintf/LICENSE19
-rw-r--r--node_modules/extsprintf/Makefile24
-rw-r--r--node_modules/extsprintf/Makefile.targ285
-rw-r--r--node_modules/extsprintf/README.md46
-rw-r--r--node_modules/extsprintf/jsl.node.conf137
-rw-r--r--node_modules/extsprintf/lib/extsprintf.js183
-rw-r--r--node_modules/extsprintf/package.json14
-rw-r--r--node_modules/fast-deep-equal/LICENSE21
-rw-r--r--node_modules/fast-deep-equal/README.md96
-rw-r--r--node_modules/fast-deep-equal/es6/index.d.ts2
-rw-r--r--node_modules/fast-deep-equal/es6/index.js72
-rw-r--r--node_modules/fast-deep-equal/es6/react.d.ts2
-rw-r--r--node_modules/fast-deep-equal/es6/react.js79
-rw-r--r--node_modules/fast-deep-equal/index.d.ts4
-rw-r--r--node_modules/fast-deep-equal/index.js46
-rw-r--r--node_modules/fast-deep-equal/package.json61
-rw-r--r--node_modules/fast-deep-equal/react.d.ts2
-rw-r--r--node_modules/fast-deep-equal/react.js53
-rw-r--r--node_modules/fast-json-stable-stringify/.eslintrc.yml26
-rw-r--r--node_modules/fast-json-stable-stringify/.github/FUNDING.yml1
-rw-r--r--node_modules/fast-json-stable-stringify/.travis.yml8
-rw-r--r--node_modules/fast-json-stable-stringify/LICENSE21
-rw-r--r--node_modules/fast-json-stable-stringify/README.md131
-rw-r--r--node_modules/fast-json-stable-stringify/benchmark/index.js31
-rw-r--r--node_modules/fast-json-stable-stringify/benchmark/test.json137
-rw-r--r--node_modules/fast-json-stable-stringify/example/key_cmp.js7
-rw-r--r--node_modules/fast-json-stable-stringify/example/nested.js3
-rw-r--r--node_modules/fast-json-stable-stringify/example/str.js3
-rw-r--r--node_modules/fast-json-stable-stringify/example/value_cmp.js7
-rw-r--r--node_modules/fast-json-stable-stringify/index.d.ts4
-rw-r--r--node_modules/fast-json-stable-stringify/index.js59
-rw-r--r--node_modules/fast-json-stable-stringify/package.json52
-rw-r--r--node_modules/fast-json-stable-stringify/test/cmp.js13
-rw-r--r--node_modules/fast-json-stable-stringify/test/nested.js44
-rw-r--r--node_modules/fast-json-stable-stringify/test/str.js46
-rw-r--r--node_modules/fast-json-stable-stringify/test/to-json.js22
-rw-r--r--node_modules/fd-slicer/.npmignore2
-rw-r--r--node_modules/fd-slicer/.travis.yml7
-rw-r--r--node_modules/fd-slicer/CHANGELOG.md49
-rw-r--r--node_modules/fd-slicer/LICENSE21
-rw-r--r--node_modules/fd-slicer/README.md199
-rw-r--r--node_modules/fd-slicer/index.js296
-rw-r--r--node_modules/fd-slicer/package.json36
-rw-r--r--node_modules/fd-slicer/test/test.js350
-rw-r--r--node_modules/filename-reserved-regex/index.js5
-rw-r--r--node_modules/filename-reserved-regex/license21
-rw-r--r--node_modules/filename-reserved-regex/package.json36
-rw-r--r--node_modules/filename-reserved-regex/readme.md49
-rw-r--r--node_modules/filenamify/filenamify-path.d.ts8
-rw-r--r--node_modules/filenamify/filenamify-path.js10
-rw-r--r--node_modules/filenamify/filenamify.d.ts39
-rw-r--r--node_modules/filenamify/filenamify.js40
-rw-r--r--node_modules/filenamify/index.d.ts24
-rw-r--r--node_modules/filenamify/index.js8
-rw-r--r--node_modules/filenamify/license9
-rw-r--r--node_modules/filenamify/package.json54
-rw-r--r--node_modules/filenamify/readme.md74
-rw-r--r--node_modules/find-up/index.js53
-rw-r--r--node_modules/find-up/license21
-rw-r--r--node_modules/find-up/node_modules/path-exists/index.js24
-rw-r--r--node_modules/find-up/node_modules/path-exists/license21
-rw-r--r--node_modules/find-up/node_modules/path-exists/package.json40
-rw-r--r--node_modules/find-up/node_modules/path-exists/readme.md45
-rw-r--r--node_modules/find-up/package.json51
-rw-r--r--node_modules/find-up/readme.md72
-rw-r--r--node_modules/flora-colossus/.travis.yml7
-rw-r--r--node_modules/flora-colossus/README.md43
-rw-r--r--node_modules/flora-colossus/lib/Walker.d.ts35
-rw-r--r--node_modules/flora-colossus/lib/Walker.js287
-rw-r--r--node_modules/flora-colossus/lib/Walker.js.map1
-rw-r--r--node_modules/flora-colossus/lib/depTypes.d.ts9
-rw-r--r--node_modules/flora-colossus/lib/depTypes.js92
-rw-r--r--node_modules/flora-colossus/lib/depTypes.js.map1
-rw-r--r--node_modules/flora-colossus/lib/index.d.ts2
-rw-r--r--node_modules/flora-colossus/lib/index.js8
-rw-r--r--node_modules/flora-colossus/lib/index.js.map1
-rw-r--r--node_modules/flora-colossus/lib/nativeModuleTypes.d.ts5
-rw-r--r--node_modules/flora-colossus/lib/nativeModuleTypes.js9
-rw-r--r--node_modules/flora-colossus/lib/nativeModuleTypes.js.map1
-rw-r--r--node_modules/flora-colossus/node_modules/debug/LICENSE20
-rw-r--r--node_modules/flora-colossus/node_modules/debug/README.md481
-rw-r--r--node_modules/flora-colossus/node_modules/debug/package.json59
-rw-r--r--node_modules/flora-colossus/node_modules/debug/src/browser.js269
-rw-r--r--node_modules/flora-colossus/node_modules/debug/src/common.js274
-rw-r--r--node_modules/flora-colossus/node_modules/debug/src/index.js10
-rw-r--r--node_modules/flora-colossus/node_modules/debug/src/node.js263
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/CHANGELOG.md842
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/LICENSE15
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/README.md261
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/copy-sync.js193
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/index.js5
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/copy/copy.js246
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/copy/index.js6
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/empty/index.js48
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/file.js49
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/index.js23
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/link.js61
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-paths.js99
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-type.js31
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink.js63
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/fs/index.js104
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/index.js28
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/json/index.js16
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/json/jsonfile.js12
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json-sync.js18
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json.js27
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/index.js14
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js54
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs.js63
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/win32.js25
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/move-sync/index.js117
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/move/index.js82
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/output/index.js40
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/path-exists/index.js12
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/remove/index.js9
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/remove/rimraf.js314
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/util/buffer.js12
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/lib/util/utimes.js79
-rw-r--r--node_modules/flora-colossus/node_modules/fs-extra/package.json68
-rw-r--r--node_modules/flora-colossus/node_modules/ms/index.js162
-rw-r--r--node_modules/flora-colossus/node_modules/ms/license.md21
-rw-r--r--node_modules/flora-colossus/node_modules/ms/package.json37
-rw-r--r--node_modules/flora-colossus/node_modules/ms/readme.md60
-rw-r--r--node_modules/flora-colossus/package.json37
-rw-r--r--node_modules/flora-colossus/tsconfig.json32
-rw-r--r--node_modules/flora-colossus/yarn.lock1342
-rw-r--r--node_modules/forever-agent/LICENSE55
-rw-r--r--node_modules/forever-agent/README.md4
-rw-r--r--node_modules/forever-agent/index.js138
-rw-r--r--node_modules/forever-agent/package.json17
-rw-r--r--node_modules/form-data/License19
-rw-r--r--node_modules/form-data/README.md234
-rw-r--r--node_modules/form-data/README.md.bak234
-rw-r--r--node_modules/form-data/lib/browser.js2
-rw-r--r--node_modules/form-data/lib/form_data.js457
-rw-r--r--node_modules/form-data/lib/populate.js10
-rw-r--r--node_modules/form-data/package.json65
-rw-r--r--node_modules/form-data/yarn.lock2662
-rw-r--r--node_modules/fs-extra/CHANGELOG.md796
-rw-r--r--node_modules/fs-extra/LICENSE15
-rw-r--r--node_modules/fs-extra/README.md242
-rw-r--r--node_modules/fs-extra/docs/copy-sync.md37
-rw-r--r--node_modules/fs-extra/docs/copy.md57
-rw-r--r--node_modules/fs-extra/docs/emptyDir-sync.md16
-rw-r--r--node_modules/fs-extra/docs/emptyDir.md30
-rw-r--r--node_modules/fs-extra/docs/ensureDir-sync.md17
-rw-r--r--node_modules/fs-extra/docs/ensureDir.md29
-rw-r--r--node_modules/fs-extra/docs/ensureFile-sync.md17
-rw-r--r--node_modules/fs-extra/docs/ensureFile.md29
-rw-r--r--node_modules/fs-extra/docs/ensureLink-sync.md17
-rw-r--r--node_modules/fs-extra/docs/ensureLink.md29
-rw-r--r--node_modules/fs-extra/docs/ensureSymlink-sync.md18
-rw-r--r--node_modules/fs-extra/docs/ensureSymlink.md30
-rw-r--r--node_modules/fs-extra/docs/fs-read-write.md39
-rw-r--r--node_modules/fs-extra/docs/move-sync.md24
-rw-r--r--node_modules/fs-extra/docs/move.md41
-rw-r--r--node_modules/fs-extra/docs/outputFile-sync.md19
-rw-r--r--node_modules/fs-extra/docs/outputFile.md34
-rw-r--r--node_modules/fs-extra/docs/outputJson-sync.md25
-rw-r--r--node_modules/fs-extra/docs/outputJson.md40
-rw-r--r--node_modules/fs-extra/docs/pathExists-sync.md3
-rw-r--r--node_modules/fs-extra/docs/pathExists.md22
-rw-r--r--node_modules/fs-extra/docs/readJson-sync.md33
-rw-r--r--node_modules/fs-extra/docs/readJson.md58
-rw-r--r--node_modules/fs-extra/docs/remove-sync.md16
-rw-r--r--node_modules/fs-extra/docs/remove.md34
-rw-r--r--node_modules/fs-extra/docs/writeJson-sync.md24
-rw-r--r--node_modules/fs-extra/docs/writeJson.md39
-rw-r--r--node_modules/fs-extra/lib/copy-sync/copy-file-sync.js41
-rw-r--r--node_modules/fs-extra/lib/copy-sync/copy-sync.js62
-rw-r--r--node_modules/fs-extra/lib/copy-sync/index.js3
-rw-r--r--node_modules/fs-extra/lib/copy/copy.js54
-rw-r--r--node_modules/fs-extra/lib/copy/index.js4
-rw-r--r--node_modules/fs-extra/lib/copy/ncp.js234
-rw-r--r--node_modules/fs-extra/lib/empty/index.js48
-rw-r--r--node_modules/fs-extra/lib/ensure/file.js49
-rw-r--r--node_modules/fs-extra/lib/ensure/index.js23
-rw-r--r--node_modules/fs-extra/lib/ensure/link.js61
-rw-r--r--node_modules/fs-extra/lib/ensure/symlink-paths.js99
-rw-r--r--node_modules/fs-extra/lib/ensure/symlink-type.js31
-rw-r--r--node_modules/fs-extra/lib/ensure/symlink.js66
-rw-r--r--node_modules/fs-extra/lib/fs/index.js107
-rw-r--r--node_modules/fs-extra/lib/index.js22
-rw-r--r--node_modules/fs-extra/lib/json/index.js16
-rw-r--r--node_modules/fs-extra/lib/json/jsonfile.js12
-rw-r--r--node_modules/fs-extra/lib/json/output-json-sync.js18
-rw-r--r--node_modules/fs-extra/lib/json/output-json.js27
-rw-r--r--node_modules/fs-extra/lib/mkdirs/index.js14
-rw-r--r--node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js59
-rw-r--r--node_modules/fs-extra/lib/mkdirs/mkdirs.js63
-rw-r--r--node_modules/fs-extra/lib/mkdirs/win32.js25
-rw-r--r--node_modules/fs-extra/lib/move-sync/index.js118
-rw-r--r--node_modules/fs-extra/lib/move/index.js170
-rw-r--r--node_modules/fs-extra/lib/output/index.js40
-rw-r--r--node_modules/fs-extra/lib/path-exists/index.js12
-rw-r--r--node_modules/fs-extra/lib/remove/index.js9
-rw-r--r--node_modules/fs-extra/lib/remove/rimraf.js314
-rw-r--r--node_modules/fs-extra/lib/util/assign.js16
-rw-r--r--node_modules/fs-extra/lib/util/buffer.js11
-rw-r--r--node_modules/fs-extra/lib/util/utimes.js72
-rw-r--r--node_modules/fs-extra/package.json64
-rw-r--r--node_modules/fs.realpath/LICENSE43
-rw-r--r--node_modules/fs.realpath/README.md33
-rw-r--r--node_modules/fs.realpath/index.js66
-rw-r--r--node_modules/fs.realpath/old.js303
-rw-r--r--node_modules/fs.realpath/package.json26
-rw-r--r--node_modules/function-bind/.editorconfig20
-rw-r--r--node_modules/function-bind/.eslintrc15
-rw-r--r--node_modules/function-bind/.jscs.json176
-rw-r--r--node_modules/function-bind/.npmignore22
-rw-r--r--node_modules/function-bind/.travis.yml168
-rw-r--r--node_modules/function-bind/LICENSE20
-rw-r--r--node_modules/function-bind/README.md48
-rw-r--r--node_modules/function-bind/implementation.js52
-rw-r--r--node_modules/function-bind/index.js5
-rw-r--r--node_modules/function-bind/package.json63
-rw-r--r--node_modules/function-bind/test/.eslintrc9
-rw-r--r--node_modules/function-bind/test/index.js252
-rw-r--r--node_modules/galactus/.npmignore2
-rw-r--r--node_modules/galactus/.nyc_output/00c728c3437da37b0c97398e7e596f35.json1
-rw-r--r--node_modules/galactus/.nyc_output/b1b801e11369500b7ee32c579e280104.json1
-rw-r--r--node_modules/galactus/README.md46
-rw-r--r--node_modules/galactus/lib/DestroyerOfModules.d.ts18
-rw-r--r--node_modules/galactus/lib/DestroyerOfModules.js164
-rw-r--r--node_modules/galactus/lib/DestroyerOfModules.js.map1
-rw-r--r--node_modules/galactus/lib/index.d.ts2
-rw-r--r--node_modules/galactus/lib/index.js8
-rw-r--r--node_modules/galactus/lib/index.js.map1
-rw-r--r--node_modules/galactus/package.json48
-rw-r--r--node_modules/galactus/tsconfig.json32
-rw-r--r--node_modules/galactus/tslint.json12
-rw-r--r--node_modules/galactus/yarn.lock1554
-rw-r--r--node_modules/get-intrinsic/.eslintrc37
-rw-r--r--node_modules/get-intrinsic/.github/FUNDING.yml12
-rw-r--r--node_modules/get-intrinsic/.nycrc9
-rw-r--r--node_modules/get-intrinsic/CHANGELOG.md98
-rw-r--r--node_modules/get-intrinsic/LICENSE21
-rw-r--r--node_modules/get-intrinsic/README.md71
-rw-r--r--node_modules/get-intrinsic/index.js334
-rw-r--r--node_modules/get-intrinsic/package.json91
-rw-r--r--node_modules/get-intrinsic/test/GetIntrinsic.js274
-rw-r--r--node_modules/get-package-info/.babelrc5
-rw-r--r--node_modules/get-package-info/.npmignore4
-rw-r--r--node_modules/get-package-info/.travis.yml4
-rw-r--r--node_modules/get-package-info/LICENSE9
-rw-r--r--node_modules/get-package-info/README.md66
-rw-r--r--node_modules/get-package-info/lib/index.js88
-rw-r--r--node_modules/get-package-info/node_modules/debug/.coveralls.yml1
-rw-r--r--node_modules/get-package-info/node_modules/debug/.eslintrc11
-rw-r--r--node_modules/get-package-info/node_modules/debug/.npmignore9
-rw-r--r--node_modules/get-package-info/node_modules/debug/.travis.yml14
-rw-r--r--node_modules/get-package-info/node_modules/debug/CHANGELOG.md362
-rw-r--r--node_modules/get-package-info/node_modules/debug/LICENSE19
-rw-r--r--node_modules/get-package-info/node_modules/debug/Makefile50
-rw-r--r--node_modules/get-package-info/node_modules/debug/README.md312
-rw-r--r--node_modules/get-package-info/node_modules/debug/component.json19
-rw-r--r--node_modules/get-package-info/node_modules/debug/karma.conf.js70
-rw-r--r--node_modules/get-package-info/node_modules/debug/node.js1
-rw-r--r--node_modules/get-package-info/node_modules/debug/package.json49
-rw-r--r--node_modules/get-package-info/node_modules/debug/src/browser.js185
-rw-r--r--node_modules/get-package-info/node_modules/debug/src/debug.js202
-rw-r--r--node_modules/get-package-info/node_modules/debug/src/index.js10
-rw-r--r--node_modules/get-package-info/node_modules/debug/src/inspector-log.js15
-rw-r--r--node_modules/get-package-info/node_modules/debug/src/node.js248
-rw-r--r--node_modules/get-package-info/node_modules/find-up/index.js48
-rw-r--r--node_modules/get-package-info/node_modules/find-up/license21
-rw-r--r--node_modules/get-package-info/node_modules/find-up/package.json53
-rw-r--r--node_modules/get-package-info/node_modules/find-up/readme.md85
-rw-r--r--node_modules/get-package-info/node_modules/load-json-file/index.js11
-rw-r--r--node_modules/get-package-info/node_modules/load-json-file/license21
-rw-r--r--node_modules/get-package-info/node_modules/load-json-file/package.json43
-rw-r--r--node_modules/get-package-info/node_modules/load-json-file/readme.md45
-rw-r--r--node_modules/get-package-info/node_modules/ms/index.js152
-rw-r--r--node_modules/get-package-info/node_modules/ms/license.md21
-rw-r--r--node_modules/get-package-info/node_modules/ms/package.json37
-rw-r--r--node_modules/get-package-info/node_modules/ms/readme.md51
-rw-r--r--node_modules/get-package-info/node_modules/path-type/index.js26
-rw-r--r--node_modules/get-package-info/node_modules/path-type/license21
-rw-r--r--node_modules/get-package-info/node_modules/path-type/package.json48
-rw-r--r--node_modules/get-package-info/node_modules/path-type/readme.md42
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg-up/index.js26
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg-up/license21
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg-up/package.json62
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg-up/readme.md80
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg/index.js47
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg/license21
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg/package.json45
-rw-r--r--node_modules/get-package-info/node_modules/read-pkg/readme.md79
-rw-r--r--node_modules/get-package-info/node_modules/strip-bom/index.js14
-rw-r--r--node_modules/get-package-info/node_modules/strip-bom/license21
-rw-r--r--node_modules/get-package-info/node_modules/strip-bom/package.json40
-rw-r--r--node_modules/get-package-info/node_modules/strip-bom/readme.md36
-rw-r--r--node_modules/get-package-info/package.json37
-rw-r--r--node_modules/get-package-info/test/node_modules/we/need/to/go/deeper/package.json4
-rw-r--r--node_modules/get-package-info/test/node_modules/we/need/to/go/package.json5
-rw-r--r--node_modules/get-package-info/test/node_modules/we/package.json11
-rw-r--r--node_modules/get-package-info/test/test.js114
-rw-r--r--node_modules/get-stdin/index.js49
-rw-r--r--node_modules/get-stdin/package.json35
-rw-r--r--node_modules/get-stdin/readme.md44
-rw-r--r--node_modules/get-stream/buffer-stream.js52
-rw-r--r--node_modules/get-stream/index.d.ts108
-rw-r--r--node_modules/get-stream/index.js60
-rw-r--r--node_modules/get-stream/license9
-rw-r--r--node_modules/get-stream/package.json50
-rw-r--r--node_modules/get-stream/readme.md124
-rw-r--r--node_modules/getpass/.npmignore8
-rw-r--r--node_modules/getpass/.travis.yml9
-rw-r--r--node_modules/getpass/LICENSE18
-rw-r--r--node_modules/getpass/README.md32
-rw-r--r--node_modules/getpass/lib/index.js123
-rw-r--r--node_modules/getpass/package.json18
-rw-r--r--node_modules/glob/LICENSE21
-rw-r--r--node_modules/glob/README.md378
-rw-r--r--node_modules/glob/common.js238
-rw-r--r--node_modules/glob/glob.js790
-rw-r--r--node_modules/glob/package.json55
-rw-r--r--node_modules/glob/sync.js486
-rw-r--r--node_modules/global-agent/.flowconfig3
-rw-r--r--node_modules/global-agent/LICENSE24
-rw-r--r--node_modules/global-agent/README.md239
-rw-r--r--node_modules/global-agent/bootstrap.js1
-rw-r--r--node_modules/global-agent/dist/Logger.js18
-rw-r--r--node_modules/global-agent/dist/Logger.js.flow10
-rw-r--r--node_modules/global-agent/dist/Logger.js.map1
-rw-r--r--node_modules/global-agent/dist/classes/Agent.js174
-rw-r--r--node_modules/global-agent/dist/classes/Agent.js.flow212
-rw-r--r--node_modules/global-agent/dist/classes/Agent.js.map1
-rw-r--r--node_modules/global-agent/dist/classes/HttpProxyAgent.js33
-rw-r--r--node_modules/global-agent/dist/classes/HttpProxyAgent.js.flow30
-rw-r--r--node_modules/global-agent/dist/classes/HttpProxyAgent.js.map1
-rw-r--r--node_modules/global-agent/dist/classes/HttpsProxyAgent.js53
-rw-r--r--node_modules/global-agent/dist/classes/HttpsProxyAgent.js.flow54
-rw-r--r--node_modules/global-agent/dist/classes/HttpsProxyAgent.js.map1
-rw-r--r--node_modules/global-agent/dist/classes/index.js32
-rw-r--r--node_modules/global-agent/dist/classes/index.js.flow5
-rw-r--r--node_modules/global-agent/dist/classes/index.js.map1
-rw-r--r--node_modules/global-agent/dist/errors.js22
-rw-r--r--node_modules/global-agent/dist/errors.js.flow15
-rw-r--r--node_modules/global-agent/dist/errors.js.map1
-rw-r--r--node_modules/global-agent/dist/factories/createGlobalProxyAgent.js175
-rw-r--r--node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.flow197
-rw-r--r--node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.map1
-rw-r--r--node_modules/global-agent/dist/factories/createProxyController.js45
-rw-r--r--node_modules/global-agent/dist/factories/createProxyController.js.flow46
-rw-r--r--node_modules/global-agent/dist/factories/createProxyController.js.map1
-rw-r--r--node_modules/global-agent/dist/factories/index.js24
-rw-r--r--node_modules/global-agent/dist/factories/index.js.flow4
-rw-r--r--node_modules/global-agent/dist/factories/index.js.map1
-rw-r--r--node_modules/global-agent/dist/index.js22
-rw-r--r--node_modules/global-agent/dist/index.js.flow4
-rw-r--r--node_modules/global-agent/dist/index.js.map1
-rw-r--r--node_modules/global-agent/dist/routines/bootstrap.js30
-rw-r--r--node_modules/global-agent/dist/routines/bootstrap.js.flow25
-rw-r--r--node_modules/global-agent/dist/routines/bootstrap.js.map1
-rw-r--r--node_modules/global-agent/dist/routines/index.js16
-rw-r--r--node_modules/global-agent/dist/routines/index.js.flow3
-rw-r--r--node_modules/global-agent/dist/routines/index.js.map1
-rw-r--r--node_modules/global-agent/dist/types.js10
-rw-r--r--node_modules/global-agent/dist/types.js.flow66
-rw-r--r--node_modules/global-agent/dist/types.js.map1
-rw-r--r--node_modules/global-agent/dist/utilities/bindHttpMethod.js62
-rw-r--r--node_modules/global-agent/dist/utilities/bindHttpMethod.js.flow54
-rw-r--r--node_modules/global-agent/dist/utilities/bindHttpMethod.js.map1
-rw-r--r--node_modules/global-agent/dist/utilities/index.js32
-rw-r--r--node_modules/global-agent/dist/utilities/index.js.flow5
-rw-r--r--node_modules/global-agent/dist/utilities/index.js.map1
-rw-r--r--node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js43
-rw-r--r--node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.flow37
-rw-r--r--node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.map1
-rw-r--r--node_modules/global-agent/dist/utilities/parseProxyUrl.js42
-rw-r--r--node_modules/global-agent/dist/utilities/parseProxyUrl.js.flow36
-rw-r--r--node_modules/global-agent/dist/utilities/parseProxyUrl.js.map1
l---------node_modules/global-agent/node_modules/.bin/semver1
-rw-r--r--node_modules/global-agent/node_modules/semver/LICENSE15
-rw-r--r--node_modules/global-agent/node_modules/semver/README.md568
-rwxr-xr-xnode_modules/global-agent/node_modules/semver/bin/semver.js183
-rw-r--r--node_modules/global-agent/node_modules/semver/classes/comparator.js136
-rw-r--r--node_modules/global-agent/node_modules/semver/classes/index.js5
-rw-r--r--node_modules/global-agent/node_modules/semver/classes/range.js519
-rw-r--r--node_modules/global-agent/node_modules/semver/classes/semver.js287
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/clean.js6
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/cmp.js52
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/coerce.js52
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/compare-build.js7
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/compare-loose.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/compare.js5
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/diff.js23
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/eq.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/gt.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/gte.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/inc.js18
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/lt.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/lte.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/major.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/minor.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/neq.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/parse.js33
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/patch.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/prerelease.js6
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/rcompare.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/rsort.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/satisfies.js10
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/sort.js3
-rw-r--r--node_modules/global-agent/node_modules/semver/functions/valid.js6
-rw-r--r--node_modules/global-agent/node_modules/semver/index.js48
-rw-r--r--node_modules/global-agent/node_modules/semver/internal/constants.js17
-rw-r--r--node_modules/global-agent/node_modules/semver/internal/debug.js9
-rw-r--r--node_modules/global-agent/node_modules/semver/internal/identifiers.js23
-rw-r--r--node_modules/global-agent/node_modules/semver/internal/parse-options.js11
-rw-r--r--node_modules/global-agent/node_modules/semver/internal/re.js182
-rw-r--r--node_modules/global-agent/node_modules/semver/package.json75
-rw-r--r--node_modules/global-agent/node_modules/semver/preload.js2
-rw-r--r--node_modules/global-agent/node_modules/semver/range.bnf16
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/gtr.js4
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/intersects.js7
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/ltr.js4
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/max-satisfying.js25
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/min-satisfying.js24
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/min-version.js61
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/outside.js80
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/simplify.js47
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/subset.js244
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/to-comparators.js8
-rw-r--r--node_modules/global-agent/node_modules/semver/ranges/valid.js11
-rw-r--r--node_modules/global-agent/package.json105
-rw-r--r--node_modules/global-agent/src/Logger.js10
-rw-r--r--node_modules/global-agent/src/classes/Agent.js212
-rw-r--r--node_modules/global-agent/src/classes/HttpProxyAgent.js30
-rw-r--r--node_modules/global-agent/src/classes/HttpsProxyAgent.js54
-rw-r--r--node_modules/global-agent/src/classes/index.js5
-rw-r--r--node_modules/global-agent/src/errors.js15
-rw-r--r--node_modules/global-agent/src/factories/createGlobalProxyAgent.js197
-rw-r--r--node_modules/global-agent/src/factories/createProxyController.js46
-rw-r--r--node_modules/global-agent/src/factories/index.js4
-rw-r--r--node_modules/global-agent/src/index.js4
-rw-r--r--node_modules/global-agent/src/routines/bootstrap.js25
-rw-r--r--node_modules/global-agent/src/routines/index.js3
-rw-r--r--node_modules/global-agent/src/types.js66
-rw-r--r--node_modules/global-agent/src/utilities/bindHttpMethod.js54
-rw-r--r--node_modules/global-agent/src/utilities/index.js5
-rw-r--r--node_modules/global-agent/src/utilities/isUrlMatchingNoProxy.js37
-rw-r--r--node_modules/global-agent/src/utilities/parseProxyUrl.js36
-rw-r--r--node_modules/global-tunnel-ng/.editorconfig10
-rw-r--r--node_modules/global-tunnel-ng/.eslintignore1
-rw-r--r--node_modules/global-tunnel-ng/.travis.yml20
-rw-r--r--node_modules/global-tunnel-ng/LICENSE12
-rw-r--r--node_modules/global-tunnel-ng/README.md242
-rw-r--r--node_modules/global-tunnel-ng/index.js348
-rw-r--r--node_modules/global-tunnel-ng/lib/agents.js52
-rw-r--r--node_modules/global-tunnel-ng/package.json63
-rw-r--r--node_modules/global-tunnel-ng/test/end-to-end.js71
-rw-r--r--node_modules/global-tunnel-ng/test/index.js535
-rw-r--r--node_modules/globalthis/.eslintrc18
-rw-r--r--node_modules/globalthis/.nycrc10
-rw-r--r--node_modules/globalthis/CHANGELOG.md96
-rw-r--r--node_modules/globalthis/LICENSE21
-rw-r--r--node_modules/globalthis/README.md70
-rw-r--r--node_modules/globalthis/auto.js3
-rw-r--r--node_modules/globalthis/implementation.browser.js11
-rw-r--r--node_modules/globalthis/implementation.js3
-rw-r--r--node_modules/globalthis/index.js19
-rw-r--r--node_modules/globalthis/package.json97
-rw-r--r--node_modules/globalthis/polyfill.js10
-rw-r--r--node_modules/globalthis/shim.js22
-rw-r--r--node_modules/globalthis/test/implementation.js11
-rw-r--r--node_modules/globalthis/test/index.js11
-rw-r--r--node_modules/globalthis/test/native.js26
-rw-r--r--node_modules/globalthis/test/shimmed.js29
-rw-r--r--node_modules/globalthis/test/tests.js36
-rw-r--r--node_modules/got/dist/source/as-promise/create-rejection.d.ts2
-rw-r--r--node_modules/got/dist/source/as-promise/create-rejection.js30
-rw-r--r--node_modules/got/dist/source/as-promise/index.d.ts3
-rw-r--r--node_modules/got/dist/source/as-promise/index.js175
-rw-r--r--node_modules/got/dist/source/as-promise/normalize-arguments.d.ts3
-rw-r--r--node_modules/got/dist/source/as-promise/normalize-arguments.js78
-rw-r--r--node_modules/got/dist/source/as-promise/parse-body.d.ts3
-rw-r--r--node_modules/got/dist/source/as-promise/parse-body.js25
-rw-r--r--node_modules/got/dist/source/as-promise/types.d.ts256
-rw-r--r--node_modules/got/dist/source/as-promise/types.js42
-rw-r--r--node_modules/got/dist/source/core/calculate-retry-delay.d.ts5
-rw-r--r--node_modules/got/dist/source/core/calculate-retry-delay.js29
-rw-r--r--node_modules/got/dist/source/core/index.d.ts1124
-rw-r--r--node_modules/got/dist/source/core/index.js1505
-rw-r--r--node_modules/got/dist/source/core/utils/dns-ip-version.d.ts5
-rw-r--r--node_modules/got/dist/source/core/utils/dns-ip-version.js17
-rw-r--r--node_modules/got/dist/source/core/utils/get-body-size.d.ts3
-rw-r--r--node_modules/got/dist/source/core/utils/get-body-size.js32
-rw-r--r--node_modules/got/dist/source/core/utils/get-buffer.d.ts4
-rw-r--r--node_modules/got/dist/source/core/utils/get-buffer.js16
-rw-r--r--node_modules/got/dist/source/core/utils/is-form-data.d.ts8
-rw-r--r--node_modules/got/dist/source/core/utils/is-form-data.js4
-rw-r--r--node_modules/got/dist/source/core/utils/is-response-ok.d.ts2
-rw-r--r--node_modules/got/dist/source/core/utils/is-response-ok.js8
-rw-r--r--node_modules/got/dist/source/core/utils/options-to-url.d.ts14
-rw-r--r--node_modules/got/dist/source/core/utils/options-to-url.js53
-rw-r--r--node_modules/got/dist/source/core/utils/proxy-events.d.ts3
-rw-r--r--node_modules/got/dist/source/core/utils/proxy-events.js17
-rw-r--r--node_modules/got/dist/source/core/utils/timed-out.d.ts29
-rw-r--r--node_modules/got/dist/source/core/utils/timed-out.js121
-rw-r--r--node_modules/got/dist/source/core/utils/unhandle.d.ts11
-rw-r--r--node_modules/got/dist/source/core/utils/unhandle.js22
-rw-r--r--node_modules/got/dist/source/core/utils/url-to-options.d.ts15
-rw-r--r--node_modules/got/dist/source/core/utils/url-to-options.js24
-rw-r--r--node_modules/got/dist/source/core/utils/weakable-map.d.ts8
-rw-r--r--node_modules/got/dist/source/core/utils/weakable-map.js29
-rw-r--r--node_modules/got/dist/source/create.d.ts5
-rw-r--r--node_modules/got/dist/source/create.js240
-rw-r--r--node_modules/got/dist/source/index.d.ts4
-rw-r--r--node_modules/got/dist/source/index.js132
-rw-r--r--node_modules/got/dist/source/types.d.ts344
-rw-r--r--node_modules/got/dist/source/types.js2
-rw-r--r--node_modules/got/dist/source/utils/deep-freeze.d.ts1
-rw-r--r--node_modules/got/dist/source/utils/deep-freeze.js12
-rw-r--r--node_modules/got/dist/source/utils/deprecation-warning.d.ts2
-rw-r--r--node_modules/got/dist/source/utils/deprecation-warning.js13
-rw-r--r--node_modules/got/license9
-rw-r--r--node_modules/got/package.json130
-rw-r--r--node_modules/got/readme.md2477
-rw-r--r--node_modules/graceful-fs/LICENSE15
-rw-r--r--node_modules/graceful-fs/README.md133
-rw-r--r--node_modules/graceful-fs/clone.js19
-rw-r--r--node_modules/graceful-fs/graceful-fs.js354
-rw-r--r--node_modules/graceful-fs/legacy-streams.js118
-rw-r--r--node_modules/graceful-fs/package.json50
-rw-r--r--node_modules/graceful-fs/polyfills.js342
-rw-r--r--node_modules/graceful-readlink/.npmignore3
-rw-r--r--node_modules/graceful-readlink/.travis.yml5
-rw-r--r--node_modules/graceful-readlink/LICENSE22
-rw-r--r--node_modules/graceful-readlink/README.md17
-rw-r--r--node_modules/graceful-readlink/index.js12
-rw-r--r--node_modules/graceful-readlink/package.json18
-rw-r--r--node_modules/har-schema/LICENSE13
-rw-r--r--node_modules/har-schema/README.md49
-rw-r--r--node_modules/har-schema/lib/afterRequest.json30
-rw-r--r--node_modules/har-schema/lib/beforeRequest.json30
-rw-r--r--node_modules/har-schema/lib/browser.json20
-rw-r--r--node_modules/har-schema/lib/cache.json21
-rw-r--r--node_modules/har-schema/lib/content.json29
-rw-r--r--node_modules/har-schema/lib/cookie.json36
-rw-r--r--node_modules/har-schema/lib/creator.json20
-rw-r--r--node_modules/har-schema/lib/entry.json53
-rw-r--r--node_modules/har-schema/lib/har.json13
-rw-r--r--node_modules/har-schema/lib/header.json20
-rw-r--r--node_modules/har-schema/lib/index.js22
-rw-r--r--node_modules/har-schema/lib/log.json36
-rw-r--r--node_modules/har-schema/lib/page.json32
-rw-r--r--node_modules/har-schema/lib/pageTimings.json18
-rw-r--r--node_modules/har-schema/lib/postData.json43
-rw-r--r--node_modules/har-schema/lib/query.json20
-rw-r--r--node_modules/har-schema/lib/request.json57
-rw-r--r--node_modules/har-schema/lib/response.json54
-rw-r--r--node_modules/har-schema/lib/timings.json42
-rw-r--r--node_modules/har-schema/package.json54
-rw-r--r--node_modules/har-validator/LICENSE9
-rw-r--r--node_modules/har-validator/README.md43
-rw-r--r--node_modules/har-validator/lib/async.js105
-rw-r--r--node_modules/har-validator/lib/error.js17
-rw-r--r--node_modules/har-validator/lib/promise.js102
-rw-r--r--node_modules/har-validator/package.json43
-rw-r--r--node_modules/has-property-descriptors/.eslintrc13
-rw-r--r--node_modules/has-property-descriptors/.github/FUNDING.yml12
-rw-r--r--node_modules/has-property-descriptors/.nycrc9
-rw-r--r--node_modules/has-property-descriptors/CHANGELOG.md16
-rw-r--r--node_modules/has-property-descriptors/LICENSE21
-rw-r--r--node_modules/has-property-descriptors/README.md43
-rw-r--r--node_modules/has-property-descriptors/index.js33
-rw-r--r--node_modules/has-property-descriptors/package.json70
-rw-r--r--node_modules/has-property-descriptors/test/index.js57
-rw-r--r--node_modules/has-symbols/.eslintrc11
-rw-r--r--node_modules/has-symbols/.github/FUNDING.yml12
-rw-r--r--node_modules/has-symbols/.nycrc9
-rw-r--r--node_modules/has-symbols/CHANGELOG.md75
-rw-r--r--node_modules/has-symbols/LICENSE21
-rw-r--r--node_modules/has-symbols/README.md46
-rw-r--r--node_modules/has-symbols/index.js13
-rw-r--r--node_modules/has-symbols/package.json101
-rw-r--r--node_modules/has-symbols/shams.js42
-rw-r--r--node_modules/has-symbols/test/index.js22
-rw-r--r--node_modules/has-symbols/test/shams/core-js.js28
-rw-r--r--node_modules/has-symbols/test/shams/get-own-property-symbols.js28
-rw-r--r--node_modules/has-symbols/test/tests.js56
-rw-r--r--node_modules/has/LICENSE-MIT22
-rw-r--r--node_modules/has/README.md18
-rw-r--r--node_modules/has/package.json48
-rw-r--r--node_modules/has/src/index.js5
-rw-r--r--node_modules/has/test/index.js10
-rw-r--r--node_modules/hosted-git-info/CHANGELOG.md141
-rw-r--r--node_modules/hosted-git-info/LICENSE13
-rw-r--r--node_modules/hosted-git-info/README.md133
-rw-r--r--node_modules/hosted-git-info/git-host-info.js79
-rw-r--r--node_modules/hosted-git-info/git-host.js156
-rw-r--r--node_modules/hosted-git-info/index.js148
-rw-r--r--node_modules/hosted-git-info/package.json40
-rw-r--r--node_modules/http-cache-semantics/LICENSE9
-rw-r--r--node_modules/http-cache-semantics/README.md203
-rw-r--r--node_modules/http-cache-semantics/index.js673
-rw-r--r--node_modules/http-cache-semantics/package.json24
-rw-r--r--node_modules/http-signature/.dir-locals.el6
-rw-r--r--node_modules/http-signature/.npmignore7
-rw-r--r--node_modules/http-signature/CHANGES.md46
-rw-r--r--node_modules/http-signature/LICENSE18
-rw-r--r--node_modules/http-signature/README.md79
-rw-r--r--node_modules/http-signature/http_signing.md363
-rw-r--r--node_modules/http-signature/lib/index.js29
-rw-r--r--node_modules/http-signature/lib/parser.js315
-rw-r--r--node_modules/http-signature/lib/signer.js401
-rw-r--r--node_modules/http-signature/lib/utils.js112
-rw-r--r--node_modules/http-signature/lib/verify.js88
-rw-r--r--node_modules/http-signature/package.json39
-rw-r--r--node_modules/http2-wrapper/LICENSE21
-rw-r--r--node_modules/http2-wrapper/README.md470
-rw-r--r--node_modules/http2-wrapper/package.json54
-rw-r--r--node_modules/http2-wrapper/source/agent.js670
-rw-r--r--node_modules/http2-wrapper/source/auto.js149
-rw-r--r--node_modules/http2-wrapper/source/client-request.js445
-rw-r--r--node_modules/http2-wrapper/source/incoming-message.js58
-rw-r--r--node_modules/http2-wrapper/source/index.js28
-rw-r--r--node_modules/http2-wrapper/source/utils/calculate-server-name.js27
-rw-r--r--node_modules/http2-wrapper/source/utils/errors.js45
-rw-r--r--node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js13
-rw-r--r--node_modules/http2-wrapper/source/utils/proxy-events.js7
-rw-r--r--node_modules/http2-wrapper/source/utils/url-to-options.js25
-rw-r--r--node_modules/indent-string/index.js20
-rw-r--r--node_modules/indent-string/license21
-rw-r--r--node_modules/indent-string/package.json36
-rw-r--r--node_modules/indent-string/readme.md58
-rw-r--r--node_modules/inflight/LICENSE15
-rw-r--r--node_modules/inflight/README.md37
-rw-r--r--node_modules/inflight/inflight.js54
-rw-r--r--node_modules/inflight/package.json29
-rw-r--r--node_modules/inherits/LICENSE16
-rw-r--r--node_modules/inherits/README.md42
-rw-r--r--node_modules/inherits/inherits.js9
-rw-r--r--node_modules/inherits/inherits_browser.js27
-rw-r--r--node_modules/inherits/package.json29
-rw-r--r--node_modules/ini/LICENSE15
-rw-r--r--node_modules/ini/README.md102
-rw-r--r--node_modules/ini/ini.js206
-rw-r--r--node_modules/ini/package.json33
-rw-r--r--node_modules/is-arrayish/.editorconfig18
-rw-r--r--node_modules/is-arrayish/.istanbul.yml4
-rw-r--r--node_modules/is-arrayish/.npmignore5
-rw-r--r--node_modules/is-arrayish/.travis.yml17
-rw-r--r--node_modules/is-arrayish/LICENSE21
-rw-r--r--node_modules/is-arrayish/README.md16
-rw-r--r--node_modules/is-arrayish/index.js10
-rw-r--r--node_modules/is-arrayish/package.json34
-rw-r--r--node_modules/is-core-module/.eslintignore1
-rw-r--r--node_modules/is-core-module/.eslintrc18
-rw-r--r--node_modules/is-core-module/.github/FUNDING.yml12
-rw-r--r--node_modules/is-core-module/.github/workflows/node-4+.yml54
-rw-r--r--node_modules/is-core-module/.github/workflows/node-iojs.yml58
-rw-r--r--node_modules/is-core-module/.github/workflows/node-pretest.yml26
-rw-r--r--node_modules/is-core-module/.github/workflows/node-zero.yml58
-rw-r--r--node_modules/is-core-module/.github/workflows/rebase.yml15
-rw-r--r--node_modules/is-core-module/.github/workflows/require-allow-edits.yml14
-rw-r--r--node_modules/is-core-module/.nycrc13
-rw-r--r--node_modules/is-core-module/CHANGELOG.md58
-rw-r--r--node_modules/is-core-module/LICENSE20
-rw-r--r--node_modules/is-core-module/README.md37
-rw-r--r--node_modules/is-core-module/core.json83
-rw-r--r--node_modules/is-core-module/index.js69
-rw-r--r--node_modules/is-core-module/package.json66
-rw-r--r--node_modules/is-core-module/test/index.js83
-rwxr-xr-xnode_modules/is-docker/cli.js5
-rw-r--r--node_modules/is-docker/index.d.ts15
-rw-r--r--node_modules/is-docker/index.js29
-rw-r--r--node_modules/is-docker/license9
-rw-r--r--node_modules/is-docker/package.json42
-rw-r--r--node_modules/is-docker/readme.md27
-rw-r--r--node_modules/is-finite/index.js5
-rw-r--r--node_modules/is-finite/license9
-rw-r--r--node_modules/is-finite/package.json34
-rw-r--r--node_modules/is-finite/readme.md33
-rw-r--r--node_modules/is-fullwidth-code-point/index.js46
-rw-r--r--node_modules/is-fullwidth-code-point/license21
-rw-r--r--node_modules/is-fullwidth-code-point/package.json45
-rw-r--r--node_modules/is-fullwidth-code-point/readme.md39
-rw-r--r--node_modules/is-typedarray/LICENSE.md18
-rw-r--r--node_modules/is-typedarray/README.md16
-rw-r--r--node_modules/is-typedarray/index.js41
-rw-r--r--node_modules/is-typedarray/package.json30
-rw-r--r--node_modules/is-typedarray/test.js34
-rw-r--r--node_modules/is-utf8/LICENSE9
-rw-r--r--node_modules/is-utf8/README.md16
-rw-r--r--node_modules/is-utf8/is-utf8.js76
-rw-r--r--node_modules/is-utf8/package.json19
-rw-r--r--node_modules/is-wsl/index.d.ts15
-rw-r--r--node_modules/is-wsl/index.js31
-rw-r--r--node_modules/is-wsl/license9
-rw-r--r--node_modules/is-wsl/package.json45
-rw-r--r--node_modules/is-wsl/readme.md36
-rw-r--r--node_modules/isarray/README.md54
-rw-r--r--node_modules/isarray/build/build.js209
-rw-r--r--node_modules/isarray/component.json19
-rw-r--r--node_modules/isarray/index.js3
-rw-r--r--node_modules/isarray/package.json25
-rw-r--r--node_modules/isbinaryfile/LICENSE.txt22
-rw-r--r--node_modules/isbinaryfile/README.md78
-rw-r--r--node_modules/isbinaryfile/index.js129
-rw-r--r--node_modules/isbinaryfile/package.json36
-rw-r--r--node_modules/isexe/.npmignore2
-rw-r--r--node_modules/isexe/LICENSE15
-rw-r--r--node_modules/isexe/README.md51
-rw-r--r--node_modules/isexe/index.js57
-rw-r--r--node_modules/isexe/mode.js41
-rw-r--r--node_modules/isexe/package.json31
-rw-r--r--node_modules/isexe/test/basic.js221
-rw-r--r--node_modules/isexe/windows.js42
-rw-r--r--node_modules/isstream/.jshintrc59
-rw-r--r--node_modules/isstream/.npmignore1
-rw-r--r--node_modules/isstream/.travis.yml12
-rw-r--r--node_modules/isstream/LICENSE.md11
-rw-r--r--node_modules/isstream/README.md66
-rw-r--r--node_modules/isstream/isstream.js27
-rw-r--r--node_modules/isstream/package.json33
-rw-r--r--node_modules/isstream/test.js168
-rw-r--r--node_modules/jsbn/.npmignore2
-rw-r--r--node_modules/jsbn/LICENSE40
-rw-r--r--node_modules/jsbn/README.md175
-rw-r--r--node_modules/jsbn/example.html12
-rw-r--r--node_modules/jsbn/example.js3
-rw-r--r--node_modules/jsbn/index.js1357
-rw-r--r--node_modules/jsbn/package.json21
-rw-r--r--node_modules/json-buffer/.travis.yml3
-rw-r--r--node_modules/json-buffer/LICENSE22
-rw-r--r--node_modules/json-buffer/README.md24
-rw-r--r--node_modules/json-buffer/index.js58
-rw-r--r--node_modules/json-buffer/package.json34
-rw-r--r--node_modules/json-buffer/test/index.js63
-rw-r--r--node_modules/json-schema-traverse/.eslintrc.yml27
-rw-r--r--node_modules/json-schema-traverse/.travis.yml8
-rw-r--r--node_modules/json-schema-traverse/LICENSE21
-rw-r--r--node_modules/json-schema-traverse/README.md83
-rw-r--r--node_modules/json-schema-traverse/index.js89
-rw-r--r--node_modules/json-schema-traverse/package.json43
-rw-r--r--node_modules/json-schema-traverse/spec/.eslintrc.yml6
-rw-r--r--node_modules/json-schema-traverse/spec/fixtures/schema.js125
-rw-r--r--node_modules/json-schema-traverse/spec/index.spec.js171
-rw-r--r--node_modules/json-schema/README.md5
-rw-r--r--node_modules/json-schema/draft-00/hyper-schema68
-rw-r--r--node_modules/json-schema/draft-00/json-ref26
-rw-r--r--node_modules/json-schema/draft-00/links33
-rw-r--r--node_modules/json-schema/draft-00/schema155
-rw-r--r--node_modules/json-schema/draft-01/hyper-schema68
-rw-r--r--node_modules/json-schema/draft-01/json-ref26
-rw-r--r--node_modules/json-schema/draft-01/links33
-rw-r--r--node_modules/json-schema/draft-01/schema155
-rw-r--r--node_modules/json-schema/draft-02/hyper-schema68
-rw-r--r--node_modules/json-schema/draft-02/json-ref26
-rw-r--r--node_modules/json-schema/draft-02/links35
-rw-r--r--node_modules/json-schema/draft-02/schema166
-rw-r--r--node_modules/json-schema/draft-03/examples/address20
-rw-r--r--node_modules/json-schema/draft-03/examples/calendar53
-rw-r--r--node_modules/json-schema/draft-03/examples/card105
-rw-r--r--node_modules/json-schema/draft-03/examples/geo8
-rw-r--r--node_modules/json-schema/draft-03/examples/interfaces23
-rw-r--r--node_modules/json-schema/draft-03/hyper-schema60
-rw-r--r--node_modules/json-schema/draft-03/json-ref26
-rw-r--r--node_modules/json-schema/draft-03/links35
-rw-r--r--node_modules/json-schema/draft-03/schema174
-rw-r--r--node_modules/json-schema/draft-04/hyper-schema60
-rw-r--r--node_modules/json-schema/draft-04/links41
-rw-r--r--node_modules/json-schema/draft-04/schema189
-rw-r--r--node_modules/json-schema/draft-zyp-json-schema-03.xml1120
-rw-r--r--node_modules/json-schema/draft-zyp-json-schema-04.xml1072
-rw-r--r--node_modules/json-schema/lib/links.js66
-rw-r--r--node_modules/json-schema/lib/validate.js273
-rw-r--r--node_modules/json-schema/package.json31
-rw-r--r--node_modules/json-schema/test/tests.js95
-rw-r--r--node_modules/json-stringify-safe/.npmignore1
-rw-r--r--node_modules/json-stringify-safe/CHANGELOG.md14
-rw-r--r--node_modules/json-stringify-safe/LICENSE15
-rw-r--r--node_modules/json-stringify-safe/Makefile35
-rw-r--r--node_modules/json-stringify-safe/README.md52
-rw-r--r--node_modules/json-stringify-safe/package.json31
-rw-r--r--node_modules/json-stringify-safe/stringify.js27
-rw-r--r--node_modules/json-stringify-safe/test/mocha.opts2
-rw-r--r--node_modules/json-stringify-safe/test/stringify_test.js246
-rw-r--r--node_modules/jsonfile/CHANGELOG.md145
-rw-r--r--node_modules/jsonfile/LICENSE15
-rw-r--r--node_modules/jsonfile/README.md168
-rw-r--r--node_modules/jsonfile/index.js134
-rw-r--r--node_modules/jsonfile/package.json37
-rw-r--r--node_modules/jsprim/CHANGES.md49
-rw-r--r--node_modules/jsprim/CONTRIBUTING.md19
-rw-r--r--node_modules/jsprim/LICENSE19
-rw-r--r--node_modules/jsprim/README.md287
-rw-r--r--node_modules/jsprim/lib/jsprim.js735
-rw-r--r--node_modules/jsprim/package.json20
-rw-r--r--node_modules/junk/index.d.ts40
-rw-r--r--node_modules/junk/index.js39
-rw-r--r--node_modules/junk/license9
-rw-r--r--node_modules/junk/package.json42
-rw-r--r--node_modules/junk/readme.md51
-rw-r--r--node_modules/keyv/README.md405
-rw-r--r--node_modules/keyv/package.json57
-rw-r--r--node_modules/keyv/src/index.d.ts109
-rw-r--r--node_modules/keyv/src/index.js265
-rw-r--r--node_modules/load-json-file/index.js21
-rw-r--r--node_modules/load-json-file/license21
-rw-r--r--node_modules/load-json-file/package.json46
-rw-r--r--node_modules/load-json-file/readme.md45
-rw-r--r--node_modules/locate-path/index.js24
-rw-r--r--node_modules/locate-path/license21
-rw-r--r--node_modules/locate-path/package.json47
-rw-r--r--node_modules/locate-path/readme.md99
-rw-r--r--node_modules/lodash.get/LICENSE47
-rw-r--r--node_modules/lodash.get/README.md18
-rw-r--r--node_modules/lodash.get/index.js931
-rw-r--r--node_modules/lodash.get/package.json17
-rw-r--r--node_modules/lodash/LICENSE47
-rw-r--r--node_modules/lodash/README.md39
-rw-r--r--node_modules/lodash/_DataView.js7
-rw-r--r--node_modules/lodash/_Hash.js32
-rw-r--r--node_modules/lodash/_LazyWrapper.js28
-rw-r--r--node_modules/lodash/_ListCache.js32
-rw-r--r--node_modules/lodash/_LodashWrapper.js22
-rw-r--r--node_modules/lodash/_Map.js7
-rw-r--r--node_modules/lodash/_MapCache.js32
-rw-r--r--node_modules/lodash/_Promise.js7
-rw-r--r--node_modules/lodash/_Set.js7
-rw-r--r--node_modules/lodash/_SetCache.js27
-rw-r--r--node_modules/lodash/_Stack.js27
-rw-r--r--node_modules/lodash/_Symbol.js6
-rw-r--r--node_modules/lodash/_Uint8Array.js6
-rw-r--r--node_modules/lodash/_WeakMap.js7
-rw-r--r--node_modules/lodash/_apply.js21
-rw-r--r--node_modules/lodash/_arrayAggregator.js22
-rw-r--r--node_modules/lodash/_arrayEach.js22
-rw-r--r--node_modules/lodash/_arrayEachRight.js21
-rw-r--r--node_modules/lodash/_arrayEvery.js23
-rw-r--r--node_modules/lodash/_arrayFilter.js25
-rw-r--r--node_modules/lodash/_arrayIncludes.js17
-rw-r--r--node_modules/lodash/_arrayIncludesWith.js22
-rw-r--r--node_modules/lodash/_arrayLikeKeys.js49
-rw-r--r--node_modules/lodash/_arrayMap.js21
-rw-r--r--node_modules/lodash/_arrayPush.js20
-rw-r--r--node_modules/lodash/_arrayReduce.js26
-rw-r--r--node_modules/lodash/_arrayReduceRight.js24
-rw-r--r--node_modules/lodash/_arraySample.js15
-rw-r--r--node_modules/lodash/_arraySampleSize.js17
-rw-r--r--node_modules/lodash/_arrayShuffle.js15
-rw-r--r--node_modules/lodash/_arraySome.js23
-rw-r--r--node_modules/lodash/_asciiSize.js12
-rw-r--r--node_modules/lodash/_asciiToArray.js12
-rw-r--r--node_modules/lodash/_asciiWords.js15
-rw-r--r--node_modules/lodash/_assignMergeValue.js20
-rw-r--r--node_modules/lodash/_assignValue.js28
-rw-r--r--node_modules/lodash/_assocIndexOf.js21
-rw-r--r--node_modules/lodash/_baseAggregator.js21
-rw-r--r--node_modules/lodash/_baseAssign.js17
-rw-r--r--node_modules/lodash/_baseAssignIn.js17
-rw-r--r--node_modules/lodash/_baseAssignValue.js25
-rw-r--r--node_modules/lodash/_baseAt.js23
-rw-r--r--node_modules/lodash/_baseClamp.js22
-rw-r--r--node_modules/lodash/_baseClone.js166
-rw-r--r--node_modules/lodash/_baseConforms.js18
-rw-r--r--node_modules/lodash/_baseConformsTo.js27
-rw-r--r--node_modules/lodash/_baseCreate.js30
-rw-r--r--node_modules/lodash/_baseDelay.js21
-rw-r--r--node_modules/lodash/_baseDifference.js67
-rw-r--r--node_modules/lodash/_baseEach.js14
-rw-r--r--node_modules/lodash/_baseEachRight.js14
-rw-r--r--node_modules/lodash/_baseEvery.js21
-rw-r--r--node_modules/lodash/_baseExtremum.js32
-rw-r--r--node_modules/lodash/_baseFill.js32
-rw-r--r--node_modules/lodash/_baseFilter.js21
-rw-r--r--node_modules/lodash/_baseFindIndex.js24
-rw-r--r--node_modules/lodash/_baseFindKey.js23
-rw-r--r--node_modules/lodash/_baseFlatten.js38
-rw-r--r--node_modules/lodash/_baseFor.js16
-rw-r--r--node_modules/lodash/_baseForOwn.js16
-rw-r--r--node_modules/lodash/_baseForOwnRight.js16
-rw-r--r--node_modules/lodash/_baseForRight.js15
-rw-r--r--node_modules/lodash/_baseFunctions.js19
-rw-r--r--node_modules/lodash/_baseGet.js24
-rw-r--r--node_modules/lodash/_baseGetAllKeys.js20
-rw-r--r--node_modules/lodash/_baseGetTag.js28
-rw-r--r--node_modules/lodash/_baseGt.js14
-rw-r--r--node_modules/lodash/_baseHas.js19
-rw-r--r--node_modules/lodash/_baseHasIn.js13
-rw-r--r--node_modules/lodash/_baseInRange.js18
-rw-r--r--node_modules/lodash/_baseIndexOf.js20
-rw-r--r--node_modules/lodash/_baseIndexOfWith.js23
-rw-r--r--node_modules/lodash/_baseIntersection.js74
-rw-r--r--node_modules/lodash/_baseInverter.js21
-rw-r--r--node_modules/lodash/_baseInvoke.js24
-rw-r--r--node_modules/lodash/_baseIsArguments.js18
-rw-r--r--node_modules/lodash/_baseIsArrayBuffer.js17
-rw-r--r--node_modules/lodash/_baseIsDate.js18
-rw-r--r--node_modules/lodash/_baseIsEqual.js28
-rw-r--r--node_modules/lodash/_baseIsEqualDeep.js83
-rw-r--r--node_modules/lodash/_baseIsMap.js18
-rw-r--r--node_modules/lodash/_baseIsMatch.js62
-rw-r--r--node_modules/lodash/_baseIsNaN.js12
-rw-r--r--node_modules/lodash/_baseIsNative.js47
-rw-r--r--node_modules/lodash/_baseIsRegExp.js18
-rw-r--r--node_modules/lodash/_baseIsSet.js18
-rw-r--r--node_modules/lodash/_baseIsTypedArray.js60
-rw-r--r--node_modules/lodash/_baseIteratee.js31
-rw-r--r--node_modules/lodash/_baseKeys.js30
-rw-r--r--node_modules/lodash/_baseKeysIn.js33
-rw-r--r--node_modules/lodash/_baseLodash.js10
-rw-r--r--node_modules/lodash/_baseLt.js14
-rw-r--r--node_modules/lodash/_baseMap.js22
-rw-r--r--node_modules/lodash/_baseMatches.js22
-rw-r--r--node_modules/lodash/_baseMatchesProperty.js33
-rw-r--r--node_modules/lodash/_baseMean.js20
-rw-r--r--node_modules/lodash/_baseMerge.js42
-rw-r--r--node_modules/lodash/_baseMergeDeep.js94
-rw-r--r--node_modules/lodash/_baseNth.js20
-rw-r--r--node_modules/lodash/_baseOrderBy.js49
-rw-r--r--node_modules/lodash/_basePick.js19
-rw-r--r--node_modules/lodash/_basePickBy.js30
-rw-r--r--node_modules/lodash/_baseProperty.js14
-rw-r--r--node_modules/lodash/_basePropertyDeep.js16
-rw-r--r--node_modules/lodash/_basePropertyOf.js14
-rw-r--r--node_modules/lodash/_basePullAll.js51
-rw-r--r--node_modules/lodash/_basePullAt.js37
-rw-r--r--node_modules/lodash/_baseRandom.js18
-rw-r--r--node_modules/lodash/_baseRange.js28
-rw-r--r--node_modules/lodash/_baseReduce.js23
-rw-r--r--node_modules/lodash/_baseRepeat.js35
-rw-r--r--node_modules/lodash/_baseRest.js17
-rw-r--r--node_modules/lodash/_baseSample.js15
-rw-r--r--node_modules/lodash/_baseSampleSize.js18
-rw-r--r--node_modules/lodash/_baseSet.js51
-rw-r--r--node_modules/lodash/_baseSetData.js17
-rw-r--r--node_modules/lodash/_baseSetToString.js22
-rw-r--r--node_modules/lodash/_baseShuffle.js15
-rw-r--r--node_modules/lodash/_baseSlice.js31
-rw-r--r--node_modules/lodash/_baseSome.js22
-rw-r--r--node_modules/lodash/_baseSortBy.js21
-rw-r--r--node_modules/lodash/_baseSortedIndex.js42
-rw-r--r--node_modules/lodash/_baseSortedIndexBy.js67
-rw-r--r--node_modules/lodash/_baseSortedUniq.js30
-rw-r--r--node_modules/lodash/_baseSum.js24
-rw-r--r--node_modules/lodash/_baseTimes.js20
-rw-r--r--node_modules/lodash/_baseToNumber.js24
-rw-r--r--node_modules/lodash/_baseToPairs.js18
-rw-r--r--node_modules/lodash/_baseToString.js37
-rw-r--r--node_modules/lodash/_baseTrim.js19
-rw-r--r--node_modules/lodash/_baseUnary.js14
-rw-r--r--node_modules/lodash/_baseUniq.js72
-rw-r--r--node_modules/lodash/_baseUnset.js20
-rw-r--r--node_modules/lodash/_baseUpdate.js18
-rw-r--r--node_modules/lodash/_baseValues.js19
-rw-r--r--node_modules/lodash/_baseWhile.js26
-rw-r--r--node_modules/lodash/_baseWrapperValue.js25
-rw-r--r--node_modules/lodash/_baseXor.js36
-rw-r--r--node_modules/lodash/_baseZipObject.js23
-rw-r--r--node_modules/lodash/_cacheHas.js13
-rw-r--r--node_modules/lodash/_castArrayLikeObject.js14
-rw-r--r--node_modules/lodash/_castFunction.js14
-rw-r--r--node_modules/lodash/_castPath.js21
-rw-r--r--node_modules/lodash/_castRest.js14
-rw-r--r--node_modules/lodash/_castSlice.js18
-rw-r--r--node_modules/lodash/_charsEndIndex.js19
-rw-r--r--node_modules/lodash/_charsStartIndex.js20
-rw-r--r--node_modules/lodash/_cloneArrayBuffer.js16
-rw-r--r--node_modules/lodash/_cloneBuffer.js35
-rw-r--r--node_modules/lodash/_cloneDataView.js16
-rw-r--r--node_modules/lodash/_cloneRegExp.js17
-rw-r--r--node_modules/lodash/_cloneSymbol.js18
-rw-r--r--node_modules/lodash/_cloneTypedArray.js16
-rw-r--r--node_modules/lodash/_compareAscending.js41
-rw-r--r--node_modules/lodash/_compareMultiple.js44
-rw-r--r--node_modules/lodash/_composeArgs.js39
-rw-r--r--node_modules/lodash/_composeArgsRight.js41
-rw-r--r--node_modules/lodash/_copyArray.js20
-rw-r--r--node_modules/lodash/_copyObject.js40
-rw-r--r--node_modules/lodash/_copySymbols.js16
-rw-r--r--node_modules/lodash/_copySymbolsIn.js16
-rw-r--r--node_modules/lodash/_coreJsData.js6
-rw-r--r--node_modules/lodash/_countHolders.js21
-rw-r--r--node_modules/lodash/_createAggregator.js23
-rw-r--r--node_modules/lodash/_createAssigner.js37
-rw-r--r--node_modules/lodash/_createBaseEach.js32
-rw-r--r--node_modules/lodash/_createBaseFor.js25
-rw-r--r--node_modules/lodash/_createBind.js28
-rw-r--r--node_modules/lodash/_createCaseFirst.js33
-rw-r--r--node_modules/lodash/_createCompounder.js24
-rw-r--r--node_modules/lodash/_createCtor.js37
-rw-r--r--node_modules/lodash/_createCurry.js46
-rw-r--r--node_modules/lodash/_createFind.js25
-rw-r--r--node_modules/lodash/_createFlow.js78
-rw-r--r--node_modules/lodash/_createHybrid.js92
-rw-r--r--node_modules/lodash/_createInverter.js17
-rw-r--r--node_modules/lodash/_createMathOperation.js38
-rw-r--r--node_modules/lodash/_createOver.js27
-rw-r--r--node_modules/lodash/_createPadding.js33
-rw-r--r--node_modules/lodash/_createPartial.js43
-rw-r--r--node_modules/lodash/_createRange.js30
-rw-r--r--node_modules/lodash/_createRecurry.js56
-rw-r--r--node_modules/lodash/_createRelationalOperation.js20
-rw-r--r--node_modules/lodash/_createRound.js35
-rw-r--r--node_modules/lodash/_createSet.js19
-rw-r--r--node_modules/lodash/_createToPairs.js30
-rw-r--r--node_modules/lodash/_createWrap.js106
-rw-r--r--node_modules/lodash/_customDefaultsAssignIn.js29
-rw-r--r--node_modules/lodash/_customDefaultsMerge.js28
-rw-r--r--node_modules/lodash/_customOmitClone.js16
-rw-r--r--node_modules/lodash/_deburrLetter.js71
-rw-r--r--node_modules/lodash/_defineProperty.js11
-rw-r--r--node_modules/lodash/_equalArrays.js84
-rw-r--r--node_modules/lodash/_equalByTag.js112
-rw-r--r--node_modules/lodash/_equalObjects.js90
-rw-r--r--node_modules/lodash/_escapeHtmlChar.js21
-rw-r--r--node_modules/lodash/_escapeStringChar.js22
-rw-r--r--node_modules/lodash/_flatRest.js16
-rw-r--r--node_modules/lodash/_freeGlobal.js4
-rw-r--r--node_modules/lodash/_getAllKeys.js16
-rw-r--r--node_modules/lodash/_getAllKeysIn.js17
-rw-r--r--node_modules/lodash/_getData.js15
-rw-r--r--node_modules/lodash/_getFuncName.js31
-rw-r--r--node_modules/lodash/_getHolder.js13
-rw-r--r--node_modules/lodash/_getMapData.js18
-rw-r--r--node_modules/lodash/_getMatchData.js24
-rw-r--r--node_modules/lodash/_getNative.js17
-rw-r--r--node_modules/lodash/_getPrototype.js6
-rw-r--r--node_modules/lodash/_getRawTag.js46
-rw-r--r--node_modules/lodash/_getSymbols.js30
-rw-r--r--node_modules/lodash/_getSymbolsIn.js25
-rw-r--r--node_modules/lodash/_getTag.js58
-rw-r--r--node_modules/lodash/_getValue.js13
-rw-r--r--node_modules/lodash/_getView.js33
-rw-r--r--node_modules/lodash/_getWrapDetails.js17
-rw-r--r--node_modules/lodash/_hasPath.js39
-rw-r--r--node_modules/lodash/_hasUnicode.js26
-rw-r--r--node_modules/lodash/_hasUnicodeWord.js15
-rw-r--r--node_modules/lodash/_hashClear.js15
-rw-r--r--node_modules/lodash/_hashDelete.js17
-rw-r--r--node_modules/lodash/_hashGet.js30
-rw-r--r--node_modules/lodash/_hashHas.js23
-rw-r--r--node_modules/lodash/_hashSet.js23
-rw-r--r--node_modules/lodash/_initCloneArray.js26
-rw-r--r--node_modules/lodash/_initCloneByTag.js77
-rw-r--r--node_modules/lodash/_initCloneObject.js18
-rw-r--r--node_modules/lodash/_insertWrapDetails.js23
-rw-r--r--node_modules/lodash/_isFlattenable.js20
-rw-r--r--node_modules/lodash/_isIndex.js25
-rw-r--r--node_modules/lodash/_isIterateeCall.js30
-rw-r--r--node_modules/lodash/_isKey.js29
-rw-r--r--node_modules/lodash/_isKeyable.js15
-rw-r--r--node_modules/lodash/_isLaziable.js28
-rw-r--r--node_modules/lodash/_isMaskable.js14
-rw-r--r--node_modules/lodash/_isMasked.js20
-rw-r--r--node_modules/lodash/_isPrototype.js18
-rw-r--r--node_modules/lodash/_isStrictComparable.js15
-rw-r--r--node_modules/lodash/_iteratorToArray.js18
-rw-r--r--node_modules/lodash/_lazyClone.js23
-rw-r--r--node_modules/lodash/_lazyReverse.js23
-rw-r--r--node_modules/lodash/_lazyValue.js69
-rw-r--r--node_modules/lodash/_listCacheClear.js13
-rw-r--r--node_modules/lodash/_listCacheDelete.js35
-rw-r--r--node_modules/lodash/_listCacheGet.js19
-rw-r--r--node_modules/lodash/_listCacheHas.js16
-rw-r--r--node_modules/lodash/_listCacheSet.js26
-rw-r--r--node_modules/lodash/_mapCacheClear.js21
-rw-r--r--node_modules/lodash/_mapCacheDelete.js18
-rw-r--r--node_modules/lodash/_mapCacheGet.js16
-rw-r--r--node_modules/lodash/_mapCacheHas.js16
-rw-r--r--node_modules/lodash/_mapCacheSet.js22
-rw-r--r--node_modules/lodash/_mapToArray.js18
-rw-r--r--node_modules/lodash/_matchesStrictComparable.js20
-rw-r--r--node_modules/lodash/_memoizeCapped.js26
-rw-r--r--node_modules/lodash/_mergeData.js90
-rw-r--r--node_modules/lodash/_metaMap.js6
-rw-r--r--node_modules/lodash/_nativeCreate.js6
-rw-r--r--node_modules/lodash/_nativeKeys.js6
-rw-r--r--node_modules/lodash/_nativeKeysIn.js20
-rw-r--r--node_modules/lodash/_nodeUtil.js30
-rw-r--r--node_modules/lodash/_objectToString.js22
-rw-r--r--node_modules/lodash/_overArg.js15
-rw-r--r--node_modules/lodash/_overRest.js36
-rw-r--r--node_modules/lodash/_parent.js16
-rw-r--r--node_modules/lodash/_reEscape.js4
-rw-r--r--node_modules/lodash/_reEvaluate.js4
-rw-r--r--node_modules/lodash/_reInterpolate.js4
-rw-r--r--node_modules/lodash/_realNames.js4
-rw-r--r--node_modules/lodash/_reorder.js29
-rw-r--r--node_modules/lodash/_replaceHolders.js29
-rw-r--r--node_modules/lodash/_root.js9
-rw-r--r--node_modules/lodash/_safeGet.js21
-rw-r--r--node_modules/lodash/_setCacheAdd.js19
-rw-r--r--node_modules/lodash/_setCacheHas.js14
-rw-r--r--node_modules/lodash/_setData.js20
-rw-r--r--node_modules/lodash/_setToArray.js18
-rw-r--r--node_modules/lodash/_setToPairs.js18
-rw-r--r--node_modules/lodash/_setToString.js14
-rw-r--r--node_modules/lodash/_setWrapToString.js21
-rw-r--r--node_modules/lodash/_shortOut.js37
-rw-r--r--node_modules/lodash/_shuffleSelf.js28
-rw-r--r--node_modules/lodash/_stackClear.js15
-rw-r--r--node_modules/lodash/_stackDelete.js18
-rw-r--r--node_modules/lodash/_stackGet.js14
-rw-r--r--node_modules/lodash/_stackHas.js14
-rw-r--r--node_modules/lodash/_stackSet.js34
-rw-r--r--node_modules/lodash/_strictIndexOf.js23
-rw-r--r--node_modules/lodash/_strictLastIndexOf.js21
-rw-r--r--node_modules/lodash/_stringSize.js18
-rw-r--r--node_modules/lodash/_stringToArray.js18
-rw-r--r--node_modules/lodash/_stringToPath.js27
-rw-r--r--node_modules/lodash/_toKey.js21
-rw-r--r--node_modules/lodash/_toSource.js26
-rw-r--r--node_modules/lodash/_trimmedEndIndex.js19
-rw-r--r--node_modules/lodash/_unescapeHtmlChar.js21
-rw-r--r--node_modules/lodash/_unicodeSize.js44
-rw-r--r--node_modules/lodash/_unicodeToArray.js40
-rw-r--r--node_modules/lodash/_unicodeWords.js69
-rw-r--r--node_modules/lodash/_updateWrapDetails.js46
-rw-r--r--node_modules/lodash/_wrapperClone.js23
-rw-r--r--node_modules/lodash/add.js22
-rw-r--r--node_modules/lodash/after.js42
-rw-r--r--node_modules/lodash/array.js67
-rw-r--r--node_modules/lodash/ary.js29
-rw-r--r--node_modules/lodash/assign.js58
-rw-r--r--node_modules/lodash/assignIn.js40
-rw-r--r--node_modules/lodash/assignInWith.js38
-rw-r--r--node_modules/lodash/assignWith.js37
-rw-r--r--node_modules/lodash/at.js23
-rw-r--r--node_modules/lodash/attempt.js35
-rw-r--r--node_modules/lodash/before.js40
-rw-r--r--node_modules/lodash/bind.js57
-rw-r--r--node_modules/lodash/bindAll.js41
-rw-r--r--node_modules/lodash/bindKey.js68
-rw-r--r--node_modules/lodash/camelCase.js29
-rw-r--r--node_modules/lodash/capitalize.js23
-rw-r--r--node_modules/lodash/castArray.js44
-rw-r--r--node_modules/lodash/ceil.js26
-rw-r--r--node_modules/lodash/chain.js38
-rw-r--r--node_modules/lodash/chunk.js50
-rw-r--r--node_modules/lodash/clamp.js39
-rw-r--r--node_modules/lodash/clone.js36
-rw-r--r--node_modules/lodash/cloneDeep.js29
-rw-r--r--node_modules/lodash/cloneDeepWith.js40
-rw-r--r--node_modules/lodash/cloneWith.js42
-rw-r--r--node_modules/lodash/collection.js30
-rw-r--r--node_modules/lodash/commit.js33
-rw-r--r--node_modules/lodash/compact.js31
-rw-r--r--node_modules/lodash/concat.js43
-rw-r--r--node_modules/lodash/cond.js60
-rw-r--r--node_modules/lodash/conforms.js35
-rw-r--r--node_modules/lodash/conformsTo.js32
-rw-r--r--node_modules/lodash/constant.js26
-rw-r--r--node_modules/lodash/core.js3877
-rw-r--r--node_modules/lodash/core.min.js29
-rw-r--r--node_modules/lodash/countBy.js40
-rw-r--r--node_modules/lodash/create.js43
-rw-r--r--node_modules/lodash/curry.js57
-rw-r--r--node_modules/lodash/curryRight.js54
-rw-r--r--node_modules/lodash/date.js3
-rw-r--r--node_modules/lodash/debounce.js191
-rw-r--r--node_modules/lodash/deburr.js45
-rw-r--r--node_modules/lodash/defaultTo.js25
-rw-r--r--node_modules/lodash/defaults.js64
-rw-r--r--node_modules/lodash/defaultsDeep.js30
-rw-r--r--node_modules/lodash/defer.js26
-rw-r--r--node_modules/lodash/delay.js28
-rw-r--r--node_modules/lodash/difference.js33
-rw-r--r--node_modules/lodash/differenceBy.js44
-rw-r--r--node_modules/lodash/differenceWith.js40
-rw-r--r--node_modules/lodash/divide.js22
-rw-r--r--node_modules/lodash/drop.js38
-rw-r--r--node_modules/lodash/dropRight.js39
-rw-r--r--node_modules/lodash/dropRightWhile.js45
-rw-r--r--node_modules/lodash/dropWhile.js45
-rw-r--r--node_modules/lodash/each.js1
-rw-r--r--node_modules/lodash/eachRight.js1
-rw-r--r--node_modules/lodash/endsWith.js43
-rw-r--r--node_modules/lodash/entries.js1
-rw-r--r--node_modules/lodash/entriesIn.js1
-rw-r--r--node_modules/lodash/eq.js37
-rw-r--r--node_modules/lodash/escape.js43
-rw-r--r--node_modules/lodash/escapeRegExp.js32
-rw-r--r--node_modules/lodash/every.js56
-rw-r--r--node_modules/lodash/extend.js1
-rw-r--r--node_modules/lodash/extendWith.js1
-rw-r--r--node_modules/lodash/fill.js45
-rw-r--r--node_modules/lodash/filter.js52
-rw-r--r--node_modules/lodash/find.js42
-rw-r--r--node_modules/lodash/findIndex.js55
-rw-r--r--node_modules/lodash/findKey.js44
-rw-r--r--node_modules/lodash/findLast.js25
-rw-r--r--node_modules/lodash/findLastIndex.js59
-rw-r--r--node_modules/lodash/findLastKey.js44
-rw-r--r--node_modules/lodash/first.js1
-rw-r--r--node_modules/lodash/flake.lock40
-rw-r--r--node_modules/lodash/flake.nix20
-rw-r--r--node_modules/lodash/flatMap.js29
-rw-r--r--node_modules/lodash/flatMapDeep.js31
-rw-r--r--node_modules/lodash/flatMapDepth.js31
-rw-r--r--node_modules/lodash/flatten.js22
-rw-r--r--node_modules/lodash/flattenDeep.js25
-rw-r--r--node_modules/lodash/flattenDepth.js33
-rw-r--r--node_modules/lodash/flip.js28
-rw-r--r--node_modules/lodash/floor.js26
-rw-r--r--node_modules/lodash/flow.js27
-rw-r--r--node_modules/lodash/flowRight.js26
-rw-r--r--node_modules/lodash/forEach.js41
-rw-r--r--node_modules/lodash/forEachRight.js31
-rw-r--r--node_modules/lodash/forIn.js39
-rw-r--r--node_modules/lodash/forInRight.js37
-rw-r--r--node_modules/lodash/forOwn.js36
-rw-r--r--node_modules/lodash/forOwnRight.js34
-rw-r--r--node_modules/lodash/fp.js2
-rw-r--r--node_modules/lodash/fp/F.js1
-rw-r--r--node_modules/lodash/fp/T.js1
-rw-r--r--node_modules/lodash/fp/__.js1
-rw-r--r--node_modules/lodash/fp/_baseConvert.js569
-rw-r--r--node_modules/lodash/fp/_convertBrowser.js18
-rw-r--r--node_modules/lodash/fp/_falseOptions.js7
-rw-r--r--node_modules/lodash/fp/_mapping.js358
-rw-r--r--node_modules/lodash/fp/_util.js16
-rw-r--r--node_modules/lodash/fp/add.js5
-rw-r--r--node_modules/lodash/fp/after.js5
-rw-r--r--node_modules/lodash/fp/all.js1
-rw-r--r--node_modules/lodash/fp/allPass.js1
-rw-r--r--node_modules/lodash/fp/always.js1
-rw-r--r--node_modules/lodash/fp/any.js1
-rw-r--r--node_modules/lodash/fp/anyPass.js1
-rw-r--r--node_modules/lodash/fp/apply.js1
-rw-r--r--node_modules/lodash/fp/array.js2
-rw-r--r--node_modules/lodash/fp/ary.js5
-rw-r--r--node_modules/lodash/fp/assign.js5
-rw-r--r--node_modules/lodash/fp/assignAll.js5
-rw-r--r--node_modules/lodash/fp/assignAllWith.js5
-rw-r--r--node_modules/lodash/fp/assignIn.js5
-rw-r--r--node_modules/lodash/fp/assignInAll.js5
-rw-r--r--node_modules/lodash/fp/assignInAllWith.js5
-rw-r--r--node_modules/lodash/fp/assignInWith.js5
-rw-r--r--node_modules/lodash/fp/assignWith.js5
-rw-r--r--node_modules/lodash/fp/assoc.js1
-rw-r--r--node_modules/lodash/fp/assocPath.js1
-rw-r--r--node_modules/lodash/fp/at.js5
-rw-r--r--node_modules/lodash/fp/attempt.js5
-rw-r--r--node_modules/lodash/fp/before.js5
-rw-r--r--node_modules/lodash/fp/bind.js5
-rw-r--r--node_modules/lodash/fp/bindAll.js5
-rw-r--r--node_modules/lodash/fp/bindKey.js5
-rw-r--r--node_modules/lodash/fp/camelCase.js5
-rw-r--r--node_modules/lodash/fp/capitalize.js5
-rw-r--r--node_modules/lodash/fp/castArray.js5
-rw-r--r--node_modules/lodash/fp/ceil.js5
-rw-r--r--node_modules/lodash/fp/chain.js5
-rw-r--r--node_modules/lodash/fp/chunk.js5
-rw-r--r--node_modules/lodash/fp/clamp.js5
-rw-r--r--node_modules/lodash/fp/clone.js5
-rw-r--r--node_modules/lodash/fp/cloneDeep.js5
-rw-r--r--node_modules/lodash/fp/cloneDeepWith.js5
-rw-r--r--node_modules/lodash/fp/cloneWith.js5
-rw-r--r--node_modules/lodash/fp/collection.js2
-rw-r--r--node_modules/lodash/fp/commit.js5
-rw-r--r--node_modules/lodash/fp/compact.js5
-rw-r--r--node_modules/lodash/fp/complement.js1
-rw-r--r--node_modules/lodash/fp/compose.js1
-rw-r--r--node_modules/lodash/fp/concat.js5
-rw-r--r--node_modules/lodash/fp/cond.js5
-rw-r--r--node_modules/lodash/fp/conforms.js1
-rw-r--r--node_modules/lodash/fp/conformsTo.js5
-rw-r--r--node_modules/lodash/fp/constant.js5
-rw-r--r--node_modules/lodash/fp/contains.js1
-rw-r--r--node_modules/lodash/fp/convert.js18
-rw-r--r--node_modules/lodash/fp/countBy.js5
-rw-r--r--node_modules/lodash/fp/create.js5
-rw-r--r--node_modules/lodash/fp/curry.js5
-rw-r--r--node_modules/lodash/fp/curryN.js5
-rw-r--r--node_modules/lodash/fp/curryRight.js5
-rw-r--r--node_modules/lodash/fp/curryRightN.js5
-rw-r--r--node_modules/lodash/fp/date.js2
-rw-r--r--node_modules/lodash/fp/debounce.js5
-rw-r--r--node_modules/lodash/fp/deburr.js5
-rw-r--r--node_modules/lodash/fp/defaultTo.js5
-rw-r--r--node_modules/lodash/fp/defaults.js5
-rw-r--r--node_modules/lodash/fp/defaultsAll.js5
-rw-r--r--node_modules/lodash/fp/defaultsDeep.js5
-rw-r--r--node_modules/lodash/fp/defaultsDeepAll.js5
-rw-r--r--node_modules/lodash/fp/defer.js5
-rw-r--r--node_modules/lodash/fp/delay.js5
-rw-r--r--node_modules/lodash/fp/difference.js5
-rw-r--r--node_modules/lodash/fp/differenceBy.js5
-rw-r--r--node_modules/lodash/fp/differenceWith.js5
-rw-r--r--node_modules/lodash/fp/dissoc.js1
-rw-r--r--node_modules/lodash/fp/dissocPath.js1
-rw-r--r--node_modules/lodash/fp/divide.js5
-rw-r--r--node_modules/lodash/fp/drop.js5
-rw-r--r--node_modules/lodash/fp/dropLast.js1
-rw-r--r--node_modules/lodash/fp/dropLastWhile.js1
-rw-r--r--node_modules/lodash/fp/dropRight.js5
-rw-r--r--node_modules/lodash/fp/dropRightWhile.js5
-rw-r--r--node_modules/lodash/fp/dropWhile.js5
-rw-r--r--node_modules/lodash/fp/each.js1
-rw-r--r--node_modules/lodash/fp/eachRight.js1
-rw-r--r--node_modules/lodash/fp/endsWith.js5
-rw-r--r--node_modules/lodash/fp/entries.js1
-rw-r--r--node_modules/lodash/fp/entriesIn.js1
-rw-r--r--node_modules/lodash/fp/eq.js5
-rw-r--r--node_modules/lodash/fp/equals.js1
-rw-r--r--node_modules/lodash/fp/escape.js5
-rw-r--r--node_modules/lodash/fp/escapeRegExp.js5
-rw-r--r--node_modules/lodash/fp/every.js5
-rw-r--r--node_modules/lodash/fp/extend.js1
-rw-r--r--node_modules/lodash/fp/extendAll.js1
-rw-r--r--node_modules/lodash/fp/extendAllWith.js1
-rw-r--r--node_modules/lodash/fp/extendWith.js1
-rw-r--r--node_modules/lodash/fp/fill.js5
-rw-r--r--node_modules/lodash/fp/filter.js5
-rw-r--r--node_modules/lodash/fp/find.js5
-rw-r--r--node_modules/lodash/fp/findFrom.js5
-rw-r--r--node_modules/lodash/fp/findIndex.js5
-rw-r--r--node_modules/lodash/fp/findIndexFrom.js5
-rw-r--r--node_modules/lodash/fp/findKey.js5
-rw-r--r--node_modules/lodash/fp/findLast.js5
-rw-r--r--node_modules/lodash/fp/findLastFrom.js5
-rw-r--r--node_modules/lodash/fp/findLastIndex.js5
-rw-r--r--node_modules/lodash/fp/findLastIndexFrom.js5
-rw-r--r--node_modules/lodash/fp/findLastKey.js5
-rw-r--r--node_modules/lodash/fp/first.js1
-rw-r--r--node_modules/lodash/fp/flatMap.js5
-rw-r--r--node_modules/lodash/fp/flatMapDeep.js5
-rw-r--r--node_modules/lodash/fp/flatMapDepth.js5
-rw-r--r--node_modules/lodash/fp/flatten.js5
-rw-r--r--node_modules/lodash/fp/flattenDeep.js5
-rw-r--r--node_modules/lodash/fp/flattenDepth.js5
-rw-r--r--node_modules/lodash/fp/flip.js5
-rw-r--r--node_modules/lodash/fp/floor.js5
-rw-r--r--node_modules/lodash/fp/flow.js5
-rw-r--r--node_modules/lodash/fp/flowRight.js5
-rw-r--r--node_modules/lodash/fp/forEach.js5
-rw-r--r--node_modules/lodash/fp/forEachRight.js5
-rw-r--r--node_modules/lodash/fp/forIn.js5
-rw-r--r--node_modules/lodash/fp/forInRight.js5
-rw-r--r--node_modules/lodash/fp/forOwn.js5
-rw-r--r--node_modules/lodash/fp/forOwnRight.js5
-rw-r--r--node_modules/lodash/fp/fromPairs.js5
-rw-r--r--node_modules/lodash/fp/function.js2
-rw-r--r--node_modules/lodash/fp/functions.js5
-rw-r--r--node_modules/lodash/fp/functionsIn.js5
-rw-r--r--node_modules/lodash/fp/get.js5
-rw-r--r--node_modules/lodash/fp/getOr.js5
-rw-r--r--node_modules/lodash/fp/groupBy.js5
-rw-r--r--node_modules/lodash/fp/gt.js5
-rw-r--r--node_modules/lodash/fp/gte.js5
-rw-r--r--node_modules/lodash/fp/has.js5
-rw-r--r--node_modules/lodash/fp/hasIn.js5
-rw-r--r--node_modules/lodash/fp/head.js5
-rw-r--r--node_modules/lodash/fp/identical.js1
-rw-r--r--node_modules/lodash/fp/identity.js5
-rw-r--r--node_modules/lodash/fp/inRange.js5
-rw-r--r--node_modules/lodash/fp/includes.js5
-rw-r--r--node_modules/lodash/fp/includesFrom.js5
-rw-r--r--node_modules/lodash/fp/indexBy.js1
-rw-r--r--node_modules/lodash/fp/indexOf.js5
-rw-r--r--node_modules/lodash/fp/indexOfFrom.js5
-rw-r--r--node_modules/lodash/fp/init.js1
-rw-r--r--node_modules/lodash/fp/initial.js5
-rw-r--r--node_modules/lodash/fp/intersection.js5
-rw-r--r--node_modules/lodash/fp/intersectionBy.js5
-rw-r--r--node_modules/lodash/fp/intersectionWith.js5
-rw-r--r--node_modules/lodash/fp/invert.js5
-rw-r--r--node_modules/lodash/fp/invertBy.js5
-rw-r--r--node_modules/lodash/fp/invertObj.js1
-rw-r--r--node_modules/lodash/fp/invoke.js5
-rw-r--r--node_modules/lodash/fp/invokeArgs.js5
-rw-r--r--node_modules/lodash/fp/invokeArgsMap.js5
-rw-r--r--node_modules/lodash/fp/invokeMap.js5
-rw-r--r--node_modules/lodash/fp/isArguments.js5
-rw-r--r--node_modules/lodash/fp/isArray.js5
-rw-r--r--node_modules/lodash/fp/isArrayBuffer.js5
-rw-r--r--node_modules/lodash/fp/isArrayLike.js5
-rw-r--r--node_modules/lodash/fp/isArrayLikeObject.js5
-rw-r--r--node_modules/lodash/fp/isBoolean.js5
-rw-r--r--node_modules/lodash/fp/isBuffer.js5
-rw-r--r--node_modules/lodash/fp/isDate.js5
-rw-r--r--node_modules/lodash/fp/isElement.js5
-rw-r--r--node_modules/lodash/fp/isEmpty.js5
-rw-r--r--node_modules/lodash/fp/isEqual.js5
-rw-r--r--node_modules/lodash/fp/isEqualWith.js5
-rw-r--r--node_modules/lodash/fp/isError.js5
-rw-r--r--node_modules/lodash/fp/isFinite.js5
-rw-r--r--node_modules/lodash/fp/isFunction.js5
-rw-r--r--node_modules/lodash/fp/isInteger.js5
-rw-r--r--node_modules/lodash/fp/isLength.js5
-rw-r--r--node_modules/lodash/fp/isMap.js5
-rw-r--r--node_modules/lodash/fp/isMatch.js5
-rw-r--r--node_modules/lodash/fp/isMatchWith.js5
-rw-r--r--node_modules/lodash/fp/isNaN.js5
-rw-r--r--node_modules/lodash/fp/isNative.js5
-rw-r--r--node_modules/lodash/fp/isNil.js5
-rw-r--r--node_modules/lodash/fp/isNull.js5
-rw-r--r--node_modules/lodash/fp/isNumber.js5
-rw-r--r--node_modules/lodash/fp/isObject.js5
-rw-r--r--node_modules/lodash/fp/isObjectLike.js5
-rw-r--r--node_modules/lodash/fp/isPlainObject.js5
-rw-r--r--node_modules/lodash/fp/isRegExp.js5
-rw-r--r--node_modules/lodash/fp/isSafeInteger.js5
-rw-r--r--node_modules/lodash/fp/isSet.js5
-rw-r--r--node_modules/lodash/fp/isString.js5
-rw-r--r--node_modules/lodash/fp/isSymbol.js5
-rw-r--r--node_modules/lodash/fp/isTypedArray.js5
-rw-r--r--node_modules/lodash/fp/isUndefined.js5
-rw-r--r--node_modules/lodash/fp/isWeakMap.js5
-rw-r--r--node_modules/lodash/fp/isWeakSet.js5
-rw-r--r--node_modules/lodash/fp/iteratee.js5
-rw-r--r--node_modules/lodash/fp/join.js5
-rw-r--r--node_modules/lodash/fp/juxt.js1
-rw-r--r--node_modules/lodash/fp/kebabCase.js5
-rw-r--r--node_modules/lodash/fp/keyBy.js5
-rw-r--r--node_modules/lodash/fp/keys.js5
-rw-r--r--node_modules/lodash/fp/keysIn.js5
-rw-r--r--node_modules/lodash/fp/lang.js2
-rw-r--r--node_modules/lodash/fp/last.js5
-rw-r--r--node_modules/lodash/fp/lastIndexOf.js5
-rw-r--r--node_modules/lodash/fp/lastIndexOfFrom.js5
-rw-r--r--node_modules/lodash/fp/lowerCase.js5
-rw-r--r--node_modules/lodash/fp/lowerFirst.js5
-rw-r--r--node_modules/lodash/fp/lt.js5
-rw-r--r--node_modules/lodash/fp/lte.js5
-rw-r--r--node_modules/lodash/fp/map.js5
-rw-r--r--node_modules/lodash/fp/mapKeys.js5
-rw-r--r--node_modules/lodash/fp/mapValues.js5
-rw-r--r--node_modules/lodash/fp/matches.js1
-rw-r--r--node_modules/lodash/fp/matchesProperty.js5
-rw-r--r--node_modules/lodash/fp/math.js2
-rw-r--r--node_modules/lodash/fp/max.js5
-rw-r--r--node_modules/lodash/fp/maxBy.js5
-rw-r--r--node_modules/lodash/fp/mean.js5
-rw-r--r--node_modules/lodash/fp/meanBy.js5
-rw-r--r--node_modules/lodash/fp/memoize.js5
-rw-r--r--node_modules/lodash/fp/merge.js5
-rw-r--r--node_modules/lodash/fp/mergeAll.js5
-rw-r--r--node_modules/lodash/fp/mergeAllWith.js5
-rw-r--r--node_modules/lodash/fp/mergeWith.js5
-rw-r--r--node_modules/lodash/fp/method.js5
-rw-r--r--node_modules/lodash/fp/methodOf.js5
-rw-r--r--node_modules/lodash/fp/min.js5
-rw-r--r--node_modules/lodash/fp/minBy.js5
-rw-r--r--node_modules/lodash/fp/mixin.js5
-rw-r--r--node_modules/lodash/fp/multiply.js5
-rw-r--r--node_modules/lodash/fp/nAry.js1
-rw-r--r--node_modules/lodash/fp/negate.js5
-rw-r--r--node_modules/lodash/fp/next.js5
-rw-r--r--node_modules/lodash/fp/noop.js5
-rw-r--r--node_modules/lodash/fp/now.js5
-rw-r--r--node_modules/lodash/fp/nth.js5
-rw-r--r--node_modules/lodash/fp/nthArg.js5
-rw-r--r--node_modules/lodash/fp/number.js2
-rw-r--r--node_modules/lodash/fp/object.js2
-rw-r--r--node_modules/lodash/fp/omit.js5
-rw-r--r--node_modules/lodash/fp/omitAll.js1
-rw-r--r--node_modules/lodash/fp/omitBy.js5
-rw-r--r--node_modules/lodash/fp/once.js5
-rw-r--r--node_modules/lodash/fp/orderBy.js5
-rw-r--r--node_modules/lodash/fp/over.js5
-rw-r--r--node_modules/lodash/fp/overArgs.js5
-rw-r--r--node_modules/lodash/fp/overEvery.js5
-rw-r--r--node_modules/lodash/fp/overSome.js5
-rw-r--r--node_modules/lodash/fp/pad.js5
-rw-r--r--node_modules/lodash/fp/padChars.js5
-rw-r--r--node_modules/lodash/fp/padCharsEnd.js5
-rw-r--r--node_modules/lodash/fp/padCharsStart.js5
-rw-r--r--node_modules/lodash/fp/padEnd.js5
-rw-r--r--node_modules/lodash/fp/padStart.js5
-rw-r--r--node_modules/lodash/fp/parseInt.js5
-rw-r--r--node_modules/lodash/fp/partial.js5
-rw-r--r--node_modules/lodash/fp/partialRight.js5
-rw-r--r--node_modules/lodash/fp/partition.js5
-rw-r--r--node_modules/lodash/fp/path.js1
-rw-r--r--node_modules/lodash/fp/pathEq.js1
-rw-r--r--node_modules/lodash/fp/pathOr.js1
-rw-r--r--node_modules/lodash/fp/paths.js1
-rw-r--r--node_modules/lodash/fp/pick.js5
-rw-r--r--node_modules/lodash/fp/pickAll.js1
-rw-r--r--node_modules/lodash/fp/pickBy.js5
-rw-r--r--node_modules/lodash/fp/pipe.js1
-rw-r--r--node_modules/lodash/fp/placeholder.js6
-rw-r--r--node_modules/lodash/fp/plant.js5
-rw-r--r--node_modules/lodash/fp/pluck.js1
-rw-r--r--node_modules/lodash/fp/prop.js1
-rw-r--r--node_modules/lodash/fp/propEq.js1
-rw-r--r--node_modules/lodash/fp/propOr.js1
-rw-r--r--node_modules/lodash/fp/property.js1
-rw-r--r--node_modules/lodash/fp/propertyOf.js5
-rw-r--r--node_modules/lodash/fp/props.js1
-rw-r--r--node_modules/lodash/fp/pull.js5
-rw-r--r--node_modules/lodash/fp/pullAll.js5
-rw-r--r--node_modules/lodash/fp/pullAllBy.js5
-rw-r--r--node_modules/lodash/fp/pullAllWith.js5
-rw-r--r--node_modules/lodash/fp/pullAt.js5
-rw-r--r--node_modules/lodash/fp/random.js5
-rw-r--r--node_modules/lodash/fp/range.js5
-rw-r--r--node_modules/lodash/fp/rangeRight.js5
-rw-r--r--node_modules/lodash/fp/rangeStep.js5
-rw-r--r--node_modules/lodash/fp/rangeStepRight.js5
-rw-r--r--node_modules/lodash/fp/rearg.js5
-rw-r--r--node_modules/lodash/fp/reduce.js5
-rw-r--r--node_modules/lodash/fp/reduceRight.js5
-rw-r--r--node_modules/lodash/fp/reject.js5
-rw-r--r--node_modules/lodash/fp/remove.js5
-rw-r--r--node_modules/lodash/fp/repeat.js5
-rw-r--r--node_modules/lodash/fp/replace.js5
-rw-r--r--node_modules/lodash/fp/rest.js5
-rw-r--r--node_modules/lodash/fp/restFrom.js5
-rw-r--r--node_modules/lodash/fp/result.js5
-rw-r--r--node_modules/lodash/fp/reverse.js5
-rw-r--r--node_modules/lodash/fp/round.js5
-rw-r--r--node_modules/lodash/fp/sample.js5
-rw-r--r--node_modules/lodash/fp/sampleSize.js5
-rw-r--r--node_modules/lodash/fp/seq.js2
-rw-r--r--node_modules/lodash/fp/set.js5
-rw-r--r--node_modules/lodash/fp/setWith.js5
-rw-r--r--node_modules/lodash/fp/shuffle.js5
-rw-r--r--node_modules/lodash/fp/size.js5
-rw-r--r--node_modules/lodash/fp/slice.js5
-rw-r--r--node_modules/lodash/fp/snakeCase.js5
-rw-r--r--node_modules/lodash/fp/some.js5
-rw-r--r--node_modules/lodash/fp/sortBy.js5
-rw-r--r--node_modules/lodash/fp/sortedIndex.js5
-rw-r--r--node_modules/lodash/fp/sortedIndexBy.js5
-rw-r--r--node_modules/lodash/fp/sortedIndexOf.js5
-rw-r--r--node_modules/lodash/fp/sortedLastIndex.js5
-rw-r--r--node_modules/lodash/fp/sortedLastIndexBy.js5
-rw-r--r--node_modules/lodash/fp/sortedLastIndexOf.js5
-rw-r--r--node_modules/lodash/fp/sortedUniq.js5
-rw-r--r--node_modules/lodash/fp/sortedUniqBy.js5
-rw-r--r--node_modules/lodash/fp/split.js5
-rw-r--r--node_modules/lodash/fp/spread.js5
-rw-r--r--node_modules/lodash/fp/spreadFrom.js5
-rw-r--r--node_modules/lodash/fp/startCase.js5
-rw-r--r--node_modules/lodash/fp/startsWith.js5
-rw-r--r--node_modules/lodash/fp/string.js2
-rw-r--r--node_modules/lodash/fp/stubArray.js5
-rw-r--r--node_modules/lodash/fp/stubFalse.js5
-rw-r--r--node_modules/lodash/fp/stubObject.js5
-rw-r--r--node_modules/lodash/fp/stubString.js5
-rw-r--r--node_modules/lodash/fp/stubTrue.js5
-rw-r--r--node_modules/lodash/fp/subtract.js5
-rw-r--r--node_modules/lodash/fp/sum.js5
-rw-r--r--node_modules/lodash/fp/sumBy.js5
-rw-r--r--node_modules/lodash/fp/symmetricDifference.js1
-rw-r--r--node_modules/lodash/fp/symmetricDifferenceBy.js1
-rw-r--r--node_modules/lodash/fp/symmetricDifferenceWith.js1
-rw-r--r--node_modules/lodash/fp/tail.js5
-rw-r--r--node_modules/lodash/fp/take.js5
-rw-r--r--node_modules/lodash/fp/takeLast.js1
-rw-r--r--node_modules/lodash/fp/takeLastWhile.js1
-rw-r--r--node_modules/lodash/fp/takeRight.js5
-rw-r--r--node_modules/lodash/fp/takeRightWhile.js5
-rw-r--r--node_modules/lodash/fp/takeWhile.js5
-rw-r--r--node_modules/lodash/fp/tap.js5
-rw-r--r--node_modules/lodash/fp/template.js5
-rw-r--r--node_modules/lodash/fp/templateSettings.js5
-rw-r--r--node_modules/lodash/fp/throttle.js5
-rw-r--r--node_modules/lodash/fp/thru.js5
-rw-r--r--node_modules/lodash/fp/times.js5
-rw-r--r--node_modules/lodash/fp/toArray.js5
-rw-r--r--node_modules/lodash/fp/toFinite.js5
-rw-r--r--node_modules/lodash/fp/toInteger.js5
-rw-r--r--node_modules/lodash/fp/toIterator.js5
-rw-r--r--node_modules/lodash/fp/toJSON.js5
-rw-r--r--node_modules/lodash/fp/toLength.js5
-rw-r--r--node_modules/lodash/fp/toLower.js5
-rw-r--r--node_modules/lodash/fp/toNumber.js5
-rw-r--r--node_modules/lodash/fp/toPairs.js5
-rw-r--r--node_modules/lodash/fp/toPairsIn.js5
-rw-r--r--node_modules/lodash/fp/toPath.js5
-rw-r--r--node_modules/lodash/fp/toPlainObject.js5
-rw-r--r--node_modules/lodash/fp/toSafeInteger.js5
-rw-r--r--node_modules/lodash/fp/toString.js5
-rw-r--r--node_modules/lodash/fp/toUpper.js5
-rw-r--r--node_modules/lodash/fp/transform.js5
-rw-r--r--node_modules/lodash/fp/trim.js5
-rw-r--r--node_modules/lodash/fp/trimChars.js5
-rw-r--r--node_modules/lodash/fp/trimCharsEnd.js5
-rw-r--r--node_modules/lodash/fp/trimCharsStart.js5
-rw-r--r--node_modules/lodash/fp/trimEnd.js5
-rw-r--r--node_modules/lodash/fp/trimStart.js5
-rw-r--r--node_modules/lodash/fp/truncate.js5
-rw-r--r--node_modules/lodash/fp/unapply.js1
-rw-r--r--node_modules/lodash/fp/unary.js5
-rw-r--r--node_modules/lodash/fp/unescape.js5
-rw-r--r--node_modules/lodash/fp/union.js5
-rw-r--r--node_modules/lodash/fp/unionBy.js5
-rw-r--r--node_modules/lodash/fp/unionWith.js5
-rw-r--r--node_modules/lodash/fp/uniq.js5
-rw-r--r--node_modules/lodash/fp/uniqBy.js5
-rw-r--r--node_modules/lodash/fp/uniqWith.js5
-rw-r--r--node_modules/lodash/fp/uniqueId.js5
-rw-r--r--node_modules/lodash/fp/unnest.js1
-rw-r--r--node_modules/lodash/fp/unset.js5
-rw-r--r--node_modules/lodash/fp/unzip.js5
-rw-r--r--node_modules/lodash/fp/unzipWith.js5
-rw-r--r--node_modules/lodash/fp/update.js5
-rw-r--r--node_modules/lodash/fp/updateWith.js5
-rw-r--r--node_modules/lodash/fp/upperCase.js5
-rw-r--r--node_modules/lodash/fp/upperFirst.js5
-rw-r--r--node_modules/lodash/fp/useWith.js1
-rw-r--r--node_modules/lodash/fp/util.js2
-rw-r--r--node_modules/lodash/fp/value.js5
-rw-r--r--node_modules/lodash/fp/valueOf.js5
-rw-r--r--node_modules/lodash/fp/values.js5
-rw-r--r--node_modules/lodash/fp/valuesIn.js5
-rw-r--r--node_modules/lodash/fp/where.js1
-rw-r--r--node_modules/lodash/fp/whereEq.js1
-rw-r--r--node_modules/lodash/fp/without.js5
-rw-r--r--node_modules/lodash/fp/words.js5
-rw-r--r--node_modules/lodash/fp/wrap.js5
-rw-r--r--node_modules/lodash/fp/wrapperAt.js5
-rw-r--r--node_modules/lodash/fp/wrapperChain.js5
-rw-r--r--node_modules/lodash/fp/wrapperLodash.js5
-rw-r--r--node_modules/lodash/fp/wrapperReverse.js5
-rw-r--r--node_modules/lodash/fp/wrapperValue.js5
-rw-r--r--node_modules/lodash/fp/xor.js5
-rw-r--r--node_modules/lodash/fp/xorBy.js5
-rw-r--r--node_modules/lodash/fp/xorWith.js5
-rw-r--r--node_modules/lodash/fp/zip.js5
-rw-r--r--node_modules/lodash/fp/zipAll.js5
-rw-r--r--node_modules/lodash/fp/zipObj.js1
-rw-r--r--node_modules/lodash/fp/zipObject.js5
-rw-r--r--node_modules/lodash/fp/zipObjectDeep.js5
-rw-r--r--node_modules/lodash/fp/zipWith.js5
-rw-r--r--node_modules/lodash/fromPairs.js28
-rw-r--r--node_modules/lodash/function.js25
-rw-r--r--node_modules/lodash/functions.js31
-rw-r--r--node_modules/lodash/functionsIn.js31
-rw-r--r--node_modules/lodash/get.js33
-rw-r--r--node_modules/lodash/groupBy.js41
-rw-r--r--node_modules/lodash/gt.js29
-rw-r--r--node_modules/lodash/gte.js30
-rw-r--r--node_modules/lodash/has.js35
-rw-r--r--node_modules/lodash/hasIn.js34
-rw-r--r--node_modules/lodash/head.js23
-rw-r--r--node_modules/lodash/identity.js21
-rw-r--r--node_modules/lodash/inRange.js55
-rw-r--r--node_modules/lodash/includes.js53
-rw-r--r--node_modules/lodash/index.js1
-rw-r--r--node_modules/lodash/indexOf.js42
-rw-r--r--node_modules/lodash/initial.js22
-rw-r--r--node_modules/lodash/intersection.js30
-rw-r--r--node_modules/lodash/intersectionBy.js45
-rw-r--r--node_modules/lodash/intersectionWith.js41
-rw-r--r--node_modules/lodash/invert.js42
-rw-r--r--node_modules/lodash/invertBy.js56
-rw-r--r--node_modules/lodash/invoke.js24
-rw-r--r--node_modules/lodash/invokeMap.js41
-rw-r--r--node_modules/lodash/isArguments.js36
-rw-r--r--node_modules/lodash/isArray.js26
-rw-r--r--node_modules/lodash/isArrayBuffer.js27
-rw-r--r--node_modules/lodash/isArrayLike.js33
-rw-r--r--node_modules/lodash/isArrayLikeObject.js33
-rw-r--r--node_modules/lodash/isBoolean.js29
-rw-r--r--node_modules/lodash/isBuffer.js38
-rw-r--r--node_modules/lodash/isDate.js27
-rw-r--r--node_modules/lodash/isElement.js25
-rw-r--r--node_modules/lodash/isEmpty.js77
-rw-r--r--node_modules/lodash/isEqual.js35
-rw-r--r--node_modules/lodash/isEqualWith.js41
-rw-r--r--node_modules/lodash/isError.js36
-rw-r--r--node_modules/lodash/isFinite.js36
-rw-r--r--node_modules/lodash/isFunction.js37
-rw-r--r--node_modules/lodash/isInteger.js33
-rw-r--r--node_modules/lodash/isLength.js35
-rw-r--r--node_modules/lodash/isMap.js27
-rw-r--r--node_modules/lodash/isMatch.js36
-rw-r--r--node_modules/lodash/isMatchWith.js41
-rw-r--r--node_modules/lodash/isNaN.js38
-rw-r--r--node_modules/lodash/isNative.js40
-rw-r--r--node_modules/lodash/isNil.js25
-rw-r--r--node_modules/lodash/isNull.js22
-rw-r--r--node_modules/lodash/isNumber.js38
-rw-r--r--node_modules/lodash/isObject.js31
-rw-r--r--node_modules/lodash/isObjectLike.js29
-rw-r--r--node_modules/lodash/isPlainObject.js62
-rw-r--r--node_modules/lodash/isRegExp.js27
-rw-r--r--node_modules/lodash/isSafeInteger.js37
-rw-r--r--node_modules/lodash/isSet.js27
-rw-r--r--node_modules/lodash/isString.js30
-rw-r--r--node_modules/lodash/isSymbol.js29
-rw-r--r--node_modules/lodash/isTypedArray.js27
-rw-r--r--node_modules/lodash/isUndefined.js22
-rw-r--r--node_modules/lodash/isWeakMap.js28
-rw-r--r--node_modules/lodash/isWeakSet.js28
-rw-r--r--node_modules/lodash/iteratee.js53
-rw-r--r--node_modules/lodash/join.js26
-rw-r--r--node_modules/lodash/kebabCase.js28
-rw-r--r--node_modules/lodash/keyBy.js36
-rw-r--r--node_modules/lodash/keys.js37
-rw-r--r--node_modules/lodash/keysIn.js32
-rw-r--r--node_modules/lodash/lang.js58
-rw-r--r--node_modules/lodash/last.js20
-rw-r--r--node_modules/lodash/lastIndexOf.js46
-rw-r--r--node_modules/lodash/lodash.js17209
-rw-r--r--node_modules/lodash/lodash.min.js140
-rw-r--r--node_modules/lodash/lowerCase.js27
-rw-r--r--node_modules/lodash/lowerFirst.js22
-rw-r--r--node_modules/lodash/lt.js29
-rw-r--r--node_modules/lodash/lte.js30
-rw-r--r--node_modules/lodash/map.js53
-rw-r--r--node_modules/lodash/mapKeys.js36
-rw-r--r--node_modules/lodash/mapValues.js43
-rw-r--r--node_modules/lodash/matches.js46
-rw-r--r--node_modules/lodash/matchesProperty.js44
-rw-r--r--node_modules/lodash/math.js17
-rw-r--r--node_modules/lodash/max.js29
-rw-r--r--node_modules/lodash/maxBy.js34
-rw-r--r--node_modules/lodash/mean.js22
-rw-r--r--node_modules/lodash/meanBy.js31
-rw-r--r--node_modules/lodash/memoize.js73
-rw-r--r--node_modules/lodash/merge.js39
-rw-r--r--node_modules/lodash/mergeWith.js39
-rw-r--r--node_modules/lodash/method.js34
-rw-r--r--node_modules/lodash/methodOf.js33
-rw-r--r--node_modules/lodash/min.js29
-rw-r--r--node_modules/lodash/minBy.js34
-rw-r--r--node_modules/lodash/mixin.js74
-rw-r--r--node_modules/lodash/multiply.js22
-rw-r--r--node_modules/lodash/negate.js40
-rw-r--r--node_modules/lodash/next.js35
-rw-r--r--node_modules/lodash/noop.js17
-rw-r--r--node_modules/lodash/now.js23
-rw-r--r--node_modules/lodash/nth.js29
-rw-r--r--node_modules/lodash/nthArg.js32
-rw-r--r--node_modules/lodash/number.js5
-rw-r--r--node_modules/lodash/object.js49
-rw-r--r--node_modules/lodash/omit.js57
-rw-r--r--node_modules/lodash/omitBy.js29
-rw-r--r--node_modules/lodash/once.js25
-rw-r--r--node_modules/lodash/orderBy.js47
-rw-r--r--node_modules/lodash/over.js24
-rw-r--r--node_modules/lodash/overArgs.js61
-rw-r--r--node_modules/lodash/overEvery.js34
-rw-r--r--node_modules/lodash/overSome.js37
-rw-r--r--node_modules/lodash/package.json17
-rw-r--r--node_modules/lodash/pad.js49
-rw-r--r--node_modules/lodash/padEnd.js39
-rw-r--r--node_modules/lodash/padStart.js39
-rw-r--r--node_modules/lodash/parseInt.js43
-rw-r--r--node_modules/lodash/partial.js50
-rw-r--r--node_modules/lodash/partialRight.js49
-rw-r--r--node_modules/lodash/partition.js43
-rw-r--r--node_modules/lodash/pick.js25
-rw-r--r--node_modules/lodash/pickBy.js37
-rw-r--r--node_modules/lodash/plant.js48
-rw-r--r--node_modules/lodash/property.js32
-rw-r--r--node_modules/lodash/propertyOf.js30
-rw-r--r--node_modules/lodash/pull.js29
-rw-r--r--node_modules/lodash/pullAll.js29
-rw-r--r--node_modules/lodash/pullAllBy.js33
-rw-r--r--node_modules/lodash/pullAllWith.js32
-rw-r--r--node_modules/lodash/pullAt.js43
-rw-r--r--node_modules/lodash/random.js82
-rw-r--r--node_modules/lodash/range.js46
-rw-r--r--node_modules/lodash/rangeRight.js41
-rw-r--r--node_modules/lodash/rearg.js33
-rw-r--r--node_modules/lodash/reduce.js51
-rw-r--r--node_modules/lodash/reduceRight.js36
-rw-r--r--node_modules/lodash/reject.js46
-rw-r--r--node_modules/lodash/release.md48
-rw-r--r--node_modules/lodash/remove.js53
-rw-r--r--node_modules/lodash/repeat.js37
-rw-r--r--node_modules/lodash/replace.js29
-rw-r--r--node_modules/lodash/rest.js40
-rw-r--r--node_modules/lodash/result.js56
-rw-r--r--node_modules/lodash/reverse.js34
-rw-r--r--node_modules/lodash/round.js26
-rw-r--r--node_modules/lodash/sample.js24
-rw-r--r--node_modules/lodash/sampleSize.js37
-rw-r--r--node_modules/lodash/seq.js16
-rw-r--r--node_modules/lodash/set.js35
-rw-r--r--node_modules/lodash/setWith.js32
-rw-r--r--node_modules/lodash/shuffle.js25
-rw-r--r--node_modules/lodash/size.js46
-rw-r--r--node_modules/lodash/slice.js37
-rw-r--r--node_modules/lodash/snakeCase.js28
-rw-r--r--node_modules/lodash/some.js51
-rw-r--r--node_modules/lodash/sortBy.js48
-rw-r--r--node_modules/lodash/sortedIndex.js24
-rw-r--r--node_modules/lodash/sortedIndexBy.js33
-rw-r--r--node_modules/lodash/sortedIndexOf.js31
-rw-r--r--node_modules/lodash/sortedLastIndex.js25
-rw-r--r--node_modules/lodash/sortedLastIndexBy.js33
-rw-r--r--node_modules/lodash/sortedLastIndexOf.js31
-rw-r--r--node_modules/lodash/sortedUniq.js24
-rw-r--r--node_modules/lodash/sortedUniqBy.js26
-rw-r--r--node_modules/lodash/split.js52
-rw-r--r--node_modules/lodash/spread.js63
-rw-r--r--node_modules/lodash/startCase.js29
-rw-r--r--node_modules/lodash/startsWith.js39
-rw-r--r--node_modules/lodash/string.js33
-rw-r--r--node_modules/lodash/stubArray.js23
-rw-r--r--node_modules/lodash/stubFalse.js18
-rw-r--r--node_modules/lodash/stubObject.js23
-rw-r--r--node_modules/lodash/stubString.js18
-rw-r--r--node_modules/lodash/stubTrue.js18
-rw-r--r--node_modules/lodash/subtract.js22
-rw-r--r--node_modules/lodash/sum.js24
-rw-r--r--node_modules/lodash/sumBy.js33
-rw-r--r--node_modules/lodash/tail.js22
-rw-r--r--node_modules/lodash/take.js37
-rw-r--r--node_modules/lodash/takeRight.js39
-rw-r--r--node_modules/lodash/takeRightWhile.js45
-rw-r--r--node_modules/lodash/takeWhile.js45
-rw-r--r--node_modules/lodash/tap.js29
-rw-r--r--node_modules/lodash/template.js272
-rw-r--r--node_modules/lodash/templateSettings.js67
-rw-r--r--node_modules/lodash/throttle.js69
-rw-r--r--node_modules/lodash/thru.js28
-rw-r--r--node_modules/lodash/times.js51
-rw-r--r--node_modules/lodash/toArray.js58
-rw-r--r--node_modules/lodash/toFinite.js42
-rw-r--r--node_modules/lodash/toInteger.js36
-rw-r--r--node_modules/lodash/toIterator.js23
-rw-r--r--node_modules/lodash/toJSON.js1
-rw-r--r--node_modules/lodash/toLength.js38
-rw-r--r--node_modules/lodash/toLower.js28
-rw-r--r--node_modules/lodash/toNumber.js64
-rw-r--r--node_modules/lodash/toPairs.js30
-rw-r--r--node_modules/lodash/toPairsIn.js30
-rw-r--r--node_modules/lodash/toPath.js33
-rw-r--r--node_modules/lodash/toPlainObject.js32
-rw-r--r--node_modules/lodash/toSafeInteger.js37
-rw-r--r--node_modules/lodash/toString.js28
-rw-r--r--node_modules/lodash/toUpper.js28
-rw-r--r--node_modules/lodash/transform.js65
-rw-r--r--node_modules/lodash/trim.js47
-rw-r--r--node_modules/lodash/trimEnd.js41
-rw-r--r--node_modules/lodash/trimStart.js43
-rw-r--r--node_modules/lodash/truncate.js111
-rw-r--r--node_modules/lodash/unary.js22
-rw-r--r--node_modules/lodash/unescape.js34
-rw-r--r--node_modules/lodash/union.js26
-rw-r--r--node_modules/lodash/unionBy.js39
-rw-r--r--node_modules/lodash/unionWith.js34
-rw-r--r--node_modules/lodash/uniq.js25
-rw-r--r--node_modules/lodash/uniqBy.js31
-rw-r--r--node_modules/lodash/uniqWith.js28
-rw-r--r--node_modules/lodash/uniqueId.js28
-rw-r--r--node_modules/lodash/unset.js34
-rw-r--r--node_modules/lodash/unzip.js45
-rw-r--r--node_modules/lodash/unzipWith.js39
-rw-r--r--node_modules/lodash/update.js35
-rw-r--r--node_modules/lodash/updateWith.js33
-rw-r--r--node_modules/lodash/upperCase.js27
-rw-r--r--node_modules/lodash/upperFirst.js22
-rw-r--r--node_modules/lodash/util.js34
-rw-r--r--node_modules/lodash/value.js1
-rw-r--r--node_modules/lodash/valueOf.js1
-rw-r--r--node_modules/lodash/values.js34
-rw-r--r--node_modules/lodash/valuesIn.js32
-rw-r--r--node_modules/lodash/without.js31
-rw-r--r--node_modules/lodash/words.js35
-rw-r--r--node_modules/lodash/wrap.js30
-rw-r--r--node_modules/lodash/wrapperAt.js48
-rw-r--r--node_modules/lodash/wrapperChain.js34
-rw-r--r--node_modules/lodash/wrapperLodash.js147
-rw-r--r--node_modules/lodash/wrapperReverse.js44
-rw-r--r--node_modules/lodash/wrapperValue.js21
-rw-r--r--node_modules/lodash/xor.js28
-rw-r--r--node_modules/lodash/xorBy.js39
-rw-r--r--node_modules/lodash/xorWith.js34
-rw-r--r--node_modules/lodash/zip.js22
-rw-r--r--node_modules/lodash/zipObject.js24
-rw-r--r--node_modules/lodash/zipObjectDeep.js23
-rw-r--r--node_modules/lodash/zipWith.js32
-rw-r--r--node_modules/loud-rejection/api.js11
-rw-r--r--node_modules/loud-rejection/index.js36
-rw-r--r--node_modules/loud-rejection/license21
-rw-r--r--node_modules/loud-rejection/package.json59
-rw-r--r--node_modules/loud-rejection/readme.md68
-rw-r--r--node_modules/loud-rejection/register.js2
-rw-r--r--node_modules/lowercase-keys/index.d.ts16
-rw-r--r--node_modules/lowercase-keys/index.js10
-rw-r--r--node_modules/lowercase-keys/license9
-rw-r--r--node_modules/lowercase-keys/package.json38
-rw-r--r--node_modules/lowercase-keys/readme.md32
-rw-r--r--node_modules/lru-cache/LICENSE15
-rw-r--r--node_modules/lru-cache/README.md166
-rw-r--r--node_modules/lru-cache/index.js334
-rw-r--r--node_modules/lru-cache/package.json34
-rw-r--r--node_modules/map-obj/index.js13
-rw-r--r--node_modules/map-obj/license21
-rw-r--r--node_modules/map-obj/package.json36
-rw-r--r--node_modules/map-obj/readme.md29
-rw-r--r--node_modules/matcher/index.d.ts85
-rw-r--r--node_modules/matcher/index.js77
-rw-r--r--node_modules/matcher/license9
-rw-r--r--node_modules/matcher/package.json54
-rw-r--r--node_modules/matcher/readme.md120
-rw-r--r--node_modules/meow/index.js82
-rw-r--r--node_modules/meow/license21
-rw-r--r--node_modules/meow/package.json58
-rw-r--r--node_modules/meow/readme.md159
-rw-r--r--node_modules/mime-db/HISTORY.md458
-rw-r--r--node_modules/mime-db/LICENSE22
-rw-r--r--node_modules/mime-db/README.md102
-rw-r--r--node_modules/mime-db/db.json8242
-rw-r--r--node_modules/mime-db/index.js11
-rw-r--r--node_modules/mime-db/package.json59
-rw-r--r--node_modules/mime-types/HISTORY.md346
-rw-r--r--node_modules/mime-types/LICENSE23
-rw-r--r--node_modules/mime-types/README.md123
-rw-r--r--node_modules/mime-types/index.js188
-rw-r--r--node_modules/mime-types/package.json44
-rw-r--r--node_modules/mimic-response/index.js32
-rw-r--r--node_modules/mimic-response/license9
-rw-r--r--node_modules/mimic-response/package.json37
-rw-r--r--node_modules/mimic-response/readme.md54
-rw-r--r--node_modules/minimatch/LICENSE15
-rw-r--r--node_modules/minimatch/README.md230
-rw-r--r--node_modules/minimatch/minimatch.js947
-rw-r--r--node_modules/minimatch/package.json33
-rw-r--r--node_modules/minimist/.travis.yml8
-rw-r--r--node_modules/minimist/LICENSE18
-rw-r--r--node_modules/minimist/example/parse.js2
-rw-r--r--node_modules/minimist/index.js245
-rw-r--r--node_modules/minimist/package.json45
-rw-r--r--node_modules/minimist/readme.markdown95
-rw-r--r--node_modules/minimist/test/all_bool.js32
-rw-r--r--node_modules/minimist/test/bool.js178
-rw-r--r--node_modules/minimist/test/dash.js31
-rw-r--r--node_modules/minimist/test/default_bool.js35
-rw-r--r--node_modules/minimist/test/dotted.js22
-rw-r--r--node_modules/minimist/test/kv_short.js16
-rw-r--r--node_modules/minimist/test/long.js31
-rw-r--r--node_modules/minimist/test/num.js36
-rw-r--r--node_modules/minimist/test/parse.js197
-rw-r--r--node_modules/minimist/test/parse_modified.js9
-rw-r--r--node_modules/minimist/test/proto.js44
-rw-r--r--node_modules/minimist/test/short.js67
-rw-r--r--node_modules/minimist/test/stop_early.js15
-rw-r--r--node_modules/minimist/test/unknown.js102
-rw-r--r--node_modules/minimist/test/whitespace.js8
-rw-r--r--node_modules/mkdirp/LICENSE21
-rwxr-xr-xnode_modules/mkdirp/bin/cmd.js33
-rw-r--r--node_modules/mkdirp/bin/usage.txt12
-rw-r--r--node_modules/mkdirp/index.js99
-rw-r--r--node_modules/mkdirp/package.json34
-rw-r--r--node_modules/mkdirp/readme.markdown100
-rw-r--r--node_modules/ms/index.js162
-rw-r--r--node_modules/ms/license.md21
-rw-r--r--node_modules/ms/package.json38
-rw-r--r--node_modules/ms/readme.md59
-rw-r--r--node_modules/normalize-package-data/AUTHORS4
-rw-r--r--node_modules/normalize-package-data/LICENSE30
-rw-r--r--node_modules/normalize-package-data/README.md106
-rw-r--r--node_modules/normalize-package-data/lib/extract_description.js14
-rw-r--r--node_modules/normalize-package-data/lib/fixer.js418
-rw-r--r--node_modules/normalize-package-data/lib/make_warning.js23
-rw-r--r--node_modules/normalize-package-data/lib/normalize.js39
-rw-r--r--node_modules/normalize-package-data/lib/safe_format.js9
-rw-r--r--node_modules/normalize-package-data/lib/typos.json25
-rw-r--r--node_modules/normalize-package-data/lib/warning_messages.json30
-rw-r--r--node_modules/normalize-package-data/package.json31
-rw-r--r--node_modules/normalize-url/index.d.ts267
-rw-r--r--node_modules/normalize-url/index.js216
-rw-r--r--node_modules/normalize-url/license9
-rw-r--r--node_modules/normalize-url/package.json50
-rw-r--r--node_modules/normalize-url/readme.md286
-rw-r--r--node_modules/npm-conf/index.js43
-rw-r--r--node_modules/npm-conf/lib/conf.js174
-rw-r--r--node_modules/npm-conf/lib/defaults.js169
-rw-r--r--node_modules/npm-conf/lib/make.js91
-rw-r--r--node_modules/npm-conf/lib/types.js127
-rw-r--r--node_modules/npm-conf/lib/util.js147
-rw-r--r--node_modules/npm-conf/license9
-rw-r--r--node_modules/npm-conf/node_modules/pify/index.js84
-rw-r--r--node_modules/npm-conf/node_modules/pify/license9
-rw-r--r--node_modules/npm-conf/node_modules/pify/package.json51
-rw-r--r--node_modules/npm-conf/node_modules/pify/readme.md131
-rw-r--r--node_modules/npm-conf/package.json50
-rw-r--r--node_modules/npm-conf/readme.md47
-rw-r--r--node_modules/nugget/.npmignore2
-rw-r--r--node_modules/nugget/.travis.yml3
-rwxr-xr-xnode_modules/nugget/bin.js32
-rw-r--r--node_modules/nugget/collaborators.md9
-rw-r--r--node_modules/nugget/index.js203
-rw-r--r--node_modules/nugget/multiple.pngbin0 -> 29002 bytes
-rw-r--r--node_modules/nugget/node_modules/debug/.coveralls.yml1
-rw-r--r--node_modules/nugget/node_modules/debug/.eslintrc11
-rw-r--r--node_modules/nugget/node_modules/debug/.npmignore9
-rw-r--r--node_modules/nugget/node_modules/debug/.travis.yml14
-rw-r--r--node_modules/nugget/node_modules/debug/CHANGELOG.md362
-rw-r--r--node_modules/nugget/node_modules/debug/LICENSE19
-rw-r--r--node_modules/nugget/node_modules/debug/Makefile50
-rw-r--r--node_modules/nugget/node_modules/debug/README.md312
-rw-r--r--node_modules/nugget/node_modules/debug/component.json19
-rw-r--r--node_modules/nugget/node_modules/debug/karma.conf.js70
-rw-r--r--node_modules/nugget/node_modules/debug/node.js1
-rw-r--r--node_modules/nugget/node_modules/debug/package.json49
-rw-r--r--node_modules/nugget/node_modules/debug/src/browser.js185
-rw-r--r--node_modules/nugget/node_modules/debug/src/debug.js202
-rw-r--r--node_modules/nugget/node_modules/debug/src/index.js10
-rw-r--r--node_modules/nugget/node_modules/debug/src/inspector-log.js15
-rw-r--r--node_modules/nugget/node_modules/debug/src/node.js248
-rw-r--r--node_modules/nugget/node_modules/ms/index.js152
-rw-r--r--node_modules/nugget/node_modules/ms/license.md21
-rw-r--r--node_modules/nugget/node_modules/ms/package.json37
-rw-r--r--node_modules/nugget/node_modules/ms/readme.md51
-rw-r--r--node_modules/nugget/package.json39
-rw-r--r--node_modules/nugget/readme.md58
-rw-r--r--node_modules/nugget/test/cli.js11
-rw-r--r--node_modules/nugget/test/resume.html1
-rw-r--r--node_modules/nugget/test/resume.js41
-rw-r--r--node_modules/nugget/test/test.js38
-rw-r--r--node_modules/nugget/usage.txt8
-rw-r--r--node_modules/number-is-nan/index.js4
-rw-r--r--node_modules/number-is-nan/license21
-rw-r--r--node_modules/number-is-nan/package.json35
-rw-r--r--node_modules/number-is-nan/readme.md28
-rw-r--r--node_modules/oauth-sign/LICENSE55
-rw-r--r--node_modules/oauth-sign/README.md11
-rw-r--r--node_modules/oauth-sign/index.js146
-rw-r--r--node_modules/oauth-sign/package.json23
-rw-r--r--node_modules/object-assign/index.js90
-rw-r--r--node_modules/object-assign/license21
-rw-r--r--node_modules/object-assign/package.json42
-rw-r--r--node_modules/object-assign/readme.md61
-rw-r--r--node_modules/object-keys/.npmignore1
-rw-r--r--node_modules/object-keys/.travis.yml5
-rw-r--r--node_modules/object-keys/README.md39
-rw-r--r--node_modules/object-keys/foreach.js40
-rw-r--r--node_modules/object-keys/index.js2
-rw-r--r--node_modules/object-keys/isArguments.js16
-rw-r--r--node_modules/object-keys/package.json48
-rw-r--r--node_modules/object-keys/shim.js62
-rw-r--r--node_modules/object-keys/test/foreach.js156
-rw-r--r--node_modules/object-keys/test/index.js6
-rw-r--r--node_modules/object-keys/test/isArguments.js10
-rw-r--r--node_modules/object-keys/test/shim.js134
-rw-r--r--node_modules/once/LICENSE15
-rw-r--r--node_modules/once/README.md79
-rw-r--r--node_modules/once/once.js42
-rw-r--r--node_modules/once/package.json33
-rw-r--r--node_modules/p-cancelable/index.d.ts176
-rw-r--r--node_modules/p-cancelable/index.js111
-rw-r--r--node_modules/p-cancelable/license9
-rw-r--r--node_modules/p-cancelable/package.json49
-rw-r--r--node_modules/p-cancelable/readme.md153
-rw-r--r--node_modules/p-limit/index.js42
-rw-r--r--node_modules/p-limit/license9
-rw-r--r--node_modules/p-limit/package.json49
-rw-r--r--node_modules/p-limit/readme.md69
-rw-r--r--node_modules/p-locate/index.js31
-rw-r--r--node_modules/p-locate/license21
-rw-r--r--node_modules/p-locate/package.json54
-rw-r--r--node_modules/p-locate/readme.md86
-rw-r--r--node_modules/p-try/index.js4
-rw-r--r--node_modules/p-try/license21
-rw-r--r--node_modules/p-try/package.json43
-rw-r--r--node_modules/p-try/readme.md38
-rw-r--r--node_modules/parse-author/LICENSE21
-rw-r--r--node_modules/parse-author/README.md115
-rw-r--r--node_modules/parse-author/index.js43
-rw-r--r--node_modules/parse-author/package.json78
-rw-r--r--node_modules/parse-json/index.js35
-rw-r--r--node_modules/parse-json/license21
-rw-r--r--node_modules/parse-json/package.json46
-rw-r--r--node_modules/parse-json/readme.md83
-rw-r--r--node_modules/parse-json/vendor/parse.js752
-rw-r--r--node_modules/parse-json/vendor/unicode.js71
-rw-r--r--node_modules/path-exists/index.js17
-rw-r--r--node_modules/path-exists/license21
-rw-r--r--node_modules/path-exists/package.json40
-rw-r--r--node_modules/path-exists/readme.md50
-rw-r--r--node_modules/path-is-absolute/index.js20
-rw-r--r--node_modules/path-is-absolute/license21
-rw-r--r--node_modules/path-is-absolute/package.json43
-rw-r--r--node_modules/path-is-absolute/readme.md59
-rw-r--r--node_modules/path-key/index.d.ts40
-rw-r--r--node_modules/path-key/index.js16
-rw-r--r--node_modules/path-key/license9
-rw-r--r--node_modules/path-key/package.json39
-rw-r--r--node_modules/path-key/readme.md61
-rw-r--r--node_modules/path-parse/.travis.yml9
-rw-r--r--node_modules/path-parse/LICENSE21
-rw-r--r--node_modules/path-parse/README.md42
-rw-r--r--node_modules/path-parse/index.js93
-rw-r--r--node_modules/path-parse/package.json33
-rw-r--r--node_modules/path-parse/test.js77
-rw-r--r--node_modules/path-type/index.js29
-rw-r--r--node_modules/path-type/license21
-rw-r--r--node_modules/path-type/package.json52
-rw-r--r--node_modules/path-type/readme.md42
-rw-r--r--node_modules/pend/LICENSE23
-rw-r--r--node_modules/pend/README.md41
-rw-r--r--node_modules/pend/index.js55
-rw-r--r--node_modules/pend/package.json18
-rw-r--r--node_modules/pend/test.js137
-rw-r--r--node_modules/performance-now/.npmignore1
-rw-r--r--node_modules/performance-now/.tm_properties7
-rw-r--r--node_modules/performance-now/.travis.yml6
-rw-r--r--node_modules/performance-now/README.md30
-rw-r--r--node_modules/performance-now/lib/performance-now.js36
-rw-r--r--node_modules/performance-now/lib/performance-now.js.map10
-rw-r--r--node_modules/performance-now/license.txt7
-rw-r--r--node_modules/performance-now/package.json35
-rw-r--r--node_modules/performance-now/src/index.d.ts8
-rw-r--r--node_modules/performance-now/src/performance-now.coffee17
-rw-r--r--node_modules/performance-now/test/mocha.opts3
-rw-r--r--node_modules/performance-now/test/performance-now.coffee43
-rw-r--r--node_modules/performance-now/test/scripts.coffee27
-rwxr-xr-xnode_modules/performance-now/test/scripts/delayed-call.coffee11
-rwxr-xr-xnode_modules/performance-now/test/scripts/delayed-require.coffee12
-rwxr-xr-xnode_modules/performance-now/test/scripts/difference.coffee6
-rwxr-xr-xnode_modules/performance-now/test/scripts/initial-value.coffee10
-rw-r--r--node_modules/pify/index.js68
-rw-r--r--node_modules/pify/license21
-rw-r--r--node_modules/pify/package.json48
-rw-r--r--node_modules/pify/readme.md119
-rw-r--r--node_modules/pinkie-promise/index.js3
-rw-r--r--node_modules/pinkie-promise/license21
-rw-r--r--node_modules/pinkie-promise/package.json35
-rw-r--r--node_modules/pinkie-promise/readme.md28
-rw-r--r--node_modules/pinkie/index.js292
-rw-r--r--node_modules/pinkie/license21
-rw-r--r--node_modules/pinkie/package.json36
-rw-r--r--node_modules/pinkie/readme.md83
-rw-r--r--node_modules/plist/.github/workflows/ci.yml24
-rw-r--r--node_modules/plist/.jshintrc4
-rw-r--r--node_modules/plist/.travis.yml22
-rw-r--r--node_modules/plist/History.md191
-rw-r--r--node_modules/plist/LICENSE24
-rw-r--r--node_modules/plist/Makefile75
-rw-r--r--node_modules/plist/README.md146
-rw-r--r--node_modules/plist/dist/plist-build.js5345
-rw-r--r--node_modules/plist/dist/plist-parse.js4682
-rw-r--r--node_modules/plist/dist/plist.js9888
-rw-r--r--node_modules/plist/examples/browser/index.html14
-rw-r--r--node_modules/plist/index.js13
-rw-r--r--node_modules/plist/lib/build.js140
-rw-r--r--node_modules/plist/lib/parse.js227
-rw-r--r--node_modules/plist/lib/xmldom/dom-parser.js253
-rw-r--r--node_modules/plist/lib/xmldom/dom.js1283
-rw-r--r--node_modules/plist/lib/xmldom/entities.js243
-rw-r--r--node_modules/plist/lib/xmldom/sax.js642
-rw-r--r--node_modules/plist/package.json43
-rwxr-xr-xnode_modules/pretty-bytes/cli.js32
-rw-r--r--node_modules/pretty-bytes/license21
-rw-r--r--node_modules/pretty-bytes/package.json49
-rw-r--r--node_modules/pretty-bytes/pretty-bytes.js46
-rw-r--r--node_modules/pretty-bytes/readme.md60
-rw-r--r--node_modules/process-nextick-args/index.js45
-rw-r--r--node_modules/process-nextick-args/license.md19
-rw-r--r--node_modules/process-nextick-args/package.json25
-rw-r--r--node_modules/process-nextick-args/readme.md18
-rw-r--r--node_modules/progress-stream/.npmignore2
-rw-r--r--node_modules/progress-stream/LICENSE23
-rw-r--r--node_modules/progress-stream/README.md163
-rw-r--r--node_modules/progress-stream/index.js98
-rw-r--r--node_modules/progress-stream/package.json36
-rw-r--r--node_modules/progress-stream/test/http.js30
-rw-r--r--node_modules/progress-stream/test/request.js20
-rw-r--r--node_modules/progress/CHANGELOG.md115
-rw-r--r--node_modules/progress/LICENSE22
-rw-r--r--node_modules/progress/Makefile8
-rw-r--r--node_modules/progress/Readme.md146
-rw-r--r--node_modules/progress/index.js1
-rw-r--r--node_modules/progress/lib/node-progress.js236
-rw-r--r--node_modules/progress/package.json26
-rw-r--r--node_modules/proto-list/LICENSE15
-rw-r--r--node_modules/proto-list/README.md3
-rw-r--r--node_modules/proto-list/package.json18
-rw-r--r--node_modules/proto-list/proto-list.js88
-rw-r--r--node_modules/proto-list/test/basic.js61
-rw-r--r--node_modules/psl/LICENSE9
-rw-r--r--node_modules/psl/README.md215
-rw-r--r--node_modules/psl/browserstack-logo.svg90
-rw-r--r--node_modules/psl/data/rules.json8834
-rw-r--r--node_modules/psl/dist/psl.js9645
-rw-r--r--node_modules/psl/dist/psl.min.js1
-rw-r--r--node_modules/psl/index.js269
-rw-r--r--node_modules/psl/package.json44
-rw-r--r--node_modules/pump/.travis.yml5
-rw-r--r--node_modules/pump/LICENSE21
-rw-r--r--node_modules/pump/README.md65
-rw-r--r--node_modules/pump/index.js82
-rw-r--r--node_modules/pump/package.json24
-rw-r--r--node_modules/pump/test-browser.js66
-rw-r--r--node_modules/pump/test-node.js53
-rw-r--r--node_modules/punycode/LICENSE-MIT.txt20
-rw-r--r--node_modules/punycode/README.md122
-rw-r--r--node_modules/punycode/package.json58
-rw-r--r--node_modules/punycode/punycode.es6.js441
-rw-r--r--node_modules/punycode/punycode.js440
-rw-r--r--node_modules/qs/.editorconfig30
-rw-r--r--node_modules/qs/.eslintignore1
-rw-r--r--node_modules/qs/.eslintrc19
-rw-r--r--node_modules/qs/CHANGELOG.md226
-rw-r--r--node_modules/qs/LICENSE28
-rw-r--r--node_modules/qs/README.md475
-rw-r--r--node_modules/qs/dist/qs.js638
-rw-r--r--node_modules/qs/lib/formats.js18
-rw-r--r--node_modules/qs/lib/index.js11
-rw-r--r--node_modules/qs/lib/parse.js174
-rw-r--r--node_modules/qs/lib/stringify.js210
-rw-r--r--node_modules/qs/lib/utils.js213
-rw-r--r--node_modules/qs/package.json52
-rw-r--r--node_modules/qs/test/.eslintrc15
-rw-r--r--node_modules/qs/test/index.js7
-rw-r--r--node_modules/qs/test/parse.js574
-rw-r--r--node_modules/qs/test/stringify.js597
-rw-r--r--node_modules/qs/test/utils.js34
-rw-r--r--node_modules/quick-lru/index.d.ts97
-rw-r--r--node_modules/quick-lru/index.js123
-rw-r--r--node_modules/quick-lru/license9
-rw-r--r--node_modules/quick-lru/package.json43
-rw-r--r--node_modules/quick-lru/readme.md111
-rw-r--r--node_modules/rc/LICENSE.APACHE215
-rw-r--r--node_modules/rc/LICENSE.BSD26
-rw-r--r--node_modules/rc/LICENSE.MIT24
-rw-r--r--node_modules/rc/README.md227
-rw-r--r--node_modules/rc/browser.js7
-rwxr-xr-xnode_modules/rc/cli.js4
-rwxr-xr-xnode_modules/rc/index.js53
-rw-r--r--node_modules/rc/lib/utils.js104
-rw-r--r--node_modules/rc/package.json29
-rw-r--r--node_modules/rc/test/ini.js16
-rw-r--r--node_modules/rc/test/nested-env-vars.js50
-rw-r--r--node_modules/rc/test/test.js59
-rw-r--r--node_modules/rcedit/.circleci/config.yml127
-rw-r--r--node_modules/rcedit/.releaserc.json8
-rw-r--r--node_modules/rcedit/CONTRIBUTING.md18
-rw-r--r--node_modules/rcedit/LICENSE20
-rw-r--r--node_modules/rcedit/README.md43
-rw-r--r--node_modules/rcedit/SUPPORT.md9
-rwxr-xr-xnode_modules/rcedit/bin/rcedit-x64.exebin0 -> 1326592 bytes
-rwxr-xr-xnode_modules/rcedit/bin/rcedit.exebin0 -> 955904 bytes
-rw-r--r--node_modules/rcedit/lib/index.d.ts68
-rw-r--r--node_modules/rcedit/lib/rcedit.js43
-rw-r--r--node_modules/rcedit/package.json46
-rw-r--r--node_modules/rcedit/tsconfig.eslint.json14
-rw-r--r--node_modules/read-pkg-up/index.js31
-rw-r--r--node_modules/read-pkg-up/license21
-rw-r--r--node_modules/read-pkg-up/package.json59
-rw-r--r--node_modules/read-pkg-up/readme.md79
-rw-r--r--node_modules/read-pkg/index.js48
-rw-r--r--node_modules/read-pkg/license21
-rw-r--r--node_modules/read-pkg/package.json42
-rw-r--r--node_modules/read-pkg/readme.md79
-rw-r--r--node_modules/readable-stream/.npmignore5
-rw-r--r--node_modules/readable-stream/LICENSE18
-rw-r--r--node_modules/readable-stream/README.md15
-rw-r--r--node_modules/readable-stream/duplex.js1
-rw-r--r--node_modules/readable-stream/float.patch923
-rw-r--r--node_modules/readable-stream/lib/_stream_duplex.js89
-rw-r--r--node_modules/readable-stream/lib/_stream_passthrough.js46
-rw-r--r--node_modules/readable-stream/lib/_stream_readable.js951
-rw-r--r--node_modules/readable-stream/lib/_stream_transform.js209
-rw-r--r--node_modules/readable-stream/lib/_stream_writable.js477
-rw-r--r--node_modules/readable-stream/package.json32
-rw-r--r--node_modules/readable-stream/passthrough.js1
-rw-r--r--node_modules/readable-stream/readable.js10
-rw-r--r--node_modules/readable-stream/transform.js1
-rw-r--r--node_modules/readable-stream/writable.js1
-rw-r--r--node_modules/redent/index.js7
-rw-r--r--node_modules/redent/license21
-rw-r--r--node_modules/redent/package.json43
-rw-r--r--node_modules/redent/readme.md48
-rw-r--r--node_modules/repeating/index.js24
-rw-r--r--node_modules/repeating/license21
-rw-r--r--node_modules/repeating/package.json37
-rw-r--r--node_modules/repeating/readme.md30
-rw-r--r--node_modules/request/CHANGELOG.md717
-rw-r--r--node_modules/request/LICENSE55
-rw-r--r--node_modules/request/README.md1133
-rwxr-xr-xnode_modules/request/index.js155
-rw-r--r--node_modules/request/lib/auth.js167
-rw-r--r--node_modules/request/lib/cookies.js38
-rw-r--r--node_modules/request/lib/getProxyFromURI.js79
-rw-r--r--node_modules/request/lib/har.js205
-rw-r--r--node_modules/request/lib/hawk.js89
-rw-r--r--node_modules/request/lib/helpers.js66
-rw-r--r--node_modules/request/lib/multipart.js112
-rw-r--r--node_modules/request/lib/oauth.js148
-rw-r--r--node_modules/request/lib/querystring.js50
-rw-r--r--node_modules/request/lib/redirect.js154
-rw-r--r--node_modules/request/lib/tunnel.js175
-rw-r--r--node_modules/request/package.json86
-rw-r--r--node_modules/request/request.js1553
-rw-r--r--node_modules/resolve-alpn/LICENSE22
-rw-r--r--node_modules/resolve-alpn/README.md60
-rw-r--r--node_modules/resolve-alpn/index.js43
-rw-r--r--node_modules/resolve-alpn/package.json34
-rw-r--r--node_modules/resolve/.editorconfig34
-rw-r--r--node_modules/resolve/.eslintignore1
-rw-r--r--node_modules/resolve/.eslintrc39
-rw-r--r--node_modules/resolve/.github/workflows/node-4+.yml54
-rw-r--r--node_modules/resolve/.github/workflows/node-iojs.yml55
-rw-r--r--node_modules/resolve/.github/workflows/node-pretest.yml27
-rw-r--r--node_modules/resolve/.github/workflows/node-zero.yml55
-rw-r--r--node_modules/resolve/.github/workflows/rebase.yml15
-rw-r--r--node_modules/resolve/.github/workflows/require-allow-edits.yml14
-rw-r--r--node_modules/resolve/LICENSE21
-rw-r--r--node_modules/resolve/appveyor.yml74
-rw-r--r--node_modules/resolve/example/async.js5
-rw-r--r--node_modules/resolve/example/sync.js3
-rw-r--r--node_modules/resolve/index.js6
-rw-r--r--node_modules/resolve/lib/async.js299
-rw-r--r--node_modules/resolve/lib/caller.js8
-rw-r--r--node_modules/resolve/lib/core.js53
-rw-r--r--node_modules/resolve/lib/core.json80
-rw-r--r--node_modules/resolve/lib/is-core.js5
-rw-r--r--node_modules/resolve/lib/node-modules-paths.js42
-rw-r--r--node_modules/resolve/lib/normalize-options.js10
-rw-r--r--node_modules/resolve/lib/sync.js192
-rw-r--r--node_modules/resolve/package.json51
-rw-r--r--node_modules/resolve/readme.markdown250
-rw-r--r--node_modules/resolve/test/.eslintrc5
-rw-r--r--node_modules/resolve/test/core.js81
-rw-r--r--node_modules/resolve/test/dotdot.js29
-rw-r--r--node_modules/resolve/test/dotdot/abc/index.js2
-rw-r--r--node_modules/resolve/test/dotdot/index.js1
-rw-r--r--node_modules/resolve/test/faulty_basedir.js29
-rw-r--r--node_modules/resolve/test/filter.js34
-rw-r--r--node_modules/resolve/test/filter_sync.js33
-rw-r--r--node_modules/resolve/test/mock.js239
-rw-r--r--node_modules/resolve/test/mock_sync.js141
-rw-r--r--node_modules/resolve/test/module_dir.js56
-rw-r--r--node_modules/resolve/test/module_dir/xmodules/aaa/index.js1
-rw-r--r--node_modules/resolve/test/module_dir/ymodules/aaa/index.js1
-rw-r--r--node_modules/resolve/test/module_dir/zmodules/bbb/main.js1
-rw-r--r--node_modules/resolve/test/module_dir/zmodules/bbb/package.json3
-rw-r--r--node_modules/resolve/test/node-modules-paths.js143
-rw-r--r--node_modules/resolve/test/node_path.js70
-rw-r--r--node_modules/resolve/test/node_path/x/aaa/index.js1
-rw-r--r--node_modules/resolve/test/node_path/x/ccc/index.js1
-rw-r--r--node_modules/resolve/test/node_path/y/bbb/index.js1
-rw-r--r--node_modules/resolve/test/node_path/y/ccc/index.js1
-rw-r--r--node_modules/resolve/test/nonstring.js9
-rw-r--r--node_modules/resolve/test/pathfilter.js75
-rw-r--r--node_modules/resolve/test/pathfilter/deep_ref/main.js0
-rw-r--r--node_modules/resolve/test/precedence.js23
-rw-r--r--node_modules/resolve/test/precedence/aaa.js1
-rw-r--r--node_modules/resolve/test/precedence/aaa/index.js1
-rw-r--r--node_modules/resolve/test/precedence/aaa/main.js1
-rw-r--r--node_modules/resolve/test/precedence/bbb.js1
-rw-r--r--node_modules/resolve/test/precedence/bbb/main.js1
-rw-r--r--node_modules/resolve/test/resolver.js450
-rw-r--r--node_modules/resolve/test/resolver/baz/doom.js0
-rw-r--r--node_modules/resolve/test/resolver/baz/package.json4
-rw-r--r--node_modules/resolve/test/resolver/baz/quux.js1
-rw-r--r--node_modules/resolve/test/resolver/browser_field/a.js0
-rw-r--r--node_modules/resolve/test/resolver/browser_field/b.js0
-rw-r--r--node_modules/resolve/test/resolver/browser_field/package.json5
-rw-r--r--node_modules/resolve/test/resolver/cup.coffee1
-rw-r--r--node_modules/resolve/test/resolver/dot_main/index.js1
-rw-r--r--node_modules/resolve/test/resolver/dot_main/package.json3
-rw-r--r--node_modules/resolve/test/resolver/dot_slash_main/index.js1
-rw-r--r--node_modules/resolve/test/resolver/dot_slash_main/package.json3
-rw-r--r--node_modules/resolve/test/resolver/foo.js1
-rw-r--r--node_modules/resolve/test/resolver/incorrect_main/index.js2
-rw-r--r--node_modules/resolve/test/resolver/incorrect_main/package.json3
-rw-r--r--node_modules/resolve/test/resolver/invalid_main/package.json7
-rw-r--r--node_modules/resolve/test/resolver/mug.coffee0
-rw-r--r--node_modules/resolve/test/resolver/mug.js0
-rw-r--r--node_modules/resolve/test/resolver/multirepo/lerna.json6
-rw-r--r--node_modules/resolve/test/resolver/multirepo/package.json20
-rw-r--r--node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js35
-rw-r--r--node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json14
-rw-r--r--node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js0
-rw-r--r--node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json14
-rw-r--r--node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js26
-rw-r--r--node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json15
-rw-r--r--node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js12
-rw-r--r--node_modules/resolve/test/resolver/other_path/lib/other-lib.js0
-rw-r--r--node_modules/resolve/test/resolver/other_path/root.js0
-rw-r--r--node_modules/resolve/test/resolver/quux/foo/index.js1
-rw-r--r--node_modules/resolve/test/resolver/same_names/foo.js1
-rw-r--r--node_modules/resolve/test/resolver/same_names/foo/index.js1
-rw-r--r--node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js0
-rw-r--r--node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep0
-rw-r--r--node_modules/resolve/test/resolver/symlinked/package/bar.js1
-rw-r--r--node_modules/resolve/test/resolver/symlinked/package/package.json3
-rw-r--r--node_modules/resolve/test/resolver/without_basedir/main.js5
-rw-r--r--node_modules/resolve/test/resolver_sync.js358
-rw-r--r--node_modules/resolve/test/shadowed_core.js54
-rw-r--r--node_modules/resolve/test/shadowed_core/node_modules/util/index.js0
-rw-r--r--node_modules/resolve/test/subdirs.js13
-rw-r--r--node_modules/resolve/test/symlinks.js176
-rw-r--r--node_modules/responselike/LICENSE19
-rw-r--r--node_modules/responselike/README.md77
-rw-r--r--node_modules/responselike/package.json39
-rw-r--r--node_modules/responselike/src/index.js34
-rw-r--r--node_modules/roarr/LICENSE24
-rw-r--r--node_modules/roarr/README.md689
-rw-r--r--node_modules/roarr/dist/constants.js16
-rw-r--r--node_modules/roarr/dist/constants.js.flow10
-rw-r--r--node_modules/roarr/dist/constants.js.map1
-rw-r--r--node_modules/roarr/dist/factories/createLogger.js192
-rw-r--r--node_modules/roarr/dist/factories/createLogger.js.flow197
-rw-r--r--node_modules/roarr/dist/factories/createLogger.js.map1
-rw-r--r--node_modules/roarr/dist/factories/createMockLogger.js44
-rw-r--r--node_modules/roarr/dist/factories/createMockLogger.js.flow46
-rw-r--r--node_modules/roarr/dist/factories/createMockLogger.js.map1
-rw-r--r--node_modules/roarr/dist/factories/createNodeWriter.js25
-rw-r--r--node_modules/roarr/dist/factories/createNodeWriter.js.flow22
-rw-r--r--node_modules/roarr/dist/factories/createNodeWriter.js.map1
-rw-r--r--node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js53
-rw-r--r--node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow43
-rw-r--r--node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map1
-rw-r--r--node_modules/roarr/dist/factories/index.js32
-rw-r--r--node_modules/roarr/dist/factories/index.js.flow11
-rw-r--r--node_modules/roarr/dist/factories/index.js.map1
-rw-r--r--node_modules/roarr/dist/log.js42
-rw-r--r--node_modules/roarr/dist/log.js.flow47
-rw-r--r--node_modules/roarr/dist/log.js.map1
-rw-r--r--node_modules/roarr/dist/types.js2
-rw-r--r--node_modules/roarr/dist/types.js.flow81
-rw-r--r--node_modules/roarr/dist/types.js.map1
-rw-r--r--node_modules/roarr/package.json93
-rw-r--r--node_modules/safe-buffer/LICENSE21
-rw-r--r--node_modules/safe-buffer/README.md584
-rw-r--r--node_modules/safe-buffer/index.d.ts187
-rw-r--r--node_modules/safe-buffer/index.js65
-rw-r--r--node_modules/safe-buffer/package.json51
-rw-r--r--node_modules/safer-buffer/LICENSE21
-rw-r--r--node_modules/safer-buffer/Porting-Buffer.md268
-rw-r--r--node_modules/safer-buffer/Readme.md156
-rw-r--r--node_modules/safer-buffer/dangerous.js58
-rw-r--r--node_modules/safer-buffer/package.json34
-rw-r--r--node_modules/safer-buffer/safer.js77
-rw-r--r--node_modules/safer-buffer/tests.js406
-rw-r--r--node_modules/semver-compare/.travis.yml6
-rw-r--r--node_modules/semver-compare/LICENSE18
-rw-r--r--node_modules/semver-compare/example/cmp.js13
-rw-r--r--node_modules/semver-compare/example/lex.js12
-rw-r--r--node_modules/semver-compare/index.js13
-rw-r--r--node_modules/semver-compare/package.json31
-rw-r--r--node_modules/semver-compare/readme.markdown77
-rw-r--r--node_modules/semver-compare/test/cmp.js29
-rw-r--r--node_modules/semver/CHANGELOG.md39
-rw-r--r--node_modules/semver/LICENSE15
-rw-r--r--node_modules/semver/README.md412
-rwxr-xr-xnode_modules/semver/bin/semver160
-rw-r--r--node_modules/semver/package.json28
-rw-r--r--node_modules/semver/range.bnf16
-rw-r--r--node_modules/semver/semver.js1483
-rw-r--r--node_modules/serialize-error/index.d.ts58
-rw-r--r--node_modules/serialize-error/index.js101
-rw-r--r--node_modules/serialize-error/license9
-rw-r--r--node_modules/serialize-error/package.json41
-rw-r--r--node_modules/serialize-error/readme.md55
-rw-r--r--node_modules/shebang-command/index.js19
-rw-r--r--node_modules/shebang-command/license9
-rw-r--r--node_modules/shebang-command/package.json34
-rw-r--r--node_modules/shebang-command/readme.md34
-rw-r--r--node_modules/shebang-regex/index.d.ts22
-rw-r--r--node_modules/shebang-regex/index.js2
-rw-r--r--node_modules/shebang-regex/license9
-rw-r--r--node_modules/shebang-regex/package.json35
-rw-r--r--node_modules/shebang-regex/readme.md33
-rw-r--r--node_modules/signal-exit/CHANGELOG.md35
-rw-r--r--node_modules/signal-exit/LICENSE.txt16
-rw-r--r--node_modules/signal-exit/README.md39
-rw-r--r--node_modules/signal-exit/index.js163
-rw-r--r--node_modules/signal-exit/package.json38
-rw-r--r--node_modules/signal-exit/signals.js53
-rw-r--r--node_modules/single-line-log/.npmignore1
-rw-r--r--node_modules/single-line-log/LICENSE21
-rw-r--r--node_modules/single-line-log/README.md56
-rw-r--r--node_modules/single-line-log/index.js51
-rw-r--r--node_modules/single-line-log/package.json27
-rw-r--r--node_modules/single-line-log/test.js21
-rw-r--r--node_modules/spdx-correct/LICENSE202
-rw-r--r--node_modules/spdx-correct/README.md14
-rw-r--r--node_modules/spdx-correct/index.js364
-rw-r--r--node_modules/spdx-correct/package.json39
-rw-r--r--node_modules/spdx-exceptions/README.md36
-rw-r--r--node_modules/spdx-exceptions/index.json40
-rw-r--r--node_modules/spdx-exceptions/package.json17
-rw-r--r--node_modules/spdx-expression-parse/AUTHORS4
-rw-r--r--node_modules/spdx-expression-parse/LICENSE22
-rw-r--r--node_modules/spdx-expression-parse/README.md91
-rw-r--r--node_modules/spdx-expression-parse/index.js8
-rw-r--r--node_modules/spdx-expression-parse/package.json39
-rw-r--r--node_modules/spdx-expression-parse/parse.js138
-rw-r--r--node_modules/spdx-expression-parse/scan.js131
-rw-r--r--node_modules/spdx-license-ids/README.md52
-rw-r--r--node_modules/spdx-license-ids/deprecated.json26
-rw-r--r--node_modules/spdx-license-ids/index.json420
-rw-r--r--node_modules/spdx-license-ids/package.json40
-rw-r--r--node_modules/speedometer/LICENSE20
-rw-r--r--node_modules/speedometer/README.md38
-rw-r--r--node_modules/speedometer/index.js35
-rw-r--r--node_modules/speedometer/package.json14
-rw-r--r--node_modules/sprintf-js/CHANGELOG.md17
-rw-r--r--node_modules/sprintf-js/CONTRIBUTORS.md25
-rw-r--r--node_modules/sprintf-js/LICENSE24
-rw-r--r--node_modules/sprintf-js/README.md143
-rw-r--r--node_modules/sprintf-js/dist/.gitattributes4
-rw-r--r--node_modules/sprintf-js/dist/angular-sprintf.min.js3
-rw-r--r--node_modules/sprintf-js/dist/angular-sprintf.min.js.map1
-rw-r--r--node_modules/sprintf-js/dist/sprintf.min.js3
-rw-r--r--node_modules/sprintf-js/dist/sprintf.min.js.map1
-rw-r--r--node_modules/sprintf-js/package.json32
-rw-r--r--node_modules/sprintf-js/src/angular-sprintf.js24
-rw-r--r--node_modules/sprintf-js/src/sprintf.js231
-rw-r--r--node_modules/sshpk/.npmignore9
-rw-r--r--node_modules/sshpk/.travis.yml11
-rw-r--r--node_modules/sshpk/LICENSE18
-rw-r--r--node_modules/sshpk/README.md804
-rwxr-xr-xnode_modules/sshpk/bin/sshpk-conv243
-rwxr-xr-xnode_modules/sshpk/bin/sshpk-sign191
-rwxr-xr-xnode_modules/sshpk/bin/sshpk-verify167
-rw-r--r--node_modules/sshpk/lib/algs.js168
-rw-r--r--node_modules/sshpk/lib/certificate.js410
-rw-r--r--node_modules/sshpk/lib/dhe.js397
-rw-r--r--node_modules/sshpk/lib/ed-compat.js92
-rw-r--r--node_modules/sshpk/lib/errors.js84
-rw-r--r--node_modules/sshpk/lib/fingerprint.js220
-rw-r--r--node_modules/sshpk/lib/formats/auto.js124
-rw-r--r--node_modules/sshpk/lib/formats/dnssec.js287
-rw-r--r--node_modules/sshpk/lib/formats/openssh-cert.js352
-rw-r--r--node_modules/sshpk/lib/formats/pem.js290
-rw-r--r--node_modules/sshpk/lib/formats/pkcs1.js373
-rw-r--r--node_modules/sshpk/lib/formats/pkcs8.js631
-rw-r--r--node_modules/sshpk/lib/formats/putty.js99
-rw-r--r--node_modules/sshpk/lib/formats/rfc4253.js166
-rw-r--r--node_modules/sshpk/lib/formats/ssh-private.js262
-rw-r--r--node_modules/sshpk/lib/formats/ssh.js115
-rw-r--r--node_modules/sshpk/lib/formats/x509-pem.js88
-rw-r--r--node_modules/sshpk/lib/formats/x509.js752
-rw-r--r--node_modules/sshpk/lib/identity.js373
-rw-r--r--node_modules/sshpk/lib/index.js40
-rw-r--r--node_modules/sshpk/lib/key.js294
-rw-r--r--node_modules/sshpk/lib/private-key.js246
-rw-r--r--node_modules/sshpk/lib/signature.js314
-rw-r--r--node_modules/sshpk/lib/ssh-buffer.js149
-rw-r--r--node_modules/sshpk/lib/utils.js404
-rw-r--r--node_modules/sshpk/man/man1/sshpk-conv.1135
-rw-r--r--node_modules/sshpk/man/man1/sshpk-sign.181
-rw-r--r--node_modules/sshpk/man/man1/sshpk-verify.168
-rw-r--r--node_modules/sshpk/package.json60
-rw-r--r--node_modules/string-width/index.js37
-rw-r--r--node_modules/string-width/license21
-rw-r--r--node_modules/string-width/package.json56
-rw-r--r--node_modules/string-width/readme.md42
-rw-r--r--node_modules/string_decoder/.npmignore2
-rw-r--r--node_modules/string_decoder/LICENSE20
-rw-r--r--node_modules/string_decoder/README.md7
-rw-r--r--node_modules/string_decoder/index.js221
-rw-r--r--node_modules/string_decoder/package.json25
-rw-r--r--node_modules/strip-ansi/index.js6
-rw-r--r--node_modules/strip-ansi/license21
-rw-r--r--node_modules/strip-ansi/package.json57
-rw-r--r--node_modules/strip-ansi/readme.md33
-rw-r--r--node_modules/strip-bom/index.js17
-rw-r--r--node_modules/strip-bom/license21
-rw-r--r--node_modules/strip-bom/package.json42
-rw-r--r--node_modules/strip-bom/readme.md39
-rwxr-xr-xnode_modules/strip-indent/cli.js49
-rw-r--r--node_modules/strip-indent/index.js16
-rw-r--r--node_modules/strip-indent/license21
-rw-r--r--node_modules/strip-indent/package.json46
-rw-r--r--node_modules/strip-indent/readme.md61
-rw-r--r--node_modules/strip-json-comments/index.js70
-rw-r--r--node_modules/strip-json-comments/license21
-rw-r--r--node_modules/strip-json-comments/package.json42
-rw-r--r--node_modules/strip-json-comments/readme.md64
-rw-r--r--node_modules/strip-outer/index.js11
-rw-r--r--node_modules/strip-outer/license21
-rw-r--r--node_modules/strip-outer/node_modules/escape-string-regexp/index.js11
-rw-r--r--node_modules/strip-outer/node_modules/escape-string-regexp/license21
-rw-r--r--node_modules/strip-outer/node_modules/escape-string-regexp/package.json41
-rw-r--r--node_modules/strip-outer/node_modules/escape-string-regexp/readme.md27
-rw-r--r--node_modules/strip-outer/package.json44
-rw-r--r--node_modules/strip-outer/readme.md28
-rw-r--r--node_modules/sumchecker/LICENSE202
-rw-r--r--node_modules/sumchecker/NEWS.md59
-rw-r--r--node_modules/sumchecker/README.md80
-rw-r--r--node_modules/sumchecker/build.js232
-rw-r--r--node_modules/sumchecker/index.js176
-rw-r--r--node_modules/sumchecker/node_modules/debug/.coveralls.yml1
-rw-r--r--node_modules/sumchecker/node_modules/debug/.eslintrc11
-rw-r--r--node_modules/sumchecker/node_modules/debug/.npmignore9
-rw-r--r--node_modules/sumchecker/node_modules/debug/.travis.yml14
-rw-r--r--node_modules/sumchecker/node_modules/debug/CHANGELOG.md362
-rw-r--r--node_modules/sumchecker/node_modules/debug/LICENSE19
-rw-r--r--node_modules/sumchecker/node_modules/debug/Makefile50
-rw-r--r--node_modules/sumchecker/node_modules/debug/README.md312
-rw-r--r--node_modules/sumchecker/node_modules/debug/component.json19
-rw-r--r--node_modules/sumchecker/node_modules/debug/karma.conf.js70
-rw-r--r--node_modules/sumchecker/node_modules/debug/node.js1
-rw-r--r--node_modules/sumchecker/node_modules/debug/package.json49
-rw-r--r--node_modules/sumchecker/node_modules/debug/src/browser.js185
-rw-r--r--node_modules/sumchecker/node_modules/debug/src/debug.js202
-rw-r--r--node_modules/sumchecker/node_modules/debug/src/index.js10
-rw-r--r--node_modules/sumchecker/node_modules/debug/src/inspector-log.js15
-rw-r--r--node_modules/sumchecker/node_modules/debug/src/node.js248
-rw-r--r--node_modules/sumchecker/node_modules/ms/index.js152
-rw-r--r--node_modules/sumchecker/node_modules/ms/license.md21
-rw-r--r--node_modules/sumchecker/node_modules/ms/package.json37
-rw-r--r--node_modules/sumchecker/node_modules/ms/readme.md51
-rw-r--r--node_modules/sumchecker/package.json53
-rw-r--r--node_modules/throttleit/.npmignore2
-rw-r--r--node_modules/throttleit/History.md11
-rw-r--r--node_modules/throttleit/Makefile11
-rw-r--r--node_modules/throttleit/Readme.md16
-rw-r--r--node_modules/throttleit/component.json13
-rw-r--r--node_modules/throttleit/example.js14
-rw-r--r--node_modules/throttleit/index.js30
-rw-r--r--node_modules/throttleit/package.json18
-rw-r--r--node_modules/through2/.jshintrc59
-rw-r--r--node_modules/through2/.npmignore1
-rw-r--r--node_modules/through2/.travis.yml12
-rw-r--r--node_modules/through2/LICENSE39
-rw-r--r--node_modules/through2/README.md107
-rw-r--r--node_modules/through2/package.json30
-rw-r--r--node_modules/through2/test.js314
-rw-r--r--node_modules/through2/through2.js42
-rw-r--r--node_modules/tough-cookie/LICENSE12
-rw-r--r--node_modules/tough-cookie/README.md527
-rw-r--r--node_modules/tough-cookie/lib/cookie.js1482
-rw-r--r--node_modules/tough-cookie/lib/memstore.js181
-rw-r--r--node_modules/tough-cookie/lib/pathMatch.js61
-rw-r--r--node_modules/tough-cookie/lib/permuteDomain.js56
-rw-r--r--node_modules/tough-cookie/lib/pubsuffix-psl.js38
-rw-r--r--node_modules/tough-cookie/lib/store.js75
-rw-r--r--node_modules/tough-cookie/lib/version.js2
-rw-r--r--node_modules/tough-cookie/package.json78
-rw-r--r--node_modules/trim-newlines/index.js13
-rw-r--r--node_modules/trim-newlines/license21
-rw-r--r--node_modules/trim-newlines/package.json42
-rw-r--r--node_modules/trim-newlines/readme.md46
-rw-r--r--node_modules/trim-repeated/index.js10
-rw-r--r--node_modules/trim-repeated/license21
-rw-r--r--node_modules/trim-repeated/node_modules/escape-string-regexp/index.js11
-rw-r--r--node_modules/trim-repeated/node_modules/escape-string-regexp/license21
-rw-r--r--node_modules/trim-repeated/node_modules/escape-string-regexp/package.json41
-rw-r--r--node_modules/trim-repeated/node_modules/escape-string-regexp/readme.md27
-rw-r--r--node_modules/trim-repeated/package.json41
-rw-r--r--node_modules/trim-repeated/readme.md47
-rw-r--r--node_modules/tunnel-agent/LICENSE55
-rw-r--r--node_modules/tunnel-agent/README.md4
-rw-r--r--node_modules/tunnel-agent/index.js244
-rw-r--r--node_modules/tunnel-agent/package.json22
-rw-r--r--node_modules/tunnel/.idea/encodings.xml6
-rw-r--r--node_modules/tunnel/.idea/modules.xml8
-rw-r--r--node_modules/tunnel/.idea/node-tunnel.iml12
-rw-r--r--node_modules/tunnel/.idea/vcs.xml6
-rw-r--r--node_modules/tunnel/.idea/workspace.xml797
-rw-r--r--node_modules/tunnel/.travis.yml6
-rw-r--r--node_modules/tunnel/CHANGELOG.md22
-rw-r--r--node_modules/tunnel/LICENSE21
-rw-r--r--node_modules/tunnel/README.md185
-rw-r--r--node_modules/tunnel/index.js1
-rw-r--r--node_modules/tunnel/lib/tunnel.js264
-rw-r--r--node_modules/tunnel/package.json34
-rw-r--r--node_modules/tweetnacl/.npmignore4
-rw-r--r--node_modules/tweetnacl/AUTHORS.md28
-rw-r--r--node_modules/tweetnacl/CHANGELOG.md221
-rw-r--r--node_modules/tweetnacl/LICENSE24
-rw-r--r--node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md20
-rw-r--r--node_modules/tweetnacl/README.md459
-rw-r--r--node_modules/tweetnacl/nacl-fast.js2388
-rw-r--r--node_modules/tweetnacl/nacl-fast.min.js2
-rw-r--r--node_modules/tweetnacl/nacl.d.ts98
-rw-r--r--node_modules/tweetnacl/nacl.js1175
-rw-r--r--node_modules/tweetnacl/nacl.min.js1
-rw-r--r--node_modules/tweetnacl/package.json58
-rw-r--r--node_modules/type-fest/index.d.ts29
-rw-r--r--node_modules/type-fest/license9
-rw-r--r--node_modules/type-fest/package.json45
-rw-r--r--node_modules/type-fest/readme.md642
-rw-r--r--node_modules/type-fest/source/async-return-type.d.ts23
-rw-r--r--node_modules/type-fest/source/basic.d.ts67
-rw-r--r--node_modules/type-fest/source/conditional-except.d.ts43
-rw-r--r--node_modules/type-fest/source/conditional-keys.d.ts43
-rw-r--r--node_modules/type-fest/source/conditional-pick.d.ts42
-rw-r--r--node_modules/type-fest/source/except.d.ts22
-rw-r--r--node_modules/type-fest/source/literal-union.d.ts33
-rw-r--r--node_modules/type-fest/source/merge-exclusive.d.ts39
-rw-r--r--node_modules/type-fest/source/merge.d.ts22
-rw-r--r--node_modules/type-fest/source/mutable.d.ts22
-rw-r--r--node_modules/type-fest/source/opaque.d.ts65
-rw-r--r--node_modules/type-fest/source/package-json.d.ts585
-rw-r--r--node_modules/type-fest/source/partial-deep.d.ts72
-rw-r--r--node_modules/type-fest/source/promisable.d.ts23
-rw-r--r--node_modules/type-fest/source/promise-value.d.ts20
-rw-r--r--node_modules/type-fest/source/readonly-deep.d.ts59
-rw-r--r--node_modules/type-fest/source/require-at-least-one.d.ts32
-rw-r--r--node_modules/type-fest/source/require-exactly-one.d.ts35
-rw-r--r--node_modules/type-fest/source/set-optional.d.ts34
-rw-r--r--node_modules/type-fest/source/set-required.d.ts34
-rw-r--r--node_modules/type-fest/source/stringified.d.ts21
-rw-r--r--node_modules/type-fest/source/tsconfig-json.d.ts872
-rw-r--r--node_modules/type-fest/source/union-to-intersection.d.ts58
-rw-r--r--node_modules/type-fest/source/value-of.d.ts40
-rw-r--r--node_modules/typedarray/.travis.yml4
-rw-r--r--node_modules/typedarray/LICENSE35
-rw-r--r--node_modules/typedarray/example/tarray.js4
-rw-r--r--node_modules/typedarray/index.js630
-rw-r--r--node_modules/typedarray/package.json55
-rw-r--r--node_modules/typedarray/readme.markdown61
-rw-r--r--node_modules/typedarray/test/server/undef_globals.js19
-rw-r--r--node_modules/typedarray/test/tarray.js10
-rw-r--r--node_modules/universalify/LICENSE20
-rw-r--r--node_modules/universalify/README.md76
-rw-r--r--node_modules/universalify/index.js25
-rw-r--r--node_modules/universalify/package.json34
-rwxr-xr-xnode_modules/uri-js/LICENSE11
-rwxr-xr-xnode_modules/uri-js/README.md203
-rwxr-xr-xnode_modules/uri-js/dist/es5/uri.all.d.ts59
-rwxr-xr-xnode_modules/uri-js/dist/es5/uri.all.js1443
-rwxr-xr-xnode_modules/uri-js/dist/es5/uri.all.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/es5/uri.all.min.d.ts59
-rwxr-xr-xnode_modules/uri-js/dist/es5/uri.all.min.js3
-rwxr-xr-xnode_modules/uri-js/dist/es5/uri.all.min.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/index.d.ts1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/index.js17
-rwxr-xr-xnode_modules/uri-js/dist/esnext/index.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/regexps-iri.d.ts3
-rwxr-xr-xnode_modules/uri-js/dist/esnext/regexps-iri.js3
-rwxr-xr-xnode_modules/uri-js/dist/esnext/regexps-iri.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/regexps-uri.d.ts4
-rwxr-xr-xnode_modules/uri-js/dist/esnext/regexps-uri.js42
-rwxr-xr-xnode_modules/uri-js/dist/esnext/regexps-uri.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/http.d.ts3
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/http.js28
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/http.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/https.d.ts3
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/https.js9
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/https.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/mailto.d.ts12
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/mailto.js148
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/mailto.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts7
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/urn-uuid.js23
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/urn.d.ts10
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/urn.js49
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/urn.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/ws.d.ts7
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/ws.js41
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/ws.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/wss.d.ts3
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/wss.js9
-rwxr-xr-xnode_modules/uri-js/dist/esnext/schemes/wss.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/uri.d.ts59
-rwxr-xr-xnode_modules/uri-js/dist/esnext/uri.js480
-rwxr-xr-xnode_modules/uri-js/dist/esnext/uri.js.map1
-rwxr-xr-xnode_modules/uri-js/dist/esnext/util.d.ts6
-rwxr-xr-xnode_modules/uri-js/dist/esnext/util.js36
-rwxr-xr-xnode_modules/uri-js/dist/esnext/util.js.map1
-rwxr-xr-xnode_modules/uri-js/package.json77
-rwxr-xr-xnode_modules/uri-js/yarn.lock2558
-rw-r--r--node_modules/util-deprecate/History.md16
-rw-r--r--node_modules/util-deprecate/LICENSE24
-rw-r--r--node_modules/util-deprecate/README.md53
-rw-r--r--node_modules/util-deprecate/browser.js67
-rw-r--r--node_modules/util-deprecate/node.js6
-rw-r--r--node_modules/util-deprecate/package.json27
-rw-r--r--node_modules/uuid/AUTHORS5
-rw-r--r--node_modules/uuid/CHANGELOG.md119
-rw-r--r--node_modules/uuid/LICENSE.md21
-rw-r--r--node_modules/uuid/README.md276
-rwxr-xr-xnode_modules/uuid/bin/uuid65
-rw-r--r--node_modules/uuid/index.js8
-rw-r--r--node_modules/uuid/lib/bytesToUuid.js26
-rw-r--r--node_modules/uuid/lib/md5-browser.js216
-rw-r--r--node_modules/uuid/lib/md5.js25
-rw-r--r--node_modules/uuid/lib/rng-browser.js34
-rw-r--r--node_modules/uuid/lib/rng.js8
-rw-r--r--node_modules/uuid/lib/sha1-browser.js89
-rw-r--r--node_modules/uuid/lib/sha1.js25
-rw-r--r--node_modules/uuid/lib/v35.js57
-rw-r--r--node_modules/uuid/package.json49
-rw-r--r--node_modules/uuid/v1.js109
-rw-r--r--node_modules/uuid/v3.js4
-rw-r--r--node_modules/uuid/v4.js29
-rw-r--r--node_modules/uuid/v5.js3
-rw-r--r--node_modules/validate-npm-package-license/LICENSE202
-rw-r--r--node_modules/validate-npm-package-license/README.md113
-rw-r--r--node_modules/validate-npm-package-license/index.js86
-rw-r--r--node_modules/validate-npm-package-license/package.json28
-rw-r--r--node_modules/verror/.npmignore9
-rw-r--r--node_modules/verror/CHANGES.md28
-rw-r--r--node_modules/verror/CONTRIBUTING.md19
-rw-r--r--node_modules/verror/LICENSE19
-rw-r--r--node_modules/verror/README.md528
-rw-r--r--node_modules/verror/lib/verror.js451
-rw-r--r--node_modules/verror/package.json22
-rw-r--r--node_modules/which/CHANGELOG.md166
-rw-r--r--node_modules/which/LICENSE15
-rw-r--r--node_modules/which/README.md54
-rwxr-xr-xnode_modules/which/bin/node-which52
-rw-r--r--node_modules/which/package.json43
-rw-r--r--node_modules/which/which.js125
-rw-r--r--node_modules/wrappy/LICENSE15
-rw-r--r--node_modules/wrappy/README.md36
-rw-r--r--node_modules/wrappy/package.json29
-rw-r--r--node_modules/wrappy/wrappy.js33
-rw-r--r--node_modules/xmlbuilder/.nycrc6
-rw-r--r--node_modules/xmlbuilder/.vscode/launch.json23
-rw-r--r--node_modules/xmlbuilder/CHANGELOG.md593
-rw-r--r--node_modules/xmlbuilder/LICENSE21
-rw-r--r--node_modules/xmlbuilder/README.md103
-rw-r--r--node_modules/xmlbuilder/lib/Derivation.js10
-rw-r--r--node_modules/xmlbuilder/lib/DocumentPosition.js12
-rw-r--r--node_modules/xmlbuilder/lib/NodeType.js25
-rw-r--r--node_modules/xmlbuilder/lib/OperationType.js11
-rw-r--r--node_modules/xmlbuilder/lib/Utility.js88
-rw-r--r--node_modules/xmlbuilder/lib/WriterState.js10
-rw-r--r--node_modules/xmlbuilder/lib/XMLAttribute.js130
-rw-r--r--node_modules/xmlbuilder/lib/XMLCData.js41
-rw-r--r--node_modules/xmlbuilder/lib/XMLCharacterData.js86
-rw-r--r--node_modules/xmlbuilder/lib/XMLComment.js41
-rw-r--r--node_modules/xmlbuilder/lib/XMLDOMConfiguration.js80
-rw-r--r--node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js20
-rw-r--r--node_modules/xmlbuilder/lib/XMLDOMImplementation.js55
-rw-r--r--node_modules/xmlbuilder/lib/XMLDOMStringList.js44
-rw-r--r--node_modules/xmlbuilder/lib/XMLDTDAttList.js66
-rw-r--r--node_modules/xmlbuilder/lib/XMLDTDElement.js44
-rw-r--r--node_modules/xmlbuilder/lib/XMLDTDEntity.js115
-rw-r--r--node_modules/xmlbuilder/lib/XMLDTDNotation.js66
-rw-r--r--node_modules/xmlbuilder/lib/XMLDeclaration.js51
-rw-r--r--node_modules/xmlbuilder/lib/XMLDocType.js235
-rw-r--r--node_modules/xmlbuilder/lib/XMLDocument.js282
-rw-r--r--node_modules/xmlbuilder/lib/XMLDocumentCB.js650
-rw-r--r--node_modules/xmlbuilder/lib/XMLDocumentFragment.js21
-rw-r--r--node_modules/xmlbuilder/lib/XMLDummy.js39
-rw-r--r--node_modules/xmlbuilder/lib/XMLElement.js334
-rw-r--r--node_modules/xmlbuilder/lib/XMLNamedNodeMap.js77
-rw-r--r--node_modules/xmlbuilder/lib/XMLNode.js999
-rw-r--r--node_modules/xmlbuilder/lib/XMLNodeFilter.js51
-rw-r--r--node_modules/xmlbuilder/lib/XMLNodeList.js45
-rw-r--r--node_modules/xmlbuilder/lib/XMLProcessingInstruction.js56
-rw-r--r--node_modules/xmlbuilder/lib/XMLRaw.js40
-rw-r--r--node_modules/xmlbuilder/lib/XMLStreamWriter.js209
-rw-r--r--node_modules/xmlbuilder/lib/XMLStringWriter.js40
-rw-r--r--node_modules/xmlbuilder/lib/XMLStringifier.js291
-rw-r--r--node_modules/xmlbuilder/lib/XMLText.js82
-rw-r--r--node_modules/xmlbuilder/lib/XMLTypeInfo.js23
-rw-r--r--node_modules/xmlbuilder/lib/XMLUserDataHandler.js27
-rw-r--r--node_modules/xmlbuilder/lib/XMLWriterBase.js485
-rw-r--r--node_modules/xmlbuilder/lib/index.js120
-rw-r--r--node_modules/xmlbuilder/package.json51
-rw-r--r--node_modules/xmlbuilder/perf/basic/escaping.coffee244
-rw-r--r--node_modules/xmlbuilder/perf/basic/object.coffee21
-rw-r--r--node_modules/xmlbuilder/perf/index.coffee161
-rw-r--r--node_modules/xmlbuilder/perf/perf.list11
-rw-r--r--node_modules/xmlbuilder/typings/index.d.ts1771
-rw-r--r--node_modules/xtend/.npmignore1
-rw-r--r--node_modules/xtend/LICENCE19
-rw-r--r--node_modules/xtend/Makefile4
-rw-r--r--node_modules/xtend/README.md27
-rw-r--r--node_modules/xtend/has-keys.js7
-rw-r--r--node_modules/xtend/index.js25
-rw-r--r--node_modules/xtend/mutable.js25
-rw-r--r--node_modules/xtend/package.json62
-rw-r--r--node_modules/xtend/test.js63
-rw-r--r--node_modules/yallist/LICENSE15
-rw-r--r--node_modules/yallist/README.md204
-rw-r--r--node_modules/yallist/iterator.js8
-rw-r--r--node_modules/yallist/package.json29
-rw-r--r--node_modules/yallist/yallist.js426
-rw-r--r--node_modules/yargs-parser/CHANGELOG.md308
-rw-r--r--node_modules/yargs-parser/LICENSE.txt14
-rw-r--r--node_modules/yargs-parser/README.md518
-rw-r--r--node_modules/yargs-parser/browser.js29
-rw-r--r--node_modules/yargs-parser/build/index.cjs1050
-rw-r--r--node_modules/yargs-parser/build/lib/index.js62
-rw-r--r--node_modules/yargs-parser/build/lib/string-utils.js65
-rw-r--r--node_modules/yargs-parser/build/lib/tokenize-arg-string.js40
-rw-r--r--node_modules/yargs-parser/build/lib/yargs-parser-types.js12
-rw-r--r--node_modules/yargs-parser/build/lib/yargs-parser.js1045
-rw-r--r--node_modules/yargs-parser/package.json92
-rw-r--r--node_modules/yauzl/LICENSE21
-rw-r--r--node_modules/yauzl/README.md658
-rw-r--r--node_modules/yauzl/index.js796
-rw-r--r--node_modules/yauzl/package.json40
4281 files changed, 519787 insertions, 0 deletions
diff --git a/node_modules/.bin/asar b/node_modules/.bin/asar
new file mode 120000
index 0000000..8dd306f
--- /dev/null
+++ b/node_modules/.bin/asar
@@ -0,0 +1 @@
+../asar/bin/asar.js \ No newline at end of file
diff --git a/node_modules/.bin/dircompare b/node_modules/.bin/dircompare
new file mode 120000
index 0000000..4c66e5c
--- /dev/null
+++ b/node_modules/.bin/dircompare
@@ -0,0 +1 @@
+../dir-compare/src/cli/dircompare.js \ No newline at end of file
diff --git a/node_modules/.bin/electron b/node_modules/.bin/electron
new file mode 120000
index 0000000..946101e
--- /dev/null
+++ b/node_modules/.bin/electron
@@ -0,0 +1 @@
+../electron/cli.js \ No newline at end of file
diff --git a/node_modules/.bin/electron-download b/node_modules/.bin/electron-download
new file mode 120000
index 0000000..bfc798a
--- /dev/null
+++ b/node_modules/.bin/electron-download
@@ -0,0 +1 @@
+../electron-download/lib/cli.js \ No newline at end of file
diff --git a/node_modules/.bin/electron-osx-flat b/node_modules/.bin/electron-osx-flat
new file mode 120000
index 0000000..0441052
--- /dev/null
+++ b/node_modules/.bin/electron-osx-flat
@@ -0,0 +1 @@
+../electron-osx-sign/bin/electron-osx-flat.js \ No newline at end of file
diff --git a/node_modules/.bin/electron-osx-sign b/node_modules/.bin/electron-osx-sign
new file mode 120000
index 0000000..a25868f
--- /dev/null
+++ b/node_modules/.bin/electron-osx-sign
@@ -0,0 +1 @@
+../electron-osx-sign/bin/electron-osx-sign.js \ No newline at end of file
diff --git a/node_modules/.bin/electron-packager b/node_modules/.bin/electron-packager
new file mode 120000
index 0000000..a469e45
--- /dev/null
+++ b/node_modules/.bin/electron-packager
@@ -0,0 +1 @@
+../electron-packager/bin/electron-packager.js \ No newline at end of file
diff --git a/node_modules/.bin/extract-zip b/node_modules/.bin/extract-zip
new file mode 120000
index 0000000..af9b561
--- /dev/null
+++ b/node_modules/.bin/extract-zip
@@ -0,0 +1 @@
+../extract-zip/cli.js \ No newline at end of file
diff --git a/node_modules/.bin/is-docker b/node_modules/.bin/is-docker
new file mode 120000
index 0000000..9896ba5
--- /dev/null
+++ b/node_modules/.bin/is-docker
@@ -0,0 +1 @@
+../is-docker/cli.js \ No newline at end of file
diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp
new file mode 120000
index 0000000..017896c
--- /dev/null
+++ b/node_modules/.bin/mkdirp
@@ -0,0 +1 @@
+../mkdirp/bin/cmd.js \ No newline at end of file
diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which
new file mode 120000
index 0000000..6f8415e
--- /dev/null
+++ b/node_modules/.bin/node-which
@@ -0,0 +1 @@
+../which/bin/node-which \ No newline at end of file
diff --git a/node_modules/.bin/nugget b/node_modules/.bin/nugget
new file mode 120000
index 0000000..eccbe4c
--- /dev/null
+++ b/node_modules/.bin/nugget
@@ -0,0 +1 @@
+../nugget/bin.js \ No newline at end of file
diff --git a/node_modules/.bin/pretty-bytes b/node_modules/.bin/pretty-bytes
new file mode 120000
index 0000000..d1d4ed6
--- /dev/null
+++ b/node_modules/.bin/pretty-bytes
@@ -0,0 +1 @@
+../pretty-bytes/cli.js \ No newline at end of file
diff --git a/node_modules/.bin/rc b/node_modules/.bin/rc
new file mode 120000
index 0000000..48b3cda
--- /dev/null
+++ b/node_modules/.bin/rc
@@ -0,0 +1 @@
+../rc/cli.js \ No newline at end of file
diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver
new file mode 120000
index 0000000..317eb29
--- /dev/null
+++ b/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver \ No newline at end of file
diff --git a/node_modules/.bin/sshpk-conv b/node_modules/.bin/sshpk-conv
new file mode 120000
index 0000000..a2a295c
--- /dev/null
+++ b/node_modules/.bin/sshpk-conv
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-conv \ No newline at end of file
diff --git a/node_modules/.bin/sshpk-sign b/node_modules/.bin/sshpk-sign
new file mode 120000
index 0000000..766b9b3
--- /dev/null
+++ b/node_modules/.bin/sshpk-sign
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-sign \ No newline at end of file
diff --git a/node_modules/.bin/sshpk-verify b/node_modules/.bin/sshpk-verify
new file mode 120000
index 0000000..bfd7e3a
--- /dev/null
+++ b/node_modules/.bin/sshpk-verify
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-verify \ No newline at end of file
diff --git a/node_modules/.bin/strip-indent b/node_modules/.bin/strip-indent
new file mode 120000
index 0000000..dddee7e
--- /dev/null
+++ b/node_modules/.bin/strip-indent
@@ -0,0 +1 @@
+../strip-indent/cli.js \ No newline at end of file
diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid
new file mode 120000
index 0000000..b3e45bc
--- /dev/null
+++ b/node_modules/.bin/uuid
@@ -0,0 +1 @@
+../uuid/bin/uuid \ No newline at end of file
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
new file mode 100644
index 0000000..7d4c328
--- /dev/null
+++ b/node_modules/.package-lock.json
@@ -0,0 +1,3023 @@
+{
+ "name": "FlashRunner",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "node_modules/@electron/get": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.1.tgz",
+ "integrity": "sha512-8nmTGC/3/6IaEfeTcQwtJdjLA/L3sb0XQJUv9x3ZfM0pfmKvkSdelbT4pgF3dpCQOvSmJ97kYAvFltikVjfepA==",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "env-paths": "^2.2.0",
+ "fs-extra": "^8.1.0",
+ "got": "^11.8.5",
+ "progress": "^2.0.3",
+ "semver": "^6.2.0",
+ "sumchecker": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "global-agent": "^3.0.0",
+ "global-tunnel-ng": "^2.7.1"
+ }
+ },
+ "node_modules/@electron/get/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@electron/get/node_modules/env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/@electron/get/node_modules/fs-extra": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ }
+ },
+ "node_modules/@electron/get/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/@electron/get/node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@electron/get/node_modules/sumchecker": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
+ "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",
+ "dependencies": {
+ "debug": "^4.1.0"
+ },
+ "engines": {
+ "node": ">= 8.0"
+ }
+ },
+ "node_modules/@electron/universal": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.3.0.tgz",
+ "integrity": "sha512-6SAIlMZZRj1qpe3z3qhMWf3fmqhAdzferiQ5kpspCI9sH1GjkzRXY0RLaz0ktHtYonOj9XMpXNkhDy7QQagQEg==",
+ "dependencies": {
+ "@malept/cross-spawn-promise": "^1.1.0",
+ "asar": "^3.1.0",
+ "debug": "^4.3.1",
+ "dir-compare": "^2.4.0",
+ "fs-extra": "^9.0.1",
+ "minimatch": "^3.0.4",
+ "plist": "^3.0.4"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/@electron/universal/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@electron/universal/node_modules/fs-extra": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
+ "dependencies": {
+ "at-least-node": "^1.0.0",
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@electron/universal/node_modules/jsonfile": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/@electron/universal/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/@electron/universal/node_modules/universalify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/@malept/cross-spawn-promise": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz",
+ "integrity": "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/malept"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"
+ }
+ ],
+ "dependencies": {
+ "cross-spawn": "^7.0.1"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@sindresorhus/is": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/is?sponsor=1"
+ }
+ },
+ "node_modules/@szmarczak/http-timer": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",
+ "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",
+ "dependencies": {
+ "defer-to-connect": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@types/cacheable-request": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz",
+ "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==",
+ "dependencies": {
+ "@types/http-cache-semantics": "*",
+ "@types/keyv": "*",
+ "@types/node": "*",
+ "@types/responselike": "*"
+ }
+ },
+ "node_modules/@types/glob": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
+ "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
+ "optional": true,
+ "dependencies": {
+ "@types/minimatch": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/http-cache-semantics": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
+ "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ=="
+ },
+ "node_modules/@types/keyv": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
+ "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/minimatch": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
+ "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
+ "optional": true
+ },
+ "node_modules/@types/node": {
+ "version": "18.7.23",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz",
+ "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg=="
+ },
+ "node_modules/@types/responselike": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz",
+ "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
+ "optional": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/asar": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/asar/-/asar-3.2.0.tgz",
+ "integrity": "sha512-COdw2ZQvKdFGFxXwX3oYh2/sOsJWJegrdJCGxnN4MZ7IULgRBp9P6665aqj9z1v9VwP4oP1hRBojRDQ//IGgAg==",
+ "dependencies": {
+ "chromium-pickle-js": "^0.2.0",
+ "commander": "^5.0.0",
+ "glob": "^7.1.6",
+ "minimatch": "^3.0.4"
+ },
+ "bin": {
+ "asar": "bin/asar.js"
+ },
+ "engines": {
+ "node": ">=10.12.0"
+ },
+ "optionalDependencies": {
+ "@types/glob": "^7.1.1"
+ }
+ },
+ "node_modules/asn1": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
+ "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
+ "dependencies": {
+ "safer-buffer": "~2.1.0"
+ }
+ },
+ "node_modules/assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ },
+ "node_modules/at-least-node": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
+ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/author-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/author-regex/-/author-regex-1.0.0.tgz",
+ "integrity": "sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/aws-sign2": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/aws4": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
+ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "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"
+ }
+ ]
+ },
+ "node_modules/bcrypt-pbkdf": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+ "dependencies": {
+ "tweetnacl": "^0.14.3"
+ }
+ },
+ "node_modules/bluebird": {
+ "version": "3.7.2",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
+ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
+ },
+ "node_modules/boolean": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",
+ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",
+ "optional": true
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/buffer-alloc": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
+ "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
+ "dependencies": {
+ "buffer-alloc-unsafe": "^1.1.0",
+ "buffer-fill": "^1.0.0"
+ }
+ },
+ "node_modules/buffer-alloc-unsafe": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
+ "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
+ },
+ "node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/buffer-equal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
+ "integrity": "sha512-tcBWO2Dl4e7Asr9hTGcpVrCe+F7DubpmqWCTbj4FHLmjqO2hIaC383acQubWtRJhdceqs5uBHs6Es+Sk//RKiQ==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/buffer-fill": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
+ "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+ },
+ "node_modules/cacheable-lookup": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
+ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",
+ "engines": {
+ "node": ">=10.6.0"
+ }
+ },
+ "node_modules/cacheable-request": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz",
+ "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==",
+ "dependencies": {
+ "clone-response": "^1.0.2",
+ "get-stream": "^5.1.0",
+ "http-cache-semantics": "^4.0.0",
+ "keyv": "^4.0.0",
+ "lowercase-keys": "^2.0.0",
+ "normalize-url": "^6.0.1",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/camelcase": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
+ "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/camelcase-keys": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
+ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
+ "dependencies": {
+ "camelcase": "^2.0.0",
+ "map-obj": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/caseless": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
+ },
+ "node_modules/chromium-pickle-js": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz",
+ "integrity": "sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw=="
+ },
+ "node_modules/clone-response": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
+ "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",
+ "dependencies": {
+ "mimic-response": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/colors": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
+ "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==",
+ "engines": {
+ "node": ">=0.1.90"
+ }
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/commander": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
+ "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/compare-version": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",
+ "integrity": "sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
+ },
+ "node_modules/concat-stream": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+ "engines": [
+ "node >= 0.8"
+ ],
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ }
+ },
+ "node_modules/concat-stream/node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ },
+ "node_modules/concat-stream/node_modules/readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/concat-stream/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ },
+ "node_modules/concat-stream/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/config-chain": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
+ "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
+ "optional": true,
+ "dependencies": {
+ "ini": "^1.3.4",
+ "proto-list": "~1.2.1"
+ }
+ },
+ "node_modules/core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/cross-spawn-windows-exe": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz",
+ "integrity": "sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/malept"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/subscription/pkg/npm-cross-spawn-windows-exe?utm_medium=referral&utm_source=npm_fund"
+ }
+ ],
+ "dependencies": {
+ "@malept/cross-spawn-promise": "^1.1.0",
+ "is-wsl": "^2.2.0",
+ "which": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
+ "dependencies": {
+ "array-find-index": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/dashdash": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/decompress-response": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/decompress-response/node_modules/mimic-response": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/deep-extend": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/defer-to-connect": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
+ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz",
+ "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==",
+ "optional": true,
+ "dependencies": {
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/define-properties/node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "optional": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/detect-node": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
+ "optional": true
+ },
+ "node_modules/dir-compare": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-2.4.0.tgz",
+ "integrity": "sha512-l9hmu8x/rjVC9Z2zmGzkhOEowZvW7pmYws5CWHutg8u1JgvsKWMx7Q/UODeu4djLZ4FgW5besw5yvMQnBHzuCA==",
+ "dependencies": {
+ "buffer-equal": "1.0.0",
+ "colors": "1.0.3",
+ "commander": "2.9.0",
+ "minimatch": "3.0.4"
+ },
+ "bin": {
+ "dircompare": "src/cli/dircompare.js"
+ }
+ },
+ "node_modules/dir-compare/node_modules/commander": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
+ "integrity": "sha512-bmkUukX8wAOjHdN26xj5c4ctEV22TQ7dQYhSmuckKhToXrkUn0iIaolHdIxYYqD55nhpSPA9zPQ1yP57GdXP2A==",
+ "dependencies": {
+ "graceful-readlink": ">= 1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6.x"
+ }
+ },
+ "node_modules/dir-compare/node_modules/minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/ecc-jsbn": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+ "dependencies": {
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.1.0"
+ }
+ },
+ "node_modules/electron": {
+ "version": "4.2.12",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-4.2.12.tgz",
+ "integrity": "sha512-EES8eMztoW8gEP5E4GQLP8slrfS2jqTYtHbu36mlu3k1xYAaNPyQQr6mCILkYxqj4l3la4CT2Vcs89CUG62vcQ==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "@types/node": "^10.12.18",
+ "electron-download": "^4.1.0",
+ "extract-zip": "^1.0.3"
+ },
+ "bin": {
+ "electron": "cli.js"
+ },
+ "engines": {
+ "node": ">= 4.0"
+ }
+ },
+ "node_modules/electron-download": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz",
+ "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==",
+ "dependencies": {
+ "debug": "^3.0.0",
+ "env-paths": "^1.0.0",
+ "fs-extra": "^4.0.1",
+ "minimist": "^1.2.0",
+ "nugget": "^2.0.1",
+ "path-exists": "^3.0.0",
+ "rc": "^1.2.1",
+ "semver": "^5.4.1",
+ "sumchecker": "^2.0.2"
+ },
+ "bin": {
+ "electron-download": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">= 4.0"
+ }
+ },
+ "node_modules/electron-notarize": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.2.1.tgz",
+ "integrity": "sha512-u/ECWhIrhkSQpZM4cJzVZ5TsmkaqrRo5LDC/KMbGF0sPkm53Ng59+M0zp8QVaql0obfJy9vlVT+4iOkAi2UDlA==",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "fs-extra": "^9.0.1"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/electron-notarize/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/electron-notarize/node_modules/fs-extra": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
+ "dependencies": {
+ "at-least-node": "^1.0.0",
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/electron-notarize/node_modules/jsonfile": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/electron-notarize/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/electron-notarize/node_modules/universalify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/electron-osx-sign": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.5.0.tgz",
+ "integrity": "sha512-icoRLHzFz/qxzDh/N4Pi2z4yVHurlsCAYQvsCSG7fCedJ4UJXBS6PoQyGH71IfcqKupcKeK7HX/NkyfG+v6vlQ==",
+ "deprecated": "Please use @electron/osx-sign moving forward. Be aware the API is slightly different",
+ "dependencies": {
+ "bluebird": "^3.5.0",
+ "compare-version": "^0.1.2",
+ "debug": "^2.6.8",
+ "isbinaryfile": "^3.0.2",
+ "minimist": "^1.2.0",
+ "plist": "^3.0.1"
+ },
+ "bin": {
+ "electron-osx-flat": "bin/electron-osx-flat.js",
+ "electron-osx-sign": "bin/electron-osx-sign.js"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/electron-osx-sign/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/electron-osx-sign/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
+ },
+ "node_modules/electron-packager": {
+ "version": "16.0.0",
+ "resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-16.0.0.tgz",
+ "integrity": "sha512-7Ey4UUaHg3FYhA7ktsAvCWP8srp9+iPljGdeJBsNaZBakU6HWhvRC+Pc7LWXGCgAVIN5BQsUwR3xrCbFno91VA==",
+ "dependencies": {
+ "@electron/get": "^2.0.0",
+ "@electron/universal": "^1.2.1",
+ "asar": "^3.1.0",
+ "cross-spawn-windows-exe": "^1.2.0",
+ "debug": "^4.0.1",
+ "electron-notarize": "^1.1.1",
+ "electron-osx-sign": "^0.5.0",
+ "extract-zip": "^2.0.0",
+ "filenamify": "^4.1.0",
+ "fs-extra": "^10.1.0",
+ "galactus": "^0.2.1",
+ "get-package-info": "^1.0.0",
+ "junk": "^3.1.0",
+ "parse-author": "^2.0.0",
+ "plist": "^3.0.0",
+ "rcedit": "^3.0.1",
+ "resolve": "^1.1.6",
+ "semver": "^7.1.3",
+ "yargs-parser": "^21.1.1"
+ },
+ "bin": {
+ "electron-packager": "bin/electron-packager.js"
+ },
+ "engines": {
+ "node": ">= 14.17.5"
+ },
+ "funding": {
+ "url": "https://github.com/electron/electron-packager?sponsor=1"
+ }
+ },
+ "node_modules/electron-packager/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/electron-packager/node_modules/extract-zip": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "engines": {
+ "node": ">= 10.17.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
+ }
+ },
+ "node_modules/electron-packager/node_modules/fs-extra": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/electron-packager/node_modules/jsonfile": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/electron-packager/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/electron-packager/node_modules/semver": {
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/electron-packager/node_modules/universalify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/electron/node_modules/@types/node": {
+ "version": "10.17.51",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.51.tgz",
+ "integrity": "sha512-KANw+MkL626tq90l++hGelbl67irOJzGhUJk6a1Bt8QHOeh9tztJx+L0AqttraWKinmZn7Qi5lJZJzx45Gq0dg=="
+ },
+ "node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "optional": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/env-paths": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
+ "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "node_modules/es6-error": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
+ "optional": true
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "optional": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
+ },
+ "node_modules/extract-zip": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",
+ "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",
+ "dependencies": {
+ "concat-stream": "^1.6.2",
+ "debug": "^2.6.9",
+ "mkdirp": "^0.5.4",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
+ }
+ },
+ "node_modules/extract-zip/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/extract-zip/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "node_modules/extsprintf": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+ "engines": [
+ "node >=0.6.0"
+ ]
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
+ },
+ "node_modules/fd-slicer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+ "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
+ "dependencies": {
+ "pend": "~1.2.0"
+ }
+ },
+ "node_modules/filename-reserved-regex": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz",
+ "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/filenamify": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.3.0.tgz",
+ "integrity": "sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==",
+ "dependencies": {
+ "filename-reserved-regex": "^2.0.0",
+ "strip-outer": "^1.0.1",
+ "trim-repeated": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+ "dependencies": {
+ "path-exists": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/find-up/node_modules/path-exists": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+ "dependencies": {
+ "pinkie-promise": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/flora-colossus": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/flora-colossus/-/flora-colossus-1.0.1.tgz",
+ "integrity": "sha512-d+9na7t9FyH8gBJoNDSi28mE4NgQVGGvxQ4aHtFRetjyh5SXjuus+V5EZaxFmFdXVemSOrx0lsgEl/ZMjnOWJA==",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "fs-extra": "^7.0.0"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/flora-colossus/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/flora-colossus/node_modules/fs-extra": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
+ "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ }
+ },
+ "node_modules/flora-colossus/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/forever-agent": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/form-data": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+ "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.6",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 0.12"
+ }
+ },
+ "node_modules/fs-extra": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
+ "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ }
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "node_modules/galactus": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/galactus/-/galactus-0.2.1.tgz",
+ "integrity": "sha512-mDc8EQJKtxjp9PMYS3PbpjjbX3oXhBTxoGaPahw620XZBIHJ4+nvw5KN/tRtmmSDR9dypstGNvqQ3C29QGoGHQ==",
+ "dependencies": {
+ "debug": "^3.1.0",
+ "flora-colossus": "^1.0.0",
+ "fs-extra": "^4.0.0"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
+ "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
+ "optional": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-package-info": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/get-package-info/-/get-package-info-1.0.0.tgz",
+ "integrity": "sha512-SCbprXGAPdIhKAXiG+Mk6yeoFH61JlYunqdFQFHDtLjJlDjFf6x07dsS8acO+xWt52jpdVo49AlVDnUVK1sDNw==",
+ "dependencies": {
+ "bluebird": "^3.1.1",
+ "debug": "^2.2.0",
+ "lodash.get": "^4.0.0",
+ "read-pkg-up": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 4.0"
+ }
+ },
+ "node_modules/get-package-info/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/get-package-info/node_modules/find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==",
+ "dependencies": {
+ "locate-path": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/get-package-info/node_modules/load-json-file": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+ "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==",
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "strip-bom": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/get-package-info/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
+ },
+ "node_modules/get-package-info/node_modules/path-type": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+ "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==",
+ "dependencies": {
+ "pify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/get-package-info/node_modules/read-pkg": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+ "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==",
+ "dependencies": {
+ "load-json-file": "^2.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/get-package-info/node_modules/read-pkg-up": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+ "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==",
+ "dependencies": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/get-package-info/node_modules/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/get-stdin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/getpass": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/global-agent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",
+ "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",
+ "optional": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "es6-error": "^4.1.1",
+ "matcher": "^3.0.0",
+ "roarr": "^2.15.3",
+ "semver": "^7.3.2",
+ "serialize-error": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=10.0"
+ }
+ },
+ "node_modules/global-agent/node_modules/semver": {
+ "version": "7.3.7",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+ "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
+ "optional": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/global-tunnel-ng": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz",
+ "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==",
+ "optional": true,
+ "dependencies": {
+ "encodeurl": "^1.0.2",
+ "lodash": "^4.17.10",
+ "npm-conf": "^1.1.3",
+ "tunnel": "^0.0.6"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/globalthis": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
+ "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+ "optional": true,
+ "dependencies": {
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/got": {
+ "version": "11.8.5",
+ "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz",
+ "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==",
+ "dependencies": {
+ "@sindresorhus/is": "^4.0.0",
+ "@szmarczak/http-timer": "^4.0.5",
+ "@types/cacheable-request": "^6.0.1",
+ "@types/responselike": "^1.0.0",
+ "cacheable-lookup": "^5.0.3",
+ "cacheable-request": "^7.0.2",
+ "decompress-response": "^6.0.0",
+ "http2-wrapper": "^1.0.0-beta.5.2",
+ "lowercase-keys": "^2.0.0",
+ "p-cancelable": "^2.0.0",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/got?sponsor=1"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
+ },
+ "node_modules/graceful-readlink": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
+ "integrity": "sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w=="
+ },
+ "node_modules/har-schema": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/har-validator": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
+ "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
+ "deprecated": "this library is no longer supported",
+ "dependencies": {
+ "ajv": "^6.12.3",
+ "har-schema": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
+ "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
+ "optional": true,
+ "dependencies": {
+ "get-intrinsic": "^1.1.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "optional": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hosted-git-info": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
+ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
+ },
+ "node_modules/http-cache-semantics": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
+ "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ=="
+ },
+ "node_modules/http-signature": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "dependencies": {
+ "assert-plus": "^1.0.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
+ },
+ "engines": {
+ "node": ">=0.8",
+ "npm": ">=1.3.7"
+ }
+ },
+ "node_modules/http2-wrapper": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
+ "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",
+ "dependencies": {
+ "quick-lru": "^5.1.1",
+ "resolve-alpn": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ }
+ },
+ "node_modules/indent-string": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
+ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
+ "dependencies": {
+ "repeating": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
+ },
+ "node_modules/is-core-module": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
+ "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==",
+ "dependencies": {
+ "has": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-finite": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
+ "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "dependencies": {
+ "number-is-nan": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+ },
+ "node_modules/is-utf8": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
+ },
+ "node_modules/is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dependencies": {
+ "is-docker": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ },
+ "node_modules/isbinaryfile": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz",
+ "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==",
+ "dependencies": {
+ "buffer-alloc": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
+ },
+ "node_modules/isstream": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
+ },
+ "node_modules/jsbn": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="
+ },
+ "node_modules/json-schema": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
+ },
+ "node_modules/json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
+ },
+ "node_modules/jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/jsprim": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
+ "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "dependencies": {
+ "assert-plus": "1.0.0",
+ "extsprintf": "1.3.0",
+ "json-schema": "0.2.3",
+ "verror": "1.10.0"
+ }
+ },
+ "node_modules/junk": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz",
+ "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.0.tgz",
+ "integrity": "sha512-2YvuMsA+jnFGtBareKqgANOEKe1mk3HKiXu2fRmAfyxG0MJAywNhi5ttWA3PMjl4NmpyjZNbFifR2vNjW1znfA==",
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/load-json-file": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "strip-bom": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==",
+ "dependencies": {
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "optional": true
+ },
+ "node_modules/lodash.get": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
+ "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ=="
+ },
+ "node_modules/loud-rejection": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
+ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
+ "dependencies": {
+ "currently-unhandled": "^0.4.1",
+ "signal-exit": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/lowercase-keys": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/map-obj": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
+ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/matcher": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
+ "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
+ "optional": true,
+ "dependencies": {
+ "escape-string-regexp": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/meow": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
+ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
+ "dependencies": {
+ "camelcase-keys": "^2.0.0",
+ "decamelize": "^1.1.2",
+ "loud-rejection": "^1.0.0",
+ "map-obj": "^1.0.1",
+ "minimist": "^1.1.3",
+ "normalize-package-data": "^2.3.4",
+ "object-assign": "^4.0.1",
+ "read-pkg-up": "^1.0.1",
+ "redent": "^1.0.0",
+ "trim-newlines": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.45.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
+ "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.28",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
+ "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
+ "dependencies": {
+ "mime-db": "1.45.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ },
+ "node_modules/mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dependencies": {
+ "minimist": "^1.2.5"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/normalize-package-data": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "dependencies": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "node_modules/normalize-url": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/npm-conf": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz",
+ "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==",
+ "optional": true,
+ "dependencies": {
+ "config-chain": "^1.1.11",
+ "pify": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-conf/node_modules/pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",
+ "optional": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/nugget": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz",
+ "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=",
+ "dependencies": {
+ "debug": "^2.1.3",
+ "minimist": "^1.1.0",
+ "pretty-bytes": "^1.0.2",
+ "progress-stream": "^1.1.0",
+ "request": "^2.45.0",
+ "single-line-log": "^1.1.2",
+ "throttleit": "0.0.2"
+ },
+ "bin": {
+ "nugget": "bin.js"
+ }
+ },
+ "node_modules/nugget/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/nugget/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "node_modules/number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/oauth-sign": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
+ "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/p-cancelable": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
+ "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "dependencies": {
+ "p-try": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==",
+ "dependencies": {
+ "p-limit": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/parse-author": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/parse-author/-/parse-author-2.0.0.tgz",
+ "integrity": "sha512-yx5DfvkN8JsHL2xk2Os9oTia467qnvRgey4ahSm2X8epehBLx/gWLcy5KI+Y36ful5DzGbCS6RazqZGgy1gHNw==",
+ "dependencies": {
+ "author-regex": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/parse-json": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "dependencies": {
+ "error-ex": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+ },
+ "node_modules/path-type": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pend": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
+ },
+ "node_modules/performance-now": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
+ },
+ "node_modules/pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pinkie": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pinkie-promise": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+ "dependencies": {
+ "pinkie": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/plist": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.6.tgz",
+ "integrity": "sha512-WiIVYyrp8TD4w8yCvyeIr+lkmrGRd5u0VbRnU+tP/aRLxP/YadJUYOMZJ/6hIa3oUyVCsycXvtNRgd5XBJIbiA==",
+ "dependencies": {
+ "base64-js": "^1.5.1",
+ "xmlbuilder": "^15.1.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/pretty-bytes": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
+ "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
+ "dependencies": {
+ "get-stdin": "^4.0.1",
+ "meow": "^3.1.0"
+ },
+ "bin": {
+ "pretty-bytes": "cli.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+ },
+ "node_modules/progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/progress-stream": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz",
+ "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=",
+ "dependencies": {
+ "speedometer": "~0.1.2",
+ "through2": "~0.2.3"
+ }
+ },
+ "node_modules/proto-list": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
+ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
+ "optional": true
+ },
+ "node_modules/psl": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
+ "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
+ },
+ "node_modules/pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/quick-lru": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/rc": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "dependencies": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ },
+ "bin": {
+ "rc": "cli.js"
+ }
+ },
+ "node_modules/rcedit": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-3.0.1.tgz",
+ "integrity": "sha512-XM0Jv40/y4hVAqj/MO70o/IWs4uOsaSoo2mLyk3klFDW+SStLnCtzuQu+1OBTIMGlM8CvaK9ftlYCp6DJ+cMsw==",
+ "dependencies": {
+ "cross-spawn-windows-exe": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/read-pkg": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
+ "dependencies": {
+ "load-json-file": "^1.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/read-pkg-up": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+ "dependencies": {
+ "find-up": "^1.0.0",
+ "read-pkg": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/redent": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
+ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
+ "dependencies": {
+ "indent-string": "^2.1.0",
+ "strip-indent": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/repeating": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
+ "dependencies": {
+ "is-finite": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/request": {
+ "version": "2.88.2",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
+ "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+ "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
+ "dependencies": {
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.8.0",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.6",
+ "extend": "~3.0.2",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.3.2",
+ "har-validator": "~5.1.3",
+ "http-signature": "~1.2.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.19",
+ "oauth-sign": "~0.9.0",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.2",
+ "safe-buffer": "^5.1.2",
+ "tough-cookie": "~2.5.0",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.3.2"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.19.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
+ "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
+ "dependencies": {
+ "is-core-module": "^2.1.0",
+ "path-parse": "^1.0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-alpn": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="
+ },
+ "node_modules/responselike": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
+ "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",
+ "dependencies": {
+ "lowercase-keys": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/roarr": {
+ "version": "2.15.4",
+ "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",
+ "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",
+ "optional": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "detect-node": "^2.0.4",
+ "globalthis": "^1.0.1",
+ "json-stringify-safe": "^5.0.1",
+ "semver-compare": "^1.0.0",
+ "sprintf-js": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "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"
+ }
+ ]
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "node_modules/semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "bin": {
+ "semver": "bin/semver"
+ }
+ },
+ "node_modules/semver-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
+ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
+ "optional": true
+ },
+ "node_modules/serialize-error": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
+ "optional": true,
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
+ },
+ "node_modules/single-line-log": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz",
+ "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=",
+ "dependencies": {
+ "string-width": "^1.0.1"
+ }
+ },
+ "node_modules/spdx-correct": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
+ "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
+ "dependencies": {
+ "spdx-expression-parse": "^3.0.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "node_modules/spdx-exceptions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A=="
+ },
+ "node_modules/spdx-expression-parse": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+ "dependencies": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "node_modules/spdx-license-ids": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz",
+ "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ=="
+ },
+ "node_modules/speedometer": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz",
+ "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0="
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
+ "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==",
+ "optional": true
+ },
+ "node_modules/sshpk": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
+ "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
+ "dependencies": {
+ "asn1": "~0.2.3",
+ "assert-plus": "^1.0.0",
+ "bcrypt-pbkdf": "^1.0.0",
+ "dashdash": "^1.12.0",
+ "ecc-jsbn": "~0.1.1",
+ "getpass": "^0.1.1",
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.0.2",
+ "tweetnacl": "~0.14.0"
+ },
+ "bin": {
+ "sshpk-conv": "bin/sshpk-conv",
+ "sshpk-sign": "bin/sshpk-sign",
+ "sshpk-verify": "bin/sshpk-verify"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ },
+ "node_modules/string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dependencies": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "dependencies": {
+ "is-utf8": "^0.2.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
+ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
+ "dependencies": {
+ "get-stdin": "^4.0.1"
+ },
+ "bin": {
+ "strip-indent": "cli.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-outer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz",
+ "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==",
+ "dependencies": {
+ "escape-string-regexp": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-outer/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/sumchecker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz",
+ "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=",
+ "dependencies": {
+ "debug": "^2.2.0"
+ },
+ "engines": {
+ "node": ">= 4.0"
+ }
+ },
+ "node_modules/sumchecker/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/sumchecker/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "node_modules/throttleit": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz",
+ "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8="
+ },
+ "node_modules/through2": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
+ "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
+ "dependencies": {
+ "readable-stream": "~1.1.9",
+ "xtend": "~2.1.1"
+ }
+ },
+ "node_modules/tough-cookie": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+ "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+ "dependencies": {
+ "psl": "^1.1.28",
+ "punycode": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/trim-newlines": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
+ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/trim-repeated": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
+ "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==",
+ "dependencies": {
+ "escape-string-regexp": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/trim-repeated/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
+ "optional": true,
+ "engines": {
+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
+ }
+ },
+ "node_modules/tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/tweetnacl": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
+ },
+ "node_modules/type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "optional": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
+ },
+ "node_modules/universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "node_modules/uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
+ "bin": {
+ "uuid": "bin/uuid"
+ }
+ },
+ "node_modules/validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "dependencies": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ }
+ },
+ "node_modules/verror": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "dependencies": {
+ "assert-plus": "^1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "^1.2.0"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
+ },
+ "node_modules/xmlbuilder": {
+ "version": "15.1.1",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
+ "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/xtend": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
+ "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
+ "dependencies": {
+ "object-keys": "~0.4.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
+ "dependencies": {
+ "buffer-crc32": "~0.2.3",
+ "fd-slicer": "~1.1.0"
+ }
+ }
+ }
+}
diff --git a/node_modules/@electron/get/LICENSE b/node_modules/@electron/get/LICENSE
new file mode 100644
index 0000000..dc1402e
--- /dev/null
+++ b/node_modules/@electron/get/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Contributors to the Electron project
+
+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/@electron/get/README.md b/node_modules/@electron/get/README.md
new file mode 100644
index 0000000..b029b24
--- /dev/null
+++ b/node_modules/@electron/get/README.md
@@ -0,0 +1,142 @@
+# @electron/get
+
+> Download Electron release artifacts
+
+[![CircleCI](https://circleci.com/gh/electron/get.svg?style=svg)](https://circleci.com/gh/electron/get)
+
+## Usage
+
+### Simple: Downloading an Electron Binary ZIP
+
+```typescript
+import { download } from '@electron/get';
+
+// NB: Use this syntax within an async function, Node does not have support for
+// top-level await as of Node 12.
+const zipFilePath = await download('4.0.4');
+```
+
+### Advanced: Downloading a macOS Electron Symbol File
+
+
+```typescript
+import { downloadArtifact } from '@electron/get';
+
+// NB: Use this syntax within an async function, Node does not have support for
+// top-level await as of Node 12.
+const zipFilePath = await downloadArtifact({
+ version: '4.0.4',
+ platform: 'darwin',
+ artifactName: 'electron',
+ artifactSuffix: 'symbols',
+ arch: 'x64',
+});
+```
+
+### Specifying a mirror
+
+To specify another location to download Electron assets from, the following options are
+available:
+
+* `mirrorOptions` Object
+ * `mirror` String (optional) - The base URL of the mirror to download from.
+ * `nightlyMirror` String (optional) - The Electron nightly-specific mirror URL.
+ * `customDir` String (optional) - The name of the directory to download from, often scoped by version number.
+ * `customFilename` String (optional) - The name of the asset to download.
+ * `resolveAssetURL` Function (optional) - A function allowing customization of the url used to download the asset.
+
+Anatomy of a download URL, in terms of `mirrorOptions`:
+
+```
+https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip
+| | | |
+------------------------------------------------------- -----------------------------
+ | |
+ mirror / nightlyMirror | | customFilename
+ ------
+ ||
+ customDir
+```
+
+Example:
+
+```typescript
+import { download } from '@electron/get';
+
+const zipFilePath = await download('4.0.4', {
+ mirrorOptions: {
+ mirror: 'https://mirror.example.com/electron/',
+ customDir: 'custom',
+ customFilename: 'unofficial-electron-linux.zip'
+ }
+});
+// Will download from https://mirror.example.com/electron/custom/unofficial-electron-linux.zip
+
+const nightlyZipFilePath = await download('8.0.0-nightly.20190901', {
+ mirrorOptions: {
+ nightlyMirror: 'https://nightly.example.com/',
+ customDir: 'nightlies',
+ customFilename: 'nightly-linux.zip'
+ }
+});
+// Will download from https://nightly.example.com/nightlies/nightly-linux.zip
+```
+
+`customDir` can have the placeholder `{{ version }}`, which will be replaced by the version
+specified (without the leading `v`). For example:
+
+```javascript
+const zipFilePath = await download('4.0.4', {
+ mirrorOptions: {
+ mirror: 'https://mirror.example.com/electron/',
+ customDir: 'version-{{ version }}',
+ platform: 'linux',
+ arch: 'x64'
+ }
+});
+// Will download from https://mirror.example.com/electron/version-4.0.4/electron-v4.0.4-linux-x64.zip
+```
+
+#### Using environment variables for mirror options
+Mirror options can also be specified via the following environment variables:
+* `ELECTRON_CUSTOM_DIR` - Specifies the custom directory to download from.
+* `ELECTRON_CUSTOM_FILENAME` - Specifies the custom file name to download.
+* `ELECTRON_MIRROR` - Specifies the URL of the server to download from if the version is not a nightly version.
+* `ELECTRON_NIGHTLY_MIRROR` - Specifies the URL of the server to download from if the version is a nightly version.
+
+### Overriding the version downloaded
+
+The version downloaded can be overriden by setting the `ELECTRON_CUSTOM_VERSION` environment variable.
+Setting this environment variable will override the version passed in to `download` or `downloadArtifact`.
+
+## How It Works
+
+This module downloads Electron to a known place on your system and caches it
+so that future requests for that asset can be returned instantly. The cache
+locations are:
+
+* Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`
+* MacOS: `~/Library/Caches/electron/`
+* Windows: `%LOCALAPPDATA%/electron/Cache` or `~/AppData/Local/electron/Cache/`
+
+By default, the module uses [`got`](https://github.com/sindresorhus/got) as the
+downloader. As a result, you can use the same [options](https://github.com/sindresorhus/got#options)
+via `downloadOptions`.
+
+### Progress Bar
+
+By default, a progress bar is shown when downloading an artifact for more than 30 seconds. To
+disable, set the `ELECTRON_GET_NO_PROGRESS` environment variable to any non-empty value, or set
+`quiet` to `true` in `downloadOptions`. If you need to monitor progress yourself via the API, set
+`getProgressCallback` in `downloadOptions`, which has the same function signature as `got`'s
+[`downloadProgress` event callback](https://github.com/sindresorhus/got#ondownloadprogress-progress).
+
+### Proxies
+
+Downstream packages should utilize the `initializeProxy` function to add HTTP(S) proxy support. If
+the environment variable `ELECTRON_GET_USE_PROXY` is set, it is called automatically. A different
+proxy module is used, depending on the version of Node in use, and as such, there are slightly
+different ways to set the proxy environment variables. For Node 10 and above,
+[`global-agent`](https://github.com/gajus/global-agent#environment-variables) is used. Otherwise,
+[`global-tunnel-ng`](https://github.com/np-maintain/global-tunnel#auto-config) is used. Refer to the
+appropriate linked module to determine how to configure proxy support.
diff --git a/node_modules/@electron/get/dist/cjs/Cache.d.ts b/node_modules/@electron/get/dist/cjs/Cache.d.ts
new file mode 100644
index 0000000..626001a
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/Cache.d.ts
@@ -0,0 +1,8 @@
+export declare class Cache {
+ private cacheRoot;
+ constructor(cacheRoot?: string);
+ static getCacheDirectory(downloadUrl: string): string;
+ getCachePath(downloadUrl: string, fileName: string): string;
+ getPathForFileInCache(url: string, fileName: string): Promise<string | null>;
+ putFileInCache(url: string, currentPath: string, fileName: string): Promise<string>;
+}
diff --git a/node_modules/@electron/get/dist/cjs/Cache.js b/node_modules/@electron/get/dist/cjs/Cache.js
new file mode 100644
index 0000000..b8cd197
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/Cache.js
@@ -0,0 +1,60 @@
+"use strict";
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug_1 = require("debug");
+const env_paths_1 = require("env-paths");
+const fs = require("fs-extra");
+const path = require("path");
+const url = require("url");
+const crypto = require("crypto");
+const d = debug_1.default('@electron/get:cache');
+const defaultCacheRoot = env_paths_1.default('electron', {
+ suffix: '',
+}).cache;
+class Cache {
+ constructor(cacheRoot = defaultCacheRoot) {
+ this.cacheRoot = cacheRoot;
+ }
+ static getCacheDirectory(downloadUrl) {
+ const parsedDownloadUrl = url.parse(downloadUrl);
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ const { search, hash, pathname } = parsedDownloadUrl, rest = __rest(parsedDownloadUrl, ["search", "hash", "pathname"]);
+ const strippedUrl = url.format(Object.assign(Object.assign({}, rest), { pathname: path.dirname(pathname || 'electron') }));
+ return crypto
+ .createHash('sha256')
+ .update(strippedUrl)
+ .digest('hex');
+ }
+ getCachePath(downloadUrl, fileName) {
+ return path.resolve(this.cacheRoot, Cache.getCacheDirectory(downloadUrl), fileName);
+ }
+ async getPathForFileInCache(url, fileName) {
+ const cachePath = this.getCachePath(url, fileName);
+ if (await fs.pathExists(cachePath)) {
+ return cachePath;
+ }
+ return null;
+ }
+ async putFileInCache(url, currentPath, fileName) {
+ const cachePath = this.getCachePath(url, fileName);
+ d(`Moving ${currentPath} to ${cachePath}`);
+ if (await fs.pathExists(cachePath)) {
+ d('* Replacing existing file');
+ await fs.remove(cachePath);
+ }
+ await fs.move(currentPath, cachePath);
+ return cachePath;
+ }
+}
+exports.Cache = Cache;
+//# sourceMappingURL=Cache.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/Cache.js.map b/node_modules/@electron/get/dist/cjs/Cache.js.map
new file mode 100644
index 0000000..ec54c24
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/Cache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iCAA0B;AAC1B,yCAAiC;AACjC,+BAA+B;AAC/B,6BAA6B;AAC7B,2BAA2B;AAC3B,iCAAiC;AAEjC,MAAM,CAAC,GAAG,eAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC,MAAM,gBAAgB,GAAG,mBAAQ,CAAC,UAAU,EAAE;IAC5C,MAAM,EAAE,EAAE;CACX,CAAC,CAAC,KAAK,CAAC;AAET,MAAa,KAAK;IAChB,YAAoB,YAAY,gBAAgB;QAA5B,cAAS,GAAT,SAAS,CAAmB;IAAG,CAAC;IAE7C,MAAM,CAAC,iBAAiB,CAAC,WAAmB;QACjD,MAAM,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjD,6DAA6D;QAC7D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAc,iBAAiB,EAA7B,gEAA6B,CAAC;QAC9D,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,iCAAM,IAAI,KAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAG,CAAC;QAE5F,OAAO,MAAM;aACV,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,WAAW,CAAC;aACnB,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEM,YAAY,CAAC,WAAmB,EAAE,QAAgB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtF,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,GAAW,EAAE,QAAgB;QAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,WAAmB,EAAE,QAAgB;QAC5E,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,CAAC,CAAC,UAAU,WAAW,OAAO,SAAS,EAAE,CAAC,CAAC;QAC3C,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,CAAC,CAAC,2BAA2B,CAAC,CAAC;YAC/B,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SAC5B;QAED,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAEtC,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAxCD,sBAwCC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/Downloader.d.ts b/node_modules/@electron/get/dist/cjs/Downloader.d.ts
new file mode 100644
index 0000000..8e5e40e
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/Downloader.d.ts
@@ -0,0 +1,3 @@
+export interface Downloader<T> {
+ download(url: string, targetFilePath: string, options: T): Promise<void>;
+}
diff --git a/node_modules/@electron/get/dist/cjs/Downloader.js b/node_modules/@electron/get/dist/cjs/Downloader.js
new file mode 100644
index 0000000..5940840
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/Downloader.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=Downloader.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/Downloader.js.map b/node_modules/@electron/get/dist/cjs/Downloader.js.map
new file mode 100644
index 0000000..c6199d5
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/Downloader.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Downloader.js","sourceRoot":"","sources":["../../src/Downloader.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/GotDownloader.d.ts b/node_modules/@electron/get/dist/cjs/GotDownloader.d.ts
new file mode 100644
index 0000000..6494756
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/GotDownloader.d.ts
@@ -0,0 +1,21 @@
+import { Progress as GotProgress, Options as GotOptions } from 'got';
+import { Downloader } from './Downloader';
+/**
+ * See [`got#options`](https://github.com/sindresorhus/got#options) for possible keys/values.
+ */
+export declare type GotDownloaderOptions = (GotOptions & {
+ isStream?: true;
+}) & {
+ /**
+ * if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
+ */
+ getProgressCallback?: (progress: GotProgress) => Promise<void>;
+ /**
+ * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
+ * environment variable to a non-empty value also does this).
+ */
+ quiet?: boolean;
+};
+export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
+ download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
+}
diff --git a/node_modules/@electron/get/dist/cjs/GotDownloader.js b/node_modules/@electron/get/dist/cjs/GotDownloader.js
new file mode 100644
index 0000000..ddbab14
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/GotDownloader.js
@@ -0,0 +1,76 @@
+"use strict";
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const fs = require("fs-extra");
+const got_1 = require("got");
+const path = require("path");
+const ProgressBar = require("progress");
+const PROGRESS_BAR_DELAY_IN_SECONDS = 30;
+class GotDownloader {
+ async download(url, targetFilePath, options) {
+ if (!options) {
+ options = {};
+ }
+ const { quiet, getProgressCallback } = options, gotOptions = __rest(options, ["quiet", "getProgressCallback"]);
+ let downloadCompleted = false;
+ let bar;
+ let progressPercent;
+ let timeout = undefined;
+ await fs.mkdirp(path.dirname(targetFilePath));
+ const writeStream = fs.createWriteStream(targetFilePath);
+ if (!quiet || !process.env.ELECTRON_GET_NO_PROGRESS) {
+ const start = new Date();
+ timeout = setTimeout(() => {
+ if (!downloadCompleted) {
+ bar = new ProgressBar(`Downloading ${path.basename(url)}: [:bar] :percent ETA: :eta seconds `, {
+ curr: progressPercent,
+ total: 100,
+ });
+ // https://github.com/visionmedia/node-progress/issues/159
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ bar.start = start;
+ }
+ }, PROGRESS_BAR_DELAY_IN_SECONDS * 1000);
+ }
+ await new Promise((resolve, reject) => {
+ const downloadStream = got_1.default.stream(url, gotOptions);
+ downloadStream.on('downloadProgress', async (progress) => {
+ progressPercent = progress.percent;
+ if (bar) {
+ bar.update(progress.percent);
+ }
+ if (getProgressCallback) {
+ await getProgressCallback(progress);
+ }
+ });
+ downloadStream.on('error', error => {
+ if (error instanceof got_1.HTTPError && error.response.statusCode === 404) {
+ error.message += ` for ${error.response.url}`;
+ }
+ if (writeStream.destroy) {
+ writeStream.destroy(error);
+ }
+ reject(error);
+ });
+ writeStream.on('error', error => reject(error));
+ writeStream.on('close', () => resolve());
+ downloadStream.pipe(writeStream);
+ });
+ downloadCompleted = true;
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+}
+exports.GotDownloader = GotDownloader;
+//# sourceMappingURL=GotDownloader.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/GotDownloader.js.map b/node_modules/@electron/get/dist/cjs/GotDownloader.js.map
new file mode 100644
index 0000000..d5cb566
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/GotDownloader.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"GotDownloader.js","sourceRoot":"","sources":["../../src/GotDownloader.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+BAA+B;AAC/B,6BAAqF;AACrF,6BAA6B;AAC7B,wCAAwC;AAIxC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAiBzC,MAAa,aAAa;IACxB,KAAK,CAAC,QAAQ,CACZ,GAAW,EACX,cAAsB,EACtB,OAA8B;QAE9B,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,EAAE,KAAK,EAAE,mBAAmB,KAAoB,OAAO,EAAzB,8DAAyB,CAAC;QAC9D,IAAI,iBAAiB,GAAG,KAAK,CAAC;QAC9B,IAAI,GAA4B,CAAC;QACjC,IAAI,eAAuB,CAAC;QAC5B,IAAI,OAAO,GAA+B,SAAS,CAAC;QACpD,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QAC9C,MAAM,WAAW,GAAG,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;QAEzD,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE;YACnD,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;YACzB,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBACxB,IAAI,CAAC,iBAAiB,EAAE;oBACtB,GAAG,GAAG,IAAI,WAAW,CACnB,eAAe,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,sCAAsC,EACvE;wBACE,IAAI,EAAE,eAAe;wBACrB,KAAK,EAAE,GAAG;qBACX,CACF,CAAC;oBACF,0DAA0D;oBAC1D,8DAA8D;oBAC7D,GAAW,CAAC,KAAK,GAAG,KAAK,CAAC;iBAC5B;YACH,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC,CAAC;SAC1C;QACD,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1C,MAAM,cAAc,GAAG,aAAG,CAAC,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YACnD,cAAc,CAAC,EAAE,CAAC,kBAAkB,EAAE,KAAK,EAAC,QAAQ,EAAC,EAAE;gBACrD,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC;gBACnC,IAAI,GAAG,EAAE;oBACP,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;iBAC9B;gBACD,IAAI,mBAAmB,EAAE;oBACvB,MAAM,mBAAmB,CAAC,QAAQ,CAAC,CAAC;iBACrC;YACH,CAAC,CAAC,CAAC;YACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;gBACjC,IAAI,KAAK,YAAY,eAAS,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,KAAK,GAAG,EAAE;oBACnE,KAAK,CAAC,OAAO,IAAI,QAAQ,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;iBAC/C;gBACD,IAAI,WAAW,CAAC,OAAO,EAAE;oBACvB,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;iBAC5B;gBAED,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;YACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAChD,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YAEzC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,iBAAiB,GAAG,IAAI,CAAC;QACzB,IAAI,OAAO,EAAE;YACX,YAAY,CAAC,OAAO,CAAC,CAAC;SACvB;IACH,CAAC;CACF;AAlED,sCAkEC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/artifact-utils.d.ts b/node_modules/@electron/get/dist/cjs/artifact-utils.d.ts
new file mode 100644
index 0000000..e03c96e
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/artifact-utils.d.ts
@@ -0,0 +1,4 @@
+import { ElectronArtifactDetails } from './types';
+export declare function getArtifactFileName(details: ElectronArtifactDetails): string;
+export declare function getArtifactRemoteURL(details: ElectronArtifactDetails): Promise<string>;
+export declare function getArtifactVersion(details: ElectronArtifactDetails): string;
diff --git a/node_modules/@electron/get/dist/cjs/artifact-utils.js b/node_modules/@electron/get/dist/cjs/artifact-utils.js
new file mode 100644
index 0000000..5766965
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/artifact-utils.js
@@ -0,0 +1,66 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const utils_1 = require("./utils");
+const BASE_URL = 'https://github.com/electron/electron/releases/download/';
+const NIGHTLY_BASE_URL = 'https://github.com/electron/nightlies/releases/download/';
+function getArtifactFileName(details) {
+ utils_1.ensureIsTruthyString(details, 'artifactName');
+ if (details.isGeneric) {
+ return details.artifactName;
+ }
+ utils_1.ensureIsTruthyString(details, 'arch');
+ utils_1.ensureIsTruthyString(details, 'platform');
+ utils_1.ensureIsTruthyString(details, 'version');
+ return `${[
+ details.artifactName,
+ details.version,
+ details.platform,
+ details.arch,
+ ...(details.artifactSuffix ? [details.artifactSuffix] : []),
+ ].join('-')}.zip`;
+}
+exports.getArtifactFileName = getArtifactFileName;
+function mirrorVar(name, options, defaultValue) {
+ // Convert camelCase to camel_case for env var reading
+ const snakeName = name.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}_${b}`).toLowerCase();
+ return (
+ // .npmrc
+ process.env[`npm_config_electron_${name.toLowerCase()}`] ||
+ process.env[`NPM_CONFIG_ELECTRON_${snakeName.toUpperCase()}`] ||
+ process.env[`npm_config_electron_${snakeName}`] ||
+ // package.json
+ process.env[`npm_package_config_electron_${name}`] ||
+ process.env[`npm_package_config_electron_${snakeName.toLowerCase()}`] ||
+ // env
+ process.env[`ELECTRON_${snakeName.toUpperCase()}`] ||
+ options[name] ||
+ defaultValue);
+}
+async function getArtifactRemoteURL(details) {
+ const opts = details.mirrorOptions || {};
+ let base = mirrorVar('mirror', opts, BASE_URL);
+ if (details.version.includes('nightly')) {
+ const nightlyDeprecated = mirrorVar('nightly_mirror', opts, '');
+ if (nightlyDeprecated) {
+ base = nightlyDeprecated;
+ console.warn(`nightly_mirror is deprecated, please use nightlyMirror`);
+ }
+ else {
+ base = mirrorVar('nightlyMirror', opts, NIGHTLY_BASE_URL);
+ }
+ }
+ const path = mirrorVar('customDir', opts, details.version).replace('{{ version }}', details.version.replace(/^v/, ''));
+ const file = mirrorVar('customFilename', opts, getArtifactFileName(details));
+ // Allow customized download URL resolution.
+ if (opts.resolveAssetURL) {
+ const url = await opts.resolveAssetURL(details);
+ return url;
+ }
+ return `${base}${path}/${file}`;
+}
+exports.getArtifactRemoteURL = getArtifactRemoteURL;
+function getArtifactVersion(details) {
+ return utils_1.normalizeVersion(mirrorVar('customVersion', details.mirrorOptions || {}, details.version));
+}
+exports.getArtifactVersion = getArtifactVersion;
+//# sourceMappingURL=artifact-utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/artifact-utils.js.map b/node_modules/@electron/get/dist/cjs/artifact-utils.js.map
new file mode 100644
index 0000000..bafa6f2
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/artifact-utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"artifact-utils.js","sourceRoot":"","sources":["../../src/artifact-utils.ts"],"names":[],"mappings":";;AACA,mCAAiE;AAEjE,MAAM,QAAQ,GAAG,yDAAyD,CAAC;AAC3E,MAAM,gBAAgB,GAAG,0DAA0D,CAAC;AAEpF,SAAgB,mBAAmB,CAAC,OAAgC;IAClE,4BAAoB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAE9C,IAAI,OAAO,CAAC,SAAS,EAAE;QACrB,OAAO,OAAO,CAAC,YAAY,CAAC;KAC7B;IAED,4BAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtC,4BAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC1C,4BAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAEzC,OAAO,GAAG;QACR,OAAO,CAAC,YAAY;QACpB,OAAO,CAAC,OAAO;QACf,OAAO,CAAC,QAAQ;QAChB,OAAO,CAAC,IAAI;QACZ,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC;AAlBD,kDAkBC;AAED,SAAS,SAAS,CAChB,IAAkD,EAClD,OAAsB,EACtB,YAAoB;IAEpB,sDAAsD;IACtD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAE1F,OAAO;IACL,SAAS;IACT,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,uBAAuB,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,uBAAuB,SAAS,EAAE,CAAC;QAC/C,eAAe;QACf,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,EAAE,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,+BAA+B,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;QACrE,MAAM;QACN,OAAO,CAAC,GAAG,CAAC,YAAY,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC;QACb,YAAY,CACb,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,oBAAoB,CAAC,OAAgC;IACzE,MAAM,IAAI,GAAkB,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC;IACxD,IAAI,IAAI,GAAG,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACvC,MAAM,iBAAiB,GAAG,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAChE,IAAI,iBAAiB,EAAE;YACrB,IAAI,GAAG,iBAAiB,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;SACxE;aAAM;YACL,IAAI,GAAG,SAAS,CAAC,eAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC3D;KACF;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAChE,eAAe,EACf,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAClC,CAAC;IACF,MAAM,IAAI,GAAG,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;IAE7E,4CAA4C;IAC5C,IAAI,IAAI,CAAC,eAAe,EAAE;QACxB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAChD,OAAO,GAAG,CAAC;KACZ;IAED,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;AAClC,CAAC;AAzBD,oDAyBC;AAED,SAAgB,kBAAkB,CAAC,OAAgC;IACjE,OAAO,wBAAgB,CAAC,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,aAAa,IAAI,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AACpG,CAAC;AAFD,gDAEC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/downloader-resolver.d.ts b/node_modules/@electron/get/dist/cjs/downloader-resolver.d.ts
new file mode 100644
index 0000000..f7f09b2
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/downloader-resolver.d.ts
@@ -0,0 +1,3 @@
+import { DownloadOptions } from './types';
+import { Downloader } from './Downloader';
+export declare function getDownloaderForSystem(): Promise<Downloader<DownloadOptions>>;
diff --git a/node_modules/@electron/get/dist/cjs/downloader-resolver.js b/node_modules/@electron/get/dist/cjs/downloader-resolver.js
new file mode 100644
index 0000000..52a51d3
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/downloader-resolver.js
@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+async function getDownloaderForSystem() {
+ // TODO: Resolve the downloader or default to GotDownloader
+ // Current thoughts are a dot-file traversal for something like
+ // ".electron.downloader" which would be a text file with the name of the
+ // npm module to import() and use as the downloader
+ const { GotDownloader } = await Promise.resolve().then(() => require('./GotDownloader'));
+ return new GotDownloader();
+}
+exports.getDownloaderForSystem = getDownloaderForSystem;
+//# sourceMappingURL=downloader-resolver.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/downloader-resolver.js.map b/node_modules/@electron/get/dist/cjs/downloader-resolver.js.map
new file mode 100644
index 0000000..586f565
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/downloader-resolver.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"downloader-resolver.js","sourceRoot":"","sources":["../../src/downloader-resolver.ts"],"names":[],"mappings":";;AAGO,KAAK,UAAU,sBAAsB;IAC1C,2DAA2D;IAC3D,+DAA+D;IAC/D,yEAAyE;IACzE,mDAAmD;IACnD,MAAM,EAAE,aAAa,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;IAC1D,OAAO,IAAI,aAAa,EAAE,CAAC;AAC7B,CAAC;AAPD,wDAOC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/index.d.ts b/node_modules/@electron/get/dist/cjs/index.d.ts
new file mode 100644
index 0000000..93e709e
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/index.d.ts
@@ -0,0 +1,18 @@
+import { ElectronDownloadRequestOptions, ElectronPlatformArtifactDetailsWithDefaults } from './types';
+export { getHostArch } from './utils';
+export { initializeProxy } from './proxy';
+export * from './types';
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+export declare function downloadArtifact(_artifactDetails: ElectronPlatformArtifactDetailsWithDefaults): Promise<string>;
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+export declare function download(version: string, options?: ElectronDownloadRequestOptions): Promise<string>;
diff --git a/node_modules/@electron/get/dist/cjs/index.js b/node_modules/@electron/get/dist/cjs/index.js
new file mode 100644
index 0000000..781ceda
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/index.js
@@ -0,0 +1,130 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug_1 = require("debug");
+const fs = require("fs-extra");
+const path = require("path");
+const semver = require("semver");
+const sumchecker = require("sumchecker");
+const artifact_utils_1 = require("./artifact-utils");
+const Cache_1 = require("./Cache");
+const downloader_resolver_1 = require("./downloader-resolver");
+const proxy_1 = require("./proxy");
+const utils_1 = require("./utils");
+var utils_2 = require("./utils");
+exports.getHostArch = utils_2.getHostArch;
+var proxy_2 = require("./proxy");
+exports.initializeProxy = proxy_2.initializeProxy;
+const d = debug_1.default('@electron/get:index');
+if (process.env.ELECTRON_GET_USE_PROXY) {
+ proxy_1.initializeProxy();
+}
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+async function downloadArtifact(_artifactDetails) {
+ const artifactDetails = Object.assign({}, _artifactDetails);
+ if (!_artifactDetails.isGeneric) {
+ const platformArtifactDetails = artifactDetails;
+ if (!platformArtifactDetails.platform) {
+ d('No platform found, defaulting to the host platform');
+ platformArtifactDetails.platform = process.platform;
+ }
+ if (platformArtifactDetails.arch) {
+ platformArtifactDetails.arch = utils_1.getNodeArch(platformArtifactDetails.arch);
+ }
+ else {
+ d('No arch found, defaulting to the host arch');
+ platformArtifactDetails.arch = utils_1.getHostArch();
+ }
+ }
+ utils_1.ensureIsTruthyString(artifactDetails, 'version');
+ artifactDetails.version = artifact_utils_1.getArtifactVersion(artifactDetails);
+ const fileName = artifact_utils_1.getArtifactFileName(artifactDetails);
+ const url = await artifact_utils_1.getArtifactRemoteURL(artifactDetails);
+ const cache = new Cache_1.Cache(artifactDetails.cacheRoot);
+ // Do not check if the file exists in the cache when force === true
+ if (!artifactDetails.force) {
+ d(`Checking the cache (${artifactDetails.cacheRoot}) for ${fileName} (${url})`);
+ const cachedPath = await cache.getPathForFileInCache(url, fileName);
+ if (cachedPath === null) {
+ d('Cache miss');
+ }
+ else {
+ d('Cache hit');
+ return cachedPath;
+ }
+ }
+ if (!artifactDetails.isGeneric &&
+ utils_1.isOfficialLinuxIA32Download(artifactDetails.platform, artifactDetails.arch, artifactDetails.version, artifactDetails.mirrorOptions)) {
+ console.warn('Official Linux/ia32 support is deprecated.');
+ console.warn('For more info: https://electronjs.org/blog/linux-32bit-support');
+ }
+ return await utils_1.withTempDirectoryIn(artifactDetails.tempDirectory, async (tempFolder) => {
+ const tempDownloadPath = path.resolve(tempFolder, artifact_utils_1.getArtifactFileName(artifactDetails));
+ const downloader = artifactDetails.downloader || (await downloader_resolver_1.getDownloaderForSystem());
+ d(`Downloading ${url} to ${tempDownloadPath} with options: ${JSON.stringify(artifactDetails.downloadOptions)}`);
+ await downloader.download(url, tempDownloadPath, artifactDetails.downloadOptions);
+ // Don't try to verify the hash of the hash file itself
+ // and for older versions that don't have a SHASUMS256.txt
+ if (!artifactDetails.artifactName.startsWith('SHASUMS256') &&
+ !artifactDetails.unsafelyDisableChecksums &&
+ semver.gte(artifactDetails.version, '1.3.2')) {
+ await utils_1.withTempDirectory(async (tmpDir) => {
+ let shasumPath;
+ const checksums = artifactDetails.checksums;
+ if (checksums) {
+ shasumPath = path.resolve(tmpDir, 'SHASUMS256.txt');
+ const fileNames = Object.keys(checksums);
+ if (fileNames.length === 0) {
+ throw new Error('Provided "checksums" object is empty, cannot generate a valid SHASUMS256.txt');
+ }
+ const generatedChecksums = fileNames
+ .map(fileName => `${checksums[fileName]} *${fileName}`)
+ .join('\n');
+ await fs.writeFile(shasumPath, generatedChecksums);
+ }
+ else {
+ shasumPath = await downloadArtifact({
+ isGeneric: true,
+ version: artifactDetails.version,
+ artifactName: 'SHASUMS256.txt',
+ force: artifactDetails.force,
+ downloadOptions: artifactDetails.downloadOptions,
+ cacheRoot: artifactDetails.cacheRoot,
+ downloader: artifactDetails.downloader,
+ mirrorOptions: artifactDetails.mirrorOptions,
+ });
+ }
+ // For versions 1.3.2 - 1.3.4, need to overwrite the `defaultTextEncoding` option:
+ // https://github.com/electron/electron/pull/6676#discussion_r75332120
+ if (semver.satisfies(artifactDetails.version, '1.3.2 - 1.3.4')) {
+ const validatorOptions = {};
+ validatorOptions.defaultTextEncoding = 'binary';
+ const checker = new sumchecker.ChecksumValidator('sha256', shasumPath, validatorOptions);
+ await checker.validate(path.dirname(tempDownloadPath), path.basename(tempDownloadPath));
+ }
+ else {
+ await sumchecker('sha256', shasumPath, path.dirname(tempDownloadPath), [
+ path.basename(tempDownloadPath),
+ ]);
+ }
+ });
+ }
+ return await cache.putFileInCache(url, tempDownloadPath, fileName);
+ });
+}
+exports.downloadArtifact = downloadArtifact;
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+function download(version, options) {
+ return downloadArtifact(Object.assign(Object.assign({}, options), { version, platform: process.platform, arch: process.arch, artifactName: 'electron' }));
+}
+exports.download = download;
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/index.js.map b/node_modules/@electron/get/dist/cjs/index.js.map
new file mode 100644
index 0000000..ac5d93c
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,iCAA0B;AAC1B,+BAA+B;AAC/B,6BAA6B;AAC7B,iCAAiC;AACjC,yCAAyC;AAEzC,qDAAiG;AAOjG,mCAAgC;AAChC,+DAA+D;AAC/D,mCAA0C;AAC1C,mCAOiB;AAEjB,iCAAsC;AAA7B,8BAAA,WAAW,CAAA;AACpB,iCAA0C;AAAjC,kCAAA,eAAe,CAAA;AAGxB,MAAM,CAAC,GAAG,eAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;IACtC,uBAAe,EAAE,CAAC;CACnB;AAED;;;;;GAKG;AACI,KAAK,UAAU,gBAAgB,CACpC,gBAA6D;IAE7D,MAAM,eAAe,qBACf,gBAA4C,CACjD,CAAC;IACF,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC/B,MAAM,uBAAuB,GAAG,eAAkD,CAAC;QACnF,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EAAE;YACrC,CAAC,CAAC,oDAAoD,CAAC,CAAC;YACxD,uBAAuB,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;SACrD;QACD,IAAI,uBAAuB,CAAC,IAAI,EAAE;YAChC,uBAAuB,CAAC,IAAI,GAAG,mBAAW,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;SAC1E;aAAM;YACL,CAAC,CAAC,4CAA4C,CAAC,CAAC;YAChD,uBAAuB,CAAC,IAAI,GAAG,mBAAW,EAAE,CAAC;SAC9C;KACF;IACD,4BAAoB,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IAEjD,eAAe,CAAC,OAAO,GAAG,mCAAkB,CAAC,eAAe,CAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,oCAAmB,CAAC,eAAe,CAAC,CAAC;IACtD,MAAM,GAAG,GAAG,MAAM,qCAAoB,CAAC,eAAe,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,IAAI,aAAK,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IAEnD,mEAAmE;IACnE,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE;QAC1B,CAAC,CAAC,uBAAuB,eAAe,CAAC,SAAS,SAAS,QAAQ,KAAK,GAAG,GAAG,CAAC,CAAC;QAChF,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,qBAAqB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAEpE,IAAI,UAAU,KAAK,IAAI,EAAE;YACvB,CAAC,CAAC,YAAY,CAAC,CAAC;SACjB;aAAM;YACL,CAAC,CAAC,WAAW,CAAC,CAAC;YACf,OAAO,UAAU,CAAC;SACnB;KACF;IAED,IACE,CAAC,eAAe,CAAC,SAAS;QAC1B,mCAA2B,CACzB,eAAe,CAAC,QAAQ,EACxB,eAAe,CAAC,IAAI,EACpB,eAAe,CAAC,OAAO,EACvB,eAAe,CAAC,aAAa,CAC9B,EACD;QACA,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;KAChF;IAED,OAAO,MAAM,2BAAmB,CAAC,eAAe,CAAC,aAAa,EAAE,KAAK,EAAC,UAAU,EAAC,EAAE;QACjF,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,oCAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;QAExF,MAAM,UAAU,GAAG,eAAe,CAAC,UAAU,IAAI,CAAC,MAAM,4CAAsB,EAAE,CAAC,CAAC;QAClF,CAAC,CACC,eAAe,GAAG,OAAO,gBAAgB,kBAAkB,IAAI,CAAC,SAAS,CACvE,eAAe,CAAC,eAAe,CAChC,EAAE,CACJ,CAAC;QACF,MAAM,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;QAElF,uDAAuD;QACvD,0DAA0D;QAC1D,IACE,CAAC,eAAe,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC;YACtD,CAAC,eAAe,CAAC,wBAAwB;YACzC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,EAC5C;YACA,MAAM,yBAAiB,CAAC,KAAK,EAAC,MAAM,EAAC,EAAE;gBACrC,IAAI,UAAkB,CAAC;gBACvB,MAAM,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;gBAC5C,IAAI,SAAS,EAAE;oBACb,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;oBACpD,MAAM,SAAS,GAAa,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;oBACnD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;wBAC1B,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E,CAAC;qBACH;oBACD,MAAM,kBAAkB,GAAG,SAAS;yBACjC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE,CAAC;yBACtD,IAAI,CAAC,IAAI,CAAC,CAAC;oBACd,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;iBACpD;qBAAM;oBACL,UAAU,GAAG,MAAM,gBAAgB,CAAC;wBAClC,SAAS,EAAE,IAAI;wBACf,OAAO,EAAE,eAAe,CAAC,OAAO;wBAChC,YAAY,EAAE,gBAAgB;wBAC9B,KAAK,EAAE,eAAe,CAAC,KAAK;wBAC5B,eAAe,EAAE,eAAe,CAAC,eAAe;wBAChD,SAAS,EAAE,eAAe,CAAC,SAAS;wBACpC,UAAU,EAAE,eAAe,CAAC,UAAU;wBACtC,aAAa,EAAE,eAAe,CAAC,aAAa;qBAC7C,CAAC,CAAC;iBACJ;gBAED,kFAAkF;gBAClF,sEAAsE;gBACtE,IAAI,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,EAAE;oBAC9D,MAAM,gBAAgB,GAA+B,EAAE,CAAC;oBACxD,gBAAgB,CAAC,mBAAmB,GAAG,QAAQ,CAAC;oBAChD,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,iBAAiB,CAAC,QAAQ,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;oBACzF,MAAM,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;iBACzF;qBAAM;oBACL,MAAM,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;wBACrE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;qBAChC,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,MAAM,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC;AAnHD,4CAmHC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CACtB,OAAe,EACf,OAAwC;IAExC,OAAO,gBAAgB,iCAClB,OAAO,KACV,OAAO,EACP,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,YAAY,EAAE,UAAU,IACxB,CAAC;AACL,CAAC;AAXD,4BAWC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/proxy.d.ts b/node_modules/@electron/get/dist/cjs/proxy.d.ts
new file mode 100644
index 0000000..df3e16a
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/proxy.d.ts
@@ -0,0 +1,4 @@
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+export declare function initializeProxy(): void;
diff --git a/node_modules/@electron/get/dist/cjs/proxy.js b/node_modules/@electron/get/dist/cjs/proxy.js
new file mode 100644
index 0000000..68160a8
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/proxy.js
@@ -0,0 +1,32 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug = require("debug");
+const utils_1 = require("./utils");
+const d = debug('@electron/get:proxy');
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+function initializeProxy() {
+ try {
+ // Code originally from https://github.com/yeoman/yo/blob/b2eea87e/lib/cli.js#L19-L28
+ const MAJOR_NODEJS_VERSION = parseInt(process.version.slice(1).split('.')[0], 10);
+ if (MAJOR_NODEJS_VERSION >= 10) {
+ // See: https://github.com/electron/get/pull/214#discussion_r798845713
+ const env = utils_1.getEnv('GLOBAL_AGENT_');
+ utils_1.setEnv('GLOBAL_AGENT_HTTP_PROXY', env('HTTP_PROXY'));
+ utils_1.setEnv('GLOBAL_AGENT_HTTPS_PROXY', env('HTTPS_PROXY'));
+ utils_1.setEnv('GLOBAL_AGENT_NO_PROXY', env('NO_PROXY'));
+ // `global-agent` works with Node.js v10 and above.
+ require('global-agent').bootstrap();
+ }
+ else {
+ // `global-tunnel-ng` works with Node.js v10 and below.
+ require('global-tunnel-ng').initialize();
+ }
+ }
+ catch (e) {
+ d('Could not load either proxy modules, built-in proxy support not available:', e);
+ }
+}
+exports.initializeProxy = initializeProxy;
+//# sourceMappingURL=proxy.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/proxy.js.map b/node_modules/@electron/get/dist/cjs/proxy.js.map
new file mode 100644
index 0000000..19b8124
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/proxy.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/proxy.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAC/B,mCAAyC;AAEzC,MAAM,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC;;GAEG;AACH,SAAgB,eAAe;IAC7B,IAAI;QACF,qFAAqF;QACrF,MAAM,oBAAoB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAElF,IAAI,oBAAoB,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,MAAM,GAAG,GAAG,cAAM,CAAC,eAAe,CAAC,CAAC;YAEpC,cAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;YACrD,cAAM,CAAC,0BAA0B,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;YACvD,cAAM,CAAC,uBAAuB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;YAEjD,mDAAmD;YACnD,OAAO,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,CAAC;SACrC;aAAM;YACL,uDAAuD;YACvD,OAAO,CAAC,kBAAkB,CAAC,CAAC,UAAU,EAAE,CAAC;SAC1C;KACF;IAAC,OAAO,CAAC,EAAE;QACV,CAAC,CAAC,4EAA4E,EAAE,CAAC,CAAC,CAAC;KACpF;AACH,CAAC;AAtBD,0CAsBC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/types.d.ts b/node_modules/@electron/get/dist/cjs/types.d.ts
new file mode 100644
index 0000000..a8284bb
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/types.d.ts
@@ -0,0 +1,129 @@
+import { Downloader } from './Downloader';
+export declare type DownloadOptions = any;
+export interface MirrorOptions {
+ /**
+ * DEPRECATED - see nightlyMirror.
+ */
+ nightly_mirror?: string;
+ /**
+ * The Electron nightly-specific mirror URL.
+ */
+ nightlyMirror?: string;
+ /**
+ * The base URL of the mirror to download from,
+ * e.g https://github.com/electron/electron/releases/download
+ */
+ mirror?: string;
+ /**
+ * The name of the directory to download from,
+ * often scoped by version number e.g 'v4.0.4'
+ */
+ customDir?: string;
+ /**
+ * The name of the asset to download,
+ * e.g 'electron-v4.0.4-linux-x64.zip'
+ */
+ customFilename?: string;
+ /**
+ * The version of the asset to download,
+ * e.g '4.0.4'
+ */
+ customVersion?: string;
+ /**
+ * A function allowing customization of the url returned
+ * from getArtifactRemoteURL().
+ */
+ resolveAssetURL?: (opts: DownloadOptions) => Promise<string>;
+}
+export interface ElectronDownloadRequest {
+ /**
+ * The version of Electron associated with the artifact.
+ */
+ version: string;
+ /**
+ * The type of artifact. For example:
+ * * `electron`
+ * * `ffmpeg`
+ */
+ artifactName: string;
+}
+export interface ElectronDownloadRequestOptions {
+ /**
+ * Whether to download an artifact regardless of whether it's in the cache directory.
+ *
+ * Defaults to `false`.
+ */
+ force?: boolean;
+ /**
+ * When set to `true`, disables checking that the artifact download completed successfully
+ * with the correct payload.
+ *
+ * Defaults to `false`.
+ */
+ unsafelyDisableChecksums?: boolean;
+ /**
+ * Provides checksums for the artifact as strings.
+ * Can be used if you already know the checksums of the Electron artifact
+ * you are downloading and want to skip the checksum file download
+ * without skipping the checksum validation.
+ *
+ * This should be an object whose keys are the file names of the artifacts and
+ * the values are their respective SHA256 checksums.
+ */
+ checksums?: Record<string, string>;
+ /**
+ * The directory that caches Electron artifact downloads.
+ *
+ * The default value is dependent upon the host platform:
+ *
+ * * Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`
+ * * MacOS: `~/Library/Caches/electron/`
+ * * Windows: `%LOCALAPPDATA%/electron/Cache` or `~/AppData/Local/electron/Cache/`
+ */
+ cacheRoot?: string;
+ /**
+ * Options passed to the downloader module.
+ */
+ downloadOptions?: DownloadOptions;
+ /**
+ * Options related to specifying an artifact mirror.
+ */
+ mirrorOptions?: MirrorOptions;
+ /**
+ * The custom [[Downloader]] class used to download artifacts. Defaults to the
+ * built-in [[GotDownloader]].
+ */
+ downloader?: Downloader<DownloadOptions>;
+ /**
+ * A temporary directory for downloads.
+ * It is used before artifacts are put into cache.
+ */
+ tempDirectory?: string;
+}
+export declare type ElectronPlatformArtifactDetails = {
+ /**
+ * The target artifact platform. These are Node-style platform names, for example:
+ * * `win32`
+ * * `darwin`
+ * * `linux`
+ */
+ platform: string;
+ /**
+ * The target artifact architecture. These are Node-style architecture names, for example:
+ * * `ia32`
+ * * `x64`
+ * * `armv7l`
+ */
+ arch: string;
+ artifactSuffix?: string;
+ isGeneric?: false;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronGenericArtifactDetails = {
+ isGeneric: true;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronArtifactDetails = ElectronPlatformArtifactDetails | ElectronGenericArtifactDetails;
+export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
+export declare type ElectronPlatformArtifactDetailsWithDefaults = (Omit<ElectronPlatformArtifactDetails, 'platform' | 'arch'> & {
+ platform?: string;
+ arch?: string;
+}) | ElectronGenericArtifactDetails;
diff --git a/node_modules/@electron/get/dist/cjs/types.js b/node_modules/@electron/get/dist/cjs/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/types.js.map b/node_modules/@electron/get/dist/cjs/types.js.map
new file mode 100644
index 0000000..7b5fff8
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/utils.d.ts b/node_modules/@electron/get/dist/cjs/utils.d.ts
new file mode 100644
index 0000000..3cc40c1
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/utils.d.ts
@@ -0,0 +1,25 @@
+export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function withTempDirectory<T>(fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function normalizeVersion(version: string): string;
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+export declare function uname(): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+export declare function getNodeArch(arch: string): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+export declare function getHostArch(): string;
+export declare function ensureIsTruthyString<T, K extends keyof T>(obj: T, key: K): void;
+export declare function isOfficialLinuxIA32Download(platform: string, arch: string, version: string, mirrorOptions?: object): boolean;
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+export declare function getEnv(prefix?: string): (name: string) => string | undefined;
+export declare function setEnv(key: string, value: string | undefined): void;
diff --git a/node_modules/@electron/get/dist/cjs/utils.js b/node_modules/@electron/get/dist/cjs/utils.js
new file mode 100644
index 0000000..4806842
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/utils.js
@@ -0,0 +1,107 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const childProcess = require("child_process");
+const fs = require("fs-extra");
+const os = require("os");
+const path = require("path");
+async function useAndRemoveDirectory(directory, fn) {
+ let result;
+ try {
+ result = await fn(directory);
+ }
+ finally {
+ await fs.remove(directory);
+ }
+ return result;
+}
+async function withTempDirectoryIn(parentDirectory = os.tmpdir(), fn) {
+ const tempDirectoryPrefix = 'electron-download-';
+ const tempDirectory = await fs.mkdtemp(path.resolve(parentDirectory, tempDirectoryPrefix));
+ return useAndRemoveDirectory(tempDirectory, fn);
+}
+exports.withTempDirectoryIn = withTempDirectoryIn;
+async function withTempDirectory(fn) {
+ return withTempDirectoryIn(undefined, fn);
+}
+exports.withTempDirectory = withTempDirectory;
+function normalizeVersion(version) {
+ if (!version.startsWith('v')) {
+ return `v${version}`;
+ }
+ return version;
+}
+exports.normalizeVersion = normalizeVersion;
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+function uname() {
+ return childProcess
+ .execSync('uname -m')
+ .toString()
+ .trim();
+}
+exports.uname = uname;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+function getNodeArch(arch) {
+ if (arch === 'arm') {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ switch (process.config.variables.arm_version) {
+ case '6':
+ return uname();
+ case '7':
+ default:
+ return 'armv7l';
+ }
+ }
+ return arch;
+}
+exports.getNodeArch = getNodeArch;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+function getHostArch() {
+ return getNodeArch(process.arch);
+}
+exports.getHostArch = getHostArch;
+function ensureIsTruthyString(obj, key) {
+ if (!obj[key] || typeof obj[key] !== 'string') {
+ throw new Error(`Expected property "${key}" to be provided as a string but it was not`);
+ }
+}
+exports.ensureIsTruthyString = ensureIsTruthyString;
+function isOfficialLinuxIA32Download(platform, arch, version, mirrorOptions) {
+ return (platform === 'linux' &&
+ arch === 'ia32' &&
+ Number(version.slice(1).split('.')[0]) >= 4 &&
+ typeof mirrorOptions === 'undefined');
+}
+exports.isOfficialLinuxIA32Download = isOfficialLinuxIA32Download;
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+function getEnv(prefix = '') {
+ const envsLowerCase = {};
+ for (const envKey in process.env) {
+ envsLowerCase[envKey.toLowerCase()] = process.env[envKey];
+ }
+ return (name) => {
+ return (envsLowerCase[`${prefix}${name}`.toLowerCase()] ||
+ envsLowerCase[name.toLowerCase()] ||
+ undefined);
+ };
+}
+exports.getEnv = getEnv;
+function setEnv(key, value) {
+ // The `void` operator always returns `undefined`.
+ // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void
+ if (value !== void 0) {
+ process.env[key] = value;
+ }
+}
+exports.setEnv = setEnv;
+//# sourceMappingURL=utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/cjs/utils.js.map b/node_modules/@electron/get/dist/cjs/utils.js.map
new file mode 100644
index 0000000..5add151
--- /dev/null
+++ b/node_modules/@electron/get/dist/cjs/utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;AAAA,8CAA8C;AAC9C,+BAA+B;AAC/B,yBAAyB;AACzB,6BAA6B;AAE7B,KAAK,UAAU,qBAAqB,CAClC,SAAiB,EACjB,EAAqC;IAErC,IAAI,MAAS,CAAC;IACd,IAAI;QACF,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC;KAC9B;YAAS;QACR,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;KAC5B;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAEM,KAAK,UAAU,mBAAmB,CACvC,kBAA0B,EAAE,CAAC,MAAM,EAAE,EACrC,EAAqC;IAErC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;IACjD,MAAM,aAAa,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC3F,OAAO,qBAAqB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAClD,CAAC;AAPD,kDAOC;AAEM,KAAK,UAAU,iBAAiB,CAAI,EAAqC;IAC9E,OAAO,mBAAmB,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QAC5B,OAAO,IAAI,OAAO,EAAE,CAAC;KACtB;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AALD,4CAKC;AAED;;GAEG;AACH,SAAgB,KAAK;IACnB,OAAO,YAAY;SAChB,QAAQ,CAAC,UAAU,CAAC;SACpB,QAAQ,EAAE;SACV,IAAI,EAAE,CAAC;AACZ,CAAC;AALD,sBAKC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAY;IACtC,IAAI,IAAI,KAAK,KAAK,EAAE;QAClB,8DAA8D;QAC9D,QAAS,OAAO,CAAC,MAAM,CAAC,SAAiB,CAAC,WAAW,EAAE;YACrD,KAAK,GAAG;gBACN,OAAO,KAAK,EAAE,CAAC;YACjB,KAAK,GAAG,CAAC;YACT;gBACE,OAAO,QAAQ,CAAC;SACnB;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,kCAaC;AAED;;;GAGG;AACH,SAAgB,WAAW;IACzB,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAFD,kCAEC;AAED,SAAgB,oBAAoB,CAAuB,GAAM,EAAE,GAAM;IACvE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;QAC7C,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,6CAA6C,CAAC,CAAC;KACzF;AACH,CAAC;AAJD,oDAIC;AAED,SAAgB,2BAA2B,CACzC,QAAgB,EAChB,IAAY,EACZ,OAAe,EACf,aAAsB;IAEtB,OAAO,CACL,QAAQ,KAAK,OAAO;QACpB,IAAI,KAAK,MAAM;QACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3C,OAAO,aAAa,KAAK,WAAW,CACrC,CAAC;AACJ,CAAC;AAZD,kEAYC;AAED;;;GAGG;AACH,SAAgB,MAAM,CAAC,MAAM,GAAG,EAAE;IAChC,MAAM,aAAa,GAAsB,EAAE,CAAC;IAE5C,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE;QAChC,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;KAC3D;IAED,OAAO,CAAC,IAAY,EAAsB,EAAE;QAC1C,OAAO,CACL,aAAa,CAAC,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAC/C,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACjC,SAAS,CACV,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAdD,wBAcC;AAED,SAAgB,MAAM,CAAC,GAAW,EAAE,KAAyB;IAC3D,kDAAkD;IAClD,wFAAwF;IACxF,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE;QACpB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;KAC1B;AACH,CAAC;AAND,wBAMC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/Cache.d.ts b/node_modules/@electron/get/dist/esm/Cache.d.ts
new file mode 100644
index 0000000..626001a
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/Cache.d.ts
@@ -0,0 +1,8 @@
+export declare class Cache {
+ private cacheRoot;
+ constructor(cacheRoot?: string);
+ static getCacheDirectory(downloadUrl: string): string;
+ getCachePath(downloadUrl: string, fileName: string): string;
+ getPathForFileInCache(url: string, fileName: string): Promise<string | null>;
+ putFileInCache(url: string, currentPath: string, fileName: string): Promise<string>;
+}
diff --git a/node_modules/@electron/get/dist/esm/Cache.js b/node_modules/@electron/get/dist/esm/Cache.js
new file mode 100644
index 0000000..4801010
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/Cache.js
@@ -0,0 +1,57 @@
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+import debug from 'debug';
+import envPaths from 'env-paths';
+import * as fs from 'fs-extra';
+import * as path from 'path';
+import * as url from 'url';
+import * as crypto from 'crypto';
+const d = debug('@electron/get:cache');
+const defaultCacheRoot = envPaths('electron', {
+ suffix: '',
+}).cache;
+export class Cache {
+ constructor(cacheRoot = defaultCacheRoot) {
+ this.cacheRoot = cacheRoot;
+ }
+ static getCacheDirectory(downloadUrl) {
+ const parsedDownloadUrl = url.parse(downloadUrl);
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ const { search, hash, pathname } = parsedDownloadUrl, rest = __rest(parsedDownloadUrl, ["search", "hash", "pathname"]);
+ const strippedUrl = url.format(Object.assign(Object.assign({}, rest), { pathname: path.dirname(pathname || 'electron') }));
+ return crypto
+ .createHash('sha256')
+ .update(strippedUrl)
+ .digest('hex');
+ }
+ getCachePath(downloadUrl, fileName) {
+ return path.resolve(this.cacheRoot, Cache.getCacheDirectory(downloadUrl), fileName);
+ }
+ async getPathForFileInCache(url, fileName) {
+ const cachePath = this.getCachePath(url, fileName);
+ if (await fs.pathExists(cachePath)) {
+ return cachePath;
+ }
+ return null;
+ }
+ async putFileInCache(url, currentPath, fileName) {
+ const cachePath = this.getCachePath(url, fileName);
+ d(`Moving ${currentPath} to ${cachePath}`);
+ if (await fs.pathExists(cachePath)) {
+ d('* Replacing existing file');
+ await fs.remove(cachePath);
+ }
+ await fs.move(currentPath, cachePath);
+ return cachePath;
+ }
+}
+//# sourceMappingURL=Cache.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/Cache.js.map b/node_modules/@electron/get/dist/esm/Cache.js.map
new file mode 100644
index 0000000..943403b
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/Cache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,UAAU,EAAE;IAC5C,MAAM,EAAE,EAAE;CACX,CAAC,CAAC,KAAK,CAAC;AAET,MAAM,OAAO,KAAK;IAChB,YAAoB,YAAY,gBAAgB;QAA5B,cAAS,GAAT,SAAS,CAAmB;IAAG,CAAC;IAE7C,MAAM,CAAC,iBAAiB,CAAC,WAAmB;QACjD,MAAM,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjD,6DAA6D;QAC7D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAc,iBAAiB,EAA7B,gEAA6B,CAAC;QAC9D,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,iCAAM,IAAI,KAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAG,CAAC;QAE5F,OAAO,MAAM;aACV,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,WAAW,CAAC;aACnB,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEM,YAAY,CAAC,WAAmB,EAAE,QAAgB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtF,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,GAAW,EAAE,QAAgB;QAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,WAAmB,EAAE,QAAgB;QAC5E,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,CAAC,CAAC,UAAU,WAAW,OAAO,SAAS,EAAE,CAAC,CAAC;QAC3C,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,CAAC,CAAC,2BAA2B,CAAC,CAAC;YAC/B,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SAC5B;QAED,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAEtC,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/Downloader.d.ts b/node_modules/@electron/get/dist/esm/Downloader.d.ts
new file mode 100644
index 0000000..8e5e40e
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/Downloader.d.ts
@@ -0,0 +1,3 @@
+export interface Downloader<T> {
+ download(url: string, targetFilePath: string, options: T): Promise<void>;
+}
diff --git a/node_modules/@electron/get/dist/esm/Downloader.js b/node_modules/@electron/get/dist/esm/Downloader.js
new file mode 100644
index 0000000..6ff5866
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/Downloader.js
@@ -0,0 +1 @@
+//# sourceMappingURL=Downloader.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/Downloader.js.map b/node_modules/@electron/get/dist/esm/Downloader.js.map
new file mode 100644
index 0000000..c6199d5
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/Downloader.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Downloader.js","sourceRoot":"","sources":["../../src/Downloader.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/GotDownloader.d.ts b/node_modules/@electron/get/dist/esm/GotDownloader.d.ts
new file mode 100644
index 0000000..6494756
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/GotDownloader.d.ts
@@ -0,0 +1,21 @@
+import { Progress as GotProgress, Options as GotOptions } from 'got';
+import { Downloader } from './Downloader';
+/**
+ * See [`got#options`](https://github.com/sindresorhus/got#options) for possible keys/values.
+ */
+export declare type GotDownloaderOptions = (GotOptions & {
+ isStream?: true;
+}) & {
+ /**
+ * if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
+ */
+ getProgressCallback?: (progress: GotProgress) => Promise<void>;
+ /**
+ * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
+ * environment variable to a non-empty value also does this).
+ */
+ quiet?: boolean;
+};
+export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
+ download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
+}
diff --git a/node_modules/@electron/get/dist/esm/GotDownloader.js b/node_modules/@electron/get/dist/esm/GotDownloader.js
new file mode 100644
index 0000000..921bbeb
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/GotDownloader.js
@@ -0,0 +1,73 @@
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+import * as fs from 'fs-extra';
+import got, { HTTPError } from 'got';
+import * as path from 'path';
+import * as ProgressBar from 'progress';
+const PROGRESS_BAR_DELAY_IN_SECONDS = 30;
+export class GotDownloader {
+ async download(url, targetFilePath, options) {
+ if (!options) {
+ options = {};
+ }
+ const { quiet, getProgressCallback } = options, gotOptions = __rest(options, ["quiet", "getProgressCallback"]);
+ let downloadCompleted = false;
+ let bar;
+ let progressPercent;
+ let timeout = undefined;
+ await fs.mkdirp(path.dirname(targetFilePath));
+ const writeStream = fs.createWriteStream(targetFilePath);
+ if (!quiet || !process.env.ELECTRON_GET_NO_PROGRESS) {
+ const start = new Date();
+ timeout = setTimeout(() => {
+ if (!downloadCompleted) {
+ bar = new ProgressBar(`Downloading ${path.basename(url)}: [:bar] :percent ETA: :eta seconds `, {
+ curr: progressPercent,
+ total: 100,
+ });
+ // https://github.com/visionmedia/node-progress/issues/159
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ bar.start = start;
+ }
+ }, PROGRESS_BAR_DELAY_IN_SECONDS * 1000);
+ }
+ await new Promise((resolve, reject) => {
+ const downloadStream = got.stream(url, gotOptions);
+ downloadStream.on('downloadProgress', async (progress) => {
+ progressPercent = progress.percent;
+ if (bar) {
+ bar.update(progress.percent);
+ }
+ if (getProgressCallback) {
+ await getProgressCallback(progress);
+ }
+ });
+ downloadStream.on('error', error => {
+ if (error instanceof HTTPError && error.response.statusCode === 404) {
+ error.message += ` for ${error.response.url}`;
+ }
+ if (writeStream.destroy) {
+ writeStream.destroy(error);
+ }
+ reject(error);
+ });
+ writeStream.on('error', error => reject(error));
+ writeStream.on('close', () => resolve());
+ downloadStream.pipe(writeStream);
+ });
+ downloadCompleted = true;
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ }
+}
+//# sourceMappingURL=GotDownloader.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/GotDownloader.js.map b/node_modules/@electron/get/dist/esm/GotDownloader.js.map
new file mode 100644
index 0000000..4117388
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/GotDownloader.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"GotDownloader.js","sourceRoot":"","sources":["../../src/GotDownloader.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,GAAG,EAAE,EAAE,SAAS,EAAkD,MAAM,KAAK,CAAC;AACrF,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,WAAW,MAAM,UAAU,CAAC;AAIxC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAiBzC,MAAM,OAAO,aAAa;IACxB,KAAK,CAAC,QAAQ,CACZ,GAAW,EACX,cAAsB,EACtB,OAA8B;QAE9B,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,EAAE,KAAK,EAAE,mBAAmB,KAAoB,OAAO,EAAzB,8DAAyB,CAAC;QAC9D,IAAI,iBAAiB,GAAG,KAAK,CAAC;QAC9B,IAAI,GAA4B,CAAC;QACjC,IAAI,eAAuB,CAAC;QAC5B,IAAI,OAAO,GAA+B,SAAS,CAAC;QACpD,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QAC9C,MAAM,WAAW,GAAG,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;QAEzD,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE;YACnD,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;YACzB,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBACxB,IAAI,CAAC,iBAAiB,EAAE;oBACtB,GAAG,GAAG,IAAI,WAAW,CACnB,eAAe,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,sCAAsC,EACvE;wBACE,IAAI,EAAE,eAAe;wBACrB,KAAK,EAAE,GAAG;qBACX,CACF,CAAC;oBACF,0DAA0D;oBAC1D,8DAA8D;oBAC7D,GAAW,CAAC,KAAK,GAAG,KAAK,CAAC;iBAC5B;YACH,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC,CAAC;SAC1C;QACD,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1C,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YACnD,cAAc,CAAC,EAAE,CAAC,kBAAkB,EAAE,KAAK,EAAC,QAAQ,EAAC,EAAE;gBACrD,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC;gBACnC,IAAI,GAAG,EAAE;oBACP,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;iBAC9B;gBACD,IAAI,mBAAmB,EAAE;oBACvB,MAAM,mBAAmB,CAAC,QAAQ,CAAC,CAAC;iBACrC;YACH,CAAC,CAAC,CAAC;YACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;gBACjC,IAAI,KAAK,YAAY,SAAS,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,KAAK,GAAG,EAAE;oBACnE,KAAK,CAAC,OAAO,IAAI,QAAQ,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;iBAC/C;gBACD,IAAI,WAAW,CAAC,OAAO,EAAE;oBACvB,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;iBAC5B;gBAED,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;YACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAChD,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YAEzC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,iBAAiB,GAAG,IAAI,CAAC;QACzB,IAAI,OAAO,EAAE;YACX,YAAY,CAAC,OAAO,CAAC,CAAC;SACvB;IACH,CAAC;CACF"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/artifact-utils.d.ts b/node_modules/@electron/get/dist/esm/artifact-utils.d.ts
new file mode 100644
index 0000000..e03c96e
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/artifact-utils.d.ts
@@ -0,0 +1,4 @@
+import { ElectronArtifactDetails } from './types';
+export declare function getArtifactFileName(details: ElectronArtifactDetails): string;
+export declare function getArtifactRemoteURL(details: ElectronArtifactDetails): Promise<string>;
+export declare function getArtifactVersion(details: ElectronArtifactDetails): string;
diff --git a/node_modules/@electron/get/dist/esm/artifact-utils.js b/node_modules/@electron/get/dist/esm/artifact-utils.js
new file mode 100644
index 0000000..8dc1433
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/artifact-utils.js
@@ -0,0 +1,61 @@
+import { ensureIsTruthyString, normalizeVersion } from './utils';
+const BASE_URL = 'https://github.com/electron/electron/releases/download/';
+const NIGHTLY_BASE_URL = 'https://github.com/electron/nightlies/releases/download/';
+export function getArtifactFileName(details) {
+ ensureIsTruthyString(details, 'artifactName');
+ if (details.isGeneric) {
+ return details.artifactName;
+ }
+ ensureIsTruthyString(details, 'arch');
+ ensureIsTruthyString(details, 'platform');
+ ensureIsTruthyString(details, 'version');
+ return `${[
+ details.artifactName,
+ details.version,
+ details.platform,
+ details.arch,
+ ...(details.artifactSuffix ? [details.artifactSuffix] : []),
+ ].join('-')}.zip`;
+}
+function mirrorVar(name, options, defaultValue) {
+ // Convert camelCase to camel_case for env var reading
+ const snakeName = name.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}_${b}`).toLowerCase();
+ return (
+ // .npmrc
+ process.env[`npm_config_electron_${name.toLowerCase()}`] ||
+ process.env[`NPM_CONFIG_ELECTRON_${snakeName.toUpperCase()}`] ||
+ process.env[`npm_config_electron_${snakeName}`] ||
+ // package.json
+ process.env[`npm_package_config_electron_${name}`] ||
+ process.env[`npm_package_config_electron_${snakeName.toLowerCase()}`] ||
+ // env
+ process.env[`ELECTRON_${snakeName.toUpperCase()}`] ||
+ options[name] ||
+ defaultValue);
+}
+export async function getArtifactRemoteURL(details) {
+ const opts = details.mirrorOptions || {};
+ let base = mirrorVar('mirror', opts, BASE_URL);
+ if (details.version.includes('nightly')) {
+ const nightlyDeprecated = mirrorVar('nightly_mirror', opts, '');
+ if (nightlyDeprecated) {
+ base = nightlyDeprecated;
+ console.warn(`nightly_mirror is deprecated, please use nightlyMirror`);
+ }
+ else {
+ base = mirrorVar('nightlyMirror', opts, NIGHTLY_BASE_URL);
+ }
+ }
+ const path = mirrorVar('customDir', opts, details.version).replace('{{ version }}', details.version.replace(/^v/, ''));
+ const file = mirrorVar('customFilename', opts, getArtifactFileName(details));
+ // Allow customized download URL resolution.
+ if (opts.resolveAssetURL) {
+ const url = await opts.resolveAssetURL(details);
+ return url;
+ }
+ return `${base}${path}/${file}`;
+}
+export function getArtifactVersion(details) {
+ return normalizeVersion(mirrorVar('customVersion', details.mirrorOptions || {}, details.version));
+}
+//# sourceMappingURL=artifact-utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/artifact-utils.js.map b/node_modules/@electron/get/dist/esm/artifact-utils.js.map
new file mode 100644
index 0000000..bfaaf9c
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/artifact-utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"artifact-utils.js","sourceRoot":"","sources":["../../src/artifact-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEjE,MAAM,QAAQ,GAAG,yDAAyD,CAAC;AAC3E,MAAM,gBAAgB,GAAG,0DAA0D,CAAC;AAEpF,MAAM,UAAU,mBAAmB,CAAC,OAAgC;IAClE,oBAAoB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAE9C,IAAI,OAAO,CAAC,SAAS,EAAE;QACrB,OAAO,OAAO,CAAC,YAAY,CAAC;KAC7B;IAED,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtC,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC1C,oBAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAEzC,OAAO,GAAG;QACR,OAAO,CAAC,YAAY;QACpB,OAAO,CAAC,OAAO;QACf,OAAO,CAAC,QAAQ;QAChB,OAAO,CAAC,IAAI;QACZ,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC;AAED,SAAS,SAAS,CAChB,IAAkD,EAClD,OAAsB,EACtB,YAAoB;IAEpB,sDAAsD;IACtD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAE1F,OAAO;IACL,SAAS;IACT,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,uBAAuB,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,uBAAuB,SAAS,EAAE,CAAC;QAC/C,eAAe;QACf,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,EAAE,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,+BAA+B,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;QACrE,MAAM;QACN,OAAO,CAAC,GAAG,CAAC,YAAY,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC;QACb,YAAY,CACb,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAgC;IACzE,MAAM,IAAI,GAAkB,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC;IACxD,IAAI,IAAI,GAAG,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACvC,MAAM,iBAAiB,GAAG,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAChE,IAAI,iBAAiB,EAAE;YACrB,IAAI,GAAG,iBAAiB,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;SACxE;aAAM;YACL,IAAI,GAAG,SAAS,CAAC,eAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC3D;KACF;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAChE,eAAe,EACf,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAClC,CAAC;IACF,MAAM,IAAI,GAAG,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;IAE7E,4CAA4C;IAC5C,IAAI,IAAI,CAAC,eAAe,EAAE;QACxB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAChD,OAAO,GAAG,CAAC;KACZ;IAED,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAgC;IACjE,OAAO,gBAAgB,CAAC,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,aAAa,IAAI,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AACpG,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/downloader-resolver.d.ts b/node_modules/@electron/get/dist/esm/downloader-resolver.d.ts
new file mode 100644
index 0000000..f7f09b2
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/downloader-resolver.d.ts
@@ -0,0 +1,3 @@
+import { DownloadOptions } from './types';
+import { Downloader } from './Downloader';
+export declare function getDownloaderForSystem(): Promise<Downloader<DownloadOptions>>;
diff --git a/node_modules/@electron/get/dist/esm/downloader-resolver.js b/node_modules/@electron/get/dist/esm/downloader-resolver.js
new file mode 100644
index 0000000..5a87c3c
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/downloader-resolver.js
@@ -0,0 +1,9 @@
+export async function getDownloaderForSystem() {
+ // TODO: Resolve the downloader or default to GotDownloader
+ // Current thoughts are a dot-file traversal for something like
+ // ".electron.downloader" which would be a text file with the name of the
+ // npm module to import() and use as the downloader
+ const { GotDownloader } = await import('./GotDownloader');
+ return new GotDownloader();
+}
+//# sourceMappingURL=downloader-resolver.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/downloader-resolver.js.map b/node_modules/@electron/get/dist/esm/downloader-resolver.js.map
new file mode 100644
index 0000000..201069b
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/downloader-resolver.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"downloader-resolver.js","sourceRoot":"","sources":["../../src/downloader-resolver.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,2DAA2D;IAC3D,+DAA+D;IAC/D,yEAAyE;IACzE,mDAAmD;IACnD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC1D,OAAO,IAAI,aAAa,EAAE,CAAC;AAC7B,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/index.d.ts b/node_modules/@electron/get/dist/esm/index.d.ts
new file mode 100644
index 0000000..93e709e
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/index.d.ts
@@ -0,0 +1,18 @@
+import { ElectronDownloadRequestOptions, ElectronPlatformArtifactDetailsWithDefaults } from './types';
+export { getHostArch } from './utils';
+export { initializeProxy } from './proxy';
+export * from './types';
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+export declare function downloadArtifact(_artifactDetails: ElectronPlatformArtifactDetailsWithDefaults): Promise<string>;
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+export declare function download(version: string, options?: ElectronDownloadRequestOptions): Promise<string>;
diff --git a/node_modules/@electron/get/dist/esm/index.js b/node_modules/@electron/get/dist/esm/index.js
new file mode 100644
index 0000000..f3d30ee
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/index.js
@@ -0,0 +1,124 @@
+import debug from 'debug';
+import * as fs from 'fs-extra';
+import * as path from 'path';
+import * as semver from 'semver';
+import * as sumchecker from 'sumchecker';
+import { getArtifactFileName, getArtifactRemoteURL, getArtifactVersion } from './artifact-utils';
+import { Cache } from './Cache';
+import { getDownloaderForSystem } from './downloader-resolver';
+import { initializeProxy } from './proxy';
+import { withTempDirectoryIn, getHostArch, getNodeArch, ensureIsTruthyString, isOfficialLinuxIA32Download, withTempDirectory, } from './utils';
+export { getHostArch } from './utils';
+export { initializeProxy } from './proxy';
+const d = debug('@electron/get:index');
+if (process.env.ELECTRON_GET_USE_PROXY) {
+ initializeProxy();
+}
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+export async function downloadArtifact(_artifactDetails) {
+ const artifactDetails = Object.assign({}, _artifactDetails);
+ if (!_artifactDetails.isGeneric) {
+ const platformArtifactDetails = artifactDetails;
+ if (!platformArtifactDetails.platform) {
+ d('No platform found, defaulting to the host platform');
+ platformArtifactDetails.platform = process.platform;
+ }
+ if (platformArtifactDetails.arch) {
+ platformArtifactDetails.arch = getNodeArch(platformArtifactDetails.arch);
+ }
+ else {
+ d('No arch found, defaulting to the host arch');
+ platformArtifactDetails.arch = getHostArch();
+ }
+ }
+ ensureIsTruthyString(artifactDetails, 'version');
+ artifactDetails.version = getArtifactVersion(artifactDetails);
+ const fileName = getArtifactFileName(artifactDetails);
+ const url = await getArtifactRemoteURL(artifactDetails);
+ const cache = new Cache(artifactDetails.cacheRoot);
+ // Do not check if the file exists in the cache when force === true
+ if (!artifactDetails.force) {
+ d(`Checking the cache (${artifactDetails.cacheRoot}) for ${fileName} (${url})`);
+ const cachedPath = await cache.getPathForFileInCache(url, fileName);
+ if (cachedPath === null) {
+ d('Cache miss');
+ }
+ else {
+ d('Cache hit');
+ return cachedPath;
+ }
+ }
+ if (!artifactDetails.isGeneric &&
+ isOfficialLinuxIA32Download(artifactDetails.platform, artifactDetails.arch, artifactDetails.version, artifactDetails.mirrorOptions)) {
+ console.warn('Official Linux/ia32 support is deprecated.');
+ console.warn('For more info: https://electronjs.org/blog/linux-32bit-support');
+ }
+ return await withTempDirectoryIn(artifactDetails.tempDirectory, async (tempFolder) => {
+ const tempDownloadPath = path.resolve(tempFolder, getArtifactFileName(artifactDetails));
+ const downloader = artifactDetails.downloader || (await getDownloaderForSystem());
+ d(`Downloading ${url} to ${tempDownloadPath} with options: ${JSON.stringify(artifactDetails.downloadOptions)}`);
+ await downloader.download(url, tempDownloadPath, artifactDetails.downloadOptions);
+ // Don't try to verify the hash of the hash file itself
+ // and for older versions that don't have a SHASUMS256.txt
+ if (!artifactDetails.artifactName.startsWith('SHASUMS256') &&
+ !artifactDetails.unsafelyDisableChecksums &&
+ semver.gte(artifactDetails.version, '1.3.2')) {
+ await withTempDirectory(async (tmpDir) => {
+ let shasumPath;
+ const checksums = artifactDetails.checksums;
+ if (checksums) {
+ shasumPath = path.resolve(tmpDir, 'SHASUMS256.txt');
+ const fileNames = Object.keys(checksums);
+ if (fileNames.length === 0) {
+ throw new Error('Provided "checksums" object is empty, cannot generate a valid SHASUMS256.txt');
+ }
+ const generatedChecksums = fileNames
+ .map(fileName => `${checksums[fileName]} *${fileName}`)
+ .join('\n');
+ await fs.writeFile(shasumPath, generatedChecksums);
+ }
+ else {
+ shasumPath = await downloadArtifact({
+ isGeneric: true,
+ version: artifactDetails.version,
+ artifactName: 'SHASUMS256.txt',
+ force: artifactDetails.force,
+ downloadOptions: artifactDetails.downloadOptions,
+ cacheRoot: artifactDetails.cacheRoot,
+ downloader: artifactDetails.downloader,
+ mirrorOptions: artifactDetails.mirrorOptions,
+ });
+ }
+ // For versions 1.3.2 - 1.3.4, need to overwrite the `defaultTextEncoding` option:
+ // https://github.com/electron/electron/pull/6676#discussion_r75332120
+ if (semver.satisfies(artifactDetails.version, '1.3.2 - 1.3.4')) {
+ const validatorOptions = {};
+ validatorOptions.defaultTextEncoding = 'binary';
+ const checker = new sumchecker.ChecksumValidator('sha256', shasumPath, validatorOptions);
+ await checker.validate(path.dirname(tempDownloadPath), path.basename(tempDownloadPath));
+ }
+ else {
+ await sumchecker('sha256', shasumPath, path.dirname(tempDownloadPath), [
+ path.basename(tempDownloadPath),
+ ]);
+ }
+ });
+ }
+ return await cache.putFileInCache(url, tempDownloadPath, fileName);
+ });
+}
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+export function download(version, options) {
+ return downloadArtifact(Object.assign(Object.assign({}, options), { version, platform: process.platform, arch: process.arch, artifactName: 'electron' }));
+}
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/index.js.map b/node_modules/@electron/get/dist/esm/index.js.map
new file mode 100644
index 0000000..61d145b
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAOjG,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,MAAM,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;IACtC,eAAe,EAAE,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,gBAA6D;IAE7D,MAAM,eAAe,qBACf,gBAA4C,CACjD,CAAC;IACF,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC/B,MAAM,uBAAuB,GAAG,eAAkD,CAAC;QACnF,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EAAE;YACrC,CAAC,CAAC,oDAAoD,CAAC,CAAC;YACxD,uBAAuB,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;SACrD;QACD,IAAI,uBAAuB,CAAC,IAAI,EAAE;YAChC,uBAAuB,CAAC,IAAI,GAAG,WAAW,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;SAC1E;aAAM;YACL,CAAC,CAAC,4CAA4C,CAAC,CAAC;YAChD,uBAAuB,CAAC,IAAI,GAAG,WAAW,EAAE,CAAC;SAC9C;KACF;IACD,oBAAoB,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IAEjD,eAAe,CAAC,OAAO,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACtD,MAAM,GAAG,GAAG,MAAM,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IAEnD,mEAAmE;IACnE,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE;QAC1B,CAAC,CAAC,uBAAuB,eAAe,CAAC,SAAS,SAAS,QAAQ,KAAK,GAAG,GAAG,CAAC,CAAC;QAChF,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,qBAAqB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAEpE,IAAI,UAAU,KAAK,IAAI,EAAE;YACvB,CAAC,CAAC,YAAY,CAAC,CAAC;SACjB;aAAM;YACL,CAAC,CAAC,WAAW,CAAC,CAAC;YACf,OAAO,UAAU,CAAC;SACnB;KACF;IAED,IACE,CAAC,eAAe,CAAC,SAAS;QAC1B,2BAA2B,CACzB,eAAe,CAAC,QAAQ,EACxB,eAAe,CAAC,IAAI,EACpB,eAAe,CAAC,OAAO,EACvB,eAAe,CAAC,aAAa,CAC9B,EACD;QACA,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;KAChF;IAED,OAAO,MAAM,mBAAmB,CAAC,eAAe,CAAC,aAAa,EAAE,KAAK,EAAC,UAAU,EAAC,EAAE;QACjF,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;QAExF,MAAM,UAAU,GAAG,eAAe,CAAC,UAAU,IAAI,CAAC,MAAM,sBAAsB,EAAE,CAAC,CAAC;QAClF,CAAC,CACC,eAAe,GAAG,OAAO,gBAAgB,kBAAkB,IAAI,CAAC,SAAS,CACvE,eAAe,CAAC,eAAe,CAChC,EAAE,CACJ,CAAC;QACF,MAAM,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;QAElF,uDAAuD;QACvD,0DAA0D;QAC1D,IACE,CAAC,eAAe,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC;YACtD,CAAC,eAAe,CAAC,wBAAwB;YACzC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,EAC5C;YACA,MAAM,iBAAiB,CAAC,KAAK,EAAC,MAAM,EAAC,EAAE;gBACrC,IAAI,UAAkB,CAAC;gBACvB,MAAM,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;gBAC5C,IAAI,SAAS,EAAE;oBACb,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;oBACpD,MAAM,SAAS,GAAa,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;oBACnD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;wBAC1B,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E,CAAC;qBACH;oBACD,MAAM,kBAAkB,GAAG,SAAS;yBACjC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE,CAAC;yBACtD,IAAI,CAAC,IAAI,CAAC,CAAC;oBACd,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;iBACpD;qBAAM;oBACL,UAAU,GAAG,MAAM,gBAAgB,CAAC;wBAClC,SAAS,EAAE,IAAI;wBACf,OAAO,EAAE,eAAe,CAAC,OAAO;wBAChC,YAAY,EAAE,gBAAgB;wBAC9B,KAAK,EAAE,eAAe,CAAC,KAAK;wBAC5B,eAAe,EAAE,eAAe,CAAC,eAAe;wBAChD,SAAS,EAAE,eAAe,CAAC,SAAS;wBACpC,UAAU,EAAE,eAAe,CAAC,UAAU;wBACtC,aAAa,EAAE,eAAe,CAAC,aAAa;qBAC7C,CAAC,CAAC;iBACJ;gBAED,kFAAkF;gBAClF,sEAAsE;gBACtE,IAAI,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,EAAE;oBAC9D,MAAM,gBAAgB,GAA+B,EAAE,CAAC;oBACxD,gBAAgB,CAAC,mBAAmB,GAAG,QAAQ,CAAC;oBAChD,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,iBAAiB,CAAC,QAAQ,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;oBACzF,MAAM,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;iBACzF;qBAAM;oBACL,MAAM,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;wBACrE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;qBAChC,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,MAAM,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,OAAe,EACf,OAAwC;IAExC,OAAO,gBAAgB,iCAClB,OAAO,KACV,OAAO,EACP,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,YAAY,EAAE,UAAU,IACxB,CAAC;AACL,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/proxy.d.ts b/node_modules/@electron/get/dist/esm/proxy.d.ts
new file mode 100644
index 0000000..df3e16a
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/proxy.d.ts
@@ -0,0 +1,4 @@
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+export declare function initializeProxy(): void;
diff --git a/node_modules/@electron/get/dist/esm/proxy.js b/node_modules/@electron/get/dist/esm/proxy.js
new file mode 100644
index 0000000..8063ef2
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/proxy.js
@@ -0,0 +1,29 @@
+import * as debug from 'debug';
+import { getEnv, setEnv } from './utils';
+const d = debug('@electron/get:proxy');
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+export function initializeProxy() {
+ try {
+ // Code originally from https://github.com/yeoman/yo/blob/b2eea87e/lib/cli.js#L19-L28
+ const MAJOR_NODEJS_VERSION = parseInt(process.version.slice(1).split('.')[0], 10);
+ if (MAJOR_NODEJS_VERSION >= 10) {
+ // See: https://github.com/electron/get/pull/214#discussion_r798845713
+ const env = getEnv('GLOBAL_AGENT_');
+ setEnv('GLOBAL_AGENT_HTTP_PROXY', env('HTTP_PROXY'));
+ setEnv('GLOBAL_AGENT_HTTPS_PROXY', env('HTTPS_PROXY'));
+ setEnv('GLOBAL_AGENT_NO_PROXY', env('NO_PROXY'));
+ // `global-agent` works with Node.js v10 and above.
+ require('global-agent').bootstrap();
+ }
+ else {
+ // `global-tunnel-ng` works with Node.js v10 and below.
+ require('global-tunnel-ng').initialize();
+ }
+ }
+ catch (e) {
+ d('Could not load either proxy modules, built-in proxy support not available:', e);
+ }
+}
+//# sourceMappingURL=proxy.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/proxy.js.map b/node_modules/@electron/get/dist/esm/proxy.js.map
new file mode 100644
index 0000000..81d7b83
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/proxy.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI;QACF,qFAAqF;QACrF,MAAM,oBAAoB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAElF,IAAI,oBAAoB,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;YAEpC,MAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;YACrD,MAAM,CAAC,0BAA0B,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;YACvD,MAAM,CAAC,uBAAuB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;YAEjD,mDAAmD;YACnD,OAAO,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,CAAC;SACrC;aAAM;YACL,uDAAuD;YACvD,OAAO,CAAC,kBAAkB,CAAC,CAAC,UAAU,EAAE,CAAC;SAC1C;KACF;IAAC,OAAO,CAAC,EAAE;QACV,CAAC,CAAC,4EAA4E,EAAE,CAAC,CAAC,CAAC;KACpF;AACH,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/types.d.ts b/node_modules/@electron/get/dist/esm/types.d.ts
new file mode 100644
index 0000000..a8284bb
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/types.d.ts
@@ -0,0 +1,129 @@
+import { Downloader } from './Downloader';
+export declare type DownloadOptions = any;
+export interface MirrorOptions {
+ /**
+ * DEPRECATED - see nightlyMirror.
+ */
+ nightly_mirror?: string;
+ /**
+ * The Electron nightly-specific mirror URL.
+ */
+ nightlyMirror?: string;
+ /**
+ * The base URL of the mirror to download from,
+ * e.g https://github.com/electron/electron/releases/download
+ */
+ mirror?: string;
+ /**
+ * The name of the directory to download from,
+ * often scoped by version number e.g 'v4.0.4'
+ */
+ customDir?: string;
+ /**
+ * The name of the asset to download,
+ * e.g 'electron-v4.0.4-linux-x64.zip'
+ */
+ customFilename?: string;
+ /**
+ * The version of the asset to download,
+ * e.g '4.0.4'
+ */
+ customVersion?: string;
+ /**
+ * A function allowing customization of the url returned
+ * from getArtifactRemoteURL().
+ */
+ resolveAssetURL?: (opts: DownloadOptions) => Promise<string>;
+}
+export interface ElectronDownloadRequest {
+ /**
+ * The version of Electron associated with the artifact.
+ */
+ version: string;
+ /**
+ * The type of artifact. For example:
+ * * `electron`
+ * * `ffmpeg`
+ */
+ artifactName: string;
+}
+export interface ElectronDownloadRequestOptions {
+ /**
+ * Whether to download an artifact regardless of whether it's in the cache directory.
+ *
+ * Defaults to `false`.
+ */
+ force?: boolean;
+ /**
+ * When set to `true`, disables checking that the artifact download completed successfully
+ * with the correct payload.
+ *
+ * Defaults to `false`.
+ */
+ unsafelyDisableChecksums?: boolean;
+ /**
+ * Provides checksums for the artifact as strings.
+ * Can be used if you already know the checksums of the Electron artifact
+ * you are downloading and want to skip the checksum file download
+ * without skipping the checksum validation.
+ *
+ * This should be an object whose keys are the file names of the artifacts and
+ * the values are their respective SHA256 checksums.
+ */
+ checksums?: Record<string, string>;
+ /**
+ * The directory that caches Electron artifact downloads.
+ *
+ * The default value is dependent upon the host platform:
+ *
+ * * Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`
+ * * MacOS: `~/Library/Caches/electron/`
+ * * Windows: `%LOCALAPPDATA%/electron/Cache` or `~/AppData/Local/electron/Cache/`
+ */
+ cacheRoot?: string;
+ /**
+ * Options passed to the downloader module.
+ */
+ downloadOptions?: DownloadOptions;
+ /**
+ * Options related to specifying an artifact mirror.
+ */
+ mirrorOptions?: MirrorOptions;
+ /**
+ * The custom [[Downloader]] class used to download artifacts. Defaults to the
+ * built-in [[GotDownloader]].
+ */
+ downloader?: Downloader<DownloadOptions>;
+ /**
+ * A temporary directory for downloads.
+ * It is used before artifacts are put into cache.
+ */
+ tempDirectory?: string;
+}
+export declare type ElectronPlatformArtifactDetails = {
+ /**
+ * The target artifact platform. These are Node-style platform names, for example:
+ * * `win32`
+ * * `darwin`
+ * * `linux`
+ */
+ platform: string;
+ /**
+ * The target artifact architecture. These are Node-style architecture names, for example:
+ * * `ia32`
+ * * `x64`
+ * * `armv7l`
+ */
+ arch: string;
+ artifactSuffix?: string;
+ isGeneric?: false;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronGenericArtifactDetails = {
+ isGeneric: true;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronArtifactDetails = ElectronPlatformArtifactDetails | ElectronGenericArtifactDetails;
+export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
+export declare type ElectronPlatformArtifactDetailsWithDefaults = (Omit<ElectronPlatformArtifactDetails, 'platform' | 'arch'> & {
+ platform?: string;
+ arch?: string;
+}) | ElectronGenericArtifactDetails;
diff --git a/node_modules/@electron/get/dist/esm/types.js b/node_modules/@electron/get/dist/esm/types.js
new file mode 100644
index 0000000..5b2306a
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/types.js
@@ -0,0 +1 @@
+//# sourceMappingURL=types.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/types.js.map b/node_modules/@electron/get/dist/esm/types.js.map
new file mode 100644
index 0000000..7b5fff8
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/utils.d.ts b/node_modules/@electron/get/dist/esm/utils.d.ts
new file mode 100644
index 0000000..3cc40c1
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/utils.d.ts
@@ -0,0 +1,25 @@
+export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function withTempDirectory<T>(fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function normalizeVersion(version: string): string;
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+export declare function uname(): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+export declare function getNodeArch(arch: string): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+export declare function getHostArch(): string;
+export declare function ensureIsTruthyString<T, K extends keyof T>(obj: T, key: K): void;
+export declare function isOfficialLinuxIA32Download(platform: string, arch: string, version: string, mirrorOptions?: object): boolean;
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+export declare function getEnv(prefix?: string): (name: string) => string | undefined;
+export declare function setEnv(key: string, value: string | undefined): void;
diff --git a/node_modules/@electron/get/dist/esm/utils.js b/node_modules/@electron/get/dist/esm/utils.js
new file mode 100644
index 0000000..575ea86
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/utils.js
@@ -0,0 +1,95 @@
+import * as childProcess from 'child_process';
+import * as fs from 'fs-extra';
+import * as os from 'os';
+import * as path from 'path';
+async function useAndRemoveDirectory(directory, fn) {
+ let result;
+ try {
+ result = await fn(directory);
+ }
+ finally {
+ await fs.remove(directory);
+ }
+ return result;
+}
+export async function withTempDirectoryIn(parentDirectory = os.tmpdir(), fn) {
+ const tempDirectoryPrefix = 'electron-download-';
+ const tempDirectory = await fs.mkdtemp(path.resolve(parentDirectory, tempDirectoryPrefix));
+ return useAndRemoveDirectory(tempDirectory, fn);
+}
+export async function withTempDirectory(fn) {
+ return withTempDirectoryIn(undefined, fn);
+}
+export function normalizeVersion(version) {
+ if (!version.startsWith('v')) {
+ return `v${version}`;
+ }
+ return version;
+}
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+export function uname() {
+ return childProcess
+ .execSync('uname -m')
+ .toString()
+ .trim();
+}
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+export function getNodeArch(arch) {
+ if (arch === 'arm') {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ switch (process.config.variables.arm_version) {
+ case '6':
+ return uname();
+ case '7':
+ default:
+ return 'armv7l';
+ }
+ }
+ return arch;
+}
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+export function getHostArch() {
+ return getNodeArch(process.arch);
+}
+export function ensureIsTruthyString(obj, key) {
+ if (!obj[key] || typeof obj[key] !== 'string') {
+ throw new Error(`Expected property "${key}" to be provided as a string but it was not`);
+ }
+}
+export function isOfficialLinuxIA32Download(platform, arch, version, mirrorOptions) {
+ return (platform === 'linux' &&
+ arch === 'ia32' &&
+ Number(version.slice(1).split('.')[0]) >= 4 &&
+ typeof mirrorOptions === 'undefined');
+}
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+export function getEnv(prefix = '') {
+ const envsLowerCase = {};
+ for (const envKey in process.env) {
+ envsLowerCase[envKey.toLowerCase()] = process.env[envKey];
+ }
+ return (name) => {
+ return (envsLowerCase[`${prefix}${name}`.toLowerCase()] ||
+ envsLowerCase[name.toLowerCase()] ||
+ undefined);
+ };
+}
+export function setEnv(key, value) {
+ // The `void` operator always returns `undefined`.
+ // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void
+ if (value !== void 0) {
+ process.env[key] = value;
+ }
+}
+//# sourceMappingURL=utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/get/dist/esm/utils.js.map b/node_modules/@electron/get/dist/esm/utils.js.map
new file mode 100644
index 0000000..6c65992
--- /dev/null
+++ b/node_modules/@electron/get/dist/esm/utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,KAAK,UAAU,qBAAqB,CAClC,SAAiB,EACjB,EAAqC;IAErC,IAAI,MAAS,CAAC;IACd,IAAI;QACF,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC;KAC9B;YAAS;QACR,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;KAC5B;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,kBAA0B,EAAE,CAAC,MAAM,EAAE,EACrC,EAAqC;IAErC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;IACjD,MAAM,aAAa,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC3F,OAAO,qBAAqB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAI,EAAqC;IAC9E,OAAO,mBAAmB,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QAC5B,OAAO,IAAI,OAAO,EAAE,CAAC;KACtB;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK;IACnB,OAAO,YAAY;SAChB,QAAQ,CAAC,UAAU,CAAC;SACpB,QAAQ,EAAE;SACV,IAAI,EAAE,CAAC;AACZ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,IAAI,IAAI,KAAK,KAAK,EAAE;QAClB,8DAA8D;QAC9D,QAAS,OAAO,CAAC,MAAM,CAAC,SAAiB,CAAC,WAAW,EAAE;YACrD,KAAK,GAAG;gBACN,OAAO,KAAK,EAAE,CAAC;YACjB,KAAK,GAAG,CAAC;YACT;gBACE,OAAO,QAAQ,CAAC;SACnB;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAuB,GAAM,EAAE,GAAM;IACvE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;QAC7C,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,6CAA6C,CAAC,CAAC;KACzF;AACH,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,QAAgB,EAChB,IAAY,EACZ,OAAe,EACf,aAAsB;IAEtB,OAAO,CACL,QAAQ,KAAK,OAAO;QACpB,IAAI,KAAK,MAAM;QACf,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3C,OAAO,aAAa,KAAK,WAAW,CACrC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,MAAM,GAAG,EAAE;IAChC,MAAM,aAAa,GAAsB,EAAE,CAAC;IAE5C,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE;QAChC,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;KAC3D;IAED,OAAO,CAAC,IAAY,EAAsB,EAAE;QAC1C,OAAO,CACL,aAAa,CAAC,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAC/C,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACjC,SAAS,CACV,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,GAAW,EAAE,KAAyB;IAC3D,kDAAkD;IAClD,wFAAwF;IACxF,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE;QACpB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;KAC1B;AACH,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/get/node_modules/.bin/semver b/node_modules/@electron/get/node_modules/.bin/semver
new file mode 120000
index 0000000..5aaadf4
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver.js \ No newline at end of file
diff --git a/node_modules/@electron/get/node_modules/debug/LICENSE b/node_modules/@electron/get/node_modules/debug/LICENSE
new file mode 100644
index 0000000..1a9820e
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+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/@electron/get/node_modules/debug/README.md b/node_modules/@electron/get/node_modules/debug/README.md
new file mode 100644
index 0000000..e9c3e04
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/debug/README.md
@@ -0,0 +1,481 @@
+# debug
+[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
+
+<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2018-2021 Josh Junon
+
+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/@electron/get/node_modules/debug/package.json b/node_modules/@electron/get/node_modules/debug/package.json
new file mode 100644
index 0000000..3bcdc24
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/debug/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "debug",
+ "version": "4.3.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "Josh Junon <josh.junon@protonmail.com>",
+ "contributors": [
+ "TJ Holowaychuk <tj@vision-media.ca>",
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ }
+}
diff --git a/node_modules/@electron/get/node_modules/debug/src/browser.js b/node_modules/@electron/get/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..cd0fc35
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/node_modules/@electron/get/node_modules/debug/src/common.js b/node_modules/@electron/get/node_modules/debug/src/common.js
new file mode 100644
index 0000000..e3291b2
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/node_modules/@electron/get/node_modules/debug/src/index.js b/node_modules/@electron/get/node_modules/debug/src/index.js
new file mode 100644
index 0000000..bf4c57f
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/@electron/get/node_modules/debug/src/node.js b/node_modules/@electron/get/node_modules/debug/src/node.js
new file mode 100644
index 0000000..79bc085
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/node_modules/@electron/get/node_modules/env-paths/index.d.ts b/node_modules/@electron/get/node_modules/env-paths/index.d.ts
new file mode 100644
index 0000000..277ddc0
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/env-paths/index.d.ts
@@ -0,0 +1,101 @@
+declare namespace envPaths {
+ export interface Options {
+ /**
+ __Don't use this option unless you really have to!__
+
+ Suffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it.
+
+ @default 'nodejs'
+ */
+ readonly suffix?: string;
+ }
+
+ export interface Paths {
+ /**
+ Directory for data files.
+
+ Example locations (with the default `nodejs` suffix):
+
+ - macOS: `~/Library/Application Support/MyApp-nodejs`
+ - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Data` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data`)
+ - Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`)
+ */
+ readonly data: string;
+
+ /**
+ Directory for data files.
+
+ Example locations (with the default `nodejs` suffix):
+
+ - macOS: `~/Library/Preferences/MyApp-nodejs`
+ - Windows: `%APPDATA%\MyApp-nodejs\Config` (for example, `C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config`)
+ - Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`)
+ */
+ readonly config: string;
+
+ /**
+ Directory for non-essential data files.
+
+ Example locations (with the default `nodejs` suffix):
+
+ - macOS: `~/Library/Caches/MyApp-nodejs`
+ - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Cache` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache`)
+ - Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`)
+ */
+ readonly cache: string;
+
+ /**
+ Directory for log files.
+
+ Example locations (with the default `nodejs` suffix):
+
+ - macOS: `~/Library/Logs/MyApp-nodejs`
+ - Windows: `%LOCALAPPDATA%\MyApp-nodejs\Log` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log`)
+ - Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`)
+ */
+ readonly log: string;
+
+ /**
+ Directory for temporary files.
+
+ Example locations (with the default `nodejs` suffix):
+
+ - macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs`
+ - Windows: `%LOCALAPPDATA%\Temp\MyApp-nodejs` (for example, `C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs`)
+ - Linux: `/tmp/USERNAME/MyApp-nodejs`
+ */
+ readonly temp: string;
+ }
+}
+
+declare const envPaths: {
+ /**
+ Get paths for storing things like data, config, cache, etc.
+
+ Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories.
+
+ @param name - Name of your project. Used to generate the paths.
+ @returns The paths to use for your project on current OS.
+
+ @example
+ ```
+ import envPaths = require('env-paths');
+
+ const paths = envPaths('MyApp');
+
+ paths.data;
+ //=> '/home/sindresorhus/.local/share/MyApp-nodejs'
+
+ paths.config
+ //=> '/home/sindresorhus/.config/MyApp-nodejs'
+ ```
+ */
+ (name: string, options?: envPaths.Options): envPaths.Paths;
+
+ // TODO: Remove this for the next major release, refactor the whole definition to:
+ // declare function envPaths(name: string, options?: envPaths.Options): envPaths.Paths;
+ // export = envPaths;
+ default: typeof envPaths;
+};
+
+export = envPaths;
diff --git a/node_modules/@electron/get/node_modules/env-paths/index.js b/node_modules/@electron/get/node_modules/env-paths/index.js
new file mode 100644
index 0000000..7e7b50b
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/env-paths/index.js
@@ -0,0 +1,74 @@
+'use strict';
+const path = require('path');
+const os = require('os');
+
+const homedir = os.homedir();
+const tmpdir = os.tmpdir();
+const {env} = process;
+
+const macos = name => {
+ const library = path.join(homedir, 'Library');
+
+ return {
+ data: path.join(library, 'Application Support', name),
+ config: path.join(library, 'Preferences', name),
+ cache: path.join(library, 'Caches', name),
+ log: path.join(library, 'Logs', name),
+ temp: path.join(tmpdir, name)
+ };
+};
+
+const windows = name => {
+ const appData = env.APPDATA || path.join(homedir, 'AppData', 'Roaming');
+ const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local');
+
+ return {
+ // Data/config/cache/log are invented by me as Windows isn't opinionated about this
+ data: path.join(localAppData, name, 'Data'),
+ config: path.join(appData, name, 'Config'),
+ cache: path.join(localAppData, name, 'Cache'),
+ log: path.join(localAppData, name, 'Log'),
+ temp: path.join(tmpdir, name)
+ };
+};
+
+// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+const linux = name => {
+ const username = path.basename(homedir);
+
+ return {
+ data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name),
+ config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name),
+ cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name),
+ // https://wiki.debian.org/XDGBaseDirectorySpecification#state
+ log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name),
+ temp: path.join(tmpdir, username, name)
+ };
+};
+
+const envPaths = (name, options) => {
+ if (typeof name !== 'string') {
+ throw new TypeError(`Expected string, got ${typeof name}`);
+ }
+
+ options = Object.assign({suffix: 'nodejs'}, options);
+
+ if (options.suffix) {
+ // Add suffix to prevent possible conflict with native apps
+ name += `-${options.suffix}`;
+ }
+
+ if (process.platform === 'darwin') {
+ return macos(name);
+ }
+
+ if (process.platform === 'win32') {
+ return windows(name);
+ }
+
+ return linux(name);
+};
+
+module.exports = envPaths;
+// TODO: Remove this for the next major release
+module.exports.default = envPaths;
diff --git a/node_modules/@electron/get/node_modules/env-paths/license b/node_modules/@electron/get/node_modules/env-paths/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/env-paths/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@electron/get/node_modules/env-paths/package.json b/node_modules/@electron/get/node_modules/env-paths/package.json
new file mode 100644
index 0000000..fae4ebc
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/env-paths/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "env-paths",
+ "version": "2.2.1",
+ "description": "Get paths for storing things like data, config, cache, etc",
+ "license": "MIT",
+ "repository": "sindresorhus/env-paths",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "common",
+ "user",
+ "paths",
+ "env",
+ "environment",
+ "directory",
+ "dir",
+ "appdir",
+ "path",
+ "data",
+ "config",
+ "cache",
+ "logs",
+ "temp",
+ "linux",
+ "unix"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/@electron/get/node_modules/env-paths/readme.md b/node_modules/@electron/get/node_modules/env-paths/readme.md
new file mode 100644
index 0000000..b66d571
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/env-paths/readme.md
@@ -0,0 +1,115 @@
+# env-paths
+
+> Get paths for storing things like data, config, cache, etc
+
+Uses the correct OS-specific paths. Most developers get this wrong.
+
+
+## Install
+
+```
+$ npm install env-paths
+```
+
+
+## Usage
+
+```js
+const envPaths = require('env-paths');
+
+const paths = envPaths('MyApp');
+
+paths.data;
+//=> '/home/sindresorhus/.local/share/MyApp-nodejs'
+
+paths.config
+//=> '/home/sindresorhus/.config/MyApp-nodejs'
+```
+
+
+## API
+
+### paths = envPaths(name, options?)
+
+Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories.
+
+#### name
+
+Type: `string`
+
+Name of your project. Used to generate the paths.
+
+#### options
+
+Type: `object`
+
+##### suffix
+
+Type: `string`<br>
+Default: `'nodejs'`
+
+**Don't use this option unless you really have to!**<br>
+Suffix appended to the project name to avoid name conflicts with native
+apps. Pass an empty string to disable it.
+
+### paths.data
+
+Directory for data files.
+
+Example locations (with the default `nodejs` [suffix](#suffix)):
+
+- macOS: `~/Library/Application Support/MyApp-nodejs`
+- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Data` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data`)
+- Linux: `~/.local/share/MyApp-nodejs` (or `$XDG_DATA_HOME/MyApp-nodejs`)
+
+### paths.config
+
+Directory for config files.
+
+Example locations (with the default `nodejs` [suffix](#suffix)):
+
+- macOS: `~/Library/Preferences/MyApp-nodejs`
+- Windows: `%APPDATA%\MyApp-nodejs\Config` (for example, `C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config`)
+- Linux: `~/.config/MyApp-nodejs` (or `$XDG_CONFIG_HOME/MyApp-nodejs`)
+
+### paths.cache
+
+Directory for non-essential data files.
+
+Example locations (with the default `nodejs` [suffix](#suffix)):
+
+- macOS: `~/Library/Caches/MyApp-nodejs`
+- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Cache` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache`)
+- Linux: `~/.cache/MyApp-nodejs` (or `$XDG_CACHE_HOME/MyApp-nodejs`)
+
+### paths.log
+
+Directory for log files.
+
+Example locations (with the default `nodejs` [suffix](#suffix)):
+
+- macOS: `~/Library/Logs/MyApp-nodejs`
+- Windows: `%LOCALAPPDATA%\MyApp-nodejs\Log` (for example, `C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log`)
+- Linux: `~/.local/state/MyApp-nodejs` (or `$XDG_STATE_HOME/MyApp-nodejs`)
+
+### paths.temp
+
+Directory for temporary files.
+
+Example locations (with the default `nodejs` [suffix](#suffix)):
+
+- macOS: `/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs`
+- Windows: `%LOCALAPPDATA%\Temp\MyApp-nodejs` (for example, `C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs`)
+- Linux: `/tmp/USERNAME/MyApp-nodejs`
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-env-paths?utm_source=npm-env-paths&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/@electron/get/node_modules/fs-extra/CHANGELOG.md b/node_modules/@electron/get/node_modules/fs-extra/CHANGELOG.md
new file mode 100644
index 0000000..3049b45
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/CHANGELOG.md
@@ -0,0 +1,864 @@
+8.1.0 / 2019-06-28
+------------------
+
+- Add support for promisified `fs.realpath.native` in Node v9.2+ ([#650](https://github.com/jprichardson/node-fs-extra/issues/650), [#682](https://github.com/jprichardson/node-fs-extra/pull/682))
+- Update `graceful-fs` dependency ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+- Use `graceful-fs` everywhere ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+
+8.0.1 / 2019-05-13
+------------------
+
+- Fix bug `Maximum call stack size exceeded` error in `util/stat` ([#679](https://github.com/jprichardson/node-fs-extra/pull/679))
+
+8.0.0 / 2019-05-11
+------------------
+
+**NOTE:** Node.js v6 support is deprecated, and will be dropped in the next major release.
+
+- Use `renameSync()` under the hood in `moveSync()`
+- Fix bug with bind-mounted directories in `copy*()` ([#613](https://github.com/jprichardson/node-fs-extra/issues/613), [#618](https://github.com/jprichardson/node-fs-extra/pull/618))
+- Fix bug in `move()` with case-insensitive file systems
+- Use `fs.stat()`'s `bigint` option in `copy*()` & `move*()` where possible ([#657](https://github.com/jprichardson/node-fs-extra/issues/657))
+
+7.0.1 / 2018-11-07
+------------------
+
+- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
+- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
+- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))
+
+7.0.0 / 2018-07-16
+------------------
+
+- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
+- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
+- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
+- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))
+
+6.0.1 / 2018-05-09
+------------------
+
+- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))
+
+6.0.0 / 2018-05-01
+------------------
+
+- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
+- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
+- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
+- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
+- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
+- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))
+
+5.0.0 / 2017-12-11
+------------------
+
+Significant refactor of `copy()` & `copySync()`, including breaking changes. No changes to other functions in this release.
+
+Huge thanks to **[@manidlou](https://github.com/manidlou)** for doing most of the work on this release.
+
+- The `filter` option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. [#512](https://github.com/jprichardson/node-fs-extra/pull/512)
+- `copy()`'s `filter` option can now be a function that returns a Promise. [#518](https://github.com/jprichardson/node-fs-extra/pull/518)
+- `copy()` & `copySync()` now use `fs.copyFile()`/`fs.copyFileSync()` in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. [#505](https://github.com/jprichardson/node-fs-extra/pull/505)
+- Don't allow copying a directory into itself. [#83](https://github.com/jprichardson/node-fs-extra/issues/83)
+- Handle copying between identical files. [#198](https://github.com/jprichardson/node-fs-extra/issues/198)
+- Error out when copying an empty folder to a path that already exists. [#464](https://github.com/jprichardson/node-fs-extra/issues/464)
+- Don't create `dest`'s parent if the `filter` function aborts the `copy()` operation. [#517](https://github.com/jprichardson/node-fs-extra/pull/517)
+- Fix `writeStream` not being closed if there was an error in `copy()`. [#516](https://github.com/jprichardson/node-fs-extra/pull/516)
+
+4.0.3 / 2017-12-05
+------------------
+
+- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501)
+- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520)
+
+4.0.2 / 2017-09-12
+------------------
+
+- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4)
+- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+
+- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485)
+
+4.0.1 / 2017-07-31
+------------------
+
+### Fixed
+
+- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470)
+
+4.0.0 / 2017-07-14
+------------------
+
+### Changed
+
+- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449)
+- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458)
+- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459)
+
+### Fixed
+
+- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428)
+
+Also clarified the docs in a few places.
+
+3.0.1 / 2017-05-04
+------------------
+
+- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415)
+
+3.0.0 / 2017-04-27
+------------------
+
+### Added
+
+- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403)
+- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406)
+
+### Removed
+
+- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+
+### Changed
+
+- Upgraded jsonfile dependency to v3.0.0:
+ - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`.
+- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394)
+
+### Fixed
+
+- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408)
+
+2.1.2 / 2017-03-16
+------------------
+
+### Fixed
+
+- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393)
+
+2.1.1 / 2017-03-15
+------------------
+
+### Fixed
+
+- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`.
+- Remove `Buffer.alloc()` usage in `moveSync()`.
+
+2.1.0 / 2017-03-15
+------------------
+
+Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release!
+
+### Added
+- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou))
+- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou))
+
+### Changed
+- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou))
+- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264)
+- Refactored docs. ([@manidlou](https://github.com/manidlou))
+
+### Fixed
+
+- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton))
+
+2.0.0 / 2017-01-16
+------------------
+
+### Removed
+- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it
+on Jan 1st, 2017.
+- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little
+over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just
+an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339]
+
+### Changed
+- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333]
+- Moved docs, to `docs/`. [#340]
+
+### Fixed
+- Apply filters to directories in `copySync()` like in `copy()`. [#324]
+- A specific condition when disk is under heavy use, `copy()` can fail. [#326]
+
+
+1.0.0 / 2016-11-01
+------------------
+
+After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes
+to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release!
+
+### Added
+- `walkSync()`
+
+### Changed
+- **BREAKING**: dropped Node v0.10 support.
+- disabled `rimaf` globbing, wasn't used. [#280]
+- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function.
+- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300]
+
+### Fixed
+- bug fix proper closing of file handle on `utimesMillis()` [#271]
+- proper escaping of files with dollar signs [#291]
+- `copySync()` failed if user didn't own file. [#199], [#301]
+
+
+0.30.0 / 2016-04-28
+-------------------
+- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**.
+
+0.29.0 / 2016-04-27
+-------------------
+- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well.
+
+0.28.0 / 2016-04-17
+-------------------
+- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]
+- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237]
+- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93]
+
+0.27.0 / 2016-04-15
+-------------------
+- add `dereference` option to `copySync()`. [#235][#235]
+
+0.26.7 / 2016-03-16
+-------------------
+- fixed `copy()` if source and dest are the same. [#230][#230]
+
+0.26.6 / 2016-03-15
+-------------------
+- fixed if `emptyDir()` does not have a callback: [#229][#229]
+
+0.26.5 / 2016-01-27
+-------------------
+- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215]
+
+0.26.4 / 2016-01-05
+-------------------
+- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208]
+
+0.26.3 / 2015-12-17
+-------------------
+- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193]
+
+0.26.2 / 2015-11-02
+-------------------
+- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces`
+
+0.26.1 / 2015-11-02
+-------------------
+- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190]
+
+0.26.0 / 2015-10-25
+-------------------
+- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw).
+
+0.25.0 / 2015-10-24
+-------------------
+- now has a file walker `walk()`
+
+0.24.0 / 2015-08-28
+-------------------
+- removed alias `delete()` and `deleteSync()`. See: [#171][#171]
+
+0.23.1 / 2015-08-07
+-------------------
+- Better handling of errors for `move()` when moving across devices. [#170][#170]
+- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169]
+
+0.23.0 / 2015-08-06
+-------------------
+- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165]
+
+0.22.1 / 2015-07-09
+-------------------
+- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149].
+Fixes regression that was introduced in `0.21.0`.
+
+0.22.0 / 2015-07-09
+-------------------
+- preserve permissions / ownership in `copy()`. See: [#54][#54]
+
+0.21.0 / 2015-07-04
+-------------------
+- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141]
+- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks)
+
+0.20.1 / 2015-06-23
+-------------------
+- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
+
+0.20.0 / 2015-06-19
+-------------------
+- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g.
+this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`.
+- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code.
+- started moving tests inline
+- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()`
+
+0.19.0 / 2015-06-08
+-------------------
+- `fs.copy()` had support for Node v0.8, dropped support
+
+0.18.4 / 2015-05-22
+-------------------
+- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0
+
+0.18.3 / 2015-05-08
+-------------------
+- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134]
+
+0.18.2 / 2015-04-17
+-------------------
+- bugfix: allow `F_OK` ([#120][#120])
+
+0.18.1 / 2015-04-15
+-------------------
+- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b
+- fixed a lot of tests for Windows (appveyor)
+
+0.18.0 / 2015-03-31
+-------------------
+- added `emptyDir()` and `emptyDirSync()`
+
+0.17.0 / 2015-03-28
+-------------------
+- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists).
+**Only works with files at the moment.**
+- `createOutputStream()` added. See: [#118][#118]
+
+0.16.5 / 2015-03-08
+-------------------
+- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114]
+
+0.16.4 / 2015-03-01
+-------------------
+- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66
+
+0.16.3 / 2015-01-28
+-------------------
+- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9
+
+
+0.16.2 / 2015-01-28
+-------------------
+- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future)
+
+0.16.1 / 2015-01-28
+-------------------
+- if `setImmediate` is not available, fall back to `process.nextTick`
+
+0.16.0 / 2015-01-28
+-------------------
+- bugfix `fs.move()` into itself. Closes [#104]
+- bugfix `fs.move()` moving directory across device. Closes [#108]
+- added coveralls support
+- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98]
+- misc fs.copy code cleanups
+
+0.15.0 / 2015-01-21
+-------------------
+- dropped `ncp`, imported code in
+- because of previous, now supports `io.js`
+- `graceful-fs` is now a dependency
+
+0.14.0 / 2015-01-05
+-------------------
+- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100]
+- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests)
+
+0.13.0 / 2014-12-10
+-------------------
+- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch)
+- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"`
+- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59])
+
+0.12.0 / 2014-09-22
+-------------------
+- copy symlinks in `copySync()` [#85][#85]
+
+0.11.1 / 2014-09-02
+-------------------
+- bugfix `copySync()` preserve file permissions [#80][#80]
+
+0.11.0 / 2014-08-11
+-------------------
+- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"`
+- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()`
+see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details.
+
+0.10.0 / 2014-06-29
+------------------
+* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change
+from `~` to `^`. [#67]
+
+0.9.1 / 2014-05-22
+------------------
+* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there
+
+0.9.0 / 2014-05-22
+------------------
+* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58]
+* upgraded `rimraf` from `~2.2.6` to `^2.2.8`
+* upgraded `mkdirp` from `0.3.x` to `^0.5.0`
+* added methods `ensureFile()`, `ensureFileSync()`
+* added methods `ensureDir()`, `ensureDirSync()` [#31]
+* added `move()` method. From: https://github.com/andrewrk/node-mv
+
+
+0.8.1 / 2013-10-24
+------------------
+* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39])
+
+0.8.0 / 2013-10-14
+------------------
+* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36])
+
+0.7.1 / 2013-10-12
+------------------
+* `copySync()` implemented (Srirangan / [#33])
+* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32]
+
+0.7.0 / 2013-10-07
+------------------
+* update readme conventions
+* `copy()` now works if destination directory does not exist. Closes [#29]
+
+0.6.4 / 2013-09-05
+------------------
+* changed `homepage` field in package.json to remove NPM warning
+
+0.6.3 / 2013-06-28
+------------------
+* changed JSON spacing default from `4` to `2` to follow Node conventions
+* updated `jsonfile` dep
+* updated `rimraf` dep
+
+0.6.2 / 2013-06-28
+------------------
+* added .npmignore, [#25]
+
+0.6.1 / 2013-05-14
+------------------
+* modified for `strict` mode, closes [#24]
+* added `outputJson()/outputJsonSync()`, closes [#23]
+
+0.6.0 / 2013-03-18
+------------------
+* removed node 0.6 support
+* added node 0.10 support
+* upgraded to latest `ncp` and `rimraf`.
+* optional `graceful-fs` support. Closes [#17]
+
+
+0.5.0 / 2013-02-03
+------------------
+* Removed `readTextFile`.
+* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write.
+* Restructured documentation a bit. Added roadmap.
+
+0.4.0 / 2013-01-28
+------------------
+* Set default spaces in `jsonfile` from 4 to 2.
+* Updated `testutil` deps for tests.
+* Renamed `touch()` to `createFile()`
+* Added `outputFile()` and `outputFileSync()`
+* Changed creation of testing diretories so the /tmp dir is not littered.
+* Added `readTextFile()` and `readTextFileSync()`.
+
+0.3.2 / 2012-11-01
+------------------
+* Added `touch()` and `touchSync()` methods.
+
+0.3.1 / 2012-10-11
+------------------
+* Fixed some stray globals.
+
+0.3.0 / 2012-10-09
+------------------
+* Removed all CoffeeScript from tests.
+* Renamed `mkdir` to `mkdirs`/`mkdirp`.
+
+0.2.1 / 2012-09-11
+------------------
+* Updated `rimraf` dep.
+
+0.2.0 / 2012-09-10
+------------------
+* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript)
+* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile)
+* Added Travis-CI.
+
+0.1.3 / 2012-08-13
+------------------
+* Added method `readJSONFile`.
+
+0.1.2 / 2012-06-15
+------------------
+* Bug fix: `deleteSync()` didn't exist.
+* Verified Node v0.8 compatibility.
+
+0.1.1 / 2012-06-15
+------------------
+* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed.
+
+0.1.0 / 2012-05-31
+------------------
+* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too.
+* Renamed `rmrf()` to `remove()`.
+* `remove()` aliased with `delete()`.
+* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`.
+* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead.
+
+0.0.4 / 2012-03-14
+------------------
+* Removed CoffeeScript dependency
+
+0.0.3 / 2012-01-11
+------------------
+* Added methods rmrf and rmrfSync
+* Moved tests from Jasmine to Mocha
+
+
+[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year"
+[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme"
+[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move"
+[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]"
+[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]"
+[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]"
+[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]"
+[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value"
+[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]"
+[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]"
+[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]"
+[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]"
+[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support"
+[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]"
+[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]"
+[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]"
+[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]"
+[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]"
+[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]"
+[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]"
+[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]"
+[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?"
+[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative"
+[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]"
+[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink "
+[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists"
+[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]"
+[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms"
+[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]"
+[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug."
+[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]"
+[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters."
+[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]"
+[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]"
+[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]"
+[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]"
+[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link"
+[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage"
+[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error"
+[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls"
+[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]"
+[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]"
+[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated"
+[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]"
+[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]"
+[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]"
+[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]"
+[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node"
+[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]"
+[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]"
+[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]"
+[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs"
+[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]"
+[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying"
+[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]"
+[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]"
+[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function"
+[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390"
+[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not"
+[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()"
+[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()"
+[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?"
+[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing"
+[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]"
+[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership"
+[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options"
+[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]"
+[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API"
+[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]"
+[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`"
+[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]"
+[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error"
+[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]"
+[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]"
+[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111"
+[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!"
+[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra"
+[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?"
+[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]"
+[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]"
+[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()"
+[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined"
+[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require"
+[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty"
+[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp"
+[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails"
+[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme "
+[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version"
+[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method"
+[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists"
+[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission"
+[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you"
+[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)"
+[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers"
+[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy"
+[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package"
+[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file"
+[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]"
+[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories"
+[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?"
+[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]"
+[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream"
+[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request"
+[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]"
+[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread."
+[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..."
+[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo"
+[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)"
+[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci"
+[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]"
+[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. "
+[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML"
+[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test"
+[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir"
+[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out"
+[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]"
+[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory"
+[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink"
+[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error"
+[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync"
+[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function"
+[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md"
+[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods."
+[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example"
+[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug"
+[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug"
+[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug"
+[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]"
+[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag"
+[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo"
+[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE"
+[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files"
+[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]"
+[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]"
+[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]"
+[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions"
+[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync"
+[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]"
+[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files"
+[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]"
+[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?"
+[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]"
+[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync"
+[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]"
+[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]"
+[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]"
+[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]"
+[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?"
+[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file"
+[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]"
+[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()"
+[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]"
+[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true"
+[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows"
+[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform"
+[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]"
+[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]"
+[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x"
+[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra"
+[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]"
+[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified"
+[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]"
+[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]"
+[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir"
+[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync "
+[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]"
+[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event"
+[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]"
+[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter"
+[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs"
+[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`"
+[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases"
+[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives"
+[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error"
+[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error"
+[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]"
+[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content"
+[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink"
+[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content"
+[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]"
+[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link"
+[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link"
+[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link"
+[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link"
+[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods"
+[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted"
+[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods"
+[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme"
+[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync"
+[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152"
+[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]"
+[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]"
+[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code."
+[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync"
+[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation"
+[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty"
+[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works"
+[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist."
+[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing"
+[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs"
+[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature"
+[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps"
+[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'"
+[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138"
+[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files"
+[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input"
+[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute"
+[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided"
+[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir"
+[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`"
+[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method"
+[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]"
+[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features."
+[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?"
+[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;"
+[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists"
+[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object #<Object> has no method 'access'"
+[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync"
+[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'"
+[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory"
+[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids."
+[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined"
+[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'"
+[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows"
+[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream"
+[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows"
+[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]"
+[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]"
+[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true"
+[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists"
+[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory"
+[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory "
+[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory"
+[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails"
+[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work"
+[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it"
+[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]"
+[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs"
+[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]"
+[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy"
+[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?"
+[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified"
+[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp"
+[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]"
+[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]"
+[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug"
+[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined."
+[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp"
+[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]"
+[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]"
+[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird"
+[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]"
+[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine"
+[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows"
+[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries"
+[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?"
+[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?"
+[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync"
+[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?"
+[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]"
+[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move"
+[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move"
+[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync"
+[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty"
+[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories"
+[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird"
+[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript"
+[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]"
+[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module"
+[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme"
+[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality"
+[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work"
+[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]"
+[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name"
+[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]"
+[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options"
+[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG"
+[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy"
+[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls"
+[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk"
+[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work"
+[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies"
+[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs"
+[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]"
+[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error"
+[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?"
+[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy "
+[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?"
+[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons"
+[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode"
+[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync"
+[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README"
+[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile"
+[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6"
+[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]"
+[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0"
+[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year"
+[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites"
+[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support"
+[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting "
+[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?"
+[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now"
+[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime "
+[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error"
+[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null"
+[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]"
+[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`"
+[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` "
+[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]"
+[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync"
+[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]"
+[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]"
+[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`"
+[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?"
+[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted."
+[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme"
+[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]"
+[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file"
+[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]"
+[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories"
+[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()"
+[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0"
+[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted"
+[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array"
+[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function"
+[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`"
+[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md"
+[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]"
+[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1"
+[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]"
+[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global"
+[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]"
+[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]"
+[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra"
+[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version"
+[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency"
+[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming"
+[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2"
+[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!"
+[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp"
+[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist"
diff --git a/node_modules/@electron/get/node_modules/fs-extra/LICENSE b/node_modules/@electron/get/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+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/@electron/get/node_modules/fs-extra/README.md b/node_modules/@electron/get/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..070a5e7
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/README.md
@@ -0,0 +1,261 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
+
+[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![License](https://img.shields.io/npm/l/express.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
+[![build status](https://img.shields.io/travis/jprichardson/node-fs-extra/master.svg)](http://travis-ci.org/jprichardson/node-fs-extra)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
+[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![Coverage Status](https://img.shields.io/coveralls/github/jprichardson/node-fs-extra/master.svg)](https://coveralls.io/github/jprichardson/node-fs-extra)
+[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install fs-extra
+
+
+
+Usage
+-----
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+Sync vs Async vs Async/Await
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Also Async/Await will throw an error if one occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+
+// Async/Await:
+async function copyFiles () {
+ try {
+ await fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+ } catch (err) {
+ console.error(err)
+ }
+}
+
+copyFiles()
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirp](docs/ensureDir.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirpSync](docs/ensureDir-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()` & `fs.write()`](docs/fs-read-write.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+### Obtain Filesystem (Devices, Partitions) Information
+
+[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
+
+### Misc.
+
+- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage. See coveralls output for more info.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm test`: runs both the linter and the tests
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/copy-sync.js
new file mode 100644
index 0000000..f2831b3
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/copy-sync.js
@@ -0,0 +1,164 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirpSync = require('../mkdirs').mkdirsSync
+const utimesSync = require('../util/utimes.js').utimesMillisSync
+const stat = require('../util/stat')
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy')
+ stat.checkParentPathsSync(src, srcStat, dest, 'copy')
+ return handleFilterAndCopy(destStat, src, dest, opts)
+}
+
+function handleFilterAndCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirpSync(destParent)
+ return startCopy(destStat, src, dest, opts)
+}
+
+function startCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ if (typeof fs.copyFileSync === 'function') {
+ fs.copyFileSync(src, dest)
+ fs.chmodSync(dest, srcStat.mode)
+ if (opts.preserveTimestamps) {
+ return utimesSync(dest, srcStat.atime, srcStat.mtime)
+ }
+ return
+ }
+ return copyFileFallback(srcStat, src, dest, opts)
+}
+
+function copyFileFallback (srcStat, src, dest, opts) {
+ const BUF_LENGTH = 64 * 1024
+ const _buff = require('../util/buffer')(BUF_LENGTH)
+
+ const fdr = fs.openSync(src, 'r')
+ const fdw = fs.openSync(dest, 'w', srcStat.mode)
+ let pos = 0
+
+ while (pos < srcStat.size) {
+ const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)
+ fs.writeSync(fdw, _buff, 0, bytesRead)
+ pos += bytesRead
+ }
+
+ if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime)
+
+ fs.closeSync(fdr)
+ fs.closeSync(fdw)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts)
+ if (destStat && !destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
+ }
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcStat, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return fs.chmodSync(dest, srcStat.mode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy')
+ return startCopy(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+module.exports = copySync
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/index.js
new file mode 100644
index 0000000..65945ae
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/copy-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ copySync: require('./copy-sync')
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/copy/copy.js b/node_modules/@electron/get/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..411fc64
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,212 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirp = require('../mkdirs').mkdirs
+const pathExists = require('../path-exists').pathExists
+const utimes = require('../util/utimes').utimesMillis
+const stat = require('../util/stat')
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ stat.checkPaths(src, dest, 'copy', (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
+ if (err) return cb(err)
+ if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
+ return checkParentDir(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return startCopy(destStat, src, dest, opts, cb)
+ mkdirp(destParent, err => {
+ if (err) return cb(err)
+ return startCopy(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function handleFilter (onInclude, destStat, src, dest, opts, cb) {
+ Promise.resolve(opts.filter(src, dest)).then(include => {
+ if (include) return onInclude(destStat, src, dest, opts, cb)
+ return cb()
+ }, error => cb(error))
+}
+
+function startCopy (destStat, src, dest, opts, cb) {
+ if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
+ return getStats(destStat, src, dest, opts, cb)
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ if (typeof fs.copyFile === 'function') {
+ return fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ return setDestModeAndTimestamps(srcStat, dest, opts, cb)
+ })
+ }
+ return copyFileFallback(srcStat, src, dest, opts, cb)
+}
+
+function copyFileFallback (srcStat, src, dest, opts, cb) {
+ const rs = fs.createReadStream(src)
+ rs.on('error', err => cb(err)).once('open', () => {
+ const ws = fs.createWriteStream(dest, { mode: srcStat.mode })
+ ws.on('error', err => cb(err))
+ .on('open', () => rs.pipe(ws))
+ .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb))
+ })
+}
+
+function setDestModeAndTimestamps (srcStat, dest, opts, cb) {
+ fs.chmod(dest, srcStat.mode, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) {
+ return utimes(dest, srcStat.atime, srcStat.mtime, cb)
+ }
+ return cb()
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts, cb)
+ if (destStat && !destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
+ }
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcStat, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return fs.chmod(dest, srcStat.mode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => {
+ if (err) return cb(err)
+ const { destStat } = stats
+ startCopy(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+module.exports = copy
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/copy/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..b7e4f7f
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy'))
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/empty/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..204d53b
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,48 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(function emptyDir (dir, callback) {
+ callback = callback || function () {}
+ fs.readdir(dir, (err, items) => {
+ if (err) return mkdir.mkdirs(dir, callback)
+
+ items = items.map(item => path.join(dir, item))
+
+ deleteItem()
+
+ function deleteItem () {
+ const item = items.pop()
+ if (!item) return callback()
+ remove.remove(item, err => {
+ if (err) return callback(err)
+ deleteItem()
+ })
+ }
+ })
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch (err) {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/file.js b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..67eed30
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,49 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeFile()
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch (e) {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ if (!fs.existsSync(dir)) {
+ mkdir.mkdirsSync(dir)
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..c1f67b7
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const file = require('./file')
+const link = require('./link')
+const symlink = require('./symlink')
+
+module.exports = {
+ // file
+ createFile: file.createFile,
+ createFileSync: file.createFileSync,
+ ensureFile: file.createFile,
+ ensureFileSync: file.createFileSync,
+ // link
+ createLink: link.createLink,
+ createLinkSync: link.createLinkSync,
+ ensureLink: link.createLink,
+ ensureLinkSync: link.createLinkSync,
+ // symlink
+ createSymlink: symlink.createSymlink,
+ createSymlinkSync: symlink.createSymlinkSync,
+ ensureSymlink: symlink.createSymlink,
+ ensureSymlinkSync: symlink.createSymlinkSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/link.js b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..2cd4196
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,61 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ try {
+ fs.lstatSync(srcpath)
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..24e7e1c
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ 'toCwd': srcpath,
+ 'toDst': srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ 'toCwd': relativeToDst,
+ 'toDst': srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ 'toCwd': srcpath,
+ 'toDst': path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ 'toCwd': srcpath,
+ 'toDst': srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ 'toCwd': relativeToDst,
+ 'toDst': srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ 'toCwd': srcpath,
+ 'toDst': path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..4f8787c
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch (e) {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..fe68b79
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,63 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/fs/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..a7b2292
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,109 @@
+'use strict'
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchown',
+ 'lchmod',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'readFile',
+ 'readdir',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.copyFile was added in Node.js v8.5.0
+ // fs.mkdtemp was added in Node.js v5.10.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export all keys:
+Object.keys(fs).forEach(key => {
+ if (key === 'promises') {
+ // fs.promises is a getter property that triggers ExperimentalWarning
+ // Don't re-export it here, the getter is defined in "lib/index.js"
+ return
+ }
+ exports[key] = fs[key]
+})
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read() & fs.write need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
+
+// fs.realpath.native only available in Node v9.2+
+if (typeof fs.realpath.native === 'function') {
+ exports.realpath.native = u(fs.realpath.native)
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..40e37b1
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,28 @@
+'use strict'
+
+module.exports = Object.assign(
+ {},
+ // Export promiseified graceful-fs:
+ require('./fs'),
+ // Export extra methods:
+ require('./copy-sync'),
+ require('./copy'),
+ require('./empty'),
+ require('./ensure'),
+ require('./json'),
+ require('./mkdirs'),
+ require('./move-sync'),
+ require('./move'),
+ require('./output'),
+ require('./path-exists'),
+ require('./remove')
+)
+
+// Export fs.promises as a getter property so that we don't trigger
+// ExperimentalWarning before fs.promises is actually accessed.
+const fs = require('fs')
+if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
+ Object.defineProperty(module.exports, 'promises', {
+ get () { return fs.promises }
+ })
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/json/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..bae68d4
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/@electron/get/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..59cdb3e
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: u(jsonFile.readFile),
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: u(jsonFile.writeFile),
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..6f76710
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,18 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const jsonFile = require('./jsonfile')
+
+function outputJsonSync (file, data, options) {
+ const dir = path.dirname(file)
+
+ if (!fs.existsSync(dir)) {
+ mkdir.mkdirsSync(dir)
+ }
+
+ jsonFile.writeJsonSync(file, data, options)
+}
+
+module.exports = outputJsonSync
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json.js b/node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..d45edb8
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,27 @@
+'use strict'
+
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+const jsonFile = require('./jsonfile')
+
+function outputJson (file, data, options, callback) {
+ if (typeof options === 'function') {
+ callback = options
+ options = {}
+ }
+
+ const dir = path.dirname(file)
+
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return jsonFile.writeJson(file, data, options, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ jsonFile.writeJson(file, data, options, callback)
+ })
+ })
+}
+
+module.exports = outputJson
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..d6e7e5b
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromCallback
+const mkdirs = u(require('./mkdirs'))
+const mkdirsSync = require('./mkdirs-sync')
+
+module.exports = {
+ mkdirs,
+ mkdirsSync,
+ // alias
+ mkdirp: mkdirs,
+ mkdirpSync: mkdirsSync,
+ ensureDir: mkdirs,
+ ensureDirSync: mkdirsSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
new file mode 100644
index 0000000..a34acb9
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
@@ -0,0 +1,54 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const invalidWin32Path = require('./win32').invalidWin32Path
+
+const o777 = parseInt('0777', 8)
+
+function mkdirsSync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts }
+ }
+
+ let mode = opts.mode
+ const xfs = opts.fs || fs
+
+ if (process.platform === 'win32' && invalidWin32Path(p)) {
+ const errInval = new Error(p + ' contains invalid WIN32 path characters.')
+ errInval.code = 'EINVAL'
+ throw errInval
+ }
+
+ if (mode === undefined) {
+ mode = o777 & (~process.umask())
+ }
+ if (!made) made = null
+
+ p = path.resolve(p)
+
+ try {
+ xfs.mkdirSync(p, mode)
+ made = made || p
+ } catch (err0) {
+ if (err0.code === 'ENOENT') {
+ if (path.dirname(p) === p) throw err0
+ made = mkdirsSync(path.dirname(p), opts, made)
+ mkdirsSync(p, opts, made)
+ } else {
+ // In the case of any other error, just see if there's a dir there
+ // already. If so, then hooray! If not, then something is borked.
+ let stat
+ try {
+ stat = xfs.statSync(p)
+ } catch (err1) {
+ throw err0
+ }
+ if (!stat.isDirectory()) throw err0
+ }
+ }
+
+ return made
+}
+
+module.exports = mkdirsSync
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs.js b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs.js
new file mode 100644
index 0000000..1897533
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/mkdirs.js
@@ -0,0 +1,63 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const invalidWin32Path = require('./win32').invalidWin32Path
+
+const o777 = parseInt('0777', 8)
+
+function mkdirs (p, opts, callback, made) {
+ if (typeof opts === 'function') {
+ callback = opts
+ opts = {}
+ } else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts }
+ }
+
+ if (process.platform === 'win32' && invalidWin32Path(p)) {
+ const errInval = new Error(p + ' contains invalid WIN32 path characters.')
+ errInval.code = 'EINVAL'
+ return callback(errInval)
+ }
+
+ let mode = opts.mode
+ const xfs = opts.fs || fs
+
+ if (mode === undefined) {
+ mode = o777 & (~process.umask())
+ }
+ if (!made) made = null
+
+ callback = callback || function () {}
+ p = path.resolve(p)
+
+ xfs.mkdir(p, mode, er => {
+ if (!er) {
+ made = made || p
+ return callback(null, made)
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ if (path.dirname(p) === p) return callback(er)
+ mkdirs(path.dirname(p), opts, (er, made) => {
+ if (er) callback(er, made)
+ else mkdirs(p, opts, callback, made)
+ })
+ break
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, (er2, stat) => {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) callback(er, made)
+ else callback(null, made)
+ })
+ break
+ }
+ })
+}
+
+module.exports = mkdirs
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/win32.js b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/win32.js
new file mode 100644
index 0000000..99b3920
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/mkdirs/win32.js
@@ -0,0 +1,25 @@
+'use strict'
+
+const path = require('path')
+
+// get drive on windows
+function getRootPath (p) {
+ p = path.normalize(path.resolve(p)).split(path.sep)
+ if (p.length > 0) return p[0]
+ return null
+}
+
+// http://stackoverflow.com/a/62888/10333 contains more accurate
+// TODO: expand to include the rest
+const INVALID_PATH_CHARS = /[<>:"|?*]/
+
+function invalidWin32Path (p) {
+ const rp = getRootPath(p)
+ p = p.replace(rp, '')
+ return INVALID_PATH_CHARS.test(p)
+}
+
+module.exports = {
+ getRootPath,
+ invalidWin32Path
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/index.js
new file mode 100644
index 0000000..af90b06
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ moveSync: require('./move-sync')
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/move-sync.js b/node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/move-sync.js
new file mode 100644
index 0000000..20f910c
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/move-sync/move-sync.js
@@ -0,0 +1,47 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy-sync').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirpSync
+const stat = require('../util/stat')
+
+function moveSync (src, dest, opts) {
+ opts = opts || {}
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ const { srcStat } = stat.checkPathsSync(src, dest, 'move')
+ stat.checkParentPathsSync(src, srcStat, dest, 'move')
+ mkdirpSync(path.dirname(dest))
+ return doRename(src, dest, overwrite)
+}
+
+function doRename (src, dest, overwrite) {
+ if (overwrite) {
+ removeSync(dest)
+ return rename(src, dest, overwrite)
+ }
+ if (fs.existsSync(dest)) throw new Error('dest already exists.')
+ return rename(src, dest, overwrite)
+}
+
+function rename (src, dest, overwrite) {
+ try {
+ fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code !== 'EXDEV') throw err
+ return moveAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveAcrossDevice (src, dest, overwrite) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copySync(src, dest, opts)
+ return removeSync(src)
+}
+
+module.exports = moveSync
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/move/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..3785345
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ move: u(require('./move'))
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/move/move.js b/node_modules/@electron/get/node_modules/fs-extra/lib/move/move.js
new file mode 100644
index 0000000..fa3ea61
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/move/move.js
@@ -0,0 +1,65 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copy = require('../copy').copy
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirp
+const pathExists = require('../path-exists').pathExists
+const stat = require('../util/stat')
+
+function move (src, dest, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ stat.checkPaths(src, dest, 'move', (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'move', err => {
+ if (err) return cb(err)
+ mkdirp(path.dirname(dest), err => {
+ if (err) return cb(err)
+ return doRename(src, dest, overwrite, cb)
+ })
+ })
+ })
+}
+
+function doRename (src, dest, overwrite, cb) {
+ if (overwrite) {
+ return remove(dest, err => {
+ if (err) return cb(err)
+ return rename(src, dest, overwrite, cb)
+ })
+ }
+ pathExists(dest, (err, destExists) => {
+ if (err) return cb(err)
+ if (destExists) return cb(new Error('dest already exists.'))
+ return rename(src, dest, overwrite, cb)
+ })
+}
+
+function rename (src, dest, overwrite, cb) {
+ fs.rename(src, dest, err => {
+ if (!err) return cb()
+ if (err.code !== 'EXDEV') return cb(err)
+ return moveAcrossDevice(src, dest, overwrite, cb)
+ })
+}
+
+function moveAcrossDevice (src, dest, overwrite, cb) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copy(src, dest, opts, err => {
+ if (err) return cb(err)
+ return remove(src, cb)
+ })
+}
+
+module.exports = move
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/output/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/output/index.js
new file mode 100644
index 0000000..92297ca
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/output/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, ...args) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync(file, ...args)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync(file, ...args)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/remove/index.js b/node_modules/@electron/get/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..cee5340
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,9 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const rimraf = require('./rimraf')
+
+module.exports = {
+ remove: u(rimraf),
+ removeSync: rimraf.sync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/@electron/get/node_modules/fs-extra/lib/remove/rimraf.js
new file mode 100644
index 0000000..f287e4e
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/remove/rimraf.js
@@ -0,0 +1,314 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const assert = require('assert')
+
+const isWindows = (process.platform === 'win32')
+
+function defaults (options) {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+}
+
+function rimraf (p, options, cb) {
+ let busyTries = 0
+
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
+ busyTries < options.maxBusyTries) {
+ busyTries++
+ const time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), time)
+ }
+
+ // already gone
+ if (er.code === 'ENOENT') er = null
+ }
+
+ cb(er)
+ })
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === 'ENOENT') {
+ return cb(null)
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === 'EPERM' && isWindows) {
+ return fixWinEPERM(p, options, er, cb)
+ }
+
+ if (st && st.isDirectory()) {
+ return rmdir(p, options, er, cb)
+ }
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === 'ENOENT') {
+ return cb(null)
+ }
+ if (er.code === 'EPERM') {
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ }
+ if (er.code === 'EISDIR') {
+ return rmdir(p, options, er, cb)
+ }
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+ if (er) {
+ assert(er instanceof Error)
+ }
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2) {
+ cb(er2.code === 'ENOENT' ? null : er)
+ } else {
+ options.stat(p, (er3, stats) => {
+ if (er3) {
+ cb(er3.code === 'ENOENT' ? null : er)
+ } else if (stats.isDirectory()) {
+ rmdir(p, options, er, cb)
+ } else {
+ options.unlink(p, cb)
+ }
+ })
+ }
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ let stats
+
+ assert(p)
+ assert(options)
+ if (er) {
+ assert(er instanceof Error)
+ }
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ if (stats.isDirectory()) {
+ rmdirSync(p, options, er)
+ } else {
+ options.unlinkSync(p)
+ }
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ if (originalEr) {
+ assert(originalEr instanceof Error)
+ }
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
+ rmkids(p, options, cb)
+ } else if (er && er.code === 'ENOTDIR') {
+ cb(originalEr)
+ } else {
+ cb(er)
+ }
+ })
+}
+
+function rmkids (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er) return cb(er)
+
+ let n = files.length
+ let errState
+
+ if (n === 0) return options.rmdir(p, cb)
+
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState) {
+ return
+ }
+ if (er) return cb(errState = er)
+ if (--n === 0) {
+ options.rmdir(p, cb)
+ }
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ let st
+
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === 'EPERM' && isWindows) {
+ fixWinEPERMSync(p, options, er)
+ }
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory()) {
+ rmdirSync(p, options, null)
+ } else {
+ options.unlinkSync(p)
+ }
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ } else if (er.code === 'EPERM') {
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ } else if (er.code !== 'EISDIR') {
+ throw er
+ }
+ rmdirSync(p, options, er)
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+ if (originalEr) {
+ assert(originalEr instanceof Error)
+ }
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === 'ENOTDIR') {
+ throw originalEr
+ } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
+ rmkidsSync(p, options)
+ } else if (er.code !== 'ENOENT') {
+ throw er
+ }
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ if (isWindows) {
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const startTime = Date.now()
+ do {
+ try {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ } catch (er) { }
+ } while (Date.now() - startTime < 500) // give up after 500ms
+ } else {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ }
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/util/buffer.js b/node_modules/@electron/get/node_modules/fs-extra/lib/util/buffer.js
new file mode 100644
index 0000000..dabf288
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/util/buffer.js
@@ -0,0 +1,12 @@
+'use strict'
+/* eslint-disable node/no-deprecated-api */
+module.exports = function (size) {
+ if (typeof Buffer.allocUnsafe === 'function') {
+ try {
+ return Buffer.allocUnsafe(size)
+ } catch (e) {
+ return new Buffer(size)
+ }
+ }
+ return new Buffer(size)
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/util/stat.js b/node_modules/@electron/get/node_modules/fs-extra/lib/util/stat.js
new file mode 100644
index 0000000..350cb9f
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/util/stat.js
@@ -0,0 +1,172 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+
+const NODE_VERSION_MAJOR_WITH_BIGINT = 10
+const NODE_VERSION_MINOR_WITH_BIGINT = 5
+const NODE_VERSION_PATCH_WITH_BIGINT = 0
+const nodeVersion = process.versions.node.split('.')
+const nodeVersionMajor = Number.parseInt(nodeVersion[0], 10)
+const nodeVersionMinor = Number.parseInt(nodeVersion[1], 10)
+const nodeVersionPatch = Number.parseInt(nodeVersion[2], 10)
+
+function nodeSupportsBigInt () {
+ if (nodeVersionMajor > NODE_VERSION_MAJOR_WITH_BIGINT) {
+ return true
+ } else if (nodeVersionMajor === NODE_VERSION_MAJOR_WITH_BIGINT) {
+ if (nodeVersionMinor > NODE_VERSION_MINOR_WITH_BIGINT) {
+ return true
+ } else if (nodeVersionMinor === NODE_VERSION_MINOR_WITH_BIGINT) {
+ if (nodeVersionPatch >= NODE_VERSION_PATCH_WITH_BIGINT) {
+ return true
+ }
+ }
+ }
+ return false
+}
+
+function getStats (src, dest, cb) {
+ if (nodeSupportsBigInt()) {
+ fs.stat(src, { bigint: true }, (err, srcStat) => {
+ if (err) return cb(err)
+ fs.stat(dest, { bigint: true }, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null })
+ return cb(err)
+ }
+ return cb(null, { srcStat, destStat })
+ })
+ })
+ } else {
+ fs.stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+ fs.stat(dest, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null })
+ return cb(err)
+ }
+ return cb(null, { srcStat, destStat })
+ })
+ })
+ }
+}
+
+function getStatsSync (src, dest) {
+ let srcStat, destStat
+ if (nodeSupportsBigInt()) {
+ srcStat = fs.statSync(src, { bigint: true })
+ } else {
+ srcStat = fs.statSync(src)
+ }
+ try {
+ if (nodeSupportsBigInt()) {
+ destStat = fs.statSync(dest, { bigint: true })
+ } else {
+ destStat = fs.statSync(dest)
+ }
+ } catch (err) {
+ if (err.code === 'ENOENT') return { srcStat, destStat: null }
+ throw err
+ }
+ return { srcStat, destStat }
+}
+
+function checkPaths (src, dest, funcName, cb) {
+ getStats(src, dest, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
+ return cb(new Error('Source and destination must not be the same.'))
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return cb(null, { srcStat, destStat })
+ })
+}
+
+function checkPathsSync (src, dest, funcName) {
+ const { srcStat, destStat } = getStatsSync(src, dest)
+ if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
+ throw new Error('Source and destination must not be the same.')
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return { srcStat, destStat }
+}
+
+// recursively check if dest parent is a subdirectory of src.
+// It works for all file types including symlinks since it
+// checks the src and dest inodes. It starts from the deepest
+// parent and stops once it reaches the src parent or the root path.
+function checkParentPaths (src, srcStat, dest, funcName, cb) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
+ if (nodeSupportsBigInt()) {
+ fs.stat(destParent, { bigint: true }, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb()
+ return cb(err)
+ }
+ if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return checkParentPaths(src, srcStat, destParent, funcName, cb)
+ })
+ } else {
+ fs.stat(destParent, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb()
+ return cb(err)
+ }
+ if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return checkParentPaths(src, srcStat, destParent, funcName, cb)
+ })
+ }
+}
+
+function checkParentPathsSync (src, srcStat, dest, funcName) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return
+ let destStat
+ try {
+ if (nodeSupportsBigInt()) {
+ destStat = fs.statSync(destParent, { bigint: true })
+ } else {
+ destStat = fs.statSync(destParent)
+ }
+ } catch (err) {
+ if (err.code === 'ENOENT') return
+ throw err
+ }
+ if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return checkParentPathsSync(src, srcStat, destParent, funcName)
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// It only checks the path strings.
+function isSrcSubdir (src, dest) {
+ const srcArr = path.resolve(src).split(path.sep).filter(i => i)
+ const destArr = path.resolve(dest).split(path.sep).filter(i => i)
+ return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
+}
+
+function errMsg (src, dest, funcName) {
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
+}
+
+module.exports = {
+ checkPaths,
+ checkPathsSync,
+ checkParentPaths,
+ checkParentPathsSync,
+ isSrcSubdir
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/lib/util/utimes.js b/node_modules/@electron/get/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..8916a1b
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,79 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const os = require('os')
+const path = require('path')
+
+// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
+function hasMillisResSync () {
+ let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2))
+ tmpfile = path.join(os.tmpdir(), tmpfile)
+
+ // 550 millis past UNIX epoch
+ const d = new Date(1435410243862)
+ fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
+ const fd = fs.openSync(tmpfile, 'r+')
+ fs.futimesSync(fd, d, d)
+ fs.closeSync(fd)
+ return fs.statSync(tmpfile).mtime > 1435410243000
+}
+
+function hasMillisRes (callback) {
+ let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2))
+ tmpfile = path.join(os.tmpdir(), tmpfile)
+
+ // 550 millis past UNIX epoch
+ const d = new Date(1435410243862)
+ fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => {
+ if (err) return callback(err)
+ fs.open(tmpfile, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, d, d, err => {
+ if (err) return callback(err)
+ fs.close(fd, err => {
+ if (err) return callback(err)
+ fs.stat(tmpfile, (err, stats) => {
+ if (err) return callback(err)
+ callback(null, stats.mtime > 1435410243000)
+ })
+ })
+ })
+ })
+ })
+}
+
+function timeRemoveMillis (timestamp) {
+ if (typeof timestamp === 'number') {
+ return Math.floor(timestamp / 1000) * 1000
+ } else if (timestamp instanceof Date) {
+ return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
+ } else {
+ throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
+ }
+}
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+function utimesMillisSync (path, atime, mtime) {
+ const fd = fs.openSync(path, 'r+')
+ fs.futimesSync(fd, atime, mtime)
+ return fs.closeSync(fd)
+}
+
+module.exports = {
+ hasMillisRes,
+ hasMillisResSync,
+ timeRemoveMillis,
+ utimesMillis,
+ utimesMillisSync
+}
diff --git a/node_modules/@electron/get/node_modules/fs-extra/package.json b/node_modules/@electron/get/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..559d88b
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/fs-extra/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "fs-extra",
+ "version": "8.1.0",
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.",
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ },
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jprichardson/node-fs-extra"
+ },
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "devDependencies": {
+ "coveralls": "^3.0.0",
+ "istanbul": "^0.4.5",
+ "klaw": "^2.1.1",
+ "klaw-sync": "^3.0.2",
+ "minimist": "^1.1.1",
+ "mocha": "^5.0.5",
+ "proxyquire": "^2.0.1",
+ "read-dir-files": "^0.1.1",
+ "semver": "^5.3.0",
+ "standard": "^12.0.1"
+ },
+ "main": "./lib/index.js",
+ "files": [
+ "lib/",
+ "!lib/**/__tests__/"
+ ],
+ "scripts": {
+ "full-ci": "npm run lint && npm run coverage",
+ "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js",
+ "coveralls": "coveralls < coverage/lcov.info",
+ "lint": "standard",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "test": "npm run lint && npm run unit",
+ "unit": "node test.js"
+ }
+}
diff --git a/node_modules/@electron/get/node_modules/ms/index.js b/node_modules/@electron/get/node_modules/ms/index.js
new file mode 100644
index 0000000..c4498bc
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/@electron/get/node_modules/ms/license.md b/node_modules/@electron/get/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@electron/get/node_modules/ms/package.json b/node_modules/@electron/get/node_modules/ms/package.json
new file mode 100644
index 0000000..eea666e
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.1.2",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ }
+}
diff --git a/node_modules/@electron/get/node_modules/ms/readme.md b/node_modules/@electron/get/node_modules/ms/readme.md
new file mode 100644
index 0000000..9a1996b
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/@electron/get/node_modules/semver/CHANGELOG.md b/node_modules/@electron/get/node_modules/semver/CHANGELOG.md
new file mode 100644
index 0000000..f567dd3
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/semver/CHANGELOG.md
@@ -0,0 +1,70 @@
+# changes log
+
+## 6.2.0
+
+* Coerce numbers to strings when passed to semver.coerce()
+* Add `rtl` option to coerce from right to left
+
+## 6.1.3
+
+* Handle X-ranges properly in includePrerelease mode
+
+## 6.1.2
+
+* Do not throw when testing invalid version strings
+
+## 6.1.1
+
+* Add options support for semver.coerce()
+* Handle undefined version passed to Range.test
+
+## 6.1.0
+
+* Add semver.compareBuild function
+* Support `*` in semver.intersects
+
+## 6.0
+
+* Fix `intersects` logic.
+
+ This is technically a bug fix, but since it is also a change to behavior
+ that may require users updating their code, it is marked as a major
+ version increment.
+
+## 5.7
+
+* Add `minVersion` method
+
+## 5.6
+
+* Move boolean `loose` param to an options object, with
+ backwards-compatibility protection.
+* Add ability to opt out of special prerelease version handling with
+ the `includePrerelease` option flag.
+
+## 5.5
+
+* Add version coercion capabilities
+
+## 5.4
+
+* Add intersection checking
+
+## 5.3
+
+* Add `minSatisfying` method
+
+## 5.2
+
+* Add `prerelease(v)` that returns prerelease components
+
+## 5.1
+
+* Add Backus-Naur for ranges
+* Remove excessively cute inspection methods
+
+## 5.0
+
+* Remove AMD/Browserified build artifacts
+* Fix ltr and gtr when using the `*` range
+* Fix for range `*` with a prerelease identifier
diff --git a/node_modules/@electron/get/node_modules/semver/LICENSE b/node_modules/@electron/get/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@electron/get/node_modules/semver/README.md b/node_modules/@electron/get/node_modules/semver/README.md
new file mode 100644
index 0000000..2293a14
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/semver/README.md
@@ -0,0 +1,443 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero element in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
+ are equal. Sorts in ascending order if passed to `Array.sort()`.
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version, options)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
+
+If the `options.rtl` flag is set, then `coerce` will return the right-most
+coercible tuple that does not share an ending index with a longer coercible
+tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
+`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
+any other overlapping SemVer tuple.
+
+### Clean
+
+* `clean(version)`: Clean a string to be a valid semver if possible
+
+This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges.
+
+ex.
+* `s.clean(' = v 2.1.5foo')`: `null`
+* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean(' = v 2.1.5-foo')`: `null`
+* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean('=v2.1.5')`: `'2.1.5'`
+* `s.clean(' =v2.1.5')`: `2.1.5`
+* `s.clean(' 2.1.5 ')`: `'2.1.5'`
+* `s.clean('~1.0.0')`: `null`
diff --git a/node_modules/@electron/get/node_modules/semver/bin/semver.js b/node_modules/@electron/get/node_modules/semver/bin/semver.js
new file mode 100755
index 0000000..666034a
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/semver/bin/semver.js
@@ -0,0 +1,174 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+
+var versions = []
+
+var range = []
+
+var inc = null
+
+var version = require('../package.json').version
+
+var loose = false
+
+var includePrerelease = false
+
+var coerce = false
+
+var rtl = false
+
+var identifier
+
+var semver = require('../semver')
+
+var reverse = false
+
+var options = {}
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(a.slice(indexOfEqualSign + 1))
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '--rtl':
+ rtl = true
+ break
+ case '--ltr':
+ rtl = false
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
+
+ versions = versions.map(function (v) {
+ return coerce ? (semver.coerce(v, options) || { version: v }).version : v
+ }).filter(function (v) {
+ return semver.valid(v)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length)) { return failInc() }
+
+ for (var i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? 'rcompare' : 'compare'
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, options)
+ }).map(function (v) {
+ return semver.clean(v, options)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, options, identifier) : v
+ }).forEach(function (v, i, _) { console.log(v) })
+}
+
+function help () {
+ console.log(['SemVer ' + version,
+ '',
+ 'A JavaScript implementation of the https://semver.org/ specification',
+ 'Copyright Isaac Z. Schlueter',
+ '',
+ 'Usage: semver [options] <version> [<version> [...]]',
+ 'Prints valid versions sorted by SemVer precedence',
+ '',
+ 'Options:',
+ '-r --range <range>',
+ ' Print versions that match the specified range.',
+ '',
+ '-i --increment [<level>]',
+ ' Increment a version by the specified level. Level can',
+ ' be one of: major, minor, patch, premajor, preminor,',
+ " prepatch, or prerelease. Default level is 'patch'.",
+ ' Only one version may be specified.',
+ '',
+ '--preid <identifier>',
+ ' Identifier to be used to prefix premajor, preminor,',
+ ' prepatch or prerelease version increments.',
+ '',
+ '-l --loose',
+ ' Interpret versions and ranges loosely',
+ '',
+ '-p --include-prerelease',
+ ' Always include prerelease versions in range matching',
+ '',
+ '-c --coerce',
+ ' Coerce a string into SemVer if possible',
+ ' (does not imply --loose)',
+ '',
+ '--rtl',
+ ' Coerce version strings right to left',
+ '',
+ '--ltr',
+ ' Coerce version strings left to right (default)',
+ '',
+ 'Program exits successfully if any valid version satisfies',
+ 'all supplied ranges, and prints all satisfying versions.',
+ '',
+ 'If no satisfying versions are found, then exits failure.',
+ '',
+ 'Versions are printed in ascending order, so supplying',
+ 'multiple versions to the utility will just sort them.'
+ ].join('\n'))
+}
diff --git a/node_modules/@electron/get/node_modules/semver/package.json b/node_modules/@electron/get/node_modules/semver/package.json
new file mode 100644
index 0000000..bdd442f
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/semver/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "semver",
+ "version": "6.3.0",
+ "description": "The semantic version parser used by npm.",
+ "main": "semver.js",
+ "scripts": {
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --follow-tags"
+ },
+ "devDependencies": {
+ "tap": "^14.3.1"
+ },
+ "license": "ISC",
+ "repository": "https://github.com/npm/node-semver",
+ "bin": {
+ "semver": "./bin/semver.js"
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ],
+ "tap": {
+ "check-coverage": true
+ }
+}
diff --git a/node_modules/@electron/get/node_modules/semver/range.bnf b/node_modules/@electron/get/node_modules/semver/range.bnf
new file mode 100644
index 0000000..d4c6ae0
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/@electron/get/node_modules/semver/semver.js b/node_modules/@electron/get/node_modules/semver/semver.js
new file mode 100644
index 0000000..636fa43
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/semver/semver.js
@@ -0,0 +1,1596 @@
+exports = module.exports = SemVer
+
+var debug
+/* istanbul ignore next */
+if (typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
+ debug = function () {
+ var args = Array.prototype.slice.call(arguments, 0)
+ args.unshift('SEMVER')
+ console.log.apply(console, args)
+ }
+} else {
+ debug = function () {}
+}
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0'
+
+var MAX_LENGTH = 256
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+ /* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+var MAX_SAFE_COMPONENT_LENGTH = 16
+
+// The actual regexps go on exports.re
+var re = exports.re = []
+var src = exports.src = []
+var t = exports.tokens = {}
+var R = 0
+
+function tok (n) {
+ t[n] = R++
+}
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+tok('NUMERICIDENTIFIER')
+src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
+tok('NUMERICIDENTIFIERLOOSE')
+src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+tok('NONNUMERICIDENTIFIER')
+src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+tok('MAINVERSION')
+src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIER] + ')'
+
+tok('MAINVERSIONLOOSE')
+src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+tok('PRERELEASEIDENTIFIER')
+src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +
+ '|' + src[t.NONNUMERICIDENTIFIER] + ')'
+
+tok('PRERELEASEIDENTIFIERLOOSE')
+src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +
+ '|' + src[t.NONNUMERICIDENTIFIER] + ')'
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+tok('PRERELEASE')
+src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'
+
+tok('PRERELEASELOOSE')
+src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+tok('BUILDIDENTIFIER')
+src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+tok('BUILD')
+src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] +
+ '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))'
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+tok('FULL')
+tok('FULLPLAIN')
+src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +
+ src[t.PRERELEASE] + '?' +
+ src[t.BUILD] + '?'
+
+src[t.FULL] = '^' + src[t.FULLPLAIN] + '$'
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+tok('LOOSEPLAIN')
+src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] +
+ src[t.PRERELEASELOOSE] + '?' +
+ src[t.BUILD] + '?'
+
+tok('LOOSE')
+src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'
+
+tok('GTLT')
+src[t.GTLT] = '((?:<|>)?=?)'
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+tok('XRANGEIDENTIFIERLOOSE')
+src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
+tok('XRANGEIDENTIFIER')
+src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*'
+
+tok('XRANGEPLAIN')
+src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[t.PRERELEASE] + ')?' +
+ src[t.BUILD] + '?' +
+ ')?)?'
+
+tok('XRANGEPLAINLOOSE')
+src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[t.PRERELEASELOOSE] + ')?' +
+ src[t.BUILD] + '?' +
+ ')?)?'
+
+tok('XRANGE')
+src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$'
+tok('XRANGELOOSE')
+src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$'
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+tok('COERCE')
+src[t.COERCE] = '(^|[^\\d])' +
+ '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:$|[^\\d])'
+tok('COERCERTL')
+re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+tok('LONETILDE')
+src[t.LONETILDE] = '(?:~>?)'
+
+tok('TILDETRIM')
+src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
+re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
+var tildeTrimReplace = '$1~'
+
+tok('TILDE')
+src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'
+tok('TILDELOOSE')
+src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+tok('LONECARET')
+src[t.LONECARET] = '(?:\\^)'
+
+tok('CARETTRIM')
+src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
+re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
+var caretTrimReplace = '$1^'
+
+tok('CARET')
+src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'
+tok('CARETLOOSE')
+src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+tok('COMPARATORLOOSE')
+src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'
+tok('COMPARATOR')
+src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$'
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+tok('COMPARATORTRIM')
+src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] +
+ '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'
+
+// this one has to use the /g flag
+re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
+var comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+tok('HYPHENRANGE')
+src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[t.XRANGEPLAIN] + ')' +
+ '\\s*$'
+
+tok('HYPHENRANGELOOSE')
+src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[t.XRANGEPLAINLOOSE] + ')' +
+ '\\s*$'
+
+// Star ranges basically just allow anything at all.
+tok('STAR')
+src[t.STAR] = '(<|>)?=?\\s*\\*'
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i])
+ if (!re[i]) {
+ re[i] = new RegExp(src[i])
+ }
+}
+
+exports.parse = parse
+function parse (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ if (version.length > MAX_LENGTH) {
+ return null
+ }
+
+ var r = options.loose ? re[t.LOOSE] : re[t.FULL]
+ if (!r.test(version)) {
+ return null
+ }
+
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ return null
+ }
+}
+
+exports.valid = valid
+function valid (version, options) {
+ var v = parse(version, options)
+ return v ? v.version : null
+}
+
+exports.clean = clean
+function clean (version, options) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+
+exports.SemVer = SemVer
+
+function SemVer (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+ if (version instanceof SemVer) {
+ if (version.loose === options.loose) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+ }
+
+ if (!(this instanceof SemVer)) {
+ return new SemVer(version, options)
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+
+ var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
+
+ if (!m) {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map(function (id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+}
+
+SemVer.prototype.format = function () {
+ this.version = this.major + '.' + this.minor + '.' + this.patch
+ if (this.prerelease.length) {
+ this.version += '-' + this.prerelease.join('.')
+ }
+ return this.version
+}
+
+SemVer.prototype.toString = function () {
+ return this.version
+}
+
+SemVer.prototype.compare = function (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+}
+
+SemVer.prototype.compareMain = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+}
+
+SemVer.prototype.comparePre = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ var i = 0
+ do {
+ var a = this.prerelease[i]
+ var b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+}
+
+SemVer.prototype.compareBuild = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ var i = 0
+ do {
+ var a = this.build[i]
+ var b = other.build[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+}
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function (release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier)
+ this.inc('pre', identifier)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier)
+ }
+ this.inc('pre', identifier)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0]
+ } else {
+ var i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ this.prerelease.push(0)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0]
+ }
+ } else {
+ this.prerelease = [identifier, 0]
+ }
+ }
+ break
+
+ default:
+ throw new Error('invalid increment argument: ' + release)
+ }
+ this.format()
+ this.raw = this.version
+ return this
+}
+
+exports.inc = inc
+function inc (version, release, loose, identifier) {
+ if (typeof (loose) === 'string') {
+ identifier = loose
+ loose = undefined
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version
+ } catch (er) {
+ return null
+ }
+}
+
+exports.diff = diff
+function diff (version1, version2) {
+ if (eq(version1, version2)) {
+ return null
+ } else {
+ var v1 = parse(version1)
+ var v2 = parse(version2)
+ var prefix = ''
+ if (v1.prerelease.length || v2.prerelease.length) {
+ prefix = 'pre'
+ var defaultResult = 'prerelease'
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return prefix + key
+ }
+ }
+ }
+ return defaultResult // may be undefined
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers
+
+var numeric = /^[0-9]+$/
+function compareIdentifiers (a, b) {
+ var anum = numeric.test(a)
+ var bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers
+function rcompareIdentifiers (a, b) {
+ return compareIdentifiers(b, a)
+}
+
+exports.major = major
+function major (a, loose) {
+ return new SemVer(a, loose).major
+}
+
+exports.minor = minor
+function minor (a, loose) {
+ return new SemVer(a, loose).minor
+}
+
+exports.patch = patch
+function patch (a, loose) {
+ return new SemVer(a, loose).patch
+}
+
+exports.compare = compare
+function compare (a, b, loose) {
+ return new SemVer(a, loose).compare(new SemVer(b, loose))
+}
+
+exports.compareLoose = compareLoose
+function compareLoose (a, b) {
+ return compare(a, b, true)
+}
+
+exports.compareBuild = compareBuild
+function compareBuild (a, b, loose) {
+ var versionA = new SemVer(a, loose)
+ var versionB = new SemVer(b, loose)
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
+}
+
+exports.rcompare = rcompare
+function rcompare (a, b, loose) {
+ return compare(b, a, loose)
+}
+
+exports.sort = sort
+function sort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compareBuild(a, b, loose)
+ })
+}
+
+exports.rsort = rsort
+function rsort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compareBuild(b, a, loose)
+ })
+}
+
+exports.gt = gt
+function gt (a, b, loose) {
+ return compare(a, b, loose) > 0
+}
+
+exports.lt = lt
+function lt (a, b, loose) {
+ return compare(a, b, loose) < 0
+}
+
+exports.eq = eq
+function eq (a, b, loose) {
+ return compare(a, b, loose) === 0
+}
+
+exports.neq = neq
+function neq (a, b, loose) {
+ return compare(a, b, loose) !== 0
+}
+
+exports.gte = gte
+function gte (a, b, loose) {
+ return compare(a, b, loose) >= 0
+}
+
+exports.lte = lte
+function lte (a, b, loose) {
+ return compare(a, b, loose) <= 0
+}
+
+exports.cmp = cmp
+function cmp (a, op, b, loose) {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError('Invalid operator: ' + op)
+ }
+}
+
+exports.Comparator = Comparator
+function Comparator (comp, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ if (!(this instanceof Comparator)) {
+ return new Comparator(comp, options)
+ }
+
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+}
+
+var ANY = {}
+Comparator.prototype.parse = function (comp) {
+ var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ var m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError('Invalid comparator: ' + comp)
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : ''
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+}
+
+Comparator.prototype.toString = function () {
+ return this.value
+}
+
+Comparator.prototype.test = function (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY || version === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+}
+
+Comparator.prototype.intersects = function (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ var rangeTmp
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true
+ }
+ rangeTmp = new Range(comp.value, options)
+ return satisfies(this.value, rangeTmp, options)
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true
+ }
+ rangeTmp = new Range(this.value, options)
+ return satisfies(comp.semver, rangeTmp, options)
+ }
+
+ var sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>')
+ var sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ var sameSemVer = this.semver.version === comp.semver.version
+ var differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=')
+ var oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, options) &&
+ ((this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<'))
+ var oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, options) &&
+ ((this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>'))
+
+ return sameDirectionIncreasing || sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
+}
+
+exports.Range = Range
+function Range (range, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (range instanceof Range) {
+ if (range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ return new Range(range.value, options)
+ }
+
+ if (!(this instanceof Range)) {
+ return new Range(range, options)
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First, split based on boolean or ||
+ this.raw = range
+ this.set = range.split(/\s*\|\|\s*/).map(function (range) {
+ return this.parseRange(range.trim())
+ }, this).filter(function (c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length
+ })
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range)
+ }
+
+ this.format()
+}
+
+Range.prototype.format = function () {
+ this.range = this.set.map(function (comps) {
+ return comps.join(' ').trim()
+ }).join('||').trim()
+ return this.range
+}
+
+Range.prototype.toString = function () {
+ return this.range
+}
+
+Range.prototype.parseRange = function (range) {
+ var loose = this.options.loose
+ range = range.trim()
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace)
+ debug('hyphen replace', range)
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range, re[t.COMPARATORTRIM])
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ')
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ var set = range.split(' ').map(function (comp) {
+ return parseComparator(comp, this.options)
+ }, this).join(' ').split(/\s+/)
+ if (this.options.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function (comp) {
+ return !!comp.match(compRe)
+ })
+ }
+ set = set.map(function (comp) {
+ return new Comparator(comp, this.options)
+ }, this)
+
+ return set
+}
+
+Range.prototype.intersects = function (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some(function (thisComparators) {
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some(function (rangeComparators) {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every(function (thisComparator) {
+ return rangeComparators.every(function (rangeComparator) {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
+ })
+ )
+ })
+}
+
+// take a set of comparators and determine whether there
+// exists a version which can satisfy it
+function isSatisfiable (comparators, options) {
+ var result = true
+ var remainingComparators = comparators.slice()
+ var testComparator = remainingComparators.pop()
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every(function (otherComparator) {
+ return testComparator.intersects(otherComparator, options)
+ })
+
+ testComparator = remainingComparators.pop()
+ }
+
+ return result
+}
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators
+function toComparators (range, options) {
+ return new Range(range, options).set.map(function (comp) {
+ return comp.map(function (c) {
+ return c.value
+ }).join(' ').trim().split(' ')
+ })
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator (comp, options) {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+function isX (id) {
+ return !id || id.toLowerCase() === 'x' || id === '*'
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceTilde(comp, options)
+ }).join(' ')
+}
+
+function replaceTilde (comp, options) {
+ var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceCaret(comp, options)
+ }).join(' ')
+}
+
+function replaceCaret (comp, options) {
+ debug('caret', comp, options)
+ var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+function replaceXRanges (comp, options) {
+ debug('replaceXRanges', comp, options)
+ return comp.split(/\s+/).map(function (comp) {
+ return replaceXRange(comp, options)
+ }).join(' ')
+}
+
+function replaceXRange (comp, options) {
+ comp = comp.trim()
+ var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
+ return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ var xM = isX(M)
+ var xm = xM || isX(m)
+ var xp = xm || isX(p)
+ var anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+ pr = options.includePrerelease ? '-0' : ''
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p + pr
+ } else if (xm) {
+ ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0' + pr
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars (comp, options) {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[t.STAR], '')
+}
+
+// This function is passed to string.replace(re[t.HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = '>=' + fM + '.0.0'
+ } else if (isX(fp)) {
+ from = '>=' + fM + '.' + fm + '.0'
+ } else {
+ from = '>=' + from
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = '<' + (+tM + 1) + '.0.0'
+ } else if (isX(tp)) {
+ to = '<' + tM + '.' + (+tm + 1) + '.0'
+ } else if (tpr) {
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
+ } else {
+ to = '<=' + to
+ }
+
+ return (from + ' ' + to).trim()
+}
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+}
+
+function testSet (set, version, options) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
+
+exports.satisfies = satisfies
+function satisfies (version, range, options) {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+
+exports.maxSatisfying = maxSatisfying
+function maxSatisfying (versions, range, options) {
+ var max = null
+ var maxSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+
+exports.minSatisfying = minSatisfying
+function minSatisfying (versions, range, options) {
+ var min = null
+ var minSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+
+exports.minVersion = minVersion
+function minVersion (range, loose) {
+ range = new Range(range, loose)
+
+ var minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ comparators.forEach(function (comparator) {
+ // Clone to avoid manipulating the comparator's semver object.
+ var compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!minver || gt(minver, compver)) {
+ minver = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error('Unexpected operation: ' + comparator.operator)
+ }
+ })
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+
+exports.validRange = validRange
+function validRange (range, options) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr
+function ltr (version, range, options) {
+ return outside(version, range, '<', options)
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr
+function gtr (version, range, options) {
+ return outside(version, range, '>', options)
+}
+
+exports.outside = outside
+function outside (version, range, hilo, options) {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ var gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ var high = null
+ var low = null
+
+ comparators.forEach(function (comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+exports.prerelease = prerelease
+function prerelease (version, options) {
+ var parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+
+exports.intersects = intersects
+function intersects (r1, r2, options) {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2)
+}
+
+exports.coerce = coerce
+function coerce (version, options) {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version === 'number') {
+ version = String(version)
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ options = options || {}
+
+ var match = null
+ if (!options.rtl) {
+ match = version.match(re[t.COERCE])
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ var next
+ while ((next = re[t.COERCERTL].exec(version)) &&
+ (!match || match.index + match[0].length !== version.length)
+ ) {
+ if (!match ||
+ next.index + next[0].length !== match.index + match[0].length) {
+ match = next
+ }
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
+ }
+ // leave it in a clean state
+ re[t.COERCERTL].lastIndex = -1
+ }
+
+ if (match === null) {
+ return null
+ }
+
+ return parse(match[2] +
+ '.' + (match[3] || '0') +
+ '.' + (match[4] || '0'), options)
+}
diff --git a/node_modules/@electron/get/node_modules/sumchecker/.github/FUNDING.yml b/node_modules/@electron/get/node_modules/sumchecker/.github/FUNDING.yml
new file mode 100644
index 0000000..d63c19f
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+github: malept
+tidelift: npm/sumchecker
diff --git a/node_modules/@electron/get/node_modules/sumchecker/.github/workflows/ci.yml b/node_modules/@electron/get/node_modules/sumchecker/.github/workflows/ci.yml
new file mode 100644
index 0000000..73e955a
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/.github/workflows/ci.yml
@@ -0,0 +1,47 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - master
+ tags:
+ - v[0-9]+.[0-9]+.[0-9]+*
+ pull_request:
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [windows-latest, macOS-latest, ubuntu-latest]
+ node-version: [8.x, 10.x, 12.x]
+
+ steps:
+ - name: Fix git checkout line endings
+ run: git config --global core.autocrlf input
+ - uses: actions/checkout@v1
+ - name: Setup Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: Cache node_modules
+ uses: actions/cache@v1
+ with:
+ path: node_modules
+ key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-build-${{ env.cache-name }}-
+ ${{ runner.OS }}-build-
+ ${{ runner.OS }}-
+ - name: Install
+ run: npm install
+ - name: Lint
+ run: npm run lint
+ - name: Testsuite
+ run: npm run coverage
+ - name: Test TypeScript definition
+ run: npm run tsd
+ - name: Codecov
+ run: npm run codecov
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/node_modules/@electron/get/node_modules/sumchecker/LICENSE b/node_modules/@electron/get/node_modules/sumchecker/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@electron/get/node_modules/sumchecker/NEWS.md b/node_modules/@electron/get/node_modules/sumchecker/NEWS.md
new file mode 100644
index 0000000..eb7a956
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/NEWS.md
@@ -0,0 +1,77 @@
+# Changes by Version
+
+## Unreleased
+
+## [3.0.1] - 2019-11-25
+
+### Fixed
+
+* Correctly export symbols in TypeScript definition (#26)
+
+## [3.0.0] - 2019-04-30
+
+### Added
+
+* TypeScript typings file (#12)
+
+### Removed
+
+* Support for Node &lt; 8 (#10)
+
+## [2.0.2] - 2017-03-11
+
+### Added
+
+* Node 8 support (#6)
+
+## [2.0.1] - 2017-01-26
+
+### Fixed
+
+* Include `index.js` in the NPM package again
+
+## [2.0.0] - 2017-01-26
+
+### Removed
+
+* Support for Node 0.10 and 0.12 (#4)
+
+## [1.3.1] - 2017-03-11
+
+### Added
+
+* Node 8 support (#6)
+
+## [1.3.0] - 2016-12-05
+
+### Added
+
+* Human-readable messages for Errors (#2)
+
+## [1.2.0] - 2016-09-15
+
+### Added
+
+* Support for Node 0.10 and 0.12 via Babel (#1)
+
+## [1.1.0] - 2016-09-06
+
+### Added
+
+* Optional `defaultTextEncoding` parameter in the `ChecksumValidator` constructor
+* Access to the underlying `ChecksumValidator` class
+
+## [1.0.0] - 2016-09-05
+
+Initial release.
+
+[3.0.1]: https://github.com/malept/sumchecker/compare/v3.0.0...v3.0.1
+[3.0.0]: https://github.com/malept/sumchecker/compare/v2.0.2...v3.0.0
+[2.0.2]: https://github.com/malept/sumchecker/compare/v2.0.1...v2.0.2
+[2.0.1]: https://github.com/malept/sumchecker/compare/v2.0.0...v2.0.1
+[2.0.0]: https://github.com/malept/sumchecker/compare/v1.3.0...v2.0.0
+[1.3.1]: https://github.com/malept/sumchecker/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/malept/sumchecker/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/malept/sumchecker/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/malept/sumchecker/compare/v1.0.0...v1.1.0
+[1.0.0]: https://github.com/malept/sumchecker/releases/tag/v1.0.0
diff --git a/node_modules/@electron/get/node_modules/sumchecker/README.md b/node_modules/@electron/get/node_modules/sumchecker/README.md
new file mode 100644
index 0000000..b031044
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/README.md
@@ -0,0 +1,92 @@
+# Sumchecker
+
+[![Travis CI](https://travis-ci.org/malept/sumchecker.svg?branch=master)](https://travis-ci.org/malept/sumchecker)
+[![AppVeyor CI](https://ci.appveyor.com/api/projects/status/wm4n2r11nlff8ify?svg=true)](https://ci.appveyor.com/project/malept/sumchecker)
+[![Code Coverage](https://codecov.io/gh/malept/sumchecker/branch/master/graph/badge.svg)](https://codecov.io/gh/malept/sumchecker)
+![Dependency Status](https://tidelift.com/badges/github/malept/sumchecker)
+
+
+Sumchecker is a pure Node.js solution to validating files specified in a checksum file, which are
+usually generated by programs such as [`sha256sum`](https://en.wikipedia.org/wiki/Sha256sum).
+
+## Usage
+
+```javascript
+const sumchecker = require('sumchecker');
+
+try {
+ await sumchecker(algorithm, checksumFilename, baseDir, filesToCheck);
+ console.log('All files validate!');
+} catch (error) {
+ console.error('An error occurred', error);
+}
+```
+
+Returns a [`Promise`]. The promise is resolved when all files specified in
+[`filesToCheck`](#filesToCheck) are validated. The promise is rejected otherwise.
+
+### Parameters
+
+#### `algorithm`
+
+`String` - The hash algorithm used in [`checksumFilename`](#checksumFilename). Corresponds to the
+algorithms allowed by [`crypto.createHash()`].
+
+#### `checksumFilename`
+
+`String` - The path to the checksum file.
+
+#### `baseDir`
+
+`String` - The base directory for the files specified in [`filesToCheck`](#filesToCheck).
+
+#### `filesToCheck`
+
+`Array` or `String` - one or more paths of the files that will be validated, relative to
+[`baseDir`](#baseDir).
+
+### Errors
+
+These are `sumchecker`-specific error classes that are passed to the promise's reject callback.
+
+#### `sumchecker.ChecksumMismatchError`
+
+When at least one of the files does not match its expected checksum.
+
+Properties:
+
+* `filename` (`String`) - a path to a file that did not match
+
+#### `sumchecker.ChecksumParseError`
+
+When the checksum file cannot be parsed (as in, it does not match the checksum file format).
+
+Properties:
+
+* `lineNumber` (`Number`) - the line number that could not be parsed
+* `line` (`String`) - the raw line data that could not be parsed, sans newline
+
+#### `sumchecker.NoChecksumFoundError`
+
+When at least one of the files specified to check is not listed in the checksum file.
+
+Properties:
+
+* `filename` (`String`) - a filename from [`filesToCheck`](#filesToCheck)
+
+## Support
+
+[Get supported sumchecker with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-sumchecker?utm_source=npm-sumchecker&utm_medium=referral&utm_campaign=readme).
+
+## Security contact information
+
+To report a security vulnerability, please use the [Tidelift security
+contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+## Legal
+
+This library is copyrighted under the terms of the [Apache 2.0 License].
+
+[`crypto.createHash()`]: https://nodejs.org/dist/latest-v4.x/docs/api/crypto.html#crypto_crypto_createhash_algorithm
+[`Promise`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
+[Apache 2.0 License]: http://www.apache.org/licenses/LICENSE-2.0
diff --git a/node_modules/@electron/get/node_modules/sumchecker/index.d.ts b/node_modules/@electron/get/node_modules/sumchecker/index.d.ts
new file mode 100644
index 0000000..5282de5
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/index.d.ts
@@ -0,0 +1,51 @@
+/*
+Copyright 2019 Mark Lee and contributors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+declare function sumchecker(algorithm: string, checksumFilename: string, baseDir: string, filesToCheck: string[] | string): Promise<void>;
+
+declare namespace sumchecker {
+ type ChecksumOptions = {
+ defaultTextEncoding?: string;
+ };
+
+ class ErrorWithFilename extends Error {
+ constructor(filename: string);
+ }
+
+ class ChecksumMismatchError extends ErrorWithFilename {
+ constructor(filename: string);
+ }
+
+ class ChecksumParseError extends Error {
+ constructor(lineNumber: number, line: string);
+ }
+
+ class NoChecksumFoundError extends ErrorWithFilename {
+ constructor(filename: string);
+ }
+
+ class ChecksumValidator {
+ constructor(algorithm: string, checksumFilename: string, options?: ChecksumOptions);
+ encoding(binary: boolean): string;
+ parseChecksumFile(data: string): void;
+ readFile(filename: string, binary: boolean): Promise<string>;
+ validate(baseDir: string, filesToCheck: string[] | string): Promise<void>;
+ validateFile(baseDir: string, filename: string): Promise<void>;
+ validateFiles(baseDir: string, filesToCheck: string[]): Promise<void>;
+ }
+}
+
+export = sumchecker
diff --git a/node_modules/@electron/get/node_modules/sumchecker/index.js b/node_modules/@electron/get/node_modules/sumchecker/index.js
new file mode 100644
index 0000000..61f5b4e
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/index.js
@@ -0,0 +1,155 @@
+/*
+Copyright 2016, 2017, 2019 Mark Lee and contributors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+const debug = require('debug')('sumchecker')
+const crypto = require('crypto')
+const fs = require('fs')
+const path = require('path')
+const { promisify } = require('util')
+
+const readFile = promisify(fs.readFile)
+
+const CHECKSUM_LINE = /^([\da-fA-F]+) ([ *])(.+)$/
+
+class ErrorWithFilename extends Error {
+ constructor (filename) {
+ super()
+ this.filename = filename
+ }
+}
+
+class ChecksumMismatchError extends ErrorWithFilename {
+ constructor (filename) {
+ super(filename)
+ this.message = `Generated checksum for "${filename}" did not match expected checksum.`
+ }
+}
+
+class ChecksumParseError extends Error {
+ constructor (lineNumber, line) {
+ super()
+ this.lineNumber = lineNumber
+ this.line = line
+ this.message = `Could not parse checksum file at line ${lineNumber}: ${line}`
+ }
+}
+
+class NoChecksumFoundError extends ErrorWithFilename {
+ constructor (filename) {
+ super(filename)
+ this.message = `No checksum found in checksum file for "${filename}".`
+ }
+}
+
+class ChecksumValidator {
+ constructor (algorithm, checksumFilename, options) {
+ this.algorithm = algorithm
+ this.checksumFilename = checksumFilename
+ this.checksums = null
+
+ if (options && options.defaultTextEncoding) {
+ this.defaultTextEncoding = options.defaultTextEncoding
+ } else {
+ this.defaultTextEncoding = 'utf8'
+ }
+ }
+
+ encoding (binary) {
+ return binary ? 'binary' : this.defaultTextEncoding
+ }
+
+ parseChecksumFile (data) {
+ debug('Parsing checksum file')
+ this.checksums = {}
+ let lineNumber = 0
+ for (const line of data.trim().split(/[\r\n]+/)) {
+ lineNumber += 1
+ const result = CHECKSUM_LINE.exec(line)
+ if (result === null) {
+ debug(`Could not parse line number ${lineNumber}`)
+ throw new ChecksumParseError(lineNumber, line)
+ } else {
+ result.shift()
+ const [checksum, binaryMarker, filename] = result
+ const isBinary = binaryMarker === '*'
+
+ this.checksums[filename] = [checksum, isBinary]
+ }
+ }
+ debug('Parsed checksums:', this.checksums)
+ }
+
+ async readFile (filename, binary) {
+ debug(`Reading "${filename} (binary mode: ${binary})"`)
+ return readFile(filename, this.encoding(binary))
+ }
+
+ async validate (baseDir, filesToCheck) {
+ if (typeof filesToCheck === 'string') {
+ filesToCheck = [filesToCheck]
+ }
+
+ const data = await this.readFile(this.checksumFilename, false)
+ this.parseChecksumFile(data)
+ return this.validateFiles(baseDir, filesToCheck)
+ }
+
+ async validateFile (baseDir, filename) {
+ return new Promise((resolve, reject) => {
+ debug(`validateFile: ${filename}`)
+
+ const metadata = this.checksums[filename]
+ if (!metadata) {
+ return reject(new NoChecksumFoundError(filename))
+ }
+
+ const [checksum, binary] = metadata
+ const fullPath = path.resolve(baseDir, filename)
+ debug(`Reading file with "${this.encoding(binary)}" encoding`)
+ const stream = fs.createReadStream(fullPath, { encoding: this.encoding(binary) })
+ const hasher = crypto.createHash(this.algorithm, { defaultEncoding: 'binary' })
+ hasher.on('readable', () => {
+ const data = hasher.read()
+ if (data) {
+ const calculated = data.toString('hex')
+
+ debug(`Expected checksum: ${checksum}; Actual: ${calculated}`)
+ if (calculated === checksum) {
+ resolve()
+ } else {
+ reject(new ChecksumMismatchError(filename))
+ }
+ }
+ })
+ stream.pipe(hasher)
+ })
+ }
+
+ async validateFiles (baseDir, filesToCheck) {
+ return Promise.all(filesToCheck.map(filename => this.validateFile(baseDir, filename)))
+ }
+}
+
+const sumchecker = async function sumchecker (algorithm, checksumFilename, baseDir, filesToCheck) {
+ return new ChecksumValidator(algorithm, checksumFilename).validate(baseDir, filesToCheck)
+}
+
+sumchecker.ChecksumMismatchError = ChecksumMismatchError
+sumchecker.ChecksumParseError = ChecksumParseError
+sumchecker.ChecksumValidator = ChecksumValidator
+sumchecker.NoChecksumFoundError = NoChecksumFoundError
+
+module.exports = sumchecker
diff --git a/node_modules/@electron/get/node_modules/sumchecker/index.test-d.ts b/node_modules/@electron/get/node_modules/sumchecker/index.test-d.ts
new file mode 100644
index 0000000..e923465
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/index.test-d.ts
@@ -0,0 +1,31 @@
+/*
+Copyright 2019 Mark Lee and contributors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+import * as sumchecker from '.';
+import { ChecksumParseError, ChecksumValidator } from '.';
+
+await sumchecker('sha256', 'test/fixture/example.sha256sum', 'test/fixture', 'example');
+await sumchecker('sha256', 'test/fixture/example.sha256sum', 'test/fixture', ['example']);
+try {
+ await sumchecker('sha256', 'test/fixture/invalid.sha256sum', 'test/fixture', ['example']);
+} catch (error) {
+ if (!(error instanceof ChecksumParseError)) {
+ throw new Error('Does not throw ChecksumParseError correctly');
+ }
+}
+
+const validator = new ChecksumValidator('sha256', 'test/fixture/example.sha256sum')
+await validator.validate('test/fixture', 'example')
diff --git a/node_modules/@electron/get/node_modules/sumchecker/package.json b/node_modules/@electron/get/node_modules/sumchecker/package.json
new file mode 100644
index 0000000..737a53f
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/package.json
@@ -0,0 +1,79 @@
+{
+ "name": "sumchecker",
+ "version": "3.0.1",
+ "author": "Mark Lee",
+ "license": "Apache-2.0",
+ "description": "Checksum validator",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/malept/sumchecker.git"
+ },
+ "keywords": [
+ "checksum",
+ "hash"
+ ],
+ "bugs": {
+ "url": "https://github.com/malept/sumchecker/issues"
+ },
+ "homepage": "https://github.com/malept/sumchecker#readme",
+ "engines": {
+ "node": ">= 8.0"
+ },
+ "devDependencies": {
+ "ava": "^2.2.0",
+ "codecov": "^3.3.0",
+ "eslint": "^6.1.0",
+ "eslint-config-standard": "^14.0.0",
+ "eslint-plugin-ava": "^9.0.0",
+ "eslint-plugin-import": "^2.18.2",
+ "eslint-plugin-node": "^10.0.0",
+ "eslint-plugin-promise": "^4.0.1",
+ "eslint-plugin-standard": "^4.0.0",
+ "nyc": "^14.0.0",
+ "tsd": "^0.11.0"
+ },
+ "dependencies": {
+ "debug": "^4.1.0"
+ },
+ "scripts": {
+ "ava": "ava test/index.js",
+ "codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
+ "coverage": "nyc ava test/index.js",
+ "lint": "eslint .",
+ "test": "npm run lint && npm run ava && npm run tsd",
+ "tsd": "tsd"
+ },
+ "ava": {
+ "babel": false,
+ "compileEnhancements": false
+ },
+ "eslintConfig": {
+ "extends": [
+ "eslint:recommended",
+ "plugin:ava/recommended",
+ "plugin:import/errors",
+ "plugin:import/warnings",
+ "plugin:node/recommended",
+ "plugin:promise/recommended",
+ "standard"
+ ],
+ "plugins": [
+ "ava"
+ ],
+ "rules": {
+ "node/no-unpublished-require": [
+ "error",
+ {
+ "allowModules": [
+ "ava"
+ ]
+ }
+ ],
+ "strict": [
+ "error"
+ ]
+ }
+ }
+}
diff --git a/node_modules/@electron/get/node_modules/sumchecker/yarn.lock b/node_modules/@electron/get/node_modules/sumchecker/yarn.lock
new file mode 100644
index 0000000..660a17d
--- /dev/null
+++ b/node_modules/@electron/get/node_modules/sumchecker/yarn.lock
@@ -0,0 +1,4756 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@ava/babel-plugin-throws-helper@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-4.0.0.tgz#8f5b45b7a0a79c6f4032de2101e0c221847efb62"
+ integrity sha512-3diBLIVBPPh3j4+hb5lo0I1D+S/O/VDJPI4Y502apBxmwEqjyXG4gTSPFUlm41sSZeZzMarT/Gzovw9kV7An0w==
+
+"@ava/babel-preset-stage-4@^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@ava/babel-preset-stage-4/-/babel-preset-stage-4-4.0.0.tgz#9be5a59ead170062e228bb6ffd2b29f0489424fd"
+ integrity sha512-lZEV1ZANzfzSYBU6WHSErsy7jLPbD1iIgAboASPMcKo7woVni5/5IKWeT0RxC8rY802MFktur3OKEw2JY1Tv2w==
+ dependencies:
+ "@babel/plugin-proposal-async-generator-functions" "^7.2.0"
+ "@babel/plugin-proposal-dynamic-import" "^7.5.0"
+ "@babel/plugin-proposal-optional-catch-binding" "^7.2.0"
+ "@babel/plugin-transform-dotall-regex" "^7.4.4"
+ "@babel/plugin-transform-modules-commonjs" "^7.5.0"
+
+"@ava/babel-preset-transform-test-files@^6.0.0":
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/@ava/babel-preset-transform-test-files/-/babel-preset-transform-test-files-6.0.0.tgz#639e8929d2cdc8863c1f16020ce644c525723cd4"
+ integrity sha512-8eKhFzZp7Qcq1VLfoC75ggGT8nQs9q8fIxltU47yCB7Wi7Y8Qf6oqY1Bm0z04fIec24vEgr0ENhDHEOUGVDqnA==
+ dependencies:
+ "@ava/babel-plugin-throws-helper" "^4.0.0"
+ babel-plugin-espower "^3.0.1"
+
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5":
+ version "7.5.5"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d"
+ integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==
+ dependencies:
+ "@babel/highlight" "^7.0.0"
+
+"@babel/core@^7.6.0":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.4.tgz#37e864532200cb6b50ee9a4045f5f817840166ab"
+ integrity sha512-+bYbx56j4nYBmpsWtnPUsKW3NdnYxbqyfrP2w9wILBuHzdfIKz9prieZK0DFPyIzkjYVUe4QkusGL07r5pXznQ==
+ dependencies:
+ "@babel/code-frame" "^7.5.5"
+ "@babel/generator" "^7.7.4"
+ "@babel/helpers" "^7.7.4"
+ "@babel/parser" "^7.7.4"
+ "@babel/template" "^7.7.4"
+ "@babel/traverse" "^7.7.4"
+ "@babel/types" "^7.7.4"
+ convert-source-map "^1.7.0"
+ debug "^4.1.0"
+ json5 "^2.1.0"
+ lodash "^4.17.13"
+ resolve "^1.3.2"
+ semver "^5.4.1"
+ source-map "^0.5.0"
+
+"@babel/generator@^7.0.0", "@babel/generator@^7.4.0", "@babel/generator@^7.6.0", "@babel/generator@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.4.tgz#db651e2840ca9aa66f327dcec1dc5f5fa9611369"
+ integrity sha512-m5qo2WgdOJeyYngKImbkyQrnUN1mPceaG5BV+G0E3gWsa4l/jCSryWJdM2x8OuGAOyh+3d5pVYfZWCiNFtynxg==
+ dependencies:
+ "@babel/types" "^7.7.4"
+ jsesc "^2.5.1"
+ lodash "^4.17.13"
+ source-map "^0.5.0"
+
+"@babel/helper-annotate-as-pure@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.4.tgz#bb3faf1e74b74bd547e867e48f551fa6b098b6ce"
+ integrity sha512-2BQmQgECKzYKFPpiycoF9tlb5HA4lrVyAmLLVK177EcQAqjVLciUb2/R+n1boQ9y5ENV3uz2ZqiNw7QMBBw1Og==
+ dependencies:
+ "@babel/types" "^7.7.4"
+
+"@babel/helper-create-regexp-features-plugin@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.4.tgz#6d5762359fd34f4da1500e4cff9955b5299aaf59"
+ integrity sha512-Mt+jBKaxL0zfOIWrfQpnfYCN7/rS6GKx6CCCfuoqVVd+17R8zNDlzVYmIi9qyb2wOk002NsmSTDymkIygDUH7A==
+ dependencies:
+ "@babel/helper-regex" "^7.4.4"
+ regexpu-core "^4.6.0"
+
+"@babel/helper-function-name@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e"
+ integrity sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==
+ dependencies:
+ "@babel/helper-get-function-arity" "^7.7.4"
+ "@babel/template" "^7.7.4"
+ "@babel/types" "^7.7.4"
+
+"@babel/helper-get-function-arity@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0"
+ integrity sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==
+ dependencies:
+ "@babel/types" "^7.7.4"
+
+"@babel/helper-module-imports@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91"
+ integrity sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==
+ dependencies:
+ "@babel/types" "^7.7.4"
+
+"@babel/helper-module-transforms@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.7.4.tgz#8d7cdb1e1f8ea3d8c38b067345924ac4f8e0879a"
+ integrity sha512-ehGBu4mXrhs0FxAqN8tWkzF8GSIGAiEumu4ONZ/hD9M88uHcD+Yu2ttKfOCgwzoesJOJrtQh7trI5YPbRtMmnA==
+ dependencies:
+ "@babel/helper-module-imports" "^7.7.4"
+ "@babel/helper-simple-access" "^7.7.4"
+ "@babel/helper-split-export-declaration" "^7.7.4"
+ "@babel/template" "^7.7.4"
+ "@babel/types" "^7.7.4"
+ lodash "^4.17.13"
+
+"@babel/helper-plugin-utils@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250"
+ integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
+
+"@babel/helper-regex@^7.4.4":
+ version "7.5.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351"
+ integrity sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==
+ dependencies:
+ lodash "^4.17.13"
+
+"@babel/helper-remap-async-to-generator@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.4.tgz#c68c2407350d9af0e061ed6726afb4fff16d0234"
+ integrity sha512-Sk4xmtVdM9sA/jCI80f+KS+Md+ZHIpjuqmYPk1M7F/upHou5e4ReYmExAiu6PVe65BhJPZA2CY9x9k4BqE5klw==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.7.4"
+ "@babel/helper-wrap-function" "^7.7.4"
+ "@babel/template" "^7.7.4"
+ "@babel/traverse" "^7.7.4"
+ "@babel/types" "^7.7.4"
+
+"@babel/helper-simple-access@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz#a169a0adb1b5f418cfc19f22586b2ebf58a9a294"
+ integrity sha512-zK7THeEXfan7UlWsG2A6CI/L9jVnI5+xxKZOdej39Y0YtDYKx9raHk5F2EtK9K8DHRTihYwg20ADt9S36GR78A==
+ dependencies:
+ "@babel/template" "^7.7.4"
+ "@babel/types" "^7.7.4"
+
+"@babel/helper-split-export-declaration@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8"
+ integrity sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==
+ dependencies:
+ "@babel/types" "^7.7.4"
+
+"@babel/helper-wrap-function@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.4.tgz#37ab7fed5150e22d9d7266e830072c0cdd8baace"
+ integrity sha512-VsfzZt6wmsocOaVU0OokwrIytHND55yvyT4BPB9AIIgwr8+x7617hetdJTsuGwygN5RC6mxA9EJztTjuwm2ofg==
+ dependencies:
+ "@babel/helper-function-name" "^7.7.4"
+ "@babel/template" "^7.7.4"
+ "@babel/traverse" "^7.7.4"
+ "@babel/types" "^7.7.4"
+
+"@babel/helpers@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302"
+ integrity sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg==
+ dependencies:
+ "@babel/template" "^7.7.4"
+ "@babel/traverse" "^7.7.4"
+ "@babel/types" "^7.7.4"
+
+"@babel/highlight@^7.0.0":
+ version "7.5.0"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540"
+ integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==
+ dependencies:
+ chalk "^2.0.0"
+ esutils "^2.0.2"
+ js-tokens "^4.0.0"
+
+"@babel/parser@^7.0.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.4.tgz#75ab2d7110c2cf2fa949959afb05fa346d2231bb"
+ integrity sha512-jIwvLO0zCL+O/LmEJQjWA75MQTWwx3c3u2JOTDK5D3/9egrWRRA0/0hk9XXywYnXZVVpzrBYeIQTmhwUaePI9g==
+
+"@babel/plugin-proposal-async-generator-functions@^7.2.0":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.4.tgz#0351c5ac0a9e927845fffd5b82af476947b7ce6d"
+ integrity sha512-1ypyZvGRXriY/QP668+s8sFr2mqinhkRDMPSQLNghCQE+GAkFtp+wkHVvg2+Hdki8gwP+NFzJBJ/N1BfzCCDEw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-remap-async-to-generator" "^7.7.4"
+ "@babel/plugin-syntax-async-generators" "^7.7.4"
+
+"@babel/plugin-proposal-dynamic-import@^7.5.0":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.4.tgz#dde64a7f127691758cbfed6cf70de0fa5879d52d"
+ integrity sha512-StH+nGAdO6qDB1l8sZ5UBV8AC3F2VW2I8Vfld73TMKyptMU9DY5YsJAS8U81+vEtxcH3Y/La0wG0btDrhpnhjQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-syntax-dynamic-import" "^7.7.4"
+
+"@babel/plugin-proposal-optional-catch-binding@^7.2.0":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.7.4.tgz#ec21e8aeb09ec6711bc0a39ca49520abee1de379"
+ integrity sha512-DyM7U2bnsQerCQ+sejcTNZh8KQEUuC3ufzdnVnSiUv/qoGJp2Z3hanKL18KDhsBT5Wj6a7CMT5mdyCNJsEaA9w==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/plugin-syntax-optional-catch-binding" "^7.7.4"
+
+"@babel/plugin-syntax-async-generators@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.7.4.tgz#331aaf310a10c80c44a66b238b6e49132bd3c889"
+ integrity sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-syntax-dynamic-import@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.7.4.tgz#29ca3b4415abfe4a5ec381e903862ad1a54c3aec"
+ integrity sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-syntax-optional-catch-binding@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.7.4.tgz#a3e38f59f4b6233867b4a92dcb0ee05b2c334aa6"
+ integrity sha512-4ZSuzWgFxqHRE31Glu+fEr/MirNZOMYmD/0BhBWyLyOOQz/gTAl7QmWm2hX1QxEIXsr2vkdlwxIzTyiYRC4xcQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-dotall-regex@^7.4.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.4.tgz#f7ccda61118c5b7a2599a72d5e3210884a021e96"
+ integrity sha512-mk0cH1zyMa/XHeb6LOTXTbG7uIJ8Rrjlzu91pUx/KS3JpcgaTDwMS8kM+ar8SLOvlL2Lofi4CGBAjCo3a2x+lw==
+ dependencies:
+ "@babel/helper-create-regexp-features-plugin" "^7.7.4"
+ "@babel/helper-plugin-utils" "^7.0.0"
+
+"@babel/plugin-transform-modules-commonjs@^7.5.0":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.4.tgz#bee4386e550446343dd52a571eda47851ff857a3"
+ integrity sha512-k8iVS7Jhc367IcNF53KCwIXtKAH7czev866ThsTgy8CwlXjnKZna2VHwChglzLleYrcHz1eQEIJlGRQxB53nqA==
+ dependencies:
+ "@babel/helper-module-transforms" "^7.7.4"
+ "@babel/helper-plugin-utils" "^7.0.0"
+ "@babel/helper-simple-access" "^7.7.4"
+ babel-plugin-dynamic-import-node "^2.3.0"
+
+"@babel/template@^7.4.0", "@babel/template@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b"
+ integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ "@babel/parser" "^7.7.4"
+ "@babel/types" "^7.7.4"
+
+"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558"
+ integrity sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==
+ dependencies:
+ "@babel/code-frame" "^7.5.5"
+ "@babel/generator" "^7.7.4"
+ "@babel/helper-function-name" "^7.7.4"
+ "@babel/helper-split-export-declaration" "^7.7.4"
+ "@babel/parser" "^7.7.4"
+ "@babel/types" "^7.7.4"
+ debug "^4.1.0"
+ globals "^11.1.0"
+ lodash "^4.17.13"
+
+"@babel/types@^7.4.0", "@babel/types@^7.7.4":
+ version "7.7.4"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193"
+ integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==
+ dependencies:
+ esutils "^2.0.2"
+ lodash "^4.17.13"
+ to-fast-properties "^2.0.0"
+
+"@concordance/react@^2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@concordance/react/-/react-2.0.0.tgz#aef913f27474c53731f4fd79cc2f54897de90fde"
+ integrity sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==
+ dependencies:
+ arrify "^1.0.1"
+
+"@mrmlnc/readdir-enhanced@^2.2.1":
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
+ integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==
+ dependencies:
+ call-me-maybe "^1.0.1"
+ glob-to-regexp "^0.3.0"
+
+"@nodelib/fs.scandir@2.1.3":
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
+ integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==
+ dependencies:
+ "@nodelib/fs.stat" "2.0.3"
+ run-parallel "^1.1.9"
+
+"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2":
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3"
+ integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==
+
+"@nodelib/fs.stat@^1.1.2":
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
+ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
+
+"@nodelib/fs.walk@^1.2.3":
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976"
+ integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==
+ dependencies:
+ "@nodelib/fs.scandir" "2.1.3"
+ fastq "^1.6.0"
+
+"@sindresorhus/is@^0.14.0":
+ version "0.14.0"
+ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
+ integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
+
+"@szmarczak/http-timer@^1.1.2":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
+ integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
+ dependencies:
+ defer-to-connect "^1.0.1"
+
+"@types/color-name@^1.1.1":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
+ integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+
+"@types/events@*":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
+ integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
+
+"@types/glob@^7.1.1":
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575"
+ integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==
+ dependencies:
+ "@types/events" "*"
+ "@types/minimatch" "*"
+ "@types/node" "*"
+
+"@types/minimatch@*":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
+ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
+
+"@types/node@*":
+ version "12.12.12"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.12.tgz#529bc3e73dbb35dd9e90b0a1c83606a9d3264bdb"
+ integrity sha512-MGuvYJrPU0HUwqF7LqvIj50RZUX23Z+m583KBygKYUZLlZ88n6w28XRNJRJgsHukLEnLz6w6SvxZoLgbr5wLqQ==
+
+acorn-jsx@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384"
+ integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==
+
+acorn@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
+ integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==
+
+agent-base@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"
+ integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==
+ dependencies:
+ es6-promisify "^5.0.0"
+
+ajv@^6.10.0, ajv@^6.10.2:
+ version "6.10.2"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
+ integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==
+ dependencies:
+ fast-deep-equal "^2.0.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+ansi-align@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f"
+ integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=
+ dependencies:
+ string-width "^2.0.0"
+
+ansi-align@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb"
+ integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==
+ dependencies:
+ string-width "^3.0.0"
+
+ansi-escapes@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b"
+ integrity sha1-W65SvkJIeN2Xg+iRDj/Cki6DyBs=
+
+ansi-escapes@^4.2.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d"
+ integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==
+ dependencies:
+ type-fest "^0.8.1"
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+ansi-regex@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
+ integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+
+ansi-regex@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
+ integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
+
+ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
+ansi-styles@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.0.tgz#5681f0dcf7ae5880a7841d8831c4724ed9cc0172"
+ integrity sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg==
+ dependencies:
+ "@types/color-name" "^1.1.1"
+ color-convert "^2.0.1"
+
+anymatch@~3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
+ integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
+ dependencies:
+ normalize-path "^3.0.0"
+ picomatch "^2.0.4"
+
+append-transform@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab"
+ integrity sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==
+ dependencies:
+ default-require-extensions "^2.0.0"
+
+archy@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
+ integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=
+
+argparse@^1.0.7:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+ integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
+ dependencies:
+ sprintf-js "~1.0.2"
+
+argv@^0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab"
+ integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=
+
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+ integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
+
+arr-flatten@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+ integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
+
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+ integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
+
+array-find-index@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
+ integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=
+
+array-includes@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d"
+ integrity sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=
+ dependencies:
+ define-properties "^1.1.2"
+ es-abstract "^1.7.0"
+
+array-union@^1.0.1, array-union@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
+ integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=
+ dependencies:
+ array-uniq "^1.0.1"
+
+array-union@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
+ integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
+
+array-uniq@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
+ integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=
+
+array-uniq@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-2.1.0.tgz#46603d5e28e79bfd02b046fcc1d77c6820bd8e98"
+ integrity sha512-bdHxtev7FN6+MXI1YFW0Q8mQ8dTJc2S8AMfju+ZR77pbg2yAdVyDlwkaUI7Har0LyOMRFPHrJ9lYdyjZZswdlQ==
+
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+ integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
+
+arrify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+ integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
+
+arrify@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
+ integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
+
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+ integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+
+astral-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
+ integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
+
+atob@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
+ integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+
+ava@^2.2.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/ava/-/ava-2.4.0.tgz#a3bd8b0e01d8826004c91de375eb2313ba5237c3"
+ integrity sha512-CQWtzZZZeU2g4StojRv6MO9RIRi4sLxGSB9+3C3hv0ttUEG1tkJLTLyrBQeFS4WEeK12Z4ovE3f2iPVhSy8elA==
+ dependencies:
+ "@ava/babel-preset-stage-4" "^4.0.0"
+ "@ava/babel-preset-transform-test-files" "^6.0.0"
+ "@babel/core" "^7.6.0"
+ "@babel/generator" "^7.6.0"
+ "@concordance/react" "^2.0.0"
+ ansi-escapes "^4.2.1"
+ ansi-styles "^4.1.0"
+ arr-flatten "^1.1.0"
+ array-union "^2.1.0"
+ array-uniq "^2.1.0"
+ arrify "^2.0.1"
+ bluebird "^3.5.5"
+ chalk "^2.4.2"
+ chokidar "^3.0.2"
+ chunkd "^1.0.0"
+ ci-parallel-vars "^1.0.0"
+ clean-stack "^2.2.0"
+ clean-yaml-object "^0.1.0"
+ cli-cursor "^3.1.0"
+ cli-truncate "^2.0.0"
+ code-excerpt "^2.1.1"
+ common-path-prefix "^1.0.0"
+ concordance "^4.0.0"
+ convert-source-map "^1.6.0"
+ currently-unhandled "^0.4.1"
+ debug "^4.1.1"
+ del "^4.1.1"
+ dot-prop "^5.1.0"
+ emittery "^0.4.1"
+ empower-core "^1.2.0"
+ equal-length "^1.0.0"
+ escape-string-regexp "^2.0.0"
+ esm "^3.2.25"
+ figures "^3.0.0"
+ find-up "^4.1.0"
+ get-port "^5.0.0"
+ globby "^10.0.1"
+ ignore-by-default "^1.0.0"
+ import-local "^3.0.2"
+ indent-string "^4.0.0"
+ is-ci "^2.0.0"
+ is-error "^2.2.2"
+ is-observable "^2.0.0"
+ is-plain-object "^3.0.0"
+ is-promise "^2.1.0"
+ lodash "^4.17.15"
+ loud-rejection "^2.1.0"
+ make-dir "^3.0.0"
+ matcher "^2.0.0"
+ md5-hex "^3.0.1"
+ meow "^5.0.0"
+ micromatch "^4.0.2"
+ ms "^2.1.2"
+ observable-to-promise "^1.0.0"
+ ora "^3.4.0"
+ package-hash "^4.0.0"
+ pkg-conf "^3.1.0"
+ plur "^3.1.1"
+ pretty-ms "^5.0.0"
+ require-precompiled "^0.1.0"
+ resolve-cwd "^3.0.0"
+ slash "^3.0.0"
+ source-map-support "^0.5.13"
+ stack-utils "^1.0.2"
+ strip-ansi "^5.2.0"
+ strip-bom-buf "^2.0.0"
+ supertap "^1.0.0"
+ supports-color "^7.0.0"
+ trim-off-newlines "^1.0.1"
+ trim-right "^1.0.1"
+ unique-temp-dir "^1.0.0"
+ update-notifier "^3.0.1"
+ write-file-atomic "^3.0.0"
+
+babel-plugin-dynamic-import-node@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f"
+ integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==
+ dependencies:
+ object.assign "^4.1.0"
+
+babel-plugin-espower@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-espower/-/babel-plugin-espower-3.0.1.tgz#180db17126f88e754105b8b5216d21e520a6bd4e"
+ integrity sha512-Ms49U7VIAtQ/TtcqRbD6UBmJBUCSxiC3+zPc+eGqxKUIFO1lTshyEDRUjhoAbd2rWfwYf3cZ62oXozrd8W6J0A==
+ dependencies:
+ "@babel/generator" "^7.0.0"
+ "@babel/parser" "^7.0.0"
+ call-matcher "^1.0.0"
+ core-js "^2.0.0"
+ espower-location-detector "^1.0.0"
+ espurify "^1.6.0"
+ estraverse "^4.1.1"
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
+binary-extensions@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c"
+ integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==
+
+bluebird@^3.5.5:
+ version "3.7.1"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.1.tgz#df70e302b471d7473489acf26a93d63b53f874de"
+ integrity sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==
+
+blueimp-md5@^2.10.0:
+ version "2.12.0"
+ resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.12.0.tgz#be7367938a889dec3ffbb71138617c117e9c130a"
+ integrity sha512-zo+HIdIhzojv6F1siQPqPFROyVy7C50KzHv/k/Iz+BtvtVzSHXiMXOpq2wCfNkeBqdCv+V8XOV96tsEt2W/3rQ==
+
+boxen@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b"
+ integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==
+ dependencies:
+ ansi-align "^2.0.0"
+ camelcase "^4.0.0"
+ chalk "^2.0.1"
+ cli-boxes "^1.0.0"
+ string-width "^2.0.0"
+ term-size "^1.2.0"
+ widest-line "^2.0.0"
+
+boxen@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/boxen/-/boxen-3.2.0.tgz#fbdff0de93636ab4450886b6ff45b92d098f45eb"
+ integrity sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A==
+ dependencies:
+ ansi-align "^3.0.0"
+ camelcase "^5.3.1"
+ chalk "^2.4.2"
+ cli-boxes "^2.2.0"
+ string-width "^3.0.0"
+ term-size "^1.2.0"
+ type-fest "^0.3.0"
+ widest-line "^2.0.0"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+ integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
+braces@^3.0.1, braces@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+ dependencies:
+ fill-range "^7.0.1"
+
+buf-compare@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/buf-compare/-/buf-compare-1.0.1.tgz#fef28da8b8113a0a0db4430b0b6467b69730b34a"
+ integrity sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=
+
+buffer-from@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
+ integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
+
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+cacheable-request@^6.0.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912"
+ integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==
+ dependencies:
+ clone-response "^1.0.2"
+ get-stream "^5.1.0"
+ http-cache-semantics "^4.0.0"
+ keyv "^3.0.0"
+ lowercase-keys "^2.0.0"
+ normalize-url "^4.1.0"
+ responselike "^1.0.2"
+
+caching-transform@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-3.0.2.tgz#601d46b91eca87687a281e71cef99791b0efca70"
+ integrity sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==
+ dependencies:
+ hasha "^3.0.0"
+ make-dir "^2.0.0"
+ package-hash "^3.0.0"
+ write-file-atomic "^2.4.2"
+
+call-matcher@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/call-matcher/-/call-matcher-1.1.0.tgz#23b2c1bc7a8394c8be28609d77ddbd5786680432"
+ integrity sha512-IoQLeNwwf9KTNbtSA7aEBb1yfDbdnzwjCetjkC8io5oGeOmK2CBNdg0xr+tadRYKO0p7uQyZzvon0kXlZbvGrw==
+ dependencies:
+ core-js "^2.0.0"
+ deep-equal "^1.0.0"
+ espurify "^1.6.0"
+ estraverse "^4.0.0"
+
+call-me-maybe@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
+ integrity sha1-JtII6onje1y95gJQoV8DHBak1ms=
+
+call-signature@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/call-signature/-/call-signature-0.0.2.tgz#a84abc825a55ef4cb2b028bd74e205a65b9a4996"
+ integrity sha1-qEq8glpV70yysCi9dOIFpluaSZY=
+
+callsites@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
+ integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+
+camelcase-keys@^4.0.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77"
+ integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=
+ dependencies:
+ camelcase "^4.1.0"
+ map-obj "^2.0.0"
+ quick-lru "^1.0.0"
+
+camelcase@^4.0.0, camelcase@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
+ integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=
+
+camelcase@^5.0.0, camelcase@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
+ integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
+
+capture-stack-trace@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d"
+ integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==
+
+chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
+ integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
+ dependencies:
+ ansi-styles "^3.2.1"
+ escape-string-regexp "^1.0.5"
+ supports-color "^5.3.0"
+
+chardet@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
+ integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
+
+chokidar@^3.0.2:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6"
+ integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==
+ dependencies:
+ anymatch "~3.1.1"
+ braces "~3.0.2"
+ glob-parent "~5.1.0"
+ is-binary-path "~2.1.0"
+ is-glob "~4.0.1"
+ normalize-path "~3.0.0"
+ readdirp "~3.2.0"
+ optionalDependencies:
+ fsevents "~2.1.1"
+
+chunkd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/chunkd/-/chunkd-1.0.0.tgz#4ead4a3704bcce510c4bb4d4a8be30c557836dd1"
+ integrity sha512-xx3Pb5VF9QaqCotolyZ1ywFBgyuJmu6+9dLiqBxgelEse9Xsr3yUlpoX3O4Oh11M00GT2kYMsRByTKIMJW2Lkg==
+
+ci-info@^1.5.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
+ integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==
+
+ci-info@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
+ integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
+
+ci-parallel-vars@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/ci-parallel-vars/-/ci-parallel-vars-1.0.0.tgz#af97729ed1c7381911ca37bcea263d62638701b3"
+ integrity sha512-u6dx20FBXm+apMi+5x7UVm6EH7BL1gc4XrcnQewjcB7HWRcor/V5qWc3RG2HwpgDJ26gIi2DSEu3B7sXynAw/g==
+
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+clean-stack@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
+ integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
+
+clean-yaml-object@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68"
+ integrity sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=
+
+cli-boxes@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
+ integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM=
+
+cli-boxes@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d"
+ integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==
+
+cli-cursor@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
+ integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=
+ dependencies:
+ restore-cursor "^2.0.0"
+
+cli-cursor@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
+ integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
+ dependencies:
+ restore-cursor "^3.1.0"
+
+cli-spinners@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77"
+ integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==
+
+cli-truncate@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.0.0.tgz#68ff6aaa53b203b52ad89b8b1a80f1f61ad1e1d5"
+ integrity sha512-C4hp+8GCIFVsUUiXcw+ce+7wexVWImw8rQrgMBFsqerx9LvvcGlwm6sMjQYAEmV/Xb87xc1b5Ttx505MSpZVqg==
+ dependencies:
+ slice-ansi "^2.1.0"
+ string-width "^4.1.0"
+
+cli-width@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
+ integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
+
+cliui@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
+ integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==
+ dependencies:
+ string-width "^3.1.0"
+ strip-ansi "^5.2.0"
+ wrap-ansi "^5.1.0"
+
+clone-response@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
+ integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
+ dependencies:
+ mimic-response "^1.0.0"
+
+clone@^1.0.2:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
+ integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4=
+
+code-excerpt@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/code-excerpt/-/code-excerpt-2.1.1.tgz#5fe3057bfbb71a5f300f659ef2cc0a47651ba77c"
+ integrity sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==
+ dependencies:
+ convert-to-spaces "^1.0.1"
+
+codecov@^3.3.0:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.6.1.tgz#f39fc49413445555f81f8e3ca5730992843b4517"
+ integrity sha512-IUJB6WG47nWK7o50etF8jBadxdMw7DmoQg05yIljstXFBGB6clOZsIj6iD4P82T2YaIU3qq+FFu8K9pxgkCJDQ==
+ dependencies:
+ argv "^0.0.2"
+ ignore-walk "^3.0.1"
+ js-yaml "^3.13.1"
+ teeny-request "^3.11.3"
+ urlgrey "^0.4.4"
+
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
+color-convert@^1.9.0:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
+ dependencies:
+ color-name "1.1.3"
+
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+commander@~2.20.3:
+ version "2.20.3"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
+ integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
+
+common-path-prefix@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-1.0.0.tgz#cd52f6f0712e0baab97d6f9732874f22f47752c0"
+ integrity sha1-zVL28HEuC6q5fW+XModPIvR3UsA=
+
+commondir@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
+ integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
+
+component-emitter@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
+ integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+concordance@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/concordance/-/concordance-4.0.0.tgz#5932fdee397d129bdbc3a1885fbe69839b1b7e15"
+ integrity sha512-l0RFuB8RLfCS0Pt2Id39/oCPykE01pyxgAFypWTlaGRgvLkZrtczZ8atEHpTeEIW+zYWXTBuA9cCSeEOScxReQ==
+ dependencies:
+ date-time "^2.1.0"
+ esutils "^2.0.2"
+ fast-diff "^1.1.2"
+ js-string-escape "^1.0.1"
+ lodash.clonedeep "^4.5.0"
+ lodash.flattendeep "^4.4.0"
+ lodash.islength "^4.0.1"
+ lodash.merge "^4.6.1"
+ md5-hex "^2.0.0"
+ semver "^5.5.1"
+ well-known-symbols "^2.0.0"
+
+configstore@^3.0.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f"
+ integrity sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==
+ dependencies:
+ dot-prop "^4.1.0"
+ graceful-fs "^4.1.2"
+ make-dir "^1.0.0"
+ unique-string "^1.0.0"
+ write-file-atomic "^2.0.0"
+ xdg-basedir "^3.0.0"
+
+configstore@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz#5933311e95d3687efb592c528b922d9262d227e7"
+ integrity sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==
+ dependencies:
+ dot-prop "^4.1.0"
+ graceful-fs "^4.1.2"
+ make-dir "^1.0.0"
+ unique-string "^1.0.0"
+ write-file-atomic "^2.0.0"
+ xdg-basedir "^3.0.0"
+
+contains-path@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"
+ integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=
+
+convert-source-map@^1.6.0, convert-source-map@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
+ integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==
+ dependencies:
+ safe-buffer "~5.1.1"
+
+convert-to-spaces@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz#7e3e48bbe6d997b1417ddca2868204b4d3d85715"
+ integrity sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+ integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+
+core-assert@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/core-assert/-/core-assert-0.2.1.tgz#f85e2cf9bfed28f773cc8b3fa5c5b69bdc02fe3f"
+ integrity sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=
+ dependencies:
+ buf-compare "^1.0.0"
+ is-error "^2.2.0"
+
+core-js@^2.0.0:
+ version "2.6.10"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f"
+ integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==
+
+cp-file@^6.2.0:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-6.2.0.tgz#40d5ea4a1def2a9acdd07ba5c0b0246ef73dc10d"
+ integrity sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==
+ dependencies:
+ graceful-fs "^4.1.2"
+ make-dir "^2.0.0"
+ nested-error-stacks "^2.0.0"
+ pify "^4.0.1"
+ safe-buffer "^5.0.1"
+
+create-error-class@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6"
+ integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=
+ dependencies:
+ capture-stack-trace "^1.0.0"
+
+cross-spawn@^4:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
+ integrity sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
+cross-spawn@^5.0.1:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
+ integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=
+ dependencies:
+ lru-cache "^4.0.1"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+cross-spawn@^6.0.5:
+ version "6.0.5"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
+ integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
+ dependencies:
+ nice-try "^1.0.4"
+ path-key "^2.0.1"
+ semver "^5.5.0"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+crypto-random-string@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
+ integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=
+
+currently-unhandled@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
+ integrity sha1-mI3zP+qxke95mmE2nddsF635V+o=
+ dependencies:
+ array-find-index "^1.0.1"
+
+date-time@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/date-time/-/date-time-2.1.0.tgz#0286d1b4c769633b3ca13e1e62558d2dbdc2eba2"
+ integrity sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==
+ dependencies:
+ time-zone "^1.0.0"
+
+debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+debug@^3.1.0:
+ version "3.2.6"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
+ integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
+ dependencies:
+ ms "^2.1.1"
+
+debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
+ integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
+ dependencies:
+ ms "^2.1.1"
+
+decamelize-keys@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
+ integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=
+ dependencies:
+ decamelize "^1.1.0"
+ map-obj "^1.0.0"
+
+decamelize@^1.1.0, decamelize@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+ integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+ integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
+
+decompress-response@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
+ integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
+ dependencies:
+ mimic-response "^1.0.0"
+
+deep-equal@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a"
+ integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==
+ dependencies:
+ is-arguments "^1.0.4"
+ is-date-object "^1.0.1"
+ is-regex "^1.0.4"
+ object-is "^1.0.1"
+ object-keys "^1.1.1"
+ regexp.prototype.flags "^1.2.0"
+
+deep-extend@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
+ integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
+
+deep-is@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+ integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
+
+deep-strict-equal@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz#4a078147a8ab57f6a0d4f5547243cd22f44eb4e4"
+ integrity sha1-SgeBR6irV/ag1PVUckPNIvROtOQ=
+ dependencies:
+ core-assert "^0.2.0"
+
+default-require-extensions@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7"
+ integrity sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=
+ dependencies:
+ strip-bom "^3.0.0"
+
+defaults@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
+ integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=
+ dependencies:
+ clone "^1.0.2"
+
+defer-to-connect@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.0.tgz#b41bd7efa8508cef13f8456975f7a278c72833fd"
+ integrity sha512-WE2sZoctWm/v4smfCAdjYbrfS55JiMRdlY9ZubFhsYbteCK9+BvAx4YV7nPjYM6ZnX5BcoVKwfmyx9sIFTgQMQ==
+
+define-properties@^1.1.2, define-properties@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
+ integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
+ dependencies:
+ object-keys "^1.0.12"
+
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
+del@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4"
+ integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==
+ dependencies:
+ "@types/glob" "^7.1.1"
+ globby "^6.1.0"
+ is-path-cwd "^2.0.0"
+ is-path-in-cwd "^2.0.0"
+ p-map "^2.0.0"
+ pify "^4.0.1"
+ rimraf "^2.6.3"
+
+dir-glob@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
+ integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==
+ dependencies:
+ path-type "^3.0.0"
+
+dir-glob@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
+ integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
+ dependencies:
+ path-type "^4.0.0"
+
+doctrine@1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
+ integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=
+ dependencies:
+ esutils "^2.0.2"
+ isarray "^1.0.0"
+
+doctrine@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
+ integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
+ dependencies:
+ esutils "^2.0.2"
+
+dot-prop@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"
+ integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==
+ dependencies:
+ is-obj "^1.0.0"
+
+dot-prop@^5.1.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb"
+ integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==
+ dependencies:
+ is-obj "^2.0.0"
+
+duplexer3@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
+ integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
+
+emittery@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.4.1.tgz#abe9d3297389ba424ac87e53d1c701962ce7433d"
+ integrity sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ==
+
+emoji-regex@^7.0.1:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
+ integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
+
+emoji-regex@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+
+empower-core@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/empower-core/-/empower-core-1.2.0.tgz#ce3fb2484d5187fa29c23fba8344b0b2fdf5601c"
+ integrity sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==
+ dependencies:
+ call-signature "0.0.2"
+ core-js "^2.0.0"
+
+end-of-stream@^1.1.0:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
+ integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
+ dependencies:
+ once "^1.4.0"
+
+enhance-visitors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/enhance-visitors/-/enhance-visitors-1.0.0.tgz#aa945d05da465672a1ebd38fee2ed3da8518e95a"
+ integrity sha1-qpRdBdpGVnKh69OP7i7T2oUY6Vo=
+ dependencies:
+ lodash "^4.13.1"
+
+equal-length@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/equal-length/-/equal-length-1.0.1.tgz#21ca112d48ab24b4e1e7ffc0e5339d31fdfc274c"
+ integrity sha1-IcoRLUirJLTh5//A5TOdMf38J0w=
+
+error-ex@^1.2.0, error-ex@^1.3.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+ integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es-abstract@^1.12.0, es-abstract@^1.7.0:
+ version "1.16.2"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.2.tgz#4e874331645e9925edef141e74fc4bd144669d34"
+ integrity sha512-jYo/J8XU2emLXl3OLwfwtuFfuF2w6DYPs+xy9ZfVyPkDcrauu6LYrw/q2TyCtrbc/KUdCiC5e9UajRhgNkVopA==
+ dependencies:
+ es-to-primitive "^1.2.1"
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.1"
+ is-callable "^1.1.4"
+ is-regex "^1.0.4"
+ object-inspect "^1.7.0"
+ object-keys "^1.1.1"
+ string.prototype.trimleft "^2.1.0"
+ string.prototype.trimright "^2.1.0"
+
+es-to-primitive@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
+ integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==
+ dependencies:
+ is-callable "^1.1.4"
+ is-date-object "^1.0.1"
+ is-symbol "^1.0.2"
+
+es6-error@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
+ integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
+
+es6-promise@^4.0.3:
+ version "4.2.8"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a"
+ integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==
+
+es6-promisify@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
+ integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=
+ dependencies:
+ es6-promise "^4.0.3"
+
+escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+
+escape-string-regexp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
+ integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
+
+eslint-config-standard@^14.0.0:
+ version "14.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz#b23da2b76fe5a2eba668374f246454e7058f15d4"
+ integrity sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==
+
+eslint-formatter-pretty@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/eslint-formatter-pretty/-/eslint-formatter-pretty-1.3.0.tgz#985d9e41c1f8475f4a090c5dbd2dfcf2821d607e"
+ integrity sha512-5DY64Y1rYCm7cfFDHEGUn54bvCnK+wSUVF07N8oXeqUJFSd+gnYOTXbzelQ1HurESluY6gnEQPmXOIkB4Wa+gA==
+ dependencies:
+ ansi-escapes "^2.0.0"
+ chalk "^2.1.0"
+ log-symbols "^2.0.0"
+ plur "^2.1.2"
+ string-width "^2.0.0"
+
+eslint-import-resolver-node@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"
+ integrity sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==
+ dependencies:
+ debug "^2.6.9"
+ resolve "^1.5.0"
+
+eslint-module-utils@^2.4.0:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz#7b4675875bf96b0dbf1b21977456e5bb1f5e018c"
+ integrity sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==
+ dependencies:
+ debug "^2.6.8"
+ pkg-dir "^2.0.0"
+
+eslint-plugin-ava@^9.0.0:
+ version "9.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-9.0.0.tgz#a8d569ae7127aa640e344c46d1f288976543b1bd"
+ integrity sha512-mJqQ1wQ9pxBi5Pu+grrqjfuSLxiSSgnpa5p5vMdEpBqA9n9cUzSCv0xMZ/NkTMAj5ieOB3TWF8j+7C30Yiv4RA==
+ dependencies:
+ deep-strict-equal "^0.2.0"
+ enhance-visitors "^1.0.0"
+ espree "^6.0.0"
+ espurify "^2.0.0"
+ import-modules "^1.1.0"
+ pkg-dir "^4.2.0"
+ resolve-from "^5.0.0"
+
+eslint-plugin-es@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976"
+ integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==
+ dependencies:
+ eslint-utils "^1.4.2"
+ regexpp "^3.0.0"
+
+eslint-plugin-import@^2.18.2:
+ version "2.18.2"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz#02f1180b90b077b33d447a17a2326ceb400aceb6"
+ integrity sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==
+ dependencies:
+ array-includes "^3.0.3"
+ contains-path "^0.1.0"
+ debug "^2.6.9"
+ doctrine "1.5.0"
+ eslint-import-resolver-node "^0.3.2"
+ eslint-module-utils "^2.4.0"
+ has "^1.0.3"
+ minimatch "^3.0.4"
+ object.values "^1.1.0"
+ read-pkg-up "^2.0.0"
+ resolve "^1.11.0"
+
+eslint-plugin-node@^10.0.0:
+ version "10.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6"
+ integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==
+ dependencies:
+ eslint-plugin-es "^2.0.0"
+ eslint-utils "^1.4.2"
+ ignore "^5.1.1"
+ minimatch "^3.0.4"
+ resolve "^1.10.1"
+ semver "^6.1.0"
+
+eslint-plugin-promise@^4.0.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a"
+ integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==
+
+eslint-plugin-standard@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4"
+ integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==
+
+eslint-scope@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
+ integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==
+ dependencies:
+ esrecurse "^4.1.0"
+ estraverse "^4.1.1"
+
+eslint-utils@^1.4.2, eslint-utils@^1.4.3:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
+ integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
+ dependencies:
+ eslint-visitor-keys "^1.1.0"
+
+eslint-visitor-keys@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
+ integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
+
+eslint@^6.1.0:
+ version "6.7.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.7.1.tgz#269ccccec3ef60ab32358a44d147ac209154b919"
+ integrity sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ ajv "^6.10.0"
+ chalk "^2.1.0"
+ cross-spawn "^6.0.5"
+ debug "^4.0.1"
+ doctrine "^3.0.0"
+ eslint-scope "^5.0.0"
+ eslint-utils "^1.4.3"
+ eslint-visitor-keys "^1.1.0"
+ espree "^6.1.2"
+ esquery "^1.0.1"
+ esutils "^2.0.2"
+ file-entry-cache "^5.0.1"
+ functional-red-black-tree "^1.0.1"
+ glob-parent "^5.0.0"
+ globals "^12.1.0"
+ ignore "^4.0.6"
+ import-fresh "^3.0.0"
+ imurmurhash "^0.1.4"
+ inquirer "^7.0.0"
+ is-glob "^4.0.0"
+ js-yaml "^3.13.1"
+ json-stable-stringify-without-jsonify "^1.0.1"
+ levn "^0.3.0"
+ lodash "^4.17.14"
+ minimatch "^3.0.4"
+ mkdirp "^0.5.1"
+ natural-compare "^1.4.0"
+ optionator "^0.8.3"
+ progress "^2.0.0"
+ regexpp "^2.0.1"
+ semver "^6.1.2"
+ strip-ansi "^5.2.0"
+ strip-json-comments "^3.0.1"
+ table "^5.2.3"
+ text-table "^0.2.0"
+ v8-compile-cache "^2.0.3"
+
+esm@^3.2.25:
+ version "3.2.25"
+ resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
+ integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
+
+espower-location-detector@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/espower-location-detector/-/espower-location-detector-1.0.0.tgz#a17b7ecc59d30e179e2bef73fb4137704cb331b5"
+ integrity sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=
+ dependencies:
+ is-url "^1.2.1"
+ path-is-absolute "^1.0.0"
+ source-map "^0.5.0"
+ xtend "^4.0.0"
+
+espree@^6.0.0, espree@^6.1.2:
+ version "6.1.2"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d"
+ integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==
+ dependencies:
+ acorn "^7.1.0"
+ acorn-jsx "^5.1.0"
+ eslint-visitor-keys "^1.1.0"
+
+esprima@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
+
+espurify@^1.6.0:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/espurify/-/espurify-1.8.1.tgz#5746c6c1ab42d302de10bd1d5bf7f0e8c0515056"
+ integrity sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==
+ dependencies:
+ core-js "^2.0.0"
+
+espurify@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/espurify/-/espurify-2.0.1.tgz#c25b3bb613863daa142edcca052370a1a459f41d"
+ integrity sha512-7w/dUrReI/QbJFHRwfomTlkQOXaB1NuCrBRn5Y26HXn5gvh18/19AgLbayVrNxXQfkckvgrJloWyvZDuJ7dhEA==
+
+esquery@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
+ integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==
+ dependencies:
+ estraverse "^4.0.0"
+
+esrecurse@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
+ integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==
+ dependencies:
+ estraverse "^4.1.0"
+
+estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+
+esutils@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
+
+execa@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
+ integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=
+ dependencies:
+ cross-spawn "^5.0.1"
+ get-stream "^3.0.0"
+ is-stream "^1.1.0"
+ npm-run-path "^2.0.0"
+ p-finally "^1.0.0"
+ signal-exit "^3.0.0"
+ strip-eof "^1.0.0"
+
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
+external-editor@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
+ integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
+ dependencies:
+ chardet "^0.7.0"
+ iconv-lite "^0.4.24"
+ tmp "^0.0.33"
+
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+fast-deep-equal@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
+ integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
+
+fast-diff@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
+ integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
+
+fast-glob@^2.2.6:
+ version "2.2.7"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"
+ integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==
+ dependencies:
+ "@mrmlnc/readdir-enhanced" "^2.2.1"
+ "@nodelib/fs.stat" "^1.1.2"
+ glob-parent "^3.1.0"
+ is-glob "^4.0.0"
+ merge2 "^1.2.3"
+ micromatch "^3.1.10"
+
+fast-glob@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.0.tgz#77375a7e3e6f6fc9b18f061cddd28b8d1eec75ae"
+ integrity sha512-TrUz3THiq2Vy3bjfQUB2wNyPdGBeGmdjbzzBLhfHN4YFurYptCKwGq/TfiRavbGywFRzY6U2CdmQ1zmsY5yYaw==
+ dependencies:
+ "@nodelib/fs.stat" "^2.0.2"
+ "@nodelib/fs.walk" "^1.2.3"
+ glob-parent "^5.1.0"
+ merge2 "^1.3.0"
+ micromatch "^4.0.2"
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
+ integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
+
+fast-levenshtein@~2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
+ integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
+
+fastq@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2"
+ integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==
+ dependencies:
+ reusify "^1.0.0"
+
+figures@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-3.1.0.tgz#4b198dd07d8d71530642864af2d45dd9e459c4ec"
+ integrity sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==
+ dependencies:
+ escape-string-regexp "^1.0.5"
+
+file-entry-cache@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
+ integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==
+ dependencies:
+ flat-cache "^2.0.1"
+
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
+fill-range@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
+ dependencies:
+ to-regex-range "^5.0.1"
+
+find-cache-dir@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7"
+ integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==
+ dependencies:
+ commondir "^1.0.1"
+ make-dir "^2.0.0"
+ pkg-dir "^3.0.0"
+
+find-up@^2.0.0, find-up@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
+ integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
+ dependencies:
+ locate-path "^2.0.0"
+
+find-up@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
+ integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
+ dependencies:
+ locate-path "^3.0.0"
+
+find-up@^4.0.0, find-up@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
+ integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
+ dependencies:
+ locate-path "^5.0.0"
+ path-exists "^4.0.0"
+
+flat-cache@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
+ integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==
+ dependencies:
+ flatted "^2.0.0"
+ rimraf "2.6.3"
+ write "1.0.3"
+
+flatted@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
+ integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==
+
+for-in@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+ integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
+
+foreground-child@^1.5.6:
+ version "1.5.6"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9"
+ integrity sha1-T9ca0t/elnibmApcCilZN8svXOk=
+ dependencies:
+ cross-spawn "^4"
+ signal-exit "^3.0.0"
+
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
+ dependencies:
+ map-cache "^0.2.2"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+fsevents@~2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805"
+ integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==
+
+function-bind@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+ integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+
+functional-red-black-tree@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
+ integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
+
+get-caller-file@^2.0.1:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
+ integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
+
+get-port@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.0.0.tgz#aa22b6b86fd926dd7884de3e23332c9f70c031a6"
+ integrity sha512-imzMU0FjsZqNa6BqOjbbW6w5BivHIuQKopjpPqcnx0AVHJQKCxK1O+Ab3OrVXhrekqfVMjwA9ZYu062R+KcIsQ==
+ dependencies:
+ type-fest "^0.3.0"
+
+get-stream@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
+ integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
+
+get-stream@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
+ integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
+ dependencies:
+ pump "^3.0.0"
+
+get-stream@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9"
+ integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
+ dependencies:
+ pump "^3.0.0"
+
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+ integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
+
+glob-parent@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
+ integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=
+ dependencies:
+ is-glob "^3.1.0"
+ path-dirname "^1.0.0"
+
+glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
+ integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob-to-regexp@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
+ integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
+
+glob@^7.0.3, glob@^7.1.3:
+ version "7.1.6"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+global-dirs@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445"
+ integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=
+ dependencies:
+ ini "^1.3.4"
+
+globals@^11.1.0:
+ version "11.12.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
+ integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
+
+globals@^12.1.0:
+ version "12.3.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-12.3.0.tgz#1e564ee5c4dded2ab098b0f88f24702a3c56be13"
+ integrity sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==
+ dependencies:
+ type-fest "^0.8.1"
+
+globby@^10.0.1:
+ version "10.0.1"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22"
+ integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==
+ dependencies:
+ "@types/glob" "^7.1.1"
+ array-union "^2.1.0"
+ dir-glob "^3.0.1"
+ fast-glob "^3.0.3"
+ glob "^7.1.3"
+ ignore "^5.1.1"
+ merge2 "^1.2.3"
+ slash "^3.0.0"
+
+globby@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
+ integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=
+ dependencies:
+ array-union "^1.0.1"
+ glob "^7.0.3"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+globby@^9.1.0:
+ version "9.2.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d"
+ integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==
+ dependencies:
+ "@types/glob" "^7.1.1"
+ array-union "^1.0.2"
+ dir-glob "^2.2.2"
+ fast-glob "^2.2.6"
+ glob "^7.1.3"
+ ignore "^4.0.3"
+ pify "^4.0.1"
+ slash "^2.0.0"
+
+got@^6.7.1:
+ version "6.7.1"
+ resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0"
+ integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=
+ dependencies:
+ create-error-class "^3.0.0"
+ duplexer3 "^0.1.4"
+ get-stream "^3.0.0"
+ is-redirect "^1.0.0"
+ is-retry-allowed "^1.0.0"
+ is-stream "^1.0.0"
+ lowercase-keys "^1.0.0"
+ safe-buffer "^5.0.1"
+ timed-out "^4.0.0"
+ unzip-response "^2.0.1"
+ url-parse-lax "^1.0.0"
+
+got@^9.6.0:
+ version "9.6.0"
+ resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
+ integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
+ dependencies:
+ "@sindresorhus/is" "^0.14.0"
+ "@szmarczak/http-timer" "^1.1.2"
+ cacheable-request "^6.0.0"
+ decompress-response "^3.3.0"
+ duplexer3 "^0.1.4"
+ get-stream "^4.1.0"
+ lowercase-keys "^1.0.1"
+ mimic-response "^1.0.1"
+ p-cancelable "^1.0.0"
+ to-readable-stream "^1.0.0"
+ url-parse-lax "^3.0.0"
+
+graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
+ integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
+
+handlebars@^4.1.2:
+ version "4.5.3"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482"
+ integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==
+ dependencies:
+ neo-async "^2.6.0"
+ optimist "^0.6.1"
+ source-map "^0.6.1"
+ optionalDependencies:
+ uglify-js "^3.1.4"
+
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+has-symbols@^1.0.0, has-symbols@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
+ integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+ integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+has-yarn@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77"
+ integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==
+
+has@^1.0.1, has@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+ integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+ dependencies:
+ function-bind "^1.1.1"
+
+hasha@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/hasha/-/hasha-3.0.0.tgz#52a32fab8569d41ca69a61ff1a214f8eb7c8bd39"
+ integrity sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=
+ dependencies:
+ is-stream "^1.0.1"
+
+hasha@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.1.0.tgz#dd05ccdfcfe7dab626247ce2a58efe461922f4ca"
+ integrity sha512-OFPDWmzPN1l7atOV1TgBVmNtBxaIysToK6Ve9DK+vT6pYuklw/nPNT+HJbZi0KDcI6vWB+9tgvZ5YD7fA3CXcA==
+ dependencies:
+ is-stream "^2.0.0"
+ type-fest "^0.8.0"
+
+hosted-git-info@^2.1.4:
+ version "2.8.5"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c"
+ integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==
+
+http-cache-semantics@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5"
+ integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==
+
+https-proxy-agent@^2.2.1:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b"
+ integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==
+ dependencies:
+ agent-base "^4.3.0"
+ debug "^3.1.0"
+
+iconv-lite@^0.4.24:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+ignore-by-default@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
+ integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk=
+
+ignore-walk@^3.0.1:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
+ integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
+ dependencies:
+ minimatch "^3.0.4"
+
+ignore@^4.0.3, ignore@^4.0.6:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
+ integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
+
+ignore@^5.1.1:
+ version "5.1.4"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf"
+ integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==
+
+import-fresh@^3.0.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
+ integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==
+ dependencies:
+ parent-module "^1.0.0"
+ resolve-from "^4.0.0"
+
+import-lazy@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
+ integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=
+
+import-local@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6"
+ integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==
+ dependencies:
+ pkg-dir "^4.2.0"
+ resolve-cwd "^3.0.0"
+
+import-modules@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-1.1.0.tgz#748db79c5cc42bb9701efab424f894e72600e9dc"
+ integrity sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw=
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
+
+indent-string@^3.0.0, indent-string@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289"
+ integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=
+
+indent-string@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
+ integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+ini@^1.3.4, ini@~1.3.0:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
+ integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
+
+inquirer@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.0.tgz#9e2b032dde77da1db5db804758b8fea3a970519a"
+ integrity sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==
+ dependencies:
+ ansi-escapes "^4.2.1"
+ chalk "^2.4.2"
+ cli-cursor "^3.1.0"
+ cli-width "^2.0.0"
+ external-editor "^3.0.3"
+ figures "^3.0.0"
+ lodash "^4.17.15"
+ mute-stream "0.0.8"
+ run-async "^2.2.0"
+ rxjs "^6.4.0"
+ string-width "^4.1.0"
+ strip-ansi "^5.1.0"
+ through "^2.3.6"
+
+irregular-plurals@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.4.0.tgz#2ca9b033651111855412f16be5d77c62a458a766"
+ integrity sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=
+
+irregular-plurals@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-2.0.0.tgz#39d40f05b00f656d0b7fa471230dd3b714af2872"
+ integrity sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==
+
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-arguments@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3"
+ integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+ integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
+
+is-binary-path@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
+ dependencies:
+ binary-extensions "^2.0.0"
+
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+ integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+
+is-callable@^1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
+ integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==
+
+is-ci@^1.0.10:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c"
+ integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==
+ dependencies:
+ ci-info "^1.5.0"
+
+is-ci@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
+ integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
+ dependencies:
+ ci-info "^2.0.0"
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-date-object@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
+ integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
+is-error@^2.2.0, is-error@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.2.tgz#c10ade187b3c93510c5470a5567833ee25649843"
+ integrity sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+ integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
+
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-extglob@^2.1.0, is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-fullwidth-code-point@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+
+is-glob@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
+ integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=
+ dependencies:
+ is-extglob "^2.1.0"
+
+is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
+ integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-installed-globally@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80"
+ integrity sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=
+ dependencies:
+ global-dirs "^0.1.0"
+ is-path-inside "^1.0.0"
+
+is-npm@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
+ integrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ=
+
+is-npm@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-3.0.0.tgz#ec9147bfb629c43f494cf67936a961edec7e8053"
+ integrity sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA==
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
+
+is-obj@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
+ integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
+
+is-obj@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
+ integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
+
+is-observable@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-2.0.0.tgz#327af1e8cdea9cd717f95911b87c5d34301721a6"
+ integrity sha512-fhBZv3eFKUbyHXZ1oHujdo2tZ+CNbdpdzzlENgCGZUC8keoGxUew2jYFLYcUB4qo7LDD03o4KK11m/QYD7kEjg==
+
+is-path-cwd@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb"
+ integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==
+
+is-path-in-cwd@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb"
+ integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==
+ dependencies:
+ is-path-inside "^2.1.0"
+
+is-path-inside@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
+ integrity sha1-jvW33lBDej/cprToZe96pVy0gDY=
+ dependencies:
+ path-is-inside "^1.0.1"
+
+is-path-inside@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2"
+ integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==
+ dependencies:
+ path-is-inside "^1.0.2"
+
+is-plain-obj@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
+ integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
+
+is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+is-plain-object@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928"
+ integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==
+ dependencies:
+ isobject "^4.0.0"
+
+is-promise@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
+ integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=
+
+is-redirect@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
+ integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=
+
+is-regex@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
+ integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=
+ dependencies:
+ has "^1.0.1"
+
+is-retry-allowed@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4"
+ integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==
+
+is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+ integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+
+is-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
+ integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
+
+is-symbol@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
+ integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==
+ dependencies:
+ has-symbols "^1.0.1"
+
+is-typedarray@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+ integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
+
+is-url@^1.2.1:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
+ integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==
+
+is-utf8@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+ integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
+
+is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+ integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
+
+is-yarn-global@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232"
+ integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==
+
+isarray@1.0.0, isarray@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
+
+isobject@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0"
+ integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==
+
+istanbul-lib-coverage@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49"
+ integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==
+
+istanbul-lib-hook@^2.0.7:
+ version "2.0.7"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133"
+ integrity sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==
+ dependencies:
+ append-transform "^1.0.0"
+
+istanbul-lib-instrument@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630"
+ integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==
+ dependencies:
+ "@babel/generator" "^7.4.0"
+ "@babel/parser" "^7.4.3"
+ "@babel/template" "^7.4.0"
+ "@babel/traverse" "^7.4.3"
+ "@babel/types" "^7.4.0"
+ istanbul-lib-coverage "^2.0.5"
+ semver "^6.0.0"
+
+istanbul-lib-report@^2.0.8:
+ version "2.0.8"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33"
+ integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==
+ dependencies:
+ istanbul-lib-coverage "^2.0.5"
+ make-dir "^2.1.0"
+ supports-color "^6.1.0"
+
+istanbul-lib-source-maps@^3.0.6:
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8"
+ integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==
+ dependencies:
+ debug "^4.1.1"
+ istanbul-lib-coverage "^2.0.5"
+ make-dir "^2.1.0"
+ rimraf "^2.6.3"
+ source-map "^0.6.1"
+
+istanbul-reports@^2.2.4:
+ version "2.2.6"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af"
+ integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==
+ dependencies:
+ handlebars "^4.1.2"
+
+js-string-escape@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef"
+ integrity sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=
+
+js-tokens@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+js-yaml@^3.10.0, js-yaml@^3.13.1:
+ version "3.13.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
+ integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsesc@^2.5.1:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
+ integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
+
+jsesc@~0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+ integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
+
+json-buffer@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
+ integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
+
+json-parse-better-errors@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
+ integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-stable-stringify-without-jsonify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
+ integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
+
+json5@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6"
+ integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==
+ dependencies:
+ minimist "^1.2.0"
+
+keyv@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
+ integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
+ dependencies:
+ json-buffer "3.0.0"
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+ integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
+ integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
+
+latest-version@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15"
+ integrity sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=
+ dependencies:
+ package-json "^4.0.0"
+
+latest-version@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face"
+ integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==
+ dependencies:
+ package-json "^6.3.0"
+
+levn@^0.3.0, levn@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
+ integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
+ dependencies:
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+
+load-json-file@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
+ integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^2.2.0"
+ pify "^2.0.0"
+ strip-bom "^3.0.0"
+
+load-json-file@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
+ integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs=
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^4.0.0"
+ pify "^3.0.0"
+ strip-bom "^3.0.0"
+
+load-json-file@^5.2.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3"
+ integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==
+ dependencies:
+ graceful-fs "^4.1.15"
+ parse-json "^4.0.0"
+ pify "^4.0.1"
+ strip-bom "^3.0.0"
+ type-fest "^0.3.0"
+
+locate-path@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
+ integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
+ dependencies:
+ p-locate "^2.0.0"
+ path-exists "^3.0.0"
+
+locate-path@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
+ integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
+ dependencies:
+ p-locate "^3.0.0"
+ path-exists "^3.0.0"
+
+locate-path@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
+ integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
+ dependencies:
+ p-locate "^4.1.0"
+
+lodash.clonedeep@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
+ integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
+
+lodash.flattendeep@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2"
+ integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=
+
+lodash.islength@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/lodash.islength/-/lodash.islength-4.0.1.tgz#4e9868d452575d750affd358c979543dc20ed577"
+ integrity sha1-Tpho1FJXXXUK/9NYyXlUPcIO1Xc=
+
+lodash.merge@^4.6.1:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
+
+lodash@^4.13.1, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15:
+ version "4.17.15"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
+ integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+
+log-symbols@^2.0.0, log-symbols@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
+ integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==
+ dependencies:
+ chalk "^2.0.1"
+
+loud-rejection@^1.0.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
+ integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=
+ dependencies:
+ currently-unhandled "^0.4.1"
+ signal-exit "^3.0.0"
+
+loud-rejection@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-2.2.0.tgz#4255eb6e9c74045b0edc021fa7397ab655a8517c"
+ integrity sha512-S0FayMXku80toa5sZ6Ro4C+s+EtFDCsyJNG/AzFMfX3AxD5Si4dZsgzm/kKnbOxHl5Cv8jBlno8+3XYIh2pNjQ==
+ dependencies:
+ currently-unhandled "^0.4.1"
+ signal-exit "^3.0.2"
+
+lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
+ integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
+
+lowercase-keys@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
+ integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
+
+lru-cache@^4.0.1:
+ version "4.1.5"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
+ integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
+ dependencies:
+ pseudomap "^1.0.2"
+ yallist "^2.1.2"
+
+make-dir@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
+ integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==
+ dependencies:
+ pify "^3.0.0"
+
+make-dir@^2.0.0, make-dir@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
+ integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
+ dependencies:
+ pify "^4.0.1"
+ semver "^5.6.0"
+
+make-dir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801"
+ integrity sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==
+ dependencies:
+ semver "^6.0.0"
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+ integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
+
+map-obj@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
+ integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=
+
+map-obj@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9"
+ integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk=
+
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
+ dependencies:
+ object-visit "^1.0.0"
+
+matcher@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/matcher/-/matcher-2.1.0.tgz#64e1041c15b993e23b786f93320a7474bf833c28"
+ integrity sha512-o+nZr+vtJtgPNklyeUKkkH42OsK8WAfdgaJE2FNxcjLPg+5QbeEoT6vRj8Xq/iv18JlQ9cmKsEu0b94ixWf1YQ==
+ dependencies:
+ escape-string-regexp "^2.0.0"
+
+md5-hex@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-2.0.0.tgz#d0588e9f1c74954492ecd24ac0ac6ce997d92e33"
+ integrity sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=
+ dependencies:
+ md5-o-matic "^0.1.1"
+
+md5-hex@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-3.0.1.tgz#be3741b510591434b2784d79e556eefc2c9a8e5c"
+ integrity sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==
+ dependencies:
+ blueimp-md5 "^2.10.0"
+
+md5-o-matic@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3"
+ integrity sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=
+
+meow@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4"
+ integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==
+ dependencies:
+ camelcase-keys "^4.0.0"
+ decamelize-keys "^1.0.0"
+ loud-rejection "^1.0.0"
+ minimist-options "^3.0.1"
+ normalize-package-data "^2.3.4"
+ read-pkg-up "^3.0.0"
+ redent "^2.0.0"
+ trim-newlines "^2.0.0"
+ yargs-parser "^10.0.0"
+
+merge-source-map@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646"
+ integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==
+ dependencies:
+ source-map "^0.6.1"
+
+merge2@^1.2.3, merge2@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81"
+ integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==
+
+micromatch@^3.1.10:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
+micromatch@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
+ integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
+ dependencies:
+ braces "^3.0.1"
+ picomatch "^2.0.5"
+
+mimic-fn@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
+ integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
+
+mimic-fn@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
+ integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
+
+mimic-response@^1.0.0, mimic-response@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
+ integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
+
+minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist-options@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954"
+ integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==
+ dependencies:
+ arrify "^1.0.1"
+ is-plain-obj "^1.1.0"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+ integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
+
+minimist@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+ integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
+
+minimist@~0.0.1:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
+ integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
+
+mixin-deep@^1.2.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
+ integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
+mkdirp@^0.5.0, mkdirp@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ dependencies:
+ minimist "0.0.8"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+ms@^2.1.1, ms@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+mute-stream@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
+ integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
+
+nanomatch@^1.2.9:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+ integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+natural-compare@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+ integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
+
+neo-async@^2.6.0:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
+ integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
+
+nested-error-stacks@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61"
+ integrity sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==
+
+nice-try@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
+ integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
+
+node-fetch@^2.2.0:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
+ integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
+
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
+ integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
+ dependencies:
+ hosted-git-info "^2.1.4"
+ resolve "^1.10.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
+normalize-path@^3.0.0, normalize-path@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+
+normalize-url@^4.1.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
+ integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
+
+npm-run-path@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
+ integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
+ dependencies:
+ path-key "^2.0.0"
+
+nyc@^14.0.0:
+ version "14.1.1"
+ resolved "https://registry.yarnpkg.com/nyc/-/nyc-14.1.1.tgz#151d64a6a9f9f5908a1b73233931e4a0a3075eeb"
+ integrity sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==
+ dependencies:
+ archy "^1.0.0"
+ caching-transform "^3.0.2"
+ convert-source-map "^1.6.0"
+ cp-file "^6.2.0"
+ find-cache-dir "^2.1.0"
+ find-up "^3.0.0"
+ foreground-child "^1.5.6"
+ glob "^7.1.3"
+ istanbul-lib-coverage "^2.0.5"
+ istanbul-lib-hook "^2.0.7"
+ istanbul-lib-instrument "^3.3.0"
+ istanbul-lib-report "^2.0.8"
+ istanbul-lib-source-maps "^3.0.6"
+ istanbul-reports "^2.2.4"
+ js-yaml "^3.13.1"
+ make-dir "^2.1.0"
+ merge-source-map "^1.1.0"
+ resolve-from "^4.0.0"
+ rimraf "^2.6.3"
+ signal-exit "^3.0.2"
+ spawn-wrap "^1.4.2"
+ test-exclude "^5.2.3"
+ uuid "^3.3.2"
+ yargs "^13.2.2"
+ yargs-parser "^13.0.0"
+
+object-assign@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
+
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-inspect@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67"
+ integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==
+
+object-is@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6"
+ integrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=
+
+object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
+ integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
+ dependencies:
+ isobject "^3.0.0"
+
+object.assign@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
+ integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
+ dependencies:
+ define-properties "^1.1.2"
+ function-bind "^1.1.1"
+ has-symbols "^1.0.0"
+ object-keys "^1.0.11"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
+ dependencies:
+ isobject "^3.0.1"
+
+object.values@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9"
+ integrity sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==
+ dependencies:
+ define-properties "^1.1.3"
+ es-abstract "^1.12.0"
+ function-bind "^1.1.1"
+ has "^1.0.3"
+
+observable-to-promise@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/observable-to-promise/-/observable-to-promise-1.0.0.tgz#37e136f16a15385ac063411ada0e1202bfff58f4"
+ integrity sha512-cqnGUrNsE6vdVDTPAX9/WeVzwy/z37vdxupdQXU8vgTXRFH72KCZiZga8aca2ulRPIeem8W3vW9rQHBwfIl2WA==
+ dependencies:
+ is-observable "^2.0.0"
+ symbol-observable "^1.0.4"
+
+once@^1.3.0, once@^1.3.1, once@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+onetime@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
+ integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=
+ dependencies:
+ mimic-fn "^1.0.0"
+
+onetime@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5"
+ integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==
+ dependencies:
+ mimic-fn "^2.1.0"
+
+optimist@^0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
+ integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY=
+ dependencies:
+ minimist "~0.0.1"
+ wordwrap "~0.0.2"
+
+optionator@^0.8.3:
+ version "0.8.3"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
+ integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
+ dependencies:
+ deep-is "~0.1.3"
+ fast-levenshtein "~2.0.6"
+ levn "~0.3.0"
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+ word-wrap "~1.2.3"
+
+ora@^3.4.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318"
+ integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==
+ dependencies:
+ chalk "^2.4.2"
+ cli-cursor "^2.1.0"
+ cli-spinners "^2.0.0"
+ log-symbols "^2.2.0"
+ strip-ansi "^5.2.0"
+ wcwidth "^1.0.1"
+
+os-homedir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+ integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
+
+os-tmpdir@^1.0.1, os-tmpdir@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+p-cancelable@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
+ integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
+
+p-finally@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+ integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
+
+p-limit@^1.1.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
+ integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
+ dependencies:
+ p-try "^1.0.0"
+
+p-limit@^2.0.0, p-limit@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537"
+ integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==
+ dependencies:
+ p-try "^2.0.0"
+
+p-locate@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
+ integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
+ dependencies:
+ p-limit "^1.1.0"
+
+p-locate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
+ integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
+ dependencies:
+ p-limit "^2.0.0"
+
+p-locate@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
+ integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
+ dependencies:
+ p-limit "^2.2.0"
+
+p-map@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
+ integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==
+
+p-try@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
+ integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
+
+p-try@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
+ integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
+
+package-hash@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-3.0.0.tgz#50183f2d36c9e3e528ea0a8605dff57ce976f88e"
+ integrity sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==
+ dependencies:
+ graceful-fs "^4.1.15"
+ hasha "^3.0.0"
+ lodash.flattendeep "^4.4.0"
+ release-zalgo "^1.0.0"
+
+package-hash@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-4.0.0.tgz#3537f654665ec3cc38827387fc904c163c54f506"
+ integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==
+ dependencies:
+ graceful-fs "^4.1.15"
+ hasha "^5.0.0"
+ lodash.flattendeep "^4.4.0"
+ release-zalgo "^1.0.0"
+
+package-json@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed"
+ integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=
+ dependencies:
+ got "^6.7.1"
+ registry-auth-token "^3.0.1"
+ registry-url "^3.0.3"
+ semver "^5.1.0"
+
+package-json@^6.3.0:
+ version "6.5.0"
+ resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0"
+ integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==
+ dependencies:
+ got "^9.6.0"
+ registry-auth-token "^4.0.0"
+ registry-url "^5.0.0"
+ semver "^6.2.0"
+
+parent-module@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
+ integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
+ dependencies:
+ callsites "^3.0.0"
+
+parse-json@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+ integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=
+ dependencies:
+ error-ex "^1.2.0"
+
+parse-json@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
+ integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=
+ dependencies:
+ error-ex "^1.3.1"
+ json-parse-better-errors "^1.0.1"
+
+parse-ms@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d"
+ integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+ integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
+
+path-dirname@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
+ integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=
+
+path-exists@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
+ integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
+
+path-exists@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+path-is-inside@^1.0.1, path-is-inside@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+ integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=
+
+path-key@^2.0.0, path-key@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
+ integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+
+path-parse@^1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
+ integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+
+path-type@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
+ integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=
+ dependencies:
+ pify "^2.0.0"
+
+path-type@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
+ integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==
+ dependencies:
+ pify "^3.0.0"
+
+path-type@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
+ integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+
+picomatch@^2.0.4, picomatch@^2.0.5:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.1.1.tgz#ecdfbea7704adb5fe6fb47f9866c4c0e15e905c5"
+ integrity sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+ integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
+
+pify@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
+ integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
+
+pify@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
+ integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o=
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+ integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
+
+pkg-conf@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-3.1.0.tgz#d9f9c75ea1bae0e77938cde045b276dac7cc69ae"
+ integrity sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==
+ dependencies:
+ find-up "^3.0.0"
+ load-json-file "^5.2.0"
+
+pkg-dir@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
+ integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=
+ dependencies:
+ find-up "^2.1.0"
+
+pkg-dir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3"
+ integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==
+ dependencies:
+ find-up "^3.0.0"
+
+pkg-dir@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
+ integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
+ dependencies:
+ find-up "^4.0.0"
+
+plur@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a"
+ integrity sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=
+ dependencies:
+ irregular-plurals "^1.0.0"
+
+plur@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/plur/-/plur-3.1.1.tgz#60267967866a8d811504fe58f2faaba237546a5b"
+ integrity sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==
+ dependencies:
+ irregular-plurals "^2.0.0"
+
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+ integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
+
+prelude-ls@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
+ integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
+
+prepend-http@^1.0.1:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
+ integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
+
+prepend-http@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
+ integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
+
+pretty-ms@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-5.1.0.tgz#b906bdd1ec9e9799995c372e2b1c34f073f95384"
+ integrity sha512-4gaK1skD2gwscCfkswYQRmddUb2GJZtzDGRjHWadVHtK/DIKFufa12MvES6/xu1tVbUYeia5bmLcwJtZJQUqnw==
+ dependencies:
+ parse-ms "^2.1.0"
+
+progress@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
+ integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
+
+pseudomap@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+ integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
+
+pump@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
+ integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+punycode@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
+ integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+
+quick-lru@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8"
+ integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=
+
+rc@^1.0.1, rc@^1.1.6, rc@^1.2.8:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
+ integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
+ dependencies:
+ deep-extend "^0.6.0"
+ ini "~1.3.0"
+ minimist "^1.2.0"
+ strip-json-comments "~2.0.1"
+
+read-pkg-up@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
+ integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=
+ dependencies:
+ find-up "^2.0.0"
+ read-pkg "^2.0.0"
+
+read-pkg-up@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
+ integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=
+ dependencies:
+ find-up "^2.0.0"
+ read-pkg "^3.0.0"
+
+read-pkg-up@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978"
+ integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==
+ dependencies:
+ find-up "^3.0.0"
+ read-pkg "^3.0.0"
+
+read-pkg@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
+ integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=
+ dependencies:
+ load-json-file "^2.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^2.0.0"
+
+read-pkg@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
+ integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=
+ dependencies:
+ load-json-file "^4.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^3.0.0"
+
+readdirp@~3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839"
+ integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==
+ dependencies:
+ picomatch "^2.0.4"
+
+redent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa"
+ integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=
+ dependencies:
+ indent-string "^3.0.0"
+ strip-indent "^2.0.0"
+
+regenerate-unicode-properties@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e"
+ integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==
+ dependencies:
+ regenerate "^1.4.0"
+
+regenerate@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
+ integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
+regexp.prototype.flags@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c"
+ integrity sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==
+ dependencies:
+ define-properties "^1.1.2"
+
+regexpp@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
+ integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
+
+regexpp@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e"
+ integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==
+
+regexpu-core@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6"
+ integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==
+ dependencies:
+ regenerate "^1.4.0"
+ regenerate-unicode-properties "^8.1.0"
+ regjsgen "^0.5.0"
+ regjsparser "^0.6.0"
+ unicode-match-property-ecmascript "^1.0.4"
+ unicode-match-property-value-ecmascript "^1.1.0"
+
+registry-auth-token@^3.0.1:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e"
+ integrity sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==
+ dependencies:
+ rc "^1.1.6"
+ safe-buffer "^5.0.1"
+
+registry-auth-token@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.0.0.tgz#30e55961eec77379da551ea5c4cf43cbf03522be"
+ integrity sha512-lpQkHxd9UL6tb3k/aHAVfnVtn+Bcs9ob5InuFLLEDqSqeq+AljB8GZW9xY0x7F+xYwEcjKe07nyoxzEYz6yvkw==
+ dependencies:
+ rc "^1.2.8"
+ safe-buffer "^5.0.1"
+
+registry-url@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942"
+ integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI=
+ dependencies:
+ rc "^1.0.1"
+
+registry-url@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009"
+ integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==
+ dependencies:
+ rc "^1.2.8"
+
+regjsgen@^0.5.0:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c"
+ integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==
+
+regjsparser@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c"
+ integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==
+ dependencies:
+ jsesc "~0.5.0"
+
+release-zalgo@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730"
+ integrity sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=
+ dependencies:
+ es6-error "^4.0.1"
+
+repeat-element@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
+ integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+
+repeat-string@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+ integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
+
+require-main-filename@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
+ integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
+
+require-precompiled@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/require-precompiled/-/require-precompiled-0.1.0.tgz#5a1b52eb70ebed43eb982e974c85ab59571e56fa"
+ integrity sha1-WhtS63Dr7UPrmC6XTIWrWVceVvo=
+
+resolve-cwd@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
+ integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==
+ dependencies:
+ resolve-from "^5.0.0"
+
+resolve-from@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
+ integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
+
+resolve-from@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
+ integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+ integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
+
+resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.0, resolve@^1.3.2, resolve@^1.5.0:
+ version "1.12.2"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.2.tgz#08b12496d9aa8659c75f534a8f05f0d892fff594"
+ integrity sha512-cAVTI2VLHWYsGOirfeYVVQ7ZDejtQ9fp4YhYckWDEkFfqbVjaT11iM8k6xSAfGFMM+gDpZjMnFssPu8we+mqFw==
+ dependencies:
+ path-parse "^1.0.6"
+
+responselike@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
+ integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
+ dependencies:
+ lowercase-keys "^1.0.0"
+
+restore-cursor@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
+ integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368=
+ dependencies:
+ onetime "^2.0.0"
+ signal-exit "^3.0.2"
+
+restore-cursor@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
+ integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
+ dependencies:
+ onetime "^5.1.0"
+ signal-exit "^3.0.2"
+
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+ integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
+
+reusify@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
+ integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
+
+rimraf@2.6.3:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
+ integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
+ dependencies:
+ glob "^7.1.3"
+
+rimraf@^2.6.2, rimraf@^2.6.3:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
+ integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
+ dependencies:
+ glob "^7.1.3"
+
+run-async@^2.2.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
+ integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA=
+ dependencies:
+ is-promise "^2.1.0"
+
+run-parallel@^1.1.9:
+ version "1.1.9"
+ resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
+ integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==
+
+rxjs@^6.4.0:
+ version "6.5.3"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a"
+ integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==
+ dependencies:
+ tslib "^1.9.0"
+
+safe-buffer@^5.0.1:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
+ integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
+
+safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+ dependencies:
+ ret "~0.1.10"
+
+"safer-buffer@>= 2.1.2 < 3":
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+semver-diff@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
+ integrity sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=
+ dependencies:
+ semver "^5.0.3"
+
+"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
+ integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
+
+semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.2.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
+ integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+
+serialize-error@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a"
+ integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=
+
+set-blocking@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+ integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
+
+set-value@^2.0.0, set-value@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
+ integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
+shebang-command@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+ integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
+ dependencies:
+ shebang-regex "^1.0.0"
+
+shebang-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+ integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+
+signal-exit@^3.0.0, signal-exit@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+ integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
+
+slash@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
+ integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==
+
+slash@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
+ integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
+
+slice-ansi@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
+ integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
+ dependencies:
+ ansi-styles "^3.2.0"
+ astral-regex "^1.0.0"
+ is-fullwidth-code-point "^2.0.0"
+
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
+source-map-resolve@^0.5.0:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
+ integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==
+ dependencies:
+ atob "^2.1.1"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-support@^0.5.13:
+ version "0.5.16"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
+ integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map-url@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+ integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
+
+source-map@^0.5.0, source-map@^0.5.6:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
+spawn-wrap@^1.4.2:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.3.tgz#81b7670e170cca247d80bf5faf0cfb713bdcf848"
+ integrity sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==
+ dependencies:
+ foreground-child "^1.5.6"
+ mkdirp "^0.5.0"
+ os-homedir "^1.0.1"
+ rimraf "^2.6.2"
+ signal-exit "^3.0.2"
+ which "^1.3.0"
+
+spdx-correct@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"
+ integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==
+ dependencies:
+ spdx-expression-parse "^3.0.0"
+ spdx-license-ids "^3.0.0"
+
+spdx-exceptions@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977"
+ integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==
+
+spdx-expression-parse@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
+ integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==
+ dependencies:
+ spdx-exceptions "^2.1.0"
+ spdx-license-ids "^3.0.0"
+
+spdx-license-ids@^3.0.0:
+ version "3.0.5"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654"
+ integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==
+
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
+ dependencies:
+ extend-shallow "^3.0.0"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+ integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
+
+stack-utils@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8"
+ integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==
+
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+string-width@^2.0.0, string-width@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+string-width@^3.0.0, string-width@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
+ integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
+ dependencies:
+ emoji-regex "^7.0.1"
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^5.1.0"
+
+string-width@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
+ integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.0"
+
+string.prototype.trimleft@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634"
+ integrity sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+string.prototype.trimright@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz#669d164be9df9b6f7559fa8e89945b168a5a6c58"
+ integrity sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
+ integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+ dependencies:
+ ansi-regex "^4.1.0"
+
+strip-ansi@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
+ integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
+ dependencies:
+ ansi-regex "^5.0.0"
+
+strip-bom-buf@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-2.0.0.tgz#ff9c223937f8e7154b77e9de9bde094186885c15"
+ integrity sha512-gLFNHucd6gzb8jMsl5QmZ3QgnUJmp7qn4uUSHNwEXumAp7YizoGYw19ZUVfuq4aBOQUtyn2k8X/CwzWB73W2lQ==
+ dependencies:
+ is-utf8 "^0.2.1"
+
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+ integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
+
+strip-eof@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
+ integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
+
+strip-indent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
+ integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=
+
+strip-json-comments@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
+ integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
+
+strip-json-comments@~2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+ integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
+
+supertap@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/supertap/-/supertap-1.0.0.tgz#bd9751c7fafd68c68cf8222a29892206a119fa9e"
+ integrity sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA==
+ dependencies:
+ arrify "^1.0.1"
+ indent-string "^3.2.0"
+ js-yaml "^3.10.0"
+ serialize-error "^2.1.0"
+ strip-ansi "^4.0.0"
+
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
+ integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^7.0.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1"
+ integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==
+ dependencies:
+ has-flag "^4.0.0"
+
+symbol-observable@^1.0.4:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
+ integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==
+
+table@^5.2.3:
+ version "5.4.6"
+ resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
+ integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==
+ dependencies:
+ ajv "^6.10.2"
+ lodash "^4.17.14"
+ slice-ansi "^2.1.0"
+ string-width "^3.0.0"
+
+teeny-request@^3.11.3:
+ version "3.11.3"
+ resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-3.11.3.tgz#335c629f7645e5d6599362df2f3230c4cbc23a55"
+ integrity sha512-CKncqSF7sH6p4rzCgkb/z/Pcos5efl0DmolzvlqRQUNcpRIruOhY9+T1FsIlyEbfWd7MsFpodROOwHYh2BaXzw==
+ dependencies:
+ https-proxy-agent "^2.2.1"
+ node-fetch "^2.2.0"
+ uuid "^3.3.2"
+
+term-size@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69"
+ integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=
+ dependencies:
+ execa "^0.7.0"
+
+test-exclude@^5.2.3:
+ version "5.2.3"
+ resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0"
+ integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==
+ dependencies:
+ glob "^7.1.3"
+ minimatch "^3.0.4"
+ read-pkg-up "^4.0.0"
+ require-main-filename "^2.0.0"
+
+text-table@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
+ integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
+
+through@^2.3.6:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+ integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
+
+time-zone@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/time-zone/-/time-zone-1.0.0.tgz#99c5bf55958966af6d06d83bdf3800dc82faec5d"
+ integrity sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=
+
+timed-out@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
+ integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=
+
+tmp@^0.0.33:
+ version "0.0.33"
+ resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
+ integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
+ dependencies:
+ os-tmpdir "~1.0.2"
+
+to-fast-properties@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
+ integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
+ dependencies:
+ kind-of "^3.0.2"
+
+to-readable-stream@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
+ integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
+ dependencies:
+ is-number "^7.0.0"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
+trim-newlines@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20"
+ integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=
+
+trim-off-newlines@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
+ integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM=
+
+trim-right@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
+ integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=
+
+tsd@^0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/tsd/-/tsd-0.11.0.tgz#ede8b8e85850845b753fff7eaaf68dbd3673700b"
+ integrity sha512-klKMNC0KRzUIaLJG8XqkvH/9rKwYX74xpqJBN8spWjYUDojAesd6AfDCT5dray+yhLfTGkem7O3nU6i4KwzNDw==
+ dependencies:
+ eslint-formatter-pretty "^1.3.0"
+ globby "^9.1.0"
+ meow "^5.0.0"
+ path-exists "^3.0.0"
+ read-pkg-up "^4.0.0"
+ update-notifier "^2.5.0"
+
+tslib@^1.9.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
+ integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
+
+type-check@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
+ integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
+ dependencies:
+ prelude-ls "~1.1.2"
+
+type-fest@^0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1"
+ integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==
+
+type-fest@^0.8.0, type-fest@^0.8.1:
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
+ integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
+
+typedarray-to-buffer@^3.1.5:
+ version "3.1.5"
+ resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
+ integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
+ dependencies:
+ is-typedarray "^1.0.0"
+
+uglify-js@^3.1.4:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.0.tgz#14b854003386b7a7c045910f43afbc96d2aa5307"
+ integrity sha512-PC/ee458NEMITe1OufAjal65i6lB58R1HWMRcxwvdz1UopW0DYqlRL3xdu3IcTvTXsB02CRHykidkTRL+A3hQA==
+ dependencies:
+ commander "~2.20.3"
+ source-map "~0.6.1"
+
+uid2@0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82"
+ integrity sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=
+
+unicode-canonical-property-names-ecmascript@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
+ integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==
+
+unicode-match-property-ecmascript@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c"
+ integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==
+ dependencies:
+ unicode-canonical-property-names-ecmascript "^1.0.4"
+ unicode-property-aliases-ecmascript "^1.0.4"
+
+unicode-match-property-value-ecmascript@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277"
+ integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==
+
+unicode-property-aliases-ecmascript@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57"
+ integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==
+
+union-value@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
+ integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^2.0.1"
+
+unique-string@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"
+ integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=
+ dependencies:
+ crypto-random-string "^1.0.0"
+
+unique-temp-dir@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz#6dce95b2681ca003eebfb304a415f9cbabcc5385"
+ integrity sha1-bc6VsmgcoAPuv7MEpBX5y6vMU4U=
+ dependencies:
+ mkdirp "^0.5.1"
+ os-tmpdir "^1.0.1"
+ uid2 "0.0.3"
+
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+unzip-response@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97"
+ integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=
+
+update-notifier@^2.5.0:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6"
+ integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==
+ dependencies:
+ boxen "^1.2.1"
+ chalk "^2.0.1"
+ configstore "^3.0.0"
+ import-lazy "^2.1.0"
+ is-ci "^1.0.10"
+ is-installed-globally "^0.1.0"
+ is-npm "^1.0.0"
+ latest-version "^3.0.0"
+ semver-diff "^2.0.0"
+ xdg-basedir "^3.0.0"
+
+update-notifier@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-3.0.1.tgz#78ecb68b915e2fd1be9f767f6e298ce87b736250"
+ integrity sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ==
+ dependencies:
+ boxen "^3.0.0"
+ chalk "^2.0.1"
+ configstore "^4.0.0"
+ has-yarn "^2.1.0"
+ import-lazy "^2.1.0"
+ is-ci "^2.0.0"
+ is-installed-globally "^0.1.0"
+ is-npm "^3.0.0"
+ is-yarn-global "^0.3.0"
+ latest-version "^5.0.0"
+ semver-diff "^2.0.0"
+ xdg-basedir "^3.0.0"
+
+uri-js@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
+ integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ dependencies:
+ punycode "^2.1.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+ integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
+
+url-parse-lax@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
+ integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=
+ dependencies:
+ prepend-http "^1.0.1"
+
+url-parse-lax@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
+ integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
+ dependencies:
+ prepend-http "^2.0.0"
+
+urlgrey@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f"
+ integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=
+
+use@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
+ integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
+
+uuid@^3.3.2:
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866"
+ integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==
+
+v8-compile-cache@^2.0.3:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e"
+ integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==
+
+validate-npm-package-license@^3.0.1:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
+ integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
+ dependencies:
+ spdx-correct "^3.0.0"
+ spdx-expression-parse "^3.0.0"
+
+wcwidth@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
+ integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=
+ dependencies:
+ defaults "^1.0.3"
+
+well-known-symbols@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/well-known-symbols/-/well-known-symbols-2.0.0.tgz#e9c7c07dbd132b7b84212c8174391ec1f9871ba5"
+ integrity sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==
+
+which-module@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
+ integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
+
+which@^1.2.9, which@^1.3.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+ integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+ dependencies:
+ isexe "^2.0.0"
+
+widest-line@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc"
+ integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==
+ dependencies:
+ string-width "^2.1.1"
+
+word-wrap@~1.2.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
+ integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
+
+wordwrap@~0.0.2:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+ integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
+
+wrap-ansi@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
+ integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==
+ dependencies:
+ ansi-styles "^3.2.0"
+ string-width "^3.0.0"
+ strip-ansi "^5.0.0"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+write-file-atomic@^2.0.0, write-file-atomic@^2.4.2:
+ version "2.4.3"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481"
+ integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==
+ dependencies:
+ graceful-fs "^4.1.11"
+ imurmurhash "^0.1.4"
+ signal-exit "^3.0.2"
+
+write-file-atomic@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.1.tgz#558328352e673b5bb192cf86500d60b230667d4b"
+ integrity sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw==
+ dependencies:
+ imurmurhash "^0.1.4"
+ is-typedarray "^1.0.0"
+ signal-exit "^3.0.2"
+ typedarray-to-buffer "^3.1.5"
+
+write@1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3"
+ integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==
+ dependencies:
+ mkdirp "^0.5.1"
+
+xdg-basedir@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
+ integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=
+
+xtend@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
+ integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
+
+y18n@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
+ integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
+
+yallist@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
+ integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
+
+yargs-parser@^10.0.0:
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8"
+ integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==
+ dependencies:
+ camelcase "^4.1.0"
+
+yargs-parser@^13.0.0, yargs-parser@^13.1.1:
+ version "13.1.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0"
+ integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==
+ dependencies:
+ camelcase "^5.0.0"
+ decamelize "^1.2.0"
+
+yargs@^13.2.2:
+ version "13.3.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83"
+ integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==
+ dependencies:
+ cliui "^5.0.0"
+ find-up "^3.0.0"
+ get-caller-file "^2.0.1"
+ require-directory "^2.1.1"
+ require-main-filename "^2.0.0"
+ set-blocking "^2.0.0"
+ string-width "^3.0.0"
+ which-module "^2.0.0"
+ y18n "^4.0.0"
+ yargs-parser "^13.1.1"
diff --git a/node_modules/@electron/get/package.json b/node_modules/@electron/get/package.json
new file mode 100644
index 0000000..9b292c6
--- /dev/null
+++ b/node_modules/@electron/get/package.json
@@ -0,0 +1,101 @@
+{
+ "name": "@electron/get",
+ "version": "2.0.1",
+ "description": "Utility for downloading artifacts from different versions of Electron",
+ "main": "dist/cjs/index.js",
+ "module": "dist/esm/index.js",
+ "repository": "https://github.com/electron/get",
+ "author": "Samuel Attard",
+ "license": "MIT",
+ "scripts": {
+ "build": "tsc && tsc -p tsconfig.esm.json",
+ "build:docs": "typedoc --out docs",
+ "eslint": "eslint --ext .ts src test",
+ "jest": "jest --coverage",
+ "lint": "npm run prettier && npm run eslint",
+ "prettier": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
+ "prepublishOnly": "npm run build",
+ "test": "npm run lint && npm run jest",
+ "test:nonetwork": "npm run lint && npm run jest -- --testPathIgnorePatterns network.spec"
+ },
+ "files": [
+ "dist/*",
+ "README.md"
+ ],
+ "engines": {
+ "node": ">=12"
+ },
+ "dependencies": {
+ "debug": "^4.1.1",
+ "env-paths": "^2.2.0",
+ "fs-extra": "^8.1.0",
+ "got": "^11.8.5",
+ "progress": "^2.0.3",
+ "semver": "^6.2.0",
+ "sumchecker": "^3.0.1"
+ },
+ "devDependencies": {
+ "@continuous-auth/semantic-release-npm": "^2.0.0",
+ "@types/debug": "^4.1.4",
+ "@types/fs-extra": "^8.0.0",
+ "@types/jest": "^24.0.13",
+ "@types/node": "^12.20.55",
+ "@types/progress": "^2.0.3",
+ "@types/semver": "^6.2.0",
+ "@typescript-eslint/eslint-plugin": "^2.34.0",
+ "@typescript-eslint/parser": "^2.34.0",
+ "eslint": "^6.8.0",
+ "eslint-config-prettier": "^6.15.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-jest": "< 24.0.0",
+ "husky": "^2.3.0",
+ "jest": "^24.8.0",
+ "lint-staged": "^8.1.7",
+ "prettier": "^1.17.1",
+ "ts-jest": "^24.0.0",
+ "typedoc": "^0.17.2",
+ "typescript": "^3.8.0"
+ },
+ "eslintConfig": {
+ "parser": "@typescript-eslint/parser",
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/eslint-recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:jest/recommended",
+ "plugin:import/errors",
+ "plugin:import/warnings",
+ "plugin:import/typescript",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ]
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "*.ts": [
+ "eslint --fix",
+ "prettier --write",
+ "git add"
+ ]
+ },
+ "keywords": [
+ "electron",
+ "download",
+ "prebuild",
+ "get",
+ "artifact",
+ "release"
+ ],
+ "optionalDependencies": {
+ "global-agent": "^3.0.0",
+ "global-tunnel-ng": "^2.7.1"
+ },
+ "resolutions": {
+ "eslint/inquirer": "< 7.3.0",
+ "**/@typescript-eslint/typescript-estree/semver": "^6.3.0"
+ }
+}
diff --git a/node_modules/@electron/universal/README.md b/node_modules/@electron/universal/README.md
new file mode 100644
index 0000000..fe333b2
--- /dev/null
+++ b/node_modules/@electron/universal/README.md
@@ -0,0 +1,36 @@
+# @electron/universal
+
+> Create universal macOS Electron applications
+
+[![CircleCI](https://circleci.com/gh/electron/universal/tree/master.svg?style=svg)](https://circleci.com/gh/electron/universal)
+
+
+## Usage
+
+```typescript
+import { makeUniversalApp } from '@electron/universal';
+
+await makeUniversalApp({
+ x64AppPath: 'path/to/App_x64.app',
+ arm64AppPath: 'path/to/App_arm64.app',
+ outAppPath: 'path/to/App_universal.app',
+});
+```
+
+## FAQ
+
+#### The app is twice as big now, why?
+
+Well, a Universal app isn't anything magical. It is literally the x64 app and
+the arm64 app glued together into a single application. It's twice as big
+because it contains two apps in one.
+
+#### What about native modules?
+
+The way `@electron/universal` works today means you don't need to worry about
+things like building universal versions of your native modules. As long as
+your x64 and arm64 apps work in isolation the Universal app will work as well.
+
+#### How do I build my app for Apple silicon in the first place?
+
+Check out the [Electron Apple silicon blog post](https://www.electronjs.org/blog/apple-silicon)
diff --git a/node_modules/@electron/universal/dist/cjs/asar-utils.d.ts b/node_modules/@electron/universal/dist/cjs/asar-utils.d.ts
new file mode 100644
index 0000000..530b52b
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/asar-utils.d.ts
@@ -0,0 +1,16 @@
+export declare enum AsarMode {
+ NO_ASAR = 0,
+ HAS_ASAR = 1
+}
+export declare type MergeASARsOptions = {
+ x64AsarPath: string;
+ arm64AsarPath: string;
+ outputAsarPath: string;
+ singleArchFiles?: string;
+};
+export declare const detectAsarMode: (appPath: string) => Promise<AsarMode>;
+export declare const generateAsarIntegrity: (asarPath: string) => {
+ algorithm: "SHA256";
+ hash: string;
+};
+export declare const mergeASARs: ({ x64AsarPath, arm64AsarPath, outputAsarPath, singleArchFiles, }: MergeASARsOptions) => Promise<void>;
diff --git a/node_modules/@electron/universal/dist/cjs/asar-utils.js b/node_modules/@electron/universal/dist/cjs/asar-utils.js
new file mode 100644
index 0000000..44028b2
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/asar-utils.js
@@ -0,0 +1,156 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.mergeASARs = exports.generateAsarIntegrity = exports.detectAsarMode = exports.AsarMode = void 0;
+const asar = require("asar");
+const child_process_1 = require("child_process");
+const crypto = require("crypto");
+const fs = require("fs-extra");
+const path = require("path");
+const minimatch = require("minimatch");
+const os = require("os");
+const debug_1 = require("./debug");
+const LIPO = 'lipo';
+var AsarMode;
+(function (AsarMode) {
+ AsarMode[AsarMode["NO_ASAR"] = 0] = "NO_ASAR";
+ AsarMode[AsarMode["HAS_ASAR"] = 1] = "HAS_ASAR";
+})(AsarMode = exports.AsarMode || (exports.AsarMode = {}));
+// See: https://github.com/apple-opensource-mirror/llvmCore/blob/0c60489d96c87140db9a6a14c6e82b15f5e5d252/include/llvm/Object/MachOFormat.h#L108-L112
+const MACHO_MAGIC = new Set([
+ // 32-bit Mach-O
+ 0xfeedface,
+ 0xcefaedfe,
+ // 64-bit Mach-O
+ 0xfeedfacf,
+ 0xcffaedfe,
+]);
+exports.detectAsarMode = async (appPath) => {
+ debug_1.d('checking asar mode of', appPath);
+ const asarPath = path.resolve(appPath, 'Contents', 'Resources', 'app.asar');
+ if (!(await fs.pathExists(asarPath))) {
+ debug_1.d('determined no asar');
+ return AsarMode.NO_ASAR;
+ }
+ debug_1.d('determined has asar');
+ return AsarMode.HAS_ASAR;
+};
+exports.generateAsarIntegrity = (asarPath) => {
+ return {
+ algorithm: 'SHA256',
+ hash: crypto
+ .createHash('SHA256')
+ .update(asar.getRawHeader(asarPath).headerString)
+ .digest('hex'),
+ };
+};
+function toRelativePath(file) {
+ return file.replace(/^\//, '');
+}
+function isDirectory(a, file) {
+ return Boolean('files' in asar.statFile(a, file));
+}
+function checkSingleArch(archive, file, allowList) {
+ if (allowList === undefined || !minimatch(file, allowList, { matchBase: true })) {
+ throw new Error(`Detected unique file "${file}" in "${archive}" not covered by ` +
+ `allowList rule: "${allowList}"`);
+ }
+}
+exports.mergeASARs = async ({ x64AsarPath, arm64AsarPath, outputAsarPath, singleArchFiles, }) => {
+ debug_1.d(`merging ${x64AsarPath} and ${arm64AsarPath}`);
+ const x64Files = new Set(asar.listPackage(x64AsarPath).map(toRelativePath));
+ const arm64Files = new Set(asar.listPackage(arm64AsarPath).map(toRelativePath));
+ //
+ // Build set of unpacked directories and files
+ //
+ const unpackedFiles = new Set();
+ function buildUnpacked(a, fileList) {
+ for (const file of fileList) {
+ const stat = asar.statFile(a, file);
+ if (!('unpacked' in stat) || !stat.unpacked) {
+ continue;
+ }
+ if ('files' in stat) {
+ continue;
+ }
+ unpackedFiles.add(file);
+ }
+ }
+ buildUnpacked(x64AsarPath, x64Files);
+ buildUnpacked(arm64AsarPath, arm64Files);
+ //
+ // Build list of files/directories unique to each asar
+ //
+ for (const file of x64Files) {
+ if (!arm64Files.has(file)) {
+ checkSingleArch(x64AsarPath, file, singleArchFiles);
+ }
+ }
+ const arm64Unique = [];
+ for (const file of arm64Files) {
+ if (!x64Files.has(file)) {
+ checkSingleArch(arm64AsarPath, file, singleArchFiles);
+ arm64Unique.push(file);
+ }
+ }
+ //
+ // Find common bindings with different content
+ //
+ const commonBindings = [];
+ for (const file of x64Files) {
+ if (!arm64Files.has(file)) {
+ continue;
+ }
+ // Skip directories
+ if (isDirectory(x64AsarPath, file)) {
+ continue;
+ }
+ const x64Content = asar.extractFile(x64AsarPath, file);
+ const arm64Content = asar.extractFile(arm64AsarPath, file);
+ if (x64Content.compare(arm64Content) === 0) {
+ continue;
+ }
+ if (!MACHO_MAGIC.has(x64Content.readUInt32LE(0))) {
+ throw new Error(`Can't reconcile two non-macho files ${file}`);
+ }
+ commonBindings.push(file);
+ }
+ //
+ // Extract both
+ //
+ const x64Dir = await fs.mkdtemp(path.join(os.tmpdir(), 'x64-'));
+ const arm64Dir = await fs.mkdtemp(path.join(os.tmpdir(), 'arm64-'));
+ try {
+ debug_1.d(`extracting ${x64AsarPath} to ${x64Dir}`);
+ asar.extractAll(x64AsarPath, x64Dir);
+ debug_1.d(`extracting ${arm64AsarPath} to ${arm64Dir}`);
+ asar.extractAll(arm64AsarPath, arm64Dir);
+ for (const file of arm64Unique) {
+ const source = path.resolve(arm64Dir, file);
+ const destination = path.resolve(x64Dir, file);
+ if (isDirectory(arm64AsarPath, file)) {
+ debug_1.d(`creating unique directory: ${file}`);
+ await fs.mkdirp(destination);
+ continue;
+ }
+ debug_1.d(`xopying unique file: ${file}`);
+ await fs.mkdirp(path.dirname(destination));
+ await fs.copy(source, destination);
+ }
+ for (const binding of commonBindings) {
+ const source = await fs.realpath(path.resolve(arm64Dir, binding));
+ const destination = await fs.realpath(path.resolve(x64Dir, binding));
+ debug_1.d(`merging binding: ${binding}`);
+ child_process_1.execFileSync(LIPO, [source, destination, '-create', '-output', destination]);
+ }
+ debug_1.d(`creating archive at ${outputAsarPath}`);
+ const resolvedUnpack = Array.from(unpackedFiles).map((file) => path.join(x64Dir, file));
+ await asar.createPackageWithOptions(x64Dir, outputAsarPath, {
+ unpack: `{${resolvedUnpack.join(',')}}`,
+ });
+ debug_1.d('done merging');
+ }
+ finally {
+ await Promise.all([fs.remove(x64Dir), fs.remove(arm64Dir)]);
+ }
+};
+//# sourceMappingURL=asar-utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/asar-utils.js.map b/node_modules/@electron/universal/dist/cjs/asar-utils.js.map
new file mode 100644
index 0000000..b089ce8
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/asar-utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"asar-utils.js","sourceRoot":"","sources":["../../src/asar-utils.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,iDAA6C;AAC7C,iCAAiC;AACjC,+BAA+B;AAC/B,6BAA6B;AAC7B,uCAAuC;AACvC,yBAAyB;AACzB,mCAA4B;AAE5B,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6CAAO,CAAA;IACP,+CAAQ,CAAA;AACV,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB;AAUD,qJAAqJ;AACrJ,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,gBAAgB;IAChB,UAAU;IACV,UAAU;IAEV,gBAAgB;IAChB,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IACtD,SAAC,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IAE5E,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE;QACpC,SAAC,CAAC,oBAAoB,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,OAAO,CAAC;KACzB;IAED,SAAC,CAAC,qBAAqB,CAAC,CAAC;IACzB,OAAO,QAAQ,CAAC,QAAQ,CAAC;AAC3B,CAAC,CAAC;AAEW,QAAA,qBAAqB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACxD,OAAO;QACL,SAAS,EAAE,QAAiB;QAC5B,IAAI,EAAE,MAAM;aACT,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC;aAChD,MAAM,CAAC,KAAK,CAAC;KACjB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,WAAW,CAAC,CAAS,EAAE,IAAY;IAC1C,OAAO,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,eAAe,CAAC,OAAe,EAAE,IAAY,EAAE,SAAkB;IACxE,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE;QAC/E,MAAM,IAAI,KAAK,CACb,yBAAyB,IAAI,SAAS,OAAO,mBAAmB;YAC9D,oBAAoB,SAAS,GAAG,CACnC,CAAC;KACH;AACH,CAAC;AAEY,QAAA,UAAU,GAAG,KAAK,EAAE,EAC/B,WAAW,EACX,aAAa,EACb,cAAc,EACd,eAAe,GACG,EAAiB,EAAE;IACrC,SAAC,CAAC,WAAW,WAAW,QAAQ,aAAa,EAAE,CAAC,CAAC;IAEjD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAC5E,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAEhF,EAAE;IACF,8CAA8C;IAC9C,EAAE;IAEF,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;IAExC,SAAS,aAAa,CAAC,CAAS,EAAE,QAAqB;QACrD,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;YAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YAEpC,IAAI,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAC3C,SAAS;aACV;YAED,IAAI,OAAO,IAAI,IAAI,EAAE;gBACnB,SAAS;aACV;YACD,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;IAED,aAAa,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACrC,aAAa,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAEzC,EAAE;IACF,sDAAsD;IACtD,EAAE;IAEF,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,eAAe,CAAC,WAAW,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;SACrD;KACF;IACD,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;QAC7B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACvB,eAAe,CAAC,aAAa,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;YACtD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACxB;KACF;IAED,EAAE;IACF,8CAA8C;IAC9C,EAAE;IAEF,MAAM,cAAc,GAAG,EAAE,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,SAAS;SACV;QAED,mBAAmB;QACnB,IAAI,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE;YAClC,SAAS;SACV;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACvD,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAE3D,IAAI,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;YAC1C,SAAS;SACV;QAED,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE;YAChD,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,EAAE,CAAC,CAAC;SAChE;QAED,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3B;IAED,EAAE;IACF,eAAe;IACf,EAAE;IAEF,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEpE,IAAI;QACF,SAAC,CAAC,cAAc,WAAW,OAAO,MAAM,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAErC,SAAC,CAAC,cAAc,aAAa,OAAO,QAAQ,EAAE,CAAC,CAAC;QAChD,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QAEzC,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE;YAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAE/C,IAAI,WAAW,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE;gBACpC,SAAC,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;gBACxC,MAAM,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;gBAC7B,SAAS;aACV;YAED,SAAC,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC;YAClC,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YAC3C,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;SACpC;QAED,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE;YACpC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;YAClE,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAErE,SAAC,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YACjC,4BAAY,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;SAC9E;QAED,SAAC,CAAC,uBAAuB,cAAc,EAAE,CAAC,CAAC;QAE3C,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAExF,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,cAAc,EAAE;YAC1D,MAAM,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;SACxC,CAAC,CAAC;QAEH,SAAC,CAAC,cAAc,CAAC,CAAC;KACnB;YAAS;QACR,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KAC7D;AACH,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/debug.d.ts b/node_modules/@electron/universal/dist/cjs/debug.d.ts
new file mode 100644
index 0000000..ec24d3b
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/debug.d.ts
@@ -0,0 +1,2 @@
+import * as debug from 'debug';
+export declare const d: debug.Debugger;
diff --git a/node_modules/@electron/universal/dist/cjs/debug.js b/node_modules/@electron/universal/dist/cjs/debug.js
new file mode 100644
index 0000000..f3fccb1
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/debug.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.d = void 0;
+const debug = require("debug");
+exports.d = debug('electron-universal');
+//# sourceMappingURL=debug.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/debug.js.map b/node_modules/@electron/universal/dist/cjs/debug.js.map
new file mode 100644
index 0000000..8256675
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/debug.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAElB,QAAA,CAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/file-utils.d.ts b/node_modules/@electron/universal/dist/cjs/file-utils.d.ts
new file mode 100644
index 0000000..ff08b0e
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/file-utils.d.ts
@@ -0,0 +1,16 @@
+export declare enum AppFileType {
+ MACHO = 0,
+ PLAIN = 1,
+ INFO_PLIST = 2,
+ SNAPSHOT = 3,
+ APP_CODE = 4
+}
+export declare type AppFile = {
+ relativePath: string;
+ type: AppFileType;
+};
+/**
+ *
+ * @param appPath Path to the application
+ */
+export declare const getAllAppFiles: (appPath: string) => Promise<AppFile[]>;
diff --git a/node_modules/@electron/universal/dist/cjs/file-utils.js b/node_modules/@electron/universal/dist/cjs/file-utils.js
new file mode 100644
index 0000000..bed089e
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/file-utils.js
@@ -0,0 +1,71 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getAllAppFiles = exports.AppFileType = void 0;
+const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
+const fs = require("fs-extra");
+const path = require("path");
+const MACHO_PREFIX = 'Mach-O ';
+var AppFileType;
+(function (AppFileType) {
+ AppFileType[AppFileType["MACHO"] = 0] = "MACHO";
+ AppFileType[AppFileType["PLAIN"] = 1] = "PLAIN";
+ AppFileType[AppFileType["INFO_PLIST"] = 2] = "INFO_PLIST";
+ AppFileType[AppFileType["SNAPSHOT"] = 3] = "SNAPSHOT";
+ AppFileType[AppFileType["APP_CODE"] = 4] = "APP_CODE";
+})(AppFileType = exports.AppFileType || (exports.AppFileType = {}));
+/**
+ *
+ * @param appPath Path to the application
+ */
+exports.getAllAppFiles = async (appPath) => {
+ const files = [];
+ const visited = new Set();
+ const traverse = async (p) => {
+ p = await fs.realpath(p);
+ if (visited.has(p))
+ return;
+ visited.add(p);
+ const info = await fs.stat(p);
+ if (info.isSymbolicLink())
+ return;
+ if (info.isFile()) {
+ let fileType = AppFileType.PLAIN;
+ var fileOutput = '';
+ try {
+ fileOutput = await cross_spawn_promise_1.spawn('file', ['--brief', '--no-pad', p]);
+ }
+ catch (e) {
+ if (e instanceof cross_spawn_promise_1.ExitCodeError) {
+ /* silently accept error codes from "file" */
+ }
+ else {
+ throw e;
+ }
+ }
+ if (p.includes('app.asar')) {
+ fileType = AppFileType.APP_CODE;
+ }
+ else if (fileOutput.startsWith(MACHO_PREFIX)) {
+ fileType = AppFileType.MACHO;
+ }
+ else if (p.endsWith('.bin')) {
+ fileType = AppFileType.SNAPSHOT;
+ }
+ else if (path.basename(p) === 'Info.plist') {
+ fileType = AppFileType.INFO_PLIST;
+ }
+ files.push({
+ relativePath: path.relative(appPath, p),
+ type: fileType,
+ });
+ }
+ if (info.isDirectory()) {
+ for (const child of await fs.readdir(p)) {
+ await traverse(path.resolve(p, child));
+ }
+ }
+ };
+ await traverse(appPath);
+ return files;
+};
+//# sourceMappingURL=file-utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/file-utils.js.map b/node_modules/@electron/universal/dist/cjs/file-utils.js.map
new file mode 100644
index 0000000..1ca0c18
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/file-utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../src/file-utils.ts"],"names":[],"mappings":";;;AAAA,qEAAmE;AACnE,+BAA+B;AAC/B,6BAA6B;AAE7B,MAAM,YAAY,GAAG,SAAS,CAAC;AAE/B,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,+CAAK,CAAA;IACL,+CAAK,CAAA;IACL,yDAAU,CAAA;IACV,qDAAQ,CAAA;IACR,qDAAQ,CAAA;AACV,CAAC,EANW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAMtB;AAOD;;;GAGG;AACU,QAAA,cAAc,GAAG,KAAK,EAAE,OAAe,EAAsB,EAAE;IAC1E,MAAM,KAAK,GAAc,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,QAAQ,GAAG,KAAK,EAAE,CAAS,EAAE,EAAE;QACnC,CAAC,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAAE,OAAO;QAC3B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEf,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,cAAc,EAAE;YAAE,OAAO;QAClC,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;YACjB,IAAI,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC;YAEjC,IAAI,UAAU,GAAG,EAAE,CAAC;YACpB,IAAI;gBACF,UAAU,GAAG,MAAM,2BAAK,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;aAC9D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,YAAY,mCAAa,EAAE;oBAC9B,6CAA6C;iBAC9C;qBAAM;oBACL,MAAM,CAAC,CAAC;iBACT;aACF;YACD,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;gBAC1B,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;aACjC;iBAAM,IAAI,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;gBAC9C,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC;aAC9B;iBAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBAC7B,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;aACjC;iBAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE;gBAC5C,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC;aACnC;YAED,KAAK,CAAC,IAAI,CAAC;gBACT,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;gBACvC,IAAI,EAAE,QAAQ;aACf,CAAC,CAAC;SACJ;QAED,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;YACtB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvC,MAAM,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;aACxC;SACF;IACH,CAAC,CAAC;IACF,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC;IAExB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/index.d.ts b/node_modules/@electron/universal/dist/cjs/index.d.ts
new file mode 100644
index 0000000..b4829e1
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/index.d.ts
@@ -0,0 +1,34 @@
+declare type MakeUniversalOpts = {
+ /**
+ * Absolute file system path to the x64 version of your application. E.g. /Foo/bar/MyApp_x64.app
+ */
+ x64AppPath: string;
+ /**
+ * Absolute file system path to the arm64 version of your application. E.g. /Foo/bar/MyApp_arm64.app
+ */
+ arm64AppPath: string;
+ /**
+ * Absolute file system path you want the universal app to be written to. E.g. /Foo/var/MyApp_universal.app
+ *
+ * If this file exists it will be overwritten ONLY if "force" is set to true
+ */
+ outAppPath: string;
+ /**
+ * Forcefully overwrite any existing files that are in the way of generating the universal application
+ */
+ force: boolean;
+ /**
+ * Merge x64 and arm64 ASARs into one.
+ */
+ mergeASARs?: boolean;
+ /**
+ * Minimatch pattern of paths that are allowed to be present in one of the ASAR files, but not in the other.
+ */
+ singleArchFiles?: string;
+ /**
+ * Minimatch pattern of binaries that are expected to be the same x64 binary in both of the ASAR files.
+ */
+ x64ArchFiles?: string;
+};
+export declare const makeUniversalApp: (opts: MakeUniversalOpts) => Promise<void>;
+export {};
diff --git a/node_modules/@electron/universal/dist/cjs/index.js b/node_modules/@electron/universal/dist/cjs/index.js
new file mode 100644
index 0000000..682c5e0
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/index.js
@@ -0,0 +1,228 @@
+"use strict";
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.makeUniversalApp = void 0;
+const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
+const asar = require("asar");
+const fs = require("fs-extra");
+const minimatch = require("minimatch");
+const os = require("os");
+const path = require("path");
+const plist = require("plist");
+const dircompare = require("dir-compare");
+const file_utils_1 = require("./file-utils");
+const asar_utils_1 = require("./asar-utils");
+const sha_1 = require("./sha");
+const debug_1 = require("./debug");
+const dupedFiles = (files) => files.filter((f) => f.type !== file_utils_1.AppFileType.SNAPSHOT && f.type !== file_utils_1.AppFileType.APP_CODE);
+exports.makeUniversalApp = async (opts) => {
+ debug_1.d('making a universal app with options', opts);
+ if (process.platform !== 'darwin')
+ throw new Error('@electron/universal is only supported on darwin platforms');
+ if (!opts.x64AppPath || !path.isAbsolute(opts.x64AppPath))
+ throw new Error('Expected opts.x64AppPath to be an absolute path but it was not');
+ if (!opts.arm64AppPath || !path.isAbsolute(opts.arm64AppPath))
+ throw new Error('Expected opts.arm64AppPath to be an absolute path but it was not');
+ if (!opts.outAppPath || !path.isAbsolute(opts.outAppPath))
+ throw new Error('Expected opts.outAppPath to be an absolute path but it was not');
+ if (await fs.pathExists(opts.outAppPath)) {
+ debug_1.d('output path exists already');
+ if (!opts.force) {
+ throw new Error(`The out path "${opts.outAppPath}" already exists and force is not set to true`);
+ }
+ else {
+ debug_1.d('overwriting existing application because force == true');
+ await fs.remove(opts.outAppPath);
+ }
+ }
+ const x64AsarMode = await asar_utils_1.detectAsarMode(opts.x64AppPath);
+ const arm64AsarMode = await asar_utils_1.detectAsarMode(opts.arm64AppPath);
+ debug_1.d('detected x64AsarMode =', x64AsarMode);
+ debug_1.d('detected arm64AsarMode =', arm64AsarMode);
+ if (x64AsarMode !== arm64AsarMode)
+ throw new Error('Both the x64 and arm64 versions of your application need to have been built with the same asar settings (enabled vs disabled)');
+ const tmpDir = await fs.mkdtemp(path.resolve(os.tmpdir(), 'electron-universal-'));
+ debug_1.d('building universal app in', tmpDir);
+ try {
+ debug_1.d('copying x64 app as starter template');
+ const tmpApp = path.resolve(tmpDir, 'Tmp.app');
+ await cross_spawn_promise_1.spawn('cp', ['-R', opts.x64AppPath, tmpApp]);
+ const uniqueToX64 = [];
+ const uniqueToArm64 = [];
+ const x64Files = await file_utils_1.getAllAppFiles(await fs.realpath(tmpApp));
+ const arm64Files = await file_utils_1.getAllAppFiles(await fs.realpath(opts.arm64AppPath));
+ for (const file of dupedFiles(x64Files)) {
+ if (!arm64Files.some((f) => f.relativePath === file.relativePath))
+ uniqueToX64.push(file.relativePath);
+ }
+ for (const file of dupedFiles(arm64Files)) {
+ if (!x64Files.some((f) => f.relativePath === file.relativePath))
+ uniqueToArm64.push(file.relativePath);
+ }
+ if (uniqueToX64.length !== 0 || uniqueToArm64.length !== 0) {
+ debug_1.d('some files were not in both builds, aborting');
+ console.error({
+ uniqueToX64,
+ uniqueToArm64,
+ });
+ throw new Error('While trying to merge mach-o files across your apps we found a mismatch, the number of mach-o files is not the same between the arm64 and x64 builds');
+ }
+ for (const file of x64Files.filter((f) => f.type === file_utils_1.AppFileType.PLAIN)) {
+ const x64Sha = await sha_1.sha(path.resolve(opts.x64AppPath, file.relativePath));
+ const arm64Sha = await sha_1.sha(path.resolve(opts.arm64AppPath, file.relativePath));
+ if (x64Sha !== arm64Sha) {
+ debug_1.d('SHA for file', file.relativePath, `does not match across builds ${x64Sha}!=${arm64Sha}`);
+ // The MainMenu.nib files generated by Xcode13 are deterministic in effect but not deterministic in generated sequence
+ if (path.basename(path.dirname(file.relativePath)) === 'MainMenu.nib') {
+ // The mismatch here is OK so we just move on to the next one
+ continue;
+ }
+ throw new Error(`Expected all non-binary files to have identical SHAs when creating a universal build but "${file.relativePath}" did not`);
+ }
+ }
+ for (const machOFile of x64Files.filter((f) => f.type === file_utils_1.AppFileType.MACHO)) {
+ const first = await fs.realpath(path.resolve(tmpApp, machOFile.relativePath));
+ const second = await fs.realpath(path.resolve(opts.arm64AppPath, machOFile.relativePath));
+ const x64Sha = await sha_1.sha(path.resolve(opts.x64AppPath, machOFile.relativePath));
+ const arm64Sha = await sha_1.sha(path.resolve(opts.arm64AppPath, machOFile.relativePath));
+ if (x64Sha === arm64Sha) {
+ if (opts.x64ArchFiles === undefined ||
+ !minimatch(machOFile.relativePath, opts.x64ArchFiles, { matchBase: true })) {
+ throw new Error(`Detected file "${machOFile.relativePath}" that's the same in both x64 and arm64 builds and not covered by the ` +
+ `x64ArchFiles rule: "${opts.x64ArchFiles}"`);
+ }
+ debug_1.d('SHA for Mach-O file', machOFile.relativePath, `matches across builds ${x64Sha}===${arm64Sha}, skipping lipo`);
+ continue;
+ }
+ debug_1.d('joining two MachO files with lipo', {
+ first,
+ second,
+ });
+ await cross_spawn_promise_1.spawn('lipo', [
+ first,
+ second,
+ '-create',
+ '-output',
+ await fs.realpath(path.resolve(tmpApp, machOFile.relativePath)),
+ ]);
+ }
+ /**
+ * If we don't have an ASAR we need to check if the two "app" folders are identical, if
+ * they are then we can just leave one there and call it a day. If the app folders for x64
+ * and arm64 are different though we need to rename each folder and create a new fake "app"
+ * entrypoint to dynamically load the correct app folder
+ */
+ if (x64AsarMode === asar_utils_1.AsarMode.NO_ASAR) {
+ debug_1.d('checking if the x64 and arm64 app folders are identical');
+ const comparison = await dircompare.compare(path.resolve(tmpApp, 'Contents', 'Resources', 'app'), path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app'), { compareSize: true, compareContent: true });
+ if (!comparison.same) {
+ debug_1.d('x64 and arm64 app folders are different, creating dynamic entry ASAR');
+ await fs.move(path.resolve(tmpApp, 'Contents', 'Resources', 'app'), path.resolve(tmpApp, 'Contents', 'Resources', 'app-x64'));
+ await fs.copy(path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app'), path.resolve(tmpApp, 'Contents', 'Resources', 'app-arm64'));
+ const entryAsar = path.resolve(tmpDir, 'entry-asar');
+ await fs.mkdir(entryAsar);
+ await fs.copy(path.resolve(__dirname, '..', '..', 'entry-asar', 'no-asar.js'), path.resolve(entryAsar, 'index.js'));
+ let pj = await fs.readJson(path.resolve(opts.x64AppPath, 'Contents', 'Resources', 'app', 'package.json'));
+ pj.main = 'index.js';
+ await fs.writeJson(path.resolve(entryAsar, 'package.json'), pj);
+ await asar.createPackage(entryAsar, path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'));
+ }
+ else {
+ debug_1.d('x64 and arm64 app folders are the same');
+ }
+ }
+ const generatedIntegrity = {};
+ let didSplitAsar = false;
+ /**
+ * If we have an ASAR we just need to check if the two "app.asar" files have the same hash,
+ * if they are, same as above, we can leave one there and call it a day. If they're different
+ * we have to make a dynamic entrypoint. There is an assumption made here that every file in
+ * app.asar.unpacked is a native node module. This assumption _may_ not be true so we should
+ * look at codifying that assumption as actual logic.
+ */
+ // FIXME: Codify the assumption that app.asar.unpacked only contains native modules
+ if (x64AsarMode === asar_utils_1.AsarMode.HAS_ASAR && opts.mergeASARs) {
+ debug_1.d('merging x64 and arm64 asars');
+ const output = path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar');
+ await asar_utils_1.mergeASARs({
+ x64AsarPath: path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'),
+ arm64AsarPath: path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar'),
+ outputAsarPath: output,
+ singleArchFiles: opts.singleArchFiles,
+ });
+ generatedIntegrity['Resources/app.asar'] = asar_utils_1.generateAsarIntegrity(output);
+ }
+ else if (x64AsarMode === asar_utils_1.AsarMode.HAS_ASAR) {
+ debug_1.d('checking if the x64 and arm64 asars are identical');
+ const x64AsarSha = await sha_1.sha(path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'));
+ const arm64AsarSha = await sha_1.sha(path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar'));
+ if (x64AsarSha !== arm64AsarSha) {
+ didSplitAsar = true;
+ debug_1.d('x64 and arm64 asars are different');
+ const x64AsarPath = path.resolve(tmpApp, 'Contents', 'Resources', 'app-x64.asar');
+ await fs.move(path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'), x64AsarPath);
+ const x64Unpacked = path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar.unpacked');
+ if (await fs.pathExists(x64Unpacked)) {
+ await fs.move(x64Unpacked, path.resolve(tmpApp, 'Contents', 'Resources', 'app-x64.asar.unpacked'));
+ }
+ const arm64AsarPath = path.resolve(tmpApp, 'Contents', 'Resources', 'app-arm64.asar');
+ await fs.copy(path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar'), arm64AsarPath);
+ const arm64Unpacked = path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar.unpacked');
+ if (await fs.pathExists(arm64Unpacked)) {
+ await fs.copy(arm64Unpacked, path.resolve(tmpApp, 'Contents', 'Resources', 'app-arm64.asar.unpacked'));
+ }
+ const entryAsar = path.resolve(tmpDir, 'entry-asar');
+ await fs.mkdir(entryAsar);
+ await fs.copy(path.resolve(__dirname, '..', '..', 'entry-asar', 'has-asar.js'), path.resolve(entryAsar, 'index.js'));
+ let pj = JSON.parse((await asar.extractFile(path.resolve(opts.x64AppPath, 'Contents', 'Resources', 'app.asar'), 'package.json')).toString('utf8'));
+ pj.main = 'index.js';
+ await fs.writeJson(path.resolve(entryAsar, 'package.json'), pj);
+ const asarPath = path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar');
+ await asar.createPackage(entryAsar, asarPath);
+ generatedIntegrity['Resources/app.asar'] = asar_utils_1.generateAsarIntegrity(asarPath);
+ generatedIntegrity['Resources/app-x64.asar'] = asar_utils_1.generateAsarIntegrity(x64AsarPath);
+ generatedIntegrity['Resources/app-arm64.asar'] = asar_utils_1.generateAsarIntegrity(arm64AsarPath);
+ }
+ else {
+ debug_1.d('x64 and arm64 asars are the same');
+ generatedIntegrity['Resources/app.asar'] = asar_utils_1.generateAsarIntegrity(path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'));
+ }
+ }
+ const plistFiles = x64Files.filter((f) => f.type === file_utils_1.AppFileType.INFO_PLIST);
+ for (const plistFile of plistFiles) {
+ const x64PlistPath = path.resolve(opts.x64AppPath, plistFile.relativePath);
+ const arm64PlistPath = path.resolve(opts.arm64AppPath, plistFile.relativePath);
+ const _a = plist.parse(await fs.readFile(x64PlistPath, 'utf8')), { ElectronAsarIntegrity: x64Integrity } = _a, x64Plist = __rest(_a, ["ElectronAsarIntegrity"]);
+ const _b = plist.parse(await fs.readFile(arm64PlistPath, 'utf8')), { ElectronAsarIntegrity: arm64Integrity } = _b, arm64Plist = __rest(_b, ["ElectronAsarIntegrity"]);
+ if (JSON.stringify(x64Plist) !== JSON.stringify(arm64Plist)) {
+ throw new Error(`Expected all Info.plist files to be identical when ignoring integrity when creating a universal build but "${plistFile.relativePath}" was not`);
+ }
+ const mergedPlist = Object.assign(Object.assign({}, x64Plist), { ElectronAsarIntegrity: generatedIntegrity });
+ await fs.writeFile(path.resolve(tmpApp, plistFile.relativePath), plist.build(mergedPlist));
+ }
+ for (const snapshotsFile of arm64Files.filter((f) => f.type === file_utils_1.AppFileType.SNAPSHOT)) {
+ debug_1.d('copying snapshot file', snapshotsFile.relativePath, 'to target application');
+ await fs.copy(path.resolve(opts.arm64AppPath, snapshotsFile.relativePath), path.resolve(tmpApp, snapshotsFile.relativePath));
+ }
+ debug_1.d('moving final universal app to target destination');
+ await fs.mkdirp(path.dirname(opts.outAppPath));
+ await cross_spawn_promise_1.spawn('mv', [tmpApp, opts.outAppPath]);
+ }
+ catch (err) {
+ throw err;
+ }
+ finally {
+ await fs.remove(tmpDir);
+ }
+};
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/index.js.map b/node_modules/@electron/universal/dist/cjs/index.js.map
new file mode 100644
index 0000000..5833db5
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qEAAoD;AACpD,6BAA6B;AAE7B,+BAA+B;AAC/B,uCAAuC;AACvC,yBAAyB;AACzB,6BAA6B;AAC7B,+BAA+B;AAC/B,0CAA0C;AAE1C,6CAAoE;AACpE,6CAA2F;AAC3F,+BAA4B;AAC5B,mCAA4B;AAmC5B,MAAM,UAAU,GAAG,CAAC,KAAgB,EAAE,EAAE,CACtC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,wBAAW,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,wBAAW,CAAC,QAAQ,CAAC,CAAC;AAE7E,QAAA,gBAAgB,GAAG,KAAK,EAAE,IAAuB,EAAiB,EAAE;IAC/E,SAAC,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;IAE/C,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAC/B,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/E,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IACtF,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IAEpF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;QACxC,SAAC,CAAC,4BAA4B,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,MAAM,IAAI,KAAK,CACb,iBAAiB,IAAI,CAAC,UAAU,+CAA+C,CAChF,CAAC;SACH;aAAM;YACL,SAAC,CAAC,wDAAwD,CAAC,CAAC;YAC5D,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAClC;KACF;IAED,MAAM,WAAW,GAAG,MAAM,2BAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1D,MAAM,aAAa,GAAG,MAAM,2BAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9D,SAAC,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;IACzC,SAAC,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAC;IAE7C,IAAI,WAAW,KAAK,aAAa;QAC/B,MAAM,IAAI,KAAK,CACb,+HAA+H,CAChI,CAAC;IAEJ,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAClF,SAAC,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;IAEvC,IAAI;QACF,SAAC,CAAC,qCAAqC,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC/C,MAAM,2BAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;QAEnD,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,MAAM,2BAAc,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QACjE,MAAM,UAAU,GAAG,MAAM,2BAAc,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAE9E,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;YACvC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY,CAAC;gBAC/D,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACvC;QACD,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY,CAAC;gBAC7D,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACzC;QACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1D,SAAC,CAAC,8CAA8C,CAAC,CAAC;YAClD,OAAO,CAAC,KAAK,CAAC;gBACZ,WAAW;gBACX,aAAa;aACd,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CACb,sJAAsJ,CACvJ,CAAC;SACH;QAED,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,wBAAW,CAAC,KAAK,CAAC,EAAE;YACvE,MAAM,MAAM,GAAG,MAAM,SAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC3E,MAAM,QAAQ,GAAG,MAAM,SAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC/E,IAAI,MAAM,KAAK,QAAQ,EAAE;gBACvB,SAAC,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,gCAAgC,MAAM,KAAK,QAAQ,EAAE,CAAC,CAAC;gBAC5F,sHAAsH;gBACtH,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,cAAc,EAAE;oBACrE,6DAA6D;oBAC7D,SAAS;iBACV;gBACD,MAAM,IAAI,KAAK,CACb,6FAA6F,IAAI,CAAC,YAAY,WAAW,CAC1H,CAAC;aACH;SACF;QAED,KAAK,MAAM,SAAS,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,wBAAW,CAAC,KAAK,CAAC,EAAE;YAC5E,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YAC9E,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YAE1F,MAAM,MAAM,GAAG,MAAM,SAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YAChF,MAAM,QAAQ,GAAG,MAAM,SAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YACpF,IAAI,MAAM,KAAK,QAAQ,EAAE;gBACvB,IACE,IAAI,CAAC,YAAY,KAAK,SAAS;oBAC/B,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAC1E;oBACA,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,CAAC,YAAY,wEAAwE;wBAC9G,uBAAuB,IAAI,CAAC,YAAY,GAAG,CAC9C,CAAC;iBACH;gBAED,SAAC,CACC,qBAAqB,EACrB,SAAS,CAAC,YAAY,EACtB,yBAAyB,MAAM,MAAM,QAAQ,iBAAiB,CAC/D,CAAC;gBACF,SAAS;aACV;YAED,SAAC,CAAC,mCAAmC,EAAE;gBACrC,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;YACH,MAAM,2BAAK,CAAC,MAAM,EAAE;gBAClB,KAAK;gBACL,MAAM;gBACN,SAAS;gBACT,SAAS;gBACT,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;aAChE,CAAC,CAAC;SACJ;QAED;;;;;WAKG;QACH,IAAI,WAAW,KAAK,qBAAQ,CAAC,OAAO,EAAE;YACpC,SAAC,CAAC,yDAAyD,CAAC,CAAC;YAC7D,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,OAAO,CACzC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EAC/D,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAC5C,CAAC;YAEF,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;gBACpB,SAAC,CAAC,sEAAsE,CAAC,CAAC;gBAC1E,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EACpD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC,CACzD,CAAC;gBACF,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EAC/D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC,CAC3D,CAAC;gBAEF,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBACrD,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC1B,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC,EAC/D,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CACpC,CAAC;gBACF,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,QAAQ,CACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,CAAC,CAC9E,CAAC;gBACF,EAAE,CAAC,IAAI,GAAG,UAAU,CAAC;gBACrB,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;gBAChE,MAAM,IAAI,CAAC,aAAa,CACtB,SAAS,EACT,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAC1D,CAAC;aACH;iBAAM;gBACL,SAAC,CAAC,wCAAwC,CAAC,CAAC;aAC7C;SACF;QAED,MAAM,kBAAkB,GAA0D,EAAE,CAAC;QACrF,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB;;;;;;WAMG;QACH,mFAAmF;QACnF,IAAI,WAAW,KAAK,qBAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;YACxD,SAAC,CAAC,6BAA6B,CAAC,CAAC;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;YACzE,MAAM,uBAAU,CAAC;gBACf,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;gBACtE,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;gBACnF,cAAc,EAAE,MAAM;gBACtB,eAAe,EAAE,IAAI,CAAC,eAAe;aACtC,CAAC,CAAC;YAEH,kBAAkB,CAAC,oBAAoB,CAAC,GAAG,kCAAqB,CAAC,MAAM,CAAC,CAAC;SAC1E;aAAM,IAAI,WAAW,KAAK,qBAAQ,CAAC,QAAQ,EAAE;YAC5C,SAAC,CAAC,mDAAmD,CAAC,CAAC;YACvD,MAAM,UAAU,GAAG,MAAM,SAAG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;YACxF,MAAM,YAAY,GAAG,MAAM,SAAG,CAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CACrE,CAAC;YAEF,IAAI,UAAU,KAAK,YAAY,EAAE;gBAC/B,YAAY,GAAG,IAAI,CAAC;gBACpB,SAAC,CAAC,mCAAmC,CAAC,CAAC;gBACvC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;gBAClF,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC;gBACtF,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC;gBACvF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;oBACpC,MAAM,EAAE,CAAC,IAAI,CACX,WAAW,EACX,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,uBAAuB,CAAC,CACvE,CAAC;iBACH;gBAED,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;gBACtF,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EACpE,aAAa,CACd,CAAC;gBACF,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAChC,IAAI,CAAC,YAAY,EACjB,UAAU,EACV,WAAW,EACX,mBAAmB,CACpB,CAAC;gBACF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;oBACtC,MAAM,EAAE,CAAC,IAAI,CACX,aAAa,EACb,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAyB,CAAC,CACzE,CAAC;iBACH;gBAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBACrD,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC1B,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC,EAChE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CACpC,CAAC;gBACF,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CACjB,CACE,MAAM,IAAI,CAAC,WAAW,CACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EAClE,cAAc,CACf,CACF,CAAC,QAAQ,CAAC,MAAM,CAAC,CACnB,CAAC;gBACF,EAAE,CAAC,IAAI,GAAG,UAAU,CAAC;gBACrB,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;gBAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;gBAC3E,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAE9C,kBAAkB,CAAC,oBAAoB,CAAC,GAAG,kCAAqB,CAAC,QAAQ,CAAC,CAAC;gBAC3E,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,kCAAqB,CAAC,WAAW,CAAC,CAAC;gBAClF,kBAAkB,CAAC,0BAA0B,CAAC,GAAG,kCAAqB,CAAC,aAAa,CAAC,CAAC;aACvF;iBAAM;gBACL,SAAC,CAAC,kCAAkC,CAAC,CAAC;gBACtC,kBAAkB,CAAC,oBAAoB,CAAC,GAAG,kCAAqB,CAC9D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAC1D,CAAC;aACH;SACF;QAED,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,wBAAW,CAAC,UAAU,CAAC,CAAC;QAC7E,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;YAC3E,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;YAE/E,MAAM,KAAuD,KAAK,CAAC,KAAK,CACtE,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,CACjC,EAFF,EAAE,qBAAqB,EAAE,YAAY,OAEnC,EAFwC,QAAQ,cAAlD,yBAAoD,CAElD,CAAC;YACT,MAAM,KAA2D,KAAK,CAAC,KAAK,CAC1E,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,CACnC,EAFF,EAAE,qBAAqB,EAAE,cAAc,OAErC,EAF0C,UAAU,cAAtD,yBAAwD,CAEtD,CAAC;YACT,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE;gBAC3D,MAAM,IAAI,KAAK,CACb,8GAA8G,SAAS,CAAC,YAAY,WAAW,CAChJ,CAAC;aACH;YAED,MAAM,WAAW,mCAAQ,QAAQ,KAAE,qBAAqB,EAAE,kBAAkB,GAAE,CAAC;YAE/E,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;SAC5F;QAED,KAAK,MAAM,aAAa,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,wBAAW,CAAC,QAAQ,CAAC,EAAE;YACrF,SAAC,CAAC,uBAAuB,EAAE,aAAa,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC;YAChF,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,EAC3D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CACjD,CAAC;SACH;QAED,SAAC,CAAC,kDAAkD,CAAC,CAAC;QACtD,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,MAAM,2BAAK,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;KAC9C;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,GAAG,CAAC;KACX;YAAS;QACR,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KACzB;AACH,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/sha.d.ts b/node_modules/@electron/universal/dist/cjs/sha.d.ts
new file mode 100644
index 0000000..1c0daaa
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/sha.d.ts
@@ -0,0 +1 @@
+export declare const sha: (filePath: string) => Promise<any>;
diff --git a/node_modules/@electron/universal/dist/cjs/sha.js b/node_modules/@electron/universal/dist/cjs/sha.js
new file mode 100644
index 0000000..801fe61
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/sha.js
@@ -0,0 +1,19 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.sha = void 0;
+const fs = require("fs-extra");
+const crypto = require("crypto");
+const debug_1 = require("./debug");
+exports.sha = async (filePath) => {
+ debug_1.d('hashing', filePath);
+ const hash = crypto.createHash('sha256');
+ hash.setEncoding('hex');
+ const fileStream = fs.createReadStream(filePath);
+ fileStream.pipe(hash);
+ await new Promise((resolve, reject) => {
+ fileStream.on('end', () => resolve());
+ fileStream.on('error', (err) => reject(err));
+ });
+ return hash.read();
+};
+//# sourceMappingURL=sha.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/cjs/sha.js.map b/node_modules/@electron/universal/dist/cjs/sha.js.map
new file mode 100644
index 0000000..3bfffd8
--- /dev/null
+++ b/node_modules/@electron/universal/dist/cjs/sha.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sha.js","sourceRoot":"","sources":["../../src/sha.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAiC;AACjC,mCAA4B;AAEf,QAAA,GAAG,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE;IAC5C,SAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvB,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxB,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACjD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QACtC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/asar-utils.d.ts b/node_modules/@electron/universal/dist/esm/asar-utils.d.ts
new file mode 100644
index 0000000..530b52b
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/asar-utils.d.ts
@@ -0,0 +1,16 @@
+export declare enum AsarMode {
+ NO_ASAR = 0,
+ HAS_ASAR = 1
+}
+export declare type MergeASARsOptions = {
+ x64AsarPath: string;
+ arm64AsarPath: string;
+ outputAsarPath: string;
+ singleArchFiles?: string;
+};
+export declare const detectAsarMode: (appPath: string) => Promise<AsarMode>;
+export declare const generateAsarIntegrity: (asarPath: string) => {
+ algorithm: "SHA256";
+ hash: string;
+};
+export declare const mergeASARs: ({ x64AsarPath, arm64AsarPath, outputAsarPath, singleArchFiles, }: MergeASARsOptions) => Promise<void>;
diff --git a/node_modules/@electron/universal/dist/esm/asar-utils.js b/node_modules/@electron/universal/dist/esm/asar-utils.js
new file mode 100644
index 0000000..94bb3bf
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/asar-utils.js
@@ -0,0 +1,153 @@
+import * as asar from 'asar';
+import { execFileSync } from 'child_process';
+import * as crypto from 'crypto';
+import * as fs from 'fs-extra';
+import * as path from 'path';
+import * as minimatch from 'minimatch';
+import * as os from 'os';
+import { d } from './debug';
+const LIPO = 'lipo';
+export var AsarMode;
+(function (AsarMode) {
+ AsarMode[AsarMode["NO_ASAR"] = 0] = "NO_ASAR";
+ AsarMode[AsarMode["HAS_ASAR"] = 1] = "HAS_ASAR";
+})(AsarMode || (AsarMode = {}));
+// See: https://github.com/apple-opensource-mirror/llvmCore/blob/0c60489d96c87140db9a6a14c6e82b15f5e5d252/include/llvm/Object/MachOFormat.h#L108-L112
+const MACHO_MAGIC = new Set([
+ // 32-bit Mach-O
+ 0xfeedface,
+ 0xcefaedfe,
+ // 64-bit Mach-O
+ 0xfeedfacf,
+ 0xcffaedfe,
+]);
+export const detectAsarMode = async (appPath) => {
+ d('checking asar mode of', appPath);
+ const asarPath = path.resolve(appPath, 'Contents', 'Resources', 'app.asar');
+ if (!(await fs.pathExists(asarPath))) {
+ d('determined no asar');
+ return AsarMode.NO_ASAR;
+ }
+ d('determined has asar');
+ return AsarMode.HAS_ASAR;
+};
+export const generateAsarIntegrity = (asarPath) => {
+ return {
+ algorithm: 'SHA256',
+ hash: crypto
+ .createHash('SHA256')
+ .update(asar.getRawHeader(asarPath).headerString)
+ .digest('hex'),
+ };
+};
+function toRelativePath(file) {
+ return file.replace(/^\//, '');
+}
+function isDirectory(a, file) {
+ return Boolean('files' in asar.statFile(a, file));
+}
+function checkSingleArch(archive, file, allowList) {
+ if (allowList === undefined || !minimatch(file, allowList, { matchBase: true })) {
+ throw new Error(`Detected unique file "${file}" in "${archive}" not covered by ` +
+ `allowList rule: "${allowList}"`);
+ }
+}
+export const mergeASARs = async ({ x64AsarPath, arm64AsarPath, outputAsarPath, singleArchFiles, }) => {
+ d(`merging ${x64AsarPath} and ${arm64AsarPath}`);
+ const x64Files = new Set(asar.listPackage(x64AsarPath).map(toRelativePath));
+ const arm64Files = new Set(asar.listPackage(arm64AsarPath).map(toRelativePath));
+ //
+ // Build set of unpacked directories and files
+ //
+ const unpackedFiles = new Set();
+ function buildUnpacked(a, fileList) {
+ for (const file of fileList) {
+ const stat = asar.statFile(a, file);
+ if (!('unpacked' in stat) || !stat.unpacked) {
+ continue;
+ }
+ if ('files' in stat) {
+ continue;
+ }
+ unpackedFiles.add(file);
+ }
+ }
+ buildUnpacked(x64AsarPath, x64Files);
+ buildUnpacked(arm64AsarPath, arm64Files);
+ //
+ // Build list of files/directories unique to each asar
+ //
+ for (const file of x64Files) {
+ if (!arm64Files.has(file)) {
+ checkSingleArch(x64AsarPath, file, singleArchFiles);
+ }
+ }
+ const arm64Unique = [];
+ for (const file of arm64Files) {
+ if (!x64Files.has(file)) {
+ checkSingleArch(arm64AsarPath, file, singleArchFiles);
+ arm64Unique.push(file);
+ }
+ }
+ //
+ // Find common bindings with different content
+ //
+ const commonBindings = [];
+ for (const file of x64Files) {
+ if (!arm64Files.has(file)) {
+ continue;
+ }
+ // Skip directories
+ if (isDirectory(x64AsarPath, file)) {
+ continue;
+ }
+ const x64Content = asar.extractFile(x64AsarPath, file);
+ const arm64Content = asar.extractFile(arm64AsarPath, file);
+ if (x64Content.compare(arm64Content) === 0) {
+ continue;
+ }
+ if (!MACHO_MAGIC.has(x64Content.readUInt32LE(0))) {
+ throw new Error(`Can't reconcile two non-macho files ${file}`);
+ }
+ commonBindings.push(file);
+ }
+ //
+ // Extract both
+ //
+ const x64Dir = await fs.mkdtemp(path.join(os.tmpdir(), 'x64-'));
+ const arm64Dir = await fs.mkdtemp(path.join(os.tmpdir(), 'arm64-'));
+ try {
+ d(`extracting ${x64AsarPath} to ${x64Dir}`);
+ asar.extractAll(x64AsarPath, x64Dir);
+ d(`extracting ${arm64AsarPath} to ${arm64Dir}`);
+ asar.extractAll(arm64AsarPath, arm64Dir);
+ for (const file of arm64Unique) {
+ const source = path.resolve(arm64Dir, file);
+ const destination = path.resolve(x64Dir, file);
+ if (isDirectory(arm64AsarPath, file)) {
+ d(`creating unique directory: ${file}`);
+ await fs.mkdirp(destination);
+ continue;
+ }
+ d(`xopying unique file: ${file}`);
+ await fs.mkdirp(path.dirname(destination));
+ await fs.copy(source, destination);
+ }
+ for (const binding of commonBindings) {
+ const source = await fs.realpath(path.resolve(arm64Dir, binding));
+ const destination = await fs.realpath(path.resolve(x64Dir, binding));
+ d(`merging binding: ${binding}`);
+ execFileSync(LIPO, [source, destination, '-create', '-output', destination]);
+ }
+ d(`creating archive at ${outputAsarPath}`);
+ const resolvedUnpack = Array.from(unpackedFiles).map((file) => path.join(x64Dir, file));
+ await asar.createPackageWithOptions(x64Dir, outputAsarPath, {
+ unpack: `{${resolvedUnpack.join(',')}}`,
+ });
+ d('done merging');
+ }
+ finally {
+ await Promise.all([fs.remove(x64Dir), fs.remove(arm64Dir)]);
+ }
+};
+//# sourceMappingURL=asar-utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/asar-utils.js.map b/node_modules/@electron/universal/dist/esm/asar-utils.js.map
new file mode 100644
index 0000000..f4342d1
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/asar-utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"asar-utils.js","sourceRoot":"","sources":["../../src/asar-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,SAAS,CAAC;AAE5B,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6CAAO,CAAA;IACP,+CAAQ,CAAA;AACV,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAUD,qJAAqJ;AACrJ,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,gBAAgB;IAChB,UAAU;IACV,UAAU;IAEV,gBAAgB;IAChB,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IACtD,CAAC,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IAE5E,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE;QACpC,CAAC,CAAC,oBAAoB,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,OAAO,CAAC;KACzB;IAED,CAAC,CAAC,qBAAqB,CAAC,CAAC;IACzB,OAAO,QAAQ,CAAC,QAAQ,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACxD,OAAO;QACL,SAAS,EAAE,QAAiB;QAC5B,IAAI,EAAE,MAAM;aACT,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC;aAChD,MAAM,CAAC,KAAK,CAAC;KACjB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,WAAW,CAAC,CAAS,EAAE,IAAY;IAC1C,OAAO,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,eAAe,CAAC,OAAe,EAAE,IAAY,EAAE,SAAkB;IACxE,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE;QAC/E,MAAM,IAAI,KAAK,CACb,yBAAyB,IAAI,SAAS,OAAO,mBAAmB;YAC9D,oBAAoB,SAAS,GAAG,CACnC,CAAC;KACH;AACH,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,EAC/B,WAAW,EACX,aAAa,EACb,cAAc,EACd,eAAe,GACG,EAAiB,EAAE;IACrC,CAAC,CAAC,WAAW,WAAW,QAAQ,aAAa,EAAE,CAAC,CAAC;IAEjD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAC5E,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAEhF,EAAE;IACF,8CAA8C;IAC9C,EAAE;IAEF,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;IAExC,SAAS,aAAa,CAAC,CAAS,EAAE,QAAqB;QACrD,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;YAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YAEpC,IAAI,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAC3C,SAAS;aACV;YAED,IAAI,OAAO,IAAI,IAAI,EAAE;gBACnB,SAAS;aACV;YACD,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;IAED,aAAa,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACrC,aAAa,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAEzC,EAAE;IACF,sDAAsD;IACtD,EAAE;IAEF,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,eAAe,CAAC,WAAW,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;SACrD;KACF;IACD,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;QAC7B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACvB,eAAe,CAAC,aAAa,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;YACtD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACxB;KACF;IAED,EAAE;IACF,8CAA8C;IAC9C,EAAE;IAEF,MAAM,cAAc,GAAG,EAAE,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;QAC3B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,SAAS;SACV;QAED,mBAAmB;QACnB,IAAI,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE;YAClC,SAAS;SACV;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACvD,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAE3D,IAAI,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;YAC1C,SAAS;SACV;QAED,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE;YAChD,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,EAAE,CAAC,CAAC;SAChE;QAED,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3B;IAED,EAAE;IACF,eAAe;IACf,EAAE;IAEF,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEpE,IAAI;QACF,CAAC,CAAC,cAAc,WAAW,OAAO,MAAM,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAErC,CAAC,CAAC,cAAc,aAAa,OAAO,QAAQ,EAAE,CAAC,CAAC;QAChD,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QAEzC,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE;YAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAE/C,IAAI,WAAW,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE;gBACpC,CAAC,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;gBACxC,MAAM,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;gBAC7B,SAAS;aACV;YAED,CAAC,CAAC,wBAAwB,IAAI,EAAE,CAAC,CAAC;YAClC,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YAC3C,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;SACpC;QAED,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE;YACpC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;YAClE,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAErE,CAAC,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YACjC,YAAY,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;SAC9E;QAED,CAAC,CAAC,uBAAuB,cAAc,EAAE,CAAC,CAAC;QAE3C,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAExF,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,cAAc,EAAE;YAC1D,MAAM,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;SACxC,CAAC,CAAC;QAEH,CAAC,CAAC,cAAc,CAAC,CAAC;KACnB;YAAS;QACR,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KAC7D;AACH,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/debug.d.ts b/node_modules/@electron/universal/dist/esm/debug.d.ts
new file mode 100644
index 0000000..ec24d3b
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/debug.d.ts
@@ -0,0 +1,2 @@
+import * as debug from 'debug';
+export declare const d: debug.Debugger;
diff --git a/node_modules/@electron/universal/dist/esm/debug.js b/node_modules/@electron/universal/dist/esm/debug.js
new file mode 100644
index 0000000..449f78f
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/debug.js
@@ -0,0 +1,3 @@
+import * as debug from 'debug';
+export const d = debug('electron-universal');
+//# sourceMappingURL=debug.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/debug.js.map b/node_modules/@electron/universal/dist/esm/debug.js.map
new file mode 100644
index 0000000..7804bed
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/debug.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/file-utils.d.ts b/node_modules/@electron/universal/dist/esm/file-utils.d.ts
new file mode 100644
index 0000000..ff08b0e
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/file-utils.d.ts
@@ -0,0 +1,16 @@
+export declare enum AppFileType {
+ MACHO = 0,
+ PLAIN = 1,
+ INFO_PLIST = 2,
+ SNAPSHOT = 3,
+ APP_CODE = 4
+}
+export declare type AppFile = {
+ relativePath: string;
+ type: AppFileType;
+};
+/**
+ *
+ * @param appPath Path to the application
+ */
+export declare const getAllAppFiles: (appPath: string) => Promise<AppFile[]>;
diff --git a/node_modules/@electron/universal/dist/esm/file-utils.js b/node_modules/@electron/universal/dist/esm/file-utils.js
new file mode 100644
index 0000000..68eb4b8
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/file-utils.js
@@ -0,0 +1,68 @@
+import { spawn, ExitCodeError } from '@malept/cross-spawn-promise';
+import * as fs from 'fs-extra';
+import * as path from 'path';
+const MACHO_PREFIX = 'Mach-O ';
+export var AppFileType;
+(function (AppFileType) {
+ AppFileType[AppFileType["MACHO"] = 0] = "MACHO";
+ AppFileType[AppFileType["PLAIN"] = 1] = "PLAIN";
+ AppFileType[AppFileType["INFO_PLIST"] = 2] = "INFO_PLIST";
+ AppFileType[AppFileType["SNAPSHOT"] = 3] = "SNAPSHOT";
+ AppFileType[AppFileType["APP_CODE"] = 4] = "APP_CODE";
+})(AppFileType || (AppFileType = {}));
+/**
+ *
+ * @param appPath Path to the application
+ */
+export const getAllAppFiles = async (appPath) => {
+ const files = [];
+ const visited = new Set();
+ const traverse = async (p) => {
+ p = await fs.realpath(p);
+ if (visited.has(p))
+ return;
+ visited.add(p);
+ const info = await fs.stat(p);
+ if (info.isSymbolicLink())
+ return;
+ if (info.isFile()) {
+ let fileType = AppFileType.PLAIN;
+ var fileOutput = '';
+ try {
+ fileOutput = await spawn('file', ['--brief', '--no-pad', p]);
+ }
+ catch (e) {
+ if (e instanceof ExitCodeError) {
+ /* silently accept error codes from "file" */
+ }
+ else {
+ throw e;
+ }
+ }
+ if (p.includes('app.asar')) {
+ fileType = AppFileType.APP_CODE;
+ }
+ else if (fileOutput.startsWith(MACHO_PREFIX)) {
+ fileType = AppFileType.MACHO;
+ }
+ else if (p.endsWith('.bin')) {
+ fileType = AppFileType.SNAPSHOT;
+ }
+ else if (path.basename(p) === 'Info.plist') {
+ fileType = AppFileType.INFO_PLIST;
+ }
+ files.push({
+ relativePath: path.relative(appPath, p),
+ type: fileType,
+ });
+ }
+ if (info.isDirectory()) {
+ for (const child of await fs.readdir(p)) {
+ await traverse(path.resolve(p, child));
+ }
+ }
+ };
+ await traverse(appPath);
+ return files;
+};
+//# sourceMappingURL=file-utils.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/file-utils.js.map b/node_modules/@electron/universal/dist/esm/file-utils.js.map
new file mode 100644
index 0000000..7b095a5
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/file-utils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../src/file-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,YAAY,GAAG,SAAS,CAAC;AAE/B,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,+CAAK,CAAA;IACL,+CAAK,CAAA;IACL,yDAAU,CAAA;IACV,qDAAQ,CAAA;IACR,qDAAQ,CAAA;AACV,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB;AAOD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,OAAe,EAAsB,EAAE;IAC1E,MAAM,KAAK,GAAc,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,QAAQ,GAAG,KAAK,EAAE,CAAS,EAAE,EAAE;QACnC,CAAC,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAAE,OAAO;QAC3B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEf,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,cAAc,EAAE;YAAE,OAAO;QAClC,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;YACjB,IAAI,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC;YAEjC,IAAI,UAAU,GAAG,EAAE,CAAC;YACpB,IAAI;gBACF,UAAU,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;aAC9D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,YAAY,aAAa,EAAE;oBAC9B,6CAA6C;iBAC9C;qBAAM;oBACL,MAAM,CAAC,CAAC;iBACT;aACF;YACD,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;gBAC1B,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;aACjC;iBAAM,IAAI,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;gBAC9C,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC;aAC9B;iBAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBAC7B,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;aACjC;iBAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE;gBAC5C,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC;aACnC;YAED,KAAK,CAAC,IAAI,CAAC;gBACT,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;gBACvC,IAAI,EAAE,QAAQ;aACf,CAAC,CAAC;SACJ;QAED,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;YACtB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvC,MAAM,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;aACxC;SACF;IACH,CAAC,CAAC;IACF,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC;IAExB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/index.d.ts b/node_modules/@electron/universal/dist/esm/index.d.ts
new file mode 100644
index 0000000..b4829e1
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/index.d.ts
@@ -0,0 +1,34 @@
+declare type MakeUniversalOpts = {
+ /**
+ * Absolute file system path to the x64 version of your application. E.g. /Foo/bar/MyApp_x64.app
+ */
+ x64AppPath: string;
+ /**
+ * Absolute file system path to the arm64 version of your application. E.g. /Foo/bar/MyApp_arm64.app
+ */
+ arm64AppPath: string;
+ /**
+ * Absolute file system path you want the universal app to be written to. E.g. /Foo/var/MyApp_universal.app
+ *
+ * If this file exists it will be overwritten ONLY if "force" is set to true
+ */
+ outAppPath: string;
+ /**
+ * Forcefully overwrite any existing files that are in the way of generating the universal application
+ */
+ force: boolean;
+ /**
+ * Merge x64 and arm64 ASARs into one.
+ */
+ mergeASARs?: boolean;
+ /**
+ * Minimatch pattern of paths that are allowed to be present in one of the ASAR files, but not in the other.
+ */
+ singleArchFiles?: string;
+ /**
+ * Minimatch pattern of binaries that are expected to be the same x64 binary in both of the ASAR files.
+ */
+ x64ArchFiles?: string;
+};
+export declare const makeUniversalApp: (opts: MakeUniversalOpts) => Promise<void>;
+export {};
diff --git a/node_modules/@electron/universal/dist/esm/index.js b/node_modules/@electron/universal/dist/esm/index.js
new file mode 100644
index 0000000..a09a6d1
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/index.js
@@ -0,0 +1,225 @@
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+import { spawn } from '@malept/cross-spawn-promise';
+import * as asar from 'asar';
+import * as fs from 'fs-extra';
+import * as minimatch from 'minimatch';
+import * as os from 'os';
+import * as path from 'path';
+import * as plist from 'plist';
+import * as dircompare from 'dir-compare';
+import { AppFileType, getAllAppFiles } from './file-utils';
+import { AsarMode, detectAsarMode, generateAsarIntegrity, mergeASARs } from './asar-utils';
+import { sha } from './sha';
+import { d } from './debug';
+const dupedFiles = (files) => files.filter((f) => f.type !== AppFileType.SNAPSHOT && f.type !== AppFileType.APP_CODE);
+export const makeUniversalApp = async (opts) => {
+ d('making a universal app with options', opts);
+ if (process.platform !== 'darwin')
+ throw new Error('@electron/universal is only supported on darwin platforms');
+ if (!opts.x64AppPath || !path.isAbsolute(opts.x64AppPath))
+ throw new Error('Expected opts.x64AppPath to be an absolute path but it was not');
+ if (!opts.arm64AppPath || !path.isAbsolute(opts.arm64AppPath))
+ throw new Error('Expected opts.arm64AppPath to be an absolute path but it was not');
+ if (!opts.outAppPath || !path.isAbsolute(opts.outAppPath))
+ throw new Error('Expected opts.outAppPath to be an absolute path but it was not');
+ if (await fs.pathExists(opts.outAppPath)) {
+ d('output path exists already');
+ if (!opts.force) {
+ throw new Error(`The out path "${opts.outAppPath}" already exists and force is not set to true`);
+ }
+ else {
+ d('overwriting existing application because force == true');
+ await fs.remove(opts.outAppPath);
+ }
+ }
+ const x64AsarMode = await detectAsarMode(opts.x64AppPath);
+ const arm64AsarMode = await detectAsarMode(opts.arm64AppPath);
+ d('detected x64AsarMode =', x64AsarMode);
+ d('detected arm64AsarMode =', arm64AsarMode);
+ if (x64AsarMode !== arm64AsarMode)
+ throw new Error('Both the x64 and arm64 versions of your application need to have been built with the same asar settings (enabled vs disabled)');
+ const tmpDir = await fs.mkdtemp(path.resolve(os.tmpdir(), 'electron-universal-'));
+ d('building universal app in', tmpDir);
+ try {
+ d('copying x64 app as starter template');
+ const tmpApp = path.resolve(tmpDir, 'Tmp.app');
+ await spawn('cp', ['-R', opts.x64AppPath, tmpApp]);
+ const uniqueToX64 = [];
+ const uniqueToArm64 = [];
+ const x64Files = await getAllAppFiles(await fs.realpath(tmpApp));
+ const arm64Files = await getAllAppFiles(await fs.realpath(opts.arm64AppPath));
+ for (const file of dupedFiles(x64Files)) {
+ if (!arm64Files.some((f) => f.relativePath === file.relativePath))
+ uniqueToX64.push(file.relativePath);
+ }
+ for (const file of dupedFiles(arm64Files)) {
+ if (!x64Files.some((f) => f.relativePath === file.relativePath))
+ uniqueToArm64.push(file.relativePath);
+ }
+ if (uniqueToX64.length !== 0 || uniqueToArm64.length !== 0) {
+ d('some files were not in both builds, aborting');
+ console.error({
+ uniqueToX64,
+ uniqueToArm64,
+ });
+ throw new Error('While trying to merge mach-o files across your apps we found a mismatch, the number of mach-o files is not the same between the arm64 and x64 builds');
+ }
+ for (const file of x64Files.filter((f) => f.type === AppFileType.PLAIN)) {
+ const x64Sha = await sha(path.resolve(opts.x64AppPath, file.relativePath));
+ const arm64Sha = await sha(path.resolve(opts.arm64AppPath, file.relativePath));
+ if (x64Sha !== arm64Sha) {
+ d('SHA for file', file.relativePath, `does not match across builds ${x64Sha}!=${arm64Sha}`);
+ // The MainMenu.nib files generated by Xcode13 are deterministic in effect but not deterministic in generated sequence
+ if (path.basename(path.dirname(file.relativePath)) === 'MainMenu.nib') {
+ // The mismatch here is OK so we just move on to the next one
+ continue;
+ }
+ throw new Error(`Expected all non-binary files to have identical SHAs when creating a universal build but "${file.relativePath}" did not`);
+ }
+ }
+ for (const machOFile of x64Files.filter((f) => f.type === AppFileType.MACHO)) {
+ const first = await fs.realpath(path.resolve(tmpApp, machOFile.relativePath));
+ const second = await fs.realpath(path.resolve(opts.arm64AppPath, machOFile.relativePath));
+ const x64Sha = await sha(path.resolve(opts.x64AppPath, machOFile.relativePath));
+ const arm64Sha = await sha(path.resolve(opts.arm64AppPath, machOFile.relativePath));
+ if (x64Sha === arm64Sha) {
+ if (opts.x64ArchFiles === undefined ||
+ !minimatch(machOFile.relativePath, opts.x64ArchFiles, { matchBase: true })) {
+ throw new Error(`Detected file "${machOFile.relativePath}" that's the same in both x64 and arm64 builds and not covered by the ` +
+ `x64ArchFiles rule: "${opts.x64ArchFiles}"`);
+ }
+ d('SHA for Mach-O file', machOFile.relativePath, `matches across builds ${x64Sha}===${arm64Sha}, skipping lipo`);
+ continue;
+ }
+ d('joining two MachO files with lipo', {
+ first,
+ second,
+ });
+ await spawn('lipo', [
+ first,
+ second,
+ '-create',
+ '-output',
+ await fs.realpath(path.resolve(tmpApp, machOFile.relativePath)),
+ ]);
+ }
+ /**
+ * If we don't have an ASAR we need to check if the two "app" folders are identical, if
+ * they are then we can just leave one there and call it a day. If the app folders for x64
+ * and arm64 are different though we need to rename each folder and create a new fake "app"
+ * entrypoint to dynamically load the correct app folder
+ */
+ if (x64AsarMode === AsarMode.NO_ASAR) {
+ d('checking if the x64 and arm64 app folders are identical');
+ const comparison = await dircompare.compare(path.resolve(tmpApp, 'Contents', 'Resources', 'app'), path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app'), { compareSize: true, compareContent: true });
+ if (!comparison.same) {
+ d('x64 and arm64 app folders are different, creating dynamic entry ASAR');
+ await fs.move(path.resolve(tmpApp, 'Contents', 'Resources', 'app'), path.resolve(tmpApp, 'Contents', 'Resources', 'app-x64'));
+ await fs.copy(path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app'), path.resolve(tmpApp, 'Contents', 'Resources', 'app-arm64'));
+ const entryAsar = path.resolve(tmpDir, 'entry-asar');
+ await fs.mkdir(entryAsar);
+ await fs.copy(path.resolve(__dirname, '..', '..', 'entry-asar', 'no-asar.js'), path.resolve(entryAsar, 'index.js'));
+ let pj = await fs.readJson(path.resolve(opts.x64AppPath, 'Contents', 'Resources', 'app', 'package.json'));
+ pj.main = 'index.js';
+ await fs.writeJson(path.resolve(entryAsar, 'package.json'), pj);
+ await asar.createPackage(entryAsar, path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'));
+ }
+ else {
+ d('x64 and arm64 app folders are the same');
+ }
+ }
+ const generatedIntegrity = {};
+ let didSplitAsar = false;
+ /**
+ * If we have an ASAR we just need to check if the two "app.asar" files have the same hash,
+ * if they are, same as above, we can leave one there and call it a day. If they're different
+ * we have to make a dynamic entrypoint. There is an assumption made here that every file in
+ * app.asar.unpacked is a native node module. This assumption _may_ not be true so we should
+ * look at codifying that assumption as actual logic.
+ */
+ // FIXME: Codify the assumption that app.asar.unpacked only contains native modules
+ if (x64AsarMode === AsarMode.HAS_ASAR && opts.mergeASARs) {
+ d('merging x64 and arm64 asars');
+ const output = path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar');
+ await mergeASARs({
+ x64AsarPath: path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'),
+ arm64AsarPath: path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar'),
+ outputAsarPath: output,
+ singleArchFiles: opts.singleArchFiles,
+ });
+ generatedIntegrity['Resources/app.asar'] = generateAsarIntegrity(output);
+ }
+ else if (x64AsarMode === AsarMode.HAS_ASAR) {
+ d('checking if the x64 and arm64 asars are identical');
+ const x64AsarSha = await sha(path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'));
+ const arm64AsarSha = await sha(path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar'));
+ if (x64AsarSha !== arm64AsarSha) {
+ didSplitAsar = true;
+ d('x64 and arm64 asars are different');
+ const x64AsarPath = path.resolve(tmpApp, 'Contents', 'Resources', 'app-x64.asar');
+ await fs.move(path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'), x64AsarPath);
+ const x64Unpacked = path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar.unpacked');
+ if (await fs.pathExists(x64Unpacked)) {
+ await fs.move(x64Unpacked, path.resolve(tmpApp, 'Contents', 'Resources', 'app-x64.asar.unpacked'));
+ }
+ const arm64AsarPath = path.resolve(tmpApp, 'Contents', 'Resources', 'app-arm64.asar');
+ await fs.copy(path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar'), arm64AsarPath);
+ const arm64Unpacked = path.resolve(opts.arm64AppPath, 'Contents', 'Resources', 'app.asar.unpacked');
+ if (await fs.pathExists(arm64Unpacked)) {
+ await fs.copy(arm64Unpacked, path.resolve(tmpApp, 'Contents', 'Resources', 'app-arm64.asar.unpacked'));
+ }
+ const entryAsar = path.resolve(tmpDir, 'entry-asar');
+ await fs.mkdir(entryAsar);
+ await fs.copy(path.resolve(__dirname, '..', '..', 'entry-asar', 'has-asar.js'), path.resolve(entryAsar, 'index.js'));
+ let pj = JSON.parse((await asar.extractFile(path.resolve(opts.x64AppPath, 'Contents', 'Resources', 'app.asar'), 'package.json')).toString('utf8'));
+ pj.main = 'index.js';
+ await fs.writeJson(path.resolve(entryAsar, 'package.json'), pj);
+ const asarPath = path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar');
+ await asar.createPackage(entryAsar, asarPath);
+ generatedIntegrity['Resources/app.asar'] = generateAsarIntegrity(asarPath);
+ generatedIntegrity['Resources/app-x64.asar'] = generateAsarIntegrity(x64AsarPath);
+ generatedIntegrity['Resources/app-arm64.asar'] = generateAsarIntegrity(arm64AsarPath);
+ }
+ else {
+ d('x64 and arm64 asars are the same');
+ generatedIntegrity['Resources/app.asar'] = generateAsarIntegrity(path.resolve(tmpApp, 'Contents', 'Resources', 'app.asar'));
+ }
+ }
+ const plistFiles = x64Files.filter((f) => f.type === AppFileType.INFO_PLIST);
+ for (const plistFile of plistFiles) {
+ const x64PlistPath = path.resolve(opts.x64AppPath, plistFile.relativePath);
+ const arm64PlistPath = path.resolve(opts.arm64AppPath, plistFile.relativePath);
+ const _a = plist.parse(await fs.readFile(x64PlistPath, 'utf8')), { ElectronAsarIntegrity: x64Integrity } = _a, x64Plist = __rest(_a, ["ElectronAsarIntegrity"]);
+ const _b = plist.parse(await fs.readFile(arm64PlistPath, 'utf8')), { ElectronAsarIntegrity: arm64Integrity } = _b, arm64Plist = __rest(_b, ["ElectronAsarIntegrity"]);
+ if (JSON.stringify(x64Plist) !== JSON.stringify(arm64Plist)) {
+ throw new Error(`Expected all Info.plist files to be identical when ignoring integrity when creating a universal build but "${plistFile.relativePath}" was not`);
+ }
+ const mergedPlist = Object.assign(Object.assign({}, x64Plist), { ElectronAsarIntegrity: generatedIntegrity });
+ await fs.writeFile(path.resolve(tmpApp, plistFile.relativePath), plist.build(mergedPlist));
+ }
+ for (const snapshotsFile of arm64Files.filter((f) => f.type === AppFileType.SNAPSHOT)) {
+ d('copying snapshot file', snapshotsFile.relativePath, 'to target application');
+ await fs.copy(path.resolve(opts.arm64AppPath, snapshotsFile.relativePath), path.resolve(tmpApp, snapshotsFile.relativePath));
+ }
+ d('moving final universal app to target destination');
+ await fs.mkdirp(path.dirname(opts.outAppPath));
+ await spawn('mv', [tmpApp, opts.outAppPath]);
+ }
+ catch (err) {
+ throw err;
+ }
+ finally {
+ await fs.remove(tmpDir);
+ }
+};
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/index.js.map b/node_modules/@electron/universal/dist/esm/index.js.map
new file mode 100644
index 0000000..424c180
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAW,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,SAAS,CAAC;AAmC5B,MAAM,UAAU,GAAG,CAAC,KAAgB,EAAE,EAAE,CACtC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,QAAQ,CAAC,CAAC;AAE1F,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,IAAuB,EAAiB,EAAE;IAC/E,CAAC,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;IAE/C,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAC/B,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/E,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IACtF,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IAEpF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;QACxC,CAAC,CAAC,4BAA4B,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,MAAM,IAAI,KAAK,CACb,iBAAiB,IAAI,CAAC,UAAU,+CAA+C,CAChF,CAAC;SACH;aAAM;YACL,CAAC,CAAC,wDAAwD,CAAC,CAAC;YAC5D,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAClC;KACF;IAED,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1D,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;IACzC,CAAC,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAC;IAE7C,IAAI,WAAW,KAAK,aAAa;QAC/B,MAAM,IAAI,KAAK,CACb,+HAA+H,CAChI,CAAC;IAEJ,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAClF,CAAC,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;IAEvC,IAAI;QACF,CAAC,CAAC,qCAAqC,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC/C,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;QAEnD,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QACjE,MAAM,UAAU,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAE9E,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;YACvC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY,CAAC;gBAC/D,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACvC;QACD,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE;YACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY,CAAC;gBAC7D,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACzC;QACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1D,CAAC,CAAC,8CAA8C,CAAC,CAAC;YAClD,OAAO,CAAC,KAAK,CAAC;gBACZ,WAAW;gBACX,aAAa;aACd,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CACb,sJAAsJ,CACvJ,CAAC;SACH;QAED,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE;YACvE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC3E,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC/E,IAAI,MAAM,KAAK,QAAQ,EAAE;gBACvB,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,gCAAgC,MAAM,KAAK,QAAQ,EAAE,CAAC,CAAC;gBAC5F,sHAAsH;gBACtH,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,cAAc,EAAE;oBACrE,6DAA6D;oBAC7D,SAAS;iBACV;gBACD,MAAM,IAAI,KAAK,CACb,6FAA6F,IAAI,CAAC,YAAY,WAAW,CAC1H,CAAC;aACH;SACF;QAED,KAAK,MAAM,SAAS,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE;YAC5E,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YAC9E,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YAE1F,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YAChF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;YACpF,IAAI,MAAM,KAAK,QAAQ,EAAE;gBACvB,IACE,IAAI,CAAC,YAAY,KAAK,SAAS;oBAC/B,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAC1E;oBACA,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,CAAC,YAAY,wEAAwE;wBAC9G,uBAAuB,IAAI,CAAC,YAAY,GAAG,CAC9C,CAAC;iBACH;gBAED,CAAC,CACC,qBAAqB,EACrB,SAAS,CAAC,YAAY,EACtB,yBAAyB,MAAM,MAAM,QAAQ,iBAAiB,CAC/D,CAAC;gBACF,SAAS;aACV;YAED,CAAC,CAAC,mCAAmC,EAAE;gBACrC,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;YACH,MAAM,KAAK,CAAC,MAAM,EAAE;gBAClB,KAAK;gBACL,MAAM;gBACN,SAAS;gBACT,SAAS;gBACT,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;aAChE,CAAC,CAAC;SACJ;QAED;;;;;WAKG;QACH,IAAI,WAAW,KAAK,QAAQ,CAAC,OAAO,EAAE;YACpC,CAAC,CAAC,yDAAyD,CAAC,CAAC;YAC7D,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,OAAO,CACzC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EAC/D,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAC5C,CAAC;YAEF,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;gBACpB,CAAC,CAAC,sEAAsE,CAAC,CAAC;gBAC1E,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EACpD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC,CACzD,CAAC;gBACF,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EAC/D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC,CAC3D,CAAC;gBAEF,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBACrD,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC1B,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC,EAC/D,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CACpC,CAAC;gBACF,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,QAAQ,CACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,CAAC,CAC9E,CAAC;gBACF,EAAE,CAAC,IAAI,GAAG,UAAU,CAAC;gBACrB,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;gBAChE,MAAM,IAAI,CAAC,aAAa,CACtB,SAAS,EACT,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAC1D,CAAC;aACH;iBAAM;gBACL,CAAC,CAAC,wCAAwC,CAAC,CAAC;aAC7C;SACF;QAED,MAAM,kBAAkB,GAA0D,EAAE,CAAC;QACrF,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB;;;;;;WAMG;QACH,mFAAmF;QACnF,IAAI,WAAW,KAAK,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;YACxD,CAAC,CAAC,6BAA6B,CAAC,CAAC;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;YACzE,MAAM,UAAU,CAAC;gBACf,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;gBACtE,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;gBACnF,cAAc,EAAE,MAAM;gBACtB,eAAe,EAAE,IAAI,CAAC,eAAe;aACtC,CAAC,CAAC;YAEH,kBAAkB,CAAC,oBAAoB,CAAC,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;SAC1E;aAAM,IAAI,WAAW,KAAK,QAAQ,CAAC,QAAQ,EAAE;YAC5C,CAAC,CAAC,mDAAmD,CAAC,CAAC;YACvD,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;YACxF,MAAM,YAAY,GAAG,MAAM,GAAG,CAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CACrE,CAAC;YAEF,IAAI,UAAU,KAAK,YAAY,EAAE;gBAC/B,YAAY,GAAG,IAAI,CAAC;gBACpB,CAAC,CAAC,mCAAmC,CAAC,CAAC;gBACvC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;gBAClF,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC;gBACtF,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC;gBACvF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;oBACpC,MAAM,EAAE,CAAC,IAAI,CACX,WAAW,EACX,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,uBAAuB,CAAC,CACvE,CAAC;iBACH;gBAED,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;gBACtF,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EACpE,aAAa,CACd,CAAC;gBACF,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAChC,IAAI,CAAC,YAAY,EACjB,UAAU,EACV,WAAW,EACX,mBAAmB,CACpB,CAAC;gBACF,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;oBACtC,MAAM,EAAE,CAAC,IAAI,CACX,aAAa,EACb,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAyB,CAAC,CACzE,CAAC;iBACH;gBAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBACrD,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC1B,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC,EAChE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CACpC,CAAC;gBACF,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CACjB,CACE,MAAM,IAAI,CAAC,WAAW,CACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EAClE,cAAc,CACf,CACF,CAAC,QAAQ,CAAC,MAAM,CAAC,CACnB,CAAC;gBACF,EAAE,CAAC,IAAI,GAAG,UAAU,CAAC;gBACrB,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;gBAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;gBAC3E,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAE9C,kBAAkB,CAAC,oBAAoB,CAAC,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;gBAC3E,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;gBAClF,kBAAkB,CAAC,0BAA0B,CAAC,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;aACvF;iBAAM;gBACL,CAAC,CAAC,kCAAkC,CAAC,CAAC;gBACtC,kBAAkB,CAAC,oBAAoB,CAAC,GAAG,qBAAqB,CAC9D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAC1D,CAAC;aACH;SACF;QAED,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7E,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;YAC3E,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;YAE/E,MAAM,KAAuD,KAAK,CAAC,KAAK,CACtE,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,CACjC,EAFF,EAAE,qBAAqB,EAAE,YAAY,OAEnC,EAFwC,QAAQ,cAAlD,yBAAoD,CAElD,CAAC;YACT,MAAM,KAA2D,KAAK,CAAC,KAAK,CAC1E,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,CACnC,EAFF,EAAE,qBAAqB,EAAE,cAAc,OAErC,EAF0C,UAAU,cAAtD,yBAAwD,CAEtD,CAAC;YACT,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE;gBAC3D,MAAM,IAAI,KAAK,CACb,8GAA8G,SAAS,CAAC,YAAY,WAAW,CAChJ,CAAC;aACH;YAED,MAAM,WAAW,mCAAQ,QAAQ,KAAE,qBAAqB,EAAE,kBAAkB,GAAE,CAAC;YAE/E,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;SAC5F;QAED,KAAK,MAAM,aAAa,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,QAAQ,CAAC,EAAE;YACrF,CAAC,CAAC,uBAAuB,EAAE,aAAa,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC;YAChF,MAAM,EAAE,CAAC,IAAI,CACX,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,EAC3D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CACjD,CAAC;SACH;QAED,CAAC,CAAC,kDAAkD,CAAC,CAAC;QACtD,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;KAC9C;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,GAAG,CAAC;KACX;YAAS;QACR,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KACzB;AACH,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/sha.d.ts b/node_modules/@electron/universal/dist/esm/sha.d.ts
new file mode 100644
index 0000000..1c0daaa
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/sha.d.ts
@@ -0,0 +1 @@
+export declare const sha: (filePath: string) => Promise<any>;
diff --git a/node_modules/@electron/universal/dist/esm/sha.js b/node_modules/@electron/universal/dist/esm/sha.js
new file mode 100644
index 0000000..fbc7498
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/sha.js
@@ -0,0 +1,16 @@
+import * as fs from 'fs-extra';
+import * as crypto from 'crypto';
+import { d } from './debug';
+export const sha = async (filePath) => {
+ d('hashing', filePath);
+ const hash = crypto.createHash('sha256');
+ hash.setEncoding('hex');
+ const fileStream = fs.createReadStream(filePath);
+ fileStream.pipe(hash);
+ await new Promise((resolve, reject) => {
+ fileStream.on('end', () => resolve());
+ fileStream.on('error', (err) => reject(err));
+ });
+ return hash.read();
+};
+//# sourceMappingURL=sha.js.map \ No newline at end of file
diff --git a/node_modules/@electron/universal/dist/esm/sha.js.map b/node_modules/@electron/universal/dist/esm/sha.js.map
new file mode 100644
index 0000000..794d901
--- /dev/null
+++ b/node_modules/@electron/universal/dist/esm/sha.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"sha.js","sourceRoot":"","sources":["../../src/sha.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,SAAS,CAAC;AAE5B,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE;IAC5C,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvB,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxB,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACjD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QACtC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/@electron/universal/entry-asar/has-asar.js b/node_modules/@electron/universal/entry-asar/has-asar.js
new file mode 100644
index 0000000..9e37f7d
--- /dev/null
+++ b/node_modules/@electron/universal/entry-asar/has-asar.js
@@ -0,0 +1,7 @@
+if (process.arch === 'arm64') {
+ process._archPath = require.resolve('../app-arm64.asar');
+} else {
+ process._archPath = require.resolve('../app-x64.asar');
+}
+
+require(process._archPath);
diff --git a/node_modules/@electron/universal/entry-asar/no-asar.js b/node_modules/@electron/universal/entry-asar/no-asar.js
new file mode 100644
index 0000000..5391363
--- /dev/null
+++ b/node_modules/@electron/universal/entry-asar/no-asar.js
@@ -0,0 +1,7 @@
+if (process.arch === 'arm64') {
+ process._archPath = require.resolve('../app-arm64');
+} else {
+ process._archPath = require.resolve('../app-x64');
+}
+
+require(process._archPath);
diff --git a/node_modules/@electron/universal/node_modules/debug/LICENSE b/node_modules/@electron/universal/node_modules/debug/LICENSE
new file mode 100644
index 0000000..1a9820e
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+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/@electron/universal/node_modules/debug/README.md b/node_modules/@electron/universal/node_modules/debug/README.md
new file mode 100644
index 0000000..e9c3e04
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/debug/README.md
@@ -0,0 +1,481 @@
+# debug
+[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
+
+<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2018-2021 Josh Junon
+
+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/@electron/universal/node_modules/debug/package.json b/node_modules/@electron/universal/node_modules/debug/package.json
new file mode 100644
index 0000000..3bcdc24
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/debug/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "debug",
+ "version": "4.3.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "Josh Junon <josh.junon@protonmail.com>",
+ "contributors": [
+ "TJ Holowaychuk <tj@vision-media.ca>",
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ }
+}
diff --git a/node_modules/@electron/universal/node_modules/debug/src/browser.js b/node_modules/@electron/universal/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..cd0fc35
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/node_modules/@electron/universal/node_modules/debug/src/common.js b/node_modules/@electron/universal/node_modules/debug/src/common.js
new file mode 100644
index 0000000..e3291b2
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/node_modules/@electron/universal/node_modules/debug/src/index.js b/node_modules/@electron/universal/node_modules/debug/src/index.js
new file mode 100644
index 0000000..bf4c57f
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/@electron/universal/node_modules/debug/src/node.js b/node_modules/@electron/universal/node_modules/debug/src/node.js
new file mode 100644
index 0000000..79bc085
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/CHANGELOG.md b/node_modules/@electron/universal/node_modules/fs-extra/CHANGELOG.md
new file mode 100644
index 0000000..225fdca
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/CHANGELOG.md
@@ -0,0 +1,902 @@
+9.1.0 / 2021-01-19
+------------------
+
+- Add promise support for `fs.rm()` ([#841](https://github.com/jprichardson/node-fs-extra/issues/841), [#860](https://github.com/jprichardson/node-fs-extra/pull/860))
+- Upgrade universalify for performance improvments ([#825](https://github.com/jprichardson/node-fs-extra/pull/825))
+
+9.0.1 / 2020-06-03
+------------------
+
+- Fix issue with `ensureFile()` when used with Jest on Windows ([#804](https://github.com/jprichardson/node-fs-extra/issues/804), [#805](https://github.com/jprichardson/node-fs-extra/pull/805))
+- Remove unneeded `process.umask()` call ([#791](https://github.com/jprichardson/node-fs-extra/pull/791))
+- Docs improvements ([#753](https://github.com/jprichardson/node-fs-extra/pull/753), [#795](https://github.com/jprichardson/node-fs-extra/pull/795), [#797](https://github.com/jprichardson/node-fs-extra/pull/797))
+
+9.0.0 / 2020-03-19
+------------------
+
+### Breaking changes
+
+- Requires Node.js version 10 or greater ([#725](https://github.com/jprichardson/node-fs-extra/issues/725), [#751](https://github.com/jprichardson/node-fs-extra/pull/751))
+- Switched `ensureDir*` to use a fork of https://github.com/sindresorhus/make-dir to make use of native recursive `fs.mkdir` where possible ([#619](https://github.com/jprichardson/node-fs-extra/issues/619), [#756](https://github.com/jprichardson/node-fs-extra/pull/756))
+- Properly preserve `atime` for `copy*` with `preserveTimestamps` option ([#633](https://github.com/jprichardson/node-fs-extra/pull/633))
+
+**The following changes, allthough technically breaking, will not affect the vast majority of users:**
+
+- `outputJson` now outputs objects as they were when the function was called, even if they are mutated later ([#702](https://github.com/jprichardson/node-fs-extra/issues/702), [#768](https://github.com/jprichardson/node-fs-extra/pull/768))
+- Cannot pass `null` as an options parameter to `*Json*` methods ([#745](https://github.com/jprichardson/node-fs-extra/issues/745), [#768](https://github.com/jprichardson/node-fs-extra/pull/768))
+
+### Improvements
+
+- Add promise shims for `fs.writev` & `fs.opendir` ([#747](https://github.com/jprichardson/node-fs-extra/pull/747))
+- Better errors for `ensureFile` ([#696](https://github.com/jprichardson/node-fs-extra/issues/696), [#744](https://github.com/jprichardson/node-fs-extra/pull/744))
+- Better file comparison for older Node versions ([#694](https://github.com/jprichardson/node-fs-extra/pull/694))
+
+### Miscellaneous changes
+- Peformance optimizations ([#762](https://github.com/jprichardson/node-fs-extra/issues/762), [#764](https://github.com/jprichardson/node-fs-extra/pull/764))
+- Add missing documentation for aliases ([#758](https://github.com/jprichardson/node-fs-extra/issues/758), [#766](https://github.com/jprichardson/node-fs-extra/pull/766))
+- Update `universalify` dependency ([#767](https://github.com/jprichardson/node-fs-extra/pull/767))
+
+8.1.0 / 2019-06-28
+------------------
+
+- Add support for promisified `fs.realpath.native` in Node v9.2+ ([#650](https://github.com/jprichardson/node-fs-extra/issues/650), [#682](https://github.com/jprichardson/node-fs-extra/pull/682))
+- Update `graceful-fs` dependency ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+- Use `graceful-fs` everywhere ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+
+8.0.1 / 2019-05-13
+------------------
+
+- Fix bug `Maximum call stack size exceeded` error in `util/stat` ([#679](https://github.com/jprichardson/node-fs-extra/pull/679))
+
+8.0.0 / 2019-05-11
+------------------
+
+**NOTE:** Node.js v6 support is deprecated, and will be dropped in the next major release.
+
+- Use `renameSync()` under the hood in `moveSync()`
+- Fix bug with bind-mounted directories in `copy*()` ([#613](https://github.com/jprichardson/node-fs-extra/issues/613), [#618](https://github.com/jprichardson/node-fs-extra/pull/618))
+- Fix bug in `move()` with case-insensitive file systems
+- Use `fs.stat()`'s `bigint` option in `copy*()` & `move*()` where possible ([#657](https://github.com/jprichardson/node-fs-extra/issues/657))
+
+7.0.1 / 2018-11-07
+------------------
+
+- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
+- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
+- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))
+
+7.0.0 / 2018-07-16
+------------------
+
+- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
+- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
+- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
+- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))
+
+6.0.1 / 2018-05-09
+------------------
+
+- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))
+
+6.0.0 / 2018-05-01
+------------------
+
+- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
+- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
+- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
+- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
+- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
+- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))
+
+5.0.0 / 2017-12-11
+------------------
+
+Significant refactor of `copy()` & `copySync()`, including breaking changes. No changes to other functions in this release.
+
+Huge thanks to **[@manidlou](https://github.com/manidlou)** for doing most of the work on this release.
+
+- The `filter` option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. [#512](https://github.com/jprichardson/node-fs-extra/pull/512)
+- `copy()`'s `filter` option can now be a function that returns a Promise. [#518](https://github.com/jprichardson/node-fs-extra/pull/518)
+- `copy()` & `copySync()` now use `fs.copyFile()`/`fs.copyFileSync()` in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. [#505](https://github.com/jprichardson/node-fs-extra/pull/505)
+- Don't allow copying a directory into itself. [#83](https://github.com/jprichardson/node-fs-extra/issues/83)
+- Handle copying between identical files. [#198](https://github.com/jprichardson/node-fs-extra/issues/198)
+- Error out when copying an empty folder to a path that already exists. [#464](https://github.com/jprichardson/node-fs-extra/issues/464)
+- Don't create `dest`'s parent if the `filter` function aborts the `copy()` operation. [#517](https://github.com/jprichardson/node-fs-extra/pull/517)
+- Fix `writeStream` not being closed if there was an error in `copy()`. [#516](https://github.com/jprichardson/node-fs-extra/pull/516)
+
+4.0.3 / 2017-12-05
+------------------
+
+- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501)
+- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520)
+
+4.0.2 / 2017-09-12
+------------------
+
+- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4)
+- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+
+- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485)
+
+4.0.1 / 2017-07-31
+------------------
+
+### Fixed
+
+- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470)
+
+4.0.0 / 2017-07-14
+------------------
+
+### Changed
+
+- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449)
+- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458)
+- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459)
+
+### Fixed
+
+- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428)
+
+Also clarified the docs in a few places.
+
+3.0.1 / 2017-05-04
+------------------
+
+- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415)
+
+3.0.0 / 2017-04-27
+------------------
+
+### Added
+
+- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403)
+- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406)
+
+### Removed
+
+- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+
+### Changed
+
+- Upgraded jsonfile dependency to v3.0.0:
+ - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`.
+- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394)
+
+### Fixed
+
+- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408)
+
+2.1.2 / 2017-03-16
+------------------
+
+### Fixed
+
+- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393)
+
+2.1.1 / 2017-03-15
+------------------
+
+### Fixed
+
+- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`.
+- Remove `Buffer.alloc()` usage in `moveSync()`.
+
+2.1.0 / 2017-03-15
+------------------
+
+Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release!
+
+### Added
+- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou))
+- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou))
+
+### Changed
+- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou))
+- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264)
+- Refactored docs. ([@manidlou](https://github.com/manidlou))
+
+### Fixed
+
+- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton))
+
+2.0.0 / 2017-01-16
+------------------
+
+### Removed
+- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it
+on Jan 1st, 2017.
+- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little
+over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just
+an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339]
+
+### Changed
+- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333]
+- Moved docs, to `docs/`. [#340]
+
+### Fixed
+- Apply filters to directories in `copySync()` like in `copy()`. [#324]
+- A specific condition when disk is under heavy use, `copy()` can fail. [#326]
+
+
+1.0.0 / 2016-11-01
+------------------
+
+After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes
+to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release!
+
+### Added
+- `walkSync()`
+
+### Changed
+- **BREAKING**: dropped Node v0.10 support.
+- disabled `rimaf` globbing, wasn't used. [#280]
+- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function.
+- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300]
+
+### Fixed
+- bug fix proper closing of file handle on `utimesMillis()` [#271]
+- proper escaping of files with dollar signs [#291]
+- `copySync()` failed if user didn't own file. [#199], [#301]
+
+
+0.30.0 / 2016-04-28
+-------------------
+- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**.
+
+0.29.0 / 2016-04-27
+-------------------
+- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well.
+
+0.28.0 / 2016-04-17
+-------------------
+- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]
+- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237]
+- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93]
+
+0.27.0 / 2016-04-15
+-------------------
+- add `dereference` option to `copySync()`. [#235][#235]
+
+0.26.7 / 2016-03-16
+-------------------
+- fixed `copy()` if source and dest are the same. [#230][#230]
+
+0.26.6 / 2016-03-15
+-------------------
+- fixed if `emptyDir()` does not have a callback: [#229][#229]
+
+0.26.5 / 2016-01-27
+-------------------
+- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215]
+
+0.26.4 / 2016-01-05
+-------------------
+- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208]
+
+0.26.3 / 2015-12-17
+-------------------
+- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193]
+
+0.26.2 / 2015-11-02
+-------------------
+- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces`
+
+0.26.1 / 2015-11-02
+-------------------
+- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190]
+
+0.26.0 / 2015-10-25
+-------------------
+- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw).
+
+0.25.0 / 2015-10-24
+-------------------
+- now has a file walker `walk()`
+
+0.24.0 / 2015-08-28
+-------------------
+- removed alias `delete()` and `deleteSync()`. See: [#171][#171]
+
+0.23.1 / 2015-08-07
+-------------------
+- Better handling of errors for `move()` when moving across devices. [#170][#170]
+- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169]
+
+0.23.0 / 2015-08-06
+-------------------
+- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165]
+
+0.22.1 / 2015-07-09
+-------------------
+- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149].
+Fixes regression that was introduced in `0.21.0`.
+
+0.22.0 / 2015-07-09
+-------------------
+- preserve permissions / ownership in `copy()`. See: [#54][#54]
+
+0.21.0 / 2015-07-04
+-------------------
+- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141]
+- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks)
+
+0.20.1 / 2015-06-23
+-------------------
+- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
+
+0.20.0 / 2015-06-19
+-------------------
+- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g.
+this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`.
+- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code.
+- started moving tests inline
+- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()`
+
+0.19.0 / 2015-06-08
+-------------------
+- `fs.copy()` had support for Node v0.8, dropped support
+
+0.18.4 / 2015-05-22
+-------------------
+- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0
+
+0.18.3 / 2015-05-08
+-------------------
+- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134]
+
+0.18.2 / 2015-04-17
+-------------------
+- bugfix: allow `F_OK` ([#120][#120])
+
+0.18.1 / 2015-04-15
+-------------------
+- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b
+- fixed a lot of tests for Windows (appveyor)
+
+0.18.0 / 2015-03-31
+-------------------
+- added `emptyDir()` and `emptyDirSync()`
+
+0.17.0 / 2015-03-28
+-------------------
+- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists).
+**Only works with files at the moment.**
+- `createOutputStream()` added. See: [#118][#118]
+
+0.16.5 / 2015-03-08
+-------------------
+- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114]
+
+0.16.4 / 2015-03-01
+-------------------
+- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66
+
+0.16.3 / 2015-01-28
+-------------------
+- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9
+
+
+0.16.2 / 2015-01-28
+-------------------
+- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future)
+
+0.16.1 / 2015-01-28
+-------------------
+- if `setImmediate` is not available, fall back to `process.nextTick`
+
+0.16.0 / 2015-01-28
+-------------------
+- bugfix `fs.move()` into itself. Closes [#104]
+- bugfix `fs.move()` moving directory across device. Closes [#108]
+- added coveralls support
+- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98]
+- misc fs.copy code cleanups
+
+0.15.0 / 2015-01-21
+-------------------
+- dropped `ncp`, imported code in
+- because of previous, now supports `io.js`
+- `graceful-fs` is now a dependency
+
+0.14.0 / 2015-01-05
+-------------------
+- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100]
+- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests)
+
+0.13.0 / 2014-12-10
+-------------------
+- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch)
+- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"`
+- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59])
+
+0.12.0 / 2014-09-22
+-------------------
+- copy symlinks in `copySync()` [#85][#85]
+
+0.11.1 / 2014-09-02
+-------------------
+- bugfix `copySync()` preserve file permissions [#80][#80]
+
+0.11.0 / 2014-08-11
+-------------------
+- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"`
+- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()`
+see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details.
+
+0.10.0 / 2014-06-29
+------------------
+* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change
+from `~` to `^`. [#67]
+
+0.9.1 / 2014-05-22
+------------------
+* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there
+
+0.9.0 / 2014-05-22
+------------------
+* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58]
+* upgraded `rimraf` from `~2.2.6` to `^2.2.8`
+* upgraded `mkdirp` from `0.3.x` to `^0.5.0`
+* added methods `ensureFile()`, `ensureFileSync()`
+* added methods `ensureDir()`, `ensureDirSync()` [#31]
+* added `move()` method. From: https://github.com/andrewrk/node-mv
+
+
+0.8.1 / 2013-10-24
+------------------
+* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39])
+
+0.8.0 / 2013-10-14
+------------------
+* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36])
+
+0.7.1 / 2013-10-12
+------------------
+* `copySync()` implemented (Srirangan / [#33])
+* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32]
+
+0.7.0 / 2013-10-07
+------------------
+* update readme conventions
+* `copy()` now works if destination directory does not exist. Closes [#29]
+
+0.6.4 / 2013-09-05
+------------------
+* changed `homepage` field in package.json to remove NPM warning
+
+0.6.3 / 2013-06-28
+------------------
+* changed JSON spacing default from `4` to `2` to follow Node conventions
+* updated `jsonfile` dep
+* updated `rimraf` dep
+
+0.6.2 / 2013-06-28
+------------------
+* added .npmignore, [#25]
+
+0.6.1 / 2013-05-14
+------------------
+* modified for `strict` mode, closes [#24]
+* added `outputJson()/outputJsonSync()`, closes [#23]
+
+0.6.0 / 2013-03-18
+------------------
+* removed node 0.6 support
+* added node 0.10 support
+* upgraded to latest `ncp` and `rimraf`.
+* optional `graceful-fs` support. Closes [#17]
+
+
+0.5.0 / 2013-02-03
+------------------
+* Removed `readTextFile`.
+* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write.
+* Restructured documentation a bit. Added roadmap.
+
+0.4.0 / 2013-01-28
+------------------
+* Set default spaces in `jsonfile` from 4 to 2.
+* Updated `testutil` deps for tests.
+* Renamed `touch()` to `createFile()`
+* Added `outputFile()` and `outputFileSync()`
+* Changed creation of testing diretories so the /tmp dir is not littered.
+* Added `readTextFile()` and `readTextFileSync()`.
+
+0.3.2 / 2012-11-01
+------------------
+* Added `touch()` and `touchSync()` methods.
+
+0.3.1 / 2012-10-11
+------------------
+* Fixed some stray globals.
+
+0.3.0 / 2012-10-09
+------------------
+* Removed all CoffeeScript from tests.
+* Renamed `mkdir` to `mkdirs`/`mkdirp`.
+
+0.2.1 / 2012-09-11
+------------------
+* Updated `rimraf` dep.
+
+0.2.0 / 2012-09-10
+------------------
+* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript)
+* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile)
+* Added Travis-CI.
+
+0.1.3 / 2012-08-13
+------------------
+* Added method `readJSONFile`.
+
+0.1.2 / 2012-06-15
+------------------
+* Bug fix: `deleteSync()` didn't exist.
+* Verified Node v0.8 compatibility.
+
+0.1.1 / 2012-06-15
+------------------
+* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed.
+
+0.1.0 / 2012-05-31
+------------------
+* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too.
+* Renamed `rmrf()` to `remove()`.
+* `remove()` aliased with `delete()`.
+* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`.
+* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead.
+
+0.0.4 / 2012-03-14
+------------------
+* Removed CoffeeScript dependency
+
+0.0.3 / 2012-01-11
+------------------
+* Added methods rmrf and rmrfSync
+* Moved tests from Jasmine to Mocha
+
+
+[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year"
+[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme"
+[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move"
+[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]"
+[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]"
+[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]"
+[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]"
+[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value"
+[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]"
+[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]"
+[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]"
+[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]"
+[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support"
+[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]"
+[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]"
+[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]"
+[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]"
+[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]"
+[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]"
+[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]"
+[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]"
+[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?"
+[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative"
+[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]"
+[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink "
+[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists"
+[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]"
+[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms"
+[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]"
+[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug."
+[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]"
+[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters."
+[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]"
+[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]"
+[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]"
+[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]"
+[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link"
+[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage"
+[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error"
+[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls"
+[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]"
+[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]"
+[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated"
+[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]"
+[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]"
+[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]"
+[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]"
+[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node"
+[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]"
+[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]"
+[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]"
+[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs"
+[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]"
+[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying"
+[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]"
+[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]"
+[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function"
+[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390"
+[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not"
+[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()"
+[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()"
+[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?"
+[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing"
+[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]"
+[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership"
+[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options"
+[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]"
+[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API"
+[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]"
+[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`"
+[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]"
+[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error"
+[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]"
+[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]"
+[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111"
+[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!"
+[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra"
+[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?"
+[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]"
+[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]"
+[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()"
+[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined"
+[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require"
+[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty"
+[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp"
+[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails"
+[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme "
+[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version"
+[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method"
+[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists"
+[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission"
+[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you"
+[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)"
+[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers"
+[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy"
+[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package"
+[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file"
+[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]"
+[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories"
+[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?"
+[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]"
+[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream"
+[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request"
+[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]"
+[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread."
+[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..."
+[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo"
+[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)"
+[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci"
+[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]"
+[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. "
+[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML"
+[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test"
+[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir"
+[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out"
+[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]"
+[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory"
+[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink"
+[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error"
+[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync"
+[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function"
+[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md"
+[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods."
+[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example"
+[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug"
+[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug"
+[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug"
+[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]"
+[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag"
+[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo"
+[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE"
+[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files"
+[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]"
+[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]"
+[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]"
+[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions"
+[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync"
+[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]"
+[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files"
+[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]"
+[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?"
+[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]"
+[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync"
+[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]"
+[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]"
+[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]"
+[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]"
+[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?"
+[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file"
+[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]"
+[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()"
+[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]"
+[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true"
+[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows"
+[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform"
+[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]"
+[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]"
+[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x"
+[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra"
+[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]"
+[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified"
+[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]"
+[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]"
+[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir"
+[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync "
+[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]"
+[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event"
+[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]"
+[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter"
+[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs"
+[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`"
+[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases"
+[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives"
+[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error"
+[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error"
+[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]"
+[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content"
+[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink"
+[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content"
+[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]"
+[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link"
+[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link"
+[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link"
+[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link"
+[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods"
+[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted"
+[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods"
+[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme"
+[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync"
+[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152"
+[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]"
+[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]"
+[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code."
+[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync"
+[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation"
+[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty"
+[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works"
+[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist."
+[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing"
+[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs"
+[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature"
+[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps"
+[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'"
+[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138"
+[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files"
+[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input"
+[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute"
+[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided"
+[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir"
+[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`"
+[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method"
+[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]"
+[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features."
+[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?"
+[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;"
+[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists"
+[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object #<Object> has no method 'access'"
+[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync"
+[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'"
+[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory"
+[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids."
+[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined"
+[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'"
+[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows"
+[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream"
+[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows"
+[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]"
+[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]"
+[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true"
+[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists"
+[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory"
+[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory "
+[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory"
+[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails"
+[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work"
+[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it"
+[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]"
+[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs"
+[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]"
+[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy"
+[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?"
+[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified"
+[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp"
+[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]"
+[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]"
+[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug"
+[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined."
+[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp"
+[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]"
+[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]"
+[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird"
+[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]"
+[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine"
+[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows"
+[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries"
+[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?"
+[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?"
+[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync"
+[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?"
+[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]"
+[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move"
+[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move"
+[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync"
+[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty"
+[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories"
+[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird"
+[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript"
+[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]"
+[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module"
+[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme"
+[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality"
+[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work"
+[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]"
+[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name"
+[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]"
+[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options"
+[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG"
+[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy"
+[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls"
+[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk"
+[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work"
+[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies"
+[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs"
+[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]"
+[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error"
+[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?"
+[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy "
+[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?"
+[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons"
+[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode"
+[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync"
+[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README"
+[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile"
+[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6"
+[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]"
+[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0"
+[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year"
+[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites"
+[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support"
+[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting "
+[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?"
+[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now"
+[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime "
+[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error"
+[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null"
+[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]"
+[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`"
+[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` "
+[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]"
+[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync"
+[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]"
+[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]"
+[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`"
+[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?"
+[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted."
+[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme"
+[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]"
+[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file"
+[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]"
+[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories"
+[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()"
+[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0"
+[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted"
+[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array"
+[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function"
+[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`"
+[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md"
+[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]"
+[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1"
+[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]"
+[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global"
+[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]"
+[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]"
+[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra"
+[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version"
+[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency"
+[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming"
+[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2"
+[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!"
+[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp"
+[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist"
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/LICENSE b/node_modules/@electron/universal/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+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/@electron/universal/node_modules/fs-extra/README.md b/node_modules/@electron/universal/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..b4a5370
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/README.md
@@ -0,0 +1,264 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
+
+[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![License](https://img.shields.io/npm/l/express.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
+[![build status](https://img.shields.io/travis/jprichardson/node-fs-extra/master.svg)](http://travis-ci.org/jprichardson/node-fs-extra)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
+[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![Coverage Status](https://img.shields.io/coveralls/github/jprichardson/node-fs-extra/master.svg)](https://coveralls.io/github/jprichardson/node-fs-extra)
+[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install fs-extra
+
+
+
+Usage
+-----
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+Sync vs Async vs Async/Await
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Also Async/Await will throw an error if one occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+
+// Async/Await:
+async function copyFiles () {
+ try {
+ await fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+ } catch (err) {
+ console.error(err)
+ }
+}
+
+copyFiles()
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirp](docs/ensureDir.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirpSync](docs/ensureDir-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+### CLI
+
+[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+### Obtain Filesystem (Devices, Partitions) Information
+
+[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
+
+### Misc.
+
+- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage. See coveralls output for more info.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm test`: runs both the linter and the tests
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/copy-sync.js
new file mode 100644
index 0000000..31f06e4
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/copy-sync.js
@@ -0,0 +1,166 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirsSync = require('../mkdirs').mkdirsSync
+const utimesMillisSync = require('../util/utimes').utimesMillisSync
+const stat = require('../util/stat')
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy')
+ stat.checkParentPathsSync(src, srcStat, dest, 'copy')
+ return handleFilterAndCopy(destStat, src, dest, opts)
+}
+
+function handleFilterAndCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirsSync(destParent)
+ return startCopy(destStat, src, dest, opts)
+}
+
+function startCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ fs.copyFileSync(src, dest)
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
+ return setDestMode(dest, srcStat.mode)
+}
+
+function handleTimestamps (srcMode, src, dest) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
+ return setDestTimestamps(src, dest)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode) {
+ return setDestMode(dest, srcMode | 0o200)
+}
+
+function setDestMode (dest, srcMode) {
+ return fs.chmodSync(dest, srcMode)
+}
+
+function setDestTimestamps (src, dest) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ const updatedSrcStat = fs.statSync(src)
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
+ if (destStat && !destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
+ }
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return setDestMode(dest, srcMode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy')
+ return startCopy(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+module.exports = copySync
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/index.js
new file mode 100644
index 0000000..65945ae
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ copySync: require('./copy-sync')
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/copy/copy.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..328f102
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,232 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirs = require('../mkdirs').mkdirs
+const pathExists = require('../path-exists').pathExists
+const utimesMillis = require('../util/utimes').utimesMillis
+const stat = require('../util/stat')
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ stat.checkPaths(src, dest, 'copy', (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
+ if (err) return cb(err)
+ if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
+ return checkParentDir(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return startCopy(destStat, src, dest, opts, cb)
+ mkdirs(destParent, err => {
+ if (err) return cb(err)
+ return startCopy(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function handleFilter (onInclude, destStat, src, dest, opts, cb) {
+ Promise.resolve(opts.filter(src, dest)).then(include => {
+ if (include) return onInclude(destStat, src, dest, opts, cb)
+ return cb()
+ }, error => cb(error))
+}
+
+function startCopy (destStat, src, dest, opts, cb) {
+ if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
+ return getStats(destStat, src, dest, opts, cb)
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
+ return setDestMode(dest, srcStat.mode, cb)
+ })
+}
+
+function handleTimestampsAndMode (srcMode, src, dest, cb) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) {
+ return makeFileWritable(dest, srcMode, err => {
+ if (err) return cb(err)
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+ })
+ }
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode, cb) {
+ return setDestMode(dest, srcMode | 0o200, cb)
+}
+
+function setDestTimestampsAndMode (srcMode, src, dest, cb) {
+ setDestTimestamps(src, dest, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+}
+
+function setDestMode (dest, srcMode, cb) {
+ return fs.chmod(dest, srcMode, cb)
+}
+
+function setDestTimestamps (src, dest, cb) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ fs.stat(src, (err, updatedSrcStat) => {
+ if (err) return cb(err)
+ return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
+ if (destStat && !destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
+ }
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => {
+ if (err) return cb(err)
+ const { destStat } = stats
+ startCopy(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+module.exports = copy
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/copy/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..b7e4f7f
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy'))
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/empty/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..90fb469
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,48 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(function emptyDir (dir, callback) {
+ callback = callback || function () {}
+ fs.readdir(dir, (err, items) => {
+ if (err) return mkdir.mkdirs(dir, callback)
+
+ items = items.map(item => path.join(dir, item))
+
+ deleteItem()
+
+ function deleteItem () {
+ const item = items.pop()
+ if (!item) return callback()
+ remove.remove(item, err => {
+ if (err) return callback(err)
+ deleteItem()
+ })
+ }
+ })
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/file.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..15cc473
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,69 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ fs.stat(dir, (err, stats) => {
+ if (err) {
+ // if the directory doesn't exist, make it
+ if (err.code === 'ENOENT') {
+ return mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ }
+ return callback(err)
+ }
+
+ if (stats.isDirectory()) makeFile()
+ else {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdir(dir, err => {
+ if (err) return callback(err)
+ })
+ }
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ try {
+ if (!fs.statSync(dir).isDirectory()) {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdirSync(dir)
+ }
+ } catch (err) {
+ // If the stat call above failed because the directory doesn't exist, create it
+ if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
+ else throw err
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..c1f67b7
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const file = require('./file')
+const link = require('./link')
+const symlink = require('./symlink')
+
+module.exports = {
+ // file
+ createFile: file.createFile,
+ createFileSync: file.createFileSync,
+ ensureFile: file.createFile,
+ ensureFileSync: file.createFileSync,
+ // link
+ createLink: link.createLink,
+ createLinkSync: link.createLinkSync,
+ ensureLink: link.createLink,
+ ensureLinkSync: link.createLinkSync,
+ // symlink
+ createSymlink: symlink.createSymlink,
+ createSymlinkSync: symlink.createSymlinkSync,
+ ensureSymlink: symlink.createSymlink,
+ ensureSymlinkSync: symlink.createSymlinkSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/link.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..2cd4196
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,61 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ try {
+ fs.lstatSync(srcpath)
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..33cd760
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..42dc0ce
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..fe68b79
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,63 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/fs/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..9bbaea4
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,130 @@
+'use strict'
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchmod',
+ 'lchown',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'opendir',
+ 'readdir',
+ 'readFile',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rm',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.opendir was added in Node.js v12.12.0
+ // fs.rm was added in Node.js v14.14.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export all keys:
+Object.keys(fs).forEach(key => {
+ if (key === 'promises') {
+ // fs.promises is a getter property that triggers ExperimentalWarning
+ // Don't re-export it here, the getter is defined in "lib/index.js"
+ return
+ }
+ exports[key] = fs[key]
+})
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
+
+// fs.writev only available in Node v12.9.0+
+if (typeof fs.writev === 'function') {
+ // Function signature is
+ // s.writev(fd, buffers[, position], callback)
+ // We need to handle the optional arg, so we use ...args
+ exports.writev = function (fd, buffers, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.writev(fd, buffers, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffers })
+ })
+ })
+ }
+}
+
+// fs.realpath.native only available in Node v9.2+
+if (typeof fs.realpath.native === 'function') {
+ exports.realpath.native = u(fs.realpath.native)
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..d9468e6
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,27 @@
+'use strict'
+
+module.exports = {
+ // Export promiseified graceful-fs:
+ ...require('./fs'),
+ // Export extra methods:
+ ...require('./copy-sync'),
+ ...require('./copy'),
+ ...require('./empty'),
+ ...require('./ensure'),
+ ...require('./json'),
+ ...require('./mkdirs'),
+ ...require('./move-sync'),
+ ...require('./move'),
+ ...require('./output'),
+ ...require('./path-exists'),
+ ...require('./remove')
+}
+
+// Export fs.promises as a getter property so that we don't trigger
+// ExperimentalWarning before fs.promises is actually accessed.
+const fs = require('fs')
+if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
+ Object.defineProperty(module.exports, 'promises', {
+ get () { return fs.promises }
+ })
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/json/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..900126a
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..f11d34d
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: jsonFile.readFile,
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: jsonFile.writeFile,
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..f76b474
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFileSync } = require('../output')
+
+function outputJsonSync (file, data, options) {
+ const str = stringify(data, options)
+
+ outputFileSync(file, str, options)
+}
+
+module.exports = outputJsonSync
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..0fc6689
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFile } = require('../output')
+
+async function outputJson (file, data, options = {}) {
+ const str = stringify(data, options)
+
+ await outputFile(file, str, options)
+}
+
+module.exports = outputJson
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..9edecee
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromPromise
+const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
+const makeDir = u(_makeDir)
+
+module.exports = {
+ mkdirs: makeDir,
+ mkdirsSync: makeDirSync,
+ // alias
+ mkdirp: makeDir,
+ mkdirpSync: makeDirSync,
+ ensureDir: makeDir,
+ ensureDirSync: makeDirSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/make-dir.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/make-dir.js
new file mode 100644
index 0000000..3e7e836
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/mkdirs/make-dir.js
@@ -0,0 +1,141 @@
+// Adapted from https://github.com/sindresorhus/make-dir
+// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+'use strict'
+const fs = require('../fs')
+const path = require('path')
+const atLeastNode = require('at-least-node')
+
+const useNativeRecursiveOption = atLeastNode('10.12.0')
+
+// https://github.com/nodejs/node/issues/8987
+// https://github.com/libuv/libuv/pull/1088
+const checkPath = pth => {
+ if (process.platform === 'win32') {
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
+
+ if (pathHasInvalidWinCharacters) {
+ const error = new Error(`Path contains invalid characters: ${pth}`)
+ error.code = 'EINVAL'
+ throw error
+ }
+ }
+}
+
+const processOptions = options => {
+ const defaults = { mode: 0o777 }
+ if (typeof options === 'number') options = { mode: options }
+ return { ...defaults, ...options }
+}
+
+const permissionError = pth => {
+ // This replicates the exception of `fs.mkdir` with native the
+ // `recusive` option when run on an invalid drive under Windows.
+ const error = new Error(`operation not permitted, mkdir '${pth}'`)
+ error.code = 'EPERM'
+ error.errno = -4048
+ error.path = pth
+ error.syscall = 'mkdir'
+ return error
+}
+
+module.exports.makeDir = async (input, options) => {
+ checkPath(input)
+ options = processOptions(options)
+
+ if (useNativeRecursiveOption) {
+ const pth = path.resolve(input)
+
+ return fs.mkdir(pth, {
+ mode: options.mode,
+ recursive: true
+ })
+ }
+
+ const make = async pth => {
+ try {
+ await fs.mkdir(pth, options.mode)
+ } catch (error) {
+ if (error.code === 'EPERM') {
+ throw error
+ }
+
+ if (error.code === 'ENOENT') {
+ if (path.dirname(pth) === pth) {
+ throw permissionError(pth)
+ }
+
+ if (error.message.includes('null bytes')) {
+ throw error
+ }
+
+ await make(path.dirname(pth))
+ return make(pth)
+ }
+
+ try {
+ const stats = await fs.stat(pth)
+ if (!stats.isDirectory()) {
+ // This error is never exposed to the user
+ // it is caught below, and the original error is thrown
+ throw new Error('The path is not a directory')
+ }
+ } catch {
+ throw error
+ }
+ }
+ }
+
+ return make(path.resolve(input))
+}
+
+module.exports.makeDirSync = (input, options) => {
+ checkPath(input)
+ options = processOptions(options)
+
+ if (useNativeRecursiveOption) {
+ const pth = path.resolve(input)
+
+ return fs.mkdirSync(pth, {
+ mode: options.mode,
+ recursive: true
+ })
+ }
+
+ const make = pth => {
+ try {
+ fs.mkdirSync(pth, options.mode)
+ } catch (error) {
+ if (error.code === 'EPERM') {
+ throw error
+ }
+
+ if (error.code === 'ENOENT') {
+ if (path.dirname(pth) === pth) {
+ throw permissionError(pth)
+ }
+
+ if (error.message.includes('null bytes')) {
+ throw error
+ }
+
+ make(path.dirname(pth))
+ return make(pth)
+ }
+
+ try {
+ if (!fs.statSync(pth).isDirectory()) {
+ // This error is never exposed to the user
+ // it is caught below, and the original error is thrown
+ throw new Error('The path is not a directory')
+ }
+ } catch {
+ throw error
+ }
+ }
+ }
+
+ return make(path.resolve(input))
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/index.js
new file mode 100644
index 0000000..af90b06
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ moveSync: require('./move-sync')
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/move-sync.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/move-sync.js
new file mode 100644
index 0000000..20f910c
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/move-sync/move-sync.js
@@ -0,0 +1,47 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy-sync').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirpSync
+const stat = require('../util/stat')
+
+function moveSync (src, dest, opts) {
+ opts = opts || {}
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ const { srcStat } = stat.checkPathsSync(src, dest, 'move')
+ stat.checkParentPathsSync(src, srcStat, dest, 'move')
+ mkdirpSync(path.dirname(dest))
+ return doRename(src, dest, overwrite)
+}
+
+function doRename (src, dest, overwrite) {
+ if (overwrite) {
+ removeSync(dest)
+ return rename(src, dest, overwrite)
+ }
+ if (fs.existsSync(dest)) throw new Error('dest already exists.')
+ return rename(src, dest, overwrite)
+}
+
+function rename (src, dest, overwrite) {
+ try {
+ fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code !== 'EXDEV') throw err
+ return moveAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveAcrossDevice (src, dest, overwrite) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copySync(src, dest, opts)
+ return removeSync(src)
+}
+
+module.exports = moveSync
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/move/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..3785345
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ move: u(require('./move'))
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/move/move.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/move/move.js
new file mode 100644
index 0000000..fa3ea61
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/move/move.js
@@ -0,0 +1,65 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copy = require('../copy').copy
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirp
+const pathExists = require('../path-exists').pathExists
+const stat = require('../util/stat')
+
+function move (src, dest, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ stat.checkPaths(src, dest, 'move', (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'move', err => {
+ if (err) return cb(err)
+ mkdirp(path.dirname(dest), err => {
+ if (err) return cb(err)
+ return doRename(src, dest, overwrite, cb)
+ })
+ })
+ })
+}
+
+function doRename (src, dest, overwrite, cb) {
+ if (overwrite) {
+ return remove(dest, err => {
+ if (err) return cb(err)
+ return rename(src, dest, overwrite, cb)
+ })
+ }
+ pathExists(dest, (err, destExists) => {
+ if (err) return cb(err)
+ if (destExists) return cb(new Error('dest already exists.'))
+ return rename(src, dest, overwrite, cb)
+ })
+}
+
+function rename (src, dest, overwrite, cb) {
+ fs.rename(src, dest, err => {
+ if (!err) return cb()
+ if (err.code !== 'EXDEV') return cb(err)
+ return moveAcrossDevice(src, dest, overwrite, cb)
+ })
+}
+
+function moveAcrossDevice (src, dest, overwrite, cb) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copy(src, dest, opts, err => {
+ if (err) return cb(err)
+ return remove(src, cb)
+ })
+}
+
+module.exports = move
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/output/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/output/index.js
new file mode 100644
index 0000000..92297ca
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/output/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, ...args) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync(file, ...args)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync(file, ...args)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/remove/index.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..cee5340
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,9 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const rimraf = require('./rimraf')
+
+module.exports = {
+ remove: u(rimraf),
+ removeSync: rimraf.sync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/remove/rimraf.js
new file mode 100644
index 0000000..2c77102
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/remove/rimraf.js
@@ -0,0 +1,302 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const assert = require('assert')
+
+const isWindows = (process.platform === 'win32')
+
+function defaults (options) {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+}
+
+function rimraf (p, options, cb) {
+ let busyTries = 0
+
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
+ busyTries < options.maxBusyTries) {
+ busyTries++
+ const time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), time)
+ }
+
+ // already gone
+ if (er.code === 'ENOENT') er = null
+ }
+
+ cb(er)
+ })
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === 'ENOENT') {
+ return cb(null)
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === 'EPERM' && isWindows) {
+ return fixWinEPERM(p, options, er, cb)
+ }
+
+ if (st && st.isDirectory()) {
+ return rmdir(p, options, er, cb)
+ }
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === 'ENOENT') {
+ return cb(null)
+ }
+ if (er.code === 'EPERM') {
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ }
+ if (er.code === 'EISDIR') {
+ return rmdir(p, options, er, cb)
+ }
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2) {
+ cb(er2.code === 'ENOENT' ? null : er)
+ } else {
+ options.stat(p, (er3, stats) => {
+ if (er3) {
+ cb(er3.code === 'ENOENT' ? null : er)
+ } else if (stats.isDirectory()) {
+ rmdir(p, options, er, cb)
+ } else {
+ options.unlink(p, cb)
+ }
+ })
+ }
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ let stats
+
+ assert(p)
+ assert(options)
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ if (stats.isDirectory()) {
+ rmdirSync(p, options, er)
+ } else {
+ options.unlinkSync(p)
+ }
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
+ rmkids(p, options, cb)
+ } else if (er && er.code === 'ENOTDIR') {
+ cb(originalEr)
+ } else {
+ cb(er)
+ }
+ })
+}
+
+function rmkids (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er) return cb(er)
+
+ let n = files.length
+ let errState
+
+ if (n === 0) return options.rmdir(p, cb)
+
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState) {
+ return
+ }
+ if (er) return cb(errState = er)
+ if (--n === 0) {
+ options.rmdir(p, cb)
+ }
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ let st
+
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === 'EPERM' && isWindows) {
+ fixWinEPERMSync(p, options, er)
+ }
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory()) {
+ rmdirSync(p, options, null)
+ } else {
+ options.unlinkSync(p)
+ }
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ } else if (er.code === 'EPERM') {
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ } else if (er.code !== 'EISDIR') {
+ throw er
+ }
+ rmdirSync(p, options, er)
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === 'ENOTDIR') {
+ throw originalEr
+ } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
+ rmkidsSync(p, options)
+ } else if (er.code !== 'ENOENT') {
+ throw er
+ }
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ if (isWindows) {
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const startTime = Date.now()
+ do {
+ try {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ } catch {}
+ } while (Date.now() - startTime < 500) // give up after 500ms
+ } else {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ }
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/util/stat.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/util/stat.js
new file mode 100644
index 0000000..0b1c1b0
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/util/stat.js
@@ -0,0 +1,139 @@
+'use strict'
+
+const fs = require('../fs')
+const path = require('path')
+const util = require('util')
+const atLeastNode = require('at-least-node')
+
+const nodeSupportsBigInt = atLeastNode('10.5.0')
+const stat = (file) => nodeSupportsBigInt ? fs.stat(file, { bigint: true }) : fs.stat(file)
+const statSync = (file) => nodeSupportsBigInt ? fs.statSync(file, { bigint: true }) : fs.statSync(file)
+
+function getStats (src, dest) {
+ return Promise.all([
+ stat(src),
+ stat(dest).catch(err => {
+ if (err.code === 'ENOENT') return null
+ throw err
+ })
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
+}
+
+function getStatsSync (src, dest) {
+ let destStat
+ const srcStat = statSync(src)
+ try {
+ destStat = statSync(dest)
+ } catch (err) {
+ if (err.code === 'ENOENT') return { srcStat, destStat: null }
+ throw err
+ }
+ return { srcStat, destStat }
+}
+
+function checkPaths (src, dest, funcName, cb) {
+ util.callbackify(getStats)(src, dest, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ if (destStat && areIdentical(srcStat, destStat)) {
+ return cb(new Error('Source and destination must not be the same.'))
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return cb(null, { srcStat, destStat })
+ })
+}
+
+function checkPathsSync (src, dest, funcName) {
+ const { srcStat, destStat } = getStatsSync(src, dest)
+ if (destStat && areIdentical(srcStat, destStat)) {
+ throw new Error('Source and destination must not be the same.')
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return { srcStat, destStat }
+}
+
+// recursively check if dest parent is a subdirectory of src.
+// It works for all file types including symlinks since it
+// checks the src and dest inodes. It starts from the deepest
+// parent and stops once it reaches the src parent or the root path.
+function checkParentPaths (src, srcStat, dest, funcName, cb) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
+ const callback = (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb()
+ return cb(err)
+ }
+ if (areIdentical(srcStat, destStat)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return checkParentPaths(src, srcStat, destParent, funcName, cb)
+ }
+ if (nodeSupportsBigInt) fs.stat(destParent, { bigint: true }, callback)
+ else fs.stat(destParent, callback)
+}
+
+function checkParentPathsSync (src, srcStat, dest, funcName) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return
+ let destStat
+ try {
+ destStat = statSync(destParent)
+ } catch (err) {
+ if (err.code === 'ENOENT') return
+ throw err
+ }
+ if (areIdentical(srcStat, destStat)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return checkParentPathsSync(src, srcStat, destParent, funcName)
+}
+
+function areIdentical (srcStat, destStat) {
+ if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
+ if (nodeSupportsBigInt || destStat.ino < Number.MAX_SAFE_INTEGER) {
+ // definitive answer
+ return true
+ }
+ // Use additional heuristics if we can't use 'bigint'.
+ // Different 'ino' could be represented the same if they are >= Number.MAX_SAFE_INTEGER
+ // See issue 657
+ if (destStat.size === srcStat.size &&
+ destStat.mode === srcStat.mode &&
+ destStat.nlink === srcStat.nlink &&
+ destStat.atimeMs === srcStat.atimeMs &&
+ destStat.mtimeMs === srcStat.mtimeMs &&
+ destStat.ctimeMs === srcStat.ctimeMs &&
+ destStat.birthtimeMs === srcStat.birthtimeMs) {
+ // heuristic answer
+ return true
+ }
+ }
+ return false
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// It only checks the path strings.
+function isSrcSubdir (src, dest) {
+ const srcArr = path.resolve(src).split(path.sep).filter(i => i)
+ const destArr = path.resolve(dest).split(path.sep).filter(i => i)
+ return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
+}
+
+function errMsg (src, dest, funcName) {
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
+}
+
+module.exports = {
+ checkPaths,
+ checkPathsSync,
+ checkParentPaths,
+ checkParentPathsSync,
+ isSrcSubdir
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/lib/util/utimes.js b/node_modules/@electron/universal/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..75395de
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,26 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+function utimesMillisSync (path, atime, mtime) {
+ const fd = fs.openSync(path, 'r+')
+ fs.futimesSync(fd, atime, mtime)
+ return fs.closeSync(fd)
+}
+
+module.exports = {
+ utimesMillis,
+ utimesMillisSync
+}
diff --git a/node_modules/@electron/universal/node_modules/fs-extra/package.json b/node_modules/@electron/universal/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..6f7d8dd
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/fs-extra/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "fs-extra",
+ "version": "9.1.0",
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
+ "engines": {
+ "node": ">=10"
+ },
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jprichardson/node-fs-extra"
+ },
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move",
+ "promise"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "at-least-node": "^1.0.0",
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "devDependencies": {
+ "coveralls": "^3.0.0",
+ "klaw": "^2.1.1",
+ "klaw-sync": "^3.0.2",
+ "minimist": "^1.1.1",
+ "mocha": "^5.0.5",
+ "nyc": "^15.0.0",
+ "proxyquire": "^2.0.1",
+ "read-dir-files": "^0.1.1",
+ "standard": "^14.1.0"
+ },
+ "main": "./lib/index.js",
+ "files": [
+ "lib/",
+ "!lib/**/__tests__/"
+ ],
+ "scripts": {
+ "full-ci": "npm run lint && npm run coverage",
+ "coverage": "nyc -r lcovonly npm run unit",
+ "coveralls": "coveralls < coverage/lcov.info",
+ "lint": "standard",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "test": "npm run lint && npm run unit",
+ "unit": "node test.js"
+ }
+}
diff --git a/node_modules/@electron/universal/node_modules/jsonfile/CHANGELOG.md b/node_modules/@electron/universal/node_modules/jsonfile/CHANGELOG.md
new file mode 100644
index 0000000..d772e43
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/jsonfile/CHANGELOG.md
@@ -0,0 +1,171 @@
+6.1.0 / 2020-10-31
+------------------
+
+- Add `finalEOL` option to disable writing final EOL ([#115](https://github.com/jprichardson/node-jsonfile/issues/115), [#137](https://github.com/jprichardson/node-jsonfile/pull/137))
+- Update dependency ([#138](https://github.com/jprichardson/node-jsonfile/pull/138))
+
+6.0.1 / 2020-03-07
+------------------
+
+- Update dependency ([#130](https://github.com/jprichardson/node-jsonfile/pull/130))
+- Fix code style ([#129](https://github.com/jprichardson/node-jsonfile/pull/129))
+
+6.0.0 / 2020-02-24
+------------------
+
+- **BREAKING:** Drop support for Node 6 & 8 ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- **BREAKING:** Do not allow passing `null` as options to `readFile()` or `writeFile()` ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- Refactor internals ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+
+5.0.0 / 2018-09-08
+------------------
+
+- **BREAKING:** Drop Node 4 support
+- **BREAKING:** If no callback is passed to an asynchronous method, a promise is now returned ([#109](https://github.com/jprichardson/node-jsonfile/pull/109))
+- Cleanup docs
+
+4.0.0 / 2017-07-12
+------------------
+
+- **BREAKING:** Remove global `spaces` option.
+- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js.
+- Remove undocumented `passParsingErrors` option.
+- Added `EOL` override option to `writeFile` when using `spaces`. [#89]
+
+3.0.1 / 2017-07-05
+------------------
+
+- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written.
+
+3.0.0 / 2017-04-25
+------------------
+
+- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false`
+
+2.4.0 / 2016-09-15
+------------------
+### Changed
+- added optional support for `graceful-fs` [#62]
+
+2.3.1 / 2016-05-13
+------------------
+- fix to support BOM. [#45][#45]
+
+2.3.0 / 2016-04-16
+------------------
+- add `throws` to `readFile()`. See [#39][#39]
+- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs)
+
+2.2.3 / 2015-10-14
+------------------
+- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34
+
+2.2.2 / 2015-09-16
+------------------
+- split out tests into separate files
+- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33
+
+2.2.1 / 2015-06-25
+------------------
+- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28
+
+2.2.0 / 2015-06-25
+------------------
+- added `options.spaces` to `writeFile()` and `writeFileSync()`
+
+2.1.2 / 2015-06-22
+------------------
+- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25
+
+2.1.1 / 2015-06-19
+------------------
+- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24
+
+2.1.0 / 2015-06-19
+------------------
+- cleanup: JavaScript Standard Style, rename files, dropped terst for assert
+- methods now support JSON revivers/replacers
+
+2.0.1 / 2015-05-24
+------------------
+- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21
+
+2.0.0 / 2014-07-28
+------------------
+* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14)
+* added `options.throws` to `readFileSync()`
+* dropped support for Node v0.8
+
+1.2.0 / 2014-06-29
+------------------
+* removed semicolons
+* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but
+changes it according to docs. [#12][#12]
+
+1.1.1 / 2013-11-11
+------------------
+* fixed catching of callback bug (ffissore / #5)
+
+1.1.0 / 2013-10-11
+------------------
+* added `options` param to methods, (seanodell / #4)
+
+1.0.1 / 2013-09-05
+------------------
+* removed `homepage` field from package.json to remove NPM warning
+
+1.0.0 / 2013-06-28
+------------------
+* added `.npmignore`, #1
+* changed spacing default from `4` to `2` to follow Node conventions
+
+0.0.1 / 2012-09-10
+------------------
+* Initial release.
+
+[#89]: https://github.com/jprichardson/node-jsonfile/pull/89
+[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails"
+[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file"
+[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file"
+[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch"
+[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working"
+[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value"
+[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)"
+[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature"
+[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file"
+[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file."
+[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file."
+[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename"
+[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()"
+[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?"
+[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string"
+[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?"
+[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?"
+[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken "
+[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality"
+[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra"
+[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods"
+[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error"
+[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync"
+[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated"
+[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute"
+[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity"
+[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method"
+[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods"
+[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem"
+[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null"
+[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`"
+[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF"
+[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline"
+[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options"
+[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync"
+[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile"
+[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example."
+[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me."
+[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message"
+[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible"
+[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite."
+[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync"
+[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2"
+[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted."
+[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file"
diff --git a/node_modules/@electron/universal/node_modules/jsonfile/LICENSE b/node_modules/@electron/universal/node_modules/jsonfile/LICENSE
new file mode 100644
index 0000000..cb7e807
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/jsonfile/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2012-2015, JP Richardson <jprichardson@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@electron/universal/node_modules/jsonfile/README.md b/node_modules/@electron/universal/node_modules/jsonfile/README.md
new file mode 100644
index 0000000..910cde0
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/jsonfile/README.md
@@ -0,0 +1,230 @@
+Node.js - jsonfile
+================
+
+Easily read/write JSON files in Node.js. _Note: this module cannot be used in the browser._
+
+[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile)
+[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
+
+<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
+
+Why?
+----
+
+Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
+
+
+
+Installation
+------------
+
+ npm install --save jsonfile
+
+
+
+API
+---
+
+* [`readFile(filename, [options], callback)`](#readfilefilename-options-callback)
+* [`readFileSync(filename, [options])`](#readfilesyncfilename-options)
+* [`writeFile(filename, obj, [options], callback)`](#writefilefilename-obj-options-callback)
+* [`writeFileSync(filename, obj, [options])`](#writefilesyncfilename-obj-options)
+
+----
+
+### readFile(filename, [options], callback)
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+ - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
+ If `false`, returns `null` for the object.
+
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file, function (err, obj) {
+ if (err) console.error(err)
+ console.dir(obj)
+})
+```
+
+You can also use this method with promises. The `readFile` method will return a promise if you do not pass a callback function.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file)
+ .then(obj => console.dir(obj))
+ .catch(error => console.error(error))
+```
+
+----
+
+### readFileSync(filename, [options])
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+
+console.dir(jsonfile.readFileSync(file))
+```
+
+----
+
+### writeFile(filename, obj, [options], callback)
+
+`options`: Pass in any [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, function (err) {
+ if (err) console.error(err)
+})
+```
+Or use with promises as follows:
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj)
+ .then(res => {
+ console.log('Write complete')
+ })
+ .catch(error => console.error(error))
+```
+
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2 }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, finalEOL: false }, function (err) {
+ if (err) console.log(err)
+})
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFile` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { flag: 'a' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+----
+
+### writeFileSync(filename, obj, [options])
+
+`options`: Pass in any [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj)
+```
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2 })
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' })
+```
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, finalEOL: false })
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFileSync` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { flag: 'a' })
+```
+
+License
+-------
+
+(MIT License)
+
+Copyright 2012-2016, JP Richardson <jprichardson@gmail.com>
diff --git a/node_modules/@electron/universal/node_modules/jsonfile/index.js b/node_modules/@electron/universal/node_modules/jsonfile/index.js
new file mode 100644
index 0000000..0582868
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/jsonfile/index.js
@@ -0,0 +1,88 @@
+let _fs
+try {
+ _fs = require('graceful-fs')
+} catch (_) {
+ _fs = require('fs')
+}
+const universalify = require('universalify')
+const { stringify, stripBom } = require('./utils')
+
+async function _readFile (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ let data = await universalify.fromCallback(fs.readFile)(file, options)
+
+ data = stripBom(data)
+
+ let obj
+ try {
+ obj = JSON.parse(data, options ? options.reviver : null)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+
+ return obj
+}
+
+const readFile = universalify.fromPromise(_readFile)
+
+function readFileSync (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ try {
+ let content = fs.readFileSync(file, options)
+ content = stripBom(content)
+ return JSON.parse(content, options.reviver)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+}
+
+async function _writeFile (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+
+ await universalify.fromCallback(fs.writeFile)(file, str, options)
+}
+
+const writeFile = universalify.fromPromise(_writeFile)
+
+function writeFileSync (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+ // not sure if fs.writeFileSync returns anything, but just in case
+ return fs.writeFileSync(file, str, options)
+}
+
+const jsonfile = {
+ readFile,
+ readFileSync,
+ writeFile,
+ writeFileSync
+}
+
+module.exports = jsonfile
diff --git a/node_modules/@electron/universal/node_modules/jsonfile/package.json b/node_modules/@electron/universal/node_modules/jsonfile/package.json
new file mode 100644
index 0000000..4d01eb1
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/jsonfile/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "jsonfile",
+ "version": "6.1.0",
+ "description": "Easily read/write JSON files.",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:jprichardson/node-jsonfile.git"
+ },
+ "keywords": [
+ "read",
+ "write",
+ "file",
+ "json",
+ "fs",
+ "fs-extra"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ },
+ "devDependencies": {
+ "mocha": "^8.2.0",
+ "rimraf": "^2.4.0",
+ "standard": "^16.0.1"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js",
+ "utils.js"
+ ],
+ "scripts": {
+ "lint": "standard",
+ "test": "npm run lint && npm run unit",
+ "unit": "mocha"
+ }
+}
diff --git a/node_modules/@electron/universal/node_modules/jsonfile/utils.js b/node_modules/@electron/universal/node_modules/jsonfile/utils.js
new file mode 100644
index 0000000..b5ff48e
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/jsonfile/utils.js
@@ -0,0 +1,14 @@
+function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
+ const EOF = finalEOL ? EOL : ''
+ const str = JSON.stringify(obj, replacer, spaces)
+
+ return str.replace(/\n/g, EOL) + EOF
+}
+
+function stripBom (content) {
+ // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
+ if (Buffer.isBuffer(content)) content = content.toString('utf8')
+ return content.replace(/^\uFEFF/, '')
+}
+
+module.exports = { stringify, stripBom }
diff --git a/node_modules/@electron/universal/node_modules/ms/index.js b/node_modules/@electron/universal/node_modules/ms/index.js
new file mode 100644
index 0000000..c4498bc
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/@electron/universal/node_modules/ms/license.md b/node_modules/@electron/universal/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@electron/universal/node_modules/ms/package.json b/node_modules/@electron/universal/node_modules/ms/package.json
new file mode 100644
index 0000000..eea666e
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.1.2",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ }
+}
diff --git a/node_modules/@electron/universal/node_modules/ms/readme.md b/node_modules/@electron/universal/node_modules/ms/readme.md
new file mode 100644
index 0000000..9a1996b
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/@electron/universal/node_modules/universalify/LICENSE b/node_modules/@electron/universal/node_modules/universalify/LICENSE
new file mode 100644
index 0000000..514e84e
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/universalify/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2017, Ryan Zimmerman <opensrc@ryanzim.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the 'Software'), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@electron/universal/node_modules/universalify/README.md b/node_modules/@electron/universal/node_modules/universalify/README.md
new file mode 100644
index 0000000..aa12474
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/universalify/README.md
@@ -0,0 +1,76 @@
+# universalify
+
+[![Travis branch](https://img.shields.io/travis/RyanZim/universalify/master.svg)](https://travis-ci.org/RyanZim/universalify)
+![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg)
+![npm](https://img.shields.io/npm/dm/universalify.svg)
+![npm](https://img.shields.io/npm/l/universalify.svg)
+
+Make a callback- or promise-based function support both promises and callbacks.
+
+Uses the native promise implementation.
+
+## Installation
+
+```bash
+npm install universalify
+```
+
+## API
+
+### `universalify.fromCallback(fn)`
+
+Takes a callback-based function to universalify, and returns the universalified function.
+
+Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once.
+
+```js
+function callbackFn (n, cb) {
+ setTimeout(() => cb(null, n), 15)
+}
+
+const fn = universalify.fromCallback(callbackFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+### `universalify.fromPromise(fn)`
+
+Takes a promise-based function to universalify, and returns the universalified function.
+
+Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned.
+
+```js
+function promiseFn (n) {
+ return new Promise(resolve => {
+ setTimeout(() => resolve(n), 15)
+ })
+}
+
+const fn = universalify.fromPromise(promiseFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+## License
+
+MIT
diff --git a/node_modules/@electron/universal/node_modules/universalify/index.js b/node_modules/@electron/universal/node_modules/universalify/index.js
new file mode 100644
index 0000000..ba6c662
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/universalify/index.js
@@ -0,0 +1,24 @@
+'use strict'
+
+exports.fromCallback = function (fn) {
+ return Object.defineProperty(function (...args) {
+ if (typeof args[args.length - 1] === 'function') fn.apply(this, args)
+ else {
+ return new Promise((resolve, reject) => {
+ fn.call(
+ this,
+ ...args,
+ (err, res) => (err != null) ? reject(err) : resolve(res)
+ )
+ })
+ }
+ }, 'name', { value: fn.name })
+}
+
+exports.fromPromise = function (fn) {
+ return Object.defineProperty(function (...args) {
+ const cb = args[args.length - 1]
+ if (typeof cb !== 'function') return fn.apply(this, args)
+ else fn.apply(this, args.slice(0, -1)).then(r => cb(null, r), cb)
+ }, 'name', { value: fn.name })
+}
diff --git a/node_modules/@electron/universal/node_modules/universalify/package.json b/node_modules/@electron/universal/node_modules/universalify/package.json
new file mode 100644
index 0000000..006d4cc
--- /dev/null
+++ b/node_modules/@electron/universal/node_modules/universalify/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "universalify",
+ "version": "2.0.0",
+ "description": "Make a callback- or promise-based function support both promises and callbacks.",
+ "keywords": [
+ "callback",
+ "native",
+ "promise"
+ ],
+ "homepage": "https://github.com/RyanZim/universalify#readme",
+ "bugs": "https://github.com/RyanZim/universalify/issues",
+ "license": "MIT",
+ "author": "Ryan Zimmerman <opensrc@ryanzim.com>",
+ "files": [
+ "index.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/RyanZim/universalify.git"
+ },
+ "scripts": {
+ "test": "standard && nyc tape test/*.js | colortape"
+ },
+ "devDependencies": {
+ "colortape": "^0.1.2",
+ "coveralls": "^3.0.1",
+ "nyc": "^15.0.0",
+ "standard": "^14.3.1",
+ "tape": "^5.0.1"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+}
diff --git a/node_modules/@electron/universal/package.json b/node_modules/@electron/universal/package.json
new file mode 100644
index 0000000..11877b9
--- /dev/null
+++ b/node_modules/@electron/universal/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "@electron/universal",
+ "version": "1.3.0",
+ "description": "Utility for creating Universal macOS applications from two x64 and arm64 Electron applications",
+ "main": "dist/cjs/index.js",
+ "module": "dist/esm/index.js",
+ "license": "MIT",
+ "keywords": [
+ "electron",
+ "apple silicon",
+ "universal"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/electron/universal.git"
+ },
+ "engines": {
+ "node": ">=8.6"
+ },
+ "files": [
+ "dist/*",
+ "entry-asar/*",
+ "README.md"
+ ],
+ "author": "Samuel Attard",
+ "scripts": {
+ "build": "tsc && tsc -p tsconfig.esm.json",
+ "lint": "prettier --check \"src/**/*.ts\"",
+ "prepublishOnly": "npm run build",
+ "test": "exit 0"
+ },
+ "devDependencies": {
+ "@continuous-auth/semantic-release-npm": "^2.0.0",
+ "@types/debug": "^4.1.5",
+ "@types/fs-extra": "^9.0.4",
+ "@types/minimatch": "^3.0.5",
+ "@types/node": "^14.14.7",
+ "@types/plist": "^3.0.2",
+ "husky": "^4.3.0",
+ "lint-staged": "^10.5.1",
+ "prettier": "^2.1.2",
+ "semantic-release": "^17.2.2",
+ "typescript": "^4.0.5"
+ },
+ "dependencies": {
+ "@malept/cross-spawn-promise": "^1.1.0",
+ "asar": "^3.1.0",
+ "debug": "^4.3.1",
+ "dir-compare": "^2.4.0",
+ "fs-extra": "^9.0.1",
+ "minimatch": "^3.0.4",
+ "plist": "^3.0.4"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "*.ts": [
+ "prettier --write"
+ ]
+ }
+}
diff --git a/node_modules/@malept/cross-spawn-promise/LICENSE b/node_modules/@malept/cross-spawn-promise/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/node_modules/@malept/cross-spawn-promise/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@malept/cross-spawn-promise/README.md b/node_modules/@malept/cross-spawn-promise/README.md
new file mode 100644
index 0000000..82d4cdb
--- /dev/null
+++ b/node_modules/@malept/cross-spawn-promise/README.md
@@ -0,0 +1,27 @@
+# `@malept/cross-spawn-promise`
+
+> A promisified version of [`cross-spawn`](https://npm.im/cross-spawn) with slightly different behavior & extra options.
+
+[![CI](https://github.com/malept/cross-spawn-promise/workflows/CI/badge.svg)](https://github.com/malept/cross-spawn-promise/actions?query=workflow%3ACI)
+[![NPM package](https://img.shields.io/npm/v/@malept/cross-spawn-promise.svg)](https://www.npmjs.com/package/@malept/cross-spawn-promise)
+[![codecov](https://codecov.io/gh/malept/cross-spawn-promise/branch/master/graph/badge.svg)](https://codecov.io/gh/malept/cross-spawn-promise)
+
+## Different Behavior
+
+If the spawned process exits with a non-zero code, an `ExitCodeError` is thrown with the original
+command, code, `stdout`, and `stderr` as properties.
+
+If the spawned process is terminated by a signal on non-Windows platforms, an `ExitSignalError` is
+thrown with the original command, signal name, `stdout`, and `stderr` as properties.
+
+## Extra Options
+
+- `logger`: a `Function` such as `console.log` or `debug(name)` to log some information
+ about the spawned process.
+- `updateErrorCallback`: a callback which mutates the error before it is re-thrown. Most commonly,
+ this is used to augment the error message of `ENOENT` error to provide a more human-friendly
+ message as to how to install the missing executable.
+
+## Legal
+
+This module is licensed under the Apache 2.0 license.
diff --git a/node_modules/@malept/cross-spawn-promise/dist/src/index.d.ts b/node_modules/@malept/cross-spawn-promise/dist/src/index.d.ts
new file mode 100644
index 0000000..68789ac
--- /dev/null
+++ b/node_modules/@malept/cross-spawn-promise/dist/src/index.d.ts
@@ -0,0 +1,61 @@
+/// <reference types="node" />
+import { SpawnOptions } from "child_process";
+export declare type LoggerFunction = (message: string) => void;
+/**
+ * List of string arguments.
+ */
+export declare type CrossSpawnArgs = ReadonlyArray<string> | undefined;
+export declare type CrossSpawnOptions = SpawnOptions & {
+ /**
+ * A `Function` such as `console.log` or `debug(name)` to log some information about the
+ * spawned process.
+ */
+ logger?: LoggerFunction;
+ /**
+ * A callback which mutates the error before it is rethrown. Most commonly, this is used to
+ * augment the error message of `ENOENT` errors to provide a more human-friendly message as to
+ * how to install the missing executable.
+ *
+ * @param error - The error thrown from the `spawn` function
+ * @param hasLogger - Whether `logger` was set
+ */
+ updateErrorCallback?: (error: Error, hasLogger: boolean) => void;
+};
+/**
+ * Wrapper error for when the spawn function itself emits an error.
+ */
+export declare class CrossSpawnError extends Error {
+ originalError: Error;
+ constructor(cmd: string, args: CrossSpawnArgs, originalError: Error, stderr: string);
+}
+/**
+ * Base error class for when a process does not exit with a status code of zero.
+ */
+export declare abstract class ExitError extends Error {
+ cmd: string;
+ args: CrossSpawnArgs;
+ stdout: string;
+ stderr: string;
+ constructor(cmd: string, args: CrossSpawnArgs, message: string, stdout: string, stderr: string);
+}
+/**
+ * The error thrown when a process emits a non-zero exit code.
+ */
+export declare class ExitCodeError extends ExitError {
+ code: number;
+ constructor(cmd: string, args: CrossSpawnArgs, code: number, stdout: string, stderr: string);
+}
+/**
+ * The error thrown when a process exits via a signal.
+ */
+export declare class ExitSignalError extends ExitError {
+ signal: string;
+ constructor(cmd: string, args: CrossSpawnArgs, signal: string, stdout: string, stderr: string);
+}
+/**
+ * A wrapper around `cross-spawn`'s `spawn` function which can optionally log the command executed
+ * and/or change the error object via a callback.
+ *
+ * @param cmd - The command to run
+ */
+export declare function spawn(cmd: string, args?: CrossSpawnArgs, options?: CrossSpawnOptions): Promise<string>;
diff --git a/node_modules/@malept/cross-spawn-promise/dist/src/index.js b/node_modules/@malept/cross-spawn-promise/dist/src/index.js
new file mode 100644
index 0000000..bed7db1
--- /dev/null
+++ b/node_modules/@malept/cross-spawn-promise/dist/src/index.js
@@ -0,0 +1,111 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.spawn = exports.ExitSignalError = exports.ExitCodeError = exports.ExitError = exports.CrossSpawnError = void 0;
+const cross_spawn_1 = __importDefault(require("cross-spawn"));
+function stringifyCommand(cmd, args) {
+ if (args && Array.isArray(args) && args.length > 0) {
+ return `${cmd} ${args.join(" ")}`;
+ }
+ else {
+ return cmd;
+ }
+}
+/**
+ * Wrapper error for when the spawn function itself emits an error.
+ */
+class CrossSpawnError extends Error {
+ constructor(cmd, args, originalError, stderr) {
+ const fullCommand = stringifyCommand(cmd, args);
+ const errorMessage = originalError.message || originalError;
+ super(`Error executing command (${fullCommand}):\n${errorMessage}\n${stderr}`.trim());
+ this.originalError = originalError;
+ }
+}
+exports.CrossSpawnError = CrossSpawnError;
+/**
+ * Base error class for when a process does not exit with a status code of zero.
+ */
+class ExitError extends Error {
+ constructor(cmd, args, message, stdout, stderr) {
+ super(message);
+ this.cmd = cmd;
+ this.args = args;
+ this.stdout = stdout;
+ this.stderr = stderr;
+ }
+}
+exports.ExitError = ExitError;
+/**
+ * The error thrown when a process emits a non-zero exit code.
+ */
+class ExitCodeError extends ExitError {
+ constructor(cmd, args, code, stdout, stderr) {
+ const fullCommand = stringifyCommand(cmd, args);
+ super(cmd, args, `Command failed with a non-zero return code (${code}):\n${fullCommand}\n${stdout}\n${stderr}`.trim(), stdout, stderr);
+ this.code = code;
+ }
+}
+exports.ExitCodeError = ExitCodeError;
+/**
+ * The error thrown when a process exits via a signal.
+ */
+class ExitSignalError extends ExitError {
+ constructor(cmd, args, signal, stdout, stderr) {
+ const fullCommand = stringifyCommand(cmd, args);
+ super(cmd, args, `Command terminated via a signal (${signal}):\n${fullCommand}\n${stdout}\n${stderr}`.trim(), stdout, stderr);
+ this.signal = signal;
+ }
+}
+exports.ExitSignalError = ExitSignalError;
+/**
+ * A wrapper around `cross-spawn`'s `spawn` function which can optionally log the command executed
+ * and/or change the error object via a callback.
+ *
+ * @param cmd - The command to run
+ */
+async function spawn(cmd, args, options) {
+ if (!options) {
+ options = {};
+ }
+ const { logger, updateErrorCallback, ...spawnOptions } = options;
+ if (logger)
+ logger(`Executing command ${stringifyCommand(cmd, args)}`);
+ return new Promise((resolve, reject) => {
+ let stdout = "";
+ let stderr = "";
+ const process = cross_spawn_1.default(cmd, args, spawnOptions);
+ if (process.stdout) {
+ process.stdout.on("data", (data) => {
+ stdout += data.toString();
+ });
+ }
+ if (process.stderr) {
+ process.stderr.on("data",
+ /* istanbul ignore next */ (data) => {
+ stderr += data.toString();
+ });
+ }
+ process.on("close", (code, signal) => {
+ if (code === 0) {
+ resolve(stdout);
+ }
+ else if (code === null) {
+ reject(new ExitSignalError(cmd, args, signal, stdout, stderr));
+ }
+ else {
+ reject(new ExitCodeError(cmd, args, code, stdout, stderr));
+ }
+ });
+ process.on("error", (err) => {
+ if (updateErrorCallback) {
+ updateErrorCallback(err, !!logger);
+ }
+ reject(new CrossSpawnError(cmd, args, err, stderr));
+ });
+ });
+}
+exports.spawn = spawn;
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/@malept/cross-spawn-promise/dist/src/index.js.map b/node_modules/@malept/cross-spawn-promise/dist/src/index.js.map
new file mode 100644
index 0000000..730e0fb
--- /dev/null
+++ b/node_modules/@malept/cross-spawn-promise/dist/src/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAqC;AA4BrC,SAAS,gBAAgB,CAAC,GAAW,EAAE,IAA4B;IACjE,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QAClD,OAAO,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;KACnC;SAAM;QACL,OAAO,GAAG,CAAC;KACZ;AACH,CAAC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,KAAK;IAGxC,YACE,GAAW,EACX,IAAoB,EACpB,aAAoB,EACpB,MAAc;QAEd,MAAM,WAAW,GAAG,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,aAAa,CAAC,OAAO,IAAI,aAAa,CAAC;QAC5D,KAAK,CACH,4BAA4B,WAAW,OAAO,YAAY,KAAK,MAAM,EAAE,CAAC,IAAI,EAAE,CAC/E,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;CACF;AAhBD,0CAgBC;AAED;;GAEG;AACH,MAAsB,SAAU,SAAQ,KAAK;IAM3C,YACE,GAAW,EACX,IAAoB,EACpB,OAAe,EACf,MAAc,EACd,MAAc;QAEd,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAnBD,8BAmBC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,SAAS;IAG1C,YACE,GAAW,EACX,IAAoB,EACpB,IAAY,EACZ,MAAc,EACd,MAAc;QAEd,MAAM,WAAW,GAAG,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAChD,KAAK,CACH,GAAG,EACH,IAAI,EACJ,+CAA+C,IAAI,OAAO,WAAW,KAAK,MAAM,KAAK,MAAM,EAAE,CAAC,IAAI,EAAE,EACpG,MAAM,EACN,MAAM,CACP,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AApBD,sCAoBC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,SAAS;IAG5C,YACE,GAAW,EACX,IAAoB,EACpB,MAAc,EACd,MAAc,EACd,MAAc;QAEd,MAAM,WAAW,GAAG,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAChD,KAAK,CACH,GAAG,EACH,IAAI,EACJ,oCAAoC,MAAM,OAAO,WAAW,KAAK,MAAM,KAAK,MAAM,EAAE,CAAC,IAAI,EAAE,EAC3F,MAAM,EACN,MAAM,CACP,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AApBD,0CAoBC;AAED;;;;;GAKG;AACI,KAAK,UAAU,KAAK,CACzB,GAAW,EACX,IAAqB,EACrB,OAA2B;IAE3B,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,GAAG,EAAuB,CAAC;KACnC;IACD,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IACjE,IAAI,MAAM;QAAE,MAAM,CAAC,qBAAqB,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAEvE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,MAAM,OAAO,GAAG,qBAAU,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC5B,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,OAAO,CAAC,MAAM,CAAC,EAAE,CACf,MAAM;YACN,0BAA0B,CAAC,CAAC,IAAI,EAAE,EAAE;gBAClC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC5B,CAAC,CACF,CAAC;SACH;QACD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,IAAI,KAAK,CAAC,EAAE;gBACd,OAAO,CAAC,MAAM,CAAC,CAAC;aACjB;iBAAM,IAAI,IAAI,KAAK,IAAI,EAAE;gBACxB,MAAM,CAAC,IAAI,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;aAChE;iBAAM;gBACL,MAAM,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;aAC5D;QACH,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YAC1B,IAAI,mBAAmB,EAAE;gBACvB,mBAAmB,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;aACpC;YACD,MAAM,CAAC,IAAI,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA5CD,sBA4CC"} \ No newline at end of file
diff --git a/node_modules/@malept/cross-spawn-promise/package.json b/node_modules/@malept/cross-spawn-promise/package.json
new file mode 100644
index 0000000..aba2486
--- /dev/null
+++ b/node_modules/@malept/cross-spawn-promise/package.json
@@ -0,0 +1,110 @@
+{
+ "name": "@malept/cross-spawn-promise",
+ "version": "1.1.1",
+ "description": "Promisified version of cross-spawn",
+ "main": "dist/src/index.js",
+ "repository": "https://github.com/malept/cross-spawn-promise",
+ "author": "Mark Lee",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 10"
+ },
+ "scripts": {
+ "ava": "ava",
+ "build": "tsc",
+ "coverage": "nyc --reporter=lcov --reporter=text ava",
+ "docs": "typedoc src/index.ts",
+ "lint": "prettier --check . && eslint --ext .ts .",
+ "prepare": "npm run build",
+ "test": "yarn lint && yarn ava"
+ },
+ "files": [
+ "dist"
+ ],
+ "dependencies": {
+ "cross-spawn": "^7.0.1"
+ },
+ "devDependencies": {
+ "@istanbuljs/nyc-config-typescript": "^1.0.1",
+ "@types/cross-spawn": "^6.0.1",
+ "@typescript-eslint/eslint-plugin": "^4.0.1",
+ "@typescript-eslint/parser": "^4.0.1",
+ "ava": "^3.3.0",
+ "eslint": "^7.0.0",
+ "eslint-config-prettier": "^6.10.0",
+ "eslint-plugin-ava": "^11.0.0",
+ "eslint-plugin-import": "^2.20.1",
+ "eslint-plugin-prettier": "^3.1.2",
+ "eslint-plugin-promise": "^4.2.1",
+ "eslint-plugin-tsdoc": "^0.2.5",
+ "husky": "^4.2.1",
+ "lint-staged": "^10.0.7",
+ "nyc": "^15.0.0",
+ "prettier": "^2.0.1",
+ "source-map-support": "^0.5.16",
+ "ts-node": "^9.0.0",
+ "typedoc": "^0.20.0-beta.24",
+ "typescript": "^4.0.2"
+ },
+ "ava": {
+ "extensions": [
+ "ts"
+ ],
+ "require": [
+ "ts-node/register"
+ ]
+ },
+ "eslintConfig": {
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaVersion": "2018",
+ "sourceType": "module"
+ },
+ "plugins": [
+ "@typescript-eslint",
+ "eslint-plugin-tsdoc"
+ ],
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:ava/recommended",
+ "plugin:import/errors",
+ "plugin:import/warnings",
+ "plugin:import/typescript",
+ "plugin:prettier/recommended",
+ "plugin:promise/recommended",
+ "prettier",
+ "prettier/@typescript-eslint"
+ ],
+ "rules": {
+ "strict": "error",
+ "tsdoc/syntax": "warn"
+ }
+ },
+ "eslintIgnore": [
+ "dist"
+ ],
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/malept"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"
+ }
+ ],
+ "husky": {
+ "pre-commit": "lint-staged"
+ },
+ "lint-staged": {
+ "*.{json,md,yml}": "prettier --write",
+ "*.ts": [
+ "prettier --write",
+ "eslint --fix"
+ ]
+ },
+ "nyc": {
+ "extends": "@istanbuljs/nyc-config-typescript"
+ }
+}
diff --git a/node_modules/@sindresorhus/is/dist/index.d.ts b/node_modules/@sindresorhus/is/dist/index.d.ts
new file mode 100644
index 0000000..dbb8cbd
--- /dev/null
+++ b/node_modules/@sindresorhus/is/dist/index.d.ts
@@ -0,0 +1,232 @@
+/// <reference types="node" />
+/// <reference lib="es2018" />
+/// <reference lib="dom" />
+import { Class, Falsy, TypedArray, ObservableLike, Primitive } from './types';
+declare const objectTypeNames: readonly ["Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Blob", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", ...("Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt64Array" | "BigUint64Array")[]];
+declare type ObjectTypeName = typeof objectTypeNames[number];
+declare const primitiveTypeNames: readonly ["null", "undefined", "string", "number", "bigint", "boolean", "symbol"];
+declare type PrimitiveTypeName = typeof primitiveTypeNames[number];
+export declare type TypeName = ObjectTypeName | PrimitiveTypeName;
+declare function is(value: unknown): TypeName;
+declare namespace is {
+ var undefined: (value: unknown) => value is undefined;
+ var string: (value: unknown) => value is string;
+ var number: (value: unknown) => value is number;
+ var bigint: (value: unknown) => value is bigint;
+ var function_: (value: unknown) => value is Function;
+ var null_: (value: unknown) => value is null;
+ var class_: (value: unknown) => value is Class<unknown, any[]>;
+ var boolean: (value: unknown) => value is boolean;
+ var symbol: (value: unknown) => value is symbol;
+ var numericString: (value: unknown) => value is string;
+ var array: <T = unknown>(value: unknown, assertion?: ((value: T) => value is T) | undefined) => value is T[];
+ var buffer: (value: unknown) => value is Buffer;
+ var blob: (value: unknown) => value is Blob;
+ var nullOrUndefined: (value: unknown) => value is null | undefined;
+ var object: (value: unknown) => value is object;
+ var iterable: <T = unknown>(value: unknown) => value is Iterable<T>;
+ var asyncIterable: <T = unknown>(value: unknown) => value is AsyncIterable<T>;
+ var generator: (value: unknown) => value is Generator<unknown, any, unknown>;
+ var asyncGenerator: (value: unknown) => value is AsyncGenerator<unknown, any, unknown>;
+ var nativePromise: <T = unknown>(value: unknown) => value is Promise<T>;
+ var promise: <T = unknown>(value: unknown) => value is Promise<T>;
+ var generatorFunction: (value: unknown) => value is GeneratorFunction;
+ var asyncGeneratorFunction: (value: unknown) => value is (...args: any[]) => Promise<unknown>;
+ var asyncFunction: <T = unknown>(value: unknown) => value is (...args: any[]) => Promise<T>;
+ var boundFunction: (value: unknown) => value is Function;
+ var regExp: (value: unknown) => value is RegExp;
+ var date: (value: unknown) => value is Date;
+ var error: (value: unknown) => value is Error;
+ var map: <Key = unknown, Value = unknown>(value: unknown) => value is Map<Key, Value>;
+ var set: <T = unknown>(value: unknown) => value is Set<T>;
+ var weakMap: <Key extends object = object, Value = unknown>(value: unknown) => value is WeakMap<Key, Value>;
+ var weakSet: (value: unknown) => value is WeakSet<object>;
+ var int8Array: (value: unknown) => value is Int8Array;
+ var uint8Array: (value: unknown) => value is Uint8Array;
+ var uint8ClampedArray: (value: unknown) => value is Uint8ClampedArray;
+ var int16Array: (value: unknown) => value is Int16Array;
+ var uint16Array: (value: unknown) => value is Uint16Array;
+ var int32Array: (value: unknown) => value is Int32Array;
+ var uint32Array: (value: unknown) => value is Uint32Array;
+ var float32Array: (value: unknown) => value is Float32Array;
+ var float64Array: (value: unknown) => value is Float64Array;
+ var bigInt64Array: (value: unknown) => value is BigInt64Array;
+ var bigUint64Array: (value: unknown) => value is BigUint64Array;
+ var arrayBuffer: (value: unknown) => value is ArrayBuffer;
+ var sharedArrayBuffer: (value: unknown) => value is SharedArrayBuffer;
+ var dataView: (value: unknown) => value is DataView;
+ var enumCase: <T = unknown>(value: unknown, targetEnum: T) => boolean;
+ var directInstanceOf: <T>(instance: unknown, class_: Class<T, any[]>) => instance is T;
+ var urlInstance: (value: unknown) => value is URL;
+ var urlString: (value: unknown) => value is string;
+ var truthy: <T>(value: false | "" | 0 | 0n | T | null | undefined) => value is T;
+ var falsy: <T>(value: false | "" | 0 | 0n | T | null | undefined) => value is Falsy;
+ var nan: (value: unknown) => boolean;
+ var primitive: (value: unknown) => value is Primitive;
+ var integer: (value: unknown) => value is number;
+ var safeInteger: (value: unknown) => value is number;
+ var plainObject: <Value = unknown>(value: unknown) => value is Record<string | number | symbol, Value>;
+ var typedArray: (value: unknown) => value is TypedArray;
+ var arrayLike: <T = unknown>(value: unknown) => value is ArrayLike<T>;
+ var inRange: (value: number, range: number | number[]) => value is number;
+ var domElement: (value: unknown) => value is HTMLElement;
+ var observable: (value: unknown) => value is ObservableLike;
+ var nodeStream: (value: unknown) => value is NodeStream;
+ var infinite: (value: unknown) => value is number;
+ var evenInteger: (value: number) => value is number;
+ var oddInteger: (value: number) => value is number;
+ var emptyArray: (value: unknown) => value is never[];
+ var nonEmptyArray: (value: unknown) => value is unknown[];
+ var emptyString: (value: unknown) => value is "";
+ var emptyStringOrWhitespace: (value: unknown) => value is string;
+ var nonEmptyString: (value: unknown) => value is string;
+ var nonEmptyStringAndNotWhitespace: (value: unknown) => value is string;
+ var emptyObject: <Key extends string | number | symbol = string>(value: unknown) => value is Record<Key, never>;
+ var nonEmptyObject: <Key extends string | number | symbol = string, Value = unknown>(value: unknown) => value is Record<Key, Value>;
+ var emptySet: (value: unknown) => value is Set<never>;
+ var nonEmptySet: <T = unknown>(value: unknown) => value is Set<T>;
+ var emptyMap: (value: unknown) => value is Map<never, never>;
+ var nonEmptyMap: <Key = unknown, Value = unknown>(value: unknown) => value is Map<Key, Value>;
+ var propertyKey: (value: unknown) => value is string | number | symbol;
+ var formData: (value: unknown) => value is FormData;
+ var urlSearchParams: (value: unknown) => value is URLSearchParams;
+ var any: (predicate: Predicate | Predicate[], ...values: unknown[]) => boolean;
+ var all: (predicate: Predicate, ...values: unknown[]) => boolean;
+}
+export interface ArrayLike<T> {
+ readonly [index: number]: T;
+ readonly length: number;
+}
+export interface NodeStream extends NodeJS.EventEmitter {
+ pipe<T extends NodeJS.WritableStream>(destination: T, options?: {
+ end?: boolean;
+ }): T;
+}
+export declare type Predicate = (value: unknown) => boolean;
+export declare const enum AssertionTypeDescription {
+ class_ = "Class",
+ numericString = "string with a number",
+ nullOrUndefined = "null or undefined",
+ iterable = "Iterable",
+ asyncIterable = "AsyncIterable",
+ nativePromise = "native Promise",
+ urlString = "string with a URL",
+ truthy = "truthy",
+ falsy = "falsy",
+ nan = "NaN",
+ primitive = "primitive",
+ integer = "integer",
+ safeInteger = "integer",
+ plainObject = "plain object",
+ arrayLike = "array-like",
+ typedArray = "TypedArray",
+ domElement = "HTMLElement",
+ nodeStream = "Node.js Stream",
+ infinite = "infinite number",
+ emptyArray = "empty array",
+ nonEmptyArray = "non-empty array",
+ emptyString = "empty string",
+ emptyStringOrWhitespace = "empty string or whitespace",
+ nonEmptyString = "non-empty string",
+ nonEmptyStringAndNotWhitespace = "non-empty string and not whitespace",
+ emptyObject = "empty object",
+ nonEmptyObject = "non-empty object",
+ emptySet = "empty set",
+ nonEmptySet = "non-empty set",
+ emptyMap = "empty map",
+ nonEmptyMap = "non-empty map",
+ evenInteger = "even integer",
+ oddInteger = "odd integer",
+ directInstanceOf = "T",
+ inRange = "in range",
+ any = "predicate returns truthy for any value",
+ all = "predicate returns truthy for all values"
+}
+interface Assert {
+ undefined: (value: unknown) => asserts value is undefined;
+ string: (value: unknown) => asserts value is string;
+ number: (value: unknown) => asserts value is number;
+ bigint: (value: unknown) => asserts value is bigint;
+ function_: (value: unknown) => asserts value is Function;
+ null_: (value: unknown) => asserts value is null;
+ class_: (value: unknown) => asserts value is Class;
+ boolean: (value: unknown) => asserts value is boolean;
+ symbol: (value: unknown) => asserts value is symbol;
+ numericString: (value: unknown) => asserts value is string;
+ array: <T = unknown>(value: unknown, assertion?: (element: unknown) => asserts element is T) => asserts value is T[];
+ buffer: (value: unknown) => asserts value is Buffer;
+ blob: (value: unknown) => asserts value is Blob;
+ nullOrUndefined: (value: unknown) => asserts value is null | undefined;
+ object: <Key extends keyof any = string, Value = unknown>(value: unknown) => asserts value is Record<Key, Value>;
+ iterable: <T = unknown>(value: unknown) => asserts value is Iterable<T>;
+ asyncIterable: <T = unknown>(value: unknown) => asserts value is AsyncIterable<T>;
+ generator: (value: unknown) => asserts value is Generator;
+ asyncGenerator: (value: unknown) => asserts value is AsyncGenerator;
+ nativePromise: <T = unknown>(value: unknown) => asserts value is Promise<T>;
+ promise: <T = unknown>(value: unknown) => asserts value is Promise<T>;
+ generatorFunction: (value: unknown) => asserts value is GeneratorFunction;
+ asyncGeneratorFunction: (value: unknown) => asserts value is AsyncGeneratorFunction;
+ asyncFunction: (value: unknown) => asserts value is Function;
+ boundFunction: (value: unknown) => asserts value is Function;
+ regExp: (value: unknown) => asserts value is RegExp;
+ date: (value: unknown) => asserts value is Date;
+ error: (value: unknown) => asserts value is Error;
+ map: <Key = unknown, Value = unknown>(value: unknown) => asserts value is Map<Key, Value>;
+ set: <T = unknown>(value: unknown) => asserts value is Set<T>;
+ weakMap: <Key extends object = object, Value = unknown>(value: unknown) => asserts value is WeakMap<Key, Value>;
+ weakSet: <T extends object = object>(value: unknown) => asserts value is WeakSet<T>;
+ int8Array: (value: unknown) => asserts value is Int8Array;
+ uint8Array: (value: unknown) => asserts value is Uint8Array;
+ uint8ClampedArray: (value: unknown) => asserts value is Uint8ClampedArray;
+ int16Array: (value: unknown) => asserts value is Int16Array;
+ uint16Array: (value: unknown) => asserts value is Uint16Array;
+ int32Array: (value: unknown) => asserts value is Int32Array;
+ uint32Array: (value: unknown) => asserts value is Uint32Array;
+ float32Array: (value: unknown) => asserts value is Float32Array;
+ float64Array: (value: unknown) => asserts value is Float64Array;
+ bigInt64Array: (value: unknown) => asserts value is BigInt64Array;
+ bigUint64Array: (value: unknown) => asserts value is BigUint64Array;
+ arrayBuffer: (value: unknown) => asserts value is ArrayBuffer;
+ sharedArrayBuffer: (value: unknown) => asserts value is SharedArrayBuffer;
+ dataView: (value: unknown) => asserts value is DataView;
+ enumCase: <T = unknown>(value: unknown, targetEnum: T) => asserts value is T[keyof T];
+ urlInstance: (value: unknown) => asserts value is URL;
+ urlString: (value: unknown) => asserts value is string;
+ truthy: (value: unknown) => asserts value is unknown;
+ falsy: (value: unknown) => asserts value is unknown;
+ nan: (value: unknown) => asserts value is unknown;
+ primitive: (value: unknown) => asserts value is Primitive;
+ integer: (value: unknown) => asserts value is number;
+ safeInteger: (value: unknown) => asserts value is number;
+ plainObject: <Value = unknown>(value: unknown) => asserts value is Record<PropertyKey, Value>;
+ typedArray: (value: unknown) => asserts value is TypedArray;
+ arrayLike: <T = unknown>(value: unknown) => asserts value is ArrayLike<T>;
+ domElement: (value: unknown) => asserts value is HTMLElement;
+ observable: (value: unknown) => asserts value is ObservableLike;
+ nodeStream: (value: unknown) => asserts value is NodeStream;
+ infinite: (value: unknown) => asserts value is number;
+ emptyArray: (value: unknown) => asserts value is never[];
+ nonEmptyArray: (value: unknown) => asserts value is unknown[];
+ emptyString: (value: unknown) => asserts value is '';
+ emptyStringOrWhitespace: (value: unknown) => asserts value is string;
+ nonEmptyString: (value: unknown) => asserts value is string;
+ nonEmptyStringAndNotWhitespace: (value: unknown) => asserts value is string;
+ emptyObject: <Key extends keyof any = string>(value: unknown) => asserts value is Record<Key, never>;
+ nonEmptyObject: <Key extends keyof any = string, Value = unknown>(value: unknown) => asserts value is Record<Key, Value>;
+ emptySet: (value: unknown) => asserts value is Set<never>;
+ nonEmptySet: <T = unknown>(value: unknown) => asserts value is Set<T>;
+ emptyMap: (value: unknown) => asserts value is Map<never, never>;
+ nonEmptyMap: <Key = unknown, Value = unknown>(value: unknown) => asserts value is Map<Key, Value>;
+ propertyKey: (value: unknown) => asserts value is PropertyKey;
+ formData: (value: unknown) => asserts value is FormData;
+ urlSearchParams: (value: unknown) => asserts value is URLSearchParams;
+ evenInteger: (value: number) => asserts value is number;
+ oddInteger: (value: number) => asserts value is number;
+ directInstanceOf: <T>(instance: unknown, class_: Class<T>) => asserts instance is T;
+ inRange: (value: number, range: number | number[]) => asserts value is number;
+ any: (predicate: Predicate | Predicate[], ...values: unknown[]) => void | never;
+ all: (predicate: Predicate, ...values: unknown[]) => void | never;
+}
+export declare const assert: Assert;
+export default is;
+export { Class, TypedArray, ObservableLike, Primitive } from './types';
diff --git a/node_modules/@sindresorhus/is/dist/index.js b/node_modules/@sindresorhus/is/dist/index.js
new file mode 100644
index 0000000..a80df87
--- /dev/null
+++ b/node_modules/@sindresorhus/is/dist/index.js
@@ -0,0 +1,434 @@
+"use strict";
+/// <reference lib="es2018"/>
+/// <reference lib="dom"/>
+/// <reference types="node"/>
+Object.defineProperty(exports, "__esModule", { value: true });
+const typedArrayTypeNames = [
+ 'Int8Array',
+ 'Uint8Array',
+ 'Uint8ClampedArray',
+ 'Int16Array',
+ 'Uint16Array',
+ 'Int32Array',
+ 'Uint32Array',
+ 'Float32Array',
+ 'Float64Array',
+ 'BigInt64Array',
+ 'BigUint64Array'
+];
+function isTypedArrayName(name) {
+ return typedArrayTypeNames.includes(name);
+}
+const objectTypeNames = [
+ 'Function',
+ 'Generator',
+ 'AsyncGenerator',
+ 'GeneratorFunction',
+ 'AsyncGeneratorFunction',
+ 'AsyncFunction',
+ 'Observable',
+ 'Array',
+ 'Buffer',
+ 'Blob',
+ 'Object',
+ 'RegExp',
+ 'Date',
+ 'Error',
+ 'Map',
+ 'Set',
+ 'WeakMap',
+ 'WeakSet',
+ 'ArrayBuffer',
+ 'SharedArrayBuffer',
+ 'DataView',
+ 'Promise',
+ 'URL',
+ 'FormData',
+ 'URLSearchParams',
+ 'HTMLElement',
+ ...typedArrayTypeNames
+];
+function isObjectTypeName(name) {
+ return objectTypeNames.includes(name);
+}
+const primitiveTypeNames = [
+ 'null',
+ 'undefined',
+ 'string',
+ 'number',
+ 'bigint',
+ 'boolean',
+ 'symbol'
+];
+function isPrimitiveTypeName(name) {
+ return primitiveTypeNames.includes(name);
+}
+// eslint-disable-next-line @typescript-eslint/ban-types
+function isOfType(type) {
+ return (value) => typeof value === type;
+}
+const { toString } = Object.prototype;
+const getObjectType = (value) => {
+ const objectTypeName = toString.call(value).slice(8, -1);
+ if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) {
+ return 'HTMLElement';
+ }
+ if (isObjectTypeName(objectTypeName)) {
+ return objectTypeName;
+ }
+ return undefined;
+};
+const isObjectOfType = (type) => (value) => getObjectType(value) === type;
+function is(value) {
+ if (value === null) {
+ return 'null';
+ }
+ switch (typeof value) {
+ case 'undefined':
+ return 'undefined';
+ case 'string':
+ return 'string';
+ case 'number':
+ return 'number';
+ case 'boolean':
+ return 'boolean';
+ case 'function':
+ return 'Function';
+ case 'bigint':
+ return 'bigint';
+ case 'symbol':
+ return 'symbol';
+ default:
+ }
+ if (is.observable(value)) {
+ return 'Observable';
+ }
+ if (is.array(value)) {
+ return 'Array';
+ }
+ if (is.buffer(value)) {
+ return 'Buffer';
+ }
+ const tagType = getObjectType(value);
+ if (tagType) {
+ return tagType;
+ }
+ if (value instanceof String || value instanceof Boolean || value instanceof Number) {
+ throw new TypeError('Please don\'t use object wrappers for primitive types');
+ }
+ return 'Object';
+}
+is.undefined = isOfType('undefined');
+is.string = isOfType('string');
+const isNumberType = isOfType('number');
+is.number = (value) => isNumberType(value) && !is.nan(value);
+is.bigint = isOfType('bigint');
+// eslint-disable-next-line @typescript-eslint/ban-types
+is.function_ = isOfType('function');
+is.null_ = (value) => value === null;
+is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
+is.boolean = (value) => value === true || value === false;
+is.symbol = isOfType('symbol');
+is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
+is.array = (value, assertion) => {
+ if (!Array.isArray(value)) {
+ return false;
+ }
+ if (!is.function_(assertion)) {
+ return true;
+ }
+ return value.every(assertion);
+};
+is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; };
+is.blob = (value) => isObjectOfType('Blob')(value);
+is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
+is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value));
+is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); };
+is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); };
+is.generator = (value) => { var _a, _b; return is.iterable(value) && is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.next) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.throw); };
+is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw);
+is.nativePromise = (value) => isObjectOfType('Promise')(value);
+const hasPromiseAPI = (value) => {
+ var _a, _b;
+ return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) &&
+ is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch);
+};
+is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
+is.generatorFunction = isObjectOfType('GeneratorFunction');
+is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction';
+is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction';
+// eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types
+is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
+is.regExp = isObjectOfType('RegExp');
+is.date = isObjectOfType('Date');
+is.error = isObjectOfType('Error');
+is.map = (value) => isObjectOfType('Map')(value);
+is.set = (value) => isObjectOfType('Set')(value);
+is.weakMap = (value) => isObjectOfType('WeakMap')(value);
+is.weakSet = (value) => isObjectOfType('WeakSet')(value);
+is.int8Array = isObjectOfType('Int8Array');
+is.uint8Array = isObjectOfType('Uint8Array');
+is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray');
+is.int16Array = isObjectOfType('Int16Array');
+is.uint16Array = isObjectOfType('Uint16Array');
+is.int32Array = isObjectOfType('Int32Array');
+is.uint32Array = isObjectOfType('Uint32Array');
+is.float32Array = isObjectOfType('Float32Array');
+is.float64Array = isObjectOfType('Float64Array');
+is.bigInt64Array = isObjectOfType('BigInt64Array');
+is.bigUint64Array = isObjectOfType('BigUint64Array');
+is.arrayBuffer = isObjectOfType('ArrayBuffer');
+is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer');
+is.dataView = isObjectOfType('DataView');
+is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value);
+is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
+is.urlInstance = (value) => isObjectOfType('URL')(value);
+is.urlString = (value) => {
+ if (!is.string(value)) {
+ return false;
+ }
+ try {
+ new URL(value); // eslint-disable-line no-new
+ return true;
+ }
+ catch (_a) {
+ return false;
+ }
+};
+// Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);`
+is.truthy = (value) => Boolean(value);
+// Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);`
+is.falsy = (value) => !value;
+is.nan = (value) => Number.isNaN(value);
+is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value);
+is.integer = (value) => Number.isInteger(value);
+is.safeInteger = (value) => Number.isSafeInteger(value);
+is.plainObject = (value) => {
+ // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
+ if (toString.call(value) !== '[object Object]') {
+ return false;
+ }
+ const prototype = Object.getPrototypeOf(value);
+ return prototype === null || prototype === Object.getPrototypeOf({});
+};
+is.typedArray = (value) => isTypedArrayName(getObjectType(value));
+const isValidLength = (value) => is.safeInteger(value) && value >= 0;
+is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
+is.inRange = (value, range) => {
+ if (is.number(range)) {
+ return value >= Math.min(0, range) && value <= Math.max(range, 0);
+ }
+ if (is.array(range) && range.length === 2) {
+ return value >= Math.min(...range) && value <= Math.max(...range);
+ }
+ throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
+};
+const NODE_TYPE_ELEMENT = 1;
+const DOM_PROPERTIES_TO_CHECK = [
+ 'innerHTML',
+ 'ownerDocument',
+ 'style',
+ 'attributes',
+ 'nodeValue'
+];
+is.domElement = (value) => {
+ return is.object(value) &&
+ value.nodeType === NODE_TYPE_ELEMENT &&
+ is.string(value.nodeName) &&
+ !is.plainObject(value) &&
+ DOM_PROPERTIES_TO_CHECK.every(property => property in value);
+};
+is.observable = (value) => {
+ var _a, _b, _c, _d;
+ if (!value) {
+ return false;
+ }
+ // eslint-disable-next-line no-use-extend-native/no-use-extend-native
+ if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) {
+ return true;
+ }
+ if (value === ((_d = (_c = value)['@@observable']) === null || _d === void 0 ? void 0 : _d.call(_c))) {
+ return true;
+ }
+ return false;
+};
+is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value);
+is.infinite = (value) => value === Infinity || value === -Infinity;
+const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder;
+is.evenInteger = isAbsoluteMod2(0);
+is.oddInteger = isAbsoluteMod2(1);
+is.emptyArray = (value) => is.array(value) && value.length === 0;
+is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
+is.emptyString = (value) => is.string(value) && value.length === 0;
+const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value);
+is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
+// TODO: Use `not ''` when the `not` operator is available.
+is.nonEmptyString = (value) => is.string(value) && value.length > 0;
+// TODO: Use `not ''` when the `not` operator is available.
+is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value);
+is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
+// TODO: Use `not` operator here to remove `Map` and `Set` from type guard:
+// - https://github.com/Microsoft/TypeScript/pull/29317
+is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
+is.emptySet = (value) => is.set(value) && value.size === 0;
+is.nonEmptySet = (value) => is.set(value) && value.size > 0;
+is.emptyMap = (value) => is.map(value) && value.size === 0;
+is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
+// `PropertyKey` is any value that can be used as an object key (string, number, or symbol)
+is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value);
+is.formData = (value) => isObjectOfType('FormData')(value);
+is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value);
+const predicateOnArray = (method, predicate, values) => {
+ if (!is.function_(predicate)) {
+ throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
+ }
+ if (values.length === 0) {
+ throw new TypeError('Invalid number of values');
+ }
+ return method.call(values, predicate);
+};
+is.any = (predicate, ...values) => {
+ const predicates = is.array(predicate) ? predicate : [predicate];
+ return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values));
+};
+is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
+const assertType = (condition, description, value, options = {}) => {
+ if (!condition) {
+ const { multipleValues } = options;
+ const valuesMessage = multipleValues ?
+ `received values of types ${[
+ ...new Set(value.map(singleValue => `\`${is(singleValue)}\``))
+ ].join(', ')}` :
+ `received value of type \`${is(value)}\``;
+ throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`);
+ }
+};
+exports.assert = {
+ // Unknowns.
+ undefined: (value) => assertType(is.undefined(value), 'undefined', value),
+ string: (value) => assertType(is.string(value), 'string', value),
+ number: (value) => assertType(is.number(value), 'number', value),
+ bigint: (value) => assertType(is.bigint(value), 'bigint', value),
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ function_: (value) => assertType(is.function_(value), 'Function', value),
+ null_: (value) => assertType(is.null_(value), 'null', value),
+ class_: (value) => assertType(is.class_(value), "Class" /* class_ */, value),
+ boolean: (value) => assertType(is.boolean(value), 'boolean', value),
+ symbol: (value) => assertType(is.symbol(value), 'symbol', value),
+ numericString: (value) => assertType(is.numericString(value), "string with a number" /* numericString */, value),
+ array: (value, assertion) => {
+ const assert = assertType;
+ assert(is.array(value), 'Array', value);
+ if (assertion) {
+ value.forEach(assertion);
+ }
+ },
+ buffer: (value) => assertType(is.buffer(value), 'Buffer', value),
+ blob: (value) => assertType(is.blob(value), 'Blob', value),
+ nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value),
+ object: (value) => assertType(is.object(value), 'Object', value),
+ iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value),
+ asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value),
+ generator: (value) => assertType(is.generator(value), 'Generator', value),
+ asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value),
+ nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value),
+ promise: (value) => assertType(is.promise(value), 'Promise', value),
+ generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value),
+ asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value),
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value),
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value),
+ regExp: (value) => assertType(is.regExp(value), 'RegExp', value),
+ date: (value) => assertType(is.date(value), 'Date', value),
+ error: (value) => assertType(is.error(value), 'Error', value),
+ map: (value) => assertType(is.map(value), 'Map', value),
+ set: (value) => assertType(is.set(value), 'Set', value),
+ weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value),
+ weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value),
+ int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value),
+ uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value),
+ uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value),
+ int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value),
+ uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value),
+ int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value),
+ uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value),
+ float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value),
+ float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value),
+ bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value),
+ bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value),
+ arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value),
+ sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value),
+ dataView: (value) => assertType(is.dataView(value), 'DataView', value),
+ enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value),
+ urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value),
+ urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value),
+ truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value),
+ falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value),
+ nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value),
+ primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value),
+ integer: (value) => assertType(is.integer(value), "integer" /* integer */, value),
+ safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value),
+ plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value),
+ typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value),
+ arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value),
+ domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value),
+ observable: (value) => assertType(is.observable(value), 'Observable', value),
+ nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value),
+ infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value),
+ emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value),
+ nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value),
+ emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value),
+ emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value),
+ nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value),
+ nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, value),
+ emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value),
+ nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value),
+ emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value),
+ nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value),
+ emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value),
+ nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value),
+ propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value),
+ formData: (value) => assertType(is.formData(value), 'FormData', value),
+ urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value),
+ // Numbers.
+ evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value),
+ oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value),
+ // Two arguments.
+ directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance),
+ inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value),
+ // Variadic functions.
+ any: (predicate, ...values) => {
+ return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true });
+ },
+ all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true })
+};
+// Some few keywords are reserved, but we'll populate them for Node.js users
+// See https://github.com/Microsoft/TypeScript/issues/2536
+Object.defineProperties(is, {
+ class: {
+ value: is.class_
+ },
+ function: {
+ value: is.function_
+ },
+ null: {
+ value: is.null_
+ }
+});
+Object.defineProperties(exports.assert, {
+ class: {
+ value: exports.assert.class_
+ },
+ function: {
+ value: exports.assert.function_
+ },
+ null: {
+ value: exports.assert.null_
+ }
+});
+exports.default = is;
+// For CommonJS default export support
+module.exports = is;
+module.exports.default = is;
+module.exports.assert = exports.assert;
diff --git a/node_modules/@sindresorhus/is/dist/types.d.ts b/node_modules/@sindresorhus/is/dist/types.d.ts
new file mode 100644
index 0000000..b4fae5d
--- /dev/null
+++ b/node_modules/@sindresorhus/is/dist/types.d.ts
@@ -0,0 +1,25 @@
+/**
+Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
+*/
+export declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
+/**
+Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
+*/
+export declare type Class<T = unknown, Arguments extends any[] = any[]> = new (...arguments_: Arguments) => T;
+/**
+Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
+*/
+export declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
+declare global {
+ interface SymbolConstructor {
+ readonly observable: symbol;
+ }
+}
+/**
+Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
+*/
+export interface ObservableLike {
+ subscribe(observer: (value: unknown) => void): void;
+ [Symbol.observable](): ObservableLike;
+}
+export declare type Falsy = false | 0 | 0n | '' | null | undefined;
diff --git a/node_modules/@sindresorhus/is/dist/types.js b/node_modules/@sindresorhus/is/dist/types.js
new file mode 100644
index 0000000..0930323
--- /dev/null
+++ b/node_modules/@sindresorhus/is/dist/types.js
@@ -0,0 +1,3 @@
+"use strict";
+// Extracted from https://github.com/sindresorhus/type-fest/blob/78019f42ea888b0cdceb41a4a78163868de57555/index.d.ts
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/@sindresorhus/is/license b/node_modules/@sindresorhus/is/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/@sindresorhus/is/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@sindresorhus/is/package.json b/node_modules/@sindresorhus/is/package.json
new file mode 100644
index 0000000..8052a87
--- /dev/null
+++ b/node_modules/@sindresorhus/is/package.json
@@ -0,0 +1,96 @@
+{
+ "name": "@sindresorhus/is",
+ "version": "4.6.0",
+ "description": "Type check values",
+ "license": "MIT",
+ "repository": "sindresorhus/is",
+ "funding": "https://github.com/sindresorhus/is?sponsor=1",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "main": "dist/index.js",
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "build": "del dist && tsc",
+ "test": "xo && ava",
+ "prepare": "npm run build"
+ },
+ "files": [
+ "dist"
+ ],
+ "keywords": [
+ "type",
+ "types",
+ "is",
+ "check",
+ "checking",
+ "validate",
+ "validation",
+ "utility",
+ "util",
+ "typeof",
+ "instanceof",
+ "object",
+ "assert",
+ "assertion",
+ "test",
+ "kind",
+ "primitive",
+ "verify",
+ "compare",
+ "typescript",
+ "typeguards",
+ "types"
+ ],
+ "devDependencies": {
+ "@sindresorhus/tsconfig": "^0.7.0",
+ "@types/jsdom": "^16.1.0",
+ "@types/node": "^14.0.13",
+ "@types/zen-observable": "^0.8.0",
+ "@typescript-eslint/eslint-plugin": "^2.20.0",
+ "@typescript-eslint/parser": "^2.20.0",
+ "ava": "^3.3.0",
+ "del-cli": "^2.0.0",
+ "eslint-config-xo-typescript": "^0.26.0",
+ "jsdom": "^16.0.1",
+ "rxjs": "^6.4.0",
+ "tempy": "^0.4.0",
+ "ts-node": "^8.3.0",
+ "typescript": "~3.8.2",
+ "xo": "^0.26.1",
+ "zen-observable": "^0.8.8"
+ },
+ "types": "dist/index.d.ts",
+ "sideEffects": false,
+ "ava": {
+ "extensions": [
+ "ts"
+ ],
+ "require": [
+ "ts-node/register"
+ ]
+ },
+ "xo": {
+ "extends": "xo-typescript",
+ "extensions": [
+ "ts"
+ ],
+ "parserOptions": {
+ "project": "./tsconfig.xo.json"
+ },
+ "globals": [
+ "BigInt",
+ "BigInt64Array",
+ "BigUint64Array"
+ ],
+ "rules": {
+ "@typescript-eslint/promise-function-async": "off",
+ "@typescript-eslint/no-empty-function": "off",
+ "@typescript-eslint/explicit-function-return-type": "off"
+ }
+ }
+}
diff --git a/node_modules/@sindresorhus/is/readme.md b/node_modules/@sindresorhus/is/readme.md
new file mode 100644
index 0000000..05a291a
--- /dev/null
+++ b/node_modules/@sindresorhus/is/readme.md
@@ -0,0 +1,669 @@
+# is
+
+> Type check values
+
+For example, `is.string('🦄') //=> true`
+
+<img src="header.gif" width="182" align="right">
+
+## Highlights
+
+- Written in TypeScript
+- [Extensive use of type guards](#type-guards)
+- [Supports type assertions](#type-assertions)
+- [Aware of generic type parameters](#generic-type-parameters) (use with caution)
+- Actively maintained
+- ![Millions of downloads per week](https://img.shields.io/npm/dw/@sindresorhus/is)
+
+## Install
+
+```sh
+npm install @sindresorhus/is
+```
+
+## Usage
+
+```js
+const is = require('@sindresorhus/is');
+
+is('🦄');
+//=> 'string'
+
+is(new Map());
+//=> 'Map'
+
+is.number(6);
+//=> true
+```
+
+[Assertions](#type-assertions) perform the same type checks, but throw an error if the type does not match.
+
+```js
+const {assert} = require('@sindresorhus/is');
+
+assert.string(2);
+//=> Error: Expected value which is `string`, received value of type `number`.
+```
+
+And with TypeScript:
+
+```ts
+import {assert} from '@sindresorhus/is';
+
+assert.string(foo);
+// `foo` is now typed as a `string`.
+```
+
+## API
+
+### is(value)
+
+Returns the type of `value`.
+
+Primitives are lowercase and object types are camelcase.
+
+Example:
+
+- `'undefined'`
+- `'null'`
+- `'string'`
+- `'symbol'`
+- `'Array'`
+- `'Function'`
+- `'Object'`
+
+Note: It will throw an error if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`.
+
+### is.{method}
+
+All the below methods accept a value and returns a boolean for whether the value is of the desired type.
+
+#### Primitives
+
+##### .undefined(value)
+##### .null(value)
+
+**Note:** TypeScript users must use `.null_()` because of a TypeScript naming limitation.
+
+##### .string(value)
+##### .number(value)
+
+Note: `is.number(NaN)` returns `false`. This intentionally deviates from `typeof` behavior to increase user-friendliness of `is` type checks.
+
+##### .boolean(value)
+##### .symbol(value)
+##### .bigint(value)
+
+#### Built-in types
+
+##### .array(value, assertion?)
+
+Returns true if `value` is an array and all of its items match the assertion (if provided).
+
+```js
+is.array(value); // Validate `value` is an array.
+is.array(value, is.number); // Validate `value` is an array and all of its items are numbers.
+```
+
+##### .function(value)
+
+**Note:** TypeScript users must use `.function_()` because of a TypeScript naming limitation.
+
+##### .buffer(value)
+##### .blob(value)
+##### .object(value)
+
+Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions).
+
+##### .numericString(value)
+
+Returns `true` for a string that represents a number satisfying `is.number`, for example, `'42'` and `'-8.3'`.
+
+Note: `'NaN'` returns `false`, but `'Infinity'` and `'-Infinity'` return `true`.
+
+##### .regExp(value)
+##### .date(value)
+##### .error(value)
+##### .nativePromise(value)
+##### .promise(value)
+
+Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too.
+
+##### .generator(value)
+
+Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`.
+
+##### .generatorFunction(value)
+
+##### .asyncFunction(value)
+
+Returns `true` for any `async` function that can be called with the `await` operator.
+
+```js
+is.asyncFunction(async () => {});
+//=> true
+
+is.asyncFunction(() => {});
+//=> false
+```
+
+##### .asyncGenerator(value)
+
+```js
+is.asyncGenerator(
+ (async function * () {
+ yield 4;
+ })()
+);
+//=> true
+
+is.asyncGenerator(
+ (function * () {
+ yield 4;
+ })()
+);
+//=> false
+```
+
+##### .asyncGeneratorFunction(value)
+
+```js
+is.asyncGeneratorFunction(async function * () {
+ yield 4;
+});
+//=> true
+
+is.asyncGeneratorFunction(function * () {
+ yield 4;
+});
+//=> false
+```
+
+##### .boundFunction(value)
+
+Returns `true` for any `bound` function.
+
+```js
+is.boundFunction(() => {});
+//=> true
+
+is.boundFunction(function () {}.bind(null));
+//=> true
+
+is.boundFunction(function () {});
+//=> false
+```
+
+##### .map(value)
+##### .set(value)
+##### .weakMap(value)
+##### .weakSet(value)
+
+#### Typed arrays
+
+##### .int8Array(value)
+##### .uint8Array(value)
+##### .uint8ClampedArray(value)
+##### .int16Array(value)
+##### .uint16Array(value)
+##### .int32Array(value)
+##### .uint32Array(value)
+##### .float32Array(value)
+##### .float64Array(value)
+##### .bigInt64Array(value)
+##### .bigUint64Array(value)
+
+#### Structured data
+
+##### .arrayBuffer(value)
+##### .sharedArrayBuffer(value)
+##### .dataView(value)
+
+##### .enumCase(value, enum)
+
+TypeScript-only. Returns `true` if `value` is a member of `enum`.
+
+```ts
+enum Direction {
+ Ascending = 'ascending',
+ Descending = 'descending'
+}
+
+is.enumCase('ascending', Direction);
+//=> true
+
+is.enumCase('other', Direction);
+//=> false
+```
+
+#### Emptiness
+
+##### .emptyString(value)
+
+Returns `true` if the value is a `string` and the `.length` is 0.
+
+##### .emptyStringOrWhitespace(value)
+
+Returns `true` if `is.emptyString(value)` or if it's a `string` that is all whitespace.
+
+##### .nonEmptyString(value)
+
+Returns `true` if the value is a `string` and the `.length` is more than 0.
+
+##### .nonEmptyStringAndNotWhitespace(value)
+
+Returns `true` if the value is a `string` that is not empty and not whitespace.
+
+```js
+const values = ['property1', '', null, 'property2', ' ', undefined];
+
+values.filter(is.nonEmptyStringAndNotWhitespace);
+//=> ['property1', 'property2']
+```
+
+##### .emptyArray(value)
+
+Returns `true` if the value is an `Array` and the `.length` is 0.
+
+##### .nonEmptyArray(value)
+
+Returns `true` if the value is an `Array` and the `.length` is more than 0.
+
+##### .emptyObject(value)
+
+Returns `true` if the value is an `Object` and `Object.keys(value).length` is 0.
+
+Please note that `Object.keys` returns only own enumerable properties. Hence something like this can happen:
+
+```js
+const object1 = {};
+
+Object.defineProperty(object1, 'property1', {
+ value: 42,
+ writable: true,
+ enumerable: false,
+ configurable: true
+});
+
+is.emptyObject(object1);
+//=> true
+```
+
+##### .nonEmptyObject(value)
+
+Returns `true` if the value is an `Object` and `Object.keys(value).length` is more than 0.
+
+##### .emptySet(value)
+
+Returns `true` if the value is a `Set` and the `.size` is 0.
+
+##### .nonEmptySet(Value)
+
+Returns `true` if the value is a `Set` and the `.size` is more than 0.
+
+##### .emptyMap(value)
+
+Returns `true` if the value is a `Map` and the `.size` is 0.
+
+##### .nonEmptyMap(value)
+
+Returns `true` if the value is a `Map` and the `.size` is more than 0.
+
+#### Miscellaneous
+
+##### .directInstanceOf(value, class)
+
+Returns `true` if `value` is a direct instance of `class`.
+
+```js
+is.directInstanceOf(new Error(), Error);
+//=> true
+
+class UnicornError extends Error {}
+
+is.directInstanceOf(new UnicornError(), Error);
+//=> false
+```
+
+##### .urlInstance(value)
+
+Returns `true` if `value` is an instance of the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL).
+
+```js
+const url = new URL('https://example.com');
+
+is.urlInstance(url);
+//=> true
+```
+
+##### .urlString(value)
+
+Returns `true` if `value` is a URL string.
+
+Note: this only does basic checking using the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL) constructor.
+
+```js
+const url = 'https://example.com';
+
+is.urlString(url);
+//=> true
+
+is.urlString(new URL(url));
+//=> false
+```
+
+##### .truthy(value)
+
+Returns `true` for all values that evaluate to true in a boolean context:
+
+```js
+is.truthy('🦄');
+//=> true
+
+is.truthy(undefined);
+//=> false
+```
+
+##### .falsy(value)
+
+Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`.
+
+##### .nan(value)
+##### .nullOrUndefined(value)
+##### .primitive(value)
+
+JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`.
+
+##### .integer(value)
+
+##### .safeInteger(value)
+
+Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+
+##### .plainObject(value)
+
+An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.
+
+##### .iterable(value)
+##### .asyncIterable(value)
+##### .class(value)
+
+Returns `true` for instances created by a class.
+
+**Note:** TypeScript users must use `.class_()` because of a TypeScript naming limitation.
+
+##### .typedArray(value)
+
+##### .arrayLike(value)
+
+A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0.
+
+```js
+is.arrayLike(document.forms);
+//=> true
+
+function foo() {
+ is.arrayLike(arguments);
+ //=> true
+}
+foo();
+```
+
+##### .inRange(value, range)
+
+Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order.
+
+```js
+is.inRange(3, [0, 5]);
+is.inRange(3, [5, 0]);
+is.inRange(0, [-2, 2]);
+```
+
+##### .inRange(value, upperBound)
+
+Check if `value` (number) is in the range of `0` to `upperBound`.
+
+```js
+is.inRange(3, 10);
+```
+
+##### .domElement(value)
+
+Returns `true` if `value` is a DOM Element.
+
+##### .nodeStream(value)
+
+Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html).
+
+```js
+const fs = require('fs');
+
+is.nodeStream(fs.createReadStream('unicorn.png'));
+//=> true
+```
+
+##### .observable(value)
+
+Returns `true` if `value` is an `Observable`.
+
+```js
+const {Observable} = require('rxjs');
+
+is.observable(new Observable());
+//=> true
+```
+
+##### .infinite(value)
+
+Check if `value` is `Infinity` or `-Infinity`.
+
+##### .evenInteger(value)
+
+Returns `true` if `value` is an even integer.
+
+##### .oddInteger(value)
+
+Returns `true` if `value` is an odd integer.
+
+##### .propertyKey(value)
+
+Returns `true` if `value` can be used as an object property key (either `string`, `number`, or `symbol`).
+
+##### .formData(value)
+
+Returns `true` if `value` is an instance of the [`FormData` class](https://developer.mozilla.org/en-US/docs/Web/API/FormData).
+
+```js
+const data = new FormData();
+
+is.formData(data);
+//=> true
+```
+
+##### .urlSearchParams(value)
+
+Returns `true` if `value` is an instance of the [`URLSearchParams` class](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
+
+```js
+const searchParams = new URLSearchParams();
+
+is.urlSearchParams(searchParams);
+//=> true
+```
+
+##### .any(predicate | predicate[], ...values)
+
+Using a single `predicate` argument, returns `true` if **any** of the input `values` returns true in the `predicate`:
+
+```js
+is.any(is.string, {}, true, '🦄');
+//=> true
+
+is.any(is.boolean, 'unicorns', [], new Map());
+//=> false
+```
+
+Using an array of `predicate[]`, returns `true` if **any** of the input `values` returns true for **any** of the `predicates` provided in an array:
+
+```js
+is.any([is.string, is.number], {}, true, '🦄');
+//=> true
+
+is.any([is.boolean, is.number], 'unicorns', [], new Map());
+//=> false
+```
+
+##### .all(predicate, ...values)
+
+Returns `true` if **all** of the input `values` returns true in the `predicate`:
+
+```js
+is.all(is.object, {}, new Map(), new Set());
+//=> true
+
+is.all(is.string, '🦄', [], 'unicorns');
+//=> false
+```
+
+## Type guards
+
+When using `is` together with TypeScript, [type guards](http://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types) are being used extensively to infer the correct type inside if-else statements.
+
+```ts
+import is from '@sindresorhus/is';
+
+const padLeft = (value: string, padding: string | number) => {
+ if (is.number(padding)) {
+ // `padding` is typed as `number`
+ return Array(padding + 1).join(' ') + value;
+ }
+
+ if (is.string(padding)) {
+ // `padding` is typed as `string`
+ return padding + value;
+ }
+
+ throw new TypeError(`Expected 'padding' to be of type 'string' or 'number', got '${is(padding)}'.`);
+}
+
+padLeft('🦄', 3);
+//=> ' 🦄'
+
+padLeft('🦄', '🌈');
+//=> '🌈🦄'
+```
+
+## Type assertions
+
+The type guards are also available as [type assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions), which throw an error for unexpected types. It is a convenient one-line version of the often repetitive "if-not-expected-type-throw" pattern.
+
+```ts
+import {assert} from '@sindresorhus/is';
+
+const handleMovieRatingApiResponse = (response: unknown) => {
+ assert.plainObject(response);
+ // `response` is now typed as a plain `object` with `unknown` properties.
+
+ assert.number(response.rating);
+ // `response.rating` is now typed as a `number`.
+
+ assert.string(response.title);
+ // `response.title` is now typed as a `string`.
+
+ return `${response.title} (${response.rating * 10})`;
+};
+
+handleMovieRatingApiResponse({rating: 0.87, title: 'The Matrix'});
+//=> 'The Matrix (8.7)'
+
+// This throws an error.
+handleMovieRatingApiResponse({rating: '🦄'});
+```
+
+## Generic type parameters
+
+The type guards and type assertions are aware of [generic type parameters](https://www.typescriptlang.org/docs/handbook/generics.html), such as `Promise<T>` and `Map<Key, Value>`. The default is `unknown` for most cases, since `is` cannot check them at runtime. If the generic type is known at compile-time, either implicitly (inferred) or explicitly (provided), `is` propagates the type so it can be used later.
+
+Use generic type parameters with caution. They are only checked by the TypeScript compiler, and not checked by `is` at runtime. This can lead to unexpected behavior, where the generic type is _assumed_ at compile-time, but actually is something completely different at runtime. It is best to use `unknown` (default) and type-check the value of the generic type parameter at runtime with `is` or `assert`.
+
+```ts
+import {assert} from '@sindresorhus/is';
+
+async function badNumberAssumption(input: unknown) {
+ // Bad assumption about the generic type parameter fools the compile-time type system.
+ assert.promise<number>(input);
+ // `input` is a `Promise` but only assumed to be `Promise<number>`.
+
+ const resolved = await input;
+ // `resolved` is typed as `number` but was not actually checked at runtime.
+
+ // Multiplication will return NaN if the input promise did not actually contain a number.
+ return 2 * resolved;
+}
+
+async function goodNumberAssertion(input: unknown) {
+ assert.promise(input);
+ // `input` is typed as `Promise<unknown>`
+
+ const resolved = await input;
+ // `resolved` is typed as `unknown`
+
+ assert.number(resolved);
+ // `resolved` is typed as `number`
+
+ // Uses runtime checks so only numbers will reach the multiplication.
+ return 2 * resolved;
+}
+
+badNumberAssumption(Promise.resolve('An unexpected string'));
+//=> NaN
+
+// This correctly throws an error because of the unexpected string value.
+goodNumberAssertion(Promise.resolve('An unexpected string'));
+```
+
+## FAQ
+
+### Why yet another type checking module?
+
+There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs:
+
+- Includes both type methods and ability to get the type
+- Types of primitives returned as lowercase and object types as camelcase
+- Covers all built-ins
+- Unsurprising behavior
+- Well-maintained
+- Comprehensive test suite
+
+For the ones I found, pick 3 of these.
+
+The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive.
+
+### Why not just use `instanceof` instead of this package?
+
+`instanceof` does not work correctly for all types and it does not work across [realms](https://stackoverflow.com/a/49832343/64949). Examples of realms are iframes, windows, web workers, and the `vm` module in Node.js.
+
+## For enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of @sindresorhus/is and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-sindresorhus-is?utm_source=npm-sindresorhus-is&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## Related
+
+- [ow](https://github.com/sindresorhus/ow) - Function argument validation for humans
+- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream
+- [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable
+- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array
+- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address
+- [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted
+- [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor
+- [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty
+- [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data
+- [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Giora Guttsait](https://github.com/gioragutt)
+- [Brandon Smith](https://github.com/brandon93s)
diff --git a/node_modules/@szmarczak/http-timer/LICENSE b/node_modules/@szmarczak/http-timer/LICENSE
new file mode 100644
index 0000000..15ad2e8
--- /dev/null
+++ b/node_modules/@szmarczak/http-timer/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Szymon Marczak
+
+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/@szmarczak/http-timer/README.md b/node_modules/@szmarczak/http-timer/README.md
new file mode 100644
index 0000000..f58e10b
--- /dev/null
+++ b/node_modules/@szmarczak/http-timer/README.md
@@ -0,0 +1,93 @@
+# http-timer
+> Timings for HTTP requests
+
+[![Build Status](https://travis-ci.org/szmarczak/http-timer.svg?branch=master)](https://travis-ci.org/szmarczak/http-timer)
+[![Coverage Status](https://coveralls.io/repos/github/szmarczak/http-timer/badge.svg?branch=master)](https://coveralls.io/github/szmarczak/http-timer?branch=master)
+[![install size](https://packagephobia.now.sh/badge?p=@szmarczak/http-timer)](https://packagephobia.now.sh/result?p=@szmarczak/http-timer)
+
+Inspired by the [`request` package](https://github.com/request/request).
+
+## Installation
+
+NPM:
+
+> `npm install @szmarczak/http-timer`
+
+Yarn:
+
+> `yarn add @szmarczak/http-timer`
+
+## Usage
+**Note:**
+> - The measured events resemble Node.js events, not the kernel ones.
+> - Sending a chunk greater than [`highWaterMark`](https://nodejs.org/api/stream.html#stream_new_stream_writable_options) will result in invalid `upload` and `response` timings. You can avoid this by splitting the payload into smaller chunks.
+
+```js
+const https = require('https');
+const timer = require('@szmarczak/http-timer');
+
+const request = https.get('https://httpbin.org/anything');
+timer(request);
+
+request.once('response', response => {
+ response.resume();
+ response.once('end', () => {
+ console.log(response.timings); // You can use `request.timings` as well
+ });
+});
+
+// {
+// start: 1572712180361,
+// socket: 1572712180362,
+// lookup: 1572712180415,
+// connect: 1572712180571,
+// upload: 1572712180884,
+// response: 1572712181037,
+// end: 1572712181039,
+// error: undefined,
+// abort: undefined,
+// phases: {
+// wait: 1,
+// dns: 53,
+// tcp: 156,
+// request: 313,
+// firstByte: 153,
+// download: 2,
+// total: 678
+// }
+// }
+```
+
+## API
+
+### timer(request)
+
+Returns: `Object`
+
+**Note**: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
+
+- `start` - Time when the request started.
+- `socket` - Time when a socket was assigned to the request.
+- `lookup` - Time when the DNS lookup finished.
+- `connect` - Time when the socket successfully connected.
+- `secureConnect` - Time when the socket securely connected.
+- `upload` - Time when the request finished uploading.
+- `response` - Time when the request fired `response` event.
+- `end` - Time when the response fired `end` event.
+- `error` - Time when the request fired `error` event.
+- `abort` - Time when the request fired `abort` event.
+- `phases`
+ - `wait` - `timings.socket - timings.start`
+ - `dns` - `timings.lookup - timings.socket`
+ - `tcp` - `timings.connect - timings.lookup`
+ - `tls` - `timings.secureConnect - timings.connect`
+ - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
+ - `firstByte` - `timings.response - timings.upload`
+ - `download` - `timings.end - timings.response`
+ - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
+
+If something has not been measured yet, it will be `undefined`.
+
+## License
+
+MIT
diff --git a/node_modules/@szmarczak/http-timer/dist/source/index.d.ts b/node_modules/@szmarczak/http-timer/dist/source/index.d.ts
new file mode 100644
index 0000000..2620b4a
--- /dev/null
+++ b/node_modules/@szmarczak/http-timer/dist/source/index.d.ts
@@ -0,0 +1,32 @@
+/// <reference types="node" />
+import { ClientRequest, IncomingMessage } from 'http';
+export interface Timings {
+ start: number;
+ socket?: number;
+ lookup?: number;
+ connect?: number;
+ secureConnect?: number;
+ upload?: number;
+ response?: number;
+ end?: number;
+ error?: number;
+ abort?: number;
+ phases: {
+ wait?: number;
+ dns?: number;
+ tcp?: number;
+ tls?: number;
+ request?: number;
+ firstByte?: number;
+ download?: number;
+ total?: number;
+ };
+}
+export interface ClientRequestWithTimings extends ClientRequest {
+ timings?: Timings;
+}
+export interface IncomingMessageWithTimings extends IncomingMessage {
+ timings?: Timings;
+}
+declare const timer: (request: ClientRequestWithTimings) => Timings;
+export default timer;
diff --git a/node_modules/@szmarczak/http-timer/dist/source/index.js b/node_modules/@szmarczak/http-timer/dist/source/index.js
new file mode 100644
index 0000000..6f07245
--- /dev/null
+++ b/node_modules/@szmarczak/http-timer/dist/source/index.js
@@ -0,0 +1,126 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const defer_to_connect_1 = require("defer-to-connect");
+const util_1 = require("util");
+const nodejsMajorVersion = Number(process.versions.node.split('.')[0]);
+const timer = (request) => {
+ if (request.timings) {
+ return request.timings;
+ }
+ const timings = {
+ start: Date.now(),
+ socket: undefined,
+ lookup: undefined,
+ connect: undefined,
+ secureConnect: undefined,
+ upload: undefined,
+ response: undefined,
+ end: undefined,
+ error: undefined,
+ abort: undefined,
+ phases: {
+ wait: undefined,
+ dns: undefined,
+ tcp: undefined,
+ tls: undefined,
+ request: undefined,
+ firstByte: undefined,
+ download: undefined,
+ total: undefined
+ }
+ };
+ request.timings = timings;
+ const handleError = (origin) => {
+ const emit = origin.emit.bind(origin);
+ origin.emit = (event, ...args) => {
+ // Catches the `error` event
+ if (event === 'error') {
+ timings.error = Date.now();
+ timings.phases.total = timings.error - timings.start;
+ origin.emit = emit;
+ }
+ // Saves the original behavior
+ return emit(event, ...args);
+ };
+ };
+ handleError(request);
+ const onAbort = () => {
+ timings.abort = Date.now();
+ // Let the `end` response event be responsible for setting the total phase,
+ // unless the Node.js major version is >= 13.
+ if (!timings.response || nodejsMajorVersion >= 13) {
+ timings.phases.total = Date.now() - timings.start;
+ }
+ };
+ request.prependOnceListener('abort', onAbort);
+ const onSocket = (socket) => {
+ timings.socket = Date.now();
+ timings.phases.wait = timings.socket - timings.start;
+ if (util_1.types.isProxy(socket)) {
+ return;
+ }
+ const lookupListener = () => {
+ timings.lookup = Date.now();
+ timings.phases.dns = timings.lookup - timings.socket;
+ };
+ socket.prependOnceListener('lookup', lookupListener);
+ defer_to_connect_1.default(socket, {
+ connect: () => {
+ timings.connect = Date.now();
+ if (timings.lookup === undefined) {
+ socket.removeListener('lookup', lookupListener);
+ timings.lookup = timings.connect;
+ timings.phases.dns = timings.lookup - timings.socket;
+ }
+ timings.phases.tcp = timings.connect - timings.lookup;
+ // This callback is called before flushing any data,
+ // so we don't need to set `timings.phases.request` here.
+ },
+ secureConnect: () => {
+ timings.secureConnect = Date.now();
+ timings.phases.tls = timings.secureConnect - timings.connect;
+ }
+ });
+ };
+ if (request.socket) {
+ onSocket(request.socket);
+ }
+ else {
+ request.prependOnceListener('socket', onSocket);
+ }
+ const onUpload = () => {
+ var _a;
+ timings.upload = Date.now();
+ timings.phases.request = timings.upload - ((_a = timings.secureConnect) !== null && _a !== void 0 ? _a : timings.connect);
+ };
+ const writableFinished = () => {
+ if (typeof request.writableFinished === 'boolean') {
+ return request.writableFinished;
+ }
+ // Node.js doesn't have `request.writableFinished` property
+ return request.finished && request.outputSize === 0 && (!request.socket || request.socket.writableLength === 0);
+ };
+ if (writableFinished()) {
+ onUpload();
+ }
+ else {
+ request.prependOnceListener('finish', onUpload);
+ }
+ request.prependOnceListener('response', (response) => {
+ timings.response = Date.now();
+ timings.phases.firstByte = timings.response - timings.upload;
+ response.timings = timings;
+ handleError(response);
+ response.prependOnceListener('end', () => {
+ timings.end = Date.now();
+ timings.phases.download = timings.end - timings.response;
+ timings.phases.total = timings.end - timings.start;
+ });
+ response.prependOnceListener('aborted', onAbort);
+ });
+ return timings;
+};
+exports.default = timer;
+// For CommonJS default export support
+module.exports = timer;
+module.exports.default = timer;
diff --git a/node_modules/@szmarczak/http-timer/package.json b/node_modules/@szmarczak/http-timer/package.json
new file mode 100644
index 0000000..43a3559
--- /dev/null
+++ b/node_modules/@szmarczak/http-timer/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@szmarczak/http-timer",
+ "version": "4.0.6",
+ "description": "Timings for HTTP requests",
+ "main": "dist/source",
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && tsc --noEmit && nyc ava",
+ "build": "del-cli dist && tsc",
+ "prepare": "npm run build",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "files": [
+ "dist/source"
+ ],
+ "keywords": [
+ "http",
+ "https",
+ "timer",
+ "timings"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/szmarczak/http-timer.git"
+ },
+ "author": "Szymon Marczak",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/szmarczak/http-timer/issues"
+ },
+ "homepage": "https://github.com/szmarczak/http-timer#readme",
+ "dependencies": {
+ "defer-to-connect": "^2.0.0"
+ },
+ "devDependencies": {
+ "@ava/typescript": "^2.0.0",
+ "@sindresorhus/tsconfig": "^1.0.2",
+ "@types/node": "^16.3.1",
+ "ava": "^3.15.0",
+ "coveralls": "^3.1.1",
+ "del-cli": "^3.0.1",
+ "http2-wrapper": "^2.0.7",
+ "nyc": "^15.1.0",
+ "p-event": "^4.2.0",
+ "typescript": "^4.3.5",
+ "xo": "^0.39.1"
+ },
+ "types": "dist/source",
+ "nyc": {
+ "extension": [
+ ".ts"
+ ],
+ "exclude": [
+ "**/tests/**"
+ ]
+ },
+ "xo": {
+ "rules": {
+ "@typescript-eslint/no-non-null-assertion": "off"
+ }
+ },
+ "ava": {
+ "typescript": {
+ "compile": false,
+ "rewritePaths": {
+ "tests/": "dist/tests/"
+ }
+ }
+ }
+}
diff --git a/node_modules/@types/cacheable-request/LICENSE b/node_modules/@types/cacheable-request/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/cacheable-request/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/cacheable-request/README.md b/node_modules/@types/cacheable-request/README.md
new file mode 100755
index 0000000..7be196d
--- /dev/null
+++ b/node_modules/@types/cacheable-request/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/cacheable-request`
+
+# Summary
+This package contains type definitions for cacheable-request (https://github.com/lukechilds/cacheable-request#readme).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cacheable-request.
+
+### Additional Details
+ * Last updated: Tue, 06 Jul 2021 18:05:48 GMT
+ * Dependencies: [@types/keyv](https://npmjs.com/package/@types/keyv), [@types/http-cache-semantics](https://npmjs.com/package/@types/http-cache-semantics), [@types/responselike](https://npmjs.com/package/@types/responselike), [@types/node](https://npmjs.com/package/@types/node)
+ * Global values: none
+
+# Credits
+These definitions were written by [BendingBender](https://github.com/BendingBender), and [Paul Melnikow](https://github.com/paulmelnikow).
diff --git a/node_modules/@types/cacheable-request/index.d.ts b/node_modules/@types/cacheable-request/index.d.ts
new file mode 100755
index 0000000..832f9b9
--- /dev/null
+++ b/node_modules/@types/cacheable-request/index.d.ts
@@ -0,0 +1,137 @@
+// Type definitions for cacheable-request 6.0
+// Project: https://github.com/lukechilds/cacheable-request#readme
+// Definitions by: BendingBender <https://github.com/BendingBender>
+// Paul Melnikow <https://github.com/paulmelnikow>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
+
+/// <reference types="node" />
+
+import { request, RequestOptions, ClientRequest, ServerResponse } from 'http';
+import { URL } from 'url';
+import { EventEmitter } from 'events';
+import { Store } from 'keyv';
+import { Options as CacheSemanticsOptions } from 'http-cache-semantics';
+import ResponseLike = require('responselike');
+
+export = CacheableRequest;
+
+declare const CacheableRequest: CacheableRequest;
+
+type RequestFn = typeof request;
+
+interface CacheableRequest {
+ new (requestFn: RequestFn, storageAdapter?: string | CacheableRequest.StorageAdapter): (
+ opts: string | URL | (RequestOptions & CacheSemanticsOptions),
+ cb?: (response: ServerResponse | ResponseLike) => void
+ ) => CacheableRequest.Emitter;
+
+ RequestError: typeof RequestErrorCls;
+ CacheError: typeof CacheErrorCls;
+}
+
+declare namespace CacheableRequest {
+ type StorageAdapter = Store<any>;
+
+ interface Options {
+ /**
+ * If the cache should be used. Setting this to `false` will completely bypass the cache for the current request.
+ * @default true
+ */
+ cache?: boolean | undefined;
+
+ /**
+ * If set to `true` once a cached resource has expired it is deleted and will have to be re-requested.
+ *
+ * If set to `false`, after a cached resource's TTL expires it is kept in the cache and will be revalidated
+ * on the next request with `If-None-Match`/`If-Modified-Since` headers.
+ * @default false
+ */
+ strictTtl?: boolean | undefined;
+
+ /**
+ * Limits TTL. The `number` represents milliseconds.
+ * @default undefined
+ */
+ maxTtl?: number | undefined;
+
+ /**
+ * When set to `true`, if the DB connection fails we will automatically fallback to a network request.
+ * DB errors will still be emitted to notify you of the problem even though the request callback may succeed.
+ * @default false
+ */
+ automaticFailover?: boolean | undefined;
+
+ /**
+ * Forces refreshing the cache. If the response could be retrieved from the cache, it will perform a
+ * new request and override the cache instead.
+ * @default false
+ */
+ forceRefresh?: boolean | undefined;
+ }
+
+ interface Emitter extends EventEmitter {
+ addListener(event: 'request', listener: (request: ClientRequest) => void): this;
+ addListener(
+ event: 'response',
+ listener: (response: ServerResponse | ResponseLike) => void
+ ): this;
+ addListener(event: 'error', listener: (error: RequestError | CacheError) => void): this;
+ on(event: 'request', listener: (request: ClientRequest) => void): this;
+ on(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
+ on(event: 'error', listener: (error: RequestError | CacheError) => void): this;
+ once(event: 'request', listener: (request: ClientRequest) => void): this;
+ once(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
+ once(event: 'error', listener: (error: RequestError | CacheError) => void): this;
+ prependListener(event: 'request', listener: (request: ClientRequest) => void): this;
+ prependListener(
+ event: 'response',
+ listener: (response: ServerResponse | ResponseLike) => void
+ ): this;
+ prependListener(event: 'error', listener: (error: RequestError | CacheError) => void): this;
+ prependOnceListener(event: 'request', listener: (request: ClientRequest) => void): this;
+ prependOnceListener(
+ event: 'response',
+ listener: (response: ServerResponse | ResponseLike) => void
+ ): this;
+ prependOnceListener(
+ event: 'error',
+ listener: (error: RequestError | CacheError) => void
+ ): this;
+ removeListener(event: 'request', listener: (request: ClientRequest) => void): this;
+ removeListener(
+ event: 'response',
+ listener: (response: ServerResponse | ResponseLike) => void
+ ): this;
+ removeListener(event: 'error', listener: (error: RequestError | CacheError) => void): this;
+ off(event: 'request', listener: (request: ClientRequest) => void): this;
+ off(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
+ off(event: 'error', listener: (error: RequestError | CacheError) => void): this;
+ removeAllListeners(event?: 'request' | 'response' | 'error'): this;
+ listeners(event: 'request'): Array<(request: ClientRequest) => void>;
+ listeners(event: 'response'): Array<(response: ServerResponse | ResponseLike) => void>;
+ listeners(event: 'error'): Array<(error: RequestError | CacheError) => void>;
+ rawListeners(event: 'request'): Array<(request: ClientRequest) => void>;
+ rawListeners(event: 'response'): Array<(response: ServerResponse | ResponseLike) => void>;
+ rawListeners(event: 'error'): Array<(error: RequestError | CacheError) => void>;
+ emit(event: 'request', request: ClientRequest): boolean;
+ emit(event: 'response', response: ServerResponse | ResponseLike): boolean;
+ emit(event: 'error', error: RequestError | CacheError): boolean;
+ eventNames(): Array<'request' | 'response' | 'error'>;
+ listenerCount(type: 'request' | 'response' | 'error'): number;
+ }
+
+ type RequestError = RequestErrorCls;
+ type CacheError = CacheErrorCls;
+}
+
+declare class RequestErrorCls extends Error {
+ readonly name: 'RequestError';
+
+ constructor(error: Error);
+}
+declare class CacheErrorCls extends Error {
+ readonly name: 'CacheError';
+
+ constructor(error: Error);
+}
diff --git a/node_modules/@types/cacheable-request/package.json b/node_modules/@types/cacheable-request/package.json
new file mode 100755
index 0000000..52c9622
--- /dev/null
+++ b/node_modules/@types/cacheable-request/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "@types/cacheable-request",
+ "version": "6.0.2",
+ "description": "TypeScript definitions for cacheable-request",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cacheable-request",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "BendingBender",
+ "url": "https://github.com/BendingBender",
+ "githubUsername": "BendingBender"
+ },
+ {
+ "name": "Paul Melnikow",
+ "url": "https://github.com/paulmelnikow",
+ "githubUsername": "paulmelnikow"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/cacheable-request"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/http-cache-semantics": "*",
+ "@types/keyv": "*",
+ "@types/node": "*",
+ "@types/responselike": "*"
+ },
+ "typesPublisherContentHash": "5bc07db78df7c21a4d6250dbb806ad088df376f7ed46c63b60bb0e08488dcdc4",
+ "typeScriptVersion": "3.6"
+} \ No newline at end of file
diff --git a/node_modules/@types/glob/LICENSE b/node_modules/@types/glob/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/glob/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/glob/README.md b/node_modules/@types/glob/README.md
new file mode 100755
index 0000000..c1e7ab6
--- /dev/null
+++ b/node_modules/@types/glob/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/glob`
+
+# Summary
+This package contains type definitions for Glob (https://github.com/isaacs/node-glob).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/glob.
+
+### Additional Details
+ * Last updated: Tue, 19 Oct 2021 22:01:22 GMT
+ * Dependencies: [@types/minimatch](https://npmjs.com/package/@types/minimatch), [@types/node](https://npmjs.com/package/@types/node)
+ * Global values: none
+
+# Credits
+These definitions were written by [vvakame](https://github.com/vvakame), [voy](https://github.com/voy), [Klaus Meinhardt](https://github.com/ajafff), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
diff --git a/node_modules/@types/glob/index.d.ts b/node_modules/@types/glob/index.d.ts
new file mode 100755
index 0000000..ac89b93
--- /dev/null
+++ b/node_modules/@types/glob/index.d.ts
@@ -0,0 +1,91 @@
+// Type definitions for Glob 7.2
+// Project: https://github.com/isaacs/node-glob
+// Definitions by: vvakame <https://github.com/vvakame>
+// voy <https://github.com/voy>
+// Klaus Meinhardt <https://github.com/ajafff>
+// Piotr Błażejewicz <https://github.com/peterblazejewicz>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/// <reference types="node" />
+
+import events = require("events");
+import minimatch = require("minimatch");
+import fs = require("fs");
+
+declare function G(pattern: string, cb: (err: Error | null, matches: string[]) => void): G.IGlob;
+declare function G(pattern: string, options: G.IOptions, cb: (err: Error | null, matches: string[]) => void): G.IGlob;
+
+declare namespace G {
+ function __promisify__(pattern: string, options?: IOptions): Promise<string[]>;
+
+ function sync(pattern: string, options?: IOptions): string[];
+
+ function hasMagic(pattern: string, options?: IOptions): boolean;
+
+ let glob: typeof G;
+ let Glob: IGlobStatic;
+ let GlobSync: IGlobSyncStatic;
+
+ interface IOptions extends minimatch.IOptions {
+ cwd?: string | undefined;
+ root?: string | undefined;
+ dot?: boolean | undefined;
+ nomount?: boolean | undefined;
+ mark?: boolean | undefined;
+ nosort?: boolean | undefined;
+ stat?: boolean | undefined;
+ silent?: boolean | undefined;
+ strict?: boolean | undefined;
+ cache?: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> } | undefined;
+ statCache?: { [path: string]: false | { isDirectory(): boolean} | undefined } | undefined;
+ symlinks?: { [path: string]: boolean | undefined } | undefined;
+ realpathCache?: { [path: string]: string } | undefined;
+ sync?: boolean | undefined;
+ nounique?: boolean | undefined;
+ nonull?: boolean | undefined;
+ debug?: boolean | undefined;
+ nobrace?: boolean | undefined;
+ noglobstar?: boolean | undefined;
+ noext?: boolean | undefined;
+ nocase?: boolean | undefined;
+ matchBase?: any;
+ nodir?: boolean | undefined;
+ ignore?: string | ReadonlyArray<string> | undefined;
+ follow?: boolean | undefined;
+ realpath?: boolean | undefined;
+ nonegate?: boolean | undefined;
+ nocomment?: boolean | undefined;
+ absolute?: boolean | undefined;
+ fs?: typeof fs;
+ }
+
+ interface IGlobStatic extends events.EventEmitter {
+ new (pattern: string, cb?: (err: Error | null, matches: string[]) => void): IGlob;
+ new (pattern: string, options: IOptions, cb?: (err: Error | null, matches: string[]) => void): IGlob;
+ prototype: IGlob;
+ }
+
+ interface IGlobSyncStatic {
+ new (pattern: string, options?: IOptions): IGlobBase;
+ prototype: IGlobBase;
+ }
+
+ interface IGlobBase {
+ minimatch: minimatch.IMinimatch;
+ options: IOptions;
+ aborted: boolean;
+ cache: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> };
+ statCache: { [path: string]: false | { isDirectory(): boolean; } | undefined };
+ symlinks: { [path: string]: boolean | undefined };
+ realpathCache: { [path: string]: string };
+ found: string[];
+ }
+
+ interface IGlob extends IGlobBase, events.EventEmitter {
+ pause(): void;
+ resume(): void;
+ abort(): void;
+ }
+}
+
+export = G;
diff --git a/node_modules/@types/glob/package.json b/node_modules/@types/glob/package.json
new file mode 100755
index 0000000..74c4d71
--- /dev/null
+++ b/node_modules/@types/glob/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "@types/glob",
+ "version": "7.2.0",
+ "description": "TypeScript definitions for Glob",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/glob",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "vvakame",
+ "url": "https://github.com/vvakame",
+ "githubUsername": "vvakame"
+ },
+ {
+ "name": "voy",
+ "url": "https://github.com/voy",
+ "githubUsername": "voy"
+ },
+ {
+ "name": "Klaus Meinhardt",
+ "url": "https://github.com/ajafff",
+ "githubUsername": "ajafff"
+ },
+ {
+ "name": "Piotr Błażejewicz",
+ "url": "https://github.com/peterblazejewicz",
+ "githubUsername": "peterblazejewicz"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/glob"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/minimatch": "*",
+ "@types/node": "*"
+ },
+ "typesPublisherContentHash": "436848b740c6ebcf1bfea5b5542b494eb73ed390b43a18c3dffa26ce9bad0aa8",
+ "typeScriptVersion": "3.7"
+} \ No newline at end of file
diff --git a/node_modules/@types/http-cache-semantics/LICENSE b/node_modules/@types/http-cache-semantics/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/http-cache-semantics/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/http-cache-semantics/README.md b/node_modules/@types/http-cache-semantics/README.md
new file mode 100755
index 0000000..ce8964e
--- /dev/null
+++ b/node_modules/@types/http-cache-semantics/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/http-cache-semantics`
+
+# Summary
+This package contains type definitions for http-cache-semantics (https://github.com/kornelski/http-cache-semantics#readme).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-cache-semantics.
+
+### Additional Details
+ * Last updated: Tue, 06 Jul 2021 21:33:36 GMT
+ * Dependencies: none
+ * Global values: none
+
+# Credits
+These definitions were written by [BendingBender](https://github.com/BendingBender).
diff --git a/node_modules/@types/http-cache-semantics/index.d.ts b/node_modules/@types/http-cache-semantics/index.d.ts
new file mode 100755
index 0000000..54c1513
--- /dev/null
+++ b/node_modules/@types/http-cache-semantics/index.d.ts
@@ -0,0 +1,170 @@
+// Type definitions for http-cache-semantics 4.0
+// Project: https://github.com/kornelski/http-cache-semantics#readme
+// Definitions by: BendingBender <https://github.com/BendingBender>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+export = CachePolicy;
+
+declare class CachePolicy {
+ constructor(req: CachePolicy.Request, res: CachePolicy.Response, options?: CachePolicy.Options);
+
+ /**
+ * Returns `true` if the response can be stored in a cache.
+ * If it's `false` then you MUST NOT store either the request or the response.
+ */
+ storable(): boolean;
+
+ /**
+ * This is the most important method. Use this method to check whether the cached response is still fresh
+ * in the context of the new request.
+ *
+ * If it returns `true`, then the given `request` matches the original response this cache policy has been
+ * created with, and the response can be reused without contacting the server. Note that the old response
+ * can't be returned without being updated, see `responseHeaders()`.
+ *
+ * If it returns `false`, then the response may not be matching at all (e.g. it's for a different URL or method),
+ * or may require to be refreshed first (see `revalidationHeaders()`).
+ */
+ satisfiesWithoutRevalidation(newRequest: CachePolicy.Request): boolean;
+
+ /**
+ * Returns updated, filtered set of response headers to return to clients receiving the cached response.
+ * This function is necessary, because proxies MUST always remove hop-by-hop headers (such as `TE` and `Connection`)
+ * and update response's `Age` to avoid doubling cache time.
+ *
+ * @example
+ * cachedResponse.headers = cachePolicy.responseHeaders(cachedResponse);
+ */
+ responseHeaders(): CachePolicy.Headers;
+
+ /**
+ * Returns approximate time in milliseconds until the response becomes stale (i.e. not fresh).
+ *
+ * After that time (when `timeToLive() <= 0`) the response might not be usable without revalidation. However,
+ * there are exceptions, e.g. a client can explicitly allow stale responses, so always check with
+ * `satisfiesWithoutRevalidation()`.
+ */
+ timeToLive(): number;
+
+ /**
+ * Chances are you'll want to store the `CachePolicy` object along with the cached response.
+ * `obj = policy.toObject()` gives a plain JSON-serializable object.
+ */
+ toObject(): CachePolicy.CachePolicyObject;
+
+ /**
+ * `policy = CachePolicy.fromObject(obj)` creates an instance from object created by `toObject()`.
+ */
+ static fromObject(obj: CachePolicy.CachePolicyObject): CachePolicy;
+
+ /**
+ * Returns updated, filtered set of request headers to send to the origin server to check if the cached
+ * response can be reused. These headers allow the origin server to return status 304 indicating the
+ * response is still fresh. All headers unrelated to caching are passed through as-is.
+ *
+ * Use this method when updating cache from the origin server.
+ *
+ * @example
+ * updateRequest.headers = cachePolicy.revalidationHeaders(updateRequest);
+ */
+ revalidationHeaders(newRequest: CachePolicy.Request): CachePolicy.Headers;
+
+ /**
+ * Use this method to update the cache after receiving a new response from the origin server.
+ */
+ revalidatedPolicy(
+ revalidationRequest: CachePolicy.Request,
+ revalidationResponse: CachePolicy.Response
+ ): CachePolicy.RevalidationPolicy;
+}
+
+declare namespace CachePolicy {
+ interface Request {
+ url?: string | undefined;
+ method?: string | undefined;
+ headers: Headers;
+ }
+
+ interface Response {
+ status?: number | undefined;
+ headers: Headers;
+ }
+
+ interface Options {
+ /**
+ * If `true`, then the response is evaluated from a perspective of a shared cache (i.e. `private` is not
+ * cacheable and `s-maxage` is respected). If `false`, then the response is evaluated from a perspective
+ * of a single-user cache (i.e. `private` is cacheable and `s-maxage` is ignored).
+ * `true` is recommended for HTTP clients.
+ * @default true
+ */
+ shared?: boolean | undefined;
+ /**
+ * A fraction of response's age that is used as a fallback cache duration. The default is 0.1 (10%),
+ * e.g. if a file hasn't been modified for 100 days, it'll be cached for 100*0.1 = 10 days.
+ * @default 0.1
+ */
+ cacheHeuristic?: number | undefined;
+ /**
+ * A number of milliseconds to assume as the default time to cache responses with `Cache-Control: immutable`.
+ * Note that [per RFC](https://httpwg.org/specs/rfc8246.html#the-immutable-cache-control-extension)
+ * these can become stale, so `max-age` still overrides the default.
+ * @default 24*3600*1000 (24h)
+ */
+ immutableMinTimeToLive?: number | undefined;
+ /**
+ * If `true`, common anti-cache directives will be completely ignored if the non-standard `pre-check`
+ * and `post-check` directives are present. These two useless directives are most commonly found
+ * in bad StackOverflow answers and PHP's "session limiter" defaults.
+ * @default false
+ */
+ ignoreCargoCult?: boolean | undefined;
+ /**
+ * If `false`, then server's `Date` header won't be used as the base for `max-age`. This is against the RFC,
+ * but it's useful if you want to cache responses with very short `max-age`, but your local clock
+ * is not exactly in sync with the server's.
+ * @default true
+ */
+ trustServerDate?: boolean | undefined;
+ }
+
+ interface CachePolicyObject {
+ v: number;
+ t: number;
+ sh: boolean;
+ ch: number;
+ imm: number;
+ st: number;
+ resh: Headers;
+ rescc: { [key: string]: string };
+ m: string;
+ u?: string | undefined;
+ h?: string | undefined;
+ a: boolean;
+ reqh: Headers | null;
+ reqcc: { [key: string]: string };
+ }
+
+ interface Headers {
+ [header: string]: string | string[] | undefined;
+ }
+
+ interface RevalidationPolicy {
+ /**
+ * A new `CachePolicy` with HTTP headers updated from `revalidationResponse`. You can always replace
+ * the old cached `CachePolicy` with the new one.
+ */
+ policy: CachePolicy;
+ /**
+ * Boolean indicating whether the response body has changed.
+ *
+ * - If `false`, then a valid 304 Not Modified response has been received, and you can reuse the old
+ * cached response body.
+ * - If `true`, you should use new response's body (if present), or make another request to the origin
+ * server without any conditional headers (i.e. don't use `revalidationHeaders()` this time) to get
+ * the new resource.
+ */
+ modified: boolean;
+ matches: boolean;
+ }
+}
diff --git a/node_modules/@types/http-cache-semantics/package.json b/node_modules/@types/http-cache-semantics/package.json
new file mode 100755
index 0000000..58e08c0
--- /dev/null
+++ b/node_modules/@types/http-cache-semantics/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@types/http-cache-semantics",
+ "version": "4.0.1",
+ "description": "TypeScript definitions for http-cache-semantics",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-cache-semantics",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "BendingBender",
+ "url": "https://github.com/BendingBender",
+ "githubUsername": "BendingBender"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/http-cache-semantics"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "9ecb3137d8c0ede7c06f5d90c7d4759e560a26effb8846bc51a99b63f03dd2d1",
+ "typeScriptVersion": "3.6"
+} \ No newline at end of file
diff --git a/node_modules/@types/keyv/LICENSE b/node_modules/@types/keyv/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/keyv/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/keyv/README.md b/node_modules/@types/keyv/README.md
new file mode 100755
index 0000000..8167fcc
--- /dev/null
+++ b/node_modules/@types/keyv/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/keyv`
+
+# Summary
+This package contains type definitions for keyv (https://github.com/lukechilds/keyv).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keyv.
+
+### Additional Details
+ * Last updated: Thu, 17 Mar 2022 05:31:42 GMT
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
+ * Global values: none
+
+# Credits
+These definitions were written by [AryloYeung](https://github.com/Arylo), and [BendingBender](https://github.com/BendingBender).
diff --git a/node_modules/@types/keyv/index.d.ts b/node_modules/@types/keyv/index.d.ts
new file mode 100755
index 0000000..adca74d
--- /dev/null
+++ b/node_modules/@types/keyv/index.d.ts
@@ -0,0 +1,90 @@
+// Type definitions for keyv 3.1
+// Project: https://github.com/lukechilds/keyv
+// Definitions by: AryloYeung <https://github.com/Arylo>
+// BendingBender <https://github.com/BendingBender>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.8
+
+/// <reference types="node" />
+import { EventEmitter } from 'events';
+
+type WithRequiredProperties<T, K extends keyof T> = T & Required<Pick<T, K>>;
+
+declare class Keyv<TValue = any, TOpts extends { [key: string]: any } = {}> extends EventEmitter {
+ /**
+ * `this.opts` is an object containing at least the properties listed
+ * below. However, `Keyv.Options` allows arbitrary properties as well.
+ * These properties can be specified as the second type parameter to `Keyv`.
+ */
+ opts: WithRequiredProperties<
+ Keyv.Options<TValue>,
+ 'deserialize' | 'namespace' | 'serialize' | 'store' | 'uri'
+ > &
+ TOpts;
+
+ /**
+ * @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
+ */
+ constructor(opts?: Keyv.Options<TValue> & TOpts);
+ /**
+ * @param uri The connection string URI.
+ *
+ * Merged into the options object as options.uri.
+ * @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
+ */
+ constructor(uri?: string, opts?: Keyv.Options<TValue> & TOpts);
+
+ /** Returns the value. */
+ get<TRaw extends boolean = false>(key: string, options?: { raw?: TRaw }):
+ Promise<(TRaw extends false
+ ? TValue
+ : Keyv.DeserializedData<TValue>) | undefined>;
+ /**
+ * Set a value.
+ *
+ * By default keys are persistent. You can set an expiry TTL in milliseconds.
+ */
+ set(key: string, value: TValue, ttl?: number): Promise<true>;
+ /**
+ * Deletes an entry.
+ *
+ * Returns `true` if the key existed, `false` if not.
+ */
+ delete(key: string): Promise<boolean>;
+ /** Delete all entries in the current namespace. */
+ clear(): Promise<void>;
+}
+
+declare namespace Keyv {
+ interface Options<TValue> {
+ /** Namespace for the current instance. */
+ namespace?: string | undefined;
+ /** A custom serialization function. */
+ serialize?: ((data: DeserializedData<TValue>) => string) | undefined;
+ /** A custom deserialization function. */
+ deserialize?: ((data: string) => DeserializedData<TValue> | undefined) | undefined;
+ /** The connection string URI. */
+ uri?: string | undefined;
+ /** The storage adapter instance to be used by Keyv. */
+ store?: Store<TValue> | undefined;
+ /** Default TTL. Can be overridden by specififying a TTL on `.set()`. */
+ ttl?: number | undefined;
+ /** Specify an adapter to use. e.g `'redis'` or `'mongodb'`. */
+ adapter?: 'redis' | 'mongodb' | 'mongo' | 'sqlite' | 'postgresql' | 'postgres' | 'mysql' | undefined;
+
+ [key: string]: any;
+ }
+
+ interface DeserializedData<TValue> {
+ value: TValue; expires: number | null;
+ }
+
+ interface Store<TValue> {
+ get(key: string): TValue | Promise<TValue | undefined> | undefined;
+ set(key: string, value: TValue, ttl?: number): any;
+ delete(key: string): boolean | Promise<boolean>;
+ clear(): void | Promise<void>;
+ }
+}
+
+export = Keyv;
diff --git a/node_modules/@types/keyv/package.json b/node_modules/@types/keyv/package.json
new file mode 100755
index 0000000..15d4020
--- /dev/null
+++ b/node_modules/@types/keyv/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "@types/keyv",
+ "version": "3.1.4",
+ "description": "TypeScript definitions for keyv",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keyv",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "AryloYeung",
+ "url": "https://github.com/Arylo",
+ "githubUsername": "Arylo"
+ },
+ {
+ "name": "BendingBender",
+ "url": "https://github.com/BendingBender",
+ "githubUsername": "BendingBender"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/keyv"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*"
+ },
+ "typesPublisherContentHash": "e83393e0860475d12e960cede22532e18e129cf659f31f2a0298a88cb5d02d36",
+ "typeScriptVersion": "3.9"
+} \ No newline at end of file
diff --git a/node_modules/@types/minimatch/LICENSE b/node_modules/@types/minimatch/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/minimatch/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/minimatch/README.md b/node_modules/@types/minimatch/README.md
new file mode 100755
index 0000000..5c20967
--- /dev/null
+++ b/node_modules/@types/minimatch/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/minimatch`
+
+# Summary
+This package contains type definitions for minimatch (https://github.com/isaacs/minimatch).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimatch.
+
+### Additional Details
+ * Last updated: Wed, 31 Aug 2022 17:32:44 GMT
+ * Dependencies: none
+ * Global values: none
+
+# Credits
+These definitions were written by [vvakame](https://github.com/vvakame), [Shant Marouti](https://github.com/shantmarouti), and [BendingBender](https://github.com/BendingBender).
diff --git a/node_modules/@types/minimatch/index.d.ts b/node_modules/@types/minimatch/index.d.ts
new file mode 100755
index 0000000..0181080
--- /dev/null
+++ b/node_modules/@types/minimatch/index.d.ts
@@ -0,0 +1,300 @@
+// Type definitions for minimatch 5.1
+// Project: https://github.com/isaacs/minimatch
+// Definitions by: vvakame <https://github.com/vvakame>
+// Shant Marouti <https://github.com/shantmarouti>
+// BendingBender <https://github.com/BendingBender>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/**
+ * Tests a path against the pattern using the options.
+ *
+ * @example
+ * import minimatch = require("minimatch");
+ *
+ * const isJS = minimatch(file, "*.js", { matchBase: true });
+ */
+declare function minimatch(target: string, pattern: string, options?: minimatch.IOptions): boolean;
+
+declare namespace minimatch {
+ /**
+ * Match against the list of files, in the style of fnmatch or glob.
+ * If nothing is matched, and options.nonull is set,
+ * then return a list containing the pattern itself.
+ *
+ * @example
+ * import minimatch = require("minimatch");
+ *
+ * const javascripts = minimatch.match(fileList, "*.js", {matchBase: true});
+ */
+ function match(list: readonly string[], pattern: string, options?: IOptions): string[];
+
+ /**
+ * @return A function that tests its supplied argument, suitable for use with `Array.filter`.
+ *
+ * @example
+ * import minimatch = require("minimatch");
+ *
+ * const javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}));
+ */
+ function filter(
+ pattern: string,
+ options?: IOptions,
+ ): (element: string, indexed: number, array: readonly string[]) => boolean;
+
+ /**
+ * Make a regular expression object from the pattern.
+ */
+ function makeRe(pattern: string, options?: IOptions): RegExp | false;
+
+ function defaults(defaultOptions: IOptions): typeof minimatch;
+
+ function braceExpand(pattern: string, options?: IOptions): string[];
+
+ const sep: string;
+ const GLOBSTAR: unique symbol;
+
+ interface IOptions {
+ /**
+ * Dump a ton of stuff to stderr.
+ *
+ * @default false
+ */
+ debug?: boolean | undefined;
+
+ /**
+ * Do not expand `{a,b}` and `{1..3}` brace sets.
+ *
+ * @default false
+ */
+ nobrace?: boolean | undefined;
+
+ /**
+ * Disable `**` matching against multiple folder names.
+ *
+ * @default false
+ */
+ noglobstar?: boolean | undefined;
+
+ /**
+ * Allow patterns to match filenames starting with a period,
+ * even if the pattern does not explicitly have a period in that spot.
+ *
+ * Note that by default, `'a/**' + '/b'` will **not** match `a/.d/b`, unless `dot` is set.
+ *
+ * @default false
+ */
+ dot?: boolean | undefined;
+
+ /**
+ * Disable "extglob" style patterns like `+(a|b)`.
+ *
+ * @default false
+ */
+ noext?: boolean | undefined;
+
+ /**
+ * Perform a case-insensitive match.
+ *
+ * @default false
+ */
+ nocase?: boolean | undefined;
+
+ /**
+ * When a match is not found by `minimatch.match`,
+ * return a list containing the pattern itself if this option is set.
+ * Otherwise, an empty list is returned if there are no matches.
+ *
+ * @default false
+ */
+ nonull?: boolean | undefined;
+
+ /**
+ * If set, then patterns without slashes will be matched
+ * against the basename of the path if it contains slashes. For example,
+ * `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+ *
+ * @default false
+ */
+ matchBase?: boolean | undefined;
+
+ /**
+ * Suppress the behavior of treating `#` at the start of a pattern as a comment.
+ *
+ * @default false
+ */
+ nocomment?: boolean | undefined;
+
+ /**
+ * Suppress the behavior of treating a leading `!` character as negation.
+ *
+ * @default false
+ */
+ nonegate?: boolean | undefined;
+
+ /**
+ * Returns from negate expressions the same as if they were not negated.
+ * (Ie, true on a hit, false on a miss.)
+ *
+ * @default false
+ */
+ flipNegate?: boolean | undefined;
+
+ /**
+ * Compare a partial path to a pattern. As long as the parts of the path that
+ * are present are not contradicted by the pattern, it will be treated as a
+ * match. This is useful in applications where you're walking through a
+ * folder structure, and don't yet have the full path, but want to ensure that
+ * you do not walk down paths that can never be a match.
+ *
+ * @default false
+ *
+ * @example
+ * import minimatch = require("minimatch");
+ *
+ * minimatch('/a/b', '/a/*' + '/c/d', { partial: true }) // true, might be /a/b/c/d
+ * minimatch('/a/b', '/**' + '/d', { partial: true }) // true, might be /a/b/.../d
+ * minimatch('/x/y/z', '/a/**' + '/z', { partial: true }) // false, because x !== a
+ */
+ partial?: boolean;
+
+ /**
+ * Use `\\` as a path separator _only_, and _never_ as an escape
+ * character. If set, all `\\` characters are replaced with `/` in
+ * the pattern. Note that this makes it **impossible** to match
+ * against paths containing literal glob pattern characters, but
+ * allows matching with patterns constructed using `path.join()` and
+ * `path.resolve()` on Windows platforms, mimicking the (buggy!)
+ * behavior of earlier versions on Windows. Please use with
+ * caution, and be mindful of the caveat about Windows paths
+ *
+ * For legacy reasons, this is also set if
+ * `options.allowWindowsEscape` is set to the exact value `false`.
+ *
+ * @default false
+ */
+ windowsPathsNoEscape?: boolean;
+ }
+
+ /**
+ * @deprecated Keep legacy interface to prevent unnecessary breakage.
+ */
+ type IMinimatchStatic = typeof Minimatch;
+ /**
+ * @deprecated Keep legacy interface to prevent unnecessary breakage.
+ */
+ type IMinimatch = Minimatch;
+
+ /**
+ * Create a minimatch object by instantiating the `minimatch.Minimatch` class.
+ *
+ * @example
+ * import { Minimatch } from "minimatch";
+ *
+ * const mm = new Minimatch(pattern, options);
+ */
+ class Minimatch {
+ constructor(pattern: string, options?: IOptions);
+
+ static defaults(defaultOptions: IOptions): typeof Minimatch;
+
+ /**
+ * The original pattern the minimatch object represents.
+ */
+ pattern: string;
+
+ /**
+ * The options supplied to the constructor.
+ */
+ options: IOptions;
+
+ /**
+ * A 2-dimensional array of regexp or string expressions. Each row in the array corresponds
+ * to a brace-expanded pattern. Each item in the row corresponds to a single path-part. For
+ * example, the pattern `{a,b/c}/d` would expand to a set of patterns like:
+ *
+ * ```
+ * [ [ a, d ]
+ * , [ b, c, d ] ]
+ * ```
+ *
+ * If a portion of the pattern doesn't have any "magic" in it (that is, it's something like `"foo"``
+ * rather than `fo*o?`), then it will be left as a string rather than converted to a regular expression.
+ */
+ set: Array<Array<RegExp | string>>;
+
+ /**
+ * Created by the `makeRe` method. A single regular expression expressing the entire pattern. This is
+ * useful in cases where you wish to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+ */
+ regexp: RegExp | false | null;
+
+ /**
+ * True if the pattern is negated.
+ */
+ negate: boolean;
+
+ /**
+ * True if the pattern is a comment.
+ */
+ comment: boolean;
+
+ /**
+ * True if the pattern is `""`.
+ */
+ empty: boolean;
+
+ /**
+ * True if windows path delimiters shouldn't be interpreted as escape characters.
+ */
+ windowsPathsNoEscape: boolean;
+
+ /**
+ * True if partial paths should be compared to a pattern.
+ */
+ partial: boolean;
+
+ /**
+ * Generate the `regexp` member if necessary, and return it. Will return `false` if the pattern is invalid.
+ */
+ makeRe(): RegExp | false;
+
+ /**
+ * @return `true` if the filename matches the pattern, or `false` otherwise.
+ */
+ match(fname: string, partial?: boolean): boolean;
+
+ /**
+ * Take a `/`-split filename, and match it against a single row in the `regExpSet`.
+ * This method is mainly for internal use, but is exposed so that it can be used
+ * by a glob-walker that needs to avoid excessive filesystem calls.
+ */
+ matchOne(file: readonly string[], pattern: ReadonlyArray<string | RegExp>, partial: boolean): boolean;
+
+ /**
+ * @deprecated. For internal use.
+ */
+ debug(): void;
+
+ /**
+ * @deprecated. For internal use.
+ */
+ make(): void;
+
+ /**
+ * @deprecated. For internal use.
+ */
+ parseNegate(): void;
+
+ /**
+ * @deprecated. For internal use.
+ */
+ braceExpand(): string[];
+
+ /**
+ * @deprecated. For internal use.
+ */
+ parse(pattern: string, isSub?: boolean): string | false | [string, boolean] | RegExp | typeof GLOBSTAR;
+ }
+}
+
+export = minimatch;
diff --git a/node_modules/@types/minimatch/package.json b/node_modules/@types/minimatch/package.json
new file mode 100755
index 0000000..3579912
--- /dev/null
+++ b/node_modules/@types/minimatch/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "@types/minimatch",
+ "version": "5.1.2",
+ "description": "TypeScript definitions for minimatch",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimatch",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "vvakame",
+ "url": "https://github.com/vvakame",
+ "githubUsername": "vvakame"
+ },
+ {
+ "name": "Shant Marouti",
+ "url": "https://github.com/shantmarouti",
+ "githubUsername": "shantmarouti"
+ },
+ {
+ "name": "BendingBender",
+ "url": "https://github.com/BendingBender",
+ "githubUsername": "BendingBender"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/minimatch"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "266f2226f04264f59fb2aeb3afc253d311ddd99b4ae8534d2e27f8a1379203e4",
+ "typeScriptVersion": "4.1"
+} \ No newline at end of file
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
new file mode 100755
index 0000000..8d264f8
--- /dev/null
+++ b/node_modules/@types/node/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for Node.js (https://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
+
+### Additional Details
+ * Last updated: Mon, 26 Sep 2022 19:33:03 GMT
+ * Dependencies: none
+ * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), and [Matteo Collina](https://github.com/mcollina).
diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts
new file mode 100755
index 0000000..8e02a66
--- /dev/null
+++ b/node_modules/@types/node/assert.d.ts
@@ -0,0 +1,911 @@
+/**
+ * The `assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
+ */
+declare module 'assert' {
+ /**
+ * An alias of {@link ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ namespace assert {
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `assert` module
+ * will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ actual: unknown;
+ expected: unknown;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string | undefined;
+ /** The `actual` property on the error instance. */
+ actual?: unknown | undefined;
+ /** The `expected` property on the error instance. */
+ expected?: unknown | undefined;
+ /** The `operator` property on the error instance. */
+ operator?: string | undefined;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function | undefined;
+ });
+ }
+ /**
+ * This feature is currently experimental and behavior might still change.
+ * @since v14.2.0, v12.19.0
+ * @experimental
+ */
+ class CallTracker {
+ /**
+ * The wrapper function is expected to be called exactly `exact` times. If the
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
+ * error.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func);
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @param [fn='A no-op function']
+ * @param [exact=1]
+ * @return that wraps `fn`.
+ */
+ calls(exact?: number): () => void;
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
+ /**
+ * The arrays contains information about the expected and actual number of calls of
+ * the functions that have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * function foo() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * // Returns an array containing information on callsfunc()
+ * tracker.report();
+ * // [
+ * // {
+ * // message: 'Expected the func function to be executed 2 time(s) but was
+ * // executed 0 time(s).',
+ * // actual: 0,
+ * // expected: 2,
+ * // operator: 'func',
+ * // stack: stack trace
+ * // }
+ * // ]
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @return of objects containing information about the wrapper functions returned by `calls`.
+ */
+ report(): CallTrackerReportInformation[];
+ /**
+ * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
+ * have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * callsfunc();
+ *
+ * // Will throw an error since callsfunc() was only called once.
+ * tracker.verify();
+ * ```
+ * @since v14.2.0, v12.19.0
+ */
+ verify(): void;
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ *
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
+ * See below for further details.
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: unknown,
+ expected: unknown,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function
+ ): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
+ * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2
+ * }
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj4 = Object.create(obj1);
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
+ * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text'
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text'
+ * }
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * }
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text'
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i
+ * }
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error'
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops'
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
+ * handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and`name` properties.
+ *
+ * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value'
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second
+ * argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
+ (value: unknown, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+ export = assert;
+}
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts
new file mode 100755
index 0000000..b4319b9
--- /dev/null
+++ b/node_modules/@types/node/assert/strict.d.ts
@@ -0,0 +1,8 @@
+declare module 'assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
+declare module 'node:assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts
new file mode 100755
index 0000000..0bf4739
--- /dev/null
+++ b/node_modules/@types/node/async_hooks.d.ts
@@ -0,0 +1,501 @@
+/**
+ * The `async_hooks` module provides an API to track asynchronous resources. It
+ * can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
+ */
+declare module 'async_hooks' {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'async_hooks';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on `promise execution tracking`.
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'fs';
+ * import { executionAsyncId, executionAsyncResource } from 'async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook
+ * } from 'async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * }
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on `promise execution tracking`.
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { }
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since v9.3.0)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
+ fn: Func,
+ type?: string,
+ thisArg?: ThisArg
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind<Func extends (...args: any[]) => any>(
+ fn: Func
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ *
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
+ * implementation that involves significant optimizations that are non-obvious to
+ * implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'http';
+ * import { AsyncLocalStorage } from 'async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 1: start
+ * // 0: finish
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other's data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage<T> {
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+}
+declare module 'node:async_hooks' {
+ export * from 'async_hooks';
+}
diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts
new file mode 100755
index 0000000..13ab335
--- /dev/null
+++ b/node_modules/@types/node/buffer.d.ts
@@ -0,0 +1,2238 @@
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value &#x26; 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js)
+ */
+declare module 'buffer' {
+ import { BinaryLike } from 'node:crypto';
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new (size: number): Buffer;
+ prototype: Buffer;
+ };
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { Buffer };
+ /**
+ * @experimental
+ */
+ export interface BlobOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * The Blob content-type. The intent is for `type` to convey
+ * the MIME media type of the data, however no validation of the type format
+ * is performed.
+ */
+ type?: string | undefined;
+ }
+ /**
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
+ * multiple worker threads.
+ * @since v15.7.0, v14.18.0
+ */
+ export class Blob {
+ /**
+ * The total size of the `Blob` in bytes.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly size: number;
+ /**
+ * The content-type of the `Blob`.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly type: string;
+ /**
+ * Creates a new `Blob` object containing a concatenation of the given sources.
+ *
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
+ *
+ * String sources are also copied into the `Blob`.
+ */
+ constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
+ /**
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
+ * the `Blob` data.
+ * @since v15.7.0, v14.18.0
+ */
+ arrayBuffer(): Promise<ArrayBuffer>;
+ /**
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
+ * data. The original `Blob` is not altered.
+ * @since v15.7.0, v14.18.0
+ * @param start The starting index.
+ * @param end The ending index.
+ * @param type The content-type for the new `Blob`
+ */
+ slice(start?: number, end?: number, type?: string): Blob;
+ /**
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
+ * UTF-8 string.
+ * @since v15.7.0, v14.18.0
+ */
+ text(): Promise<string>;
+ /**
+ * Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
+ * @since v16.7.0
+ */
+ stream(): unknown; // pending web streams types
+ }
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+ global {
+ // Buffer class
+ type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
+ type WithImplicitCoercion<T> =
+ | T
+ | {
+ valueOf(): T;
+ };
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new (str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new (size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: ReadonlyArray<any>): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new (buffer: Buffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: Uint8Array | ReadonlyArray<number>): Buffer;
+ from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): 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'.
+ */
+ from(
+ str:
+ | WithImplicitCoercion<string>
+ | {
+ [Symbol.toPrimitive](hint: 'string'): string;
+ },
+ encoding?: BufferEncoding
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints: <Buffer 00 00 00 00 ...>
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ <Buffer 30 31 32 33>, <Buffer 31 32 33 34> ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00>
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 61 61 61 61 61>
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
+ *
+ * buf.fill(0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ *
+ * The `Buffer` module pre-allocates an internal `Buffer` instance of
+ * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the
+ * deprecated`new Buffer(size)` constructor only when `size` is less than or equal
+ * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
+ *
+ * Use of this pre-allocated internal memory pool is a key difference between
+ * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+ * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+ * than or equal to half `Buffer.poolSize`. The
+ * difference is subtle but can be important when an application requires the
+ * additional performance that `Buffer.allocUnsafe()` provides.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created
+ * if `size` is 0.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * such `Buffer` instances with zeroes.
+ *
+ * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+ * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This
+ * allows applications to avoid the garbage collection overhead of creating many
+ * individually allocated `Buffer` instances. This approach improves both
+ * performance and memory usage by eliminating the need to track and clean up as
+ * many individual `ArrayBuffer` objects.
+ *
+ * However, in the case where a developer may need to retain a small chunk of
+ * memory from a pool for an indeterminate amount of time, it may be appropriate
+ * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+ * then copying out the relevant bits.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Need to keep around a few small chunks of memory.
+ * const store = [];
+ *
+ * socket.on('readable', () => {
+ * let data;
+ * while (null !== (data = readable.read())) {
+ * // Allocate for retained data.
+ * const sb = Buffer.allocUnsafeSlow(10);
+ *
+ * // Copy the data into the new allocation.
+ * data.copy(sb, 0, 0, 10);
+ *
+ * store.push(sb);
+ * }
+ * });
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.12.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+ * for pooling. This value may be modified.
+ * @since v0.11.3
+ */
+ poolSize: number;
+ }
+ interface Buffer extends Uint8Array {
+ /**
+ * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+ * not contain enough space to fit the entire string, only part of `string` will be
+ * written. However, partially encoded characters will not be written.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(256);
+ *
+ * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+ *
+ * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+ * // Prints: 12 bytes: ½ + ¼ = ¾
+ *
+ * const buffer = Buffer.alloc(10);
+ *
+ * const length = buffer.write('abcd', 8);
+ *
+ * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+ * // Prints: 2 bytes : ab
+ * ```
+ * @since v0.1.90
+ * @param string String to write to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+ * @param [encoding='utf8'] The character encoding of `string`.
+ * @return Number of bytes written.
+ */
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ /**
+ * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+ *
+ * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+ * then each invalid byte is replaced with the replacement character `U+FFFD`.
+ *
+ * The maximum length of a string instance (in UTF-16 code units) is available
+ * as {@link constants.MAX_STRING_LENGTH}.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * console.log(buf1.toString('utf8'));
+ * // Prints: abcdefghijklmnopqrstuvwxyz
+ * console.log(buf1.toString('utf8', 0, 5));
+ * // Prints: abcde
+ *
+ * const buf2 = Buffer.from('tést');
+ *
+ * console.log(buf2.toString('hex'));
+ * // Prints: 74c3a97374
+ * console.log(buf2.toString('utf8', 0, 3));
+ * // Prints: té
+ * console.log(buf2.toString(undefined, 0, 3));
+ * // Prints: té
+ * ```
+ * @since v0.1.90
+ * @param [encoding='utf8'] The character encoding to use.
+ * @param [start=0] The byte offset to start decoding at.
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+ */
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ /**
+ * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+ * this function when stringifying a `Buffer` instance.
+ *
+ * `Buffer.from()` accepts objects in the format returned from this method.
+ * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+ * const json = JSON.stringify(buf);
+ *
+ * console.log(json);
+ * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+ *
+ * const copy = JSON.parse(json, (key, value) => {
+ * return value &#x26;&#x26; value.type === 'Buffer' ?
+ * Buffer.from(value) :
+ * value;
+ * });
+ *
+ * console.log(copy);
+ * // Prints: <Buffer 01 02 03 04 05>
+ * ```
+ * @since v0.9.2
+ */
+ toJSON(): {
+ type: 'Buffer';
+ data: number[];
+ };
+ /**
+ * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('414243', 'hex');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.equals(buf2));
+ * // Prints: true
+ * console.log(buf1.equals(buf3));
+ * // Prints: false
+ * ```
+ * @since v0.11.13
+ * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ */
+ equals(otherBuffer: Uint8Array): boolean;
+ /**
+ * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+ * Comparison is based on the actual sequence of bytes in each `Buffer`.
+ *
+ * * `0` is returned if `target` is the same as `buf`
+ * * `1` is returned if `target` should come _before_`buf` when sorted.
+ * * `-1` is returned if `target` should come _after_`buf` when sorted.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('BCD');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.compare(buf1));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2));
+ * // Prints: -1
+ * console.log(buf1.compare(buf3));
+ * // Prints: -1
+ * console.log(buf2.compare(buf1));
+ * // Prints: 1
+ * console.log(buf2.compare(buf3));
+ * // Prints: 1
+ * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+ * // Prints: [ <Buffer 41 42 43>, <Buffer 41 42 43 44>, <Buffer 42 43 44> ]
+ * // (This result is equal to: [buf1, buf3, buf2].)
+ * ```
+ *
+ * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
+ *
+ * console.log(buf1.compare(buf2, 5, 9, 0, 4));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2, 0, 6, 4));
+ * // Prints: -1
+ * console.log(buf1.compare(buf2, 5, 6, 5));
+ * // Prints: 1
+ * ```
+ *
+ * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
+ * @since v0.11.13
+ * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ * @param [targetStart=0] The offset within `target` at which to begin comparison.
+ * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
+ * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
+ */
+ compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
+ /**
+ * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
+ *
+ * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
+ * for all TypedArrays, including Node.js `Buffer`s, although it takes
+ * different function arguments.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create two `Buffer` instances.
+ * const buf1 = Buffer.allocUnsafe(26);
+ * const buf2 = Buffer.allocUnsafe(26).fill('!');
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
+ * buf1.copy(buf2, 8, 16, 20);
+ * // This is equivalent to:
+ * // buf2.set(buf1.subarray(16, 20), 8);
+ *
+ * console.log(buf2.toString('ascii', 0, 25));
+ * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
+ * ```
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a `Buffer` and copy data from one region to an overlapping region
+ * // within the same `Buffer`.
+ *
+ * const buf = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf[i] = i + 97;
+ * }
+ *
+ * buf.copy(buf, 0, 4, 10);
+ *
+ * console.log(buf.toString());
+ * // Prints: efghijghijklmnopqrstuvwxyz
+ * ```
+ * @since v0.1.90
+ * @param target A `Buffer` or {@link Uint8Array} to copy into.
+ * @param [targetStart=0] The offset within `target` at which to begin writing.
+ * @param [sourceStart=0] The offset within `buf` from which to begin copying.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
+ * @return The number of bytes copied.
+ */
+ copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * This method is not compatible with the `Uint8Array.prototype.slice()`,
+ * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * const copiedBuf = Uint8Array.prototype.slice.call(buf);
+ * copiedBuf[0]++;
+ * console.log(copiedBuf.toString());
+ * // Prints: cuffer
+ *
+ * console.log(buf.toString());
+ * // Prints: buffer
+ *
+ * // With buf.slice(), the original buffer is modified.
+ * const notReallyCopiedBuf = buf.slice();
+ * notReallyCopiedBuf[0]++;
+ * console.log(notReallyCopiedBuf.toString());
+ * // Prints: cuffer
+ * console.log(buf.toString());
+ * // Also prints: cuffer (!)
+ * ```
+ * @since v0.3.0
+ * @deprecated Use `subarray` instead.
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ slice(start?: number, end?: number): Buffer;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * Specifying `end` greater than `buf.length` will return the same result as
+ * that of `end` equal to `buf.length`.
+ *
+ * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
+ *
+ * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
+ * // from the original `Buffer`.
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * const buf2 = buf1.subarray(0, 3);
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: abc
+ *
+ * buf1[0] = 33;
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: !bc
+ * ```
+ *
+ * Specifying negative indexes causes the slice to be generated relative to the
+ * end of `buf` rather than the beginning.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * console.log(buf.subarray(-6, -1).toString());
+ * // Prints: buffe
+ * // (Equivalent to buf.subarray(0, 5).)
+ *
+ * console.log(buf.subarray(-6, -2).toString());
+ * // Prints: buff
+ * // (Equivalent to buf.subarray(0, 4).)
+ *
+ * console.log(buf.subarray(-5, -2).toString());
+ * // Prints: uff
+ * // (Equivalent to buf.subarray(1, 4).)
+ * ```
+ * @since v3.0.0
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ subarray(start?: number, end?: number): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64BE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64LE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * This function is also available under the `writeBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ca fa fe ca ce fa de>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64BE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de fa ce ca fe fa ca de>
+ * ```
+ *
+ * This function is also available under the `writeBigUint64LE` alias.
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64LE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than a signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
+ * signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64BE(0));
+ * // Prints: 4294967295n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64BE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64BE(offset?: number): bigint;
+ /**
+ * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64LE(0));
+ * // Prints: 18446744069414584320n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64LE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64LE(offset?: number): bigint;
+ /**
+ * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64BE(offset?: number): bigint;
+ /**
+ * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64LE(offset?: number): bigint;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntLE(0, 6).toString(16));
+ * // Prints: ab9078563412
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntLE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readUIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntBE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintBE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntLE(0, 6).toString(16));
+ * // Prints: -546f87a9cbee
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * console.log(buf.readIntBE(1, 0).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntBE(offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
+ *
+ * This function is also available under the `readUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, -2]);
+ *
+ * console.log(buf.readUInt8(0));
+ * // Prints: 1
+ * console.log(buf.readUInt8(1));
+ * // Prints: 254
+ * console.log(buf.readUInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readUInt8(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ readUint8(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16LE(0).toString(16));
+ * // Prints: 3412
+ * console.log(buf.readUInt16LE(1).toString(16));
+ * // Prints: 5634
+ * console.log(buf.readUInt16LE(2).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16BE(0).toString(16));
+ * // Prints: 1234
+ * console.log(buf.readUInt16BE(1).toString(16));
+ * // Prints: 3456
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16BE(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32LE(0).toString(16));
+ * // Prints: 78563412
+ * console.log(buf.readUInt32LE(1).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32BE(0).toString(16));
+ * // Prints: 12345678
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32BE(offset?: number): number;
+ /**
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([-1, 5]);
+ *
+ * console.log(buf.readInt8(0));
+ * // Prints: -1
+ * console.log(buf.readInt8(1));
+ * // Prints: 5
+ * console.log(buf.readInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readInt8(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16LE(0));
+ * // Prints: 1280
+ * console.log(buf.readInt16LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16BE(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32LE(0));
+ * // Prints: 83886080
+ * console.log(buf.readInt32LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32BE(offset?: number): number;
+ /**
+ * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatLE(0));
+ * // Prints: 1.539989614439558e-36
+ * console.log(buf.readFloatLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatLE(offset?: number): number;
+ /**
+ * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatBE(0));
+ * // Prints: 2.387939260590663e-38
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatBE(offset?: number): number;
+ /**
+ * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleLE(0));
+ * // Prints: 5.447603722011605e-270
+ * console.log(buf.readDoubleLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleLE(offset?: number): number;
+ /**
+ * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleBE(0));
+ * // Prints: 8.20788039913184e-304
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleBE(offset?: number): number;
+ reverse(): this;
+ /**
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap16();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 02 01 04 03 06 05 08 07>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap16();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ *
+ * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
+ * between UTF-16 little-endian and UTF-16 big-endian:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
+ * buf.swap16(); // Convert to big-endian UTF-16 text.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap16(): Buffer;
+ /**
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap32();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 04 03 02 01 08 07 06 05>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap32();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap32(): Buffer;
+ /**
+ * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
+ * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap64();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap64();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v6.3.0
+ * @return A reference to `buf`.
+ */
+ swap64(): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a
+ * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
+ * other than an unsigned 8-bit integer.
+ *
+ * This function is also available under the `writeUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt8(0x3, 0);
+ * buf.writeUInt8(0x4, 1);
+ * buf.writeUInt8(0x23, 2);
+ * buf.writeUInt8(0x42, 3);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 03 04 23 42>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt8(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16LE(0xdead, 0);
+ * buf.writeUInt16LE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ad de ef be>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16BE(0xdead, 0);
+ * buf.writeUInt16BE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ad be ef>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32LE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ce fa ed fe>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32BE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer fe ed fa ce>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
+ * signed 8-bit integer. Behavior is undefined when `value` is anything other than
+ * a signed 8-bit integer.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt8(2, 0);
+ * buf.writeInt8(-2, 1);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 02 fe>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16LE(0x0304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 04 03>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16BE(0x0102, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32LE(0x05060708, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32BE(0x01020304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatLE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer bb fe 4a 4f>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatBE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 4f 4a fe bb>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatBE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleLE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 77 be 9f 1a 2f dd 5e 40>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleBE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 40 5e dd 2f 1a 9f be 77>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleBE(value: number, offset?: number): number;
+ /**
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+ * the entire `buf` will be filled:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Fill a `Buffer` with the ASCII character 'h'.
+ *
+ * const b = Buffer.allocUnsafe(50).fill('h');
+ *
+ * console.log(b.toString());
+ * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+ * ```
+ *
+ * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+ * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+ * filled with `value &#x26; 255`.
+ *
+ * If the final write of a `fill()` operation falls on a multi-byte character,
+ * then only the bytes of that character that fit into `buf` are written:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
+ *
+ * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
+ * // Prints: <Buffer c8 a2 c8 a2 c8>
+ * ```
+ *
+ * If `value` contains invalid characters, it is truncated; if no valid
+ * fill data remains, an exception is thrown:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(5);
+ *
+ * console.log(buf.fill('a'));
+ * // Prints: <Buffer 61 61 61 61 61>
+ * console.log(buf.fill('aazz', 'hex'));
+ * // Prints: <Buffer aa aa aa aa aa>
+ * console.log(buf.fill('zz', 'hex'));
+ * // Throws an exception.
+ * ```
+ * @since v0.5.0
+ * @param value The value with which to fill `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
+ * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
+ * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
+ * @return A reference to `buf`.
+ */
+ fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+ /**
+ * If `value` is:
+ *
+ * * a string, `value` is interpreted according to the character encoding in`encoding`.
+ * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
+ * To compare a partial `Buffer`, use `buf.subarray`.
+ * * a number, `value` will be interpreted as an unsigned 8-bit integer
+ * value between `0` and `255`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.indexOf('this'));
+ * // Prints: 0
+ * console.log(buf.indexOf('is'));
+ * // Prints: 2
+ * console.log(buf.indexOf(Buffer.from('a buffer')));
+ * // Prints: 8
+ * console.log(buf.indexOf(97));
+ * // Prints: 8 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.indexOf(Buffer.from('a buffer example')));
+ * // Prints: -1
+ * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: 8
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
+ * // Prints: 4
+ * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
+ * // Prints: 6
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. If the result
+ * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
+ * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.indexOf(99.9));
+ * console.log(b.indexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN or 0.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.indexOf('b', undefined));
+ * console.log(b.indexOf('b', {}));
+ * console.log(b.indexOf('b', null));
+ * console.log(b.indexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
+ * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
+ * @since v1.5.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
+ * rather than the first occurrence.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this buffer is a buffer');
+ *
+ * console.log(buf.lastIndexOf('this'));
+ * // Prints: 0
+ * console.log(buf.lastIndexOf('buffer'));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(Buffer.from('buffer')));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(97));
+ * // Prints: 15 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.lastIndexOf(Buffer.from('yolo')));
+ * // Prints: -1
+ * console.log(buf.lastIndexOf('buffer', 5));
+ * // Prints: 5
+ * console.log(buf.lastIndexOf('buffer', 4));
+ * // Prints: -1
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
+ * // Prints: 6
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
+ * // Prints: 4
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
+ * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
+ * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.lastIndexOf(99.9));
+ * console.log(b.lastIndexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.lastIndexOf('b', undefined));
+ * console.log(b.lastIndexOf('b', {}));
+ *
+ * // Passing a byteOffset that coerces to 0.
+ * // Prints: -1, equivalent to passing 0.
+ * console.log(b.lastIndexOf('b', null));
+ * console.log(b.lastIndexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
+ * @since v6.0.0
+ * @param value What to search for.
+ * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
+ * of `buf`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Log the entire contents of a `Buffer`.
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const pair of buf.entries()) {
+ * console.log(pair);
+ * }
+ * // Prints:
+ * // [0, 98]
+ * // [1, 117]
+ * // [2, 102]
+ * // [3, 102]
+ * // [4, 101]
+ * // [5, 114]
+ * ```
+ * @since v1.1.0
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Equivalent to `buf.indexOf() !== -1`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.includes('this'));
+ * // Prints: true
+ * console.log(buf.includes('is'));
+ * // Prints: true
+ * console.log(buf.includes(Buffer.from('a buffer')));
+ * // Prints: true
+ * console.log(buf.includes(97));
+ * // Prints: true (97 is the decimal ASCII value for 'a')
+ * console.log(buf.includes(Buffer.from('a buffer example')));
+ * // Prints: false
+ * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: true
+ * console.log(buf.includes('this', 4));
+ * // Prints: false
+ * ```
+ * @since v5.3.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is its encoding.
+ * @return `true` if `value` was found in `buf`, `false` otherwise.
+ */
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const key of buf.keys()) {
+ * console.log(key);
+ * }
+ * // Prints:
+ * // 0
+ * // 1
+ * // 2
+ * // 3
+ * // 4
+ * // 5
+ * ```
+ * @since v1.1.0
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
+ * called automatically when a `Buffer` is used in a `for..of` statement.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const value of buf.values()) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ *
+ * for (const value of buf) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ * ```
+ * @since v1.1.0
+ */
+ values(): IterableIterator<number>;
+ }
+ var Buffer: BufferConstructor;
+ /**
+ * Decodes a string of Base64-encoded data into bytes, and encodes those bytes
+ * into a string using Latin-1 (ISO-8859-1).
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @deprecated Use `Buffer.from(data, 'base64')` instead.
+ * @param data The Base64-encoded input string.
+ */
+ function atob(data: string): string;
+ /**
+ * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
+ * into a string using Base64.
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @deprecated Use `buf.toString('base64')` instead.
+ * @param data An ASCII (Latin1) string.
+ */
+ function btoa(data: string): string;
+ }
+}
+declare module 'node:buffer' {
+ export * from 'buffer';
+}
diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts
new file mode 100755
index 0000000..79c7290
--- /dev/null
+++ b/node_modules/@types/node/child_process.d.ts
@@ -0,0 +1,1369 @@
+/**
+ * The `child_process` module provides the ability to spawn subprocesses in
+ * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
+ * is primarily provided by the {@link spawn} function:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
+ * the parent Node.js process and the spawned subprocess. These pipes have
+ * limited (and platform-specific) capacity. If the subprocess writes to
+ * stdout in excess of that limit without the output being captured, the
+ * subprocess blocks waiting for the pipe buffer to accept more data. This is
+ * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
+ *
+ * The command lookup is performed using the `options.env.PATH` environment
+ * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
+ * used. If `options.env` is set without `PATH`, lookup on Unix is performed
+ * on a default search path search of `/usr/bin:/bin` (see your operating system's
+ * manual for execvpe/execvp), on Windows the current processes environment
+ * variable `PATH` is used.
+ *
+ * On Windows, environment variables are case-insensitive. Node.js
+ * lexicographically sorts the `env` keys and uses the first one that
+ * case-insensitively matches. Only first (in lexicographic order) entry will be
+ * passed to the subprocess. This might lead to issues on Windows when passing
+ * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`.
+ *
+ * The {@link spawn} method spawns the child process asynchronously,
+ * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
+ * the event loop until the spawned process either exits or is terminated.
+ *
+ * For convenience, the `child_process` module provides a handful of synchronous
+ * and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
+ * top of {@link spawn} or {@link spawnSync}.
+ *
+ * * {@link exec}: spawns a shell and runs a command within that
+ * shell, passing the `stdout` and `stderr` to a callback function when
+ * complete.
+ * * {@link execFile}: similar to {@link exec} except
+ * that it spawns the command directly without first spawning a shell by
+ * default.
+ * * {@link fork}: spawns a new Node.js process and invokes a
+ * specified module with an IPC communication channel established that allows
+ * sending messages between parent and child.
+ * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
+ * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
+ *
+ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
+ * the synchronous methods can have significant impact on performance due to
+ * stalling the event loop while spawned processes complete.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/child_process.js)
+ */
+declare module 'child_process' {
+ import { ObjectEncodingOptions } from 'node:fs';
+ import { EventEmitter, Abortable } from 'node:events';
+ import * as net from 'node:net';
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
+ import { URL } from 'node:url';
+ type Serializable = string | object | number | boolean | bigint;
+ type SendHandle = net.Socket | net.Server;
+ /**
+ * Instances of the `ChildProcess` represent spawned child processes.
+ *
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
+ * instances of `ChildProcess`.
+ * @since v2.2.0
+ */
+ class ChildProcess extends EventEmitter {
+ /**
+ * A `Writable Stream` that represents the child process's `stdin`.
+ *
+ * If a child process waits to read all of its input, the child will not continue
+ * until this stream has been closed via `end()`.
+ *
+ * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stdin` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdin: Writable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stdout`.
+ *
+ * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
+ * refer to the same value.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn('ls');
+ *
+ * subprocess.stdout.on('data', (data) => {
+ * console.log(`Received chunk ${data}`);
+ * });
+ * ```
+ *
+ * The `subprocess.stdout` property can be `null` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdout: Readable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stderr`.
+ *
+ * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stderr` property can be `null` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stderr: Readable | null;
+ /**
+ * The `subprocess.channel` property is a reference to the child's IPC channel. If
+ * no IPC channel currently exists, this property is `undefined`.
+ * @since v7.1.0
+ */
+ readonly channel?: Pipe | null | undefined;
+ /**
+ * A sparse array of pipes to the child process, corresponding with positions in
+ * the `stdio` option passed to {@link spawn} that have been set
+ * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`,
+ * respectively.
+ *
+ * In the following example, only the child's fd `1` (stdout) is configured as a
+ * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
+ * in the array are `null`.
+ *
+ * ```js
+ * const assert = require('assert');
+ * const fs = require('fs');
+ * const child_process = require('child_process');
+ *
+ * const subprocess = child_process.spawn('ls', {
+ * stdio: [
+ * 0, // Use parent's stdin for child.
+ * 'pipe', // Pipe child's stdout to parent.
+ * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
+ * ]
+ * });
+ *
+ * assert.strictEqual(subprocess.stdio[0], null);
+ * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
+ *
+ * assert(subprocess.stdout);
+ * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
+ *
+ * assert.strictEqual(subprocess.stdio[2], null);
+ * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
+ * ```
+ *
+ * The `subprocess.stdio` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.7.10
+ */
+ readonly stdio: [
+ Writable | null,
+ // stdin
+ Readable | null,
+ // stdout
+ Readable | null,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra
+ Readable | Writable | null | undefined // extra
+ ];
+ /**
+ * The `subprocess.killed` property indicates whether the child process
+ * successfully received a signal from `subprocess.kill()`. The `killed` property
+ * does not indicate that the child process has been terminated.
+ * @since v0.5.10
+ */
+ readonly killed: boolean;
+ /**
+ * Returns the process identifier (PID) of the child process. If the child process
+ * fails to spawn due to errors, then the value is `undefined` and `error` is
+ * emitted.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * console.log(`Spawned child pid: ${grep.pid}`);
+ * grep.stdin.end();
+ * ```
+ * @since v0.1.90
+ */
+ readonly pid?: number | undefined;
+ /**
+ * The `subprocess.connected` property indicates whether it is still possible to
+ * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages.
+ * @since v0.7.2
+ */
+ readonly connected: boolean;
+ /**
+ * The `subprocess.exitCode` property indicates the exit code of the child process.
+ * If the child process is still running, the field will be `null`.
+ */
+ readonly exitCode: number | null;
+ /**
+ * The `subprocess.signalCode` property indicates the signal received by
+ * the child process if any, else `null`.
+ */
+ readonly signalCode: NodeJS.Signals | null;
+ /**
+ * The `subprocess.spawnargs` property represents the full list of command-line
+ * arguments the child process was launched with.
+ */
+ readonly spawnargs: string[];
+ /**
+ * The `subprocess.spawnfile` property indicates the executable file name of
+ * the child process that is launched.
+ *
+ * For {@link fork}, its value will be equal to `process.execPath`.
+ * For {@link spawn}, its value will be the name of
+ * the executable file.
+ * For {@link exec}, its value will be the name of the shell
+ * in which the child process is launched.
+ */
+ readonly spawnfile: string;
+ /**
+ * The `subprocess.kill()` method sends a signal to the child process. If no
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * grep.on('close', (code, signal) => {
+ * console.log(
+ * `child process terminated due to receipt of signal ${signal}`);
+ * });
+ *
+ * // Send SIGHUP to process.
+ * grep.kill('SIGHUP');
+ * ```
+ *
+ * The `ChildProcess` object may emit an `'error'` event if the signal
+ * cannot be delivered. Sending a signal to a child process that has already exited
+ * is not an error but may have unforeseen consequences. Specifically, if the
+ * process identifier (PID) has been reassigned to another process, the signal will
+ * be delivered to that process instead which can have unexpected results.
+ *
+ * While the function is called `kill`, the signal delivered to the child process
+ * may not actually terminate the process.
+ *
+ * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
+ *
+ * On Windows, where POSIX signals do not exist, the `signal` argument will be
+ * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`).
+ * See `Signal Events` for more details.
+ *
+ * On Linux, child processes of child processes will not be terminated
+ * when attempting to kill their parent. This is likely to happen when running a
+ * new process in a shell or with the use of the `shell` option of `ChildProcess`:
+ *
+ * ```js
+ * 'use strict';
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(
+ * 'sh',
+ * [
+ * '-c',
+ * `node -e "setInterval(() => {
+ * console.log(process.pid, 'is alive')
+ * }, 500);"`,
+ * ], {
+ * stdio: ['inherit', 'inherit', 'inherit']
+ * }
+ * );
+ *
+ * setTimeout(() => {
+ * subprocess.kill(); // Does not terminate the Node.js process in the shell.
+ * }, 2000);
+ * ```
+ * @since v0.1.90
+ */
+ kill(signal?: NodeJS.Signals | number): boolean;
+ /**
+ * When an IPC channel has been established between the parent and child (
+ * i.e. when using {@link fork}), the `subprocess.send()` method can
+ * be used to send messages to the child process. When the child process is a
+ * Node.js instance, these messages can be received via the `'message'` event.
+ *
+ * The message goes through serialization and parsing. The resulting
+ * message might not be the same as what is originally sent.
+ *
+ * For example, in the parent script:
+ *
+ * ```js
+ * const cp = require('child_process');
+ * const n = cp.fork(`${__dirname}/sub.js`);
+ *
+ * n.on('message', (m) => {
+ * console.log('PARENT got message:', m);
+ * });
+ *
+ * // Causes the child to print: CHILD got message: { hello: 'world' }
+ * n.send({ hello: 'world' });
+ * ```
+ *
+ * And then the child script, `'sub.js'` might look like this:
+ *
+ * ```js
+ * process.on('message', (m) => {
+ * console.log('CHILD got message:', m);
+ * });
+ *
+ * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
+ * process.send({ foo: 'bar', baz: NaN });
+ * ```
+ *
+ * Child Node.js processes will have a `process.send()` method of their own
+ * that allows the child to send messages back to the parent.
+ *
+ * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
+ * containing a `NODE_` prefix in the `cmd` property are reserved for use within
+ * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js.
+ * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice.
+ *
+ * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
+ * for passing a TCP server or socket object to the child process. The child will
+ * receive the object as the second argument passed to the callback function
+ * registered on the `'message'` event. Any data that is received
+ * and buffered in the socket will not be sent to the child.
+ *
+ * The optional `callback` is a function that is invoked after the message is
+ * sent but before the child may have received it. The function is called with a
+ * single argument: `null` on success, or an `Error` object on failure.
+ *
+ * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can
+ * happen, for instance, when the child process has already exited.
+ *
+ * `subprocess.send()` will return `false` if the channel has closed or when the
+ * backlog of unsent messages exceeds a threshold that makes it unwise to send
+ * more. Otherwise, the method returns `true`. The `callback` function can be
+ * used to implement flow control.
+ *
+ * #### Example: sending a server object
+ *
+ * The `sendHandle` argument can be used, for instance, to pass the handle of
+ * a TCP server object to the child process as illustrated in the example below:
+ *
+ * ```js
+ * const subprocess = require('child_process').fork('subprocess.js');
+ *
+ * // Open up the server object and send the handle.
+ * const server = require('net').createServer();
+ * server.on('connection', (socket) => {
+ * socket.end('handled by parent');
+ * });
+ * server.listen(1337, () => {
+ * subprocess.send('server', server);
+ * });
+ * ```
+ *
+ * The child would then receive the server object as:
+ *
+ * ```js
+ * process.on('message', (m, server) => {
+ * if (m === 'server') {
+ * server.on('connection', (socket) => {
+ * socket.end('handled by child');
+ * });
+ * }
+ * });
+ * ```
+ *
+ * Once the server is now shared between the parent and child, some connections
+ * can be handled by the parent and some by the child.
+ *
+ * While the example above uses a server created using the `net` module, `dgram`module servers use exactly the same workflow with the exceptions of listening on
+ * a `'message'` event instead of `'connection'` and using `server.bind()` instead
+ * of `server.listen()`. This is, however, currently only supported on Unix
+ * platforms.
+ *
+ * #### Example: sending a socket object
+ *
+ * Similarly, the `sendHandler` argument can be used to pass the handle of a
+ * socket to the child process. The example below spawns two children that each
+ * handle connections with "normal" or "special" priority:
+ *
+ * ```js
+ * const { fork } = require('child_process');
+ * const normal = fork('subprocess.js', ['normal']);
+ * const special = fork('subprocess.js', ['special']);
+ *
+ * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
+ * // the sockets from being read before they are sent to the child process.
+ * const server = require('net').createServer({ pauseOnConnect: true });
+ * server.on('connection', (socket) => {
+ *
+ * // If this is special priority...
+ * if (socket.remoteAddress === '74.125.127.100') {
+ * special.send('socket', socket);
+ * return;
+ * }
+ * // This is normal priority.
+ * normal.send('socket', socket);
+ * });
+ * server.listen(1337);
+ * ```
+ *
+ * The `subprocess.js` would receive the socket handle as the second argument
+ * passed to the event callback function:
+ *
+ * ```js
+ * process.on('message', (m, socket) => {
+ * if (m === 'socket') {
+ * if (socket) {
+ * // Check that the client socket exists.
+ * // It is possible for the socket to be closed between the time it is
+ * // sent and the time it is received in the child process.
+ * socket.end(`Request handled with ${process.argv[2]} priority`);
+ * }
+ * }
+ * });
+ * ```
+ *
+ * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
+ * The parent cannot track when the socket is destroyed.
+ *
+ * Any `'message'` handlers in the subprocess should verify that `socket` exists,
+ * as the connection may have been closed during the time it takes to send the
+ * connection to the child.
+ * @since v0.5.9
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * Closes the IPC channel between parent and child, allowing the child to exit
+ * gracefully once there are no other connections keeping it alive. After calling
+ * this method the `subprocess.connected` and `process.connected` properties in
+ * both the parent and child (respectively) will be set to `false`, and it will be
+ * no longer possible to pass messages between the processes.
+ *
+ * The `'disconnect'` event will be emitted when there are no messages in the
+ * process of being received. This will most often be triggered immediately after
+ * calling `subprocess.disconnect()`.
+ *
+ * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
+ * within the child process to close the IPC channel as well.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * By default, the parent will wait for the detached child to exit. To prevent the
+ * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not
+ * include the child in its reference count, allowing the parent to exit
+ * independently of the child, unless there is an established IPC channel between
+ * the child and the parent.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore'
+ * });
+ *
+ * subprocess.unref();
+ * ```
+ * @since v0.7.10
+ */
+ unref(): void;
+ /**
+ * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
+ * restore the removed reference count for the child process, forcing the parent
+ * to wait for the child to exit before exiting itself.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore'
+ * });
+ *
+ * subprocess.unref();
+ * subprocess.ref();
+ * ```
+ * @since v0.7.10
+ */
+ ref(): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. disconnect
+ * 3. error
+ * 4. exit
+ * 5. message
+ * 6. spawn
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ addListener(event: 'spawn', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean;
+ emit(event: 'spawn', listener: () => void): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ on(event: 'spawn', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ once(event: 'spawn', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependListener(event: 'spawn', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependOnceListener(event: 'spawn', listener: () => void): this;
+ }
+ // return this object when stdio option is undefined or not specified
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
+ stdin: Writable;
+ stdout: Readable;
+ stderr: Readable;
+ readonly stdio: [
+ Writable,
+ Readable,
+ Readable,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ // return this object when stdio option is a tuple of 3
+ interface ChildProcessByStdio<I extends null | Writable, O extends null | Readable, E extends null | Readable> extends ChildProcess {
+ stdin: I;
+ stdout: O;
+ stderr: E;
+ readonly stdio: [
+ I,
+ O,
+ E,
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ interface MessageOptions {
+ keepOpen?: boolean | undefined;
+ }
+ type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit';
+ type StdioOptions = IOType | Array<IOType | 'ipc' | Stream | number | null | undefined>;
+ type SerializationType = 'json' | 'advanced';
+ interface MessagingOptions extends Abortable {
+ /**
+ * Specify the kind of serialization used for sending messages between processes.
+ * @default 'json'
+ */
+ serialization?: SerializationType | undefined;
+ /**
+ * The signal value to be used when the spawned process will be killed by the abort signal.
+ * @default 'SIGTERM'
+ */
+ killSignal?: NodeJS.Signals | number | undefined;
+ /**
+ * In milliseconds the maximum amount of time the process is allowed to run.
+ */
+ timeout?: number | undefined;
+ }
+ interface ProcessEnvOptions {
+ uid?: number | undefined;
+ gid?: number | undefined;
+ cwd?: string | URL | undefined;
+ env?: NodeJS.ProcessEnv | undefined;
+ }
+ interface CommonOptions extends ProcessEnvOptions {
+ /**
+ * @default true
+ */
+ windowsHide?: boolean | undefined;
+ /**
+ * @default 0
+ */
+ timeout?: number | undefined;
+ }
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
+ argv0?: string | undefined;
+ stdio?: StdioOptions | undefined;
+ shell?: boolean | string | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ interface SpawnOptions extends CommonSpawnOptions {
+ detached?: boolean | undefined;
+ }
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
+ }
+ type StdioNull = 'inherit' | 'ignore' | Stream;
+ type StdioPipeNamed = 'pipe' | 'overlapped';
+ type StdioPipe = undefined | null | StdioPipeNamed;
+ interface SpawnOptionsWithStdioTuple<Stdin extends StdioNull | StdioPipe, Stdout extends StdioNull | StdioPipe, Stderr extends StdioNull | StdioPipe> extends SpawnOptions {
+ stdio: [Stdin, Stdout, Stderr];
+ }
+ /**
+ * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults
+ * to an empty array.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * A third argument may be used to specify additional options, with these defaults:
+ *
+ * ```js
+ * const defaults = {
+ * cwd: undefined,
+ * env: process.env
+ * };
+ * ```
+ *
+ * Use `cwd` to specify the working directory from which the process is spawned.
+ * If not given, the default is to inherit the current working directory. If given,
+ * but the path does not exist, the child process emits an `ENOENT` error
+ * and exits immediately. `ENOENT` is also emitted when the command
+ * does not exist.
+ *
+ * Use `env` to specify environment variables that will be visible to the new
+ * process, the default is `process.env`.
+ *
+ * `undefined` values in `env` will be ignored.
+ *
+ * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
+ * exit code:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * Example: A very elaborate way to run `ps ax | grep ssh`
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ps = spawn('ps', ['ax']);
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * ps.stdout.on('data', (data) => {
+ * grep.stdin.write(data);
+ * });
+ *
+ * ps.stderr.on('data', (data) => {
+ * console.error(`ps stderr: ${data}`);
+ * });
+ *
+ * ps.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`ps process exited with code ${code}`);
+ * }
+ * grep.stdin.end();
+ * });
+ *
+ * grep.stdout.on('data', (data) => {
+ * console.log(data.toString());
+ * });
+ *
+ * grep.stderr.on('data', (data) => {
+ * console.error(`grep stderr: ${data}`);
+ * });
+ *
+ * grep.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`grep process exited with code ${code}`);
+ * }
+ * });
+ * ```
+ *
+ * Example of checking for failed `spawn`:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const subprocess = spawn('bad_command');
+ *
+ * subprocess.on('error', (err) => {
+ * console.error('Failed to start subprocess.');
+ * });
+ * ```
+ *
+ * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+ * title while others (Windows, SunOS) will use `command`.
+ *
+ * Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent,
+ * retrieve it with the`process.argv0` property instead.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const grep = spawn('grep', ['ssh'], { signal });
+ * grep.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * ```
+ * @since v0.1.90
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
+ // overloads of spawn with 'args'
+ function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
+ interface ExecOptions extends CommonOptions {
+ shell?: string | undefined;
+ signal?: AbortSignal | undefined;
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ }
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: BufferEncoding | null; // specify `null`.
+ }
+ interface ExecException extends Error {
+ cmd?: string | undefined;
+ killed?: boolean | undefined;
+ code?: number | undefined;
+ signal?: NodeJS.Signals | undefined;
+ }
+ /**
+ * Spawns a shell then executes the `command` within that shell, buffering any
+ * generated output. The `command` string passed to the exec function is processed
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
+ * need to be dealt with accordingly:
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ *
+ * exec('"/path/to/test file/test.sh" arg1 arg2');
+ * // Double quotes are used so that the space in the path is not interpreted as
+ * // a delimiter of multiple arguments.
+ *
+ * exec('echo "The \\$HOME variable is $HOME"');
+ * // The $HOME variable is escaped in the first instance, but not in the second.
+ * ```
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ *
+ * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The
+ * `error.code` property will be
+ * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the
+ * process.
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
+ * if (error) {
+ * console.error(`exec error: ${error}`);
+ * return;
+ * }
+ * console.log(`stdout: ${stdout}`);
+ * console.error(`stderr: ${stderr}`);
+ * });
+ * ```
+ *
+ * If `timeout` is greater than `0`, the parent will send the signal
+ * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
+ * child runs longer than `timeout` milliseconds.
+ *
+ * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
+ * the existing process and uses a shell to execute the command.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('util');
+ * const exec = util.promisify(require('child_process').exec);
+ *
+ * async function lsExample() {
+ * const { stdout, stderr } = await exec('ls');
+ * console.log('stdout:', stdout);
+ * console.error('stderr:', stderr);
+ * }
+ * lsExample();
+ * ```
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = exec('grep ssh', { signal }, (error) => {
+ * console.log(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.90
+ * @param command The command to run, with space-separated arguments.
+ * @param callback called with the output when process terminates.
+ */
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ interface PromiseWithChild<T> extends Promise<T> {
+ child: ChildProcess;
+ }
+ namespace exec {
+ function __promisify__(command: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options?: (ObjectEncodingOptions & ExecOptions) | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ExecFileOptions extends CommonOptions, Abortable {
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ shell?: boolean | string | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: 'buffer' | null;
+ }
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ type ExecFileException = ExecException & NodeJS.ErrnoException;
+ /**
+ * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
+ * executable `file` is spawned directly as a new process making it slightly more
+ * efficient than {@link exec}.
+ *
+ * The same options as {@link exec} are supported. Since a shell is
+ * not spawned, behaviors such as I/O redirection and file globbing are not
+ * supported.
+ *
+ * ```js
+ * const { execFile } = require('child_process');
+ * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
+ * if (error) {
+ * throw error;
+ * }
+ * console.log(stdout);
+ * });
+ * ```
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('util');
+ * const execFile = util.promisify(require('child_process').execFile);
+ * async function getVersion() {
+ * const { stdout } = await execFile('node', ['--version']);
+ * console.log(stdout);
+ * }
+ * getVersion();
+ * ```
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { execFile } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = execFile('node', ['--version'], { signal }, (error) => {
+ * console.log(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.91
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @param callback Called with the output when process terminates.
+ */
+ function execFile(file: string): ChildProcess;
+ function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ namespace execFile {
+ function __promisify__(file: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
+ execPath?: string | undefined;
+ execArgv?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: StdioOptions | undefined;
+ detached?: boolean | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ /**
+ * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
+ * Like {@link spawn}, a `ChildProcess` object is returned. The
+ * returned `ChildProcess` will have an additional communication channel
+ * built-in that allows messages to be passed back and forth between the parent and
+ * child. See `subprocess.send()` for details.
+ *
+ * Keep in mind that spawned Node.js child processes are
+ * independent of the parent with exception of the IPC communication channel
+ * that is established between the two. Each process has its own memory, with
+ * their own V8 instances. Because of the additional resource allocations
+ * required, spawning a large number of child Node.js processes is not
+ * recommended.
+ *
+ * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative
+ * execution path to be used.
+ *
+ * Node.js processes launched with a custom `execPath` will communicate with the
+ * parent process using the file descriptor (fd) identified using the
+ * environment variable `NODE_CHANNEL_FD` on the child process.
+ *
+ * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
+ * current process.
+ *
+ * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * if (process.argv[2] === 'child') {
+ * setTimeout(() => {
+ * console.log(`Hello from ${process.argv[2]}!`);
+ * }, 1_000);
+ * } else {
+ * const { fork } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = fork(__filename, ['child'], { signal });
+ * child.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * }
+ * ```
+ * @since v0.5.0
+ * @param modulePath The module to run in the child.
+ * @param args List of string arguments.
+ */
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
+ interface SpawnSyncOptions extends CommonSpawnOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ interface SpawnSyncReturns<T> {
+ pid: number;
+ output: Array<T | null>;
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: NodeJS.Signals | null;
+ error?: Error | undefined;
+ }
+ /**
+ * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the process intercepts and handles the `SIGTERM` signal
+ * and doesn't exit, the parent process will wait until the child process has
+ * exited.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawnSync(command: string): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ interface CommonExecOptions extends CommonOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ stdio?: StdioOptions | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface ExecSyncOptions extends CommonExecOptions {
+ shell?: string | undefined;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ /**
+ * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process
+ * has exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw.
+ * The `Error` object will contain the entire result from {@link spawnSync}.
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @return The stdout from the command.
+ */
+ function execSync(command: string): Buffer;
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
+ interface ExecFileSyncOptions extends CommonExecOptions {
+ shell?: boolean | string | undefined;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding?: 'buffer' | null; // specify `null`.
+ }
+ /**
+ * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
+ * return until the child process has fully closed. When a timeout has been
+ * encountered and `killSignal` is sent, the method won't return until the process
+ * has completely exited.
+ *
+ * If the child process intercepts and handles the `SIGTERM` signal and
+ * does not exit, the parent process will still wait until the child process has
+ * exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @return The stdout from the command.
+ */
+ function execFileSync(file: string): Buffer;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>): Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
+}
+declare module 'node:child_process' {
+ export * from 'child_process';
+}
diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts
new file mode 100755
index 0000000..37dbc57
--- /dev/null
+++ b/node_modules/@types/node/cluster.d.ts
@@ -0,0 +1,410 @@
+/**
+ * Clusters of Node.js processes can be used to run multiple instances of Node.js
+ * that can distribute workloads among their application threads. When process
+ * isolation is not needed, use the `worker_threads` module instead, which
+ * allows running multiple application threads within a single Node.js instance.
+ *
+ * The cluster module allows easy creation of child processes that all share
+ * server ports.
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import http from 'http';
+ * import { cpus } from 'os';
+ * import process from 'process';
+ *
+ * const numCPUs = cpus().length;
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log(`worker ${worker.process.pid} died`);
+ * });
+ * } else {
+ * // Workers can share any TCP connection
+ * // In this case it is an HTTP server
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ *
+ * console.log(`Worker ${process.pid} started`);
+ * }
+ * ```
+ *
+ * Running Node.js will now share port 8000 between the workers:
+ *
+ * ```console
+ * $ node server.js
+ * Primary 3596 is running
+ * Worker 4324 started
+ * Worker 4520 started
+ * Worker 6056 started
+ * Worker 5644 started
+ * ```
+ *
+ * On Windows, it is not yet possible to set up a named pipe server in a worker.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/cluster.js)
+ */
+declare module 'cluster' {
+ import * as child from 'node:child_process';
+ import EventEmitter = require('node:events');
+ import * as net from 'node:net';
+ export interface ClusterSettings {
+ execArgv?: string[] | undefined; // default: process.execArgv
+ exec?: string | undefined;
+ args?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: any[] | undefined;
+ uid?: number | undefined;
+ gid?: number | undefined;
+ inspectPort?: number | (() => number) | undefined;
+ }
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6"
+ }
+ /**
+ * A `Worker` object contains all public information and method about a worker.
+ * In the primary it can be obtained using `cluster.workers`. In a worker
+ * it can be obtained using `cluster.worker`.
+ * @since v0.7.0
+ */
+ export class Worker extends EventEmitter {
+ /**
+ * Each new worker is given its own unique id, this id is stored in the`id`.
+ *
+ * While a worker is alive, this is the key that indexes it in`cluster.workers`.
+ * @since v0.8.0
+ */
+ id: number;
+ /**
+ * All workers are created using `child_process.fork()`, the returned object
+ * from this function is stored as `.process`. In a worker, the global `process`is stored.
+ *
+ * See: `Child Process module`.
+ *
+ * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
+ * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
+ * accidental disconnection.
+ * @since v0.7.0
+ */
+ process: child.ChildProcess;
+ /**
+ * Send a message to a worker or primary, optionally with a handle.
+ *
+ * In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
+ *
+ * In a worker, this sends a message to the primary. It is identical to`process.send()`.
+ *
+ * This example will echo back all messages from the primary:
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * worker.send('hi there');
+ *
+ * } else if (cluster.isWorker) {
+ * process.on('message', (msg) => {
+ * process.send(msg);
+ * });
+ * }
+ * ```
+ * @since v0.7.0
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * This function will kill the worker. In the primary worker, it does this by
+ * disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
+ *
+ * The `kill()` function kills the worker process without waiting for a graceful
+ * disconnect, it has the same behavior as `worker.process.kill()`.
+ *
+ * This method is aliased as `worker.destroy()` for backwards compatibility.
+ *
+ * In a worker, `process.kill()` exists, but it is not this function;
+ * it is `kill()`.
+ * @since v0.9.12
+ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
+ */
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ /**
+ * In a worker, this function will close all servers, wait for the `'close'` event
+ * on those servers, and then disconnect the IPC channel.
+ *
+ * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
+ *
+ * Causes `.exitedAfterDisconnect` to be set.
+ *
+ * After a server is closed, it will no longer accept new connections,
+ * but connections may be accepted by any other listening worker. Existing
+ * connections will be allowed to close as usual. When no more connections exist,
+ * see `server.close()`, the IPC channel to the worker will close allowing it
+ * to die gracefully.
+ *
+ * The above applies _only_ to server connections, client connections are not
+ * automatically closed by workers, and disconnect does not wait for them to close
+ * before exiting.
+ *
+ * In a worker, `process.disconnect` exists, but it is not this function;
+ * it is `disconnect()`.
+ *
+ * Because long living server connections may block workers from disconnecting, it
+ * may be useful to send a message, so application specific actions may be taken to
+ * close them. It also may be useful to implement a timeout, killing a worker if
+ * the `'disconnect'` event has not been emitted after some time.
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * let timeout;
+ *
+ * worker.on('listening', (address) => {
+ * worker.send('shutdown');
+ * worker.disconnect();
+ * timeout = setTimeout(() => {
+ * worker.kill();
+ * }, 2000);
+ * });
+ *
+ * worker.on('disconnect', () => {
+ * clearTimeout(timeout);
+ * });
+ *
+ * } else if (cluster.isWorker) {
+ * const net = require('net');
+ * const server = net.createServer((socket) => {
+ * // Connections never end
+ * });
+ *
+ * server.listen(8000);
+ *
+ * process.on('message', (msg) => {
+ * if (msg === 'shutdown') {
+ * // Initiate graceful close of any connections to server
+ * }
+ * });
+ * }
+ * ```
+ * @since v0.7.7
+ * @return A reference to `worker`.
+ */
+ disconnect(): void;
+ /**
+ * This function returns `true` if the worker is connected to its primary via its
+ * IPC channel, `false` otherwise. A worker is connected to its primary after it
+ * has been created. It is disconnected after the `'disconnect'` event is emitted.
+ * @since v0.11.14
+ */
+ isConnected(): boolean;
+ /**
+ * This function returns `true` if the worker's process has terminated (either
+ * because of exiting or being signaled). Otherwise, it returns `false`.
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import http from 'http';
+ * import { cpus } from 'os';
+ * import process from 'process';
+ *
+ * const numCPUs = cpus().length;
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('fork', (worker) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ * } else {
+ * // Workers can share any TCP connection. In this case, it is an HTTP server.
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end(`Current process\n ${process.pid}`);
+ * process.kill(process.pid);
+ * }).listen(8000);
+ * }
+ * ```
+ * @since v0.11.14
+ */
+ isDead(): boolean;
+ /**
+ * This property is `true` if the worker exited due to `.disconnect()`.
+ * If the worker exited any other way, it is `false`. If the
+ * worker has not exited, it is `undefined`.
+ *
+ * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
+ * voluntary and accidental exit, the primary may choose not to respawn a worker
+ * based on this value.
+ *
+ * ```js
+ * cluster.on('exit', (worker, code, signal) => {
+ * if (worker.exitedAfterDisconnect === true) {
+ * console.log('Oh, it was just voluntary – no need to worry');
+ * }
+ * });
+ *
+ * // kill worker
+ * worker.kill();
+ * ```
+ * @since v6.0.0
+ */
+ exitedAfterDisconnect: boolean;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. error
+ * 3. exit
+ * 4. listening
+ * 5. message
+ * 6. online
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ addListener(event: 'listening', listener: (address: Address) => void): this;
+ addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'exit', code: number, signal: string): boolean;
+ emit(event: 'listening', address: Address): boolean;
+ emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'exit', listener: (code: number, signal: string) => void): this;
+ on(event: 'listening', listener: (address: Address) => void): this;
+ on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'exit', listener: (code: number, signal: string) => void): this;
+ once(event: 'listening', listener: (address: Address) => void): this;
+ once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependListener(event: 'listening', listener: (address: Address) => void): this;
+ prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: 'listening', listener: (address: Address) => void): this;
+ prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'online', listener: () => void): this;
+ }
+ export interface Cluster extends EventEmitter {
+ disconnect(callback?: () => void): void;
+ fork(env?: any): Worker;
+ /** @deprecated since v16.0.0 - use isPrimary. */
+ readonly isMaster: boolean;
+ readonly isPrimary: boolean;
+ readonly isWorker: boolean;
+ schedulingPolicy: number;
+ readonly settings: ClusterSettings;
+ /** @deprecated since v16.0.0 - use setupPrimary. */
+ setupMaster(settings?: ClusterSettings): void;
+ /**
+ * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
+ */
+ setupPrimary(settings?: ClusterSettings): void;
+ readonly worker?: Worker | undefined;
+ readonly workers?: NodeJS.Dict<Worker> | undefined;
+ readonly SCHED_NONE: number;
+ readonly SCHED_RR: number;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ addListener(event: 'fork', listener: (worker: Worker) => void): this;
+ addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: (worker: Worker) => void): this;
+ addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect', worker: Worker): boolean;
+ emit(event: 'exit', worker: Worker, code: number, signal: string): boolean;
+ emit(event: 'fork', worker: Worker): boolean;
+ emit(event: 'listening', worker: Worker, address: Address): boolean;
+ emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online', worker: Worker): boolean;
+ emit(event: 'setup', settings: ClusterSettings): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: (worker: Worker) => void): this;
+ on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ on(event: 'fork', listener: (worker: Worker) => void): this;
+ on(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: (worker: Worker) => void): this;
+ on(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: (worker: Worker) => void): this;
+ once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ once(event: 'fork', listener: (worker: Worker) => void): this;
+ once(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: (worker: Worker) => void): this;
+ once(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this;
+ prependListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
+ prependOnceListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ }
+ const cluster: Cluster;
+ export default cluster;
+}
+declare module 'node:cluster' {
+ export * from 'cluster';
+ export { default as default } from 'cluster';
+}
diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts
new file mode 100755
index 0000000..16c9137
--- /dev/null
+++ b/node_modules/@types/node/console.d.ts
@@ -0,0 +1,412 @@
+/**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
+ */
+declare module 'console' {
+ import console = require('node:console');
+ export = console;
+}
+declare module 'node:console' {
+ import { InspectOptions } from 'node:util';
+ global {
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
+ interface Console {
+ Console: console.ConsoleConstructor;
+ /**
+ * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
+ * writes a message and does not otherwise affect execution. The output always
+ * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
+ *
+ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
+ *
+ * ```js
+ * console.assert(true, 'does nothing');
+ *
+ * console.assert(false, 'Whoops %s work', 'didn\'t');
+ * // Assertion failed: Whoops didn't work
+ *
+ * console.assert();
+ * // Assertion failed
+ * ```
+ * @since v0.1.101
+ * @param value The value tested for being truthy.
+ * @param message All arguments besides `value` are used as error message.
+ */
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ /**
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
+ * TTY. When `stdout` is not a TTY, this method does nothing.
+ *
+ * The specific operation of `console.clear()` can vary across operating systems
+ * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
+ * current terminal viewport for the Node.js
+ * binary.
+ * @since v8.3.0
+ */
+ clear(): void;
+ /**
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the
+ * number of times `console.count()` has been called with the given `label`.
+ *
+ * ```js
+ * > console.count()
+ * default: 1
+ * undefined
+ * > console.count('default')
+ * default: 2
+ * undefined
+ * > console.count('abc')
+ * abc: 1
+ * undefined
+ * > console.count('xyz')
+ * xyz: 1
+ * undefined
+ * > console.count('abc')
+ * abc: 2
+ * undefined
+ * > console.count()
+ * default: 3
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ count(label?: string): void;
+ /**
+ * Resets the internal counter specific to `label`.
+ *
+ * ```js
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * > console.countReset('abc');
+ * undefined
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ countReset(label?: string): void;
+ /**
+ * The `console.debug()` function is an alias for {@link log}.
+ * @since v8.0.0
+ */
+ debug(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
+ * This function bypasses any custom `inspect()` function defined on `obj`.
+ * @since v0.1.101
+ */
+ dir(obj: any, options?: InspectOptions): void;
+ /**
+ * This method calls `console.log()` passing it the arguments received.
+ * This method does not produce any XML formatting.
+ * @since v8.0.0
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * Prints to `stderr` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const code = 5;
+ * console.error('error #%d', code);
+ * // Prints: error #5, to stderr
+ * console.error('error', code);
+ * // Prints: error 5, to stderr
+ * ```
+ *
+ * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
+ * values are concatenated. See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ error(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Increases indentation of subsequent lines by spaces for `groupIndentation`length.
+ *
+ * If one or more `label`s are provided, those are printed first without the
+ * additional indentation.
+ * @since v8.5.0
+ */
+ group(...label: any[]): void;
+ /**
+ * An alias for {@link group}.
+ * @since v8.5.0
+ */
+ groupCollapsed(...label: any[]): void;
+ /**
+ * Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
+ * @since v8.5.0
+ */
+ groupEnd(): void;
+ /**
+ * The `console.info()` function is an alias for {@link log}.
+ * @since v0.1.100
+ */
+ info(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Prints to `stdout` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const count = 5;
+ * console.log('count: %d', count);
+ * // Prints: count: 5, to stdout
+ * console.log('count:', count);
+ * // Prints: count: 5, to stdout
+ * ```
+ *
+ * See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ log(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
+ * logging the argument if it can’t be parsed as tabular.
+ *
+ * ```js
+ * // These can't be parsed as tabular data
+ * console.table(Symbol());
+ * // Symbol()
+ *
+ * console.table(undefined);
+ * // undefined
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
+ * // ┌─────────┬─────┬─────┐
+ * // │ (index) │ a │ b │
+ * // ├─────────┼─────┼─────┤
+ * // │ 0 │ 1 │ 'Y' │
+ * // │ 1 │ 'Z' │ 2 │
+ * // └─────────┴─────┴─────┘
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
+ * // ┌─────────┬─────┐
+ * // │ (index) │ a │
+ * // ├─────────┼─────┤
+ * // │ 0 │ 1 │
+ * // │ 1 │ 'Z' │
+ * // └─────────┴─────┘
+ * ```
+ * @since v10.0.0
+ * @param properties Alternate properties for constructing the table.
+ */
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
+ /**
+ * Starts a timer that can be used to compute the duration of an operation. Timers
+ * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
+ * suitable time units to `stdout`. For example, if the elapsed
+ * time is 3869ms, `console.timeEnd()` displays "3.869s".
+ * @since v0.1.104
+ */
+ time(label?: string): void;
+ /**
+ * Stops a timer that was previously started by calling {@link time} and
+ * prints the result to `stdout`:
+ *
+ * ```js
+ * console.time('100-elements');
+ * for (let i = 0; i < 100; i++) {}
+ * console.timeEnd('100-elements');
+ * // prints 100-elements: 225.438ms
+ * ```
+ * @since v0.1.104
+ */
+ timeEnd(label?: string): void;
+ /**
+ * For a timer that was previously started by calling {@link time}, prints
+ * the elapsed time and other `data` arguments to `stdout`:
+ *
+ * ```js
+ * console.time('process');
+ * const value = expensiveProcess1(); // Returns 42
+ * console.timeLog('process', value);
+ * // Prints "process: 365.227ms 42".
+ * doExpensiveProcess2(value);
+ * console.timeEnd('process');
+ * ```
+ * @since v10.7.0
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ /**
+ * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
+ *
+ * ```js
+ * console.trace('Show me');
+ * // Prints: (stack trace will vary based on where trace is called)
+ * // Trace: Show me
+ * // at repl:2:9
+ * // at REPLServer.defaultEval (repl.js:248:27)
+ * // at bound (domain.js:287:14)
+ * // at REPLServer.runBound [as eval] (domain.js:300:12)
+ * // at REPLServer.<anonymous> (repl.js:412:12)
+ * // at emitOne (events.js:82:20)
+ * // at REPLServer.emit (events.js:169:7)
+ * // at REPLServer.Interface._onLine (readline.js:210:10)
+ * // at REPLServer.Interface._line (readline.js:549:8)
+ * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
+ * ```
+ * @since v0.1.104
+ */
+ trace(message?: any, ...optionalParams: any[]): void;
+ /**
+ * The `console.warn()` function is an alias for {@link error}.
+ * @since v0.1.100
+ */
+ warn(message?: any, ...optionalParams: any[]): void;
+ // --- Inspector mode only ---
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Starts a JavaScript CPU profile with an optional label.
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Adds an event with the label `label` to the Timeline panel of the inspector.
+ */
+ timeStamp(label?: string): void;
+ }
+ /**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
+ */
+ namespace console {
+ interface ConsoleConstructorOptions {
+ stdout: NodeJS.WritableStream;
+ stderr?: NodeJS.WritableStream | undefined;
+ ignoreErrors?: boolean | undefined;
+ colorMode?: boolean | 'auto' | undefined;
+ inspectOptions?: InspectOptions | undefined;
+ /**
+ * Set group indentation
+ * @default 2
+ */
+ groupIndentation?: number | undefined;
+ }
+ interface ConsoleConstructor {
+ prototype: Console;
+ new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
+ new (options: ConsoleConstructorOptions): Console;
+ }
+ }
+ var console: Console;
+ }
+ export = globalThis.console;
+}
diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts
new file mode 100755
index 0000000..208020d
--- /dev/null
+++ b/node_modules/@types/node/constants.d.ts
@@ -0,0 +1,18 @@
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module 'constants' {
+ import { constants as osConstants, SignalConstants } from 'node:os';
+ import { constants as cryptoConstants } from 'node:crypto';
+ import { constants as fsConstants } from 'node:fs';
+
+ const exp: typeof osConstants.errno &
+ typeof osConstants.priority &
+ SignalConstants &
+ typeof cryptoConstants &
+ typeof fsConstants;
+ export = exp;
+}
+
+declare module 'node:constants' {
+ import constants = require('constants');
+ export = constants;
+}
diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts
new file mode 100755
index 0000000..6135090
--- /dev/null
+++ b/node_modules/@types/node/crypto.d.ts
@@ -0,0 +1,3961 @@
+/**
+ * The `crypto` module provides cryptographic functionality that includes a set of
+ * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.
+ *
+ * ```js
+ * const { createHmac } = await import('crypto');
+ *
+ * const secret = 'abcdefg';
+ * const hash = createHmac('sha256', secret)
+ * .update('I love cupcakes')
+ * .digest('hex');
+ * console.log(hash);
+ * // Prints:
+ * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/crypto.js)
+ */
+declare module 'crypto' {
+ import * as stream from 'node:stream';
+ import { PeerCertificate } from 'node:tls';
+ /**
+ * SPKAC is a Certificate Signing Request mechanism originally implemented by
+ * Netscape and was specified formally as part of [HTML5's `keygen` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen).
+ *
+ * `<keygen>` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
+ * should not use this element anymore.
+ *
+ * The `crypto` module provides the `Certificate` class for working with SPKAC
+ * data. The most common usage is handling output generated by the HTML5`<keygen>` element. Node.js uses [OpenSSL's SPKAC
+ * implementation](https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html) internally.
+ * @since v0.11.8
+ */
+ class Certificate {
+ /**
+ * ```js
+ * const { Certificate } = await import('crypto');
+ * const spkac = getSpkacSomehow();
+ * const challenge = Certificate.exportChallenge(spkac);
+ * console.log(challenge.toString('utf8'));
+ * // Prints: the challenge as a UTF8 string
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * ```js
+ * const { Certificate } = await import('crypto');
+ * const spkac = getSpkacSomehow();
+ * const publicKey = Certificate.exportPublicKey(spkac);
+ * console.log(publicKey);
+ * // Prints: the public key as <Buffer ...>
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { Certificate } = await import('crypto');
+ *
+ * const spkac = getSpkacSomehow();
+ * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
+ * // Prints: true or false
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
+ */
+ static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ }
+ namespace constants {
+ // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
+ const OPENSSL_VERSION_NUMBER: number;
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+ const SSL_OP_ALL: number;
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ /** Instructs OpenSSL to turn on cookie exchange. */
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
+ const SSL_OP_EPHEMERAL_RSA: number;
+ /** Allows initial connection to servers that do not support RI. */
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
+ const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
+ /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
+ const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
+ const SSL_OP_NETSCAPE_CA_DN_BUG: number;
+ const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
+ const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
+ const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+ const SSL_OP_NO_COMPRESSION: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ const SSL_OP_NO_SSLv2: number;
+ const SSL_OP_NO_SSLv3: number;
+ const SSL_OP_NO_TICKET: number;
+ const SSL_OP_NO_TLSv1: number;
+ const SSL_OP_NO_TLSv1_1: number;
+ const SSL_OP_NO_TLSv1_2: number;
+ const SSL_OP_PKCS1_CHECK_1: number;
+ const SSL_OP_PKCS1_CHECK_2: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
+ const SSL_OP_SINGLE_DH_USE: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
+ const SSL_OP_SINGLE_ECDH_USE: number;
+ const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
+ const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
+ const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
+ const SSL_OP_TLS_D5_BUG: number;
+ /** Instructs OpenSSL to disable version rollback attack detection. */
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+ const ENGINE_METHOD_RSA: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_EC: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+ const ALPN_ENABLED: number;
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+ const RSA_PSS_SALTLEN_DIGEST: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+ const RSA_PSS_SALTLEN_AUTO: number;
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+ const defaultCoreCipherList: string;
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
+ const defaultCipherList: string;
+ }
+ interface HashOptions extends stream.TransformOptions {
+ /**
+ * For XOF hash functions such as `shake256`, the
+ * outputLength option can be used to specify the desired output length in bytes.
+ */
+ outputLength?: number | undefined;
+ }
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+ /**
+ * Creates and returns a `Hash` object that can be used to generate hash digests
+ * using the given `algorithm`. Optional `options` argument controls stream
+ * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
+ * can be used to specify the desired output length in bytes.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * Example: generating the sha256 sum of a file
+ *
+ * ```js
+ * import {
+ * createReadStream
+ * } from 'fs';
+ * import { argv } from 'process';
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hash.update(data);
+ * else {
+ * console.log(`${hash.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.92
+ * @param options `stream.transform` options
+ */
+ function createHash(algorithm: string, options?: HashOptions): Hash;
+ /**
+ * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
+ * Optional `options` argument controls stream behavior.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
+ * a `KeyObject`, its type must be `secret`.
+ *
+ * Example: generating the sha256 HMAC of a file
+ *
+ * ```js
+ * import {
+ * createReadStream
+ * } from 'fs';
+ * import { argv } from 'process';
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hmac.update(data);
+ * else {
+ * console.log(`${hmac.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+ // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
+ type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
+ type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
+ type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
+ /**
+ * The `Hash` class is a utility for creating hash digests of data. It can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed hash digest on the readable side, or
+ * * Using the `hash.update()` and `hash.digest()` methods to produce the
+ * computed hash.
+ *
+ * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hash` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hash.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * }
+ * });
+ *
+ * hash.write('some data to hash');
+ * hash.end();
+ * ```
+ *
+ * Example: Using `Hash` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ * import { stdout } from 'process';
+ * const { createHash } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hash).setEncoding('hex').pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hash.update()` and `hash.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('some data to hash');
+ * console.log(hash.digest('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * ```
+ * @since v0.1.92
+ */
+ class Hash extends stream.Transform {
+ private constructor();
+ /**
+ * Creates a new `Hash` object that contains a deep copy of the internal state
+ * of the current `Hash` object.
+ *
+ * The optional `options` argument controls stream behavior. For XOF hash
+ * functions such as `'shake256'`, the `outputLength` option can be used to
+ * specify the desired output length in bytes.
+ *
+ * An error is thrown when an attempt is made to copy the `Hash` object after
+ * its `hash.digest()` method has been called.
+ *
+ * ```js
+ * // Calculate a rolling hash.
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('one');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('two');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('three');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * // Etc.
+ * ```
+ * @since v13.1.0
+ * @param options `stream.transform` options
+ */
+ copy(options?: stream.TransformOptions): Hash;
+ /**
+ * Updates the hash content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hash;
+ update(data: string, inputEncoding: Encoding): Hash;
+ /**
+ * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
+ * If `encoding` is provided a string will be returned; otherwise
+ * a `Buffer` is returned.
+ *
+ * The `Hash` object can not be used again after `hash.digest()` method has been
+ * called. Multiple calls will cause an error to be thrown.
+ * @since v0.1.92
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ /**
+ * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
+ * be used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed HMAC digest on the readable side, or
+ * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
+ * computed HMAC digest.
+ *
+ * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hmac` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hmac.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * }
+ * });
+ *
+ * hmac.write('some data to hash');
+ * hmac.end();
+ * ```
+ *
+ * Example: Using `Hmac` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ * import { stdout } from 'process';
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hmac).pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hmac.update()` and `hmac.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.update('some data to hash');
+ * console.log(hmac.digest('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * ```
+ * @since v0.1.94
+ */
+ class Hmac extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the `Hmac` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hmac;
+ update(data: string, inputEncoding: Encoding): Hmac;
+ /**
+ * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
+ * If `encoding` is
+ * provided a string is returned; otherwise a `Buffer` is returned;
+ *
+ * The `Hmac` object can not be used again after `hmac.digest()` has been
+ * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
+ * @since v0.1.94
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ type KeyObjectType = 'secret' | 'public' | 'private';
+ interface KeyExportOptions<T extends KeyFormat> {
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface JwkKeyExportOptions {
+ format: 'jwk';
+ }
+ interface JsonWebKey {
+ crv?: string | undefined;
+ d?: string | undefined;
+ dp?: string | undefined;
+ dq?: string | undefined;
+ e?: string | undefined;
+ k?: string | undefined;
+ kty?: string | undefined;
+ n?: string | undefined;
+ p?: string | undefined;
+ q?: string | undefined;
+ qi?: string | undefined;
+ x?: string | undefined;
+ y?: string | undefined;
+ [key: string]: unknown;
+ }
+ interface AsymmetricKeyDetails {
+ /**
+ * Key size in bits (RSA, DSA).
+ */
+ modulusLength?: number | undefined;
+ /**
+ * Public exponent (RSA).
+ */
+ publicExponent?: bigint | undefined;
+ /**
+ * Name of the message digest (RSA-PSS).
+ */
+ hashAlgorithm?: string | undefined;
+ /**
+ * Name of the message digest used by MGF1 (RSA-PSS).
+ */
+ mgf1HashAlgorithm?: string | undefined;
+ /**
+ * Minimal salt length in bytes (RSA-PSS).
+ */
+ saltLength?: number | undefined;
+ /**
+ * Size of q in bits (DSA).
+ */
+ divisorLength?: number | undefined;
+ /**
+ * Name of the curve (EC).
+ */
+ namedCurve?: string | undefined;
+ }
+ /**
+ * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
+ * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
+ * objects are not to be created directly using the `new`keyword.
+ *
+ * Most applications should consider using the new `KeyObject` API instead of
+ * passing keys as strings or `Buffer`s due to improved security features.
+ *
+ * `KeyObject` instances can be passed to other threads via `postMessage()`.
+ * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
+ * be listed in the `transferList` argument.
+ * @since v11.6.0
+ */
+ class KeyObject {
+ private constructor();
+ /**
+ * Example: Converting a `CryptoKey` instance to a `KeyObject`:
+ *
+ * ```js
+ * const { webcrypto, KeyObject } = await import('crypto');
+ * const { subtle } = webcrypto;
+ *
+ * const key = await subtle.generateKey({
+ * name: 'HMAC',
+ * hash: 'SHA-256',
+ * length: 256
+ * }, true, ['sign', 'verify']);
+ *
+ * const keyObject = KeyObject.from(key);
+ * console.log(keyObject.symmetricKeySize);
+ * // Prints: 32 (symmetric key size in bytes)
+ * ```
+ * @since v15.0.0
+ */
+ static from(key: webcrypto.CryptoKey): KeyObject;
+ /**
+ * For asymmetric keys, this property represents the type of the key. Supported key
+ * types are:
+ *
+ * * `'rsa'` (OID 1.2.840.113549.1.1.1)
+ * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
+ * * `'dsa'` (OID 1.2.840.10040.4.1)
+ * * `'ec'` (OID 1.2.840.10045.2.1)
+ * * `'x25519'` (OID 1.3.101.110)
+ * * `'x448'` (OID 1.3.101.111)
+ * * `'ed25519'` (OID 1.3.101.112)
+ * * `'ed448'` (OID 1.3.101.113)
+ * * `'dh'` (OID 1.2.840.113549.1.3.1)
+ *
+ * This property is `undefined` for unrecognized `KeyObject` types and symmetric
+ * keys.
+ * @since v11.6.0
+ */
+ asymmetricKeyType?: KeyType | undefined;
+ /**
+ * For asymmetric keys, this property represents the size of the embedded key in
+ * bytes. This property is `undefined` for symmetric keys.
+ */
+ asymmetricKeySize?: number | undefined;
+ /**
+ * This property exists only on asymmetric keys. Depending on the type of the key,
+ * this object contains information about the key. None of the information obtained
+ * through this property can be used to uniquely identify a key or to compromise
+ * the security of the key.
+ *
+ * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
+ * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
+ * set.
+ *
+ * Other key details might be exposed via this API using additional attributes.
+ * @since v15.7.0
+ */
+ asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
+ /**
+ * For symmetric keys, the following encoding options can be used:
+ *
+ * For public keys, the following encoding options can be used:
+ *
+ * For private keys, the following encoding options can be used:
+ *
+ * The result type depends on the selected encoding format, when PEM the
+ * result is a string, when DER it will be a buffer containing the data
+ * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
+ *
+ * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
+ * ignored.
+ *
+ * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
+ * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
+ * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
+ * encrypted private keys. Since PKCS#8 defines its own
+ * encryption mechanism, PEM-level encryption is not supported when encrypting
+ * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
+ * PKCS#1 and SEC1 encryption.
+ * @since v11.6.0
+ */
+ export(options: KeyExportOptions<'pem'>): string | Buffer;
+ export(options?: KeyExportOptions<'der'>): Buffer;
+ export(options?: JwkKeyExportOptions): JsonWebKey;
+ /**
+ * For secret keys, this property represents the size of the key in bytes. This
+ * property is `undefined` for asymmetric keys.
+ * @since v11.6.0
+ */
+ symmetricKeySize?: number | undefined;
+ /**
+ * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
+ * or `'private'` for private (asymmetric) keys.
+ * @since v11.6.0
+ */
+ type: KeyObjectType;
+ }
+ type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
+ type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
+ type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
+ type BinaryLike = string | NodeJS.ArrayBufferView;
+ type CipherKey = BinaryLike | KeyObject;
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number | undefined;
+ }
+ interface CipherOCBOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ /**
+ * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `password` is used to derive the cipher key and initialization vector (IV).
+ * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`.
+ *
+ * The implementation of `crypto.createCipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
+ * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
+ * they are used in order to avoid the risk of IV reuse that causes
+ * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
+ /**
+ * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
+ * initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a
+ * given IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB;
+ function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
+ /**
+ * Instances of the `Cipher` class are used to encrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain unencrypted
+ * data is written to produce encrypted data on the readable side, or
+ * * Using the `cipher.update()` and `cipher.final()` methods to produce
+ * the encrypted data.
+ *
+ * The {@link createCipher} or {@link createCipheriv} methods are
+ * used to create `Cipher` instances. `Cipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Cipher` objects as streams:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * // Once we have the key and iv, we can create and use the cipher...
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = '';
+ * cipher.setEncoding('hex');
+ *
+ * cipher.on('data', (chunk) => encrypted += chunk);
+ * cipher.on('end', () => console.log(encrypted));
+ *
+ * cipher.write('some clear text data');
+ * cipher.end();
+ * });
+ * });
+ * ```
+ *
+ * Example: Using `Cipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'fs';
+ *
+ * import {
+ * pipeline
+ * } from 'stream';
+ *
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.js');
+ * const output = createWriteStream('test.enc');
+ *
+ * pipeline(input, cipher, output, (err) => {
+ * if (err) throw err;
+ * });
+ * });
+ * });
+ * ```
+ *
+ * Example: Using the `cipher.update()` and `cipher.final()` methods:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
+ * encrypted += cipher.final('hex');
+ * console.log(encrypted);
+ * });
+ * });
+ * ```
+ * @since v0.1.94
+ */
+ class Cipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the cipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
+ * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
+ * thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the data.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: BinaryLike): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `cipher.final()` method has been called, the `Cipher` object can no
+ * longer be used to encrypt data. Attempts to call `cipher.final()` more than
+ * once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When using block encryption algorithms, the `Cipher` class will automatically
+ * add padding to the input data to the appropriate block size. To disable the
+ * default padding call `cipher.setAutoPadding(false)`.
+ *
+ * When `autoPadding` is `false`, the length of the entire input data must be a
+ * multiple of the cipher's block size or `cipher.final()` will throw an error.
+ * Disabling automatic padding is useful for non-standard padding, for instance
+ * using `0x0` instead of PKCS padding.
+ *
+ * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(autoPadding?: boolean): this;
+ }
+ interface CipherCCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherGCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherOCB extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
+ * to those with the specified length.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a given
+ * IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB;
+ function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
+ /**
+ * Instances of the `Decipher` class are used to decrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain encrypted
+ * data is written to produce unencrypted data on the readable side, or
+ * * Using the `decipher.update()` and `decipher.final()` methods to
+ * produce the unencrypted data.
+ *
+ * The {@link createDecipher} or {@link createDecipheriv} methods are
+ * used to create `Decipher` instances. `Decipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Decipher` objects as streams:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Key length is dependent on the algorithm. In this case for aes192, it is
+ * // 24 bytes (192 bits).
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * let decrypted = '';
+ * decipher.on('readable', () => {
+ * while (null !== (chunk = decipher.read())) {
+ * decrypted += chunk.toString('utf8');
+ * }
+ * });
+ * decipher.on('end', () => {
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * });
+ *
+ * // Encrypted with same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * decipher.write(encrypted, 'hex');
+ * decipher.end();
+ * ```
+ *
+ * Example: Using `Decipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'fs';
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.enc');
+ * const output = createWriteStream('test.js');
+ *
+ * input.pipe(decipher).pipe(output);
+ * ```
+ *
+ * Example: Using the `decipher.update()` and `decipher.final()` methods:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * // Encrypted using same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
+ * decrypted += decipher.final('utf8');
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * ```
+ * @since v0.1.94
+ */
+ class Decipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the decipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
+ * ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
+ * being thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: NodeJS.ArrayBufferView): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `decipher.final()` method has been called, the `Decipher` object can
+ * no longer be used to decrypt data. Attempts to call `decipher.final()` more
+ * than once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
+ * removing padding.
+ *
+ * Turning auto padding off will only work if the input data's length is a
+ * multiple of the ciphers block size.
+ *
+ * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(auto_padding?: boolean): this;
+ }
+ interface DecipherCCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherGCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherOCB extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface PrivateKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface PublicKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'spki' | undefined;
+ }
+ /**
+ * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKey
+ * } = await import('crypto');
+ *
+ * generateKey('hmac', { length: 64 }, (err, key) => {
+ * if (err) throw err;
+ * console.log(key.export().toString('hex')); // 46e..........620
+ * });
+ * ```
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKey(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ },
+ callback: (err: Error | null, key: KeyObject) => void
+ ): void;
+ /**
+ * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKeySync
+ * } = await import('crypto');
+ *
+ * const key = generateKeySync('hmac', { length: 64 });
+ * console.log(key.export().toString('hex')); // e89..........41e
+ * ```
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKeySync(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ }
+ ): KeyObject;
+ interface JsonWebKeyInput {
+ key: JsonWebKey;
+ format: 'jwk';
+ }
+ /**
+ * Creates and returns a new key object containing a private key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
+ *
+ * If the private key is encrypted, a `passphrase` must be specified. The length
+ * of the passphrase is limited to 1024 bytes.
+ * @since v11.6.0
+ */
+ function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a public key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
+ * otherwise, `key` must be an object with the properties described above.
+ *
+ * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
+ *
+ * Because public keys can be derived from private keys, a private key may be
+ * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
+ * returned `KeyObject` will be `'public'` and that the private key cannot be
+ * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
+ * and it will be impossible to extract the private key from the returned object.
+ * @since v11.6.0
+ */
+ function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a secret key for symmetric
+ * encryption or `Hmac`.
+ * @since v11.6.0
+ * @param encoding The string encoding when `key` is a string.
+ */
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+ function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
+ /**
+ * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
+ * Optional `options` argument controls the `stream.Writable` behavior.
+ *
+ * In some cases, a `Sign` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
+ type DSAEncoding = 'der' | 'ieee-p1363';
+ interface SigningOptions {
+ /**
+ * @See crypto.constants.RSA_PKCS1_PADDING
+ */
+ padding?: number | undefined;
+ saltLength?: number | undefined;
+ dsaEncoding?: DSAEncoding | undefined;
+ }
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+ interface SignKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+ interface VerifyKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ type KeyLike = string | Buffer | KeyObject;
+ /**
+ * The `Sign` class is a utility for generating signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
+ * * Using the `sign.update()` and `sign.sign()` methods to produce the
+ * signature.
+ *
+ * The {@link createSign} method is used to create `Sign` instances. The
+ * argument is the string name of the hash function to use. `Sign` objects are not
+ * to be created directly using the `new` keyword.
+ *
+ * Example: Using `Sign` and `Verify` objects as streams:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify
+ * } = await import('crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('ec', {
+ * namedCurve: 'sect239k1'
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.write('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey, 'hex');
+ *
+ * const verify = createVerify('SHA256');
+ * verify.write('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature, 'hex'));
+ * // Prints: true
+ * ```
+ *
+ * Example: Using the `sign.update()` and `verify.update()` methods:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify
+ * } = await import('crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
+ * modulusLength: 2048,
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.update('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey);
+ *
+ * const verify = createVerify('SHA256');
+ * verify.update('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature));
+ * // Prints: true
+ * ```
+ * @since v0.1.92
+ */
+ class Sign extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Sign` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): this;
+ update(data: string, inputEncoding: Encoding): this;
+ /**
+ * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * The `Sign` object can not be again used after `sign.sign()` method has been
+ * called. Multiple calls to `sign.sign()` will result in an error being thrown.
+ * @since v0.1.92
+ */
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
+ }
+ /**
+ * Creates and returns a `Verify` object that uses the given algorithm.
+ * Use {@link getHashes} to obtain an array of names of the available
+ * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
+ *
+ * In some cases, a `Verify` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+ /**
+ * The `Verify` class is a utility for verifying signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream` where written data is used to validate against the
+ * supplied signature, or
+ * * Using the `verify.update()` and `verify.verify()` methods to verify
+ * the signature.
+ *
+ * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
+ *
+ * See `Sign` for examples.
+ * @since v0.1.92
+ */
+ class Verify extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Verify` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `inputEncoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Verify;
+ update(data: string, inputEncoding: Encoding): Verify;
+ /**
+ * Verifies the provided data using the given `object` and `signature`.
+ *
+ * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the data, in
+ * the `signatureEncoding`.
+ * If a `signatureEncoding` is specified, the `signature` is expected to be a
+ * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * The `verify` object can not be used again after `verify.verify()` has been
+ * called. Multiple calls to `verify.verify()` will result in an error being
+ * thrown.
+ *
+ * Because public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.1.92
+ */
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
+ }
+ /**
+ * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
+ * optional specific `generator`.
+ *
+ * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
+ *
+ * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
+ * a `Buffer`, `TypedArray`, or `DataView` is expected.
+ *
+ * If `generatorEncoding` is specified, `generator` is expected to be a string;
+ * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
+ * @since v0.11.12
+ * @param primeEncoding The `encoding` of the `prime` string.
+ * @param [generator=2]
+ * @param generatorEncoding The `encoding` of the `generator` string.
+ */
+ function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ /**
+ * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
+ * exchanges.
+ *
+ * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const {
+ * createDiffieHellman
+ * } = await import('crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createDiffieHellman(2048);
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * // OK
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * ```
+ * @since v0.5.0
+ */
+ class DiffieHellman {
+ private constructor();
+ /**
+ * Generates private and public Diffie-Hellman key values, and returns
+ * the public key in the specified `encoding`. This key should be
+ * transferred to the other party.
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using the specified `inputEncoding`, and secret is
+ * encoded using specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
+ * @since v0.5.0
+ * @param inputEncoding The `encoding` of an `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman prime in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrime(): Buffer;
+ getPrime(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman generator in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getGenerator(): Buffer;
+ getGenerator(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman public key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman private key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
+ * to be a string. If no `encoding` is provided, `publicKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `publicKey` string.
+ */
+ setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
+ setPublicKey(publicKey: string, encoding: BufferEncoding): void;
+ /**
+ * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
+ * to be a string. If no `encoding` is provided, `privateKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
+ /**
+ * A bit field containing any warnings and/or errors resulting from a check
+ * performed during initialization of the `DiffieHellman` object.
+ *
+ * The following values are valid for this property (as defined in `constants`module):
+ *
+ * * `DH_CHECK_P_NOT_SAFE_PRIME`
+ * * `DH_CHECK_P_NOT_PRIME`
+ * * `DH_UNABLE_TO_CHECK_GENERATOR`
+ * * `DH_NOT_SUITABLE_GENERATOR`
+ * @since v0.11.12
+ */
+ verifyError: number;
+ }
+ /**
+ * The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
+ * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
+ * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
+ *
+ * ```js
+ * const { createDiffieHellmanGroup } = await import('node:crypto');
+ * const dh = createDiffieHellmanGroup('modp1');
+ * ```
+ * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
+ * ```bash
+ * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
+ * modp1 # 768 bits
+ * modp2 # 1024 bits
+ * modp5 # 1536 bits
+ * modp14 # 2048 bits
+ * modp15 # etc.
+ * modp16
+ * modp17
+ * modp18
+ * ```
+ * @since v0.7.5
+ */
+ const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
+ interface DiffieHellmanGroupConstructor {
+ new(name: string): DiffieHellmanGroup;
+ (name: string): DiffieHellmanGroup;
+ readonly prototype: DiffieHellmanGroup;
+ }
+ type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
+ /**
+ * Creates a predefined `DiffieHellmanGroup` key exchange object. The
+ * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`,
+ * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
+ * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
+ * the keys (with `diffieHellman.setPublicKey()`, for example). The
+ * advantage of using this method is that the parties do not have to
+ * generate nor exchange a group modulus beforehand, saving both processor
+ * and communication time.
+ *
+ * Example (obtaining a shared secret):
+ *
+ * ```js
+ * const {
+ * getDiffieHellman
+ * } = await import('crypto');
+ * const alice = getDiffieHellman('modp14');
+ * const bob = getDiffieHellman('modp14');
+ *
+ * alice.generateKeys();
+ * bob.generateKeys();
+ *
+ * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
+ * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
+ *
+ * // aliceSecret and bobSecret should be the same
+ * console.log(aliceSecret === bobSecret);
+ * ```
+ * @since v0.7.5
+ */
+ function getDiffieHellman(groupName: string): DiffieHellmanGroup;
+ /**
+ * An alias for {@link getDiffieHellman}
+ * @since v0.9.3
+ */
+ function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
+ /**
+ * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
+ * thrown if any of the input arguments specify invalid values or types.
+ *
+ * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
+ * please specify a `digest` explicitly.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2
+ * } = await import('crypto');
+ *
+ * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * ```
+ *
+ * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been
+ * deprecated and use should be avoided.
+ *
+ * ```js
+ * import crypto from 'crypto';
+ * crypto.DEFAULT_ENCODING = 'hex';
+ * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey); // '3745e48...aa39b34'
+ * });
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ * @since v0.5.5
+ */
+ function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * If an error occurs an `Error` will be thrown, otherwise the derived key will be
+ * returned as a `Buffer`.
+ *
+ * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
+ * please specify a `digest` explicitly.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2Sync
+ * } = await import('crypto');
+ *
+ * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
+ * console.log(key.toString('hex')); // '3745e48...08d59ae'
+ * ```
+ *
+ * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use
+ * should be avoided.
+ *
+ * ```js
+ * import crypto from 'crypto';
+ * crypto.DEFAULT_ENCODING = 'hex';
+ * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
+ * console.log(key); // '3745e48...aa39b34'
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ * @since v0.9.3
+ */
+ function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
+ /**
+ * Generates cryptographically strong pseudorandom data. The `size` argument
+ * is a number indicating the number of bytes to generate.
+ *
+ * If a `callback` function is provided, the bytes are generated asynchronously
+ * and the `callback` function is invoked with two arguments: `err` and `buf`.
+ * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomBytes
+ * } = await import('crypto');
+ *
+ * randomBytes(256, (err, buf) => {
+ * if (err) throw err;
+ * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * });
+ * ```
+ *
+ * If the `callback` function is not provided, the random bytes are generated
+ * synchronously and returned as a `Buffer`. An error will be thrown if
+ * there is a problem generating the bytes.
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomBytes
+ * } = await import('crypto');
+ *
+ * const buf = randomBytes(256);
+ * console.log(
+ * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * ```
+ *
+ * The `crypto.randomBytes()` method will not complete until there is
+ * sufficient entropy available.
+ * This should normally never take longer than a few milliseconds. The only time
+ * when generating the random bytes may conceivably block for a longer period of
+ * time is right after boot, when the whole system is still low on entropy.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomBytes()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomBytes` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v0.5.8
+ * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
+ * @return if the `callback` function is not provided.
+ */
+ function randomBytes(size: number): Buffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ function pseudoRandomBytes(size: number): Buffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ /**
+ * Return a random integer `n` such that `min <= n < max`. This
+ * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
+ *
+ * The range (`max - min`) must be less than 248. `min` and `max` must
+ * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+ *
+ * If the `callback` function is not provided, the random integer is
+ * generated synchronously.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * randomInt(3, (err, n) => {
+ * if (err) throw err;
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * });
+ * ```
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * const n = randomInt(3);
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * ```
+ *
+ * ```js
+ * // With `min` argument
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * const n = randomInt(1, 7);
+ * console.log(`The dice rolled: ${n}`);
+ * ```
+ * @since v14.10.0, v12.19.0
+ * @param [min=0] Start of random range (inclusive).
+ * @param max End of random range (exclusive).
+ * @param callback `function(err, n) {}`.
+ */
+ function randomInt(max: number): number;
+ function randomInt(min: number, max: number): number;
+ function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+ function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+ /**
+ * Synchronous version of {@link randomFill}.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFillSync } = await import('crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * console.log(randomFillSync(buf).toString('hex'));
+ *
+ * randomFillSync(buf, 5);
+ * console.log(buf.toString('hex'));
+ *
+ * // The above is equivalent to the following:
+ * randomFillSync(buf, 5, 5);
+ * console.log(buf.toString('hex'));
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFillSync } = await import('crypto');
+ *
+ * const a = new Uint32Array(10);
+ * console.log(Buffer.from(randomFillSync(a).buffer,
+ * a.byteOffset, a.byteLength).toString('hex'));
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * console.log(Buffer.from(randomFillSync(b).buffer,
+ * b.byteOffset, b.byteLength).toString('hex'));
+ *
+ * const c = new ArrayBuffer(10);
+ * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
+ * ```
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @return The object passed as `buffer` argument.
+ */
+ function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
+ /**
+ * This function is similar to {@link randomBytes} but requires the first
+ * argument to be a `Buffer` that will be filled. It also
+ * requires that a callback is passed in.
+ *
+ * If the `callback` function is not provided, an error will be thrown.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFill } = await import('crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * randomFill(buf, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * randomFill(buf, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * // The above is equivalent to the following:
+ * randomFill(buf, 5, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
+ *
+ * While this includes instances of `Float32Array` and `Float64Array`, this
+ * function should not be used to generate random floating-point numbers. The
+ * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
+ * contains finite numbers only, they are not drawn from a uniform random
+ * distribution and have no meaningful lower or upper bounds.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFill } = await import('crypto');
+ *
+ * const a = new Uint32Array(10);
+ * randomFill(a, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * randomFill(b, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const c = new ArrayBuffer(10);
+ * randomFill(c, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf).toString('hex'));
+ * });
+ * ```
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomFill()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomFill` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @param callback `function(err, buf) {}`.
+ */
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
+ interface ScryptOptions {
+ cost?: number | undefined;
+ blockSize?: number | undefined;
+ parallelization?: number | undefined;
+ N?: number | undefined;
+ r?: number | undefined;
+ p?: number | undefined;
+ maxmem?: number | undefined;
+ }
+ /**
+ * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
+ * callback as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scrypt
+ * } = await import('crypto');
+ *
+ * // Using the factory defaults.
+ * scrypt('password', 'salt', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * // Using a custom N parameter. Must be a power of two.
+ * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
+ * });
+ * ```
+ * @since v10.5.0
+ */
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * An exception is thrown when key derivation fails, otherwise the derived key is
+ * returned as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scryptSync
+ * } = await import('crypto');
+ * // Using the factory defaults.
+ *
+ * const key1 = scryptSync('password', 'salt', 64);
+ * console.log(key1.toString('hex')); // '3745e48...08d59ae'
+ * // Using a custom N parameter. Must be a power of two.
+ * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
+ * console.log(key2.toString('hex')); // '3745e48...aa39b34'
+ * ```
+ * @since v10.5.0
+ */
+ function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
+ interface RsaPublicKey {
+ key: KeyLike;
+ padding?: number | undefined;
+ }
+ interface RsaPrivateKey {
+ key: KeyLike;
+ passphrase?: string | undefined;
+ /**
+ * @default 'sha1'
+ */
+ oaepHash?: string | undefined;
+ oaepLabel?: NodeJS.TypedArray | undefined;
+ padding?: number | undefined;
+ }
+ /**
+ * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
+ * the corresponding private key, for example using {@link privateDecrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.11.14
+ */
+ function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
+ * the corresponding private key, for example using {@link privateEncrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v1.1.0
+ */
+ function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
+ * the corresponding public key, for example using {@link publicEncrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ * @since v0.11.14
+ */
+ function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
+ * the corresponding public key, for example using {@link publicDecrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ * @since v1.1.0
+ */
+ function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * ```js
+ * const {
+ * getCiphers
+ * } = await import('crypto');
+ *
+ * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array with the names of the supported cipher algorithms.
+ */
+ function getCiphers(): string[];
+ /**
+ * ```js
+ * const {
+ * getCurves
+ * } = await import('crypto');
+ *
+ * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
+ * ```
+ * @since v2.3.0
+ * @return An array with the names of the supported elliptic curves.
+ */
+ function getCurves(): string[];
+ /**
+ * @since v10.0.0
+ * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
+ */
+ function getFips(): 1 | 0;
+ /**
+ * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available.
+ * @since v10.0.0
+ * @param bool `true` to enable FIPS mode.
+ */
+ function setFips(bool: boolean): void;
+ /**
+ * ```js
+ * const {
+ * getHashes
+ * } = await import('crypto');
+ *
+ * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
+ */
+ function getHashes(): string[];
+ /**
+ * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
+ * key exchanges.
+ *
+ * Instances of the `ECDH` class can be created using the {@link createECDH} function.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const {
+ * createECDH
+ * } = await import('crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createECDH('secp521r1');
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createECDH('secp521r1');
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * // OK
+ * ```
+ * @since v0.11.14
+ */
+ class ECDH {
+ private constructor();
+ /**
+ * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
+ * format specified by `format`. The `format` argument specifies point encoding
+ * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
+ * interpreted using the specified `inputEncoding`, and the returned key is encoded
+ * using the specified `outputEncoding`.
+ *
+ * Use {@link getCurves} to obtain a list of available curve names.
+ * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
+ * the name and description of each available elliptic curve.
+ *
+ * If `format` is not specified the point will be returned in `'uncompressed'`format.
+ *
+ * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * Example (uncompressing a key):
+ *
+ * ```js
+ * const {
+ * createECDH,
+ * ECDH
+ * } = await import('crypto');
+ *
+ * const ecdh = createECDH('secp256k1');
+ * ecdh.generateKeys();
+ *
+ * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
+ *
+ * const uncompressedKey = ECDH.convertKey(compressedKey,
+ * 'secp256k1',
+ * 'hex',
+ * 'hex',
+ * 'uncompressed');
+ *
+ * // The converted key and the uncompressed public key should be the same
+ * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
+ * ```
+ * @since v10.0.0
+ * @param inputEncoding The `encoding` of the `key` string.
+ * @param outputEncoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ static convertKey(
+ key: BinaryLike,
+ curve: string,
+ inputEncoding?: BinaryToTextEncoding,
+ outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
+ format?: 'uncompressed' | 'compressed' | 'hybrid'
+ ): Buffer | string;
+ /**
+ * Generates private and public EC Diffie-Hellman key values, and returns
+ * the public key in the specified `format` and `encoding`. This key should be
+ * transferred to the other party.
+ *
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using specified `inputEncoding`, and the returned secret
+ * is encoded using the specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
+ *
+ * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
+ *
+ * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
+ * usually supplied from a remote user over an insecure network,
+ * be sure to handle this exception accordingly.
+ * @since v0.11.14
+ * @param inputEncoding The `encoding` of the `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @return The EC Diffie-Hellman in the specified `encoding`.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param [encoding] The `encoding` of the return value.
+ * @param [format='uncompressed']
+ * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
+ */
+ getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Sets the EC Diffie-Hellman private key.
+ * If `encoding` is provided, `privateKey` is expected
+ * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `privateKey` is not valid for the curve specified when the `ECDH` object was
+ * created, an error is thrown. Upon setting the private key, the associated
+ * public point (key) is also generated and set in the `ECDH` object.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
+ }
+ /**
+ * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
+ * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
+ * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
+ * and description of each available elliptic curve.
+ * @since v0.11.14
+ */
+ function createECDH(curveName: string): ECDH;
+ /**
+ * This function is based on a constant-time algorithm.
+ * Returns true if `a` is equal to `b`, without leaking timing information that
+ * would allow an attacker to guess one of the values. This is suitable for
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
+ *
+ * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
+ * must have the same byte length. An error is thrown if `a` and `b` have
+ * different byte lengths.
+ *
+ * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
+ * entry, such as `Uint16Array`, the result will be computed using the platform
+ * byte order.
+ *
+ * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
+ * is timing-safe. Care should be taken to ensure that the surrounding code does
+ * not introduce timing vulnerabilities.
+ * @since v6.6.0
+ */
+ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+ /** @deprecated since v10.0.0 */
+ const DEFAULT_ENCODING: BufferEncoding;
+ type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
+ type KeyFormat = 'pem' | 'der';
+ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | undefined;
+ }
+ interface KeyPairKeyObjectResult {
+ publicKey: KeyObject;
+ privateKey: KeyObject;
+ }
+ interface ED25519KeyPairKeyObjectOptions {}
+ interface ED448KeyPairKeyObjectOptions {}
+ interface X25519KeyPairKeyObjectOptions {}
+ interface X448KeyPairKeyObjectOptions {}
+ interface ECKeyPairKeyObjectOptions {
+ /**
+ * Name of the curve to use
+ */
+ namedCurve: string;
+ }
+ interface RSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ }
+ interface RSAPSSKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ }
+ interface DSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ }
+ interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs1' | 'pkcs8';
+ };
+ }
+ interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'sec1' | 'pkcs8';
+ };
+ }
+ interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
+ publicKey: T1;
+ privateKey: T2;
+ }
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * When encoding public keys, it is recommended to use `'spki'`. When encoding
+ * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
+ * and to keep the passphrase confidential.
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync
+ * } = await import('crypto');
+ *
+ * const {
+ * publicKey,
+ * privateKey,
+ * } = generateKeyPairSync('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem'
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret'
+ * }
+ * });
+ * ```
+ *
+ * The return value `{ publicKey, privateKey }` represents the generated key pair.
+ * When PEM encoding was selected, the respective key will be a string, otherwise
+ * it will be a buffer containing the data encoded as DER.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
+ *
+ * ```js
+ * const {
+ * generateKeyPair
+ * } = await import('crypto');
+ *
+ * generateKeyPair('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem'
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret'
+ * }
+ * }, (err, publicKey, privateKey) => {
+ * // Handle errors and use the generated key pair.
+ * });
+ * ```
+ *
+ * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ namespace generateKeyPair {
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ }
+ /**
+ * Calculates and returns the signature for `data` using the given private key and
+ * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
+ * dependent upon the key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPrivateKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ function sign(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
+ callback: (error: Error | null, data: Buffer) => void
+ ): void;
+ /**
+ * Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
+ * key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPublicKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the `data`.
+ *
+ * Because public keys can be derived from private keys, a private key or a public
+ * key may be passed for `key`.
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ function verify(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
+ signature: NodeJS.ArrayBufferView,
+ callback: (error: Error | null, result: boolean) => void
+ ): void;
+ /**
+ * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
+ * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
+ * @since v13.9.0, v12.17.0
+ */
+ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
+ type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts';
+ interface CipherInfoOptions {
+ /**
+ * A test key length.
+ */
+ keyLength?: number | undefined;
+ /**
+ * A test IV length.
+ */
+ ivLength?: number | undefined;
+ }
+ interface CipherInfo {
+ /**
+ * The name of the cipher.
+ */
+ name: string;
+ /**
+ * The nid of the cipher.
+ */
+ nid: number;
+ /**
+ * The block size of the cipher in bytes.
+ * This property is omitted when mode is 'stream'.
+ */
+ blockSize?: number | undefined;
+ /**
+ * The expected or default initialization vector length in bytes.
+ * This property is omitted if the cipher does not use an initialization vector.
+ */
+ ivLength?: number | undefined;
+ /**
+ * The expected or default key length in bytes.
+ */
+ keyLength: number;
+ /**
+ * The cipher mode.
+ */
+ mode: CipherMode;
+ }
+ /**
+ * Returns information about a given cipher.
+ *
+ * Some ciphers accept variable length keys and initialization vectors. By default,
+ * the `crypto.getCipherInfo()` method will return the default values for these
+ * ciphers. To test if a given key length or iv length is acceptable for given
+ * cipher, use the `keyLength` and `ivLength` options. If the given values are
+ * unacceptable, `undefined` will be returned.
+ * @since v15.0.0
+ * @param nameOrNid The name or nid of the cipher to query.
+ */
+ function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
+ /**
+ * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. The successfully generated `derivedKey` will
+ * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
+ * of the input arguments specify invalid values or types.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * hkdf
+ * } = await import('crypto');
+ *
+ * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * });
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. It must be at least one byte in length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void;
+ /**
+ * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
+ * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
+ *
+ * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
+ *
+ * An error will be thrown if any of the input arguments specify invalid values or
+ * types, or if the derived key cannot be generated.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * hkdfSync
+ * } = await import('crypto');
+ *
+ * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64);
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. It must be at least one byte in length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer;
+ interface SecureHeapUsage {
+ /**
+ * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
+ */
+ total: number;
+ /**
+ * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag.
+ */
+ min: number;
+ /**
+ * The total number of bytes currently allocated from the secure heap.
+ */
+ used: number;
+ /**
+ * The calculated ratio of `used` to `total` allocated bytes.
+ */
+ utilization: number;
+ }
+ /**
+ * @since v15.6.0
+ */
+ function secureHeapUsed(): SecureHeapUsage;
+ interface RandomUUIDOptions {
+ /**
+ * By default, to improve performance,
+ * Node.js will pre-emptively generate and persistently cache enough
+ * random data to generate up to 128 random UUIDs. To generate a UUID
+ * without using the cache, set `disableEntropyCache` to `true`.
+ *
+ * @default `false`
+ */
+ disableEntropyCache?: boolean | undefined;
+ }
+ /**
+ * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
+ * cryptographic pseudorandom number generator.
+ * @since v15.6.0, v14.17.0
+ */
+ function randomUUID(options?: RandomUUIDOptions): string;
+ interface X509CheckOptions {
+ /**
+ * @default 'always'
+ */
+ subject: 'always' | 'never';
+ /**
+ * @default true
+ */
+ wildcards: boolean;
+ /**
+ * @default true
+ */
+ partialWildcards: boolean;
+ /**
+ * @default false
+ */
+ multiLabelWildcards: boolean;
+ /**
+ * @default false
+ */
+ singleLabelSubdomains: boolean;
+ }
+ /**
+ * Encapsulates an X509 certificate and provides read-only access to
+ * its information.
+ *
+ * ```js
+ * const { X509Certificate } = await import('crypto');
+ *
+ * const x509 = new X509Certificate('{... pem encoded cert ...}');
+ *
+ * console.log(x509.subject);
+ * ```
+ * @since v15.6.0
+ */
+ class X509Certificate {
+ /**
+ * Will be \`true\` if this is a Certificate Authority (CA) certificate.
+ * @since v15.6.0
+ */
+ readonly ca: boolean;
+ /**
+ * The SHA-1 fingerprint of this certificate.
+ *
+ * Because SHA-1 is cryptographically broken and because the security of SHA-1 is
+ * significantly worse than that of algorithms that are commonly used to sign
+ * certificates, consider using `x509.fingerprint256` instead.
+ * @since v15.6.0
+ */
+ readonly fingerprint: string;
+ /**
+ * The SHA-256 fingerprint of this certificate.
+ * @since v15.6.0
+ */
+ readonly fingerprint256: string;
+ /**
+ * The SHA-512 fingerprint of this certificate.
+ * @since v16.14.0
+ */
+ readonly fingerprint512: string;
+ /**
+ * The complete subject of this certificate.
+ * @since v15.6.0
+ */
+ readonly subject: string;
+ /**
+ * The subject alternative name specified for this certificate or `undefined`
+ * if not available.
+ * @since v15.6.0
+ */
+ readonly subjectAltName: string | undefined;
+ /**
+ * The information access content of this certificate or `undefined` if not
+ * available.
+ * @since v15.6.0
+ */
+ readonly infoAccess: string | undefined;
+ /**
+ * An array detailing the key usages for this certificate.
+ * @since v15.6.0
+ */
+ readonly keyUsage: string[];
+ /**
+ * The issuer identification included in this certificate.
+ * @since v15.6.0
+ */
+ readonly issuer: string;
+ /**
+ * The issuer certificate or `undefined` if the issuer certificate is not
+ * available.
+ * @since v15.9.0
+ */
+ readonly issuerCertificate?: X509Certificate | undefined;
+ /**
+ * The public key `KeyObject` for this certificate.
+ * @since v15.6.0
+ */
+ readonly publicKey: KeyObject;
+ /**
+ * A `Buffer` containing the DER encoding of this certificate.
+ * @since v15.6.0
+ */
+ readonly raw: Buffer;
+ /**
+ * The serial number of this certificate.
+ *
+ * Serial numbers are assigned by certificate authorities and do not uniquely
+ * identify certificates. Consider using `x509.fingerprint256` as a unique
+ * identifier instead.
+ * @since v15.6.0
+ */
+ readonly serialNumber: string;
+ /**
+ * The date/time from which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validFrom: string;
+ /**
+ * The date/time until which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validTo: string;
+ constructor(buffer: BinaryLike);
+ /**
+ * Checks whether the certificate matches the given email address.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any email addresses.
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching email
+ * address, the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns `email` if the certificate matches, `undefined` if it does not.
+ */
+ checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
+ /**
+ * Checks whether the certificate matches the given host name.
+ *
+ * If the certificate matches the given host name, the matching subject name is
+ * returned. The returned name might be an exact match (e.g., `foo.example.com`)
+ * or it might contain wildcards (e.g., `*.example.com`). Because host name
+ * comparisons are case-insensitive, the returned subject name might also differ
+ * from the given `name` in capitalization.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching DNS name,
+ * the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
+ */
+ checkHost(name: string, options?: X509CheckOptions): string | undefined;
+ /**
+ * Checks whether the certificate matches the given IP address (IPv4 or IPv6).
+ *
+ * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
+ * must match the given `ip` address exactly. Other subject alternative names as
+ * well as the subject field of the certificate are ignored.
+ * @since v15.6.0
+ * @return Returns `ip` if the certificate matches, `undefined` if it does not.
+ */
+ checkIP(ip: string): string | undefined;
+ /**
+ * Checks whether this certificate was issued by the given `otherCert`.
+ * @since v15.6.0
+ */
+ checkIssued(otherCert: X509Certificate): boolean;
+ /**
+ * Checks whether the public key for this certificate is consistent with
+ * the given private key.
+ * @since v15.6.0
+ * @param privateKey A private key.
+ */
+ checkPrivateKey(privateKey: KeyObject): boolean;
+ /**
+ * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded
+ * certificate.
+ * @since v15.6.0
+ */
+ toJSON(): string;
+ /**
+ * Returns information about this certificate using the legacy `certificate object` encoding.
+ * @since v15.6.0
+ */
+ toLegacyObject(): PeerCertificate;
+ /**
+ * Returns the PEM-encoded certificate.
+ * @since v15.6.0
+ */
+ toString(): string;
+ /**
+ * Verifies that this certificate was signed by the given public key.
+ * Does not perform any other validation checks on the certificate.
+ * @since v15.6.0
+ * @param publicKey A public key.
+ */
+ verify(publicKey: KeyObject): boolean;
+ }
+ type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
+ interface GeneratePrimeOptions {
+ add?: LargeNumberLike | undefined;
+ rem?: LargeNumberLike | undefined;
+ /**
+ * @default false
+ */
+ safe?: boolean | undefined;
+ bigint?: boolean | undefined;
+ }
+ interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
+ bigint: true;
+ }
+ interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
+ bigint?: false | undefined;
+ }
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void;
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrimeSync(size: number): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint;
+ interface CheckPrimeOptions {
+ /**
+ * The number of Miller-Rabin probabilistic primality iterations to perform.
+ * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most 2-64 for random input.
+ * Care must be used when selecting a number of checks.
+ * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details.
+ *
+ * @default 0
+ */
+ checks?: number | undefined;
+ }
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ */
+ function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
+ function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void;
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
+ */
+ function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
+ /**
+ * Load and set the `engine` for some or all OpenSSL functions (selected by flags).
+ *
+ * `engine` could be either an id or a path to the engine's shared library.
+ *
+ * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default.
+ * The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`):
+ *
+ * - `crypto.constants.ENGINE_METHOD_RSA`
+ * - `crypto.constants.ENGINE_METHOD_DSA`
+ * - `crypto.constants.ENGINE_METHOD_DH`
+ * - `crypto.constants.ENGINE_METHOD_RAND`
+ * - `crypto.constants.ENGINE_METHOD_EC`
+ * - `crypto.constants.ENGINE_METHOD_CIPHERS`
+ * - `crypto.constants.ENGINE_METHOD_DIGESTS`
+ * - `crypto.constants.ENGINE_METHOD_PKEY_METHS`
+ * - `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS`
+ * - `crypto.constants.ENGINE_METHOD_ALL`
+ * - `crypto.constants.ENGINE_METHOD_NONE`
+ *
+ * The flags below are deprecated in OpenSSL-1.1.0.
+ *
+ * - `crypto.constants.ENGINE_METHOD_ECDH`
+ * - `crypto.constants.ENGINE_METHOD_ECDSA`
+ * - `crypto.constants.ENGINE_METHOD_STORE`
+ * @since v0.11.11
+ * @param [flags=crypto.constants.ENGINE_METHOD_ALL]
+ */
+ function setEngine(engine: string, flags?: number): void;
+ /**
+ * A convenient alias for `crypto.webcrypto.getRandomValues()`.
+ * This implementation is not compliant with the Web Crypto spec,
+ * to write web-compatible code use `crypto.webcrypto.getRandomValues()` instead.
+ * @since v17.4.0
+ * @returns Returns `typedArray`.
+ */
+ function getRandomValues<T extends webcrypto.BufferSource>(typedArray: T): T;
+ /**
+ * A convenient alias for `crypto.webcrypto.subtle`.
+ * @since v17.4.0
+ */
+ const subtle: webcrypto.SubtleCrypto;
+ /**
+ * An implementation of the Web Crypto API standard.
+ *
+ * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details.
+ * @since v15.0.0
+ */
+ const webcrypto: webcrypto.Crypto;
+ namespace webcrypto {
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki';
+ type KeyType = 'private' | 'public' | 'secret';
+ type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey';
+ type AlgorithmIdentifier = Algorithm | string;
+ type HashAlgorithmIdentifier = AlgorithmIdentifier;
+ type NamedCurve = string;
+ type BigInteger = Uint8Array;
+ interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+ }
+ interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+ }
+ interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+ }
+ interface AesGcmParams extends Algorithm {
+ additionalData?: BufferSource;
+ iv: BufferSource;
+ tagLength?: number;
+ }
+ interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+ }
+ interface AesKeyGenParams extends Algorithm {
+ length: number;
+ }
+ interface Algorithm {
+ name: string;
+ }
+ interface EcKeyAlgorithm extends KeyAlgorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+ }
+ interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface Ed448Params extends Algorithm {
+ context?: BufferSource;
+ }
+ interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: BufferSource;
+ salt: BufferSource;
+ }
+ interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: KeyAlgorithm;
+ length: number;
+ }
+ interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+ }
+ interface KeyAlgorithm {
+ name: string;
+ }
+ interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: BufferSource;
+ }
+ interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: KeyAlgorithm;
+ }
+ interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+ }
+ interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+ }
+ interface RsaPssParams extends Algorithm {
+ saltLength: number;
+ }
+ /**
+ * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class.
+ * `Crypto` is a singleton that provides access to the remainder of the crypto API.
+ * @since v15.0.0
+ */
+ interface Crypto {
+ /**
+ * Provides access to the `SubtleCrypto` API.
+ * @since v15.0.0
+ */
+ readonly subtle: SubtleCrypto;
+ /**
+ * Generates cryptographically strong random values.
+ * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned.
+ *
+ * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted.
+ *
+ * An error will be thrown if the given `typedArray` is larger than 65,536 bytes.
+ * @since v15.0.0
+ */
+ getRandomValues<T extends Exclude<NodeJS.TypedArray, Float32Array | Float64Array>>(typedArray: T): T;
+ /**
+ * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID.
+ * The UUID is generated using a cryptographic pseudorandom number generator.
+ * @since v16.7.0
+ */
+ randomUUID(): string;
+ CryptoKey: CryptoKeyConstructor;
+ }
+ // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
+ interface CryptoKeyConstructor {
+ /** Illegal constructor */
+ (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
+ readonly length: 0;
+ readonly name: 'CryptoKey';
+ readonly prototype: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface CryptoKey {
+ /**
+ * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters.
+ * @since v15.0.0
+ */
+ readonly algorithm: KeyAlgorithm;
+ /**
+ * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`.
+ * @since v15.0.0
+ */
+ readonly extractable: boolean;
+ /**
+ * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key.
+ * @since v15.0.0
+ */
+ readonly type: KeyType;
+ /**
+ * An array of strings identifying the operations for which the key may be used.
+ *
+ * The possible usages are:
+ * - `'encrypt'` - The key may be used to encrypt data.
+ * - `'decrypt'` - The key may be used to decrypt data.
+ * - `'sign'` - The key may be used to generate digital signatures.
+ * - `'verify'` - The key may be used to verify digital signatures.
+ * - `'deriveKey'` - The key may be used to derive a new key.
+ * - `'deriveBits'` - The key may be used to derive bits.
+ * - `'wrapKey'` - The key may be used to wrap another key.
+ * - `'unwrapKey'` - The key may be used to unwrap another key.
+ *
+ * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`).
+ * @since v15.0.0
+ */
+ readonly usages: KeyUsage[];
+ }
+ /**
+ * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair.
+ * @since v15.0.0
+ */
+ interface CryptoKeyPair {
+ /**
+ * A {@link CryptoKey} whose type will be `'private'`.
+ * @since v15.0.0
+ */
+ privateKey: CryptoKey;
+ /**
+ * A {@link CryptoKey} whose type will be `'public'`.
+ * @since v15.0.0
+ */
+ publicKey: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface SubtleCrypto {
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `key`,
+ * `subtle.decrypt()` attempts to decipher the provided `data`. If successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the plaintext result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
+ * `subtle.deriveBits()` attempts to generate `length` bits.
+ * The Node.js implementation requires that `length` is a multiple of `8`.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the generated data.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @since v15.0.0
+ */
+ deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
+ * `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
+ *
+ * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material,
+ * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ deriveKey(
+ algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
+ baseKey: CryptoKey,
+ derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`.
+ * If successful, the returned promise is resolved with an `<ArrayBuffer>` containing the computed digest.
+ *
+ * If `algorithm` is provided as a `<string>`, it must be one of:
+ *
+ * - `'SHA-1'`
+ * - `'SHA-256'`
+ * - `'SHA-384'`
+ * - `'SHA-512'`
+ *
+ * If `algorithm` is provided as an `<Object>`, it must have a `name` property whose value is one of the above.
+ * @since v15.0.0
+ */
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified by `algorithm` and the keying material provided by `key`,
+ * `subtle.encrypt()` attempts to encipher `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the encrypted result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Exports the given key into the specified format, if supported.
+ *
+ * If the `<CryptoKey>` is not extractable, the returned promise will reject.
+ *
+ * When `format` is either `'pkcs8'` or `'spki'` and the export is successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the exported key data.
+ *
+ * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a
+ * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @returns `<Promise>` containing `<ArrayBuffer>`.
+ * @since v15.0.0
+ */
+ exportKey(format: 'jwk', key: CryptoKey): Promise<JsonWebKey>;
+ exportKey(format: Exclude<KeyFormat, 'jwk'>, key: CryptoKey): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters provided in `algorithm`,
+ * `subtle.generateKey()` attempts to generate new keying material.
+ * Depending the method used, the method may generate either a single `<CryptoKey>` or a `<CryptoKeyPair>`.
+ *
+ * The `<CryptoKeyPair>` (public and private key) generating algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * The `<CryptoKey>` (secret key) generating algorithms supported include:
+ *
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
+ /**
+ * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
+ * to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
+ * If the import is successful, the returned promise will be resolved with the created `<CryptoKey>`.
+ *
+ * If importing a `'PBKDF2'` key, `extractable` must be `false`.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ importKey(
+ format: 'jwk',
+ keyData: JsonWebKey,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ importKey(
+ format: Exclude<KeyFormat, 'jwk'>,
+ keyData: BufferSource,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given by `algorithm` and the keying material provided by `key`,
+ * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the generated signature.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
+ * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input)
+ * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs.
+ * If successful, the returned promise is resolved with a `<CryptoKey>` object.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ *
+ * The unwrapped key algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ unwrapKey(
+ format: KeyFormat,
+ wrappedKey: BufferSource,
+ unwrappingKey: CryptoKey,
+ unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
+ unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given in `algorithm` and the keying material provided by `key`,
+ * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`.
+ * The returned promise is resolved with either `true` or `false`.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
+ * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`.
+ * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments,
+ * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the encrypted key data.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @since v15.0.0
+ */
+ wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
+ }
+ }
+}
+declare module 'node:crypto' {
+ export * from 'crypto';
+}
diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts
new file mode 100755
index 0000000..247328d
--- /dev/null
+++ b/node_modules/@types/node/dgram.d.ts
@@ -0,0 +1,545 @@
+/**
+ * The `dgram` module provides an implementation of UDP datagram sockets.
+ *
+ * ```js
+ * import dgram from 'dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.log(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js)
+ */
+declare module 'dgram' {
+ import { AddressInfo } from 'node:net';
+ import * as dns from 'node:dns';
+ import { EventEmitter, Abortable } from 'node:events';
+ interface RemoteInfo {
+ address: string;
+ family: 'IPv4' | 'IPv6';
+ port: number;
+ size: number;
+ }
+ interface BindOptions {
+ port?: number | undefined;
+ address?: string | undefined;
+ exclusive?: boolean | undefined;
+ fd?: number | undefined;
+ }
+ type SocketType = 'udp4' | 'udp6';
+ interface SocketOptions extends Abortable {
+ type: SocketType;
+ reuseAddr?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ recvBufferSize?: number | undefined;
+ sendBufferSize?: number | undefined;
+ lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
+ }
+ /**
+ * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
+ * messages. When `address` and `port` are not passed to `socket.bind()` the
+ * method will bind the socket to the "all interfaces" address on a random port
+ * (it does the right thing for both `udp4` and `udp6` sockets). The bound address
+ * and port can be retrieved using `socket.address().address` and `socket.address().port`.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const server = dgram.createSocket({ type: 'udp4', signal });
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ * // Later, when you want to close the server.
+ * controller.abort();
+ * ```
+ * @since v0.11.13
+ * @param options Available options are:
+ * @param callback Attached as a listener for `'message'` events. Optional.
+ */
+ function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ /**
+ * Encapsulates the datagram functionality.
+ *
+ * New instances of `dgram.Socket` are created using {@link createSocket}.
+ * The `new` keyword is not to be used to create `dgram.Socket` instances.
+ * @since v0.1.99
+ */
+ class Socket extends EventEmitter {
+ /**
+ * Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not
+ * specified, the operating system will choose
+ * one interface and will add membership to it. To add membership to every
+ * available interface, call `addMembership` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ *
+ * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur:
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import dgram from 'dgram';
+ *
+ * if (cluster.isPrimary) {
+ * cluster.fork(); // Works ok.
+ * cluster.fork(); // Fails with EADDRINUSE.
+ * } else {
+ * const s = dgram.createSocket('udp4');
+ * s.bind(1234, () => {
+ * s.addMembership('224.0.0.114');
+ * });
+ * }
+ * ```
+ * @since v0.6.9
+ */
+ addMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * Returns an object containing the address information for a socket.
+ * For UDP sockets, this object will contain `address`, `family` and `port`properties.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.99
+ */
+ address(): AddressInfo;
+ /**
+ * For UDP sockets, causes the `dgram.Socket` to listen for datagram
+ * messages on a named `port` and optional `address`. If `port` is not
+ * specified or is `0`, the operating system will attempt to bind to a
+ * random port. If `address` is not specified, the operating system will
+ * attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is
+ * called.
+ *
+ * Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very
+ * useful.
+ *
+ * A bound datagram socket keeps the Node.js process running to receive
+ * datagram messages.
+ *
+ * If binding fails, an `'error'` event is generated. In rare case (e.g.
+ * attempting to bind with a closed socket), an `Error` may be thrown.
+ *
+ * Example of a UDP server listening on port 41234:
+ *
+ * ```js
+ * import dgram from 'dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.log(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @since v0.1.99
+ * @param callback with no parameters. Called when binding is complete.
+ */
+ bind(port?: number, address?: string, callback?: () => void): this;
+ bind(port?: number, callback?: () => void): this;
+ bind(callback?: () => void): this;
+ bind(options: BindOptions, callback?: () => void): this;
+ /**
+ * Close the underlying socket and stop listening for data on it. If a callback is
+ * provided, it is added as a listener for the `'close'` event.
+ * @since v0.1.99
+ * @param callback Called when the socket has been closed.
+ */
+ close(callback?: () => void): this;
+ /**
+ * Associates the `dgram.Socket` to a remote address and port. Every
+ * message sent by this handle is automatically sent to that destination. Also,
+ * the socket will only receive messages from that remote peer.
+ * Trying to call `connect()` on an already connected socket will result
+ * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not
+ * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets)
+ * will be used by default. Once the connection is complete, a `'connect'` event
+ * is emitted and the optional `callback` function is called. In case of failure,
+ * the `callback` is called or, failing this, an `'error'` event is emitted.
+ * @since v12.0.0
+ * @param callback Called when the connection is completed or on error.
+ */
+ connect(port: number, address?: string, callback?: () => void): void;
+ connect(port: number, callback: () => void): void;
+ /**
+ * A synchronous function that disassociates a connected `dgram.Socket` from
+ * its remote address. Trying to call `disconnect()` on an unbound or already
+ * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception.
+ * @since v12.0.0
+ */
+ disconnect(): void;
+ /**
+ * Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
+ * kernel when the socket is closed or the process terminates, so most apps will
+ * never have reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v0.6.9
+ */
+ dropMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_RCVBUF` socket receive buffer size in bytes.
+ */
+ getRecvBufferSize(): number;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_SNDBUF` socket send buffer size in bytes.
+ */
+ getSendBufferSize(): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active. The `socket.ref()` method adds the socket back to the reference
+ * counting and restores the default behavior.
+ *
+ * Calling `socket.ref()` multiples times will have no additional effect.
+ *
+ * The `socket.ref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Returns an object containing the `address`, `family`, and `port` of the remote
+ * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception
+ * if the socket is not connected.
+ * @since v12.0.0
+ */
+ remoteAddress(): AddressInfo;
+ /**
+ * Broadcasts a datagram on the socket.
+ * For connectionless sockets, the destination `port` and `address` must be
+ * specified. Connected sockets, on the other hand, will use their associated
+ * remote endpoint, so the `port` and `address` arguments must not be set.
+ *
+ * The `msg` argument contains the message to be sent.
+ * Depending on its type, different behavior can apply. If `msg` is a `Buffer`,
+ * any `TypedArray` or a `DataView`,
+ * the `offset` and `length` specify the offset within the `Buffer` where the
+ * message begins and the number of bytes in the message, respectively.
+ * If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that
+ * contain multi-byte characters, `offset` and `length` will be calculated with
+ * respect to `byte length` and not the character position.
+ * If `msg` is an array, `offset` and `length` must not be specified.
+ *
+ * The `address` argument is a string. If the value of `address` is a host name,
+ * DNS will be used to resolve the address of the host. If `address` is not
+ * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
+ *
+ * If the socket has not been previously bound with a call to `bind`, the socket
+ * is assigned a random port number and is bound to the "all interfaces" address
+ * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
+ *
+ * An optional `callback` function may be specified to as a way of reporting
+ * DNS errors or for determining when it is safe to reuse the `buf` object.
+ * DNS lookups delay the time to send for at least one tick of the
+ * Node.js event loop.
+ *
+ * The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be
+ * passed as the first argument to the `callback`. If a `callback` is not given,
+ * the error is emitted as an `'error'` event on the `socket` object.
+ *
+ * Offset and length are optional but both _must_ be set if either are used.
+ * They are supported only when the first argument is a `Buffer`, a `TypedArray`,
+ * or a `DataView`.
+ *
+ * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
+ *
+ * Example of sending a UDP packet to a port on `localhost`;
+ *
+ * ```js
+ * import dgram from 'dgram';
+ * import { Buffer } from 'buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send(message, 41234, 'localhost', (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`;
+ *
+ * ```js
+ * import dgram from 'dgram';
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('Some ');
+ * const buf2 = Buffer.from('bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send([buf1, buf2], 41234, (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Sending multiple buffers might be faster or slower depending on the
+ * application and operating system. Run benchmarks to
+ * determine the optimal strategy on a case-by-case basis. Generally speaking,
+ * however, sending multiple buffers is faster.
+ *
+ * Example of sending a UDP packet using a socket connected to a port on`localhost`:
+ *
+ * ```js
+ * import dgram from 'dgram';
+ * import { Buffer } from 'buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.connect(41234, 'localhost', (err) => {
+ * client.send(message, (err) => {
+ * client.close();
+ * });
+ * });
+ * ```
+ * @since v0.1.99
+ * @param msg Message to be sent.
+ * @param offset Offset in the buffer where the message starts.
+ * @param length Number of bytes in the message.
+ * @param port Destination port.
+ * @param address Destination host name or IP address.
+ * @param callback Called when the message has been sent.
+ */
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
+ /**
+ * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
+ * packets may be sent to a local interface's broadcast address.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.6.9
+ */
+ setBroadcast(flag: boolean): void;
+ /**
+ * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
+ * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
+ * _with a scope index is written as `'IP%scope'` where scope is an interface name_
+ * _or interface number._
+ *
+ * Sets the default outgoing multicast interface of the socket to a chosen
+ * interface or back to system interface selection. The `multicastInterface` must
+ * be a valid string representation of an IP from the socket's family.
+ *
+ * For IPv4 sockets, this should be the IP configured for the desired physical
+ * interface. All packets sent to multicast on the socket will be sent on the
+ * interface determined by the most recent successful use of this call.
+ *
+ * For IPv6 sockets, `multicastInterface` should include a scope to indicate the
+ * interface as in the examples that follow. In IPv6, individual `send` calls can
+ * also use explicit scope in addresses, so only packets sent to a multicast
+ * address without specifying an explicit scope are affected by the most recent
+ * successful use of this call.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ *
+ * #### Example: IPv6 outgoing multicast interface
+ *
+ * On most systems, where scope format uses the interface name:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%eth1');
+ * });
+ * ```
+ *
+ * On Windows, where scope format uses an interface number:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%2');
+ * });
+ * ```
+ *
+ * #### Example: IPv4 outgoing multicast interface
+ *
+ * All systems use an IP of the host on the desired physical interface:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp4');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('10.0.0.2');
+ * });
+ * ```
+ * @since v8.6.0
+ */
+ setMulticastInterface(multicastInterface: string): void;
+ /**
+ * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
+ * multicast packets will also be received on the local interface.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastLoopback(flag: boolean): boolean;
+ /**
+ * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
+ * "Time to Live", in this context it specifies the number of IP hops that a
+ * packet is allowed to travel through, specifically for multicast traffic. Each
+ * router or gateway that forwards a packet decrements the TTL. If the TTL is
+ * decremented to 0 by a router, it will not be forwarded.
+ *
+ * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastTTL(ttl: number): number;
+ /**
+ * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setRecvBufferSize(size: number): void;
+ /**
+ * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setSendBufferSize(size: number): void;
+ /**
+ * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
+ * in this context it specifies the number of IP hops that a packet is allowed to
+ * travel through. Each router or gateway that forwards a packet decrements the
+ * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
+ * Changing TTL values is typically done for network probes or when multicasting.
+ *
+ * The `ttl` argument may be between 1 and 255\. The default on most systems
+ * is 64.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.101
+ */
+ setTTL(ttl: number): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active, allowing the process to exit even if the socket is still
+ * listening.
+ *
+ * Calling `socket.unref()` multiple times will have no addition effect.
+ *
+ * The `socket.unref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket
+ * option. If the `multicastInterface` argument
+ * is not specified, the operating system will choose one interface and will add
+ * membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is
+ * automatically called by the kernel when the
+ * socket is closed or the process terminates, so most apps will never have
+ * reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. error
+ * 4. listening
+ * 5. message
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ }
+}
+declare module 'node:dgram' {
+ export * from 'dgram';
+}
diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts
new file mode 100755
index 0000000..a87ba8c
--- /dev/null
+++ b/node_modules/@types/node/diagnostics_channel.d.ts
@@ -0,0 +1,153 @@
+/**
+ * The `diagnostics_channel` module provides an API to create named channels
+ * to report arbitrary message data for diagnostics purposes.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ * ```
+ *
+ * It is intended that a module writer wanting to report diagnostics messages
+ * will create one or many top-level channels to report messages through.
+ * Channels may also be acquired at runtime but it is not encouraged
+ * due to the additional overhead of doing so. Channels may be exported for
+ * convenience, but as long as the name is known it can be acquired anywhere.
+ *
+ * If you intend for your module to produce diagnostics data for others to
+ * consume it is recommended that you include documentation of what named
+ * channels are used along with the shape of the message data. Channel names
+ * should generally include the module name to avoid collisions with data from
+ * other modules.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
+ */
+declare module 'diagnostics_channel' {
+ /**
+ * Check if there are active subscribers to the named channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * if (diagnostics_channel.hasSubscribers('my-channel')) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return If there are active subscribers
+ */
+ function hasSubscribers(name: string): boolean;
+ /**
+ * This is the primary entry-point for anyone wanting to interact with a named
+ * channel. It produces a channel object which is optimized to reduce overhead at
+ * publish time as much as possible.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return The named channel object
+ */
+ function channel(name: string): Channel;
+ type ChannelListener = (message: unknown, name: string) => void;
+ /**
+ * The class `Channel` represents an individual named channel within the data
+ * pipeline. It is use to track subscribers and to publish messages when there
+ * are subscribers present. It exists as a separate object to avoid channel
+ * lookups at publish time, enabling very fast publish speeds and allowing
+ * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
+ * with `new Channel(name)` is not supported.
+ * @since v15.1.0, v14.17.0
+ */
+ class Channel {
+ readonly name: string;
+ /**
+ * Check if there are active subscribers to this channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * if (channel.hasSubscribers) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ */
+ readonly hasSubscribers: boolean;
+ private constructor(name: string);
+ /**
+ * Publish a message to any subscribers to the channel. This will
+ * trigger message handlers synchronously so they will execute within
+ * the same context.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.publish({
+ * some: 'message'
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param message The message to send to the channel subscribers
+ */
+ publish(message: unknown): void;
+ /**
+ * Register a message handler to subscribe to this channel. This message handler
+ * will be run synchronously whenever a message is published to the channel. Any
+ * errors thrown in the message handler will trigger an `'uncaughtException'`.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.subscribe((message, name) => {
+ * // Received data
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param onMessage The handler to receive channel messages
+ */
+ subscribe(onMessage: ChannelListener): void;
+ /**
+ * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * function onMessage(message, name) {
+ * // Received data
+ * }
+ *
+ * channel.subscribe(onMessage);
+ *
+ * channel.unsubscribe(onMessage);
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param onMessage The previous subscribed handler to remove
+ * @return `true` if the handler was found, `false` otherwise.
+ */
+ unsubscribe(onMessage: ChannelListener): void;
+ }
+}
+declare module 'node:diagnostics_channel' {
+ export * from 'diagnostics_channel';
+}
diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts
new file mode 100755
index 0000000..305367b
--- /dev/null
+++ b/node_modules/@types/node/dns.d.ts
@@ -0,0 +1,659 @@
+/**
+ * The `dns` module enables name resolution. For example, use it to look up IP
+ * addresses of host names.
+ *
+ * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
+ * DNS protocol for lookups. {@link lookup} uses the operating system
+ * facilities to perform name resolution. It may not need to perform any network
+ * communication. To perform name resolution the way other applications on the same
+ * system do, use {@link lookup}.
+ *
+ * ```js
+ * const dns = require('dns');
+ *
+ * dns.lookup('example.org', (err, address, family) => {
+ * console.log('address: %j family: IPv%s', address, family);
+ * });
+ * // address: "93.184.216.34" family: IPv4
+ * ```
+ *
+ * All other functions in the `dns` module connect to an actual DNS server to
+ * perform name resolution. They will always use the network to perform DNS
+ * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
+ * DNS queries, bypassing other name-resolution facilities.
+ *
+ * ```js
+ * const dns = require('dns');
+ *
+ * dns.resolve4('archive.org', (err, addresses) => {
+ * if (err) throw err;
+ *
+ * console.log(`addresses: ${JSON.stringify(addresses)}`);
+ *
+ * addresses.forEach((a) => {
+ * dns.reverse(a, (err, hostnames) => {
+ * if (err) {
+ * throw err;
+ * }
+ * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
+ * });
+ * });
+ * });
+ * ```
+ *
+ * See the `Implementation considerations section` for more information.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js)
+ */
+declare module 'dns' {
+ import * as dnsPromises from 'node:dns/promises';
+ // Supported getaddrinfo flags.
+ export const ADDRCONFIG: number;
+ export const V4MAPPED: number;
+ /**
+ * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
+ * well as IPv4 mapped IPv6 addresses.
+ */
+ export const ALL: number;
+ export interface LookupOptions {
+ family?: number | undefined;
+ hints?: number | undefined;
+ all?: boolean | undefined;
+ /**
+ * @default true
+ */
+ verbatim?: boolean | undefined;
+ }
+ export interface LookupOneOptions extends LookupOptions {
+ all?: false | undefined;
+ }
+ export interface LookupAllOptions extends LookupOptions {
+ all: true;
+ }
+ export interface LookupAddress {
+ address: string;
+ family: number;
+ }
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
+ * and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the
+ * properties `address` and `family`.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
+ * The implementation uses an operating system facility that can associate names
+ * with addresses, and vice versa. This implementation can have subtle but
+ * important consequences on the behavior of any Node.js program. Please take some
+ * time to consult the `Implementation considerations section` before using`dns.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('dns');
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ * dns.lookup('example.com', options, (err, address, family) =>
+ * console.log('address: %j family: IPv%s', address, family));
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dns.lookup('example.com', options, (err, addresses) =>
+ * console.log('addresses: %j', addresses));
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
+ * @since v0.1.90
+ */
+ export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
+ export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
+ export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export namespace lookup {
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
+ function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ }
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On an error, `err` is an `Error` object, where `err.code` is the error code.
+ *
+ * ```js
+ * const dns = require('dns');
+ * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
+ * console.log(hostname, service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
+ * @since v0.11.14
+ */
+ export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
+ export namespace lookupService {
+ function __promisify__(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ }
+ export interface ResolveOptions {
+ ttl: boolean;
+ }
+ export interface ResolveWithTtlOptions extends ResolveOptions {
+ ttl: true;
+ }
+ export interface RecordWithTtl {
+ address: string;
+ ttl: number;
+ }
+ /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
+ export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
+ export interface AnyARecord extends RecordWithTtl {
+ type: 'A';
+ }
+ export interface AnyAaaaRecord extends RecordWithTtl {
+ type: 'AAAA';
+ }
+ export interface CaaRecord {
+ critial: number;
+ issue?: string | undefined;
+ issuewild?: string | undefined;
+ iodef?: string | undefined;
+ contactemail?: string | undefined;
+ contactphone?: string | undefined;
+ }
+ export interface MxRecord {
+ priority: number;
+ exchange: string;
+ }
+ export interface AnyMxRecord extends MxRecord {
+ type: 'MX';
+ }
+ export interface NaptrRecord {
+ flags: string;
+ service: string;
+ regexp: string;
+ replacement: string;
+ order: number;
+ preference: number;
+ }
+ export interface AnyNaptrRecord extends NaptrRecord {
+ type: 'NAPTR';
+ }
+ export interface SoaRecord {
+ nsname: string;
+ hostmaster: string;
+ serial: number;
+ refresh: number;
+ retry: number;
+ expire: number;
+ minttl: number;
+ }
+ export interface AnySoaRecord extends SoaRecord {
+ type: 'SOA';
+ }
+ export interface SrvRecord {
+ priority: number;
+ weight: number;
+ port: number;
+ name: string;
+ }
+ export interface AnySrvRecord extends SrvRecord {
+ type: 'SRV';
+ }
+ export interface AnyTxtRecord {
+ type: 'TXT';
+ entries: string[];
+ }
+ export interface AnyNsRecord {
+ type: 'NS';
+ value: string;
+ }
+ export interface AnyPtrRecord {
+ type: 'PTR';
+ value: string;
+ }
+ export interface AnyCnameRecord {
+ type: 'CNAME';
+ value: string;
+ }
+ export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
+ * records. The type and structure of individual results varies based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
+ * @since v0.1.27
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
+ export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export function resolve(
+ hostname: string,
+ rrtype: string,
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void
+ ): void;
+ export namespace resolve {
+ function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise<string[]>;
+ function __promisify__(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function __promisify__(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve4 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv6 addresses.
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve6 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
+ * @since v0.3.2
+ */
+ export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveCname {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of certification authority authorization records
+ * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
+ export namespace resolveCaa {
+ function __promisify__(hostname: string): Promise<CaaRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v0.1.27
+ */
+ export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export namespace resolveMx {
+ function __promisify__(hostname: string): Promise<MxRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
+ * objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v0.9.12
+ */
+ export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export namespace resolveNaptr {
+ function __promisify__(hostname: string): Promise<NaptrRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
+ * @since v0.1.90
+ */
+ export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveNs {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of strings containing the reply records.
+ * @since v6.0.0
+ */
+ export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolvePtr {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. The `address` argument passed to the `callback` function will
+ * be an object with the following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v0.11.10
+ */
+ export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
+ export namespace resolveSoa {
+ function __promisify__(hostname: string): Promise<SoaRecord>;
+ }
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of objects with the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v0.1.27
+ */
+ export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export namespace resolveSrv {
+ function __promisify__(hostname: string): Promise<SrvRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a
+ * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v0.1.27
+ */
+ export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export namespace resolveTxt {
+ function __promisify__(hostname: string): Promise<string[][]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * The `ret` argument passed to the `callback` function will be an array containing
+ * various types of records. Each object has a property `type` that indicates the
+ * type of the current record. And depending on the `type`, additional properties
+ * will be present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the `ret` object passed to the callback:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ *
+ * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC
+ * 8482](https://tools.ietf.org/html/rfc8482).
+ */
+ export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export namespace resolveAny {
+ function __promisify__(hostname: string): Promise<AnyRecord[]>;
+ }
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is
+ * one of the `DNS error codes`.
+ * @since v0.1.16
+ */
+ export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dns.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dns.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v0.11.3
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ export function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v0.11.3
+ */
+ export function getServers(): string[];
+ /**
+ * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `ipv4first` and {@link setDefaultResultOrder} have higher
+ * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
+ * dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ // Error codes
+ export const NODATA: string;
+ export const FORMERR: string;
+ export const SERVFAIL: string;
+ export const NOTFOUND: string;
+ export const NOTIMP: string;
+ export const REFUSED: string;
+ export const BADQUERY: string;
+ export const BADNAME: string;
+ export const BADFAMILY: string;
+ export const BADRESP: string;
+ export const CONNREFUSED: string;
+ export const TIMEOUT: string;
+ export const EOF: string;
+ export const FILE: string;
+ export const NOMEM: string;
+ export const DESTRUCTION: string;
+ export const BADSTR: string;
+ export const BADFLAGS: string;
+ export const NONAME: string;
+ export const BADHINTS: string;
+ export const NOTINITIALIZED: string;
+ export const LOADIPHLPAPI: string;
+ export const ADDRGETNETWORKPARAMS: string;
+ export const CANCELLED: string;
+ export interface ResolverOptions {
+ timeout?: number | undefined;
+ /**
+ * @default 4
+ */
+ tries?: number;
+ }
+ /**
+ * An independent resolver for DNS requests.
+ *
+ * Creating a new resolver uses the default server settings. Setting
+ * the servers used for a resolver using `resolver.setServers()` does not affect
+ * other resolvers:
+ *
+ * ```js
+ * const { Resolver } = require('dns');
+ * const resolver = new Resolver();
+ * resolver.setServers(['4.4.4.4']);
+ *
+ * // This request will use the server at 4.4.4.4, independent of global settings.
+ * resolver.resolve4('example.org', (err, addresses) => {
+ * // ...
+ * });
+ * ```
+ *
+ * The following methods from the `dns` module are available:
+ *
+ * * `resolver.getServers()`
+ * * `resolver.resolve()`
+ * * `resolver.resolve4()`
+ * * `resolver.resolve6()`
+ * * `resolver.resolveAny()`
+ * * `resolver.resolveCaa()`
+ * * `resolver.resolveCname()`
+ * * `resolver.resolveMx()`
+ * * `resolver.resolveNaptr()`
+ * * `resolver.resolveNs()`
+ * * `resolver.resolvePtr()`
+ * * `resolver.resolveSoa()`
+ * * `resolver.resolveSrv()`
+ * * `resolver.resolveTxt()`
+ * * `resolver.reverse()`
+ * * `resolver.setServers()`
+ * @since v8.3.0
+ */
+ export class Resolver {
+ constructor(options?: ResolverOptions);
+ /**
+ * Cancel all outstanding DNS queries made by this resolver. The corresponding
+ * callbacks will be called with an error with code `ECANCELLED`.
+ * @since v8.3.0
+ */
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ /**
+ * The resolver instance will send its requests from the specified IP address.
+ * This allows programs to specify outbound interfaces when used on multi-homed
+ * systems.
+ *
+ * If a v4 or v6 address is not specified, it is set to the default, and the
+ * operating system will choose a local address automatically.
+ *
+ * The resolver will use the v4 local address when making requests to IPv4 DNS
+ * servers, and the v6 local address when making requests to IPv6 DNS servers.
+ * The `rrtype` of resolution requests has no impact on the local address used.
+ * @since v15.1.0, v14.17.0
+ * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
+ * @param [ipv6='::0'] A string representation of an IPv6 address.
+ */
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+ export { dnsPromises as promises };
+}
+declare module 'node:dns' {
+ export * from 'dns';
+}
diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts
new file mode 100755
index 0000000..77cd807
--- /dev/null
+++ b/node_modules/@types/node/dns/promises.d.ts
@@ -0,0 +1,370 @@
+/**
+ * The `dns.promises` API provides an alternative set of asynchronous DNS methods
+ * that return `Promise` objects rather than using callbacks. The API is accessible
+ * via `require('dns').promises` or `require('dns/promises')`.
+ * @since v10.6.0
+ */
+declare module 'dns/promises' {
+ import {
+ LookupAddress,
+ LookupOneOptions,
+ LookupAllOptions,
+ LookupOptions,
+ AnyRecord,
+ CaaRecord,
+ MxRecord,
+ NaptrRecord,
+ SoaRecord,
+ SrvRecord,
+ ResolveWithTtlOptions,
+ RecordWithTtl,
+ ResolveOptions,
+ ResolverOptions,
+ } from 'node:dns';
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v10.6.0
+ */
+ function getServers(): string[];
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
+ * and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dnsPromises.lookup()` does not necessarily have anything to do with the DNS
+ * protocol. The implementation uses an operating system facility that can
+ * associate names with addresses, and vice versa. This implementation can have
+ * subtle but important consequences on the behavior of any Node.js program. Please
+ * take some time to consult the `Implementation considerations section` before
+ * using `dnsPromises.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('dns');
+ * const dnsPromises = dns.promises;
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ *
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('address: %j family: IPv%s', result.address, result.family);
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ * });
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('addresses: %j', result);
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookup(hostname: string, family: number): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ function lookup(hostname: string): Promise<LookupAddress>;
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ *
+ * ```js
+ * const dnsPromises = require('dns').promises;
+ * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
+ * console.log(result.hostname, result.service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookupService(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. When successful, the `Promise` is resolved with an
+ * array of resource records. The type and structure of individual results vary
+ * based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ function resolve(hostname: string): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'A'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'AAAA'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function resolve(hostname: string, rrtype: 'CAA'): Promise<CaaRecord[]>;
+ function resolve(hostname: string, rrtype: 'CNAME'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function resolve(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function resolve(hostname: string, rrtype: 'NS'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'PTR'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function resolve(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function resolve(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4
+ * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve4(hostname: string): Promise<string[]>;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6
+ * addresses.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve6(hostname: string): Promise<string[]>;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * On success, the `Promise` is resolved with an array containing various types of
+ * records. Each object has a property `type` that indicates the type of the
+ * current record. And depending on the `type`, additional properties will be
+ * present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the result object:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ * @since v10.6.0
+ */
+ function resolveAny(hostname: string): Promise<AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of objects containing available
+ * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ function resolveCaa(hostname: string): Promise<CaaRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of canonical name records available for
+ * the `hostname` (e.g. `['bar.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveCname(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects
+ * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v10.6.0
+ */
+ function resolveMx(hostname: string): Promise<MxRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
+ * of objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server
+ * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveNs(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings
+ * containing the reply records.
+ * @since v10.6.0
+ */
+ function resolvePtr(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. On success, the `Promise` is resolved with an object with the
+ * following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSoa(hostname: string): Promise<SoaRecord>;
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with
+ * the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSrv(hostname: string): Promise<SrvRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array
+ * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v10.6.0
+ */
+ function resolveTxt(hostname: string): Promise<string[][]>;
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ */
+ function reverse(ip: string): Promise<string[]>;
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dnsPromises.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dnsPromises.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v10.6.0
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have
+ * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the
+ * default dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ class Resolver {
+ constructor(options?: ResolverOptions);
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+}
+declare module 'node:dns/promises' {
+ export * from 'dns/promises';
+}
diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts
new file mode 100755
index 0000000..fafe68a
--- /dev/null
+++ b/node_modules/@types/node/domain.d.ts
@@ -0,0 +1,170 @@
+/**
+ * **This module is pending deprecation.** Once a replacement API has been
+ * finalized, this module will be fully deprecated. Most developers should
+ * **not** have cause to use this module. Users who absolutely must have
+ * the functionality that domains provide may rely on it for the time being
+ * but should expect to have to migrate to a different solution
+ * in the future.
+ *
+ * Domains provide a way to handle multiple different IO operations as a
+ * single group. If any of the event emitters or callbacks registered to a
+ * domain emit an `'error'` event, or throw an error, then the domain object
+ * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
+ * exit immediately with an error code.
+ * @deprecated Since v1.4.2 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js)
+ */
+declare module 'domain' {
+ import EventEmitter = require('node:events');
+ /**
+ * The `Domain` class encapsulates the functionality of routing errors and
+ * uncaught exceptions to the active `Domain` object.
+ *
+ * To handle the errors that it catches, listen to its `'error'` event.
+ */
+ class Domain extends EventEmitter {
+ /**
+ * An array of timers and event emitters that have been explicitly added
+ * to the domain.
+ */
+ members: Array<EventEmitter | NodeJS.Timer>;
+ /**
+ * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly
+ * pushes the domain onto the domain
+ * stack managed by the domain module (see {@link exit} for details on the
+ * domain stack). The call to `enter()` delimits the beginning of a chain of
+ * asynchronous calls and I/O operations bound to a domain.
+ *
+ * Calling `enter()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ enter(): void;
+ /**
+ * The `exit()` method exits the current domain, popping it off the domain stack.
+ * Any time execution is going to switch to the context of a different chain of
+ * asynchronous calls, it's important to ensure that the current domain is exited.
+ * The call to `exit()` delimits either the end of or an interruption to the chain
+ * of asynchronous calls and I/O operations bound to a domain.
+ *
+ * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain.
+ *
+ * Calling `exit()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ exit(): void;
+ /**
+ * Run the supplied function in the context of the domain, implicitly
+ * binding all event emitters, timers, and lowlevel requests that are
+ * created in that context. Optionally, arguments can be passed to
+ * the function.
+ *
+ * This is the most basic way to use a domain.
+ *
+ * ```js
+ * const domain = require('domain');
+ * const fs = require('fs');
+ * const d = domain.create();
+ * d.on('error', (er) => {
+ * console.error('Caught error!', er);
+ * });
+ * d.run(() => {
+ * process.nextTick(() => {
+ * setTimeout(() => { // Simulating some various async stuff
+ * fs.open('non-existent file', 'r', (er, fd) => {
+ * if (er) throw er;
+ * // proceed...
+ * });
+ * }, 100);
+ * });
+ * });
+ * ```
+ *
+ * In this example, the `d.on('error')` handler will be triggered, rather
+ * than crashing the program.
+ */
+ run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
+ /**
+ * Explicitly adds an emitter to the domain. If any event handlers called by
+ * the emitter throw an error, or if the emitter emits an `'error'` event, it
+ * will be routed to the domain's `'error'` event, just like with implicit
+ * binding.
+ *
+ * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
+ * the domain `'error'` handler.
+ *
+ * If the Timer or `EventEmitter` was already bound to a domain, it is removed
+ * from that one, and bound to this one instead.
+ * @param emitter emitter or timer to be added to the domain
+ */
+ add(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The opposite of {@link add}. Removes domain handling from the
+ * specified emitter.
+ * @param emitter emitter or timer to be removed from the domain
+ */
+ remove(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The returned function will be a wrapper around the supplied callback
+ * function. When the returned function is called, any errors that are
+ * thrown will be routed to the domain's `'error'` event.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.bind((er, data) => {
+ * // If this throws, it will also be passed to the domain.
+ * return cb(er, data ? JSON.parse(data) : null);
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The bound function
+ */
+ bind<T extends Function>(callback: T): T;
+ /**
+ * This method is almost identical to {@link bind}. However, in
+ * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
+ *
+ * In this way, the common `if (err) return callback(err);` pattern can be replaced
+ * with a single error handler in a single place.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.intercept((data) => {
+ * // Note, the first argument is never passed to the
+ * // callback since it is assumed to be the 'Error' argument
+ * // and thus intercepted by the domain.
+ *
+ * // If this throws, it will also be passed to the domain
+ * // so the error-handling logic can be moved to the 'error'
+ * // event on the domain instead of being repeated throughout
+ * // the program.
+ * return cb(null, JSON.parse(data));
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The intercepted function
+ */
+ intercept<T extends Function>(callback: T): T;
+ }
+ function create(): Domain;
+}
+declare module 'node:domain' {
+ export * from 'domain';
+}
diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts
new file mode 100755
index 0000000..b8283ac
--- /dev/null
+++ b/node_modules/@types/node/events.d.ts
@@ -0,0 +1,641 @@
+/**
+ * Much of the Node.js core API is built around an idiomatic asynchronous
+ * event-driven architecture in which certain kinds of objects (called "emitters")
+ * emit named events that cause `Function` objects ("listeners") to be called.
+ *
+ * For instance: a `net.Server` object emits an event each time a peer
+ * connects to it; a `fs.ReadStream` emits an event when the file is opened;
+ * a `stream` emits an event whenever data is available to be read.
+ *
+ * All objects that emit events are instances of the `EventEmitter` class. These
+ * objects expose an `eventEmitter.on()` function that allows one or more
+ * functions to be attached to named events emitted by the object. Typically,
+ * event names are camel-cased strings but any valid JavaScript property key
+ * can be used.
+ *
+ * When the `EventEmitter` object emits an event, all of the functions attached
+ * to that specific event are called _synchronously_. Any values returned by the
+ * called listeners are _ignored_ and discarded.
+ *
+ * The following example shows a simple `EventEmitter` instance with a single
+ * listener. The `eventEmitter.on()` method is used to register listeners, while
+ * the `eventEmitter.emit()` method is used to trigger the event.
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ *
+ * class MyEmitter extends EventEmitter {}
+ *
+ * const myEmitter = new MyEmitter();
+ * myEmitter.on('event', () => {
+ * console.log('an event occurred!');
+ * });
+ * myEmitter.emit('event');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
+ */
+declare module 'events' {
+ interface EventEmitterOptions {
+ /**
+ * Enables automatic capturing of promise rejection.
+ */
+ captureRejections?: boolean | undefined;
+ }
+ interface NodeEventTarget {
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface DOMEventTarget {
+ addEventListener(
+ eventName: string,
+ listener: (...args: any[]) => void,
+ opts?: {
+ once: boolean;
+ }
+ ): any;
+ }
+ interface StaticEventEmitterOptions {
+ signal?: AbortSignal | undefined;
+ }
+ interface EventEmitter extends NodeJS.EventEmitter {}
+ /**
+ * The `EventEmitter` class is defined and exposed by the `events` module:
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ * ```
+ *
+ * All `EventEmitter`s emit the event `'newListener'` when new listeners are
+ * added and `'removeListener'` when existing listeners are removed.
+ *
+ * It supports the following option:
+ * @since v0.1.26
+ */
+ class EventEmitter {
+ constructor(options?: EventEmitterOptions);
+ /**
+ * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
+ * event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
+ * The `Promise` will resolve with an array of all the arguments emitted to the
+ * given event.
+ *
+ * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
+ * semantics and does not listen to the `'error'` event.
+ *
+ * ```js
+ * const { once, EventEmitter } = require('events');
+ *
+ * async function run() {
+ * const ee = new EventEmitter();
+ *
+ * process.nextTick(() => {
+ * ee.emit('myevent', 42);
+ * });
+ *
+ * const [value] = await once(ee, 'myevent');
+ * console.log(value);
+ *
+ * const err = new Error('kaboom');
+ * process.nextTick(() => {
+ * ee.emit('error', err);
+ * });
+ *
+ * try {
+ * await once(ee, 'myevent');
+ * } catch (err) {
+ * console.log('error happened', err);
+ * }
+ * }
+ *
+ * run();
+ * ```
+ *
+ * The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the
+ * '`error'` event itself, then it is treated as any other kind of event without
+ * special handling:
+ *
+ * ```js
+ * const { EventEmitter, once } = require('events');
+ *
+ * const ee = new EventEmitter();
+ *
+ * once(ee, 'error')
+ * .then(([err]) => console.log('ok', err.message))
+ * .catch((err) => console.log('error', err.message));
+ *
+ * ee.emit('error', new Error('boom'));
+ *
+ * // Prints: ok boom
+ * ```
+ *
+ * An `AbortSignal` can be used to cancel waiting for the event:
+ *
+ * ```js
+ * const { EventEmitter, once } = require('events');
+ *
+ * const ee = new EventEmitter();
+ * const ac = new AbortController();
+ *
+ * async function foo(emitter, event, signal) {
+ * try {
+ * await once(emitter, event, { signal });
+ * console.log('event emitted!');
+ * } catch (error) {
+ * if (error.name === 'AbortError') {
+ * console.error('Waiting for the event was canceled!');
+ * } else {
+ * console.error('There was an error', error.message);
+ * }
+ * }
+ * }
+ *
+ * foo(ee, 'foo', ac.signal);
+ * ac.abort(); // Abort waiting for the event
+ * ee.emit('foo'); // Prints: Waiting for the event was canceled!
+ * ```
+ * @since v11.13.0, v10.16.0
+ */
+ static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
+ static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
+ /**
+ * ```js
+ * const { on, EventEmitter } = require('events');
+ *
+ * (async () => {
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo')) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * })();
+ * ```
+ *
+ * Returns an `AsyncIterator` that iterates `eventName` events. It will throw
+ * if the `EventEmitter` emits `'error'`. It removes all listeners when
+ * exiting the loop. The `value` returned by each iteration is an array
+ * composed of the emitted event arguments.
+ *
+ * An `AbortSignal` can be used to cancel waiting on events:
+ *
+ * ```js
+ * const { on, EventEmitter } = require('events');
+ * const ac = new AbortController();
+ *
+ * (async () => {
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo', { signal: ac.signal })) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * })();
+ *
+ * process.nextTick(() => ac.abort());
+ * ```
+ * @since v13.6.0, v12.16.0
+ * @param eventName The name of the event being listened for
+ * @return that iterates `eventName` events emitted by the `emitter`
+ */
+ static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
+ /**
+ * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
+ *
+ * ```js
+ * const { EventEmitter, listenerCount } = require('events');
+ * const myEmitter = new EventEmitter();
+ * myEmitter.on('event', () => {});
+ * myEmitter.on('event', () => {});
+ * console.log(listenerCount(myEmitter, 'event'));
+ * // Prints: 2
+ * ```
+ * @since v0.9.12
+ * @deprecated Since v3.2.0 - Use `listenerCount` instead.
+ * @param emitter The emitter to query
+ * @param eventName The event name
+ */
+ static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
+ * the emitter.
+ *
+ * For `EventTarget`s this is the only way to get the event listeners for the
+ * event target. This is useful for debugging and diagnostic purposes.
+ *
+ * ```js
+ * const { getEventListeners, EventEmitter } = require('events');
+ *
+ * {
+ * const ee = new EventEmitter();
+ * const listener = () => console.log('Events are fun');
+ * ee.on('foo', listener);
+ * getEventListeners(ee, 'foo'); // [listener]
+ * }
+ * {
+ * const et = new EventTarget();
+ * const listener = () => console.log('Events are fun');
+ * et.addEventListener('foo', listener);
+ * getEventListeners(et, 'foo'); // [listener]
+ * }
+ * ```
+ * @since v15.2.0, v14.17.0
+ */
+ static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
+ /**
+ * ```js
+ * const {
+ * setMaxListeners,
+ * EventEmitter
+ * } = require('events');
+ *
+ * const target = new EventTarget();
+ * const emitter = new EventEmitter();
+ *
+ * setMaxListeners(5, target, emitter);
+ * ```
+ * @since v15.4.0
+ * @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
+ * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
+ * objects.
+ */
+ static setMaxListeners(n?: number, ...eventTargets: Array<DOMEventTarget | NodeJS.EventEmitter>): void;
+ /**
+ * This symbol shall be used to install a listener for only monitoring `'error'`
+ * events. Listeners installed using this symbol are called before the regular
+ * `'error'` listeners are called.
+ *
+ * Installing a listener using this symbol does not change the behavior once an
+ * `'error'` event is emitted, therefore the process will still crash if no
+ * regular `'error'` listener is installed.
+ */
+ static readonly errorMonitor: unique symbol;
+ static readonly captureRejectionSymbol: unique symbol;
+ /**
+ * Sets or gets the default captureRejection value for all emitters.
+ */
+ // TODO: These should be described using static getter/setter pairs:
+ static captureRejections: boolean;
+ static defaultMaxListeners: number;
+ }
+ import internal = require('node:events');
+ namespace EventEmitter {
+ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
+ export { internal as EventEmitter };
+ export interface Abortable {
+ /**
+ * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
+ */
+ signal?: AbortSignal | undefined;
+ }
+ }
+ global {
+ namespace NodeJS {
+ interface EventEmitter {
+ /**
+ * Alias for `emitter.on(eventName, listener)`.
+ * @since v0.1.26
+ */
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds the `listener` function to the end of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => console.log('a'));
+ * myEE.prependListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.1.101
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName`. The
+ * next time `eventName` is triggered, this listener is removed and then invoked.
+ *
+ * ```js
+ * server.once('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * const myEE = new EventEmitter();
+ * myEE.once('foo', () => console.log('a'));
+ * myEE.prependOnceListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.3.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes the specified `listener` from the listener array for the event named`eventName`.
+ *
+ * ```js
+ * const callback = (stream) => {
+ * console.log('someone connected!');
+ * };
+ * server.on('connection', callback);
+ * // ...
+ * server.removeListener('connection', callback);
+ * ```
+ *
+ * `removeListener()` will remove, at most, one instance of a listener from the
+ * listener array. If any single listener has been added multiple times to the
+ * listener array for the specified `eventName`, then `removeListener()` must be
+ * called multiple times to remove each instance.
+ *
+ * Once an event is emitted, all listeners attached to it at the
+ * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
+ * will not remove them from`emit()` in progress. Subsequent events behave as expected.
+ *
+ * ```js
+ * const myEmitter = new MyEmitter();
+ *
+ * const callbackA = () => {
+ * console.log('A');
+ * myEmitter.removeListener('event', callbackB);
+ * };
+ *
+ * const callbackB = () => {
+ * console.log('B');
+ * };
+ *
+ * myEmitter.on('event', callbackA);
+ *
+ * myEmitter.on('event', callbackB);
+ *
+ * // callbackA removes listener callbackB but it will still be called.
+ * // Internal listener array at time of emit [callbackA, callbackB]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * // B
+ *
+ * // callbackB is now removed.
+ * // Internal listener array [callbackA]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * ```
+ *
+ * Because listeners are managed using an internal array, calling this will
+ * change the position indices of any listener registered _after_ the listener
+ * being removed. This will not impact the order in which listeners are called,
+ * but it means that any copies of the listener array as returned by
+ * the `emitter.listeners()` method will need to be recreated.
+ *
+ * When a single function has been added as a handler multiple times for a single
+ * event (as in the example below), `removeListener()` will remove the most
+ * recently added instance. In the example the `once('ping')`listener is removed:
+ *
+ * ```js
+ * const ee = new EventEmitter();
+ *
+ * function pong() {
+ * console.log('pong');
+ * }
+ *
+ * ee.on('ping', pong);
+ * ee.once('ping', pong);
+ * ee.removeListener('ping', pong);
+ *
+ * ee.emit('ping');
+ * ee.emit('ping');
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Alias for `emitter.removeListener()`.
+ * @since v10.0.0
+ */
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes all listeners, or those of the specified `eventName`.
+ *
+ * It is bad practice to remove listeners added elsewhere in the code,
+ * particularly when the `EventEmitter` instance was created by some other
+ * component or module (e.g. sockets or file streams).
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeAllListeners(event?: string | symbol): this;
+ /**
+ * By default `EventEmitter`s will print a warning if more than `10` listeners are
+ * added for a particular event. This is a useful default that helps finding
+ * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
+ * modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.3.5
+ */
+ setMaxListeners(n: number): this;
+ /**
+ * Returns the current max listener value for the `EventEmitter` which is either
+ * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}.
+ * @since v1.0.0
+ */
+ getMaxListeners(): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * console.log(util.inspect(server.listeners('connection')));
+ * // Prints: [ [Function] ]
+ * ```
+ * @since v0.1.26
+ */
+ listeners(eventName: string | symbol): Function[];
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`,
+ * including any wrappers (such as those created by `.once()`).
+ *
+ * ```js
+ * const emitter = new EventEmitter();
+ * emitter.once('log', () => console.log('log once'));
+ *
+ * // Returns a new Array with a function `onceWrapper` which has a property
+ * // `listener` which contains the original listener bound above
+ * const listeners = emitter.rawListeners('log');
+ * const logFnWrapper = listeners[0];
+ *
+ * // Logs "log once" to the console and does not unbind the `once` event
+ * logFnWrapper.listener();
+ *
+ * // Logs "log once" to the console and removes the listener
+ * logFnWrapper();
+ *
+ * emitter.on('log', () => console.log('log persistently'));
+ * // Will return a new Array with a single function bound by `.on()` above
+ * const newListeners = emitter.rawListeners('log');
+ *
+ * // Logs "log persistently" twice
+ * newListeners[0]();
+ * emitter.emit('log');
+ * ```
+ * @since v9.4.0
+ */
+ rawListeners(eventName: string | symbol): Function[];
+ /**
+ * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
+ * to each.
+ *
+ * Returns `true` if the event had listeners, `false` otherwise.
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ * const myEmitter = new EventEmitter();
+ *
+ * // First listener
+ * myEmitter.on('event', function firstListener() {
+ * console.log('Helloooo! first listener');
+ * });
+ * // Second listener
+ * myEmitter.on('event', function secondListener(arg1, arg2) {
+ * console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
+ * });
+ * // Third listener
+ * myEmitter.on('event', function thirdListener(...args) {
+ * const parameters = args.join(', ');
+ * console.log(`event with parameters ${parameters} in third listener`);
+ * });
+ *
+ * console.log(myEmitter.listeners('event'));
+ *
+ * myEmitter.emit('event', 1, 2, 3, 4, 5);
+ *
+ * // Prints:
+ * // [
+ * // [Function: firstListener],
+ * // [Function: secondListener],
+ * // [Function: thirdListener]
+ * // ]
+ * // Helloooo! first listener
+ * // event with parameters 1, 2 in second listener
+ * // event with parameters 1, 2, 3, 4, 5 in third listener
+ * ```
+ * @since v0.1.26
+ */
+ emit(eventName: string | symbol, ...args: any[]): boolean;
+ /**
+ * Returns the number of listeners listening to the event named `eventName`.
+ * @since v3.2.0
+ * @param eventName The name of the event being listened for
+ */
+ listenerCount(eventName: string | symbol): number;
+ /**
+ * Adds the `listener` function to the _beginning_ of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.prependListener('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
+ * listener is removed, and then invoked.
+ *
+ * ```js
+ * server.prependOnceListener('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Returns an array listing the events for which the emitter has registered
+ * listeners. The values in the array are strings or `Symbol`s.
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => {});
+ * myEE.on('bar', () => {});
+ *
+ * const sym = Symbol('symbol');
+ * myEE.on(sym, () => {});
+ *
+ * console.log(myEE.eventNames());
+ * // Prints: [ 'foo', 'bar', Symbol(symbol) ]
+ * ```
+ * @since v6.0.0
+ */
+ eventNames(): Array<string | symbol>;
+ }
+ }
+ }
+ export = EventEmitter;
+}
+declare module 'node:events' {
+ import events = require('events');
+ export = events;
+}
diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts
new file mode 100755
index 0000000..75c53fb
--- /dev/null
+++ b/node_modules/@types/node/fs.d.ts
@@ -0,0 +1,3872 @@
+/**
+ * The `fs` module enables interacting with the file system in a
+ * way modeled on standard POSIX functions.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as fs from 'fs/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as fs from 'fs';
+ * ```
+ *
+ * All file system operations have synchronous, callback, and promise-based
+ * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/fs.js)
+ */
+declare module 'fs' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import { URL } from 'node:url';
+ import * as promises from 'node:fs/promises';
+ export { promises };
+ /**
+ * Valid types for path values in "fs".
+ */
+ export type PathLike = string | Buffer | URL;
+ export type PathOrFileDescriptor = PathLike | number;
+ export type TimeLike = string | number | Date;
+ export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
+ export type BufferEncodingOption =
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ };
+ export interface ObjectEncodingOptions {
+ encoding?: BufferEncoding | null | undefined;
+ }
+ export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
+ export type OpenMode = number | string;
+ export type Mode = number | string;
+ export interface StatsBase<T> {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ dev: T;
+ ino: T;
+ mode: T;
+ nlink: T;
+ uid: T;
+ gid: T;
+ rdev: T;
+ size: T;
+ blksize: T;
+ blocks: T;
+ atimeMs: T;
+ mtimeMs: T;
+ ctimeMs: T;
+ birthtimeMs: T;
+ atime: Date;
+ mtime: Date;
+ ctime: Date;
+ birthtime: Date;
+ }
+ export interface Stats extends StatsBase<number> {}
+ /**
+ * A `fs.Stats` object provides information about a file.
+ *
+ * Objects returned from {@link stat}, {@link lstat} and {@link fstat} and
+ * their synchronous counterparts are of this type.
+ * If `bigint` in the `options` passed to those methods is true, the numeric values
+ * will be `bigint` instead of `number`, and the object will contain additional
+ * nanosecond-precision properties suffixed with `Ns`.
+ *
+ * ```console
+ * Stats {
+ * dev: 2114,
+ * ino: 48064969,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 85,
+ * gid: 100,
+ * rdev: 0,
+ * size: 527,
+ * blksize: 4096,
+ * blocks: 8,
+ * atimeMs: 1318289051000.1,
+ * mtimeMs: 1318289051000.1,
+ * ctimeMs: 1318289051000.1,
+ * birthtimeMs: 1318289051000.1,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ *
+ * `bigint` version:
+ *
+ * ```console
+ * BigIntStats {
+ * dev: 2114n,
+ * ino: 48064969n,
+ * mode: 33188n,
+ * nlink: 1n,
+ * uid: 85n,
+ * gid: 100n,
+ * rdev: 0n,
+ * size: 527n,
+ * blksize: 4096n,
+ * blocks: 8n,
+ * atimeMs: 1318289051000n,
+ * mtimeMs: 1318289051000n,
+ * ctimeMs: 1318289051000n,
+ * birthtimeMs: 1318289051000n,
+ * atimeNs: 1318289051000000000n,
+ * mtimeNs: 1318289051000000000n,
+ * ctimeNs: 1318289051000000000n,
+ * birthtimeNs: 1318289051000000000n,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ * @since v0.1.21
+ */
+ export class Stats {}
+ /**
+ * A representation of a directory entry, which can be a file or a subdirectory
+ * within the directory, as returned by reading from an `fs.Dir`. The
+ * directory entry is a combination of the file name and file type pairs.
+ *
+ * Additionally, when {@link readdir} or {@link readdirSync} is called with
+ * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s.
+ * @since v10.10.0
+ */
+ export class Dirent {
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a regular file.
+ * @since v10.10.0
+ */
+ isFile(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a file system
+ * directory.
+ * @since v10.10.0
+ */
+ isDirectory(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a block device.
+ * @since v10.10.0
+ */
+ isBlockDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a character device.
+ * @since v10.10.0
+ */
+ isCharacterDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a symbolic link.
+ * @since v10.10.0
+ */
+ isSymbolicLink(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a first-in-first-out
+ * (FIFO) pipe.
+ * @since v10.10.0
+ */
+ isFIFO(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a socket.
+ * @since v10.10.0
+ */
+ isSocket(): boolean;
+ /**
+ * The file name that this `fs.Dirent` object refers to. The type of this
+ * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}.
+ * @since v10.10.0
+ */
+ name: string;
+ }
+ /**
+ * A class representing a directory stream.
+ *
+ * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
+ *
+ * ```js
+ * import { opendir } from 'fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ */
+ export class Dir implements AsyncIterable<Dirent> {
+ /**
+ * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
+ * @since v12.12.0
+ */
+ readonly path: string;
+ /**
+ * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
+ */
+ [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
+ /**
+ * Asynchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ *
+ * A promise is returned that will be resolved after the resource has been
+ * closed.
+ * @since v12.12.0
+ */
+ close(): Promise<void>;
+ close(cb: NoParamCallback): void;
+ /**
+ * Synchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ * @since v12.12.0
+ */
+ closeSync(): void;
+ /**
+ * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
+ *
+ * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ * @return containing {fs.Dirent|null}
+ */
+ read(): Promise<Dirent | null>;
+ read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
+ /**
+ * Synchronously read the next directory entry as an `fs.Dirent`. See the
+ * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail.
+ *
+ * If there are no more directory entries to read, `null` will be returned.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ */
+ readSync(): Dirent | null;
+ }
+ /**
+ * Class: fs.StatWatcher
+ * @since v14.3.0, v12.20.0
+ * Extends `EventEmitter`
+ * A successful call to {@link watchFile} method will return a new fs.StatWatcher object.
+ */
+ export interface StatWatcher extends EventEmitter {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
+ * no effect.
+ *
+ * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
+ * called previously.
+ * @since v14.3.0, v12.20.0
+ */
+ ref(): this;
+ /**
+ * When called, the active `fs.StatWatcher` object will not require the Node.js
+ * event loop to remain active. If there is no other activity keeping the
+ * event loop running, the process may exit before the `fs.StatWatcher` object's
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
+ * no effect.
+ * @since v14.3.0, v12.20.0
+ */
+ unref(): this;
+ }
+ export interface FSWatcher extends EventEmitter {
+ /**
+ * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable.
+ * @since v0.5.8
+ */
+ close(): void;
+ /**
+ * events.EventEmitter
+ * 1. change
+ * 2. error
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'close', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'close', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ }
+ /**
+ * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
+ * @since v0.1.93
+ */
+ export class ReadStream extends stream.Readable {
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes that have been read so far.
+ * @since v6.4.0
+ */
+ bytesRead: number;
+ /**
+ * The path to the file the stream is reading from as specified in the first
+ * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a
+ * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0, v10.16.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * * Extends `stream.Writable`
+ *
+ * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
+ * @since v0.1.93
+ */
+ export class WriteStream extends stream.Writable {
+ /**
+ * Closes `writeStream`. Optionally accepts a
+ * callback that will be executed once the `writeStream`is closed.
+ * @since v0.9.4
+ */
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes written so far. Does not include data that is still queued
+ * for writing.
+ * @since v0.4.7
+ */
+ bytesWritten: number;
+ /**
+ * The path to the file the stream is writing to as specified in the first
+ * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a
+ * `Buffer`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * Asynchronously rename file at `oldPath` to the pathname provided
+ * as `newPath`. In the case that `newPath` already exists, it will
+ * be overwritten. If there is a directory at `newPath`, an error will
+ * be raised instead. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html).
+ *
+ * ```js
+ * import { rename } from 'fs';
+ *
+ * rename('oldFile.txt', 'newFile.txt', (err) => {
+ * if (err) throw err;
+ * console.log('Rename complete!');
+ * });
+ * ```
+ * @since v0.0.2
+ */
+ export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace rename {
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Renames the file from `oldPath` to `newPath`. Returns `undefined`.
+ *
+ * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function renameSync(oldPath: PathLike, newPath: PathLike): void;
+ /**
+ * Truncates the file. No arguments other than a possible exception are
+ * given to the completion callback. A file descriptor can also be passed as the
+ * first argument. In this case, `fs.ftruncate()` is called.
+ *
+ * ```js
+ * import { truncate } from 'fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * truncate('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was truncated');
+ * });
+ * ```
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ *
+ * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function truncate(path: PathLike, callback: NoParamCallback): void;
+ export namespace truncate {
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(path: PathLike, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file. Returns `undefined`. A file descriptor can also be
+ * passed as the first argument. In this case, `fs.ftruncateSync()` is called.
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncateSync(path: PathLike, len?: number | null): void;
+ /**
+ * Truncates the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail.
+ *
+ * If the file referred to by the file descriptor was larger than `len` bytes, only
+ * the first `len` bytes will be retained in the file.
+ *
+ * For example, the following program retains only the first four bytes of the
+ * file:
+ *
+ * ```js
+ * import { open, close, ftruncate } from 'fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('temp.txt', 'r+', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * ftruncate(fd, 4, (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * if (err) throw err;
+ * }
+ * });
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ */
+ export function ftruncate(fd: number, callback: NoParamCallback): void;
+ export namespace ftruncate {
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(fd: number, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file descriptor. Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link ftruncate}.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncateSync(fd: number, len?: number | null): void;
+ /**
+ * Asynchronously changes owner and group of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace chown {
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Synchronously changes owner and group of a file. Returns `undefined`.
+ * This is the synchronous version of {@link chown}.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Sets the owner of the file. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace fchown {
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Sets the owner of the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function fchownSync(fd: number, uid: number, gid: number): void;
+ /**
+ * Set the owner of the symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail.
+ */
+ export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace lchown {
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Set the owner for the path. Returns `undefined`.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details.
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function lchownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic
+ * link, then the link is not dereferenced: instead, the timestamps of the
+ * symbolic link itself are changed.
+ *
+ * No arguments other than a possible exception are given to the completion
+ * callback.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace lutimes {
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
+ * with the difference that if the path refers to a symbolic link, then the link is not
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Change the file system timestamps of the symbolic link referenced by `path`.
+ * Returns `undefined`, or throws an exception when parameters are incorrect or
+ * the operation fails. This is the synchronous version of {@link lutimes}.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Asynchronously changes the permissions of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ *
+ * ```js
+ * import { chmod } from 'fs';
+ *
+ * chmod('my_file.txt', 0o775, (err) => {
+ * if (err) throw err;
+ * console.log('The permissions for file "my_file.txt" have been changed!');
+ * });
+ * ```
+ * @since v0.1.30
+ */
+ export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ export namespace chmod {
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link chmod}.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ * @since v0.6.7
+ */
+ export function chmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Sets the permissions on the file. No arguments other than a possible exception
+ * are given to the completion callback.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
+ export namespace fchmod {
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(fd: number, mode: Mode): Promise<void>;
+ }
+ /**
+ * Sets the permissions on the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmodSync(fd: number, mode: Mode): void;
+ /**
+ * Changes the permissions on a symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ /** @deprecated */
+ export namespace lchmod {
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * Changes the permissions on a symbolic link. Returns `undefined`.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ *
+ * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended.
+ * Instead, user code should open/read/write the file directly and handle the
+ * error raised if the file is not available.
+ *
+ * To check if a file exists without manipulating it afterwards, {@link access} is recommended.
+ *
+ * For example, given the following directory structure:
+ *
+ * ```text
+ * - txtDir
+ * -- file.txt
+ * - app.js
+ * ```
+ *
+ * The next program will check for the stats of the given paths:
+ *
+ * ```js
+ * import { stat } from 'fs';
+ *
+ * const pathsToCheck = ['./txtDir', './txtDir/file.txt'];
+ *
+ * for (let i = 0; i < pathsToCheck.length; i++) {
+ * stat(pathsToCheck[i], (err, stats) => {
+ * console.log(stats.isDirectory());
+ * console.log(stats);
+ * });
+ * }
+ * ```
+ *
+ * The resulting output will resemble:
+ *
+ * ```console
+ * true
+ * Stats {
+ * dev: 16777220,
+ * mode: 16877,
+ * nlink: 3,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214262,
+ * size: 96,
+ * blocks: 0,
+ * atimeMs: 1561174653071.963,
+ * mtimeMs: 1561174614583.3518,
+ * ctimeMs: 1561174626623.5366,
+ * birthtimeMs: 1561174126937.2893,
+ * atime: 2019-06-22T03:37:33.072Z,
+ * mtime: 2019-06-22T03:36:54.583Z,
+ * ctime: 2019-06-22T03:37:06.624Z,
+ * birthtime: 2019-06-22T03:28:46.937Z
+ * }
+ * false
+ * Stats {
+ * dev: 16777220,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214074,
+ * size: 8,
+ * blocks: 8,
+ * atimeMs: 1561174616618.8555,
+ * mtimeMs: 1561174614584,
+ * ctimeMs: 1561174614583.8145,
+ * birthtimeMs: 1561174007710.7478,
+ * atime: 2019-06-22T03:36:56.619Z,
+ * mtime: 2019-06-22T03:36:54.584Z,
+ * ctime: 2019-06-22T03:36:54.584Z,
+ * birthtime: 2019-06-22T03:26:47.711Z
+ * }
+ * ```
+ * @since v0.0.2
+ */
+ export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function stat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function stat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace stat {
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ export interface StatSyncFn extends Function {
+ (path: PathLike, options?: undefined): Stats;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ throwIfNoEntry: false;
+ }
+ ): Stats | undefined;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ throwIfNoEntry: false;
+ }
+ ): BigIntStats | undefined;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: boolean;
+ throwIfNoEntry?: false | undefined;
+ }
+ ): Stats | BigIntStats;
+ (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined;
+ }
+ /**
+ * Synchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const statSync: StatSyncFn;
+ /**
+ * Invokes the callback with the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function fstat(
+ fd: number,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function fstat(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace fstat {
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Retrieves the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstatSync(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ export function fstatSync(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
+ /**
+ * Retrieves the `fs.Stats` for the symbolic link referred to by the path.
+ * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
+ * link, then the link itself is stat-ed, not the file that it refers to.
+ *
+ * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.
+ * @since v0.1.30
+ */
+ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function lstat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function lstat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace lstat {
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const lstatSync: StatSyncFn;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
+ * a possible
+ * exception are given to the completion callback.
+ * @since v0.1.31
+ */
+ export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace link {
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.31
+ */
+ export function linkSync(existingPath: PathLike, newPath: PathLike): void;
+ /**
+ * Creates the link called `path` pointing to `target`. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details.
+ *
+ * The `type` argument is only available on Windows and ignored on other platforms.
+ * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is
+ * not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If
+ * the `target` does not exist, `'file'` will be used. Windows junction points
+ * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path.
+ *
+ * Relative targets are relative to the link’s parent directory.
+ *
+ * ```js
+ * import { symlink } from 'fs';
+ *
+ * symlink('./mew', './mewtwo', callback);
+ * ```
+ *
+ * The above example creates a symbolic link `mewtwo` which points to `mew` in the
+ * same directory:
+ *
+ * ```bash
+ * $ tree .
+ * .
+ * ├── mew
+ * └── mewtwo -> ./mew
+ * ```
+ * @since v0.1.31
+ */
+ export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
+ export namespace symlink {
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ type Type = 'dir' | 'file' | 'junction';
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link symlink}.
+ * @since v0.1.31
+ */
+ export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. The callback gets
+ * two arguments `(err, linkString)`.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ export namespace readlink {
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the symbolic link's string value.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ /**
+ * Asynchronously computes the canonical pathname by resolving `.`, `..` and
+ * symbolic links.
+ *
+ * A canonical pathname is not necessarily unique. Hard links and bind mounts can
+ * expose a file system entity through many pathnames.
+ *
+ * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions:
+ *
+ * 1. No case conversion is performed on case-insensitive file systems.
+ * 2. The maximum number of symbolic links is platform-independent and generally
+ * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports.
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd`to resolve relative paths.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * If `path` resolves to a socket or a pipe, the function will return a system
+ * dependent name for that object.
+ * @since v0.1.31
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ export namespace realpath {
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ /**
+ * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html).
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v9.2.0
+ */
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ }
+ /**
+ * Returns the resolved pathname.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link realpath}.
+ * @since v0.1.31
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ export namespace realpathSync {
+ function native(path: PathLike, options?: EncodingOption): string;
+ function native(path: PathLike, options: BufferEncodingOption): Buffer;
+ function native(path: PathLike, options?: EncodingOption): string | Buffer;
+ }
+ /**
+ * Asynchronously removes a file or symbolic link. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * ```js
+ * import { unlink } from 'fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * unlink('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was deleted');
+ * });
+ * ```
+ *
+ * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a
+ * directory, use {@link rmdir}.
+ *
+ * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details.
+ * @since v0.0.2
+ */
+ export function unlink(path: PathLike, callback: NoParamCallback): void;
+ export namespace unlink {
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<void>;
+ }
+ /**
+ * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`.
+ * @since v0.1.21
+ */
+ export function unlinkSync(path: PathLike): void;
+ export interface RmDirOptions {
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
+ * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
+ * Use `fs.rm(path, { recursive: true, force: true })` instead.
+ *
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given
+ * to the completion callback.
+ *
+ * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on
+ * Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`.
+ * @since v0.0.2
+ */
+ export function rmdir(path: PathLike, callback: NoParamCallback): void;
+ export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
+ export namespace rmdir {
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
+ }
+ /**
+ * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`.
+ *
+ * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
+ * on Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`.
+ * @since v0.1.21
+ */
+ export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
+ export interface RmOptions {
+ /**
+ * When `true`, exceptions will be ignored if `path` does not exist.
+ * @default false
+ */
+ force?: boolean | undefined;
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm`utility). No arguments other than a possible exception are given to the
+ * completion callback.
+ * @since v14.14.0
+ */
+ export function rm(path: PathLike, callback: NoParamCallback): void;
+ export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
+ export namespace rm {
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
+ }
+ /**
+ * Synchronously removes files and directories (modeled on the standard POSIX `rm`utility). Returns `undefined`.
+ * @since v14.14.0
+ */
+ export function rmSync(path: PathLike, options?: RmOptions): void;
+ export interface MakeDirectoryOptions {
+ /**
+ * Indicates whether parent folders should be created.
+ * If a folder was created, the path to the first created folder will be returned.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
+ * @default 0o777
+ */
+ mode?: Mode | undefined;
+ }
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The callback is given a possible exception and, if `recursive` is `true`, the
+ * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was
+ * created.
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that
+ * exists results in an error only
+ * when `recursive` is false.
+ *
+ * ```js
+ * import { mkdir } from 'fs';
+ *
+ * // Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist.
+ * mkdir('/tmp/a/apple', { recursive: true }, (err) => {
+ * if (err) throw err;
+ * });
+ * ```
+ *
+ * On Windows, using `fs.mkdir()` on the root directory even with recursion will
+ * result in an error:
+ *
+ * ```js
+ * import { mkdir } from 'fs';
+ *
+ * mkdir('/', { recursive: true }, (err) => {
+ * // => [Error: EPERM: operation not permitted, mkdir 'C:\']
+ * });
+ * ```
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.8
+ */
+ export function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, path?: string) => void
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(
+ path: PathLike,
+ options:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ | undefined,
+ callback: NoParamCallback
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function mkdir(path: PathLike, callback: NoParamCallback): void;
+ export namespace mkdir {
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ }
+ /**
+ * Synchronously creates a directory. Returns `undefined`, or if `recursive` is`true`, the first directory path created.
+ * This is the synchronous version of {@link mkdir}.
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): string | undefined;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): void;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
+ /**
+ * Creates a unique temporary directory.
+ *
+ * Generates six random characters to be appended behind a required`prefix` to create a unique temporary directory. Due to platform
+ * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms,
+ * notably the BSDs, can return more than six random characters, and replace
+ * trailing `X` characters in `prefix` with random characters.
+ *
+ * The created directory path is passed as a string to the callback's second
+ * parameter.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'fs';
+ *
+ * mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
+ * });
+ * ```
+ *
+ * The `fs.mkdtemp()` method will append the six randomly selected characters
+ * directly to the `prefix` string. For instance, given a directory `/tmp`, if the
+ * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator
+ * (`require('path').sep`).
+ *
+ * ```js
+ * import { tmpdir } from 'os';
+ * import { mkdtemp } from 'fs';
+ *
+ * // The parent directory for the new temporary directory
+ * const tmpDir = tmpdir();
+ *
+ * // This method is *INCORRECT*:
+ * mkdtemp(tmpDir, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmpabc123`.
+ * // A new temporary directory is created at the file system root
+ * // rather than *within* the /tmp directory.
+ * });
+ *
+ * // This method is *CORRECT*:
+ * import { sep } from 'path';
+ * mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmp/abc123`.
+ * // A new temporary directory is created within
+ * // the /tmp directory.
+ * });
+ * ```
+ * @since v5.10.0
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(
+ prefix: string,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ },
+ callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ */
+ export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ export namespace mkdtemp {
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the created directory path.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link mkdtemp}.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ * @since v5.10.0
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer;
+ /**
+ * Reads the contents of a directory. The callback gets two arguments `(err, files)`where `files` is an array of the names of the files in the directory excluding`'.'` and `'..'`.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects.
+ * @since v0.1.8
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ }
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ | 'buffer',
+ callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void
+ ): void;
+ export namespace readdir {
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
+ */
+ function __promisify__(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ }
+ ): Promise<Dirent[]>;
+ }
+ /**
+ * Reads the contents of the directory.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames returned. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
+ * @since v0.1.21
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): string[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ | 'buffer'
+ ): Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string[] | Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ }
+ ): Dirent[];
+ /**
+ * Closes the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.0.2
+ */
+ export function close(fd: number, callback?: NoParamCallback): void;
+ export namespace close {
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Closes the file descriptor. Returns `undefined`.
+ *
+ * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.1.21
+ */
+ export function closeSync(fd: number): void;
+ /**
+ * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the file was
+ * created. On Windows, only the write permission can be manipulated; see {@link chmod}.
+ *
+ * The callback gets two arguments `(err, fd)`.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ *
+ * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc.
+ * @since v0.0.2
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666]
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param [flags='r'] See `support of file system `flags``.
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+
+ export namespace open {
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
+ }
+ /**
+ * Returns an integer representing the file descriptor.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link open}.
+ * @since v0.1.21
+ * @param [flags='r']
+ * @param [mode=0o666]
+ */
+ export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
+ * @since v0.4.2
+ */
+ export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace utimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link utimes}.
+ * @since v0.4.2
+ */
+ export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Change the file system timestamps of the object referenced by the supplied file
+ * descriptor. See {@link utimes}.
+ * @since v0.4.2
+ */
+ export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace futimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Synchronous version of {@link futimes}. Returns `undefined`.
+ * @since v0.4.2
+ */
+ export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other
+ * than a possible exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fsync(fd: number, callback: NoParamCallback): void;
+ export namespace fsync {
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fsyncSync(fd: number): void;
+ /**
+ * Write `buffer` to the file specified by `fd`.
+ *
+ * `offset` determines the part of the buffer to be written, and `length` is
+ * an integer specifying the number of bytes to write.
+ *
+ * `position` refers to the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html).
+ *
+ * The callback will be given three arguments `(err, bytesWritten, buffer)` where`bytesWritten` specifies how many _bytes_ were written from `buffer`.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesWritten` and `buffer` properties.
+ *
+ * It is unsafe to use `fs.write()` multiple times on the same file without waiting
+ * for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v0.0.2
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ position: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function write(
+ fd: number,
+ string: string,
+ position: number | undefined | null,
+ encoding: BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void
+ ): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ */
+ export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ export namespace write {
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer?: TBuffer,
+ offset?: number,
+ length?: number,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function __promisify__(
+ fd: number,
+ string: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link write}.
+ * @since v0.1.21
+ * @return The number of bytes written.
+ */
+ export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
+ /**
+ * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
+ export type ReadPosition = number | bigint;
+ export interface ReadSyncOptions {
+ /**
+ * @default 0
+ */
+ offset?: number | undefined;
+ /**
+ * @default `length of buffer`
+ */
+ length?: number | undefined;
+ /**
+ * @default null
+ */
+ position?: ReadPosition | null | undefined;
+ }
+ export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
+ buffer?: TBuffer;
+ }
+ /**
+ * Read data from the file specified by `fd`.
+ *
+ * The callback is given the three arguments, `(err, bytesRead, buffer)`.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffer` properties.
+ * @since v0.0.2
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The position in `buffer` to write the data to.
+ * @param length The number of bytes to read.
+ * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If
+ * `position` is an integer, the file position will be unchanged.
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: ReadPosition | null,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Similar to the above `fs.read` function, this version takes an optional `options` object.
+ * If not otherwise specified in an `options` object,
+ * `buffer` defaults to `Buffer.alloc(16384)`,
+ * `offset` defaults to `0`,
+ * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
+ * `position` defaults to `null`
+ * @since v12.17.0, 13.11.0
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void;
+ export namespace read {
+ /**
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: number | null
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__(fd: number): Promise<{
+ bytesRead: number;
+ buffer: NodeJS.ArrayBufferView;
+ }>;
+ }
+ /**
+ * Returns the number of `bytesRead`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link read}.
+ * @since v0.1.21
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number;
+ /**
+ * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
+ * If no `options` object is specified, it will default with the above values.
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * readFile('/etc/passwd', (err, data) => {
+ * if (err) throw err;
+ * console.log(data);
+ * });
+ * ```
+ *
+ * The callback is passed two arguments `(err, data)`, where `data` is the
+ * contents of the file.
+ *
+ * If no encoding is specified, then the raw buffer is returned.
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * readFile('/etc/passwd', 'utf8', callback);
+ * ```
+ *
+ * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an
+ * error will be returned. On FreeBSD, a representation of the directory's contents
+ * will be returned.
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFile('<directory>', (err, data) => {
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ * });
+ *
+ * // FreeBSD
+ * readFile('<directory>', (err, data) => {
+ * // => null, <data>
+ * });
+ * ```
+ *
+ * It is possible to abort an ongoing request using an `AbortSignal`. If a
+ * request is aborted the callback is called with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * const controller = new AbortController();
+ * const signal = controller.signal;
+ * readFile(fileInfo[0].name, { signal }, (err, buf) => {
+ * // ...
+ * });
+ * // When you want to abort the request
+ * controller.abort();
+ * ```
+ *
+ * The `fs.readFile()` function buffers the entire file. To minimize memory costs,
+ * when possible prefer streaming via `fs.createReadStream()`.
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ * @since v0.1.29
+ * @param path filename or file descriptor
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } & Abortable)
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding,
+ callback: (err: NodeJS.ErrnoException | null, data: string) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ */
+ export function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+ export namespace readFile {
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the contents of the `path`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readFile}.
+ *
+ * If the `encoding` option is specified then this function returns a
+ * string. Otherwise it returns a buffer.
+ *
+ * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific.
+ *
+ * ```js
+ * import { readFileSync } from 'fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFileSync('<directory>');
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ *
+ * // FreeBSD
+ * readFileSync('<directory>'); // => <data>
+ * ```
+ * @since v0.1.8
+ * @param path filename or file descriptor
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Buffer;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): string;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string | Buffer;
+ export type WriteFileOptions =
+ | (ObjectEncodingOptions &
+ Abortable & {
+ mode?: Mode | undefined;
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null;
+ /**
+ * When `file` is a filename, asynchronously writes data to the file, replacing the
+ * file if it already exists. `data` can be a string or a buffer.
+ *
+ * When `file` is a file descriptor, the behavior is similar to calling`fs.write()` directly (which is recommended). See the notes below on using
+ * a file descriptor.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { writeFile } from 'fs';
+ * import { Buffer } from 'buffer';
+ *
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, (err) => {
+ * if (err) throw err;
+ * console.log('The file has been saved!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { writeFile } from 'fs';
+ *
+ * writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
+ * ```
+ *
+ * It is unsafe to use `fs.writeFile()` multiple times on the same file without
+ * waiting for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that
+ * performs multiple `write` calls internally to write the buffer passed to it.
+ * For performance sensitive code consider using {@link createWriteStream}.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'fs';
+ * import { Buffer } from 'buffer';
+ *
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, { signal }, (err) => {
+ * // When a request is aborted - the callback is called with an AbortError
+ * });
+ * // When the request should be aborted
+ * controller.abort();
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
+ export namespace writeFile {
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writeFile}.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFile } from 'fs';
+ *
+ * appendFile('message.txt', 'data to append', (err) => {
+ * if (err) throw err;
+ * console.log('The "data to append" was appended to file!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFile } from 'fs';
+ *
+ * appendFile('message.txt', 'data to append', 'utf8', callback);
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { open, close, appendFile } from 'fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('message.txt', 'a', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * appendFile(fd, 'data to append', 'utf8', (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * throw err;
+ * }
+ * });
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void;
+ export namespace appendFile {
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Synchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFileSync } from 'fs';
+ *
+ * try {
+ * appendFileSync('message.txt', 'data to append');
+ * console.log('The "data to append" was appended to file!');
+ * } catch (err) {
+ * // Handle the error
+ * }
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFileSync } from 'fs';
+ *
+ * appendFileSync('message.txt', 'data to append', 'utf8');
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { openSync, closeSync, appendFileSync } from 'fs';
+ *
+ * let fd;
+ *
+ * try {
+ * fd = openSync('message.txt', 'a');
+ * appendFileSync(fd, 'data to append', 'utf8');
+ * } catch (err) {
+ * // Handle the error
+ * } finally {
+ * if (fd !== undefined)
+ * closeSync(fd);
+ * }
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export interface WatchFileOptions {
+ bigint?: boolean | undefined;
+ persistent?: boolean | undefined;
+ interval?: number | undefined;
+ }
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ listener: (curr: Stats, prev: Stats) => void
+ ): StatWatcher;
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint: true;
+ })
+ | undefined,
+ listener: (curr: BigIntStats, prev: BigIntStats) => void
+ ): StatWatcher;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): StatWatcher;
+ /**
+ * Stop watching for changes on `filename`. If `listener` is specified, only that
+ * particular listener is removed. Otherwise, _all_ listeners are removed,
+ * effectively stopping watching of `filename`.
+ *
+ * Calling `fs.unwatchFile()` with a filename that is not being watched is a
+ * no-op, not an error.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile()` and`fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()`and `fs.unwatchFile()` when possible.
+ * @since v0.1.31
+ * @param listener Optional, a listener previously attached using `fs.watchFile()`
+ */
+ export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
+ export interface WatchOptions extends Abortable {
+ encoding?: BufferEncoding | 'buffer' | undefined;
+ persistent?: boolean | undefined;
+ recursive?: boolean | undefined;
+ }
+ export type WatchEventType = 'rename' | 'change';
+ export type WatchListener<T> = (event: WatchEventType, filename: T) => void;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a
+ * directory.
+ *
+ * The second argument is optional. If `options` is provided as a string, it
+ * specifies the `encoding`. Otherwise `options` should be passed as an object.
+ *
+ * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file
+ * which triggered the event.
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`.
+ *
+ * If a `signal` is passed, aborting the corresponding AbortController will close
+ * the returned `fs.FSWatcher`.
+ * @since v0.5.10
+ * @param listener
+ */
+ export function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer',
+ listener?: WatchListener<Buffer>
+ ): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options?: WatchOptions | BufferEncoding | null, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options: WatchOptions | string, listener?: WatchListener<string | Buffer>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watch(filename: PathLike, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Test whether or not the given path exists by checking with the file system.
+ * Then call the `callback` argument with either true or false:
+ *
+ * ```js
+ * import { exists } from 'fs';
+ *
+ * exists('/etc/passwd', (e) => {
+ * console.log(e ? 'it exists' : 'no passwd!');
+ * });
+ * ```
+ *
+ * **The parameters for this callback are not consistent with other Node.js**
+ * **callbacks.** Normally, the first parameter to a Node.js callback is an `err`parameter, optionally followed by other parameters. The `fs.exists()` callback
+ * has only one boolean parameter. This is one reason `fs.access()` is recommended
+ * instead of `fs.exists()`.
+ *
+ * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file does not exist.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { exists, open, close } from 'fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * console.error('myfile already exists');
+ * } else {
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close, exists } from 'fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * } else {
+ * console.error('myfile does not exist');
+ * }
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for existence and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the existence of a file only if the file won’t be
+ * used directly, for example when its existence is a signal from another
+ * process.
+ * @since v0.0.2
+ * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead.
+ */
+ export function exists(path: PathLike, callback: (exists: boolean) => void): void;
+ /** @deprecated */
+ export namespace exists {
+ /**
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike): Promise<boolean>;
+ }
+ /**
+ * Returns `true` if the path exists, `false` otherwise.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link exists}.
+ *
+ * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`parameter to `fs.exists()` accepts parameters that are inconsistent with other
+ * Node.js callbacks. `fs.existsSync()` does not use a callback.
+ *
+ * ```js
+ * import { existsSync } from 'fs';
+ *
+ * if (existsSync('/etc/passwd'))
+ * console.log('The path exists.');
+ * ```
+ * @since v0.1.21
+ */
+ export function existsSync(path: PathLike): boolean;
+ export namespace constants {
+ // File Access Constants
+ /** Constant for fs.access(). File is visible to the calling process. */
+ const F_OK: number;
+ /** Constant for fs.access(). File can be read by the calling process. */
+ const R_OK: number;
+ /** Constant for fs.access(). File can be written by the calling process. */
+ const W_OK: number;
+ /** Constant for fs.access(). File can be executed by the calling process. */
+ const X_OK: number;
+ // File Copy Constants
+ /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
+ const COPYFILE_EXCL: number;
+ /**
+ * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
+ */
+ const COPYFILE_FICLONE: number;
+ /**
+ * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
+ */
+ const COPYFILE_FICLONE_FORCE: number;
+ // File Open Constants
+ /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
+ const O_RDONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
+ const O_WRONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
+ const O_RDWR: number;
+ /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
+ const O_CREAT: number;
+ /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
+ const O_EXCL: number;
+ /**
+ * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
+ * opening the path shall not cause that terminal to become the controlling terminal for the process
+ * (if the process does not already have one).
+ */
+ const O_NOCTTY: number;
+ /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
+ const O_TRUNC: number;
+ /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
+ const O_APPEND: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
+ const O_DIRECTORY: number;
+ /**
+ * constant for fs.open().
+ * Flag indicating reading accesses to the file system will no longer result in
+ * an update to the atime information associated with the file.
+ * This flag is available on Linux operating systems only.
+ */
+ const O_NOATIME: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
+ const O_NOFOLLOW: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
+ const O_SYNC: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
+ const O_DSYNC: number;
+ /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
+ const O_SYMLINK: number;
+ /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
+ const O_DIRECT: number;
+ /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
+ const O_NONBLOCK: number;
+ // File Type Constants
+ /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
+ const S_IFMT: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
+ const S_IFREG: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
+ const S_IFDIR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
+ const S_IFCHR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
+ const S_IFBLK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
+ const S_IFIFO: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
+ const S_IFLNK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
+ const S_IFSOCK: number;
+ // File Mode Constants
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
+ const S_IRWXU: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
+ const S_IRUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
+ const S_IWUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
+ const S_IXUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
+ const S_IRWXG: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
+ const S_IRGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
+ const S_IWGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
+ const S_IXGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
+ const S_IRWXO: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
+ const S_IROTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
+ const S_IWOTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
+ const S_IXOTH: number;
+ /**
+ * When set, a memory file mapping is used to access the file. This flag
+ * is available on Windows operating systems only. On other operating systems,
+ * this flag is ignored.
+ */
+ const UV_FS_O_FILEMAP: number;
+ }
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * The final argument, `callback`, is a callback function that is invoked with
+ * a possible error argument. If any of the accessibility checks fail, the error
+ * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable.
+ *
+ * ```js
+ * import { access, constants } from 'fs';
+ *
+ * const file = 'package.json';
+ *
+ * // Check if the file exists in the current directory.
+ * access(file, constants.F_OK, (err) => {
+ * console.log(`${file} ${err ? 'does not exist' : 'exists'}`);
+ * });
+ *
+ * // Check if the file is readable.
+ * access(file, constants.R_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`);
+ * });
+ *
+ * // Check if the file is writable.
+ * access(file, constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
+ * });
+ *
+ * // Check if the file is readable and writable.
+ * access(file, constants.R_OK | constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
+ * });
+ * ```
+ *
+ * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file is not accessible.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'fs';
+ *
+ * access('myfile', (err) => {
+ * if (!err) {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'fs';
+ * access('myfile', (err) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for accessibility and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the accessibility of a file only if the file will not be
+ * used directly, for example when its accessibility is a signal from another
+ * process.
+ *
+ * On Windows, access-control policies (ACLs) on a directory may limit access to
+ * a file or directory. The `fs.access()` function, however, does not check the
+ * ACL and therefore may report that a path is accessible even if the ACL restricts
+ * the user from reading or writing to it.
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function access(path: PathLike, callback: NoParamCallback): void;
+ export namespace access {
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously tests a user's permissions for the file or directory specified
+ * by `path`. The `mode` argument is an optional integer that specifies the
+ * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and
+ * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
+ * the method will return `undefined`.
+ *
+ * ```js
+ * import { accessSync, constants } from 'fs';
+ *
+ * try {
+ * accessSync('etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can read/write');
+ * } catch (err) {
+ * console.error('no access!');
+ * }
+ * ```
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function accessSync(path: PathLike, mode?: number): void;
+ interface StreamOptions {
+ flags?: string | undefined;
+ encoding?: BufferEncoding | undefined;
+ fd?: number | promises.FileHandle | undefined;
+ mode?: number | undefined;
+ autoClose?: boolean | undefined;
+ /**
+ * @default false
+ */
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface ReadStreamOptions extends StreamOptions {
+ end?: number | undefined;
+ }
+ /**
+ * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 kb.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is
+ * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the
+ * current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
+ * the specified file descriptor. This means that no `'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`.
+ *
+ * If `fd` points to a character device that only supports blocking reads
+ * (such as keyboard or sound card), read operations do not finish until data is
+ * available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option, it is possible to override the corresponding `fs`implementations for `open`, `read`, and `close`. When providing the `fs` option,
+ * an override for `read` is required. If no `fd` is provided, an override for`open` is also required. If `autoClose` is `true`, an override for `close` is
+ * also required.
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ *
+ * // Create a stream from some character device.
+ * const stream = createReadStream('/dev/input/event0');
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the
+ * file was created.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ *
+ * createReadStream('sample.txt', { start: 90, end: 99 });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` option to be set to `r+` rather than the
+ * default `w`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev` and `close`. Overriding `write()`without `writev()` can reduce
+ * performance as some optimizations (`_writev()`)
+ * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override
+ * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required.
+ *
+ * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s
+ * should be passed to `net.Socket`.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other
+ * than a possible
+ * exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fdatasync(fd: number, callback: NoParamCallback): void;
+ export namespace fdatasync {
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fdatasyncSync(fd: number): void;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. No arguments other than a possible exception are given to the
+ * callback function. Node.js makes no guarantees about the atomicity of the copy
+ * operation. If an error occurs after the destination file has been opened for
+ * writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFile, constants } from 'fs';
+ *
+ * function callback(err) {
+ * if (err) throw err;
+ * console.log('source.txt was copied to destination.txt');
+ * }
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFile('source.txt', 'destination.txt', callback);
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
+ export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
+ export namespace copyFile {
+ function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. Returns `undefined`. Node.js makes no guarantees about the
+ * atomicity of the copy operation. If an error occurs after the destination file
+ * has been opened for writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFileSync, constants } from 'fs';
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFileSync('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
+ /**
+ * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`.
+ *
+ * `position` is the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesWritten`, and`buffers`. `bytesWritten` is how many bytes were written from `buffers`.
+ *
+ * If this method is `util.promisify()` ed, it returns a promise for an`Object` with `bytesWritten` and `buffers` properties.
+ *
+ * It is unsafe to use `fs.writev()` multiple times on the same file without
+ * waiting for the callback. For this scenario, use {@link createWriteStream}.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ */
+ export function writev(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function writev(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface WriteVResult {
+ bytesWritten: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace writev {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writev}.
+ * @since v12.9.0
+ * @return The number of bytes written.
+ */
+ export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+ /**
+ * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s
+ * using `readv()`.
+ *
+ * `position` is the offset from the beginning of the file from where data
+ * should be read. If `typeof position !== 'number'`, the data will be read
+ * from the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesRead`, and`buffers`. `bytesRead` is how many bytes were read from the file.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffers` properties.
+ * @since v13.13.0, v12.17.0
+ */
+ export function readv(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function readv(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface ReadVResult {
+ bytesRead: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace readv {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readv}.
+ * @since v13.13.0, v12.17.0
+ * @return The number of bytes read.
+ */
+ export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+ export interface OpenDirOptions {
+ encoding?: BufferEncoding | undefined;
+ /**
+ * Number of directory entries that are buffered
+ * internally when reading from the directory. Higher values lead to better
+ * performance but higher memory usage.
+ * @default 32
+ */
+ bufferSize?: number | undefined;
+ }
+ /**
+ * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
+ /**
+ * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for
+ * more details.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export namespace opendir {
+ function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ }
+ export interface BigIntStats extends StatsBase<bigint> {
+ atimeNs: bigint;
+ mtimeNs: bigint;
+ ctimeNs: bigint;
+ birthtimeNs: bigint;
+ }
+ export interface BigIntOptions {
+ bigint: true;
+ }
+ export interface StatOptions {
+ bigint?: boolean | undefined;
+ }
+ export interface StatSyncOptions extends StatOptions {
+ throwIfNoEntry?: boolean | undefined;
+ }
+ interface CopyOptionsBase {
+ /**
+ * Dereference symlinks
+ * @default false
+ */
+ dereference?: boolean;
+ /**
+ * When `force` is `false`, and the destination
+ * exists, throw an error.
+ * @default false
+ */
+ errorOnExist?: boolean;
+ /**
+ * Overwrite existing file or directory. _The copy
+ * operation will ignore errors if you set this to false and the destination
+ * exists. Use the `errorOnExist` option to change this behavior.
+ * @default true
+ */
+ force?: boolean;
+ /**
+ * When `true` timestamps from `src` will
+ * be preserved.
+ * @default false
+ */
+ preserveTimestamps?: boolean;
+ /**
+ * Copy directories recursively.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * When true, path resolution for symlinks will be skipped
+ * @default false
+ */
+ verbatimSymlinks?: boolean;
+ }
+ export interface CopyOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean | Promise<boolean>;
+ }
+ export interface CopySyncOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean;
+ }
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * Synchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
+}
+declare module 'node:fs' {
+ export * from 'fs';
+}
diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts
new file mode 100755
index 0000000..9d0b5f1
--- /dev/null
+++ b/node_modules/@types/node/fs/promises.d.ts
@@ -0,0 +1,1120 @@
+/**
+ * The `fs/promises` API provides asynchronous file system methods that return
+ * promises.
+ *
+ * The promise APIs use the underlying Node.js threadpool to perform file
+ * system operations off the event loop thread. These operations are not
+ * synchronized or threadsafe. Care must be taken when performing multiple
+ * concurrent modifications on the same file or data corruption may occur.
+ * @since v10.0.0
+ */
+declare module 'fs/promises' {
+ import { Abortable } from 'node:events';
+ import { Stream } from 'node:stream';
+ import { ReadableStream } from 'node:stream/web';
+ import {
+ BigIntStats,
+ BufferEncodingOption,
+ constants as fsConstants,
+ CopyOptions,
+ Dir,
+ Dirent,
+ MakeDirectoryOptions,
+ Mode,
+ ObjectEncodingOptions,
+ OpenDirOptions,
+ OpenMode,
+ PathLike,
+ ReadStream,
+ ReadVResult,
+ RmDirOptions,
+ RmOptions,
+ StatOptions,
+ Stats,
+ TimeLike,
+ WatchEventType,
+ WatchOptions,
+ WriteStream,
+ WriteVResult,
+ } from 'node:fs';
+
+ interface FileChangeInfo<T extends string | Buffer> {
+ eventType: WatchEventType;
+ filename: T;
+ }
+ interface FlagAndOpenMode {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ }
+ interface FileReadResult<T extends NodeJS.ArrayBufferView> {
+ bytesRead: number;
+ buffer: T;
+ }
+ interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
+ /**
+ * @default `Buffer.alloc(0xffff)`
+ */
+ buffer?: T;
+ /**
+ * @default 0
+ */
+ offset?: number | null;
+ /**
+ * @default `buffer.byteLength`
+ */
+ length?: number | null;
+ position?: number | null;
+ }
+ interface CreateReadStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ end?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface CreateWriteStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ }
+ // TODO: Add `EventEmitter` close
+ interface FileHandle {
+ /**
+ * The numeric file descriptor managed by the {FileHandle} object.
+ * @since v10.0.0
+ */
+ readonly fd: number;
+ /**
+ * Alias of `filehandle.writeFile()`.
+ *
+ * When operating on file handles, the mode cannot be changed from what it was set
+ * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
+ * @since v10.0.0
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chown(uid: number, gid: number): Promise<void>;
+ /**
+ * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html).
+ * @since v10.0.0
+ * @param mode the file mode bit mask.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chmod(mode: Mode): Promise<void>;
+ /**
+ * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 kb.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
+ * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
+ * the current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If the `FileHandle` points to a character device that only supports blocking
+ * reads (such as keyboard or sound card), read operations do not finish until data
+ * is available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * const fd = await open('/dev/input/event0');
+ * // Create a stream from some character device.
+ * const stream = fd.createReadStream();
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * const fd = await open('sample.txt');
+ * fd.createReadStream({ start: 90, end: 99 });
+ * ```
+ * @since v16.11.0
+ */
+ createReadStream(options?: CreateReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` `open` option to be set to `r+` rather than
+ * the default `r`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ * @since v16.11.0
+ */
+ createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
+ *
+ * Unlike `filehandle.sync` this method does not flush modified metadata.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ datasync(): Promise<void>;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fufills with `undefined` upon success.
+ */
+ sync(): Promise<void>;
+ /**
+ * Reads data from the file and stores that in the given buffer.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ * @since v10.0.0
+ * @param buffer A buffer that will be filled with the file data read.
+ * @param offset The location in the buffer at which to start filling.
+ * @param length The number of bytes to read.
+ * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
+ * integer, the current file position will remain unchanged.
+ * @return Fulfills upon success with an object with two properties:
+ */
+ read<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
+ read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
+ /**
+ * Returns a `ReadableStream` that may be used to read the files data.
+ *
+ * An error will be thrown if this method is called more than once or is called after the `FileHandle` is closed
+ * or closing.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const chunk of file.readableWebStream())
+ * console.log(chunk);
+ *
+ * await file.close();
+ * ```
+ *
+ * While the `ReadableStream` will read the file to completion, it will not close the `FileHandle` automatically. User code must still call the `fileHandle.close()` method.
+ *
+ * @since v17.0.0
+ * @experimental
+ */
+ readableWebStream(): ReadableStream;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support reading.
+ *
+ * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current
+ * position till the end of the file. It doesn't always read from the beginning
+ * of the file.
+ * @since v10.0.0
+ * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the
+ * data will be a string.
+ */
+ readFile(
+ options?: {
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with an {fs.Stats} for the file.
+ */
+ stat(
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ stat(
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * Truncates the file.
+ *
+ * If the file was larger than `len` bytes, only the first `len` bytes will be
+ * retained in the file.
+ *
+ * The following example retains only the first four bytes of the file:
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * let filehandle = null;
+ * try {
+ * filehandle = await open('temp.txt', 'r+');
+ * await filehandle.truncate(4);
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ truncate(len?: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
+ * @since v10.0.0
+ */
+ utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ * The promise is resolved with no arguments upon success.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `filehandle.writeFile()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected).
+ *
+ * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the
+ * current position till the end of the file. It doesn't always write from the
+ * beginning of the file.
+ * @since v10.0.0
+ */
+ writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise<void>;
+ /**
+ * Write `buffer` to the file.
+ *
+ * The promise is resolved with an object containing two properties:
+ *
+ * It is unsafe to use `filehandle.write()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected). For this
+ * scenario, use `filehandle.createWriteStream()`.
+ *
+ * On Linux, positional writes do not work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v10.0.0
+ * @param [offset=0] The start position from within `buffer` where the data to write begins.
+ * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
+ * @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position.
+ * See the POSIX pwrite(2) documentation for more detail.
+ */
+ write<TBuffer extends Uint8Array>(
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ write(
+ data: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ /**
+ * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
+ *
+ * The promise is resolved with an object containing a two properties:
+ *
+ * It is unsafe to call `writev()` multiple times on the same file without waiting
+ * for the promise to be resolved (or rejected).
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ * @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
+ * position.
+ */
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ /**
+ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
+ * @since v13.13.0, v12.17.0
+ * @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
+ * @return Fulfills upon success an object containing two properties:
+ */
+ readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ /**
+ * Closes the file handle after waiting for any pending operation on the handle to
+ * complete.
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * let filehandle;
+ * try {
+ * filehandle = await open('thefile.txt', 'r');
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ close(): Promise<void>;
+ }
+
+ const constants: typeof fsConstants;
+
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If the accessibility check is successful, the promise is resolved with no
+ * value. If any of the accessibility checks fail, the promise is rejected
+ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
+ * written by the current process.
+ *
+ * ```js
+ * import { access } from 'fs/promises';
+ * import { constants } from 'fs';
+ *
+ * try {
+ * await access('/etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can access');
+ * } catch {
+ * console.error('cannot access');
+ * }
+ * ```
+ *
+ * Using `fsPromises.access()` to check for the accessibility of a file before
+ * calling `fsPromises.open()` is not recommended. Doing so introduces a race
+ * condition, since other processes may change the file's state between the two
+ * calls. Instead, user code should open/read/write the file directly and handle
+ * the error raised if the file is not accessible.
+ * @since v10.0.0
+ * @param [mode=fs.constants.F_OK]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function access(path: PathLike, mode?: number): Promise<void>;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists.
+ *
+ * No guarantees are made about the atomicity of the copy operation. If an
+ * error occurs after the destination file has been opened for writing, an attempt
+ * will be made to remove the destination.
+ *
+ * ```js
+ * import { constants } from 'fs';
+ * import { copyFile } from 'fs/promises';
+ *
+ * try {
+ * await copyFile('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.log('The file could not be copied');
+ * }
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * try {
+ * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.log('The file could not be copied');
+ * }
+ * ```
+ * @since v10.0.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g.
+ * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
+ * @return Fulfills with `undefined` upon success.
+ */
+ function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
+ /**
+ * Opens a `FileHandle`.
+ *
+ * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ * @since v10.0.0
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
+ * @return Fulfills with a {FileHandle} object.
+ */
+ function open(path: PathLike, flags?: string | number, mode?: Mode): Promise<FileHandle>;
+ /**
+ * Renames `oldPath` to `newPath`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * Truncates (shortens or extends the length) of the content at `path` to `len`bytes.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function truncate(path: PathLike, len?: number): Promise<void>;
+ /**
+ * Removes the directory identified by `path`.
+ *
+ * Using `fsPromises.rmdir()` on a file (not a directory) results in the
+ * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
+ /**
+ * Removes files and directories (modeled on the standard POSIX `rm` utility).
+ * @since v14.14.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory
+ * that exists results in a
+ * rejection only when `recursive` is false.
+ * @since v10.0.0
+ * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.
+ */
+ function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ /**
+ * Reads the contents of a directory.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned
+ * will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects.
+ *
+ * ```js
+ * import { readdir } from 'fs/promises';
+ *
+ * try {
+ * const files = await readdir(path);
+ * for (const file of files)
+ * console.log(file);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ | 'buffer'
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ }
+ ): Promise<Dirent[]>;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
+ * resolved with the`linkString` upon success.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`, the link path
+ * returned will be passed as a `Buffer` object.
+ * @since v10.0.0
+ * @return Fulfills with the `linkString` upon success.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
+ /**
+ * Creates a symbolic link.
+ *
+ * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path
+ * to be absolute. When using `'junction'`, the `target` argument will
+ * automatically be normalized to absolute path.
+ * @since v10.0.0
+ * @param [type='file']
+ * @return Fulfills with `undefined` upon success.
+ */
+ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ /**
+ * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link,
+ * in which case the link itself is stat-ed, not the file that it refers to.
+ * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`.
+ */
+ function lstat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function lstat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given `path`.
+ */
+ function stat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function stat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * If `path` refers to a symbolic link, then the link is removed without affecting
+ * the file or directory to which that link refers. If the `path` refers to a file
+ * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function unlink(path: PathLike): Promise<void>;
+ /**
+ * Changes the permissions of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the permissions on a symbolic link.
+ *
+ * This method is only implemented on macOS.
+ * @deprecated Since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the ownership on a symbolic link.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a
+ * symbolic link, then the link is not dereferenced: instead, the timestamps of
+ * the symbolic link itself are changed.
+ * @since v14.5.0, v12.19.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Changes the ownership of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time, `Date`s, or a
+ * numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path. If the `encoding` is set to `'buffer'`, the path returned will be
+ * passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v10.0.0
+ * @return Fulfills with the resolved path upon success.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Creates a unique temporary directory. A unique directory name is generated by
+ * appending six random characters to the end of the provided `prefix`. Due to
+ * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some
+ * platforms, notably the BSDs, can return more than six random characters, and
+ * replace trailing `X` characters in `prefix` with random characters.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'fs/promises';
+ *
+ * try {
+ * await mkdtemp(path.join(os.tmpdir(), 'foo-'));
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * The `fsPromises.mkdtemp()` method will append the six randomly selected
+ * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing
+ * platform-specific path separator
+ * (`require('path').sep`).
+ * @since v10.0.0
+ * @return Fulfills with a string containing the filesystem path of the newly created temporary directory.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * Any specified `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
+ * without waiting for the promise to be settled.
+ *
+ * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
+ * method that performs multiple `write` calls internally to write the buffer
+ * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'fs/promises';
+ * import { Buffer } from 'buffer';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * const promise = writeFile('message.txt', data, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v10.0.0
+ * @param file filename or `FileHandle`
+ * @return Fulfills with `undefined` upon success.
+ */
+ function writeFile(
+ file: PathLike | FileHandle,
+ data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
+ options?:
+ | (ObjectEncodingOptions & {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * The `path` may be specified as a `FileHandle` that has been opened
+ * for appending (using `fsPromises.open()`).
+ * @since v10.0.0
+ * @param path filename or {FileHandle}
+ * @return Fulfills with `undefined` upon success.
+ */
+ function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If no encoding is specified (using `options.encoding`), the data is returned
+ * as a `Buffer` object. Otherwise, the data will be a string.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * When the `path` is a directory, the behavior of `fsPromises.readFile()` is
+ * platform-specific. On macOS, Linux, and Windows, the promise will be rejected
+ * with an error. On FreeBSD, a representation of the directory's contents will be
+ * returned.
+ *
+ * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
+ * request is aborted the promise returned is rejected with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'fs/promises';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const promise = readFile(fileName, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ *
+ * Any specified `FileHandle` has to support reading.
+ * @since v10.0.0
+ * @param path filename or `FileHandle`
+ * @return Fulfills with the contents of the file.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | ({
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | (ObjectEncodingOptions &
+ Abortable & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ *
+ * Example using async iteration:
+ *
+ * ```js
+ * import { opendir } from 'fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ * @return Fulfills with an {fs.Dir}.
+ */
+ function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ /**
+ * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
+ *
+ * ```js
+ * const { watch } = require('fs/promises');
+ *
+ * const ac = new AbortController();
+ * const { signal } = ac;
+ * setTimeout(() => ac.abort(), 10000);
+ *
+ * (async () => {
+ * try {
+ * const watcher = watch(__filename, { signal });
+ * for await (const event of watcher)
+ * console.log(event);
+ * } catch (err) {
+ * if (err.name === 'AbortError')
+ * return;
+ * throw err;
+ * }
+ * })();
+ * ```
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
+ * @since v15.9.0, v14.18.0
+ * @return of objects with the properties:
+ */
+ function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer'
+ ): AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ * @return Fulfills with `undefined` upon success.
+ */
+ function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
+}
+declare module 'node:fs/promises' {
+ export * from 'fs/promises';
+}
diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts
new file mode 100755
index 0000000..9037861
--- /dev/null
+++ b/node_modules/@types/node/globals.d.ts
@@ -0,0 +1,296 @@
+// Declare "static" methods in Error
+interface ErrorConstructor {
+ /** Create .stack property on a target object */
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
+
+ /**
+ * Optional override for formatting stack traces
+ *
+ * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
+ */
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
+
+ stackTraceLimit: number;
+}
+
+/*-----------------------------------------------*
+ * *
+ * GLOBAL *
+ * *
+ ------------------------------------------------*/
+
+// For backwards compability
+interface NodeRequire extends NodeJS.Require { }
+interface RequireResolve extends NodeJS.RequireResolve { }
+interface NodeModule extends NodeJS.Module { }
+
+declare var process: NodeJS.Process;
+declare var console: Console;
+
+declare var __filename: string;
+declare var __dirname: string;
+
+declare var require: NodeRequire;
+declare var module: NodeModule;
+
+// Same as module.exports
+declare var exports: any;
+
+/**
+ * Only available if `--expose-gc` is passed to the process.
+ */
+declare var gc: undefined | (() => void);
+
+//#region borrowed
+// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /**
+ * Returns the AbortSignal object associated with this object.
+ */
+
+ readonly signal: AbortSignal;
+ /**
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
+ */
+ abort(): void;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal {
+ /**
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
+ */
+ readonly aborted: boolean;
+}
+
+declare var AbortController: {
+ prototype: AbortController;
+ new(): AbortController;
+};
+
+declare var AbortSignal: {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+ // TODO: Add abort() static
+ timeout(milliseconds: number): AbortSignal;
+};
+//#endregion borrowed
+
+//#region ArrayLike.at()
+interface RelativeIndexable<T> {
+ /**
+ * Takes an integer value and returns the item at that index,
+ * allowing for positive and negative integers.
+ * Negative integers count back from the last item in the array.
+ */
+ at(index: number): T | undefined;
+}
+interface String extends RelativeIndexable<string> {}
+interface Array<T> extends RelativeIndexable<T> {}
+interface ReadonlyArray<T> extends RelativeIndexable<T> {}
+interface Int8Array extends RelativeIndexable<number> {}
+interface Uint8Array extends RelativeIndexable<number> {}
+interface Uint8ClampedArray extends RelativeIndexable<number> {}
+interface Int16Array extends RelativeIndexable<number> {}
+interface Uint16Array extends RelativeIndexable<number> {}
+interface Int32Array extends RelativeIndexable<number> {}
+interface Uint32Array extends RelativeIndexable<number> {}
+interface Float32Array extends RelativeIndexable<number> {}
+interface Float64Array extends RelativeIndexable<number> {}
+interface BigInt64Array extends RelativeIndexable<bigint> {}
+interface BigUint64Array extends RelativeIndexable<bigint> {}
+//#endregion ArrayLike.at() end
+
+/**
+ * @since v17.0.0
+ *
+ * Creates a deep clone of an object.
+ */
+declare function structuredClone<T>(
+ value: T,
+ transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
+): T;
+
+/*----------------------------------------------*
+* *
+* GLOBAL INTERFACES *
+* *
+*-----------------------------------------------*/
+declare namespace NodeJS {
+ interface CallSite {
+ /**
+ * Value of "this"
+ */
+ getThis(): unknown;
+
+ /**
+ * Type of "this" as a string.
+ * This is the name of the function stored in the constructor field of
+ * "this", if available. Otherwise the object's [[Class]] internal
+ * property.
+ */
+ getTypeName(): string | null;
+
+ /**
+ * Current function
+ */
+ getFunction(): Function | undefined;
+
+ /**
+ * Name of the current function, typically its name property.
+ * If a name property is not available an attempt will be made to try
+ * to infer a name from the function's context.
+ */
+ getFunctionName(): string | null;
+
+ /**
+ * Name of the property [of "this" or one of its prototypes] that holds
+ * the current function
+ */
+ getMethodName(): string | null;
+
+ /**
+ * Name of the script [if this function was defined in a script]
+ */
+ getFileName(): string | null;
+
+ /**
+ * Current line number [if this function was defined in a script]
+ */
+ getLineNumber(): number | null;
+
+ /**
+ * Current column number [if this function was defined in a script]
+ */
+ getColumnNumber(): number | null;
+
+ /**
+ * A call site object representing the location where eval was called
+ * [if this function was created using a call to eval]
+ */
+ getEvalOrigin(): string | undefined;
+
+ /**
+ * Is this a toplevel invocation, that is, is "this" the global object?
+ */
+ isToplevel(): boolean;
+
+ /**
+ * Does this call take place in code defined by a call to eval?
+ */
+ isEval(): boolean;
+
+ /**
+ * Is this call in native V8 code?
+ */
+ isNative(): boolean;
+
+ /**
+ * Is this a constructor call?
+ */
+ isConstructor(): boolean;
+ }
+
+ interface ErrnoException extends Error {
+ errno?: number | undefined;
+ code?: string | undefined;
+ path?: string | undefined;
+ syscall?: string | undefined;
+ }
+
+ interface ReadableStream extends EventEmitter {
+ readable: boolean;
+ read(size?: number): string | Buffer;
+ setEncoding(encoding: BufferEncoding): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
+ unpipe(destination?: WritableStream): this;
+ unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
+ wrap(oldStream: ReadableStream): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
+ }
+
+ interface WritableStream extends EventEmitter {
+ writable: boolean;
+ write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
+ write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
+ end(cb?: () => void): this;
+ end(data: string | Uint8Array, cb?: () => void): this;
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
+ }
+
+ interface ReadWriteStream extends ReadableStream, WritableStream { }
+
+ interface RefCounted {
+ ref(): this;
+ unref(): this;
+ }
+
+ type TypedArray =
+ | Uint8Array
+ | Uint8ClampedArray
+ | Uint16Array
+ | Uint32Array
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | BigUint64Array
+ | BigInt64Array
+ | Float32Array
+ | Float64Array;
+ type ArrayBufferView = TypedArray | DataView;
+
+ interface Require {
+ (id: string): any;
+ resolve: RequireResolve;
+ cache: Dict<NodeModule>;
+ /**
+ * @deprecated
+ */
+ extensions: RequireExtensions;
+ main: Module | undefined;
+ }
+
+ interface RequireResolve {
+ (id: string, options?: { paths?: string[] | undefined; }): string;
+ paths(request: string): string[] | null;
+ }
+
+ interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
+ '.js': (m: Module, filename: string) => any;
+ '.json': (m: Module, filename: string) => any;
+ '.node': (m: Module, filename: string) => any;
+ }
+ interface Module {
+ /**
+ * `true` if the module is running during the Node.js preload
+ */
+ isPreloading: boolean;
+ exports: any;
+ require: Require;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
+ parent: Module | null | undefined;
+ children: Module[];
+ /**
+ * @since v11.14.0
+ *
+ * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
+ */
+ path: string;
+ paths: string[];
+ }
+
+ interface Dict<T> {
+ [key: string]: T | undefined;
+ }
+
+ interface ReadOnlyDict<T> {
+ readonly [key: string]: T | undefined;
+ }
+}
diff --git a/node_modules/@types/node/globals.global.d.ts b/node_modules/@types/node/globals.global.d.ts
new file mode 100755
index 0000000..ef1198c
--- /dev/null
+++ b/node_modules/@types/node/globals.global.d.ts
@@ -0,0 +1 @@
+declare var global: typeof globalThis;
diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts
new file mode 100755
index 0000000..24bc5e7
--- /dev/null
+++ b/node_modules/@types/node/http.d.ts
@@ -0,0 +1,1553 @@
+/**
+ * To use the HTTP server and client one must `require('http')`.
+ *
+ * The HTTP interfaces in Node.js are designed to support many features
+ * of the protocol which have been traditionally difficult to use.
+ * In particular, large, possibly chunk-encoded, messages. The interface is
+ * careful to never buffer entire requests or responses, so the
+ * user is able to stream data.
+ *
+ * HTTP message headers are represented by an object like this:
+ *
+ * ```js
+ * { 'content-length': '123',
+ * 'content-type': 'text/plain',
+ * 'connection': 'keep-alive',
+ * 'host': 'example.com',
+ * 'accept': '*' }
+ * ```
+ *
+ * Keys are lowercased. Values are not modified.
+ *
+ * In order to support the full spectrum of possible HTTP applications, the Node.js
+ * HTTP API is very low-level. It deals with stream handling and message
+ * parsing only. It parses a message into headers and body but it does not
+ * parse the actual headers or the body.
+ *
+ * See `message.headers` for details on how duplicate headers are handled.
+ *
+ * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For
+ * example, the previous message header object might have a `rawHeaders`list like the following:
+ *
+ * ```js
+ * [ 'ConTent-Length', '123456',
+ * 'content-LENGTH', '123',
+ * 'content-type', 'text/plain',
+ * 'CONNECTION', 'keep-alive',
+ * 'Host', 'example.com',
+ * 'accepT', '*' ]
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http.js)
+ */
+declare module 'http' {
+ import * as stream from 'node:stream';
+ import { URL } from 'node:url';
+ import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
+ // incoming headers will never contain number
+ interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
+ accept?: string | undefined;
+ 'accept-language'?: string | undefined;
+ 'accept-patch'?: string | undefined;
+ 'accept-ranges'?: string | undefined;
+ 'access-control-allow-credentials'?: string | undefined;
+ 'access-control-allow-headers'?: string | undefined;
+ 'access-control-allow-methods'?: string | undefined;
+ 'access-control-allow-origin'?: string | undefined;
+ 'access-control-expose-headers'?: string | undefined;
+ 'access-control-max-age'?: string | undefined;
+ 'access-control-request-headers'?: string | undefined;
+ 'access-control-request-method'?: string | undefined;
+ age?: string | undefined;
+ allow?: string | undefined;
+ 'alt-svc'?: string | undefined;
+ authorization?: string | undefined;
+ 'cache-control'?: string | undefined;
+ connection?: string | undefined;
+ 'content-disposition'?: string | undefined;
+ 'content-encoding'?: string | undefined;
+ 'content-language'?: string | undefined;
+ 'content-length'?: string | undefined;
+ 'content-location'?: string | undefined;
+ 'content-range'?: string | undefined;
+ 'content-type'?: string | undefined;
+ cookie?: string | undefined;
+ date?: string | undefined;
+ etag?: string | undefined;
+ expect?: string | undefined;
+ expires?: string | undefined;
+ forwarded?: string | undefined;
+ from?: string | undefined;
+ host?: string | undefined;
+ 'if-match'?: string | undefined;
+ 'if-modified-since'?: string | undefined;
+ 'if-none-match'?: string | undefined;
+ 'if-unmodified-since'?: string | undefined;
+ 'last-modified'?: string | undefined;
+ location?: string | undefined;
+ origin?: string | undefined;
+ pragma?: string | undefined;
+ 'proxy-authenticate'?: string | undefined;
+ 'proxy-authorization'?: string | undefined;
+ 'public-key-pins'?: string | undefined;
+ range?: string | undefined;
+ referer?: string | undefined;
+ 'retry-after'?: string | undefined;
+ 'sec-websocket-accept'?: string | undefined;
+ 'sec-websocket-extensions'?: string | undefined;
+ 'sec-websocket-key'?: string | undefined;
+ 'sec-websocket-protocol'?: string | undefined;
+ 'sec-websocket-version'?: string | undefined;
+ 'set-cookie'?: string[] | undefined;
+ 'strict-transport-security'?: string | undefined;
+ tk?: string | undefined;
+ trailer?: string | undefined;
+ 'transfer-encoding'?: string | undefined;
+ upgrade?: string | undefined;
+ 'user-agent'?: string | undefined;
+ vary?: string | undefined;
+ via?: string | undefined;
+ warning?: string | undefined;
+ 'www-authenticate'?: string | undefined;
+ }
+ // outgoing headers allows numbers (as they are converted internally to strings)
+ type OutgoingHttpHeader = number | string | string[];
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
+ interface ClientRequestArgs {
+ signal?: AbortSignal | undefined;
+ protocol?: string | null | undefined;
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ family?: number | undefined;
+ port?: number | string | null | undefined;
+ defaultPort?: number | string | undefined;
+ localAddress?: string | undefined;
+ socketPath?: string | undefined;
+ /**
+ * @default 8192
+ */
+ maxHeaderSize?: number | undefined;
+ method?: string | undefined;
+ path?: string | null | undefined;
+ headers?: OutgoingHttpHeaders | undefined;
+ auth?: string | null | undefined;
+ agent?: Agent | boolean | undefined;
+ _defaultAgent?: Agent | undefined;
+ timeout?: number | undefined;
+ setHost?: boolean | undefined;
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
+ createConnection?:
+ | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
+ | undefined;
+ lookup?: LookupFunction | undefined;
+ }
+ interface ServerOptions<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > {
+ IncomingMessage?: Request | undefined;
+ ServerResponse?: Response | undefined;
+ /**
+ * Optionally overrides the value of
+ * `--max-http-header-size` for requests received by this server, i.e.
+ * the maximum length of request headers in bytes.
+ * @default 8192
+ */
+ maxHeaderSize?: number | undefined;
+ /**
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
+ * Using the insecure parser should be avoided.
+ * See --insecure-http-parser for more information.
+ * @default false
+ */
+ insecureHTTPParser?: boolean | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default false
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ }
+ type RequestListener<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > = (req: InstanceType<Request>, res: InstanceType<Response> & { req: InstanceType<Request> }) => void;
+ /**
+ * @since v0.1.17
+ */
+ class Server<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > extends NetServer {
+ constructor(requestListener?: RequestListener<Request, Response>);
+ constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
+ /**
+ * Sets the timeout value for sockets, and emits a `'timeout'` event on
+ * the Server object, passing the socket as an argument, if a timeout
+ * occurs.
+ *
+ * If there is a `'timeout'` event listener on the Server object, then it
+ * will be called with the timed-out socket as an argument.
+ *
+ * By default, the Server does not timeout sockets. However, if a callback
+ * is assigned to the Server's `'timeout'` event, timeouts must be handled
+ * explicitly.
+ * @since v0.9.12
+ * @param [msecs=0 (no timeout)]
+ */
+ setTimeout(msecs?: number, callback?: () => void): this;
+ setTimeout(callback: () => void): this;
+ /**
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+ * @since v0.7.0
+ */
+ maxHeadersCount: number | null;
+ /**
+ * The maximum number of requests socket can handle
+ * before closing keep alive connection.
+ *
+ * A value of `0` will disable the limit.
+ *
+ * When the limit is reached it will set the `Connection` header value to `close`,
+ * but will not actually close the connection, subsequent requests sent
+ * after the limit is reached will get `503 Service Unavailable` as a response.
+ * @since v16.10.0
+ */
+ maxRequestsPerSocket: number | null;
+ /**
+ * The number of milliseconds of inactivity before a socket is presumed
+ * to have timed out.
+ *
+ * A value of `0` will disable the timeout behavior on incoming connections.
+ *
+ * The socket timeout logic is set up on connection, so changing this
+ * value only affects new connections to the server, not any existing connections.
+ * @since v0.9.12
+ */
+ timeout: number;
+ /**
+ * Limit the amount of time the parser will wait to receive the complete HTTP
+ * headers.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v11.3.0, v10.14.0
+ */
+ headersTimeout: number;
+ /**
+ * The number of milliseconds of inactivity a server needs to wait for additional
+ * incoming data, after it has finished writing the last response, before a socket
+ * will be destroyed. If the server receives new data before the keep-alive
+ * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`.
+ *
+ * A value of `0` will disable the keep-alive timeout behavior on incoming
+ * connections.
+ * A value of `0` makes the http server behave similarly to Node.js versions prior
+ * to 8.0.0, which did not have a keep-alive timeout.
+ *
+ * The socket timeout logic is set up on connection, so changing this value only
+ * affects new connections to the server, not any existing connections.
+ * @since v8.0.0
+ */
+ keepAliveTimeout: number;
+ /**
+ * Sets the timeout value in milliseconds for receiving the entire request from
+ * the client.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v14.11.0
+ */
+ requestTimeout: number;
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ addListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ addListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ addListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ on(event: 'request', listener: RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ once(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ once(event: 'request', listener: RequestListener<Request, Response>): this;
+ once(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependOnceListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ }
+ /**
+ * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract of outgoing message from
+ * the perspective of the participants of HTTP transaction.
+ * @since v0.1.17
+ */
+ class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
+ readonly req: Request;
+ chunkedEncoding: boolean;
+ shouldKeepAlive: boolean;
+ useChunkedEncodingByDefault: boolean;
+ sendDate: boolean;
+ /**
+ * @deprecated Use `writableEnded` instead.
+ */
+ finished: boolean;
+ /**
+ * Read-only. `true` if the headers were sent, otherwise `false`.
+ * @since v0.9.3
+ */
+ readonly headersSent: boolean;
+ /**
+ * Aliases of `outgoingMessage.socket`
+ * @since v0.3.0
+ * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
+ */
+ readonly connection: Socket | null;
+ /**
+ * Reference to the underlying socket. Usually, users will not want to access
+ * this property.
+ *
+ * After calling `outgoingMessage.end()`, this property will be nulled.
+ * @since v0.3.0
+ */
+ readonly socket: Socket | null;
+ constructor();
+ /**
+ * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter.
+ * @since v0.9.12
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * Sets a single header value for the header object.
+ * @since v0.4.0
+ * @param name Header name
+ * @param value Header value
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): this;
+ /**
+ * Gets the value of HTTP header with the given name. If such a name doesn't
+ * exist in message, it will be `undefined`.
+ * @since v0.4.0
+ * @param name Name of header
+ */
+ getHeader(name: string): number | string | string[] | undefined;
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow
+ * copy is used, array values may be mutated without additional calls to
+ * various header-related HTTP module methods. The keys of the returned
+ * object are the header names and the values are the respective header
+ * values. All header names are lowercase.
+ *
+ * The object returned by the `outgoingMessage.getHeaders()` method does
+ * not prototypically inherit from the JavaScript Object. This means that
+ * typical Object methods such as `obj.toString()`, `obj.hasOwnProperty()`,
+ * and others are not defined and will not work.
+ *
+ * ```js
+ * outgoingMessage.setHeader('Foo', 'bar');
+ * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = outgoingMessage.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v7.7.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns an array of names of headers of the outgoing outgoingMessage. All
+ * names are lowercase.
+ * @since v7.7.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = outgoingMessage.hasHeader('content-type');
+ * ```
+ * @since v7.7.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that is queued for implicit sending.
+ *
+ * ```js
+ * outgoingMessage.removeHeader('Content-Encoding');
+ * ```
+ * @since v0.4.0
+ * @param name Header name
+ */
+ removeHeader(name: string): void;
+ /**
+ * Adds HTTP trailers (headers but at the end of the message) to the message.
+ *
+ * Trailers are **only** be emitted if the message is chunked encoded. If not,
+ * the trailer will be silently discarded.
+ *
+ * HTTP requires the `Trailer` header to be sent to emit trailers,
+ * with a list of header fields in its value, e.g.
+ *
+ * ```js
+ * message.writeHead(200, { 'Content-Type': 'text/plain',
+ * 'Trailer': 'Content-MD5' });
+ * message.write(fileData);
+ * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' });
+ * message.end();
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v0.3.0
+ */
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
+ /**
+ * Compulsorily flushes the message headers
+ *
+ * For efficiency reason, Node.js normally buffers the message headers
+ * until `outgoingMessage.end()` is called or the first chunk of message data
+ * is written. It then tries to pack the headers and data into a single TCP
+ * packet.
+ *
+ * It is usually desired (it saves a TCP round-trip), but not when the first
+ * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the request.
+ * @since v1.6.0
+ */
+ flushHeaders(): void;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v0.1.17
+ */
+ class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v0.4.0
+ */
+ statusCode: number;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status message that will be sent to the client when
+ * the headers get flushed. If this is left as `undefined` then the standard
+ * message for the status code will be used.
+ *
+ * ```js
+ * response.statusMessage = 'Not found';
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status message which was sent out.
+ * @since v0.11.8
+ */
+ statusMessage: string;
+ constructor(req: Request);
+ assignSocket(socket: Socket): void;
+ detachSocket(socket: Socket): void;
+ /**
+ * Sends a HTTP/1.1 100 Continue message to the client, indicating that
+ * the request body should be sent. See the `'checkContinue'` event on`Server`.
+ * @since v0.3.0
+ */
+ writeContinue(callback?: () => void): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ * Optionally one can give a human-readable `statusMessage` as the second
+ * argument.
+ *
+ * `headers` may be an `Array` where the keys and values are in the same list.
+ * It is _not_ a list of tuples. So, the even-numbered offsets are key values,
+ * and the odd-numbered offsets are the associated values. The array is in the same
+ * format as `request.rawHeaders`.
+ *
+ * Returns a reference to the `ServerResponse`, so that calls can be chained.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response
+ * .writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain'
+ * })
+ * .end(body);
+ * ```
+ *
+ * This method must only be called once on a message and it must
+ * be called before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * If this method is called and `response.setHeader()` has not been called,
+ * it will directly write the supplied header values onto the network channel
+ * without caching internally, and the `response.getHeader()` on the header
+ * will not yield the expected result. If progressive population of headers is
+ * desired with potential future retrieval and modification, use `response.setHeader()` instead.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * `Content-Length` is given in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js
+ * does not check whether `Content-Length` and the length of the body which has
+ * been transmitted are equal or not.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v0.1.30
+ */
+ writeHead(
+ statusCode: number,
+ statusMessage?: string,
+ headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
+ ): this;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
+ /**
+ * Sends a HTTP/1.1 102 Processing message to the client, indicating that
+ * the request body should be sent.
+ * @since v10.0.0
+ */
+ writeProcessing(): void;
+ }
+ interface InformationEvent {
+ statusCode: number;
+ statusMessage: string;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ headers: IncomingHttpHeaders;
+ rawHeaders: string[];
+ }
+ /**
+ * This object is created internally and returned from {@link request}. It
+ * represents an _in-progress_ request whose header has already been queued. The
+ * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will
+ * be sent along with the first data chunk or when calling `request.end()`.
+ *
+ * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response
+ * headers have been received. The `'response'` event is executed with one
+ * argument which is an instance of {@link IncomingMessage}.
+ *
+ * During the `'response'` event, one can add listeners to the
+ * response object; particularly to listen for the `'data'` event.
+ *
+ * If no `'response'` handler is added, then the response will be
+ * entirely discarded. However, if a `'response'` event handler is added,
+ * then the data from the response object **must** be consumed, either by
+ * calling `response.read()` whenever there is a `'readable'` event, or
+ * by adding a `'data'` handler, or by calling the `.resume()` method.
+ * Until the data is consumed, the `'end'` event will not fire. Also, until
+ * the data is read it will consume memory that can eventually lead to a
+ * 'process out of memory' error.
+ *
+ * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered.
+ *
+ * Node.js does not check whether Content-Length and the length of the
+ * body which has been transmitted are equal or not.
+ * @since v0.1.17
+ */
+ class ClientRequest extends OutgoingMessage {
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v0.11.14
+ * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead.
+ */
+ aborted: boolean;
+ /**
+ * The request host.
+ * @since v14.5.0, v12.19.0
+ */
+ host: string;
+ /**
+ * The request protocol.
+ * @since v14.5.0, v12.19.0
+ */
+ protocol: string;
+ /**
+ * When sending request through a keep-alive enabled agent, the underlying socket
+ * might be reused. But if server closes connection at unfortunate time, client
+ * may run into a 'ECONNRESET' error.
+ *
+ * ```js
+ * const http = require('http');
+ *
+ * // Server has a 5 seconds keep-alive timeout by default
+ * http
+ * .createServer((req, res) => {
+ * res.write('hello\n');
+ * res.end();
+ * })
+ * .listen(3000);
+ *
+ * setInterval(() => {
+ * // Adapting a keep-alive agent
+ * http.get('http://localhost:3000', { agent }, (res) => {
+ * res.on('data', (data) => {
+ * // Do nothing
+ * });
+ * });
+ * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
+ * ```
+ *
+ * By marking a request whether it reused socket or not, we can do
+ * automatic error retry base on it.
+ *
+ * ```js
+ * const http = require('http');
+ * const agent = new http.Agent({ keepAlive: true });
+ *
+ * function retriableRequest() {
+ * const req = http
+ * .get('http://localhost:3000', { agent }, (res) => {
+ * // ...
+ * })
+ * .on('error', (err) => {
+ * // Check if retry is needed
+ * if (req.reusedSocket &#x26;&#x26; err.code === 'ECONNRESET') {
+ * retriableRequest();
+ * }
+ * });
+ * }
+ *
+ * retriableRequest();
+ * ```
+ * @since v13.0.0, v12.16.0
+ */
+ reusedSocket: boolean;
+ /**
+ * Limits maximum response headers count. If set to 0, no limit will be applied.
+ */
+ maxHeadersCount: number;
+ constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
+ /**
+ * The request method.
+ * @since v0.1.97
+ */
+ method: string;
+ /**
+ * The request path.
+ * @since v0.4.0
+ */
+ path: string;
+ /**
+ * Marks the request as aborting. Calling this will cause remaining data
+ * in the response to be dropped and the socket to be destroyed.
+ * @since v0.3.8
+ * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
+ */
+ abort(): void;
+ onSocket(socket: Socket): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
+ * @since v0.5.9
+ * @param timeout Milliseconds before a request times out.
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called.
+ * @since v0.5.9
+ */
+ setNoDelay(noDelay?: boolean): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called.
+ * @since v0.5.9
+ */
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ /**
+ * Returns an array containing the unique names of the current outgoing raw
+ * headers. Header names are returned with their exact casing being set.
+ *
+ * ```js
+ * request.setHeader('Foo', 'bar');
+ * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = request.getRawHeaderNames();
+ * // headerNames === ['Foo', 'Set-Cookie']
+ * ```
+ * @since v15.13.0, v14.17.0
+ */
+ getRawHeaderNames(): string[];
+ /**
+ * @deprecated
+ */
+ addListener(event: 'abort', listener: () => void): this;
+ addListener(
+ event: 'connect',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ addListener(event: 'continue', listener: () => void): this;
+ addListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ addListener(event: 'socket', listener: (socket: Socket) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(
+ event: 'upgrade',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ on(event: 'abort', listener: () => void): this;
+ on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'continue', listener: () => void): this;
+ on(event: 'information', listener: (info: InformationEvent) => void): this;
+ on(event: 'response', listener: (response: IncomingMessage) => void): this;
+ on(event: 'socket', listener: (socket: Socket) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ once(event: 'abort', listener: () => void): this;
+ once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'continue', listener: () => void): this;
+ once(event: 'information', listener: (info: InformationEvent) => void): this;
+ once(event: 'response', listener: (response: IncomingMessage) => void): this;
+ once(event: 'socket', listener: (socket: Socket) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependListener(event: 'abort', listener: () => void): this;
+ prependListener(
+ event: 'connect',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'continue', listener: () => void): this;
+ prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(
+ event: 'upgrade',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependOnceListener(event: 'abort', listener: () => void): this;
+ prependOnceListener(
+ event: 'connect',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'continue', listener: () => void): this;
+ prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(
+ event: 'upgrade',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
+ * access response
+ * status, headers and data.
+ *
+ * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to
+ * parse and emit the incoming HTTP headers and payload, as the underlying socket
+ * may be reused multiple times in case of keep-alive.
+ * @since v0.1.17
+ */
+ class IncomingMessage extends stream.Readable {
+ constructor(socket: Socket);
+ /**
+ * The `message.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
+ */
+ aborted: boolean;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server.
+ * Probably either `'1.1'` or `'1.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v0.1.1
+ */
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ /**
+ * The `message.complete` property will be `true` if a complete HTTP message has
+ * been received and successfully parsed.
+ *
+ * This property is particularly useful as a means of determining if a client or
+ * server fully transmitted a message before a connection was terminated:
+ *
+ * ```js
+ * const req = http.request({
+ * host: '127.0.0.1',
+ * port: 8080,
+ * method: 'POST'
+ * }, (res) => {
+ * res.resume();
+ * res.on('end', () => {
+ * if (!res.complete)
+ * console.error(
+ * 'The connection was terminated while the message was still being sent');
+ * });
+ * });
+ * ```
+ * @since v0.3.0
+ */
+ complete: boolean;
+ /**
+ * Alias for `message.socket`.
+ * @since v0.1.90
+ * @deprecated Since v16.0.0 - Use `socket`.
+ */
+ connection: Socket;
+ /**
+ * The `net.Socket` object associated with the connection.
+ *
+ * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
+ * client's authentication details.
+ *
+ * This property is guaranteed to be an instance of the `net.Socket` class,
+ * a subclass of `stream.Duplex`, unless the user specified a socket
+ * type other than `net.Socket` or internally nulled.
+ * @since v0.3.0
+ */
+ socket: Socket;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.getHeaders());
+ * ```
+ *
+ * Duplicates in raw headers are handled in the following ways, depending on the
+ * header name:
+ *
+ * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`,
+ * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded.
+ * * `set-cookie` is always an array. Duplicates are added to the array.
+ * * For duplicate `cookie` headers, the values are joined together with '; '.
+ * * For all other headers, the values are joined together with ', '.
+ * @since v0.1.5
+ */
+ headers: IncomingHttpHeaders;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v0.11.6
+ */
+ rawHeaders: string[];
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v0.3.0
+ */
+ trailers: NodeJS.Dict<string>;
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v0.11.6
+ */
+ rawTrailers: string[];
+ /**
+ * Calls `message.socket.setTimeout(msecs, callback)`.
+ * @since v0.5.9
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`.
+ * @since v0.1.1
+ */
+ method?: string | undefined;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. Take the following request:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * To parse the URL into its parts:
+ *
+ * ```js
+ * new URL(request.url, `http://${request.getHeaders().host}`);
+ * ```
+ *
+ * When `request.url` is `'/status?name=ryan'` and`request.getHeaders().host` is `'localhost:3000'`:
+ *
+ * ```console
+ * $ node
+ * > new URL(request.url, `http://${request.getHeaders().host}`)
+ * URL {
+ * href: 'http://localhost:3000/status?name=ryan',
+ * origin: 'http://localhost:3000',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'localhost:3000',
+ * hostname: 'localhost',
+ * port: '3000',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v0.1.90
+ */
+ url?: string | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The 3-digit HTTP response status code. E.G. `404`.
+ * @since v0.1.1
+ */
+ statusCode?: number | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`.
+ * @since v0.11.10
+ */
+ statusMessage?: string | undefined;
+ /**
+ * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed
+ * as an argument to any listeners on the event.
+ * @since v0.3.0
+ */
+ destroy(error?: Error): this;
+ }
+ interface AgentOptions extends Partial<TcpSocketConnectOpts> {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number | undefined;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number | undefined;
+ /**
+ * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
+ */
+ maxTotalSockets?: number | undefined;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number | undefined;
+ /**
+ * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
+ */
+ timeout?: number | undefined;
+ /**
+ * Scheduling strategy to apply when picking the next free socket to use.
+ * @default `lifo`
+ */
+ scheduling?: 'fifo' | 'lifo' | undefined;
+ }
+ /**
+ * An `Agent` is responsible for managing connection persistence
+ * and reuse for HTTP clients. It maintains a queue of pending requests
+ * for a given host and port, reusing a single socket connection for each
+ * until the queue is empty, at which time the socket is either destroyed
+ * or put into a pool where it is kept to be used again for requests to the
+ * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`.
+ *
+ * Pooled connections have TCP Keep-Alive enabled for them, but servers may
+ * still close idle connections, in which case they will be removed from the
+ * pool and a new connection will be made when a new HTTP request is made for
+ * that host and port. Servers may also refuse to allow multiple requests
+ * over the same connection, in which case the connection will have to be
+ * remade for every request and cannot be pooled. The `Agent` will still make
+ * the requests to that server, but each one will occur over a new connection.
+ *
+ * When a connection is closed by the client or the server, it is removed
+ * from the pool. Any unused sockets in the pool will be unrefed so as not
+ * to keep the Node.js process running when there are no outstanding requests.
+ * (see `socket.unref()`).
+ *
+ * It is good practice, to `destroy()` an `Agent` instance when it is no
+ * longer in use, because unused sockets consume OS resources.
+ *
+ * Sockets are removed from an agent when the socket emits either
+ * a `'close'` event or an `'agentRemove'` event. When intending to keep one
+ * HTTP request open for a long time without keeping it in the agent, something
+ * like the following may be done:
+ *
+ * ```js
+ * http.get(options, (res) => {
+ * // Do stuff
+ * }).on('socket', (socket) => {
+ * socket.emit('agentRemove');
+ * });
+ * ```
+ *
+ * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options
+ * will be used
+ * for the client connection.
+ *
+ * `agent:false`:
+ *
+ * ```js
+ * http.get({
+ * hostname: 'localhost',
+ * port: 80,
+ * path: '/',
+ * agent: false // Create a new agent just for this one request
+ * }, (res) => {
+ * // Do stuff with response
+ * });
+ * ```
+ * @since v0.3.4
+ */
+ class Agent {
+ /**
+ * By default set to 256\. For agents with `keepAlive` enabled, this
+ * sets the maximum number of sockets that will be left open in the free
+ * state.
+ * @since v0.11.7
+ */
+ maxFreeSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open per origin. Origin is the returned value of `agent.getName()`.
+ * @since v0.3.6
+ */
+ maxSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open. Unlike `maxSockets`, this parameter applies across all origins.
+ * @since v14.5.0, v12.19.0
+ */
+ maxTotalSockets: number;
+ /**
+ * An object which contains arrays of sockets currently awaiting use by
+ * the agent when `keepAlive` is enabled. Do not modify.
+ *
+ * Sockets in the `freeSockets` list will be automatically destroyed and
+ * removed from the array on `'timeout'`.
+ * @since v0.11.4
+ */
+ readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains arrays of sockets currently in use by the
+ * agent. Do not modify.
+ * @since v0.3.6
+ */
+ readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains queues of requests that have not yet been assigned to
+ * sockets. Do not modify.
+ * @since v0.5.9
+ */
+ readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
+ constructor(opts?: AgentOptions);
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ *
+ * It is usually not necessary to do this. However, if using an
+ * agent with `keepAlive` enabled, then it is best to explicitly shut down
+ * the agent when it is no longer needed. Otherwise,
+ * sockets might stay open for quite a long time before the server
+ * terminates them.
+ * @since v0.11.4
+ */
+ destroy(): void;
+ }
+ const METHODS: string[];
+ const STATUS_CODES: {
+ [errorCode: number]: string | undefined;
+ [errorCode: string]: string | undefined;
+ };
+ /**
+ * Returns a new instance of {@link Server}.
+ *
+ * The `requestListener` is a function which is automatically
+ * added to the `'request'` event.
+ * @since v0.1.13
+ */
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
+ // create interface RequestOptions would make the naming more clear to developers
+ interface RequestOptions extends ClientRequestArgs {}
+ /**
+ * `options` in `socket.connect()` are also supported.
+ *
+ * Node.js maintains several connections per server to make HTTP requests.
+ * This function allows one to transparently issue requests.
+ *
+ * `url` can be a string or a `URL` object. If `url` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for
+ * the `'response'` event.
+ *
+ * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const http = require('http');
+ *
+ * const postData = JSON.stringify({
+ * 'msg': 'Hello World!'
+ * });
+ *
+ * const options = {
+ * hostname: 'www.google.com',
+ * port: 80,
+ * path: '/upload',
+ * method: 'POST',
+ * headers: {
+ * 'Content-Type': 'application/json',
+ * 'Content-Length': Buffer.byteLength(postData)
+ * }
+ * };
+ *
+ * const req = http.request(options, (res) => {
+ * console.log(`STATUS: ${res.statusCode}`);
+ * console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
+ * res.setEncoding('utf8');
+ * res.on('data', (chunk) => {
+ * console.log(`BODY: ${chunk}`);
+ * });
+ * res.on('end', () => {
+ * console.log('No more data in response.');
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(`problem with request: ${e.message}`);
+ * });
+ *
+ * // Write data to request body
+ * req.write(postData);
+ * req.end();
+ * ```
+ *
+ * In the example `req.end()` was called. With `http.request()` one
+ * must always call `req.end()` to signify the end of the request -
+ * even if there is no data being written to the request body.
+ *
+ * If any error is encountered during the request (be that with DNS resolution,
+ * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
+ * on the returned request object. As with all `'error'` events, if no listeners
+ * are registered the error will be thrown.
+ *
+ * There are a few special headers that should be noted.
+ *
+ * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to
+ * the server should be persisted until the next request.
+ * * Sending a 'Content-Length' header will disable the default chunked encoding.
+ * * Sending an 'Expect' header will immediately send the request headers.
+ * Usually, when sending 'Expect: 100-continue', both a timeout and a listener
+ * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more
+ * information.
+ * * Sending an Authorization header will override using the `auth` option
+ * to compute basic authentication.
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('http://abc:xyz@example.com');
+ *
+ * const req = http.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * In a successful request, the following events will be emitted in the following
+ * order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * (`'data'` will not be emitted at all if the response body is empty, for
+ * instance, in most redirects)
+ * * `'end'` on the `res` object
+ * * `'close'`
+ *
+ * In the case of a connection error, the following events will be emitted:
+ *
+ * * `'socket'`
+ * * `'error'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close before the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close after the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (connection closed here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.destroy()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.destroy()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.destroy()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.destroy()` called here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.abort()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * Setting the `timeout` option or using the `setTimeout()` function will
+ * not abort the request or do anything besides add a `'timeout'` event.
+ *
+ * Passing an `AbortSignal` and then calling `abort` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the
+ * request itself.
+ * @since v0.3.6
+ */
+ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function request(
+ url: string | URL,
+ options: RequestOptions,
+ callback?: (res: IncomingMessage) => void,
+ ): ClientRequest;
+ /**
+ * Since most requests are GET requests without bodies, Node.js provides this
+ * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the
+ * response
+ * data for reasons stated in {@link ClientRequest} section.
+ *
+ * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}.
+ *
+ * JSON fetching example:
+ *
+ * ```js
+ * http.get('http://localhost:8000/', (res) => {
+ * const { statusCode } = res;
+ * const contentType = res.headers['content-type'];
+ *
+ * let error;
+ * // Any 2xx status code signals a successful response but
+ * // here we're only checking for 200.
+ * if (statusCode !== 200) {
+ * error = new Error('Request Failed.\n' +
+ * `Status Code: ${statusCode}`);
+ * } else if (!/^application\/json/.test(contentType)) {
+ * error = new Error('Invalid content-type.\n' +
+ * `Expected application/json but received ${contentType}`);
+ * }
+ * if (error) {
+ * console.error(error.message);
+ * // Consume response data to free up memory
+ * res.resume();
+ * return;
+ * }
+ *
+ * res.setEncoding('utf8');
+ * let rawData = '';
+ * res.on('data', (chunk) => { rawData += chunk; });
+ * res.on('end', () => {
+ * try {
+ * const parsedData = JSON.parse(rawData);
+ * console.log(parsedData);
+ * } catch (e) {
+ * console.error(e.message);
+ * }
+ * });
+ * }).on('error', (e) => {
+ * console.error(`Got error: ${e.message}`);
+ * });
+ *
+ * // Create a local server to receive data from
+ * const server = http.createServer((req, res) => {
+ * res.writeHead(200, { 'Content-Type': 'application/json' });
+ * res.end(JSON.stringify({
+ * data: 'Hello World!'
+ * }));
+ * });
+ *
+ * server.listen(8000);
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored.
+ */
+ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ let globalAgent: Agent;
+ /**
+ * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
+ * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option.
+ */
+ const maxHeaderSize: number;
+}
+declare module 'node:http' {
+ export * from 'http';
+}
diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts
new file mode 100755
index 0000000..0f628b9
--- /dev/null
+++ b/node_modules/@types/node/http2.d.ts
@@ -0,0 +1,2106 @@
+/**
+ * The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. It
+ * can be accessed using:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * ```
+ * @since v8.4.0
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http2.js)
+ */
+declare module 'http2' {
+ import EventEmitter = require('node:events');
+ import * as fs from 'node:fs';
+ import * as net from 'node:net';
+ import * as stream from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as url from 'node:url';
+ import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
+ export { OutgoingHttpHeaders } from 'node:http';
+ export interface IncomingHttpStatusHeader {
+ ':status'?: number | undefined;
+ }
+ export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
+ ':path'?: string | undefined;
+ ':method'?: string | undefined;
+ ':authority'?: string | undefined;
+ ':scheme'?: string | undefined;
+ }
+ // Http2Stream
+ export interface StreamPriorityOptions {
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ silent?: boolean | undefined;
+ }
+ export interface StreamState {
+ localWindowSize?: number | undefined;
+ state?: number | undefined;
+ localClose?: number | undefined;
+ remoteClose?: number | undefined;
+ sumDependencyWeight?: number | undefined;
+ weight?: number | undefined;
+ }
+ export interface ServerStreamResponseOptions {
+ endStream?: boolean | undefined;
+ waitForTrailers?: boolean | undefined;
+ }
+ export interface StatOptions {
+ offset: number;
+ length: number;
+ }
+ export interface ServerStreamFileResponseOptions {
+ statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
+ waitForTrailers?: boolean | undefined;
+ offset?: number | undefined;
+ length?: number | undefined;
+ }
+ export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
+ onError?(err: NodeJS.ErrnoException): void;
+ }
+ export interface Http2Stream extends stream.Duplex {
+ /**
+ * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set,
+ * the `'aborted'` event will have been emitted.
+ * @since v8.4.0
+ */
+ readonly aborted: boolean;
+ /**
+ * This property shows the number of characters currently buffered to be written.
+ * See `net.Socket.bufferSize` for details.
+ * @since v11.2.0, v10.16.0
+ */
+ readonly bufferSize: number;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been closed.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer
+ * usable.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Set to `true` if the `END_STREAM` flag was set in the request or response
+ * HEADERS frame received, indicating that no additional data should be received
+ * and the readable side of the `Http2Stream` will be closed.
+ * @since v10.11.0
+ */
+ readonly endAfterHeaders: boolean;
+ /**
+ * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined`if the stream identifier has not yet been assigned.
+ * @since v8.4.0
+ */
+ readonly id?: number | undefined;
+ /**
+ * Set to `true` if the `Http2Stream` instance has not yet been assigned a
+ * numeric stream identifier.
+ * @since v9.4.0
+ */
+ readonly pending: boolean;
+ /**
+ * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is
+ * destroyed after either receiving an `RST_STREAM` frame from the connected peer,
+ * calling `http2stream.close()`, or `http2stream.destroy()`. Will be`undefined` if the `Http2Stream` has not been closed.
+ * @since v8.4.0
+ */
+ readonly rstCode: number;
+ /**
+ * An object containing the outbound headers sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentHeaders: OutgoingHttpHeaders;
+ /**
+ * An array of objects containing the outbound informational (additional) headers
+ * sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined;
+ /**
+ * An object containing the outbound trailers sent for this `HttpStream`.
+ * @since v9.5.0
+ */
+ readonly sentTrailers?: OutgoingHttpHeaders | undefined;
+ /**
+ * A reference to the `Http2Session` instance that owns this `Http2Stream`. The
+ * value will be `undefined` after the `Http2Stream` instance is destroyed.
+ * @since v8.4.0
+ */
+ readonly session: Http2Session;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Stream`.
+ *
+ * A current state of this `Http2Stream`.
+ * @since v8.4.0
+ */
+ readonly state: StreamState;
+ /**
+ * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the
+ * connected HTTP/2 peer.
+ * @since v8.4.0
+ * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code.
+ * @param callback An optional function registered to listen for the `'close'` event.
+ */
+ close(code?: number, callback?: () => void): void;
+ /**
+ * Updates the priority for this `Http2Stream` instance.
+ * @since v8.4.0
+ */
+ priority(options: StreamPriorityOptions): void;
+ /**
+ * ```js
+ * const http2 = require('http2');
+ * const client = http2.connect('http://example.org:8000');
+ * const { NGHTTP2_CANCEL } = http2.constants;
+ * const req = client.request({ ':path': '/' });
+ *
+ * // Cancel the stream if there's no activity after 5 seconds
+ * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL));
+ * ```
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method
+ * will cause the `Http2Stream` to be immediately closed and must only be
+ * called after the `'wantTrailers'` event has been emitted. When sending a
+ * request or sending a response, the `options.waitForTrailers` option must be set
+ * in order to keep the `Http2Stream` open after the final `DATA` frame so that
+ * trailers can be sent.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond(undefined, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ xyz: 'abc' });
+ * });
+ * stream.end('Hello World');
+ * });
+ * ```
+ *
+ * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header
+ * fields (e.g. `':method'`, `':path'`, etc).
+ * @since v10.0.0
+ */
+ sendTrailers(headers: OutgoingHttpHeaders): void;
+ addListener(event: 'aborted', listener: () => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'streamClosed', listener: (code: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'wantTrailers', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted'): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: 'streamClosed', code: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'trailers', trailers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'wantTrailers'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: () => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'streamClosed', listener: (code: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'wantTrailers', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: () => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'streamClosed', listener: (code: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'wantTrailers', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: () => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'wantTrailers', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: () => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'wantTrailers', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Stream extends Http2Stream {
+ addListener(event: 'continue', listener: () => {}): this;
+ addListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'continue'): boolean;
+ emit(event: 'headers', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: 'push', headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'response', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'continue', listener: () => {}): this;
+ on(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'continue', listener: () => {}): this;
+ once(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'continue', listener: () => {}): this;
+ prependListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'continue', listener: () => {}): this;
+ prependOnceListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ServerHttp2Stream extends Http2Stream {
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote
+ * client's most recent `SETTINGS` frame. Will be `true` if the remote peer
+ * accepts push streams, `false` otherwise. Settings are the same for every`Http2Stream` in the same `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly pushAllowed: boolean;
+ /**
+ * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.
+ * @since v8.4.0
+ */
+ additionalHeaders(headers: OutgoingHttpHeaders): void;
+ /**
+ * Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => {
+ * if (err) throw err;
+ * pushStream.respond({ ':status': 200 });
+ * pushStream.end('some pushed data');
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass
+ * a `weight` value to `http2stream.priority` with the `silent` option set to`true` to enable server-side bandwidth balancing between concurrent streams.
+ *
+ * Calling `http2stream.pushStream()` from within a pushed stream is not permitted
+ * and will throw an error.
+ * @since v8.4.0
+ * @param callback Callback that is called once the push stream has been initiated.
+ */
+ pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ /**
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 }, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
+ /**
+ * Initiates a response whose data is read from the given file descriptor. No
+ * validation is performed on the given file descriptor. If an error occurs while
+ * attempting to read data using the file descriptor, the `Http2Stream` will be
+ * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const fs = require('fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8'
+ * };
+ * stream.respondWithFD(fd, headers);
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given fd. If the `statCheck` function is provided, the`http2stream.respondWithFD()` method will perform an `fs.fstat()` call to
+ * collect details on the provided file descriptor.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The file descriptor or `FileHandle` is not closed when the stream is closed,
+ * so it will need to be closed manually once it is no longer needed.
+ * Using the same file descriptor concurrently for multiple streams
+ * is not supported and may result in data loss. Re-using a file descriptor
+ * after a stream has finished is supported.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const fs = require('fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8'
+ * };
+ * stream.respondWithFD(fd, headers, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ *
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ * @since v8.4.0
+ * @param fd A readable file descriptor.
+ */
+ respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
+ /**
+ * Sends a regular file as the response. The `path` must specify a regular file
+ * or an `'error'` event will be emitted on the `Http2Stream` object.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given file:
+ *
+ * If an error occurs while attempting to read the file data, the `Http2Stream`will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`code. If the `onError` callback is
+ * defined, then it will be called. Otherwise
+ * the stream will be destroyed.
+ *
+ * Example using a file path:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * headers['last-modified'] = stat.mtime.toUTCString();
+ * }
+ *
+ * function onError(err) {
+ * // stream.respond() can throw if the stream has been destroyed by
+ * // the other side.
+ * try {
+ * if (err.code === 'ENOENT') {
+ * stream.respond({ ':status': 404 });
+ * } else {
+ * stream.respond({ ':status': 500 });
+ * }
+ * } catch (err) {
+ * // Perform actual error handling.
+ * console.log(err);
+ * }
+ * stream.end();
+ * }
+ *
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck, onError });
+ * });
+ * ```
+ *
+ * The `options.statCheck` function may also be used to cancel the send operation
+ * by returning `false`. For instance, a conditional request may check the stat
+ * results to determine if the file has been modified to return an appropriate`304` response:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * // Check the stat here...
+ * stream.respond({ ':status': 304 });
+ * return false; // Cancel the send operation
+ * }
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck });
+ * });
+ * ```
+ *
+ * The `content-length` header field will be automatically set.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The `options.onError` function may also be used to handle all the errors
+ * that could happen before the delivery of the file is initiated. The
+ * default behavior is to destroy the stream.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
+ }
+ // Http2Session
+ export interface Settings {
+ headerTableSize?: number | undefined;
+ enablePush?: boolean | undefined;
+ initialWindowSize?: number | undefined;
+ maxFrameSize?: number | undefined;
+ maxConcurrentStreams?: number | undefined;
+ maxHeaderListSize?: number | undefined;
+ enableConnectProtocol?: boolean | undefined;
+ }
+ export interface ClientSessionRequestOptions {
+ endStream?: boolean | undefined;
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ waitForTrailers?: boolean | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ export interface SessionState {
+ effectiveLocalWindowSize?: number | undefined;
+ effectiveRecvDataLength?: number | undefined;
+ nextStreamID?: number | undefined;
+ localWindowSize?: number | undefined;
+ lastProcStreamID?: number | undefined;
+ remoteWindowSize?: number | undefined;
+ outboundQueueSize?: number | undefined;
+ deflateDynamicTableSize?: number | undefined;
+ inflateDynamicTableSize?: number | undefined;
+ }
+ export interface Http2Session extends EventEmitter {
+ /**
+ * Value will be `undefined` if the `Http2Session` is not yet connected to a
+ * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or
+ * will return the value of the connected `TLSSocket`'s own `alpnProtocol`property.
+ * @since v9.4.0
+ */
+ readonly alpnProtocol?: string | undefined;
+ /**
+ * Will be `true` if this `Http2Session` instance has been closed, otherwise`false`.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance is still connecting, will be set
+ * to `false` before emitting `connect` event and/or calling the `http2.connect`callback.
+ * @since v10.0.0
+ */
+ readonly connecting: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance has been destroyed and must no
+ * longer be used, otherwise `false`.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Value is `undefined` if the `Http2Session` session socket has not yet been
+ * connected, `true` if the `Http2Session` is connected with a `TLSSocket`,
+ * and `false` if the `Http2Session` is connected to any other kind of socket
+ * or stream.
+ * @since v9.4.0
+ */
+ readonly encrypted?: boolean | undefined;
+ /**
+ * A prototype-less object describing the current local settings of this`Http2Session`. The local settings are local to _this_`Http2Session` instance.
+ * @since v8.4.0
+ */
+ readonly localSettings: Settings;
+ /**
+ * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property
+ * will return an `Array` of origins for which the `Http2Session` may be
+ * considered authoritative.
+ *
+ * The `originSet` property is only available when using a secure TLS connection.
+ * @since v9.4.0
+ */
+ readonly originSet?: string[] | undefined;
+ /**
+ * Indicates whether the `Http2Session` is currently waiting for acknowledgment of
+ * a sent `SETTINGS` frame. Will be `true` after calling the`http2session.settings()` method. Will be `false` once all sent `SETTINGS`frames have been acknowledged.
+ * @since v8.4.0
+ */
+ readonly pendingSettingsAck: boolean;
+ /**
+ * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer.
+ * @since v8.4.0
+ */
+ readonly remoteSettings: Settings;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * limits available methods to ones safe to use with HTTP/2.
+ *
+ * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw
+ * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information.
+ *
+ * `setTimeout` method will be called on this `Http2Session`.
+ *
+ * All other interactions will be routed directly to the socket.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Session`.
+ *
+ * An object describing the current status of this `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly state: SessionState;
+ /**
+ * The `http2session.type` will be equal to`http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a
+ * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a
+ * client.
+ * @since v8.4.0
+ */
+ readonly type: number;
+ /**
+ * Gracefully closes the `Http2Session`, allowing any existing streams to
+ * complete on their own and preventing new `Http2Stream` instances from being
+ * created. Once closed, `http2session.destroy()`_might_ be called if there
+ * are no open `Http2Stream` instances.
+ *
+ * If specified, the `callback` function is registered as a handler for the`'close'` event.
+ * @since v9.4.0
+ */
+ close(callback?: () => void): void;
+ /**
+ * Immediately terminates the `Http2Session` and the associated `net.Socket` or`tls.TLSSocket`.
+ *
+ * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error`is not undefined, an `'error'` event will be emitted immediately before the`'close'` event.
+ *
+ * If there are any remaining open `Http2Streams` associated with the`Http2Session`, those will also be destroyed.
+ * @since v8.4.0
+ * @param error An `Error` object if the `Http2Session` is being destroyed due to an error.
+ * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`.
+ */
+ destroy(error?: Error, code?: number): void;
+ /**
+ * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`.
+ * @since v9.4.0
+ * @param code An HTTP/2 error code
+ * @param lastStreamID The numeric ID of the last processed `Http2Stream`
+ * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame.
+ */
+ goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
+ /**
+ * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must
+ * be provided. The method will return `true` if the `PING` was sent, `false`otherwise.
+ *
+ * The maximum number of outstanding (unacknowledged) pings is determined by the`maxOutstandingPings` configuration option. The default maximum is 10.
+ *
+ * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`containing 8 bytes of data that will be transmitted with the `PING` and
+ * returned with the ping acknowledgment.
+ *
+ * The callback will be invoked with three arguments: an error argument that will
+ * be `null` if the `PING` was successfully acknowledged, a `duration` argument
+ * that reports the number of milliseconds elapsed since the ping was sent and the
+ * acknowledgment was received, and a `Buffer` containing the 8-byte `PING`payload.
+ *
+ * ```js
+ * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => {
+ * if (!err) {
+ * console.log(`Ping acknowledged in ${duration} milliseconds`);
+ * console.log(`With payload '${payload.toString()}'`);
+ * }
+ * });
+ * ```
+ *
+ * If the `payload` argument is not specified, the default payload will be the
+ * 64-bit timestamp (little endian) marking the start of the `PING` duration.
+ * @since v8.9.3
+ * @param payload Optional ping payload.
+ */
+ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ /**
+ * Calls `ref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ ref(): void;
+ /**
+ * Sets the local endpoint's window size.
+ * The `windowSize` is the total window size to set, not
+ * the delta.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * const server = http2.createServer();
+ * const expectedWindowSize = 2 ** 20;
+ * server.on('connect', (session) => {
+ *
+ * // Set local window size to be 2 ** 20
+ * session.setLocalWindowSize(expectedWindowSize);
+ * });
+ * ```
+ * @since v15.3.0, v14.18.0
+ */
+ setLocalWindowSize(windowSize: number): void;
+ /**
+ * Used to set a callback function that is called when there is no activity on
+ * the `Http2Session` after `msecs` milliseconds. The given `callback` is
+ * registered as a listener on the `'timeout'` event.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Updates the current local settings for this `Http2Session` and sends a new`SETTINGS` frame to the connected HTTP/2 peer.
+ *
+ * Once called, the `http2session.pendingSettingsAck` property will be `true`while the session is waiting for the remote peer to acknowledge the new
+ * settings.
+ *
+ * The new settings will not become effective until the `SETTINGS` acknowledgment
+ * is received and the `'localSettings'` event is emitted. It is possible to send
+ * multiple `SETTINGS` frames while acknowledgment is still pending.
+ * @since v8.4.0
+ * @param callback Callback that is called once the session is connected or right away if the session is already connected.
+ */
+ settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void;
+ /**
+ * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ unref(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ addListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ addListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'ping', listener: () => void): this;
+ addListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number, streamID: number): boolean;
+ emit(event: 'goaway', errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
+ emit(event: 'localSettings', settings: Settings): boolean;
+ emit(event: 'ping'): boolean;
+ emit(event: 'remoteSettings', settings: Settings): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ on(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ on(event: 'localSettings', listener: (settings: Settings) => void): this;
+ on(event: 'ping', listener: () => void): this;
+ on(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ once(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ once(event: 'localSettings', listener: (settings: Settings) => void): this;
+ once(event: 'ping', listener: () => void): this;
+ once(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'ping', listener: () => void): this;
+ prependListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependOnceListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependOnceListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'ping', listener: () => void): this;
+ prependOnceListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Session extends Http2Session {
+ /**
+ * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an
+ * HTTP/2 request to the connected server.
+ *
+ * When a `ClientHttp2Session` is first created, the socket may not yet be
+ * connected. if `clienthttp2session.request()` is called during this time, the
+ * actual request will be deferred until the socket is ready to go.
+ * If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown.
+ *
+ * This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const clientSession = http2.connect('https://localhost:1234');
+ * const {
+ * HTTP2_HEADER_PATH,
+ * HTTP2_HEADER_STATUS
+ * } = http2.constants;
+ *
+ * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' });
+ * req.on('response', (headers) => {
+ * console.log(headers[HTTP2_HEADER_STATUS]);
+ * req.on('data', (chunk) => { // .. });
+ * req.on('end', () => { // .. });
+ * });
+ * ```
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * is emitted immediately after queuing the last chunk of payload data to be sent.
+ * The `http2stream.sendTrailers()` method can then be called to send trailing
+ * headers to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * When `options.signal` is set with an `AbortSignal` and then `abort` on the
+ * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error.
+ *
+ * The `:method` and `:path` pseudo-headers are not specified within `headers`,
+ * they respectively default to:
+ *
+ * * `:method` \= `'GET'`
+ * * `:path` \= `/`
+ * @since v8.4.0
+ */
+ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
+ addListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ addListener(event: 'origin', listener: (origins: string[]) => void): this;
+ addListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'altsvc', alt: string, origin: string, stream: number): boolean;
+ emit(event: 'origin', origins: ReadonlyArray<string>): boolean;
+ emit(event: 'connect', session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ on(event: 'origin', listener: (origins: string[]) => void): this;
+ on(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ once(event: 'origin', listener: (origins: string[]) => void): this;
+ once(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependOnceListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface AlternativeServiceOptions {
+ origin: number | string | url.URL;
+ }
+ export interface ServerHttp2Session extends Http2Session {
+ readonly server: Http2Server | Http2SecureServer;
+ /**
+ * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * const server = http2.createServer();
+ * server.on('session', (session) => {
+ * // Set altsvc for origin https://example.org:80
+ * session.altsvc('h2=":8000"', 'https://example.org:80');
+ * });
+ *
+ * server.on('stream', (stream) => {
+ * // Set altsvc for a specific stream
+ * stream.session.altsvc('h2=":8000"', stream.id);
+ * });
+ * ```
+ *
+ * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate
+ * service is associated with the origin of the given `Http2Stream`.
+ *
+ * The `alt` and origin string _must_ contain only ASCII bytes and are
+ * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given
+ * domain.
+ *
+ * When a string is passed for the `originOrStream` argument, it will be parsed as
+ * a URL and the origin will be derived. For instance, the origin for the
+ * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ * @since v9.4.0
+ * @param alt A description of the alternative service configuration as defined by `RFC 7838`.
+ * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the
+ * `http2stream.id` property.
+ */
+ altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
+ /**
+ * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client
+ * to advertise the set of origins for which the server is capable of providing
+ * authoritative responses.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const options = getSecureOptionsSomehow();
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * server.on('session', (session) => {
+ * session.origin('https://example.com', 'https://example.org');
+ * });
+ * ```
+ *
+ * When a string is passed as an `origin`, it will be parsed as a URL and the
+ * origin will be derived. For instance, the origin for the HTTP URL`'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given
+ * string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as
+ * an `origin`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ *
+ * Alternatively, the `origins` option may be used when creating a new HTTP/2
+ * server using the `http2.createSecureServer()` method:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const options = getSecureOptionsSomehow();
+ * options.origins = ['https://example.com', 'https://example.org'];
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * ```
+ * @since v10.12.0
+ * @param origins One or more URL Strings passed as separate arguments.
+ */
+ origin(
+ ...origins: Array<
+ | string
+ | url.URL
+ | {
+ origin: string;
+ }
+ >
+ ): void;
+ addListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'connect', session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ // Http2Server
+ export interface SessionOptions {
+ maxDeflateDynamicTableSize?: number | undefined;
+ maxSessionMemory?: number | undefined;
+ maxHeaderListPairs?: number | undefined;
+ maxOutstandingPings?: number | undefined;
+ maxSendHeaderBlockLength?: number | undefined;
+ paddingStrategy?: number | undefined;
+ peerMaxConcurrentStreams?: number | undefined;
+ settings?: Settings | undefined;
+ /**
+ * Specifies a timeout in milliseconds that
+ * a server should wait when an [`'unknownProtocol'`][] is emitted. If the
+ * socket has not been destroyed by that time the server will destroy it.
+ * @default 100000
+ */
+ unknownProtocolTimeout?: number | undefined;
+ selectPadding?(frameLen: number, maxFrameLen: number): number;
+ createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
+ }
+ export interface ClientSessionOptions extends SessionOptions {
+ maxReservedRemoteStreams?: number | undefined;
+ createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
+ protocol?: 'http:' | 'https:' | undefined;
+ }
+ export interface ServerSessionOptions extends SessionOptions {
+ Http1IncomingMessage?: typeof IncomingMessage | undefined;
+ Http1ServerResponse?: typeof ServerResponse | undefined;
+ Http2ServerRequest?: typeof Http2ServerRequest | undefined;
+ Http2ServerResponse?: typeof Http2ServerResponse | undefined;
+ }
+ export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
+ export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {}
+ export interface ServerOptions extends ServerSessionOptions {}
+ export interface SecureServerOptions extends SecureServerSessionOptions {
+ allowHTTP1?: boolean | undefined;
+ origins?: string[] | undefined;
+ }
+ interface HTTP2ServerCommon {
+ setTimeout(msec?: number, callback?: () => void): this;
+ /**
+ * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values.
+ * Throws ERR_INVALID_ARG_TYPE for invalid settings argument.
+ */
+ updateSettings(settings: Settings): void;
+ }
+ export interface Http2Server extends net.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'unknownProtocol', socket: tls.TLSSocket): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status,
+ * headers, and
+ * data.
+ * @since v8.4.0
+ */
+ export class Http2ServerRequest extends stream.Readable {
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ */
+ readonly aborted: boolean;
+ /**
+ * The request authority pseudo header field. Because HTTP/2 allows requests
+ * to set either `:authority` or `host`, this value is derived from`req.headers[':authority']` if present. Otherwise, it is derived from`req.headers['host']`.
+ * @since v8.4.0
+ */
+ readonly authority: string;
+ /**
+ * See `request.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * The `request.complete` property will be `true` if the request has
+ * been completed, aborted, or destroyed.
+ * @since v12.10.0
+ */
+ readonly complete: boolean;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.headers);
+ * ```
+ *
+ * See `HTTP/2 Headers Object`.
+ *
+ * In HTTP/2, the request path, host name, protocol, and method are represented as
+ * special headers prefixed with the `:` character (e.g. `':path'`). These special
+ * headers will be included in the `request.headers` object. Care must be taken not
+ * to inadvertently modify these special headers or errors may occur. For instance,
+ * removing all headers from the request will cause errors to occur:
+ *
+ * ```js
+ * removeAllHeaders(request.headers);
+ * assert(request.url); // Fails because the :path header has been removed
+ * ```
+ * @since v8.4.0
+ */
+ readonly headers: IncomingHttpHeaders;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server. Returns`'2.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v8.4.0
+ */
+ readonly httpVersion: string;
+ readonly httpVersionMinor: number;
+ readonly httpVersionMajor: number;
+ /**
+ * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`.
+ * @since v8.4.0
+ */
+ readonly method: string;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v8.4.0
+ */
+ readonly rawHeaders: string[];
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly rawTrailers: string[];
+ /**
+ * The request scheme pseudo header field indicating the scheme
+ * portion of the target URL.
+ * @since v8.4.0
+ */
+ readonly scheme: string;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `request.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`request.stream`.
+ *
+ * `setTimeout` method will be called on `request.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket. With TLS support,
+ * use `request.socket.getPeerCertificate()` to obtain the client's
+ * authentication details.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the request.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly trailers: IncomingHttpHeaders;
+ /**
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. If the request is:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * Then `request.url` will be:
+ *
+ * ```js
+ * '/status?name=ryan'
+ * ```
+ *
+ * To parse the url into its parts, `new URL()` can be used:
+ *
+ * ```console
+ * $ node
+ * > new URL('/status?name=ryan', 'http://example.com')
+ * URL {
+ * href: 'http://example.com/status?name=ryan',
+ * origin: 'http://example.com',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'example.com',
+ * hostname: 'example.com',
+ * port: '',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v8.4.0
+ */
+ url: string;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ read(size?: number): Buffer | string | null;
+ addListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted', hadError: boolean, code: number): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v8.4.0
+ */
+ export class Http2ServerResponse extends stream.Writable {
+ constructor(stream: ServerHttp2Stream);
+ /**
+ * See `response.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * Boolean value that indicates whether the response has completed. Starts
+ * as `false`. After `response.end()` executes, the value will be `true`.
+ * @since v8.4.0
+ * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`.
+ */
+ readonly finished: boolean;
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * A reference to the original HTTP2 request object.
+ * @since v15.7.0
+ */
+ readonly req: Http2ServerRequest;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `response.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`.
+ *
+ * `setTimeout` method will be called on `response.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer((req, res) => {
+ * const ip = req.socket.remoteAddress;
+ * const port = req.socket.remotePort;
+ * res.end(`Your IP address is ${ip} and your source port is ${port}.`);
+ * }).listen(3000);
+ * ```
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the response.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * When true, the Date header will be automatically generated and sent in
+ * the response if it is not already present in the headers. Defaults to true.
+ *
+ * This should only be disabled for testing; HTTP requires the Date header
+ * in responses.
+ * @since v8.4.0
+ */
+ sendDate: boolean;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v8.4.0
+ */
+ statusCode: number;
+ /**
+ * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns
+ * an empty string.
+ * @since v8.4.0
+ */
+ statusMessage: '';
+ /**
+ * This method adds HTTP trailing headers (a header but at the end of the
+ * message) to the response.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ addTrailers(trailers: OutgoingHttpHeaders): void;
+ /**
+ * This method signals to the server that all of the response headers and body
+ * have been sent; that server should consider this message complete.
+ * The method, `response.end()`, MUST be called on each response.
+ *
+ * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`.
+ *
+ * If `callback` is specified, it will be called when the response stream
+ * is finished.
+ * @since v8.4.0
+ */
+ end(callback?: () => void): this;
+ end(data: string | Uint8Array, callback?: () => void): this;
+ end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
+ /**
+ * Reads out a header that has already been queued but not sent to the client.
+ * The name is case-insensitive.
+ *
+ * ```js
+ * const contentType = response.getHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ getHeader(name: string): string;
+ /**
+ * Returns an array containing the unique names of the current outgoing headers.
+ * All header names are lowercase.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = response.getHeaderNames();
+ * // headerNames === ['foo', 'set-cookie']
+ * ```
+ * @since v8.4.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow copy
+ * is used, array values may be mutated without additional calls to various
+ * header-related http module methods. The keys of the returned object are the
+ * header names and the values are the respective header values. All header names
+ * are lowercase.
+ *
+ * The object returned by the `response.getHeaders()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = response.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v8.4.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name matching is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = response.hasHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that has been queued for implicit sending.
+ *
+ * ```js
+ * response.removeHeader('Content-Encoding');
+ * ```
+ * @since v8.4.0
+ */
+ removeHeader(name: string): void;
+ /**
+ * Sets a single header value for implicit headers. If this header already exists
+ * in the to-be-sent headers, its value will be replaced. Use an array of strings
+ * here to send multiple headers with the same name.
+ *
+ * ```js
+ * response.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * ```
+ *
+ * or
+ *
+ * ```js
+ * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']);
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * If this method is called and `response.writeHead()` has not been called,
+ * it will switch to implicit header mode and flush the implicit headers.
+ *
+ * This sends a chunk of the response body. This method may
+ * be called multiple times to provide successive parts of the body.
+ *
+ * In the `http` module, the response body is omitted when the
+ * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
+ *
+ * `chunk` can be a string or a buffer. If `chunk` is a string,
+ * the second parameter specifies how to encode it into a byte stream.
+ * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk
+ * of data is flushed.
+ *
+ * This is the raw HTTP body and has nothing to do with higher-level multi-part
+ * body encodings that may be used.
+ *
+ * The first time `response.write()` is called, it will send the buffered
+ * header information and the first chunk of the body to the client. The second
+ * time `response.write()` is called, Node.js assumes data will be streamed,
+ * and sends the new data separately. That is, the response is buffered up to the
+ * first chunk of the body.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again.
+ * @since v8.4.0
+ */
+ write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
+ write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
+ /**
+ * Sends a status `100 Continue` to the client, indicating that the request body
+ * should be sent. See the `'checkContinue'` event on `Http2Server` and`Http2SecureServer`.
+ * @since v8.4.0
+ */
+ writeContinue(): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ *
+ * Returns a reference to the `Http2ServerResponse`, so that calls can be chained.
+ *
+ * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be
+ * passed as the second argument. However, because the `statusMessage` has no
+ * meaning within HTTP/2, the argument will have no effect and a process warning
+ * will be emitted.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response.writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain; charset=utf-8',
+ * });
+ * ```
+ *
+ * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a
+ * given encoding. On outbound messages, Node.js does not check if Content-Length
+ * and the length of the body being transmitted are equal or not. However, when
+ * receiving messages, Node.js will automatically reject messages when the`Content-Length` does not match the actual payload size.
+ *
+ * This method may be called at most one time on a message before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
+ writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
+ /**
+ * Call `http2stream.pushStream()` with the given headers, and wrap the
+ * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback
+ * parameter if successful. When `Http2ServerRequest` is closed, the callback is
+ * called with an error `ERR_HTTP2_INVALID_STREAM`.
+ * @since v8.4.0
+ * @param headers An object describing the headers
+ * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of
+ * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method
+ */
+ createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export namespace constants {
+ const NGHTTP2_SESSION_SERVER: number;
+ const NGHTTP2_SESSION_CLIENT: number;
+ const NGHTTP2_STREAM_STATE_IDLE: number;
+ const NGHTTP2_STREAM_STATE_OPEN: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_CLOSED: number;
+ const NGHTTP2_NO_ERROR: number;
+ const NGHTTP2_PROTOCOL_ERROR: number;
+ const NGHTTP2_INTERNAL_ERROR: number;
+ const NGHTTP2_FLOW_CONTROL_ERROR: number;
+ const NGHTTP2_SETTINGS_TIMEOUT: number;
+ const NGHTTP2_STREAM_CLOSED: number;
+ const NGHTTP2_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_REFUSED_STREAM: number;
+ const NGHTTP2_CANCEL: number;
+ const NGHTTP2_COMPRESSION_ERROR: number;
+ const NGHTTP2_CONNECT_ERROR: number;
+ const NGHTTP2_ENHANCE_YOUR_CALM: number;
+ const NGHTTP2_INADEQUATE_SECURITY: number;
+ const NGHTTP2_HTTP_1_1_REQUIRED: number;
+ const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_FLAG_NONE: number;
+ const NGHTTP2_FLAG_END_STREAM: number;
+ const NGHTTP2_FLAG_END_HEADERS: number;
+ const NGHTTP2_FLAG_ACK: number;
+ const NGHTTP2_FLAG_PADDED: number;
+ const NGHTTP2_FLAG_PRIORITY: number;
+ const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
+ const DEFAULT_SETTINGS_ENABLE_PUSH: number;
+ const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
+ const MAX_MAX_FRAME_SIZE: number;
+ const MIN_MAX_FRAME_SIZE: number;
+ const MAX_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_DEFAULT_WEIGHT: number;
+ const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
+ const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
+ const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
+ const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
+ const PADDING_STRATEGY_NONE: number;
+ const PADDING_STRATEGY_MAX: number;
+ const PADDING_STRATEGY_CALLBACK: number;
+ const HTTP2_HEADER_STATUS: string;
+ const HTTP2_HEADER_METHOD: string;
+ const HTTP2_HEADER_AUTHORITY: string;
+ const HTTP2_HEADER_SCHEME: string;
+ const HTTP2_HEADER_PATH: string;
+ const HTTP2_HEADER_ACCEPT_CHARSET: string;
+ const HTTP2_HEADER_ACCEPT_ENCODING: string;
+ const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
+ const HTTP2_HEADER_ACCEPT_RANGES: string;
+ const HTTP2_HEADER_ACCEPT: string;
+ const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
+ const HTTP2_HEADER_AGE: string;
+ const HTTP2_HEADER_ALLOW: string;
+ const HTTP2_HEADER_AUTHORIZATION: string;
+ const HTTP2_HEADER_CACHE_CONTROL: string;
+ const HTTP2_HEADER_CONNECTION: string;
+ const HTTP2_HEADER_CONTENT_DISPOSITION: string;
+ const HTTP2_HEADER_CONTENT_ENCODING: string;
+ const HTTP2_HEADER_CONTENT_LANGUAGE: string;
+ const HTTP2_HEADER_CONTENT_LENGTH: string;
+ const HTTP2_HEADER_CONTENT_LOCATION: string;
+ const HTTP2_HEADER_CONTENT_MD5: string;
+ const HTTP2_HEADER_CONTENT_RANGE: string;
+ const HTTP2_HEADER_CONTENT_TYPE: string;
+ const HTTP2_HEADER_COOKIE: string;
+ const HTTP2_HEADER_DATE: string;
+ const HTTP2_HEADER_ETAG: string;
+ const HTTP2_HEADER_EXPECT: string;
+ const HTTP2_HEADER_EXPIRES: string;
+ const HTTP2_HEADER_FROM: string;
+ const HTTP2_HEADER_HOST: string;
+ const HTTP2_HEADER_IF_MATCH: string;
+ const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
+ const HTTP2_HEADER_IF_NONE_MATCH: string;
+ const HTTP2_HEADER_IF_RANGE: string;
+ const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
+ const HTTP2_HEADER_LAST_MODIFIED: string;
+ const HTTP2_HEADER_LINK: string;
+ const HTTP2_HEADER_LOCATION: string;
+ const HTTP2_HEADER_MAX_FORWARDS: string;
+ const HTTP2_HEADER_PREFER: string;
+ const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
+ const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
+ const HTTP2_HEADER_RANGE: string;
+ const HTTP2_HEADER_REFERER: string;
+ const HTTP2_HEADER_REFRESH: string;
+ const HTTP2_HEADER_RETRY_AFTER: string;
+ const HTTP2_HEADER_SERVER: string;
+ const HTTP2_HEADER_SET_COOKIE: string;
+ const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
+ const HTTP2_HEADER_TRANSFER_ENCODING: string;
+ const HTTP2_HEADER_TE: string;
+ const HTTP2_HEADER_UPGRADE: string;
+ const HTTP2_HEADER_USER_AGENT: string;
+ const HTTP2_HEADER_VARY: string;
+ const HTTP2_HEADER_VIA: string;
+ const HTTP2_HEADER_WWW_AUTHENTICATE: string;
+ const HTTP2_HEADER_HTTP2_SETTINGS: string;
+ const HTTP2_HEADER_KEEP_ALIVE: string;
+ const HTTP2_HEADER_PROXY_CONNECTION: string;
+ const HTTP2_METHOD_ACL: string;
+ const HTTP2_METHOD_BASELINE_CONTROL: string;
+ const HTTP2_METHOD_BIND: string;
+ const HTTP2_METHOD_CHECKIN: string;
+ const HTTP2_METHOD_CHECKOUT: string;
+ const HTTP2_METHOD_CONNECT: string;
+ const HTTP2_METHOD_COPY: string;
+ const HTTP2_METHOD_DELETE: string;
+ const HTTP2_METHOD_GET: string;
+ const HTTP2_METHOD_HEAD: string;
+ const HTTP2_METHOD_LABEL: string;
+ const HTTP2_METHOD_LINK: string;
+ const HTTP2_METHOD_LOCK: string;
+ const HTTP2_METHOD_MERGE: string;
+ const HTTP2_METHOD_MKACTIVITY: string;
+ const HTTP2_METHOD_MKCALENDAR: string;
+ const HTTP2_METHOD_MKCOL: string;
+ const HTTP2_METHOD_MKREDIRECTREF: string;
+ const HTTP2_METHOD_MKWORKSPACE: string;
+ const HTTP2_METHOD_MOVE: string;
+ const HTTP2_METHOD_OPTIONS: string;
+ const HTTP2_METHOD_ORDERPATCH: string;
+ const HTTP2_METHOD_PATCH: string;
+ const HTTP2_METHOD_POST: string;
+ const HTTP2_METHOD_PRI: string;
+ const HTTP2_METHOD_PROPFIND: string;
+ const HTTP2_METHOD_PROPPATCH: string;
+ const HTTP2_METHOD_PUT: string;
+ const HTTP2_METHOD_REBIND: string;
+ const HTTP2_METHOD_REPORT: string;
+ const HTTP2_METHOD_SEARCH: string;
+ const HTTP2_METHOD_TRACE: string;
+ const HTTP2_METHOD_UNBIND: string;
+ const HTTP2_METHOD_UNCHECKOUT: string;
+ const HTTP2_METHOD_UNLINK: string;
+ const HTTP2_METHOD_UNLOCK: string;
+ const HTTP2_METHOD_UPDATE: string;
+ const HTTP2_METHOD_UPDATEREDIRECTREF: string;
+ const HTTP2_METHOD_VERSION_CONTROL: string;
+ const HTTP_STATUS_CONTINUE: number;
+ const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
+ const HTTP_STATUS_PROCESSING: number;
+ const HTTP_STATUS_OK: number;
+ const HTTP_STATUS_CREATED: number;
+ const HTTP_STATUS_ACCEPTED: number;
+ const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
+ const HTTP_STATUS_NO_CONTENT: number;
+ const HTTP_STATUS_RESET_CONTENT: number;
+ const HTTP_STATUS_PARTIAL_CONTENT: number;
+ const HTTP_STATUS_MULTI_STATUS: number;
+ const HTTP_STATUS_ALREADY_REPORTED: number;
+ const HTTP_STATUS_IM_USED: number;
+ const HTTP_STATUS_MULTIPLE_CHOICES: number;
+ const HTTP_STATUS_MOVED_PERMANENTLY: number;
+ const HTTP_STATUS_FOUND: number;
+ const HTTP_STATUS_SEE_OTHER: number;
+ const HTTP_STATUS_NOT_MODIFIED: number;
+ const HTTP_STATUS_USE_PROXY: number;
+ const HTTP_STATUS_TEMPORARY_REDIRECT: number;
+ const HTTP_STATUS_PERMANENT_REDIRECT: number;
+ const HTTP_STATUS_BAD_REQUEST: number;
+ const HTTP_STATUS_UNAUTHORIZED: number;
+ const HTTP_STATUS_PAYMENT_REQUIRED: number;
+ const HTTP_STATUS_FORBIDDEN: number;
+ const HTTP_STATUS_NOT_FOUND: number;
+ const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
+ const HTTP_STATUS_NOT_ACCEPTABLE: number;
+ const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
+ const HTTP_STATUS_REQUEST_TIMEOUT: number;
+ const HTTP_STATUS_CONFLICT: number;
+ const HTTP_STATUS_GONE: number;
+ const HTTP_STATUS_LENGTH_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_FAILED: number;
+ const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
+ const HTTP_STATUS_URI_TOO_LONG: number;
+ const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
+ const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
+ const HTTP_STATUS_EXPECTATION_FAILED: number;
+ const HTTP_STATUS_TEAPOT: number;
+ const HTTP_STATUS_MISDIRECTED_REQUEST: number;
+ const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
+ const HTTP_STATUS_LOCKED: number;
+ const HTTP_STATUS_FAILED_DEPENDENCY: number;
+ const HTTP_STATUS_UNORDERED_COLLECTION: number;
+ const HTTP_STATUS_UPGRADE_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_REQUIRED: number;
+ const HTTP_STATUS_TOO_MANY_REQUESTS: number;
+ const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
+ const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
+ const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
+ const HTTP_STATUS_NOT_IMPLEMENTED: number;
+ const HTTP_STATUS_BAD_GATEWAY: number;
+ const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
+ const HTTP_STATUS_GATEWAY_TIMEOUT: number;
+ const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
+ const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
+ const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
+ const HTTP_STATUS_LOOP_DETECTED: number;
+ const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
+ const HTTP_STATUS_NOT_EXTENDED: number;
+ const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
+ }
+ /**
+ * This symbol can be set as a property on the HTTP/2 headers object with
+ * an array value in order to provide a list of headers considered sensitive.
+ */
+ export const sensitiveHeaders: symbol;
+ /**
+ * Returns an object containing the default settings for an `Http2Session`instance. This method returns a new object instance every time it is called
+ * so instances returned may be safely modified for use.
+ * @since v8.4.0
+ */
+ export function getDefaultSettings(): Settings;
+ /**
+ * Returns a `Buffer` instance containing serialized representation of the given
+ * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended
+ * for use with the `HTTP2-Settings` header field.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * const packed = http2.getPackedSettings({ enablePush: false });
+ *
+ * console.log(packed.toString('base64'));
+ * // Prints: AAIAAAAA
+ * ```
+ * @since v8.4.0
+ */
+ export function getPackedSettings(settings: Settings): Buffer;
+ /**
+ * Returns a `HTTP/2 Settings Object` containing the deserialized settings from
+ * the given `Buffer` as generated by `http2.getPackedSettings()`.
+ * @since v8.4.0
+ * @param buf The packed settings.
+ */
+ export function getUnpackedSettings(buf: Uint8Array): Settings;
+ /**
+ * Returns a `net.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when
+ * communicating
+ * with browser clients.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * // Create an unencrypted HTTP/2 server.
+ * // Since there are no browsers known that support
+ * // unencrypted HTTP/2, the use of `http2.createSecureServer()`
+ * // is necessary when communicating with browser clients.
+ * const server = http2.createServer();
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(80);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ /**
+ * Returns a `tls.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem')
+ * };
+ *
+ * // Create a secure HTTP/2 server
+ * const server = http2.createSecureServer(options);
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(80);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ /**
+ * Returns a `ClientHttp2Session` instance.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const client = http2.connect('https://localhost:1234');
+ *
+ * // Use the client
+ *
+ * client.close();
+ * ```
+ * @since v8.4.0
+ * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port
+ * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored.
+ * @param listener Will be registered as a one-time listener of the {@link 'connect'} event.
+ */
+ export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
+ export function connect(
+ authority: string | url.URL,
+ options?: ClientSessionOptions | SecureClientSessionOptions,
+ listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
+ ): ClientHttp2Session;
+}
+declare module 'node:http2' {
+ export * from 'http2';
+}
diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts
new file mode 100755
index 0000000..aae4a95
--- /dev/null
+++ b/node_modules/@types/node/https.d.ts
@@ -0,0 +1,541 @@
+/**
+ * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
+ * separate module.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
+ */
+declare module 'https' {
+ import { Duplex } from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as http from 'node:http';
+ import { URL } from 'node:url';
+ type ServerOptions<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
+ type RequestOptions = http.RequestOptions &
+ tls.SecureContextOptions & {
+ rejectUnauthorized?: boolean | undefined; // Defaults to true
+ servername?: string | undefined; // SNI TLS Extension
+ };
+ interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
+ rejectUnauthorized?: boolean | undefined;
+ maxCachedSessions?: number | undefined;
+ }
+ /**
+ * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
+ * @since v0.4.5
+ */
+ class Agent extends http.Agent {
+ constructor(options?: AgentOptions);
+ options: AgentOptions;
+ }
+ interface Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends http.Server<Request, Response> {}
+ /**
+ * See `http.Server` for more information.
+ * @since v0.3.4
+ */
+ class Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends tls.Server {
+ constructor(requestListener?: http.RequestListener<Request, Response>);
+ constructor(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ );
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ addListener(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ addListener(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ addListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ addListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
+ emit(
+ event: 'newSession',
+ sessionId: Buffer,
+ sessionData: Buffer,
+ callback: (err: Error, resp: Buffer) => void,
+ ): boolean;
+ emit(
+ event: 'OCSPRequest',
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Duplex): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ on(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ on(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ on(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Duplex) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ on(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ once(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ once(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ once(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Duplex) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ prependListener(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ prependListener(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ prependOnceListener(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ prependOnceListener(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependOnceListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ }
+ /**
+ * ```js
+ * // curl -k https://localhost:8000/
+ * const https = require('https');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ *
+ * Or
+ *
+ * ```js
+ * const https = require('https');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
+ * passphrase: 'sample'
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ * @since v0.3.4
+ * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
+ * @param requestListener A listener to be added to the `'request'` event.
+ */
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ /**
+ * Makes a request to a secure web server.
+ *
+ * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
+ * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const https = require('https');
+ *
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET'
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e);
+ * });
+ * req.end();
+ * ```
+ *
+ * Example using options from `tls.connect()`:
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
+ * };
+ * options.agent = new https.Agent(options);
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Alternatively, opt out of connection pooling by not using an `Agent`.
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * agent: false
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('https://abc:xyz@example.com');
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
+ *
+ * ```js
+ * const tls = require('tls');
+ * const https = require('https');
+ * const crypto = require('crypto');
+ *
+ * function sha256(s) {
+ * return crypto.createHash('sha256').update(s).digest('base64');
+ * }
+ * const options = {
+ * hostname: 'github.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * checkServerIdentity: function(host, cert) {
+ * // Make sure the certificate is issued to the host we are connected to
+ * const err = tls.checkServerIdentity(host, cert);
+ * if (err) {
+ * return err;
+ * }
+ *
+ * // Pin the public key, similar to HPKP pin-sha25 pinning
+ * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
+ * if (sha256(cert.pubkey) !== pubkey256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The public key of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // Pin the exact certificate, rather than the pub key
+ * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
+ * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
+ * if (cert.fingerprint256 !== cert256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The certificate of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // This loop is informational only.
+ * // Print the certificate and public key fingerprints of all certs in the
+ * // chain. Its common to pin the public key of the issuer on the public
+ * // internet, while pinning the public key of the service in sensitive
+ * // environments.
+ * do {
+ * console.log('Subject Common Name:', cert.subject.CN);
+ * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
+ *
+ * hash = crypto.createHash('sha256');
+ * console.log(' Public key ping-sha256:', sha256(cert.pubkey));
+ *
+ * lastprint256 = cert.fingerprint256;
+ * cert = cert.issuerCertificate;
+ * } while (cert.fingerprint256 !== lastprint256);
+ *
+ * },
+ * };
+ *
+ * options.agent = new https.Agent(options);
+ * const req = https.request(options, (res) => {
+ * console.log('All OK. Server matched our pinned cert or public key');
+ * console.log('statusCode:', res.statusCode);
+ * // Print the HPKP values
+ * console.log('headers:', res.headers['public-key-pins']);
+ *
+ * res.on('data', (d) => {});
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e.message);
+ * });
+ * req.end();
+ * ```
+ *
+ * Outputs for example:
+ *
+ * ```text
+ * Subject Common Name: github.com
+ * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
+ * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
+ * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
+ * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
+ * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
+ * Subject Common Name: DigiCert High Assurance EV Root CA
+ * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
+ * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
+ * All OK. Server matched our pinned cert or public key
+ * statusCode: 200
+ * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
+ * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
+ * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
+ * ```
+ * @since v0.3.6
+ * @param options Accepts all `options` from `request`, with some differences in default values:
+ */
+ function request(
+ options: RequestOptions | string | URL,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ function request(
+ url: string | URL,
+ options: RequestOptions,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ /**
+ * Like `http.get()` but for HTTPS.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * ```js
+ * const https = require('https');
+ *
+ * https.get('https://encrypted.google.com/', (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ *
+ * }).on('error', (e) => {
+ * console.error(e);
+ * });
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
+ */
+ function get(
+ options: RequestOptions | string | URL,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ function get(
+ url: string | URL,
+ options: RequestOptions,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ let globalAgent: Agent;
+}
+declare module 'node:https' {
+ export * from 'https';
+}
diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts
new file mode 100755
index 0000000..2cec52a
--- /dev/null
+++ b/node_modules/@types/node/index.d.ts
@@ -0,0 +1,132 @@
+// Type definitions for non-npm package Node.js 18.7
+// Project: https://nodejs.org/
+// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
+// DefinitelyTyped <https://github.com/DefinitelyTyped>
+// Alberto Schiabel <https://github.com/jkomyno>
+// Alvis HT Tang <https://github.com/alvis>
+// Andrew Makarov <https://github.com/r3nya>
+// Benjamin Toueg <https://github.com/btoueg>
+// Chigozirim C. <https://github.com/smac89>
+// David Junger <https://github.com/touffy>
+// Deividas Bakanas <https://github.com/DeividasBakanas>
+// Eugene Y. Q. Shen <https://github.com/eyqs>
+// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
+// Huw <https://github.com/hoo29>
+// Kelvin Jin <https://github.com/kjin>
+// Klaus Meinhardt <https://github.com/ajafff>
+// Lishude <https://github.com/islishude>
+// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
+// Mohsen Azimi <https://github.com/mohsen1>
+// Nicolas Even <https://github.com/n-e>
+// Nikita Galkin <https://github.com/galkin>
+// Parambir Singh <https://github.com/parambirs>
+// Sebastian Silbermann <https://github.com/eps1lon>
+// Simon Schick <https://github.com/SimonSchick>
+// Thomas den Hollander <https://github.com/ThomasdenH>
+// Wilco Bakker <https://github.com/WilcoBakker>
+// wwwy3y3 <https://github.com/wwwy3y3>
+// Samuel Ainsworth <https://github.com/samuela>
+// Kyle Uehlein <https://github.com/kuehlein>
+// Thanik Bhongbhibhat <https://github.com/bhongy>
+// Marcin Kopacz <https://github.com/chyzwar>
+// Trivikram Kamat <https://github.com/trivikr>
+// Junxiao Shi <https://github.com/yoursunny>
+// Ilia Baryshnikov <https://github.com/qwelias>
+// ExE Boss <https://github.com/ExE-Boss>
+// Piotr Błażejewicz <https://github.com/peterblazejewicz>
+// Anna Henningsen <https://github.com/addaleax>
+// Victor Perin <https://github.com/victorperin>
+// Yongsheng Zhang <https://github.com/ZYSzys>
+// NodeJS Contributors <https://github.com/NodeJS>
+// Linus Unnebäck <https://github.com/LinusU>
+// wafuwafu13 <https://github.com/wafuwafu13>
+// Matteo Collina <https://github.com/mcollina>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/**
+ * License for programmatically and manually incorporated
+ * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
+ *
+ * Copyright Node.js contributors. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+// NOTE: These definitions support NodeJS and TypeScript 4.9+.
+
+// Reference required types from the default lib:
+/// <reference lib="es2020" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+/// <reference path="assert.d.ts" />
+/// <reference path="assert/strict.d.ts" />
+/// <reference path="globals.d.ts" />
+/// <reference path="async_hooks.d.ts" />
+/// <reference path="buffer.d.ts" />
+/// <reference path="child_process.d.ts" />
+/// <reference path="cluster.d.ts" />
+/// <reference path="console.d.ts" />
+/// <reference path="constants.d.ts" />
+/// <reference path="crypto.d.ts" />
+/// <reference path="dgram.d.ts" />
+/// <reference path="diagnostics_channel.d.ts" />
+/// <reference path="dns.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="domain.d.ts" />
+/// <reference path="events.d.ts" />
+/// <reference path="fs.d.ts" />
+/// <reference path="fs/promises.d.ts" />
+/// <reference path="http.d.ts" />
+/// <reference path="http2.d.ts" />
+/// <reference path="https.d.ts" />
+/// <reference path="inspector.d.ts" />
+/// <reference path="module.d.ts" />
+/// <reference path="net.d.ts" />
+/// <reference path="os.d.ts" />
+/// <reference path="path.d.ts" />
+/// <reference path="perf_hooks.d.ts" />
+/// <reference path="process.d.ts" />
+/// <reference path="punycode.d.ts" />
+/// <reference path="querystring.d.ts" />
+/// <reference path="readline.d.ts" />
+/// <reference path="readline/promises.d.ts" />
+/// <reference path="repl.d.ts" />
+/// <reference path="stream.d.ts" />
+/// <reference path="stream/promises.d.ts" />
+/// <reference path="stream/consumers.d.ts" />
+/// <reference path="stream/web.d.ts" />
+/// <reference path="string_decoder.d.ts" />
+/// <reference path="test.d.ts" />
+/// <reference path="timers.d.ts" />
+/// <reference path="timers/promises.d.ts" />
+/// <reference path="tls.d.ts" />
+/// <reference path="trace_events.d.ts" />
+/// <reference path="tty.d.ts" />
+/// <reference path="url.d.ts" />
+/// <reference path="util.d.ts" />
+/// <reference path="v8.d.ts" />
+/// <reference path="vm.d.ts" />
+/// <reference path="wasi.d.ts" />
+/// <reference path="worker_threads.d.ts" />
+/// <reference path="zlib.d.ts" />
+
+/// <reference path="globals.global.d.ts" />
diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts
new file mode 100755
index 0000000..eba0b55
--- /dev/null
+++ b/node_modules/@types/node/inspector.d.ts
@@ -0,0 +1,2741 @@
+// eslint-disable-next-line dt-header
+// Type definitions for inspector
+
+// These definitions are auto-generated.
+// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
+// for more information.
+
+// tslint:disable:max-line-length
+
+/**
+ * The `inspector` module provides an API for interacting with the V8 inspector.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * const inspector = require('inspector');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/inspector.js)
+ */
+declare module 'inspector' {
+ import EventEmitter = require('node:events');
+ interface InspectorNotification<T> {
+ method: string;
+ params: T;
+ }
+ namespace Schema {
+ /**
+ * Description of the protocol domain.
+ */
+ interface Domain {
+ /**
+ * Domain name.
+ */
+ name: string;
+ /**
+ * Domain version.
+ */
+ version: string;
+ }
+ interface GetDomainsReturnType {
+ /**
+ * List of supported domains.
+ */
+ domains: Domain[];
+ }
+ }
+ namespace Runtime {
+ /**
+ * Unique script identifier.
+ */
+ type ScriptId = string;
+ /**
+ * Unique object identifier.
+ */
+ type RemoteObjectId = string;
+ /**
+ * Primitive value which cannot be JSON-stringified.
+ */
+ type UnserializableValue = string;
+ /**
+ * Mirror object referencing original JavaScript object.
+ */
+ interface RemoteObject {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * Object class (constructor) name. Specified for <code>object</code> type values only.
+ */
+ className?: string | undefined;
+ /**
+ * Remote object value in case of primitive values or JSON values (if it was requested).
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * Unique object identifier (for non-primitive values).
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
+ * @experimental
+ */
+ preview?: ObjectPreview | undefined;
+ /**
+ * @experimental
+ */
+ customPreview?: CustomPreview | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface CustomPreview {
+ header: string;
+ hasBody: boolean;
+ formatterObjectId: RemoteObjectId;
+ bindRemoteObjectFunctionId: RemoteObjectId;
+ configObjectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Object containing abbreviated remote object value.
+ * @experimental
+ */
+ interface ObjectPreview {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * True iff some of the properties or entries of the original object did not fit.
+ */
+ overflow: boolean;
+ /**
+ * List of the properties.
+ */
+ properties: PropertyPreview[];
+ /**
+ * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
+ */
+ entries?: EntryPreview[] | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface PropertyPreview {
+ /**
+ * Property name.
+ */
+ name: string;
+ /**
+ * Object type. Accessor means that the property itself is an accessor property.
+ */
+ type: string;
+ /**
+ * User-friendly property value string.
+ */
+ value?: string | undefined;
+ /**
+ * Nested value preview.
+ */
+ valuePreview?: ObjectPreview | undefined;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface EntryPreview {
+ /**
+ * Preview of the key. Specified for map-like collection entries.
+ */
+ key?: ObjectPreview | undefined;
+ /**
+ * Preview of the value.
+ */
+ value: ObjectPreview;
+ }
+ /**
+ * Object property descriptor.
+ */
+ interface PropertyDescriptor {
+ /**
+ * Property name or symbol description.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ /**
+ * True if the value associated with the property may be changed (data descriptors only).
+ */
+ writable?: boolean | undefined;
+ /**
+ * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
+ */
+ get?: RemoteObject | undefined;
+ /**
+ * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
+ */
+ set?: RemoteObject | undefined;
+ /**
+ * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
+ */
+ configurable: boolean;
+ /**
+ * True if this property shows up during enumeration of the properties on the corresponding object.
+ */
+ enumerable: boolean;
+ /**
+ * True if the result was thrown during the evaluation.
+ */
+ wasThrown?: boolean | undefined;
+ /**
+ * True if the property is owned for the object.
+ */
+ isOwn?: boolean | undefined;
+ /**
+ * Property symbol object, if the property is of the <code>symbol</code> type.
+ */
+ symbol?: RemoteObject | undefined;
+ }
+ /**
+ * Object internal property descriptor. This property isn't normally visible in JavaScript code.
+ */
+ interface InternalPropertyDescriptor {
+ /**
+ * Conventional property name.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ }
+ /**
+ * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
+ */
+ interface CallArgument {
+ /**
+ * Primitive value or serializable javascript object.
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * Remote object handle.
+ */
+ objectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Id of an execution context.
+ */
+ type ExecutionContextId = number;
+ /**
+ * Description of an isolated world.
+ */
+ interface ExecutionContextDescription {
+ /**
+ * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
+ */
+ id: ExecutionContextId;
+ /**
+ * Execution context origin.
+ */
+ origin: string;
+ /**
+ * Human readable name describing given context.
+ */
+ name: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ auxData?: {} | undefined;
+ }
+ /**
+ * Detailed information about exception (or error) that was thrown during script compilation or execution.
+ */
+ interface ExceptionDetails {
+ /**
+ * Exception id.
+ */
+ exceptionId: number;
+ /**
+ * Exception text, which should be used together with exception object when available.
+ */
+ text: string;
+ /**
+ * Line number of the exception location (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number of the exception location (0-based).
+ */
+ columnNumber: number;
+ /**
+ * Script ID of the exception location.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * URL of the exception location, to be used when the script was not reported.
+ */
+ url?: string | undefined;
+ /**
+ * JavaScript stack trace if available.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Exception object if available.
+ */
+ exception?: RemoteObject | undefined;
+ /**
+ * Identifier of the context where exception happened.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ /**
+ * Number of milliseconds since epoch.
+ */
+ type Timestamp = number;
+ /**
+ * Stack entry for runtime errors and assertions.
+ */
+ interface CallFrame {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * JavaScript script id.
+ */
+ scriptId: ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * JavaScript script line number (0-based).
+ */
+ lineNumber: number;
+ /**
+ * JavaScript script column number (0-based).
+ */
+ columnNumber: number;
+ }
+ /**
+ * Call frames for assertions or error messages.
+ */
+ interface StackTrace {
+ /**
+ * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
+ */
+ description?: string | undefined;
+ /**
+ * JavaScript function name.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ */
+ parent?: StackTrace | undefined;
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ * @experimental
+ */
+ parentId?: StackTraceId | undefined;
+ }
+ /**
+ * Unique identifier of current debugger.
+ * @experimental
+ */
+ type UniqueDebuggerId = string;
+ /**
+ * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
+ * @experimental
+ */
+ interface StackTraceId {
+ id: string;
+ debuggerId?: UniqueDebuggerId | undefined;
+ }
+ interface EvaluateParameterType {
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ contextId?: ExecutionContextId | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface AwaitPromiseParameterType {
+ /**
+ * Identifier of the promise.
+ */
+ promiseObjectId: RemoteObjectId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface CallFunctionOnParameterType {
+ /**
+ * Declaration of the function to call.
+ */
+ functionDeclaration: string;
+ /**
+ * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
+ */
+ arguments?: CallArgument[] | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ /**
+ * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface GetPropertiesParameterType {
+ /**
+ * Identifier of the object to return properties for.
+ */
+ objectId: RemoteObjectId;
+ /**
+ * If true, returns properties belonging only to the element itself, not to its prototype chain.
+ */
+ ownProperties?: boolean | undefined;
+ /**
+ * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
+ * @experimental
+ */
+ accessorPropertiesOnly?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the results.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface ReleaseObjectParameterType {
+ /**
+ * Identifier of the object to release.
+ */
+ objectId: RemoteObjectId;
+ }
+ interface ReleaseObjectGroupParameterType {
+ /**
+ * Symbolic object group name.
+ */
+ objectGroup: string;
+ }
+ interface SetCustomObjectFormatterEnabledParameterType {
+ enabled: boolean;
+ }
+ interface CompileScriptParameterType {
+ /**
+ * Expression to compile.
+ */
+ expression: string;
+ /**
+ * Source url to be set for the script.
+ */
+ sourceURL: string;
+ /**
+ * Specifies whether the compiled script should be persisted.
+ */
+ persistScript: boolean;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface RunScriptParameterType {
+ /**
+ * Id of the script to run.
+ */
+ scriptId: ScriptId;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface QueryObjectsParameterType {
+ /**
+ * Identifier of the prototype to return objects for.
+ */
+ prototypeObjectId: RemoteObjectId;
+ }
+ interface GlobalLexicalScopeNamesParameterType {
+ /**
+ * Specifies in which execution context to lookup global scope variables.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface EvaluateReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface AwaitPromiseReturnType {
+ /**
+ * Promise result. Will contain rejected value if promise was rejected.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details if stack strace is available.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CallFunctionOnReturnType {
+ /**
+ * Call result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface GetPropertiesReturnType {
+ /**
+ * Object properties.
+ */
+ result: PropertyDescriptor[];
+ /**
+ * Internal object properties (only of the element itself).
+ */
+ internalProperties?: InternalPropertyDescriptor[] | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CompileScriptReturnType {
+ /**
+ * Id of the script.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface RunScriptReturnType {
+ /**
+ * Run result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface QueryObjectsReturnType {
+ /**
+ * Array with objects.
+ */
+ objects: RemoteObject;
+ }
+ interface GlobalLexicalScopeNamesReturnType {
+ names: string[];
+ }
+ interface ExecutionContextCreatedEventDataType {
+ /**
+ * A newly created execution context.
+ */
+ context: ExecutionContextDescription;
+ }
+ interface ExecutionContextDestroyedEventDataType {
+ /**
+ * Id of the destroyed context
+ */
+ executionContextId: ExecutionContextId;
+ }
+ interface ExceptionThrownEventDataType {
+ /**
+ * Timestamp of the exception.
+ */
+ timestamp: Timestamp;
+ exceptionDetails: ExceptionDetails;
+ }
+ interface ExceptionRevokedEventDataType {
+ /**
+ * Reason describing why exception was revoked.
+ */
+ reason: string;
+ /**
+ * The id of revoked exception, as reported in <code>exceptionThrown</code>.
+ */
+ exceptionId: number;
+ }
+ interface ConsoleAPICalledEventDataType {
+ /**
+ * Type of the call.
+ */
+ type: string;
+ /**
+ * Call arguments.
+ */
+ args: RemoteObject[];
+ /**
+ * Identifier of the context where the call was made.
+ */
+ executionContextId: ExecutionContextId;
+ /**
+ * Call timestamp.
+ */
+ timestamp: Timestamp;
+ /**
+ * Stack trace captured when the call was made.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
+ * @experimental
+ */
+ context?: string | undefined;
+ }
+ interface InspectRequestedEventDataType {
+ object: RemoteObject;
+ hints: {};
+ }
+ }
+ namespace Debugger {
+ /**
+ * Breakpoint identifier.
+ */
+ type BreakpointId = string;
+ /**
+ * Call frame identifier.
+ */
+ type CallFrameId = string;
+ /**
+ * Location in the source code.
+ */
+ interface Location {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ }
+ /**
+ * Location in the source code.
+ * @experimental
+ */
+ interface ScriptPosition {
+ lineNumber: number;
+ columnNumber: number;
+ }
+ /**
+ * JavaScript call frame. Array of call frames form the call stack.
+ */
+ interface CallFrame {
+ /**
+ * Call frame identifier. This identifier is only valid while the virtual machine is paused.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Name of the JavaScript function called on this call frame.
+ */
+ functionName: string;
+ /**
+ * Location in the source code.
+ */
+ functionLocation?: Location | undefined;
+ /**
+ * Location in the source code.
+ */
+ location: Location;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Scope chain for this call frame.
+ */
+ scopeChain: Scope[];
+ /**
+ * <code>this</code> object for this call frame.
+ */
+ this: Runtime.RemoteObject;
+ /**
+ * The value being returned, if the function is at return point.
+ */
+ returnValue?: Runtime.RemoteObject | undefined;
+ }
+ /**
+ * Scope description.
+ */
+ interface Scope {
+ /**
+ * Scope type.
+ */
+ type: string;
+ /**
+ * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
+ */
+ object: Runtime.RemoteObject;
+ name?: string | undefined;
+ /**
+ * Location in the source code where scope starts
+ */
+ startLocation?: Location | undefined;
+ /**
+ * Location in the source code where scope ends
+ */
+ endLocation?: Location | undefined;
+ }
+ /**
+ * Search match for resource.
+ */
+ interface SearchMatch {
+ /**
+ * Line number in resource content.
+ */
+ lineNumber: number;
+ /**
+ * Line with match content.
+ */
+ lineContent: string;
+ }
+ interface BreakLocation {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ type?: string | undefined;
+ }
+ interface SetBreakpointsActiveParameterType {
+ /**
+ * New value for breakpoints active state.
+ */
+ active: boolean;
+ }
+ interface SetSkipAllPausesParameterType {
+ /**
+ * New value for skip pauses state.
+ */
+ skip: boolean;
+ }
+ interface SetBreakpointByUrlParameterType {
+ /**
+ * Line number to set breakpoint at.
+ */
+ lineNumber: number;
+ /**
+ * URL of the resources to set breakpoint on.
+ */
+ url?: string | undefined;
+ /**
+ * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
+ */
+ urlRegex?: string | undefined;
+ /**
+ * Script hash of the resources to set breakpoint on.
+ */
+ scriptHash?: string | undefined;
+ /**
+ * Offset in the line to set breakpoint at.
+ */
+ columnNumber?: number | undefined;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface SetBreakpointParameterType {
+ /**
+ * Location to set breakpoint in.
+ */
+ location: Location;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface RemoveBreakpointParameterType {
+ breakpointId: BreakpointId;
+ }
+ interface GetPossibleBreakpointsParameterType {
+ /**
+ * Start of range to search possible breakpoint locations in.
+ */
+ start: Location;
+ /**
+ * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
+ */
+ end?: Location | undefined;
+ /**
+ * Only consider locations which are in the same (non-nested) function as start.
+ */
+ restrictToFunction?: boolean | undefined;
+ }
+ interface ContinueToLocationParameterType {
+ /**
+ * Location to continue to.
+ */
+ location: Location;
+ targetCallFrames?: string | undefined;
+ }
+ interface PauseOnAsyncCallParameterType {
+ /**
+ * Debugger will pause when async call with given stack trace is started.
+ */
+ parentStackTraceId: Runtime.StackTraceId;
+ }
+ interface StepIntoParameterType {
+ /**
+ * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
+ * @experimental
+ */
+ breakOnAsyncCall?: boolean | undefined;
+ }
+ interface GetStackTraceParameterType {
+ stackTraceId: Runtime.StackTraceId;
+ }
+ interface SearchInContentParameterType {
+ /**
+ * Id of the script to search in.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * String to search for.
+ */
+ query: string;
+ /**
+ * If true, search is case sensitive.
+ */
+ caseSensitive?: boolean | undefined;
+ /**
+ * If true, treats string parameter as regex.
+ */
+ isRegex?: boolean | undefined;
+ }
+ interface SetScriptSourceParameterType {
+ /**
+ * Id of the script to edit.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * New content of the script.
+ */
+ scriptSource: string;
+ /**
+ * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
+ */
+ dryRun?: boolean | undefined;
+ }
+ interface RestartFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface GetScriptSourceParameterType {
+ /**
+ * Id of the script to get source for.
+ */
+ scriptId: Runtime.ScriptId;
+ }
+ interface SetPauseOnExceptionsParameterType {
+ /**
+ * Pause on exceptions mode.
+ */
+ state: string;
+ }
+ interface EvaluateOnCallFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Specifies whether command line API should be available to the evaluated expression, defaults to false.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ */
+ throwOnSideEffect?: boolean | undefined;
+ }
+ interface SetVariableValueParameterType {
+ /**
+ * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
+ */
+ scopeNumber: number;
+ /**
+ * Variable name.
+ */
+ variableName: string;
+ /**
+ * New variable value.
+ */
+ newValue: Runtime.CallArgument;
+ /**
+ * Id of callframe that holds variable.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface SetReturnValueParameterType {
+ /**
+ * New return value.
+ */
+ newValue: Runtime.CallArgument;
+ }
+ interface SetAsyncCallStackDepthParameterType {
+ /**
+ * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
+ */
+ maxDepth: number;
+ }
+ interface SetBlackboxPatternsParameterType {
+ /**
+ * Array of regexps that will be used to check script url for blackbox state.
+ */
+ patterns: string[];
+ }
+ interface SetBlackboxedRangesParameterType {
+ /**
+ * Id of the script.
+ */
+ scriptId: Runtime.ScriptId;
+ positions: ScriptPosition[];
+ }
+ interface EnableReturnType {
+ /**
+ * Unique identifier of the debugger.
+ * @experimental
+ */
+ debuggerId: Runtime.UniqueDebuggerId;
+ }
+ interface SetBreakpointByUrlReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * List of the locations this breakpoint resolved into upon addition.
+ */
+ locations: Location[];
+ }
+ interface SetBreakpointReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Location this breakpoint resolved into.
+ */
+ actualLocation: Location;
+ }
+ interface GetPossibleBreakpointsReturnType {
+ /**
+ * List of the possible breakpoint locations.
+ */
+ locations: BreakLocation[];
+ }
+ interface GetStackTraceReturnType {
+ stackTrace: Runtime.StackTrace;
+ }
+ interface SearchInContentReturnType {
+ /**
+ * List of search matches.
+ */
+ result: SearchMatch[];
+ }
+ interface SetScriptSourceReturnType {
+ /**
+ * New stack trace in case editing has happened while VM was stopped.
+ */
+ callFrames?: CallFrame[] | undefined;
+ /**
+ * Whether current call stack was modified after applying the changes.
+ */
+ stackChanged?: boolean | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Exception details if any.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface RestartFrameReturnType {
+ /**
+ * New stack trace.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ interface GetScriptSourceReturnType {
+ /**
+ * Script source.
+ */
+ scriptSource: string;
+ }
+ interface EvaluateOnCallFrameReturnType {
+ /**
+ * Object wrapper for the evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface ScriptParsedEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * True, if this script is generated as a result of the live edit operation.
+ * @experimental
+ */
+ isLiveEdit?: boolean | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface ScriptFailedToParseEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface BreakpointResolvedEventDataType {
+ /**
+ * Breakpoint unique identifier.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Actual breakpoint location.
+ */
+ location: Location;
+ }
+ interface PausedEventDataType {
+ /**
+ * Call stack the virtual machine stopped on.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Pause reason.
+ */
+ reason: string;
+ /**
+ * Object containing break-specific auxiliary properties.
+ */
+ data?: {} | undefined;
+ /**
+ * Hit breakpoints IDs
+ */
+ hitBreakpoints?: string[] | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
+ * @experimental
+ */
+ asyncCallStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ }
+ namespace Console {
+ /**
+ * Console message.
+ */
+ interface ConsoleMessage {
+ /**
+ * Message source.
+ */
+ source: string;
+ /**
+ * Message severity.
+ */
+ level: string;
+ /**
+ * Message text.
+ */
+ text: string;
+ /**
+ * URL of the message origin.
+ */
+ url?: string | undefined;
+ /**
+ * Line number in the resource that generated this message (1-based).
+ */
+ line?: number | undefined;
+ /**
+ * Column number in the resource that generated this message (1-based).
+ */
+ column?: number | undefined;
+ }
+ interface MessageAddedEventDataType {
+ /**
+ * Console message that has been added.
+ */
+ message: ConsoleMessage;
+ }
+ }
+ namespace Profiler {
+ /**
+ * Profile node. Holds callsite information, execution statistics and child nodes.
+ */
+ interface ProfileNode {
+ /**
+ * Unique id of the node.
+ */
+ id: number;
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Number of samples where this node was on top of the call stack.
+ */
+ hitCount?: number | undefined;
+ /**
+ * Child node ids.
+ */
+ children?: number[] | undefined;
+ /**
+ * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
+ */
+ deoptReason?: string | undefined;
+ /**
+ * An array of source position ticks.
+ */
+ positionTicks?: PositionTickInfo[] | undefined;
+ }
+ /**
+ * Profile.
+ */
+ interface Profile {
+ /**
+ * The list of profile nodes. First item is the root node.
+ */
+ nodes: ProfileNode[];
+ /**
+ * Profiling start timestamp in microseconds.
+ */
+ startTime: number;
+ /**
+ * Profiling end timestamp in microseconds.
+ */
+ endTime: number;
+ /**
+ * Ids of samples top nodes.
+ */
+ samples?: number[] | undefined;
+ /**
+ * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
+ */
+ timeDeltas?: number[] | undefined;
+ }
+ /**
+ * Specifies a number of samples attributed to a certain source position.
+ */
+ interface PositionTickInfo {
+ /**
+ * Source line number (1-based).
+ */
+ line: number;
+ /**
+ * Number of samples attributed to the source line.
+ */
+ ticks: number;
+ }
+ /**
+ * Coverage data for a source range.
+ */
+ interface CoverageRange {
+ /**
+ * JavaScript script source offset for the range start.
+ */
+ startOffset: number;
+ /**
+ * JavaScript script source offset for the range end.
+ */
+ endOffset: number;
+ /**
+ * Collected execution count of the source range.
+ */
+ count: number;
+ }
+ /**
+ * Coverage data for a JavaScript function.
+ */
+ interface FunctionCoverage {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * Source ranges inside the function with coverage data.
+ */
+ ranges: CoverageRange[];
+ /**
+ * Whether coverage data for this function has block granularity.
+ */
+ isBlockCoverage: boolean;
+ }
+ /**
+ * Coverage data for a JavaScript script.
+ */
+ interface ScriptCoverage {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Functions contained in the script that has coverage data.
+ */
+ functions: FunctionCoverage[];
+ }
+ /**
+ * Describes a type collected during runtime.
+ * @experimental
+ */
+ interface TypeObject {
+ /**
+ * Name of a type collected with type profiling.
+ */
+ name: string;
+ }
+ /**
+ * Source offset and types for a parameter or return value.
+ * @experimental
+ */
+ interface TypeProfileEntry {
+ /**
+ * Source offset of the parameter or end of function for return values.
+ */
+ offset: number;
+ /**
+ * The types for this parameter or return value.
+ */
+ types: TypeObject[];
+ }
+ /**
+ * Type profile data collected during runtime for a JavaScript script.
+ * @experimental
+ */
+ interface ScriptTypeProfile {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Type profile entries for parameters and return values of the functions in the script.
+ */
+ entries: TypeProfileEntry[];
+ }
+ interface SetSamplingIntervalParameterType {
+ /**
+ * New sampling interval in microseconds.
+ */
+ interval: number;
+ }
+ interface StartPreciseCoverageParameterType {
+ /**
+ * Collect accurate call counts beyond simple 'covered' or 'not covered'.
+ */
+ callCount?: boolean | undefined;
+ /**
+ * Collect block-based coverage.
+ */
+ detailed?: boolean | undefined;
+ }
+ interface StopReturnType {
+ /**
+ * Recorded profile.
+ */
+ profile: Profile;
+ }
+ interface TakePreciseCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface GetBestEffortCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface TakeTypeProfileReturnType {
+ /**
+ * Type profile for all scripts since startTypeProfile() was turned on.
+ */
+ result: ScriptTypeProfile[];
+ }
+ interface ConsoleProfileStartedEventDataType {
+ id: string;
+ /**
+ * Location of console.profile().
+ */
+ location: Debugger.Location;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ interface ConsoleProfileFinishedEventDataType {
+ id: string;
+ /**
+ * Location of console.profileEnd().
+ */
+ location: Debugger.Location;
+ profile: Profile;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ }
+ namespace HeapProfiler {
+ /**
+ * Heap snapshot object id.
+ */
+ type HeapSnapshotObjectId = string;
+ /**
+ * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+ */
+ interface SamplingHeapProfileNode {
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Allocations size in bytes for the node excluding children.
+ */
+ selfSize: number;
+ /**
+ * Child nodes.
+ */
+ children: SamplingHeapProfileNode[];
+ }
+ /**
+ * Profile.
+ */
+ interface SamplingHeapProfile {
+ head: SamplingHeapProfileNode;
+ }
+ interface StartTrackingHeapObjectsParameterType {
+ trackAllocations?: boolean | undefined;
+ }
+ interface StopTrackingHeapObjectsParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface TakeHeapSnapshotParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface GetObjectByHeapObjectIdParameterType {
+ objectId: HeapSnapshotObjectId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface AddInspectedHeapObjectParameterType {
+ /**
+ * Heap snapshot object id to be accessible by means of $x command line API.
+ */
+ heapObjectId: HeapSnapshotObjectId;
+ }
+ interface GetHeapObjectIdParameterType {
+ /**
+ * Identifier of the object to get heap object id for.
+ */
+ objectId: Runtime.RemoteObjectId;
+ }
+ interface StartSamplingParameterType {
+ /**
+ * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
+ */
+ samplingInterval?: number | undefined;
+ }
+ interface GetObjectByHeapObjectIdReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ }
+ interface GetHeapObjectIdReturnType {
+ /**
+ * Id of the heap snapshot object corresponding to the passed remote object id.
+ */
+ heapSnapshotObjectId: HeapSnapshotObjectId;
+ }
+ interface StopSamplingReturnType {
+ /**
+ * Recorded sampling heap profile.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface GetSamplingProfileReturnType {
+ /**
+ * Return the sampling profile being collected.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface AddHeapSnapshotChunkEventDataType {
+ chunk: string;
+ }
+ interface ReportHeapSnapshotProgressEventDataType {
+ done: number;
+ total: number;
+ finished?: boolean | undefined;
+ }
+ interface LastSeenObjectIdEventDataType {
+ lastSeenObjectId: number;
+ timestamp: number;
+ }
+ interface HeapStatsUpdateEventDataType {
+ /**
+ * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
+ */
+ statsUpdate: number[];
+ }
+ }
+ namespace NodeTracing {
+ interface TraceConfig {
+ /**
+ * Controls how the trace buffer stores data.
+ */
+ recordMode?: string | undefined;
+ /**
+ * Included category filters.
+ */
+ includedCategories: string[];
+ }
+ interface StartParameterType {
+ traceConfig: TraceConfig;
+ }
+ interface GetCategoriesReturnType {
+ /**
+ * A list of supported tracing categories.
+ */
+ categories: string[];
+ }
+ interface DataCollectedEventDataType {
+ value: Array<{}>;
+ }
+ }
+ namespace NodeWorker {
+ type WorkerID = string;
+ /**
+ * Unique identifier of attached debugging session.
+ */
+ type SessionID = string;
+ interface WorkerInfo {
+ workerId: WorkerID;
+ type: string;
+ title: string;
+ url: string;
+ }
+ interface SendMessageToWorkerParameterType {
+ message: string;
+ /**
+ * Identifier of the session.
+ */
+ sessionId: SessionID;
+ }
+ interface EnableParameterType {
+ /**
+ * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+ * message to run them.
+ */
+ waitForDebuggerOnStart: boolean;
+ }
+ interface DetachParameterType {
+ sessionId: SessionID;
+ }
+ interface AttachedToWorkerEventDataType {
+ /**
+ * Identifier assigned to the session used to send/receive messages.
+ */
+ sessionId: SessionID;
+ workerInfo: WorkerInfo;
+ waitingForDebugger: boolean;
+ }
+ interface DetachedFromWorkerEventDataType {
+ /**
+ * Detached session identifier.
+ */
+ sessionId: SessionID;
+ }
+ interface ReceivedMessageFromWorkerEventDataType {
+ /**
+ * Identifier of a session which sends a message.
+ */
+ sessionId: SessionID;
+ message: string;
+ }
+ }
+ namespace NodeRuntime {
+ interface NotifyWhenWaitingForDisconnectParameterType {
+ enabled: boolean;
+ }
+ }
+ /**
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
+ * back-end and receiving message responses and notifications.
+ */
+ class Session extends EventEmitter {
+ /**
+ * Create a new instance of the inspector.Session class.
+ * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
+ */
+ constructor();
+ /**
+ * Connects a session to the inspector back-end.
+ * @since v8.0.0
+ */
+ connect(): void;
+ /**
+ * Immediately close the session. All pending message callbacks will be called
+ * with an error. `session.connect()` will need to be called to be able to send
+ * messages again. Reconnected session will lose all inspector state, such as
+ * enabled agents or configured breakpoints.
+ * @since v8.0.0
+ */
+ disconnect(): void;
+ /**
+ * Posts a message to the inspector back-end. `callback` will be notified when
+ * a response is received. `callback` is a function that accepts two optional
+ * arguments: error and message-specific result.
+ *
+ * ```js
+ * session.post('Runtime.evaluate', { expression: '2 + 2' },
+ * (error, { result }) => console.log(result));
+ * // Output: { type: 'number', value: 4, description: '4' }
+ * ```
+ *
+ * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
+ *
+ * Node.js inspector supports all the Chrome DevTools Protocol domains declared
+ * by V8\. Chrome DevTools Protocol domain provides an interface for interacting
+ * with one of the runtime agents used to inspect the application state and listen
+ * to the run-time events.
+ *
+ * ## Example usage
+ *
+ * Apart from the debugger, various V8 Profilers are available through the DevTools
+ * protocol.
+ * @since v8.0.0
+ */
+ post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
+ post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
+ /**
+ * Returns supported domains.
+ */
+ post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
+ /**
+ * Evaluates expression on global object.
+ */
+ post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ /**
+ * Add handler to promise with given promise object id.
+ */
+ post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ /**
+ * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ /**
+ * Returns properties of a given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ /**
+ * Releases remote object with given id.
+ */
+ post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void;
+ /**
+ * Releases all remote objects that belong to a given group.
+ */
+ post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void;
+ /**
+ * Tells inspected instance to run if it was waiting for debugger to attach.
+ */
+ post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
+ */
+ post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables reporting of execution contexts creation.
+ */
+ post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Discards collected exceptions and console API calls.
+ */
+ post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void;
+ /**
+ * Compiles expression.
+ */
+ post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ /**
+ * Runs script with given id in a given context.
+ */
+ post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ /**
+ * Returns all let, const and class variables from global scope.
+ */
+ post(
+ method: 'Runtime.globalLexicalScopeNames',
+ params?: Runtime.GlobalLexicalScopeNamesParameterType,
+ callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
+ ): void;
+ post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
+ /**
+ * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
+ */
+ post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
+ /**
+ * Disables debugger for given page.
+ */
+ post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Activates / deactivates all breakpoints on the page.
+ */
+ post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+ */
+ post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void;
+ /**
+ * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
+ */
+ post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ /**
+ * Sets JavaScript breakpoint at a given location.
+ */
+ post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ /**
+ * Removes JavaScript breakpoint.
+ */
+ post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
+ */
+ post(
+ method: 'Debugger.getPossibleBreakpoints',
+ params?: Debugger.GetPossibleBreakpointsParameterType,
+ callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
+ ): void;
+ post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
+ /**
+ * Continues execution until specific location is reached.
+ */
+ post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps over the statement.
+ */
+ post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps into the function call.
+ */
+ post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps out of the function call.
+ */
+ post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void;
+ /**
+ * Stops on the next JavaScript statement.
+ */
+ post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void;
+ /**
+ * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
+ * @experimental
+ */
+ post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void;
+ /**
+ * Resumes JavaScript execution.
+ */
+ post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns stack trace with given <code>stackTraceId</code>.
+ * @experimental
+ */
+ post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ /**
+ * Searches for given string in script content.
+ */
+ post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ /**
+ * Edits JavaScript source live.
+ */
+ post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ /**
+ * Restarts particular call frame from the beginning.
+ */
+ post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ /**
+ * Returns source for the script with given id.
+ */
+ post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ /**
+ * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
+ */
+ post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void;
+ /**
+ * Evaluates expression on a given call frame.
+ */
+ post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ /**
+ * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
+ */
+ post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes return value in top frame. Available only at return break position.
+ * @experimental
+ */
+ post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables or disables async call stacks tracking.
+ */
+ post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void;
+ /**
+ * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
+ */
+ post(method: 'Console.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables console domain, prevents further console messages from being reported to the client.
+ */
+ post(method: 'Console.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Does nothing.
+ */
+ post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+ */
+ post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.start', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
+ /**
+ * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
+ */
+ post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
+ */
+ post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
+ */
+ post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
+ /**
+ * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
+ */
+ post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
+ /**
+ * Enable type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable type profile. Disabling releases type profile data collected so far.
+ * @experimental
+ */
+ post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
+ post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void;
+ post(
+ method: 'HeapProfiler.getObjectByHeapObjectId',
+ params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
+ callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
+ ): void;
+ post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
+ /**
+ * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
+ */
+ post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
+ post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
+ /**
+ * Gets supported tracing categories.
+ */
+ post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
+ /**
+ * Start trace events collection.
+ */
+ post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void;
+ /**
+ * Stop trace events collection. Remaining collected events will be sent as a sequence of
+ * dataCollected events followed by tracingComplete event.
+ */
+ post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void;
+ /**
+ * Sends protocol message over session with given id.
+ */
+ post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void;
+ /**
+ * Instructs the inspector to attach to running workers. Will also attach to new workers
+ * as they start
+ */
+ post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detaches from all running workers and disables attaching to new workers as they are started.
+ */
+ post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detached from the worker with given sessionId.
+ */
+ post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void;
+ /**
+ * Enable the `NodeRuntime.waitingForDisconnect`.
+ */
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
+ // Events
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ addListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ addListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean;
+ emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextsCleared'): boolean;
+ emit(event: 'Runtime.exceptionThrown', message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+ emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+ emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+ emit(event: 'Runtime.inspectRequested', message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptParsed', message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+ emit(event: 'Debugger.breakpointResolved', message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+ emit(event: 'Debugger.paused', message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+ emit(event: 'Debugger.resumed'): boolean;
+ emit(event: 'Console.messageAdded', message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+ emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+ emit(event: 'HeapProfiler.resetProfiles'): boolean;
+ emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+ emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+ emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+ emit(event: 'NodeTracing.dataCollected', message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+ emit(event: 'NodeTracing.tracingComplete'): boolean;
+ emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ on(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ on(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ on(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ on(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ on(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ on(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ once(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ once(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ once(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ once(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ once(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ once(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependOnceListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ }
+ /**
+ * Activate inspector on host and port. Equivalent to`node --inspect=[[host:]port]`, but can be done programmatically after node has
+ * started.
+ *
+ * If wait is `true`, will block until a client has connected to the inspect port
+ * and flow control has been passed to the debugger client.
+ *
+ * See the `security warning` regarding the `host`parameter usage.
+ * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional.
+ * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional.
+ * @param [wait=false] Block until a client has connected. Optional.
+ */
+ function open(port?: number, host?: string, wait?: boolean): void;
+ /**
+ * Deactivate the inspector. Blocks until there are no active connections.
+ */
+ function close(): void;
+ /**
+ * Return the URL of the active inspector, or `undefined` if there is none.
+ *
+ * ```console
+ * $ node --inspect -p 'inspector.url()'
+ * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ *
+ * $ node --inspect=localhost:3000 -p 'inspector.url()'
+ * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ *
+ * $ node -p 'inspector.url()'
+ * undefined
+ * ```
+ */
+ function url(): string | undefined;
+ /**
+ * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command.
+ *
+ * An exception will be thrown if there is no active inspector.
+ * @since v12.7.0
+ */
+ function waitForDebugger(): void;
+}
+/**
+ * The inspector module provides an API for interacting with the V8 inspector.
+ */
+declare module 'node:inspector' {
+ import inspector = require('inspector');
+ export = inspector;
+}
diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts
new file mode 100755
index 0000000..d83aec9
--- /dev/null
+++ b/node_modules/@types/node/module.d.ts
@@ -0,0 +1,114 @@
+/**
+ * @since v0.3.7
+ */
+declare module 'module' {
+ import { URL } from 'node:url';
+ namespace Module {
+ /**
+ * The `module.syncBuiltinESMExports()` method updates all the live bindings for
+ * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
+ * does not add or remove exported names from the `ES Modules`.
+ *
+ * ```js
+ * const fs = require('fs');
+ * const assert = require('assert');
+ * const { syncBuiltinESMExports } = require('module');
+ *
+ * fs.readFile = newAPI;
+ *
+ * delete fs.readFileSync;
+ *
+ * function newAPI() {
+ * // ...
+ * }
+ *
+ * fs.newAPI = newAPI;
+ *
+ * syncBuiltinESMExports();
+ *
+ * import('fs').then((esmFS) => {
+ * // It syncs the existing readFile property with the new value
+ * assert.strictEqual(esmFS.readFile, newAPI);
+ * // readFileSync has been deleted from the required fs
+ * assert.strictEqual('readFileSync' in fs, false);
+ * // syncBuiltinESMExports() does not remove readFileSync from esmFS
+ * assert.strictEqual('readFileSync' in esmFS, true);
+ * // syncBuiltinESMExports() does not add names
+ * assert.strictEqual(esmFS.newAPI, undefined);
+ * });
+ * ```
+ * @since v12.12.0
+ */
+ function syncBuiltinESMExports(): void;
+ /**
+ * `path` is the resolved path for the file for which a corresponding source map
+ * should be fetched.
+ * @since v13.7.0, v12.17.0
+ */
+ function findSourceMap(path: string, error?: Error): SourceMap;
+ interface SourceMapPayload {
+ file: string;
+ version: number;
+ sources: string[];
+ sourcesContent: string[];
+ names: string[];
+ mappings: string;
+ sourceRoot: string;
+ }
+ interface SourceMapping {
+ generatedLine: number;
+ generatedColumn: number;
+ originalSource: string;
+ originalLine: number;
+ originalColumn: number;
+ }
+ /**
+ * @since v13.7.0, v12.17.0
+ */
+ class SourceMap {
+ /**
+ * Getter for the payload used to construct the `SourceMap` instance.
+ */
+ readonly payload: SourceMapPayload;
+ constructor(payload: SourceMapPayload);
+ /**
+ * Given a line number and column number in the generated source file, returns
+ * an object representing the position in the original file. The object returned
+ * consists of the following keys:
+ */
+ findEntry(line: number, column: number): SourceMapping;
+ }
+ }
+ interface Module extends NodeModule {}
+ class Module {
+ static runMain(): void;
+ static wrap(code: string): string;
+ static createRequire(path: string | URL): NodeRequire;
+ static builtinModules: string[];
+ static Module: typeof Module;
+ constructor(id: string, parent?: Module);
+ }
+ global {
+ interface ImportMeta {
+ url: string;
+ /**
+ * @experimental
+ * This feature is only available with the `--experimental-import-meta-resolve`
+ * command flag enabled.
+ *
+ * Provides a module-relative resolution function scoped to each module, returning
+ * the URL string.
+ *
+ * @param specified The module specifier to resolve relative to `parent`.
+ * @param parent The absolute parent module URL to resolve from. If none
+ * is specified, the value of `import.meta.url` is used as the default.
+ */
+ resolve?(specified: string, parent?: string | URL): Promise<string>;
+ }
+ }
+ export = Module;
+}
+declare module 'node:module' {
+ import module = require('module');
+ export = module;
+}
diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts
new file mode 100755
index 0000000..eaa08bc
--- /dev/null
+++ b/node_modules/@types/node/net.d.ts
@@ -0,0 +1,838 @@
+/**
+ * > Stability: 2 - Stable
+ *
+ * The `net` module provides an asynchronous network API for creating stream-based
+ * TCP or `IPC` servers ({@link createServer}) and clients
+ * ({@link createConnection}).
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * const net = require('net');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js)
+ */
+declare module 'net' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as dns from 'node:dns';
+ type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+ interface SocketConstructorOpts {
+ fd?: number | undefined;
+ allowHalfOpen?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ signal?: AbortSignal;
+ }
+ interface OnReadOpts {
+ buffer: Uint8Array | (() => Uint8Array);
+ /**
+ * This function is called for every chunk of incoming data.
+ * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
+ * Return false from this function to implicitly pause() the socket.
+ */
+ callback(bytesWritten: number, buf: Uint8Array): boolean;
+ }
+ interface ConnectOpts {
+ /**
+ * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
+ * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
+ * still be emitted as normal and methods like pause() and resume() will also behave as expected.
+ */
+ onread?: OnReadOpts | undefined;
+ }
+ interface TcpSocketConnectOpts extends ConnectOpts {
+ port: number;
+ host?: string | undefined;
+ localAddress?: string | undefined;
+ localPort?: number | undefined;
+ hints?: number | undefined;
+ family?: number | undefined;
+ lookup?: LookupFunction | undefined;
+ noDelay?: boolean | undefined;
+ keepAlive?: boolean | undefined;
+ keepAliveInitialDelay?: number | undefined;
+ }
+ interface IpcSocketConnectOpts extends ConnectOpts {
+ path: string;
+ }
+ type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
+ /**
+ * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
+ * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
+ * an `EventEmitter`.
+ *
+ * A `net.Socket` can be created by the user and used directly to interact with
+ * a server. For example, it is returned by {@link createConnection},
+ * so the user can use it to talk to the server.
+ *
+ * It can also be created by Node.js and passed to the user when a connection
+ * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
+ * it to interact with the client.
+ * @since v0.3.4
+ */
+ class Socket extends stream.Duplex {
+ constructor(options?: SocketConstructorOpts);
+ /**
+ * Sends data on the socket. The second parameter specifies the encoding in the
+ * case of a string. It defaults to UTF8 encoding.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
+ *
+ * The optional `callback` parameter will be executed when the data is finally
+ * written out, which may not be immediately.
+ *
+ * See `Writable` stream `write()` method for more
+ * information.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ */
+ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
+ write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
+ /**
+ * Initiate a connection on a given socket.
+ *
+ * Possible signatures:
+ *
+ * * `socket.connect(options[, connectListener])`
+ * * `socket.connect(path[, connectListener])` for `IPC` connections.
+ * * `socket.connect(port[, host][, connectListener])` for TCP connections.
+ * * Returns: `net.Socket` The socket itself.
+ *
+ * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
+ * instead of a `'connect'` event, an `'error'` event will be emitted with
+ * the error passed to the `'error'` listener.
+ * The last parameter `connectListener`, if supplied, will be added as a listener
+ * for the `'connect'` event **once**.
+ *
+ * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
+ * behavior.
+ */
+ connect(options: SocketConnectOpts, connectionListener?: () => void): this;
+ connect(port: number, host: string, connectionListener?: () => void): this;
+ connect(port: number, connectionListener?: () => void): this;
+ connect(path: string, connectionListener?: () => void): this;
+ /**
+ * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setEncoding(encoding?: BufferEncoding): this;
+ /**
+ * Pauses the reading of data. That is, `'data'` events will not be emitted.
+ * Useful to throttle back an upload.
+ * @return The socket itself.
+ */
+ pause(): this;
+ /**
+ * Resumes reading after a call to `socket.pause()`.
+ * @return The socket itself.
+ */
+ resume(): this;
+ /**
+ * Sets the socket to timeout after `timeout` milliseconds of inactivity on
+ * the socket. By default `net.Socket` do not have a timeout.
+ *
+ * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
+ * end the connection.
+ *
+ * ```js
+ * socket.setTimeout(3000);
+ * socket.on('timeout', () => {
+ * console.log('socket timeout');
+ * socket.end();
+ * });
+ * ```
+ *
+ * If `timeout` is 0, then the existing idle timeout is disabled.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Enable/disable the use of Nagle's algorithm.
+ *
+ * When a TCP connection is created, it will have Nagle's algorithm enabled.
+ *
+ * Nagle's algorithm delays data before it is sent via the network. It attempts
+ * to optimize throughput at the expense of latency.
+ *
+ * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
+ * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
+ * algorithm.
+ * @since v0.1.90
+ * @param [noDelay=true]
+ * @return The socket itself.
+ */
+ setNoDelay(noDelay?: boolean): this;
+ /**
+ * Enable/disable keep-alive functionality, and optionally set the initial
+ * delay before the first keepalive probe is sent on an idle socket.
+ *
+ * Set `initialDelay` (in milliseconds) to set the delay between the last
+ * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
+ * (or previous) setting.
+ *
+ * Enabling the keep-alive functionality will set the following socket options:
+ *
+ * * `SO_KEEPALIVE=1`
+ * * `TCP_KEEPIDLE=initialDelay`
+ * * `TCP_KEEPCNT=10`
+ * * `TCP_KEEPINTVL=1`
+ * @since v0.1.92
+ * @param [enable=false]
+ * @param [initialDelay=0]
+ * @return The socket itself.
+ */
+ setKeepAlive(enable?: boolean, initialDelay?: number): this;
+ /**
+ * Returns the bound `address`, the address `family` name and `port` of the
+ * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
+ * @since v0.1.90
+ */
+ address(): AddressInfo | {};
+ /**
+ * Calling `unref()` on a socket will allow the program to exit if this is the only
+ * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ unref(): this;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
+ * If the socket is `ref`ed calling `ref` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ ref(): this;
+ /**
+ * This property shows the number of characters buffered for writing. The buffer
+ * may contain strings whose length after encoding is not yet known. So this number
+ * is only an approximation of the number of bytes in the buffer.
+ *
+ * `net.Socket` has the property that `socket.write()` always works. This is to
+ * help users get up and running quickly. The computer cannot always keep up
+ * with the amount of data that is written to a socket. The network connection
+ * simply might be too slow. Node.js will internally queue up the data written to a
+ * socket and send it out over the wire when it is possible.
+ *
+ * The consequence of this internal buffering is that memory may grow.
+ * Users who experience large or growing `bufferSize` should attempt to
+ * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
+ * @since v0.3.8
+ * @deprecated Since v14.6.0 - Use `writableLength` instead.
+ */
+ readonly bufferSize: number;
+ /**
+ * The amount of received bytes.
+ * @since v0.5.3
+ */
+ readonly bytesRead: number;
+ /**
+ * The amount of bytes sent.
+ * @since v0.5.3
+ */
+ readonly bytesWritten: number;
+ /**
+ * If `true`,`socket.connect(options[, connectListener])` was
+ * called and has not yet finished. It will stay `true` until the socket becomes
+ * connected, then it is set to `false` and the `'connect'` event is emitted. Note
+ * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
+ * @since v6.1.0
+ */
+ readonly connecting: boolean;
+ /**
+ * See `writable.destroyed` for further details.
+ */
+ readonly destroyed: boolean;
+ /**
+ * The string representation of the local IP address the remote client is
+ * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
+ * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
+ * @since v0.9.6
+ */
+ readonly localAddress?: string;
+ /**
+ * The numeric representation of the local port. For example, `80` or `21`.
+ * @since v0.9.6
+ */
+ readonly localPort?: number;
+ /**
+ * This property represents the state of the connection as a string.
+ * @see {https://nodejs.org/api/net.html#socketreadystate}
+ * @since v0.5.0
+ */
+ readonly readyState: SocketReadyState;
+ /**
+ * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.5.10
+ */
+ readonly remoteAddress?: string | undefined;
+ /**
+ * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`.
+ * @since v0.11.14
+ */
+ readonly remoteFamily?: string | undefined;
+ /**
+ * The numeric representation of the remote port. For example, `80` or `21`.
+ * @since v0.5.10
+ */
+ readonly remotePort?: number | undefined;
+ /**
+ * The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set.
+ * @since v10.7.0
+ */
+ readonly timeout?: number | undefined;
+ /**
+ * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
+ * server will still send some data.
+ *
+ * See `writable.end()` for further details.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ * @param callback Optional callback for when the socket is finished.
+ * @return The socket itself.
+ */
+ end(callback?: () => void): this;
+ end(buffer: Uint8Array | string, callback?: () => void): this;
+ end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. data
+ * 4. drain
+ * 5. end
+ * 6. error
+ * 7. lookup
+ * 8. timeout
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (hadError: boolean) => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'data', listener: (data: Buffer) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', hadError: boolean): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'data', data: Buffer): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
+ emit(event: 'ready'): boolean;
+ emit(event: 'timeout'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (hadError: boolean) => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'data', listener: (data: Buffer) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (hadError: boolean) => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'data', listener: (data: Buffer) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ }
+ interface ListenOptions extends Abortable {
+ port?: number | undefined;
+ host?: string | undefined;
+ backlog?: number | undefined;
+ path?: string | undefined;
+ exclusive?: boolean | undefined;
+ readableAll?: boolean | undefined;
+ writableAll?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ }
+ interface ServerOpts {
+ /**
+ * Indicates whether half-opened TCP connections are allowed.
+ * @default false
+ */
+ allowHalfOpen?: boolean | undefined;
+ /**
+ * Indicates whether the socket should be paused on incoming connections.
+ * @default false
+ */
+ pauseOnConnect?: boolean | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default false
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ }
+ /**
+ * This class is used to create a TCP or `IPC` server.
+ * @since v0.1.90
+ */
+ class Server extends EventEmitter {
+ constructor(connectionListener?: (socket: Socket) => void);
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
+ /**
+ * Start a server listening for connections. A `net.Server` can be a TCP or
+ * an `IPC` server depending on what it listens to.
+ *
+ * Possible signatures:
+ *
+ * * `server.listen(handle[, backlog][, callback])`
+ * * `server.listen(options[, callback])`
+ * * `server.listen(path[, backlog][, callback])` for `IPC` servers
+ * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
+ *
+ * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
+ * event.
+ *
+ * All `listen()` methods can take a `backlog` parameter to specify the maximum
+ * length of the queue of pending connections. The actual length will be determined
+ * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512).
+ *
+ * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
+ * details).
+ *
+ * The `server.listen()` method can be called again if and only if there was an
+ * error during the first `server.listen()` call or `server.close()` has been
+ * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
+ *
+ * One of the most common errors raised when listening is `EADDRINUSE`.
+ * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
+ * after a certain amount of time:
+ *
+ * ```js
+ * server.on('error', (e) => {
+ * if (e.code === 'EADDRINUSE') {
+ * console.log('Address in use, retrying...');
+ * setTimeout(() => {
+ * server.close();
+ * server.listen(PORT, HOST);
+ * }, 1000);
+ * }
+ * });
+ * ```
+ */
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, hostname?: string, listeningListener?: () => void): this;
+ listen(port?: number, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, listeningListener?: () => void): this;
+ listen(path: string, backlog?: number, listeningListener?: () => void): this;
+ listen(path: string, listeningListener?: () => void): this;
+ listen(options: ListenOptions, listeningListener?: () => void): this;
+ listen(handle: any, backlog?: number, listeningListener?: () => void): this;
+ listen(handle: any, listeningListener?: () => void): this;
+ /**
+ * Stops the server from accepting new connections and keeps existing
+ * connections. This function is asynchronous, the server is finally closed
+ * when all connections are ended and the server emits a `'close'` event.
+ * The optional `callback` will be called once the `'close'` event occurs. Unlike
+ * that event, it will be called with an `Error` as its only argument if the server
+ * was not open when it was closed.
+ * @since v0.1.90
+ * @param callback Called when the server is closed.
+ */
+ close(callback?: (err?: Error) => void): this;
+ /**
+ * Returns the bound `address`, the address `family` name, and `port` of the server
+ * as reported by the operating system if listening on an IP socket
+ * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
+ *
+ * For a server listening on a pipe or Unix domain socket, the name is returned
+ * as a string.
+ *
+ * ```js
+ * const server = net.createServer((socket) => {
+ * socket.end('goodbye\n');
+ * }).on('error', (err) => {
+ * // Handle errors here.
+ * throw err;
+ * });
+ *
+ * // Grab an arbitrary unused port.
+ * server.listen(() => {
+ * console.log('opened server on', server.address());
+ * });
+ * ```
+ *
+ * `server.address()` returns `null` before the `'listening'` event has been
+ * emitted or after calling `server.close()`.
+ * @since v0.1.90
+ */
+ address(): AddressInfo | string | null;
+ /**
+ * Asynchronously get the number of concurrent connections on the server. Works
+ * when sockets were sent to forks.
+ *
+ * Callback should take two arguments `err` and `count`.
+ * @since v0.9.7
+ */
+ getConnections(cb: (error: Error | null, count: number) => void): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
+ * If the server is `ref`ed calling `ref()` again will have no effect.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Calling `unref()` on a server will allow the program to exit if this is the only
+ * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Set this property to reject connections when the server's connection count gets
+ * high.
+ *
+ * It is not recommended to use this option once a socket has been sent to a child
+ * with `child_process.fork()`.
+ * @since v0.2.0
+ */
+ maxConnections: number;
+ connections: number;
+ /**
+ * Indicates whether or not the server is listening for connections.
+ * @since v5.7.0
+ */
+ listening: boolean;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connection
+ * 3. error
+ * 4. listening
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ }
+ type IPVersion = 'ipv4' | 'ipv6';
+ /**
+ * The `BlockList` object can be used with some network APIs to specify rules for
+ * disabling inbound or outbound access to specific IP addresses, IP ranges, or
+ * IP subnets.
+ * @since v15.0.0, v14.18.0
+ */
+ class BlockList {
+ /**
+ * Adds a rule to block the given IP address.
+ * @since v15.0.0, v14.18.0
+ * @param address An IPv4 or IPv6 address.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addAddress(address: string, type?: IPVersion): void;
+ addAddress(address: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
+ * @since v15.0.0, v14.18.0
+ * @param start The starting IPv4 or IPv6 address in the range.
+ * @param end The ending IPv4 or IPv6 address in the range.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addRange(start: string, end: string, type?: IPVersion): void;
+ addRange(start: SocketAddress, end: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses specified as a subnet mask.
+ * @since v15.0.0, v14.18.0
+ * @param net The network IPv4 or IPv6 address.
+ * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addSubnet(net: SocketAddress, prefix: number): void;
+ addSubnet(net: string, prefix: number, type?: IPVersion): void;
+ /**
+ * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
+ *
+ * ```js
+ * const blockList = new net.BlockList();
+ * blockList.addAddress('123.123.123.123');
+ * blockList.addRange('10.0.0.1', '10.0.0.10');
+ * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
+ *
+ * console.log(blockList.check('123.123.123.123')); // Prints: true
+ * console.log(blockList.check('10.0.0.3')); // Prints: true
+ * console.log(blockList.check('222.111.111.222')); // Prints: false
+ *
+ * // IPv6 notation for IPv4 addresses works:
+ * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
+ * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
+ * ```
+ * @since v15.0.0, v14.18.0
+ * @param address The IP address to check
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ check(address: SocketAddress): boolean;
+ check(address: string, type?: IPVersion): boolean;
+ }
+ interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
+ /**
+ * Creates a new TCP or `IPC` server.
+ *
+ * If `allowHalfOpen` is set to `true`, when the other end of the socket
+ * signals the end of transmission, the server will only send back the end of
+ * transmission when `socket.end()` is explicitly called. For example, in the
+ * context of TCP, when a FIN packed is received, a FIN packed is sent
+ * back only when `socket.end()` is explicitly called. Until then the
+ * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
+ *
+ * If `pauseOnConnect` is set to `true`, then the socket associated with each
+ * incoming connection will be paused, and no data will be read from its handle.
+ * This allows connections to be passed between processes without any data being
+ * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
+ *
+ * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
+ *
+ * Here is an example of a TCP echo server which listens for connections
+ * on port 8124:
+ *
+ * ```js
+ * const net = require('net');
+ * const server = net.createServer((c) => {
+ * // 'connection' listener.
+ * console.log('client connected');
+ * c.on('end', () => {
+ * console.log('client disconnected');
+ * });
+ * c.write('hello\r\n');
+ * c.pipe(c);
+ * });
+ * server.on('error', (err) => {
+ * throw err;
+ * });
+ * server.listen(8124, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Test this by using `telnet`:
+ *
+ * ```console
+ * $ telnet localhost 8124
+ * ```
+ *
+ * To listen on the socket `/tmp/echo.sock`:
+ *
+ * ```js
+ * server.listen('/tmp/echo.sock', () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Use `nc` to connect to a Unix domain socket server:
+ *
+ * ```console
+ * $ nc -U /tmp/echo.sock
+ * ```
+ * @since v0.5.0
+ * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
+ */
+ function createServer(connectionListener?: (socket: Socket) => void): Server;
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
+ /**
+ * Aliases to {@link createConnection}.
+ *
+ * Possible signatures:
+ *
+ * * {@link connect}
+ * * {@link connect} for `IPC` connections.
+ * * {@link connect} for TCP connections.
+ */
+ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function connect(port: number, host?: string, connectionListener?: () => void): Socket;
+ function connect(path: string, connectionListener?: () => void): Socket;
+ /**
+ * A factory function, which creates a new {@link Socket},
+ * immediately initiates connection with `socket.connect()`,
+ * then returns the `net.Socket` that starts the connection.
+ *
+ * When the connection is established, a `'connect'` event will be emitted
+ * on the returned socket. The last parameter `connectListener`, if supplied,
+ * will be added as a listener for the `'connect'` event **once**.
+ *
+ * Possible signatures:
+ *
+ * * {@link createConnection}
+ * * {@link createConnection} for `IPC` connections.
+ * * {@link createConnection} for TCP connections.
+ *
+ * The {@link connect} function is an alias to this function.
+ */
+ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
+ function createConnection(path: string, connectionListener?: () => void): Socket;
+ /**
+ * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
+ * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
+ *
+ * ```js
+ * net.isIP('::1'); // returns 6
+ * net.isIP('127.0.0.1'); // returns 4
+ * net.isIP('127.000.000.001'); // returns 0
+ * net.isIP('127.0.0.1/24'); // returns 0
+ * net.isIP('fhqwhgads'); // returns 0
+ * ```
+ * @since v0.3.0
+ */
+ function isIP(input: string): number;
+ /**
+ * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
+ * leading zeroes. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv4('127.0.0.1'); // returns true
+ * net.isIPv4('127.000.000.001'); // returns false
+ * net.isIPv4('127.0.0.1/24'); // returns false
+ * net.isIPv4('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv4(input: string): boolean;
+ /**
+ * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv6('::1'); // returns true
+ * net.isIPv6('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv6(input: string): boolean;
+ interface SocketAddressInitOptions {
+ /**
+ * The network address as either an IPv4 or IPv6 string.
+ * @default 127.0.0.1
+ */
+ address?: string | undefined;
+ /**
+ * @default `'ipv4'`
+ */
+ family?: IPVersion | undefined;
+ /**
+ * An IPv6 flow-label used only if `family` is `'ipv6'`.
+ * @default 0
+ */
+ flowlabel?: number | undefined;
+ /**
+ * An IP port.
+ * @default 0
+ */
+ port?: number | undefined;
+ }
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ class SocketAddress {
+ constructor(options: SocketAddressInitOptions);
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly address: string;
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly family: IPVersion;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly port: number;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly flowlabel: number;
+ }
+}
+declare module 'node:net' {
+ export * from 'net';
+}
diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts
new file mode 100755
index 0000000..3c55599
--- /dev/null
+++ b/node_modules/@types/node/os.d.ts
@@ -0,0 +1,466 @@
+/**
+ * The `os` module provides operating system-related utility methods and
+ * properties. It can be accessed using:
+ *
+ * ```js
+ * const os = require('os');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js)
+ */
+declare module 'os' {
+ interface CpuInfo {
+ model: string;
+ speed: number;
+ times: {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+ };
+ }
+ interface NetworkInterfaceBase {
+ address: string;
+ netmask: string;
+ mac: string;
+ internal: boolean;
+ cidr: string | null;
+ }
+ interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
+ family: 'IPv4';
+ scopeid?: undefined;
+ }
+ interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
+ family: 'IPv6';
+ scopeid: number;
+ }
+ interface UserInfo<T> {
+ username: T;
+ uid: number;
+ gid: number;
+ shell: T;
+ homedir: T;
+ }
+ type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
+ /**
+ * Returns the host name of the operating system as a string.
+ * @since v0.3.3
+ */
+ function hostname(): string;
+ /**
+ * Returns an array containing the 1, 5, and 15 minute load averages.
+ *
+ * The load average is a measure of system activity calculated by the operating
+ * system and expressed as a fractional number.
+ *
+ * The load average is a Unix-specific concept. On Windows, the return value is
+ * always `[0, 0, 0]`.
+ * @since v0.3.3
+ */
+ function loadavg(): number[];
+ /**
+ * Returns the system uptime in number of seconds.
+ * @since v0.3.3
+ */
+ function uptime(): number;
+ /**
+ * Returns the amount of free system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function freemem(): number;
+ /**
+ * Returns the total amount of system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function totalmem(): number;
+ /**
+ * Returns an array of objects containing information about each logical CPU core.
+ *
+ * The properties included on each object include:
+ *
+ * ```js
+ * [
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 252020,
+ * nice: 0,
+ * sys: 30340,
+ * idle: 1070356870,
+ * irq: 0
+ * }
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 306960,
+ * nice: 0,
+ * sys: 26980,
+ * idle: 1071569080,
+ * irq: 0
+ * }
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 248450,
+ * nice: 0,
+ * sys: 21750,
+ * idle: 1070919370,
+ * irq: 0
+ * }
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 256880,
+ * nice: 0,
+ * sys: 19430,
+ * idle: 1070905480,
+ * irq: 20
+ * }
+ * },
+ * ]
+ * ```
+ *
+ * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
+ * are always 0.
+ * @since v0.3.3
+ */
+ function cpus(): CpuInfo[];
+ /**
+ * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
+ * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
+ *
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
+ * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
+ * @since v0.3.3
+ */
+ function type(): string;
+ /**
+ * Returns the operating system as a string.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
+ * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v0.3.3
+ */
+ function release(): string;
+ /**
+ * Returns an object containing network interfaces that have been assigned a
+ * network address.
+ *
+ * Each key on the returned object identifies a network interface. The associated
+ * value is an array of objects that each describe an assigned network address.
+ *
+ * The properties available on the assigned network address object include:
+ *
+ * ```js
+ * {
+ * lo: [
+ * {
+ * address: '127.0.0.1',
+ * netmask: '255.0.0.0',
+ * family: 'IPv4',
+ * mac: '00:00:00:00:00:00',
+ * internal: true,
+ * cidr: '127.0.0.1/8'
+ * },
+ * {
+ * address: '::1',
+ * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
+ * family: 'IPv6',
+ * mac: '00:00:00:00:00:00',
+ * scopeid: 0,
+ * internal: true,
+ * cidr: '::1/128'
+ * }
+ * ],
+ * eth0: [
+ * {
+ * address: '192.168.1.108',
+ * netmask: '255.255.255.0',
+ * family: 'IPv4',
+ * mac: '01:02:03:0a:0b:0c',
+ * internal: false,
+ * cidr: '192.168.1.108/24'
+ * },
+ * {
+ * address: 'fe80::a00:27ff:fe4e:66a1',
+ * netmask: 'ffff:ffff:ffff:ffff::',
+ * family: 'IPv6',
+ * mac: '01:02:03:0a:0b:0c',
+ * scopeid: 1,
+ * internal: false,
+ * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
+ * }
+ * ]
+ * }
+ * ```
+ * @since v0.6.0
+ */
+ function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
+ /**
+ * Returns the string path of the current user's home directory.
+ *
+ * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
+ * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
+ *
+ * On Windows, it uses the `USERPROFILE` environment variable if defined.
+ * Otherwise it uses the path to the profile directory of the current user.
+ * @since v2.3.0
+ */
+ function homedir(): string;
+ /**
+ * Returns information about the currently effective user. On POSIX platforms,
+ * this is typically a subset of the password file. The returned object includes
+ * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`.
+ *
+ * The value of `homedir` returned by `os.userInfo()` is provided by the operating
+ * system. This differs from the result of `os.homedir()`, which queries
+ * environment variables for the home directory before falling back to the
+ * operating system response.
+ *
+ * Throws a `SystemError` if a user has no `username` or `homedir`.
+ * @since v6.0.0
+ */
+ function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
+ function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
+ type SignalConstants = {
+ [key in NodeJS.Signals]: number;
+ };
+ namespace constants {
+ const UV_UDP_REUSEADDR: number;
+ namespace signals {}
+ const signals: SignalConstants;
+ namespace errno {
+ const E2BIG: number;
+ const EACCES: number;
+ const EADDRINUSE: number;
+ const EADDRNOTAVAIL: number;
+ const EAFNOSUPPORT: number;
+ const EAGAIN: number;
+ const EALREADY: number;
+ const EBADF: number;
+ const EBADMSG: number;
+ const EBUSY: number;
+ const ECANCELED: number;
+ const ECHILD: number;
+ const ECONNABORTED: number;
+ const ECONNREFUSED: number;
+ const ECONNRESET: number;
+ const EDEADLK: number;
+ const EDESTADDRREQ: number;
+ const EDOM: number;
+ const EDQUOT: number;
+ const EEXIST: number;
+ const EFAULT: number;
+ const EFBIG: number;
+ const EHOSTUNREACH: number;
+ const EIDRM: number;
+ const EILSEQ: number;
+ const EINPROGRESS: number;
+ const EINTR: number;
+ const EINVAL: number;
+ const EIO: number;
+ const EISCONN: number;
+ const EISDIR: number;
+ const ELOOP: number;
+ const EMFILE: number;
+ const EMLINK: number;
+ const EMSGSIZE: number;
+ const EMULTIHOP: number;
+ const ENAMETOOLONG: number;
+ const ENETDOWN: number;
+ const ENETRESET: number;
+ const ENETUNREACH: number;
+ const ENFILE: number;
+ const ENOBUFS: number;
+ const ENODATA: number;
+ const ENODEV: number;
+ const ENOENT: number;
+ const ENOEXEC: number;
+ const ENOLCK: number;
+ const ENOLINK: number;
+ const ENOMEM: number;
+ const ENOMSG: number;
+ const ENOPROTOOPT: number;
+ const ENOSPC: number;
+ const ENOSR: number;
+ const ENOSTR: number;
+ const ENOSYS: number;
+ const ENOTCONN: number;
+ const ENOTDIR: number;
+ const ENOTEMPTY: number;
+ const ENOTSOCK: number;
+ const ENOTSUP: number;
+ const ENOTTY: number;
+ const ENXIO: number;
+ const EOPNOTSUPP: number;
+ const EOVERFLOW: number;
+ const EPERM: number;
+ const EPIPE: number;
+ const EPROTO: number;
+ const EPROTONOSUPPORT: number;
+ const EPROTOTYPE: number;
+ const ERANGE: number;
+ const EROFS: number;
+ const ESPIPE: number;
+ const ESRCH: number;
+ const ESTALE: number;
+ const ETIME: number;
+ const ETIMEDOUT: number;
+ const ETXTBSY: number;
+ const EWOULDBLOCK: number;
+ const EXDEV: number;
+ const WSAEINTR: number;
+ const WSAEBADF: number;
+ const WSAEACCES: number;
+ const WSAEFAULT: number;
+ const WSAEINVAL: number;
+ const WSAEMFILE: number;
+ const WSAEWOULDBLOCK: number;
+ const WSAEINPROGRESS: number;
+ const WSAEALREADY: number;
+ const WSAENOTSOCK: number;
+ const WSAEDESTADDRREQ: number;
+ const WSAEMSGSIZE: number;
+ const WSAEPROTOTYPE: number;
+ const WSAENOPROTOOPT: number;
+ const WSAEPROTONOSUPPORT: number;
+ const WSAESOCKTNOSUPPORT: number;
+ const WSAEOPNOTSUPP: number;
+ const WSAEPFNOSUPPORT: number;
+ const WSAEAFNOSUPPORT: number;
+ const WSAEADDRINUSE: number;
+ const WSAEADDRNOTAVAIL: number;
+ const WSAENETDOWN: number;
+ const WSAENETUNREACH: number;
+ const WSAENETRESET: number;
+ const WSAECONNABORTED: number;
+ const WSAECONNRESET: number;
+ const WSAENOBUFS: number;
+ const WSAEISCONN: number;
+ const WSAENOTCONN: number;
+ const WSAESHUTDOWN: number;
+ const WSAETOOMANYREFS: number;
+ const WSAETIMEDOUT: number;
+ const WSAECONNREFUSED: number;
+ const WSAELOOP: number;
+ const WSAENAMETOOLONG: number;
+ const WSAEHOSTDOWN: number;
+ const WSAEHOSTUNREACH: number;
+ const WSAENOTEMPTY: number;
+ const WSAEPROCLIM: number;
+ const WSAEUSERS: number;
+ const WSAEDQUOT: number;
+ const WSAESTALE: number;
+ const WSAEREMOTE: number;
+ const WSASYSNOTREADY: number;
+ const WSAVERNOTSUPPORTED: number;
+ const WSANOTINITIALISED: number;
+ const WSAEDISCON: number;
+ const WSAENOMORE: number;
+ const WSAECANCELLED: number;
+ const WSAEINVALIDPROCTABLE: number;
+ const WSAEINVALIDPROVIDER: number;
+ const WSAEPROVIDERFAILEDINIT: number;
+ const WSASYSCALLFAILURE: number;
+ const WSASERVICE_NOT_FOUND: number;
+ const WSATYPE_NOT_FOUND: number;
+ const WSA_E_NO_MORE: number;
+ const WSA_E_CANCELLED: number;
+ const WSAEREFUSED: number;
+ }
+ namespace priority {
+ const PRIORITY_LOW: number;
+ const PRIORITY_BELOW_NORMAL: number;
+ const PRIORITY_NORMAL: number;
+ const PRIORITY_ABOVE_NORMAL: number;
+ const PRIORITY_HIGH: number;
+ const PRIORITY_HIGHEST: number;
+ }
+ }
+ const devNull: string;
+ const EOL: string;
+ /**
+ * Returns the operating system CPU architecture for which the Node.js binary was
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * The return value is equivalent to `process.arch`.
+ * @since v0.5.0
+ */
+ function arch(): string;
+ /**
+ * Returns a string identifying the kernel version.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+ * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v13.11.0, v12.17.0
+ */
+ function version(): string;
+ /**
+ * Returns a string identifying the operating system platform for which
+ * the Node.js binary was compiled. The value is set at compile time.
+ * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
+ *
+ * The return value is equivalent to `process.platform`.
+ *
+ * The value `'android'` may also be returned if Node.js is built on the Android
+ * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.5.0
+ */
+ function platform(): NodeJS.Platform;
+ /**
+ * Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.
+ *
+ * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname).
+ * On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used.
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v18.9.0
+ */
+ function machine(): string;
+ /**
+ * Returns the operating system's default directory for temporary files as a
+ * string.
+ * @since v0.9.9
+ */
+ function tmpdir(): string;
+ /**
+ * Returns a string identifying the endianness of the CPU for which the Node.js
+ * binary was compiled.
+ *
+ * Possible values are `'BE'` for big endian and `'LE'` for little endian.
+ * @since v0.9.4
+ */
+ function endianness(): 'BE' | 'LE';
+ /**
+ * Returns the scheduling priority for the process specified by `pid`. If `pid` is
+ * not provided or is `0`, the priority of the current process is returned.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to retrieve scheduling priority for.
+ */
+ function getPriority(pid?: number): number;
+ /**
+ * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used.
+ *
+ * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows
+ * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range
+ * mapping may cause the return value to be slightly different on Windows. To avoid
+ * confusion, set `priority` to one of the priority constants.
+ *
+ * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
+ * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to set scheduling priority for.
+ * @param priority The scheduling priority to assign to the process.
+ */
+ function setPriority(priority: number): void;
+ function setPriority(pid: number, priority: number): void;
+}
+declare module 'node:os' {
+ export * from 'os';
+}
diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json
new file mode 100755
index 0000000..d6e636f
--- /dev/null
+++ b/node_modules/@types/node/package.json
@@ -0,0 +1,232 @@
+{
+ "name": "@types/node",
+ "version": "18.7.23",
+ "description": "TypeScript definitions for Node.js",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Microsoft TypeScript",
+ "url": "https://github.com/Microsoft",
+ "githubUsername": "Microsoft"
+ },
+ {
+ "name": "DefinitelyTyped",
+ "url": "https://github.com/DefinitelyTyped",
+ "githubUsername": "DefinitelyTyped"
+ },
+ {
+ "name": "Alberto Schiabel",
+ "url": "https://github.com/jkomyno",
+ "githubUsername": "jkomyno"
+ },
+ {
+ "name": "Alvis HT Tang",
+ "url": "https://github.com/alvis",
+ "githubUsername": "alvis"
+ },
+ {
+ "name": "Andrew Makarov",
+ "url": "https://github.com/r3nya",
+ "githubUsername": "r3nya"
+ },
+ {
+ "name": "Benjamin Toueg",
+ "url": "https://github.com/btoueg",
+ "githubUsername": "btoueg"
+ },
+ {
+ "name": "Chigozirim C.",
+ "url": "https://github.com/smac89",
+ "githubUsername": "smac89"
+ },
+ {
+ "name": "David Junger",
+ "url": "https://github.com/touffy",
+ "githubUsername": "touffy"
+ },
+ {
+ "name": "Deividas Bakanas",
+ "url": "https://github.com/DeividasBakanas",
+ "githubUsername": "DeividasBakanas"
+ },
+ {
+ "name": "Eugene Y. Q. Shen",
+ "url": "https://github.com/eyqs",
+ "githubUsername": "eyqs"
+ },
+ {
+ "name": "Hannes Magnusson",
+ "url": "https://github.com/Hannes-Magnusson-CK",
+ "githubUsername": "Hannes-Magnusson-CK"
+ },
+ {
+ "name": "Huw",
+ "url": "https://github.com/hoo29",
+ "githubUsername": "hoo29"
+ },
+ {
+ "name": "Kelvin Jin",
+ "url": "https://github.com/kjin",
+ "githubUsername": "kjin"
+ },
+ {
+ "name": "Klaus Meinhardt",
+ "url": "https://github.com/ajafff",
+ "githubUsername": "ajafff"
+ },
+ {
+ "name": "Lishude",
+ "url": "https://github.com/islishude",
+ "githubUsername": "islishude"
+ },
+ {
+ "name": "Mariusz Wiktorczyk",
+ "url": "https://github.com/mwiktorczyk",
+ "githubUsername": "mwiktorczyk"
+ },
+ {
+ "name": "Mohsen Azimi",
+ "url": "https://github.com/mohsen1",
+ "githubUsername": "mohsen1"
+ },
+ {
+ "name": "Nicolas Even",
+ "url": "https://github.com/n-e",
+ "githubUsername": "n-e"
+ },
+ {
+ "name": "Nikita Galkin",
+ "url": "https://github.com/galkin",
+ "githubUsername": "galkin"
+ },
+ {
+ "name": "Parambir Singh",
+ "url": "https://github.com/parambirs",
+ "githubUsername": "parambirs"
+ },
+ {
+ "name": "Sebastian Silbermann",
+ "url": "https://github.com/eps1lon",
+ "githubUsername": "eps1lon"
+ },
+ {
+ "name": "Simon Schick",
+ "url": "https://github.com/SimonSchick",
+ "githubUsername": "SimonSchick"
+ },
+ {
+ "name": "Thomas den Hollander",
+ "url": "https://github.com/ThomasdenH",
+ "githubUsername": "ThomasdenH"
+ },
+ {
+ "name": "Wilco Bakker",
+ "url": "https://github.com/WilcoBakker",
+ "githubUsername": "WilcoBakker"
+ },
+ {
+ "name": "wwwy3y3",
+ "url": "https://github.com/wwwy3y3",
+ "githubUsername": "wwwy3y3"
+ },
+ {
+ "name": "Samuel Ainsworth",
+ "url": "https://github.com/samuela",
+ "githubUsername": "samuela"
+ },
+ {
+ "name": "Kyle Uehlein",
+ "url": "https://github.com/kuehlein",
+ "githubUsername": "kuehlein"
+ },
+ {
+ "name": "Thanik Bhongbhibhat",
+ "url": "https://github.com/bhongy",
+ "githubUsername": "bhongy"
+ },
+ {
+ "name": "Marcin Kopacz",
+ "url": "https://github.com/chyzwar",
+ "githubUsername": "chyzwar"
+ },
+ {
+ "name": "Trivikram Kamat",
+ "url": "https://github.com/trivikr",
+ "githubUsername": "trivikr"
+ },
+ {
+ "name": "Junxiao Shi",
+ "url": "https://github.com/yoursunny",
+ "githubUsername": "yoursunny"
+ },
+ {
+ "name": "Ilia Baryshnikov",
+ "url": "https://github.com/qwelias",
+ "githubUsername": "qwelias"
+ },
+ {
+ "name": "ExE Boss",
+ "url": "https://github.com/ExE-Boss",
+ "githubUsername": "ExE-Boss"
+ },
+ {
+ "name": "Piotr Błażejewicz",
+ "url": "https://github.com/peterblazejewicz",
+ "githubUsername": "peterblazejewicz"
+ },
+ {
+ "name": "Anna Henningsen",
+ "url": "https://github.com/addaleax",
+ "githubUsername": "addaleax"
+ },
+ {
+ "name": "Victor Perin",
+ "url": "https://github.com/victorperin",
+ "githubUsername": "victorperin"
+ },
+ {
+ "name": "Yongsheng Zhang",
+ "url": "https://github.com/ZYSzys",
+ "githubUsername": "ZYSzys"
+ },
+ {
+ "name": "NodeJS Contributors",
+ "url": "https://github.com/NodeJS",
+ "githubUsername": "NodeJS"
+ },
+ {
+ "name": "Linus Unnebäck",
+ "url": "https://github.com/LinusU",
+ "githubUsername": "LinusU"
+ },
+ {
+ "name": "wafuwafu13",
+ "url": "https://github.com/wafuwafu13",
+ "githubUsername": "wafuwafu13"
+ },
+ {
+ "name": "Matteo Collina",
+ "url": "https://github.com/mcollina",
+ "githubUsername": "mcollina"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "typesVersions": {
+ "<4.9.0-0": {
+ "*": [
+ "ts4.8/*"
+ ]
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/node"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "24d6e2b547c899309701e1e64ad11f0255c46a6f27da723607d3d1505e43d8da",
+ "typeScriptVersion": "4.1"
+} \ No newline at end of file
diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts
new file mode 100755
index 0000000..2d643b2
--- /dev/null
+++ b/node_modules/@types/node/path.d.ts
@@ -0,0 +1,191 @@
+declare module 'path/posix' {
+ import path = require('path');
+ export = path;
+}
+declare module 'path/win32' {
+ import path = require('path');
+ export = path;
+}
+/**
+ * The `path` module provides utilities for working with file and directory paths.
+ * It can be accessed using:
+ *
+ * ```js
+ * const path = require('path');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js)
+ */
+declare module 'path' {
+ namespace path {
+ /**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+ interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+ }
+ interface FormatInputPathObject {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root?: string | undefined;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir?: string | undefined;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base?: string | undefined;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext?: string | undefined;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name?: string | undefined;
+ }
+ interface PlatformPath {
+ /**
+ * Normalize a string path, reducing '..' and '.' parts.
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
+ *
+ * @param path string path to normalize.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ normalize(path: string): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ *
+ * @param paths paths to join.
+ * @throws {TypeError} if any of the path segments is not a string.
+ */
+ join(...paths: string[]): string;
+ /**
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+ *
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+ *
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
+ * until an absolute path is found. If after using all {from} paths still no absolute path is found,
+ * the current working directory is used as well. The resulting path is normalized,
+ * and trailing slashes are removed unless the path gets resolved to the root directory.
+ *
+ * @param paths A sequence of paths or path segments.
+ * @throws {TypeError} if any of the arguments is not a string.
+ */
+ resolve(...paths: string[]): string;
+ /**
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+ *
+ * If the given {path} is a zero-length string, `false` will be returned.
+ *
+ * @param path path to test.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ isAbsolute(path: string): boolean;
+ /**
+ * Solve the relative path from {from} to {to} based on the current working directory.
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+ *
+ * @throws {TypeError} if either `from` or `to` is not a string.
+ */
+ relative(from: string, to: string): string;
+ /**
+ * Return the directory name of a path. Similar to the Unix dirname command.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ dirname(path: string): string;
+ /**
+ * Return the last portion of a path. Similar to the Unix basename command.
+ * Often used to extract the file name from a fully qualified path.
+ *
+ * @param path the path to evaluate.
+ * @param ext optionally, an extension to remove from the result.
+ * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
+ */
+ basename(path: string, ext?: string): string;
+ /**
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ extname(path: string): string;
+ /**
+ * The platform-specific file separator. '\\' or '/'.
+ */
+ readonly sep: '\\' | '/';
+ /**
+ * The platform-specific file delimiter. ';' or ':'.
+ */
+ readonly delimiter: ';' | ':';
+ /**
+ * Returns an object from a path string - the opposite of format().
+ *
+ * @param path path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ parse(path: string): ParsedPath;
+ /**
+ * Returns a path string from an object - the opposite of parse().
+ *
+ * @param pathObject path to evaluate.
+ */
+ format(pathObject: FormatInputPathObject): string;
+ /**
+ * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
+ * If path is not a string, path will be returned without modifications.
+ * This method is meaningful only on Windows system.
+ * On POSIX systems, the method is non-operational and always returns path without modifications.
+ */
+ toNamespacedPath(path: string): string;
+ /**
+ * Posix specific pathing.
+ * Same as parent object on posix.
+ */
+ readonly posix: PlatformPath;
+ /**
+ * Windows specific pathing.
+ * Same as parent object on windows
+ */
+ readonly win32: PlatformPath;
+ }
+ }
+ const path: path.PlatformPath;
+ export = path;
+}
+declare module 'node:path' {
+ import path = require('path');
+ export = path;
+}
+declare module 'node:path/posix' {
+ import path = require('path/posix');
+ export = path;
+}
+declare module 'node:path/win32' {
+ import path = require('path/win32');
+ export = path;
+}
diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts
new file mode 100755
index 0000000..cf02a16
--- /dev/null
+++ b/node_modules/@types/node/perf_hooks.d.ts
@@ -0,0 +1,610 @@
+/**
+ * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
+ * Node.js-specific performance measurements.
+ *
+ * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
+ *
+ * * [High Resolution Time](https://www.w3.org/TR/hr-time-2)
+ * * [Performance Timeline](https://w3c.github.io/performance-timeline/)
+ * * [User Timing](https://www.w3.org/TR/user-timing/)
+ *
+ * ```js
+ * const { PerformanceObserver, performance } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((items) => {
+ * console.log(items.getEntries()[0].duration);
+ * performance.clearMarks();
+ * });
+ * obs.observe({ type: 'measure' });
+ * performance.measure('Start to Now');
+ *
+ * performance.mark('A');
+ * doSomeLongRunningProcess(() => {
+ * performance.measure('A to Now', 'A');
+ *
+ * performance.mark('B');
+ * performance.measure('A to B', 'A', 'B');
+ * });
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js)
+ */
+declare module 'perf_hooks' {
+ import { AsyncResource } from 'node:async_hooks';
+ type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
+ interface NodeGCPerformanceDetail {
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
+ * the type of garbage collection operation that occurred.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly kind?: number | undefined;
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
+ * property contains additional information about garbage collection operation.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly flags?: number | undefined;
+ }
+ /**
+ * @since v8.5.0
+ */
+ class PerformanceEntry {
+ protected constructor();
+ /**
+ * The total number of milliseconds elapsed for this entry. This value will not
+ * be meaningful for all Performance Entry types.
+ * @since v8.5.0
+ */
+ readonly duration: number;
+ /**
+ * The name of the performance entry.
+ * @since v8.5.0
+ */
+ readonly name: string;
+ /**
+ * The high resolution millisecond timestamp marking the starting time of the
+ * Performance Entry.
+ * @since v8.5.0
+ */
+ readonly startTime: number;
+ /**
+ * The type of the performance entry. It may be one of:
+ *
+ * * `'node'` (Node.js only)
+ * * `'mark'` (available on the Web)
+ * * `'measure'` (available on the Web)
+ * * `'gc'` (Node.js only)
+ * * `'function'` (Node.js only)
+ * * `'http2'` (Node.js only)
+ * * `'http'` (Node.js only)
+ * @since v8.5.0
+ */
+ readonly entryType: EntryType;
+ /**
+ * Additional detail specific to the `entryType`.
+ * @since v16.0.0
+ */
+ readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
+ toJSON(): any;
+ }
+ class PerformanceMark extends PerformanceEntry {
+ readonly duration: 0;
+ readonly entryType: 'mark';
+ }
+ class PerformanceMeasure extends PerformanceEntry {
+ readonly entryType: 'measure';
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Provides timing details for Node.js itself. The constructor of this class
+ * is not exposed to users.
+ * @since v8.5.0
+ */
+ class PerformanceNodeTiming extends PerformanceEntry {
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process
+ * completed bootstrapping. If bootstrapping has not yet finished, the property
+ * has the value of -1.
+ * @since v8.5.0
+ */
+ readonly bootstrapComplete: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js environment was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly environment: number;
+ /**
+ * The high resolution millisecond timestamp of the amount of time the event loop
+ * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
+ * does not take CPU usage into consideration. If the event loop has not yet
+ * started (e.g., in the first tick of the main script), the property has the
+ * value of 0.
+ * @since v14.10.0, v12.19.0
+ */
+ readonly idleTime: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * exited. If the event loop has not yet exited, the property has the value of -1\.
+ * It can only have a value of not -1 in a handler of the `'exit'` event.
+ * @since v8.5.0
+ */
+ readonly loopExit: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * started. If the event loop has not yet started (e.g., in the first tick of the
+ * main script), the property has the value of -1.
+ * @since v8.5.0
+ */
+ readonly loopStart: number;
+ /**
+ * The high resolution millisecond timestamp at which the V8 platform was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly v8Start: number;
+ }
+ interface EventLoopUtilization {
+ idle: number;
+ active: number;
+ utilization: number;
+ }
+ /**
+ * @param util1 The result of a previous call to eventLoopUtilization()
+ * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
+ */
+ type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization;
+ interface MarkOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * An optional timestamp to be used as the mark time.
+ * @default `performance.now()`.
+ */
+ startTime?: number | undefined;
+ }
+ interface MeasureOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * Duration between start and end times.
+ */
+ duration?: number | undefined;
+ /**
+ * Timestamp to be used as the end time, or a string identifying a previously recorded mark.
+ */
+ end?: number | string | undefined;
+ /**
+ * Timestamp to be used as the start time, or a string identifying a previously recorded mark.
+ */
+ start?: number | string | undefined;
+ }
+ interface TimerifyOptions {
+ /**
+ * A histogram object created using
+ * `perf_hooks.createHistogram()` that will record runtime durations in
+ * nanoseconds.
+ */
+ histogram?: RecordableHistogram | undefined;
+ }
+ interface Performance {
+ /**
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
+ * If name is provided, removes only the named mark.
+ * @param name
+ */
+ clearMarks(name?: string): void;
+ /**
+ * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
+ * If name is provided, removes only the named measure.
+ * @param name
+ * @since v16.7.0
+ */
+ clearMeasures(name?: string): void;
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
+ * If you are only interested in performance entries of certain types or that have certain names, see
+ * `performance.getEntriesByType()` and `performance.getEntriesByName()`.
+ * @since v16.7.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.
+ * @param name
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.entryType` is equal to `type`.
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ /**
+ * Creates a new PerformanceMark entry in the Performance Timeline.
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
+ * and whose performanceEntry.duration is always 0.
+ * Performance marks are used to mark specific significant moments in the Performance Timeline.
+ * @param name
+ * @return The PerformanceMark entry that was created
+ */
+ mark(name?: string, options?: MarkOptions): PerformanceMark;
+ /**
+ * Creates a new PerformanceMeasure entry in the Performance Timeline.
+ * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
+ * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
+ *
+ * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
+ * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
+ * then startMark is set to timeOrigin by default.
+ *
+ * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
+ * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
+ * @param name
+ * @param startMark
+ * @param endMark
+ * @return The PerformanceMeasure entry that was created
+ */
+ measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
+ measure(name: string, options: MeasureOptions): PerformanceMeasure;
+ /**
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
+ */
+ readonly nodeTiming: PerformanceNodeTiming;
+ /**
+ * @return the current high resolution millisecond timestamp
+ */
+ now(): number;
+ /**
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
+ */
+ readonly timeOrigin: number;
+ /**
+ * Wraps a function within a new function that measures the running time of the wrapped function.
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
+ * @param fn
+ */
+ timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
+ /**
+ * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
+ * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
+ * No other CPU idle time is taken into consideration.
+ */
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ interface PerformanceObserverEntryList {
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntries());
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 81.465639,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 81.860064,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
+ * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByName('meow'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 98.545991,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('nope')); // []
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 63.518931,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'measure')); // []
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ entryTypes: ['mark', 'measure'] });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByType('mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 55.897834,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 56.350146,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ }
+ type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
+ class PerformanceObserver extends AsyncResource {
+ constructor(callback: PerformanceObserverCallback);
+ /**
+ * Disconnects the `PerformanceObserver` instance from all notifications.
+ * @since v8.5.0
+ */
+ disconnect(): void;
+ /**
+ * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((list, observer) => {
+ * // Called once asynchronously. `list` contains three items.
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * for (let n = 0; n < 3; n++)
+ * performance.mark(`test${n}`);
+ * ```
+ * @since v8.5.0
+ */
+ observe(
+ options:
+ | {
+ entryTypes: ReadonlyArray<EntryType>;
+ buffered?: boolean | undefined;
+ }
+ | {
+ type: EntryType;
+ buffered?: boolean | undefined;
+ }
+ ): void;
+ }
+ namespace constants {
+ const NODE_PERFORMANCE_GC_MAJOR: number;
+ const NODE_PERFORMANCE_GC_MINOR: number;
+ const NODE_PERFORMANCE_GC_INCREMENTAL: number;
+ const NODE_PERFORMANCE_GC_WEAKCB: number;
+ const NODE_PERFORMANCE_GC_FLAGS_NO: number;
+ const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
+ }
+ const performance: Performance;
+ interface EventLoopMonitorOptions {
+ /**
+ * The sampling rate in milliseconds.
+ * Must be greater than zero.
+ * @default 10
+ */
+ resolution?: number | undefined;
+ }
+ interface Histogram {
+ /**
+ * Returns a `Map` object detailing the accumulated percentile distribution.
+ * @since v11.10.0
+ */
+ readonly percentiles: Map<number, number>;
+ /**
+ * The number of times the event loop delay exceeded the maximum 1 hour event
+ * loop delay threshold.
+ * @since v11.10.0
+ */
+ readonly exceeds: number;
+ /**
+ * The minimum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly min: number;
+ /**
+ * The maximum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly max: number;
+ /**
+ * The mean of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly mean: number;
+ /**
+ * The standard deviation of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly stddev: number;
+ /**
+ * Resets the collected histogram data.
+ * @since v11.10.0
+ */
+ reset(): void;
+ /**
+ * Returns the value at the given percentile.
+ * @since v11.10.0
+ * @param percentile A percentile value in the range (0, 100].
+ */
+ percentile(percentile: number): number;
+ }
+ interface IntervalHistogram extends Histogram {
+ /**
+ * Enables the update interval timer. Returns `true` if the timer was
+ * started, `false` if it was already started.
+ * @since v11.10.0
+ */
+ enable(): boolean;
+ /**
+ * Disables the update interval timer. Returns `true` if the timer was
+ * stopped, `false` if it was already stopped.
+ * @since v11.10.0
+ */
+ disable(): boolean;
+ }
+ interface RecordableHistogram extends Histogram {
+ /**
+ * @since v15.9.0, v14.18.0
+ * @param val The amount to record in the histogram.
+ */
+ record(val: number | bigint): void;
+ /**
+ * Calculates the amount of time (in nanoseconds) that has passed since the
+ * previous call to `recordDelta()` and records that amount in the histogram.
+ *
+ * ## Examples
+ * @since v15.9.0, v14.18.0
+ */
+ recordDelta(): void;
+ /**
+ * Adds the values from other to this histogram.
+ * @since v17.4.0, v16.14.0
+ * @param other Recordable Histogram to combine with
+ */
+ add(other: RecordableHistogram): void;
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Creates an `IntervalHistogram` object that samples and reports the event loop
+ * delay over time. The delays will be reported in nanoseconds.
+ *
+ * Using a timer to detect approximate event loop delay works because the
+ * execution of timers is tied specifically to the lifecycle of the libuv
+ * event loop. That is, a delay in the loop will cause a delay in the execution
+ * of the timer, and those delays are specifically what this API is intended to
+ * detect.
+ *
+ * ```js
+ * const { monitorEventLoopDelay } = require('perf_hooks');
+ * const h = monitorEventLoopDelay({ resolution: 20 });
+ * h.enable();
+ * // Do something.
+ * h.disable();
+ * console.log(h.min);
+ * console.log(h.max);
+ * console.log(h.mean);
+ * console.log(h.stddev);
+ * console.log(h.percentiles);
+ * console.log(h.percentile(50));
+ * console.log(h.percentile(99));
+ * ```
+ * @since v11.10.0
+ */
+ function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
+ interface CreateHistogramOptions {
+ /**
+ * The minimum recordable value. Must be an integer value greater than 0.
+ * @default 1
+ */
+ min?: number | bigint | undefined;
+ /**
+ * The maximum recordable value. Must be an integer value greater than min.
+ * @default Number.MAX_SAFE_INTEGER
+ */
+ max?: number | bigint | undefined;
+ /**
+ * The number of accuracy digits. Must be a number between 1 and 5.
+ * @default 3
+ */
+ figures?: number | undefined;
+ }
+ /**
+ * Returns a `RecordableHistogram`.
+ * @since v15.9.0, v14.18.0
+ */
+ function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
+}
+declare module 'node:perf_hooks' {
+ export * from 'perf_hooks';
+}
diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts
new file mode 100755
index 0000000..12148f9
--- /dev/null
+++ b/node_modules/@types/node/process.d.ts
@@ -0,0 +1,1482 @@
+declare module 'process' {
+ import * as tty from 'node:tty';
+ import { Worker } from 'node:worker_threads';
+ global {
+ var process: NodeJS.Process;
+ namespace NodeJS {
+ // this namespace merge is here because these are specifically used
+ // as the type for process.stdin, process.stdout, and process.stderr.
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
+ interface ReadStream extends tty.ReadStream {}
+ interface WriteStream extends tty.WriteStream {}
+ interface MemoryUsageFn {
+ /**
+ * The `process.memoryUsage()` method iterate over each page to gather informations about memory
+ * usage which can be slow depending on the program memory allocations.
+ */
+ (): MemoryUsage;
+ /**
+ * method returns an integer representing the Resident Set Size (RSS) in bytes.
+ */
+ rss(): number;
+ }
+ interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ external: number;
+ arrayBuffers: number;
+ }
+ interface CpuUsage {
+ user: number;
+ system: number;
+ }
+ interface ProcessRelease {
+ name: string;
+ sourceUrl?: string | undefined;
+ headersUrl?: string | undefined;
+ libUrl?: string | undefined;
+ lts?: string | undefined;
+ }
+ interface ProcessVersions extends Dict<string> {
+ http_parser: string;
+ node: string;
+ v8: string;
+ ares: string;
+ uv: string;
+ zlib: string;
+ modules: string;
+ openssl: string;
+ }
+ type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
+ type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64';
+ type Signals =
+ | 'SIGABRT'
+ | 'SIGALRM'
+ | 'SIGBUS'
+ | 'SIGCHLD'
+ | 'SIGCONT'
+ | 'SIGFPE'
+ | 'SIGHUP'
+ | 'SIGILL'
+ | 'SIGINT'
+ | 'SIGIO'
+ | 'SIGIOT'
+ | 'SIGKILL'
+ | 'SIGPIPE'
+ | 'SIGPOLL'
+ | 'SIGPROF'
+ | 'SIGPWR'
+ | 'SIGQUIT'
+ | 'SIGSEGV'
+ | 'SIGSTKFLT'
+ | 'SIGSTOP'
+ | 'SIGSYS'
+ | 'SIGTERM'
+ | 'SIGTRAP'
+ | 'SIGTSTP'
+ | 'SIGTTIN'
+ | 'SIGTTOU'
+ | 'SIGUNUSED'
+ | 'SIGURG'
+ | 'SIGUSR1'
+ | 'SIGUSR2'
+ | 'SIGVTALRM'
+ | 'SIGWINCH'
+ | 'SIGXCPU'
+ | 'SIGXFSZ'
+ | 'SIGBREAK'
+ | 'SIGLOST'
+ | 'SIGINFO';
+ type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection';
+ type MultipleResolveType = 'resolve' | 'reject';
+ type BeforeExitListener = (code: number) => void;
+ type DisconnectListener = () => void;
+ type ExitListener = (code: number) => void;
+ type RejectionHandledListener = (promise: Promise<unknown>) => void;
+ type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
+ /**
+ * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
+ * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
+ */
+ type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
+ type WarningListener = (warning: Error) => void;
+ type MessageListener = (message: unknown, sendHandle: unknown) => void;
+ type SignalsListener = (signal: Signals) => void;
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<unknown>, value: unknown) => void;
+ type WorkerListener = (worker: Worker) => void;
+ interface Socket extends ReadWriteStream {
+ isTTY?: true | undefined;
+ }
+ // Alias for compatibility
+ interface ProcessEnv extends Dict<string> {
+ /**
+ * Can be used to change the default timezone at runtime
+ */
+ TZ?: string;
+ }
+ interface HRTime {
+ (time?: [number, number]): [number, number];
+ bigint(): bigint;
+ }
+ interface ProcessReport {
+ /**
+ * Directory where the report is written.
+ * working directory of the Node.js process.
+ * @default '' indicating that reports are written to the current
+ */
+ directory: string;
+ /**
+ * Filename where the report is written.
+ * The default value is the empty string.
+ * @default '' the output filename will be comprised of a timestamp,
+ * PID, and sequence number.
+ */
+ filename: string;
+ /**
+ * Returns a JSON-formatted diagnostic report for the running process.
+ * The report's JavaScript stack trace is taken from err, if present.
+ */
+ getReport(err?: Error): string;
+ /**
+ * If true, a diagnostic report is generated on fatal errors,
+ * such as out of memory errors or failed C++ assertions.
+ * @default false
+ */
+ reportOnFatalError: boolean;
+ /**
+ * If true, a diagnostic report is generated when the process
+ * receives the signal specified by process.report.signal.
+ * @default false
+ */
+ reportOnSignal: boolean;
+ /**
+ * If true, a diagnostic report is generated on uncaught exception.
+ * @default false
+ */
+ reportOnUncaughtException: boolean;
+ /**
+ * The signal used to trigger the creation of a diagnostic report.
+ * @default 'SIGUSR2'
+ */
+ signal: Signals;
+ /**
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
+ * includes the date, time, PID, and a sequence number.
+ * The report's JavaScript stack trace is taken from err, if present.
+ *
+ * @param fileName Name of the file where the report is written.
+ * This should be a relative path, that will be appended to the directory specified in
+ * `process.report.directory`, or the current working directory of the Node.js process,
+ * if unspecified.
+ * @param error A custom error used for reporting the JavaScript stack.
+ * @return Filename of the generated report.
+ */
+ writeReport(fileName?: string): string;
+ writeReport(error?: Error): string;
+ writeReport(fileName?: string, err?: Error): string;
+ }
+ interface ResourceUsage {
+ fsRead: number;
+ fsWrite: number;
+ involuntaryContextSwitches: number;
+ ipcReceived: number;
+ ipcSent: number;
+ majorPageFault: number;
+ maxRSS: number;
+ minorPageFault: number;
+ sharedMemorySize: number;
+ signalsCount: number;
+ swappedOut: number;
+ systemCPUTime: number;
+ unsharedDataSize: number;
+ unsharedStackSize: number;
+ userCPUTime: number;
+ voluntaryContextSwitches: number;
+ }
+ interface EmitWarningOptions {
+ /**
+ * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
+ *
+ * @default 'Warning'
+ */
+ type?: string | undefined;
+ /**
+ * A unique identifier for the warning instance being emitted.
+ */
+ code?: string | undefined;
+ /**
+ * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
+ *
+ * @default process.emitWarning
+ */
+ ctor?: Function | undefined;
+ /**
+ * Additional text to include with the error.
+ */
+ detail?: string | undefined;
+ }
+ interface ProcessConfig {
+ readonly target_defaults: {
+ readonly cflags: any[];
+ readonly default_configuration: string;
+ readonly defines: string[];
+ readonly include_dirs: string[];
+ readonly libraries: string[];
+ };
+ readonly variables: {
+ readonly clang: number;
+ readonly host_arch: string;
+ readonly node_install_npm: boolean;
+ readonly node_install_waf: boolean;
+ readonly node_prefix: string;
+ readonly node_shared_openssl: boolean;
+ readonly node_shared_v8: boolean;
+ readonly node_shared_zlib: boolean;
+ readonly node_use_dtrace: boolean;
+ readonly node_use_etw: boolean;
+ readonly node_use_openssl: boolean;
+ readonly target_arch: string;
+ readonly v8_no_strict_aliasing: number;
+ readonly v8_use_snapshot: boolean;
+ readonly visibility: string;
+ };
+ }
+ interface Process extends EventEmitter {
+ /**
+ * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * For example, to copy `process.stdin` to `process.stdout`:
+ *
+ * ```js
+ * import { stdin, stdout } from 'process';
+ *
+ * stdin.pipe(stdout);
+ * ```
+ *
+ * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stdout: WriteStream & {
+ fd: 1;
+ };
+ /**
+ * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stderr: WriteStream & {
+ fd: 2;
+ };
+ /**
+ * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is
+ * a `Readable` stream.
+ *
+ * For details of how to read from `stdin` see `readable.read()`.
+ *
+ * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that
+ * is compatible with scripts written for Node.js prior to v0.10\.
+ * For more information see `Stream compatibility`.
+ *
+ * In "old" streams mode the `stdin` stream is paused by default, so one
+ * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode.
+ */
+ stdin: ReadStream & {
+ fd: 0;
+ };
+ openStdin(): Socket;
+ /**
+ * The `process.argv` property returns an array containing the command-line
+ * arguments passed when the Node.js process was launched. The first element will
+ * be {@link execPath}. See `process.argv0` if access to the original value
+ * of `argv[0]` is needed. The second element will be the path to the JavaScript
+ * file being executed. The remaining elements will be any additional command-line
+ * arguments.
+ *
+ * For example, assuming the following script for `process-args.js`:
+ *
+ * ```js
+ * import { argv } from 'process';
+ *
+ * // print process.argv
+ * argv.forEach((val, index) => {
+ * console.log(`${index}: ${val}`);
+ * });
+ * ```
+ *
+ * Launching the Node.js process as:
+ *
+ * ```console
+ * $ node process-args.js one two=three four
+ * ```
+ *
+ * Would generate the output:
+ *
+ * ```text
+ * 0: /usr/local/bin/node
+ * 1: /Users/mjr/work/node/process-args.js
+ * 2: one
+ * 3: two=three
+ * 4: four
+ * ```
+ * @since v0.1.27
+ */
+ argv: string[];
+ /**
+ * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts.
+ *
+ * ```console
+ * $ bash -c 'exec -a customArgv0 ./node'
+ * > process.argv[0]
+ * '/Volumes/code/external/node/out/Release/node'
+ * > process.argv0
+ * 'customArgv0'
+ * ```
+ * @since v6.4.0
+ */
+ argv0: string;
+ /**
+ * The `process.execArgv` property returns the set of Node.js-specific command-line
+ * options passed when the Node.js process was launched. These options do not
+ * appear in the array returned by the {@link argv} property, and do not
+ * include the Node.js executable, the name of the script, or any options following
+ * the script name. These options are useful in order to spawn child processes with
+ * the same execution environment as the parent.
+ *
+ * ```console
+ * $ node --harmony script.js --version
+ * ```
+ *
+ * Results in `process.execArgv`:
+ *
+ * ```js
+ * ['--harmony']
+ * ```
+ *
+ * And `process.argv`:
+ *
+ * ```js
+ * ['/usr/local/bin/node', 'script.js', '--version']
+ * ```
+ *
+ * Refer to `Worker constructor` for the detailed behavior of worker
+ * threads with this property.
+ * @since v0.7.7
+ */
+ execArgv: string[];
+ /**
+ * The `process.execPath` property returns the absolute pathname of the executable
+ * that started the Node.js process. Symbolic links, if any, are resolved.
+ *
+ * ```js
+ * '/usr/local/bin/node'
+ * ```
+ * @since v0.1.100
+ */
+ execPath: string;
+ /**
+ * The `process.abort()` method causes the Node.js process to exit immediately and
+ * generate a core file.
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.7.0
+ */
+ abort(): never;
+ /**
+ * The `process.chdir()` method changes the current working directory of the
+ * Node.js process or throws an exception if doing so fails (for instance, if
+ * the specified `directory` does not exist).
+ *
+ * ```js
+ * import { chdir, cwd } from 'process';
+ *
+ * console.log(`Starting directory: ${cwd()}`);
+ * try {
+ * chdir('/tmp');
+ * console.log(`New directory: ${cwd()}`);
+ * } catch (err) {
+ * console.error(`chdir: ${err}`);
+ * }
+ * ```
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.17
+ */
+ chdir(directory: string): void;
+ /**
+ * The `process.cwd()` method returns the current working directory of the Node.js
+ * process.
+ *
+ * ```js
+ * import { cwd } from 'process';
+ *
+ * console.log(`Current directory: ${cwd()}`);
+ * ```
+ * @since v0.1.8
+ */
+ cwd(): string;
+ /**
+ * The port used by the Node.js debugger when enabled.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * process.debugPort = 5858;
+ * ```
+ * @since v0.7.2
+ */
+ debugPort: number;
+ /**
+ * The `process.emitWarning()` method can be used to emit custom or application
+ * specific process warnings. These can be listened for by adding a handler to the `'warning'` event.
+ *
+ * ```js
+ * import { emitWarning } from 'process';
+ *
+ * // Emit a warning with a code and additional detail.
+ * emitWarning('Something happened!', {
+ * code: 'MY_WARNING',
+ * detail: 'This is some additional information'
+ * });
+ * // Emits:
+ * // (node:56338) [MY_WARNING] Warning: Something happened!
+ * // This is some additional information
+ * ```
+ *
+ * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * process.on('warning', (warning) => {
+ * console.warn(warning.name); // 'Warning'
+ * console.warn(warning.message); // 'Something happened!'
+ * console.warn(warning.code); // 'MY_WARNING'
+ * console.warn(warning.stack); // Stack trace
+ * console.warn(warning.detail); // 'This is some additional information'
+ * });
+ * ```
+ *
+ * If `warning` is passed as an `Error` object, the `options` argument is ignored.
+ * @since v8.0.0
+ * @param warning The warning to emit.
+ */
+ emitWarning(warning: string | Error, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
+ /**
+ * The `process.env` property returns an object containing the user environment.
+ * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html).
+ *
+ * An example of this object looks like:
+ *
+ * ```js
+ * {
+ * TERM: 'xterm-256color',
+ * SHELL: '/usr/local/bin/bash',
+ * USER: 'maciej',
+ * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
+ * PWD: '/Users/maciej',
+ * EDITOR: 'vim',
+ * SHLVL: '1',
+ * HOME: '/Users/maciej',
+ * LOGNAME: 'maciej',
+ * _: '/usr/local/bin/node'
+ * }
+ * ```
+ *
+ * It is possible to modify this object, but such modifications will not be
+ * reflected outside the Node.js process, or (unless explicitly requested)
+ * to other `Worker` threads.
+ * In other words, the following example would not work:
+ *
+ * ```console
+ * $ node -e 'process.env.foo = "bar"' &#x26;&#x26; echo $foo
+ * ```
+ *
+ * While the following will:
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.foo = 'bar';
+ * console.log(env.foo);
+ * ```
+ *
+ * Assigning a property on `process.env` will implicitly convert the value
+ * to a string. **This behavior is deprecated.** Future versions of Node.js may
+ * throw an error when the value is not a string, number, or boolean.
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.test = null;
+ * console.log(env.test);
+ * // => 'null'
+ * env.test = undefined;
+ * console.log(env.test);
+ * // => 'undefined'
+ * ```
+ *
+ * Use `delete` to delete a property from `process.env`.
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.TEST = 1;
+ * delete env.TEST;
+ * console.log(env.TEST);
+ * // => undefined
+ * ```
+ *
+ * On Windows operating systems, environment variables are case-insensitive.
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.TEST = 1;
+ * console.log(env.test);
+ * // => 1
+ * ```
+ *
+ * Unless explicitly specified when creating a `Worker` instance,
+ * each `Worker` thread has its own copy of `process.env`, based on its
+ * parent thread’s `process.env`, or whatever was specified as the `env` option
+ * to the `Worker` constructor. Changes to `process.env` will not be visible
+ * across `Worker` threads, and only the main thread can make changes that
+ * are visible to the operating system or to native add-ons.
+ * @since v0.1.27
+ */
+ env: ProcessEnv;
+ /**
+ * The `process.exit()` method instructs Node.js to terminate the process
+ * synchronously with an exit status of `code`. If `code` is omitted, exit uses
+ * either the 'success' code `0` or the value of `process.exitCode` if it has been
+ * set. Node.js will not terminate until all the `'exit'` event listeners are
+ * called.
+ *
+ * To exit with a 'failure' code:
+ *
+ * ```js
+ * import { exit } from 'process';
+ *
+ * exit(1);
+ * ```
+ *
+ * The shell that executed Node.js should see the exit code as `1`.
+ *
+ * Calling `process.exit()` will force the process to exit as quickly as possible
+ * even if there are still asynchronous operations pending that have not yet
+ * completed fully, including I/O operations to `process.stdout` and`process.stderr`.
+ *
+ * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_
+ * _work pending_ in the event loop. The `process.exitCode` property can be set to
+ * tell the process which exit code to use when the process exits gracefully.
+ *
+ * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being
+ * truncated and lost:
+ *
+ * ```js
+ * import { exit } from 'process';
+ *
+ * // This is an example of what *not* to do:
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * exit(1);
+ * }
+ * ```
+ *
+ * The reason this is problematic is because writes to `process.stdout` in Node.js
+ * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
+ *
+ * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
+ * scheduling any additional work for the event loop:
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * // How to properly set the exit code while letting
+ * // the process exit gracefully.
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * process.exitCode = 1;
+ * }
+ * ```
+ *
+ * If it is necessary to terminate the Node.js process due to an error condition,
+ * throwing an _uncaught_ error and allowing the process to terminate accordingly
+ * is safer than calling `process.exit()`.
+ *
+ * In `Worker` threads, this function stops the current thread rather
+ * than the current process.
+ * @since v0.1.13
+ * @param [code=0] The exit code.
+ */
+ exit(code?: number): never;
+ /**
+ * A number which will be the process exit code, when the process either
+ * exits gracefully, or is exited via {@link exit} without specifying
+ * a code.
+ *
+ * Specifying a code to {@link exit} will override any
+ * previous setting of `process.exitCode`.
+ * @since v0.11.8
+ */
+ exitCode?: number | undefined;
+ /**
+ * The `process.getgid()` method returns the numerical group identity of the
+ * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.31
+ */
+ getgid?: () => number;
+ /**
+ * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
+ * numeric ID or a group name
+ * string. If a group name is specified, this method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid &#x26;&#x26; process.setgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * try {
+ * process.setgid(501);
+ * console.log(`New gid: ${process.getgid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.31
+ * @param id The group name or ID
+ */
+ setgid?: (id: number | string) => void;
+ /**
+ * The `process.getuid()` method returns the numeric user identity of the process.
+ * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.28
+ */
+ getuid?: () => number;
+ /**
+ * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
+ * numeric ID or a username string.
+ * If a username is specified, the method blocks while resolving the associated
+ * numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid &#x26;&#x26; process.setuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * try {
+ * process.setuid(501);
+ * console.log(`New uid: ${process.getuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.28
+ */
+ setuid?: (id: number | string) => void;
+ /**
+ * The `process.geteuid()` method returns the numerical effective user identity of
+ * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ geteuid?: () => number;
+ /**
+ * The `process.seteuid()` method sets the effective user identity of the process.
+ * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
+ * string. If a username is specified, the method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid &#x26;&#x26; process.seteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * try {
+ * process.seteuid(501);
+ * console.log(`New uid: ${process.geteuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A user name or ID
+ */
+ seteuid?: (id: number | string) => void;
+ /**
+ * The `process.getegid()` method returns the numerical effective group identity
+ * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ getegid?: () => number;
+ /**
+ * The `process.setegid()` method sets the effective group identity of the process.
+ * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
+ * name string. If a group name is specified, this method blocks while resolving
+ * the associated a numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid &#x26;&#x26; process.setegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * try {
+ * process.setegid(501);
+ * console.log(`New gid: ${process.getegid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A group name or ID
+ */
+ setegid?: (id: number | string) => void;
+ /**
+ * The `process.getgroups()` method returns an array with the supplementary group
+ * IDs. POSIX leaves it unspecified if the effective group ID is included but
+ * Node.js ensures it always is.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups) {
+ * console.log(process.getgroups()); // [ 16, 21, 297 ]
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.9.4
+ */
+ getgroups?: () => number[];
+ /**
+ * The `process.setgroups()` method sets the supplementary group IDs for the
+ * Node.js process. This is a privileged operation that requires the Node.js
+ * process to have `root` or the `CAP_SETGID` capability.
+ *
+ * The `groups` array can contain numeric group IDs, group names, or both.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups &#x26;&#x26; process.setgroups) {
+ * try {
+ * process.setgroups([501]);
+ * console.log(process.getgroups()); // new groups
+ * } catch (err) {
+ * console.log(`Failed to set groups: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.9.4
+ */
+ setgroups?: (groups: ReadonlyArray<string | number>) => void;
+ /**
+ * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
+ * that will be invoked when an uncaught exception occurs, which will receive the
+ * exception value itself as its first argument.
+ *
+ * If such a function is set, the `'uncaughtException'` event will
+ * not be emitted. If `--abort-on-uncaught-exception` was passed from the
+ * command line or set through `v8.setFlagsFromString()`, the process will
+ * not abort. Actions configured to take place on exceptions such as report
+ * generations will be affected too
+ *
+ * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this
+ * method with a non-`null` argument while another capture function is set will
+ * throw an error.
+ *
+ * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
+ * @since v9.3.0
+ */
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
+ /**
+ * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
+ * @since v9.3.0
+ */
+ hasUncaughtExceptionCaptureCallback(): boolean;
+ /**
+ * The `process.version` property contains the Node.js version string.
+ *
+ * ```js
+ * import { version } from 'process';
+ *
+ * console.log(`Version: ${version}`);
+ * // Version: v14.8.0
+ * ```
+ *
+ * To get the version string without the prepended _v_, use`process.versions.node`.
+ * @since v0.1.3
+ */
+ readonly version: string;
+ /**
+ * The `process.versions` property returns an object listing the version strings of
+ * Node.js and its dependencies. `process.versions.modules` indicates the current
+ * ABI version, which is increased whenever a C++ API changes. Node.js will refuse
+ * to load modules that were compiled against a different module ABI version.
+ *
+ * ```js
+ * import { versions } from 'process';
+ *
+ * console.log(versions);
+ * ```
+ *
+ * Will generate an object similar to:
+ *
+ * ```console
+ * { node: '11.13.0',
+ * v8: '7.0.276.38-node.18',
+ * uv: '1.27.0',
+ * zlib: '1.2.11',
+ * brotli: '1.0.7',
+ * ares: '1.15.0',
+ * modules: '67',
+ * nghttp2: '1.34.0',
+ * napi: '4',
+ * llhttp: '1.1.1',
+ * openssl: '1.1.1b',
+ * cldr: '34.0',
+ * icu: '63.1',
+ * tz: '2018e',
+ * unicode: '11.0' }
+ * ```
+ * @since v0.2.0
+ */
+ readonly versions: ProcessVersions;
+ /**
+ * The `process.config` property returns an `Object` containing the JavaScript
+ * representation of the configure options used to compile the current Node.js
+ * executable. This is the same as the `config.gypi` file that was produced when
+ * running the `./configure` script.
+ *
+ * An example of the possible output looks like:
+ *
+ * ```js
+ * {
+ * target_defaults:
+ * { cflags: [],
+ * default_configuration: 'Release',
+ * defines: [],
+ * include_dirs: [],
+ * libraries: [] },
+ * variables:
+ * {
+ * host_arch: 'x64',
+ * napi_build_version: 5,
+ * node_install_npm: 'true',
+ * node_prefix: '',
+ * node_shared_cares: 'false',
+ * node_shared_http_parser: 'false',
+ * node_shared_libuv: 'false',
+ * node_shared_zlib: 'false',
+ * node_use_dtrace: 'false',
+ * node_use_openssl: 'true',
+ * node_shared_openssl: 'false',
+ * strict_aliasing: 'true',
+ * target_arch: 'x64',
+ * v8_use_snapshot: 1
+ * }
+ * }
+ * ```
+ *
+ * The `process.config` property is **not** read-only and there are existing
+ * modules in the ecosystem that are known to extend, modify, or entirely replace
+ * the value of `process.config`.
+ *
+ * Modifying the `process.config` property, or any child-property of the`process.config` object has been deprecated. The `process.config` will be made
+ * read-only in a future release.
+ * @since v0.7.7
+ */
+ readonly config: ProcessConfig;
+ /**
+ * The `process.kill()` method sends the `signal` to the process identified by`pid`.
+ *
+ * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information.
+ *
+ * This method will throw an error if the target `pid` does not exist. As a special
+ * case, a signal of `0` can be used to test for the existence of a process.
+ * Windows platforms will throw an error if the `pid` is used to kill a process
+ * group.
+ *
+ * Even though the name of this function is `process.kill()`, it is really just a
+ * signal sender, like the `kill` system call. The signal sent may do something
+ * other than kill the target process.
+ *
+ * ```js
+ * import process, { kill } from 'process';
+ *
+ * process.on('SIGHUP', () => {
+ * console.log('Got SIGHUP signal.');
+ * });
+ *
+ * setTimeout(() => {
+ * console.log('Exiting.');
+ * process.exit(0);
+ * }, 100);
+ *
+ * kill(process.pid, 'SIGHUP');
+ * ```
+ *
+ * When `SIGUSR1` is received by a Node.js process, Node.js will start the
+ * debugger. See `Signal Events`.
+ * @since v0.0.6
+ * @param pid A process ID
+ * @param [signal='SIGTERM'] The signal to send, either as a string or number.
+ */
+ kill(pid: number, signal?: string | number): true;
+ /**
+ * The `process.pid` property returns the PID of the process.
+ *
+ * ```js
+ * import { pid } from 'process';
+ *
+ * console.log(`This process is pid ${pid}`);
+ * ```
+ * @since v0.1.15
+ */
+ readonly pid: number;
+ /**
+ * The `process.ppid` property returns the PID of the parent of the
+ * current process.
+ *
+ * ```js
+ * import { ppid } from 'process';
+ *
+ * console.log(`The parent process is pid ${ppid}`);
+ * ```
+ * @since v9.2.0, v8.10.0, v6.13.0
+ */
+ readonly ppid: number;
+ /**
+ * The `process.title` property returns the current process title (i.e. returns
+ * the current value of `ps`). Assigning a new value to `process.title` modifies
+ * the current value of `ps`.
+ *
+ * When a new value is assigned, different platforms will impose different maximum
+ * length restrictions on the title. Usually such restrictions are quite limited.
+ * For instance, on Linux and macOS, `process.title` is limited to the size of the
+ * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8
+ * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure)
+ * cases.
+ *
+ * Assigning a value to `process.title` might not result in an accurate label
+ * within process manager applications such as macOS Activity Monitor or Windows
+ * Services Manager.
+ * @since v0.1.104
+ */
+ title: string;
+ /**
+ * The operating system CPU architecture for which the Node.js binary was compiled.
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * ```js
+ * import { arch } from 'process';
+ *
+ * console.log(`This processor architecture is ${arch}`);
+ * ```
+ * @since v0.5.0
+ */
+ readonly arch: Architecture;
+ /**
+ * The `process.platform` property returns a string identifying the operating
+ * system platform for which the Node.js binary was compiled.
+ *
+ * Currently possible values are:
+ *
+ * * `'aix'`
+ * * `'darwin'`
+ * * `'freebsd'`
+ * * `'linux'`
+ * * `'openbsd'`
+ * * `'sunos'`
+ * * `'win32'`
+ *
+ * ```js
+ * import { platform } from 'process';
+ *
+ * console.log(`This platform is ${platform}`);
+ * ```
+ *
+ * The value `'android'` may also be returned if the Node.js is built on the
+ * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.1.16
+ */
+ readonly platform: Platform;
+ /**
+ * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
+ * runtime, `require.main` may still refer to the original main module in
+ * modules that were required before the change occurred. Generally, it's
+ * safe to assume that the two refer to the same module.
+ *
+ * As with `require.main`, `process.mainModule` will be `undefined` if there
+ * is no entry script.
+ * @since v0.1.17
+ * @deprecated Since v14.0.0 - Use `main` instead.
+ */
+ mainModule?: Module | undefined;
+ memoryUsage: MemoryUsageFn;
+ /**
+ * The `process.cpuUsage()` method returns the user and system CPU time usage of
+ * the current process, in an object with properties `user` and `system`, whose
+ * values are microsecond values (millionth of a second). These values measure time
+ * spent in user and system code respectively, and may end up being greater than
+ * actual elapsed time if multiple CPU cores are performing work for this process.
+ *
+ * The result of a previous call to `process.cpuUsage()` can be passed as the
+ * argument to the function, to get a diff reading.
+ *
+ * ```js
+ * import { cpuUsage } from 'process';
+ *
+ * const startUsage = cpuUsage();
+ * // { user: 38579, system: 6986 }
+ *
+ * // spin the CPU for 500 milliseconds
+ * const now = Date.now();
+ * while (Date.now() - now < 500);
+ *
+ * console.log(cpuUsage(startUsage));
+ * // { user: 514883, system: 11226 }
+ * ```
+ * @since v6.1.0
+ * @param previousValue A previous return value from calling `process.cpuUsage()`
+ */
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
+ /**
+ * `process.nextTick()` adds `callback` to the "next tick queue". This queue is
+ * fully drained after the current operation on the JavaScript stack runs to
+ * completion and before the event loop is allowed to continue. It's possible to
+ * create an infinite loop if one were to recursively call `process.nextTick()`.
+ * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
+ *
+ * ```js
+ * import { nextTick } from 'process';
+ *
+ * console.log('start');
+ * nextTick(() => {
+ * console.log('nextTick callback');
+ * });
+ * console.log('scheduled');
+ * // Output:
+ * // start
+ * // scheduled
+ * // nextTick callback
+ * ```
+ *
+ * This is important when developing APIs in order to give users the opportunity
+ * to assign event handlers _after_ an object has been constructed but before any
+ * I/O has occurred:
+ *
+ * ```js
+ * import { nextTick } from 'process';
+ *
+ * function MyThing(options) {
+ * this.setupOptions(options);
+ *
+ * nextTick(() => {
+ * this.startDoingStuff();
+ * });
+ * }
+ *
+ * const thing = new MyThing();
+ * thing.getReadyForStuff();
+ *
+ * // thing.startDoingStuff() gets called now, not before.
+ * ```
+ *
+ * It is very important for APIs to be either 100% synchronous or 100%
+ * asynchronous. Consider this example:
+ *
+ * ```js
+ * // WARNING! DO NOT USE! BAD UNSAFE HAZARD!
+ * function maybeSync(arg, cb) {
+ * if (arg) {
+ * cb();
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ *
+ * This API is hazardous because in the following case:
+ *
+ * ```js
+ * const maybeTrue = Math.random() > 0.5;
+ *
+ * maybeSync(maybeTrue, () => {
+ * foo();
+ * });
+ *
+ * bar();
+ * ```
+ *
+ * It is not clear whether `foo()` or `bar()` will be called first.
+ *
+ * The following approach is much better:
+ *
+ * ```js
+ * import { nextTick } from 'process';
+ *
+ * function definitelyAsync(arg, cb) {
+ * if (arg) {
+ * nextTick(cb);
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ * @since v0.1.26
+ * @param args Additional arguments to pass when invoking the `callback`
+ */
+ nextTick(callback: Function, ...args: any[]): void;
+ /**
+ * The `process.release` property returns an `Object` containing metadata related
+ * to the current release, including URLs for the source tarball and headers-only
+ * tarball.
+ *
+ * `process.release` contains the following properties:
+ *
+ * ```js
+ * {
+ * name: 'node',
+ * lts: 'Erbium',
+ * sourceUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1.tar.gz',
+ * headersUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1-headers.tar.gz',
+ * libUrl: 'https://nodejs.org/download/release/v12.18.1/win-x64/node.lib'
+ * }
+ * ```
+ *
+ * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be
+ * relied upon to exist.
+ * @since v3.0.0
+ */
+ readonly release: ProcessRelease;
+ features: {
+ inspector: boolean;
+ debug: boolean;
+ uv: boolean;
+ ipv6: boolean;
+ tls_alpn: boolean;
+ tls_sni: boolean;
+ tls_ocsp: boolean;
+ tls: boolean;
+ };
+ /**
+ * `process.umask()` returns the Node.js process's file mode creation mask. Child
+ * processes inherit the mask from the parent process.
+ * @since v0.1.19
+ * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential *
+ * security vulnerability. There is no safe, cross-platform alternative API.
+ */
+ umask(): number;
+ /**
+ * Can only be set if not in worker thread.
+ */
+ umask(mask: string | number): number;
+ /**
+ * The `process.uptime()` method returns the number of seconds the current Node.js
+ * process has been running.
+ *
+ * The return value includes fractions of a second. Use `Math.floor()` to get whole
+ * seconds.
+ * @since v0.5.0
+ */
+ uptime(): number;
+ hrtime: HRTime;
+ /**
+ * If Node.js is spawned with an IPC channel, the `process.send()` method can be
+ * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
+ *
+ * If Node.js was not spawned with an IPC channel, `process.send` will be`undefined`.
+ *
+ * The message goes through serialization and parsing. The resulting message might
+ * not be the same as what is originally sent.
+ * @since v0.5.9
+ * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties:
+ */
+ send?(
+ message: any,
+ sendHandle?: any,
+ options?: {
+ swallowErrors?: boolean | undefined;
+ },
+ callback?: (error: Error | null) => void
+ ): boolean;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
+ * IPC channel to the parent process, allowing the child process to exit gracefully
+ * once there are no other connections keeping it alive.
+ *
+ * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
+ *
+ * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return`true` so long as the IPC
+ * channel is connected and will return `false` after`process.disconnect()` is called.
+ *
+ * Once `process.connected` is `false`, it is no longer possible to send messages
+ * over the IPC channel using `process.send()`.
+ * @since v0.7.2
+ */
+ connected: boolean;
+ /**
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
+ * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
+ *
+ * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag
+ * representations. `process.allowedNodeEnvironmentFlags.has()` will
+ * return `true` in the following cases:
+ *
+ * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`.
+ * * Flags passed through to V8 (as listed in `--v8-options`) may replace
+ * one or more _non-leading_ dashes for an underscore, or vice-versa;
+ * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
+ * etc.
+ * * Flags may contain one or more equals (`=`) characters; all
+ * characters after and including the first equals will be ignored;
+ * e.g., `--stack-trace-limit=100`.
+ * * Flags _must_ be allowable within `NODE_OPTIONS`.
+ *
+ * When iterating over `process.allowedNodeEnvironmentFlags`, flags will
+ * appear only _once_; each will begin with one or more dashes. Flags
+ * passed through to V8 will contain underscores instead of non-leading
+ * dashes:
+ *
+ * ```js
+ * import { allowedNodeEnvironmentFlags } from 'process';
+ *
+ * allowedNodeEnvironmentFlags.forEach((flag) => {
+ * // -r
+ * // --inspect-brk
+ * // --abort_on_uncaught_exception
+ * // ...
+ * });
+ * ```
+ *
+ * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
+ * silently.
+ *
+ * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
+ * contain what _would have_ been allowable.
+ * @since v10.10.0
+ */
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
+ /**
+ * `process.report` is an object whose methods are used to generate diagnostic
+ * reports for the current process. Additional documentation is available in the `report documentation`.
+ * @since v11.8.0
+ */
+ report?: ProcessReport | undefined;
+ /**
+ * ```js
+ * import { resourceUsage } from 'process';
+ *
+ * console.log(resourceUsage());
+ * /*
+ * Will output:
+ * {
+ * userCPUTime: 82872,
+ * systemCPUTime: 4143,
+ * maxRSS: 33164,
+ * sharedMemorySize: 0,
+ * unsharedDataSize: 0,
+ * unsharedStackSize: 0,
+ * minorPageFault: 2469,
+ * majorPageFault: 0,
+ * swappedOut: 0,
+ * fsRead: 0,
+ * fsWrite: 8,
+ * ipcSent: 0,
+ * ipcReceived: 0,
+ * signalsCount: 0,
+ * voluntaryContextSwitches: 79,
+ * involuntaryContextSwitches: 1
+ * }
+ *
+ * ```
+ * @since v12.6.0
+ * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t].
+ */
+ resourceUsage(): ResourceUsage;
+ /**
+ * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the
+ * documentation for the `'warning' event` and the `emitWarning() method` for more information about this
+ * flag's behavior.
+ * @since v0.8.0
+ */
+ traceDeprecation: boolean;
+ /* EventEmitter */
+ addListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ addListener(event: 'disconnect', listener: DisconnectListener): this;
+ addListener(event: 'exit', listener: ExitListener): this;
+ addListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ addListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ addListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ addListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ addListener(event: 'warning', listener: WarningListener): this;
+ addListener(event: 'message', listener: MessageListener): this;
+ addListener(event: Signals, listener: SignalsListener): this;
+ addListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ addListener(event: 'worker', listener: WorkerListener): this;
+ emit(event: 'beforeExit', code: number): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'exit', code: number): boolean;
+ emit(event: 'rejectionHandled', promise: Promise<unknown>): boolean;
+ emit(event: 'uncaughtException', error: Error): boolean;
+ emit(event: 'uncaughtExceptionMonitor', error: Error): boolean;
+ emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean;
+ emit(event: 'warning', warning: Error): boolean;
+ emit(event: 'message', message: unknown, sendHandle: unknown): this;
+ emit(event: Signals, signal?: Signals): boolean;
+ emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
+ emit(event: 'worker', listener: WorkerListener): this;
+ on(event: 'beforeExit', listener: BeforeExitListener): this;
+ on(event: 'disconnect', listener: DisconnectListener): this;
+ on(event: 'exit', listener: ExitListener): this;
+ on(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ on(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ on(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ on(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ on(event: 'warning', listener: WarningListener): this;
+ on(event: 'message', listener: MessageListener): this;
+ on(event: Signals, listener: SignalsListener): this;
+ on(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ on(event: 'worker', listener: WorkerListener): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'beforeExit', listener: BeforeExitListener): this;
+ once(event: 'disconnect', listener: DisconnectListener): this;
+ once(event: 'exit', listener: ExitListener): this;
+ once(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ once(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ once(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ once(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ once(event: 'warning', listener: WarningListener): this;
+ once(event: 'message', listener: MessageListener): this;
+ once(event: Signals, listener: SignalsListener): this;
+ once(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ once(event: 'worker', listener: WorkerListener): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependListener(event: 'exit', listener: ExitListener): this;
+ prependListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependListener(event: 'warning', listener: WarningListener): this;
+ prependListener(event: 'message', listener: MessageListener): this;
+ prependListener(event: Signals, listener: SignalsListener): this;
+ prependListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependListener(event: 'worker', listener: WorkerListener): this;
+ prependOnceListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependOnceListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependOnceListener(event: 'exit', listener: ExitListener): this;
+ prependOnceListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependOnceListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependOnceListener(event: 'warning', listener: WarningListener): this;
+ prependOnceListener(event: 'message', listener: MessageListener): this;
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
+ prependOnceListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependOnceListener(event: 'worker', listener: WorkerListener): this;
+ listeners(event: 'beforeExit'): BeforeExitListener[];
+ listeners(event: 'disconnect'): DisconnectListener[];
+ listeners(event: 'exit'): ExitListener[];
+ listeners(event: 'rejectionHandled'): RejectionHandledListener[];
+ listeners(event: 'uncaughtException'): UncaughtExceptionListener[];
+ listeners(event: 'uncaughtExceptionMonitor'): UncaughtExceptionListener[];
+ listeners(event: 'unhandledRejection'): UnhandledRejectionListener[];
+ listeners(event: 'warning'): WarningListener[];
+ listeners(event: 'message'): MessageListener[];
+ listeners(event: Signals): SignalsListener[];
+ listeners(event: 'multipleResolves'): MultipleResolveListener[];
+ listeners(event: 'worker'): WorkerListener[];
+ }
+ }
+ }
+ export = process;
+}
+declare module 'node:process' {
+ import process = require('process');
+ export = process;
+}
diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts
new file mode 100755
index 0000000..87ebbb9
--- /dev/null
+++ b/node_modules/@types/node/punycode.d.ts
@@ -0,0 +1,117 @@
+/**
+ * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users
+ * currently depending on the `punycode` module should switch to using the
+ * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL
+ * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`.
+ *
+ * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It
+ * can be accessed using:
+ *
+ * ```js
+ * const punycode = require('punycode');
+ * ```
+ *
+ * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
+ * primarily intended for use in Internationalized Domain Names. Because host
+ * names in URLs are limited to ASCII characters only, Domain Names that contain
+ * non-ASCII characters must be converted into ASCII using the Punycode scheme.
+ * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
+ * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`.
+ *
+ * The `punycode` module provides a simple implementation of the Punycode standard.
+ *
+ * The `punycode` module is a third-party dependency used by Node.js and
+ * made available to developers as a convenience. Fixes or other modifications to
+ * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
+ * @deprecated Since v7.0.0 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/punycode.js)
+ */
+declare module 'punycode' {
+ /**
+ * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
+ * characters to the equivalent string of Unicode codepoints.
+ *
+ * ```js
+ * punycode.decode('maana-pta'); // 'mañana'
+ * punycode.decode('--dqo34k'); // '☃-⌘'
+ * ```
+ * @since v0.5.1
+ */
+ function decode(string: string): string;
+ /**
+ * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
+ *
+ * ```js
+ * punycode.encode('mañana'); // 'maana-pta'
+ * punycode.encode('☃-⌘'); // '--dqo34k'
+ * ```
+ * @since v0.5.1
+ */
+ function encode(string: string): string;
+ /**
+ * The `punycode.toUnicode()` method converts a string representing a domain name
+ * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
+ * converted.
+ *
+ * ```js
+ * // decode domain names
+ * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
+ * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
+ * punycode.toUnicode('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toUnicode(domain: string): string;
+ /**
+ * The `punycode.toASCII()` method converts a Unicode string representing an
+ * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the
+ * domain name will be converted. Calling `punycode.toASCII()` on a string that
+ * already only contains ASCII characters will have no effect.
+ *
+ * ```js
+ * // encode domain names
+ * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
+ * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
+ * punycode.toASCII('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toASCII(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const ucs2: ucs2;
+ interface ucs2 {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ decode(string: string): number[];
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ encode(codePoints: ReadonlyArray<number>): string;
+ }
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const version: string;
+}
+declare module 'node:punycode' {
+ export * from 'punycode';
+}
diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts
new file mode 100755
index 0000000..e694d8c
--- /dev/null
+++ b/node_modules/@types/node/querystring.d.ts
@@ -0,0 +1,131 @@
+/**
+ * The `querystring` module provides utilities for parsing and formatting URL
+ * query strings. It can be accessed using:
+ *
+ * ```js
+ * const querystring = require('querystring');
+ * ```
+ *
+ * The `querystring` API is considered Legacy. While it is still maintained,
+ * new code should use the `URLSearchParams` API instead.
+ * @deprecated Legacy
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js)
+ */
+declare module 'querystring' {
+ interface StringifyOptions {
+ encodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParseOptions {
+ maxKeys?: number | undefined;
+ decodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
+ interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {}
+ /**
+ * The `querystring.stringify()` method produces a URL query string from a
+ * given `obj` by iterating through the object's "own properties".
+ *
+ * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
+ * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
+ * empty strings.
+ *
+ * ```js
+ * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
+ * // Returns 'foo=bar&#x26;baz=qux&#x26;baz=quux&#x26;corge='
+ *
+ * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
+ * // Returns 'foo:bar;baz:qux'
+ * ```
+ *
+ * By default, characters requiring percent-encoding within the query string will
+ * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkEncodeURIComponent function already exists,
+ *
+ * querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
+ * { encodeURIComponent: gbkEncodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param obj The object to serialize into a URL query string
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
+ /**
+ * The `querystring.parse()` method parses a URL query string (`str`) into a
+ * collection of key and value pairs.
+ *
+ * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
+ *
+ * ```js
+ * {
+ * foo: 'bar',
+ * abc: ['xyz', '123']
+ * }
+ * ```
+ *
+ * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * By default, percent-encoded characters within the query string will be assumed
+ * to use UTF-8 encoding. If an alternative character encoding is used, then an
+ * alternative `decodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkDecodeURIComponent function already exists...
+ *
+ * querystring.parse('w=%D6%D0%CE%C4&#x26;foo=bar', null, null,
+ * { decodeURIComponent: gbkDecodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param str The URL query string to parse
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
+ /**
+ * The querystring.encode() function is an alias for querystring.stringify().
+ */
+ const encode: typeof stringify;
+ /**
+ * The querystring.decode() function is an alias for querystring.parse().
+ */
+ const decode: typeof parse;
+ /**
+ * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL
+ * query strings.
+ *
+ * The `querystring.escape()` method is used by `querystring.stringify()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement percent-encoding implementation if
+ * necessary by assigning `querystring.escape` to an alternative function.
+ * @since v0.1.25
+ */
+ function escape(str: string): string;
+ /**
+ * The `querystring.unescape()` method performs decoding of URL percent-encoded
+ * characters on the given `str`.
+ *
+ * The `querystring.unescape()` method is used by `querystring.parse()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement decoding implementation if
+ * necessary by assigning `querystring.unescape` to an alternative function.
+ *
+ * By default, the `querystring.unescape()` method will attempt to use the
+ * JavaScript built-in `decodeURIComponent()` method to decode. If that fails,
+ * a safer equivalent that does not throw on malformed URLs will be used.
+ * @since v0.1.25
+ */
+ function unescape(str: string): string;
+}
+declare module 'node:querystring' {
+ export * from 'querystring';
+}
diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts
new file mode 100755
index 0000000..6ab64ac
--- /dev/null
+++ b/node_modules/@types/node/readline.d.ts
@@ -0,0 +1,653 @@
+/**
+ * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline';
+ * ```
+ *
+ * The following simple example illustrates the basic use of the `readline` module.
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * import { stdin as input, stdout as output } from 'node:process';
+ *
+ * const rl = readline.createInterface({ input, output });
+ *
+ * const answer = await rl.question('What do you think of Node.js? ');
+ *
+ * console.log(`Thank you for your valuable feedback: ${answer}`);
+ *
+ * rl.close();
+ * ```
+ *
+ * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
+ * received on the `input` stream.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js)
+ */
+declare module 'readline' {
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as promises from 'node:readline/promises';
+
+ export { promises };
+ export interface Key {
+ sequence?: string | undefined;
+ name?: string | undefined;
+ ctrl?: boolean | undefined;
+ meta?: boolean | undefined;
+ shift?: boolean | undefined;
+ }
+ /**
+ * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
+ * single `input` `Readable` stream and a single `output` `Writable` stream.
+ * The `output` stream is used to print prompts for user input that arrives on,
+ * and is read from, the `input` stream.
+ * @since v0.1.104
+ */
+ export class Interface extends EventEmitter {
+ readonly terminal: boolean;
+ /**
+ * The current input data being processed by node.
+ *
+ * This can be used when collecting input from a TTY stream to retrieve the
+ * current value that has been processed thus far, prior to the `line` event
+ * being emitted. Once the `line` event has been emitted, this property will
+ * be an empty string.
+ *
+ * Be aware that modifying the value during the instance runtime may have
+ * unintended consequences if `rl.cursor` is not also controlled.
+ *
+ * **If not using a TTY stream for input, use the `'line'` event.**
+ *
+ * One possible use case would be as follows:
+ *
+ * ```js
+ * const values = ['lorem ipsum', 'dolor sit amet'];
+ * const rl = readline.createInterface(process.stdin);
+ * const showResults = debounce(() => {
+ * console.log(
+ * '\n',
+ * values.filter((val) => val.startsWith(rl.line)).join(' ')
+ * );
+ * }, 300);
+ * process.stdin.on('keypress', (c, k) => {
+ * showResults();
+ * });
+ * ```
+ * @since v0.1.98
+ */
+ readonly line: string;
+ /**
+ * The cursor position relative to `rl.line`.
+ *
+ * This will track where the current cursor lands in the input string, when
+ * reading input from a TTY stream. The position of cursor determines the
+ * portion of the input string that will be modified as input is processed,
+ * as well as the column where the terminal caret will be rendered.
+ * @since v0.1.98
+ */
+ readonly cursor: number;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(options: ReadLineOptions);
+ /**
+ * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
+ * @since v15.3.0
+ * @return the current prompt string
+ */
+ getPrompt(): string;
+ /**
+ * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
+ * @since v0.1.98
+ */
+ setPrompt(prompt: string): void;
+ /**
+ * The `rl.prompt()` method writes the `readline.Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
+ * location at which to provide input.
+ *
+ * When called, `rl.prompt()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `readline.Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
+ * @since v0.1.98
+ * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
+ */
+ prompt(preserveCursor?: boolean): void;
+ /**
+ * The `rl.question()` method displays the `query` by writing it to the `output`,
+ * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
+ *
+ * When called, `rl.question()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
+ *
+ * The `callback` function passed to `rl.question()` does not follow the typical
+ * pattern of accepting an `Error` object or `null` as the first argument.
+ * The `callback` is called with the provided answer as the only argument.
+ *
+ * Example usage:
+ *
+ * ```js
+ * rl.question('What is your favorite food? ', (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ * ```
+ *
+ * Using an `AbortController` to cancel a question.
+ *
+ * ```js
+ * const ac = new AbortController();
+ * const signal = ac.signal;
+ *
+ * rl.question('What is your favorite food? ', { signal }, (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * setTimeout(() => ac.abort(), 10000);
+ * ```
+ *
+ * If this method is invoked as it's util.promisify()ed version, it returns a
+ * Promise that fulfills with the answer. If the question is canceled using
+ * an `AbortController` it will reject with an `AbortError`.
+ *
+ * ```js
+ * const util = require('util');
+ * const question = util.promisify(rl.question).bind(rl);
+ *
+ * async function questionExample() {
+ * try {
+ * const answer = await question('What is you favorite food? ');
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * } catch (err) {
+ * console.error('Question rejected', err);
+ * }
+ * }
+ * questionExample();
+ * ```
+ * @since v0.3.3
+ * @param query A statement or query to write to `output`, prepended to the prompt.
+ * @param callback A callback function that is invoked with the user's input in response to the `query`.
+ */
+ question(query: string, callback: (answer: string) => void): void;
+ question(query: string, options: Abortable, callback: (answer: string) => void): void;
+ /**
+ * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
+ * later if necessary.
+ *
+ * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `readline.Interface` instance.
+ * @since v0.3.4
+ */
+ pause(): this;
+ /**
+ * The `rl.resume()` method resumes the `input` stream if it has been paused.
+ * @since v0.3.4
+ */
+ resume(): this;
+ /**
+ * The `rl.close()` method closes the `readline.Interface` instance and
+ * relinquishes control over the `input` and `output` streams. When called,
+ * the `'close'` event will be emitted.
+ *
+ * Calling `rl.close()` does not immediately stop other events (including `'line'`)
+ * from being emitted by the `readline.Interface` instance.
+ * @since v0.1.98
+ */
+ close(): void;
+ /**
+ * The `rl.write()` method will write either `data` or a key sequence identified
+ * by `key` to the `output`. The `key` argument is supported only if `output` is
+ * a `TTY` text terminal. See `TTY keybindings` for a list of key
+ * combinations.
+ *
+ * If `key` is specified, `data` is ignored.
+ *
+ * When called, `rl.write()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
+ *
+ * ```js
+ * rl.write('Delete this!');
+ * // Simulate Ctrl+U to delete the line written previously
+ * rl.write(null, { ctrl: true, name: 'u' });
+ * ```
+ *
+ * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
+ * @since v0.1.98
+ */
+ write(data: string | Buffer, key?: Key): void;
+ write(data: undefined | null | string | Buffer, key: Key): void;
+ /**
+ * Returns the real position of the cursor in relation to the input
+ * prompt + string. Long input (wrapping) strings, as well as multiple
+ * line prompts are included in the calculations.
+ * @since v13.5.0, v12.16.0
+ */
+ getCursorPos(): CursorPos;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. line
+ * 3. pause
+ * 4. resume
+ * 5. SIGCONT
+ * 6. SIGINT
+ * 7. SIGTSTP
+ * 8. history
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'history', listener: (history: string[]) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'history', history: string[]): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'history', listener: (history: string[]) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'history', listener: (history: string[]) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'history', listener: (history: string[]) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'history', listener: (history: string[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string>;
+ }
+ export type ReadLine = Interface; // type forwarded for backwards compatibility
+ export type Completer = (line: string) => CompleterResult;
+ export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
+ export type CompleterResult = [string[], string];
+ export interface ReadLineOptions {
+ input: NodeJS.ReadableStream;
+ output?: NodeJS.WritableStream | undefined;
+ completer?: Completer | AsyncCompleter | undefined;
+ terminal?: boolean | undefined;
+ /**
+ * Initial list of history lines. This option makes sense
+ * only if `terminal` is set to `true` by the user or by an internal `output`
+ * check, otherwise the history caching mechanism is not initialized at all.
+ * @default []
+ */
+ history?: string[] | undefined;
+ historySize?: number | undefined;
+ prompt?: string | undefined;
+ crlfDelay?: number | undefined;
+ /**
+ * If `true`, when a new input line added
+ * to the history list duplicates an older one, this removes the older line
+ * from the list.
+ * @default false
+ */
+ removeHistoryDuplicates?: boolean | undefined;
+ escapeCodeTimeout?: number | undefined;
+ tabSize?: number | undefined;
+ }
+ /**
+ * The `readline.createInterface()` method creates a new `readline.Interface`instance.
+ *
+ * ```js
+ * const readline = require('readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout
+ * });
+ * ```
+ *
+ * Once the `readline.Interface` instance is created, the most common case is to
+ * listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get
+ * the best compatibility if it defines an `output.columns` property and emits
+ * a `'resize'` event on the `output` if or when the columns ever change
+ * (`process.stdout` does this automatically when it is a TTY).
+ *
+ * When creating a `readline.Interface` using `stdin` as input, the program
+ * will not terminate until it receives `EOF` (Ctrl+D on
+ * Linux/macOS, Ctrl+Z followed by Return on
+ * Windows).
+ * If you want your application to exit without waiting for user input, you can `unref()` the standard input stream:
+ *
+ * ```js
+ * process.stdin.unref();
+ * ```
+ * @since v0.1.98
+ */
+ export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ export function createInterface(options: ReadLineOptions): Interface;
+ /**
+ * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
+ *
+ * Optionally, `interface` specifies a `readline.Interface` instance for which
+ * autocompletion is disabled when copy-pasted input is detected.
+ *
+ * If the `stream` is a `TTY`, then it must be in raw mode.
+ *
+ * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
+ * the `input` from emitting `'keypress'` events.
+ *
+ * ```js
+ * readline.emitKeypressEvents(process.stdin);
+ * if (process.stdin.isTTY)
+ * process.stdin.setRawMode(true);
+ * ```
+ *
+ * ## Example: Tiny CLI
+ *
+ * The following example illustrates the use of `readline.Interface` class to
+ * implement a small command-line interface:
+ *
+ * ```js
+ * const readline = require('readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * prompt: 'OHAI> '
+ * });
+ *
+ * rl.prompt();
+ *
+ * rl.on('line', (line) => {
+ * switch (line.trim()) {
+ * case 'hello':
+ * console.log('world!');
+ * break;
+ * default:
+ * console.log(`Say what? I might have heard '${line.trim()}'`);
+ * break;
+ * }
+ * rl.prompt();
+ * }).on('close', () => {
+ * console.log('Have a great day!');
+ * process.exit(0);
+ * });
+ * ```
+ *
+ * ## Example: Read file stream line-by-Line
+ *
+ * A common use case for `readline` is to consume an input file one line at a
+ * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+ * well as a `for await...of` loop:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * async function processLineByLine() {
+ * const fileStream = fs.createReadStream('input.txt');
+ *
+ * const rl = readline.createInterface({
+ * input: fileStream,
+ * crlfDelay: Infinity
+ * });
+ * // Note: we use the crlfDelay option to recognize all instances of CR LF
+ * // ('\r\n') in input.txt as a single line break.
+ *
+ * for await (const line of rl) {
+ * // Each line in input.txt will be successively available here as `line`.
+ * console.log(`Line from file: ${line}`);
+ * }
+ * }
+ *
+ * processLineByLine();
+ * ```
+ *
+ * Alternatively, one could use the `'line'` event:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * const rl = readline.createInterface({
+ * input: fs.createReadStream('sample.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * console.log(`Line from file: ${line}`);
+ * });
+ * ```
+ *
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
+ *
+ * ```js
+ * const { once } = require('events');
+ * const { createReadStream } = require('fs');
+ * const { createInterface } = require('readline');
+ *
+ * (async function processLineByLine() {
+ * try {
+ * const rl = createInterface({
+ * input: createReadStream('big-file.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * // Process the line.
+ * });
+ *
+ * await once(rl, 'close');
+ *
+ * console.log('File processed.');
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * })();
+ * ```
+ * @since v0.7.7
+ */
+ export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
+ export type Direction = -1 | 0 | 1;
+ export interface CursorPos {
+ rows: number;
+ cols: number;
+ }
+ /**
+ * The `readline.clearLine()` method clears current line of given `TTY` stream
+ * in a specified direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
+ /**
+ * The `readline.clearScreenDown()` method clears the given `TTY` stream from
+ * the current position of the cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
+ /**
+ * The `readline.cursorTo()` method moves cursor to the specified position in a
+ * given `TTY` `stream`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
+ /**
+ * The `readline.moveCursor()` method moves the cursor _relative_ to its current
+ * position in a given `TTY` `stream`.
+ *
+ * ## Example: Tiny CLI
+ *
+ * The following example illustrates the use of `readline.Interface` class to
+ * implement a small command-line interface:
+ *
+ * ```js
+ * const readline = require('readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * prompt: 'OHAI> '
+ * });
+ *
+ * rl.prompt();
+ *
+ * rl.on('line', (line) => {
+ * switch (line.trim()) {
+ * case 'hello':
+ * console.log('world!');
+ * break;
+ * default:
+ * console.log(`Say what? I might have heard '${line.trim()}'`);
+ * break;
+ * }
+ * rl.prompt();
+ * }).on('close', () => {
+ * console.log('Have a great day!');
+ * process.exit(0);
+ * });
+ * ```
+ *
+ * ## Example: Read file stream line-by-Line
+ *
+ * A common use case for `readline` is to consume an input file one line at a
+ * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+ * well as a `for await...of` loop:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * async function processLineByLine() {
+ * const fileStream = fs.createReadStream('input.txt');
+ *
+ * const rl = readline.createInterface({
+ * input: fileStream,
+ * crlfDelay: Infinity
+ * });
+ * // Note: we use the crlfDelay option to recognize all instances of CR LF
+ * // ('\r\n') in input.txt as a single line break.
+ *
+ * for await (const line of rl) {
+ * // Each line in input.txt will be successively available here as `line`.
+ * console.log(`Line from file: ${line}`);
+ * }
+ * }
+ *
+ * processLineByLine();
+ * ```
+ *
+ * Alternatively, one could use the `'line'` event:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * const rl = readline.createInterface({
+ * input: fs.createReadStream('sample.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * console.log(`Line from file: ${line}`);
+ * });
+ * ```
+ *
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
+ *
+ * ```js
+ * const { once } = require('events');
+ * const { createReadStream } = require('fs');
+ * const { createInterface } = require('readline');
+ *
+ * (async function processLineByLine() {
+ * try {
+ * const rl = createInterface({
+ * input: createReadStream('big-file.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * // Process the line.
+ * });
+ *
+ * await once(rl, 'close');
+ *
+ * console.log('File processed.');
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * })();
+ * ```
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
+}
+declare module 'node:readline' {
+ export * from 'readline';
+}
diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts
new file mode 100755
index 0000000..8f9f06f
--- /dev/null
+++ b/node_modules/@types/node/readline/promises.d.ts
@@ -0,0 +1,143 @@
+/**
+ * The `readline/promise` module provides an API for reading lines of input from a Readable stream one line at a time.
+ *
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline/promises.js)
+ * @since v17.0.0
+ */
+declare module 'readline/promises' {
+ import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline';
+ import { Abortable } from 'node:events';
+
+ class Interface extends _Interface {
+ /**
+ * The rl.question() method displays the query by writing it to the output, waits for user input to be provided on input,
+ * then invokes the callback function passing the provided input as the first argument.
+ *
+ * When called, rl.question() will resume the input stream if it has been paused.
+ *
+ * If the readlinePromises.Interface was created with output set to null or undefined the query is not written.
+ *
+ * If the question is called after rl.close(), it returns a rejected promise.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const answer = await rl.question('What is your favorite food? ');
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * Using an AbortSignal to cancel a question.
+ *
+ * ```js
+ * const signal = AbortSignal.timeout(10_000);
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * const answer = await rl.question('What is your favorite food? ', { signal });
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * @since v17.0.0
+ * @param query A statement or query to write to output, prepended to the prompt.
+ */
+ question(query: string): Promise<string>;
+ question(query: string, options: Abortable): Promise<string>;
+ }
+
+ class Readline {
+ /**
+ * @param stream A TTY stream.
+ */
+ constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean });
+ /**
+ * The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ clearLine(dir: Direction): this;
+ /**
+ * The `rl.clearScreenDown()` method adds to the internal list of pending action an action that clears the associated `stream` from the current position of the cursor down.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ clearScreenDown(): this;
+ /**
+ * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions.
+ */
+ commit(): Promise<void>;
+ /**
+ * The `rl.cursorTo()` method adds to the internal list of pending action an action that moves cursor to the specified position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ cursorTo(x: number, y?: number): this;
+ /**
+ * The `rl.moveCursor()` method adds to the internal list of pending action an action that moves the cursor relative to its current position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless autoCommit: true was passed to the constructor.
+ */
+ moveCursor(dx: number, dy: number): this;
+ /**
+ * The `rl.rollback()` method clears the internal list of pending actions without sending it to the associated `stream`.
+ */
+ rollback(): this;
+ }
+
+ /**
+ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
+ *
+ * ```js
+ * const readlinePromises = require('node:readline/promises');
+ * const rl = readlinePromises.createInterface({
+ * input: process.stdin,
+ * output: process.stdout
+ * });
+ * ```
+ *
+ * Once the `readlinePromises.Interface` instance is created, the most common case is to listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get the best compatibility if it defines an `output.columns` property,
+ * and emits a `'resize'` event on the `output`, if or when the columns ever change (`process.stdout` does this automatically when it is a TTY).
+ *
+ * ## Use of the `completer` function
+ *
+ * The `completer` function takes the current line entered by the user as an argument, and returns an `Array` with 2 entries:
+ *
+ * - An Array with matching entries for the completion.
+ * - The substring that was used for the matching.
+ *
+ * For instance: `[[substr1, substr2, ...], originalsubstring]`.
+ *
+ * ```js
+ * function completer(line) {
+ * const completions = '.help .error .exit .quit .q'.split(' ');
+ * const hits = completions.filter((c) => c.startsWith(line));
+ * // Show all completions if none found
+ * return [hits.length ? hits : completions, line];
+ * }
+ * ```
+ *
+ * The `completer` function can also returns a `Promise`, or be asynchronous:
+ *
+ * ```js
+ * async function completer(linePartial) {
+ * await someAsyncWork();
+ * return [['123'], linePartial];
+ * }
+ * ```
+ */
+ function createInterface(
+ input: NodeJS.ReadableStream,
+ output?: NodeJS.WritableStream,
+ completer?: Completer | AsyncCompleter,
+ terminal?: boolean,
+ ): Interface;
+ function createInterface(options: ReadLineOptions): Interface;
+}
+declare module 'node:readline/promises' {
+ export * from 'readline/promises';
+}
diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts
new file mode 100755
index 0000000..be42ccc
--- /dev/null
+++ b/node_modules/@types/node/repl.d.ts
@@ -0,0 +1,424 @@
+/**
+ * The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that
+ * is available both as a standalone program or includible in other applications.
+ * It can be accessed using:
+ *
+ * ```js
+ * const repl = require('repl');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/repl.js)
+ */
+declare module 'repl' {
+ import { Interface, Completer, AsyncCompleter } from 'node:readline';
+ import { Context } from 'node:vm';
+ import { InspectOptions } from 'node:util';
+ interface ReplOptions {
+ /**
+ * The input prompt to display.
+ * @default "> "
+ */
+ prompt?: string | undefined;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ * @default process.stdin
+ */
+ input?: NodeJS.ReadableStream | undefined;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ * @default process.stdout
+ */
+ output?: NodeJS.WritableStream | undefined;
+ /**
+ * If `true`, specifies that the output should be treated as a TTY terminal, and have
+ * ANSI/VT100 escape codes written to it.
+ * Default: checking the value of the `isTTY` property on the output stream upon
+ * instantiation.
+ */
+ terminal?: boolean | undefined;
+ /**
+ * The function to be used when evaluating each given line of input.
+ * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
+ * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
+ * additional lines.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
+ */
+ eval?: REPLEval | undefined;
+ /**
+ * Defines if the repl prints output previews or not.
+ * @default `true` Always `false` in case `terminal` is falsy.
+ */
+ preview?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default `writer` function should include ANSI color
+ * styling to REPL output. If a custom `writer` function is provided then this has no
+ * effect.
+ * Default: the REPL instance's `terminal` value.
+ */
+ useColors?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default evaluation function will use the JavaScript
+ * `global` as the context as opposed to creating a new separate context for the REPL
+ * instance. The node CLI REPL sets this value to `true`.
+ * Default: `false`.
+ */
+ useGlobal?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default writer will not output the return value of a
+ * command if it evaluates to `undefined`.
+ * Default: `false`.
+ */
+ ignoreUndefined?: boolean | undefined;
+ /**
+ * The function to invoke to format the output of each command before writing to `output`.
+ * Default: a wrapper for `util.inspect`.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
+ */
+ writer?: REPLWriter | undefined;
+ /**
+ * An optional function used for custom Tab auto completion.
+ *
+ * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
+ */
+ completer?: Completer | AsyncCompleter | undefined;
+ /**
+ * A flag that specifies whether the default evaluator executes all JavaScript commands in
+ * strict mode or default (sloppy) mode.
+ * Accepted values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
+ /**
+ * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
+ * pressed. This cannot be used together with a custom `eval` function.
+ * Default: `false`.
+ */
+ breakEvalOnSigint?: boolean | undefined;
+ }
+ type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
+ type REPLWriter = (this: REPLServer, obj: any) => string;
+ /**
+ * This is the default "writer" value, if none is passed in the REPL options,
+ * and it can be overridden by custom print functions.
+ */
+ const writer: REPLWriter & {
+ options: InspectOptions;
+ };
+ type REPLCommandAction = (this: REPLServer, text: string) => void;
+ interface REPLCommand {
+ /**
+ * Help text to be displayed when `.help` is entered.
+ */
+ help?: string | undefined;
+ /**
+ * The function to execute, optionally accepting a single string argument.
+ */
+ action: REPLCommandAction;
+ }
+ /**
+ * Instances of `repl.REPLServer` are created using the {@link start} method
+ * or directly using the JavaScript `new` keyword.
+ *
+ * ```js
+ * const repl = require('repl');
+ *
+ * const options = { useColors: true };
+ *
+ * const firstInstance = repl.start(options);
+ * const secondInstance = new repl.REPLServer(options);
+ * ```
+ * @since v0.1.91
+ */
+ class REPLServer extends Interface {
+ /**
+ * The `vm.Context` provided to the `eval` function to be used for JavaScript
+ * evaluation.
+ */
+ readonly context: Context;
+ /**
+ * @deprecated since v14.3.0 - Use `input` instead.
+ */
+ readonly inputStream: NodeJS.ReadableStream;
+ /**
+ * @deprecated since v14.3.0 - Use `output` instead.
+ */
+ readonly outputStream: NodeJS.WritableStream;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ */
+ readonly input: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ */
+ readonly output: NodeJS.WritableStream;
+ /**
+ * The commands registered via `replServer.defineCommand()`.
+ */
+ readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
+ /**
+ * A value indicating whether the REPL is currently in "editor mode".
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys
+ */
+ readonly editorMode: boolean;
+ /**
+ * A value indicating whether the `_` variable has been assigned.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreAssigned: boolean;
+ /**
+ * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly last: any;
+ /**
+ * A value indicating whether the `_error` variable has been assigned.
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreErrAssigned: boolean;
+ /**
+ * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly lastError: any;
+ /**
+ * Specified in the REPL options, this is the function to be used when evaluating each
+ * given line of input. If not specified in the REPL options, this is an async wrapper
+ * for the JavaScript `eval()` function.
+ */
+ readonly eval: REPLEval;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default
+ * `writer` function should include ANSI color styling to REPL output.
+ */
+ readonly useColors: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `eval`
+ * function will use the JavaScript `global` as the context as opposed to creating a new
+ * separate context for the REPL instance.
+ */
+ readonly useGlobal: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `writer`
+ * function should output the result of a command if it evaluates to `undefined`.
+ */
+ readonly ignoreUndefined: boolean;
+ /**
+ * Specified in the REPL options, this is the function to invoke to format the output of
+ * each command before writing to `outputStream`. If not specified in the REPL options,
+ * this will be a wrapper for `util.inspect`.
+ */
+ readonly writer: REPLWriter;
+ /**
+ * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
+ */
+ readonly completer: Completer | AsyncCompleter;
+ /**
+ * Specified in the REPL options, this is a flag that specifies whether the default `eval`
+ * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
+ * Possible values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
+ * > _should not_ be created directly using the JavaScript `new` keyword.
+ *
+ * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver
+ */
+ private constructor();
+ /**
+ * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
+ * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following
+ * properties:
+ *
+ * The following example shows two new commands added to the REPL instance:
+ *
+ * ```js
+ * const repl = require('repl');
+ *
+ * const replServer = repl.start({ prompt: '> ' });
+ * replServer.defineCommand('sayhello', {
+ * help: 'Say hello',
+ * action(name) {
+ * this.clearBufferedCommand();
+ * console.log(`Hello, ${name}!`);
+ * this.displayPrompt();
+ * }
+ * });
+ * replServer.defineCommand('saybye', function saybye() {
+ * console.log('Goodbye!');
+ * this.close();
+ * });
+ * ```
+ *
+ * The new commands can then be used from within the REPL instance:
+ *
+ * ```console
+ * > .sayhello Node.js User
+ * Hello, Node.js User!
+ * > .saybye
+ * Goodbye!
+ * ```
+ * @since v0.3.0
+ * @param keyword The command keyword (_without_ a leading `.` character).
+ * @param cmd The function to invoke when the command is processed.
+ */
+ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
+ /**
+ * The `replServer.displayPrompt()` method readies the REPL instance for input
+ * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input.
+ *
+ * When multi-line input is being entered, an ellipsis is printed rather than the
+ * 'prompt'.
+ *
+ * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
+ *
+ * The `replServer.displayPrompt` method is primarily intended to be called from
+ * within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v0.1.91
+ */
+ displayPrompt(preserveCursor?: boolean): void;
+ /**
+ * The `replServer.clearBufferedCommand()` method clears any command that has been
+ * buffered but not yet executed. This method is primarily intended to be
+ * called from within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v9.0.0
+ */
+ clearBufferedCommand(): void;
+ /**
+ * Initializes a history log file for the REPL instance. When executing the
+ * Node.js binary and using the command-line REPL, a history file is initialized
+ * by default. However, this is not the case when creating a REPL
+ * programmatically. Use this method to initialize a history log file when working
+ * with REPL instances programmatically.
+ * @since v11.10.0
+ * @param historyPath the path to the history file
+ * @param callback called when history writes are ready or upon error
+ */
+ setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void;
+ /**
+ * events.EventEmitter
+ * 1. close - inherited from `readline.Interface`
+ * 2. line - inherited from `readline.Interface`
+ * 3. pause - inherited from `readline.Interface`
+ * 4. resume - inherited from `readline.Interface`
+ * 5. SIGCONT - inherited from `readline.Interface`
+ * 6. SIGINT - inherited from `readline.Interface`
+ * 7. SIGTSTP - inherited from `readline.Interface`
+ * 8. exit
+ * 9. reset
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'exit', listener: () => void): this;
+ addListener(event: 'reset', listener: (context: Context) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'exit'): boolean;
+ emit(event: 'reset', context: Context): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'exit', listener: () => void): this;
+ on(event: 'reset', listener: (context: Context) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'exit', listener: () => void): this;
+ once(event: 'reset', listener: (context: Context) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'exit', listener: () => void): this;
+ prependListener(event: 'reset', listener: (context: Context) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'exit', listener: () => void): this;
+ prependOnceListener(event: 'reset', listener: (context: Context) => void): this;
+ }
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
+ */
+ const REPL_MODE_SLOPPY: unique symbol;
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in strict mode.
+ * This is equivalent to prefacing every repl statement with `'use strict'`.
+ */
+ const REPL_MODE_STRICT: unique symbol;
+ /**
+ * The `repl.start()` method creates and starts a {@link REPLServer} instance.
+ *
+ * If `options` is a string, then it specifies the input prompt:
+ *
+ * ```js
+ * const repl = require('repl');
+ *
+ * // a Unix style prompt
+ * repl.start('$ ');
+ * ```
+ * @since v0.1.91
+ */
+ function start(options?: string | ReplOptions): REPLServer;
+ /**
+ * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors
+ */
+ class Recoverable extends SyntaxError {
+ err: Error;
+ constructor(err: Error);
+ }
+}
+declare module 'node:repl' {
+ export * from 'repl';
+}
diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts
new file mode 100755
index 0000000..d478f33
--- /dev/null
+++ b/node_modules/@types/node/stream.d.ts
@@ -0,0 +1,1339 @@
+/**
+ * A stream is an abstract interface for working with streaming data in Node.js.
+ * The `stream` module provides an API for implementing the stream interface.
+ *
+ * There are many stream objects provided by Node.js. For instance, a `request to an HTTP server` and `process.stdout` are both stream instances.
+ *
+ * Streams can be readable, writable, or both. All streams are instances of `EventEmitter`.
+ *
+ * To access the `stream` module:
+ *
+ * ```js
+ * const stream = require('stream');
+ * ```
+ *
+ * The `stream` module is useful for creating new types of stream instances. It is
+ * usually not necessary to use the `stream` module to consume streams.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/stream.js)
+ */
+declare module 'stream' {
+ import { EventEmitter, Abortable } from 'node:events';
+ import * as streamPromises from 'node:stream/promises';
+ import * as streamConsumers from 'node:stream/consumers';
+ import * as streamWeb from 'node:stream/web';
+ class internal extends EventEmitter {
+ pipe<T extends NodeJS.WritableStream>(
+ destination: T,
+ options?: {
+ end?: boolean | undefined;
+ }
+ ): T;
+ }
+ namespace internal {
+ class Stream extends internal {
+ constructor(opts?: ReadableOptions);
+ }
+ interface StreamOptions<T extends Stream> extends Abortable {
+ emitClose?: boolean | undefined;
+ highWaterMark?: number | undefined;
+ objectMode?: boolean | undefined;
+ construct?(this: T, callback: (error?: Error | null) => void): void;
+ destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
+ autoDestroy?: boolean | undefined;
+ }
+ interface ReadableOptions extends StreamOptions<Readable> {
+ encoding?: BufferEncoding | undefined;
+ read?(this: Readable, size: number): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Readable extends Stream implements NodeJS.ReadableStream {
+ /**
+ * A utility method for creating Readable Streams out of iterators.
+ */
+ static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
+ /**
+ * A utility method for creating a `Readable` from a web `ReadableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick<ReadableOptions, 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>): Readable;
+ /**
+ * Returns whether the stream has been read from or cancelled.
+ * @since v16.8.0
+ */
+ static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
+ /**
+ * A utility method for creating a web `ReadableStream` from a `Readable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamReadable: Readable): streamWeb.ReadableStream;
+ /**
+ * Returns whether the stream was destroyed or errored before emitting `'end'`.
+ * @since v16.8.0
+ * @experimental
+ */
+ readonly readableAborted: boolean;
+ /**
+ * Is `true` if it is safe to call `readable.read()`, which means
+ * the stream has not been destroyed or emitted `'error'` or `'end'`.
+ * @since v11.4.0
+ */
+ readable: boolean;
+ /**
+ * Returns whether `'data'` has been emitted.
+ * @since v16.7.0, v14.18.0
+ * @experimental
+ */
+ readonly readableDidRead: boolean;
+ /**
+ * Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.
+ * @since v12.7.0
+ */
+ readonly readableEncoding: BufferEncoding | null;
+ /**
+ * Becomes `true` when `'end'` event is emitted.
+ * @since v12.9.0
+ */
+ readonly readableEnded: boolean;
+ /**
+ * This property reflects the current state of a `Readable` stream as described
+ * in the `Three states` section.
+ * @since v9.4.0
+ */
+ readonly readableFlowing: boolean | null;
+ /**
+ * Returns the value of `highWaterMark` passed when creating this `Readable`.
+ * @since v9.3.0
+ */
+ readonly readableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be read. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly readableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Readable` stream.
+ * @since v12.3.0
+ */
+ readonly readableObjectMode: boolean;
+ /**
+ * Is `true` after `readable.destroy()` has been called.
+ * @since v18.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is true after 'close' has been emitted.
+ * @since v8.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ constructor(opts?: ReadableOptions);
+ _construct?(callback: (error?: Error | null) => void): void;
+ _read(size: number): void;
+ /**
+ * The `readable.read()` method reads data out of the internal buffer and
+ * returns it. If no data is available to be read, `null` is returned. By default,
+ * the data is returned as a `Buffer` object unless an encoding has been
+ * specified using the `readable.setEncoding()` method or the stream is operating
+ * in object mode.
+ *
+ * The optional `size` argument specifies a specific number of bytes to read. If`size` bytes are not available to be read, `null` will be returned _unless_the stream has ended, in which
+ * case all of the data remaining in the internal
+ * buffer will be returned.
+ *
+ * If the `size` argument is not specified, all of the data contained in the
+ * internal buffer will be returned.
+ *
+ * The `size` argument must be less than or equal to 1 GiB.
+ *
+ * The `readable.read()` method should only be called on `Readable` streams
+ * operating in paused mode. In flowing mode, `readable.read()` is called
+ * automatically until the internal buffer is fully drained.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ *
+ * // 'readable' may be triggered multiple times as data is buffered in
+ * readable.on('readable', () => {
+ * let chunk;
+ * console.log('Stream is readable (new data received in buffer)');
+ * // Use a loop to make sure we read all currently available data
+ * while (null !== (chunk = readable.read())) {
+ * console.log(`Read ${chunk.length} bytes of data...`);
+ * }
+ * });
+ *
+ * // 'end' will be triggered once when there is no more data available
+ * readable.on('end', () => {
+ * console.log('Reached end of stream.');
+ * });
+ * ```
+ *
+ * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks
+ * are not concatenated. A `while` loop is necessary to consume all data
+ * currently in the buffer. When reading a large file `.read()` may return `null`,
+ * having consumed all buffered content so far, but there is still more data to
+ * come not yet buffered. In this case a new `'readable'` event will be emitted
+ * when there is more data in the buffer. Finally the `'end'` event will be
+ * emitted when there is no more data to come.
+ *
+ * Therefore to read a file's whole contents from a `readable`, it is necessary
+ * to collect chunks across multiple `'readable'` events:
+ *
+ * ```js
+ * const chunks = [];
+ *
+ * readable.on('readable', () => {
+ * let chunk;
+ * while (null !== (chunk = readable.read())) {
+ * chunks.push(chunk);
+ * }
+ * });
+ *
+ * readable.on('end', () => {
+ * const content = chunks.join('');
+ * });
+ * ```
+ *
+ * A `Readable` stream in object mode will always return a single item from
+ * a call to `readable.read(size)`, regardless of the value of the`size` argument.
+ *
+ * If the `readable.read()` method returns a chunk of data, a `'data'` event will
+ * also be emitted.
+ *
+ * Calling {@link read} after the `'end'` event has
+ * been emitted will return `null`. No runtime error will be raised.
+ * @since v0.9.4
+ * @param size Optional argument to specify how much data to read.
+ */
+ read(size?: number): any;
+ /**
+ * The `readable.setEncoding()` method sets the character encoding for
+ * data read from the `Readable` stream.
+ *
+ * By default, no encoding is assigned and stream data will be returned as`Buffer` objects. Setting an encoding causes the stream data
+ * to be returned as strings of the specified encoding rather than as `Buffer`objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+ * output data to be interpreted as UTF-8 data, and passed as strings. Calling`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+ * string format.
+ *
+ * The `Readable` stream will properly handle multi-byte characters delivered
+ * through the stream that would otherwise become improperly decoded if simply
+ * pulled from the stream as `Buffer` objects.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.setEncoding('utf8');
+ * readable.on('data', (chunk) => {
+ * assert.equal(typeof chunk, 'string');
+ * console.log('Got %d characters of string data:', chunk.length);
+ * });
+ * ```
+ * @since v0.9.4
+ * @param encoding The encoding to use.
+ */
+ setEncoding(encoding: BufferEncoding): this;
+ /**
+ * The `readable.pause()` method will cause a stream in flowing mode to stop
+ * emitting `'data'` events, switching out of flowing mode. Any data that
+ * becomes available will remain in the internal buffer.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.on('data', (chunk) => {
+ * console.log(`Received ${chunk.length} bytes of data.`);
+ * readable.pause();
+ * console.log('There will be no additional data for 1 second.');
+ * setTimeout(() => {
+ * console.log('Now data will start flowing again.');
+ * readable.resume();
+ * }, 1000);
+ * });
+ * ```
+ *
+ * The `readable.pause()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ pause(): this;
+ /**
+ * The `readable.resume()` method causes an explicitly paused `Readable` stream to
+ * resume emitting `'data'` events, switching the stream into flowing mode.
+ *
+ * The `readable.resume()` method can be used to fully consume the data from a
+ * stream without actually processing any of that data:
+ *
+ * ```js
+ * getReadableStreamSomehow()
+ * .resume()
+ * .on('end', () => {
+ * console.log('Reached the end, but did not read anything.');
+ * });
+ * ```
+ *
+ * The `readable.resume()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ resume(): this;
+ /**
+ * The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most
+ * typical cases, there will be no reason to
+ * use this method directly.
+ *
+ * ```js
+ * const readable = new stream.Readable();
+ *
+ * readable.isPaused(); // === false
+ * readable.pause();
+ * readable.isPaused(); // === true
+ * readable.resume();
+ * readable.isPaused(); // === false
+ * ```
+ * @since v0.11.14
+ */
+ isPaused(): boolean;
+ /**
+ * The `readable.unpipe()` method detaches a `Writable` stream previously attached
+ * using the {@link pipe} method.
+ *
+ * If the `destination` is not specified, then _all_ pipes are detached.
+ *
+ * If the `destination` is specified, but no pipe is set up for it, then
+ * the method does nothing.
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readable = getReadableStreamSomehow();
+ * const writable = fs.createWriteStream('file.txt');
+ * // All the data from readable goes into 'file.txt',
+ * // but only for the first second.
+ * readable.pipe(writable);
+ * setTimeout(() => {
+ * console.log('Stop writing to file.txt.');
+ * readable.unpipe(writable);
+ * console.log('Manually close the file stream.');
+ * writable.end();
+ * }, 1000);
+ * ```
+ * @since v0.9.4
+ * @param destination Optional specific stream to unpipe
+ */
+ unpipe(destination?: NodeJS.WritableStream): this;
+ /**
+ * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
+ * same as `readable.push(null)`, after which no more data can be written. The EOF
+ * signal is put at the end of the buffer and any buffered data will still be
+ * flushed.
+ *
+ * The `readable.unshift()` method pushes a chunk of data back into the internal
+ * buffer. This is useful in certain situations where a stream is being consumed by
+ * code that needs to "un-consume" some amount of data that it has optimistically
+ * pulled out of the source, so that the data can be passed on to some other party.
+ *
+ * The `stream.unshift(chunk)` method cannot be called after the `'end'` event
+ * has been emitted or a runtime error will be thrown.
+ *
+ * Developers using `stream.unshift()` often should consider switching to
+ * use of a `Transform` stream instead. See the `API for stream implementers` section for more information.
+ *
+ * ```js
+ * // Pull off a header delimited by \n\n.
+ * // Use unshift() if we get too much.
+ * // Call the callback with (error, header, stream).
+ * const { StringDecoder } = require('string_decoder');
+ * function parseHeader(stream, callback) {
+ * stream.on('error', callback);
+ * stream.on('readable', onReadable);
+ * const decoder = new StringDecoder('utf8');
+ * let header = '';
+ * function onReadable() {
+ * let chunk;
+ * while (null !== (chunk = stream.read())) {
+ * const str = decoder.write(chunk);
+ * if (str.includes('\n\n')) {
+ * // Found the header boundary.
+ * const split = str.split(/\n\n/);
+ * header += split.shift();
+ * const remaining = split.join('\n\n');
+ * const buf = Buffer.from(remaining, 'utf8');
+ * stream.removeListener('error', callback);
+ * // Remove the 'readable' listener before unshifting.
+ * stream.removeListener('readable', onReadable);
+ * if (buf.length)
+ * stream.unshift(buf);
+ * // Now the body of the message can be read from the stream.
+ * callback(null, header, stream);
+ * return;
+ * }
+ * // Still reading the header.
+ * header += str;
+ * }
+ * }
+ * }
+ * ```
+ *
+ * Unlike {@link push}, `stream.unshift(chunk)` will not
+ * end the reading process by resetting the internal reading state of the stream.
+ * This can cause unexpected results if `readable.unshift()` is called during a
+ * read (i.e. from within a {@link _read} implementation on a
+ * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately,
+ * however it is best to simply avoid calling `readable.unshift()` while in the
+ * process of performing a read.
+ * @since v0.9.11
+ * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array` or `null`. For object mode
+ * streams, `chunk` may be any JavaScript value.
+ * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
+ */
+ unshift(chunk: any, encoding?: BufferEncoding): void;
+ /**
+ * Prior to Node.js 0.10, streams did not implement the entire `stream` module API
+ * as it is currently defined. (See `Compatibility` for more information.)
+ *
+ * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
+ * stream that uses
+ * the old stream as its data source.
+ *
+ * It will rarely be necessary to use `readable.wrap()` but the method has been
+ * provided as a convenience for interacting with older Node.js applications and
+ * libraries.
+ *
+ * ```js
+ * const { OldReader } = require('./old-api-module.js');
+ * const { Readable } = require('stream');
+ * const oreader = new OldReader();
+ * const myReader = new Readable().wrap(oreader);
+ *
+ * myReader.on('readable', () => {
+ * myReader.read(); // etc.
+ * });
+ * ```
+ * @since v0.9.4
+ * @param stream An "old style" readable stream
+ */
+ wrap(stream: NodeJS.ReadableStream): this;
+ push(chunk: any, encoding?: BufferEncoding): boolean;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
+ * stream will release any internal resources and subsequent calls to `push()`will be ignored.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method, but instead implement `readable._destroy()`.
+ * @since v8.0.0
+ * @param error Error which will be passed as payload in `'error'` event
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. end
+ * 4. error
+ * 5. pause
+ * 6. readable
+ * 7. resume
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: any) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: any): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: any) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: any) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: any) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'data', listener: (chunk: any) => void): this;
+ removeListener(event: 'end', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'pause', listener: () => void): this;
+ removeListener(event: 'readable', listener: () => void): this;
+ removeListener(event: 'resume', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
+ }
+ interface WritableOptions extends StreamOptions<Writable> {
+ decodeStrings?: boolean | undefined;
+ defaultEncoding?: BufferEncoding | undefined;
+ write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Writable,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Writable extends Stream implements NodeJS.WritableStream {
+ /**
+ * A utility method for creating a `Writable` from a web `WritableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(writableStream: streamWeb.WritableStream, options?: Pick<WritableOptions, 'decodeStrings' | 'highWaterMark' | 'objectMode' | 'signal'>): Writable;
+ /**
+ * A utility method for creating a web `WritableStream` from a `Writable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamWritable: Writable): streamWeb.WritableStream;
+ /**
+ * Is `true` if it is safe to call `writable.write()`, which means
+ * the stream has not been destroyed, errored or ended.
+ * @since v11.4.0
+ */
+ readonly writable: boolean;
+ /**
+ * Is `true` after `writable.end()` has been called. This property
+ * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
+ * @since v12.9.0
+ */
+ readonly writableEnded: boolean;
+ /**
+ * Is set to `true` immediately before the `'finish'` event is emitted.
+ * @since v12.6.0
+ */
+ readonly writableFinished: boolean;
+ /**
+ * Return the value of `highWaterMark` passed when creating this `Writable`.
+ * @since v9.3.0
+ */
+ readonly writableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be written. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly writableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Writable` stream.
+ * @since v12.3.0
+ */
+ readonly writableObjectMode: boolean;
+ /**
+ * Number of times `writable.uncork()` needs to be
+ * called in order to fully uncork the stream.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly writableCorked: number;
+ /**
+ * Is `true` after `writable.destroy()` has been called.
+ * @since v8.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is true after 'close' has been emitted.
+ * @since v8.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ /**
+ * Is `true` if the stream's buffer has been full and stream will emit 'drain'.
+ * @since v15.2.0, v14.17.0
+ */
+ readonly writableNeedDrain: boolean;
+ constructor(opts?: WritableOptions);
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _construct?(callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ /**
+ * The `writable.write()` method writes some data to the stream, and calls the
+ * supplied `callback` once the data has been fully handled. If an error
+ * occurs, the `callback` will be called with the error as its
+ * first argument. The `callback` is called asynchronously and before `'error'` is
+ * emitted.
+ *
+ * The return value is `true` if the internal buffer is less than the`highWaterMark` configured when the stream was created after admitting `chunk`.
+ * If `false` is returned, further attempts to write data to the stream should
+ * stop until the `'drain'` event is emitted.
+ *
+ * While a stream is not draining, calls to `write()` will buffer `chunk`, and
+ * return false. Once all currently buffered chunks are drained (accepted for
+ * delivery by the operating system), the `'drain'` event will be emitted.
+ * Once `write()` returns false, do not write more chunks
+ * until the `'drain'` event is emitted. While calling `write()` on a stream that
+ * is not draining is allowed, Node.js will buffer all written chunks until
+ * maximum memory usage occurs, at which point it will abort unconditionally.
+ * Even before it aborts, high memory usage will cause poor garbage collector
+ * performance and high RSS (which is not typically released back to the system,
+ * even after the memory is no longer required). Since TCP sockets may never
+ * drain if the remote peer does not read the data, writing a socket that is
+ * not draining may lead to a remotely exploitable vulnerability.
+ *
+ * Writing data while the stream is not draining is particularly
+ * problematic for a `Transform`, because the `Transform` streams are paused
+ * by default until they are piped or a `'data'` or `'readable'` event handler
+ * is added.
+ *
+ * If the data to be written can be generated or fetched on demand, it is
+ * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is
+ * possible to respect backpressure and avoid memory issues using the `'drain'` event:
+ *
+ * ```js
+ * function write(data, cb) {
+ * if (!stream.write(data)) {
+ * stream.once('drain', cb);
+ * } else {
+ * process.nextTick(cb);
+ * }
+ * }
+ *
+ * // Wait for cb to be called before doing any other write.
+ * write('hello', () => {
+ * console.log('Write completed, do more writes now.');
+ * });
+ * ```
+ *
+ * A `Writable` stream in object mode will always ignore the `encoding` argument.
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param [encoding='utf8'] The encoding, if `chunk` is a string.
+ * @param callback Callback for when this chunk of data is flushed.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
+ /**
+ * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
+ * @since v0.11.15
+ * @param encoding The new default encoding
+ */
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ /**
+ * Calling the `writable.end()` method signals that no more data will be written
+ * to the `Writable`. The optional `chunk` and `encoding` arguments allow one
+ * final additional chunk of data to be written immediately before closing the
+ * stream.
+ *
+ * Calling the {@link write} method after calling {@link end} will raise an error.
+ *
+ * ```js
+ * // Write 'hello, ' and then end with 'world!'.
+ * const fs = require('fs');
+ * const file = fs.createWriteStream('example.txt');
+ * file.write('hello, ');
+ * file.end('world!');
+ * // Writing more now is not allowed!
+ * ```
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param encoding The encoding if `chunk` is a string
+ * @param callback Callback for when the stream is finished.
+ */
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
+ /**
+ * The `writable.cork()` method forces all written data to be buffered in memory.
+ * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called.
+ *
+ * The primary intent of `writable.cork()` is to accommodate a situation in which
+ * several small chunks are written to the stream in rapid succession. Instead of
+ * immediately forwarding them to the underlying destination, `writable.cork()`buffers all the chunks until `writable.uncork()` is called, which will pass them
+ * all to `writable._writev()`, if present. This prevents a head-of-line blocking
+ * situation where data is being buffered while waiting for the first small chunk
+ * to be processed. However, use of `writable.cork()` without implementing`writable._writev()` may have an adverse effect on throughput.
+ *
+ * See also: `writable.uncork()`, `writable._writev()`.
+ * @since v0.11.2
+ */
+ cork(): void;
+ /**
+ * The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
+ *
+ * When using `writable.cork()` and `writable.uncork()` to manage the buffering
+ * of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
+ * loop phase.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.write('data ');
+ * process.nextTick(() => stream.uncork());
+ * ```
+ *
+ * If the `writable.cork()` method is called multiple times on a stream, the
+ * same number of calls to `writable.uncork()` must be called to flush the buffered
+ * data.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.cork();
+ * stream.write('data ');
+ * process.nextTick(() => {
+ * stream.uncork();
+ * // The data will not be flushed until uncork() is called a second time.
+ * stream.uncork();
+ * });
+ * ```
+ *
+ * See also: `writable.cork()`.
+ * @since v0.11.2
+ */
+ uncork(): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable
+ * stream has ended and subsequent calls to `write()` or `end()` will result in
+ * an `ERR_STREAM_DESTROYED` error.
+ * This is a destructive and immediate way to destroy a stream. Previous calls to`write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error.
+ * Use `end()` instead of destroy if data should flush before close, or wait for
+ * the `'drain'` event before destroying the stream.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method,
+ * but instead implement `writable._destroy()`.
+ * @since v8.0.0
+ * @param error Optional, an error to emit with `'error'` event.
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. drain
+ * 3. error
+ * 4. finish
+ * 5. pipe
+ * 6. unpipe
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: Readable): boolean;
+ emit(event: 'unpipe', src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: Readable) => void): this;
+ on(event: 'unpipe', listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: Readable) => void): this;
+ once(event: 'unpipe', listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'drain', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'finish', listener: () => void): this;
+ removeListener(event: 'pipe', listener: (src: Readable) => void): this;
+ removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface DuplexOptions extends ReadableOptions, WritableOptions {
+ allowHalfOpen?: boolean | undefined;
+ readableObjectMode?: boolean | undefined;
+ writableObjectMode?: boolean | undefined;
+ readableHighWaterMark?: number | undefined;
+ writableHighWaterMark?: number | undefined;
+ writableCorked?: number | undefined;
+ construct?(this: Duplex, callback: (error?: Error | null) => void): void;
+ read?(this: Duplex, size: number): void;
+ write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Duplex,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
+ }
+ /**
+ * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Duplex` streams include:
+ *
+ * * `TCP sockets`
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Duplex extends Readable implements Writable {
+ readonly writable: boolean;
+ readonly writableEnded: boolean;
+ readonly writableFinished: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ readonly writableObjectMode: boolean;
+ readonly writableCorked: number;
+ readonly writableNeedDrain: boolean;
+ readonly closed: boolean;
+ readonly errored: Error | null;
+ /**
+ * If `false` then the stream will automatically end the writable side when the
+ * readable side ends. Set initially by the `allowHalfOpen` constructor option,
+ * which defaults to `false`.
+ *
+ * This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is
+ * emitted.
+ * @since v0.9.4
+ */
+ allowHalfOpen: boolean;
+ constructor(opts?: DuplexOptions);
+ /**
+ * A utility method for creating duplex streams.
+ *
+ * - `Stream` converts writable stream into writable `Duplex` and readable stream
+ * to `Duplex`.
+ * - `Blob` converts into readable `Duplex`.
+ * - `string` converts into readable `Duplex`.
+ * - `ArrayBuffer` converts into readable `Duplex`.
+ * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
+ * - `AsyncGeneratorFunction` converts into a readable/writable transform
+ * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
+ * `null`.
+ * - `AsyncFunction` converts into a writable `Duplex`. Must return
+ * either `null` or `undefined`
+ * - `Object ({ writable, readable })` converts `readable` and
+ * `writable` into `Stream` and then combines them into `Duplex` where the
+ * `Duplex` will write to the `writable` and read from the `readable`.
+ * - `Promise` converts into readable `Duplex`. Value `null` is ignored.
+ *
+ * @since v16.8.0
+ */
+ static from(src: Stream | Blob | ArrayBuffer | string | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | Object): Duplex;
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
+ cork(): void;
+ uncork(): void;
+ }
+ type TransformCallback = (error?: Error | null, data?: any) => void;
+ interface TransformOptions extends DuplexOptions {
+ construct?(this: Transform, callback: (error?: Error | null) => void): void;
+ read?(this: Transform, size: number): void;
+ write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Transform,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
+ transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ flush?(this: Transform, callback: TransformCallback): void;
+ }
+ /**
+ * Transform streams are `Duplex` streams where the output is in some way
+ * related to the input. Like all `Duplex` streams, `Transform` streams
+ * implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Transform` streams include:
+ *
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Transform extends Duplex {
+ constructor(opts?: TransformOptions);
+ _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ _flush(callback: TransformCallback): void;
+ }
+ /**
+ * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is
+ * primarily for examples and testing, but there are some use cases where`stream.PassThrough` is useful as a building block for novel sorts of streams.
+ */
+ class PassThrough extends Transform {}
+ /**
+ * Attaches an AbortSignal to a readable or writeable stream. This lets code
+ * control stream destruction using an `AbortController`.
+ *
+ * Calling `abort` on the `AbortController` corresponding to the passed`AbortSignal` will behave the same way as calling `.destroy(new AbortError())`on the stream.
+ *
+ * ```js
+ * const fs = require('fs');
+ *
+ * const controller = new AbortController();
+ * const read = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json'))
+ * );
+ * // Later, abort the operation closing the stream
+ * controller.abort();
+ * ```
+ *
+ * Or using an `AbortSignal` with a readable stream as an async iterable:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * setTimeout(() => controller.abort(), 10_000); // set a timeout
+ * const stream = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json'))
+ * );
+ * (async () => {
+ * try {
+ * for await (const chunk of stream) {
+ * await process(chunk);
+ * }
+ * } catch (e) {
+ * if (e.name === 'AbortError') {
+ * // The operation was cancelled
+ * } else {
+ * throw e;
+ * }
+ * }
+ * })();
+ * ```
+ * @since v15.4.0
+ * @param signal A signal representing possible cancellation
+ * @param stream a stream to attach a signal to
+ */
+ function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
+ interface FinishedOptions extends Abortable {
+ error?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ }
+ /**
+ * A function to get notified when a stream is no longer readable, writable
+ * or has experienced an error or a premature close event.
+ *
+ * ```js
+ * const { finished } = require('stream');
+ *
+ * const rs = fs.createReadStream('archive.tar');
+ *
+ * finished(rs, (err) => {
+ * if (err) {
+ * console.error('Stream failed.', err);
+ * } else {
+ * console.log('Stream is done reading.');
+ * }
+ * });
+ *
+ * rs.resume(); // Drain the stream.
+ * ```
+ *
+ * Especially useful in error handling scenarios where a stream is destroyed
+ * prematurely (like an aborted HTTP request), and will not emit `'end'`or `'finish'`.
+ *
+ * The `finished` API provides promise version:
+ *
+ * ```js
+ * const { finished } = require('stream/promises');
+ *
+ * const rs = fs.createReadStream('archive.tar');
+ *
+ * async function run() {
+ * await finished(rs);
+ * console.log('Stream is done reading.');
+ * }
+ *
+ * run().catch(console.error);
+ * rs.resume(); // Drain the stream.
+ * ```
+ *
+ * `stream.finished()` leaves dangling event listeners (in particular`'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
+ * invoked. The reason for this is so that unexpected `'error'` events (due to
+ * incorrect stream implementations) do not cause unexpected crashes.
+ * If this is unwanted behavior then the returned cleanup function needs to be
+ * invoked in the callback:
+ *
+ * ```js
+ * const cleanup = finished(rs, (err) => {
+ * cleanup();
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ * @param stream A readable and/or writable stream.
+ * @param callback A callback function that takes an optional error argument.
+ * @return A cleanup function which removes all registered listeners.
+ */
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ namespace finished {
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ }
+ type PipelineSourceFunction<T> = () => Iterable<T> | AsyncIterable<T>;
+ type PipelineSource<T> = Iterable<T> | AsyncIterable<T> | NodeJS.ReadableStream | PipelineSourceFunction<T>;
+ type PipelineTransform<S extends PipelineTransformSource<any>, U> =
+ | NodeJS.ReadWriteStream
+ | ((source: S extends (...args: any[]) => Iterable<infer ST> | AsyncIterable<infer ST> ? AsyncIterable<ST> : S) => AsyncIterable<U>);
+ type PipelineTransformSource<T> = PipelineSource<T> | PipelineTransform<any, T>;
+ type PipelineDestinationIterableFunction<T> = (source: AsyncIterable<T>) => AsyncIterable<any>;
+ type PipelineDestinationPromiseFunction<T, P> = (source: AsyncIterable<T>) => Promise<P>;
+ type PipelineDestination<S extends PipelineTransformSource<any>, P> = S extends PipelineTransformSource<infer ST>
+ ? NodeJS.WritableStream | PipelineDestinationIterableFunction<ST> | PipelineDestinationPromiseFunction<ST, P>
+ : never;
+ type PipelineCallback<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P>
+ ? (err: NodeJS.ErrnoException | null, value: P) => void
+ : (err: NodeJS.ErrnoException | null) => void;
+ type PipelinePromise<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P> ? Promise<P> : Promise<void>;
+ interface PipelineOptions {
+ signal: AbortSignal;
+ }
+ /**
+ * A module method to pipe between streams and generators forwarding errors and
+ * properly cleaning up and provide a callback when the pipeline is complete.
+ *
+ * ```js
+ * const { pipeline } = require('stream');
+ * const fs = require('fs');
+ * const zlib = require('zlib');
+ *
+ * // Use the pipeline API to easily pipe a series of streams
+ * // together and get notified when the pipeline is fully done.
+ *
+ * // A pipeline to gzip a potentially huge tar file efficiently:
+ *
+ * pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz'),
+ * (err) => {
+ * if (err) {
+ * console.error('Pipeline failed.', err);
+ * } else {
+ * console.log('Pipeline succeeded.');
+ * }
+ * }
+ * );
+ * ```
+ *
+ * The `pipeline` API provides a promise version, which can also
+ * receive an options argument as the last parameter with a`signal` `AbortSignal` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with
+ * an`AbortError`.
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ *
+ * async function run() {
+ * await pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz')
+ * );
+ * console.log('Pipeline succeeded.');
+ * }
+ *
+ * run().catch(console.error);
+ * ```
+ *
+ * To use an `AbortSignal`, pass it inside an options object,
+ * as the last argument:
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ *
+ * async function run() {
+ * const ac = new AbortController();
+ * const signal = ac.signal;
+ *
+ * setTimeout(() => ac.abort(), 1);
+ * await pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz'),
+ * { signal },
+ * );
+ * }
+ *
+ * run().catch(console.error); // AbortError
+ * ```
+ *
+ * The `pipeline` API also supports async generators:
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ * const fs = require('fs');
+ *
+ * async function run() {
+ * await pipeline(
+ * fs.createReadStream('lowercase.txt'),
+ * async function* (source, { signal }) {
+ * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s.
+ * for await (const chunk of source) {
+ * yield await processChunk(chunk, { signal });
+ * }
+ * },
+ * fs.createWriteStream('uppercase.txt')
+ * );
+ * console.log('Pipeline succeeded.');
+ * }
+ *
+ * run().catch(console.error);
+ * ```
+ *
+ * Remember to handle the `signal` argument passed into the async generator.
+ * Especially in the case where the async generator is the source for the
+ * pipeline (i.e. first argument) or the pipeline will never complete.
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ * const fs = require('fs');
+ *
+ * async function run() {
+ * await pipeline(
+ * async function* ({ signal }) {
+ * await someLongRunningfn({ signal });
+ * yield 'asd';
+ * },
+ * fs.createWriteStream('uppercase.txt')
+ * );
+ * console.log('Pipeline succeeded.');
+ * }
+ *
+ * run().catch(console.error);
+ * ```
+ *
+ * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
+ *
+ * * `Readable` streams which have emitted `'end'` or `'close'`.
+ * * `Writable` streams which have emitted `'finish'` or `'close'`.
+ *
+ * `stream.pipeline()` leaves dangling event listeners on the streams
+ * after the `callback` has been invoked. In the case of reuse of streams after
+ * failure, this can cause event listener leaks and swallowed errors. If the last
+ * stream is readable, dangling event listeners will be removed so that the last
+ * stream can be consumed later.
+ *
+ * `stream.pipeline()` closes all the streams when an error is raised.
+ * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
+ * once it would destroy the socket without sending the expected response.
+ * See the example below:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const http = require('http');
+ * const { pipeline } = require('stream');
+ *
+ * const server = http.createServer((req, res) => {
+ * const fileStream = fs.createReadStream('./fileNotExist.txt');
+ * pipeline(fileStream, res, (err) => {
+ * if (err) {
+ * console.log(err); // No such file
+ * // this message can't be sent once `pipeline` already destroyed the socket
+ * return res.end('error!!!');
+ * }
+ * });
+ * });
+ * ```
+ * @since v10.0.0
+ * @param callback Called when the pipeline is fully done.
+ */
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
+ source: A,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline(
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
+ callback?: (err: NodeJS.ErrnoException | null) => void
+ ): NodeJS.WritableStream;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>
+ ): NodeJS.WritableStream;
+ namespace pipeline {
+ function __promisify__<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+ }
+ interface Pipe {
+ close(): void;
+ hasRef(): boolean;
+ ref(): void;
+ unref(): void;
+ }
+
+ /**
+ * Returns whether the stream has encountered an error.
+ * @since v17.3.0
+ */
+ function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
+
+ /**
+ * Returns whether the stream is readable.
+ * @since v17.4.0
+ */
+ function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
+
+ const promises: typeof streamPromises;
+ const consumers: typeof streamConsumers;
+ }
+ export = internal;
+}
+declare module 'node:stream' {
+ import stream = require('stream');
+ export = stream;
+}
diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts
new file mode 100755
index 0000000..ce6c9bb
--- /dev/null
+++ b/node_modules/@types/node/stream/consumers.d.ts
@@ -0,0 +1,24 @@
+// Duplicates of interface in lib.dom.ts.
+// Duplicated here rather than referencing lib.dom.ts because doing so causes lib.dom.ts to be loaded for "test-all"
+// Which in turn causes tests to pass that shouldn't pass.
+//
+// This interface is not, and should not be, exported.
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): NodeJS.ReadableStream;
+ text(): Promise<string>;
+}
+declare module 'stream/consumers' {
+ import { Readable } from 'node:stream';
+ function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
+ function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
+ function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
+ function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Blob>;
+ function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
+}
+declare module 'node:stream/consumers' {
+ export * from 'stream/consumers';
+}
diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts
new file mode 100755
index 0000000..b427073
--- /dev/null
+++ b/node_modules/@types/node/stream/promises.d.ts
@@ -0,0 +1,42 @@
+declare module 'stream/promises' {
+ import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream';
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+}
+declare module 'node:stream/promises' {
+ export * from 'stream/promises';
+}
diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts
new file mode 100755
index 0000000..f9ef057
--- /dev/null
+++ b/node_modules/@types/node/stream/web.d.ts
@@ -0,0 +1,330 @@
+declare module 'stream/web' {
+ // stub module, pending copy&paste from .d.ts or manual impl
+ // copy from lib.dom.d.ts
+ interface ReadableWritablePair<R = any, W = any> {
+ readable: ReadableStream<R>;
+ /**
+ * Provides a convenient, chainable way of piping this readable stream
+ * through a transform stream (or any other { writable, readable }
+ * pair). It simply pipes the stream into the writable side of the
+ * supplied pair, and returns the readable side for further use.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ */
+ writable: WritableStream<W>;
+ }
+ interface StreamPipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ /**
+ * Pipes this readable stream to a given writable stream destination.
+ * The way in which the piping process behaves under various error
+ * conditions can be customized with a number of passed options. It
+ * returns a promise that fulfills when the piping process completes
+ * successfully, or rejects if any errors were encountered.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ *
+ * Errors and closures of the source and destination streams propagate
+ * as follows:
+ *
+ * An error in this source readable stream will abort destination,
+ * unless preventAbort is truthy. The returned promise will be rejected
+ * with the source's error, or with any error that occurs during
+ * aborting the destination.
+ *
+ * An error in destination will cancel this source readable stream,
+ * unless preventCancel is truthy. The returned promise will be rejected
+ * with the destination's error, or with any error that occurs during
+ * canceling the source.
+ *
+ * When this source readable stream closes, destination will be closed,
+ * unless preventClose is truthy. The returned promise will be fulfilled
+ * once this process completes, unless an error is encountered while
+ * closing the destination, in which case it will be rejected with that
+ * error.
+ *
+ * If destination starts out closed or closing, this source readable
+ * stream will be canceled, unless preventCancel is true. The returned
+ * promise will be rejected with an error indicating piping to a closed
+ * stream failed, or with any error that occurs during canceling the
+ * source.
+ *
+ * The signal option can be set to an AbortSignal to allow aborting an
+ * ongoing pipe operation via the corresponding AbortController. In this
+ * case, this source readable stream will be canceled, and destination
+ * aborted, unless the respective options preventCancel or preventAbort
+ * are set.
+ */
+ preventClose?: boolean;
+ signal?: AbortSignal;
+ }
+ interface ReadableStreamGenericReader {
+ readonly closed: Promise<undefined>;
+ cancel(reason?: any): Promise<void>;
+ }
+ interface ReadableStreamDefaultReadValueResult<T> {
+ done: false;
+ value: T;
+ }
+ interface ReadableStreamDefaultReadDoneResult {
+ done: true;
+ value?: undefined;
+ }
+ type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
+ type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
+ interface ReadableByteStreamControllerCallback {
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkAbortCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkCloseCallback {
+ (): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkStartCallback {
+ (controller: WritableStreamDefaultController): any;
+ }
+ interface UnderlyingSinkWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceCancelCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourcePullCallback<R> {
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceStartCallback<R> {
+ (controller: ReadableStreamController<R>): any;
+ }
+ interface TransformerFlushCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface TransformerStartCallback<O> {
+ (controller: TransformStreamDefaultController<O>): any;
+ }
+ interface TransformerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface UnderlyingByteSource {
+ autoAllocateChunkSize?: number;
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableByteStreamControllerCallback;
+ start?: ReadableByteStreamControllerCallback;
+ type: 'bytes';
+ }
+ interface UnderlyingSource<R = any> {
+ cancel?: UnderlyingSourceCancelCallback;
+ pull?: UnderlyingSourcePullCallback<R>;
+ start?: UnderlyingSourceStartCallback<R>;
+ type?: undefined;
+ }
+ interface UnderlyingSink<W = any> {
+ abort?: UnderlyingSinkAbortCallback;
+ close?: UnderlyingSinkCloseCallback;
+ start?: UnderlyingSinkStartCallback;
+ type?: undefined;
+ write?: UnderlyingSinkWriteCallback<W>;
+ }
+ interface ReadableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+ }
+ /** This Streams API interface represents a readable stream of byte data. */
+ interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+ values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<R>;
+ }
+ const ReadableStream: {
+ prototype: ReadableStream;
+ new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
+ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+ };
+ interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
+ read(): Promise<ReadableStreamDefaultReadResult<R>>;
+ releaseLock(): void;
+ }
+ const ReadableStreamDefaultReader: {
+ prototype: ReadableStreamDefaultReader;
+ new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
+ };
+ const ReadableStreamBYOBReader: any;
+ const ReadableStreamBYOBRequest: any;
+ interface ReadableByteStreamController {
+ readonly byobRequest: undefined;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(error?: any): void;
+ }
+ const ReadableByteStreamController: {
+ prototype: ReadableByteStreamController;
+ new (): ReadableByteStreamController;
+ };
+ interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk?: R): void;
+ error(e?: any): void;
+ }
+ const ReadableStreamDefaultController: {
+ prototype: ReadableStreamDefaultController;
+ new (): ReadableStreamDefaultController;
+ };
+ interface Transformer<I = any, O = any> {
+ flush?: TransformerFlushCallback<O>;
+ readableType?: undefined;
+ start?: TransformerStartCallback<O>;
+ transform?: TransformerTransformCallback<I, O>;
+ writableType?: undefined;
+ }
+ interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+ }
+ const TransformStream: {
+ prototype: TransformStream;
+ new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+ };
+ interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk?: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+ }
+ const TransformStreamDefaultController: {
+ prototype: TransformStreamDefaultController;
+ new (): TransformStreamDefaultController;
+ };
+ /**
+ * This Streams API interface provides a standard abstraction for writing
+ * streaming data to a destination, known as a sink. This object comes with
+ * built-in back pressure and queuing.
+ */
+ interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+ }
+ const WritableStream: {
+ prototype: WritableStream;
+ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+ };
+ /**
+ * This Streams API interface is the object returned by
+ * WritableStream.getWriter() and once created locks the < writer to the
+ * WritableStream ensuring that no other streams can write to the underlying
+ * sink.
+ */
+ interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<undefined>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<undefined>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk?: W): Promise<void>;
+ }
+ const WritableStreamDefaultWriter: {
+ prototype: WritableStreamDefaultWriter;
+ new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
+ };
+ /**
+ * This Streams API interface represents a controller allowing control of a
+ * WritableStream's state. When constructing a WritableStream, the
+ * underlying sink is given a corresponding WritableStreamDefaultController
+ * instance to manipulate.
+ */
+ interface WritableStreamDefaultController {
+ error(e?: any): void;
+ }
+ const WritableStreamDefaultController: {
+ prototype: WritableStreamDefaultController;
+ new (): WritableStreamDefaultController;
+ };
+ interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySize<T>;
+ }
+ interface QueuingStrategySize<T = any> {
+ (chunk?: T): number;
+ }
+ interface QueuingStrategyInit {
+ /**
+ * Creates a new ByteLengthQueuingStrategy with the provided high water
+ * mark.
+ *
+ * Note that the provided high water mark will not be validated ahead of
+ * time. Instead, if it is negative, NaN, or not a number, the resulting
+ * ByteLengthQueuingStrategy will cause the corresponding stream
+ * constructor to throw.
+ */
+ highWaterMark: number;
+ }
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize<ArrayBufferView>;
+ }
+ const ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
+ };
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface CountQueuingStrategy extends QueuingStrategy {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize;
+ }
+ const CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new (init: QueuingStrategyInit): CountQueuingStrategy;
+ };
+ interface TextEncoderStream {
+ /** Returns "utf-8". */
+ readonly encoding: 'utf-8';
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new (): TextEncoderStream;
+ };
+ interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+ }
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ interface TextDecoderStream {
+ /** Returns encoding's name, lower cased. */
+ readonly encoding: string;
+ /** Returns `true` if error mode is "fatal", and `false` otherwise. */
+ readonly fatal: boolean;
+ /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
+ readonly ignoreBOM: boolean;
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
+ };
+}
+declare module 'node:stream/web' {
+ export * from 'stream/web';
+}
diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts
new file mode 100755
index 0000000..a585804
--- /dev/null
+++ b/node_modules/@types/node/string_decoder.d.ts
@@ -0,0 +1,67 @@
+/**
+ * The `string_decoder` module provides an API for decoding `Buffer` objects into
+ * strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
+ * characters. It can be accessed using:
+ *
+ * ```js
+ * const { StringDecoder } = require('string_decoder');
+ * ```
+ *
+ * The following example shows the basic use of the `StringDecoder` class.
+ *
+ * ```js
+ * const { StringDecoder } = require('string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * const cent = Buffer.from([0xC2, 0xA2]);
+ * console.log(decoder.write(cent));
+ *
+ * const euro = Buffer.from([0xE2, 0x82, 0xAC]);
+ * console.log(decoder.write(euro));
+ * ```
+ *
+ * When a `Buffer` instance is written to the `StringDecoder` instance, an
+ * internal buffer is used to ensure that the decoded string does not contain
+ * any incomplete multibyte characters. These are held in the buffer until the
+ * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
+ *
+ * In the following example, the three UTF-8 encoded bytes of the European Euro
+ * symbol (`€`) are written over three separate operations:
+ *
+ * ```js
+ * const { StringDecoder } = require('string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * decoder.write(Buffer.from([0xE2]));
+ * decoder.write(Buffer.from([0x82]));
+ * console.log(decoder.end(Buffer.from([0xAC])));
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js)
+ */
+declare module 'string_decoder' {
+ class StringDecoder {
+ constructor(encoding?: BufferEncoding);
+ /**
+ * Returns a decoded string, ensuring that any incomplete multibyte characters at
+ * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
+ * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
+ * @since v0.1.99
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ write(buffer: Buffer): string;
+ /**
+ * Returns any remaining input stored in the internal buffer as a string. Bytes
+ * representing incomplete UTF-8 and UTF-16 characters will be replaced with
+ * substitution characters appropriate for the character encoding.
+ *
+ * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
+ * After `end()` is called, the `stringDecoder` object can be reused for new input.
+ * @since v0.9.3
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ end(buffer?: Buffer): string;
+ }
+}
+declare module 'node:string_decoder' {
+ export * from 'string_decoder';
+}
diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts
new file mode 100755
index 0000000..a9b4eeb
--- /dev/null
+++ b/node_modules/@types/node/test.d.ts
@@ -0,0 +1,314 @@
+/**
+ * The `node:test` module provides a standalone testing module.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/test.js)
+ */
+declare module 'node:test' {
+ /**
+ * Programmatically start the test runner.
+ * @since v18.9.0
+ * @param options Configuration options for running tests.
+ * @returns A {@link TapStream} that emits events about the test execution.
+ */
+ function run(options?: RunOptions): TapStream;
+
+ /**
+ * The `test()` function is the value imported from the test module. Each invocation of this
+ * function results in the creation of a test point in the TAP output.
+ *
+ * The {@link TestContext} object passed to the fn argument can be used to perform actions
+ * related to the current test. Examples include skipping the test, adding additional TAP
+ * diagnostic information, or creating subtests.
+ *
+ * `test()` returns a {@link Promise} that resolves once the test completes. The return value
+ * can usually be discarded for top level tests. However, the return value from subtests should
+ * be used to prevent the parent test from finishing first and cancelling the subtest as shown
+ * in the following example.
+ *
+ * ```js
+ * test('top level test', async (t) => {
+ * // The setTimeout() in the following subtest would cause it to outlive its
+ * // parent test if 'await' is removed on the next line. Once the parent test
+ * // completes, it will cancel any outstanding subtests.
+ * await t.test('longer running subtest', async (t) => {
+ * return new Promise((resolve, reject) => {
+ * setTimeout(resolve, 1000);
+ * });
+ * });
+ * });
+ * ```
+ * @since v18.0.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. The first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ * @returns A {@link Promise} resolved with `undefined` once the test completes.
+ */
+ function test(name?: string, fn?: TestFn): Promise<void>;
+ function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(fn?: TestFn): Promise<void>;
+
+ /**
+ * @since v18.6.0
+ * @param name The name of the suite, which is displayed when reporting suite results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the suite
+ * @param fn The function under suite. Default: A no-op function.
+ */
+ function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void;
+ function describe(name?: string, fn?: SuiteFn): void;
+ function describe(options?: TestOptions, fn?: SuiteFn): void;
+ function describe(fn?: SuiteFn): void;
+
+ /**
+ * @since v18.6.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ */
+ function it(name?: string, options?: TestOptions, fn?: ItFn): void;
+ function it(name?: string, fn?: ItFn): void;
+ function it(options?: TestOptions, fn?: ItFn): void;
+ function it(fn?: ItFn): void;
+
+ /**
+ * The type of a function under test. The first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is passed as
+ * the second argument.
+ */
+ type TestFn = (t: TestContext, done: (result?: any) => void) => any;
+
+ /**
+ * The type of a function under Suite.
+ * If the test uses callbacks, the callback function is passed as an argument
+ */
+ type SuiteFn = (done: (result?: any) => void) => void;
+
+ /**
+ * The type of a function under test.
+ * If the test uses callbacks, the callback function is passed as an argument
+ */
+ type ItFn = (done: (result?: any) => void) => any;
+
+ interface RunOptions {
+ /**
+ * @default false
+ */
+ concurrency?: number | boolean;
+
+ /**
+ * An array containing the list of files to run. If unspecified, the test runner execution model will be used.
+ */
+ files?: readonly string[];
+
+ /**
+ * Allows aborting an in-progress test.
+ * @default undefined
+ */
+ signal?: AbortSignal;
+
+ /**
+ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ */
+ timeout?: number;
+ }
+
+ /**
+ * A successful call of the run() method will return a new TapStream object, streaming a TAP output.
+ * TapStream will emit events in the order of the tests' definitions.
+ * @since v18.9.0
+ */
+ interface TapStream extends NodeJS.ReadableStream {
+ addListener(event: 'test:diagnostic', listener: (message: string) => void): this;
+ addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ emit(event: 'test:diagnostic', message: string): boolean;
+ emit(event: 'test:fail', data: TestFail): boolean;
+ emit(event: 'test:pass', data: TestPass): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'test:diagnostic', listener: (message: string) => void): this;
+ on(event: 'test:fail', listener: (data: TestFail) => void): this;
+ on(event: 'test:pass', listener: (data: TestPass) => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'test:diagnostic', listener: (message: string) => void): this;
+ once(event: 'test:fail', listener: (data: TestFail) => void): this;
+ once(event: 'test:pass', listener: (data: TestPass) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'test:diagnostic', listener: (message: string) => void): this;
+ prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this;
+ prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ }
+
+ interface TestFail {
+ /**
+ * The test duration.
+ */
+ duration: number;
+
+ /**
+ * The failure casing test to fail.
+ */
+ error: Error;
+
+ /**
+ * The test name.
+ */
+ name: string;
+
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string;
+
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string;
+ }
+
+ interface TestPass {
+ /**
+ * The test duration.
+ */
+ duration: number;
+
+ /**
+ * The test name.
+ */
+ name: string;
+
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string;
+
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string;
+ }
+
+ /**
+ * An instance of `TestContext` is passed to each test function in order to interact with the
+ * test runner. However, the `TestContext` constructor is not exposed as part of the API.
+ * @since v18.0.0
+ */
+ interface TestContext {
+ /**
+ * This function is used to write TAP diagnostics to the output. Any diagnostic information is
+ * included at the end of the test's results. This function does not return a value.
+ * @param message Message to be displayed as a TAP diagnostic.
+ * @since v18.0.0
+ */
+ diagnostic(message: string): void;
+
+ /**
+ * If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only`
+ * option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only`
+ * command-line option, this function is a no-op.
+ * @param shouldRunOnlyTests Whether or not to run `only` tests.
+ * @since v18.0.0
+ */
+ runOnly(shouldRunOnlyTests: boolean): void;
+
+ /**
+ * This function causes the test's output to indicate the test as skipped. If `message` is
+ * provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
+ * the test function. This function does not return a value.
+ * @param message Optional skip message to be displayed in TAP output.
+ * @since v18.0.0
+ */
+ skip(message?: string): void;
+
+ /**
+ * This function adds a `TODO` directive to the test's output. If `message` is provided, it is
+ * included in the TAP output. Calling `todo()` does not terminate execution of the test
+ * function. This function does not return a value.
+ * @param message Optional `TODO` message to be displayed in TAP output.
+ * @since v18.0.0
+ */
+ todo(message?: string): void;
+
+ /**
+ * This function is used to create subtests under the current test. This function behaves in
+ * the same fashion as the top level {@link test} function.
+ * @since v18.0.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. This first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ * @returns A {@link Promise} resolved with `undefined` once the test completes.
+ */
+ test: typeof test;
+ }
+
+ interface TestOptions {
+ /**
+ * The number of tests that can be run at the same time. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default 1
+ */
+ concurrency?: number;
+
+ /**
+ * If truthy, and the test context is configured to run `only` tests, then this test will be
+ * run. Otherwise, the test is skipped.
+ * @default false
+ */
+ only?: boolean;
+
+ /**
+ * Allows aborting an in-progress test.
+ * @since v18.8.0
+ */
+ signal?: AbortSignal;
+
+ /**
+ * If truthy, the test is skipped. If a string is provided, that string is displayed in the
+ * test results as the reason for skipping the test.
+ * @default false
+ */
+ skip?: boolean | string;
+
+ /**
+ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ * @since v18.7.0
+ */
+ timeout?: number;
+
+ /**
+ * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
+ * the test results as the reason why the test is `TODO`.
+ * @default false
+ */
+ todo?: boolean | string;
+ }
+
+ export { test as default, run, test, describe, it };
+}
diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts
new file mode 100755
index 0000000..b26f3ce
--- /dev/null
+++ b/node_modules/@types/node/timers.d.ts
@@ -0,0 +1,94 @@
+/**
+ * The `timer` module exposes a global API for scheduling functions to
+ * be called at some future period of time. Because the timer functions are
+ * globals, there is no need to call `require('timers')` to use the API.
+ *
+ * The timer functions within Node.js implement a similar API as the timers API
+ * provided by Web Browsers but use a different internal implementation that is
+ * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js)
+ */
+declare module 'timers' {
+ import { Abortable } from 'node:events';
+ import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises';
+ interface TimerOptions extends Abortable {
+ /**
+ * Set to `false` to indicate that the scheduled `Timeout`
+ * should not require the Node.js event loop to remain active.
+ * @default true
+ */
+ ref?: boolean | undefined;
+ }
+ let setTimeout: typeof global.setTimeout;
+ let clearTimeout: typeof global.clearTimeout;
+ let setInterval: typeof global.setInterval;
+ let clearInterval: typeof global.clearInterval;
+ let setImmediate: typeof global.setImmediate;
+ let clearImmediate: typeof global.clearImmediate;
+ global {
+ namespace NodeJS {
+ // compatibility with older typings
+ interface Timer extends RefCounted {
+ hasRef(): boolean;
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+ interface Immediate extends RefCounted {
+ /**
+ * If true, the `Immediate` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ _onImmediate: Function; // to distinguish it from the Timeout class
+ }
+ interface Timeout extends Timer {
+ /**
+ * If true, the `Timeout` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ /**
+ * Sets the timer's start time to the current time, and reschedules the timer to
+ * call its callback at the previously specified duration adjusted to the current
+ * time. This is useful for refreshing a timer without allocating a new
+ * JavaScript object.
+ *
+ * Using this on a timer that has already called its callback will reactivate the
+ * timer.
+ * @since v10.2.0
+ * @return a reference to `timeout`
+ */
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+ }
+ function setTimeout<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
+ namespace setTimeout {
+ const __promisify__: typeof setTimeoutPromise;
+ }
+ function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
+ function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer;
+ namespace setInterval {
+ const __promisify__: typeof setIntervalPromise;
+ }
+ function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
+ function setImmediate<TArgs extends any[]>(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setImmediate(callback: (args: void) => void): NodeJS.Immediate;
+ namespace setImmediate {
+ const __promisify__: typeof setImmediatePromise;
+ }
+ function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
+ function queueMicrotask(callback: () => void): void;
+ }
+}
+declare module 'node:timers' {
+ export * from 'timers';
+}
diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts
new file mode 100755
index 0000000..fd77888
--- /dev/null
+++ b/node_modules/@types/node/timers/promises.d.ts
@@ -0,0 +1,68 @@
+/**
+ * The `timers/promises` API provides an alternative set of timer functions
+ * that return `Promise` objects. The API is accessible via`require('timers/promises')`.
+ *
+ * ```js
+ * import {
+ * setTimeout,
+ * setImmediate,
+ * setInterval,
+ * } from 'timers/promises';
+ * ```
+ * @since v15.0.0
+ */
+declare module 'timers/promises' {
+ import { TimerOptions } from 'node:timers';
+ /**
+ * ```js
+ * import {
+ * setTimeout,
+ * } from 'timers/promises';
+ *
+ * const res = await setTimeout(100, 'result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * ```js
+ * import {
+ * setImmediate,
+ * } from 'timers/promises';
+ *
+ * const res = await setImmediate('result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * Returns an async iterator that generates values in an interval of `delay` ms.
+ *
+ * ```js
+ * import {
+ * setInterval,
+ * } from 'timers/promises';
+ *
+ * const interval = 100;
+ * for await (const startTime of setInterval(interval, Date.now())) {
+ * const now = Date.now();
+ * console.log(now);
+ * if ((now - startTime) > 1000)
+ * break;
+ * }
+ * console.log(Date.now());
+ * ```
+ * @since v15.9.0
+ */
+ function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
+}
+declare module 'node:timers/promises' {
+ export * from 'timers/promises';
+}
diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts
new file mode 100755
index 0000000..2cbc716
--- /dev/null
+++ b/node_modules/@types/node/tls.d.ts
@@ -0,0 +1,1028 @@
+/**
+ * The `tls` module provides an implementation of the Transport Layer Security
+ * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
+ * The module can be accessed using:
+ *
+ * ```js
+ * const tls = require('tls');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tls.js)
+ */
+declare module 'tls' {
+ import { X509Certificate } from 'node:crypto';
+ import * as net from 'node:net';
+ import * as stream from 'stream';
+ const CLIENT_RENEG_LIMIT: number;
+ const CLIENT_RENEG_WINDOW: number;
+ interface Certificate {
+ /**
+ * Country code.
+ */
+ C: string;
+ /**
+ * Street.
+ */
+ ST: string;
+ /**
+ * Locality.
+ */
+ L: string;
+ /**
+ * Organization.
+ */
+ O: string;
+ /**
+ * Organizational unit.
+ */
+ OU: string;
+ /**
+ * Common name.
+ */
+ CN: string;
+ }
+ interface PeerCertificate {
+ subject: Certificate;
+ issuer: Certificate;
+ subjectaltname: string;
+ infoAccess: NodeJS.Dict<string[]>;
+ modulus: string;
+ exponent: string;
+ valid_from: string;
+ valid_to: string;
+ fingerprint: string;
+ fingerprint256: string;
+ ext_key_usage: string[];
+ serialNumber: string;
+ raw: Buffer;
+ }
+ interface DetailedPeerCertificate extends PeerCertificate {
+ issuerCertificate: DetailedPeerCertificate;
+ }
+ interface CipherNameAndProtocol {
+ /**
+ * The cipher name.
+ */
+ name: string;
+ /**
+ * SSL/TLS protocol version.
+ */
+ version: string;
+ /**
+ * IETF name for the cipher suite.
+ */
+ standardName: string;
+ }
+ interface EphemeralKeyInfo {
+ /**
+ * The supported types are 'DH' and 'ECDH'.
+ */
+ type: string;
+ /**
+ * The name property is available only when type is 'ECDH'.
+ */
+ name?: string | undefined;
+ /**
+ * The size of parameter of an ephemeral key exchange.
+ */
+ size: number;
+ }
+ interface KeyObject {
+ /**
+ * Private keys in PEM format.
+ */
+ pem: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface PxfObject {
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain.
+ */
+ buf: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
+ /**
+ * If true the TLS socket will be instantiated in server-mode.
+ * Defaults to false.
+ */
+ isServer?: boolean | undefined;
+ /**
+ * An optional net.Server instance.
+ */
+ server?: net.Server | undefined;
+ /**
+ * An optional Buffer instance containing a TLS session.
+ */
+ session?: Buffer | undefined;
+ /**
+ * If true, specifies that the OCSP status request extension will be
+ * added to the client hello and an 'OCSPResponse' event will be
+ * emitted on the socket before establishing a secure communication
+ */
+ requestOCSP?: boolean | undefined;
+ }
+ /**
+ * Performs transparent encryption of written data and all required TLS
+ * negotiation.
+ *
+ * Instances of `tls.TLSSocket` implement the duplex `Stream` interface.
+ *
+ * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate} will only return data while the
+ * connection is open.
+ * @since v0.11.4
+ */
+ class TLSSocket extends net.Socket {
+ /**
+ * Construct a new tls.TLSSocket object from an existing TCP socket.
+ */
+ constructor(socket: net.Socket, options?: TLSSocketOptions);
+ /**
+ * This property is `true` if the peer certificate was signed by one of the CAs
+ * specified when creating the `tls.TLSSocket` instance, otherwise `false`.
+ * @since v0.11.4
+ */
+ authorized: boolean;
+ /**
+ * Returns the reason why the peer's certificate was not been verified. This
+ * property is set only when `tlsSocket.authorized === false`.
+ * @since v0.11.4
+ */
+ authorizationError: Error;
+ /**
+ * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances.
+ * @since v0.11.4
+ */
+ encrypted: true;
+ /**
+ * String containing the selected ALPN protocol.
+ * Before a handshake has completed, this value is always null.
+ * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
+ */
+ alpnProtocol: string | false | null;
+ /**
+ * Returns an object representing the local certificate. The returned object has
+ * some properties corresponding to the fields of the certificate.
+ *
+ * See {@link TLSSocket.getPeerCertificate} for an example of the certificate
+ * structure.
+ *
+ * If there is no local certificate, an empty object will be returned. If the
+ * socket has been destroyed, `null` will be returned.
+ * @since v11.2.0
+ */
+ getCertificate(): PeerCertificate | object | null;
+ /**
+ * Returns an object containing information on the negotiated cipher suite.
+ *
+ * For example:
+ *
+ * ```json
+ * {
+ * "name": "AES128-SHA256",
+ * "standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256",
+ * "version": "TLSv1.2"
+ * }
+ * ```
+ *
+ * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information.
+ * @since v0.11.4
+ */
+ getCipher(): CipherNameAndProtocol;
+ /**
+ * Returns an object representing the type, name, and size of parameter of
+ * an ephemeral key exchange in `perfect forward secrecy` on a client
+ * connection. It returns an empty object when the key exchange is not
+ * ephemeral. As this is only supported on a client socket; `null` is returned
+ * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`.
+ *
+ * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`.
+ * @since v5.0.0
+ */
+ getEphemeralKeyInfo(): EphemeralKeyInfo | object | null;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet.
+ */
+ getFinished(): Buffer | undefined;
+ /**
+ * Returns an object representing the peer's certificate. If the peer does not
+ * provide a certificate, an empty object will be returned. If the socket has been
+ * destroyed, `null` will be returned.
+ *
+ * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's
+ * certificate.
+ * @since v0.11.4
+ * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate.
+ * @return A certificate object.
+ */
+ getPeerCertificate(detailed: true): DetailedPeerCertificate;
+ getPeerCertificate(detailed?: false): PeerCertificate;
+ getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so
+ * far.
+ */
+ getPeerFinished(): Buffer | undefined;
+ /**
+ * Returns a string containing the negotiated SSL/TLS protocol version of the
+ * current connection. The value `'unknown'` will be returned for connected
+ * sockets that have not completed the handshaking process. The value `null` will
+ * be returned for server sockets or disconnected client sockets.
+ *
+ * Protocol versions are:
+ *
+ * * `'SSLv3'`
+ * * `'TLSv1'`
+ * * `'TLSv1.1'`
+ * * `'TLSv1.2'`
+ * * `'TLSv1.3'`
+ *
+ * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information.
+ * @since v5.7.0
+ */
+ getProtocol(): string | null;
+ /**
+ * Returns the TLS session data or `undefined` if no session was
+ * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful
+ * for debugging.
+ *
+ * See `Session Resumption` for more information.
+ *
+ * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications
+ * must use the `'session'` event (it also works for TLSv1.2 and below).
+ * @since v0.11.4
+ */
+ getSession(): Buffer | undefined;
+ /**
+ * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information.
+ * @since v12.11.0
+ * @return List of signature algorithms shared between the server and the client in the order of decreasing preference.
+ */
+ getSharedSigalgs(): string[];
+ /**
+ * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`.
+ *
+ * It may be useful for debugging.
+ *
+ * See `Session Resumption` for more information.
+ * @since v0.11.4
+ */
+ getTLSTicket(): Buffer | undefined;
+ /**
+ * See `Session Resumption` for more information.
+ * @since v0.5.6
+ * @return `true` if the session was reused, `false` otherwise.
+ */
+ isSessionReused(): boolean;
+ /**
+ * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process.
+ * Upon completion, the `callback` function will be passed a single argument
+ * that is either an `Error` (if the request failed) or `null`.
+ *
+ * This method can be used to request a peer's certificate after the secure
+ * connection has been established.
+ *
+ * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout.
+ *
+ * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the
+ * protocol.
+ * @since v0.11.8
+ * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with
+ * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all.
+ * @return `true` if renegotiation was initiated, `false` otherwise.
+ */
+ renegotiate(
+ options: {
+ rejectUnauthorized?: boolean | undefined;
+ requestCert?: boolean | undefined;
+ },
+ callback: (err: Error | null) => void
+ ): undefined | boolean;
+ /**
+ * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size.
+ * Returns `true` if setting the limit succeeded; `false` otherwise.
+ *
+ * Smaller fragment sizes decrease the buffering latency on the client: larger
+ * fragments are buffered by the TLS layer until the entire fragment is received
+ * and its integrity is verified; large fragments can span multiple roundtrips
+ * and their processing can be delayed due to packet loss or reordering. However,
+ * smaller fragments add extra TLS framing bytes and CPU overhead, which may
+ * decrease overall server throughput.
+ * @since v0.11.11
+ * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`.
+ */
+ setMaxSendFragment(size: number): boolean;
+ /**
+ * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts
+ * to renegotiate will trigger an `'error'` event on the `TLSSocket`.
+ * @since v8.4.0
+ */
+ disableRenegotiation(): void;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ *
+ * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by
+ * OpenSSL's `SSL_trace()` function, the format is undocumented, can change
+ * without notice, and should not be relied on.
+ * @since v12.2.0
+ */
+ enableTrace(): void;
+ /**
+ * Returns the peer certificate as an `X509Certificate` object.
+ *
+ * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getPeerX509Certificate(): X509Certificate | undefined;
+ /**
+ * Returns the local certificate as an `X509Certificate` object.
+ *
+ * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getX509Certificate(): X509Certificate | undefined;
+ /**
+ * Keying material is used for validations to prevent different kind of attacks in
+ * network protocols, for example in the specifications of IEEE 802.1X.
+ *
+ * Example
+ *
+ * ```js
+ * const keyingMaterial = tlsSocket.exportKeyingMaterial(
+ * 128,
+ * 'client finished');
+ *
+ * /*
+ * Example return value of keyingMaterial:
+ * <Buffer 76 26 af 99 c5 56 8e 42 09 91 ef 9f 93 cb ad 6c 7b 65 f8 53 f1 d8 d9
+ * 12 5a 33 b8 b5 25 df 7b 37 9f e0 e2 4f b8 67 83 a3 2f cd 5d 41 42 4c 91
+ * 74 ef 2c ... 78 more bytes>
+ *
+ * ```
+ *
+ * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more
+ * information.
+ * @since v13.10.0, v12.17.0
+ * @param length number of bytes to retrieve from keying material
+ * @param label an application specific label, typically this will be a value from the [IANA Exporter Label
+ * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
+ * @param context Optionally provide a context.
+ * @return requested bytes of the keying material
+ */
+ exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ addListener(event: 'secureConnect', listener: () => void): this;
+ addListener(event: 'session', listener: (session: Buffer) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'OCSPResponse', response: Buffer): boolean;
+ emit(event: 'secureConnect'): boolean;
+ emit(event: 'session', session: Buffer): boolean;
+ emit(event: 'keylog', line: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ on(event: 'secureConnect', listener: () => void): this;
+ on(event: 'session', listener: (session: Buffer) => void): this;
+ on(event: 'keylog', listener: (line: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ once(event: 'secureConnect', listener: () => void): this;
+ once(event: 'session', listener: (session: Buffer) => void): this;
+ once(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependListener(event: 'secureConnect', listener: () => void): this;
+ prependListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependOnceListener(event: 'secureConnect', listener: () => void): this;
+ prependOnceListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ }
+ interface CommonConnectionOptions {
+ /**
+ * An optional TLS context object from tls.createSecureContext()
+ */
+ secureContext?: SecureContext | undefined;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ * @default false
+ */
+ enableTrace?: boolean | undefined;
+ /**
+ * If true the server will request a certificate from clients that
+ * connect and attempt to verify that certificate. Defaults to
+ * false.
+ */
+ requestCert?: boolean | undefined;
+ /**
+ * An array of strings or a Buffer naming possible ALPN protocols.
+ * (Protocols should be ordered by their priority.)
+ */
+ ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined;
+ /**
+ * SNICallback(servername, cb) <Function> A function that will be
+ * called if the client supports SNI TLS extension. Two arguments
+ * will be passed when called: servername and cb. SNICallback should
+ * invoke cb(null, ctx), where ctx is a SecureContext instance.
+ * (tls.createSecureContext(...) can be used to get a proper
+ * SecureContext.) If SNICallback wasn't provided the default callback
+ * with high-level API will be used (see below).
+ */
+ SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined;
+ /**
+ * If true the server will reject any connection which is not
+ * authorized with the list of supplied CAs. This option only has an
+ * effect if requestCert is true.
+ * @default true
+ */
+ rejectUnauthorized?: boolean | undefined;
+ }
+ interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
+ /**
+ * Abort the connection if the SSL/TLS handshake does not finish in the
+ * specified number of milliseconds. A 'tlsClientError' is emitted on
+ * the tls.Server object whenever a handshake times out. Default:
+ * 120000 (120 seconds).
+ */
+ handshakeTimeout?: number | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ *
+ * @param socket
+ * @param identity identity parameter sent from the client.
+ * @return pre-shared key that must either be
+ * a buffer or `null` to stop the negotiation process. Returned PSK must be
+ * compatible with the selected cipher's digest.
+ *
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with the identity provided by the client.
+ * If the return value is `null` the negotiation process will stop and an
+ * "unknown_psk_identity" alert message will be sent to the other party.
+ * If the server wishes to hide the fact that the PSK identity was not known,
+ * the callback must provide some random data as `psk` to make the connection
+ * fail with "decrypt_error" before negotiation is finished.
+ * PSK ciphers are disabled by default, and using TLS-PSK thus
+ * requires explicitly specifying a cipher suite with the `ciphers` option.
+ * More information can be found in the RFC 4279.
+ */
+ pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null;
+ /**
+ * hint to send to a client to help
+ * with selecting the identity during TLS-PSK negotiation. Will be ignored
+ * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be
+ * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.
+ */
+ pskIdentityHint?: string | undefined;
+ }
+ interface PSKCallbackNegotation {
+ psk: DataView | NodeJS.TypedArray;
+ identity: string;
+ }
+ interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
+ host?: string | undefined;
+ port?: number | undefined;
+ path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
+ socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket
+ checkServerIdentity?: typeof checkServerIdentity | undefined;
+ servername?: string | undefined; // SNI TLS Extension
+ session?: Buffer | undefined;
+ minDHSize?: number | undefined;
+ lookup?: net.LookupFunction | undefined;
+ timeout?: number | undefined;
+ /**
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with optional identity `hint` provided by the server or `null`
+ * in case of TLS 1.3 where `hint` was removed.
+ * It will be necessary to provide a custom `tls.checkServerIdentity()`
+ * for the connection as the default one will try to check hostname/IP
+ * of the server against the certificate but that's not applicable for PSK
+ * because there won't be a certificate present.
+ * More information can be found in the RFC 4279.
+ *
+ * @param hint message sent from the server to help client
+ * decide which identity to use during negotiation.
+ * Always `null` if TLS 1.3 is used.
+ * @returns Return `null` to stop the negotiation process. `psk` must be
+ * compatible with the selected cipher's digest.
+ * `identity` must use UTF-8 encoding.
+ */
+ pskCallback?(hint: string | null): PSKCallbackNegotation | null;
+ }
+ /**
+ * Accepts encrypted connections using TLS or SSL.
+ * @since v0.3.2
+ */
+ class Server extends net.Server {
+ constructor(secureConnectionListener?: (socket: TLSSocket) => void);
+ constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void);
+ /**
+ * The `server.addContext()` method adds a secure context that will be used if
+ * the client request's SNI name matches the supplied `hostname` (or wildcard).
+ *
+ * When there are multiple matching contexts, the most recently added one is
+ * used.
+ * @since v0.5.3
+ * @param hostname A SNI host name or wildcard (e.g. `'*'`)
+ * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
+ */
+ addContext(hostname: string, context: SecureContextOptions): void;
+ /**
+ * Returns the session ticket keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @return A 48-byte buffer containing the session ticket keys.
+ */
+ getTicketKeys(): Buffer;
+ /**
+ * The `server.setSecureContext()` method replaces the secure context of an
+ * existing server. Existing connections to the server are not interrupted.
+ * @since v11.0.0
+ * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
+ */
+ setSecureContext(options: SecureContextOptions): void;
+ /**
+ * Sets the session ticket keys.
+ *
+ * Changes to the ticket keys are effective only for future server connections.
+ * Existing or currently pending server connections will use the previous keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @param keys A 48-byte buffer containing the session ticket keys.
+ */
+ setTicketKeys(keys: Buffer): void;
+ /**
+ * events.EventEmitter
+ * 1. tlsClientError
+ * 2. newSession
+ * 3. OCSPRequest
+ * 4. resumeSession
+ * 5. secureConnection
+ * 6. keylog
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: TLSSocket): boolean;
+ emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
+ emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: TLSSocket): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: TLSSocket): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ on(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ once(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ }
+ /**
+ * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
+ */
+ interface SecurePair {
+ encrypted: TLSSocket;
+ cleartext: TLSSocket;
+ }
+ type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
+ interface SecureContextOptions {
+ /**
+ * Optionally override the trusted CA certificates. Default is to trust
+ * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
+ * replaced when CAs are explicitly specified using this option.
+ */
+ ca?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Cert chains in PEM format. One cert chain should be provided per
+ * private key. Each cert chain should consist of the PEM formatted
+ * certificate for a provided private key, followed by the PEM
+ * formatted intermediate certificates (if any), in order, and not
+ * including the root CA (the root CA must be pre-known to the peer,
+ * see ca). When providing multiple cert chains, they do not have to
+ * be in the same order as their private keys in key. If the
+ * intermediate certificates are not provided, the peer will not be
+ * able to validate the certificate, and the handshake will fail.
+ */
+ cert?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Colon-separated list of supported signature algorithms. The list
+ * can contain digest algorithms (SHA256, MD5 etc.), public key
+ * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
+ * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
+ */
+ sigalgs?: string | undefined;
+ /**
+ * Cipher suite specification, replacing the default. For more
+ * information, see modifying the default cipher suite. Permitted
+ * ciphers can be obtained via tls.getCiphers(). Cipher names must be
+ * uppercased in order for OpenSSL to accept them.
+ */
+ ciphers?: string | undefined;
+ /**
+ * Name of an OpenSSL engine which can provide the client certificate.
+ */
+ clientCertEngine?: string | undefined;
+ /**
+ * PEM formatted CRLs (Certificate Revocation Lists).
+ */
+ crl?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Diffie Hellman parameters, required for Perfect Forward Secrecy. Use
+ * openssl dhparam to create the parameters. The key length must be
+ * greater than or equal to 1024 bits or else an error will be thrown.
+ * Although 1024 bits is permissible, use 2048 bits or larger for
+ * stronger security. If omitted or invalid, the parameters are
+ * silently discarded and DHE ciphers will not be available.
+ */
+ dhparam?: string | Buffer | undefined;
+ /**
+ * A string describing a named curve or a colon separated list of curve
+ * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
+ * agreement. Set to auto to select the curve automatically. Use
+ * crypto.getCurves() to obtain a list of available curve names. On
+ * recent releases, openssl ecparam -list_curves will also display the
+ * name and description of each available elliptic curve. Default:
+ * tls.DEFAULT_ECDH_CURVE.
+ */
+ ecdhCurve?: string | undefined;
+ /**
+ * Attempt to use the server's cipher suite preferences instead of the
+ * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
+ * set in secureOptions
+ */
+ honorCipherOrder?: boolean | undefined;
+ /**
+ * Private keys in PEM format. PEM allows the option of private keys
+ * being encrypted. Encrypted keys will be decrypted with
+ * options.passphrase. Multiple keys using different algorithms can be
+ * provided either as an array of unencrypted key strings or buffers,
+ * or an array of objects in the form {pem: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted keys will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ key?: string | Buffer | Array<string | Buffer | KeyObject> | undefined;
+ /**
+ * Name of an OpenSSL engine to get private key from. Should be used
+ * together with privateKeyIdentifier.
+ */
+ privateKeyEngine?: string | undefined;
+ /**
+ * Identifier of a private key managed by an OpenSSL engine. Should be
+ * used together with privateKeyEngine. Should not be set together with
+ * key, because both options define a private key in different ways.
+ */
+ privateKeyIdentifier?: string | undefined;
+ /**
+ * Optionally set the maximum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other.
+ * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using
+ * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
+ * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
+ */
+ maxVersion?: SecureVersion | undefined;
+ /**
+ * Optionally set the minimum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other. It is not recommended to use
+ * less than TLSv1.2, but it may be required for interoperability.
+ * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using
+ * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to
+ * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
+ */
+ minVersion?: SecureVersion | undefined;
+ /**
+ * Shared passphrase used for a single private key and/or a PFX.
+ */
+ passphrase?: string | undefined;
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain. pfx is an
+ * alternative to providing key and cert individually. PFX is usually
+ * encrypted, if it is, passphrase will be used to decrypt it. Multiple
+ * PFX can be provided either as an array of unencrypted PFX buffers,
+ * or an array of objects in the form {buf: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted PFX will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
+ /**
+ * Optionally affect the OpenSSL protocol behavior, which is not
+ * usually necessary. This should be used carefully if at all! Value is
+ * a numeric bitmask of the SSL_OP_* options from OpenSSL Options
+ */
+ secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options
+ /**
+ * Legacy mechanism to select the TLS protocol version to use, it does
+ * not support independent control of the minimum and maximum version,
+ * and does not support limiting the protocol to TLSv1.3. Use
+ * minVersion and maxVersion instead. The possible values are listed as
+ * SSL_METHODS, use the function names as strings. For example, use
+ * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow
+ * any TLS protocol version up to TLSv1.3. It is not recommended to use
+ * TLS versions less than 1.2, but it may be required for
+ * interoperability. Default: none, see minVersion.
+ */
+ secureProtocol?: string | undefined;
+ /**
+ * Opaque identifier used by servers to ensure session state is not
+ * shared between applications. Unused by clients.
+ */
+ sessionIdContext?: string | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ * See Session Resumption for more information.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ }
+ interface SecureContext {
+ context: any;
+ }
+ /**
+ * Verifies the certificate `cert` is issued to `hostname`.
+ *
+ * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on
+ * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).
+ *
+ * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as
+ * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead.
+ *
+ * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The
+ * overwriting function can call `tls.checkServerIdentity()` of course, to augment
+ * the checks done with additional verification.
+ *
+ * This function is only called if the certificate passed all other checks, such as
+ * being issued by trusted CA (`options.ca`).
+ *
+ * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name
+ * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use
+ * a custom`options.checkServerIdentity` function that implements the desired behavior.
+ * @since v0.8.4
+ * @param hostname The host name or IP address to verify the certificate against.
+ * @param cert A `certificate object` representing the peer's certificate.
+ */
+ function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined;
+ /**
+ * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is
+ * automatically set as a listener for the `'secureConnection'` event.
+ *
+ * The `ticketKeys` options is automatically shared between `cluster` module
+ * workers.
+ *
+ * The following illustrates a simple echo server:
+ *
+ * ```js
+ * const tls = require('tls');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem'),
+ *
+ * // This is necessary only if using client certificate authentication.
+ * requestCert: true,
+ *
+ * // This is necessary only if the client uses a self-signed certificate.
+ * ca: [ fs.readFileSync('client-cert.pem') ]
+ * };
+ *
+ * const server = tls.createServer(options, (socket) => {
+ * console.log('server connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * socket.write('welcome!\n');
+ * socket.setEncoding('utf8');
+ * socket.pipe(socket);
+ * });
+ * server.listen(8000, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * The server can be tested by connecting to it using the example client from {@link connect}.
+ * @since v0.3.2
+ */
+ function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ /**
+ * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event.
+ *
+ * `tls.connect()` returns a {@link TLSSocket} object.
+ *
+ * Unlike the `https` API, `tls.connect()` does not enable the
+ * SNI (Server Name Indication) extension by default, which may cause some
+ * servers to return an incorrect certificate or reject the connection
+ * altogether. To enable SNI, set the `servername` option in addition
+ * to `host`.
+ *
+ * The following illustrates a client for the echo server example from {@link createServer}:
+ *
+ * ```js
+ * // Assumes an echo server that is listening on port 8000.
+ * const tls = require('tls');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * // Necessary only if the server requires client certificate authentication.
+ * key: fs.readFileSync('client-key.pem'),
+ * cert: fs.readFileSync('client-cert.pem'),
+ *
+ * // Necessary only if the server uses a self-signed certificate.
+ * ca: [ fs.readFileSync('server-cert.pem') ],
+ *
+ * // Necessary only if the server's cert isn't for "localhost".
+ * checkServerIdentity: () => { return null; },
+ * };
+ *
+ * const socket = tls.connect(8000, options, () => {
+ * console.log('client connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * process.stdin.pipe(socket);
+ * process.stdin.resume();
+ * });
+ * socket.setEncoding('utf8');
+ * socket.on('data', (data) => {
+ * console.log(data);
+ * });
+ * socket.on('end', () => {
+ * console.log('server ends connection');
+ * });
+ * ```
+ * @since v0.11.3
+ */
+ function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ /**
+ * Creates a new secure pair object with two streams, one of which reads and writes
+ * the encrypted data and the other of which reads and writes the cleartext data.
+ * Generally, the encrypted stream is piped to/from an incoming encrypted data
+ * stream and the cleartext one is used as a replacement for the initial encrypted
+ * stream.
+ *
+ * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties.
+ *
+ * Using `cleartext` has the same API as {@link TLSSocket}.
+ *
+ * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code:
+ *
+ * ```js
+ * pair = tls.createSecurePair(// ... );
+ * pair.encrypted.pipe(socket);
+ * socket.pipe(pair.encrypted);
+ * ```
+ *
+ * can be replaced by:
+ *
+ * ```js
+ * secureSocket = tls.TLSSocket(socket, options);
+ * ```
+ *
+ * where `secureSocket` has the same API as `pair.cleartext`.
+ * @since v0.3.2
+ * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead.
+ * @param context A secure context object as returned by `tls.createSecureContext()`
+ * @param isServer `true` to specify that this TLS connection should be opened as a server.
+ * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
+ * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
+ */
+ function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
+ /**
+ * {@link createServer} sets the default value of the `honorCipherOrder` option
+ * to `true`, other APIs that create secure contexts leave it unset.
+ *
+ * {@link createServer} uses a 128 bit truncated SHA1 hash value generated
+ * from `process.argv` as the default value of the `sessionIdContext` option, other
+ * APIs that create secure contexts have no default value.
+ *
+ * The `tls.createSecureContext()` method creates a `SecureContext` object. It is
+ * usable as an argument to several `tls` APIs, such as {@link createServer} and `server.addContext()`, but has no public methods.
+ *
+ * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.
+ *
+ * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of
+ * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
+ * @since v0.11.13
+ */
+ function createSecureContext(options?: SecureContextOptions): SecureContext;
+ /**
+ * Returns an array with the names of the supported TLS ciphers. The names are
+ * lower-case for historical reasons, but must be uppercased to be used in
+ * the `ciphers` option of {@link createSecureContext}.
+ *
+ * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`.
+ *
+ * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
+ * TLSv1.2 and below.
+ *
+ * ```js
+ * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...]
+ * ```
+ * @since v0.10.2
+ */
+ function getCiphers(): string[];
+ /**
+ * The default curve name to use for ECDH key agreement in a tls server.
+ * The default value is 'auto'. See tls.createSecureContext() for further
+ * information.
+ */
+ let DEFAULT_ECDH_CURVE: string;
+ /**
+ * The default value of the maxVersion option of
+ * tls.createSecureContext(). It can be assigned any of the supported TLS
+ * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default:
+ * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets
+ * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the highest maximum
+ * is used.
+ */
+ let DEFAULT_MAX_VERSION: SecureVersion;
+ /**
+ * The default value of the minVersion option of tls.createSecureContext().
+ * It can be assigned any of the supported TLS protocol versions,
+ * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless
+ * changed using CLI options. Using --tls-min-v1.0 sets the default to
+ * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using
+ * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options
+ * are provided, the lowest minimum is used.
+ */
+ let DEFAULT_MIN_VERSION: SecureVersion;
+ /**
+ * An immutable array of strings representing the root certificates (in PEM
+ * format) used for verifying peer certificates. This is the default value
+ * of the ca option to tls.createSecureContext().
+ */
+ const rootCertificates: ReadonlyArray<string>;
+}
+declare module 'node:tls' {
+ export * from 'tls';
+}
diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts
new file mode 100755
index 0000000..d47aa93
--- /dev/null
+++ b/node_modules/@types/node/trace_events.d.ts
@@ -0,0 +1,171 @@
+/**
+ * The `trace_events` module provides a mechanism to centralize tracing information
+ * generated by V8, Node.js core, and userspace code.
+ *
+ * Tracing can be enabled with the `--trace-event-categories` command-line flag
+ * or by using the `trace_events` module. The `--trace-event-categories` flag
+ * accepts a list of comma-separated category names.
+ *
+ * The available categories are:
+ *
+ * * `node`: An empty placeholder.
+ * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data.
+ * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
+ * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
+ * * `node.console`: Enables capture of `console.time()` and `console.count()`output.
+ * * `node.dns.native`: Enables capture of trace data for DNS queries.
+ * * `node.environment`: Enables capture of Node.js Environment milestones.
+ * * `node.fs.sync`: Enables capture of trace data for file system sync methods.
+ * * `node.perf`: Enables capture of `Performance API` measurements.
+ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing
+ * measures and marks.
+ * * `node.perf.timerify`: Enables capture of only Performance API timerify
+ * measurements.
+ * * `node.promises.rejections`: Enables capture of trace data tracking the number
+ * of unhandled Promise rejections and handled-after-rejections.
+ * * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
+ * * `v8`: The `V8` events are GC, compiling, and execution related.
+ *
+ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
+ *
+ * ```bash
+ * node --trace-event-categories v8,node,node.async_hooks server.js
+ * ```
+ *
+ * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be
+ * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default.
+ *
+ * ```bash
+ * node --trace-events-enabled
+ *
+ * # is equivalent to
+ *
+ * node --trace-event-categories v8,node,node.async_hooks
+ * ```
+ *
+ * Alternatively, trace events may be enabled using the `trace_events` module:
+ *
+ * ```js
+ * const trace_events = require('trace_events');
+ * const tracing = trace_events.createTracing({ categories: ['node.perf'] });
+ * tracing.enable(); // Enable trace event capture for the 'node.perf' category
+ *
+ * // do work
+ *
+ * tracing.disable(); // Disable trace event capture for the 'node.perf' category
+ * ```
+ *
+ * Running Node.js with tracing enabled will produce log files that can be opened
+ * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
+ *
+ * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
+ * be specified with `--trace-event-file-pattern` that accepts a template
+ * string that supports `${rotation}` and `${pid}`:
+ *
+ * ```bash
+ * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
+ * ```
+ *
+ * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
+ * in your code, such as:
+ *
+ * ```js
+ * process.on('SIGINT', function onSigint() {
+ * console.info('Received SIGINT.');
+ * process.exit(130); // Or applicable exit code depending on OS and signal
+ * });
+ * ```
+ *
+ * The tracing system uses the same time source
+ * as the one used by `process.hrtime()`.
+ * However the trace-event timestamps are expressed in microseconds,
+ * unlike `process.hrtime()` which returns nanoseconds.
+ *
+ * The features from this module are not available in `Worker` threads.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js)
+ */
+declare module 'trace_events' {
+ /**
+ * The `Tracing` object is used to enable or disable tracing for sets of
+ * categories. Instances are created using the
+ * `trace_events.createTracing()` method.
+ *
+ * When created, the `Tracing` object is disabled. Calling the
+ * `tracing.enable()` method adds the categories to the set of enabled trace
+ * event categories. Calling `tracing.disable()` will remove the categories
+ * from the set of enabled trace event categories.
+ */
+ interface Tracing {
+ /**
+ * A comma-separated list of the trace event categories covered by this
+ * `Tracing` object.
+ */
+ readonly categories: string;
+ /**
+ * Disables this `Tracing` object.
+ *
+ * Only trace event categories _not_ covered by other enabled `Tracing`
+ * objects and _not_ specified by the `--trace-event-categories` flag
+ * will be disabled.
+ */
+ disable(): void;
+ /**
+ * Enables this `Tracing` object for the set of categories covered by
+ * the `Tracing` object.
+ */
+ enable(): void;
+ /**
+ * `true` only if the `Tracing` object has been enabled.
+ */
+ readonly enabled: boolean;
+ }
+ interface CreateTracingOptions {
+ /**
+ * An array of trace category names. Values included in the array are
+ * coerced to a string when possible. An error will be thrown if the
+ * value cannot be coerced.
+ */
+ categories: string[];
+ }
+ /**
+ * Creates and returns a `Tracing` object for the given set of `categories`.
+ *
+ * ```js
+ * const trace_events = require('trace_events');
+ * const categories = ['node.perf', 'node.async_hooks'];
+ * const tracing = trace_events.createTracing({ categories });
+ * tracing.enable();
+ * // do stuff
+ * tracing.disable();
+ * ```
+ * @since v10.0.0
+ * @return .
+ */
+ function createTracing(options: CreateTracingOptions): Tracing;
+ /**
+ * Returns a comma-separated list of all currently-enabled trace event
+ * categories. The current set of enabled trace event categories is determined
+ * by the _union_ of all currently-enabled `Tracing` objects and any categories
+ * enabled using the `--trace-event-categories` flag.
+ *
+ * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console.
+ *
+ * ```js
+ * const trace_events = require('trace_events');
+ * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
+ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });
+ * const t3 = trace_events.createTracing({ categories: ['v8'] });
+ *
+ * t1.enable();
+ * t2.enable();
+ *
+ * console.log(trace_events.getEnabledCategories());
+ * ```
+ * @since v10.0.0
+ */
+ function getEnabledCategories(): string | undefined;
+}
+declare module 'node:trace_events' {
+ export * from 'trace_events';
+}
diff --git a/node_modules/@types/node/ts4.8/assert.d.ts b/node_modules/@types/node/ts4.8/assert.d.ts
new file mode 100755
index 0000000..8e02a66
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/assert.d.ts
@@ -0,0 +1,911 @@
+/**
+ * The `assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
+ */
+declare module 'assert' {
+ /**
+ * An alias of {@link ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ namespace assert {
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `assert` module
+ * will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ actual: unknown;
+ expected: unknown;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string | undefined;
+ /** The `actual` property on the error instance. */
+ actual?: unknown | undefined;
+ /** The `expected` property on the error instance. */
+ expected?: unknown | undefined;
+ /** The `operator` property on the error instance. */
+ operator?: string | undefined;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function | undefined;
+ });
+ }
+ /**
+ * This feature is currently experimental and behavior might still change.
+ * @since v14.2.0, v12.19.0
+ * @experimental
+ */
+ class CallTracker {
+ /**
+ * The wrapper function is expected to be called exactly `exact` times. If the
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
+ * error.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func);
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @param [fn='A no-op function']
+ * @param [exact=1]
+ * @return that wraps `fn`.
+ */
+ calls(exact?: number): () => void;
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
+ /**
+ * The arrays contains information about the expected and actual number of calls of
+ * the functions that have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * function foo() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * // Returns an array containing information on callsfunc()
+ * tracker.report();
+ * // [
+ * // {
+ * // message: 'Expected the func function to be executed 2 time(s) but was
+ * // executed 0 time(s).',
+ * // actual: 0,
+ * // expected: 2,
+ * // operator: 'func',
+ * // stack: stack trace
+ * // }
+ * // ]
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @return of objects containing information about the wrapper functions returned by `calls`.
+ */
+ report(): CallTrackerReportInformation[];
+ /**
+ * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
+ * have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * callsfunc();
+ *
+ * // Will throw an error since callsfunc() was only called once.
+ * tracker.verify();
+ * ```
+ * @since v14.2.0, v12.19.0
+ */
+ verify(): void;
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ *
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
+ * See below for further details.
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: unknown,
+ expected: unknown,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function
+ ): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
+ * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2
+ * }
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj4 = Object.create(obj1);
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
+ * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text'
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text'
+ * }
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * }
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text'
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i
+ * }
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error'
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops'
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
+ * handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and`name` properties.
+ *
+ * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value'
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second
+ * argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
+ (value: unknown, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+ export = assert;
+}
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
diff --git a/node_modules/@types/node/ts4.8/assert/strict.d.ts b/node_modules/@types/node/ts4.8/assert/strict.d.ts
new file mode 100755
index 0000000..b4319b9
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/assert/strict.d.ts
@@ -0,0 +1,8 @@
+declare module 'assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
+declare module 'node:assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
diff --git a/node_modules/@types/node/ts4.8/async_hooks.d.ts b/node_modules/@types/node/ts4.8/async_hooks.d.ts
new file mode 100755
index 0000000..0bf4739
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/async_hooks.d.ts
@@ -0,0 +1,501 @@
+/**
+ * The `async_hooks` module provides an API to track asynchronous resources. It
+ * can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
+ */
+declare module 'async_hooks' {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'async_hooks';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on `promise execution tracking`.
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'fs';
+ * import { executionAsyncId, executionAsyncResource } from 'async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook
+ * } from 'async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * }
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on `promise execution tracking`.
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { }
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since v9.3.0)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
+ fn: Func,
+ type?: string,
+ thisArg?: ThisArg
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind<Func extends (...args: any[]) => any>(
+ fn: Func
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ *
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
+ * implementation that involves significant optimizations that are non-obvious to
+ * implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'http';
+ * import { AsyncLocalStorage } from 'async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 1: start
+ * // 0: finish
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other's data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage<T> {
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+}
+declare module 'node:async_hooks' {
+ export * from 'async_hooks';
+}
diff --git a/node_modules/@types/node/ts4.8/buffer.d.ts b/node_modules/@types/node/ts4.8/buffer.d.ts
new file mode 100755
index 0000000..13ab335
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/buffer.d.ts
@@ -0,0 +1,2238 @@
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value &#x26; 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js)
+ */
+declare module 'buffer' {
+ import { BinaryLike } from 'node:crypto';
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new (size: number): Buffer;
+ prototype: Buffer;
+ };
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { Buffer };
+ /**
+ * @experimental
+ */
+ export interface BlobOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * The Blob content-type. The intent is for `type` to convey
+ * the MIME media type of the data, however no validation of the type format
+ * is performed.
+ */
+ type?: string | undefined;
+ }
+ /**
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
+ * multiple worker threads.
+ * @since v15.7.0, v14.18.0
+ */
+ export class Blob {
+ /**
+ * The total size of the `Blob` in bytes.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly size: number;
+ /**
+ * The content-type of the `Blob`.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly type: string;
+ /**
+ * Creates a new `Blob` object containing a concatenation of the given sources.
+ *
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
+ *
+ * String sources are also copied into the `Blob`.
+ */
+ constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
+ /**
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
+ * the `Blob` data.
+ * @since v15.7.0, v14.18.0
+ */
+ arrayBuffer(): Promise<ArrayBuffer>;
+ /**
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
+ * data. The original `Blob` is not altered.
+ * @since v15.7.0, v14.18.0
+ * @param start The starting index.
+ * @param end The ending index.
+ * @param type The content-type for the new `Blob`
+ */
+ slice(start?: number, end?: number, type?: string): Blob;
+ /**
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
+ * UTF-8 string.
+ * @since v15.7.0, v14.18.0
+ */
+ text(): Promise<string>;
+ /**
+ * Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
+ * @since v16.7.0
+ */
+ stream(): unknown; // pending web streams types
+ }
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+ global {
+ // Buffer class
+ type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
+ type WithImplicitCoercion<T> =
+ | T
+ | {
+ valueOf(): T;
+ };
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new (str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new (size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: ReadonlyArray<any>): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new (buffer: Buffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: Uint8Array | ReadonlyArray<number>): Buffer;
+ from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): 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'.
+ */
+ from(
+ str:
+ | WithImplicitCoercion<string>
+ | {
+ [Symbol.toPrimitive](hint: 'string'): string;
+ },
+ encoding?: BufferEncoding
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints: <Buffer 00 00 00 00 ...>
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ <Buffer 30 31 32 33>, <Buffer 31 32 33 34> ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00>
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 61 61 61 61 61>
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
+ *
+ * buf.fill(0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ *
+ * The `Buffer` module pre-allocates an internal `Buffer` instance of
+ * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the
+ * deprecated`new Buffer(size)` constructor only when `size` is less than or equal
+ * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
+ *
+ * Use of this pre-allocated internal memory pool is a key difference between
+ * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+ * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+ * than or equal to half `Buffer.poolSize`. The
+ * difference is subtle but can be important when an application requires the
+ * additional performance that `Buffer.allocUnsafe()` provides.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created
+ * if `size` is 0.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * such `Buffer` instances with zeroes.
+ *
+ * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+ * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This
+ * allows applications to avoid the garbage collection overhead of creating many
+ * individually allocated `Buffer` instances. This approach improves both
+ * performance and memory usage by eliminating the need to track and clean up as
+ * many individual `ArrayBuffer` objects.
+ *
+ * However, in the case where a developer may need to retain a small chunk of
+ * memory from a pool for an indeterminate amount of time, it may be appropriate
+ * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+ * then copying out the relevant bits.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Need to keep around a few small chunks of memory.
+ * const store = [];
+ *
+ * socket.on('readable', () => {
+ * let data;
+ * while (null !== (data = readable.read())) {
+ * // Allocate for retained data.
+ * const sb = Buffer.allocUnsafeSlow(10);
+ *
+ * // Copy the data into the new allocation.
+ * data.copy(sb, 0, 0, 10);
+ *
+ * store.push(sb);
+ * }
+ * });
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.12.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+ * for pooling. This value may be modified.
+ * @since v0.11.3
+ */
+ poolSize: number;
+ }
+ interface Buffer extends Uint8Array {
+ /**
+ * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+ * not contain enough space to fit the entire string, only part of `string` will be
+ * written. However, partially encoded characters will not be written.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(256);
+ *
+ * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+ *
+ * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+ * // Prints: 12 bytes: ½ + ¼ = ¾
+ *
+ * const buffer = Buffer.alloc(10);
+ *
+ * const length = buffer.write('abcd', 8);
+ *
+ * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+ * // Prints: 2 bytes : ab
+ * ```
+ * @since v0.1.90
+ * @param string String to write to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+ * @param [encoding='utf8'] The character encoding of `string`.
+ * @return Number of bytes written.
+ */
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ /**
+ * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+ *
+ * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+ * then each invalid byte is replaced with the replacement character `U+FFFD`.
+ *
+ * The maximum length of a string instance (in UTF-16 code units) is available
+ * as {@link constants.MAX_STRING_LENGTH}.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * console.log(buf1.toString('utf8'));
+ * // Prints: abcdefghijklmnopqrstuvwxyz
+ * console.log(buf1.toString('utf8', 0, 5));
+ * // Prints: abcde
+ *
+ * const buf2 = Buffer.from('tést');
+ *
+ * console.log(buf2.toString('hex'));
+ * // Prints: 74c3a97374
+ * console.log(buf2.toString('utf8', 0, 3));
+ * // Prints: té
+ * console.log(buf2.toString(undefined, 0, 3));
+ * // Prints: té
+ * ```
+ * @since v0.1.90
+ * @param [encoding='utf8'] The character encoding to use.
+ * @param [start=0] The byte offset to start decoding at.
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+ */
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ /**
+ * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+ * this function when stringifying a `Buffer` instance.
+ *
+ * `Buffer.from()` accepts objects in the format returned from this method.
+ * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+ * const json = JSON.stringify(buf);
+ *
+ * console.log(json);
+ * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+ *
+ * const copy = JSON.parse(json, (key, value) => {
+ * return value &#x26;&#x26; value.type === 'Buffer' ?
+ * Buffer.from(value) :
+ * value;
+ * });
+ *
+ * console.log(copy);
+ * // Prints: <Buffer 01 02 03 04 05>
+ * ```
+ * @since v0.9.2
+ */
+ toJSON(): {
+ type: 'Buffer';
+ data: number[];
+ };
+ /**
+ * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('414243', 'hex');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.equals(buf2));
+ * // Prints: true
+ * console.log(buf1.equals(buf3));
+ * // Prints: false
+ * ```
+ * @since v0.11.13
+ * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ */
+ equals(otherBuffer: Uint8Array): boolean;
+ /**
+ * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+ * Comparison is based on the actual sequence of bytes in each `Buffer`.
+ *
+ * * `0` is returned if `target` is the same as `buf`
+ * * `1` is returned if `target` should come _before_`buf` when sorted.
+ * * `-1` is returned if `target` should come _after_`buf` when sorted.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('BCD');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.compare(buf1));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2));
+ * // Prints: -1
+ * console.log(buf1.compare(buf3));
+ * // Prints: -1
+ * console.log(buf2.compare(buf1));
+ * // Prints: 1
+ * console.log(buf2.compare(buf3));
+ * // Prints: 1
+ * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+ * // Prints: [ <Buffer 41 42 43>, <Buffer 41 42 43 44>, <Buffer 42 43 44> ]
+ * // (This result is equal to: [buf1, buf3, buf2].)
+ * ```
+ *
+ * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
+ *
+ * console.log(buf1.compare(buf2, 5, 9, 0, 4));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2, 0, 6, 4));
+ * // Prints: -1
+ * console.log(buf1.compare(buf2, 5, 6, 5));
+ * // Prints: 1
+ * ```
+ *
+ * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
+ * @since v0.11.13
+ * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ * @param [targetStart=0] The offset within `target` at which to begin comparison.
+ * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
+ * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
+ */
+ compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
+ /**
+ * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
+ *
+ * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
+ * for all TypedArrays, including Node.js `Buffer`s, although it takes
+ * different function arguments.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create two `Buffer` instances.
+ * const buf1 = Buffer.allocUnsafe(26);
+ * const buf2 = Buffer.allocUnsafe(26).fill('!');
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
+ * buf1.copy(buf2, 8, 16, 20);
+ * // This is equivalent to:
+ * // buf2.set(buf1.subarray(16, 20), 8);
+ *
+ * console.log(buf2.toString('ascii', 0, 25));
+ * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
+ * ```
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a `Buffer` and copy data from one region to an overlapping region
+ * // within the same `Buffer`.
+ *
+ * const buf = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf[i] = i + 97;
+ * }
+ *
+ * buf.copy(buf, 0, 4, 10);
+ *
+ * console.log(buf.toString());
+ * // Prints: efghijghijklmnopqrstuvwxyz
+ * ```
+ * @since v0.1.90
+ * @param target A `Buffer` or {@link Uint8Array} to copy into.
+ * @param [targetStart=0] The offset within `target` at which to begin writing.
+ * @param [sourceStart=0] The offset within `buf` from which to begin copying.
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
+ * @return The number of bytes copied.
+ */
+ copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * This method is not compatible with the `Uint8Array.prototype.slice()`,
+ * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * const copiedBuf = Uint8Array.prototype.slice.call(buf);
+ * copiedBuf[0]++;
+ * console.log(copiedBuf.toString());
+ * // Prints: cuffer
+ *
+ * console.log(buf.toString());
+ * // Prints: buffer
+ *
+ * // With buf.slice(), the original buffer is modified.
+ * const notReallyCopiedBuf = buf.slice();
+ * notReallyCopiedBuf[0]++;
+ * console.log(notReallyCopiedBuf.toString());
+ * // Prints: cuffer
+ * console.log(buf.toString());
+ * // Also prints: cuffer (!)
+ * ```
+ * @since v0.3.0
+ * @deprecated Use `subarray` instead.
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ slice(start?: number, end?: number): Buffer;
+ /**
+ * Returns a new `Buffer` that references the same memory as the original, but
+ * offset and cropped by the `start` and `end` indices.
+ *
+ * Specifying `end` greater than `buf.length` will return the same result as
+ * that of `end` equal to `buf.length`.
+ *
+ * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
+ *
+ * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
+ * // from the original `Buffer`.
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * const buf2 = buf1.subarray(0, 3);
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: abc
+ *
+ * buf1[0] = 33;
+ *
+ * console.log(buf2.toString('ascii', 0, buf2.length));
+ * // Prints: !bc
+ * ```
+ *
+ * Specifying negative indexes causes the slice to be generated relative to the
+ * end of `buf` rather than the beginning.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * console.log(buf.subarray(-6, -1).toString());
+ * // Prints: buffe
+ * // (Equivalent to buf.subarray(0, 5).)
+ *
+ * console.log(buf.subarray(-6, -2).toString());
+ * // Prints: buff
+ * // (Equivalent to buf.subarray(0, 4).)
+ *
+ * console.log(buf.subarray(-5, -2).toString());
+ * // Prints: uff
+ * // (Equivalent to buf.subarray(1, 4).)
+ * ```
+ * @since v3.0.0
+ * @param [start=0] Where the new `Buffer` will start.
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+ */
+ subarray(start?: number, end?: number): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64BE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigInt64LE(0x0102030405060708n, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigInt64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian.
+ *
+ * This function is also available under the `writeBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ca fa fe ca ce fa de>
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64BE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64BE(value: bigint, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de fa ce ca fe fa ca de>
+ * ```
+ *
+ * This function is also available under the `writeBigUint64LE` alias.
+ * @since v12.0.0, v10.20.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeBigUInt64LE(value: bigint, offset?: number): number;
+ /**
+ * @alias Buffer.writeBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ writeBigUint64LE(value: bigint, offset?: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than an unsigned integer.
+ *
+ * This function is also available under the `writeUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeUIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.writeUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUintBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+ * when `value` is anything other than a signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntLE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ab 90 78 56 34 12>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntLE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
+ * signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(6);
+ *
+ * buf.writeIntBE(0x1234567890ab, 0, 6);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 12 34 56 78 90 ab>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeIntBE(value: number, offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64BE(0));
+ * // Prints: 4294967295n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64BE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64BE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64BE(offset?: number): bigint;
+ /**
+ * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readBigUint64LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+ *
+ * console.log(buf.readBigUInt64LE(0));
+ * // Prints: 18446744069414584320n
+ * ```
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigUInt64LE(offset?: number): bigint;
+ /**
+ * @alias Buffer.readBigUInt64LE
+ * @since v14.10.0, v12.19.0
+ */
+ readBigUint64LE(offset?: number): bigint;
+ /**
+ * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64BE(offset?: number): bigint;
+ /**
+ * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed
+ * values.
+ * @since v12.0.0, v10.20.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+ */
+ readBigInt64LE(offset?: number): bigint;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintLE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntLE(0, 6).toString(16));
+ * // Prints: ab9078563412
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntLE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntLE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
+ * up to 48 bits of accuracy.
+ *
+ * This function is also available under the `readUintBE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readUIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readUIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readUIntBE(offset: number, byteLength: number): number;
+ /**
+ * @alias Buffer.readUIntBE
+ * @since v14.9.0, v12.19.0
+ */
+ readUintBE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntLE(0, 6).toString(16));
+ * // Prints: -546f87a9cbee
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntLE(offset: number, byteLength: number): number;
+ /**
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
+ * supporting up to 48 bits of accuracy.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+ *
+ * console.log(buf.readIntBE(0, 6).toString(16));
+ * // Prints: 1234567890ab
+ * console.log(buf.readIntBE(1, 6).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * console.log(buf.readIntBE(1, 0).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+ * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+ */
+ readIntBE(offset: number, byteLength: number): number;
+ /**
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
+ *
+ * This function is also available under the `readUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, -2]);
+ *
+ * console.log(buf.readUInt8(0));
+ * // Prints: 1
+ * console.log(buf.readUInt8(1));
+ * // Prints: 254
+ * console.log(buf.readUInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readUInt8(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ readUint8(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16LE(0).toString(16));
+ * // Prints: 3412
+ * console.log(buf.readUInt16LE(1).toString(16));
+ * // Prints: 5634
+ * console.log(buf.readUInt16LE(2).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56]);
+ *
+ * console.log(buf.readUInt16BE(0).toString(16));
+ * // Prints: 1234
+ * console.log(buf.readUInt16BE(1).toString(16));
+ * // Prints: 3456
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readUInt16BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint16BE(offset?: number): number;
+ /**
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32LE(0).toString(16));
+ * // Prints: 78563412
+ * console.log(buf.readUInt32LE(1).toString(16));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32LE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32LE(offset?: number): number;
+ /**
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * This function is also available under the `readUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+ *
+ * console.log(buf.readUInt32BE(0).toString(16));
+ * // Prints: 12345678
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readUInt32BE(offset?: number): number;
+ /**
+ * @alias Buffer.readUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ readUint32BE(offset?: number): number;
+ /**
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([-1, 5]);
+ *
+ * console.log(buf.readInt8(0));
+ * // Prints: -1
+ * console.log(buf.readInt8(1));
+ * // Prints: 5
+ * console.log(buf.readInt8(2));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.0
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+ */
+ readInt8(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16LE(0));
+ * // Prints: 1280
+ * console.log(buf.readInt16LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 5]);
+ *
+ * console.log(buf.readInt16BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+ */
+ readInt16BE(offset?: number): number;
+ /**
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32LE(0));
+ * // Prints: 83886080
+ * console.log(buf.readInt32LE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32LE(offset?: number): number;
+ /**
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
+ *
+ * Integers read from a `Buffer` are interpreted as two's complement signed values.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0, 0, 0, 5]);
+ *
+ * console.log(buf.readInt32BE(0));
+ * // Prints: 5
+ * ```
+ * @since v0.5.5
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readInt32BE(offset?: number): number;
+ /**
+ * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatLE(0));
+ * // Prints: 1.539989614439558e-36
+ * console.log(buf.readFloatLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatLE(offset?: number): number;
+ /**
+ * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4]);
+ *
+ * console.log(buf.readFloatBE(0));
+ * // Prints: 2.387939260590663e-38
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+ */
+ readFloatBE(offset?: number): number;
+ /**
+ * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleLE(0));
+ * // Prints: 5.447603722011605e-270
+ * console.log(buf.readDoubleLE(1));
+ * // Throws ERR_OUT_OF_RANGE.
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleLE(offset?: number): number;
+ /**
+ * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+ *
+ * console.log(buf.readDoubleBE(0));
+ * // Prints: 8.20788039913184e-304
+ * ```
+ * @since v0.11.15
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+ */
+ readDoubleBE(offset?: number): number;
+ reverse(): this;
+ /**
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap16();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 02 01 04 03 06 05 08 07>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap16();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ *
+ * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
+ * between UTF-16 little-endian and UTF-16 big-endian:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
+ * buf.swap16(); // Convert to big-endian UTF-16 text.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap16(): Buffer;
+ /**
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
+ * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap32();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 04 03 02 01 08 07 06 05>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap32();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v5.10.0
+ * @return A reference to `buf`.
+ */
+ swap32(): Buffer;
+ /**
+ * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
+ * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+ *
+ * buf1.swap64();
+ *
+ * console.log(buf1);
+ * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+ *
+ * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+ *
+ * buf2.swap64();
+ * // Throws ERR_INVALID_BUFFER_SIZE.
+ * ```
+ * @since v6.3.0
+ * @return A reference to `buf`.
+ */
+ swap64(): Buffer;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a
+ * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
+ * other than an unsigned 8-bit integer.
+ *
+ * This function is also available under the `writeUint8` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt8(0x3, 0);
+ * buf.writeUInt8(0x4, 1);
+ * buf.writeUInt8(0x23, 2);
+ * buf.writeUInt8(0x42, 3);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 03 04 23 42>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt8(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt8
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16LE(0xdead, 0);
+ * buf.writeUInt16LE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ad de ef be>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 16-bit integer.
+ *
+ * This function is also available under the `writeUint16BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt16BE(0xdead, 0);
+ * buf.writeUInt16BE(0xbeef, 2);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer de ad be ef>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt16BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt16BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
+ * anything other than an unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32LE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32LE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer ce fa ed fe>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32LE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32LE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
+ * unsigned 32-bit integer.
+ *
+ * This function is also available under the `writeUint32BE` alias.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeUInt32BE(0xfeedface, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer fe ed fa ce>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeUInt32BE(value: number, offset?: number): number;
+ /**
+ * @alias Buffer.writeUInt32BE
+ * @since v14.9.0, v12.19.0
+ */
+ writeUint32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
+ * signed 8-bit integer. Behavior is undefined when `value` is anything other than
+ * a signed 8-bit integer.
+ *
+ * `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt8(2, 0);
+ * buf.writeInt8(-2, 1);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 02 fe>
+ * ```
+ * @since v0.5.0
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt8(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16LE(0x0304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 04 03>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 16-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(2);
+ *
+ * buf.writeInt16BE(0x0102, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt16BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32LE(0x05060708, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 08 07 06 05>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32LE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+ * anything other than a signed 32-bit integer.
+ *
+ * The `value` is interpreted and written as a two's complement signed integer.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeInt32BE(0x01020304, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 01 02 03 04>
+ * ```
+ * @since v0.5.5
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeInt32BE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatLE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer bb fe 4a 4f>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
+ * undefined when `value` is anything other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(4);
+ *
+ * buf.writeFloatBE(0xcafebabe, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 4f 4a fe bb>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeFloatBE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleLE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 77 be 9f 1a 2f dd 5e 40>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleLE(value: number, offset?: number): number;
+ /**
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
+ * other than a JavaScript number.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(8);
+ *
+ * buf.writeDoubleBE(123.456, 0);
+ *
+ * console.log(buf);
+ * // Prints: <Buffer 40 5e dd 2f 1a 9f be 77>
+ * ```
+ * @since v0.11.15
+ * @param value Number to be written to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+ * @return `offset` plus the number of bytes written.
+ */
+ writeDoubleBE(value: number, offset?: number): number;
+ /**
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+ * the entire `buf` will be filled:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Fill a `Buffer` with the ASCII character 'h'.
+ *
+ * const b = Buffer.allocUnsafe(50).fill('h');
+ *
+ * console.log(b.toString());
+ * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+ * ```
+ *
+ * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+ * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+ * filled with `value &#x26; 255`.
+ *
+ * If the final write of a `fill()` operation falls on a multi-byte character,
+ * then only the bytes of that character that fit into `buf` are written:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
+ *
+ * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
+ * // Prints: <Buffer c8 a2 c8 a2 c8>
+ * ```
+ *
+ * If `value` contains invalid characters, it is truncated; if no valid
+ * fill data remains, an exception is thrown:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(5);
+ *
+ * console.log(buf.fill('a'));
+ * // Prints: <Buffer 61 61 61 61 61>
+ * console.log(buf.fill('aazz', 'hex'));
+ * // Prints: <Buffer aa aa aa aa aa>
+ * console.log(buf.fill('zz', 'hex'));
+ * // Throws an exception.
+ * ```
+ * @since v0.5.0
+ * @param value The value with which to fill `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
+ * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
+ * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
+ * @return A reference to `buf`.
+ */
+ fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+ /**
+ * If `value` is:
+ *
+ * * a string, `value` is interpreted according to the character encoding in`encoding`.
+ * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
+ * To compare a partial `Buffer`, use `buf.subarray`.
+ * * a number, `value` will be interpreted as an unsigned 8-bit integer
+ * value between `0` and `255`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.indexOf('this'));
+ * // Prints: 0
+ * console.log(buf.indexOf('is'));
+ * // Prints: 2
+ * console.log(buf.indexOf(Buffer.from('a buffer')));
+ * // Prints: 8
+ * console.log(buf.indexOf(97));
+ * // Prints: 8 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.indexOf(Buffer.from('a buffer example')));
+ * // Prints: -1
+ * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: 8
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
+ * // Prints: 4
+ * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
+ * // Prints: 6
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. If the result
+ * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
+ * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.indexOf(99.9));
+ * console.log(b.indexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN or 0.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.indexOf('b', undefined));
+ * console.log(b.indexOf('b', {}));
+ * console.log(b.indexOf('b', null));
+ * console.log(b.indexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
+ * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
+ * @since v1.5.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
+ * rather than the first occurrence.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this buffer is a buffer');
+ *
+ * console.log(buf.lastIndexOf('this'));
+ * // Prints: 0
+ * console.log(buf.lastIndexOf('buffer'));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(Buffer.from('buffer')));
+ * // Prints: 17
+ * console.log(buf.lastIndexOf(97));
+ * // Prints: 15 (97 is the decimal ASCII value for 'a')
+ * console.log(buf.lastIndexOf(Buffer.from('yolo')));
+ * // Prints: -1
+ * console.log(buf.lastIndexOf('buffer', 5));
+ * // Prints: 5
+ * console.log(buf.lastIndexOf('buffer', 4));
+ * // Prints: -1
+ *
+ * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+ *
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
+ * // Prints: 6
+ * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
+ * // Prints: 4
+ * ```
+ *
+ * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+ * an integer between 0 and 255.
+ *
+ * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
+ * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
+ * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const b = Buffer.from('abcdef');
+ *
+ * // Passing a value that's a number, but not a valid byte.
+ * // Prints: 2, equivalent to searching for 99 or 'c'.
+ * console.log(b.lastIndexOf(99.9));
+ * console.log(b.lastIndexOf(256 + 99));
+ *
+ * // Passing a byteOffset that coerces to NaN.
+ * // Prints: 1, searching the whole buffer.
+ * console.log(b.lastIndexOf('b', undefined));
+ * console.log(b.lastIndexOf('b', {}));
+ *
+ * // Passing a byteOffset that coerces to 0.
+ * // Prints: -1, equivalent to passing 0.
+ * console.log(b.lastIndexOf('b', null));
+ * console.log(b.lastIndexOf('b', []));
+ * ```
+ *
+ * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
+ * @since v6.0.0
+ * @param value What to search for.
+ * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+ * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+ */
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
+ * of `buf`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Log the entire contents of a `Buffer`.
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const pair of buf.entries()) {
+ * console.log(pair);
+ * }
+ * // Prints:
+ * // [0, 98]
+ * // [1, 117]
+ * // [2, 102]
+ * // [3, 102]
+ * // [4, 101]
+ * // [5, 114]
+ * ```
+ * @since v1.1.0
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Equivalent to `buf.indexOf() !== -1`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('this is a buffer');
+ *
+ * console.log(buf.includes('this'));
+ * // Prints: true
+ * console.log(buf.includes('is'));
+ * // Prints: true
+ * console.log(buf.includes(Buffer.from('a buffer')));
+ * // Prints: true
+ * console.log(buf.includes(97));
+ * // Prints: true (97 is the decimal ASCII value for 'a')
+ * console.log(buf.includes(Buffer.from('a buffer example')));
+ * // Prints: false
+ * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
+ * // Prints: true
+ * console.log(buf.includes('this', 4));
+ * // Prints: false
+ * ```
+ * @since v5.3.0
+ * @param value What to search for.
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+ * @param [encoding='utf8'] If `value` is a string, this is its encoding.
+ * @return `true` if `value` was found in `buf`, `false` otherwise.
+ */
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const key of buf.keys()) {
+ * console.log(key);
+ * }
+ * // Prints:
+ * // 0
+ * // 1
+ * // 2
+ * // 3
+ * // 4
+ * // 5
+ * ```
+ * @since v1.1.0
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
+ * called automatically when a `Buffer` is used in a `for..of` statement.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from('buffer');
+ *
+ * for (const value of buf.values()) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ *
+ * for (const value of buf) {
+ * console.log(value);
+ * }
+ * // Prints:
+ * // 98
+ * // 117
+ * // 102
+ * // 102
+ * // 101
+ * // 114
+ * ```
+ * @since v1.1.0
+ */
+ values(): IterableIterator<number>;
+ }
+ var Buffer: BufferConstructor;
+ /**
+ * Decodes a string of Base64-encoded data into bytes, and encodes those bytes
+ * into a string using Latin-1 (ISO-8859-1).
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @deprecated Use `Buffer.from(data, 'base64')` instead.
+ * @param data The Base64-encoded input string.
+ */
+ function atob(data: string): string;
+ /**
+ * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
+ * into a string using Base64.
+ *
+ * The `data` may be any JavaScript-value that can be coerced into a string.
+ *
+ * **This function is only provided for compatibility with legacy web platform APIs**
+ * **and should never be used in new code, because they use strings to represent**
+ * **binary data and predate the introduction of typed arrays in JavaScript.**
+ * **For code running using Node.js APIs, converting between base64-encoded strings**
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
+ * @since v15.13.0, v14.17.0
+ * @deprecated Use `buf.toString('base64')` instead.
+ * @param data An ASCII (Latin1) string.
+ */
+ function btoa(data: string): string;
+ }
+}
+declare module 'node:buffer' {
+ export * from 'buffer';
+}
diff --git a/node_modules/@types/node/ts4.8/child_process.d.ts b/node_modules/@types/node/ts4.8/child_process.d.ts
new file mode 100755
index 0000000..79c7290
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/child_process.d.ts
@@ -0,0 +1,1369 @@
+/**
+ * The `child_process` module provides the ability to spawn subprocesses in
+ * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
+ * is primarily provided by the {@link spawn} function:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
+ * the parent Node.js process and the spawned subprocess. These pipes have
+ * limited (and platform-specific) capacity. If the subprocess writes to
+ * stdout in excess of that limit without the output being captured, the
+ * subprocess blocks waiting for the pipe buffer to accept more data. This is
+ * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
+ *
+ * The command lookup is performed using the `options.env.PATH` environment
+ * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
+ * used. If `options.env` is set without `PATH`, lookup on Unix is performed
+ * on a default search path search of `/usr/bin:/bin` (see your operating system's
+ * manual for execvpe/execvp), on Windows the current processes environment
+ * variable `PATH` is used.
+ *
+ * On Windows, environment variables are case-insensitive. Node.js
+ * lexicographically sorts the `env` keys and uses the first one that
+ * case-insensitively matches. Only first (in lexicographic order) entry will be
+ * passed to the subprocess. This might lead to issues on Windows when passing
+ * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`.
+ *
+ * The {@link spawn} method spawns the child process asynchronously,
+ * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
+ * the event loop until the spawned process either exits or is terminated.
+ *
+ * For convenience, the `child_process` module provides a handful of synchronous
+ * and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
+ * top of {@link spawn} or {@link spawnSync}.
+ *
+ * * {@link exec}: spawns a shell and runs a command within that
+ * shell, passing the `stdout` and `stderr` to a callback function when
+ * complete.
+ * * {@link execFile}: similar to {@link exec} except
+ * that it spawns the command directly without first spawning a shell by
+ * default.
+ * * {@link fork}: spawns a new Node.js process and invokes a
+ * specified module with an IPC communication channel established that allows
+ * sending messages between parent and child.
+ * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
+ * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
+ *
+ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
+ * the synchronous methods can have significant impact on performance due to
+ * stalling the event loop while spawned processes complete.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/child_process.js)
+ */
+declare module 'child_process' {
+ import { ObjectEncodingOptions } from 'node:fs';
+ import { EventEmitter, Abortable } from 'node:events';
+ import * as net from 'node:net';
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
+ import { URL } from 'node:url';
+ type Serializable = string | object | number | boolean | bigint;
+ type SendHandle = net.Socket | net.Server;
+ /**
+ * Instances of the `ChildProcess` represent spawned child processes.
+ *
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
+ * instances of `ChildProcess`.
+ * @since v2.2.0
+ */
+ class ChildProcess extends EventEmitter {
+ /**
+ * A `Writable Stream` that represents the child process's `stdin`.
+ *
+ * If a child process waits to read all of its input, the child will not continue
+ * until this stream has been closed via `end()`.
+ *
+ * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stdin` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdin: Writable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stdout`.
+ *
+ * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
+ * refer to the same value.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn('ls');
+ *
+ * subprocess.stdout.on('data', (data) => {
+ * console.log(`Received chunk ${data}`);
+ * });
+ * ```
+ *
+ * The `subprocess.stdout` property can be `null` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stdout: Readable | null;
+ /**
+ * A `Readable Stream` that represents the child process's `stderr`.
+ *
+ * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
+ * then this will be `null`.
+ *
+ * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
+ * refer to the same value.
+ *
+ * The `subprocess.stderr` property can be `null` if the child process could
+ * not be successfully spawned.
+ * @since v0.1.90
+ */
+ stderr: Readable | null;
+ /**
+ * The `subprocess.channel` property is a reference to the child's IPC channel. If
+ * no IPC channel currently exists, this property is `undefined`.
+ * @since v7.1.0
+ */
+ readonly channel?: Pipe | null | undefined;
+ /**
+ * A sparse array of pipes to the child process, corresponding with positions in
+ * the `stdio` option passed to {@link spawn} that have been set
+ * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`,
+ * respectively.
+ *
+ * In the following example, only the child's fd `1` (stdout) is configured as a
+ * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
+ * in the array are `null`.
+ *
+ * ```js
+ * const assert = require('assert');
+ * const fs = require('fs');
+ * const child_process = require('child_process');
+ *
+ * const subprocess = child_process.spawn('ls', {
+ * stdio: [
+ * 0, // Use parent's stdin for child.
+ * 'pipe', // Pipe child's stdout to parent.
+ * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
+ * ]
+ * });
+ *
+ * assert.strictEqual(subprocess.stdio[0], null);
+ * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
+ *
+ * assert(subprocess.stdout);
+ * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
+ *
+ * assert.strictEqual(subprocess.stdio[2], null);
+ * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
+ * ```
+ *
+ * The `subprocess.stdio` property can be `undefined` if the child process could
+ * not be successfully spawned.
+ * @since v0.7.10
+ */
+ readonly stdio: [
+ Writable | null,
+ // stdin
+ Readable | null,
+ // stdout
+ Readable | null,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra
+ Readable | Writable | null | undefined // extra
+ ];
+ /**
+ * The `subprocess.killed` property indicates whether the child process
+ * successfully received a signal from `subprocess.kill()`. The `killed` property
+ * does not indicate that the child process has been terminated.
+ * @since v0.5.10
+ */
+ readonly killed: boolean;
+ /**
+ * Returns the process identifier (PID) of the child process. If the child process
+ * fails to spawn due to errors, then the value is `undefined` and `error` is
+ * emitted.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * console.log(`Spawned child pid: ${grep.pid}`);
+ * grep.stdin.end();
+ * ```
+ * @since v0.1.90
+ */
+ readonly pid?: number | undefined;
+ /**
+ * The `subprocess.connected` property indicates whether it is still possible to
+ * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages.
+ * @since v0.7.2
+ */
+ readonly connected: boolean;
+ /**
+ * The `subprocess.exitCode` property indicates the exit code of the child process.
+ * If the child process is still running, the field will be `null`.
+ */
+ readonly exitCode: number | null;
+ /**
+ * The `subprocess.signalCode` property indicates the signal received by
+ * the child process if any, else `null`.
+ */
+ readonly signalCode: NodeJS.Signals | null;
+ /**
+ * The `subprocess.spawnargs` property represents the full list of command-line
+ * arguments the child process was launched with.
+ */
+ readonly spawnargs: string[];
+ /**
+ * The `subprocess.spawnfile` property indicates the executable file name of
+ * the child process that is launched.
+ *
+ * For {@link fork}, its value will be equal to `process.execPath`.
+ * For {@link spawn}, its value will be the name of
+ * the executable file.
+ * For {@link exec}, its value will be the name of the shell
+ * in which the child process is launched.
+ */
+ readonly spawnfile: string;
+ /**
+ * The `subprocess.kill()` method sends a signal to the child process. If no
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * grep.on('close', (code, signal) => {
+ * console.log(
+ * `child process terminated due to receipt of signal ${signal}`);
+ * });
+ *
+ * // Send SIGHUP to process.
+ * grep.kill('SIGHUP');
+ * ```
+ *
+ * The `ChildProcess` object may emit an `'error'` event if the signal
+ * cannot be delivered. Sending a signal to a child process that has already exited
+ * is not an error but may have unforeseen consequences. Specifically, if the
+ * process identifier (PID) has been reassigned to another process, the signal will
+ * be delivered to that process instead which can have unexpected results.
+ *
+ * While the function is called `kill`, the signal delivered to the child process
+ * may not actually terminate the process.
+ *
+ * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
+ *
+ * On Windows, where POSIX signals do not exist, the `signal` argument will be
+ * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`).
+ * See `Signal Events` for more details.
+ *
+ * On Linux, child processes of child processes will not be terminated
+ * when attempting to kill their parent. This is likely to happen when running a
+ * new process in a shell or with the use of the `shell` option of `ChildProcess`:
+ *
+ * ```js
+ * 'use strict';
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(
+ * 'sh',
+ * [
+ * '-c',
+ * `node -e "setInterval(() => {
+ * console.log(process.pid, 'is alive')
+ * }, 500);"`,
+ * ], {
+ * stdio: ['inherit', 'inherit', 'inherit']
+ * }
+ * );
+ *
+ * setTimeout(() => {
+ * subprocess.kill(); // Does not terminate the Node.js process in the shell.
+ * }, 2000);
+ * ```
+ * @since v0.1.90
+ */
+ kill(signal?: NodeJS.Signals | number): boolean;
+ /**
+ * When an IPC channel has been established between the parent and child (
+ * i.e. when using {@link fork}), the `subprocess.send()` method can
+ * be used to send messages to the child process. When the child process is a
+ * Node.js instance, these messages can be received via the `'message'` event.
+ *
+ * The message goes through serialization and parsing. The resulting
+ * message might not be the same as what is originally sent.
+ *
+ * For example, in the parent script:
+ *
+ * ```js
+ * const cp = require('child_process');
+ * const n = cp.fork(`${__dirname}/sub.js`);
+ *
+ * n.on('message', (m) => {
+ * console.log('PARENT got message:', m);
+ * });
+ *
+ * // Causes the child to print: CHILD got message: { hello: 'world' }
+ * n.send({ hello: 'world' });
+ * ```
+ *
+ * And then the child script, `'sub.js'` might look like this:
+ *
+ * ```js
+ * process.on('message', (m) => {
+ * console.log('CHILD got message:', m);
+ * });
+ *
+ * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
+ * process.send({ foo: 'bar', baz: NaN });
+ * ```
+ *
+ * Child Node.js processes will have a `process.send()` method of their own
+ * that allows the child to send messages back to the parent.
+ *
+ * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
+ * containing a `NODE_` prefix in the `cmd` property are reserved for use within
+ * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js.
+ * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice.
+ *
+ * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
+ * for passing a TCP server or socket object to the child process. The child will
+ * receive the object as the second argument passed to the callback function
+ * registered on the `'message'` event. Any data that is received
+ * and buffered in the socket will not be sent to the child.
+ *
+ * The optional `callback` is a function that is invoked after the message is
+ * sent but before the child may have received it. The function is called with a
+ * single argument: `null` on success, or an `Error` object on failure.
+ *
+ * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can
+ * happen, for instance, when the child process has already exited.
+ *
+ * `subprocess.send()` will return `false` if the channel has closed or when the
+ * backlog of unsent messages exceeds a threshold that makes it unwise to send
+ * more. Otherwise, the method returns `true`. The `callback` function can be
+ * used to implement flow control.
+ *
+ * #### Example: sending a server object
+ *
+ * The `sendHandle` argument can be used, for instance, to pass the handle of
+ * a TCP server object to the child process as illustrated in the example below:
+ *
+ * ```js
+ * const subprocess = require('child_process').fork('subprocess.js');
+ *
+ * // Open up the server object and send the handle.
+ * const server = require('net').createServer();
+ * server.on('connection', (socket) => {
+ * socket.end('handled by parent');
+ * });
+ * server.listen(1337, () => {
+ * subprocess.send('server', server);
+ * });
+ * ```
+ *
+ * The child would then receive the server object as:
+ *
+ * ```js
+ * process.on('message', (m, server) => {
+ * if (m === 'server') {
+ * server.on('connection', (socket) => {
+ * socket.end('handled by child');
+ * });
+ * }
+ * });
+ * ```
+ *
+ * Once the server is now shared between the parent and child, some connections
+ * can be handled by the parent and some by the child.
+ *
+ * While the example above uses a server created using the `net` module, `dgram`module servers use exactly the same workflow with the exceptions of listening on
+ * a `'message'` event instead of `'connection'` and using `server.bind()` instead
+ * of `server.listen()`. This is, however, currently only supported on Unix
+ * platforms.
+ *
+ * #### Example: sending a socket object
+ *
+ * Similarly, the `sendHandler` argument can be used to pass the handle of a
+ * socket to the child process. The example below spawns two children that each
+ * handle connections with "normal" or "special" priority:
+ *
+ * ```js
+ * const { fork } = require('child_process');
+ * const normal = fork('subprocess.js', ['normal']);
+ * const special = fork('subprocess.js', ['special']);
+ *
+ * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
+ * // the sockets from being read before they are sent to the child process.
+ * const server = require('net').createServer({ pauseOnConnect: true });
+ * server.on('connection', (socket) => {
+ *
+ * // If this is special priority...
+ * if (socket.remoteAddress === '74.125.127.100') {
+ * special.send('socket', socket);
+ * return;
+ * }
+ * // This is normal priority.
+ * normal.send('socket', socket);
+ * });
+ * server.listen(1337);
+ * ```
+ *
+ * The `subprocess.js` would receive the socket handle as the second argument
+ * passed to the event callback function:
+ *
+ * ```js
+ * process.on('message', (m, socket) => {
+ * if (m === 'socket') {
+ * if (socket) {
+ * // Check that the client socket exists.
+ * // It is possible for the socket to be closed between the time it is
+ * // sent and the time it is received in the child process.
+ * socket.end(`Request handled with ${process.argv[2]} priority`);
+ * }
+ * }
+ * });
+ * ```
+ *
+ * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
+ * The parent cannot track when the socket is destroyed.
+ *
+ * Any `'message'` handlers in the subprocess should verify that `socket` exists,
+ * as the connection may have been closed during the time it takes to send the
+ * connection to the child.
+ * @since v0.5.9
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * Closes the IPC channel between parent and child, allowing the child to exit
+ * gracefully once there are no other connections keeping it alive. After calling
+ * this method the `subprocess.connected` and `process.connected` properties in
+ * both the parent and child (respectively) will be set to `false`, and it will be
+ * no longer possible to pass messages between the processes.
+ *
+ * The `'disconnect'` event will be emitted when there are no messages in the
+ * process of being received. This will most often be triggered immediately after
+ * calling `subprocess.disconnect()`.
+ *
+ * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
+ * within the child process to close the IPC channel as well.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * By default, the parent will wait for the detached child to exit. To prevent the
+ * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not
+ * include the child in its reference count, allowing the parent to exit
+ * independently of the child, unless there is an established IPC channel between
+ * the child and the parent.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore'
+ * });
+ *
+ * subprocess.unref();
+ * ```
+ * @since v0.7.10
+ */
+ unref(): void;
+ /**
+ * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
+ * restore the removed reference count for the child process, forcing the parent
+ * to wait for the child to exit before exiting itself.
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ *
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+ * detached: true,
+ * stdio: 'ignore'
+ * });
+ *
+ * subprocess.unref();
+ * subprocess.ref();
+ * ```
+ * @since v0.7.10
+ */
+ ref(): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. disconnect
+ * 3. error
+ * 4. exit
+ * 5. message
+ * 6. spawn
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ addListener(event: 'spawn', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean;
+ emit(event: 'spawn', listener: () => void): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ on(event: 'spawn', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ once(event: 'spawn', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependListener(event: 'spawn', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ prependOnceListener(event: 'spawn', listener: () => void): this;
+ }
+ // return this object when stdio option is undefined or not specified
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
+ stdin: Writable;
+ stdout: Readable;
+ stderr: Readable;
+ readonly stdio: [
+ Writable,
+ Readable,
+ Readable,
+ // stderr
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ // return this object when stdio option is a tuple of 3
+ interface ChildProcessByStdio<I extends null | Writable, O extends null | Readable, E extends null | Readable> extends ChildProcess {
+ stdin: I;
+ stdout: O;
+ stderr: E;
+ readonly stdio: [
+ I,
+ O,
+ E,
+ Readable | Writable | null | undefined,
+ // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+ interface MessageOptions {
+ keepOpen?: boolean | undefined;
+ }
+ type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit';
+ type StdioOptions = IOType | Array<IOType | 'ipc' | Stream | number | null | undefined>;
+ type SerializationType = 'json' | 'advanced';
+ interface MessagingOptions extends Abortable {
+ /**
+ * Specify the kind of serialization used for sending messages between processes.
+ * @default 'json'
+ */
+ serialization?: SerializationType | undefined;
+ /**
+ * The signal value to be used when the spawned process will be killed by the abort signal.
+ * @default 'SIGTERM'
+ */
+ killSignal?: NodeJS.Signals | number | undefined;
+ /**
+ * In milliseconds the maximum amount of time the process is allowed to run.
+ */
+ timeout?: number | undefined;
+ }
+ interface ProcessEnvOptions {
+ uid?: number | undefined;
+ gid?: number | undefined;
+ cwd?: string | URL | undefined;
+ env?: NodeJS.ProcessEnv | undefined;
+ }
+ interface CommonOptions extends ProcessEnvOptions {
+ /**
+ * @default true
+ */
+ windowsHide?: boolean | undefined;
+ /**
+ * @default 0
+ */
+ timeout?: number | undefined;
+ }
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
+ argv0?: string | undefined;
+ stdio?: StdioOptions | undefined;
+ shell?: boolean | string | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ interface SpawnOptions extends CommonSpawnOptions {
+ detached?: boolean | undefined;
+ }
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
+ }
+ type StdioNull = 'inherit' | 'ignore' | Stream;
+ type StdioPipeNamed = 'pipe' | 'overlapped';
+ type StdioPipe = undefined | null | StdioPipeNamed;
+ interface SpawnOptionsWithStdioTuple<Stdin extends StdioNull | StdioPipe, Stdout extends StdioNull | StdioPipe, Stderr extends StdioNull | StdioPipe> extends SpawnOptions {
+ stdio: [Stdin, Stdout, Stderr];
+ }
+ /**
+ * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults
+ * to an empty array.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * A third argument may be used to specify additional options, with these defaults:
+ *
+ * ```js
+ * const defaults = {
+ * cwd: undefined,
+ * env: process.env
+ * };
+ * ```
+ *
+ * Use `cwd` to specify the working directory from which the process is spawned.
+ * If not given, the default is to inherit the current working directory. If given,
+ * but the path does not exist, the child process emits an `ENOENT` error
+ * and exits immediately. `ENOENT` is also emitted when the command
+ * does not exist.
+ *
+ * Use `env` to specify environment variables that will be visible to the new
+ * process, the default is `process.env`.
+ *
+ * `undefined` values in `env` will be ignored.
+ *
+ * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
+ * exit code:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ls = spawn('ls', ['-lh', '/usr']);
+ *
+ * ls.stdout.on('data', (data) => {
+ * console.log(`stdout: ${data}`);
+ * });
+ *
+ * ls.stderr.on('data', (data) => {
+ * console.error(`stderr: ${data}`);
+ * });
+ *
+ * ls.on('close', (code) => {
+ * console.log(`child process exited with code ${code}`);
+ * });
+ * ```
+ *
+ * Example: A very elaborate way to run `ps ax | grep ssh`
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const ps = spawn('ps', ['ax']);
+ * const grep = spawn('grep', ['ssh']);
+ *
+ * ps.stdout.on('data', (data) => {
+ * grep.stdin.write(data);
+ * });
+ *
+ * ps.stderr.on('data', (data) => {
+ * console.error(`ps stderr: ${data}`);
+ * });
+ *
+ * ps.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`ps process exited with code ${code}`);
+ * }
+ * grep.stdin.end();
+ * });
+ *
+ * grep.stdout.on('data', (data) => {
+ * console.log(data.toString());
+ * });
+ *
+ * grep.stderr.on('data', (data) => {
+ * console.error(`grep stderr: ${data}`);
+ * });
+ *
+ * grep.on('close', (code) => {
+ * if (code !== 0) {
+ * console.log(`grep process exited with code ${code}`);
+ * }
+ * });
+ * ```
+ *
+ * Example of checking for failed `spawn`:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const subprocess = spawn('bad_command');
+ *
+ * subprocess.on('error', (err) => {
+ * console.error('Failed to start subprocess.');
+ * });
+ * ```
+ *
+ * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+ * title while others (Windows, SunOS) will use `command`.
+ *
+ * Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent,
+ * retrieve it with the`process.argv0` property instead.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { spawn } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const grep = spawn('grep', ['ssh'], { signal });
+ * grep.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * ```
+ * @since v0.1.90
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
+ // overloads of spawn with 'args'
+ function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>): ChildProcessByStdio<Writable, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>): ChildProcessByStdio<null, Readable, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>): ChildProcessByStdio<null, null, Readable>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>): ChildProcessByStdio<null, null, null>;
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
+ interface ExecOptions extends CommonOptions {
+ shell?: string | undefined;
+ signal?: AbortSignal | undefined;
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ }
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: BufferEncoding | null; // specify `null`.
+ }
+ interface ExecException extends Error {
+ cmd?: string | undefined;
+ killed?: boolean | undefined;
+ code?: number | undefined;
+ signal?: NodeJS.Signals | undefined;
+ }
+ /**
+ * Spawns a shell then executes the `command` within that shell, buffering any
+ * generated output. The `command` string passed to the exec function is processed
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
+ * need to be dealt with accordingly:
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ *
+ * exec('"/path/to/test file/test.sh" arg1 arg2');
+ * // Double quotes are used so that the space in the path is not interpreted as
+ * // a delimiter of multiple arguments.
+ *
+ * exec('echo "The \\$HOME variable is $HOME"');
+ * // The $HOME variable is escaped in the first instance, but not in the second.
+ * ```
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ *
+ * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The
+ * `error.code` property will be
+ * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the
+ * process.
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
+ * if (error) {
+ * console.error(`exec error: ${error}`);
+ * return;
+ * }
+ * console.log(`stdout: ${stdout}`);
+ * console.error(`stderr: ${stderr}`);
+ * });
+ * ```
+ *
+ * If `timeout` is greater than `0`, the parent will send the signal
+ * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
+ * child runs longer than `timeout` milliseconds.
+ *
+ * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
+ * the existing process and uses a shell to execute the command.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('util');
+ * const exec = util.promisify(require('child_process').exec);
+ *
+ * async function lsExample() {
+ * const { stdout, stderr } = await exec('ls');
+ * console.log('stdout:', stdout);
+ * console.error('stderr:', stderr);
+ * }
+ * lsExample();
+ * ```
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { exec } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = exec('grep ssh', { signal }, (error) => {
+ * console.log(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.90
+ * @param command The command to run, with space-separated arguments.
+ * @param callback called with the output when process terminates.
+ */
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function exec(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ interface PromiseWithChild<T> extends Promise<T> {
+ child: ChildProcess;
+ }
+ namespace exec {
+ function __promisify__(command: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: 'buffer' | null;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ command: string,
+ options: {
+ encoding: BufferEncoding;
+ } & ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options: ExecOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ command: string,
+ options?: (ObjectEncodingOptions & ExecOptions) | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ExecFileOptions extends CommonOptions, Abortable {
+ maxBuffer?: number | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ shell?: boolean | string | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: 'buffer' | null;
+ }
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ type ExecFileException = ExecException & NodeJS.ErrnoException;
+ /**
+ * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
+ * executable `file` is spawned directly as a new process making it slightly more
+ * efficient than {@link exec}.
+ *
+ * The same options as {@link exec} are supported. Since a shell is
+ * not spawned, behaviors such as I/O redirection and file globbing are not
+ * supported.
+ *
+ * ```js
+ * const { execFile } = require('child_process');
+ * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
+ * if (error) {
+ * throw error;
+ * }
+ * console.log(stdout);
+ * });
+ * ```
+ *
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
+ * stdout and stderr output of the child process. By default, Node.js will decode
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
+ * can be used to specify the character encoding used to decode the stdout and
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+ * encoding, `Buffer` objects will be passed to the callback instead.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In
+ * case of an error (including any error resulting in an exit code other than 0), a
+ * rejected promise is returned, with the same `error` object given in the
+ * callback, but with two additional properties `stdout` and `stderr`.
+ *
+ * ```js
+ * const util = require('util');
+ * const execFile = util.promisify(require('child_process').execFile);
+ * async function getVersion() {
+ * const { stdout } = await execFile('node', ['--version']);
+ * console.log(stdout);
+ * }
+ * getVersion();
+ * ```
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * const { execFile } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = execFile('node', ['--version'], { signal }, (error) => {
+ * console.log(error); // an AbortError
+ * });
+ * controller.abort();
+ * ```
+ * @since v0.1.91
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @param callback Called with the output when process terminates.
+ */
+ function execFile(file: string): ChildProcess;
+ function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void
+ ): ChildProcess;
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void
+ ): ChildProcess;
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions,
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null
+ ): ChildProcess;
+ namespace execFile {
+ function __promisify__(file: string): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding
+ ): PromiseWithChild<{
+ stdout: Buffer;
+ stderr: Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions
+ ): PromiseWithChild<{
+ stdout: string;
+ stderr: string;
+ }>;
+ function __promisify__(
+ file: string,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null
+ ): PromiseWithChild<{
+ stdout: string | Buffer;
+ stderr: string | Buffer;
+ }>;
+ }
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
+ execPath?: string | undefined;
+ execArgv?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: StdioOptions | undefined;
+ detached?: boolean | undefined;
+ windowsVerbatimArguments?: boolean | undefined;
+ }
+ /**
+ * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
+ * Like {@link spawn}, a `ChildProcess` object is returned. The
+ * returned `ChildProcess` will have an additional communication channel
+ * built-in that allows messages to be passed back and forth between the parent and
+ * child. See `subprocess.send()` for details.
+ *
+ * Keep in mind that spawned Node.js child processes are
+ * independent of the parent with exception of the IPC communication channel
+ * that is established between the two. Each process has its own memory, with
+ * their own V8 instances. Because of the additional resource allocations
+ * required, spawning a large number of child Node.js processes is not
+ * recommended.
+ *
+ * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative
+ * execution path to be used.
+ *
+ * Node.js processes launched with a custom `execPath` will communicate with the
+ * parent process using the file descriptor (fd) identified using the
+ * environment variable `NODE_CHANNEL_FD` on the child process.
+ *
+ * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
+ * current process.
+ *
+ * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except
+ * the error passed to the callback will be an `AbortError`:
+ *
+ * ```js
+ * if (process.argv[2] === 'child') {
+ * setTimeout(() => {
+ * console.log(`Hello from ${process.argv[2]}!`);
+ * }, 1_000);
+ * } else {
+ * const { fork } = require('child_process');
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const child = fork(__filename, ['child'], { signal });
+ * child.on('error', (err) => {
+ * // This will be called with err being an AbortError if the controller aborts
+ * });
+ * controller.abort(); // Stops the child process
+ * }
+ * ```
+ * @since v0.5.0
+ * @param modulePath The module to run in the child.
+ * @param args List of string arguments.
+ */
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
+ interface SpawnSyncOptions extends CommonSpawnOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ interface SpawnSyncReturns<T> {
+ pid: number;
+ output: Array<T | null>;
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: NodeJS.Signals | null;
+ error?: Error | undefined;
+ }
+ /**
+ * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the process intercepts and handles the `SIGTERM` signal
+ * and doesn't exit, the parent process will wait until the child process has
+ * exited.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @param args List of string arguments.
+ */
+ function spawnSync(command: string): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
+ interface CommonExecOptions extends CommonOptions {
+ input?: string | NodeJS.ArrayBufferView | undefined;
+ stdio?: StdioOptions | undefined;
+ killSignal?: NodeJS.Signals | number | undefined;
+ maxBuffer?: number | undefined;
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
+ }
+ interface ExecSyncOptions extends CommonExecOptions {
+ shell?: string | undefined;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding?: 'buffer' | null | undefined;
+ }
+ /**
+ * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
+ * until the child process has fully closed. When a timeout has been encountered
+ * and `killSignal` is sent, the method won't return until the process has
+ * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process
+ * has exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw.
+ * The `Error` object will contain the entire result from {@link spawnSync}.
+ *
+ * **Never pass unsanitized user input to this function. Any input containing shell**
+ * **metacharacters may be used to trigger arbitrary command execution.**
+ * @since v0.11.12
+ * @param command The command to run.
+ * @return The stdout from the command.
+ */
+ function execSync(command: string): Buffer;
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
+ interface ExecFileSyncOptions extends CommonExecOptions {
+ shell?: boolean | string | undefined;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding?: 'buffer' | null; // specify `null`.
+ }
+ /**
+ * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
+ * return until the child process has fully closed. When a timeout has been
+ * encountered and `killSignal` is sent, the method won't return until the process
+ * has completely exited.
+ *
+ * If the child process intercepts and handles the `SIGTERM` signal and
+ * does not exit, the parent process will still wait until the child process has
+ * exited.
+ *
+ * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
+ *
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+ * **function. Any input containing shell metacharacters may be used to trigger**
+ * **arbitrary command execution.**
+ * @since v0.11.12
+ * @param file The name or path of the executable file to run.
+ * @param args List of string arguments.
+ * @return The stdout from the command.
+ */
+ function execFileSync(file: string): Buffer;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>): Buffer;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
+}
+declare module 'node:child_process' {
+ export * from 'child_process';
+}
diff --git a/node_modules/@types/node/ts4.8/cluster.d.ts b/node_modules/@types/node/ts4.8/cluster.d.ts
new file mode 100755
index 0000000..37dbc57
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/cluster.d.ts
@@ -0,0 +1,410 @@
+/**
+ * Clusters of Node.js processes can be used to run multiple instances of Node.js
+ * that can distribute workloads among their application threads. When process
+ * isolation is not needed, use the `worker_threads` module instead, which
+ * allows running multiple application threads within a single Node.js instance.
+ *
+ * The cluster module allows easy creation of child processes that all share
+ * server ports.
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import http from 'http';
+ * import { cpus } from 'os';
+ * import process from 'process';
+ *
+ * const numCPUs = cpus().length;
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log(`worker ${worker.process.pid} died`);
+ * });
+ * } else {
+ * // Workers can share any TCP connection
+ * // In this case it is an HTTP server
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ *
+ * console.log(`Worker ${process.pid} started`);
+ * }
+ * ```
+ *
+ * Running Node.js will now share port 8000 between the workers:
+ *
+ * ```console
+ * $ node server.js
+ * Primary 3596 is running
+ * Worker 4324 started
+ * Worker 4520 started
+ * Worker 6056 started
+ * Worker 5644 started
+ * ```
+ *
+ * On Windows, it is not yet possible to set up a named pipe server in a worker.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/cluster.js)
+ */
+declare module 'cluster' {
+ import * as child from 'node:child_process';
+ import EventEmitter = require('node:events');
+ import * as net from 'node:net';
+ export interface ClusterSettings {
+ execArgv?: string[] | undefined; // default: process.execArgv
+ exec?: string | undefined;
+ args?: string[] | undefined;
+ silent?: boolean | undefined;
+ stdio?: any[] | undefined;
+ uid?: number | undefined;
+ gid?: number | undefined;
+ inspectPort?: number | (() => number) | undefined;
+ }
+ export interface Address {
+ address: string;
+ port: number;
+ addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6"
+ }
+ /**
+ * A `Worker` object contains all public information and method about a worker.
+ * In the primary it can be obtained using `cluster.workers`. In a worker
+ * it can be obtained using `cluster.worker`.
+ * @since v0.7.0
+ */
+ export class Worker extends EventEmitter {
+ /**
+ * Each new worker is given its own unique id, this id is stored in the`id`.
+ *
+ * While a worker is alive, this is the key that indexes it in`cluster.workers`.
+ * @since v0.8.0
+ */
+ id: number;
+ /**
+ * All workers are created using `child_process.fork()`, the returned object
+ * from this function is stored as `.process`. In a worker, the global `process`is stored.
+ *
+ * See: `Child Process module`.
+ *
+ * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
+ * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
+ * accidental disconnection.
+ * @since v0.7.0
+ */
+ process: child.ChildProcess;
+ /**
+ * Send a message to a worker or primary, optionally with a handle.
+ *
+ * In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
+ *
+ * In a worker, this sends a message to the primary. It is identical to`process.send()`.
+ *
+ * This example will echo back all messages from the primary:
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * worker.send('hi there');
+ *
+ * } else if (cluster.isWorker) {
+ * process.on('message', (msg) => {
+ * process.send(msg);
+ * });
+ * }
+ * ```
+ * @since v0.7.0
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+ */
+ send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
+ /**
+ * This function will kill the worker. In the primary worker, it does this by
+ * disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
+ *
+ * The `kill()` function kills the worker process without waiting for a graceful
+ * disconnect, it has the same behavior as `worker.process.kill()`.
+ *
+ * This method is aliased as `worker.destroy()` for backwards compatibility.
+ *
+ * In a worker, `process.kill()` exists, but it is not this function;
+ * it is `kill()`.
+ * @since v0.9.12
+ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
+ */
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ /**
+ * In a worker, this function will close all servers, wait for the `'close'` event
+ * on those servers, and then disconnect the IPC channel.
+ *
+ * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself.
+ *
+ * Causes `.exitedAfterDisconnect` to be set.
+ *
+ * After a server is closed, it will no longer accept new connections,
+ * but connections may be accepted by any other listening worker. Existing
+ * connections will be allowed to close as usual. When no more connections exist,
+ * see `server.close()`, the IPC channel to the worker will close allowing it
+ * to die gracefully.
+ *
+ * The above applies _only_ to server connections, client connections are not
+ * automatically closed by workers, and disconnect does not wait for them to close
+ * before exiting.
+ *
+ * In a worker, `process.disconnect` exists, but it is not this function;
+ * it is `disconnect()`.
+ *
+ * Because long living server connections may block workers from disconnecting, it
+ * may be useful to send a message, so application specific actions may be taken to
+ * close them. It also may be useful to implement a timeout, killing a worker if
+ * the `'disconnect'` event has not been emitted after some time.
+ *
+ * ```js
+ * if (cluster.isPrimary) {
+ * const worker = cluster.fork();
+ * let timeout;
+ *
+ * worker.on('listening', (address) => {
+ * worker.send('shutdown');
+ * worker.disconnect();
+ * timeout = setTimeout(() => {
+ * worker.kill();
+ * }, 2000);
+ * });
+ *
+ * worker.on('disconnect', () => {
+ * clearTimeout(timeout);
+ * });
+ *
+ * } else if (cluster.isWorker) {
+ * const net = require('net');
+ * const server = net.createServer((socket) => {
+ * // Connections never end
+ * });
+ *
+ * server.listen(8000);
+ *
+ * process.on('message', (msg) => {
+ * if (msg === 'shutdown') {
+ * // Initiate graceful close of any connections to server
+ * }
+ * });
+ * }
+ * ```
+ * @since v0.7.7
+ * @return A reference to `worker`.
+ */
+ disconnect(): void;
+ /**
+ * This function returns `true` if the worker is connected to its primary via its
+ * IPC channel, `false` otherwise. A worker is connected to its primary after it
+ * has been created. It is disconnected after the `'disconnect'` event is emitted.
+ * @since v0.11.14
+ */
+ isConnected(): boolean;
+ /**
+ * This function returns `true` if the worker's process has terminated (either
+ * because of exiting or being signaled). Otherwise, it returns `false`.
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import http from 'http';
+ * import { cpus } from 'os';
+ * import process from 'process';
+ *
+ * const numCPUs = cpus().length;
+ *
+ * if (cluster.isPrimary) {
+ * console.log(`Primary ${process.pid} is running`);
+ *
+ * // Fork workers.
+ * for (let i = 0; i < numCPUs; i++) {
+ * cluster.fork();
+ * }
+ *
+ * cluster.on('fork', (worker) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ *
+ * cluster.on('exit', (worker, code, signal) => {
+ * console.log('worker is dead:', worker.isDead());
+ * });
+ * } else {
+ * // Workers can share any TCP connection. In this case, it is an HTTP server.
+ * http.createServer((req, res) => {
+ * res.writeHead(200);
+ * res.end(`Current process\n ${process.pid}`);
+ * process.kill(process.pid);
+ * }).listen(8000);
+ * }
+ * ```
+ * @since v0.11.14
+ */
+ isDead(): boolean;
+ /**
+ * This property is `true` if the worker exited due to `.disconnect()`.
+ * If the worker exited any other way, it is `false`. If the
+ * worker has not exited, it is `undefined`.
+ *
+ * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
+ * voluntary and accidental exit, the primary may choose not to respawn a worker
+ * based on this value.
+ *
+ * ```js
+ * cluster.on('exit', (worker, code, signal) => {
+ * if (worker.exitedAfterDisconnect === true) {
+ * console.log('Oh, it was just voluntary – no need to worry');
+ * }
+ * });
+ *
+ * // kill worker
+ * worker.kill();
+ * ```
+ * @since v6.0.0
+ */
+ exitedAfterDisconnect: boolean;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. error
+ * 3. exit
+ * 4. listening
+ * 5. message
+ * 6. online
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ addListener(event: 'listening', listener: (address: Address) => void): this;
+ addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'exit', code: number, signal: string): boolean;
+ emit(event: 'listening', address: Address): boolean;
+ emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'exit', listener: (code: number, signal: string) => void): this;
+ on(event: 'listening', listener: (address: Address) => void): this;
+ on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'exit', listener: (code: number, signal: string) => void): this;
+ once(event: 'listening', listener: (address: Address) => void): this;
+ once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependListener(event: 'listening', listener: (address: Address) => void): this;
+ prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: 'listening', listener: (address: Address) => void): this;
+ prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'online', listener: () => void): this;
+ }
+ export interface Cluster extends EventEmitter {
+ disconnect(callback?: () => void): void;
+ fork(env?: any): Worker;
+ /** @deprecated since v16.0.0 - use isPrimary. */
+ readonly isMaster: boolean;
+ readonly isPrimary: boolean;
+ readonly isWorker: boolean;
+ schedulingPolicy: number;
+ readonly settings: ClusterSettings;
+ /** @deprecated since v16.0.0 - use setupPrimary. */
+ setupMaster(settings?: ClusterSettings): void;
+ /**
+ * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
+ */
+ setupPrimary(settings?: ClusterSettings): void;
+ readonly worker?: Worker | undefined;
+ readonly workers?: NodeJS.Dict<Worker> | undefined;
+ readonly SCHED_NONE: number;
+ readonly SCHED_RR: number;
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ addListener(event: 'fork', listener: (worker: Worker) => void): this;
+ addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: 'online', listener: (worker: Worker) => void): this;
+ addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'disconnect', worker: Worker): boolean;
+ emit(event: 'exit', worker: Worker, code: number, signal: string): boolean;
+ emit(event: 'fork', worker: Worker): boolean;
+ emit(event: 'listening', worker: Worker, address: Address): boolean;
+ emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: 'online', worker: Worker): boolean;
+ emit(event: 'setup', settings: ClusterSettings): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'disconnect', listener: (worker: Worker) => void): this;
+ on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ on(event: 'fork', listener: (worker: Worker) => void): this;
+ on(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: 'online', listener: (worker: Worker) => void): this;
+ on(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'disconnect', listener: (worker: Worker) => void): this;
+ once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ once(event: 'fork', listener: (worker: Worker) => void): this;
+ once(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: 'online', listener: (worker: Worker) => void): this;
+ once(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this;
+ prependListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
+ prependOnceListener(event: 'online', listener: (worker: Worker) => void): this;
+ prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this;
+ }
+ const cluster: Cluster;
+ export default cluster;
+}
+declare module 'node:cluster' {
+ export * from 'cluster';
+ export { default as default } from 'cluster';
+}
diff --git a/node_modules/@types/node/ts4.8/console.d.ts b/node_modules/@types/node/ts4.8/console.d.ts
new file mode 100755
index 0000000..16c9137
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/console.d.ts
@@ -0,0 +1,412 @@
+/**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
+ */
+declare module 'console' {
+ import console = require('node:console');
+ export = console;
+}
+declare module 'node:console' {
+ import { InspectOptions } from 'node:util';
+ global {
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
+ interface Console {
+ Console: console.ConsoleConstructor;
+ /**
+ * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
+ * writes a message and does not otherwise affect execution. The output always
+ * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
+ *
+ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
+ *
+ * ```js
+ * console.assert(true, 'does nothing');
+ *
+ * console.assert(false, 'Whoops %s work', 'didn\'t');
+ * // Assertion failed: Whoops didn't work
+ *
+ * console.assert();
+ * // Assertion failed
+ * ```
+ * @since v0.1.101
+ * @param value The value tested for being truthy.
+ * @param message All arguments besides `value` are used as error message.
+ */
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ /**
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
+ * TTY. When `stdout` is not a TTY, this method does nothing.
+ *
+ * The specific operation of `console.clear()` can vary across operating systems
+ * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
+ * current terminal viewport for the Node.js
+ * binary.
+ * @since v8.3.0
+ */
+ clear(): void;
+ /**
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the
+ * number of times `console.count()` has been called with the given `label`.
+ *
+ * ```js
+ * > console.count()
+ * default: 1
+ * undefined
+ * > console.count('default')
+ * default: 2
+ * undefined
+ * > console.count('abc')
+ * abc: 1
+ * undefined
+ * > console.count('xyz')
+ * xyz: 1
+ * undefined
+ * > console.count('abc')
+ * abc: 2
+ * undefined
+ * > console.count()
+ * default: 3
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ count(label?: string): void;
+ /**
+ * Resets the internal counter specific to `label`.
+ *
+ * ```js
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * > console.countReset('abc');
+ * undefined
+ * > console.count('abc');
+ * abc: 1
+ * undefined
+ * >
+ * ```
+ * @since v8.3.0
+ * @param label The display label for the counter.
+ */
+ countReset(label?: string): void;
+ /**
+ * The `console.debug()` function is an alias for {@link log}.
+ * @since v8.0.0
+ */
+ debug(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
+ * This function bypasses any custom `inspect()` function defined on `obj`.
+ * @since v0.1.101
+ */
+ dir(obj: any, options?: InspectOptions): void;
+ /**
+ * This method calls `console.log()` passing it the arguments received.
+ * This method does not produce any XML formatting.
+ * @since v8.0.0
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * Prints to `stderr` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const code = 5;
+ * console.error('error #%d', code);
+ * // Prints: error #5, to stderr
+ * console.error('error', code);
+ * // Prints: error 5, to stderr
+ * ```
+ *
+ * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
+ * values are concatenated. See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ error(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Increases indentation of subsequent lines by spaces for `groupIndentation`length.
+ *
+ * If one or more `label`s are provided, those are printed first without the
+ * additional indentation.
+ * @since v8.5.0
+ */
+ group(...label: any[]): void;
+ /**
+ * An alias for {@link group}.
+ * @since v8.5.0
+ */
+ groupCollapsed(...label: any[]): void;
+ /**
+ * Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
+ * @since v8.5.0
+ */
+ groupEnd(): void;
+ /**
+ * The `console.info()` function is an alias for {@link log}.
+ * @since v0.1.100
+ */
+ info(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Prints to `stdout` with newline. Multiple arguments can be passed, with the
+ * first used as the primary message and all additional used as substitution
+ * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
+ *
+ * ```js
+ * const count = 5;
+ * console.log('count: %d', count);
+ * // Prints: count: 5, to stdout
+ * console.log('count:', count);
+ * // Prints: count: 5, to stdout
+ * ```
+ *
+ * See `util.format()` for more information.
+ * @since v0.1.100
+ */
+ log(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
+ * logging the argument if it can’t be parsed as tabular.
+ *
+ * ```js
+ * // These can't be parsed as tabular data
+ * console.table(Symbol());
+ * // Symbol()
+ *
+ * console.table(undefined);
+ * // undefined
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
+ * // ┌─────────┬─────┬─────┐
+ * // │ (index) │ a │ b │
+ * // ├─────────┼─────┼─────┤
+ * // │ 0 │ 1 │ 'Y' │
+ * // │ 1 │ 'Z' │ 2 │
+ * // └─────────┴─────┴─────┘
+ *
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
+ * // ┌─────────┬─────┐
+ * // │ (index) │ a │
+ * // ├─────────┼─────┤
+ * // │ 0 │ 1 │
+ * // │ 1 │ 'Z' │
+ * // └─────────┴─────┘
+ * ```
+ * @since v10.0.0
+ * @param properties Alternate properties for constructing the table.
+ */
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
+ /**
+ * Starts a timer that can be used to compute the duration of an operation. Timers
+ * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
+ * suitable time units to `stdout`. For example, if the elapsed
+ * time is 3869ms, `console.timeEnd()` displays "3.869s".
+ * @since v0.1.104
+ */
+ time(label?: string): void;
+ /**
+ * Stops a timer that was previously started by calling {@link time} and
+ * prints the result to `stdout`:
+ *
+ * ```js
+ * console.time('100-elements');
+ * for (let i = 0; i < 100; i++) {}
+ * console.timeEnd('100-elements');
+ * // prints 100-elements: 225.438ms
+ * ```
+ * @since v0.1.104
+ */
+ timeEnd(label?: string): void;
+ /**
+ * For a timer that was previously started by calling {@link time}, prints
+ * the elapsed time and other `data` arguments to `stdout`:
+ *
+ * ```js
+ * console.time('process');
+ * const value = expensiveProcess1(); // Returns 42
+ * console.timeLog('process', value);
+ * // Prints "process: 365.227ms 42".
+ * doExpensiveProcess2(value);
+ * console.timeEnd('process');
+ * ```
+ * @since v10.7.0
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ /**
+ * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
+ *
+ * ```js
+ * console.trace('Show me');
+ * // Prints: (stack trace will vary based on where trace is called)
+ * // Trace: Show me
+ * // at repl:2:9
+ * // at REPLServer.defaultEval (repl.js:248:27)
+ * // at bound (domain.js:287:14)
+ * // at REPLServer.runBound [as eval] (domain.js:300:12)
+ * // at REPLServer.<anonymous> (repl.js:412:12)
+ * // at emitOne (events.js:82:20)
+ * // at REPLServer.emit (events.js:169:7)
+ * // at REPLServer.Interface._onLine (readline.js:210:10)
+ * // at REPLServer.Interface._line (readline.js:549:8)
+ * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
+ * ```
+ * @since v0.1.104
+ */
+ trace(message?: any, ...optionalParams: any[]): void;
+ /**
+ * The `console.warn()` function is an alias for {@link error}.
+ * @since v0.1.100
+ */
+ warn(message?: any, ...optionalParams: any[]): void;
+ // --- Inspector mode only ---
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Starts a JavaScript CPU profile with an optional label.
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Adds an event with the label `label` to the Timeline panel of the inspector.
+ */
+ timeStamp(label?: string): void;
+ }
+ /**
+ * The `console` module provides a simple debugging console that is similar to the
+ * JavaScript console mechanism provided by web browsers.
+ *
+ * The module exports two specific components:
+ *
+ * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
+ * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
+ *
+ * _**Warning**_: The global console object's methods are neither consistently
+ * synchronous like the browser APIs they resemble, nor are they consistently
+ * asynchronous like all other Node.js streams. See the `note on process I/O` for
+ * more information.
+ *
+ * Example using the global `console`:
+ *
+ * ```js
+ * console.log('hello world');
+ * // Prints: hello world, to stdout
+ * console.log('hello %s', 'world');
+ * // Prints: hello world, to stdout
+ * console.error(new Error('Whoops, something bad happened'));
+ * // Prints error message and stack trace to stderr:
+ * // Error: Whoops, something bad happened
+ * // at [eval]:5:15
+ * // at Script.runInThisContext (node:vm:132:18)
+ * // at Object.runInThisContext (node:vm:309:38)
+ * // at node:internal/process/execution:77:19
+ * // at [eval]-wrapper:6:22
+ * // at evalScript (node:internal/process/execution:76:60)
+ * // at node:internal/main/eval_string:23:3
+ *
+ * const name = 'Will Robinson';
+ * console.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to stderr
+ * ```
+ *
+ * Example using the `Console` class:
+ *
+ * ```js
+ * const out = getStreamSomehow();
+ * const err = getStreamSomehow();
+ * const myConsole = new console.Console(out, err);
+ *
+ * myConsole.log('hello world');
+ * // Prints: hello world, to out
+ * myConsole.log('hello %s', 'world');
+ * // Prints: hello world, to out
+ * myConsole.error(new Error('Whoops, something bad happened'));
+ * // Prints: [Error: Whoops, something bad happened], to err
+ *
+ * const name = 'Will Robinson';
+ * myConsole.warn(`Danger ${name}! Danger!`);
+ * // Prints: Danger Will Robinson! Danger!, to err
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
+ */
+ namespace console {
+ interface ConsoleConstructorOptions {
+ stdout: NodeJS.WritableStream;
+ stderr?: NodeJS.WritableStream | undefined;
+ ignoreErrors?: boolean | undefined;
+ colorMode?: boolean | 'auto' | undefined;
+ inspectOptions?: InspectOptions | undefined;
+ /**
+ * Set group indentation
+ * @default 2
+ */
+ groupIndentation?: number | undefined;
+ }
+ interface ConsoleConstructor {
+ prototype: Console;
+ new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
+ new (options: ConsoleConstructorOptions): Console;
+ }
+ }
+ var console: Console;
+ }
+ export = globalThis.console;
+}
diff --git a/node_modules/@types/node/ts4.8/constants.d.ts b/node_modules/@types/node/ts4.8/constants.d.ts
new file mode 100755
index 0000000..208020d
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/constants.d.ts
@@ -0,0 +1,18 @@
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module 'constants' {
+ import { constants as osConstants, SignalConstants } from 'node:os';
+ import { constants as cryptoConstants } from 'node:crypto';
+ import { constants as fsConstants } from 'node:fs';
+
+ const exp: typeof osConstants.errno &
+ typeof osConstants.priority &
+ SignalConstants &
+ typeof cryptoConstants &
+ typeof fsConstants;
+ export = exp;
+}
+
+declare module 'node:constants' {
+ import constants = require('constants');
+ export = constants;
+}
diff --git a/node_modules/@types/node/ts4.8/crypto.d.ts b/node_modules/@types/node/ts4.8/crypto.d.ts
new file mode 100755
index 0000000..6135090
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/crypto.d.ts
@@ -0,0 +1,3961 @@
+/**
+ * The `crypto` module provides cryptographic functionality that includes a set of
+ * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.
+ *
+ * ```js
+ * const { createHmac } = await import('crypto');
+ *
+ * const secret = 'abcdefg';
+ * const hash = createHmac('sha256', secret)
+ * .update('I love cupcakes')
+ * .digest('hex');
+ * console.log(hash);
+ * // Prints:
+ * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/crypto.js)
+ */
+declare module 'crypto' {
+ import * as stream from 'node:stream';
+ import { PeerCertificate } from 'node:tls';
+ /**
+ * SPKAC is a Certificate Signing Request mechanism originally implemented by
+ * Netscape and was specified formally as part of [HTML5's `keygen` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen).
+ *
+ * `<keygen>` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
+ * should not use this element anymore.
+ *
+ * The `crypto` module provides the `Certificate` class for working with SPKAC
+ * data. The most common usage is handling output generated by the HTML5`<keygen>` element. Node.js uses [OpenSSL's SPKAC
+ * implementation](https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html) internally.
+ * @since v0.11.8
+ */
+ class Certificate {
+ /**
+ * ```js
+ * const { Certificate } = await import('crypto');
+ * const spkac = getSpkacSomehow();
+ * const challenge = Certificate.exportChallenge(spkac);
+ * console.log(challenge.toString('utf8'));
+ * // Prints: the challenge as a UTF8 string
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * ```js
+ * const { Certificate } = await import('crypto');
+ * const spkac = getSpkacSomehow();
+ * const publicKey = Certificate.exportPublicKey(spkac);
+ * console.log(publicKey);
+ * // Prints: the public key as <Buffer ...>
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { Certificate } = await import('crypto');
+ *
+ * const spkac = getSpkacSomehow();
+ * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
+ * // Prints: true or false
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
+ */
+ static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * @deprecated
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ }
+ namespace constants {
+ // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
+ const OPENSSL_VERSION_NUMBER: number;
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+ const SSL_OP_ALL: number;
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ /** Instructs OpenSSL to turn on cookie exchange. */
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
+ const SSL_OP_EPHEMERAL_RSA: number;
+ /** Allows initial connection to servers that do not support RI. */
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
+ const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
+ /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
+ const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
+ const SSL_OP_NETSCAPE_CA_DN_BUG: number;
+ const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
+ const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
+ const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+ const SSL_OP_NO_COMPRESSION: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ const SSL_OP_NO_SSLv2: number;
+ const SSL_OP_NO_SSLv3: number;
+ const SSL_OP_NO_TICKET: number;
+ const SSL_OP_NO_TLSv1: number;
+ const SSL_OP_NO_TLSv1_1: number;
+ const SSL_OP_NO_TLSv1_2: number;
+ const SSL_OP_PKCS1_CHECK_1: number;
+ const SSL_OP_PKCS1_CHECK_2: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
+ const SSL_OP_SINGLE_DH_USE: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
+ const SSL_OP_SINGLE_ECDH_USE: number;
+ const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
+ const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
+ const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
+ const SSL_OP_TLS_D5_BUG: number;
+ /** Instructs OpenSSL to disable version rollback attack detection. */
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+ const ENGINE_METHOD_RSA: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_EC: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+ const ALPN_ENABLED: number;
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+ const RSA_PSS_SALTLEN_DIGEST: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+ const RSA_PSS_SALTLEN_AUTO: number;
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+ const defaultCoreCipherList: string;
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
+ const defaultCipherList: string;
+ }
+ interface HashOptions extends stream.TransformOptions {
+ /**
+ * For XOF hash functions such as `shake256`, the
+ * outputLength option can be used to specify the desired output length in bytes.
+ */
+ outputLength?: number | undefined;
+ }
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+ /**
+ * Creates and returns a `Hash` object that can be used to generate hash digests
+ * using the given `algorithm`. Optional `options` argument controls stream
+ * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
+ * can be used to specify the desired output length in bytes.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * Example: generating the sha256 sum of a file
+ *
+ * ```js
+ * import {
+ * createReadStream
+ * } from 'fs';
+ * import { argv } from 'process';
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hash.update(data);
+ * else {
+ * console.log(`${hash.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.92
+ * @param options `stream.transform` options
+ */
+ function createHash(algorithm: string, options?: HashOptions): Hash;
+ /**
+ * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
+ * Optional `options` argument controls stream behavior.
+ *
+ * The `algorithm` is dependent on the available algorithms supported by the
+ * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+ * display the available digest algorithms.
+ *
+ * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
+ * a `KeyObject`, its type must be `secret`.
+ *
+ * Example: generating the sha256 HMAC of a file
+ *
+ * ```js
+ * import {
+ * createReadStream
+ * } from 'fs';
+ * import { argv } from 'process';
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const filename = argv[2];
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream(filename);
+ * input.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = input.read();
+ * if (data)
+ * hmac.update(data);
+ * else {
+ * console.log(`${hmac.digest('hex')} ${filename}`);
+ * }
+ * });
+ * ```
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+ // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
+ type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
+ type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
+ type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
+ /**
+ * The `Hash` class is a utility for creating hash digests of data. It can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed hash digest on the readable side, or
+ * * Using the `hash.update()` and `hash.digest()` methods to produce the
+ * computed hash.
+ *
+ * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hash` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hash.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * }
+ * });
+ *
+ * hash.write('some data to hash');
+ * hash.end();
+ * ```
+ *
+ * Example: Using `Hash` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ * import { stdout } from 'process';
+ * const { createHash } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hash).setEncoding('hex').pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hash.update()` and `hash.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('some data to hash');
+ * console.log(hash.digest('hex'));
+ * // Prints:
+ * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+ * ```
+ * @since v0.1.92
+ */
+ class Hash extends stream.Transform {
+ private constructor();
+ /**
+ * Creates a new `Hash` object that contains a deep copy of the internal state
+ * of the current `Hash` object.
+ *
+ * The optional `options` argument controls stream behavior. For XOF hash
+ * functions such as `'shake256'`, the `outputLength` option can be used to
+ * specify the desired output length in bytes.
+ *
+ * An error is thrown when an attempt is made to copy the `Hash` object after
+ * its `hash.digest()` method has been called.
+ *
+ * ```js
+ * // Calculate a rolling hash.
+ * const {
+ * createHash
+ * } = await import('crypto');
+ *
+ * const hash = createHash('sha256');
+ *
+ * hash.update('one');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('two');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * hash.update('three');
+ * console.log(hash.copy().digest('hex'));
+ *
+ * // Etc.
+ * ```
+ * @since v13.1.0
+ * @param options `stream.transform` options
+ */
+ copy(options?: stream.TransformOptions): Hash;
+ /**
+ * Updates the hash content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hash;
+ update(data: string, inputEncoding: Encoding): Hash;
+ /**
+ * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
+ * If `encoding` is provided a string will be returned; otherwise
+ * a `Buffer` is returned.
+ *
+ * The `Hash` object can not be used again after `hash.digest()` method has been
+ * called. Multiple calls will cause an error to be thrown.
+ * @since v0.1.92
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ /**
+ * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
+ * be used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where data is written
+ * to produce a computed HMAC digest on the readable side, or
+ * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
+ * computed HMAC digest.
+ *
+ * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
+ *
+ * Example: Using `Hmac` objects as streams:
+ *
+ * ```js
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.on('readable', () => {
+ * // Only one element is going to be produced by the
+ * // hash stream.
+ * const data = hmac.read();
+ * if (data) {
+ * console.log(data.toString('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * }
+ * });
+ *
+ * hmac.write('some data to hash');
+ * hmac.end();
+ * ```
+ *
+ * Example: Using `Hmac` and piped streams:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ * import { stdout } from 'process';
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * const input = createReadStream('test.js');
+ * input.pipe(hmac).pipe(stdout);
+ * ```
+ *
+ * Example: Using the `hmac.update()` and `hmac.digest()` methods:
+ *
+ * ```js
+ * const {
+ * createHmac
+ * } = await import('crypto');
+ *
+ * const hmac = createHmac('sha256', 'a secret');
+ *
+ * hmac.update('some data to hash');
+ * console.log(hmac.digest('hex'));
+ * // Prints:
+ * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+ * ```
+ * @since v0.1.94
+ */
+ class Hmac extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the `Hmac` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Hmac;
+ update(data: string, inputEncoding: Encoding): Hmac;
+ /**
+ * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
+ * If `encoding` is
+ * provided a string is returned; otherwise a `Buffer` is returned;
+ *
+ * The `Hmac` object can not be used again after `hmac.digest()` has been
+ * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
+ * @since v0.1.94
+ * @param encoding The `encoding` of the return value.
+ */
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ type KeyObjectType = 'secret' | 'public' | 'private';
+ interface KeyExportOptions<T extends KeyFormat> {
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface JwkKeyExportOptions {
+ format: 'jwk';
+ }
+ interface JsonWebKey {
+ crv?: string | undefined;
+ d?: string | undefined;
+ dp?: string | undefined;
+ dq?: string | undefined;
+ e?: string | undefined;
+ k?: string | undefined;
+ kty?: string | undefined;
+ n?: string | undefined;
+ p?: string | undefined;
+ q?: string | undefined;
+ qi?: string | undefined;
+ x?: string | undefined;
+ y?: string | undefined;
+ [key: string]: unknown;
+ }
+ interface AsymmetricKeyDetails {
+ /**
+ * Key size in bits (RSA, DSA).
+ */
+ modulusLength?: number | undefined;
+ /**
+ * Public exponent (RSA).
+ */
+ publicExponent?: bigint | undefined;
+ /**
+ * Name of the message digest (RSA-PSS).
+ */
+ hashAlgorithm?: string | undefined;
+ /**
+ * Name of the message digest used by MGF1 (RSA-PSS).
+ */
+ mgf1HashAlgorithm?: string | undefined;
+ /**
+ * Minimal salt length in bytes (RSA-PSS).
+ */
+ saltLength?: number | undefined;
+ /**
+ * Size of q in bits (DSA).
+ */
+ divisorLength?: number | undefined;
+ /**
+ * Name of the curve (EC).
+ */
+ namedCurve?: string | undefined;
+ }
+ /**
+ * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
+ * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
+ * objects are not to be created directly using the `new`keyword.
+ *
+ * Most applications should consider using the new `KeyObject` API instead of
+ * passing keys as strings or `Buffer`s due to improved security features.
+ *
+ * `KeyObject` instances can be passed to other threads via `postMessage()`.
+ * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
+ * be listed in the `transferList` argument.
+ * @since v11.6.0
+ */
+ class KeyObject {
+ private constructor();
+ /**
+ * Example: Converting a `CryptoKey` instance to a `KeyObject`:
+ *
+ * ```js
+ * const { webcrypto, KeyObject } = await import('crypto');
+ * const { subtle } = webcrypto;
+ *
+ * const key = await subtle.generateKey({
+ * name: 'HMAC',
+ * hash: 'SHA-256',
+ * length: 256
+ * }, true, ['sign', 'verify']);
+ *
+ * const keyObject = KeyObject.from(key);
+ * console.log(keyObject.symmetricKeySize);
+ * // Prints: 32 (symmetric key size in bytes)
+ * ```
+ * @since v15.0.0
+ */
+ static from(key: webcrypto.CryptoKey): KeyObject;
+ /**
+ * For asymmetric keys, this property represents the type of the key. Supported key
+ * types are:
+ *
+ * * `'rsa'` (OID 1.2.840.113549.1.1.1)
+ * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
+ * * `'dsa'` (OID 1.2.840.10040.4.1)
+ * * `'ec'` (OID 1.2.840.10045.2.1)
+ * * `'x25519'` (OID 1.3.101.110)
+ * * `'x448'` (OID 1.3.101.111)
+ * * `'ed25519'` (OID 1.3.101.112)
+ * * `'ed448'` (OID 1.3.101.113)
+ * * `'dh'` (OID 1.2.840.113549.1.3.1)
+ *
+ * This property is `undefined` for unrecognized `KeyObject` types and symmetric
+ * keys.
+ * @since v11.6.0
+ */
+ asymmetricKeyType?: KeyType | undefined;
+ /**
+ * For asymmetric keys, this property represents the size of the embedded key in
+ * bytes. This property is `undefined` for symmetric keys.
+ */
+ asymmetricKeySize?: number | undefined;
+ /**
+ * This property exists only on asymmetric keys. Depending on the type of the key,
+ * this object contains information about the key. None of the information obtained
+ * through this property can be used to uniquely identify a key or to compromise
+ * the security of the key.
+ *
+ * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
+ * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
+ * set.
+ *
+ * Other key details might be exposed via this API using additional attributes.
+ * @since v15.7.0
+ */
+ asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
+ /**
+ * For symmetric keys, the following encoding options can be used:
+ *
+ * For public keys, the following encoding options can be used:
+ *
+ * For private keys, the following encoding options can be used:
+ *
+ * The result type depends on the selected encoding format, when PEM the
+ * result is a string, when DER it will be a buffer containing the data
+ * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
+ *
+ * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
+ * ignored.
+ *
+ * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
+ * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
+ * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
+ * encrypted private keys. Since PKCS#8 defines its own
+ * encryption mechanism, PEM-level encryption is not supported when encrypting
+ * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
+ * PKCS#1 and SEC1 encryption.
+ * @since v11.6.0
+ */
+ export(options: KeyExportOptions<'pem'>): string | Buffer;
+ export(options?: KeyExportOptions<'der'>): Buffer;
+ export(options?: JwkKeyExportOptions): JsonWebKey;
+ /**
+ * For secret keys, this property represents the size of the key in bytes. This
+ * property is `undefined` for asymmetric keys.
+ * @since v11.6.0
+ */
+ symmetricKeySize?: number | undefined;
+ /**
+ * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
+ * or `'private'` for private (asymmetric) keys.
+ * @since v11.6.0
+ */
+ type: KeyObjectType;
+ }
+ type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
+ type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
+ type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
+ type BinaryLike = string | NodeJS.ArrayBufferView;
+ type CipherKey = BinaryLike | KeyObject;
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number | undefined;
+ }
+ interface CipherOCBOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ /**
+ * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `password` is used to derive the cipher key and initialization vector (IV).
+ * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`.
+ *
+ * The implementation of `crypto.createCipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
+ * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
+ * they are used in order to avoid the risk of IV reuse that causes
+ * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
+ /**
+ * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
+ * initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+ * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a
+ * given IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB;
+ function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
+ /**
+ * Instances of the `Cipher` class are used to encrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain unencrypted
+ * data is written to produce encrypted data on the readable side, or
+ * * Using the `cipher.update()` and `cipher.final()` methods to produce
+ * the encrypted data.
+ *
+ * The {@link createCipher} or {@link createCipheriv} methods are
+ * used to create `Cipher` instances. `Cipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Cipher` objects as streams:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * // Once we have the key and iv, we can create and use the cipher...
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = '';
+ * cipher.setEncoding('hex');
+ *
+ * cipher.on('data', (chunk) => encrypted += chunk);
+ * cipher.on('end', () => console.log(encrypted));
+ *
+ * cipher.write('some clear text data');
+ * cipher.end();
+ * });
+ * });
+ * ```
+ *
+ * Example: Using `Cipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'fs';
+ *
+ * import {
+ * pipeline
+ * } from 'stream';
+ *
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.js');
+ * const output = createWriteStream('test.enc');
+ *
+ * pipeline(input, cipher, output, (err) => {
+ * if (err) throw err;
+ * });
+ * });
+ * });
+ * ```
+ *
+ * Example: Using the `cipher.update()` and `cipher.final()` methods:
+ *
+ * ```js
+ * const {
+ * scrypt,
+ * randomFill,
+ * createCipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ *
+ * // First, we'll generate the key. The key length is dependent on the algorithm.
+ * // In this case for aes192, it is 24 bytes (192 bits).
+ * scrypt(password, 'salt', 24, (err, key) => {
+ * if (err) throw err;
+ * // Then, we'll generate a random initialization vector
+ * randomFill(new Uint8Array(16), (err, iv) => {
+ * if (err) throw err;
+ *
+ * const cipher = createCipheriv(algorithm, key, iv);
+ *
+ * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
+ * encrypted += cipher.final('hex');
+ * console.log(encrypted);
+ * });
+ * });
+ * ```
+ * @since v0.1.94
+ */
+ class Cipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the cipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
+ * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
+ * thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the data.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: BinaryLike): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `cipher.final()` method has been called, the `Cipher` object can no
+ * longer be used to encrypt data. Attempts to call `cipher.final()` more than
+ * once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When using block encryption algorithms, the `Cipher` class will automatically
+ * add padding to the input data to the appropriate block size. To disable the
+ * default padding call `cipher.setAutoPadding(false)`.
+ *
+ * When `autoPadding` is `false`, the length of the entire input data must be a
+ * multiple of the cipher's block size or `cipher.final()` will throw an error.
+ * Disabling automatic padding is useful for non-standard padding, for instance
+ * using `0x0` instead of PKCS padding.
+ *
+ * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(autoPadding?: boolean): this;
+ }
+ interface CipherCCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherGCM extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherOCB extends Cipher {
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ getAuthTag(): Buffer;
+ }
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
+ * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
+ * iteration, and no salt. The lack of salt allows dictionary attacks as the same
+ * password always creates the same key. The low iteration count and
+ * non-cryptographically secure hash algorithm allow passwords to be tested very
+ * rapidly.
+ *
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
+ * developers derive a key and IV on
+ * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
+ * @since v0.1.94
+ * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead.
+ * @param options `stream.transform` options
+ */
+ function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
+ /**
+ * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
+ *
+ * The `options` argument controls stream behavior and is optional except when a
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
+ * to those with the specified length.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+ *
+ * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+ * display the available cipher algorithms.
+ *
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+ * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+ * a `KeyObject` of type `secret`. If the cipher does not need
+ * an initialization vector, `iv` may be `null`.
+ *
+ * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * Initialization vectors should be unpredictable and unique; ideally, they will be
+ * cryptographically random. They do not have to be secret: IVs are typically just
+ * added to ciphertext messages unencrypted. It may sound contradictory that
+ * something has to be unpredictable and unique, but does not have to be secret;
+ * remember that an attacker must not be able to predict ahead of time what a given
+ * IV will be.
+ * @since v0.1.94
+ * @param options `stream.transform` options
+ */
+ function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB;
+ function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
+ /**
+ * Instances of the `Decipher` class are used to decrypt data. The class can be
+ * used in one of two ways:
+ *
+ * * As a `stream` that is both readable and writable, where plain encrypted
+ * data is written to produce unencrypted data on the readable side, or
+ * * Using the `decipher.update()` and `decipher.final()` methods to
+ * produce the unencrypted data.
+ *
+ * The {@link createDecipher} or {@link createDecipheriv} methods are
+ * used to create `Decipher` instances. `Decipher` objects are not to be created
+ * directly using the `new` keyword.
+ *
+ * Example: Using `Decipher` objects as streams:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Key length is dependent on the algorithm. In this case for aes192, it is
+ * // 24 bytes (192 bits).
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * let decrypted = '';
+ * decipher.on('readable', () => {
+ * while (null !== (chunk = decipher.read())) {
+ * decrypted += chunk.toString('utf8');
+ * }
+ * });
+ * decipher.on('end', () => {
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * });
+ *
+ * // Encrypted with same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * decipher.write(encrypted, 'hex');
+ * decipher.end();
+ * ```
+ *
+ * Example: Using `Decipher` and piped streams:
+ *
+ * ```js
+ * import {
+ * createReadStream,
+ * createWriteStream,
+ * } from 'fs';
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * const input = createReadStream('test.enc');
+ * const output = createWriteStream('test.js');
+ *
+ * input.pipe(decipher).pipe(output);
+ * ```
+ *
+ * Example: Using the `decipher.update()` and `decipher.final()` methods:
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * scryptSync,
+ * createDecipheriv
+ * } = await import('crypto');
+ *
+ * const algorithm = 'aes-192-cbc';
+ * const password = 'Password used to generate key';
+ * // Use the async `crypto.scrypt()` instead.
+ * const key = scryptSync(password, 'salt', 24);
+ * // The IV is usually passed along with the ciphertext.
+ * const iv = Buffer.alloc(16, 0); // Initialization vector.
+ *
+ * const decipher = createDecipheriv(algorithm, key, iv);
+ *
+ * // Encrypted using same algorithm, key and iv.
+ * const encrypted =
+ * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+ * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
+ * decrypted += decipher.final('utf8');
+ * console.log(decrypted);
+ * // Prints: some clear text data
+ * ```
+ * @since v0.1.94
+ */
+ class Decipher extends stream.Transform {
+ private constructor();
+ /**
+ * Updates the decipher with `data`. If the `inputEncoding` argument is given,
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
+ * ignored.
+ *
+ * The `outputEncoding` specifies the output format of the enciphered
+ * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+ *
+ * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
+ * being thrown.
+ * @since v0.1.94
+ * @param inputEncoding The `encoding` of the `data` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ update(data: NodeJS.ArrayBufferView): Buffer;
+ update(data: string, inputEncoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+ update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+ /**
+ * Once the `decipher.final()` method has been called, the `Decipher` object can
+ * no longer be used to decrypt data. Attempts to call `decipher.final()` more
+ * than once will result in an error being thrown.
+ * @since v0.1.94
+ * @param outputEncoding The `encoding` of the return value.
+ * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+ */
+ final(): Buffer;
+ final(outputEncoding: BufferEncoding): string;
+ /**
+ * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
+ * removing padding.
+ *
+ * Turning auto padding off will only work if the input data's length is a
+ * multiple of the ciphers block size.
+ *
+ * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
+ * @since v0.7.1
+ * @param [autoPadding=true]
+ * @return for method chaining.
+ */
+ setAutoPadding(auto_padding?: boolean): this;
+ }
+ interface DecipherCCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherGCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface DecipherOCB extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(
+ buffer: NodeJS.ArrayBufferView,
+ options?: {
+ plaintextLength: number;
+ }
+ ): this;
+ }
+ interface PrivateKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
+ passphrase?: string | Buffer | undefined;
+ }
+ interface PublicKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat | undefined;
+ type?: 'pkcs1' | 'spki' | undefined;
+ }
+ /**
+ * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKey
+ * } = await import('crypto');
+ *
+ * generateKey('hmac', { length: 64 }, (err, key) => {
+ * if (err) throw err;
+ * console.log(key.export().toString('hex')); // 46e..........620
+ * });
+ * ```
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKey(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ },
+ callback: (err: Error | null, key: KeyObject) => void
+ ): void;
+ /**
+ * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
+ *
+ * ```js
+ * const {
+ * generateKeySync
+ * } = await import('crypto');
+ *
+ * const key = generateKeySync('hmac', { length: 64 });
+ * console.log(key.export().toString('hex')); // e89..........41e
+ * ```
+ * @since v15.0.0
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+ */
+ function generateKeySync(
+ type: 'hmac' | 'aes',
+ options: {
+ length: number;
+ }
+ ): KeyObject;
+ interface JsonWebKeyInput {
+ key: JsonWebKey;
+ format: 'jwk';
+ }
+ /**
+ * Creates and returns a new key object containing a private key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
+ *
+ * If the private key is encrypted, a `passphrase` must be specified. The length
+ * of the passphrase is limited to 1024 bytes.
+ * @since v11.6.0
+ */
+ function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a public key. If `key` is a
+ * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
+ * otherwise, `key` must be an object with the properties described above.
+ *
+ * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
+ *
+ * Because public keys can be derived from private keys, a private key may be
+ * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
+ * returned `KeyObject` will be `'public'` and that the private key cannot be
+ * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
+ * and it will be impossible to extract the private key from the returned object.
+ * @since v11.6.0
+ */
+ function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
+ /**
+ * Creates and returns a new key object containing a secret key for symmetric
+ * encryption or `Hmac`.
+ * @since v11.6.0
+ * @param encoding The string encoding when `key` is a string.
+ */
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+ function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
+ /**
+ * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
+ * Optional `options` argument controls the `stream.Writable` behavior.
+ *
+ * In some cases, a `Sign` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
+ type DSAEncoding = 'der' | 'ieee-p1363';
+ interface SigningOptions {
+ /**
+ * @See crypto.constants.RSA_PKCS1_PADDING
+ */
+ padding?: number | undefined;
+ saltLength?: number | undefined;
+ dsaEncoding?: DSAEncoding | undefined;
+ }
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+ interface SignKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+ interface VerifyKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ type KeyLike = string | Buffer | KeyObject;
+ /**
+ * The `Sign` class is a utility for generating signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
+ * * Using the `sign.update()` and `sign.sign()` methods to produce the
+ * signature.
+ *
+ * The {@link createSign} method is used to create `Sign` instances. The
+ * argument is the string name of the hash function to use. `Sign` objects are not
+ * to be created directly using the `new` keyword.
+ *
+ * Example: Using `Sign` and `Verify` objects as streams:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify
+ * } = await import('crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('ec', {
+ * namedCurve: 'sect239k1'
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.write('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey, 'hex');
+ *
+ * const verify = createVerify('SHA256');
+ * verify.write('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature, 'hex'));
+ * // Prints: true
+ * ```
+ *
+ * Example: Using the `sign.update()` and `verify.update()` methods:
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync,
+ * createSign,
+ * createVerify
+ * } = await import('crypto');
+ *
+ * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
+ * modulusLength: 2048,
+ * });
+ *
+ * const sign = createSign('SHA256');
+ * sign.update('some data to sign');
+ * sign.end();
+ * const signature = sign.sign(privateKey);
+ *
+ * const verify = createVerify('SHA256');
+ * verify.update('some data to sign');
+ * verify.end();
+ * console.log(verify.verify(publicKey, signature));
+ * // Prints: true
+ * ```
+ * @since v0.1.92
+ */
+ class Sign extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Sign` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `encoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): this;
+ update(data: string, inputEncoding: Encoding): this;
+ /**
+ * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ *
+ * The `Sign` object can not be again used after `sign.sign()` method has been
+ * called. Multiple calls to `sign.sign()` will result in an error being thrown.
+ * @since v0.1.92
+ */
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
+ }
+ /**
+ * Creates and returns a `Verify` object that uses the given algorithm.
+ * Use {@link getHashes} to obtain an array of names of the available
+ * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
+ *
+ * In some cases, a `Verify` instance can be created using the name of a signature
+ * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+ * the corresponding digest algorithm. This does not work for all signature
+ * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+ * algorithm names.
+ * @since v0.1.92
+ * @param options `stream.Writable` options
+ */
+ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+ /**
+ * The `Verify` class is a utility for verifying signatures. It can be used in one
+ * of two ways:
+ *
+ * * As a writable `stream` where written data is used to validate against the
+ * supplied signature, or
+ * * Using the `verify.update()` and `verify.verify()` methods to verify
+ * the signature.
+ *
+ * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
+ *
+ * See `Sign` for examples.
+ * @since v0.1.92
+ */
+ class Verify extends stream.Writable {
+ private constructor();
+ /**
+ * Updates the `Verify` content with the given `data`, the encoding of which
+ * is given in `inputEncoding`.
+ * If `inputEncoding` is not provided, and the `data` is a string, an
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+ *
+ * This can be called many times with new data as it is streamed.
+ * @since v0.1.92
+ * @param inputEncoding The `encoding` of the `data` string.
+ */
+ update(data: BinaryLike): Verify;
+ update(data: string, inputEncoding: Encoding): Verify;
+ /**
+ * Verifies the provided data using the given `object` and `signature`.
+ *
+ * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
+ * object, the following additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the data, in
+ * the `signatureEncoding`.
+ * If a `signatureEncoding` is specified, the `signature` is expected to be a
+ * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * The `verify` object can not be used again after `verify.verify()` has been
+ * called. Multiple calls to `verify.verify()` will result in an error being
+ * thrown.
+ *
+ * Because public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.1.92
+ */
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
+ }
+ /**
+ * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
+ * optional specific `generator`.
+ *
+ * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
+ *
+ * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
+ * a `Buffer`, `TypedArray`, or `DataView` is expected.
+ *
+ * If `generatorEncoding` is specified, `generator` is expected to be a string;
+ * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
+ * @since v0.11.12
+ * @param primeEncoding The `encoding` of the `prime` string.
+ * @param [generator=2]
+ * @param generatorEncoding The `encoding` of the `generator` string.
+ */
+ function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ /**
+ * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
+ * exchanges.
+ *
+ * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const {
+ * createDiffieHellman
+ * } = await import('crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createDiffieHellman(2048);
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * // OK
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * ```
+ * @since v0.5.0
+ */
+ class DiffieHellman {
+ private constructor();
+ /**
+ * Generates private and public Diffie-Hellman key values, and returns
+ * the public key in the specified `encoding`. This key should be
+ * transferred to the other party.
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using the specified `inputEncoding`, and secret is
+ * encoded using specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
+ * @since v0.5.0
+ * @param inputEncoding The `encoding` of an `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman prime in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrime(): Buffer;
+ getPrime(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman generator in the specified `encoding`.
+ * If `encoding` is provided a string is
+ * returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getGenerator(): Buffer;
+ getGenerator(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman public key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Returns the Diffie-Hellman private key in the specified `encoding`.
+ * If `encoding` is provided a
+ * string is returned; otherwise a `Buffer` is returned.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the return value.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
+ * to be a string. If no `encoding` is provided, `publicKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `publicKey` string.
+ */
+ setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
+ setPublicKey(publicKey: string, encoding: BufferEncoding): void;
+ /**
+ * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
+ * to be a string. If no `encoding` is provided, `privateKey` is expected
+ * to be a `Buffer`, `TypedArray`, or `DataView`.
+ * @since v0.5.0
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
+ /**
+ * A bit field containing any warnings and/or errors resulting from a check
+ * performed during initialization of the `DiffieHellman` object.
+ *
+ * The following values are valid for this property (as defined in `constants`module):
+ *
+ * * `DH_CHECK_P_NOT_SAFE_PRIME`
+ * * `DH_CHECK_P_NOT_PRIME`
+ * * `DH_UNABLE_TO_CHECK_GENERATOR`
+ * * `DH_NOT_SUITABLE_GENERATOR`
+ * @since v0.11.12
+ */
+ verifyError: number;
+ }
+ /**
+ * The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
+ * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
+ * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
+ *
+ * ```js
+ * const { createDiffieHellmanGroup } = await import('node:crypto');
+ * const dh = createDiffieHellmanGroup('modp1');
+ * ```
+ * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
+ * ```bash
+ * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
+ * modp1 # 768 bits
+ * modp2 # 1024 bits
+ * modp5 # 1536 bits
+ * modp14 # 2048 bits
+ * modp15 # etc.
+ * modp16
+ * modp17
+ * modp18
+ * ```
+ * @since v0.7.5
+ */
+ const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
+ interface DiffieHellmanGroupConstructor {
+ new(name: string): DiffieHellmanGroup;
+ (name: string): DiffieHellmanGroup;
+ readonly prototype: DiffieHellmanGroup;
+ }
+ type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
+ /**
+ * Creates a predefined `DiffieHellmanGroup` key exchange object. The
+ * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`,
+ * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
+ * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
+ * the keys (with `diffieHellman.setPublicKey()`, for example). The
+ * advantage of using this method is that the parties do not have to
+ * generate nor exchange a group modulus beforehand, saving both processor
+ * and communication time.
+ *
+ * Example (obtaining a shared secret):
+ *
+ * ```js
+ * const {
+ * getDiffieHellman
+ * } = await import('crypto');
+ * const alice = getDiffieHellman('modp14');
+ * const bob = getDiffieHellman('modp14');
+ *
+ * alice.generateKeys();
+ * bob.generateKeys();
+ *
+ * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
+ * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
+ *
+ * // aliceSecret and bobSecret should be the same
+ * console.log(aliceSecret === bobSecret);
+ * ```
+ * @since v0.7.5
+ */
+ function getDiffieHellman(groupName: string): DiffieHellmanGroup;
+ /**
+ * An alias for {@link getDiffieHellman}
+ * @since v0.9.3
+ */
+ function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
+ /**
+ * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
+ * thrown if any of the input arguments specify invalid values or types.
+ *
+ * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
+ * please specify a `digest` explicitly.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2
+ * } = await import('crypto');
+ *
+ * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * ```
+ *
+ * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been
+ * deprecated and use should be avoided.
+ *
+ * ```js
+ * import crypto from 'crypto';
+ * crypto.DEFAULT_ENCODING = 'hex';
+ * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey); // '3745e48...aa39b34'
+ * });
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ * @since v0.5.5
+ */
+ function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
+ * implementation. A selected HMAC digest algorithm specified by `digest` is
+ * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
+ *
+ * If an error occurs an `Error` will be thrown, otherwise the derived key will be
+ * returned as a `Buffer`.
+ *
+ * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
+ * please specify a `digest` explicitly.
+ *
+ * The `iterations` argument must be a number set as high as possible. The
+ * higher the number of iterations, the more secure the derived key will be,
+ * but will take a longer amount of time to complete.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * ```js
+ * const {
+ * pbkdf2Sync
+ * } = await import('crypto');
+ *
+ * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
+ * console.log(key.toString('hex')); // '3745e48...08d59ae'
+ * ```
+ *
+ * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use
+ * should be avoided.
+ *
+ * ```js
+ * import crypto from 'crypto';
+ * crypto.DEFAULT_ENCODING = 'hex';
+ * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
+ * console.log(key); // '3745e48...aa39b34'
+ * ```
+ *
+ * An array of supported digest functions can be retrieved using {@link getHashes}.
+ * @since v0.9.3
+ */
+ function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
+ /**
+ * Generates cryptographically strong pseudorandom data. The `size` argument
+ * is a number indicating the number of bytes to generate.
+ *
+ * If a `callback` function is provided, the bytes are generated asynchronously
+ * and the `callback` function is invoked with two arguments: `err` and `buf`.
+ * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomBytes
+ * } = await import('crypto');
+ *
+ * randomBytes(256, (err, buf) => {
+ * if (err) throw err;
+ * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * });
+ * ```
+ *
+ * If the `callback` function is not provided, the random bytes are generated
+ * synchronously and returned as a `Buffer`. An error will be thrown if
+ * there is a problem generating the bytes.
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomBytes
+ * } = await import('crypto');
+ *
+ * const buf = randomBytes(256);
+ * console.log(
+ * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
+ * ```
+ *
+ * The `crypto.randomBytes()` method will not complete until there is
+ * sufficient entropy available.
+ * This should normally never take longer than a few milliseconds. The only time
+ * when generating the random bytes may conceivably block for a longer period of
+ * time is right after boot, when the whole system is still low on entropy.
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomBytes()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomBytes` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v0.5.8
+ * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
+ * @return if the `callback` function is not provided.
+ */
+ function randomBytes(size: number): Buffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ function pseudoRandomBytes(size: number): Buffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ /**
+ * Return a random integer `n` such that `min <= n < max`. This
+ * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
+ *
+ * The range (`max - min`) must be less than 248. `min` and `max` must
+ * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+ *
+ * If the `callback` function is not provided, the random integer is
+ * generated synchronously.
+ *
+ * ```js
+ * // Asynchronous
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * randomInt(3, (err, n) => {
+ * if (err) throw err;
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * });
+ * ```
+ *
+ * ```js
+ * // Synchronous
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * const n = randomInt(3);
+ * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+ * ```
+ *
+ * ```js
+ * // With `min` argument
+ * const {
+ * randomInt
+ * } = await import('crypto');
+ *
+ * const n = randomInt(1, 7);
+ * console.log(`The dice rolled: ${n}`);
+ * ```
+ * @since v14.10.0, v12.19.0
+ * @param [min=0] Start of random range (inclusive).
+ * @param max End of random range (exclusive).
+ * @param callback `function(err, n) {}`.
+ */
+ function randomInt(max: number): number;
+ function randomInt(min: number, max: number): number;
+ function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+ function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+ /**
+ * Synchronous version of {@link randomFill}.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFillSync } = await import('crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * console.log(randomFillSync(buf).toString('hex'));
+ *
+ * randomFillSync(buf, 5);
+ * console.log(buf.toString('hex'));
+ *
+ * // The above is equivalent to the following:
+ * randomFillSync(buf, 5, 5);
+ * console.log(buf.toString('hex'));
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFillSync } = await import('crypto');
+ *
+ * const a = new Uint32Array(10);
+ * console.log(Buffer.from(randomFillSync(a).buffer,
+ * a.byteOffset, a.byteLength).toString('hex'));
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * console.log(Buffer.from(randomFillSync(b).buffer,
+ * b.byteOffset, b.byteLength).toString('hex'));
+ *
+ * const c = new ArrayBuffer(10);
+ * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
+ * ```
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @return The object passed as `buffer` argument.
+ */
+ function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
+ /**
+ * This function is similar to {@link randomBytes} but requires the first
+ * argument to be a `Buffer` that will be filled. It also
+ * requires that a callback is passed in.
+ *
+ * If the `callback` function is not provided, an error will be thrown.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFill } = await import('crypto');
+ *
+ * const buf = Buffer.alloc(10);
+ * randomFill(buf, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * randomFill(buf, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ *
+ * // The above is equivalent to the following:
+ * randomFill(buf, 5, 5, (err, buf) => {
+ * if (err) throw err;
+ * console.log(buf.toString('hex'));
+ * });
+ * ```
+ *
+ * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
+ *
+ * While this includes instances of `Float32Array` and `Float64Array`, this
+ * function should not be used to generate random floating-point numbers. The
+ * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
+ * contains finite numbers only, they are not drawn from a uniform random
+ * distribution and have no meaningful lower or upper bounds.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { randomFill } = await import('crypto');
+ *
+ * const a = new Uint32Array(10);
+ * randomFill(a, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const b = new DataView(new ArrayBuffer(10));
+ * randomFill(b, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+ * .toString('hex'));
+ * });
+ *
+ * const c = new ArrayBuffer(10);
+ * randomFill(c, (err, buf) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(buf).toString('hex'));
+ * });
+ * ```
+ *
+ * This API uses libuv's threadpool, which can have surprising and
+ * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+ *
+ * The asynchronous version of `crypto.randomFill()` is carried out in a single
+ * threadpool request. To minimize threadpool task length variation, partition
+ * large `randomFill` requests when doing so as part of fulfilling a client
+ * request.
+ * @since v7.10.0, v6.13.0
+ * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+ * @param [offset=0]
+ * @param [size=buffer.length - offset]
+ * @param callback `function(err, buf) {}`.
+ */
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
+ interface ScryptOptions {
+ cost?: number | undefined;
+ blockSize?: number | undefined;
+ parallelization?: number | undefined;
+ N?: number | undefined;
+ r?: number | undefined;
+ p?: number | undefined;
+ maxmem?: number | undefined;
+ }
+ /**
+ * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
+ * callback as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scrypt
+ * } = await import('crypto');
+ *
+ * // Using the factory defaults.
+ * scrypt('password', 'salt', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
+ * });
+ * // Using a custom N parameter. Must be a power of two.
+ * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
+ * });
+ * ```
+ * @since v10.5.0
+ */
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
+ /**
+ * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+ * key derivation function that is designed to be expensive computationally and
+ * memory-wise in order to make brute-force attacks unrewarding.
+ *
+ * The `salt` should be as unique as possible. It is recommended that a salt is
+ * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+ *
+ * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+ *
+ * An exception is thrown when key derivation fails, otherwise the derived key is
+ * returned as a `Buffer`.
+ *
+ * An exception is thrown when any of the input arguments specify invalid values
+ * or types.
+ *
+ * ```js
+ * const {
+ * scryptSync
+ * } = await import('crypto');
+ * // Using the factory defaults.
+ *
+ * const key1 = scryptSync('password', 'salt', 64);
+ * console.log(key1.toString('hex')); // '3745e48...08d59ae'
+ * // Using a custom N parameter. Must be a power of two.
+ * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
+ * console.log(key2.toString('hex')); // '3745e48...aa39b34'
+ * ```
+ * @since v10.5.0
+ */
+ function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
+ interface RsaPublicKey {
+ key: KeyLike;
+ padding?: number | undefined;
+ }
+ interface RsaPrivateKey {
+ key: KeyLike;
+ passphrase?: string | undefined;
+ /**
+ * @default 'sha1'
+ */
+ oaepHash?: string | undefined;
+ oaepLabel?: NodeJS.TypedArray | undefined;
+ padding?: number | undefined;
+ }
+ /**
+ * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
+ * the corresponding private key, for example using {@link privateDecrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v0.11.14
+ */
+ function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
+ * the corresponding private key, for example using {@link privateEncrypt}.
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ *
+ * Because RSA public keys can be derived from private keys, a private key may
+ * be passed instead of a public key.
+ * @since v1.1.0
+ */
+ function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
+ * the corresponding public key, for example using {@link publicEncrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
+ * @since v0.11.14
+ */
+ function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
+ * the corresponding public key, for example using {@link publicDecrypt}.
+ *
+ * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
+ * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
+ * @since v1.1.0
+ */
+ function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ /**
+ * ```js
+ * const {
+ * getCiphers
+ * } = await import('crypto');
+ *
+ * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array with the names of the supported cipher algorithms.
+ */
+ function getCiphers(): string[];
+ /**
+ * ```js
+ * const {
+ * getCurves
+ * } = await import('crypto');
+ *
+ * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
+ * ```
+ * @since v2.3.0
+ * @return An array with the names of the supported elliptic curves.
+ */
+ function getCurves(): string[];
+ /**
+ * @since v10.0.0
+ * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
+ */
+ function getFips(): 1 | 0;
+ /**
+ * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available.
+ * @since v10.0.0
+ * @param bool `true` to enable FIPS mode.
+ */
+ function setFips(bool: boolean): void;
+ /**
+ * ```js
+ * const {
+ * getHashes
+ * } = await import('crypto');
+ *
+ * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
+ * ```
+ * @since v0.9.3
+ * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
+ */
+ function getHashes(): string[];
+ /**
+ * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
+ * key exchanges.
+ *
+ * Instances of the `ECDH` class can be created using the {@link createECDH} function.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const {
+ * createECDH
+ * } = await import('crypto');
+ *
+ * // Generate Alice's keys...
+ * const alice = createECDH('secp521r1');
+ * const aliceKey = alice.generateKeys();
+ *
+ * // Generate Bob's keys...
+ * const bob = createECDH('secp521r1');
+ * const bobKey = bob.generateKeys();
+ *
+ * // Exchange and generate the secret...
+ * const aliceSecret = alice.computeSecret(bobKey);
+ * const bobSecret = bob.computeSecret(aliceKey);
+ *
+ * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+ * // OK
+ * ```
+ * @since v0.11.14
+ */
+ class ECDH {
+ private constructor();
+ /**
+ * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
+ * format specified by `format`. The `format` argument specifies point encoding
+ * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
+ * interpreted using the specified `inputEncoding`, and the returned key is encoded
+ * using the specified `outputEncoding`.
+ *
+ * Use {@link getCurves} to obtain a list of available curve names.
+ * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
+ * the name and description of each available elliptic curve.
+ *
+ * If `format` is not specified the point will be returned in `'uncompressed'`format.
+ *
+ * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * Example (uncompressing a key):
+ *
+ * ```js
+ * const {
+ * createECDH,
+ * ECDH
+ * } = await import('crypto');
+ *
+ * const ecdh = createECDH('secp256k1');
+ * ecdh.generateKeys();
+ *
+ * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
+ *
+ * const uncompressedKey = ECDH.convertKey(compressedKey,
+ * 'secp256k1',
+ * 'hex',
+ * 'hex',
+ * 'uncompressed');
+ *
+ * // The converted key and the uncompressed public key should be the same
+ * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
+ * ```
+ * @since v10.0.0
+ * @param inputEncoding The `encoding` of the `key` string.
+ * @param outputEncoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ static convertKey(
+ key: BinaryLike,
+ curve: string,
+ inputEncoding?: BinaryToTextEncoding,
+ outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
+ format?: 'uncompressed' | 'compressed' | 'hybrid'
+ ): Buffer | string;
+ /**
+ * Generates private and public EC Diffie-Hellman key values, and returns
+ * the public key in the specified `format` and `encoding`. This key should be
+ * transferred to the other party.
+ *
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @param [format='uncompressed']
+ */
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Computes the shared secret using `otherPublicKey` as the other
+ * party's public key and returns the computed shared secret. The supplied
+ * key is interpreted using specified `inputEncoding`, and the returned secret
+ * is encoded using the specified `outputEncoding`.
+ * If the `inputEncoding` is not
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
+ *
+ * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
+ *
+ * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
+ * usually supplied from a remote user over an insecure network,
+ * be sure to handle this exception accordingly.
+ * @since v0.11.14
+ * @param inputEncoding The `encoding` of the `otherPublicKey` string.
+ * @param outputEncoding The `encoding` of the return value.
+ */
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
+ /**
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the return value.
+ * @return The EC Diffie-Hellman in the specified `encoding`.
+ */
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ /**
+ * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
+ *
+ * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+ * returned.
+ * @since v0.11.14
+ * @param [encoding] The `encoding` of the return value.
+ * @param [format='uncompressed']
+ * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
+ */
+ getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ /**
+ * Sets the EC Diffie-Hellman private key.
+ * If `encoding` is provided, `privateKey` is expected
+ * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
+ *
+ * If `privateKey` is not valid for the curve specified when the `ECDH` object was
+ * created, an error is thrown. Upon setting the private key, the associated
+ * public point (key) is also generated and set in the `ECDH` object.
+ * @since v0.11.14
+ * @param encoding The `encoding` of the `privateKey` string.
+ */
+ setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+ setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
+ }
+ /**
+ * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
+ * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
+ * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
+ * and description of each available elliptic curve.
+ * @since v0.11.14
+ */
+ function createECDH(curveName: string): ECDH;
+ /**
+ * This function is based on a constant-time algorithm.
+ * Returns true if `a` is equal to `b`, without leaking timing information that
+ * would allow an attacker to guess one of the values. This is suitable for
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
+ *
+ * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
+ * must have the same byte length. An error is thrown if `a` and `b` have
+ * different byte lengths.
+ *
+ * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
+ * entry, such as `Uint16Array`, the result will be computed using the platform
+ * byte order.
+ *
+ * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
+ * is timing-safe. Care should be taken to ensure that the surrounding code does
+ * not introduce timing vulnerabilities.
+ * @since v6.6.0
+ */
+ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+ /** @deprecated since v10.0.0 */
+ const DEFAULT_ENCODING: BufferEncoding;
+ type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
+ type KeyFormat = 'pem' | 'der';
+ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
+ format: T;
+ cipher?: string | undefined;
+ passphrase?: string | undefined;
+ }
+ interface KeyPairKeyObjectResult {
+ publicKey: KeyObject;
+ privateKey: KeyObject;
+ }
+ interface ED25519KeyPairKeyObjectOptions {}
+ interface ED448KeyPairKeyObjectOptions {}
+ interface X25519KeyPairKeyObjectOptions {}
+ interface X448KeyPairKeyObjectOptions {}
+ interface ECKeyPairKeyObjectOptions {
+ /**
+ * Name of the curve to use
+ */
+ namedCurve: string;
+ }
+ interface RSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ }
+ interface RSAPSSKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ }
+ interface DSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ }
+ interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs1' | 'pkcs8';
+ };
+ }
+ interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Public exponent
+ * @default 0x10001
+ */
+ publicExponent?: number | undefined;
+ /**
+ * Name of the message digest
+ */
+ hashAlgorithm?: string;
+ /**
+ * Name of the message digest used by MGF1
+ */
+ mgf1HashAlgorithm?: string;
+ /**
+ * Minimal salt length in bytes
+ */
+ saltLength?: string;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'sec1' | 'pkcs8';
+ };
+ }
+ interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+ interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
+ publicKey: T1;
+ privateKey: T2;
+ }
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * When encoding public keys, it is recommended to use `'spki'`. When encoding
+ * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
+ * and to keep the passphrase confidential.
+ *
+ * ```js
+ * const {
+ * generateKeyPairSync
+ * } = await import('crypto');
+ *
+ * const {
+ * publicKey,
+ * privateKey,
+ * } = generateKeyPairSync('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem'
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret'
+ * }
+ * });
+ * ```
+ *
+ * The return value `{ publicKey, privateKey }` represents the generated key pair.
+ * When PEM encoding was selected, the respective key will be a string, otherwise
+ * it will be a buffer containing the data encoded as DER.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+ /**
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
+ *
+ * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+ * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+ * the respective part of the key is returned as a `KeyObject`.
+ *
+ * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
+ *
+ * ```js
+ * const {
+ * generateKeyPair
+ * } = await import('crypto');
+ *
+ * generateKeyPair('rsa', {
+ * modulusLength: 4096,
+ * publicKeyEncoding: {
+ * type: 'spki',
+ * format: 'pem'
+ * },
+ * privateKeyEncoding: {
+ * type: 'pkcs8',
+ * format: 'pem',
+ * cipher: 'aes-256-cbc',
+ * passphrase: 'top secret'
+ * }
+ * }, (err, publicKey, privateKey) => {
+ * // Handle errors and use the generated key pair.
+ * });
+ * ```
+ *
+ * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
+ * @since v10.12.0
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
+ */
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
+ function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
+ namespace generateKeyPair {
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'rsa-pss',
+ options: RSAPSSKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'pem'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'der'>
+ ): Promise<{
+ publicKey: string;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'pem'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: string;
+ }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'der'>
+ ): Promise<{
+ publicKey: Buffer;
+ privateKey: Buffer;
+ }>;
+ function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ }
+ /**
+ * Calculates and returns the signature for `data` using the given private key and
+ * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
+ * dependent upon the key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPrivateKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ function sign(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
+ callback: (error: Error | null, data: Buffer) => void
+ ): void;
+ /**
+ * Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
+ * key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+ * passed to {@link createPublicKey}. If it is an object, the following
+ * additional properties can be passed:
+ *
+ * The `signature` argument is the previously calculated signature for the `data`.
+ *
+ * Because public keys can be derived from private keys, a private key or a public
+ * key may be passed for `key`.
+ *
+ * If the `callback` function is provided this function uses libuv's threadpool.
+ * @since v12.0.0
+ */
+ function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ function verify(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
+ signature: NodeJS.ArrayBufferView,
+ callback: (error: Error | null, result: boolean) => void
+ ): void;
+ /**
+ * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
+ * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
+ * @since v13.9.0, v12.17.0
+ */
+ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
+ type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts';
+ interface CipherInfoOptions {
+ /**
+ * A test key length.
+ */
+ keyLength?: number | undefined;
+ /**
+ * A test IV length.
+ */
+ ivLength?: number | undefined;
+ }
+ interface CipherInfo {
+ /**
+ * The name of the cipher.
+ */
+ name: string;
+ /**
+ * The nid of the cipher.
+ */
+ nid: number;
+ /**
+ * The block size of the cipher in bytes.
+ * This property is omitted when mode is 'stream'.
+ */
+ blockSize?: number | undefined;
+ /**
+ * The expected or default initialization vector length in bytes.
+ * This property is omitted if the cipher does not use an initialization vector.
+ */
+ ivLength?: number | undefined;
+ /**
+ * The expected or default key length in bytes.
+ */
+ keyLength: number;
+ /**
+ * The cipher mode.
+ */
+ mode: CipherMode;
+ }
+ /**
+ * Returns information about a given cipher.
+ *
+ * Some ciphers accept variable length keys and initialization vectors. By default,
+ * the `crypto.getCipherInfo()` method will return the default values for these
+ * ciphers. To test if a given key length or iv length is acceptable for given
+ * cipher, use the `keyLength` and `ivLength` options. If the given values are
+ * unacceptable, `undefined` will be returned.
+ * @since v15.0.0
+ * @param nameOrNid The name or nid of the cipher to query.
+ */
+ function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
+ /**
+ * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
+ *
+ * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
+ * otherwise `err` will be `null`. The successfully generated `derivedKey` will
+ * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
+ * of the input arguments specify invalid values or types.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * hkdf
+ * } = await import('crypto');
+ *
+ * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => {
+ * if (err) throw err;
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * });
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. It must be at least one byte in length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void;
+ /**
+ * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
+ * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
+ *
+ * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
+ *
+ * An error will be thrown if any of the input arguments specify invalid values or
+ * types, or if the derived key cannot be generated.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const {
+ * hkdfSync
+ * } = await import('crypto');
+ *
+ * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64);
+ * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
+ * ```
+ * @since v15.0.0
+ * @param digest The digest algorithm to use.
+ * @param ikm The input keying material. It must be at least one byte in length.
+ * @param salt The salt value. Must be provided but can be zero-length.
+ * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+ * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+ * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+ */
+ function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer;
+ interface SecureHeapUsage {
+ /**
+ * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
+ */
+ total: number;
+ /**
+ * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag.
+ */
+ min: number;
+ /**
+ * The total number of bytes currently allocated from the secure heap.
+ */
+ used: number;
+ /**
+ * The calculated ratio of `used` to `total` allocated bytes.
+ */
+ utilization: number;
+ }
+ /**
+ * @since v15.6.0
+ */
+ function secureHeapUsed(): SecureHeapUsage;
+ interface RandomUUIDOptions {
+ /**
+ * By default, to improve performance,
+ * Node.js will pre-emptively generate and persistently cache enough
+ * random data to generate up to 128 random UUIDs. To generate a UUID
+ * without using the cache, set `disableEntropyCache` to `true`.
+ *
+ * @default `false`
+ */
+ disableEntropyCache?: boolean | undefined;
+ }
+ /**
+ * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
+ * cryptographic pseudorandom number generator.
+ * @since v15.6.0, v14.17.0
+ */
+ function randomUUID(options?: RandomUUIDOptions): string;
+ interface X509CheckOptions {
+ /**
+ * @default 'always'
+ */
+ subject: 'always' | 'never';
+ /**
+ * @default true
+ */
+ wildcards: boolean;
+ /**
+ * @default true
+ */
+ partialWildcards: boolean;
+ /**
+ * @default false
+ */
+ multiLabelWildcards: boolean;
+ /**
+ * @default false
+ */
+ singleLabelSubdomains: boolean;
+ }
+ /**
+ * Encapsulates an X509 certificate and provides read-only access to
+ * its information.
+ *
+ * ```js
+ * const { X509Certificate } = await import('crypto');
+ *
+ * const x509 = new X509Certificate('{... pem encoded cert ...}');
+ *
+ * console.log(x509.subject);
+ * ```
+ * @since v15.6.0
+ */
+ class X509Certificate {
+ /**
+ * Will be \`true\` if this is a Certificate Authority (CA) certificate.
+ * @since v15.6.0
+ */
+ readonly ca: boolean;
+ /**
+ * The SHA-1 fingerprint of this certificate.
+ *
+ * Because SHA-1 is cryptographically broken and because the security of SHA-1 is
+ * significantly worse than that of algorithms that are commonly used to sign
+ * certificates, consider using `x509.fingerprint256` instead.
+ * @since v15.6.0
+ */
+ readonly fingerprint: string;
+ /**
+ * The SHA-256 fingerprint of this certificate.
+ * @since v15.6.0
+ */
+ readonly fingerprint256: string;
+ /**
+ * The SHA-512 fingerprint of this certificate.
+ * @since v16.14.0
+ */
+ readonly fingerprint512: string;
+ /**
+ * The complete subject of this certificate.
+ * @since v15.6.0
+ */
+ readonly subject: string;
+ /**
+ * The subject alternative name specified for this certificate or `undefined`
+ * if not available.
+ * @since v15.6.0
+ */
+ readonly subjectAltName: string | undefined;
+ /**
+ * The information access content of this certificate or `undefined` if not
+ * available.
+ * @since v15.6.0
+ */
+ readonly infoAccess: string | undefined;
+ /**
+ * An array detailing the key usages for this certificate.
+ * @since v15.6.0
+ */
+ readonly keyUsage: string[];
+ /**
+ * The issuer identification included in this certificate.
+ * @since v15.6.0
+ */
+ readonly issuer: string;
+ /**
+ * The issuer certificate or `undefined` if the issuer certificate is not
+ * available.
+ * @since v15.9.0
+ */
+ readonly issuerCertificate?: X509Certificate | undefined;
+ /**
+ * The public key `KeyObject` for this certificate.
+ * @since v15.6.0
+ */
+ readonly publicKey: KeyObject;
+ /**
+ * A `Buffer` containing the DER encoding of this certificate.
+ * @since v15.6.0
+ */
+ readonly raw: Buffer;
+ /**
+ * The serial number of this certificate.
+ *
+ * Serial numbers are assigned by certificate authorities and do not uniquely
+ * identify certificates. Consider using `x509.fingerprint256` as a unique
+ * identifier instead.
+ * @since v15.6.0
+ */
+ readonly serialNumber: string;
+ /**
+ * The date/time from which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validFrom: string;
+ /**
+ * The date/time until which this certificate is considered valid.
+ * @since v15.6.0
+ */
+ readonly validTo: string;
+ constructor(buffer: BinaryLike);
+ /**
+ * Checks whether the certificate matches the given email address.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any email addresses.
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching email
+ * address, the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns `email` if the certificate matches, `undefined` if it does not.
+ */
+ checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
+ /**
+ * Checks whether the certificate matches the given host name.
+ *
+ * If the certificate matches the given host name, the matching subject name is
+ * returned. The returned name might be an exact match (e.g., `foo.example.com`)
+ * or it might contain wildcards (e.g., `*.example.com`). Because host name
+ * comparisons are case-insensitive, the returned subject name might also differ
+ * from the given `name` in capitalization.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching DNS name,
+ * the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
+ * @since v15.6.0
+ * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
+ */
+ checkHost(name: string, options?: X509CheckOptions): string | undefined;
+ /**
+ * Checks whether the certificate matches the given IP address (IPv4 or IPv6).
+ *
+ * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
+ * must match the given `ip` address exactly. Other subject alternative names as
+ * well as the subject field of the certificate are ignored.
+ * @since v15.6.0
+ * @return Returns `ip` if the certificate matches, `undefined` if it does not.
+ */
+ checkIP(ip: string): string | undefined;
+ /**
+ * Checks whether this certificate was issued by the given `otherCert`.
+ * @since v15.6.0
+ */
+ checkIssued(otherCert: X509Certificate): boolean;
+ /**
+ * Checks whether the public key for this certificate is consistent with
+ * the given private key.
+ * @since v15.6.0
+ * @param privateKey A private key.
+ */
+ checkPrivateKey(privateKey: KeyObject): boolean;
+ /**
+ * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded
+ * certificate.
+ * @since v15.6.0
+ */
+ toJSON(): string;
+ /**
+ * Returns information about this certificate using the legacy `certificate object` encoding.
+ * @since v15.6.0
+ */
+ toLegacyObject(): PeerCertificate;
+ /**
+ * Returns the PEM-encoded certificate.
+ * @since v15.6.0
+ */
+ toString(): string;
+ /**
+ * Verifies that this certificate was signed by the given public key.
+ * Does not perform any other validation checks on the certificate.
+ * @since v15.6.0
+ * @param publicKey A public key.
+ */
+ verify(publicKey: KeyObject): boolean;
+ }
+ type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
+ interface GeneratePrimeOptions {
+ add?: LargeNumberLike | undefined;
+ rem?: LargeNumberLike | undefined;
+ /**
+ * @default false
+ */
+ safe?: boolean | undefined;
+ bigint?: boolean | undefined;
+ }
+ interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
+ bigint: true;
+ }
+ interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
+ bigint?: false | undefined;
+ }
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+ function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void;
+ /**
+ * Generates a pseudorandom prime of `size` bits.
+ *
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
+ *
+ * The `options.add` and `options.rem` parameters can be used to enforce additional
+ * requirements, e.g., for Diffie-Hellman:
+ *
+ * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+ * condition that `prime % add = rem`.
+ * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+ * satisfy the condition that `prime % add = 1`.
+ * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+ * will instead satisfy the condition that `prime % add = 3`. This is necessary
+ * because `prime % add = 1` for `options.add > 2` would contradict the condition
+ * enforced by `options.safe`.
+ * * `options.rem` is ignored if `options.add` is not given.
+ *
+ * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
+ *
+ * By default, the prime is encoded as a big-endian sequence of octets
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+ * @since v15.8.0
+ * @param size The size (in bits) of the prime to generate.
+ */
+ function generatePrimeSync(size: number): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer;
+ function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint;
+ interface CheckPrimeOptions {
+ /**
+ * The number of Miller-Rabin probabilistic primality iterations to perform.
+ * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most 2-64 for random input.
+ * Care must be used when selecting a number of checks.
+ * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details.
+ *
+ * @default 0
+ */
+ checks?: number | undefined;
+ }
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ */
+ function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
+ function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void;
+ /**
+ * Checks the primality of the `candidate`.
+ * @since v15.8.0
+ * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+ * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
+ */
+ function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
+ /**
+ * Load and set the `engine` for some or all OpenSSL functions (selected by flags).
+ *
+ * `engine` could be either an id or a path to the engine's shared library.
+ *
+ * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default.
+ * The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`):
+ *
+ * - `crypto.constants.ENGINE_METHOD_RSA`
+ * - `crypto.constants.ENGINE_METHOD_DSA`
+ * - `crypto.constants.ENGINE_METHOD_DH`
+ * - `crypto.constants.ENGINE_METHOD_RAND`
+ * - `crypto.constants.ENGINE_METHOD_EC`
+ * - `crypto.constants.ENGINE_METHOD_CIPHERS`
+ * - `crypto.constants.ENGINE_METHOD_DIGESTS`
+ * - `crypto.constants.ENGINE_METHOD_PKEY_METHS`
+ * - `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS`
+ * - `crypto.constants.ENGINE_METHOD_ALL`
+ * - `crypto.constants.ENGINE_METHOD_NONE`
+ *
+ * The flags below are deprecated in OpenSSL-1.1.0.
+ *
+ * - `crypto.constants.ENGINE_METHOD_ECDH`
+ * - `crypto.constants.ENGINE_METHOD_ECDSA`
+ * - `crypto.constants.ENGINE_METHOD_STORE`
+ * @since v0.11.11
+ * @param [flags=crypto.constants.ENGINE_METHOD_ALL]
+ */
+ function setEngine(engine: string, flags?: number): void;
+ /**
+ * A convenient alias for `crypto.webcrypto.getRandomValues()`.
+ * This implementation is not compliant with the Web Crypto spec,
+ * to write web-compatible code use `crypto.webcrypto.getRandomValues()` instead.
+ * @since v17.4.0
+ * @returns Returns `typedArray`.
+ */
+ function getRandomValues<T extends webcrypto.BufferSource>(typedArray: T): T;
+ /**
+ * A convenient alias for `crypto.webcrypto.subtle`.
+ * @since v17.4.0
+ */
+ const subtle: webcrypto.SubtleCrypto;
+ /**
+ * An implementation of the Web Crypto API standard.
+ *
+ * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details.
+ * @since v15.0.0
+ */
+ const webcrypto: webcrypto.Crypto;
+ namespace webcrypto {
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki';
+ type KeyType = 'private' | 'public' | 'secret';
+ type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey';
+ type AlgorithmIdentifier = Algorithm | string;
+ type HashAlgorithmIdentifier = AlgorithmIdentifier;
+ type NamedCurve = string;
+ type BigInteger = Uint8Array;
+ interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+ }
+ interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+ }
+ interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+ }
+ interface AesGcmParams extends Algorithm {
+ additionalData?: BufferSource;
+ iv: BufferSource;
+ tagLength?: number;
+ }
+ interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+ }
+ interface AesKeyGenParams extends Algorithm {
+ length: number;
+ }
+ interface Algorithm {
+ name: string;
+ }
+ interface EcKeyAlgorithm extends KeyAlgorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+ }
+ interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+ }
+ interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface Ed448Params extends Algorithm {
+ context?: BufferSource;
+ }
+ interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: BufferSource;
+ salt: BufferSource;
+ }
+ interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: KeyAlgorithm;
+ length: number;
+ }
+ interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+ }
+ interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+ }
+ interface KeyAlgorithm {
+ name: string;
+ }
+ interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: BufferSource;
+ }
+ interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: KeyAlgorithm;
+ }
+ interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+ }
+ interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+ }
+ interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+ }
+ interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+ }
+ interface RsaPssParams extends Algorithm {
+ saltLength: number;
+ }
+ /**
+ * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class.
+ * `Crypto` is a singleton that provides access to the remainder of the crypto API.
+ * @since v15.0.0
+ */
+ interface Crypto {
+ /**
+ * Provides access to the `SubtleCrypto` API.
+ * @since v15.0.0
+ */
+ readonly subtle: SubtleCrypto;
+ /**
+ * Generates cryptographically strong random values.
+ * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned.
+ *
+ * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted.
+ *
+ * An error will be thrown if the given `typedArray` is larger than 65,536 bytes.
+ * @since v15.0.0
+ */
+ getRandomValues<T extends Exclude<NodeJS.TypedArray, Float32Array | Float64Array>>(typedArray: T): T;
+ /**
+ * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID.
+ * The UUID is generated using a cryptographic pseudorandom number generator.
+ * @since v16.7.0
+ */
+ randomUUID(): string;
+ CryptoKey: CryptoKeyConstructor;
+ }
+ // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
+ interface CryptoKeyConstructor {
+ /** Illegal constructor */
+ (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
+ readonly length: 0;
+ readonly name: 'CryptoKey';
+ readonly prototype: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface CryptoKey {
+ /**
+ * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters.
+ * @since v15.0.0
+ */
+ readonly algorithm: KeyAlgorithm;
+ /**
+ * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`.
+ * @since v15.0.0
+ */
+ readonly extractable: boolean;
+ /**
+ * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key.
+ * @since v15.0.0
+ */
+ readonly type: KeyType;
+ /**
+ * An array of strings identifying the operations for which the key may be used.
+ *
+ * The possible usages are:
+ * - `'encrypt'` - The key may be used to encrypt data.
+ * - `'decrypt'` - The key may be used to decrypt data.
+ * - `'sign'` - The key may be used to generate digital signatures.
+ * - `'verify'` - The key may be used to verify digital signatures.
+ * - `'deriveKey'` - The key may be used to derive a new key.
+ * - `'deriveBits'` - The key may be used to derive bits.
+ * - `'wrapKey'` - The key may be used to wrap another key.
+ * - `'unwrapKey'` - The key may be used to unwrap another key.
+ *
+ * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`).
+ * @since v15.0.0
+ */
+ readonly usages: KeyUsage[];
+ }
+ /**
+ * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair.
+ * @since v15.0.0
+ */
+ interface CryptoKeyPair {
+ /**
+ * A {@link CryptoKey} whose type will be `'private'`.
+ * @since v15.0.0
+ */
+ privateKey: CryptoKey;
+ /**
+ * A {@link CryptoKey} whose type will be `'public'`.
+ * @since v15.0.0
+ */
+ publicKey: CryptoKey;
+ }
+ /**
+ * @since v15.0.0
+ */
+ interface SubtleCrypto {
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `key`,
+ * `subtle.decrypt()` attempts to decipher the provided `data`. If successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the plaintext result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
+ * `subtle.deriveBits()` attempts to generate `length` bits.
+ * The Node.js implementation requires that `length` is a multiple of `8`.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the generated data.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @since v15.0.0
+ */
+ deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
+ * `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
+ *
+ * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material,
+ * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HKDF'`
+ * - `'PBKDF2'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ deriveKey(
+ algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
+ baseKey: CryptoKey,
+ derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`.
+ * If successful, the returned promise is resolved with an `<ArrayBuffer>` containing the computed digest.
+ *
+ * If `algorithm` is provided as a `<string>`, it must be one of:
+ *
+ * - `'SHA-1'`
+ * - `'SHA-256'`
+ * - `'SHA-384'`
+ * - `'SHA-512'`
+ *
+ * If `algorithm` is provided as an `<Object>`, it must have a `name` property whose value is one of the above.
+ * @since v15.0.0
+ */
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters specified by `algorithm` and the keying material provided by `key`,
+ * `subtle.encrypt()` attempts to encipher `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the encrypted result.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * @since v15.0.0
+ */
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * Exports the given key into the specified format, if supported.
+ *
+ * If the `<CryptoKey>` is not extractable, the returned promise will reject.
+ *
+ * When `format` is either `'pkcs8'` or `'spki'` and the export is successful,
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the exported key data.
+ *
+ * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a
+ * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @returns `<Promise>` containing `<ArrayBuffer>`.
+ * @since v15.0.0
+ */
+ exportKey(format: 'jwk', key: CryptoKey): Promise<JsonWebKey>;
+ exportKey(format: Exclude<KeyFormat, 'jwk'>, key: CryptoKey): Promise<ArrayBuffer>;
+ /**
+ * Using the method and parameters provided in `algorithm`,
+ * `subtle.generateKey()` attempts to generate new keying material.
+ * Depending the method used, the method may generate either a single `<CryptoKey>` or a `<CryptoKeyPair>`.
+ *
+ * The `<CryptoKeyPair>` (public and private key) generating algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * The `<CryptoKey>` (secret key) generating algorithms supported include:
+ *
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
+ /**
+ * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
+ * to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
+ * If the import is successful, the returned promise will be resolved with the created `<CryptoKey>`.
+ *
+ * If importing a `'PBKDF2'` key, `extractable` must be `false`.
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ importKey(
+ format: 'jwk',
+ keyData: JsonWebKey,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: ReadonlyArray<KeyUsage>
+ ): Promise<CryptoKey>;
+ importKey(
+ format: Exclude<KeyFormat, 'jwk'>,
+ keyData: BufferSource,
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given by `algorithm` and the keying material provided by `key`,
+ * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful,
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the generated signature.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
+ * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input)
+ * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs.
+ * If successful, the returned promise is resolved with a `<CryptoKey>` object.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ *
+ * The unwrapped key algorithms supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'RSA-OAEP'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
+ * - `'HMAC'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
+ * @since v15.0.0
+ */
+ unwrapKey(
+ format: KeyFormat,
+ wrappedKey: BufferSource,
+ unwrappingKey: CryptoKey,
+ unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
+ unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
+ extractable: boolean,
+ keyUsages: KeyUsage[]
+ ): Promise<CryptoKey>;
+ /**
+ * Using the method and parameters given in `algorithm` and the keying material provided by `key`,
+ * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`.
+ * The returned promise is resolved with either `true` or `false`.
+ *
+ * The algorithms currently supported include:
+ *
+ * - `'RSASSA-PKCS1-v1_5'`
+ * - `'RSA-PSS'`
+ * - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
+ * - `'HMAC'`
+ * @since v15.0.0
+ */
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
+ /**
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
+ * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
+ * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`.
+ * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments,
+ * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs.
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the encrypted key data.
+ *
+ * The wrapping algorithms currently supported include:
+ *
+ * - `'RSA-OAEP'`
+ * - `'AES-CTR'`
+ * - `'AES-CBC'`
+ * - `'AES-GCM'`
+ * - `'AES-KW'`
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
+ * @since v15.0.0
+ */
+ wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
+ }
+ }
+}
+declare module 'node:crypto' {
+ export * from 'crypto';
+}
diff --git a/node_modules/@types/node/ts4.8/dgram.d.ts b/node_modules/@types/node/ts4.8/dgram.d.ts
new file mode 100755
index 0000000..247328d
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/dgram.d.ts
@@ -0,0 +1,545 @@
+/**
+ * The `dgram` module provides an implementation of UDP datagram sockets.
+ *
+ * ```js
+ * import dgram from 'dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.log(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js)
+ */
+declare module 'dgram' {
+ import { AddressInfo } from 'node:net';
+ import * as dns from 'node:dns';
+ import { EventEmitter, Abortable } from 'node:events';
+ interface RemoteInfo {
+ address: string;
+ family: 'IPv4' | 'IPv6';
+ port: number;
+ size: number;
+ }
+ interface BindOptions {
+ port?: number | undefined;
+ address?: string | undefined;
+ exclusive?: boolean | undefined;
+ fd?: number | undefined;
+ }
+ type SocketType = 'udp4' | 'udp6';
+ interface SocketOptions extends Abortable {
+ type: SocketType;
+ reuseAddr?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ recvBufferSize?: number | undefined;
+ sendBufferSize?: number | undefined;
+ lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
+ }
+ /**
+ * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
+ * messages. When `address` and `port` are not passed to `socket.bind()` the
+ * method will bind the socket to the "all interfaces" address on a random port
+ * (it does the right thing for both `udp4` and `udp6` sockets). The bound address
+ * and port can be retrieved using `socket.address().address` and `socket.address().port`.
+ *
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const server = dgram.createSocket({ type: 'udp4', signal });
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ * // Later, when you want to close the server.
+ * controller.abort();
+ * ```
+ * @since v0.11.13
+ * @param options Available options are:
+ * @param callback Attached as a listener for `'message'` events. Optional.
+ */
+ function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ /**
+ * Encapsulates the datagram functionality.
+ *
+ * New instances of `dgram.Socket` are created using {@link createSocket}.
+ * The `new` keyword is not to be used to create `dgram.Socket` instances.
+ * @since v0.1.99
+ */
+ class Socket extends EventEmitter {
+ /**
+ * Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not
+ * specified, the operating system will choose
+ * one interface and will add membership to it. To add membership to every
+ * available interface, call `addMembership` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ *
+ * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur:
+ *
+ * ```js
+ * import cluster from 'cluster';
+ * import dgram from 'dgram';
+ *
+ * if (cluster.isPrimary) {
+ * cluster.fork(); // Works ok.
+ * cluster.fork(); // Fails with EADDRINUSE.
+ * } else {
+ * const s = dgram.createSocket('udp4');
+ * s.bind(1234, () => {
+ * s.addMembership('224.0.0.114');
+ * });
+ * }
+ * ```
+ * @since v0.6.9
+ */
+ addMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * Returns an object containing the address information for a socket.
+ * For UDP sockets, this object will contain `address`, `family` and `port`properties.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.99
+ */
+ address(): AddressInfo;
+ /**
+ * For UDP sockets, causes the `dgram.Socket` to listen for datagram
+ * messages on a named `port` and optional `address`. If `port` is not
+ * specified or is `0`, the operating system will attempt to bind to a
+ * random port. If `address` is not specified, the operating system will
+ * attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is
+ * called.
+ *
+ * Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very
+ * useful.
+ *
+ * A bound datagram socket keeps the Node.js process running to receive
+ * datagram messages.
+ *
+ * If binding fails, an `'error'` event is generated. In rare case (e.g.
+ * attempting to bind with a closed socket), an `Error` may be thrown.
+ *
+ * Example of a UDP server listening on port 41234:
+ *
+ * ```js
+ * import dgram from 'dgram';
+ *
+ * const server = dgram.createSocket('udp4');
+ *
+ * server.on('error', (err) => {
+ * console.log(`server error:\n${err.stack}`);
+ * server.close();
+ * });
+ *
+ * server.on('message', (msg, rinfo) => {
+ * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+ * });
+ *
+ * server.on('listening', () => {
+ * const address = server.address();
+ * console.log(`server listening ${address.address}:${address.port}`);
+ * });
+ *
+ * server.bind(41234);
+ * // Prints: server listening 0.0.0.0:41234
+ * ```
+ * @since v0.1.99
+ * @param callback with no parameters. Called when binding is complete.
+ */
+ bind(port?: number, address?: string, callback?: () => void): this;
+ bind(port?: number, callback?: () => void): this;
+ bind(callback?: () => void): this;
+ bind(options: BindOptions, callback?: () => void): this;
+ /**
+ * Close the underlying socket and stop listening for data on it. If a callback is
+ * provided, it is added as a listener for the `'close'` event.
+ * @since v0.1.99
+ * @param callback Called when the socket has been closed.
+ */
+ close(callback?: () => void): this;
+ /**
+ * Associates the `dgram.Socket` to a remote address and port. Every
+ * message sent by this handle is automatically sent to that destination. Also,
+ * the socket will only receive messages from that remote peer.
+ * Trying to call `connect()` on an already connected socket will result
+ * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not
+ * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets)
+ * will be used by default. Once the connection is complete, a `'connect'` event
+ * is emitted and the optional `callback` function is called. In case of failure,
+ * the `callback` is called or, failing this, an `'error'` event is emitted.
+ * @since v12.0.0
+ * @param callback Called when the connection is completed or on error.
+ */
+ connect(port: number, address?: string, callback?: () => void): void;
+ connect(port: number, callback: () => void): void;
+ /**
+ * A synchronous function that disassociates a connected `dgram.Socket` from
+ * its remote address. Trying to call `disconnect()` on an unbound or already
+ * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception.
+ * @since v12.0.0
+ */
+ disconnect(): void;
+ /**
+ * Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
+ * kernel when the socket is closed or the process terminates, so most apps will
+ * never have reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v0.6.9
+ */
+ dropMembership(multicastAddress: string, multicastInterface?: string): void;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_RCVBUF` socket receive buffer size in bytes.
+ */
+ getRecvBufferSize(): number;
+ /**
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ * @return the `SO_SNDBUF` socket send buffer size in bytes.
+ */
+ getSendBufferSize(): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active. The `socket.ref()` method adds the socket back to the reference
+ * counting and restores the default behavior.
+ *
+ * Calling `socket.ref()` multiples times will have no additional effect.
+ *
+ * The `socket.ref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Returns an object containing the `address`, `family`, and `port` of the remote
+ * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception
+ * if the socket is not connected.
+ * @since v12.0.0
+ */
+ remoteAddress(): AddressInfo;
+ /**
+ * Broadcasts a datagram on the socket.
+ * For connectionless sockets, the destination `port` and `address` must be
+ * specified. Connected sockets, on the other hand, will use their associated
+ * remote endpoint, so the `port` and `address` arguments must not be set.
+ *
+ * The `msg` argument contains the message to be sent.
+ * Depending on its type, different behavior can apply. If `msg` is a `Buffer`,
+ * any `TypedArray` or a `DataView`,
+ * the `offset` and `length` specify the offset within the `Buffer` where the
+ * message begins and the number of bytes in the message, respectively.
+ * If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that
+ * contain multi-byte characters, `offset` and `length` will be calculated with
+ * respect to `byte length` and not the character position.
+ * If `msg` is an array, `offset` and `length` must not be specified.
+ *
+ * The `address` argument is a string. If the value of `address` is a host name,
+ * DNS will be used to resolve the address of the host. If `address` is not
+ * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
+ *
+ * If the socket has not been previously bound with a call to `bind`, the socket
+ * is assigned a random port number and is bound to the "all interfaces" address
+ * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
+ *
+ * An optional `callback` function may be specified to as a way of reporting
+ * DNS errors or for determining when it is safe to reuse the `buf` object.
+ * DNS lookups delay the time to send for at least one tick of the
+ * Node.js event loop.
+ *
+ * The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be
+ * passed as the first argument to the `callback`. If a `callback` is not given,
+ * the error is emitted as an `'error'` event on the `socket` object.
+ *
+ * Offset and length are optional but both _must_ be set if either are used.
+ * They are supported only when the first argument is a `Buffer`, a `TypedArray`,
+ * or a `DataView`.
+ *
+ * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
+ *
+ * Example of sending a UDP packet to a port on `localhost`;
+ *
+ * ```js
+ * import dgram from 'dgram';
+ * import { Buffer } from 'buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send(message, 41234, 'localhost', (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`;
+ *
+ * ```js
+ * import dgram from 'dgram';
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('Some ');
+ * const buf2 = Buffer.from('bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.send([buf1, buf2], 41234, (err) => {
+ * client.close();
+ * });
+ * ```
+ *
+ * Sending multiple buffers might be faster or slower depending on the
+ * application and operating system. Run benchmarks to
+ * determine the optimal strategy on a case-by-case basis. Generally speaking,
+ * however, sending multiple buffers is faster.
+ *
+ * Example of sending a UDP packet using a socket connected to a port on`localhost`:
+ *
+ * ```js
+ * import dgram from 'dgram';
+ * import { Buffer } from 'buffer';
+ *
+ * const message = Buffer.from('Some bytes');
+ * const client = dgram.createSocket('udp4');
+ * client.connect(41234, 'localhost', (err) => {
+ * client.send(message, (err) => {
+ * client.close();
+ * });
+ * });
+ * ```
+ * @since v0.1.99
+ * @param msg Message to be sent.
+ * @param offset Offset in the buffer where the message starts.
+ * @param length Number of bytes in the message.
+ * @param port Destination port.
+ * @param address Destination host name or IP address.
+ * @param callback Called when the message has been sent.
+ */
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
+ /**
+ * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
+ * packets may be sent to a local interface's broadcast address.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.6.9
+ */
+ setBroadcast(flag: boolean): void;
+ /**
+ * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
+ * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
+ * _with a scope index is written as `'IP%scope'` where scope is an interface name_
+ * _or interface number._
+ *
+ * Sets the default outgoing multicast interface of the socket to a chosen
+ * interface or back to system interface selection. The `multicastInterface` must
+ * be a valid string representation of an IP from the socket's family.
+ *
+ * For IPv4 sockets, this should be the IP configured for the desired physical
+ * interface. All packets sent to multicast on the socket will be sent on the
+ * interface determined by the most recent successful use of this call.
+ *
+ * For IPv6 sockets, `multicastInterface` should include a scope to indicate the
+ * interface as in the examples that follow. In IPv6, individual `send` calls can
+ * also use explicit scope in addresses, so only packets sent to a multicast
+ * address without specifying an explicit scope are affected by the most recent
+ * successful use of this call.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ *
+ * #### Example: IPv6 outgoing multicast interface
+ *
+ * On most systems, where scope format uses the interface name:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%eth1');
+ * });
+ * ```
+ *
+ * On Windows, where scope format uses an interface number:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp6');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('::%2');
+ * });
+ * ```
+ *
+ * #### Example: IPv4 outgoing multicast interface
+ *
+ * All systems use an IP of the host on the desired physical interface:
+ *
+ * ```js
+ * const socket = dgram.createSocket('udp4');
+ *
+ * socket.bind(1234, () => {
+ * socket.setMulticastInterface('10.0.0.2');
+ * });
+ * ```
+ * @since v8.6.0
+ */
+ setMulticastInterface(multicastInterface: string): void;
+ /**
+ * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
+ * multicast packets will also be received on the local interface.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastLoopback(flag: boolean): boolean;
+ /**
+ * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
+ * "Time to Live", in this context it specifies the number of IP hops that a
+ * packet is allowed to travel through, specifically for multicast traffic. Each
+ * router or gateway that forwards a packet decrements the TTL. If the TTL is
+ * decremented to 0 by a router, it will not be forwarded.
+ *
+ * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.3.8
+ */
+ setMulticastTTL(ttl: number): number;
+ /**
+ * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setRecvBufferSize(size: number): void;
+ /**
+ * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
+ * in bytes.
+ *
+ * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+ * @since v8.7.0
+ */
+ setSendBufferSize(size: number): void;
+ /**
+ * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
+ * in this context it specifies the number of IP hops that a packet is allowed to
+ * travel through. Each router or gateway that forwards a packet decrements the
+ * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
+ * Changing TTL values is typically done for network probes or when multicasting.
+ *
+ * The `ttl` argument may be between 1 and 255\. The default on most systems
+ * is 64.
+ *
+ * This method throws `EBADF` if called on an unbound socket.
+ * @since v0.1.101
+ */
+ setTTL(ttl: number): number;
+ /**
+ * By default, binding a socket will cause it to block the Node.js process from
+ * exiting as long as the socket is open. The `socket.unref()` method can be used
+ * to exclude the socket from the reference counting that keeps the Node.js
+ * process active, allowing the process to exit even if the socket is still
+ * listening.
+ *
+ * Calling `socket.unref()` multiple times will have no addition effect.
+ *
+ * The `socket.unref()` method returns a reference to the socket so calls can be
+ * chained.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket
+ * option. If the `multicastInterface` argument
+ * is not specified, the operating system will choose one interface and will add
+ * membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface.
+ *
+ * When called on an unbound socket, this method will implicitly bind to a random
+ * port, listening on all interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is
+ * automatically called by the kernel when the
+ * socket is closed or the process terminates, so most apps will never have
+ * reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ * @since v13.1.0, v12.16.0
+ */
+ dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. error
+ * 4. listening
+ * 5. message
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ }
+}
+declare module 'node:dgram' {
+ export * from 'dgram';
+}
diff --git a/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts b/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts
new file mode 100755
index 0000000..a87ba8c
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts
@@ -0,0 +1,153 @@
+/**
+ * The `diagnostics_channel` module provides an API to create named channels
+ * to report arbitrary message data for diagnostics purposes.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ * ```
+ *
+ * It is intended that a module writer wanting to report diagnostics messages
+ * will create one or many top-level channels to report messages through.
+ * Channels may also be acquired at runtime but it is not encouraged
+ * due to the additional overhead of doing so. Channels may be exported for
+ * convenience, but as long as the name is known it can be acquired anywhere.
+ *
+ * If you intend for your module to produce diagnostics data for others to
+ * consume it is recommended that you include documentation of what named
+ * channels are used along with the shape of the message data. Channel names
+ * should generally include the module name to avoid collisions with data from
+ * other modules.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
+ */
+declare module 'diagnostics_channel' {
+ /**
+ * Check if there are active subscribers to the named channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * if (diagnostics_channel.hasSubscribers('my-channel')) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return If there are active subscribers
+ */
+ function hasSubscribers(name: string): boolean;
+ /**
+ * This is the primary entry-point for anyone wanting to interact with a named
+ * channel. It produces a channel object which is optimized to reduce overhead at
+ * publish time as much as possible.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param name The channel name
+ * @return The named channel object
+ */
+ function channel(name: string): Channel;
+ type ChannelListener = (message: unknown, name: string) => void;
+ /**
+ * The class `Channel` represents an individual named channel within the data
+ * pipeline. It is use to track subscribers and to publish messages when there
+ * are subscribers present. It exists as a separate object to avoid channel
+ * lookups at publish time, enabling very fast publish speeds and allowing
+ * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
+ * with `new Channel(name)` is not supported.
+ * @since v15.1.0, v14.17.0
+ */
+ class Channel {
+ readonly name: string;
+ /**
+ * Check if there are active subscribers to this channel. This is helpful if
+ * the message you want to send might be expensive to prepare.
+ *
+ * This API is optional but helpful when trying to publish messages from very
+ * performance-sensitive code.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * if (channel.hasSubscribers) {
+ * // There are subscribers, prepare and publish message
+ * }
+ * ```
+ * @since v15.1.0, v14.17.0
+ */
+ readonly hasSubscribers: boolean;
+ private constructor(name: string);
+ /**
+ * Publish a message to any subscribers to the channel. This will
+ * trigger message handlers synchronously so they will execute within
+ * the same context.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.publish({
+ * some: 'message'
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param message The message to send to the channel subscribers
+ */
+ publish(message: unknown): void;
+ /**
+ * Register a message handler to subscribe to this channel. This message handler
+ * will be run synchronously whenever a message is published to the channel. Any
+ * errors thrown in the message handler will trigger an `'uncaughtException'`.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * channel.subscribe((message, name) => {
+ * // Received data
+ * });
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param onMessage The handler to receive channel messages
+ */
+ subscribe(onMessage: ChannelListener): void;
+ /**
+ * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
+ *
+ * ```js
+ * import diagnostics_channel from 'diagnostics_channel';
+ *
+ * const channel = diagnostics_channel.channel('my-channel');
+ *
+ * function onMessage(message, name) {
+ * // Received data
+ * }
+ *
+ * channel.subscribe(onMessage);
+ *
+ * channel.unsubscribe(onMessage);
+ * ```
+ * @since v15.1.0, v14.17.0
+ * @param onMessage The previous subscribed handler to remove
+ * @return `true` if the handler was found, `false` otherwise.
+ */
+ unsubscribe(onMessage: ChannelListener): void;
+ }
+}
+declare module 'node:diagnostics_channel' {
+ export * from 'diagnostics_channel';
+}
diff --git a/node_modules/@types/node/ts4.8/dns.d.ts b/node_modules/@types/node/ts4.8/dns.d.ts
new file mode 100755
index 0000000..305367b
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/dns.d.ts
@@ -0,0 +1,659 @@
+/**
+ * The `dns` module enables name resolution. For example, use it to look up IP
+ * addresses of host names.
+ *
+ * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
+ * DNS protocol for lookups. {@link lookup} uses the operating system
+ * facilities to perform name resolution. It may not need to perform any network
+ * communication. To perform name resolution the way other applications on the same
+ * system do, use {@link lookup}.
+ *
+ * ```js
+ * const dns = require('dns');
+ *
+ * dns.lookup('example.org', (err, address, family) => {
+ * console.log('address: %j family: IPv%s', address, family);
+ * });
+ * // address: "93.184.216.34" family: IPv4
+ * ```
+ *
+ * All other functions in the `dns` module connect to an actual DNS server to
+ * perform name resolution. They will always use the network to perform DNS
+ * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
+ * DNS queries, bypassing other name-resolution facilities.
+ *
+ * ```js
+ * const dns = require('dns');
+ *
+ * dns.resolve4('archive.org', (err, addresses) => {
+ * if (err) throw err;
+ *
+ * console.log(`addresses: ${JSON.stringify(addresses)}`);
+ *
+ * addresses.forEach((a) => {
+ * dns.reverse(a, (err, hostnames) => {
+ * if (err) {
+ * throw err;
+ * }
+ * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
+ * });
+ * });
+ * });
+ * ```
+ *
+ * See the `Implementation considerations section` for more information.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js)
+ */
+declare module 'dns' {
+ import * as dnsPromises from 'node:dns/promises';
+ // Supported getaddrinfo flags.
+ export const ADDRCONFIG: number;
+ export const V4MAPPED: number;
+ /**
+ * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
+ * well as IPv4 mapped IPv6 addresses.
+ */
+ export const ALL: number;
+ export interface LookupOptions {
+ family?: number | undefined;
+ hints?: number | undefined;
+ all?: boolean | undefined;
+ /**
+ * @default true
+ */
+ verbatim?: boolean | undefined;
+ }
+ export interface LookupOneOptions extends LookupOptions {
+ all?: false | undefined;
+ }
+ export interface LookupAllOptions extends LookupOptions {
+ all: true;
+ }
+ export interface LookupAddress {
+ address: string;
+ family: number;
+ }
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
+ * and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the
+ * properties `address` and `family`.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
+ * The implementation uses an operating system facility that can associate names
+ * with addresses, and vice versa. This implementation can have subtle but
+ * important consequences on the behavior of any Node.js program. Please take some
+ * time to consult the `Implementation considerations section` before using`dns.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('dns');
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ * dns.lookup('example.com', options, (err, address, family) =>
+ * console.log('address: %j family: IPv%s', address, family));
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dns.lookup('example.com', options, (err, addresses) =>
+ * console.log('addresses: %j', addresses));
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
+ * @since v0.1.90
+ */
+ export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
+ export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
+ export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ export namespace lookup {
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
+ function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ }
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On an error, `err` is an `Error` object, where `err.code` is the error code.
+ *
+ * ```js
+ * const dns = require('dns');
+ * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
+ * console.log(hostname, service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
+ * @since v0.11.14
+ */
+ export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
+ export namespace lookupService {
+ function __promisify__(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ }
+ export interface ResolveOptions {
+ ttl: boolean;
+ }
+ export interface ResolveWithTtlOptions extends ResolveOptions {
+ ttl: true;
+ }
+ export interface RecordWithTtl {
+ address: string;
+ ttl: number;
+ }
+ /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
+ export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
+ export interface AnyARecord extends RecordWithTtl {
+ type: 'A';
+ }
+ export interface AnyAaaaRecord extends RecordWithTtl {
+ type: 'AAAA';
+ }
+ export interface CaaRecord {
+ critial: number;
+ issue?: string | undefined;
+ issuewild?: string | undefined;
+ iodef?: string | undefined;
+ contactemail?: string | undefined;
+ contactphone?: string | undefined;
+ }
+ export interface MxRecord {
+ priority: number;
+ exchange: string;
+ }
+ export interface AnyMxRecord extends MxRecord {
+ type: 'MX';
+ }
+ export interface NaptrRecord {
+ flags: string;
+ service: string;
+ regexp: string;
+ replacement: string;
+ order: number;
+ preference: number;
+ }
+ export interface AnyNaptrRecord extends NaptrRecord {
+ type: 'NAPTR';
+ }
+ export interface SoaRecord {
+ nsname: string;
+ hostmaster: string;
+ serial: number;
+ refresh: number;
+ retry: number;
+ expire: number;
+ minttl: number;
+ }
+ export interface AnySoaRecord extends SoaRecord {
+ type: 'SOA';
+ }
+ export interface SrvRecord {
+ priority: number;
+ weight: number;
+ port: number;
+ name: string;
+ }
+ export interface AnySrvRecord extends SrvRecord {
+ type: 'SRV';
+ }
+ export interface AnyTxtRecord {
+ type: 'TXT';
+ entries: string[];
+ }
+ export interface AnyNsRecord {
+ type: 'NS';
+ value: string;
+ }
+ export interface AnyPtrRecord {
+ type: 'PTR';
+ value: string;
+ }
+ export interface AnyCnameRecord {
+ type: 'CNAME';
+ value: string;
+ }
+ export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
+ * records. The type and structure of individual results varies based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
+ * @since v0.1.27
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
+ export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export function resolve(
+ hostname: string,
+ rrtype: string,
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void
+ ): void;
+ export namespace resolve {
+ function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise<string[]>;
+ function __promisify__(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function __promisify__(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function __promisify__(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve4 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
+ * will contain an array of IPv6 addresses.
+ * @since v0.1.16
+ * @param hostname Host name to resolve.
+ */
+ export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+ export namespace resolve6 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
+ * @since v0.3.2
+ */
+ export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveCname {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
+ * will contain an array of certification authority authorization records
+ * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
+ export namespace resolveCaa {
+ function __promisify__(hostname: string): Promise<CaaRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v0.1.27
+ */
+ export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ export namespace resolveMx {
+ function __promisify__(hostname: string): Promise<MxRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
+ * objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v0.9.12
+ */
+ export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ export namespace resolveNaptr {
+ function __promisify__(hostname: string): Promise<NaptrRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
+ * @since v0.1.90
+ */
+ export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolveNs {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of strings containing the reply records.
+ * @since v6.0.0
+ */
+ export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ export namespace resolvePtr {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. The `address` argument passed to the `callback` function will
+ * be an object with the following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v0.11.10
+ */
+ export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
+ export namespace resolveSoa {
+ function __promisify__(hostname: string): Promise<SoaRecord>;
+ }
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
+ * be an array of objects with the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v0.1.27
+ */
+ export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ export namespace resolveSrv {
+ function __promisify__(hostname: string): Promise<SrvRecord[]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a
+ * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v0.1.27
+ */
+ export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ export namespace resolveTxt {
+ function __promisify__(hostname: string): Promise<string[][]>;
+ }
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * The `ret` argument passed to the `callback` function will be an array containing
+ * various types of records. Each object has a property `type` that indicates the
+ * type of the current record. And depending on the `type`, additional properties
+ * will be present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the `ret` object passed to the callback:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ *
+ * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC
+ * 8482](https://tools.ietf.org/html/rfc8482).
+ */
+ export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ export namespace resolveAny {
+ function __promisify__(hostname: string): Promise<AnyRecord[]>;
+ }
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, `err` is an `Error` object, where `err.code` is
+ * one of the `DNS error codes`.
+ * @since v0.1.16
+ */
+ export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dns.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dns.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v0.11.3
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ export function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v0.11.3
+ */
+ export function getServers(): string[];
+ /**
+ * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `ipv4first` and {@link setDefaultResultOrder} have higher
+ * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
+ * dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ // Error codes
+ export const NODATA: string;
+ export const FORMERR: string;
+ export const SERVFAIL: string;
+ export const NOTFOUND: string;
+ export const NOTIMP: string;
+ export const REFUSED: string;
+ export const BADQUERY: string;
+ export const BADNAME: string;
+ export const BADFAMILY: string;
+ export const BADRESP: string;
+ export const CONNREFUSED: string;
+ export const TIMEOUT: string;
+ export const EOF: string;
+ export const FILE: string;
+ export const NOMEM: string;
+ export const DESTRUCTION: string;
+ export const BADSTR: string;
+ export const BADFLAGS: string;
+ export const NONAME: string;
+ export const BADHINTS: string;
+ export const NOTINITIALIZED: string;
+ export const LOADIPHLPAPI: string;
+ export const ADDRGETNETWORKPARAMS: string;
+ export const CANCELLED: string;
+ export interface ResolverOptions {
+ timeout?: number | undefined;
+ /**
+ * @default 4
+ */
+ tries?: number;
+ }
+ /**
+ * An independent resolver for DNS requests.
+ *
+ * Creating a new resolver uses the default server settings. Setting
+ * the servers used for a resolver using `resolver.setServers()` does not affect
+ * other resolvers:
+ *
+ * ```js
+ * const { Resolver } = require('dns');
+ * const resolver = new Resolver();
+ * resolver.setServers(['4.4.4.4']);
+ *
+ * // This request will use the server at 4.4.4.4, independent of global settings.
+ * resolver.resolve4('example.org', (err, addresses) => {
+ * // ...
+ * });
+ * ```
+ *
+ * The following methods from the `dns` module are available:
+ *
+ * * `resolver.getServers()`
+ * * `resolver.resolve()`
+ * * `resolver.resolve4()`
+ * * `resolver.resolve6()`
+ * * `resolver.resolveAny()`
+ * * `resolver.resolveCaa()`
+ * * `resolver.resolveCname()`
+ * * `resolver.resolveMx()`
+ * * `resolver.resolveNaptr()`
+ * * `resolver.resolveNs()`
+ * * `resolver.resolvePtr()`
+ * * `resolver.resolveSoa()`
+ * * `resolver.resolveSrv()`
+ * * `resolver.resolveTxt()`
+ * * `resolver.reverse()`
+ * * `resolver.setServers()`
+ * @since v8.3.0
+ */
+ export class Resolver {
+ constructor(options?: ResolverOptions);
+ /**
+ * Cancel all outstanding DNS queries made by this resolver. The corresponding
+ * callbacks will be called with an error with code `ECANCELLED`.
+ * @since v8.3.0
+ */
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ /**
+ * The resolver instance will send its requests from the specified IP address.
+ * This allows programs to specify outbound interfaces when used on multi-homed
+ * systems.
+ *
+ * If a v4 or v6 address is not specified, it is set to the default, and the
+ * operating system will choose a local address automatically.
+ *
+ * The resolver will use the v4 local address when making requests to IPv4 DNS
+ * servers, and the v6 local address when making requests to IPv6 DNS servers.
+ * The `rrtype` of resolution requests has no impact on the local address used.
+ * @since v15.1.0, v14.17.0
+ * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
+ * @param [ipv6='::0'] A string representation of an IPv6 address.
+ */
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+ export { dnsPromises as promises };
+}
+declare module 'node:dns' {
+ export * from 'dns';
+}
diff --git a/node_modules/@types/node/ts4.8/dns/promises.d.ts b/node_modules/@types/node/ts4.8/dns/promises.d.ts
new file mode 100755
index 0000000..77cd807
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/dns/promises.d.ts
@@ -0,0 +1,370 @@
+/**
+ * The `dns.promises` API provides an alternative set of asynchronous DNS methods
+ * that return `Promise` objects rather than using callbacks. The API is accessible
+ * via `require('dns').promises` or `require('dns/promises')`.
+ * @since v10.6.0
+ */
+declare module 'dns/promises' {
+ import {
+ LookupAddress,
+ LookupOneOptions,
+ LookupAllOptions,
+ LookupOptions,
+ AnyRecord,
+ CaaRecord,
+ MxRecord,
+ NaptrRecord,
+ SoaRecord,
+ SrvRecord,
+ ResolveWithTtlOptions,
+ RecordWithTtl,
+ ResolveOptions,
+ ResolverOptions,
+ } from 'node:dns';
+ /**
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+ * that are currently configured for DNS resolution. A string will include a port
+ * section if a custom port is used.
+ *
+ * ```js
+ * [
+ * '4.4.4.4',
+ * '2001:4860:4860::8888',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]
+ * ```
+ * @since v10.6.0
+ */
+ function getServers(): string[];
+ /**
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
+ * and IPv6 addresses are both returned if found.
+ *
+ * With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+ * the host name does not exist but also when the lookup fails in other ways
+ * such as no available file descriptors.
+ *
+ * `dnsPromises.lookup()` does not necessarily have anything to do with the DNS
+ * protocol. The implementation uses an operating system facility that can
+ * associate names with addresses, and vice versa. This implementation can have
+ * subtle but important consequences on the behavior of any Node.js program. Please
+ * take some time to consult the `Implementation considerations section` before
+ * using `dnsPromises.lookup()`.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const dns = require('dns');
+ * const dnsPromises = dns.promises;
+ * const options = {
+ * family: 6,
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
+ * };
+ *
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('address: %j family: IPv%s', result.address, result.family);
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+ * });
+ *
+ * // When options.all is true, the result will be an Array.
+ * options.all = true;
+ * dnsPromises.lookup('example.com', options).then((result) => {
+ * console.log('addresses: %j', result);
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookup(hostname: string, family: number): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ function lookup(hostname: string): Promise<LookupAddress>;
+ /**
+ * Resolves the given `address` and `port` into a host name and service using
+ * the operating system's underlying `getnameinfo` implementation.
+ *
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code.
+ *
+ * ```js
+ * const dnsPromises = require('dns').promises;
+ * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
+ * console.log(result.hostname, result.service);
+ * // Prints: localhost ssh
+ * });
+ * ```
+ * @since v10.6.0
+ */
+ function lookupService(
+ address: string,
+ port: number
+ ): Promise<{
+ hostname: string;
+ service: string;
+ }>;
+ /**
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+ * of the resource records. When successful, the `Promise` is resolved with an
+ * array of resource records. The type and structure of individual results vary
+ * based on `rrtype`:
+ *
+ * <omitted>
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ * @param [rrtype='A'] Resource record type.
+ */
+ function resolve(hostname: string): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'A'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'AAAA'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
+ function resolve(hostname: string, rrtype: 'CAA'): Promise<CaaRecord[]>;
+ function resolve(hostname: string, rrtype: 'CNAME'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
+ function resolve(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
+ function resolve(hostname: string, rrtype: 'NS'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'PTR'): Promise<string[]>;
+ function resolve(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
+ function resolve(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
+ function resolve(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
+ function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4
+ * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve4(hostname: string): Promise<string[]>;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6
+ * addresses.
+ * @since v10.6.0
+ * @param hostname Host name to resolve.
+ */
+ function resolve6(hostname: string): Promise<string[]>;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ /**
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+ * On success, the `Promise` is resolved with an array containing various types of
+ * records. Each object has a property `type` that indicates the type of the
+ * current record. And depending on the `type`, additional properties will be
+ * present on the object:
+ *
+ * <omitted>
+ *
+ * Here is an example of the result object:
+ *
+ * ```js
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+ * { type: 'CNAME', value: 'example.com' },
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+ * { type: 'NS', value: 'ns1.example.com' },
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+ * { type: 'SOA',
+ * nsname: 'ns1.example.com',
+ * hostmaster: 'admin.example.com',
+ * serial: 156696742,
+ * refresh: 900,
+ * retry: 900,
+ * expire: 1800,
+ * minttl: 60 } ]
+ * ```
+ * @since v10.6.0
+ */
+ function resolveAny(hostname: string): Promise<AnyRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of objects containing available
+ * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
+ * @since v15.0.0, v14.17.0
+ */
+ function resolveCaa(hostname: string): Promise<CaaRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
+ * the `Promise` is resolved with an array of canonical name records available for
+ * the `hostname` (e.g. `['bar.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveCname(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects
+ * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+ * @since v10.6.0
+ */
+ function resolveMx(hostname: string): Promise<MxRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
+ * of objects with the following properties:
+ *
+ * * `flags`
+ * * `service`
+ * * `regexp`
+ * * `replacement`
+ * * `order`
+ * * `preference`
+ *
+ * ```js
+ * {
+ * flags: 's',
+ * service: 'SIP+D2U',
+ * regexp: '',
+ * replacement: '_sip._udp.example.com',
+ * order: 30,
+ * preference: 100
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server
+ * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
+ * @since v10.6.0
+ */
+ function resolveNs(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings
+ * containing the reply records.
+ * @since v10.6.0
+ */
+ function resolvePtr(hostname: string): Promise<string[]>;
+ /**
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+ * the `hostname`. On success, the `Promise` is resolved with an object with the
+ * following properties:
+ *
+ * * `nsname`
+ * * `hostmaster`
+ * * `serial`
+ * * `refresh`
+ * * `retry`
+ * * `expire`
+ * * `minttl`
+ *
+ * ```js
+ * {
+ * nsname: 'ns.example.com',
+ * hostmaster: 'root.example.com',
+ * serial: 2013101809,
+ * refresh: 10000,
+ * retry: 2400,
+ * expire: 604800,
+ * minttl: 3600
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSoa(hostname: string): Promise<SoaRecord>;
+ /**
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with
+ * the following properties:
+ *
+ * * `priority`
+ * * `weight`
+ * * `port`
+ * * `name`
+ *
+ * ```js
+ * {
+ * priority: 10,
+ * weight: 5,
+ * port: 21223,
+ * name: 'service.example.com'
+ * }
+ * ```
+ * @since v10.6.0
+ */
+ function resolveSrv(hostname: string): Promise<SrvRecord[]>;
+ /**
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array
+ * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+ * one record. Depending on the use case, these could be either joined together or
+ * treated separately.
+ * @since v10.6.0
+ */
+ function resolveTxt(hostname: string): Promise<string[][]>;
+ /**
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+ * array of host names.
+ *
+ * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
+ * @since v10.6.0
+ */
+ function reverse(ip: string): Promise<string[]>;
+ /**
+ * Sets the IP address and port of servers to be used when performing DNS
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+ *
+ * ```js
+ * dnsPromises.setServers([
+ * '4.4.4.4',
+ * '[2001:4860:4860::8888]',
+ * '4.4.4.4:1053',
+ * '[2001:4860:4860::8888]:1053',
+ * ]);
+ * ```
+ *
+ * An error will be thrown if an invalid address is provided.
+ *
+ * The `dnsPromises.setServers()` method must not be called while a DNS query is in
+ * progress.
+ *
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+ * subsequent servers provided. Fallback DNS servers will only be used if the
+ * earlier ones time out or result in some other error.
+ * @since v10.6.0
+ * @param servers array of `RFC 5952` formatted addresses
+ */
+ function setServers(servers: ReadonlyArray<string>): void;
+ /**
+ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
+ *
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have
+ * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the
+ * default dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
+ */
+ function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
+ class Resolver {
+ constructor(options?: ResolverOptions);
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+}
+declare module 'node:dns/promises' {
+ export * from 'dns/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/domain.d.ts b/node_modules/@types/node/ts4.8/domain.d.ts
new file mode 100755
index 0000000..fafe68a
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/domain.d.ts
@@ -0,0 +1,170 @@
+/**
+ * **This module is pending deprecation.** Once a replacement API has been
+ * finalized, this module will be fully deprecated. Most developers should
+ * **not** have cause to use this module. Users who absolutely must have
+ * the functionality that domains provide may rely on it for the time being
+ * but should expect to have to migrate to a different solution
+ * in the future.
+ *
+ * Domains provide a way to handle multiple different IO operations as a
+ * single group. If any of the event emitters or callbacks registered to a
+ * domain emit an `'error'` event, or throw an error, then the domain object
+ * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
+ * exit immediately with an error code.
+ * @deprecated Since v1.4.2 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js)
+ */
+declare module 'domain' {
+ import EventEmitter = require('node:events');
+ /**
+ * The `Domain` class encapsulates the functionality of routing errors and
+ * uncaught exceptions to the active `Domain` object.
+ *
+ * To handle the errors that it catches, listen to its `'error'` event.
+ */
+ class Domain extends EventEmitter {
+ /**
+ * An array of timers and event emitters that have been explicitly added
+ * to the domain.
+ */
+ members: Array<EventEmitter | NodeJS.Timer>;
+ /**
+ * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly
+ * pushes the domain onto the domain
+ * stack managed by the domain module (see {@link exit} for details on the
+ * domain stack). The call to `enter()` delimits the beginning of a chain of
+ * asynchronous calls and I/O operations bound to a domain.
+ *
+ * Calling `enter()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ enter(): void;
+ /**
+ * The `exit()` method exits the current domain, popping it off the domain stack.
+ * Any time execution is going to switch to the context of a different chain of
+ * asynchronous calls, it's important to ensure that the current domain is exited.
+ * The call to `exit()` delimits either the end of or an interruption to the chain
+ * of asynchronous calls and I/O operations bound to a domain.
+ *
+ * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain.
+ *
+ * Calling `exit()` changes only the active domain, and does not alter the domain
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+ * single domain.
+ */
+ exit(): void;
+ /**
+ * Run the supplied function in the context of the domain, implicitly
+ * binding all event emitters, timers, and lowlevel requests that are
+ * created in that context. Optionally, arguments can be passed to
+ * the function.
+ *
+ * This is the most basic way to use a domain.
+ *
+ * ```js
+ * const domain = require('domain');
+ * const fs = require('fs');
+ * const d = domain.create();
+ * d.on('error', (er) => {
+ * console.error('Caught error!', er);
+ * });
+ * d.run(() => {
+ * process.nextTick(() => {
+ * setTimeout(() => { // Simulating some various async stuff
+ * fs.open('non-existent file', 'r', (er, fd) => {
+ * if (er) throw er;
+ * // proceed...
+ * });
+ * }, 100);
+ * });
+ * });
+ * ```
+ *
+ * In this example, the `d.on('error')` handler will be triggered, rather
+ * than crashing the program.
+ */
+ run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
+ /**
+ * Explicitly adds an emitter to the domain. If any event handlers called by
+ * the emitter throw an error, or if the emitter emits an `'error'` event, it
+ * will be routed to the domain's `'error'` event, just like with implicit
+ * binding.
+ *
+ * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
+ * the domain `'error'` handler.
+ *
+ * If the Timer or `EventEmitter` was already bound to a domain, it is removed
+ * from that one, and bound to this one instead.
+ * @param emitter emitter or timer to be added to the domain
+ */
+ add(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The opposite of {@link add}. Removes domain handling from the
+ * specified emitter.
+ * @param emitter emitter or timer to be removed from the domain
+ */
+ remove(emitter: EventEmitter | NodeJS.Timer): void;
+ /**
+ * The returned function will be a wrapper around the supplied callback
+ * function. When the returned function is called, any errors that are
+ * thrown will be routed to the domain's `'error'` event.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.bind((er, data) => {
+ * // If this throws, it will also be passed to the domain.
+ * return cb(er, data ? JSON.parse(data) : null);
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The bound function
+ */
+ bind<T extends Function>(callback: T): T;
+ /**
+ * This method is almost identical to {@link bind}. However, in
+ * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
+ *
+ * In this way, the common `if (err) return callback(err);` pattern can be replaced
+ * with a single error handler in a single place.
+ *
+ * ```js
+ * const d = domain.create();
+ *
+ * function readSomeFile(filename, cb) {
+ * fs.readFile(filename, 'utf8', d.intercept((data) => {
+ * // Note, the first argument is never passed to the
+ * // callback since it is assumed to be the 'Error' argument
+ * // and thus intercepted by the domain.
+ *
+ * // If this throws, it will also be passed to the domain
+ * // so the error-handling logic can be moved to the 'error'
+ * // event on the domain instead of being repeated throughout
+ * // the program.
+ * return cb(null, JSON.parse(data));
+ * }));
+ * }
+ *
+ * d.on('error', (er) => {
+ * // An error occurred somewhere. If we throw it now, it will crash the program
+ * // with the normal line number and stack message.
+ * });
+ * ```
+ * @param callback The callback function
+ * @return The intercepted function
+ */
+ intercept<T extends Function>(callback: T): T;
+ }
+ function create(): Domain;
+}
+declare module 'node:domain' {
+ export * from 'domain';
+}
diff --git a/node_modules/@types/node/ts4.8/events.d.ts b/node_modules/@types/node/ts4.8/events.d.ts
new file mode 100755
index 0000000..b8283ac
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/events.d.ts
@@ -0,0 +1,641 @@
+/**
+ * Much of the Node.js core API is built around an idiomatic asynchronous
+ * event-driven architecture in which certain kinds of objects (called "emitters")
+ * emit named events that cause `Function` objects ("listeners") to be called.
+ *
+ * For instance: a `net.Server` object emits an event each time a peer
+ * connects to it; a `fs.ReadStream` emits an event when the file is opened;
+ * a `stream` emits an event whenever data is available to be read.
+ *
+ * All objects that emit events are instances of the `EventEmitter` class. These
+ * objects expose an `eventEmitter.on()` function that allows one or more
+ * functions to be attached to named events emitted by the object. Typically,
+ * event names are camel-cased strings but any valid JavaScript property key
+ * can be used.
+ *
+ * When the `EventEmitter` object emits an event, all of the functions attached
+ * to that specific event are called _synchronously_. Any values returned by the
+ * called listeners are _ignored_ and discarded.
+ *
+ * The following example shows a simple `EventEmitter` instance with a single
+ * listener. The `eventEmitter.on()` method is used to register listeners, while
+ * the `eventEmitter.emit()` method is used to trigger the event.
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ *
+ * class MyEmitter extends EventEmitter {}
+ *
+ * const myEmitter = new MyEmitter();
+ * myEmitter.on('event', () => {
+ * console.log('an event occurred!');
+ * });
+ * myEmitter.emit('event');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
+ */
+declare module 'events' {
+ interface EventEmitterOptions {
+ /**
+ * Enables automatic capturing of promise rejection.
+ */
+ captureRejections?: boolean | undefined;
+ }
+ interface NodeEventTarget {
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface DOMEventTarget {
+ addEventListener(
+ eventName: string,
+ listener: (...args: any[]) => void,
+ opts?: {
+ once: boolean;
+ }
+ ): any;
+ }
+ interface StaticEventEmitterOptions {
+ signal?: AbortSignal | undefined;
+ }
+ interface EventEmitter extends NodeJS.EventEmitter {}
+ /**
+ * The `EventEmitter` class is defined and exposed by the `events` module:
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ * ```
+ *
+ * All `EventEmitter`s emit the event `'newListener'` when new listeners are
+ * added and `'removeListener'` when existing listeners are removed.
+ *
+ * It supports the following option:
+ * @since v0.1.26
+ */
+ class EventEmitter {
+ constructor(options?: EventEmitterOptions);
+ /**
+ * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
+ * event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
+ * The `Promise` will resolve with an array of all the arguments emitted to the
+ * given event.
+ *
+ * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
+ * semantics and does not listen to the `'error'` event.
+ *
+ * ```js
+ * const { once, EventEmitter } = require('events');
+ *
+ * async function run() {
+ * const ee = new EventEmitter();
+ *
+ * process.nextTick(() => {
+ * ee.emit('myevent', 42);
+ * });
+ *
+ * const [value] = await once(ee, 'myevent');
+ * console.log(value);
+ *
+ * const err = new Error('kaboom');
+ * process.nextTick(() => {
+ * ee.emit('error', err);
+ * });
+ *
+ * try {
+ * await once(ee, 'myevent');
+ * } catch (err) {
+ * console.log('error happened', err);
+ * }
+ * }
+ *
+ * run();
+ * ```
+ *
+ * The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the
+ * '`error'` event itself, then it is treated as any other kind of event without
+ * special handling:
+ *
+ * ```js
+ * const { EventEmitter, once } = require('events');
+ *
+ * const ee = new EventEmitter();
+ *
+ * once(ee, 'error')
+ * .then(([err]) => console.log('ok', err.message))
+ * .catch((err) => console.log('error', err.message));
+ *
+ * ee.emit('error', new Error('boom'));
+ *
+ * // Prints: ok boom
+ * ```
+ *
+ * An `AbortSignal` can be used to cancel waiting for the event:
+ *
+ * ```js
+ * const { EventEmitter, once } = require('events');
+ *
+ * const ee = new EventEmitter();
+ * const ac = new AbortController();
+ *
+ * async function foo(emitter, event, signal) {
+ * try {
+ * await once(emitter, event, { signal });
+ * console.log('event emitted!');
+ * } catch (error) {
+ * if (error.name === 'AbortError') {
+ * console.error('Waiting for the event was canceled!');
+ * } else {
+ * console.error('There was an error', error.message);
+ * }
+ * }
+ * }
+ *
+ * foo(ee, 'foo', ac.signal);
+ * ac.abort(); // Abort waiting for the event
+ * ee.emit('foo'); // Prints: Waiting for the event was canceled!
+ * ```
+ * @since v11.13.0, v10.16.0
+ */
+ static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
+ static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
+ /**
+ * ```js
+ * const { on, EventEmitter } = require('events');
+ *
+ * (async () => {
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo')) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * })();
+ * ```
+ *
+ * Returns an `AsyncIterator` that iterates `eventName` events. It will throw
+ * if the `EventEmitter` emits `'error'`. It removes all listeners when
+ * exiting the loop. The `value` returned by each iteration is an array
+ * composed of the emitted event arguments.
+ *
+ * An `AbortSignal` can be used to cancel waiting on events:
+ *
+ * ```js
+ * const { on, EventEmitter } = require('events');
+ * const ac = new AbortController();
+ *
+ * (async () => {
+ * const ee = new EventEmitter();
+ *
+ * // Emit later on
+ * process.nextTick(() => {
+ * ee.emit('foo', 'bar');
+ * ee.emit('foo', 42);
+ * });
+ *
+ * for await (const event of on(ee, 'foo', { signal: ac.signal })) {
+ * // The execution of this inner block is synchronous and it
+ * // processes one event at a time (even with await). Do not use
+ * // if concurrent execution is required.
+ * console.log(event); // prints ['bar'] [42]
+ * }
+ * // Unreachable here
+ * })();
+ *
+ * process.nextTick(() => ac.abort());
+ * ```
+ * @since v13.6.0, v12.16.0
+ * @param eventName The name of the event being listened for
+ * @return that iterates `eventName` events emitted by the `emitter`
+ */
+ static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
+ /**
+ * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
+ *
+ * ```js
+ * const { EventEmitter, listenerCount } = require('events');
+ * const myEmitter = new EventEmitter();
+ * myEmitter.on('event', () => {});
+ * myEmitter.on('event', () => {});
+ * console.log(listenerCount(myEmitter, 'event'));
+ * // Prints: 2
+ * ```
+ * @since v0.9.12
+ * @deprecated Since v3.2.0 - Use `listenerCount` instead.
+ * @param emitter The emitter to query
+ * @param eventName The event name
+ */
+ static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
+ * the emitter.
+ *
+ * For `EventTarget`s this is the only way to get the event listeners for the
+ * event target. This is useful for debugging and diagnostic purposes.
+ *
+ * ```js
+ * const { getEventListeners, EventEmitter } = require('events');
+ *
+ * {
+ * const ee = new EventEmitter();
+ * const listener = () => console.log('Events are fun');
+ * ee.on('foo', listener);
+ * getEventListeners(ee, 'foo'); // [listener]
+ * }
+ * {
+ * const et = new EventTarget();
+ * const listener = () => console.log('Events are fun');
+ * et.addEventListener('foo', listener);
+ * getEventListeners(et, 'foo'); // [listener]
+ * }
+ * ```
+ * @since v15.2.0, v14.17.0
+ */
+ static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
+ /**
+ * ```js
+ * const {
+ * setMaxListeners,
+ * EventEmitter
+ * } = require('events');
+ *
+ * const target = new EventTarget();
+ * const emitter = new EventEmitter();
+ *
+ * setMaxListeners(5, target, emitter);
+ * ```
+ * @since v15.4.0
+ * @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
+ * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
+ * objects.
+ */
+ static setMaxListeners(n?: number, ...eventTargets: Array<DOMEventTarget | NodeJS.EventEmitter>): void;
+ /**
+ * This symbol shall be used to install a listener for only monitoring `'error'`
+ * events. Listeners installed using this symbol are called before the regular
+ * `'error'` listeners are called.
+ *
+ * Installing a listener using this symbol does not change the behavior once an
+ * `'error'` event is emitted, therefore the process will still crash if no
+ * regular `'error'` listener is installed.
+ */
+ static readonly errorMonitor: unique symbol;
+ static readonly captureRejectionSymbol: unique symbol;
+ /**
+ * Sets or gets the default captureRejection value for all emitters.
+ */
+ // TODO: These should be described using static getter/setter pairs:
+ static captureRejections: boolean;
+ static defaultMaxListeners: number;
+ }
+ import internal = require('node:events');
+ namespace EventEmitter {
+ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
+ export { internal as EventEmitter };
+ export interface Abortable {
+ /**
+ * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
+ */
+ signal?: AbortSignal | undefined;
+ }
+ }
+ global {
+ namespace NodeJS {
+ interface EventEmitter {
+ /**
+ * Alias for `emitter.on(eventName, listener)`.
+ * @since v0.1.26
+ */
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds the `listener` function to the end of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => console.log('a'));
+ * myEE.prependListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.1.101
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName`. The
+ * next time `eventName` is triggered, this listener is removed and then invoked.
+ *
+ * ```js
+ * server.once('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ *
+ * By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
+ * event listener to the beginning of the listeners array.
+ *
+ * ```js
+ * const myEE = new EventEmitter();
+ * myEE.once('foo', () => console.log('a'));
+ * myEE.prependOnceListener('foo', () => console.log('b'));
+ * myEE.emit('foo');
+ * // Prints:
+ * // b
+ * // a
+ * ```
+ * @since v0.3.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes the specified `listener` from the listener array for the event named`eventName`.
+ *
+ * ```js
+ * const callback = (stream) => {
+ * console.log('someone connected!');
+ * };
+ * server.on('connection', callback);
+ * // ...
+ * server.removeListener('connection', callback);
+ * ```
+ *
+ * `removeListener()` will remove, at most, one instance of a listener from the
+ * listener array. If any single listener has been added multiple times to the
+ * listener array for the specified `eventName`, then `removeListener()` must be
+ * called multiple times to remove each instance.
+ *
+ * Once an event is emitted, all listeners attached to it at the
+ * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
+ * will not remove them from`emit()` in progress. Subsequent events behave as expected.
+ *
+ * ```js
+ * const myEmitter = new MyEmitter();
+ *
+ * const callbackA = () => {
+ * console.log('A');
+ * myEmitter.removeListener('event', callbackB);
+ * };
+ *
+ * const callbackB = () => {
+ * console.log('B');
+ * };
+ *
+ * myEmitter.on('event', callbackA);
+ *
+ * myEmitter.on('event', callbackB);
+ *
+ * // callbackA removes listener callbackB but it will still be called.
+ * // Internal listener array at time of emit [callbackA, callbackB]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * // B
+ *
+ * // callbackB is now removed.
+ * // Internal listener array [callbackA]
+ * myEmitter.emit('event');
+ * // Prints:
+ * // A
+ * ```
+ *
+ * Because listeners are managed using an internal array, calling this will
+ * change the position indices of any listener registered _after_ the listener
+ * being removed. This will not impact the order in which listeners are called,
+ * but it means that any copies of the listener array as returned by
+ * the `emitter.listeners()` method will need to be recreated.
+ *
+ * When a single function has been added as a handler multiple times for a single
+ * event (as in the example below), `removeListener()` will remove the most
+ * recently added instance. In the example the `once('ping')`listener is removed:
+ *
+ * ```js
+ * const ee = new EventEmitter();
+ *
+ * function pong() {
+ * console.log('pong');
+ * }
+ *
+ * ee.on('ping', pong);
+ * ee.once('ping', pong);
+ * ee.removeListener('ping', pong);
+ *
+ * ee.emit('ping');
+ * ee.emit('ping');
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Alias for `emitter.removeListener()`.
+ * @since v10.0.0
+ */
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Removes all listeners, or those of the specified `eventName`.
+ *
+ * It is bad practice to remove listeners added elsewhere in the code,
+ * particularly when the `EventEmitter` instance was created by some other
+ * component or module (e.g. sockets or file streams).
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.1.26
+ */
+ removeAllListeners(event?: string | symbol): this;
+ /**
+ * By default `EventEmitter`s will print a warning if more than `10` listeners are
+ * added for a particular event. This is a useful default that helps finding
+ * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
+ * modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v0.3.5
+ */
+ setMaxListeners(n: number): this;
+ /**
+ * Returns the current max listener value for the `EventEmitter` which is either
+ * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}.
+ * @since v1.0.0
+ */
+ getMaxListeners(): number;
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`.
+ *
+ * ```js
+ * server.on('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * console.log(util.inspect(server.listeners('connection')));
+ * // Prints: [ [Function] ]
+ * ```
+ * @since v0.1.26
+ */
+ listeners(eventName: string | symbol): Function[];
+ /**
+ * Returns a copy of the array of listeners for the event named `eventName`,
+ * including any wrappers (such as those created by `.once()`).
+ *
+ * ```js
+ * const emitter = new EventEmitter();
+ * emitter.once('log', () => console.log('log once'));
+ *
+ * // Returns a new Array with a function `onceWrapper` which has a property
+ * // `listener` which contains the original listener bound above
+ * const listeners = emitter.rawListeners('log');
+ * const logFnWrapper = listeners[0];
+ *
+ * // Logs "log once" to the console and does not unbind the `once` event
+ * logFnWrapper.listener();
+ *
+ * // Logs "log once" to the console and removes the listener
+ * logFnWrapper();
+ *
+ * emitter.on('log', () => console.log('log persistently'));
+ * // Will return a new Array with a single function bound by `.on()` above
+ * const newListeners = emitter.rawListeners('log');
+ *
+ * // Logs "log persistently" twice
+ * newListeners[0]();
+ * emitter.emit('log');
+ * ```
+ * @since v9.4.0
+ */
+ rawListeners(eventName: string | symbol): Function[];
+ /**
+ * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
+ * to each.
+ *
+ * Returns `true` if the event had listeners, `false` otherwise.
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ * const myEmitter = new EventEmitter();
+ *
+ * // First listener
+ * myEmitter.on('event', function firstListener() {
+ * console.log('Helloooo! first listener');
+ * });
+ * // Second listener
+ * myEmitter.on('event', function secondListener(arg1, arg2) {
+ * console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
+ * });
+ * // Third listener
+ * myEmitter.on('event', function thirdListener(...args) {
+ * const parameters = args.join(', ');
+ * console.log(`event with parameters ${parameters} in third listener`);
+ * });
+ *
+ * console.log(myEmitter.listeners('event'));
+ *
+ * myEmitter.emit('event', 1, 2, 3, 4, 5);
+ *
+ * // Prints:
+ * // [
+ * // [Function: firstListener],
+ * // [Function: secondListener],
+ * // [Function: thirdListener]
+ * // ]
+ * // Helloooo! first listener
+ * // event with parameters 1, 2 in second listener
+ * // event with parameters 1, 2, 3, 4, 5 in third listener
+ * ```
+ * @since v0.1.26
+ */
+ emit(eventName: string | symbol, ...args: any[]): boolean;
+ /**
+ * Returns the number of listeners listening to the event named `eventName`.
+ * @since v3.2.0
+ * @param eventName The name of the event being listened for
+ */
+ listenerCount(eventName: string | symbol): number;
+ /**
+ * Adds the `listener` function to the _beginning_ of the listeners array for the
+ * event named `eventName`. No checks are made to see if the `listener` has
+ * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
+ * times.
+ *
+ * ```js
+ * server.prependListener('connection', (stream) => {
+ * console.log('someone connected!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
+ * listener is removed, and then invoked.
+ *
+ * ```js
+ * server.prependOnceListener('connection', (stream) => {
+ * console.log('Ah, we have our first user!');
+ * });
+ * ```
+ *
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
+ * @since v6.0.0
+ * @param eventName The name of the event.
+ * @param listener The callback function
+ */
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * Returns an array listing the events for which the emitter has registered
+ * listeners. The values in the array are strings or `Symbol`s.
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ * const myEE = new EventEmitter();
+ * myEE.on('foo', () => {});
+ * myEE.on('bar', () => {});
+ *
+ * const sym = Symbol('symbol');
+ * myEE.on(sym, () => {});
+ *
+ * console.log(myEE.eventNames());
+ * // Prints: [ 'foo', 'bar', Symbol(symbol) ]
+ * ```
+ * @since v6.0.0
+ */
+ eventNames(): Array<string | symbol>;
+ }
+ }
+ }
+ export = EventEmitter;
+}
+declare module 'node:events' {
+ import events = require('events');
+ export = events;
+}
diff --git a/node_modules/@types/node/ts4.8/fs.d.ts b/node_modules/@types/node/ts4.8/fs.d.ts
new file mode 100755
index 0000000..75c53fb
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/fs.d.ts
@@ -0,0 +1,3872 @@
+/**
+ * The `fs` module enables interacting with the file system in a
+ * way modeled on standard POSIX functions.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as fs from 'fs/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as fs from 'fs';
+ * ```
+ *
+ * All file system operations have synchronous, callback, and promise-based
+ * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/fs.js)
+ */
+declare module 'fs' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import { URL } from 'node:url';
+ import * as promises from 'node:fs/promises';
+ export { promises };
+ /**
+ * Valid types for path values in "fs".
+ */
+ export type PathLike = string | Buffer | URL;
+ export type PathOrFileDescriptor = PathLike | number;
+ export type TimeLike = string | number | Date;
+ export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
+ export type BufferEncodingOption =
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ };
+ export interface ObjectEncodingOptions {
+ encoding?: BufferEncoding | null | undefined;
+ }
+ export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
+ export type OpenMode = number | string;
+ export type Mode = number | string;
+ export interface StatsBase<T> {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ dev: T;
+ ino: T;
+ mode: T;
+ nlink: T;
+ uid: T;
+ gid: T;
+ rdev: T;
+ size: T;
+ blksize: T;
+ blocks: T;
+ atimeMs: T;
+ mtimeMs: T;
+ ctimeMs: T;
+ birthtimeMs: T;
+ atime: Date;
+ mtime: Date;
+ ctime: Date;
+ birthtime: Date;
+ }
+ export interface Stats extends StatsBase<number> {}
+ /**
+ * A `fs.Stats` object provides information about a file.
+ *
+ * Objects returned from {@link stat}, {@link lstat} and {@link fstat} and
+ * their synchronous counterparts are of this type.
+ * If `bigint` in the `options` passed to those methods is true, the numeric values
+ * will be `bigint` instead of `number`, and the object will contain additional
+ * nanosecond-precision properties suffixed with `Ns`.
+ *
+ * ```console
+ * Stats {
+ * dev: 2114,
+ * ino: 48064969,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 85,
+ * gid: 100,
+ * rdev: 0,
+ * size: 527,
+ * blksize: 4096,
+ * blocks: 8,
+ * atimeMs: 1318289051000.1,
+ * mtimeMs: 1318289051000.1,
+ * ctimeMs: 1318289051000.1,
+ * birthtimeMs: 1318289051000.1,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ *
+ * `bigint` version:
+ *
+ * ```console
+ * BigIntStats {
+ * dev: 2114n,
+ * ino: 48064969n,
+ * mode: 33188n,
+ * nlink: 1n,
+ * uid: 85n,
+ * gid: 100n,
+ * rdev: 0n,
+ * size: 527n,
+ * blksize: 4096n,
+ * blocks: 8n,
+ * atimeMs: 1318289051000n,
+ * mtimeMs: 1318289051000n,
+ * ctimeMs: 1318289051000n,
+ * birthtimeMs: 1318289051000n,
+ * atimeNs: 1318289051000000000n,
+ * mtimeNs: 1318289051000000000n,
+ * ctimeNs: 1318289051000000000n,
+ * birthtimeNs: 1318289051000000000n,
+ * atime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+ * birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+ * ```
+ * @since v0.1.21
+ */
+ export class Stats {}
+ /**
+ * A representation of a directory entry, which can be a file or a subdirectory
+ * within the directory, as returned by reading from an `fs.Dir`. The
+ * directory entry is a combination of the file name and file type pairs.
+ *
+ * Additionally, when {@link readdir} or {@link readdirSync} is called with
+ * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s.
+ * @since v10.10.0
+ */
+ export class Dirent {
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a regular file.
+ * @since v10.10.0
+ */
+ isFile(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a file system
+ * directory.
+ * @since v10.10.0
+ */
+ isDirectory(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a block device.
+ * @since v10.10.0
+ */
+ isBlockDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a character device.
+ * @since v10.10.0
+ */
+ isCharacterDevice(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a symbolic link.
+ * @since v10.10.0
+ */
+ isSymbolicLink(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a first-in-first-out
+ * (FIFO) pipe.
+ * @since v10.10.0
+ */
+ isFIFO(): boolean;
+ /**
+ * Returns `true` if the `fs.Dirent` object describes a socket.
+ * @since v10.10.0
+ */
+ isSocket(): boolean;
+ /**
+ * The file name that this `fs.Dirent` object refers to. The type of this
+ * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}.
+ * @since v10.10.0
+ */
+ name: string;
+ }
+ /**
+ * A class representing a directory stream.
+ *
+ * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
+ *
+ * ```js
+ * import { opendir } from 'fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ */
+ export class Dir implements AsyncIterable<Dirent> {
+ /**
+ * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
+ * @since v12.12.0
+ */
+ readonly path: string;
+ /**
+ * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
+ */
+ [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
+ /**
+ * Asynchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ *
+ * A promise is returned that will be resolved after the resource has been
+ * closed.
+ * @since v12.12.0
+ */
+ close(): Promise<void>;
+ close(cb: NoParamCallback): void;
+ /**
+ * Synchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ * @since v12.12.0
+ */
+ closeSync(): void;
+ /**
+ * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
+ *
+ * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ * @return containing {fs.Dirent|null}
+ */
+ read(): Promise<Dirent | null>;
+ read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
+ /**
+ * Synchronously read the next directory entry as an `fs.Dirent`. See the
+ * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail.
+ *
+ * If there are no more directory entries to read, `null` will be returned.
+ *
+ * Directory entries returned by this function are in no particular order as
+ * provided by the operating system's underlying directory mechanisms.
+ * Entries added or removed while iterating over the directory might not be
+ * included in the iteration results.
+ * @since v12.12.0
+ */
+ readSync(): Dirent | null;
+ }
+ /**
+ * Class: fs.StatWatcher
+ * @since v14.3.0, v12.20.0
+ * Extends `EventEmitter`
+ * A successful call to {@link watchFile} method will return a new fs.StatWatcher object.
+ */
+ export interface StatWatcher extends EventEmitter {
+ /**
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
+ * no effect.
+ *
+ * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
+ * called previously.
+ * @since v14.3.0, v12.20.0
+ */
+ ref(): this;
+ /**
+ * When called, the active `fs.StatWatcher` object will not require the Node.js
+ * event loop to remain active. If there is no other activity keeping the
+ * event loop running, the process may exit before the `fs.StatWatcher` object's
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
+ * no effect.
+ * @since v14.3.0, v12.20.0
+ */
+ unref(): this;
+ }
+ export interface FSWatcher extends EventEmitter {
+ /**
+ * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable.
+ * @since v0.5.8
+ */
+ close(): void;
+ /**
+ * events.EventEmitter
+ * 1. change
+ * 2. error
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'close', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'close', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ }
+ /**
+ * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
+ * @since v0.1.93
+ */
+ export class ReadStream extends stream.Readable {
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes that have been read so far.
+ * @since v6.4.0
+ */
+ bytesRead: number;
+ /**
+ * The path to the file the stream is reading from as specified in the first
+ * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a
+ * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0, v10.16.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * * Extends `stream.Writable`
+ *
+ * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
+ * @since v0.1.93
+ */
+ export class WriteStream extends stream.Writable {
+ /**
+ * Closes `writeStream`. Optionally accepts a
+ * callback that will be executed once the `writeStream`is closed.
+ * @since v0.9.4
+ */
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * The number of bytes written so far. Does not include data that is still queued
+ * for writing.
+ * @since v0.4.7
+ */
+ bytesWritten: number;
+ /**
+ * The path to the file the stream is writing to as specified in the first
+ * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a
+ * `Buffer`.
+ * @since v0.1.93
+ */
+ path: string | Buffer;
+ /**
+ * This property is `true` if the underlying file has not been opened yet,
+ * i.e. before the `'ready'` event is emitted.
+ * @since v11.2.0
+ */
+ pending: boolean;
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'open', listener: (fd: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'open', listener: (fd: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'open', listener: (fd: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'open', listener: (fd: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'open', listener: (fd: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * Asynchronously rename file at `oldPath` to the pathname provided
+ * as `newPath`. In the case that `newPath` already exists, it will
+ * be overwritten. If there is a directory at `newPath`, an error will
+ * be raised instead. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html).
+ *
+ * ```js
+ * import { rename } from 'fs';
+ *
+ * rename('oldFile.txt', 'newFile.txt', (err) => {
+ * if (err) throw err;
+ * console.log('Rename complete!');
+ * });
+ * ```
+ * @since v0.0.2
+ */
+ export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace rename {
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Renames the file from `oldPath` to `newPath`. Returns `undefined`.
+ *
+ * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function renameSync(oldPath: PathLike, newPath: PathLike): void;
+ /**
+ * Truncates the file. No arguments other than a possible exception are
+ * given to the completion callback. A file descriptor can also be passed as the
+ * first argument. In this case, `fs.ftruncate()` is called.
+ *
+ * ```js
+ * import { truncate } from 'fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * truncate('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was truncated');
+ * });
+ * ```
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ *
+ * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function truncate(path: PathLike, callback: NoParamCallback): void;
+ export namespace truncate {
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(path: PathLike, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file. Returns `undefined`. A file descriptor can also be
+ * passed as the first argument. In this case, `fs.ftruncateSync()` is called.
+ *
+ * Passing a file descriptor is deprecated and may result in an error being thrown
+ * in the future.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function truncateSync(path: PathLike, len?: number | null): void;
+ /**
+ * Truncates the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail.
+ *
+ * If the file referred to by the file descriptor was larger than `len` bytes, only
+ * the first `len` bytes will be retained in the file.
+ *
+ * For example, the following program retains only the first four bytes of the
+ * file:
+ *
+ * ```js
+ * import { open, close, ftruncate } from 'fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('temp.txt', 'r+', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * ftruncate(fd, 4, (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * if (err) throw err;
+ * }
+ * });
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ */
+ export function ftruncate(fd: number, callback: NoParamCallback): void;
+ export namespace ftruncate {
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(fd: number, len?: number | null): Promise<void>;
+ }
+ /**
+ * Truncates the file descriptor. Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link ftruncate}.
+ * @since v0.8.6
+ * @param [len=0]
+ */
+ export function ftruncateSync(fd: number, len?: number | null): void;
+ /**
+ * Asynchronously changes owner and group of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace chown {
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Synchronously changes owner and group of a file. Returns `undefined`.
+ * This is the synchronous version of {@link chown}.
+ *
+ * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+ * @since v0.1.97
+ */
+ export function chownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Sets the owner of the file. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace fchown {
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Sets the owner of the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+ * @since v0.4.7
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function fchownSync(fd: number, uid: number, gid: number): void;
+ /**
+ * Set the owner of the symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail.
+ */
+ export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+ export namespace lchown {
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+ /**
+ * Set the owner for the path. Returns `undefined`.
+ *
+ * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details.
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ */
+ export function lchownSync(path: PathLike, uid: number, gid: number): void;
+ /**
+ * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic
+ * link, then the link is not dereferenced: instead, the timestamps of the
+ * symbolic link itself are changed.
+ *
+ * No arguments other than a possible exception are given to the completion
+ * callback.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace lutimes {
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
+ * with the difference that if the path refers to a symbolic link, then the link is not
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Change the file system timestamps of the symbolic link referenced by `path`.
+ * Returns `undefined`, or throws an exception when parameters are incorrect or
+ * the operation fails. This is the synchronous version of {@link lutimes}.
+ * @since v14.5.0, v12.19.0
+ */
+ export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Asynchronously changes the permissions of a file. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ *
+ * ```js
+ * import { chmod } from 'fs';
+ *
+ * chmod('my_file.txt', 0o775, (err) => {
+ * if (err) throw err;
+ * console.log('The permissions for file "my_file.txt" have been changed!');
+ * });
+ * ```
+ * @since v0.1.30
+ */
+ export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ export namespace chmod {
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link chmod}.
+ *
+ * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+ * @since v0.6.7
+ */
+ export function chmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Sets the permissions on the file. No arguments other than a possible exception
+ * are given to the completion callback.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
+ export namespace fchmod {
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(fd: number, mode: Mode): Promise<void>;
+ }
+ /**
+ * Sets the permissions on the file. Returns `undefined`.
+ *
+ * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+ * @since v0.4.7
+ */
+ export function fchmodSync(fd: number, mode: Mode): void;
+ /**
+ * Changes the permissions on a symbolic link. No arguments other than a possible
+ * exception are given to the completion callback.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+ /** @deprecated */
+ export namespace lchmod {
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+ /**
+ * Changes the permissions on a symbolic link. Returns `undefined`.
+ *
+ * This method is only implemented on macOS.
+ *
+ * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+ * @deprecated Since v0.4.7
+ */
+ export function lchmodSync(path: PathLike, mode: Mode): void;
+ /**
+ * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object.
+ *
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
+ *
+ * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended.
+ * Instead, user code should open/read/write the file directly and handle the
+ * error raised if the file is not available.
+ *
+ * To check if a file exists without manipulating it afterwards, {@link access} is recommended.
+ *
+ * For example, given the following directory structure:
+ *
+ * ```text
+ * - txtDir
+ * -- file.txt
+ * - app.js
+ * ```
+ *
+ * The next program will check for the stats of the given paths:
+ *
+ * ```js
+ * import { stat } from 'fs';
+ *
+ * const pathsToCheck = ['./txtDir', './txtDir/file.txt'];
+ *
+ * for (let i = 0; i < pathsToCheck.length; i++) {
+ * stat(pathsToCheck[i], (err, stats) => {
+ * console.log(stats.isDirectory());
+ * console.log(stats);
+ * });
+ * }
+ * ```
+ *
+ * The resulting output will resemble:
+ *
+ * ```console
+ * true
+ * Stats {
+ * dev: 16777220,
+ * mode: 16877,
+ * nlink: 3,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214262,
+ * size: 96,
+ * blocks: 0,
+ * atimeMs: 1561174653071.963,
+ * mtimeMs: 1561174614583.3518,
+ * ctimeMs: 1561174626623.5366,
+ * birthtimeMs: 1561174126937.2893,
+ * atime: 2019-06-22T03:37:33.072Z,
+ * mtime: 2019-06-22T03:36:54.583Z,
+ * ctime: 2019-06-22T03:37:06.624Z,
+ * birthtime: 2019-06-22T03:28:46.937Z
+ * }
+ * false
+ * Stats {
+ * dev: 16777220,
+ * mode: 33188,
+ * nlink: 1,
+ * uid: 501,
+ * gid: 20,
+ * rdev: 0,
+ * blksize: 4096,
+ * ino: 14214074,
+ * size: 8,
+ * blocks: 8,
+ * atimeMs: 1561174616618.8555,
+ * mtimeMs: 1561174614584,
+ * ctimeMs: 1561174614583.8145,
+ * birthtimeMs: 1561174007710.7478,
+ * atime: 2019-06-22T03:36:56.619Z,
+ * mtime: 2019-06-22T03:36:54.584Z,
+ * ctime: 2019-06-22T03:36:54.584Z,
+ * birthtime: 2019-06-22T03:26:47.711Z
+ * }
+ * ```
+ * @since v0.0.2
+ */
+ export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function stat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function stat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace stat {
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ export interface StatSyncFn extends Function {
+ (path: PathLike, options?: undefined): Stats;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ throwIfNoEntry: false;
+ }
+ ): Stats | undefined;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ throwIfNoEntry: false;
+ }
+ ): BigIntStats | undefined;
+ (
+ path: PathLike,
+ options?: StatSyncOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ (
+ path: PathLike,
+ options: StatSyncOptions & {
+ bigint: boolean;
+ throwIfNoEntry?: false | undefined;
+ }
+ ): Stats | BigIntStats;
+ (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined;
+ }
+ /**
+ * Synchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const statSync: StatSyncFn;
+ /**
+ * Invokes the callback with the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function fstat(
+ fd: number,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function fstat(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace fstat {
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Retrieves the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
+ */
+ export function fstatSync(
+ fd: number,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Stats;
+ export function fstatSync(
+ fd: number,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): BigIntStats;
+ export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
+ /**
+ * Retrieves the `fs.Stats` for the symbolic link referred to by the path.
+ * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
+ * link, then the link itself is stat-ed, not the file that it refers to.
+ *
+ * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.
+ * @since v0.1.30
+ */
+ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function lstat(
+ path: PathLike,
+ options:
+ | (StatOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void
+ ): void;
+ export function lstat(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void
+ ): void;
+ export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+ export namespace lstat {
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function __promisify__(
+ path: PathLike,
+ options: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+ /**
+ * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export const lstatSync: StatSyncFn;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
+ * a possible
+ * exception are given to the completion callback.
+ * @since v0.1.31
+ */
+ export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+ export namespace link {
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.31
+ */
+ export function linkSync(existingPath: PathLike, newPath: PathLike): void;
+ /**
+ * Creates the link called `path` pointing to `target`. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details.
+ *
+ * The `type` argument is only available on Windows and ignored on other platforms.
+ * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is
+ * not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If
+ * the `target` does not exist, `'file'` will be used. Windows junction points
+ * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path.
+ *
+ * Relative targets are relative to the link’s parent directory.
+ *
+ * ```js
+ * import { symlink } from 'fs';
+ *
+ * symlink('./mew', './mewtwo', callback);
+ * ```
+ *
+ * The above example creates a symbolic link `mewtwo` which points to `mew` in the
+ * same directory:
+ *
+ * ```bash
+ * $ tree .
+ * .
+ * ├── mew
+ * └── mewtwo -> ./mew
+ * ```
+ * @since v0.1.31
+ */
+ export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
+ export namespace symlink {
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ type Type = 'dir' | 'file' | 'junction';
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link symlink}.
+ * @since v0.1.31
+ */
+ export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. The callback gets
+ * two arguments `(err, linkString)`.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+ export namespace readlink {
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the symbolic link's string value.
+ *
+ * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`,
+ * the link path returned will be passed as a `Buffer` object.
+ * @since v0.1.31
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ /**
+ * Asynchronously computes the canonical pathname by resolving `.`, `..` and
+ * symbolic links.
+ *
+ * A canonical pathname is not necessarily unique. Hard links and bind mounts can
+ * expose a file system entity through many pathnames.
+ *
+ * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions:
+ *
+ * 1. No case conversion is performed on case-insensitive file systems.
+ * 2. The maximum number of symbolic links is platform-independent and generally
+ * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports.
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd`to resolve relative paths.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * If `path` resolves to a socket or a pipe, the function will return a system
+ * dependent name for that object.
+ * @since v0.1.31
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ export namespace realpath {
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | Buffer>;
+ /**
+ * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html).
+ *
+ * The `callback` gets two arguments `(err, resolvedPath)`.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the path returned will be passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v9.2.0
+ */
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ }
+ /**
+ * Returns the resolved pathname.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link realpath}.
+ * @since v0.1.31
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer;
+ export namespace realpathSync {
+ function native(path: PathLike, options?: EncodingOption): string;
+ function native(path: PathLike, options: BufferEncodingOption): Buffer;
+ function native(path: PathLike, options?: EncodingOption): string | Buffer;
+ }
+ /**
+ * Asynchronously removes a file or symbolic link. No arguments other than a
+ * possible exception are given to the completion callback.
+ *
+ * ```js
+ * import { unlink } from 'fs';
+ * // Assuming that 'path/file.txt' is a regular file.
+ * unlink('path/file.txt', (err) => {
+ * if (err) throw err;
+ * console.log('path/file.txt was deleted');
+ * });
+ * ```
+ *
+ * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a
+ * directory, use {@link rmdir}.
+ *
+ * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details.
+ * @since v0.0.2
+ */
+ export function unlink(path: PathLike, callback: NoParamCallback): void;
+ export namespace unlink {
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<void>;
+ }
+ /**
+ * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`.
+ * @since v0.1.21
+ */
+ export function unlinkSync(path: PathLike): void;
+ export interface RmDirOptions {
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
+ * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
+ * Use `fs.rm(path, { recursive: true, force: true })` instead.
+ *
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given
+ * to the completion callback.
+ *
+ * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on
+ * Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`.
+ * @since v0.0.2
+ */
+ export function rmdir(path: PathLike, callback: NoParamCallback): void;
+ export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
+ export namespace rmdir {
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
+ }
+ /**
+ * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`.
+ *
+ * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
+ * on Windows and an `ENOTDIR` error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`.
+ * @since v0.1.21
+ */
+ export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
+ export interface RmOptions {
+ /**
+ * When `true`, exceptions will be ignored if `path` does not exist.
+ * @default false
+ */
+ force?: boolean | undefined;
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number | undefined;
+ /**
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number | undefined;
+ }
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm`utility). No arguments other than a possible exception are given to the
+ * completion callback.
+ * @since v14.14.0
+ */
+ export function rm(path: PathLike, callback: NoParamCallback): void;
+ export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
+ export namespace rm {
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
+ }
+ /**
+ * Synchronously removes files and directories (modeled on the standard POSIX `rm`utility). Returns `undefined`.
+ * @since v14.14.0
+ */
+ export function rmSync(path: PathLike, options?: RmOptions): void;
+ export interface MakeDirectoryOptions {
+ /**
+ * Indicates whether parent folders should be created.
+ * If a folder was created, the path to the first created folder will be returned.
+ * @default false
+ */
+ recursive?: boolean | undefined;
+ /**
+ * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
+ * @default 0o777
+ */
+ mode?: Mode | undefined;
+ }
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The callback is given a possible exception and, if `recursive` is `true`, the
+ * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was
+ * created.
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that
+ * exists results in an error only
+ * when `recursive` is false.
+ *
+ * ```js
+ * import { mkdir } from 'fs';
+ *
+ * // Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist.
+ * mkdir('/tmp/a/apple', { recursive: true }, (err) => {
+ * if (err) throw err;
+ * });
+ * ```
+ *
+ * On Windows, using `fs.mkdir()` on the root directory even with recursion will
+ * result in an error:
+ *
+ * ```js
+ * import { mkdir } from 'fs';
+ *
+ * mkdir('/', { recursive: true }, (err) => {
+ * // => [Error: EPERM: operation not permitted, mkdir 'C:\']
+ * });
+ * ```
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.8
+ */
+ export function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, path?: string) => void
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(
+ path: PathLike,
+ options:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ | undefined,
+ callback: NoParamCallback
+ ): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
+ /**
+ * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function mkdir(path: PathLike, callback: NoParamCallback): void;
+ export namespace mkdir {
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ }
+ /**
+ * Synchronously creates a directory. Returns `undefined`, or if `recursive` is`true`, the first directory path created.
+ * This is the synchronous version of {@link mkdir}.
+ *
+ * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+ * @since v0.1.21
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): string | undefined;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): void;
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
+ /**
+ * Creates a unique temporary directory.
+ *
+ * Generates six random characters to be appended behind a required`prefix` to create a unique temporary directory. Due to platform
+ * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms,
+ * notably the BSDs, can return more than six random characters, and replace
+ * trailing `X` characters in `prefix` with random characters.
+ *
+ * The created directory path is passed as a string to the callback's second
+ * parameter.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'fs';
+ *
+ * mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
+ * });
+ * ```
+ *
+ * The `fs.mkdtemp()` method will append the six randomly selected characters
+ * directly to the `prefix` string. For instance, given a directory `/tmp`, if the
+ * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator
+ * (`require('path').sep`).
+ *
+ * ```js
+ * import { tmpdir } from 'os';
+ * import { mkdtemp } from 'fs';
+ *
+ * // The parent directory for the new temporary directory
+ * const tmpDir = tmpdir();
+ *
+ * // This method is *INCORRECT*:
+ * mkdtemp(tmpDir, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmpabc123`.
+ * // A new temporary directory is created at the file system root
+ * // rather than *within* the /tmp directory.
+ * });
+ *
+ * // This method is *CORRECT*:
+ * import { sep } from 'path';
+ * mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
+ * if (err) throw err;
+ * console.log(directory);
+ * // Will print something similar to `/tmp/abc123`.
+ * // A new temporary directory is created within
+ * // the /tmp directory.
+ * });
+ * ```
+ * @since v5.10.0
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(
+ prefix: string,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ },
+ callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ */
+ export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+ export namespace mkdtemp {
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: EncodingOption): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the created directory path.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link mkdtemp}.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ * @since v5.10.0
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer;
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer;
+ /**
+ * Reads the contents of a directory. The callback gets two arguments `(err, files)`where `files` is an array of the names of the files in the directory excluding`'.'` and `'..'`.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames passed to the callback. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects.
+ * @since v0.1.8
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ }
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ | 'buffer',
+ callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void
+ ): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ },
+ callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void
+ ): void;
+ export namespace readdir {
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options:
+ | 'buffer'
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
+ */
+ function __promisify__(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ }
+ ): Promise<Dirent[]>;
+ }
+ /**
+ * Reads the contents of the directory.
+ *
+ * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames returned. If the `encoding` is set to `'buffer'`,
+ * the filenames returned will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
+ * @since v0.1.21
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | {
+ encoding: BufferEncoding | null;
+ withFileTypes?: false | undefined;
+ }
+ | BufferEncoding
+ | null
+ ): string[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ | 'buffer'
+ ): Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string[] | Buffer[];
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdirSync(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ }
+ ): Dirent[];
+ /**
+ * Closes the file descriptor. No arguments other than a possible exception are
+ * given to the completion callback.
+ *
+ * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.0.2
+ */
+ export function close(fd: number, callback?: NoParamCallback): void;
+ export namespace close {
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Closes the file descriptor. Returns `undefined`.
+ *
+ * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use
+ * through any other `fs` operation may lead to undefined behavior.
+ *
+ * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+ * @since v0.1.21
+ */
+ export function closeSync(fd: number): void;
+ /**
+ * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the file was
+ * created. On Windows, only the write permission can be manipulated; see {@link chmod}.
+ *
+ * The callback gets two arguments `(err, fd)`.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ *
+ * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc.
+ * @since v0.0.2
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666]
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param [flags='r'] See `support of file system `flags``.
+ */
+ export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+
+ export namespace open {
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
+ }
+ /**
+ * Returns an integer representing the file descriptor.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link open}.
+ * @since v0.1.21
+ * @param [flags='r']
+ * @param [mode=0o666]
+ */
+ export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
+ * @since v0.4.2
+ */
+ export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace utimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link utimes}.
+ * @since v0.4.2
+ */
+ export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Change the file system timestamps of the object referenced by the supplied file
+ * descriptor. See {@link utimes}.
+ * @since v0.4.2
+ */
+ export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+ export namespace futimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ }
+ /**
+ * Synchronous version of {@link futimes}. Returns `undefined`.
+ * @since v0.4.2
+ */
+ export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other
+ * than a possible exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fsync(fd: number, callback: NoParamCallback): void;
+ export namespace fsync {
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fsyncSync(fd: number): void;
+ /**
+ * Write `buffer` to the file specified by `fd`.
+ *
+ * `offset` determines the part of the buffer to be written, and `length` is
+ * an integer specifying the number of bytes to write.
+ *
+ * `position` refers to the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html).
+ *
+ * The callback will be given three arguments `(err, bytesWritten, buffer)` where`bytesWritten` specifies how many _bytes_ were written from `buffer`.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesWritten` and `buffer` properties.
+ *
+ * It is unsafe to use `fs.write()` multiple times on the same file without waiting
+ * for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v0.0.2
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ position: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function write(
+ fd: number,
+ string: string,
+ position: number | undefined | null,
+ encoding: BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void
+ ): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ */
+ export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+ export namespace write {
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer?: TBuffer,
+ offset?: number,
+ length?: number,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function __promisify__(
+ fd: number,
+ string: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link write}.
+ * @since v0.1.21
+ * @return The number of bytes written.
+ */
+ export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
+ /**
+ * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
+ export type ReadPosition = number | bigint;
+ export interface ReadSyncOptions {
+ /**
+ * @default 0
+ */
+ offset?: number | undefined;
+ /**
+ * @default `length of buffer`
+ */
+ length?: number | undefined;
+ /**
+ * @default null
+ */
+ position?: ReadPosition | null | undefined;
+ }
+ export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
+ buffer?: TBuffer;
+ }
+ /**
+ * Read data from the file specified by `fd`.
+ *
+ * The callback is given the three arguments, `(err, bytesRead, buffer)`.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffer` properties.
+ * @since v0.0.2
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The position in `buffer` to write the data to.
+ * @param length The number of bytes to read.
+ * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If
+ * `position` is an integer, the file position will be unchanged.
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: ReadPosition | null,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ /**
+ * Similar to the above `fs.read` function, this version takes an optional `options` object.
+ * If not otherwise specified in an `options` object,
+ * `buffer` defaults to `Buffer.alloc(16384)`,
+ * `offset` defaults to `0`,
+ * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
+ * `position` defaults to `null`
+ * @since v12.17.0, 13.11.0
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void;
+ export namespace read {
+ /**
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: number | null
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ options: ReadAsyncOptions<TBuffer>
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__(fd: number): Promise<{
+ bytesRead: number;
+ buffer: NodeJS.ArrayBufferView;
+ }>;
+ }
+ /**
+ * Returns the number of `bytesRead`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link read}.
+ * @since v0.1.21
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number;
+ /**
+ * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
+ * If no `options` object is specified, it will default with the above values.
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * readFile('/etc/passwd', (err, data) => {
+ * if (err) throw err;
+ * console.log(data);
+ * });
+ * ```
+ *
+ * The callback is passed two arguments `(err, data)`, where `data` is the
+ * contents of the file.
+ *
+ * If no encoding is specified, then the raw buffer is returned.
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * readFile('/etc/passwd', 'utf8', callback);
+ * ```
+ *
+ * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an
+ * error will be returned. On FreeBSD, a representation of the directory's contents
+ * will be returned.
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFile('<directory>', (err, data) => {
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ * });
+ *
+ * // FreeBSD
+ * readFile('<directory>', (err, data) => {
+ * // => null, <data>
+ * });
+ * ```
+ *
+ * It is possible to abort an ongoing request using an `AbortSignal`. If a
+ * request is aborted the callback is called with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'fs';
+ *
+ * const controller = new AbortController();
+ * const signal = controller.signal;
+ * readFile(fileInfo[0].name, { signal }, (err, buf) => {
+ * // ...
+ * });
+ * // When you want to abort the request
+ * controller.abort();
+ * ```
+ *
+ * The `fs.readFile()` function buffers the entire file. To minimize memory costs,
+ * when possible prefer streaming via `fs.createReadStream()`.
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ * @since v0.1.29
+ * @param path filename or file descriptor
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } & Abortable)
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding,
+ callback: (err: NodeJS.ErrnoException | null, data: string) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathOrFileDescriptor,
+ options:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | undefined
+ | null,
+ callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void
+ ): void;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ */
+ export function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+ export namespace readFile {
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ }
+ /**
+ * Returns the contents of the `path`.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readFile}.
+ *
+ * If the `encoding` option is specified then this function returns a
+ * string. Otherwise it returns a buffer.
+ *
+ * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific.
+ *
+ * ```js
+ * import { readFileSync } from 'fs';
+ *
+ * // macOS, Linux, and Windows
+ * readFileSync('<directory>');
+ * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+ *
+ * // FreeBSD
+ * readFileSync('<directory>'); // => <data>
+ * ```
+ * @since v0.1.8
+ * @param path filename or file descriptor
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?: {
+ encoding?: null | undefined;
+ flag?: string | undefined;
+ } | null
+ ): Buffer;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: string | undefined;
+ }
+ | BufferEncoding
+ ): string;
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(
+ path: PathOrFileDescriptor,
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): string | Buffer;
+ export type WriteFileOptions =
+ | (ObjectEncodingOptions &
+ Abortable & {
+ mode?: Mode | undefined;
+ flag?: string | undefined;
+ })
+ | BufferEncoding
+ | null;
+ /**
+ * When `file` is a filename, asynchronously writes data to the file, replacing the
+ * file if it already exists. `data` can be a string or a buffer.
+ *
+ * When `file` is a file descriptor, the behavior is similar to calling`fs.write()` directly (which is recommended). See the notes below on using
+ * a file descriptor.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { writeFile } from 'fs';
+ * import { Buffer } from 'buffer';
+ *
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, (err) => {
+ * if (err) throw err;
+ * console.log('The file has been saved!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { writeFile } from 'fs';
+ *
+ * writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
+ * ```
+ *
+ * It is unsafe to use `fs.writeFile()` multiple times on the same file without
+ * waiting for the callback. For this scenario, {@link createWriteStream} is
+ * recommended.
+ *
+ * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that
+ * performs multiple `write` calls internally to write the buffer passed to it.
+ * For performance sensitive code consider using {@link createWriteStream}.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'fs';
+ * import { Buffer } from 'buffer';
+ *
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * writeFile('message.txt', data, { signal }, (err) => {
+ * // When a request is aborted - the callback is called with an AbortError
+ * });
+ * // When the request should be aborted
+ * controller.abort();
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
+ export namespace writeFile {
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Returns `undefined`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writeFile}.
+ * @since v0.1.29
+ * @param file filename or file descriptor
+ */
+ export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFile } from 'fs';
+ *
+ * appendFile('message.txt', 'data to append', (err) => {
+ * if (err) throw err;
+ * console.log('The "data to append" was appended to file!');
+ * });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFile } from 'fs';
+ *
+ * appendFile('message.txt', 'data to append', 'utf8', callback);
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { open, close, appendFile } from 'fs';
+ *
+ * function closeFd(fd) {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ *
+ * open('message.txt', 'a', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * appendFile(fd, 'data to append', 'utf8', (err) => {
+ * closeFd(fd);
+ * if (err) throw err;
+ * });
+ * } catch (err) {
+ * closeFd(fd);
+ * throw err;
+ * }
+ * });
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void;
+ export namespace appendFile {
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
+ }
+ /**
+ * Synchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
+ *
+ * ```js
+ * import { appendFileSync } from 'fs';
+ *
+ * try {
+ * appendFileSync('message.txt', 'data to append');
+ * console.log('The "data to append" was appended to file!');
+ * } catch (err) {
+ * // Handle the error
+ * }
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding:
+ *
+ * ```js
+ * import { appendFileSync } from 'fs';
+ *
+ * appendFileSync('message.txt', 'data to append', 'utf8');
+ * ```
+ *
+ * The `path` may be specified as a numeric file descriptor that has been opened
+ * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+ * not be closed automatically.
+ *
+ * ```js
+ * import { openSync, closeSync, appendFileSync } from 'fs';
+ *
+ * let fd;
+ *
+ * try {
+ * fd = openSync('message.txt', 'a');
+ * appendFileSync(fd, 'data to append', 'utf8');
+ * } catch (err) {
+ * // Handle the error
+ * } finally {
+ * if (fd !== undefined)
+ * closeSync(fd);
+ * }
+ * ```
+ * @since v0.6.7
+ * @param path filename or file descriptor
+ */
+ export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export interface WatchFileOptions {
+ bigint?: boolean | undefined;
+ persistent?: boolean | undefined;
+ interval?: number | undefined;
+ }
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint?: false | undefined;
+ })
+ | undefined,
+ listener: (curr: Stats, prev: Stats) => void
+ ): StatWatcher;
+ export function watchFile(
+ filename: PathLike,
+ options:
+ | (WatchFileOptions & {
+ bigint: true;
+ })
+ | undefined,
+ listener: (curr: BigIntStats, prev: BigIntStats) => void
+ ): StatWatcher;
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): StatWatcher;
+ /**
+ * Stop watching for changes on `filename`. If `listener` is specified, only that
+ * particular listener is removed. Otherwise, _all_ listeners are removed,
+ * effectively stopping watching of `filename`.
+ *
+ * Calling `fs.unwatchFile()` with a filename that is not being watched is a
+ * no-op, not an error.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile()` and`fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()`and `fs.unwatchFile()` when possible.
+ * @since v0.1.31
+ * @param listener Optional, a listener previously attached using `fs.watchFile()`
+ */
+ export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
+ export interface WatchOptions extends Abortable {
+ encoding?: BufferEncoding | 'buffer' | undefined;
+ persistent?: boolean | undefined;
+ recursive?: boolean | undefined;
+ }
+ export type WatchEventType = 'rename' | 'change';
+ export type WatchListener<T> = (event: WatchEventType, filename: T) => void;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a
+ * directory.
+ *
+ * The second argument is optional. If `options` is provided as a string, it
+ * specifies the `encoding`. Otherwise `options` should be passed as an object.
+ *
+ * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file
+ * which triggered the event.
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`.
+ *
+ * If a `signal` is passed, aborting the corresponding AbortController will close
+ * the returned `fs.FSWatcher`.
+ * @since v0.5.10
+ * @param listener
+ */
+ export function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer',
+ listener?: WatchListener<Buffer>
+ ): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options?: WatchOptions | BufferEncoding | null, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(filename: PathLike, options: WatchOptions | string, listener?: WatchListener<string | Buffer>): FSWatcher;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function watch(filename: PathLike, listener?: WatchListener<string>): FSWatcher;
+ /**
+ * Test whether or not the given path exists by checking with the file system.
+ * Then call the `callback` argument with either true or false:
+ *
+ * ```js
+ * import { exists } from 'fs';
+ *
+ * exists('/etc/passwd', (e) => {
+ * console.log(e ? 'it exists' : 'no passwd!');
+ * });
+ * ```
+ *
+ * **The parameters for this callback are not consistent with other Node.js**
+ * **callbacks.** Normally, the first parameter to a Node.js callback is an `err`parameter, optionally followed by other parameters. The `fs.exists()` callback
+ * has only one boolean parameter. This is one reason `fs.access()` is recommended
+ * instead of `fs.exists()`.
+ *
+ * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file does not exist.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { exists, open, close } from 'fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * console.error('myfile already exists');
+ * } else {
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close, exists } from 'fs';
+ *
+ * exists('myfile', (e) => {
+ * if (e) {
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * } else {
+ * console.error('myfile does not exist');
+ * }
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for existence and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the existence of a file only if the file won’t be
+ * used directly, for example when its existence is a signal from another
+ * process.
+ * @since v0.0.2
+ * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead.
+ */
+ export function exists(path: PathLike, callback: (exists: boolean) => void): void;
+ /** @deprecated */
+ export namespace exists {
+ /**
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike): Promise<boolean>;
+ }
+ /**
+ * Returns `true` if the path exists, `false` otherwise.
+ *
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link exists}.
+ *
+ * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`parameter to `fs.exists()` accepts parameters that are inconsistent with other
+ * Node.js callbacks. `fs.existsSync()` does not use a callback.
+ *
+ * ```js
+ * import { existsSync } from 'fs';
+ *
+ * if (existsSync('/etc/passwd'))
+ * console.log('The path exists.');
+ * ```
+ * @since v0.1.21
+ */
+ export function existsSync(path: PathLike): boolean;
+ export namespace constants {
+ // File Access Constants
+ /** Constant for fs.access(). File is visible to the calling process. */
+ const F_OK: number;
+ /** Constant for fs.access(). File can be read by the calling process. */
+ const R_OK: number;
+ /** Constant for fs.access(). File can be written by the calling process. */
+ const W_OK: number;
+ /** Constant for fs.access(). File can be executed by the calling process. */
+ const X_OK: number;
+ // File Copy Constants
+ /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
+ const COPYFILE_EXCL: number;
+ /**
+ * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
+ */
+ const COPYFILE_FICLONE: number;
+ /**
+ * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
+ */
+ const COPYFILE_FICLONE_FORCE: number;
+ // File Open Constants
+ /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
+ const O_RDONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
+ const O_WRONLY: number;
+ /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
+ const O_RDWR: number;
+ /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
+ const O_CREAT: number;
+ /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
+ const O_EXCL: number;
+ /**
+ * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
+ * opening the path shall not cause that terminal to become the controlling terminal for the process
+ * (if the process does not already have one).
+ */
+ const O_NOCTTY: number;
+ /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
+ const O_TRUNC: number;
+ /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
+ const O_APPEND: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
+ const O_DIRECTORY: number;
+ /**
+ * constant for fs.open().
+ * Flag indicating reading accesses to the file system will no longer result in
+ * an update to the atime information associated with the file.
+ * This flag is available on Linux operating systems only.
+ */
+ const O_NOATIME: number;
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
+ const O_NOFOLLOW: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
+ const O_SYNC: number;
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
+ const O_DSYNC: number;
+ /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
+ const O_SYMLINK: number;
+ /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
+ const O_DIRECT: number;
+ /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
+ const O_NONBLOCK: number;
+ // File Type Constants
+ /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
+ const S_IFMT: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
+ const S_IFREG: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
+ const S_IFDIR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
+ const S_IFCHR: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
+ const S_IFBLK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
+ const S_IFIFO: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
+ const S_IFLNK: number;
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
+ const S_IFSOCK: number;
+ // File Mode Constants
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
+ const S_IRWXU: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
+ const S_IRUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
+ const S_IWUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
+ const S_IXUSR: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
+ const S_IRWXG: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
+ const S_IRGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
+ const S_IWGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
+ const S_IXGRP: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
+ const S_IRWXO: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
+ const S_IROTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
+ const S_IWOTH: number;
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
+ const S_IXOTH: number;
+ /**
+ * When set, a memory file mapping is used to access the file. This flag
+ * is available on Windows operating systems only. On other operating systems,
+ * this flag is ignored.
+ */
+ const UV_FS_O_FILEMAP: number;
+ }
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * The final argument, `callback`, is a callback function that is invoked with
+ * a possible error argument. If any of the accessibility checks fail, the error
+ * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable.
+ *
+ * ```js
+ * import { access, constants } from 'fs';
+ *
+ * const file = 'package.json';
+ *
+ * // Check if the file exists in the current directory.
+ * access(file, constants.F_OK, (err) => {
+ * console.log(`${file} ${err ? 'does not exist' : 'exists'}`);
+ * });
+ *
+ * // Check if the file is readable.
+ * access(file, constants.R_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`);
+ * });
+ *
+ * // Check if the file is writable.
+ * access(file, constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
+ * });
+ *
+ * // Check if the file is readable and writable.
+ * access(file, constants.R_OK | constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
+ * });
+ * ```
+ *
+ * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing
+ * so introduces a race condition, since other processes may change the file's
+ * state between the two calls. Instead, user code should open/read/write the
+ * file directly and handle the error raised if the file is not accessible.
+ *
+ * **write (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'fs';
+ *
+ * access('myfile', (err) => {
+ * if (!err) {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **write (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ *
+ * open('myfile', 'wx', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'EEXIST') {
+ * console.error('myfile already exists');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * writeMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * **read (NOT RECOMMENDED)**
+ *
+ * ```js
+ * import { access, open, close } from 'fs';
+ * access('myfile', (err) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) throw err;
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * });
+ * ```
+ *
+ * **read (RECOMMENDED)**
+ *
+ * ```js
+ * import { open, close } from 'fs';
+ *
+ * open('myfile', 'r', (err, fd) => {
+ * if (err) {
+ * if (err.code === 'ENOENT') {
+ * console.error('myfile does not exist');
+ * return;
+ * }
+ *
+ * throw err;
+ * }
+ *
+ * try {
+ * readMyData(fd);
+ * } finally {
+ * close(fd, (err) => {
+ * if (err) throw err;
+ * });
+ * }
+ * });
+ * ```
+ *
+ * The "not recommended" examples above check for accessibility and then use the
+ * file; the "recommended" examples are better because they use the file directly
+ * and handle the error, if any.
+ *
+ * In general, check for the accessibility of a file only if the file will not be
+ * used directly, for example when its accessibility is a signal from another
+ * process.
+ *
+ * On Windows, access-control policies (ACLs) on a directory may limit access to
+ * a file or directory. The `fs.access()` function, however, does not check the
+ * ACL and therefore may report that a path is accessible even if the ACL restricts
+ * the user from reading or writing to it.
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function access(path: PathLike, callback: NoParamCallback): void;
+ export namespace access {
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously tests a user's permissions for the file or directory specified
+ * by `path`. The `mode` argument is an optional integer that specifies the
+ * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and
+ * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
+ * the method will return `undefined`.
+ *
+ * ```js
+ * import { accessSync, constants } from 'fs';
+ *
+ * try {
+ * accessSync('etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can read/write');
+ * } catch (err) {
+ * console.error('no access!');
+ * }
+ * ```
+ * @since v0.11.15
+ * @param [mode=fs.constants.F_OK]
+ */
+ export function accessSync(path: PathLike, mode?: number): void;
+ interface StreamOptions {
+ flags?: string | undefined;
+ encoding?: BufferEncoding | undefined;
+ fd?: number | promises.FileHandle | undefined;
+ mode?: number | undefined;
+ autoClose?: boolean | undefined;
+ /**
+ * @default false
+ */
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface ReadStreamOptions extends StreamOptions {
+ end?: number | undefined;
+ }
+ /**
+ * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 kb.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is
+ * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the
+ * current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
+ * the specified file descriptor. This means that no `'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`.
+ *
+ * If `fd` points to a character device that only supports blocking reads
+ * (such as keyboard or sound card), read operations do not finish until data is
+ * available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option, it is possible to override the corresponding `fs`implementations for `open`, `read`, and `close`. When providing the `fs` option,
+ * an override for `read` is required. If no `fd` is provided, an override for`open` is also required. If `autoClose` is `true`, an override for `close` is
+ * also required.
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ *
+ * // Create a stream from some character device.
+ * const stream = createReadStream('/dev/input/event0');
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * `mode` sets the file mode (permission and sticky bits), but only if the
+ * file was created.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { createReadStream } from 'fs';
+ *
+ * createReadStream('sample.txt', { start: 90, end: 99 });
+ * ```
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` option to be set to `r+` rather than the
+ * default `w`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev` and `close`. Overriding `write()`without `writev()` can reduce
+ * performance as some optimizations (`_writev()`)
+ * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override
+ * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required.
+ *
+ * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be
+ * emitted. `fd` should be blocking; non-blocking `fd`s
+ * should be passed to `net.Socket`.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ * @since v0.1.31
+ */
+ export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other
+ * than a possible
+ * exception are given to the completion callback.
+ * @since v0.1.96
+ */
+ export function fdatasync(fd: number, callback: NoParamCallback): void;
+ export namespace fdatasync {
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`.
+ * @since v0.1.96
+ */
+ export function fdatasyncSync(fd: number): void;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. No arguments other than a possible exception are given to the
+ * callback function. Node.js makes no guarantees about the atomicity of the copy
+ * operation. If an error occurs after the destination file has been opened for
+ * writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFile, constants } from 'fs';
+ *
+ * function callback(err) {
+ * if (err) throw err;
+ * console.log('source.txt was copied to destination.txt');
+ * }
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFile('source.txt', 'destination.txt', callback);
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
+ export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
+ export namespace copyFile {
+ function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
+ }
+ /**
+ * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists. Returns `undefined`. Node.js makes no guarantees about the
+ * atomicity of the copy operation. If an error occurs after the destination file
+ * has been opened for writing, Node.js will attempt to remove the destination.
+ *
+ * `mode` is an optional integer that specifies the behavior
+ * of the copy operation. It is possible to create a mask consisting of the bitwise
+ * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+ *
+ * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+ * exists.
+ * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+ * copy-on-write reflink. If the platform does not support copy-on-write, then a
+ * fallback copy mechanism is used.
+ * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+ * create a copy-on-write reflink. If the platform does not support
+ * copy-on-write, then the operation will fail.
+ *
+ * ```js
+ * import { copyFileSync, constants } from 'fs';
+ *
+ * // destination.txt will be created or overwritten by default.
+ * copyFileSync('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * ```
+ * @since v8.5.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] modifiers for copy operation.
+ */
+ export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
+ /**
+ * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`.
+ *
+ * `position` is the offset from the beginning of the file where this data
+ * should be written. If `typeof position !== 'number'`, the data will be written
+ * at the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesWritten`, and`buffers`. `bytesWritten` is how many bytes were written from `buffers`.
+ *
+ * If this method is `util.promisify()` ed, it returns a promise for an`Object` with `bytesWritten` and `buffers` properties.
+ *
+ * It is unsafe to use `fs.writev()` multiple times on the same file without
+ * waiting for the callback. For this scenario, use {@link createWriteStream}.
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ */
+ export function writev(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function writev(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface WriteVResult {
+ bytesWritten: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace writev {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link writev}.
+ * @since v12.9.0
+ * @return The number of bytes written.
+ */
+ export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+ /**
+ * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s
+ * using `readv()`.
+ *
+ * `position` is the offset from the beginning of the file from where data
+ * should be read. If `typeof position !== 'number'`, the data will be read
+ * from the current position.
+ *
+ * The callback will be given three arguments: `err`, `bytesRead`, and`buffers`. `bytesRead` is how many bytes were read from the file.
+ *
+ * If this method is invoked as its `util.promisify()` ed version, it returns
+ * a promise for an `Object` with `bytesRead` and `buffers` properties.
+ * @since v13.13.0, v12.17.0
+ */
+ export function readv(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
+ export function readv(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export interface ReadVResult {
+ bytesRead: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+ export namespace readv {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ }
+ /**
+ * For detailed information, see the documentation of the asynchronous version of
+ * this API: {@link readv}.
+ * @since v13.13.0, v12.17.0
+ * @return The number of bytes read.
+ */
+ export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+ export interface OpenDirOptions {
+ encoding?: BufferEncoding | undefined;
+ /**
+ * Number of directory entries that are buffered
+ * internally when reading from the directory. Higher values lead to better
+ * performance but higher memory usage.
+ * @default 32
+ */
+ bufferSize?: number | undefined;
+ }
+ /**
+ * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
+ /**
+ * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for
+ * more details.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ * @since v12.12.0
+ */
+ export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export namespace opendir {
+ function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ }
+ export interface BigIntStats extends StatsBase<bigint> {
+ atimeNs: bigint;
+ mtimeNs: bigint;
+ ctimeNs: bigint;
+ birthtimeNs: bigint;
+ }
+ export interface BigIntOptions {
+ bigint: true;
+ }
+ export interface StatOptions {
+ bigint?: boolean | undefined;
+ }
+ export interface StatSyncOptions extends StatOptions {
+ throwIfNoEntry?: boolean | undefined;
+ }
+ interface CopyOptionsBase {
+ /**
+ * Dereference symlinks
+ * @default false
+ */
+ dereference?: boolean;
+ /**
+ * When `force` is `false`, and the destination
+ * exists, throw an error.
+ * @default false
+ */
+ errorOnExist?: boolean;
+ /**
+ * Overwrite existing file or directory. _The copy
+ * operation will ignore errors if you set this to false and the destination
+ * exists. Use the `errorOnExist` option to change this behavior.
+ * @default true
+ */
+ force?: boolean;
+ /**
+ * When `true` timestamps from `src` will
+ * be preserved.
+ * @default false
+ */
+ preserveTimestamps?: boolean;
+ /**
+ * Copy directories recursively.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * When true, path resolution for symlinks will be skipped
+ * @default false
+ */
+ verbatimSymlinks?: boolean;
+ }
+ export interface CopyOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean | Promise<boolean>;
+ }
+ export interface CopySyncOptions extends CopyOptionsBase {
+ /**
+ * Function to filter copied files/directories. Return
+ * `true` to copy the item, `false` to ignore it.
+ */
+ filter?(source: string, destination: string): boolean;
+ }
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * Synchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ */
+ export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
+}
+declare module 'node:fs' {
+ export * from 'fs';
+}
diff --git a/node_modules/@types/node/ts4.8/fs/promises.d.ts b/node_modules/@types/node/ts4.8/fs/promises.d.ts
new file mode 100755
index 0000000..9d0b5f1
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/fs/promises.d.ts
@@ -0,0 +1,1120 @@
+/**
+ * The `fs/promises` API provides asynchronous file system methods that return
+ * promises.
+ *
+ * The promise APIs use the underlying Node.js threadpool to perform file
+ * system operations off the event loop thread. These operations are not
+ * synchronized or threadsafe. Care must be taken when performing multiple
+ * concurrent modifications on the same file or data corruption may occur.
+ * @since v10.0.0
+ */
+declare module 'fs/promises' {
+ import { Abortable } from 'node:events';
+ import { Stream } from 'node:stream';
+ import { ReadableStream } from 'node:stream/web';
+ import {
+ BigIntStats,
+ BufferEncodingOption,
+ constants as fsConstants,
+ CopyOptions,
+ Dir,
+ Dirent,
+ MakeDirectoryOptions,
+ Mode,
+ ObjectEncodingOptions,
+ OpenDirOptions,
+ OpenMode,
+ PathLike,
+ ReadStream,
+ ReadVResult,
+ RmDirOptions,
+ RmOptions,
+ StatOptions,
+ Stats,
+ TimeLike,
+ WatchEventType,
+ WatchOptions,
+ WriteStream,
+ WriteVResult,
+ } from 'node:fs';
+
+ interface FileChangeInfo<T extends string | Buffer> {
+ eventType: WatchEventType;
+ filename: T;
+ }
+ interface FlagAndOpenMode {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ }
+ interface FileReadResult<T extends NodeJS.ArrayBufferView> {
+ bytesRead: number;
+ buffer: T;
+ }
+ interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
+ /**
+ * @default `Buffer.alloc(0xffff)`
+ */
+ buffer?: T;
+ /**
+ * @default 0
+ */
+ offset?: number | null;
+ /**
+ * @default `buffer.byteLength`
+ */
+ length?: number | null;
+ position?: number | null;
+ }
+ interface CreateReadStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ end?: number | undefined;
+ highWaterMark?: number | undefined;
+ }
+ interface CreateWriteStreamOptions {
+ encoding?: BufferEncoding | null | undefined;
+ autoClose?: boolean | undefined;
+ emitClose?: boolean | undefined;
+ start?: number | undefined;
+ }
+ // TODO: Add `EventEmitter` close
+ interface FileHandle {
+ /**
+ * The numeric file descriptor managed by the {FileHandle} object.
+ * @since v10.0.0
+ */
+ readonly fd: number;
+ /**
+ * Alias of `filehandle.writeFile()`.
+ *
+ * When operating on file handles, the mode cannot be changed from what it was set
+ * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
+ * @since v10.0.0
+ * @param uid The file's new owner's user id.
+ * @param gid The file's new group's group id.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chown(uid: number, gid: number): Promise<void>;
+ /**
+ * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html).
+ * @since v10.0.0
+ * @param mode the file mode bit mask.
+ * @return Fulfills with `undefined` upon success.
+ */
+ chmod(mode: Mode): Promise<void>;
+ /**
+ * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
+ * returned by this method has a default `highWaterMark` of 64 kb.
+ *
+ * `options` can include `start` and `end` values to read a range of bytes from
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
+ * start counting at 0, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
+ * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
+ * the current file position. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If the `FileHandle` points to a character device that only supports blocking
+ * reads (such as keyboard or sound card), read operations do not finish until data
+ * is available. This can prevent the process from exiting and the stream from
+ * closing naturally.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * const fd = await open('/dev/input/event0');
+ * // Create a stream from some character device.
+ * const stream = fd.createReadStream();
+ * setTimeout(() => {
+ * stream.close(); // This may not close the stream.
+ * // Artificially marking end-of-stream, as if the underlying resource had
+ * // indicated end-of-file by itself, allows the stream to close.
+ * // This does not cancel pending read operations, and if there is such an
+ * // operation, the process may still not be able to exit successfully
+ * // until it finishes.
+ * stream.push(null);
+ * stream.read(0);
+ * }, 100);
+ * ```
+ *
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
+ * there's an error. It is the application's responsibility to close it and make
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
+ * automatically.
+ *
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * const fd = await open('sample.txt');
+ * fd.createReadStream({ start: 90, end: 99 });
+ * ```
+ * @since v16.11.0
+ */
+ createReadStream(options?: CreateReadStreamOptions): ReadStream;
+ /**
+ * `options` may also include a `start` option to allow writing data at some
+ * position past the beginning of the file, allowed values are in the
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` `open` option to be set to `r+` rather than
+ * the default `r`. The `encoding` can be any one of those accepted by `Buffer`.
+ *
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
+ * then the file descriptor won't be closed, even if there's an error.
+ * It is the application's responsibility to close it and make sure there's no
+ * file descriptor leak.
+ *
+ * By default, the stream will emit a `'close'` event after it has been
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
+ * @since v16.11.0
+ */
+ createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
+ /**
+ * Forces all currently queued I/O operations associated with the file to the
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
+ *
+ * Unlike `filehandle.sync` this method does not flush modified metadata.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ datasync(): Promise<void>;
+ /**
+ * Request that all data for the open file descriptor is flushed to the storage
+ * device. The specific implementation is operating system and device specific.
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fufills with `undefined` upon success.
+ */
+ sync(): Promise<void>;
+ /**
+ * Reads data from the file and stores that in the given buffer.
+ *
+ * If the file is not modified concurrently, the end-of-file is reached when the
+ * number of bytes read is zero.
+ * @since v10.0.0
+ * @param buffer A buffer that will be filled with the file data read.
+ * @param offset The location in the buffer at which to start filling.
+ * @param length The number of bytes to read.
+ * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
+ * integer, the current file position will remain unchanged.
+ * @return Fulfills upon success with an object with two properties:
+ */
+ read<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
+ read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
+ /**
+ * Returns a `ReadableStream` that may be used to read the files data.
+ *
+ * An error will be thrown if this method is called more than once or is called after the `FileHandle` is closed
+ * or closing.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const chunk of file.readableWebStream())
+ * console.log(chunk);
+ *
+ * await file.close();
+ * ```
+ *
+ * While the `ReadableStream` will read the file to completion, it will not close the `FileHandle` automatically. User code must still call the `fileHandle.close()` method.
+ *
+ * @since v17.0.0
+ * @experimental
+ */
+ readableWebStream(): ReadableStream;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support reading.
+ *
+ * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current
+ * position till the end of the file. It doesn't always read from the beginning
+ * of the file.
+ * @since v10.0.0
+ * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the
+ * data will be a string.
+ */
+ readFile(
+ options?: {
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options:
+ | {
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ }
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(
+ options?:
+ | (ObjectEncodingOptions & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with an {fs.Stats} for the file.
+ */
+ stat(
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ stat(
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * Truncates the file.
+ *
+ * If the file was larger than `len` bytes, only the first `len` bytes will be
+ * retained in the file.
+ *
+ * The following example retains only the first four bytes of the file:
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * let filehandle = null;
+ * try {
+ * filehandle = await open('temp.txt', 'r+');
+ * await filehandle.truncate(4);
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ *
+ * If the file previously was shorter than `len` bytes, it is extended, and the
+ * extended part is filled with null bytes (`'\0'`):
+ *
+ * If `len` is negative then `0` will be used.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ truncate(len?: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
+ * @since v10.0.0
+ */
+ utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ * The promise is resolved with no arguments upon success.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `filehandle.writeFile()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected).
+ *
+ * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the
+ * current position till the end of the file. It doesn't always write from the
+ * beginning of the file.
+ * @since v10.0.0
+ */
+ writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise<void>;
+ /**
+ * Write `buffer` to the file.
+ *
+ * The promise is resolved with an object containing two properties:
+ *
+ * It is unsafe to use `filehandle.write()` multiple times on the same file
+ * without waiting for the promise to be resolved (or rejected). For this
+ * scenario, use `filehandle.createWriteStream()`.
+ *
+ * On Linux, positional writes do not work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v10.0.0
+ * @param [offset=0] The start position from within `buffer` where the data to write begins.
+ * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
+ * @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position.
+ * See the POSIX pwrite(2) documentation for more detail.
+ */
+ write<TBuffer extends Uint8Array>(
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null,
+ position?: number | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: TBuffer;
+ }>;
+ write(
+ data: string,
+ position?: number | null,
+ encoding?: BufferEncoding | null
+ ): Promise<{
+ bytesWritten: number;
+ buffer: string;
+ }>;
+ /**
+ * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
+ *
+ * The promise is resolved with an object containing a two properties:
+ *
+ * It is unsafe to call `writev()` multiple times on the same file without waiting
+ * for the promise to be resolved (or rejected).
+ *
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to
+ * the end of the file.
+ * @since v12.9.0
+ * @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
+ * position.
+ */
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ /**
+ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
+ * @since v13.13.0, v12.17.0
+ * @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
+ * @return Fulfills upon success an object containing two properties:
+ */
+ readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ /**
+ * Closes the file handle after waiting for any pending operation on the handle to
+ * complete.
+ *
+ * ```js
+ * import { open } from 'fs/promises';
+ *
+ * let filehandle;
+ * try {
+ * filehandle = await open('thefile.txt', 'r');
+ * } finally {
+ * await filehandle?.close();
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ close(): Promise<void>;
+ }
+
+ const constants: typeof fsConstants;
+
+ /**
+ * Tests a user's permissions for the file or directory specified by `path`.
+ * The `mode` argument is an optional integer that specifies the accessibility
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
+ *
+ * If the accessibility check is successful, the promise is resolved with no
+ * value. If any of the accessibility checks fail, the promise is rejected
+ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
+ * written by the current process.
+ *
+ * ```js
+ * import { access } from 'fs/promises';
+ * import { constants } from 'fs';
+ *
+ * try {
+ * await access('/etc/passwd', constants.R_OK | constants.W_OK);
+ * console.log('can access');
+ * } catch {
+ * console.error('cannot access');
+ * }
+ * ```
+ *
+ * Using `fsPromises.access()` to check for the accessibility of a file before
+ * calling `fsPromises.open()` is not recommended. Doing so introduces a race
+ * condition, since other processes may change the file's state between the two
+ * calls. Instead, user code should open/read/write the file directly and handle
+ * the error raised if the file is not accessible.
+ * @since v10.0.0
+ * @param [mode=fs.constants.F_OK]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function access(path: PathLike, mode?: number): Promise<void>;
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+ * already exists.
+ *
+ * No guarantees are made about the atomicity of the copy operation. If an
+ * error occurs after the destination file has been opened for writing, an attempt
+ * will be made to remove the destination.
+ *
+ * ```js
+ * import { constants } from 'fs';
+ * import { copyFile } from 'fs/promises';
+ *
+ * try {
+ * await copyFile('source.txt', 'destination.txt');
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.log('The file could not be copied');
+ * }
+ *
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+ * try {
+ * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+ * console.log('source.txt was copied to destination.txt');
+ * } catch {
+ * console.log('The file could not be copied');
+ * }
+ * ```
+ * @since v10.0.0
+ * @param src source filename to copy
+ * @param dest destination filename of the copy operation
+ * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g.
+ * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
+ * @return Fulfills with `undefined` upon success.
+ */
+ function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
+ /**
+ * Opens a `FileHandle`.
+ *
+ * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail.
+ *
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+ * @since v10.0.0
+ * @param [flags='r'] See `support of file system `flags``.
+ * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
+ * @return Fulfills with a {FileHandle} object.
+ */
+ function open(path: PathLike, flags?: string | number, mode?: Mode): Promise<FileHandle>;
+ /**
+ * Renames `oldPath` to `newPath`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * Truncates (shortens or extends the length) of the content at `path` to `len`bytes.
+ * @since v10.0.0
+ * @param [len=0]
+ * @return Fulfills with `undefined` upon success.
+ */
+ function truncate(path: PathLike, len?: number): Promise<void>;
+ /**
+ * Removes the directory identified by `path`.
+ *
+ * Using `fsPromises.rmdir()` on a file (not a directory) results in the
+ * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX.
+ *
+ * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
+ /**
+ * Removes files and directories (modeled on the standard POSIX `rm` utility).
+ * @since v14.14.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
+ /**
+ * Asynchronously creates a directory.
+ *
+ * The optional `options` argument can be an integer specifying `mode` (permission
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory
+ * that exists results in a
+ * rejection only when `recursive` is false.
+ * @since v10.0.0
+ * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.
+ */
+ function mkdir(
+ path: PathLike,
+ options: MakeDirectoryOptions & {
+ recursive: true;
+ }
+ ): Promise<string | undefined>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(
+ path: PathLike,
+ options?:
+ | Mode
+ | (MakeDirectoryOptions & {
+ recursive?: false | undefined;
+ })
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ /**
+ * Reads the contents of a directory.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned
+ * will be passed as `Buffer` objects.
+ *
+ * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects.
+ *
+ * ```js
+ * import { readdir } from 'fs/promises';
+ *
+ * try {
+ * const files = await readdir(path);
+ * for (const file of files)
+ * console.log(file);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ * @since v10.0.0
+ * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options:
+ | {
+ encoding: 'buffer';
+ withFileTypes?: false | undefined;
+ }
+ | 'buffer'
+ ): Promise<Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options?:
+ | (ObjectEncodingOptions & {
+ withFileTypes?: false | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string[] | Buffer[]>;
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdir(
+ path: PathLike,
+ options: ObjectEncodingOptions & {
+ withFileTypes: true;
+ }
+ ): Promise<Dirent[]>;
+ /**
+ * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
+ * resolved with the`linkString` upon success.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the link path returned. If the `encoding` is set to `'buffer'`, the link path
+ * returned will be passed as a `Buffer` object.
+ * @since v10.0.0
+ * @return Fulfills with the `linkString` upon success.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
+ /**
+ * Creates a symbolic link.
+ *
+ * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path
+ * to be absolute. When using `'junction'`, the `target` argument will
+ * automatically be normalized to absolute path.
+ * @since v10.0.0
+ * @param [type='file']
+ * @return Fulfills with `undefined` upon success.
+ */
+ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+ /**
+ * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link,
+ * in which case the link itself is stat-ed, not the file that it refers to.
+ * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`.
+ */
+ function lstat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function lstat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * @since v10.0.0
+ * @return Fulfills with the {fs.Stats} object for the given `path`.
+ */
+ function stat(
+ path: PathLike,
+ opts?: StatOptions & {
+ bigint?: false | undefined;
+ }
+ ): Promise<Stats>;
+ function stat(
+ path: PathLike,
+ opts: StatOptions & {
+ bigint: true;
+ }
+ ): Promise<BigIntStats>;
+ function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+ /**
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ /**
+ * If `path` refers to a symbolic link, then the link is removed without affecting
+ * the file or directory to which that link refers. If the `path` refers to a file
+ * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function unlink(path: PathLike): Promise<void>;
+ /**
+ * Changes the permissions of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the permissions on a symbolic link.
+ *
+ * This method is only implemented on macOS.
+ * @deprecated Since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchmod(path: PathLike, mode: Mode): Promise<void>;
+ /**
+ * Changes the ownership on a symbolic link.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a
+ * symbolic link, then the link is not dereferenced: instead, the timestamps of
+ * the symbolic link itself are changed.
+ * @since v14.5.0, v12.19.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Changes the ownership of a file.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function chown(path: PathLike, uid: number, gid: number): Promise<void>;
+ /**
+ * Change the file system timestamps of the object referenced by `path`.
+ *
+ * The `atime` and `mtime` arguments follow these rules:
+ *
+ * * Values can be either numbers representing Unix epoch time, `Date`s, or a
+ * numeric string like `'123456789.0'`.
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
+ * @since v10.0.0
+ * @return Fulfills with `undefined` upon success.
+ */
+ function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+ /**
+ * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
+ *
+ * Only paths that can be converted to UTF8 strings are supported.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use for
+ * the path. If the `encoding` is set to `'buffer'`, the path returned will be
+ * passed as a `Buffer` object.
+ *
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
+ * this restriction.
+ * @since v10.0.0
+ * @return Fulfills with the resolved path upon success.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Creates a unique temporary directory. A unique directory name is generated by
+ * appending six random characters to the end of the provided `prefix`. Due to
+ * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some
+ * platforms, notably the BSDs, can return more than six random characters, and
+ * replace trailing `X` characters in `prefix` with random characters.
+ *
+ * The optional `options` argument can be a string specifying an encoding, or an
+ * object with an `encoding` property specifying the character encoding to use.
+ *
+ * ```js
+ * import { mkdtemp } from 'fs/promises';
+ *
+ * try {
+ * await mkdtemp(path.join(os.tmpdir(), 'foo-'));
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * The `fsPromises.mkdtemp()` method will append the six randomly selected
+ * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing
+ * platform-specific path separator
+ * (`require('path').sep`).
+ * @since v10.0.0
+ * @return Fulfills with a string containing the filesystem path of the newly created temporary directory.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ *
+ * The `encoding` option is ignored if `data` is a buffer.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * Any specified `FileHandle` has to support writing.
+ *
+ * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
+ * without waiting for the promise to be settled.
+ *
+ * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
+ * method that performs multiple `write` calls internally to write the buffer
+ * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`.
+ *
+ * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
+ * Cancelation is "best effort", and some amount of data is likely still
+ * to be written.
+ *
+ * ```js
+ * import { writeFile } from 'fs/promises';
+ * import { Buffer } from 'buffer';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+ * const promise = writeFile('message.txt', data, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.writeFile` performs.
+ * @since v10.0.0
+ * @param file filename or `FileHandle`
+ * @return Fulfills with `undefined` upon success.
+ */
+ function writeFile(
+ file: PathLike | FileHandle,
+ data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
+ options?:
+ | (ObjectEncodingOptions & {
+ mode?: Mode | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ | null
+ ): Promise<void>;
+ /**
+ * Asynchronously append data to a file, creating the file if it does not yet
+ * exist. `data` can be a string or a `Buffer`.
+ *
+ * If `options` is a string, then it specifies the `encoding`.
+ *
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+ *
+ * The `path` may be specified as a `FileHandle` that has been opened
+ * for appending (using `fsPromises.open()`).
+ * @since v10.0.0
+ * @param path filename or {FileHandle}
+ * @return Fulfills with `undefined` upon success.
+ */
+ function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ *
+ * If no encoding is specified (using `options.encoding`), the data is returned
+ * as a `Buffer` object. Otherwise, the data will be a string.
+ *
+ * If `options` is a string, then it specifies the encoding.
+ *
+ * When the `path` is a directory, the behavior of `fsPromises.readFile()` is
+ * platform-specific. On macOS, Linux, and Windows, the promise will be rejected
+ * with an error. On FreeBSD, a representation of the directory's contents will be
+ * returned.
+ *
+ * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
+ * request is aborted the promise returned is rejected with an `AbortError`:
+ *
+ * ```js
+ * import { readFile } from 'fs/promises';
+ *
+ * try {
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ * const promise = readFile(fileName, { signal });
+ *
+ * // Abort the request before the promise settles.
+ * controller.abort();
+ *
+ * await promise;
+ * } catch (err) {
+ * // When a request is aborted - err is an AbortError
+ * console.error(err);
+ * }
+ * ```
+ *
+ * Aborting an ongoing request does not abort individual operating
+ * system requests but rather the internal buffering `fs.readFile` performs.
+ *
+ * Any specified `FileHandle` has to support reading.
+ * @since v10.0.0
+ * @param path filename or `FileHandle`
+ * @return Fulfills with the contents of the file.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | ({
+ encoding?: null | undefined;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | null
+ ): Promise<Buffer>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options:
+ | ({
+ encoding: BufferEncoding;
+ flag?: OpenMode | undefined;
+ } & Abortable)
+ | BufferEncoding
+ ): Promise<string>;
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | FileHandle,
+ options?:
+ | (ObjectEncodingOptions &
+ Abortable & {
+ flag?: OpenMode | undefined;
+ })
+ | BufferEncoding
+ | null
+ ): Promise<string | Buffer>;
+ /**
+ * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
+ *
+ * Creates an `fs.Dir`, which contains all further functions for reading from
+ * and cleaning up the directory.
+ *
+ * The `encoding` option sets the encoding for the `path` while opening the
+ * directory and subsequent read operations.
+ *
+ * Example using async iteration:
+ *
+ * ```js
+ * import { opendir } from 'fs/promises';
+ *
+ * try {
+ * const dir = await opendir('./');
+ * for await (const dirent of dir)
+ * console.log(dirent.name);
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * ```
+ *
+ * When using the async iterator, the `fs.Dir` object will be automatically
+ * closed after the iterator exits.
+ * @since v12.12.0
+ * @return Fulfills with an {fs.Dir}.
+ */
+ function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+ /**
+ * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
+ *
+ * ```js
+ * const { watch } = require('fs/promises');
+ *
+ * const ac = new AbortController();
+ * const { signal } = ac;
+ * setTimeout(() => ac.abort(), 10000);
+ *
+ * (async () => {
+ * try {
+ * const watcher = watch(__filename, { signal });
+ * for await (const event of watcher)
+ * console.log(event);
+ * } catch (err) {
+ * if (err.name === 'AbortError')
+ * return;
+ * throw err;
+ * }
+ * })();
+ * ```
+ *
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
+ * disappears in the directory.
+ *
+ * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
+ * @since v15.9.0, v14.18.0
+ * @return of objects with the properties:
+ */
+ function watch(
+ filename: PathLike,
+ options:
+ | (WatchOptions & {
+ encoding: 'buffer';
+ })
+ | 'buffer'
+ ): AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
+ /**
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
+ * including subdirectories and files.
+ *
+ * When copying a directory to another directory, globs are not supported and
+ * behavior is similar to `cp dir1/ dir2/`.
+ * @since v16.7.0
+ * @experimental
+ * @param src source path to copy.
+ * @param dest destination path to copy to.
+ * @return Fulfills with `undefined` upon success.
+ */
+ function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
+}
+declare module 'node:fs/promises' {
+ export * from 'fs/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/globals.d.ts b/node_modules/@types/node/ts4.8/globals.d.ts
new file mode 100755
index 0000000..da49994
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/globals.d.ts
@@ -0,0 +1,294 @@
+// Declare "static" methods in Error
+interface ErrorConstructor {
+ /** Create .stack property on a target object */
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
+
+ /**
+ * Optional override for formatting stack traces
+ *
+ * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
+ */
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
+
+ stackTraceLimit: number;
+}
+
+/*-----------------------------------------------*
+ * *
+ * GLOBAL *
+ * *
+ ------------------------------------------------*/
+
+// For backwards compability
+interface NodeRequire extends NodeJS.Require { }
+interface RequireResolve extends NodeJS.RequireResolve { }
+interface NodeModule extends NodeJS.Module { }
+
+declare var process: NodeJS.Process;
+declare var console: Console;
+
+declare var __filename: string;
+declare var __dirname: string;
+
+declare var require: NodeRequire;
+declare var module: NodeModule;
+
+// Same as module.exports
+declare var exports: any;
+
+/**
+ * Only available if `--expose-gc` is passed to the process.
+ */
+declare var gc: undefined | (() => void);
+
+//#region borrowed
+// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /**
+ * Returns the AbortSignal object associated with this object.
+ */
+
+ readonly signal: AbortSignal;
+ /**
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
+ */
+ abort(): void;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal {
+ /**
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
+ */
+ readonly aborted: boolean;
+}
+
+declare var AbortController: {
+ prototype: AbortController;
+ new(): AbortController;
+};
+
+declare var AbortSignal: {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+ // TODO: Add abort() static
+};
+//#endregion borrowed
+
+//#region ArrayLike.at()
+interface RelativeIndexable<T> {
+ /**
+ * Takes an integer value and returns the item at that index,
+ * allowing for positive and negative integers.
+ * Negative integers count back from the last item in the array.
+ */
+ at(index: number): T | undefined;
+}
+interface String extends RelativeIndexable<string> {}
+interface Array<T> extends RelativeIndexable<T> {}
+interface Int8Array extends RelativeIndexable<number> {}
+interface Uint8Array extends RelativeIndexable<number> {}
+interface Uint8ClampedArray extends RelativeIndexable<number> {}
+interface Int16Array extends RelativeIndexable<number> {}
+interface Uint16Array extends RelativeIndexable<number> {}
+interface Int32Array extends RelativeIndexable<number> {}
+interface Uint32Array extends RelativeIndexable<number> {}
+interface Float32Array extends RelativeIndexable<number> {}
+interface Float64Array extends RelativeIndexable<number> {}
+interface BigInt64Array extends RelativeIndexable<bigint> {}
+interface BigUint64Array extends RelativeIndexable<bigint> {}
+//#endregion ArrayLike.at() end
+
+/**
+ * @since v17.0.0
+ *
+ * Creates a deep clone of an object.
+ */
+declare function structuredClone<T>(
+ value: T,
+ transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
+): T;
+
+/*----------------------------------------------*
+* *
+* GLOBAL INTERFACES *
+* *
+*-----------------------------------------------*/
+declare namespace NodeJS {
+ interface CallSite {
+ /**
+ * Value of "this"
+ */
+ getThis(): unknown;
+
+ /**
+ * Type of "this" as a string.
+ * This is the name of the function stored in the constructor field of
+ * "this", if available. Otherwise the object's [[Class]] internal
+ * property.
+ */
+ getTypeName(): string | null;
+
+ /**
+ * Current function
+ */
+ getFunction(): Function | undefined;
+
+ /**
+ * Name of the current function, typically its name property.
+ * If a name property is not available an attempt will be made to try
+ * to infer a name from the function's context.
+ */
+ getFunctionName(): string | null;
+
+ /**
+ * Name of the property [of "this" or one of its prototypes] that holds
+ * the current function
+ */
+ getMethodName(): string | null;
+
+ /**
+ * Name of the script [if this function was defined in a script]
+ */
+ getFileName(): string | null;
+
+ /**
+ * Current line number [if this function was defined in a script]
+ */
+ getLineNumber(): number | null;
+
+ /**
+ * Current column number [if this function was defined in a script]
+ */
+ getColumnNumber(): number | null;
+
+ /**
+ * A call site object representing the location where eval was called
+ * [if this function was created using a call to eval]
+ */
+ getEvalOrigin(): string | undefined;
+
+ /**
+ * Is this a toplevel invocation, that is, is "this" the global object?
+ */
+ isToplevel(): boolean;
+
+ /**
+ * Does this call take place in code defined by a call to eval?
+ */
+ isEval(): boolean;
+
+ /**
+ * Is this call in native V8 code?
+ */
+ isNative(): boolean;
+
+ /**
+ * Is this a constructor call?
+ */
+ isConstructor(): boolean;
+ }
+
+ interface ErrnoException extends Error {
+ errno?: number | undefined;
+ code?: string | undefined;
+ path?: string | undefined;
+ syscall?: string | undefined;
+ }
+
+ interface ReadableStream extends EventEmitter {
+ readable: boolean;
+ read(size?: number): string | Buffer;
+ setEncoding(encoding: BufferEncoding): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
+ unpipe(destination?: WritableStream): this;
+ unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
+ wrap(oldStream: ReadableStream): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
+ }
+
+ interface WritableStream extends EventEmitter {
+ writable: boolean;
+ write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
+ write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
+ end(cb?: () => void): this;
+ end(data: string | Uint8Array, cb?: () => void): this;
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
+ }
+
+ interface ReadWriteStream extends ReadableStream, WritableStream { }
+
+ interface RefCounted {
+ ref(): this;
+ unref(): this;
+ }
+
+ type TypedArray =
+ | Uint8Array
+ | Uint8ClampedArray
+ | Uint16Array
+ | Uint32Array
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | BigUint64Array
+ | BigInt64Array
+ | Float32Array
+ | Float64Array;
+ type ArrayBufferView = TypedArray | DataView;
+
+ interface Require {
+ (id: string): any;
+ resolve: RequireResolve;
+ cache: Dict<NodeModule>;
+ /**
+ * @deprecated
+ */
+ extensions: RequireExtensions;
+ main: Module | undefined;
+ }
+
+ interface RequireResolve {
+ (id: string, options?: { paths?: string[] | undefined; }): string;
+ paths(request: string): string[] | null;
+ }
+
+ interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
+ '.js': (m: Module, filename: string) => any;
+ '.json': (m: Module, filename: string) => any;
+ '.node': (m: Module, filename: string) => any;
+ }
+ interface Module {
+ /**
+ * `true` if the module is running during the Node.js preload
+ */
+ isPreloading: boolean;
+ exports: any;
+ require: Require;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
+ parent: Module | null | undefined;
+ children: Module[];
+ /**
+ * @since v11.14.0
+ *
+ * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
+ */
+ path: string;
+ paths: string[];
+ }
+
+ interface Dict<T> {
+ [key: string]: T | undefined;
+ }
+
+ interface ReadOnlyDict<T> {
+ readonly [key: string]: T | undefined;
+ }
+}
diff --git a/node_modules/@types/node/ts4.8/globals.global.d.ts b/node_modules/@types/node/ts4.8/globals.global.d.ts
new file mode 100755
index 0000000..ef1198c
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/globals.global.d.ts
@@ -0,0 +1 @@
+declare var global: typeof globalThis;
diff --git a/node_modules/@types/node/ts4.8/http.d.ts b/node_modules/@types/node/ts4.8/http.d.ts
new file mode 100755
index 0000000..24bc5e7
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/http.d.ts
@@ -0,0 +1,1553 @@
+/**
+ * To use the HTTP server and client one must `require('http')`.
+ *
+ * The HTTP interfaces in Node.js are designed to support many features
+ * of the protocol which have been traditionally difficult to use.
+ * In particular, large, possibly chunk-encoded, messages. The interface is
+ * careful to never buffer entire requests or responses, so the
+ * user is able to stream data.
+ *
+ * HTTP message headers are represented by an object like this:
+ *
+ * ```js
+ * { 'content-length': '123',
+ * 'content-type': 'text/plain',
+ * 'connection': 'keep-alive',
+ * 'host': 'example.com',
+ * 'accept': '*' }
+ * ```
+ *
+ * Keys are lowercased. Values are not modified.
+ *
+ * In order to support the full spectrum of possible HTTP applications, the Node.js
+ * HTTP API is very low-level. It deals with stream handling and message
+ * parsing only. It parses a message into headers and body but it does not
+ * parse the actual headers or the body.
+ *
+ * See `message.headers` for details on how duplicate headers are handled.
+ *
+ * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For
+ * example, the previous message header object might have a `rawHeaders`list like the following:
+ *
+ * ```js
+ * [ 'ConTent-Length', '123456',
+ * 'content-LENGTH', '123',
+ * 'content-type', 'text/plain',
+ * 'CONNECTION', 'keep-alive',
+ * 'Host', 'example.com',
+ * 'accepT', '*' ]
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http.js)
+ */
+declare module 'http' {
+ import * as stream from 'node:stream';
+ import { URL } from 'node:url';
+ import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
+ // incoming headers will never contain number
+ interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
+ accept?: string | undefined;
+ 'accept-language'?: string | undefined;
+ 'accept-patch'?: string | undefined;
+ 'accept-ranges'?: string | undefined;
+ 'access-control-allow-credentials'?: string | undefined;
+ 'access-control-allow-headers'?: string | undefined;
+ 'access-control-allow-methods'?: string | undefined;
+ 'access-control-allow-origin'?: string | undefined;
+ 'access-control-expose-headers'?: string | undefined;
+ 'access-control-max-age'?: string | undefined;
+ 'access-control-request-headers'?: string | undefined;
+ 'access-control-request-method'?: string | undefined;
+ age?: string | undefined;
+ allow?: string | undefined;
+ 'alt-svc'?: string | undefined;
+ authorization?: string | undefined;
+ 'cache-control'?: string | undefined;
+ connection?: string | undefined;
+ 'content-disposition'?: string | undefined;
+ 'content-encoding'?: string | undefined;
+ 'content-language'?: string | undefined;
+ 'content-length'?: string | undefined;
+ 'content-location'?: string | undefined;
+ 'content-range'?: string | undefined;
+ 'content-type'?: string | undefined;
+ cookie?: string | undefined;
+ date?: string | undefined;
+ etag?: string | undefined;
+ expect?: string | undefined;
+ expires?: string | undefined;
+ forwarded?: string | undefined;
+ from?: string | undefined;
+ host?: string | undefined;
+ 'if-match'?: string | undefined;
+ 'if-modified-since'?: string | undefined;
+ 'if-none-match'?: string | undefined;
+ 'if-unmodified-since'?: string | undefined;
+ 'last-modified'?: string | undefined;
+ location?: string | undefined;
+ origin?: string | undefined;
+ pragma?: string | undefined;
+ 'proxy-authenticate'?: string | undefined;
+ 'proxy-authorization'?: string | undefined;
+ 'public-key-pins'?: string | undefined;
+ range?: string | undefined;
+ referer?: string | undefined;
+ 'retry-after'?: string | undefined;
+ 'sec-websocket-accept'?: string | undefined;
+ 'sec-websocket-extensions'?: string | undefined;
+ 'sec-websocket-key'?: string | undefined;
+ 'sec-websocket-protocol'?: string | undefined;
+ 'sec-websocket-version'?: string | undefined;
+ 'set-cookie'?: string[] | undefined;
+ 'strict-transport-security'?: string | undefined;
+ tk?: string | undefined;
+ trailer?: string | undefined;
+ 'transfer-encoding'?: string | undefined;
+ upgrade?: string | undefined;
+ 'user-agent'?: string | undefined;
+ vary?: string | undefined;
+ via?: string | undefined;
+ warning?: string | undefined;
+ 'www-authenticate'?: string | undefined;
+ }
+ // outgoing headers allows numbers (as they are converted internally to strings)
+ type OutgoingHttpHeader = number | string | string[];
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
+ interface ClientRequestArgs {
+ signal?: AbortSignal | undefined;
+ protocol?: string | null | undefined;
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ family?: number | undefined;
+ port?: number | string | null | undefined;
+ defaultPort?: number | string | undefined;
+ localAddress?: string | undefined;
+ socketPath?: string | undefined;
+ /**
+ * @default 8192
+ */
+ maxHeaderSize?: number | undefined;
+ method?: string | undefined;
+ path?: string | null | undefined;
+ headers?: OutgoingHttpHeaders | undefined;
+ auth?: string | null | undefined;
+ agent?: Agent | boolean | undefined;
+ _defaultAgent?: Agent | undefined;
+ timeout?: number | undefined;
+ setHost?: boolean | undefined;
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
+ createConnection?:
+ | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
+ | undefined;
+ lookup?: LookupFunction | undefined;
+ }
+ interface ServerOptions<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > {
+ IncomingMessage?: Request | undefined;
+ ServerResponse?: Response | undefined;
+ /**
+ * Optionally overrides the value of
+ * `--max-http-header-size` for requests received by this server, i.e.
+ * the maximum length of request headers in bytes.
+ * @default 8192
+ */
+ maxHeaderSize?: number | undefined;
+ /**
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
+ * Using the insecure parser should be avoided.
+ * See --insecure-http-parser for more information.
+ * @default false
+ */
+ insecureHTTPParser?: boolean | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default false
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ }
+ type RequestListener<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > = (req: InstanceType<Request>, res: InstanceType<Response> & { req: InstanceType<Request> }) => void;
+ /**
+ * @since v0.1.17
+ */
+ class Server<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ > extends NetServer {
+ constructor(requestListener?: RequestListener<Request, Response>);
+ constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
+ /**
+ * Sets the timeout value for sockets, and emits a `'timeout'` event on
+ * the Server object, passing the socket as an argument, if a timeout
+ * occurs.
+ *
+ * If there is a `'timeout'` event listener on the Server object, then it
+ * will be called with the timed-out socket as an argument.
+ *
+ * By default, the Server does not timeout sockets. However, if a callback
+ * is assigned to the Server's `'timeout'` event, timeouts must be handled
+ * explicitly.
+ * @since v0.9.12
+ * @param [msecs=0 (no timeout)]
+ */
+ setTimeout(msecs?: number, callback?: () => void): this;
+ setTimeout(callback: () => void): this;
+ /**
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+ * @since v0.7.0
+ */
+ maxHeadersCount: number | null;
+ /**
+ * The maximum number of requests socket can handle
+ * before closing keep alive connection.
+ *
+ * A value of `0` will disable the limit.
+ *
+ * When the limit is reached it will set the `Connection` header value to `close`,
+ * but will not actually close the connection, subsequent requests sent
+ * after the limit is reached will get `503 Service Unavailable` as a response.
+ * @since v16.10.0
+ */
+ maxRequestsPerSocket: number | null;
+ /**
+ * The number of milliseconds of inactivity before a socket is presumed
+ * to have timed out.
+ *
+ * A value of `0` will disable the timeout behavior on incoming connections.
+ *
+ * The socket timeout logic is set up on connection, so changing this
+ * value only affects new connections to the server, not any existing connections.
+ * @since v0.9.12
+ */
+ timeout: number;
+ /**
+ * Limit the amount of time the parser will wait to receive the complete HTTP
+ * headers.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v11.3.0, v10.14.0
+ */
+ headersTimeout: number;
+ /**
+ * The number of milliseconds of inactivity a server needs to wait for additional
+ * incoming data, after it has finished writing the last response, before a socket
+ * will be destroyed. If the server receives new data before the keep-alive
+ * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`.
+ *
+ * A value of `0` will disable the keep-alive timeout behavior on incoming
+ * connections.
+ * A value of `0` makes the http server behave similarly to Node.js versions prior
+ * to 8.0.0, which did not have a keep-alive timeout.
+ *
+ * The socket timeout logic is set up on connection, so changing this value only
+ * affects new connections to the server, not any existing connections.
+ * @since v8.0.0
+ */
+ keepAliveTimeout: number;
+ /**
+ * Sets the timeout value in milliseconds for receiving the entire request from
+ * the client.
+ *
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
+ * @since v14.11.0
+ */
+ requestTimeout: number;
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ addListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ addListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ addListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ on(event: 'request', listener: RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ once(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ once(event: 'request', listener: RequestListener<Request, Response>): this;
+ once(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
+ prependOnceListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
+ prependOnceListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
+ ): this;
+ }
+ /**
+ * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract of outgoing message from
+ * the perspective of the participants of HTTP transaction.
+ * @since v0.1.17
+ */
+ class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
+ readonly req: Request;
+ chunkedEncoding: boolean;
+ shouldKeepAlive: boolean;
+ useChunkedEncodingByDefault: boolean;
+ sendDate: boolean;
+ /**
+ * @deprecated Use `writableEnded` instead.
+ */
+ finished: boolean;
+ /**
+ * Read-only. `true` if the headers were sent, otherwise `false`.
+ * @since v0.9.3
+ */
+ readonly headersSent: boolean;
+ /**
+ * Aliases of `outgoingMessage.socket`
+ * @since v0.3.0
+ * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
+ */
+ readonly connection: Socket | null;
+ /**
+ * Reference to the underlying socket. Usually, users will not want to access
+ * this property.
+ *
+ * After calling `outgoingMessage.end()`, this property will be nulled.
+ * @since v0.3.0
+ */
+ readonly socket: Socket | null;
+ constructor();
+ /**
+ * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter.
+ * @since v0.9.12
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * Sets a single header value for the header object.
+ * @since v0.4.0
+ * @param name Header name
+ * @param value Header value
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): this;
+ /**
+ * Gets the value of HTTP header with the given name. If such a name doesn't
+ * exist in message, it will be `undefined`.
+ * @since v0.4.0
+ * @param name Name of header
+ */
+ getHeader(name: string): number | string | string[] | undefined;
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow
+ * copy is used, array values may be mutated without additional calls to
+ * various header-related HTTP module methods. The keys of the returned
+ * object are the header names and the values are the respective header
+ * values. All header names are lowercase.
+ *
+ * The object returned by the `outgoingMessage.getHeaders()` method does
+ * not prototypically inherit from the JavaScript Object. This means that
+ * typical Object methods such as `obj.toString()`, `obj.hasOwnProperty()`,
+ * and others are not defined and will not work.
+ *
+ * ```js
+ * outgoingMessage.setHeader('Foo', 'bar');
+ * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = outgoingMessage.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v7.7.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns an array of names of headers of the outgoing outgoingMessage. All
+ * names are lowercase.
+ * @since v7.7.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = outgoingMessage.hasHeader('content-type');
+ * ```
+ * @since v7.7.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that is queued for implicit sending.
+ *
+ * ```js
+ * outgoingMessage.removeHeader('Content-Encoding');
+ * ```
+ * @since v0.4.0
+ * @param name Header name
+ */
+ removeHeader(name: string): void;
+ /**
+ * Adds HTTP trailers (headers but at the end of the message) to the message.
+ *
+ * Trailers are **only** be emitted if the message is chunked encoded. If not,
+ * the trailer will be silently discarded.
+ *
+ * HTTP requires the `Trailer` header to be sent to emit trailers,
+ * with a list of header fields in its value, e.g.
+ *
+ * ```js
+ * message.writeHead(200, { 'Content-Type': 'text/plain',
+ * 'Trailer': 'Content-MD5' });
+ * message.write(fileData);
+ * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' });
+ * message.end();
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v0.3.0
+ */
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
+ /**
+ * Compulsorily flushes the message headers
+ *
+ * For efficiency reason, Node.js normally buffers the message headers
+ * until `outgoingMessage.end()` is called or the first chunk of message data
+ * is written. It then tries to pack the headers and data into a single TCP
+ * packet.
+ *
+ * It is usually desired (it saves a TCP round-trip), but not when the first
+ * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the request.
+ * @since v1.6.0
+ */
+ flushHeaders(): void;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v0.1.17
+ */
+ class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v0.4.0
+ */
+ statusCode: number;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status message that will be sent to the client when
+ * the headers get flushed. If this is left as `undefined` then the standard
+ * message for the status code will be used.
+ *
+ * ```js
+ * response.statusMessage = 'Not found';
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status message which was sent out.
+ * @since v0.11.8
+ */
+ statusMessage: string;
+ constructor(req: Request);
+ assignSocket(socket: Socket): void;
+ detachSocket(socket: Socket): void;
+ /**
+ * Sends a HTTP/1.1 100 Continue message to the client, indicating that
+ * the request body should be sent. See the `'checkContinue'` event on`Server`.
+ * @since v0.3.0
+ */
+ writeContinue(callback?: () => void): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ * Optionally one can give a human-readable `statusMessage` as the second
+ * argument.
+ *
+ * `headers` may be an `Array` where the keys and values are in the same list.
+ * It is _not_ a list of tuples. So, the even-numbered offsets are key values,
+ * and the odd-numbered offsets are the associated values. The array is in the same
+ * format as `request.rawHeaders`.
+ *
+ * Returns a reference to the `ServerResponse`, so that calls can be chained.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response
+ * .writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain'
+ * })
+ * .end(body);
+ * ```
+ *
+ * This method must only be called once on a message and it must
+ * be called before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * If this method is called and `response.setHeader()` has not been called,
+ * it will directly write the supplied header values onto the network channel
+ * without caching internally, and the `response.getHeader()` on the header
+ * will not yield the expected result. If progressive population of headers is
+ * desired with potential future retrieval and modification, use `response.setHeader()` instead.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * `Content-Length` is given in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js
+ * does not check whether `Content-Length` and the length of the body which has
+ * been transmitted are equal or not.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v0.1.30
+ */
+ writeHead(
+ statusCode: number,
+ statusMessage?: string,
+ headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
+ ): this;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
+ /**
+ * Sends a HTTP/1.1 102 Processing message to the client, indicating that
+ * the request body should be sent.
+ * @since v10.0.0
+ */
+ writeProcessing(): void;
+ }
+ interface InformationEvent {
+ statusCode: number;
+ statusMessage: string;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ headers: IncomingHttpHeaders;
+ rawHeaders: string[];
+ }
+ /**
+ * This object is created internally and returned from {@link request}. It
+ * represents an _in-progress_ request whose header has already been queued. The
+ * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will
+ * be sent along with the first data chunk or when calling `request.end()`.
+ *
+ * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response
+ * headers have been received. The `'response'` event is executed with one
+ * argument which is an instance of {@link IncomingMessage}.
+ *
+ * During the `'response'` event, one can add listeners to the
+ * response object; particularly to listen for the `'data'` event.
+ *
+ * If no `'response'` handler is added, then the response will be
+ * entirely discarded. However, if a `'response'` event handler is added,
+ * then the data from the response object **must** be consumed, either by
+ * calling `response.read()` whenever there is a `'readable'` event, or
+ * by adding a `'data'` handler, or by calling the `.resume()` method.
+ * Until the data is consumed, the `'end'` event will not fire. Also, until
+ * the data is read it will consume memory that can eventually lead to a
+ * 'process out of memory' error.
+ *
+ * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered.
+ *
+ * Node.js does not check whether Content-Length and the length of the
+ * body which has been transmitted are equal or not.
+ * @since v0.1.17
+ */
+ class ClientRequest extends OutgoingMessage {
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v0.11.14
+ * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead.
+ */
+ aborted: boolean;
+ /**
+ * The request host.
+ * @since v14.5.0, v12.19.0
+ */
+ host: string;
+ /**
+ * The request protocol.
+ * @since v14.5.0, v12.19.0
+ */
+ protocol: string;
+ /**
+ * When sending request through a keep-alive enabled agent, the underlying socket
+ * might be reused. But if server closes connection at unfortunate time, client
+ * may run into a 'ECONNRESET' error.
+ *
+ * ```js
+ * const http = require('http');
+ *
+ * // Server has a 5 seconds keep-alive timeout by default
+ * http
+ * .createServer((req, res) => {
+ * res.write('hello\n');
+ * res.end();
+ * })
+ * .listen(3000);
+ *
+ * setInterval(() => {
+ * // Adapting a keep-alive agent
+ * http.get('http://localhost:3000', { agent }, (res) => {
+ * res.on('data', (data) => {
+ * // Do nothing
+ * });
+ * });
+ * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
+ * ```
+ *
+ * By marking a request whether it reused socket or not, we can do
+ * automatic error retry base on it.
+ *
+ * ```js
+ * const http = require('http');
+ * const agent = new http.Agent({ keepAlive: true });
+ *
+ * function retriableRequest() {
+ * const req = http
+ * .get('http://localhost:3000', { agent }, (res) => {
+ * // ...
+ * })
+ * .on('error', (err) => {
+ * // Check if retry is needed
+ * if (req.reusedSocket &#x26;&#x26; err.code === 'ECONNRESET') {
+ * retriableRequest();
+ * }
+ * });
+ * }
+ *
+ * retriableRequest();
+ * ```
+ * @since v13.0.0, v12.16.0
+ */
+ reusedSocket: boolean;
+ /**
+ * Limits maximum response headers count. If set to 0, no limit will be applied.
+ */
+ maxHeadersCount: number;
+ constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
+ /**
+ * The request method.
+ * @since v0.1.97
+ */
+ method: string;
+ /**
+ * The request path.
+ * @since v0.4.0
+ */
+ path: string;
+ /**
+ * Marks the request as aborting. Calling this will cause remaining data
+ * in the response to be dropped and the socket to be destroyed.
+ * @since v0.3.8
+ * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
+ */
+ abort(): void;
+ onSocket(socket: Socket): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
+ * @since v0.5.9
+ * @param timeout Milliseconds before a request times out.
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called.
+ * @since v0.5.9
+ */
+ setNoDelay(noDelay?: boolean): void;
+ /**
+ * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called.
+ * @since v0.5.9
+ */
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ /**
+ * Returns an array containing the unique names of the current outgoing raw
+ * headers. Header names are returned with their exact casing being set.
+ *
+ * ```js
+ * request.setHeader('Foo', 'bar');
+ * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = request.getRawHeaderNames();
+ * // headerNames === ['Foo', 'Set-Cookie']
+ * ```
+ * @since v15.13.0, v14.17.0
+ */
+ getRawHeaderNames(): string[];
+ /**
+ * @deprecated
+ */
+ addListener(event: 'abort', listener: () => void): this;
+ addListener(
+ event: 'connect',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ addListener(event: 'continue', listener: () => void): this;
+ addListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ addListener(event: 'socket', listener: (socket: Socket) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(
+ event: 'upgrade',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ on(event: 'abort', listener: () => void): this;
+ on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'continue', listener: () => void): this;
+ on(event: 'information', listener: (info: InformationEvent) => void): this;
+ on(event: 'response', listener: (response: IncomingMessage) => void): this;
+ on(event: 'socket', listener: (socket: Socket) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ once(event: 'abort', listener: () => void): this;
+ once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'continue', listener: () => void): this;
+ once(event: 'information', listener: (info: InformationEvent) => void): this;
+ once(event: 'response', listener: (response: IncomingMessage) => void): this;
+ once(event: 'socket', listener: (socket: Socket) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependListener(event: 'abort', listener: () => void): this;
+ prependListener(
+ event: 'connect',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'continue', listener: () => void): this;
+ prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(
+ event: 'upgrade',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
+ prependOnceListener(event: 'abort', listener: () => void): this;
+ prependOnceListener(
+ event: 'connect',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'continue', listener: () => void): this;
+ prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(
+ event: 'upgrade',
+ listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
+ * access response
+ * status, headers and data.
+ *
+ * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to
+ * parse and emit the incoming HTTP headers and payload, as the underlying socket
+ * may be reused multiple times in case of keep-alive.
+ * @since v0.1.17
+ */
+ class IncomingMessage extends stream.Readable {
+ constructor(socket: Socket);
+ /**
+ * The `message.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
+ */
+ aborted: boolean;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server.
+ * Probably either `'1.1'` or `'1.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v0.1.1
+ */
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ /**
+ * The `message.complete` property will be `true` if a complete HTTP message has
+ * been received and successfully parsed.
+ *
+ * This property is particularly useful as a means of determining if a client or
+ * server fully transmitted a message before a connection was terminated:
+ *
+ * ```js
+ * const req = http.request({
+ * host: '127.0.0.1',
+ * port: 8080,
+ * method: 'POST'
+ * }, (res) => {
+ * res.resume();
+ * res.on('end', () => {
+ * if (!res.complete)
+ * console.error(
+ * 'The connection was terminated while the message was still being sent');
+ * });
+ * });
+ * ```
+ * @since v0.3.0
+ */
+ complete: boolean;
+ /**
+ * Alias for `message.socket`.
+ * @since v0.1.90
+ * @deprecated Since v16.0.0 - Use `socket`.
+ */
+ connection: Socket;
+ /**
+ * The `net.Socket` object associated with the connection.
+ *
+ * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
+ * client's authentication details.
+ *
+ * This property is guaranteed to be an instance of the `net.Socket` class,
+ * a subclass of `stream.Duplex`, unless the user specified a socket
+ * type other than `net.Socket` or internally nulled.
+ * @since v0.3.0
+ */
+ socket: Socket;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.getHeaders());
+ * ```
+ *
+ * Duplicates in raw headers are handled in the following ways, depending on the
+ * header name:
+ *
+ * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`,
+ * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded.
+ * * `set-cookie` is always an array. Duplicates are added to the array.
+ * * For duplicate `cookie` headers, the values are joined together with '; '.
+ * * For all other headers, the values are joined together with ', '.
+ * @since v0.1.5
+ */
+ headers: IncomingHttpHeaders;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v0.11.6
+ */
+ rawHeaders: string[];
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v0.3.0
+ */
+ trailers: NodeJS.Dict<string>;
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v0.11.6
+ */
+ rawTrailers: string[];
+ /**
+ * Calls `message.socket.setTimeout(msecs, callback)`.
+ * @since v0.5.9
+ */
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`.
+ * @since v0.1.1
+ */
+ method?: string | undefined;
+ /**
+ * **Only valid for request obtained from {@link Server}.**
+ *
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. Take the following request:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * To parse the URL into its parts:
+ *
+ * ```js
+ * new URL(request.url, `http://${request.getHeaders().host}`);
+ * ```
+ *
+ * When `request.url` is `'/status?name=ryan'` and`request.getHeaders().host` is `'localhost:3000'`:
+ *
+ * ```console
+ * $ node
+ * > new URL(request.url, `http://${request.getHeaders().host}`)
+ * URL {
+ * href: 'http://localhost:3000/status?name=ryan',
+ * origin: 'http://localhost:3000',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'localhost:3000',
+ * hostname: 'localhost',
+ * port: '3000',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v0.1.90
+ */
+ url?: string | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The 3-digit HTTP response status code. E.G. `404`.
+ * @since v0.1.1
+ */
+ statusCode?: number | undefined;
+ /**
+ * **Only valid for response obtained from {@link ClientRequest}.**
+ *
+ * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`.
+ * @since v0.11.10
+ */
+ statusMessage?: string | undefined;
+ /**
+ * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed
+ * as an argument to any listeners on the event.
+ * @since v0.3.0
+ */
+ destroy(error?: Error): this;
+ }
+ interface AgentOptions extends Partial<TcpSocketConnectOpts> {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number | undefined;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number | undefined;
+ /**
+ * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
+ */
+ maxTotalSockets?: number | undefined;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number | undefined;
+ /**
+ * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
+ */
+ timeout?: number | undefined;
+ /**
+ * Scheduling strategy to apply when picking the next free socket to use.
+ * @default `lifo`
+ */
+ scheduling?: 'fifo' | 'lifo' | undefined;
+ }
+ /**
+ * An `Agent` is responsible for managing connection persistence
+ * and reuse for HTTP clients. It maintains a queue of pending requests
+ * for a given host and port, reusing a single socket connection for each
+ * until the queue is empty, at which time the socket is either destroyed
+ * or put into a pool where it is kept to be used again for requests to the
+ * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`.
+ *
+ * Pooled connections have TCP Keep-Alive enabled for them, but servers may
+ * still close idle connections, in which case they will be removed from the
+ * pool and a new connection will be made when a new HTTP request is made for
+ * that host and port. Servers may also refuse to allow multiple requests
+ * over the same connection, in which case the connection will have to be
+ * remade for every request and cannot be pooled. The `Agent` will still make
+ * the requests to that server, but each one will occur over a new connection.
+ *
+ * When a connection is closed by the client or the server, it is removed
+ * from the pool. Any unused sockets in the pool will be unrefed so as not
+ * to keep the Node.js process running when there are no outstanding requests.
+ * (see `socket.unref()`).
+ *
+ * It is good practice, to `destroy()` an `Agent` instance when it is no
+ * longer in use, because unused sockets consume OS resources.
+ *
+ * Sockets are removed from an agent when the socket emits either
+ * a `'close'` event or an `'agentRemove'` event. When intending to keep one
+ * HTTP request open for a long time without keeping it in the agent, something
+ * like the following may be done:
+ *
+ * ```js
+ * http.get(options, (res) => {
+ * // Do stuff
+ * }).on('socket', (socket) => {
+ * socket.emit('agentRemove');
+ * });
+ * ```
+ *
+ * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options
+ * will be used
+ * for the client connection.
+ *
+ * `agent:false`:
+ *
+ * ```js
+ * http.get({
+ * hostname: 'localhost',
+ * port: 80,
+ * path: '/',
+ * agent: false // Create a new agent just for this one request
+ * }, (res) => {
+ * // Do stuff with response
+ * });
+ * ```
+ * @since v0.3.4
+ */
+ class Agent {
+ /**
+ * By default set to 256\. For agents with `keepAlive` enabled, this
+ * sets the maximum number of sockets that will be left open in the free
+ * state.
+ * @since v0.11.7
+ */
+ maxFreeSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open per origin. Origin is the returned value of `agent.getName()`.
+ * @since v0.3.6
+ */
+ maxSockets: number;
+ /**
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
+ * can have open. Unlike `maxSockets`, this parameter applies across all origins.
+ * @since v14.5.0, v12.19.0
+ */
+ maxTotalSockets: number;
+ /**
+ * An object which contains arrays of sockets currently awaiting use by
+ * the agent when `keepAlive` is enabled. Do not modify.
+ *
+ * Sockets in the `freeSockets` list will be automatically destroyed and
+ * removed from the array on `'timeout'`.
+ * @since v0.11.4
+ */
+ readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains arrays of sockets currently in use by the
+ * agent. Do not modify.
+ * @since v0.3.6
+ */
+ readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
+ /**
+ * An object which contains queues of requests that have not yet been assigned to
+ * sockets. Do not modify.
+ * @since v0.5.9
+ */
+ readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
+ constructor(opts?: AgentOptions);
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ *
+ * It is usually not necessary to do this. However, if using an
+ * agent with `keepAlive` enabled, then it is best to explicitly shut down
+ * the agent when it is no longer needed. Otherwise,
+ * sockets might stay open for quite a long time before the server
+ * terminates them.
+ * @since v0.11.4
+ */
+ destroy(): void;
+ }
+ const METHODS: string[];
+ const STATUS_CODES: {
+ [errorCode: number]: string | undefined;
+ [errorCode: string]: string | undefined;
+ };
+ /**
+ * Returns a new instance of {@link Server}.
+ *
+ * The `requestListener` is a function which is automatically
+ * added to the `'request'` event.
+ * @since v0.1.13
+ */
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
+ Response extends typeof ServerResponse = typeof ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
+ // create interface RequestOptions would make the naming more clear to developers
+ interface RequestOptions extends ClientRequestArgs {}
+ /**
+ * `options` in `socket.connect()` are also supported.
+ *
+ * Node.js maintains several connections per server to make HTTP requests.
+ * This function allows one to transparently issue requests.
+ *
+ * `url` can be a string or a `URL` object. If `url` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for
+ * the `'response'` event.
+ *
+ * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const http = require('http');
+ *
+ * const postData = JSON.stringify({
+ * 'msg': 'Hello World!'
+ * });
+ *
+ * const options = {
+ * hostname: 'www.google.com',
+ * port: 80,
+ * path: '/upload',
+ * method: 'POST',
+ * headers: {
+ * 'Content-Type': 'application/json',
+ * 'Content-Length': Buffer.byteLength(postData)
+ * }
+ * };
+ *
+ * const req = http.request(options, (res) => {
+ * console.log(`STATUS: ${res.statusCode}`);
+ * console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
+ * res.setEncoding('utf8');
+ * res.on('data', (chunk) => {
+ * console.log(`BODY: ${chunk}`);
+ * });
+ * res.on('end', () => {
+ * console.log('No more data in response.');
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(`problem with request: ${e.message}`);
+ * });
+ *
+ * // Write data to request body
+ * req.write(postData);
+ * req.end();
+ * ```
+ *
+ * In the example `req.end()` was called. With `http.request()` one
+ * must always call `req.end()` to signify the end of the request -
+ * even if there is no data being written to the request body.
+ *
+ * If any error is encountered during the request (be that with DNS resolution,
+ * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
+ * on the returned request object. As with all `'error'` events, if no listeners
+ * are registered the error will be thrown.
+ *
+ * There are a few special headers that should be noted.
+ *
+ * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to
+ * the server should be persisted until the next request.
+ * * Sending a 'Content-Length' header will disable the default chunked encoding.
+ * * Sending an 'Expect' header will immediately send the request headers.
+ * Usually, when sending 'Expect: 100-continue', both a timeout and a listener
+ * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more
+ * information.
+ * * Sending an Authorization header will override using the `auth` option
+ * to compute basic authentication.
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('http://abc:xyz@example.com');
+ *
+ * const req = http.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * In a successful request, the following events will be emitted in the following
+ * order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * (`'data'` will not be emitted at all if the response body is empty, for
+ * instance, in most redirects)
+ * * `'end'` on the `res` object
+ * * `'close'`
+ *
+ * In the case of a connection error, the following events will be emitted:
+ *
+ * * `'socket'`
+ * * `'error'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close before the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * In the case of a premature connection close after the response is received,
+ * the following events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (connection closed here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.destroy()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.destroy()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.destroy()` called here)
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.destroy()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.destroy()` called here)
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * If `req.abort()` is called before a socket is assigned, the following
+ * events will be emitted in the following order:
+ *
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called before the connection succeeds, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`
+ * * `'close'`
+ *
+ * If `req.abort()` is called after the response is received, the following
+ * events will be emitted in the following order:
+ *
+ * * `'socket'`
+ * * `'response'`
+ * * `'data'` any number of times, on the `res` object
+ * * (`req.abort()` called here)
+ * * `'abort'`
+ * * `'aborted'` on the `res` object
+ * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`.
+ * * `'close'`
+ * * `'close'` on the `res` object
+ *
+ * Setting the `timeout` option or using the `setTimeout()` function will
+ * not abort the request or do anything besides add a `'timeout'` event.
+ *
+ * Passing an `AbortSignal` and then calling `abort` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the
+ * request itself.
+ * @since v0.3.6
+ */
+ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function request(
+ url: string | URL,
+ options: RequestOptions,
+ callback?: (res: IncomingMessage) => void,
+ ): ClientRequest;
+ /**
+ * Since most requests are GET requests without bodies, Node.js provides this
+ * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the
+ * response
+ * data for reasons stated in {@link ClientRequest} section.
+ *
+ * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}.
+ *
+ * JSON fetching example:
+ *
+ * ```js
+ * http.get('http://localhost:8000/', (res) => {
+ * const { statusCode } = res;
+ * const contentType = res.headers['content-type'];
+ *
+ * let error;
+ * // Any 2xx status code signals a successful response but
+ * // here we're only checking for 200.
+ * if (statusCode !== 200) {
+ * error = new Error('Request Failed.\n' +
+ * `Status Code: ${statusCode}`);
+ * } else if (!/^application\/json/.test(contentType)) {
+ * error = new Error('Invalid content-type.\n' +
+ * `Expected application/json but received ${contentType}`);
+ * }
+ * if (error) {
+ * console.error(error.message);
+ * // Consume response data to free up memory
+ * res.resume();
+ * return;
+ * }
+ *
+ * res.setEncoding('utf8');
+ * let rawData = '';
+ * res.on('data', (chunk) => { rawData += chunk; });
+ * res.on('end', () => {
+ * try {
+ * const parsedData = JSON.parse(rawData);
+ * console.log(parsedData);
+ * } catch (e) {
+ * console.error(e.message);
+ * }
+ * });
+ * }).on('error', (e) => {
+ * console.error(`Got error: ${e.message}`);
+ * });
+ *
+ * // Create a local server to receive data from
+ * const server = http.createServer((req, res) => {
+ * res.writeHead(200, { 'Content-Type': 'application/json' });
+ * res.end(JSON.stringify({
+ * data: 'Hello World!'
+ * }));
+ * });
+ *
+ * server.listen(8000);
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored.
+ */
+ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ let globalAgent: Agent;
+ /**
+ * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
+ * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option.
+ */
+ const maxHeaderSize: number;
+}
+declare module 'node:http' {
+ export * from 'http';
+}
diff --git a/node_modules/@types/node/ts4.8/http2.d.ts b/node_modules/@types/node/ts4.8/http2.d.ts
new file mode 100755
index 0000000..0f628b9
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/http2.d.ts
@@ -0,0 +1,2106 @@
+/**
+ * The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. It
+ * can be accessed using:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * ```
+ * @since v8.4.0
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http2.js)
+ */
+declare module 'http2' {
+ import EventEmitter = require('node:events');
+ import * as fs from 'node:fs';
+ import * as net from 'node:net';
+ import * as stream from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as url from 'node:url';
+ import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
+ export { OutgoingHttpHeaders } from 'node:http';
+ export interface IncomingHttpStatusHeader {
+ ':status'?: number | undefined;
+ }
+ export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
+ ':path'?: string | undefined;
+ ':method'?: string | undefined;
+ ':authority'?: string | undefined;
+ ':scheme'?: string | undefined;
+ }
+ // Http2Stream
+ export interface StreamPriorityOptions {
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ silent?: boolean | undefined;
+ }
+ export interface StreamState {
+ localWindowSize?: number | undefined;
+ state?: number | undefined;
+ localClose?: number | undefined;
+ remoteClose?: number | undefined;
+ sumDependencyWeight?: number | undefined;
+ weight?: number | undefined;
+ }
+ export interface ServerStreamResponseOptions {
+ endStream?: boolean | undefined;
+ waitForTrailers?: boolean | undefined;
+ }
+ export interface StatOptions {
+ offset: number;
+ length: number;
+ }
+ export interface ServerStreamFileResponseOptions {
+ statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
+ waitForTrailers?: boolean | undefined;
+ offset?: number | undefined;
+ length?: number | undefined;
+ }
+ export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
+ onError?(err: NodeJS.ErrnoException): void;
+ }
+ export interface Http2Stream extends stream.Duplex {
+ /**
+ * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set,
+ * the `'aborted'` event will have been emitted.
+ * @since v8.4.0
+ */
+ readonly aborted: boolean;
+ /**
+ * This property shows the number of characters currently buffered to be written.
+ * See `net.Socket.bufferSize` for details.
+ * @since v11.2.0, v10.16.0
+ */
+ readonly bufferSize: number;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been closed.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer
+ * usable.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Set to `true` if the `END_STREAM` flag was set in the request or response
+ * HEADERS frame received, indicating that no additional data should be received
+ * and the readable side of the `Http2Stream` will be closed.
+ * @since v10.11.0
+ */
+ readonly endAfterHeaders: boolean;
+ /**
+ * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined`if the stream identifier has not yet been assigned.
+ * @since v8.4.0
+ */
+ readonly id?: number | undefined;
+ /**
+ * Set to `true` if the `Http2Stream` instance has not yet been assigned a
+ * numeric stream identifier.
+ * @since v9.4.0
+ */
+ readonly pending: boolean;
+ /**
+ * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is
+ * destroyed after either receiving an `RST_STREAM` frame from the connected peer,
+ * calling `http2stream.close()`, or `http2stream.destroy()`. Will be`undefined` if the `Http2Stream` has not been closed.
+ * @since v8.4.0
+ */
+ readonly rstCode: number;
+ /**
+ * An object containing the outbound headers sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentHeaders: OutgoingHttpHeaders;
+ /**
+ * An array of objects containing the outbound informational (additional) headers
+ * sent for this `Http2Stream`.
+ * @since v9.5.0
+ */
+ readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined;
+ /**
+ * An object containing the outbound trailers sent for this `HttpStream`.
+ * @since v9.5.0
+ */
+ readonly sentTrailers?: OutgoingHttpHeaders | undefined;
+ /**
+ * A reference to the `Http2Session` instance that owns this `Http2Stream`. The
+ * value will be `undefined` after the `Http2Stream` instance is destroyed.
+ * @since v8.4.0
+ */
+ readonly session: Http2Session;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Stream`.
+ *
+ * A current state of this `Http2Stream`.
+ * @since v8.4.0
+ */
+ readonly state: StreamState;
+ /**
+ * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the
+ * connected HTTP/2 peer.
+ * @since v8.4.0
+ * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code.
+ * @param callback An optional function registered to listen for the `'close'` event.
+ */
+ close(code?: number, callback?: () => void): void;
+ /**
+ * Updates the priority for this `Http2Stream` instance.
+ * @since v8.4.0
+ */
+ priority(options: StreamPriorityOptions): void;
+ /**
+ * ```js
+ * const http2 = require('http2');
+ * const client = http2.connect('http://example.org:8000');
+ * const { NGHTTP2_CANCEL } = http2.constants;
+ * const req = client.request({ ':path': '/' });
+ *
+ * // Cancel the stream if there's no activity after 5 seconds
+ * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL));
+ * ```
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method
+ * will cause the `Http2Stream` to be immediately closed and must only be
+ * called after the `'wantTrailers'` event has been emitted. When sending a
+ * request or sending a response, the `options.waitForTrailers` option must be set
+ * in order to keep the `Http2Stream` open after the final `DATA` frame so that
+ * trailers can be sent.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond(undefined, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ xyz: 'abc' });
+ * });
+ * stream.end('Hello World');
+ * });
+ * ```
+ *
+ * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header
+ * fields (e.g. `':method'`, `':path'`, etc).
+ * @since v10.0.0
+ */
+ sendTrailers(headers: OutgoingHttpHeaders): void;
+ addListener(event: 'aborted', listener: () => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'streamClosed', listener: (code: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'wantTrailers', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted'): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: 'streamClosed', code: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'trailers', trailers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'wantTrailers'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: () => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'streamClosed', listener: (code: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'wantTrailers', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: () => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'streamClosed', listener: (code: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'wantTrailers', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: () => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'wantTrailers', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: () => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'streamClosed', listener: (code: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'wantTrailers', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Stream extends Http2Stream {
+ addListener(event: 'continue', listener: () => {}): this;
+ addListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'continue'): boolean;
+ emit(event: 'headers', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: 'push', headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'response', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'continue', listener: () => {}): this;
+ on(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'continue', listener: () => {}): this;
+ once(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'continue', listener: () => {}): this;
+ prependListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'continue', listener: () => {}): this;
+ prependOnceListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ServerHttp2Stream extends Http2Stream {
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote
+ * client's most recent `SETTINGS` frame. Will be `true` if the remote peer
+ * accepts push streams, `false` otherwise. Settings are the same for every`Http2Stream` in the same `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly pushAllowed: boolean;
+ /**
+ * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.
+ * @since v8.4.0
+ */
+ additionalHeaders(headers: OutgoingHttpHeaders): void;
+ /**
+ * Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => {
+ * if (err) throw err;
+ * pushStream.respond({ ':status': 200 });
+ * pushStream.end('some pushed data');
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass
+ * a `weight` value to `http2stream.priority` with the `silent` option set to`true` to enable server-side bandwidth balancing between concurrent streams.
+ *
+ * Calling `http2stream.pushStream()` from within a pushed stream is not permitted
+ * and will throw an error.
+ * @since v8.4.0
+ * @param callback Callback that is called once the push stream has been initiated.
+ */
+ pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ /**
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 });
+ * stream.end('some data');
+ * });
+ * ```
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respond({ ':status': 200 }, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * stream.end('some data');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
+ /**
+ * Initiates a response whose data is read from the given file descriptor. No
+ * validation is performed on the given file descriptor. If an error occurs while
+ * attempting to read data using the file descriptor, the `Http2Stream` will be
+ * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const fs = require('fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8'
+ * };
+ * stream.respondWithFD(fd, headers);
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given fd. If the `statCheck` function is provided, the`http2stream.respondWithFD()` method will perform an `fs.fstat()` call to
+ * collect details on the provided file descriptor.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The file descriptor or `FileHandle` is not closed when the stream is closed,
+ * so it will need to be closed manually once it is no longer needed.
+ * Using the same file descriptor concurrently for multiple streams
+ * is not supported and may result in data loss. Re-using a file descriptor
+ * after a stream has finished is supported.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const fs = require('fs');
+ *
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * const fd = fs.openSync('/some/file', 'r');
+ *
+ * const stat = fs.fstatSync(fd);
+ * const headers = {
+ * 'content-length': stat.size,
+ * 'last-modified': stat.mtime.toUTCString(),
+ * 'content-type': 'text/plain; charset=utf-8'
+ * };
+ * stream.respondWithFD(fd, headers, { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ *
+ * stream.on('close', () => fs.closeSync(fd));
+ * });
+ * ```
+ * @since v8.4.0
+ * @param fd A readable file descriptor.
+ */
+ respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
+ /**
+ * Sends a regular file as the response. The `path` must specify a regular file
+ * or an `'error'` event will be emitted on the `Http2Stream` object.
+ *
+ * When used, the `Http2Stream` object's `Duplex` interface will be closed
+ * automatically.
+ *
+ * The optional `options.statCheck` function may be specified to give user code
+ * an opportunity to set additional content headers based on the `fs.Stat` details
+ * of the given file:
+ *
+ * If an error occurs while attempting to read the file data, the `Http2Stream`will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`code. If the `onError` callback is
+ * defined, then it will be called. Otherwise
+ * the stream will be destroyed.
+ *
+ * Example using a file path:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * headers['last-modified'] = stat.mtime.toUTCString();
+ * }
+ *
+ * function onError(err) {
+ * // stream.respond() can throw if the stream has been destroyed by
+ * // the other side.
+ * try {
+ * if (err.code === 'ENOENT') {
+ * stream.respond({ ':status': 404 });
+ * } else {
+ * stream.respond({ ':status': 500 });
+ * }
+ * } catch (err) {
+ * // Perform actual error handling.
+ * console.log(err);
+ * }
+ * stream.end();
+ * }
+ *
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck, onError });
+ * });
+ * ```
+ *
+ * The `options.statCheck` function may also be used to cancel the send operation
+ * by returning `false`. For instance, a conditional request may check the stat
+ * results to determine if the file has been modified to return an appropriate`304` response:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * function statCheck(stat, headers) {
+ * // Check the stat here...
+ * stream.respond({ ':status': 304 });
+ * return false; // Cancel the send operation
+ * }
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { statCheck });
+ * });
+ * ```
+ *
+ * The `content-length` header field will be automatically set.
+ *
+ * The `offset` and `length` options may be used to limit the response to a
+ * specific range subset. This can be used, for instance, to support HTTP Range
+ * requests.
+ *
+ * The `options.onError` function may also be used to handle all the errors
+ * that could happen before the delivery of the file is initiated. The
+ * default behavior is to destroy the stream.
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * will be emitted immediately after queuing the last chunk of payload data to be
+ * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+ * header fields to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer();
+ * server.on('stream', (stream) => {
+ * stream.respondWithFile('/some/file',
+ * { 'content-type': 'text/plain; charset=utf-8' },
+ * { waitForTrailers: true });
+ * stream.on('wantTrailers', () => {
+ * stream.sendTrailers({ ABC: 'some value to send' });
+ * });
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
+ }
+ // Http2Session
+ export interface Settings {
+ headerTableSize?: number | undefined;
+ enablePush?: boolean | undefined;
+ initialWindowSize?: number | undefined;
+ maxFrameSize?: number | undefined;
+ maxConcurrentStreams?: number | undefined;
+ maxHeaderListSize?: number | undefined;
+ enableConnectProtocol?: boolean | undefined;
+ }
+ export interface ClientSessionRequestOptions {
+ endStream?: boolean | undefined;
+ exclusive?: boolean | undefined;
+ parent?: number | undefined;
+ weight?: number | undefined;
+ waitForTrailers?: boolean | undefined;
+ signal?: AbortSignal | undefined;
+ }
+ export interface SessionState {
+ effectiveLocalWindowSize?: number | undefined;
+ effectiveRecvDataLength?: number | undefined;
+ nextStreamID?: number | undefined;
+ localWindowSize?: number | undefined;
+ lastProcStreamID?: number | undefined;
+ remoteWindowSize?: number | undefined;
+ outboundQueueSize?: number | undefined;
+ deflateDynamicTableSize?: number | undefined;
+ inflateDynamicTableSize?: number | undefined;
+ }
+ export interface Http2Session extends EventEmitter {
+ /**
+ * Value will be `undefined` if the `Http2Session` is not yet connected to a
+ * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or
+ * will return the value of the connected `TLSSocket`'s own `alpnProtocol`property.
+ * @since v9.4.0
+ */
+ readonly alpnProtocol?: string | undefined;
+ /**
+ * Will be `true` if this `Http2Session` instance has been closed, otherwise`false`.
+ * @since v9.4.0
+ */
+ readonly closed: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance is still connecting, will be set
+ * to `false` before emitting `connect` event and/or calling the `http2.connect`callback.
+ * @since v10.0.0
+ */
+ readonly connecting: boolean;
+ /**
+ * Will be `true` if this `Http2Session` instance has been destroyed and must no
+ * longer be used, otherwise `false`.
+ * @since v8.4.0
+ */
+ readonly destroyed: boolean;
+ /**
+ * Value is `undefined` if the `Http2Session` session socket has not yet been
+ * connected, `true` if the `Http2Session` is connected with a `TLSSocket`,
+ * and `false` if the `Http2Session` is connected to any other kind of socket
+ * or stream.
+ * @since v9.4.0
+ */
+ readonly encrypted?: boolean | undefined;
+ /**
+ * A prototype-less object describing the current local settings of this`Http2Session`. The local settings are local to _this_`Http2Session` instance.
+ * @since v8.4.0
+ */
+ readonly localSettings: Settings;
+ /**
+ * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property
+ * will return an `Array` of origins for which the `Http2Session` may be
+ * considered authoritative.
+ *
+ * The `originSet` property is only available when using a secure TLS connection.
+ * @since v9.4.0
+ */
+ readonly originSet?: string[] | undefined;
+ /**
+ * Indicates whether the `Http2Session` is currently waiting for acknowledgment of
+ * a sent `SETTINGS` frame. Will be `true` after calling the`http2session.settings()` method. Will be `false` once all sent `SETTINGS`frames have been acknowledged.
+ * @since v8.4.0
+ */
+ readonly pendingSettingsAck: boolean;
+ /**
+ * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer.
+ * @since v8.4.0
+ */
+ readonly remoteSettings: Settings;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * limits available methods to ones safe to use with HTTP/2.
+ *
+ * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw
+ * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information.
+ *
+ * `setTimeout` method will be called on this `Http2Session`.
+ *
+ * All other interactions will be routed directly to the socket.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * Provides miscellaneous information about the current state of the`Http2Session`.
+ *
+ * An object describing the current status of this `Http2Session`.
+ * @since v8.4.0
+ */
+ readonly state: SessionState;
+ /**
+ * The `http2session.type` will be equal to`http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a
+ * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a
+ * client.
+ * @since v8.4.0
+ */
+ readonly type: number;
+ /**
+ * Gracefully closes the `Http2Session`, allowing any existing streams to
+ * complete on their own and preventing new `Http2Stream` instances from being
+ * created. Once closed, `http2session.destroy()`_might_ be called if there
+ * are no open `Http2Stream` instances.
+ *
+ * If specified, the `callback` function is registered as a handler for the`'close'` event.
+ * @since v9.4.0
+ */
+ close(callback?: () => void): void;
+ /**
+ * Immediately terminates the `Http2Session` and the associated `net.Socket` or`tls.TLSSocket`.
+ *
+ * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error`is not undefined, an `'error'` event will be emitted immediately before the`'close'` event.
+ *
+ * If there are any remaining open `Http2Streams` associated with the`Http2Session`, those will also be destroyed.
+ * @since v8.4.0
+ * @param error An `Error` object if the `Http2Session` is being destroyed due to an error.
+ * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`.
+ */
+ destroy(error?: Error, code?: number): void;
+ /**
+ * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`.
+ * @since v9.4.0
+ * @param code An HTTP/2 error code
+ * @param lastStreamID The numeric ID of the last processed `Http2Stream`
+ * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame.
+ */
+ goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
+ /**
+ * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must
+ * be provided. The method will return `true` if the `PING` was sent, `false`otherwise.
+ *
+ * The maximum number of outstanding (unacknowledged) pings is determined by the`maxOutstandingPings` configuration option. The default maximum is 10.
+ *
+ * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`containing 8 bytes of data that will be transmitted with the `PING` and
+ * returned with the ping acknowledgment.
+ *
+ * The callback will be invoked with three arguments: an error argument that will
+ * be `null` if the `PING` was successfully acknowledged, a `duration` argument
+ * that reports the number of milliseconds elapsed since the ping was sent and the
+ * acknowledgment was received, and a `Buffer` containing the 8-byte `PING`payload.
+ *
+ * ```js
+ * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => {
+ * if (!err) {
+ * console.log(`Ping acknowledged in ${duration} milliseconds`);
+ * console.log(`With payload '${payload.toString()}'`);
+ * }
+ * });
+ * ```
+ *
+ * If the `payload` argument is not specified, the default payload will be the
+ * 64-bit timestamp (little endian) marking the start of the `PING` duration.
+ * @since v8.9.3
+ * @param payload Optional ping payload.
+ */
+ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ /**
+ * Calls `ref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ ref(): void;
+ /**
+ * Sets the local endpoint's window size.
+ * The `windowSize` is the total window size to set, not
+ * the delta.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * const server = http2.createServer();
+ * const expectedWindowSize = 2 ** 20;
+ * server.on('connect', (session) => {
+ *
+ * // Set local window size to be 2 ** 20
+ * session.setLocalWindowSize(expectedWindowSize);
+ * });
+ * ```
+ * @since v15.3.0, v14.18.0
+ */
+ setLocalWindowSize(windowSize: number): void;
+ /**
+ * Used to set a callback function that is called when there is no activity on
+ * the `Http2Session` after `msecs` milliseconds. The given `callback` is
+ * registered as a listener on the `'timeout'` event.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * Updates the current local settings for this `Http2Session` and sends a new`SETTINGS` frame to the connected HTTP/2 peer.
+ *
+ * Once called, the `http2session.pendingSettingsAck` property will be `true`while the session is waiting for the remote peer to acknowledge the new
+ * settings.
+ *
+ * The new settings will not become effective until the `SETTINGS` acknowledgment
+ * is received and the `'localSettings'` event is emitted. It is possible to send
+ * multiple `SETTINGS` frames while acknowledgment is still pending.
+ * @since v8.4.0
+ * @param callback Callback that is called once the session is connected or right away if the session is already connected.
+ */
+ settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void;
+ /**
+ * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`.
+ * @since v9.4.0
+ */
+ unref(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ addListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ addListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'ping', listener: () => void): this;
+ addListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'frameError', frameType: number, errorCode: number, streamID: number): boolean;
+ emit(event: 'goaway', errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
+ emit(event: 'localSettings', settings: Settings): boolean;
+ emit(event: 'ping'): boolean;
+ emit(event: 'remoteSettings', settings: Settings): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ on(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ on(event: 'localSettings', listener: (settings: Settings) => void): this;
+ on(event: 'ping', listener: () => void): this;
+ on(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ once(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ once(event: 'localSettings', listener: (settings: Settings) => void): this;
+ once(event: 'ping', listener: () => void): this;
+ once(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'ping', listener: () => void): this;
+ prependListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependOnceListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependOnceListener(event: 'localSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'ping', listener: () => void): this;
+ prependOnceListener(event: 'remoteSettings', listener: (settings: Settings) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface ClientHttp2Session extends Http2Session {
+ /**
+ * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an
+ * HTTP/2 request to the connected server.
+ *
+ * When a `ClientHttp2Session` is first created, the socket may not yet be
+ * connected. if `clienthttp2session.request()` is called during this time, the
+ * actual request will be deferred until the socket is ready to go.
+ * If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown.
+ *
+ * This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const clientSession = http2.connect('https://localhost:1234');
+ * const {
+ * HTTP2_HEADER_PATH,
+ * HTTP2_HEADER_STATUS
+ * } = http2.constants;
+ *
+ * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' });
+ * req.on('response', (headers) => {
+ * console.log(headers[HTTP2_HEADER_STATUS]);
+ * req.on('data', (chunk) => { // .. });
+ * req.on('end', () => { // .. });
+ * });
+ * ```
+ *
+ * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+ * is emitted immediately after queuing the last chunk of payload data to be sent.
+ * The `http2stream.sendTrailers()` method can then be called to send trailing
+ * headers to the peer.
+ *
+ * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+ * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+ *
+ * When `options.signal` is set with an `AbortSignal` and then `abort` on the
+ * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error.
+ *
+ * The `:method` and `:path` pseudo-headers are not specified within `headers`,
+ * they respectively default to:
+ *
+ * * `:method` \= `'GET'`
+ * * `:path` \= `/`
+ * @since v8.4.0
+ */
+ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
+ addListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ addListener(event: 'origin', listener: (origins: string[]) => void): this;
+ addListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'altsvc', alt: string, origin: string, stream: number): boolean;
+ emit(event: 'origin', origins: ReadonlyArray<string>): boolean;
+ emit(event: 'connect', session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ on(event: 'origin', listener: (origins: string[]) => void): this;
+ on(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ once(event: 'origin', listener: (origins: string[]) => void): this;
+ once(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this;
+ prependOnceListener(event: 'origin', listener: (origins: string[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface AlternativeServiceOptions {
+ origin: number | string | url.URL;
+ }
+ export interface ServerHttp2Session extends Http2Session {
+ readonly server: Http2Server | Http2SecureServer;
+ /**
+ * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * const server = http2.createServer();
+ * server.on('session', (session) => {
+ * // Set altsvc for origin https://example.org:80
+ * session.altsvc('h2=":8000"', 'https://example.org:80');
+ * });
+ *
+ * server.on('stream', (stream) => {
+ * // Set altsvc for a specific stream
+ * stream.session.altsvc('h2=":8000"', stream.id);
+ * });
+ * ```
+ *
+ * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate
+ * service is associated with the origin of the given `Http2Stream`.
+ *
+ * The `alt` and origin string _must_ contain only ASCII bytes and are
+ * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given
+ * domain.
+ *
+ * When a string is passed for the `originOrStream` argument, it will be parsed as
+ * a URL and the origin will be derived. For instance, the origin for the
+ * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ * @since v9.4.0
+ * @param alt A description of the alternative service configuration as defined by `RFC 7838`.
+ * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the
+ * `http2stream.id` property.
+ */
+ altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
+ /**
+ * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client
+ * to advertise the set of origins for which the server is capable of providing
+ * authoritative responses.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const options = getSecureOptionsSomehow();
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * server.on('session', (session) => {
+ * session.origin('https://example.com', 'https://example.org');
+ * });
+ * ```
+ *
+ * When a string is passed as an `origin`, it will be parsed as a URL and the
+ * origin will be derived. For instance, the origin for the HTTP URL`'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given
+ * string
+ * cannot be parsed as a URL or if a valid origin cannot be derived.
+ *
+ * A `URL` object, or any object with an `origin` property, may be passed as
+ * an `origin`, in which case the value of the `origin` property will be
+ * used. The value of the `origin` property _must_ be a properly serialized
+ * ASCII origin.
+ *
+ * Alternatively, the `origins` option may be used when creating a new HTTP/2
+ * server using the `http2.createSecureServer()` method:
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const options = getSecureOptionsSomehow();
+ * options.origins = ['https://example.com', 'https://example.org'];
+ * const server = http2.createSecureServer(options);
+ * server.on('stream', (stream) => {
+ * stream.respond();
+ * stream.end('ok');
+ * });
+ * ```
+ * @since v10.12.0
+ * @param origins One or more URL Strings passed as separate arguments.
+ */
+ origin(
+ ...origins: Array<
+ | string
+ | url.URL
+ | {
+ origin: string;
+ }
+ >
+ ): void;
+ addListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'connect', session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ // Http2Server
+ export interface SessionOptions {
+ maxDeflateDynamicTableSize?: number | undefined;
+ maxSessionMemory?: number | undefined;
+ maxHeaderListPairs?: number | undefined;
+ maxOutstandingPings?: number | undefined;
+ maxSendHeaderBlockLength?: number | undefined;
+ paddingStrategy?: number | undefined;
+ peerMaxConcurrentStreams?: number | undefined;
+ settings?: Settings | undefined;
+ /**
+ * Specifies a timeout in milliseconds that
+ * a server should wait when an [`'unknownProtocol'`][] is emitted. If the
+ * socket has not been destroyed by that time the server will destroy it.
+ * @default 100000
+ */
+ unknownProtocolTimeout?: number | undefined;
+ selectPadding?(frameLen: number, maxFrameLen: number): number;
+ createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
+ }
+ export interface ClientSessionOptions extends SessionOptions {
+ maxReservedRemoteStreams?: number | undefined;
+ createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
+ protocol?: 'http:' | 'https:' | undefined;
+ }
+ export interface ServerSessionOptions extends SessionOptions {
+ Http1IncomingMessage?: typeof IncomingMessage | undefined;
+ Http1ServerResponse?: typeof ServerResponse | undefined;
+ Http2ServerRequest?: typeof Http2ServerRequest | undefined;
+ Http2ServerResponse?: typeof Http2ServerResponse | undefined;
+ }
+ export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
+ export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {}
+ export interface ServerOptions extends ServerSessionOptions {}
+ export interface SecureServerOptions extends SecureServerSessionOptions {
+ allowHTTP1?: boolean | undefined;
+ origins?: string[] | undefined;
+ }
+ interface HTTP2ServerCommon {
+ setTimeout(msec?: number, callback?: () => void): this;
+ /**
+ * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values.
+ * Throws ERR_INVALID_ARG_TYPE for invalid settings argument.
+ */
+ updateSettings(settings: Settings): void;
+ }
+ export interface Http2Server extends net.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon {
+ addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: 'sessionError', listener: (err: Error) => void): this;
+ addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: 'session', session: ServerHttp2Session): boolean;
+ emit(event: 'sessionError', err: Error): boolean;
+ emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: 'timeout'): boolean;
+ emit(event: 'unknownProtocol', socket: tls.TLSSocket): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ on(event: 'sessionError', listener: (err: Error) => void): this;
+ on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ once(event: 'sessionError', listener: (err: Error) => void): this;
+ once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status,
+ * headers, and
+ * data.
+ * @since v8.4.0
+ */
+ export class Http2ServerRequest extends stream.Readable {
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
+ /**
+ * The `request.aborted` property will be `true` if the request has
+ * been aborted.
+ * @since v10.1.0
+ */
+ readonly aborted: boolean;
+ /**
+ * The request authority pseudo header field. Because HTTP/2 allows requests
+ * to set either `:authority` or `host`, this value is derived from`req.headers[':authority']` if present. Otherwise, it is derived from`req.headers['host']`.
+ * @since v8.4.0
+ */
+ readonly authority: string;
+ /**
+ * See `request.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * The `request.complete` property will be `true` if the request has
+ * been completed, aborted, or destroyed.
+ * @since v12.10.0
+ */
+ readonly complete: boolean;
+ /**
+ * The request/response headers object.
+ *
+ * Key-value pairs of header names and values. Header names are lower-cased.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // { 'user-agent': 'curl/7.22.0',
+ * // host: '127.0.0.1:8000',
+ * // accept: '*' }
+ * console.log(request.headers);
+ * ```
+ *
+ * See `HTTP/2 Headers Object`.
+ *
+ * In HTTP/2, the request path, host name, protocol, and method are represented as
+ * special headers prefixed with the `:` character (e.g. `':path'`). These special
+ * headers will be included in the `request.headers` object. Care must be taken not
+ * to inadvertently modify these special headers or errors may occur. For instance,
+ * removing all headers from the request will cause errors to occur:
+ *
+ * ```js
+ * removeAllHeaders(request.headers);
+ * assert(request.url); // Fails because the :path header has been removed
+ * ```
+ * @since v8.4.0
+ */
+ readonly headers: IncomingHttpHeaders;
+ /**
+ * In case of server request, the HTTP version sent by the client. In the case of
+ * client response, the HTTP version of the connected-to server. Returns`'2.0'`.
+ *
+ * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second.
+ * @since v8.4.0
+ */
+ readonly httpVersion: string;
+ readonly httpVersionMinor: number;
+ readonly httpVersionMajor: number;
+ /**
+ * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`.
+ * @since v8.4.0
+ */
+ readonly method: string;
+ /**
+ * The raw request/response headers list exactly as they were received.
+ *
+ * The keys and values are in the same list. It is _not_ a
+ * list of tuples. So, the even-numbered offsets are key values, and the
+ * odd-numbered offsets are the associated values.
+ *
+ * Header names are not lowercased, and duplicates are not merged.
+ *
+ * ```js
+ * // Prints something like:
+ * //
+ * // [ 'user-agent',
+ * // 'this is invalid because there can be only one',
+ * // 'User-Agent',
+ * // 'curl/7.22.0',
+ * // 'Host',
+ * // '127.0.0.1:8000',
+ * // 'ACCEPT',
+ * // '*' ]
+ * console.log(request.rawHeaders);
+ * ```
+ * @since v8.4.0
+ */
+ readonly rawHeaders: string[];
+ /**
+ * The raw request/response trailer keys and values exactly as they were
+ * received. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly rawTrailers: string[];
+ /**
+ * The request scheme pseudo header field indicating the scheme
+ * portion of the target URL.
+ * @since v8.4.0
+ */
+ readonly scheme: string;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `request.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`request.stream`.
+ *
+ * `setTimeout` method will be called on `request.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket. With TLS support,
+ * use `request.socket.getPeerCertificate()` to obtain the client's
+ * authentication details.
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the request.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * The request/response trailers object. Only populated at the `'end'` event.
+ * @since v8.4.0
+ */
+ readonly trailers: IncomingHttpHeaders;
+ /**
+ * Request URL string. This contains only the URL that is present in the actual
+ * HTTP request. If the request is:
+ *
+ * ```http
+ * GET /status?name=ryan HTTP/1.1
+ * Accept: text/plain
+ * ```
+ *
+ * Then `request.url` will be:
+ *
+ * ```js
+ * '/status?name=ryan'
+ * ```
+ *
+ * To parse the url into its parts, `new URL()` can be used:
+ *
+ * ```console
+ * $ node
+ * > new URL('/status?name=ryan', 'http://example.com')
+ * URL {
+ * href: 'http://example.com/status?name=ryan',
+ * origin: 'http://example.com',
+ * protocol: 'http:',
+ * username: '',
+ * password: '',
+ * host: 'example.com',
+ * hostname: 'example.com',
+ * port: '',
+ * pathname: '/status',
+ * search: '?name=ryan',
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
+ * hash: ''
+ * }
+ * ```
+ * @since v8.4.0
+ */
+ url: string;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ read(size?: number): Buffer | string | null;
+ addListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'aborted', hadError: boolean, code: number): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: Buffer | string): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ /**
+ * This object is created internally by an HTTP server, not by the user. It is
+ * passed as the second parameter to the `'request'` event.
+ * @since v8.4.0
+ */
+ export class Http2ServerResponse extends stream.Writable {
+ constructor(stream: ServerHttp2Stream);
+ /**
+ * See `response.socket`.
+ * @since v8.4.0
+ * @deprecated Since v13.0.0 - Use `socket`.
+ */
+ readonly connection: net.Socket | tls.TLSSocket;
+ /**
+ * Boolean value that indicates whether the response has completed. Starts
+ * as `false`. After `response.end()` executes, the value will be `true`.
+ * @since v8.4.0
+ * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`.
+ */
+ readonly finished: boolean;
+ /**
+ * True if headers were sent, false otherwise (read-only).
+ * @since v8.4.0
+ */
+ readonly headersSent: boolean;
+ /**
+ * A reference to the original HTTP2 request object.
+ * @since v15.7.0
+ */
+ readonly req: Http2ServerRequest;
+ /**
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+ * applies getters, setters, and methods based on HTTP/2 logic.
+ *
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+ * set on `response.stream`.
+ *
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`.
+ *
+ * `setTimeout` method will be called on `response.stream.session`.
+ *
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+ * more information.
+ *
+ * All other interactions will be routed directly to the socket.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const server = http2.createServer((req, res) => {
+ * const ip = req.socket.remoteAddress;
+ * const port = req.socket.remotePort;
+ * res.end(`Your IP address is ${ip} and your source port is ${port}.`);
+ * }).listen(3000);
+ * ```
+ * @since v8.4.0
+ */
+ readonly socket: net.Socket | tls.TLSSocket;
+ /**
+ * The `Http2Stream` object backing the response.
+ * @since v8.4.0
+ */
+ readonly stream: ServerHttp2Stream;
+ /**
+ * When true, the Date header will be automatically generated and sent in
+ * the response if it is not already present in the headers. Defaults to true.
+ *
+ * This should only be disabled for testing; HTTP requires the Date header
+ * in responses.
+ * @since v8.4.0
+ */
+ sendDate: boolean;
+ /**
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
+ * this property controls the status code that will be sent to the client when
+ * the headers get flushed.
+ *
+ * ```js
+ * response.statusCode = 404;
+ * ```
+ *
+ * After response header was sent to the client, this property indicates the
+ * status code which was sent out.
+ * @since v8.4.0
+ */
+ statusCode: number;
+ /**
+ * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns
+ * an empty string.
+ * @since v8.4.0
+ */
+ statusMessage: '';
+ /**
+ * This method adds HTTP trailing headers (a header but at the end of the
+ * message) to the response.
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ addTrailers(trailers: OutgoingHttpHeaders): void;
+ /**
+ * This method signals to the server that all of the response headers and body
+ * have been sent; that server should consider this message complete.
+ * The method, `response.end()`, MUST be called on each response.
+ *
+ * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`.
+ *
+ * If `callback` is specified, it will be called when the response stream
+ * is finished.
+ * @since v8.4.0
+ */
+ end(callback?: () => void): this;
+ end(data: string | Uint8Array, callback?: () => void): this;
+ end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
+ /**
+ * Reads out a header that has already been queued but not sent to the client.
+ * The name is case-insensitive.
+ *
+ * ```js
+ * const contentType = response.getHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ getHeader(name: string): string;
+ /**
+ * Returns an array containing the unique names of the current outgoing headers.
+ * All header names are lowercase.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headerNames = response.getHeaderNames();
+ * // headerNames === ['foo', 'set-cookie']
+ * ```
+ * @since v8.4.0
+ */
+ getHeaderNames(): string[];
+ /**
+ * Returns a shallow copy of the current outgoing headers. Since a shallow copy
+ * is used, array values may be mutated without additional calls to various
+ * header-related http module methods. The keys of the returned object are the
+ * header names and the values are the respective header values. All header names
+ * are lowercase.
+ *
+ * The object returned by the `response.getHeaders()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * ```js
+ * response.setHeader('Foo', 'bar');
+ * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+ *
+ * const headers = response.getHeaders();
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+ * ```
+ * @since v8.4.0
+ */
+ getHeaders(): OutgoingHttpHeaders;
+ /**
+ * Returns `true` if the header identified by `name` is currently set in the
+ * outgoing headers. The header name matching is case-insensitive.
+ *
+ * ```js
+ * const hasContentType = response.hasHeader('content-type');
+ * ```
+ * @since v8.4.0
+ */
+ hasHeader(name: string): boolean;
+ /**
+ * Removes a header that has been queued for implicit sending.
+ *
+ * ```js
+ * response.removeHeader('Content-Encoding');
+ * ```
+ * @since v8.4.0
+ */
+ removeHeader(name: string): void;
+ /**
+ * Sets a single header value for implicit headers. If this header already exists
+ * in the to-be-sent headers, its value will be replaced. Use an array of strings
+ * here to send multiple headers with the same name.
+ *
+ * ```js
+ * response.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * ```
+ *
+ * or
+ *
+ * ```js
+ * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']);
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ * @since v8.4.0
+ */
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ /**
+ * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+ * provided, then it is added as a listener on the `'timeout'` event on
+ * the response object.
+ *
+ * If no `'timeout'` listener is added to the request, the response, or
+ * the server, then `Http2Stream` s are destroyed when they time out. If a
+ * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+ * @since v8.4.0
+ */
+ setTimeout(msecs: number, callback?: () => void): void;
+ /**
+ * If this method is called and `response.writeHead()` has not been called,
+ * it will switch to implicit header mode and flush the implicit headers.
+ *
+ * This sends a chunk of the response body. This method may
+ * be called multiple times to provide successive parts of the body.
+ *
+ * In the `http` module, the response body is omitted when the
+ * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
+ *
+ * `chunk` can be a string or a buffer. If `chunk` is a string,
+ * the second parameter specifies how to encode it into a byte stream.
+ * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk
+ * of data is flushed.
+ *
+ * This is the raw HTTP body and has nothing to do with higher-level multi-part
+ * body encodings that may be used.
+ *
+ * The first time `response.write()` is called, it will send the buffered
+ * header information and the first chunk of the body to the client. The second
+ * time `response.write()` is called, Node.js assumes data will be streamed,
+ * and sends the new data separately. That is, the response is buffered up to the
+ * first chunk of the body.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again.
+ * @since v8.4.0
+ */
+ write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
+ write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
+ /**
+ * Sends a status `100 Continue` to the client, indicating that the request body
+ * should be sent. See the `'checkContinue'` event on `Http2Server` and`Http2SecureServer`.
+ * @since v8.4.0
+ */
+ writeContinue(): void;
+ /**
+ * Sends a response header to the request. The status code is a 3-digit HTTP
+ * status code, like `404`. The last argument, `headers`, are the response headers.
+ *
+ * Returns a reference to the `Http2ServerResponse`, so that calls can be chained.
+ *
+ * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be
+ * passed as the second argument. However, because the `statusMessage` has no
+ * meaning within HTTP/2, the argument will have no effect and a process warning
+ * will be emitted.
+ *
+ * ```js
+ * const body = 'hello world';
+ * response.writeHead(200, {
+ * 'Content-Length': Buffer.byteLength(body),
+ * 'Content-Type': 'text/plain; charset=utf-8',
+ * });
+ * ```
+ *
+ * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a
+ * given encoding. On outbound messages, Node.js does not check if Content-Length
+ * and the length of the body being transmitted are equal or not. However, when
+ * receiving messages, Node.js will automatically reject messages when the`Content-Length` does not match the actual payload size.
+ *
+ * This method may be called at most one time on a message before `response.end()` is called.
+ *
+ * If `response.write()` or `response.end()` are called before calling
+ * this, the implicit/mutable headers will be calculated and call this function.
+ *
+ * When headers have been set with `response.setHeader()`, they will be merged
+ * with any headers passed to `response.writeHead()`, with the headers passed
+ * to `response.writeHead()` given precedence.
+ *
+ * ```js
+ * // Returns content-type = text/plain
+ * const server = http2.createServer((req, res) => {
+ * res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ * res.setHeader('X-Foo', 'bar');
+ * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+ * res.end('ok');
+ * });
+ * ```
+ *
+ * Attempting to set a header field name or value that contains invalid characters
+ * will result in a `TypeError` being thrown.
+ * @since v8.4.0
+ */
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
+ writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
+ /**
+ * Call `http2stream.pushStream()` with the given headers, and wrap the
+ * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback
+ * parameter if successful. When `Http2ServerRequest` is closed, the callback is
+ * called with an error `ERR_HTTP2_INVALID_STREAM`.
+ * @since v8.4.0
+ * @param headers An object describing the headers
+ * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of
+ * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method
+ */
+ createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', error: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: stream.Readable): boolean;
+ emit(event: 'unpipe', src: stream.Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (error: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (error: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ export namespace constants {
+ const NGHTTP2_SESSION_SERVER: number;
+ const NGHTTP2_SESSION_CLIENT: number;
+ const NGHTTP2_STREAM_STATE_IDLE: number;
+ const NGHTTP2_STREAM_STATE_OPEN: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_CLOSED: number;
+ const NGHTTP2_NO_ERROR: number;
+ const NGHTTP2_PROTOCOL_ERROR: number;
+ const NGHTTP2_INTERNAL_ERROR: number;
+ const NGHTTP2_FLOW_CONTROL_ERROR: number;
+ const NGHTTP2_SETTINGS_TIMEOUT: number;
+ const NGHTTP2_STREAM_CLOSED: number;
+ const NGHTTP2_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_REFUSED_STREAM: number;
+ const NGHTTP2_CANCEL: number;
+ const NGHTTP2_COMPRESSION_ERROR: number;
+ const NGHTTP2_CONNECT_ERROR: number;
+ const NGHTTP2_ENHANCE_YOUR_CALM: number;
+ const NGHTTP2_INADEQUATE_SECURITY: number;
+ const NGHTTP2_HTTP_1_1_REQUIRED: number;
+ const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_FLAG_NONE: number;
+ const NGHTTP2_FLAG_END_STREAM: number;
+ const NGHTTP2_FLAG_END_HEADERS: number;
+ const NGHTTP2_FLAG_ACK: number;
+ const NGHTTP2_FLAG_PADDED: number;
+ const NGHTTP2_FLAG_PRIORITY: number;
+ const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
+ const DEFAULT_SETTINGS_ENABLE_PUSH: number;
+ const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
+ const MAX_MAX_FRAME_SIZE: number;
+ const MIN_MAX_FRAME_SIZE: number;
+ const MAX_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_DEFAULT_WEIGHT: number;
+ const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
+ const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
+ const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
+ const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
+ const PADDING_STRATEGY_NONE: number;
+ const PADDING_STRATEGY_MAX: number;
+ const PADDING_STRATEGY_CALLBACK: number;
+ const HTTP2_HEADER_STATUS: string;
+ const HTTP2_HEADER_METHOD: string;
+ const HTTP2_HEADER_AUTHORITY: string;
+ const HTTP2_HEADER_SCHEME: string;
+ const HTTP2_HEADER_PATH: string;
+ const HTTP2_HEADER_ACCEPT_CHARSET: string;
+ const HTTP2_HEADER_ACCEPT_ENCODING: string;
+ const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
+ const HTTP2_HEADER_ACCEPT_RANGES: string;
+ const HTTP2_HEADER_ACCEPT: string;
+ const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
+ const HTTP2_HEADER_AGE: string;
+ const HTTP2_HEADER_ALLOW: string;
+ const HTTP2_HEADER_AUTHORIZATION: string;
+ const HTTP2_HEADER_CACHE_CONTROL: string;
+ const HTTP2_HEADER_CONNECTION: string;
+ const HTTP2_HEADER_CONTENT_DISPOSITION: string;
+ const HTTP2_HEADER_CONTENT_ENCODING: string;
+ const HTTP2_HEADER_CONTENT_LANGUAGE: string;
+ const HTTP2_HEADER_CONTENT_LENGTH: string;
+ const HTTP2_HEADER_CONTENT_LOCATION: string;
+ const HTTP2_HEADER_CONTENT_MD5: string;
+ const HTTP2_HEADER_CONTENT_RANGE: string;
+ const HTTP2_HEADER_CONTENT_TYPE: string;
+ const HTTP2_HEADER_COOKIE: string;
+ const HTTP2_HEADER_DATE: string;
+ const HTTP2_HEADER_ETAG: string;
+ const HTTP2_HEADER_EXPECT: string;
+ const HTTP2_HEADER_EXPIRES: string;
+ const HTTP2_HEADER_FROM: string;
+ const HTTP2_HEADER_HOST: string;
+ const HTTP2_HEADER_IF_MATCH: string;
+ const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
+ const HTTP2_HEADER_IF_NONE_MATCH: string;
+ const HTTP2_HEADER_IF_RANGE: string;
+ const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
+ const HTTP2_HEADER_LAST_MODIFIED: string;
+ const HTTP2_HEADER_LINK: string;
+ const HTTP2_HEADER_LOCATION: string;
+ const HTTP2_HEADER_MAX_FORWARDS: string;
+ const HTTP2_HEADER_PREFER: string;
+ const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
+ const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
+ const HTTP2_HEADER_RANGE: string;
+ const HTTP2_HEADER_REFERER: string;
+ const HTTP2_HEADER_REFRESH: string;
+ const HTTP2_HEADER_RETRY_AFTER: string;
+ const HTTP2_HEADER_SERVER: string;
+ const HTTP2_HEADER_SET_COOKIE: string;
+ const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
+ const HTTP2_HEADER_TRANSFER_ENCODING: string;
+ const HTTP2_HEADER_TE: string;
+ const HTTP2_HEADER_UPGRADE: string;
+ const HTTP2_HEADER_USER_AGENT: string;
+ const HTTP2_HEADER_VARY: string;
+ const HTTP2_HEADER_VIA: string;
+ const HTTP2_HEADER_WWW_AUTHENTICATE: string;
+ const HTTP2_HEADER_HTTP2_SETTINGS: string;
+ const HTTP2_HEADER_KEEP_ALIVE: string;
+ const HTTP2_HEADER_PROXY_CONNECTION: string;
+ const HTTP2_METHOD_ACL: string;
+ const HTTP2_METHOD_BASELINE_CONTROL: string;
+ const HTTP2_METHOD_BIND: string;
+ const HTTP2_METHOD_CHECKIN: string;
+ const HTTP2_METHOD_CHECKOUT: string;
+ const HTTP2_METHOD_CONNECT: string;
+ const HTTP2_METHOD_COPY: string;
+ const HTTP2_METHOD_DELETE: string;
+ const HTTP2_METHOD_GET: string;
+ const HTTP2_METHOD_HEAD: string;
+ const HTTP2_METHOD_LABEL: string;
+ const HTTP2_METHOD_LINK: string;
+ const HTTP2_METHOD_LOCK: string;
+ const HTTP2_METHOD_MERGE: string;
+ const HTTP2_METHOD_MKACTIVITY: string;
+ const HTTP2_METHOD_MKCALENDAR: string;
+ const HTTP2_METHOD_MKCOL: string;
+ const HTTP2_METHOD_MKREDIRECTREF: string;
+ const HTTP2_METHOD_MKWORKSPACE: string;
+ const HTTP2_METHOD_MOVE: string;
+ const HTTP2_METHOD_OPTIONS: string;
+ const HTTP2_METHOD_ORDERPATCH: string;
+ const HTTP2_METHOD_PATCH: string;
+ const HTTP2_METHOD_POST: string;
+ const HTTP2_METHOD_PRI: string;
+ const HTTP2_METHOD_PROPFIND: string;
+ const HTTP2_METHOD_PROPPATCH: string;
+ const HTTP2_METHOD_PUT: string;
+ const HTTP2_METHOD_REBIND: string;
+ const HTTP2_METHOD_REPORT: string;
+ const HTTP2_METHOD_SEARCH: string;
+ const HTTP2_METHOD_TRACE: string;
+ const HTTP2_METHOD_UNBIND: string;
+ const HTTP2_METHOD_UNCHECKOUT: string;
+ const HTTP2_METHOD_UNLINK: string;
+ const HTTP2_METHOD_UNLOCK: string;
+ const HTTP2_METHOD_UPDATE: string;
+ const HTTP2_METHOD_UPDATEREDIRECTREF: string;
+ const HTTP2_METHOD_VERSION_CONTROL: string;
+ const HTTP_STATUS_CONTINUE: number;
+ const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
+ const HTTP_STATUS_PROCESSING: number;
+ const HTTP_STATUS_OK: number;
+ const HTTP_STATUS_CREATED: number;
+ const HTTP_STATUS_ACCEPTED: number;
+ const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
+ const HTTP_STATUS_NO_CONTENT: number;
+ const HTTP_STATUS_RESET_CONTENT: number;
+ const HTTP_STATUS_PARTIAL_CONTENT: number;
+ const HTTP_STATUS_MULTI_STATUS: number;
+ const HTTP_STATUS_ALREADY_REPORTED: number;
+ const HTTP_STATUS_IM_USED: number;
+ const HTTP_STATUS_MULTIPLE_CHOICES: number;
+ const HTTP_STATUS_MOVED_PERMANENTLY: number;
+ const HTTP_STATUS_FOUND: number;
+ const HTTP_STATUS_SEE_OTHER: number;
+ const HTTP_STATUS_NOT_MODIFIED: number;
+ const HTTP_STATUS_USE_PROXY: number;
+ const HTTP_STATUS_TEMPORARY_REDIRECT: number;
+ const HTTP_STATUS_PERMANENT_REDIRECT: number;
+ const HTTP_STATUS_BAD_REQUEST: number;
+ const HTTP_STATUS_UNAUTHORIZED: number;
+ const HTTP_STATUS_PAYMENT_REQUIRED: number;
+ const HTTP_STATUS_FORBIDDEN: number;
+ const HTTP_STATUS_NOT_FOUND: number;
+ const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
+ const HTTP_STATUS_NOT_ACCEPTABLE: number;
+ const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
+ const HTTP_STATUS_REQUEST_TIMEOUT: number;
+ const HTTP_STATUS_CONFLICT: number;
+ const HTTP_STATUS_GONE: number;
+ const HTTP_STATUS_LENGTH_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_FAILED: number;
+ const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
+ const HTTP_STATUS_URI_TOO_LONG: number;
+ const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
+ const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
+ const HTTP_STATUS_EXPECTATION_FAILED: number;
+ const HTTP_STATUS_TEAPOT: number;
+ const HTTP_STATUS_MISDIRECTED_REQUEST: number;
+ const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
+ const HTTP_STATUS_LOCKED: number;
+ const HTTP_STATUS_FAILED_DEPENDENCY: number;
+ const HTTP_STATUS_UNORDERED_COLLECTION: number;
+ const HTTP_STATUS_UPGRADE_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_REQUIRED: number;
+ const HTTP_STATUS_TOO_MANY_REQUESTS: number;
+ const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
+ const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
+ const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
+ const HTTP_STATUS_NOT_IMPLEMENTED: number;
+ const HTTP_STATUS_BAD_GATEWAY: number;
+ const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
+ const HTTP_STATUS_GATEWAY_TIMEOUT: number;
+ const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
+ const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
+ const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
+ const HTTP_STATUS_LOOP_DETECTED: number;
+ const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
+ const HTTP_STATUS_NOT_EXTENDED: number;
+ const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
+ }
+ /**
+ * This symbol can be set as a property on the HTTP/2 headers object with
+ * an array value in order to provide a list of headers considered sensitive.
+ */
+ export const sensitiveHeaders: symbol;
+ /**
+ * Returns an object containing the default settings for an `Http2Session`instance. This method returns a new object instance every time it is called
+ * so instances returned may be safely modified for use.
+ * @since v8.4.0
+ */
+ export function getDefaultSettings(): Settings;
+ /**
+ * Returns a `Buffer` instance containing serialized representation of the given
+ * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended
+ * for use with the `HTTP2-Settings` header field.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * const packed = http2.getPackedSettings({ enablePush: false });
+ *
+ * console.log(packed.toString('base64'));
+ * // Prints: AAIAAAAA
+ * ```
+ * @since v8.4.0
+ */
+ export function getPackedSettings(settings: Settings): Buffer;
+ /**
+ * Returns a `HTTP/2 Settings Object` containing the deserialized settings from
+ * the given `Buffer` as generated by `http2.getPackedSettings()`.
+ * @since v8.4.0
+ * @param buf The packed settings.
+ */
+ export function getUnpackedSettings(buf: Uint8Array): Settings;
+ /**
+ * Returns a `net.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when
+ * communicating
+ * with browser clients.
+ *
+ * ```js
+ * const http2 = require('http2');
+ *
+ * // Create an unencrypted HTTP/2 server.
+ * // Since there are no browsers known that support
+ * // unencrypted HTTP/2, the use of `http2.createSecureServer()`
+ * // is necessary when communicating with browser clients.
+ * const server = http2.createServer();
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(80);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ /**
+ * Returns a `tls.Server` instance that creates and manages `Http2Session`instances.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem')
+ * };
+ *
+ * // Create a secure HTTP/2 server
+ * const server = http2.createSecureServer(options);
+ *
+ * server.on('stream', (stream, headers) => {
+ * stream.respond({
+ * 'content-type': 'text/html; charset=utf-8',
+ * ':status': 200
+ * });
+ * stream.end('<h1>Hello World</h1>');
+ * });
+ *
+ * server.listen(80);
+ * ```
+ * @since v8.4.0
+ * @param onRequestHandler See `Compatibility API`
+ */
+ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ /**
+ * Returns a `ClientHttp2Session` instance.
+ *
+ * ```js
+ * const http2 = require('http2');
+ * const client = http2.connect('https://localhost:1234');
+ *
+ * // Use the client
+ *
+ * client.close();
+ * ```
+ * @since v8.4.0
+ * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port
+ * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored.
+ * @param listener Will be registered as a one-time listener of the {@link 'connect'} event.
+ */
+ export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
+ export function connect(
+ authority: string | url.URL,
+ options?: ClientSessionOptions | SecureClientSessionOptions,
+ listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
+ ): ClientHttp2Session;
+}
+declare module 'node:http2' {
+ export * from 'http2';
+}
diff --git a/node_modules/@types/node/ts4.8/https.d.ts b/node_modules/@types/node/ts4.8/https.d.ts
new file mode 100755
index 0000000..aae4a95
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/https.d.ts
@@ -0,0 +1,541 @@
+/**
+ * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
+ * separate module.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
+ */
+declare module 'https' {
+ import { Duplex } from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as http from 'node:http';
+ import { URL } from 'node:url';
+ type ServerOptions<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions<Request, Response>;
+ type RequestOptions = http.RequestOptions &
+ tls.SecureContextOptions & {
+ rejectUnauthorized?: boolean | undefined; // Defaults to true
+ servername?: string | undefined; // SNI TLS Extension
+ };
+ interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
+ rejectUnauthorized?: boolean | undefined;
+ maxCachedSessions?: number | undefined;
+ }
+ /**
+ * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
+ * @since v0.4.5
+ */
+ class Agent extends http.Agent {
+ constructor(options?: AgentOptions);
+ options: AgentOptions;
+ }
+ interface Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends http.Server<Request, Response> {}
+ /**
+ * See `http.Server` for more information.
+ * @since v0.3.4
+ */
+ class Server<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ > extends tls.Server {
+ constructor(requestListener?: http.RequestListener<Request, Response>);
+ constructor(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ );
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ addListener(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ addListener(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ addListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ addListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ emit(event: string, ...args: any[]): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
+ emit(
+ event: 'newSession',
+ sessionId: Buffer,
+ sessionData: Buffer,
+ callback: (err: Error, resp: Buffer) => void,
+ ): boolean;
+ emit(
+ event: 'OCSPRequest',
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Duplex): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ emit(
+ event: 'checkContinue',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(
+ event: 'checkExpectation',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'clientError', err: Error, socket: Duplex): boolean;
+ emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ emit(
+ event: 'request',
+ req: InstanceType<Request>,
+ res: InstanceType<Response> & { req: InstanceType<Request> },
+ ): boolean;
+ emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ on(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ on(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ on(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Duplex) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ on(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ once(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ once(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ once(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Duplex) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ once(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ prependListener(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ prependListener(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(
+ event: 'newSession',
+ listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
+ ): this;
+ prependOnceListener(
+ event: 'OCSPRequest',
+ listener: (
+ certificate: Buffer,
+ issuer: Buffer,
+ callback: (err: Error | null, resp: Buffer) => void,
+ ) => void,
+ ): this;
+ prependOnceListener(
+ event: 'resumeSession',
+ listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
+ ): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
+ prependOnceListener(
+ event: 'connect',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
+ prependOnceListener(
+ event: 'upgrade',
+ listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
+ ): this;
+ }
+ /**
+ * ```js
+ * // curl -k https://localhost:8000/
+ * const https = require('https');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ *
+ * Or
+ *
+ * ```js
+ * const https = require('https');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
+ * passphrase: 'sample'
+ * };
+ *
+ * https.createServer(options, (req, res) => {
+ * res.writeHead(200);
+ * res.end('hello world\n');
+ * }).listen(8000);
+ * ```
+ * @since v0.3.4
+ * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
+ * @param requestListener A listener to be added to the `'request'` event.
+ */
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
+ function createServer<
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+ Response extends typeof http.ServerResponse = typeof http.ServerResponse,
+ >(
+ options: ServerOptions<Request, Response>,
+ requestListener?: http.RequestListener<Request, Response>,
+ ): Server<Request, Response>;
+ /**
+ * Makes a request to a secure web server.
+ *
+ * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
+ * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
+ * upload a file with a POST request, then write to the `ClientRequest` object.
+ *
+ * ```js
+ * const https = require('https');
+ *
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET'
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e);
+ * });
+ * req.end();
+ * ```
+ *
+ * Example using options from `tls.connect()`:
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
+ * };
+ * options.agent = new https.Agent(options);
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Alternatively, opt out of connection pooling by not using an `Agent`.
+ *
+ * ```js
+ * const options = {
+ * hostname: 'encrypted.google.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+ * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+ * agent: false
+ * };
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example using a `URL` as `options`:
+ *
+ * ```js
+ * const options = new URL('https://abc:xyz@example.com');
+ *
+ * const req = https.request(options, (res) => {
+ * // ...
+ * });
+ * ```
+ *
+ * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
+ *
+ * ```js
+ * const tls = require('tls');
+ * const https = require('https');
+ * const crypto = require('crypto');
+ *
+ * function sha256(s) {
+ * return crypto.createHash('sha256').update(s).digest('base64');
+ * }
+ * const options = {
+ * hostname: 'github.com',
+ * port: 443,
+ * path: '/',
+ * method: 'GET',
+ * checkServerIdentity: function(host, cert) {
+ * // Make sure the certificate is issued to the host we are connected to
+ * const err = tls.checkServerIdentity(host, cert);
+ * if (err) {
+ * return err;
+ * }
+ *
+ * // Pin the public key, similar to HPKP pin-sha25 pinning
+ * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
+ * if (sha256(cert.pubkey) !== pubkey256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The public key of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // Pin the exact certificate, rather than the pub key
+ * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
+ * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
+ * if (cert.fingerprint256 !== cert256) {
+ * const msg = 'Certificate verification error: ' +
+ * `The certificate of '${cert.subject.CN}' ` +
+ * 'does not match our pinned fingerprint';
+ * return new Error(msg);
+ * }
+ *
+ * // This loop is informational only.
+ * // Print the certificate and public key fingerprints of all certs in the
+ * // chain. Its common to pin the public key of the issuer on the public
+ * // internet, while pinning the public key of the service in sensitive
+ * // environments.
+ * do {
+ * console.log('Subject Common Name:', cert.subject.CN);
+ * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
+ *
+ * hash = crypto.createHash('sha256');
+ * console.log(' Public key ping-sha256:', sha256(cert.pubkey));
+ *
+ * lastprint256 = cert.fingerprint256;
+ * cert = cert.issuerCertificate;
+ * } while (cert.fingerprint256 !== lastprint256);
+ *
+ * },
+ * };
+ *
+ * options.agent = new https.Agent(options);
+ * const req = https.request(options, (res) => {
+ * console.log('All OK. Server matched our pinned cert or public key');
+ * console.log('statusCode:', res.statusCode);
+ * // Print the HPKP values
+ * console.log('headers:', res.headers['public-key-pins']);
+ *
+ * res.on('data', (d) => {});
+ * });
+ *
+ * req.on('error', (e) => {
+ * console.error(e.message);
+ * });
+ * req.end();
+ * ```
+ *
+ * Outputs for example:
+ *
+ * ```text
+ * Subject Common Name: github.com
+ * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
+ * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
+ * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
+ * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
+ * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
+ * Subject Common Name: DigiCert High Assurance EV Root CA
+ * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
+ * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
+ * All OK. Server matched our pinned cert or public key
+ * statusCode: 200
+ * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
+ * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
+ * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
+ * ```
+ * @since v0.3.6
+ * @param options Accepts all `options` from `request`, with some differences in default values:
+ */
+ function request(
+ options: RequestOptions | string | URL,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ function request(
+ url: string | URL,
+ options: RequestOptions,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ /**
+ * Like `http.get()` but for HTTPS.
+ *
+ * `options` can be an object, a string, or a `URL` object. If `options` is a
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+ *
+ * ```js
+ * const https = require('https');
+ *
+ * https.get('https://encrypted.google.com/', (res) => {
+ * console.log('statusCode:', res.statusCode);
+ * console.log('headers:', res.headers);
+ *
+ * res.on('data', (d) => {
+ * process.stdout.write(d);
+ * });
+ *
+ * }).on('error', (e) => {
+ * console.error(e);
+ * });
+ * ```
+ * @since v0.3.6
+ * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
+ */
+ function get(
+ options: RequestOptions | string | URL,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ function get(
+ url: string | URL,
+ options: RequestOptions,
+ callback?: (res: http.IncomingMessage) => void,
+ ): http.ClientRequest;
+ let globalAgent: Agent;
+}
+declare module 'node:https' {
+ export * from 'https';
+}
diff --git a/node_modules/@types/node/ts4.8/index.d.ts b/node_modules/@types/node/ts4.8/index.d.ts
new file mode 100755
index 0000000..2faf25e
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/index.d.ts
@@ -0,0 +1,87 @@
+/**
+ * License for programmatically and manually incorporated
+ * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
+ *
+ * Copyright Node.js contributors. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+// NOTE: These definitions support NodeJS and TypeScript 4.8 and earlier.
+
+// Reference required types from the default lib:
+/// <reference lib="es2020" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+/// <reference path="assert.d.ts" />
+/// <reference path="assert/strict.d.ts" />
+/// <reference path="globals.d.ts" />
+/// <reference path="async_hooks.d.ts" />
+/// <reference path="buffer.d.ts" />
+/// <reference path="child_process.d.ts" />
+/// <reference path="cluster.d.ts" />
+/// <reference path="console.d.ts" />
+/// <reference path="constants.d.ts" />
+/// <reference path="crypto.d.ts" />
+/// <reference path="dgram.d.ts" />
+/// <reference path="diagnostics_channel.d.ts" />
+/// <reference path="dns.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="domain.d.ts" />
+/// <reference path="events.d.ts" />
+/// <reference path="fs.d.ts" />
+/// <reference path="fs/promises.d.ts" />
+/// <reference path="http.d.ts" />
+/// <reference path="http2.d.ts" />
+/// <reference path="https.d.ts" />
+/// <reference path="inspector.d.ts" />
+/// <reference path="module.d.ts" />
+/// <reference path="net.d.ts" />
+/// <reference path="os.d.ts" />
+/// <reference path="path.d.ts" />
+/// <reference path="perf_hooks.d.ts" />
+/// <reference path="process.d.ts" />
+/// <reference path="punycode.d.ts" />
+/// <reference path="querystring.d.ts" />
+/// <reference path="readline.d.ts" />
+/// <reference path="readline/promises.d.ts" />
+/// <reference path="repl.d.ts" />
+/// <reference path="stream.d.ts" />
+/// <reference path="stream/promises.d.ts" />
+/// <reference path="stream/consumers.d.ts" />
+/// <reference path="stream/web.d.ts" />
+/// <reference path="string_decoder.d.ts" />
+/// <reference path="test.d.ts" />
+/// <reference path="timers.d.ts" />
+/// <reference path="timers/promises.d.ts" />
+/// <reference path="tls.d.ts" />
+/// <reference path="trace_events.d.ts" />
+/// <reference path="tty.d.ts" />
+/// <reference path="url.d.ts" />
+/// <reference path="util.d.ts" />
+/// <reference path="v8.d.ts" />
+/// <reference path="vm.d.ts" />
+/// <reference path="wasi.d.ts" />
+/// <reference path="worker_threads.d.ts" />
+/// <reference path="zlib.d.ts" />
+
+/// <reference path="globals.global.d.ts" />
diff --git a/node_modules/@types/node/ts4.8/inspector.d.ts b/node_modules/@types/node/ts4.8/inspector.d.ts
new file mode 100755
index 0000000..eba0b55
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/inspector.d.ts
@@ -0,0 +1,2741 @@
+// eslint-disable-next-line dt-header
+// Type definitions for inspector
+
+// These definitions are auto-generated.
+// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
+// for more information.
+
+// tslint:disable:max-line-length
+
+/**
+ * The `inspector` module provides an API for interacting with the V8 inspector.
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * const inspector = require('inspector');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/inspector.js)
+ */
+declare module 'inspector' {
+ import EventEmitter = require('node:events');
+ interface InspectorNotification<T> {
+ method: string;
+ params: T;
+ }
+ namespace Schema {
+ /**
+ * Description of the protocol domain.
+ */
+ interface Domain {
+ /**
+ * Domain name.
+ */
+ name: string;
+ /**
+ * Domain version.
+ */
+ version: string;
+ }
+ interface GetDomainsReturnType {
+ /**
+ * List of supported domains.
+ */
+ domains: Domain[];
+ }
+ }
+ namespace Runtime {
+ /**
+ * Unique script identifier.
+ */
+ type ScriptId = string;
+ /**
+ * Unique object identifier.
+ */
+ type RemoteObjectId = string;
+ /**
+ * Primitive value which cannot be JSON-stringified.
+ */
+ type UnserializableValue = string;
+ /**
+ * Mirror object referencing original JavaScript object.
+ */
+ interface RemoteObject {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * Object class (constructor) name. Specified for <code>object</code> type values only.
+ */
+ className?: string | undefined;
+ /**
+ * Remote object value in case of primitive values or JSON values (if it was requested).
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * Unique object identifier (for non-primitive values).
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
+ * @experimental
+ */
+ preview?: ObjectPreview | undefined;
+ /**
+ * @experimental
+ */
+ customPreview?: CustomPreview | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface CustomPreview {
+ header: string;
+ hasBody: boolean;
+ formatterObjectId: RemoteObjectId;
+ bindRemoteObjectFunctionId: RemoteObjectId;
+ configObjectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Object containing abbreviated remote object value.
+ * @experimental
+ */
+ interface ObjectPreview {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ /**
+ * String representation of the object.
+ */
+ description?: string | undefined;
+ /**
+ * True iff some of the properties or entries of the original object did not fit.
+ */
+ overflow: boolean;
+ /**
+ * List of the properties.
+ */
+ properties: PropertyPreview[];
+ /**
+ * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
+ */
+ entries?: EntryPreview[] | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface PropertyPreview {
+ /**
+ * Property name.
+ */
+ name: string;
+ /**
+ * Object type. Accessor means that the property itself is an accessor property.
+ */
+ type: string;
+ /**
+ * User-friendly property value string.
+ */
+ value?: string | undefined;
+ /**
+ * Nested value preview.
+ */
+ valuePreview?: ObjectPreview | undefined;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string | undefined;
+ }
+ /**
+ * @experimental
+ */
+ interface EntryPreview {
+ /**
+ * Preview of the key. Specified for map-like collection entries.
+ */
+ key?: ObjectPreview | undefined;
+ /**
+ * Preview of the value.
+ */
+ value: ObjectPreview;
+ }
+ /**
+ * Object property descriptor.
+ */
+ interface PropertyDescriptor {
+ /**
+ * Property name or symbol description.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ /**
+ * True if the value associated with the property may be changed (data descriptors only).
+ */
+ writable?: boolean | undefined;
+ /**
+ * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
+ */
+ get?: RemoteObject | undefined;
+ /**
+ * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
+ */
+ set?: RemoteObject | undefined;
+ /**
+ * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
+ */
+ configurable: boolean;
+ /**
+ * True if this property shows up during enumeration of the properties on the corresponding object.
+ */
+ enumerable: boolean;
+ /**
+ * True if the result was thrown during the evaluation.
+ */
+ wasThrown?: boolean | undefined;
+ /**
+ * True if the property is owned for the object.
+ */
+ isOwn?: boolean | undefined;
+ /**
+ * Property symbol object, if the property is of the <code>symbol</code> type.
+ */
+ symbol?: RemoteObject | undefined;
+ }
+ /**
+ * Object internal property descriptor. This property isn't normally visible in JavaScript code.
+ */
+ interface InternalPropertyDescriptor {
+ /**
+ * Conventional property name.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject | undefined;
+ }
+ /**
+ * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
+ */
+ interface CallArgument {
+ /**
+ * Primitive value or serializable javascript object.
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified.
+ */
+ unserializableValue?: UnserializableValue | undefined;
+ /**
+ * Remote object handle.
+ */
+ objectId?: RemoteObjectId | undefined;
+ }
+ /**
+ * Id of an execution context.
+ */
+ type ExecutionContextId = number;
+ /**
+ * Description of an isolated world.
+ */
+ interface ExecutionContextDescription {
+ /**
+ * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
+ */
+ id: ExecutionContextId;
+ /**
+ * Execution context origin.
+ */
+ origin: string;
+ /**
+ * Human readable name describing given context.
+ */
+ name: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ auxData?: {} | undefined;
+ }
+ /**
+ * Detailed information about exception (or error) that was thrown during script compilation or execution.
+ */
+ interface ExceptionDetails {
+ /**
+ * Exception id.
+ */
+ exceptionId: number;
+ /**
+ * Exception text, which should be used together with exception object when available.
+ */
+ text: string;
+ /**
+ * Line number of the exception location (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number of the exception location (0-based).
+ */
+ columnNumber: number;
+ /**
+ * Script ID of the exception location.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * URL of the exception location, to be used when the script was not reported.
+ */
+ url?: string | undefined;
+ /**
+ * JavaScript stack trace if available.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Exception object if available.
+ */
+ exception?: RemoteObject | undefined;
+ /**
+ * Identifier of the context where exception happened.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ /**
+ * Number of milliseconds since epoch.
+ */
+ type Timestamp = number;
+ /**
+ * Stack entry for runtime errors and assertions.
+ */
+ interface CallFrame {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * JavaScript script id.
+ */
+ scriptId: ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * JavaScript script line number (0-based).
+ */
+ lineNumber: number;
+ /**
+ * JavaScript script column number (0-based).
+ */
+ columnNumber: number;
+ }
+ /**
+ * Call frames for assertions or error messages.
+ */
+ interface StackTrace {
+ /**
+ * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
+ */
+ description?: string | undefined;
+ /**
+ * JavaScript function name.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ */
+ parent?: StackTrace | undefined;
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ * @experimental
+ */
+ parentId?: StackTraceId | undefined;
+ }
+ /**
+ * Unique identifier of current debugger.
+ * @experimental
+ */
+ type UniqueDebuggerId = string;
+ /**
+ * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
+ * @experimental
+ */
+ interface StackTraceId {
+ id: string;
+ debuggerId?: UniqueDebuggerId | undefined;
+ }
+ interface EvaluateParameterType {
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ contextId?: ExecutionContextId | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface AwaitPromiseParameterType {
+ /**
+ * Identifier of the promise.
+ */
+ promiseObjectId: RemoteObjectId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface CallFunctionOnParameterType {
+ /**
+ * Declaration of the function to call.
+ */
+ functionDeclaration: string;
+ /**
+ * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
+ */
+ objectId?: RemoteObjectId | undefined;
+ /**
+ * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
+ */
+ arguments?: CallArgument[] | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ /**
+ * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface GetPropertiesParameterType {
+ /**
+ * Identifier of the object to return properties for.
+ */
+ objectId: RemoteObjectId;
+ /**
+ * If true, returns properties belonging only to the element itself, not to its prototype chain.
+ */
+ ownProperties?: boolean | undefined;
+ /**
+ * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
+ * @experimental
+ */
+ accessorPropertiesOnly?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the results.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ }
+ interface ReleaseObjectParameterType {
+ /**
+ * Identifier of the object to release.
+ */
+ objectId: RemoteObjectId;
+ }
+ interface ReleaseObjectGroupParameterType {
+ /**
+ * Symbolic object group name.
+ */
+ objectGroup: string;
+ }
+ interface SetCustomObjectFormatterEnabledParameterType {
+ enabled: boolean;
+ }
+ interface CompileScriptParameterType {
+ /**
+ * Expression to compile.
+ */
+ expression: string;
+ /**
+ * Source url to be set for the script.
+ */
+ sourceURL: string;
+ /**
+ * Specifies whether the compiled script should be persisted.
+ */
+ persistScript: boolean;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface RunScriptParameterType {
+ /**
+ * Id of the script to run.
+ */
+ scriptId: ScriptId;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean | undefined;
+ }
+ interface QueryObjectsParameterType {
+ /**
+ * Identifier of the prototype to return objects for.
+ */
+ prototypeObjectId: RemoteObjectId;
+ }
+ interface GlobalLexicalScopeNamesParameterType {
+ /**
+ * Specifies in which execution context to lookup global scope variables.
+ */
+ executionContextId?: ExecutionContextId | undefined;
+ }
+ interface EvaluateReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface AwaitPromiseReturnType {
+ /**
+ * Promise result. Will contain rejected value if promise was rejected.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details if stack strace is available.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CallFunctionOnReturnType {
+ /**
+ * Call result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface GetPropertiesReturnType {
+ /**
+ * Object properties.
+ */
+ result: PropertyDescriptor[];
+ /**
+ * Internal object properties (only of the element itself).
+ */
+ internalProperties?: InternalPropertyDescriptor[] | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface CompileScriptReturnType {
+ /**
+ * Id of the script.
+ */
+ scriptId?: ScriptId | undefined;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface RunScriptReturnType {
+ /**
+ * Run result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails | undefined;
+ }
+ interface QueryObjectsReturnType {
+ /**
+ * Array with objects.
+ */
+ objects: RemoteObject;
+ }
+ interface GlobalLexicalScopeNamesReturnType {
+ names: string[];
+ }
+ interface ExecutionContextCreatedEventDataType {
+ /**
+ * A newly created execution context.
+ */
+ context: ExecutionContextDescription;
+ }
+ interface ExecutionContextDestroyedEventDataType {
+ /**
+ * Id of the destroyed context
+ */
+ executionContextId: ExecutionContextId;
+ }
+ interface ExceptionThrownEventDataType {
+ /**
+ * Timestamp of the exception.
+ */
+ timestamp: Timestamp;
+ exceptionDetails: ExceptionDetails;
+ }
+ interface ExceptionRevokedEventDataType {
+ /**
+ * Reason describing why exception was revoked.
+ */
+ reason: string;
+ /**
+ * The id of revoked exception, as reported in <code>exceptionThrown</code>.
+ */
+ exceptionId: number;
+ }
+ interface ConsoleAPICalledEventDataType {
+ /**
+ * Type of the call.
+ */
+ type: string;
+ /**
+ * Call arguments.
+ */
+ args: RemoteObject[];
+ /**
+ * Identifier of the context where the call was made.
+ */
+ executionContextId: ExecutionContextId;
+ /**
+ * Call timestamp.
+ */
+ timestamp: Timestamp;
+ /**
+ * Stack trace captured when the call was made.
+ */
+ stackTrace?: StackTrace | undefined;
+ /**
+ * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
+ * @experimental
+ */
+ context?: string | undefined;
+ }
+ interface InspectRequestedEventDataType {
+ object: RemoteObject;
+ hints: {};
+ }
+ }
+ namespace Debugger {
+ /**
+ * Breakpoint identifier.
+ */
+ type BreakpointId = string;
+ /**
+ * Call frame identifier.
+ */
+ type CallFrameId = string;
+ /**
+ * Location in the source code.
+ */
+ interface Location {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ }
+ /**
+ * Location in the source code.
+ * @experimental
+ */
+ interface ScriptPosition {
+ lineNumber: number;
+ columnNumber: number;
+ }
+ /**
+ * JavaScript call frame. Array of call frames form the call stack.
+ */
+ interface CallFrame {
+ /**
+ * Call frame identifier. This identifier is only valid while the virtual machine is paused.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Name of the JavaScript function called on this call frame.
+ */
+ functionName: string;
+ /**
+ * Location in the source code.
+ */
+ functionLocation?: Location | undefined;
+ /**
+ * Location in the source code.
+ */
+ location: Location;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Scope chain for this call frame.
+ */
+ scopeChain: Scope[];
+ /**
+ * <code>this</code> object for this call frame.
+ */
+ this: Runtime.RemoteObject;
+ /**
+ * The value being returned, if the function is at return point.
+ */
+ returnValue?: Runtime.RemoteObject | undefined;
+ }
+ /**
+ * Scope description.
+ */
+ interface Scope {
+ /**
+ * Scope type.
+ */
+ type: string;
+ /**
+ * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
+ */
+ object: Runtime.RemoteObject;
+ name?: string | undefined;
+ /**
+ * Location in the source code where scope starts
+ */
+ startLocation?: Location | undefined;
+ /**
+ * Location in the source code where scope ends
+ */
+ endLocation?: Location | undefined;
+ }
+ /**
+ * Search match for resource.
+ */
+ interface SearchMatch {
+ /**
+ * Line number in resource content.
+ */
+ lineNumber: number;
+ /**
+ * Line with match content.
+ */
+ lineContent: string;
+ }
+ interface BreakLocation {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number | undefined;
+ type?: string | undefined;
+ }
+ interface SetBreakpointsActiveParameterType {
+ /**
+ * New value for breakpoints active state.
+ */
+ active: boolean;
+ }
+ interface SetSkipAllPausesParameterType {
+ /**
+ * New value for skip pauses state.
+ */
+ skip: boolean;
+ }
+ interface SetBreakpointByUrlParameterType {
+ /**
+ * Line number to set breakpoint at.
+ */
+ lineNumber: number;
+ /**
+ * URL of the resources to set breakpoint on.
+ */
+ url?: string | undefined;
+ /**
+ * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
+ */
+ urlRegex?: string | undefined;
+ /**
+ * Script hash of the resources to set breakpoint on.
+ */
+ scriptHash?: string | undefined;
+ /**
+ * Offset in the line to set breakpoint at.
+ */
+ columnNumber?: number | undefined;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface SetBreakpointParameterType {
+ /**
+ * Location to set breakpoint in.
+ */
+ location: Location;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string | undefined;
+ }
+ interface RemoveBreakpointParameterType {
+ breakpointId: BreakpointId;
+ }
+ interface GetPossibleBreakpointsParameterType {
+ /**
+ * Start of range to search possible breakpoint locations in.
+ */
+ start: Location;
+ /**
+ * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
+ */
+ end?: Location | undefined;
+ /**
+ * Only consider locations which are in the same (non-nested) function as start.
+ */
+ restrictToFunction?: boolean | undefined;
+ }
+ interface ContinueToLocationParameterType {
+ /**
+ * Location to continue to.
+ */
+ location: Location;
+ targetCallFrames?: string | undefined;
+ }
+ interface PauseOnAsyncCallParameterType {
+ /**
+ * Debugger will pause when async call with given stack trace is started.
+ */
+ parentStackTraceId: Runtime.StackTraceId;
+ }
+ interface StepIntoParameterType {
+ /**
+ * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
+ * @experimental
+ */
+ breakOnAsyncCall?: boolean | undefined;
+ }
+ interface GetStackTraceParameterType {
+ stackTraceId: Runtime.StackTraceId;
+ }
+ interface SearchInContentParameterType {
+ /**
+ * Id of the script to search in.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * String to search for.
+ */
+ query: string;
+ /**
+ * If true, search is case sensitive.
+ */
+ caseSensitive?: boolean | undefined;
+ /**
+ * If true, treats string parameter as regex.
+ */
+ isRegex?: boolean | undefined;
+ }
+ interface SetScriptSourceParameterType {
+ /**
+ * Id of the script to edit.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * New content of the script.
+ */
+ scriptSource: string;
+ /**
+ * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
+ */
+ dryRun?: boolean | undefined;
+ }
+ interface RestartFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface GetScriptSourceParameterType {
+ /**
+ * Id of the script to get source for.
+ */
+ scriptId: Runtime.ScriptId;
+ }
+ interface SetPauseOnExceptionsParameterType {
+ /**
+ * Pause on exceptions mode.
+ */
+ state: string;
+ }
+ interface EvaluateOnCallFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
+ */
+ objectGroup?: string | undefined;
+ /**
+ * Specifies whether command line API should be available to the evaluated expression, defaults to false.
+ */
+ includeCommandLineAPI?: boolean | undefined;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean | undefined;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean | undefined;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean | undefined;
+ /**
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ */
+ throwOnSideEffect?: boolean | undefined;
+ }
+ interface SetVariableValueParameterType {
+ /**
+ * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
+ */
+ scopeNumber: number;
+ /**
+ * Variable name.
+ */
+ variableName: string;
+ /**
+ * New variable value.
+ */
+ newValue: Runtime.CallArgument;
+ /**
+ * Id of callframe that holds variable.
+ */
+ callFrameId: CallFrameId;
+ }
+ interface SetReturnValueParameterType {
+ /**
+ * New return value.
+ */
+ newValue: Runtime.CallArgument;
+ }
+ interface SetAsyncCallStackDepthParameterType {
+ /**
+ * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
+ */
+ maxDepth: number;
+ }
+ interface SetBlackboxPatternsParameterType {
+ /**
+ * Array of regexps that will be used to check script url for blackbox state.
+ */
+ patterns: string[];
+ }
+ interface SetBlackboxedRangesParameterType {
+ /**
+ * Id of the script.
+ */
+ scriptId: Runtime.ScriptId;
+ positions: ScriptPosition[];
+ }
+ interface EnableReturnType {
+ /**
+ * Unique identifier of the debugger.
+ * @experimental
+ */
+ debuggerId: Runtime.UniqueDebuggerId;
+ }
+ interface SetBreakpointByUrlReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * List of the locations this breakpoint resolved into upon addition.
+ */
+ locations: Location[];
+ }
+ interface SetBreakpointReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Location this breakpoint resolved into.
+ */
+ actualLocation: Location;
+ }
+ interface GetPossibleBreakpointsReturnType {
+ /**
+ * List of the possible breakpoint locations.
+ */
+ locations: BreakLocation[];
+ }
+ interface GetStackTraceReturnType {
+ stackTrace: Runtime.StackTrace;
+ }
+ interface SearchInContentReturnType {
+ /**
+ * List of search matches.
+ */
+ result: SearchMatch[];
+ }
+ interface SetScriptSourceReturnType {
+ /**
+ * New stack trace in case editing has happened while VM was stopped.
+ */
+ callFrames?: CallFrame[] | undefined;
+ /**
+ * Whether current call stack was modified after applying the changes.
+ */
+ stackChanged?: boolean | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Exception details if any.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface RestartFrameReturnType {
+ /**
+ * New stack trace.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ interface GetScriptSourceReturnType {
+ /**
+ * Script source.
+ */
+ scriptSource: string;
+ }
+ interface EvaluateOnCallFrameReturnType {
+ /**
+ * Object wrapper for the evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails | undefined;
+ }
+ interface ScriptParsedEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * True, if this script is generated as a result of the live edit operation.
+ * @experimental
+ */
+ isLiveEdit?: boolean | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface ScriptFailedToParseEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {} | undefined;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string | undefined;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean | undefined;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean | undefined;
+ /**
+ * This script length.
+ */
+ length?: number | undefined;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace | undefined;
+ }
+ interface BreakpointResolvedEventDataType {
+ /**
+ * Breakpoint unique identifier.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Actual breakpoint location.
+ */
+ location: Location;
+ }
+ interface PausedEventDataType {
+ /**
+ * Call stack the virtual machine stopped on.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Pause reason.
+ */
+ reason: string;
+ /**
+ * Object containing break-specific auxiliary properties.
+ */
+ data?: {} | undefined;
+ /**
+ * Hit breakpoints IDs
+ */
+ hitBreakpoints?: string[] | undefined;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace | undefined;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId | undefined;
+ /**
+ * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
+ * @experimental
+ */
+ asyncCallStackTraceId?: Runtime.StackTraceId | undefined;
+ }
+ }
+ namespace Console {
+ /**
+ * Console message.
+ */
+ interface ConsoleMessage {
+ /**
+ * Message source.
+ */
+ source: string;
+ /**
+ * Message severity.
+ */
+ level: string;
+ /**
+ * Message text.
+ */
+ text: string;
+ /**
+ * URL of the message origin.
+ */
+ url?: string | undefined;
+ /**
+ * Line number in the resource that generated this message (1-based).
+ */
+ line?: number | undefined;
+ /**
+ * Column number in the resource that generated this message (1-based).
+ */
+ column?: number | undefined;
+ }
+ interface MessageAddedEventDataType {
+ /**
+ * Console message that has been added.
+ */
+ message: ConsoleMessage;
+ }
+ }
+ namespace Profiler {
+ /**
+ * Profile node. Holds callsite information, execution statistics and child nodes.
+ */
+ interface ProfileNode {
+ /**
+ * Unique id of the node.
+ */
+ id: number;
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Number of samples where this node was on top of the call stack.
+ */
+ hitCount?: number | undefined;
+ /**
+ * Child node ids.
+ */
+ children?: number[] | undefined;
+ /**
+ * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
+ */
+ deoptReason?: string | undefined;
+ /**
+ * An array of source position ticks.
+ */
+ positionTicks?: PositionTickInfo[] | undefined;
+ }
+ /**
+ * Profile.
+ */
+ interface Profile {
+ /**
+ * The list of profile nodes. First item is the root node.
+ */
+ nodes: ProfileNode[];
+ /**
+ * Profiling start timestamp in microseconds.
+ */
+ startTime: number;
+ /**
+ * Profiling end timestamp in microseconds.
+ */
+ endTime: number;
+ /**
+ * Ids of samples top nodes.
+ */
+ samples?: number[] | undefined;
+ /**
+ * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
+ */
+ timeDeltas?: number[] | undefined;
+ }
+ /**
+ * Specifies a number of samples attributed to a certain source position.
+ */
+ interface PositionTickInfo {
+ /**
+ * Source line number (1-based).
+ */
+ line: number;
+ /**
+ * Number of samples attributed to the source line.
+ */
+ ticks: number;
+ }
+ /**
+ * Coverage data for a source range.
+ */
+ interface CoverageRange {
+ /**
+ * JavaScript script source offset for the range start.
+ */
+ startOffset: number;
+ /**
+ * JavaScript script source offset for the range end.
+ */
+ endOffset: number;
+ /**
+ * Collected execution count of the source range.
+ */
+ count: number;
+ }
+ /**
+ * Coverage data for a JavaScript function.
+ */
+ interface FunctionCoverage {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * Source ranges inside the function with coverage data.
+ */
+ ranges: CoverageRange[];
+ /**
+ * Whether coverage data for this function has block granularity.
+ */
+ isBlockCoverage: boolean;
+ }
+ /**
+ * Coverage data for a JavaScript script.
+ */
+ interface ScriptCoverage {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Functions contained in the script that has coverage data.
+ */
+ functions: FunctionCoverage[];
+ }
+ /**
+ * Describes a type collected during runtime.
+ * @experimental
+ */
+ interface TypeObject {
+ /**
+ * Name of a type collected with type profiling.
+ */
+ name: string;
+ }
+ /**
+ * Source offset and types for a parameter or return value.
+ * @experimental
+ */
+ interface TypeProfileEntry {
+ /**
+ * Source offset of the parameter or end of function for return values.
+ */
+ offset: number;
+ /**
+ * The types for this parameter or return value.
+ */
+ types: TypeObject[];
+ }
+ /**
+ * Type profile data collected during runtime for a JavaScript script.
+ * @experimental
+ */
+ interface ScriptTypeProfile {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Type profile entries for parameters and return values of the functions in the script.
+ */
+ entries: TypeProfileEntry[];
+ }
+ interface SetSamplingIntervalParameterType {
+ /**
+ * New sampling interval in microseconds.
+ */
+ interval: number;
+ }
+ interface StartPreciseCoverageParameterType {
+ /**
+ * Collect accurate call counts beyond simple 'covered' or 'not covered'.
+ */
+ callCount?: boolean | undefined;
+ /**
+ * Collect block-based coverage.
+ */
+ detailed?: boolean | undefined;
+ }
+ interface StopReturnType {
+ /**
+ * Recorded profile.
+ */
+ profile: Profile;
+ }
+ interface TakePreciseCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface GetBestEffortCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+ interface TakeTypeProfileReturnType {
+ /**
+ * Type profile for all scripts since startTypeProfile() was turned on.
+ */
+ result: ScriptTypeProfile[];
+ }
+ interface ConsoleProfileStartedEventDataType {
+ id: string;
+ /**
+ * Location of console.profile().
+ */
+ location: Debugger.Location;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ interface ConsoleProfileFinishedEventDataType {
+ id: string;
+ /**
+ * Location of console.profileEnd().
+ */
+ location: Debugger.Location;
+ profile: Profile;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string | undefined;
+ }
+ }
+ namespace HeapProfiler {
+ /**
+ * Heap snapshot object id.
+ */
+ type HeapSnapshotObjectId = string;
+ /**
+ * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+ */
+ interface SamplingHeapProfileNode {
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Allocations size in bytes for the node excluding children.
+ */
+ selfSize: number;
+ /**
+ * Child nodes.
+ */
+ children: SamplingHeapProfileNode[];
+ }
+ /**
+ * Profile.
+ */
+ interface SamplingHeapProfile {
+ head: SamplingHeapProfileNode;
+ }
+ interface StartTrackingHeapObjectsParameterType {
+ trackAllocations?: boolean | undefined;
+ }
+ interface StopTrackingHeapObjectsParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface TakeHeapSnapshotParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+ */
+ reportProgress?: boolean | undefined;
+ }
+ interface GetObjectByHeapObjectIdParameterType {
+ objectId: HeapSnapshotObjectId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string | undefined;
+ }
+ interface AddInspectedHeapObjectParameterType {
+ /**
+ * Heap snapshot object id to be accessible by means of $x command line API.
+ */
+ heapObjectId: HeapSnapshotObjectId;
+ }
+ interface GetHeapObjectIdParameterType {
+ /**
+ * Identifier of the object to get heap object id for.
+ */
+ objectId: Runtime.RemoteObjectId;
+ }
+ interface StartSamplingParameterType {
+ /**
+ * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
+ */
+ samplingInterval?: number | undefined;
+ }
+ interface GetObjectByHeapObjectIdReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ }
+ interface GetHeapObjectIdReturnType {
+ /**
+ * Id of the heap snapshot object corresponding to the passed remote object id.
+ */
+ heapSnapshotObjectId: HeapSnapshotObjectId;
+ }
+ interface StopSamplingReturnType {
+ /**
+ * Recorded sampling heap profile.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface GetSamplingProfileReturnType {
+ /**
+ * Return the sampling profile being collected.
+ */
+ profile: SamplingHeapProfile;
+ }
+ interface AddHeapSnapshotChunkEventDataType {
+ chunk: string;
+ }
+ interface ReportHeapSnapshotProgressEventDataType {
+ done: number;
+ total: number;
+ finished?: boolean | undefined;
+ }
+ interface LastSeenObjectIdEventDataType {
+ lastSeenObjectId: number;
+ timestamp: number;
+ }
+ interface HeapStatsUpdateEventDataType {
+ /**
+ * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
+ */
+ statsUpdate: number[];
+ }
+ }
+ namespace NodeTracing {
+ interface TraceConfig {
+ /**
+ * Controls how the trace buffer stores data.
+ */
+ recordMode?: string | undefined;
+ /**
+ * Included category filters.
+ */
+ includedCategories: string[];
+ }
+ interface StartParameterType {
+ traceConfig: TraceConfig;
+ }
+ interface GetCategoriesReturnType {
+ /**
+ * A list of supported tracing categories.
+ */
+ categories: string[];
+ }
+ interface DataCollectedEventDataType {
+ value: Array<{}>;
+ }
+ }
+ namespace NodeWorker {
+ type WorkerID = string;
+ /**
+ * Unique identifier of attached debugging session.
+ */
+ type SessionID = string;
+ interface WorkerInfo {
+ workerId: WorkerID;
+ type: string;
+ title: string;
+ url: string;
+ }
+ interface SendMessageToWorkerParameterType {
+ message: string;
+ /**
+ * Identifier of the session.
+ */
+ sessionId: SessionID;
+ }
+ interface EnableParameterType {
+ /**
+ * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+ * message to run them.
+ */
+ waitForDebuggerOnStart: boolean;
+ }
+ interface DetachParameterType {
+ sessionId: SessionID;
+ }
+ interface AttachedToWorkerEventDataType {
+ /**
+ * Identifier assigned to the session used to send/receive messages.
+ */
+ sessionId: SessionID;
+ workerInfo: WorkerInfo;
+ waitingForDebugger: boolean;
+ }
+ interface DetachedFromWorkerEventDataType {
+ /**
+ * Detached session identifier.
+ */
+ sessionId: SessionID;
+ }
+ interface ReceivedMessageFromWorkerEventDataType {
+ /**
+ * Identifier of a session which sends a message.
+ */
+ sessionId: SessionID;
+ message: string;
+ }
+ }
+ namespace NodeRuntime {
+ interface NotifyWhenWaitingForDisconnectParameterType {
+ enabled: boolean;
+ }
+ }
+ /**
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
+ * back-end and receiving message responses and notifications.
+ */
+ class Session extends EventEmitter {
+ /**
+ * Create a new instance of the inspector.Session class.
+ * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
+ */
+ constructor();
+ /**
+ * Connects a session to the inspector back-end.
+ * @since v8.0.0
+ */
+ connect(): void;
+ /**
+ * Immediately close the session. All pending message callbacks will be called
+ * with an error. `session.connect()` will need to be called to be able to send
+ * messages again. Reconnected session will lose all inspector state, such as
+ * enabled agents or configured breakpoints.
+ * @since v8.0.0
+ */
+ disconnect(): void;
+ /**
+ * Posts a message to the inspector back-end. `callback` will be notified when
+ * a response is received. `callback` is a function that accepts two optional
+ * arguments: error and message-specific result.
+ *
+ * ```js
+ * session.post('Runtime.evaluate', { expression: '2 + 2' },
+ * (error, { result }) => console.log(result));
+ * // Output: { type: 'number', value: 4, description: '4' }
+ * ```
+ *
+ * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
+ *
+ * Node.js inspector supports all the Chrome DevTools Protocol domains declared
+ * by V8\. Chrome DevTools Protocol domain provides an interface for interacting
+ * with one of the runtime agents used to inspect the application state and listen
+ * to the run-time events.
+ *
+ * ## Example usage
+ *
+ * Apart from the debugger, various V8 Profilers are available through the DevTools
+ * protocol.
+ * @since v8.0.0
+ */
+ post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
+ post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
+ /**
+ * Returns supported domains.
+ */
+ post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
+ /**
+ * Evaluates expression on global object.
+ */
+ post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ /**
+ * Add handler to promise with given promise object id.
+ */
+ post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ /**
+ * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ /**
+ * Returns properties of a given object. Object group of the result is inherited from the target object.
+ */
+ post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ /**
+ * Releases remote object with given id.
+ */
+ post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void;
+ /**
+ * Releases all remote objects that belong to a given group.
+ */
+ post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void;
+ /**
+ * Tells inspected instance to run if it was waiting for debugger to attach.
+ */
+ post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
+ */
+ post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables reporting of execution contexts creation.
+ */
+ post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Discards collected exceptions and console API calls.
+ */
+ post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void;
+ /**
+ * Compiles expression.
+ */
+ post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ /**
+ * Runs script with given id in a given context.
+ */
+ post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ /**
+ * Returns all let, const and class variables from global scope.
+ */
+ post(
+ method: 'Runtime.globalLexicalScopeNames',
+ params?: Runtime.GlobalLexicalScopeNamesParameterType,
+ callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
+ ): void;
+ post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
+ /**
+ * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
+ */
+ post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
+ /**
+ * Disables debugger for given page.
+ */
+ post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Activates / deactivates all breakpoints on the page.
+ */
+ post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+ */
+ post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void;
+ /**
+ * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
+ */
+ post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ /**
+ * Sets JavaScript breakpoint at a given location.
+ */
+ post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ /**
+ * Removes JavaScript breakpoint.
+ */
+ post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
+ */
+ post(
+ method: 'Debugger.getPossibleBreakpoints',
+ params?: Debugger.GetPossibleBreakpointsParameterType,
+ callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
+ ): void;
+ post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
+ /**
+ * Continues execution until specific location is reached.
+ */
+ post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void;
+ /**
+ * @experimental
+ */
+ post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps over the statement.
+ */
+ post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps into the function call.
+ */
+ post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void;
+ /**
+ * Steps out of the function call.
+ */
+ post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void;
+ /**
+ * Stops on the next JavaScript statement.
+ */
+ post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void;
+ /**
+ * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
+ * @experimental
+ */
+ post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void;
+ /**
+ * Resumes JavaScript execution.
+ */
+ post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void;
+ /**
+ * Returns stack trace with given <code>stackTraceId</code>.
+ * @experimental
+ */
+ post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ /**
+ * Searches for given string in script content.
+ */
+ post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ /**
+ * Edits JavaScript source live.
+ */
+ post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ /**
+ * Restarts particular call frame from the beginning.
+ */
+ post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ /**
+ * Returns source for the script with given id.
+ */
+ post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ /**
+ * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
+ */
+ post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void;
+ /**
+ * Evaluates expression on a given call frame.
+ */
+ post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ /**
+ * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
+ */
+ post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes return value in top frame. Available only at return break position.
+ * @experimental
+ */
+ post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables or disables async call stacks tracking.
+ */
+ post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void;
+ /**
+ * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void;
+ /**
+ * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
+ * @experimental
+ */
+ post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void;
+ /**
+ * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
+ */
+ post(method: 'Console.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Disables console domain, prevents further console messages from being reported to the client.
+ */
+ post(method: 'Console.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Does nothing.
+ */
+ post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+ */
+ post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.start', callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
+ /**
+ * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
+ */
+ post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
+ */
+ post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
+ */
+ post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
+ /**
+ * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
+ */
+ post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
+ /**
+ * Enable type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Disable type profile. Disabling releases type profile data collected so far.
+ * @experimental
+ */
+ post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void;
+ /**
+ * Collect type profile.
+ * @experimental
+ */
+ post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
+ post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void;
+ post(
+ method: 'HeapProfiler.getObjectByHeapObjectId',
+ params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
+ callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
+ ): void;
+ post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
+ /**
+ * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
+ */
+ post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void;
+ post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
+ post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
+ /**
+ * Gets supported tracing categories.
+ */
+ post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
+ /**
+ * Start trace events collection.
+ */
+ post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void;
+ /**
+ * Stop trace events collection. Remaining collected events will be sent as a sequence of
+ * dataCollected events followed by tracingComplete event.
+ */
+ post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void;
+ /**
+ * Sends protocol message over session with given id.
+ */
+ post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void;
+ /**
+ * Instructs the inspector to attach to running workers. Will also attach to new workers
+ * as they start
+ */
+ post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detaches from all running workers and disables attaching to new workers as they are started.
+ */
+ post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void;
+ /**
+ * Detached from the worker with given sessionId.
+ */
+ post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void;
+ /**
+ * Enable the `NodeRuntime.waitingForDisconnect`.
+ */
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
+ // Events
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ addListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ addListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean;
+ emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+ emit(event: 'Runtime.executionContextsCleared'): boolean;
+ emit(event: 'Runtime.exceptionThrown', message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+ emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+ emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+ emit(event: 'Runtime.inspectRequested', message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptParsed', message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+ emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+ emit(event: 'Debugger.breakpointResolved', message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+ emit(event: 'Debugger.paused', message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+ emit(event: 'Debugger.resumed'): boolean;
+ emit(event: 'Console.messageAdded', message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+ emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+ emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+ emit(event: 'HeapProfiler.resetProfiles'): boolean;
+ emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+ emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+ emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+ emit(event: 'NodeTracing.dataCollected', message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+ emit(event: 'NodeTracing.tracingComplete'): boolean;
+ emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+ emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ on(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ on(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ on(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ on(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ on(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ on(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ once(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ once(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ once(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ once(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ once(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ once(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this;
+ /**
+ * Issued when new execution context is created.
+ */
+ prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this;
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+ /**
+ * Issued when console API was called.
+ */
+ prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependOnceListener(event: 'Debugger.resumed', listener: () => void): this;
+ /**
+ * Issued when new console message is added.
+ */
+ prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+ prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this;
+ prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this;
+ /**
+ * Issued when attached to a worker.
+ */
+ prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+ /**
+ * Issued when detached from the worker.
+ */
+ prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this;
+ }
+ /**
+ * Activate inspector on host and port. Equivalent to`node --inspect=[[host:]port]`, but can be done programmatically after node has
+ * started.
+ *
+ * If wait is `true`, will block until a client has connected to the inspect port
+ * and flow control has been passed to the debugger client.
+ *
+ * See the `security warning` regarding the `host`parameter usage.
+ * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional.
+ * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional.
+ * @param [wait=false] Block until a client has connected. Optional.
+ */
+ function open(port?: number, host?: string, wait?: boolean): void;
+ /**
+ * Deactivate the inspector. Blocks until there are no active connections.
+ */
+ function close(): void;
+ /**
+ * Return the URL of the active inspector, or `undefined` if there is none.
+ *
+ * ```console
+ * $ node --inspect -p 'inspector.url()'
+ * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+ *
+ * $ node --inspect=localhost:3000 -p 'inspector.url()'
+ * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ * For help, see: https://nodejs.org/en/docs/inspector
+ * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+ *
+ * $ node -p 'inspector.url()'
+ * undefined
+ * ```
+ */
+ function url(): string | undefined;
+ /**
+ * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command.
+ *
+ * An exception will be thrown if there is no active inspector.
+ * @since v12.7.0
+ */
+ function waitForDebugger(): void;
+}
+/**
+ * The inspector module provides an API for interacting with the V8 inspector.
+ */
+declare module 'node:inspector' {
+ import inspector = require('inspector');
+ export = inspector;
+}
diff --git a/node_modules/@types/node/ts4.8/module.d.ts b/node_modules/@types/node/ts4.8/module.d.ts
new file mode 100755
index 0000000..d83aec9
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/module.d.ts
@@ -0,0 +1,114 @@
+/**
+ * @since v0.3.7
+ */
+declare module 'module' {
+ import { URL } from 'node:url';
+ namespace Module {
+ /**
+ * The `module.syncBuiltinESMExports()` method updates all the live bindings for
+ * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
+ * does not add or remove exported names from the `ES Modules`.
+ *
+ * ```js
+ * const fs = require('fs');
+ * const assert = require('assert');
+ * const { syncBuiltinESMExports } = require('module');
+ *
+ * fs.readFile = newAPI;
+ *
+ * delete fs.readFileSync;
+ *
+ * function newAPI() {
+ * // ...
+ * }
+ *
+ * fs.newAPI = newAPI;
+ *
+ * syncBuiltinESMExports();
+ *
+ * import('fs').then((esmFS) => {
+ * // It syncs the existing readFile property with the new value
+ * assert.strictEqual(esmFS.readFile, newAPI);
+ * // readFileSync has been deleted from the required fs
+ * assert.strictEqual('readFileSync' in fs, false);
+ * // syncBuiltinESMExports() does not remove readFileSync from esmFS
+ * assert.strictEqual('readFileSync' in esmFS, true);
+ * // syncBuiltinESMExports() does not add names
+ * assert.strictEqual(esmFS.newAPI, undefined);
+ * });
+ * ```
+ * @since v12.12.0
+ */
+ function syncBuiltinESMExports(): void;
+ /**
+ * `path` is the resolved path for the file for which a corresponding source map
+ * should be fetched.
+ * @since v13.7.0, v12.17.0
+ */
+ function findSourceMap(path: string, error?: Error): SourceMap;
+ interface SourceMapPayload {
+ file: string;
+ version: number;
+ sources: string[];
+ sourcesContent: string[];
+ names: string[];
+ mappings: string;
+ sourceRoot: string;
+ }
+ interface SourceMapping {
+ generatedLine: number;
+ generatedColumn: number;
+ originalSource: string;
+ originalLine: number;
+ originalColumn: number;
+ }
+ /**
+ * @since v13.7.0, v12.17.0
+ */
+ class SourceMap {
+ /**
+ * Getter for the payload used to construct the `SourceMap` instance.
+ */
+ readonly payload: SourceMapPayload;
+ constructor(payload: SourceMapPayload);
+ /**
+ * Given a line number and column number in the generated source file, returns
+ * an object representing the position in the original file. The object returned
+ * consists of the following keys:
+ */
+ findEntry(line: number, column: number): SourceMapping;
+ }
+ }
+ interface Module extends NodeModule {}
+ class Module {
+ static runMain(): void;
+ static wrap(code: string): string;
+ static createRequire(path: string | URL): NodeRequire;
+ static builtinModules: string[];
+ static Module: typeof Module;
+ constructor(id: string, parent?: Module);
+ }
+ global {
+ interface ImportMeta {
+ url: string;
+ /**
+ * @experimental
+ * This feature is only available with the `--experimental-import-meta-resolve`
+ * command flag enabled.
+ *
+ * Provides a module-relative resolution function scoped to each module, returning
+ * the URL string.
+ *
+ * @param specified The module specifier to resolve relative to `parent`.
+ * @param parent The absolute parent module URL to resolve from. If none
+ * is specified, the value of `import.meta.url` is used as the default.
+ */
+ resolve?(specified: string, parent?: string | URL): Promise<string>;
+ }
+ }
+ export = Module;
+}
+declare module 'node:module' {
+ import module = require('module');
+ export = module;
+}
diff --git a/node_modules/@types/node/ts4.8/net.d.ts b/node_modules/@types/node/ts4.8/net.d.ts
new file mode 100755
index 0000000..eaa08bc
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/net.d.ts
@@ -0,0 +1,838 @@
+/**
+ * > Stability: 2 - Stable
+ *
+ * The `net` module provides an asynchronous network API for creating stream-based
+ * TCP or `IPC` servers ({@link createServer}) and clients
+ * ({@link createConnection}).
+ *
+ * It can be accessed using:
+ *
+ * ```js
+ * const net = require('net');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js)
+ */
+declare module 'net' {
+ import * as stream from 'node:stream';
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as dns from 'node:dns';
+ type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+ interface SocketConstructorOpts {
+ fd?: number | undefined;
+ allowHalfOpen?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ signal?: AbortSignal;
+ }
+ interface OnReadOpts {
+ buffer: Uint8Array | (() => Uint8Array);
+ /**
+ * This function is called for every chunk of incoming data.
+ * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
+ * Return false from this function to implicitly pause() the socket.
+ */
+ callback(bytesWritten: number, buf: Uint8Array): boolean;
+ }
+ interface ConnectOpts {
+ /**
+ * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
+ * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
+ * still be emitted as normal and methods like pause() and resume() will also behave as expected.
+ */
+ onread?: OnReadOpts | undefined;
+ }
+ interface TcpSocketConnectOpts extends ConnectOpts {
+ port: number;
+ host?: string | undefined;
+ localAddress?: string | undefined;
+ localPort?: number | undefined;
+ hints?: number | undefined;
+ family?: number | undefined;
+ lookup?: LookupFunction | undefined;
+ noDelay?: boolean | undefined;
+ keepAlive?: boolean | undefined;
+ keepAliveInitialDelay?: number | undefined;
+ }
+ interface IpcSocketConnectOpts extends ConnectOpts {
+ path: string;
+ }
+ type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
+ /**
+ * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
+ * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
+ * an `EventEmitter`.
+ *
+ * A `net.Socket` can be created by the user and used directly to interact with
+ * a server. For example, it is returned by {@link createConnection},
+ * so the user can use it to talk to the server.
+ *
+ * It can also be created by Node.js and passed to the user when a connection
+ * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
+ * it to interact with the client.
+ * @since v0.3.4
+ */
+ class Socket extends stream.Duplex {
+ constructor(options?: SocketConstructorOpts);
+ /**
+ * Sends data on the socket. The second parameter specifies the encoding in the
+ * case of a string. It defaults to UTF8 encoding.
+ *
+ * Returns `true` if the entire data was flushed successfully to the kernel
+ * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
+ *
+ * The optional `callback` parameter will be executed when the data is finally
+ * written out, which may not be immediately.
+ *
+ * See `Writable` stream `write()` method for more
+ * information.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ */
+ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
+ write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
+ /**
+ * Initiate a connection on a given socket.
+ *
+ * Possible signatures:
+ *
+ * * `socket.connect(options[, connectListener])`
+ * * `socket.connect(path[, connectListener])` for `IPC` connections.
+ * * `socket.connect(port[, host][, connectListener])` for TCP connections.
+ * * Returns: `net.Socket` The socket itself.
+ *
+ * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
+ * instead of a `'connect'` event, an `'error'` event will be emitted with
+ * the error passed to the `'error'` listener.
+ * The last parameter `connectListener`, if supplied, will be added as a listener
+ * for the `'connect'` event **once**.
+ *
+ * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
+ * behavior.
+ */
+ connect(options: SocketConnectOpts, connectionListener?: () => void): this;
+ connect(port: number, host: string, connectionListener?: () => void): this;
+ connect(port: number, connectionListener?: () => void): this;
+ connect(path: string, connectionListener?: () => void): this;
+ /**
+ * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setEncoding(encoding?: BufferEncoding): this;
+ /**
+ * Pauses the reading of data. That is, `'data'` events will not be emitted.
+ * Useful to throttle back an upload.
+ * @return The socket itself.
+ */
+ pause(): this;
+ /**
+ * Resumes reading after a call to `socket.pause()`.
+ * @return The socket itself.
+ */
+ resume(): this;
+ /**
+ * Sets the socket to timeout after `timeout` milliseconds of inactivity on
+ * the socket. By default `net.Socket` do not have a timeout.
+ *
+ * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
+ * end the connection.
+ *
+ * ```js
+ * socket.setTimeout(3000);
+ * socket.on('timeout', () => {
+ * console.log('socket timeout');
+ * socket.end();
+ * });
+ * ```
+ *
+ * If `timeout` is 0, then the existing idle timeout is disabled.
+ *
+ * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
+ * @since v0.1.90
+ * @return The socket itself.
+ */
+ setTimeout(timeout: number, callback?: () => void): this;
+ /**
+ * Enable/disable the use of Nagle's algorithm.
+ *
+ * When a TCP connection is created, it will have Nagle's algorithm enabled.
+ *
+ * Nagle's algorithm delays data before it is sent via the network. It attempts
+ * to optimize throughput at the expense of latency.
+ *
+ * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
+ * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
+ * algorithm.
+ * @since v0.1.90
+ * @param [noDelay=true]
+ * @return The socket itself.
+ */
+ setNoDelay(noDelay?: boolean): this;
+ /**
+ * Enable/disable keep-alive functionality, and optionally set the initial
+ * delay before the first keepalive probe is sent on an idle socket.
+ *
+ * Set `initialDelay` (in milliseconds) to set the delay between the last
+ * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
+ * (or previous) setting.
+ *
+ * Enabling the keep-alive functionality will set the following socket options:
+ *
+ * * `SO_KEEPALIVE=1`
+ * * `TCP_KEEPIDLE=initialDelay`
+ * * `TCP_KEEPCNT=10`
+ * * `TCP_KEEPINTVL=1`
+ * @since v0.1.92
+ * @param [enable=false]
+ * @param [initialDelay=0]
+ * @return The socket itself.
+ */
+ setKeepAlive(enable?: boolean, initialDelay?: number): this;
+ /**
+ * Returns the bound `address`, the address `family` name and `port` of the
+ * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
+ * @since v0.1.90
+ */
+ address(): AddressInfo | {};
+ /**
+ * Calling `unref()` on a socket will allow the program to exit if this is the only
+ * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ unref(): this;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
+ * If the socket is `ref`ed calling `ref` again will have no effect.
+ * @since v0.9.1
+ * @return The socket itself.
+ */
+ ref(): this;
+ /**
+ * This property shows the number of characters buffered for writing. The buffer
+ * may contain strings whose length after encoding is not yet known. So this number
+ * is only an approximation of the number of bytes in the buffer.
+ *
+ * `net.Socket` has the property that `socket.write()` always works. This is to
+ * help users get up and running quickly. The computer cannot always keep up
+ * with the amount of data that is written to a socket. The network connection
+ * simply might be too slow. Node.js will internally queue up the data written to a
+ * socket and send it out over the wire when it is possible.
+ *
+ * The consequence of this internal buffering is that memory may grow.
+ * Users who experience large or growing `bufferSize` should attempt to
+ * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
+ * @since v0.3.8
+ * @deprecated Since v14.6.0 - Use `writableLength` instead.
+ */
+ readonly bufferSize: number;
+ /**
+ * The amount of received bytes.
+ * @since v0.5.3
+ */
+ readonly bytesRead: number;
+ /**
+ * The amount of bytes sent.
+ * @since v0.5.3
+ */
+ readonly bytesWritten: number;
+ /**
+ * If `true`,`socket.connect(options[, connectListener])` was
+ * called and has not yet finished. It will stay `true` until the socket becomes
+ * connected, then it is set to `false` and the `'connect'` event is emitted. Note
+ * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
+ * @since v6.1.0
+ */
+ readonly connecting: boolean;
+ /**
+ * See `writable.destroyed` for further details.
+ */
+ readonly destroyed: boolean;
+ /**
+ * The string representation of the local IP address the remote client is
+ * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
+ * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
+ * @since v0.9.6
+ */
+ readonly localAddress?: string;
+ /**
+ * The numeric representation of the local port. For example, `80` or `21`.
+ * @since v0.9.6
+ */
+ readonly localPort?: number;
+ /**
+ * This property represents the state of the connection as a string.
+ * @see {https://nodejs.org/api/net.html#socketreadystate}
+ * @since v0.5.0
+ */
+ readonly readyState: SocketReadyState;
+ /**
+ * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
+ * the socket is destroyed (for example, if the client disconnected).
+ * @since v0.5.10
+ */
+ readonly remoteAddress?: string | undefined;
+ /**
+ * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`.
+ * @since v0.11.14
+ */
+ readonly remoteFamily?: string | undefined;
+ /**
+ * The numeric representation of the remote port. For example, `80` or `21`.
+ * @since v0.5.10
+ */
+ readonly remotePort?: number | undefined;
+ /**
+ * The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set.
+ * @since v10.7.0
+ */
+ readonly timeout?: number | undefined;
+ /**
+ * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
+ * server will still send some data.
+ *
+ * See `writable.end()` for further details.
+ * @since v0.1.90
+ * @param [encoding='utf8'] Only used when data is `string`.
+ * @param callback Optional callback for when the socket is finished.
+ * @return The socket itself.
+ */
+ end(callback?: () => void): this;
+ end(buffer: Uint8Array | string, callback?: () => void): this;
+ end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. data
+ * 4. drain
+ * 5. end
+ * 6. error
+ * 7. lookup
+ * 8. timeout
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: (hadError: boolean) => void): this;
+ addListener(event: 'connect', listener: () => void): this;
+ addListener(event: 'data', listener: (data: Buffer) => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ addListener(event: 'ready', listener: () => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close', hadError: boolean): boolean;
+ emit(event: 'connect'): boolean;
+ emit(event: 'data', data: Buffer): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
+ emit(event: 'ready'): boolean;
+ emit(event: 'timeout'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: (hadError: boolean) => void): this;
+ on(event: 'connect', listener: () => void): this;
+ on(event: 'data', listener: (data: Buffer) => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ on(event: 'ready', listener: () => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: (hadError: boolean) => void): this;
+ once(event: 'connect', listener: () => void): this;
+ once(event: 'data', listener: (data: Buffer) => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ once(event: 'ready', listener: () => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependListener(event: 'connect', listener: () => void): this;
+ prependListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependListener(event: 'ready', listener: () => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
+ prependOnceListener(event: 'connect', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (data: Buffer) => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependOnceListener(event: 'ready', listener: () => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ }
+ interface ListenOptions extends Abortable {
+ port?: number | undefined;
+ host?: string | undefined;
+ backlog?: number | undefined;
+ path?: string | undefined;
+ exclusive?: boolean | undefined;
+ readableAll?: boolean | undefined;
+ writableAll?: boolean | undefined;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean | undefined;
+ }
+ interface ServerOpts {
+ /**
+ * Indicates whether half-opened TCP connections are allowed.
+ * @default false
+ */
+ allowHalfOpen?: boolean | undefined;
+ /**
+ * Indicates whether the socket should be paused on incoming connections.
+ * @default false
+ */
+ pauseOnConnect?: boolean | undefined;
+ /**
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+ * @default false
+ * @since v16.5.0
+ */
+ noDelay?: boolean | undefined;
+ /**
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+ * @default false
+ * @since v16.5.0
+ */
+ keepAlive?: boolean | undefined;
+ /**
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+ * @default 0
+ * @since v16.5.0
+ */
+ keepAliveInitialDelay?: number | undefined;
+ }
+ /**
+ * This class is used to create a TCP or `IPC` server.
+ * @since v0.1.90
+ */
+ class Server extends EventEmitter {
+ constructor(connectionListener?: (socket: Socket) => void);
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
+ /**
+ * Start a server listening for connections. A `net.Server` can be a TCP or
+ * an `IPC` server depending on what it listens to.
+ *
+ * Possible signatures:
+ *
+ * * `server.listen(handle[, backlog][, callback])`
+ * * `server.listen(options[, callback])`
+ * * `server.listen(path[, backlog][, callback])` for `IPC` servers
+ * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
+ *
+ * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
+ * event.
+ *
+ * All `listen()` methods can take a `backlog` parameter to specify the maximum
+ * length of the queue of pending connections. The actual length will be determined
+ * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512).
+ *
+ * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
+ * details).
+ *
+ * The `server.listen()` method can be called again if and only if there was an
+ * error during the first `server.listen()` call or `server.close()` has been
+ * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
+ *
+ * One of the most common errors raised when listening is `EADDRINUSE`.
+ * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
+ * after a certain amount of time:
+ *
+ * ```js
+ * server.on('error', (e) => {
+ * if (e.code === 'EADDRINUSE') {
+ * console.log('Address in use, retrying...');
+ * setTimeout(() => {
+ * server.close();
+ * server.listen(PORT, HOST);
+ * }, 1000);
+ * }
+ * });
+ * ```
+ */
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, hostname?: string, listeningListener?: () => void): this;
+ listen(port?: number, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, listeningListener?: () => void): this;
+ listen(path: string, backlog?: number, listeningListener?: () => void): this;
+ listen(path: string, listeningListener?: () => void): this;
+ listen(options: ListenOptions, listeningListener?: () => void): this;
+ listen(handle: any, backlog?: number, listeningListener?: () => void): this;
+ listen(handle: any, listeningListener?: () => void): this;
+ /**
+ * Stops the server from accepting new connections and keeps existing
+ * connections. This function is asynchronous, the server is finally closed
+ * when all connections are ended and the server emits a `'close'` event.
+ * The optional `callback` will be called once the `'close'` event occurs. Unlike
+ * that event, it will be called with an `Error` as its only argument if the server
+ * was not open when it was closed.
+ * @since v0.1.90
+ * @param callback Called when the server is closed.
+ */
+ close(callback?: (err?: Error) => void): this;
+ /**
+ * Returns the bound `address`, the address `family` name, and `port` of the server
+ * as reported by the operating system if listening on an IP socket
+ * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
+ *
+ * For a server listening on a pipe or Unix domain socket, the name is returned
+ * as a string.
+ *
+ * ```js
+ * const server = net.createServer((socket) => {
+ * socket.end('goodbye\n');
+ * }).on('error', (err) => {
+ * // Handle errors here.
+ * throw err;
+ * });
+ *
+ * // Grab an arbitrary unused port.
+ * server.listen(() => {
+ * console.log('opened server on', server.address());
+ * });
+ * ```
+ *
+ * `server.address()` returns `null` before the `'listening'` event has been
+ * emitted or after calling `server.close()`.
+ * @since v0.1.90
+ */
+ address(): AddressInfo | string | null;
+ /**
+ * Asynchronously get the number of concurrent connections on the server. Works
+ * when sockets were sent to forks.
+ *
+ * Callback should take two arguments `err` and `count`.
+ * @since v0.9.7
+ */
+ getConnections(cb: (error: Error | null, count: number) => void): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
+ * If the server is `ref`ed calling `ref()` again will have no effect.
+ * @since v0.9.1
+ */
+ ref(): this;
+ /**
+ * Calling `unref()` on a server will allow the program to exit if this is the only
+ * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
+ * @since v0.9.1
+ */
+ unref(): this;
+ /**
+ * Set this property to reject connections when the server's connection count gets
+ * high.
+ *
+ * It is not recommended to use this option once a socket has been sent to a child
+ * with `child_process.fork()`.
+ * @since v0.2.0
+ */
+ maxConnections: number;
+ connections: number;
+ /**
+ * Indicates whether or not the server is listening for connections.
+ * @since v5.7.0
+ */
+ listening: boolean;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connection
+ * 3. error
+ * 4. listening
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'listening', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'connection', socket: Socket): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'listening'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'connection', listener: (socket: Socket) => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'listening', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'connection', listener: (socket: Socket) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'listening', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'listening', listener: () => void): this;
+ }
+ type IPVersion = 'ipv4' | 'ipv6';
+ /**
+ * The `BlockList` object can be used with some network APIs to specify rules for
+ * disabling inbound or outbound access to specific IP addresses, IP ranges, or
+ * IP subnets.
+ * @since v15.0.0, v14.18.0
+ */
+ class BlockList {
+ /**
+ * Adds a rule to block the given IP address.
+ * @since v15.0.0, v14.18.0
+ * @param address An IPv4 or IPv6 address.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addAddress(address: string, type?: IPVersion): void;
+ addAddress(address: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
+ * @since v15.0.0, v14.18.0
+ * @param start The starting IPv4 or IPv6 address in the range.
+ * @param end The ending IPv4 or IPv6 address in the range.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addRange(start: string, end: string, type?: IPVersion): void;
+ addRange(start: SocketAddress, end: SocketAddress): void;
+ /**
+ * Adds a rule to block a range of IP addresses specified as a subnet mask.
+ * @since v15.0.0, v14.18.0
+ * @param net The network IPv4 or IPv6 address.
+ * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ addSubnet(net: SocketAddress, prefix: number): void;
+ addSubnet(net: string, prefix: number, type?: IPVersion): void;
+ /**
+ * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
+ *
+ * ```js
+ * const blockList = new net.BlockList();
+ * blockList.addAddress('123.123.123.123');
+ * blockList.addRange('10.0.0.1', '10.0.0.10');
+ * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
+ *
+ * console.log(blockList.check('123.123.123.123')); // Prints: true
+ * console.log(blockList.check('10.0.0.3')); // Prints: true
+ * console.log(blockList.check('222.111.111.222')); // Prints: false
+ *
+ * // IPv6 notation for IPv4 addresses works:
+ * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
+ * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
+ * ```
+ * @since v15.0.0, v14.18.0
+ * @param address The IP address to check
+ * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+ */
+ check(address: SocketAddress): boolean;
+ check(address: string, type?: IPVersion): boolean;
+ }
+ interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number | undefined;
+ }
+ type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
+ /**
+ * Creates a new TCP or `IPC` server.
+ *
+ * If `allowHalfOpen` is set to `true`, when the other end of the socket
+ * signals the end of transmission, the server will only send back the end of
+ * transmission when `socket.end()` is explicitly called. For example, in the
+ * context of TCP, when a FIN packed is received, a FIN packed is sent
+ * back only when `socket.end()` is explicitly called. Until then the
+ * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
+ *
+ * If `pauseOnConnect` is set to `true`, then the socket associated with each
+ * incoming connection will be paused, and no data will be read from its handle.
+ * This allows connections to be passed between processes without any data being
+ * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
+ *
+ * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
+ *
+ * Here is an example of a TCP echo server which listens for connections
+ * on port 8124:
+ *
+ * ```js
+ * const net = require('net');
+ * const server = net.createServer((c) => {
+ * // 'connection' listener.
+ * console.log('client connected');
+ * c.on('end', () => {
+ * console.log('client disconnected');
+ * });
+ * c.write('hello\r\n');
+ * c.pipe(c);
+ * });
+ * server.on('error', (err) => {
+ * throw err;
+ * });
+ * server.listen(8124, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Test this by using `telnet`:
+ *
+ * ```console
+ * $ telnet localhost 8124
+ * ```
+ *
+ * To listen on the socket `/tmp/echo.sock`:
+ *
+ * ```js
+ * server.listen('/tmp/echo.sock', () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * Use `nc` to connect to a Unix domain socket server:
+ *
+ * ```console
+ * $ nc -U /tmp/echo.sock
+ * ```
+ * @since v0.5.0
+ * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
+ */
+ function createServer(connectionListener?: (socket: Socket) => void): Server;
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
+ /**
+ * Aliases to {@link createConnection}.
+ *
+ * Possible signatures:
+ *
+ * * {@link connect}
+ * * {@link connect} for `IPC` connections.
+ * * {@link connect} for TCP connections.
+ */
+ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function connect(port: number, host?: string, connectionListener?: () => void): Socket;
+ function connect(path: string, connectionListener?: () => void): Socket;
+ /**
+ * A factory function, which creates a new {@link Socket},
+ * immediately initiates connection with `socket.connect()`,
+ * then returns the `net.Socket` that starts the connection.
+ *
+ * When the connection is established, a `'connect'` event will be emitted
+ * on the returned socket. The last parameter `connectListener`, if supplied,
+ * will be added as a listener for the `'connect'` event **once**.
+ *
+ * Possible signatures:
+ *
+ * * {@link createConnection}
+ * * {@link createConnection} for `IPC` connections.
+ * * {@link createConnection} for TCP connections.
+ *
+ * The {@link connect} function is an alias to this function.
+ */
+ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
+ function createConnection(path: string, connectionListener?: () => void): Socket;
+ /**
+ * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
+ * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
+ *
+ * ```js
+ * net.isIP('::1'); // returns 6
+ * net.isIP('127.0.0.1'); // returns 4
+ * net.isIP('127.000.000.001'); // returns 0
+ * net.isIP('127.0.0.1/24'); // returns 0
+ * net.isIP('fhqwhgads'); // returns 0
+ * ```
+ * @since v0.3.0
+ */
+ function isIP(input: string): number;
+ /**
+ * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
+ * leading zeroes. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv4('127.0.0.1'); // returns true
+ * net.isIPv4('127.000.000.001'); // returns false
+ * net.isIPv4('127.0.0.1/24'); // returns false
+ * net.isIPv4('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv4(input: string): boolean;
+ /**
+ * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv6('::1'); // returns true
+ * net.isIPv6('fhqwhgads'); // returns false
+ * ```
+ * @since v0.3.0
+ */
+ function isIPv6(input: string): boolean;
+ interface SocketAddressInitOptions {
+ /**
+ * The network address as either an IPv4 or IPv6 string.
+ * @default 127.0.0.1
+ */
+ address?: string | undefined;
+ /**
+ * @default `'ipv4'`
+ */
+ family?: IPVersion | undefined;
+ /**
+ * An IPv6 flow-label used only if `family` is `'ipv6'`.
+ * @default 0
+ */
+ flowlabel?: number | undefined;
+ /**
+ * An IP port.
+ * @default 0
+ */
+ port?: number | undefined;
+ }
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ class SocketAddress {
+ constructor(options: SocketAddressInitOptions);
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly address: string;
+ /**
+ * Either \`'ipv4'\` or \`'ipv6'\`.
+ * @since v15.14.0, v14.18.0
+ */
+ readonly family: IPVersion;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly port: number;
+ /**
+ * @since v15.14.0, v14.18.0
+ */
+ readonly flowlabel: number;
+ }
+}
+declare module 'node:net' {
+ export * from 'net';
+}
diff --git a/node_modules/@types/node/ts4.8/os.d.ts b/node_modules/@types/node/ts4.8/os.d.ts
new file mode 100755
index 0000000..3c55599
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/os.d.ts
@@ -0,0 +1,466 @@
+/**
+ * The `os` module provides operating system-related utility methods and
+ * properties. It can be accessed using:
+ *
+ * ```js
+ * const os = require('os');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js)
+ */
+declare module 'os' {
+ interface CpuInfo {
+ model: string;
+ speed: number;
+ times: {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+ };
+ }
+ interface NetworkInterfaceBase {
+ address: string;
+ netmask: string;
+ mac: string;
+ internal: boolean;
+ cidr: string | null;
+ }
+ interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
+ family: 'IPv4';
+ scopeid?: undefined;
+ }
+ interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
+ family: 'IPv6';
+ scopeid: number;
+ }
+ interface UserInfo<T> {
+ username: T;
+ uid: number;
+ gid: number;
+ shell: T;
+ homedir: T;
+ }
+ type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
+ /**
+ * Returns the host name of the operating system as a string.
+ * @since v0.3.3
+ */
+ function hostname(): string;
+ /**
+ * Returns an array containing the 1, 5, and 15 minute load averages.
+ *
+ * The load average is a measure of system activity calculated by the operating
+ * system and expressed as a fractional number.
+ *
+ * The load average is a Unix-specific concept. On Windows, the return value is
+ * always `[0, 0, 0]`.
+ * @since v0.3.3
+ */
+ function loadavg(): number[];
+ /**
+ * Returns the system uptime in number of seconds.
+ * @since v0.3.3
+ */
+ function uptime(): number;
+ /**
+ * Returns the amount of free system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function freemem(): number;
+ /**
+ * Returns the total amount of system memory in bytes as an integer.
+ * @since v0.3.3
+ */
+ function totalmem(): number;
+ /**
+ * Returns an array of objects containing information about each logical CPU core.
+ *
+ * The properties included on each object include:
+ *
+ * ```js
+ * [
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 252020,
+ * nice: 0,
+ * sys: 30340,
+ * idle: 1070356870,
+ * irq: 0
+ * }
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 306960,
+ * nice: 0,
+ * sys: 26980,
+ * idle: 1071569080,
+ * irq: 0
+ * }
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 248450,
+ * nice: 0,
+ * sys: 21750,
+ * idle: 1070919370,
+ * irq: 0
+ * }
+ * },
+ * {
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
+ * speed: 2926,
+ * times: {
+ * user: 256880,
+ * nice: 0,
+ * sys: 19430,
+ * idle: 1070905480,
+ * irq: 20
+ * }
+ * },
+ * ]
+ * ```
+ *
+ * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
+ * are always 0.
+ * @since v0.3.3
+ */
+ function cpus(): CpuInfo[];
+ /**
+ * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
+ * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
+ *
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
+ * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
+ * @since v0.3.3
+ */
+ function type(): string;
+ /**
+ * Returns the operating system as a string.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
+ * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v0.3.3
+ */
+ function release(): string;
+ /**
+ * Returns an object containing network interfaces that have been assigned a
+ * network address.
+ *
+ * Each key on the returned object identifies a network interface. The associated
+ * value is an array of objects that each describe an assigned network address.
+ *
+ * The properties available on the assigned network address object include:
+ *
+ * ```js
+ * {
+ * lo: [
+ * {
+ * address: '127.0.0.1',
+ * netmask: '255.0.0.0',
+ * family: 'IPv4',
+ * mac: '00:00:00:00:00:00',
+ * internal: true,
+ * cidr: '127.0.0.1/8'
+ * },
+ * {
+ * address: '::1',
+ * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
+ * family: 'IPv6',
+ * mac: '00:00:00:00:00:00',
+ * scopeid: 0,
+ * internal: true,
+ * cidr: '::1/128'
+ * }
+ * ],
+ * eth0: [
+ * {
+ * address: '192.168.1.108',
+ * netmask: '255.255.255.0',
+ * family: 'IPv4',
+ * mac: '01:02:03:0a:0b:0c',
+ * internal: false,
+ * cidr: '192.168.1.108/24'
+ * },
+ * {
+ * address: 'fe80::a00:27ff:fe4e:66a1',
+ * netmask: 'ffff:ffff:ffff:ffff::',
+ * family: 'IPv6',
+ * mac: '01:02:03:0a:0b:0c',
+ * scopeid: 1,
+ * internal: false,
+ * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
+ * }
+ * ]
+ * }
+ * ```
+ * @since v0.6.0
+ */
+ function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
+ /**
+ * Returns the string path of the current user's home directory.
+ *
+ * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
+ * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
+ *
+ * On Windows, it uses the `USERPROFILE` environment variable if defined.
+ * Otherwise it uses the path to the profile directory of the current user.
+ * @since v2.3.0
+ */
+ function homedir(): string;
+ /**
+ * Returns information about the currently effective user. On POSIX platforms,
+ * this is typically a subset of the password file. The returned object includes
+ * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`.
+ *
+ * The value of `homedir` returned by `os.userInfo()` is provided by the operating
+ * system. This differs from the result of `os.homedir()`, which queries
+ * environment variables for the home directory before falling back to the
+ * operating system response.
+ *
+ * Throws a `SystemError` if a user has no `username` or `homedir`.
+ * @since v6.0.0
+ */
+ function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
+ function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
+ type SignalConstants = {
+ [key in NodeJS.Signals]: number;
+ };
+ namespace constants {
+ const UV_UDP_REUSEADDR: number;
+ namespace signals {}
+ const signals: SignalConstants;
+ namespace errno {
+ const E2BIG: number;
+ const EACCES: number;
+ const EADDRINUSE: number;
+ const EADDRNOTAVAIL: number;
+ const EAFNOSUPPORT: number;
+ const EAGAIN: number;
+ const EALREADY: number;
+ const EBADF: number;
+ const EBADMSG: number;
+ const EBUSY: number;
+ const ECANCELED: number;
+ const ECHILD: number;
+ const ECONNABORTED: number;
+ const ECONNREFUSED: number;
+ const ECONNRESET: number;
+ const EDEADLK: number;
+ const EDESTADDRREQ: number;
+ const EDOM: number;
+ const EDQUOT: number;
+ const EEXIST: number;
+ const EFAULT: number;
+ const EFBIG: number;
+ const EHOSTUNREACH: number;
+ const EIDRM: number;
+ const EILSEQ: number;
+ const EINPROGRESS: number;
+ const EINTR: number;
+ const EINVAL: number;
+ const EIO: number;
+ const EISCONN: number;
+ const EISDIR: number;
+ const ELOOP: number;
+ const EMFILE: number;
+ const EMLINK: number;
+ const EMSGSIZE: number;
+ const EMULTIHOP: number;
+ const ENAMETOOLONG: number;
+ const ENETDOWN: number;
+ const ENETRESET: number;
+ const ENETUNREACH: number;
+ const ENFILE: number;
+ const ENOBUFS: number;
+ const ENODATA: number;
+ const ENODEV: number;
+ const ENOENT: number;
+ const ENOEXEC: number;
+ const ENOLCK: number;
+ const ENOLINK: number;
+ const ENOMEM: number;
+ const ENOMSG: number;
+ const ENOPROTOOPT: number;
+ const ENOSPC: number;
+ const ENOSR: number;
+ const ENOSTR: number;
+ const ENOSYS: number;
+ const ENOTCONN: number;
+ const ENOTDIR: number;
+ const ENOTEMPTY: number;
+ const ENOTSOCK: number;
+ const ENOTSUP: number;
+ const ENOTTY: number;
+ const ENXIO: number;
+ const EOPNOTSUPP: number;
+ const EOVERFLOW: number;
+ const EPERM: number;
+ const EPIPE: number;
+ const EPROTO: number;
+ const EPROTONOSUPPORT: number;
+ const EPROTOTYPE: number;
+ const ERANGE: number;
+ const EROFS: number;
+ const ESPIPE: number;
+ const ESRCH: number;
+ const ESTALE: number;
+ const ETIME: number;
+ const ETIMEDOUT: number;
+ const ETXTBSY: number;
+ const EWOULDBLOCK: number;
+ const EXDEV: number;
+ const WSAEINTR: number;
+ const WSAEBADF: number;
+ const WSAEACCES: number;
+ const WSAEFAULT: number;
+ const WSAEINVAL: number;
+ const WSAEMFILE: number;
+ const WSAEWOULDBLOCK: number;
+ const WSAEINPROGRESS: number;
+ const WSAEALREADY: number;
+ const WSAENOTSOCK: number;
+ const WSAEDESTADDRREQ: number;
+ const WSAEMSGSIZE: number;
+ const WSAEPROTOTYPE: number;
+ const WSAENOPROTOOPT: number;
+ const WSAEPROTONOSUPPORT: number;
+ const WSAESOCKTNOSUPPORT: number;
+ const WSAEOPNOTSUPP: number;
+ const WSAEPFNOSUPPORT: number;
+ const WSAEAFNOSUPPORT: number;
+ const WSAEADDRINUSE: number;
+ const WSAEADDRNOTAVAIL: number;
+ const WSAENETDOWN: number;
+ const WSAENETUNREACH: number;
+ const WSAENETRESET: number;
+ const WSAECONNABORTED: number;
+ const WSAECONNRESET: number;
+ const WSAENOBUFS: number;
+ const WSAEISCONN: number;
+ const WSAENOTCONN: number;
+ const WSAESHUTDOWN: number;
+ const WSAETOOMANYREFS: number;
+ const WSAETIMEDOUT: number;
+ const WSAECONNREFUSED: number;
+ const WSAELOOP: number;
+ const WSAENAMETOOLONG: number;
+ const WSAEHOSTDOWN: number;
+ const WSAEHOSTUNREACH: number;
+ const WSAENOTEMPTY: number;
+ const WSAEPROCLIM: number;
+ const WSAEUSERS: number;
+ const WSAEDQUOT: number;
+ const WSAESTALE: number;
+ const WSAEREMOTE: number;
+ const WSASYSNOTREADY: number;
+ const WSAVERNOTSUPPORTED: number;
+ const WSANOTINITIALISED: number;
+ const WSAEDISCON: number;
+ const WSAENOMORE: number;
+ const WSAECANCELLED: number;
+ const WSAEINVALIDPROCTABLE: number;
+ const WSAEINVALIDPROVIDER: number;
+ const WSAEPROVIDERFAILEDINIT: number;
+ const WSASYSCALLFAILURE: number;
+ const WSASERVICE_NOT_FOUND: number;
+ const WSATYPE_NOT_FOUND: number;
+ const WSA_E_NO_MORE: number;
+ const WSA_E_CANCELLED: number;
+ const WSAEREFUSED: number;
+ }
+ namespace priority {
+ const PRIORITY_LOW: number;
+ const PRIORITY_BELOW_NORMAL: number;
+ const PRIORITY_NORMAL: number;
+ const PRIORITY_ABOVE_NORMAL: number;
+ const PRIORITY_HIGH: number;
+ const PRIORITY_HIGHEST: number;
+ }
+ }
+ const devNull: string;
+ const EOL: string;
+ /**
+ * Returns the operating system CPU architecture for which the Node.js binary was
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * The return value is equivalent to `process.arch`.
+ * @since v0.5.0
+ */
+ function arch(): string;
+ /**
+ * Returns a string identifying the kernel version.
+ *
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+ * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v13.11.0, v12.17.0
+ */
+ function version(): string;
+ /**
+ * Returns a string identifying the operating system platform for which
+ * the Node.js binary was compiled. The value is set at compile time.
+ * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
+ *
+ * The return value is equivalent to `process.platform`.
+ *
+ * The value `'android'` may also be returned if Node.js is built on the Android
+ * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.5.0
+ */
+ function platform(): NodeJS.Platform;
+ /**
+ * Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.
+ *
+ * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname).
+ * On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used.
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v18.9.0
+ */
+ function machine(): string;
+ /**
+ * Returns the operating system's default directory for temporary files as a
+ * string.
+ * @since v0.9.9
+ */
+ function tmpdir(): string;
+ /**
+ * Returns a string identifying the endianness of the CPU for which the Node.js
+ * binary was compiled.
+ *
+ * Possible values are `'BE'` for big endian and `'LE'` for little endian.
+ * @since v0.9.4
+ */
+ function endianness(): 'BE' | 'LE';
+ /**
+ * Returns the scheduling priority for the process specified by `pid`. If `pid` is
+ * not provided or is `0`, the priority of the current process is returned.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to retrieve scheduling priority for.
+ */
+ function getPriority(pid?: number): number;
+ /**
+ * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used.
+ *
+ * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows
+ * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range
+ * mapping may cause the return value to be slightly different on Windows. To avoid
+ * confusion, set `priority` to one of the priority constants.
+ *
+ * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
+ * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`.
+ * @since v10.10.0
+ * @param [pid=0] The process ID to set scheduling priority for.
+ * @param priority The scheduling priority to assign to the process.
+ */
+ function setPriority(priority: number): void;
+ function setPriority(pid: number, priority: number): void;
+}
+declare module 'node:os' {
+ export * from 'os';
+}
diff --git a/node_modules/@types/node/ts4.8/path.d.ts b/node_modules/@types/node/ts4.8/path.d.ts
new file mode 100755
index 0000000..2d643b2
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/path.d.ts
@@ -0,0 +1,191 @@
+declare module 'path/posix' {
+ import path = require('path');
+ export = path;
+}
+declare module 'path/win32' {
+ import path = require('path');
+ export = path;
+}
+/**
+ * The `path` module provides utilities for working with file and directory paths.
+ * It can be accessed using:
+ *
+ * ```js
+ * const path = require('path');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js)
+ */
+declare module 'path' {
+ namespace path {
+ /**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+ interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+ }
+ interface FormatInputPathObject {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root?: string | undefined;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir?: string | undefined;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base?: string | undefined;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext?: string | undefined;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name?: string | undefined;
+ }
+ interface PlatformPath {
+ /**
+ * Normalize a string path, reducing '..' and '.' parts.
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
+ *
+ * @param path string path to normalize.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ normalize(path: string): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ *
+ * @param paths paths to join.
+ * @throws {TypeError} if any of the path segments is not a string.
+ */
+ join(...paths: string[]): string;
+ /**
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+ *
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+ *
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
+ * until an absolute path is found. If after using all {from} paths still no absolute path is found,
+ * the current working directory is used as well. The resulting path is normalized,
+ * and trailing slashes are removed unless the path gets resolved to the root directory.
+ *
+ * @param paths A sequence of paths or path segments.
+ * @throws {TypeError} if any of the arguments is not a string.
+ */
+ resolve(...paths: string[]): string;
+ /**
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+ *
+ * If the given {path} is a zero-length string, `false` will be returned.
+ *
+ * @param path path to test.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ isAbsolute(path: string): boolean;
+ /**
+ * Solve the relative path from {from} to {to} based on the current working directory.
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+ *
+ * @throws {TypeError} if either `from` or `to` is not a string.
+ */
+ relative(from: string, to: string): string;
+ /**
+ * Return the directory name of a path. Similar to the Unix dirname command.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ dirname(path: string): string;
+ /**
+ * Return the last portion of a path. Similar to the Unix basename command.
+ * Often used to extract the file name from a fully qualified path.
+ *
+ * @param path the path to evaluate.
+ * @param ext optionally, an extension to remove from the result.
+ * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
+ */
+ basename(path: string, ext?: string): string;
+ /**
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
+ *
+ * @param path the path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ extname(path: string): string;
+ /**
+ * The platform-specific file separator. '\\' or '/'.
+ */
+ readonly sep: '\\' | '/';
+ /**
+ * The platform-specific file delimiter. ';' or ':'.
+ */
+ readonly delimiter: ';' | ':';
+ /**
+ * Returns an object from a path string - the opposite of format().
+ *
+ * @param path path to evaluate.
+ * @throws {TypeError} if `path` is not a string.
+ */
+ parse(path: string): ParsedPath;
+ /**
+ * Returns a path string from an object - the opposite of parse().
+ *
+ * @param pathObject path to evaluate.
+ */
+ format(pathObject: FormatInputPathObject): string;
+ /**
+ * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
+ * If path is not a string, path will be returned without modifications.
+ * This method is meaningful only on Windows system.
+ * On POSIX systems, the method is non-operational and always returns path without modifications.
+ */
+ toNamespacedPath(path: string): string;
+ /**
+ * Posix specific pathing.
+ * Same as parent object on posix.
+ */
+ readonly posix: PlatformPath;
+ /**
+ * Windows specific pathing.
+ * Same as parent object on windows
+ */
+ readonly win32: PlatformPath;
+ }
+ }
+ const path: path.PlatformPath;
+ export = path;
+}
+declare module 'node:path' {
+ import path = require('path');
+ export = path;
+}
+declare module 'node:path/posix' {
+ import path = require('path/posix');
+ export = path;
+}
+declare module 'node:path/win32' {
+ import path = require('path/win32');
+ export = path;
+}
diff --git a/node_modules/@types/node/ts4.8/perf_hooks.d.ts b/node_modules/@types/node/ts4.8/perf_hooks.d.ts
new file mode 100755
index 0000000..cf02a16
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/perf_hooks.d.ts
@@ -0,0 +1,610 @@
+/**
+ * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
+ * Node.js-specific performance measurements.
+ *
+ * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
+ *
+ * * [High Resolution Time](https://www.w3.org/TR/hr-time-2)
+ * * [Performance Timeline](https://w3c.github.io/performance-timeline/)
+ * * [User Timing](https://www.w3.org/TR/user-timing/)
+ *
+ * ```js
+ * const { PerformanceObserver, performance } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((items) => {
+ * console.log(items.getEntries()[0].duration);
+ * performance.clearMarks();
+ * });
+ * obs.observe({ type: 'measure' });
+ * performance.measure('Start to Now');
+ *
+ * performance.mark('A');
+ * doSomeLongRunningProcess(() => {
+ * performance.measure('A to Now', 'A');
+ *
+ * performance.mark('B');
+ * performance.measure('A to B', 'A', 'B');
+ * });
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js)
+ */
+declare module 'perf_hooks' {
+ import { AsyncResource } from 'node:async_hooks';
+ type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
+ interface NodeGCPerformanceDetail {
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
+ * the type of garbage collection operation that occurred.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly kind?: number | undefined;
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
+ * property contains additional information about garbage collection operation.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly flags?: number | undefined;
+ }
+ /**
+ * @since v8.5.0
+ */
+ class PerformanceEntry {
+ protected constructor();
+ /**
+ * The total number of milliseconds elapsed for this entry. This value will not
+ * be meaningful for all Performance Entry types.
+ * @since v8.5.0
+ */
+ readonly duration: number;
+ /**
+ * The name of the performance entry.
+ * @since v8.5.0
+ */
+ readonly name: string;
+ /**
+ * The high resolution millisecond timestamp marking the starting time of the
+ * Performance Entry.
+ * @since v8.5.0
+ */
+ readonly startTime: number;
+ /**
+ * The type of the performance entry. It may be one of:
+ *
+ * * `'node'` (Node.js only)
+ * * `'mark'` (available on the Web)
+ * * `'measure'` (available on the Web)
+ * * `'gc'` (Node.js only)
+ * * `'function'` (Node.js only)
+ * * `'http2'` (Node.js only)
+ * * `'http'` (Node.js only)
+ * @since v8.5.0
+ */
+ readonly entryType: EntryType;
+ /**
+ * Additional detail specific to the `entryType`.
+ * @since v16.0.0
+ */
+ readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
+ toJSON(): any;
+ }
+ class PerformanceMark extends PerformanceEntry {
+ readonly duration: 0;
+ readonly entryType: 'mark';
+ }
+ class PerformanceMeasure extends PerformanceEntry {
+ readonly entryType: 'measure';
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Provides timing details for Node.js itself. The constructor of this class
+ * is not exposed to users.
+ * @since v8.5.0
+ */
+ class PerformanceNodeTiming extends PerformanceEntry {
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process
+ * completed bootstrapping. If bootstrapping has not yet finished, the property
+ * has the value of -1.
+ * @since v8.5.0
+ */
+ readonly bootstrapComplete: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js environment was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly environment: number;
+ /**
+ * The high resolution millisecond timestamp of the amount of time the event loop
+ * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
+ * does not take CPU usage into consideration. If the event loop has not yet
+ * started (e.g., in the first tick of the main script), the property has the
+ * value of 0.
+ * @since v14.10.0, v12.19.0
+ */
+ readonly idleTime: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * exited. If the event loop has not yet exited, the property has the value of -1\.
+ * It can only have a value of not -1 in a handler of the `'exit'` event.
+ * @since v8.5.0
+ */
+ readonly loopExit: number;
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop
+ * started. If the event loop has not yet started (e.g., in the first tick of the
+ * main script), the property has the value of -1.
+ * @since v8.5.0
+ */
+ readonly loopStart: number;
+ /**
+ * The high resolution millisecond timestamp at which the V8 platform was
+ * initialized.
+ * @since v8.5.0
+ */
+ readonly v8Start: number;
+ }
+ interface EventLoopUtilization {
+ idle: number;
+ active: number;
+ utilization: number;
+ }
+ /**
+ * @param util1 The result of a previous call to eventLoopUtilization()
+ * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
+ */
+ type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization;
+ interface MarkOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * An optional timestamp to be used as the mark time.
+ * @default `performance.now()`.
+ */
+ startTime?: number | undefined;
+ }
+ interface MeasureOptions {
+ /**
+ * Additional optional detail to include with the mark.
+ */
+ detail?: unknown | undefined;
+ /**
+ * Duration between start and end times.
+ */
+ duration?: number | undefined;
+ /**
+ * Timestamp to be used as the end time, or a string identifying a previously recorded mark.
+ */
+ end?: number | string | undefined;
+ /**
+ * Timestamp to be used as the start time, or a string identifying a previously recorded mark.
+ */
+ start?: number | string | undefined;
+ }
+ interface TimerifyOptions {
+ /**
+ * A histogram object created using
+ * `perf_hooks.createHistogram()` that will record runtime durations in
+ * nanoseconds.
+ */
+ histogram?: RecordableHistogram | undefined;
+ }
+ interface Performance {
+ /**
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
+ * If name is provided, removes only the named mark.
+ * @param name
+ */
+ clearMarks(name?: string): void;
+ /**
+ * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
+ * If name is provided, removes only the named measure.
+ * @param name
+ * @since v16.7.0
+ */
+ clearMeasures(name?: string): void;
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
+ * If you are only interested in performance entries of certain types or that have certain names, see
+ * `performance.getEntriesByType()` and `performance.getEntriesByName()`.
+ * @since v16.7.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.
+ * @param name
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
+ * whose `performanceEntry.entryType` is equal to `type`.
+ * @param type
+ * @since v16.7.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ /**
+ * Creates a new PerformanceMark entry in the Performance Timeline.
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
+ * and whose performanceEntry.duration is always 0.
+ * Performance marks are used to mark specific significant moments in the Performance Timeline.
+ * @param name
+ * @return The PerformanceMark entry that was created
+ */
+ mark(name?: string, options?: MarkOptions): PerformanceMark;
+ /**
+ * Creates a new PerformanceMeasure entry in the Performance Timeline.
+ * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
+ * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
+ *
+ * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
+ * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
+ * then startMark is set to timeOrigin by default.
+ *
+ * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
+ * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
+ * @param name
+ * @param startMark
+ * @param endMark
+ * @return The PerformanceMeasure entry that was created
+ */
+ measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
+ measure(name: string, options: MeasureOptions): PerformanceMeasure;
+ /**
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
+ */
+ readonly nodeTiming: PerformanceNodeTiming;
+ /**
+ * @return the current high resolution millisecond timestamp
+ */
+ now(): number;
+ /**
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
+ */
+ readonly timeOrigin: number;
+ /**
+ * Wraps a function within a new function that measures the running time of the wrapped function.
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
+ * @param fn
+ */
+ timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
+ /**
+ * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
+ * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
+ * No other CPU idle time is taken into consideration.
+ */
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ interface PerformanceObserverEntryList {
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntries());
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 81.465639,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 81.860064,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntries(): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
+ * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByName('meow'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 98.545991,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('nope')); // []
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 63.518931,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * console.log(perfObserverList.getEntriesByName('test', 'measure')); // []
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ entryTypes: ['mark', 'measure'] });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+ /**
+ * Returns a list of `PerformanceEntry` objects in chronological order
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`.
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((perfObserverList, observer) => {
+ * console.log(perfObserverList.getEntriesByType('mark'));
+ *
+ * * [
+ * * PerformanceEntry {
+ * * name: 'test',
+ * * entryType: 'mark',
+ * * startTime: 55.897834,
+ * * duration: 0
+ * * },
+ * * PerformanceEntry {
+ * * name: 'meow',
+ * * entryType: 'mark',
+ * * startTime: 56.350146,
+ * * duration: 0
+ * * }
+ * * ]
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
+ * observer.disconnect();
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * performance.mark('test');
+ * performance.mark('meow');
+ * ```
+ * @since v8.5.0
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ }
+ type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
+ class PerformanceObserver extends AsyncResource {
+ constructor(callback: PerformanceObserverCallback);
+ /**
+ * Disconnects the `PerformanceObserver` instance from all notifications.
+ * @since v8.5.0
+ */
+ disconnect(): void;
+ /**
+ * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
+ *
+ * ```js
+ * const {
+ * performance,
+ * PerformanceObserver
+ * } = require('perf_hooks');
+ *
+ * const obs = new PerformanceObserver((list, observer) => {
+ * // Called once asynchronously. `list` contains three items.
+ * });
+ * obs.observe({ type: 'mark' });
+ *
+ * for (let n = 0; n < 3; n++)
+ * performance.mark(`test${n}`);
+ * ```
+ * @since v8.5.0
+ */
+ observe(
+ options:
+ | {
+ entryTypes: ReadonlyArray<EntryType>;
+ buffered?: boolean | undefined;
+ }
+ | {
+ type: EntryType;
+ buffered?: boolean | undefined;
+ }
+ ): void;
+ }
+ namespace constants {
+ const NODE_PERFORMANCE_GC_MAJOR: number;
+ const NODE_PERFORMANCE_GC_MINOR: number;
+ const NODE_PERFORMANCE_GC_INCREMENTAL: number;
+ const NODE_PERFORMANCE_GC_WEAKCB: number;
+ const NODE_PERFORMANCE_GC_FLAGS_NO: number;
+ const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
+ }
+ const performance: Performance;
+ interface EventLoopMonitorOptions {
+ /**
+ * The sampling rate in milliseconds.
+ * Must be greater than zero.
+ * @default 10
+ */
+ resolution?: number | undefined;
+ }
+ interface Histogram {
+ /**
+ * Returns a `Map` object detailing the accumulated percentile distribution.
+ * @since v11.10.0
+ */
+ readonly percentiles: Map<number, number>;
+ /**
+ * The number of times the event loop delay exceeded the maximum 1 hour event
+ * loop delay threshold.
+ * @since v11.10.0
+ */
+ readonly exceeds: number;
+ /**
+ * The minimum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly min: number;
+ /**
+ * The maximum recorded event loop delay.
+ * @since v11.10.0
+ */
+ readonly max: number;
+ /**
+ * The mean of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly mean: number;
+ /**
+ * The standard deviation of the recorded event loop delays.
+ * @since v11.10.0
+ */
+ readonly stddev: number;
+ /**
+ * Resets the collected histogram data.
+ * @since v11.10.0
+ */
+ reset(): void;
+ /**
+ * Returns the value at the given percentile.
+ * @since v11.10.0
+ * @param percentile A percentile value in the range (0, 100].
+ */
+ percentile(percentile: number): number;
+ }
+ interface IntervalHistogram extends Histogram {
+ /**
+ * Enables the update interval timer. Returns `true` if the timer was
+ * started, `false` if it was already started.
+ * @since v11.10.0
+ */
+ enable(): boolean;
+ /**
+ * Disables the update interval timer. Returns `true` if the timer was
+ * stopped, `false` if it was already stopped.
+ * @since v11.10.0
+ */
+ disable(): boolean;
+ }
+ interface RecordableHistogram extends Histogram {
+ /**
+ * @since v15.9.0, v14.18.0
+ * @param val The amount to record in the histogram.
+ */
+ record(val: number | bigint): void;
+ /**
+ * Calculates the amount of time (in nanoseconds) that has passed since the
+ * previous call to `recordDelta()` and records that amount in the histogram.
+ *
+ * ## Examples
+ * @since v15.9.0, v14.18.0
+ */
+ recordDelta(): void;
+ /**
+ * Adds the values from other to this histogram.
+ * @since v17.4.0, v16.14.0
+ * @param other Recordable Histogram to combine with
+ */
+ add(other: RecordableHistogram): void;
+ }
+ /**
+ * _This property is an extension by Node.js. It is not available in Web browsers._
+ *
+ * Creates an `IntervalHistogram` object that samples and reports the event loop
+ * delay over time. The delays will be reported in nanoseconds.
+ *
+ * Using a timer to detect approximate event loop delay works because the
+ * execution of timers is tied specifically to the lifecycle of the libuv
+ * event loop. That is, a delay in the loop will cause a delay in the execution
+ * of the timer, and those delays are specifically what this API is intended to
+ * detect.
+ *
+ * ```js
+ * const { monitorEventLoopDelay } = require('perf_hooks');
+ * const h = monitorEventLoopDelay({ resolution: 20 });
+ * h.enable();
+ * // Do something.
+ * h.disable();
+ * console.log(h.min);
+ * console.log(h.max);
+ * console.log(h.mean);
+ * console.log(h.stddev);
+ * console.log(h.percentiles);
+ * console.log(h.percentile(50));
+ * console.log(h.percentile(99));
+ * ```
+ * @since v11.10.0
+ */
+ function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
+ interface CreateHistogramOptions {
+ /**
+ * The minimum recordable value. Must be an integer value greater than 0.
+ * @default 1
+ */
+ min?: number | bigint | undefined;
+ /**
+ * The maximum recordable value. Must be an integer value greater than min.
+ * @default Number.MAX_SAFE_INTEGER
+ */
+ max?: number | bigint | undefined;
+ /**
+ * The number of accuracy digits. Must be a number between 1 and 5.
+ * @default 3
+ */
+ figures?: number | undefined;
+ }
+ /**
+ * Returns a `RecordableHistogram`.
+ * @since v15.9.0, v14.18.0
+ */
+ function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
+}
+declare module 'node:perf_hooks' {
+ export * from 'perf_hooks';
+}
diff --git a/node_modules/@types/node/ts4.8/process.d.ts b/node_modules/@types/node/ts4.8/process.d.ts
new file mode 100755
index 0000000..12148f9
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/process.d.ts
@@ -0,0 +1,1482 @@
+declare module 'process' {
+ import * as tty from 'node:tty';
+ import { Worker } from 'node:worker_threads';
+ global {
+ var process: NodeJS.Process;
+ namespace NodeJS {
+ // this namespace merge is here because these are specifically used
+ // as the type for process.stdin, process.stdout, and process.stderr.
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
+ interface ReadStream extends tty.ReadStream {}
+ interface WriteStream extends tty.WriteStream {}
+ interface MemoryUsageFn {
+ /**
+ * The `process.memoryUsage()` method iterate over each page to gather informations about memory
+ * usage which can be slow depending on the program memory allocations.
+ */
+ (): MemoryUsage;
+ /**
+ * method returns an integer representing the Resident Set Size (RSS) in bytes.
+ */
+ rss(): number;
+ }
+ interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ external: number;
+ arrayBuffers: number;
+ }
+ interface CpuUsage {
+ user: number;
+ system: number;
+ }
+ interface ProcessRelease {
+ name: string;
+ sourceUrl?: string | undefined;
+ headersUrl?: string | undefined;
+ libUrl?: string | undefined;
+ lts?: string | undefined;
+ }
+ interface ProcessVersions extends Dict<string> {
+ http_parser: string;
+ node: string;
+ v8: string;
+ ares: string;
+ uv: string;
+ zlib: string;
+ modules: string;
+ openssl: string;
+ }
+ type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
+ type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64';
+ type Signals =
+ | 'SIGABRT'
+ | 'SIGALRM'
+ | 'SIGBUS'
+ | 'SIGCHLD'
+ | 'SIGCONT'
+ | 'SIGFPE'
+ | 'SIGHUP'
+ | 'SIGILL'
+ | 'SIGINT'
+ | 'SIGIO'
+ | 'SIGIOT'
+ | 'SIGKILL'
+ | 'SIGPIPE'
+ | 'SIGPOLL'
+ | 'SIGPROF'
+ | 'SIGPWR'
+ | 'SIGQUIT'
+ | 'SIGSEGV'
+ | 'SIGSTKFLT'
+ | 'SIGSTOP'
+ | 'SIGSYS'
+ | 'SIGTERM'
+ | 'SIGTRAP'
+ | 'SIGTSTP'
+ | 'SIGTTIN'
+ | 'SIGTTOU'
+ | 'SIGUNUSED'
+ | 'SIGURG'
+ | 'SIGUSR1'
+ | 'SIGUSR2'
+ | 'SIGVTALRM'
+ | 'SIGWINCH'
+ | 'SIGXCPU'
+ | 'SIGXFSZ'
+ | 'SIGBREAK'
+ | 'SIGLOST'
+ | 'SIGINFO';
+ type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection';
+ type MultipleResolveType = 'resolve' | 'reject';
+ type BeforeExitListener = (code: number) => void;
+ type DisconnectListener = () => void;
+ type ExitListener = (code: number) => void;
+ type RejectionHandledListener = (promise: Promise<unknown>) => void;
+ type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
+ /**
+ * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
+ * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
+ */
+ type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
+ type WarningListener = (warning: Error) => void;
+ type MessageListener = (message: unknown, sendHandle: unknown) => void;
+ type SignalsListener = (signal: Signals) => void;
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<unknown>, value: unknown) => void;
+ type WorkerListener = (worker: Worker) => void;
+ interface Socket extends ReadWriteStream {
+ isTTY?: true | undefined;
+ }
+ // Alias for compatibility
+ interface ProcessEnv extends Dict<string> {
+ /**
+ * Can be used to change the default timezone at runtime
+ */
+ TZ?: string;
+ }
+ interface HRTime {
+ (time?: [number, number]): [number, number];
+ bigint(): bigint;
+ }
+ interface ProcessReport {
+ /**
+ * Directory where the report is written.
+ * working directory of the Node.js process.
+ * @default '' indicating that reports are written to the current
+ */
+ directory: string;
+ /**
+ * Filename where the report is written.
+ * The default value is the empty string.
+ * @default '' the output filename will be comprised of a timestamp,
+ * PID, and sequence number.
+ */
+ filename: string;
+ /**
+ * Returns a JSON-formatted diagnostic report for the running process.
+ * The report's JavaScript stack trace is taken from err, if present.
+ */
+ getReport(err?: Error): string;
+ /**
+ * If true, a diagnostic report is generated on fatal errors,
+ * such as out of memory errors or failed C++ assertions.
+ * @default false
+ */
+ reportOnFatalError: boolean;
+ /**
+ * If true, a diagnostic report is generated when the process
+ * receives the signal specified by process.report.signal.
+ * @default false
+ */
+ reportOnSignal: boolean;
+ /**
+ * If true, a diagnostic report is generated on uncaught exception.
+ * @default false
+ */
+ reportOnUncaughtException: boolean;
+ /**
+ * The signal used to trigger the creation of a diagnostic report.
+ * @default 'SIGUSR2'
+ */
+ signal: Signals;
+ /**
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
+ * includes the date, time, PID, and a sequence number.
+ * The report's JavaScript stack trace is taken from err, if present.
+ *
+ * @param fileName Name of the file where the report is written.
+ * This should be a relative path, that will be appended to the directory specified in
+ * `process.report.directory`, or the current working directory of the Node.js process,
+ * if unspecified.
+ * @param error A custom error used for reporting the JavaScript stack.
+ * @return Filename of the generated report.
+ */
+ writeReport(fileName?: string): string;
+ writeReport(error?: Error): string;
+ writeReport(fileName?: string, err?: Error): string;
+ }
+ interface ResourceUsage {
+ fsRead: number;
+ fsWrite: number;
+ involuntaryContextSwitches: number;
+ ipcReceived: number;
+ ipcSent: number;
+ majorPageFault: number;
+ maxRSS: number;
+ minorPageFault: number;
+ sharedMemorySize: number;
+ signalsCount: number;
+ swappedOut: number;
+ systemCPUTime: number;
+ unsharedDataSize: number;
+ unsharedStackSize: number;
+ userCPUTime: number;
+ voluntaryContextSwitches: number;
+ }
+ interface EmitWarningOptions {
+ /**
+ * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
+ *
+ * @default 'Warning'
+ */
+ type?: string | undefined;
+ /**
+ * A unique identifier for the warning instance being emitted.
+ */
+ code?: string | undefined;
+ /**
+ * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
+ *
+ * @default process.emitWarning
+ */
+ ctor?: Function | undefined;
+ /**
+ * Additional text to include with the error.
+ */
+ detail?: string | undefined;
+ }
+ interface ProcessConfig {
+ readonly target_defaults: {
+ readonly cflags: any[];
+ readonly default_configuration: string;
+ readonly defines: string[];
+ readonly include_dirs: string[];
+ readonly libraries: string[];
+ };
+ readonly variables: {
+ readonly clang: number;
+ readonly host_arch: string;
+ readonly node_install_npm: boolean;
+ readonly node_install_waf: boolean;
+ readonly node_prefix: string;
+ readonly node_shared_openssl: boolean;
+ readonly node_shared_v8: boolean;
+ readonly node_shared_zlib: boolean;
+ readonly node_use_dtrace: boolean;
+ readonly node_use_etw: boolean;
+ readonly node_use_openssl: boolean;
+ readonly target_arch: string;
+ readonly v8_no_strict_aliasing: number;
+ readonly v8_use_snapshot: boolean;
+ readonly visibility: string;
+ };
+ }
+ interface Process extends EventEmitter {
+ /**
+ * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * For example, to copy `process.stdin` to `process.stdout`:
+ *
+ * ```js
+ * import { stdin, stdout } from 'process';
+ *
+ * stdin.pipe(stdout);
+ * ```
+ *
+ * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stdout: WriteStream & {
+ fd: 1;
+ };
+ /**
+ * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is
+ * a `Writable` stream.
+ *
+ * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+ */
+ stderr: WriteStream & {
+ fd: 2;
+ };
+ /**
+ * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is
+ * a `Readable` stream.
+ *
+ * For details of how to read from `stdin` see `readable.read()`.
+ *
+ * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that
+ * is compatible with scripts written for Node.js prior to v0.10\.
+ * For more information see `Stream compatibility`.
+ *
+ * In "old" streams mode the `stdin` stream is paused by default, so one
+ * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode.
+ */
+ stdin: ReadStream & {
+ fd: 0;
+ };
+ openStdin(): Socket;
+ /**
+ * The `process.argv` property returns an array containing the command-line
+ * arguments passed when the Node.js process was launched. The first element will
+ * be {@link execPath}. See `process.argv0` if access to the original value
+ * of `argv[0]` is needed. The second element will be the path to the JavaScript
+ * file being executed. The remaining elements will be any additional command-line
+ * arguments.
+ *
+ * For example, assuming the following script for `process-args.js`:
+ *
+ * ```js
+ * import { argv } from 'process';
+ *
+ * // print process.argv
+ * argv.forEach((val, index) => {
+ * console.log(`${index}: ${val}`);
+ * });
+ * ```
+ *
+ * Launching the Node.js process as:
+ *
+ * ```console
+ * $ node process-args.js one two=three four
+ * ```
+ *
+ * Would generate the output:
+ *
+ * ```text
+ * 0: /usr/local/bin/node
+ * 1: /Users/mjr/work/node/process-args.js
+ * 2: one
+ * 3: two=three
+ * 4: four
+ * ```
+ * @since v0.1.27
+ */
+ argv: string[];
+ /**
+ * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts.
+ *
+ * ```console
+ * $ bash -c 'exec -a customArgv0 ./node'
+ * > process.argv[0]
+ * '/Volumes/code/external/node/out/Release/node'
+ * > process.argv0
+ * 'customArgv0'
+ * ```
+ * @since v6.4.0
+ */
+ argv0: string;
+ /**
+ * The `process.execArgv` property returns the set of Node.js-specific command-line
+ * options passed when the Node.js process was launched. These options do not
+ * appear in the array returned by the {@link argv} property, and do not
+ * include the Node.js executable, the name of the script, or any options following
+ * the script name. These options are useful in order to spawn child processes with
+ * the same execution environment as the parent.
+ *
+ * ```console
+ * $ node --harmony script.js --version
+ * ```
+ *
+ * Results in `process.execArgv`:
+ *
+ * ```js
+ * ['--harmony']
+ * ```
+ *
+ * And `process.argv`:
+ *
+ * ```js
+ * ['/usr/local/bin/node', 'script.js', '--version']
+ * ```
+ *
+ * Refer to `Worker constructor` for the detailed behavior of worker
+ * threads with this property.
+ * @since v0.7.7
+ */
+ execArgv: string[];
+ /**
+ * The `process.execPath` property returns the absolute pathname of the executable
+ * that started the Node.js process. Symbolic links, if any, are resolved.
+ *
+ * ```js
+ * '/usr/local/bin/node'
+ * ```
+ * @since v0.1.100
+ */
+ execPath: string;
+ /**
+ * The `process.abort()` method causes the Node.js process to exit immediately and
+ * generate a core file.
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.7.0
+ */
+ abort(): never;
+ /**
+ * The `process.chdir()` method changes the current working directory of the
+ * Node.js process or throws an exception if doing so fails (for instance, if
+ * the specified `directory` does not exist).
+ *
+ * ```js
+ * import { chdir, cwd } from 'process';
+ *
+ * console.log(`Starting directory: ${cwd()}`);
+ * try {
+ * chdir('/tmp');
+ * console.log(`New directory: ${cwd()}`);
+ * } catch (err) {
+ * console.error(`chdir: ${err}`);
+ * }
+ * ```
+ *
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.17
+ */
+ chdir(directory: string): void;
+ /**
+ * The `process.cwd()` method returns the current working directory of the Node.js
+ * process.
+ *
+ * ```js
+ * import { cwd } from 'process';
+ *
+ * console.log(`Current directory: ${cwd()}`);
+ * ```
+ * @since v0.1.8
+ */
+ cwd(): string;
+ /**
+ * The port used by the Node.js debugger when enabled.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * process.debugPort = 5858;
+ * ```
+ * @since v0.7.2
+ */
+ debugPort: number;
+ /**
+ * The `process.emitWarning()` method can be used to emit custom or application
+ * specific process warnings. These can be listened for by adding a handler to the `'warning'` event.
+ *
+ * ```js
+ * import { emitWarning } from 'process';
+ *
+ * // Emit a warning with a code and additional detail.
+ * emitWarning('Something happened!', {
+ * code: 'MY_WARNING',
+ * detail: 'This is some additional information'
+ * });
+ * // Emits:
+ * // (node:56338) [MY_WARNING] Warning: Something happened!
+ * // This is some additional information
+ * ```
+ *
+ * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * process.on('warning', (warning) => {
+ * console.warn(warning.name); // 'Warning'
+ * console.warn(warning.message); // 'Something happened!'
+ * console.warn(warning.code); // 'MY_WARNING'
+ * console.warn(warning.stack); // Stack trace
+ * console.warn(warning.detail); // 'This is some additional information'
+ * });
+ * ```
+ *
+ * If `warning` is passed as an `Error` object, the `options` argument is ignored.
+ * @since v8.0.0
+ * @param warning The warning to emit.
+ */
+ emitWarning(warning: string | Error, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
+ emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
+ /**
+ * The `process.env` property returns an object containing the user environment.
+ * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html).
+ *
+ * An example of this object looks like:
+ *
+ * ```js
+ * {
+ * TERM: 'xterm-256color',
+ * SHELL: '/usr/local/bin/bash',
+ * USER: 'maciej',
+ * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
+ * PWD: '/Users/maciej',
+ * EDITOR: 'vim',
+ * SHLVL: '1',
+ * HOME: '/Users/maciej',
+ * LOGNAME: 'maciej',
+ * _: '/usr/local/bin/node'
+ * }
+ * ```
+ *
+ * It is possible to modify this object, but such modifications will not be
+ * reflected outside the Node.js process, or (unless explicitly requested)
+ * to other `Worker` threads.
+ * In other words, the following example would not work:
+ *
+ * ```console
+ * $ node -e 'process.env.foo = "bar"' &#x26;&#x26; echo $foo
+ * ```
+ *
+ * While the following will:
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.foo = 'bar';
+ * console.log(env.foo);
+ * ```
+ *
+ * Assigning a property on `process.env` will implicitly convert the value
+ * to a string. **This behavior is deprecated.** Future versions of Node.js may
+ * throw an error when the value is not a string, number, or boolean.
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.test = null;
+ * console.log(env.test);
+ * // => 'null'
+ * env.test = undefined;
+ * console.log(env.test);
+ * // => 'undefined'
+ * ```
+ *
+ * Use `delete` to delete a property from `process.env`.
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.TEST = 1;
+ * delete env.TEST;
+ * console.log(env.TEST);
+ * // => undefined
+ * ```
+ *
+ * On Windows operating systems, environment variables are case-insensitive.
+ *
+ * ```js
+ * import { env } from 'process';
+ *
+ * env.TEST = 1;
+ * console.log(env.test);
+ * // => 1
+ * ```
+ *
+ * Unless explicitly specified when creating a `Worker` instance,
+ * each `Worker` thread has its own copy of `process.env`, based on its
+ * parent thread’s `process.env`, or whatever was specified as the `env` option
+ * to the `Worker` constructor. Changes to `process.env` will not be visible
+ * across `Worker` threads, and only the main thread can make changes that
+ * are visible to the operating system or to native add-ons.
+ * @since v0.1.27
+ */
+ env: ProcessEnv;
+ /**
+ * The `process.exit()` method instructs Node.js to terminate the process
+ * synchronously with an exit status of `code`. If `code` is omitted, exit uses
+ * either the 'success' code `0` or the value of `process.exitCode` if it has been
+ * set. Node.js will not terminate until all the `'exit'` event listeners are
+ * called.
+ *
+ * To exit with a 'failure' code:
+ *
+ * ```js
+ * import { exit } from 'process';
+ *
+ * exit(1);
+ * ```
+ *
+ * The shell that executed Node.js should see the exit code as `1`.
+ *
+ * Calling `process.exit()` will force the process to exit as quickly as possible
+ * even if there are still asynchronous operations pending that have not yet
+ * completed fully, including I/O operations to `process.stdout` and`process.stderr`.
+ *
+ * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_
+ * _work pending_ in the event loop. The `process.exitCode` property can be set to
+ * tell the process which exit code to use when the process exits gracefully.
+ *
+ * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being
+ * truncated and lost:
+ *
+ * ```js
+ * import { exit } from 'process';
+ *
+ * // This is an example of what *not* to do:
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * exit(1);
+ * }
+ * ```
+ *
+ * The reason this is problematic is because writes to `process.stdout` in Node.js
+ * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
+ *
+ * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
+ * scheduling any additional work for the event loop:
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * // How to properly set the exit code while letting
+ * // the process exit gracefully.
+ * if (someConditionNotMet()) {
+ * printUsageToStdout();
+ * process.exitCode = 1;
+ * }
+ * ```
+ *
+ * If it is necessary to terminate the Node.js process due to an error condition,
+ * throwing an _uncaught_ error and allowing the process to terminate accordingly
+ * is safer than calling `process.exit()`.
+ *
+ * In `Worker` threads, this function stops the current thread rather
+ * than the current process.
+ * @since v0.1.13
+ * @param [code=0] The exit code.
+ */
+ exit(code?: number): never;
+ /**
+ * A number which will be the process exit code, when the process either
+ * exits gracefully, or is exited via {@link exit} without specifying
+ * a code.
+ *
+ * Specifying a code to {@link exit} will override any
+ * previous setting of `process.exitCode`.
+ * @since v0.11.8
+ */
+ exitCode?: number | undefined;
+ /**
+ * The `process.getgid()` method returns the numerical group identity of the
+ * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.31
+ */
+ getgid?: () => number;
+ /**
+ * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
+ * numeric ID or a group name
+ * string. If a group name is specified, this method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgid &#x26;&#x26; process.setgid) {
+ * console.log(`Current gid: ${process.getgid()}`);
+ * try {
+ * process.setgid(501);
+ * console.log(`New gid: ${process.getgid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.31
+ * @param id The group name or ID
+ */
+ setgid?: (id: number | string) => void;
+ /**
+ * The `process.getuid()` method returns the numeric user identity of the process.
+ * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.1.28
+ */
+ getuid?: () => number;
+ /**
+ * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
+ * numeric ID or a username string.
+ * If a username is specified, the method blocks while resolving the associated
+ * numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getuid &#x26;&#x26; process.setuid) {
+ * console.log(`Current uid: ${process.getuid()}`);
+ * try {
+ * process.setuid(501);
+ * console.log(`New uid: ${process.getuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.1.28
+ */
+ setuid?: (id: number | string) => void;
+ /**
+ * The `process.geteuid()` method returns the numerical effective user identity of
+ * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ geteuid?: () => number;
+ /**
+ * The `process.seteuid()` method sets the effective user identity of the process.
+ * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
+ * string. If a username is specified, the method blocks while resolving the
+ * associated numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.geteuid &#x26;&#x26; process.seteuid) {
+ * console.log(`Current uid: ${process.geteuid()}`);
+ * try {
+ * process.seteuid(501);
+ * console.log(`New uid: ${process.geteuid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set uid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A user name or ID
+ */
+ seteuid?: (id: number | string) => void;
+ /**
+ * The `process.getegid()` method returns the numerical effective group identity
+ * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v2.0.0
+ */
+ getegid?: () => number;
+ /**
+ * The `process.setegid()` method sets the effective group identity of the process.
+ * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
+ * name string. If a group name is specified, this method blocks while resolving
+ * the associated a numeric ID.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getegid &#x26;&#x26; process.setegid) {
+ * console.log(`Current gid: ${process.getegid()}`);
+ * try {
+ * process.setegid(501);
+ * console.log(`New gid: ${process.getegid()}`);
+ * } catch (err) {
+ * console.log(`Failed to set gid: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v2.0.0
+ * @param id A group name or ID
+ */
+ setegid?: (id: number | string) => void;
+ /**
+ * The `process.getgroups()` method returns an array with the supplementary group
+ * IDs. POSIX leaves it unspecified if the effective group ID is included but
+ * Node.js ensures it always is.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups) {
+ * console.log(process.getgroups()); // [ 16, 21, 297 ]
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * @since v0.9.4
+ */
+ getgroups?: () => number[];
+ /**
+ * The `process.setgroups()` method sets the supplementary group IDs for the
+ * Node.js process. This is a privileged operation that requires the Node.js
+ * process to have `root` or the `CAP_SETGID` capability.
+ *
+ * The `groups` array can contain numeric group IDs, group names, or both.
+ *
+ * ```js
+ * import process from 'process';
+ *
+ * if (process.getgroups &#x26;&#x26; process.setgroups) {
+ * try {
+ * process.setgroups([501]);
+ * console.log(process.getgroups()); // new groups
+ * } catch (err) {
+ * console.log(`Failed to set groups: ${err}`);
+ * }
+ * }
+ * ```
+ *
+ * This function is only available on POSIX platforms (i.e. not Windows or
+ * Android).
+ * This feature is not available in `Worker` threads.
+ * @since v0.9.4
+ */
+ setgroups?: (groups: ReadonlyArray<string | number>) => void;
+ /**
+ * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
+ * that will be invoked when an uncaught exception occurs, which will receive the
+ * exception value itself as its first argument.
+ *
+ * If such a function is set, the `'uncaughtException'` event will
+ * not be emitted. If `--abort-on-uncaught-exception` was passed from the
+ * command line or set through `v8.setFlagsFromString()`, the process will
+ * not abort. Actions configured to take place on exceptions such as report
+ * generations will be affected too
+ *
+ * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this
+ * method with a non-`null` argument while another capture function is set will
+ * throw an error.
+ *
+ * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
+ * @since v9.3.0
+ */
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
+ /**
+ * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
+ * @since v9.3.0
+ */
+ hasUncaughtExceptionCaptureCallback(): boolean;
+ /**
+ * The `process.version` property contains the Node.js version string.
+ *
+ * ```js
+ * import { version } from 'process';
+ *
+ * console.log(`Version: ${version}`);
+ * // Version: v14.8.0
+ * ```
+ *
+ * To get the version string without the prepended _v_, use`process.versions.node`.
+ * @since v0.1.3
+ */
+ readonly version: string;
+ /**
+ * The `process.versions` property returns an object listing the version strings of
+ * Node.js and its dependencies. `process.versions.modules` indicates the current
+ * ABI version, which is increased whenever a C++ API changes. Node.js will refuse
+ * to load modules that were compiled against a different module ABI version.
+ *
+ * ```js
+ * import { versions } from 'process';
+ *
+ * console.log(versions);
+ * ```
+ *
+ * Will generate an object similar to:
+ *
+ * ```console
+ * { node: '11.13.0',
+ * v8: '7.0.276.38-node.18',
+ * uv: '1.27.0',
+ * zlib: '1.2.11',
+ * brotli: '1.0.7',
+ * ares: '1.15.0',
+ * modules: '67',
+ * nghttp2: '1.34.0',
+ * napi: '4',
+ * llhttp: '1.1.1',
+ * openssl: '1.1.1b',
+ * cldr: '34.0',
+ * icu: '63.1',
+ * tz: '2018e',
+ * unicode: '11.0' }
+ * ```
+ * @since v0.2.0
+ */
+ readonly versions: ProcessVersions;
+ /**
+ * The `process.config` property returns an `Object` containing the JavaScript
+ * representation of the configure options used to compile the current Node.js
+ * executable. This is the same as the `config.gypi` file that was produced when
+ * running the `./configure` script.
+ *
+ * An example of the possible output looks like:
+ *
+ * ```js
+ * {
+ * target_defaults:
+ * { cflags: [],
+ * default_configuration: 'Release',
+ * defines: [],
+ * include_dirs: [],
+ * libraries: [] },
+ * variables:
+ * {
+ * host_arch: 'x64',
+ * napi_build_version: 5,
+ * node_install_npm: 'true',
+ * node_prefix: '',
+ * node_shared_cares: 'false',
+ * node_shared_http_parser: 'false',
+ * node_shared_libuv: 'false',
+ * node_shared_zlib: 'false',
+ * node_use_dtrace: 'false',
+ * node_use_openssl: 'true',
+ * node_shared_openssl: 'false',
+ * strict_aliasing: 'true',
+ * target_arch: 'x64',
+ * v8_use_snapshot: 1
+ * }
+ * }
+ * ```
+ *
+ * The `process.config` property is **not** read-only and there are existing
+ * modules in the ecosystem that are known to extend, modify, or entirely replace
+ * the value of `process.config`.
+ *
+ * Modifying the `process.config` property, or any child-property of the`process.config` object has been deprecated. The `process.config` will be made
+ * read-only in a future release.
+ * @since v0.7.7
+ */
+ readonly config: ProcessConfig;
+ /**
+ * The `process.kill()` method sends the `signal` to the process identified by`pid`.
+ *
+ * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information.
+ *
+ * This method will throw an error if the target `pid` does not exist. As a special
+ * case, a signal of `0` can be used to test for the existence of a process.
+ * Windows platforms will throw an error if the `pid` is used to kill a process
+ * group.
+ *
+ * Even though the name of this function is `process.kill()`, it is really just a
+ * signal sender, like the `kill` system call. The signal sent may do something
+ * other than kill the target process.
+ *
+ * ```js
+ * import process, { kill } from 'process';
+ *
+ * process.on('SIGHUP', () => {
+ * console.log('Got SIGHUP signal.');
+ * });
+ *
+ * setTimeout(() => {
+ * console.log('Exiting.');
+ * process.exit(0);
+ * }, 100);
+ *
+ * kill(process.pid, 'SIGHUP');
+ * ```
+ *
+ * When `SIGUSR1` is received by a Node.js process, Node.js will start the
+ * debugger. See `Signal Events`.
+ * @since v0.0.6
+ * @param pid A process ID
+ * @param [signal='SIGTERM'] The signal to send, either as a string or number.
+ */
+ kill(pid: number, signal?: string | number): true;
+ /**
+ * The `process.pid` property returns the PID of the process.
+ *
+ * ```js
+ * import { pid } from 'process';
+ *
+ * console.log(`This process is pid ${pid}`);
+ * ```
+ * @since v0.1.15
+ */
+ readonly pid: number;
+ /**
+ * The `process.ppid` property returns the PID of the parent of the
+ * current process.
+ *
+ * ```js
+ * import { ppid } from 'process';
+ *
+ * console.log(`The parent process is pid ${ppid}`);
+ * ```
+ * @since v9.2.0, v8.10.0, v6.13.0
+ */
+ readonly ppid: number;
+ /**
+ * The `process.title` property returns the current process title (i.e. returns
+ * the current value of `ps`). Assigning a new value to `process.title` modifies
+ * the current value of `ps`.
+ *
+ * When a new value is assigned, different platforms will impose different maximum
+ * length restrictions on the title. Usually such restrictions are quite limited.
+ * For instance, on Linux and macOS, `process.title` is limited to the size of the
+ * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8
+ * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure)
+ * cases.
+ *
+ * Assigning a value to `process.title` might not result in an accurate label
+ * within process manager applications such as macOS Activity Monitor or Windows
+ * Services Manager.
+ * @since v0.1.104
+ */
+ title: string;
+ /**
+ * The operating system CPU architecture for which the Node.js binary was compiled.
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
+ *
+ * ```js
+ * import { arch } from 'process';
+ *
+ * console.log(`This processor architecture is ${arch}`);
+ * ```
+ * @since v0.5.0
+ */
+ readonly arch: Architecture;
+ /**
+ * The `process.platform` property returns a string identifying the operating
+ * system platform for which the Node.js binary was compiled.
+ *
+ * Currently possible values are:
+ *
+ * * `'aix'`
+ * * `'darwin'`
+ * * `'freebsd'`
+ * * `'linux'`
+ * * `'openbsd'`
+ * * `'sunos'`
+ * * `'win32'`
+ *
+ * ```js
+ * import { platform } from 'process';
+ *
+ * console.log(`This platform is ${platform}`);
+ * ```
+ *
+ * The value `'android'` may also be returned if the Node.js is built on the
+ * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+ * @since v0.1.16
+ */
+ readonly platform: Platform;
+ /**
+ * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
+ * runtime, `require.main` may still refer to the original main module in
+ * modules that were required before the change occurred. Generally, it's
+ * safe to assume that the two refer to the same module.
+ *
+ * As with `require.main`, `process.mainModule` will be `undefined` if there
+ * is no entry script.
+ * @since v0.1.17
+ * @deprecated Since v14.0.0 - Use `main` instead.
+ */
+ mainModule?: Module | undefined;
+ memoryUsage: MemoryUsageFn;
+ /**
+ * The `process.cpuUsage()` method returns the user and system CPU time usage of
+ * the current process, in an object with properties `user` and `system`, whose
+ * values are microsecond values (millionth of a second). These values measure time
+ * spent in user and system code respectively, and may end up being greater than
+ * actual elapsed time if multiple CPU cores are performing work for this process.
+ *
+ * The result of a previous call to `process.cpuUsage()` can be passed as the
+ * argument to the function, to get a diff reading.
+ *
+ * ```js
+ * import { cpuUsage } from 'process';
+ *
+ * const startUsage = cpuUsage();
+ * // { user: 38579, system: 6986 }
+ *
+ * // spin the CPU for 500 milliseconds
+ * const now = Date.now();
+ * while (Date.now() - now < 500);
+ *
+ * console.log(cpuUsage(startUsage));
+ * // { user: 514883, system: 11226 }
+ * ```
+ * @since v6.1.0
+ * @param previousValue A previous return value from calling `process.cpuUsage()`
+ */
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
+ /**
+ * `process.nextTick()` adds `callback` to the "next tick queue". This queue is
+ * fully drained after the current operation on the JavaScript stack runs to
+ * completion and before the event loop is allowed to continue. It's possible to
+ * create an infinite loop if one were to recursively call `process.nextTick()`.
+ * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
+ *
+ * ```js
+ * import { nextTick } from 'process';
+ *
+ * console.log('start');
+ * nextTick(() => {
+ * console.log('nextTick callback');
+ * });
+ * console.log('scheduled');
+ * // Output:
+ * // start
+ * // scheduled
+ * // nextTick callback
+ * ```
+ *
+ * This is important when developing APIs in order to give users the opportunity
+ * to assign event handlers _after_ an object has been constructed but before any
+ * I/O has occurred:
+ *
+ * ```js
+ * import { nextTick } from 'process';
+ *
+ * function MyThing(options) {
+ * this.setupOptions(options);
+ *
+ * nextTick(() => {
+ * this.startDoingStuff();
+ * });
+ * }
+ *
+ * const thing = new MyThing();
+ * thing.getReadyForStuff();
+ *
+ * // thing.startDoingStuff() gets called now, not before.
+ * ```
+ *
+ * It is very important for APIs to be either 100% synchronous or 100%
+ * asynchronous. Consider this example:
+ *
+ * ```js
+ * // WARNING! DO NOT USE! BAD UNSAFE HAZARD!
+ * function maybeSync(arg, cb) {
+ * if (arg) {
+ * cb();
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ *
+ * This API is hazardous because in the following case:
+ *
+ * ```js
+ * const maybeTrue = Math.random() > 0.5;
+ *
+ * maybeSync(maybeTrue, () => {
+ * foo();
+ * });
+ *
+ * bar();
+ * ```
+ *
+ * It is not clear whether `foo()` or `bar()` will be called first.
+ *
+ * The following approach is much better:
+ *
+ * ```js
+ * import { nextTick } from 'process';
+ *
+ * function definitelyAsync(arg, cb) {
+ * if (arg) {
+ * nextTick(cb);
+ * return;
+ * }
+ *
+ * fs.stat('file', cb);
+ * }
+ * ```
+ * @since v0.1.26
+ * @param args Additional arguments to pass when invoking the `callback`
+ */
+ nextTick(callback: Function, ...args: any[]): void;
+ /**
+ * The `process.release` property returns an `Object` containing metadata related
+ * to the current release, including URLs for the source tarball and headers-only
+ * tarball.
+ *
+ * `process.release` contains the following properties:
+ *
+ * ```js
+ * {
+ * name: 'node',
+ * lts: 'Erbium',
+ * sourceUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1.tar.gz',
+ * headersUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1-headers.tar.gz',
+ * libUrl: 'https://nodejs.org/download/release/v12.18.1/win-x64/node.lib'
+ * }
+ * ```
+ *
+ * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be
+ * relied upon to exist.
+ * @since v3.0.0
+ */
+ readonly release: ProcessRelease;
+ features: {
+ inspector: boolean;
+ debug: boolean;
+ uv: boolean;
+ ipv6: boolean;
+ tls_alpn: boolean;
+ tls_sni: boolean;
+ tls_ocsp: boolean;
+ tls: boolean;
+ };
+ /**
+ * `process.umask()` returns the Node.js process's file mode creation mask. Child
+ * processes inherit the mask from the parent process.
+ * @since v0.1.19
+ * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential *
+ * security vulnerability. There is no safe, cross-platform alternative API.
+ */
+ umask(): number;
+ /**
+ * Can only be set if not in worker thread.
+ */
+ umask(mask: string | number): number;
+ /**
+ * The `process.uptime()` method returns the number of seconds the current Node.js
+ * process has been running.
+ *
+ * The return value includes fractions of a second. Use `Math.floor()` to get whole
+ * seconds.
+ * @since v0.5.0
+ */
+ uptime(): number;
+ hrtime: HRTime;
+ /**
+ * If Node.js is spawned with an IPC channel, the `process.send()` method can be
+ * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
+ *
+ * If Node.js was not spawned with an IPC channel, `process.send` will be`undefined`.
+ *
+ * The message goes through serialization and parsing. The resulting message might
+ * not be the same as what is originally sent.
+ * @since v0.5.9
+ * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties:
+ */
+ send?(
+ message: any,
+ sendHandle?: any,
+ options?: {
+ swallowErrors?: boolean | undefined;
+ },
+ callback?: (error: Error | null) => void
+ ): boolean;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
+ * IPC channel to the parent process, allowing the child process to exit gracefully
+ * once there are no other connections keeping it alive.
+ *
+ * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
+ *
+ * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`.
+ * @since v0.7.2
+ */
+ disconnect(): void;
+ /**
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return`true` so long as the IPC
+ * channel is connected and will return `false` after`process.disconnect()` is called.
+ *
+ * Once `process.connected` is `false`, it is no longer possible to send messages
+ * over the IPC channel using `process.send()`.
+ * @since v0.7.2
+ */
+ connected: boolean;
+ /**
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
+ * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
+ *
+ * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag
+ * representations. `process.allowedNodeEnvironmentFlags.has()` will
+ * return `true` in the following cases:
+ *
+ * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`.
+ * * Flags passed through to V8 (as listed in `--v8-options`) may replace
+ * one or more _non-leading_ dashes for an underscore, or vice-versa;
+ * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
+ * etc.
+ * * Flags may contain one or more equals (`=`) characters; all
+ * characters after and including the first equals will be ignored;
+ * e.g., `--stack-trace-limit=100`.
+ * * Flags _must_ be allowable within `NODE_OPTIONS`.
+ *
+ * When iterating over `process.allowedNodeEnvironmentFlags`, flags will
+ * appear only _once_; each will begin with one or more dashes. Flags
+ * passed through to V8 will contain underscores instead of non-leading
+ * dashes:
+ *
+ * ```js
+ * import { allowedNodeEnvironmentFlags } from 'process';
+ *
+ * allowedNodeEnvironmentFlags.forEach((flag) => {
+ * // -r
+ * // --inspect-brk
+ * // --abort_on_uncaught_exception
+ * // ...
+ * });
+ * ```
+ *
+ * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
+ * silently.
+ *
+ * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
+ * contain what _would have_ been allowable.
+ * @since v10.10.0
+ */
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
+ /**
+ * `process.report` is an object whose methods are used to generate diagnostic
+ * reports for the current process. Additional documentation is available in the `report documentation`.
+ * @since v11.8.0
+ */
+ report?: ProcessReport | undefined;
+ /**
+ * ```js
+ * import { resourceUsage } from 'process';
+ *
+ * console.log(resourceUsage());
+ * /*
+ * Will output:
+ * {
+ * userCPUTime: 82872,
+ * systemCPUTime: 4143,
+ * maxRSS: 33164,
+ * sharedMemorySize: 0,
+ * unsharedDataSize: 0,
+ * unsharedStackSize: 0,
+ * minorPageFault: 2469,
+ * majorPageFault: 0,
+ * swappedOut: 0,
+ * fsRead: 0,
+ * fsWrite: 8,
+ * ipcSent: 0,
+ * ipcReceived: 0,
+ * signalsCount: 0,
+ * voluntaryContextSwitches: 79,
+ * involuntaryContextSwitches: 1
+ * }
+ *
+ * ```
+ * @since v12.6.0
+ * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t].
+ */
+ resourceUsage(): ResourceUsage;
+ /**
+ * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the
+ * documentation for the `'warning' event` and the `emitWarning() method` for more information about this
+ * flag's behavior.
+ * @since v0.8.0
+ */
+ traceDeprecation: boolean;
+ /* EventEmitter */
+ addListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ addListener(event: 'disconnect', listener: DisconnectListener): this;
+ addListener(event: 'exit', listener: ExitListener): this;
+ addListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ addListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ addListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ addListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ addListener(event: 'warning', listener: WarningListener): this;
+ addListener(event: 'message', listener: MessageListener): this;
+ addListener(event: Signals, listener: SignalsListener): this;
+ addListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ addListener(event: 'worker', listener: WorkerListener): this;
+ emit(event: 'beforeExit', code: number): boolean;
+ emit(event: 'disconnect'): boolean;
+ emit(event: 'exit', code: number): boolean;
+ emit(event: 'rejectionHandled', promise: Promise<unknown>): boolean;
+ emit(event: 'uncaughtException', error: Error): boolean;
+ emit(event: 'uncaughtExceptionMonitor', error: Error): boolean;
+ emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean;
+ emit(event: 'warning', warning: Error): boolean;
+ emit(event: 'message', message: unknown, sendHandle: unknown): this;
+ emit(event: Signals, signal?: Signals): boolean;
+ emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
+ emit(event: 'worker', listener: WorkerListener): this;
+ on(event: 'beforeExit', listener: BeforeExitListener): this;
+ on(event: 'disconnect', listener: DisconnectListener): this;
+ on(event: 'exit', listener: ExitListener): this;
+ on(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ on(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ on(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ on(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ on(event: 'warning', listener: WarningListener): this;
+ on(event: 'message', listener: MessageListener): this;
+ on(event: Signals, listener: SignalsListener): this;
+ on(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ on(event: 'worker', listener: WorkerListener): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'beforeExit', listener: BeforeExitListener): this;
+ once(event: 'disconnect', listener: DisconnectListener): this;
+ once(event: 'exit', listener: ExitListener): this;
+ once(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ once(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ once(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ once(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ once(event: 'warning', listener: WarningListener): this;
+ once(event: 'message', listener: MessageListener): this;
+ once(event: Signals, listener: SignalsListener): this;
+ once(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ once(event: 'worker', listener: WorkerListener): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependListener(event: 'exit', listener: ExitListener): this;
+ prependListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependListener(event: 'warning', listener: WarningListener): this;
+ prependListener(event: 'message', listener: MessageListener): this;
+ prependListener(event: Signals, listener: SignalsListener): this;
+ prependListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependListener(event: 'worker', listener: WorkerListener): this;
+ prependOnceListener(event: 'beforeExit', listener: BeforeExitListener): this;
+ prependOnceListener(event: 'disconnect', listener: DisconnectListener): this;
+ prependOnceListener(event: 'exit', listener: ExitListener): this;
+ prependOnceListener(event: 'rejectionHandled', listener: RejectionHandledListener): this;
+ prependOnceListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this;
+ prependOnceListener(event: 'warning', listener: WarningListener): this;
+ prependOnceListener(event: 'message', listener: MessageListener): this;
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
+ prependOnceListener(event: 'multipleResolves', listener: MultipleResolveListener): this;
+ prependOnceListener(event: 'worker', listener: WorkerListener): this;
+ listeners(event: 'beforeExit'): BeforeExitListener[];
+ listeners(event: 'disconnect'): DisconnectListener[];
+ listeners(event: 'exit'): ExitListener[];
+ listeners(event: 'rejectionHandled'): RejectionHandledListener[];
+ listeners(event: 'uncaughtException'): UncaughtExceptionListener[];
+ listeners(event: 'uncaughtExceptionMonitor'): UncaughtExceptionListener[];
+ listeners(event: 'unhandledRejection'): UnhandledRejectionListener[];
+ listeners(event: 'warning'): WarningListener[];
+ listeners(event: 'message'): MessageListener[];
+ listeners(event: Signals): SignalsListener[];
+ listeners(event: 'multipleResolves'): MultipleResolveListener[];
+ listeners(event: 'worker'): WorkerListener[];
+ }
+ }
+ }
+ export = process;
+}
+declare module 'node:process' {
+ import process = require('process');
+ export = process;
+}
diff --git a/node_modules/@types/node/ts4.8/punycode.d.ts b/node_modules/@types/node/ts4.8/punycode.d.ts
new file mode 100755
index 0000000..87ebbb9
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/punycode.d.ts
@@ -0,0 +1,117 @@
+/**
+ * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users
+ * currently depending on the `punycode` module should switch to using the
+ * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL
+ * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`.
+ *
+ * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It
+ * can be accessed using:
+ *
+ * ```js
+ * const punycode = require('punycode');
+ * ```
+ *
+ * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is
+ * primarily intended for use in Internationalized Domain Names. Because host
+ * names in URLs are limited to ASCII characters only, Domain Names that contain
+ * non-ASCII characters must be converted into ASCII using the Punycode scheme.
+ * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent
+ * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`.
+ *
+ * The `punycode` module provides a simple implementation of the Punycode standard.
+ *
+ * The `punycode` module is a third-party dependency used by Node.js and
+ * made available to developers as a convenience. Fixes or other modifications to
+ * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
+ * @deprecated Since v7.0.0 - Deprecated
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/punycode.js)
+ */
+declare module 'punycode' {
+ /**
+ * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
+ * characters to the equivalent string of Unicode codepoints.
+ *
+ * ```js
+ * punycode.decode('maana-pta'); // 'mañana'
+ * punycode.decode('--dqo34k'); // '☃-⌘'
+ * ```
+ * @since v0.5.1
+ */
+ function decode(string: string): string;
+ /**
+ * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
+ *
+ * ```js
+ * punycode.encode('mañana'); // 'maana-pta'
+ * punycode.encode('☃-⌘'); // '--dqo34k'
+ * ```
+ * @since v0.5.1
+ */
+ function encode(string: string): string;
+ /**
+ * The `punycode.toUnicode()` method converts a string representing a domain name
+ * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
+ * converted.
+ *
+ * ```js
+ * // decode domain names
+ * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
+ * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
+ * punycode.toUnicode('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toUnicode(domain: string): string;
+ /**
+ * The `punycode.toASCII()` method converts a Unicode string representing an
+ * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the
+ * domain name will be converted. Calling `punycode.toASCII()` on a string that
+ * already only contains ASCII characters will have no effect.
+ *
+ * ```js
+ * // encode domain names
+ * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
+ * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
+ * punycode.toASCII('example.com'); // 'example.com'
+ * ```
+ * @since v0.6.1
+ */
+ function toASCII(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const ucs2: ucs2;
+ interface ucs2 {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ decode(string: string): number[];
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ encode(codePoints: ReadonlyArray<number>): string;
+ }
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const version: string;
+}
+declare module 'node:punycode' {
+ export * from 'punycode';
+}
diff --git a/node_modules/@types/node/ts4.8/querystring.d.ts b/node_modules/@types/node/ts4.8/querystring.d.ts
new file mode 100755
index 0000000..e694d8c
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/querystring.d.ts
@@ -0,0 +1,131 @@
+/**
+ * The `querystring` module provides utilities for parsing and formatting URL
+ * query strings. It can be accessed using:
+ *
+ * ```js
+ * const querystring = require('querystring');
+ * ```
+ *
+ * The `querystring` API is considered Legacy. While it is still maintained,
+ * new code should use the `URLSearchParams` API instead.
+ * @deprecated Legacy
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js)
+ */
+declare module 'querystring' {
+ interface StringifyOptions {
+ encodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParseOptions {
+ maxKeys?: number | undefined;
+ decodeURIComponent?: ((str: string) => string) | undefined;
+ }
+ interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
+ interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {}
+ /**
+ * The `querystring.stringify()` method produces a URL query string from a
+ * given `obj` by iterating through the object's "own properties".
+ *
+ * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
+ * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+ * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+ * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+ * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
+ * empty strings.
+ *
+ * ```js
+ * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
+ * // Returns 'foo=bar&#x26;baz=qux&#x26;baz=quux&#x26;corge='
+ *
+ * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
+ * // Returns 'foo:bar;baz:qux'
+ * ```
+ *
+ * By default, characters requiring percent-encoding within the query string will
+ * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkEncodeURIComponent function already exists,
+ *
+ * querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
+ * { encodeURIComponent: gbkEncodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param obj The object to serialize into a URL query string
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
+ /**
+ * The `querystring.parse()` method parses a URL query string (`str`) into a
+ * collection of key and value pairs.
+ *
+ * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
+ *
+ * ```js
+ * {
+ * foo: 'bar',
+ * abc: ['xyz', '123']
+ * }
+ * ```
+ *
+ * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`,
+ * `obj.hasOwnProperty()`, and others
+ * are not defined and _will not work_.
+ *
+ * By default, percent-encoded characters within the query string will be assumed
+ * to use UTF-8 encoding. If an alternative character encoding is used, then an
+ * alternative `decodeURIComponent` option will need to be specified:
+ *
+ * ```js
+ * // Assuming gbkDecodeURIComponent function already exists...
+ *
+ * querystring.parse('w=%D6%D0%CE%C4&#x26;foo=bar', null, null,
+ * { decodeURIComponent: gbkDecodeURIComponent });
+ * ```
+ * @since v0.1.25
+ * @param str The URL query string to parse
+ * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+ * @param [eq='='] . The substring used to delimit keys and values in the query string.
+ */
+ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
+ /**
+ * The querystring.encode() function is an alias for querystring.stringify().
+ */
+ const encode: typeof stringify;
+ /**
+ * The querystring.decode() function is an alias for querystring.parse().
+ */
+ const decode: typeof parse;
+ /**
+ * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL
+ * query strings.
+ *
+ * The `querystring.escape()` method is used by `querystring.stringify()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement percent-encoding implementation if
+ * necessary by assigning `querystring.escape` to an alternative function.
+ * @since v0.1.25
+ */
+ function escape(str: string): string;
+ /**
+ * The `querystring.unescape()` method performs decoding of URL percent-encoded
+ * characters on the given `str`.
+ *
+ * The `querystring.unescape()` method is used by `querystring.parse()` and is
+ * generally not expected to be used directly. It is exported primarily to allow
+ * application code to provide a replacement decoding implementation if
+ * necessary by assigning `querystring.unescape` to an alternative function.
+ *
+ * By default, the `querystring.unescape()` method will attempt to use the
+ * JavaScript built-in `decodeURIComponent()` method to decode. If that fails,
+ * a safer equivalent that does not throw on malformed URLs will be used.
+ * @since v0.1.25
+ */
+ function unescape(str: string): string;
+}
+declare module 'node:querystring' {
+ export * from 'querystring';
+}
diff --git a/node_modules/@types/node/ts4.8/readline.d.ts b/node_modules/@types/node/ts4.8/readline.d.ts
new file mode 100755
index 0000000..6ab64ac
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/readline.d.ts
@@ -0,0 +1,653 @@
+/**
+ * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
+ *
+ * To use the promise-based APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline';
+ * ```
+ *
+ * The following simple example illustrates the basic use of the `readline` module.
+ *
+ * ```js
+ * import * as readline from 'node:readline/promises';
+ * import { stdin as input, stdout as output } from 'node:process';
+ *
+ * const rl = readline.createInterface({ input, output });
+ *
+ * const answer = await rl.question('What do you think of Node.js? ');
+ *
+ * console.log(`Thank you for your valuable feedback: ${answer}`);
+ *
+ * rl.close();
+ * ```
+ *
+ * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
+ * received on the `input` stream.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js)
+ */
+declare module 'readline' {
+ import { Abortable, EventEmitter } from 'node:events';
+ import * as promises from 'node:readline/promises';
+
+ export { promises };
+ export interface Key {
+ sequence?: string | undefined;
+ name?: string | undefined;
+ ctrl?: boolean | undefined;
+ meta?: boolean | undefined;
+ shift?: boolean | undefined;
+ }
+ /**
+ * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
+ * single `input` `Readable` stream and a single `output` `Writable` stream.
+ * The `output` stream is used to print prompts for user input that arrives on,
+ * and is read from, the `input` stream.
+ * @since v0.1.104
+ */
+ export class Interface extends EventEmitter {
+ readonly terminal: boolean;
+ /**
+ * The current input data being processed by node.
+ *
+ * This can be used when collecting input from a TTY stream to retrieve the
+ * current value that has been processed thus far, prior to the `line` event
+ * being emitted. Once the `line` event has been emitted, this property will
+ * be an empty string.
+ *
+ * Be aware that modifying the value during the instance runtime may have
+ * unintended consequences if `rl.cursor` is not also controlled.
+ *
+ * **If not using a TTY stream for input, use the `'line'` event.**
+ *
+ * One possible use case would be as follows:
+ *
+ * ```js
+ * const values = ['lorem ipsum', 'dolor sit amet'];
+ * const rl = readline.createInterface(process.stdin);
+ * const showResults = debounce(() => {
+ * console.log(
+ * '\n',
+ * values.filter((val) => val.startsWith(rl.line)).join(' ')
+ * );
+ * }, 300);
+ * process.stdin.on('keypress', (c, k) => {
+ * showResults();
+ * });
+ * ```
+ * @since v0.1.98
+ */
+ readonly line: string;
+ /**
+ * The cursor position relative to `rl.line`.
+ *
+ * This will track where the current cursor lands in the input string, when
+ * reading input from a TTY stream. The position of cursor determines the
+ * portion of the input string that will be modified as input is processed,
+ * as well as the column where the terminal caret will be rendered.
+ * @since v0.1.98
+ */
+ readonly cursor: number;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(options: ReadLineOptions);
+ /**
+ * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
+ * @since v15.3.0
+ * @return the current prompt string
+ */
+ getPrompt(): string;
+ /**
+ * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
+ * @since v0.1.98
+ */
+ setPrompt(prompt: string): void;
+ /**
+ * The `rl.prompt()` method writes the `readline.Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
+ * location at which to provide input.
+ *
+ * When called, `rl.prompt()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `readline.Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
+ * @since v0.1.98
+ * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
+ */
+ prompt(preserveCursor?: boolean): void;
+ /**
+ * The `rl.question()` method displays the `query` by writing it to the `output`,
+ * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
+ *
+ * When called, `rl.question()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
+ *
+ * The `callback` function passed to `rl.question()` does not follow the typical
+ * pattern of accepting an `Error` object or `null` as the first argument.
+ * The `callback` is called with the provided answer as the only argument.
+ *
+ * Example usage:
+ *
+ * ```js
+ * rl.question('What is your favorite food? ', (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ * ```
+ *
+ * Using an `AbortController` to cancel a question.
+ *
+ * ```js
+ * const ac = new AbortController();
+ * const signal = ac.signal;
+ *
+ * rl.question('What is your favorite food? ', { signal }, (answer) => {
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * });
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * setTimeout(() => ac.abort(), 10000);
+ * ```
+ *
+ * If this method is invoked as it's util.promisify()ed version, it returns a
+ * Promise that fulfills with the answer. If the question is canceled using
+ * an `AbortController` it will reject with an `AbortError`.
+ *
+ * ```js
+ * const util = require('util');
+ * const question = util.promisify(rl.question).bind(rl);
+ *
+ * async function questionExample() {
+ * try {
+ * const answer = await question('What is you favorite food? ');
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * } catch (err) {
+ * console.error('Question rejected', err);
+ * }
+ * }
+ * questionExample();
+ * ```
+ * @since v0.3.3
+ * @param query A statement or query to write to `output`, prepended to the prompt.
+ * @param callback A callback function that is invoked with the user's input in response to the `query`.
+ */
+ question(query: string, callback: (answer: string) => void): void;
+ question(query: string, options: Abortable, callback: (answer: string) => void): void;
+ /**
+ * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
+ * later if necessary.
+ *
+ * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `readline.Interface` instance.
+ * @since v0.3.4
+ */
+ pause(): this;
+ /**
+ * The `rl.resume()` method resumes the `input` stream if it has been paused.
+ * @since v0.3.4
+ */
+ resume(): this;
+ /**
+ * The `rl.close()` method closes the `readline.Interface` instance and
+ * relinquishes control over the `input` and `output` streams. When called,
+ * the `'close'` event will be emitted.
+ *
+ * Calling `rl.close()` does not immediately stop other events (including `'line'`)
+ * from being emitted by the `readline.Interface` instance.
+ * @since v0.1.98
+ */
+ close(): void;
+ /**
+ * The `rl.write()` method will write either `data` or a key sequence identified
+ * by `key` to the `output`. The `key` argument is supported only if `output` is
+ * a `TTY` text terminal. See `TTY keybindings` for a list of key
+ * combinations.
+ *
+ * If `key` is specified, `data` is ignored.
+ *
+ * When called, `rl.write()` will resume the `input` stream if it has been
+ * paused.
+ *
+ * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
+ *
+ * ```js
+ * rl.write('Delete this!');
+ * // Simulate Ctrl+U to delete the line written previously
+ * rl.write(null, { ctrl: true, name: 'u' });
+ * ```
+ *
+ * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
+ * @since v0.1.98
+ */
+ write(data: string | Buffer, key?: Key): void;
+ write(data: undefined | null | string | Buffer, key: Key): void;
+ /**
+ * Returns the real position of the cursor in relation to the input
+ * prompt + string. Long input (wrapping) strings, as well as multiple
+ * line prompts are included in the calculations.
+ * @since v13.5.0, v12.16.0
+ */
+ getCursorPos(): CursorPos;
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. line
+ * 3. pause
+ * 4. resume
+ * 5. SIGCONT
+ * 6. SIGINT
+ * 7. SIGTSTP
+ * 8. history
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'history', listener: (history: string[]) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'history', history: string[]): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'history', listener: (history: string[]) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'history', listener: (history: string[]) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'history', listener: (history: string[]) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'history', listener: (history: string[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string>;
+ }
+ export type ReadLine = Interface; // type forwarded for backwards compatibility
+ export type Completer = (line: string) => CompleterResult;
+ export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
+ export type CompleterResult = [string[], string];
+ export interface ReadLineOptions {
+ input: NodeJS.ReadableStream;
+ output?: NodeJS.WritableStream | undefined;
+ completer?: Completer | AsyncCompleter | undefined;
+ terminal?: boolean | undefined;
+ /**
+ * Initial list of history lines. This option makes sense
+ * only if `terminal` is set to `true` by the user or by an internal `output`
+ * check, otherwise the history caching mechanism is not initialized at all.
+ * @default []
+ */
+ history?: string[] | undefined;
+ historySize?: number | undefined;
+ prompt?: string | undefined;
+ crlfDelay?: number | undefined;
+ /**
+ * If `true`, when a new input line added
+ * to the history list duplicates an older one, this removes the older line
+ * from the list.
+ * @default false
+ */
+ removeHistoryDuplicates?: boolean | undefined;
+ escapeCodeTimeout?: number | undefined;
+ tabSize?: number | undefined;
+ }
+ /**
+ * The `readline.createInterface()` method creates a new `readline.Interface`instance.
+ *
+ * ```js
+ * const readline = require('readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout
+ * });
+ * ```
+ *
+ * Once the `readline.Interface` instance is created, the most common case is to
+ * listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get
+ * the best compatibility if it defines an `output.columns` property and emits
+ * a `'resize'` event on the `output` if or when the columns ever change
+ * (`process.stdout` does this automatically when it is a TTY).
+ *
+ * When creating a `readline.Interface` using `stdin` as input, the program
+ * will not terminate until it receives `EOF` (Ctrl+D on
+ * Linux/macOS, Ctrl+Z followed by Return on
+ * Windows).
+ * If you want your application to exit without waiting for user input, you can `unref()` the standard input stream:
+ *
+ * ```js
+ * process.stdin.unref();
+ * ```
+ * @since v0.1.98
+ */
+ export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ export function createInterface(options: ReadLineOptions): Interface;
+ /**
+ * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
+ *
+ * Optionally, `interface` specifies a `readline.Interface` instance for which
+ * autocompletion is disabled when copy-pasted input is detected.
+ *
+ * If the `stream` is a `TTY`, then it must be in raw mode.
+ *
+ * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
+ * the `input` from emitting `'keypress'` events.
+ *
+ * ```js
+ * readline.emitKeypressEvents(process.stdin);
+ * if (process.stdin.isTTY)
+ * process.stdin.setRawMode(true);
+ * ```
+ *
+ * ## Example: Tiny CLI
+ *
+ * The following example illustrates the use of `readline.Interface` class to
+ * implement a small command-line interface:
+ *
+ * ```js
+ * const readline = require('readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * prompt: 'OHAI> '
+ * });
+ *
+ * rl.prompt();
+ *
+ * rl.on('line', (line) => {
+ * switch (line.trim()) {
+ * case 'hello':
+ * console.log('world!');
+ * break;
+ * default:
+ * console.log(`Say what? I might have heard '${line.trim()}'`);
+ * break;
+ * }
+ * rl.prompt();
+ * }).on('close', () => {
+ * console.log('Have a great day!');
+ * process.exit(0);
+ * });
+ * ```
+ *
+ * ## Example: Read file stream line-by-Line
+ *
+ * A common use case for `readline` is to consume an input file one line at a
+ * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+ * well as a `for await...of` loop:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * async function processLineByLine() {
+ * const fileStream = fs.createReadStream('input.txt');
+ *
+ * const rl = readline.createInterface({
+ * input: fileStream,
+ * crlfDelay: Infinity
+ * });
+ * // Note: we use the crlfDelay option to recognize all instances of CR LF
+ * // ('\r\n') in input.txt as a single line break.
+ *
+ * for await (const line of rl) {
+ * // Each line in input.txt will be successively available here as `line`.
+ * console.log(`Line from file: ${line}`);
+ * }
+ * }
+ *
+ * processLineByLine();
+ * ```
+ *
+ * Alternatively, one could use the `'line'` event:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * const rl = readline.createInterface({
+ * input: fs.createReadStream('sample.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * console.log(`Line from file: ${line}`);
+ * });
+ * ```
+ *
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
+ *
+ * ```js
+ * const { once } = require('events');
+ * const { createReadStream } = require('fs');
+ * const { createInterface } = require('readline');
+ *
+ * (async function processLineByLine() {
+ * try {
+ * const rl = createInterface({
+ * input: createReadStream('big-file.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * // Process the line.
+ * });
+ *
+ * await once(rl, 'close');
+ *
+ * console.log('File processed.');
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * })();
+ * ```
+ * @since v0.7.7
+ */
+ export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
+ export type Direction = -1 | 0 | 1;
+ export interface CursorPos {
+ rows: number;
+ cols: number;
+ }
+ /**
+ * The `readline.clearLine()` method clears current line of given `TTY` stream
+ * in a specified direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
+ /**
+ * The `readline.clearScreenDown()` method clears the given `TTY` stream from
+ * the current position of the cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
+ /**
+ * The `readline.cursorTo()` method moves cursor to the specified position in a
+ * given `TTY` `stream`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
+ /**
+ * The `readline.moveCursor()` method moves the cursor _relative_ to its current
+ * position in a given `TTY` `stream`.
+ *
+ * ## Example: Tiny CLI
+ *
+ * The following example illustrates the use of `readline.Interface` class to
+ * implement a small command-line interface:
+ *
+ * ```js
+ * const readline = require('readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * prompt: 'OHAI> '
+ * });
+ *
+ * rl.prompt();
+ *
+ * rl.on('line', (line) => {
+ * switch (line.trim()) {
+ * case 'hello':
+ * console.log('world!');
+ * break;
+ * default:
+ * console.log(`Say what? I might have heard '${line.trim()}'`);
+ * break;
+ * }
+ * rl.prompt();
+ * }).on('close', () => {
+ * console.log('Have a great day!');
+ * process.exit(0);
+ * });
+ * ```
+ *
+ * ## Example: Read file stream line-by-Line
+ *
+ * A common use case for `readline` is to consume an input file one line at a
+ * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+ * well as a `for await...of` loop:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * async function processLineByLine() {
+ * const fileStream = fs.createReadStream('input.txt');
+ *
+ * const rl = readline.createInterface({
+ * input: fileStream,
+ * crlfDelay: Infinity
+ * });
+ * // Note: we use the crlfDelay option to recognize all instances of CR LF
+ * // ('\r\n') in input.txt as a single line break.
+ *
+ * for await (const line of rl) {
+ * // Each line in input.txt will be successively available here as `line`.
+ * console.log(`Line from file: ${line}`);
+ * }
+ * }
+ *
+ * processLineByLine();
+ * ```
+ *
+ * Alternatively, one could use the `'line'` event:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * const rl = readline.createInterface({
+ * input: fs.createReadStream('sample.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * console.log(`Line from file: ${line}`);
+ * });
+ * ```
+ *
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
+ *
+ * ```js
+ * const { once } = require('events');
+ * const { createReadStream } = require('fs');
+ * const { createInterface } = require('readline');
+ *
+ * (async function processLineByLine() {
+ * try {
+ * const rl = createInterface({
+ * input: createReadStream('big-file.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * // Process the line.
+ * });
+ *
+ * await once(rl, 'close');
+ *
+ * console.log('File processed.');
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * })();
+ * ```
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
+}
+declare module 'node:readline' {
+ export * from 'readline';
+}
diff --git a/node_modules/@types/node/ts4.8/readline/promises.d.ts b/node_modules/@types/node/ts4.8/readline/promises.d.ts
new file mode 100755
index 0000000..8f9f06f
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/readline/promises.d.ts
@@ -0,0 +1,143 @@
+/**
+ * The `readline/promise` module provides an API for reading lines of input from a Readable stream one line at a time.
+ *
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline/promises.js)
+ * @since v17.0.0
+ */
+declare module 'readline/promises' {
+ import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline';
+ import { Abortable } from 'node:events';
+
+ class Interface extends _Interface {
+ /**
+ * The rl.question() method displays the query by writing it to the output, waits for user input to be provided on input,
+ * then invokes the callback function passing the provided input as the first argument.
+ *
+ * When called, rl.question() will resume the input stream if it has been paused.
+ *
+ * If the readlinePromises.Interface was created with output set to null or undefined the query is not written.
+ *
+ * If the question is called after rl.close(), it returns a rejected promise.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const answer = await rl.question('What is your favorite food? ');
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * Using an AbortSignal to cancel a question.
+ *
+ * ```js
+ * const signal = AbortSignal.timeout(10_000);
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * const answer = await rl.question('What is your favorite food? ', { signal });
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * @since v17.0.0
+ * @param query A statement or query to write to output, prepended to the prompt.
+ */
+ question(query: string): Promise<string>;
+ question(query: string, options: Abortable): Promise<string>;
+ }
+
+ class Readline {
+ /**
+ * @param stream A TTY stream.
+ */
+ constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean });
+ /**
+ * The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ clearLine(dir: Direction): this;
+ /**
+ * The `rl.clearScreenDown()` method adds to the internal list of pending action an action that clears the associated `stream` from the current position of the cursor down.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ clearScreenDown(): this;
+ /**
+ * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions.
+ */
+ commit(): Promise<void>;
+ /**
+ * The `rl.cursorTo()` method adds to the internal list of pending action an action that moves cursor to the specified position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ cursorTo(x: number, y?: number): this;
+ /**
+ * The `rl.moveCursor()` method adds to the internal list of pending action an action that moves the cursor relative to its current position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless autoCommit: true was passed to the constructor.
+ */
+ moveCursor(dx: number, dy: number): this;
+ /**
+ * The `rl.rollback()` method clears the internal list of pending actions without sending it to the associated `stream`.
+ */
+ rollback(): this;
+ }
+
+ /**
+ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
+ *
+ * ```js
+ * const readlinePromises = require('node:readline/promises');
+ * const rl = readlinePromises.createInterface({
+ * input: process.stdin,
+ * output: process.stdout
+ * });
+ * ```
+ *
+ * Once the `readlinePromises.Interface` instance is created, the most common case is to listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get the best compatibility if it defines an `output.columns` property,
+ * and emits a `'resize'` event on the `output`, if or when the columns ever change (`process.stdout` does this automatically when it is a TTY).
+ *
+ * ## Use of the `completer` function
+ *
+ * The `completer` function takes the current line entered by the user as an argument, and returns an `Array` with 2 entries:
+ *
+ * - An Array with matching entries for the completion.
+ * - The substring that was used for the matching.
+ *
+ * For instance: `[[substr1, substr2, ...], originalsubstring]`.
+ *
+ * ```js
+ * function completer(line) {
+ * const completions = '.help .error .exit .quit .q'.split(' ');
+ * const hits = completions.filter((c) => c.startsWith(line));
+ * // Show all completions if none found
+ * return [hits.length ? hits : completions, line];
+ * }
+ * ```
+ *
+ * The `completer` function can also returns a `Promise`, or be asynchronous:
+ *
+ * ```js
+ * async function completer(linePartial) {
+ * await someAsyncWork();
+ * return [['123'], linePartial];
+ * }
+ * ```
+ */
+ function createInterface(
+ input: NodeJS.ReadableStream,
+ output?: NodeJS.WritableStream,
+ completer?: Completer | AsyncCompleter,
+ terminal?: boolean,
+ ): Interface;
+ function createInterface(options: ReadLineOptions): Interface;
+}
+declare module 'node:readline/promises' {
+ export * from 'readline/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/repl.d.ts b/node_modules/@types/node/ts4.8/repl.d.ts
new file mode 100755
index 0000000..be42ccc
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/repl.d.ts
@@ -0,0 +1,424 @@
+/**
+ * The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that
+ * is available both as a standalone program or includible in other applications.
+ * It can be accessed using:
+ *
+ * ```js
+ * const repl = require('repl');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/repl.js)
+ */
+declare module 'repl' {
+ import { Interface, Completer, AsyncCompleter } from 'node:readline';
+ import { Context } from 'node:vm';
+ import { InspectOptions } from 'node:util';
+ interface ReplOptions {
+ /**
+ * The input prompt to display.
+ * @default "> "
+ */
+ prompt?: string | undefined;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ * @default process.stdin
+ */
+ input?: NodeJS.ReadableStream | undefined;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ * @default process.stdout
+ */
+ output?: NodeJS.WritableStream | undefined;
+ /**
+ * If `true`, specifies that the output should be treated as a TTY terminal, and have
+ * ANSI/VT100 escape codes written to it.
+ * Default: checking the value of the `isTTY` property on the output stream upon
+ * instantiation.
+ */
+ terminal?: boolean | undefined;
+ /**
+ * The function to be used when evaluating each given line of input.
+ * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
+ * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
+ * additional lines.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
+ */
+ eval?: REPLEval | undefined;
+ /**
+ * Defines if the repl prints output previews or not.
+ * @default `true` Always `false` in case `terminal` is falsy.
+ */
+ preview?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default `writer` function should include ANSI color
+ * styling to REPL output. If a custom `writer` function is provided then this has no
+ * effect.
+ * Default: the REPL instance's `terminal` value.
+ */
+ useColors?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default evaluation function will use the JavaScript
+ * `global` as the context as opposed to creating a new separate context for the REPL
+ * instance. The node CLI REPL sets this value to `true`.
+ * Default: `false`.
+ */
+ useGlobal?: boolean | undefined;
+ /**
+ * If `true`, specifies that the default writer will not output the return value of a
+ * command if it evaluates to `undefined`.
+ * Default: `false`.
+ */
+ ignoreUndefined?: boolean | undefined;
+ /**
+ * The function to invoke to format the output of each command before writing to `output`.
+ * Default: a wrapper for `util.inspect`.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
+ */
+ writer?: REPLWriter | undefined;
+ /**
+ * An optional function used for custom Tab auto completion.
+ *
+ * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
+ */
+ completer?: Completer | AsyncCompleter | undefined;
+ /**
+ * A flag that specifies whether the default evaluator executes all JavaScript commands in
+ * strict mode or default (sloppy) mode.
+ * Accepted values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
+ /**
+ * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
+ * pressed. This cannot be used together with a custom `eval` function.
+ * Default: `false`.
+ */
+ breakEvalOnSigint?: boolean | undefined;
+ }
+ type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
+ type REPLWriter = (this: REPLServer, obj: any) => string;
+ /**
+ * This is the default "writer" value, if none is passed in the REPL options,
+ * and it can be overridden by custom print functions.
+ */
+ const writer: REPLWriter & {
+ options: InspectOptions;
+ };
+ type REPLCommandAction = (this: REPLServer, text: string) => void;
+ interface REPLCommand {
+ /**
+ * Help text to be displayed when `.help` is entered.
+ */
+ help?: string | undefined;
+ /**
+ * The function to execute, optionally accepting a single string argument.
+ */
+ action: REPLCommandAction;
+ }
+ /**
+ * Instances of `repl.REPLServer` are created using the {@link start} method
+ * or directly using the JavaScript `new` keyword.
+ *
+ * ```js
+ * const repl = require('repl');
+ *
+ * const options = { useColors: true };
+ *
+ * const firstInstance = repl.start(options);
+ * const secondInstance = new repl.REPLServer(options);
+ * ```
+ * @since v0.1.91
+ */
+ class REPLServer extends Interface {
+ /**
+ * The `vm.Context` provided to the `eval` function to be used for JavaScript
+ * evaluation.
+ */
+ readonly context: Context;
+ /**
+ * @deprecated since v14.3.0 - Use `input` instead.
+ */
+ readonly inputStream: NodeJS.ReadableStream;
+ /**
+ * @deprecated since v14.3.0 - Use `output` instead.
+ */
+ readonly outputStream: NodeJS.WritableStream;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ */
+ readonly input: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ */
+ readonly output: NodeJS.WritableStream;
+ /**
+ * The commands registered via `replServer.defineCommand()`.
+ */
+ readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
+ /**
+ * A value indicating whether the REPL is currently in "editor mode".
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys
+ */
+ readonly editorMode: boolean;
+ /**
+ * A value indicating whether the `_` variable has been assigned.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreAssigned: boolean;
+ /**
+ * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly last: any;
+ /**
+ * A value indicating whether the `_error` variable has been assigned.
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreErrAssigned: boolean;
+ /**
+ * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly lastError: any;
+ /**
+ * Specified in the REPL options, this is the function to be used when evaluating each
+ * given line of input. If not specified in the REPL options, this is an async wrapper
+ * for the JavaScript `eval()` function.
+ */
+ readonly eval: REPLEval;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default
+ * `writer` function should include ANSI color styling to REPL output.
+ */
+ readonly useColors: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `eval`
+ * function will use the JavaScript `global` as the context as opposed to creating a new
+ * separate context for the REPL instance.
+ */
+ readonly useGlobal: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `writer`
+ * function should output the result of a command if it evaluates to `undefined`.
+ */
+ readonly ignoreUndefined: boolean;
+ /**
+ * Specified in the REPL options, this is the function to invoke to format the output of
+ * each command before writing to `outputStream`. If not specified in the REPL options,
+ * this will be a wrapper for `util.inspect`.
+ */
+ readonly writer: REPLWriter;
+ /**
+ * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
+ */
+ readonly completer: Completer | AsyncCompleter;
+ /**
+ * Specified in the REPL options, this is a flag that specifies whether the default `eval`
+ * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
+ * Possible values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
+ * > _should not_ be created directly using the JavaScript `new` keyword.
+ *
+ * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver
+ */
+ private constructor();
+ /**
+ * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
+ * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following
+ * properties:
+ *
+ * The following example shows two new commands added to the REPL instance:
+ *
+ * ```js
+ * const repl = require('repl');
+ *
+ * const replServer = repl.start({ prompt: '> ' });
+ * replServer.defineCommand('sayhello', {
+ * help: 'Say hello',
+ * action(name) {
+ * this.clearBufferedCommand();
+ * console.log(`Hello, ${name}!`);
+ * this.displayPrompt();
+ * }
+ * });
+ * replServer.defineCommand('saybye', function saybye() {
+ * console.log('Goodbye!');
+ * this.close();
+ * });
+ * ```
+ *
+ * The new commands can then be used from within the REPL instance:
+ *
+ * ```console
+ * > .sayhello Node.js User
+ * Hello, Node.js User!
+ * > .saybye
+ * Goodbye!
+ * ```
+ * @since v0.3.0
+ * @param keyword The command keyword (_without_ a leading `.` character).
+ * @param cmd The function to invoke when the command is processed.
+ */
+ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
+ /**
+ * The `replServer.displayPrompt()` method readies the REPL instance for input
+ * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input.
+ *
+ * When multi-line input is being entered, an ellipsis is printed rather than the
+ * 'prompt'.
+ *
+ * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
+ *
+ * The `replServer.displayPrompt` method is primarily intended to be called from
+ * within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v0.1.91
+ */
+ displayPrompt(preserveCursor?: boolean): void;
+ /**
+ * The `replServer.clearBufferedCommand()` method clears any command that has been
+ * buffered but not yet executed. This method is primarily intended to be
+ * called from within the action function for commands registered using the`replServer.defineCommand()` method.
+ * @since v9.0.0
+ */
+ clearBufferedCommand(): void;
+ /**
+ * Initializes a history log file for the REPL instance. When executing the
+ * Node.js binary and using the command-line REPL, a history file is initialized
+ * by default. However, this is not the case when creating a REPL
+ * programmatically. Use this method to initialize a history log file when working
+ * with REPL instances programmatically.
+ * @since v11.10.0
+ * @param historyPath the path to the history file
+ * @param callback called when history writes are ready or upon error
+ */
+ setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void;
+ /**
+ * events.EventEmitter
+ * 1. close - inherited from `readline.Interface`
+ * 2. line - inherited from `readline.Interface`
+ * 3. pause - inherited from `readline.Interface`
+ * 4. resume - inherited from `readline.Interface`
+ * 5. SIGCONT - inherited from `readline.Interface`
+ * 6. SIGINT - inherited from `readline.Interface`
+ * 7. SIGTSTP - inherited from `readline.Interface`
+ * 8. exit
+ * 9. reset
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'line', listener: (input: string) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: 'SIGCONT', listener: () => void): this;
+ addListener(event: 'SIGINT', listener: () => void): this;
+ addListener(event: 'SIGTSTP', listener: () => void): this;
+ addListener(event: 'exit', listener: () => void): this;
+ addListener(event: 'reset', listener: (context: Context) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'close'): boolean;
+ emit(event: 'line', input: string): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: 'SIGCONT'): boolean;
+ emit(event: 'SIGINT'): boolean;
+ emit(event: 'SIGTSTP'): boolean;
+ emit(event: 'exit'): boolean;
+ emit(event: 'reset', context: Context): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'line', listener: (input: string) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: 'SIGCONT', listener: () => void): this;
+ on(event: 'SIGINT', listener: () => void): this;
+ on(event: 'SIGTSTP', listener: () => void): this;
+ on(event: 'exit', listener: () => void): this;
+ on(event: 'reset', listener: (context: Context) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'line', listener: (input: string) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: 'SIGCONT', listener: () => void): this;
+ once(event: 'SIGINT', listener: () => void): this;
+ once(event: 'SIGTSTP', listener: () => void): this;
+ once(event: 'exit', listener: () => void): this;
+ once(event: 'reset', listener: (context: Context) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'line', listener: (input: string) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: 'SIGCONT', listener: () => void): this;
+ prependListener(event: 'SIGINT', listener: () => void): this;
+ prependListener(event: 'SIGTSTP', listener: () => void): this;
+ prependListener(event: 'exit', listener: () => void): this;
+ prependListener(event: 'reset', listener: (context: Context) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'line', listener: (input: string) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: 'SIGCONT', listener: () => void): this;
+ prependOnceListener(event: 'SIGINT', listener: () => void): this;
+ prependOnceListener(event: 'SIGTSTP', listener: () => void): this;
+ prependOnceListener(event: 'exit', listener: () => void): this;
+ prependOnceListener(event: 'reset', listener: (context: Context) => void): this;
+ }
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
+ */
+ const REPL_MODE_SLOPPY: unique symbol;
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in strict mode.
+ * This is equivalent to prefacing every repl statement with `'use strict'`.
+ */
+ const REPL_MODE_STRICT: unique symbol;
+ /**
+ * The `repl.start()` method creates and starts a {@link REPLServer} instance.
+ *
+ * If `options` is a string, then it specifies the input prompt:
+ *
+ * ```js
+ * const repl = require('repl');
+ *
+ * // a Unix style prompt
+ * repl.start('$ ');
+ * ```
+ * @since v0.1.91
+ */
+ function start(options?: string | ReplOptions): REPLServer;
+ /**
+ * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors
+ */
+ class Recoverable extends SyntaxError {
+ err: Error;
+ constructor(err: Error);
+ }
+}
+declare module 'node:repl' {
+ export * from 'repl';
+}
diff --git a/node_modules/@types/node/ts4.8/stream.d.ts b/node_modules/@types/node/ts4.8/stream.d.ts
new file mode 100755
index 0000000..d478f33
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream.d.ts
@@ -0,0 +1,1339 @@
+/**
+ * A stream is an abstract interface for working with streaming data in Node.js.
+ * The `stream` module provides an API for implementing the stream interface.
+ *
+ * There are many stream objects provided by Node.js. For instance, a `request to an HTTP server` and `process.stdout` are both stream instances.
+ *
+ * Streams can be readable, writable, or both. All streams are instances of `EventEmitter`.
+ *
+ * To access the `stream` module:
+ *
+ * ```js
+ * const stream = require('stream');
+ * ```
+ *
+ * The `stream` module is useful for creating new types of stream instances. It is
+ * usually not necessary to use the `stream` module to consume streams.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/stream.js)
+ */
+declare module 'stream' {
+ import { EventEmitter, Abortable } from 'node:events';
+ import * as streamPromises from 'node:stream/promises';
+ import * as streamConsumers from 'node:stream/consumers';
+ import * as streamWeb from 'node:stream/web';
+ class internal extends EventEmitter {
+ pipe<T extends NodeJS.WritableStream>(
+ destination: T,
+ options?: {
+ end?: boolean | undefined;
+ }
+ ): T;
+ }
+ namespace internal {
+ class Stream extends internal {
+ constructor(opts?: ReadableOptions);
+ }
+ interface StreamOptions<T extends Stream> extends Abortable {
+ emitClose?: boolean | undefined;
+ highWaterMark?: number | undefined;
+ objectMode?: boolean | undefined;
+ construct?(this: T, callback: (error?: Error | null) => void): void;
+ destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
+ autoDestroy?: boolean | undefined;
+ }
+ interface ReadableOptions extends StreamOptions<Readable> {
+ encoding?: BufferEncoding | undefined;
+ read?(this: Readable, size: number): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Readable extends Stream implements NodeJS.ReadableStream {
+ /**
+ * A utility method for creating Readable Streams out of iterators.
+ */
+ static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
+ /**
+ * A utility method for creating a `Readable` from a web `ReadableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick<ReadableOptions, 'encoding' | 'highWaterMark' | 'objectMode' | 'signal'>): Readable;
+ /**
+ * Returns whether the stream has been read from or cancelled.
+ * @since v16.8.0
+ */
+ static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
+ /**
+ * A utility method for creating a web `ReadableStream` from a `Readable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamReadable: Readable): streamWeb.ReadableStream;
+ /**
+ * Returns whether the stream was destroyed or errored before emitting `'end'`.
+ * @since v16.8.0
+ * @experimental
+ */
+ readonly readableAborted: boolean;
+ /**
+ * Is `true` if it is safe to call `readable.read()`, which means
+ * the stream has not been destroyed or emitted `'error'` or `'end'`.
+ * @since v11.4.0
+ */
+ readable: boolean;
+ /**
+ * Returns whether `'data'` has been emitted.
+ * @since v16.7.0, v14.18.0
+ * @experimental
+ */
+ readonly readableDidRead: boolean;
+ /**
+ * Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.
+ * @since v12.7.0
+ */
+ readonly readableEncoding: BufferEncoding | null;
+ /**
+ * Becomes `true` when `'end'` event is emitted.
+ * @since v12.9.0
+ */
+ readonly readableEnded: boolean;
+ /**
+ * This property reflects the current state of a `Readable` stream as described
+ * in the `Three states` section.
+ * @since v9.4.0
+ */
+ readonly readableFlowing: boolean | null;
+ /**
+ * Returns the value of `highWaterMark` passed when creating this `Readable`.
+ * @since v9.3.0
+ */
+ readonly readableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be read. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly readableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Readable` stream.
+ * @since v12.3.0
+ */
+ readonly readableObjectMode: boolean;
+ /**
+ * Is `true` after `readable.destroy()` has been called.
+ * @since v18.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is true after 'close' has been emitted.
+ * @since v8.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ constructor(opts?: ReadableOptions);
+ _construct?(callback: (error?: Error | null) => void): void;
+ _read(size: number): void;
+ /**
+ * The `readable.read()` method reads data out of the internal buffer and
+ * returns it. If no data is available to be read, `null` is returned. By default,
+ * the data is returned as a `Buffer` object unless an encoding has been
+ * specified using the `readable.setEncoding()` method or the stream is operating
+ * in object mode.
+ *
+ * The optional `size` argument specifies a specific number of bytes to read. If`size` bytes are not available to be read, `null` will be returned _unless_the stream has ended, in which
+ * case all of the data remaining in the internal
+ * buffer will be returned.
+ *
+ * If the `size` argument is not specified, all of the data contained in the
+ * internal buffer will be returned.
+ *
+ * The `size` argument must be less than or equal to 1 GiB.
+ *
+ * The `readable.read()` method should only be called on `Readable` streams
+ * operating in paused mode. In flowing mode, `readable.read()` is called
+ * automatically until the internal buffer is fully drained.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ *
+ * // 'readable' may be triggered multiple times as data is buffered in
+ * readable.on('readable', () => {
+ * let chunk;
+ * console.log('Stream is readable (new data received in buffer)');
+ * // Use a loop to make sure we read all currently available data
+ * while (null !== (chunk = readable.read())) {
+ * console.log(`Read ${chunk.length} bytes of data...`);
+ * }
+ * });
+ *
+ * // 'end' will be triggered once when there is no more data available
+ * readable.on('end', () => {
+ * console.log('Reached end of stream.');
+ * });
+ * ```
+ *
+ * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks
+ * are not concatenated. A `while` loop is necessary to consume all data
+ * currently in the buffer. When reading a large file `.read()` may return `null`,
+ * having consumed all buffered content so far, but there is still more data to
+ * come not yet buffered. In this case a new `'readable'` event will be emitted
+ * when there is more data in the buffer. Finally the `'end'` event will be
+ * emitted when there is no more data to come.
+ *
+ * Therefore to read a file's whole contents from a `readable`, it is necessary
+ * to collect chunks across multiple `'readable'` events:
+ *
+ * ```js
+ * const chunks = [];
+ *
+ * readable.on('readable', () => {
+ * let chunk;
+ * while (null !== (chunk = readable.read())) {
+ * chunks.push(chunk);
+ * }
+ * });
+ *
+ * readable.on('end', () => {
+ * const content = chunks.join('');
+ * });
+ * ```
+ *
+ * A `Readable` stream in object mode will always return a single item from
+ * a call to `readable.read(size)`, regardless of the value of the`size` argument.
+ *
+ * If the `readable.read()` method returns a chunk of data, a `'data'` event will
+ * also be emitted.
+ *
+ * Calling {@link read} after the `'end'` event has
+ * been emitted will return `null`. No runtime error will be raised.
+ * @since v0.9.4
+ * @param size Optional argument to specify how much data to read.
+ */
+ read(size?: number): any;
+ /**
+ * The `readable.setEncoding()` method sets the character encoding for
+ * data read from the `Readable` stream.
+ *
+ * By default, no encoding is assigned and stream data will be returned as`Buffer` objects. Setting an encoding causes the stream data
+ * to be returned as strings of the specified encoding rather than as `Buffer`objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+ * output data to be interpreted as UTF-8 data, and passed as strings. Calling`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+ * string format.
+ *
+ * The `Readable` stream will properly handle multi-byte characters delivered
+ * through the stream that would otherwise become improperly decoded if simply
+ * pulled from the stream as `Buffer` objects.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.setEncoding('utf8');
+ * readable.on('data', (chunk) => {
+ * assert.equal(typeof chunk, 'string');
+ * console.log('Got %d characters of string data:', chunk.length);
+ * });
+ * ```
+ * @since v0.9.4
+ * @param encoding The encoding to use.
+ */
+ setEncoding(encoding: BufferEncoding): this;
+ /**
+ * The `readable.pause()` method will cause a stream in flowing mode to stop
+ * emitting `'data'` events, switching out of flowing mode. Any data that
+ * becomes available will remain in the internal buffer.
+ *
+ * ```js
+ * const readable = getReadableStreamSomehow();
+ * readable.on('data', (chunk) => {
+ * console.log(`Received ${chunk.length} bytes of data.`);
+ * readable.pause();
+ * console.log('There will be no additional data for 1 second.');
+ * setTimeout(() => {
+ * console.log('Now data will start flowing again.');
+ * readable.resume();
+ * }, 1000);
+ * });
+ * ```
+ *
+ * The `readable.pause()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ pause(): this;
+ /**
+ * The `readable.resume()` method causes an explicitly paused `Readable` stream to
+ * resume emitting `'data'` events, switching the stream into flowing mode.
+ *
+ * The `readable.resume()` method can be used to fully consume the data from a
+ * stream without actually processing any of that data:
+ *
+ * ```js
+ * getReadableStreamSomehow()
+ * .resume()
+ * .on('end', () => {
+ * console.log('Reached the end, but did not read anything.');
+ * });
+ * ```
+ *
+ * The `readable.resume()` method has no effect if there is a `'readable'`event listener.
+ * @since v0.9.4
+ */
+ resume(): this;
+ /**
+ * The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most
+ * typical cases, there will be no reason to
+ * use this method directly.
+ *
+ * ```js
+ * const readable = new stream.Readable();
+ *
+ * readable.isPaused(); // === false
+ * readable.pause();
+ * readable.isPaused(); // === true
+ * readable.resume();
+ * readable.isPaused(); // === false
+ * ```
+ * @since v0.11.14
+ */
+ isPaused(): boolean;
+ /**
+ * The `readable.unpipe()` method detaches a `Writable` stream previously attached
+ * using the {@link pipe} method.
+ *
+ * If the `destination` is not specified, then _all_ pipes are detached.
+ *
+ * If the `destination` is specified, but no pipe is set up for it, then
+ * the method does nothing.
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readable = getReadableStreamSomehow();
+ * const writable = fs.createWriteStream('file.txt');
+ * // All the data from readable goes into 'file.txt',
+ * // but only for the first second.
+ * readable.pipe(writable);
+ * setTimeout(() => {
+ * console.log('Stop writing to file.txt.');
+ * readable.unpipe(writable);
+ * console.log('Manually close the file stream.');
+ * writable.end();
+ * }, 1000);
+ * ```
+ * @since v0.9.4
+ * @param destination Optional specific stream to unpipe
+ */
+ unpipe(destination?: NodeJS.WritableStream): this;
+ /**
+ * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
+ * same as `readable.push(null)`, after which no more data can be written. The EOF
+ * signal is put at the end of the buffer and any buffered data will still be
+ * flushed.
+ *
+ * The `readable.unshift()` method pushes a chunk of data back into the internal
+ * buffer. This is useful in certain situations where a stream is being consumed by
+ * code that needs to "un-consume" some amount of data that it has optimistically
+ * pulled out of the source, so that the data can be passed on to some other party.
+ *
+ * The `stream.unshift(chunk)` method cannot be called after the `'end'` event
+ * has been emitted or a runtime error will be thrown.
+ *
+ * Developers using `stream.unshift()` often should consider switching to
+ * use of a `Transform` stream instead. See the `API for stream implementers` section for more information.
+ *
+ * ```js
+ * // Pull off a header delimited by \n\n.
+ * // Use unshift() if we get too much.
+ * // Call the callback with (error, header, stream).
+ * const { StringDecoder } = require('string_decoder');
+ * function parseHeader(stream, callback) {
+ * stream.on('error', callback);
+ * stream.on('readable', onReadable);
+ * const decoder = new StringDecoder('utf8');
+ * let header = '';
+ * function onReadable() {
+ * let chunk;
+ * while (null !== (chunk = stream.read())) {
+ * const str = decoder.write(chunk);
+ * if (str.includes('\n\n')) {
+ * // Found the header boundary.
+ * const split = str.split(/\n\n/);
+ * header += split.shift();
+ * const remaining = split.join('\n\n');
+ * const buf = Buffer.from(remaining, 'utf8');
+ * stream.removeListener('error', callback);
+ * // Remove the 'readable' listener before unshifting.
+ * stream.removeListener('readable', onReadable);
+ * if (buf.length)
+ * stream.unshift(buf);
+ * // Now the body of the message can be read from the stream.
+ * callback(null, header, stream);
+ * return;
+ * }
+ * // Still reading the header.
+ * header += str;
+ * }
+ * }
+ * }
+ * ```
+ *
+ * Unlike {@link push}, `stream.unshift(chunk)` will not
+ * end the reading process by resetting the internal reading state of the stream.
+ * This can cause unexpected results if `readable.unshift()` is called during a
+ * read (i.e. from within a {@link _read} implementation on a
+ * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately,
+ * however it is best to simply avoid calling `readable.unshift()` while in the
+ * process of performing a read.
+ * @since v0.9.11
+ * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array` or `null`. For object mode
+ * streams, `chunk` may be any JavaScript value.
+ * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
+ */
+ unshift(chunk: any, encoding?: BufferEncoding): void;
+ /**
+ * Prior to Node.js 0.10, streams did not implement the entire `stream` module API
+ * as it is currently defined. (See `Compatibility` for more information.)
+ *
+ * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the`readable.wrap()` method can be used to create a `Readable`
+ * stream that uses
+ * the old stream as its data source.
+ *
+ * It will rarely be necessary to use `readable.wrap()` but the method has been
+ * provided as a convenience for interacting with older Node.js applications and
+ * libraries.
+ *
+ * ```js
+ * const { OldReader } = require('./old-api-module.js');
+ * const { Readable } = require('stream');
+ * const oreader = new OldReader();
+ * const myReader = new Readable().wrap(oreader);
+ *
+ * myReader.on('readable', () => {
+ * myReader.read(); // etc.
+ * });
+ * ```
+ * @since v0.9.4
+ * @param stream An "old style" readable stream
+ */
+ wrap(stream: NodeJS.ReadableStream): this;
+ push(chunk: any, encoding?: BufferEncoding): boolean;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
+ * stream will release any internal resources and subsequent calls to `push()`will be ignored.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method, but instead implement `readable._destroy()`.
+ * @since v8.0.0
+ * @param error Error which will be passed as payload in `'error'` event
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. end
+ * 4. error
+ * 5. pause
+ * 6. readable
+ * 7. resume
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'data', listener: (chunk: any) => void): this;
+ addListener(event: 'end', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'pause', listener: () => void): this;
+ addListener(event: 'readable', listener: () => void): this;
+ addListener(event: 'resume', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'data', chunk: any): boolean;
+ emit(event: 'end'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'pause'): boolean;
+ emit(event: 'readable'): boolean;
+ emit(event: 'resume'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'data', listener: (chunk: any) => void): this;
+ on(event: 'end', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'pause', listener: () => void): this;
+ on(event: 'readable', listener: () => void): this;
+ on(event: 'resume', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'data', listener: (chunk: any) => void): this;
+ once(event: 'end', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'pause', listener: () => void): this;
+ once(event: 'readable', listener: () => void): this;
+ once(event: 'resume', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'data', listener: (chunk: any) => void): this;
+ prependListener(event: 'end', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'pause', listener: () => void): this;
+ prependListener(event: 'readable', listener: () => void): this;
+ prependListener(event: 'resume', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
+ prependOnceListener(event: 'end', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'pause', listener: () => void): this;
+ prependOnceListener(event: 'readable', listener: () => void): this;
+ prependOnceListener(event: 'resume', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'data', listener: (chunk: any) => void): this;
+ removeListener(event: 'end', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'pause', listener: () => void): this;
+ removeListener(event: 'readable', listener: () => void): this;
+ removeListener(event: 'resume', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
+ }
+ interface WritableOptions extends StreamOptions<Writable> {
+ decodeStrings?: boolean | undefined;
+ defaultEncoding?: BufferEncoding | undefined;
+ write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Writable,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
+ }
+ /**
+ * @since v0.9.4
+ */
+ class Writable extends Stream implements NodeJS.WritableStream {
+ /**
+ * A utility method for creating a `Writable` from a web `WritableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(writableStream: streamWeb.WritableStream, options?: Pick<WritableOptions, 'decodeStrings' | 'highWaterMark' | 'objectMode' | 'signal'>): Writable;
+ /**
+ * A utility method for creating a web `WritableStream` from a `Writable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamWritable: Writable): streamWeb.WritableStream;
+ /**
+ * Is `true` if it is safe to call `writable.write()`, which means
+ * the stream has not been destroyed, errored or ended.
+ * @since v11.4.0
+ */
+ readonly writable: boolean;
+ /**
+ * Is `true` after `writable.end()` has been called. This property
+ * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
+ * @since v12.9.0
+ */
+ readonly writableEnded: boolean;
+ /**
+ * Is set to `true` immediately before the `'finish'` event is emitted.
+ * @since v12.6.0
+ */
+ readonly writableFinished: boolean;
+ /**
+ * Return the value of `highWaterMark` passed when creating this `Writable`.
+ * @since v9.3.0
+ */
+ readonly writableHighWaterMark: number;
+ /**
+ * This property contains the number of bytes (or objects) in the queue
+ * ready to be written. The value provides introspection data regarding
+ * the status of the `highWaterMark`.
+ * @since v9.4.0
+ */
+ readonly writableLength: number;
+ /**
+ * Getter for the property `objectMode` of a given `Writable` stream.
+ * @since v12.3.0
+ */
+ readonly writableObjectMode: boolean;
+ /**
+ * Number of times `writable.uncork()` needs to be
+ * called in order to fully uncork the stream.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly writableCorked: number;
+ /**
+ * Is `true` after `writable.destroy()` has been called.
+ * @since v8.0.0
+ */
+ destroyed: boolean;
+ /**
+ * Is true after 'close' has been emitted.
+ * @since v8.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ /**
+ * Is `true` if the stream's buffer has been full and stream will emit 'drain'.
+ * @since v15.2.0, v14.17.0
+ */
+ readonly writableNeedDrain: boolean;
+ constructor(opts?: WritableOptions);
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _construct?(callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ /**
+ * The `writable.write()` method writes some data to the stream, and calls the
+ * supplied `callback` once the data has been fully handled. If an error
+ * occurs, the `callback` will be called with the error as its
+ * first argument. The `callback` is called asynchronously and before `'error'` is
+ * emitted.
+ *
+ * The return value is `true` if the internal buffer is less than the`highWaterMark` configured when the stream was created after admitting `chunk`.
+ * If `false` is returned, further attempts to write data to the stream should
+ * stop until the `'drain'` event is emitted.
+ *
+ * While a stream is not draining, calls to `write()` will buffer `chunk`, and
+ * return false. Once all currently buffered chunks are drained (accepted for
+ * delivery by the operating system), the `'drain'` event will be emitted.
+ * Once `write()` returns false, do not write more chunks
+ * until the `'drain'` event is emitted. While calling `write()` on a stream that
+ * is not draining is allowed, Node.js will buffer all written chunks until
+ * maximum memory usage occurs, at which point it will abort unconditionally.
+ * Even before it aborts, high memory usage will cause poor garbage collector
+ * performance and high RSS (which is not typically released back to the system,
+ * even after the memory is no longer required). Since TCP sockets may never
+ * drain if the remote peer does not read the data, writing a socket that is
+ * not draining may lead to a remotely exploitable vulnerability.
+ *
+ * Writing data while the stream is not draining is particularly
+ * problematic for a `Transform`, because the `Transform` streams are paused
+ * by default until they are piped or a `'data'` or `'readable'` event handler
+ * is added.
+ *
+ * If the data to be written can be generated or fetched on demand, it is
+ * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is
+ * possible to respect backpressure and avoid memory issues using the `'drain'` event:
+ *
+ * ```js
+ * function write(data, cb) {
+ * if (!stream.write(data)) {
+ * stream.once('drain', cb);
+ * } else {
+ * process.nextTick(cb);
+ * }
+ * }
+ *
+ * // Wait for cb to be called before doing any other write.
+ * write('hello', () => {
+ * console.log('Write completed, do more writes now.');
+ * });
+ * ```
+ *
+ * A `Writable` stream in object mode will always ignore the `encoding` argument.
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param [encoding='utf8'] The encoding, if `chunk` is a string.
+ * @param callback Callback for when this chunk of data is flushed.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
+ /**
+ * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
+ * @since v0.11.15
+ * @param encoding The new default encoding
+ */
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ /**
+ * Calling the `writable.end()` method signals that no more data will be written
+ * to the `Writable`. The optional `chunk` and `encoding` arguments allow one
+ * final additional chunk of data to be written immediately before closing the
+ * stream.
+ *
+ * Calling the {@link write} method after calling {@link end} will raise an error.
+ *
+ * ```js
+ * // Write 'hello, ' and then end with 'world!'.
+ * const fs = require('fs');
+ * const file = fs.createWriteStream('example.txt');
+ * file.write('hello, ');
+ * file.end('world!');
+ * // Writing more now is not allowed!
+ * ```
+ * @since v0.9.4
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
+ * JavaScript value other than `null`.
+ * @param encoding The encoding if `chunk` is a string
+ * @param callback Callback for when the stream is finished.
+ */
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
+ /**
+ * The `writable.cork()` method forces all written data to be buffered in memory.
+ * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called.
+ *
+ * The primary intent of `writable.cork()` is to accommodate a situation in which
+ * several small chunks are written to the stream in rapid succession. Instead of
+ * immediately forwarding them to the underlying destination, `writable.cork()`buffers all the chunks until `writable.uncork()` is called, which will pass them
+ * all to `writable._writev()`, if present. This prevents a head-of-line blocking
+ * situation where data is being buffered while waiting for the first small chunk
+ * to be processed. However, use of `writable.cork()` without implementing`writable._writev()` may have an adverse effect on throughput.
+ *
+ * See also: `writable.uncork()`, `writable._writev()`.
+ * @since v0.11.2
+ */
+ cork(): void;
+ /**
+ * The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
+ *
+ * When using `writable.cork()` and `writable.uncork()` to manage the buffering
+ * of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
+ * loop phase.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.write('data ');
+ * process.nextTick(() => stream.uncork());
+ * ```
+ *
+ * If the `writable.cork()` method is called multiple times on a stream, the
+ * same number of calls to `writable.uncork()` must be called to flush the buffered
+ * data.
+ *
+ * ```js
+ * stream.cork();
+ * stream.write('some ');
+ * stream.cork();
+ * stream.write('data ');
+ * process.nextTick(() => {
+ * stream.uncork();
+ * // The data will not be flushed until uncork() is called a second time.
+ * stream.uncork();
+ * });
+ * ```
+ *
+ * See also: `writable.cork()`.
+ * @since v0.11.2
+ */
+ uncork(): void;
+ /**
+ * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable
+ * stream has ended and subsequent calls to `write()` or `end()` will result in
+ * an `ERR_STREAM_DESTROYED` error.
+ * This is a destructive and immediate way to destroy a stream. Previous calls to`write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error.
+ * Use `end()` instead of destroy if data should flush before close, or wait for
+ * the `'drain'` event before destroying the stream.
+ *
+ * Once `destroy()` has been called any further calls will be a no-op and no
+ * further errors except from `_destroy()` may be emitted as `'error'`.
+ *
+ * Implementors should not override this method,
+ * but instead implement `writable._destroy()`.
+ * @since v8.0.0
+ * @param error Optional, an error to emit with `'error'` event.
+ */
+ destroy(error?: Error): this;
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. drain
+ * 3. error
+ * 4. finish
+ * 5. pipe
+ * 6. unpipe
+ */
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'drain'): boolean;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'finish'): boolean;
+ emit(event: 'pipe', src: Readable): boolean;
+ emit(event: 'unpipe', src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: Readable) => void): this;
+ on(event: 'unpipe', listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: Readable) => void): this;
+ once(event: 'unpipe', listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'drain', listener: () => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'finish', listener: () => void): this;
+ removeListener(event: 'pipe', listener: (src: Readable) => void): this;
+ removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface DuplexOptions extends ReadableOptions, WritableOptions {
+ allowHalfOpen?: boolean | undefined;
+ readableObjectMode?: boolean | undefined;
+ writableObjectMode?: boolean | undefined;
+ readableHighWaterMark?: number | undefined;
+ writableHighWaterMark?: number | undefined;
+ writableCorked?: number | undefined;
+ construct?(this: Duplex, callback: (error?: Error | null) => void): void;
+ read?(this: Duplex, size: number): void;
+ write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Duplex,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
+ }
+ /**
+ * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Duplex` streams include:
+ *
+ * * `TCP sockets`
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Duplex extends Readable implements Writable {
+ readonly writable: boolean;
+ readonly writableEnded: boolean;
+ readonly writableFinished: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ readonly writableObjectMode: boolean;
+ readonly writableCorked: number;
+ readonly writableNeedDrain: boolean;
+ readonly closed: boolean;
+ readonly errored: Error | null;
+ /**
+ * If `false` then the stream will automatically end the writable side when the
+ * readable side ends. Set initially by the `allowHalfOpen` constructor option,
+ * which defaults to `false`.
+ *
+ * This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is
+ * emitted.
+ * @since v0.9.4
+ */
+ allowHalfOpen: boolean;
+ constructor(opts?: DuplexOptions);
+ /**
+ * A utility method for creating duplex streams.
+ *
+ * - `Stream` converts writable stream into writable `Duplex` and readable stream
+ * to `Duplex`.
+ * - `Blob` converts into readable `Duplex`.
+ * - `string` converts into readable `Duplex`.
+ * - `ArrayBuffer` converts into readable `Duplex`.
+ * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
+ * - `AsyncGeneratorFunction` converts into a readable/writable transform
+ * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
+ * `null`.
+ * - `AsyncFunction` converts into a writable `Duplex`. Must return
+ * either `null` or `undefined`
+ * - `Object ({ writable, readable })` converts `readable` and
+ * `writable` into `Stream` and then combines them into `Duplex` where the
+ * `Duplex` will write to the `writable` and read from the `readable`.
+ * - `Promise` converts into readable `Duplex`. Value `null` is ignored.
+ *
+ * @since v16.8.0
+ */
+ static from(src: Stream | Blob | ArrayBuffer | string | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | Object): Duplex;
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ end(cb?: () => void): this;
+ end(chunk: any, cb?: () => void): this;
+ end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
+ cork(): void;
+ uncork(): void;
+ }
+ type TransformCallback = (error?: Error | null, data?: any) => void;
+ interface TransformOptions extends DuplexOptions {
+ construct?(this: Transform, callback: (error?: Error | null) => void): void;
+ read?(this: Transform, size: number): void;
+ write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(
+ this: Transform,
+ chunks: Array<{
+ chunk: any;
+ encoding: BufferEncoding;
+ }>,
+ callback: (error?: Error | null) => void
+ ): void;
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
+ transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ flush?(this: Transform, callback: TransformCallback): void;
+ }
+ /**
+ * Transform streams are `Duplex` streams where the output is in some way
+ * related to the input. Like all `Duplex` streams, `Transform` streams
+ * implement both the `Readable` and `Writable` interfaces.
+ *
+ * Examples of `Transform` streams include:
+ *
+ * * `zlib streams`
+ * * `crypto streams`
+ * @since v0.9.4
+ */
+ class Transform extends Duplex {
+ constructor(opts?: TransformOptions);
+ _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ _flush(callback: TransformCallback): void;
+ }
+ /**
+ * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is
+ * primarily for examples and testing, but there are some use cases where`stream.PassThrough` is useful as a building block for novel sorts of streams.
+ */
+ class PassThrough extends Transform {}
+ /**
+ * Attaches an AbortSignal to a readable or writeable stream. This lets code
+ * control stream destruction using an `AbortController`.
+ *
+ * Calling `abort` on the `AbortController` corresponding to the passed`AbortSignal` will behave the same way as calling `.destroy(new AbortError())`on the stream.
+ *
+ * ```js
+ * const fs = require('fs');
+ *
+ * const controller = new AbortController();
+ * const read = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json'))
+ * );
+ * // Later, abort the operation closing the stream
+ * controller.abort();
+ * ```
+ *
+ * Or using an `AbortSignal` with a readable stream as an async iterable:
+ *
+ * ```js
+ * const controller = new AbortController();
+ * setTimeout(() => controller.abort(), 10_000); // set a timeout
+ * const stream = addAbortSignal(
+ * controller.signal,
+ * fs.createReadStream(('object.json'))
+ * );
+ * (async () => {
+ * try {
+ * for await (const chunk of stream) {
+ * await process(chunk);
+ * }
+ * } catch (e) {
+ * if (e.name === 'AbortError') {
+ * // The operation was cancelled
+ * } else {
+ * throw e;
+ * }
+ * }
+ * })();
+ * ```
+ * @since v15.4.0
+ * @param signal A signal representing possible cancellation
+ * @param stream a stream to attach a signal to
+ */
+ function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
+ interface FinishedOptions extends Abortable {
+ error?: boolean | undefined;
+ readable?: boolean | undefined;
+ writable?: boolean | undefined;
+ }
+ /**
+ * A function to get notified when a stream is no longer readable, writable
+ * or has experienced an error or a premature close event.
+ *
+ * ```js
+ * const { finished } = require('stream');
+ *
+ * const rs = fs.createReadStream('archive.tar');
+ *
+ * finished(rs, (err) => {
+ * if (err) {
+ * console.error('Stream failed.', err);
+ * } else {
+ * console.log('Stream is done reading.');
+ * }
+ * });
+ *
+ * rs.resume(); // Drain the stream.
+ * ```
+ *
+ * Especially useful in error handling scenarios where a stream is destroyed
+ * prematurely (like an aborted HTTP request), and will not emit `'end'`or `'finish'`.
+ *
+ * The `finished` API provides promise version:
+ *
+ * ```js
+ * const { finished } = require('stream/promises');
+ *
+ * const rs = fs.createReadStream('archive.tar');
+ *
+ * async function run() {
+ * await finished(rs);
+ * console.log('Stream is done reading.');
+ * }
+ *
+ * run().catch(console.error);
+ * rs.resume(); // Drain the stream.
+ * ```
+ *
+ * `stream.finished()` leaves dangling event listeners (in particular`'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
+ * invoked. The reason for this is so that unexpected `'error'` events (due to
+ * incorrect stream implementations) do not cause unexpected crashes.
+ * If this is unwanted behavior then the returned cleanup function needs to be
+ * invoked in the callback:
+ *
+ * ```js
+ * const cleanup = finished(rs, (err) => {
+ * cleanup();
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ * @param stream A readable and/or writable stream.
+ * @param callback A callback function that takes an optional error argument.
+ * @return A cleanup function which removes all registered listeners.
+ */
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ namespace finished {
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ }
+ type PipelineSourceFunction<T> = () => Iterable<T> | AsyncIterable<T>;
+ type PipelineSource<T> = Iterable<T> | AsyncIterable<T> | NodeJS.ReadableStream | PipelineSourceFunction<T>;
+ type PipelineTransform<S extends PipelineTransformSource<any>, U> =
+ | NodeJS.ReadWriteStream
+ | ((source: S extends (...args: any[]) => Iterable<infer ST> | AsyncIterable<infer ST> ? AsyncIterable<ST> : S) => AsyncIterable<U>);
+ type PipelineTransformSource<T> = PipelineSource<T> | PipelineTransform<any, T>;
+ type PipelineDestinationIterableFunction<T> = (source: AsyncIterable<T>) => AsyncIterable<any>;
+ type PipelineDestinationPromiseFunction<T, P> = (source: AsyncIterable<T>) => Promise<P>;
+ type PipelineDestination<S extends PipelineTransformSource<any>, P> = S extends PipelineTransformSource<infer ST>
+ ? NodeJS.WritableStream | PipelineDestinationIterableFunction<ST> | PipelineDestinationPromiseFunction<ST, P>
+ : never;
+ type PipelineCallback<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P>
+ ? (err: NodeJS.ErrnoException | null, value: P) => void
+ : (err: NodeJS.ErrnoException | null) => void;
+ type PipelinePromise<S extends PipelineDestination<any, any>> = S extends PipelineDestinationPromiseFunction<any, infer P> ? Promise<P> : Promise<void>;
+ interface PipelineOptions {
+ signal: AbortSignal;
+ }
+ /**
+ * A module method to pipe between streams and generators forwarding errors and
+ * properly cleaning up and provide a callback when the pipeline is complete.
+ *
+ * ```js
+ * const { pipeline } = require('stream');
+ * const fs = require('fs');
+ * const zlib = require('zlib');
+ *
+ * // Use the pipeline API to easily pipe a series of streams
+ * // together and get notified when the pipeline is fully done.
+ *
+ * // A pipeline to gzip a potentially huge tar file efficiently:
+ *
+ * pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz'),
+ * (err) => {
+ * if (err) {
+ * console.error('Pipeline failed.', err);
+ * } else {
+ * console.log('Pipeline succeeded.');
+ * }
+ * }
+ * );
+ * ```
+ *
+ * The `pipeline` API provides a promise version, which can also
+ * receive an options argument as the last parameter with a`signal` `AbortSignal` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with
+ * an`AbortError`.
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ *
+ * async function run() {
+ * await pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz')
+ * );
+ * console.log('Pipeline succeeded.');
+ * }
+ *
+ * run().catch(console.error);
+ * ```
+ *
+ * To use an `AbortSignal`, pass it inside an options object,
+ * as the last argument:
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ *
+ * async function run() {
+ * const ac = new AbortController();
+ * const signal = ac.signal;
+ *
+ * setTimeout(() => ac.abort(), 1);
+ * await pipeline(
+ * fs.createReadStream('archive.tar'),
+ * zlib.createGzip(),
+ * fs.createWriteStream('archive.tar.gz'),
+ * { signal },
+ * );
+ * }
+ *
+ * run().catch(console.error); // AbortError
+ * ```
+ *
+ * The `pipeline` API also supports async generators:
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ * const fs = require('fs');
+ *
+ * async function run() {
+ * await pipeline(
+ * fs.createReadStream('lowercase.txt'),
+ * async function* (source, { signal }) {
+ * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s.
+ * for await (const chunk of source) {
+ * yield await processChunk(chunk, { signal });
+ * }
+ * },
+ * fs.createWriteStream('uppercase.txt')
+ * );
+ * console.log('Pipeline succeeded.');
+ * }
+ *
+ * run().catch(console.error);
+ * ```
+ *
+ * Remember to handle the `signal` argument passed into the async generator.
+ * Especially in the case where the async generator is the source for the
+ * pipeline (i.e. first argument) or the pipeline will never complete.
+ *
+ * ```js
+ * const { pipeline } = require('stream/promises');
+ * const fs = require('fs');
+ *
+ * async function run() {
+ * await pipeline(
+ * async function* ({ signal }) {
+ * await someLongRunningfn({ signal });
+ * yield 'asd';
+ * },
+ * fs.createWriteStream('uppercase.txt')
+ * );
+ * console.log('Pipeline succeeded.');
+ * }
+ *
+ * run().catch(console.error);
+ * ```
+ *
+ * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
+ *
+ * * `Readable` streams which have emitted `'end'` or `'close'`.
+ * * `Writable` streams which have emitted `'finish'` or `'close'`.
+ *
+ * `stream.pipeline()` leaves dangling event listeners on the streams
+ * after the `callback` has been invoked. In the case of reuse of streams after
+ * failure, this can cause event listener leaks and swallowed errors. If the last
+ * stream is readable, dangling event listeners will be removed so that the last
+ * stream can be consumed later.
+ *
+ * `stream.pipeline()` closes all the streams when an error is raised.
+ * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
+ * once it would destroy the socket without sending the expected response.
+ * See the example below:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const http = require('http');
+ * const { pipeline } = require('stream');
+ *
+ * const server = http.createServer((req, res) => {
+ * const fileStream = fs.createReadStream('./fileNotExist.txt');
+ * pipeline(fileStream, res, (err) => {
+ * if (err) {
+ * console.log(err); // No such file
+ * // this message can't be sent once `pipeline` already destroyed the socket
+ * return res.end('error!!!');
+ * }
+ * });
+ * });
+ * ```
+ * @since v10.0.0
+ * @param callback Called when the pipeline is fully done.
+ */
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
+ source: A,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ callback?: PipelineCallback<B>
+ ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, callback?: PipelineCallback<B>): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
+ function pipeline(
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
+ callback?: (err: NodeJS.ErrnoException | null) => void
+ ): NodeJS.WritableStream;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>
+ ): NodeJS.WritableStream;
+ namespace pipeline {
+ function __promisify__<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+ }
+ interface Pipe {
+ close(): void;
+ hasRef(): boolean;
+ ref(): void;
+ unref(): void;
+ }
+
+ /**
+ * Returns whether the stream has encountered an error.
+ * @since v17.3.0
+ */
+ function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
+
+ /**
+ * Returns whether the stream is readable.
+ * @since v17.4.0
+ */
+ function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
+
+ const promises: typeof streamPromises;
+ const consumers: typeof streamConsumers;
+ }
+ export = internal;
+}
+declare module 'node:stream' {
+ import stream = require('stream');
+ export = stream;
+}
diff --git a/node_modules/@types/node/ts4.8/stream/consumers.d.ts b/node_modules/@types/node/ts4.8/stream/consumers.d.ts
new file mode 100755
index 0000000..ce6c9bb
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream/consumers.d.ts
@@ -0,0 +1,24 @@
+// Duplicates of interface in lib.dom.ts.
+// Duplicated here rather than referencing lib.dom.ts because doing so causes lib.dom.ts to be loaded for "test-all"
+// Which in turn causes tests to pass that shouldn't pass.
+//
+// This interface is not, and should not be, exported.
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): NodeJS.ReadableStream;
+ text(): Promise<string>;
+}
+declare module 'stream/consumers' {
+ import { Readable } from 'node:stream';
+ function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
+ function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
+ function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
+ function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Blob>;
+ function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
+}
+declare module 'node:stream/consumers' {
+ export * from 'stream/consumers';
+}
diff --git a/node_modules/@types/node/ts4.8/stream/promises.d.ts b/node_modules/@types/node/ts4.8/stream/promises.d.ts
new file mode 100755
index 0000000..b427073
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream/promises.d.ts
@@ -0,0 +1,42 @@
+declare module 'stream/promises' {
+ import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream';
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
+ source: A,
+ transform1: T1,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
+ source: A,
+ transform1: T1,
+ transform2: T2,
+ destination: B,
+ options?: PipelineOptions
+ ): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ B extends PipelineDestination<T3, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline<
+ A extends PipelineSource<any>,
+ T1 extends PipelineTransform<A, any>,
+ T2 extends PipelineTransform<T1, any>,
+ T3 extends PipelineTransform<T2, any>,
+ T4 extends PipelineTransform<T3, any>,
+ B extends PipelineDestination<T4, any>
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
+ function pipeline(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
+ ): Promise<void>;
+}
+declare module 'node:stream/promises' {
+ export * from 'stream/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/stream/web.d.ts b/node_modules/@types/node/ts4.8/stream/web.d.ts
new file mode 100755
index 0000000..f9ef057
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/stream/web.d.ts
@@ -0,0 +1,330 @@
+declare module 'stream/web' {
+ // stub module, pending copy&paste from .d.ts or manual impl
+ // copy from lib.dom.d.ts
+ interface ReadableWritablePair<R = any, W = any> {
+ readable: ReadableStream<R>;
+ /**
+ * Provides a convenient, chainable way of piping this readable stream
+ * through a transform stream (or any other { writable, readable }
+ * pair). It simply pipes the stream into the writable side of the
+ * supplied pair, and returns the readable side for further use.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ */
+ writable: WritableStream<W>;
+ }
+ interface StreamPipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ /**
+ * Pipes this readable stream to a given writable stream destination.
+ * The way in which the piping process behaves under various error
+ * conditions can be customized with a number of passed options. It
+ * returns a promise that fulfills when the piping process completes
+ * successfully, or rejects if any errors were encountered.
+ *
+ * Piping a stream will lock it for the duration of the pipe, preventing
+ * any other consumer from acquiring a reader.
+ *
+ * Errors and closures of the source and destination streams propagate
+ * as follows:
+ *
+ * An error in this source readable stream will abort destination,
+ * unless preventAbort is truthy. The returned promise will be rejected
+ * with the source's error, or with any error that occurs during
+ * aborting the destination.
+ *
+ * An error in destination will cancel this source readable stream,
+ * unless preventCancel is truthy. The returned promise will be rejected
+ * with the destination's error, or with any error that occurs during
+ * canceling the source.
+ *
+ * When this source readable stream closes, destination will be closed,
+ * unless preventClose is truthy. The returned promise will be fulfilled
+ * once this process completes, unless an error is encountered while
+ * closing the destination, in which case it will be rejected with that
+ * error.
+ *
+ * If destination starts out closed or closing, this source readable
+ * stream will be canceled, unless preventCancel is true. The returned
+ * promise will be rejected with an error indicating piping to a closed
+ * stream failed, or with any error that occurs during canceling the
+ * source.
+ *
+ * The signal option can be set to an AbortSignal to allow aborting an
+ * ongoing pipe operation via the corresponding AbortController. In this
+ * case, this source readable stream will be canceled, and destination
+ * aborted, unless the respective options preventCancel or preventAbort
+ * are set.
+ */
+ preventClose?: boolean;
+ signal?: AbortSignal;
+ }
+ interface ReadableStreamGenericReader {
+ readonly closed: Promise<undefined>;
+ cancel(reason?: any): Promise<void>;
+ }
+ interface ReadableStreamDefaultReadValueResult<T> {
+ done: false;
+ value: T;
+ }
+ interface ReadableStreamDefaultReadDoneResult {
+ done: true;
+ value?: undefined;
+ }
+ type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
+ type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
+ interface ReadableByteStreamControllerCallback {
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkAbortCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkCloseCallback {
+ (): void | PromiseLike<void>;
+ }
+ interface UnderlyingSinkStartCallback {
+ (controller: WritableStreamDefaultController): any;
+ }
+ interface UnderlyingSinkWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceCancelCallback {
+ (reason?: any): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourcePullCallback<R> {
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
+ }
+ interface UnderlyingSourceStartCallback<R> {
+ (controller: ReadableStreamController<R>): any;
+ }
+ interface TransformerFlushCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface TransformerStartCallback<O> {
+ (controller: TransformStreamDefaultController<O>): any;
+ }
+ interface TransformerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+ }
+ interface UnderlyingByteSource {
+ autoAllocateChunkSize?: number;
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableByteStreamControllerCallback;
+ start?: ReadableByteStreamControllerCallback;
+ type: 'bytes';
+ }
+ interface UnderlyingSource<R = any> {
+ cancel?: UnderlyingSourceCancelCallback;
+ pull?: UnderlyingSourcePullCallback<R>;
+ start?: UnderlyingSourceStartCallback<R>;
+ type?: undefined;
+ }
+ interface UnderlyingSink<W = any> {
+ abort?: UnderlyingSinkAbortCallback;
+ close?: UnderlyingSinkCloseCallback;
+ start?: UnderlyingSinkStartCallback;
+ type?: undefined;
+ write?: UnderlyingSinkWriteCallback<W>;
+ }
+ interface ReadableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+ }
+ /** This Streams API interface represents a readable stream of byte data. */
+ interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+ values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<R>;
+ }
+ const ReadableStream: {
+ prototype: ReadableStream;
+ new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
+ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+ };
+ interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
+ read(): Promise<ReadableStreamDefaultReadResult<R>>;
+ releaseLock(): void;
+ }
+ const ReadableStreamDefaultReader: {
+ prototype: ReadableStreamDefaultReader;
+ new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
+ };
+ const ReadableStreamBYOBReader: any;
+ const ReadableStreamBYOBRequest: any;
+ interface ReadableByteStreamController {
+ readonly byobRequest: undefined;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(error?: any): void;
+ }
+ const ReadableByteStreamController: {
+ prototype: ReadableByteStreamController;
+ new (): ReadableByteStreamController;
+ };
+ interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk?: R): void;
+ error(e?: any): void;
+ }
+ const ReadableStreamDefaultController: {
+ prototype: ReadableStreamDefaultController;
+ new (): ReadableStreamDefaultController;
+ };
+ interface Transformer<I = any, O = any> {
+ flush?: TransformerFlushCallback<O>;
+ readableType?: undefined;
+ start?: TransformerStartCallback<O>;
+ transform?: TransformerTransformCallback<I, O>;
+ writableType?: undefined;
+ }
+ interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+ }
+ const TransformStream: {
+ prototype: TransformStream;
+ new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+ };
+ interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk?: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+ }
+ const TransformStreamDefaultController: {
+ prototype: TransformStreamDefaultController;
+ new (): TransformStreamDefaultController;
+ };
+ /**
+ * This Streams API interface provides a standard abstraction for writing
+ * streaming data to a destination, known as a sink. This object comes with
+ * built-in back pressure and queuing.
+ */
+ interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+ }
+ const WritableStream: {
+ prototype: WritableStream;
+ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+ };
+ /**
+ * This Streams API interface is the object returned by
+ * WritableStream.getWriter() and once created locks the < writer to the
+ * WritableStream ensuring that no other streams can write to the underlying
+ * sink.
+ */
+ interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<undefined>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<undefined>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk?: W): Promise<void>;
+ }
+ const WritableStreamDefaultWriter: {
+ prototype: WritableStreamDefaultWriter;
+ new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
+ };
+ /**
+ * This Streams API interface represents a controller allowing control of a
+ * WritableStream's state. When constructing a WritableStream, the
+ * underlying sink is given a corresponding WritableStreamDefaultController
+ * instance to manipulate.
+ */
+ interface WritableStreamDefaultController {
+ error(e?: any): void;
+ }
+ const WritableStreamDefaultController: {
+ prototype: WritableStreamDefaultController;
+ new (): WritableStreamDefaultController;
+ };
+ interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySize<T>;
+ }
+ interface QueuingStrategySize<T = any> {
+ (chunk?: T): number;
+ }
+ interface QueuingStrategyInit {
+ /**
+ * Creates a new ByteLengthQueuingStrategy with the provided high water
+ * mark.
+ *
+ * Note that the provided high water mark will not be validated ahead of
+ * time. Instead, if it is negative, NaN, or not a number, the resulting
+ * ByteLengthQueuingStrategy will cause the corresponding stream
+ * constructor to throw.
+ */
+ highWaterMark: number;
+ }
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize<ArrayBufferView>;
+ }
+ const ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
+ };
+ /**
+ * This Streams API interface provides a built-in byte length queuing
+ * strategy that can be used when constructing streams.
+ */
+ interface CountQueuingStrategy extends QueuingStrategy {
+ readonly highWaterMark: number;
+ readonly size: QueuingStrategySize;
+ }
+ const CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new (init: QueuingStrategyInit): CountQueuingStrategy;
+ };
+ interface TextEncoderStream {
+ /** Returns "utf-8". */
+ readonly encoding: 'utf-8';
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new (): TextEncoderStream;
+ };
+ interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+ }
+ type BufferSource = ArrayBufferView | ArrayBuffer;
+ interface TextDecoderStream {
+ /** Returns encoding's name, lower cased. */
+ readonly encoding: string;
+ /** Returns `true` if error mode is "fatal", and `false` otherwise. */
+ readonly fatal: boolean;
+ /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
+ readonly ignoreBOM: boolean;
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+ readonly [Symbol.toStringTag]: string;
+ }
+ const TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
+ };
+}
+declare module 'node:stream/web' {
+ export * from 'stream/web';
+}
diff --git a/node_modules/@types/node/ts4.8/string_decoder.d.ts b/node_modules/@types/node/ts4.8/string_decoder.d.ts
new file mode 100755
index 0000000..a585804
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/string_decoder.d.ts
@@ -0,0 +1,67 @@
+/**
+ * The `string_decoder` module provides an API for decoding `Buffer` objects into
+ * strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
+ * characters. It can be accessed using:
+ *
+ * ```js
+ * const { StringDecoder } = require('string_decoder');
+ * ```
+ *
+ * The following example shows the basic use of the `StringDecoder` class.
+ *
+ * ```js
+ * const { StringDecoder } = require('string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * const cent = Buffer.from([0xC2, 0xA2]);
+ * console.log(decoder.write(cent));
+ *
+ * const euro = Buffer.from([0xE2, 0x82, 0xAC]);
+ * console.log(decoder.write(euro));
+ * ```
+ *
+ * When a `Buffer` instance is written to the `StringDecoder` instance, an
+ * internal buffer is used to ensure that the decoded string does not contain
+ * any incomplete multibyte characters. These are held in the buffer until the
+ * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
+ *
+ * In the following example, the three UTF-8 encoded bytes of the European Euro
+ * symbol (`€`) are written over three separate operations:
+ *
+ * ```js
+ * const { StringDecoder } = require('string_decoder');
+ * const decoder = new StringDecoder('utf8');
+ *
+ * decoder.write(Buffer.from([0xE2]));
+ * decoder.write(Buffer.from([0x82]));
+ * console.log(decoder.end(Buffer.from([0xAC])));
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js)
+ */
+declare module 'string_decoder' {
+ class StringDecoder {
+ constructor(encoding?: BufferEncoding);
+ /**
+ * Returns a decoded string, ensuring that any incomplete multibyte characters at
+ * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
+ * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
+ * @since v0.1.99
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ write(buffer: Buffer): string;
+ /**
+ * Returns any remaining input stored in the internal buffer as a string. Bytes
+ * representing incomplete UTF-8 and UTF-16 characters will be replaced with
+ * substitution characters appropriate for the character encoding.
+ *
+ * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
+ * After `end()` is called, the `stringDecoder` object can be reused for new input.
+ * @since v0.9.3
+ * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.
+ */
+ end(buffer?: Buffer): string;
+ }
+}
+declare module 'node:string_decoder' {
+ export * from 'string_decoder';
+}
diff --git a/node_modules/@types/node/ts4.8/test.d.ts b/node_modules/@types/node/ts4.8/test.d.ts
new file mode 100755
index 0000000..85908ed
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/test.d.ts
@@ -0,0 +1,190 @@
+/**
+ * The `node:test` module provides a standalone testing module.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/test.js)
+ */
+declare module 'node:test' {
+ /**
+ * The `test()` function is the value imported from the test module. Each invocation of this
+ * function results in the creation of a test point in the TAP output.
+ *
+ * The {@link TestContext} object passed to the fn argument can be used to perform actions
+ * related to the current test. Examples include skipping the test, adding additional TAP
+ * diagnostic information, or creating subtests.
+ *
+ * `test()` returns a {@link Promise} that resolves once the test completes. The return value
+ * can usually be discarded for top level tests. However, the return value from subtests should
+ * be used to prevent the parent test from finishing first and cancelling the subtest as shown
+ * in the following example.
+ *
+ * ```js
+ * test('top level test', async (t) => {
+ * // The setTimeout() in the following subtest would cause it to outlive its
+ * // parent test if 'await' is removed on the next line. Once the parent test
+ * // completes, it will cancel any outstanding subtests.
+ * await t.test('longer running subtest', async (t) => {
+ * return new Promise((resolve, reject) => {
+ * setTimeout(resolve, 1000);
+ * });
+ * });
+ * });
+ * ```
+ * @since v18.0.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. The first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ * @returns A {@link Promise} resolved with `undefined` once the test completes.
+ */
+ function test(name?: string, fn?: TestFn): Promise<void>;
+ function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(options?: TestOptions, fn?: TestFn): Promise<void>;
+ function test(fn?: TestFn): Promise<void>;
+
+ /*
+ * @since v18.6.0
+ * @param name The name of the suite, which is displayed when reporting suite results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the suite
+ * @param fn The function under suite. Default: A no-op function.
+ */
+ function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void;
+ function describe(name?: string, fn?: SuiteFn): void;
+ function describe(options?: TestOptions, fn?: SuiteFn): void;
+ function describe(fn?: SuiteFn): void;
+
+ /*
+ * @since v18.6.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ */
+ function it(name?: string, options?: TestOptions, fn?: ItFn): void;
+ function it(name?: string, fn?: ItFn): void;
+ function it(options?: TestOptions, fn?: ItFn): void;
+ function it(fn?: ItFn): void;
+
+ /**
+ * The type of a function under test. The first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is passed as
+ * the second argument.
+ */
+ type TestFn = (t: TestContext, done: (result?: any) => void) => any;
+
+ /**
+ * The type of a function under Suite.
+ * If the test uses callbacks, the callback function is passed as an argument
+ */
+ type SuiteFn = (done: (result?: any) => void) => void;
+
+ /**
+ * The type of a function under test.
+ * If the test uses callbacks, the callback function is passed as an argument
+ */
+ type ItFn = (done: (result?: any) => void) => any;
+
+ /**
+ * An instance of `TestContext` is passed to each test function in order to interact with the
+ * test runner. However, the `TestContext` constructor is not exposed as part of the API.
+ * @since v18.0.0
+ */
+ interface TestContext {
+ /**
+ * This function is used to write TAP diagnostics to the output. Any diagnostic information is
+ * included at the end of the test's results. This function does not return a value.
+ * @param message Message to be displayed as a TAP diagnostic.
+ * @since v18.0.0
+ */
+ diagnostic(message: string): void;
+
+ /**
+ * If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only`
+ * option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only`
+ * command-line option, this function is a no-op.
+ * @param shouldRunOnlyTests Whether or not to run `only` tests.
+ * @since v18.0.0
+ */
+ runOnly(shouldRunOnlyTests: boolean): void;
+
+ /**
+ * This function causes the test's output to indicate the test as skipped. If `message` is
+ * provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
+ * the test function. This function does not return a value.
+ * @param message Optional skip message to be displayed in TAP output.
+ * @since v18.0.0
+ */
+ skip(message?: string): void;
+
+ /**
+ * This function adds a `TODO` directive to the test's output. If `message` is provided, it is
+ * included in the TAP output. Calling `todo()` does not terminate execution of the test
+ * function. This function does not return a value.
+ * @param message Optional `TODO` message to be displayed in TAP output.
+ * @since v18.0.0
+ */
+ todo(message?: string): void;
+
+ /**
+ * This function is used to create subtests under the current test. This function behaves in
+ * the same fashion as the top level {@link test} function.
+ * @since v18.0.0
+ * @param name The name of the test, which is displayed when reporting test results.
+ * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
+ * @param options Configuration options for the test
+ * @param fn The function under test. This first argument to this function is a
+ * {@link TestContext} object. If the test uses callbacks, the callback function is
+ * passed as the second argument. Default: A no-op function.
+ * @returns A {@link Promise} resolved with `undefined` once the test completes.
+ */
+ test: typeof test;
+ }
+
+ interface TestOptions {
+ /**
+ * The number of tests that can be run at the same time. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default 1
+ */
+ concurrency?: number;
+
+ /**
+ * If truthy, and the test context is configured to run `only` tests, then this test will be
+ * run. Otherwise, the test is skipped.
+ * @default false
+ */
+ only?: boolean;
+
+ /**
+ * Allows aborting an in-progress test.
+ * @since 8.7.0
+ */
+ signal?: AbortSignal;
+
+ /**
+ * If truthy, the test is skipped. If a string is provided, that string is displayed in the
+ * test results as the reason for skipping the test.
+ * @default false
+ */
+ skip?: boolean | string;
+
+ /**
+ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ * @since 8.7.0
+ */
+ timeout?: number;
+
+ /**
+ * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
+ * the test results as the reason why the test is `TODO`.
+ * @default false
+ */
+ todo?: boolean | string;
+ }
+
+ export { test as default, test, describe, it };
+}
diff --git a/node_modules/@types/node/ts4.8/timers.d.ts b/node_modules/@types/node/ts4.8/timers.d.ts
new file mode 100755
index 0000000..b26f3ce
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/timers.d.ts
@@ -0,0 +1,94 @@
+/**
+ * The `timer` module exposes a global API for scheduling functions to
+ * be called at some future period of time. Because the timer functions are
+ * globals, there is no need to call `require('timers')` to use the API.
+ *
+ * The timer functions within Node.js implement a similar API as the timers API
+ * provided by Web Browsers but use a different internal implementation that is
+ * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js)
+ */
+declare module 'timers' {
+ import { Abortable } from 'node:events';
+ import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises';
+ interface TimerOptions extends Abortable {
+ /**
+ * Set to `false` to indicate that the scheduled `Timeout`
+ * should not require the Node.js event loop to remain active.
+ * @default true
+ */
+ ref?: boolean | undefined;
+ }
+ let setTimeout: typeof global.setTimeout;
+ let clearTimeout: typeof global.clearTimeout;
+ let setInterval: typeof global.setInterval;
+ let clearInterval: typeof global.clearInterval;
+ let setImmediate: typeof global.setImmediate;
+ let clearImmediate: typeof global.clearImmediate;
+ global {
+ namespace NodeJS {
+ // compatibility with older typings
+ interface Timer extends RefCounted {
+ hasRef(): boolean;
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+ interface Immediate extends RefCounted {
+ /**
+ * If true, the `Immediate` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ _onImmediate: Function; // to distinguish it from the Timeout class
+ }
+ interface Timeout extends Timer {
+ /**
+ * If true, the `Timeout` object will keep the Node.js event loop active.
+ * @since v11.0.0
+ */
+ hasRef(): boolean;
+ /**
+ * Sets the timer's start time to the current time, and reschedules the timer to
+ * call its callback at the previously specified duration adjusted to the current
+ * time. This is useful for refreshing a timer without allocating a new
+ * JavaScript object.
+ *
+ * Using this on a timer that has already called its callback will reactivate the
+ * timer.
+ * @since v10.2.0
+ * @return a reference to `timeout`
+ */
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+ }
+ function setTimeout<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
+ namespace setTimeout {
+ const __promisify__: typeof setTimeoutPromise;
+ }
+ function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
+ function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer;
+ namespace setInterval {
+ const __promisify__: typeof setIntervalPromise;
+ }
+ function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
+ function setImmediate<TArgs extends any[]>(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate;
+ // util.promisify no rest args compability
+ // tslint:disable-next-line void-return
+ function setImmediate(callback: (args: void) => void): NodeJS.Immediate;
+ namespace setImmediate {
+ const __promisify__: typeof setImmediatePromise;
+ }
+ function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
+ function queueMicrotask(callback: () => void): void;
+ }
+}
+declare module 'node:timers' {
+ export * from 'timers';
+}
diff --git a/node_modules/@types/node/ts4.8/timers/promises.d.ts b/node_modules/@types/node/ts4.8/timers/promises.d.ts
new file mode 100755
index 0000000..fd77888
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/timers/promises.d.ts
@@ -0,0 +1,68 @@
+/**
+ * The `timers/promises` API provides an alternative set of timer functions
+ * that return `Promise` objects. The API is accessible via`require('timers/promises')`.
+ *
+ * ```js
+ * import {
+ * setTimeout,
+ * setImmediate,
+ * setInterval,
+ * } from 'timers/promises';
+ * ```
+ * @since v15.0.0
+ */
+declare module 'timers/promises' {
+ import { TimerOptions } from 'node:timers';
+ /**
+ * ```js
+ * import {
+ * setTimeout,
+ * } from 'timers/promises';
+ *
+ * const res = await setTimeout(100, 'result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * ```js
+ * import {
+ * setImmediate,
+ * } from 'timers/promises';
+ *
+ * const res = await setImmediate('result');
+ *
+ * console.log(res); // Prints 'result'
+ * ```
+ * @since v15.0.0
+ * @param value A value with which the promise is fulfilled.
+ */
+ function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
+ /**
+ * Returns an async iterator that generates values in an interval of `delay` ms.
+ *
+ * ```js
+ * import {
+ * setInterval,
+ * } from 'timers/promises';
+ *
+ * const interval = 100;
+ * for await (const startTime of setInterval(interval, Date.now())) {
+ * const now = Date.now();
+ * console.log(now);
+ * if ((now - startTime) > 1000)
+ * break;
+ * }
+ * console.log(Date.now());
+ * ```
+ * @since v15.9.0
+ */
+ function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
+}
+declare module 'node:timers/promises' {
+ export * from 'timers/promises';
+}
diff --git a/node_modules/@types/node/ts4.8/tls.d.ts b/node_modules/@types/node/ts4.8/tls.d.ts
new file mode 100755
index 0000000..2cbc716
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/tls.d.ts
@@ -0,0 +1,1028 @@
+/**
+ * The `tls` module provides an implementation of the Transport Layer Security
+ * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
+ * The module can be accessed using:
+ *
+ * ```js
+ * const tls = require('tls');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tls.js)
+ */
+declare module 'tls' {
+ import { X509Certificate } from 'node:crypto';
+ import * as net from 'node:net';
+ import * as stream from 'stream';
+ const CLIENT_RENEG_LIMIT: number;
+ const CLIENT_RENEG_WINDOW: number;
+ interface Certificate {
+ /**
+ * Country code.
+ */
+ C: string;
+ /**
+ * Street.
+ */
+ ST: string;
+ /**
+ * Locality.
+ */
+ L: string;
+ /**
+ * Organization.
+ */
+ O: string;
+ /**
+ * Organizational unit.
+ */
+ OU: string;
+ /**
+ * Common name.
+ */
+ CN: string;
+ }
+ interface PeerCertificate {
+ subject: Certificate;
+ issuer: Certificate;
+ subjectaltname: string;
+ infoAccess: NodeJS.Dict<string[]>;
+ modulus: string;
+ exponent: string;
+ valid_from: string;
+ valid_to: string;
+ fingerprint: string;
+ fingerprint256: string;
+ ext_key_usage: string[];
+ serialNumber: string;
+ raw: Buffer;
+ }
+ interface DetailedPeerCertificate extends PeerCertificate {
+ issuerCertificate: DetailedPeerCertificate;
+ }
+ interface CipherNameAndProtocol {
+ /**
+ * The cipher name.
+ */
+ name: string;
+ /**
+ * SSL/TLS protocol version.
+ */
+ version: string;
+ /**
+ * IETF name for the cipher suite.
+ */
+ standardName: string;
+ }
+ interface EphemeralKeyInfo {
+ /**
+ * The supported types are 'DH' and 'ECDH'.
+ */
+ type: string;
+ /**
+ * The name property is available only when type is 'ECDH'.
+ */
+ name?: string | undefined;
+ /**
+ * The size of parameter of an ephemeral key exchange.
+ */
+ size: number;
+ }
+ interface KeyObject {
+ /**
+ * Private keys in PEM format.
+ */
+ pem: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface PxfObject {
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain.
+ */
+ buf: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string | undefined;
+ }
+ interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
+ /**
+ * If true the TLS socket will be instantiated in server-mode.
+ * Defaults to false.
+ */
+ isServer?: boolean | undefined;
+ /**
+ * An optional net.Server instance.
+ */
+ server?: net.Server | undefined;
+ /**
+ * An optional Buffer instance containing a TLS session.
+ */
+ session?: Buffer | undefined;
+ /**
+ * If true, specifies that the OCSP status request extension will be
+ * added to the client hello and an 'OCSPResponse' event will be
+ * emitted on the socket before establishing a secure communication
+ */
+ requestOCSP?: boolean | undefined;
+ }
+ /**
+ * Performs transparent encryption of written data and all required TLS
+ * negotiation.
+ *
+ * Instances of `tls.TLSSocket` implement the duplex `Stream` interface.
+ *
+ * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate} will only return data while the
+ * connection is open.
+ * @since v0.11.4
+ */
+ class TLSSocket extends net.Socket {
+ /**
+ * Construct a new tls.TLSSocket object from an existing TCP socket.
+ */
+ constructor(socket: net.Socket, options?: TLSSocketOptions);
+ /**
+ * This property is `true` if the peer certificate was signed by one of the CAs
+ * specified when creating the `tls.TLSSocket` instance, otherwise `false`.
+ * @since v0.11.4
+ */
+ authorized: boolean;
+ /**
+ * Returns the reason why the peer's certificate was not been verified. This
+ * property is set only when `tlsSocket.authorized === false`.
+ * @since v0.11.4
+ */
+ authorizationError: Error;
+ /**
+ * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances.
+ * @since v0.11.4
+ */
+ encrypted: true;
+ /**
+ * String containing the selected ALPN protocol.
+ * Before a handshake has completed, this value is always null.
+ * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
+ */
+ alpnProtocol: string | false | null;
+ /**
+ * Returns an object representing the local certificate. The returned object has
+ * some properties corresponding to the fields of the certificate.
+ *
+ * See {@link TLSSocket.getPeerCertificate} for an example of the certificate
+ * structure.
+ *
+ * If there is no local certificate, an empty object will be returned. If the
+ * socket has been destroyed, `null` will be returned.
+ * @since v11.2.0
+ */
+ getCertificate(): PeerCertificate | object | null;
+ /**
+ * Returns an object containing information on the negotiated cipher suite.
+ *
+ * For example:
+ *
+ * ```json
+ * {
+ * "name": "AES128-SHA256",
+ * "standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256",
+ * "version": "TLSv1.2"
+ * }
+ * ```
+ *
+ * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information.
+ * @since v0.11.4
+ */
+ getCipher(): CipherNameAndProtocol;
+ /**
+ * Returns an object representing the type, name, and size of parameter of
+ * an ephemeral key exchange in `perfect forward secrecy` on a client
+ * connection. It returns an empty object when the key exchange is not
+ * ephemeral. As this is only supported on a client socket; `null` is returned
+ * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`.
+ *
+ * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`.
+ * @since v5.0.0
+ */
+ getEphemeralKeyInfo(): EphemeralKeyInfo | object | null;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet.
+ */
+ getFinished(): Buffer | undefined;
+ /**
+ * Returns an object representing the peer's certificate. If the peer does not
+ * provide a certificate, an empty object will be returned. If the socket has been
+ * destroyed, `null` will be returned.
+ *
+ * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's
+ * certificate.
+ * @since v0.11.4
+ * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate.
+ * @return A certificate object.
+ */
+ getPeerCertificate(detailed: true): DetailedPeerCertificate;
+ getPeerCertificate(detailed?: false): PeerCertificate;
+ getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
+ /**
+ * As the `Finished` messages are message digests of the complete handshake
+ * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
+ * be used for external authentication procedures when the authentication
+ * provided by SSL/TLS is not desired or is not enough.
+ *
+ * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used
+ * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
+ * @since v9.9.0
+ * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so
+ * far.
+ */
+ getPeerFinished(): Buffer | undefined;
+ /**
+ * Returns a string containing the negotiated SSL/TLS protocol version of the
+ * current connection. The value `'unknown'` will be returned for connected
+ * sockets that have not completed the handshaking process. The value `null` will
+ * be returned for server sockets or disconnected client sockets.
+ *
+ * Protocol versions are:
+ *
+ * * `'SSLv3'`
+ * * `'TLSv1'`
+ * * `'TLSv1.1'`
+ * * `'TLSv1.2'`
+ * * `'TLSv1.3'`
+ *
+ * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information.
+ * @since v5.7.0
+ */
+ getProtocol(): string | null;
+ /**
+ * Returns the TLS session data or `undefined` if no session was
+ * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful
+ * for debugging.
+ *
+ * See `Session Resumption` for more information.
+ *
+ * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications
+ * must use the `'session'` event (it also works for TLSv1.2 and below).
+ * @since v0.11.4
+ */
+ getSession(): Buffer | undefined;
+ /**
+ * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information.
+ * @since v12.11.0
+ * @return List of signature algorithms shared between the server and the client in the order of decreasing preference.
+ */
+ getSharedSigalgs(): string[];
+ /**
+ * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`.
+ *
+ * It may be useful for debugging.
+ *
+ * See `Session Resumption` for more information.
+ * @since v0.11.4
+ */
+ getTLSTicket(): Buffer | undefined;
+ /**
+ * See `Session Resumption` for more information.
+ * @since v0.5.6
+ * @return `true` if the session was reused, `false` otherwise.
+ */
+ isSessionReused(): boolean;
+ /**
+ * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process.
+ * Upon completion, the `callback` function will be passed a single argument
+ * that is either an `Error` (if the request failed) or `null`.
+ *
+ * This method can be used to request a peer's certificate after the secure
+ * connection has been established.
+ *
+ * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout.
+ *
+ * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the
+ * protocol.
+ * @since v0.11.8
+ * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with
+ * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all.
+ * @return `true` if renegotiation was initiated, `false` otherwise.
+ */
+ renegotiate(
+ options: {
+ rejectUnauthorized?: boolean | undefined;
+ requestCert?: boolean | undefined;
+ },
+ callback: (err: Error | null) => void
+ ): undefined | boolean;
+ /**
+ * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size.
+ * Returns `true` if setting the limit succeeded; `false` otherwise.
+ *
+ * Smaller fragment sizes decrease the buffering latency on the client: larger
+ * fragments are buffered by the TLS layer until the entire fragment is received
+ * and its integrity is verified; large fragments can span multiple roundtrips
+ * and their processing can be delayed due to packet loss or reordering. However,
+ * smaller fragments add extra TLS framing bytes and CPU overhead, which may
+ * decrease overall server throughput.
+ * @since v0.11.11
+ * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`.
+ */
+ setMaxSendFragment(size: number): boolean;
+ /**
+ * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts
+ * to renegotiate will trigger an `'error'` event on the `TLSSocket`.
+ * @since v8.4.0
+ */
+ disableRenegotiation(): void;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ *
+ * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by
+ * OpenSSL's `SSL_trace()` function, the format is undocumented, can change
+ * without notice, and should not be relied on.
+ * @since v12.2.0
+ */
+ enableTrace(): void;
+ /**
+ * Returns the peer certificate as an `X509Certificate` object.
+ *
+ * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getPeerX509Certificate(): X509Certificate | undefined;
+ /**
+ * Returns the local certificate as an `X509Certificate` object.
+ *
+ * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned.
+ * @since v15.9.0
+ */
+ getX509Certificate(): X509Certificate | undefined;
+ /**
+ * Keying material is used for validations to prevent different kind of attacks in
+ * network protocols, for example in the specifications of IEEE 802.1X.
+ *
+ * Example
+ *
+ * ```js
+ * const keyingMaterial = tlsSocket.exportKeyingMaterial(
+ * 128,
+ * 'client finished');
+ *
+ * /*
+ * Example return value of keyingMaterial:
+ * <Buffer 76 26 af 99 c5 56 8e 42 09 91 ef 9f 93 cb ad 6c 7b 65 f8 53 f1 d8 d9
+ * 12 5a 33 b8 b5 25 df 7b 37 9f e0 e2 4f b8 67 83 a3 2f cd 5d 41 42 4c 91
+ * 74 ef 2c ... 78 more bytes>
+ *
+ * ```
+ *
+ * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more
+ * information.
+ * @since v13.10.0, v12.17.0
+ * @param length number of bytes to retrieve from keying material
+ * @param label an application specific label, typically this will be a value from the [IANA Exporter Label
+ * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
+ * @param context Optionally provide a context.
+ * @return requested bytes of the keying material
+ */
+ exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ addListener(event: 'secureConnect', listener: () => void): this;
+ addListener(event: 'session', listener: (session: Buffer) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'OCSPResponse', response: Buffer): boolean;
+ emit(event: 'secureConnect'): boolean;
+ emit(event: 'session', session: Buffer): boolean;
+ emit(event: 'keylog', line: Buffer): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ on(event: 'secureConnect', listener: () => void): this;
+ on(event: 'session', listener: (session: Buffer) => void): this;
+ on(event: 'keylog', listener: (line: Buffer) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ once(event: 'secureConnect', listener: () => void): this;
+ once(event: 'session', listener: (session: Buffer) => void): this;
+ once(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependListener(event: 'secureConnect', listener: () => void): this;
+ prependListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this;
+ prependOnceListener(event: 'secureConnect', listener: () => void): this;
+ prependOnceListener(event: 'session', listener: (session: Buffer) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer) => void): this;
+ }
+ interface CommonConnectionOptions {
+ /**
+ * An optional TLS context object from tls.createSecureContext()
+ */
+ secureContext?: SecureContext | undefined;
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ * @default false
+ */
+ enableTrace?: boolean | undefined;
+ /**
+ * If true the server will request a certificate from clients that
+ * connect and attempt to verify that certificate. Defaults to
+ * false.
+ */
+ requestCert?: boolean | undefined;
+ /**
+ * An array of strings or a Buffer naming possible ALPN protocols.
+ * (Protocols should be ordered by their priority.)
+ */
+ ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined;
+ /**
+ * SNICallback(servername, cb) <Function> A function that will be
+ * called if the client supports SNI TLS extension. Two arguments
+ * will be passed when called: servername and cb. SNICallback should
+ * invoke cb(null, ctx), where ctx is a SecureContext instance.
+ * (tls.createSecureContext(...) can be used to get a proper
+ * SecureContext.) If SNICallback wasn't provided the default callback
+ * with high-level API will be used (see below).
+ */
+ SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined;
+ /**
+ * If true the server will reject any connection which is not
+ * authorized with the list of supplied CAs. This option only has an
+ * effect if requestCert is true.
+ * @default true
+ */
+ rejectUnauthorized?: boolean | undefined;
+ }
+ interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
+ /**
+ * Abort the connection if the SSL/TLS handshake does not finish in the
+ * specified number of milliseconds. A 'tlsClientError' is emitted on
+ * the tls.Server object whenever a handshake times out. Default:
+ * 120000 (120 seconds).
+ */
+ handshakeTimeout?: number | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ *
+ * @param socket
+ * @param identity identity parameter sent from the client.
+ * @return pre-shared key that must either be
+ * a buffer or `null` to stop the negotiation process. Returned PSK must be
+ * compatible with the selected cipher's digest.
+ *
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with the identity provided by the client.
+ * If the return value is `null` the negotiation process will stop and an
+ * "unknown_psk_identity" alert message will be sent to the other party.
+ * If the server wishes to hide the fact that the PSK identity was not known,
+ * the callback must provide some random data as `psk` to make the connection
+ * fail with "decrypt_error" before negotiation is finished.
+ * PSK ciphers are disabled by default, and using TLS-PSK thus
+ * requires explicitly specifying a cipher suite with the `ciphers` option.
+ * More information can be found in the RFC 4279.
+ */
+ pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null;
+ /**
+ * hint to send to a client to help
+ * with selecting the identity during TLS-PSK negotiation. Will be ignored
+ * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be
+ * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.
+ */
+ pskIdentityHint?: string | undefined;
+ }
+ interface PSKCallbackNegotation {
+ psk: DataView | NodeJS.TypedArray;
+ identity: string;
+ }
+ interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
+ host?: string | undefined;
+ port?: number | undefined;
+ path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
+ socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket
+ checkServerIdentity?: typeof checkServerIdentity | undefined;
+ servername?: string | undefined; // SNI TLS Extension
+ session?: Buffer | undefined;
+ minDHSize?: number | undefined;
+ lookup?: net.LookupFunction | undefined;
+ timeout?: number | undefined;
+ /**
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with optional identity `hint` provided by the server or `null`
+ * in case of TLS 1.3 where `hint` was removed.
+ * It will be necessary to provide a custom `tls.checkServerIdentity()`
+ * for the connection as the default one will try to check hostname/IP
+ * of the server against the certificate but that's not applicable for PSK
+ * because there won't be a certificate present.
+ * More information can be found in the RFC 4279.
+ *
+ * @param hint message sent from the server to help client
+ * decide which identity to use during negotiation.
+ * Always `null` if TLS 1.3 is used.
+ * @returns Return `null` to stop the negotiation process. `psk` must be
+ * compatible with the selected cipher's digest.
+ * `identity` must use UTF-8 encoding.
+ */
+ pskCallback?(hint: string | null): PSKCallbackNegotation | null;
+ }
+ /**
+ * Accepts encrypted connections using TLS or SSL.
+ * @since v0.3.2
+ */
+ class Server extends net.Server {
+ constructor(secureConnectionListener?: (socket: TLSSocket) => void);
+ constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void);
+ /**
+ * The `server.addContext()` method adds a secure context that will be used if
+ * the client request's SNI name matches the supplied `hostname` (or wildcard).
+ *
+ * When there are multiple matching contexts, the most recently added one is
+ * used.
+ * @since v0.5.3
+ * @param hostname A SNI host name or wildcard (e.g. `'*'`)
+ * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
+ */
+ addContext(hostname: string, context: SecureContextOptions): void;
+ /**
+ * Returns the session ticket keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @return A 48-byte buffer containing the session ticket keys.
+ */
+ getTicketKeys(): Buffer;
+ /**
+ * The `server.setSecureContext()` method replaces the secure context of an
+ * existing server. Existing connections to the server are not interrupted.
+ * @since v11.0.0
+ * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
+ */
+ setSecureContext(options: SecureContextOptions): void;
+ /**
+ * Sets the session ticket keys.
+ *
+ * Changes to the ticket keys are effective only for future server connections.
+ * Existing or currently pending server connections will use the previous keys.
+ *
+ * See `Session Resumption` for more information.
+ * @since v3.0.0
+ * @param keys A 48-byte buffer containing the session ticket keys.
+ */
+ setTicketKeys(keys: Buffer): void;
+ /**
+ * events.EventEmitter
+ * 1. tlsClientError
+ * 2. newSession
+ * 3. OCSPRequest
+ * 4. resumeSession
+ * 5. secureConnection
+ * 6. keylog
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ addListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'tlsClientError', err: Error, tlsSocket: TLSSocket): boolean;
+ emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
+ emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
+ emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean;
+ emit(event: 'secureConnection', tlsSocket: TLSSocket): boolean;
+ emit(event: 'keylog', line: Buffer, tlsSocket: TLSSocket): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ on(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ on(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ once(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ once(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
+ prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
+ prependOnceListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ }
+ /**
+ * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
+ */
+ interface SecurePair {
+ encrypted: TLSSocket;
+ cleartext: TLSSocket;
+ }
+ type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
+ interface SecureContextOptions {
+ /**
+ * Optionally override the trusted CA certificates. Default is to trust
+ * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
+ * replaced when CAs are explicitly specified using this option.
+ */
+ ca?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Cert chains in PEM format. One cert chain should be provided per
+ * private key. Each cert chain should consist of the PEM formatted
+ * certificate for a provided private key, followed by the PEM
+ * formatted intermediate certificates (if any), in order, and not
+ * including the root CA (the root CA must be pre-known to the peer,
+ * see ca). When providing multiple cert chains, they do not have to
+ * be in the same order as their private keys in key. If the
+ * intermediate certificates are not provided, the peer will not be
+ * able to validate the certificate, and the handshake will fail.
+ */
+ cert?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Colon-separated list of supported signature algorithms. The list
+ * can contain digest algorithms (SHA256, MD5 etc.), public key
+ * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
+ * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
+ */
+ sigalgs?: string | undefined;
+ /**
+ * Cipher suite specification, replacing the default. For more
+ * information, see modifying the default cipher suite. Permitted
+ * ciphers can be obtained via tls.getCiphers(). Cipher names must be
+ * uppercased in order for OpenSSL to accept them.
+ */
+ ciphers?: string | undefined;
+ /**
+ * Name of an OpenSSL engine which can provide the client certificate.
+ */
+ clientCertEngine?: string | undefined;
+ /**
+ * PEM formatted CRLs (Certificate Revocation Lists).
+ */
+ crl?: string | Buffer | Array<string | Buffer> | undefined;
+ /**
+ * Diffie Hellman parameters, required for Perfect Forward Secrecy. Use
+ * openssl dhparam to create the parameters. The key length must be
+ * greater than or equal to 1024 bits or else an error will be thrown.
+ * Although 1024 bits is permissible, use 2048 bits or larger for
+ * stronger security. If omitted or invalid, the parameters are
+ * silently discarded and DHE ciphers will not be available.
+ */
+ dhparam?: string | Buffer | undefined;
+ /**
+ * A string describing a named curve or a colon separated list of curve
+ * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
+ * agreement. Set to auto to select the curve automatically. Use
+ * crypto.getCurves() to obtain a list of available curve names. On
+ * recent releases, openssl ecparam -list_curves will also display the
+ * name and description of each available elliptic curve. Default:
+ * tls.DEFAULT_ECDH_CURVE.
+ */
+ ecdhCurve?: string | undefined;
+ /**
+ * Attempt to use the server's cipher suite preferences instead of the
+ * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
+ * set in secureOptions
+ */
+ honorCipherOrder?: boolean | undefined;
+ /**
+ * Private keys in PEM format. PEM allows the option of private keys
+ * being encrypted. Encrypted keys will be decrypted with
+ * options.passphrase. Multiple keys using different algorithms can be
+ * provided either as an array of unencrypted key strings or buffers,
+ * or an array of objects in the form {pem: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted keys will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ key?: string | Buffer | Array<string | Buffer | KeyObject> | undefined;
+ /**
+ * Name of an OpenSSL engine to get private key from. Should be used
+ * together with privateKeyIdentifier.
+ */
+ privateKeyEngine?: string | undefined;
+ /**
+ * Identifier of a private key managed by an OpenSSL engine. Should be
+ * used together with privateKeyEngine. Should not be set together with
+ * key, because both options define a private key in different ways.
+ */
+ privateKeyIdentifier?: string | undefined;
+ /**
+ * Optionally set the maximum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other.
+ * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using
+ * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
+ * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
+ */
+ maxVersion?: SecureVersion | undefined;
+ /**
+ * Optionally set the minimum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other. It is not recommended to use
+ * less than TLSv1.2, but it may be required for interoperability.
+ * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using
+ * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to
+ * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
+ */
+ minVersion?: SecureVersion | undefined;
+ /**
+ * Shared passphrase used for a single private key and/or a PFX.
+ */
+ passphrase?: string | undefined;
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain. pfx is an
+ * alternative to providing key and cert individually. PFX is usually
+ * encrypted, if it is, passphrase will be used to decrypt it. Multiple
+ * PFX can be provided either as an array of unencrypted PFX buffers,
+ * or an array of objects in the form {buf: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted PFX will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
+ /**
+ * Optionally affect the OpenSSL protocol behavior, which is not
+ * usually necessary. This should be used carefully if at all! Value is
+ * a numeric bitmask of the SSL_OP_* options from OpenSSL Options
+ */
+ secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options
+ /**
+ * Legacy mechanism to select the TLS protocol version to use, it does
+ * not support independent control of the minimum and maximum version,
+ * and does not support limiting the protocol to TLSv1.3. Use
+ * minVersion and maxVersion instead. The possible values are listed as
+ * SSL_METHODS, use the function names as strings. For example, use
+ * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow
+ * any TLS protocol version up to TLSv1.3. It is not recommended to use
+ * TLS versions less than 1.2, but it may be required for
+ * interoperability. Default: none, see minVersion.
+ */
+ secureProtocol?: string | undefined;
+ /**
+ * Opaque identifier used by servers to ensure session state is not
+ * shared between applications. Unused by clients.
+ */
+ sessionIdContext?: string | undefined;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ * See Session Resumption for more information.
+ */
+ ticketKeys?: Buffer | undefined;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number | undefined;
+ }
+ interface SecureContext {
+ context: any;
+ }
+ /**
+ * Verifies the certificate `cert` is issued to `hostname`.
+ *
+ * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on
+ * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).
+ *
+ * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as
+ * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead.
+ *
+ * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The
+ * overwriting function can call `tls.checkServerIdentity()` of course, to augment
+ * the checks done with additional verification.
+ *
+ * This function is only called if the certificate passed all other checks, such as
+ * being issued by trusted CA (`options.ca`).
+ *
+ * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name
+ * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use
+ * a custom`options.checkServerIdentity` function that implements the desired behavior.
+ * @since v0.8.4
+ * @param hostname The host name or IP address to verify the certificate against.
+ * @param cert A `certificate object` representing the peer's certificate.
+ */
+ function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined;
+ /**
+ * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is
+ * automatically set as a listener for the `'secureConnection'` event.
+ *
+ * The `ticketKeys` options is automatically shared between `cluster` module
+ * workers.
+ *
+ * The following illustrates a simple echo server:
+ *
+ * ```js
+ * const tls = require('tls');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * key: fs.readFileSync('server-key.pem'),
+ * cert: fs.readFileSync('server-cert.pem'),
+ *
+ * // This is necessary only if using client certificate authentication.
+ * requestCert: true,
+ *
+ * // This is necessary only if the client uses a self-signed certificate.
+ * ca: [ fs.readFileSync('client-cert.pem') ]
+ * };
+ *
+ * const server = tls.createServer(options, (socket) => {
+ * console.log('server connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * socket.write('welcome!\n');
+ * socket.setEncoding('utf8');
+ * socket.pipe(socket);
+ * });
+ * server.listen(8000, () => {
+ * console.log('server bound');
+ * });
+ * ```
+ *
+ * The server can be tested by connecting to it using the example client from {@link connect}.
+ * @since v0.3.2
+ */
+ function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ /**
+ * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event.
+ *
+ * `tls.connect()` returns a {@link TLSSocket} object.
+ *
+ * Unlike the `https` API, `tls.connect()` does not enable the
+ * SNI (Server Name Indication) extension by default, which may cause some
+ * servers to return an incorrect certificate or reject the connection
+ * altogether. To enable SNI, set the `servername` option in addition
+ * to `host`.
+ *
+ * The following illustrates a client for the echo server example from {@link createServer}:
+ *
+ * ```js
+ * // Assumes an echo server that is listening on port 8000.
+ * const tls = require('tls');
+ * const fs = require('fs');
+ *
+ * const options = {
+ * // Necessary only if the server requires client certificate authentication.
+ * key: fs.readFileSync('client-key.pem'),
+ * cert: fs.readFileSync('client-cert.pem'),
+ *
+ * // Necessary only if the server uses a self-signed certificate.
+ * ca: [ fs.readFileSync('server-cert.pem') ],
+ *
+ * // Necessary only if the server's cert isn't for "localhost".
+ * checkServerIdentity: () => { return null; },
+ * };
+ *
+ * const socket = tls.connect(8000, options, () => {
+ * console.log('client connected',
+ * socket.authorized ? 'authorized' : 'unauthorized');
+ * process.stdin.pipe(socket);
+ * process.stdin.resume();
+ * });
+ * socket.setEncoding('utf8');
+ * socket.on('data', (data) => {
+ * console.log(data);
+ * });
+ * socket.on('end', () => {
+ * console.log('server ends connection');
+ * });
+ * ```
+ * @since v0.11.3
+ */
+ function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ /**
+ * Creates a new secure pair object with two streams, one of which reads and writes
+ * the encrypted data and the other of which reads and writes the cleartext data.
+ * Generally, the encrypted stream is piped to/from an incoming encrypted data
+ * stream and the cleartext one is used as a replacement for the initial encrypted
+ * stream.
+ *
+ * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties.
+ *
+ * Using `cleartext` has the same API as {@link TLSSocket}.
+ *
+ * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code:
+ *
+ * ```js
+ * pair = tls.createSecurePair(// ... );
+ * pair.encrypted.pipe(socket);
+ * socket.pipe(pair.encrypted);
+ * ```
+ *
+ * can be replaced by:
+ *
+ * ```js
+ * secureSocket = tls.TLSSocket(socket, options);
+ * ```
+ *
+ * where `secureSocket` has the same API as `pair.cleartext`.
+ * @since v0.3.2
+ * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead.
+ * @param context A secure context object as returned by `tls.createSecureContext()`
+ * @param isServer `true` to specify that this TLS connection should be opened as a server.
+ * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
+ * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
+ */
+ function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
+ /**
+ * {@link createServer} sets the default value of the `honorCipherOrder` option
+ * to `true`, other APIs that create secure contexts leave it unset.
+ *
+ * {@link createServer} uses a 128 bit truncated SHA1 hash value generated
+ * from `process.argv` as the default value of the `sessionIdContext` option, other
+ * APIs that create secure contexts have no default value.
+ *
+ * The `tls.createSecureContext()` method creates a `SecureContext` object. It is
+ * usable as an argument to several `tls` APIs, such as {@link createServer} and `server.addContext()`, but has no public methods.
+ *
+ * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.
+ *
+ * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of
+ * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
+ * @since v0.11.13
+ */
+ function createSecureContext(options?: SecureContextOptions): SecureContext;
+ /**
+ * Returns an array with the names of the supported TLS ciphers. The names are
+ * lower-case for historical reasons, but must be uppercased to be used in
+ * the `ciphers` option of {@link createSecureContext}.
+ *
+ * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`.
+ *
+ * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
+ * TLSv1.2 and below.
+ *
+ * ```js
+ * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...]
+ * ```
+ * @since v0.10.2
+ */
+ function getCiphers(): string[];
+ /**
+ * The default curve name to use for ECDH key agreement in a tls server.
+ * The default value is 'auto'. See tls.createSecureContext() for further
+ * information.
+ */
+ let DEFAULT_ECDH_CURVE: string;
+ /**
+ * The default value of the maxVersion option of
+ * tls.createSecureContext(). It can be assigned any of the supported TLS
+ * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default:
+ * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets
+ * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the highest maximum
+ * is used.
+ */
+ let DEFAULT_MAX_VERSION: SecureVersion;
+ /**
+ * The default value of the minVersion option of tls.createSecureContext().
+ * It can be assigned any of the supported TLS protocol versions,
+ * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless
+ * changed using CLI options. Using --tls-min-v1.0 sets the default to
+ * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using
+ * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options
+ * are provided, the lowest minimum is used.
+ */
+ let DEFAULT_MIN_VERSION: SecureVersion;
+ /**
+ * An immutable array of strings representing the root certificates (in PEM
+ * format) used for verifying peer certificates. This is the default value
+ * of the ca option to tls.createSecureContext().
+ */
+ const rootCertificates: ReadonlyArray<string>;
+}
+declare module 'node:tls' {
+ export * from 'tls';
+}
diff --git a/node_modules/@types/node/ts4.8/trace_events.d.ts b/node_modules/@types/node/ts4.8/trace_events.d.ts
new file mode 100755
index 0000000..d47aa93
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/trace_events.d.ts
@@ -0,0 +1,171 @@
+/**
+ * The `trace_events` module provides a mechanism to centralize tracing information
+ * generated by V8, Node.js core, and userspace code.
+ *
+ * Tracing can be enabled with the `--trace-event-categories` command-line flag
+ * or by using the `trace_events` module. The `--trace-event-categories` flag
+ * accepts a list of comma-separated category names.
+ *
+ * The available categories are:
+ *
+ * * `node`: An empty placeholder.
+ * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data.
+ * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
+ * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
+ * * `node.console`: Enables capture of `console.time()` and `console.count()`output.
+ * * `node.dns.native`: Enables capture of trace data for DNS queries.
+ * * `node.environment`: Enables capture of Node.js Environment milestones.
+ * * `node.fs.sync`: Enables capture of trace data for file system sync methods.
+ * * `node.perf`: Enables capture of `Performance API` measurements.
+ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing
+ * measures and marks.
+ * * `node.perf.timerify`: Enables capture of only Performance API timerify
+ * measurements.
+ * * `node.promises.rejections`: Enables capture of trace data tracking the number
+ * of unhandled Promise rejections and handled-after-rejections.
+ * * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
+ * * `v8`: The `V8` events are GC, compiling, and execution related.
+ *
+ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
+ *
+ * ```bash
+ * node --trace-event-categories v8,node,node.async_hooks server.js
+ * ```
+ *
+ * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be
+ * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default.
+ *
+ * ```bash
+ * node --trace-events-enabled
+ *
+ * # is equivalent to
+ *
+ * node --trace-event-categories v8,node,node.async_hooks
+ * ```
+ *
+ * Alternatively, trace events may be enabled using the `trace_events` module:
+ *
+ * ```js
+ * const trace_events = require('trace_events');
+ * const tracing = trace_events.createTracing({ categories: ['node.perf'] });
+ * tracing.enable(); // Enable trace event capture for the 'node.perf' category
+ *
+ * // do work
+ *
+ * tracing.disable(); // Disable trace event capture for the 'node.perf' category
+ * ```
+ *
+ * Running Node.js with tracing enabled will produce log files that can be opened
+ * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
+ *
+ * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
+ * be specified with `--trace-event-file-pattern` that accepts a template
+ * string that supports `${rotation}` and `${pid}`:
+ *
+ * ```bash
+ * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
+ * ```
+ *
+ * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
+ * in your code, such as:
+ *
+ * ```js
+ * process.on('SIGINT', function onSigint() {
+ * console.info('Received SIGINT.');
+ * process.exit(130); // Or applicable exit code depending on OS and signal
+ * });
+ * ```
+ *
+ * The tracing system uses the same time source
+ * as the one used by `process.hrtime()`.
+ * However the trace-event timestamps are expressed in microseconds,
+ * unlike `process.hrtime()` which returns nanoseconds.
+ *
+ * The features from this module are not available in `Worker` threads.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js)
+ */
+declare module 'trace_events' {
+ /**
+ * The `Tracing` object is used to enable or disable tracing for sets of
+ * categories. Instances are created using the
+ * `trace_events.createTracing()` method.
+ *
+ * When created, the `Tracing` object is disabled. Calling the
+ * `tracing.enable()` method adds the categories to the set of enabled trace
+ * event categories. Calling `tracing.disable()` will remove the categories
+ * from the set of enabled trace event categories.
+ */
+ interface Tracing {
+ /**
+ * A comma-separated list of the trace event categories covered by this
+ * `Tracing` object.
+ */
+ readonly categories: string;
+ /**
+ * Disables this `Tracing` object.
+ *
+ * Only trace event categories _not_ covered by other enabled `Tracing`
+ * objects and _not_ specified by the `--trace-event-categories` flag
+ * will be disabled.
+ */
+ disable(): void;
+ /**
+ * Enables this `Tracing` object for the set of categories covered by
+ * the `Tracing` object.
+ */
+ enable(): void;
+ /**
+ * `true` only if the `Tracing` object has been enabled.
+ */
+ readonly enabled: boolean;
+ }
+ interface CreateTracingOptions {
+ /**
+ * An array of trace category names. Values included in the array are
+ * coerced to a string when possible. An error will be thrown if the
+ * value cannot be coerced.
+ */
+ categories: string[];
+ }
+ /**
+ * Creates and returns a `Tracing` object for the given set of `categories`.
+ *
+ * ```js
+ * const trace_events = require('trace_events');
+ * const categories = ['node.perf', 'node.async_hooks'];
+ * const tracing = trace_events.createTracing({ categories });
+ * tracing.enable();
+ * // do stuff
+ * tracing.disable();
+ * ```
+ * @since v10.0.0
+ * @return .
+ */
+ function createTracing(options: CreateTracingOptions): Tracing;
+ /**
+ * Returns a comma-separated list of all currently-enabled trace event
+ * categories. The current set of enabled trace event categories is determined
+ * by the _union_ of all currently-enabled `Tracing` objects and any categories
+ * enabled using the `--trace-event-categories` flag.
+ *
+ * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console.
+ *
+ * ```js
+ * const trace_events = require('trace_events');
+ * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
+ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });
+ * const t3 = trace_events.createTracing({ categories: ['v8'] });
+ *
+ * t1.enable();
+ * t2.enable();
+ *
+ * console.log(trace_events.getEnabledCategories());
+ * ```
+ * @since v10.0.0
+ */
+ function getEnabledCategories(): string | undefined;
+}
+declare module 'node:trace_events' {
+ export * from 'trace_events';
+}
diff --git a/node_modules/@types/node/ts4.8/tty.d.ts b/node_modules/@types/node/ts4.8/tty.d.ts
new file mode 100755
index 0000000..6473f8d
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/tty.d.ts
@@ -0,0 +1,206 @@
+/**
+ * The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.
+ * In most cases, it will not be necessary or possible to use this module directly.
+ * However, it can be accessed using:
+ *
+ * ```js
+ * const tty = require('tty');
+ * ```
+ *
+ * When Node.js detects that it is being run with a text terminal ("TTY")
+ * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
+ * default, be instances of `tty.WriteStream`. The preferred method of determining
+ * whether Node.js is being run within a TTY context is to check that the value of
+ * the `process.stdout.isTTY` property is `true`:
+ *
+ * ```console
+ * $ node -p -e "Boolean(process.stdout.isTTY)"
+ * true
+ * $ node -p -e "Boolean(process.stdout.isTTY)" | cat
+ * false
+ * ```
+ *
+ * In most cases, there should be little to no reason for an application to
+ * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tty.js)
+ */
+declare module 'tty' {
+ import * as net from 'node:net';
+ /**
+ * The `tty.isatty()` method returns `true` if the given `fd` is associated with
+ * a TTY and `false` if it is not, including whenever `fd` is not a non-negative
+ * integer.
+ * @since v0.5.8
+ * @param fd A numeric file descriptor
+ */
+ function isatty(fd: number): boolean;
+ /**
+ * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js
+ * process and there should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class ReadStream extends net.Socket {
+ constructor(fd: number, options?: net.SocketConstructorOpts);
+ /**
+ * A `boolean` that is `true` if the TTY is currently configured to operate as a
+ * raw device. Defaults to `false`.
+ * @since v0.7.7
+ */
+ isRaw: boolean;
+ /**
+ * Allows configuration of `tty.ReadStream` so that it operates as a raw device.
+ *
+ * When in raw mode, input is always available character-by-character, not
+ * including modifiers. Additionally, all special processing of characters by the
+ * terminal is disabled, including echoing input
+ * characters. Ctrl+C will no longer cause a `SIGINT` when
+ * in this mode.
+ * @since v0.7.7
+ * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw`
+ * property will be set to the resulting mode.
+ * @return The read stream instance.
+ */
+ setRawMode(mode: boolean): this;
+ /**
+ * A `boolean` that is always `true` for `tty.ReadStream` instances.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+ /**
+ * -1 - to the left from cursor
+ * 0 - the entire line
+ * 1 - to the right from cursor
+ */
+ type Direction = -1 | 0 | 1;
+ /**
+ * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
+ * should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class WriteStream extends net.Socket {
+ constructor(fd: number);
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'resize', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'resize'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'resize', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'resize', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'resize', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'resize', listener: () => void): this;
+ /**
+ * `writeStream.clearLine()` clears the current line of this `WriteStream` in a
+ * direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearLine(dir: Direction, callback?: () => void): boolean;
+ /**
+ * `writeStream.clearScreenDown()` clears this `WriteStream` from the current
+ * cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearScreenDown(callback?: () => void): boolean;
+ /**
+ * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified
+ * position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
+ cursorTo(x: number, callback: () => void): boolean;
+ /**
+ * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its
+ * current position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
+ /**
+ * Returns:
+ *
+ * * `1` for 2,
+ * * `4` for 16,
+ * * `8` for 256,
+ * * `24` for 16,777,216 colors supported.
+ *
+ * Use this to determine what colors the terminal supports. Due to the nature of
+ * colors in terminals it is possible to either have false positives or false
+ * negatives. It depends on process information and the environment variables that
+ * may lie about what terminal is used.
+ * It is possible to pass in an `env` object to simulate the usage of a specific
+ * terminal. This can be useful to check how specific environment settings behave.
+ *
+ * To enforce a specific color support, use one of the below environment settings.
+ *
+ * * 2 colors: `FORCE_COLOR = 0` (Disables colors)
+ * * 16 colors: `FORCE_COLOR = 1`
+ * * 256 colors: `FORCE_COLOR = 2`
+ * * 16,777,216 colors: `FORCE_COLOR = 3`
+ *
+ * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
+ * @since v9.9.0
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ getColorDepth(env?: object): number;
+ /**
+ * Returns `true` if the `writeStream` supports at least as many colors as provided
+ * in `count`. Minimum support is 2 (black and white).
+ *
+ * This has the same false positives and negatives as described in `writeStream.getColorDepth()`.
+ *
+ * ```js
+ * process.stdout.hasColors();
+ * // Returns true or false depending on if `stdout` supports at least 16 colors.
+ * process.stdout.hasColors(256);
+ * // Returns true or false depending on if `stdout` supports at least 256 colors.
+ * process.stdout.hasColors({ TMUX: '1' });
+ * // Returns true.
+ * process.stdout.hasColors(2 ** 24, { TMUX: '1' });
+ * // Returns false (the environment setting pretends to support 2 ** 8 colors).
+ * ```
+ * @since v11.13.0, v10.16.0
+ * @param [count=16] The number of colors that are requested (minimum 2).
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ hasColors(count?: number): boolean;
+ hasColors(env?: object): boolean;
+ hasColors(count: number, env?: object): boolean;
+ /**
+ * `writeStream.getWindowSize()` returns the size of the TTY
+ * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
+ * of columns and rows in the corresponding TTY.
+ * @since v0.7.7
+ */
+ getWindowSize(): [number, number];
+ /**
+ * A `number` specifying the number of columns the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ columns: number;
+ /**
+ * A `number` specifying the number of rows the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ rows: number;
+ /**
+ * A `boolean` that is always `true`.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+}
+declare module 'node:tty' {
+ export * from 'tty';
+}
diff --git a/node_modules/@types/node/ts4.8/url.d.ts b/node_modules/@types/node/ts4.8/url.d.ts
new file mode 100755
index 0000000..18362c8
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/url.d.ts
@@ -0,0 +1,897 @@
+/**
+ * The `url` module provides utilities for URL resolution and parsing. It can be
+ * accessed using:
+ *
+ * ```js
+ * import url from 'url';
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js)
+ */
+declare module 'url' {
+ import { Blob } from 'node:buffer';
+ import { ClientRequestArgs } from 'node:http';
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
+ // Input to `url.format`
+ interface UrlObject {
+ auth?: string | null | undefined;
+ hash?: string | null | undefined;
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ href?: string | null | undefined;
+ pathname?: string | null | undefined;
+ protocol?: string | null | undefined;
+ search?: string | null | undefined;
+ slashes?: boolean | null | undefined;
+ port?: string | number | null | undefined;
+ query?: string | null | ParsedUrlQueryInput | undefined;
+ }
+ // Output of `url.parse`
+ interface Url {
+ auth: string | null;
+ hash: string | null;
+ host: string | null;
+ hostname: string | null;
+ href: string;
+ path: string | null;
+ pathname: string | null;
+ protocol: string | null;
+ search: string | null;
+ slashes: boolean | null;
+ port: string | null;
+ query: string | null | ParsedUrlQuery;
+ }
+ interface UrlWithParsedQuery extends Url {
+ query: ParsedUrlQuery;
+ }
+ interface UrlWithStringQuery extends Url {
+ query: string | null;
+ }
+ /**
+ * The `url.parse()` method takes a URL string, parses it, and returns a URL
+ * object.
+ *
+ * A `TypeError` is thrown if `urlString` is not a string.
+ *
+ * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
+ *
+ * Use of the legacy `url.parse()` method is discouraged. Users should
+ * use the WHATWG `URL` API. Because the `url.parse()` method uses a
+ * lenient, non-standard algorithm for parsing URL strings, security
+ * issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and
+ * incorrect handling of usernames and passwords have been identified.
+ *
+ * Deprecation of this API has been shelved for now primarily due to the the
+ * inability of the [WHATWG API to parse relative URLs](https://github.com/nodejs/node/issues/12682#issuecomment-1154492373).
+ * [Discussions are ongoing](https://github.com/whatwg/url/issues/531) for the best way to resolve this.
+ *
+ * @since v0.1.25
+ * @param urlString The URL string to parse.
+ * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
+ * on the returned URL object will be an unparsed, undecoded string.
+ * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
+ * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
+ */
+ function parse(urlString: string): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
+ function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json'
+ * }
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @deprecated Legacy: Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: URL, options?: URLFormatOptions): string;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json'
+ * }
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @deprecated Legacy: Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: UrlObject | string): string;
+ /**
+ * The `url.resolve()` method resolves a target URL relative to a base URL in a
+ * manner similar to that of a web browser resolving an anchor tag.
+ *
+ * ```js
+ * const url = require('url');
+ * url.resolve('/one/two/three', 'four'); // '/one/two/four'
+ * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ *
+ * To achieve the same result using the WHATWG URL API:
+ *
+ * ```js
+ * function resolve(from, to) {
+ * const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
+ * if (resolvedUrl.protocol === 'resolve:') {
+ * // `from` is a relative URL.
+ * const { pathname, search, hash } = resolvedUrl;
+ * return pathname + search + hash;
+ * }
+ * return resolvedUrl.toString();
+ * }
+ *
+ * resolve('/one/two/three', 'four'); // '/one/two/four'
+ * resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ * @since v0.1.25
+ * @deprecated Legacy: Use the WHATWG URL API instead.
+ * @param from The base URL to use if `to` is a relative URL.
+ * @param to The target URL to resolve.
+ */
+ function resolve(from: string, to: string): string;
+ /**
+ * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
+ * invalid domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToUnicode}.
+ *
+ * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
+ *
+ * ```js
+ * import url from 'url';
+ *
+ * console.log(url.domainToASCII('español.com'));
+ * // Prints xn--espaol-zwa.com
+ * console.log(url.domainToASCII('中文.com'));
+ * // Prints xn--fiq228c.com
+ * console.log(url.domainToASCII('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToASCII(domain: string): string;
+ /**
+ * Returns the Unicode serialization of the `domain`. If `domain` is an invalid
+ * domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToASCII}.
+ *
+ * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
+ *
+ * ```js
+ * import url from 'url';
+ *
+ * console.log(url.domainToUnicode('xn--espaol-zwa.com'));
+ * // Prints español.com
+ * console.log(url.domainToUnicode('xn--fiq228c.com'));
+ * // Prints 中文.com
+ * console.log(url.domainToUnicode('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToUnicode(domain: string): string;
+ /**
+ * This function ensures the correct decodings of percent-encoded characters as
+ * well as ensuring a cross-platform valid absolute path string.
+ *
+ * ```js
+ * import { fileURLToPath } from 'url';
+ *
+ * const __filename = fileURLToPath(import.meta.url);
+ *
+ * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
+ * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
+ *
+ * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
+ * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
+ *
+ * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
+ * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
+ *
+ * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
+ * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param url The file URL string or URL object to convert to a path.
+ * @return The fully-resolved platform-specific Node.js file path.
+ */
+ function fileURLToPath(url: string | URL): string;
+ /**
+ * This function ensures that `path` is resolved absolutely, and that the URL
+ * control characters are correctly encoded when converting into a File URL.
+ *
+ * ```js
+ * import { pathToFileURL } from 'url';
+ *
+ * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
+ * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
+ *
+ * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
+ * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param path The path to convert to a File URL.
+ * @return The file URL object.
+ */
+ function pathToFileURL(path: string): URL;
+ /**
+ * This utility function converts a URL object into an ordinary options object as
+ * expected by the `http.request()` and `https.request()` APIs.
+ *
+ * ```js
+ * import { urlToHttpOptions } from 'url';
+ * const myURL = new URL('https://a:b@測試?abc#foo');
+ *
+ * console.log(urlToHttpOptions(myURL));
+ * /*
+ * {
+ * protocol: 'https:',
+ * hostname: 'xn--g6w251d',
+ * hash: '#foo',
+ * search: '?abc',
+ * pathname: '/',
+ * path: '/?abc',
+ * href: 'https://a:b@xn--g6w251d/?abc#foo',
+ * auth: 'a:b'
+ * }
+ *
+ * ```
+ * @since v15.7.0, v14.18.0
+ * @param url The `WHATWG URL` object to convert to an options object.
+ * @return Options object
+ */
+ function urlToHttpOptions(url: URL): ClientRequestArgs;
+ interface URLFormatOptions {
+ auth?: boolean | undefined;
+ fragment?: boolean | undefined;
+ search?: boolean | undefined;
+ unicode?: boolean | undefined;
+ }
+ /**
+ * Browser-compatible `URL` class, implemented by following the WHATWG URL
+ * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
+ * The `URL` class is also available on the global object.
+ *
+ * In accordance with browser conventions, all properties of `URL` objects
+ * are implemented as getters and setters on the class prototype, rather than as
+ * data properties on the object itself. Thus, unlike `legacy urlObject` s,
+ * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
+ * return `true`.
+ * @since v7.0.0, v6.13.0
+ */
+ class URL {
+ /**
+ * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
+ *
+ * ```js
+ * const {
+ * Blob,
+ * resolveObjectURL,
+ * } = require('buffer');
+ *
+ * const blob = new Blob(['hello']);
+ * const id = URL.createObjectURL(blob);
+ *
+ * // later...
+ *
+ * const otherBlob = resolveObjectURL(id);
+ * console.log(otherBlob.size);
+ * ```
+ *
+ * The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it.
+ *
+ * `Blob` objects are registered within the current thread. If using Worker
+ * Threads, `Blob` objects registered within one Worker will not be available
+ * to other workers or the main thread.
+ * @since v16.7.0
+ * @experimental
+ */
+ static createObjectURL(blob: Blob): string;
+ /**
+ * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
+ * ID that isn’t registered will silently fail.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ static revokeObjectURL(objectUrl: string): void;
+ constructor(input: string, base?: string | URL);
+ /**
+ * Gets and sets the fragment portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo#bar');
+ * console.log(myURL.hash);
+ * // Prints #bar
+ *
+ * myURL.hash = 'baz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo#baz
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `hash` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ hash: string;
+ /**
+ * Gets and sets the host portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.host);
+ * // Prints example.org:81
+ *
+ * myURL.host = 'example.com:82';
+ * console.log(myURL.href);
+ * // Prints https://example.com:82/foo
+ * ```
+ *
+ * Invalid host values assigned to the `host` property are ignored.
+ */
+ host: string;
+ /**
+ * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
+ * port.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.hostname);
+ * // Prints example.org
+ *
+ * // Setting the hostname does not change the port
+ * myURL.hostname = 'example.com:82';
+ * console.log(myURL.href);
+ * // Prints https://example.com:81/foo
+ *
+ * // Use myURL.host to change the hostname and port
+ * myURL.host = 'example.org:82';
+ * console.log(myURL.href);
+ * // Prints https://example.org:82/foo
+ * ```
+ *
+ * Invalid host name values assigned to the `hostname` property are ignored.
+ */
+ hostname: string;
+ /**
+ * Gets and sets the serialized URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo');
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo
+ *
+ * myURL.href = 'https://example.com/bar';
+ * console.log(myURL.href);
+ * // Prints https://example.com/bar
+ * ```
+ *
+ * Getting the value of the `href` property is equivalent to calling {@link toString}.
+ *
+ * Setting the value of this property to a new value is equivalent to creating a
+ * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
+ *
+ * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
+ */
+ href: string;
+ /**
+ * Gets the read-only serialization of the URL's origin.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo/bar?baz');
+ * console.log(myURL.origin);
+ * // Prints https://example.org
+ * ```
+ *
+ * ```js
+ * const idnURL = new URL('https://測試');
+ * console.log(idnURL.origin);
+ * // Prints https://xn--g6w251d
+ *
+ * console.log(idnURL.hostname);
+ * // Prints xn--g6w251d
+ * ```
+ */
+ readonly origin: string;
+ /**
+ * Gets and sets the password portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.password);
+ * // Prints xyz
+ *
+ * myURL.password = '123';
+ * console.log(myURL.href);
+ * // Prints https://abc:123@example.com
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `password` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ password: string;
+ /**
+ * Gets and sets the path portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc/xyz?123');
+ * console.log(myURL.pathname);
+ * // Prints /abc/xyz
+ *
+ * myURL.pathname = '/abcdef';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abcdef?123
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters
+ * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ pathname: string;
+ /**
+ * Gets and sets the port portion of the URL.
+ *
+ * The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will
+ * result in the `port` value becoming
+ * the empty string (`''`).
+ *
+ * The port value can be an empty string in which case the port depends on
+ * the protocol/scheme:
+ *
+ * <omitted>
+ *
+ * Upon assigning a value to the port, the value will first be converted to a
+ * string using `.toString()`.
+ *
+ * If that string is invalid but it begins with a number, the leading number is
+ * assigned to `port`.
+ * If the number lies outside the range denoted above, it is ignored.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:8888');
+ * console.log(myURL.port);
+ * // Prints 8888
+ *
+ * // Default ports are automatically transformed to the empty string
+ * // (HTTPS protocol's default port is 443)
+ * myURL.port = '443';
+ * console.log(myURL.port);
+ * // Prints the empty string
+ * console.log(myURL.href);
+ * // Prints https://example.org/
+ *
+ * myURL.port = 1234;
+ * console.log(myURL.port);
+ * // Prints 1234
+ * console.log(myURL.href);
+ * // Prints https://example.org:1234/
+ *
+ * // Completely invalid port strings are ignored
+ * myURL.port = 'abcd';
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Leading numbers are treated as a port number
+ * myURL.port = '5678abcd';
+ * console.log(myURL.port);
+ * // Prints 5678
+ *
+ * // Non-integers are truncated
+ * myURL.port = 1234.5678;
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Out-of-range numbers which are not represented in scientific notation
+ * // will be ignored.
+ * myURL.port = 1e10; // 10000000000, will be range-checked as described below
+ * console.log(myURL.port);
+ * // Prints 1234
+ * ```
+ *
+ * Numbers which contain a decimal point,
+ * such as floating-point numbers or numbers in scientific notation,
+ * are not an exception to this rule.
+ * Leading numbers up to the decimal point will be set as the URL's port,
+ * assuming they are valid:
+ *
+ * ```js
+ * myURL.port = 4.567e21;
+ * console.log(myURL.port);
+ * // Prints 4 (because it is the leading number in the string '4.567e21')
+ * ```
+ */
+ port: string;
+ /**
+ * Gets and sets the protocol portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org');
+ * console.log(myURL.protocol);
+ * // Prints https:
+ *
+ * myURL.protocol = 'ftp';
+ * console.log(myURL.href);
+ * // Prints ftp://example.org/
+ * ```
+ *
+ * Invalid URL protocol values assigned to the `protocol` property are ignored.
+ */
+ protocol: string;
+ /**
+ * Gets and sets the serialized query portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc?123');
+ * console.log(myURL.search);
+ * // Prints ?123
+ *
+ * myURL.search = 'abc=xyz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abc?abc=xyz
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ search: string;
+ /**
+ * Gets the `URLSearchParams` object representing the query parameters of the
+ * URL. This property is read-only but the `URLSearchParams` object it provides
+ * can be used to mutate the URL instance; to replace the entirety of query
+ * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
+ *
+ * Use care when using `.searchParams` to modify the `URL` because,
+ * per the WHATWG specification, the `URLSearchParams` object uses
+ * different rules to determine which characters to percent-encode. For
+ * instance, the `URL` object will not percent encode the ASCII tilde (`~`)
+ * character, while `URLSearchParams` will always encode it:
+ *
+ * ```js
+ * const myUrl = new URL('https://example.org/abc?foo=~bar');
+ *
+ * console.log(myUrl.search); // prints ?foo=~bar
+ *
+ * // Modify the URL via searchParams...
+ * myUrl.searchParams.sort();
+ *
+ * console.log(myUrl.search); // prints ?foo=%7Ebar
+ * ```
+ */
+ readonly searchParams: URLSearchParams;
+ /**
+ * Gets and sets the username portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.username);
+ * // Prints abc
+ *
+ * myURL.username = '123';
+ * console.log(myURL.href);
+ * // Prints https://123:xyz@example.com/
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ username: string;
+ /**
+ * The `toString()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toJSON}.
+ */
+ toString(): string;
+ /**
+ * The `toJSON()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toString}.
+ *
+ * This method is automatically called when an `URL` object is serialized
+ * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
+ *
+ * ```js
+ * const myURLs = [
+ * new URL('https://www.example.com'),
+ * new URL('https://test.example.org'),
+ * ];
+ * console.log(JSON.stringify(myURLs));
+ * // Prints ["https://www.example.com/","https://test.example.org/"]
+ * ```
+ */
+ toJSON(): string;
+ }
+ /**
+ * The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the
+ * four following constructors.
+ * The `URLSearchParams` class is also available on the global object.
+ *
+ * The WHATWG `URLSearchParams` interface and the `querystring` module have
+ * similar purpose, but the purpose of the `querystring` module is more
+ * general, as it allows the customization of delimiter characters (`&#x26;` and `=`).
+ * On the other hand, this API is designed purely for URL query strings.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?abc=123');
+ * console.log(myURL.searchParams.get('abc'));
+ * // Prints 123
+ *
+ * myURL.searchParams.append('abc', 'xyz');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?abc=123&#x26;abc=xyz
+ *
+ * myURL.searchParams.delete('abc');
+ * myURL.searchParams.set('a', 'b');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ *
+ * const newSearchParams = new URLSearchParams(myURL.searchParams);
+ * // The above is equivalent to
+ * // const newSearchParams = new URLSearchParams(myURL.search);
+ *
+ * newSearchParams.append('a', 'c');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ * console.log(newSearchParams.toString());
+ * // Prints a=b&#x26;a=c
+ *
+ * // newSearchParams.toString() is implicitly called
+ * myURL.search = newSearchParams;
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * newSearchParams.delete('a');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * ```
+ * @since v7.5.0, v6.13.0
+ */
+ class URLSearchParams implements Iterable<[string, string]> {
+ constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
+ /**
+ * Append a new name-value pair to the query string.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Remove all name-value pairs whose name is `name`.
+ */
+ delete(name: string): void;
+ /**
+ * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
+ * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
+ *
+ * Alias for `urlSearchParams[@@iterator]()`.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Iterates over each name-value pair in the query and invokes the given function.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?a=b&#x26;c=d');
+ * myURL.searchParams.forEach((value, name, searchParams) => {
+ * console.log(name, value, myURL.searchParams === searchParams);
+ * });
+ * // Prints:
+ * // a b true
+ * // c d true
+ * ```
+ * @param fn Invoked for each name-value pair in the query
+ * @param thisArg To be used as `this` value for when `fn` is called
+ */
+ forEach<TThis = this>(callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: TThis): void;
+ /**
+ * Returns the value of the first name-value pair whose name is `name`. If there
+ * are no such pairs, `null` is returned.
+ * @return or `null` if there is no name-value pair with the given `name`.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns the values of all name-value pairs whose name is `name`. If there are
+ * no such pairs, an empty array is returned.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns `true` if there is at least one name-value pair whose name is `name`.
+ */
+ has(name: string): boolean;
+ /**
+ * Returns an ES6 `Iterator` over the names of each name-value pair.
+ *
+ * ```js
+ * const params = new URLSearchParams('foo=bar&#x26;foo=baz');
+ * for (const name of params.keys()) {
+ * console.log(name);
+ * }
+ * // Prints:
+ * // foo
+ * // foo
+ * ```
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
+ * set the first such pair's value to `value` and remove all others. If not,
+ * append the name-value pair to the query string.
+ *
+ * ```js
+ * const params = new URLSearchParams();
+ * params.append('foo', 'bar');
+ * params.append('foo', 'baz');
+ * params.append('abc', 'def');
+ * console.log(params.toString());
+ * // Prints foo=bar&#x26;foo=baz&#x26;abc=def
+ *
+ * params.set('foo', 'def');
+ * params.set('xyz', 'opq');
+ * console.log(params.toString());
+ * // Prints foo=def&#x26;abc=def&#x26;xyz=opq
+ * ```
+ */
+ set(name: string, value: string): void;
+ /**
+ * Sort all existing name-value pairs in-place by their names. Sorting is done
+ * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
+ * with the same name is preserved.
+ *
+ * This method can be used, in particular, to increase cache hits.
+ *
+ * ```js
+ * const params = new URLSearchParams('query[]=abc&#x26;type=search&#x26;query[]=123');
+ * params.sort();
+ * console.log(params.toString());
+ * // Prints query%5B%5D=abc&#x26;query%5B%5D=123&#x26;type=search
+ * ```
+ * @since v7.7.0, v6.13.0
+ */
+ sort(): void;
+ /**
+ * Returns the search parameters serialized as a string, with characters
+ * percent-encoded where necessary.
+ */
+ toString(): string;
+ /**
+ * Returns an ES6 `Iterator` over the values of each name-value pair.
+ */
+ values(): IterableIterator<string>;
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ }
+ import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
+ global {
+ interface URLSearchParams extends _URLSearchParams {}
+ interface URL extends _URL {}
+ interface Global {
+ URL: typeof _URL;
+ URLSearchParams: typeof _URLSearchParams;
+ }
+ /**
+ * `URL` class is a global reference for `require('url').URL`
+ * https://nodejs.org/api/url.html#the-whatwg-url-api
+ * @since v10.0.0
+ */
+ var URL: typeof globalThis extends {
+ onmessage: any;
+ URL: infer URL;
+ }
+ ? URL
+ : typeof _URL;
+ /**
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
+ * https://nodejs.org/api/url.html#class-urlsearchparams
+ * @since v10.0.0
+ */
+ var URLSearchParams: typeof globalThis extends {
+ onmessage: any;
+ URLSearchParams: infer URLSearchParams;
+ }
+ ? URLSearchParams
+ : typeof _URLSearchParams;
+ }
+}
+declare module 'node:url' {
+ export * from 'url';
+}
diff --git a/node_modules/@types/node/ts4.8/util.d.ts b/node_modules/@types/node/ts4.8/util.d.ts
new file mode 100755
index 0000000..a081325
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/util.d.ts
@@ -0,0 +1,1792 @@
+/**
+ * The `util` module supports the needs of Node.js internal APIs. Many of the
+ * utilities are useful for application and module developers as well. To access
+ * it:
+ *
+ * ```js
+ * const util = require('util');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/util.js)
+ */
+declare module 'util' {
+ import * as types from 'node:util/types';
+ export interface InspectOptions {
+ /**
+ * If set to `true`, getters are going to be
+ * inspected as well. If set to `'get'` only getters without setter are going
+ * to be inspected. If set to `'set'` only getters having a corresponding
+ * setter are going to be inspected. This might cause side effects depending on
+ * the getter function.
+ * @default `false`
+ */
+ getters?: 'get' | 'set' | boolean | undefined;
+ showHidden?: boolean | undefined;
+ /**
+ * @default 2
+ */
+ depth?: number | null | undefined;
+ colors?: boolean | undefined;
+ customInspect?: boolean | undefined;
+ showProxy?: boolean | undefined;
+ maxArrayLength?: number | null | undefined;
+ /**
+ * Specifies the maximum number of characters to
+ * include when formatting. Set to `null` or `Infinity` to show all elements.
+ * Set to `0` or negative to show no characters.
+ * @default 10000
+ */
+ maxStringLength?: number | null | undefined;
+ breakLength?: number | undefined;
+ /**
+ * Setting this to `false` causes each object key
+ * to be displayed on a new line. It will also add new lines to text that is
+ * longer than `breakLength`. If set to a number, the most `n` inner elements
+ * are united on a single line as long as all properties fit into
+ * `breakLength`. Short array elements are also grouped together. Note that no
+ * text will be reduced below 16 characters, no matter the `breakLength` size.
+ * For more information, see the example below.
+ * @default `true`
+ */
+ compact?: boolean | number | undefined;
+ sorted?: boolean | ((a: string, b: string) => number) | undefined;
+ }
+ export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
+ export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
+ export interface InspectOptionsStylized extends InspectOptions {
+ stylize(text: string, styleType: Style): string;
+ }
+ /**
+ * The `util.format()` method returns a formatted string using the first argument
+ * as a `printf`\-like format string which can contain zero or more format
+ * specifiers. Each specifier is replaced with the converted value from the
+ * corresponding argument. Supported specifiers are:
+ *
+ * If a specifier does not have a corresponding argument, it is not replaced:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo');
+ * // Returns: 'foo:%s'
+ * ```
+ *
+ * Values that are not part of the format string are formatted using`util.inspect()` if their type is not `string`.
+ *
+ * If there are more arguments passed to the `util.format()` method than the
+ * number of specifiers, the extra arguments are concatenated to the returned
+ * string, separated by spaces:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo', 'bar', 'baz');
+ * // Returns: 'foo:bar baz'
+ * ```
+ *
+ * If the first argument does not contain a valid format specifier, `util.format()`returns a string that is the concatenation of all arguments separated by spaces:
+ *
+ * ```js
+ * util.format(1, 2, 3);
+ * // Returns: '1 2 3'
+ * ```
+ *
+ * If only one argument is passed to `util.format()`, it is returned as it is
+ * without any formatting:
+ *
+ * ```js
+ * util.format('%% %s');
+ * // Returns: '%% %s'
+ * ```
+ *
+ * `util.format()` is a synchronous method that is intended as a debugging tool.
+ * Some input values can have a significant performance overhead that can block the
+ * event loop. Use this function with care and never in a hot code path.
+ * @since v0.5.3
+ * @param format A `printf`-like format string.
+ */
+ export function format(format?: any, ...param: any[]): string;
+ /**
+ * This function is identical to {@link format}, except in that it takes
+ * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
+ *
+ * ```js
+ * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });
+ * // Returns 'See object { foo: 42 }', where `42` is colored as a number
+ * // when printed to a terminal.
+ * ```
+ * @since v10.0.0
+ */
+ export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
+ /**
+ * Returns the string name for a numeric error code that comes from a Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const name = util.getSystemErrorName(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v9.7.0
+ */
+ export function getSystemErrorName(err: number): string;
+ /**
+ * Returns a Map of all system error codes available from the Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const errorMap = util.getSystemErrorMap();
+ * const name = errorMap.get(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v16.0.0, v14.17.0
+ */
+ export function getSystemErrorMap(): Map<number, [string, string]>;
+ /**
+ * The `util.log()` method prints the given `string` to `stdout` with an included
+ * timestamp.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.log('Timestamped message.');
+ * ```
+ * @since v0.3.0
+ * @deprecated Since v6.0.0 - Use a third party module instead.
+ */
+ export function log(string: string): void;
+ /**
+ * Returns the `string` after replacing any surrogate code points
+ * (or equivalently, any unpaired surrogate code units) with the
+ * Unicode "replacement character" U+FFFD.
+ * @since v16.8.0, v14.18.0
+ */
+ export function toUSVString(string: string): string;
+ /**
+ * The `util.inspect()` method returns a string representation of `object` that is
+ * intended for debugging. The output of `util.inspect` may change at any time
+ * and should not be depended upon programmatically. Additional `options` may be
+ * passed that alter the result.`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make
+ * an identifiable tag for an inspected value.
+ *
+ * ```js
+ * class Foo {
+ * get [Symbol.toStringTag]() {
+ * return 'bar';
+ * }
+ * }
+ *
+ * class Bar {}
+ *
+ * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } });
+ *
+ * util.inspect(new Foo()); // 'Foo [bar] {}'
+ * util.inspect(new Bar()); // 'Bar {}'
+ * util.inspect(baz); // '[foo] {}'
+ * ```
+ *
+ * Circular references point to their anchor by using a reference index:
+ *
+ * ```js
+ * const { inspect } = require('util');
+ *
+ * const obj = {};
+ * obj.a = [obj];
+ * obj.b = {};
+ * obj.b.inner = obj.b;
+ * obj.b.obj = obj;
+ *
+ * console.log(inspect(obj));
+ * // <ref *1> {
+ * // a: [ [Circular *1] ],
+ * // b: <ref *2> { inner: [Circular *2], obj: [Circular *1] }
+ * // }
+ * ```
+ *
+ * The following example inspects all properties of the `util` object:
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * console.log(util.inspect(util, { showHidden: true, depth: null }));
+ * ```
+ *
+ * The following example highlights the effect of the `compact` option:
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * const o = {
+ * a: [1, 2, [[
+ * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' +
+ * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.',
+ * 'test',
+ * 'foo']], 4],
+ * b: new Map([['za', 1], ['zb', 'test']])
+ * };
+ * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 }));
+ *
+ * // { a:
+ * // [ 1,
+ * // 2,
+ * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line
+ * // 'test',
+ * // 'foo' ] ],
+ * // 4 ],
+ * // b: Map(2) { 'za' => 1, 'zb' => 'test' } }
+ *
+ * // Setting `compact` to false or an integer creates more reader friendly output.
+ * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 }));
+ *
+ * // {
+ * // a: [
+ * // 1,
+ * // 2,
+ * // [
+ * // [
+ * // 'Lorem ipsum dolor sit amet,\n' +
+ * // 'consectetur adipiscing elit, sed do eiusmod \n' +
+ * // 'tempor incididunt ut labore et dolore magna aliqua.',
+ * // 'test',
+ * // 'foo'
+ * // ]
+ * // ],
+ * // 4
+ * // ],
+ * // b: Map(2) {
+ * // 'za' => 1,
+ * // 'zb' => 'test'
+ * // }
+ * // }
+ *
+ * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a
+ * // single line.
+ * ```
+ *
+ * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and
+ * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be
+ * inspected. If there are more entries than `maxArrayLength`, there is no
+ * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may
+ * result in different output. Furthermore, entries
+ * with no remaining strong references may be garbage collected at any time.
+ *
+ * ```js
+ * const { inspect } = require('util');
+ *
+ * const obj = { a: 1 };
+ * const obj2 = { b: 2 };
+ * const weakSet = new WeakSet([obj, obj2]);
+ *
+ * console.log(inspect(weakSet, { showHidden: true }));
+ * // WeakSet { { a: 1 }, { b: 2 } }
+ * ```
+ *
+ * The `sorted` option ensures that an object's property insertion order does not
+ * impact the result of `util.inspect()`.
+ *
+ * ```js
+ * const { inspect } = require('util');
+ * const assert = require('assert');
+ *
+ * const o1 = {
+ * b: [2, 3, 1],
+ * a: '`a` comes before `b`',
+ * c: new Set([2, 3, 1])
+ * };
+ * console.log(inspect(o1, { sorted: true }));
+ * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } }
+ * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) }));
+ * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' }
+ *
+ * const o2 = {
+ * c: new Set([2, 1, 3]),
+ * a: '`a` comes before `b`',
+ * b: [2, 3, 1]
+ * };
+ * assert.strict.equal(
+ * inspect(o1, { sorted: true }),
+ * inspect(o2, { sorted: true })
+ * );
+ * ```
+ *
+ * The `numericSeparator` option adds an underscore every three digits to all
+ * numbers.
+ *
+ * ```js
+ * const { inspect } = require('util');
+ *
+ * const thousand = 1_000;
+ * const million = 1_000_000;
+ * const bigNumber = 123_456_789n;
+ * const bigDecimal = 1_234.123_45;
+ *
+ * console.log(thousand, million, bigNumber, bigDecimal);
+ * // 1_000 1_000_000 123_456_789n 1_234.123_45
+ * ```
+ *
+ * `util.inspect()` is a synchronous method intended for debugging. Its maximum
+ * output length is approximately 128 MB. Inputs that result in longer output will
+ * be truncated.
+ * @since v0.3.0
+ * @param object Any JavaScript primitive or `Object`.
+ * @return The representation of `object`.
+ */
+ export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
+ export function inspect(object: any, options?: InspectOptions): string;
+ export namespace inspect {
+ let colors: NodeJS.Dict<[number, number]>;
+ let styles: {
+ [K in Style]: string;
+ };
+ let defaultOptions: InspectOptions;
+ /**
+ * Allows changing inspect settings from the repl.
+ */
+ let replDefaults: InspectOptions;
+ /**
+ * That can be used to declare custom inspect functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray).
+ *
+ * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isArray([]);
+ * // Returns: true
+ * util.isArray(new Array());
+ * // Returns: true
+ * util.isArray({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use `isArray` instead.
+ */
+ export function isArray(object: unknown): object is unknown[];
+ /**
+ * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isRegExp(/some regexp/);
+ * // Returns: true
+ * util.isRegExp(new RegExp('another regexp'));
+ * // Returns: true
+ * util.isRegExp({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Deprecated
+ */
+ export function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isDate(new Date());
+ * // Returns: true
+ * util.isDate(Date());
+ * // false (without 'new' returns a String)
+ * util.isDate({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isDate} instead.
+ */
+ export function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the given `object` is an `Error`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isError(new Error());
+ * // Returns: true
+ * util.isError(new TypeError());
+ * // Returns: true
+ * util.isError({ name: 'Error', message: 'an error occurred' });
+ * // Returns: false
+ * ```
+ *
+ * This method relies on `Object.prototype.toString()` behavior. It is
+ * possible to obtain an incorrect result when the `object` argument manipulates`@@toStringTag`.
+ *
+ * ```js
+ * const util = require('util');
+ * const obj = { name: 'Error', message: 'an error occurred' };
+ *
+ * util.isError(obj);
+ * // Returns: false
+ * obj[Symbol.toStringTag] = 'Error';
+ * util.isError(obj);
+ * // Returns: true
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead.
+ */
+ export function isError(object: unknown): object is Error;
+ /**
+ * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and`extends` keywords to get language level inheritance support. Also note
+ * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179).
+ *
+ * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The
+ * prototype of `constructor` will be set to a new object created from`superConstructor`.
+ *
+ * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`.
+ * As an additional convenience, `superConstructor` will be accessible
+ * through the `constructor.super_` property.
+ *
+ * ```js
+ * const util = require('util');
+ * const EventEmitter = require('events');
+ *
+ * function MyStream() {
+ * EventEmitter.call(this);
+ * }
+ *
+ * util.inherits(MyStream, EventEmitter);
+ *
+ * MyStream.prototype.write = function(data) {
+ * this.emit('data', data);
+ * };
+ *
+ * const stream = new MyStream();
+ *
+ * console.log(stream instanceof EventEmitter); // true
+ * console.log(MyStream.super_ === EventEmitter); // true
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('It works!'); // Received data: "It works!"
+ * ```
+ *
+ * ES6 example using `class` and `extends`:
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ *
+ * class MyStream extends EventEmitter {
+ * write(data) {
+ * this.emit('data', data);
+ * }
+ * }
+ *
+ * const stream = new MyStream();
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('With ES6');
+ * ```
+ * @since v0.3.0
+ * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead.
+ */
+ export function inherits(constructor: unknown, superConstructor: unknown): void;
+ export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
+ export interface DebugLogger extends DebugLoggerFunction {
+ enabled: boolean;
+ }
+ /**
+ * The `util.debuglog()` method is used to create a function that conditionally
+ * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that
+ * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op.
+ *
+ * ```js
+ * const util = require('util');
+ * const debuglog = util.debuglog('foo');
+ *
+ * debuglog('hello from foo [%d]', 123);
+ * ```
+ *
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then
+ * it will output something like:
+ *
+ * ```console
+ * FOO 3245: hello from foo [123]
+ * ```
+ *
+ * where `3245` is the process id. If it is not run with that
+ * environment variable set, then it will not print anything.
+ *
+ * The `section` supports wildcard also:
+ *
+ * ```js
+ * const util = require('util');
+ * const debuglog = util.debuglog('foo-bar');
+ *
+ * debuglog('hi there, it\'s foo-bar [%d]', 2333);
+ * ```
+ *
+ * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
+ * something like:
+ *
+ * ```console
+ * FOO-BAR 3257: hi there, it's foo-bar [2333]
+ * ```
+ *
+ * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`.
+ *
+ * The optional `callback` argument can be used to replace the logging function
+ * with a different function that doesn't have any initialization or
+ * unnecessary wrapping.
+ *
+ * ```js
+ * const util = require('util');
+ * let debuglog = util.debuglog('internals', (debug) => {
+ * // Replace with a logging function that optimizes out
+ * // testing if the section is enabled
+ * debuglog = debug;
+ * });
+ * ```
+ * @since v0.11.3
+ * @param section A string identifying the portion of the application for which the `debuglog` function is being created.
+ * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
+ * @return The logging function
+ */
+ export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
+ export const debug: typeof debuglog;
+ /**
+ * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isBoolean(1);
+ * // Returns: false
+ * util.isBoolean(0);
+ * // Returns: false
+ * util.isBoolean(false);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead.
+ */
+ export function isBoolean(object: unknown): object is boolean;
+ /**
+ * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isBuffer({ length: 0 });
+ * // Returns: false
+ * util.isBuffer([]);
+ * // Returns: false
+ * util.isBuffer(Buffer.from('hello world'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `isBuffer` instead.
+ */
+ export function isBuffer(object: unknown): object is Buffer;
+ /**
+ * Returns `true` if the given `object` is a `Function`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * function Foo() {}
+ * const Bar = () => {};
+ *
+ * util.isFunction({});
+ * // Returns: false
+ * util.isFunction(Foo);
+ * // Returns: true
+ * util.isFunction(Bar);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead.
+ */
+ export function isFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isNull(0);
+ * // Returns: false
+ * util.isNull(undefined);
+ * // Returns: false
+ * util.isNull(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === null` instead.
+ */
+ export function isNull(object: unknown): object is null;
+ /**
+ * Returns `true` if the given `object` is `null` or `undefined`. Otherwise,
+ * returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isNullOrUndefined(0);
+ * // Returns: false
+ * util.isNullOrUndefined(undefined);
+ * // Returns: true
+ * util.isNullOrUndefined(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead.
+ */
+ export function isNullOrUndefined(object: unknown): object is null | undefined;
+ /**
+ * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isNumber(false);
+ * // Returns: false
+ * util.isNumber(Infinity);
+ * // Returns: true
+ * util.isNumber(0);
+ * // Returns: true
+ * util.isNumber(NaN);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead.
+ */
+ export function isNumber(object: unknown): object is number;
+ /**
+ * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript).
+ * Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isObject(5);
+ * // Returns: false
+ * util.isObject(null);
+ * // Returns: false
+ * util.isObject({});
+ * // Returns: true
+ * util.isObject(() => {});
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Deprecated: Use `value !== null && typeof value === 'object'` instead.
+ */
+ export function isObject(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isPrimitive(5);
+ * // Returns: true
+ * util.isPrimitive('foo');
+ * // Returns: true
+ * util.isPrimitive(false);
+ * // Returns: true
+ * util.isPrimitive(null);
+ * // Returns: true
+ * util.isPrimitive(undefined);
+ * // Returns: true
+ * util.isPrimitive({});
+ * // Returns: false
+ * util.isPrimitive(() => {});
+ * // Returns: false
+ * util.isPrimitive(/^$/);
+ * // Returns: false
+ * util.isPrimitive(new Date());
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead.
+ */
+ export function isPrimitive(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isString('');
+ * // Returns: true
+ * util.isString('foo');
+ * // Returns: true
+ * util.isString(String('foo'));
+ * // Returns: true
+ * util.isString(5);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead.
+ */
+ export function isString(object: unknown): object is string;
+ /**
+ * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isSymbol(5);
+ * // Returns: false
+ * util.isSymbol('foo');
+ * // Returns: false
+ * util.isSymbol(Symbol('foo'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead.
+ */
+ export function isSymbol(object: unknown): object is symbol;
+ /**
+ * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * const foo = undefined;
+ * util.isUndefined(5);
+ * // Returns: false
+ * util.isUndefined(foo);
+ * // Returns: true
+ * util.isUndefined(null);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined` instead.
+ */
+ export function isUndefined(object: unknown): object is undefined;
+ /**
+ * The `util.deprecate()` method wraps `fn` (which may be a function or class) in
+ * such a way that it is marked as deprecated.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * exports.obsoleteFunction = util.deprecate(() => {
+ * // Do something here.
+ * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.');
+ * ```
+ *
+ * When called, `util.deprecate()` will return a function that will emit a`DeprecationWarning` using the `'warning'` event. The warning will
+ * be emitted and printed to `stderr` the first time the returned function is
+ * called. After the warning is emitted, the wrapped function is called without
+ * emitting a warning.
+ *
+ * If the same optional `code` is supplied in multiple calls to `util.deprecate()`,
+ * the warning will be emitted only once for that `code`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001');
+ * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001');
+ * fn1(); // Emits a deprecation warning with code DEP0001
+ * fn2(); // Does not emit a deprecation warning because it has the same code
+ * ```
+ *
+ * If either the `--no-deprecation` or `--no-warnings` command-line flags are
+ * used, or if the `process.noDeprecation` property is set to `true`_prior_ to
+ * the first deprecation warning, the `util.deprecate()` method does nothing.
+ *
+ * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set,
+ * or the `process.traceDeprecation` property is set to `true`, a warning and a
+ * stack trace are printed to `stderr` the first time the deprecated function is
+ * called.
+ *
+ * If the `--throw-deprecation` command-line flag is set, or the`process.throwDeprecation` property is set to `true`, then an exception will be
+ * thrown when the deprecated function is called.
+ *
+ * The `--throw-deprecation` command-line flag and `process.throwDeprecation`property take precedence over `--trace-deprecation` and`process.traceDeprecation`.
+ * @since v0.8.0
+ * @param fn The function that is being deprecated.
+ * @param msg A warning message to display when the deprecated function is invoked.
+ * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
+ * @return The deprecated function wrapped to emit a warning.
+ */
+ export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T;
+ /**
+ * Returns `true` if there is deep strict equality between `val1` and `val2`.
+ * Otherwise, returns `false`.
+ *
+ * See `assert.deepStrictEqual()` for more information about deep strict
+ * equality.
+ * @since v9.0.0
+ */
+ export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean;
+ /**
+ * Returns `str` with any ANSI escape codes removed.
+ *
+ * ```js
+ * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m'));
+ * // Prints "value"
+ * ```
+ * @since v16.11.0
+ */
+ export function stripVTControlCharacters(str: string): string;
+ /**
+ * Takes an `async` function (or a function that returns a `Promise`) and returns a
+ * function following the error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument. In the callback, the
+ * first argument will be the rejection reason (or `null` if the `Promise`resolved), and the second argument will be the resolved value.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * async function fn() {
+ * return 'hello world';
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * if (err) throw err;
+ * console.log(ret);
+ * });
+ * ```
+ *
+ * Will print:
+ *
+ * ```text
+ * hello world
+ * ```
+ *
+ * The callback is executed asynchronously, and will have a limited stack trace.
+ * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit.
+ *
+ * Since `null` has a special meaning as the first argument to a callback, if a
+ * wrapped function rejects a `Promise` with a falsy value as a reason, the value
+ * is wrapped in an `Error` with the original value stored in a field named`reason`.
+ *
+ * ```js
+ * function fn() {
+ * return Promise.reject(null);
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * // When the Promise was rejected with `null` it is wrapped with an Error and
+ * // the original value is stored in `reason`.
+ * err &#x26;&#x26; Object.hasOwn(err, 'reason') &#x26;&#x26; err.reason === null; // true
+ * });
+ * ```
+ * @since v8.2.0
+ * @param original An `async` function
+ * @return a callback style function
+ */
+ export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
+ __promisify__: TCustom;
+ }
+ export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
+ [promisify.custom]: TCustom;
+ }
+ export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
+ /**
+ * Takes a function following the common error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument, and returns a version
+ * that returns promises.
+ *
+ * ```js
+ * const util = require('util');
+ * const fs = require('fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ * stat('.').then((stats) => {
+ * // Do something with `stats`
+ * }).catch((error) => {
+ * // Handle the error.
+ * });
+ * ```
+ *
+ * Or, equivalently using `async function`s:
+ *
+ * ```js
+ * const util = require('util');
+ * const fs = require('fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ *
+ * async function callStat() {
+ * const stats = await stat('.');
+ * console.log(`This directory is owned by ${stats.uid}`);
+ * }
+ * ```
+ *
+ * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`.
+ *
+ * `promisify()` assumes that `original` is a function taking a callback as its
+ * final argument in all cases. If `original` is not a function, `promisify()`will throw an error. If `original` is a function but its last argument is not
+ * an error-first callback, it will still be passed an error-first
+ * callback as its last argument.
+ *
+ * Using `promisify()` on class methods or other methods that use `this` may not
+ * work as expected unless handled specially:
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * class Foo {
+ * constructor() {
+ * this.a = 42;
+ * }
+ *
+ * bar(callback) {
+ * callback(null, this.a);
+ * }
+ * }
+ *
+ * const foo = new Foo();
+ *
+ * const naiveBar = util.promisify(foo.bar);
+ * // TypeError: Cannot read property 'a' of undefined
+ * // naiveBar().then(a => console.log(a));
+ *
+ * naiveBar.call(foo).then((a) => console.log(a)); // '42'
+ *
+ * const bindBar = naiveBar.bind(foo);
+ * bindBar().then((a) => console.log(a)); // '42'
+ * ```
+ * @since v8.0.0
+ */
+ export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
+ export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
+ export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
+ export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
+ export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
+ export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
+ export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
+ export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
+ export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
+ export function promisify(fn: Function): Function;
+ export namespace promisify {
+ /**
+ * That can be used to declare custom promisified variants of functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
+ *
+ * ```js
+ * const decoder = new TextDecoder();
+ * const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
+ * console.log(decoder.decode(u8arr)); // Hello
+ * ```
+ * @since v8.3.0
+ */
+ export class TextDecoder {
+ /**
+ * The encoding supported by the `TextDecoder` instance.
+ */
+ readonly encoding: string;
+ /**
+ * The value will be `true` if decoding errors result in a `TypeError` being
+ * thrown.
+ */
+ readonly fatal: boolean;
+ /**
+ * The value will be `true` if the decoding result will include the byte order
+ * mark.
+ */
+ readonly ignoreBOM: boolean;
+ constructor(
+ encoding?: string,
+ options?: {
+ fatal?: boolean | undefined;
+ ignoreBOM?: boolean | undefined;
+ }
+ );
+ /**
+ * Decodes the `input` and returns a string. If `options.stream` is `true`, any
+ * incomplete byte sequences occurring at the end of the `input` are buffered
+ * internally and emitted after the next call to `textDecoder.decode()`.
+ *
+ * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a`TypeError` being thrown.
+ * @param input An `ArrayBuffer`, `DataView` or `TypedArray` instance containing the encoded data.
+ */
+ decode(
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
+ options?: {
+ stream?: boolean | undefined;
+ }
+ ): string;
+ }
+ export interface EncodeIntoResult {
+ /**
+ * The read Unicode code units of input.
+ */
+ read: number;
+ /**
+ * The written UTF-8 bytes of output.
+ */
+ written: number;
+ }
+ export { types };
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
+ * instances of `TextEncoder` only support UTF-8 encoding.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const uint8array = encoder.encode('this is some data');
+ * ```
+ *
+ * The `TextEncoder` class is also available on the global object.
+ * @since v8.3.0
+ */
+ export class TextEncoder {
+ /**
+ * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`.
+ */
+ readonly encoding: string;
+ /**
+ * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the
+ * encoded bytes.
+ * @param [input='an empty string'] The text to encode.
+ */
+ encode(input?: string): Uint8Array;
+ /**
+ * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
+ * containing the read Unicode code units and written UTF-8 bytes.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const src = 'this is some data';
+ * const dest = new Uint8Array(10);
+ * const { read, written } = encoder.encodeInto(src, dest);
+ * ```
+ * @param src The text to encode.
+ * @param dest The array to hold the encode result.
+ */
+ encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
+ }
+
+ /**
+ * Provides a high-level API for command-line argument parsing. Takes a
+ * specification for the expected arguments and returns a structured object
+ * with the parsed values and positionals.
+ *
+ * `config` provides arguments for parsing and configures the parser. It
+ * supports the following properties:
+ *
+ * - `args` The array of argument strings. **Default:** `process.argv` with
+ * `execPath` and `filename` removed.
+ * - `options` Arguments known to the parser. Keys of `options` are the long
+ * names of options and values are objects accepting the following properties:
+ *
+ * - `type` Type of argument, which must be either `boolean` (for options
+ * which do not take values) or `string` (for options which do).
+ * - `multiple` Whether this option can be provided multiple
+ * times. If `true`, all values will be collected in an array. If
+ * `false`, values for the option are last-wins. **Default:** `false`.
+ * - `short` A single character alias for the option.
+ *
+ * - `strict`: Whether an error should be thrown when unknown arguments
+ * are encountered, or when arguments are passed that do not match the
+ * `type` configured in `options`. **Default:** `true`.
+ * - `allowPositionals`: Whether this command accepts positional arguments.
+ * **Default:** `false` if `strict` is `true`, otherwise `true`.
+ * - `tokens`: Whether tokens {boolean} Return the parsed tokens. This is useful
+ * for extending the built-in behavior, from adding additional checks through
+ * to reprocessing the tokens in different ways.
+ * **Default:** `false`.
+ *
+ * @returns The parsed command line arguments:
+ *
+ * - `values` A mapping of parsed option names with their string
+ * or boolean values.
+ * - `positionals` Positional arguments.
+ * - `tokens` Detailed parse information (only if `tokens` was specified).
+ *
+ */
+ export function parseArgs<T extends ParseArgsConfig>(config: T): ParsedResults<T>;
+
+ interface ParseArgsOptionConfig {
+ type: 'string' | 'boolean';
+ short?: string;
+ multiple?: boolean;
+ }
+
+ interface ParseArgsOptionsConfig {
+ [longOption: string]: ParseArgsOptionConfig;
+ }
+
+ export interface ParseArgsConfig {
+ strict?: boolean;
+ allowPositionals?: boolean;
+ tokens?: boolean;
+ options?: ParseArgsOptionsConfig;
+ args?: string[];
+ }
+
+ /*
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
+ This is technically incorrect but is a much nicer UX for the common case.
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
+ */
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
+ ? IfTrue
+ : T extends false
+ ? IfFalse
+ : IfTrue;
+
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
+ ? IfFalse
+ : T extends true
+ ? IfTrue
+ : IfFalse;
+
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
+ T['strict'],
+ O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean,
+ string | boolean
+ >;
+
+ type ParsedValues<T extends ParseArgsConfig> =
+ & IfDefaultsTrue<T['strict'], unknown, { [longOption: string]: undefined | string | boolean }>
+ & (T['options'] extends ParseArgsOptionsConfig
+ ? {
+ -readonly [LongOption in keyof T['options']]: IfDefaultsFalse<
+ T['options'][LongOption]['multiple'],
+ undefined | Array<ExtractOptionValue<T, T['options'][LongOption]>>,
+ undefined | ExtractOptionValue<T, T['options'][LongOption]>
+ >;
+ }
+ : {});
+
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], string[], []>,
+ IfDefaultsTrue<T['allowPositionals'], string[], []>
+ >;
+
+ type PreciseTokenForOptions<
+ K extends string,
+ O extends ParseArgsOptionConfig,
+ > = O['type'] extends 'string'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: string;
+ inlineValue: boolean;
+ }
+ : O['type'] extends 'boolean'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ }
+ : OptionToken & { name: K };
+
+ type TokenForOptions<
+ T extends ParseArgsConfig,
+ K extends keyof T['options'] = keyof T['options'],
+ > = K extends unknown
+ ? T['options'] extends ParseArgsOptionsConfig
+ ? PreciseTokenForOptions<K & string, T['options'][K]>
+ : OptionToken
+ : never;
+
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
+
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
+ IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
+ >;
+
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
+ >;
+
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
+ T['tokens'],
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ tokens: ParsedTokens<T>;
+ },
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ }
+ >;
+
+ type OptionToken =
+ | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
+ | {
+ kind: 'option';
+ index: number;
+ name: string;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ };
+
+ type Token =
+ | OptionToken
+ | { kind: 'positional'; index: number; value: string }
+ | { kind: 'option-terminator'; index: number };
+
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
+ ? {
+ values: { [longOption: string]: undefined | string | boolean | Array<string | boolean> };
+ positionals: string[];
+ tokens?: Token[];
+ }
+ : PreciseParsedResults<T>;
+}
+declare module 'util/types' {
+ export * from 'util/types';
+}
+declare module 'util/types' {
+ import { KeyObject, webcrypto } from 'node:crypto';
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
+ * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ *
+ * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`.
+ *
+ * ```js
+ * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
+ /**
+ * Returns `true` if the value is an `arguments` object.
+ *
+ * ```js
+ * function foo() {
+ * util.types.isArgumentsObject(arguments); // Returns true
+ * }
+ * ```
+ * @since v10.0.0
+ */
+ function isArgumentsObject(object: unknown): object is IArguments;
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance.
+ * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBuffer(object: unknown): object is ArrayBuffer;
+ /**
+ * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed
+ * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to
+ * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ *
+ * ```js
+ * util.types.isArrayBufferView(new Int8Array()); // true
+ * util.types.isArrayBufferView(Buffer.from('hello world')); // true
+ * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true
+ * util.types.isArrayBufferView(new ArrayBuffer()); // false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
+ /**
+ * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isAsyncFunction(function foo() {}); // Returns false
+ * util.types.isAsyncFunction(async function foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAsyncFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a `BigInt64Array` instance.
+ *
+ * ```js
+ * util.types.isBigInt64Array(new BigInt64Array()); // Returns true
+ * util.types.isBigInt64Array(new BigUint64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBigInt64Array(value: unknown): value is BigInt64Array;
+ /**
+ * Returns `true` if the value is a `BigUint64Array` instance.
+ *
+ * ```js
+ * util.types.isBigUint64Array(new BigInt64Array()); // Returns false
+ * util.types.isBigUint64Array(new BigUint64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isBigUint64Array(value: unknown): value is BigUint64Array;
+ /**
+ * Returns `true` if the value is a boolean object, e.g. created
+ * by `new Boolean()`.
+ *
+ * ```js
+ * util.types.isBooleanObject(false); // Returns false
+ * util.types.isBooleanObject(true); // Returns false
+ * util.types.isBooleanObject(new Boolean(false)); // Returns true
+ * util.types.isBooleanObject(new Boolean(true)); // Returns true
+ * util.types.isBooleanObject(Boolean(false)); // Returns false
+ * util.types.isBooleanObject(Boolean(true)); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBooleanObject(object: unknown): object is Boolean;
+ /**
+ * Returns `true` if the value is any boxed primitive object, e.g. created
+ * by `new Boolean()`, `new String()` or `Object(Symbol())`.
+ *
+ * For example:
+ *
+ * ```js
+ * util.types.isBoxedPrimitive(false); // Returns false
+ * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true
+ * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false
+ * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true
+ * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true
+ * ```
+ * @since v10.11.0
+ */
+ function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance.
+ *
+ * ```js
+ * const ab = new ArrayBuffer(20);
+ * util.types.isDataView(new DataView(ab)); // Returns true
+ * util.types.isDataView(new Float64Array()); // Returns false
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isDataView(object: unknown): object is DataView;
+ /**
+ * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
+ *
+ * ```js
+ * util.types.isDate(new Date()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the value is a native `External` value.
+ *
+ * A native `External` value is a special type of object that contains a
+ * raw C++ pointer (`void*`) for access from native code, and has no other
+ * properties. Such objects are created either by Node.js internals or native
+ * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype.
+ *
+ * ```c
+ * #include <js_native_api.h>
+ * #include <stdlib.h>
+ * napi_value result;
+ * static napi_value MyNapi(napi_env env, napi_callback_info info) {
+ * int* raw = (int*) malloc(1024);
+ * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &#x26;result);
+ * if (status != napi_ok) {
+ * napi_throw_error(env, NULL, "napi_create_external failed");
+ * return NULL;
+ * }
+ * return result;
+ * }
+ * ...
+ * DECLARE_NAPI_PROPERTY("myNapi", MyNapi)
+ * ...
+ * ```
+ *
+ * ```js
+ * const native = require('napi_addon.node');
+ * const data = native.myNapi();
+ * util.types.isExternal(data); // returns true
+ * util.types.isExternal(0); // returns false
+ * util.types.isExternal(new String('foo')); // returns false
+ * ```
+ *
+ * For further information on `napi_create_external`, refer to `napi_create_external()`.
+ * @since v10.0.0
+ */
+ function isExternal(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance.
+ *
+ * ```js
+ * util.types.isFloat32Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat32Array(new Float32Array()); // Returns true
+ * util.types.isFloat32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat32Array(object: unknown): object is Float32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance.
+ *
+ * ```js
+ * util.types.isFloat64Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat64Array(new Uint8Array()); // Returns false
+ * util.types.isFloat64Array(new Float64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat64Array(object: unknown): object is Float64Array;
+ /**
+ * Returns `true` if the value is a generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isGeneratorFunction(function foo() {}); // Returns false
+ * util.types.isGeneratorFunction(function* foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorFunction(object: unknown): object is GeneratorFunction;
+ /**
+ * Returns `true` if the value is a generator object as returned from a
+ * built-in generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * function* foo() {}
+ * const generator = foo();
+ * util.types.isGeneratorObject(generator); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorObject(object: unknown): object is Generator;
+ /**
+ * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance.
+ *
+ * ```js
+ * util.types.isInt8Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt8Array(new Int8Array()); // Returns true
+ * util.types.isInt8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt8Array(object: unknown): object is Int8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance.
+ *
+ * ```js
+ * util.types.isInt16Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt16Array(new Int16Array()); // Returns true
+ * util.types.isInt16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt16Array(object: unknown): object is Int16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance.
+ *
+ * ```js
+ * util.types.isInt32Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt32Array(new Int32Array()); // Returns true
+ * util.types.isInt32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt32Array(object: unknown): object is Int32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * util.types.isMap(new Map()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMap<T>(object: T | {}): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * const map = new Map();
+ * util.types.isMapIterator(map.keys()); // Returns true
+ * util.types.isMapIterator(map.values()); // Returns true
+ * util.types.isMapIterator(map.entries()); // Returns true
+ * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMapIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects).
+ *
+ * ```js
+ * import * as ns from './a.js';
+ *
+ * util.types.isModuleNamespaceObject(ns); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isModuleNamespaceObject(value: unknown): boolean;
+ /**
+ * Returns `true` if the value is an instance of a built-in `Error` type.
+ *
+ * ```js
+ * util.types.isNativeError(new Error()); // Returns true
+ * util.types.isNativeError(new TypeError()); // Returns true
+ * util.types.isNativeError(new RangeError()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isNativeError(object: unknown): object is Error;
+ /**
+ * Returns `true` if the value is a number object, e.g. created
+ * by `new Number()`.
+ *
+ * ```js
+ * util.types.isNumberObject(0); // Returns false
+ * util.types.isNumberObject(new Number(0)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isNumberObject(object: unknown): object is Number;
+ /**
+ * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
+ *
+ * ```js
+ * util.types.isPromise(Promise.resolve(42)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isPromise(object: unknown): object is Promise<unknown>;
+ /**
+ * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance.
+ *
+ * ```js
+ * const target = {};
+ * const proxy = new Proxy(target, {});
+ * util.types.isProxy(target); // Returns false
+ * util.types.isProxy(proxy); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isProxy(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a regular expression object.
+ *
+ * ```js
+ * util.types.isRegExp(/abc/); // Returns true
+ * util.types.isRegExp(new RegExp('abc')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * util.types.isSet(new Set()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSet<T>(object: T | {}): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * const set = new Set();
+ * util.types.isSetIterator(set.keys()); // Returns true
+ * util.types.isSetIterator(set.values()); // Returns true
+ * util.types.isSetIterator(set.entries()); // Returns true
+ * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSetIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false
+ * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
+ /**
+ * Returns `true` if the value is a string object, e.g. created
+ * by `new String()`.
+ *
+ * ```js
+ * util.types.isStringObject('foo'); // Returns false
+ * util.types.isStringObject(new String('foo')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isStringObject(object: unknown): object is String;
+ /**
+ * Returns `true` if the value is a symbol object, created
+ * by calling `Object()` on a `Symbol` primitive.
+ *
+ * ```js
+ * const symbol = Symbol('foo');
+ * util.types.isSymbolObject(symbol); // Returns false
+ * util.types.isSymbolObject(Object(symbol)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSymbolObject(object: unknown): object is Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.
+ *
+ * ```js
+ * util.types.isTypedArray(new ArrayBuffer()); // Returns false
+ * util.types.isTypedArray(new Uint8Array()); // Returns true
+ * util.types.isTypedArray(new Float64Array()); // Returns true
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isTypedArray(object: unknown): object is NodeJS.TypedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance.
+ *
+ * ```js
+ * util.types.isUint8Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint8Array(new Uint8Array()); // Returns true
+ * util.types.isUint8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8Array(object: unknown): object is Uint8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance.
+ *
+ * ```js
+ * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false
+ * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true
+ * util.types.isUint8ClampedArray(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance.
+ *
+ * ```js
+ * util.types.isUint16Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint16Array(new Uint16Array()); // Returns true
+ * util.types.isUint16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint16Array(object: unknown): object is Uint16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance.
+ *
+ * ```js
+ * util.types.isUint32Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint32Array(new Uint32Array()); // Returns true
+ * util.types.isUint32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint32Array(object: unknown): object is Uint32Array;
+ /**
+ * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance.
+ *
+ * ```js
+ * util.types.isWeakMap(new WeakMap()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
+ /**
+ * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance.
+ *
+ * ```js
+ * util.types.isWeakSet(new WeakSet()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakSet(object: unknown): object is WeakSet<object>;
+ /**
+ * Returns `true` if `value` is a `KeyObject`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isKeyObject(object: unknown): object is KeyObject;
+ /**
+ * Returns `true` if `value` is a `CryptoKey`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
+}
+declare module 'node:util' {
+ export * from 'util';
+}
+declare module 'node:util/types' {
+ export * from 'util/types';
+}
diff --git a/node_modules/@types/node/ts4.8/v8.d.ts b/node_modules/@types/node/ts4.8/v8.d.ts
new file mode 100755
index 0000000..6685dc2
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/v8.d.ts
@@ -0,0 +1,396 @@
+/**
+ * The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
+ *
+ * ```js
+ * const v8 = require('v8');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/v8.js)
+ */
+declare module 'v8' {
+ import { Readable } from 'node:stream';
+ interface HeapSpaceInfo {
+ space_name: string;
+ space_size: number;
+ space_used_size: number;
+ space_available_size: number;
+ physical_space_size: number;
+ }
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
+ type DoesZapCodeSpaceFlag = 0 | 1;
+ interface HeapInfo {
+ total_heap_size: number;
+ total_heap_size_executable: number;
+ total_physical_size: number;
+ total_available_size: number;
+ used_heap_size: number;
+ heap_size_limit: number;
+ malloced_memory: number;
+ peak_malloced_memory: number;
+ does_zap_garbage: DoesZapCodeSpaceFlag;
+ number_of_native_contexts: number;
+ number_of_detached_contexts: number;
+ }
+ interface HeapCodeStatistics {
+ code_and_metadata_size: number;
+ bytecode_and_metadata_size: number;
+ external_script_source_size: number;
+ }
+ /**
+ * Returns an integer representing a version tag derived from the V8 version,
+ * command-line flags, and detected CPU features. This is useful for determining
+ * whether a `vm.Script` `cachedData` buffer is compatible with this instance
+ * of V8.
+ *
+ * ```js
+ * console.log(v8.cachedDataVersionTag()); // 3947234607
+ * // The value returned by v8.cachedDataVersionTag() is derived from the V8
+ * // version, command-line flags, and detected CPU features. Test that the value
+ * // does indeed update when flags are toggled.
+ * v8.setFlagsFromString('--allow_natives_syntax');
+ * console.log(v8.cachedDataVersionTag()); // 183726201
+ * ```
+ * @since v8.0.0
+ */
+ function cachedDataVersionTag(): number;
+ /**
+ * Returns an object with the following properties:
+ *
+ * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
+ * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
+ * because it continuously touches all heap pages and that makes them less likely
+ * to get swapped out by the operating system.
+ *
+ * `number_of_native_contexts` The value of native\_context is the number of the
+ * top-level contexts currently active. Increase of this number over time indicates
+ * a memory leak.
+ *
+ * `number_of_detached_contexts` The value of detached\_context is the number
+ * of contexts that were detached and not yet garbage collected. This number
+ * being non-zero indicates a potential memory leak.
+ *
+ * ```js
+ * {
+ * total_heap_size: 7326976,
+ * total_heap_size_executable: 4194304,
+ * total_physical_size: 7326976,
+ * total_available_size: 1152656,
+ * used_heap_size: 3476208,
+ * heap_size_limit: 1535115264,
+ * malloced_memory: 16384,
+ * peak_malloced_memory: 1127496,
+ * does_zap_garbage: 0,
+ * number_of_native_contexts: 1,
+ * number_of_detached_contexts: 0
+ * }
+ * ```
+ * @since v1.0.0
+ */
+ function getHeapStatistics(): HeapInfo;
+ /**
+ * Returns statistics about the V8 heap spaces, i.e. the segments which make up
+ * the V8 heap. Neither the ordering of heap spaces, nor the availability of a
+ * heap space can be guaranteed as the statistics are provided via the
+ * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
+ * next.
+ *
+ * The value returned is an array of objects containing the following properties:
+ *
+ * ```json
+ * [
+ * {
+ * "space_name": "new_space",
+ * "space_size": 2063872,
+ * "space_used_size": 951112,
+ * "space_available_size": 80824,
+ * "physical_space_size": 2063872
+ * },
+ * {
+ * "space_name": "old_space",
+ * "space_size": 3090560,
+ * "space_used_size": 2493792,
+ * "space_available_size": 0,
+ * "physical_space_size": 3090560
+ * },
+ * {
+ * "space_name": "code_space",
+ * "space_size": 1260160,
+ * "space_used_size": 644256,
+ * "space_available_size": 960,
+ * "physical_space_size": 1260160
+ * },
+ * {
+ * "space_name": "map_space",
+ * "space_size": 1094160,
+ * "space_used_size": 201608,
+ * "space_available_size": 0,
+ * "physical_space_size": 1094160
+ * },
+ * {
+ * "space_name": "large_object_space",
+ * "space_size": 0,
+ * "space_used_size": 0,
+ * "space_available_size": 1490980608,
+ * "physical_space_size": 0
+ * }
+ * ]
+ * ```
+ * @since v6.0.0
+ */
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
+ /**
+ * The `v8.setFlagsFromString()` method can be used to programmatically set
+ * V8 command-line flags. This method should be used with care. Changing settings
+ * after the VM has started may result in unpredictable behavior, including
+ * crashes and data loss; or it may simply do nothing.
+ *
+ * The V8 options available for a version of Node.js may be determined by running`node --v8-options`.
+ *
+ * Usage:
+ *
+ * ```js
+ * // Print GC events to stdout for one minute.
+ * const v8 = require('v8');
+ * v8.setFlagsFromString('--trace_gc');
+ * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
+ * ```
+ * @since v1.0.0
+ */
+ function setFlagsFromString(flags: string): void;
+ /**
+ * Generates a snapshot of the current V8 heap and returns a Readable
+ * Stream that may be used to read the JSON serialized representation.
+ * This JSON stream format is intended to be used with tools such as
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
+ * V8 engine. Therefore, the schema may change from one version of V8 to the next.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * // Print heap snapshot to the console
+ * const v8 = require('v8');
+ * const stream = v8.getHeapSnapshot();
+ * stream.pipe(process.stdout);
+ * ```
+ * @since v11.13.0
+ * @return A Readable Stream containing the V8 heap snapshot
+ */
+ function getHeapSnapshot(): Readable;
+ /**
+ * Generates a snapshot of the current V8 heap and writes it to a JSON
+ * file. This file is intended to be used with tools such as Chrome
+ * DevTools. The JSON schema is undocumented and specific to the V8
+ * engine, and may change from one version of V8 to the next.
+ *
+ * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
+ * not contain any information about the workers, and vice versa.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * const { writeHeapSnapshot } = require('v8');
+ * const {
+ * Worker,
+ * isMainThread,
+ * parentPort
+ * } = require('worker_threads');
+ *
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ *
+ * worker.once('message', (filename) => {
+ * console.log(`worker heapdump: ${filename}`);
+ * // Now get a heapdump for the main thread.
+ * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
+ * });
+ *
+ * // Tell the worker to create a heapdump.
+ * worker.postMessage('heapdump');
+ * } else {
+ * parentPort.once('message', (message) => {
+ * if (message === 'heapdump') {
+ * // Generate a heapdump for the worker
+ * // and return the filename to the parent.
+ * parentPort.postMessage(writeHeapSnapshot());
+ * }
+ * });
+ * }
+ * ```
+ * @since v11.13.0
+ * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
+ * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a
+ * worker thread.
+ * @return The filename where the snapshot was saved.
+ */
+ function writeHeapSnapshot(filename?: string): string;
+ /**
+ * Returns an object with the following properties:
+ *
+ * ```js
+ * {
+ * code_and_metadata_size: 212208,
+ * bytecode_and_metadata_size: 161368,
+ * external_script_source_size: 1410794
+ * }
+ * ```
+ * @since v12.8.0
+ */
+ function getHeapCodeStatistics(): HeapCodeStatistics;
+ /**
+ * @since v8.0.0
+ */
+ class Serializer {
+ /**
+ * Writes out a header, which includes the serialization format version.
+ */
+ writeHeader(): void;
+ /**
+ * Serializes a JavaScript value and adds the serialized representation to the
+ * internal buffer.
+ *
+ * This throws an error if `value` cannot be serialized.
+ */
+ writeValue(val: any): boolean;
+ /**
+ * Returns the stored internal buffer. This serializer should not be used once
+ * the buffer is released. Calling this method results in undefined behavior
+ * if a previous write has failed.
+ */
+ releaseBuffer(): Buffer;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Write a raw 32-bit unsigned integer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint32(value: number): void;
+ /**
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint64(hi: number, lo: number): void;
+ /**
+ * Write a JS `number` value.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeDouble(value: number): void;
+ /**
+ * Write raw bytes into the serializer’s internal buffer. The deserializer
+ * will require a way to compute the length of the buffer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
+ }
+ /**
+ * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
+ * stores the part of their underlying `ArrayBuffer`s that they are referring to.
+ * @since v8.0.0
+ */
+ class DefaultSerializer extends Serializer {}
+ /**
+ * @since v8.0.0
+ */
+ class Deserializer {
+ constructor(data: NodeJS.TypedArray);
+ /**
+ * Reads and validates a header (including the format version).
+ * May, for example, reject an invalid or unsupported wire format. In that case,
+ * an `Error` is thrown.
+ */
+ readHeader(): boolean;
+ /**
+ * Deserializes a JavaScript value from the buffer and returns it.
+ */
+ readValue(): any;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
+ * `SharedArrayBuffer`s).
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Reads the underlying wire format version. Likely mostly to be useful to
+ * legacy code reading old wire format versions. May not be called before`.readHeader()`.
+ */
+ getWireFormatVersion(): number;
+ /**
+ * Read a raw 32-bit unsigned integer and return it.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint32(): number;
+ /**
+ * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint64(): [number, number];
+ /**
+ * Read a JS `number` value.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readDouble(): number;
+ /**
+ * Read raw bytes from the deserializer’s internal buffer. The `length` parameter
+ * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readRawBytes(length: number): Buffer;
+ }
+ /**
+ * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
+ * @since v8.0.0
+ */
+ class DefaultDeserializer extends Deserializer {}
+ /**
+ * Uses a `DefaultSerializer` to serialize `value` into a buffer.
+ *
+ * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to
+ * serialize a huge object which requires buffer
+ * larger than `buffer.constants.MAX_LENGTH`.
+ * @since v8.0.0
+ */
+ function serialize(value: any): Buffer;
+ /**
+ * Uses a `DefaultDeserializer` with default options to read a JS value
+ * from a buffer.
+ * @since v8.0.0
+ * @param buffer A buffer returned by {@link serialize}.
+ */
+ function deserialize(buffer: NodeJS.TypedArray): any;
+ /**
+ * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
+ * times during the lifetime of the process. Each time the execution counter will
+ * be reset and a new coverage report will be written to the directory specified
+ * by `NODE_V8_COVERAGE`.
+ *
+ * When the process is about to exit, one last coverage will still be written to
+ * disk unless {@link stopCoverage} is invoked before the process exits.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function takeCoverage(): void;
+ /**
+ * The `v8.stopCoverage()` method allows the user to stop the coverage collection
+ * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
+ * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function stopCoverage(): void;
+}
+declare module 'node:v8' {
+ export * from 'v8';
+}
diff --git a/node_modules/@types/node/ts4.8/vm.d.ts b/node_modules/@types/node/ts4.8/vm.d.ts
new file mode 100755
index 0000000..c96513a
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/vm.d.ts
@@ -0,0 +1,509 @@
+/**
+ * The `vm` module enables compiling and running code within V8 Virtual
+ * Machine contexts.
+ *
+ * **The `vm` module is not a security**
+ * **mechanism. Do not use it to run untrusted code.**
+ *
+ * JavaScript code can be compiled and run immediately or
+ * compiled, saved, and run later.
+ *
+ * A common use case is to run the code in a different V8 Context. This means
+ * invoked code has a different global object than the invoking code.
+ *
+ * One can provide the context by `contextifying` an
+ * object. The invoked code treats any property in the context like a
+ * global variable. Any changes to global variables caused by the invoked
+ * code are reflected in the context object.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const x = 1;
+ *
+ * const context = { x: 2 };
+ * vm.createContext(context); // Contextify the object.
+ *
+ * const code = 'x += 40; var y = 17;';
+ * // `x` and `y` are global variables in the context.
+ * // Initially, x has the value 2 because that is the value of context.x.
+ * vm.runInContext(code, context);
+ *
+ * console.log(context.x); // 42
+ * console.log(context.y); // 17
+ *
+ * console.log(x); // 1; y is not defined.
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/vm.js)
+ */
+declare module 'vm' {
+ interface Context extends NodeJS.Dict<any> {}
+ interface BaseOptions {
+ /**
+ * Specifies the filename used in stack traces produced by this script.
+ * Default: `''`.
+ */
+ filename?: string | undefined;
+ /**
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
+ * Default: `0`.
+ */
+ lineOffset?: number | undefined;
+ /**
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
+ * @default 0
+ */
+ columnOffset?: number | undefined;
+ }
+ interface ScriptOptions extends BaseOptions {
+ displayErrors?: boolean | undefined;
+ timeout?: number | undefined;
+ cachedData?: Buffer | undefined;
+ /** @deprecated in favor of `script.createCachedData()` */
+ produceCachedData?: boolean | undefined;
+ }
+ interface RunningScriptOptions extends BaseOptions {
+ /**
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
+ * Default: `true`.
+ */
+ displayErrors?: boolean | undefined;
+ /**
+ * Specifies the number of milliseconds to execute code before terminating execution.
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
+ */
+ timeout?: number | undefined;
+ /**
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
+ * If execution is terminated, an `Error` will be thrown.
+ * Default: `false`.
+ */
+ breakOnSigint?: boolean | undefined;
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: 'afterEvaluate' | undefined;
+ }
+ interface CompileFunctionOptions extends BaseOptions {
+ /**
+ * Provides an optional data with V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer | undefined;
+ /**
+ * Specifies whether to produce new cache data.
+ * Default: `false`,
+ */
+ produceCachedData?: boolean | undefined;
+ /**
+ * The sandbox/context in which the said function should be compiled in.
+ */
+ parsingContext?: Context | undefined;
+ /**
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
+ */
+ contextExtensions?: Object[] | undefined;
+ }
+ interface CreateContextOptions {
+ /**
+ * Human-readable name of the newly created context.
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
+ */
+ name?: string | undefined;
+ /**
+ * Corresponds to the newly created context for display purposes.
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
+ * like the value of the `url.origin` property of a URL object.
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
+ * @default ''
+ */
+ origin?: string | undefined;
+ codeGeneration?:
+ | {
+ /**
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
+ * will throw an EvalError.
+ * @default true
+ */
+ strings?: boolean | undefined;
+ /**
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
+ * @default true
+ */
+ wasm?: boolean | undefined;
+ }
+ | undefined;
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: 'afterEvaluate' | undefined;
+ }
+ type MeasureMemoryMode = 'summary' | 'detailed';
+ interface MeasureMemoryOptions {
+ /**
+ * @default 'summary'
+ */
+ mode?: MeasureMemoryMode | undefined;
+ context?: Context | undefined;
+ }
+ interface MemoryMeasurement {
+ total: {
+ jsMemoryEstimate: number;
+ jsMemoryRange: [number, number];
+ };
+ }
+ /**
+ * Instances of the `vm.Script` class contain precompiled scripts that can be
+ * executed in specific contexts.
+ * @since v0.3.1
+ */
+ class Script {
+ constructor(code: string, options?: ScriptOptions);
+ /**
+ * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
+ * to local scope.
+ *
+ * The following example compiles code that increments a global variable, sets
+ * the value of another global variable, then execute the code multiple times.
+ * The globals are contained in the `context` object.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const context = {
+ * animal: 'cat',
+ * count: 2
+ * };
+ *
+ * const script = new vm.Script('count += 1; name = "kitty";');
+ *
+ * vm.createContext(context);
+ * for (let i = 0; i < 10; ++i) {
+ * script.runInContext(context);
+ * }
+ *
+ * console.log(context);
+ * // Prints: { animal: 'cat', count: 12, name: 'kitty' }
+ * ```
+ *
+ * Using the `timeout` or `breakOnSigint` options will result in new event loops
+ * and corresponding threads being started, which have a non-zero performance
+ * overhead.
+ * @since v0.3.1
+ * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
+ /**
+ * First contextifies the given `contextObject`, runs the compiled code contained
+ * by the `vm.Script` object within the created context, and returns the result.
+ * Running code does not have access to local scope.
+ *
+ * The following example compiles code that sets a global variable, then executes
+ * the code multiple times in different contexts. The globals are set on and
+ * contained within each individual `context`.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const script = new vm.Script('globalVar = "set"');
+ *
+ * const contexts = [{}, {}, {}];
+ * contexts.forEach((context) => {
+ * script.runInNewContext(context);
+ * });
+ *
+ * console.log(contexts);
+ * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
+ * ```
+ * @since v0.3.1
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
+ /**
+ * Runs the compiled code contained by the `vm.Script` within the context of the
+ * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
+ *
+ * The following example compiles code that increments a `global` variable then
+ * executes that code multiple times:
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * global.globalVar = 0;
+ *
+ * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' });
+ *
+ * for (let i = 0; i < 1000; ++i) {
+ * script.runInThisContext();
+ * }
+ *
+ * console.log(globalVar);
+ *
+ * // 1000
+ * ```
+ * @since v0.3.1
+ * @return the result of the very last statement executed in the script.
+ */
+ runInThisContext(options?: RunningScriptOptions): any;
+ /**
+ * Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any
+ * time and any number of times.
+ *
+ * ```js
+ * const script = new vm.Script(`
+ * function add(a, b) {
+ * return a + b;
+ * }
+ *
+ * const x = add(1, 2);
+ * `);
+ *
+ * const cacheWithoutX = script.createCachedData();
+ *
+ * script.runInThisContext();
+ *
+ * const cacheWithX = script.createCachedData();
+ * ```
+ * @since v10.6.0
+ */
+ createCachedData(): Buffer;
+ /** @deprecated in favor of `script.createCachedData()` */
+ cachedDataProduced?: boolean | undefined;
+ cachedDataRejected?: boolean | undefined;
+ cachedData?: Buffer | undefined;
+ }
+ /**
+ * If given a `contextObject`, the `vm.createContext()` method will `prepare
+ * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts,
+ * the `contextObject` will be the global object, retaining all of its existing
+ * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables
+ * will remain unchanged.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * global.globalVar = 3;
+ *
+ * const context = { globalVar: 1 };
+ * vm.createContext(context);
+ *
+ * vm.runInContext('globalVar *= 2;', context);
+ *
+ * console.log(context);
+ * // Prints: { globalVar: 2 }
+ *
+ * console.log(global.globalVar);
+ * // Prints: 3
+ * ```
+ *
+ * If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
+ * empty `contextified` object will be returned.
+ *
+ * The `vm.createContext()` method is primarily useful for creating a single
+ * context that can be used to run multiple scripts. For instance, if emulating a
+ * web browser, the method can be used to create a single context representing a
+ * window's global object, then run all `<script>` tags together within that
+ * context.
+ *
+ * The provided `name` and `origin` of the context are made visible through the
+ * Inspector API.
+ * @since v0.3.1
+ * @return contextified object.
+ */
+ function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
+ /**
+ * Returns `true` if the given `object` object has been `contextified` using {@link createContext}.
+ * @since v0.11.7
+ */
+ function isContext(sandbox: Context): boolean;
+ /**
+ * The `vm.runInContext()` method compiles `code`, runs it within the context of
+ * the `contextifiedObject`, then returns the result. Running code does not have
+ * access to the local scope. The `contextifiedObject` object _must_ have been
+ * previously `contextified` using the {@link createContext} method.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes different scripts using a single `contextified` object:
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const contextObject = { globalVar: 1 };
+ * vm.createContext(contextObject);
+ *
+ * for (let i = 0; i < 10; ++i) {
+ * vm.runInContext('globalVar *= 2;', contextObject);
+ * }
+ * console.log(contextObject);
+ * // Prints: { globalVar: 1024 }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
+ /**
+ * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
+ * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
+ * runs it within the created context, then returns the result. Running code
+ * does not have access to the local scope.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes code that increments a global
+ * variable and sets a new one. These globals are contained in the `contextObject`.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const contextObject = {
+ * animal: 'cat',
+ * count: 2
+ * };
+ *
+ * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
+ * console.log(contextObject);
+ * // Prints: { animal: 'cat', count: 3, name: 'kitty' }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
+ /**
+ * `vm.runInThisContext()` compiles `code`, runs it within the context of the
+ * current `global` and returns the result. Running code does not have access to
+ * local scope, but does have access to the current `global` object.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example illustrates using both `vm.runInThisContext()` and
+ * the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
+ *
+ * ```js
+ * const vm = require('vm');
+ * let localVar = 'initial value';
+ *
+ * const vmResult = vm.runInThisContext('localVar = "vm";');
+ * console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`);
+ * // Prints: vmResult: 'vm', localVar: 'initial value'
+ *
+ * const evalResult = eval('localVar = "eval";');
+ * console.log(`evalResult: '${evalResult}', localVar: '${localVar}'`);
+ * // Prints: evalResult: 'eval', localVar: 'eval'
+ * ```
+ *
+ * Because `vm.runInThisContext()` does not have access to the local scope,`localVar` is unchanged. In contrast,
+ * [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
+ * local scope, so the value `localVar` is changed. In this way`vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
+ *
+ * ## Example: Running an HTTP server within a VM
+ *
+ * When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
+ * context. The code passed to this VM context will have its own isolated scope.
+ *
+ * In order to run a simple web server using the `http` module the code passed to
+ * the context must either call `require('http')` on its own, or have a reference
+ * to the `http` module passed to it. For instance:
+ *
+ * ```js
+ * 'use strict';
+ * const vm = require('vm');
+ *
+ * const code = `
+ * ((require) => {
+ * const http = require('http');
+ *
+ * http.createServer((request, response) => {
+ * response.writeHead(200, { 'Content-Type': 'text/plain' });
+ * response.end('Hello World\\n');
+ * }).listen(8124);
+ *
+ * console.log('Server running at http://127.0.0.1:8124/');
+ * })`;
+ *
+ * vm.runInThisContext(code)(require);
+ * ```
+ *
+ * The `require()` in the above case shares the state with the context it is
+ * passed from. This may introduce risks when untrusted code is executed, e.g.
+ * altering objects in the context in unwanted ways.
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
+ /**
+ * Compiles the given code into the provided context (if no context is
+ * supplied, the current context is used), and returns it wrapped inside a
+ * function with the given `params`.
+ * @since v10.10.0
+ * @param code The body of the function to compile.
+ * @param params An array of strings containing all parameters for the function.
+ */
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
+ /**
+ * Measure the memory known to V8 and used by all contexts known to the
+ * current V8 isolate, or the main context.
+ *
+ * The format of the object that the returned Promise may resolve with is
+ * specific to the V8 engine and may change from one version of V8 to the next.
+ *
+ * The returned result is different from the statistics returned by`v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measure the
+ * memory reachable by each V8 specific contexts in the current instance of
+ * the V8 engine, while the result of `v8.getHeapSpaceStatistics()` measure
+ * the memory occupied by each heap space in the current V8 instance.
+ *
+ * ```js
+ * const vm = require('vm');
+ * // Measure the memory used by the main context.
+ * vm.measureMemory({ mode: 'summary' })
+ * // This is the same as vm.measureMemory()
+ * .then((result) => {
+ * // The current format is:
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2418479, jsMemoryRange: [ 2418479, 2745799 ]
+ * // }
+ * // }
+ * console.log(result);
+ * });
+ *
+ * const context = vm.createContext({ a: 1 });
+ * vm.measureMemory({ mode: 'detailed', execution: 'eager' })
+ * .then((result) => {
+ * // Reference the context here so that it won't be GC'ed
+ * // until the measurement is complete.
+ * console.log(context.a);
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2574732,
+ * // jsMemoryRange: [ 2574732, 2904372 ]
+ * // },
+ * // current: {
+ * // jsMemoryEstimate: 2438996,
+ * // jsMemoryRange: [ 2438996, 2768636 ]
+ * // },
+ * // other: [
+ * // {
+ * // jsMemoryEstimate: 135736,
+ * // jsMemoryRange: [ 135736, 465376 ]
+ * // }
+ * // ]
+ * // }
+ * console.log(result);
+ * });
+ * ```
+ * @since v13.10.0
+ * @experimental
+ */
+ function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
+}
+declare module 'node:vm' {
+ export * from 'vm';
+}
diff --git a/node_modules/@types/node/ts4.8/wasi.d.ts b/node_modules/@types/node/ts4.8/wasi.d.ts
new file mode 100755
index 0000000..d20b66b
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/wasi.d.ts
@@ -0,0 +1,158 @@
+/**
+ * The WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives sandboxed WebAssembly applications access to the
+ * underlying operating system via a collection of POSIX-like functions.
+ *
+ * ```js
+ * import { readFile } from 'fs/promises';
+ * import { WASI } from 'wasi';
+ * import { argv, env } from 'process';
+ *
+ * const wasi = new WASI({
+ * args: argv,
+ * env,
+ * preopens: {
+ * '/sandbox': '/some/real/path/that/wasm/can/access'
+ * }
+ * });
+ *
+ * // Some WASI binaries require:
+ * // const importObject = { wasi_unstable: wasi.wasiImport };
+ * const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
+ *
+ * const wasm = await WebAssembly.compile(
+ * await readFile(new URL('./demo.wasm', import.meta.url))
+ * );
+ * const instance = await WebAssembly.instantiate(wasm, importObject);
+ *
+ * wasi.start(instance);
+ * ```
+ *
+ * To run the above example, create a new WebAssembly text format file named`demo.wat`:
+ *
+ * ```text
+ * (module
+ * ;; Import the required fd_write WASI function which will write the given io vectors to stdout
+ * ;; The function signature for fd_write is:
+ * ;; (File Descriptor, *iovs, iovs_len, nwritten) -> Returns number of bytes written
+ * (import "wasi_snapshot_preview1" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
+ *
+ * (memory 1)
+ * (export "memory" (memory 0))
+ *
+ * ;; Write 'hello world\n' to memory at an offset of 8 bytes
+ * ;; Note the trailing newline which is required for the text to appear
+ * (data (i32.const 8) "hello world\n")
+ *
+ * (func $main (export "_start")
+ * ;; Creating a new io vector within linear memory
+ * (i32.store (i32.const 0) (i32.const 8)) ;; iov.iov_base - This is a pointer to the start of the 'hello world\n' string
+ * (i32.store (i32.const 4) (i32.const 12)) ;; iov.iov_len - The length of the 'hello world\n' string
+ *
+ * (call $fd_write
+ * (i32.const 1) ;; file_descriptor - 1 for stdout
+ * (i32.const 0) ;; *iovs - The pointer to the iov array, which is stored at memory location 0
+ * (i32.const 1) ;; iovs_len - We're printing 1 string stored in an iov - so one.
+ * (i32.const 20) ;; nwritten - A place in memory to store the number of bytes written
+ * )
+ * drop ;; Discard the number of bytes written from the top of the stack
+ * )
+ * )
+ * ```
+ *
+ * Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
+ *
+ * ```console
+ * $ wat2wasm demo.wat
+ * ```
+ *
+ * The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
+ * example to run.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/wasi.js)
+ */
+declare module 'wasi' {
+ interface WASIOptions {
+ /**
+ * An array of strings that the WebAssembly application will
+ * see as command line arguments. The first argument is the virtual path to the
+ * WASI command itself.
+ */
+ args?: string[] | undefined;
+ /**
+ * An object similar to `process.env` that the WebAssembly
+ * application will see as its environment.
+ */
+ env?: object | undefined;
+ /**
+ * This object represents the WebAssembly application's
+ * sandbox directory structure. The string keys of `preopens` are treated as
+ * directories within the sandbox. The corresponding values in `preopens` are
+ * the real paths to those directories on the host machine.
+ */
+ preopens?: NodeJS.Dict<string> | undefined;
+ /**
+ * By default, WASI applications terminate the Node.js
+ * process via the `__wasi_proc_exit()` function. Setting this option to `true`
+ * causes `wasi.start()` to return the exit code rather than terminate the
+ * process.
+ * @default false
+ */
+ returnOnExit?: boolean | undefined;
+ /**
+ * The file descriptor used as standard input in the WebAssembly application.
+ * @default 0
+ */
+ stdin?: number | undefined;
+ /**
+ * The file descriptor used as standard output in the WebAssembly application.
+ * @default 1
+ */
+ stdout?: number | undefined;
+ /**
+ * The file descriptor used as standard error in the WebAssembly application.
+ * @default 2
+ */
+ stderr?: number | undefined;
+ }
+ /**
+ * The `WASI` class provides the WASI system call API and additional convenience
+ * methods for working with WASI-based applications. Each `WASI` instance
+ * represents a distinct sandbox environment. For security purposes, each `WASI`instance must have its command-line arguments, environment variables, and
+ * sandbox directory structure configured explicitly.
+ * @since v13.3.0, v12.16.0
+ */
+ class WASI {
+ constructor(options?: WASIOptions);
+ /**
+ * Attempt to begin execution of `instance` as a WASI command by invoking its`_start()` export. If `instance` does not contain a `_start()` export, or if`instance` contains an `_initialize()`
+ * export, then an exception is thrown.
+ *
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`. If
+ * `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `start()` is called more than once, an exception is thrown.
+ * @since v13.3.0, v12.16.0
+ */
+ start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.
+ *
+ * `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
+ * If `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `initialize()` is called more than once, an exception is thrown.
+ * @since v14.6.0, v12.19.0
+ */
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * `wasiImport` is an object that implements the WASI system call API. This object
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation
+ * of a [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance).
+ * @since v13.3.0, v12.16.0
+ */
+ readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
+ }
+}
+declare module 'node:wasi' {
+ export * from 'wasi';
+}
diff --git a/node_modules/@types/node/ts4.8/worker_threads.d.ts b/node_modules/@types/node/ts4.8/worker_threads.d.ts
new file mode 100755
index 0000000..81b71c2
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/worker_threads.d.ts
@@ -0,0 +1,646 @@
+/**
+ * The `worker_threads` module enables the use of threads that execute JavaScript
+ * in parallel. To access it:
+ *
+ * ```js
+ * const worker = require('worker_threads');
+ * ```
+ *
+ * Workers (threads) are useful for performing CPU-intensive JavaScript operations.
+ * They do not help much with I/O-intensive work. The Node.js built-in
+ * asynchronous I/O operations are more efficient than Workers can be.
+ *
+ * Unlike `child_process` or `cluster`, `worker_threads` can share memory. They do
+ * so by transferring `ArrayBuffer` instances or sharing `SharedArrayBuffer`instances.
+ *
+ * ```js
+ * const {
+ * Worker, isMainThread, parentPort, workerData
+ * } = require('worker_threads');
+ *
+ * if (isMainThread) {
+ * module.exports = function parseJSAsync(script) {
+ * return new Promise((resolve, reject) => {
+ * const worker = new Worker(__filename, {
+ * workerData: script
+ * });
+ * worker.on('message', resolve);
+ * worker.on('error', reject);
+ * worker.on('exit', (code) => {
+ * if (code !== 0)
+ * reject(new Error(`Worker stopped with exit code ${code}`));
+ * });
+ * });
+ * };
+ * } else {
+ * const { parse } = require('some-js-parsing-library');
+ * const script = workerData;
+ * parentPort.postMessage(parse(script));
+ * }
+ * ```
+ *
+ * The above example spawns a Worker thread for each `parseJSAsync()` call. In
+ * practice, use a pool of Workers for these kinds of tasks. Otherwise, the
+ * overhead of creating Workers would likely exceed their benefit.
+ *
+ * When implementing a worker pool, use the `AsyncResource` API to inform
+ * diagnostic tools (e.g. to provide asynchronous stack traces) about the
+ * correlation between tasks and their outcomes. See `"Using AsyncResource for a Worker thread pool"` in the `async_hooks` documentation for an example implementation.
+ *
+ * Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
+ * specifically `argv` and `execArgv` options.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/worker_threads.js)
+ */
+declare module 'worker_threads' {
+ import { Blob } from 'node:buffer';
+ import { Context } from 'node:vm';
+ import { EventEmitter } from 'node:events';
+ import { EventLoopUtilityFunction } from 'node:perf_hooks';
+ import { FileHandle } from 'node:fs/promises';
+ import { Readable, Writable } from 'node:stream';
+ import { URL } from 'node:url';
+ import { X509Certificate } from 'node:crypto';
+ const isMainThread: boolean;
+ const parentPort: null | MessagePort;
+ const resourceLimits: ResourceLimits;
+ const SHARE_ENV: unique symbol;
+ const threadId: number;
+ const workerData: any;
+ /**
+ * Instances of the `worker.MessageChannel` class represent an asynchronous,
+ * two-way communications channel.
+ * The `MessageChannel` has no methods of its own. `new MessageChannel()`yields an object with `port1` and `port2` properties, which refer to linked `MessagePort` instances.
+ *
+ * ```js
+ * const { MessageChannel } = require('worker_threads');
+ *
+ * const { port1, port2 } = new MessageChannel();
+ * port1.on('message', (message) => console.log('received', message));
+ * port2.postMessage({ foo: 'bar' });
+ * // Prints: received { foo: 'bar' } from the `port1.on('message')` listener
+ * ```
+ * @since v10.5.0
+ */
+ class MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+ }
+ interface WorkerPerformance {
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ type TransferListItem = ArrayBuffer | MessagePort | FileHandle | X509Certificate | Blob;
+ /**
+ * Instances of the `worker.MessagePort` class represent one end of an
+ * asynchronous, two-way communications channel. It can be used to transfer
+ * structured data, memory regions and other `MessagePort`s between different `Worker` s.
+ *
+ * This implementation matches [browser `MessagePort`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) s.
+ * @since v10.5.0
+ */
+ class MessagePort extends EventEmitter {
+ /**
+ * Disables further sending of messages on either side of the connection.
+ * This method can be called when no further communication will happen over this`MessagePort`.
+ *
+ * The `'close' event` is emitted on both `MessagePort` instances that
+ * are part of the channel.
+ * @since v10.5.0
+ */
+ close(): void;
+ /**
+ * Sends a JavaScript value to the receiving side of this channel.`value` is transferred in a way which is compatible with
+ * the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
+ *
+ * In particular, the significant differences to `JSON` are:
+ *
+ * * `value` may contain circular references.
+ * * `value` may contain instances of builtin JS types such as `RegExp`s,`BigInt`s, `Map`s, `Set`s, etc.
+ * * `value` may contain typed arrays, both using `ArrayBuffer`s
+ * and `SharedArrayBuffer`s.
+ * * `value` may contain [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) instances.
+ * * `value` may not contain native (C++-backed) objects other than:
+ *
+ * ```js
+ * const { MessageChannel } = require('worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const circularData = {};
+ * circularData.foo = circularData;
+ * // Prints: { foo: [Circular] }
+ * port2.postMessage(circularData);
+ * ```
+ *
+ * `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort` and `FileHandle` objects.
+ * After transferring, they are not usable on the sending side of the channel
+ * anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently
+ * not supported.
+ *
+ * If `value` contains [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances, those are accessible
+ * from either thread. They cannot be listed in `transferList`.
+ *
+ * `value` may still contain `ArrayBuffer` instances that are not in`transferList`; in that case, the underlying memory is copied rather than moved.
+ *
+ * ```js
+ * const { MessageChannel } = require('worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const uint8Array = new Uint8Array([ 1, 2, 3, 4 ]);
+ * // This posts a copy of `uint8Array`:
+ * port2.postMessage(uint8Array);
+ * // This does not copy data, but renders `uint8Array` unusable:
+ * port2.postMessage(uint8Array, [ uint8Array.buffer ]);
+ *
+ * // The memory for the `sharedUint8Array` is accessible from both the
+ * // original and the copy received by `.on('message')`:
+ * const sharedUint8Array = new Uint8Array(new SharedArrayBuffer(4));
+ * port2.postMessage(sharedUint8Array);
+ *
+ * // This transfers a freshly created message port to the receiver.
+ * // This can be used, for example, to create communication channels between
+ * // multiple `Worker` threads that are children of the same parent thread.
+ * const otherChannel = new MessageChannel();
+ * port2.postMessage({ port: otherChannel.port1 }, [ otherChannel.port1 ]);
+ * ```
+ *
+ * The message object is cloned immediately, and can be modified after
+ * posting without having side effects.
+ *
+ * For more information on the serialization and deserialization mechanisms
+ * behind this API, see the `serialization API of the v8 module`.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port
+ * is `ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a port allows the thread to exit if this is the only
+ * active handle in the event system. If the port is already `unref()`ed calling`unref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port is`ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Starts receiving messages on this `MessagePort`. When using this port
+ * as an event emitter, this is called automatically once `'message'`listeners are attached.
+ *
+ * This method exists for parity with the Web `MessagePort` API. In Node.js,
+ * it is only useful for ignoring messages when no event listener is present.
+ * Node.js also diverges in its handling of `.onmessage`. Setting it
+ * automatically calls `.start()`, but unsetting it lets messages queue up
+ * until a new handler is set or the port is discarded.
+ * @since v10.5.0
+ */
+ start(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'close', listener: () => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface WorkerOptions {
+ /**
+ * List of arguments which would be stringified and appended to
+ * `process.argv` in the worker. This is mostly similar to the `workerData`
+ * but the values will be available on the global `process.argv` as if they
+ * were passed as CLI options to the script.
+ */
+ argv?: any[] | undefined;
+ env?: NodeJS.Dict<string> | typeof SHARE_ENV | undefined;
+ eval?: boolean | undefined;
+ workerData?: any;
+ stdin?: boolean | undefined;
+ stdout?: boolean | undefined;
+ stderr?: boolean | undefined;
+ execArgv?: string[] | undefined;
+ resourceLimits?: ResourceLimits | undefined;
+ /**
+ * Additional data to send in the first worker message.
+ */
+ transferList?: TransferListItem[] | undefined;
+ /**
+ * @default true
+ */
+ trackUnmanagedFds?: boolean | undefined;
+ }
+ interface ResourceLimits {
+ /**
+ * The maximum size of a heap space for recently created objects.
+ */
+ maxYoungGenerationSizeMb?: number | undefined;
+ /**
+ * The maximum size of the main heap in MB.
+ */
+ maxOldGenerationSizeMb?: number | undefined;
+ /**
+ * The size of a pre-allocated memory range used for generated code.
+ */
+ codeRangeSizeMb?: number | undefined;
+ /**
+ * The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
+ * @default 4
+ */
+ stackSizeMb?: number | undefined;
+ }
+ /**
+ * The `Worker` class represents an independent JavaScript execution thread.
+ * Most Node.js APIs are available inside of it.
+ *
+ * Notable differences inside a Worker environment are:
+ *
+ * * The `process.stdin`, `process.stdout` and `process.stderr` may be redirected by the parent thread.
+ * * The `require('worker_threads').isMainThread` property is set to `false`.
+ * * The `require('worker_threads').parentPort` message port is available.
+ * * `process.exit()` does not stop the whole program, just the single thread,
+ * and `process.abort()` is not available.
+ * * `process.chdir()` and `process` methods that set group or user ids
+ * are not available.
+ * * `process.env` is a copy of the parent thread's environment variables,
+ * unless otherwise specified. Changes to one copy are not visible in other
+ * threads, and are not visible to native add-ons (unless `worker.SHARE_ENV` is passed as the `env` option to the `Worker` constructor).
+ * * `process.title` cannot be modified.
+ * * Signals are not delivered through `process.on('...')`.
+ * * Execution may stop at any point as a result of `worker.terminate()` being invoked.
+ * * IPC channels from parent processes are not accessible.
+ * * The `trace_events` module is not supported.
+ * * Native add-ons can only be loaded from multiple threads if they fulfill `certain conditions`.
+ *
+ * Creating `Worker` instances inside of other `Worker`s is possible.
+ *
+ * Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `cluster module`, two-way communication can be
+ * achieved through inter-thread message passing. Internally, a `Worker` has a
+ * built-in pair of `MessagePort` s that are already associated with each other
+ * when the `Worker` is created. While the `MessagePort` object on the parent side
+ * is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
+ * on the `Worker` object for the parent thread.
+ *
+ * To create custom messaging channels (which is encouraged over using the default
+ * global channel because it facilitates separation of concerns), users can create
+ * a `MessageChannel` object on either thread and pass one of the`MessagePort`s on that `MessageChannel` to the other thread through a
+ * pre-existing channel, such as the global one.
+ *
+ * See `port.postMessage()` for more information on how messages are passed,
+ * and what kind of JavaScript values can be successfully transported through
+ * the thread barrier.
+ *
+ * ```js
+ * const assert = require('assert');
+ * const {
+ * Worker, MessageChannel, MessagePort, isMainThread, parentPort
+ * } = require('worker_threads');
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ * const subChannel = new MessageChannel();
+ * worker.postMessage({ hereIsYourPort: subChannel.port1 }, [subChannel.port1]);
+ * subChannel.port2.on('message', (value) => {
+ * console.log('received:', value);
+ * });
+ * } else {
+ * parentPort.once('message', (value) => {
+ * assert(value.hereIsYourPort instanceof MessagePort);
+ * value.hereIsYourPort.postMessage('the worker is sending this');
+ * value.hereIsYourPort.close();
+ * });
+ * }
+ * ```
+ * @since v10.5.0
+ */
+ class Worker extends EventEmitter {
+ /**
+ * If `stdin: true` was passed to the `Worker` constructor, this is a
+ * writable stream. The data written to this stream will be made available in
+ * the worker thread as `process.stdin`.
+ * @since v10.5.0
+ */
+ readonly stdin: Writable | null;
+ /**
+ * This is a readable stream which contains data written to `process.stdout` inside the worker thread. If `stdout: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stdout` stream.
+ * @since v10.5.0
+ */
+ readonly stdout: Readable;
+ /**
+ * This is a readable stream which contains data written to `process.stderr` inside the worker thread. If `stderr: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stderr` stream.
+ * @since v10.5.0
+ */
+ readonly stderr: Readable;
+ /**
+ * An integer identifier for the referenced thread. Inside the worker thread,
+ * it is available as `require('worker_threads').threadId`.
+ * This value is unique for each `Worker` instance inside a single process.
+ * @since v10.5.0
+ */
+ readonly threadId: number;
+ /**
+ * Provides the set of JS engine resource constraints for this Worker thread.
+ * If the `resourceLimits` option was passed to the `Worker` constructor,
+ * this matches its values.
+ *
+ * If the worker has stopped, the return value is an empty object.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly resourceLimits?: ResourceLimits | undefined;
+ /**
+ * An object that can be used to query performance information from a worker
+ * instance. Similar to `perf_hooks.performance`.
+ * @since v15.1.0, v14.17.0, v12.22.0
+ */
+ readonly performance: WorkerPerformance;
+ /**
+ * @param filename The path to the Worker’s main script or module.
+ * Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
+ * or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
+ */
+ constructor(filename: string | URL, options?: WorkerOptions);
+ /**
+ * Send a message to the worker that is received via `require('worker_threads').parentPort.on('message')`.
+ * See `port.postMessage()` for more details.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the worker is `ref()`ed, calling `ref()` again has
+ * no effect.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a worker allows the thread to exit if this is the only
+ * active handle in the event system. If the worker is already `unref()`ed calling`unref()` again has no effect.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Stop all JavaScript execution in the worker thread as soon as possible.
+ * Returns a Promise for the exit code that is fulfilled when the `'exit' event` is emitted.
+ * @since v10.5.0
+ */
+ terminate(): Promise<number>;
+ /**
+ * Returns a readable stream for a V8 snapshot of the current state of the Worker.
+ * See `v8.getHeapSnapshot()` for more details.
+ *
+ * If the Worker thread is no longer running, which may occur before the `'exit' event` is emitted, the returned `Promise` is rejected
+ * immediately with an `ERR_WORKER_NOT_RUNNING` error.
+ * @since v13.9.0, v12.17.0
+ * @return A promise for a Readable Stream containing a V8 heap snapshot
+ */
+ getHeapSnapshot(): Promise<Readable>;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (exitCode: number) => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: 'online', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', exitCode: number): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: 'online'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (exitCode: number) => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: 'online', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (exitCode: number) => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: 'online', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: 'online', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'exit', listener: (exitCode: number) => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: 'online', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'error', listener: (err: Error) => void): this;
+ off(event: 'exit', listener: (exitCode: number) => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: 'online', listener: () => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface BroadcastChannel extends NodeJS.RefCounted {}
+ /**
+ * Instances of `BroadcastChannel` allow asynchronous one-to-many communication
+ * with all other `BroadcastChannel` instances bound to the same channel name.
+ *
+ * ```js
+ * 'use strict';
+ *
+ * const {
+ * isMainThread,
+ * BroadcastChannel,
+ * Worker
+ * } = require('worker_threads');
+ *
+ * const bc = new BroadcastChannel('hello');
+ *
+ * if (isMainThread) {
+ * let c = 0;
+ * bc.onmessage = (event) => {
+ * console.log(event.data);
+ * if (++c === 10) bc.close();
+ * };
+ * for (let n = 0; n < 10; n++)
+ * new Worker(__filename);
+ * } else {
+ * bc.postMessage('hello from every worker');
+ * bc.close();
+ * }
+ * ```
+ * @since v15.4.0
+ */
+ class BroadcastChannel {
+ readonly name: string;
+ /**
+ * Invoked with a single \`MessageEvent\` argument when a message is received.
+ * @since v15.4.0
+ */
+ onmessage: (message: unknown) => void;
+ /**
+ * Invoked with a received message cannot be deserialized.
+ * @since v15.4.0
+ */
+ onmessageerror: (message: unknown) => void;
+ constructor(name: string);
+ /**
+ * Closes the `BroadcastChannel` connection.
+ * @since v15.4.0
+ */
+ close(): void;
+ /**
+ * @since v15.4.0
+ * @param message Any cloneable JavaScript value.
+ */
+ postMessage(message: unknown): void;
+ }
+ /**
+ * Mark an object as not transferable. If `object` occurs in the transfer list of
+ * a `port.postMessage()` call, it is ignored.
+ *
+ * In particular, this makes sense for objects that can be cloned, rather than
+ * transferred, and which are used by other objects on the sending side.
+ * For example, Node.js marks the `ArrayBuffer`s it uses for its `Buffer pool` with this.
+ *
+ * This operation cannot be undone.
+ *
+ * ```js
+ * const { MessageChannel, markAsUntransferable } = require('worker_threads');
+ *
+ * const pooledBuffer = new ArrayBuffer(8);
+ * const typedArray1 = new Uint8Array(pooledBuffer);
+ * const typedArray2 = new Float64Array(pooledBuffer);
+ *
+ * markAsUntransferable(pooledBuffer);
+ *
+ * const { port1 } = new MessageChannel();
+ * port1.postMessage(typedArray1, [ typedArray1.buffer ]);
+ *
+ * // The following line prints the contents of typedArray1 -- it still owns
+ * // its memory and has been cloned, not transferred. Without
+ * // `markAsUntransferable()`, this would print an empty Uint8Array.
+ * // typedArray2 is intact as well.
+ * console.log(typedArray1);
+ * console.log(typedArray2);
+ * ```
+ *
+ * There is no equivalent to this API in browsers.
+ * @since v14.5.0, v12.19.0
+ */
+ function markAsUntransferable(object: object): void;
+ /**
+ * Transfer a `MessagePort` to a different `vm` Context. The original `port`object is rendered unusable, and the returned `MessagePort` instance
+ * takes its place.
+ *
+ * The returned `MessagePort` is an object in the target context and
+ * inherits from its global `Object` class. Objects passed to the [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) listener are also created in the
+ * target context
+ * and inherit from its global `Object` class.
+ *
+ * However, the created `MessagePort` no longer inherits from [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget), and only
+ * [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) can be used to receive
+ * events using it.
+ * @since v11.13.0
+ * @param port The message port to transfer.
+ * @param contextifiedSandbox A `contextified` object as returned by the `vm.createContext()` method.
+ */
+ function moveMessagePortToContext(port: MessagePort, contextifiedSandbox: Context): MessagePort;
+ /**
+ * Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
+ * that contains the message payload, corresponding to the oldest message in the`MessagePort`’s queue.
+ *
+ * ```js
+ * const { MessageChannel, receiveMessageOnPort } = require('worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ * port1.postMessage({ hello: 'world' });
+ *
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: { message: { hello: 'world' } }
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: undefined
+ * ```
+ *
+ * When this function is used, no `'message'` event is emitted and the`onmessage` listener is not invoked.
+ * @since v12.3.0
+ */
+ function receiveMessageOnPort(port: MessagePort):
+ | {
+ message: any;
+ }
+ | undefined;
+ type Serializable = string | object | number | boolean | bigint;
+ /**
+ * Within a worker thread, `worker.getEnvironmentData()` returns a clone
+ * of data passed to the spawning thread's `worker.setEnvironmentData()`.
+ * Every new `Worker` receives its own copy of the environment data
+ * automatically.
+ *
+ * ```js
+ * const {
+ * Worker,
+ * isMainThread,
+ * setEnvironmentData,
+ * getEnvironmentData,
+ * } = require('worker_threads');
+ *
+ * if (isMainThread) {
+ * setEnvironmentData('Hello', 'World!');
+ * const worker = new Worker(__filename);
+ * } else {
+ * console.log(getEnvironmentData('Hello')); // Prints 'World!'.
+ * }
+ * ```
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ */
+ function getEnvironmentData(key: Serializable): Serializable;
+ /**
+ * The `worker.setEnvironmentData()` API sets the content of`worker.getEnvironmentData()` in the current thread and all new `Worker`instances spawned from the current context.
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ * @param value Any arbitrary, cloneable JavaScript value that will be cloned and passed automatically to all new `Worker` instances. If `value` is passed as `undefined`, any previously set value
+ * for the `key` will be deleted.
+ */
+ function setEnvironmentData(key: Serializable, value: Serializable): void;
+}
+declare module 'node:worker_threads' {
+ export * from 'worker_threads';
+}
diff --git a/node_modules/@types/node/ts4.8/zlib.d.ts b/node_modules/@types/node/ts4.8/zlib.d.ts
new file mode 100755
index 0000000..1d7f0c0
--- /dev/null
+++ b/node_modules/@types/node/ts4.8/zlib.d.ts
@@ -0,0 +1,517 @@
+/**
+ * The `zlib` module provides compression functionality implemented using Gzip,
+ * Deflate/Inflate, and Brotli.
+ *
+ * To access it:
+ *
+ * ```js
+ * const zlib = require('zlib');
+ * ```
+ *
+ * Compression and decompression are built around the Node.js `Streams API`.
+ *
+ * Compressing or decompressing a stream (such as a file) can be accomplished by
+ * piping the source stream through a `zlib` `Transform` stream into a destination
+ * stream:
+ *
+ * ```js
+ * const { createGzip } = require('zlib');
+ * const { pipeline } = require('stream');
+ * const {
+ * createReadStream,
+ * createWriteStream
+ * } = require('fs');
+ *
+ * const gzip = createGzip();
+ * const source = createReadStream('input.txt');
+ * const destination = createWriteStream('input.txt.gz');
+ *
+ * pipeline(source, gzip, destination, (err) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('util');
+ * const pipe = promisify(pipeline);
+ *
+ * async function do_gzip(input, output) {
+ * const gzip = createGzip();
+ * const source = createReadStream(input);
+ * const destination = createWriteStream(output);
+ * await pipe(source, gzip, destination);
+ * }
+ *
+ * do_gzip('input.txt', 'input.txt.gz')
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ *
+ * It is also possible to compress or decompress data in a single step:
+ *
+ * ```js
+ * const { deflate, unzip } = require('zlib');
+ *
+ * const input = '.................................';
+ * deflate(input, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString('base64'));
+ * });
+ *
+ * const buffer = Buffer.from('eJzT0yMAAGTvBe8=', 'base64');
+ * unzip(buffer, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString());
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('util');
+ * const do_unzip = promisify(unzip);
+ *
+ * do_unzip(buffer)
+ * .then((buf) => console.log(buf.toString()))
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ * @since v0.5.8
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/zlib.js)
+ */
+declare module 'zlib' {
+ import * as stream from 'node:stream';
+ interface ZlibOptions {
+ /**
+ * @default constants.Z_NO_FLUSH
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.Z_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined; // compression only
+ memLevel?: number | undefined; // compression only
+ strategy?: number | undefined; // compression only
+ dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
+ info?: boolean | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface BrotliOptions {
+ /**
+ * @default constants.BROTLI_OPERATION_PROCESS
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.BROTLI_OPERATION_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ params?:
+ | {
+ /**
+ * Each key is a `constants.BROTLI_*` constant.
+ */
+ [key: number]: boolean | number;
+ }
+ | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface Zlib {
+ /** @deprecated Use bytesWritten instead. */
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ shell?: boolean | string | undefined;
+ close(callback?: () => void): void;
+ flush(kind?: number, callback?: () => void): void;
+ flush(callback?: () => void): void;
+ }
+ interface ZlibParams {
+ params(level: number, strategy: number, callback: () => void): void;
+ }
+ interface ZlibReset {
+ reset(): void;
+ }
+ interface BrotliCompress extends stream.Transform, Zlib {}
+ interface BrotliDecompress extends stream.Transform, Zlib {}
+ interface Gzip extends stream.Transform, Zlib {}
+ interface Gunzip extends stream.Transform, Zlib {}
+ interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface Inflate extends stream.Transform, Zlib, ZlibReset {}
+ interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
+ interface Unzip extends stream.Transform, Zlib {}
+ /**
+ * Creates and returns a new `BrotliCompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
+ /**
+ * Creates and returns a new `BrotliDecompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
+ /**
+ * Creates and returns a new `Gzip` object.
+ * See `example`.
+ * @since v0.5.8
+ */
+ function createGzip(options?: ZlibOptions): Gzip;
+ /**
+ * Creates and returns a new `Gunzip` object.
+ * @since v0.5.8
+ */
+ function createGunzip(options?: ZlibOptions): Gunzip;
+ /**
+ * Creates and returns a new `Deflate` object.
+ * @since v0.5.8
+ */
+ function createDeflate(options?: ZlibOptions): Deflate;
+ /**
+ * Creates and returns a new `Inflate` object.
+ * @since v0.5.8
+ */
+ function createInflate(options?: ZlibOptions): Inflate;
+ /**
+ * Creates and returns a new `DeflateRaw` object.
+ *
+ * An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`is set to 8 for raw deflate streams. zlib would automatically set `windowBits`to 9 if was initially set to 8\. Newer
+ * versions of zlib will throw an exception,
+ * so Node.js restored the original behavior of upgrading a value of 8 to 9,
+ * since passing `windowBits = 9` to zlib actually results in a compressed stream
+ * that effectively uses an 8-bit window only.
+ * @since v0.5.8
+ */
+ function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
+ /**
+ * Creates and returns a new `InflateRaw` object.
+ * @since v0.5.8
+ */
+ function createInflateRaw(options?: ZlibOptions): InflateRaw;
+ /**
+ * Creates and returns a new `Unzip` object.
+ * @since v0.5.8
+ */
+ function createUnzip(options?: ZlibOptions): Unzip;
+ type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
+ type CompressCallback = (error: Error | null, result: Buffer) => void;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliCompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliCompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `BrotliCompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliDecompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliDecompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `BrotliDecompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflate(buf: InputType, callback: CompressCallback): void;
+ function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Deflate`.
+ * @since v0.11.12
+ */
+ function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflateRaw(buf: InputType, callback: CompressCallback): void;
+ function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `DeflateRaw`.
+ * @since v0.11.12
+ */
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gzip(buf: InputType, callback: CompressCallback): void;
+ function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Gzip`.
+ * @since v0.11.12
+ */
+ function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gunzip(buf: InputType, callback: CompressCallback): void;
+ function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gunzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Gunzip`.
+ * @since v0.11.12
+ */
+ function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflate(buf: InputType, callback: CompressCallback): void;
+ function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Inflate`.
+ * @since v0.11.12
+ */
+ function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflateRaw(buf: InputType, callback: CompressCallback): void;
+ function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `InflateRaw`.
+ * @since v0.11.12
+ */
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function unzip(buf: InputType, callback: CompressCallback): void;
+ function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace unzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Unzip`.
+ * @since v0.11.12
+ */
+ function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ namespace constants {
+ const BROTLI_DECODE: number;
+ const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
+ const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
+ const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
+ const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
+ const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
+ const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
+ const BROTLI_DECODER_ERROR_UNREACHABLE: number;
+ const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_NO_ERROR: number;
+ const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
+ const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
+ const BROTLI_DECODER_RESULT_ERROR: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_RESULT_SUCCESS: number;
+ const BROTLI_DECODER_SUCCESS: number;
+ const BROTLI_DEFAULT_MODE: number;
+ const BROTLI_DEFAULT_QUALITY: number;
+ const BROTLI_DEFAULT_WINDOW: number;
+ const BROTLI_ENCODE: number;
+ const BROTLI_LARGE_MAX_WINDOW_BITS: number;
+ const BROTLI_MAX_INPUT_BLOCK_BITS: number;
+ const BROTLI_MAX_QUALITY: number;
+ const BROTLI_MAX_WINDOW_BITS: number;
+ const BROTLI_MIN_INPUT_BLOCK_BITS: number;
+ const BROTLI_MIN_QUALITY: number;
+ const BROTLI_MIN_WINDOW_BITS: number;
+ const BROTLI_MODE_FONT: number;
+ const BROTLI_MODE_GENERIC: number;
+ const BROTLI_MODE_TEXT: number;
+ const BROTLI_OPERATION_EMIT_METADATA: number;
+ const BROTLI_OPERATION_FINISH: number;
+ const BROTLI_OPERATION_FLUSH: number;
+ const BROTLI_OPERATION_PROCESS: number;
+ const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
+ const BROTLI_PARAM_LARGE_WINDOW: number;
+ const BROTLI_PARAM_LGBLOCK: number;
+ const BROTLI_PARAM_LGWIN: number;
+ const BROTLI_PARAM_MODE: number;
+ const BROTLI_PARAM_NDIRECT: number;
+ const BROTLI_PARAM_NPOSTFIX: number;
+ const BROTLI_PARAM_QUALITY: number;
+ const BROTLI_PARAM_SIZE_HINT: number;
+ const DEFLATE: number;
+ const DEFLATERAW: number;
+ const GUNZIP: number;
+ const GZIP: number;
+ const INFLATE: number;
+ const INFLATERAW: number;
+ const UNZIP: number;
+ // Allowed flush values.
+ const Z_NO_FLUSH: number;
+ const Z_PARTIAL_FLUSH: number;
+ const Z_SYNC_FLUSH: number;
+ const Z_FULL_FLUSH: number;
+ const Z_FINISH: number;
+ const Z_BLOCK: number;
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ const Z_OK: number;
+ const Z_STREAM_END: number;
+ const Z_NEED_DICT: number;
+ const Z_ERRNO: number;
+ const Z_STREAM_ERROR: number;
+ const Z_DATA_ERROR: number;
+ const Z_MEM_ERROR: number;
+ const Z_BUF_ERROR: number;
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ const Z_NO_COMPRESSION: number;
+ const Z_BEST_SPEED: number;
+ const Z_BEST_COMPRESSION: number;
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ const Z_FILTERED: number;
+ const Z_HUFFMAN_ONLY: number;
+ const Z_RLE: number;
+ const Z_FIXED: number;
+ const Z_DEFAULT_STRATEGY: number;
+ const Z_DEFAULT_WINDOWBITS: number;
+ const Z_MIN_WINDOWBITS: number;
+ const Z_MAX_WINDOWBITS: number;
+ const Z_MIN_CHUNK: number;
+ const Z_MAX_CHUNK: number;
+ const Z_DEFAULT_CHUNK: number;
+ const Z_MIN_MEMLEVEL: number;
+ const Z_MAX_MEMLEVEL: number;
+ const Z_DEFAULT_MEMLEVEL: number;
+ const Z_MIN_LEVEL: number;
+ const Z_MAX_LEVEL: number;
+ const Z_DEFAULT_LEVEL: number;
+ const ZLIB_VERNUM: number;
+ }
+ // Allowed flush values.
+ /** @deprecated Use `constants.Z_NO_FLUSH` */
+ const Z_NO_FLUSH: number;
+ /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
+ const Z_PARTIAL_FLUSH: number;
+ /** @deprecated Use `constants.Z_SYNC_FLUSH` */
+ const Z_SYNC_FLUSH: number;
+ /** @deprecated Use `constants.Z_FULL_FLUSH` */
+ const Z_FULL_FLUSH: number;
+ /** @deprecated Use `constants.Z_FINISH` */
+ const Z_FINISH: number;
+ /** @deprecated Use `constants.Z_BLOCK` */
+ const Z_BLOCK: number;
+ /** @deprecated Use `constants.Z_TREES` */
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ /** @deprecated Use `constants.Z_OK` */
+ const Z_OK: number;
+ /** @deprecated Use `constants.Z_STREAM_END` */
+ const Z_STREAM_END: number;
+ /** @deprecated Use `constants.Z_NEED_DICT` */
+ const Z_NEED_DICT: number;
+ /** @deprecated Use `constants.Z_ERRNO` */
+ const Z_ERRNO: number;
+ /** @deprecated Use `constants.Z_STREAM_ERROR` */
+ const Z_STREAM_ERROR: number;
+ /** @deprecated Use `constants.Z_DATA_ERROR` */
+ const Z_DATA_ERROR: number;
+ /** @deprecated Use `constants.Z_MEM_ERROR` */
+ const Z_MEM_ERROR: number;
+ /** @deprecated Use `constants.Z_BUF_ERROR` */
+ const Z_BUF_ERROR: number;
+ /** @deprecated Use `constants.Z_VERSION_ERROR` */
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ /** @deprecated Use `constants.Z_NO_COMPRESSION` */
+ const Z_NO_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_BEST_SPEED` */
+ const Z_BEST_SPEED: number;
+ /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
+ const Z_BEST_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ /** @deprecated Use `constants.Z_FILTERED` */
+ const Z_FILTERED: number;
+ /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
+ const Z_HUFFMAN_ONLY: number;
+ /** @deprecated Use `constants.Z_RLE` */
+ const Z_RLE: number;
+ /** @deprecated Use `constants.Z_FIXED` */
+ const Z_FIXED: number;
+ /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
+ const Z_DEFAULT_STRATEGY: number;
+ /** @deprecated */
+ const Z_BINARY: number;
+ /** @deprecated */
+ const Z_TEXT: number;
+ /** @deprecated */
+ const Z_ASCII: number;
+ /** @deprecated */
+ const Z_UNKNOWN: number;
+ /** @deprecated */
+ const Z_DEFLATED: number;
+}
+declare module 'node:zlib' {
+ export * from 'zlib';
+}
diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts
new file mode 100755
index 0000000..6473f8d
--- /dev/null
+++ b/node_modules/@types/node/tty.d.ts
@@ -0,0 +1,206 @@
+/**
+ * The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.
+ * In most cases, it will not be necessary or possible to use this module directly.
+ * However, it can be accessed using:
+ *
+ * ```js
+ * const tty = require('tty');
+ * ```
+ *
+ * When Node.js detects that it is being run with a text terminal ("TTY")
+ * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
+ * default, be instances of `tty.WriteStream`. The preferred method of determining
+ * whether Node.js is being run within a TTY context is to check that the value of
+ * the `process.stdout.isTTY` property is `true`:
+ *
+ * ```console
+ * $ node -p -e "Boolean(process.stdout.isTTY)"
+ * true
+ * $ node -p -e "Boolean(process.stdout.isTTY)" | cat
+ * false
+ * ```
+ *
+ * In most cases, there should be little to no reason for an application to
+ * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tty.js)
+ */
+declare module 'tty' {
+ import * as net from 'node:net';
+ /**
+ * The `tty.isatty()` method returns `true` if the given `fd` is associated with
+ * a TTY and `false` if it is not, including whenever `fd` is not a non-negative
+ * integer.
+ * @since v0.5.8
+ * @param fd A numeric file descriptor
+ */
+ function isatty(fd: number): boolean;
+ /**
+ * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js
+ * process and there should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class ReadStream extends net.Socket {
+ constructor(fd: number, options?: net.SocketConstructorOpts);
+ /**
+ * A `boolean` that is `true` if the TTY is currently configured to operate as a
+ * raw device. Defaults to `false`.
+ * @since v0.7.7
+ */
+ isRaw: boolean;
+ /**
+ * Allows configuration of `tty.ReadStream` so that it operates as a raw device.
+ *
+ * When in raw mode, input is always available character-by-character, not
+ * including modifiers. Additionally, all special processing of characters by the
+ * terminal is disabled, including echoing input
+ * characters. Ctrl+C will no longer cause a `SIGINT` when
+ * in this mode.
+ * @since v0.7.7
+ * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw`
+ * property will be set to the resulting mode.
+ * @return The read stream instance.
+ */
+ setRawMode(mode: boolean): this;
+ /**
+ * A `boolean` that is always `true` for `tty.ReadStream` instances.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+ /**
+ * -1 - to the left from cursor
+ * 0 - the entire line
+ * 1 - to the right from cursor
+ */
+ type Direction = -1 | 0 | 1;
+ /**
+ * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
+ * should be no reason to create additional instances.
+ * @since v0.5.8
+ */
+ class WriteStream extends net.Socket {
+ constructor(fd: number);
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: 'resize', listener: () => void): this;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: 'resize'): boolean;
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: 'resize', listener: () => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'resize', listener: () => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'resize', listener: () => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'resize', listener: () => void): this;
+ /**
+ * `writeStream.clearLine()` clears the current line of this `WriteStream` in a
+ * direction identified by `dir`.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearLine(dir: Direction, callback?: () => void): boolean;
+ /**
+ * `writeStream.clearScreenDown()` clears this `WriteStream` from the current
+ * cursor down.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ clearScreenDown(callback?: () => void): boolean;
+ /**
+ * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified
+ * position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
+ cursorTo(x: number, callback: () => void): boolean;
+ /**
+ * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its
+ * current position.
+ * @since v0.7.7
+ * @param callback Invoked once the operation completes.
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ */
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
+ /**
+ * Returns:
+ *
+ * * `1` for 2,
+ * * `4` for 16,
+ * * `8` for 256,
+ * * `24` for 16,777,216 colors supported.
+ *
+ * Use this to determine what colors the terminal supports. Due to the nature of
+ * colors in terminals it is possible to either have false positives or false
+ * negatives. It depends on process information and the environment variables that
+ * may lie about what terminal is used.
+ * It is possible to pass in an `env` object to simulate the usage of a specific
+ * terminal. This can be useful to check how specific environment settings behave.
+ *
+ * To enforce a specific color support, use one of the below environment settings.
+ *
+ * * 2 colors: `FORCE_COLOR = 0` (Disables colors)
+ * * 16 colors: `FORCE_COLOR = 1`
+ * * 256 colors: `FORCE_COLOR = 2`
+ * * 16,777,216 colors: `FORCE_COLOR = 3`
+ *
+ * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
+ * @since v9.9.0
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ getColorDepth(env?: object): number;
+ /**
+ * Returns `true` if the `writeStream` supports at least as many colors as provided
+ * in `count`. Minimum support is 2 (black and white).
+ *
+ * This has the same false positives and negatives as described in `writeStream.getColorDepth()`.
+ *
+ * ```js
+ * process.stdout.hasColors();
+ * // Returns true or false depending on if `stdout` supports at least 16 colors.
+ * process.stdout.hasColors(256);
+ * // Returns true or false depending on if `stdout` supports at least 256 colors.
+ * process.stdout.hasColors({ TMUX: '1' });
+ * // Returns true.
+ * process.stdout.hasColors(2 ** 24, { TMUX: '1' });
+ * // Returns false (the environment setting pretends to support 2 ** 8 colors).
+ * ```
+ * @since v11.13.0, v10.16.0
+ * @param [count=16] The number of colors that are requested (minimum 2).
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
+ */
+ hasColors(count?: number): boolean;
+ hasColors(env?: object): boolean;
+ hasColors(count: number, env?: object): boolean;
+ /**
+ * `writeStream.getWindowSize()` returns the size of the TTY
+ * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
+ * of columns and rows in the corresponding TTY.
+ * @since v0.7.7
+ */
+ getWindowSize(): [number, number];
+ /**
+ * A `number` specifying the number of columns the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ columns: number;
+ /**
+ * A `number` specifying the number of rows the TTY currently has. This property
+ * is updated whenever the `'resize'` event is emitted.
+ * @since v0.7.7
+ */
+ rows: number;
+ /**
+ * A `boolean` that is always `true`.
+ * @since v0.5.8
+ */
+ isTTY: boolean;
+ }
+}
+declare module 'node:tty' {
+ export * from 'tty';
+}
diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts
new file mode 100755
index 0000000..18362c8
--- /dev/null
+++ b/node_modules/@types/node/url.d.ts
@@ -0,0 +1,897 @@
+/**
+ * The `url` module provides utilities for URL resolution and parsing. It can be
+ * accessed using:
+ *
+ * ```js
+ * import url from 'url';
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js)
+ */
+declare module 'url' {
+ import { Blob } from 'node:buffer';
+ import { ClientRequestArgs } from 'node:http';
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
+ // Input to `url.format`
+ interface UrlObject {
+ auth?: string | null | undefined;
+ hash?: string | null | undefined;
+ host?: string | null | undefined;
+ hostname?: string | null | undefined;
+ href?: string | null | undefined;
+ pathname?: string | null | undefined;
+ protocol?: string | null | undefined;
+ search?: string | null | undefined;
+ slashes?: boolean | null | undefined;
+ port?: string | number | null | undefined;
+ query?: string | null | ParsedUrlQueryInput | undefined;
+ }
+ // Output of `url.parse`
+ interface Url {
+ auth: string | null;
+ hash: string | null;
+ host: string | null;
+ hostname: string | null;
+ href: string;
+ path: string | null;
+ pathname: string | null;
+ protocol: string | null;
+ search: string | null;
+ slashes: boolean | null;
+ port: string | null;
+ query: string | null | ParsedUrlQuery;
+ }
+ interface UrlWithParsedQuery extends Url {
+ query: ParsedUrlQuery;
+ }
+ interface UrlWithStringQuery extends Url {
+ query: string | null;
+ }
+ /**
+ * The `url.parse()` method takes a URL string, parses it, and returns a URL
+ * object.
+ *
+ * A `TypeError` is thrown if `urlString` is not a string.
+ *
+ * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
+ *
+ * Use of the legacy `url.parse()` method is discouraged. Users should
+ * use the WHATWG `URL` API. Because the `url.parse()` method uses a
+ * lenient, non-standard algorithm for parsing URL strings, security
+ * issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and
+ * incorrect handling of usernames and passwords have been identified.
+ *
+ * Deprecation of this API has been shelved for now primarily due to the the
+ * inability of the [WHATWG API to parse relative URLs](https://github.com/nodejs/node/issues/12682#issuecomment-1154492373).
+ * [Discussions are ongoing](https://github.com/whatwg/url/issues/531) for the best way to resolve this.
+ *
+ * @since v0.1.25
+ * @param urlString The URL string to parse.
+ * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
+ * on the returned URL object will be an unparsed, undecoded string.
+ * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
+ * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
+ */
+ function parse(urlString: string): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
+ function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
+ function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json'
+ * }
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @deprecated Legacy: Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: URL, options?: URLFormatOptions): string;
+ /**
+ * The `url.format()` method returns a formatted URL string derived from`urlObject`.
+ *
+ * ```js
+ * const url = require('url');
+ * url.format({
+ * protocol: 'https',
+ * hostname: 'example.com',
+ * pathname: '/some/path',
+ * query: {
+ * page: 1,
+ * format: 'json'
+ * }
+ * });
+ *
+ * // => 'https://example.com/some/path?page=1&#x26;format=json'
+ * ```
+ *
+ * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
+ *
+ * The formatting process operates as follows:
+ *
+ * * A new empty string `result` is created.
+ * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
+ * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
+ * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
+ * colon (`:`) character, the literal string `:` will be appended to `result`.
+ * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
+ * * `urlObject.slashes` property is true;
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
+ * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
+ * and appended to `result`followed by the literal string `@`.
+ * * If the `urlObject.host` property is `undefined` then:
+ * * If the `urlObject.hostname` is a string, it is appended to `result`.
+ * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
+ * an `Error` is thrown.
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
+ * * The literal string `:` is appended to `result`, and
+ * * The value of `urlObject.port` is coerced to a string and appended to`result`.
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
+ * * If the `urlObject.pathname` property is a string that is not an empty string:
+ * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
+ * (`/`), then the literal string `'/'` is appended to `result`.
+ * * The value of `urlObject.pathname` is appended to `result`.
+ * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
+ * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
+ * * Otherwise, if `urlObject.search` is a string:
+ * * If the value of `urlObject.search`_does not start_ with the ASCII question
+ * mark (`?`) character, the literal string `?` is appended to `result`.
+ * * The value of `urlObject.search` is appended to `result`.
+ * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
+ * * If the `urlObject.hash` property is a string:
+ * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
+ * character, the literal string `#` is appended to `result`.
+ * * The value of `urlObject.hash` is appended to `result`.
+ * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
+ * string, an `Error` is thrown.
+ * * `result` is returned.
+ * @since v0.1.25
+ * @deprecated Legacy: Use the WHATWG URL API instead.
+ * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
+ */
+ function format(urlObject: UrlObject | string): string;
+ /**
+ * The `url.resolve()` method resolves a target URL relative to a base URL in a
+ * manner similar to that of a web browser resolving an anchor tag.
+ *
+ * ```js
+ * const url = require('url');
+ * url.resolve('/one/two/three', 'four'); // '/one/two/four'
+ * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ *
+ * To achieve the same result using the WHATWG URL API:
+ *
+ * ```js
+ * function resolve(from, to) {
+ * const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
+ * if (resolvedUrl.protocol === 'resolve:') {
+ * // `from` is a relative URL.
+ * const { pathname, search, hash } = resolvedUrl;
+ * return pathname + search + hash;
+ * }
+ * return resolvedUrl.toString();
+ * }
+ *
+ * resolve('/one/two/three', 'four'); // '/one/two/four'
+ * resolve('http://example.com/', '/one'); // 'http://example.com/one'
+ * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
+ * ```
+ * @since v0.1.25
+ * @deprecated Legacy: Use the WHATWG URL API instead.
+ * @param from The base URL to use if `to` is a relative URL.
+ * @param to The target URL to resolve.
+ */
+ function resolve(from: string, to: string): string;
+ /**
+ * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
+ * invalid domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToUnicode}.
+ *
+ * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
+ *
+ * ```js
+ * import url from 'url';
+ *
+ * console.log(url.domainToASCII('español.com'));
+ * // Prints xn--espaol-zwa.com
+ * console.log(url.domainToASCII('中文.com'));
+ * // Prints xn--fiq228c.com
+ * console.log(url.domainToASCII('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToASCII(domain: string): string;
+ /**
+ * Returns the Unicode serialization of the `domain`. If `domain` is an invalid
+ * domain, the empty string is returned.
+ *
+ * It performs the inverse operation to {@link domainToASCII}.
+ *
+ * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
+ *
+ * ```js
+ * import url from 'url';
+ *
+ * console.log(url.domainToUnicode('xn--espaol-zwa.com'));
+ * // Prints español.com
+ * console.log(url.domainToUnicode('xn--fiq228c.com'));
+ * // Prints 中文.com
+ * console.log(url.domainToUnicode('xn--iñvalid.com'));
+ * // Prints an empty string
+ * ```
+ * @since v7.4.0, v6.13.0
+ */
+ function domainToUnicode(domain: string): string;
+ /**
+ * This function ensures the correct decodings of percent-encoded characters as
+ * well as ensuring a cross-platform valid absolute path string.
+ *
+ * ```js
+ * import { fileURLToPath } from 'url';
+ *
+ * const __filename = fileURLToPath(import.meta.url);
+ *
+ * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
+ * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
+ *
+ * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
+ * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
+ *
+ * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
+ * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
+ *
+ * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
+ * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param url The file URL string or URL object to convert to a path.
+ * @return The fully-resolved platform-specific Node.js file path.
+ */
+ function fileURLToPath(url: string | URL): string;
+ /**
+ * This function ensures that `path` is resolved absolutely, and that the URL
+ * control characters are correctly encoded when converting into a File URL.
+ *
+ * ```js
+ * import { pathToFileURL } from 'url';
+ *
+ * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
+ * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
+ *
+ * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
+ * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
+ * ```
+ * @since v10.12.0
+ * @param path The path to convert to a File URL.
+ * @return The file URL object.
+ */
+ function pathToFileURL(path: string): URL;
+ /**
+ * This utility function converts a URL object into an ordinary options object as
+ * expected by the `http.request()` and `https.request()` APIs.
+ *
+ * ```js
+ * import { urlToHttpOptions } from 'url';
+ * const myURL = new URL('https://a:b@測試?abc#foo');
+ *
+ * console.log(urlToHttpOptions(myURL));
+ * /*
+ * {
+ * protocol: 'https:',
+ * hostname: 'xn--g6w251d',
+ * hash: '#foo',
+ * search: '?abc',
+ * pathname: '/',
+ * path: '/?abc',
+ * href: 'https://a:b@xn--g6w251d/?abc#foo',
+ * auth: 'a:b'
+ * }
+ *
+ * ```
+ * @since v15.7.0, v14.18.0
+ * @param url The `WHATWG URL` object to convert to an options object.
+ * @return Options object
+ */
+ function urlToHttpOptions(url: URL): ClientRequestArgs;
+ interface URLFormatOptions {
+ auth?: boolean | undefined;
+ fragment?: boolean | undefined;
+ search?: boolean | undefined;
+ unicode?: boolean | undefined;
+ }
+ /**
+ * Browser-compatible `URL` class, implemented by following the WHATWG URL
+ * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
+ * The `URL` class is also available on the global object.
+ *
+ * In accordance with browser conventions, all properties of `URL` objects
+ * are implemented as getters and setters on the class prototype, rather than as
+ * data properties on the object itself. Thus, unlike `legacy urlObject` s,
+ * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
+ * return `true`.
+ * @since v7.0.0, v6.13.0
+ */
+ class URL {
+ /**
+ * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
+ *
+ * ```js
+ * const {
+ * Blob,
+ * resolveObjectURL,
+ * } = require('buffer');
+ *
+ * const blob = new Blob(['hello']);
+ * const id = URL.createObjectURL(blob);
+ *
+ * // later...
+ *
+ * const otherBlob = resolveObjectURL(id);
+ * console.log(otherBlob.size);
+ * ```
+ *
+ * The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it.
+ *
+ * `Blob` objects are registered within the current thread. If using Worker
+ * Threads, `Blob` objects registered within one Worker will not be available
+ * to other workers or the main thread.
+ * @since v16.7.0
+ * @experimental
+ */
+ static createObjectURL(blob: Blob): string;
+ /**
+ * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
+ * ID that isn’t registered will silently fail.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ static revokeObjectURL(objectUrl: string): void;
+ constructor(input: string, base?: string | URL);
+ /**
+ * Gets and sets the fragment portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo#bar');
+ * console.log(myURL.hash);
+ * // Prints #bar
+ *
+ * myURL.hash = 'baz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo#baz
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `hash` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ hash: string;
+ /**
+ * Gets and sets the host portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.host);
+ * // Prints example.org:81
+ *
+ * myURL.host = 'example.com:82';
+ * console.log(myURL.href);
+ * // Prints https://example.com:82/foo
+ * ```
+ *
+ * Invalid host values assigned to the `host` property are ignored.
+ */
+ host: string;
+ /**
+ * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
+ * port.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:81/foo');
+ * console.log(myURL.hostname);
+ * // Prints example.org
+ *
+ * // Setting the hostname does not change the port
+ * myURL.hostname = 'example.com:82';
+ * console.log(myURL.href);
+ * // Prints https://example.com:81/foo
+ *
+ * // Use myURL.host to change the hostname and port
+ * myURL.host = 'example.org:82';
+ * console.log(myURL.href);
+ * // Prints https://example.org:82/foo
+ * ```
+ *
+ * Invalid host name values assigned to the `hostname` property are ignored.
+ */
+ hostname: string;
+ /**
+ * Gets and sets the serialized URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo');
+ * console.log(myURL.href);
+ * // Prints https://example.org/foo
+ *
+ * myURL.href = 'https://example.com/bar';
+ * console.log(myURL.href);
+ * // Prints https://example.com/bar
+ * ```
+ *
+ * Getting the value of the `href` property is equivalent to calling {@link toString}.
+ *
+ * Setting the value of this property to a new value is equivalent to creating a
+ * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
+ *
+ * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
+ */
+ href: string;
+ /**
+ * Gets the read-only serialization of the URL's origin.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/foo/bar?baz');
+ * console.log(myURL.origin);
+ * // Prints https://example.org
+ * ```
+ *
+ * ```js
+ * const idnURL = new URL('https://測試');
+ * console.log(idnURL.origin);
+ * // Prints https://xn--g6w251d
+ *
+ * console.log(idnURL.hostname);
+ * // Prints xn--g6w251d
+ * ```
+ */
+ readonly origin: string;
+ /**
+ * Gets and sets the password portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.password);
+ * // Prints xyz
+ *
+ * myURL.password = '123';
+ * console.log(myURL.href);
+ * // Prints https://abc:123@example.com
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `password` property
+ * are `percent-encoded`. The selection of which characters to
+ * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ password: string;
+ /**
+ * Gets and sets the path portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc/xyz?123');
+ * console.log(myURL.pathname);
+ * // Prints /abc/xyz
+ *
+ * myURL.pathname = '/abcdef';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abcdef?123
+ * ```
+ *
+ * Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters
+ * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ pathname: string;
+ /**
+ * Gets and sets the port portion of the URL.
+ *
+ * The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will
+ * result in the `port` value becoming
+ * the empty string (`''`).
+ *
+ * The port value can be an empty string in which case the port depends on
+ * the protocol/scheme:
+ *
+ * <omitted>
+ *
+ * Upon assigning a value to the port, the value will first be converted to a
+ * string using `.toString()`.
+ *
+ * If that string is invalid but it begins with a number, the leading number is
+ * assigned to `port`.
+ * If the number lies outside the range denoted above, it is ignored.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org:8888');
+ * console.log(myURL.port);
+ * // Prints 8888
+ *
+ * // Default ports are automatically transformed to the empty string
+ * // (HTTPS protocol's default port is 443)
+ * myURL.port = '443';
+ * console.log(myURL.port);
+ * // Prints the empty string
+ * console.log(myURL.href);
+ * // Prints https://example.org/
+ *
+ * myURL.port = 1234;
+ * console.log(myURL.port);
+ * // Prints 1234
+ * console.log(myURL.href);
+ * // Prints https://example.org:1234/
+ *
+ * // Completely invalid port strings are ignored
+ * myURL.port = 'abcd';
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Leading numbers are treated as a port number
+ * myURL.port = '5678abcd';
+ * console.log(myURL.port);
+ * // Prints 5678
+ *
+ * // Non-integers are truncated
+ * myURL.port = 1234.5678;
+ * console.log(myURL.port);
+ * // Prints 1234
+ *
+ * // Out-of-range numbers which are not represented in scientific notation
+ * // will be ignored.
+ * myURL.port = 1e10; // 10000000000, will be range-checked as described below
+ * console.log(myURL.port);
+ * // Prints 1234
+ * ```
+ *
+ * Numbers which contain a decimal point,
+ * such as floating-point numbers or numbers in scientific notation,
+ * are not an exception to this rule.
+ * Leading numbers up to the decimal point will be set as the URL's port,
+ * assuming they are valid:
+ *
+ * ```js
+ * myURL.port = 4.567e21;
+ * console.log(myURL.port);
+ * // Prints 4 (because it is the leading number in the string '4.567e21')
+ * ```
+ */
+ port: string;
+ /**
+ * Gets and sets the protocol portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org');
+ * console.log(myURL.protocol);
+ * // Prints https:
+ *
+ * myURL.protocol = 'ftp';
+ * console.log(myURL.href);
+ * // Prints ftp://example.org/
+ * ```
+ *
+ * Invalid URL protocol values assigned to the `protocol` property are ignored.
+ */
+ protocol: string;
+ /**
+ * Gets and sets the serialized query portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/abc?123');
+ * console.log(myURL.search);
+ * // Prints ?123
+ *
+ * myURL.search = 'abc=xyz';
+ * console.log(myURL.href);
+ * // Prints https://example.org/abc?abc=xyz
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ search: string;
+ /**
+ * Gets the `URLSearchParams` object representing the query parameters of the
+ * URL. This property is read-only but the `URLSearchParams` object it provides
+ * can be used to mutate the URL instance; to replace the entirety of query
+ * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
+ *
+ * Use care when using `.searchParams` to modify the `URL` because,
+ * per the WHATWG specification, the `URLSearchParams` object uses
+ * different rules to determine which characters to percent-encode. For
+ * instance, the `URL` object will not percent encode the ASCII tilde (`~`)
+ * character, while `URLSearchParams` will always encode it:
+ *
+ * ```js
+ * const myUrl = new URL('https://example.org/abc?foo=~bar');
+ *
+ * console.log(myUrl.search); // prints ?foo=~bar
+ *
+ * // Modify the URL via searchParams...
+ * myUrl.searchParams.sort();
+ *
+ * console.log(myUrl.search); // prints ?foo=%7Ebar
+ * ```
+ */
+ readonly searchParams: URLSearchParams;
+ /**
+ * Gets and sets the username portion of the URL.
+ *
+ * ```js
+ * const myURL = new URL('https://abc:xyz@example.com');
+ * console.log(myURL.username);
+ * // Prints abc
+ *
+ * myURL.username = '123';
+ * console.log(myURL.href);
+ * // Prints https://123:xyz@example.com/
+ * ```
+ *
+ * Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which
+ * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
+ */
+ username: string;
+ /**
+ * The `toString()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toJSON}.
+ */
+ toString(): string;
+ /**
+ * The `toJSON()` method on the `URL` object returns the serialized URL. The
+ * value returned is equivalent to that of {@link href} and {@link toString}.
+ *
+ * This method is automatically called when an `URL` object is serialized
+ * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
+ *
+ * ```js
+ * const myURLs = [
+ * new URL('https://www.example.com'),
+ * new URL('https://test.example.org'),
+ * ];
+ * console.log(JSON.stringify(myURLs));
+ * // Prints ["https://www.example.com/","https://test.example.org/"]
+ * ```
+ */
+ toJSON(): string;
+ }
+ /**
+ * The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the
+ * four following constructors.
+ * The `URLSearchParams` class is also available on the global object.
+ *
+ * The WHATWG `URLSearchParams` interface and the `querystring` module have
+ * similar purpose, but the purpose of the `querystring` module is more
+ * general, as it allows the customization of delimiter characters (`&#x26;` and `=`).
+ * On the other hand, this API is designed purely for URL query strings.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?abc=123');
+ * console.log(myURL.searchParams.get('abc'));
+ * // Prints 123
+ *
+ * myURL.searchParams.append('abc', 'xyz');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?abc=123&#x26;abc=xyz
+ *
+ * myURL.searchParams.delete('abc');
+ * myURL.searchParams.set('a', 'b');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ *
+ * const newSearchParams = new URLSearchParams(myURL.searchParams);
+ * // The above is equivalent to
+ * // const newSearchParams = new URLSearchParams(myURL.search);
+ *
+ * newSearchParams.append('a', 'c');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b
+ * console.log(newSearchParams.toString());
+ * // Prints a=b&#x26;a=c
+ *
+ * // newSearchParams.toString() is implicitly called
+ * myURL.search = newSearchParams;
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * newSearchParams.delete('a');
+ * console.log(myURL.href);
+ * // Prints https://example.org/?a=b&#x26;a=c
+ * ```
+ * @since v7.5.0, v6.13.0
+ */
+ class URLSearchParams implements Iterable<[string, string]> {
+ constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
+ /**
+ * Append a new name-value pair to the query string.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Remove all name-value pairs whose name is `name`.
+ */
+ delete(name: string): void;
+ /**
+ * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
+ * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
+ *
+ * Alias for `urlSearchParams[@@iterator]()`.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Iterates over each name-value pair in the query and invokes the given function.
+ *
+ * ```js
+ * const myURL = new URL('https://example.org/?a=b&#x26;c=d');
+ * myURL.searchParams.forEach((value, name, searchParams) => {
+ * console.log(name, value, myURL.searchParams === searchParams);
+ * });
+ * // Prints:
+ * // a b true
+ * // c d true
+ * ```
+ * @param fn Invoked for each name-value pair in the query
+ * @param thisArg To be used as `this` value for when `fn` is called
+ */
+ forEach<TThis = this>(callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: TThis): void;
+ /**
+ * Returns the value of the first name-value pair whose name is `name`. If there
+ * are no such pairs, `null` is returned.
+ * @return or `null` if there is no name-value pair with the given `name`.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns the values of all name-value pairs whose name is `name`. If there are
+ * no such pairs, an empty array is returned.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns `true` if there is at least one name-value pair whose name is `name`.
+ */
+ has(name: string): boolean;
+ /**
+ * Returns an ES6 `Iterator` over the names of each name-value pair.
+ *
+ * ```js
+ * const params = new URLSearchParams('foo=bar&#x26;foo=baz');
+ * for (const name of params.keys()) {
+ * console.log(name);
+ * }
+ * // Prints:
+ * // foo
+ * // foo
+ * ```
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
+ * set the first such pair's value to `value` and remove all others. If not,
+ * append the name-value pair to the query string.
+ *
+ * ```js
+ * const params = new URLSearchParams();
+ * params.append('foo', 'bar');
+ * params.append('foo', 'baz');
+ * params.append('abc', 'def');
+ * console.log(params.toString());
+ * // Prints foo=bar&#x26;foo=baz&#x26;abc=def
+ *
+ * params.set('foo', 'def');
+ * params.set('xyz', 'opq');
+ * console.log(params.toString());
+ * // Prints foo=def&#x26;abc=def&#x26;xyz=opq
+ * ```
+ */
+ set(name: string, value: string): void;
+ /**
+ * Sort all existing name-value pairs in-place by their names. Sorting is done
+ * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
+ * with the same name is preserved.
+ *
+ * This method can be used, in particular, to increase cache hits.
+ *
+ * ```js
+ * const params = new URLSearchParams('query[]=abc&#x26;type=search&#x26;query[]=123');
+ * params.sort();
+ * console.log(params.toString());
+ * // Prints query%5B%5D=abc&#x26;query%5B%5D=123&#x26;type=search
+ * ```
+ * @since v7.7.0, v6.13.0
+ */
+ sort(): void;
+ /**
+ * Returns the search parameters serialized as a string, with characters
+ * percent-encoded where necessary.
+ */
+ toString(): string;
+ /**
+ * Returns an ES6 `Iterator` over the values of each name-value pair.
+ */
+ values(): IterableIterator<string>;
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ }
+ import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
+ global {
+ interface URLSearchParams extends _URLSearchParams {}
+ interface URL extends _URL {}
+ interface Global {
+ URL: typeof _URL;
+ URLSearchParams: typeof _URLSearchParams;
+ }
+ /**
+ * `URL` class is a global reference for `require('url').URL`
+ * https://nodejs.org/api/url.html#the-whatwg-url-api
+ * @since v10.0.0
+ */
+ var URL: typeof globalThis extends {
+ onmessage: any;
+ URL: infer URL;
+ }
+ ? URL
+ : typeof _URL;
+ /**
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
+ * https://nodejs.org/api/url.html#class-urlsearchparams
+ * @since v10.0.0
+ */
+ var URLSearchParams: typeof globalThis extends {
+ onmessage: any;
+ URLSearchParams: infer URLSearchParams;
+ }
+ ? URLSearchParams
+ : typeof _URLSearchParams;
+ }
+}
+declare module 'node:url' {
+ export * from 'url';
+}
diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts
new file mode 100755
index 0000000..a081325
--- /dev/null
+++ b/node_modules/@types/node/util.d.ts
@@ -0,0 +1,1792 @@
+/**
+ * The `util` module supports the needs of Node.js internal APIs. Many of the
+ * utilities are useful for application and module developers as well. To access
+ * it:
+ *
+ * ```js
+ * const util = require('util');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/util.js)
+ */
+declare module 'util' {
+ import * as types from 'node:util/types';
+ export interface InspectOptions {
+ /**
+ * If set to `true`, getters are going to be
+ * inspected as well. If set to `'get'` only getters without setter are going
+ * to be inspected. If set to `'set'` only getters having a corresponding
+ * setter are going to be inspected. This might cause side effects depending on
+ * the getter function.
+ * @default `false`
+ */
+ getters?: 'get' | 'set' | boolean | undefined;
+ showHidden?: boolean | undefined;
+ /**
+ * @default 2
+ */
+ depth?: number | null | undefined;
+ colors?: boolean | undefined;
+ customInspect?: boolean | undefined;
+ showProxy?: boolean | undefined;
+ maxArrayLength?: number | null | undefined;
+ /**
+ * Specifies the maximum number of characters to
+ * include when formatting. Set to `null` or `Infinity` to show all elements.
+ * Set to `0` or negative to show no characters.
+ * @default 10000
+ */
+ maxStringLength?: number | null | undefined;
+ breakLength?: number | undefined;
+ /**
+ * Setting this to `false` causes each object key
+ * to be displayed on a new line. It will also add new lines to text that is
+ * longer than `breakLength`. If set to a number, the most `n` inner elements
+ * are united on a single line as long as all properties fit into
+ * `breakLength`. Short array elements are also grouped together. Note that no
+ * text will be reduced below 16 characters, no matter the `breakLength` size.
+ * For more information, see the example below.
+ * @default `true`
+ */
+ compact?: boolean | number | undefined;
+ sorted?: boolean | ((a: string, b: string) => number) | undefined;
+ }
+ export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
+ export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
+ export interface InspectOptionsStylized extends InspectOptions {
+ stylize(text: string, styleType: Style): string;
+ }
+ /**
+ * The `util.format()` method returns a formatted string using the first argument
+ * as a `printf`\-like format string which can contain zero or more format
+ * specifiers. Each specifier is replaced with the converted value from the
+ * corresponding argument. Supported specifiers are:
+ *
+ * If a specifier does not have a corresponding argument, it is not replaced:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo');
+ * // Returns: 'foo:%s'
+ * ```
+ *
+ * Values that are not part of the format string are formatted using`util.inspect()` if their type is not `string`.
+ *
+ * If there are more arguments passed to the `util.format()` method than the
+ * number of specifiers, the extra arguments are concatenated to the returned
+ * string, separated by spaces:
+ *
+ * ```js
+ * util.format('%s:%s', 'foo', 'bar', 'baz');
+ * // Returns: 'foo:bar baz'
+ * ```
+ *
+ * If the first argument does not contain a valid format specifier, `util.format()`returns a string that is the concatenation of all arguments separated by spaces:
+ *
+ * ```js
+ * util.format(1, 2, 3);
+ * // Returns: '1 2 3'
+ * ```
+ *
+ * If only one argument is passed to `util.format()`, it is returned as it is
+ * without any formatting:
+ *
+ * ```js
+ * util.format('%% %s');
+ * // Returns: '%% %s'
+ * ```
+ *
+ * `util.format()` is a synchronous method that is intended as a debugging tool.
+ * Some input values can have a significant performance overhead that can block the
+ * event loop. Use this function with care and never in a hot code path.
+ * @since v0.5.3
+ * @param format A `printf`-like format string.
+ */
+ export function format(format?: any, ...param: any[]): string;
+ /**
+ * This function is identical to {@link format}, except in that it takes
+ * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
+ *
+ * ```js
+ * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });
+ * // Returns 'See object { foo: 42 }', where `42` is colored as a number
+ * // when printed to a terminal.
+ * ```
+ * @since v10.0.0
+ */
+ export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
+ /**
+ * Returns the string name for a numeric error code that comes from a Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const name = util.getSystemErrorName(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v9.7.0
+ */
+ export function getSystemErrorName(err: number): string;
+ /**
+ * Returns a Map of all system error codes available from the Node.js API.
+ * The mapping between error codes and error names is platform-dependent.
+ * See `Common System Errors` for the names of common errors.
+ *
+ * ```js
+ * fs.access('file/that/does/not/exist', (err) => {
+ * const errorMap = util.getSystemErrorMap();
+ * const name = errorMap.get(err.errno);
+ * console.error(name); // ENOENT
+ * });
+ * ```
+ * @since v16.0.0, v14.17.0
+ */
+ export function getSystemErrorMap(): Map<number, [string, string]>;
+ /**
+ * The `util.log()` method prints the given `string` to `stdout` with an included
+ * timestamp.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.log('Timestamped message.');
+ * ```
+ * @since v0.3.0
+ * @deprecated Since v6.0.0 - Use a third party module instead.
+ */
+ export function log(string: string): void;
+ /**
+ * Returns the `string` after replacing any surrogate code points
+ * (or equivalently, any unpaired surrogate code units) with the
+ * Unicode "replacement character" U+FFFD.
+ * @since v16.8.0, v14.18.0
+ */
+ export function toUSVString(string: string): string;
+ /**
+ * The `util.inspect()` method returns a string representation of `object` that is
+ * intended for debugging. The output of `util.inspect` may change at any time
+ * and should not be depended upon programmatically. Additional `options` may be
+ * passed that alter the result.`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make
+ * an identifiable tag for an inspected value.
+ *
+ * ```js
+ * class Foo {
+ * get [Symbol.toStringTag]() {
+ * return 'bar';
+ * }
+ * }
+ *
+ * class Bar {}
+ *
+ * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } });
+ *
+ * util.inspect(new Foo()); // 'Foo [bar] {}'
+ * util.inspect(new Bar()); // 'Bar {}'
+ * util.inspect(baz); // '[foo] {}'
+ * ```
+ *
+ * Circular references point to their anchor by using a reference index:
+ *
+ * ```js
+ * const { inspect } = require('util');
+ *
+ * const obj = {};
+ * obj.a = [obj];
+ * obj.b = {};
+ * obj.b.inner = obj.b;
+ * obj.b.obj = obj;
+ *
+ * console.log(inspect(obj));
+ * // <ref *1> {
+ * // a: [ [Circular *1] ],
+ * // b: <ref *2> { inner: [Circular *2], obj: [Circular *1] }
+ * // }
+ * ```
+ *
+ * The following example inspects all properties of the `util` object:
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * console.log(util.inspect(util, { showHidden: true, depth: null }));
+ * ```
+ *
+ * The following example highlights the effect of the `compact` option:
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * const o = {
+ * a: [1, 2, [[
+ * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' +
+ * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.',
+ * 'test',
+ * 'foo']], 4],
+ * b: new Map([['za', 1], ['zb', 'test']])
+ * };
+ * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 }));
+ *
+ * // { a:
+ * // [ 1,
+ * // 2,
+ * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line
+ * // 'test',
+ * // 'foo' ] ],
+ * // 4 ],
+ * // b: Map(2) { 'za' => 1, 'zb' => 'test' } }
+ *
+ * // Setting `compact` to false or an integer creates more reader friendly output.
+ * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 }));
+ *
+ * // {
+ * // a: [
+ * // 1,
+ * // 2,
+ * // [
+ * // [
+ * // 'Lorem ipsum dolor sit amet,\n' +
+ * // 'consectetur adipiscing elit, sed do eiusmod \n' +
+ * // 'tempor incididunt ut labore et dolore magna aliqua.',
+ * // 'test',
+ * // 'foo'
+ * // ]
+ * // ],
+ * // 4
+ * // ],
+ * // b: Map(2) {
+ * // 'za' => 1,
+ * // 'zb' => 'test'
+ * // }
+ * // }
+ *
+ * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a
+ * // single line.
+ * ```
+ *
+ * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and
+ * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be
+ * inspected. If there are more entries than `maxArrayLength`, there is no
+ * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may
+ * result in different output. Furthermore, entries
+ * with no remaining strong references may be garbage collected at any time.
+ *
+ * ```js
+ * const { inspect } = require('util');
+ *
+ * const obj = { a: 1 };
+ * const obj2 = { b: 2 };
+ * const weakSet = new WeakSet([obj, obj2]);
+ *
+ * console.log(inspect(weakSet, { showHidden: true }));
+ * // WeakSet { { a: 1 }, { b: 2 } }
+ * ```
+ *
+ * The `sorted` option ensures that an object's property insertion order does not
+ * impact the result of `util.inspect()`.
+ *
+ * ```js
+ * const { inspect } = require('util');
+ * const assert = require('assert');
+ *
+ * const o1 = {
+ * b: [2, 3, 1],
+ * a: '`a` comes before `b`',
+ * c: new Set([2, 3, 1])
+ * };
+ * console.log(inspect(o1, { sorted: true }));
+ * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } }
+ * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) }));
+ * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' }
+ *
+ * const o2 = {
+ * c: new Set([2, 1, 3]),
+ * a: '`a` comes before `b`',
+ * b: [2, 3, 1]
+ * };
+ * assert.strict.equal(
+ * inspect(o1, { sorted: true }),
+ * inspect(o2, { sorted: true })
+ * );
+ * ```
+ *
+ * The `numericSeparator` option adds an underscore every three digits to all
+ * numbers.
+ *
+ * ```js
+ * const { inspect } = require('util');
+ *
+ * const thousand = 1_000;
+ * const million = 1_000_000;
+ * const bigNumber = 123_456_789n;
+ * const bigDecimal = 1_234.123_45;
+ *
+ * console.log(thousand, million, bigNumber, bigDecimal);
+ * // 1_000 1_000_000 123_456_789n 1_234.123_45
+ * ```
+ *
+ * `util.inspect()` is a synchronous method intended for debugging. Its maximum
+ * output length is approximately 128 MB. Inputs that result in longer output will
+ * be truncated.
+ * @since v0.3.0
+ * @param object Any JavaScript primitive or `Object`.
+ * @return The representation of `object`.
+ */
+ export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
+ export function inspect(object: any, options?: InspectOptions): string;
+ export namespace inspect {
+ let colors: NodeJS.Dict<[number, number]>;
+ let styles: {
+ [K in Style]: string;
+ };
+ let defaultOptions: InspectOptions;
+ /**
+ * Allows changing inspect settings from the repl.
+ */
+ let replDefaults: InspectOptions;
+ /**
+ * That can be used to declare custom inspect functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray).
+ *
+ * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isArray([]);
+ * // Returns: true
+ * util.isArray(new Array());
+ * // Returns: true
+ * util.isArray({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use `isArray` instead.
+ */
+ export function isArray(object: unknown): object is unknown[];
+ /**
+ * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isRegExp(/some regexp/);
+ * // Returns: true
+ * util.isRegExp(new RegExp('another regexp'));
+ * // Returns: true
+ * util.isRegExp({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Deprecated
+ */
+ export function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isDate(new Date());
+ * // Returns: true
+ * util.isDate(Date());
+ * // false (without 'new' returns a String)
+ * util.isDate({});
+ * // Returns: false
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isDate} instead.
+ */
+ export function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the given `object` is an `Error`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isError(new Error());
+ * // Returns: true
+ * util.isError(new TypeError());
+ * // Returns: true
+ * util.isError({ name: 'Error', message: 'an error occurred' });
+ * // Returns: false
+ * ```
+ *
+ * This method relies on `Object.prototype.toString()` behavior. It is
+ * possible to obtain an incorrect result when the `object` argument manipulates`@@toStringTag`.
+ *
+ * ```js
+ * const util = require('util');
+ * const obj = { name: 'Error', message: 'an error occurred' };
+ *
+ * util.isError(obj);
+ * // Returns: false
+ * obj[Symbol.toStringTag] = 'Error';
+ * util.isError(obj);
+ * // Returns: true
+ * ```
+ * @since v0.6.0
+ * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead.
+ */
+ export function isError(object: unknown): object is Error;
+ /**
+ * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and`extends` keywords to get language level inheritance support. Also note
+ * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179).
+ *
+ * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The
+ * prototype of `constructor` will be set to a new object created from`superConstructor`.
+ *
+ * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`.
+ * As an additional convenience, `superConstructor` will be accessible
+ * through the `constructor.super_` property.
+ *
+ * ```js
+ * const util = require('util');
+ * const EventEmitter = require('events');
+ *
+ * function MyStream() {
+ * EventEmitter.call(this);
+ * }
+ *
+ * util.inherits(MyStream, EventEmitter);
+ *
+ * MyStream.prototype.write = function(data) {
+ * this.emit('data', data);
+ * };
+ *
+ * const stream = new MyStream();
+ *
+ * console.log(stream instanceof EventEmitter); // true
+ * console.log(MyStream.super_ === EventEmitter); // true
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('It works!'); // Received data: "It works!"
+ * ```
+ *
+ * ES6 example using `class` and `extends`:
+ *
+ * ```js
+ * const EventEmitter = require('events');
+ *
+ * class MyStream extends EventEmitter {
+ * write(data) {
+ * this.emit('data', data);
+ * }
+ * }
+ *
+ * const stream = new MyStream();
+ *
+ * stream.on('data', (data) => {
+ * console.log(`Received data: "${data}"`);
+ * });
+ * stream.write('With ES6');
+ * ```
+ * @since v0.3.0
+ * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead.
+ */
+ export function inherits(constructor: unknown, superConstructor: unknown): void;
+ export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
+ export interface DebugLogger extends DebugLoggerFunction {
+ enabled: boolean;
+ }
+ /**
+ * The `util.debuglog()` method is used to create a function that conditionally
+ * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that
+ * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op.
+ *
+ * ```js
+ * const util = require('util');
+ * const debuglog = util.debuglog('foo');
+ *
+ * debuglog('hello from foo [%d]', 123);
+ * ```
+ *
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then
+ * it will output something like:
+ *
+ * ```console
+ * FOO 3245: hello from foo [123]
+ * ```
+ *
+ * where `3245` is the process id. If it is not run with that
+ * environment variable set, then it will not print anything.
+ *
+ * The `section` supports wildcard also:
+ *
+ * ```js
+ * const util = require('util');
+ * const debuglog = util.debuglog('foo-bar');
+ *
+ * debuglog('hi there, it\'s foo-bar [%d]', 2333);
+ * ```
+ *
+ * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
+ * something like:
+ *
+ * ```console
+ * FOO-BAR 3257: hi there, it's foo-bar [2333]
+ * ```
+ *
+ * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`.
+ *
+ * The optional `callback` argument can be used to replace the logging function
+ * with a different function that doesn't have any initialization or
+ * unnecessary wrapping.
+ *
+ * ```js
+ * const util = require('util');
+ * let debuglog = util.debuglog('internals', (debug) => {
+ * // Replace with a logging function that optimizes out
+ * // testing if the section is enabled
+ * debuglog = debug;
+ * });
+ * ```
+ * @since v0.11.3
+ * @param section A string identifying the portion of the application for which the `debuglog` function is being created.
+ * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
+ * @return The logging function
+ */
+ export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
+ export const debug: typeof debuglog;
+ /**
+ * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isBoolean(1);
+ * // Returns: false
+ * util.isBoolean(0);
+ * // Returns: false
+ * util.isBoolean(false);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead.
+ */
+ export function isBoolean(object: unknown): object is boolean;
+ /**
+ * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isBuffer({ length: 0 });
+ * // Returns: false
+ * util.isBuffer([]);
+ * // Returns: false
+ * util.isBuffer(Buffer.from('hello world'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `isBuffer` instead.
+ */
+ export function isBuffer(object: unknown): object is Buffer;
+ /**
+ * Returns `true` if the given `object` is a `Function`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * function Foo() {}
+ * const Bar = () => {};
+ *
+ * util.isFunction({});
+ * // Returns: false
+ * util.isFunction(Foo);
+ * // Returns: true
+ * util.isFunction(Bar);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead.
+ */
+ export function isFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isNull(0);
+ * // Returns: false
+ * util.isNull(undefined);
+ * // Returns: false
+ * util.isNull(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === null` instead.
+ */
+ export function isNull(object: unknown): object is null;
+ /**
+ * Returns `true` if the given `object` is `null` or `undefined`. Otherwise,
+ * returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isNullOrUndefined(0);
+ * // Returns: false
+ * util.isNullOrUndefined(undefined);
+ * // Returns: true
+ * util.isNullOrUndefined(null);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead.
+ */
+ export function isNullOrUndefined(object: unknown): object is null | undefined;
+ /**
+ * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isNumber(false);
+ * // Returns: false
+ * util.isNumber(Infinity);
+ * // Returns: true
+ * util.isNumber(0);
+ * // Returns: true
+ * util.isNumber(NaN);
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead.
+ */
+ export function isNumber(object: unknown): object is number;
+ /**
+ * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript).
+ * Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isObject(5);
+ * // Returns: false
+ * util.isObject(null);
+ * // Returns: false
+ * util.isObject({});
+ * // Returns: true
+ * util.isObject(() => {});
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Deprecated: Use `value !== null && typeof value === 'object'` instead.
+ */
+ export function isObject(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isPrimitive(5);
+ * // Returns: true
+ * util.isPrimitive('foo');
+ * // Returns: true
+ * util.isPrimitive(false);
+ * // Returns: true
+ * util.isPrimitive(null);
+ * // Returns: true
+ * util.isPrimitive(undefined);
+ * // Returns: true
+ * util.isPrimitive({});
+ * // Returns: false
+ * util.isPrimitive(() => {});
+ * // Returns: false
+ * util.isPrimitive(/^$/);
+ * // Returns: false
+ * util.isPrimitive(new Date());
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead.
+ */
+ export function isPrimitive(object: unknown): boolean;
+ /**
+ * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isString('');
+ * // Returns: true
+ * util.isString('foo');
+ * // Returns: true
+ * util.isString(String('foo'));
+ * // Returns: true
+ * util.isString(5);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead.
+ */
+ export function isString(object: unknown): object is string;
+ /**
+ * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * util.isSymbol(5);
+ * // Returns: false
+ * util.isSymbol('foo');
+ * // Returns: false
+ * util.isSymbol(Symbol('foo'));
+ * // Returns: true
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead.
+ */
+ export function isSymbol(object: unknown): object is symbol;
+ /**
+ * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * const foo = undefined;
+ * util.isUndefined(5);
+ * // Returns: false
+ * util.isUndefined(foo);
+ * // Returns: true
+ * util.isUndefined(null);
+ * // Returns: false
+ * ```
+ * @since v0.11.5
+ * @deprecated Since v4.0.0 - Use `value === undefined` instead.
+ */
+ export function isUndefined(object: unknown): object is undefined;
+ /**
+ * The `util.deprecate()` method wraps `fn` (which may be a function or class) in
+ * such a way that it is marked as deprecated.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * exports.obsoleteFunction = util.deprecate(() => {
+ * // Do something here.
+ * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.');
+ * ```
+ *
+ * When called, `util.deprecate()` will return a function that will emit a`DeprecationWarning` using the `'warning'` event. The warning will
+ * be emitted and printed to `stderr` the first time the returned function is
+ * called. After the warning is emitted, the wrapped function is called without
+ * emitting a warning.
+ *
+ * If the same optional `code` is supplied in multiple calls to `util.deprecate()`,
+ * the warning will be emitted only once for that `code`.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001');
+ * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001');
+ * fn1(); // Emits a deprecation warning with code DEP0001
+ * fn2(); // Does not emit a deprecation warning because it has the same code
+ * ```
+ *
+ * If either the `--no-deprecation` or `--no-warnings` command-line flags are
+ * used, or if the `process.noDeprecation` property is set to `true`_prior_ to
+ * the first deprecation warning, the `util.deprecate()` method does nothing.
+ *
+ * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set,
+ * or the `process.traceDeprecation` property is set to `true`, a warning and a
+ * stack trace are printed to `stderr` the first time the deprecated function is
+ * called.
+ *
+ * If the `--throw-deprecation` command-line flag is set, or the`process.throwDeprecation` property is set to `true`, then an exception will be
+ * thrown when the deprecated function is called.
+ *
+ * The `--throw-deprecation` command-line flag and `process.throwDeprecation`property take precedence over `--trace-deprecation` and`process.traceDeprecation`.
+ * @since v0.8.0
+ * @param fn The function that is being deprecated.
+ * @param msg A warning message to display when the deprecated function is invoked.
+ * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
+ * @return The deprecated function wrapped to emit a warning.
+ */
+ export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T;
+ /**
+ * Returns `true` if there is deep strict equality between `val1` and `val2`.
+ * Otherwise, returns `false`.
+ *
+ * See `assert.deepStrictEqual()` for more information about deep strict
+ * equality.
+ * @since v9.0.0
+ */
+ export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean;
+ /**
+ * Returns `str` with any ANSI escape codes removed.
+ *
+ * ```js
+ * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m'));
+ * // Prints "value"
+ * ```
+ * @since v16.11.0
+ */
+ export function stripVTControlCharacters(str: string): string;
+ /**
+ * Takes an `async` function (or a function that returns a `Promise`) and returns a
+ * function following the error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument. In the callback, the
+ * first argument will be the rejection reason (or `null` if the `Promise`resolved), and the second argument will be the resolved value.
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * async function fn() {
+ * return 'hello world';
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * if (err) throw err;
+ * console.log(ret);
+ * });
+ * ```
+ *
+ * Will print:
+ *
+ * ```text
+ * hello world
+ * ```
+ *
+ * The callback is executed asynchronously, and will have a limited stack trace.
+ * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit.
+ *
+ * Since `null` has a special meaning as the first argument to a callback, if a
+ * wrapped function rejects a `Promise` with a falsy value as a reason, the value
+ * is wrapped in an `Error` with the original value stored in a field named`reason`.
+ *
+ * ```js
+ * function fn() {
+ * return Promise.reject(null);
+ * }
+ * const callbackFunction = util.callbackify(fn);
+ *
+ * callbackFunction((err, ret) => {
+ * // When the Promise was rejected with `null` it is wrapped with an Error and
+ * // the original value is stored in `reason`.
+ * err &#x26;&#x26; Object.hasOwn(err, 'reason') &#x26;&#x26; err.reason === null; // true
+ * });
+ * ```
+ * @since v8.2.0
+ * @param original An `async` function
+ * @return a callback style function
+ */
+ export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
+ export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
+ __promisify__: TCustom;
+ }
+ export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
+ [promisify.custom]: TCustom;
+ }
+ export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
+ /**
+ * Takes a function following the common error-first callback style, i.e. taking
+ * an `(err, value) => ...` callback as the last argument, and returns a version
+ * that returns promises.
+ *
+ * ```js
+ * const util = require('util');
+ * const fs = require('fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ * stat('.').then((stats) => {
+ * // Do something with `stats`
+ * }).catch((error) => {
+ * // Handle the error.
+ * });
+ * ```
+ *
+ * Or, equivalently using `async function`s:
+ *
+ * ```js
+ * const util = require('util');
+ * const fs = require('fs');
+ *
+ * const stat = util.promisify(fs.stat);
+ *
+ * async function callStat() {
+ * const stats = await stat('.');
+ * console.log(`This directory is owned by ${stats.uid}`);
+ * }
+ * ```
+ *
+ * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`.
+ *
+ * `promisify()` assumes that `original` is a function taking a callback as its
+ * final argument in all cases. If `original` is not a function, `promisify()`will throw an error. If `original` is a function but its last argument is not
+ * an error-first callback, it will still be passed an error-first
+ * callback as its last argument.
+ *
+ * Using `promisify()` on class methods or other methods that use `this` may not
+ * work as expected unless handled specially:
+ *
+ * ```js
+ * const util = require('util');
+ *
+ * class Foo {
+ * constructor() {
+ * this.a = 42;
+ * }
+ *
+ * bar(callback) {
+ * callback(null, this.a);
+ * }
+ * }
+ *
+ * const foo = new Foo();
+ *
+ * const naiveBar = util.promisify(foo.bar);
+ * // TypeError: Cannot read property 'a' of undefined
+ * // naiveBar().then(a => console.log(a));
+ *
+ * naiveBar.call(foo).then((a) => console.log(a)); // '42'
+ *
+ * const bindBar = naiveBar.bind(foo);
+ * bindBar().then((a) => console.log(a)); // '42'
+ * ```
+ * @since v8.0.0
+ */
+ export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
+ export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
+ export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
+ export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
+ export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
+ export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
+ export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
+ export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
+ export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
+ export function promisify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
+ export function promisify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
+ export function promisify(fn: Function): Function;
+ export namespace promisify {
+ /**
+ * That can be used to declare custom promisified variants of functions.
+ */
+ const custom: unique symbol;
+ }
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
+ *
+ * ```js
+ * const decoder = new TextDecoder();
+ * const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
+ * console.log(decoder.decode(u8arr)); // Hello
+ * ```
+ * @since v8.3.0
+ */
+ export class TextDecoder {
+ /**
+ * The encoding supported by the `TextDecoder` instance.
+ */
+ readonly encoding: string;
+ /**
+ * The value will be `true` if decoding errors result in a `TypeError` being
+ * thrown.
+ */
+ readonly fatal: boolean;
+ /**
+ * The value will be `true` if the decoding result will include the byte order
+ * mark.
+ */
+ readonly ignoreBOM: boolean;
+ constructor(
+ encoding?: string,
+ options?: {
+ fatal?: boolean | undefined;
+ ignoreBOM?: boolean | undefined;
+ }
+ );
+ /**
+ * Decodes the `input` and returns a string. If `options.stream` is `true`, any
+ * incomplete byte sequences occurring at the end of the `input` are buffered
+ * internally and emitted after the next call to `textDecoder.decode()`.
+ *
+ * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a`TypeError` being thrown.
+ * @param input An `ArrayBuffer`, `DataView` or `TypedArray` instance containing the encoded data.
+ */
+ decode(
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
+ options?: {
+ stream?: boolean | undefined;
+ }
+ ): string;
+ }
+ export interface EncodeIntoResult {
+ /**
+ * The read Unicode code units of input.
+ */
+ read: number;
+ /**
+ * The written UTF-8 bytes of output.
+ */
+ written: number;
+ }
+ export { types };
+ /**
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
+ * instances of `TextEncoder` only support UTF-8 encoding.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const uint8array = encoder.encode('this is some data');
+ * ```
+ *
+ * The `TextEncoder` class is also available on the global object.
+ * @since v8.3.0
+ */
+ export class TextEncoder {
+ /**
+ * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`.
+ */
+ readonly encoding: string;
+ /**
+ * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the
+ * encoded bytes.
+ * @param [input='an empty string'] The text to encode.
+ */
+ encode(input?: string): Uint8Array;
+ /**
+ * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
+ * containing the read Unicode code units and written UTF-8 bytes.
+ *
+ * ```js
+ * const encoder = new TextEncoder();
+ * const src = 'this is some data';
+ * const dest = new Uint8Array(10);
+ * const { read, written } = encoder.encodeInto(src, dest);
+ * ```
+ * @param src The text to encode.
+ * @param dest The array to hold the encode result.
+ */
+ encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
+ }
+
+ /**
+ * Provides a high-level API for command-line argument parsing. Takes a
+ * specification for the expected arguments and returns a structured object
+ * with the parsed values and positionals.
+ *
+ * `config` provides arguments for parsing and configures the parser. It
+ * supports the following properties:
+ *
+ * - `args` The array of argument strings. **Default:** `process.argv` with
+ * `execPath` and `filename` removed.
+ * - `options` Arguments known to the parser. Keys of `options` are the long
+ * names of options and values are objects accepting the following properties:
+ *
+ * - `type` Type of argument, which must be either `boolean` (for options
+ * which do not take values) or `string` (for options which do).
+ * - `multiple` Whether this option can be provided multiple
+ * times. If `true`, all values will be collected in an array. If
+ * `false`, values for the option are last-wins. **Default:** `false`.
+ * - `short` A single character alias for the option.
+ *
+ * - `strict`: Whether an error should be thrown when unknown arguments
+ * are encountered, or when arguments are passed that do not match the
+ * `type` configured in `options`. **Default:** `true`.
+ * - `allowPositionals`: Whether this command accepts positional arguments.
+ * **Default:** `false` if `strict` is `true`, otherwise `true`.
+ * - `tokens`: Whether tokens {boolean} Return the parsed tokens. This is useful
+ * for extending the built-in behavior, from adding additional checks through
+ * to reprocessing the tokens in different ways.
+ * **Default:** `false`.
+ *
+ * @returns The parsed command line arguments:
+ *
+ * - `values` A mapping of parsed option names with their string
+ * or boolean values.
+ * - `positionals` Positional arguments.
+ * - `tokens` Detailed parse information (only if `tokens` was specified).
+ *
+ */
+ export function parseArgs<T extends ParseArgsConfig>(config: T): ParsedResults<T>;
+
+ interface ParseArgsOptionConfig {
+ type: 'string' | 'boolean';
+ short?: string;
+ multiple?: boolean;
+ }
+
+ interface ParseArgsOptionsConfig {
+ [longOption: string]: ParseArgsOptionConfig;
+ }
+
+ export interface ParseArgsConfig {
+ strict?: boolean;
+ allowPositionals?: boolean;
+ tokens?: boolean;
+ options?: ParseArgsOptionsConfig;
+ args?: string[];
+ }
+
+ /*
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
+ This is technically incorrect but is a much nicer UX for the common case.
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
+ */
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
+ ? IfTrue
+ : T extends false
+ ? IfFalse
+ : IfTrue;
+
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
+ ? IfFalse
+ : T extends true
+ ? IfTrue
+ : IfFalse;
+
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
+ T['strict'],
+ O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean,
+ string | boolean
+ >;
+
+ type ParsedValues<T extends ParseArgsConfig> =
+ & IfDefaultsTrue<T['strict'], unknown, { [longOption: string]: undefined | string | boolean }>
+ & (T['options'] extends ParseArgsOptionsConfig
+ ? {
+ -readonly [LongOption in keyof T['options']]: IfDefaultsFalse<
+ T['options'][LongOption]['multiple'],
+ undefined | Array<ExtractOptionValue<T, T['options'][LongOption]>>,
+ undefined | ExtractOptionValue<T, T['options'][LongOption]>
+ >;
+ }
+ : {});
+
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], string[], []>,
+ IfDefaultsTrue<T['allowPositionals'], string[], []>
+ >;
+
+ type PreciseTokenForOptions<
+ K extends string,
+ O extends ParseArgsOptionConfig,
+ > = O['type'] extends 'string'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: string;
+ inlineValue: boolean;
+ }
+ : O['type'] extends 'boolean'
+ ? {
+ kind: 'option';
+ index: number;
+ name: K;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ }
+ : OptionToken & { name: K };
+
+ type TokenForOptions<
+ T extends ParseArgsConfig,
+ K extends keyof T['options'] = keyof T['options'],
+ > = K extends unknown
+ ? T['options'] extends ParseArgsOptionsConfig
+ ? PreciseTokenForOptions<K & string, T['options'][K]>
+ : OptionToken
+ : never;
+
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
+
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
+ T['strict'],
+ IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
+ IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
+ >;
+
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
+ >;
+
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
+ T['tokens'],
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ tokens: ParsedTokens<T>;
+ },
+ {
+ values: ParsedValues<T>;
+ positionals: ParsedPositionals<T>;
+ }
+ >;
+
+ type OptionToken =
+ | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
+ | {
+ kind: 'option';
+ index: number;
+ name: string;
+ rawName: string;
+ value: undefined;
+ inlineValue: undefined;
+ };
+
+ type Token =
+ | OptionToken
+ | { kind: 'positional'; index: number; value: string }
+ | { kind: 'option-terminator'; index: number };
+
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
+ ? {
+ values: { [longOption: string]: undefined | string | boolean | Array<string | boolean> };
+ positionals: string[];
+ tokens?: Token[];
+ }
+ : PreciseParsedResults<T>;
+}
+declare module 'util/types' {
+ export * from 'util/types';
+}
+declare module 'util/types' {
+ import { KeyObject, webcrypto } from 'node:crypto';
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
+ * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ *
+ * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`.
+ *
+ * ```js
+ * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
+ /**
+ * Returns `true` if the value is an `arguments` object.
+ *
+ * ```js
+ * function foo() {
+ * util.types.isArgumentsObject(arguments); // Returns true
+ * }
+ * ```
+ * @since v10.0.0
+ */
+ function isArgumentsObject(object: unknown): object is IArguments;
+ /**
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance.
+ * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true
+ * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBuffer(object: unknown): object is ArrayBuffer;
+ /**
+ * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed
+ * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to
+ * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ *
+ * ```js
+ * util.types.isArrayBufferView(new Int8Array()); // true
+ * util.types.isArrayBufferView(Buffer.from('hello world')); // true
+ * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true
+ * util.types.isArrayBufferView(new ArrayBuffer()); // false
+ * ```
+ * @since v10.0.0
+ */
+ function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
+ /**
+ * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isAsyncFunction(function foo() {}); // Returns false
+ * util.types.isAsyncFunction(async function foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isAsyncFunction(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a `BigInt64Array` instance.
+ *
+ * ```js
+ * util.types.isBigInt64Array(new BigInt64Array()); // Returns true
+ * util.types.isBigInt64Array(new BigUint64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBigInt64Array(value: unknown): value is BigInt64Array;
+ /**
+ * Returns `true` if the value is a `BigUint64Array` instance.
+ *
+ * ```js
+ * util.types.isBigUint64Array(new BigInt64Array()); // Returns false
+ * util.types.isBigUint64Array(new BigUint64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isBigUint64Array(value: unknown): value is BigUint64Array;
+ /**
+ * Returns `true` if the value is a boolean object, e.g. created
+ * by `new Boolean()`.
+ *
+ * ```js
+ * util.types.isBooleanObject(false); // Returns false
+ * util.types.isBooleanObject(true); // Returns false
+ * util.types.isBooleanObject(new Boolean(false)); // Returns true
+ * util.types.isBooleanObject(new Boolean(true)); // Returns true
+ * util.types.isBooleanObject(Boolean(false)); // Returns false
+ * util.types.isBooleanObject(Boolean(true)); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isBooleanObject(object: unknown): object is Boolean;
+ /**
+ * Returns `true` if the value is any boxed primitive object, e.g. created
+ * by `new Boolean()`, `new String()` or `Object(Symbol())`.
+ *
+ * For example:
+ *
+ * ```js
+ * util.types.isBoxedPrimitive(false); // Returns false
+ * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true
+ * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false
+ * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true
+ * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true
+ * ```
+ * @since v10.11.0
+ */
+ function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance.
+ *
+ * ```js
+ * const ab = new ArrayBuffer(20);
+ * util.types.isDataView(new DataView(ab)); // Returns true
+ * util.types.isDataView(new Float64Array()); // Returns false
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isDataView(object: unknown): object is DataView;
+ /**
+ * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
+ *
+ * ```js
+ * util.types.isDate(new Date()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isDate(object: unknown): object is Date;
+ /**
+ * Returns `true` if the value is a native `External` value.
+ *
+ * A native `External` value is a special type of object that contains a
+ * raw C++ pointer (`void*`) for access from native code, and has no other
+ * properties. Such objects are created either by Node.js internals or native
+ * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype.
+ *
+ * ```c
+ * #include <js_native_api.h>
+ * #include <stdlib.h>
+ * napi_value result;
+ * static napi_value MyNapi(napi_env env, napi_callback_info info) {
+ * int* raw = (int*) malloc(1024);
+ * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &#x26;result);
+ * if (status != napi_ok) {
+ * napi_throw_error(env, NULL, "napi_create_external failed");
+ * return NULL;
+ * }
+ * return result;
+ * }
+ * ...
+ * DECLARE_NAPI_PROPERTY("myNapi", MyNapi)
+ * ...
+ * ```
+ *
+ * ```js
+ * const native = require('napi_addon.node');
+ * const data = native.myNapi();
+ * util.types.isExternal(data); // returns true
+ * util.types.isExternal(0); // returns false
+ * util.types.isExternal(new String('foo')); // returns false
+ * ```
+ *
+ * For further information on `napi_create_external`, refer to `napi_create_external()`.
+ * @since v10.0.0
+ */
+ function isExternal(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance.
+ *
+ * ```js
+ * util.types.isFloat32Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat32Array(new Float32Array()); // Returns true
+ * util.types.isFloat32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat32Array(object: unknown): object is Float32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance.
+ *
+ * ```js
+ * util.types.isFloat64Array(new ArrayBuffer()); // Returns false
+ * util.types.isFloat64Array(new Uint8Array()); // Returns false
+ * util.types.isFloat64Array(new Float64Array()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isFloat64Array(object: unknown): object is Float64Array;
+ /**
+ * Returns `true` if the value is a generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * util.types.isGeneratorFunction(function foo() {}); // Returns false
+ * util.types.isGeneratorFunction(function* foo() {}); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorFunction(object: unknown): object is GeneratorFunction;
+ /**
+ * Returns `true` if the value is a generator object as returned from a
+ * built-in generator function.
+ * This only reports back what the JavaScript engine is seeing;
+ * in particular, the return value may not match the original source code if
+ * a transpilation tool was used.
+ *
+ * ```js
+ * function* foo() {}
+ * const generator = foo();
+ * util.types.isGeneratorObject(generator); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isGeneratorObject(object: unknown): object is Generator;
+ /**
+ * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance.
+ *
+ * ```js
+ * util.types.isInt8Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt8Array(new Int8Array()); // Returns true
+ * util.types.isInt8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt8Array(object: unknown): object is Int8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance.
+ *
+ * ```js
+ * util.types.isInt16Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt16Array(new Int16Array()); // Returns true
+ * util.types.isInt16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt16Array(object: unknown): object is Int16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance.
+ *
+ * ```js
+ * util.types.isInt32Array(new ArrayBuffer()); // Returns false
+ * util.types.isInt32Array(new Int32Array()); // Returns true
+ * util.types.isInt32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isInt32Array(object: unknown): object is Int32Array;
+ /**
+ * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * util.types.isMap(new Map()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMap<T>(object: T | {}): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
+ *
+ * ```js
+ * const map = new Map();
+ * util.types.isMapIterator(map.keys()); // Returns true
+ * util.types.isMapIterator(map.values()); // Returns true
+ * util.types.isMapIterator(map.entries()); // Returns true
+ * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isMapIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects).
+ *
+ * ```js
+ * import * as ns from './a.js';
+ *
+ * util.types.isModuleNamespaceObject(ns); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isModuleNamespaceObject(value: unknown): boolean;
+ /**
+ * Returns `true` if the value is an instance of a built-in `Error` type.
+ *
+ * ```js
+ * util.types.isNativeError(new Error()); // Returns true
+ * util.types.isNativeError(new TypeError()); // Returns true
+ * util.types.isNativeError(new RangeError()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isNativeError(object: unknown): object is Error;
+ /**
+ * Returns `true` if the value is a number object, e.g. created
+ * by `new Number()`.
+ *
+ * ```js
+ * util.types.isNumberObject(0); // Returns false
+ * util.types.isNumberObject(new Number(0)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isNumberObject(object: unknown): object is Number;
+ /**
+ * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
+ *
+ * ```js
+ * util.types.isPromise(Promise.resolve(42)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isPromise(object: unknown): object is Promise<unknown>;
+ /**
+ * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance.
+ *
+ * ```js
+ * const target = {};
+ * const proxy = new Proxy(target, {});
+ * util.types.isProxy(target); // Returns false
+ * util.types.isProxy(proxy); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isProxy(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a regular expression object.
+ *
+ * ```js
+ * util.types.isRegExp(/abc/); // Returns true
+ * util.types.isRegExp(new RegExp('abc')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isRegExp(object: unknown): object is RegExp;
+ /**
+ * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * util.types.isSet(new Set()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSet<T>(object: T | {}): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
+ /**
+ * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
+ *
+ * ```js
+ * const set = new Set();
+ * util.types.isSetIterator(set.keys()); // Returns true
+ * util.types.isSetIterator(set.values()); // Returns true
+ * util.types.isSetIterator(set.entries()); // Returns true
+ * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSetIterator(object: unknown): boolean;
+ /**
+ * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
+ * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
+ *
+ * ```js
+ * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false
+ * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
+ /**
+ * Returns `true` if the value is a string object, e.g. created
+ * by `new String()`.
+ *
+ * ```js
+ * util.types.isStringObject('foo'); // Returns false
+ * util.types.isStringObject(new String('foo')); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isStringObject(object: unknown): object is String;
+ /**
+ * Returns `true` if the value is a symbol object, created
+ * by calling `Object()` on a `Symbol` primitive.
+ *
+ * ```js
+ * const symbol = Symbol('foo');
+ * util.types.isSymbolObject(symbol); // Returns false
+ * util.types.isSymbolObject(Object(symbol)); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isSymbolObject(object: unknown): object is Symbol;
+ /**
+ * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.
+ *
+ * ```js
+ * util.types.isTypedArray(new ArrayBuffer()); // Returns false
+ * util.types.isTypedArray(new Uint8Array()); // Returns true
+ * util.types.isTypedArray(new Float64Array()); // Returns true
+ * ```
+ *
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
+ * @since v10.0.0
+ */
+ function isTypedArray(object: unknown): object is NodeJS.TypedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance.
+ *
+ * ```js
+ * util.types.isUint8Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint8Array(new Uint8Array()); // Returns true
+ * util.types.isUint8Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8Array(object: unknown): object is Uint8Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance.
+ *
+ * ```js
+ * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false
+ * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true
+ * util.types.isUint8ClampedArray(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
+ /**
+ * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance.
+ *
+ * ```js
+ * util.types.isUint16Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint16Array(new Uint16Array()); // Returns true
+ * util.types.isUint16Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint16Array(object: unknown): object is Uint16Array;
+ /**
+ * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance.
+ *
+ * ```js
+ * util.types.isUint32Array(new ArrayBuffer()); // Returns false
+ * util.types.isUint32Array(new Uint32Array()); // Returns true
+ * util.types.isUint32Array(new Float64Array()); // Returns false
+ * ```
+ * @since v10.0.0
+ */
+ function isUint32Array(object: unknown): object is Uint32Array;
+ /**
+ * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance.
+ *
+ * ```js
+ * util.types.isWeakMap(new WeakMap()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
+ /**
+ * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance.
+ *
+ * ```js
+ * util.types.isWeakSet(new WeakSet()); // Returns true
+ * ```
+ * @since v10.0.0
+ */
+ function isWeakSet(object: unknown): object is WeakSet<object>;
+ /**
+ * Returns `true` if `value` is a `KeyObject`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isKeyObject(object: unknown): object is KeyObject;
+ /**
+ * Returns `true` if `value` is a `CryptoKey`, `false` otherwise.
+ * @since v16.2.0
+ */
+ function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
+}
+declare module 'node:util' {
+ export * from 'util';
+}
+declare module 'node:util/types' {
+ export * from 'util/types';
+}
diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts
new file mode 100755
index 0000000..6685dc2
--- /dev/null
+++ b/node_modules/@types/node/v8.d.ts
@@ -0,0 +1,396 @@
+/**
+ * The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
+ *
+ * ```js
+ * const v8 = require('v8');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/v8.js)
+ */
+declare module 'v8' {
+ import { Readable } from 'node:stream';
+ interface HeapSpaceInfo {
+ space_name: string;
+ space_size: number;
+ space_used_size: number;
+ space_available_size: number;
+ physical_space_size: number;
+ }
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
+ type DoesZapCodeSpaceFlag = 0 | 1;
+ interface HeapInfo {
+ total_heap_size: number;
+ total_heap_size_executable: number;
+ total_physical_size: number;
+ total_available_size: number;
+ used_heap_size: number;
+ heap_size_limit: number;
+ malloced_memory: number;
+ peak_malloced_memory: number;
+ does_zap_garbage: DoesZapCodeSpaceFlag;
+ number_of_native_contexts: number;
+ number_of_detached_contexts: number;
+ }
+ interface HeapCodeStatistics {
+ code_and_metadata_size: number;
+ bytecode_and_metadata_size: number;
+ external_script_source_size: number;
+ }
+ /**
+ * Returns an integer representing a version tag derived from the V8 version,
+ * command-line flags, and detected CPU features. This is useful for determining
+ * whether a `vm.Script` `cachedData` buffer is compatible with this instance
+ * of V8.
+ *
+ * ```js
+ * console.log(v8.cachedDataVersionTag()); // 3947234607
+ * // The value returned by v8.cachedDataVersionTag() is derived from the V8
+ * // version, command-line flags, and detected CPU features. Test that the value
+ * // does indeed update when flags are toggled.
+ * v8.setFlagsFromString('--allow_natives_syntax');
+ * console.log(v8.cachedDataVersionTag()); // 183726201
+ * ```
+ * @since v8.0.0
+ */
+ function cachedDataVersionTag(): number;
+ /**
+ * Returns an object with the following properties:
+ *
+ * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
+ * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
+ * because it continuously touches all heap pages and that makes them less likely
+ * to get swapped out by the operating system.
+ *
+ * `number_of_native_contexts` The value of native\_context is the number of the
+ * top-level contexts currently active. Increase of this number over time indicates
+ * a memory leak.
+ *
+ * `number_of_detached_contexts` The value of detached\_context is the number
+ * of contexts that were detached and not yet garbage collected. This number
+ * being non-zero indicates a potential memory leak.
+ *
+ * ```js
+ * {
+ * total_heap_size: 7326976,
+ * total_heap_size_executable: 4194304,
+ * total_physical_size: 7326976,
+ * total_available_size: 1152656,
+ * used_heap_size: 3476208,
+ * heap_size_limit: 1535115264,
+ * malloced_memory: 16384,
+ * peak_malloced_memory: 1127496,
+ * does_zap_garbage: 0,
+ * number_of_native_contexts: 1,
+ * number_of_detached_contexts: 0
+ * }
+ * ```
+ * @since v1.0.0
+ */
+ function getHeapStatistics(): HeapInfo;
+ /**
+ * Returns statistics about the V8 heap spaces, i.e. the segments which make up
+ * the V8 heap. Neither the ordering of heap spaces, nor the availability of a
+ * heap space can be guaranteed as the statistics are provided via the
+ * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
+ * next.
+ *
+ * The value returned is an array of objects containing the following properties:
+ *
+ * ```json
+ * [
+ * {
+ * "space_name": "new_space",
+ * "space_size": 2063872,
+ * "space_used_size": 951112,
+ * "space_available_size": 80824,
+ * "physical_space_size": 2063872
+ * },
+ * {
+ * "space_name": "old_space",
+ * "space_size": 3090560,
+ * "space_used_size": 2493792,
+ * "space_available_size": 0,
+ * "physical_space_size": 3090560
+ * },
+ * {
+ * "space_name": "code_space",
+ * "space_size": 1260160,
+ * "space_used_size": 644256,
+ * "space_available_size": 960,
+ * "physical_space_size": 1260160
+ * },
+ * {
+ * "space_name": "map_space",
+ * "space_size": 1094160,
+ * "space_used_size": 201608,
+ * "space_available_size": 0,
+ * "physical_space_size": 1094160
+ * },
+ * {
+ * "space_name": "large_object_space",
+ * "space_size": 0,
+ * "space_used_size": 0,
+ * "space_available_size": 1490980608,
+ * "physical_space_size": 0
+ * }
+ * ]
+ * ```
+ * @since v6.0.0
+ */
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
+ /**
+ * The `v8.setFlagsFromString()` method can be used to programmatically set
+ * V8 command-line flags. This method should be used with care. Changing settings
+ * after the VM has started may result in unpredictable behavior, including
+ * crashes and data loss; or it may simply do nothing.
+ *
+ * The V8 options available for a version of Node.js may be determined by running`node --v8-options`.
+ *
+ * Usage:
+ *
+ * ```js
+ * // Print GC events to stdout for one minute.
+ * const v8 = require('v8');
+ * v8.setFlagsFromString('--trace_gc');
+ * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
+ * ```
+ * @since v1.0.0
+ */
+ function setFlagsFromString(flags: string): void;
+ /**
+ * Generates a snapshot of the current V8 heap and returns a Readable
+ * Stream that may be used to read the JSON serialized representation.
+ * This JSON stream format is intended to be used with tools such as
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
+ * V8 engine. Therefore, the schema may change from one version of V8 to the next.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * // Print heap snapshot to the console
+ * const v8 = require('v8');
+ * const stream = v8.getHeapSnapshot();
+ * stream.pipe(process.stdout);
+ * ```
+ * @since v11.13.0
+ * @return A Readable Stream containing the V8 heap snapshot
+ */
+ function getHeapSnapshot(): Readable;
+ /**
+ * Generates a snapshot of the current V8 heap and writes it to a JSON
+ * file. This file is intended to be used with tools such as Chrome
+ * DevTools. The JSON schema is undocumented and specific to the V8
+ * engine, and may change from one version of V8 to the next.
+ *
+ * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
+ * not contain any information about the workers, and vice versa.
+ *
+ * Creating a heap snapshot requires memory about twice the size of the heap at
+ * the time the snapshot is created. This results in the risk of OOM killers
+ * terminating the process.
+ *
+ * Generating a snapshot is a synchronous operation which blocks the event loop
+ * for a duration depending on the heap size.
+ *
+ * ```js
+ * const { writeHeapSnapshot } = require('v8');
+ * const {
+ * Worker,
+ * isMainThread,
+ * parentPort
+ * } = require('worker_threads');
+ *
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ *
+ * worker.once('message', (filename) => {
+ * console.log(`worker heapdump: ${filename}`);
+ * // Now get a heapdump for the main thread.
+ * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
+ * });
+ *
+ * // Tell the worker to create a heapdump.
+ * worker.postMessage('heapdump');
+ * } else {
+ * parentPort.once('message', (message) => {
+ * if (message === 'heapdump') {
+ * // Generate a heapdump for the worker
+ * // and return the filename to the parent.
+ * parentPort.postMessage(writeHeapSnapshot());
+ * }
+ * });
+ * }
+ * ```
+ * @since v11.13.0
+ * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
+ * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a
+ * worker thread.
+ * @return The filename where the snapshot was saved.
+ */
+ function writeHeapSnapshot(filename?: string): string;
+ /**
+ * Returns an object with the following properties:
+ *
+ * ```js
+ * {
+ * code_and_metadata_size: 212208,
+ * bytecode_and_metadata_size: 161368,
+ * external_script_source_size: 1410794
+ * }
+ * ```
+ * @since v12.8.0
+ */
+ function getHeapCodeStatistics(): HeapCodeStatistics;
+ /**
+ * @since v8.0.0
+ */
+ class Serializer {
+ /**
+ * Writes out a header, which includes the serialization format version.
+ */
+ writeHeader(): void;
+ /**
+ * Serializes a JavaScript value and adds the serialized representation to the
+ * internal buffer.
+ *
+ * This throws an error if `value` cannot be serialized.
+ */
+ writeValue(val: any): boolean;
+ /**
+ * Returns the stored internal buffer. This serializer should not be used once
+ * the buffer is released. Calling this method results in undefined behavior
+ * if a previous write has failed.
+ */
+ releaseBuffer(): Buffer;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Write a raw 32-bit unsigned integer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint32(value: number): void;
+ /**
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeUint64(hi: number, lo: number): void;
+ /**
+ * Write a JS `number` value.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeDouble(value: number): void;
+ /**
+ * Write raw bytes into the serializer’s internal buffer. The deserializer
+ * will require a way to compute the length of the buffer.
+ * For use inside of a custom `serializer._writeHostObject()`.
+ */
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
+ }
+ /**
+ * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
+ * stores the part of their underlying `ArrayBuffer`s that they are referring to.
+ * @since v8.0.0
+ */
+ class DefaultSerializer extends Serializer {}
+ /**
+ * @since v8.0.0
+ */
+ class Deserializer {
+ constructor(data: NodeJS.TypedArray);
+ /**
+ * Reads and validates a header (including the format version).
+ * May, for example, reject an invalid or unsupported wire format. In that case,
+ * an `Error` is thrown.
+ */
+ readHeader(): boolean;
+ /**
+ * Deserializes a JavaScript value from the buffer and returns it.
+ */
+ readValue(): any;
+ /**
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
+ * `SharedArrayBuffer`s).
+ * @param id A 32-bit unsigned integer.
+ * @param arrayBuffer An `ArrayBuffer` instance.
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+ /**
+ * Reads the underlying wire format version. Likely mostly to be useful to
+ * legacy code reading old wire format versions. May not be called before`.readHeader()`.
+ */
+ getWireFormatVersion(): number;
+ /**
+ * Read a raw 32-bit unsigned integer and return it.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint32(): number;
+ /**
+ * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readUint64(): [number, number];
+ /**
+ * Read a JS `number` value.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readDouble(): number;
+ /**
+ * Read raw bytes from the deserializer’s internal buffer. The `length` parameter
+ * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
+ * For use inside of a custom `deserializer._readHostObject()`.
+ */
+ readRawBytes(length: number): Buffer;
+ }
+ /**
+ * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
+ * @since v8.0.0
+ */
+ class DefaultDeserializer extends Deserializer {}
+ /**
+ * Uses a `DefaultSerializer` to serialize `value` into a buffer.
+ *
+ * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to
+ * serialize a huge object which requires buffer
+ * larger than `buffer.constants.MAX_LENGTH`.
+ * @since v8.0.0
+ */
+ function serialize(value: any): Buffer;
+ /**
+ * Uses a `DefaultDeserializer` with default options to read a JS value
+ * from a buffer.
+ * @since v8.0.0
+ * @param buffer A buffer returned by {@link serialize}.
+ */
+ function deserialize(buffer: NodeJS.TypedArray): any;
+ /**
+ * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
+ * times during the lifetime of the process. Each time the execution counter will
+ * be reset and a new coverage report will be written to the directory specified
+ * by `NODE_V8_COVERAGE`.
+ *
+ * When the process is about to exit, one last coverage will still be written to
+ * disk unless {@link stopCoverage} is invoked before the process exits.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function takeCoverage(): void;
+ /**
+ * The `v8.stopCoverage()` method allows the user to stop the coverage collection
+ * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
+ * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
+ * @since v15.1.0, v14.18.0, v12.22.0
+ */
+ function stopCoverage(): void;
+}
+declare module 'node:v8' {
+ export * from 'v8';
+}
diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts
new file mode 100755
index 0000000..c96513a
--- /dev/null
+++ b/node_modules/@types/node/vm.d.ts
@@ -0,0 +1,509 @@
+/**
+ * The `vm` module enables compiling and running code within V8 Virtual
+ * Machine contexts.
+ *
+ * **The `vm` module is not a security**
+ * **mechanism. Do not use it to run untrusted code.**
+ *
+ * JavaScript code can be compiled and run immediately or
+ * compiled, saved, and run later.
+ *
+ * A common use case is to run the code in a different V8 Context. This means
+ * invoked code has a different global object than the invoking code.
+ *
+ * One can provide the context by `contextifying` an
+ * object. The invoked code treats any property in the context like a
+ * global variable. Any changes to global variables caused by the invoked
+ * code are reflected in the context object.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const x = 1;
+ *
+ * const context = { x: 2 };
+ * vm.createContext(context); // Contextify the object.
+ *
+ * const code = 'x += 40; var y = 17;';
+ * // `x` and `y` are global variables in the context.
+ * // Initially, x has the value 2 because that is the value of context.x.
+ * vm.runInContext(code, context);
+ *
+ * console.log(context.x); // 42
+ * console.log(context.y); // 17
+ *
+ * console.log(x); // 1; y is not defined.
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/vm.js)
+ */
+declare module 'vm' {
+ interface Context extends NodeJS.Dict<any> {}
+ interface BaseOptions {
+ /**
+ * Specifies the filename used in stack traces produced by this script.
+ * Default: `''`.
+ */
+ filename?: string | undefined;
+ /**
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
+ * Default: `0`.
+ */
+ lineOffset?: number | undefined;
+ /**
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
+ * @default 0
+ */
+ columnOffset?: number | undefined;
+ }
+ interface ScriptOptions extends BaseOptions {
+ displayErrors?: boolean | undefined;
+ timeout?: number | undefined;
+ cachedData?: Buffer | undefined;
+ /** @deprecated in favor of `script.createCachedData()` */
+ produceCachedData?: boolean | undefined;
+ }
+ interface RunningScriptOptions extends BaseOptions {
+ /**
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
+ * Default: `true`.
+ */
+ displayErrors?: boolean | undefined;
+ /**
+ * Specifies the number of milliseconds to execute code before terminating execution.
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
+ */
+ timeout?: number | undefined;
+ /**
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
+ * If execution is terminated, an `Error` will be thrown.
+ * Default: `false`.
+ */
+ breakOnSigint?: boolean | undefined;
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: 'afterEvaluate' | undefined;
+ }
+ interface CompileFunctionOptions extends BaseOptions {
+ /**
+ * Provides an optional data with V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer | undefined;
+ /**
+ * Specifies whether to produce new cache data.
+ * Default: `false`,
+ */
+ produceCachedData?: boolean | undefined;
+ /**
+ * The sandbox/context in which the said function should be compiled in.
+ */
+ parsingContext?: Context | undefined;
+ /**
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
+ */
+ contextExtensions?: Object[] | undefined;
+ }
+ interface CreateContextOptions {
+ /**
+ * Human-readable name of the newly created context.
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
+ */
+ name?: string | undefined;
+ /**
+ * Corresponds to the newly created context for display purposes.
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
+ * like the value of the `url.origin` property of a URL object.
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
+ * @default ''
+ */
+ origin?: string | undefined;
+ codeGeneration?:
+ | {
+ /**
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
+ * will throw an EvalError.
+ * @default true
+ */
+ strings?: boolean | undefined;
+ /**
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
+ * @default true
+ */
+ wasm?: boolean | undefined;
+ }
+ | undefined;
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: 'afterEvaluate' | undefined;
+ }
+ type MeasureMemoryMode = 'summary' | 'detailed';
+ interface MeasureMemoryOptions {
+ /**
+ * @default 'summary'
+ */
+ mode?: MeasureMemoryMode | undefined;
+ context?: Context | undefined;
+ }
+ interface MemoryMeasurement {
+ total: {
+ jsMemoryEstimate: number;
+ jsMemoryRange: [number, number];
+ };
+ }
+ /**
+ * Instances of the `vm.Script` class contain precompiled scripts that can be
+ * executed in specific contexts.
+ * @since v0.3.1
+ */
+ class Script {
+ constructor(code: string, options?: ScriptOptions);
+ /**
+ * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
+ * to local scope.
+ *
+ * The following example compiles code that increments a global variable, sets
+ * the value of another global variable, then execute the code multiple times.
+ * The globals are contained in the `context` object.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const context = {
+ * animal: 'cat',
+ * count: 2
+ * };
+ *
+ * const script = new vm.Script('count += 1; name = "kitty";');
+ *
+ * vm.createContext(context);
+ * for (let i = 0; i < 10; ++i) {
+ * script.runInContext(context);
+ * }
+ *
+ * console.log(context);
+ * // Prints: { animal: 'cat', count: 12, name: 'kitty' }
+ * ```
+ *
+ * Using the `timeout` or `breakOnSigint` options will result in new event loops
+ * and corresponding threads being started, which have a non-zero performance
+ * overhead.
+ * @since v0.3.1
+ * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
+ /**
+ * First contextifies the given `contextObject`, runs the compiled code contained
+ * by the `vm.Script` object within the created context, and returns the result.
+ * Running code does not have access to local scope.
+ *
+ * The following example compiles code that sets a global variable, then executes
+ * the code multiple times in different contexts. The globals are set on and
+ * contained within each individual `context`.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const script = new vm.Script('globalVar = "set"');
+ *
+ * const contexts = [{}, {}, {}];
+ * contexts.forEach((context) => {
+ * script.runInNewContext(context);
+ * });
+ *
+ * console.log(contexts);
+ * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
+ * ```
+ * @since v0.3.1
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
+ /**
+ * Runs the compiled code contained by the `vm.Script` within the context of the
+ * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
+ *
+ * The following example compiles code that increments a `global` variable then
+ * executes that code multiple times:
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * global.globalVar = 0;
+ *
+ * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' });
+ *
+ * for (let i = 0; i < 1000; ++i) {
+ * script.runInThisContext();
+ * }
+ *
+ * console.log(globalVar);
+ *
+ * // 1000
+ * ```
+ * @since v0.3.1
+ * @return the result of the very last statement executed in the script.
+ */
+ runInThisContext(options?: RunningScriptOptions): any;
+ /**
+ * Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any
+ * time and any number of times.
+ *
+ * ```js
+ * const script = new vm.Script(`
+ * function add(a, b) {
+ * return a + b;
+ * }
+ *
+ * const x = add(1, 2);
+ * `);
+ *
+ * const cacheWithoutX = script.createCachedData();
+ *
+ * script.runInThisContext();
+ *
+ * const cacheWithX = script.createCachedData();
+ * ```
+ * @since v10.6.0
+ */
+ createCachedData(): Buffer;
+ /** @deprecated in favor of `script.createCachedData()` */
+ cachedDataProduced?: boolean | undefined;
+ cachedDataRejected?: boolean | undefined;
+ cachedData?: Buffer | undefined;
+ }
+ /**
+ * If given a `contextObject`, the `vm.createContext()` method will `prepare
+ * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts,
+ * the `contextObject` will be the global object, retaining all of its existing
+ * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables
+ * will remain unchanged.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * global.globalVar = 3;
+ *
+ * const context = { globalVar: 1 };
+ * vm.createContext(context);
+ *
+ * vm.runInContext('globalVar *= 2;', context);
+ *
+ * console.log(context);
+ * // Prints: { globalVar: 2 }
+ *
+ * console.log(global.globalVar);
+ * // Prints: 3
+ * ```
+ *
+ * If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
+ * empty `contextified` object will be returned.
+ *
+ * The `vm.createContext()` method is primarily useful for creating a single
+ * context that can be used to run multiple scripts. For instance, if emulating a
+ * web browser, the method can be used to create a single context representing a
+ * window's global object, then run all `<script>` tags together within that
+ * context.
+ *
+ * The provided `name` and `origin` of the context are made visible through the
+ * Inspector API.
+ * @since v0.3.1
+ * @return contextified object.
+ */
+ function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
+ /**
+ * Returns `true` if the given `object` object has been `contextified` using {@link createContext}.
+ * @since v0.11.7
+ */
+ function isContext(sandbox: Context): boolean;
+ /**
+ * The `vm.runInContext()` method compiles `code`, runs it within the context of
+ * the `contextifiedObject`, then returns the result. Running code does not have
+ * access to the local scope. The `contextifiedObject` object _must_ have been
+ * previously `contextified` using the {@link createContext} method.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes different scripts using a single `contextified` object:
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const contextObject = { globalVar: 1 };
+ * vm.createContext(contextObject);
+ *
+ * for (let i = 0; i < 10; ++i) {
+ * vm.runInContext('globalVar *= 2;', contextObject);
+ * }
+ * console.log(contextObject);
+ * // Prints: { globalVar: 1024 }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
+ /**
+ * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
+ * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
+ * runs it within the created context, then returns the result. Running code
+ * does not have access to the local scope.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example compiles and executes code that increments a global
+ * variable and sets a new one. These globals are contained in the `contextObject`.
+ *
+ * ```js
+ * const vm = require('vm');
+ *
+ * const contextObject = {
+ * animal: 'cat',
+ * count: 2
+ * };
+ *
+ * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
+ * console.log(contextObject);
+ * // Prints: { animal: 'cat', count: 3, name: 'kitty' }
+ * ```
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
+ /**
+ * `vm.runInThisContext()` compiles `code`, runs it within the context of the
+ * current `global` and returns the result. Running code does not have access to
+ * local scope, but does have access to the current `global` object.
+ *
+ * If `options` is a string, then it specifies the filename.
+ *
+ * The following example illustrates using both `vm.runInThisContext()` and
+ * the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
+ *
+ * ```js
+ * const vm = require('vm');
+ * let localVar = 'initial value';
+ *
+ * const vmResult = vm.runInThisContext('localVar = "vm";');
+ * console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`);
+ * // Prints: vmResult: 'vm', localVar: 'initial value'
+ *
+ * const evalResult = eval('localVar = "eval";');
+ * console.log(`evalResult: '${evalResult}', localVar: '${localVar}'`);
+ * // Prints: evalResult: 'eval', localVar: 'eval'
+ * ```
+ *
+ * Because `vm.runInThisContext()` does not have access to the local scope,`localVar` is unchanged. In contrast,
+ * [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
+ * local scope, so the value `localVar` is changed. In this way`vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
+ *
+ * ## Example: Running an HTTP server within a VM
+ *
+ * When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
+ * context. The code passed to this VM context will have its own isolated scope.
+ *
+ * In order to run a simple web server using the `http` module the code passed to
+ * the context must either call `require('http')` on its own, or have a reference
+ * to the `http` module passed to it. For instance:
+ *
+ * ```js
+ * 'use strict';
+ * const vm = require('vm');
+ *
+ * const code = `
+ * ((require) => {
+ * const http = require('http');
+ *
+ * http.createServer((request, response) => {
+ * response.writeHead(200, { 'Content-Type': 'text/plain' });
+ * response.end('Hello World\\n');
+ * }).listen(8124);
+ *
+ * console.log('Server running at http://127.0.0.1:8124/');
+ * })`;
+ *
+ * vm.runInThisContext(code)(require);
+ * ```
+ *
+ * The `require()` in the above case shares the state with the context it is
+ * passed from. This may introduce risks when untrusted code is executed, e.g.
+ * altering objects in the context in unwanted ways.
+ * @since v0.3.1
+ * @param code The JavaScript code to compile and run.
+ * @return the result of the very last statement executed in the script.
+ */
+ function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
+ /**
+ * Compiles the given code into the provided context (if no context is
+ * supplied, the current context is used), and returns it wrapped inside a
+ * function with the given `params`.
+ * @since v10.10.0
+ * @param code The body of the function to compile.
+ * @param params An array of strings containing all parameters for the function.
+ */
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
+ /**
+ * Measure the memory known to V8 and used by all contexts known to the
+ * current V8 isolate, or the main context.
+ *
+ * The format of the object that the returned Promise may resolve with is
+ * specific to the V8 engine and may change from one version of V8 to the next.
+ *
+ * The returned result is different from the statistics returned by`v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measure the
+ * memory reachable by each V8 specific contexts in the current instance of
+ * the V8 engine, while the result of `v8.getHeapSpaceStatistics()` measure
+ * the memory occupied by each heap space in the current V8 instance.
+ *
+ * ```js
+ * const vm = require('vm');
+ * // Measure the memory used by the main context.
+ * vm.measureMemory({ mode: 'summary' })
+ * // This is the same as vm.measureMemory()
+ * .then((result) => {
+ * // The current format is:
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2418479, jsMemoryRange: [ 2418479, 2745799 ]
+ * // }
+ * // }
+ * console.log(result);
+ * });
+ *
+ * const context = vm.createContext({ a: 1 });
+ * vm.measureMemory({ mode: 'detailed', execution: 'eager' })
+ * .then((result) => {
+ * // Reference the context here so that it won't be GC'ed
+ * // until the measurement is complete.
+ * console.log(context.a);
+ * // {
+ * // total: {
+ * // jsMemoryEstimate: 2574732,
+ * // jsMemoryRange: [ 2574732, 2904372 ]
+ * // },
+ * // current: {
+ * // jsMemoryEstimate: 2438996,
+ * // jsMemoryRange: [ 2438996, 2768636 ]
+ * // },
+ * // other: [
+ * // {
+ * // jsMemoryEstimate: 135736,
+ * // jsMemoryRange: [ 135736, 465376 ]
+ * // }
+ * // ]
+ * // }
+ * console.log(result);
+ * });
+ * ```
+ * @since v13.10.0
+ * @experimental
+ */
+ function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
+}
+declare module 'node:vm' {
+ export * from 'vm';
+}
diff --git a/node_modules/@types/node/wasi.d.ts b/node_modules/@types/node/wasi.d.ts
new file mode 100755
index 0000000..d20b66b
--- /dev/null
+++ b/node_modules/@types/node/wasi.d.ts
@@ -0,0 +1,158 @@
+/**
+ * The WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives sandboxed WebAssembly applications access to the
+ * underlying operating system via a collection of POSIX-like functions.
+ *
+ * ```js
+ * import { readFile } from 'fs/promises';
+ * import { WASI } from 'wasi';
+ * import { argv, env } from 'process';
+ *
+ * const wasi = new WASI({
+ * args: argv,
+ * env,
+ * preopens: {
+ * '/sandbox': '/some/real/path/that/wasm/can/access'
+ * }
+ * });
+ *
+ * // Some WASI binaries require:
+ * // const importObject = { wasi_unstable: wasi.wasiImport };
+ * const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
+ *
+ * const wasm = await WebAssembly.compile(
+ * await readFile(new URL('./demo.wasm', import.meta.url))
+ * );
+ * const instance = await WebAssembly.instantiate(wasm, importObject);
+ *
+ * wasi.start(instance);
+ * ```
+ *
+ * To run the above example, create a new WebAssembly text format file named`demo.wat`:
+ *
+ * ```text
+ * (module
+ * ;; Import the required fd_write WASI function which will write the given io vectors to stdout
+ * ;; The function signature for fd_write is:
+ * ;; (File Descriptor, *iovs, iovs_len, nwritten) -> Returns number of bytes written
+ * (import "wasi_snapshot_preview1" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
+ *
+ * (memory 1)
+ * (export "memory" (memory 0))
+ *
+ * ;; Write 'hello world\n' to memory at an offset of 8 bytes
+ * ;; Note the trailing newline which is required for the text to appear
+ * (data (i32.const 8) "hello world\n")
+ *
+ * (func $main (export "_start")
+ * ;; Creating a new io vector within linear memory
+ * (i32.store (i32.const 0) (i32.const 8)) ;; iov.iov_base - This is a pointer to the start of the 'hello world\n' string
+ * (i32.store (i32.const 4) (i32.const 12)) ;; iov.iov_len - The length of the 'hello world\n' string
+ *
+ * (call $fd_write
+ * (i32.const 1) ;; file_descriptor - 1 for stdout
+ * (i32.const 0) ;; *iovs - The pointer to the iov array, which is stored at memory location 0
+ * (i32.const 1) ;; iovs_len - We're printing 1 string stored in an iov - so one.
+ * (i32.const 20) ;; nwritten - A place in memory to store the number of bytes written
+ * )
+ * drop ;; Discard the number of bytes written from the top of the stack
+ * )
+ * )
+ * ```
+ *
+ * Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
+ *
+ * ```console
+ * $ wat2wasm demo.wat
+ * ```
+ *
+ * The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
+ * example to run.
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/wasi.js)
+ */
+declare module 'wasi' {
+ interface WASIOptions {
+ /**
+ * An array of strings that the WebAssembly application will
+ * see as command line arguments. The first argument is the virtual path to the
+ * WASI command itself.
+ */
+ args?: string[] | undefined;
+ /**
+ * An object similar to `process.env` that the WebAssembly
+ * application will see as its environment.
+ */
+ env?: object | undefined;
+ /**
+ * This object represents the WebAssembly application's
+ * sandbox directory structure. The string keys of `preopens` are treated as
+ * directories within the sandbox. The corresponding values in `preopens` are
+ * the real paths to those directories on the host machine.
+ */
+ preopens?: NodeJS.Dict<string> | undefined;
+ /**
+ * By default, WASI applications terminate the Node.js
+ * process via the `__wasi_proc_exit()` function. Setting this option to `true`
+ * causes `wasi.start()` to return the exit code rather than terminate the
+ * process.
+ * @default false
+ */
+ returnOnExit?: boolean | undefined;
+ /**
+ * The file descriptor used as standard input in the WebAssembly application.
+ * @default 0
+ */
+ stdin?: number | undefined;
+ /**
+ * The file descriptor used as standard output in the WebAssembly application.
+ * @default 1
+ */
+ stdout?: number | undefined;
+ /**
+ * The file descriptor used as standard error in the WebAssembly application.
+ * @default 2
+ */
+ stderr?: number | undefined;
+ }
+ /**
+ * The `WASI` class provides the WASI system call API and additional convenience
+ * methods for working with WASI-based applications. Each `WASI` instance
+ * represents a distinct sandbox environment. For security purposes, each `WASI`instance must have its command-line arguments, environment variables, and
+ * sandbox directory structure configured explicitly.
+ * @since v13.3.0, v12.16.0
+ */
+ class WASI {
+ constructor(options?: WASIOptions);
+ /**
+ * Attempt to begin execution of `instance` as a WASI command by invoking its`_start()` export. If `instance` does not contain a `_start()` export, or if`instance` contains an `_initialize()`
+ * export, then an exception is thrown.
+ *
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`. If
+ * `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `start()` is called more than once, an exception is thrown.
+ * @since v13.3.0, v12.16.0
+ */
+ start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.
+ *
+ * `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
+ * If `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `initialize()` is called more than once, an exception is thrown.
+ * @since v14.6.0, v12.19.0
+ */
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+ /**
+ * `wasiImport` is an object that implements the WASI system call API. This object
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation
+ * of a [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance).
+ * @since v13.3.0, v12.16.0
+ */
+ readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
+ }
+}
+declare module 'node:wasi' {
+ export * from 'wasi';
+}
diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts
new file mode 100755
index 0000000..81b71c2
--- /dev/null
+++ b/node_modules/@types/node/worker_threads.d.ts
@@ -0,0 +1,646 @@
+/**
+ * The `worker_threads` module enables the use of threads that execute JavaScript
+ * in parallel. To access it:
+ *
+ * ```js
+ * const worker = require('worker_threads');
+ * ```
+ *
+ * Workers (threads) are useful for performing CPU-intensive JavaScript operations.
+ * They do not help much with I/O-intensive work. The Node.js built-in
+ * asynchronous I/O operations are more efficient than Workers can be.
+ *
+ * Unlike `child_process` or `cluster`, `worker_threads` can share memory. They do
+ * so by transferring `ArrayBuffer` instances or sharing `SharedArrayBuffer`instances.
+ *
+ * ```js
+ * const {
+ * Worker, isMainThread, parentPort, workerData
+ * } = require('worker_threads');
+ *
+ * if (isMainThread) {
+ * module.exports = function parseJSAsync(script) {
+ * return new Promise((resolve, reject) => {
+ * const worker = new Worker(__filename, {
+ * workerData: script
+ * });
+ * worker.on('message', resolve);
+ * worker.on('error', reject);
+ * worker.on('exit', (code) => {
+ * if (code !== 0)
+ * reject(new Error(`Worker stopped with exit code ${code}`));
+ * });
+ * });
+ * };
+ * } else {
+ * const { parse } = require('some-js-parsing-library');
+ * const script = workerData;
+ * parentPort.postMessage(parse(script));
+ * }
+ * ```
+ *
+ * The above example spawns a Worker thread for each `parseJSAsync()` call. In
+ * practice, use a pool of Workers for these kinds of tasks. Otherwise, the
+ * overhead of creating Workers would likely exceed their benefit.
+ *
+ * When implementing a worker pool, use the `AsyncResource` API to inform
+ * diagnostic tools (e.g. to provide asynchronous stack traces) about the
+ * correlation between tasks and their outcomes. See `"Using AsyncResource for a Worker thread pool"` in the `async_hooks` documentation for an example implementation.
+ *
+ * Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
+ * specifically `argv` and `execArgv` options.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/worker_threads.js)
+ */
+declare module 'worker_threads' {
+ import { Blob } from 'node:buffer';
+ import { Context } from 'node:vm';
+ import { EventEmitter } from 'node:events';
+ import { EventLoopUtilityFunction } from 'node:perf_hooks';
+ import { FileHandle } from 'node:fs/promises';
+ import { Readable, Writable } from 'node:stream';
+ import { URL } from 'node:url';
+ import { X509Certificate } from 'node:crypto';
+ const isMainThread: boolean;
+ const parentPort: null | MessagePort;
+ const resourceLimits: ResourceLimits;
+ const SHARE_ENV: unique symbol;
+ const threadId: number;
+ const workerData: any;
+ /**
+ * Instances of the `worker.MessageChannel` class represent an asynchronous,
+ * two-way communications channel.
+ * The `MessageChannel` has no methods of its own. `new MessageChannel()`yields an object with `port1` and `port2` properties, which refer to linked `MessagePort` instances.
+ *
+ * ```js
+ * const { MessageChannel } = require('worker_threads');
+ *
+ * const { port1, port2 } = new MessageChannel();
+ * port1.on('message', (message) => console.log('received', message));
+ * port2.postMessage({ foo: 'bar' });
+ * // Prints: received { foo: 'bar' } from the `port1.on('message')` listener
+ * ```
+ * @since v10.5.0
+ */
+ class MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+ }
+ interface WorkerPerformance {
+ eventLoopUtilization: EventLoopUtilityFunction;
+ }
+ type TransferListItem = ArrayBuffer | MessagePort | FileHandle | X509Certificate | Blob;
+ /**
+ * Instances of the `worker.MessagePort` class represent one end of an
+ * asynchronous, two-way communications channel. It can be used to transfer
+ * structured data, memory regions and other `MessagePort`s between different `Worker` s.
+ *
+ * This implementation matches [browser `MessagePort`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) s.
+ * @since v10.5.0
+ */
+ class MessagePort extends EventEmitter {
+ /**
+ * Disables further sending of messages on either side of the connection.
+ * This method can be called when no further communication will happen over this`MessagePort`.
+ *
+ * The `'close' event` is emitted on both `MessagePort` instances that
+ * are part of the channel.
+ * @since v10.5.0
+ */
+ close(): void;
+ /**
+ * Sends a JavaScript value to the receiving side of this channel.`value` is transferred in a way which is compatible with
+ * the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
+ *
+ * In particular, the significant differences to `JSON` are:
+ *
+ * * `value` may contain circular references.
+ * * `value` may contain instances of builtin JS types such as `RegExp`s,`BigInt`s, `Map`s, `Set`s, etc.
+ * * `value` may contain typed arrays, both using `ArrayBuffer`s
+ * and `SharedArrayBuffer`s.
+ * * `value` may contain [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) instances.
+ * * `value` may not contain native (C++-backed) objects other than:
+ *
+ * ```js
+ * const { MessageChannel } = require('worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const circularData = {};
+ * circularData.foo = circularData;
+ * // Prints: { foo: [Circular] }
+ * port2.postMessage(circularData);
+ * ```
+ *
+ * `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort` and `FileHandle` objects.
+ * After transferring, they are not usable on the sending side of the channel
+ * anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently
+ * not supported.
+ *
+ * If `value` contains [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances, those are accessible
+ * from either thread. They cannot be listed in `transferList`.
+ *
+ * `value` may still contain `ArrayBuffer` instances that are not in`transferList`; in that case, the underlying memory is copied rather than moved.
+ *
+ * ```js
+ * const { MessageChannel } = require('worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ *
+ * port1.on('message', (message) => console.log(message));
+ *
+ * const uint8Array = new Uint8Array([ 1, 2, 3, 4 ]);
+ * // This posts a copy of `uint8Array`:
+ * port2.postMessage(uint8Array);
+ * // This does not copy data, but renders `uint8Array` unusable:
+ * port2.postMessage(uint8Array, [ uint8Array.buffer ]);
+ *
+ * // The memory for the `sharedUint8Array` is accessible from both the
+ * // original and the copy received by `.on('message')`:
+ * const sharedUint8Array = new Uint8Array(new SharedArrayBuffer(4));
+ * port2.postMessage(sharedUint8Array);
+ *
+ * // This transfers a freshly created message port to the receiver.
+ * // This can be used, for example, to create communication channels between
+ * // multiple `Worker` threads that are children of the same parent thread.
+ * const otherChannel = new MessageChannel();
+ * port2.postMessage({ port: otherChannel.port1 }, [ otherChannel.port1 ]);
+ * ```
+ *
+ * The message object is cloned immediately, and can be modified after
+ * posting without having side effects.
+ *
+ * For more information on the serialization and deserialization mechanisms
+ * behind this API, see the `serialization API of the v8 module`.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port
+ * is `ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a port allows the thread to exit if this is the only
+ * active handle in the event system. If the port is already `unref()`ed calling`unref()` again has no effect.
+ *
+ * If listeners are attached or removed using `.on('message')`, the port is`ref()`ed and `unref()`ed automatically depending on whether
+ * listeners for the event exist.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Starts receiving messages on this `MessagePort`. When using this port
+ * as an event emitter, this is called automatically once `'message'`listeners are attached.
+ *
+ * This method exists for parity with the Web `MessagePort` API. In Node.js,
+ * it is only useful for ignoring messages when no event listener is present.
+ * Node.js also diverges in its handling of `.onmessage`. Setting it
+ * automatically calls `.start()`, but unsetting it lets messages queue up
+ * until a new handler is set or the port is discarded.
+ * @since v10.5.0
+ */
+ start(): void;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'close'): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'close', listener: () => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'close', listener: () => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface WorkerOptions {
+ /**
+ * List of arguments which would be stringified and appended to
+ * `process.argv` in the worker. This is mostly similar to the `workerData`
+ * but the values will be available on the global `process.argv` as if they
+ * were passed as CLI options to the script.
+ */
+ argv?: any[] | undefined;
+ env?: NodeJS.Dict<string> | typeof SHARE_ENV | undefined;
+ eval?: boolean | undefined;
+ workerData?: any;
+ stdin?: boolean | undefined;
+ stdout?: boolean | undefined;
+ stderr?: boolean | undefined;
+ execArgv?: string[] | undefined;
+ resourceLimits?: ResourceLimits | undefined;
+ /**
+ * Additional data to send in the first worker message.
+ */
+ transferList?: TransferListItem[] | undefined;
+ /**
+ * @default true
+ */
+ trackUnmanagedFds?: boolean | undefined;
+ }
+ interface ResourceLimits {
+ /**
+ * The maximum size of a heap space for recently created objects.
+ */
+ maxYoungGenerationSizeMb?: number | undefined;
+ /**
+ * The maximum size of the main heap in MB.
+ */
+ maxOldGenerationSizeMb?: number | undefined;
+ /**
+ * The size of a pre-allocated memory range used for generated code.
+ */
+ codeRangeSizeMb?: number | undefined;
+ /**
+ * The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
+ * @default 4
+ */
+ stackSizeMb?: number | undefined;
+ }
+ /**
+ * The `Worker` class represents an independent JavaScript execution thread.
+ * Most Node.js APIs are available inside of it.
+ *
+ * Notable differences inside a Worker environment are:
+ *
+ * * The `process.stdin`, `process.stdout` and `process.stderr` may be redirected by the parent thread.
+ * * The `require('worker_threads').isMainThread` property is set to `false`.
+ * * The `require('worker_threads').parentPort` message port is available.
+ * * `process.exit()` does not stop the whole program, just the single thread,
+ * and `process.abort()` is not available.
+ * * `process.chdir()` and `process` methods that set group or user ids
+ * are not available.
+ * * `process.env` is a copy of the parent thread's environment variables,
+ * unless otherwise specified. Changes to one copy are not visible in other
+ * threads, and are not visible to native add-ons (unless `worker.SHARE_ENV` is passed as the `env` option to the `Worker` constructor).
+ * * `process.title` cannot be modified.
+ * * Signals are not delivered through `process.on('...')`.
+ * * Execution may stop at any point as a result of `worker.terminate()` being invoked.
+ * * IPC channels from parent processes are not accessible.
+ * * The `trace_events` module is not supported.
+ * * Native add-ons can only be loaded from multiple threads if they fulfill `certain conditions`.
+ *
+ * Creating `Worker` instances inside of other `Worker`s is possible.
+ *
+ * Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `cluster module`, two-way communication can be
+ * achieved through inter-thread message passing. Internally, a `Worker` has a
+ * built-in pair of `MessagePort` s that are already associated with each other
+ * when the `Worker` is created. While the `MessagePort` object on the parent side
+ * is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
+ * on the `Worker` object for the parent thread.
+ *
+ * To create custom messaging channels (which is encouraged over using the default
+ * global channel because it facilitates separation of concerns), users can create
+ * a `MessageChannel` object on either thread and pass one of the`MessagePort`s on that `MessageChannel` to the other thread through a
+ * pre-existing channel, such as the global one.
+ *
+ * See `port.postMessage()` for more information on how messages are passed,
+ * and what kind of JavaScript values can be successfully transported through
+ * the thread barrier.
+ *
+ * ```js
+ * const assert = require('assert');
+ * const {
+ * Worker, MessageChannel, MessagePort, isMainThread, parentPort
+ * } = require('worker_threads');
+ * if (isMainThread) {
+ * const worker = new Worker(__filename);
+ * const subChannel = new MessageChannel();
+ * worker.postMessage({ hereIsYourPort: subChannel.port1 }, [subChannel.port1]);
+ * subChannel.port2.on('message', (value) => {
+ * console.log('received:', value);
+ * });
+ * } else {
+ * parentPort.once('message', (value) => {
+ * assert(value.hereIsYourPort instanceof MessagePort);
+ * value.hereIsYourPort.postMessage('the worker is sending this');
+ * value.hereIsYourPort.close();
+ * });
+ * }
+ * ```
+ * @since v10.5.0
+ */
+ class Worker extends EventEmitter {
+ /**
+ * If `stdin: true` was passed to the `Worker` constructor, this is a
+ * writable stream. The data written to this stream will be made available in
+ * the worker thread as `process.stdin`.
+ * @since v10.5.0
+ */
+ readonly stdin: Writable | null;
+ /**
+ * This is a readable stream which contains data written to `process.stdout` inside the worker thread. If `stdout: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stdout` stream.
+ * @since v10.5.0
+ */
+ readonly stdout: Readable;
+ /**
+ * This is a readable stream which contains data written to `process.stderr` inside the worker thread. If `stderr: true` was not passed to the `Worker` constructor, then data is piped to the
+ * parent thread's `process.stderr` stream.
+ * @since v10.5.0
+ */
+ readonly stderr: Readable;
+ /**
+ * An integer identifier for the referenced thread. Inside the worker thread,
+ * it is available as `require('worker_threads').threadId`.
+ * This value is unique for each `Worker` instance inside a single process.
+ * @since v10.5.0
+ */
+ readonly threadId: number;
+ /**
+ * Provides the set of JS engine resource constraints for this Worker thread.
+ * If the `resourceLimits` option was passed to the `Worker` constructor,
+ * this matches its values.
+ *
+ * If the worker has stopped, the return value is an empty object.
+ * @since v13.2.0, v12.16.0
+ */
+ readonly resourceLimits?: ResourceLimits | undefined;
+ /**
+ * An object that can be used to query performance information from a worker
+ * instance. Similar to `perf_hooks.performance`.
+ * @since v15.1.0, v14.17.0, v12.22.0
+ */
+ readonly performance: WorkerPerformance;
+ /**
+ * @param filename The path to the Worker’s main script or module.
+ * Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
+ * or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
+ */
+ constructor(filename: string | URL, options?: WorkerOptions);
+ /**
+ * Send a message to the worker that is received via `require('worker_threads').parentPort.on('message')`.
+ * See `port.postMessage()` for more details.
+ * @since v10.5.0
+ */
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ /**
+ * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default
+ * behavior). If the worker is `ref()`ed, calling `ref()` again has
+ * no effect.
+ * @since v10.5.0
+ */
+ ref(): void;
+ /**
+ * Calling `unref()` on a worker allows the thread to exit if this is the only
+ * active handle in the event system. If the worker is already `unref()`ed calling`unref()` again has no effect.
+ * @since v10.5.0
+ */
+ unref(): void;
+ /**
+ * Stop all JavaScript execution in the worker thread as soon as possible.
+ * Returns a Promise for the exit code that is fulfilled when the `'exit' event` is emitted.
+ * @since v10.5.0
+ */
+ terminate(): Promise<number>;
+ /**
+ * Returns a readable stream for a V8 snapshot of the current state of the Worker.
+ * See `v8.getHeapSnapshot()` for more details.
+ *
+ * If the Worker thread is no longer running, which may occur before the `'exit' event` is emitted, the returned `Promise` is rejected
+ * immediately with an `ERR_WORKER_NOT_RUNNING` error.
+ * @since v13.9.0, v12.17.0
+ * @return A promise for a Readable Stream containing a V8 heap snapshot
+ */
+ getHeapSnapshot(): Promise<Readable>;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'exit', listener: (exitCode: number) => void): this;
+ addListener(event: 'message', listener: (value: any) => void): this;
+ addListener(event: 'messageerror', listener: (error: Error) => void): this;
+ addListener(event: 'online', listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: 'error', err: Error): boolean;
+ emit(event: 'exit', exitCode: number): boolean;
+ emit(event: 'message', value: any): boolean;
+ emit(event: 'messageerror', error: Error): boolean;
+ emit(event: 'online'): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'exit', listener: (exitCode: number) => void): this;
+ on(event: 'message', listener: (value: any) => void): this;
+ on(event: 'messageerror', listener: (error: Error) => void): this;
+ on(event: 'online', listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'exit', listener: (exitCode: number) => void): this;
+ once(event: 'message', listener: (value: any) => void): this;
+ once(event: 'messageerror', listener: (error: Error) => void): this;
+ once(event: 'online', listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependListener(event: 'message', listener: (value: any) => void): this;
+ prependListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependListener(event: 'online', listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'exit', listener: (exitCode: number) => void): this;
+ prependOnceListener(event: 'message', listener: (value: any) => void): this;
+ prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
+ prependOnceListener(event: 'online', listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: 'error', listener: (err: Error) => void): this;
+ removeListener(event: 'exit', listener: (exitCode: number) => void): this;
+ removeListener(event: 'message', listener: (value: any) => void): this;
+ removeListener(event: 'messageerror', listener: (error: Error) => void): this;
+ removeListener(event: 'online', listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: 'error', listener: (err: Error) => void): this;
+ off(event: 'exit', listener: (exitCode: number) => void): this;
+ off(event: 'message', listener: (value: any) => void): this;
+ off(event: 'messageerror', listener: (error: Error) => void): this;
+ off(event: 'online', listener: () => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ interface BroadcastChannel extends NodeJS.RefCounted {}
+ /**
+ * Instances of `BroadcastChannel` allow asynchronous one-to-many communication
+ * with all other `BroadcastChannel` instances bound to the same channel name.
+ *
+ * ```js
+ * 'use strict';
+ *
+ * const {
+ * isMainThread,
+ * BroadcastChannel,
+ * Worker
+ * } = require('worker_threads');
+ *
+ * const bc = new BroadcastChannel('hello');
+ *
+ * if (isMainThread) {
+ * let c = 0;
+ * bc.onmessage = (event) => {
+ * console.log(event.data);
+ * if (++c === 10) bc.close();
+ * };
+ * for (let n = 0; n < 10; n++)
+ * new Worker(__filename);
+ * } else {
+ * bc.postMessage('hello from every worker');
+ * bc.close();
+ * }
+ * ```
+ * @since v15.4.0
+ */
+ class BroadcastChannel {
+ readonly name: string;
+ /**
+ * Invoked with a single \`MessageEvent\` argument when a message is received.
+ * @since v15.4.0
+ */
+ onmessage: (message: unknown) => void;
+ /**
+ * Invoked with a received message cannot be deserialized.
+ * @since v15.4.0
+ */
+ onmessageerror: (message: unknown) => void;
+ constructor(name: string);
+ /**
+ * Closes the `BroadcastChannel` connection.
+ * @since v15.4.0
+ */
+ close(): void;
+ /**
+ * @since v15.4.0
+ * @param message Any cloneable JavaScript value.
+ */
+ postMessage(message: unknown): void;
+ }
+ /**
+ * Mark an object as not transferable. If `object` occurs in the transfer list of
+ * a `port.postMessage()` call, it is ignored.
+ *
+ * In particular, this makes sense for objects that can be cloned, rather than
+ * transferred, and which are used by other objects on the sending side.
+ * For example, Node.js marks the `ArrayBuffer`s it uses for its `Buffer pool` with this.
+ *
+ * This operation cannot be undone.
+ *
+ * ```js
+ * const { MessageChannel, markAsUntransferable } = require('worker_threads');
+ *
+ * const pooledBuffer = new ArrayBuffer(8);
+ * const typedArray1 = new Uint8Array(pooledBuffer);
+ * const typedArray2 = new Float64Array(pooledBuffer);
+ *
+ * markAsUntransferable(pooledBuffer);
+ *
+ * const { port1 } = new MessageChannel();
+ * port1.postMessage(typedArray1, [ typedArray1.buffer ]);
+ *
+ * // The following line prints the contents of typedArray1 -- it still owns
+ * // its memory and has been cloned, not transferred. Without
+ * // `markAsUntransferable()`, this would print an empty Uint8Array.
+ * // typedArray2 is intact as well.
+ * console.log(typedArray1);
+ * console.log(typedArray2);
+ * ```
+ *
+ * There is no equivalent to this API in browsers.
+ * @since v14.5.0, v12.19.0
+ */
+ function markAsUntransferable(object: object): void;
+ /**
+ * Transfer a `MessagePort` to a different `vm` Context. The original `port`object is rendered unusable, and the returned `MessagePort` instance
+ * takes its place.
+ *
+ * The returned `MessagePort` is an object in the target context and
+ * inherits from its global `Object` class. Objects passed to the [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) listener are also created in the
+ * target context
+ * and inherit from its global `Object` class.
+ *
+ * However, the created `MessagePort` no longer inherits from [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget), and only
+ * [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) can be used to receive
+ * events using it.
+ * @since v11.13.0
+ * @param port The message port to transfer.
+ * @param contextifiedSandbox A `contextified` object as returned by the `vm.createContext()` method.
+ */
+ function moveMessagePortToContext(port: MessagePort, contextifiedSandbox: Context): MessagePort;
+ /**
+ * Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
+ * that contains the message payload, corresponding to the oldest message in the`MessagePort`’s queue.
+ *
+ * ```js
+ * const { MessageChannel, receiveMessageOnPort } = require('worker_threads');
+ * const { port1, port2 } = new MessageChannel();
+ * port1.postMessage({ hello: 'world' });
+ *
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: { message: { hello: 'world' } }
+ * console.log(receiveMessageOnPort(port2));
+ * // Prints: undefined
+ * ```
+ *
+ * When this function is used, no `'message'` event is emitted and the`onmessage` listener is not invoked.
+ * @since v12.3.0
+ */
+ function receiveMessageOnPort(port: MessagePort):
+ | {
+ message: any;
+ }
+ | undefined;
+ type Serializable = string | object | number | boolean | bigint;
+ /**
+ * Within a worker thread, `worker.getEnvironmentData()` returns a clone
+ * of data passed to the spawning thread's `worker.setEnvironmentData()`.
+ * Every new `Worker` receives its own copy of the environment data
+ * automatically.
+ *
+ * ```js
+ * const {
+ * Worker,
+ * isMainThread,
+ * setEnvironmentData,
+ * getEnvironmentData,
+ * } = require('worker_threads');
+ *
+ * if (isMainThread) {
+ * setEnvironmentData('Hello', 'World!');
+ * const worker = new Worker(__filename);
+ * } else {
+ * console.log(getEnvironmentData('Hello')); // Prints 'World!'.
+ * }
+ * ```
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ */
+ function getEnvironmentData(key: Serializable): Serializable;
+ /**
+ * The `worker.setEnvironmentData()` API sets the content of`worker.getEnvironmentData()` in the current thread and all new `Worker`instances spawned from the current context.
+ * @since v15.12.0, v14.18.0
+ * @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
+ * @param value Any arbitrary, cloneable JavaScript value that will be cloned and passed automatically to all new `Worker` instances. If `value` is passed as `undefined`, any previously set value
+ * for the `key` will be deleted.
+ */
+ function setEnvironmentData(key: Serializable, value: Serializable): void;
+}
+declare module 'node:worker_threads' {
+ export * from 'worker_threads';
+}
diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts
new file mode 100755
index 0000000..1d7f0c0
--- /dev/null
+++ b/node_modules/@types/node/zlib.d.ts
@@ -0,0 +1,517 @@
+/**
+ * The `zlib` module provides compression functionality implemented using Gzip,
+ * Deflate/Inflate, and Brotli.
+ *
+ * To access it:
+ *
+ * ```js
+ * const zlib = require('zlib');
+ * ```
+ *
+ * Compression and decompression are built around the Node.js `Streams API`.
+ *
+ * Compressing or decompressing a stream (such as a file) can be accomplished by
+ * piping the source stream through a `zlib` `Transform` stream into a destination
+ * stream:
+ *
+ * ```js
+ * const { createGzip } = require('zlib');
+ * const { pipeline } = require('stream');
+ * const {
+ * createReadStream,
+ * createWriteStream
+ * } = require('fs');
+ *
+ * const gzip = createGzip();
+ * const source = createReadStream('input.txt');
+ * const destination = createWriteStream('input.txt.gz');
+ *
+ * pipeline(source, gzip, destination, (err) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('util');
+ * const pipe = promisify(pipeline);
+ *
+ * async function do_gzip(input, output) {
+ * const gzip = createGzip();
+ * const source = createReadStream(input);
+ * const destination = createWriteStream(output);
+ * await pipe(source, gzip, destination);
+ * }
+ *
+ * do_gzip('input.txt', 'input.txt.gz')
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ *
+ * It is also possible to compress or decompress data in a single step:
+ *
+ * ```js
+ * const { deflate, unzip } = require('zlib');
+ *
+ * const input = '.................................';
+ * deflate(input, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString('base64'));
+ * });
+ *
+ * const buffer = Buffer.from('eJzT0yMAAGTvBe8=', 'base64');
+ * unzip(buffer, (err, buffer) => {
+ * if (err) {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * }
+ * console.log(buffer.toString());
+ * });
+ *
+ * // Or, Promisified
+ *
+ * const { promisify } = require('util');
+ * const do_unzip = promisify(unzip);
+ *
+ * do_unzip(buffer)
+ * .then((buf) => console.log(buf.toString()))
+ * .catch((err) => {
+ * console.error('An error occurred:', err);
+ * process.exitCode = 1;
+ * });
+ * ```
+ * @since v0.5.8
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/zlib.js)
+ */
+declare module 'zlib' {
+ import * as stream from 'node:stream';
+ interface ZlibOptions {
+ /**
+ * @default constants.Z_NO_FLUSH
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.Z_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined; // compression only
+ memLevel?: number | undefined; // compression only
+ strategy?: number | undefined; // compression only
+ dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
+ info?: boolean | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface BrotliOptions {
+ /**
+ * @default constants.BROTLI_OPERATION_PROCESS
+ */
+ flush?: number | undefined;
+ /**
+ * @default constants.BROTLI_OPERATION_FINISH
+ */
+ finishFlush?: number | undefined;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number | undefined;
+ params?:
+ | {
+ /**
+ * Each key is a `constants.BROTLI_*` constant.
+ */
+ [key: number]: boolean | number;
+ }
+ | undefined;
+ maxOutputLength?: number | undefined;
+ }
+ interface Zlib {
+ /** @deprecated Use bytesWritten instead. */
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ shell?: boolean | string | undefined;
+ close(callback?: () => void): void;
+ flush(kind?: number, callback?: () => void): void;
+ flush(callback?: () => void): void;
+ }
+ interface ZlibParams {
+ params(level: number, strategy: number, callback: () => void): void;
+ }
+ interface ZlibReset {
+ reset(): void;
+ }
+ interface BrotliCompress extends stream.Transform, Zlib {}
+ interface BrotliDecompress extends stream.Transform, Zlib {}
+ interface Gzip extends stream.Transform, Zlib {}
+ interface Gunzip extends stream.Transform, Zlib {}
+ interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface Inflate extends stream.Transform, Zlib, ZlibReset {}
+ interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
+ interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
+ interface Unzip extends stream.Transform, Zlib {}
+ /**
+ * Creates and returns a new `BrotliCompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
+ /**
+ * Creates and returns a new `BrotliDecompress` object.
+ * @since v11.7.0, v10.16.0
+ */
+ function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
+ /**
+ * Creates and returns a new `Gzip` object.
+ * See `example`.
+ * @since v0.5.8
+ */
+ function createGzip(options?: ZlibOptions): Gzip;
+ /**
+ * Creates and returns a new `Gunzip` object.
+ * @since v0.5.8
+ */
+ function createGunzip(options?: ZlibOptions): Gunzip;
+ /**
+ * Creates and returns a new `Deflate` object.
+ * @since v0.5.8
+ */
+ function createDeflate(options?: ZlibOptions): Deflate;
+ /**
+ * Creates and returns a new `Inflate` object.
+ * @since v0.5.8
+ */
+ function createInflate(options?: ZlibOptions): Inflate;
+ /**
+ * Creates and returns a new `DeflateRaw` object.
+ *
+ * An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`is set to 8 for raw deflate streams. zlib would automatically set `windowBits`to 9 if was initially set to 8\. Newer
+ * versions of zlib will throw an exception,
+ * so Node.js restored the original behavior of upgrading a value of 8 to 9,
+ * since passing `windowBits = 9` to zlib actually results in a compressed stream
+ * that effectively uses an 8-bit window only.
+ * @since v0.5.8
+ */
+ function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
+ /**
+ * Creates and returns a new `InflateRaw` object.
+ * @since v0.5.8
+ */
+ function createInflateRaw(options?: ZlibOptions): InflateRaw;
+ /**
+ * Creates and returns a new `Unzip` object.
+ * @since v0.5.8
+ */
+ function createUnzip(options?: ZlibOptions): Unzip;
+ type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
+ type CompressCallback = (error: Error | null, result: Buffer) => void;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliCompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliCompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `BrotliCompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliDecompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliDecompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `BrotliDecompress`.
+ * @since v11.7.0, v10.16.0
+ */
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflate(buf: InputType, callback: CompressCallback): void;
+ function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Deflate`.
+ * @since v0.11.12
+ */
+ function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function deflateRaw(buf: InputType, callback: CompressCallback): void;
+ function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `DeflateRaw`.
+ * @since v0.11.12
+ */
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gzip(buf: InputType, callback: CompressCallback): void;
+ function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Compress a chunk of data with `Gzip`.
+ * @since v0.11.12
+ */
+ function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function gunzip(buf: InputType, callback: CompressCallback): void;
+ function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gunzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Gunzip`.
+ * @since v0.11.12
+ */
+ function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflate(buf: InputType, callback: CompressCallback): void;
+ function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Inflate`.
+ * @since v0.11.12
+ */
+ function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function inflateRaw(buf: InputType, callback: CompressCallback): void;
+ function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `InflateRaw`.
+ * @since v0.11.12
+ */
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+ /**
+ * @since v0.6.0
+ */
+ function unzip(buf: InputType, callback: CompressCallback): void;
+ function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace unzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+ /**
+ * Decompress a chunk of data with `Unzip`.
+ * @since v0.11.12
+ */
+ function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+ namespace constants {
+ const BROTLI_DECODE: number;
+ const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
+ const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
+ const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
+ const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
+ const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
+ const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
+ const BROTLI_DECODER_ERROR_UNREACHABLE: number;
+ const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_NO_ERROR: number;
+ const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
+ const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
+ const BROTLI_DECODER_RESULT_ERROR: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_RESULT_SUCCESS: number;
+ const BROTLI_DECODER_SUCCESS: number;
+ const BROTLI_DEFAULT_MODE: number;
+ const BROTLI_DEFAULT_QUALITY: number;
+ const BROTLI_DEFAULT_WINDOW: number;
+ const BROTLI_ENCODE: number;
+ const BROTLI_LARGE_MAX_WINDOW_BITS: number;
+ const BROTLI_MAX_INPUT_BLOCK_BITS: number;
+ const BROTLI_MAX_QUALITY: number;
+ const BROTLI_MAX_WINDOW_BITS: number;
+ const BROTLI_MIN_INPUT_BLOCK_BITS: number;
+ const BROTLI_MIN_QUALITY: number;
+ const BROTLI_MIN_WINDOW_BITS: number;
+ const BROTLI_MODE_FONT: number;
+ const BROTLI_MODE_GENERIC: number;
+ const BROTLI_MODE_TEXT: number;
+ const BROTLI_OPERATION_EMIT_METADATA: number;
+ const BROTLI_OPERATION_FINISH: number;
+ const BROTLI_OPERATION_FLUSH: number;
+ const BROTLI_OPERATION_PROCESS: number;
+ const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
+ const BROTLI_PARAM_LARGE_WINDOW: number;
+ const BROTLI_PARAM_LGBLOCK: number;
+ const BROTLI_PARAM_LGWIN: number;
+ const BROTLI_PARAM_MODE: number;
+ const BROTLI_PARAM_NDIRECT: number;
+ const BROTLI_PARAM_NPOSTFIX: number;
+ const BROTLI_PARAM_QUALITY: number;
+ const BROTLI_PARAM_SIZE_HINT: number;
+ const DEFLATE: number;
+ const DEFLATERAW: number;
+ const GUNZIP: number;
+ const GZIP: number;
+ const INFLATE: number;
+ const INFLATERAW: number;
+ const UNZIP: number;
+ // Allowed flush values.
+ const Z_NO_FLUSH: number;
+ const Z_PARTIAL_FLUSH: number;
+ const Z_SYNC_FLUSH: number;
+ const Z_FULL_FLUSH: number;
+ const Z_FINISH: number;
+ const Z_BLOCK: number;
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ const Z_OK: number;
+ const Z_STREAM_END: number;
+ const Z_NEED_DICT: number;
+ const Z_ERRNO: number;
+ const Z_STREAM_ERROR: number;
+ const Z_DATA_ERROR: number;
+ const Z_MEM_ERROR: number;
+ const Z_BUF_ERROR: number;
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ const Z_NO_COMPRESSION: number;
+ const Z_BEST_SPEED: number;
+ const Z_BEST_COMPRESSION: number;
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ const Z_FILTERED: number;
+ const Z_HUFFMAN_ONLY: number;
+ const Z_RLE: number;
+ const Z_FIXED: number;
+ const Z_DEFAULT_STRATEGY: number;
+ const Z_DEFAULT_WINDOWBITS: number;
+ const Z_MIN_WINDOWBITS: number;
+ const Z_MAX_WINDOWBITS: number;
+ const Z_MIN_CHUNK: number;
+ const Z_MAX_CHUNK: number;
+ const Z_DEFAULT_CHUNK: number;
+ const Z_MIN_MEMLEVEL: number;
+ const Z_MAX_MEMLEVEL: number;
+ const Z_DEFAULT_MEMLEVEL: number;
+ const Z_MIN_LEVEL: number;
+ const Z_MAX_LEVEL: number;
+ const Z_DEFAULT_LEVEL: number;
+ const ZLIB_VERNUM: number;
+ }
+ // Allowed flush values.
+ /** @deprecated Use `constants.Z_NO_FLUSH` */
+ const Z_NO_FLUSH: number;
+ /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
+ const Z_PARTIAL_FLUSH: number;
+ /** @deprecated Use `constants.Z_SYNC_FLUSH` */
+ const Z_SYNC_FLUSH: number;
+ /** @deprecated Use `constants.Z_FULL_FLUSH` */
+ const Z_FULL_FLUSH: number;
+ /** @deprecated Use `constants.Z_FINISH` */
+ const Z_FINISH: number;
+ /** @deprecated Use `constants.Z_BLOCK` */
+ const Z_BLOCK: number;
+ /** @deprecated Use `constants.Z_TREES` */
+ const Z_TREES: number;
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ /** @deprecated Use `constants.Z_OK` */
+ const Z_OK: number;
+ /** @deprecated Use `constants.Z_STREAM_END` */
+ const Z_STREAM_END: number;
+ /** @deprecated Use `constants.Z_NEED_DICT` */
+ const Z_NEED_DICT: number;
+ /** @deprecated Use `constants.Z_ERRNO` */
+ const Z_ERRNO: number;
+ /** @deprecated Use `constants.Z_STREAM_ERROR` */
+ const Z_STREAM_ERROR: number;
+ /** @deprecated Use `constants.Z_DATA_ERROR` */
+ const Z_DATA_ERROR: number;
+ /** @deprecated Use `constants.Z_MEM_ERROR` */
+ const Z_MEM_ERROR: number;
+ /** @deprecated Use `constants.Z_BUF_ERROR` */
+ const Z_BUF_ERROR: number;
+ /** @deprecated Use `constants.Z_VERSION_ERROR` */
+ const Z_VERSION_ERROR: number;
+ // Compression levels.
+ /** @deprecated Use `constants.Z_NO_COMPRESSION` */
+ const Z_NO_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_BEST_SPEED` */
+ const Z_BEST_SPEED: number;
+ /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
+ const Z_BEST_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
+ const Z_DEFAULT_COMPRESSION: number;
+ // Compression strategy.
+ /** @deprecated Use `constants.Z_FILTERED` */
+ const Z_FILTERED: number;
+ /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
+ const Z_HUFFMAN_ONLY: number;
+ /** @deprecated Use `constants.Z_RLE` */
+ const Z_RLE: number;
+ /** @deprecated Use `constants.Z_FIXED` */
+ const Z_FIXED: number;
+ /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
+ const Z_DEFAULT_STRATEGY: number;
+ /** @deprecated */
+ const Z_BINARY: number;
+ /** @deprecated */
+ const Z_TEXT: number;
+ /** @deprecated */
+ const Z_ASCII: number;
+ /** @deprecated */
+ const Z_UNKNOWN: number;
+ /** @deprecated */
+ const Z_DEFLATED: number;
+}
+declare module 'node:zlib' {
+ export * from 'zlib';
+}
diff --git a/node_modules/@types/responselike/LICENSE b/node_modules/@types/responselike/LICENSE
new file mode 100644
index 0000000..4b1ad51
--- /dev/null
+++ b/node_modules/@types/responselike/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/responselike/README.md b/node_modules/@types/responselike/README.md
new file mode 100644
index 0000000..4523ff9
--- /dev/null
+++ b/node_modules/@types/responselike/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/responselike`
+
+# Summary
+This package contains type definitions for responselike ( https://github.com/lukechilds/responselike#readme ).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/responselike
+
+Additional Details
+ * Last updated: Wed, 30 Jan 2019 18:47:32 GMT
+ * Dependencies: @types/node
+ * Global values: none
+
+# Credits
+These definitions were written by BendingBender <https://github.com/BendingBender>.
diff --git a/node_modules/@types/responselike/index.d.ts b/node_modules/@types/responselike/index.d.ts
new file mode 100644
index 0000000..7152388
--- /dev/null
+++ b/node_modules/@types/responselike/index.d.ts
@@ -0,0 +1,34 @@
+// Type definitions for responselike 1.0
+// Project: https://github.com/lukechilds/responselike#readme
+// Definitions by: BendingBender <https://github.com/BendingBender>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/// <reference types="node" />
+
+import { IncomingMessage } from 'http';
+import { Stream } from 'stream';
+
+export = ResponseLike;
+
+/**
+ * Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
+ */
+declare class ResponseLike extends Stream.Readable {
+ statusCode: number;
+ headers: { [header: string]: string | string[] | undefined };
+ body: Buffer;
+ url: string;
+
+ /**
+ * @param statusCode HTTP response status code.
+ * @param headers HTTP headers object. Keys will be automatically lowercased.
+ * @param body A Buffer containing the response body. The Buffer contents will be streamable but is also exposed directly as `response.body`.
+ * @param url Request URL string.
+ */
+ constructor(
+ statusCode: number,
+ headers: { [header: string]: string | string[] | undefined },
+ body: Buffer,
+ url: string
+ );
+}
diff --git a/node_modules/@types/responselike/package.json b/node_modules/@types/responselike/package.json
new file mode 100644
index 0000000..69b8caa
--- /dev/null
+++ b/node_modules/@types/responselike/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@types/responselike",
+ "version": "1.0.0",
+ "description": "TypeScript definitions for responselike",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "BendingBender",
+ "url": "https://github.com/BendingBender",
+ "githubUsername": "BendingBender"
+ }
+ ],
+ "main": "",
+ "types": "index",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*"
+ },
+ "typesPublisherContentHash": "38ee8db1511cdb4a9133ff67b8bc16901de733aa4dc1efffdb5064b7daaa3f21",
+ "typeScriptVersion": "2.0"
+} \ No newline at end of file
diff --git a/node_modules/@types/yauzl/LICENSE b/node_modules/@types/yauzl/LICENSE
new file mode 100755
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/yauzl/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/yauzl/README.md b/node_modules/@types/yauzl/README.md
new file mode 100755
index 0000000..094ba8a
--- /dev/null
+++ b/node_modules/@types/yauzl/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/yauzl`
+
+# Summary
+This package contains type definitions for yauzl (https://github.com/thejoshwolfe/yauzl).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yauzl.
+
+### Additional Details
+ * Last updated: Mon, 11 Apr 2022 02:01:17 GMT
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
+ * Global values: none
+
+# Credits
+These definitions were written by [Florian Keller](https://github.com/ffflorian).
diff --git a/node_modules/@types/yauzl/index.d.ts b/node_modules/@types/yauzl/index.d.ts
new file mode 100755
index 0000000..c6e3ddf
--- /dev/null
+++ b/node_modules/@types/yauzl/index.d.ts
@@ -0,0 +1,98 @@
+// Type definitions for yauzl 2.10
+// Project: https://github.com/thejoshwolfe/yauzl
+// Definitions by: Florian Keller <https://github.com/ffflorian>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/// <reference types="node" />
+
+import { EventEmitter } from 'events';
+import { Readable } from 'stream';
+
+export abstract class RandomAccessReader extends EventEmitter {
+ _readStreamForRange(start: number, end: number): void;
+ createReadStream(options: { start: number; end: number }): void;
+ read(buffer: Buffer, offset: number, length: number, position: number, callback: (err: Error | null) => void): void;
+ close(callback: (err: Error | null) => void): void;
+}
+
+export class Entry {
+ comment: string;
+ compressedSize: number;
+ compressionMethod: number;
+ crc32: number;
+ externalFileAttributes: number;
+ extraFieldLength: number;
+ extraFields: Array<{ id: number; data: Buffer }>;
+ fileCommentLength: number;
+ fileName: string;
+ fileNameLength: number;
+ generalPurposeBitFlag: number;
+ internalFileAttributes: number;
+ lastModFileDate: number;
+ lastModFileTime: number;
+ relativeOffsetOfLocalHeader: number;
+ uncompressedSize: number;
+ versionMadeBy: number;
+ versionNeededToExtract: number;
+
+ getLastModDate(): Date;
+ isEncrypted(): boolean;
+ isCompressed(): boolean;
+}
+
+export interface ZipFileOptions {
+ decompress: boolean | null;
+ decrypt: boolean | null;
+ start: number | null;
+ end: number | null;
+}
+
+export class ZipFile extends EventEmitter {
+ autoClose: boolean;
+ comment: string;
+ decodeStrings: boolean;
+ emittedError: boolean;
+ entriesRead: number;
+ entryCount: number;
+ fileSize: number;
+ isOpen: boolean;
+ lazyEntries: boolean;
+ readEntryCursor: boolean;
+ validateEntrySizes: boolean;
+
+ constructor(
+ reader: RandomAccessReader,
+ centralDirectoryOffset: number,
+ fileSize: number,
+ entryCount: number,
+ comment: string,
+ autoClose: boolean,
+ lazyEntries: boolean,
+ decodeStrings: boolean,
+ validateEntrySizes: boolean,
+ );
+
+ openReadStream(entry: Entry, options: ZipFileOptions, callback: (err: Error | null, stream: Readable) => void): void;
+ openReadStream(entry: Entry, callback: (err: Error | null, stream: Readable) => void): void;
+ close(): void;
+ readEntry(): void;
+}
+
+export interface Options {
+ autoClose?: boolean | undefined;
+ lazyEntries?: boolean | undefined;
+ decodeStrings?: boolean | undefined;
+ validateEntrySizes?: boolean | undefined;
+ strictFileNames?: boolean | undefined;
+}
+
+export function open(path: string, options: Options, callback?: (err: Error | null, zipfile: ZipFile) => void): void;
+export function open(path: string, callback?: (err: Error | null, zipfile: ZipFile) => void): void;
+export function fromFd(fd: number, options: Options, callback?: (err: Error | null, zipfile: ZipFile) => void): void;
+export function fromFd(fd: number, callback?: (err: Error | null, zipfile: ZipFile) => void): void;
+export function fromBuffer(buffer: Buffer, options: Options, callback?: (err: Error | null, zipfile: ZipFile) => void): void;
+export function fromBuffer(buffer: Buffer, callback?: (err: Error | null, zipfile: ZipFile) => void): void;
+export function fromRandomAccessReader(reader: RandomAccessReader, totalSize: number, options: Options, callback: (err: Error | null, zipfile: ZipFile) => void): void;
+export function fromRandomAccessReader(reader: RandomAccessReader, totalSize: number, callback: (err: Error | null, zipfile: ZipFile) => void): void;
+export function dosDateTimeToDate(date: number, time: number): Date;
+export function validateFileName(fileName: string): string | null;
diff --git a/node_modules/@types/yauzl/package.json b/node_modules/@types/yauzl/package.json
new file mode 100755
index 0000000..fbd38b9
--- /dev/null
+++ b/node_modules/@types/yauzl/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "@types/yauzl",
+ "version": "2.10.0",
+ "description": "TypeScript definitions for yauzl",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yauzl",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Florian Keller",
+ "url": "https://github.com/ffflorian",
+ "githubUsername": "ffflorian"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/yauzl"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*"
+ },
+ "typesPublisherContentHash": "183e6a31c00c4e59b6e6ffe0cf97b06d4b843b2d1208d8917820cbb70b57eae9",
+ "typeScriptVersion": "3.9"
+} \ No newline at end of file
diff --git a/node_modules/ajv/.tonic_example.js b/node_modules/ajv/.tonic_example.js
new file mode 100644
index 0000000..aa11812
--- /dev/null
+++ b/node_modules/ajv/.tonic_example.js
@@ -0,0 +1,20 @@
+var Ajv = require('ajv');
+var ajv = new Ajv({allErrors: true});
+
+var schema = {
+ "properties": {
+ "foo": { "type": "string" },
+ "bar": { "type": "number", "maximum": 3 }
+ }
+};
+
+var validate = ajv.compile(schema);
+
+test({"foo": "abc", "bar": 2});
+test({"foo": 2, "bar": 4});
+
+function test(data) {
+ var valid = validate(data);
+ if (valid) console.log('Valid!');
+ else console.log('Invalid: ' + ajv.errorsText(validate.errors));
+} \ No newline at end of file
diff --git a/node_modules/ajv/LICENSE b/node_modules/ajv/LICENSE
new file mode 100644
index 0000000..96ee719
--- /dev/null
+++ b/node_modules/ajv/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2017 Evgeny Poberezkin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/ajv/README.md b/node_modules/ajv/README.md
new file mode 100644
index 0000000..5aa2078
--- /dev/null
+++ b/node_modules/ajv/README.md
@@ -0,0 +1,1497 @@
+<img align="right" alt="Ajv logo" width="160" src="https://ajv.js.org/images/ajv_logo.png">
+
+# Ajv: Another JSON Schema Validator
+
+The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07.
+
+[![Build Status](https://travis-ci.org/ajv-validator/ajv.svg?branch=master)](https://travis-ci.org/ajv-validator/ajv)
+[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv)
+[![npm (beta)](https://img.shields.io/npm/v/ajv/beta)](https://www.npmjs.com/package/ajv/v/7.0.0-beta.0)
+[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv)
+[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master)
+[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
+[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin)
+
+
+## Ajv v7 beta is released
+
+[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes:
+
+- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements.
+- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe.
+- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas.
+- schemas are compiled to ES6 code (ES5 code generation is supported with an option).
+- to improve reliability and maintainability the code is migrated to TypeScript.
+
+**Please note**:
+
+- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021).
+- all formats are separated to ajv-formats package - they have to be explicitely added if you use them.
+
+See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details.
+
+To install the new version:
+
+```bash
+npm install ajv@beta
+```
+
+See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example.
+
+
+## Mozilla MOSS grant and OpenJS Foundation
+
+[<img src="https://www.poberezkin.com/images/mozilla.png" width="240" height="68">](https://www.mozilla.org/en-US/moss/) &nbsp;&nbsp;&nbsp; [<img src="https://www.poberezkin.com/images/openjs.png" width="220" height="68">](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/)
+
+Ajv has been awarded a grant from Mozilla’s [Open Source Support (MOSS) program](https://www.mozilla.org/en-US/moss/) in the “Foundational Technology” track! It will sponsor the development of Ajv support of [JSON Schema version 2019-09](https://tools.ietf.org/html/draft-handrews-json-schema-02) and of [JSON Type Definition](https://tools.ietf.org/html/draft-ucarion-json-type-definition-04).
+
+Ajv also joined [OpenJS Foundation](https://openjsf.org/) – having this support will help ensure the longevity and stability of Ajv for all its users.
+
+This [blog post](https://www.poberezkin.com/posts/2020-08-14-ajv-json-validator-mozilla-open-source-grant-openjs-foundation.html) has more details.
+
+I am looking for the long term maintainers of Ajv – working with [ReadySet](https://www.thereadyset.co/), also sponsored by Mozilla, to establish clear guidelines for the role of a "maintainer" and the contribution standards, and to encourage a wider, more inclusive, contribution from the community.
+
+
+## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
+
+Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
+
+Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
+
+Please sponsor Ajv via:
+- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
+- [Ajv Open Collective️](https://opencollective.com/ajv)
+
+Thank you.
+
+
+#### Open Collective sponsors
+
+<a href="https://opencollective.com/ajv"><img src="https://opencollective.com/ajv/individuals.svg?width=890"></a>
+
+<a href="https://opencollective.com/ajv/organization/0/website"><img src="https://opencollective.com/ajv/organization/0/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/1/website"><img src="https://opencollective.com/ajv/organization/1/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/2/website"><img src="https://opencollective.com/ajv/organization/2/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/3/website"><img src="https://opencollective.com/ajv/organization/3/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/4/website"><img src="https://opencollective.com/ajv/organization/4/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/5/website"><img src="https://opencollective.com/ajv/organization/5/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/6/website"><img src="https://opencollective.com/ajv/organization/6/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/7/website"><img src="https://opencollective.com/ajv/organization/7/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/8/website"><img src="https://opencollective.com/ajv/organization/8/avatar.svg"></a>
+<a href="https://opencollective.com/ajv/organization/9/website"><img src="https://opencollective.com/ajv/organization/9/avatar.svg"></a>
+
+
+## Using version 6
+
+[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published.
+
+[Ajv version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes).
+
+__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance:
+
+```javascript
+ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'));
+```
+
+To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId:
+
+```javascript
+var ajv = new Ajv({schemaId: 'id'});
+// If you want to use both draft-04 and draft-06/07 schemas:
+// var ajv = new Ajv({schemaId: 'auto'});
+ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json'));
+```
+
+
+## Contents
+
+- [Performance](#performance)
+- [Features](#features)
+- [Getting started](#getting-started)
+- [Frequently Asked Questions](https://github.com/ajv-validator/ajv/blob/master/FAQ.md)
+- [Using in browser](#using-in-browser)
+ - [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp)
+- [Command line interface](#command-line-interface)
+- Validation
+ - [Keywords](#validation-keywords)
+ - [Annotation keywords](#annotation-keywords)
+ - [Formats](#formats)
+ - [Combining schemas with $ref](#ref)
+ - [$data reference](#data-reference)
+ - NEW: [$merge and $patch keywords](#merge-and-patch-keywords)
+ - [Defining custom keywords](#defining-custom-keywords)
+ - [Asynchronous schema compilation](#asynchronous-schema-compilation)
+ - [Asynchronous validation](#asynchronous-validation)
+- [Security considerations](#security-considerations)
+ - [Security contact](#security-contact)
+ - [Untrusted schemas](#untrusted-schemas)
+ - [Circular references in objects](#circular-references-in-javascript-objects)
+ - [Trusted schemas](#security-risks-of-trusted-schemas)
+ - [ReDoS attack](#redos-attack)
+- Modifying data during validation
+ - [Filtering data](#filtering-data)
+ - [Assigning defaults](#assigning-defaults)
+ - [Coercing data types](#coercing-data-types)
+- API
+ - [Methods](#api)
+ - [Options](#options)
+ - [Validation errors](#validation-errors)
+- [Plugins](#plugins)
+- [Related packages](#related-packages)
+- [Some packages using Ajv](#some-packages-using-ajv)
+- [Tests, Contributing, Changes history](#tests)
+- [Support, Code of conduct, License](#open-source-software-support)
+
+
+## Performance
+
+Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
+
+Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
+
+- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
+- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
+- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
+- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
+
+
+Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
+
+[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
+
+
+## Features
+
+- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards:
+ - all validation keywords (see [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md))
+ - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available)
+ - support of circular references between schemas
+ - correct string lengths for strings with unicode pairs (can be turned off)
+ - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off)
+ - [validates schemas against meta-schema](#api-validateschema)
+- supports [browsers](#using-in-browser) and Node.js 0.10-14.x
+- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation
+- "All errors" validation mode with [option allErrors](#options)
+- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages
+- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
+- [filtering data](#filtering-data) from additional properties
+- [assigning defaults](#assigning-defaults) to missing properties and items
+- [coercing data](#coercing-data-types) to the types specified in `type` keywords
+- [custom keywords](#defining-custom-keywords)
+- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else`
+- draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail).
+- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
+- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords
+- [asynchronous validation](#asynchronous-validation) of custom formats and keywords
+
+
+## Install
+
+```
+npm install ajv
+```
+
+
+## <a name="usage"></a>Getting started
+
+Try it in the Node.js REPL: https://tonicdev.com/npm/ajv
+
+
+The fastest validation call:
+
+```javascript
+// Node.js require:
+var Ajv = require('ajv');
+// or ESM/TypeScript import
+import Ajv from 'ajv';
+
+var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true}
+var validate = ajv.compile(schema);
+var valid = validate(data);
+if (!valid) console.log(validate.errors);
+```
+
+or with less code
+
+```javascript
+// ...
+var valid = ajv.validate(schema, data);
+if (!valid) console.log(ajv.errors);
+// ...
+```
+
+or
+
+```javascript
+// ...
+var valid = ajv.addSchema(schema, 'mySchema')
+ .validate('mySchema', data);
+if (!valid) console.log(ajv.errorsText());
+// ...
+```
+
+See [API](#api) and [Options](#options) for more details.
+
+Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again.
+
+The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call).
+
+__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors)
+
+__Note for TypeScript users__: `ajv` provides its own TypeScript declarations
+out of the box, so you don't need to install the deprecated `@types/ajv`
+module.
+
+
+## Using in browser
+
+You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle.
+
+If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)).
+
+Then you need to load Ajv in the browser:
+```html
+<script src="ajv.min.js"></script>
+```
+
+This bundle can be used with different module systems; it creates global `Ajv` if no module system is found.
+
+The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv).
+
+Ajv is tested with these browsers:
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin)
+
+__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/ajv-validator/ajv/issues/234)).
+
+
+### Ajv and Content Security Policies (CSP)
+
+If you're using Ajv to compile a schema (the typical use) in a browser document that is loaded with a Content Security Policy (CSP), that policy will require a `script-src` directive that includes the value `'unsafe-eval'`.
+:warning: NOTE, however, that `unsafe-eval` is NOT recommended in a secure CSP[[1]](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval), as it has the potential to open the document to cross-site scripting (XSS) attacks.
+
+In order to make use of Ajv without easing your CSP, you can [pre-compile a schema using the CLI](https://github.com/ajv-validator/ajv-cli#compile-schemas). This will transpile the schema JSON into a JavaScript file that exports a `validate` function that works simlarly to a schema compiled at runtime.
+
+Note that pre-compilation of schemas is performed using [ajv-pack](https://github.com/ajv-validator/ajv-pack) and there are [some limitations to the schema features it can compile](https://github.com/ajv-validator/ajv-pack#limitations). A successfully pre-compiled schema is equivalent to the same schema compiled at runtime.
+
+
+## Command line interface
+
+CLI is available as a separate npm package [ajv-cli](https://github.com/ajv-validator/ajv-cli). It supports:
+
+- compiling JSON Schemas to test their validity
+- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/ajv-validator/ajv-pack))
+- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate))
+- validating data file(s) against JSON Schema
+- testing expected validity of data against JSON Schema
+- referenced schemas
+- custom meta-schemas
+- files in JSON, JSON5, YAML, and JavaScript format
+- all Ajv options
+- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format
+
+
+## Validation keywords
+
+Ajv supports all validation keywords from draft-07 of JSON Schema standard:
+
+- [type](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#type)
+- [for numbers](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf
+- [for strings](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format
+- [for arrays](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#contains)
+- [for objects](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#propertynames)
+- [for all types](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#const)
+- [compound keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#ifthenelse)
+
+With [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard:
+
+- [patternRequired](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match.
+- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc.
+
+See [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md) for more details.
+
+
+## Annotation keywords
+
+JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation.
+
+- `title` and `description`: information about the data represented by that schema
+- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options).
+- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults).
+- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema.
+- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.).
+- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64".
+- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png".
+
+__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance.
+
+
+## Formats
+
+Ajv implements formats defined by JSON Schema specification and several other formats. It is recommended NOT to use "format" keyword implementations with untrusted data, as they use potentially unsafe regular expressions - see [ReDoS attack](#redos-attack).
+
+__Please note__: if you need to use "format" keyword to validate untrusted data, you MUST assess their suitability and safety for your validation scenarios.
+
+The following formats are implemented for string validation with "format" keyword:
+
+- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6).
+- _time_: time with optional time-zone.
+- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)).
+- _uri_: full URI.
+- _uri-reference_: URI reference, including full and relative URIs.
+- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570)
+- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url).
+- _email_: email address.
+- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5).
+- _ipv4_: IP address v4.
+- _ipv6_: IP address v6.
+- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor.
+- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122).
+- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901).
+- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00).
+
+__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here.
+
+There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, and `email`. See [Options](#options) for details.
+
+You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method.
+
+The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can allow specific format(s) that will be ignored. See [Options](#options) for details.
+
+You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js).
+
+
+## <a name="ref"></a>Combining schemas with $ref
+
+You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword.
+
+Example:
+
+```javascript
+var schema = {
+ "$id": "http://example.com/schemas/schema.json",
+ "type": "object",
+ "properties": {
+ "foo": { "$ref": "defs.json#/definitions/int" },
+ "bar": { "$ref": "defs.json#/definitions/str" }
+ }
+};
+
+var defsSchema = {
+ "$id": "http://example.com/schemas/defs.json",
+ "definitions": {
+ "int": { "type": "integer" },
+ "str": { "type": "string" }
+ }
+};
+```
+
+Now to compile your schema you can either pass all schemas to Ajv instance:
+
+```javascript
+var ajv = new Ajv({schemas: [schema, defsSchema]});
+var validate = ajv.getSchema('http://example.com/schemas/schema.json');
+```
+
+or use `addSchema` method:
+
+```javascript
+var ajv = new Ajv;
+var validate = ajv.addSchema(defsSchema)
+ .compile(schema);
+```
+
+See [Options](#options) and [addSchema](#api) method.
+
+__Please note__:
+- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example).
+- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.).
+- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs.
+- The actual location of the schema file in the file system is not used.
+- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id.
+- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown.
+- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation).
+
+
+## $data reference
+
+With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema-org/json-schema-spec/issues/51) for more information about how it works.
+
+`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems.
+
+The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema).
+
+Examples.
+
+This schema requires that the value in property `smaller` is less or equal than the value in the property larger:
+
+```javascript
+var ajv = new Ajv({$data: true});
+
+var schema = {
+ "properties": {
+ "smaller": {
+ "type": "number",
+ "maximum": { "$data": "1/larger" }
+ },
+ "larger": { "type": "number" }
+ }
+};
+
+var validData = {
+ smaller: 5,
+ larger: 7
+};
+
+ajv.validate(schema, validData); // true
+```
+
+This schema requires that the properties have the same format as their field names:
+
+```javascript
+var schema = {
+ "additionalProperties": {
+ "type": "string",
+ "format": { "$data": "0#" }
+ }
+};
+
+var validData = {
+ 'date-time': '1963-06-19T08:30:06.283185Z',
+ email: 'joe.bloggs@example.com'
+}
+```
+
+`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails.
+
+
+## $merge and $patch keywords
+
+With the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902).
+
+To add keywords `$merge` and `$patch` to Ajv instance use this code:
+
+```javascript
+require('ajv-merge-patch')(ajv);
+```
+
+Examples.
+
+Using `$merge`:
+
+```json
+{
+ "$merge": {
+ "source": {
+ "type": "object",
+ "properties": { "p": { "type": "string" } },
+ "additionalProperties": false
+ },
+ "with": {
+ "properties": { "q": { "type": "number" } }
+ }
+ }
+}
+```
+
+Using `$patch`:
+
+```json
+{
+ "$patch": {
+ "source": {
+ "type": "object",
+ "properties": { "p": { "type": "string" } },
+ "additionalProperties": false
+ },
+ "with": [
+ { "op": "add", "path": "/properties/q", "value": { "type": "number" } }
+ ]
+ }
+}
+```
+
+The schemas above are equivalent to this schema:
+
+```json
+{
+ "type": "object",
+ "properties": {
+ "p": { "type": "string" },
+ "q": { "type": "number" }
+ },
+ "additionalProperties": false
+}
+```
+
+The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema.
+
+See the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) for more information.
+
+
+## Defining custom keywords
+
+The advantages of using custom keywords are:
+
+- allow creating validation scenarios that cannot be expressed using JSON Schema
+- simplify your schemas
+- help bringing a bigger part of the validation logic to your schemas
+- make your schemas more expressive, less verbose and closer to your application domain
+- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated
+
+If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result).
+
+The concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas.
+
+You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords.
+
+Ajv allows defining keywords with:
+- validation function
+- compilation function
+- macro function
+- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema.
+
+Example. `range` and `exclusiveRange` keywords using compiled schema:
+
+```javascript
+ajv.addKeyword('range', {
+ type: 'number',
+ compile: function (sch, parentSchema) {
+ var min = sch[0];
+ var max = sch[1];
+
+ return parentSchema.exclusiveRange === true
+ ? function (data) { return data > min && data < max; }
+ : function (data) { return data >= min && data <= max; }
+ }
+});
+
+var schema = { "range": [2, 4], "exclusiveRange": true };
+var validate = ajv.compile(schema);
+console.log(validate(2.01)); // true
+console.log(validate(3.99)); // true
+console.log(validate(2)); // false
+console.log(validate(4)); // false
+```
+
+Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords.
+
+See [Defining custom keywords](https://github.com/ajv-validator/ajv/blob/master/CUSTOM.md) for more details.
+
+
+## Asynchronous schema compilation
+
+During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options).
+
+Example:
+
+```javascript
+var ajv = new Ajv({ loadSchema: loadSchema });
+
+ajv.compileAsync(schema).then(function (validate) {
+ var valid = validate(data);
+ // ...
+});
+
+function loadSchema(uri) {
+ return request.json(uri).then(function (res) {
+ if (res.statusCode >= 400)
+ throw new Error('Loading error: ' + res.statusCode);
+ return res.body;
+ });
+}
+```
+
+__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work.
+
+
+## Asynchronous validation
+
+Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation
+
+You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)).
+
+If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation.
+
+__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail.
+
+Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function).
+
+Ajv compiles asynchronous schemas to [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. See [Options](#options).
+
+The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas.
+
+Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property.
+
+
+Example:
+
+```javascript
+var ajv = new Ajv;
+// require('ajv-async')(ajv);
+
+ajv.addKeyword('idExists', {
+ async: true,
+ type: 'number',
+ validate: checkIdExists
+});
+
+
+function checkIdExists(schema, data) {
+ return knex(schema.table)
+ .select('id')
+ .where('id', data)
+ .then(function (rows) {
+ return !!rows.length; // true if record is found
+ });
+}
+
+var schema = {
+ "$async": true,
+ "properties": {
+ "userId": {
+ "type": "integer",
+ "idExists": { "table": "users" }
+ },
+ "postId": {
+ "type": "integer",
+ "idExists": { "table": "posts" }
+ }
+ }
+};
+
+var validate = ajv.compile(schema);
+
+validate({ userId: 1, postId: 19 })
+.then(function (data) {
+ console.log('Data is valid', data); // { userId: 1, postId: 19 }
+})
+.catch(function (err) {
+ if (!(err instanceof Ajv.ValidationError)) throw err;
+ // data is invalid
+ console.log('Validation errors:', err.errors);
+});
+```
+
+### Using transpilers with asynchronous validation functions.
+
+[ajv-async](https://github.com/ajv-validator/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser).
+
+
+#### Using nodent
+
+```javascript
+var ajv = new Ajv;
+require('ajv-async')(ajv);
+// in the browser if you want to load ajv-async bundle separately you can:
+// window.ajvAsync(ajv);
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+
+#### Using other transpilers
+
+```javascript
+var ajv = new Ajv({ processCode: transpileFunc });
+var validate = ajv.compile(schema); // transpiled es7 async function
+validate(data).then(successFunc).catch(errorFunc);
+```
+
+See [Options](#options).
+
+
+## Security considerations
+
+JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider.
+
+
+##### Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
+
+
+##### Untrusted schemas
+
+Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application.
+
+If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent:
+- compiling schemas can cause stack overflow (if they are too deep)
+- compiling schemas can be slow (e.g. [#557](https://github.com/ajv-validator/ajv/issues/557))
+- validating certain data can be slow
+
+It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords.
+
+Regardless the measures you take, using untrusted schemas increases security risks.
+
+
+##### Circular references in JavaScript objects
+
+Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/ajv-validator/ajv/issues/802).
+
+An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references.
+
+
+##### Security risks of trusted schemas
+
+Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to):
+
+- `pattern` and `format` for large strings - in some cases using `maxLength` can help mitigate it, but certain regular expressions can lead to exponential validation time even with relatively short strings (see [ReDoS attack](#redos-attack)).
+- `patternProperties` for large property names - use `propertyNames` to mitigate, but some regular expressions can have exponential evaluation time as well.
+- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate
+
+__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors).
+
+You can validate your JSON schemas against [this meta-schema](https://github.com/ajv-validator/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed:
+
+```javascript
+const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json'));
+
+const schema1 = {format: 'email'};
+isSchemaSecure(schema1); // false
+
+const schema2 = {format: 'email', maxLength: MAX_LENGTH};
+isSchemaSecure(schema2); // true
+```
+
+__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results.
+
+
+##### Content Security Policies (CSP)
+See [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp)
+
+
+## ReDoS attack
+
+Certain regular expressions can lead to the exponential evaluation time even with relatively short strings.
+
+Please assess the regular expressions you use in the schemas on their vulnerability to this attack - see [safe-regex](https://github.com/substack/safe-regex), for example.
+
+__Please note__: some formats that Ajv implements use [regular expressions](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js) that can be vulnerable to ReDoS attack, so if you use Ajv to validate data from untrusted sources __it is strongly recommended__ to consider the following:
+
+- making assessment of "format" implementations in Ajv.
+- using `format: 'fast'` option that simplifies some of the regular expressions (although it does not guarantee that they are safe).
+- replacing format implementations provided by Ajv with your own implementations of "format" keyword that either uses different regular expressions or another approach to format validation. Please see [addFormat](#api-addformat) method.
+- disabling format validation by ignoring "format" keyword with option `format: false`
+
+Whatever mitigation you choose, please assume all formats provided by Ajv as potentially unsafe and make your own assessment of their suitability for your validation scenarios.
+
+
+## Filtering data
+
+With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation.
+
+This option modifies original data.
+
+Example:
+
+```javascript
+var ajv = new Ajv({ removeAdditional: true });
+var schema = {
+ "additionalProperties": false,
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": {
+ "additionalProperties": { "type": "number" },
+ "properties": {
+ "baz": { "type": "string" }
+ }
+ }
+ }
+}
+
+var data = {
+ "foo": 0,
+ "additional1": 1, // will be removed; `additionalProperties` == false
+ "bar": {
+ "baz": "abc",
+ "additional2": 2 // will NOT be removed; `additionalProperties` != false
+ },
+}
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 }
+```
+
+If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed.
+
+If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed).
+
+__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example:
+
+```json
+{
+ "type": "object",
+ "oneOf": [
+ {
+ "properties": {
+ "foo": { "type": "string" }
+ },
+ "required": [ "foo" ],
+ "additionalProperties": false
+ },
+ {
+ "properties": {
+ "bar": { "type": "integer" }
+ },
+ "required": [ "bar" ],
+ "additionalProperties": false
+ }
+ ]
+}
+```
+
+The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties.
+
+With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema).
+
+While this behaviour is unexpected (issues [#129](https://github.com/ajv-validator/ajv/issues/129), [#134](https://github.com/ajv-validator/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way:
+
+```json
+{
+ "type": "object",
+ "properties": {
+ "foo": { "type": "string" },
+ "bar": { "type": "integer" }
+ },
+ "additionalProperties": false,
+ "oneOf": [
+ { "required": [ "foo" ] },
+ { "required": [ "bar" ] }
+ ]
+}
+```
+
+The schema above is also more efficient - it will compile into a faster function.
+
+
+## Assigning defaults
+
+With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items.
+
+With the option value `"empty"` properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults.
+
+This option modifies original data.
+
+__Please note__: the default value is inserted in the generated validation code as a literal, so the value inserted in the data will be the deep clone of the default in the schema.
+
+
+Example 1 (`default` in `properties`):
+
+```javascript
+var ajv = new Ajv({ useDefaults: true });
+var schema = {
+ "type": "object",
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": { "type": "string", "default": "baz" }
+ },
+ "required": [ "foo", "bar" ]
+};
+
+var data = { "foo": 1 };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 1, "bar": "baz" }
+```
+
+Example 2 (`default` in `items`):
+
+```javascript
+var schema = {
+ "type": "array",
+ "items": [
+ { "type": "number" },
+ { "type": "string", "default": "foo" }
+ ]
+}
+
+var data = [ 1 ];
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // [ 1, "foo" ]
+```
+
+`default` keywords in other cases are ignored:
+
+- not in `properties` or `items` subschemas
+- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/ajv-validator/ajv/issues/42))
+- in `if` subschema of `switch` keyword
+- in schemas generated by custom macro keywords
+
+The [`strictDefaults` option](#options) customizes Ajv's behavior for the defaults that Ajv ignores (`true` raises an error, and `"log"` outputs a warning).
+
+
+## Coercing data types
+
+When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards.
+
+This option modifies original data.
+
+__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value.
+
+
+Example 1:
+
+```javascript
+var ajv = new Ajv({ coerceTypes: true });
+var schema = {
+ "type": "object",
+ "properties": {
+ "foo": { "type": "number" },
+ "bar": { "type": "boolean" }
+ },
+ "required": [ "foo", "bar" ]
+};
+
+var data = { "foo": "1", "bar": "false" };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": 1, "bar": false }
+```
+
+Example 2 (array coercions):
+
+```javascript
+var ajv = new Ajv({ coerceTypes: 'array' });
+var schema = {
+ "properties": {
+ "foo": { "type": "array", "items": { "type": "number" } },
+ "bar": { "type": "boolean" }
+ }
+};
+
+var data = { "foo": "1", "bar": ["false"] };
+
+var validate = ajv.compile(schema);
+
+console.log(validate(data)); // true
+console.log(data); // { "foo": [1], "bar": false }
+```
+
+The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords).
+
+See [Coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md) for details.
+
+
+## API
+
+##### new Ajv(Object options) -&gt; Object
+
+Create Ajv instance.
+
+
+##### .compile(Object schema) -&gt; Function&lt;Object data&gt;
+
+Generate validating function and cache the compiled schema for future use.
+
+Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema.
+
+The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options).
+
+
+##### <a name="api-compileAsync"></a>.compileAsync(Object schema [, Boolean meta] [, Function callback]) -&gt; Promise
+
+Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when:
+
+- missing schema can't be loaded (`loadSchema` returns a Promise that rejects).
+- a schema containing a missing reference is loaded, but the reference cannot be resolved.
+- schema (or some loaded/referenced schema) is invalid.
+
+The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded.
+
+You can asynchronously compile meta-schema by passing `true` as the second parameter.
+
+See example in [Asynchronous compilation](#asynchronous-schema-compilation).
+
+
+##### .validate(Object schema|String key|String ref, data) -&gt; Boolean
+
+Validate data using passed schema (it will be compiled and cached).
+
+Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference.
+
+Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors).
+
+__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later.
+
+If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation).
+
+
+##### .addSchema(Array&lt;Object&gt;|Object schema [, String key]) -&gt; Ajv
+
+Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole.
+
+Array of schemas can be passed (schemas should have ids), the second parameter will be ignored.
+
+Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key.
+
+
+Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data.
+
+Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time.
+
+By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option.
+
+__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`.
+This allows you to do nice things like the following.
+
+```javascript
+var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri);
+```
+
+##### .addMetaSchema(Array&lt;Object&gt;|Object schema [, String key]) -&gt; Ajv
+
+Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option).
+
+There is no need to explicitly add draft-07 meta schema (http://json-schema.org/draft-07/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`.
+
+
+##### <a name="api-validateschema"></a>.validateSchema(Object schema) -&gt; Boolean
+
+Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard.
+
+By default this method is called automatically when the schema is added, so you rarely need to use it directly.
+
+If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false).
+
+If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema.
+
+Errors will be available at `ajv.errors`.
+
+
+##### .getSchema(String key) -&gt; Function&lt;Object data&gt;
+
+Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema.
+
+
+##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -&gt; Ajv
+
+Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references.
+
+Schema can be removed using:
+- key passed to `addSchema`
+- it's full reference (id)
+- RegExp that should match schema id or key (meta-schemas won't be removed)
+- actual schema object that will be stable-stringified to remove schema from cache
+
+If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared.
+
+
+##### <a name="api-addformat"></a>.addFormat(String name, String|RegExp|Function|Object format) -&gt; Ajv
+
+Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance.
+
+Strings are converted to RegExp.
+
+Function should return validation result as `true` or `false`.
+
+If object is passed it should have properties `validate`, `compare` and `async`:
+
+- _validate_: a string, RegExp or a function as described above.
+- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal.
+- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`.
+- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/ajv-validator/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass.
+
+Custom formats can be also added via `formats` option.
+
+
+##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition) -&gt; Ajv
+
+Add custom validation keyword to Ajv instance.
+
+Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance.
+
+Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`.
+It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions.
+
+Example Keywords:
+- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions.
+- `"example"`: valid, but not recommended as it could collide with future versions of JSON Schema etc.
+- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword
+
+Keyword definition is an object with the following properties:
+
+- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types.
+- _validate_: validating function
+- _compile_: compiling function
+- _macro_: macro function
+- _inline_: compiling function that returns code (as string)
+- _schema_: an optional `false` value used with "validate" keyword to not pass schema
+- _metaSchema_: an optional meta-schema for keyword schema
+- _dependencies_: an optional list of properties that must be present in the parent schema - it will be checked during schema compilation
+- _modifying_: `true` MUST be passed if keyword modifies data
+- _statements_: `true` can be passed in case inline keyword generates statements (as opposed to expression)
+- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords.
+- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function).
+- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords.
+- _errors_: an optional boolean or string `"full"` indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation.
+
+_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference.
+
+__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed.
+
+See [Defining custom keywords](#defining-custom-keywords) for more details.
+
+
+##### .getKeyword(String keyword) -&gt; Object|Boolean
+
+Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown.
+
+
+##### .removeKeyword(String keyword) -&gt; Ajv
+
+Removes custom or pre-defined keyword so you can redefine them.
+
+While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results.
+
+__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again.
+
+
+##### .errorsText([Array&lt;Object&gt; errors [, Object options]]) -&gt; String
+
+Returns the text with all errors in a String.
+
+Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default).
+
+
+## Options
+
+Defaults:
+
+```javascript
+{
+ // validation and reporting options:
+ $data: false,
+ allErrors: false,
+ verbose: false,
+ $comment: false, // NEW in Ajv version 6.0
+ jsonPointers: false,
+ uniqueItems: true,
+ unicode: true,
+ nullable: false,
+ format: 'fast',
+ formats: {},
+ unknownFormats: true,
+ schemas: {},
+ logger: undefined,
+ // referenced schema options:
+ schemaId: '$id',
+ missingRefs: true,
+ extendRefs: 'ignore', // recommended 'fail'
+ loadSchema: undefined, // function(uri: string): Promise {}
+ // options to modify validated data:
+ removeAdditional: false,
+ useDefaults: false,
+ coerceTypes: false,
+ // strict mode options
+ strictDefaults: false,
+ strictKeywords: false,
+ strictNumbers: false,
+ // asynchronous validation options:
+ transpile: undefined, // requires ajv-async package
+ // advanced options:
+ meta: true,
+ validateSchema: true,
+ addUsedSchema: true,
+ inlineRefs: true,
+ passContext: false,
+ loopRequired: Infinity,
+ ownProperties: false,
+ multipleOfPrecision: false,
+ errorDataPath: 'object', // deprecated
+ messages: true,
+ sourceCode: false,
+ processCode: undefined, // function (str: string, schema: object): string {}
+ cache: new Cache,
+ serialize: undefined
+}
+```
+
+##### Validation and reporting options
+
+- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api).
+- _allErrors_: check all rules collecting all errors. Default is to return after the first error.
+- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default).
+- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values:
+ - `false` (default): ignore $comment keyword.
+ - `true`: log the keyword value to console.
+ - function: pass the keyword value, its schema path and root schema to the specified function
+- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation.
+- _uniqueItems_: validate `uniqueItems` keyword (true by default).
+- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters.
+- _nullable_: support keyword "nullable" from [Open API 3 specification](https://swagger.io/docs/specification/data-models/data-types/).
+- _format_: formats validation mode. Option values:
+ - `"fast"` (default) - simplified and fast validation (see [Formats](#formats) for details of which formats are available and affected by this option).
+ - `"full"` - more restrictive and slow validation. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode.
+ - `false` - ignore all format keywords.
+- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method.
+- _keywords_: an object with custom keywords. Keys and values will be passed to `addKeyword` method.
+- _unknownFormats_: handling of unknown formats. Option values:
+ - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail.
+ - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail.
+ - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification.
+- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object.
+- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. See [Error logging](#error-logging). Option values:
+ - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown.
+ - `false` - logging is disabled.
+
+
+##### Referenced schema options
+
+- _schemaId_: this option defines which keywords are used as schema URI. Option value:
+ - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged).
+ - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged).
+ - `"auto"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation.
+- _missingRefs_: handling of missing referenced schemas. Option values:
+ - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted).
+ - `"ignore"` - to log error during compilation and always pass validation.
+ - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked.
+- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values:
+ - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation.
+ - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing.
+ - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0).
+- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation).
+
+
+##### Options to modify validated data
+
+- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values:
+ - `false` (default) - not to remove additional properties
+ - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them).
+ - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed.
+ - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema).
+- _useDefaults_: replace missing or undefined properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values:
+ - `false` (default) - do not use defaults
+ - `true` - insert defaults by value (object literal is used).
+ - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string).
+ - `"shared"` (deprecated) - insert defaults by reference. If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well.
+- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md). Option values:
+ - `false` (default) - no type coercion.
+ - `true` - coerce scalar data types.
+ - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema).
+
+
+##### Strict mode options
+
+- _strictDefaults_: report ignored `default` keywords in schemas. Option values:
+ - `false` (default) - ignored defaults are not reported
+ - `true` - if an ignored default is present, throw an error
+ - `"log"` - if an ignored default is present, log warning
+- _strictKeywords_: report unknown keywords in schemas. Option values:
+ - `false` (default) - unknown keywords are not reported
+ - `true` - if an unknown keyword is present, throw an error
+ - `"log"` - if an unknown keyword is present, log warning
+- _strictNumbers_: validate numbers strictly, failing validation for NaN and Infinity. Option values:
+ - `false` (default) - NaN or Infinity will pass validation for numeric types
+ - `true` - NaN or Infinity will not pass validation for numeric types
+
+##### Asynchronous validation options
+
+- _transpile_: Requires [ajv-async](https://github.com/ajv-validator/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values:
+ - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported.
+ - `true` - always transpile with nodent.
+ - `false` - do not transpile; if async functions are not supported an exception will be thrown.
+
+
+##### Advanced options
+
+- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword.
+- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values:
+ - `true` (default) - if the validation fails, throw the exception.
+ - `"log"` - if the validation fails, log error.
+ - `false` - skip schema validation.
+- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method.
+- _inlineRefs_: Affects compilation of referenced schemas. Option values:
+ - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions.
+ - `false` - to not inline referenced schemas (they will be compiled as separate functions).
+ - integer number - to limit the maximum number of keywords of the schema that will be inlined.
+- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance.
+- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance.
+- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst.
+- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/ajv-validator/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations).
+- _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`.
+- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n)).
+- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call).
+- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options:
+ - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass a function calling `require('js-beautify').js_beautify` as `processCode: code => js_beautify(code)`.
+ - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/ajv-validator/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information.
+- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`.
+- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used.
+
+
+## Validation errors
+
+In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property.
+
+
+### Error objects
+
+Each error is an object with the following properties:
+
+- _keyword_: validation keyword.
+- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`).
+- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation.
+- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package). See below for parameters set by all keywords.
+- _message_: the standard error message (can be excluded with option `messages` set to false).
+- _schema_: the schema of the keyword (added with `verbose` option).
+- _parentSchema_: the schema containing the keyword (added with `verbose` option)
+- _data_: the data validated by the keyword (added with `verbose` option).
+
+__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`.
+
+
+### Error parameters
+
+Properties of `params` object in errors depend on the keyword that failed validation.
+
+- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword).
+- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false).
+- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords).
+- `dependencies` - properties:
+ - `property` (dependent property),
+ - `missingProperty` (required missing dependency - only the first one is reported currently)
+ - `deps` (required dependencies, comma separated list as a string),
+ - `depsCount` (the number of required dependencies).
+- `format` - property `format` (the schema of the keyword).
+- `maximum`, `minimum` - properties:
+ - `limit` (number, the schema of the keyword),
+ - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`),
+ - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=")
+- `multipleOf` - property `multipleOf` (the schema of the keyword)
+- `pattern` - property `pattern` (the schema of the keyword)
+- `required` - property `missingProperty` (required property that is missing).
+- `propertyNames` - property `propertyName` (an invalid property name).
+- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property).
+- `type` - property `type` (required type(s), a string, can be a comma-separated list)
+- `uniqueItems` - properties `i` and `j` (indices of duplicate items).
+- `const` - property `allowedValue` pointing to the value (the schema of the keyword).
+- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword).
+- `$ref` - property `ref` with the referenced schema URI.
+- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes).
+- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name).
+
+
+### Error logging
+
+Using the `logger` option when initiallizing Ajv will allow you to define custom logging. Here you can build upon the exisiting logging. The use of other logging packages is supported as long as the package or its associated wrapper exposes the required methods. If any of the required methods are missing an exception will be thrown.
+- **Required Methods**: `log`, `warn`, `error`
+
+```javascript
+var otherLogger = new OtherLogger();
+var ajv = new Ajv({
+ logger: {
+ log: console.log.bind(console),
+ warn: function warn() {
+ otherLogger.logWarn.apply(otherLogger, arguments);
+ },
+ error: function error() {
+ otherLogger.logError.apply(otherLogger, arguments);
+ console.error.apply(console, arguments);
+ }
+ }
+});
+```
+
+
+## Plugins
+
+Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions:
+
+- it exports a function
+- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining
+- this function can accept an optional configuration as the second parameter
+
+If you have published a useful plugin please submit a PR to add it to the next section.
+
+
+## Related packages
+
+- [ajv-async](https://github.com/ajv-validator/ajv-async) - plugin to configure async validation mode
+- [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats
+- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface
+- [ajv-errors](https://github.com/ajv-validator/ajv-errors) - plugin for custom error messages
+- [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) - internationalised error messages
+- [ajv-istanbul](https://github.com/ajv-validator/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas
+- [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.)
+- [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) - plugin with keywords $merge and $patch
+- [ajv-pack](https://github.com/ajv-validator/ajv-pack) - produces a compact module exporting validation functions
+- [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) - format validators for draft2019 that aren't already included in ajv (ie. `idn-hostname`, `idn-email`, `iri`, `iri-reference` and `duration`).
+
+## Some packages using Ajv
+
+- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser
+- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services
+- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition
+- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator
+- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org
+- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON Schema http://jsonschemalint.com
+- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js
+- [table](https://github.com/gajus/table) - formats data into a string table
+- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser
+- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content
+- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation
+- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation
+- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages
+- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema
+- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests
+- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema
+- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file
+- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app
+- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter
+- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages
+- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX
+
+
+## Tests
+
+```
+npm install
+git submodule update --init
+npm test
+```
+
+## Contributing
+
+All validation functions are generated using doT templates in [dot](https://github.com/ajv-validator/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency.
+
+`npm run build` - compiles templates to [dotjs](https://github.com/ajv-validator/ajv/tree/master/lib/dotjs) folder.
+
+`npm run watch` - automatically compiles templates when files in dot folder change
+
+Please see [Contributing guidelines](https://github.com/ajv-validator/ajv/blob/master/CONTRIBUTING.md)
+
+
+## Changes history
+
+See https://github.com/ajv-validator/ajv/releases
+
+__Please note__: [Changes in version 7.0.0-beta](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0)
+
+[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
+
+## Code of conduct
+
+Please review and follow the [Code of conduct](https://github.com/ajv-validator/ajv/blob/master/CODE_OF_CONDUCT.md).
+
+Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
+
+
+## Open-source software support
+
+Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
+
+
+## License
+
+[MIT](https://github.com/ajv-validator/ajv/blob/master/LICENSE)
diff --git a/node_modules/ajv/dist/ajv.bundle.js b/node_modules/ajv/dist/ajv.bundle.js
new file mode 100644
index 0000000..e4d9d15
--- /dev/null
+++ b/node_modules/ajv/dist/ajv.bundle.js
@@ -0,0 +1,7189 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
+'use strict';
+
+
+var Cache = module.exports = function Cache() {
+ this._cache = {};
+};
+
+
+Cache.prototype.put = function Cache_put(key, value) {
+ this._cache[key] = value;
+};
+
+
+Cache.prototype.get = function Cache_get(key) {
+ return this._cache[key];
+};
+
+
+Cache.prototype.del = function Cache_del(key) {
+ delete this._cache[key];
+};
+
+
+Cache.prototype.clear = function Cache_clear() {
+ this._cache = {};
+};
+
+},{}],2:[function(require,module,exports){
+'use strict';
+
+var MissingRefError = require('./error_classes').MissingRef;
+
+module.exports = compileAsync;
+
+
+/**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
+ * @return {Promise} promise that resolves with a validating function.
+ */
+function compileAsync(schema, meta, callback) {
+ /* eslint no-shadow: 0 */
+ /* global Promise */
+ /* jshint validthis: true */
+ var self = this;
+ if (typeof this._opts.loadSchema != 'function')
+ throw new Error('options.loadSchema should be a function');
+
+ if (typeof meta == 'function') {
+ callback = meta;
+ meta = undefined;
+ }
+
+ var p = loadMetaSchemaOf(schema).then(function () {
+ var schemaObj = self._addSchema(schema, undefined, meta);
+ return schemaObj.validate || _compileAsync(schemaObj);
+ });
+
+ if (callback) {
+ p.then(
+ function(v) { callback(null, v); },
+ callback
+ );
+ }
+
+ return p;
+
+
+ function loadMetaSchemaOf(sch) {
+ var $schema = sch.$schema;
+ return $schema && !self.getSchema($schema)
+ ? compileAsync.call(self, { $ref: $schema }, true)
+ : Promise.resolve();
+ }
+
+
+ function _compileAsync(schemaObj) {
+ try { return self._compile(schemaObj); }
+ catch(e) {
+ if (e instanceof MissingRefError) return loadMissingSchema(e);
+ throw e;
+ }
+
+
+ function loadMissingSchema(e) {
+ var ref = e.missingSchema;
+ if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
+
+ var schemaPromise = self._loadingSchemas[ref];
+ if (!schemaPromise) {
+ schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
+ schemaPromise.then(removePromise, removePromise);
+ }
+
+ return schemaPromise.then(function (sch) {
+ if (!added(ref)) {
+ return loadMetaSchemaOf(sch).then(function () {
+ if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
+ });
+ }
+ }).then(function() {
+ return _compileAsync(schemaObj);
+ });
+
+ function removePromise() {
+ delete self._loadingSchemas[ref];
+ }
+
+ function added(ref) {
+ return self._refs[ref] || self._schemas[ref];
+ }
+ }
+ }
+}
+
+},{"./error_classes":3}],3:[function(require,module,exports){
+'use strict';
+
+var resolve = require('./resolve');
+
+module.exports = {
+ Validation: errorSubclass(ValidationError),
+ MissingRef: errorSubclass(MissingRefError)
+};
+
+
+function ValidationError(errors) {
+ this.message = 'validation failed';
+ this.errors = errors;
+ this.ajv = this.validation = true;
+}
+
+
+MissingRefError.message = function (baseId, ref) {
+ return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
+};
+
+
+function MissingRefError(baseId, ref, message) {
+ this.message = message || MissingRefError.message(baseId, ref);
+ this.missingRef = resolve.url(baseId, ref);
+ this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
+}
+
+
+function errorSubclass(Subclass) {
+ Subclass.prototype = Object.create(Error.prototype);
+ Subclass.prototype.constructor = Subclass;
+ return Subclass;
+}
+
+},{"./resolve":6}],4:[function(require,module,exports){
+'use strict';
+
+var util = require('./util');
+
+var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
+var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
+var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
+var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;
+var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+// uri-template: https://tools.ietf.org/html/rfc6570
+var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
+// For the source: https://gist.github.com/dperini/729294
+// For test cases: https://mathiasbynens.be/demo/url-regex
+// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
+// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
+var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
+var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
+var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
+var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
+
+
+module.exports = formats;
+
+function formats(mode) {
+ mode = mode == 'full' ? 'full' : 'fast';
+ return util.copy(formats[mode]);
+}
+
+
+formats.fast = {
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
+ date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
+ time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
+ 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
+ uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
+ 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ // email (sources from jsen validator):
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
+ email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
+ hostname: HOSTNAME,
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ // uuid: http://tools.ietf.org/html/rfc4122
+ uuid: UUID,
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
+ 'json-pointer': JSON_POINTER,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.full = {
+ date: date,
+ time: time,
+ 'date-time': date_time,
+ uri: uri,
+ 'uri-reference': URIREF,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
+ hostname: HOSTNAME,
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ uuid: UUID,
+ 'json-pointer': JSON_POINTER,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+function isLeapYear(year) {
+ // https://tools.ietf.org/html/rfc3339#appendix-C
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
+}
+
+
+function date(str) {
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
+ var matches = str.match(DATE);
+ if (!matches) return false;
+
+ var year = +matches[1];
+ var month = +matches[2];
+ var day = +matches[3];
+
+ return month >= 1 && month <= 12 && day >= 1 &&
+ day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]);
+}
+
+
+function time(str, full) {
+ var matches = str.match(TIME);
+ if (!matches) return false;
+
+ var hour = matches[1];
+ var minute = matches[2];
+ var second = matches[3];
+ var timeZone = matches[5];
+ return ((hour <= 23 && minute <= 59 && second <= 59) ||
+ (hour == 23 && minute == 59 && second == 60)) &&
+ (!full || timeZone);
+}
+
+
+var DATE_TIME_SEPARATOR = /t|\s/i;
+function date_time(str) {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ var dateTime = str.split(DATE_TIME_SEPARATOR);
+ return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
+}
+
+
+var NOT_URI_FRAGMENT = /\/|:/;
+function uri(str) {
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str);
+}
+
+
+var Z_ANCHOR = /[^\\]\\Z/;
+function regex(str) {
+ if (Z_ANCHOR.test(str)) return false;
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
+
+},{"./util":10}],5:[function(require,module,exports){
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , errorClasses = require('./error_classes')
+ , stableStringify = require('fast-json-stable-stringify');
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var ucs2length = util.ucs2length;
+var equal = require('fast-deep-equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = errorClasses.Validation;
+
+module.exports = compile;
+
+
+/**
+ * Compiles schema to validation function
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Object} root object with information about the root schema for this schema
+ * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
+ * @param {String} baseId base ID for IDs in the schema
+ * @return {Function} validation function
+ */
+function compile(schema, root, localRefs, baseId) {
+ /* jshint validthis: true, evil: true */
+ /* eslint no-shadow: 0 */
+ var self = this
+ , opts = this._opts
+ , refVal = [ undefined ]
+ , refs = {}
+ , patterns = []
+ , patternsHash = {}
+ , defaults = []
+ , defaultsHash = {}
+ , customRules = [];
+
+ root = root || { schema: schema, refVal: refVal, refs: refs };
+
+ var c = checkCompiling.call(this, schema, root, baseId);
+ var compilation = this._compilations[c.index];
+ if (c.compiling) return (compilation.callValidate = callValidate);
+
+ var formats = this._formats;
+ var RULES = this.RULES;
+
+ try {
+ var v = localCompile(schema, root, localRefs, baseId);
+ compilation.validate = v;
+ var cv = compilation.callValidate;
+ if (cv) {
+ cv.schema = v.schema;
+ cv.errors = null;
+ cv.refs = v.refs;
+ cv.refVal = v.refVal;
+ cv.root = v.root;
+ cv.$async = v.$async;
+ if (opts.sourceCode) cv.source = v.source;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ /* @this {*} - custom context, see passContext option */
+ function callValidate() {
+ /* jshint validthis: true */
+ var validate = compilation.validate;
+ var result = validate.apply(this, arguments);
+ callValidate.errors = validate.errors;
+ return result;
+ }
+
+ function localCompile(_schema, _root, localRefs, baseId) {
+ var isRoot = !_root || (_root && _root.schema == _schema);
+ if (_root.schema != root.schema)
+ return compile.call(self, _schema, _root, localRefs, baseId);
+
+ var $async = _schema.$async === true;
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ MissingRefError: errorClasses.MissingRef,
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ logger: self.logger,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode;
+
+ if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);
+ // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
+ var validate;
+ try {
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ sourceCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ self.logger.error('Error compiling schema, function code:', sourceCode);
+ throw e;
+ }
+
+ validate.schema = _schema;
+ validate.errors = null;
+ validate.refs = refs;
+ validate.refVal = refVal;
+ validate.root = isRoot ? validate : _root;
+ if ($async) validate.$async = true;
+ if (opts.sourceCode === true) {
+ validate.source = {
+ code: sourceCode,
+ patterns: patterns,
+ defaults: defaults
+ };
+ }
+
+ return validate;
+ }
+
+ function resolveRef(baseId, ref, isRoot) {
+ ref = resolve.url(baseId, ref);
+ var refIndex = refs[ref];
+ var _refVal, refCode;
+ if (refIndex !== undefined) {
+ _refVal = refVal[refIndex];
+ refCode = 'refVal[' + refIndex + ']';
+ return resolvedRef(_refVal, refCode);
+ }
+ if (!isRoot && root.refs) {
+ var rootRefId = root.refs[ref];
+ if (rootRefId !== undefined) {
+ _refVal = root.refVal[rootRefId];
+ refCode = addLocalRef(ref, _refVal);
+ return resolvedRef(_refVal, refCode);
+ }
+ }
+
+ refCode = addLocalRef(ref);
+ var v = resolve.call(self, localCompile, root, ref);
+ if (v === undefined) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v === undefined) {
+ removeLocalRef(ref);
+ } else {
+ replaceLocalRef(ref, v);
+ return resolvedRef(v, refCode);
+ }
+ }
+
+ function addLocalRef(ref, v) {
+ var refId = refVal.length;
+ refVal[refId] = v;
+ refs[ref] = refId;
+ return 'refVal' + refId;
+ }
+
+ function removeLocalRef(ref) {
+ delete refs[ref];
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object' || typeof refVal == 'boolean'
+ ? { code: code, schema: refVal, inline: true }
+ : { code: code, $async: refVal && !!refVal.$async };
+ }
+
+ function usePattern(regexStr) {
+ var index = patternsHash[regexStr];
+ if (index === undefined) {
+ index = patternsHash[regexStr] = patterns.length;
+ patterns[index] = regexStr;
+ }
+ return 'pattern' + index;
+ }
+
+ function useDefault(value) {
+ switch (typeof value) {
+ case 'boolean':
+ case 'number':
+ return '' + value;
+ case 'string':
+ return util.toQuotedString(value);
+ case 'object':
+ if (value === null) return 'null';
+ var valueStr = stableStringify(value);
+ var index = defaultsHash[valueStr];
+ if (index === undefined) {
+ index = defaultsHash[valueStr] = defaults.length;
+ defaults[index] = value;
+ }
+ return 'default' + index;
+ }
+ }
+
+ function useCustomRule(rule, schema, parentSchema, it) {
+ if (self._opts.validateSchema !== false) {
+ var deps = rule.definition.dependencies;
+ if (deps && !deps.every(function(keyword) {
+ return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
+ }))
+ throw new Error('parent schema must have all required keywords: ' + deps.join(','));
+
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') self.logger.error(message);
+ else throw new Error(message);
+ }
+ }
+ }
+
+ var compile = rule.definition.compile
+ , inline = rule.definition.inline
+ , macro = rule.definition.macro;
+
+ var validate;
+ if (compile) {
+ validate = compile.call(self, schema, parentSchema, it);
+ } else if (macro) {
+ validate = macro.call(self, schema, parentSchema, it);
+ if (opts.validateSchema !== false) self.validateSchema(validate, true);
+ } else if (inline) {
+ validate = inline.call(self, it, rule.keyword, schema, parentSchema);
+ } else {
+ validate = rule.definition.validate;
+ if (!validate) return;
+ }
+
+ if (validate === undefined)
+ throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
+
+ var index = customRules.length;
+ customRules[index] = validate;
+
+ return {
+ code: 'customRule' + index,
+ validate: validate
+ };
+ }
+}
+
+
+/**
+ * Checks if the schema is currently compiled
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
+ */
+function checkCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var index = compIndex.call(this, schema, root, baseId);
+ if (index >= 0) return { index: index, compiling: true };
+ index = this._compilations.length;
+ this._compilations[index] = {
+ schema: schema,
+ root: root,
+ baseId: baseId
+ };
+ return { index: index, compiling: false };
+}
+
+
+/**
+ * Removes the schema from the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ */
+function endCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var i = compIndex.call(this, schema, root, baseId);
+ if (i >= 0) this._compilations.splice(i, 1);
+}
+
+
+/**
+ * Index of schema compilation in the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Integer} compilation index
+ */
+function compIndex(schema, root, baseId) {
+ /* jshint validthis: true */
+ for (var i=0; i<this._compilations.length; i++) {
+ var c = this._compilations[i];
+ if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
+ }
+ return -1;
+}
+
+
+function patternCode(i, patterns) {
+ return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
+}
+
+
+function defaultCode(i) {
+ return 'var default' + i + ' = defaults[' + i + '];';
+}
+
+
+function refValCode(i, refVal) {
+ return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
+}
+
+
+function customRuleCode(i) {
+ return 'var customRule' + i + ' = customRules[' + i + '];';
+}
+
+
+function vars(arr, statement) {
+ if (!arr.length) return '';
+ var code = '';
+ for (var i=0; i<arr.length; i++)
+ code += statement(i, arr);
+ return code;
+}
+
+},{"../dotjs/validate":38,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":42,"fast-json-stable-stringify":43}],6:[function(require,module,exports){
+'use strict';
+
+var URI = require('uri-js')
+ , equal = require('fast-deep-equal')
+ , util = require('./util')
+ , SchemaObject = require('./schema_obj')
+ , traverse = require('json-schema-traverse');
+
+module.exports = resolve;
+
+resolve.normalizeId = normalizeId;
+resolve.fullPath = getFullPath;
+resolve.url = resolveUrl;
+resolve.ids = resolveIds;
+resolve.inlineRef = inlineRef;
+resolve.schema = resolveSchema;
+
+/**
+ * [resolve and compile the references ($ref)]
+ * @this Ajv
+ * @param {Function} compile reference to schema compilation funciton (localCompile)
+ * @param {Object} root object with information about the root schema for the current schema
+ * @param {String} ref reference to resolve
+ * @return {Object|Function} schema object (if the schema can be inlined) or validation function
+ */
+function resolve(compile, root, ref) {
+ /* jshint validthis: true */
+ var refVal = this._refs[ref];
+ if (typeof refVal == 'string') {
+ if (this._refs[refVal]) refVal = this._refs[refVal];
+ else return resolve.call(this, compile, root, refVal);
+ }
+
+ refVal = refVal || this._schemas[ref];
+ if (refVal instanceof SchemaObject) {
+ return inlineRef(refVal.schema, this._opts.inlineRefs)
+ ? refVal.schema
+ : refVal.validate || this._compile(refVal);
+ }
+
+ var res = resolveSchema.call(this, root, ref);
+ var schema, v, baseId;
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+
+ if (schema instanceof SchemaObject) {
+ v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
+ } else if (schema !== undefined) {
+ v = inlineRef(schema, this._opts.inlineRefs)
+ ? schema
+ : compile.call(this, schema, root, undefined, baseId);
+ }
+
+ return v;
+}
+
+
+/**
+ * Resolve schema, its root and baseId
+ * @this Ajv
+ * @param {Object} root root object with properties schema, refVal, refs
+ * @param {String} ref reference to resolve
+ * @return {Object} object with properties schema, root, baseId
+ */
+function resolveSchema(root, ref) {
+ /* jshint validthis: true */
+ var p = URI.parse(ref)
+ , refPath = _getFullPath(p)
+ , baseId = getFullPath(this._getId(root.schema));
+ if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
+ var id = normalizeId(refPath);
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') {
+ return resolveRecursive.call(this, root, refVal, p);
+ } else if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ root = refVal;
+ } else {
+ refVal = this._schemas[id];
+ if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ if (id == normalizeId(ref))
+ return { schema: refVal, root: root, baseId: baseId };
+ root = refVal;
+ } else {
+ return;
+ }
+ }
+ if (!root.schema) return;
+ baseId = getFullPath(this._getId(root.schema));
+ }
+ return getJsonPointer.call(this, p, baseId, root.schema, root);
+}
+
+
+/* @this Ajv */
+function resolveRecursive(root, ref, parsedRef) {
+ /* jshint validthis: true */
+ var res = resolveSchema.call(this, root, ref);
+ if (res) {
+ var schema = res.schema;
+ var baseId = res.baseId;
+ root = res.root;
+ var id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ return getJsonPointer.call(this, parsedRef, baseId, schema, root);
+ }
+}
+
+
+var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
+/* @this Ajv */
+function getJsonPointer(parsedRef, baseId, schema, root) {
+ /* jshint validthis: true */
+ parsedRef.fragment = parsedRef.fragment || '';
+ if (parsedRef.fragment.slice(0,1) != '/') return;
+ var parts = parsedRef.fragment.split('/');
+
+ for (var i = 1; i < parts.length; i++) {
+ var part = parts[i];
+ if (part) {
+ part = util.unescapeFragment(part);
+ schema = schema[part];
+ if (schema === undefined) break;
+ var id;
+ if (!PREVENT_SCOPE_CHANGE[part]) {
+ id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ if (schema.$ref) {
+ var $ref = resolveUrl(baseId, schema.$ref);
+ var res = resolveSchema.call(this, root, $ref);
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+ }
+ }
+ }
+ }
+ if (schema !== undefined && schema !== root.schema)
+ return { schema: schema, root: root, baseId: baseId };
+}
+
+
+var SIMPLE_INLINED = util.toHash([
+ 'type', 'format', 'pattern',
+ 'maxLength', 'minLength',
+ 'maxProperties', 'minProperties',
+ 'maxItems', 'minItems',
+ 'maximum', 'minimum',
+ 'uniqueItems', 'multipleOf',
+ 'required', 'enum'
+]);
+function inlineRef(schema, limit) {
+ if (limit === false) return false;
+ if (limit === undefined || limit === true) return checkNoRef(schema);
+ else if (limit) return countKeys(schema) <= limit;
+}
+
+
+function checkNoRef(schema) {
+ var item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return false;
+ item = schema[key];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ }
+ return true;
+}
+
+
+function countKeys(schema) {
+ var count = 0, item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object') count += countKeys(item);
+ if (count == Infinity) return Infinity;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return Infinity;
+ if (SIMPLE_INLINED[key]) {
+ count++;
+ } else {
+ item = schema[key];
+ if (typeof item == 'object') count += countKeys(item) + 1;
+ if (count == Infinity) return Infinity;
+ }
+ }
+ }
+ return count;
+}
+
+
+function getFullPath(id, normalize) {
+ if (normalize !== false) id = normalizeId(id);
+ var p = URI.parse(id);
+ return _getFullPath(p);
+}
+
+
+function _getFullPath(p) {
+ return URI.serialize(p).split('#')[0] + '#';
+}
+
+
+var TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+ return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
+}
+
+
+function resolveUrl(baseId, id) {
+ id = normalizeId(id);
+ return URI.resolve(baseId, id);
+}
+
+
+/* @this Ajv */
+function resolveIds(schema) {
+ var schemaId = normalizeId(this._getId(schema));
+ var baseIds = {'': schemaId};
+ var fullPaths = {'': getFullPath(schemaId, false)};
+ var localRefs = {};
+ var self = this;
+
+ traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (jsonPtr === '') return;
+ var id = self._getId(sch);
+ var baseId = baseIds[parentJsonPtr];
+ var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
+ if (keyIndex !== undefined)
+ fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
+
+ if (typeof id == 'string') {
+ id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id);
+
+ var refVal = self._refs[id];
+ if (typeof refVal == 'string') refVal = self._refs[refVal];
+ if (refVal && refVal.schema) {
+ if (!equal(sch, refVal.schema))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ } else if (id != normalizeId(fullPath)) {
+ if (id[0] == '#') {
+ if (localRefs[id] && !equal(sch, localRefs[id]))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ localRefs[id] = sch;
+ } else {
+ self._refs[id] = fullPath;
+ }
+ }
+ }
+ baseIds[jsonPtr] = baseId;
+ fullPaths[jsonPtr] = fullPath;
+ });
+
+ return localRefs;
+}
+
+},{"./schema_obj":8,"./util":10,"fast-deep-equal":42,"json-schema-traverse":44,"uri-js":45}],7:[function(require,module,exports){
+'use strict';
+
+var ruleModules = require('../dotjs')
+ , toHash = require('./util').toHash;
+
+module.exports = function rules() {
+ var RULES = [
+ { type: 'number',
+ rules: [ { 'maximum': ['exclusiveMaximum'] },
+ { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
+ { type: 'string',
+ rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
+ { type: 'array',
+ rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] },
+ { type: 'object',
+ rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
+ { 'properties': ['additionalProperties', 'patternProperties'] } ] },
+ { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] }
+ ];
+
+ var ALL = [ 'type', '$comment' ];
+ var KEYWORDS = [
+ '$schema', '$id', 'id', '$data', '$async', 'title',
+ 'description', 'default', 'definitions',
+ 'examples', 'readOnly', 'writeOnly',
+ 'contentMediaType', 'contentEncoding',
+ 'additionalItems', 'then', 'else'
+ ];
+ var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
+ RULES.all = toHash(ALL);
+ RULES.types = toHash(TYPES);
+
+ RULES.forEach(function (group) {
+ group.rules = group.rules.map(function (keyword) {
+ var implKeywords;
+ if (typeof keyword == 'object') {
+ var key = Object.keys(keyword)[0];
+ implKeywords = keyword[key];
+ keyword = key;
+ implKeywords.forEach(function (k) {
+ ALL.push(k);
+ RULES.all[k] = true;
+ });
+ }
+ ALL.push(keyword);
+ var rule = RULES.all[keyword] = {
+ keyword: keyword,
+ code: ruleModules[keyword],
+ implements: implKeywords
+ };
+ return rule;
+ });
+
+ RULES.all.$comment = {
+ keyword: '$comment',
+ code: ruleModules.$comment
+ };
+
+ if (group.type) RULES.types[group.type] = group;
+ });
+
+ RULES.keywords = toHash(ALL.concat(KEYWORDS));
+ RULES.custom = {};
+
+ return RULES;
+};
+
+},{"../dotjs":27,"./util":10}],8:[function(require,module,exports){
+'use strict';
+
+var util = require('./util');
+
+module.exports = SchemaObject;
+
+function SchemaObject(obj) {
+ util.copy(obj, this);
+}
+
+},{"./util":10}],9:[function(require,module,exports){
+'use strict';
+
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+module.exports = function ucs2length(str) {
+ var length = 0
+ , len = str.length
+ , pos = 0
+ , value;
+ while (pos < len) {
+ length++;
+ value = str.charCodeAt(pos++);
+ if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
+ // high surrogate, and there is a next character
+ value = str.charCodeAt(pos);
+ if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
+ }
+ }
+ return length;
+};
+
+},{}],10:[function(require,module,exports){
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ equal: require('fast-deep-equal'),
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ schemaUnknownRules: schemaUnknownRules,
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ unescapeJsonPointer: unescapeJsonPointer,
+ escapeFragment: escapeFragment,
+ escapeJsonPointer: escapeJsonPointer
+};
+
+
+function copy(o, to) {
+ to = to || {};
+ for (var key in o) to[key] = o[key];
+ return to;
+}
+
+
+function checkDataType(dataType, data, strictNumbers, negate) {
+ var EQUAL = negate ? ' !== ' : ' === '
+ , AND = negate ? ' || ' : ' && '
+ , OK = negate ? '!' : ''
+ , NOT = negate ? '' : '!';
+ switch (dataType) {
+ case 'null': return data + EQUAL + 'null';
+ case 'array': return OK + 'Array.isArray(' + data + ')';
+ case 'object': return '(' + OK + data + AND +
+ 'typeof ' + data + EQUAL + '"object"' + AND +
+ NOT + 'Array.isArray(' + data + '))';
+ case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
+ NOT + '(' + data + ' % 1)' +
+ AND + data + EQUAL + data +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data, strictNumbers) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, strictNumbers, true);
+ default:
+ var code = '';
+ var types = toHash(dataTypes);
+ if (types.array && types.object) {
+ code = types.null ? '(': '(!' + data + ' || ';
+ code += 'typeof ' + data + ' !== "object")';
+ delete types.null;
+ delete types.array;
+ delete types.object;
+ }
+ if (types.number) delete types.integer;
+ for (var t in types)
+ code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true);
+
+ return code;
+ }
+}
+
+
+var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
+function coerceToTypes(optionCoerceTypes, dataTypes) {
+ if (Array.isArray(dataTypes)) {
+ var types = [];
+ for (var i=0; i<dataTypes.length; i++) {
+ var t = dataTypes[i];
+ if (COERCE_TO_TYPES[t]) types[types.length] = t;
+ else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
+ }
+ if (types.length) return types;
+ } else if (COERCE_TO_TYPES[dataTypes]) {
+ return [dataTypes];
+ } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
+ return ['array'];
+ }
+}
+
+
+function toHash(arr) {
+ var hash = {};
+ for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
+ return hash;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+ return typeof key == 'number'
+ ? '[' + key + ']'
+ : IDENTIFIER.test(key)
+ ? '.' + key
+ : "['" + escapeQuotes(key) + "']";
+}
+
+
+function escapeQuotes(str) {
+ return str.replace(SINGLE_QUOTE, '\\$&')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r')
+ .replace(/\f/g, '\\f')
+ .replace(/\t/g, '\\t');
+}
+
+
+function varOccurences(str, dataVar) {
+ dataVar += '[^0-9]';
+ var matches = str.match(new RegExp(dataVar, 'g'));
+ return matches ? matches.length : 0;
+}
+
+
+function varReplace(str, dataVar, expr) {
+ dataVar += '([^0-9])';
+ expr = expr.replace(/\$/g, '$$$$');
+ return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
+}
+
+
+function schemaHasRules(schema, rules) {
+ if (typeof schema == 'boolean') return !schema;
+ for (var key in schema) if (rules[key]) return true;
+}
+
+
+function schemaHasRulesExcept(schema, rules, exceptKeyword) {
+ if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
+ for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
+}
+
+
+function schemaUnknownRules(schema, rules) {
+ if (typeof schema == 'boolean') return;
+ for (var key in schema) if (!rules[key]) return key;
+}
+
+
+function toQuotedString(str) {
+ return '\'' + escapeQuotes(str) + '\'';
+}
+
+
+function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
+ var path = jsonPointers // false by default
+ ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
+ : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
+ return joinPaths(currentPath, path);
+}
+
+
+function getPath(currentPath, prop, jsonPointers) {
+ var path = jsonPointers // false by default
+ ? toQuotedString('/' + escapeJsonPointer(prop))
+ : toQuotedString(getProperty(prop));
+ return joinPaths(currentPath, path);
+}
+
+
+var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, lvl, paths) {
+ var up, jsonPointer, data, matches;
+ if ($data === '') return 'rootData';
+ if ($data[0] == '/') {
+ if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
+ jsonPointer = $data;
+ data = 'rootData';
+ } else {
+ matches = $data.match(RELATIVE_JSON_POINTER);
+ if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
+ up = +matches[1];
+ jsonPointer = matches[2];
+ if (jsonPointer == '#') {
+ if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
+ return paths[lvl - up];
+ }
+
+ if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
+ data = 'data' + ((lvl - up) || '');
+ if (!jsonPointer) return data;
+ }
+
+ var expr = data;
+ var segments = jsonPointer.split('/');
+ for (var i=0; i<segments.length; i++) {
+ var segment = segments[i];
+ if (segment) {
+ data += getProperty(unescapeJsonPointer(segment));
+ expr += ' && ' + data;
+ }
+ }
+ return expr;
+}
+
+
+function joinPaths (a, b) {
+ if (a == '""') return b;
+ return (a + ' + ' + b).replace(/([^\\])' \+ '/g, '$1');
+}
+
+
+function unescapeFragment(str) {
+ return unescapeJsonPointer(decodeURIComponent(str));
+}
+
+
+function escapeFragment(str) {
+ return encodeURIComponent(escapeJsonPointer(str));
+}
+
+
+function escapeJsonPointer(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
+
+},{"./ucs2length":9,"fast-deep-equal":42}],11:[function(require,module,exports){
+'use strict';
+
+var KEYWORDS = [
+ 'multipleOf',
+ 'maximum',
+ 'exclusiveMaximum',
+ 'minimum',
+ 'exclusiveMinimum',
+ 'maxLength',
+ 'minLength',
+ 'pattern',
+ 'additionalItems',
+ 'maxItems',
+ 'minItems',
+ 'uniqueItems',
+ 'maxProperties',
+ 'minProperties',
+ 'required',
+ 'additionalProperties',
+ 'enum',
+ 'format',
+ 'const'
+];
+
+module.exports = function (metaSchema, keywordsJsonPointers) {
+ for (var i=0; i<keywordsJsonPointers.length; i++) {
+ metaSchema = JSON.parse(JSON.stringify(metaSchema));
+ var segments = keywordsJsonPointers[i].split('/');
+ var keywords = metaSchema;
+ var j;
+ for (j=1; j<segments.length; j++)
+ keywords = keywords[segments[j]];
+
+ for (j=0; j<KEYWORDS.length; j++) {
+ var key = KEYWORDS[j];
+ var schema = keywords[key];
+ if (schema) {
+ keywords[key] = {
+ anyOf: [
+ schema,
+ { $ref: 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' }
+ ]
+ };
+ }
+ }
+ }
+
+ return metaSchema;
+};
+
+},{}],12:[function(require,module,exports){
+'use strict';
+
+var metaSchema = require('./refs/json-schema-draft-07.json');
+
+module.exports = {
+ $id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js',
+ definitions: {
+ simpleTypes: metaSchema.definitions.simpleTypes
+ },
+ type: 'object',
+ dependencies: {
+ schema: ['validate'],
+ $data: ['validate'],
+ statements: ['inline'],
+ valid: {not: {required: ['macro']}}
+ },
+ properties: {
+ type: metaSchema.properties.type,
+ schema: {type: 'boolean'},
+ statements: {type: 'boolean'},
+ dependencies: {
+ type: 'array',
+ items: {type: 'string'}
+ },
+ metaSchema: {type: 'object'},
+ modifying: {type: 'boolean'},
+ valid: {type: 'boolean'},
+ $data: {type: 'boolean'},
+ async: {type: 'boolean'},
+ errors: {
+ anyOf: [
+ {type: 'boolean'},
+ {const: 'full'}
+ ]
+ }
+ }
+};
+
+},{"./refs/json-schema-draft-07.json":41}],13:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limit(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $isMax = $keyword == 'maximum',
+ $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $notOp = $isMax ? '>' : '<',
+ $errorKeyword = undefined;
+ if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
+ throw new Error($keyword + ' must be number');
+ }
+ if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) {
+ throw new Error($exclusiveKeyword + ' must be number or boolean');
+ }
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $exclType = 'exclType' + $lvl,
+ $exclIsNumber = 'exclIsNumber' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; ';
+ if ($schema === undefined) {
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaValueExcl;
+ $isData = $isDataExcl;
+ }
+ } else {
+ var $exclIsNumber = typeof $schemaExcl == 'number',
+ $opStr = $op;
+ if ($exclIsNumber && $isData) {
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
+ } else {
+ if ($exclIsNumber && $schema === undefined) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ }
+ }
+ $errorKeyword = $errorKeyword || $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],14:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ var $op = $keyword == 'maxItems' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxItems') {
+ out += 'more';
+ } else {
+ out += 'fewer';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],15:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ var $op = $keyword == 'maxLength' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ if (it.opts.unicode === false) {
+ out += ' ' + ($data) + '.length ';
+ } else {
+ out += ' ucs2length(' + ($data) + ') ';
+ }
+ out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be ';
+ if ($keyword == 'maxLength') {
+ out += 'longer';
+ } else {
+ out += 'shorter';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' characters\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],16:[function(require,module,exports){
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ var $op = $keyword == 'maxProperties' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxProperties') {
+ out += 'more';
+ } else {
+ out += 'fewer';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],17:[function(require,module,exports){
+'use strict';
+module.exports = function generate_allOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $currentBaseId = $it.baseId,
+ $allSchemasEmpty = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ $allSchemasEmpty = false;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ if ($allSchemasEmpty) {
+ out += ' if (true) { ';
+ } else {
+ out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
+ }
+ }
+ return out;
+}
+
+},{}],18:[function(require,module,exports){
+'use strict';
+module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $noEmptySchema = $schema.every(function($sch) {
+ return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all));
+ });
+ if ($noEmptySchema) {
+ var $currentBaseId = $it.baseId;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match some schema in anyOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],19:[function(require,module,exports){
+'use strict';
+module.exports = function generate_comment(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $comment = it.util.toQuotedString($schema);
+ if (it.opts.$comment === true) {
+ out += ' console.log(' + ($comment) + ');';
+ } else if (typeof it.opts.$comment == 'function') {
+ out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
+ }
+ return out;
+}
+
+},{}],20:[function(require,module,exports){
+'use strict';
+module.exports = function generate_const(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to constant\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],21:[function(require,module,exports){
+'use strict';
+module.exports = function generate_contains(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId,
+ $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all));
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($nonEmptySchema) {
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (' + ($nextValid) + ') break; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
+ } else {
+ out += ' if (' + ($data) + '.length == 0) {';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should contain a valid item\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ if ($nonEmptySchema) {
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ }
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
+
+},{}],22:[function(require,module,exports){
+'use strict';
+module.exports = function generate_custom(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $rule = this,
+ $definition = 'definition' + $lvl,
+ $rDef = $rule.definition,
+ $closingBraces = '';
+ var $compile, $inline, $macro, $ruleValidate, $validateCode;
+ if ($isData && $rDef.$data) {
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
+ } else {
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ if (!$ruleValidate) return;
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }
+ var $ruleErrs = $validateCode + '.errors',
+ $i = 'i' + $lvl,
+ $ruleErr = 'ruleErr' + $lvl,
+ $asyncKeyword = $rDef.async;
+ if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
+ if (!($inline || $macro)) {
+ out += '' + ($ruleErrs) + ' = null;';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($isData && $rDef.$data) {
+ $closingBraces += '}';
+ out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
+ if ($validateSchema) {
+ $closingBraces += '}';
+ out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';
+ }
+ }
+ if ($inline) {
+ if ($rDef.statements) {
+ out += ' ' + ($ruleValidate.validate) + ' ';
+ } else {
+ out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';
+ }
+ } else if ($macro) {
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($code);
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ out += ' ' + ($validateCode) + '.call( ';
+ if (it.opts.passContext) {
+ out += 'this';
+ } else {
+ out += 'self';
+ }
+ if ($compile || $rDef.schema === false) {
+ out += ' , ' + ($data) + ' ';
+ } else {
+ out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
+ }
+ out += ' , (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';
+ var def_callRuleValidate = out;
+ out = $$outStack.pop();
+ if ($rDef.errors === false) {
+ out += ' ' + ($valid) + ' = ';
+ if ($asyncKeyword) {
+ out += 'await ';
+ }
+ out += '' + (def_callRuleValidate) + '; ';
+ } else {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
+ } else {
+ out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';
+ }
+ }
+ }
+ if ($rDef.modifying) {
+ out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ out += '' + ($closingBraces);
+ if ($rDef.valid) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ out += ' if ( ';
+ if ($rDef.valid === undefined) {
+ out += ' !';
+ if ($macro) {
+ out += '' + ($nextValid);
+ } else {
+ out += '' + ($valid);
+ }
+ } else {
+ out += ' ' + (!$rDef.valid) + ' ';
+ }
+ out += ') { ';
+ $errorKeyword = $rule.keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ var def_customError = out;
+ out = $$outStack.pop();
+ if ($inline) {
+ if ($rDef.errors) {
+ if ($rDef.errors != 'full') {
+ out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } ';
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ } else if ($macro) {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } else { ' + (def_customError) + ' } ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ return out;
+}
+
+},{}],23:[function(require,module,exports){
+'use strict';
+module.exports = function generate_dependencies(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $schemaDeps = {},
+ $propertyDeps = {},
+ $ownProperties = it.opts.ownProperties;
+ for ($property in $schema) {
+ if ($property == '__proto__') continue;
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+ out += 'var ' + ($errs) + ' = errors;';
+ var $currentErrorPath = it.errorPath;
+ out += 'var missing' + ($lvl) + ';';
+ for (var $property in $propertyDeps) {
+ $deps = $propertyDeps[$property];
+ if ($deps.length) {
+ out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ if ($breakOnError) {
+ out += ' && ( ';
+ var arr1 = $deps;
+ if (arr1) {
+ var $propertyKey, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $propertyKey = arr1[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ')) { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ out += ' ) { ';
+ var arr2 = $deps;
+ if (arr2) {
+ var $propertyKey, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $propertyKey = arr2[i2 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+ for (var $property in $schemaDeps) {
+ var $sch = $schemaDeps[$property];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ out += ') { ';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
+
+},{}],24:[function(require,module,exports){
+'use strict';
+module.exports = function generate_enum(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $i = 'i' + $lvl,
+ $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ';';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to one of the allowed values\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],25:[function(require,module,exports){
+'use strict';
+module.exports = function generate_format(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ if (it.opts.format === false) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $unknownFormats = it.opts.unknownFormats,
+ $allowUnknown = Array.isArray($unknownFormats);
+ if ($isData) {
+ var $format = 'format' + $lvl,
+ $isObject = 'isObject' + $lvl,
+ $formatType = 'formatType' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ if (it.async) {
+ out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
+ }
+ out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' (';
+ if ($unknownFormats != 'ignore') {
+ out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
+ if ($allowUnknown) {
+ out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
+ }
+ out += ') || ';
+ }
+ out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($unknownFormats == 'ignore') {
+ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($formatType != $ruleType) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { ';
+ } else {
+ out += ' if (! ';
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ if (typeof $format == 'function') {
+ out += ' ' + ($formatRef) + '(' + ($data) + ') ';
+ } else {
+ out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
+ }
+ out += ') { ';
+ }
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match format "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],26:[function(require,module,exports){
+'use strict';
+module.exports = function generate_if(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $thenSch = it.schema['then'],
+ $elseSch = it.schema['else'],
+ $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)),
+ $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)),
+ $currentBaseId = $it.baseId;
+ if ($thenPresent || $elsePresent) {
+ var $ifClause;
+ $it.createErrors = false;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ $it.createErrors = true;
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ if ($thenPresent) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $it.schema = it.schema['then'];
+ $it.schemaPath = it.schemaPath + '.then';
+ $it.errSchemaPath = it.errSchemaPath + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'then\'; ';
+ } else {
+ $ifClause = '\'then\'';
+ }
+ out += ' } ';
+ if ($elsePresent) {
+ out += ' else { ';
+ }
+ } else {
+ out += ' if (!' + ($nextValid) + ') { ';
+ }
+ if ($elsePresent) {
+ $it.schema = it.schema['else'];
+ $it.schemaPath = it.schemaPath + '.else';
+ $it.errSchemaPath = it.errSchemaPath + '/else';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'else\'; ';
+ } else {
+ $ifClause = '\'else\'';
+ }
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],27:[function(require,module,exports){
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('./ref'),
+ allOf: require('./allOf'),
+ anyOf: require('./anyOf'),
+ '$comment': require('./comment'),
+ const: require('./const'),
+ contains: require('./contains'),
+ dependencies: require('./dependencies'),
+ 'enum': require('./enum'),
+ format: require('./format'),
+ 'if': require('./if'),
+ items: require('./items'),
+ maximum: require('./_limit'),
+ minimum: require('./_limit'),
+ maxItems: require('./_limitItems'),
+ minItems: require('./_limitItems'),
+ maxLength: require('./_limitLength'),
+ minLength: require('./_limitLength'),
+ maxProperties: require('./_limitProperties'),
+ minProperties: require('./_limitProperties'),
+ multipleOf: require('./multipleOf'),
+ not: require('./not'),
+ oneOf: require('./oneOf'),
+ pattern: require('./pattern'),
+ properties: require('./properties'),
+ propertyNames: require('./propertyNames'),
+ required: require('./required'),
+ uniqueItems: require('./uniqueItems'),
+ validate: require('./validate')
+};
+
+},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){
+'use strict';
+module.exports = function generate_items(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId;
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if (Array.isArray($schema)) {
+ var $additionalItems = it.schema.additionalItems;
+ if ($additionalItems === false) {
+ out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) {
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
+
+},{}],29:[function(require,module,exports){
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ out += 'var division' + ($lvl) + ';if (';
+ if ($isData) {
+ out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
+ }
+ out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
+ if (it.opts.multipleOfPrecision) {
+ out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
+ } else {
+ out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
+ }
+ out += ' ) ';
+ if ($isData) {
+ out += ' ) ';
+ }
+ out += ' ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be multiple of ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],30:[function(require,module,exports){
+'use strict';
+module.exports = function generate_not(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (' + ($nextValid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ }
+ return out;
+}
+
+},{}],31:[function(require,module,exports){
+'use strict';
+module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $currentBaseId = $it.baseId,
+ $prevValid = 'prevValid' + $lvl,
+ $passingSchemas = 'passingSchemas' + $lvl;
+ out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ } else {
+ out += ' var ' + ($nextValid) + ' = true; ';
+ }
+ if ($i) {
+ out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match exactly one schema in oneOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
+
+},{}],32:[function(require,module,exports){
+'use strict';
+module.exports = function generate_pattern(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match pattern "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
+
+},{}],33:[function(require,module,exports){
+'use strict';
+module.exports = function generate_properties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl;
+ var $schemaKeys = Object.keys($schema || {}).filter(notProto),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties).filter(notProto),
+ $aProperties = it.schema.additionalProperties,
+ $someProperties = $schemaKeys.length || $pPropertyKeys.length,
+ $noAdditional = $aProperties === false,
+ $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
+ $removeAdditional = it.opts.removeAdditional,
+ $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ var $required = it.schema.required;
+ if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {
+ var $requiredHash = it.util.toHash($required);
+ }
+
+ function notProto(p) {
+ return p !== '__proto__';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined;';
+ }
+ if ($checkAdditional) {
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 8) {
+ out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') ';
+ } else {
+ var arr1 = $schemaKeys;
+ if (arr1) {
+ var $propertyKey, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $propertyKey = arr1[i1 += 1];
+ out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr2 = $pPropertyKeys;
+ if (arr2) {
+ var $pProperty, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $pProperty = arr2[$i += 1];
+ out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ out += ' ); if (isAdditional' + ($lvl) + ') { ';
+ }
+ if ($removeAdditional == 'all') {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + ' + $key + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ }
+ if ($noAdditional) {
+ if ($removeAdditional) {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ out += ' ' + ($nextValid) + ' = false; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is an invalid additional property';
+ } else {
+ out += 'should NOT have additional properties';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ }
+ } else if ($additionalIsSchema) {
+ if ($removeAdditional == 'failing') {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ } else {
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ }
+ if ($someProperties) {
+ out += ' } ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ var $useDefaults = it.opts.useDefaults && !it.compositeRule;
+ if ($schemaKeys.length) {
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ var $prop = it.util.getProperty($propertyKey),
+ $passData = $data + $prop,
+ $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ $code = it.util.varReplace($code, $nextData, $passData);
+ var $useData = $passData;
+ } else {
+ var $useData = $nextData;
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
+ }
+ if ($hasDefault) {
+ out += ' ' + ($code) + ' ';
+ } else {
+ if ($requiredHash && $requiredHash[$propertyKey]) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = false; ';
+ var $currentErrorPath = it.errorPath,
+ $currErrSchemaPath = $errSchemaPath,
+ $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ it.errorPath = $currentErrorPath;
+ out += ' } else { ';
+ } else {
+ if ($breakOnError) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ' ) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr4 = $pPropertyKeys;
+ if (arr4) {
+ var $pProperty, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $pProperty = arr4[i4 += 1];
+ var $sch = $pProperties[$pProperty];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
+
+},{}],34:[function(require,module,exports){
+'use strict';
+module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ out += 'var ' + ($errs) + ' = errors;';
+ if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $i = 'i' + $lvl,
+ $invalidName = '\' + ' + $key + ' + \'',
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined; ';
+ }
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' var startErrs' + ($lvl) + ' = errors; ';
+ var $passData = $key;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ out += ' } }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
+
+},{}],35:[function(require,module,exports){
+'use strict';
+module.exports = function generate_ref(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $async, $refCode;
+ if ($schema == '#' || $schema == '#/') {
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ } else {
+ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
+ if ($refVal === undefined) {
+ var $message = it.MissingRefError.message(it.baseId, $schema);
+ if (it.opts.missingRefs == 'fail') {
+ it.logger.error($message);
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ } else if (it.opts.missingRefs == 'ignore') {
+ it.logger.warn($message);
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ throw new it.MissingRefError(it.baseId, $schema, $message);
+ }
+ } else if ($refVal.inline) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ }
+ } else {
+ $async = $refVal.$async === true || (it.async && $refVal.$async !== false);
+ $refCode = $refVal.code;
+ }
+ }
+ if ($refCode) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ if (it.opts.passContext) {
+ out += ' ' + ($refCode) + '.call(this, ';
+ } else {
+ out += ' ' + ($refCode) + '( ';
+ }
+ out += ' ' + ($data) + ', (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
+ var __callValidate = out;
+ out = $$outStack.pop();
+ if ($async) {
+ if (!it.async) throw new Error('async schema referenced by sync schema');
+ if ($breakOnError) {
+ out += ' var ' + ($valid) + '; ';
+ }
+ out += ' try { await ' + (__callValidate) + '; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = true; ';
+ }
+ out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = false; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ }
+ } else {
+ out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ }
+ return out;
+}
+
+},{}],36:[function(require,module,exports){
+'use strict';
+module.exports = function generate_required(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
+ var $required = [];
+ var arr1 = $schema;
+ if (arr1) {
+ var $property, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $property = arr1[i1 += 1];
+ var $propertySch = it.schema.properties[$property];
+ if (!($propertySch && (it.opts.strictKeywords ? (typeof $propertySch == 'object' && Object.keys($propertySch).length > 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) {
+ $required[$required.length] = $property;
+ }
+ }
+ }
+ } else {
+ var $required = $schema;
+ }
+ }
+ if ($isData || $required.length) {
+ var $currentErrorPath = it.errorPath,
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired,
+ $ownProperties = it.opts.ownProperties;
+ if ($breakOnError) {
+ out += ' var missing' + ($lvl) + '; ';
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ out += ' var ' + ($valid) + ' = true; ';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += '; if (!' + ($valid) + ') break; } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ } else {
+ out += ' if ( ';
+ var arr2 = $required;
+ if (arr2) {
+ var $propertyKey, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $propertyKey = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ') { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ }
+ } else {
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ if ($isData) {
+ out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ } else {
+ var arr3 = $required;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ } else if ($breakOnError) {
+ out += ' if (true) {';
+ }
+ return out;
+}
+
+},{}],37:[function(require,module,exports){
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (($schema || $isData) && it.opts.uniqueItems !== false) {
+ if ($isData) {
+ out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
+ }
+ out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';
+ var $itemType = it.schema.items && it.schema.items.type,
+ $typeIsArray = Array.isArray($itemType);
+ if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {
+ out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';
+ } else {
+ out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';
+ var $method = 'checkDataType' + ($typeIsArray ? 's' : '');
+ out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; ';
+ if ($typeIsArray) {
+ out += ' if (typeof item == \'string\') item = \'"\' + item; ';
+ }
+ out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';
+ }
+ out += ' } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
+
+},{}],38:[function(require,module,exports){
+'use strict';
+module.exports = function generate_validate(it, $keyword, $ruleType) {
+ var out = '';
+ var $async = it.schema.$async === true,
+ $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
+ $id = it.self._getId(it.schema);
+ if (it.opts.strictKeywords) {
+ var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
+ if ($unknownKwd) {
+ var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
+ if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
+ else throw new Error($keywordsMsg);
+ }
+ }
+ if (it.isTop) {
+ out += ' var validate = ';
+ if ($async) {
+ it.async = true;
+ out += 'async ';
+ }
+ out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
+ if ($id && (it.opts.sourceCode || it.opts.processCode)) {
+ out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
+ }
+ }
+ if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
+ var $keyword = 'false schema';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ if (it.schema === false) {
+ if (it.isTop) {
+ $breakOnError = true;
+ } else {
+ out += ' var ' + ($valid) + ' = false; ';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'boolean schema is false\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ if (it.isTop) {
+ if ($async) {
+ out += ' return data; ';
+ } else {
+ out += ' validate.errors = null; return true; ';
+ }
+ } else {
+ out += ' var ' + ($valid) + ' = true; ';
+ }
+ }
+ if (it.isTop) {
+ out += ' }; return validate; ';
+ }
+ return out;
+ }
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+ it.dataPathArr = [""];
+ if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored in the schema root';
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ out += ' var vErrors = null; ';
+ out += ' var errors = 0; ';
+ out += ' if (rootData === undefined) rootData = data; ';
+ } else {
+ var $lvl = it.level,
+ $dataLvl = it.dataLevel,
+ $data = 'data' + ($dataLvl || '');
+ if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ out += ' var errs_' + ($lvl) + ' = errors;';
+ }
+ var $valid = 'valid' + $lvl,
+ $breakOnError = !it.opts.allErrors,
+ $closingBraces1 = '',
+ $closingBraces2 = '';
+ var $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
+ if ($typeIsArray) {
+ if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null');
+ } else if ($typeSchema != 'null') {
+ $typeSchema = [$typeSchema, 'null'];
+ $typeIsArray = true;
+ }
+ }
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+ if (it.schema.$ref && $refKeywords) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
+ } else if (it.opts.extendRefs !== true) {
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ if (it.schema.$comment && it.opts.$comment) {
+ out += ' ' + (it.RULES.all.$comment.code(it, '$comment'));
+ }
+ if ($typeSchema) {
+ if (it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ }
+ var $rulesGroup = it.RULES.types[$typeSchema];
+ if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { ';
+ if ($coerceToTypes) {
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } ';
+ }
+ out += ' if (' + ($coerced) + ' !== undefined) ; ';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($type == 'string') {
+ out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' else { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } if (' + ($coerced) + ' !== undefined) { ';
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
+ if (!$dataLvl) {
+ out += 'if (' + ($parentData) + ' !== undefined)';
+ }
+ out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' } ';
+ }
+ }
+ if (it.schema.$ref && !$refKeywords) {
+ out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
+ if ($breakOnError) {
+ out += ' } if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ } else {
+ var arr2 = it.RULES;
+ if (arr2) {
+ var $rulesGroup, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $rulesGroup = arr2[i2 += 1];
+ if ($shouldUseGroup($rulesGroup)) {
+ if ($rulesGroup.type) {
+ out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { ';
+ }
+ if (it.opts.useDefaults) {
+ if ($rulesGroup.type == 'object' && it.schema.properties) {
+ var $schema = it.schema.properties,
+ $schemaKeys = Object.keys($schema);
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ($sch.default !== undefined) {
+ var $passData = $data + it.util.getProperty($propertyKey);
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
+ var arr4 = it.schema.items;
+ if (arr4) {
+ var $sch, $i = -1,
+ l4 = arr4.length - 1;
+ while ($i < l4) {
+ $sch = arr4[$i += 1];
+ if ($sch.default !== undefined) {
+ var $passData = $data + '[' + $i + ']';
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ }
+ }
+ var arr5 = $rulesGroup.rules;
+ if (arr5) {
+ var $rule, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $rule = arr5[i5 += 1];
+ if ($shouldUseRule($rule)) {
+ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
+ if ($code) {
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
+ out += ' else { ';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return data; ';
+ out += ' else throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; ';
+ out += ' return errors === 0; ';
+ }
+ out += ' }; return validate;';
+ } else {
+ out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i = 0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i = 0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined) return true;
+ }
+ return out;
+}
+
+},{}],39:[function(require,module,exports){
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var customRuleCode = require('./dotjs/custom');
+var definitionSchema = require('./definition_schema');
+
+module.exports = {
+ add: addKeyword,
+ get: getKeyword,
+ remove: removeKeyword,
+ validate: validateKeyword
+};
+
+
+/**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ * @return {Ajv} this for method chaining
+ */
+function addKeyword(keyword, definition) {
+ /* jshint validthis: true */
+ /* eslint no-shadow: 0 */
+ var RULES = this.RULES;
+ if (RULES.keywords[keyword])
+ throw new Error('Keyword ' + keyword + ' is already defined');
+
+ if (!IDENTIFIER.test(keyword))
+ throw new Error('Keyword ' + keyword + ' is not a valid identifier');
+
+ if (definition) {
+ this.validateKeyword(definition, true);
+
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ for (var i=0; i<dataType.length; i++)
+ _addRule(keyword, dataType[i], definition);
+ } else {
+ _addRule(keyword, dataType, definition);
+ }
+
+ var metaSchema = definition.metaSchema;
+ if (metaSchema) {
+ if (definition.$data && this._opts.$data) {
+ metaSchema = {
+ anyOf: [
+ metaSchema,
+ { '$ref': 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' }
+ ]
+ };
+ }
+ definition.validateSchema = this.compile(metaSchema, true);
+ }
+ }
+
+ RULES.keywords[keyword] = RULES.all[keyword] = true;
+
+
+ function _addRule(keyword, dataType, definition) {
+ var ruleGroup;
+ for (var i=0; i<RULES.length; i++) {
+ var rg = RULES[i];
+ if (rg.type == dataType) {
+ ruleGroup = rg;
+ break;
+ }
+ }
+
+ if (!ruleGroup) {
+ ruleGroup = { type: dataType, rules: [] };
+ RULES.push(ruleGroup);
+ }
+
+ var rule = {
+ keyword: keyword,
+ definition: definition,
+ custom: true,
+ code: customRuleCode,
+ implements: definition.implements
+ };
+ ruleGroup.rules.push(rule);
+ RULES.custom[keyword] = rule;
+ }
+
+ return this;
+}
+
+
+/**
+ * Get keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+ */
+function getKeyword(keyword) {
+ /* jshint validthis: true */
+ var rule = this.RULES.custom[keyword];
+ return rule ? rule.definition : this.RULES.keywords[keyword] || false;
+}
+
+
+/**
+ * Remove keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Ajv} this for method chaining
+ */
+function removeKeyword(keyword) {
+ /* jshint validthis: true */
+ var RULES = this.RULES;
+ delete RULES.keywords[keyword];
+ delete RULES.all[keyword];
+ delete RULES.custom[keyword];
+ for (var i=0; i<RULES.length; i++) {
+ var rules = RULES[i].rules;
+ for (var j=0; j<rules.length; j++) {
+ if (rules[j].keyword == keyword) {
+ rules.splice(j, 1);
+ break;
+ }
+ }
+ }
+ return this;
+}
+
+
+/**
+ * Validate keyword definition
+ * @this Ajv
+ * @param {Object} definition keyword definition object.
+ * @param {Boolean} throwError true to throw exception if definition is invalid
+ * @return {boolean} validation result
+ */
+function validateKeyword(definition, throwError) {
+ validateKeyword.errors = null;
+ var v = this._validateKeyword = this._validateKeyword
+ || this.compile(definitionSchema, true);
+
+ if (v(definition)) return true;
+ validateKeyword.errors = v.errors;
+ if (throwError)
+ throw new Error('custom keyword definition is invalid: ' + this.errorsText(v.errors));
+ else
+ return false;
+}
+
+},{"./definition_schema":12,"./dotjs/custom":22}],40:[function(require,module,exports){
+module.exports={
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
+ "description": "Meta-schema for $data reference (JSON Schema extension proposal)",
+ "type": "object",
+ "required": [ "$data" ],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [
+ { "format": "relative-json-pointer" },
+ { "format": "json-pointer" }
+ ]
+ }
+ },
+ "additionalProperties": false
+}
+
+},{}],41:[function(require,module,exports){
+module.exports={
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "http://json-schema.org/draft-07/schema#",
+ "title": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "allOf": [
+ { "$ref": "#/definitions/nonNegativeInteger" },
+ { "default": 0 }
+ ]
+ },
+ "simpleTypes": {
+ "enum": [
+ "array",
+ "boolean",
+ "integer",
+ "null",
+ "number",
+ "object",
+ "string"
+ ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "uniqueItems": true,
+ "default": []
+ }
+ },
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$comment": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": true,
+ "readOnly": {
+ "type": "boolean",
+ "default": false
+ },
+ "examples": {
+ "type": "array",
+ "items": true
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": { "$ref": "#" },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": true
+ },
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "contains": { "$ref": "#" },
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": { "$ref": "#" },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "propertyNames": { "format": "regex" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "propertyNames": { "$ref": "#" },
+ "const": true,
+ "enum": {
+ "type": "array",
+ "items": true,
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": { "type": "string" },
+ "contentMediaType": { "type": "string" },
+ "contentEncoding": { "type": "string" },
+ "if": {"$ref": "#"},
+ "then": {"$ref": "#"},
+ "else": {"$ref": "#"},
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "default": true
+}
+
+},{}],42:[function(require,module,exports){
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
+
+},{}],43:[function(require,module,exports){
+'use strict';
+
+module.exports = function (data, opts) {
+ if (!opts) opts = {};
+ if (typeof opts === 'function') opts = { cmp: opts };
+ var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
+
+ var cmp = opts.cmp && (function (f) {
+ return function (node) {
+ return function (a, b) {
+ var aobj = { key: a, value: node[a] };
+ var bobj = { key: b, value: node[b] };
+ return f(aobj, bobj);
+ };
+ };
+ })(opts.cmp);
+
+ var seen = [];
+ return (function stringify (node) {
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
+ node = node.toJSON();
+ }
+
+ if (node === undefined) return;
+ if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
+ if (typeof node !== 'object') return JSON.stringify(node);
+
+ var i, out;
+ if (Array.isArray(node)) {
+ out = '[';
+ for (i = 0; i < node.length; i++) {
+ if (i) out += ',';
+ out += stringify(node[i]) || 'null';
+ }
+ return out + ']';
+ }
+
+ if (node === null) return 'null';
+
+ if (seen.indexOf(node) !== -1) {
+ if (cycles) return JSON.stringify('__cycle__');
+ throw new TypeError('Converting circular structure to JSON');
+ }
+
+ var seenIndex = seen.push(node) - 1;
+ var keys = Object.keys(node).sort(cmp && cmp(node));
+ out = '';
+ for (i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = stringify(node[key]);
+
+ if (!value) continue;
+ if (out) out += ',';
+ out += JSON.stringify(key) + ':' + value;
+ }
+ seen.splice(seenIndex, 1);
+ return '{' + out + '}';
+ })(data);
+};
+
+},{}],44:[function(require,module,exports){
+'use strict';
+
+var traverse = module.exports = function (schema, opts, cb) {
+ // Legacy support for v0.3.1 and earlier.
+ if (typeof opts == 'function') {
+ cb = opts;
+ opts = {};
+ }
+
+ cb = opts.cb || cb;
+ var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};
+ var post = cb.post || function() {};
+
+ _traverse(opts, pre, post, schema, '', schema);
+};
+
+
+traverse.keywords = {
+ additionalItems: true,
+ items: true,
+ contains: true,
+ additionalProperties: true,
+ propertyNames: true,
+ not: true
+};
+
+traverse.arrayKeywords = {
+ items: true,
+ allOf: true,
+ anyOf: true,
+ oneOf: true
+};
+
+traverse.propsKeywords = {
+ definitions: true,
+ properties: true,
+ patternProperties: true,
+ dependencies: true
+};
+
+traverse.skipKeywords = {
+ default: true,
+ enum: true,
+ const: true,
+ required: true,
+ maximum: true,
+ minimum: true,
+ exclusiveMaximum: true,
+ exclusiveMinimum: true,
+ multipleOf: true,
+ maxLength: true,
+ minLength: true,
+ pattern: true,
+ format: true,
+ maxItems: true,
+ minItems: true,
+ uniqueItems: true,
+ maxProperties: true,
+ minProperties: true
+};
+
+
+function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
+ pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
+ for (var key in schema) {
+ var sch = schema[key];
+ if (Array.isArray(sch)) {
+ if (key in traverse.arrayKeywords) {
+ for (var i=0; i<sch.length; i++)
+ _traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
+ }
+ } else if (key in traverse.propsKeywords) {
+ if (sch && typeof sch == 'object') {
+ for (var prop in sch)
+ _traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
+ }
+ } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
+ _traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
+ }
+ }
+ post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
+ }
+}
+
+
+function escapeJsonPtr(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+},{}],45:[function(require,module,exports){
+/** @license URI.js v4.4.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.URI = global.URI || {})));
+}(this, (function (exports) { 'use strict';
+
+function merge() {
+ for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
+ sets[_key] = arguments[_key];
+ }
+
+ if (sets.length > 1) {
+ sets[0] = sets[0].slice(0, -1);
+ var xl = sets.length - 1;
+ for (var x = 1; x < xl; ++x) {
+ sets[x] = sets[x].slice(1, -1);
+ }
+ sets[xl] = sets[xl].slice(1);
+ return sets.join('');
+ } else {
+ return sets[0];
+ }
+}
+function subexp(str) {
+ return "(?:" + str + ")";
+}
+function typeOf(o) {
+ return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
+}
+function toUpperCase(str) {
+ return str.toUpperCase();
+}
+function toArray(obj) {
+ return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
+}
+function assign(target, source) {
+ var obj = target;
+ if (source) {
+ for (var key in source) {
+ obj[key] = source[key];
+ }
+ }
+ return obj;
+}
+
+function buildExps(isIRI) {
+ var ALPHA$$ = "[A-Za-z]",
+ CR$ = "[\\x0D]",
+ DIGIT$$ = "[0-9]",
+ DQUOTE$$ = "[\\x22]",
+ HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"),
+ //case-insensitive
+ LF$$ = "[\\x0A]",
+ SP$$ = "[\\x20]",
+ PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)),
+ //expanded
+ GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]",
+ SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",
+ RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),
+ UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]",
+ //subset, excludes bidi control characters
+ IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
+ //subset
+ UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
+ SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
+ USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
+ DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$),
+ DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
+ //relaxed parsing rules
+ IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
+ H16$ = subexp(HEXDIG$$ + "{1,4}"),
+ LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$),
+ IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$),
+ // 6( h16 ":" ) ls32
+ IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$),
+ // "::" 5( h16 ":" ) ls32
+ IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$),
+ //[ h16 ] "::" 4( h16 ":" ) ls32
+ IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$),
+ //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+ IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$),
+ //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+ IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$),
+ //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
+ IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$),
+ //[ *4( h16 ":" ) h16 ] "::" ls32
+ IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$),
+ //[ *5( h16 ":" ) h16 ] "::" h16
+ IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
+ //[ *6( h16 ":" ) h16 ] "::"
+ IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
+ ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
+ //RFC 6874
+ IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$),
+ //RFC 6874
+ IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$),
+ //RFC 6874, with relaxed parsing rules
+ IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
+ IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"),
+ //RFC 6874
+ REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
+ HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$),
+ PORT$ = subexp(DIGIT$$ + "*"),
+ AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"),
+ PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
+ SEGMENT$ = subexp(PCHAR$ + "*"),
+ SEGMENT_NZ$ = subexp(PCHAR$ + "+"),
+ SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
+ PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"),
+ PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"),
+ //simplified
+ PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_EMPTY$ = "(?!" + PCHAR$ + ")",
+ PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"),
+ FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"),
+ HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$),
+ RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$),
+ ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"),
+ GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$",
+ SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
+ return {
+ NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
+ NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
+ NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
+ ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ UNRESERVED: new RegExp(UNRESERVED$$, "g"),
+ OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
+ PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
+ IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
+ IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
+ };
+}
+var URI_PROTOCOL = buildExps(false);
+
+var IRI_PROTOCOL = buildExps(true);
+
+var slicedToArray = function () {
+ function sliceIterator(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"]) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+ }
+
+ return function (arr, i) {
+ if (Array.isArray(arr)) {
+ return arr;
+ } else if (Symbol.iterator in Object(arr)) {
+ return sliceIterator(arr, i);
+ } else {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+ }
+ };
+}();
+
+
+
+
+
+
+
+
+
+
+
+
+
+var toConsumableArray = function (arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
+
+ return arr2;
+ } else {
+ return Array.from(arr);
+ }
+};
+
+/** Highest positive signed 32-bit float value */
+
+var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
+
+/** Bootstring parameters */
+var base = 36;
+var tMin = 1;
+var tMax = 26;
+var skew = 38;
+var damp = 700;
+var initialBias = 72;
+var initialN = 128; // 0x80
+var delimiter = '-'; // '\x2D'
+
+/** Regular expressions */
+var regexPunycode = /^xn--/;
+var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
+var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
+
+/** Error messages */
+var errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+};
+
+/** Convenience shortcuts */
+var baseMinusTMin = base - tMin;
+var floor = Math.floor;
+var stringFromCharCode = String.fromCharCode;
+
+/*--------------------------------------------------------------------------*/
+
+/**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+function error$1(type) {
+ throw new RangeError(errors[type]);
+}
+
+/**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+function map(array, fn) {
+ var result = [];
+ var length = array.length;
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+}
+
+/**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+function mapDomain(string, fn) {
+ var parts = string.split('@');
+ var result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
+ var encoded = map(labels, fn).join('.');
+ return result + encoded;
+}
+
+/**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+function ucs2decode(string) {
+ var output = [];
+ var counter = 0;
+ var length = string.length;
+ while (counter < length) {
+ var value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // It's a high surrogate, and there is a next character.
+ var extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) {
+ // Low surrogate.
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // It's an unmatched surrogate; only append this code unit, in case the
+ // next code unit is the high surrogate of a surrogate pair.
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+}
+
+/**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+var ucs2encode = function ucs2encode(array) {
+ return String.fromCodePoint.apply(String, toConsumableArray(array));
+};
+
+/**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+var basicToDigit = function basicToDigit(codePoint) {
+ if (codePoint - 0x30 < 0x0A) {
+ return codePoint - 0x16;
+ }
+ if (codePoint - 0x41 < 0x1A) {
+ return codePoint - 0x41;
+ }
+ if (codePoint - 0x61 < 0x1A) {
+ return codePoint - 0x61;
+ }
+ return base;
+};
+
+/**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+var digitToBasic = function digitToBasic(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+};
+
+/**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+var adapt = function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+};
+
+/**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+var decode = function decode(input) {
+ // Don't use UCS-2.
+ var output = [];
+ var inputLength = input.length;
+ var i = 0;
+ var n = initialN;
+ var bias = initialBias;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ var basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (var j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error$1('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ var oldi = i;
+ for (var w = 1, k = base;; /* no condition */k += base) {
+
+ if (index >= inputLength) {
+ error$1('invalid-input');
+ }
+
+ var digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error$1('overflow');
+ }
+
+ i += digit * w;
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+
+ if (digit < t) {
+ break;
+ }
+
+ var baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error$1('overflow');
+ }
+
+ w *= baseMinusT;
+ }
+
+ var out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error$1('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output.
+ output.splice(i++, 0, n);
+ }
+
+ return String.fromCodePoint.apply(String, output);
+};
+
+/**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+var encode = function encode(input) {
+ var output = [];
+
+ // Convert the input in UCS-2 to an array of Unicode code points.
+ input = ucs2decode(input);
+
+ // Cache the length.
+ var inputLength = input.length;
+
+ // Initialize the state.
+ var n = initialN;
+ var delta = 0;
+ var bias = initialBias;
+
+ // Handle the basic code points.
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var _currentValue2 = _step.value;
+
+ if (_currentValue2 < 0x80) {
+ output.push(stringFromCharCode(_currentValue2));
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ var basicLength = output.length;
+ var handledCPCount = basicLength;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string with a delimiter unless it's empty.
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ var m = maxInt;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var currentValue = _step2.value;
+
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow.
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+
+ var handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error$1('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var _currentValue = _step3.value;
+
+ if (_currentValue < n && ++delta > maxInt) {
+ error$1('overflow');
+ }
+ if (_currentValue == n) {
+ // Represent delta as a generalized variable-length integer.
+ var q = delta;
+ for (var k = base;; /* no condition */k += base) {
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+ if (q < t) {
+ break;
+ }
+ var qMinusT = q - t;
+ var baseMinusT = base - t;
+ output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ ++delta;
+ ++n;
+ }
+ return output.join('');
+};
+
+/**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+var toUnicode = function toUnicode(input) {
+ return mapDomain(input, function (string) {
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
+ });
+};
+
+/**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+var toASCII = function toASCII(input) {
+ return mapDomain(input, function (string) {
+ return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
+ });
+};
+
+/*--------------------------------------------------------------------------*/
+
+/** Define the public API */
+var punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '2.1.0',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+};
+
+/**
+ * URI.js
+ *
+ * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
+ * @see http://github.com/garycourt/uri-js
+ */
+/**
+ * Copyright 2011 Gary Court. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of Gary Court.
+ */
+var SCHEMES = {};
+function pctEncChar(chr) {
+ var c = chr.charCodeAt(0);
+ var e = void 0;
+ if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
+ return e;
+}
+function pctDecChars(str) {
+ var newStr = "";
+ var i = 0;
+ var il = str.length;
+ while (i < il) {
+ var c = parseInt(str.substr(i + 1, 2), 16);
+ if (c < 128) {
+ newStr += String.fromCharCode(c);
+ i += 3;
+ } else if (c >= 194 && c < 224) {
+ if (il - i >= 6) {
+ var c2 = parseInt(str.substr(i + 4, 2), 16);
+ newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
+ } else {
+ newStr += str.substr(i, 6);
+ }
+ i += 6;
+ } else if (c >= 224) {
+ if (il - i >= 9) {
+ var _c = parseInt(str.substr(i + 4, 2), 16);
+ var c3 = parseInt(str.substr(i + 7, 2), 16);
+ newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
+ } else {
+ newStr += str.substr(i, 9);
+ }
+ i += 9;
+ } else {
+ newStr += str.substr(i, 3);
+ i += 3;
+ }
+ }
+ return newStr;
+}
+function _normalizeComponentEncoding(components, protocol) {
+ function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(protocol.UNRESERVED) ? str : decStr;
+ }
+ if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
+ if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ return components;
+}
+
+function _stripLeadingZeros(str) {
+ return str.replace(/^0*(.*)/, "$1") || "0";
+}
+function _normalizeIPv4(host, protocol) {
+ var matches = host.match(protocol.IPV4ADDRESS) || [];
+
+ var _matches = slicedToArray(matches, 2),
+ address = _matches[1];
+
+ if (address) {
+ return address.split(".").map(_stripLeadingZeros).join(".");
+ } else {
+ return host;
+ }
+}
+function _normalizeIPv6(host, protocol) {
+ var matches = host.match(protocol.IPV6ADDRESS) || [];
+
+ var _matches2 = slicedToArray(matches, 3),
+ address = _matches2[1],
+ zone = _matches2[2];
+
+ if (address) {
+ var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),
+ _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
+ last = _address$toLowerCase$2[0],
+ first = _address$toLowerCase$2[1];
+
+ var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
+ var lastFields = last.split(":").map(_stripLeadingZeros);
+ var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
+ var fieldCount = isLastFieldIPv4Address ? 7 : 8;
+ var lastFieldsStart = lastFields.length - fieldCount;
+ var fields = Array(fieldCount);
+ for (var x = 0; x < fieldCount; ++x) {
+ fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
+ }
+ if (isLastFieldIPv4Address) {
+ fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
+ }
+ var allZeroFields = fields.reduce(function (acc, field, index) {
+ if (!field || field === "0") {
+ var lastLongest = acc[acc.length - 1];
+ if (lastLongest && lastLongest.index + lastLongest.length === index) {
+ lastLongest.length++;
+ } else {
+ acc.push({ index: index, length: 1 });
+ }
+ }
+ return acc;
+ }, []);
+ var longestZeroFields = allZeroFields.sort(function (a, b) {
+ return b.length - a.length;
+ })[0];
+ var newHost = void 0;
+ if (longestZeroFields && longestZeroFields.length > 1) {
+ var newFirst = fields.slice(0, longestZeroFields.index);
+ var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
+ newHost = newFirst.join(":") + "::" + newLast.join(":");
+ } else {
+ newHost = fields.join(":");
+ }
+ if (zone) {
+ newHost += "%" + zone;
+ }
+ return newHost;
+ } else {
+ return host;
+ }
+}
+var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
+var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
+function parse(uriString) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var components = {};
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
+ var matches = uriString.match(URI_PARSE);
+ if (matches) {
+ if (NO_MATCH_IS_UNDEFINED) {
+ //store each component
+ components.scheme = matches[1];
+ components.userinfo = matches[3];
+ components.host = matches[4];
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = matches[7];
+ components.fragment = matches[8];
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = matches[5];
+ }
+ } else {
+ //IE FIX for improper RegExp matching
+ //store each component
+ components.scheme = matches[1] || undefined;
+ components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
+ components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
+ components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
+ }
+ }
+ if (components.host) {
+ //normalize IP hosts
+ components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
+ }
+ //determine reference type
+ if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
+ components.reference = "same-document";
+ } else if (components.scheme === undefined) {
+ components.reference = "relative";
+ } else if (components.fragment === undefined) {
+ components.reference = "absolute";
+ } else {
+ components.reference = "uri";
+ }
+ //check for reference errors
+ if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
+ components.error = components.error || "URI is not a " + options.reference + " reference.";
+ }
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //check if scheme can't handle IRIs
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
+ //if host component is a domain name
+ if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ }
+ //convert IRI -> URI
+ _normalizeComponentEncoding(components, URI_PROTOCOL);
+ } else {
+ //normalize encodings
+ _normalizeComponentEncoding(components, protocol);
+ }
+ //perform scheme specific parsing
+ if (schemeHandler && schemeHandler.parse) {
+ schemeHandler.parse(components, options);
+ }
+ } else {
+ components.error = components.error || "URI can not be parsed.";
+ }
+ return components;
+}
+
+function _recomposeAuthority(components, options) {
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ if (components.userinfo !== undefined) {
+ uriTokens.push(components.userinfo);
+ uriTokens.push("@");
+ }
+ if (components.host !== undefined) {
+ //normalize IP hosts, add brackets and escape zone separator for IPv6
+ uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {
+ return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
+ }));
+ }
+ if (typeof components.port === "number" || typeof components.port === "string") {
+ uriTokens.push(":");
+ uriTokens.push(String(components.port));
+ }
+ return uriTokens.length ? uriTokens.join("") : undefined;
+}
+
+var RDS1 = /^\.\.?\//;
+var RDS2 = /^\/\.(\/|$)/;
+var RDS3 = /^\/\.\.(\/|$)/;
+var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
+function removeDotSegments(input) {
+ var output = [];
+ while (input.length) {
+ if (input.match(RDS1)) {
+ input = input.replace(RDS1, "");
+ } else if (input.match(RDS2)) {
+ input = input.replace(RDS2, "/");
+ } else if (input.match(RDS3)) {
+ input = input.replace(RDS3, "/");
+ output.pop();
+ } else if (input === "." || input === "..") {
+ input = "";
+ } else {
+ var im = input.match(RDS5);
+ if (im) {
+ var s = im[0];
+ input = input.slice(s.length);
+ output.push(s);
+ } else {
+ throw new Error("Unexpected dot segment condition");
+ }
+ }
+ }
+ return output.join("");
+}
+
+function serialize(components) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //perform scheme specific serialization
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
+ if (components.host) {
+ //if host component is an IPv6 address
+ if (protocol.IPV6ADDRESS.test(components.host)) {}
+ //TODO: normalize IPv6 address as per RFC 5952
+
+ //if host component is a domain name
+ else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
+ //convert IDN via punycode
+ try {
+ components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ }
+ }
+ //normalize encoding
+ _normalizeComponentEncoding(components, protocol);
+ if (options.reference !== "suffix" && components.scheme) {
+ uriTokens.push(components.scheme);
+ uriTokens.push(":");
+ }
+ var authority = _recomposeAuthority(components, options);
+ if (authority !== undefined) {
+ if (options.reference !== "suffix") {
+ uriTokens.push("//");
+ }
+ uriTokens.push(authority);
+ if (components.path && components.path.charAt(0) !== "/") {
+ uriTokens.push("/");
+ }
+ }
+ if (components.path !== undefined) {
+ var s = components.path;
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
+ s = removeDotSegments(s);
+ }
+ if (authority === undefined) {
+ s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
+ }
+ uriTokens.push(s);
+ }
+ if (components.query !== undefined) {
+ uriTokens.push("?");
+ uriTokens.push(components.query);
+ }
+ if (components.fragment !== undefined) {
+ uriTokens.push("#");
+ uriTokens.push(components.fragment);
+ }
+ return uriTokens.join(""); //merge tokens into a string
+}
+
+function resolveComponents(base, relative) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var skipNormalization = arguments[3];
+
+ var target = {};
+ if (!skipNormalization) {
+ base = parse(serialize(base, options), options); //normalize base components
+ relative = parse(serialize(relative, options), options); //normalize relative components
+ }
+ options = options || {};
+ if (!options.tolerant && relative.scheme) {
+ target.scheme = relative.scheme;
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (!relative.path) {
+ target.path = base.path;
+ if (relative.query !== undefined) {
+ target.query = relative.query;
+ } else {
+ target.query = base.query;
+ }
+ } else {
+ if (relative.path.charAt(0) === "/") {
+ target.path = removeDotSegments(relative.path);
+ } else {
+ if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
+ target.path = "/" + relative.path;
+ } else if (!base.path) {
+ target.path = relative.path;
+ } else {
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
+ }
+ target.path = removeDotSegments(target.path);
+ }
+ target.query = relative.query;
+ }
+ //target.authority = base.authority;
+ target.userinfo = base.userinfo;
+ target.host = base.host;
+ target.port = base.port;
+ }
+ target.scheme = base.scheme;
+ }
+ target.fragment = relative.fragment;
+ return target;
+}
+
+function resolve(baseURI, relativeURI, options) {
+ var schemelessOptions = assign({ scheme: 'null' }, options);
+ return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
+}
+
+function normalize(uri, options) {
+ if (typeof uri === "string") {
+ uri = serialize(parse(uri, options), options);
+ } else if (typeOf(uri) === "object") {
+ uri = parse(serialize(uri, options), options);
+ }
+ return uri;
+}
+
+function equal(uriA, uriB, options) {
+ if (typeof uriA === "string") {
+ uriA = serialize(parse(uriA, options), options);
+ } else if (typeOf(uriA) === "object") {
+ uriA = serialize(uriA, options);
+ }
+ if (typeof uriB === "string") {
+ uriB = serialize(parse(uriB, options), options);
+ } else if (typeOf(uriB) === "object") {
+ uriB = serialize(uriB, options);
+ }
+ return uriA === uriB;
+}
+
+function escapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
+}
+
+function unescapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
+}
+
+var handler = {
+ scheme: "http",
+ domainHost: true,
+ parse: function parse(components, options) {
+ //report missing host
+ if (!components.host) {
+ components.error = components.error || "HTTP URIs must have a host.";
+ }
+ return components;
+ },
+ serialize: function serialize(components, options) {
+ var secure = String(components.scheme).toLowerCase() === "https";
+ //normalize the default port
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
+ components.port = undefined;
+ }
+ //normalize the empty path
+ if (!components.path) {
+ components.path = "/";
+ }
+ //NOTE: We do not parse query strings for HTTP URIs
+ //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
+ //and not the HTTP spec.
+ return components;
+ }
+};
+
+var handler$1 = {
+ scheme: "https",
+ domainHost: handler.domainHost,
+ parse: handler.parse,
+ serialize: handler.serialize
+};
+
+function isSecure(wsComponents) {
+ return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
+}
+//RFC 6455
+var handler$2 = {
+ scheme: "ws",
+ domainHost: true,
+ parse: function parse(components, options) {
+ var wsComponents = components;
+ //indicate if the secure flag is set
+ wsComponents.secure = isSecure(wsComponents);
+ //construct resouce name
+ wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');
+ wsComponents.path = undefined;
+ wsComponents.query = undefined;
+ return wsComponents;
+ },
+ serialize: function serialize(wsComponents, options) {
+ //normalize the default port
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
+ wsComponents.port = undefined;
+ }
+ //ensure scheme matches secure flag
+ if (typeof wsComponents.secure === 'boolean') {
+ wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws';
+ wsComponents.secure = undefined;
+ }
+ //reconstruct path from resource name
+ if (wsComponents.resourceName) {
+ var _wsComponents$resourc = wsComponents.resourceName.split('?'),
+ _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),
+ path = _wsComponents$resourc2[0],
+ query = _wsComponents$resourc2[1];
+
+ wsComponents.path = path && path !== '/' ? path : undefined;
+ wsComponents.query = query;
+ wsComponents.resourceName = undefined;
+ }
+ //forbid fragment component
+ wsComponents.fragment = undefined;
+ return wsComponents;
+ }
+};
+
+var handler$3 = {
+ scheme: "wss",
+ domainHost: handler$2.domainHost,
+ parse: handler$2.parse,
+ serialize: handler$2.serialize
+};
+
+var O = {};
+var isIRI = true;
+//RFC 3986
+var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
+var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
+var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
+//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
+//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
+//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
+//const VCHAR$$ = "[\\x21-\\x7E]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
+//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
+//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
+//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
+var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
+var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
+var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
+var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
+var UNRESERVED = new RegExp(UNRESERVED$$, "g");
+var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
+var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
+var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
+var NOT_HFVALUE = NOT_HFNAME;
+function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(UNRESERVED) ? str : decStr;
+}
+var handler$4 = {
+ scheme: "mailto",
+ parse: function parse$$1(components, options) {
+ var mailtoComponents = components;
+ var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
+ mailtoComponents.path = undefined;
+ if (mailtoComponents.query) {
+ var unknownHeaders = false;
+ var headers = {};
+ var hfields = mailtoComponents.query.split("&");
+ for (var x = 0, xl = hfields.length; x < xl; ++x) {
+ var hfield = hfields[x].split("=");
+ switch (hfield[0]) {
+ case "to":
+ var toAddrs = hfield[1].split(",");
+ for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
+ to.push(toAddrs[_x]);
+ }
+ break;
+ case "subject":
+ mailtoComponents.subject = unescapeComponent(hfield[1], options);
+ break;
+ case "body":
+ mailtoComponents.body = unescapeComponent(hfield[1], options);
+ break;
+ default:
+ unknownHeaders = true;
+ headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
+ break;
+ }
+ }
+ if (unknownHeaders) mailtoComponents.headers = headers;
+ }
+ mailtoComponents.query = undefined;
+ for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
+ var addr = to[_x2].split("@");
+ addr[0] = unescapeComponent(addr[0]);
+ if (!options.unicodeSupport) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
+ } catch (e) {
+ mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ } else {
+ addr[1] = unescapeComponent(addr[1], options).toLowerCase();
+ }
+ to[_x2] = addr.join("@");
+ }
+ return mailtoComponents;
+ },
+ serialize: function serialize$$1(mailtoComponents, options) {
+ var components = mailtoComponents;
+ var to = toArray(mailtoComponents.to);
+ if (to) {
+ for (var x = 0, xl = to.length; x < xl; ++x) {
+ var toAddr = String(to[x]);
+ var atIdx = toAddr.lastIndexOf("@");
+ var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
+ var domain = toAddr.slice(atIdx + 1);
+ //convert IDN via punycode
+ try {
+ domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
+ } catch (e) {
+ components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ to[x] = localPart + "@" + domain;
+ }
+ components.path = to.join(",");
+ }
+ var headers = mailtoComponents.headers = mailtoComponents.headers || {};
+ if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
+ if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
+ var fields = [];
+ for (var name in headers) {
+ if (headers[name] !== O[name]) {
+ fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
+ }
+ }
+ if (fields.length) {
+ components.query = fields.join("&");
+ }
+ return components;
+ }
+};
+
+var URN_PARSE = /^([^\:]+)\:(.*)/;
+//RFC 2141
+var handler$5 = {
+ scheme: "urn",
+ parse: function parse$$1(components, options) {
+ var matches = components.path && components.path.match(URN_PARSE);
+ var urnComponents = components;
+ if (matches) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = matches[1].toLowerCase();
+ var nss = matches[2];
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ urnComponents.nid = nid;
+ urnComponents.nss = nss;
+ urnComponents.path = undefined;
+ if (schemeHandler) {
+ urnComponents = schemeHandler.parse(urnComponents, options);
+ }
+ } else {
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
+ }
+ return urnComponents;
+ },
+ serialize: function serialize$$1(urnComponents, options) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = urnComponents.nid;
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ if (schemeHandler) {
+ urnComponents = schemeHandler.serialize(urnComponents, options);
+ }
+ var uriComponents = urnComponents;
+ var nss = urnComponents.nss;
+ uriComponents.path = (nid || options.nid) + ":" + nss;
+ return uriComponents;
+ }
+};
+
+var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
+//RFC 4122
+var handler$6 = {
+ scheme: "urn:uuid",
+ parse: function parse(urnComponents, options) {
+ var uuidComponents = urnComponents;
+ uuidComponents.uuid = uuidComponents.nss;
+ uuidComponents.nss = undefined;
+ if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
+ }
+ return uuidComponents;
+ },
+ serialize: function serialize(uuidComponents, options) {
+ var urnComponents = uuidComponents;
+ //normalize UUID
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
+ return urnComponents;
+ }
+};
+
+SCHEMES[handler.scheme] = handler;
+SCHEMES[handler$1.scheme] = handler$1;
+SCHEMES[handler$2.scheme] = handler$2;
+SCHEMES[handler$3.scheme] = handler$3;
+SCHEMES[handler$4.scheme] = handler$4;
+SCHEMES[handler$5.scheme] = handler$5;
+SCHEMES[handler$6.scheme] = handler$6;
+
+exports.SCHEMES = SCHEMES;
+exports.pctEncChar = pctEncChar;
+exports.pctDecChars = pctDecChars;
+exports.parse = parse;
+exports.removeDotSegments = removeDotSegments;
+exports.serialize = serialize;
+exports.resolveComponents = resolveComponents;
+exports.resolve = resolve;
+exports.normalize = normalize;
+exports.equal = equal;
+exports.escapeComponent = escapeComponent;
+exports.unescapeComponent = unescapeComponent;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+
+
+},{}],"ajv":[function(require,module,exports){
+'use strict';
+
+var compileSchema = require('./compile')
+ , resolve = require('./compile/resolve')
+ , Cache = require('./cache')
+ , SchemaObject = require('./compile/schema_obj')
+ , stableStringify = require('fast-json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , $dataMetaSchema = require('./data')
+ , util = require('./compile/util');
+
+module.exports = Ajv;
+
+Ajv.prototype.validate = validate;
+Ajv.prototype.compile = compile;
+Ajv.prototype.addSchema = addSchema;
+Ajv.prototype.addMetaSchema = addMetaSchema;
+Ajv.prototype.validateSchema = validateSchema;
+Ajv.prototype.getSchema = getSchema;
+Ajv.prototype.removeSchema = removeSchema;
+Ajv.prototype.addFormat = addFormat;
+Ajv.prototype.errorsText = errorsText;
+
+Ajv.prototype._addSchema = _addSchema;
+Ajv.prototype._compile = _compile;
+
+Ajv.prototype.compileAsync = require('./compile/async');
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+Ajv.prototype.validateKeyword = customKeyword.validate;
+
+var errorClasses = require('./compile/error_classes');
+Ajv.ValidationError = errorClasses.Validation;
+Ajv.MissingRefError = errorClasses.MissingRef;
+Ajv.$dataMetaSchema = $dataMetaSchema;
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];
+var META_SUPPORT_DATA = ['/properties'];
+
+/**
+ * Creates validator instance.
+ * Usage: `Ajv(opts)`
+ * @param {Object} opts optional options
+ * @return {Object} ajv instance
+ */
+function Ajv(opts) {
+ if (!(this instanceof Ajv)) return new Ajv(opts);
+ opts = this._opts = util.copy(opts) || {};
+ setLogger(this);
+ this._schemas = {};
+ this._refs = {};
+ this._fragments = {};
+ this._formats = formats(opts.format);
+
+ this._cache = opts.cache || new Cache;
+ this._loadingSchemas = {};
+ this._compilations = [];
+ this.RULES = rules();
+ this._getId = chooseGetId(opts);
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
+ this._metaOpts = getMetaSchemaOptions(this);
+
+ if (opts.formats) addInitialFormats(this);
+ if (opts.keywords) addInitialKeywords(this);
+ addDefaultMetaSchema(this);
+ if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
+ if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});
+ addInitialSchemas(this);
+}
+
+
+
+/**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
+ * @this Ajv
+ * @param {String|Object} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+function validate(schemaKeyRef, data) {
+ var v;
+ if (typeof schemaKeyRef == 'string') {
+ v = this.getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = this._addSchema(schemaKeyRef);
+ v = schemaObj.validate || this._compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async !== true) this.errors = v.errors;
+ return valid;
+}
+
+
+/**
+ * Create validating function for passed schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
+ * @return {Function} validating function
+ */
+function compile(schema, _meta) {
+ var schemaObj = this._addSchema(schema, undefined, _meta);
+ return schemaObj.validate || this._compile(schemaObj);
+}
+
+
+/**
+ * Adds schema to the instance.
+ * @this Ajv
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ * @return {Ajv} this for method chaining
+ */
+function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
+ return this;
+ }
+ var id = this._getId(schema);
+ if (id !== undefined && typeof id != 'string')
+ throw new Error('schema id must be string');
+ key = resolve.normalizeId(key || id);
+ checkUnique(this, key);
+ this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
+ return this;
+}
+
+
+/**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
+ * @return {Ajv} this for method chaining
+ */
+function addMetaSchema(schema, key, skipValidation) {
+ this.addSchema(schema, key, skipValidation, true);
+ return this;
+}
+
+
+/**
+ * Validate schema
+ * @this Ajv
+ * @param {Object} schema schema to validate
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
+ * @return {Boolean} true if schema is valid
+ */
+function validateSchema(schema, throwOrLogError) {
+ var $schema = schema.$schema;
+ if ($schema !== undefined && typeof $schema != 'string')
+ throw new Error('$schema must be a string');
+ $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
+ if (!$schema) {
+ this.logger.warn('meta-schema not available');
+ this.errors = null;
+ return true;
+ }
+ var valid = this.validate($schema, schema);
+ if (!valid && throwOrLogError) {
+ var message = 'schema is invalid: ' + this.errorsText();
+ if (this._opts.validateSchema == 'log') this.logger.error(message);
+ else throw new Error(message);
+ }
+ return valid;
+}
+
+
+function defaultMeta(self) {
+ var meta = self._opts.meta;
+ self._opts.defaultMeta = typeof meta == 'object'
+ ? self._getId(meta) || meta
+ : self.getSchema(META_SCHEMA_ID)
+ ? META_SCHEMA_ID
+ : undefined;
+ return self._opts.defaultMeta;
+}
+
+
+/**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @this Ajv
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+function getSchema(keyRef) {
+ var schemaObj = _getSchemaObj(this, keyRef);
+ switch (typeof schemaObj) {
+ case 'object': return schemaObj.validate || this._compile(schemaObj);
+ case 'string': return this.getSchema(schemaObj);
+ case 'undefined': return _getSchemaFragment(this, keyRef);
+ }
+}
+
+
+function _getSchemaFragment(self, ref) {
+ var res = resolve.schema.call(self, { schema: {} }, ref);
+ if (res) {
+ var schema = res.schema
+ , root = res.root
+ , baseId = res.baseId;
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
+ self._fragments[ref] = new SchemaObject({
+ ref: ref,
+ fragment: true,
+ schema: schema,
+ root: root,
+ baseId: baseId,
+ validate: v
+ });
+ return v;
+ }
+}
+
+
+function _getSchemaObj(self, keyRef) {
+ keyRef = resolve.normalizeId(keyRef);
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+}
+
+
+/**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @this Ajv
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+function removeSchema(schemaKeyRef) {
+ if (schemaKeyRef instanceof RegExp) {
+ _removeAllSchemas(this, this._schemas, schemaKeyRef);
+ _removeAllSchemas(this, this._refs, schemaKeyRef);
+ return this;
+ }
+ switch (typeof schemaKeyRef) {
+ case 'undefined':
+ _removeAllSchemas(this, this._schemas);
+ _removeAllSchemas(this, this._refs);
+ this._cache.clear();
+ return this;
+ case 'string':
+ var schemaObj = _getSchemaObj(this, schemaKeyRef);
+ if (schemaObj) this._cache.del(schemaObj.cacheKey);
+ delete this._schemas[schemaKeyRef];
+ delete this._refs[schemaKeyRef];
+ return this;
+ case 'object':
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
+ this._cache.del(cacheKey);
+ var id = this._getId(schemaKeyRef);
+ if (id) {
+ id = resolve.normalizeId(id);
+ delete this._schemas[id];
+ delete this._refs[id];
+ }
+ }
+ return this;
+}
+
+
+function _removeAllSchemas(self, schemas, regex) {
+ for (var keyRef in schemas) {
+ var schemaObj = schemas[keyRef];
+ if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
+ self._cache.del(schemaObj.cacheKey);
+ delete schemas[keyRef];
+ }
+ }
+}
+
+
+/* @this Ajv */
+function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
+ if (typeof schema != 'object' && typeof schema != 'boolean')
+ throw new Error('schema should be object or boolean');
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schema) : schema;
+ var cached = this._cache.get(cacheKey);
+ if (cached) return cached;
+
+ shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
+
+ var id = resolve.normalizeId(this._getId(schema));
+ if (id && shouldAddSchema) checkUnique(this, id);
+
+ var willValidate = this._opts.validateSchema !== false && !skipValidation;
+ var recursiveMeta;
+ if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
+ this.validateSchema(schema, true);
+
+ var localRefs = resolve.ids.call(this, schema);
+
+ var schemaObj = new SchemaObject({
+ id: id,
+ schema: schema,
+ localRefs: localRefs,
+ cacheKey: cacheKey,
+ meta: meta
+ });
+
+ if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
+ this._cache.put(cacheKey, schemaObj);
+
+ if (willValidate && recursiveMeta) this.validateSchema(schema, true);
+
+ return schemaObj;
+}
+
+
+/* @this Ajv */
+function _compile(schemaObj, root) {
+ if (schemaObj.compiling) {
+ schemaObj.validate = callValidate;
+ callValidate.schema = schemaObj.schema;
+ callValidate.errors = null;
+ callValidate.root = root ? root : callValidate;
+ if (schemaObj.schema.$async === true)
+ callValidate.$async = true;
+ return callValidate;
+ }
+ schemaObj.compiling = true;
+
+ var currentOpts;
+ if (schemaObj.meta) {
+ currentOpts = this._opts;
+ this._opts = this._metaOpts;
+ }
+
+ var v;
+ try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
+ catch(e) {
+ delete schemaObj.validate;
+ throw e;
+ }
+ finally {
+ schemaObj.compiling = false;
+ if (schemaObj.meta) this._opts = currentOpts;
+ }
+
+ schemaObj.validate = v;
+ schemaObj.refs = v.refs;
+ schemaObj.refVal = v.refVal;
+ schemaObj.root = v.root;
+ return v;
+
+
+ /* @this {*} - custom context, see passContext option */
+ function callValidate() {
+ /* jshint validthis: true */
+ var _validate = schemaObj.validate;
+ var result = _validate.apply(this, arguments);
+ callValidate.errors = _validate.errors;
+ return result;
+ }
+}
+
+
+function chooseGetId(opts) {
+ switch (opts.schemaId) {
+ case 'auto': return _get$IdOrId;
+ case 'id': return _getId;
+ default: return _get$Id;
+ }
+}
+
+/* @this Ajv */
+function _getId(schema) {
+ if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
+ return schema.id;
+}
+
+/* @this Ajv */
+function _get$Id(schema) {
+ if (schema.id) this.logger.warn('schema id ignored', schema.id);
+ return schema.$id;
+}
+
+
+function _get$IdOrId(schema) {
+ if (schema.$id && schema.id && schema.$id != schema.id)
+ throw new Error('schema $id is different from id');
+ return schema.$id || schema.id;
+}
+
+
+/**
+ * Convert array of error message objects to string
+ * @this Ajv
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+function errorsText(errors, options) {
+ errors = errors || this.errors;
+ if (!errors) return 'No errors';
+ options = options || {};
+ var separator = options.separator === undefined ? ', ' : options.separator;
+ var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
+
+ var text = '';
+ for (var i=0; i<errors.length; i++) {
+ var e = errors[i];
+ if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
+ }
+ return text.slice(0, -separator.length);
+}
+
+
+/**
+ * Add custom format
+ * @this Ajv
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ * @return {Ajv} this for method chaining
+ */
+function addFormat(name, format) {
+ if (typeof format == 'string') format = new RegExp(format);
+ this._formats[name] = format;
+ return this;
+}
+
+
+function addDefaultMetaSchema(self) {
+ var $dataSchema;
+ if (self._opts.$data) {
+ $dataSchema = require('./refs/data.json');
+ self.addMetaSchema($dataSchema, $dataSchema.$id, true);
+ }
+ if (self._opts.meta === false) return;
+ var metaSchema = require('./refs/json-schema-draft-07.json');
+ if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
+ self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
+ self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
+}
+
+
+function addInitialSchemas(self) {
+ var optsSchemas = self._opts.schemas;
+ if (!optsSchemas) return;
+ if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
+ else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
+}
+
+
+function addInitialFormats(self) {
+ for (var name in self._opts.formats) {
+ var format = self._opts.formats[name];
+ self.addFormat(name, format);
+ }
+}
+
+
+function addInitialKeywords(self) {
+ for (var name in self._opts.keywords) {
+ var keyword = self._opts.keywords[name];
+ self.addKeyword(name, keyword);
+ }
+}
+
+
+function checkUnique(self, id) {
+ if (self._schemas[id] || self._refs[id])
+ throw new Error('schema with key or id "' + id + '" already exists');
+}
+
+
+function getMetaSchemaOptions(self) {
+ var metaOpts = util.copy(self._opts);
+ for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
+ delete metaOpts[META_IGNORE_OPTIONS[i]];
+ return metaOpts;
+}
+
+
+function setLogger(self) {
+ var logger = self._opts.logger;
+ if (logger === false) {
+ self.logger = {log: noop, warn: noop, error: noop};
+ } else {
+ if (logger === undefined) logger = console;
+ if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
+ throw new Error('logger must implement log, warn and error methods');
+ self.logger = logger;
+ }
+}
+
+
+function noop() {}
+
+},{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":39,"./refs/data.json":40,"./refs/json-schema-draft-07.json":41,"fast-json-stable-stringify":43}]},{},[])("ajv")
+});
diff --git a/node_modules/ajv/dist/ajv.min.js b/node_modules/ajv/dist/ajv.min.js
new file mode 100644
index 0000000..7a60eb8
--- /dev/null
+++ b/node_modules/ajv/dist/ajv.min.js
@@ -0,0 +1,3 @@
+/* ajv 6.12.6: Another JSON Schema Validator */
+!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Ajv=e()}(function(){return function o(i,n,l){function c(r,e){if(!n[r]){if(!i[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(u)return u(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var s=n[r]={exports:{}};i[r][0].call(s.exports,function(e){return c(i[r][1][e]||e)},s,s.exports,o,i,n,l)}return n[r].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)c(l[e]);return c}({1:[function(e,r,t){"use strict";var a=r.exports=function(){this._cache={}};a.prototype.put=function(e,r){this._cache[e]=r},a.prototype.get=function(e){return this._cache[e]},a.prototype.del=function(e){delete this._cache[e]},a.prototype.clear=function(){this._cache={}}},{}],2:[function(e,r,t){"use strict";var a=e("./error_classes").MissingRef;function s(r,n,t){var l=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof n&&(t=n,n=void 0);var e=c(r).then(function(){var e=l._addSchema(r,void 0,n);return e.validate||function o(i){try{return l._compile(i)}catch(e){if(e instanceof a)return r(e);throw e}function r(e){var r=e.missingSchema;if(s(r))throw new Error("Schema "+r+" is loaded but "+e.missingRef+" cannot be resolved");var t=l._loadingSchemas[r];return t||(t=l._loadingSchemas[r]=l._opts.loadSchema(r)).then(a,a),t.then(function(e){if(!s(r))return c(e).then(function(){s(r)||l.addSchema(e,r,void 0,n)})}).then(function(){return o(i)});function a(){delete l._loadingSchemas[r]}function s(e){return l._refs[e]||l._schemas[e]}}}(e)});return t&&e.then(function(e){t(null,e)},t),e;function c(e){var r=e.$schema;return r&&!l.getSchema(r)?s.call(l,{$ref:r},!0):Promise.resolve()}}r.exports=s},{"./error_classes":3}],3:[function(e,r,t){"use strict";var a=e("./resolve");function s(e,r,t){this.message=t||s.message(e,r),this.missingRef=a.url(e,r),this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function o(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e}r.exports={Validation:o(function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}),MissingRef:o(s)},s.message=function(e,r){return"can't resolve reference "+r+" from id "+e}},{"./resolve":6}],4:[function(e,r,t){"use strict";var a=e("./util"),o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,s=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var R=e("./resolve"),$=e("./util"),j=e("./error_classes"),D=e("fast-json-stable-stringify"),O=e("../dotjs/validate"),I=$.ucs2length,A=e("fast-deep-equal"),k=j.Validation;function C(e,c,u,r){var d=this,p=this._opts,h=[void 0],f={},l=[],t={},m=[],a={},v=[],s=function(e,r,t){var a=L.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}.call(this,e,c=c||{schema:e,refVal:h,refs:f},r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=P;var y=this._formats,g=this.RULES;try{var i=E(e,c,u,r);o.validate=i;var n=o.callValidate;return n&&(n.schema=i.schema,n.errors=null,n.refs=i.refs,n.refVal=i.refVal,n.root=i.root,n.$async=i.$async,p.sourceCode&&(n.source=i.source)),i}finally{(function(e,r,t){var a=L.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}).call(this,e,c,r)}function P(){var e=o.validate,r=e.apply(this,arguments);return P.errors=e.errors,r}function E(e,r,t,a){var s=!r||r&&r.schema==e;if(r.schema!=c.schema)return C.call(d,e,r,t,a);var o=!0===e.$async,i=O({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:j.MissingRef,RULES:g,validate:O,util:$,resolve:R,resolveRef:w,usePattern:_,useDefault:F,useCustomRule:x,opts:p,formats:y,logger:d.logger,self:d}),i=Q(h,z)+Q(l,N)+Q(m,q)+Q(v,T)+i;p.processCode&&(i=p.processCode(i,e));try{var n=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",i)(d,g,y,c,h,m,v,A,I,k);h[0]=n}catch(e){throw d.logger.error("Error compiling schema, function code:",i),e}return n.schema=e,n.errors=null,n.refs=f,n.refVal=h,n.root=s?n:r,o&&(n.$async=!0),!0===p.sourceCode&&(n.source={code:i,patterns:l,defaults:m}),n}function w(e,r,t){r=R.url(e,r);var a,s,o=f[r];if(void 0!==o)return S(a=h[o],s="refVal["+o+"]");if(!t&&c.refs){var i=c.refs[r];if(void 0!==i)return S(a=c.refVal[i],s=b(r,a))}s=b(r);var n,l=R.call(d,E,c,r);if(void 0!==l||(n=u&&u[r])&&(l=R.inlineRef(n,p.inlineRefs)?n:C.call(d,n,c,u,e)),void 0!==l)return S(h[f[r]]=l,s);delete f[r]}function b(e,r){var t=h.length;return h[t]=r,"refVal"+(f[e]=t)}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function _(e){var r=t[e];return void 0===r&&(r=t[e]=l.length,l[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return $.toQuotedString(e);case"object":if(null===e)return"null";var r=D(e),t=a[r];return void 0===t&&(t=a[r]=m.length,m[t]=e),"default"+t}}function x(e,r,t,a){if(!1!==d._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));var o=e.definition.validateSchema;if(o)if(!o(r)){var i="keyword schema is invalid: "+d.errorsText(o.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)n=l.call(d,r,t,a);else if(u)n=u.call(d,r,t,a),!1!==p.validateSchema&&d.validateSchema(n,!0);else if(c)n=c.call(d,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=v.length;return{code:"customRule"+h,validate:v[h]=n}}}function L(e,r,t){for(var a=0;a<this._compilations.length;a++){var s=this._compilations[a];if(s.schema==e&&s.root==r&&s.baseId==t)return a}return-1}function N(e,r){return"var pattern"+e+" = new RegExp("+$.toQuotedString(r[e])+");"}function q(e){return"var default"+e+" = defaults["+e+"];"}function z(e,r){return void 0===r[e]?"":"var refVal"+e+" = refVal["+e+"];"}function T(e){return"var customRule"+e+" = customRules["+e+"];"}function Q(e,r){if(!e.length)return"";for(var t="",a=0;a<e.length;a++)t+=r(a,e);return t}r.exports=C},{"../dotjs/validate":38,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":42,"fast-json-stable-stringify":43}],6:[function(e,r,t){"use strict";var m=e("uri-js"),v=e("fast-deep-equal"),y=e("./util"),l=e("./schema_obj"),a=e("json-schema-traverse");function c(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return c.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof l)return d(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var s,o,i,n=u.call(this,r,t);return n&&(s=n.schema,r=n.root,i=n.baseId),s instanceof l?o=s.validate||e.call(this,s.schema,r,void 0,i):void 0!==s&&(o=d(s,this._opts.inlineRefs)?s:e.call(this,s,r,void 0,i)),o}function u(e,r){var t=m.parse(r),a=p(t),s=g(this._getId(e.schema));if(0===Object.keys(e.schema).length||a!==s){var o=P(a),i=this._refs[o];if("string"==typeof i)return function(e,r,t){var a=u.call(this,e,r);if(a){var s=a.schema,o=a.baseId;e=a.root;var i=this._getId(s);return i&&(o=f(o,i)),n.call(this,t,o,s,e)}}.call(this,e,i,t);if(i instanceof l)i.validate||this._compile(i),e=i;else{if(!((i=this._schemas[o])instanceof l))return;if(i.validate||this._compile(i),o==P(r))return{schema:i,root:e,baseId:s};e=i}if(!e.schema)return;s=g(this._getId(e.schema))}return n.call(this,t,s,e.schema,e)}(r.exports=c).normalizeId=P,c.fullPath=g,c.url=f,c.ids=function(e){var r=P(this._getId(e)),h={"":r},d={"":g(r,!1)},p={},f=this;return a(e,{allKeys:!0},function(e,r,t,a,s,o,i){if(""!==r){var n=f._getId(e),l=h[a],c=d[a]+"/"+s;if(void 0!==i&&(c+="/"+("number"==typeof i?i:y.escapeFragment(i))),"string"==typeof n){n=l=P(l?m.resolve(l,n):n);var u=f._refs[n];if("string"==typeof u&&(u=f._refs[u]),u&&u.schema){if(!v(e,u.schema))throw new Error('id "'+n+'" resolves to more than one schema')}else if(n!=P(c))if("#"==n[0]){if(p[n]&&!v(e,p[n]))throw new Error('id "'+n+'" resolves to more than one schema');p[n]=e}else f._refs[n]=c}h[r]=l,d[r]=c}}),p},c.inlineRef=d,c.schema=u;var h=y.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function n(e,r,t,a){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var s=e.fragment.split("/"),o=1;o<s.length;o++){var i,n,l,c=s[o];if(c){if(void 0===(t=t[c=y.unescapeFragment(c)]))break;h[c]||((l=this._getId(t))&&(r=f(r,l)),t.$ref&&(i=f(r,t.$ref),(n=u.call(this,a,i))&&(t=n.schema,a=n.root,r=n.baseId)))}}return void 0!==t&&t!==a.schema?{schema:t,root:a,baseId:r}:void 0}}var i=y.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function d(e,r){return!1!==r&&(void 0===r||!0===r?function e(r){var t;if(Array.isArray(r)){for(var a=0;a<r.length;a++)if("object"==typeof(t=r[a])&&!e(t))return!1}else for(var s in r){if("$ref"==s)return!1;if("object"==typeof(t=r[s])&&!e(t))return!1}return!0}(e):r?function e(r){var t,a=0;if(Array.isArray(r)){for(var s=0;s<r.length;s++)if("object"==typeof(t=r[s])&&(a+=e(t)),a==1/0)return 1/0}else for(var o in r){if("$ref"==o)return 1/0;if(i[o])a++;else if("object"==typeof(t=r[o])&&(a+=e(t)+1),a==1/0)return 1/0}return a}(e)<=r:void 0)}function g(e,r){return!1!==r&&(e=P(e)),p(m.parse(e))}function p(e){return m.serialize(e).split("#")[0]+"#"}var s=/#\/?$/;function P(e){return e?e.replace(s,""):""}function f(e,r){return r=P(r),m.resolve(e,r)}},{"./schema_obj":8,"./util":10,"fast-deep-equal":42,"json-schema-traverse":44,"uri-js":45}],7:[function(e,r,t){"use strict";var o=e("../dotjs"),i=e("./util").toHash;r.exports=function(){var a=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],s=["type","$comment"];return a.all=i(s),a.types=i(["number","integer","string","array","object","boolean","null"]),a.forEach(function(e){e.rules=e.rules.map(function(e){var r,t;return"object"==typeof e&&(t=e[r=Object.keys(e)[0]],e=r,t.forEach(function(e){s.push(e),a.all[e]=!0})),s.push(e),a.all[e]={keyword:e,code:o[e],implements:t}}),a.all.$comment={keyword:"$comment",code:o.$comment},e.type&&(a.types[e.type]=e)}),a.keywords=i(s.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),a.custom={},a}},{"../dotjs":27,"./util":10}],8:[function(e,r,t){"use strict";var a=e("./util");r.exports=function(e){a.copy(e,this)}},{"./util":10}],9:[function(e,r,t){"use strict";r.exports=function(e){for(var r,t=0,a=e.length,s=0;s<a;)t++,55296<=(r=e.charCodeAt(s++))&&r<=56319&&s<a&&56320==(64512&(r=e.charCodeAt(s)))&&s++;return t}},{}],10:[function(e,r,t){"use strict";function i(e,r,t,a){var s=a?" !== ":" === ",o=a?" || ":" && ",i=a?"!":"",n=a?"":"!";switch(e){case"null":return r+s+"null";case"array":return i+"Array.isArray("+r+")";case"object":return"("+i+r+o+"typeof "+r+s+'"object"'+o+n+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+s+'"number"'+o+n+"("+r+" % 1)"+o+r+s+r+(t?o+i+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+s+'"'+e+'"'+(t?o+i+"isFinite("+r+")":"")+")";default:return"typeof "+r+s+'"'+e+'"'}}r.exports={copy:function(e,r){for(var t in r=r||{},e)r[t]=e[t];return r},checkDataType:i,checkDataTypes:function(e,r,t){{if(1===e.length)return i(e[0],r,t,!0);var a,s="",o=n(e);for(a in o.array&&o.object&&(s=o.null?"(":"(!"+r+" || ",s+="typeof "+r+' !== "object")',delete o.null,delete o.array,delete o.object),o.number&&delete o.integer,o)s+=(s?" && ":"")+i(a,r,t,!0);return s}},coerceToTypes:function(e,r){if(Array.isArray(r)){for(var t=[],a=0;a<r.length;a++){var s=r[a];(o[s]||"array"===e&&"array"===s)&&(t[t.length]=s)}if(t.length)return t}else{if(o[r])return[r];if("array"===e&&"array"===r)return["array"]}},toHash:n,getProperty:h,escapeQuotes:l,equal:e("fast-deep-equal"),ucs2length:e("./ucs2length"),varOccurences:function(e,r){r+="[^0-9]";var t=e.match(new RegExp(r,"g"));return t?t.length:0},varReplace:function(e,r,t){return r+="([^0-9])",t=t.replace(/\$/g,"$$$$"),e.replace(new RegExp(r,"g"),t+"$1")},schemaHasRules:function(e,r){if("boolean"==typeof e)return!e;for(var t in e)if(r[t])return!0},schemaHasRulesExcept:function(e,r,t){if("boolean"==typeof e)return!e&&"not"!=t;for(var a in e)if(a!=t&&r[a])return!0},schemaUnknownRules:function(e,r){if("boolean"==typeof e)return;for(var t in e)if(!r[t])return t},toQuotedString:c,getPathExpr:function(e,r,t,a){return u(e,t?"'/' + "+r+(a?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):a?"'[' + "+r+" + ']'":"'[\\'' + "+r+" + '\\']'")},getPath:function(e,r,t){var a=c(t?"/"+f(r):h(r));return u(e,a)},getData:function(e,r,t){var a,s,o,i;if(""===e)return"rootData";if("/"==e[0]){if(!d.test(e))throw new Error("Invalid JSON-pointer: "+e);s=e,o="rootData"}else{if(!(i=e.match(p)))throw new Error("Invalid JSON-pointer: "+e);if(a=+i[1],"#"==(s=i[2])){if(r<=a)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(r<a)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(o="data"+(r-a||""),!s)return o}for(var n=o,l=s.split("/"),c=0;c<l.length;c++){var u=l[c];u&&(o+=h(m(u)),n+=" && "+o)}return n},unescapeFragment:function(e){return m(decodeURIComponent(e))},unescapeJsonPointer:m,escapeFragment:function(e){return encodeURIComponent(f(e))},escapeJsonPointer:f};var o=n(["string","number","integer","boolean","null"]);function n(e){for(var r={},t=0;t<e.length;t++)r[e[t]]=!0;return r}var a=/^[a-z$_][a-z$_0-9]*$/i,s=/'|\\/g;function h(e){return"number"==typeof e?"["+e+"]":a.test(e)?"."+e:"['"+l(e)+"']"}function l(e){return e.replace(s,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function c(e){return"'"+l(e)+"'"}var d=/^\/(?:[^~]|~0|~1)*$/,p=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function u(e,r){return'""'==e?r:(e+" + "+r).replace(/([^\\])' \+ '/g,"$1")}function f(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function m(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},{"./ucs2length":9,"fast-deep-equal":42}],11:[function(e,r,t){"use strict";var l=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];r.exports=function(e,r){for(var t=0;t<r.length;t++){e=JSON.parse(JSON.stringify(e));for(var a=r[t].split("/"),s=e,o=1;o<a.length;o++)s=s[a[o]];for(o=0;o<l.length;o++){var i=l[o],n=s[i];n&&(s[i]={anyOf:[n,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},{}],12:[function(e,r,t){"use strict";var a=e("./refs/json-schema-draft-07.json");r.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:a.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:a.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},{"./refs/json-schema-draft-07.json":41}],13:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s,o,i,n,l,c=" ",u=e.level,h=e.dataLevel,d=e.schema[r],p=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,v="data"+(h||""),y=e.opts.$data&&d&&d.$data,g=y?(c+=" var schema"+u+" = "+e.util.getData(d.$data,h,e.dataPathArr)+"; ","schema"+u):d,P="maximum"==r,E=P?"exclusiveMaximum":"exclusiveMinimum",w=e.schema[E],b=e.opts.$data&&w&&w.$data,S=P?"<":">",_=P?">":"<",F=void 0;if(!y&&"number"!=typeof d&&void 0!==d)throw new Error(r+" must be number");if(!b&&void 0!==w&&"number"!=typeof w&&"boolean"!=typeof w)throw new Error(E+" must be number or boolean");b?(o="exclIsNumber"+u,i="' + "+(n="op"+u)+" + '",c+=" var schemaExcl"+u+" = "+(t=e.util.getData(w.$data,h,e.dataPathArr))+"; ",F=E,(l=l||[]).push(c+=" var "+(a="exclusive"+u)+"; var "+(s="exclType"+u)+" = typeof "+(t="schemaExcl"+u)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { "),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(c+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(c+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ",x=c,c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+s+" == 'number' ? ( ("+a+" = "+g+" === undefined || "+t+" "+S+"= "+g+") ? "+v+" "+_+"= "+t+" : "+v+" "+_+" "+g+" ) : ( ("+a+" = "+t+" === true) ? "+v+" "+_+"= "+g+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { var op"+u+" = "+a+" ? '"+S+"' : '"+S+"='; ",void 0===d&&(f=e.errSchemaPath+"/"+(F=E),g=t,y=b)):(i=S,(o="number"==typeof w)&&y?(n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" ( "+g+" === undefined || "+w+" "+S+"= "+g+" ? "+v+" "+_+"= "+w+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { "):(o&&void 0===d?(a=!0,f=e.errSchemaPath+"/"+(F=E),g=w,_+="="):(o&&(g=Math[P?"min":"max"](w,d)),w===(!o||g)?(a=!0,f=e.errSchemaPath+"/"+(F=E),_+="="):(a=!1,i+="=")),n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+v+" "+_+" "+g+" || "+v+" !== "+v+") { ")),F=F||r,(l=l||[]).push(c),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+n+", limit: "+g+", exclusive: "+a+" } ",!1!==e.opts.messages&&(c+=" , message: 'should be "+i+" ",c+=y?"' + "+g:g+"'"),e.opts.verbose&&(c+=" , schema: ",c+=y?"validate.schema"+p:""+d,c+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ";var x=c;return c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } ",m&&(c+=" else { "),c}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" "+c+".length "+("maxItems"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxItems"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" items' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),t+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ";var d=r,p=p||[];p.push(t+=" "+("maxLength"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be ",t+="maxLength"==r?"longer":"shorter",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" characters' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxProperties"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" properties' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,u=n.baseId,h=!0,d=a;if(d)for(var p,f=-1,m=d.length-1;f<m;)p=d[f+=1],(e.opts.strictKeywords?"object"==typeof p&&0<Object.keys(p).length||!1===p:e.util.schemaHasRules(p,e.RULES.all))&&(h=!1,n.schema=p,n.schemaPath=s+"["+f+"]",n.errSchemaPath=o+"/"+f,t+=" "+e.validate(n)+" ",n.baseId=u,i&&(t+=" if ("+c+") { ",l+="}"));return i&&(t+=h?" if (true) { ":" "+l.slice(0,-1)+" "),t}},{}],18:[function(e,r,t){"use strict";r.exports=function(r,e){var t=" ",a=r.level,s=r.dataLevel,o=r.schema[e],i=r.schemaPath+r.util.getProperty(e),n=r.errSchemaPath+"/"+e,l=!r.opts.allErrors,c="data"+(s||""),u="valid"+a,h="errs__"+a,d=r.util.copy(r),p="";d.level++;var f="valid"+d.level;if(o.every(function(e){return r.opts.strictKeywords?"object"==typeof e&&0<Object.keys(e).length||!1===e:r.util.schemaHasRules(e,r.RULES.all)})){var m=d.baseId;t+=" var "+h+" = errors; var "+u+" = false; ";var v=r.compositeRule;r.compositeRule=d.compositeRule=!0;var y=o;if(y)for(var g,P=-1,E=y.length-1;P<E;)g=y[P+=1],d.schema=g,d.schemaPath=i+"["+P+"]",d.errSchemaPath=n+"/"+P,t+=" "+r.validate(d)+" ",d.baseId=m,t+=" "+u+" = "+u+" || "+f+"; if (!"+u+") { ",p+="}";r.compositeRule=d.compositeRule=v,t+=" "+p+" if (!"+u+") { var err = ",!1!==r.createErrors?(t+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+r.errorPath+" , schemaPath: "+r.util.toQuotedString(n)+" , params: {} ",!1!==r.opts.messages&&(t+=" , message: 'should match some schema in anyOf' "),r.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+r.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!r.compositeRule&&l&&(t+=r.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),t+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",r.opts.allErrors&&(t+=" } ")}else l&&(t+=" if (true) { ");return t}},{}],19:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.errSchemaPath+"/"+r,s=e.util.toQuotedString(e.schema[r]);return!0===e.opts.$comment?t+=" console.log("+s+");":"function"==typeof e.opts.$comment&&(t+=" self._opts.$comment("+s+", "+e.util.toQuotedString(a)+", validate.root.schema);"),t}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="valid"+a,h=e.opts.$data&&o&&o.$data;h&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");h||(t+=" var schema"+a+" = validate.schema"+i+";");var d=d||[];d.push(t+="var "+u+" = equal("+c+", schema"+a+"); if (!"+u+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { allowedValue: schema"+a+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to constant' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var p=t,t=d.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }",l&&(t+=" else { "),t}},{}],21:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="valid"+a,h="errs__"+a,d=e.util.copy(e);d.level++;var p,f,m,v="valid"+d.level,y="i"+a,g=d.dataLevel=e.dataLevel+1,P="data"+g,E=e.baseId,w=e.opts.strictKeywords?"object"==typeof o&&0<Object.keys(o).length||!1===o:e.util.schemaHasRules(o,e.RULES.all);t+="var "+h+" = errors;var "+u+";",w?(p=e.compositeRule,e.compositeRule=d.compositeRule=!0,d.schema=o,d.schemaPath=i,d.errSchemaPath=n,t+=" var "+v+" = false; for (var "+y+" = 0; "+y+" < "+c+".length; "+y+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers,!0),f=c+"["+y+"]",d.dataPathArr[g]=y,m=e.validate(d),d.baseId=E,e.util.varOccurences(m,P)<2?t+=" "+e.util.varReplace(m,P,f)+" ":t+=" var "+P+" = "+f+"; "+m+" ",t+=" if ("+v+") break; } ",e.compositeRule=d.compositeRule=p,t+=" if (!"+v+") {"):t+=" if ("+c+".length == 0) {";var b=b||[];b.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should contain a valid item' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var S=t,t=b.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { ",w&&(t+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(t+=" } "),t}},{}],22:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s,o,i,n,l=" ",c=e.level,u=e.dataLevel,h=e.schema[r],d=e.schemaPath+e.util.getProperty(r),p=e.errSchemaPath+"/"+r,f=!e.opts.allErrors,m="data"+(u||""),v="valid"+c,y="errs__"+c,g=e.opts.$data&&h&&h.$data,P=g?(l+=" var schema"+c+" = "+e.util.getData(h.$data,u,e.dataPathArr)+"; ","schema"+c):h,E=this,w="definition"+c,b=E.definition,S="";if(g&&b.$data){var _=b.validateSchema;l+=" var "+w+" = RULES.custom['"+r+"'].definition; var "+(n="keywordValidate"+c)+" = "+w+".validate;"}else{if(!(i=e.useCustomRule(E,h,e.schema,e)))return;P="validate.schema"+d,n=i.code,a=b.compile,s=b.inline,o=b.macro}var F,x,R,$,j,D,O,I,A,k,C=n+".errors",L="i"+c,N="ruleErr"+c,q=b.async;if(q&&!e.async)throw new Error("async keyword in sync schema");return s||o||(l+=C+" = null;"),l+="var "+y+" = errors;var "+v+";",g&&b.$data&&(S+="}",l+=" if ("+P+" === undefined) { "+v+" = true; } else { ",_&&(S+="}",l+=" "+v+" = "+w+".validateSchema("+P+"); if ("+v+") { ")),s?l+=b.statements?" "+i.validate+" ":" "+v+" = "+i.validate+"; ":o?(S="",(F=e.util.copy(e)).level++,x="valid"+F.level,F.schema=i.validate,F.schemaPath="",R=e.compositeRule,e.compositeRule=F.compositeRule=!0,$=e.validate(F).replace(/validate\.schema/g,n),e.compositeRule=F.compositeRule=R,l+=" "+$):((I=I||[]).push(l),l="",l+=" "+n+".call( ",l+=e.opts.passContext?"this":"self",l+=a||!1===b.schema?" , "+m+" ":" , "+P+" , "+m+" , validate.schema"+e.schemaPath+" ",l+=" , (dataPath || '')",'""'!=e.errorPath&&(l+=" + "+e.errorPath),O=l+=" , "+(j=u?"data"+(u-1||""):"parentData")+" , "+(D=u?e.dataPathArr[u]:"parentDataProperty")+" , rootData ) ",l=I.pop(),!1===b.errors?(l+=" "+v+" = ",q&&(l+="await "),l+=O+"; "):l+=q?" var "+(C="customErrors"+c)+" = null; try { "+v+" = await "+O+"; } catch (e) { "+v+" = false; if (e instanceof ValidationError) "+C+" = e.errors; else throw e; } ":" "+C+" = null; "+v+" = "+O+"; "),b.modifying&&(l+=" if ("+j+") "+m+" = "+j+"["+D+"];"),l+=""+S,b.valid?f&&(l+=" if (true) { "):(l+=" if ( ",void 0===b.valid?(l+=" !",l+=o?""+x:v):l+=" "+!b.valid+" ",t=E.keyword,(I=I||[]).push(l+=") { "),(I=I||[]).push(l=""),l="",!1!==e.createErrors?(l+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(l+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(l+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ",A=l,l=I.pop(),k=l+=!e.compositeRule&&f?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=I.pop(),s?b.errors?"full"!=b.errors&&(l+=" for (var "+L+"="+y+"; "+L+"<errors; "+L+"++) { var "+N+" = vErrors["+L+"]; if ("+N+".dataPath === undefined) "+N+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+N+".schemaPath === undefined) { "+N+'.schemaPath = "'+p+'"; } ',e.opts.verbose&&(l+=" "+N+".schema = "+P+"; "+N+".data = "+m+"; "),l+=" } "):!1===b.errors?l+=" "+k+" ":(l+=" if ("+y+" == errors) { "+k+" } else { for (var "+L+"="+y+"; "+L+"<errors; "+L+"++) { var "+N+" = vErrors["+L+"]; if ("+N+".dataPath === undefined) "+N+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+N+".schemaPath === undefined) { "+N+'.schemaPath = "'+p+'"; } ',e.opts.verbose&&(l+=" "+N+".schema = "+P+"; "+N+".data = "+m+"; "),l+=" } } "):o?(l+=" var err = ",!1!==e.createErrors?(l+=" { keyword: '"+(t||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { keyword: '"+E.keyword+"' } ",!1!==e.opts.messages&&(l+=" , message: 'should pass \""+E.keyword+"\" keyword validation' "),e.opts.verbose&&(l+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ",l+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(l+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; ")):!1===b.errors?l+=" "+k+" ":(l+=" if (Array.isArray("+C+")) { if (vErrors === null) vErrors = "+C+"; else vErrors = vErrors.concat("+C+"); errors = vErrors.length; for (var "+L+"="+y+"; "+L+"<errors; "+L+"++) { var "+N+" = vErrors["+L+"]; if ("+N+".dataPath === undefined) "+N+".dataPath = (dataPath || '') + "+e.errorPath+"; "+N+'.schemaPath = "'+p+'"; ',e.opts.verbose&&(l+=" "+N+".schema = "+P+"; "+N+".data = "+m+"; "),l+=" } } else { "+k+" } "),l+=" } ",f&&(l+=" else { ")),l}},{}],23:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e),d="";h.level++;var p,f="valid"+h.level,m={},v={},y=e.opts.ownProperties;for(I in o){"__proto__"!=I&&(k=o[I],(p=Array.isArray(k)?v:m)[I]=k)}t+="var "+u+" = errors;";var g=e.errorPath;for(I in t+="var missing"+a+";",v)if((p=v[I]).length){if(t+=" if ( "+c+e.util.getProperty(I)+" !== undefined ",y&&(t+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),l){t+=" && ( ";var P=p;if(P)for(var E=-1,w=P.length-1;E<w;){R=P[E+=1],E&&(t+=" || "),t+=" ( ( "+(O=c+(D=e.util.getProperty(R)))+" === undefined ",y&&(t+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(R)+"') "),t+=") && (missing"+a+" = "+e.util.toQuotedString(e.opts.jsonPointers?R:D)+") ) "}t+=")) { ";var b="missing"+a,S="' + "+b+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(g,b,!0):g+" + "+b);var _=_||[];_.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { property: '"+e.util.escapeQuotes(I)+"', missingProperty: '"+S+"', depsCount: "+p.length+", deps: '"+e.util.escapeQuotes(1==p.length?p[0]:p.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==p.length?"property "+e.util.escapeQuotes(p[0]):"properties "+e.util.escapeQuotes(p.join(", ")),t+=" when property "+e.util.escapeQuotes(I)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var F=t,t=_.pop();t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+F+"]); ":" validate.errors = ["+F+"]; return false; ":" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{t+=" ) { ";var x=p;if(x)for(var R,$=-1,j=x.length-1;$<j;){R=x[$+=1];var D=e.util.getProperty(R),S=e.util.escapeQuotes(R),O=c+D;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(g,R,e.opts.jsonPointers)),t+=" if ( "+O+" === undefined ",y&&(t+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(R)+"') "),t+=") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { property: '"+e.util.escapeQuotes(I)+"', missingProperty: '"+S+"', depsCount: "+p.length+", deps: '"+e.util.escapeQuotes(1==p.length?p[0]:p.join(", "))+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should have ",t+=1==p.length?"property "+e.util.escapeQuotes(p[0]):"properties "+e.util.escapeQuotes(p.join(", ")),t+=" when property "+e.util.escapeQuotes(I)+" is present' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}t+=" } ",l&&(d+="}",t+=" else { ")}e.errorPath=g;var I,A=h.baseId;for(I in m){var k=m[I];(e.opts.strictKeywords?"object"==typeof k&&0<Object.keys(k).length||!1===k:e.util.schemaHasRules(k,e.RULES.all))&&(t+=" "+f+" = true; if ( "+c+e.util.getProperty(I)+" !== undefined ",y&&(t+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(I)+"') "),t+=") { ",h.schema=k,h.schemaPath=i+e.util.getProperty(I),h.errSchemaPath=n+"/"+e.util.escapeFragment(I),t+=" "+e.validate(h)+" ",h.baseId=A,t+=" } ",l&&(t+=" if ("+f+") { ",d+="}"))}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t}},{}],24:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="valid"+a,h=e.opts.$data&&o&&o.$data,d=(h&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; "),"i"+a),p="schema"+a;h||(t+=" var "+p+" = validate.schema"+i+";"),t+="var "+u+";",h&&(t+=" if (schema"+a+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+a+")) "+u+" = false; else {"),t+=u+" = false;for (var "+d+"=0; "+d+"<"+p+".length; "+d+"++) if (equal("+c+", "+p+"["+d+"])) { "+u+" = true; break; }",h&&(t+=" } ");var f=f||[];f.push(t+=" if (!"+u+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { allowedValues: schema"+a+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var m=t,t=f.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" }",l&&(t+=" else { "),t}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(o||"");if(!1===e.opts.format)return c&&(a+=" if (true) { "),a;var h,d=e.opts.$data&&i&&i.$data,p=d?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ","schema"+s):i,f=e.opts.unknownFormats,m=Array.isArray(f);if(d){a+=" var "+(h="format"+s)+" = formats["+p+"]; var "+(v="isObject"+s)+" = typeof "+h+" == 'object' && !("+h+" instanceof RegExp) && "+h+".validate; var "+(g="formatType"+s)+" = "+v+" && "+h+".type || 'string'; if ("+v+") { ",e.async&&(a+=" var async"+s+" = "+h+".async; "),a+=" "+h+" = "+h+".validate; } if ( ",d&&(a+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),a+=" (","ignore"!=f&&(a+=" ("+p+" && !"+h+" ",m&&(a+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),a+=") || "),a+=" ("+h+" && "+g+" == '"+t+"' && !(typeof "+h+" == 'function' ? ",a+=e.async?" (async"+s+" ? await "+h+"("+u+") : "+h+"("+u+")) ":" "+h+"("+u+") ",a+=" : "+h+".test("+u+"))))) {"}else{if(!(h=e.formats[i])){if("ignore"==f)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(a+=" if (true) { "),a;if(m&&0<=f.indexOf(i))return c&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y,g=(v="object"==typeof h&&!(h instanceof RegExp)&&h.validate)&&h.type||"string";if(v&&(y=!0===h.async,h=h.validate),g!=t)return c&&(a+=" if (true) { "),a;if(y){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(P="formats"+e.util.getProperty(i)+".validate")+"("+u+"))) { "}else{a+=" if (! ";var P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof h?" "+P+"("+u+") ":" "+P+".test("+u+") ",a+=") { "}}var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+p:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+p+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a,a=E.pop();return a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { "),a}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="valid"+a,h="errs__"+a,d=e.util.copy(e);d.level++;var p,f,m="valid"+d.level,v=e.schema.then,y=e.schema.else,g=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&0<Object.keys(v).length||!1===v:e.util.schemaHasRules(v,e.RULES.all)),P=void 0!==y&&(e.opts.strictKeywords?"object"==typeof y&&0<Object.keys(y).length||!1===y:e.util.schemaHasRules(y,e.RULES.all)),E=d.baseId;return g||P?(d.createErrors=!1,d.schema=o,d.schemaPath=i,d.errSchemaPath=n,t+=" var "+h+" = errors; var "+u+" = true; ",f=e.compositeRule,e.compositeRule=d.compositeRule=!0,t+=" "+e.validate(d)+" ",d.baseId=E,d.createErrors=!0,t+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=d.compositeRule=f,g?(t+=" if ("+m+") { ",d.schema=e.schema.then,d.schemaPath=e.schemaPath+".then",d.errSchemaPath=e.errSchemaPath+"/then",t+=" "+e.validate(d)+" ",d.baseId=E,t+=" "+u+" = "+m+"; ",g&&P?t+=" var "+(p="ifClause"+a)+" = 'then'; ":p="'then'",t+=" } ",P&&(t+=" else { ")):t+=" if (!"+m+") { ",P&&(d.schema=e.schema.else,d.schemaPath=e.schemaPath+".else",d.errSchemaPath=e.errSchemaPath+"/else",t+=" "+e.validate(d)+" ",d.baseId=E,t+=" "+u+" = "+m+"; ",g&&P?t+=" var "+(p="ifClause"+a)+" = 'else'; ":p="'else'",t+=" } "),t+=" if (!"+u+") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { failingKeyword: "+p+" } ",!1!==e.opts.messages&&(t+=" , message: 'should match \"' + "+p+" + '\" schema' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(t+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),t+=" } ",l&&(t+=" else { ")):l&&(t+=" if (true) { "),t}},{}],27:[function(e,r,t){"use strict";r.exports={$ref:e("./ref"),allOf:e("./allOf"),anyOf:e("./anyOf"),$comment:e("./comment"),const:e("./const"),contains:e("./contains"),dependencies:e("./dependencies"),enum:e("./enum"),format:e("./format"),if:e("./if"),items:e("./items"),maximum:e("./_limit"),minimum:e("./_limit"),maxItems:e("./_limitItems"),minItems:e("./_limitItems"),maxLength:e("./_limitLength"),minLength:e("./_limitLength"),maxProperties:e("./_limitProperties"),minProperties:e("./_limitProperties"),multipleOf:e("./multipleOf"),not:e("./not"),oneOf:e("./oneOf"),pattern:e("./pattern"),properties:e("./properties"),propertyNames:e("./propertyNames"),required:e("./required"),uniqueItems:e("./uniqueItems"),validate:e("./validate")}},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="valid"+a,h="errs__"+a,d=e.util.copy(e),p="";d.level++;var f="valid"+d.level,m="i"+a,v=d.dataLevel=e.dataLevel+1,y="data"+v,g=e.baseId;if(t+="var "+h+" = errors;var "+u+";",Array.isArray(o)){var P,E,w,b=e.schema.additionalItems;!1===b&&(t+=" "+u+" = "+c+".length <= "+o.length+"; ",P=n,n=e.errSchemaPath+"/additionalItems",(E=E||[]).push(t+=" if (!"+u+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",w=t,t=E.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",n=P,l&&(p+="}",t+=" else { "));var S=o;if(S)for(var _=-1,F=S.length-1;_<F;){var x,R,$=S[_+=1];(e.opts.strictKeywords?"object"==typeof $&&0<Object.keys($).length||!1===$:e.util.schemaHasRules($,e.RULES.all))&&(t+=" "+f+" = true; if ("+c+".length > "+_+") { ",x=c+"["+_+"]",d.schema=$,d.schemaPath=i+"["+_+"]",d.errSchemaPath=n+"/"+_,d.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),d.dataPathArr[v]=_,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",t+=" } ",l&&(t+=" if ("+f+") { ",p+="}"))}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&0<Object.keys(b).length||!1===b:e.util.schemaHasRules(b,e.RULES.all))&&(d.schema=b,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",t+=" "+f+" = true; if ("+c+".length > "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),x=c+"["+m+"]",d.dataPathArr[v]=m,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",l&&(t+=" if (!"+f+") break; "),t+=" } } ",l&&(t+=" if ("+f+") { ",p+="}"))}else{(e.opts.strictKeywords?"object"==typeof o&&0<Object.keys(o).length||!1===o:e.util.schemaHasRules(o,e.RULES.all))&&(d.schema=o,d.schemaPath=i,d.errSchemaPath=n,t+=" for (var "+m+" = 0; "+m+" < "+c+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),x=c+"["+m+"]",d.dataPathArr[v]=m,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",l&&(t+=" if (!"+f+") break; "),t+=" }")}return l&&(t+=" "+p+" if ("+h+" == errors) {"),t}},{}],29:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="var division"+a+";if (",u&&(t+=" "+h+" !== undefined && ( typeof "+h+" != 'number' || "),t+=" (division"+a+" = "+c+" / "+h+", ",t+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+a+" !== parseInt(division"+a+") ",t+=" ) ",u&&(t+=" ) ");var d=d||[];d.push(t+=" ) { "),t="",!1!==e.createErrors?(t+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { multipleOf: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be multiple of ",t+=u?"' + "+h:h+"'"),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var p=t,t=d.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e);h.level++;var d,p,f,m,v="valid"+h.level;return(e.opts.strictKeywords?"object"==typeof o&&0<Object.keys(o).length||!1===o:e.util.schemaHasRules(o,e.RULES.all))?(h.schema=o,h.schemaPath=i,h.errSchemaPath=n,t+=" var "+u+" = errors; ",d=e.compositeRule,e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(p=h.opts.allErrors,h.opts.allErrors=!1),t+=" "+e.validate(h)+" ",h.createErrors=!0,p&&(h.opts.allErrors=p),e.compositeRule=h.compositeRule=d,(f=f||[]).push(t+=" if ("+v+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",m=t,t=f.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } ")):(t+=" var err = ",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(t+=" if (false) { ")),t}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="valid"+a,h="errs__"+a,d=e.util.copy(e),p="";d.level++;var f="valid"+d.level,m=d.baseId,v="prevValid"+a,y="passingSchemas"+a;t+="var "+h+" = errors , "+v+" = false , "+u+" = false , "+y+" = null; ";var g=e.compositeRule;e.compositeRule=d.compositeRule=!0;var P=o;if(P)for(var E,w=-1,b=P.length-1;w<b;)E=P[w+=1],(e.opts.strictKeywords?"object"==typeof E&&0<Object.keys(E).length||!1===E:e.util.schemaHasRules(E,e.RULES.all))?(d.schema=E,d.schemaPath=i+"["+w+"]",d.errSchemaPath=n+"/"+w,t+=" "+e.validate(d)+" ",d.baseId=m):t+=" var "+f+" = true; ",w&&(t+=" if ("+f+" && "+v+") { "+u+" = false; "+y+" = ["+y+", "+w+"]; } else { ",p+="}"),t+=" if ("+f+") { "+u+" = "+v+" = true; "+y+" = "+w+"; }";return e.compositeRule=d.compositeRule=g,t+=p+"if (!"+u+") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(t+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(t+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),t+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(t+=" } "),t}},{}],32:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o,d=u?"(new RegExp("+h+"))":e.usePattern(o);t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'string') || ");var p=p||[];p.push(t+=" !"+d+".test("+c+") ) { "),t="",!1!==e.createErrors?(t+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { pattern: ",t+=u?""+h:""+e.util.toQuotedString(o),t+=" } ",!1!==e.opts.messages&&(t+=" , message: 'should match pattern \"",t+=u?"' + "+h+" + '":""+e.util.escapeQuotes(o),t+="\"' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+e.util.toQuotedString(o),t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],33:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e),d="";h.level++;var p,f,m,v="valid"+h.level,y="key"+a,g="idx"+a,P=h.dataLevel=e.dataLevel+1,E="data"+P,w="dataProperties"+a,b=Object.keys(o||{}).filter(k),S=e.schema.patternProperties||{},_=Object.keys(S).filter(k),F=e.schema.additionalProperties,x=b.length||_.length,R=!1===F,$="object"==typeof F&&Object.keys(F).length,j=e.opts.removeAdditional,D=R||$||j,O=e.opts.ownProperties,I=e.baseId,A=e.schema.required;function k(e){return"__proto__"!==e}if(A&&(!e.opts.$data||!A.$data)&&A.length<e.opts.loopRequired&&(p=e.util.toHash(A)),t+="var "+u+" = errors;var "+v+" = true;",O&&(t+=" var "+w+" = undefined;"),D){if(t+=O?" "+w+" = "+w+" || Object.keys("+c+"); for (var "+g+"=0; "+g+"<"+w+".length; "+g+"++) { var "+y+" = "+w+"["+g+"]; ":" for (var "+y+" in "+c+") { ",x){if(t+=" var isAdditional"+a+" = !(false ",b.length)if(8<b.length)t+=" || validate.schema"+i+".hasOwnProperty("+y+") ";else{var C=b;if(C)for(var L=-1,N=C.length-1;L<N;)U=C[L+=1],t+=" || "+y+" == "+e.util.toQuotedString(U)+" "}if(_.length){var q=_;if(q)for(var z=-1,T=q.length-1;z<T;)te=q[z+=1],t+=" || "+e.usePattern(te)+".test("+y+") "}t+=" ); if (isAdditional"+a+") { "}"all"==j?t+=" delete "+c+"["+y+"]; ":(Z=e.errorPath,f="' + "+y+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers)),R?j?t+=" delete "+c+"["+y+"]; ":(G=n,n=e.errSchemaPath+"/additionalProperties",(W=W||[]).push(t+=" "+v+" = false; "),t="",!1!==e.createErrors?(t+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { additionalProperty: '"+f+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is an invalid additional property":"should NOT have additional properties",t+="' "),e.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",X=t,t=W.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+X+"]); ":" validate.errors = ["+X+"]; return false; ":" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n=G,l&&(t+=" break; ")):$&&("failing"==j?(t+=" var "+u+" = errors; ",m=e.compositeRule,e.compositeRule=h.compositeRule=!0,h.schema=F,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers),oe=c+"["+y+"]",h.dataPathArr[P]=y,ie=e.validate(h),h.baseId=I,e.util.varOccurences(ie,E)<2?t+=" "+e.util.varReplace(ie,E,oe)+" ":t+=" var "+E+" = "+oe+"; "+ie+" ",t+=" if (!"+v+") { errors = "+u+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+y+"]; } ",e.compositeRule=h.compositeRule=m):(h.schema=F,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers),oe=c+"["+y+"]",h.dataPathArr[P]=y,ie=e.validate(h),h.baseId=I,e.util.varOccurences(ie,E)<2?t+=" "+e.util.varReplace(ie,E,oe)+" ":t+=" var "+E+" = "+oe+"; "+ie+" ",l&&(t+=" if (!"+v+") break; "))),e.errorPath=Z),x&&(t+=" } "),t+=" } ",l&&(t+=" if ("+v+") { ",d+="}")}var Q=e.opts.useDefaults&&!e.compositeRule;if(b.length){var V=b;if(V)for(var U,H=-1,M=V.length-1;H<M;){var K,B,J,Z,G,Y,W,X,ee=o[U=V[H+=1]];(e.opts.strictKeywords?"object"==typeof ee&&0<Object.keys(ee).length||!1===ee:e.util.schemaHasRules(ee,e.RULES.all))&&(oe=c+(K=e.util.getProperty(U)),B=Q&&void 0!==ee.default,h.schema=ee,h.schemaPath=i+K,h.errSchemaPath=n+"/"+e.util.escapeFragment(U),h.errorPath=e.util.getPath(e.errorPath,U,e.opts.jsonPointers),h.dataPathArr[P]=e.util.toQuotedString(U),ie=e.validate(h),h.baseId=I,e.util.varOccurences(ie,E)<2?(ie=e.util.varReplace(ie,E,oe),J=oe):t+=" var "+(J=E)+" = "+oe+"; ",B?t+=" "+ie+" ":(p&&p[U]?(t+=" if ( "+J+" === undefined ",O&&(t+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(U)+"') "),t+=") { "+v+" = false; ",Z=e.errorPath,G=n,Y=e.util.escapeQuotes(U),e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(Z,U,e.opts.jsonPointers)),n=e.errSchemaPath+"/required",(W=W||[]).push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+Y+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+Y+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",X=t,t=W.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+X+"]); ":" validate.errors = ["+X+"]; return false; ":" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n=G,e.errorPath=Z,t+=" } else { "):l?(t+=" if ( "+J+" === undefined ",O&&(t+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(U)+"') "),t+=") { "+v+" = true; } else { "):(t+=" if ("+J+" !== undefined ",O&&(t+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(U)+"') "),t+=" ) { "),t+=" "+ie+" } ")),l&&(t+=" if ("+v+") { ",d+="}")}}if(_.length){var re=_;if(re)for(var te,ae=-1,se=re.length-1;ae<se;){var oe,ie,ee=S[te=re[ae+=1]];(e.opts.strictKeywords?"object"==typeof ee&&0<Object.keys(ee).length||!1===ee:e.util.schemaHasRules(ee,e.RULES.all))&&(h.schema=ee,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(te),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(te),t+=O?" "+w+" = "+w+" || Object.keys("+c+"); for (var "+g+"=0; "+g+"<"+w+".length; "+g+"++) { var "+y+" = "+w+"["+g+"]; ":" for (var "+y+" in "+c+") { ",t+=" if ("+e.usePattern(te)+".test("+y+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers),oe=c+"["+y+"]",h.dataPathArr[P]=y,ie=e.validate(h),h.baseId=I,e.util.varOccurences(ie,E)<2?t+=" "+e.util.varReplace(ie,E,oe)+" ":t+=" var "+E+" = "+oe+"; "+ie+" ",l&&(t+=" if (!"+v+") break; "),t+=" } ",l&&(t+=" else "+v+" = true; "),t+=" } ",l&&(t+=" if ("+v+") { ",d+="}"))}}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t}},{}],34:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e);h.level++;var d,p,f,m,v,y,g,P,E,w,b,S="valid"+h.level;return t+="var "+u+" = errors;",(e.opts.strictKeywords?"object"==typeof o&&0<Object.keys(o).length||!1===o:e.util.schemaHasRules(o,e.RULES.all))&&(h.schema=o,h.schemaPath=i,h.errSchemaPath=n,p="idx"+a,f="i"+a,m="' + "+(d="key"+a)+" + '",v="data"+(h.dataLevel=e.dataLevel+1),y="dataProperties"+a,P=e.baseId,(g=e.opts.ownProperties)&&(t+=" var "+y+" = undefined; "),t+=g?" "+y+" = "+y+" || Object.keys("+c+"); for (var "+p+"=0; "+p+"<"+y+".length; "+p+"++) { var "+d+" = "+y+"["+p+"]; ":" for (var "+d+" in "+c+") { ",t+=" var startErrs"+a+" = errors; ",E=d,w=e.compositeRule,e.compositeRule=h.compositeRule=!0,b=e.validate(h),h.baseId=P,e.util.varOccurences(b,v)<2?t+=" "+e.util.varReplace(b,v,E)+" ":t+=" var "+v+" = "+E+"; "+b+" ",e.compositeRule=h.compositeRule=w,t+=" if (!"+S+") { for (var "+f+"=startErrs"+a+"; "+f+"<errors; "+f+"++) { vErrors["+f+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(t+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { propertyName: '"+m+"' } ",!1!==e.opts.messages&&(t+=" , message: 'property name \\'"+m+"\\' is invalid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(t+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),l&&(t+=" break; "),t+=" } }"),l&&(t+=" if ("+u+" == errors) {"),t}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.dataLevel,i=e.schema[r],n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(o||""),u="valid"+e.level;if("#"==i||"#/"==i)a=e.isRoot?(t=e.async,"validate"):(t=!0===e.root.schema.$async,"root.refVal[0]");else{var h,d,p=e.resolveRef(e.baseId,i,e.isRoot);if(void 0===p){var f,m=e.MissingRefError.message(e.baseId,i);if("fail"==e.opts.missingRefs){e.logger.error(m),(f=f||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { ref: '"+e.util.escapeQuotes(i)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(i)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(i)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var v=s,s=f.pop();s+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,i,m);e.logger.warn(m),l&&(s+=" if (true) { ")}}else{p.inline?((h=e.util.copy(e)).level++,d="valid"+h.level,h.schema=p.schema,h.schemaPath="",h.errSchemaPath=i,s+=" "+e.validate(h).replace(/validate\.schema/g,p.code)+" ",l&&(s+=" if ("+d+") { ")):(t=!0===p.$async||e.async&&!1!==p.$async,a=p.code)}}if(a){(f=f||[]).push(s),s="",s+=e.opts.passContext?" "+a+".call(this, ":" "+a+"( ",s+=" "+c+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);var y=s+=" , "+(o?"data"+(o-1||""):"parentData")+" , "+(o?e.dataPathArr[o]:"parentDataProperty")+", rootData) ";if(s=f.pop(),t){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(s+=" var "+u+"; "),s+=" try { await "+y+"; ",l&&(s+=" "+u+" = true; "),s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(s+=" "+u+" = false; "),s+=" } ",l&&(s+=" if ("+u+") { ")}else s+=" if (!"+y+") { if (vErrors === null) vErrors = "+a+".errors; else vErrors = vErrors.concat("+a+".errors); errors = vErrors.length; } ",l&&(s+=" else { ")}return s}},{}],36:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="valid"+a,h=e.opts.$data&&o&&o.$data,d=(h&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; "),"schema"+a);if(!h)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var p=[],f=o;if(f)for(var m,v=-1,y=f.length-1;v<y;){m=f[v+=1];var g=e.schema.properties[m];g&&(e.opts.strictKeywords?"object"==typeof g&&0<Object.keys(g).length||!1===g:e.util.schemaHasRules(g,e.RULES.all))||(p[p.length]=m)}}else p=o;if(h||p.length){var P=e.errorPath,E=h||e.opts.loopRequired<=p.length,w=e.opts.ownProperties;if(l)if(t+=" var missing"+a+"; ",E){h||(t+=" var "+d+" = validate.schema"+i+"; ");var b="' + "+($="schema"+a+"["+(F="i"+a)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),t+=" var "+u+" = true; ",h&&(t+=" if (schema"+a+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+a+")) "+u+" = false; else {"),t+=" for (var "+F+" = 0; "+F+" < "+d+".length; "+F+"++) { "+u+" = "+c+"["+d+"["+F+"]] !== undefined ",w&&(t+=" && Object.prototype.hasOwnProperty.call("+c+", "+d+"["+F+"]) "),t+="; if (!"+u+") break; } ",h&&(t+=" } "),(R=R||[]).push(t+=" if (!"+u+") { "),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var S=t,t=R.pop();t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else{t+=" if ( ";var _=p;if(_)for(var F=-1,x=_.length-1;F<x;){D=_[F+=1],F&&(t+=" || "),t+=" ( ( "+(k=c+(A=e.util.getProperty(D)))+" === undefined ",w&&(t+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(D)+"') "),t+=") && (missing"+a+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:A)+") ) "}t+=") { ";var R,b="' + "+($="missing"+a)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(P,$,!0):P+" + "+$),(R=R||[]).push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";S=t;t=R.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else if(E){h||(t+=" var "+d+" = validate.schema"+i+"; ");var $,b="' + "+($="schema"+a+"["+(F="i"+a)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,$,e.opts.jsonPointers)),h&&(t+=" if ("+d+" && !Array.isArray("+d+")) { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+d+" !== undefined) { "),t+=" for (var "+F+" = 0; "+F+" < "+d+".length; "+F+"++) { if ("+c+"["+d+"["+F+"]] === undefined ",w&&(t+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+d+"["+F+"]) "),t+=") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(t+=" } ")}else{var j=p;if(j)for(var D,O=-1,I=j.length-1;O<I;){D=j[O+=1];var A=e.util.getProperty(D),b=e.util.escapeQuotes(D),k=c+A;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(P,D,e.opts.jsonPointers)),t+=" if ( "+k+" === undefined ",w&&(t+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(D)+"') "),t+=") { var err = ",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+b+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=P}else l&&(t+=" if (true) {");return t}},{}],37:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s,o,i=" ",n=e.level,l=e.dataLevel,c=e.schema[r],u=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,p="data"+(l||""),f="valid"+n,m=e.opts.$data&&c&&c.$data,v=m?(i+=" var schema"+n+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ","schema"+n):c;return(c||m)&&!1!==e.opts.uniqueItems?(m&&(i+=" var "+f+"; if ("+v+" === false || "+v+" === undefined) "+f+" = true; else if (typeof "+v+" != 'boolean') "+f+" = false; else { "),i+=" var i = "+p+".length , "+f+" = true , j; if (i > 1) { ",t=e.schema.items&&e.schema.items.type,a=Array.isArray(t),!t||"object"==t||"array"==t||a&&(0<=t.indexOf("object")||0<=t.indexOf("array"))?i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } ":(i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",i+=" if ("+e.util["checkDataType"+(a?"s":"")](t,"item",e.opts.strictNumbers,!0)+") continue; ",a&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),i+=" } ",m&&(i+=" } "),(s=s||[]).push(i+=" if (!"+f+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=m?"validate.schema"+u:""+c,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",o=i,i=s.pop(),i+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d&&(i+=" else { ")):d&&(i+=" if (true) { "),i}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){var n="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(n);a.logger.warn(n)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof a.schema||!s&&!a.schema.$ref){var l=a.level,c=a.dataLevel,u=a.schema[e="false schema"],h=a.schemaPath+a.util.getProperty(e),d=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,f="data"+(c||""),m="valid"+l;return!1===a.schema?(a.isTop?p=!0:r+=" var "+m+" = false; ",(U=U||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",D=r,r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+m+" = true; ",a.isTop&&(r+=" }; return validate; "),r}if(a.isTop){var v=a.isTop,l=a.level=0,c=a.dataLevel=0,f="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var y="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{l=a.level,f="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var g,m="valid"+l,p=!a.opts.allErrors,P="",E="",w=a.schema.type,b=Array.isArray(w);if(w&&a.opts.nullable&&!0===a.schema.nullable&&(b?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],b=!0)),b&&1==w.length&&(w=w[0],b=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),w){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,w));var S=a.RULES.types[w];if(g||b||!0===S||S&&!Z(S)){h=a.schemaPath+".type",d=a.errSchemaPath+"/type",h=a.schemaPath+".type",d=a.errSchemaPath+"/type";if(r+=" if ("+a.util[b?"checkDataTypes":"checkDataType"](w,f,a.opts.strictNumbers,!0)+") { ",g){var _="dataType"+l,F="coerced"+l;r+=" var "+_+" = typeof "+f+"; var "+F+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+a.util.checkDataType(a.schema.type,f,a.opts.strictNumbers)+") "+F+" = "+f+"; } "),r+=" if ("+F+" !== undefined) ; ";var x=g;if(x)for(var R,$=-1,j=x.length-1;$<j;)"string"==(R=x[$+=1])?r+=" else if ("+_+" == 'number' || "+_+" == 'boolean') "+F+" = '' + "+f+"; else if ("+f+" === null) "+F+" = ''; ":"number"==R||"integer"==R?(r+=" else if ("+_+" == 'boolean' || "+f+" === null || ("+_+" == 'string' && "+f+" && "+f+" == +"+f+" ","integer"==R&&(r+=" && !("+f+" % 1)"),r+=")) "+F+" = +"+f+"; "):"boolean"==R?r+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+F+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+F+" = true; ":"null"==R?r+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+F+" = null; ":"array"==a.opts.coerceTypes&&"array"==R&&(r+=" else if ("+_+" == 'string' || "+_+" == 'number' || "+_+" == 'boolean' || "+f+" == null) "+F+" = ["+f+"]; ");(U=U||[]).push(r+=" else { "),r="",!1!==a.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: { type: '",r+=b?""+w.join(","):""+w,r+="' } ",!1!==a.opts.messages&&(r+=" , message: 'should be ",r+=b?""+w.join(","):""+w,r+="' "),a.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ";var D=r;r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } if ("+F+" !== undefined) { ";var O=c?"data"+(c-1||""):"parentData";r+=" "+f+" = "+F+"; ",c||(r+="if ("+O+" !== undefined)"),r+=" "+O+"["+(c?a.dataPathArr[c]:"parentDataProperty")+"] = "+F+"; } "}else{(U=U||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: { type: '",r+=b?""+w.join(","):""+w,r+="' } ",!1!==a.opts.messages&&(r+=" , message: 'should be ",r+=b?""+w.join(","):""+w,r+="' "),a.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ";D=r;r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}r+=" } "}}if(a.schema.$ref&&!s)r+=" "+a.RULES.all.$ref.code(a,"$ref")+" ",p&&(r+=" } if (errors === ",r+=v?"0":"errs_"+l,r+=") { ",E+="}");else{var I=a.RULES;if(I)for(var A=-1,k=I.length-1;A<k;)if(Z(S=I[A+=1])){if(S.type&&(r+=" if ("+a.util.checkDataType(S.type,f,a.opts.strictNumbers)+") { "),a.opts.useDefaults)if("object"==S.type&&a.schema.properties){var u=a.schema.properties,C=Object.keys(u);if(C)for(var L,N=-1,q=C.length-1;N<q;){if(void 0!==(Q=u[L=C[N+=1]]).default){var z=f+a.util.getProperty(L);if(a.compositeRule){if(a.opts.strictDefaults){y="default is ignored for: "+z;if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}}else r+=" if ("+z+" === undefined ","empty"==a.opts.useDefaults&&(r+=" || "+z+" === null || "+z+" === '' "),r+=" ) "+z+" = ",r+="shared"==a.opts.useDefaults?" "+a.useDefault(Q.default)+" ":" "+JSON.stringify(Q.default)+" ",r+="; "}}}else if("array"==S.type&&Array.isArray(a.schema.items)){var T=a.schema.items;if(T)for(var Q,$=-1,V=T.length-1;$<V;)if(void 0!==(Q=T[$+=1]).default){z=f+"["+$+"]";if(a.compositeRule){if(a.opts.strictDefaults){y="default is ignored for: "+z;if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}}else r+=" if ("+z+" === undefined ","empty"==a.opts.useDefaults&&(r+=" || "+z+" === null || "+z+" === '' "),r+=" ) "+z+" = ",r+="shared"==a.opts.useDefaults?" "+a.useDefault(Q.default)+" ":" "+JSON.stringify(Q.default)+" ",r+="; "}}var U,H=S.rules;if(H)for(var M,K,B=-1,J=H.length-1;B<J;){!G(K=H[B+=1])||(M=K.code(a,K.keyword,S.type))&&(r+=" "+M+" ",p&&(P+="}"))}p&&(r+=" "+P+" ",P=""),S.type&&(r+=" } ",w&&w===S.type&&!g&&(h=a.schemaPath+".type",d=a.errSchemaPath+"/type",(U=U||[]).push(r+=" else { "),r="",!1!==a.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: { type: '",r+=b?""+w.join(","):""+w,r+="' } ",!1!==a.opts.messages&&(r+=" , message: 'should be ",r+=b?""+w.join(","):""+w,r+="' "),a.opts.verbose&&(r+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",D=r,r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ")),p&&(r+=" if (errors === ",r+=v?"0":"errs_"+l,r+=") { ",E+="}")}}function Z(e){for(var r=e.rules,t=0;t<r.length;t++)if(G(r[t]))return 1}function G(e){return void 0!==a.schema[e.keyword]||e.implements&&function(e){for(var r=e.implements,t=0;t<r.length;t++)if(void 0!==a.schema[r[t]])return 1}(e)}return p&&(r+=" "+E+" "),v?(t?(r+=" if (errors === 0) return data; ",r+=" else throw new ValidationError(vErrors); "):(r+=" validate.errors = vErrors; ",r+=" return errors === 0; "),r+=" }; return validate;"):r+=" var "+m+" = errors === errs_"+l+";",r}},{}],39:[function(e,r,t){"use strict";var i=/^[a-z_$][a-z0-9_$-]*$/i,l=e("./dotjs/custom"),a=e("./definition_schema");function s(e,r){s.errors=null;var t=this._validateKeyword=this._validateKeyword||this.compile(a,!0);if(t(e))return!0;if(s.errors=t.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(t.errors));return!1}r.exports={add:function(e,r){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!i.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,!0);var t=r.type;if(Array.isArray(t))for(var a=0;a<t.length;a++)o(e,t[a],r);else o(e,t,r);var s=r.metaSchema;s&&(r.$data&&this._opts.$data&&(s={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),r.validateSchema=this.compile(s,!0))}function o(e,r,t){for(var a,s=0;s<n.length;s++){var o=n[s];if(o.type==r){a=o;break}}a||n.push(a={type:r,rules:[]});var i={keyword:e,definition:t,custom:!0,code:l,implements:t.implements};a.rules.push(i),n.custom[e]=i}return n.keywords[e]=n.all[e]=!0,this},get:function(e){var r=this.RULES.custom[e];return r?r.definition:this.RULES.keywords[e]||!1},remove:function(e){var r=this.RULES;delete r.keywords[e],delete r.all[e],delete r.custom[e];for(var t=0;t<r.length;t++)for(var a=r[t].rules,s=0;s<a.length;s++)if(a[s].keyword==e){a.splice(s,1);break}return this},validate:s}},{"./definition_schema":12,"./dotjs/custom":22}],40:[function(e,r,t){r.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},{}],41:[function(e,r,t){r.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}},{}],42:[function(e,r,t){"use strict";r.exports=function e(r,t){if(r===t)return!0;if(r&&t&&"object"==typeof r&&"object"==typeof t){if(r.constructor!==t.constructor)return!1;var a,s,o;if(Array.isArray(r)){if((a=r.length)!=t.length)return!1;for(s=a;0!=s--;)if(!e(r[s],t[s]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===t.toString();if((a=(o=Object.keys(r)).length)!==Object.keys(t).length)return!1;for(s=a;0!=s--;)if(!Object.prototype.hasOwnProperty.call(t,o[s]))return!1;for(s=a;0!=s--;){var i=o[s];if(!e(r[i],t[i]))return!1}return!0}return r!=r&&t!=t}},{}],43:[function(e,r,t){"use strict";r.exports=function(e,r){"function"==typeof(r=r||{})&&(r={cmp:r});var a,l="boolean"==typeof r.cycles&&r.cycles,c=r.cmp&&(a=r.cmp,function(t){return function(e,r){return a({key:e,value:t[e]},{key:r,value:t[r]})}}),u=[];return function e(r){if(r&&r.toJSON&&"function"==typeof r.toJSON&&(r=r.toJSON()),void 0!==r){if("number"==typeof r)return isFinite(r)?""+r:"null";if("object"!=typeof r)return JSON.stringify(r);if(Array.isArray(r)){for(s="[",o=0;o<r.length;o++)o&&(s+=","),s+=e(r[o])||"null";return s+"]"}if(null===r)return"null";if(-1!==u.indexOf(r)){if(l)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var t=u.push(r)-1,a=Object.keys(r).sort(c&&c(r)),s="",o=0;o<a.length;o++){var i=a[o],n=e(r[i]);n&&(s&&(s+=","),s+=JSON.stringify(i)+":"+n)}return u.splice(t,1),"{"+s+"}"}}(e)}},{}],44:[function(e,r,t){"use strict";var m=r.exports=function(e,r,t){"function"==typeof r&&(t=r,r={}),function e(r,t,a,s,o,i,n,l,c,u){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var h in t(s,o,i,n,l,c,u),s){var d=s[h];if(Array.isArray(d)){if(h in m.arrayKeywords)for(var p=0;p<d.length;p++)e(r,t,a,d[p],o+"/"+h+"/"+p,i,o,h,s,p)}else if(h in m.propsKeywords){if(d&&"object"==typeof d)for(var f in d)e(r,t,a,d[f],o+"/"+h+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),i,o,h,s,f)}else(h in m.keywords||r.allKeys&&!(h in m.skipKeywords))&&e(r,t,a,d,o+"/"+h,i,o,h,s)}a(s,o,i,n,l,c,u)}}(r,"function"==typeof(t=r.cb||t)?t:t.pre||function(){},t.post||function(){},e,"",e)};m.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},m.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},m.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},m.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},{}],45:[function(e,r,t){var a;a=this,function(e){"use strict";function J(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(1<r.length){r[0]=r[0].slice(0,-1);for(var a=r.length-1,s=1;s<a;++s)r[s]=r[s].slice(1,-1);return r[a]=r[a].slice(1),r.join("")}return r[0]}function Z(e){return"(?:"+e+")"}function a(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function f(e){return e.toUpperCase()}function r(e){var r="[A-Za-z]",t="[0-9]",a=J(t,"[A-Fa-f]"),s=Z(Z("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+Z("%[89A-Fa-f]"+a+"%"+a+a)+"|"+Z("%"+a+a)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=J("[\\:\\/\\?\\#\\[\\]\\@]",o),n=e?"[\\uE000-\\uF8FF]":"[]",l=J(r,t,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),c=Z(r+J(r,t,"[\\+\\-\\.]")+"*"),u=Z(Z(s+"|"+J(l,o,"[\\:]"))+"*"),h=(Z("(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9][0-9])|(?:[1-9][0-9])|"+t),Z("(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9][0-9])|(?:0?[1-9][0-9])|0?0?"+t)),d=Z(h+"\\."+h+"\\."+h+"\\."+h),p=Z(a+"{1,4}"),f=Z(Z(p+"\\:"+p)+"|"+d),m=Z(Z(p+"\\:")+"{6}"+f),v=Z("\\:\\:"+Z(p+"\\:")+"{5}"+f),y=Z(Z(p)+"?\\:\\:"+Z(p+"\\:")+"{4}"+f),g=Z(Z(Z(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+Z(p+"\\:")+"{3}"+f),P=Z(Z(Z(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+Z(p+"\\:")+"{2}"+f),E=Z(Z(Z(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+f),w=Z(Z(Z(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+f),b=Z(Z(Z(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),S=Z(Z(Z(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),_=Z([m,v,y,g,P,E,w,b,S].join("|")),F=Z(Z(l+"|"+s)+"+"),x=(Z(_+"\\%25"+F),Z(_+Z("\\%25|\\%(?!"+a+"{2})")+F)),R=Z("[vV]"+a+"+\\."+J(l,o,"[\\:]")+"+"),$=Z("\\["+Z(x+"|"+_+"|"+R)+"\\]"),j=Z(Z(s+"|"+J(l,o))+"*"),D=Z($+"|"+d+"(?!"+j+")|"+j),O=Z(t+"*"),I=Z(Z(u+"@")+"?"+D+Z("\\:"+O)+"?"),A=Z(s+"|"+J(l,o,"[\\:\\@]")),k=Z(A+"*"),C=Z(A+"+"),L=Z(Z(s+"|"+J(l,o,"[\\@]"))+"+"),N=Z(Z("\\/"+k)+"*"),q=Z("\\/"+Z(C+N)+"?"),z=Z(L+N),T=Z(C+N),Q="(?!"+A+")",V=(Z(N+"|"+q+"|"+z+"|"+T+"|"+Q),Z(Z(A+"|"+J("[\\/\\?]",n))+"*")),U=Z(Z(A+"|[\\/\\?]")+"*"),H=Z(Z("\\/\\/"+I+N)+"|"+q+"|"+T+"|"+Q),M=Z(c+"\\:"+H+Z("\\?"+V)+"?"+Z("\\#"+U)+"?"),K=Z(Z("\\/\\/"+I+N)+"|"+q+"|"+z+"|"+Q),B=Z(K+Z("\\?"+V)+"?"+Z("\\#"+U)+"?");Z(M+"|"+B),Z(c+"\\:"+H+Z("\\?"+V)+"?"),Z(Z("\\/\\/("+Z("("+u+")@")+"?("+D+")"+Z("\\:("+O+")")+"?)")+"?("+N+"|"+q+"|"+T+"|"+Q+")"),Z("\\?("+V+")"),Z("\\#("+U+")"),Z(Z("\\/\\/("+Z("("+u+")@")+"?("+D+")"+Z("\\:("+O+")")+"?)")+"?("+N+"|"+q+"|"+z+"|"+Q+")"),Z("\\?("+V+")"),Z("\\#("+U+")"),Z(Z("\\/\\/("+Z("("+u+")@")+"?("+D+")"+Z("\\:("+O+")")+"?)")+"?("+N+"|"+q+"|"+T+"|"+Q+")"),Z("\\?("+V+")"),Z("\\#("+U+")"),Z("("+u+")@"),Z("\\:("+O+")");return{NOT_SCHEME:new RegExp(J("[^]",r,t,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(J("[^\\%\\:]",l,o),"g"),NOT_HOST:new RegExp(J("[^\\%\\[\\]\\:]",l,o),"g"),NOT_PATH:new RegExp(J("[^\\%\\/\\:\\@]",l,o),"g"),NOT_PATH_NOSCHEME:new RegExp(J("[^\\%\\/\\@]",l,o),"g"),NOT_QUERY:new RegExp(J("[^\\%]",l,o,"[\\:\\@\\/\\?]",n),"g"),NOT_FRAGMENT:new RegExp(J("[^\\%]",l,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(J("[^]",l,o),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(J("[^\\%]",l,i),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+_+")"+Z(Z("\\%25|\\%(?!"+a+"{2})")+"("+F+")")+"?\\]?$")}}var u=r(!1),h=r(!0),w=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,r){var t=[],a=!0,s=!1,o=void 0;try{for(var i,n=e[Symbol.iterator]();!(a=(i=n.next()).done)&&(t.push(i.value),!r||t.length!==r);a=!0);}catch(e){s=!0,o=e}finally{try{!a&&n.return&&n.return()}finally{if(s)throw o}}return t}(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},A=2147483647,t=/^xn--/,s=/[^\0-\x7E]/,o=/[\x2E\u3002\uFF0E\uFF61]/g,i={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1<t.length&&(a=t[0]+"@",e=t[1]),a+function(e,r){for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t}((e=e.replace(o,".")).split("."),r).join(".")}function N(e){for(var r=[],t=0,a=e.length;t<a;){var s,o=e.charCodeAt(t++);55296<=o&&o<=56319&&t<a?56320==(64512&(s=e.charCodeAt(t++)))?r.push(((1023&o)<<10)+(1023&s)+65536):(r.push(o),t--):r.push(o)}return r}function q(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function z(e,r,t){var a=0;for(e=t?k(e/700):e>>1,e+=k(e/r);455<e;a+=36)e=k(e/35);return k(a+36*e/(e+38))}function l(e){var r=[],t=e.length,a=0,s=128,o=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var n=0;n<i;++n)128<=e.charCodeAt(n)&&L("not-basic"),r.push(e.charCodeAt(n));for(var l,c=0<i?i+1:0;c<t;){for(var u=a,h=1,d=36;;d+=36){t<=c&&L("invalid-input");var p=(l=e.charCodeAt(c++))-48<10?l-22:l-65<26?l-65:l-97<26?l-97:36;(36<=p||p>k((A-a)/h))&&L("overflow"),a+=p*h;var f=d<=o?1:o+26<=d?26:d-o;if(p<f)break;var m=36-f;h>k(A/m)&&L("overflow"),h*=m}var v=r.length+1,o=z(a-u,v,0==u);k(a/v)>A-s&&L("overflow"),s+=k(a/v),a%=v,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function c(e){var r=[],t=(e=N(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");p<t;){var f=A,m=!0,v=!1,y=void 0;try{for(var g,P=e[Symbol.iterator]();!(m=(g=P.next()).done);m=!0){var E=g.value;a<=E&&E<f&&(f=E)}}catch(e){v=!0,y=e}finally{try{!m&&P.return&&P.return()}finally{if(v)throw y}}var w=p+1;f-a>k((A-s)/w)&&L("overflow"),s+=(f-a)*w,a=f;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(R<a&&++s>A&&L("overflow"),R==a){for(var $=s,j=36;;j+=36){var D=j<=o?1:o+26<=j?26:j-o;if($<D)break;var O=$-D,I=36-D;r.push(C(q(D+O%I,0))),$=k(O/I)}r.push(C(q($,0))),o=z(s,w,p==d),s=0,++p}}}catch(e){S=!0,_=e}finally{try{!b&&x.return&&x.return()}finally{if(S)throw _}}++s,++a}return r.join("")}var v={version:"2.1.0",ucs2:{decode:N,encode:function(e){return String.fromCodePoint.apply(String,function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}(e))}},decode:l,encode:c,toASCII:function(e){return n(e,function(e){return s.test(e)?"xn--"+c(e):e})},toUnicode:function(e){return n(e,function(e){return t.test(e)?l(e.slice(4).toLowerCase()):e})}},d={};function m(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function p(e){for(var r="",t=0,a=e.length;t<a;){var s,o,i,n=parseInt(e.substr(t+1,2),16);n<128?(r+=String.fromCharCode(n),t+=3):194<=n&&n<224?(6<=a-t?(s=parseInt(e.substr(t+4,2),16),r+=String.fromCharCode((31&n)<<6|63&s)):r+=e.substr(t,6),t+=6):224<=n?(9<=a-t?(o=parseInt(e.substr(t+4,2),16),i=parseInt(e.substr(t+7,2),16),r+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&i)):r+=e.substr(t,9),t+=9):(r+=e.substr(t,3),t+=3)}return r}function y(e,t){function r(e){var r=p(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,m).replace(t.PCT_ENCODED,f)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,m).replace(t.PCT_ENCODED,f)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,m).replace(t.PCT_ENCODED,f)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,m).replace(t.PCT_ENCODED,f)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,m).replace(t.PCT_ENCODED,f)),e}function b(e){return e.replace(/^0*(.*)/,"$1")||"0"}function S(e,r){var t=e.match(r.IPV4ADDRESS)||[],a=w(t,2)[1];return a?a.split(".").map(b).join("."):e}function g(e,r){var t=e.match(r.IPV6ADDRESS)||[],a=w(t,3),s=a[1],o=a[2];if(s){for(var i=s.toLowerCase().split("::").reverse(),n=w(i,2),l=n[0],c=n[1],u=c?c.split(":").map(b):[],h=l.split(":").map(b),d=r.IPV4ADDRESS.test(h[h.length-1]),p=d?7:8,f=h.length-p,m=Array(p),v=0;v<p;++v)m[v]=u[v]||h[f+v]||"";d&&(m[p-1]=S(m[p-1],r));var y,g,P=m.reduce(function(e,r,t){var a;return r&&"0"!==r||((a=e[e.length-1])&&a.index+a.length===t?a.length++:e.push({index:t,length:1})),e},[]).sort(function(e,r){return r.length-e.length})[0],E=void 0;return E=P&&1<P.length?(y=m.slice(0,P.index),g=m.slice(P.index+P.length),y.join(":")+"::"+g.join(":")):m.join(":"),o&&(E+="%"+o),E}return e}var P=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,E=void 0==="".match(/(){0}/)[1];function _(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t={},a=!1!==r.iri?h:u;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var s=e.match(P);if(s){E?(t.scheme=s[1],t.userinfo=s[3],t.host=s[4],t.port=parseInt(s[5],10),t.path=s[6]||"",t.query=s[7],t.fragment=s[8],isNaN(t.port)&&(t.port=s[5])):(t.scheme=s[1]||void 0,t.userinfo=-1!==e.indexOf("@")?s[3]:void 0,t.host=-1!==e.indexOf("//")?s[4]:void 0,t.port=parseInt(s[5],10),t.path=s[6]||"",t.query=-1!==e.indexOf("?")?s[7]:void 0,t.fragment=-1!==e.indexOf("#")?s[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?s[4]:void 0)),t.host&&(t.host=g(S(t.host,a),a)),t.reference=void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?"relative":void 0===t.fragment?"absolute":"uri":"same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var o=d[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||o&&o.unicodeSupport)y(t,a);else{if(t.host&&(r.domainHost||o&&o.domainHost))try{t.host=v.toASCII(t.host.replace(a.PCT_ENCODED,p).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}y(t,u)}o&&o.parse&&o.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}var F=/^\.\.?\//,x=/^\/\.(\/|$)/,R=/^\/\.\.(\/|$)/,$=/^\/?(?:.|\n)*?(?=\/|$)/;function j(e){for(var r=[];e.length;)if(e.match(F))e=e.replace(F,"");else if(e.match(x))e=e.replace(x,"/");else if(e.match(R))e=e.replace(R,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match($);if(!t)throw new Error("Unexpected dot segment condition");var a=t[0];e=e.slice(a.length),r.push(a)}return r.join("")}function D(r){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=t.iri?h:u,a=[],s=d[(t.scheme||r.scheme||"").toLowerCase()];if(s&&s.serialize&&s.serialize(r,t),r.host&&!e.IPV6ADDRESS.test(r.host)&&(t.domainHost||s&&s.domainHost))try{r.host=t.iri?v.toUnicode(r.host):v.toASCII(r.host.replace(e.PCT_ENCODED,p).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}y(r,e),"suffix"!==t.reference&&r.scheme&&(a.push(r.scheme),a.push(":"));var o,i,n,l,c=(i=!1!==t.iri?h:u,n=[],void 0!==(o=r).userinfo&&(n.push(o.userinfo),n.push("@")),void 0!==o.host&&n.push(g(S(String(o.host),i),i).replace(i.IPV6ADDRESS,function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"})),"number"!=typeof o.port&&"string"!=typeof o.port||(n.push(":"),n.push(String(o.port))),n.length?n.join(""):void 0);return void 0!==c&&("suffix"!==t.reference&&a.push("//"),a.push(c),r.path&&"/"!==r.path.charAt(0)&&a.push("/")),void 0!==r.path&&(l=r.path,t.absolutePath||s&&s.absolutePath||(l=j(l)),void 0===c&&(l=l.replace(/^\/\//,"/%2F")),a.push(l)),void 0!==r.query&&(a.push("?"),a.push(r.query)),void 0!==r.fragment&&(a.push("#"),a.push(r.fragment)),a.join("")}function O(e,r){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},a={};return arguments[3]||(e=_(D(e,t),t),r=_(D(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(a.scheme=r.scheme,a.userinfo=r.userinfo,a.host=r.host,a.port=r.port,a.path=j(r.path||""),a.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(a.userinfo=r.userinfo,a.host=r.host,a.port=r.port,a.path=j(r.path||""),a.query=r.query):(r.path?("/"===r.path.charAt(0)?a.path=j(r.path):(a.path=void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:r.path:"/"+r.path,a.path=j(a.path)),a.query=r.query):(a.path=e.path,a.query=void 0!==r.query?r.query:e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=r.fragment,a}function I(e,r){return e&&e.toString().replace(r&&r.iri?h.PCT_ENCODED:u.PCT_ENCODED,p)}var T={scheme:"http",domainHost:!0,parse:function(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:T.domainHost,parse:T.parse,serialize:T.serialize};function V(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var U={scheme:"ws",domainHost:!0,parse:function(e){var r=e;return r.secure=V(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e){var r,t,a,s;return e.port!==(V(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName&&(r=e.resourceName.split("?"),s=(t=w(r,2))[1],e.path=(a=t[0])&&"/"!==a?a:void 0,e.query=s,e.resourceName=void 0),e.fragment=void 0,e}},H={scheme:"wss",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize},M={},K="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",B="[0-9A-Fa-f]",G=(Z(Z("%[EFef]"+B+"%"+B+B+"%"+B+B)+"|"+Z("%[89A-Fa-f]"+B+"%"+B+B)+"|"+Z("%"+B+B)),J("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]')),Y=new RegExp(K,"g"),W=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),X=new RegExp(J("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(J("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=p(e);return r.match(Y)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n<l;++n){var c=i[n].split("=");switch(c[0]){case"to":for(var u=c[1].split(","),h=0,d=u.length;h<d;++h)a.push(u[h]);break;case"subject":t.subject=I(c[1],r);break;case"body":t.body=I(c[1],r);break;default:s=!0,o[I(c[0],r)]=I(c[1],r)}}s&&(t.headers=o)}t.query=void 0;for(var p=0,f=a.length;p<f;++p){var m=a[p].split("@");if(m[0]=I(m[0]),r.unicodeSupport)m[1]=I(m[1],r).toLowerCase();else try{m[1]=v.toASCII(I(m[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}a[p]=m.join("@")}return t},serialize:function(e,r){var t,a=e,s=null!=(t=e.to)?t instanceof Array?t:"number"!=typeof t.length||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[];if(s){for(var o=0,i=s.length;o<i;++o){var n=String(s[o]),l=n.lastIndexOf("@"),c=n.slice(0,l).replace(W,te).replace(W,f).replace(X,m),u=n.slice(l+1);try{u=r.iri?v.toUnicode(u):v.toASCII(I(u,r).toLowerCase())}catch(e){a.error=a.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}s[o]=c+"@"+u}a.path=s.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var d,p=[];for(d in h)h[d]!==M[d]&&p.push(d.replace(W,te).replace(W,f).replace(ee,m)+"="+h[d].replace(W,te).replace(W,f).replace(re,m));return p.length&&(a.query=p.join("&")),a}},se=/^([^\:]+)\:(.*)/,oe={scheme:"urn",parse:function(e,r){var t,a,s,o,i=e.path&&e.path.match(se),n=e;return i?(t=r.scheme||n.scheme||"urn",a=i[1].toLowerCase(),s=i[2],o=d[t+":"+(r.nid||a)],n.nid=a,n.nss=s,n.path=void 0,o&&(n=o.parse(n,r))):n.error=n.error||"URN can not be parsed.",n},serialize:function(e,r){var t=e.nid,a=d[(r.scheme||e.scheme||"urn")+":"+(r.nid||t)];a&&(e=a.serialize(e,r));var s=e;return s.path=(t||r.nid)+":"+e.nss,s}},ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ne={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(ie)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};d[T.scheme]=T,d[Q.scheme]=Q,d[U.scheme]=U,d[H.scheme]=H,d[ae.scheme]=ae,d[oe.scheme]=oe,d[ne.scheme]=ne,e.SCHEMES=d,e.pctEncChar=m,e.pctDecChars=p,e.parse=_,e.removeDotSegments=j,e.serialize=D,e.resolveComponents=O,e.resolve=function(e,r,t){var a=function(e,r){var t=e;if(r)for(var a in r)t[a]=r[a];return t}({scheme:"null"},t);return D(O(_(e,a),_(r,a),a,!0),a)},e.normalize=function(e,r){return"string"==typeof e?e=D(_(e,r),r):"object"===a(e)&&(e=_(D(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=D(_(e,t),t):"object"===a(e)&&(e=D(e,t)),"string"==typeof r?r=D(_(r,t),t):"object"===a(r)&&(r=D(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace(r&&r.iri?h.ESCAPE:u.ESCAPE,m)},e.unescapeComponent=I,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof t&&void 0!==r?t:a.URI=a.URI||{})},{}],ajv:[function(a,e,r){"use strict";var n=a("./compile"),d=a("./compile/resolve"),t=a("./cache"),p=a("./compile/schema_obj"),s=a("fast-json-stable-stringify"),o=a("./compile/formats"),i=a("./compile/rules"),l=a("./data"),c=a("./compile/util");(e.exports=y).prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);!0!==t.$async&&(this.errors=t.errors);return s},y.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},y.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var s=0;s<e.length;s++)this.addSchema(e[s],void 0,t,a);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return S(this,r=d.normalizeId(r||o)),this._schemas[r]=this._addSchema(e,t,a,!0),this},y.prototype.addMetaSchema=function(e,r,t){return this.addSchema(e,r,t,!0),this},y.prototype.validateSchema=function(e,r){var t=e.$schema;if(void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(!(t=t||this._opts.defaultMeta||function(e){var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(f)?f:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);var a=this.validate(t,e);if(!a&&r){var s="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(s);this.logger.error(s)}return a},y.prototype.getSchema=function(e){var r=g(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return function(e,r){var t=d.schema.call(e,{schema:{}},r);if(t){var a=t.schema,s=t.root,o=t.baseId,i=n.call(e,a,s,void 0,o);return e._fragments[r]=new p({ref:r,fragment:!0,schema:a,root:s,baseId:o,validate:i}),i}}(this,e)}},y.prototype.removeSchema=function(e){if(e instanceof RegExp)return P(this,this._schemas,e),P(this,this._refs,e),this;switch(typeof e){case"undefined":return P(this,this._schemas),P(this,this._refs),this._cache.clear(),this;case"string":var r=g(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var t=this._opts.serialize,a=t?t(e):e;this._cache.del(a);var s=this._getId(e);s&&(s=d.normalizeId(s),delete this._schemas[s],delete this._refs[s])}return this},y.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},y.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o<e.length;o++){var i=e[o];i&&(s+=a+i.dataPath+" "+i.message+t)}return s.slice(0,-t.length)},y.prototype._addSchema=function(e,r,t,a){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var s=this._opts.serialize,o=s?s(e):e,i=this._cache.get(o);if(i)return i;a=a||!1!==this._opts.addUsedSchema;var n=d.normalizeId(this._getId(e));n&&a&&S(this,n);var l,c=!1!==this._opts.validateSchema&&!r;c&&!(l=n&&n==d.normalizeId(e.$schema))&&this.validateSchema(e,!0);var u=d.ids.call(this,e),h=new p({id:n,schema:e,localRefs:u,cacheKey:o,meta:t});"#"!=n[0]&&a&&(this._refs[n]=h);this._cache.put(o,h),c&&l&&this.validateSchema(e,!0);return h},y.prototype._compile=function(t,e){if(t.compiling)return(t.validate=s).schema=t.schema,s.errors=null,s.root=e||s,!0===t.schema.$async&&(s.$async=!0),s;var r,a;t.compiling=!0,t.meta&&(r=this._opts,this._opts=this._metaOpts);try{a=n.call(this,t.schema,e,t.localRefs)}catch(e){throw delete t.validate,e}finally{t.compiling=!1,t.meta&&(this._opts=r)}return t.validate=a,t.refs=a.refs,t.refVal=a.refVal,t.root=a.root,a;function s(){var e=t.validate,r=e.apply(this,arguments);return s.errors=e.errors,r}},y.prototype.compileAsync=a("./compile/async");var u=a("./keyword");y.prototype.addKeyword=u.add,y.prototype.getKeyword=u.get,y.prototype.removeKeyword=u.remove,y.prototype.validateKeyword=u.validate;var h=a("./compile/error_classes");y.ValidationError=h.Validation,y.MissingRefError=h.MissingRef,y.$dataMetaSchema=l;var f="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],v=["/properties"];function y(e){if(!(this instanceof y))return new y(e);e=this._opts=c.copy(e)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:_,warn:_,error:_};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=o(e.format),this._cache=e.cache||new t,this._loadingSchemas={},this._compilations=[],this.RULES=i(),this._getId=function(e){switch(e.schemaId){case"auto":return b;case"id":return E;default:return w}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=s),this._metaOpts=function(e){for(var r=c.copy(e._opts),t=0;t<m.length;t++)delete r[m[t]];return r}(this),e.formats&&function(e){for(var r in e._opts.formats){e.addFormat(r,e._opts.formats[r])}}(this),e.keywords&&function(e){for(var r in e._opts.keywords){e.addKeyword(r,e._opts.keywords[r])}}(this),function(e){var r;e._opts.$data&&(r=a("./refs/data.json"),e.addMetaSchema(r,r.$id,!0));if(!1===e._opts.meta)return;var t=a("./refs/json-schema-draft-07.json");e._opts.$data&&(t=l(t,v));e.addMetaSchema(t,f,!0),e._refs["http://json-schema.org/schema"]=f}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this)}function g(e,r){return r=d.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function P(e,r,t){for(var a in r){var s=r[a];s.meta||t&&!t.test(a)||(e._cache.del(s.cacheKey),delete r[a])}}function E(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function w(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function b(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function S(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function _(){}},{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":39,"./refs/data.json":40,"./refs/json-schema-draft-07.json":41,"fast-json-stable-stringify":43}]},{},[])("ajv")});
+//# sourceMappingURL=ajv.min.js.map \ No newline at end of file
diff --git a/node_modules/ajv/dist/ajv.min.js.map b/node_modules/ajv/dist/ajv.min.js.map
new file mode 100644
index 0000000..2d87595
--- /dev/null
+++ b/node_modules/ajv/dist/ajv.min.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ajv.min.js","sources":["0"],"names":["f","exports","module","define","amd","window","global","self","this","Ajv","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","Cache","_cache","prototype","put","key","value","get","del","clear","2","MissingRefError","MissingRef","compileAsync","schema","meta","callback","_opts","loadSchema","undefined","loadMetaSchemaOf","then","schemaObj","_addSchema","validate","_compileAsync","_compile","loadMissingSchema","ref","missingSchema","added","missingRef","schemaPromise","_loadingSchemas","removePromise","sch","addSchema","_refs","_schemas","v","$schema","getSchema","$ref","Promise","resolve","./error_classes","3","baseId","message","url","normalizeId","fullPath","errorSubclass","Subclass","Object","create","constructor","Validation","errors","ajv","validation","./resolve","4","util","DATE","DAYS","TIME","HOSTNAME","URI","URITEMPLATE","URL","UUID","JSON_POINTER","JSON_POINTER_URI_FRAGMENT","RELATIVE_JSON_POINTER","formats","mode","copy","date","str","matches","match","year","month","day","time","full","hour","minute","second","fast","date-time","uri","uri-reference","uri-template","email","hostname","ipv4","ipv6","regex","uuid","json-pointer","json-pointer-uri-fragment","relative-json-pointer","dateTime","split","DATE_TIME_SEPARATOR","NOT_URI_FRAGMENT","test","Z_ANCHOR","RegExp","./util","5","errorClasses","stableStringify","validateGenerator","ucs2length","equal","ValidationError","compile","root","localRefs","opts","refVal","refs","patterns","patternsHash","defaults","defaultsHash","customRules","index","compIndex","compiling","_compilations","compilation","callValidate","_formats","RULES","localCompile","cv","$async","sourceCode","source","splice","result","apply","arguments","_schema","_root","isRoot","isTop","schemaPath","errSchemaPath","errorPath","resolveRef","usePattern","useDefault","useCustomRule","logger","vars","refValCode","patternCode","defaultCode","customRuleCode","processCode","Function","makeValidate","error","_refVal","refCode","refIndex","resolvedRef","rootRefId","addLocalRef","localSchema","inlineRef","inlineRefs","refId","inline","regexStr","toQuotedString","valueStr","rule","parentSchema","it","validateSchema","deps","definition","dependencies","every","keyword","hasOwnProperty","join","errorsText","macro","arr","statement","../dotjs/validate","fast-deep-equal","fast-json-stable-stringify","6","SchemaObject","traverse","res","resolveSchema","parse","refPath","_getFullPath","getFullPath","_getId","keys","id","parsedRef","resolveUrl","getJsonPointer","ids","schemaId","baseIds","","fullPaths","allKeys","jsonPtr","rootSchema","parentJsonPtr","parentKeyword","keyIndex","escapeFragment","PREVENT_SCOPE_CHANGE","toHash","fragment","slice","parts","part","unescapeFragment","SIMPLE_INLINED","limit","checkNoRef","item","Array","isArray","countKeys","count","Infinity","normalize","serialize","TRAILING_SLASH_HASH","replace","./schema_obj","json-schema-traverse","uri-js","7","ruleModules","type","rules","maximum","minimum","properties","ALL","all","types","forEach","group","map","implKeywords","k","push","implements","$comment","keywords","concat","custom","../dotjs","8","obj","9","len","pos","charCodeAt","10","checkDataType","dataType","data","strictNumbers","negate","EQUAL","AND","OK","NOT","to","checkDataTypes","dataTypes","array","object","null","number","integer","coerceToTypes","optionCoerceTypes","COERCE_TO_TYPES","getProperty","escapeQuotes","varOccurences","dataVar","varReplace","expr","schemaHasRules","schemaHasRulesExcept","exceptKeyword","schemaUnknownRules","getPathExpr","currentPath","jsonPointers","isNumber","joinPaths","getPath","prop","path","escapeJsonPointer","getData","$data","lvl","paths","up","jsonPointer","segments","segment","unescapeJsonPointer","decodeURIComponent","encodeURIComponent","hash","IDENTIFIER","SINGLE_QUOTE","b","./ucs2length","11","KEYWORDS","metaSchema","keywordsJsonPointers","JSON","stringify","j","anyOf","12","$id","definitions","simpleTypes","statements","valid","not","required","items","modifying","async","const","./refs/json-schema-draft-07.json","13","$keyword","$schemaValueExcl","$exclusive","$exclType","$exclIsNumber","$opStr","$opExpr","$$outStack","out","$lvl","level","$dataLvl","dataLevel","$schemaPath","$errSchemaPath","$breakOnError","allErrors","$isData","$schemaValue","dataPathArr","$isMax","$exclusiveKeyword","$schemaExcl","$isDataExcl","$op","$notOp","$errorKeyword","createErrors","messages","verbose","__err","pop","compositeRule","Math","14","15","unicode","16","17","$it","$closingBraces","$nextValid","$currentBaseId","$allSchemasEmpty","arr1","$sch","$i","l1","strictKeywords","18","$valid","$errs","$wasComposite","19","20","21","$passData","$code","$idx","$dataNxt","$nextData","$nonEmptySchema","22","$compile","$inline","$macro","$ruleValidate","$validateCode","$rule","$definition","$rDef","$validateSchema","$parentData","$parentDataProperty","def_callRuleValidate","def_customError","$ruleErrs","$ruleErr","$asyncKeyword","passContext","23","$deps","$schemaDeps","$propertyDeps","$ownProperties","ownProperties","$property","$currentErrorPath","$propertyKey","$useData","$prop","$propertyPath","$missingProperty","_errorDataPathProperty","arr2","i2","l2","24","$vSchema","25","$ruleType","format","$format","$unknownFormats","unknownFormats","$allowUnknown","$isObject","$formatType","warn","indexOf","$formatRef","26","$ifClause","$thenSch","$elseSch","$thenPresent","$elsePresent","27","allOf","contains","enum","if","maxItems","minItems","maxLength","minLength","maxProperties","minProperties","multipleOf","oneOf","pattern","propertyNames","uniqueItems","./_limit","./_limitItems","./_limitLength","./_limitProperties","./allOf","./anyOf","./comment","./const","./contains","./dependencies","./enum","./format","./if","./items","./multipleOf","./not","./oneOf","./pattern","./properties","./propertyNames","./ref","./required","./uniqueItems","./validate","28","$currErrSchemaPath","$additionalItems","additionalItems","29","multipleOfPrecision","30","$allErrorsOption","31","$prevValid","$passingSchemas","32","$regexp","33","$requiredHash","$additionalProperty","$key","$dataProperties","$schemaKeys","filter","notProto","$pProperties","patternProperties","$pPropertyKeys","$aProperties","additionalProperties","$someProperties","$noAdditional","$additionalIsSchema","$removeAdditional","removeAdditional","$checkAdditional","$required","loopRequired","i1","$pProperty","$useDefaults","useDefaults","arr3","i3","l3","$hasDefault","default","arr4","i4","l4","34","$invalidName","35","$refCode","$refVal","$message","missingRefs","__callValidate","36","$propertySch","$loopRequired","37","$itemType","$typeIsArray","38","$refKeywords","$unknownKwd","$keywordsMsg","$top","rootId","strictDefaults","$defaultMsg","$coerceToTypes","$closingBraces1","$closingBraces2","$typeSchema","nullable","extendRefs","coerceTypes","$rulesGroup","$shouldUseGroup","$dataType","$coerced","$type","arr5","i5","l5","$shouldUseRule","impl","$ruleImplementsSomeKeyword","39","definitionSchema","validateKeyword","throwError","_validateKeyword","add","_addRule","ruleGroup","rg","remove","./definition_schema","./dotjs/custom","40","description","41","title","schemaArray","nonNegativeInteger","nonNegativeIntegerDefault0","stringArray","readOnly","examples","exclusiveMinimum","exclusiveMaximum","contentMediaType","contentEncoding","else","42","flags","valueOf","toString","43","cmp","cycles","node","seen","toJSON","isFinite","TypeError","seenIndex","sort","44","cb","_traverse","pre","post","arrayKeywords","propsKeywords","skipKeywords","45","merge","_len","sets","_key","xl","x","subexp","typeOf","shift","toLowerCase","toUpperCase","buildExps","isIRI","ALPHA$$","DIGIT$$","HEXDIG$$","PCT_ENCODED$","SUB_DELIMS$$","RESERVED$$","IPRIVATE$$","UNRESERVED$$","SCHEME$","USERINFO$","DEC_OCTET_RELAXED$","IPV4ADDRESS$","H16$","LS32$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","IPV6ADDRESS$","ZONEID$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IP_LITERAL$","REG_NAME$","HOST$","PORT$","AUTHORITY$","PCHAR$","SEGMENT$","SEGMENT_NZ$","SEGMENT_NZ_NC$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_NOSCHEME$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","FRAGMENT$","HIER_PART$","URI$","RELATIVE_PART$","RELATIVE$","NOT_SCHEME","NOT_USERINFO","NOT_HOST","NOT_PATH","NOT_PATH_NOSCHEME","NOT_QUERY","NOT_FRAGMENT","ESCAPE","UNRESERVED","OTHER_CHARS","PCT_ENCODED","IPV4ADDRESS","IPV6ADDRESS","URI_PROTOCOL","IRI_PROTOCOL","slicedToArray","Symbol","iterator","_arr","_n","_d","_e","_s","_i","next","done","err","sliceIterator","maxInt","regexPunycode","regexNonASCII","regexSeparators","overflow","not-basic","invalid-input","floor","stringFromCharCode","String","fromCharCode","error$1","RangeError","mapDomain","string","fn","ucs2decode","output","counter","extra","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","baseMinusTMin","base","decode","input","inputLength","bias","basic","lastIndexOf","codePoint","oldi","w","baseMinusT","fromCodePoint","encode","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","_currentValue2","return","basicLength","handledCPCount","m","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","currentValue","handledCPCountPlusOne","_iteratorNormalCompletion3","_didIteratorError3","_iteratorError3","_step3","_iterator3","_currentValue","q","qMinusT","punycode","version","ucs2","from","toConsumableArray","toASCII","toUnicode","SCHEMES","pctEncChar","chr","pctDecChars","newStr","il","c2","_c","c3","parseInt","substr","_normalizeComponentEncoding","components","protocol","decodeUnreserved","decStr","scheme","userinfo","host","query","_stripLeadingZeros","_normalizeIPv4","address","_normalizeIPv6","_matches2","zone","_address$toLowerCase$","reverse","_address$toLowerCase$2","last","first","firstFields","lastFields","isLastFieldIPv4Address","fieldCount","lastFieldsStart","fields","newFirst","newLast","longestZeroFields","reduce","acc","field","lastLongest","newHost","URI_PARSE","NO_MATCH_IS_UNDEFINED","uriString","options","iri","reference","port","isNaN","schemeHandler","unicodeSupport","domainHost","RDS1","RDS2","RDS3","RDS5","removeDotSegments","im","s","uriTokens","authority","_","$1","$2","charAt","absolutePath","resolveComponents","relative","target","tolerant","unescapeComponent","handler","secure","handler$1","isSecure","wsComponents","handler$2","resourceName","_wsComponents$resourc","_wsComponents$resourc2","handler$3","O","VCHAR$$","NOT_LOCAL_PART","NOT_HFNAME","NOT_HFVALUE","handler$4","mailtoComponents","unknownHeaders","headers","hfields","hfield","toAddrs","_x","_xl","subject","body","_x2","_xl2","addr","setInterval","toAddr","atIdx","localPart","domain","name","URN_PARSE","handler$5","nid","nss","urnComponents","uriComponents","handler$6","uuidComponents","baseURI","relativeURI","schemelessOptions","assign","uriA","uriB","escapeComponent","defineProperty","factory","compileSchema","$dataMetaSchema","schemaKeyRef","_meta","_skipValidation","checkUnique","addMetaSchema","skipValidation","throwOrLogError","defaultMeta","META_SCHEMA_ID","keyRef","_getSchemaObj","_fragments","_getSchemaFragment","removeSchema","_removeAllSchemas","cacheKey","addFormat","separator","text","dataPath","shouldAddSchema","cached","addUsedSchema","recursiveMeta","willValidate","currentOpts","_metaOpts","_validate","customKeyword","addKeyword","getKeyword","removeKeyword","META_IGNORE_OPTIONS","META_SUPPORT_DATA","log","noop","console","setLogger","cache","_get$IdOrId","_get$Id","chooseGetId","errorDataPath","metaOpts","getMetaSchemaOptions","addInitialFormats","addInitialKeywords","$dataSchema","addDefaultMetaSchema","optsSchemas","schemas","addInitialSchemas","./cache","./compile","./compile/async","./compile/error_classes","./compile/formats","./compile/resolve","./compile/rules","./compile/schema_obj","./compile/util","./data","./keyword","./refs/data.json"],"mappings":";CAAA,SAAUA,GAAuB,iBAAVC,SAAoC,oBAATC,OAAsBA,OAAOD,QAAQD,IAA4B,mBAATG,QAAqBA,OAAOC,IAAKD,OAAO,GAAGH,IAAiC,oBAATK,OAAwBA,OAA+B,oBAATC,OAAwBA,OAA6B,oBAAPC,KAAsBA,KAAYC,MAAOC,IAAMT,IAAxT,CAA+T,WAAqC,OAAmB,SAASU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEf,GAAG,IAAIY,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIC,EAAE,mBAAmBC,SAASA,QAAQ,IAAIjB,GAAGgB,EAAE,OAAOA,EAAED,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEV,EAAEG,GAAG,CAACd,QAAQ,IAAIU,EAAEI,GAAG,GAAGQ,KAAKD,EAAErB,QAAQ,SAASS,GAAoB,OAAOI,EAAlBH,EAAEI,GAAG,GAAGL,IAAeA,IAAIY,EAAEA,EAAErB,QAAQS,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGd,QAAQ,IAAI,IAAIiB,EAAE,mBAAmBD,SAASA,QAAQF,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAA7b,CAA4c,CAACW,EAAE,CAAC,SAASR,EAAQf,EAAOD,gBAIn1B,IAAIyB,EAAQxB,EAAOD,QAAU,WAC3BO,KAAKmB,OAAS,IAIhBD,EAAME,UAAUC,IAAM,SAAmBC,EAAKC,GAC5CvB,KAAKmB,OAAOG,GAAOC,GAIrBL,EAAME,UAAUI,IAAM,SAAmBF,GACvC,OAAOtB,KAAKmB,OAAOG,IAIrBJ,EAAME,UAAUK,IAAM,SAAmBH,UAChCtB,KAAKmB,OAAOG,IAIrBJ,EAAME,UAAUM,MAAQ,WACtB1B,KAAKmB,OAAS,KAGd,IAAIQ,EAAE,CAAC,SAASlB,EAAQf,EAAOD,gBAGjC,IAAImC,EAAkBnB,EAAQ,mBAAmBoB,WAcjD,SAASC,EAAaC,EAAQC,EAAMC,GAIlC,IAAIlC,EAAOC,KACX,GAAoC,mBAAzBA,KAAKkC,MAAMC,WACpB,MAAM,IAAIvB,MAAM,2CAEC,mBAARoB,IACTC,EAAWD,EACXA,OAAOI,GAGT,IAAItB,EAAIuB,EAAiBN,GAAQO,KAAK,WACpC,IAAIC,EAAYxC,EAAKyC,WAAWT,OAAQK,EAAWJ,GACnD,OAAOO,EAAUE,UAqBnB,SAASC,EAAcH,GACrB,IAAM,OAAOxC,EAAK4C,SAASJ,GAC3B,MAAMpC,GACJ,GAAIA,aAAayB,EAAiB,OAAOgB,EAAkBzC,GAC3D,MAAMA,EAIR,SAASyC,EAAkBzC,GACzB,IAAI0C,EAAM1C,EAAE2C,cACZ,GAAIC,EAAMF,GAAM,MAAM,IAAIjC,MAAM,UAAYiC,EAAM,kBAAoB1C,EAAE6C,WAAa,uBAErF,IAAIC,EAAgBlD,EAAKmD,gBAAgBL,GAMzC,OALKI,IACHA,EAAgBlD,EAAKmD,gBAAgBL,GAAO9C,EAAKmC,MAAMC,WAAWU,IACpDP,KAAKa,EAAeA,GAG7BF,EAAcX,KAAK,SAAUc,GAClC,IAAKL,EAAMF,GACT,OAAOR,EAAiBe,GAAKd,KAAK,WAC3BS,EAAMF,IAAM9C,EAAKsD,UAAUD,EAAKP,OAAKT,EAAWJ,OAGxDM,KAAK,WACN,OAAOI,EAAcH,KAGvB,SAASY,WACApD,EAAKmD,gBAAgBL,GAG9B,SAASE,EAAMF,GACb,OAAO9C,EAAKuD,MAAMT,IAAQ9C,EAAKwD,SAASV,KAtDfH,CAAcH,KAU7C,OAPIN,GACFnB,EAAEwB,KACA,SAASkB,GAAKvB,EAAS,KAAMuB,IAC7BvB,GAIGnB,EAGP,SAASuB,EAAiBe,GACxB,IAAIK,EAAUL,EAAIK,QAClB,OAAOA,IAAY1D,EAAK2D,UAAUD,GACxB3B,EAAaf,KAAKhB,EAAM,CAAE4D,KAAMF,IAAW,GAC3CG,QAAQC,WA5CtBnE,EAAOD,QAAUqC,GAuFf,CAACgC,kBAAkB,IAAIC,EAAE,CAAC,SAAStD,EAAQf,EAAOD,gBAGpD,IAAIoE,EAAUpD,EAAQ,aAoBtB,SAASmB,EAAgBoC,EAAQnB,EAAKoB,GACpCjE,KAAKiE,QAAUA,GAAWrC,EAAgBqC,QAAQD,EAAQnB,GAC1D7C,KAAKgD,WAAaa,EAAQK,IAAIF,EAAQnB,GACtC7C,KAAK8C,cAAgBe,EAAQM,YAAYN,EAAQO,SAASpE,KAAKgD,aAIjE,SAASqB,EAAcC,GAGrB,OAFAA,EAASlD,UAAYmD,OAAOC,OAAO5D,MAAMQ,WACzCkD,EAASlD,UAAUqD,YAAcH,EA3BnC5E,EAAOD,QAAU,CACfiF,WAAYL,EAKd,SAAyBM,GACvB3E,KAAKiE,QAAU,oBACfjE,KAAK2E,OAASA,EACd3E,KAAK4E,IAAM5E,KAAK6E,YAAa,IAP7BhD,WAAYwC,EAAczC,IAW5BA,EAAgBqC,QAAU,SAAUD,EAAQnB,GAC1C,MAAO,2BAA8BA,EAAM,YAAcmB,IAiBzD,CAACc,YAAY,IAAIC,EAAE,CAAC,SAAStE,EAAQf,EAAOD,gBAG9C,IAAIuF,EAAOvE,EAAQ,UAEfwE,EAAO,6BACPC,EAAO,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAC3CC,EAAO,0DACPC,EAAW,wGACXC,EAAM,+nCAGNC,EAAc,oLAKdC,EAAM,grDACNC,EAAO,+DACPC,EAAe,4BACfC,EAA4B,+DAC5BC,EAAwB,mDAK5B,SAASC,EAAQC,GAEf,OAAOb,EAAKc,KAAKF,EADjBC,EAAe,QAARA,EAAiB,OAAS,SA+DnC,SAASE,EAAKC,GAEZ,IAAIC,EAAUD,EAAIE,MAAMjB,GACxB,IAAKgB,EAAS,OAAO,EAErB,IAXkBE,EAYdC,GAASH,EAAQ,GACjBI,GAAOJ,EAAQ,GAEnB,OAAgB,GAATG,GAAcA,GAAS,IAAa,GAAPC,GAC5BA,IAAiB,GAATD,KAhBED,GAWNF,EAAQ,IATN,GAAM,GAAME,EAAO,KAAQ,GAAKA,EAAO,KAAQ,GAcPjB,EAAKkB,GAAV,IAInD,SAASE,EAAKN,EAAKO,GACjB,IAAIN,EAAUD,EAAIE,MAAMf,GACxB,IAAKc,EAAS,OAAO,EAErB,IAAIO,EAAOP,EAAQ,GACfQ,EAASR,EAAQ,GACjBS,EAAST,EAAQ,GAErB,OAASO,GAAQ,IAAMC,GAAU,IAAMC,GAAU,IAChC,IAARF,GAAwB,IAAVC,GAA0B,IAAVC,MAC9BH,GAHMN,EAAQ,KAvFzBvG,EAAOD,QAAUmG,GAQTe,KAAO,CAEbZ,KAAM,6BAENO,KAAM,8EACNM,YAAa,0GAEbC,IAAK,6CACLC,gBAAiB,0EACjBC,eAAgBzB,EAChBpB,IAAKqB,EAILyB,MAAO,mHACPC,SAAU7B,EAEV8B,KAAM,4EAENC,KAAM,qpCACNC,MAAOA,EAEPC,KAAM7B,EAGN8B,eAAgB7B,EAChB8B,4BAA6B7B,EAE7B8B,wBAAyB7B,GAI3BC,EAAQW,KAAO,CACbR,KAAMA,EACNO,KAAMA,EACNM,YAoDF,SAAmBZ,GAEjB,IAAIyB,EAAWzB,EAAI0B,MAAMC,GACzB,OAA0B,GAAnBF,EAASzG,QAAe+E,EAAK0B,EAAS,KAAOnB,EAAKmB,EAAS,IAAI,IAtDtEZ,IA2DF,SAAab,GAEX,OAAO4B,EAAiBC,KAAK7B,IAAQX,EAAIwC,KAAK7B,IA5D9Cc,gBA3DW,yoCA4DXC,eAAgBzB,EAChBpB,IAAKqB,EACLyB,MAAO,2IACPC,SAAU7B,EACV8B,KAAM,4EACNC,KAAM,qpCACNC,MAAOA,EACPC,KAAM7B,EACN8B,eAAgB7B,EAChB8B,4BAA6B7B,EAC7B8B,wBAAyB7B,GAsC3B,IAAIgC,EAAsB,QAQ1B,IAAIC,EAAmB,OAOvB,IAAIE,EAAW,WACf,SAASV,EAAMpB,GACb,GAAI8B,EAASD,KAAK7B,GAAM,OAAO,EAC/B,IAEE,OADA,IAAI+B,OAAO/B,IACJ,EACP,MAAM7F,GACN,OAAO,KAIT,CAAC6H,SAAS,KAAKC,EAAE,CAAC,SAASxH,EAAQf,EAAOD,gBAG5C,IAAIoE,EAAUpD,EAAQ,aAClBuE,EAAOvE,EAAQ,UACfyH,EAAezH,EAAQ,mBACvB0H,EAAkB1H,EAAQ,8BAE1B2H,EAAoB3H,EAAQ,qBAM5B4H,EAAarD,EAAKqD,WAClBC,EAAQ7H,EAAQ,mBAGhB8H,EAAkBL,EAAaxD,WAcnC,SAAS8D,EAAQzG,EAAQ0G,EAAMC,EAAW1E,GAGxC,IAAIjE,EAAOC,KACP2I,EAAO3I,KAAKkC,MACZ0G,EAAS,MAAExG,GACXyG,EAAO,GACPC,EAAW,GACXC,EAAe,GACfC,EAAW,GACXC,EAAe,GACfC,EAAc,GAId1I,EA4QN,SAAwBuB,EAAQ0G,EAAMzE,GAEpC,IAAImF,EAAQC,EAAUrI,KAAKf,KAAM+B,EAAQ0G,EAAMzE,GAC/C,OAAa,GAATmF,EAAmB,CAAEA,MAAOA,EAAOE,WAAW,GAO3C,CAAEF,MANTA,EAAQnJ,KAAKsJ,cAActI,OAMJqI,YALvBrJ,KAAKsJ,cAAcH,GAAS,CAC1BpH,OAAQA,EACR0G,KAAMA,EACNzE,OAAQA,MApRajD,KAAKf,KAAM+B,EAFlC0G,EAAOA,GAAQ,CAAE1G,OAAQA,EAAQ6G,OAAQA,EAAQC,KAAMA,GAEP7E,GAC5CuF,EAAcvJ,KAAKsJ,cAAc9I,EAAE2I,OACvC,GAAI3I,EAAE6I,UAAW,OAAQE,EAAYC,aAAeA,EAEpD,IAAI5D,EAAU5F,KAAKyJ,SACfC,EAAQ1J,KAAK0J,MAEjB,IACE,IAAIlG,EAAImG,EAAa5H,EAAQ0G,EAAMC,EAAW1E,GAC9CuF,EAAY9G,SAAWe,EACvB,IAAIoG,EAAKL,EAAYC,aAUrB,OATII,IACFA,EAAG7H,OAASyB,EAAEzB,OACd6H,EAAGjF,OAAS,KACZiF,EAAGf,KAAOrF,EAAEqF,KACZe,EAAGhB,OAASpF,EAAEoF,OACdgB,EAAGnB,KAAOjF,EAAEiF,KACZmB,EAAGC,OAASrG,EAAEqG,OACVlB,EAAKmB,aAAYF,EAAGG,OAASvG,EAAEuG,SAE9BvG,EACP,SA4QJ,SAAsBzB,EAAQ0G,EAAMzE,GAElC,IAAIzD,EAAI6I,EAAUrI,KAAKf,KAAM+B,EAAQ0G,EAAMzE,GAClC,GAALzD,GAAQP,KAAKsJ,cAAcU,OAAOzJ,EAAG,KA9Q1BQ,KAAKf,KAAM+B,EAAQ0G,EAAMzE,GAIxC,SAASwF,IAEP,IAAI/G,EAAW8G,EAAY9G,SACvBwH,EAASxH,EAASyH,MAAMlK,KAAMmK,WAElC,OADAX,EAAa7E,OAASlC,EAASkC,OACxBsF,EAGT,SAASN,EAAaS,EAASC,EAAO3B,EAAW1E,GAC/C,IAAIsG,GAAUD,GAAUA,GAASA,EAAMtI,QAAUqI,EACjD,GAAIC,EAAMtI,QAAU0G,EAAK1G,OACvB,OAAOyG,EAAQzH,KAAKhB,EAAMqK,EAASC,EAAO3B,EAAW1E,GAEvD,IAAI6F,GAA4B,IAAnBO,EAAQP,OAEjBC,EAAa1B,EAAkB,CACjCmC,OAAO,EACPxI,OAAQqI,EACRE,OAAQA,EACRtG,OAAQA,EACRyE,KAAM4B,EACNG,WAAY,GACZC,cAAe,IACfC,UAAW,KACX9I,gBAAiBsG,EAAarG,WAC9B6H,MAAOA,EACPjH,SAAU2F,EACVpD,KAAMA,EACNnB,QAASA,EACT8G,WAAYA,EACZC,WAAYA,EACZC,WAAYA,EACZC,cAAeA,EACfnC,KAAMA,EACN/C,QAASA,EACTmF,OAAQhL,EAAKgL,OACbhL,KAAMA,IAGR+J,EAAakB,EAAKpC,EAAQqC,GAAcD,EAAKlC,EAAUoC,GACtCF,EAAKhC,EAAUmC,GAAeH,EAAK9B,EAAakC,GAChDtB,EAEbnB,EAAK0C,cAAavB,EAAanB,EAAK0C,YAAYvB,EAAYM,IAGhE,IACE,IAcA3H,EAdmB,IAAI6I,SACrB,OACA,QACA,UACA,OACA,SACA,WACA,cACA,QACA,aACA,kBACAxB,EAGSyB,CACTxL,EACA2J,EACA9D,EACA6C,EACAG,EACAI,EACAE,EACAZ,EACAD,EACAE,GAGFK,EAAO,GAAKnG,EACZ,MAAMtC,GAEN,MADAJ,EAAKgL,OAAOS,MAAM,yCAA0C1B,GACtD3J,EAiBR,OAdAsC,EAASV,OAASqI,EAClB3H,EAASkC,OAAS,KAClBlC,EAASoG,KAAOA,EAChBpG,EAASmG,OAASA,EAClBnG,EAASgG,KAAO6B,EAAS7H,EAAW4H,EAChCR,IAAQpH,EAASoH,QAAS,IACN,IAApBlB,EAAKmB,aACPrH,EAASsH,OAAS,CAChBlJ,KAAMiJ,EACNhB,SAAUA,EACVE,SAAUA,IAIPvG,EAGT,SAASkI,EAAW3G,EAAQnB,EAAKyH,GAC/BzH,EAAMgB,EAAQK,IAAIF,EAAQnB,GAC1B,IACI4I,EAASC,EADTC,EAAW9C,EAAKhG,GAEpB,QAAiBT,IAAbuJ,EAGF,OAAOC,EAFPH,EAAU7C,EAAO+C,GACjBD,EAAU,UAAYC,EAAW,KAGnC,IAAKrB,GAAU7B,EAAKI,KAAM,CACxB,IAAIgD,EAAYpD,EAAKI,KAAKhG,GAC1B,QAAkBT,IAAdyJ,EAGF,OAAOD,EAFPH,EAAUhD,EAAKG,OAAOiD,GACtBH,EAAUI,EAAYjJ,EAAK4I,IAK/BC,EAAUI,EAAYjJ,GACtB,IAEMkJ,EAFFvI,EAAIK,EAAQ9C,KAAKhB,EAAM4J,EAAclB,EAAM5F,GAU/C,QATUT,IAANoB,IACEuI,EAAcrD,GAAaA,EAAU7F,MAEvCW,EAAIK,EAAQmI,UAAUD,EAAapD,EAAKsD,YAClCF,EACAvD,EAAQzH,KAAKhB,EAAMgM,EAAatD,EAAMC,EAAW1E,SAIjD5B,IAANoB,EAIF,OAAOoI,EAiBThD,EADYC,EAjBMhG,IAAKW,EACCkI,UAYjB7C,EAfUhG,GAOnB,SAASiJ,EAAYjJ,EAAKW,GACxB,IAAI0I,EAAQtD,EAAO5H,OAGnB,OAFA4H,EAAOsD,GAAS1I,EAET,UADPqF,EAAKhG,GAAOqJ,GAad,SAASN,EAAYhD,EAAQ/H,GAC3B,MAAwB,iBAAV+H,GAAuC,kBAAVA,EACjC,CAAE/H,KAAMA,EAAMkB,OAAQ6G,EAAQuD,QAAQ,GACtC,CAAEtL,KAAMA,EAAMgJ,OAAQjB,KAAYA,EAAOiB,QAGrD,SAASe,EAAWwB,GAClB,IAAIjD,EAAQJ,EAAaqD,GAKzB,YAJchK,IAAV+G,IACFA,EAAQJ,EAAaqD,GAAYtD,EAAS9H,OAC1C8H,EAASK,GAASiD,GAEb,UAAYjD,EAGrB,SAAS0B,EAAWtJ,GAClB,cAAeA,GACb,IAAK,UACL,IAAK,SACH,MAAO,GAAKA,EACd,IAAK,SACH,OAAOyD,EAAKqH,eAAe9K,GAC7B,IAAK,SACH,GAAc,OAAVA,EAAgB,MAAO,OAC3B,IAAI+K,EAAWnE,EAAgB5G,GAC3B4H,EAAQF,EAAaqD,GAKzB,YAJclK,IAAV+G,IACFA,EAAQF,EAAaqD,GAAYtD,EAAShI,OAC1CgI,EAASG,GAAS5H,GAEb,UAAY4H,GAIzB,SAAS2B,EAAcyB,EAAMxK,EAAQyK,EAAcC,GACjD,IAAkC,IAA9B1M,EAAKmC,MAAMwK,eAA0B,CACvC,IAAIC,EAAOJ,EAAKK,WAAWC,aAC3B,GAAIF,IAASA,EAAKG,MAAM,SAASC,GAC/B,OAAOxI,OAAOnD,UAAU4L,eAAejM,KAAKyL,EAAcO,KAE1D,MAAM,IAAInM,MAAM,kDAAoD+L,EAAKM,KAAK,MAEhF,IAAIP,EAAiBH,EAAKK,WAAWF,eACrC,GAAIA,EAEF,IADYA,EAAe3K,GACf,CACV,IAAIkC,EAAU,8BAAgClE,EAAKmN,WAAWR,EAAe/H,QAC7E,GAAiC,OAA7B5E,EAAKmC,MAAMwK,eACV,MAAM,IAAI9L,MAAMqD,GADmBlE,EAAKgL,OAAOS,MAAMvH,IAMhE,IAIIxB,EAJA+F,EAAU+D,EAAKK,WAAWpE,QAC1B2D,EAASI,EAAKK,WAAWT,OACzBgB,EAAQZ,EAAKK,WAAWO,MAG5B,GAAI3E,EACF/F,EAAW+F,EAAQzH,KAAKhB,EAAMgC,EAAQyK,EAAcC,QAC/C,GAAIU,EACT1K,EAAW0K,EAAMpM,KAAKhB,EAAMgC,EAAQyK,EAAcC,IACtB,IAAxB9D,EAAK+D,gBAA0B3M,EAAK2M,eAAejK,GAAU,QAC5D,GAAI0J,EACT1J,EAAW0J,EAAOpL,KAAKhB,EAAM0M,EAAIF,EAAKQ,QAAShL,EAAQyK,QAGvD,KADA/J,EAAW8J,EAAKK,WAAWnK,UACZ,OAGjB,QAAiBL,IAAbK,EACF,MAAM,IAAI7B,MAAM,mBAAqB2L,EAAKQ,QAAU,sBAEtD,IAAI5D,EAAQD,EAAYlI,OAGxB,MAAO,CACLH,KAAM,aAAesI,EACrB1G,SAJFyG,EAAYC,GAAS1G,IAsDzB,SAAS2G,EAAUrH,EAAQ0G,EAAMzE,GAE/B,IAAK,IAAIzD,EAAE,EAAGA,EAAEP,KAAKsJ,cAActI,OAAQT,IAAK,CAC9C,IAAIC,EAAIR,KAAKsJ,cAAc/I,GAC3B,GAAIC,EAAEuB,QAAUA,GAAUvB,EAAEiI,MAAQA,GAAQjI,EAAEwD,QAAUA,EAAQ,OAAOzD,EAEzE,OAAQ,EAIV,SAAS2K,EAAY3K,EAAGuI,GACtB,MAAO,cAAgBvI,EAAI,iBAAmByE,EAAKqH,eAAevD,EAASvI,IAAM,KAInF,SAAS4K,EAAY5K,GACnB,MAAO,cAAgBA,EAAI,eAAiBA,EAAI,KAIlD,SAAS0K,EAAW1K,EAAGqI,GACrB,YAAqBxG,IAAdwG,EAAOrI,GAAmB,GAAK,aAAeA,EAAI,aAAeA,EAAI,KAI9E,SAAS6K,EAAe7K,GACtB,MAAO,iBAAmBA,EAAI,kBAAoBA,EAAI,KAIxD,SAASyK,EAAKoC,EAAKC,GACjB,IAAKD,EAAIpM,OAAQ,MAAO,GAExB,IADA,IAAIH,EAAO,GACFN,EAAE,EAAGA,EAAE6M,EAAIpM,OAAQT,IAC1BM,GAAQwM,EAAU9M,EAAG6M,GACvB,OAAOvM,EA9WTnB,EAAOD,QAAU+I,GAiXf,CAAC8E,oBAAoB,GAAGxJ,kBAAkB,EAAEgB,YAAY,EAAEkD,SAAS,GAAGuF,kBAAkB,GAAGC,6BAA6B,KAAKC,EAAE,CAAC,SAAShN,EAAQf,EAAOD,gBAG1J,IAAI4F,EAAM5E,EAAQ,UACd6H,EAAQ7H,EAAQ,mBAChBuE,EAAOvE,EAAQ,UACfiN,EAAejN,EAAQ,gBACvBkN,EAAWlN,EAAQ,wBAmBvB,SAASoD,EAAQ2E,EAASC,EAAM5F,GAE9B,IAAI+F,EAAS5I,KAAKsD,MAAMT,GACxB,GAAqB,iBAAV+F,EAAoB,CAC7B,IAAI5I,KAAKsD,MAAMsF,GACV,OAAO/E,EAAQ9C,KAAKf,KAAMwI,EAASC,EAAMG,GADtBA,EAAS5I,KAAKsD,MAAMsF,GAK9C,IADAA,EAASA,GAAU5I,KAAKuD,SAASV,cACX6K,EACpB,OAAO1B,EAAUpD,EAAO7G,OAAQ/B,KAAKkC,MAAM+J,YACjCrD,EAAO7G,OACP6G,EAAOnG,UAAYzC,KAAK2C,SAASiG,GAG7C,IACI7G,EAAQyB,EAAGQ,EADX4J,EAAMC,EAAc9M,KAAKf,KAAMyI,EAAM5F,GAgBzC,OAdI+K,IACF7L,EAAS6L,EAAI7L,OACb0G,EAAOmF,EAAInF,KACXzE,EAAS4J,EAAI5J,QAGXjC,aAAkB2L,EACpBlK,EAAIzB,EAAOU,UAAY+F,EAAQzH,KAAKf,KAAM+B,EAAOA,OAAQ0G,OAAMrG,EAAW4B,QACtD5B,IAAXL,IACTyB,EAAIwI,EAAUjK,EAAQ/B,KAAKkC,MAAM+J,YAC3BlK,EACAyG,EAAQzH,KAAKf,KAAM+B,EAAQ0G,OAAMrG,EAAW4B,IAG7CR,EAWT,SAASqK,EAAcpF,EAAM5F,GAE3B,IAAI/B,EAAIuE,EAAIyI,MAAMjL,GACdkL,EAAUC,EAAalN,GACvBkD,EAASiK,EAAYjO,KAAKkO,OAAOzF,EAAK1G,SAC1C,GAAwC,IAApCwC,OAAO4J,KAAK1F,EAAK1G,QAAQf,QAAgB+M,IAAY/J,EAAQ,CAC/D,IAAIoK,EAAKjK,EAAY4J,GACjBnF,EAAS5I,KAAKsD,MAAM8K,GACxB,GAAqB,iBAAVxF,EACT,OAuBN,SAA0BH,EAAM5F,EAAKwL,GAEnC,IAAIT,EAAMC,EAAc9M,KAAKf,KAAMyI,EAAM5F,GACzC,GAAI+K,EAAK,CACP,IAAI7L,EAAS6L,EAAI7L,OACbiC,EAAS4J,EAAI5J,OACjByE,EAAOmF,EAAInF,KACX,IAAI2F,EAAKpO,KAAKkO,OAAOnM,GAErB,OADIqM,IAAIpK,EAASsK,EAAWtK,EAAQoK,IAC7BG,EAAexN,KAAKf,KAAMqO,EAAWrK,EAAQjC,EAAQ0G,KAhClC1H,KAAKf,KAAMyI,EAAMG,EAAQ9H,GAC5C,GAAI8H,aAAkB8E,EACtB9E,EAAOnG,UAAUzC,KAAK2C,SAASiG,GACpCH,EAAOG,MACF,CAEL,MADAA,EAAS5I,KAAKuD,SAAS6K,cACDV,GAMpB,OAJA,GADK9E,EAAOnG,UAAUzC,KAAK2C,SAASiG,GAChCwF,GAAMjK,EAAYtB,GACpB,MAAO,CAAEd,OAAQ6G,EAAQH,KAAMA,EAAMzE,OAAQA,GAC/CyE,EAAOG,EAKX,IAAKH,EAAK1G,OAAQ,OAClBiC,EAASiK,EAAYjO,KAAKkO,OAAOzF,EAAK1G,SAExC,OAAOwM,EAAexN,KAAKf,KAAMc,EAAGkD,EAAQyE,EAAK1G,OAAQ0G,IAtF3D/I,EAAOD,QAAUoE,GAETM,YAAcA,EACtBN,EAAQO,SAAW6J,EACnBpK,EAAQK,IAAMoK,EACdzK,EAAQ2K,IA0NR,SAAoBzM,GAClB,IAAI0M,EAAWtK,EAAYnE,KAAKkO,OAAOnM,IACnC2M,EAAU,CAACC,GAAIF,GACfG,EAAY,CAACD,GAAIV,EAAYQ,GAAU,IACvC/F,EAAY,GACZ3I,EAAOC,KAgCX,OA9BA2N,EAAS5L,EAAQ,CAAC8M,SAAS,GAAO,SAASzL,EAAK0L,EAASC,EAAYC,EAAeC,EAAezC,EAAc0C,GAC/G,GAAgB,KAAZJ,EAAJ,CACA,IAAIV,EAAKrO,EAAKmO,OAAO9K,GACjBY,EAAS0K,EAAQM,GACjB5K,EAAWwK,EAAUI,GAAiB,IAAMC,EAIhD,QAHiB7M,IAAb8M,IACF9K,GAAY,KAA0B,iBAAZ8K,EAAuBA,EAAWlK,EAAKmK,eAAeD,KAEjE,iBAANd,EAAgB,CACzBA,EAAKpK,EAASG,EAAYH,EAASqB,EAAIxB,QAAQG,EAAQoK,GAAMA,GAE7D,IAAIxF,EAAS7I,EAAKuD,MAAM8K,GAExB,GADqB,iBAAVxF,IAAoBA,EAAS7I,EAAKuD,MAAMsF,IAC/CA,GAAUA,EAAO7G,QACnB,IAAKuG,EAAMlF,EAAKwF,EAAO7G,QACrB,MAAM,IAAInB,MAAM,OAASwN,EAAK,2CAC3B,GAAIA,GAAMjK,EAAYC,GAC3B,GAAa,KAATgK,EAAG,GAAW,CAChB,GAAI1F,EAAU0F,KAAQ9F,EAAMlF,EAAKsF,EAAU0F,IACzC,MAAM,IAAIxN,MAAM,OAASwN,EAAK,sCAChC1F,EAAU0F,GAAMhL,OAEhBrD,EAAKuD,MAAM8K,GAAMhK,EAIvBsK,EAAQI,GAAW9K,EACnB4K,EAAUE,GAAW1K,KAGhBsE,GA9PT7E,EAAQmI,UAAYA,EACpBnI,EAAQ9B,OAAS8L,EAkGjB,IAAIuB,EAAuBpK,EAAKqK,OAAO,CAAC,aAAc,oBAAqB,OAAQ,eAAgB,gBAEnG,SAASd,EAAeF,EAAWrK,EAAQjC,EAAQ0G,GAGjD,GADA4F,EAAUiB,SAAWjB,EAAUiB,UAAY,GACN,KAAjCjB,EAAUiB,SAASC,MAAM,EAAE,GAA/B,CAGA,IAFA,IAAIC,EAAQnB,EAAUiB,SAAS5H,MAAM,KAE5BnH,EAAI,EAAGA,EAAIiP,EAAMxO,OAAQT,IAAK,CACrC,IAUUoD,EACAiK,EAJNQ,EAPAqB,EAAOD,EAAMjP,GACjB,GAAIkP,EAAM,CAGR,QAAerN,KADfL,EAASA,EADT0N,EAAOzK,EAAK0K,iBAAiBD,KAEH,MAErBL,EAAqBK,MACxBrB,EAAKpO,KAAKkO,OAAOnM,MACTiC,EAASsK,EAAWtK,EAAQoK,IAChCrM,EAAO4B,OACLA,EAAO2K,EAAWtK,EAAQjC,EAAO4B,OACjCiK,EAAMC,EAAc9M,KAAKf,KAAMyI,EAAM9E,MAEvC5B,EAAS6L,EAAI7L,OACb0G,EAAOmF,EAAInF,KACXzE,EAAS4J,EAAI5J,WAMvB,YAAe5B,IAAXL,GAAwBA,IAAW0G,EAAK1G,OACnC,CAAEA,OAAQA,EAAQ0G,KAAMA,EAAMzE,OAAQA,QAD/C,GAKF,IAAI2L,EAAiB3K,EAAKqK,OAAO,CAC/B,OAAQ,SAAU,UAClB,YAAa,YACb,gBAAiB,gBACjB,WAAY,WACZ,UAAW,UACX,cAAe,aACf,WAAY,SAEd,SAASrD,EAAUjK,EAAQ6N,GACzB,OAAc,IAAVA,SACUxN,IAAVwN,IAAiC,IAAVA,EAK7B,SAASC,EAAW9N,GAClB,IAAI+N,EACJ,GAAIC,MAAMC,QAAQjO,IAChB,IAAK,IAAIxB,EAAE,EAAGA,EAAEwB,EAAOf,OAAQT,IAE7B,GAAmB,iBADnBuP,EAAO/N,EAAOxB,MACkBsP,EAAWC,GAAO,OAAO,OAG3D,IAAK,IAAIxO,KAAOS,EAAQ,CACtB,GAAW,QAAPT,EAAe,OAAO,EAE1B,GAAmB,iBADnBwO,EAAO/N,EAAOT,MACkBuO,EAAWC,GAAO,OAAO,EAG7D,OAAO,EAnB2CD,CAAW9N,GACpD6N,EAsBX,SAASK,EAAUlO,GACjB,IAAe+N,EAAXI,EAAQ,EACZ,GAAIH,MAAMC,QAAQjO,IAChB,IAAK,IAAIxB,EAAE,EAAGA,EAAEwB,EAAOf,OAAQT,IAG7B,GADmB,iBADnBuP,EAAO/N,EAAOxB,MACe2P,GAASD,EAAUH,IAC5CI,GAASC,EAAAA,EAAU,OAAOA,EAAAA,OAGhC,IAAK,IAAI7O,KAAOS,EAAQ,CACtB,GAAW,QAAPT,EAAe,OAAO6O,EAAAA,EAC1B,GAAIR,EAAerO,GACjB4O,SAIA,GADmB,iBADnBJ,EAAO/N,EAAOT,MACe4O,GAASD,EAAUH,GAAQ,GACpDI,GAASC,EAAAA,EAAU,OAAOA,EAAAA,EAIpC,OAAOD,EA1CgBD,CAAUlO,IAAW6N,OAAvC,GA8CP,SAAS3B,EAAYG,EAAIgC,GAGvB,OAFkB,IAAdA,IAAqBhC,EAAKjK,EAAYiK,IAEnCJ,EADC3I,EAAIyI,MAAMM,IAKpB,SAASJ,EAAalN,GACpB,OAAOuE,EAAIgL,UAAUvP,GAAG4G,MAAM,KAAK,GAAK,IAI1C,IAAI4I,EAAsB,QAC1B,SAASnM,EAAYiK,GACnB,OAAOA,EAAKA,EAAGmC,QAAQD,EAAqB,IAAM,GAIpD,SAAShC,EAAWtK,EAAQoK,GAE1B,OADAA,EAAKjK,EAAYiK,GACV/I,EAAIxB,QAAQG,EAAQoK,KA6C3B,CAACoC,eAAe,EAAExI,SAAS,GAAGuF,kBAAkB,GAAGkD,uBAAuB,GAAGC,SAAS,KAAKC,EAAE,CAAC,SAASlQ,EAAQf,EAAOD,gBAGxH,IAAImR,EAAcnQ,EAAQ,YACtB4O,EAAS5O,EAAQ,UAAU4O,OAE/B3P,EAAOD,QAAU,WACf,IAAIiK,EAAQ,CACV,CAAEmH,KAAM,SACNC,MAAO,CAAE,CAAEC,QAAW,CAAC,qBACd,CAAEC,QAAW,CAAC,qBAAuB,aAAc,WAC9D,CAAEH,KAAM,SACNC,MAAO,CAAE,YAAa,YAAa,UAAW,WAChD,CAAED,KAAM,QACNC,MAAO,CAAE,WAAY,WAAY,QAAS,WAAY,gBACxD,CAAED,KAAM,SACNC,MAAO,CAAE,gBAAiB,gBAAiB,WAAY,eAAgB,gBAC9D,CAAEG,WAAc,CAAC,uBAAwB,wBACpD,CAAEH,MAAO,CAAE,OAAQ,QAAS,OAAQ,MAAO,QAAS,QAAS,QAAS,QAGpEI,EAAM,CAAE,OAAQ,YA4CpB,OAnCAxH,EAAMyH,IAAM9B,EAAO6B,GACnBxH,EAAM0H,MAAQ/B,EAFF,CAAE,SAAU,UAAW,SAAU,QAAS,SAAU,UAAW,SAI3E3F,EAAM2H,QAAQ,SAAUC,GACtBA,EAAMR,MAAQQ,EAAMR,MAAMS,IAAI,SAAUxE,GACtC,IAEMzL,EACJkQ,EAaF,MAfsB,iBAAXzE,IAETyE,EAAezE,EADXzL,EAAMiD,OAAO4J,KAAKpB,GAAS,IAE/BA,EAAUzL,EACVkQ,EAAaH,QAAQ,SAAUI,GAC7BP,EAAIQ,KAAKD,GACT/H,EAAMyH,IAAIM,IAAK,KAGnBP,EAAIQ,KAAK3E,GACErD,EAAMyH,IAAIpE,GAAW,CAC9BA,QAASA,EACTlM,KAAM+P,EAAY7D,GAClB4E,WAAYH,KAKhB9H,EAAMyH,IAAIS,SAAW,CACnB7E,QAAS,WACTlM,KAAM+P,EAAYgB,UAGhBN,EAAMT,OAAMnH,EAAM0H,MAAME,EAAMT,MAAQS,KAG5C5H,EAAMmI,SAAWxC,EAAO6B,EAAIY,OAxCb,CACb,UAAW,MAAO,KAAM,QAAS,SAAU,QAC3C,cAAe,UAAW,cAC1B,WAAY,WAAY,YACxB,mBAAoB,kBACpB,kBAAmB,OAAQ,UAoC7BpI,EAAMqI,OAAS,GAERrI,IAGP,CAACsI,WAAW,GAAGhK,SAAS,KAAKiK,EAAE,CAAC,SAASxR,EAAQf,EAAOD,gBAG1D,IAAIuF,EAAOvE,EAAQ,UAEnBf,EAAOD,QAEP,SAAsByS,GACpBlN,EAAKc,KAAKoM,EAAKlS,QAGf,CAACgI,SAAS,KAAKmK,EAAE,CAAC,SAAS1R,EAAQf,EAAOD,gBAK5CC,EAAOD,QAAU,SAAoBuG,GAKnC,IAJA,IAGIzE,EAHAP,EAAS,EACToR,EAAMpM,EAAIhF,OACVqR,EAAM,EAEHA,EAAMD,GACXpR,IAEa,QADbO,EAAQyE,EAAIsM,WAAWD,OACA9Q,GAAS,OAAU8Q,EAAMD,GAGtB,QAAX,OADb7Q,EAAQyE,EAAIsM,WAAWD,MACSA,IAGpC,OAAOrR,IAGP,IAAIuR,GAAG,CAAC,SAAS9R,EAAQf,EAAOD,gBAqClC,SAAS+S,EAAcC,EAAUC,EAAMC,EAAeC,GACpD,IAAIC,EAAQD,EAAS,QAAU,QAC3BE,EAAMF,EAAS,OAAS,OACxBG,EAAKH,EAAS,IAAM,GACpBI,EAAMJ,EAAS,GAAK,IACxB,OAAQH,GACN,IAAK,OAAQ,OAAOC,EAAOG,EAAQ,OACnC,IAAK,QAAS,OAAOE,EAAK,iBAAmBL,EAAO,IACpD,IAAK,SAAU,MAAO,IAAMK,EAAKL,EAAOI,EAClB,UAAYJ,EAAOG,EAAQ,WAAaC,EACxCE,EAAM,iBAAmBN,EAAO,KACtD,IAAK,UAAW,MAAO,WAAaA,EAAOG,EAAQ,WAAaC,EACzCE,EAAM,IAAMN,EAAO,QACnBI,EAAMJ,EAAOG,EAAQH,GACpBC,EAAiBG,EAAMC,EAAK,YAAcL,EAAO,IAAO,IAAM,IACtF,IAAK,SAAU,MAAO,WAAaA,EAAOG,EAAQ,IAAMJ,EAAW,KAC5CE,EAAiBG,EAAMC,EAAK,YAAcL,EAAO,IAAO,IAAM,IACrF,QAAS,MAAO,UAAYA,EAAOG,EAAQ,IAAMJ,EAAW,KAlDhE/S,EAAOD,QAAU,CACfqG,KAyBF,SAAcxF,EAAG2S,GAEf,IAAK,IAAI3R,KADT2R,EAAKA,GAAM,GACK3S,EAAG2S,EAAG3R,GAAOhB,EAAEgB,GAC/B,OAAO2R,GA3BPT,cAAeA,EACfU,eAoDF,SAAwBC,EAAWT,EAAMC,GACvC,CAAA,GACO,IADCQ,EAAUnS,OACR,OAAOwR,EAAcW,EAAU,GAAIT,EAAMC,GAAe,GAE9D,IAUStS,EAVLQ,EAAO,GACPuQ,EAAQ/B,EAAO8D,GASnB,IAAS9S,KARL+Q,EAAMgC,OAAShC,EAAMiC,SACvBxS,EAAOuQ,EAAMkC,KAAO,IAAK,KAAOZ,EAAO,OACvC7R,GAAQ,UAAY6R,EAAO,wBACpBtB,EAAMkC,YACNlC,EAAMgC,aACNhC,EAAMiC,QAEXjC,EAAMmC,eAAenC,EAAMoC,QACjBpC,EACZvQ,IAASA,EAAO,OAAS,IAAO2R,EAAcnS,EAAGqS,EAAMC,GAAe,GAExE,OAAO9R,IApEX4S,cA0EF,SAAuBC,EAAmBP,GACxC,GAAIpD,MAAMC,QAAQmD,GAAY,CAE5B,IADA,IAAI/B,EAAQ,GACH7Q,EAAE,EAAGA,EAAE4S,EAAUnS,OAAQT,IAAK,CACrC,IAAIF,EAAI8S,EAAU5S,IACdoT,EAAgBtT,IACW,UAAtBqT,GAAuC,UAANrT,KADlB+Q,EAAMA,EAAMpQ,QAAUX,GAGhD,GAAI+Q,EAAMpQ,OAAQ,OAAOoQ,MACpB,CAAA,GAAIuC,EAAgBR,GACzB,MAAO,CAACA,GACH,GAA0B,UAAtBO,GAA+C,UAAdP,EAC1C,MAAO,CAAC,WArFV9D,OAAQA,EACRuE,YAAaA,EACbC,aAAcA,EACdvL,MAAO7H,EAAQ,mBACf4H,WAAY5H,EAAQ,gBACpBqT,cAgHF,SAAuB9N,EAAK+N,GAC1BA,GAAW,SACX,IAAI9N,EAAUD,EAAIE,MAAM,IAAI6B,OAAOgM,EAAS,MAC5C,OAAO9N,EAAUA,EAAQjF,OAAS,GAlHlCgT,WAsHF,SAAoBhO,EAAK+N,EAASE,GAGhC,OAFAF,GAAW,WACXE,EAAOA,EAAK1D,QAAQ,MAAO,QACpBvK,EAAIuK,QAAQ,IAAIxI,OAAOgM,EAAS,KAAME,EAAO,OAxHpDC,eA4HF,SAAwBnS,EAAQ+O,GAC9B,GAAqB,kBAAV/O,EAAqB,OAAQA,EACxC,IAAK,IAAIT,KAAOS,EAAQ,GAAI+O,EAAMxP,GAAM,OAAO,GA7H/C6S,qBAiIF,SAA8BpS,EAAQ+O,EAAOsD,GAC3C,GAAqB,kBAAVrS,EAAqB,OAAQA,GAA2B,OAAjBqS,EAClD,IAAK,IAAI9S,KAAOS,EAAQ,GAAIT,GAAO8S,GAAiBtD,EAAMxP,GAAM,OAAO,GAlIvE+S,mBAsIF,SAA4BtS,EAAQ+O,GAClC,GAAqB,kBAAV/O,EAAqB,OAChC,IAAK,IAAIT,KAAOS,EAAQ,IAAK+O,EAAMxP,GAAM,OAAOA,GAvIhD+K,eAAgBA,EAChBiI,YA+IF,SAAqBC,EAAaN,EAAMO,EAAcC,GAIpD,OAAOC,EAAUH,EAHNC,EACG,SAAaP,GAAQQ,EAAW,GAAK,8CACpCA,EAAW,SAAaR,EAAO,SAAa,YAAiBA,EAAO,cAjJnFU,QAsJF,SAAiBJ,EAAaK,EAAMJ,GAClC,IAAIK,EACUxI,EADHmI,EACkB,IAAMM,EAAkBF,GACxBhB,EAAYgB,IACzC,OAAOF,EAAUH,EAAaM,IAzJ9BE,QA+JF,SAAiBC,EAAOC,EAAKC,GAC3B,IAAIC,EAAIC,EAAa1C,EAAMzM,EAC3B,GAAc,KAAV+O,EAAc,MAAO,WACzB,GAAgB,KAAZA,EAAM,GAAW,CACnB,IAAKvP,EAAaoC,KAAKmN,GAAQ,MAAM,IAAIpU,MAAM,yBAA2BoU,GAC1EI,EAAcJ,EACdtC,EAAO,eACF,CAEL,KADAzM,EAAU+O,EAAM9O,MAAMP,IACR,MAAM,IAAI/E,MAAM,yBAA2BoU,GAGzD,GAFAG,GAAMlP,EAAQ,GAEK,MADnBmP,EAAcnP,EAAQ,IACE,CACtB,GAAUgP,GAANE,EAAW,MAAM,IAAIvU,MAAM,gCAAkCuU,EAAK,gCAAkCF,GACxG,OAAOC,EAAMD,EAAME,GAGrB,GAASF,EAALE,EAAU,MAAM,IAAIvU,MAAM,sBAAwBuU,EAAK,gCAAkCF,GAE7F,GADAvC,EAAO,QAAWuC,EAAME,GAAO,KAC1BC,EAAa,OAAO1C,EAK3B,IAFA,IAAIuB,EAAOvB,EACP2C,EAAWD,EAAY1N,MAAM,KACxBnH,EAAE,EAAGA,EAAE8U,EAASrU,OAAQT,IAAK,CACpC,IAAI+U,EAAUD,EAAS9U,GACnB+U,IACF5C,GAAQkB,EAAY2B,EAAoBD,IACxCrB,GAAQ,OAASvB,GAGrB,OAAOuB,GA7LPvE,iBAuMF,SAA0B1J,GACxB,OAAOuP,EAAoBC,mBAAmBxP,KAvM9CuP,oBAAqBA,EACrBpG,eA0MF,SAAwBnJ,GACtB,OAAOyP,mBAAmBX,EAAkB9O,KA1M5C8O,kBAAmBA,GAuDrB,IAAInB,EAAkBtE,EAAO,CAAE,SAAU,SAAU,UAAW,UAAW,SAkBzE,SAASA,EAAOjC,GAEd,IADA,IAAIsI,EAAO,GACFnV,EAAE,EAAGA,EAAE6M,EAAIpM,OAAQT,IAAKmV,EAAKtI,EAAI7M,KAAM,EAChD,OAAOmV,EAIT,IAAIC,EAAa,wBACbC,EAAe,QACnB,SAAShC,EAAYtS,GACnB,MAAqB,iBAAPA,EACJ,IAAMA,EAAM,IACZqU,EAAW9N,KAAKvG,GACd,IAAMA,EACN,KAAOuS,EAAavS,GAAO,KAIzC,SAASuS,EAAa7N,GACpB,OAAOA,EAAIuK,QAAQqF,EAAc,QACtBrF,QAAQ,MAAO,OACfA,QAAQ,MAAO,OACfA,QAAQ,MAAO,OACfA,QAAQ,MAAO,OAoC5B,SAASlE,EAAerG,GACtB,MAAO,IAAO6N,EAAa7N,GAAO,IAoBpC,IAAIP,EAAe,sBACfE,EAAwB,mCAoC5B,SAAS+O,EAAW/T,EAAGkV,GACrB,MAAS,MAALlV,EAAkBkV,GACdlV,EAAI,MAAQkV,GAAGtF,QAAQ,iBAAkB,MAcnD,SAASuE,EAAkB9O,GACzB,OAAOA,EAAIuK,QAAQ,KAAM,MAAMA,QAAQ,MAAO,MAIhD,SAASgF,EAAoBvP,GAC3B,OAAOA,EAAIuK,QAAQ,MAAO,KAAKA,QAAQ,MAAO,OAG9C,CAACuF,eAAe,EAAEvI,kBAAkB,KAAKwI,GAAG,CAAC,SAAStV,EAAQf,EAAOD,gBAGvE,IAAIuW,EAAW,CACb,aACA,UACA,mBACA,UACA,mBACA,YACA,YACA,UACA,kBACA,WACA,WACA,cACA,gBACA,gBACA,WACA,uBACA,OACA,SACA,SAGFtW,EAAOD,QAAU,SAAUwW,EAAYC,GACrC,IAAK,IAAI3V,EAAE,EAAGA,EAAE2V,EAAqBlV,OAAQT,IAAK,CAChD0V,EAAaE,KAAKrI,MAAMqI,KAAKC,UAAUH,IAIvC,IAHA,IAAIZ,EAAWa,EAAqB3V,GAAGmH,MAAM,KACzCmK,EAAWoE,EAEVI,EAAE,EAAGA,EAAEhB,EAASrU,OAAQqV,IAC3BxE,EAAWA,EAASwD,EAASgB,IAE/B,IAAKA,EAAE,EAAGA,EAAEL,EAAShV,OAAQqV,IAAK,CAChC,IAAI/U,EAAM0U,EAASK,GACftU,EAAS8P,EAASvQ,GAClBS,IACF8P,EAASvQ,GAAO,CACdgV,MAAO,CACLvU,EACA,CAAE4B,KAAM,sFAOlB,OAAOsS,IAGP,IAAIM,GAAG,CAAC,SAAS9V,EAAQf,EAAOD,gBAGlC,IAAIwW,EAAaxV,EAAQ,oCAEzBf,EAAOD,QAAU,CACf+W,IAAK,4EACLC,YAAa,CACXC,YAAaT,EAAWQ,YAAYC,aAEtC7F,KAAM,SACNhE,aAAc,CACZ9K,OAAQ,CAAC,YACTiT,MAAO,CAAC,YACR2B,WAAY,CAAC,UACbC,MAAO,CAACC,IAAK,CAACC,SAAU,CAAC,YAE3B7F,WAAY,CACVJ,KAAMoF,EAAWhF,WAAWJ,KAC5B9O,OAAQ,CAAC8O,KAAM,WACf8F,WAAY,CAAC9F,KAAM,WACnBhE,aAAc,CACZgE,KAAM,QACNkG,MAAO,CAAClG,KAAM,WAEhBoF,WAAY,CAACpF,KAAM,UACnBmG,UAAW,CAACnG,KAAM,WAClB+F,MAAO,CAAC/F,KAAM,WACdmE,MAAO,CAACnE,KAAM,WACdoG,MAAO,CAACpG,KAAM,WACdlM,OAAQ,CACN2R,MAAO,CACL,CAACzF,KAAM,WACP,CAACqG,MAAO,aAMd,CAACC,mCAAmC,KAAKC,GAAG,CAAC,SAAS3W,EAAQf,EAAOD,gBAEvEC,EAAOD,QAAU,SAAyBgN,EAAI4K,GAC5C,IA+BMC,EACFC,EACAC,EA+CEC,EACFC,EA2BIC,EASJC,EArHAC,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UAEzBrD,EAAQ,QAAUgD,GAAY,IAC9BM,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEbgV,EAAqB,WAAZpB,EACXqB,EAAoBD,EAAS,mBAAqB,mBAClDE,EAAclM,EAAG1K,OAAO2W,GACxBE,EAAcnM,EAAG9D,KAAKqM,OAAS2D,GAAeA,EAAY3D,MAC1D6D,EAAMJ,EAAS,IAAM,IACrBK,EAASL,EAAS,IAAM,IACxBM,OAAgB3W,EAClB,IAAMkW,GAA6B,iBAAX7U,QAAmCrB,IAAZqB,EAC7C,MAAM,IAAI7C,MAAMyW,EAAW,mBAE7B,IAAMuB,QAA+BxW,IAAhBuW,GAAmD,iBAAfA,GAAiD,kBAAfA,EACzF,MAAM,IAAI/X,MAAM8X,EAAoB,8BAElCE,GAIAnB,EAAgB,eAAiBK,EAEjCJ,EAAS,QADTC,EAAU,KAAOG,GACY,OAC/BD,GAAO,kBAAoB,EAAS,OANhCP,EAAmB7K,EAAGzH,KAAK+P,QAAQ4D,EAAY3D,MAAOgD,EAAUvL,EAAG+L,cAMN,KAG7DO,EAAgBL,GAChBd,EAAaA,GAAc,IACpBlG,KAHXmG,GAAO,SAPLN,EAAa,YAAcO,GAOG,UAN9BN,EAAY,WAAaM,GAM8B,cADzDR,EAAmB,aAAeQ,GAC2D,SAAW,EAAc,oBAAwB,EAAc,sBAA0B,EAAc,oBAIpMD,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,iBAAoBkB,GAAiB,mBAAqB,oCAA0CtM,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kBACjK,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAAmB,EAAsB,wBAE9CpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,gBACHS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,IAAM,EAAc,qBAAyB,EAAe,MAAQ,EAAiB,qBAAuB,EAAqB,IAAM,EAAQ,KAAO,EAAiB,OAAS,EAAU,IAAM,EAAW,KAAO,EAAqB,MAAQ,EAAU,IAAM,EAAW,IAAM,EAAiB,WAAa,EAAe,MAAQ,EAAqB,gBAAkB,EAAU,IAAM,EAAW,KAAO,EAAiB,MAAQ,EAAU,IAAM,EAAW,IAAM,EAAiB,SAAW,EAAU,QAAU,EAAU,aAAe,EAAS,MAAQ,EAAe,OAAU,EAAQ,QAAY,EAAQ,YAC9kBzV,IAAZqB,IAEF0U,EAAiB1L,EAAGhC,cAAgB,KADpCsO,EAAgBL,GAEhBH,EAAejB,EACfgB,EAAUM,KAIVlB,EAASmB,GADPpB,EAAsC,iBAAfkB,IAENL,GACfX,EAAU,IAAOD,EAAS,IAC9BG,GAAO,SACHS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,MAAQ,EAAiB,qBAAuB,EAAgB,IAAM,EAAQ,KAAO,EAAiB,MAAQ,EAAU,IAAM,EAAW,KAAO,EAAgB,MAAQ,EAAU,IAAM,EAAW,IAAM,EAAiB,SAAW,EAAU,QAAU,EAAU,SAEtQJ,QAA6BrV,IAAZqB,GACnB8T,GAAa,EAEbY,EAAiB1L,EAAGhC,cAAgB,KADpCsO,EAAgBL,GAEhBH,EAAeI,EACfG,GAAU,MAENrB,IAAec,EAAee,KAAKb,EAAS,MAAQ,OAAOE,EAAalV,IACxEkV,MAAiBlB,GAAgBc,IACnChB,GAAa,EAEbY,EAAiB1L,EAAGhC,cAAgB,KADpCsO,EAAgBL,GAEhBI,GAAU,MAEVvB,GAAa,EACbG,GAAU,MAGVC,EAAU,IAAOD,EAAS,IAC9BG,GAAO,SACHS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,IAAM,EAAU,IAAM,EAAW,IAAM,EAAiB,OAAS,EAAU,QAAU,EAAU,SAG1GkB,EAAgBA,GAAiB1B,GAC7BO,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,iBAAoBkB,GAAiB,UAAY,oCAA0CtM,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,4BAA8B,EAAY,YAAc,EAAiB,gBAAkB,EAAe,OAClQ,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,0BAA6B,EAAW,IAE7CA,GADES,EACK,OAAU,EAEL,EAAiB,KAG7B7L,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAK,EAEdT,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EAgBZ,OAfAA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,MACHO,IACFP,GAAO,YAEFA,IAGP,IAAI0B,GAAG,CAAC,SAAS9Y,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA8BgN,EAAI4K,GACjD,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UAEzBrD,EAAQ,QAAUgD,GAAY,IAC9BM,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEjB,IAAM6U,GAA6B,iBAAX7U,EACtB,MAAM,IAAI7C,MAAMyW,EAAW,mBAG7BQ,GAAO,QACHS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAGhF,IAAIkB,EAAgB1B,EAChBO,EAAaA,GAAc,GAC/BA,EAAWlG,KAHXmG,GAAO,IAAM,EAAU,YALD,YAAZR,EAAyB,IAAM,KAKG,IAAM,EAAiB,QAInEQ,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,iBAAoBkB,GAAiB,eAAiB,oCAA0CtM,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,uBAAyB,EAAiB,OACvM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gCAELA,GADc,YAAZR,EACK,OAEA,QAETQ,GAAO,SAELA,GADES,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEdT,GAAO,YAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAK,EAEdT,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,KACHO,IACFP,GAAO,YAEFA,IAGP,IAAI2B,GAAG,CAAC,SAAS/Y,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA+BgN,EAAI4K,GAClD,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UAEzBrD,EAAQ,QAAUgD,GAAY,IAC9BM,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEjB,IAAM6U,GAA6B,iBAAX7U,EACtB,MAAM,IAAI7C,MAAMyW,EAAW,mBAG7BQ,GAAO,QACHS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAG9EA,IADsB,IAApBpL,EAAG9D,KAAK8Q,QACH,IAAM,EAAU,WAEhB,eAAiB,EAAU,KAGpC,IAAIV,EAAgB1B,EAChBO,EAAaA,GAAc,GAC/BA,EAAWlG,KAHXmG,GAAO,KAVe,aAAZR,EAA0B,IAAM,KAUrB,IAAM,EAAiB,QAI5CQ,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,iBAAoBkB,GAAiB,gBAAkB,oCAA0CtM,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,uBAAyB,EAAiB,OACxM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,8BAELA,GADc,aAAZR,EACK,SAEA,UAETQ,GAAO,SAELA,GADES,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEdT,GAAO,iBAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAK,EAEdT,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,KACHO,IACFP,GAAO,YAEFA,IAGP,IAAI6B,GAAG,CAAC,SAASjZ,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAmCgN,EAAI4K,GACtD,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UAEzBrD,EAAQ,QAAUgD,GAAY,IAC9BM,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEjB,IAAM6U,GAA6B,iBAAX7U,EACtB,MAAM,IAAI7C,MAAMyW,EAAW,mBAG7BQ,GAAO,QACHS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAGhF,IAAIkB,EAAgB1B,EAChBO,EAAaA,GAAc,GAC/BA,EAAWlG,KAHXmG,GAAO,gBAAkB,EAAU,aALb,iBAAZR,EAA8B,IAAM,KAKW,IAAM,EAAiB,QAIhFQ,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,iBAAoBkB,GAAiB,oBAAsB,oCAA0CtM,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,uBAAyB,EAAiB,OAC5M,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gCAELA,GADc,iBAAZR,EACK,OAEA,QAETQ,GAAO,SAELA,GADES,EACK,OAAU,EAAiB,OAE3B,GAAK,EAEdT,GAAO,iBAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAK,EAEdT,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,KACHO,IACFP,GAAO,YAEFA,IAGP,IAAI8B,GAAG,CAAC,SAASlZ,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAwBgN,EAAI4K,GAC3C,IAAIQ,EAAM,IACNpU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBuB,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACnBoN,EAAiB,GACrBD,EAAI7B,QACJ,IAAI+B,EAAa,QAAUF,EAAI7B,MAC3BgC,EAAiBH,EAAI5V,OACvBgW,GAAmB,EACjBC,EAAOxW,EACX,GAAIwW,EAGF,IAFA,IAAIC,EAAMC,GAAM,EACdC,EAAKH,EAAKjZ,OAAS,EACdmZ,EAAKC,GACVF,EAAOD,EAAKE,GAAM,IACb1N,EAAG9D,KAAK0R,eAAiC,iBAARH,GAA+C,EAA3B3V,OAAO4J,KAAK+L,GAAMlZ,SAAwB,IAATkZ,EAAiBzN,EAAGzH,KAAKkP,eAAegG,EAAMzN,EAAG/C,MAAMyH,QAChJ6I,GAAmB,EACnBJ,EAAI7X,OAASmY,EACbN,EAAIpP,WAAa0N,EAAc,IAAMiC,EAAK,IAC1CP,EAAInP,cAAgB0N,EAAiB,IAAMgC,EAC3CtC,GAAO,KAAQpL,EAAGhK,SAASmX,GAAQ,IACnCA,EAAI5V,OAAS+V,EACT3B,IACFP,GAAO,QAAU,EAAe,OAChCgC,GAAkB,MAY1B,OAPIzB,IAEAP,GADEmC,EACK,gBAEA,IAAOH,EAAetK,MAAM,GAAI,GAAM,KAG1CsI,IAGP,IAAIyC,GAAG,CAAC,SAAS7Z,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAwBgN,EAAI4K,GAC3C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnB0C,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACnBoN,EAAiB,GACrBD,EAAI7B,QACJ,IAAI+B,EAAa,QAAUF,EAAI7B,MAI/B,GAHqBtU,EAAQqJ,MAAM,SAASoN,GAC1C,OAAQzN,EAAG9D,KAAK0R,eAAiC,iBAARH,GAA+C,EAA3B3V,OAAO4J,KAAK+L,GAAMlZ,SAAwB,IAATkZ,EAAiBzN,EAAGzH,KAAKkP,eAAegG,EAAMzN,EAAG/C,MAAMyH,OAEnI,CAClB,IAAI4I,EAAiBH,EAAI5V,OACzB6T,GAAO,QAAU,EAAU,kBAAoB,EAAW,cAC1D,IAAI4C,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACvC,IAAIY,EAAOxW,EACX,GAAIwW,EAGF,IAFA,IAAIC,EAAMC,GAAM,EACdC,EAAKH,EAAKjZ,OAAS,EACdmZ,EAAKC,GACVF,EAAOD,EAAKE,GAAM,GAClBP,EAAI7X,OAASmY,EACbN,EAAIpP,WAAa0N,EAAc,IAAMiC,EAAK,IAC1CP,EAAInP,cAAgB0N,EAAiB,IAAMgC,EAC3CtC,GAAO,KAAQpL,EAAGhK,SAASmX,GAAQ,IACnCA,EAAI5V,OAAS+V,EACblC,GAAO,IAAM,EAAW,MAAQ,EAAW,OAAS,EAAe,UAAY,EAAW,OAC1FgC,GAAkB,IAGtBpN,EAAG4M,cAAgBO,EAAIP,cAAgBoB,EACvC5C,GAAO,IAAM,EAAmB,SAAW,EAAW,sBAC9B,IAApBpL,EAAGuM,cACLnB,GAAO,sDAAyEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kBACtI,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,oDAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACFpL,EAAG4M,eAAiBjB,IAGrBP,GADEpL,EAAGwK,MACE,wCAEA,8CAGXY,GAAO,uBAAyB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,4BACrHpL,EAAG9D,KAAK0P,YACVR,GAAO,YAGLO,IACFP,GAAO,iBAGX,OAAOA,IAGP,IAAI6C,GAAG,CAAC,SAASja,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA0BgN,EAAI4K,GAC7C,IAAIQ,EAAM,IAENM,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAE1CzF,EAAWnF,EAAGzH,KAAKqH,eAHTI,EAAG1K,OAAOsV,IASxB,OALyB,IAArB5K,EAAG9D,KAAKiJ,SACViG,GAAO,gBAAkB,EAAa,KACF,mBAApBpL,EAAG9D,KAAKiJ,WACxBiG,GAAO,wBAA0B,EAAa,KAAQpL,EAAGzH,KAAKqH,eAAe8L,GAAmB,4BAE3FN,IAGP,IAAI8C,GAAG,CAAC,SAASla,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAwBgN,EAAI4K,GAC3C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnBQ,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAE9CsD,IACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,MAKlGF,IACHT,GAAO,cAAgB,EAAS,qBAAuB,EAAgB,KAGzE,IAAID,EAAaA,GAAc,GAC/BA,EAAWlG,KAFXmG,GAAO,OAAS,EAAW,YAAc,EAAU,WAAa,EAAS,WAAa,EAAW,UAGjGA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,sDAAyEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,oCAAsC,EAAS,OACrL,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,8CAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,KACHO,IACFP,GAAO,YAEFA,IAGP,IAAI+C,GAAG,CAAC,SAASna,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA2BgN,EAAI4K,GAC9C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnB0C,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GAEvBmN,EAAI7B,QACJ,IAQM0C,EAOAI,EAEAC,EAjBFhB,EAAa,QAAUF,EAAI7B,MAC3BgD,EAAO,IAAMjD,EACfkD,EAAWpB,EAAI3B,UAAYxL,EAAGwL,UAAY,EAC1CgD,EAAY,OAASD,EACrBjB,EAAiBtN,EAAGzI,OACpBkX,EAAmBzO,EAAG9D,KAAK0R,eAAoC,iBAAX5W,GAAqD,EAA9Bc,OAAO4J,KAAK1K,GAASzC,SAA2B,IAAZyC,EAAoBgJ,EAAGzH,KAAKkP,eAAezQ,EAASgJ,EAAG/C,MAAMyH,KAC9K0G,GAAO,OAAS,EAAU,iBAAmB,EAAW,IACpDqD,GACET,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACvCO,EAAI7X,OAAS0B,EACbmW,EAAIpP,WAAa0N,EACjB0B,EAAInP,cAAgB0N,EACpBN,GAAO,QAAU,EAAe,sBAAwB,EAAS,SAAW,EAAS,MAAQ,EAAU,YAAc,EAAS,SAC9H+B,EAAIlP,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWqQ,EAAMtO,EAAG9D,KAAK6L,cAAc,GAC1EqG,EAAY7F,EAAQ,IAAM+F,EAAO,IACrCnB,EAAIpB,YAAYwC,GAAYD,EACxBD,EAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,EAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,EAAOG,EAAWJ,GAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExEA,GAAO,QAAU,EAAe,eAChCpL,EAAG4M,cAAgBO,EAAIP,cAAgBoB,EACvC5C,GAAO,UAAoC,EAAe,OAE1DA,GAAO,QAAU,EAAU,kBAE7B,IAAID,EAAaA,GAAc,GAC/BA,EAAWlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,yDAA4EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kBACzI,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,8CAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAkBjB,OAdIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,aACHqD,IACFrD,GAAO,cAAgB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,6BAE9GpL,EAAG9D,KAAK0P,YACVR,GAAO,OAEFA,IAGP,IAAIsD,GAAG,CAAC,SAAS1a,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAyBgN,EAAI4K,GAC5C,IAOI0B,EAgBAqC,EAAUC,EAASC,EAAQC,EAAeC,EAvB1C3D,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UAEzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnB0C,EAAQ,SAAW1C,EACnBQ,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEbgY,EAAQzb,KACV0b,EAAc,aAAe5D,EAC7B6D,EAAQF,EAAM7O,WACdiN,EAAiB,GAEnB,GAAIvB,GAAWqD,EAAM3G,MAAO,CAE1B,IAAI4G,EAAkBD,EAAMjP,eAC5BmL,GAAO,QAAU,EAAgB,oBAAuB,EAAa,uBAFrE2D,EAAgB,kBAAoB1D,GAE4E,MAAQ,EAAgB,iBACnI,CAEL,KADAyD,EAAgB9O,EAAG3B,cAAc2Q,EAAOhY,EAASgJ,EAAG1K,OAAQ0K,IACxC,OACpB8L,EAAe,kBAAoBL,EACnCsD,EAAgBD,EAAc1a,KAC9Bua,EAAWO,EAAMnT,QACjB6S,EAAUM,EAAMxP,OAChBmP,EAASK,EAAMxO,MAEjB,IAwBMyM,EAGAE,EAGAW,EAEAK,EAsBAe,EACFC,EAEEC,EA0CAnE,EAeAuB,EAYA6C,EA9HFC,EAAYT,EAAgB,UAC9BrB,EAAK,IAAMrC,EACXoE,EAAW,UAAYpE,EACvBqE,EAAgBR,EAAM1E,MACxB,GAAIkF,IAAkB1P,EAAGwK,MAAO,MAAM,IAAIrW,MAAM,gCAuLhD,OAtLMya,GAAWC,IACfzD,GAAY,EAAc,YAE5BA,GAAO,OAAS,EAAU,iBAAmB,EAAW,IACpDS,GAAWqD,EAAM3G,QACnB6E,GAAkB,IAClBhC,GAAO,QAAU,EAAiB,qBAAuB,EAAW,qBAChE+D,IACF/B,GAAkB,IAClBhC,GAAO,IAAM,EAAW,MAAQ,EAAgB,mBAAqB,EAAiB,UAAY,EAAW,SAG7GwD,EAEAxD,GADE8D,EAAMhF,WACD,IAAO4E,EAAsB,SAAI,IAEjC,IAAM,EAAW,MAASA,EAAsB,SAAI,KAEpDD,GAELzB,EAAiB,IADjBD,EAAMnN,EAAGzH,KAAKc,KAAK2G,IAEnBsL,QACA+B,EAAa,QAAUF,EAAI7B,MAC/B6B,EAAI7X,OAASwZ,EAAc9Y,SAC3BmX,EAAIpP,WAAa,GACbiQ,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACnCyB,EAAQrO,EAAGhK,SAASmX,GAAKrJ,QAAQ,oBAAqBiL,GAC1D/O,EAAG4M,cAAgBO,EAAIP,cAAgBoB,EACvC5C,GAAO,IAAM,KAETD,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,GACNA,GAAO,KAAO,EAAkB,UAE9BA,GADEpL,EAAG9D,KAAKyT,YACH,OAEA,OAGPvE,GADEuD,IAA6B,IAAjBO,EAAM5Z,OACb,MAAQ,EAAU,IAElB,MAAQ,EAAiB,MAAQ,EAAU,qBAAwB0K,EAAa,WAAI,IAE7FoL,GAAO,sBACa,MAAhBpL,EAAG/B,YACLmN,GAAO,MAASpL,EAAY,WAK1BsP,EADJlE,GAAO,OAFHgE,EAAc7D,EAAW,QAAWA,EAAW,GAAM,IAAM,cAEhC,OAD7B8D,EAAsB9D,EAAWvL,EAAG+L,YAAYR,GAAY,sBACC,kBAE/DH,EAAMD,EAAWwB,OACI,IAAjBuC,EAAMhX,QACRkT,GAAO,IAAM,EAAW,MACpBsE,IACFtE,GAAO,UAETA,GAAY,EAAyB,MAInCA,GAFEsE,EAEK,SADPF,EAAY,eAAiBnE,GACE,kBAAoB,EAAW,YAAc,EAAyB,mBAAqB,EAAW,+CAAiD,EAAc,gCAE7L,IAAM,EAAc,YAAc,EAAW,MAAQ,EAAyB,MAIvF6D,EAAM3E,YACRa,GAAO,QAAU,EAAgB,KAAO,EAAU,MAAQ,EAAgB,IAAM,EAAwB,MAE1GA,GAAO,GAAK,EACR8D,EAAM/E,MACJwB,IACFP,GAAO,kBAGTA,GAAO,cACazV,IAAhBuZ,EAAM/E,OACRiB,GAAO,KAELA,GADEyD,EACK,GAAK,EAEA,GAGdzD,GAAO,KAAQ8D,EAAM/E,MAAS,IAGhCmC,EAAgB0C,EAAM1O,SAClB6K,EAAaA,GAAc,IACpBlG,KAHXmG,GAAO,SAKHD,EAAaA,GAAc,IACpBlG,KAFXmG,EAAM,IAGNA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,iBAAoBkB,GAAiB,UAAY,oCAA0CtM,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,0BAA8BsD,EAAa,QAAI,QACvM,IAArBhP,EAAG9D,KAAKsQ,WACVpB,GAAO,8BAAiC4D,EAAa,QAAI,2BAEvDhP,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAWb4C,EAPAnE,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAGnCY,EAAMD,EAAWwB,MACbiC,EACEM,EAAMhX,OACY,QAAhBgX,EAAMhX,SACRkT,GAAO,cAAgB,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,4BAA8B,EAAa,kCAAuCpL,EAAY,UAAI,SAAW,EAAa,gCAAkC,EAAa,kBAAoB,EAAmB,QACzWA,EAAG9D,KAAKuQ,UACVrB,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,QAGY,IAAjB8D,EAAMhX,OACRkT,GAAO,IAAM,EAAoB,KAEjCA,GAAO,QAAU,EAAU,iBAAmB,EAAoB,uBAAyB,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,4BAA8B,EAAa,kCAAuCpL,EAAY,UAAI,SAAW,EAAa,gCAAkC,EAAa,kBAAoB,EAAmB,QAC7aA,EAAG9D,KAAKuQ,UACVrB,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,SAGFyD,GACTzD,GAAO,mBACiB,IAApBpL,EAAGuM,cACLnB,GAAO,iBAAoBkB,GAAiB,UAAY,oCAA0CtM,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,0BAA8BsD,EAAa,QAAI,QACvM,IAArBhP,EAAG9D,KAAKsQ,WACVpB,GAAO,8BAAiC4D,EAAa,QAAI,2BAEvDhP,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACFpL,EAAG4M,eAAiBjB,IAGrBP,GADEpL,EAAGwK,MACE,wCAEA,gDAIU,IAAjB0E,EAAMhX,OACRkT,GAAO,IAAM,EAAoB,KAEjCA,GAAO,sBAAwB,EAAc,wCAA0C,EAAc,mCAAqC,EAAc,yCAA2C,EAAO,IAAM,EAAU,KAAO,EAAO,YAAc,EAAO,aAAe,EAAa,cAAgB,EAAO,UAAY,EAAa,4BAA8B,EAAa,kCAAuCpL,EAAY,UAAI,MAAQ,EAAa,kBAAoB,EAAmB,OACneA,EAAG9D,KAAKuQ,UACVrB,GAAO,IAAM,EAAa,aAAe,EAAiB,KAAO,EAAa,WAAa,EAAU,MAEvGA,GAAO,eAAiB,EAAoB,OAGhDA,GAAO,MACHO,IACFP,GAAO,aAGJA,IAGP,IAAIwE,GAAG,CAAC,SAAS5b,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA+BgN,EAAI4K,GAClD,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BwC,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACnBoN,EAAiB,GACrBD,EAAI7B,QACJ,IAOMuE,EAPFxC,EAAa,QAAUF,EAAI7B,MAC3BwE,EAAc,GAChBC,EAAgB,GAChBC,EAAiBhQ,EAAG9D,KAAK+T,cAC3B,IAAKC,KAAalZ,EAAS,CACR,aAAbkZ,IACAzC,EAAOzW,EAAQkZ,IACfL,EAAQvM,MAAMC,QAAQkK,GAAQsC,EAAgBD,GAC5CI,GAAazC,GAErBrC,GAAO,OAAS,EAAU,aAC1B,IAAI+E,EAAoBnQ,EAAG/B,UAE3B,IAASiS,KADT9E,GAAO,cAAgB,EAAS,IACV2E,EAEpB,IADAF,EAAQE,EAAcG,IACZ3b,OAAQ,CAKhB,GAJA6W,GAAO,SAAW,EAAWpL,EAAGzH,KAAK4O,YAAY+I,GAAc,kBAC3DF,IACF5E,GAAO,4CAA8C,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAa8I,GAAc,OAE1GvE,EAAe,CACjBP,GAAO,SACP,IAAIoC,EAAOqC,EACX,GAAIrC,EAGF,IAFA,IAAkBE,GAAM,EACtBC,EAAKH,EAAKjZ,OAAS,EACdmZ,EAAKC,GAAI,CACdyC,EAAe5C,EAAKE,GAAM,GACtBA,IACFtC,GAAO,QAITA,GAAO,SADLiF,EAAW9H,GADT+H,EAAQtQ,EAAGzH,KAAK4O,YAAYiJ,KAEF,kBAC1BJ,IACF5E,GAAO,8CAAgD,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAagJ,GAAiB,OAEnHhF,GAAO,gBAAkB,EAAS,MAASpL,EAAGzH,KAAKqH,eAAeI,EAAG9D,KAAK6L,aAAeqI,EAAeE,GAAU,OAGtHlF,GAAO,SACP,IAAImF,EAAgB,UAAYlF,EAC9BmF,EAAmB,OAAUD,EAAgB,OAC3CvQ,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAG9D,KAAK6L,aAAe/H,EAAGzH,KAAKsP,YAAYsI,EAAmBI,GAAe,GAAQJ,EAAoB,MAAQI,GAElI,IAAIpF,EAAaA,GAAc,GAC/BA,EAAWlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,6DAAgFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,2BAA+B1L,EAAGzH,KAAK6O,aAAa8I,GAAc,wBAA4B,EAAqB,iBAAqBL,EAAY,OAAI,YAAgB7P,EAAGzH,KAAK6O,aAA6B,GAAhByI,EAAMtb,OAAcsb,EAAM,GAAKA,EAAMrP,KAAK,OAAU,QAC9X,IAArBR,EAAG9D,KAAKsQ,WACVpB,GAAO,4BAELA,GADkB,GAAhByE,EAAMtb,OACD,YAAeyL,EAAGzH,KAAK6O,aAAayI,EAAM,IAE1C,cAAiB7P,EAAGzH,KAAK6O,aAAayI,EAAMrP,KAAK,OAE1D4K,GAAO,kBAAqBpL,EAAGzH,KAAK6O,aAAa8I,GAAc,iBAE7DlQ,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,mFAE9B,CACLY,GAAO,QACP,IAAIsF,EAAOb,EACX,GAAIa,EAGF,IAFA,IAAIN,EAAcO,GAAM,EACtBC,EAAKF,EAAKnc,OAAS,EACdoc,EAAKC,GAAI,CACdR,EAAeM,EAAKC,GAAM,GAC1B,IAAIL,EAAQtQ,EAAGzH,KAAK4O,YAAYiJ,GAC9BI,EAAmBxQ,EAAGzH,KAAK6O,aAAagJ,GACxCC,EAAW9H,EAAQ+H,EACjBtQ,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAGzH,KAAK2P,QAAQiI,EAAmBC,EAAcpQ,EAAG9D,KAAK6L,eAE1EqD,GAAO,SAAW,EAAa,kBAC3B4E,IACF5E,GAAO,8CAAgD,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAagJ,GAAiB,OAEnHhF,GAAO,qBACiB,IAApBpL,EAAGuM,cACLnB,GAAO,6DAAgFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,2BAA+B1L,EAAGzH,KAAK6O,aAAa8I,GAAc,wBAA4B,EAAqB,iBAAqBL,EAAY,OAAI,YAAgB7P,EAAGzH,KAAK6O,aAA6B,GAAhByI,EAAMtb,OAAcsb,EAAM,GAAKA,EAAMrP,KAAK,OAAU,QAC9X,IAArBR,EAAG9D,KAAKsQ,WACVpB,GAAO,4BAELA,GADkB,GAAhByE,EAAMtb,OACD,YAAeyL,EAAGzH,KAAK6O,aAAayI,EAAM,IAE1C,cAAiB7P,EAAGzH,KAAK6O,aAAayI,EAAMrP,KAAK,OAE1D4K,GAAO,kBAAqBpL,EAAGzH,KAAK6O,aAAa8I,GAAc,iBAE7DlQ,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,kFAIbA,GAAO,QACHO,IACFyB,GAAkB,IAClBhC,GAAO,YAIbpL,EAAG/B,UAAYkS,EACf,IACSD,EADL5C,EAAiBH,EAAI5V,OACzB,IAAS2Y,KAAaJ,EAAa,CACjC,IAAIrC,EAAOqC,EAAYI,IAClBlQ,EAAG9D,KAAK0R,eAAiC,iBAARH,GAA+C,EAA3B3V,OAAO4J,KAAK+L,GAAMlZ,SAAwB,IAATkZ,EAAiBzN,EAAGzH,KAAKkP,eAAegG,EAAMzN,EAAG/C,MAAMyH,QAChJ0G,GAAO,IAAM,EAAe,iBAAmB,EAAWpL,EAAGzH,KAAK4O,YAAY+I,GAAc,kBACxFF,IACF5E,GAAO,4CAA8C,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAa8I,GAAc,OAE9G9E,GAAO,OACP+B,EAAI7X,OAASmY,EACbN,EAAIpP,WAAa0N,EAAczL,EAAGzH,KAAK4O,YAAY+I,GACnD/C,EAAInP,cAAgB0N,EAAiB,IAAM1L,EAAGzH,KAAKmK,eAAewN,GAClE9E,GAAO,KAAQpL,EAAGhK,SAASmX,GAAQ,IACnCA,EAAI5V,OAAS+V,EACblC,GAAO,OACHO,IACFP,GAAO,QAAU,EAAe,OAChCgC,GAAkB,MAOxB,OAHIzB,IACFP,GAAO,MAAQ,EAAmB,QAAU,EAAU,iBAEjDA,IAGP,IAAIyF,GAAG,CAAC,SAAS7c,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAuBgN,EAAI4K,GAC1C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnBQ,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAQ9CmF,GANA7B,IACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,MAK9F,IAAMV,GACbyF,EAAW,SAAWzF,EACnBQ,IACHT,GAAO,QAAU,EAAa,qBAAuB,EAAgB,KAEvEA,GAAO,OAAS,EAAW,IACvBS,IACFT,GAAO,cAAgB,EAAS,mBAAqB,EAAW,0CAA4C,EAAS,MAAQ,EAAW,oBAE1IA,GAAY,EAAW,qBAAuB,EAAO,OAAS,EAAO,IAAM,EAAa,YAAc,EAAO,iBAAmB,EAAU,KAAO,EAAa,IAAM,EAAO,SAAW,EAAW,oBAC7LS,IACFT,GAAO,SAGT,IAAID,EAAaA,GAAc,GAC/BA,EAAWlG,KAFXmG,GAAO,SAAW,EAAW,UAG7BA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,qDAAwEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,qCAAuC,EAAS,OACrL,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,+DAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,KACHO,IACFP,GAAO,YAEFA,IAGP,IAAI2F,GAAG,CAAC,SAAS/c,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAyBgN,EAAI4K,EAAUoG,GACtD,IAAI5F,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAClC,IAAuB,IAAnBvL,EAAG9D,KAAK+U,OAIV,OAHItF,IACFP,GAAO,iBAEFA,EAET,IAsCM8F,EAtCFrF,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEbma,EAAkBnR,EAAG9D,KAAKkV,eAC5BC,EAAgB/N,MAAMC,QAAQ4N,GAChC,GAAItF,EAAS,CAIXT,GAAO,SAHH8F,EAAU,SAAW7F,GAGI,cAAgB,EAAiB,WAF5DiG,EAAY,WAAajG,GAE6D,aAAe,EAAY,qBAAyB,EAAY,0BAA4B,EAAY,mBAD9LkG,EAAc,aAAelG,GACqM,MAAQ,EAAc,OAAS,EAAY,0BAA8B,EAAc,OACvTrL,EAAGwK,QACLY,GAAO,aAAe,EAAS,MAAQ,EAAY,YAErDA,GAAO,IAAM,EAAY,MAAQ,EAAY,sBACzCS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAEhFA,GAAO,KACgB,UAAnB+F,IACF/F,GAAO,KAAO,EAAiB,QAAU,EAAY,IACjDiG,IACFjG,GAAO,yCAA2C,EAAiB,YAErEA,GAAO,SAETA,GAAO,KAAO,EAAY,OAAS,EAAgB,QAAW,EAAc,iBAAoB,EAAY,oBAE1GA,GADEpL,EAAGwK,MACE,UAAY,EAAS,YAAc,EAAY,IAAM,EAAU,OAAS,EAAY,IAAM,EAAU,MAEpG,IAAM,EAAY,IAAM,EAAU,KAE3CY,GAAO,MAAQ,EAAY,SAAW,EAAU,cAC3C,CAEL,KADI8F,EAAUlR,EAAG7G,QAAQnC,IACX,CACZ,GAAuB,UAAnBma,EAKF,OAJAnR,EAAG1B,OAAOkT,KAAK,mBAAqBxa,EAAU,gCAAkCgJ,EAAGhC,cAAgB,KAC/F2N,IACFP,GAAO,iBAEFA,EACF,GAAIiG,GAAqD,GAApCF,EAAgBM,QAAQza,GAIlD,OAHI2U,IACFP,GAAO,iBAEFA,EAEP,MAAM,IAAIjX,MAAM,mBAAqB6C,EAAU,gCAAkCgJ,EAAGhC,cAAgB,KAGxG,IAAIsT,EAGElU,EAFFmU,GADAD,EAA8B,iBAAXJ,KAAyBA,aAAmB5V,SAAW4V,EAAQlb,WACvDkb,EAAQ9M,MAAQ,SAK/C,GAJIkN,IACElU,GAA2B,IAAlB8T,EAAQ1G,MACrB0G,EAAUA,EAAQlb,UAEhBub,GAAeP,EAIjB,OAHIrF,IACFP,GAAO,iBAEFA,EAET,GAAIhO,EAAQ,CACV,IAAK4C,EAAGwK,MAAO,MAAM,IAAIrW,MAAM,+BAE/BiX,GAAO,iBADHsG,EAAa,UAAY1R,EAAGzH,KAAK4O,YAAYnQ,GAAW,aACpB,IAAM,EAAU,aACnD,CACLoU,GAAO,UACP,IAAIsG,EAAa,UAAY1R,EAAGzH,KAAK4O,YAAYnQ,GAC7Csa,IAAWI,GAAc,aAE3BtG,GADoB,mBAAX8F,EACF,IAAM,EAAe,IAAM,EAAU,KAErC,IAAM,EAAe,SAAW,EAAU,KAEnD9F,GAAO,QAGX,IAAID,EAAaA,GAAc,GAC/BA,EAAWlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,uDAA0EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,yBAE9JN,GADES,EACK,GAAK,EAEL,GAAM7L,EAAGzH,KAAKqH,eAAe5I,GAEtCoU,GAAO,QACkB,IAArBpL,EAAG9D,KAAKsQ,WACVpB,GAAO,sCAELA,GADES,EACK,OAAU,EAAiB,OAE3B,GAAM7L,EAAGzH,KAAK6O,aAAapQ,GAEpCoU,GAAO,QAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAM7L,EAAGzH,KAAKqH,eAAe5I,GAEtCoU,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,MACHO,IACFP,GAAO,YAEFA,IAGP,IAAIuG,GAAG,CAAC,SAAS3d,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAqBgN,EAAI4K,GACxC,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnB0C,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACvBmN,EAAI7B,QACJ,IAOMsG,EAMA5D,EAbFX,EAAa,QAAUF,EAAI7B,MAC3BuG,EAAW7R,EAAG1K,OAAa,KAC7Bwc,EAAW9R,EAAG1K,OAAa,KAC3Byc,OAA4Bpc,IAAbkc,IAA2B7R,EAAG9D,KAAK0R,eAAqC,iBAAZiE,GAAuD,EAA/B/Z,OAAO4J,KAAKmQ,GAAUtd,SAA4B,IAAbsd,EAAqB7R,EAAGzH,KAAKkP,eAAeoK,EAAU7R,EAAG/C,MAAMyH,MACvMsN,OAA4Brc,IAAbmc,IAA2B9R,EAAG9D,KAAK0R,eAAqC,iBAAZkE,GAAuD,EAA/Bha,OAAO4J,KAAKoQ,GAAUvd,SAA4B,IAAbud,EAAqB9R,EAAGzH,KAAKkP,eAAeqK,EAAU9R,EAAG/C,MAAMyH,MACvM4I,EAAiBH,EAAI5V,OAkFvB,OAjFIwa,GAAgBC,GAElB7E,EAAIZ,cAAe,EACnBY,EAAI7X,OAAS0B,EACbmW,EAAIpP,WAAa0N,EACjB0B,EAAInP,cAAgB0N,EACpBN,GAAO,QAAU,EAAU,kBAAoB,EAAW,aACtD4C,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACvCxB,GAAO,KAAQpL,EAAGhK,SAASmX,GAAQ,IACnCA,EAAI5V,OAAS+V,EACbH,EAAIZ,cAAe,EACnBnB,GAAO,cAAgB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,6BAChHpL,EAAG4M,cAAgBO,EAAIP,cAAgBoB,EACnC+D,GACF3G,GAAO,QAAU,EAAe,QAChC+B,EAAI7X,OAAS0K,EAAG1K,OAAa,KAC7B6X,EAAIpP,WAAaiC,EAAGjC,WAAa,QACjCoP,EAAInP,cAAgBgC,EAAGhC,cAAgB,QACvCoN,GAAO,KAAQpL,EAAGhK,SAASmX,GAAQ,IACnCA,EAAI5V,OAAS+V,EACblC,GAAO,IAAM,EAAW,MAAQ,EAAe,KAC3C2G,GAAgBC,EAElB5G,GAAO,SADPwG,EAAY,WAAavG,GACM,cAE/BuG,EAAY,SAEdxG,GAAO,MACH4G,IACF5G,GAAO,aAGTA,GAAO,SAAW,EAAe,OAE/B4G,IACF7E,EAAI7X,OAAS0K,EAAG1K,OAAa,KAC7B6X,EAAIpP,WAAaiC,EAAGjC,WAAa,QACjCoP,EAAInP,cAAgBgC,EAAGhC,cAAgB,QACvCoN,GAAO,KAAQpL,EAAGhK,SAASmX,GAAQ,IACnCA,EAAI5V,OAAS+V,EACblC,GAAO,IAAM,EAAW,MAAQ,EAAe,KAC3C2G,GAAgBC,EAElB5G,GAAO,SADPwG,EAAY,WAAavG,GACM,cAE/BuG,EAAY,SAEdxG,GAAO,OAETA,GAAO,SAAW,EAAW,sBACL,IAApBpL,EAAGuM,cACLnB,GAAO,mDAAsEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,gCAAkC,EAAc,OACnL,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,mCAAsC,EAAc,mBAEzDpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACFpL,EAAG4M,eAAiBjB,IAGrBP,GADEpL,EAAGwK,MACE,wCAEA,8CAGXY,GAAO,QACHO,IACFP,GAAO,aAGLO,IACFP,GAAO,iBAGJA,IAGP,IAAI6G,GAAG,CAAC,SAASje,EAAQf,EAAOD,gBAIlCC,EAAOD,QAAU,CACfkE,KAAQlD,EAAQ,SAChBke,MAAOle,EAAQ,WACf6V,MAAO7V,EAAQ,WACfmR,SAAYnR,EAAQ,aACpByW,MAAOzW,EAAQ,WACfme,SAAUne,EAAQ,cAClBoM,aAAcpM,EAAQ,kBACtBoe,KAAQpe,EAAQ,UAChBid,OAAQjd,EAAQ,YAChBqe,GAAMre,EAAQ,QACdsW,MAAOtW,EAAQ,WACfsQ,QAAStQ,EAAQ,YACjBuQ,QAASvQ,EAAQ,YACjBse,SAAUte,EAAQ,iBAClBue,SAAUve,EAAQ,iBAClBwe,UAAWxe,EAAQ,kBACnBye,UAAWze,EAAQ,kBACnB0e,cAAe1e,EAAQ,sBACvB2e,cAAe3e,EAAQ,sBACvB4e,WAAY5e,EAAQ,gBACpBoW,IAAKpW,EAAQ,SACb6e,MAAO7e,EAAQ,WACf8e,QAAS9e,EAAQ,aACjBwQ,WAAYxQ,EAAQ,gBACpB+e,cAAe/e,EAAQ,mBACvBqW,SAAUrW,EAAQ,cAClBgf,YAAahf,EAAQ,iBACrBgC,SAAUhC,EAAQ,gBAGlB,CAACif,WAAW,GAAGC,gBAAgB,GAAGC,iBAAiB,GAAGC,qBAAqB,GAAGC,UAAU,GAAGC,UAAU,GAAGC,YAAY,GAAGC,UAAU,GAAGC,aAAa,GAAGC,iBAAiB,GAAGC,SAAS,GAAGC,WAAW,GAAGC,OAAO,GAAGC,UAAU,GAAGC,eAAe,GAAGC,QAAQ,GAAGC,UAAU,GAAGC,YAAY,GAAGC,eAAe,GAAGC,kBAAkB,GAAGC,QAAQ,GAAGC,aAAa,GAAGC,gBAAgB,GAAGC,aAAa,KAAKC,GAAG,CAAC,SAASzgB,EAAQf,EAAOD,gBAEvZC,EAAOD,QAAU,SAAwBgN,EAAI4K,GAC3C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnB0C,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACnBoN,EAAiB,GACrBD,EAAI7B,QACJ,IAAI+B,EAAa,QAAUF,EAAI7B,MAC3BgD,EAAO,IAAMjD,EACfkD,EAAWpB,EAAI3B,UAAYxL,EAAGwL,UAAY,EAC1CgD,EAAY,OAASD,EACrBjB,EAAiBtN,EAAGzI,OAEtB,GADA6T,GAAO,OAAS,EAAU,iBAAmB,EAAW,IACpD9H,MAAMC,QAAQvM,GAAU,CAC1B,IAGM0d,EAGAvJ,EAeAuB,EArBFiI,EAAmB3U,EAAG1K,OAAOsf,iBACR,IAArBD,IACFvJ,GAAO,IAAM,EAAW,MAAQ,EAAU,cAAiBpU,EAAc,OAAI,KACzE0d,EAAqBhJ,EACzBA,EAAiB1L,EAAGhC,cAAgB,oBAEhCmN,EAAaA,GAAc,IACpBlG,KAFXmG,GAAO,UAAY,EAAW,UAG9BA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,gEAAmFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,uBAA0B1U,EAAc,OAAI,OAC5L,IAArBgJ,EAAG9D,KAAKsQ,WACVpB,GAAO,0CAA8CpU,EAAc,OAAI,YAErEgJ,EAAG9D,KAAKuQ,UACVrB,GAAO,mDAAsDpL,EAAa,WAAI,YAAc,EAAU,KAExGoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,MACPM,EAAiBgJ,EACb/I,IACFyB,GAAkB,IAClBhC,GAAO,aAGX,IAAIoC,EAAOxW,EACX,GAAIwW,EAGF,IAFA,IAAUE,GAAM,EACdC,EAAKH,EAAKjZ,OAAS,EACdmZ,EAAKC,GAAI,CAEd,IAEMS,EAMAC,EATNZ,EAAOD,EAAKE,GAAM,IACb1N,EAAG9D,KAAK0R,eAAiC,iBAARH,GAA+C,EAA3B3V,OAAO4J,KAAK+L,GAAMlZ,SAAwB,IAATkZ,EAAiBzN,EAAGzH,KAAKkP,eAAegG,EAAMzN,EAAG/C,MAAMyH,QAChJ0G,GAAO,IAAM,EAAe,gBAAkB,EAAU,aAAe,EAAO,OAC1EgD,EAAY7F,EAAQ,IAAMmF,EAAK,IACnCP,EAAI7X,OAASmY,EACbN,EAAIpP,WAAa0N,EAAc,IAAMiC,EAAK,IAC1CP,EAAInP,cAAgB0N,EAAiB,IAAMgC,EAC3CP,EAAIlP,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWyP,EAAI1N,EAAG9D,KAAK6L,cAAc,GAC5EoF,EAAIpB,YAAYwC,GAAYb,EACxBW,EAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,EAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,EAAOG,EAAWJ,GAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExEA,GAAO,OACHO,IACFP,GAAO,QAAU,EAAe,OAChCgC,GAAkB,MAKK,iBAApBuH,IAAiC3U,EAAG9D,KAAK0R,eAA6C,iBAApB+G,GAAuE,EAAvC7c,OAAO4J,KAAKiT,GAAkBpgB,SAAoC,IAArBogB,EAA6B3U,EAAGzH,KAAKkP,eAAekN,EAAkB3U,EAAG/C,MAAMyH,QACvOyI,EAAI7X,OAASqf,EACbxH,EAAIpP,WAAaiC,EAAGjC,WAAa,mBACjCoP,EAAInP,cAAgBgC,EAAGhC,cAAgB,mBACvCoN,GAAO,IAAM,EAAe,gBAAkB,EAAU,aAAgBpU,EAAc,OAAI,iBAAmB,EAAS,MAASA,EAAc,OAAI,KAAO,EAAS,MAAQ,EAAU,YAAc,EAAS,SAC1MmW,EAAIlP,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWqQ,EAAMtO,EAAG9D,KAAK6L,cAAc,GAC1EqG,EAAY7F,EAAQ,IAAM+F,EAAO,IACrCnB,EAAIpB,YAAYwC,GAAYD,EACxBD,EAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,EAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,EAAOG,EAAWJ,GAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpEO,IACFP,GAAO,SAAW,EAAe,aAEnCA,GAAO,SACHO,IACFP,GAAO,QAAU,EAAe,OAChCgC,GAAkB,UAGjB,EAAKpN,EAAG9D,KAAK0R,eAAoC,iBAAX5W,GAAqD,EAA9Bc,OAAO4J,KAAK1K,GAASzC,SAA2B,IAAZyC,EAAoBgJ,EAAGzH,KAAKkP,eAAezQ,EAASgJ,EAAG/C,MAAMyH,QACnKyI,EAAI7X,OAAS0B,EACbmW,EAAIpP,WAAa0N,EACjB0B,EAAInP,cAAgB0N,EACpBN,GAAO,cAAgB,EAAS,SAAqB,EAAS,MAAQ,EAAU,YAAc,EAAS,SACvG+B,EAAIlP,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWqQ,EAAMtO,EAAG9D,KAAK6L,cAAc,GAC1EqG,EAAY7F,EAAQ,IAAM+F,EAAO,IACrCnB,EAAIpB,YAAYwC,GAAYD,EACxBD,EAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,EAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,EAAOG,EAAWJ,GAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAEpEO,IACFP,GAAO,SAAW,EAAe,aAEnCA,GAAO,MAKT,OAHIO,IACFP,GAAO,IAAM,EAAmB,QAAU,EAAU,iBAE/CA,IAGP,IAAIyJ,GAAG,CAAC,SAAS7gB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA6BgN,EAAI4K,GAChD,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BM,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEjB,IAAM6U,GAA6B,iBAAX7U,EACtB,MAAM,IAAI7C,MAAMyW,EAAW,mBAE7BQ,GAAO,eAAiB,EAAS,QAC7BS,IACFT,GAAO,IAAM,EAAiB,8BAAgC,EAAiB,oBAEjFA,GAAO,aAAe,EAAS,MAAQ,EAAU,MAAQ,EAAiB,KAExEA,GADEpL,EAAG9D,KAAK4Y,oBACH,gCAAkC,EAAS,eAAiB,EAAS,UAAa9U,EAAG9D,KAAwB,oBAAI,IAEjH,YAAc,EAAS,yBAA2B,EAAS,KAEpEkP,GAAO,MACHS,IACFT,GAAO,SAGT,IAAID,EAAaA,GAAc,GAC/BA,EAAWlG,KAFXmG,GAAO,WAGPA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,2DAA8EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,4BAA8B,EAAiB,OAC1L,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,sCAELA,GADES,EACK,OAAU,EAEL,EAAiB,KAG7B7L,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAK,EAEdT,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,KACHO,IACFP,GAAO,YAEFA,IAGP,IAAI2J,GAAG,CAAC,SAAS/gB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAsBgN,EAAI4K,GACzC,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BwC,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACvBmN,EAAI7B,QACJ,IAMM0C,EAGAgH,EAUA7J,EAeAuB,EAlCFW,EAAa,QAAUF,EAAI7B,MAqE/B,OApEKtL,EAAG9D,KAAK0R,eAAoC,iBAAX5W,GAAqD,EAA9Bc,OAAO4J,KAAK1K,GAASzC,SAA2B,IAAZyC,EAAoBgJ,EAAGzH,KAAKkP,eAAezQ,EAASgJ,EAAG/C,MAAMyH,OAC5JyI,EAAI7X,OAAS0B,EACbmW,EAAIpP,WAAa0N,EACjB0B,EAAInP,cAAgB0N,EACpBN,GAAO,QAAU,EAAU,eACvB4C,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACvCO,EAAIZ,cAAe,EAEfY,EAAIjR,KAAK0P,YACXoJ,EAAmB7H,EAAIjR,KAAK0P,UAC5BuB,EAAIjR,KAAK0P,WAAY,GAEvBR,GAAO,IAAOpL,EAAGhK,SAASmX,GAAQ,IAClCA,EAAIZ,cAAe,EACfyI,IAAkB7H,EAAIjR,KAAK0P,UAAYoJ,GAC3ChV,EAAG4M,cAAgBO,EAAIP,cAAgBoB,GAEnC7C,EAAaA,GAAc,IACpBlG,KAFXmG,GAAO,QAAU,EAAe,UAGhCA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,oDAAuEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kBACpI,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,sCAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,uBAAyB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,4BACrHpL,EAAG9D,KAAK0P,YACVR,GAAO,SAGTA,GAAO,kBACiB,IAApBpL,EAAGuM,cACLnB,GAAO,oDAAuEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kBACpI,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,sCAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,+EACHO,IACFP,GAAO,mBAGJA,IAGP,IAAI6J,GAAG,CAAC,SAASjhB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAwBgN,EAAI4K,GAC3C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnB0C,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACnBoN,EAAiB,GACrBD,EAAI7B,QACJ,IAAI+B,EAAa,QAAUF,EAAI7B,MAC3BgC,EAAiBH,EAAI5V,OACvB2d,EAAa,YAAc7J,EAC3B8J,EAAkB,iBAAmB9J,EACvCD,GAAO,OAAS,EAAU,eAAiB,EAAe,cAAgB,EAAW,cAAgB,EAAoB,YACzH,IAAI4C,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACvC,IAAIY,EAAOxW,EACX,GAAIwW,EAGF,IAFA,IAAIC,EAAMC,GAAM,EACdC,EAAKH,EAAKjZ,OAAS,EACdmZ,EAAKC,GACVF,EAAOD,EAAKE,GAAM,IACb1N,EAAG9D,KAAK0R,eAAiC,iBAARH,GAA+C,EAA3B3V,OAAO4J,KAAK+L,GAAMlZ,SAAwB,IAATkZ,EAAiBzN,EAAGzH,KAAKkP,eAAegG,EAAMzN,EAAG/C,MAAMyH,OAChJyI,EAAI7X,OAASmY,EACbN,EAAIpP,WAAa0N,EAAc,IAAMiC,EAAK,IAC1CP,EAAInP,cAAgB0N,EAAiB,IAAMgC,EAC3CtC,GAAO,KAAQpL,EAAGhK,SAASmX,GAAQ,IACnCA,EAAI5V,OAAS+V,GAEblC,GAAO,QAAU,EAAe,YAE9BsC,IACFtC,GAAO,QAAU,EAAe,OAAS,EAAe,OAAS,EAAW,aAAe,EAAoB,OAAS,EAAoB,KAAO,EAAO,eAC1JgC,GAAkB,KAEpBhC,GAAO,QAAU,EAAe,OAAS,EAAW,MAAQ,EAAe,YAAc,EAAoB,MAAQ,EAAO,MA8BhI,OA3BApL,EAAG4M,cAAgBO,EAAIP,cAAgBoB,EACvC5C,GAAY,EAAmB,QAAU,EAAW,sBAC5B,IAApBpL,EAAGuM,cACLnB,GAAO,sDAAyEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,gCAAkC,EAAoB,OAC5L,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,2DAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACFpL,EAAG4M,eAAiBjB,IAGrBP,GADEpL,EAAGwK,MACE,wCAEA,8CAGXY,GAAO,sBAAwB,EAAU,iCAAmC,EAAU,sBAAwB,EAAU,2BACpHpL,EAAG9D,KAAK0P,YACVR,GAAO,OAEFA,IAGP,IAAIgK,GAAG,CAAC,SAASphB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA0BgN,EAAI4K,GAC7C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BM,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAEbqe,EAAUxJ,EAAU,eAAiBC,EAAe,KAAO9L,EAAG7B,WAAWnH,GAC7EoU,GAAO,QACHS,IACFT,GAAO,KAAO,EAAiB,4BAA8B,EAAiB,qBAGhF,IAAID,EAAaA,GAAc,GAC/BA,EAAWlG,KAFXmG,GAAO,KAAO,EAAY,SAAW,EAAU,YAG/CA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,wDAA2EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,0BAE/JN,GADES,EACK,GAAK,EAEL,GAAM7L,EAAGzH,KAAKqH,eAAe5I,GAEtCoU,GAAO,QACkB,IAArBpL,EAAG9D,KAAKsQ,WACVpB,GAAO,uCAELA,GADES,EACK,OAAU,EAAiB,OAE3B,GAAM7L,EAAGzH,KAAK6O,aAAapQ,GAEpCoU,GAAO,QAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAM7L,EAAGzH,KAAKqH,eAAe5I,GAEtCoU,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAejB,OAXIvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,KACHO,IACFP,GAAO,YAEFA,IAGP,IAAIkK,GAAG,CAAC,SAASthB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA6BgN,EAAI4K,GAChD,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BwC,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GACnBoN,EAAiB,GACrBD,EAAI7B,QACJ,IAmBMiK,EAkDEC,EAoDIxH,EAzHRX,EAAa,QAAUF,EAAI7B,MAC3BmK,EAAO,MAAQpK,EACjBiD,EAAO,MAAQjD,EACfkD,EAAWpB,EAAI3B,UAAYxL,EAAGwL,UAAY,EAC1CgD,EAAY,OAASD,EACrBmH,EAAkB,iBAAmBrK,EACnCsK,EAAc7d,OAAO4J,KAAK1K,GAAW,IAAI4e,OAAOC,GAClDC,EAAe9V,EAAG1K,OAAOygB,mBAAqB,GAC9CC,EAAiBle,OAAO4J,KAAKoU,GAAcF,OAAOC,GAClDI,EAAejW,EAAG1K,OAAO4gB,qBACzBC,EAAkBR,EAAYphB,QAAUyhB,EAAezhB,OACvD6hB,GAAiC,IAAjBH,EAChBI,EAA6C,iBAAhBJ,GAA4Bne,OAAO4J,KAAKuU,GAAc1hB,OACnF+hB,EAAoBtW,EAAG9D,KAAKqa,iBAC5BC,EAAmBJ,GAAiBC,GAAuBC,EAC3DtG,EAAiBhQ,EAAG9D,KAAK+T,cACzB3C,EAAiBtN,EAAGzI,OAClBkf,EAAYzW,EAAG1K,OAAO+U,SAK1B,SAASwL,EAASxhB,GAChB,MAAa,cAANA,EAMT,GAXIoiB,KAAezW,EAAG9D,KAAKqM,QAASkO,EAAUlO,QAAUkO,EAAUliB,OAASyL,EAAG9D,KAAKwa,eAC7EnB,EAAgBvV,EAAGzH,KAAKqK,OAAO6T,IAMrCrL,GAAO,OAAS,EAAU,iBAAmB,EAAe,WACxD4E,IACF5E,GAAO,QAAU,EAAoB,iBAEnCoL,EAAkB,CAMpB,GAJEpL,GADE4E,EACK,IAAM,EAAoB,MAAQ,EAAoB,mBAAqB,EAAU,eAAiB,EAAS,OAAS,EAAS,IAAM,EAAoB,YAAc,EAAS,aAAe,EAAS,MAAQ,EAAoB,IAAM,EAAS,MAErP,aAAe,EAAS,OAAS,EAAU,OAEhDmG,EAAiB,CAEnB,GADA/K,GAAO,oBAAsB,EAAS,cAClCuK,EAAYphB,OACd,GAAyB,EAArBohB,EAAYphB,OACd6W,GAAO,sBAAwB,EAAgB,mBAAqB,EAAS,SACxE,CACL,IAAIoC,EAAOmI,EACX,GAAInI,EAGF,IAFA,IAAkBmJ,GAAM,EACtBhJ,EAAKH,EAAKjZ,OAAS,EACdoiB,EAAKhJ,GACVyC,EAAe5C,EAAKmJ,GAAM,GAC1BvL,GAAO,OAAS,EAAS,OAAUpL,EAAGzH,KAAKqH,eAAewQ,GAAiB,IAKnF,GAAI4F,EAAezhB,OAAQ,CACzB,IAAImc,EAAOsF,EACX,GAAItF,EAGF,IAFA,IAAgBhD,GAAM,EACpBkD,EAAKF,EAAKnc,OAAS,EACdmZ,EAAKkD,GACVgG,GAAalG,EAAKhD,GAAM,GACxBtC,GAAO,OAAUpL,EAAG7B,WAAWyY,IAAe,SAAW,EAAS,KAIxExL,GAAO,uBAAyB,EAAS,OAElB,OAArBkL,EACFlL,GAAO,WAAa,EAAU,IAAM,EAAS,OAEzC+E,EAAoBnQ,EAAG/B,UACvBuX,EAAsB,OAAUC,EAAO,OACvCzV,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWwX,EAAMzV,EAAG9D,KAAK6L,eAE7DqO,EACEE,EACFlL,GAAO,WAAa,EAAU,IAAM,EAAS,OAGzCsJ,EAAqBhJ,EACzBA,EAAiB1L,EAAGhC,cAAgB,yBAChCmN,EAAaA,GAAc,IACpBlG,KAJXmG,GAAO,IAAM,EAAe,cAK5BA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,qEAAwFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,qCAAwC,EAAwB,QACrN,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAELA,GADEpL,EAAG9D,KAAKuU,uBACH,oCAEA,wCAETrF,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,mDAAsDpL,EAAa,WAAI,YAAc,EAAU,KAExGoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCkB,EAAiBgJ,EACb/I,IACFP,GAAO,aAGFiL,IACgB,WAArBC,GACFlL,GAAO,QAAU,EAAU,eACvB4C,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACvCO,EAAI7X,OAAS2gB,EACb9I,EAAIpP,WAAaiC,EAAGjC,WAAa,wBACjCoP,EAAInP,cAAgBgC,EAAGhC,cAAgB,wBACvCmP,EAAIlP,UAAY+B,EAAG9D,KAAKuU,uBAAyBzQ,EAAG/B,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWwX,EAAMzV,EAAG9D,KAAK6L,cAC5GqG,GAAY7F,EAAQ,IAAMkN,EAAO,IACrCtI,EAAIpB,YAAYwC,GAAYkH,EACxBpH,GAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,GAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,GAAOG,EAAWJ,IAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,GAAc,KAAO,GAAU,IAExEA,GAAO,SAAW,EAAe,gBAAkB,EAAU,wHAA0H,EAAU,IAAM,EAAS,SAChNpL,EAAG4M,cAAgBO,EAAIP,cAAgBoB,IAEvCb,EAAI7X,OAAS2gB,EACb9I,EAAIpP,WAAaiC,EAAGjC,WAAa,wBACjCoP,EAAInP,cAAgBgC,EAAGhC,cAAgB,wBACvCmP,EAAIlP,UAAY+B,EAAG9D,KAAKuU,uBAAyBzQ,EAAG/B,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWwX,EAAMzV,EAAG9D,KAAK6L,cAC5GqG,GAAY7F,EAAQ,IAAMkN,EAAO,IACrCtI,EAAIpB,YAAYwC,GAAYkH,EACxBpH,GAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,GAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,GAAOG,EAAWJ,IAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,GAAc,KAAO,GAAU,IAEpEO,IACFP,GAAO,SAAW,EAAe,eAIvCpL,EAAG/B,UAAYkS,GAEbgG,IACF/K,GAAO,OAETA,GAAO,OACHO,IACFP,GAAO,QAAU,EAAe,OAChCgC,GAAkB,KAGtB,IAAIyJ,EAAe7W,EAAG9D,KAAK4a,cAAgB9W,EAAG4M,cAC9C,GAAI+I,EAAYphB,OAAQ,CACtB,IAAIwiB,EAAOpB,EACX,GAAIoB,EAGF,IAFA,IAAI3G,EAAc4G,GAAM,EACtBC,EAAKF,EAAKxiB,OAAS,EACdyiB,EAAKC,GAAI,CAEd,IAEM3G,EAEF4G,EAYI7G,EAYEF,EACFuE,EACAlE,EAKErF,EAqBAuB,EAxDNe,GAAOzW,EADXoZ,EAAe2G,EAAKC,GAAM,KAErBhX,EAAG9D,KAAK0R,eAAiC,iBAARH,IAA+C,EAA3B3V,OAAO4J,KAAK+L,IAAMlZ,SAAwB,IAATkZ,GAAiBzN,EAAGzH,KAAKkP,eAAegG,GAAMzN,EAAG/C,MAAMyH,QAE9I0J,GAAY7F,GADV+H,EAAQtQ,EAAGzH,KAAK4O,YAAYiJ,IAE9B8G,EAAcL,QAAiClhB,IAAjB8X,GAAK0J,QACrChK,EAAI7X,OAASmY,GACbN,EAAIpP,WAAa0N,EAAc6E,EAC/BnD,EAAInP,cAAgB0N,EAAiB,IAAM1L,EAAGzH,KAAKmK,eAAe0N,GAClEjD,EAAIlP,UAAY+B,EAAGzH,KAAK2P,QAAQlI,EAAG/B,UAAWmS,EAAcpQ,EAAG9D,KAAK6L,cACpEoF,EAAIpB,YAAYwC,GAAYvO,EAAGzH,KAAKqH,eAAewQ,GAC/C/B,GAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,GAAOG,GAAa,GAC5CH,GAAQrO,EAAGzH,KAAKgP,WAAW8G,GAAOG,EAAWJ,IACzCiC,EAAWjC,IAGfhD,GAAO,SADHiF,EAAW7B,GACgB,MAAQ,GAAc,KAEnD0I,EACF9L,GAAO,IAAM,GAAU,KAEnBmK,GAAiBA,EAAcnF,IACjChF,GAAO,SAAW,EAAa,kBAC3B4E,IACF5E,GAAO,8CAAgD,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAagJ,GAAiB,OAEnHhF,GAAO,OAAS,EAAe,aAC3B+E,EAAoBnQ,EAAG/B,UACzByW,EAAqBhJ,EACrB8E,EAAmBxQ,EAAGzH,KAAK6O,aAAagJ,GACtCpQ,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAGzH,KAAK2P,QAAQiI,EAAmBC,EAAcpQ,EAAG9D,KAAK6L,eAE1E2D,EAAiB1L,EAAGhC,cAAgB,aAChCmN,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,yDAA4EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kCAAqC,EAAqB,QACnM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAELA,GADEpL,EAAG9D,KAAKuU,uBACH,yBAEA,oCAAuC,EAAqB,MAErErF,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCkB,EAAiBgJ,EACjB1U,EAAG/B,UAAYkS,EACf/E,GAAO,cAEHO,GACFP,GAAO,SAAW,EAAa,kBAC3B4E,IACF5E,GAAO,8CAAgD,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAagJ,GAAiB,OAEnHhF,GAAO,OAAS,EAAe,uBAE/BA,GAAO,QAAU,EAAa,kBAC1B4E,IACF5E,GAAO,8CAAgD,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAagJ,GAAiB,OAEnHhF,GAAO,SAGXA,GAAO,IAAM,GAAU,QAGvBO,IACFP,GAAO,QAAU,EAAe,OAChCgC,GAAkB,MAK1B,GAAI4I,EAAezhB,OAAQ,CACzB,IAAI6iB,GAAOpB,EACX,GAAIoB,GAGF,IAFA,IAAIR,GAAYS,IAAM,EACpBC,GAAKF,GAAK7iB,OAAS,EACd8iB,GAAKC,IAAI,CAEd,IAYMlJ,GAEAC,GAdFZ,GAAOqI,EADXc,GAAaQ,GAAKC,IAAM,KAEnBrX,EAAG9D,KAAK0R,eAAiC,iBAARH,IAA+C,EAA3B3V,OAAO4J,KAAK+L,IAAMlZ,SAAwB,IAATkZ,GAAiBzN,EAAGzH,KAAKkP,eAAegG,GAAMzN,EAAG/C,MAAMyH,QAChJyI,EAAI7X,OAASmY,GACbN,EAAIpP,WAAaiC,EAAGjC,WAAa,qBAAuBiC,EAAGzH,KAAK4O,YAAYyP,IAC5EzJ,EAAInP,cAAgBgC,EAAGhC,cAAgB,sBAAwBgC,EAAGzH,KAAKmK,eAAekU,IAEpFxL,GADE4E,EACK,IAAM,EAAoB,MAAQ,EAAoB,mBAAqB,EAAU,eAAiB,EAAS,OAAS,EAAS,IAAM,EAAoB,YAAc,EAAS,aAAe,EAAS,MAAQ,EAAoB,IAAM,EAAS,MAErP,aAAe,EAAS,OAAS,EAAU,OAEpD5E,GAAO,QAAWpL,EAAG7B,WAAWyY,IAAe,SAAW,EAAS,QACnEzJ,EAAIlP,UAAY+B,EAAGzH,KAAKsP,YAAY7H,EAAG/B,UAAWwX,EAAMzV,EAAG9D,KAAK6L,cAC5DqG,GAAY7F,EAAQ,IAAMkN,EAAO,IACrCtI,EAAIpB,YAAYwC,GAAYkH,EACxBpH,GAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,GAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,GAAOG,EAAWJ,IAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,GAAc,KAAO,GAAU,IAEpEO,IACFP,GAAO,SAAW,EAAe,aAEnCA,GAAO,MACHO,IACFP,GAAO,SAAW,EAAe,aAEnCA,GAAO,OACHO,IACFP,GAAO,QAAU,EAAe,OAChCgC,GAAkB,OAS5B,OAHIzB,IACFP,GAAO,IAAM,EAAmB,QAAU,EAAU,iBAE/CA,IAGP,IAAImM,GAAG,CAAC,SAASvjB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAgCgN,EAAI4K,GACnD,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BwC,EAAQ,SAAW1C,EACnB8B,EAAMnN,EAAGzH,KAAKc,KAAK2G,GAEvBmN,EAAI7B,QACJ,IAMMmK,EACFnH,EACAZ,EACA8J,EAEAhJ,EACAkH,EACA1F,EACA1C,EAUEc,EACAJ,EAEAK,EA3BFhB,EAAa,QAAUF,EAAI7B,MAiE/B,OAhEAF,GAAO,OAAS,EAAU,cACrBpL,EAAG9D,KAAK0R,eAAoC,iBAAX5W,GAAqD,EAA9Bc,OAAO4J,KAAK1K,GAASzC,SAA2B,IAAZyC,EAAoBgJ,EAAGzH,KAAKkP,eAAezQ,EAASgJ,EAAG/C,MAAMyH,QAC5JyI,EAAI7X,OAAS0B,EACbmW,EAAIpP,WAAa0N,EACjB0B,EAAInP,cAAgB0N,EAElB4C,EAAO,MAAQjD,EACfqC,EAAK,IAAMrC,EACXmM,EAAe,QAHb/B,EAAO,MAAQpK,GAGe,OAEhCmD,EAAY,QADDrB,EAAI3B,UAAYxL,EAAGwL,UAAY,GAE1CkK,EAAkB,iBAAmBrK,EAErCiC,EAAiBtN,EAAGzI,QADpByY,EAAiBhQ,EAAG9D,KAAK+T,iBAGzB7E,GAAO,QAAU,EAAoB,kBAGrCA,GADE4E,EACK,IAAM,EAAoB,MAAQ,EAAoB,mBAAqB,EAAU,eAAiB,EAAS,OAAS,EAAS,IAAM,EAAoB,YAAc,EAAS,aAAe,EAAS,MAAQ,EAAoB,IAAM,EAAS,MAErP,aAAe,EAAS,OAAS,EAAU,OAEpD5E,GAAO,iBAAmB,EAAS,cAC/BgD,EAAYqH,EACZzH,EAAgBhO,EAAG4M,cACvB5M,EAAG4M,cAAgBO,EAAIP,eAAgB,EACnCyB,EAAQrO,EAAGhK,SAASmX,GACxBA,EAAI5V,OAAS+V,EACTtN,EAAGzH,KAAK8O,cAAcgH,EAAOG,GAAa,EAC5CpD,GAAO,IAAOpL,EAAGzH,KAAKgP,WAAW8G,EAAOG,EAAWJ,GAAc,IAEjEhD,GAAO,QAAU,EAAc,MAAQ,EAAc,KAAO,EAAU,IAExEpL,EAAG4M,cAAgBO,EAAIP,cAAgBoB,EACvC5C,GAAO,SAAW,EAAe,gBAAkB,EAAO,aAAe,EAAS,KAAO,EAAO,YAAc,EAAO,iBAAmB,EAAO,oBAAsB,EAAS,sBACtJ,IAApBpL,EAAGuM,cACLnB,GAAO,8DAAiFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,+BAAkC,EAAiB,QACjM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,iCAAqC,EAAiB,oBAE3DpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,gFACFpL,EAAG4M,eAAiBjB,IAGrBP,GADEpL,EAAGwK,MACE,wCAEA,8CAGPmB,IACFP,GAAO,YAETA,GAAO,QAELO,IACFP,GAAO,SAAmC,EAAU,iBAE/CA,IAGP,IAAIqM,GAAG,CAAC,SAASzjB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAAsBgN,EAAI4K,GACzC,IAQIxN,EAAQsa,EARRtM,EAAM,IAENG,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QANF9N,EAAGsL,MAQd,GAAe,KAAXtU,GAA6B,MAAXA,EAGlB0gB,EAFE1X,EAAGnC,QACLT,EAAS4C,EAAGwK,MACD,aAEXpN,GAAmC,IAA1B4C,EAAGhE,KAAK1G,OAAO8H,OACb,sBAER,CACL,IA4CM+P,EAEAE,EA9CFsK,EAAU3X,EAAG9B,WAAW8B,EAAGzI,OAAQP,EAASgJ,EAAGnC,QACnD,QAAgBlI,IAAZgiB,EAAuB,CACzB,IAGMxM,EAHFyM,EAAW5X,EAAG7K,gBAAgBqC,QAAQwI,EAAGzI,OAAQP,GACrD,GAA2B,QAAvBgJ,EAAG9D,KAAK2b,YAAuB,CACjC7X,EAAG1B,OAAOS,MAAM6Y,IACZzM,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,qDAAwEpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,sBAA0B1L,EAAGzH,KAAK6O,aAAapQ,GAAY,QAChM,IAArBgJ,EAAG9D,KAAKsQ,WACVpB,GAAO,0CAA+CpL,EAAGzH,KAAK6O,aAAapQ,GAAY,MAErFgJ,EAAG9D,KAAKuQ,UACVrB,GAAO,cAAiBpL,EAAGzH,KAAKqH,eAAe5I,GAAY,mCAAsCgJ,EAAa,WAAI,YAAc,EAAU,KAE5IoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAE/BmB,IACFP,GAAO,sBAEJ,CAAA,GAA2B,UAAvBpL,EAAG9D,KAAK2b,YAMjB,MAAM,IAAI7X,EAAG7K,gBAAgB6K,EAAGzI,OAAQP,EAAS4gB,GALjD5X,EAAG1B,OAAOkT,KAAKoG,GACXjM,IACFP,GAAO,sBAKN,CAAIuM,EAAQjY,SACbyN,EAAMnN,EAAGzH,KAAKc,KAAK2G,IACnBsL,QACA+B,EAAa,QAAUF,EAAI7B,MAC/B6B,EAAI7X,OAASqiB,EAAQriB,OACrB6X,EAAIpP,WAAa,GACjBoP,EAAInP,cAAgBhH,EAEpBoU,GAAO,IADKpL,EAAGhK,SAASmX,GAAKrJ,QAAQ,oBAAqB6T,EAAQvjB,MAC3C,IACnBuX,IACFP,GAAO,QAAU,EAAe,UAGlChO,GAA4B,IAAnBua,EAAQva,QAAoB4C,EAAGwK,QAA4B,IAAnBmN,EAAQva,OACzDsa,EAAWC,EAAQvjB,OAGvB,GAAIsjB,EAAU,EACRvM,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,GAEJA,GADEpL,EAAG9D,KAAKyT,YACH,IAAM,EAAa,eAEnB,IAAM,EAAa,KAE5BvE,GAAO,IAAM,EAAU,qBACH,MAAhBpL,EAAG/B,YACLmN,GAAO,MAASpL,EAAY,WAK9B,IAAI8X,EADJ1M,GAAO,OAFWG,EAAW,QAAWA,EAAW,GAAM,IAAM,cAEhC,OADPA,EAAWvL,EAAG+L,YAAYR,GAAY,sBACC,gBAG/D,GADAH,EAAMD,EAAWwB,MACbvP,EAAQ,CACV,IAAK4C,EAAGwK,MAAO,MAAM,IAAIrW,MAAM,0CAC3BwX,IACFP,GAAO,QAAU,EAAW,MAE9BA,GAAO,gBAAkB,EAAmB,KACxCO,IACFP,GAAO,IAAM,EAAW,aAE1BA,GAAO,4KACHO,IACFP,GAAO,IAAM,EAAW,cAE1BA,GAAO,MACHO,IACFP,GAAO,QAAU,EAAW,aAG9BA,GAAO,SAAW,EAAmB,uCAAyC,EAAa,0CAA4C,EAAa,wCAChJO,IACFP,GAAO,YAIb,OAAOA,IAGP,IAAI2M,GAAG,CAAC,SAAS/jB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA2BgN,EAAI4K,GAC9C,IAAIQ,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnBQ,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAQ9CuI,GANAjF,IACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,MAKxF,SAAWV,GAC1B,IAAKQ,EACH,GAAI7U,EAAQzC,OAASyL,EAAG9D,KAAKwa,cAAgB1W,EAAG1K,OAAOkP,YAAc1M,OAAO4J,KAAK1B,EAAG1K,OAAOkP,YAAYjQ,OAAQ,CAC7G,IAAIkiB,EAAY,GACZjJ,EAAOxW,EACX,GAAIwW,EAGF,IAFA,IAAI0C,EAAWyG,GAAM,EACnBhJ,EAAKH,EAAKjZ,OAAS,EACdoiB,EAAKhJ,GAAI,CACduC,EAAY1C,EAAKmJ,GAAM,GACvB,IAAIqB,EAAehY,EAAG1K,OAAOkP,WAAW0L,GAClC8H,IAAiBhY,EAAG9D,KAAK0R,eAAyC,iBAAhBoK,GAA+D,EAAnClgB,OAAO4J,KAAKsW,GAAczjB,SAAgC,IAAjByjB,EAAyBhY,EAAGzH,KAAKkP,eAAeuQ,EAAchY,EAAG/C,MAAMyH,QAClM+R,EAAUA,EAAUliB,QAAU2b,SAKhCuG,EAAYzf,EAGpB,GAAI6U,GAAW4K,EAAUliB,OAAQ,CAC/B,IAAI4b,EAAoBnQ,EAAG/B,UACzBga,EAAgBpM,GAA+B7L,EAAG9D,KAAKwa,cAA5BD,EAAUliB,OACrCyb,EAAiBhQ,EAAG9D,KAAK+T,cAC3B,GAAItE,EAEF,GADAP,GAAO,eAAiB,EAAS,KAC7B6M,EAAe,CACZpM,IACHT,GAAO,QAAU,EAAa,qBAAuB,EAAgB,MAEvE,IAEEoF,EAAmB,QADnBD,EAAgB,SAAWlF,EAAO,KADhCqC,EAAK,IAAMrC,GACgC,KACA,OAC3CrL,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAGzH,KAAKsP,YAAYsI,EAAmBI,EAAevQ,EAAG9D,KAAK6L,eAE/EqD,GAAO,QAAU,EAAW,YACxBS,IACFT,GAAO,cAAgB,EAAS,mBAAqB,EAAW,0CAA4C,EAAS,MAAQ,EAAW,oBAE1IA,GAAO,aAAe,EAAO,SAAW,EAAO,MAAQ,EAAa,YAAc,EAAO,SAAW,EAAW,MAAQ,EAAU,IAAM,EAAa,IAAM,EAAO,oBAC7J4E,IACF5E,GAAO,8CAAgD,EAAU,KAAO,EAAa,IAAM,EAAO,OAEpGA,GAAO,UAAY,EAAW,cAC1BS,IACFT,GAAO,UAGLD,EAAaA,GAAc,IACpBlG,KAFXmG,GAAO,UAAY,EAAW,UAG9BA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,yDAA4EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kCAAqC,EAAqB,QACnM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAELA,GADEpL,EAAG9D,KAAKuU,uBACH,yBAEA,oCAAuC,EAAqB,MAErErF,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,iBACF,CACLA,GAAO,SACP,IAAIsF,EAAO+F,EACX,GAAI/F,EAGF,IAFA,IAAkBhD,GAAM,EACtBkD,EAAKF,EAAKnc,OAAS,EACdmZ,EAAKkD,GAAI,CACdR,EAAeM,EAAKhD,GAAM,GACtBA,IACFtC,GAAO,QAITA,GAAO,SADLiF,EAAW9H,GADT+H,EAAQtQ,EAAGzH,KAAK4O,YAAYiJ,KAEF,kBAC1BJ,IACF5E,GAAO,8CAAgD,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAagJ,GAAiB,OAEnHhF,GAAO,gBAAkB,EAAS,MAASpL,EAAGzH,KAAKqH,eAAeI,EAAG9D,KAAK6L,aAAeqI,EAAeE,GAAU,OAGtHlF,GAAO,QACP,IAKID,EAJFqF,EAAmB,QADjBD,EAAgB,UAAYlF,GACe,OAC3CrL,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAG9D,KAAK6L,aAAe/H,EAAGzH,KAAKsP,YAAYsI,EAAmBI,GAAe,GAAQJ,EAAoB,MAAQI,IAE9HpF,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,yDAA4EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kCAAqC,EAAqB,QACnM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAELA,GADEpL,EAAG9D,KAAKuU,uBACH,yBAEA,oCAAuC,EAAqB,MAErErF,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,kBAGT,GAAI6M,EAAe,CACZpM,IACHT,GAAO,QAAU,EAAa,qBAAuB,EAAgB,MAEvE,IACEmF,EACAC,EAAmB,QADnBD,EAAgB,SAAWlF,EAAO,KADhCqC,EAAK,IAAMrC,GACgC,KACA,OAC3CrL,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAGzH,KAAKsP,YAAYsI,EAAmBI,EAAevQ,EAAG9D,KAAK6L,eAE3E8D,IACFT,GAAO,QAAU,EAAa,sBAAwB,EAAa,sBAC3C,IAApBpL,EAAGuM,cACLnB,GAAO,yDAA4EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kCAAqC,EAAqB,QACnM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAELA,GADEpL,EAAG9D,KAAKuU,uBACH,yBAEA,oCAAuC,EAAqB,MAErErF,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,0FAA4F,EAAa,sBAElHA,GAAO,aAAe,EAAO,SAAW,EAAO,MAAQ,EAAa,YAAc,EAAO,aAAe,EAAU,IAAM,EAAa,IAAM,EAAO,oBAC9I4E,IACF5E,GAAO,8CAAgD,EAAU,KAAO,EAAa,IAAM,EAAO,OAEpGA,GAAO,qBACiB,IAApBpL,EAAGuM,cACLnB,GAAO,yDAA4EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kCAAqC,EAAqB,QACnM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAELA,GADEpL,EAAG9D,KAAKuU,uBACH,yBAEA,oCAAuC,EAAqB,MAErErF,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,mFACHS,IACFT,GAAO,aAEJ,CACL,IAAI2L,EAAON,EACX,GAAIM,EAGF,IAFA,IAAI3G,EAAc4G,GAAM,EACtBC,EAAKF,EAAKxiB,OAAS,EACdyiB,EAAKC,GAAI,CACd7G,EAAe2G,EAAKC,GAAM,GAC1B,IAAI1G,EAAQtQ,EAAGzH,KAAK4O,YAAYiJ,GAC9BI,EAAmBxQ,EAAGzH,KAAK6O,aAAagJ,GACxCC,EAAW9H,EAAQ+H,EACjBtQ,EAAG9D,KAAKuU,yBACVzQ,EAAG/B,UAAY+B,EAAGzH,KAAK2P,QAAQiI,EAAmBC,EAAcpQ,EAAG9D,KAAK6L,eAE1EqD,GAAO,SAAW,EAAa,kBAC3B4E,IACF5E,GAAO,8CAAgD,EAAU,MAAUpL,EAAGzH,KAAK6O,aAAagJ,GAAiB,OAEnHhF,GAAO,qBACiB,IAApBpL,EAAGuM,cACLnB,GAAO,yDAA4EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kCAAqC,EAAqB,QACnM,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,gBAELA,GADEpL,EAAG9D,KAAKuU,uBACH,yBAEA,oCAAuC,EAAqB,MAErErF,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAETA,GAAO,kFAKfpL,EAAG/B,UAAYkS,OACNxE,IACTP,GAAO,gBAET,OAAOA,IAGP,IAAI8M,GAAG,CAAC,SAASlkB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA8BgN,EAAI4K,GACjD,IAsBMuN,EACFC,EAiBEjN,EAqBAuB,EA7DFtB,EAAM,IACNC,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAAOsV,GACpBa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UACzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EACnBQ,EAAU7L,EAAG9D,KAAKqM,OAASvR,GAAWA,EAAQuR,MAIhDuD,EAFED,GACFT,GAAO,cAAgB,EAAS,MAASpL,EAAGzH,KAAK+P,QAAQtR,EAAQuR,MAAOgD,EAAUvL,EAAG+L,aAAgB,KACtF,SAAWV,GAEXrU,EAmEjB,OAjEKA,GAAW6U,KAAoC,IAAxB7L,EAAG9D,KAAK8W,aAC9BnH,IACFT,GAAO,QAAU,EAAW,SAAW,EAAiB,iBAAmB,EAAiB,mBAAqB,EAAW,4BAA8B,EAAiB,kBAAsB,EAAW,qBAE9MA,GAAO,YAAc,EAAU,aAAe,EAAW,6BACrD+M,EAAYnY,EAAG1K,OAAOgV,OAAStK,EAAG1K,OAAOgV,MAAMlG,KACjDgU,EAAe9U,MAAMC,QAAQ4U,IAC1BA,GAA0B,UAAbA,GAAsC,SAAbA,GAAyBC,IAAgD,GAA/BD,EAAU1G,QAAQ,WAAgD,GAA9B0G,EAAU1G,QAAQ,UACzIrG,GAAO,uDAAyD,EAAU,QAAU,EAAU,WAAa,EAAW,iCAEtHA,GAAO,yDAA2D,EAAU,QAE5EA,GAAO,QAAWpL,EAAGzH,KADP,iBAAmB6f,EAAe,IAAM,KACnBD,EAAW,OAAQnY,EAAG9D,KAAKgK,eAAe,GAAS,eAClFkS,IACFhN,GAAO,sDAETA,GAAO,gDAAoD,EAAW,uEAExEA,GAAO,MACHS,IACFT,GAAO,UAGLD,EAAaA,GAAc,IACpBlG,KAFXmG,GAAO,SAAW,EAAW,UAG7BA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,4DAA+EpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,8BAC5I,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,mGAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,eAELA,GADES,EACK,kBAAoB,EAEpB,GAAK,EAEdT,GAAO,2CAA8CpL,EAAa,WAAI,YAAc,EAAU,KAEhGoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,MACHO,IACFP,GAAO,aAGLO,IACFP,GAAO,iBAGJA,IAGP,IAAIiN,GAAG,CAAC,SAASrkB,EAAQf,EAAOD,gBAElCC,EAAOD,QAAU,SAA2BgN,EAAI4K,GAC9C,IAAIQ,EAAM,GACNhO,GAA8B,IAArB4C,EAAG1K,OAAO8H,OACrBkb,EAAetY,EAAGzH,KAAKmP,qBAAqB1H,EAAG1K,OAAQ0K,EAAG/C,MAAMyH,IAAK,QACrEqF,EAAM/J,EAAG1M,KAAKmO,OAAOzB,EAAG1K,QAC1B,GAAI0K,EAAG9D,KAAK0R,eAAgB,CAC1B,IAAI2K,EAAcvY,EAAGzH,KAAKqP,mBAAmB5H,EAAG1K,OAAQ0K,EAAG/C,MAAMmI,UACjE,GAAImT,EAAa,CACf,IAAIC,EAAe,oBAAsBD,EACzC,GAA+B,QAA3BvY,EAAG9D,KAAK0R,eACP,MAAM,IAAIzZ,MAAMqkB,GADiBxY,EAAG1B,OAAOkT,KAAKgH,IAezD,GAXIxY,EAAGlC,QACLsN,GAAO,mBACHhO,IACF4C,EAAGwK,OAAQ,EACXY,GAAO,UAETA,GAAO,sFACHrB,IAAQ/J,EAAG9D,KAAKmB,YAAc2C,EAAG9D,KAAK0C,eACxCwM,GAAO,kBAA2BrB,EAAM,SAGpB,kBAAb/J,EAAG1K,SAAyBgjB,IAAgBtY,EAAG1K,OAAO4B,KAAO,CACtE,IACImU,EAAOrL,EAAGsL,MACVC,EAAWvL,EAAGwL,UACdxU,EAAUgJ,EAAG1K,OAHbsV,EAAW,gBAIXa,EAAczL,EAAGjC,WAAaiC,EAAGzH,KAAK4O,YAAYyD,GAClDc,EAAiB1L,EAAGhC,cAAgB,IAAM4M,EAC1Ce,GAAiB3L,EAAG9D,KAAK0P,UAEzBrD,EAAQ,QAAUgD,GAAY,IAC9BuC,EAAS,QAAUzC,EAgDvB,OA/CkB,IAAdrL,EAAG1K,QACD0K,EAAGlC,MACL6N,GAAgB,EAEhBP,GAAO,QAAU,EAAW,cAE1BD,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,6DAAiGpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,kBAC9J,IAArB1L,EAAG9D,KAAKsQ,WACVpB,GAAO,0CAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,mDAAsDpL,EAAa,WAAI,YAAc,EAAU,KAExGoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,gFAK/BY,GAFApL,EAAGlC,MACDV,EACK,iBAEA,yCAGF,QAAU,EAAW,YAG5B4C,EAAGlC,QACLsN,GAAO,yBAEFA,EAET,GAAIpL,EAAGlC,MAAO,CACZ,IAAI2a,EAAOzY,EAAGlC,MACZuN,EAAOrL,EAAGsL,MAAQ,EAClBC,EAAWvL,EAAGwL,UAAY,EAC1BjD,EAAQ,OAKV,GAJAvI,EAAG0Y,OAAS1Y,EAAG5I,QAAQO,SAASqI,EAAG1M,KAAKmO,OAAOzB,EAAGhE,KAAK1G,SACvD0K,EAAGzI,OAASyI,EAAGzI,QAAUyI,EAAG0Y,cACrB1Y,EAAGlC,MACVkC,EAAG+L,YAAc,CAAC,SACQpW,IAAtBqK,EAAG1K,OAAO6hB,SAAyBnX,EAAG9D,KAAK4a,aAAe9W,EAAG9D,KAAKyc,eAAgB,CACpF,IAAIC,EAAc,wCAClB,GAA+B,QAA3B5Y,EAAG9D,KAAKyc,eACP,MAAM,IAAIxkB,MAAMykB,GADiB5Y,EAAG1B,OAAOkT,KAAKoH,GAGvDxN,GAAO,wBACPA,GAAO,wBACPA,GAAO,qDACF,CACDC,EAAOrL,EAAGsL,MAEZ/C,EAAQ,SADRgD,EAAWvL,EAAGwL,YACgB,IAEhC,GADIzB,IAAK/J,EAAGzI,OAASyI,EAAG5I,QAAQK,IAAIuI,EAAGzI,OAAQwS,IAC3C3M,IAAW4C,EAAGwK,MAAO,MAAM,IAAIrW,MAAM,+BACzCiX,GAAO,aAAe,EAAS,aAEjC,IAgCQyN,EAhCJ/K,EAAS,QAAUzC,EACrBM,GAAiB3L,EAAG9D,KAAK0P,UACzBkN,EAAkB,GAClBC,EAAkB,GAEhBC,EAAchZ,EAAG1K,OAAO8O,KAC1BgU,EAAe9U,MAAMC,QAAQyV,GAa/B,GAZIA,GAAehZ,EAAG9D,KAAK+c,WAAmC,IAAvBjZ,EAAG1K,OAAO2jB,WAC3Cb,GACkC,GAAhCY,EAAYvH,QAAQ,UAAeuH,EAAcA,EAAY3T,OAAO,SAChD,QAAf2T,IACTA,EAAc,CAACA,EAAa,QAC5BZ,GAAe,IAGfA,GAAsC,GAAtBY,EAAYzkB,SAC9BykB,EAAcA,EAAY,GAC1BZ,GAAe,GAEbpY,EAAG1K,OAAO4B,MAAQohB,EAAc,CAClC,GAA0B,QAAtBtY,EAAG9D,KAAKgd,WACV,MAAM,IAAI/kB,MAAM,qDAAuD6L,EAAGhC,cAAgB,8BAC1D,IAAvBgC,EAAG9D,KAAKgd,aACjBZ,GAAe,EACftY,EAAG1B,OAAOkT,KAAK,6CAA+CxR,EAAGhC,cAAgB,MAMrF,GAHIgC,EAAG1K,OAAO6P,UAAYnF,EAAG9D,KAAKiJ,WAChCiG,GAAO,IAAOpL,EAAG/C,MAAMyH,IAAIS,SAAS/Q,KAAK4L,EAAI,aAE3CgZ,EAAa,CACXhZ,EAAG9D,KAAKid,cACNN,EAAiB7Y,EAAGzH,KAAKyO,cAAchH,EAAG9D,KAAKid,YAAaH,IAElE,IAAII,EAAcpZ,EAAG/C,MAAM0H,MAAMqU,GACjC,GAAIH,GAAkBT,IAAgC,IAAhBgB,GAAyBA,IAAgBC,EAAgBD,GAAe,CACxG3N,EAAczL,EAAGjC,WAAa,QAChC2N,EAAiB1L,EAAGhC,cAAgB,QAClCyN,EAAczL,EAAGjC,WAAa,QAChC2N,EAAiB1L,EAAGhC,cAAgB,QAGtC,GADAoN,GAAO,QAAWpL,EAAGzH,KADT6f,EAAe,iBAAmB,iBACXY,EAAazQ,EAAOvI,EAAG9D,KAAKgK,eAAe,GAAS,OACnF2S,EAAgB,CAClB,IAAIS,EAAY,WAAajO,EAC3BkO,EAAW,UAAYlO,EACzBD,GAAO,QAAU,EAAc,aAAe,EAAU,SAAW,EAAa,iBACrD,SAAvBpL,EAAG9D,KAAKid,cACV/N,GAAO,QAAU,EAAc,iCAAqC,EAAU,QAAU,EAAU,mBAAqB,EAAU,MAAQ,EAAU,QAAU,EAAc,aAAe,EAAU,SAAYpL,EAAGzH,KAAKwN,cAAc/F,EAAG1K,OAAO8O,KAAMmE,EAAOvI,EAAG9D,KAAKgK,eAAkB,KAAO,EAAa,MAAQ,EAAU,QAE/TkF,GAAO,QAAU,EAAa,qBAC9B,IAAIoC,EAAOqL,EACX,GAAIrL,EAGF,IAFA,IAAIgM,EAAO9L,GAAM,EACfC,EAAKH,EAAKjZ,OAAS,EACdmZ,EAAKC,GAEG,WADb6L,EAAQhM,EAAKE,GAAM,IAEjBtC,GAAO,aAAe,EAAc,mBAAuB,EAAc,kBAAsB,EAAa,WAAe,EAAU,cAAgB,EAAU,cAAgB,EAAa,UAC1K,UAAToO,GAA8B,WAATA,GAC9BpO,GAAO,aAAe,EAAc,oBAAwB,EAAU,iBAAmB,EAAc,mBAAuB,EAAU,OAAS,EAAU,QAAU,EAAU,IAClK,WAAToO,IACFpO,GAAO,SAAW,EAAU,SAE9BA,GAAO,MAAQ,EAAa,OAAS,EAAU,MAC7B,WAAToO,EACTpO,GAAO,aAAe,EAAU,mBAAuB,EAAU,aAAe,EAAU,cAAgB,EAAa,sBAAwB,EAAU,kBAAsB,EAAU,WAAa,EAAa,YACjM,QAAToO,EACTpO,GAAO,aAAe,EAAU,cAAkB,EAAU,aAAe,EAAU,eAAiB,EAAa,YACnF,SAAvBpL,EAAG9D,KAAKid,aAAmC,SAATK,IAC3CpO,GAAO,aAAe,EAAc,mBAAuB,EAAc,mBAAuB,EAAc,oBAAwB,EAAU,aAAe,EAAa,OAAS,EAAU,QAKjMD,EAAaA,GAAc,IACpBlG,KAFXmG,GAAO,cAGPA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,qDAAyFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,uBAE7KN,GADEgN,EACK,GAAMY,EAAYxY,KAAK,KAEvB,GAAK,EAEd4K,GAAO,QACkB,IAArBpL,EAAG9D,KAAKsQ,WACVpB,GAAO,0BAELA,GADEgN,EACK,GAAMY,EAAYxY,KAAK,KAEvB,GAAK,EAEd4K,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAET,IAAIsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,UAAY,EAAa,sBAChC,IAAIgE,EAAc7D,EAAW,QAAWA,EAAW,GAAM,IAAM,aAE/DH,GAAO,IAAM,EAAU,MAAQ,EAAa,KACvCG,IACHH,GAAO,OAAS,EAAgB,mBAElCA,GAAO,IAAM,EAAgB,KALLG,EAAWvL,EAAG+L,YAAYR,GAAY,sBAKH,OAAS,EAAa,WAC5E,EACDJ,EAAaA,GAAc,IACpBlG,KAAKmG,GAChBA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,qDAAyFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,uBAE7KN,GADEgN,EACK,GAAMY,EAAYxY,KAAK,KAEvB,GAAK,EAEd4K,GAAO,QACkB,IAArBpL,EAAG9D,KAAKsQ,WACVpB,GAAO,0BAELA,GADEgN,EACK,GAAMY,EAAYxY,KAAK,KAEvB,GAAK,EAEd4K,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAGrCY,GAAO,OAGX,GAAIpL,EAAG1K,OAAO4B,OAASohB,EACrBlN,GAAO,IAAOpL,EAAG/C,MAAMyH,IAAIxN,KAAK9C,KAAK4L,EAAI,QAAW,IAChD2L,IACFP,GAAO,qBAELA,GADEqN,EACK,IAEA,QAAU,EAEnBrN,GAAO,OACP2N,GAAmB,SAEhB,CACL,IAAIrI,EAAO1Q,EAAG/C,MACd,GAAIyT,EAGF,IAFA,IAAiBC,GAAM,EACrBC,EAAKF,EAAKnc,OAAS,EACdoc,EAAKC,GAEV,GAAIyI,EADJD,EAAc1I,EAAKC,GAAM,IACS,CAIhC,GAHIyI,EAAYhV,OACdgH,GAAO,QAAWpL,EAAGzH,KAAKwN,cAAcqT,EAAYhV,KAAMmE,EAAOvI,EAAG9D,KAAKgK,eAAkB,QAEzFlG,EAAG9D,KAAK4a,YACV,GAAwB,UAApBsC,EAAYhV,MAAoBpE,EAAG1K,OAAOkP,WAAY,CACxD,IAAIxN,EAAUgJ,EAAG1K,OAAOkP,WAEpBuS,EADYjf,OAAO4J,KAAK1K,GAE5B,GAAI+f,EAGF,IAFA,IAAI3G,EAAc4G,GAAM,EACtBC,EAAKF,EAAKxiB,OAAS,EACdyiB,EAAKC,GAAI,CAGd,QAAqBthB,KADjB8X,EAAOzW,EADXoZ,EAAe2G,EAAKC,GAAM,KAEjBG,QAAuB,CAC9B,IAAI/I,EAAY7F,EAAQvI,EAAGzH,KAAK4O,YAAYiJ,GAC5C,GAAIpQ,EAAG4M,eACL,GAAI5M,EAAG9D,KAAKyc,eAAgB,CACtBC,EAAc,2BAA6BxK,EAC/C,GAA+B,QAA3BpO,EAAG9D,KAAKyc,eACP,MAAM,IAAIxkB,MAAMykB,GADiB5Y,EAAG1B,OAAOkT,KAAKoH,SAIvDxN,GAAO,QAAU,EAAc,kBACJ,SAAvBpL,EAAG9D,KAAK4a,cACV1L,GAAO,OAAS,EAAc,gBAAkB,EAAc,YAEhEA,GAAO,MAAQ,EAAc,MAE3BA,GADyB,UAAvBpL,EAAG9D,KAAK4a,YACH,IAAO9W,EAAG5B,WAAWqP,EAAK0J,SAAY,IAEtC,IAAOzN,KAAKC,UAAU8D,EAAK0J,SAAY,IAEhD/L,GAAO,YAKV,GAAwB,SAApBgO,EAAYhV,MAAmBd,MAAMC,QAAQvD,EAAG1K,OAAOgV,OAAQ,CACxE,IAAI8M,EAAOpX,EAAG1K,OAAOgV,MACrB,GAAI8M,EAGF,IAFA,IAAI3J,EAAMC,GAAM,EACd4J,EAAKF,EAAK7iB,OAAS,EACdmZ,EAAK4J,GAEV,QAAqB3hB,KADrB8X,EAAO2J,EAAK1J,GAAM,IACTyJ,QAAuB,CAC1B/I,EAAY7F,EAAQ,IAAMmF,EAAK,IACnC,GAAI1N,EAAG4M,eACL,GAAI5M,EAAG9D,KAAKyc,eAAgB,CACtBC,EAAc,2BAA6BxK,EAC/C,GAA+B,QAA3BpO,EAAG9D,KAAKyc,eACP,MAAM,IAAIxkB,MAAMykB,GADiB5Y,EAAG1B,OAAOkT,KAAKoH,SAIvDxN,GAAO,QAAU,EAAc,kBACJ,SAAvBpL,EAAG9D,KAAK4a,cACV1L,GAAO,OAAS,EAAc,gBAAkB,EAAc,YAEhEA,GAAO,MAAQ,EAAc,MAE3BA,GADyB,UAAvBpL,EAAG9D,KAAK4a,YACH,IAAO9W,EAAG5B,WAAWqP,EAAK0J,SAAY,IAEtC,IAAOzN,KAAKC,UAAU8D,EAAK0J,SAAY,IAEhD/L,GAAO,MAOnB,IA2BQD,EA3BJsO,EAAOL,EAAY/U,MACvB,GAAIoV,EAGF,IAFA,IAKQpL,EAFNW,EAHS0K,GAAM,EACfC,EAAKF,EAAKllB,OAAS,EACdmlB,EAAKC,GAAI,EAEVC,EADJ5K,EAAQyK,EAAKC,GAAM,MAEbrL,EAAQW,EAAM5a,KAAK4L,EAAIgP,EAAM1O,QAAS8Y,EAAYhV,SAEpDgH,GAAO,IAAM,EAAU,IACnBO,IACFmN,GAAmB,MAMzBnN,IACFP,GAAO,IAAM,EAAoB,IACjC0N,EAAkB,IAEhBM,EAAYhV,OACdgH,GAAO,MACH4N,GAAeA,IAAgBI,EAAYhV,OAASyU,IAElDpN,EAAczL,EAAGjC,WAAa,QAChC2N,EAAiB1L,EAAGhC,cAAgB,SAClCmN,EAAaA,GAAc,IACpBlG,KAJXmG,GAAO,YAKPA,EAAM,IACkB,IAApBpL,EAAGuM,cACLnB,GAAO,qDAAyFpL,EAAY,UAAI,kBAAqBA,EAAGzH,KAAKqH,eAAe8L,GAAmB,uBAE7KN,GADEgN,EACK,GAAMY,EAAYxY,KAAK,KAEvB,GAAK,EAEd4K,GAAO,QACkB,IAArBpL,EAAG9D,KAAKsQ,WACVpB,GAAO,0BAELA,GADEgN,EACK,GAAMY,EAAYxY,KAAK,KAEvB,GAAK,EAEd4K,GAAO,MAELpL,EAAG9D,KAAKuQ,UACVrB,GAAO,6BAA+B,EAAgB,mCAAsCpL,EAAa,WAAI,YAAc,EAAU,KAEvIoL,GAAO,OAEPA,GAAO,OAELsB,EAAQtB,EACZA,EAAMD,EAAWwB,MAIbvB,IAHCpL,EAAG4M,eAAiBjB,EAEnB3L,EAAGwK,MACE,+BAAiC,EAAU,OAE3C,uBAAyB,EAAU,oBAGrC,cAAgB,EAAU,+EAEnCY,GAAO,QAGPO,IACFP,GAAO,mBAELA,GADEqN,EACK,IAEA,QAAU,EAEnBrN,GAAO,OACP2N,GAAmB,MAsB7B,SAASM,EAAgBD,GAEvB,IADA,IAAI/U,EAAQ+U,EAAY/U,MACfvQ,EAAI,EAAGA,EAAIuQ,EAAM9P,OAAQT,IAChC,GAAI8lB,EAAevV,EAAMvQ,IAAK,OAAO,EAGzC,SAAS8lB,EAAe5K,GACtB,YAAoCrZ,IAA7BqK,EAAG1K,OAAO0Z,EAAM1O,UAA2B0O,EAAM9J,YAG1D,SAAoC8J,GAElC,IADA,IAAI6K,EAAO7K,EAAM9J,WACRpR,EAAI,EAAGA,EAAI+lB,EAAKtlB,OAAQT,IAC/B,QAA2B6B,IAAvBqK,EAAG1K,OAAOukB,EAAK/lB,IAAmB,OAAO,EANuBgmB,CAA2B9K,GAQnG,OA/BIrD,IACFP,GAAO,IAAM,EAAoB,KAE/BqN,GACErb,GACFgO,GAAO,6CACPA,GAAO,+CAEPA,GAAO,+BACPA,GAAO,gCAETA,GAAO,wBAEPA,GAAO,QAAU,EAAW,sBAAwB,EAAS,IAkBxDA,IAGP,IAAI2O,GAAG,CAAC,SAAS/lB,EAAQf,EAAOD,gBAGlC,IAAIkW,EAAa,yBACbvK,EAAiB3K,EAAQ,kBACzBgmB,EAAmBhmB,EAAQ,uBAkI/B,SAASimB,EAAgB9Z,EAAY+Z,GACnCD,EAAgB/hB,OAAS,KACzB,IAAInB,EAAIxD,KAAK4mB,iBAAmB5mB,KAAK4mB,kBACF5mB,KAAKwI,QAAQie,GAAkB,GAElE,GAAIjjB,EAAEoJ,GAAa,OAAO,EAE1B,GADA8Z,EAAgB/hB,OAASnB,EAAEmB,OACvBgiB,EACF,MAAM,IAAI/lB,MAAM,yCAA4CZ,KAAKkN,WAAW1J,EAAEmB,SAE9E,OAAO,EA1IXjF,EAAOD,QAAU,CACfonB,IAcF,SAAoB9Z,EAASH,GAG3B,IAAIlD,EAAQ1J,KAAK0J,MACjB,GAAIA,EAAMmI,SAAS9E,GACjB,MAAM,IAAInM,MAAM,WAAamM,EAAU,uBAEzC,IAAK4I,EAAW9N,KAAKkF,GACnB,MAAM,IAAInM,MAAM,WAAamM,EAAU,8BAEzC,GAAIH,EAAY,CACd5M,KAAK0mB,gBAAgB9Z,GAAY,GAEjC,IAAI6F,EAAW7F,EAAWiE,KAC1B,GAAId,MAAMC,QAAQyC,GAChB,IAAK,IAAIlS,EAAE,EAAGA,EAAEkS,EAASzR,OAAQT,IAC/BumB,EAAS/Z,EAAS0F,EAASlS,GAAIqM,QAEjCka,EAAS/Z,EAAS0F,EAAU7F,GAG9B,IAAIqJ,EAAarJ,EAAWqJ,WACxBA,IACErJ,EAAWoI,OAAShV,KAAKkC,MAAM8S,QACjCiB,EAAa,CACXK,MAAO,CACLL,EACA,CAAEtS,KAAQ,qFAIhBiJ,EAAWF,eAAiB1M,KAAKwI,QAAQyN,GAAY,IAOzD,SAAS6Q,EAAS/Z,EAAS0F,EAAU7F,GAEnC,IADA,IAAIma,EACKxmB,EAAE,EAAGA,EAAEmJ,EAAM1I,OAAQT,IAAK,CACjC,IAAIymB,EAAKtd,EAAMnJ,GACf,GAAIymB,EAAGnW,MAAQ4B,EAAU,CACvBsU,EAAYC,EACZ,OAICD,GAEHrd,EAAMgI,KADNqV,EAAY,CAAElW,KAAM4B,EAAU3B,MAAO,KAIvC,IAAIvE,EAAO,CACTQ,QAASA,EACTH,WAAYA,EACZmF,QAAQ,EACRlR,KAAMuK,EACNuG,WAAY/E,EAAW+E,YAEzBoV,EAAUjW,MAAMY,KAAKnF,GACrB7C,EAAMqI,OAAOhF,GAAWR,EAG1B,OA7BA7C,EAAMmI,SAAS9E,GAAWrD,EAAMyH,IAAIpE,IAAW,EA6BxC/M,MA7EPwB,IAuFF,SAAoBuL,GAElB,IAAIR,EAAOvM,KAAK0J,MAAMqI,OAAOhF,GAC7B,OAAOR,EAAOA,EAAKK,WAAa5M,KAAK0J,MAAMmI,SAAS9E,KAAY,GAzFhEka,OAmGF,SAAuBla,GAErB,IAAIrD,EAAQ1J,KAAK0J,aACVA,EAAMmI,SAAS9E,UACfrD,EAAMyH,IAAIpE,UACVrD,EAAMqI,OAAOhF,GACpB,IAAK,IAAIxM,EAAE,EAAGA,EAAEmJ,EAAM1I,OAAQT,IAE5B,IADA,IAAIuQ,EAAQpH,EAAMnJ,GAAGuQ,MACZuF,EAAE,EAAGA,EAAEvF,EAAM9P,OAAQqV,IAC5B,GAAIvF,EAAMuF,GAAGtJ,SAAWA,EAAS,CAC/B+D,EAAM9G,OAAOqM,EAAG,GAChB,MAIN,OAAOrW,MAjHPyC,SAAUikB,IAyIV,CAACQ,sBAAsB,GAAGC,iBAAiB,KAAKC,GAAG,CAAC,SAAS3mB,EAAQf,EAAOD,GAC9EC,EAAOD,QAAQ,CACXgE,QAAW,0CACX+S,IAAO,iFACP6Q,YAAe,mEACfxW,KAAQ,SACRiG,SAAY,CAAE,SACd7F,WAAc,CACV+D,MAAS,CACLnE,KAAQ,SACRyF,MAAS,CACL,CAAEoH,OAAU,yBACZ,CAAEA,OAAU,mBAIxBiF,sBAAwB,IAG1B,IAAI2E,GAAG,CAAC,SAAS7mB,EAAQf,EAAOD,GAClCC,EAAOD,QAAQ,CACXgE,QAAW,0CACX+S,IAAO,0CACP+Q,MAAS,0BACT9Q,YAAe,CACX+Q,YAAe,CACX3W,KAAQ,QACRmO,SAAY,EACZjI,MAAS,CAAEpT,KAAQ,MAEvB8jB,mBAAsB,CAClB5W,KAAQ,UACRG,QAAW,GAEf0W,2BAA8B,CAC1B/I,MAAS,CACL,CAAEhb,KAAQ,oCACV,CAAEigB,QAAW,KAGrBlN,YAAe,CACXmI,KAAQ,CACJ,QACA,UACA,UACA,OACA,SACA,SACA,WAGR8I,YAAe,CACX9W,KAAQ,QACRkG,MAAS,CAAElG,KAAQ,UACnB4O,aAAe,EACfmE,QAAW,KAGnB/S,KAAQ,CAAC,SAAU,WACnBI,WAAc,CACVuF,IAAO,CACH3F,KAAQ,SACR6M,OAAU,iBAEdja,QAAW,CACPoN,KAAQ,SACR6M,OAAU,OAEd/Z,KAAQ,CACJkN,KAAQ,SACR6M,OAAU,iBAEd9L,SAAY,CACRf,KAAQ,UAEZ0W,MAAS,CACL1W,KAAQ,UAEZwW,YAAe,CACXxW,KAAQ,UAEZ+S,SAAW,EACXgE,SAAY,CACR/W,KAAQ,UACR+S,SAAW,GAEfiE,SAAY,CACRhX,KAAQ,QACRkG,OAAS,GAEbsI,WAAc,CACVxO,KAAQ,SACRiX,iBAAoB,GAExB/W,QAAW,CACPF,KAAQ,UAEZkX,iBAAoB,CAChBlX,KAAQ,UAEZG,QAAW,CACPH,KAAQ,UAEZiX,iBAAoB,CAChBjX,KAAQ,UAEZoO,UAAa,CAAEtb,KAAQ,oCACvBub,UAAa,CAAEvb,KAAQ,4CACvB4b,QAAW,CACP1O,KAAQ,SACR6M,OAAU,SAEd2D,gBAAmB,CAAE1d,KAAQ,KAC7BoT,MAAS,CACLT,MAAS,CACL,CAAE3S,KAAQ,KACV,CAAEA,KAAQ,8BAEdigB,SAAW,GAEf7E,SAAY,CAAEpb,KAAQ,oCACtBqb,SAAY,CAAErb,KAAQ,4CACtB8b,YAAe,CACX5O,KAAQ,UACR+S,SAAW,GAEfhF,SAAY,CAAEjb,KAAQ,KACtBwb,cAAiB,CAAExb,KAAQ,oCAC3Byb,cAAiB,CAAEzb,KAAQ,4CAC3BmT,SAAY,CAAEnT,KAAQ,6BACtBgf,qBAAwB,CAAEhf,KAAQ,KAClC8S,YAAe,CACX5F,KAAQ,SACR8R,qBAAwB,CAAEhf,KAAQ,KAClCigB,QAAW,IAEf3S,WAAc,CACVJ,KAAQ,SACR8R,qBAAwB,CAAEhf,KAAQ,KAClCigB,QAAW,IAEfpB,kBAAqB,CACjB3R,KAAQ,SACR8R,qBAAwB,CAAEhf,KAAQ,KAClC6b,cAAiB,CAAE9B,OAAU,SAC7BkG,QAAW,IAEf/W,aAAgB,CACZgE,KAAQ,SACR8R,qBAAwB,CACpBrM,MAAS,CACL,CAAE3S,KAAQ,KACV,CAAEA,KAAQ,gCAItB6b,cAAiB,CAAE7b,KAAQ,KAC3BuT,OAAS,EACT2H,KAAQ,CACJhO,KAAQ,QACRkG,OAAS,EACTiI,SAAY,EACZS,aAAe,GAEnB5O,KAAQ,CACJyF,MAAS,CACL,CAAE3S,KAAQ,6BACV,CACIkN,KAAQ,QACRkG,MAAS,CAAEpT,KAAQ,6BACnBqb,SAAY,EACZS,aAAe,KAI3B/B,OAAU,CAAE7M,KAAQ,UACpBmX,iBAAoB,CAAEnX,KAAQ,UAC9BoX,gBAAmB,CAAEpX,KAAQ,UAC7BiO,GAAM,CAACnb,KAAQ,KACfrB,KAAQ,CAACqB,KAAQ,KACjBukB,KAAQ,CAACvkB,KAAQ,KACjBgb,MAAS,CAAEhb,KAAQ,6BACnB2S,MAAS,CAAE3S,KAAQ,6BACnB2b,MAAS,CAAE3b,KAAQ,6BACnBkT,IAAO,CAAElT,KAAQ,MAErBigB,SAAW,IAGb,IAAIuE,GAAG,CAAC,SAAS1nB,EAAQf,EAAOD,gBAOlCC,EAAOD,QAAU,SAAS6I,EAAM3H,EAAGkV,GACjC,GAAIlV,IAAMkV,EAAG,OAAO,EAEpB,GAAIlV,GAAKkV,GAAiB,iBAALlV,GAA6B,iBAALkV,EAAe,CAC1D,GAAIlV,EAAE8D,cAAgBoR,EAAEpR,YAAa,OAAO,EAE5C,IAAIzD,EAAQT,EAAG4N,EACf,GAAI4B,MAAMC,QAAQrP,GAAI,CAEpB,IADAK,EAASL,EAAEK,SACG6U,EAAE7U,OAAQ,OAAO,EAC/B,IAAKT,EAAIS,EAAgB,GAART,KACf,IAAK+H,EAAM3H,EAAEJ,GAAIsV,EAAEtV,IAAK,OAAO,EACjC,OAAO,EAKT,GAAII,EAAE8D,cAAgBsD,OAAQ,OAAOpH,EAAEoJ,SAAW8L,EAAE9L,QAAUpJ,EAAEynB,QAAUvS,EAAEuS,MAC5E,GAAIznB,EAAE0nB,UAAY9jB,OAAOnD,UAAUinB,QAAS,OAAO1nB,EAAE0nB,YAAcxS,EAAEwS,UACrE,GAAI1nB,EAAE2nB,WAAa/jB,OAAOnD,UAAUknB,SAAU,OAAO3nB,EAAE2nB,aAAezS,EAAEyS,WAIxE,IADAtnB,GADAmN,EAAO5J,OAAO4J,KAAKxN,IACLK,UACCuD,OAAO4J,KAAK0H,GAAG7U,OAAQ,OAAO,EAE7C,IAAKT,EAAIS,EAAgB,GAART,KACf,IAAKgE,OAAOnD,UAAU4L,eAAejM,KAAK8U,EAAG1H,EAAK5N,IAAK,OAAO,EAEhE,IAAKA,EAAIS,EAAgB,GAART,KAAY,CAC3B,IAAIe,EAAM6M,EAAK5N,GAEf,IAAK+H,EAAM3H,EAAEW,GAAMuU,EAAEvU,IAAO,OAAO,EAGrC,OAAO,EAIT,OAAOX,GAAIA,GAAKkV,GAAIA,IAGpB,IAAI0S,GAAG,CAAC,SAAS9nB,EAAQf,EAAOD,gBAGlCC,EAAOD,QAAU,SAAUiT,EAAM/J,GAET,mBADTA,EAANA,GAAa,MACcA,EAAO,CAAE6f,IAAK7f,IAC9C,IAEiCnJ,EAF7BipB,EAAiC,kBAAhB9f,EAAK8f,QAAwB9f,EAAK8f,OAEnDD,EAAM7f,EAAK6f,MAAkBhpB,EAQ9BmJ,EAAK6f,IAPG,SAAUE,GACb,OAAO,SAAU/nB,EAAGkV,GAGhB,OAAOrW,EAFI,CAAE8B,IAAKX,EAAGY,MAAOmnB,EAAK/nB,IACtB,CAAEW,IAAKuU,EAAGtU,MAAOmnB,EAAK7S,QAMzC8S,EAAO,GACX,OAAO,SAAUvS,EAAWsS,GAKxB,GAJIA,GAAQA,EAAKE,QAAiC,mBAAhBF,EAAKE,SACnCF,EAAOA,EAAKE,eAGHxmB,IAATsmB,EAAJ,CACA,GAAmB,iBAARA,EAAkB,OAAOG,SAASH,GAAQ,GAAKA,EAAO,OACjE,GAAoB,iBAATA,EAAmB,OAAOvS,KAAKC,UAAUsS,GAGpD,GAAI3Y,MAAMC,QAAQ0Y,GAAO,CAErB,IADA7Q,EAAM,IACDtX,EAAI,EAAGA,EAAImoB,EAAK1nB,OAAQT,IACrBA,IAAGsX,GAAO,KACdA,GAAOzB,EAAUsS,EAAKnoB,KAAO,OAEjC,OAAOsX,EAAM,IAGjB,GAAa,OAAT6Q,EAAe,MAAO,OAE1B,IAA4B,IAAxBC,EAAKzK,QAAQwK,GAAc,CAC3B,GAAID,EAAQ,OAAOtS,KAAKC,UAAU,aAClC,MAAM,IAAI0S,UAAU,yCAMxB,IAHA,IAAIC,EAAYJ,EAAKjX,KAAKgX,GAAQ,EAC9Bva,EAAO5J,OAAO4J,KAAKua,GAAMM,KAAKR,GAAOA,EAAIE,IAC7C7Q,EAAM,GACDtX,EAAI,EAAGA,EAAI4N,EAAKnN,OAAQT,IAAK,CAC9B,IAAIe,EAAM6M,EAAK5N,GACXgB,EAAQ6U,EAAUsS,EAAKpnB,IAEtBC,IACDsW,IAAKA,GAAO,KAChBA,GAAO1B,KAAKC,UAAU9U,GAAO,IAAMC,GAGvC,OADAonB,EAAK3e,OAAO+e,EAAW,GAChB,IAAMlR,EAAM,KAtChB,CAuCJnF,KAGL,IAAIuW,GAAG,CAAC,SAASxoB,EAAQf,EAAOD,gBAGlC,IAAIkO,EAAWjO,EAAOD,QAAU,SAAUsC,EAAQ4G,EAAMugB,GAEnC,mBAARvgB,IACTugB,EAAKvgB,EACLA,EAAO,IAwDX,SAASwgB,EAAUxgB,EAAMygB,EAAKC,EAAMtnB,EAAQ+M,EAASC,EAAYC,EAAeC,EAAezC,EAAc0C,GAC3G,GAAInN,GAA2B,iBAAVA,IAAuBgO,MAAMC,QAAQjO,GAAS,CAEjE,IAAK,IAAIT,KADT8nB,EAAIrnB,EAAQ+M,EAASC,EAAYC,EAAeC,EAAezC,EAAc0C,GAC7DnN,EAAQ,CACtB,IAAIqB,EAAMrB,EAAOT,GACjB,GAAIyO,MAAMC,QAAQ5M,IAChB,GAAI9B,KAAOqM,EAAS2b,cAClB,IAAK,IAAI/oB,EAAE,EAAGA,EAAE6C,EAAIpC,OAAQT,IAC1B4oB,EAAUxgB,EAAMygB,EAAKC,EAAMjmB,EAAI7C,GAAIuO,EAAU,IAAMxN,EAAM,IAAMf,EAAGwO,EAAYD,EAASxN,EAAKS,EAAQxB,QAEnG,GAAIe,KAAOqM,EAAS4b,eACzB,GAAInmB,GAAqB,iBAAPA,EAChB,IAAK,IAAIwR,KAAQxR,EACf+lB,EAAUxgB,EAAMygB,EAAKC,EAAMjmB,EAAIwR,GAAO9F,EAAU,IAAMxN,EAAM,IAAoBsT,EAY/ErE,QAAQ,KAAM,MAAMA,QAAQ,MAAO,MAZmDxB,EAAYD,EAASxN,EAAKS,EAAQ6S,QAEpHtT,KAAOqM,EAASkE,UAAalJ,EAAKkG,WAAavN,KAAOqM,EAAS6b,gBACxEL,EAAUxgB,EAAMygB,EAAKC,EAAMjmB,EAAK0L,EAAU,IAAMxN,EAAKyN,EAAYD,EAASxN,EAAKS,GAGnFsnB,EAAKtnB,EAAQ+M,EAASC,EAAYC,EAAeC,EAAezC,EAAc0C,IApEhFia,CAAUxgB,EAHc,mBADxBugB,EAAKvgB,EAAKugB,IAAMA,GACsBA,EAAKA,EAAGE,KAAO,aAC1CF,EAAGG,MAAQ,aAEKtnB,EAAQ,GAAIA,IAIzC4L,EAASkE,SAAW,CAClBwP,iBAAiB,EACjBtK,OAAO,EACP6H,UAAU,EACV+D,sBAAsB,EACtBnD,eAAe,EACf3I,KAAK,GAGPlJ,EAAS2b,cAAgB,CACvBvS,OAAO,EACP4H,OAAO,EACPrI,OAAO,EACPgJ,OAAO,GAGT3R,EAAS4b,cAAgB,CACvB9S,aAAa,EACbxF,YAAY,EACZuR,mBAAmB,EACnB3V,cAAc,GAGhBc,EAAS6b,aAAe,CACtB5F,SAAS,EACT/E,MAAM,EACN3H,OAAO,EACPJ,UAAU,EACV/F,SAAS,EACTC,SAAS,EACT+W,kBAAkB,EAClBD,kBAAkB,EAClBzI,YAAY,EACZJ,WAAW,EACXC,WAAW,EACXK,SAAS,EACT7B,QAAQ,EACRqB,UAAU,EACVC,UAAU,EACVS,aAAa,EACbN,eAAe,EACfC,eAAe,IAgCf,IAAIqK,GAAG,CAAC,SAAShpB,EAAQf,EAAOD,GAEjC,IAAUK,EAAAA,EAITE,KAAM,SAAWP,gBAEnB,SAASiqB,IACL,IAAK,IAAIC,EAAOxf,UAAUnJ,OAAQ4oB,EAAO7Z,MAAM4Z,GAAOE,EAAO,EAAGA,EAAOF,EAAME,IACzED,EAAKC,GAAQ1f,UAAU0f,GAG3B,GAAkB,EAAdD,EAAK5oB,OAAY,CACjB4oB,EAAK,GAAKA,EAAK,GAAGra,MAAM,GAAI,GAE5B,IADA,IAAIua,EAAKF,EAAK5oB,OAAS,EACd+oB,EAAI,EAAGA,EAAID,IAAMC,EACtBH,EAAKG,GAAKH,EAAKG,GAAGxa,MAAM,GAAI,GAGhC,OADAqa,EAAKE,GAAMF,EAAKE,GAAIva,MAAM,GACnBqa,EAAK3c,KAAK,IAEjB,OAAO2c,EAAK,GAGpB,SAASI,EAAOhkB,GACZ,MAAO,MAAQA,EAAM,IAEzB,SAASikB,EAAO3pB,GACZ,YAAa8B,IAAN9B,EAAkB,YAAoB,OAANA,EAAa,OAASiE,OAAOnD,UAAUknB,SAASvnB,KAAKT,GAAGoH,MAAM,KAAK0R,MAAM1R,MAAM,KAAKwiB,QAAQC,cAEvI,SAASC,EAAYpkB,GACjB,OAAOA,EAAIokB,cAef,SAASC,EAAUC,GACf,IAAIC,EAAU,WAEVC,EAAU,QAEVC,EAAWf,EAAMc,EAAS,YAI1BE,EAAeV,EAAOA,EAAO,UAAYS,EAAW,IAAMA,EAAWA,EAAW,IAAMA,EAAWA,GAAY,IAAMT,EAAO,cAAgBS,EAAW,IAAMA,EAAWA,GAAY,IAAMT,EAAO,IAAMS,EAAWA,IAGhNE,EAAe,sCACfC,EAAalB,EAFF,0BAEsBiB,GAGrCE,EAAaP,EAAQ,oBAAsB,KAE3CQ,EAAepB,EAAMa,EAASC,EAAS,iBAJvBF,EAAQ,8EAAgF,MAKpGS,EAAUf,EAAOO,EAAUb,EAAMa,EAASC,EAAS,eAAiB,KACpEQ,EAAYhB,EAAOA,EAAOU,EAAe,IAAMhB,EAAMoB,EAAcH,EAAc,UAAY,KAE7FM,GADajB,EAAOA,8DAAuIQ,GACtIR,EAAOA,oEAA6IQ,IAE7KU,EAAelB,EAAOiB,EAAqB,MAAQA,EAAqB,MAAQA,EAAqB,MAAQA,GACzGE,EAAOnB,EAAOS,EAAW,SACzBW,EAAQpB,EAAOA,EAAOmB,EAAO,MAAQA,GAAQ,IAAMD,GACnDG,EAAgBrB,EAAOA,EAAOmB,EAAO,OAAS,MAAQC,GAE1DE,EAAgBtB,EAAO,SAAWA,EAAOmB,EAAO,OAAS,MAAQC,GAEjEG,EAAgBvB,EAAOA,EAAOmB,GAAQ,UAAYnB,EAAOmB,EAAO,OAAS,MAAQC,GAEjFI,EAAgBxB,EAAOA,EAAOA,EAAOmB,EAAO,OAAS,QAAUA,GAAQ,UAAYnB,EAAOmB,EAAO,OAAS,MAAQC,GAElHK,EAAgBzB,EAAOA,EAAOA,EAAOmB,EAAO,OAAS,QAAUA,GAAQ,UAAYnB,EAAOmB,EAAO,OAAS,MAAQC,GAElHM,EAAgB1B,EAAOA,EAAOA,EAAOmB,EAAO,OAAS,QAAUA,GAAQ,UAAYA,EAAO,MAAQC,GAElGO,EAAgB3B,EAAOA,EAAOA,EAAOmB,EAAO,OAAS,QAAUA,GAAQ,UAAYC,GAEnFQ,EAAgB5B,EAAOA,EAAOA,EAAOmB,EAAO,OAAS,QAAUA,GAAQ,UAAYA,GAEnFU,EAAgB7B,EAAOA,EAAOA,EAAOmB,EAAO,OAAS,QAAUA,GAAQ,WAEvEW,EAAe9B,EAAO,CAACqB,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,GAAe5e,KAAK,MAC/J8e,EAAU/B,EAAOA,EAAOc,EAAe,IAAMJ,GAAgB,KAIjEsB,GAFahC,EAAO8B,EAAe,QAAUC,GAExB/B,EAAO8B,EAAe9B,EAAO,eAAiBS,EAAW,QAAUsB,IAExFE,EAAajC,EAAO,OAASS,EAAW,OAASf,EAAMoB,EAAcH,EAAc,SAAW,KAC1FuB,EAAclC,EAAO,MAAQA,EAAOgC,EAAqB,IAAMF,EAAe,IAAMG,GAAc,OAEtGE,EAAYnC,EAAOA,EAAOU,EAAe,IAAMhB,EAAMoB,EAAcH,IAAiB,KAChFyB,EAAQpC,EAAOkC,EAAc,IAAMhB,EAAe,MAAQiB,EAAY,KAAYA,GAClFE,EAAQrC,EAAOQ,EAAU,KACzB8B,EAAatC,EAAOA,EAAOgB,EAAY,KAAO,IAAMoB,EAAQpC,EAAO,MAAQqC,GAAS,KACpFE,EAASvC,EAAOU,EAAe,IAAMhB,EAAMoB,EAAcH,EAAc,aACvE6B,EAAWxC,EAAOuC,EAAS,KAC3BE,EAAczC,EAAOuC,EAAS,KAC9BG,EAAiB1C,EAAOA,EAAOU,EAAe,IAAMhB,EAAMoB,EAAcH,EAAc,UAAY,KAClGgC,EAAgB3C,EAAOA,EAAO,MAAQwC,GAAY,KAClDI,EAAiB5C,EAAO,MAAQA,EAAOyC,EAAcE,GAAiB,KAE1EE,EAAiB7C,EAAO0C,EAAiBC,GAEzCG,EAAiB9C,EAAOyC,EAAcE,GAEtCI,EAAc,MAAQR,EAAS,IAE3BS,GADQhD,EAAO2C,EAAgB,IAAMC,EAAiB,IAAMC,EAAiB,IAAMC,EAAiB,IAAMC,GACjG/C,EAAOA,EAAOuC,EAAS,IAAM7C,EAAM,WAAYmB,IAAe,MACvEoC,EAAYjD,EAAOA,EAAOuC,EAAS,aAAe,KAClDW,EAAalD,EAAOA,EAAO,SAAWsC,EAAaK,GAAiB,IAAMC,EAAiB,IAAME,EAAiB,IAAMC,GACxHI,EAAOnD,EAAOe,EAAU,MAAQmC,EAAalD,EAAO,MAAQgD,GAAU,IAAMhD,EAAO,MAAQiD,GAAa,KACxGG,EAAiBpD,EAAOA,EAAO,SAAWsC,EAAaK,GAAiB,IAAMC,EAAiB,IAAMC,EAAiB,IAAME,GAC5HM,EAAYrD,EAAOoD,EAAiBpD,EAAO,MAAQgD,GAAU,IAAMhD,EAAO,MAAQiD,GAAa,KAC9EjD,EAAOmD,EAAO,IAAME,GACrBrD,EAAOe,EAAU,MAAQmC,EAAalD,EAAO,MAAQgD,GAAU,KACtChD,EAAOA,EAAO,UAAYA,EAAO,IAAMgB,EAAY,MAAQ,KAAOoB,EAAQ,IAAMpC,EAAO,OAASqC,EAAQ,KAAO,MAAQ,KAAOM,EAAgB,IAAMC,EAAiB,IAAME,EAAiB,IAAMC,EAAc,KAAO/C,EAAO,OAASgD,EAAS,KAAahD,EAAO,OAASiD,EAAY,KACvSjD,EAAOA,EAAO,UAAYA,EAAO,IAAMgB,EAAY,MAAQ,KAAOoB,EAAQ,IAAMpC,EAAO,OAASqC,EAAQ,KAAO,MAAQ,KAAOM,EAAgB,IAAMC,EAAiB,IAAMC,EAAiB,IAAME,EAAc,KAAO/C,EAAO,OAASgD,EAAS,KAAahD,EAAO,OAASiD,EAAY,KAC1QjD,EAAOA,EAAO,UAAYA,EAAO,IAAMgB,EAAY,MAAQ,KAAOoB,EAAQ,IAAMpC,EAAO,OAASqC,EAAQ,KAAO,MAAQ,KAAOM,EAAgB,IAAMC,EAAiB,IAAME,EAAiB,IAAMC,EAAc,KAAO/C,EAAO,OAASgD,EAAS,KACrQhD,EAAO,OAASiD,EAAY,KAC1BjD,EAAO,IAAMgB,EAAY,MAA6BhB,EAAO,OAASqC,EAAQ,KACzG,MAAO,CACHiB,WAAY,IAAIvlB,OAAO2hB,EAAM,MAAOa,EAASC,EAAS,eAAgB,KACtE+C,aAAc,IAAIxlB,OAAO2hB,EAAM,YAAaoB,EAAcH,GAAe,KACzE6C,SAAU,IAAIzlB,OAAO2hB,EAAM,kBAAmBoB,EAAcH,GAAe,KAC3E8C,SAAU,IAAI1lB,OAAO2hB,EAAM,kBAAmBoB,EAAcH,GAAe,KAC3E+C,kBAAmB,IAAI3lB,OAAO2hB,EAAM,eAAgBoB,EAAcH,GAAe,KACjFgD,UAAW,IAAI5lB,OAAO2hB,EAAM,SAAUoB,EAAcH,EAAc,iBAAkBE,GAAa,KACjG+C,aAAc,IAAI7lB,OAAO2hB,EAAM,SAAUoB,EAAcH,EAAc,kBAAmB,KACxFkD,OAAQ,IAAI9lB,OAAO2hB,EAAM,MAAOoB,EAAcH,GAAe,KAC7DmD,WAAY,IAAI/lB,OAAO+iB,EAAc,KACrCiD,YAAa,IAAIhmB,OAAO2hB,EAAM,SAAUoB,EAAcF,GAAa,KACnEoD,YAAa,IAAIjmB,OAAO2iB,EAAc,KACtCuD,YAAa,IAAIlmB,OAAO,KAAOmjB,EAAe,MAC9CgD,YAAa,IAAInmB,OAAO,SAAW+jB,EAAe,IAAM9B,EAAOA,EAAO,eAAiBS,EAAW,QAAU,IAAMsB,EAAU,KAAO,WAG3I,IAAIoC,EAAe9D,GAAU,GAEzB+D,EAAe/D,GAAU,GAEzBgE,EA2BK,SAAUjhB,EAAK7M,GACpB,GAAIwP,MAAMC,QAAQ5C,GAChB,OAAOA,EACF,GAAIkhB,OAAOC,YAAYhqB,OAAO6I,GACnC,OA9BJ,SAAuBA,EAAK7M,GAC1B,IAAIiuB,EAAO,GACPC,GAAK,EACLC,GAAK,EACLC,OAAKvsB,EAET,IACE,IAAK,IAAiCwsB,EAA7BC,EAAKzhB,EAAIkhB,OAAOC,cAAmBE,GAAMG,EAAKC,EAAGC,QAAQC,QAChEP,EAAK9c,KAAKkd,EAAGrtB,QAEThB,GAAKiuB,EAAKxtB,SAAWT,GAH8CkuB,GAAK,IAK9E,MAAOO,GACPN,GAAK,EACLC,EAAKK,EACL,QACA,KACOP,GAAMI,EAAW,QAAGA,EAAW,SACpC,QACA,GAAIH,EAAI,MAAMC,GAIlB,OAAOH,EAOES,CAAc7hB,EAAK7M,GAE1B,MAAM,IAAIuoB,UAAU,yDA6BtBoG,EAAS,WAaTC,EAAgB,QAChBC,EAAgB,aAChBC,EAAkB,4BAGlB1qB,EAAS,CACZ2qB,SAAY,kDACZC,YAAa,iDACbC,gBAAiB,iBAKdC,EAAQnW,KAAKmW,MACbC,EAAqBC,OAAOC,aAUhC,SAASC,EAAQhf,GAChB,MAAM,IAAIif,WAAWnrB,EAAOkM,IA8B7B,SAASkf,EAAUC,EAAQC,GAC1B,IAAIzgB,EAAQwgB,EAAOtoB,MAAM,KACrBuC,EAAS,GAWb,OAVmB,EAAfuF,EAAMxO,SAGTiJ,EAASuF,EAAM,GAAK,IACpBwgB,EAASxgB,EAAM,IAMTvF,EAhCR,SAAamJ,EAAO6c,GAGnB,IAFA,IAAIhmB,EAAS,GACTjJ,EAASoS,EAAMpS,OACZA,KACNiJ,EAAOjJ,GAAUivB,EAAG7c,EAAMpS,IAE3B,OAAOiJ,EAyBOsH,EAFdye,EAASA,EAAOzf,QAAQ8e,EAAiB,MACrB3nB,MAAM,KACAuoB,GAAIhjB,KAAK,KAiBpC,SAASijB,EAAWF,GAInB,IAHA,IAAIG,EAAS,GACTC,EAAU,EACVpvB,EAASgvB,EAAOhvB,OACbovB,EAAUpvB,GAAQ,CACxB,IAGKqvB,EAHD9uB,EAAQyuB,EAAO1d,WAAW8d,KACjB,OAAT7uB,GAAmBA,GAAS,OAAU6uB,EAAUpvB,EAG3B,QAAX,OADTqvB,EAAQL,EAAO1d,WAAW8d,OAG7BD,EAAOze,OAAe,KAARnQ,IAAkB,KAAe,KAAR8uB,GAAiB,QAIxDF,EAAOze,KAAKnQ,GACZ6uB,KAGDD,EAAOze,KAAKnQ,GAGd,OAAO4uB,EAgDW,SAAfG,EAAqCC,EAAOC,GAG/C,OAAOD,EAAQ,GAAK,IAAMA,EAAQ,MAAgB,GAARC,IAAc,GAQ7C,SAARC,EAAuBC,EAAOC,EAAWC,GAC5C,IAAInf,EAAI,EAGR,IAFAif,EAAQE,EAAYnB,EAAMiB,EA7KhB,KA6KgCA,GAAS,EACnDA,GAASjB,EAAMiB,EAAQC,GACeE,IAARH,EAAmCjf,GAnLvD,GAoLTif,EAAQjB,EAAMiB,EA9JII,IAgKnB,OAAOrB,EAAMhe,EAAI,GAAsBif,GAASA,EAnLtC,KA6LE,SAATK,EAAyBC,GAE5B,IAAIb,EAAS,GACTc,EAAcD,EAAMhwB,OACpBT,EAAI,EACJH,EA/LU,IAgMV8wB,EAjMa,GAuMbC,EAAQH,EAAMI,YArMH,KAsMXD,EAAQ,IACXA,EAAQ,GAGT,IAAK,IAAI9a,EAAI,EAAGA,EAAI8a,IAAS9a,EAED,KAAvB2a,EAAM1e,WAAW+D,IACpBwZ,EAAQ,aAETM,EAAOze,KAAKsf,EAAM1e,WAAW+D,IAM9B,IAAK,IAhFmCgb,EAgF/BloB,EAAgB,EAARgoB,EAAYA,EAAQ,EAAI,EAAGhoB,EAAQ8nB,GAAuC,CAQ1F,IADA,IAAIK,EAAO/wB,EACFgxB,EAAI,EAAG9f,EApOP,IAoOoCA,GApOpC,GAoO+C,CAE1Cwf,GAAT9nB,GACH0mB,EAAQ,iBAGT,IAAIU,GA9FkCc,EA8FbL,EAAM1e,WAAWnJ,MA7F5B,GAAO,GACfkoB,EAAY,GAEhBA,EAAY,GAAO,GACfA,EAAY,GAEhBA,EAAY,GAAO,GACfA,EAAY,GApJV,IAAA,IA4OJd,GAAiBA,EAAQd,GAAOP,EAAS3uB,GAAKgxB,KACjD1B,EAAQ,YAGTtvB,GAAKgwB,EAAQgB,EACb,IAAIlxB,EAAIoR,GAAKyf,EAhPL,EAgPwBA,EA/OxB,IA+OmBzf,EA/OnB,GA+O6CA,EAAIyf,EAEzD,GAAIX,EAAQlwB,EACX,MAGD,IAAImxB,EAvPI,GAuPgBnxB,EACpBkxB,EAAI9B,EAAMP,EAASsC,IACtB3B,EAAQ,YAGT0B,GAAKC,EAGN,IAAI3Z,EAAMsY,EAAOnvB,OAAS,EAC1BkwB,EAAOT,EAAMlwB,EAAI+wB,EAAMzZ,EAAa,GAARyZ,GAIxB7B,EAAMlvB,EAAIsX,GAAOqX,EAAS9uB,GAC7ByvB,EAAQ,YAGTzvB,GAAKqvB,EAAMlvB,EAAIsX,GACftX,GAAKsX,EAGLsY,EAAOnmB,OAAOzJ,IAAK,EAAGH,GAGvB,OAAOuvB,OAAO8B,cAAcvnB,MAAMylB,OAAQQ,GAU9B,SAATuB,EAAyBV,GAC5B,IAAIb,EAAS,GAMTc,GAHJD,EAAQd,EAAWc,IAGKhwB,OAGpBZ,EA7RU,IA8RVswB,EAAQ,EACRQ,EAhSa,GAmSbS,GAA4B,EAC5BC,GAAoB,EACpBC,OAAiBzvB,EAErB,IACC,IAAK,IAA0C0vB,EAAtCC,EAAYf,EAAM1C,OAAOC,cAAsBoD,GAA6BG,EAAQC,EAAUjD,QAAQC,MAAO4C,GAA4B,EAAM,CACvJ,IAAIK,EAAiBF,EAAMvwB,MAEvBywB,EAAiB,KACpB7B,EAAOze,KAAKge,EAAmBsC,KAGhC,MAAOhD,GACR4C,GAAoB,EACpBC,EAAiB7C,EAChB,QACD,KACM2C,GAA6BI,EAAUE,QAC3CF,EAAUE,SAEV,QACD,GAAIL,EACH,MAAMC,GAKT,IAAIK,EAAc/B,EAAOnvB,OACrBmxB,EAAiBD,EAWrB,IALIA,GACH/B,EAAOze,KApUO,KAwURygB,EAAiBlB,GAAa,CAIpC,IAAImB,EAAIlD,EACJmD,GAA6B,EAC7BC,GAAqB,EACrBC,OAAkBnwB,EAEtB,IACC,IAAK,IAA2CowB,EAAvCC,EAAazB,EAAM1C,OAAOC,cAAuB8D,GAA8BG,EAASC,EAAW3D,QAAQC,MAAOsD,GAA6B,EAAM,CAC7J,IAAIK,EAAeF,EAAOjxB,MAENnB,GAAhBsyB,GAAqBA,EAAeN,IACvCA,EAAIM,IAML,MAAO1D,GACRsD,GAAqB,EACrBC,EAAkBvD,EACjB,QACD,KACMqD,GAA8BI,EAAWR,QAC7CQ,EAAWR,SAEX,QACD,GAAIK,EACH,MAAMC,GAKT,IAAII,EAAwBR,EAAiB,EACzCC,EAAIhyB,EAAIqvB,GAAOP,EAASwB,GAASiC,IACpC9C,EAAQ,YAGTa,IAAU0B,EAAIhyB,GAAKuyB,EACnBvyB,EAAIgyB,EAEJ,IAAIQ,GAA6B,EAC7BC,GAAqB,EACrBC,OAAkB1wB,EAEtB,IACC,IAAK,IAA2C2wB,EAAvCC,EAAahC,EAAM1C,OAAOC,cAAuBqE,GAA8BG,EAASC,EAAWlE,QAAQC,MAAO6D,GAA6B,EAAM,CAC7J,IAAIK,EAAgBF,EAAOxxB,MAK3B,GAHI0xB,EAAgB7yB,KAAOswB,EAAQxB,GAClCW,EAAQ,YAELoD,GAAiB7yB,EAAG,CAGvB,IADA,IAAI8yB,EAAIxC,EACCjf,EAxYH,IAwYgCA,GAxYhC,GAwY2C,CAChD,IAAIpR,EAAIoR,GAAKyf,EAxYR,EAwY2BA,EAvY3B,IAuYsBzf,EAvYtB,GAuYgDA,EAAIyf,EACzD,GAAIgC,EAAI7yB,EACP,MAED,IAAI8yB,EAAUD,EAAI7yB,EACdmxB,EA9YC,GA8YmBnxB,EACxB8vB,EAAOze,KAAKge,EAAmBY,EAAajwB,EAAI8yB,EAAU3B,EAAY,KACtE0B,EAAIzD,EAAM0D,EAAU3B,GAGrBrB,EAAOze,KAAKge,EAAmBY,EAAa4C,EAAG,KAC/ChC,EAAOT,EAAMC,EAAOiC,EAAuBR,GAAkBD,GAC7DxB,EAAQ,IACNyB,IAGH,MAAOnD,GACR6D,GAAqB,EACrBC,EAAkB9D,EACjB,QACD,KACM4D,GAA8BI,EAAWf,QAC7Ce,EAAWf,SAEX,QACD,GAAIY,EACH,MAAMC,KAKPpC,IACAtwB,EAEH,OAAO+vB,EAAOljB,KAAK,IA5SpB,IAoVImmB,EAAW,CAMdC,QAAW,QAQXC,KAAQ,CACPvC,OAAUb,EACVwB,OApWe,SAAoBte,GACpC,OAAOuc,OAAO8B,cAAcvnB,MAAMylB,OA/IX,SAAUviB,GAChC,GAAI2C,MAAMC,QAAQ5C,GAAM,CACtB,IAAK,IAAI7M,EAAI,EAAG4c,EAAOpN,MAAM3C,EAAIpM,QAAST,EAAI6M,EAAIpM,OAAQT,IAAK4c,EAAK5c,GAAK6M,EAAI7M,GAE7E,OAAO4c,EAEP,OAAOpN,MAAMwjB,KAAKnmB,GAyIqBomB,CAAkBpgB,MAqW5D2d,OAAUA,EACVW,OAAUA,EACV+B,QA7Ba,SAAiBzC,GAC9B,OAAOjB,EAAUiB,EAAO,SAAUhB,GACjC,OAAOZ,EAAcvnB,KAAKmoB,GAAU,OAAS0B,EAAO1B,GAAUA,KA4B/D0D,UA/Ce,SAAmB1C,GAClC,OAAOjB,EAAUiB,EAAO,SAAUhB,GACjC,OAAOb,EAActnB,KAAKmoB,GAAUe,EAAOf,EAAOzgB,MAAM,GAAG4a,eAAiB6F,MAkF1E2D,EAAU,GACd,SAASC,EAAWC,GAChB,IAAIrzB,EAAIqzB,EAAIvhB,WAAW,GAGvB,OADI9R,EAAI,GAAQ,KAAOA,EAAE8nB,SAAS,IAAI8B,cAAuB5pB,EAAI,IAAS,IAAMA,EAAE8nB,SAAS,IAAI8B,cAAuB5pB,EAAI,KAAU,KAAOA,GAAK,EAAI,KAAK8nB,SAAS,IAAI8B,cAAgB,KAAW,GAAJ5pB,EAAS,KAAK8nB,SAAS,IAAI8B,cAAuB,KAAO5pB,GAAK,GAAK,KAAK8nB,SAAS,IAAI8B,cAAgB,KAAO5pB,GAAK,EAAI,GAAK,KAAK8nB,SAAS,IAAI8B,cAAgB,KAAW,GAAJ5pB,EAAS,KAAK8nB,SAAS,IAAI8B,cAG/X,SAAS0J,EAAY9tB,GAIjB,IAHA,IAAI+tB,EAAS,GACTxzB,EAAI,EACJyzB,EAAKhuB,EAAIhF,OACNT,EAAIyzB,GAAI,CACX,IAMYC,EAQAC,EACAC,EAfR3zB,EAAI4zB,SAASpuB,EAAIquB,OAAO9zB,EAAI,EAAG,GAAI,IACnCC,EAAI,KACJuzB,GAAUpE,OAAOC,aAAapvB,GAC9BD,GAAK,GACO,KAALC,GAAYA,EAAI,KACT,GAAVwzB,EAAKzzB,GACD0zB,EAAKG,SAASpuB,EAAIquB,OAAO9zB,EAAI,EAAG,GAAI,IACxCwzB,GAAUpE,OAAOC,cAAkB,GAAJpvB,IAAW,EAAS,GAALyzB,IAE9CF,GAAU/tB,EAAIquB,OAAO9zB,EAAG,GAE5BA,GAAK,GACO,KAALC,GACO,GAAVwzB,EAAKzzB,GACD2zB,EAAKE,SAASpuB,EAAIquB,OAAO9zB,EAAI,EAAG,GAAI,IACpC4zB,EAAKC,SAASpuB,EAAIquB,OAAO9zB,EAAI,EAAG,GAAI,IACxCwzB,GAAUpE,OAAOC,cAAkB,GAAJpvB,IAAW,IAAW,GAAL0zB,IAAY,EAAS,GAALC,IAEhEJ,GAAU/tB,EAAIquB,OAAO9zB,EAAG,GAE5BA,GAAK,IAELwzB,GAAU/tB,EAAIquB,OAAO9zB,EAAG,GACxBA,GAAK,GAGb,OAAOwzB,EAEX,SAASO,EAA4BC,EAAYC,GAC7C,SAASC,EAAiBzuB,GACtB,IAAI0uB,EAASZ,EAAY9tB,GACzB,OAAQ0uB,EAAOxuB,MAAMsuB,EAAS1G,YAAoB4G,EAAN1uB,EAQhD,OANIuuB,EAAWI,SAAQJ,EAAWI,OAAShF,OAAO4E,EAAWI,QAAQpkB,QAAQikB,EAASxG,YAAayG,GAAkBtK,cAAc5Z,QAAQikB,EAASlH,WAAY,UACpIlrB,IAAxBmyB,EAAWK,WAAwBL,EAAWK,SAAWjF,OAAO4E,EAAWK,UAAUrkB,QAAQikB,EAASxG,YAAayG,GAAkBlkB,QAAQikB,EAASjH,aAAcqG,GAAYrjB,QAAQikB,EAASxG,YAAa5D,SAC1LhoB,IAApBmyB,EAAWM,OAAoBN,EAAWM,KAAOlF,OAAO4E,EAAWM,MAAMtkB,QAAQikB,EAASxG,YAAayG,GAAkBtK,cAAc5Z,QAAQikB,EAAShH,SAAUoG,GAAYrjB,QAAQikB,EAASxG,YAAa5D,SACxLhoB,IAApBmyB,EAAW1f,OAAoB0f,EAAW1f,KAAO8a,OAAO4E,EAAW1f,MAAMtE,QAAQikB,EAASxG,YAAayG,GAAkBlkB,QAAQgkB,EAAWI,OAASH,EAAS/G,SAAW+G,EAAS9G,kBAAmBkG,GAAYrjB,QAAQikB,EAASxG,YAAa5D,SAC1NhoB,IAArBmyB,EAAWO,QAAqBP,EAAWO,MAAQnF,OAAO4E,EAAWO,OAAOvkB,QAAQikB,EAASxG,YAAayG,GAAkBlkB,QAAQikB,EAAS7G,UAAWiG,GAAYrjB,QAAQikB,EAASxG,YAAa5D,SAC1KhoB,IAAxBmyB,EAAWjlB,WAAwBilB,EAAWjlB,SAAWqgB,OAAO4E,EAAWjlB,UAAUiB,QAAQikB,EAASxG,YAAayG,GAAkBlkB,QAAQikB,EAAS5G,aAAcgG,GAAYrjB,QAAQikB,EAASxG,YAAa5D,IAC3MmK,EAGX,SAASQ,EAAmB/uB,GACxB,OAAOA,EAAIuK,QAAQ,UAAW,OAAS,IAE3C,SAASykB,EAAeH,EAAML,GAC1B,IAAIvuB,EAAU4uB,EAAK3uB,MAAMsuB,EAASvG,cAAgB,GAG9CgH,EADW5G,EAAcpoB,EAAS,GACf,GAEvB,OAAIgvB,EACOA,EAAQvtB,MAAM,KAAK6J,IAAIwjB,GAAoB9nB,KAAK,KAEhD4nB,EAGf,SAASK,EAAeL,EAAML,GAC1B,IAAIvuB,EAAU4uB,EAAK3uB,MAAMsuB,EAAStG,cAAgB,GAE9CiH,EAAY9G,EAAcpoB,EAAS,GACnCgvB,EAAUE,EAAU,GACpBC,EAAOD,EAAU,GAErB,GAAIF,EAAS,CAYT,IAXA,IAAII,EAAwBJ,EAAQ9K,cAAcziB,MAAM,MAAM4tB,UAC1DC,EAAyBlH,EAAcgH,EAAuB,GAC9DG,EAAOD,EAAuB,GAC9BE,EAAQF,EAAuB,GAE/BG,EAAcD,EAAQA,EAAM/tB,MAAM,KAAK6J,IAAIwjB,GAAsB,GACjEY,EAAaH,EAAK9tB,MAAM,KAAK6J,IAAIwjB,GACjCa,EAAyBpB,EAASvG,YAAYpmB,KAAK8tB,EAAWA,EAAW30B,OAAS,IAClF60B,EAAaD,EAAyB,EAAI,EAC1CE,EAAkBH,EAAW30B,OAAS60B,EACtCE,EAAShmB,MAAM8lB,GACV9L,EAAI,EAAGA,EAAI8L,IAAc9L,EAC9BgM,EAAOhM,GAAK2L,EAAY3L,IAAM4L,EAAWG,EAAkB/L,IAAM,GAEjE6L,IACAG,EAAOF,EAAa,GAAKb,EAAee,EAAOF,EAAa,GAAIrB,IAEpE,IAgBQwB,EACAC,EANJC,EAXgBH,EAAOI,OAAO,SAAUC,EAAKC,EAAOltB,GACpD,IACQmtB,EAOR,OARKD,GAAmB,MAAVA,KACNC,EAAcF,EAAIA,EAAIp1B,OAAS,KAChBs1B,EAAYntB,MAAQmtB,EAAYt1B,SAAWmI,EAC1DmtB,EAAYt1B,SAEZo1B,EAAI1kB,KAAK,CAAEvI,MAAOA,EAAOnI,OAAQ,KAGlCo1B,GACR,IACmCpN,KAAK,SAAUroB,EAAGkV,GACpD,OAAOA,EAAE7U,OAASL,EAAEK,SACrB,GACCu1B,OAAU,EAWd,OAPIA,EAHAL,GAAgD,EAA3BA,EAAkBl1B,QACnCg1B,EAAWD,EAAOxmB,MAAM,EAAG2mB,EAAkB/sB,OAC7C8sB,EAAUF,EAAOxmB,MAAM2mB,EAAkB/sB,MAAQ+sB,EAAkBl1B,QAC7Dg1B,EAAS/oB,KAAK,KAAO,KAAOgpB,EAAQhpB,KAAK,MAEzC8oB,EAAO9oB,KAAK,KAEtBmoB,IACAmB,GAAW,IAAMnB,GAEdmB,EAEP,OAAO1B,EAGf,IAAI2B,EAAY,kIACZC,OAAiDr0B,IAAzB,GAAG8D,MAAM,SAAS,GAC9C,SAAS4H,EAAM4oB,GACX,IAAIC,EAA6B,EAAnBxsB,UAAUnJ,aAA+BoB,IAAjB+H,UAAU,GAAmBA,UAAU,GAAK,GAE9EoqB,EAAa,GACbC,GAA2B,IAAhBmC,EAAQC,IAAgBxI,EAAeD,EAC5B,WAAtBwI,EAAQE,YAAwBH,GAAaC,EAAQhC,OAASgC,EAAQhC,OAAS,IAAM,IAAM,KAAO+B,GACtG,IAAIzwB,EAAUywB,EAAUxwB,MAAMswB,GAC9B,GAAIvwB,EAAS,CACLwwB,GAEAlC,EAAWI,OAAS1uB,EAAQ,GAC5BsuB,EAAWK,SAAW3uB,EAAQ,GAC9BsuB,EAAWM,KAAO5uB,EAAQ,GAC1BsuB,EAAWuC,KAAO1C,SAASnuB,EAAQ,GAAI,IACvCsuB,EAAW1f,KAAO5O,EAAQ,IAAM,GAChCsuB,EAAWO,MAAQ7uB,EAAQ,GAC3BsuB,EAAWjlB,SAAWrJ,EAAQ,GAE1B8wB,MAAMxC,EAAWuC,QACjBvC,EAAWuC,KAAO7wB,EAAQ,MAK9BsuB,EAAWI,OAAS1uB,EAAQ,SAAM7D,EAClCmyB,EAAWK,UAAuC,IAA5B8B,EAAUxY,QAAQ,KAAcjY,EAAQ,QAAK7D,EACnEmyB,EAAWM,MAAoC,IAA7B6B,EAAUxY,QAAQ,MAAejY,EAAQ,QAAK7D,EAChEmyB,EAAWuC,KAAO1C,SAASnuB,EAAQ,GAAI,IACvCsuB,EAAW1f,KAAO5O,EAAQ,IAAM,GAChCsuB,EAAWO,OAAoC,IAA5B4B,EAAUxY,QAAQ,KAAcjY,EAAQ,QAAK7D,EAChEmyB,EAAWjlB,UAAuC,IAA5BonB,EAAUxY,QAAQ,KAAcjY,EAAQ,QAAK7D,EAE/D20B,MAAMxC,EAAWuC,QACjBvC,EAAWuC,KAAOJ,EAAUxwB,MAAM,iCAAmCD,EAAQ,QAAK7D,IAGtFmyB,EAAWM,OAEXN,EAAWM,KAAOK,EAAeF,EAAeT,EAAWM,KAAML,GAAWA,IAM5ED,EAAWsC,eAHWz0B,IAAtBmyB,EAAWI,aAAgDvyB,IAAxBmyB,EAAWK,eAA8CxyB,IAApBmyB,EAAWM,WAA0CzyB,IAApBmyB,EAAWuC,MAAuBvC,EAAW1f,WAA6BzS,IAArBmyB,EAAWO,WAE5I1yB,IAAtBmyB,EAAWI,OACK,gBACQvyB,IAAxBmyB,EAAWjlB,SACK,WAEA,MANA,gBASvBqnB,EAAQE,WAAmC,WAAtBF,EAAQE,WAA0BF,EAAQE,YAActC,EAAWsC,YACxFtC,EAAW/oB,MAAQ+oB,EAAW/oB,OAAS,gBAAkBmrB,EAAQE,UAAY,eAGjF,IAAIG,EAAgBrD,GAASgD,EAAQhC,QAAUJ,EAAWI,QAAU,IAAIxK,eAExE,GAAKwM,EAAQM,gBAAoBD,GAAkBA,EAAcC,eAc7D3C,EAA4BC,EAAYC,OAdsC,CAE9E,GAAID,EAAWM,OAAS8B,EAAQO,YAAcF,GAAiBA,EAAcE,YAEzE,IACI3C,EAAWM,KAAOzB,EAASK,QAAQc,EAAWM,KAAKtkB,QAAQikB,EAASxG,YAAa8F,GAAa3J,eAChG,MAAOhqB,GACLo0B,EAAW/oB,MAAQ+oB,EAAW/oB,OAAS,kEAAoErL,EAInHm0B,EAA4BC,EAAYpG,GAMxC6I,GAAiBA,EAAclpB,OAC/BkpB,EAAclpB,MAAMymB,EAAYoC,QAGpCpC,EAAW/oB,MAAQ+oB,EAAW/oB,OAAS,yBAE3C,OAAO+oB,EAuBX,IAAI4C,EAAO,WACPC,EAAO,cACPC,EAAO,gBACPC,EAAO,yBACX,SAASC,EAAkBvG,GAEvB,IADA,IAAIb,EAAS,GACNa,EAAMhwB,QACT,GAAIgwB,EAAM9qB,MAAMixB,GACZnG,EAAQA,EAAMzgB,QAAQ4mB,EAAM,SACzB,GAAInG,EAAM9qB,MAAMkxB,GACnBpG,EAAQA,EAAMzgB,QAAQ6mB,EAAM,UACzB,GAAIpG,EAAM9qB,MAAMmxB,GACnBrG,EAAQA,EAAMzgB,QAAQ8mB,EAAM,KAC5BlH,EAAO/W,WACJ,GAAc,MAAV4X,GAA2B,OAAVA,EACxBA,EAAQ,OACL,CACH,IAAIwG,EAAKxG,EAAM9qB,MAAMoxB,GACrB,IAAIE,EAKA,MAAM,IAAI52B,MAAM,oCAJhB,IAAI62B,EAAID,EAAG,GACXxG,EAAQA,EAAMzhB,MAAMkoB,EAAEz2B,QACtBmvB,EAAOze,KAAK+lB,GAMxB,OAAOtH,EAAOljB,KAAK,IAGvB,SAASoD,EAAUkkB,GACf,IAAIoC,EAA6B,EAAnBxsB,UAAUnJ,aAA+BoB,IAAjB+H,UAAU,GAAmBA,UAAU,GAAK,GAE9EqqB,EAAWmC,EAAQC,IAAMxI,EAAeD,EACxCuJ,EAAY,GAEZV,EAAgBrD,GAASgD,EAAQhC,QAAUJ,EAAWI,QAAU,IAAIxK,eAGxE,GADI6M,GAAiBA,EAAc3mB,WAAW2mB,EAAc3mB,UAAUkkB,EAAYoC,GAC9EpC,EAAWM,OAEPL,EAAStG,YAAYrmB,KAAK0sB,EAAWM,QAIhC8B,EAAQO,YAAcF,GAAiBA,EAAcE,YAEtD,IACI3C,EAAWM,KAAQ8B,EAAQC,IAAmGxD,EAASM,UAAUa,EAAWM,MAA3HzB,EAASK,QAAQc,EAAWM,KAAKtkB,QAAQikB,EAASxG,YAAa8F,GAAa3J,eAC/G,MAAOhqB,GACLo0B,EAAW/oB,MAAQ+oB,EAAW/oB,OAAS,+CAAkDmrB,EAAQC,IAAgB,UAAV,SAAuB,kBAAoBz2B,EAKlKm0B,EAA4BC,EAAYC,GACd,WAAtBmC,EAAQE,WAA0BtC,EAAWI,SAC7C+C,EAAUhmB,KAAK6iB,EAAWI,QAC1B+C,EAAUhmB,KAAK,MAEnB,IAhFyB6iB,EACrBC,EACAkD,EAyFID,EAXJE,GA/EAnD,GAA2B,IA+EiBmC,EA/EzBC,IAAgBxI,EAAeD,EAClDuJ,EAAY,QACYt1B,KAHHmyB,EAgFWA,GA7ErBK,WACX8C,EAAUhmB,KAAK6iB,EAAWK,UAC1B8C,EAAUhmB,KAAK,WAEKtP,IAApBmyB,EAAWM,MAEX6C,EAAUhmB,KAAKwjB,EAAeF,EAAerF,OAAO4E,EAAWM,MAAOL,GAAWA,GAAUjkB,QAAQikB,EAAStG,YAAa,SAAU0J,EAAGC,EAAIC,GACtI,MAAO,IAAMD,GAAMC,EAAK,MAAQA,EAAK,IAAM,OAGpB,iBAApBvD,EAAWuC,MAAgD,iBAApBvC,EAAWuC,OACzDY,EAAUhmB,KAAK,KACfgmB,EAAUhmB,KAAKie,OAAO4E,EAAWuC,QAE9BY,EAAU12B,OAAS02B,EAAUzqB,KAAK,SAAM7K,GA2F/C,YA3BkBA,IAAdu1B,IAC0B,WAAtBhB,EAAQE,WACRa,EAAUhmB,KAAK,MAEnBgmB,EAAUhmB,KAAKimB,GACXpD,EAAW1f,MAAsC,MAA9B0f,EAAW1f,KAAKkjB,OAAO,IAC1CL,EAAUhmB,KAAK,WAGCtP,IAApBmyB,EAAW1f,OACP4iB,EAAIlD,EAAW1f,KACd8hB,EAAQqB,cAAkBhB,GAAkBA,EAAcgB,eAC3DP,EAAIF,EAAkBE,SAERr1B,IAAdu1B,IACAF,EAAIA,EAAElnB,QAAQ,QAAS,SAE3BmnB,EAAUhmB,KAAK+lB,SAEMr1B,IAArBmyB,EAAWO,QACX4C,EAAUhmB,KAAK,KACfgmB,EAAUhmB,KAAK6iB,EAAWO,aAEF1yB,IAAxBmyB,EAAWjlB,WACXooB,EAAUhmB,KAAK,KACfgmB,EAAUhmB,KAAK6iB,EAAWjlB,WAEvBooB,EAAUzqB,KAAK,IAG1B,SAASgrB,EAAkBnH,EAAMoH,GAC7B,IAAIvB,EAA6B,EAAnBxsB,UAAUnJ,aAA+BoB,IAAjB+H,UAAU,GAAmBA,UAAU,GAAK,GAG9EguB,EAAS,GAqDb,OAvDwBhuB,UAAU,KAI9B2mB,EAAOhjB,EAAMuC,EAAUygB,EAAM6F,GAAUA,GACvCuB,EAAWpqB,EAAMuC,EAAU6nB,EAAUvB,GAAUA,MAEnDA,EAAUA,GAAW,IACRyB,UAAYF,EAASvD,QAC9BwD,EAAOxD,OAASuD,EAASvD,OAEzBwD,EAAOvD,SAAWsD,EAAStD,SAC3BuD,EAAOtD,KAAOqD,EAASrD,KACvBsD,EAAOrB,KAAOoB,EAASpB,KACvBqB,EAAOtjB,KAAO0iB,EAAkBW,EAASrjB,MAAQ,IACjDsjB,EAAOrD,MAAQoD,EAASpD,aAEE1yB,IAAtB81B,EAAStD,eAA4CxyB,IAAlB81B,EAASrD,WAAwCzyB,IAAlB81B,EAASpB,MAE3EqB,EAAOvD,SAAWsD,EAAStD,SAC3BuD,EAAOtD,KAAOqD,EAASrD,KACvBsD,EAAOrB,KAAOoB,EAASpB,KACvBqB,EAAOtjB,KAAO0iB,EAAkBW,EAASrjB,MAAQ,IACjDsjB,EAAOrD,MAAQoD,EAASpD,QAEnBoD,EAASrjB,MAQsB,MAA5BqjB,EAASrjB,KAAKkjB,OAAO,GACrBI,EAAOtjB,KAAO0iB,EAAkBW,EAASrjB,OAOrCsjB,EAAOtjB,UALYzS,IAAlB0uB,EAAK8D,eAAwCxyB,IAAd0uB,EAAK+D,WAAoCzyB,IAAd0uB,EAAKgG,MAAwBhG,EAAKjc,KAErFic,EAAKjc,KAGCic,EAAKjc,KAAKtF,MAAM,EAAGuhB,EAAKjc,KAAKuc,YAAY,KAAO,GAAK8G,EAASrjB,KAF9DqjB,EAASrjB,KAFT,IAAMqjB,EAASrjB,KAMjCsjB,EAAOtjB,KAAO0iB,EAAkBY,EAAOtjB,OAE3CsjB,EAAOrD,MAAQoD,EAASpD,QAnBxBqD,EAAOtjB,KAAOic,EAAKjc,KAEfsjB,EAAOrD,WADY1yB,IAAnB81B,EAASpD,MACMoD,EAASpD,MAEThE,EAAKgE,OAkB5BqD,EAAOvD,SAAW9D,EAAK8D,SACvBuD,EAAOtD,KAAO/D,EAAK+D,KACnBsD,EAAOrB,KAAOhG,EAAKgG,MAEvBqB,EAAOxD,OAAS7D,EAAK6D,QAEzBwD,EAAO7oB,SAAW4oB,EAAS5oB,SACpB6oB,EAmCX,SAASE,EAAkBryB,EAAK2wB,GAC5B,OAAO3wB,GAAOA,EAAIsiB,WAAW/X,QAASomB,GAAYA,EAAQC,IAAiCxI,EAAaJ,YAAxCG,EAAaH,YAAwC8F,GAGzH,IAAIwE,EAAU,CACV3D,OAAQ,OACRuC,YAAY,EACZppB,MAAO,SAAeymB,GAKlB,OAHKA,EAAWM,OACZN,EAAW/oB,MAAQ+oB,EAAW/oB,OAAS,+BAEpC+oB,GAEXlkB,UAAW,SAAmBkkB,GAC1B,IAAIgE,EAAqD,UAA5C5I,OAAO4E,EAAWI,QAAQxK,cAYvC,OAVIoK,EAAWuC,QAAUyB,EAAS,IAAM,KAA2B,KAApBhE,EAAWuC,OACtDvC,EAAWuC,UAAO10B,GAGjBmyB,EAAW1f,OACZ0f,EAAW1f,KAAO,KAKf0f,IAIXiE,EAAY,CACZ7D,OAAQ,QACRuC,WAAYoB,EAAQpB,WACpBppB,MAAOwqB,EAAQxqB,MACfuC,UAAWioB,EAAQjoB,WAGvB,SAASooB,EAASC,GACd,MAAsC,kBAAxBA,EAAaH,OAAuBG,EAAaH,OAAuD,QAA9C5I,OAAO+I,EAAa/D,QAAQxK,cAGxG,IAAIwO,EAAY,CACZhE,OAAQ,KACRuC,YAAY,EACZppB,MAAO,SAAeymB,GAClB,IAAImE,EAAenE,EAOnB,OALAmE,EAAaH,OAASE,EAASC,GAE/BA,EAAaE,cAAgBF,EAAa7jB,MAAQ,MAAQ6jB,EAAa5D,MAAQ,IAAM4D,EAAa5D,MAAQ,IAC1G4D,EAAa7jB,UAAOzS,EACpBs2B,EAAa5D,WAAQ1yB,EACds2B,GAEXroB,UAAW,SAAmBqoB,GAW1B,IACQG,EACAC,EACAjkB,EACAigB,EAQR,OArBI4D,EAAa5B,QAAU2B,EAASC,GAAgB,IAAM,KAA6B,KAAtBA,EAAa5B,OAC1E4B,EAAa5B,UAAO10B,GAGW,kBAAxBs2B,EAAaH,SACpBG,EAAa/D,OAAS+D,EAAaH,OAAS,MAAQ,KACpDG,EAAaH,YAASn2B,GAGtBs2B,EAAaE,eACTC,EAAwBH,EAAaE,aAAalxB,MAAM,KAGxDotB,GAFAgE,EAAyBzK,EAAcwK,EAAuB,IAE/B,GAEnCH,EAAa7jB,MAHTA,EAAOikB,EAAuB,KAGG,MAATjkB,EAAeA,OAAOzS,EAClDs2B,EAAa5D,MAAQA,EACrB4D,EAAaE,kBAAex2B,GAGhCs2B,EAAappB,cAAWlN,EACjBs2B,IAIXK,EAAY,CACZpE,OAAQ,MACRuC,WAAYyB,EAAUzB,WACtBppB,MAAO6qB,EAAU7qB,MACjBuC,UAAWsoB,EAAUtoB,WAGrB2oB,EAAI,GAGJlO,EAAe,mGACfL,EAAW,cAeXwO,GAdejP,EAAOA,EAAO,UAAYS,EAAW,IAAMA,EAAWA,EAAW,IAAMA,EAAWA,GAAY,IAAMT,EAAO,cAAgBS,EAAW,IAAMA,EAAWA,GAAY,IAAMT,EAAO,IAAMS,EAAWA,IActMf,EADA,6DACe,cAEzBoE,EAAa,IAAI/lB,OAAO+iB,EAAc,KACtCkD,EAAc,IAAIjmB,OAjBHiiB,yJAiBwB,KACvCkP,EAAiB,IAAInxB,OAAO2hB,EAAM,MANxB,wDAMwC,QAAS,QAASuP,GAAU,KAC9EE,GAAa,IAAIpxB,OAAO2hB,EAAM,MAAOoB,EAJrB,uCAImD,KACnEsO,GAAcD,GAClB,SAAS1E,GAAiBzuB,GACtB,IAAI0uB,EAASZ,EAAY9tB,GACzB,OAAQ0uB,EAAOxuB,MAAM4nB,GAAoB4G,EAAN1uB,EAEvC,IAAIqzB,GAAY,CACZ1E,OAAQ,SACR7mB,MAAO,SAAkBymB,EAAYoC,GACjC,IAAI2C,EAAmB/E,EACnBthB,EAAKqmB,EAAiBrmB,GAAKqmB,EAAiBzkB,KAAOykB,EAAiBzkB,KAAKnN,MAAM,KAAO,GAE1F,GADA4xB,EAAiBzkB,UAAOzS,EACpBk3B,EAAiBxE,MAAO,CAIxB,IAHA,IAAIyE,GAAiB,EACjBC,EAAU,GACVC,EAAUH,EAAiBxE,MAAMptB,MAAM,KAClCqiB,EAAI,EAAGD,EAAK2P,EAAQz4B,OAAQ+oB,EAAID,IAAMC,EAAG,CAC9C,IAAI2P,EAASD,EAAQ1P,GAAGriB,MAAM,KAC9B,OAAQgyB,EAAO,IACX,IAAK,KAED,IADA,IAAIC,EAAUD,EAAO,GAAGhyB,MAAM,KACrBkyB,EAAK,EAAGC,EAAMF,EAAQ34B,OAAQ44B,EAAKC,IAAOD,EAC/C3mB,EAAGvB,KAAKioB,EAAQC,IAEpB,MACJ,IAAK,UACDN,EAAiBQ,QAAUzB,EAAkBqB,EAAO,GAAI/C,GACxD,MACJ,IAAK,OACD2C,EAAiBS,KAAO1B,EAAkBqB,EAAO,GAAI/C,GACrD,MACJ,QACI4C,GAAiB,EACjBC,EAAQnB,EAAkBqB,EAAO,GAAI/C,IAAY0B,EAAkBqB,EAAO,GAAI/C,IAItF4C,IAAgBD,EAAiBE,QAAUA,GAEnDF,EAAiBxE,WAAQ1yB,EACzB,IAAK,IAAI43B,EAAM,EAAGC,EAAOhnB,EAAGjS,OAAQg5B,EAAMC,IAAQD,EAAK,CACnD,IAAIE,EAAOjnB,EAAG+mB,GAAKtyB,MAAM,KAEzB,GADAwyB,EAAK,GAAK7B,EAAkB6B,EAAK,IAC5BvD,EAAQM,eAQTiD,EAAK,GAAK7B,EAAkB6B,EAAK,GAAIvD,GAASxM,mBAN9C,IACI+P,EAAK,GAAK9G,EAASK,QAAQ4E,EAAkB6B,EAAK,GAAIvD,GAASxM,eACjE,MAAOhqB,GACLm5B,EAAiB9tB,MAAQ8tB,EAAiB9tB,OAAS,2EAA6ErL,EAKxI8S,EAAG+mB,GAAOE,EAAKjtB,KAAK,KAExB,OAAOqsB,GAEXjpB,UAAW,SAAsBipB,EAAkB3C,GAC/C,IA3wCSzkB,EA2wCLqiB,EAAa+E,EACbrmB,EA3wCDf,OADMA,EA4wCQonB,EAAiBrmB,IA3wCKf,aAAenC,MAAQmC,EAA4B,iBAAfA,EAAIlR,QAAuBkR,EAAIxK,OAASwK,EAAIioB,aAAejoB,EAAInR,KAAO,CAACmR,GAAOnC,MAAM3O,UAAUmO,MAAMxO,KAAKmR,GAAO,GA4wC3L,GAAIe,EAAI,CACJ,IAAK,IAAI8W,EAAI,EAAGD,EAAK7W,EAAGjS,OAAQ+oB,EAAID,IAAMC,EAAG,CACzC,IAAIqQ,EAASzK,OAAO1c,EAAG8W,IACnBsQ,EAAQD,EAAOhJ,YAAY,KAC3BkJ,EAAYF,EAAO7qB,MAAM,EAAG8qB,GAAO9pB,QAAQyd,EAAayG,IAAkBlkB,QAAQyd,EAAa5D,GAAa7Z,QAAQ2oB,EAAgBtF,GACpI2G,EAASH,EAAO7qB,MAAM8qB,EAAQ,GAElC,IACIE,EAAU5D,EAAQC,IAA2ExD,EAASM,UAAU6G,GAAxFnH,EAASK,QAAQ4E,EAAkBkC,EAAQ5D,GAASxM,eAC9E,MAAOhqB,GACLo0B,EAAW/oB,MAAQ+oB,EAAW/oB,OAAS,wDAA2DmrB,EAAQC,IAAgB,UAAV,SAAuB,kBAAoBz2B,EAE/J8S,EAAG8W,GAAKuQ,EAAY,IAAMC,EAE9BhG,EAAW1f,KAAO5B,EAAGhG,KAAK,KAE9B,IAAIusB,EAAUF,EAAiBE,QAAUF,EAAiBE,SAAW,GACjEF,EAAiBQ,UAASN,EAAiB,QAAIF,EAAiBQ,SAChER,EAAiBS,OAAMP,EAAc,KAAIF,EAAiBS,MAC9D,IACSS,EADLzE,EAAS,GACb,IAASyE,KAAQhB,EACTA,EAAQgB,KAAUxB,EAAEwB,IACpBzE,EAAOrkB,KAAK8oB,EAAKjqB,QAAQyd,EAAayG,IAAkBlkB,QAAQyd,EAAa5D,GAAa7Z,QAAQ4oB,GAAYvF,GAAc,IAAM4F,EAAQgB,GAAMjqB,QAAQyd,EAAayG,IAAkBlkB,QAAQyd,EAAa5D,GAAa7Z,QAAQ6oB,GAAaxF,IAMtP,OAHImC,EAAO/0B,SACPuzB,EAAWO,MAAQiB,EAAO9oB,KAAK,MAE5BsnB,IAIXkG,GAAY,kBAEZC,GAAY,CACZ/F,OAAQ,MACR7mB,MAAO,SAAkBymB,EAAYoC,GACjC,IAGQhC,EACAgG,EACAC,EAEA5D,EAPJ/wB,EAAUsuB,EAAW1f,MAAQ0f,EAAW1f,KAAK3O,MAAMu0B,IACnDI,EAAgBtG,EAgBpB,OAfItuB,GACI0uB,EAASgC,EAAQhC,QAAUkG,EAAclG,QAAU,MACnDgG,EAAM10B,EAAQ,GAAGkkB,cACjByQ,EAAM30B,EAAQ,GAEd+wB,EAAgBrD,EADJgB,EAAS,KAAOgC,EAAQgE,KAAOA,IAE/CE,EAAcF,IAAMA,EACpBE,EAAcD,IAAMA,EACpBC,EAAchmB,UAAOzS,EACjB40B,IACA6D,EAAgB7D,EAAclpB,MAAM+sB,EAAelE,KAGvDkE,EAAcrvB,MAAQqvB,EAAcrvB,OAAS,yBAE1CqvB,GAEXxqB,UAAW,SAAsBwqB,EAAelE,GAC5C,IACIgE,EAAME,EAAcF,IAEpB3D,EAAgBrD,GAHPgD,EAAQhC,QAAUkG,EAAclG,QAAU,OAE9B,KAAOgC,EAAQgE,KAAOA,IAE3C3D,IACA6D,EAAgB7D,EAAc3mB,UAAUwqB,EAAelE,IAE3D,IAAImE,EAAgBD,EAGpB,OADAC,EAAcjmB,MAAQ8lB,GAAOhE,EAAQgE,KAAO,IADlCE,EAAcD,IAEjBE,IAIXt1B,GAAO,2DAEPu1B,GAAY,CACZpG,OAAQ,WACR7mB,MAAO,SAAe+sB,EAAelE,GACjC,IAAIqE,EAAiBH,EAMrB,OALAG,EAAe3zB,KAAO2zB,EAAeJ,IACrCI,EAAeJ,SAAMx4B,EAChBu0B,EAAQyB,UAAc4C,EAAe3zB,MAAS2zB,EAAe3zB,KAAKnB,MAAMV,MACzEw1B,EAAexvB,MAAQwvB,EAAexvB,OAAS,sBAE5CwvB,GAEX3qB,UAAW,SAAmB2qB,GAC1B,IAAIH,EAAgBG,EAGpB,OADAH,EAAcD,KAAOI,EAAe3zB,MAAQ,IAAI8iB,cACzC0Q,IAIflH,EAAQ2E,EAAQ3D,QAAU2D,EAC1B3E,EAAQ6E,EAAU7D,QAAU6D,EAC5B7E,EAAQgF,EAAUhE,QAAUgE,EAC5BhF,EAAQoF,EAAUpE,QAAUoE,EAC5BpF,EAAQ0F,GAAU1E,QAAU0E,GAC5B1F,EAAQ+G,GAAU/F,QAAU+F,GAC5B/G,EAAQoH,GAAUpG,QAAUoG,GAE5Bt7B,EAAQk0B,QAAUA,EAClBl0B,EAAQm0B,WAAaA,EACrBn0B,EAAQq0B,YAAcA,EACtBr0B,EAAQqO,MAAQA,EAChBrO,EAAQ83B,kBAAoBA,EAC5B93B,EAAQ4Q,UAAYA,EACpB5Q,EAAQw4B,kBAAoBA,EAC5Bx4B,EAAQoE,QAxTR,SAAiBo3B,EAASC,EAAavE,GACnC,IAAIwE,EA9jCR,SAAgBhD,EAAQpuB,GACpB,IAAImI,EAAMimB,EACV,GAAIpuB,EACA,IAAK,IAAIzI,KAAOyI,EACZmI,EAAI5Q,GAAOyI,EAAOzI,GAG1B,OAAO4Q,EAujCiBkpB,CAAO,CAAEzG,OAAQ,QAAUgC,GACnD,OAAOtmB,EAAU4nB,EAAkBnqB,EAAMmtB,EAASE,GAAoBrtB,EAAMotB,EAAaC,GAAoBA,GAAmB,GAAOA,IAuT3I17B,EAAQ2Q,UApTR,SAAmBvJ,EAAK8vB,GAMpB,MALmB,iBAAR9vB,EACPA,EAAMwJ,EAAUvC,EAAMjH,EAAK8vB,GAAUA,GACd,WAAhB1M,EAAOpjB,KACdA,EAAMiH,EAAMuC,EAAUxJ,EAAK8vB,GAAUA,IAElC9vB,GA+SXpH,EAAQ6I,MA5SR,SAAe+yB,EAAMC,EAAM3E,GAWvB,MAVoB,iBAAT0E,EACPA,EAAOhrB,EAAUvC,EAAMutB,EAAM1E,GAAUA,GACf,WAAjB1M,EAAOoR,KACdA,EAAOhrB,EAAUgrB,EAAM1E,IAEP,iBAAT2E,EACPA,EAAOjrB,EAAUvC,EAAMwtB,EAAM3E,GAAUA,GACf,WAAjB1M,EAAOqR,KACdA,EAAOjrB,EAAUirB,EAAM3E,IAEpB0E,IAASC,GAkSpB77B,EAAQ87B,gBA/RR,SAAyBv1B,EAAK2wB,GAC1B,OAAO3wB,GAAOA,EAAIsiB,WAAW/X,QAASomB,GAAYA,EAAQC,IAA4BxI,EAAaP,OAAnCM,EAAaN,OAA8B+F,IA+R/Gn0B,EAAQ44B,kBAAoBA,EAE5B9zB,OAAOi3B,eAAe/7B,EAAS,aAAc,CAAE8B,OAAO,IA75CUk6B,CAA5C,iBAAZh8B,QAA0C,IAAXC,EAAiCD,EAE7DK,EAAOuF,IAAMvF,EAAOuF,KAAO,KAg6CpC,IAAIT,IAAM,CAAC,SAASnE,EAAQf,EAAOD,gBAGrC,IAAIi8B,EAAgBj7B,EAAQ,aACxBoD,EAAUpD,EAAQ,qBAClBS,EAAQT,EAAQ,WAChBiN,EAAejN,EAAQ,wBACvB0H,EAAkB1H,EAAQ,8BAC1BmF,EAAUnF,EAAQ,qBAClBqQ,EAAQrQ,EAAQ,mBAChBk7B,EAAkBl7B,EAAQ,UAC1BuE,EAAOvE,EAAQ,mBAEnBf,EAAOD,QAAUQ,GAEbmB,UAAUqB,SA0Ed,SAAkBm5B,EAAclpB,GAC9B,IAAIlP,EACJ,GAA2B,iBAAhBo4B,GAET,KADAp4B,EAAIxD,KAAK0D,UAAUk4B,IACX,MAAM,IAAIh7B,MAAM,8BAAgCg7B,EAAe,SAClE,CACL,IAAIr5B,EAAYvC,KAAKwC,WAAWo5B,GAChCp4B,EAAIjB,EAAUE,UAAYzC,KAAK2C,SAASJ,GAG1C,IAAIqU,EAAQpT,EAAEkP,IACG,IAAblP,EAAEqG,SAAiB7J,KAAK2E,OAASnB,EAAEmB,QACvC,OAAOiS,GArFT3W,EAAImB,UAAUoH,QAgGd,SAAiBzG,EAAQ85B,GACvB,IAAIt5B,EAAYvC,KAAKwC,WAAWT,OAAQK,EAAWy5B,GACnD,OAAOt5B,EAAUE,UAAYzC,KAAK2C,SAASJ,IAjG7CtC,EAAImB,UAAUiC,UA8Gd,SAAmBtB,EAAQT,EAAKw6B,EAAiBD,GAC/C,GAAI9rB,MAAMC,QAAQjO,GAAQ,CACxB,IAAK,IAAIxB,EAAE,EAAGA,EAAEwB,EAAOf,OAAQT,IAAKP,KAAKqD,UAAUtB,EAAOxB,QAAI6B,EAAW05B,EAAiBD,GAC1F,OAAO77B,KAET,IAAIoO,EAAKpO,KAAKkO,OAAOnM,GACrB,QAAWK,IAAPgM,GAAiC,iBAANA,EAC7B,MAAM,IAAIxN,MAAM,4BAIlB,OAFAm7B,EAAY/7B,KADZsB,EAAMuC,EAAQM,YAAY7C,GAAO8M,IAEjCpO,KAAKuD,SAASjC,GAAOtB,KAAKwC,WAAWT,EAAQ+5B,EAAiBD,GAAO,GAC9D77B,MAxHTC,EAAImB,UAAU46B,cAqId,SAAuBj6B,EAAQT,EAAK26B,GAElC,OADAj8B,KAAKqD,UAAUtB,EAAQT,EAAK26B,GAAgB,GACrCj8B,MAtITC,EAAImB,UAAUsL,eAiJd,SAAwB3K,EAAQm6B,GAC9B,IAAIz4B,EAAU1B,EAAO0B,QACrB,QAAgBrB,IAAZqB,GAA2C,iBAAXA,EAClC,MAAM,IAAI7C,MAAM,4BAElB,KADA6C,EAAUA,GAAWzD,KAAKkC,MAAMi6B,aAgBlC,SAAqBp8B,GACnB,IAAIiC,EAAOjC,EAAKmC,MAAMF,KAMtB,OALAjC,EAAKmC,MAAMi6B,YAA6B,iBAARn6B,EACJjC,EAAKmO,OAAOlM,IAASA,EACrBjC,EAAK2D,UAAU04B,GACbA,OACAh6B,EACvBrC,EAAKmC,MAAMi6B,YAvB6BA,CAAYn8B,OAIzD,OAFAA,KAAK+K,OAAOkT,KAAK,+BACjBje,KAAK2E,OAAS,MAGhB,IAAIiS,EAAQ5W,KAAKyC,SAASgB,EAAS1B,GACnC,IAAK6U,GAASslB,EAAiB,CAC7B,IAAIj4B,EAAU,sBAAwBjE,KAAKkN,aAC3C,GAAiC,OAA7BlN,KAAKkC,MAAMwK,eACV,MAAM,IAAI9L,MAAMqD,GADmBjE,KAAK+K,OAAOS,MAAMvH,GAG5D,OAAO2S,GAhKT3W,EAAImB,UAAUsC,UAqLd,SAAmB24B,GACjB,IAAI95B,EAAY+5B,EAAct8B,KAAMq8B,GACpC,cAAe95B,GACb,IAAK,SAAU,OAAOA,EAAUE,UAAYzC,KAAK2C,SAASJ,GAC1D,IAAK,SAAU,OAAOvC,KAAK0D,UAAUnB,GACrC,IAAK,YAAa,OAKtB,SAA4BxC,EAAM8C,GAChC,IAAI+K,EAAM/J,EAAQ9B,OAAOhB,KAAKhB,EAAM,CAAEgC,OAAQ,IAAMc,GACpD,GAAI+K,EAAK,CACP,IAAI7L,EAAS6L,EAAI7L,OACb0G,EAAOmF,EAAInF,KACXzE,EAAS4J,EAAI5J,OACbR,EAAIk4B,EAAc36B,KAAKhB,EAAMgC,EAAQ0G,OAAMrG,EAAW4B,GAS1D,OARAjE,EAAKw8B,WAAW15B,GAAO,IAAI6K,EAAa,CACtC7K,IAAKA,EACLyM,UAAU,EACVvN,OAAQA,EACR0G,KAAMA,EACNzE,OAAQA,EACRvB,SAAUe,IAELA,GApBkBg5B,CAAmBx8B,KAAMq8B,KAzLtDp8B,EAAImB,UAAUq7B,aAiOd,SAAsBb,GACpB,GAAIA,aAAwB7zB,OAG1B,OAFA20B,EAAkB18B,KAAMA,KAAKuD,SAAUq4B,GACvCc,EAAkB18B,KAAMA,KAAKsD,MAAOs4B,GAC7B57B,KAET,cAAe47B,GACb,IAAK,YAIH,OAHAc,EAAkB18B,KAAMA,KAAKuD,UAC7Bm5B,EAAkB18B,KAAMA,KAAKsD,OAC7BtD,KAAKmB,OAAOO,QACL1B,KACT,IAAK,SACH,IAAIuC,EAAY+5B,EAAct8B,KAAM47B,GAIpC,OAHIr5B,GAAWvC,KAAKmB,OAAOM,IAAIc,EAAUo6B,iBAClC38B,KAAKuD,SAASq4B,UACd57B,KAAKsD,MAAMs4B,GACX57B,KACT,IAAK,SACH,IAAIqQ,EAAYrQ,KAAKkC,MAAMmO,UACvBssB,EAAWtsB,EAAYA,EAAUurB,GAAgBA,EACrD57B,KAAKmB,OAAOM,IAAIk7B,GAChB,IAAIvuB,EAAKpO,KAAKkO,OAAO0tB,GACjBxtB,IACFA,EAAKvK,EAAQM,YAAYiK,UAClBpO,KAAKuD,SAAS6K,UACdpO,KAAKsD,MAAM8K,IAGxB,OAAOpO,MA7PTC,EAAImB,UAAUw7B,UA4Zd,SAAmBpC,EAAM9c,GACF,iBAAVA,IAAoBA,EAAS,IAAI3V,OAAO2V,IAEnD,OADA1d,KAAKyJ,SAAS+wB,GAAQ9c,EACf1d,MA9ZTC,EAAImB,UAAU8L,WAoYd,SAAoBvI,EAAQgyB,GAE1B,KADAhyB,EAASA,GAAU3E,KAAK2E,QACX,MAAO,YAMpB,IAJA,IAAIk4B,OAAkCz6B,KADtCu0B,EAAUA,GAAW,IACGkG,UAA0B,KAAOlG,EAAQkG,UAC7D9oB,OAA8B3R,IAApBu0B,EAAQ5iB,QAAwB,OAAS4iB,EAAQ5iB,QAE3D+oB,EAAO,GACFv8B,EAAE,EAAGA,EAAEoE,EAAO3D,OAAQT,IAAK,CAClC,IAAIJ,EAAIwE,EAAOpE,GACXJ,IAAG28B,GAAQ/oB,EAAU5T,EAAE48B,SAAW,IAAM58B,EAAE8D,QAAU44B,GAE1D,OAAOC,EAAKvtB,MAAM,GAAIstB,EAAU77B,SA9YlCf,EAAImB,UAAUoB,WA0Qd,SAAoBT,EAAQk6B,EAAgBj6B,EAAMg7B,GAChD,GAAqB,iBAAVj7B,GAAuC,kBAAVA,EACtC,MAAM,IAAInB,MAAM,sCAClB,IAAIyP,EAAYrQ,KAAKkC,MAAMmO,UACvBssB,EAAWtsB,EAAYA,EAAUtO,GAAUA,EAC3Ck7B,EAASj9B,KAAKmB,OAAOK,IAAIm7B,GAC7B,GAAIM,EAAQ,OAAOA,EAEnBD,EAAkBA,IAAgD,IAA7Bh9B,KAAKkC,MAAMg7B,cAEhD,IAAI9uB,EAAKvK,EAAQM,YAAYnE,KAAKkO,OAAOnM,IACrCqM,GAAM4uB,GAAiBjB,EAAY/7B,KAAMoO,GAE7C,IACI+uB,EADAC,GAA6C,IAA9Bp9B,KAAKkC,MAAMwK,iBAA6BuvB,EAEvDmB,KAAkBD,EAAgB/uB,GAAMA,GAAMvK,EAAQM,YAAYpC,EAAO0B,WAC3EzD,KAAK0M,eAAe3K,GAAQ,GAE9B,IAAI2G,EAAY7E,EAAQ2K,IAAIzN,KAAKf,KAAM+B,GAEnCQ,EAAY,IAAImL,EAAa,CAC/BU,GAAIA,EACJrM,OAAQA,EACR2G,UAAWA,EACXi0B,SAAUA,EACV36B,KAAMA,IAGK,KAAToM,EAAG,IAAa4uB,IAAiBh9B,KAAKsD,MAAM8K,GAAM7L,GACtDvC,KAAKmB,OAAOE,IAAIs7B,EAAUp6B,GAEtB66B,GAAgBD,GAAen9B,KAAK0M,eAAe3K,GAAQ,GAE/D,OAAOQ,GA1STtC,EAAImB,UAAUuB,SA+Sd,SAAkBJ,EAAWkG,GAC3B,GAAIlG,EAAU8G,UAOZ,OANA9G,EAAUE,SAAW+G,GACRzH,OAASQ,EAAUR,OAChCyH,EAAa7E,OAAS,KACtB6E,EAAaf,KAAOA,GAAce,GACF,IAA5BjH,EAAUR,OAAO8H,SACnBL,EAAaK,QAAS,GACjBL,EAIT,IAAI6zB,EAMA75B,EARJjB,EAAU8G,WAAY,EAGlB9G,EAAUP,OACZq7B,EAAcr9B,KAAKkC,MACnBlC,KAAKkC,MAAQlC,KAAKs9B,WAIpB,IAAM95B,EAAIk4B,EAAc36B,KAAKf,KAAMuC,EAAUR,OAAQ0G,EAAMlG,EAAUmG,WACrE,MAAMvI,GAEJ,aADOoC,EAAUE,SACXtC,EAER,QACEoC,EAAU8G,WAAY,EAClB9G,EAAUP,OAAMhC,KAAKkC,MAAQm7B,GAOnC,OAJA96B,EAAUE,SAAWe,EACrBjB,EAAUsG,KAAOrF,EAAEqF,KACnBtG,EAAUqG,OAASpF,EAAEoF,OACrBrG,EAAUkG,KAAOjF,EAAEiF,KACZjF,EAIP,SAASgG,IAEP,IAAI+zB,EAAYh7B,EAAUE,SACtBwH,EAASszB,EAAUrzB,MAAMlK,KAAMmK,WAEnC,OADAX,EAAa7E,OAAS44B,EAAU54B,OACzBsF,IAvVXhK,EAAImB,UAAUU,aAAerB,EAAQ,mBACrC,IAAI+8B,EAAgB/8B,EAAQ,aAC5BR,EAAImB,UAAUq8B,WAAaD,EAAc3W,IACzC5mB,EAAImB,UAAUs8B,WAAaF,EAAch8B,IACzCvB,EAAImB,UAAUu8B,cAAgBH,EAAcvW,OAC5ChnB,EAAImB,UAAUslB,gBAAkB8W,EAAc/6B,SAE9C,IAAIyF,EAAezH,EAAQ,2BAC3BR,EAAIsI,gBAAkBL,EAAaxD,WACnCzE,EAAI2B,gBAAkBsG,EAAarG,WACnC5B,EAAI07B,gBAAkBA,EAEtB,IAAIS,EAAiB,yCAEjBwB,EAAsB,CAAE,mBAAoB,cAAe,cAAe,kBAC1EC,EAAoB,CAAC,eAQzB,SAAS59B,EAAI0I,GACX,KAAM3I,gBAAgBC,GAAM,OAAO,IAAIA,EAAI0I,GAC3CA,EAAO3I,KAAKkC,MAAQ8C,EAAKc,KAAK6C,IAAS,GAwbzC,SAAmB5I,GACjB,IAAIgL,EAAShL,EAAKmC,MAAM6I,OACxB,IAAe,IAAXA,EACFhL,EAAKgL,OAAS,CAAC+yB,IAAKC,EAAM9f,KAAM8f,EAAMvyB,MAAOuyB,OACxC,CAEL,QADe37B,IAAX2I,IAAsBA,EAASizB,WACZ,iBAAVjzB,GAAsBA,EAAO+yB,KAAO/yB,EAAOkT,MAAQlT,EAAOS,OACrE,MAAM,IAAI5K,MAAM,qDAClBb,EAAKgL,OAASA,GA/bhBkzB,CAAUj+B,MACVA,KAAKuD,SAAW,GAChBvD,KAAKsD,MAAQ,GACbtD,KAAKu8B,WAAa,GAClBv8B,KAAKyJ,SAAW7D,EAAQ+C,EAAK+U,QAE7B1d,KAAKmB,OAASwH,EAAKu1B,OAAS,IAAIh9B,EAChClB,KAAKkD,gBAAkB,GACvBlD,KAAKsJ,cAAgB,GACrBtJ,KAAK0J,MAAQoH,IACb9Q,KAAKkO,OAwTP,SAAqBvF,GACnB,OAAQA,EAAK8F,UACX,IAAK,OAAQ,OAAO0vB,EACpB,IAAK,KAAM,OAAOjwB,EAClB,QAAS,OAAOkwB,GA5TJC,CAAY11B,GAE1BA,EAAKwa,aAAexa,EAAKwa,cAAgBhT,EAAAA,EACf,YAAtBxH,EAAK21B,gBAA6B31B,EAAKuU,wBAAyB,QAC7C9a,IAAnBuG,EAAK0H,YAAyB1H,EAAK0H,UAAYlI,GACnDnI,KAAKs9B,UAgaP,SAA8Bv9B,GAE5B,IADA,IAAIw+B,EAAWv5B,EAAKc,KAAK/F,EAAKmC,OACrB3B,EAAE,EAAGA,EAAEq9B,EAAoB58B,OAAQT,WACnCg+B,EAASX,EAAoBr9B,IACtC,OAAOg+B,EApaUC,CAAqBx+B,MAElC2I,EAAK/C,SAwYX,SAA2B7F,GACzB,IAAK,IAAIy6B,KAAQz6B,EAAKmC,MAAM0D,QAAS,CAEnC7F,EAAK68B,UAAUpC,EADFz6B,EAAKmC,MAAM0D,QAAQ40B,KA1YhBiE,CAAkBz+B,MAChC2I,EAAKkJ,UA+YX,SAA4B9R,GAC1B,IAAK,IAAIy6B,KAAQz6B,EAAKmC,MAAM2P,SAAU,CAEpC9R,EAAK09B,WAAWjD,EADFz6B,EAAKmC,MAAM2P,SAAS2oB,KAjZjBkE,CAAmB1+B,MAiXxC,SAA8BD,GAC5B,IAAI4+B,EACA5+B,EAAKmC,MAAM8S,QACb2pB,EAAcl+B,EAAQ,oBACtBV,EAAKi8B,cAAc2C,EAAaA,EAAYnoB,KAAK,IAEnD,IAAwB,IAApBzW,EAAKmC,MAAMF,KAAgB,OAC/B,IAAIiU,EAAaxV,EAAQ,oCACrBV,EAAKmC,MAAM8S,QAAOiB,EAAa0lB,EAAgB1lB,EAAY4nB,IAC/D99B,EAAKi8B,cAAc/lB,EAAYmmB,GAAgB,GAC/Cr8B,EAAKuD,MAAM,iCAAmC84B,EA1X9CwC,CAAqB5+B,MACG,iBAAb2I,EAAK3G,MAAkBhC,KAAKg8B,cAAcrzB,EAAK3G,MACtD2G,EAAK+c,UAAU1lB,KAAKy9B,WAAW,WAAY,CAACxnB,WAAY,CAACpF,KAAM,aA4XrE,SAA2B9Q,GACzB,IAAI8+B,EAAc9+B,EAAKmC,MAAM48B,QAC7B,IAAKD,EAAa,OAClB,GAAI9uB,MAAMC,QAAQ6uB,GAAc9+B,EAAKsD,UAAUw7B,QAC1C,IAAK,IAAIv9B,KAAOu9B,EAAa9+B,EAAKsD,UAAUw7B,EAAYv9B,GAAMA,GA/XnEy9B,CAAkB/+B,MA2JpB,SAASs8B,EAAcv8B,EAAMs8B,GAE3B,OADAA,EAASx4B,EAAQM,YAAYk4B,GACtBt8B,EAAKwD,SAAS84B,IAAWt8B,EAAKuD,MAAM+4B,IAAWt8B,EAAKw8B,WAAWF,GA8CxE,SAASK,EAAkB38B,EAAM++B,EAAS13B,GACxC,IAAK,IAAIi1B,KAAUyC,EAAS,CAC1B,IAAIv8B,EAAYu8B,EAAQzC,GACnB95B,EAAUP,MAAUoF,IAASA,EAAMS,KAAKw0B,KAC3Ct8B,EAAKoB,OAAOM,IAAIc,EAAUo6B,iBACnBmC,EAAQzC,KAqGrB,SAASnuB,EAAOnM,GAEd,OADIA,EAAOyU,KAAKxW,KAAK+K,OAAOkT,KAAK,qBAAsBlc,EAAOyU,KACvDzU,EAAOqM,GAIhB,SAASgwB,EAAQr8B,GAEf,OADIA,EAAOqM,IAAIpO,KAAK+K,OAAOkT,KAAK,oBAAqBlc,EAAOqM,IACrDrM,EAAOyU,IAIhB,SAAS2nB,EAAYp8B,GACnB,GAAIA,EAAOyU,KAAOzU,EAAOqM,IAAMrM,EAAOyU,KAAOzU,EAAOqM,GAClD,MAAM,IAAIxN,MAAM,mCAClB,OAAOmB,EAAOyU,KAAOzU,EAAOqM,GA+E9B,SAAS2tB,EAAYh8B,EAAMqO,GACzB,GAAIrO,EAAKwD,SAAS6K,IAAOrO,EAAKuD,MAAM8K,GAClC,MAAM,IAAIxN,MAAM,0BAA4BwN,EAAK,oBAyBrD,SAAS2vB,OAEP,CAACiB,UAAU,EAAEC,YAAY,EAAEC,kBAAkB,EAAEC,0BAA0B,EAAEC,oBAAoB,EAAEC,oBAAoB,EAAEC,kBAAkB,EAAEC,uBAAuB,EAAEC,iBAAiB,GAAGC,SAAS,GAAGC,YAAY,GAAGC,mBAAmB,GAAGxoB,mCAAmC,GAAG3J,6BAA6B,MAAM,GAAG,GAnhOoD,CAmhOhD"} \ No newline at end of file
diff --git a/node_modules/ajv/lib/ajv.d.ts b/node_modules/ajv/lib/ajv.d.ts
new file mode 100644
index 0000000..078364d
--- /dev/null
+++ b/node_modules/ajv/lib/ajv.d.ts
@@ -0,0 +1,397 @@
+declare var ajv: {
+ (options?: ajv.Options): ajv.Ajv;
+ new(options?: ajv.Options): ajv.Ajv;
+ ValidationError: typeof AjvErrors.ValidationError;
+ MissingRefError: typeof AjvErrors.MissingRefError;
+ $dataMetaSchema: object;
+}
+
+declare namespace AjvErrors {
+ class ValidationError extends Error {
+ constructor(errors: Array<ajv.ErrorObject>);
+
+ message: string;
+ errors: Array<ajv.ErrorObject>;
+ ajv: true;
+ validation: true;
+ }
+
+ class MissingRefError extends Error {
+ constructor(baseId: string, ref: string, message?: string);
+ static message: (baseId: string, ref: string) => string;
+
+ message: string;
+ missingRef: string;
+ missingSchema: string;
+ }
+}
+
+declare namespace ajv {
+ type ValidationError = AjvErrors.ValidationError;
+
+ type MissingRefError = AjvErrors.MissingRefError;
+
+ interface Ajv {
+ /**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default).
+ * @param {string|object|Boolean} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+ validate(schemaKeyRef: object | string | boolean, data: any): boolean | PromiseLike<any>;
+ /**
+ * Create validating function for passed schema.
+ * @param {object|Boolean} schema schema object
+ * @return {Function} validating function
+ */
+ compile(schema: object | boolean): ValidateFunction;
+ /**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and node-style callback.
+ * @this Ajv
+ * @param {object|Boolean} schema schema object
+ * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function.
+ * @return {PromiseLike<ValidateFunction>} validating function
+ */
+ compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike<ValidateFunction>;
+ /**
+ * Adds schema to the instance.
+ * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @return {Ajv} this for method chaining
+ */
+ addSchema(schema: Array<object> | object, key?: string): Ajv;
+ /**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @param {object} schema schema object
+ * @param {string} key optional schema key
+ * @return {Ajv} this for method chaining
+ */
+ addMetaSchema(schema: object, key?: string): Ajv;
+ /**
+ * Validate schema
+ * @param {object|Boolean} schema schema to validate
+ * @return {Boolean} true if schema is valid
+ */
+ validateSchema(schema: object | boolean): boolean;
+ /**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`). Returns undefined if keyRef can't be resolved to an existing schema.
+ */
+ getSchema(keyRef: string): ValidateFunction | undefined;
+ /**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+ removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv;
+ /**
+ * Add custom format
+ * @param {string} name format name
+ * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ * @return {Ajv} this for method chaining
+ */
+ addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv;
+ /**
+ * Define custom keyword
+ * @this Ajv
+ * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
+ * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ * @return {Ajv} this for method chaining
+ */
+ addKeyword(keyword: string, definition: KeywordDefinition): Ajv;
+ /**
+ * Get keyword definition
+ * @this Ajv
+ * @param {string} keyword pre-defined or custom keyword.
+ * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+ */
+ getKeyword(keyword: string): object | boolean;
+ /**
+ * Remove keyword
+ * @this Ajv
+ * @param {string} keyword pre-defined or custom keyword.
+ * @return {Ajv} this for method chaining
+ */
+ removeKeyword(keyword: string): Ajv;
+ /**
+ * Validate keyword
+ * @this Ajv
+ * @param {object} definition keyword definition object
+ * @param {boolean} throwError true to throw exception if definition is invalid
+ * @return {boolean} validation result
+ */
+ validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean;
+ /**
+ * Convert array of error message objects to string
+ * @param {Array<object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {object} options optional options with properties `separator` and `dataVar`.
+ * @return {string} human readable string with all errors descriptions
+ */
+ errorsText(errors?: Array<ErrorObject> | null, options?: ErrorsTextOptions): string;
+ errors?: Array<ErrorObject> | null;
+ _opts: Options;
+ }
+
+ interface CustomLogger {
+ log(...args: any[]): any;
+ warn(...args: any[]): any;
+ error(...args: any[]): any;
+ }
+
+ interface ValidateFunction {
+ (
+ data: any,
+ dataPath?: string,
+ parentData?: object | Array<any>,
+ parentDataProperty?: string | number,
+ rootData?: object | Array<any>
+ ): boolean | PromiseLike<any>;
+ schema?: object | boolean;
+ errors?: null | Array<ErrorObject>;
+ refs?: object;
+ refVal?: Array<any>;
+ root?: ValidateFunction | object;
+ $async?: true;
+ source?: object;
+ }
+
+ interface Options {
+ $data?: boolean;
+ allErrors?: boolean;
+ verbose?: boolean;
+ jsonPointers?: boolean;
+ uniqueItems?: boolean;
+ unicode?: boolean;
+ format?: false | string;
+ formats?: object;
+ keywords?: object;
+ unknownFormats?: true | string[] | 'ignore';
+ schemas?: Array<object> | object;
+ schemaId?: '$id' | 'id' | 'auto';
+ missingRefs?: true | 'ignore' | 'fail';
+ extendRefs?: true | 'ignore' | 'fail';
+ loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike<object | boolean>;
+ removeAdditional?: boolean | 'all' | 'failing';
+ useDefaults?: boolean | 'empty' | 'shared';
+ coerceTypes?: boolean | 'array';
+ strictDefaults?: boolean | 'log';
+ strictKeywords?: boolean | 'log';
+ strictNumbers?: boolean;
+ async?: boolean | string;
+ transpile?: string | ((code: string) => string);
+ meta?: boolean | object;
+ validateSchema?: boolean | 'log';
+ addUsedSchema?: boolean;
+ inlineRefs?: boolean | number;
+ passContext?: boolean;
+ loopRequired?: number;
+ ownProperties?: boolean;
+ multipleOfPrecision?: boolean | number;
+ errorDataPath?: string,
+ messages?: boolean;
+ sourceCode?: boolean;
+ processCode?: (code: string, schema: object) => string;
+ cache?: object;
+ logger?: CustomLogger | false;
+ nullable?: boolean;
+ serialize?: ((schema: object | boolean) => any) | false;
+ }
+
+ type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike<any>);
+ type NumberFormatValidator = ((data: number) => boolean | PromiseLike<any>);
+
+ interface NumberFormatDefinition {
+ type: "number",
+ validate: NumberFormatValidator;
+ compare?: (data1: number, data2: number) => number;
+ async?: boolean;
+ }
+
+ interface StringFormatDefinition {
+ type?: "string",
+ validate: FormatValidator;
+ compare?: (data1: string, data2: string) => number;
+ async?: boolean;
+ }
+
+ type FormatDefinition = NumberFormatDefinition | StringFormatDefinition;
+
+ interface KeywordDefinition {
+ type?: string | Array<string>;
+ async?: boolean;
+ $data?: boolean;
+ errors?: boolean | string;
+ metaSchema?: object;
+ // schema: false makes validate not to expect schema (ValidateFunction)
+ schema?: boolean;
+ statements?: boolean;
+ dependencies?: Array<string>;
+ modifying?: boolean;
+ valid?: boolean;
+ // one and only one of the following properties should be present
+ validate?: SchemaValidateFunction | ValidateFunction;
+ compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction;
+ macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean;
+ inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string;
+ }
+
+ interface CompilationContext {
+ level: number;
+ dataLevel: number;
+ dataPathArr: string[];
+ schema: any;
+ schemaPath: string;
+ baseId: string;
+ async: boolean;
+ opts: Options;
+ formats: {
+ [index: string]: FormatDefinition | undefined;
+ };
+ keywords: {
+ [index: string]: KeywordDefinition | undefined;
+ };
+ compositeRule: boolean;
+ validate: (schema: object) => boolean;
+ util: {
+ copy(obj: any, target?: any): any;
+ toHash(source: string[]): { [index: string]: true | undefined };
+ equal(obj: any, target: any): boolean;
+ getProperty(str: string): string;
+ schemaHasRules(schema: object, rules: any): string;
+ escapeQuotes(str: string): string;
+ toQuotedString(str: string): string;
+ getData(jsonPointer: string, dataLevel: number, paths: string[]): string;
+ escapeJsonPointer(str: string): string;
+ unescapeJsonPointer(str: string): string;
+ escapeFragment(str: string): string;
+ unescapeFragment(str: string): string;
+ };
+ self: Ajv;
+ }
+
+ interface SchemaValidateFunction {
+ (
+ schema: any,
+ data: any,
+ parentSchema?: object,
+ dataPath?: string,
+ parentData?: object | Array<any>,
+ parentDataProperty?: string | number,
+ rootData?: object | Array<any>
+ ): boolean | PromiseLike<any>;
+ errors?: Array<ErrorObject>;
+ }
+
+ interface ErrorsTextOptions {
+ separator?: string;
+ dataVar?: string;
+ }
+
+ interface ErrorObject {
+ keyword: string;
+ dataPath: string;
+ schemaPath: string;
+ params: ErrorParameters;
+ // Added to validation errors of propertyNames keyword schema
+ propertyName?: string;
+ // Excluded if messages set to false.
+ message?: string;
+ // These are added with the `verbose` option.
+ schema?: any;
+ parentSchema?: object;
+ data?: any;
+ }
+
+ type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams |
+ DependenciesParams | FormatParams | ComparisonParams |
+ MultipleOfParams | PatternParams | RequiredParams |
+ TypeParams | UniqueItemsParams | CustomParams |
+ PatternRequiredParams | PropertyNamesParams |
+ IfParams | SwitchParams | NoParams | EnumParams;
+
+ interface RefParams {
+ ref: string;
+ }
+
+ interface LimitParams {
+ limit: number;
+ }
+
+ interface AdditionalPropertiesParams {
+ additionalProperty: string;
+ }
+
+ interface DependenciesParams {
+ property: string;
+ missingProperty: string;
+ depsCount: number;
+ deps: string;
+ }
+
+ interface FormatParams {
+ format: string
+ }
+
+ interface ComparisonParams {
+ comparison: string;
+ limit: number | string;
+ exclusive: boolean;
+ }
+
+ interface MultipleOfParams {
+ multipleOf: number;
+ }
+
+ interface PatternParams {
+ pattern: string;
+ }
+
+ interface RequiredParams {
+ missingProperty: string;
+ }
+
+ interface TypeParams {
+ type: string;
+ }
+
+ interface UniqueItemsParams {
+ i: number;
+ j: number;
+ }
+
+ interface CustomParams {
+ keyword: string;
+ }
+
+ interface PatternRequiredParams {
+ missingPattern: string;
+ }
+
+ interface PropertyNamesParams {
+ propertyName: string;
+ }
+
+ interface IfParams {
+ failingKeyword: string;
+ }
+
+ interface SwitchParams {
+ caseIndex: number;
+ }
+
+ interface NoParams { }
+
+ interface EnumParams {
+ allowedValues: Array<any>;
+ }
+}
+
+export = ajv;
diff --git a/node_modules/ajv/lib/ajv.js b/node_modules/ajv/lib/ajv.js
new file mode 100644
index 0000000..06a45b6
--- /dev/null
+++ b/node_modules/ajv/lib/ajv.js
@@ -0,0 +1,506 @@
+'use strict';
+
+var compileSchema = require('./compile')
+ , resolve = require('./compile/resolve')
+ , Cache = require('./cache')
+ , SchemaObject = require('./compile/schema_obj')
+ , stableStringify = require('fast-json-stable-stringify')
+ , formats = require('./compile/formats')
+ , rules = require('./compile/rules')
+ , $dataMetaSchema = require('./data')
+ , util = require('./compile/util');
+
+module.exports = Ajv;
+
+Ajv.prototype.validate = validate;
+Ajv.prototype.compile = compile;
+Ajv.prototype.addSchema = addSchema;
+Ajv.prototype.addMetaSchema = addMetaSchema;
+Ajv.prototype.validateSchema = validateSchema;
+Ajv.prototype.getSchema = getSchema;
+Ajv.prototype.removeSchema = removeSchema;
+Ajv.prototype.addFormat = addFormat;
+Ajv.prototype.errorsText = errorsText;
+
+Ajv.prototype._addSchema = _addSchema;
+Ajv.prototype._compile = _compile;
+
+Ajv.prototype.compileAsync = require('./compile/async');
+var customKeyword = require('./keyword');
+Ajv.prototype.addKeyword = customKeyword.add;
+Ajv.prototype.getKeyword = customKeyword.get;
+Ajv.prototype.removeKeyword = customKeyword.remove;
+Ajv.prototype.validateKeyword = customKeyword.validate;
+
+var errorClasses = require('./compile/error_classes');
+Ajv.ValidationError = errorClasses.Validation;
+Ajv.MissingRefError = errorClasses.MissingRef;
+Ajv.$dataMetaSchema = $dataMetaSchema;
+
+var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
+
+var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];
+var META_SUPPORT_DATA = ['/properties'];
+
+/**
+ * Creates validator instance.
+ * Usage: `Ajv(opts)`
+ * @param {Object} opts optional options
+ * @return {Object} ajv instance
+ */
+function Ajv(opts) {
+ if (!(this instanceof Ajv)) return new Ajv(opts);
+ opts = this._opts = util.copy(opts) || {};
+ setLogger(this);
+ this._schemas = {};
+ this._refs = {};
+ this._fragments = {};
+ this._formats = formats(opts.format);
+
+ this._cache = opts.cache || new Cache;
+ this._loadingSchemas = {};
+ this._compilations = [];
+ this.RULES = rules();
+ this._getId = chooseGetId(opts);
+
+ opts.loopRequired = opts.loopRequired || Infinity;
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
+ this._metaOpts = getMetaSchemaOptions(this);
+
+ if (opts.formats) addInitialFormats(this);
+ if (opts.keywords) addInitialKeywords(this);
+ addDefaultMetaSchema(this);
+ if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
+ if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});
+ addInitialSchemas(this);
+}
+
+
+
+/**
+ * Validate data using schema
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
+ * @this Ajv
+ * @param {String|Object} schemaKeyRef key, ref or schema object
+ * @param {Any} data to be validated
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
+ */
+function validate(schemaKeyRef, data) {
+ var v;
+ if (typeof schemaKeyRef == 'string') {
+ v = this.getSchema(schemaKeyRef);
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
+ } else {
+ var schemaObj = this._addSchema(schemaKeyRef);
+ v = schemaObj.validate || this._compile(schemaObj);
+ }
+
+ var valid = v(data);
+ if (v.$async !== true) this.errors = v.errors;
+ return valid;
+}
+
+
+/**
+ * Create validating function for passed schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
+ * @return {Function} validating function
+ */
+function compile(schema, _meta) {
+ var schemaObj = this._addSchema(schema, undefined, _meta);
+ return schemaObj.validate || this._compile(schemaObj);
+}
+
+
+/**
+ * Adds schema to the instance.
+ * @this Ajv
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
+ * @return {Ajv} this for method chaining
+ */
+function addSchema(schema, key, _skipValidation, _meta) {
+ if (Array.isArray(schema)){
+ for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
+ return this;
+ }
+ var id = this._getId(schema);
+ if (id !== undefined && typeof id != 'string')
+ throw new Error('schema id must be string');
+ key = resolve.normalizeId(key || id);
+ checkUnique(this, key);
+ this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
+ return this;
+}
+
+
+/**
+ * Add schema that will be used to validate other schemas
+ * options in META_IGNORE_OPTIONS are alway set to false
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {String} key optional schema key
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
+ * @return {Ajv} this for method chaining
+ */
+function addMetaSchema(schema, key, skipValidation) {
+ this.addSchema(schema, key, skipValidation, true);
+ return this;
+}
+
+
+/**
+ * Validate schema
+ * @this Ajv
+ * @param {Object} schema schema to validate
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
+ * @return {Boolean} true if schema is valid
+ */
+function validateSchema(schema, throwOrLogError) {
+ var $schema = schema.$schema;
+ if ($schema !== undefined && typeof $schema != 'string')
+ throw new Error('$schema must be a string');
+ $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
+ if (!$schema) {
+ this.logger.warn('meta-schema not available');
+ this.errors = null;
+ return true;
+ }
+ var valid = this.validate($schema, schema);
+ if (!valid && throwOrLogError) {
+ var message = 'schema is invalid: ' + this.errorsText();
+ if (this._opts.validateSchema == 'log') this.logger.error(message);
+ else throw new Error(message);
+ }
+ return valid;
+}
+
+
+function defaultMeta(self) {
+ var meta = self._opts.meta;
+ self._opts.defaultMeta = typeof meta == 'object'
+ ? self._getId(meta) || meta
+ : self.getSchema(META_SCHEMA_ID)
+ ? META_SCHEMA_ID
+ : undefined;
+ return self._opts.defaultMeta;
+}
+
+
+/**
+ * Get compiled schema from the instance by `key` or `ref`.
+ * @this Ajv
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
+ * @return {Function} schema validating function (with property `schema`).
+ */
+function getSchema(keyRef) {
+ var schemaObj = _getSchemaObj(this, keyRef);
+ switch (typeof schemaObj) {
+ case 'object': return schemaObj.validate || this._compile(schemaObj);
+ case 'string': return this.getSchema(schemaObj);
+ case 'undefined': return _getSchemaFragment(this, keyRef);
+ }
+}
+
+
+function _getSchemaFragment(self, ref) {
+ var res = resolve.schema.call(self, { schema: {} }, ref);
+ if (res) {
+ var schema = res.schema
+ , root = res.root
+ , baseId = res.baseId;
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
+ self._fragments[ref] = new SchemaObject({
+ ref: ref,
+ fragment: true,
+ schema: schema,
+ root: root,
+ baseId: baseId,
+ validate: v
+ });
+ return v;
+ }
+}
+
+
+function _getSchemaObj(self, keyRef) {
+ keyRef = resolve.normalizeId(keyRef);
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
+}
+
+
+/**
+ * Remove cached schema(s).
+ * If no parameter is passed all schemas but meta-schemas are removed.
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
+ * @this Ajv
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
+ * @return {Ajv} this for method chaining
+ */
+function removeSchema(schemaKeyRef) {
+ if (schemaKeyRef instanceof RegExp) {
+ _removeAllSchemas(this, this._schemas, schemaKeyRef);
+ _removeAllSchemas(this, this._refs, schemaKeyRef);
+ return this;
+ }
+ switch (typeof schemaKeyRef) {
+ case 'undefined':
+ _removeAllSchemas(this, this._schemas);
+ _removeAllSchemas(this, this._refs);
+ this._cache.clear();
+ return this;
+ case 'string':
+ var schemaObj = _getSchemaObj(this, schemaKeyRef);
+ if (schemaObj) this._cache.del(schemaObj.cacheKey);
+ delete this._schemas[schemaKeyRef];
+ delete this._refs[schemaKeyRef];
+ return this;
+ case 'object':
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
+ this._cache.del(cacheKey);
+ var id = this._getId(schemaKeyRef);
+ if (id) {
+ id = resolve.normalizeId(id);
+ delete this._schemas[id];
+ delete this._refs[id];
+ }
+ }
+ return this;
+}
+
+
+function _removeAllSchemas(self, schemas, regex) {
+ for (var keyRef in schemas) {
+ var schemaObj = schemas[keyRef];
+ if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
+ self._cache.del(schemaObj.cacheKey);
+ delete schemas[keyRef];
+ }
+ }
+}
+
+
+/* @this Ajv */
+function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
+ if (typeof schema != 'object' && typeof schema != 'boolean')
+ throw new Error('schema should be object or boolean');
+ var serialize = this._opts.serialize;
+ var cacheKey = serialize ? serialize(schema) : schema;
+ var cached = this._cache.get(cacheKey);
+ if (cached) return cached;
+
+ shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
+
+ var id = resolve.normalizeId(this._getId(schema));
+ if (id && shouldAddSchema) checkUnique(this, id);
+
+ var willValidate = this._opts.validateSchema !== false && !skipValidation;
+ var recursiveMeta;
+ if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
+ this.validateSchema(schema, true);
+
+ var localRefs = resolve.ids.call(this, schema);
+
+ var schemaObj = new SchemaObject({
+ id: id,
+ schema: schema,
+ localRefs: localRefs,
+ cacheKey: cacheKey,
+ meta: meta
+ });
+
+ if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
+ this._cache.put(cacheKey, schemaObj);
+
+ if (willValidate && recursiveMeta) this.validateSchema(schema, true);
+
+ return schemaObj;
+}
+
+
+/* @this Ajv */
+function _compile(schemaObj, root) {
+ if (schemaObj.compiling) {
+ schemaObj.validate = callValidate;
+ callValidate.schema = schemaObj.schema;
+ callValidate.errors = null;
+ callValidate.root = root ? root : callValidate;
+ if (schemaObj.schema.$async === true)
+ callValidate.$async = true;
+ return callValidate;
+ }
+ schemaObj.compiling = true;
+
+ var currentOpts;
+ if (schemaObj.meta) {
+ currentOpts = this._opts;
+ this._opts = this._metaOpts;
+ }
+
+ var v;
+ try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
+ catch(e) {
+ delete schemaObj.validate;
+ throw e;
+ }
+ finally {
+ schemaObj.compiling = false;
+ if (schemaObj.meta) this._opts = currentOpts;
+ }
+
+ schemaObj.validate = v;
+ schemaObj.refs = v.refs;
+ schemaObj.refVal = v.refVal;
+ schemaObj.root = v.root;
+ return v;
+
+
+ /* @this {*} - custom context, see passContext option */
+ function callValidate() {
+ /* jshint validthis: true */
+ var _validate = schemaObj.validate;
+ var result = _validate.apply(this, arguments);
+ callValidate.errors = _validate.errors;
+ return result;
+ }
+}
+
+
+function chooseGetId(opts) {
+ switch (opts.schemaId) {
+ case 'auto': return _get$IdOrId;
+ case 'id': return _getId;
+ default: return _get$Id;
+ }
+}
+
+/* @this Ajv */
+function _getId(schema) {
+ if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
+ return schema.id;
+}
+
+/* @this Ajv */
+function _get$Id(schema) {
+ if (schema.id) this.logger.warn('schema id ignored', schema.id);
+ return schema.$id;
+}
+
+
+function _get$IdOrId(schema) {
+ if (schema.$id && schema.id && schema.$id != schema.id)
+ throw new Error('schema $id is different from id');
+ return schema.$id || schema.id;
+}
+
+
+/**
+ * Convert array of error message objects to string
+ * @this Ajv
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
+ * @return {String} human readable string with all errors descriptions
+ */
+function errorsText(errors, options) {
+ errors = errors || this.errors;
+ if (!errors) return 'No errors';
+ options = options || {};
+ var separator = options.separator === undefined ? ', ' : options.separator;
+ var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
+
+ var text = '';
+ for (var i=0; i<errors.length; i++) {
+ var e = errors[i];
+ if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
+ }
+ return text.slice(0, -separator.length);
+}
+
+
+/**
+ * Add custom format
+ * @this Ajv
+ * @param {String} name format name
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
+ * @return {Ajv} this for method chaining
+ */
+function addFormat(name, format) {
+ if (typeof format == 'string') format = new RegExp(format);
+ this._formats[name] = format;
+ return this;
+}
+
+
+function addDefaultMetaSchema(self) {
+ var $dataSchema;
+ if (self._opts.$data) {
+ $dataSchema = require('./refs/data.json');
+ self.addMetaSchema($dataSchema, $dataSchema.$id, true);
+ }
+ if (self._opts.meta === false) return;
+ var metaSchema = require('./refs/json-schema-draft-07.json');
+ if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
+ self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
+ self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
+}
+
+
+function addInitialSchemas(self) {
+ var optsSchemas = self._opts.schemas;
+ if (!optsSchemas) return;
+ if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
+ else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
+}
+
+
+function addInitialFormats(self) {
+ for (var name in self._opts.formats) {
+ var format = self._opts.formats[name];
+ self.addFormat(name, format);
+ }
+}
+
+
+function addInitialKeywords(self) {
+ for (var name in self._opts.keywords) {
+ var keyword = self._opts.keywords[name];
+ self.addKeyword(name, keyword);
+ }
+}
+
+
+function checkUnique(self, id) {
+ if (self._schemas[id] || self._refs[id])
+ throw new Error('schema with key or id "' + id + '" already exists');
+}
+
+
+function getMetaSchemaOptions(self) {
+ var metaOpts = util.copy(self._opts);
+ for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
+ delete metaOpts[META_IGNORE_OPTIONS[i]];
+ return metaOpts;
+}
+
+
+function setLogger(self) {
+ var logger = self._opts.logger;
+ if (logger === false) {
+ self.logger = {log: noop, warn: noop, error: noop};
+ } else {
+ if (logger === undefined) logger = console;
+ if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
+ throw new Error('logger must implement log, warn and error methods');
+ self.logger = logger;
+ }
+}
+
+
+function noop() {}
diff --git a/node_modules/ajv/lib/cache.js b/node_modules/ajv/lib/cache.js
new file mode 100644
index 0000000..7558874
--- /dev/null
+++ b/node_modules/ajv/lib/cache.js
@@ -0,0 +1,26 @@
+'use strict';
+
+
+var Cache = module.exports = function Cache() {
+ this._cache = {};
+};
+
+
+Cache.prototype.put = function Cache_put(key, value) {
+ this._cache[key] = value;
+};
+
+
+Cache.prototype.get = function Cache_get(key) {
+ return this._cache[key];
+};
+
+
+Cache.prototype.del = function Cache_del(key) {
+ delete this._cache[key];
+};
+
+
+Cache.prototype.clear = function Cache_clear() {
+ this._cache = {};
+};
diff --git a/node_modules/ajv/lib/compile/async.js b/node_modules/ajv/lib/compile/async.js
new file mode 100644
index 0000000..6a30b88
--- /dev/null
+++ b/node_modules/ajv/lib/compile/async.js
@@ -0,0 +1,90 @@
+'use strict';
+
+var MissingRefError = require('./error_classes').MissingRef;
+
+module.exports = compileAsync;
+
+
+/**
+ * Creates validating function for passed schema with asynchronous loading of missing schemas.
+ * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
+ * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
+ * @return {Promise} promise that resolves with a validating function.
+ */
+function compileAsync(schema, meta, callback) {
+ /* eslint no-shadow: 0 */
+ /* global Promise */
+ /* jshint validthis: true */
+ var self = this;
+ if (typeof this._opts.loadSchema != 'function')
+ throw new Error('options.loadSchema should be a function');
+
+ if (typeof meta == 'function') {
+ callback = meta;
+ meta = undefined;
+ }
+
+ var p = loadMetaSchemaOf(schema).then(function () {
+ var schemaObj = self._addSchema(schema, undefined, meta);
+ return schemaObj.validate || _compileAsync(schemaObj);
+ });
+
+ if (callback) {
+ p.then(
+ function(v) { callback(null, v); },
+ callback
+ );
+ }
+
+ return p;
+
+
+ function loadMetaSchemaOf(sch) {
+ var $schema = sch.$schema;
+ return $schema && !self.getSchema($schema)
+ ? compileAsync.call(self, { $ref: $schema }, true)
+ : Promise.resolve();
+ }
+
+
+ function _compileAsync(schemaObj) {
+ try { return self._compile(schemaObj); }
+ catch(e) {
+ if (e instanceof MissingRefError) return loadMissingSchema(e);
+ throw e;
+ }
+
+
+ function loadMissingSchema(e) {
+ var ref = e.missingSchema;
+ if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
+
+ var schemaPromise = self._loadingSchemas[ref];
+ if (!schemaPromise) {
+ schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
+ schemaPromise.then(removePromise, removePromise);
+ }
+
+ return schemaPromise.then(function (sch) {
+ if (!added(ref)) {
+ return loadMetaSchemaOf(sch).then(function () {
+ if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
+ });
+ }
+ }).then(function() {
+ return _compileAsync(schemaObj);
+ });
+
+ function removePromise() {
+ delete self._loadingSchemas[ref];
+ }
+
+ function added(ref) {
+ return self._refs[ref] || self._schemas[ref];
+ }
+ }
+ }
+}
diff --git a/node_modules/ajv/lib/compile/equal.js b/node_modules/ajv/lib/compile/equal.js
new file mode 100644
index 0000000..d6c2ace
--- /dev/null
+++ b/node_modules/ajv/lib/compile/equal.js
@@ -0,0 +1,5 @@
+'use strict';
+
+// do NOT remove this file - it would break pre-compiled schemas
+// https://github.com/ajv-validator/ajv/issues/889
+module.exports = require('fast-deep-equal');
diff --git a/node_modules/ajv/lib/compile/error_classes.js b/node_modules/ajv/lib/compile/error_classes.js
new file mode 100644
index 0000000..0b0ec4e
--- /dev/null
+++ b/node_modules/ajv/lib/compile/error_classes.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var resolve = require('./resolve');
+
+module.exports = {
+ Validation: errorSubclass(ValidationError),
+ MissingRef: errorSubclass(MissingRefError)
+};
+
+
+function ValidationError(errors) {
+ this.message = 'validation failed';
+ this.errors = errors;
+ this.ajv = this.validation = true;
+}
+
+
+MissingRefError.message = function (baseId, ref) {
+ return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
+};
+
+
+function MissingRefError(baseId, ref, message) {
+ this.message = message || MissingRefError.message(baseId, ref);
+ this.missingRef = resolve.url(baseId, ref);
+ this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
+}
+
+
+function errorSubclass(Subclass) {
+ Subclass.prototype = Object.create(Error.prototype);
+ Subclass.prototype.constructor = Subclass;
+ return Subclass;
+}
diff --git a/node_modules/ajv/lib/compile/formats.js b/node_modules/ajv/lib/compile/formats.js
new file mode 100644
index 0000000..de94a63
--- /dev/null
+++ b/node_modules/ajv/lib/compile/formats.js
@@ -0,0 +1,142 @@
+'use strict';
+
+var util = require('./util');
+
+var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
+var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
+var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
+var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;
+var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
+// uri-template: https://tools.ietf.org/html/rfc6570
+var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
+// For the source: https://gist.github.com/dperini/729294
+// For test cases: https://mathiasbynens.be/demo/url-regex
+// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
+// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
+var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
+var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
+var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
+var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
+var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
+
+
+module.exports = formats;
+
+function formats(mode) {
+ mode = mode == 'full' ? 'full' : 'fast';
+ return util.copy(formats[mode]);
+}
+
+
+formats.fast = {
+ // date: http://tools.ietf.org/html/rfc3339#section-5.6
+ date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
+ // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
+ time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
+ 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
+ // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
+ uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
+ 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ // email (sources from jsen validator):
+ // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
+ // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
+ email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
+ hostname: HOSTNAME,
+ // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ // uuid: http://tools.ietf.org/html/rfc4122
+ uuid: UUID,
+ // JSON-pointer: https://tools.ietf.org/html/rfc6901
+ // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
+ 'json-pointer': JSON_POINTER,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+formats.full = {
+ date: date,
+ time: time,
+ 'date-time': date_time,
+ uri: uri,
+ 'uri-reference': URIREF,
+ 'uri-template': URITEMPLATE,
+ url: URL,
+ email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
+ hostname: HOSTNAME,
+ ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
+ ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
+ regex: regex,
+ uuid: UUID,
+ 'json-pointer': JSON_POINTER,
+ 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
+ 'relative-json-pointer': RELATIVE_JSON_POINTER
+};
+
+
+function isLeapYear(year) {
+ // https://tools.ietf.org/html/rfc3339#appendix-C
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
+}
+
+
+function date(str) {
+ // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
+ var matches = str.match(DATE);
+ if (!matches) return false;
+
+ var year = +matches[1];
+ var month = +matches[2];
+ var day = +matches[3];
+
+ return month >= 1 && month <= 12 && day >= 1 &&
+ day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]);
+}
+
+
+function time(str, full) {
+ var matches = str.match(TIME);
+ if (!matches) return false;
+
+ var hour = matches[1];
+ var minute = matches[2];
+ var second = matches[3];
+ var timeZone = matches[5];
+ return ((hour <= 23 && minute <= 59 && second <= 59) ||
+ (hour == 23 && minute == 59 && second == 60)) &&
+ (!full || timeZone);
+}
+
+
+var DATE_TIME_SEPARATOR = /t|\s/i;
+function date_time(str) {
+ // http://tools.ietf.org/html/rfc3339#section-5.6
+ var dateTime = str.split(DATE_TIME_SEPARATOR);
+ return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
+}
+
+
+var NOT_URI_FRAGMENT = /\/|:/;
+function uri(str) {
+ // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
+ return NOT_URI_FRAGMENT.test(str) && URI.test(str);
+}
+
+
+var Z_ANCHOR = /[^\\]\\Z/;
+function regex(str) {
+ if (Z_ANCHOR.test(str)) return false;
+ try {
+ new RegExp(str);
+ return true;
+ } catch(e) {
+ return false;
+ }
+}
diff --git a/node_modules/ajv/lib/compile/index.js b/node_modules/ajv/lib/compile/index.js
new file mode 100644
index 0000000..97518c4
--- /dev/null
+++ b/node_modules/ajv/lib/compile/index.js
@@ -0,0 +1,387 @@
+'use strict';
+
+var resolve = require('./resolve')
+ , util = require('./util')
+ , errorClasses = require('./error_classes')
+ , stableStringify = require('fast-json-stable-stringify');
+
+var validateGenerator = require('../dotjs/validate');
+
+/**
+ * Functions below are used inside compiled validations function
+ */
+
+var ucs2length = util.ucs2length;
+var equal = require('fast-deep-equal');
+
+// this error is thrown by async schemas to return validation errors via exception
+var ValidationError = errorClasses.Validation;
+
+module.exports = compile;
+
+
+/**
+ * Compiles schema to validation function
+ * @this Ajv
+ * @param {Object} schema schema object
+ * @param {Object} root object with information about the root schema for this schema
+ * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
+ * @param {String} baseId base ID for IDs in the schema
+ * @return {Function} validation function
+ */
+function compile(schema, root, localRefs, baseId) {
+ /* jshint validthis: true, evil: true */
+ /* eslint no-shadow: 0 */
+ var self = this
+ , opts = this._opts
+ , refVal = [ undefined ]
+ , refs = {}
+ , patterns = []
+ , patternsHash = {}
+ , defaults = []
+ , defaultsHash = {}
+ , customRules = [];
+
+ root = root || { schema: schema, refVal: refVal, refs: refs };
+
+ var c = checkCompiling.call(this, schema, root, baseId);
+ var compilation = this._compilations[c.index];
+ if (c.compiling) return (compilation.callValidate = callValidate);
+
+ var formats = this._formats;
+ var RULES = this.RULES;
+
+ try {
+ var v = localCompile(schema, root, localRefs, baseId);
+ compilation.validate = v;
+ var cv = compilation.callValidate;
+ if (cv) {
+ cv.schema = v.schema;
+ cv.errors = null;
+ cv.refs = v.refs;
+ cv.refVal = v.refVal;
+ cv.root = v.root;
+ cv.$async = v.$async;
+ if (opts.sourceCode) cv.source = v.source;
+ }
+ return v;
+ } finally {
+ endCompiling.call(this, schema, root, baseId);
+ }
+
+ /* @this {*} - custom context, see passContext option */
+ function callValidate() {
+ /* jshint validthis: true */
+ var validate = compilation.validate;
+ var result = validate.apply(this, arguments);
+ callValidate.errors = validate.errors;
+ return result;
+ }
+
+ function localCompile(_schema, _root, localRefs, baseId) {
+ var isRoot = !_root || (_root && _root.schema == _schema);
+ if (_root.schema != root.schema)
+ return compile.call(self, _schema, _root, localRefs, baseId);
+
+ var $async = _schema.$async === true;
+
+ var sourceCode = validateGenerator({
+ isTop: true,
+ schema: _schema,
+ isRoot: isRoot,
+ baseId: baseId,
+ root: _root,
+ schemaPath: '',
+ errSchemaPath: '#',
+ errorPath: '""',
+ MissingRefError: errorClasses.MissingRef,
+ RULES: RULES,
+ validate: validateGenerator,
+ util: util,
+ resolve: resolve,
+ resolveRef: resolveRef,
+ usePattern: usePattern,
+ useDefault: useDefault,
+ useCustomRule: useCustomRule,
+ opts: opts,
+ formats: formats,
+ logger: self.logger,
+ self: self
+ });
+
+ sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
+ + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
+ + sourceCode;
+
+ if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);
+ // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
+ var validate;
+ try {
+ var makeValidate = new Function(
+ 'self',
+ 'RULES',
+ 'formats',
+ 'root',
+ 'refVal',
+ 'defaults',
+ 'customRules',
+ 'equal',
+ 'ucs2length',
+ 'ValidationError',
+ sourceCode
+ );
+
+ validate = makeValidate(
+ self,
+ RULES,
+ formats,
+ root,
+ refVal,
+ defaults,
+ customRules,
+ equal,
+ ucs2length,
+ ValidationError
+ );
+
+ refVal[0] = validate;
+ } catch(e) {
+ self.logger.error('Error compiling schema, function code:', sourceCode);
+ throw e;
+ }
+
+ validate.schema = _schema;
+ validate.errors = null;
+ validate.refs = refs;
+ validate.refVal = refVal;
+ validate.root = isRoot ? validate : _root;
+ if ($async) validate.$async = true;
+ if (opts.sourceCode === true) {
+ validate.source = {
+ code: sourceCode,
+ patterns: patterns,
+ defaults: defaults
+ };
+ }
+
+ return validate;
+ }
+
+ function resolveRef(baseId, ref, isRoot) {
+ ref = resolve.url(baseId, ref);
+ var refIndex = refs[ref];
+ var _refVal, refCode;
+ if (refIndex !== undefined) {
+ _refVal = refVal[refIndex];
+ refCode = 'refVal[' + refIndex + ']';
+ return resolvedRef(_refVal, refCode);
+ }
+ if (!isRoot && root.refs) {
+ var rootRefId = root.refs[ref];
+ if (rootRefId !== undefined) {
+ _refVal = root.refVal[rootRefId];
+ refCode = addLocalRef(ref, _refVal);
+ return resolvedRef(_refVal, refCode);
+ }
+ }
+
+ refCode = addLocalRef(ref);
+ var v = resolve.call(self, localCompile, root, ref);
+ if (v === undefined) {
+ var localSchema = localRefs && localRefs[ref];
+ if (localSchema) {
+ v = resolve.inlineRef(localSchema, opts.inlineRefs)
+ ? localSchema
+ : compile.call(self, localSchema, root, localRefs, baseId);
+ }
+ }
+
+ if (v === undefined) {
+ removeLocalRef(ref);
+ } else {
+ replaceLocalRef(ref, v);
+ return resolvedRef(v, refCode);
+ }
+ }
+
+ function addLocalRef(ref, v) {
+ var refId = refVal.length;
+ refVal[refId] = v;
+ refs[ref] = refId;
+ return 'refVal' + refId;
+ }
+
+ function removeLocalRef(ref) {
+ delete refs[ref];
+ }
+
+ function replaceLocalRef(ref, v) {
+ var refId = refs[ref];
+ refVal[refId] = v;
+ }
+
+ function resolvedRef(refVal, code) {
+ return typeof refVal == 'object' || typeof refVal == 'boolean'
+ ? { code: code, schema: refVal, inline: true }
+ : { code: code, $async: refVal && !!refVal.$async };
+ }
+
+ function usePattern(regexStr) {
+ var index = patternsHash[regexStr];
+ if (index === undefined) {
+ index = patternsHash[regexStr] = patterns.length;
+ patterns[index] = regexStr;
+ }
+ return 'pattern' + index;
+ }
+
+ function useDefault(value) {
+ switch (typeof value) {
+ case 'boolean':
+ case 'number':
+ return '' + value;
+ case 'string':
+ return util.toQuotedString(value);
+ case 'object':
+ if (value === null) return 'null';
+ var valueStr = stableStringify(value);
+ var index = defaultsHash[valueStr];
+ if (index === undefined) {
+ index = defaultsHash[valueStr] = defaults.length;
+ defaults[index] = value;
+ }
+ return 'default' + index;
+ }
+ }
+
+ function useCustomRule(rule, schema, parentSchema, it) {
+ if (self._opts.validateSchema !== false) {
+ var deps = rule.definition.dependencies;
+ if (deps && !deps.every(function(keyword) {
+ return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
+ }))
+ throw new Error('parent schema must have all required keywords: ' + deps.join(','));
+
+ var validateSchema = rule.definition.validateSchema;
+ if (validateSchema) {
+ var valid = validateSchema(schema);
+ if (!valid) {
+ var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
+ if (self._opts.validateSchema == 'log') self.logger.error(message);
+ else throw new Error(message);
+ }
+ }
+ }
+
+ var compile = rule.definition.compile
+ , inline = rule.definition.inline
+ , macro = rule.definition.macro;
+
+ var validate;
+ if (compile) {
+ validate = compile.call(self, schema, parentSchema, it);
+ } else if (macro) {
+ validate = macro.call(self, schema, parentSchema, it);
+ if (opts.validateSchema !== false) self.validateSchema(validate, true);
+ } else if (inline) {
+ validate = inline.call(self, it, rule.keyword, schema, parentSchema);
+ } else {
+ validate = rule.definition.validate;
+ if (!validate) return;
+ }
+
+ if (validate === undefined)
+ throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
+
+ var index = customRules.length;
+ customRules[index] = validate;
+
+ return {
+ code: 'customRule' + index,
+ validate: validate
+ };
+ }
+}
+
+
+/**
+ * Checks if the schema is currently compiled
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
+ */
+function checkCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var index = compIndex.call(this, schema, root, baseId);
+ if (index >= 0) return { index: index, compiling: true };
+ index = this._compilations.length;
+ this._compilations[index] = {
+ schema: schema,
+ root: root,
+ baseId: baseId
+ };
+ return { index: index, compiling: false };
+}
+
+
+/**
+ * Removes the schema from the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ */
+function endCompiling(schema, root, baseId) {
+ /* jshint validthis: true */
+ var i = compIndex.call(this, schema, root, baseId);
+ if (i >= 0) this._compilations.splice(i, 1);
+}
+
+
+/**
+ * Index of schema compilation in the currently compiled list
+ * @this Ajv
+ * @param {Object} schema schema to compile
+ * @param {Object} root root object
+ * @param {String} baseId base schema ID
+ * @return {Integer} compilation index
+ */
+function compIndex(schema, root, baseId) {
+ /* jshint validthis: true */
+ for (var i=0; i<this._compilations.length; i++) {
+ var c = this._compilations[i];
+ if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
+ }
+ return -1;
+}
+
+
+function patternCode(i, patterns) {
+ return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
+}
+
+
+function defaultCode(i) {
+ return 'var default' + i + ' = defaults[' + i + '];';
+}
+
+
+function refValCode(i, refVal) {
+ return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
+}
+
+
+function customRuleCode(i) {
+ return 'var customRule' + i + ' = customRules[' + i + '];';
+}
+
+
+function vars(arr, statement) {
+ if (!arr.length) return '';
+ var code = '';
+ for (var i=0; i<arr.length; i++)
+ code += statement(i, arr);
+ return code;
+}
diff --git a/node_modules/ajv/lib/compile/resolve.js b/node_modules/ajv/lib/compile/resolve.js
new file mode 100644
index 0000000..66f2aee
--- /dev/null
+++ b/node_modules/ajv/lib/compile/resolve.js
@@ -0,0 +1,270 @@
+'use strict';
+
+var URI = require('uri-js')
+ , equal = require('fast-deep-equal')
+ , util = require('./util')
+ , SchemaObject = require('./schema_obj')
+ , traverse = require('json-schema-traverse');
+
+module.exports = resolve;
+
+resolve.normalizeId = normalizeId;
+resolve.fullPath = getFullPath;
+resolve.url = resolveUrl;
+resolve.ids = resolveIds;
+resolve.inlineRef = inlineRef;
+resolve.schema = resolveSchema;
+
+/**
+ * [resolve and compile the references ($ref)]
+ * @this Ajv
+ * @param {Function} compile reference to schema compilation funciton (localCompile)
+ * @param {Object} root object with information about the root schema for the current schema
+ * @param {String} ref reference to resolve
+ * @return {Object|Function} schema object (if the schema can be inlined) or validation function
+ */
+function resolve(compile, root, ref) {
+ /* jshint validthis: true */
+ var refVal = this._refs[ref];
+ if (typeof refVal == 'string') {
+ if (this._refs[refVal]) refVal = this._refs[refVal];
+ else return resolve.call(this, compile, root, refVal);
+ }
+
+ refVal = refVal || this._schemas[ref];
+ if (refVal instanceof SchemaObject) {
+ return inlineRef(refVal.schema, this._opts.inlineRefs)
+ ? refVal.schema
+ : refVal.validate || this._compile(refVal);
+ }
+
+ var res = resolveSchema.call(this, root, ref);
+ var schema, v, baseId;
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+
+ if (schema instanceof SchemaObject) {
+ v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
+ } else if (schema !== undefined) {
+ v = inlineRef(schema, this._opts.inlineRefs)
+ ? schema
+ : compile.call(this, schema, root, undefined, baseId);
+ }
+
+ return v;
+}
+
+
+/**
+ * Resolve schema, its root and baseId
+ * @this Ajv
+ * @param {Object} root root object with properties schema, refVal, refs
+ * @param {String} ref reference to resolve
+ * @return {Object} object with properties schema, root, baseId
+ */
+function resolveSchema(root, ref) {
+ /* jshint validthis: true */
+ var p = URI.parse(ref)
+ , refPath = _getFullPath(p)
+ , baseId = getFullPath(this._getId(root.schema));
+ if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
+ var id = normalizeId(refPath);
+ var refVal = this._refs[id];
+ if (typeof refVal == 'string') {
+ return resolveRecursive.call(this, root, refVal, p);
+ } else if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ root = refVal;
+ } else {
+ refVal = this._schemas[id];
+ if (refVal instanceof SchemaObject) {
+ if (!refVal.validate) this._compile(refVal);
+ if (id == normalizeId(ref))
+ return { schema: refVal, root: root, baseId: baseId };
+ root = refVal;
+ } else {
+ return;
+ }
+ }
+ if (!root.schema) return;
+ baseId = getFullPath(this._getId(root.schema));
+ }
+ return getJsonPointer.call(this, p, baseId, root.schema, root);
+}
+
+
+/* @this Ajv */
+function resolveRecursive(root, ref, parsedRef) {
+ /* jshint validthis: true */
+ var res = resolveSchema.call(this, root, ref);
+ if (res) {
+ var schema = res.schema;
+ var baseId = res.baseId;
+ root = res.root;
+ var id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ return getJsonPointer.call(this, parsedRef, baseId, schema, root);
+ }
+}
+
+
+var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
+/* @this Ajv */
+function getJsonPointer(parsedRef, baseId, schema, root) {
+ /* jshint validthis: true */
+ parsedRef.fragment = parsedRef.fragment || '';
+ if (parsedRef.fragment.slice(0,1) != '/') return;
+ var parts = parsedRef.fragment.split('/');
+
+ for (var i = 1; i < parts.length; i++) {
+ var part = parts[i];
+ if (part) {
+ part = util.unescapeFragment(part);
+ schema = schema[part];
+ if (schema === undefined) break;
+ var id;
+ if (!PREVENT_SCOPE_CHANGE[part]) {
+ id = this._getId(schema);
+ if (id) baseId = resolveUrl(baseId, id);
+ if (schema.$ref) {
+ var $ref = resolveUrl(baseId, schema.$ref);
+ var res = resolveSchema.call(this, root, $ref);
+ if (res) {
+ schema = res.schema;
+ root = res.root;
+ baseId = res.baseId;
+ }
+ }
+ }
+ }
+ }
+ if (schema !== undefined && schema !== root.schema)
+ return { schema: schema, root: root, baseId: baseId };
+}
+
+
+var SIMPLE_INLINED = util.toHash([
+ 'type', 'format', 'pattern',
+ 'maxLength', 'minLength',
+ 'maxProperties', 'minProperties',
+ 'maxItems', 'minItems',
+ 'maximum', 'minimum',
+ 'uniqueItems', 'multipleOf',
+ 'required', 'enum'
+]);
+function inlineRef(schema, limit) {
+ if (limit === false) return false;
+ if (limit === undefined || limit === true) return checkNoRef(schema);
+ else if (limit) return countKeys(schema) <= limit;
+}
+
+
+function checkNoRef(schema) {
+ var item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return false;
+ item = schema[key];
+ if (typeof item == 'object' && !checkNoRef(item)) return false;
+ }
+ }
+ return true;
+}
+
+
+function countKeys(schema) {
+ var count = 0, item;
+ if (Array.isArray(schema)) {
+ for (var i=0; i<schema.length; i++) {
+ item = schema[i];
+ if (typeof item == 'object') count += countKeys(item);
+ if (count == Infinity) return Infinity;
+ }
+ } else {
+ for (var key in schema) {
+ if (key == '$ref') return Infinity;
+ if (SIMPLE_INLINED[key]) {
+ count++;
+ } else {
+ item = schema[key];
+ if (typeof item == 'object') count += countKeys(item) + 1;
+ if (count == Infinity) return Infinity;
+ }
+ }
+ }
+ return count;
+}
+
+
+function getFullPath(id, normalize) {
+ if (normalize !== false) id = normalizeId(id);
+ var p = URI.parse(id);
+ return _getFullPath(p);
+}
+
+
+function _getFullPath(p) {
+ return URI.serialize(p).split('#')[0] + '#';
+}
+
+
+var TRAILING_SLASH_HASH = /#\/?$/;
+function normalizeId(id) {
+ return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
+}
+
+
+function resolveUrl(baseId, id) {
+ id = normalizeId(id);
+ return URI.resolve(baseId, id);
+}
+
+
+/* @this Ajv */
+function resolveIds(schema) {
+ var schemaId = normalizeId(this._getId(schema));
+ var baseIds = {'': schemaId};
+ var fullPaths = {'': getFullPath(schemaId, false)};
+ var localRefs = {};
+ var self = this;
+
+ traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (jsonPtr === '') return;
+ var id = self._getId(sch);
+ var baseId = baseIds[parentJsonPtr];
+ var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
+ if (keyIndex !== undefined)
+ fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
+
+ if (typeof id == 'string') {
+ id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id);
+
+ var refVal = self._refs[id];
+ if (typeof refVal == 'string') refVal = self._refs[refVal];
+ if (refVal && refVal.schema) {
+ if (!equal(sch, refVal.schema))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ } else if (id != normalizeId(fullPath)) {
+ if (id[0] == '#') {
+ if (localRefs[id] && !equal(sch, localRefs[id]))
+ throw new Error('id "' + id + '" resolves to more than one schema');
+ localRefs[id] = sch;
+ } else {
+ self._refs[id] = fullPath;
+ }
+ }
+ }
+ baseIds[jsonPtr] = baseId;
+ fullPaths[jsonPtr] = fullPath;
+ });
+
+ return localRefs;
+}
diff --git a/node_modules/ajv/lib/compile/rules.js b/node_modules/ajv/lib/compile/rules.js
new file mode 100644
index 0000000..08b25ae
--- /dev/null
+++ b/node_modules/ajv/lib/compile/rules.js
@@ -0,0 +1,66 @@
+'use strict';
+
+var ruleModules = require('../dotjs')
+ , toHash = require('./util').toHash;
+
+module.exports = function rules() {
+ var RULES = [
+ { type: 'number',
+ rules: [ { 'maximum': ['exclusiveMaximum'] },
+ { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
+ { type: 'string',
+ rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
+ { type: 'array',
+ rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] },
+ { type: 'object',
+ rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
+ { 'properties': ['additionalProperties', 'patternProperties'] } ] },
+ { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] }
+ ];
+
+ var ALL = [ 'type', '$comment' ];
+ var KEYWORDS = [
+ '$schema', '$id', 'id', '$data', '$async', 'title',
+ 'description', 'default', 'definitions',
+ 'examples', 'readOnly', 'writeOnly',
+ 'contentMediaType', 'contentEncoding',
+ 'additionalItems', 'then', 'else'
+ ];
+ var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
+ RULES.all = toHash(ALL);
+ RULES.types = toHash(TYPES);
+
+ RULES.forEach(function (group) {
+ group.rules = group.rules.map(function (keyword) {
+ var implKeywords;
+ if (typeof keyword == 'object') {
+ var key = Object.keys(keyword)[0];
+ implKeywords = keyword[key];
+ keyword = key;
+ implKeywords.forEach(function (k) {
+ ALL.push(k);
+ RULES.all[k] = true;
+ });
+ }
+ ALL.push(keyword);
+ var rule = RULES.all[keyword] = {
+ keyword: keyword,
+ code: ruleModules[keyword],
+ implements: implKeywords
+ };
+ return rule;
+ });
+
+ RULES.all.$comment = {
+ keyword: '$comment',
+ code: ruleModules.$comment
+ };
+
+ if (group.type) RULES.types[group.type] = group;
+ });
+
+ RULES.keywords = toHash(ALL.concat(KEYWORDS));
+ RULES.custom = {};
+
+ return RULES;
+};
diff --git a/node_modules/ajv/lib/compile/schema_obj.js b/node_modules/ajv/lib/compile/schema_obj.js
new file mode 100644
index 0000000..e7903b0
--- /dev/null
+++ b/node_modules/ajv/lib/compile/schema_obj.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var util = require('./util');
+
+module.exports = SchemaObject;
+
+function SchemaObject(obj) {
+ util.copy(obj, this);
+}
diff --git a/node_modules/ajv/lib/compile/ucs2length.js b/node_modules/ajv/lib/compile/ucs2length.js
new file mode 100644
index 0000000..d193fb1
--- /dev/null
+++ b/node_modules/ajv/lib/compile/ucs2length.js
@@ -0,0 +1,20 @@
+'use strict';
+
+// https://mathiasbynens.be/notes/javascript-encoding
+// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
+module.exports = function ucs2length(str) {
+ var length = 0
+ , len = str.length
+ , pos = 0
+ , value;
+ while (pos < len) {
+ length++;
+ value = str.charCodeAt(pos++);
+ if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
+ // high surrogate, and there is a next character
+ value = str.charCodeAt(pos);
+ if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
+ }
+ }
+ return length;
+};
diff --git a/node_modules/ajv/lib/compile/util.js b/node_modules/ajv/lib/compile/util.js
new file mode 100644
index 0000000..ef07b8c
--- /dev/null
+++ b/node_modules/ajv/lib/compile/util.js
@@ -0,0 +1,239 @@
+'use strict';
+
+
+module.exports = {
+ copy: copy,
+ checkDataType: checkDataType,
+ checkDataTypes: checkDataTypes,
+ coerceToTypes: coerceToTypes,
+ toHash: toHash,
+ getProperty: getProperty,
+ escapeQuotes: escapeQuotes,
+ equal: require('fast-deep-equal'),
+ ucs2length: require('./ucs2length'),
+ varOccurences: varOccurences,
+ varReplace: varReplace,
+ schemaHasRules: schemaHasRules,
+ schemaHasRulesExcept: schemaHasRulesExcept,
+ schemaUnknownRules: schemaUnknownRules,
+ toQuotedString: toQuotedString,
+ getPathExpr: getPathExpr,
+ getPath: getPath,
+ getData: getData,
+ unescapeFragment: unescapeFragment,
+ unescapeJsonPointer: unescapeJsonPointer,
+ escapeFragment: escapeFragment,
+ escapeJsonPointer: escapeJsonPointer
+};
+
+
+function copy(o, to) {
+ to = to || {};
+ for (var key in o) to[key] = o[key];
+ return to;
+}
+
+
+function checkDataType(dataType, data, strictNumbers, negate) {
+ var EQUAL = negate ? ' !== ' : ' === '
+ , AND = negate ? ' || ' : ' && '
+ , OK = negate ? '!' : ''
+ , NOT = negate ? '' : '!';
+ switch (dataType) {
+ case 'null': return data + EQUAL + 'null';
+ case 'array': return OK + 'Array.isArray(' + data + ')';
+ case 'object': return '(' + OK + data + AND +
+ 'typeof ' + data + EQUAL + '"object"' + AND +
+ NOT + 'Array.isArray(' + data + '))';
+ case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
+ NOT + '(' + data + ' % 1)' +
+ AND + data + EQUAL + data +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' +
+ (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
+ default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
+ }
+}
+
+
+function checkDataTypes(dataTypes, data, strictNumbers) {
+ switch (dataTypes.length) {
+ case 1: return checkDataType(dataTypes[0], data, strictNumbers, true);
+ default:
+ var code = '';
+ var types = toHash(dataTypes);
+ if (types.array && types.object) {
+ code = types.null ? '(': '(!' + data + ' || ';
+ code += 'typeof ' + data + ' !== "object")';
+ delete types.null;
+ delete types.array;
+ delete types.object;
+ }
+ if (types.number) delete types.integer;
+ for (var t in types)
+ code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true);
+
+ return code;
+ }
+}
+
+
+var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
+function coerceToTypes(optionCoerceTypes, dataTypes) {
+ if (Array.isArray(dataTypes)) {
+ var types = [];
+ for (var i=0; i<dataTypes.length; i++) {
+ var t = dataTypes[i];
+ if (COERCE_TO_TYPES[t]) types[types.length] = t;
+ else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
+ }
+ if (types.length) return types;
+ } else if (COERCE_TO_TYPES[dataTypes]) {
+ return [dataTypes];
+ } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
+ return ['array'];
+ }
+}
+
+
+function toHash(arr) {
+ var hash = {};
+ for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
+ return hash;
+}
+
+
+var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
+var SINGLE_QUOTE = /'|\\/g;
+function getProperty(key) {
+ return typeof key == 'number'
+ ? '[' + key + ']'
+ : IDENTIFIER.test(key)
+ ? '.' + key
+ : "['" + escapeQuotes(key) + "']";
+}
+
+
+function escapeQuotes(str) {
+ return str.replace(SINGLE_QUOTE, '\\$&')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r')
+ .replace(/\f/g, '\\f')
+ .replace(/\t/g, '\\t');
+}
+
+
+function varOccurences(str, dataVar) {
+ dataVar += '[^0-9]';
+ var matches = str.match(new RegExp(dataVar, 'g'));
+ return matches ? matches.length : 0;
+}
+
+
+function varReplace(str, dataVar, expr) {
+ dataVar += '([^0-9])';
+ expr = expr.replace(/\$/g, '$$$$');
+ return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
+}
+
+
+function schemaHasRules(schema, rules) {
+ if (typeof schema == 'boolean') return !schema;
+ for (var key in schema) if (rules[key]) return true;
+}
+
+
+function schemaHasRulesExcept(schema, rules, exceptKeyword) {
+ if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
+ for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
+}
+
+
+function schemaUnknownRules(schema, rules) {
+ if (typeof schema == 'boolean') return;
+ for (var key in schema) if (!rules[key]) return key;
+}
+
+
+function toQuotedString(str) {
+ return '\'' + escapeQuotes(str) + '\'';
+}
+
+
+function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
+ var path = jsonPointers // false by default
+ ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
+ : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
+ return joinPaths(currentPath, path);
+}
+
+
+function getPath(currentPath, prop, jsonPointers) {
+ var path = jsonPointers // false by default
+ ? toQuotedString('/' + escapeJsonPointer(prop))
+ : toQuotedString(getProperty(prop));
+ return joinPaths(currentPath, path);
+}
+
+
+var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
+var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
+function getData($data, lvl, paths) {
+ var up, jsonPointer, data, matches;
+ if ($data === '') return 'rootData';
+ if ($data[0] == '/') {
+ if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
+ jsonPointer = $data;
+ data = 'rootData';
+ } else {
+ matches = $data.match(RELATIVE_JSON_POINTER);
+ if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
+ up = +matches[1];
+ jsonPointer = matches[2];
+ if (jsonPointer == '#') {
+ if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
+ return paths[lvl - up];
+ }
+
+ if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
+ data = 'data' + ((lvl - up) || '');
+ if (!jsonPointer) return data;
+ }
+
+ var expr = data;
+ var segments = jsonPointer.split('/');
+ for (var i=0; i<segments.length; i++) {
+ var segment = segments[i];
+ if (segment) {
+ data += getProperty(unescapeJsonPointer(segment));
+ expr += ' && ' + data;
+ }
+ }
+ return expr;
+}
+
+
+function joinPaths (a, b) {
+ if (a == '""') return b;
+ return (a + ' + ' + b).replace(/([^\\])' \+ '/g, '$1');
+}
+
+
+function unescapeFragment(str) {
+ return unescapeJsonPointer(decodeURIComponent(str));
+}
+
+
+function escapeFragment(str) {
+ return encodeURIComponent(escapeJsonPointer(str));
+}
+
+
+function escapeJsonPointer(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
+
+
+function unescapeJsonPointer(str) {
+ return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
diff --git a/node_modules/ajv/lib/data.js b/node_modules/ajv/lib/data.js
new file mode 100644
index 0000000..f11142b
--- /dev/null
+++ b/node_modules/ajv/lib/data.js
@@ -0,0 +1,49 @@
+'use strict';
+
+var KEYWORDS = [
+ 'multipleOf',
+ 'maximum',
+ 'exclusiveMaximum',
+ 'minimum',
+ 'exclusiveMinimum',
+ 'maxLength',
+ 'minLength',
+ 'pattern',
+ 'additionalItems',
+ 'maxItems',
+ 'minItems',
+ 'uniqueItems',
+ 'maxProperties',
+ 'minProperties',
+ 'required',
+ 'additionalProperties',
+ 'enum',
+ 'format',
+ 'const'
+];
+
+module.exports = function (metaSchema, keywordsJsonPointers) {
+ for (var i=0; i<keywordsJsonPointers.length; i++) {
+ metaSchema = JSON.parse(JSON.stringify(metaSchema));
+ var segments = keywordsJsonPointers[i].split('/');
+ var keywords = metaSchema;
+ var j;
+ for (j=1; j<segments.length; j++)
+ keywords = keywords[segments[j]];
+
+ for (j=0; j<KEYWORDS.length; j++) {
+ var key = KEYWORDS[j];
+ var schema = keywords[key];
+ if (schema) {
+ keywords[key] = {
+ anyOf: [
+ schema,
+ { $ref: 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' }
+ ]
+ };
+ }
+ }
+ }
+
+ return metaSchema;
+};
diff --git a/node_modules/ajv/lib/definition_schema.js b/node_modules/ajv/lib/definition_schema.js
new file mode 100644
index 0000000..ad86d4f
--- /dev/null
+++ b/node_modules/ajv/lib/definition_schema.js
@@ -0,0 +1,37 @@
+'use strict';
+
+var metaSchema = require('./refs/json-schema-draft-07.json');
+
+module.exports = {
+ $id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js',
+ definitions: {
+ simpleTypes: metaSchema.definitions.simpleTypes
+ },
+ type: 'object',
+ dependencies: {
+ schema: ['validate'],
+ $data: ['validate'],
+ statements: ['inline'],
+ valid: {not: {required: ['macro']}}
+ },
+ properties: {
+ type: metaSchema.properties.type,
+ schema: {type: 'boolean'},
+ statements: {type: 'boolean'},
+ dependencies: {
+ type: 'array',
+ items: {type: 'string'}
+ },
+ metaSchema: {type: 'object'},
+ modifying: {type: 'boolean'},
+ valid: {type: 'boolean'},
+ $data: {type: 'boolean'},
+ async: {type: 'boolean'},
+ errors: {
+ anyOf: [
+ {type: 'boolean'},
+ {const: 'full'}
+ ]
+ }
+ }
+};
diff --git a/node_modules/ajv/lib/dot/_limit.jst b/node_modules/ajv/lib/dot/_limit.jst
new file mode 100644
index 0000000..f152189
--- /dev/null
+++ b/node_modules/ajv/lib/dot/_limit.jst
@@ -0,0 +1,113 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{## def.setExclusiveLimit:
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+#}}
+
+{{
+ var $isMax = $keyword == 'maximum'
+ , $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
+ , $schemaExcl = it.schema[$exclusiveKeyword]
+ , $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data
+ , $op = $isMax ? '<' : '>'
+ , $notOp = $isMax ? '>' : '<'
+ , $errorKeyword = undefined;
+
+ if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
+ throw new Error($keyword + ' must be number');
+ }
+ if (!($isDataExcl || $schemaExcl === undefined
+ || typeof $schemaExcl == 'number'
+ || typeof $schemaExcl == 'boolean')) {
+ throw new Error($exclusiveKeyword + ' must be number or boolean');
+ }
+}}
+
+{{? $isDataExcl }}
+ {{
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
+ , $exclusive = 'exclusive' + $lvl
+ , $exclType = 'exclType' + $lvl
+ , $exclIsNumber = 'exclIsNumber' + $lvl
+ , $opExpr = 'op' + $lvl
+ , $opStr = '\' + ' + $opExpr + ' + \'';
+ }}
+ var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
+ {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
+
+ var {{=$exclusive}};
+ var {{=$exclType}} = typeof {{=$schemaValueExcl}};
+ if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') {
+ {{ var $errorKeyword = $exclusiveKeyword; }}
+ {{# def.error:'_exclusiveLimit' }}
+ } else if ({{# def.$dataNotType:'number' }}
+ {{=$exclType}} == 'number'
+ ? (
+ ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}})
+ ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ )
+ : (
+ ({{=$exclusive}} = {{=$schemaValueExcl}} === true)
+ ? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ )
+ || {{=$data}} !== {{=$data}}) {
+ var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
+ {{
+ if ($schema === undefined) {
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaValueExcl;
+ $isData = $isDataExcl;
+ }
+ }}
+{{??}}
+ {{
+ var $exclIsNumber = typeof $schemaExcl == 'number'
+ , $opStr = $op; /*used in error*/
+ }}
+
+ {{? $exclIsNumber && $isData }}
+ {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }}
+ if ({{# def.$dataNotType:'number' }}
+ ( {{=$schemaValue}} === undefined
+ || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}}
+ ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}}
+ : {{=$data}} {{=$notOp}} {{=$schemaValue}} )
+ || {{=$data}} !== {{=$data}}) {
+ {{??}}
+ {{
+ if ($exclIsNumber && $schema === undefined) {
+ {{# def.setExclusiveLimit }}
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber)
+ $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ {{# def.setExclusiveLimit }}
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+
+ var $opExpr = '\'' + $opStr + '\''; /*used in error*/
+ }}
+
+ if ({{# def.$dataNotType:'number' }}
+ {{=$data}} {{=$notOp}} {{=$schemaValue}}
+ || {{=$data}} !== {{=$data}}) {
+ {{?}}
+{{?}}
+ {{ $errorKeyword = $errorKeyword || $keyword; }}
+ {{# def.error:'_limit' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/_limitItems.jst b/node_modules/ajv/lib/dot/_limitItems.jst
new file mode 100644
index 0000000..741329e
--- /dev/null
+++ b/node_modules/ajv/lib/dot/_limitItems.jst
@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitItems' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/_limitLength.jst b/node_modules/ajv/lib/dot/_limitLength.jst
new file mode 100644
index 0000000..285c66b
--- /dev/null
+++ b/node_modules/ajv/lib/dot/_limitLength.jst
@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitLength' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/_limitProperties.jst b/node_modules/ajv/lib/dot/_limitProperties.jst
new file mode 100644
index 0000000..c4c2155
--- /dev/null
+++ b/node_modules/ajv/lib/dot/_limitProperties.jst
@@ -0,0 +1,12 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }}
+if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) {
+ {{ var $errorKeyword = $keyword; }}
+ {{# def.error:'_limitProperties' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/allOf.jst b/node_modules/ajv/lib/dot/allOf.jst
new file mode 100644
index 0000000..0e782fe
--- /dev/null
+++ b/node_modules/ajv/lib/dot/allOf.jst
@@ -0,0 +1,32 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+ var $currentBaseId = $it.baseId
+ , $allSchemasEmpty = true;
+}}
+
+{{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{
+ $allSchemasEmpty = false;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+
+ {{# def.ifResultValid }}
+ {{?}}
+{{~}}
+
+{{? $breakOnError }}
+ {{? $allSchemasEmpty }}
+ if (true) {
+ {{??}}
+ {{= $closingBraces.slice(0,-1) }}
+ {{?}}
+{{?}}
diff --git a/node_modules/ajv/lib/dot/anyOf.jst b/node_modules/ajv/lib/dot/anyOf.jst
new file mode 100644
index 0000000..ea909ee
--- /dev/null
+++ b/node_modules/ajv/lib/dot/anyOf.jst
@@ -0,0 +1,46 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+ var $noEmptySchema = $schema.every(function($sch) {
+ return {{# def.nonEmptySchema:$sch }};
+ });
+}}
+{{? $noEmptySchema }}
+ {{ var $currentBaseId = $it.baseId; }}
+ var {{=$errs}} = errors;
+ var {{=$valid}} = false;
+
+ {{# def.setCompositeRule }}
+
+ {{~ $schema:$sch:$i }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+
+ {{=$valid}} = {{=$valid}} || {{=$nextValid}};
+
+ if (!{{=$valid}}) {
+ {{ $closingBraces += '}'; }}
+ {{~}}
+
+ {{# def.resetCompositeRule }}
+
+ {{= $closingBraces }}
+
+ if (!{{=$valid}}) {
+ {{# def.extraError:'anyOf' }}
+ } else {
+ {{# def.resetErrors }}
+ {{? it.opts.allErrors }} } {{?}}
+{{??}}
+ {{? $breakOnError }}
+ if (true) {
+ {{?}}
+{{?}}
diff --git a/node_modules/ajv/lib/dot/coerce.def b/node_modules/ajv/lib/dot/coerce.def
new file mode 100644
index 0000000..c947ed6
--- /dev/null
+++ b/node_modules/ajv/lib/dot/coerce.def
@@ -0,0 +1,51 @@
+{{## def.coerceType:
+ {{
+ var $dataType = 'dataType' + $lvl
+ , $coerced = 'coerced' + $lvl;
+ }}
+ var {{=$dataType}} = typeof {{=$data}};
+ var {{=$coerced}} = undefined;
+
+ {{? it.opts.coerceTypes == 'array' }}
+ if ({{=$dataType}} == 'object' && Array.isArray({{=$data}}) && {{=$data}}.length == 1) {
+ {{=$data}} = {{=$data}}[0];
+ {{=$dataType}} = typeof {{=$data}};
+ if ({{=it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)}}) {{=$coerced}} = {{=$data}};
+ }
+ {{?}}
+
+ if ({{=$coerced}} !== undefined) ;
+ {{~ $coerceToTypes:$type:$i }}
+ {{? $type == 'string' }}
+ else if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean')
+ {{=$coerced}} = '' + {{=$data}};
+ else if ({{=$data}} === null) {{=$coerced}} = '';
+ {{?? $type == 'number' || $type == 'integer' }}
+ else if ({{=$dataType}} == 'boolean' || {{=$data}} === null
+ || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}}
+ {{? $type == 'integer' }} && !({{=$data}} % 1){{?}}))
+ {{=$coerced}} = +{{=$data}};
+ {{?? $type == 'boolean' }}
+ else if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null)
+ {{=$coerced}} = false;
+ else if ({{=$data}} === 'true' || {{=$data}} === 1)
+ {{=$coerced}} = true;
+ {{?? $type == 'null' }}
+ else if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false)
+ {{=$coerced}} = null;
+ {{?? it.opts.coerceTypes == 'array' && $type == 'array' }}
+ else if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null)
+ {{=$coerced}} = [{{=$data}}];
+ {{?}}
+ {{~}}
+ else {
+ {{# def.error:'type' }}
+ }
+
+ if ({{=$coerced}} !== undefined) {
+ {{# def.setParentData }}
+ {{=$data}} = {{=$coerced}};
+ {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}}
+ {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}};
+ }
+#}}
diff --git a/node_modules/ajv/lib/dot/comment.jst b/node_modules/ajv/lib/dot/comment.jst
new file mode 100644
index 0000000..f959150
--- /dev/null
+++ b/node_modules/ajv/lib/dot/comment.jst
@@ -0,0 +1,9 @@
+{{# def.definitions }}
+{{# def.setupKeyword }}
+
+{{ var $comment = it.util.toQuotedString($schema); }}
+{{? it.opts.$comment === true }}
+ console.log({{=$comment}});
+{{?? typeof it.opts.$comment == 'function' }}
+ self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema);
+{{?}}
diff --git a/node_modules/ajv/lib/dot/const.jst b/node_modules/ajv/lib/dot/const.jst
new file mode 100644
index 0000000..2aa2298
--- /dev/null
+++ b/node_modules/ajv/lib/dot/const.jst
@@ -0,0 +1,11 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{? !$isData }}
+ var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
+{{# def.checkError:'const' }}
+{{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/contains.jst b/node_modules/ajv/lib/dot/contains.jst
new file mode 100644
index 0000000..4dc9967
--- /dev/null
+++ b/node_modules/ajv/lib/dot/contains.jst
@@ -0,0 +1,55 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{
+ var $idx = 'i' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $currentBaseId = it.baseId
+ , $nonEmptySchema = {{# def.nonEmptySchema:$schema }};
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? $nonEmptySchema }}
+ {{# def.setCompositeRule }}
+
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ var {{=$nextValid}} = false;
+
+ for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ if ({{=$nextValid}}) break;
+ }
+
+ {{# def.resetCompositeRule }}
+ {{= $closingBraces }}
+
+ if (!{{=$nextValid}}) {
+{{??}}
+ if ({{=$data}}.length == 0) {
+{{?}}
+
+ {{# def.error:'contains' }}
+ } else {
+ {{? $nonEmptySchema }}
+ {{# def.resetErrors }}
+ {{?}}
+ {{? it.opts.allErrors }} } {{?}}
diff --git a/node_modules/ajv/lib/dot/custom.jst b/node_modules/ajv/lib/dot/custom.jst
new file mode 100644
index 0000000..d30588f
--- /dev/null
+++ b/node_modules/ajv/lib/dot/custom.jst
@@ -0,0 +1,191 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $rule = this
+ , $definition = 'definition' + $lvl
+ , $rDef = $rule.definition
+ , $closingBraces = '';
+ var $validate = $rDef.validate;
+ var $compile, $inline, $macro, $ruleValidate, $validateCode;
+}}
+
+{{? $isData && $rDef.$data }}
+ {{
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ }}
+ var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition;
+ var {{=$validateCode}} = {{=$definition}}.validate;
+{{??}}
+ {{
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ if (!$ruleValidate) return;
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }}
+{{?}}
+
+{{
+ var $ruleErrs = $validateCode + '.errors'
+ , $i = 'i' + $lvl
+ , $ruleErr = 'ruleErr' + $lvl
+ , $asyncKeyword = $rDef.async;
+
+ if ($asyncKeyword && !it.async)
+ throw new Error('async keyword in sync schema');
+}}
+
+
+{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}}
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{## def.callRuleValidate:
+ {{=$validateCode}}.call(
+ {{? it.opts.passContext }}this{{??}}self{{?}}
+ {{? $compile || $rDef.schema === false }}
+ , {{=$data}}
+ {{??}}
+ , {{=$schemaValue}}
+ , {{=$data}}
+ , validate.schema{{=it.schemaPath}}
+ {{?}}
+ , {{# def.dataPath }}
+ {{# def.passParentData }}
+ , rootData
+ )
+#}}
+
+{{## def.extendErrors:_inline:
+ for (var {{=$i}}={{=$errs}}; {{=$i}}<errors; {{=$i}}++) {
+ var {{=$ruleErr}} = vErrors[{{=$i}}];
+ if ({{=$ruleErr}}.dataPath === undefined)
+ {{=$ruleErr}}.dataPath = (dataPath || '') + {{= it.errorPath }};
+ {{# _inline ? 'if (\{\{=$ruleErr\}\}.schemaPath === undefined) {' : '' }}
+ {{=$ruleErr}}.schemaPath = "{{=$errSchemaPath}}";
+ {{# _inline ? '}' : '' }}
+ {{? it.opts.verbose }}
+ {{=$ruleErr}}.schema = {{=$schemaValue}};
+ {{=$ruleErr}}.data = {{=$data}};
+ {{?}}
+ }
+#}}
+
+
+{{? $isData && $rDef.$data }}
+ {{ $closingBraces += '}'; }}
+ if ({{=$schemaValue}} === undefined) {
+ {{=$valid}} = true;
+ } else {
+ {{? $validateSchema }}
+ {{ $closingBraces += '}'; }}
+ {{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
+ if ({{=$valid}}) {
+ {{?}}
+{{?}}
+
+{{? $inline }}
+ {{? $rDef.statements }}
+ {{= $ruleValidate.validate }}
+ {{??}}
+ {{=$valid}} = {{= $ruleValidate.validate }};
+ {{?}}
+{{?? $macro }}
+ {{# def.setupNextLevel }}
+ {{
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ }}
+ {{# def.setCompositeRule }}
+ {{ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); }}
+ {{# def.resetCompositeRule }}
+ {{= $code }}
+{{??}}
+ {{# def.beginDefOut}}
+ {{# def.callRuleValidate }}
+ {{# def.storeDefOut:def_callRuleValidate }}
+
+ {{? $rDef.errors === false }}
+ {{=$valid}} = {{? $asyncKeyword }}await {{?}}{{= def_callRuleValidate }};
+ {{??}}
+ {{? $asyncKeyword }}
+ {{ $ruleErrs = 'customErrors' + $lvl; }}
+ var {{=$ruleErrs}} = null;
+ try {
+ {{=$valid}} = await {{= def_callRuleValidate }};
+ } catch (e) {
+ {{=$valid}} = false;
+ if (e instanceof ValidationError) {{=$ruleErrs}} = e.errors;
+ else throw e;
+ }
+ {{??}}
+ {{=$ruleErrs}} = null;
+ {{=$valid}} = {{= def_callRuleValidate }};
+ {{?}}
+ {{?}}
+{{?}}
+
+{{? $rDef.modifying }}
+ if ({{=$parentData}}) {{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
+{{?}}
+
+{{= $closingBraces }}
+
+{{## def.notValidationResult:
+ {{? $rDef.valid === undefined }}
+ !{{? $macro }}{{=$nextValid}}{{??}}{{=$valid}}{{?}}
+ {{??}}
+ {{= !$rDef.valid }}
+ {{?}}
+#}}
+
+{{? $rDef.valid }}
+ {{? $breakOnError }} if (true) { {{?}}
+{{??}}
+ if ({{# def.notValidationResult }}) {
+ {{ $errorKeyword = $rule.keyword; }}
+ {{# def.beginDefOut}}
+ {{# def.error:'custom' }}
+ {{# def.storeDefOut:def_customError }}
+
+ {{? $inline }}
+ {{? $rDef.errors }}
+ {{? $rDef.errors != 'full' }}
+ {{# def.extendErrors:true }}
+ {{?}}
+ {{??}}
+ {{? $rDef.errors === false}}
+ {{= def_customError }}
+ {{??}}
+ if ({{=$errs}} == errors) {
+ {{= def_customError }}
+ } else {
+ {{# def.extendErrors:true }}
+ }
+ {{?}}
+ {{?}}
+ {{?? $macro }}
+ {{# def.extraError:'custom' }}
+ {{??}}
+ {{? $rDef.errors === false}}
+ {{= def_customError }}
+ {{??}}
+ if (Array.isArray({{=$ruleErrs}})) {
+ if (vErrors === null) vErrors = {{=$ruleErrs}};
+ else vErrors = vErrors.concat({{=$ruleErrs}});
+ errors = vErrors.length;
+ {{# def.extendErrors:false }}
+ } else {
+ {{= def_customError }}
+ }
+ {{?}}
+ {{?}}
+
+ } {{? $breakOnError }} else { {{?}}
+{{?}}
diff --git a/node_modules/ajv/lib/dot/defaults.def b/node_modules/ajv/lib/dot/defaults.def
new file mode 100644
index 0000000..a844cf2
--- /dev/null
+++ b/node_modules/ajv/lib/dot/defaults.def
@@ -0,0 +1,47 @@
+{{## def.assignDefault:
+ {{? it.compositeRule }}
+ {{
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ }}
+ {{??}}
+ if ({{=$passData}} === undefined
+ {{? it.opts.useDefaults == 'empty' }}
+ || {{=$passData}} === null
+ || {{=$passData}} === ''
+ {{?}}
+ )
+ {{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
+ {{= it.useDefault($sch.default) }}
+ {{??}}
+ {{= JSON.stringify($sch.default) }}
+ {{?}};
+ {{?}}
+#}}
+
+
+{{## def.defaultProperties:
+ {{
+ var $schema = it.schema.properties
+ , $schemaKeys = Object.keys($schema); }}
+ {{~ $schemaKeys:$propertyKey }}
+ {{ var $sch = $schema[$propertyKey]; }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + it.util.getProperty($propertyKey); }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}
+
+
+{{## def.defaultItems:
+ {{~ it.schema.items:$sch:$i }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + '[' + $i + ']'; }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}
diff --git a/node_modules/ajv/lib/dot/definitions.def b/node_modules/ajv/lib/dot/definitions.def
new file mode 100644
index 0000000..709cce3
--- /dev/null
+++ b/node_modules/ajv/lib/dot/definitions.def
@@ -0,0 +1,203 @@
+{{## def.setupKeyword:
+ {{
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ }}
+#}}
+
+
+{{## def.setCompositeRule:
+ {{
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ }}
+#}}
+
+
+{{## def.resetCompositeRule:
+ {{ it.compositeRule = $it.compositeRule = $wasComposite; }}
+#}}
+
+
+{{## def.setupNextLevel:
+ {{
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ }}
+#}}
+
+
+{{## def.ifValid:
+ {{? $breakOnError }}
+ if ({{=$valid}}) {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+#}}
+
+
+{{## def.ifResultValid:
+ {{? $breakOnError }}
+ if ({{=$nextValid}}) {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+#}}
+
+
+{{## def.elseIfValid:
+ {{? $breakOnError }}
+ {{ $closingBraces += '}'; }}
+ else {
+ {{?}}
+#}}
+
+
+{{## def.nonEmptySchema:_schema:
+ (it.opts.strictKeywords
+ ? (typeof _schema == 'object' && Object.keys(_schema).length > 0)
+ || _schema === false
+ : it.util.schemaHasRules(_schema, it.RULES.all))
+#}}
+
+
+{{## def.strLength:
+ {{? it.opts.unicode === false }}
+ {{=$data}}.length
+ {{??}}
+ ucs2length({{=$data}})
+ {{?}}
+#}}
+
+
+{{## def.willOptimize:
+ it.util.varOccurences($code, $nextData) < 2
+#}}
+
+
+{{## def.generateSubschemaCode:
+ {{
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ }}
+#}}
+
+
+{{## def.insertSubschemaCode:
+ {{= it.validate($it) }}
+ {{ $it.baseId = $currentBaseId; }}
+#}}
+
+
+{{## def._optimizeValidate:
+ it.util.varReplace($code, $nextData, $passData)
+#}}
+
+
+{{## def.optimizeValidate:
+ {{? {{# def.willOptimize}} }}
+ {{= {{# def._optimizeValidate }} }}
+ {{??}}
+ var {{=$nextData}} = {{=$passData}};
+ {{= $code }}
+ {{?}}
+#}}
+
+
+{{## def.$data:
+ {{
+ var $isData = it.opts.$data && $schema && $schema.$data
+ , $schemaValue;
+ }}
+ {{? $isData }}
+ var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }};
+ {{ $schemaValue = 'schema' + $lvl; }}
+ {{??}}
+ {{ $schemaValue = $schema; }}
+ {{?}}
+#}}
+
+
+{{## def.$dataNotType:_type:
+ {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}}
+#}}
+
+
+{{## def.check$dataIsArray:
+ if (schema{{=$lvl}} === undefined) {{=$valid}} = true;
+ else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false;
+ else {
+#}}
+
+
+{{## def.numberKeyword:
+ {{? !($isData || typeof $schema == 'number') }}
+ {{ throw new Error($keyword + ' must be number'); }}
+ {{?}}
+#}}
+
+
+{{## def.beginDefOut:
+ {{
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ }}
+#}}
+
+
+{{## def.storeDefOut:_variable:
+ {{
+ var _variable = out;
+ out = $$outStack.pop();
+ }}
+#}}
+
+
+{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}}
+
+{{## def.setParentData:
+ {{
+ var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData'
+ , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ }}
+#}}
+
+{{## def.passParentData:
+ {{# def.setParentData }}
+ , {{= $parentData }}
+ , {{= $parentDataProperty }}
+#}}
+
+
+{{## def.iterateProperties:
+ {{? $ownProperties }}
+ {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}});
+ for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) {
+ var {{=$key}} = {{=$dataProperties}}[{{=$idx}}];
+ {{??}}
+ for (var {{=$key}} in {{=$data}}) {
+ {{?}}
+#}}
+
+
+{{## def.noPropertyInData:
+ {{=$useData}} === undefined
+ {{? $ownProperties }}
+ || !{{# def.isOwnProperty }}
+ {{?}}
+#}}
+
+
+{{## def.isOwnProperty:
+ Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}')
+#}}
diff --git a/node_modules/ajv/lib/dot/dependencies.jst b/node_modules/ajv/lib/dot/dependencies.jst
new file mode 100644
index 0000000..e4bddde
--- /dev/null
+++ b/node_modules/ajv/lib/dot/dependencies.jst
@@ -0,0 +1,79 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.propertyInData:
+ {{=$data}}{{= it.util.getProperty($property) }} !== undefined
+ {{? $ownProperties }}
+ && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}')
+ {{?}}
+#}}
+
+
+{{
+ var $schemaDeps = {}
+ , $propertyDeps = {}
+ , $ownProperties = it.opts.ownProperties;
+
+ for ($property in $schema) {
+ if ($property == '__proto__') continue;
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+}}
+
+var {{=$errs}} = errors;
+
+{{ var $currentErrorPath = it.errorPath; }}
+
+var missing{{=$lvl}};
+{{ for (var $property in $propertyDeps) { }}
+ {{ $deps = $propertyDeps[$property]; }}
+ {{? $deps.length }}
+ if ({{# def.propertyInData }}
+ {{? $breakOnError }}
+ && ({{# def.checkMissingProperty:$deps }})) {
+ {{# def.errorMissingProperty:'dependencies' }}
+ {{??}}
+ ) {
+ {{~ $deps:$propertyKey }}
+ {{# def.allErrorsMissingProperty:'dependencies' }}
+ {{~}}
+ {{?}}
+ } {{# def.elseIfValid }}
+ {{?}}
+{{ } }}
+
+{{
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+}}
+
+
+{{ for (var $property in $schemaDeps) { }}
+ {{ var $sch = $schemaDeps[$property]; }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{=$nextValid}} = true;
+
+ if ({{# def.propertyInData }}) {
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ }}
+
+ {{# def.insertSubschemaCode }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+{{ } }}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
diff --git a/node_modules/ajv/lib/dot/enum.jst b/node_modules/ajv/lib/dot/enum.jst
new file mode 100644
index 0000000..357c2e8
--- /dev/null
+++ b/node_modules/ajv/lib/dot/enum.jst
@@ -0,0 +1,30 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $i = 'i' + $lvl
+ , $vSchema = 'schema' + $lvl;
+}}
+
+{{? !$isData }}
+ var {{=$vSchema}} = validate.schema{{=$schemaPath}};
+{{?}}
+var {{=$valid}};
+
+{{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+{{=$valid}} = false;
+
+for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++)
+ if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) {
+ {{=$valid}} = true;
+ break;
+ }
+
+{{? $isData }} } {{?}}
+
+{{# def.checkError:'enum' }}
+
+{{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/errors.def b/node_modules/ajv/lib/dot/errors.def
new file mode 100644
index 0000000..5c5752c
--- /dev/null
+++ b/node_modules/ajv/lib/dot/errors.def
@@ -0,0 +1,194 @@
+{{# def.definitions }}
+
+{{## def._error:_rule:
+ {{ 'istanbul ignore else'; }}
+ {{? it.createErrors !== false }}
+ {
+ keyword: '{{= $errorKeyword || _rule }}'
+ , dataPath: (dataPath || '') + {{= it.errorPath }}
+ , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}}
+ , params: {{# def._errorParams[_rule] }}
+ {{? it.opts.messages !== false }}
+ , message: {{# def._errorMessages[_rule] }}
+ {{?}}
+ {{? it.opts.verbose }}
+ , schema: {{# def._errorSchemas[_rule] }}
+ , parentSchema: validate.schema{{=it.schemaPath}}
+ , data: {{=$data}}
+ {{?}}
+ }
+ {{??}}
+ {}
+ {{?}}
+#}}
+
+
+{{## def._addError:_rule:
+ if (vErrors === null) vErrors = [err];
+ else vErrors.push(err);
+ errors++;
+#}}
+
+
+{{## def.addError:_rule:
+ var err = {{# def._error:_rule }};
+ {{# def._addError:_rule }}
+#}}
+
+
+{{## def.error:_rule:
+ {{# def.beginDefOut}}
+ {{# def._error:_rule }}
+ {{# def.storeDefOut:__err }}
+
+ {{? !it.compositeRule && $breakOnError }}
+ {{ 'istanbul ignore if'; }}
+ {{? it.async }}
+ throw new ValidationError([{{=__err}}]);
+ {{??}}
+ validate.errors = [{{=__err}}];
+ return false;
+ {{?}}
+ {{??}}
+ var err = {{=__err}};
+ {{# def._addError:_rule }}
+ {{?}}
+#}}
+
+
+{{## def.extraError:_rule:
+ {{# def.addError:_rule}}
+ {{? !it.compositeRule && $breakOnError }}
+ {{ 'istanbul ignore if'; }}
+ {{? it.async }}
+ throw new ValidationError(vErrors);
+ {{??}}
+ validate.errors = vErrors;
+ return false;
+ {{?}}
+ {{?}}
+#}}
+
+
+{{## def.checkError:_rule:
+ if (!{{=$valid}}) {
+ {{# def.error:_rule }}
+ }
+#}}
+
+
+{{## def.resetErrors:
+ errors = {{=$errs}};
+ if (vErrors !== null) {
+ if ({{=$errs}}) vErrors.length = {{=$errs}};
+ else vErrors = null;
+ }
+#}}
+
+
+{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
+{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}}
+{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
+
+{{## def._errorMessages = {
+ 'false schema': "'boolean schema is false'",
+ $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
+ additionalItems: "'should NOT have more than {{=$schema.length}} items'",
+ additionalProperties: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}should NOT have additional properties{{?}}'",
+ anyOf: "'should match some schema in anyOf'",
+ const: "'should be equal to constant'",
+ contains: "'should contain a valid item'",
+ dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
+ 'enum': "'should be equal to one of the allowed values'",
+ format: "'should match format \"{{#def.concatSchemaEQ}}\"'",
+ 'if': "'should match \"' + {{=$ifClause}} + '\" schema'",
+ _limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
+ _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
+ _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'",
+ _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
+ _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} properties'",
+ multipleOf: "'should be multiple of {{#def.appendSchema}}",
+ not: "'should NOT be valid'",
+ oneOf: "'should match exactly one schema in oneOf'",
+ pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
+ propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'",
+ required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'",
+ type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'",
+ uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'",
+ custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'",
+ patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
+ switch: "'should pass \"switch\" keyword validation'",
+ _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'",
+ _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'"
+} #}}
+
+
+{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}}
+{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorSchemas = {
+ 'false schema': "false",
+ $ref: "{{=it.util.toQuotedString($schema)}}",
+ additionalItems: "false",
+ additionalProperties: "false",
+ anyOf: "validate.schema{{=$schemaPath}}",
+ const: "validate.schema{{=$schemaPath}}",
+ contains: "validate.schema{{=$schemaPath}}",
+ dependencies: "validate.schema{{=$schemaPath}}",
+ 'enum': "validate.schema{{=$schemaPath}}",
+ format: "{{#def.schemaRefOrQS}}",
+ 'if': "validate.schema{{=$schemaPath}}",
+ _limit: "{{#def.schemaRefOrVal}}",
+ _exclusiveLimit: "validate.schema{{=$schemaPath}}",
+ _limitItems: "{{#def.schemaRefOrVal}}",
+ _limitLength: "{{#def.schemaRefOrVal}}",
+ _limitProperties:"{{#def.schemaRefOrVal}}",
+ multipleOf: "{{#def.schemaRefOrVal}}",
+ not: "validate.schema{{=$schemaPath}}",
+ oneOf: "validate.schema{{=$schemaPath}}",
+ pattern: "{{#def.schemaRefOrQS}}",
+ propertyNames: "validate.schema{{=$schemaPath}}",
+ required: "validate.schema{{=$schemaPath}}",
+ type: "validate.schema{{=$schemaPath}}",
+ uniqueItems: "{{#def.schemaRefOrVal}}",
+ custom: "validate.schema{{=$schemaPath}}",
+ patternRequired: "validate.schema{{=$schemaPath}}",
+ switch: "validate.schema{{=$schemaPath}}",
+ _formatLimit: "{{#def.schemaRefOrQS}}",
+ _formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
+} #}}
+
+
+{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
+
+{{## def._errorParams = {
+ 'false schema': "{}",
+ $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
+ additionalItems: "{ limit: {{=$schema.length}} }",
+ additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
+ anyOf: "{}",
+ const: "{ allowedValue: schema{{=$lvl}} }",
+ contains: "{}",
+ dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
+ 'enum': "{ allowedValues: schema{{=$lvl}} }",
+ format: "{ format: {{#def.schemaValueQS}} }",
+ 'if': "{ failingKeyword: {{=$ifClause}} }",
+ _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
+ _exclusiveLimit: "{}",
+ _limitItems: "{ limit: {{=$schemaValue}} }",
+ _limitLength: "{ limit: {{=$schemaValue}} }",
+ _limitProperties:"{ limit: {{=$schemaValue}} }",
+ multipleOf: "{ multipleOf: {{=$schemaValue}} }",
+ not: "{}",
+ oneOf: "{ passingSchemas: {{=$passingSchemas}} }",
+ pattern: "{ pattern: {{#def.schemaValueQS}} }",
+ propertyNames: "{ propertyName: '{{=$invalidName}}' }",
+ required: "{ missingProperty: '{{=$missingProperty}}' }",
+ type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
+ uniqueItems: "{ i: i, j: j }",
+ custom: "{ keyword: '{{=$rule.keyword}}' }",
+ patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
+ switch: "{ caseIndex: {{=$caseIndex}} }",
+ _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
+ _formatExclusiveLimit: "{}"
+} #}}
diff --git a/node_modules/ajv/lib/dot/format.jst b/node_modules/ajv/lib/dot/format.jst
new file mode 100644
index 0000000..37f14da
--- /dev/null
+++ b/node_modules/ajv/lib/dot/format.jst
@@ -0,0 +1,106 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def.skipFormat:
+ {{? $breakOnError }} if (true) { {{?}}
+ {{ return out; }}
+#}}
+
+{{? it.opts.format === false }}{{# def.skipFormat }}{{?}}
+
+
+{{# def.$data }}
+
+
+{{## def.$dataCheckFormat:
+ {{# def.$dataNotType:'string' }}
+ ({{? $unknownFormats != 'ignore' }}
+ ({{=$schemaValue}} && !{{=$format}}
+ {{? $allowUnknown }}
+ && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
+ {{?}}) ||
+ {{?}}
+ ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}'
+ && !(typeof {{=$format}} == 'function'
+ ? {{? it.async}}
+ (async{{=$lvl}} ? await {{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
+ {{??}}
+ {{=$format}}({{=$data}})
+ {{?}}
+ : {{=$format}}.test({{=$data}}))))
+#}}
+
+{{## def.checkFormat:
+ {{
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ }}
+ {{? typeof $format == 'function' }}
+ {{=$formatRef}}({{=$data}})
+ {{??}}
+ {{=$formatRef}}.test({{=$data}})
+ {{?}}
+#}}
+
+
+{{
+ var $unknownFormats = it.opts.unknownFormats
+ , $allowUnknown = Array.isArray($unknownFormats);
+}}
+
+{{? $isData }}
+ {{
+ var $format = 'format' + $lvl
+ , $isObject = 'isObject' + $lvl
+ , $formatType = 'formatType' + $lvl;
+ }}
+ var {{=$format}} = formats[{{=$schemaValue}}];
+ var {{=$isObject}} = typeof {{=$format}} == 'object'
+ && !({{=$format}} instanceof RegExp)
+ && {{=$format}}.validate;
+ var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string';
+ if ({{=$isObject}}) {
+ {{? it.async}}
+ var async{{=$lvl}} = {{=$format}}.async;
+ {{?}}
+ {{=$format}} = {{=$format}}.validate;
+ }
+ if ({{# def.$dataCheckFormat }}) {
+{{??}}
+ {{ var $format = it.formats[$schema]; }}
+ {{? !$format }}
+ {{? $unknownFormats == 'ignore' }}
+ {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
+ {{# def.skipFormat }}
+ {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }}
+ {{# def.skipFormat }}
+ {{??}}
+ {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
+ {{?}}
+ {{?}}
+ {{
+ var $isObject = typeof $format == 'object'
+ && !($format instanceof RegExp)
+ && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ }}
+ {{? $formatType != $ruleType }}
+ {{# def.skipFormat }}
+ {{?}}
+ {{? $async }}
+ {{
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ }}
+ if (!(await {{=$formatRef}}({{=$data}}))) {
+ {{??}}
+ if (!{{# def.checkFormat }}) {
+ {{?}}
+{{?}}
+ {{# def.error:'format' }}
+ } {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/if.jst b/node_modules/ajv/lib/dot/if.jst
new file mode 100644
index 0000000..adb5036
--- /dev/null
+++ b/node_modules/ajv/lib/dot/if.jst
@@ -0,0 +1,73 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateIfClause:_clause:
+ {{
+ $it.schema = it.schema['_clause'];
+ $it.schemaPath = it.schemaPath + '._clause';
+ $it.errSchemaPath = it.errSchemaPath + '/_clause';
+ }}
+ {{# def.insertSubschemaCode }}
+ {{=$valid}} = {{=$nextValid}};
+ {{? $thenPresent && $elsePresent }}
+ {{ $ifClause = 'ifClause' + $lvl; }}
+ var {{=$ifClause}} = '_clause';
+ {{??}}
+ {{ $ifClause = '\'_clause\''; }}
+ {{?}}
+#}}
+
+{{
+ var $thenSch = it.schema['then']
+ , $elseSch = it.schema['else']
+ , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }}
+ , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }}
+ , $currentBaseId = $it.baseId;
+}}
+
+{{? $thenPresent || $elsePresent }}
+ {{
+ var $ifClause;
+ $it.createErrors = false;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+ var {{=$errs}} = errors;
+ var {{=$valid}} = true;
+
+ {{# def.setCompositeRule }}
+ {{# def.insertSubschemaCode }}
+ {{ $it.createErrors = true; }}
+ {{# def.resetErrors }}
+ {{# def.resetCompositeRule }}
+
+ {{? $thenPresent }}
+ if ({{=$nextValid}}) {
+ {{# def.validateIfClause:then }}
+ }
+ {{? $elsePresent }}
+ else {
+ {{?}}
+ {{??}}
+ if (!{{=$nextValid}}) {
+ {{?}}
+
+ {{? $elsePresent }}
+ {{# def.validateIfClause:else }}
+ }
+ {{?}}
+
+ if (!{{=$valid}}) {
+ {{# def.extraError:'if' }}
+ }
+ {{? $breakOnError }} else { {{?}}
+{{??}}
+ {{? $breakOnError }}
+ if (true) {
+ {{?}}
+{{?}}
+
diff --git a/node_modules/ajv/lib/dot/items.jst b/node_modules/ajv/lib/dot/items.jst
new file mode 100644
index 0000000..acc932a
--- /dev/null
+++ b/node_modules/ajv/lib/dot/items.jst
@@ -0,0 +1,98 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateItems:startFrom:
+ for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }}
+ if (!{{=$nextValid}}) break;
+ {{?}}
+ }
+#}}
+
+{{
+ var $idx = 'i' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $currentBaseId = it.baseId;
+}}
+
+var {{=$errs}} = errors;
+var {{=$valid}};
+
+{{? Array.isArray($schema) }}
+ {{ /* 'items' is an array of schemas */}}
+ {{ var $additionalItems = it.schema.additionalItems; }}
+ {{? $additionalItems === false }}
+ {{=$valid}} = {{=$data}}.length <= {{= $schema.length }};
+ {{
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ }}
+ {{# def.checkError:'additionalItems' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{# def.elseIfValid}}
+ {{?}}
+
+ {{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{=$nextValid}} = true;
+
+ if ({{=$data}}.length > {{=$i}}) {
+ {{
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+ {{~}}
+
+ {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }}
+ {{
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ }}
+ {{=$nextValid}} = true;
+
+ if ({{=$data}}.length > {{= $schema.length }}) {
+ {{# def.validateItems: $schema.length }}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}}
+
+{{?? {{# def.nonEmptySchema:$schema }} }}
+ {{ /* 'items' is a single schema */}}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+ {{# def.validateItems: 0 }}
+{{?}}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
diff --git a/node_modules/ajv/lib/dot/missing.def b/node_modules/ajv/lib/dot/missing.def
new file mode 100644
index 0000000..a73b9f9
--- /dev/null
+++ b/node_modules/ajv/lib/dot/missing.def
@@ -0,0 +1,39 @@
+{{## def.checkMissingProperty:_properties:
+ {{~ _properties:$propertyKey:$i }}
+ {{?$i}} || {{?}}
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $useData = $data + $prop;
+ }}
+ ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
+ {{~}}
+#}}
+
+
+{{## def.errorMissingProperty:_error:
+ {{
+ var $propertyPath = 'missing' + $lvl
+ , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers
+ ? it.util.getPathExpr($currentErrorPath, $propertyPath, true)
+ : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ }}
+ {{# def.error:_error }}
+#}}
+
+
+{{## def.allErrorsMissingProperty:_error:
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $missingProperty = it.util.escapeQuotes($propertyKey)
+ , $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ }}
+ if ({{# def.noPropertyInData }}) {
+ {{# def.addError:_error }}
+ }
+#}}
diff --git a/node_modules/ajv/lib/dot/multipleOf.jst b/node_modules/ajv/lib/dot/multipleOf.jst
new file mode 100644
index 0000000..6d88a45
--- /dev/null
+++ b/node_modules/ajv/lib/dot/multipleOf.jst
@@ -0,0 +1,22 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{# def.numberKeyword }}
+
+var division{{=$lvl}};
+if ({{?$isData}}
+ {{=$schemaValue}} !== undefined && (
+ typeof {{=$schemaValue}} != 'number' ||
+ {{?}}
+ (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
+ {{? it.opts.multipleOfPrecision }}
+ Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
+ {{??}}
+ division{{=$lvl}} !== parseInt(division{{=$lvl}})
+ {{?}}
+ )
+ {{?$isData}} ) {{?}} ) {
+ {{# def.error:'multipleOf' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/not.jst b/node_modules/ajv/lib/dot/not.jst
new file mode 100644
index 0000000..e03185a
--- /dev/null
+++ b/node_modules/ajv/lib/dot/not.jst
@@ -0,0 +1,43 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ var {{=$errs}} = errors;
+
+ {{# def.setCompositeRule }}
+
+ {{
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ }}
+ {{= it.validate($it) }}
+ {{
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ }}
+
+ {{# def.resetCompositeRule }}
+
+ if ({{=$nextValid}}) {
+ {{# def.error:'not' }}
+ } else {
+ {{# def.resetErrors }}
+ {{? it.opts.allErrors }} } {{?}}
+{{??}}
+ {{# def.addError:'not' }}
+ {{? $breakOnError}}
+ if (false) {
+ {{?}}
+{{?}}
diff --git a/node_modules/ajv/lib/dot/oneOf.jst b/node_modules/ajv/lib/dot/oneOf.jst
new file mode 100644
index 0000000..bcce2c6
--- /dev/null
+++ b/node_modules/ajv/lib/dot/oneOf.jst
@@ -0,0 +1,54 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+{{
+ var $currentBaseId = $it.baseId
+ , $prevValid = 'prevValid' + $lvl
+ , $passingSchemas = 'passingSchemas' + $lvl;
+}}
+
+var {{=$errs}} = errors
+ , {{=$prevValid}} = false
+ , {{=$valid}} = false
+ , {{=$passingSchemas}} = null;
+
+{{# def.setCompositeRule }}
+
+{{~ $schema:$sch:$i }}
+ {{? {{# def.nonEmptySchema:$sch }} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ }}
+
+ {{# def.insertSubschemaCode }}
+ {{??}}
+ var {{=$nextValid}} = true;
+ {{?}}
+
+ {{? $i }}
+ if ({{=$nextValid}} && {{=$prevValid}}) {
+ {{=$valid}} = false;
+ {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}];
+ } else {
+ {{ $closingBraces += '}'; }}
+ {{?}}
+
+ if ({{=$nextValid}}) {
+ {{=$valid}} = {{=$prevValid}} = true;
+ {{=$passingSchemas}} = {{=$i}};
+ }
+{{~}}
+
+{{# def.resetCompositeRule }}
+
+{{= $closingBraces }}
+
+if (!{{=$valid}}) {
+ {{# def.extraError:'oneOf' }}
+} else {
+ {{# def.resetErrors }}
+{{? it.opts.allErrors }} } {{?}}
diff --git a/node_modules/ajv/lib/dot/pattern.jst b/node_modules/ajv/lib/dot/pattern.jst
new file mode 100644
index 0000000..3a37ef6
--- /dev/null
+++ b/node_modules/ajv/lib/dot/pattern.jst
@@ -0,0 +1,14 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{
+ var $regexp = $isData
+ ? '(new RegExp(' + $schemaValue + '))'
+ : it.usePattern($schema);
+}}
+
+if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
+ {{# def.error:'pattern' }}
+} {{? $breakOnError }} else { {{?}}
diff --git a/node_modules/ajv/lib/dot/properties.jst b/node_modules/ajv/lib/dot/properties.jst
new file mode 100644
index 0000000..5cebb9b
--- /dev/null
+++ b/node_modules/ajv/lib/dot/properties.jst
@@ -0,0 +1,245 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+
+{{## def.validateAdditional:
+ {{ /* additionalProperties is schema */
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty
+ ? it.errorPath
+ : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+#}}
+
+
+{{
+ var $key = 'key' + $lvl
+ , $idx = 'idx' + $lvl
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $dataProperties = 'dataProperties' + $lvl;
+
+ var $schemaKeys = Object.keys($schema || {}).filter(notProto)
+ , $pProperties = it.schema.patternProperties || {}
+ , $pPropertyKeys = Object.keys($pProperties).filter(notProto)
+ , $aProperties = it.schema.additionalProperties
+ , $someProperties = $schemaKeys.length || $pPropertyKeys.length
+ , $noAdditional = $aProperties === false
+ , $additionalIsSchema = typeof $aProperties == 'object'
+ && Object.keys($aProperties).length
+ , $removeAdditional = it.opts.removeAdditional
+ , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional
+ , $ownProperties = it.opts.ownProperties
+ , $currentBaseId = it.baseId;
+
+ var $required = it.schema.required;
+ if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {
+ var $requiredHash = it.util.toHash($required);
+ }
+
+ function notProto(p) { return p !== '__proto__'; }
+}}
+
+
+var {{=$errs}} = errors;
+var {{=$nextValid}} = true;
+{{? $ownProperties }}
+ var {{=$dataProperties}} = undefined;
+{{?}}
+
+{{? $checkAdditional }}
+ {{# def.iterateProperties }}
+ {{? $someProperties }}
+ var isAdditional{{=$lvl}} = !(false
+ {{? $schemaKeys.length }}
+ {{? $schemaKeys.length > 8 }}
+ || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}})
+ {{??}}
+ {{~ $schemaKeys:$propertyKey }}
+ || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }}
+ {{~}}
+ {{?}}
+ {{?}}
+ {{? $pPropertyKeys.length }}
+ {{~ $pPropertyKeys:$pProperty:$i }}
+ || {{= it.usePattern($pProperty) }}.test({{=$key}})
+ {{~}}
+ {{?}}
+ );
+
+ if (isAdditional{{=$lvl}}) {
+ {{?}}
+ {{? $removeAdditional == 'all' }}
+ delete {{=$data}}[{{=$key}}];
+ {{??}}
+ {{
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + ' + $key + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ }
+ }}
+ {{? $noAdditional }}
+ {{? $removeAdditional }}
+ delete {{=$data}}[{{=$key}}];
+ {{??}}
+ {{=$nextValid}} = false;
+ {{
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ }}
+ {{# def.error:'additionalProperties' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{? $breakOnError }} break; {{?}}
+ {{?}}
+ {{?? $additionalIsSchema }}
+ {{? $removeAdditional == 'failing' }}
+ var {{=$errs}} = errors;
+ {{# def.setCompositeRule }}
+
+ {{# def.validateAdditional }}
+
+ if (!{{=$nextValid}}) {
+ errors = {{=$errs}};
+ if (validate.errors !== null) {
+ if (errors) validate.errors.length = errors;
+ else validate.errors = null;
+ }
+ delete {{=$data}}[{{=$key}}];
+ }
+
+ {{# def.resetCompositeRule }}
+ {{??}}
+ {{# def.validateAdditional }}
+ {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
+ {{?}}
+ {{?}}
+ {{ it.errorPath = $currentErrorPath; }}
+ {{?}}
+ {{? $someProperties }}
+ }
+ {{?}}
+ }
+
+ {{# def.ifResultValid }}
+{{?}}
+
+{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }}
+
+{{? $schemaKeys.length }}
+ {{~ $schemaKeys:$propertyKey }}
+ {{ var $sch = $schema[$propertyKey]; }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ var $prop = it.util.getProperty($propertyKey)
+ , $passData = $data + $prop
+ , $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ }}
+
+ {{# def.generateSubschemaCode }}
+
+ {{? {{# def.willOptimize }} }}
+ {{
+ $code = {{# def._optimizeValidate }};
+ var $useData = $passData;
+ }}
+ {{??}}
+ {{ var $useData = $nextData; }}
+ var {{=$nextData}} = {{=$passData}};
+ {{?}}
+
+ {{? $hasDefault }}
+ {{= $code }}
+ {{??}}
+ {{? $requiredHash && $requiredHash[$propertyKey] }}
+ if ({{# def.noPropertyInData }}) {
+ {{=$nextValid}} = false;
+ {{
+ var $currentErrorPath = it.errorPath
+ , $currErrSchemaPath = $errSchemaPath
+ , $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ }}
+ {{# def.error:'required' }}
+ {{ $errSchemaPath = $currErrSchemaPath; }}
+ {{ it.errorPath = $currentErrorPath; }}
+ } else {
+ {{??}}
+ {{? $breakOnError }}
+ if ({{# def.noPropertyInData }}) {
+ {{=$nextValid}} = true;
+ } else {
+ {{??}}
+ if ({{=$useData}} !== undefined
+ {{? $ownProperties }}
+ && {{# def.isOwnProperty }}
+ {{?}}
+ ) {
+ {{?}}
+ {{?}}
+
+ {{= $code }}
+ }
+ {{?}} {{ /* $hasDefault */ }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+
+ {{# def.ifResultValid }}
+ {{~}}
+{{?}}
+
+{{? $pPropertyKeys.length }}
+ {{~ $pPropertyKeys:$pProperty }}
+ {{ var $sch = $pProperties[$pProperty]; }}
+
+ {{? {{# def.nonEmptySchema:$sch}} }}
+ {{
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/'
+ + it.util.escapeFragment($pProperty);
+ }}
+
+ {{# def.iterateProperties }}
+ if ({{= it.usePattern($pProperty) }}.test({{=$key}})) {
+ {{
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ }}
+
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+
+ {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}}
+ }
+ {{? $breakOnError }} else {{=$nextValid}} = true; {{?}}
+ }
+
+ {{# def.ifResultValid }}
+ {{?}} {{ /* def.nonEmptySchema */ }}
+ {{~}}
+{{?}}
+
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
diff --git a/node_modules/ajv/lib/dot/propertyNames.jst b/node_modules/ajv/lib/dot/propertyNames.jst
new file mode 100644
index 0000000..d456cca
--- /dev/null
+++ b/node_modules/ajv/lib/dot/propertyNames.jst
@@ -0,0 +1,52 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.setupNextLevel }}
+
+var {{=$errs}} = errors;
+
+{{? {{# def.nonEmptySchema:$schema }} }}
+ {{
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ }}
+
+ {{
+ var $key = 'key' + $lvl
+ , $idx = 'idx' + $lvl
+ , $i = 'i' + $lvl
+ , $invalidName = '\' + ' + $key + ' + \''
+ , $dataNxt = $it.dataLevel = it.dataLevel + 1
+ , $nextData = 'data' + $dataNxt
+ , $dataProperties = 'dataProperties' + $lvl
+ , $ownProperties = it.opts.ownProperties
+ , $currentBaseId = it.baseId;
+ }}
+
+ {{? $ownProperties }}
+ var {{=$dataProperties}} = undefined;
+ {{?}}
+ {{# def.iterateProperties }}
+ var startErrs{{=$lvl}} = errors;
+
+ {{ var $passData = $key; }}
+ {{# def.setCompositeRule }}
+ {{# def.generateSubschemaCode }}
+ {{# def.optimizeValidate }}
+ {{# def.resetCompositeRule }}
+
+ if (!{{=$nextValid}}) {
+ for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}<errors; {{=$i}}++) {
+ vErrors[{{=$i}}].propertyName = {{=$key}};
+ }
+ {{# def.extraError:'propertyNames' }}
+ {{? $breakOnError }} break; {{?}}
+ }
+ }
+{{?}}
+
+{{? $breakOnError }}
+ {{= $closingBraces }}
+ if ({{=$errs}} == errors) {
+{{?}}
diff --git a/node_modules/ajv/lib/dot/ref.jst b/node_modules/ajv/lib/dot/ref.jst
new file mode 100644
index 0000000..253e350
--- /dev/null
+++ b/node_modules/ajv/lib/dot/ref.jst
@@ -0,0 +1,85 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+
+{{## def._validateRef:_v:
+ {{? it.opts.passContext }}
+ {{=_v}}.call(this,
+ {{??}}
+ {{=_v}}(
+ {{?}}
+ {{=$data}}, {{# def.dataPath }}{{# def.passParentData }}, rootData)
+#}}
+
+{{ var $async, $refCode; }}
+{{? $schema == '#' || $schema == '#/' }}
+ {{
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ }}
+{{??}}
+ {{ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); }}
+ {{? $refVal === undefined }}
+ {{ var $message = it.MissingRefError.message(it.baseId, $schema); }}
+ {{? it.opts.missingRefs == 'fail' }}
+ {{ it.logger.error($message); }}
+ {{# def.error:'$ref' }}
+ {{? $breakOnError }} if (false) { {{?}}
+ {{?? it.opts.missingRefs == 'ignore' }}
+ {{ it.logger.warn($message); }}
+ {{? $breakOnError }} if (true) { {{?}}
+ {{??}}
+ {{ throw new it.MissingRefError(it.baseId, $schema, $message); }}
+ {{?}}
+ {{?? $refVal.inline }}
+ {{# def.setupNextLevel }}
+ {{
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ }}
+ {{ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); }}
+ {{= $code }}
+ {{? $breakOnError}}
+ if ({{=$nextValid}}) {
+ {{?}}
+ {{??}}
+ {{
+ $async = $refVal.$async === true || (it.async && $refVal.$async !== false);
+ $refCode = $refVal.code;
+ }}
+ {{?}}
+{{?}}
+
+{{? $refCode }}
+ {{# def.beginDefOut}}
+ {{# def._validateRef:$refCode }}
+ {{# def.storeDefOut:__callValidate }}
+
+ {{? $async }}
+ {{ if (!it.async) throw new Error('async schema referenced by sync schema'); }}
+ {{? $breakOnError }} var {{=$valid}}; {{?}}
+ try {
+ await {{=__callValidate}};
+ {{? $breakOnError }} {{=$valid}} = true; {{?}}
+ } catch (e) {
+ if (!(e instanceof ValidationError)) throw e;
+ if (vErrors === null) vErrors = e.errors;
+ else vErrors = vErrors.concat(e.errors);
+ errors = vErrors.length;
+ {{? $breakOnError }} {{=$valid}} = false; {{?}}
+ }
+ {{? $breakOnError }} if ({{=$valid}}) { {{?}}
+ {{??}}
+ if (!{{=__callValidate}}) {
+ if (vErrors === null) vErrors = {{=$refCode}}.errors;
+ else vErrors = vErrors.concat({{=$refCode}}.errors);
+ errors = vErrors.length;
+ } {{? $breakOnError }} else { {{?}}
+ {{?}}
+{{?}}
diff --git a/node_modules/ajv/lib/dot/required.jst b/node_modules/ajv/lib/dot/required.jst
new file mode 100644
index 0000000..80fde35
--- /dev/null
+++ b/node_modules/ajv/lib/dot/required.jst
@@ -0,0 +1,108 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.missing }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+{{ var $vSchema = 'schema' + $lvl; }}
+
+{{## def.setupLoop:
+ {{? !$isData }}
+ var {{=$vSchema}} = validate.schema{{=$schemaPath}};
+ {{?}}
+
+ {{
+ var $i = 'i' + $lvl
+ , $propertyPath = 'schema' + $lvl + '[' + $i + ']'
+ , $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ }}
+#}}
+
+
+{{## def.isRequiredOwnProperty:
+ Object.prototype.hasOwnProperty.call({{=$data}}, {{=$vSchema}}[{{=$i}}])
+#}}
+
+
+{{? !$isData }}
+ {{? $schema.length < it.opts.loopRequired &&
+ it.schema.properties && Object.keys(it.schema.properties).length }}
+ {{ var $required = []; }}
+ {{~ $schema:$property }}
+ {{ var $propertySch = it.schema.properties[$property]; }}
+ {{? !($propertySch && {{# def.nonEmptySchema:$propertySch}}) }}
+ {{ $required[$required.length] = $property; }}
+ {{?}}
+ {{~}}
+ {{??}}
+ {{ var $required = $schema; }}
+ {{?}}
+{{?}}
+
+
+{{? $isData || $required.length }}
+ {{
+ var $currentErrorPath = it.errorPath
+ , $loopRequired = $isData || $required.length >= it.opts.loopRequired
+ , $ownProperties = it.opts.ownProperties;
+ }}
+
+ {{? $breakOnError }}
+ var missing{{=$lvl}};
+ {{? $loopRequired }}
+ {{# def.setupLoop }}
+ var {{=$valid}} = true;
+
+ {{?$isData}}{{# def.check$dataIsArray }}{{?}}
+
+ for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
+ {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined
+ {{? $ownProperties }}
+ && {{# def.isRequiredOwnProperty }}
+ {{?}};
+ if (!{{=$valid}}) break;
+ }
+
+ {{? $isData }} } {{?}}
+
+ {{# def.checkError:'required' }}
+ else {
+ {{??}}
+ if ({{# def.checkMissingProperty:$required }}) {
+ {{# def.errorMissingProperty:'required' }}
+ } else {
+ {{?}}
+ {{??}}
+ {{? $loopRequired }}
+ {{# def.setupLoop }}
+ {{? $isData }}
+ if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) {
+ {{# def.addError:'required' }}
+ } else if ({{=$vSchema}} !== undefined) {
+ {{?}}
+
+ for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) {
+ if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined
+ {{? $ownProperties }}
+ || !{{# def.isRequiredOwnProperty }}
+ {{?}}) {
+ {{# def.addError:'required' }}
+ }
+ }
+
+ {{? $isData }} } {{?}}
+ {{??}}
+ {{~ $required:$propertyKey }}
+ {{# def.allErrorsMissingProperty:'required' }}
+ {{~}}
+ {{?}}
+ {{?}}
+
+ {{ it.errorPath = $currentErrorPath; }}
+
+{{?? $breakOnError }}
+ if (true) {
+{{?}}
diff --git a/node_modules/ajv/lib/dot/uniqueItems.jst b/node_modules/ajv/lib/dot/uniqueItems.jst
new file mode 100644
index 0000000..e69b830
--- /dev/null
+++ b/node_modules/ajv/lib/dot/uniqueItems.jst
@@ -0,0 +1,62 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.setupKeyword }}
+{{# def.$data }}
+
+
+{{? ($schema || $isData) && it.opts.uniqueItems !== false }}
+ {{? $isData }}
+ var {{=$valid}};
+ if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined)
+ {{=$valid}} = true;
+ else if (typeof {{=$schemaValue}} != 'boolean')
+ {{=$valid}} = false;
+ else {
+ {{?}}
+
+ var i = {{=$data}}.length
+ , {{=$valid}} = true
+ , j;
+ if (i > 1) {
+ {{
+ var $itemType = it.schema.items && it.schema.items.type
+ , $typeIsArray = Array.isArray($itemType);
+ }}
+ {{? !$itemType || $itemType == 'object' || $itemType == 'array' ||
+ ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }}
+ outer:
+ for (;i--;) {
+ for (j = i; j--;) {
+ if (equal({{=$data}}[i], {{=$data}}[j])) {
+ {{=$valid}} = false;
+ break outer;
+ }
+ }
+ }
+ {{??}}
+ var itemIndices = {}, item;
+ for (;i--;) {
+ var item = {{=$data}}[i];
+ {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }}
+ if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue;
+ {{? $typeIsArray}}
+ if (typeof item == 'string') item = '"' + item;
+ {{?}}
+ if (typeof itemIndices[item] == 'number') {
+ {{=$valid}} = false;
+ j = itemIndices[item];
+ break;
+ }
+ itemIndices[item] = i;
+ }
+ {{?}}
+ }
+
+ {{? $isData }} } {{?}}
+
+ if (!{{=$valid}}) {
+ {{# def.error:'uniqueItems' }}
+ } {{? $breakOnError }} else { {{?}}
+{{??}}
+ {{? $breakOnError }} if (true) { {{?}}
+{{?}}
diff --git a/node_modules/ajv/lib/dot/validate.jst b/node_modules/ajv/lib/dot/validate.jst
new file mode 100644
index 0000000..32087e7
--- /dev/null
+++ b/node_modules/ajv/lib/dot/validate.jst
@@ -0,0 +1,276 @@
+{{# def.definitions }}
+{{# def.errors }}
+{{# def.defaults }}
+{{# def.coerce }}
+
+{{ /**
+ * schema compilation (render) time:
+ * it = { schema, RULES, _validate, opts }
+ * it.validate - this template function,
+ * it is used recursively to generate code for subschemas
+ *
+ * runtime:
+ * "validate" is a variable name to which this function will be assigned
+ * validateRef etc. are defined in the parent scope in index.js
+ */ }}
+
+{{
+ var $async = it.schema.$async === true
+ , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref')
+ , $id = it.self._getId(it.schema);
+}}
+
+{{
+ if (it.opts.strictKeywords) {
+ var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
+ if ($unknownKwd) {
+ var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
+ if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
+ else throw new Error($keywordsMsg);
+ }
+ }
+}}
+
+{{? it.isTop }}
+ var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ {{? $id && (it.opts.sourceCode || it.opts.processCode) }}
+ {{= '/\*# sourceURL=' + $id + ' */' }}
+ {{?}}
+{{?}}
+
+{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }}
+ {{ var $keyword = 'false schema'; }}
+ {{# def.setupKeyword }}
+ {{? it.schema === false}}
+ {{? it.isTop}}
+ {{ $breakOnError = true; }}
+ {{??}}
+ var {{=$valid}} = false;
+ {{?}}
+ {{# def.error:'false schema' }}
+ {{??}}
+ {{? it.isTop}}
+ {{? $async }}
+ return data;
+ {{??}}
+ validate.errors = null;
+ return true;
+ {{?}}
+ {{??}}
+ var {{=$valid}} = true;
+ {{?}}
+ {{?}}
+
+ {{? it.isTop}}
+ };
+ return validate;
+ {{?}}
+
+ {{ return out; }}
+{{?}}
+
+
+{{? it.isTop }}
+ {{
+ var $top = it.isTop
+ , $lvl = it.level = 0
+ , $dataLvl = it.dataLevel = 0
+ , $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+
+ it.dataPathArr = [""];
+
+ if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored in the schema root';
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ }}
+
+ var vErrors = null; {{ /* don't edit, used in replace */ }}
+ var errors = 0; {{ /* don't edit, used in replace */ }}
+ if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }}
+{{??}}
+ {{
+ var $lvl = it.level
+ , $dataLvl = it.dataLevel
+ , $data = 'data' + ($dataLvl || '');
+
+ if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ }}
+
+ var errs_{{=$lvl}} = errors;
+{{?}}
+
+{{
+ var $valid = 'valid' + $lvl
+ , $breakOnError = !it.opts.allErrors
+ , $closingBraces1 = ''
+ , $closingBraces2 = '';
+
+ var $errorKeyword;
+ var $typeSchema = it.schema.type
+ , $typeIsArray = Array.isArray($typeSchema);
+
+ if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
+ if ($typeIsArray) {
+ if ($typeSchema.indexOf('null') == -1)
+ $typeSchema = $typeSchema.concat('null');
+ } else if ($typeSchema != 'null') {
+ $typeSchema = [$typeSchema, 'null'];
+ $typeIsArray = true;
+ }
+ }
+
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+}}
+
+{{## def.checkType:
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type'
+ , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ }}
+
+ if ({{= it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) }}) {
+#}}
+
+{{? it.schema.$ref && $refKeywords }}
+ {{? it.opts.extendRefs == 'fail' }}
+ {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }}
+ {{?? it.opts.extendRefs !== true }}
+ {{
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }}
+ {{?}}
+{{?}}
+
+{{? it.schema.$comment && it.opts.$comment }}
+ {{= it.RULES.all.$comment.code(it, '$comment') }}
+{{?}}
+
+{{? $typeSchema }}
+ {{? it.opts.coerceTypes }}
+ {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
+ {{?}}
+
+ {{ var $rulesGroup = it.RULES.types[$typeSchema]; }}
+ {{? $coerceToTypes || $typeIsArray || $rulesGroup === true ||
+ ($rulesGroup && !$shouldUseGroup($rulesGroup)) }}
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type';
+ }}
+ {{# def.checkType }}
+ {{? $coerceToTypes }}
+ {{# def.coerceType }}
+ {{??}}
+ {{# def.error:'type' }}
+ {{?}}
+ }
+ {{?}}
+{{?}}
+
+
+{{? it.schema.$ref && !$refKeywords }}
+ {{= it.RULES.all.$ref.code(it, '$ref') }}
+ {{? $breakOnError }}
+ }
+ if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+ {{ $closingBraces2 += '}'; }}
+ {{?}}
+{{??}}
+ {{~ it.RULES:$rulesGroup }}
+ {{? $shouldUseGroup($rulesGroup) }}
+ {{? $rulesGroup.type }}
+ if ({{= it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) }}) {
+ {{?}}
+ {{? it.opts.useDefaults }}
+ {{? $rulesGroup.type == 'object' && it.schema.properties }}
+ {{# def.defaultProperties }}
+ {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }}
+ {{# def.defaultItems }}
+ {{?}}
+ {{?}}
+ {{~ $rulesGroup.rules:$rule }}
+ {{? $shouldUseRule($rule) }}
+ {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }}
+ {{? $code }}
+ {{= $code }}
+ {{? $breakOnError }}
+ {{ $closingBraces1 += '}'; }}
+ {{?}}
+ {{?}}
+ {{?}}
+ {{~}}
+ {{? $breakOnError }}
+ {{= $closingBraces1 }}
+ {{ $closingBraces1 = ''; }}
+ {{?}}
+ {{? $rulesGroup.type }}
+ }
+ {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }}
+ else {
+ {{
+ var $schemaPath = it.schemaPath + '.type'
+ , $errSchemaPath = it.errSchemaPath + '/type';
+ }}
+ {{# def.error:'type' }}
+ }
+ {{?}}
+ {{?}}
+
+ {{? $breakOnError }}
+ if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) {
+ {{ $closingBraces2 += '}'; }}
+ {{?}}
+ {{?}}
+ {{~}}
+{{?}}
+
+{{? $breakOnError }} {{= $closingBraces2 }} {{?}}
+
+{{? $top }}
+ {{? $async }}
+ if (errors === 0) return data; {{ /* don't edit, used in replace */ }}
+ else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }}
+ {{??}}
+ validate.errors = vErrors; {{ /* don't edit, used in replace */ }}
+ return errors === 0; {{ /* don't edit, used in replace */ }}
+ {{?}}
+ };
+
+ return validate;
+{{??}}
+ var {{=$valid}} = errors === errs_{{=$lvl}};
+{{?}}
+
+{{
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i=0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i]))
+ return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined ||
+ ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i=0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined)
+ return true;
+ }
+}}
diff --git a/node_modules/ajv/lib/dotjs/README.md b/node_modules/ajv/lib/dotjs/README.md
new file mode 100644
index 0000000..4d99484
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/README.md
@@ -0,0 +1,3 @@
+These files are compiled dot templates from dot folder.
+
+Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder.
diff --git a/node_modules/ajv/lib/dotjs/_limit.js b/node_modules/ajv/lib/dotjs/_limit.js
new file mode 100644
index 0000000..05a1979
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/_limit.js
@@ -0,0 +1,163 @@
+'use strict';
+module.exports = function generate__limit(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $isMax = $keyword == 'maximum',
+ $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
+ $schemaExcl = it.schema[$exclusiveKeyword],
+ $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
+ $op = $isMax ? '<' : '>',
+ $notOp = $isMax ? '>' : '<',
+ $errorKeyword = undefined;
+ if (!($isData || typeof $schema == 'number' || $schema === undefined)) {
+ throw new Error($keyword + ' must be number');
+ }
+ if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) {
+ throw new Error($exclusiveKeyword + ' must be number or boolean');
+ }
+ if ($isDataExcl) {
+ var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
+ $exclusive = 'exclusive' + $lvl,
+ $exclType = 'exclType' + $lvl,
+ $exclIsNumber = 'exclIsNumber' + $lvl,
+ $opExpr = 'op' + $lvl,
+ $opStr = '\' + ' + $opExpr + ' + \'';
+ out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
+ $schemaValueExcl = 'schemaExcl' + $lvl;
+ out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
+ var $errorKeyword = $exclusiveKeyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; ';
+ if ($schema === undefined) {
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaValueExcl;
+ $isData = $isDataExcl;
+ }
+ } else {
+ var $exclIsNumber = typeof $schemaExcl == 'number',
+ $opStr = $op;
+ if ($exclIsNumber && $isData) {
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
+ } else {
+ if ($exclIsNumber && $schema === undefined) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $schemaValue = $schemaExcl;
+ $notOp += '=';
+ } else {
+ if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
+ if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
+ $exclusive = true;
+ $errorKeyword = $exclusiveKeyword;
+ $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
+ $notOp += '=';
+ } else {
+ $exclusive = false;
+ $opStr += '=';
+ }
+ }
+ var $opExpr = '\'' + $opStr + '\'';
+ out += ' if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
+ }
+ }
+ $errorKeyword = $errorKeyword || $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ' + ($opStr) + ' ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/_limitItems.js b/node_modules/ajv/lib/dotjs/_limitItems.js
new file mode 100644
index 0000000..e092a55
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/_limitItems.js
@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate__limitItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ var $op = $keyword == 'maxItems' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxItems') {
+ out += 'more';
+ } else {
+ out += 'fewer';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/_limitLength.js b/node_modules/ajv/lib/dotjs/_limitLength.js
new file mode 100644
index 0000000..ecbd3fe
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/_limitLength.js
@@ -0,0 +1,85 @@
+'use strict';
+module.exports = function generate__limitLength(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ var $op = $keyword == 'maxLength' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ if (it.opts.unicode === false) {
+ out += ' ' + ($data) + '.length ';
+ } else {
+ out += ' ucs2length(' + ($data) + ') ';
+ }
+ out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be ';
+ if ($keyword == 'maxLength') {
+ out += 'longer';
+ } else {
+ out += 'shorter';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' characters\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/_limitProperties.js b/node_modules/ajv/lib/dotjs/_limitProperties.js
new file mode 100644
index 0000000..d232755
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/_limitProperties.js
@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ var $op = $keyword == 'maxProperties' ? '>' : '<';
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
+ }
+ out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
+ var $errorKeyword = $keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have ';
+ if ($keyword == 'maxProperties') {
+ out += 'more';
+ } else {
+ out += 'fewer';
+ }
+ out += ' than ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' properties\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/allOf.js b/node_modules/ajv/lib/dotjs/allOf.js
new file mode 100644
index 0000000..fb8c2e4
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/allOf.js
@@ -0,0 +1,42 @@
+'use strict';
+module.exports = function generate_allOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $currentBaseId = $it.baseId,
+ $allSchemasEmpty = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ $allSchemasEmpty = false;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ if ($allSchemasEmpty) {
+ out += ' if (true) { ';
+ } else {
+ out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/anyOf.js b/node_modules/ajv/lib/dotjs/anyOf.js
new file mode 100644
index 0000000..0600a9d
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/anyOf.js
@@ -0,0 +1,73 @@
+'use strict';
+module.exports = function generate_anyOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $noEmptySchema = $schema.every(function($sch) {
+ return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all));
+ });
+ if ($noEmptySchema) {
+ var $currentBaseId = $it.baseId;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match some schema in anyOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/comment.js b/node_modules/ajv/lib/dotjs/comment.js
new file mode 100644
index 0000000..dd66bb8
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/comment.js
@@ -0,0 +1,14 @@
+'use strict';
+module.exports = function generate_comment(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $comment = it.util.toQuotedString($schema);
+ if (it.opts.$comment === true) {
+ out += ' console.log(' + ($comment) + ');';
+ } else if (typeof it.opts.$comment == 'function') {
+ out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/const.js b/node_modules/ajv/lib/dotjs/const.js
new file mode 100644
index 0000000..15b7c61
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/const.js
@@ -0,0 +1,56 @@
+'use strict';
+module.exports = function generate_const(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!$isData) {
+ out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to constant\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/contains.js b/node_modules/ajv/lib/dotjs/contains.js
new file mode 100644
index 0000000..7d76300
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/contains.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate_contains(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId,
+ $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all));
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($nonEmptySchema) {
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (' + ($nextValid) + ') break; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
+ } else {
+ out += ' if (' + ($data) + '.length == 0) {';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should contain a valid item\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ if ($nonEmptySchema) {
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ }
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/custom.js b/node_modules/ajv/lib/dotjs/custom.js
new file mode 100644
index 0000000..f3e641e
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/custom.js
@@ -0,0 +1,228 @@
+'use strict';
+module.exports = function generate_custom(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $rule = this,
+ $definition = 'definition' + $lvl,
+ $rDef = $rule.definition,
+ $closingBraces = '';
+ var $compile, $inline, $macro, $ruleValidate, $validateCode;
+ if ($isData && $rDef.$data) {
+ $validateCode = 'keywordValidate' + $lvl;
+ var $validateSchema = $rDef.validateSchema;
+ out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
+ } else {
+ $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
+ if (!$ruleValidate) return;
+ $schemaValue = 'validate.schema' + $schemaPath;
+ $validateCode = $ruleValidate.code;
+ $compile = $rDef.compile;
+ $inline = $rDef.inline;
+ $macro = $rDef.macro;
+ }
+ var $ruleErrs = $validateCode + '.errors',
+ $i = 'i' + $lvl,
+ $ruleErr = 'ruleErr' + $lvl,
+ $asyncKeyword = $rDef.async;
+ if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
+ if (!($inline || $macro)) {
+ out += '' + ($ruleErrs) + ' = null;';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if ($isData && $rDef.$data) {
+ $closingBraces += '}';
+ out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
+ if ($validateSchema) {
+ $closingBraces += '}';
+ out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';
+ }
+ }
+ if ($inline) {
+ if ($rDef.statements) {
+ out += ' ' + ($ruleValidate.validate) + ' ';
+ } else {
+ out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';
+ }
+ } else if ($macro) {
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $ruleValidate.validate;
+ $it.schemaPath = '';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' ' + ($code);
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ out += ' ' + ($validateCode) + '.call( ';
+ if (it.opts.passContext) {
+ out += 'this';
+ } else {
+ out += 'self';
+ }
+ if ($compile || $rDef.schema === false) {
+ out += ' , ' + ($data) + ' ';
+ } else {
+ out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
+ }
+ out += ' , (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';
+ var def_callRuleValidate = out;
+ out = $$outStack.pop();
+ if ($rDef.errors === false) {
+ out += ' ' + ($valid) + ' = ';
+ if ($asyncKeyword) {
+ out += 'await ';
+ }
+ out += '' + (def_callRuleValidate) + '; ';
+ } else {
+ if ($asyncKeyword) {
+ $ruleErrs = 'customErrors' + $lvl;
+ out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
+ } else {
+ out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';
+ }
+ }
+ }
+ if ($rDef.modifying) {
+ out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
+ }
+ out += '' + ($closingBraces);
+ if ($rDef.valid) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ out += ' if ( ';
+ if ($rDef.valid === undefined) {
+ out += ' !';
+ if ($macro) {
+ out += '' + ($nextValid);
+ } else {
+ out += '' + ($valid);
+ }
+ } else {
+ out += ' ' + (!$rDef.valid) + ' ';
+ }
+ out += ') { ';
+ $errorKeyword = $rule.keyword;
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ var def_customError = out;
+ out = $$outStack.pop();
+ if ($inline) {
+ if ($rDef.errors) {
+ if ($rDef.errors != 'full') {
+ out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } ';
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } ';
+ }
+ }
+ } else if ($macro) {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ } else {
+ if ($rDef.errors === false) {
+ out += ' ' + (def_customError) + ' ';
+ } else {
+ out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
+ if (it.opts.verbose) {
+ out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
+ }
+ out += ' } } else { ' + (def_customError) + ' } ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/dependencies.js b/node_modules/ajv/lib/dotjs/dependencies.js
new file mode 100644
index 0000000..e482949
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/dependencies.js
@@ -0,0 +1,168 @@
+'use strict';
+module.exports = function generate_dependencies(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $schemaDeps = {},
+ $propertyDeps = {},
+ $ownProperties = it.opts.ownProperties;
+ for ($property in $schema) {
+ if ($property == '__proto__') continue;
+ var $sch = $schema[$property];
+ var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
+ $deps[$property] = $sch;
+ }
+ out += 'var ' + ($errs) + ' = errors;';
+ var $currentErrorPath = it.errorPath;
+ out += 'var missing' + ($lvl) + ';';
+ for (var $property in $propertyDeps) {
+ $deps = $propertyDeps[$property];
+ if ($deps.length) {
+ out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ if ($breakOnError) {
+ out += ' && ( ';
+ var arr1 = $deps;
+ if (arr1) {
+ var $propertyKey, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $propertyKey = arr1[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ')) { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ out += ' ) { ';
+ var arr2 = $deps;
+ if (arr2) {
+ var $propertyKey, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $propertyKey = arr2[i2 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should have ';
+ if ($deps.length == 1) {
+ out += 'property ' + (it.util.escapeQuotes($deps[0]));
+ } else {
+ out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
+ }
+ out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ var $currentBaseId = $it.baseId;
+ for (var $property in $schemaDeps) {
+ var $sch = $schemaDeps[$property];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
+ }
+ out += ') { ';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + it.util.getProperty($property);
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/enum.js b/node_modules/ajv/lib/dotjs/enum.js
new file mode 100644
index 0000000..90580b9
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/enum.js
@@ -0,0 +1,66 @@
+'use strict';
+module.exports = function generate_enum(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $i = 'i' + $lvl,
+ $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
+ }
+ out += 'var ' + ($valid) + ';';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be equal to one of the allowed values\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' }';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/format.js b/node_modules/ajv/lib/dotjs/format.js
new file mode 100644
index 0000000..cd9a569
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/format.js
@@ -0,0 +1,150 @@
+'use strict';
+module.exports = function generate_format(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ if (it.opts.format === false) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $unknownFormats = it.opts.unknownFormats,
+ $allowUnknown = Array.isArray($unknownFormats);
+ if ($isData) {
+ var $format = 'format' + $lvl,
+ $isObject = 'isObject' + $lvl,
+ $formatType = 'formatType' + $lvl;
+ out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
+ if (it.async) {
+ out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
+ }
+ out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' (';
+ if ($unknownFormats != 'ignore') {
+ out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
+ if ($allowUnknown) {
+ out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
+ }
+ out += ') || ';
+ }
+ out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
+ if (it.async) {
+ out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
+ } else {
+ out += ' ' + ($format) + '(' + ($data) + ') ';
+ }
+ out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
+ } else {
+ var $format = it.formats[$schema];
+ if (!$format) {
+ if ($unknownFormats == 'ignore') {
+ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ } else {
+ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
+ var $formatType = $isObject && $format.type || 'string';
+ if ($isObject) {
+ var $async = $format.async === true;
+ $format = $format.validate;
+ }
+ if ($formatType != $ruleType) {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ return out;
+ }
+ if ($async) {
+ if (!it.async) throw new Error('async format in sync schema');
+ var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
+ out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { ';
+ } else {
+ out += ' if (! ';
+ var $formatRef = 'formats' + it.util.getProperty($schema);
+ if ($isObject) $formatRef += '.validate';
+ if (typeof $format == 'function') {
+ out += ' ' + ($formatRef) + '(' + ($data) + ') ';
+ } else {
+ out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
+ }
+ out += ') { ';
+ }
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match format "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/if.js b/node_modules/ajv/lib/dotjs/if.js
new file mode 100644
index 0000000..94d27ad
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/if.js
@@ -0,0 +1,103 @@
+'use strict';
+module.exports = function generate_if(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $thenSch = it.schema['then'],
+ $elseSch = it.schema['else'],
+ $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)),
+ $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)),
+ $currentBaseId = $it.baseId;
+ if ($thenPresent || $elsePresent) {
+ var $ifClause;
+ $it.createErrors = false;
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ $it.createErrors = true;
+ out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ if ($thenPresent) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $it.schema = it.schema['then'];
+ $it.schemaPath = it.schemaPath + '.then';
+ $it.errSchemaPath = it.errSchemaPath + '/then';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'then\'; ';
+ } else {
+ $ifClause = '\'then\'';
+ }
+ out += ' } ';
+ if ($elsePresent) {
+ out += ' else { ';
+ }
+ } else {
+ out += ' if (!' + ($nextValid) + ') { ';
+ }
+ if ($elsePresent) {
+ $it.schema = it.schema['else'];
+ $it.schemaPath = it.schemaPath + '.else';
+ $it.errSchemaPath = it.errSchemaPath + '/else';
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';
+ if ($thenPresent && $elsePresent) {
+ $ifClause = 'ifClause' + $lvl;
+ out += ' var ' + ($ifClause) + ' = \'else\'; ';
+ } else {
+ $ifClause = '\'else\'';
+ }
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/index.js b/node_modules/ajv/lib/dotjs/index.js
new file mode 100644
index 0000000..2fb1b00
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/index.js
@@ -0,0 +1,33 @@
+'use strict';
+
+//all requires must be explicit because browserify won't work with dynamic requires
+module.exports = {
+ '$ref': require('./ref'),
+ allOf: require('./allOf'),
+ anyOf: require('./anyOf'),
+ '$comment': require('./comment'),
+ const: require('./const'),
+ contains: require('./contains'),
+ dependencies: require('./dependencies'),
+ 'enum': require('./enum'),
+ format: require('./format'),
+ 'if': require('./if'),
+ items: require('./items'),
+ maximum: require('./_limit'),
+ minimum: require('./_limit'),
+ maxItems: require('./_limitItems'),
+ minItems: require('./_limitItems'),
+ maxLength: require('./_limitLength'),
+ minLength: require('./_limitLength'),
+ maxProperties: require('./_limitProperties'),
+ minProperties: require('./_limitProperties'),
+ multipleOf: require('./multipleOf'),
+ not: require('./not'),
+ oneOf: require('./oneOf'),
+ pattern: require('./pattern'),
+ properties: require('./properties'),
+ propertyNames: require('./propertyNames'),
+ required: require('./required'),
+ uniqueItems: require('./uniqueItems'),
+ validate: require('./validate')
+};
diff --git a/node_modules/ajv/lib/dotjs/items.js b/node_modules/ajv/lib/dotjs/items.js
new file mode 100644
index 0000000..bee5d67
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/items.js
@@ -0,0 +1,140 @@
+'use strict';
+module.exports = function generate_items(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $idx = 'i' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $currentBaseId = it.baseId;
+ out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
+ if (Array.isArray($schema)) {
+ var $additionalItems = it.schema.additionalItems;
+ if ($additionalItems === false) {
+ out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ $closingBraces += '}';
+ out += ' else { ';
+ }
+ }
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
+ var $passData = $data + '[' + $i + ']';
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
+ $it.dataPathArr[$dataNxt] = $i;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) {
+ $it.schema = $additionalItems;
+ $it.schemaPath = it.schemaPath + '.additionalItems';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
+ out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
+ var $passData = $data + '[' + $idx + ']';
+ $it.dataPathArr[$dataNxt] = $idx;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/multipleOf.js b/node_modules/ajv/lib/dotjs/multipleOf.js
new file mode 100644
index 0000000..9d6401b
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/multipleOf.js
@@ -0,0 +1,80 @@
+'use strict';
+module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (!($isData || typeof $schema == 'number')) {
+ throw new Error($keyword + ' must be number');
+ }
+ out += 'var division' + ($lvl) + ';if (';
+ if ($isData) {
+ out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
+ }
+ out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
+ if (it.opts.multipleOfPrecision) {
+ out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
+ } else {
+ out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
+ }
+ out += ' ) ';
+ if ($isData) {
+ out += ' ) ';
+ }
+ out += ' ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be multiple of ';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue);
+ } else {
+ out += '' + ($schemaValue) + '\'';
+ }
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/not.js b/node_modules/ajv/lib/dotjs/not.js
new file mode 100644
index 0000000..f50c937
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/not.js
@@ -0,0 +1,84 @@
+'use strict';
+module.exports = function generate_not(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.createErrors = false;
+ var $allErrorsOption;
+ if ($it.opts.allErrors) {
+ $allErrorsOption = $it.opts.allErrors;
+ $it.opts.allErrors = false;
+ }
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.createErrors = true;
+ if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (' + ($nextValid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ } else {
+ out += ' var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT be valid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/oneOf.js b/node_modules/ajv/lib/dotjs/oneOf.js
new file mode 100644
index 0000000..dfe2fd5
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/oneOf.js
@@ -0,0 +1,73 @@
+'use strict';
+module.exports = function generate_oneOf(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $currentBaseId = $it.baseId,
+ $prevValid = 'prevValid' + $lvl,
+ $passingSchemas = 'passingSchemas' + $lvl;
+ out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var arr1 = $schema;
+ if (arr1) {
+ var $sch, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $sch = arr1[$i += 1];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + '[' + $i + ']';
+ $it.errSchemaPath = $errSchemaPath + '/' + $i;
+ out += ' ' + (it.validate($it)) + ' ';
+ $it.baseId = $currentBaseId;
+ } else {
+ out += ' var ' + ($nextValid) + ' = true; ';
+ }
+ if ($i) {
+ out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { ';
+ $closingBraces += '}';
+ }
+ out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }';
+ }
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match exactly one schema in oneOf\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
+ if (it.opts.allErrors) {
+ out += ' } ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/pattern.js b/node_modules/ajv/lib/dotjs/pattern.js
new file mode 100644
index 0000000..1d74d6b
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/pattern.js
@@ -0,0 +1,75 @@
+'use strict';
+module.exports = function generate_pattern(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
+ out += 'if ( ';
+ if ($isData) {
+ out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
+ }
+ out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
+ if ($isData) {
+ out += '' + ($schemaValue);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should match pattern "';
+ if ($isData) {
+ out += '\' + ' + ($schemaValue) + ' + \'';
+ } else {
+ out += '' + (it.util.escapeQuotes($schema));
+ }
+ out += '"\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + (it.util.toQuotedString($schema));
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += '} ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/properties.js b/node_modules/ajv/lib/dotjs/properties.js
new file mode 100644
index 0000000..bc5ee55
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/properties.js
@@ -0,0 +1,335 @@
+'use strict';
+module.exports = function generate_properties(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl;
+ var $schemaKeys = Object.keys($schema || {}).filter(notProto),
+ $pProperties = it.schema.patternProperties || {},
+ $pPropertyKeys = Object.keys($pProperties).filter(notProto),
+ $aProperties = it.schema.additionalProperties,
+ $someProperties = $schemaKeys.length || $pPropertyKeys.length,
+ $noAdditional = $aProperties === false,
+ $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
+ $removeAdditional = it.opts.removeAdditional,
+ $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ var $required = it.schema.required;
+ if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {
+ var $requiredHash = it.util.toHash($required);
+ }
+
+ function notProto(p) {
+ return p !== '__proto__';
+ }
+ out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined;';
+ }
+ if ($checkAdditional) {
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ if ($someProperties) {
+ out += ' var isAdditional' + ($lvl) + ' = !(false ';
+ if ($schemaKeys.length) {
+ if ($schemaKeys.length > 8) {
+ out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') ';
+ } else {
+ var arr1 = $schemaKeys;
+ if (arr1) {
+ var $propertyKey, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $propertyKey = arr1[i1 += 1];
+ out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr2 = $pPropertyKeys;
+ if (arr2) {
+ var $pProperty, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $pProperty = arr2[$i += 1];
+ out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
+ }
+ }
+ }
+ out += ' ); if (isAdditional' + ($lvl) + ') { ';
+ }
+ if ($removeAdditional == 'all') {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ var $currentErrorPath = it.errorPath;
+ var $additionalProperty = '\' + ' + $key + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ }
+ if ($noAdditional) {
+ if ($removeAdditional) {
+ out += ' delete ' + ($data) + '[' + ($key) + ']; ';
+ } else {
+ out += ' ' + ($nextValid) + ' = false; ';
+ var $currErrSchemaPath = $errSchemaPath;
+ $errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is an invalid additional property';
+ } else {
+ out += 'should NOT have additional properties';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ }
+ } else if ($additionalIsSchema) {
+ if ($removeAdditional == 'failing') {
+ out += ' var ' + ($errs) + ' = errors; ';
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ } else {
+ $it.schema = $aProperties;
+ $it.schemaPath = it.schemaPath + '.additionalProperties';
+ $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
+ $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ }
+ if ($someProperties) {
+ out += ' } ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ var $useDefaults = it.opts.useDefaults && !it.compositeRule;
+ if ($schemaKeys.length) {
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ var $prop = it.util.getProperty($propertyKey),
+ $passData = $data + $prop,
+ $hasDefault = $useDefaults && $sch.default !== undefined;
+ $it.schema = $sch;
+ $it.schemaPath = $schemaPath + $prop;
+ $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
+ $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
+ $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ $code = it.util.varReplace($code, $nextData, $passData);
+ var $useData = $passData;
+ } else {
+ var $useData = $nextData;
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
+ }
+ if ($hasDefault) {
+ out += ' ' + ($code) + ' ';
+ } else {
+ if ($requiredHash && $requiredHash[$propertyKey]) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = false; ';
+ var $currentErrorPath = it.errorPath,
+ $currErrSchemaPath = $errSchemaPath,
+ $missingProperty = it.util.escapeQuotes($propertyKey);
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ $errSchemaPath = it.errSchemaPath + '/required';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ $errSchemaPath = $currErrSchemaPath;
+ it.errorPath = $currentErrorPath;
+ out += ' } else { ';
+ } else {
+ if ($breakOnError) {
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { ' + ($nextValid) + ' = true; } else { ';
+ } else {
+ out += ' if (' + ($useData) + ' !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ' ) { ';
+ }
+ }
+ out += ' ' + ($code) + ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ if ($pPropertyKeys.length) {
+ var arr4 = $pPropertyKeys;
+ if (arr4) {
+ var $pProperty, i4 = -1,
+ l4 = arr4.length - 1;
+ while (i4 < l4) {
+ $pProperty = arr4[i4 += 1];
+ var $sch = $pProperties[$pProperty];
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
+ $it.schema = $sch;
+ $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
+ $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
+ $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
+ var $passData = $data + '[' + $key + ']';
+ $it.dataPathArr[$dataNxt] = $key;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ if ($breakOnError) {
+ out += ' if (!' + ($nextValid) + ') break; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else ' + ($nextValid) + ' = true; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ $closingBraces += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/propertyNames.js b/node_modules/ajv/lib/dotjs/propertyNames.js
new file mode 100644
index 0000000..2a54a08
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/propertyNames.js
@@ -0,0 +1,81 @@
+'use strict';
+module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $errs = 'errs__' + $lvl;
+ var $it = it.util.copy(it);
+ var $closingBraces = '';
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ out += 'var ' + ($errs) + ' = errors;';
+ if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
+ $it.schema = $schema;
+ $it.schemaPath = $schemaPath;
+ $it.errSchemaPath = $errSchemaPath;
+ var $key = 'key' + $lvl,
+ $idx = 'idx' + $lvl,
+ $i = 'i' + $lvl,
+ $invalidName = '\' + ' + $key + ' + \'',
+ $dataNxt = $it.dataLevel = it.dataLevel + 1,
+ $nextData = 'data' + $dataNxt,
+ $dataProperties = 'dataProperties' + $lvl,
+ $ownProperties = it.opts.ownProperties,
+ $currentBaseId = it.baseId;
+ if ($ownProperties) {
+ out += ' var ' + ($dataProperties) + ' = undefined; ';
+ }
+ if ($ownProperties) {
+ out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
+ } else {
+ out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
+ }
+ out += ' var startErrs' + ($lvl) + ' = errors; ';
+ var $passData = $key;
+ var $wasComposite = it.compositeRule;
+ it.compositeRule = $it.compositeRule = true;
+ var $code = it.validate($it);
+ $it.baseId = $currentBaseId;
+ if (it.util.varOccurences($code, $nextData) < 2) {
+ out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
+ } else {
+ out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
+ }
+ it.compositeRule = $it.compositeRule = $wasComposite;
+ out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; return false; ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' break; ';
+ }
+ out += ' } }';
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/ref.js b/node_modules/ajv/lib/dotjs/ref.js
new file mode 100644
index 0000000..8042a47
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/ref.js
@@ -0,0 +1,124 @@
+'use strict';
+module.exports = function generate_ref(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $async, $refCode;
+ if ($schema == '#' || $schema == '#/') {
+ if (it.isRoot) {
+ $async = it.async;
+ $refCode = 'validate';
+ } else {
+ $async = it.root.schema.$async === true;
+ $refCode = 'root.refVal[0]';
+ }
+ } else {
+ var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
+ if ($refVal === undefined) {
+ var $message = it.MissingRefError.message(it.baseId, $schema);
+ if (it.opts.missingRefs == 'fail') {
+ it.logger.error($message);
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ if ($breakOnError) {
+ out += ' if (false) { ';
+ }
+ } else if (it.opts.missingRefs == 'ignore') {
+ it.logger.warn($message);
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ } else {
+ throw new it.MissingRefError(it.baseId, $schema, $message);
+ }
+ } else if ($refVal.inline) {
+ var $it = it.util.copy(it);
+ $it.level++;
+ var $nextValid = 'valid' + $it.level;
+ $it.schema = $refVal.schema;
+ $it.schemaPath = '';
+ $it.errSchemaPath = $schema;
+ var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ out += ' if (' + ($nextValid) + ') { ';
+ }
+ } else {
+ $async = $refVal.$async === true || (it.async && $refVal.$async !== false);
+ $refCode = $refVal.code;
+ }
+ }
+ if ($refCode) {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = '';
+ if (it.opts.passContext) {
+ out += ' ' + ($refCode) + '.call(this, ';
+ } else {
+ out += ' ' + ($refCode) + '( ';
+ }
+ out += ' ' + ($data) + ', (dataPath || \'\')';
+ if (it.errorPath != '""') {
+ out += ' + ' + (it.errorPath);
+ }
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
+ var __callValidate = out;
+ out = $$outStack.pop();
+ if ($async) {
+ if (!it.async) throw new Error('async schema referenced by sync schema');
+ if ($breakOnError) {
+ out += ' var ' + ($valid) + '; ';
+ }
+ out += ' try { await ' + (__callValidate) + '; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = true; ';
+ }
+ out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ';
+ if ($breakOnError) {
+ out += ' ' + ($valid) + ' = false; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' if (' + ($valid) + ') { ';
+ }
+ } else {
+ out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ }
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/required.js b/node_modules/ajv/lib/dotjs/required.js
new file mode 100644
index 0000000..14873ee
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/required.js
@@ -0,0 +1,270 @@
+'use strict';
+module.exports = function generate_required(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ var $vSchema = 'schema' + $lvl;
+ if (!$isData) {
+ if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
+ var $required = [];
+ var arr1 = $schema;
+ if (arr1) {
+ var $property, i1 = -1,
+ l1 = arr1.length - 1;
+ while (i1 < l1) {
+ $property = arr1[i1 += 1];
+ var $propertySch = it.schema.properties[$property];
+ if (!($propertySch && (it.opts.strictKeywords ? (typeof $propertySch == 'object' && Object.keys($propertySch).length > 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) {
+ $required[$required.length] = $property;
+ }
+ }
+ }
+ } else {
+ var $required = $schema;
+ }
+ }
+ if ($isData || $required.length) {
+ var $currentErrorPath = it.errorPath,
+ $loopRequired = $isData || $required.length >= it.opts.loopRequired,
+ $ownProperties = it.opts.ownProperties;
+ if ($breakOnError) {
+ out += ' var missing' + ($lvl) + '; ';
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ out += ' var ' + ($valid) + ' = true; ';
+ if ($isData) {
+ out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';
+ if ($ownProperties) {
+ out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += '; if (!' + ($valid) + ') break; } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ } else {
+ out += ' if ( ';
+ var arr2 = $required;
+ if (arr2) {
+ var $propertyKey, $i = -1,
+ l2 = arr2.length - 1;
+ while ($i < l2) {
+ $propertyKey = arr2[$i += 1];
+ if ($i) {
+ out += ' || ';
+ }
+ var $prop = it.util.getProperty($propertyKey),
+ $useData = $data + $prop;
+ out += ' ( ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
+ }
+ }
+ out += ') { ';
+ var $propertyPath = 'missing' + $lvl,
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } else { ';
+ }
+ } else {
+ if ($loopRequired) {
+ if (!$isData) {
+ out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
+ }
+ var $i = 'i' + $lvl,
+ $propertyPath = 'schema' + $lvl + '[' + $i + ']',
+ $missingProperty = '\' + ' + $propertyPath + ' + \'';
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
+ }
+ if ($isData) {
+ out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
+ }
+ out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ } else {
+ var arr3 = $required;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $prop = it.util.getProperty($propertyKey),
+ $missingProperty = it.util.escapeQuotes($propertyKey),
+ $useData = $data + $prop;
+ if (it.opts._errorDataPathProperty) {
+ it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
+ }
+ out += ' if ( ' + ($useData) + ' === undefined ';
+ if ($ownProperties) {
+ out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
+ }
+ out += ') { var err = '; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'';
+ if (it.opts._errorDataPathProperty) {
+ out += 'is a required property';
+ } else {
+ out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
+ }
+ }
+ }
+ }
+ it.errorPath = $currentErrorPath;
+ } else if ($breakOnError) {
+ out += ' if (true) {';
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/uniqueItems.js b/node_modules/ajv/lib/dotjs/uniqueItems.js
new file mode 100644
index 0000000..0736a0e
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/uniqueItems.js
@@ -0,0 +1,86 @@
+'use strict';
+module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
+ var out = ' ';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ var $isData = it.opts.$data && $schema && $schema.$data,
+ $schemaValue;
+ if ($isData) {
+ out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
+ $schemaValue = 'schema' + $lvl;
+ } else {
+ $schemaValue = $schema;
+ }
+ if (($schema || $isData) && it.opts.uniqueItems !== false) {
+ if ($isData) {
+ out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
+ }
+ out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';
+ var $itemType = it.schema.items && it.schema.items.type,
+ $typeIsArray = Array.isArray($itemType);
+ if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {
+ out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';
+ } else {
+ out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';
+ var $method = 'checkDataType' + ($typeIsArray ? 's' : '');
+ out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; ';
+ if ($typeIsArray) {
+ out += ' if (typeof item == \'string\') item = \'"\' + item; ';
+ }
+ out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';
+ }
+ out += ' } ';
+ if ($isData) {
+ out += ' } ';
+ }
+ out += ' if (!' + ($valid) + ') { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: ';
+ if ($isData) {
+ out += 'validate.schema' + ($schemaPath);
+ } else {
+ out += '' + ($schema);
+ }
+ out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ if ($breakOnError) {
+ out += ' else { ';
+ }
+ } else {
+ if ($breakOnError) {
+ out += ' if (true) { ';
+ }
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/dotjs/validate.js b/node_modules/ajv/lib/dotjs/validate.js
new file mode 100644
index 0000000..f295824
--- /dev/null
+++ b/node_modules/ajv/lib/dotjs/validate.js
@@ -0,0 +1,482 @@
+'use strict';
+module.exports = function generate_validate(it, $keyword, $ruleType) {
+ var out = '';
+ var $async = it.schema.$async === true,
+ $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
+ $id = it.self._getId(it.schema);
+ if (it.opts.strictKeywords) {
+ var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
+ if ($unknownKwd) {
+ var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
+ if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
+ else throw new Error($keywordsMsg);
+ }
+ }
+ if (it.isTop) {
+ out += ' var validate = ';
+ if ($async) {
+ it.async = true;
+ out += 'async ';
+ }
+ out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
+ if ($id && (it.opts.sourceCode || it.opts.processCode)) {
+ out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
+ }
+ }
+ if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
+ var $keyword = 'false schema';
+ var $lvl = it.level;
+ var $dataLvl = it.dataLevel;
+ var $schema = it.schema[$keyword];
+ var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
+ var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
+ var $breakOnError = !it.opts.allErrors;
+ var $errorKeyword;
+ var $data = 'data' + ($dataLvl || '');
+ var $valid = 'valid' + $lvl;
+ if (it.schema === false) {
+ if (it.isTop) {
+ $breakOnError = true;
+ } else {
+ out += ' var ' + ($valid) + ' = false; ';
+ }
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'boolean schema is false\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ } else {
+ if (it.isTop) {
+ if ($async) {
+ out += ' return data; ';
+ } else {
+ out += ' validate.errors = null; return true; ';
+ }
+ } else {
+ out += ' var ' + ($valid) + ' = true; ';
+ }
+ }
+ if (it.isTop) {
+ out += ' }; return validate; ';
+ }
+ return out;
+ }
+ if (it.isTop) {
+ var $top = it.isTop,
+ $lvl = it.level = 0,
+ $dataLvl = it.dataLevel = 0,
+ $data = 'data';
+ it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
+ it.baseId = it.baseId || it.rootId;
+ delete it.isTop;
+ it.dataPathArr = [""];
+ if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored in the schema root';
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ out += ' var vErrors = null; ';
+ out += ' var errors = 0; ';
+ out += ' if (rootData === undefined) rootData = data; ';
+ } else {
+ var $lvl = it.level,
+ $dataLvl = it.dataLevel,
+ $data = 'data' + ($dataLvl || '');
+ if ($id) it.baseId = it.resolve.url(it.baseId, $id);
+ if ($async && !it.async) throw new Error('async schema in sync schema');
+ out += ' var errs_' + ($lvl) + ' = errors;';
+ }
+ var $valid = 'valid' + $lvl,
+ $breakOnError = !it.opts.allErrors,
+ $closingBraces1 = '',
+ $closingBraces2 = '';
+ var $errorKeyword;
+ var $typeSchema = it.schema.type,
+ $typeIsArray = Array.isArray($typeSchema);
+ if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
+ if ($typeIsArray) {
+ if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null');
+ } else if ($typeSchema != 'null') {
+ $typeSchema = [$typeSchema, 'null'];
+ $typeIsArray = true;
+ }
+ }
+ if ($typeIsArray && $typeSchema.length == 1) {
+ $typeSchema = $typeSchema[0];
+ $typeIsArray = false;
+ }
+ if (it.schema.$ref && $refKeywords) {
+ if (it.opts.extendRefs == 'fail') {
+ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
+ } else if (it.opts.extendRefs !== true) {
+ $refKeywords = false;
+ it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
+ }
+ }
+ if (it.schema.$comment && it.opts.$comment) {
+ out += ' ' + (it.RULES.all.$comment.code(it, '$comment'));
+ }
+ if ($typeSchema) {
+ if (it.opts.coerceTypes) {
+ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
+ }
+ var $rulesGroup = it.RULES.types[$typeSchema];
+ if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type',
+ $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
+ out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { ';
+ if ($coerceToTypes) {
+ var $dataType = 'dataType' + $lvl,
+ $coerced = 'coerced' + $lvl;
+ out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; ';
+ if (it.opts.coerceTypes == 'array') {
+ out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } ';
+ }
+ out += ' if (' + ($coerced) + ' !== undefined) ; ';
+ var arr1 = $coerceToTypes;
+ if (arr1) {
+ var $type, $i = -1,
+ l1 = arr1.length - 1;
+ while ($i < l1) {
+ $type = arr1[$i += 1];
+ if ($type == 'string') {
+ out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
+ } else if ($type == 'number' || $type == 'integer') {
+ out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
+ if ($type == 'integer') {
+ out += ' && !(' + ($data) + ' % 1)';
+ }
+ out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
+ } else if ($type == 'boolean') {
+ out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
+ } else if ($type == 'null') {
+ out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
+ } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
+ out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
+ }
+ }
+ }
+ out += ' else { ';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } if (' + ($coerced) + ' !== undefined) { ';
+ var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
+ $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
+ out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
+ if (!$dataLvl) {
+ out += 'if (' + ($parentData) + ' !== undefined)';
+ }
+ out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';
+ } else {
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ }
+ out += ' } ';
+ }
+ }
+ if (it.schema.$ref && !$refKeywords) {
+ out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
+ if ($breakOnError) {
+ out += ' } if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ } else {
+ var arr2 = it.RULES;
+ if (arr2) {
+ var $rulesGroup, i2 = -1,
+ l2 = arr2.length - 1;
+ while (i2 < l2) {
+ $rulesGroup = arr2[i2 += 1];
+ if ($shouldUseGroup($rulesGroup)) {
+ if ($rulesGroup.type) {
+ out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { ';
+ }
+ if (it.opts.useDefaults) {
+ if ($rulesGroup.type == 'object' && it.schema.properties) {
+ var $schema = it.schema.properties,
+ $schemaKeys = Object.keys($schema);
+ var arr3 = $schemaKeys;
+ if (arr3) {
+ var $propertyKey, i3 = -1,
+ l3 = arr3.length - 1;
+ while (i3 < l3) {
+ $propertyKey = arr3[i3 += 1];
+ var $sch = $schema[$propertyKey];
+ if ($sch.default !== undefined) {
+ var $passData = $data + it.util.getProperty($propertyKey);
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
+ var arr4 = it.schema.items;
+ if (arr4) {
+ var $sch, $i = -1,
+ l4 = arr4.length - 1;
+ while ($i < l4) {
+ $sch = arr4[$i += 1];
+ if ($sch.default !== undefined) {
+ var $passData = $data + '[' + $i + ']';
+ if (it.compositeRule) {
+ if (it.opts.strictDefaults) {
+ var $defaultMsg = 'default is ignored for: ' + $passData;
+ if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
+ else throw new Error($defaultMsg);
+ }
+ } else {
+ out += ' if (' + ($passData) + ' === undefined ';
+ if (it.opts.useDefaults == 'empty') {
+ out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' ';
+ }
+ out += ' ) ' + ($passData) + ' = ';
+ if (it.opts.useDefaults == 'shared') {
+ out += ' ' + (it.useDefault($sch.default)) + ' ';
+ } else {
+ out += ' ' + (JSON.stringify($sch.default)) + ' ';
+ }
+ out += '; ';
+ }
+ }
+ }
+ }
+ }
+ }
+ var arr5 = $rulesGroup.rules;
+ if (arr5) {
+ var $rule, i5 = -1,
+ l5 = arr5.length - 1;
+ while (i5 < l5) {
+ $rule = arr5[i5 += 1];
+ if ($shouldUseRule($rule)) {
+ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
+ if ($code) {
+ out += ' ' + ($code) + ' ';
+ if ($breakOnError) {
+ $closingBraces1 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces1) + ' ';
+ $closingBraces1 = '';
+ }
+ if ($rulesGroup.type) {
+ out += ' } ';
+ if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
+ out += ' else { ';
+ var $schemaPath = it.schemaPath + '.type',
+ $errSchemaPath = it.errSchemaPath + '/type';
+ var $$outStack = $$outStack || [];
+ $$outStack.push(out);
+ out = ''; /* istanbul ignore else */
+ if (it.createErrors !== false) {
+ out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' } ';
+ if (it.opts.messages !== false) {
+ out += ' , message: \'should be ';
+ if ($typeIsArray) {
+ out += '' + ($typeSchema.join(","));
+ } else {
+ out += '' + ($typeSchema);
+ }
+ out += '\' ';
+ }
+ if (it.opts.verbose) {
+ out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
+ }
+ out += ' } ';
+ } else {
+ out += ' {} ';
+ }
+ var __err = out;
+ out = $$outStack.pop();
+ if (!it.compositeRule && $breakOnError) {
+ /* istanbul ignore if */
+ if (it.async) {
+ out += ' throw new ValidationError([' + (__err) + ']); ';
+ } else {
+ out += ' validate.errors = [' + (__err) + ']; return false; ';
+ }
+ } else {
+ out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
+ }
+ out += ' } ';
+ }
+ }
+ if ($breakOnError) {
+ out += ' if (errors === ';
+ if ($top) {
+ out += '0';
+ } else {
+ out += 'errs_' + ($lvl);
+ }
+ out += ') { ';
+ $closingBraces2 += '}';
+ }
+ }
+ }
+ }
+ }
+ if ($breakOnError) {
+ out += ' ' + ($closingBraces2) + ' ';
+ }
+ if ($top) {
+ if ($async) {
+ out += ' if (errors === 0) return data; ';
+ out += ' else throw new ValidationError(vErrors); ';
+ } else {
+ out += ' validate.errors = vErrors; ';
+ out += ' return errors === 0; ';
+ }
+ out += ' }; return validate;';
+ } else {
+ out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
+ }
+
+ function $shouldUseGroup($rulesGroup) {
+ var rules = $rulesGroup.rules;
+ for (var i = 0; i < rules.length; i++)
+ if ($shouldUseRule(rules[i])) return true;
+ }
+
+ function $shouldUseRule($rule) {
+ return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
+ }
+
+ function $ruleImplementsSomeKeyword($rule) {
+ var impl = $rule.implements;
+ for (var i = 0; i < impl.length; i++)
+ if (it.schema[impl[i]] !== undefined) return true;
+ }
+ return out;
+}
diff --git a/node_modules/ajv/lib/keyword.js b/node_modules/ajv/lib/keyword.js
new file mode 100644
index 0000000..06da9a2
--- /dev/null
+++ b/node_modules/ajv/lib/keyword.js
@@ -0,0 +1,146 @@
+'use strict';
+
+var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
+var customRuleCode = require('./dotjs/custom');
+var definitionSchema = require('./definition_schema');
+
+module.exports = {
+ add: addKeyword,
+ get: getKeyword,
+ remove: removeKeyword,
+ validate: validateKeyword
+};
+
+
+/**
+ * Define custom keyword
+ * @this Ajv
+ * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
+ * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ * @return {Ajv} this for method chaining
+ */
+function addKeyword(keyword, definition) {
+ /* jshint validthis: true */
+ /* eslint no-shadow: 0 */
+ var RULES = this.RULES;
+ if (RULES.keywords[keyword])
+ throw new Error('Keyword ' + keyword + ' is already defined');
+
+ if (!IDENTIFIER.test(keyword))
+ throw new Error('Keyword ' + keyword + ' is not a valid identifier');
+
+ if (definition) {
+ this.validateKeyword(definition, true);
+
+ var dataType = definition.type;
+ if (Array.isArray(dataType)) {
+ for (var i=0; i<dataType.length; i++)
+ _addRule(keyword, dataType[i], definition);
+ } else {
+ _addRule(keyword, dataType, definition);
+ }
+
+ var metaSchema = definition.metaSchema;
+ if (metaSchema) {
+ if (definition.$data && this._opts.$data) {
+ metaSchema = {
+ anyOf: [
+ metaSchema,
+ { '$ref': 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' }
+ ]
+ };
+ }
+ definition.validateSchema = this.compile(metaSchema, true);
+ }
+ }
+
+ RULES.keywords[keyword] = RULES.all[keyword] = true;
+
+
+ function _addRule(keyword, dataType, definition) {
+ var ruleGroup;
+ for (var i=0; i<RULES.length; i++) {
+ var rg = RULES[i];
+ if (rg.type == dataType) {
+ ruleGroup = rg;
+ break;
+ }
+ }
+
+ if (!ruleGroup) {
+ ruleGroup = { type: dataType, rules: [] };
+ RULES.push(ruleGroup);
+ }
+
+ var rule = {
+ keyword: keyword,
+ definition: definition,
+ custom: true,
+ code: customRuleCode,
+ implements: definition.implements
+ };
+ ruleGroup.rules.push(rule);
+ RULES.custom[keyword] = rule;
+ }
+
+ return this;
+}
+
+
+/**
+ * Get keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
+ */
+function getKeyword(keyword) {
+ /* jshint validthis: true */
+ var rule = this.RULES.custom[keyword];
+ return rule ? rule.definition : this.RULES.keywords[keyword] || false;
+}
+
+
+/**
+ * Remove keyword
+ * @this Ajv
+ * @param {String} keyword pre-defined or custom keyword.
+ * @return {Ajv} this for method chaining
+ */
+function removeKeyword(keyword) {
+ /* jshint validthis: true */
+ var RULES = this.RULES;
+ delete RULES.keywords[keyword];
+ delete RULES.all[keyword];
+ delete RULES.custom[keyword];
+ for (var i=0; i<RULES.length; i++) {
+ var rules = RULES[i].rules;
+ for (var j=0; j<rules.length; j++) {
+ if (rules[j].keyword == keyword) {
+ rules.splice(j, 1);
+ break;
+ }
+ }
+ }
+ return this;
+}
+
+
+/**
+ * Validate keyword definition
+ * @this Ajv
+ * @param {Object} definition keyword definition object.
+ * @param {Boolean} throwError true to throw exception if definition is invalid
+ * @return {boolean} validation result
+ */
+function validateKeyword(definition, throwError) {
+ validateKeyword.errors = null;
+ var v = this._validateKeyword = this._validateKeyword
+ || this.compile(definitionSchema, true);
+
+ if (v(definition)) return true;
+ validateKeyword.errors = v.errors;
+ if (throwError)
+ throw new Error('custom keyword definition is invalid: ' + this.errorsText(v.errors));
+ else
+ return false;
+}
diff --git a/node_modules/ajv/lib/refs/data.json b/node_modules/ajv/lib/refs/data.json
new file mode 100644
index 0000000..64aac5b
--- /dev/null
+++ b/node_modules/ajv/lib/refs/data.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
+ "description": "Meta-schema for $data reference (JSON Schema extension proposal)",
+ "type": "object",
+ "required": [ "$data" ],
+ "properties": {
+ "$data": {
+ "type": "string",
+ "anyOf": [
+ { "format": "relative-json-pointer" },
+ { "format": "json-pointer" }
+ ]
+ }
+ },
+ "additionalProperties": false
+}
diff --git a/node_modules/ajv/lib/refs/json-schema-draft-04.json b/node_modules/ajv/lib/refs/json-schema-draft-04.json
new file mode 100644
index 0000000..bcbb847
--- /dev/null
+++ b/node_modules/ajv/lib/refs/json-schema-draft-04.json
@@ -0,0 +1,149 @@
+{
+ "id": "http://json-schema.org/draft-04/schema#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "description": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "positiveInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "positiveIntegerDefault0": {
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
+ },
+ "simpleTypes": {
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ },
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "$schema": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "multipleOf": {
+ "type": "number",
+ "minimum": 0,
+ "exclusiveMinimum": true
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "boolean",
+ "default": false
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxLength": { "$ref": "#/definitions/positiveInteger" },
+ "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": { "$ref": "#/definitions/positiveInteger" },
+ "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "maxProperties": { "$ref": "#/definitions/positiveInteger" },
+ "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": {
+ "anyOf": [
+ { "type": "boolean" },
+ { "$ref": "#" }
+ ],
+ "default": {}
+ },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": { "type": "string" },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "dependencies": {
+ "exclusiveMaximum": [ "maximum" ],
+ "exclusiveMinimum": [ "minimum" ]
+ },
+ "default": {}
+}
diff --git a/node_modules/ajv/lib/refs/json-schema-draft-06.json b/node_modules/ajv/lib/refs/json-schema-draft-06.json
new file mode 100644
index 0000000..5656240
--- /dev/null
+++ b/node_modules/ajv/lib/refs/json-schema-draft-06.json
@@ -0,0 +1,154 @@
+{
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "$id": "http://json-schema.org/draft-06/schema#",
+ "title": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "allOf": [
+ { "$ref": "#/definitions/nonNegativeInteger" },
+ { "default": 0 }
+ ]
+ },
+ "simpleTypes": {
+ "enum": [
+ "array",
+ "boolean",
+ "integer",
+ "null",
+ "number",
+ "object",
+ "string"
+ ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "uniqueItems": true,
+ "default": []
+ }
+ },
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": {},
+ "examples": {
+ "type": "array",
+ "items": {}
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": { "$ref": "#" },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": {}
+ },
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "contains": { "$ref": "#" },
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": { "$ref": "#" },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "propertyNames": { "$ref": "#" },
+ "const": {},
+ "enum": {
+ "type": "array",
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": { "type": "string" },
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "default": {}
+}
diff --git a/node_modules/ajv/lib/refs/json-schema-draft-07.json b/node_modules/ajv/lib/refs/json-schema-draft-07.json
new file mode 100644
index 0000000..5bee90e
--- /dev/null
+++ b/node_modules/ajv/lib/refs/json-schema-draft-07.json
@@ -0,0 +1,168 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "http://json-schema.org/draft-07/schema#",
+ "title": "Core schema meta-schema",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": { "$ref": "#" }
+ },
+ "nonNegativeInteger": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "nonNegativeIntegerDefault0": {
+ "allOf": [
+ { "$ref": "#/definitions/nonNegativeInteger" },
+ { "default": 0 }
+ ]
+ },
+ "simpleTypes": {
+ "enum": [
+ "array",
+ "boolean",
+ "integer",
+ "null",
+ "number",
+ "object",
+ "string"
+ ]
+ },
+ "stringArray": {
+ "type": "array",
+ "items": { "type": "string" },
+ "uniqueItems": true,
+ "default": []
+ }
+ },
+ "type": ["object", "boolean"],
+ "properties": {
+ "$id": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$schema": {
+ "type": "string",
+ "format": "uri"
+ },
+ "$ref": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "$comment": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "default": true,
+ "readOnly": {
+ "type": "boolean",
+ "default": false
+ },
+ "examples": {
+ "type": "array",
+ "items": true
+ },
+ "multipleOf": {
+ "type": "number",
+ "exclusiveMinimum": 0
+ },
+ "maximum": {
+ "type": "number"
+ },
+ "exclusiveMaximum": {
+ "type": "number"
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "exclusiveMinimum": {
+ "type": "number"
+ },
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "pattern": {
+ "type": "string",
+ "format": "regex"
+ },
+ "additionalItems": { "$ref": "#" },
+ "items": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/schemaArray" }
+ ],
+ "default": true
+ },
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "uniqueItems": {
+ "type": "boolean",
+ "default": false
+ },
+ "contains": { "$ref": "#" },
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
+ "required": { "$ref": "#/definitions/stringArray" },
+ "additionalProperties": { "$ref": "#" },
+ "definitions": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "default": {}
+ },
+ "patternProperties": {
+ "type": "object",
+ "additionalProperties": { "$ref": "#" },
+ "propertyNames": { "format": "regex" },
+ "default": {}
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ { "$ref": "#" },
+ { "$ref": "#/definitions/stringArray" }
+ ]
+ }
+ },
+ "propertyNames": { "$ref": "#" },
+ "const": true,
+ "enum": {
+ "type": "array",
+ "items": true,
+ "minItems": 1,
+ "uniqueItems": true
+ },
+ "type": {
+ "anyOf": [
+ { "$ref": "#/definitions/simpleTypes" },
+ {
+ "type": "array",
+ "items": { "$ref": "#/definitions/simpleTypes" },
+ "minItems": 1,
+ "uniqueItems": true
+ }
+ ]
+ },
+ "format": { "type": "string" },
+ "contentMediaType": { "type": "string" },
+ "contentEncoding": { "type": "string" },
+ "if": {"$ref": "#"},
+ "then": {"$ref": "#"},
+ "else": {"$ref": "#"},
+ "allOf": { "$ref": "#/definitions/schemaArray" },
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
+ "not": { "$ref": "#" }
+ },
+ "default": true
+}
diff --git a/node_modules/ajv/lib/refs/json-schema-secure.json b/node_modules/ajv/lib/refs/json-schema-secure.json
new file mode 100644
index 0000000..0f7aad4
--- /dev/null
+++ b/node_modules/ajv/lib/refs/json-schema-secure.json
@@ -0,0 +1,94 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/json-schema-secure.json#",
+ "title": "Meta-schema for the security assessment of JSON Schemas",
+ "description": "If a JSON Schema fails validation against this meta-schema, it may be unsafe to validate untrusted data",
+ "definitions": {
+ "schemaArray": {
+ "type": "array",
+ "minItems": 1,
+ "items": {"$ref": "#"}
+ }
+ },
+ "dependencies": {
+ "patternProperties": {
+ "description": "prevent slow validation of large property names",
+ "required": ["propertyNames"],
+ "properties": {
+ "propertyNames": {
+ "required": ["maxLength"]
+ }
+ }
+ },
+ "uniqueItems": {
+ "description": "prevent slow validation of large non-scalar arrays",
+ "if": {
+ "properties": {
+ "uniqueItems": {"const": true},
+ "items": {
+ "properties": {
+ "type": {
+ "anyOf": [
+ {
+ "enum": ["object", "array"]
+ },
+ {
+ "type": "array",
+ "contains": {"enum": ["object", "array"]}
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "then": {
+ "required": ["maxItems"]
+ }
+ },
+ "pattern": {
+ "description": "prevent slow pattern matching of large strings",
+ "required": ["maxLength"]
+ },
+ "format": {
+ "description": "prevent slow format validation of large strings",
+ "required": ["maxLength"]
+ }
+ },
+ "properties": {
+ "additionalItems": {"$ref": "#"},
+ "additionalProperties": {"$ref": "#"},
+ "dependencies": {
+ "additionalProperties": {
+ "anyOf": [
+ {"type": "array"},
+ {"$ref": "#"}
+ ]
+ }
+ },
+ "items": {
+ "anyOf": [
+ {"$ref": "#"},
+ {"$ref": "#/definitions/schemaArray"}
+ ]
+ },
+ "definitions": {
+ "additionalProperties": {"$ref": "#"}
+ },
+ "patternProperties": {
+ "additionalProperties": {"$ref": "#"}
+ },
+ "properties": {
+ "additionalProperties": {"$ref": "#"}
+ },
+ "if": {"$ref": "#"},
+ "then": {"$ref": "#"},
+ "else": {"$ref": "#"},
+ "allOf": {"$ref": "#/definitions/schemaArray"},
+ "anyOf": {"$ref": "#/definitions/schemaArray"},
+ "oneOf": {"$ref": "#/definitions/schemaArray"},
+ "not": {"$ref": "#"},
+ "contains": {"$ref": "#"},
+ "propertyNames": {"$ref": "#"}
+ }
+}
diff --git a/node_modules/ajv/package.json b/node_modules/ajv/package.json
new file mode 100644
index 0000000..559a933
--- /dev/null
+++ b/node_modules/ajv/package.json
@@ -0,0 +1,106 @@
+{
+ "name": "ajv",
+ "version": "6.12.6",
+ "description": "Another JSON Schema Validator",
+ "main": "lib/ajv.js",
+ "typings": "lib/ajv.d.ts",
+ "files": [
+ "lib/",
+ "dist/",
+ "scripts/",
+ "LICENSE",
+ ".tonic_example.js"
+ ],
+ "scripts": {
+ "eslint": "eslint lib/{compile/,}*.js spec/{**/,}*.js scripts --ignore-pattern spec/JSON-Schema-Test-Suite",
+ "jshint": "jshint lib/{compile/,}*.js",
+ "lint": "npm run jshint && npm run eslint",
+ "test-spec": "mocha spec/{**/,}*.spec.js -R spec",
+ "test-fast": "AJV_FAST_TEST=true npm run test-spec",
+ "test-debug": "npm run test-spec -- --inspect-brk",
+ "test-cov": "nyc npm run test-spec",
+ "test-ts": "tsc --target ES5 --noImplicitAny --noEmit spec/typescript/index.ts",
+ "bundle": "del-cli dist && node ./scripts/bundle.js . Ajv pure_getters",
+ "bundle-beautify": "node ./scripts/bundle.js js-beautify",
+ "build": "del-cli lib/dotjs/*.js \"!lib/dotjs/index.js\" && node scripts/compile-dots.js",
+ "test-karma": "karma start",
+ "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma",
+ "test-all": "npm run test-cov && if-node-version 10 npm run test-browser",
+ "test": "npm run lint && npm run build && npm run test-all",
+ "prepublish": "npm run build && npm run bundle",
+ "watch": "watch \"npm run build\" ./lib/dot"
+ },
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/ajv-validator/ajv.git"
+ },
+ "keywords": [
+ "JSON",
+ "schema",
+ "validator",
+ "validation",
+ "jsonschema",
+ "json-schema",
+ "json-schema-validator",
+ "json-schema-validation"
+ ],
+ "author": "Evgeny Poberezkin",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ajv-validator/ajv/issues"
+ },
+ "homepage": "https://github.com/ajv-validator/ajv",
+ "tonicExampleFilename": ".tonic_example.js",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "devDependencies": {
+ "ajv-async": "^1.0.0",
+ "bluebird": "^3.5.3",
+ "brfs": "^2.0.0",
+ "browserify": "^16.2.0",
+ "chai": "^4.0.1",
+ "coveralls": "^3.0.1",
+ "del-cli": "^3.0.0",
+ "dot": "^1.0.3",
+ "eslint": "^7.3.1",
+ "gh-pages-generator": "^0.2.3",
+ "glob": "^7.0.0",
+ "if-node-version": "^1.0.0",
+ "js-beautify": "^1.7.3",
+ "jshint": "^2.10.2",
+ "json-schema-test": "^2.0.0",
+ "karma": "^5.0.0",
+ "karma-chrome-launcher": "^3.0.0",
+ "karma-mocha": "^2.0.0",
+ "karma-sauce-launcher": "^4.1.3",
+ "mocha": "^8.0.1",
+ "nyc": "^15.0.0",
+ "pre-commit": "^1.1.1",
+ "require-globify": "^1.3.0",
+ "typescript": "^3.9.5",
+ "uglify-js": "^3.6.9",
+ "watch": "^1.0.0"
+ },
+ "collective": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/ajv"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+}
diff --git a/node_modules/ajv/scripts/.eslintrc.yml b/node_modules/ajv/scripts/.eslintrc.yml
new file mode 100644
index 0000000..493d7d3
--- /dev/null
+++ b/node_modules/ajv/scripts/.eslintrc.yml
@@ -0,0 +1,3 @@
+rules:
+ no-console: 0
+ no-empty: [2, allowEmptyCatch: true]
diff --git a/node_modules/ajv/scripts/bundle.js b/node_modules/ajv/scripts/bundle.js
new file mode 100644
index 0000000..e381a76
--- /dev/null
+++ b/node_modules/ajv/scripts/bundle.js
@@ -0,0 +1,61 @@
+'use strict';
+
+var fs = require('fs')
+ , path = require('path')
+ , browserify = require('browserify')
+ , uglify = require('uglify-js');
+
+var pkg = process.argv[2]
+ , standalone = process.argv[3]
+ , compress = process.argv[4];
+
+var packageDir = path.join(__dirname, '..');
+if (pkg != '.') packageDir = path.join(packageDir, 'node_modules', pkg);
+
+var json = require(path.join(packageDir, 'package.json'));
+
+var distDir = path.join(__dirname, '..', 'dist');
+if (!fs.existsSync(distDir)) fs.mkdirSync(distDir);
+
+var bOpts = {};
+if (standalone) bOpts.standalone = standalone;
+
+browserify(bOpts)
+.require(path.join(packageDir, json.main), {expose: json.name})
+.bundle(function (err, buf) {
+ if (err) {
+ console.error('browserify error:', err);
+ process.exit(1);
+ }
+
+ var outputFile = path.join(distDir, json.name);
+ var uglifyOpts = {
+ warnings: true,
+ compress: {},
+ output: {
+ preamble: '/* ' + json.name + ' ' + json.version + ': ' + json.description + ' */'
+ }
+ };
+ if (compress) {
+ var compressOpts = compress.split(',');
+ for (var i=0, il = compressOpts.length; i<il; ++i) {
+ var pair = compressOpts[i].split('=');
+ uglifyOpts.compress[pair[0]] = pair.length < 1 || pair[1] != 'false';
+ }
+ }
+ if (standalone) {
+ uglifyOpts.sourceMap = {
+ filename: json.name + '.min.js',
+ url: json.name + '.min.js.map'
+ };
+ }
+
+ var result = uglify.minify(buf.toString(), uglifyOpts);
+ fs.writeFileSync(outputFile + '.min.js', result.code);
+ if (result.map) fs.writeFileSync(outputFile + '.min.js.map', result.map);
+ if (standalone) fs.writeFileSync(outputFile + '.bundle.js', buf);
+ if (result.warnings) {
+ for (var j=0, jl = result.warnings.length; j<jl; ++j)
+ console.warn('UglifyJS warning:', result.warnings[j]);
+ }
+});
diff --git a/node_modules/ajv/scripts/compile-dots.js b/node_modules/ajv/scripts/compile-dots.js
new file mode 100644
index 0000000..5a21a7d
--- /dev/null
+++ b/node_modules/ajv/scripts/compile-dots.js
@@ -0,0 +1,73 @@
+//compile doT templates to js functions
+'use strict';
+
+var glob = require('glob')
+ , fs = require('fs')
+ , path = require('path')
+ , doT = require('dot')
+ , beautify = require('js-beautify').js_beautify;
+
+var defsRootPath = process.argv[2] || path.join(__dirname, '../lib');
+
+var defs = {};
+var defFiles = glob.sync('./dot/**/*.def', { cwd: defsRootPath });
+defFiles.forEach(function (f) {
+ var name = path.basename(f, '.def');
+ defs[name] = fs.readFileSync(path.join(defsRootPath, f));
+});
+
+var filesRootPath = process.argv[3] || path.join(__dirname, '../lib');
+var files = glob.sync('./dot/**/*.jst', { cwd: filesRootPath });
+
+var dotjsPath = path.join(filesRootPath, './dotjs');
+try { fs.mkdirSync(dotjsPath); } catch(e) {}
+
+console.log('\n\nCompiling:');
+
+var FUNCTION_NAME = /function\s+anonymous\s*\(it[^)]*\)\s*{/;
+var OUT_EMPTY_STRING = /out\s*\+=\s*'\s*';/g;
+var ISTANBUL = /'(istanbul[^']+)';/g;
+var ERROR_KEYWORD = /\$errorKeyword/g;
+var ERROR_KEYWORD_OR = /\$errorKeyword\s+\|\|/g;
+var VARS = [
+ '$errs', '$valid', '$lvl', '$data', '$dataLvl',
+ '$errorKeyword', '$closingBraces', '$schemaPath',
+ '$validate'
+];
+
+files.forEach(function (f) {
+ var keyword = path.basename(f, '.jst');
+ var targetPath = path.join(dotjsPath, keyword + '.js');
+ var template = fs.readFileSync(path.join(filesRootPath, f));
+ var code = doT.compile(template, defs);
+ code = code.toString()
+ .replace(OUT_EMPTY_STRING, '')
+ .replace(FUNCTION_NAME, 'function generate_' + keyword + '(it, $keyword, $ruleType) {')
+ .replace(ISTANBUL, '/* $1 */');
+ removeAlwaysFalsyInOr();
+ VARS.forEach(removeUnusedVar);
+ code = "'use strict';\nmodule.exports = " + code;
+ code = beautify(code, { indent_size: 2 }) + '\n';
+ fs.writeFileSync(targetPath, code);
+ console.log('compiled', keyword);
+
+ function removeUnusedVar(v) {
+ v = v.replace(/\$/g, '\\$$');
+ var regexp = new RegExp(v + '[^A-Za-z0-9_$]', 'g');
+ var count = occurrences(regexp);
+ if (count == 1) {
+ regexp = new RegExp('var\\s+' + v + '\\s*=[^;]+;|var\\s+' + v + ';');
+ code = code.replace(regexp, '');
+ }
+ }
+
+ function removeAlwaysFalsyInOr() {
+ var countUsed = occurrences(ERROR_KEYWORD);
+ var countOr = occurrences(ERROR_KEYWORD_OR);
+ if (countUsed == countOr + 1) code = code.replace(ERROR_KEYWORD_OR, '');
+ }
+
+ function occurrences(regexp) {
+ return (code.match(regexp) || []).length;
+ }
+});
diff --git a/node_modules/ajv/scripts/info b/node_modules/ajv/scripts/info
new file mode 100644
index 0000000..77269ab
--- /dev/null
+++ b/node_modules/ajv/scripts/info
@@ -0,0 +1,10 @@
+#!/usr/bin/env node
+
+'use strict';
+
+var fs = require('fs');
+var name = process.argv[2] || '.';
+var property = process.argv[3] || 'version';
+if (name != '.') name = 'node_modules/' + name;
+var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8'));
+console.log(json[property]);
diff --git a/node_modules/ajv/scripts/prepare-tests b/node_modules/ajv/scripts/prepare-tests
new file mode 100644
index 0000000..6847033
--- /dev/null
+++ b/node_modules/ajv/scripts/prepare-tests
@@ -0,0 +1,12 @@
+#!/usr/bin/env sh
+
+set -e
+
+mkdir -p .browser
+
+echo
+echo Preparing browser tests:
+
+find spec -type f -name '*.spec.js' | \
+xargs -I {} sh -c \
+'export f="{}"; echo $f; browserify $f -t require-globify -t brfs -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/");'
diff --git a/node_modules/ajv/scripts/publish-built-version b/node_modules/ajv/scripts/publish-built-version
new file mode 100644
index 0000000..1b57123
--- /dev/null
+++ b/node_modules/ajv/scripts/publish-built-version
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+set -e
+
+if [[ -n $TRAVIS_TAG && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then
+ echo "About to publish $TRAVIS_TAG to ajv-dist..."
+
+ git config user.email "$GIT_USER_EMAIL"
+ git config user.name "$GIT_USER_NAME"
+
+ git clone https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv-dist.git ../ajv-dist
+
+ rm -rf ../ajv-dist/dist
+ mkdir ../ajv-dist/dist
+ cp ./dist/ajv.* ../ajv-dist/dist
+ cat bower.json | sed 's/"name": "ajv"/"name": "ajv-dist"/' > ../ajv-dist/bower.json
+ cd ../ajv-dist
+
+ if [[ `git status --porcelain` ]]; then
+ echo "Changes detected. Updating master branch..."
+ git add -A
+ git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER"
+ git push --quiet origin master > /dev/null 2>&1
+ fi
+
+ echo "Publishing tag..."
+
+ git tag $TRAVIS_TAG
+ git push --tags > /dev/null 2>&1
+
+ echo "Done"
+fi
diff --git a/node_modules/ajv/scripts/travis-gh-pages b/node_modules/ajv/scripts/travis-gh-pages
new file mode 100644
index 0000000..b3d4f3d
--- /dev/null
+++ b/node_modules/ajv/scripts/travis-gh-pages
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+set -e
+
+if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then
+ git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && {
+ rm -rf ../gh-pages
+ git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv.git ../gh-pages
+ mkdir -p ../gh-pages/_source
+ cp *.md ../gh-pages/_source
+ cp LICENSE ../gh-pages/_source
+ currentDir=$(pwd)
+ cd ../gh-pages
+ $currentDir/node_modules/.bin/gh-pages-generator
+ # remove logo from README
+ sed -i -E "s/<img[^>]+ajv_logo[^>]+>//" index.md
+ git config user.email "$GIT_USER_EMAIL"
+ git config user.name "$GIT_USER_NAME"
+ git add .
+ git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER"
+ git push --quiet origin gh-pages > /dev/null 2>&1
+ }
+fi
diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000..b9574ed
--- /dev/null
+++ b/node_modules/ansi-regex/index.js
@@ -0,0 +1,4 @@
+'use strict';
+module.exports = function () {
+ return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
+};
diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/ansi-regex/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json
new file mode 100644
index 0000000..eb44fb5
--- /dev/null
+++ b/node_modules/ansi-regex/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "ansi-regex",
+ "version": "2.1.1",
+ "description": "Regular expression for matching ANSI escape codes",
+ "license": "MIT",
+ "repository": "chalk/ansi-regex",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "maintainers": [
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
+ "Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)",
+ "JD Ballard <i.am.qix@gmail.com> (github.com/qix-)"
+ ],
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava --verbose",
+ "view-supported": "node fixtures/view-codes.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "devDependencies": {
+ "ava": "0.17.0",
+ "xo": "0.16.0"
+ },
+ "xo": {
+ "rules": {
+ "guard-for-in": 0,
+ "no-loop-func": 0
+ }
+ }
+}
diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md
new file mode 100644
index 0000000..6a928ed
--- /dev/null
+++ b/node_modules/ansi-regex/readme.md
@@ -0,0 +1,39 @@
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install --save ansi-regex
+```
+
+
+## Usage
+
+```js
+const ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001b[4mcake\u001b[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001b[4mcake\u001b[0m'.match(ansiRegex());
+//=> ['\u001b[4m', '\u001b[0m']
+```
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/array-find-index/index.js b/node_modules/array-find-index/index.js
new file mode 100644
index 0000000..e2dcd9a
--- /dev/null
+++ b/node_modules/array-find-index/index.js
@@ -0,0 +1,25 @@
+'use strict';
+module.exports = function (arr, predicate, ctx) {
+ if (typeof Array.prototype.findIndex === 'function') {
+ return arr.findIndex(predicate, ctx);
+ }
+
+ if (typeof predicate !== 'function') {
+ throw new TypeError('predicate must be a function');
+ }
+
+ var list = Object(arr);
+ var len = list.length;
+
+ if (len === 0) {
+ return -1;
+ }
+
+ for (var i = 0; i < len; i++) {
+ if (predicate.call(ctx, list[i], i, list)) {
+ return i;
+ }
+ }
+
+ return -1;
+};
diff --git a/node_modules/array-find-index/license b/node_modules/array-find-index/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/array-find-index/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/array-find-index/package.json b/node_modules/array-find-index/package.json
new file mode 100644
index 0000000..ee2e62d
--- /dev/null
+++ b/node_modules/array-find-index/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "array-find-index",
+ "version": "1.0.2",
+ "description": "ES2015 `Array#findIndex()` ponyfill",
+ "license": "MIT",
+ "repository": "sindresorhus/array-find-index",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "es2015",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "find",
+ "index",
+ "findindex",
+ "array"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/array-find-index/readme.md b/node_modules/array-find-index/readme.md
new file mode 100644
index 0000000..3166341
--- /dev/null
+++ b/node_modules/array-find-index/readme.md
@@ -0,0 +1,30 @@
+# array-find-index [![Build Status](https://travis-ci.org/sindresorhus/array-find-index.svg?branch=master)](https://travis-ci.org/sindresorhus/array-find-index)
+
+> ES2015 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) [ponyfill](https://ponyfill.com)
+
+
+## Install
+
+```
+$ npm install --save array-find-index
+```
+
+
+## Usage
+
+```js
+const arrayFindIndex = require('array-find-index');
+
+arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn');
+//=> 1
+```
+
+
+## API
+
+Same as `Array#findIndex()`, but with the input array as the first argument.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/asar/CHANGELOG.md b/node_modules/asar/CHANGELOG.md
new file mode 100644
index 0000000..d112929
--- /dev/null
+++ b/node_modules/asar/CHANGELOG.md
@@ -0,0 +1,140 @@
+# [3.2.0](https://github.com/electron/asar/compare/v3.1.0...v3.2.0) (2022-07-29)
+
+
+### Features
+
+* give better hints when failing due to bad links ([#241](https://github.com/electron/asar/issues/241)) ([db6d154](https://github.com/electron/asar/commit/db6d1541be05f67933f07c6f30d2425a05f13182))
+
+# Changes By Version
+
+## [2.0.1](https://github.com/electron/asar/compare/v2.0.0...v2.0.1) - 2019-04-29
+
+### Fixed
+
+* Don't monkeypatch fs with promisified versions ([#176](https://github.com/electron/asar/issues/176)) ([319dd81](https://github.com/electron/asar/commit/319dd81))
+
+## [2.0.0](https://github.com/electron/asar/compare/v1.0.0...v2.0.0) - 2019-04-27
+
+### Removed
+
+* Support for Node &lt; 8 ([#170](https://github.com/electron/asar/issues/170)) ([8a03eae](https://github.com/electron/asar/commit/8a03eae))
+
+## 1.0.0 - 2019-02-19
+
+### Added
+
+* Promise-based async API (#165)
+
+### Changed
+
+* This module requires Node 6 or later (#165)
+
+### Removed
+
+* V8 snapshot support, which was undocumented and used an unmaintained dependency, which itself had a dependency with a security vulnerability (#165)
+* callback-style async API - if you still need to use this style of API, please check out the `nodeify` module (#165)
+
+## 0.14.6 - 2018-12-10
+
+### Fixed
+
+* Normalize file paths in `asar.createPackageFromFiles` (#159)
+
+## 0.14.5 - 2018-10-01
+
+### Fixed
+
+* Regression from #154
+
+## 0.14.4 - 2018-09-30
+
+### Added
+
+* `--is-pack` CLI option / `isPack` option to `asar.listPackage` (#145)
+
+### Fixed
+
+* Allow `asar.createPackageFromFiles` to not pass `metadata` or `options` (#154)
+
+## 0.14.3 - 2018-03-07
+
+### Added
+
+* `globOptions` option to pass options to the `glob` module
+* `pattern` option
+
+## 0.14.2 - 2018-02-11
+
+### Fixed
+
+* Invoke callback if the last file in the list was marked as unpacked (#142)
+
+## 0.14.1 - 2018-01-30
+
+### Fixed
+
+* Maximum call stack size exceeded during unpack (#140)
+
+## 0.14.0 - 2017-11-02
+
+### Added
+
+* Snapcraft metadata (#130)
+* `uncache` and `uncacheAll` (#118)
+
+### Fixed
+
+* Use of asar inside of an Electron app (#118)
+
+## 0.13.1 - 2017-11-02
+
+### Fixed
+
+- Do not return before the write stream fully closes (#113)
+
+## 0.13.0 - 2017-01-09
+
+### Changed
+
+- Dropped support for Node `0.10.0` and `0.12.0`. The minimum supported version
+ is now Node `4.6.0`. (#100)
+- This project was ported from CoffeeScript to JavaScript. The behavior and
+ APIs should be the same as previous releases. (#100)
+
+## 0.12.4 - 2016-12-28
+
+### Fixed
+
+- Unpack glob patterns containing `{}` characters not working properly (#99)
+
+## 0.12.3 - 2016-08-29
+
+### Fixed
+
+- Multibyte characters in paths are now supported (#86)
+
+## 0.12.2 - 2016-08-22
+
+### Fixed
+
+- Upgraded `minimatch` to `^3.0.3` from `^3.0.0` for [RegExp DOS fix](https://nodesecurity.io/advisories/minimatch_regular-expression-denial-of-service).
+
+## 0.12.1 - 2016-07-25
+
+### Fixed
+
+- Fix `Maximum call stack size exceeded` error regression (#80)
+
+## 0.12.0 - 2016-07-20
+
+### Added
+
+- Added `transform` option to specify a `stream.Transform` function to the
+ `createPackageWithOptions` API (#73)
+
+## 0.11.0 - 2016-04-06
+
+### Fixed
+
+- Upgraded `mksnapshot` dependency to remove logged `graceful-fs` deprecation
+ warnings (#61)
diff --git a/node_modules/asar/LICENSE.md b/node_modules/asar/LICENSE.md
new file mode 100644
index 0000000..4d231b4
--- /dev/null
+++ b/node_modules/asar/LICENSE.md
@@ -0,0 +1,20 @@
+Copyright (c) 2014 GitHub Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/asar/README.md b/node_modules/asar/README.md
new file mode 100644
index 0000000..b9f2568
--- /dev/null
+++ b/node_modules/asar/README.md
@@ -0,0 +1,215 @@
+# asar - Electron Archive
+
+[![CircleCI build status](https://circleci.com/gh/electron/asar/tree/main.svg?style=shield)](https://circleci.com/gh/electron/asar/tree/main)
+[![npm version](http://img.shields.io/npm/v/asar.svg)](https://npmjs.org/package/asar)
+
+Asar is a simple extensive archive format, it works like `tar` that concatenates
+all files together without compression, while having random access support.
+
+## Features
+
+* Support random access
+* Use JSON to store files' information
+* Very easy to write a parser
+
+## Command line utility
+
+### Install
+
+This module requires Node 10 or later.
+
+```bash
+$ npm install --engine-strict asar
+```
+
+### Usage
+
+```bash
+$ asar --help
+
+ Usage: asar [options] [command]
+
+ Commands:
+
+ pack|p <dir> <output>
+ create asar archive
+
+ list|l <archive>
+ list files of asar archive
+
+ extract-file|ef <archive> <filename>
+ extract one file from archive
+
+ extract|e <archive> <dest>
+ extract archive
+
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+
+```
+
+#### Excluding multiple resources from being packed
+
+Given:
+```
+ app
+(a) ├── x1
+(b) ├── x2
+(c) ├── y3
+(d) │   ├── x1
+(e) │   └── z1
+(f) │   └── x2
+(g) └── z4
+(h) └── w1
+```
+
+Exclude: a, b
+```bash
+$ asar pack app app.asar --unpack-dir "{x1,x2}"
+```
+
+Exclude: a, b, d, f
+```bash
+$ asar pack app app.asar --unpack-dir "**/{x1,x2}"
+```
+
+Exclude: a, b, d, f, h
+```bash
+$ asar pack app app.asar --unpack-dir "{**/x1,**/x2,z4/w1}"
+```
+
+## Using programatically
+
+### Example
+
+```javascript
+const asar = require('asar');
+
+const src = 'some/path/';
+const dest = 'name.asar';
+
+await asar.createPackage(src, dest);
+console.log('done.');
+```
+
+Please note that there is currently **no** error handling provided!
+
+### Transform
+You can pass in a `transform` option, that is a function, which either returns
+nothing, or a `stream.Transform`. The latter will be used on files that will be
+in the `.asar` file to transform them (e.g. compress).
+
+```javascript
+const asar = require('asar');
+
+const src = 'some/path/';
+const dest = 'name.asar';
+
+function transform (filename) {
+ return new CustomTransformStream()
+}
+
+await asar.createPackageWithOptions(src, dest, { transform: transform });
+console.log('done.');
+```
+
+## Using with grunt
+
+There is also an unofficial grunt plugin to generate asar archives at [bwin/grunt-asar][grunt-asar].
+
+## Format
+
+Asar uses [Pickle][pickle] to safely serialize binary value to file, there is
+also a [node.js binding][node-pickle] of `Pickle` class.
+
+The format of asar is very flat:
+
+```
+| UInt32: header_size | String: header | Bytes: file1 | ... | Bytes: file42 |
+```
+
+The `header_size` and `header` are serialized with [Pickle][pickle] class, and
+`header_size`'s [Pickle][pickle] object is 8 bytes.
+
+The `header` is a JSON string, and the `header_size` is the size of `header`'s
+`Pickle` object.
+
+Structure of `header` is something like this:
+
+```json
+{
+ "files": {
+ "tmp": {
+ "files": {}
+ },
+ "usr" : {
+ "files": {
+ "bin": {
+ "files": {
+ "ls": {
+ "offset": "0",
+ "size": 100,
+ "executable": true,
+ "integrity": {
+ "algorithm": "SHA256",
+ "hash": "...",
+ "blockSize": 1024,
+ "blocks": ["...", "..."]
+ }
+ },
+ "cd": {
+ "offset": "100",
+ "size": 100,
+ "executable": true,
+ "integrity": {
+ "algorithm": "SHA256",
+ "hash": "...",
+ "blockSize": 1024,
+ "blocks": ["...", "..."]
+ }
+ }
+ }
+ }
+ }
+ },
+ "etc": {
+ "files": {
+ "hosts": {
+ "offset": "200",
+ "size": 32,
+ "integrity": {
+ "algorithm": "SHA256",
+ "hash": "...",
+ "blockSize": 1024,
+ "blocks": ["...", "..."]
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+`offset` and `size` records the information to read the file from archive, the
+`offset` starts from 0 so you have to manually add the size of `header_size` and
+`header` to the `offset` to get the real offset of the file.
+
+`offset` is a UINT64 number represented in string, because there is no way to
+precisely represent UINT64 in JavaScript `Number`. `size` is a JavaScript
+`Number` that is no larger than `Number.MAX_SAFE_INTEGER`, which has a value of
+`9007199254740991` and is about 8PB in size. We didn't store `size` in UINT64
+because file size in Node.js is represented as `Number` and it is not safe to
+convert `Number` to UINT64.
+
+`integrity` is an object consisting of a few keys:
+* A hashing `algorithm`, currently only `SHA256` is supported.
+* A hex encoded `hash` value representing the hash of the entire file.
+* An array of hex encoded hashes for the `blocks` of the file. i.e. for a blockSize of 4KB this array contains the hash of every block if you split the file into N 4KB blocks.
+* A integer value `blockSize` representing the size in bytes of each block in the `blocks` hashes above
+
+[pickle]: https://chromium.googlesource.com/chromium/src/+/master/base/pickle.h
+[node-pickle]: https://www.npmjs.org/package/chromium-pickle
+[grunt-asar]: https://github.com/bwin/grunt-asar
diff --git a/node_modules/asar/bin/asar.js b/node_modules/asar/bin/asar.js
new file mode 100755
index 0000000..8efcc1a
--- /dev/null
+++ b/node_modules/asar/bin/asar.js
@@ -0,0 +1,84 @@
+#!/usr/bin/env node
+
+var packageJSON = require('../package.json')
+var splitVersion = function (version) { return version.split('.').map(function (part) { return Number(part) }) }
+var requiredNodeVersion = splitVersion(packageJSON.engines.node.slice(2))
+var actualNodeVersion = splitVersion(process.versions.node)
+
+if (actualNodeVersion[0] < requiredNodeVersion[0] || (actualNodeVersion[0] === requiredNodeVersion[0] && actualNodeVersion[1] < requiredNodeVersion[1])) {
+ console.error('CANNOT RUN WITH NODE ' + process.versions.node)
+ console.error('asar requires Node ' + packageJSON.engines.node + '.')
+ process.exit(1)
+}
+
+// Not consts so that this file can load in Node < 4.0
+var asar = require('../lib/asar')
+var program = require('commander')
+
+program.version('v' + packageJSON.version)
+ .description('Manipulate asar archive files')
+
+program.command('pack <dir> <output>')
+ .alias('p')
+ .description('create asar archive')
+ .option('--ordering <file path>', 'path to a text file for ordering contents')
+ .option('--unpack <expression>', 'do not pack files matching glob <expression>')
+ .option('--unpack-dir <expression>', 'do not pack dirs matching glob <expression> or starting with literal <expression>')
+ .option('--exclude-hidden', 'exclude hidden files')
+ .action(function (dir, output, options) {
+ options = {
+ unpack: options.unpack,
+ unpackDir: options.unpackDir,
+ ordering: options.ordering,
+ version: options.sv,
+ arch: options.sa,
+ builddir: options.sb,
+ dot: !options.excludeHidden
+ }
+ asar.createPackageWithOptions(dir, output, options, function (error) {
+ if (error) {
+ console.error(error.stack)
+ process.exit(1)
+ }
+ })
+ })
+
+program.command('list <archive>')
+ .alias('l')
+ .description('list files of asar archive')
+ .option('-i, --is-pack', 'each file in the asar is pack or unpack')
+ .action(function (archive, options) {
+ options = {
+ isPack: options.isPack
+ }
+ var files = asar.listPackage(archive, options)
+ for (var i in files) {
+ console.log(files[i])
+ }
+ })
+
+program.command('extract-file <archive> <filename>')
+ .alias('ef')
+ .description('extract one file from archive')
+ .action(function (archive, filename) {
+ require('fs').writeFileSync(require('path').basename(filename),
+ asar.extractFile(archive, filename))
+ })
+
+program.command('extract <archive> <dest>')
+ .alias('e')
+ .description('extract archive')
+ .action(function (archive, dest) {
+ asar.extractAll(archive, dest)
+ })
+
+program.command('*')
+ .action(function (cmd) {
+ console.log('asar: \'%s\' is not an asar command. See \'asar --help\'.', cmd)
+ })
+
+program.parse(process.argv)
+
+if (program.args.length === 0) {
+ program.help()
+}
diff --git a/node_modules/asar/lib/asar.js b/node_modules/asar/lib/asar.js
new file mode 100644
index 0000000..050e1a7
--- /dev/null
+++ b/node_modules/asar/lib/asar.js
@@ -0,0 +1,219 @@
+'use strict'
+
+const fs = require('./wrapped-fs')
+const path = require('path')
+const minimatch = require('minimatch')
+
+const Filesystem = require('./filesystem')
+const disk = require('./disk')
+const crawlFilesystem = require('./crawlfs')
+
+/**
+ * Whether a directory should be excluded from packing due to the `--unpack-dir" option.
+ *
+ * @param {string} dirPath - directory path to check
+ * @param {string} pattern - literal prefix [for backward compatibility] or glob pattern
+ * @param {array} unpackDirs - Array of directory paths previously marked as unpacked
+ */
+function isUnpackedDir (dirPath, pattern, unpackDirs) {
+ if (dirPath.startsWith(pattern) || minimatch(dirPath, pattern)) {
+ if (!unpackDirs.includes(dirPath)) {
+ unpackDirs.push(dirPath)
+ }
+ return true
+ } else {
+ return unpackDirs.some(unpackDir => dirPath.startsWith(unpackDir))
+ }
+}
+
+module.exports.createPackage = async function (src, dest) {
+ return module.exports.createPackageWithOptions(src, dest, {})
+}
+
+module.exports.createPackageWithOptions = async function (src, dest, options) {
+ const globOptions = options.globOptions ? options.globOptions : {}
+ globOptions.dot = options.dot === undefined ? true : options.dot
+
+ const pattern = src + (options.pattern ? options.pattern : '/**/*')
+
+ const [filenames, metadata] = await crawlFilesystem(pattern, globOptions)
+ return module.exports.createPackageFromFiles(src, dest, filenames, metadata, options)
+}
+
+/**
+ * Create an ASAR archive from a list of filenames.
+ *
+ * @param {string} src: Base path. All files are relative to this.
+ * @param {string} dest: Archive filename (& path).
+ * @param {array} filenames: List of filenames relative to src.
+ * @param {object} metadata: Object with filenames as keys and {type='directory|file|link', stat: fs.stat} as values. (Optional)
+ * @param {object} options: Options passed to `createPackageWithOptions`.
+*/
+module.exports.createPackageFromFiles = async function (src, dest, filenames, metadata, options) {
+ if (typeof metadata === 'undefined' || metadata === null) { metadata = {} }
+ if (typeof options === 'undefined' || options === null) { options = {} }
+
+ src = path.normalize(src)
+ dest = path.normalize(dest)
+ filenames = filenames.map(function (filename) { return path.normalize(filename) })
+
+ const filesystem = new Filesystem(src)
+ const files = []
+ const unpackDirs = []
+
+ let filenamesSorted = []
+ if (options.ordering) {
+ const orderingFiles = (await fs.readFile(options.ordering)).toString().split('\n').map(line => {
+ if (line.includes(':')) { line = line.split(':').pop() }
+ line = line.trim()
+ if (line.startsWith('/')) { line = line.slice(1) }
+ return line
+ })
+
+ const ordering = []
+ for (const file of orderingFiles) {
+ const pathComponents = file.split(path.sep)
+ let str = src
+ for (const pathComponent of pathComponents) {
+ str = path.join(str, pathComponent)
+ ordering.push(str)
+ }
+ }
+
+ let missing = 0
+ const total = filenames.length
+
+ for (const file of ordering) {
+ if (!filenamesSorted.includes(file) && filenames.includes(file)) {
+ filenamesSorted.push(file)
+ }
+ }
+
+ for (const file of filenames) {
+ if (!filenamesSorted.includes(file)) {
+ filenamesSorted.push(file)
+ missing += 1
+ }
+ }
+
+ console.log(`Ordering file has ${((total - missing) / total) * 100}% coverage.`)
+ } else {
+ filenamesSorted = filenames
+ }
+
+ const handleFile = async function (filename) {
+ if (!metadata[filename]) {
+ metadata[filename] = await crawlFilesystem.determineFileType(filename)
+ }
+ const file = metadata[filename]
+
+ let shouldUnpack
+ switch (file.type) {
+ case 'directory':
+ if (options.unpackDir) {
+ shouldUnpack = isUnpackedDir(path.relative(src, filename), options.unpackDir, unpackDirs)
+ } else {
+ shouldUnpack = false
+ }
+ filesystem.insertDirectory(filename, shouldUnpack)
+ break
+ case 'file':
+ shouldUnpack = false
+ if (options.unpack) {
+ shouldUnpack = minimatch(filename, options.unpack, { matchBase: true })
+ }
+ if (!shouldUnpack && options.unpackDir) {
+ const dirName = path.relative(src, path.dirname(filename))
+ shouldUnpack = isUnpackedDir(dirName, options.unpackDir, unpackDirs)
+ }
+ files.push({ filename: filename, unpack: shouldUnpack })
+ return filesystem.insertFile(filename, shouldUnpack, file, options)
+ case 'link':
+ filesystem.insertLink(filename)
+ break
+ }
+ return Promise.resolve()
+ }
+
+ const insertsDone = async function () {
+ await fs.mkdirp(path.dirname(dest))
+ return disk.writeFilesystem(dest, filesystem, files, metadata)
+ }
+
+ const names = filenamesSorted.slice()
+
+ const next = async function (name) {
+ if (!name) { return insertsDone() }
+
+ await handleFile(name)
+ return next(names.shift())
+ }
+
+ return next(names.shift())
+}
+
+module.exports.statFile = function (archive, filename, followLinks) {
+ const filesystem = disk.readFilesystemSync(archive)
+ return filesystem.getFile(filename, followLinks)
+}
+
+module.exports.getRawHeader = function (archive) {
+ return disk.readArchiveHeaderSync(archive)
+}
+
+module.exports.listPackage = function (archive, options) {
+ return disk.readFilesystemSync(archive).listFiles(options)
+}
+
+module.exports.extractFile = function (archive, filename) {
+ const filesystem = disk.readFilesystemSync(archive)
+ return disk.readFileSync(filesystem, filename, filesystem.getFile(filename))
+}
+
+module.exports.extractAll = function (archive, dest) {
+ const filesystem = disk.readFilesystemSync(archive)
+ const filenames = filesystem.listFiles()
+
+ // under windows just extract links as regular files
+ const followLinks = process.platform === 'win32'
+
+ // create destination directory
+ fs.mkdirpSync(dest)
+
+ for (const fullPath of filenames) {
+ // Remove leading slash
+ const filename = fullPath.substr(1)
+ const destFilename = path.join(dest, filename)
+ const file = filesystem.getFile(filename, followLinks)
+ if (file.files) {
+ // it's a directory, create it and continue with the next entry
+ fs.mkdirpSync(destFilename)
+ } else if (file.link) {
+ // it's a symlink, create a symlink
+ const linkSrcPath = path.dirname(path.join(dest, file.link))
+ const linkDestPath = path.dirname(destFilename)
+ const relativePath = path.relative(linkDestPath, linkSrcPath)
+ // try to delete output file, because we can't overwrite a link
+ try {
+ fs.unlinkSync(destFilename)
+ } catch {}
+ const linkTo = path.join(relativePath, path.basename(file.link))
+ fs.symlinkSync(linkTo, destFilename)
+ } else {
+ // it's a file, extract it
+ const content = disk.readFileSync(filesystem, filename, file)
+ fs.writeFileSync(destFilename, content)
+ if (file.executable) {
+ fs.chmodSync(destFilename, '755')
+ }
+ }
+ }
+}
+
+module.exports.uncache = function (archive) {
+ return disk.uncacheFilesystem(archive)
+}
+
+module.exports.uncacheAll = function () {
+ disk.uncacheAll()
+}
diff --git a/node_modules/asar/lib/crawlfs.js b/node_modules/asar/lib/crawlfs.js
new file mode 100644
index 0000000..a26c3eb
--- /dev/null
+++ b/node_modules/asar/lib/crawlfs.js
@@ -0,0 +1,41 @@
+'use strict'
+
+const { promisify } = require('util')
+
+const fs = require('./wrapped-fs')
+const glob = promisify(require('glob'))
+
+async function determineFileType (filename) {
+ const stat = await fs.lstat(filename)
+ if (stat.isFile()) {
+ return { type: 'file', stat }
+ } else if (stat.isDirectory()) {
+ return { type: 'directory', stat }
+ } else if (stat.isSymbolicLink()) {
+ return { type: 'link', stat }
+ }
+}
+
+module.exports = async function (dir, options) {
+ const metadata = {}
+ const crawled = await glob(dir, options)
+ const results = await Promise.all(crawled.map(async filename => [filename, await determineFileType(filename)]))
+ const links = []
+ const filenames = results.map(([filename, type]) => {
+ if (type) {
+ metadata[filename] = type
+ if (type.type === 'link') links.push(filename)
+ }
+ return filename
+ }).filter((filename) => {
+ // Newer glob can return files inside symlinked directories, to avoid
+ // those appearing in archives we need to manually exclude theme here
+ const exactLinkIndex = links.findIndex(link => filename === link)
+ return links.every((link, index) => {
+ if (index === exactLinkIndex) return true
+ return !filename.startsWith(link)
+ })
+ })
+ return [filenames, metadata]
+}
+module.exports.determineFileType = determineFileType
diff --git a/node_modules/asar/lib/disk.js b/node_modules/asar/lib/disk.js
new file mode 100644
index 0000000..34569a4
--- /dev/null
+++ b/node_modules/asar/lib/disk.js
@@ -0,0 +1,123 @@
+'use strict'
+
+const fs = require('./wrapped-fs')
+const path = require('path')
+const pickle = require('chromium-pickle-js')
+
+const Filesystem = require('./filesystem')
+let filesystemCache = {}
+
+async function copyFile (dest, src, filename) {
+ const srcFile = path.join(src, filename)
+ const targetFile = path.join(dest, filename)
+
+ const [content, stats] = await Promise.all([fs.readFile(srcFile), fs.stat(srcFile), fs.mkdirp(path.dirname(targetFile))])
+ return fs.writeFile(targetFile, content, { mode: stats.mode })
+}
+
+async function streamTransformedFile (originalFilename, outStream, transformed) {
+ return new Promise((resolve, reject) => {
+ const stream = fs.createReadStream(transformed ? transformed.path : originalFilename)
+ stream.pipe(outStream, { end: false })
+ stream.on('error', reject)
+ stream.on('end', () => resolve())
+ })
+}
+
+const writeFileListToStream = async function (dest, filesystem, out, list, metadata) {
+ for (const file of list) {
+ if (file.unpack) { // the file should not be packed into archive
+ const filename = path.relative(filesystem.src, file.filename)
+ await copyFile(`${dest}.unpacked`, filesystem.src, filename)
+ } else {
+ await streamTransformedFile(file.filename, out, metadata[file.filename].transformed)
+ }
+ }
+ return out.end()
+}
+
+module.exports.writeFilesystem = async function (dest, filesystem, files, metadata) {
+ const headerPickle = pickle.createEmpty()
+ headerPickle.writeString(JSON.stringify(filesystem.header))
+ const headerBuf = headerPickle.toBuffer()
+
+ const sizePickle = pickle.createEmpty()
+ sizePickle.writeUInt32(headerBuf.length)
+ const sizeBuf = sizePickle.toBuffer()
+
+ const out = fs.createWriteStream(dest)
+ await new Promise((resolve, reject) => {
+ out.on('error', reject)
+ out.write(sizeBuf)
+ return out.write(headerBuf, () => resolve())
+ })
+ return writeFileListToStream(dest, filesystem, out, files, metadata)
+}
+
+module.exports.readArchiveHeaderSync = function (archive) {
+ const fd = fs.openSync(archive, 'r')
+ let size
+ let headerBuf
+ try {
+ const sizeBuf = Buffer.alloc(8)
+ if (fs.readSync(fd, sizeBuf, 0, 8, null) !== 8) {
+ throw new Error('Unable to read header size')
+ }
+
+ const sizePickle = pickle.createFromBuffer(sizeBuf)
+ size = sizePickle.createIterator().readUInt32()
+ headerBuf = Buffer.alloc(size)
+ if (fs.readSync(fd, headerBuf, 0, size, null) !== size) {
+ throw new Error('Unable to read header')
+ }
+ } finally {
+ fs.closeSync(fd)
+ }
+
+ const headerPickle = pickle.createFromBuffer(headerBuf)
+ const header = headerPickle.createIterator().readString()
+ return { headerString: header, header: JSON.parse(header), headerSize: size }
+}
+
+module.exports.readFilesystemSync = function (archive) {
+ if (!filesystemCache[archive]) {
+ const header = this.readArchiveHeaderSync(archive)
+ const filesystem = new Filesystem(archive)
+ filesystem.header = header.header
+ filesystem.headerSize = header.headerSize
+ filesystemCache[archive] = filesystem
+ }
+ return filesystemCache[archive]
+}
+
+module.exports.uncacheFilesystem = function (archive) {
+ if (filesystemCache[archive]) {
+ filesystemCache[archive] = undefined
+ return true
+ }
+ return false
+}
+
+module.exports.uncacheAll = function () {
+ filesystemCache = {}
+}
+
+module.exports.readFileSync = function (filesystem, filename, info) {
+ let buffer = Buffer.alloc(info.size)
+ if (info.size <= 0) { return buffer }
+ if (info.unpacked) {
+ // it's an unpacked file, copy it.
+ buffer = fs.readFileSync(path.join(`${filesystem.src}.unpacked`, filename))
+ } else {
+ // Node throws an exception when reading 0 bytes into a 0-size buffer,
+ // so we short-circuit the read in this case.
+ const fd = fs.openSync(filesystem.src, 'r')
+ try {
+ const offset = 8 + filesystem.headerSize + parseInt(info.offset)
+ fs.readSync(fd, buffer, 0, info.size, offset)
+ } finally {
+ fs.closeSync(fd)
+ }
+ }
+ return buffer
+}
diff --git a/node_modules/asar/lib/filesystem.js b/node_modules/asar/lib/filesystem.js
new file mode 100644
index 0000000..552055e
--- /dev/null
+++ b/node_modules/asar/lib/filesystem.js
@@ -0,0 +1,151 @@
+'use strict'
+
+const fs = require('./wrapped-fs')
+const os = require('os')
+const path = require('path')
+const { promisify } = require('util')
+const stream = require('stream')
+const getFileIntegrity = require('./integrity')
+
+const UINT32_MAX = 2 ** 32 - 1
+
+const pipeline = promisify(stream.pipeline)
+
+class Filesystem {
+ constructor (src) {
+ this.src = path.resolve(src)
+ this.header = { files: {} }
+ this.offset = BigInt(0)
+ }
+
+ searchNodeFromDirectory (p) {
+ let json = this.header
+ const dirs = p.split(path.sep)
+ for (const dir of dirs) {
+ if (dir !== '.') {
+ json = json.files[dir]
+ }
+ }
+ return json
+ }
+
+ searchNodeFromPath (p) {
+ p = path.relative(this.src, p)
+ if (!p) { return this.header }
+ const name = path.basename(p)
+ const node = this.searchNodeFromDirectory(path.dirname(p))
+ if (node.files == null) {
+ node.files = {}
+ }
+ if (node.files[name] == null) {
+ node.files[name] = {}
+ }
+ return node.files[name]
+ }
+
+ insertDirectory (p, shouldUnpack) {
+ const node = this.searchNodeFromPath(p)
+ if (shouldUnpack) {
+ node.unpacked = shouldUnpack
+ }
+ node.files = {}
+ return node.files
+ }
+
+ async insertFile (p, shouldUnpack, file, options) {
+ const dirNode = this.searchNodeFromPath(path.dirname(p))
+ const node = this.searchNodeFromPath(p)
+ if (shouldUnpack || dirNode.unpacked) {
+ node.size = file.stat.size
+ node.unpacked = true
+ node.integrity = await getFileIntegrity(p)
+ return Promise.resolve()
+ }
+
+ let size
+
+ const transformed = options.transform && options.transform(p)
+ if (transformed) {
+ const tmpdir = await fs.mkdtemp(path.join(os.tmpdir(), 'asar-'))
+ const tmpfile = path.join(tmpdir, path.basename(p))
+ const out = fs.createWriteStream(tmpfile)
+ const readStream = fs.createReadStream(p)
+
+ await pipeline(readStream, transformed, out)
+ file.transformed = {
+ path: tmpfile,
+ stat: await fs.lstat(tmpfile)
+ }
+ size = file.transformed.stat.size
+ } else {
+ size = file.stat.size
+ }
+
+ // JavaScript cannot precisely present integers >= UINT32_MAX.
+ if (size > UINT32_MAX) {
+ throw new Error(`${p}: file size can not be larger than 4.2GB`)
+ }
+
+ node.size = size
+ node.offset = this.offset.toString()
+ node.integrity = await getFileIntegrity(p)
+ if (process.platform !== 'win32' && (file.stat.mode & 0o100)) {
+ node.executable = true
+ }
+ this.offset += BigInt(size)
+ }
+
+ insertLink (p) {
+ const link = path.relative(fs.realpathSync(this.src), fs.realpathSync(p))
+ if (link.substr(0, 2) === '..') {
+ throw new Error(`${p}: file "${link}" links out of the package`)
+ }
+ const node = this.searchNodeFromPath(p)
+ node.link = link
+ return link
+ }
+
+ listFiles (options) {
+ const files = []
+
+ const fillFilesFromMetadata = function (basePath, metadata) {
+ if (!metadata.files) {
+ return
+ }
+
+ for (const [childPath, childMetadata] of Object.entries(metadata.files)) {
+ const fullPath = path.join(basePath, childPath)
+ const packState = childMetadata.unpacked ? 'unpack' : 'pack '
+ files.push((options && options.isPack) ? `${packState} : ${fullPath}` : fullPath)
+ fillFilesFromMetadata(fullPath, childMetadata)
+ }
+ }
+
+ fillFilesFromMetadata('/', this.header)
+ return files
+ }
+
+ getNode (p) {
+ const node = this.searchNodeFromDirectory(path.dirname(p))
+ const name = path.basename(p)
+ if (name) {
+ return node.files[name]
+ } else {
+ return node
+ }
+ }
+
+ getFile (p, followLinks) {
+ followLinks = typeof followLinks === 'undefined' ? true : followLinks
+ const info = this.getNode(p)
+
+ // if followLinks is false we don't resolve symlinks
+ if (info.link && followLinks) {
+ return this.getFile(info.link)
+ } else {
+ return info
+ }
+ }
+}
+
+module.exports = Filesystem
diff --git a/node_modules/asar/lib/index.d.ts b/node_modules/asar/lib/index.d.ts
new file mode 100644
index 0000000..b3790ec
--- /dev/null
+++ b/node_modules/asar/lib/index.d.ts
@@ -0,0 +1,90 @@
+import { IOptions as GlobOptions } from 'glob';
+import { Stats } from 'fs';
+
+export type CreateOptions = {
+ dot?: boolean;
+ globOptions?: GlobOptions;
+ ordering?: string;
+ pattern?: string;
+ transform?: (filePath: string) => NodeJS.ReadWriteStream | void;
+ unpack?: string;
+ unpackDir?: string;
+};
+
+export type ListOptions = {
+ isPack: boolean;
+};
+
+export type EntryMetadata = {
+ unpacked: boolean;
+};
+
+export type DirectoryMetadata = EntryMetadata & {
+ files: { [property: string]: EntryMetadata };
+};
+
+export type FileMetadata = EntryMetadata & {
+ executable?: true;
+ offset?: number;
+ size?: number;
+};
+
+export type LinkMetadata = {
+ link: string;
+};
+
+export type Metadata = DirectoryMetadata | FileMetadata | LinkMetadata;
+
+export type InputMetadataType = 'directory' | 'file' | 'link';
+
+export type InputMetadata = {
+ [property: string]: {
+ type: InputMetadataType;
+ stat: Stats;
+ }
+};
+
+export type DirectoryRecord = {
+ files: Record<string, DirectoryRecord | FileRecord>;
+};
+
+export type FileRecord = {
+ offset: string;
+ size: number;
+ executable?: boolean;
+ integrity: {
+ hash: string;
+ algorithm: 'SHA256';
+ blocks: string[];
+ blockSize: number;
+ };
+}
+
+export type ArchiveHeader = {
+ // The JSON parsed header string
+ header: DirectoryRecord;
+ headerString: string;
+ headerSize: number;
+}
+
+export function createPackage(src: string, dest: string): Promise<void>;
+export function createPackageWithOptions(
+ src: string,
+ dest: string,
+ options: CreateOptions
+): Promise<void>;
+export function createPackageFromFiles(
+ src: string,
+ dest: string,
+ filenames: string[],
+ metadata?: InputMetadata,
+ options?: CreateOptions
+): Promise<void>;
+
+export function statFile(archive: string, filename: string, followLinks?: boolean): Metadata;
+export function getRawHeader(archive: string): ArchiveHeader;
+export function listPackage(archive: string, options?: ListOptions): string[];
+export function extractFile(archive: string, filename: string): Buffer;
+export function extractAll(archive: string, dest: string): void;
+export function uncache(archive: string): boolean;
+export function uncacheAll(): void;
diff --git a/node_modules/asar/lib/integrity.js b/node_modules/asar/lib/integrity.js
new file mode 100644
index 0000000..6fabee4
--- /dev/null
+++ b/node_modules/asar/lib/integrity.js
@@ -0,0 +1,62 @@
+const crypto = require('crypto')
+const fs = require('fs')
+const stream = require('stream')
+const { promisify } = require('util')
+
+const ALGORITHM = 'SHA256'
+// 4MB default block size
+const BLOCK_SIZE = 4 * 1024 * 1024
+
+const pipeline = promisify(stream.pipeline)
+
+function hashBlock (block) {
+ return crypto.createHash(ALGORITHM).update(block).digest('hex')
+}
+
+async function getFileIntegrity (path) {
+ const fileHash = crypto.createHash(ALGORITHM)
+
+ const blocks = []
+ let currentBlockSize = 0
+ let currentBlock = []
+
+ await pipeline(
+ fs.createReadStream(path),
+ new stream.PassThrough({
+ decodeStrings: false,
+ transform (_chunk, encoding, callback) {
+ fileHash.update(_chunk)
+
+ function handleChunk (chunk) {
+ const diffToSlice = Math.min(BLOCK_SIZE - currentBlockSize, chunk.byteLength)
+ currentBlockSize += diffToSlice
+ currentBlock.push(chunk.slice(0, diffToSlice))
+ if (currentBlockSize === BLOCK_SIZE) {
+ blocks.push(hashBlock(Buffer.concat(currentBlock)))
+ currentBlock = []
+ currentBlockSize = 0
+ }
+ if (diffToSlice < chunk.byteLength) {
+ handleChunk(chunk.slice(diffToSlice))
+ }
+ }
+ handleChunk(_chunk)
+ callback()
+ },
+ flush (callback) {
+ blocks.push(hashBlock(Buffer.concat(currentBlock)))
+ currentBlock = []
+ callback()
+ }
+ })
+ )
+
+ return {
+ algorithm: ALGORITHM,
+ hash: fileHash.digest('hex'),
+ blockSize: BLOCK_SIZE,
+ blocks: blocks
+ }
+}
+
+module.exports = getFileIntegrity
diff --git a/node_modules/asar/lib/wrapped-fs.js b/node_modules/asar/lib/wrapped-fs.js
new file mode 100644
index 0000000..24f59d0
--- /dev/null
+++ b/node_modules/asar/lib/wrapped-fs.js
@@ -0,0 +1,26 @@
+'use strict'
+
+const fs = process.versions.electron ? require('original-fs') : require('fs')
+
+const promisifiedMethods = [
+ 'lstat',
+ 'mkdtemp',
+ 'readFile',
+ 'stat',
+ 'writeFile'
+]
+
+const promisified = {}
+
+for (const method of Object.keys(fs)) {
+ if (promisifiedMethods.includes(method)) {
+ promisified[method] = fs.promises[method]
+ } else {
+ promisified[method] = fs[method]
+ }
+}
+// To make it more like fs-extra
+promisified.mkdirp = (dir) => fs.promises.mkdir(dir, { recursive: true })
+promisified.mkdirpSync = (dir) => fs.mkdirSync(dir, { recursive: true })
+
+module.exports = promisified
diff --git a/node_modules/asar/package.json b/node_modules/asar/package.json
new file mode 100644
index 0000000..0ad7009
--- /dev/null
+++ b/node_modules/asar/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "asar",
+ "description": "Creating Electron app packages",
+ "version": "3.2.0",
+ "main": "./lib/asar.js",
+ "types": "./lib/index.d.ts",
+ "bin": {
+ "asar": "./bin/asar.js"
+ },
+ "files": [
+ "bin",
+ "lib",
+ "lib/index.d.ts"
+ ],
+ "engines": {
+ "node": ">=10.12.0"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/electron/asar",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/electron/asar.git"
+ },
+ "bugs": {
+ "url": "https://github.com/electron/asar/issues"
+ },
+ "scripts": {
+ "mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec",
+ "test": "npm run lint && npm run mocha",
+ "lint": "tsd && standard",
+ "standard": "standard",
+ "tsd": "tsd"
+ },
+ "standard": {
+ "env": {
+ "mocha": true
+ },
+ "globals": [
+ "BigInt"
+ ]
+ },
+ "tsd": {
+ "directory": "test"
+ },
+ "dependencies": {
+ "chromium-pickle-js": "^0.2.0",
+ "commander": "^5.0.0",
+ "glob": "^7.1.6",
+ "minimatch": "^3.0.4"
+ },
+ "optionalDependencies": {
+ "@types/glob": "^7.1.1"
+ },
+ "devDependencies": {
+ "@continuous-auth/semantic-release-npm": "^2.0.0",
+ "@semantic-release/changelog": "^5.0.0",
+ "electron": "^5.0.0",
+ "electron-mocha": "^8.2.1",
+ "lodash": "^4.17.15",
+ "mocha": "^7.1.1",
+ "rimraf": "^3.0.2",
+ "semantic-release": "^17.0.4",
+ "standard": "^14.3.3",
+ "tsd": "^0.11.0",
+ "xvfb-maybe": "^0.2.1"
+ }
+}
diff --git a/node_modules/asn1/LICENSE b/node_modules/asn1/LICENSE
new file mode 100644
index 0000000..9b5dcdb
--- /dev/null
+++ b/node_modules/asn1/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Mark Cavage, All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE
diff --git a/node_modules/asn1/README.md b/node_modules/asn1/README.md
new file mode 100644
index 0000000..2208210
--- /dev/null
+++ b/node_modules/asn1/README.md
@@ -0,0 +1,50 @@
+node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.
+Currently BER encoding is supported; at some point I'll likely have to do DER.
+
+## Usage
+
+Mostly, if you're *actually* needing to read and write ASN.1, you probably don't
+need this readme to explain what and why. If you have no idea what ASN.1 is,
+see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
+
+The source is pretty much self-explanatory, and has read/write methods for the
+common types out there.
+
+### Decoding
+
+The following reads an ASN.1 sequence with a boolean.
+
+ var Ber = require('asn1').Ber;
+
+ var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff]));
+
+ reader.readSequence();
+ console.log('Sequence len: ' + reader.length);
+ if (reader.peek() === Ber.Boolean)
+ console.log(reader.readBoolean());
+
+### Encoding
+
+The following generates the same payload as above.
+
+ var Ber = require('asn1').Ber;
+
+ var writer = new Ber.Writer();
+
+ writer.startSequence();
+ writer.writeBoolean(true);
+ writer.endSequence();
+
+ console.log(writer.buffer);
+
+## Installation
+
+ npm install asn1
+
+## License
+
+MIT.
+
+## Bugs
+
+See <https://github.com/joyent/node-asn1/issues>.
diff --git a/node_modules/asn1/lib/ber/errors.js b/node_modules/asn1/lib/ber/errors.js
new file mode 100644
index 0000000..4557b8a
--- /dev/null
+++ b/node_modules/asn1/lib/ber/errors.js
@@ -0,0 +1,13 @@
+// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
+
+
+module.exports = {
+
+ newInvalidAsn1Error: function (msg) {
+ var e = new Error();
+ e.name = 'InvalidAsn1Error';
+ e.message = msg || '';
+ return e;
+ }
+
+};
diff --git a/node_modules/asn1/lib/ber/index.js b/node_modules/asn1/lib/ber/index.js
new file mode 100644
index 0000000..387d132
--- /dev/null
+++ b/node_modules/asn1/lib/ber/index.js
@@ -0,0 +1,27 @@
+// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
+
+var errors = require('./errors');
+var types = require('./types');
+
+var Reader = require('./reader');
+var Writer = require('./writer');
+
+
+// --- Exports
+
+module.exports = {
+
+ Reader: Reader,
+
+ Writer: Writer
+
+};
+
+for (var t in types) {
+ if (types.hasOwnProperty(t))
+ module.exports[t] = types[t];
+}
+for (var e in errors) {
+ if (errors.hasOwnProperty(e))
+ module.exports[e] = errors[e];
+}
diff --git a/node_modules/asn1/lib/ber/reader.js b/node_modules/asn1/lib/ber/reader.js
new file mode 100644
index 0000000..8a7e4ca
--- /dev/null
+++ b/node_modules/asn1/lib/ber/reader.js
@@ -0,0 +1,262 @@
+// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
+
+var assert = require('assert');
+var Buffer = require('safer-buffer').Buffer;
+
+var ASN1 = require('./types');
+var errors = require('./errors');
+
+
+// --- Globals
+
+var newInvalidAsn1Error = errors.newInvalidAsn1Error;
+
+
+
+// --- API
+
+function Reader(data) {
+ if (!data || !Buffer.isBuffer(data))
+ throw new TypeError('data must be a node Buffer');
+
+ this._buf = data;
+ this._size = data.length;
+
+ // These hold the "current" state
+ this._len = 0;
+ this._offset = 0;
+}
+
+Object.defineProperty(Reader.prototype, 'length', {
+ enumerable: true,
+ get: function () { return (this._len); }
+});
+
+Object.defineProperty(Reader.prototype, 'offset', {
+ enumerable: true,
+ get: function () { return (this._offset); }
+});
+
+Object.defineProperty(Reader.prototype, 'remain', {
+ get: function () { return (this._size - this._offset); }
+});
+
+Object.defineProperty(Reader.prototype, 'buffer', {
+ get: function () { return (this._buf.slice(this._offset)); }
+});
+
+
+/**
+ * Reads a single byte and advances offset; you can pass in `true` to make this
+ * a "peek" operation (i.e., get the byte, but don't advance the offset).
+ *
+ * @param {Boolean} peek true means don't move offset.
+ * @return {Number} the next byte, null if not enough data.
+ */
+Reader.prototype.readByte = function (peek) {
+ if (this._size - this._offset < 1)
+ return null;
+
+ var b = this._buf[this._offset] & 0xff;
+
+ if (!peek)
+ this._offset += 1;
+
+ return b;
+};
+
+
+Reader.prototype.peek = function () {
+ return this.readByte(true);
+};
+
+
+/**
+ * Reads a (potentially) variable length off the BER buffer. This call is
+ * not really meant to be called directly, as callers have to manipulate
+ * the internal buffer afterwards.
+ *
+ * As a result of this call, you can call `Reader.length`, until the
+ * next thing called that does a readLength.
+ *
+ * @return {Number} the amount of offset to advance the buffer.
+ * @throws {InvalidAsn1Error} on bad ASN.1
+ */
+Reader.prototype.readLength = function (offset) {
+ if (offset === undefined)
+ offset = this._offset;
+
+ if (offset >= this._size)
+ return null;
+
+ var lenB = this._buf[offset++] & 0xff;
+ if (lenB === null)
+ return null;
+
+ if ((lenB & 0x80) === 0x80) {
+ lenB &= 0x7f;
+
+ if (lenB === 0)
+ throw newInvalidAsn1Error('Indefinite length not supported');
+
+ if (lenB > 4)
+ throw newInvalidAsn1Error('encoding too long');
+
+ if (this._size - offset < lenB)
+ return null;
+
+ this._len = 0;
+ for (var i = 0; i < lenB; i++)
+ this._len = (this._len << 8) + (this._buf[offset++] & 0xff);
+
+ } else {
+ // Wasn't a variable length
+ this._len = lenB;
+ }
+
+ return offset;
+};
+
+
+/**
+ * Parses the next sequence in this BER buffer.
+ *
+ * To get the length of the sequence, call `Reader.length`.
+ *
+ * @return {Number} the sequence's tag.
+ */
+Reader.prototype.readSequence = function (tag) {
+ var seq = this.peek();
+ if (seq === null)
+ return null;
+ if (tag !== undefined && tag !== seq)
+ throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
+ ': got 0x' + seq.toString(16));
+
+ var o = this.readLength(this._offset + 1); // stored in `length`
+ if (o === null)
+ return null;
+
+ this._offset = o;
+ return seq;
+};
+
+
+Reader.prototype.readInt = function () {
+ return this._readTag(ASN1.Integer);
+};
+
+
+Reader.prototype.readBoolean = function () {
+ return (this._readTag(ASN1.Boolean) === 0 ? false : true);
+};
+
+
+Reader.prototype.readEnumeration = function () {
+ return this._readTag(ASN1.Enumeration);
+};
+
+
+Reader.prototype.readString = function (tag, retbuf) {
+ if (!tag)
+ tag = ASN1.OctetString;
+
+ var b = this.peek();
+ if (b === null)
+ return null;
+
+ if (b !== tag)
+ throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
+ ': got 0x' + b.toString(16));
+
+ var o = this.readLength(this._offset + 1); // stored in `length`
+
+ if (o === null)
+ return null;
+
+ if (this.length > this._size - o)
+ return null;
+
+ this._offset = o;
+
+ if (this.length === 0)
+ return retbuf ? Buffer.alloc(0) : '';
+
+ var str = this._buf.slice(this._offset, this._offset + this.length);
+ this._offset += this.length;
+
+ return retbuf ? str : str.toString('utf8');
+};
+
+Reader.prototype.readOID = function (tag) {
+ if (!tag)
+ tag = ASN1.OID;
+
+ var b = this.readString(tag, true);
+ if (b === null)
+ return null;
+
+ var values = [];
+ var value = 0;
+
+ for (var i = 0; i < b.length; i++) {
+ var byte = b[i] & 0xff;
+
+ value <<= 7;
+ value += byte & 0x7f;
+ if ((byte & 0x80) === 0) {
+ values.push(value);
+ value = 0;
+ }
+ }
+
+ value = values.shift();
+ values.unshift(value % 40);
+ values.unshift((value / 40) >> 0);
+
+ return values.join('.');
+};
+
+
+Reader.prototype._readTag = function (tag) {
+ assert.ok(tag !== undefined);
+
+ var b = this.peek();
+
+ if (b === null)
+ return null;
+
+ if (b !== tag)
+ throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
+ ': got 0x' + b.toString(16));
+
+ var o = this.readLength(this._offset + 1); // stored in `length`
+ if (o === null)
+ return null;
+
+ if (this.length > 4)
+ throw newInvalidAsn1Error('Integer too long: ' + this.length);
+
+ if (this.length > this._size - o)
+ return null;
+ this._offset = o;
+
+ var fb = this._buf[this._offset];
+ var value = 0;
+
+ for (var i = 0; i < this.length; i++) {
+ value <<= 8;
+ value |= (this._buf[this._offset++] & 0xff);
+ }
+
+ if ((fb & 0x80) === 0x80 && i !== 4)
+ value -= (1 << (i * 8));
+
+ return value >> 0;
+};
+
+
+
+// --- Exported API
+
+module.exports = Reader;
diff --git a/node_modules/asn1/lib/ber/types.js b/node_modules/asn1/lib/ber/types.js
new file mode 100644
index 0000000..8aea000
--- /dev/null
+++ b/node_modules/asn1/lib/ber/types.js
@@ -0,0 +1,36 @@
+// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
+
+
+module.exports = {
+ EOC: 0,
+ Boolean: 1,
+ Integer: 2,
+ BitString: 3,
+ OctetString: 4,
+ Null: 5,
+ OID: 6,
+ ObjectDescriptor: 7,
+ External: 8,
+ Real: 9, // float
+ Enumeration: 10,
+ PDV: 11,
+ Utf8String: 12,
+ RelativeOID: 13,
+ Sequence: 16,
+ Set: 17,
+ NumericString: 18,
+ PrintableString: 19,
+ T61String: 20,
+ VideotexString: 21,
+ IA5String: 22,
+ UTCTime: 23,
+ GeneralizedTime: 24,
+ GraphicString: 25,
+ VisibleString: 26,
+ GeneralString: 28,
+ UniversalString: 29,
+ CharacterString: 30,
+ BMPString: 31,
+ Constructor: 32,
+ Context: 128
+};
diff --git a/node_modules/asn1/lib/ber/writer.js b/node_modules/asn1/lib/ber/writer.js
new file mode 100644
index 0000000..3515acf
--- /dev/null
+++ b/node_modules/asn1/lib/ber/writer.js
@@ -0,0 +1,317 @@
+// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
+
+var assert = require('assert');
+var Buffer = require('safer-buffer').Buffer;
+var ASN1 = require('./types');
+var errors = require('./errors');
+
+
+// --- Globals
+
+var newInvalidAsn1Error = errors.newInvalidAsn1Error;
+
+var DEFAULT_OPTS = {
+ size: 1024,
+ growthFactor: 8
+};
+
+
+// --- Helpers
+
+function merge(from, to) {
+ assert.ok(from);
+ assert.equal(typeof (from), 'object');
+ assert.ok(to);
+ assert.equal(typeof (to), 'object');
+
+ var keys = Object.getOwnPropertyNames(from);
+ keys.forEach(function (key) {
+ if (to[key])
+ return;
+
+ var value = Object.getOwnPropertyDescriptor(from, key);
+ Object.defineProperty(to, key, value);
+ });
+
+ return to;
+}
+
+
+
+// --- API
+
+function Writer(options) {
+ options = merge(DEFAULT_OPTS, options || {});
+
+ this._buf = Buffer.alloc(options.size || 1024);
+ this._size = this._buf.length;
+ this._offset = 0;
+ this._options = options;
+
+ // A list of offsets in the buffer where we need to insert
+ // sequence tag/len pairs.
+ this._seq = [];
+}
+
+Object.defineProperty(Writer.prototype, 'buffer', {
+ get: function () {
+ if (this._seq.length)
+ throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)');
+
+ return (this._buf.slice(0, this._offset));
+ }
+});
+
+Writer.prototype.writeByte = function (b) {
+ if (typeof (b) !== 'number')
+ throw new TypeError('argument must be a Number');
+
+ this._ensure(1);
+ this._buf[this._offset++] = b;
+};
+
+
+Writer.prototype.writeInt = function (i, tag) {
+ if (typeof (i) !== 'number')
+ throw new TypeError('argument must be a Number');
+ if (typeof (tag) !== 'number')
+ tag = ASN1.Integer;
+
+ var sz = 4;
+
+ while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) &&
+ (sz > 1)) {
+ sz--;
+ i <<= 8;
+ }
+
+ if (sz > 4)
+ throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff');
+
+ this._ensure(2 + sz);
+ this._buf[this._offset++] = tag;
+ this._buf[this._offset++] = sz;
+
+ while (sz-- > 0) {
+ this._buf[this._offset++] = ((i & 0xff000000) >>> 24);
+ i <<= 8;
+ }
+
+};
+
+
+Writer.prototype.writeNull = function () {
+ this.writeByte(ASN1.Null);
+ this.writeByte(0x00);
+};
+
+
+Writer.prototype.writeEnumeration = function (i, tag) {
+ if (typeof (i) !== 'number')
+ throw new TypeError('argument must be a Number');
+ if (typeof (tag) !== 'number')
+ tag = ASN1.Enumeration;
+
+ return this.writeInt(i, tag);
+};
+
+
+Writer.prototype.writeBoolean = function (b, tag) {
+ if (typeof (b) !== 'boolean')
+ throw new TypeError('argument must be a Boolean');
+ if (typeof (tag) !== 'number')
+ tag = ASN1.Boolean;
+
+ this._ensure(3);
+ this._buf[this._offset++] = tag;
+ this._buf[this._offset++] = 0x01;
+ this._buf[this._offset++] = b ? 0xff : 0x00;
+};
+
+
+Writer.prototype.writeString = function (s, tag) {
+ if (typeof (s) !== 'string')
+ throw new TypeError('argument must be a string (was: ' + typeof (s) + ')');
+ if (typeof (tag) !== 'number')
+ tag = ASN1.OctetString;
+
+ var len = Buffer.byteLength(s);
+ this.writeByte(tag);
+ this.writeLength(len);
+ if (len) {
+ this._ensure(len);
+ this._buf.write(s, this._offset);
+ this._offset += len;
+ }
+};
+
+
+Writer.prototype.writeBuffer = function (buf, tag) {
+ if (typeof (tag) !== 'number')
+ throw new TypeError('tag must be a number');
+ if (!Buffer.isBuffer(buf))
+ throw new TypeError('argument must be a buffer');
+
+ this.writeByte(tag);
+ this.writeLength(buf.length);
+ this._ensure(buf.length);
+ buf.copy(this._buf, this._offset, 0, buf.length);
+ this._offset += buf.length;
+};
+
+
+Writer.prototype.writeStringArray = function (strings) {
+ if ((!strings instanceof Array))
+ throw new TypeError('argument must be an Array[String]');
+
+ var self = this;
+ strings.forEach(function (s) {
+ self.writeString(s);
+ });
+};
+
+// This is really to solve DER cases, but whatever for now
+Writer.prototype.writeOID = function (s, tag) {
+ if (typeof (s) !== 'string')
+ throw new TypeError('argument must be a string');
+ if (typeof (tag) !== 'number')
+ tag = ASN1.OID;
+
+ if (!/^([0-9]+\.){3,}[0-9]+$/.test(s))
+ throw new Error('argument is not a valid OID string');
+
+ function encodeOctet(bytes, octet) {
+ if (octet < 128) {
+ bytes.push(octet);
+ } else if (octet < 16384) {
+ bytes.push((octet >>> 7) | 0x80);
+ bytes.push(octet & 0x7F);
+ } else if (octet < 2097152) {
+ bytes.push((octet >>> 14) | 0x80);
+ bytes.push(((octet >>> 7) | 0x80) & 0xFF);
+ bytes.push(octet & 0x7F);
+ } else if (octet < 268435456) {
+ bytes.push((octet >>> 21) | 0x80);
+ bytes.push(((octet >>> 14) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 7) | 0x80) & 0xFF);
+ bytes.push(octet & 0x7F);
+ } else {
+ bytes.push(((octet >>> 28) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 21) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 14) | 0x80) & 0xFF);
+ bytes.push(((octet >>> 7) | 0x80) & 0xFF);
+ bytes.push(octet & 0x7F);
+ }
+ }
+
+ var tmp = s.split('.');
+ var bytes = [];
+ bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10));
+ tmp.slice(2).forEach(function (b) {
+ encodeOctet(bytes, parseInt(b, 10));
+ });
+
+ var self = this;
+ this._ensure(2 + bytes.length);
+ this.writeByte(tag);
+ this.writeLength(bytes.length);
+ bytes.forEach(function (b) {
+ self.writeByte(b);
+ });
+};
+
+
+Writer.prototype.writeLength = function (len) {
+ if (typeof (len) !== 'number')
+ throw new TypeError('argument must be a Number');
+
+ this._ensure(4);
+
+ if (len <= 0x7f) {
+ this._buf[this._offset++] = len;
+ } else if (len <= 0xff) {
+ this._buf[this._offset++] = 0x81;
+ this._buf[this._offset++] = len;
+ } else if (len <= 0xffff) {
+ this._buf[this._offset++] = 0x82;
+ this._buf[this._offset++] = len >> 8;
+ this._buf[this._offset++] = len;
+ } else if (len <= 0xffffff) {
+ this._buf[this._offset++] = 0x83;
+ this._buf[this._offset++] = len >> 16;
+ this._buf[this._offset++] = len >> 8;
+ this._buf[this._offset++] = len;
+ } else {
+ throw newInvalidAsn1Error('Length too long (> 4 bytes)');
+ }
+};
+
+Writer.prototype.startSequence = function (tag) {
+ if (typeof (tag) !== 'number')
+ tag = ASN1.Sequence | ASN1.Constructor;
+
+ this.writeByte(tag);
+ this._seq.push(this._offset);
+ this._ensure(3);
+ this._offset += 3;
+};
+
+
+Writer.prototype.endSequence = function () {
+ var seq = this._seq.pop();
+ var start = seq + 3;
+ var len = this._offset - start;
+
+ if (len <= 0x7f) {
+ this._shift(start, len, -2);
+ this._buf[seq] = len;
+ } else if (len <= 0xff) {
+ this._shift(start, len, -1);
+ this._buf[seq] = 0x81;
+ this._buf[seq + 1] = len;
+ } else if (len <= 0xffff) {
+ this._buf[seq] = 0x82;
+ this._buf[seq + 1] = len >> 8;
+ this._buf[seq + 2] = len;
+ } else if (len <= 0xffffff) {
+ this._shift(start, len, 1);
+ this._buf[seq] = 0x83;
+ this._buf[seq + 1] = len >> 16;
+ this._buf[seq + 2] = len >> 8;
+ this._buf[seq + 3] = len;
+ } else {
+ throw newInvalidAsn1Error('Sequence too long');
+ }
+};
+
+
+Writer.prototype._shift = function (start, len, shift) {
+ assert.ok(start !== undefined);
+ assert.ok(len !== undefined);
+ assert.ok(shift);
+
+ this._buf.copy(this._buf, start + shift, start, start + len);
+ this._offset += shift;
+};
+
+Writer.prototype._ensure = function (len) {
+ assert.ok(len);
+
+ if (this._size - this._offset < len) {
+ var sz = this._size * this._options.growthFactor;
+ if (sz - this._offset < len)
+ sz += len;
+
+ var buf = Buffer.alloc(sz);
+
+ this._buf.copy(buf, 0, 0, this._offset);
+ this._buf = buf;
+ this._size = sz;
+ }
+};
+
+
+
+// --- Exported API
+
+module.exports = Writer;
diff --git a/node_modules/asn1/lib/index.js b/node_modules/asn1/lib/index.js
new file mode 100644
index 0000000..ede3ab2
--- /dev/null
+++ b/node_modules/asn1/lib/index.js
@@ -0,0 +1,20 @@
+// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
+
+// If you have no idea what ASN.1 or BER is, see this:
+// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
+
+var Ber = require('./ber/index');
+
+
+
+// --- Exported API
+
+module.exports = {
+
+ Ber: Ber,
+
+ BerReader: Ber.Reader,
+
+ BerWriter: Ber.Writer
+
+};
diff --git a/node_modules/asn1/package.json b/node_modules/asn1/package.json
new file mode 100644
index 0000000..2b51c75
--- /dev/null
+++ b/node_modules/asn1/package.json
@@ -0,0 +1,31 @@
+{
+ "author": "Joyent (joyent.com)",
+ "contributors": [
+ "Mark Cavage <mcavage@gmail.com>",
+ "David Gwynne <loki@animata.net>",
+ "Yunong Xiao <yunong@joyent.com>",
+ "Alex Wilson <alex.wilson@joyent.com>"
+ ],
+ "name": "asn1",
+ "description": "Contains parsers and serializers for ASN.1 (currently BER only)",
+ "version": "0.2.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/joyent/node-asn1.git"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "safer-buffer": "~2.1.0"
+ },
+ "devDependencies": {
+ "istanbul": "^0.3.6",
+ "faucet": "0.0.1",
+ "tape": "^3.5.0",
+ "eslint": "2.13.1",
+ "eslint-plugin-joyent": "~1.3.0"
+ },
+ "scripts": {
+ "test": "./node_modules/.bin/tape ./test/ber/*.test.js"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/assert-plus/AUTHORS b/node_modules/assert-plus/AUTHORS
new file mode 100644
index 0000000..1923524
--- /dev/null
+++ b/node_modules/assert-plus/AUTHORS
@@ -0,0 +1,6 @@
+Dave Eddy <dave@daveeddy.com>
+Fred Kuo <fred.kuo@joyent.com>
+Lars-Magnus Skog <ralphtheninja@riseup.net>
+Mark Cavage <mcavage@gmail.com>
+Patrick Mooney <pmooney@pfmooney.com>
+Rob Gulewich <robert.gulewich@joyent.com>
diff --git a/node_modules/assert-plus/CHANGES.md b/node_modules/assert-plus/CHANGES.md
new file mode 100644
index 0000000..57d92bf
--- /dev/null
+++ b/node_modules/assert-plus/CHANGES.md
@@ -0,0 +1,14 @@
+# assert-plus Changelog
+
+## 1.0.0
+
+- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
+- Add assert.finite check. Previous assert.number callers should use this if
+ they expect Infinity inputs to throw.
+
+## 0.2.0
+
+- Fix `assert.object(null)` so it throws
+- Fix optional/arrayOf exports for non-type-of asserts
+- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
+- Add basic unit test coverage
diff --git a/node_modules/assert-plus/README.md b/node_modules/assert-plus/README.md
new file mode 100644
index 0000000..ec200d1
--- /dev/null
+++ b/node_modules/assert-plus/README.md
@@ -0,0 +1,162 @@
+# assert-plus
+
+This library is a super small wrapper over node's assert module that has two
+things: (1) the ability to disable assertions with the environment variable
+NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
+`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
+like this:
+
+```javascript
+ var assert = require('assert-plus');
+
+ function fooAccount(options, callback) {
+ assert.object(options, 'options');
+ assert.number(options.id, 'options.id');
+ assert.bool(options.isManager, 'options.isManager');
+ assert.string(options.name, 'options.name');
+ assert.arrayOfString(options.email, 'options.email');
+ assert.func(callback, 'callback');
+
+ // Do stuff
+ callback(null, {});
+ }
+```
+
+# API
+
+All methods that *aren't* part of node's core assert API are simply assumed to
+take an argument, and then a string 'name' that's not a message; `AssertionError`
+will be thrown if the assertion fails with a message like:
+
+ AssertionError: foo (string) is required
+ at test (/home/mark/work/foo/foo.js:3:9)
+ at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
+ at Module._compile (module.js:446:26)
+ at Object..js (module.js:464:10)
+ at Module.load (module.js:353:31)
+ at Function._load (module.js:311:12)
+ at Array.0 (module.js:484:10)
+ at EventEmitter._tickCallback (node.js:190:38)
+
+from:
+
+```javascript
+ function test(foo) {
+ assert.string(foo, 'foo');
+ }
+```
+
+There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
+
+```javascript
+ function test(foo) {
+ assert.arrayOfString(foo, 'foo');
+ }
+```
+
+You can assert IFF an argument is not `undefined` (i.e., an optional arg):
+
+```javascript
+ assert.optionalString(foo, 'foo');
+```
+
+Lastly, you can opt-out of assertion checking altogether by setting the
+environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
+lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
+production. Be advised: The standard functions re-exported from `assert` are
+also disabled in assert-plus if NDEBUG is specified. Using them directly from
+the `assert` module avoids this behavior.
+
+The complete list of APIs is:
+
+* assert.array
+* assert.bool
+* assert.buffer
+* assert.func
+* assert.number
+* assert.finite
+* assert.object
+* assert.string
+* assert.stream
+* assert.date
+* assert.regexp
+* assert.uuid
+* assert.arrayOfArray
+* assert.arrayOfBool
+* assert.arrayOfBuffer
+* assert.arrayOfFunc
+* assert.arrayOfNumber
+* assert.arrayOfFinite
+* assert.arrayOfObject
+* assert.arrayOfString
+* assert.arrayOfStream
+* assert.arrayOfDate
+* assert.arrayOfRegexp
+* assert.arrayOfUuid
+* assert.optionalArray
+* assert.optionalBool
+* assert.optionalBuffer
+* assert.optionalFunc
+* assert.optionalNumber
+* assert.optionalFinite
+* assert.optionalObject
+* assert.optionalString
+* assert.optionalStream
+* assert.optionalDate
+* assert.optionalRegexp
+* assert.optionalUuid
+* assert.optionalArrayOfArray
+* assert.optionalArrayOfBool
+* assert.optionalArrayOfBuffer
+* assert.optionalArrayOfFunc
+* assert.optionalArrayOfNumber
+* assert.optionalArrayOfFinite
+* assert.optionalArrayOfObject
+* assert.optionalArrayOfString
+* assert.optionalArrayOfStream
+* assert.optionalArrayOfDate
+* assert.optionalArrayOfRegexp
+* assert.optionalArrayOfUuid
+* assert.AssertionError
+* assert.fail
+* assert.ok
+* assert.equal
+* assert.notEqual
+* assert.deepEqual
+* assert.notDeepEqual
+* assert.strictEqual
+* assert.notStrictEqual
+* assert.throws
+* assert.doesNotThrow
+* assert.ifError
+
+# Installation
+
+ npm install assert-plus
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+## Bugs
+
+See <https://github.com/mcavage/node-assert-plus/issues>.
diff --git a/node_modules/assert-plus/assert.js b/node_modules/assert-plus/assert.js
new file mode 100644
index 0000000..26f944e
--- /dev/null
+++ b/node_modules/assert-plus/assert.js
@@ -0,0 +1,211 @@
+// Copyright (c) 2012, Mark Cavage. All rights reserved.
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert');
+var Stream = require('stream').Stream;
+var util = require('util');
+
+
+///--- Globals
+
+/* JSSTYLED */
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
+
+
+///--- Internal
+
+function _capitalize(str) {
+ return (str.charAt(0).toUpperCase() + str.slice(1));
+}
+
+function _toss(name, expected, oper, arg, actual) {
+ throw new assert.AssertionError({
+ message: util.format('%s (%s) is required', name, expected),
+ actual: (actual === undefined) ? typeof (arg) : actual(arg),
+ expected: expected,
+ operator: oper || '===',
+ stackStartFunction: _toss.caller
+ });
+}
+
+function _getClass(arg) {
+ return (Object.prototype.toString.call(arg).slice(8, -1));
+}
+
+function noop() {
+ // Why even bother with asserts?
+}
+
+
+///--- Exports
+
+var types = {
+ bool: {
+ check: function (arg) { return typeof (arg) === 'boolean'; }
+ },
+ func: {
+ check: function (arg) { return typeof (arg) === 'function'; }
+ },
+ string: {
+ check: function (arg) { return typeof (arg) === 'string'; }
+ },
+ object: {
+ check: function (arg) {
+ return typeof (arg) === 'object' && arg !== null;
+ }
+ },
+ number: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg);
+ }
+ },
+ finite: {
+ check: function (arg) {
+ return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
+ }
+ },
+ buffer: {
+ check: function (arg) { return Buffer.isBuffer(arg); },
+ operator: 'Buffer.isBuffer'
+ },
+ array: {
+ check: function (arg) { return Array.isArray(arg); },
+ operator: 'Array.isArray'
+ },
+ stream: {
+ check: function (arg) { return arg instanceof Stream; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ date: {
+ check: function (arg) { return arg instanceof Date; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ regexp: {
+ check: function (arg) { return arg instanceof RegExp; },
+ operator: 'instanceof',
+ actual: _getClass
+ },
+ uuid: {
+ check: function (arg) {
+ return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
+ },
+ operator: 'isUUID'
+ }
+};
+
+function _setExports(ndebug) {
+ var keys = Object.keys(types);
+ var out;
+
+ /* re-export standard assert */
+ if (process.env.NODE_NDEBUG) {
+ out = noop;
+ } else {
+ out = function (arg, msg) {
+ if (!arg) {
+ _toss(msg, 'true', arg);
+ }
+ };
+ }
+
+ /* standard checks */
+ keys.forEach(function (k) {
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ var type = types[k];
+ out[k] = function (arg, msg) {
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* optional checks */
+ keys.forEach(function (k) {
+ var name = 'optional' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!type.check(arg)) {
+ _toss(msg, k, type.operator, arg, type.actual);
+ }
+ };
+ });
+
+ /* arrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'arrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* optionalArrayOf checks */
+ keys.forEach(function (k) {
+ var name = 'optionalArrayOf' + _capitalize(k);
+ if (ndebug) {
+ out[name] = noop;
+ return;
+ }
+ var type = types[k];
+ var expected = '[' + k + ']';
+ out[name] = function (arg, msg) {
+ if (arg === undefined || arg === null) {
+ return;
+ }
+ if (!Array.isArray(arg)) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ var i;
+ for (i = 0; i < arg.length; i++) {
+ if (!type.check(arg[i])) {
+ _toss(msg, expected, type.operator, arg, type.actual);
+ }
+ }
+ };
+ });
+
+ /* re-export built-in assertions */
+ Object.keys(assert).forEach(function (k) {
+ if (k === 'AssertionError') {
+ out[k] = assert[k];
+ return;
+ }
+ if (ndebug) {
+ out[k] = noop;
+ return;
+ }
+ out[k] = assert[k];
+ });
+
+ /* export ourselves (for unit tests _only_) */
+ out._setExports = _setExports;
+
+ return out;
+}
+
+module.exports = _setExports(process.env.NODE_NDEBUG);
diff --git a/node_modules/assert-plus/package.json b/node_modules/assert-plus/package.json
new file mode 100644
index 0000000..40d6a5c
--- /dev/null
+++ b/node_modules/assert-plus/package.json
@@ -0,0 +1,23 @@
+{
+ "author": "Mark Cavage <mcavage@gmail.com>",
+ "name": "assert-plus",
+ "description": "Extra assertions on top of node's assert module",
+ "version": "1.0.0",
+ "license": "MIT",
+ "main": "./assert.js",
+ "devDependencies": {
+ "tape": "4.2.2",
+ "faucet": "0.0.1"
+ },
+ "optionalDependencies": {},
+ "scripts": {
+ "test": "./node_modules/.bin/tape tests/*.js | ./node_modules/.bin/faucet"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mcavage/node-assert-plus.git"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+}
diff --git a/node_modules/asynckit/LICENSE b/node_modules/asynckit/LICENSE
new file mode 100644
index 0000000..c9eca5d
--- /dev/null
+++ b/node_modules/asynckit/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Alex Indigo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/asynckit/README.md b/node_modules/asynckit/README.md
new file mode 100644
index 0000000..ddcc7e6
--- /dev/null
+++ b/node_modules/asynckit/README.md
@@ -0,0 +1,233 @@
+# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)
+
+Minimal async jobs utility library, with streams support.
+
+[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)
+[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)
+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)
+
+[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)
+[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)
+[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)
+
+<!-- [![Readme](https://img.shields.io/badge/readme-tested-brightgreen.svg?style=flat)](https://www.npmjs.com/package/reamde) -->
+
+AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.
+Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method.
+
+It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators.
+
+| compression | size |
+| :----------------- | -------: |
+| asynckit.js | 12.34 kB |
+| asynckit.min.js | 4.11 kB |
+| asynckit.min.js.gz | 1.47 kB |
+
+
+## Install
+
+```sh
+$ npm install --save asynckit
+```
+
+## Examples
+
+### Parallel Jobs
+
+Runs iterator over provided array in parallel. Stores output in the `result` array,
+on the matching positions. In unlikely event of an error from one of the jobs,
+will terminate rest of the active jobs (if abort function is provided)
+and return error along with salvaged data to the main callback function.
+
+#### Input Array
+
+```javascript
+var parallel = require('asynckit').parallel
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
+ , target = []
+ ;
+
+parallel(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// async job accepts one element from the array
+// and a callback function
+function asyncJob(item, cb)
+{
+ // different delays (in ms) per item
+ var delay = item * 25;
+
+ // pretend different jobs take different time to finish
+ // and not in consequential order
+ var timeoutId = setTimeout(function() {
+ target.push(item);
+ cb(null, item * 2);
+ }, delay);
+
+ // allow to cancel "leftover" jobs upon error
+ // return function, invoking of which will abort this job
+ return clearTimeout.bind(null, timeoutId);
+}
+```
+
+More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js).
+
+#### Input Object
+
+Also it supports named jobs, listed via object.
+
+```javascript
+var parallel = require('asynckit/parallel')
+ , assert = require('assert')
+ ;
+
+var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
+ , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ]
+ , target = []
+ , keys = []
+ ;
+
+parallel(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+ assert.deepEqual(keys, expectedKeys);
+});
+
+// supports full value, key, callback (shortcut) interface
+function asyncJob(item, key, cb)
+{
+ // different delays (in ms) per item
+ var delay = item * 25;
+
+ // pretend different jobs take different time to finish
+ // and not in consequential order
+ var timeoutId = setTimeout(function() {
+ keys.push(key);
+ target.push(item);
+ cb(null, item * 2);
+ }, delay);
+
+ // allow to cancel "leftover" jobs upon error
+ // return function, invoking of which will abort this job
+ return clearTimeout.bind(null, timeoutId);
+}
+```
+
+More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js).
+
+### Serial Jobs
+
+Runs iterator over provided array sequentially. Stores output in the `result` array,
+on the matching positions. In unlikely event of an error from one of the jobs,
+will not proceed to the rest of the items in the list
+and return error along with salvaged data to the main callback function.
+
+#### Input Array
+
+```javascript
+var serial = require('asynckit/serial')
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ , target = []
+ ;
+
+serial(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// extended interface (item, key, callback)
+// also supported for arrays
+function asyncJob(item, key, cb)
+{
+ target.push(key);
+
+ // it will be automatically made async
+ // even it iterator "returns" in the same event loop
+ cb(null, item * 2);
+}
+```
+
+More examples could be found in [test/test-serial-array.js](test/test-serial-array.js).
+
+#### Input Object
+
+Also it supports named jobs, listed via object.
+
+```javascript
+var serial = require('asynckit').serial
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ , target = []
+ ;
+
+var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
+ , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , target = []
+ ;
+
+
+serial(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// shortcut interface (item, callback)
+// works for object as well as for the arrays
+function asyncJob(item, cb)
+{
+ target.push(item);
+
+ // it will be automatically made async
+ // even it iterator "returns" in the same event loop
+ cb(null, item * 2);
+}
+```
+
+More examples could be found in [test/test-serial-object.js](test/test-serial-object.js).
+
+_Note: Since _object_ is an _unordered_ collection of properties,
+it may produce unexpected results with sequential iterations.
+Whenever order of the jobs' execution is important please use `serialOrdered` method._
+
+### Ordered Serial Iterations
+
+TBD
+
+For example [compare-property](compare-property) package.
+
+### Streaming interface
+
+TBD
+
+## Want to Know More?
+
+More examples can be found in [test folder](test/).
+
+Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions.
+
+## License
+
+AsyncKit is licensed under the MIT license.
diff --git a/node_modules/asynckit/bench.js b/node_modules/asynckit/bench.js
new file mode 100644
index 0000000..c612f1a
--- /dev/null
+++ b/node_modules/asynckit/bench.js
@@ -0,0 +1,76 @@
+/* eslint no-console: "off" */
+
+var asynckit = require('./')
+ , async = require('async')
+ , assert = require('assert')
+ , expected = 0
+ ;
+
+var Benchmark = require('benchmark');
+var suite = new Benchmark.Suite;
+
+var source = [];
+for (var z = 1; z < 100; z++)
+{
+ source.push(z);
+ expected += z;
+}
+
+suite
+// add tests
+
+.add('async.map', function(deferred)
+{
+ var total = 0;
+
+ async.map(source,
+ function(i, cb)
+ {
+ setImmediate(function()
+ {
+ total += i;
+ cb(null, total);
+ });
+ },
+ function(err, result)
+ {
+ assert.ifError(err);
+ assert.equal(result[result.length - 1], expected);
+ deferred.resolve();
+ });
+}, {'defer': true})
+
+
+.add('asynckit.parallel', function(deferred)
+{
+ var total = 0;
+
+ asynckit.parallel(source,
+ function(i, cb)
+ {
+ setImmediate(function()
+ {
+ total += i;
+ cb(null, total);
+ });
+ },
+ function(err, result)
+ {
+ assert.ifError(err);
+ assert.equal(result[result.length - 1], expected);
+ deferred.resolve();
+ });
+}, {'defer': true})
+
+
+// add listeners
+.on('cycle', function(ev)
+{
+ console.log(String(ev.target));
+})
+.on('complete', function()
+{
+ console.log('Fastest is ' + this.filter('fastest').map('name'));
+})
+// run async
+.run({ 'async': true });
diff --git a/node_modules/asynckit/index.js b/node_modules/asynckit/index.js
new file mode 100644
index 0000000..455f945
--- /dev/null
+++ b/node_modules/asynckit/index.js
@@ -0,0 +1,6 @@
+module.exports =
+{
+ parallel : require('./parallel.js'),
+ serial : require('./serial.js'),
+ serialOrdered : require('./serialOrdered.js')
+};
diff --git a/node_modules/asynckit/lib/abort.js b/node_modules/asynckit/lib/abort.js
new file mode 100644
index 0000000..114367e
--- /dev/null
+++ b/node_modules/asynckit/lib/abort.js
@@ -0,0 +1,29 @@
+// API
+module.exports = abort;
+
+/**
+ * Aborts leftover active jobs
+ *
+ * @param {object} state - current state object
+ */
+function abort(state)
+{
+ Object.keys(state.jobs).forEach(clean.bind(state));
+
+ // reset leftover jobs
+ state.jobs = {};
+}
+
+/**
+ * Cleans up leftover job by invoking abort function for the provided job id
+ *
+ * @this state
+ * @param {string|number} key - job id to abort
+ */
+function clean(key)
+{
+ if (typeof this.jobs[key] == 'function')
+ {
+ this.jobs[key]();
+ }
+}
diff --git a/node_modules/asynckit/lib/async.js b/node_modules/asynckit/lib/async.js
new file mode 100644
index 0000000..7f1288a
--- /dev/null
+++ b/node_modules/asynckit/lib/async.js
@@ -0,0 +1,34 @@
+var defer = require('./defer.js');
+
+// API
+module.exports = async;
+
+/**
+ * Runs provided callback asynchronously
+ * even if callback itself is not
+ *
+ * @param {function} callback - callback to invoke
+ * @returns {function} - augmented callback
+ */
+function async(callback)
+{
+ var isAsync = false;
+
+ // check if async happened
+ defer(function() { isAsync = true; });
+
+ return function async_callback(err, result)
+ {
+ if (isAsync)
+ {
+ callback(err, result);
+ }
+ else
+ {
+ defer(function nextTick_callback()
+ {
+ callback(err, result);
+ });
+ }
+ };
+}
diff --git a/node_modules/asynckit/lib/defer.js b/node_modules/asynckit/lib/defer.js
new file mode 100644
index 0000000..b67110c
--- /dev/null
+++ b/node_modules/asynckit/lib/defer.js
@@ -0,0 +1,26 @@
+module.exports = defer;
+
+/**
+ * Runs provided function on next iteration of the event loop
+ *
+ * @param {function} fn - function to run
+ */
+function defer(fn)
+{
+ var nextTick = typeof setImmediate == 'function'
+ ? setImmediate
+ : (
+ typeof process == 'object' && typeof process.nextTick == 'function'
+ ? process.nextTick
+ : null
+ );
+
+ if (nextTick)
+ {
+ nextTick(fn);
+ }
+ else
+ {
+ setTimeout(fn, 0);
+ }
+}
diff --git a/node_modules/asynckit/lib/iterate.js b/node_modules/asynckit/lib/iterate.js
new file mode 100644
index 0000000..5d2839a
--- /dev/null
+++ b/node_modules/asynckit/lib/iterate.js
@@ -0,0 +1,75 @@
+var async = require('./async.js')
+ , abort = require('./abort.js')
+ ;
+
+// API
+module.exports = iterate;
+
+/**
+ * Iterates over each job object
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {object} state - current job status
+ * @param {function} callback - invoked when all elements processed
+ */
+function iterate(list, iterator, state, callback)
+{
+ // store current index
+ var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
+
+ state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
+ {
+ // don't repeat yourself
+ // skip secondary callbacks
+ if (!(key in state.jobs))
+ {
+ return;
+ }
+
+ // clean up jobs
+ delete state.jobs[key];
+
+ if (error)
+ {
+ // don't process rest of the results
+ // stop still active jobs
+ // and reset the list
+ abort(state);
+ }
+ else
+ {
+ state.results[key] = output;
+ }
+
+ // return salvaged results
+ callback(error, state.results);
+ });
+}
+
+/**
+ * Runs iterator over provided job element
+ *
+ * @param {function} iterator - iterator to invoke
+ * @param {string|number} key - key/index of the element in the list of jobs
+ * @param {mixed} item - job description
+ * @param {function} callback - invoked after iterator is done with the job
+ * @returns {function|mixed} - job abort function or something else
+ */
+function runJob(iterator, key, item, callback)
+{
+ var aborter;
+
+ // allow shortcut if iterator expects only two arguments
+ if (iterator.length == 2)
+ {
+ aborter = iterator(item, async(callback));
+ }
+ // otherwise go with full three arguments
+ else
+ {
+ aborter = iterator(item, key, async(callback));
+ }
+
+ return aborter;
+}
diff --git a/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/asynckit/lib/readable_asynckit.js
new file mode 100644
index 0000000..78ad240
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_asynckit.js
@@ -0,0 +1,91 @@
+var streamify = require('./streamify.js')
+ , defer = require('./defer.js')
+ ;
+
+// API
+module.exports = ReadableAsyncKit;
+
+/**
+ * Base constructor for all streams
+ * used to hold properties/methods
+ */
+function ReadableAsyncKit()
+{
+ ReadableAsyncKit.super_.apply(this, arguments);
+
+ // list of active jobs
+ this.jobs = {};
+
+ // add stream methods
+ this.destroy = destroy;
+ this._start = _start;
+ this._read = _read;
+}
+
+/**
+ * Destroys readable stream,
+ * by aborting outstanding jobs
+ *
+ * @returns {void}
+ */
+function destroy()
+{
+ if (this.destroyed)
+ {
+ return;
+ }
+
+ this.destroyed = true;
+
+ if (typeof this.terminator == 'function')
+ {
+ this.terminator();
+ }
+}
+
+/**
+ * Starts provided jobs in async manner
+ *
+ * @private
+ */
+function _start()
+{
+ // first argument – runner function
+ var runner = arguments[0]
+ // take away first argument
+ , args = Array.prototype.slice.call(arguments, 1)
+ // second argument - input data
+ , input = args[0]
+ // last argument - result callback
+ , endCb = streamify.callback.call(this, args[args.length - 1])
+ ;
+
+ args[args.length - 1] = endCb;
+ // third argument - iterator
+ args[1] = streamify.iterator.call(this, args[1]);
+
+ // allow time for proper setup
+ defer(function()
+ {
+ if (!this.destroyed)
+ {
+ this.terminator = runner.apply(null, args);
+ }
+ else
+ {
+ endCb(null, Array.isArray(input) ? [] : {});
+ }
+ }.bind(this));
+}
+
+
+/**
+ * Implement _read to comply with Readable streams
+ * Doesn't really make sense for flowing object mode
+ *
+ * @private
+ */
+function _read()
+{
+
+}
diff --git a/node_modules/asynckit/lib/readable_parallel.js b/node_modules/asynckit/lib/readable_parallel.js
new file mode 100644
index 0000000..5d2929f
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_parallel.js
@@ -0,0 +1,25 @@
+var parallel = require('../parallel.js');
+
+// API
+module.exports = ReadableParallel;
+
+/**
+ * Streaming wrapper to `asynckit.parallel`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableParallel(list, iterator, callback)
+{
+ if (!(this instanceof ReadableParallel))
+ {
+ return new ReadableParallel(list, iterator, callback);
+ }
+
+ // turn on object mode
+ ReadableParallel.super_.call(this, {objectMode: true});
+
+ this._start(parallel, list, iterator, callback);
+}
diff --git a/node_modules/asynckit/lib/readable_serial.js b/node_modules/asynckit/lib/readable_serial.js
new file mode 100644
index 0000000..7822698
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_serial.js
@@ -0,0 +1,25 @@
+var serial = require('../serial.js');
+
+// API
+module.exports = ReadableSerial;
+
+/**
+ * Streaming wrapper to `asynckit.serial`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableSerial(list, iterator, callback)
+{
+ if (!(this instanceof ReadableSerial))
+ {
+ return new ReadableSerial(list, iterator, callback);
+ }
+
+ // turn on object mode
+ ReadableSerial.super_.call(this, {objectMode: true});
+
+ this._start(serial, list, iterator, callback);
+}
diff --git a/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/asynckit/lib/readable_serial_ordered.js
new file mode 100644
index 0000000..3de89c4
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_serial_ordered.js
@@ -0,0 +1,29 @@
+var serialOrdered = require('../serialOrdered.js');
+
+// API
+module.exports = ReadableSerialOrdered;
+// expose sort helpers
+module.exports.ascending = serialOrdered.ascending;
+module.exports.descending = serialOrdered.descending;
+
+/**
+ * Streaming wrapper to `asynckit.serialOrdered`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} sortMethod - custom sort function
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableSerialOrdered(list, iterator, sortMethod, callback)
+{
+ if (!(this instanceof ReadableSerialOrdered))
+ {
+ return new ReadableSerialOrdered(list, iterator, sortMethod, callback);
+ }
+
+ // turn on object mode
+ ReadableSerialOrdered.super_.call(this, {objectMode: true});
+
+ this._start(serialOrdered, list, iterator, sortMethod, callback);
+}
diff --git a/node_modules/asynckit/lib/state.js b/node_modules/asynckit/lib/state.js
new file mode 100644
index 0000000..cbea7ad
--- /dev/null
+++ b/node_modules/asynckit/lib/state.js
@@ -0,0 +1,37 @@
+// API
+module.exports = state;
+
+/**
+ * Creates initial state object
+ * for iteration over list
+ *
+ * @param {array|object} list - list to iterate over
+ * @param {function|null} sortMethod - function to use for keys sort,
+ * or `null` to keep them as is
+ * @returns {object} - initial state object
+ */
+function state(list, sortMethod)
+{
+ var isNamedList = !Array.isArray(list)
+ , initState =
+ {
+ index : 0,
+ keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
+ jobs : {},
+ results : isNamedList ? {} : [],
+ size : isNamedList ? Object.keys(list).length : list.length
+ }
+ ;
+
+ if (sortMethod)
+ {
+ // sort array keys based on it's values
+ // sort object's keys just on own merit
+ initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
+ {
+ return sortMethod(list[a], list[b]);
+ });
+ }
+
+ return initState;
+}
diff --git a/node_modules/asynckit/lib/streamify.js b/node_modules/asynckit/lib/streamify.js
new file mode 100644
index 0000000..f56a1c9
--- /dev/null
+++ b/node_modules/asynckit/lib/streamify.js
@@ -0,0 +1,141 @@
+var async = require('./async.js');
+
+// API
+module.exports = {
+ iterator: wrapIterator,
+ callback: wrapCallback
+};
+
+/**
+ * Wraps iterators with long signature
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} iterator - function to wrap
+ * @returns {function} - wrapped function
+ */
+function wrapIterator(iterator)
+{
+ var stream = this;
+
+ return function(item, key, cb)
+ {
+ var aborter
+ , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key))
+ ;
+
+ stream.jobs[key] = wrappedCb;
+
+ // it's either shortcut (item, cb)
+ if (iterator.length == 2)
+ {
+ aborter = iterator(item, wrappedCb);
+ }
+ // or long format (item, key, cb)
+ else
+ {
+ aborter = iterator(item, key, wrappedCb);
+ }
+
+ return aborter;
+ };
+}
+
+/**
+ * Wraps provided callback function
+ * allowing to execute snitch function before
+ * real callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} callback - function to wrap
+ * @returns {function} - wrapped function
+ */
+function wrapCallback(callback)
+{
+ var stream = this;
+
+ var wrapped = function(error, result)
+ {
+ return finisher.call(stream, error, result, callback);
+ };
+
+ return wrapped;
+}
+
+/**
+ * Wraps provided iterator callback function
+ * makes sure snitch only called once,
+ * but passes secondary calls to the original callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} callback - callback to wrap
+ * @param {number|string} key - iteration key
+ * @returns {function} wrapped callback
+ */
+function wrapIteratorCallback(callback, key)
+{
+ var stream = this;
+
+ return function(error, output)
+ {
+ // don't repeat yourself
+ if (!(key in stream.jobs))
+ {
+ callback(error, output);
+ return;
+ }
+
+ // clean up jobs
+ delete stream.jobs[key];
+
+ return streamer.call(stream, error, {key: key, value: output}, callback);
+ };
+}
+
+/**
+ * Stream wrapper for iterator callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {mixed} error - error response
+ * @param {mixed} output - iterator output
+ * @param {function} callback - callback that expects iterator results
+ */
+function streamer(error, output, callback)
+{
+ if (error && !this.error)
+ {
+ this.error = error;
+ this.pause();
+ this.emit('error', error);
+ // send back value only, as expected
+ callback(error, output && output.value);
+ return;
+ }
+
+ // stream stuff
+ this.push(output);
+
+ // back to original track
+ // send back value only, as expected
+ callback(error, output && output.value);
+}
+
+/**
+ * Stream wrapper for finishing callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {mixed} error - error response
+ * @param {mixed} output - iterator output
+ * @param {function} callback - callback that expects final results
+ */
+function finisher(error, output, callback)
+{
+ // signal end of the stream
+ // only for successfully finished streams
+ if (!error)
+ {
+ this.push(null);
+ }
+
+ // back to original track
+ callback(error, output);
+}
diff --git a/node_modules/asynckit/lib/terminator.js b/node_modules/asynckit/lib/terminator.js
new file mode 100644
index 0000000..d6eb992
--- /dev/null
+++ b/node_modules/asynckit/lib/terminator.js
@@ -0,0 +1,29 @@
+var abort = require('./abort.js')
+ , async = require('./async.js')
+ ;
+
+// API
+module.exports = terminator;
+
+/**
+ * Terminates jobs in the attached state context
+ *
+ * @this AsyncKitState#
+ * @param {function} callback - final callback to invoke after termination
+ */
+function terminator(callback)
+{
+ if (!Object.keys(this.jobs).length)
+ {
+ return;
+ }
+
+ // fast forward iteration index
+ this.index = this.size;
+
+ // abort jobs
+ abort(this);
+
+ // send back results we have so far
+ async(callback)(null, this.results);
+}
diff --git a/node_modules/asynckit/package.json b/node_modules/asynckit/package.json
new file mode 100644
index 0000000..51147d6
--- /dev/null
+++ b/node_modules/asynckit/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "asynckit",
+ "version": "0.4.0",
+ "description": "Minimal async jobs utility library, with streams support",
+ "main": "index.js",
+ "scripts": {
+ "clean": "rimraf coverage",
+ "lint": "eslint *.js lib/*.js test/*.js",
+ "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec",
+ "win-test": "tape test/test-*.js",
+ "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec",
+ "report": "istanbul report",
+ "size": "browserify index.js | size-table asynckit",
+ "debug": "tape test/test-*.js"
+ },
+ "pre-commit": [
+ "clean",
+ "lint",
+ "test",
+ "browser",
+ "report",
+ "size"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/alexindigo/asynckit.git"
+ },
+ "keywords": [
+ "async",
+ "jobs",
+ "parallel",
+ "serial",
+ "iterator",
+ "array",
+ "object",
+ "stream",
+ "destroy",
+ "terminate",
+ "abort"
+ ],
+ "author": "Alex Indigo <iam@alexindigo.com>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/alexindigo/asynckit/issues"
+ },
+ "homepage": "https://github.com/alexindigo/asynckit#readme",
+ "devDependencies": {
+ "browserify": "^13.0.0",
+ "browserify-istanbul": "^2.0.0",
+ "coveralls": "^2.11.9",
+ "eslint": "^2.9.0",
+ "istanbul": "^0.4.3",
+ "obake": "^0.1.2",
+ "phantomjs-prebuilt": "^2.1.7",
+ "pre-commit": "^1.1.3",
+ "reamde": "^1.1.0",
+ "rimraf": "^2.5.2",
+ "size-table": "^0.2.0",
+ "tap-spec": "^4.1.1",
+ "tape": "^4.5.1"
+ },
+ "dependencies": {}
+}
diff --git a/node_modules/asynckit/parallel.js b/node_modules/asynckit/parallel.js
new file mode 100644
index 0000000..3c50344
--- /dev/null
+++ b/node_modules/asynckit/parallel.js
@@ -0,0 +1,43 @@
+var iterate = require('./lib/iterate.js')
+ , initState = require('./lib/state.js')
+ , terminator = require('./lib/terminator.js')
+ ;
+
+// Public API
+module.exports = parallel;
+
+/**
+ * Runs iterator over provided array elements in parallel
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function parallel(list, iterator, callback)
+{
+ var state = initState(list);
+
+ while (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, function(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
+
+ // looks like it's the last one
+ if (Object.keys(state.jobs).length === 0)
+ {
+ callback(null, state.results);
+ return;
+ }
+ });
+
+ state.index++;
+ }
+
+ return terminator.bind(state, callback);
+}
diff --git a/node_modules/asynckit/serial.js b/node_modules/asynckit/serial.js
new file mode 100644
index 0000000..6cd949a
--- /dev/null
+++ b/node_modules/asynckit/serial.js
@@ -0,0 +1,17 @@
+var serialOrdered = require('./serialOrdered.js');
+
+// Public API
+module.exports = serial;
+
+/**
+ * Runs iterator over provided array elements in series
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function serial(list, iterator, callback)
+{
+ return serialOrdered(list, iterator, null, callback);
+}
diff --git a/node_modules/asynckit/serialOrdered.js b/node_modules/asynckit/serialOrdered.js
new file mode 100644
index 0000000..607eafe
--- /dev/null
+++ b/node_modules/asynckit/serialOrdered.js
@@ -0,0 +1,75 @@
+var iterate = require('./lib/iterate.js')
+ , initState = require('./lib/state.js')
+ , terminator = require('./lib/terminator.js')
+ ;
+
+// Public API
+module.exports = serialOrdered;
+// sorting helpers
+module.exports.ascending = ascending;
+module.exports.descending = descending;
+
+/**
+ * Runs iterator over provided sorted array elements in series
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} sortMethod - custom sort function
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function serialOrdered(list, iterator, sortMethod, callback)
+{
+ var state = initState(list, sortMethod);
+
+ iterate(list, iterator, state, function iteratorHandler(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
+
+ state.index++;
+
+ // are we there yet?
+ if (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, iteratorHandler);
+ return;
+ }
+
+ // done here
+ callback(null, state.results);
+ });
+
+ return terminator.bind(state, callback);
+}
+
+/*
+ * -- Sort methods
+ */
+
+/**
+ * sort helper to sort array elements in ascending order
+ *
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
+ */
+function ascending(a, b)
+{
+ return a < b ? -1 : a > b ? 1 : 0;
+}
+
+/**
+ * sort helper to sort array elements in descending order
+ *
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
+ */
+function descending(a, b)
+{
+ return -1 * ascending(a, b);
+}
diff --git a/node_modules/asynckit/stream.js b/node_modules/asynckit/stream.js
new file mode 100644
index 0000000..d43465f
--- /dev/null
+++ b/node_modules/asynckit/stream.js
@@ -0,0 +1,21 @@
+var inherits = require('util').inherits
+ , Readable = require('stream').Readable
+ , ReadableAsyncKit = require('./lib/readable_asynckit.js')
+ , ReadableParallel = require('./lib/readable_parallel.js')
+ , ReadableSerial = require('./lib/readable_serial.js')
+ , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js')
+ ;
+
+// API
+module.exports =
+{
+ parallel : ReadableParallel,
+ serial : ReadableSerial,
+ serialOrdered : ReadableSerialOrdered,
+};
+
+inherits(ReadableAsyncKit, Readable);
+
+inherits(ReadableParallel, ReadableAsyncKit);
+inherits(ReadableSerial, ReadableAsyncKit);
+inherits(ReadableSerialOrdered, ReadableAsyncKit);
diff --git a/node_modules/at-least-node/LICENSE b/node_modules/at-least-node/LICENSE
new file mode 100644
index 0000000..5e29ccc
--- /dev/null
+++ b/node_modules/at-least-node/LICENSE
@@ -0,0 +1,6 @@
+The ISC License
+Copyright (c) 2020 Ryan Zimmerman <opensrc@ryanzim.com>
+
+Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/at-least-node/README.md b/node_modules/at-least-node/README.md
new file mode 100644
index 0000000..fd6e514
--- /dev/null
+++ b/node_modules/at-least-node/README.md
@@ -0,0 +1,25 @@
+# at-least-node
+
+![npm](https://img.shields.io/npm/v/at-least-node)
+![node](https://img.shields.io/node/v/at-least-node)
+![NPM](https://img.shields.io/npm/l/at-least-node)
+
+Sometimes you need to check if you're on _at least_ a given Node.js version, but you don't want to pull in the whole [`semver`](https://www.npmjs.com/package/semver) kitchen sink. That's what `at-least-node` is for.
+
+| Package | Size |
+| --------------- | ------- |
+| `at-least-node` | 2.6 kB |
+| `semver` | 75.5 kB |
+
+```js
+const atLeastNode = require('at-least-node')
+atLeastNode('10.12.0')
+// -> true on Node 10.12.0+, false on anything below that
+```
+
+When passing in a version string:
+
+- You cannot include a leading `v` (i.e. `v10.12.0`)
+- You cannot omit sections (i.e. `10.12`)
+- You cannot use pre-releases (i.e. `1.0.0-beta`)
+- There is no input validation, if you make a mistake, the resulting behavior is undefined
diff --git a/node_modules/at-least-node/index.js b/node_modules/at-least-node/index.js
new file mode 100644
index 0000000..974a2fa
--- /dev/null
+++ b/node_modules/at-least-node/index.js
@@ -0,0 +1,5 @@
+module.exports = r => {
+ const n = process.versions.node.split('.').map(x => parseInt(x, 10))
+ r = r.split('.').map(x => parseInt(x, 10))
+ return n[0] > r[0] || (n[0] === r[0] && (n[1] > r[1] || (n[1] === r[1] && n[2] >= r[2])))
+}
diff --git a/node_modules/at-least-node/package.json b/node_modules/at-least-node/package.json
new file mode 100644
index 0000000..2c13641
--- /dev/null
+++ b/node_modules/at-least-node/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "at-least-node",
+ "version": "1.0.0",
+ "description": "Lightweight Node.js version sniffing/comparison",
+ "keywords": [
+ "semver",
+ "feature"
+ ],
+ "homepage": "https://github.com/RyanZim/at-least-node#readme",
+ "bugs": {
+ "url": "https://github.com/RyanZim/at-least-node/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/RyanZim/at-least-node.git"
+ },
+ "license": "ISC",
+ "author": "Ryan Zimmerman <opensrc@ryanzim.com>",
+ "main": "index.js",
+ "files": [],
+ "scripts": {
+ "test": "ava"
+ },
+ "devDependencies": {
+ "ava": "^3.1.0",
+ "rewire": "^4.0.1",
+ "semver": "^7.1.2"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+}
diff --git a/node_modules/author-regex/LICENSE b/node_modules/author-regex/LICENSE
new file mode 100644
index 0000000..9bd36fe
--- /dev/null
+++ b/node_modules/author-regex/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2014 Jon Schlinkert, 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/author-regex/README.md b/node_modules/author-regex/README.md
new file mode 100644
index 0000000..129534c
--- /dev/null
+++ b/node_modules/author-regex/README.md
@@ -0,0 +1,69 @@
+# author-regex [![NPM version](https://badge.fury.io/js/author-regex.svg)](http://badge.fury.io/js/author-regex)
+
+
+> Regular expression for parsing an `author` string into an object following npm conventions.
+
+This the regex used by [parse-authors](https://github.com/jonschlinkert/parse-authors).
+
+
+**Related**
+
+ - [parse-author](https://github.com/jonschlinkert/parse-author)
+ - [parse-authors](https://github.com/jonschlinkert/parse-authors)
+
+
+## Install
+#### Install with [npm](npmjs.org)
+
+```bash
+npm i author-regex --save
+```
+#### Install with [bower](https://github.com/bower/bower)
+
+```bash
+bower install author-regex --save
+```
+
+## Tests
+
+Run
+
+```bash
+npm test
+```
+
+## Usage
+
+```js
+var re = require('author-regex');
+
+function authors(str) {
+ return re().exec(str);
+}
+console.log(author('Jon Schlinkert <foo@bar.com> (https://github.com/jonschlinkert)'));
+```
+Returns:
+
+```js
+[ 'Jon Schlinkert <foo@bar.com> (https://github.com/jonschlinkert)',
+ 'Jon Schlinkert',
+ 'foo@bar.com',
+ 'https://github.com/jonschlinkert',
+ index: 0,
+ input: 'Jon Schlinkert <foo@bar.com> (https://github.com/jonschlinkert)' ]
+```
+
+## Author
+
+**Jon Schlinkert**
+
++ [github/jonschlinkert](https://github.com/jonschlinkert)
++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+
+## License
+Copyright (c) 2014 Jon Schlinkert, contributors.
+Released under the MIT license
+
+***
+
+_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 29, 2014._ \ No newline at end of file
diff --git a/node_modules/author-regex/index.js b/node_modules/author-regex/index.js
new file mode 100644
index 0000000..4d76730
--- /dev/null
+++ b/node_modules/author-regex/index.js
@@ -0,0 +1,13 @@
+/*!
+ * author-regex <https://github.com/jonschlinkert/author-regex>
+ *
+ * Copyright (c) 2014, 2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+module.exports = function() {
+ return /^\s*([^<(]*?)\s*([<(]([^>)]*?)[>)])?\s*([<(]([^>)]*?)[>)])*\s*$/;
+};
+
diff --git a/node_modules/author-regex/package.json b/node_modules/author-regex/package.json
new file mode 100644
index 0000000..3a22c96
--- /dev/null
+++ b/node_modules/author-regex/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "author-regex",
+ "description": "Regular expression for parsing an `author` string into an object following npm conventions.",
+ "version": "1.0.0",
+ "homepage": "https://github.com/jonschlinkert/author-regex",
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "repository": "jonschlinkert/author-regex",
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/author-regex/issues"
+ },
+ "license": "MIT",
+ "files": [
+ "index.js"
+ ],
+ "main": "index.js",
+ "engines": {
+ "node": ">=0.8"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "keywords": [
+ "author",
+ "authors",
+ "exec",
+ "expression",
+ "extract",
+ "maintainer",
+ "maintainers",
+ "match",
+ "package",
+ "parse",
+ "person",
+ "pkg",
+ "re",
+ "regex",
+ "regexp",
+ "regular"
+ ],
+ "devDependencies": {
+ "gulp-format-md": "^0.1.11",
+ "mocha": "^3.2.0"
+ },
+ "verb": {
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "lint": {
+ "reflinks": true
+ }
+ }
+}
diff --git a/node_modules/aws-sign2/LICENSE b/node_modules/aws-sign2/LICENSE
new file mode 100644
index 0000000..a4a9aee
--- /dev/null
+++ b/node_modules/aws-sign2/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/aws-sign2/README.md b/node_modules/aws-sign2/README.md
new file mode 100644
index 0000000..763564e
--- /dev/null
+++ b/node_modules/aws-sign2/README.md
@@ -0,0 +1,4 @@
+aws-sign
+========
+
+AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.
diff --git a/node_modules/aws-sign2/index.js b/node_modules/aws-sign2/index.js
new file mode 100644
index 0000000..fb35f6d
--- /dev/null
+++ b/node_modules/aws-sign2/index.js
@@ -0,0 +1,212 @@
+
+/*!
+ * Copyright 2010 LearnBoost <dev@learnboost.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto')
+ , parse = require('url').parse
+ ;
+
+/**
+ * Valid keys.
+ */
+
+var keys =
+ [ 'acl'
+ , 'location'
+ , 'logging'
+ , 'notification'
+ , 'partNumber'
+ , 'policy'
+ , 'requestPayment'
+ , 'torrent'
+ , 'uploadId'
+ , 'uploads'
+ , 'versionId'
+ , 'versioning'
+ , 'versions'
+ , 'website'
+ ]
+
+/**
+ * Return an "Authorization" header value with the given `options`
+ * in the form of "AWS <key>:<signature>"
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+function authorization (options) {
+ return 'AWS ' + options.key + ':' + sign(options)
+}
+
+module.exports = authorization
+module.exports.authorization = authorization
+
+/**
+ * Simple HMAC-SHA1 Wrapper
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+function hmacSha1 (options) {
+ return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64')
+}
+
+module.exports.hmacSha1 = hmacSha1
+
+/**
+ * Create a base64 sha1 HMAC for `options`.
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+function sign (options) {
+ options.message = stringToSign(options)
+ return hmacSha1(options)
+}
+module.exports.sign = sign
+
+/**
+ * Create a base64 sha1 HMAC for `options`.
+ *
+ * Specifically to be used with S3 presigned URLs
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+function signQuery (options) {
+ options.message = queryStringToSign(options)
+ return hmacSha1(options)
+}
+module.exports.signQuery= signQuery
+
+/**
+ * Return a string for sign() with the given `options`.
+ *
+ * Spec:
+ *
+ * <verb>\n
+ * <md5>\n
+ * <content-type>\n
+ * <date>\n
+ * [headers\n]
+ * <resource>
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+function stringToSign (options) {
+ var headers = options.amazonHeaders || ''
+ if (headers) headers += '\n'
+ var r =
+ [ options.verb
+ , options.md5
+ , options.contentType
+ , options.date ? options.date.toUTCString() : ''
+ , headers + options.resource
+ ]
+ return r.join('\n')
+}
+module.exports.stringToSign = stringToSign
+
+/**
+ * Return a string for sign() with the given `options`, but is meant exclusively
+ * for S3 presigned URLs
+ *
+ * Spec:
+ *
+ * <date>\n
+ * <resource>
+ *
+ * @param {Object} options
+ * @return {String}
+ * @api private
+ */
+
+function queryStringToSign (options){
+ return 'GET\n\n\n' + options.date + '\n' + options.resource
+}
+module.exports.queryStringToSign = queryStringToSign
+
+/**
+ * Perform the following:
+ *
+ * - ignore non-amazon headers
+ * - lowercase fields
+ * - sort lexicographically
+ * - trim whitespace between ":"
+ * - join with newline
+ *
+ * @param {Object} headers
+ * @return {String}
+ * @api private
+ */
+
+function canonicalizeHeaders (headers) {
+ var buf = []
+ , fields = Object.keys(headers)
+ ;
+ for (var i = 0, len = fields.length; i < len; ++i) {
+ var field = fields[i]
+ , val = headers[field]
+ , field = field.toLowerCase()
+ ;
+ if (0 !== field.indexOf('x-amz')) continue
+ buf.push(field + ':' + val)
+ }
+ return buf.sort().join('\n')
+}
+module.exports.canonicalizeHeaders = canonicalizeHeaders
+
+/**
+ * Perform the following:
+ *
+ * - ignore non sub-resources
+ * - sort lexicographically
+ *
+ * @param {String} resource
+ * @return {String}
+ * @api private
+ */
+
+function canonicalizeResource (resource) {
+ var url = parse(resource, true)
+ , path = url.pathname
+ , buf = []
+ ;
+
+ Object.keys(url.query).forEach(function(key){
+ if (!~keys.indexOf(key)) return
+ var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key])
+ buf.push(key + val)
+ })
+
+ return path + (buf.length ? '?' + buf.sort().join('&') : '')
+}
+module.exports.canonicalizeResource = canonicalizeResource
diff --git a/node_modules/aws-sign2/package.json b/node_modules/aws-sign2/package.json
new file mode 100644
index 0000000..4c3d57e
--- /dev/null
+++ b/node_modules/aws-sign2/package.json
@@ -0,0 +1,17 @@
+{
+ "author": "Mikeal Rogers <mikeal.rogers@gmail.com> (http://www.futurealoof.com)",
+ "name": "aws-sign2",
+ "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.",
+ "version": "0.7.0",
+ "repository": {
+ "url": "https://github.com/mikeal/aws-sign"
+ },
+ "license": "Apache-2.0",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ }
+}
diff --git a/node_modules/aws4/.github/FUNDING.yml b/node_modules/aws4/.github/FUNDING.yml
new file mode 100644
index 0000000..b7fdd97
--- /dev/null
+++ b/node_modules/aws4/.github/FUNDING.yml
@@ -0,0 +1,3 @@
+# These are supported funding model platforms
+
+github: mhart
diff --git a/node_modules/aws4/.travis.yml b/node_modules/aws4/.travis.yml
new file mode 100644
index 0000000..178bf31
--- /dev/null
+++ b/node_modules/aws4/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
+ - "8"
+ - "10"
+ - "12"
diff --git a/node_modules/aws4/LICENSE b/node_modules/aws4/LICENSE
new file mode 100644
index 0000000..4f321e5
--- /dev/null
+++ b/node_modules/aws4/LICENSE
@@ -0,0 +1,19 @@
+Copyright 2013 Michael Hart (michael.hart.au@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/aws4/README.md b/node_modules/aws4/README.md
new file mode 100644
index 0000000..7202e45
--- /dev/null
+++ b/node_modules/aws4/README.md
@@ -0,0 +1,183 @@
+aws4
+----
+
+[![Build Status](https://api.travis-ci.org/mhart/aws4.png?branch=master)](https://travis-ci.org/github/mhart/aws4)
+
+A small utility to sign vanilla Node.js http(s) request options using Amazon's
+[AWS Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
+
+If you want to sign and send AWS requests in a modern browser, or an environment like [Cloudflare Workers](https://developers.cloudflare.com/workers/), then check out [aws4fetch](https://github.com/mhart/aws4fetch) – otherwise you can also bundle this library for use [in older browsers](./browser).
+
+The only AWS service that *doesn't* support v4 as of 2020-05-22 is
+[SimpleDB](https://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html)
+(it only supports [AWS Signature Version 2](https://github.com/mhart/aws2)).
+
+It also provides defaults for a number of core AWS headers and
+request parameters, making it very easy to query AWS services, or
+build out a fully-featured AWS library.
+
+Example
+-------
+
+```javascript
+var https = require('https')
+var aws4 = require('aws4')
+
+// to illustrate usage, we'll create a utility function to request and pipe to stdout
+function request(opts) { https.request(opts, function(res) { res.pipe(process.stdout) }).end(opts.body || '') }
+
+// aws4 will sign an options object as you'd pass to http.request, with an AWS service and region
+var opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object', service: 's3', region: 'us-west-1' }
+
+// aws4.sign() will sign and modify these options, ready to pass to http.request
+aws4.sign(opts, { accessKeyId: '', secretAccessKey: '' })
+
+// or it can get credentials from process.env.AWS_ACCESS_KEY_ID, etc
+aws4.sign(opts)
+
+// for most AWS services, aws4 can figure out the service and region if you pass a host
+opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object' }
+
+// usually it will add/modify request headers, but you can also sign the query:
+opts = { host: 'my-bucket.s3.amazonaws.com', path: '/?X-Amz-Expires=12345', signQuery: true }
+
+// and for services with simple hosts, aws4 can infer the host from service and region:
+opts = { service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues' }
+
+// and if you're using us-east-1, it's the default:
+opts = { service: 'sqs', path: '/?Action=ListQueues' }
+
+aws4.sign(opts)
+console.log(opts)
+/*
+{
+ host: 'sqs.us-east-1.amazonaws.com',
+ path: '/?Action=ListQueues',
+ headers: {
+ Host: 'sqs.us-east-1.amazonaws.com',
+ 'X-Amz-Date': '20121226T061030Z',
+ Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...'
+ }
+}
+*/
+
+// we can now use this to query AWS
+request(opts)
+/*
+<?xml version="1.0"?>
+<ListQueuesResponse xmlns="https://queue.amazonaws.com/doc/2012-11-05/">
+...
+*/
+
+// aws4 can infer the HTTP method if a body is passed in
+// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8'
+request(aws4.sign({ service: 'iam', body: 'Action=ListGroups&Version=2010-05-08' }))
+/*
+<ListGroupsResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
+...
+*/
+
+// you can specify any custom option or header as per usual
+request(aws4.sign({
+ service: 'dynamodb',
+ region: 'ap-southeast-2',
+ method: 'POST',
+ path: '/',
+ headers: {
+ 'Content-Type': 'application/x-amz-json-1.0',
+ 'X-Amz-Target': 'DynamoDB_20120810.ListTables'
+ },
+ body: '{}'
+}))
+/*
+{"TableNames":[]}
+...
+*/
+
+// The raw RequestSigner can be used to generate CodeCommit Git passwords
+var signer = new aws4.RequestSigner({
+ service: 'codecommit',
+ host: 'git-codecommit.us-east-1.amazonaws.com',
+ method: 'GIT',
+ path: '/v1/repos/MyAwesomeRepo',
+})
+var password = signer.getDateTime() + 'Z' + signer.signature()
+
+// see example.js for examples with other services
+```
+
+API
+---
+
+### aws4.sign(requestOptions, [credentials])
+
+Calculates and populates any necessary AWS headers and/or request
+options on `requestOptions`. Returns `requestOptions` as a convenience for chaining.
+
+`requestOptions` is an object holding the same options that the Node.js
+[http.request](https://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback)
+function takes.
+
+The following properties of `requestOptions` are used in the signing or
+populated if they don't already exist:
+
+- `hostname` or `host` (will try to be determined from `service` and `region` if not given)
+- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`)
+- `path` (will use `'/'` if not given)
+- `body` (will use `''` if not given)
+- `service` (will try to be calculated from `hostname` or `host` if not given)
+- `region` (will try to be calculated from `hostname` or `host` or use `'us-east-1'` if not given)
+- `signQuery` (to sign the query instead of adding an `Authorization` header, defaults to false)
+- `headers['Host']` (will use `hostname` or `host` or be calculated if not given)
+- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'`
+ if not given and there is a `body`)
+- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used)
+
+Your AWS credentials (which can be found in your
+[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials))
+can be specified in one of two ways:
+
+- As the second argument, like this:
+
+```javascript
+aws4.sign(requestOptions, {
+ secretAccessKey: "<your-secret-access-key>",
+ accessKeyId: "<your-access-key-id>",
+ sessionToken: "<your-session-token>"
+})
+```
+
+- From `process.env`, such as this:
+
+```
+export AWS_ACCESS_KEY_ID="<your-access-key-id>"
+export AWS_SECRET_ACCESS_KEY="<your-secret-access-key>"
+export AWS_SESSION_TOKEN="<your-session-token>"
+```
+
+(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available)
+
+The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing
+with [IAM STS temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html).
+
+Installation
+------------
+
+With [npm](https://www.npmjs.com/) do:
+
+```
+npm install aws4
+```
+
+Can also be used [in the browser](./browser).
+
+Thanks
+------
+
+Thanks to [@jed](https://github.com/jed) for his
+[dynamo-client](https://github.com/jed/dynamo-client) lib where I first
+committed and subsequently extracted this code.
+
+Also thanks to the
+[official Node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving
+me a start on implementing the v4 signature.
diff --git a/node_modules/aws4/aws4.js b/node_modules/aws4/aws4.js
new file mode 100644
index 0000000..b99b319
--- /dev/null
+++ b/node_modules/aws4/aws4.js
@@ -0,0 +1,373 @@
+var aws4 = exports,
+ url = require('url'),
+ querystring = require('querystring'),
+ crypto = require('crypto'),
+ lru = require('./lru'),
+ credentialsCache = lru(1000)
+
+// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html
+
+function hmac(key, string, encoding) {
+ return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding)
+}
+
+function hash(string, encoding) {
+ return crypto.createHash('sha256').update(string, 'utf8').digest(encoding)
+}
+
+// This function assumes the string has already been percent encoded
+function encodeRfc3986(urlEncodedString) {
+ return urlEncodedString.replace(/[!'()*]/g, function(c) {
+ return '%' + c.charCodeAt(0).toString(16).toUpperCase()
+ })
+}
+
+function encodeRfc3986Full(str) {
+ return encodeRfc3986(encodeURIComponent(str))
+}
+
+// A bit of a combination of:
+// https://github.com/aws/aws-sdk-java-v2/blob/dc695de6ab49ad03934e1b02e7263abbd2354be0/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java#L59
+// https://github.com/aws/aws-sdk-js/blob/18cb7e5b463b46239f9fdd4a65e2ff8c81831e8f/lib/signers/v4.js#L191-L199
+// https://github.com/mhart/aws4fetch/blob/b3aed16b6f17384cf36ea33bcba3c1e9f3bdfefd/src/main.js#L25-L34
+var HEADERS_TO_IGNORE = {
+ 'authorization': true,
+ 'connection': true,
+ 'x-amzn-trace-id': true,
+ 'user-agent': true,
+ 'expect': true,
+ 'presigned-expires': true,
+ 'range': true,
+}
+
+// request: { path | body, [host], [method], [headers], [service], [region] }
+// credentials: { accessKeyId, secretAccessKey, [sessionToken] }
+function RequestSigner(request, credentials) {
+
+ if (typeof request === 'string') request = url.parse(request)
+
+ var headers = request.headers = (request.headers || {}),
+ hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host)
+
+ this.request = request
+ this.credentials = credentials || this.defaultCredentials()
+
+ this.service = request.service || hostParts[0] || ''
+ this.region = request.region || hostParts[1] || 'us-east-1'
+
+ // SES uses a different domain from the service name
+ if (this.service === 'email') this.service = 'ses'
+
+ if (!request.method && request.body)
+ request.method = 'POST'
+
+ if (!headers.Host && !headers.host) {
+ headers.Host = request.hostname || request.host || this.createHost()
+
+ // If a port is specified explicitly, use it as is
+ if (request.port)
+ headers.Host += ':' + request.port
+ }
+ if (!request.hostname && !request.host)
+ request.hostname = headers.Host || headers.host
+
+ this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT'
+}
+
+RequestSigner.prototype.matchHost = function(host) {
+ var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/)
+ var hostParts = (match || []).slice(1, 3)
+
+ // ES's hostParts are sometimes the other way round, if the value that is expected
+ // to be region equals ‘es’ switch them back
+ // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com
+ if (hostParts[1] === 'es')
+ hostParts = hostParts.reverse()
+
+ if (hostParts[1] == 's3') {
+ hostParts[0] = 's3'
+ hostParts[1] = 'us-east-1'
+ } else {
+ for (var i = 0; i < 2; i++) {
+ if (/^s3-/.test(hostParts[i])) {
+ hostParts[1] = hostParts[i].slice(3)
+ hostParts[0] = 's3'
+ break
+ }
+ }
+ }
+
+ return hostParts
+}
+
+// http://docs.aws.amazon.com/general/latest/gr/rande.html
+RequestSigner.prototype.isSingleRegion = function() {
+ // Special case for S3 and SimpleDB in us-east-1
+ if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true
+
+ return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts']
+ .indexOf(this.service) >= 0
+}
+
+RequestSigner.prototype.createHost = function() {
+ var region = this.isSingleRegion() ? '' : '.' + this.region,
+ subdomain = this.service === 'ses' ? 'email' : this.service
+ return subdomain + region + '.amazonaws.com'
+}
+
+RequestSigner.prototype.prepareRequest = function() {
+ this.parsePath()
+
+ var request = this.request, headers = request.headers, query
+
+ if (request.signQuery) {
+
+ this.parsedPath.query = query = this.parsedPath.query || {}
+
+ if (this.credentials.sessionToken)
+ query['X-Amz-Security-Token'] = this.credentials.sessionToken
+
+ if (this.service === 's3' && !query['X-Amz-Expires'])
+ query['X-Amz-Expires'] = 86400
+
+ if (query['X-Amz-Date'])
+ this.datetime = query['X-Amz-Date']
+ else
+ query['X-Amz-Date'] = this.getDateTime()
+
+ query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256'
+ query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString()
+ query['X-Amz-SignedHeaders'] = this.signedHeaders()
+
+ } else {
+
+ if (!request.doNotModifyHeaders && !this.isCodeCommitGit) {
+ if (request.body && !headers['Content-Type'] && !headers['content-type'])
+ headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'
+
+ if (request.body && !headers['Content-Length'] && !headers['content-length'])
+ headers['Content-Length'] = Buffer.byteLength(request.body)
+
+ if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token'])
+ headers['X-Amz-Security-Token'] = this.credentials.sessionToken
+
+ if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256'])
+ headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex')
+
+ if (headers['X-Amz-Date'] || headers['x-amz-date'])
+ this.datetime = headers['X-Amz-Date'] || headers['x-amz-date']
+ else
+ headers['X-Amz-Date'] = this.getDateTime()
+ }
+
+ delete headers.Authorization
+ delete headers.authorization
+ }
+}
+
+RequestSigner.prototype.sign = function() {
+ if (!this.parsedPath) this.prepareRequest()
+
+ if (this.request.signQuery) {
+ this.parsedPath.query['X-Amz-Signature'] = this.signature()
+ } else {
+ this.request.headers.Authorization = this.authHeader()
+ }
+
+ this.request.path = this.formatPath()
+
+ return this.request
+}
+
+RequestSigner.prototype.getDateTime = function() {
+ if (!this.datetime) {
+ var headers = this.request.headers,
+ date = new Date(headers.Date || headers.date || new Date)
+
+ this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '')
+
+ // Remove the trailing 'Z' on the timestamp string for CodeCommit git access
+ if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1)
+ }
+ return this.datetime
+}
+
+RequestSigner.prototype.getDate = function() {
+ return this.getDateTime().substr(0, 8)
+}
+
+RequestSigner.prototype.authHeader = function() {
+ return [
+ 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(),
+ 'SignedHeaders=' + this.signedHeaders(),
+ 'Signature=' + this.signature(),
+ ].join(', ')
+}
+
+RequestSigner.prototype.signature = function() {
+ var date = this.getDate(),
+ cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(),
+ kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey)
+ if (!kCredentials) {
+ kDate = hmac('AWS4' + this.credentials.secretAccessKey, date)
+ kRegion = hmac(kDate, this.region)
+ kService = hmac(kRegion, this.service)
+ kCredentials = hmac(kService, 'aws4_request')
+ credentialsCache.set(cacheKey, kCredentials)
+ }
+ return hmac(kCredentials, this.stringToSign(), 'hex')
+}
+
+RequestSigner.prototype.stringToSign = function() {
+ return [
+ 'AWS4-HMAC-SHA256',
+ this.getDateTime(),
+ this.credentialString(),
+ hash(this.canonicalString(), 'hex'),
+ ].join('\n')
+}
+
+RequestSigner.prototype.canonicalString = function() {
+ if (!this.parsedPath) this.prepareRequest()
+
+ var pathStr = this.parsedPath.path,
+ query = this.parsedPath.query,
+ headers = this.request.headers,
+ queryStr = '',
+ normalizePath = this.service !== 's3',
+ decodePath = this.service === 's3' || this.request.doNotEncodePath,
+ decodeSlashesInPath = this.service === 's3',
+ firstValOnly = this.service === 's3',
+ bodyHash
+
+ if (this.service === 's3' && this.request.signQuery) {
+ bodyHash = 'UNSIGNED-PAYLOAD'
+ } else if (this.isCodeCommitGit) {
+ bodyHash = ''
+ } else {
+ bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] ||
+ hash(this.request.body || '', 'hex')
+ }
+
+ if (query) {
+ var reducedQuery = Object.keys(query).reduce(function(obj, key) {
+ if (!key) return obj
+ obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] :
+ (firstValOnly ? query[key][0] : query[key])
+ return obj
+ }, {})
+ var encodedQueryPieces = []
+ Object.keys(reducedQuery).sort().forEach(function(key) {
+ if (!Array.isArray(reducedQuery[key])) {
+ encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key]))
+ } else {
+ reducedQuery[key].map(encodeRfc3986Full).sort()
+ .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) })
+ }
+ })
+ queryStr = encodedQueryPieces.join('&')
+ }
+ if (pathStr !== '/') {
+ if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/')
+ pathStr = pathStr.split('/').reduce(function(path, piece) {
+ if (normalizePath && piece === '..') {
+ path.pop()
+ } else if (!normalizePath || piece !== '.') {
+ if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' '))
+ path.push(encodeRfc3986Full(piece))
+ }
+ return path
+ }, []).join('/')
+ if (pathStr[0] !== '/') pathStr = '/' + pathStr
+ if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/')
+ }
+
+ return [
+ this.request.method || 'GET',
+ pathStr,
+ queryStr,
+ this.canonicalHeaders() + '\n',
+ this.signedHeaders(),
+ bodyHash,
+ ].join('\n')
+}
+
+RequestSigner.prototype.canonicalHeaders = function() {
+ var headers = this.request.headers
+ function trimAll(header) {
+ return header.toString().trim().replace(/\s+/g, ' ')
+ }
+ return Object.keys(headers)
+ .filter(function(key) { return HEADERS_TO_IGNORE[key.toLowerCase()] == null })
+ .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 })
+ .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) })
+ .join('\n')
+}
+
+RequestSigner.prototype.signedHeaders = function() {
+ return Object.keys(this.request.headers)
+ .map(function(key) { return key.toLowerCase() })
+ .filter(function(key) { return HEADERS_TO_IGNORE[key] == null })
+ .sort()
+ .join(';')
+}
+
+RequestSigner.prototype.credentialString = function() {
+ return [
+ this.getDate(),
+ this.region,
+ this.service,
+ 'aws4_request',
+ ].join('/')
+}
+
+RequestSigner.prototype.defaultCredentials = function() {
+ var env = process.env
+ return {
+ accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY,
+ secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY,
+ sessionToken: env.AWS_SESSION_TOKEN,
+ }
+}
+
+RequestSigner.prototype.parsePath = function() {
+ var path = this.request.path || '/'
+
+ // S3 doesn't always encode characters > 127 correctly and
+ // all services don't encode characters > 255 correctly
+ // So if there are non-reserved chars (and it's not already all % encoded), just encode them all
+ if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) {
+ path = encodeURI(decodeURI(path))
+ }
+
+ var queryIx = path.indexOf('?'),
+ query = null
+
+ if (queryIx >= 0) {
+ query = querystring.parse(path.slice(queryIx + 1))
+ path = path.slice(0, queryIx)
+ }
+
+ this.parsedPath = {
+ path: path,
+ query: query,
+ }
+}
+
+RequestSigner.prototype.formatPath = function() {
+ var path = this.parsedPath.path,
+ query = this.parsedPath.query
+
+ if (!query) return path
+
+ // Services don't support empty query string keys
+ if (query[''] != null) delete query['']
+
+ return path + '?' + encodeRfc3986(querystring.stringify(query))
+}
+
+aws4.RequestSigner = RequestSigner
+
+aws4.sign = function(request, credentials) {
+ return new RequestSigner(request, credentials).sign()
+}
diff --git a/node_modules/aws4/lru.js b/node_modules/aws4/lru.js
new file mode 100644
index 0000000..333f66a
--- /dev/null
+++ b/node_modules/aws4/lru.js
@@ -0,0 +1,96 @@
+module.exports = function(size) {
+ return new LruCache(size)
+}
+
+function LruCache(size) {
+ this.capacity = size | 0
+ this.map = Object.create(null)
+ this.list = new DoublyLinkedList()
+}
+
+LruCache.prototype.get = function(key) {
+ var node = this.map[key]
+ if (node == null) return undefined
+ this.used(node)
+ return node.val
+}
+
+LruCache.prototype.set = function(key, val) {
+ var node = this.map[key]
+ if (node != null) {
+ node.val = val
+ } else {
+ if (!this.capacity) this.prune()
+ if (!this.capacity) return false
+ node = new DoublyLinkedNode(key, val)
+ this.map[key] = node
+ this.capacity--
+ }
+ this.used(node)
+ return true
+}
+
+LruCache.prototype.used = function(node) {
+ this.list.moveToFront(node)
+}
+
+LruCache.prototype.prune = function() {
+ var node = this.list.pop()
+ if (node != null) {
+ delete this.map[node.key]
+ this.capacity++
+ }
+}
+
+
+function DoublyLinkedList() {
+ this.firstNode = null
+ this.lastNode = null
+}
+
+DoublyLinkedList.prototype.moveToFront = function(node) {
+ if (this.firstNode == node) return
+
+ this.remove(node)
+
+ if (this.firstNode == null) {
+ this.firstNode = node
+ this.lastNode = node
+ node.prev = null
+ node.next = null
+ } else {
+ node.prev = null
+ node.next = this.firstNode
+ node.next.prev = node
+ this.firstNode = node
+ }
+}
+
+DoublyLinkedList.prototype.pop = function() {
+ var lastNode = this.lastNode
+ if (lastNode != null) {
+ this.remove(lastNode)
+ }
+ return lastNode
+}
+
+DoublyLinkedList.prototype.remove = function(node) {
+ if (this.firstNode == node) {
+ this.firstNode = node.next
+ } else if (node.prev != null) {
+ node.prev.next = node.next
+ }
+ if (this.lastNode == node) {
+ this.lastNode = node.prev
+ } else if (node.next != null) {
+ node.next.prev = node.prev
+ }
+}
+
+
+function DoublyLinkedNode(key, val) {
+ this.key = key
+ this.val = val
+ this.prev = null
+ this.next = null
+}
diff --git a/node_modules/aws4/package.json b/node_modules/aws4/package.json
new file mode 100644
index 0000000..424598d
--- /dev/null
+++ b/node_modules/aws4/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "aws4",
+ "version": "1.11.0",
+ "description": "Signs and prepares requests using AWS Signature Version 4",
+ "author": "Michael Hart <michael.hart.au@gmail.com> (https://github.com/mhart)",
+ "license": "MIT",
+ "repository": "github:mhart/aws4",
+ "main": "aws4.js",
+ "scripts": {
+ "test": "mocha ./test/fast.js -R list",
+ "integration": "node ./test/slow.js"
+ },
+ "devDependencies": {
+ "mocha": "^2.5.3",
+ "should": "^8.4.0"
+ }
+}
diff --git a/node_modules/balanced-match/.github/FUNDING.yml b/node_modules/balanced-match/.github/FUNDING.yml
new file mode 100644
index 0000000..cea8b16
--- /dev/null
+++ b/node_modules/balanced-match/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+tidelift: "npm/balanced-match"
+patreon: juliangruber
diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md
new file mode 100644
index 0000000..2cdc8e4
--- /dev/null
+++ b/node_modules/balanced-match/LICENSE.md
@@ -0,0 +1,21 @@
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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/balanced-match/README.md b/node_modules/balanced-match/README.md
new file mode 100644
index 0000000..d2a48b6
--- /dev/null
+++ b/node_modules/balanced-match/README.md
@@ -0,0 +1,97 @@
+# balanced-match
+
+Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
+
+[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
+[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
+
+[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
+
+## Example
+
+Get the first matching pair of braces:
+
+```js
+var balanced = require('balanced-match');
+
+console.log(balanced('{', '}', 'pre{in{nested}}post'));
+console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
+```
+
+The matches are:
+
+```bash
+$ node example.js
+{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
+{ start: 3,
+ end: 9,
+ pre: 'pre',
+ body: 'first',
+ post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
+```
+
+## API
+
+### var m = balanced(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+object with those keys:
+
+* **start** the index of the first match of `a`
+* **end** the index of the matching `b`
+* **pre** the preamble, `a` and `b` not included
+* **body** the match, `a` and `b` not included
+* **post** the postscript, `a` and `b` not included
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
+
+### var r = balanced.range(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+array with indexes: `[ <a index>, <b index> ]`.
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install balanced-match
+```
+
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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/balanced-match/index.js b/node_modules/balanced-match/index.js
new file mode 100644
index 0000000..c67a646
--- /dev/null
+++ b/node_modules/balanced-match/index.js
@@ -0,0 +1,62 @@
+'use strict';
+module.exports = balanced;
+function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
+ var r = range(a, b, str);
+
+ return r && {
+ start: r[0],
+ end: r[1],
+ pre: str.slice(0, r[0]),
+ body: str.slice(r[0] + a.length, r[1]),
+ post: str.slice(r[1] + b.length)
+ };
+}
+
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
+balanced.range = range;
+function range(a, b, str) {
+ var begs, beg, left, right, result;
+ var ai = str.indexOf(a);
+ var bi = str.indexOf(b, ai + 1);
+ var i = ai;
+
+ if (ai >= 0 && bi > 0) {
+ if(a===b) {
+ return [ai, bi];
+ }
+ begs = [];
+ left = str.length;
+
+ while (i >= 0 && !result) {
+ if (i == ai) {
+ begs.push(i);
+ ai = str.indexOf(a, i + 1);
+ } else if (begs.length == 1) {
+ result = [ begs.pop(), bi ];
+ } else {
+ beg = begs.pop();
+ if (beg < left) {
+ left = beg;
+ right = bi;
+ }
+
+ bi = str.indexOf(b, i + 1);
+ }
+
+ i = ai < bi && ai >= 0 ? ai : bi;
+ }
+
+ if (begs.length) {
+ result = [ left, right ];
+ }
+ }
+
+ return result;
+}
diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json
new file mode 100644
index 0000000..ce6073e
--- /dev/null
+++ b/node_modules/balanced-match/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "balanced-match",
+ "description": "Match balanced character pairs, like \"{\" and \"}\"",
+ "version": "1.0.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/balanced-match.git"
+ },
+ "homepage": "https://github.com/juliangruber/balanced-match",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test/test.js",
+ "bench": "matcha test/bench.js"
+ },
+ "devDependencies": {
+ "matcha": "^0.7.0",
+ "tape": "^4.6.0"
+ },
+ "keywords": [
+ "match",
+ "regexp",
+ "test",
+ "balanced",
+ "parse"
+ ],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/20..latest",
+ "firefox/nightly",
+ "chrome/25..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/base64-js/LICENSE b/node_modules/base64-js/LICENSE
new file mode 100644
index 0000000..6d52b8a
--- /dev/null
+++ b/node_modules/base64-js/LICENSE
@@ -0,0 +1,21 @@
+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
new file mode 100644
index 0000000..b42a48f
--- /dev/null
+++ b/node_modules/base64-js/README.md
@@ -0,0 +1,34 @@
+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:
+
+`<script src="base64js.min.js"></script>`
+
+[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
new file mode 100644
index 0000000..908ac83
--- /dev/null
+++ b/node_modules/base64-js/base64js.min.js
@@ -0,0 +1 @@
+(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<g.length;c++)a(g[c]);return a}return b}()({"/":[function(a,b,c){'use strict';function d(a){var b=a.length;if(0<b%4)throw new Error("Invalid string. Length must be a multiple of 4");var c=a.indexOf("=");-1===c&&(c=b);var d=c===b?0:4-c%4;return[c,d]}function e(a,b,c){return 3*(b+c)/4-c}function f(a){var b,c,f=d(a),g=f[0],h=f[1],j=new m(e(a,g,h)),k=0,n=0<h?g-4:g;for(c=0;c<n;c+=4)b=l[a.charCodeAt(c)]<<18|l[a.charCodeAt(c+1)]<<12|l[a.charCodeAt(c+2)]<<6|l[a.charCodeAt(c+3)],j[k++]=255&b>>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;f<c;f+=3)d=(16711680&a[f]<<16)+(65280&a[f+1]<<8)+(255&a[f+2]),e.push(g(d));return e.join("")}function j(a){for(var b,c=a.length,d=c%3,e=[],f=16383,g=0,j=c-d;g<j;g+=f)e.push(h(a,g,g+f>j?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<p;++o)k[o]=n[o],l[n.charCodeAt(o)]=o;l[45]=62,l[95]=63},{}]},{},[])("/")}); \ No newline at end of file
diff --git a/node_modules/base64-js/index.d.ts b/node_modules/base64-js/index.d.ts
new file mode 100644
index 0000000..7d9fa1d
--- /dev/null
+++ b/node_modules/base64-js/index.d.ts
@@ -0,0 +1,3 @@
+export function byteLength(b64: string): number;
+export function toByteArray(b64: string): Uint8Array;
+export function fromByteArray(uint8: Uint8Array): string;
diff --git a/node_modules/base64-js/index.js b/node_modules/base64-js/index.js
new file mode 100644
index 0000000..0599f3e
--- /dev/null
+++ b/node_modules/base64-js/index.js
@@ -0,0 +1,150 @@
+'use strict'
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+ var len = b64.length
+
+ if (len % 4 > 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
new file mode 100644
index 0000000..c3972e3
--- /dev/null
+++ b/node_modules/base64-js/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "base64-js",
+ "description": "Base64 encoding/decoding in pure JS",
+ "version": "1.5.1",
+ "author": "T. Jameson Little <t.jameson.little@gmail.com>",
+ "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/bcrypt-pbkdf/CONTRIBUTING.md b/node_modules/bcrypt-pbkdf/CONTRIBUTING.md
new file mode 100644
index 0000000..401d34e
--- /dev/null
+++ b/node_modules/bcrypt-pbkdf/CONTRIBUTING.md
@@ -0,0 +1,13 @@
+# Contributing
+
+This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new
+changes. Anyone can submit changes. To get started, see the [cr.joyent.us user
+guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md).
+This repo does not use GitHub pull requests.
+
+See the [Joyent Engineering
+Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general
+best practices expected in this repository.
+
+If you're changing something non-trivial or user-facing, you may want to submit
+an issue first.
diff --git a/node_modules/bcrypt-pbkdf/LICENSE b/node_modules/bcrypt-pbkdf/LICENSE
new file mode 100644
index 0000000..fc58d2a
--- /dev/null
+++ b/node_modules/bcrypt-pbkdf/LICENSE
@@ -0,0 +1,66 @@
+The Blowfish portions are under the following license:
+
+Blowfish block cipher for OpenBSD
+Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+All rights reserved.
+
+Implementation advice by David Mazieres <dm@lcs.mit.edu>.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+The bcrypt_pbkdf portions are under the following license:
+
+Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+
+Performance improvements (Javascript-specific):
+
+Copyright 2016, Joyent Inc
+Author: Alex Wilson <alex.wilson@joyent.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/bcrypt-pbkdf/README.md b/node_modules/bcrypt-pbkdf/README.md
new file mode 100644
index 0000000..7551f33
--- /dev/null
+++ b/node_modules/bcrypt-pbkdf/README.md
@@ -0,0 +1,45 @@
+Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified
+version of [Devi Mandiri's port](https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js),
+with some minor performance improvements. The code is copied verbatim (and
+un-styled) from Devi's work.
+
+This product includes software developed by Niels Provos.
+
+## API
+
+### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)`
+
+Derive a cryptographic key of arbitrary length from a given password and salt,
+using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and
+SHA-512.
+
+See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for
+further information.
+
+Parameters:
+
+ * `pass`, a Uint8Array of length `passlen`
+ * `passlen`, an integer Number
+ * `salt`, a Uint8Array of length `saltlen`
+ * `saltlen`, an integer Number
+ * `key`, a Uint8Array of length `keylen`, will be filled with output
+ * `keylen`, an integer Number
+ * `rounds`, an integer Number, number of rounds of the PBKDF to run
+
+### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)`
+
+Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as
+part of the inner round function in the PBKDF.
+
+Parameters:
+
+ * `sha2pass`, a Uint8Array of length 64
+ * `sha2salt`, a Uint8Array of length 64
+ * `out`, a Uint8Array of length 32, will be filled with output
+
+## License
+
+This source form is a 1:1 port from the OpenBSD `blowfish.c` and `bcrypt_pbkdf.c`.
+As a result, it retains the original copyright and license. The two files are
+under slightly different (but compatible) licenses, and are here combined in
+one file. For each of the full license texts see `LICENSE`.
diff --git a/node_modules/bcrypt-pbkdf/index.js b/node_modules/bcrypt-pbkdf/index.js
new file mode 100644
index 0000000..b1b5ad4
--- /dev/null
+++ b/node_modules/bcrypt-pbkdf/index.js
@@ -0,0 +1,556 @@
+'use strict';
+
+var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash;
+
+/*
+ * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a
+ * result, it retains the original copyright and license. The two files are
+ * under slightly different (but compatible) licenses, and are here combined in
+ * one file.
+ *
+ * Credit for the actual porting work goes to:
+ * Devi Mandiri <me@devi.web.id>
+ */
+
+/*
+ * The Blowfish portions are under the following license:
+ *
+ * Blowfish block cipher for OpenBSD
+ * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+ * All rights reserved.
+ *
+ * Implementation advice by David Mazieres <dm@lcs.mit.edu>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * The bcrypt_pbkdf portions are under the following license:
+ *
+ * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * Performance improvements (Javascript-specific):
+ *
+ * Copyright 2016, Joyent Inc
+ * Author: Alex Wilson <alex.wilson@joyent.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+// Ported from OpenBSD bcrypt_pbkdf.c v1.9
+
+var BLF_J = 0;
+
+var Blowfish = function() {
+ this.S = [
+ new Uint32Array([
+ 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
+ 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
+ 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
+ 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
+ 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
+ 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
+ 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
+ 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
+ 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
+ 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
+ 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
+ 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
+ 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
+ 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
+ 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
+ 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
+ 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
+ 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
+ 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
+ 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
+ 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
+ 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
+ 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
+ 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
+ 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
+ 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
+ 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
+ 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
+ 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,
+ 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
+ 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,
+ 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
+ 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
+ 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
+ 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
+ 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
+ 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,
+ 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
+ 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
+ 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
+ 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,
+ 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
+ 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,
+ 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
+ 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
+ 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
+ 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,
+ 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
+ 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,
+ 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
+ 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
+ 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
+ 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,
+ 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
+ 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
+ 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
+ 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
+ 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
+ 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,
+ 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
+ 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,
+ 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
+ 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
+ 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]),
+ new Uint32Array([
+ 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
+ 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
+ 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
+ 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
+ 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,
+ 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
+ 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,
+ 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
+ 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
+ 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
+ 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
+ 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
+ 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,
+ 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
+ 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
+ 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
+ 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
+ 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
+ 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,
+ 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
+ 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
+ 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
+ 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,
+ 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
+ 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,
+ 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
+ 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
+ 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
+ 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,
+ 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
+ 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
+ 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
+ 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
+ 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
+ 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
+ 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
+ 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,
+ 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
+ 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
+ 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
+ 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
+ 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
+ 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,
+ 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
+ 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
+ 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
+ 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,
+ 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
+ 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,
+ 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
+ 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
+ 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
+ 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
+ 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
+ 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,
+ 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
+ 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
+ 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
+ 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,
+ 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
+ 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
+ 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
+ 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
+ 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]),
+ new Uint32Array([
+ 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,
+ 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
+ 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
+ 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
+ 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,
+ 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
+ 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
+ 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
+ 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
+ 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
+ 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,
+ 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
+ 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,
+ 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
+ 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
+ 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
+ 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
+ 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
+ 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,
+ 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
+ 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
+ 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
+ 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,
+ 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
+ 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
+ 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
+ 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
+ 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
+ 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,
+ 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
+ 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,
+ 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
+ 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
+ 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
+ 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,
+ 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
+ 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
+ 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
+ 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
+ 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
+ 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,
+ 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
+ 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
+ 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
+ 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
+ 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
+ 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
+ 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
+ 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,
+ 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
+ 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
+ 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
+ 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,
+ 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
+ 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,
+ 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
+ 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
+ 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
+ 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,
+ 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
+ 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
+ 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
+ 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
+ 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]),
+ new Uint32Array([
+ 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,
+ 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
+ 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
+ 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
+ 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,
+ 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
+ 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,
+ 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
+ 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
+ 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
+ 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,
+ 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
+ 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
+ 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
+ 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
+ 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
+ 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,
+ 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
+ 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,
+ 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
+ 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
+ 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
+ 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
+ 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
+ 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,
+ 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
+ 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
+ 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
+ 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,
+ 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
+ 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,
+ 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
+ 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
+ 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
+ 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,
+ 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
+ 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,
+ 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
+ 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
+ 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
+ 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,
+ 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
+ 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
+ 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
+ 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
+ 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
+ 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,
+ 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
+ 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,
+ 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
+ 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
+ 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
+ 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
+ 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
+ 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,
+ 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
+ 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
+ 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
+ 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,
+ 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
+ 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,
+ 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
+ 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
+ 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6])
+ ];
+ this.P = new Uint32Array([
+ 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
+ 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
+ 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
+ 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
+ 0x9216d5d9, 0x8979fb1b]);
+};
+
+function F(S, x8, i) {
+ return (((S[0][x8[i+3]] +
+ S[1][x8[i+2]]) ^
+ S[2][x8[i+1]]) +
+ S[3][x8[i]]);
+};
+
+Blowfish.prototype.encipher = function(x, x8) {
+ if (x8 === undefined) {
+ x8 = new Uint8Array(x.buffer);
+ if (x.byteOffset !== 0)
+ x8 = x8.subarray(x.byteOffset);
+ }
+ x[0] ^= this.P[0];
+ for (var i = 1; i < 16; i += 2) {
+ x[1] ^= F(this.S, x8, 0) ^ this.P[i];
+ x[0] ^= F(this.S, x8, 4) ^ this.P[i+1];
+ }
+ var t = x[0];
+ x[0] = x[1] ^ this.P[17];
+ x[1] = t;
+};
+
+Blowfish.prototype.decipher = function(x) {
+ var x8 = new Uint8Array(x.buffer);
+ if (x.byteOffset !== 0)
+ x8 = x8.subarray(x.byteOffset);
+ x[0] ^= this.P[17];
+ for (var i = 16; i > 0; i -= 2) {
+ x[1] ^= F(this.S, x8, 0) ^ this.P[i];
+ x[0] ^= F(this.S, x8, 4) ^ this.P[i-1];
+ }
+ var t = x[0];
+ x[0] = x[1] ^ this.P[0];
+ x[1] = t;
+};
+
+function stream2word(data, databytes){
+ var i, temp = 0;
+ for (i = 0; i < 4; i++, BLF_J++) {
+ if (BLF_J >= databytes) BLF_J = 0;
+ temp = (temp << 8) | data[BLF_J];
+ }
+ return temp;
+};
+
+Blowfish.prototype.expand0state = function(key, keybytes) {
+ var d = new Uint32Array(2), i, k;
+ var d8 = new Uint8Array(d.buffer);
+
+ for (i = 0, BLF_J = 0; i < 18; i++) {
+ this.P[i] ^= stream2word(key, keybytes);
+ }
+ BLF_J = 0;
+
+ for (i = 0; i < 18; i += 2) {
+ this.encipher(d, d8);
+ this.P[i] = d[0];
+ this.P[i+1] = d[1];
+ }
+
+ for (i = 0; i < 4; i++) {
+ for (k = 0; k < 256; k += 2) {
+ this.encipher(d, d8);
+ this.S[i][k] = d[0];
+ this.S[i][k+1] = d[1];
+ }
+ }
+};
+
+Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) {
+ var d = new Uint32Array(2), i, k;
+
+ for (i = 0, BLF_J = 0; i < 18; i++) {
+ this.P[i] ^= stream2word(key, keybytes);
+ }
+
+ for (i = 0, BLF_J = 0; i < 18; i += 2) {
+ d[0] ^= stream2word(data, databytes);
+ d[1] ^= stream2word(data, databytes);
+ this.encipher(d);
+ this.P[i] = d[0];
+ this.P[i+1] = d[1];
+ }
+
+ for (i = 0; i < 4; i++) {
+ for (k = 0; k < 256; k += 2) {
+ d[0] ^= stream2word(data, databytes);
+ d[1] ^= stream2word(data, databytes);
+ this.encipher(d);
+ this.S[i][k] = d[0];
+ this.S[i][k+1] = d[1];
+ }
+ }
+ BLF_J = 0;
+};
+
+Blowfish.prototype.enc = function(data, blocks) {
+ for (var i = 0; i < blocks; i++) {
+ this.encipher(data.subarray(i*2));
+ }
+};
+
+Blowfish.prototype.dec = function(data, blocks) {
+ for (var i = 0; i < blocks; i++) {
+ this.decipher(data.subarray(i*2));
+ }
+};
+
+var BCRYPT_BLOCKS = 8,
+ BCRYPT_HASHSIZE = 32;
+
+function bcrypt_hash(sha2pass, sha2salt, out) {
+ var state = new Blowfish(),
+ cdata = new Uint32Array(BCRYPT_BLOCKS), i,
+ ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,
+ 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,
+ 105,116,101]); //"OxychromaticBlowfishSwatDynamite"
+
+ state.expandstate(sha2salt, 64, sha2pass, 64);
+ for (i = 0; i < 64; i++) {
+ state.expand0state(sha2salt, 64);
+ state.expand0state(sha2pass, 64);
+ }
+
+ for (i = 0; i < BCRYPT_BLOCKS; i++)
+ cdata[i] = stream2word(ciphertext, ciphertext.byteLength);
+ for (i = 0; i < 64; i++)
+ state.enc(cdata, cdata.byteLength / 8);
+
+ for (i = 0; i < BCRYPT_BLOCKS; i++) {
+ out[4*i+3] = cdata[i] >>> 24;
+ out[4*i+2] = cdata[i] >>> 16;
+ out[4*i+1] = cdata[i] >>> 8;
+ out[4*i+0] = cdata[i];
+ }
+};
+
+function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) {
+ var sha2pass = new Uint8Array(64),
+ sha2salt = new Uint8Array(64),
+ out = new Uint8Array(BCRYPT_HASHSIZE),
+ tmpout = new Uint8Array(BCRYPT_HASHSIZE),
+ countsalt = new Uint8Array(saltlen+4),
+ i, j, amt, stride, dest, count,
+ origkeylen = keylen;
+
+ if (rounds < 1)
+ return -1;
+ if (passlen === 0 || saltlen === 0 || keylen === 0 ||
+ keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20))
+ return -1;
+
+ stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength);
+ amt = Math.floor((keylen + stride - 1) / stride);
+
+ for (i = 0; i < saltlen; i++)
+ countsalt[i] = salt[i];
+
+ crypto_hash_sha512(sha2pass, pass, passlen);
+
+ for (count = 1; keylen > 0; count++) {
+ countsalt[saltlen+0] = count >>> 24;
+ countsalt[saltlen+1] = count >>> 16;
+ countsalt[saltlen+2] = count >>> 8;
+ countsalt[saltlen+3] = count;
+
+ crypto_hash_sha512(sha2salt, countsalt, saltlen + 4);
+ bcrypt_hash(sha2pass, sha2salt, tmpout);
+ for (i = out.byteLength; i--;)
+ out[i] = tmpout[i];
+
+ for (i = 1; i < rounds; i++) {
+ crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength);
+ bcrypt_hash(sha2pass, sha2salt, tmpout);
+ for (j = 0; j < out.byteLength; j++)
+ out[j] ^= tmpout[j];
+ }
+
+ amt = Math.min(amt, keylen);
+ for (i = 0; i < amt; i++) {
+ dest = i * stride + (count - 1);
+ if (dest >= origkeylen)
+ break;
+ key[dest] = out[i];
+ }
+ keylen -= i;
+ }
+
+ return 0;
+};
+
+module.exports = {
+ BLOCKS: BCRYPT_BLOCKS,
+ HASHSIZE: BCRYPT_HASHSIZE,
+ hash: bcrypt_hash,
+ pbkdf: bcrypt_pbkdf
+};
diff --git a/node_modules/bcrypt-pbkdf/package.json b/node_modules/bcrypt-pbkdf/package.json
new file mode 100644
index 0000000..e93a969
--- /dev/null
+++ b/node_modules/bcrypt-pbkdf/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "bcrypt-pbkdf",
+ "version": "1.0.2",
+ "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/joyent/node-bcrypt-pbkdf.git"
+ },
+ "main": "index.js",
+ "dependencies": {
+ "tweetnacl": "^0.14.3"
+ },
+ "devDependencies": {},
+ "license": "BSD-3-Clause"
+}
diff --git a/node_modules/bluebird/LICENSE b/node_modules/bluebird/LICENSE
new file mode 100644
index 0000000..b24e635
--- /dev/null
+++ b/node_modules/bluebird/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2018 Petka Antonov
+
+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/bluebird/README.md b/node_modules/bluebird/README.md
new file mode 100644
index 0000000..7c1dd66
--- /dev/null
+++ b/node_modules/bluebird/README.md
@@ -0,0 +1,57 @@
+<a href="http://promisesaplus.com/">
+ <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
+ title="Promises/A+ 1.1 compliant" align="right" />
+</a>
+
+
+[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
+[![coverage-98%](https://img.shields.io/badge/coverage-98%25-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
+
+**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
+
+# Introduction
+
+Bluebird is a fully featured promise library with focus on innovative features and performance
+
+See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here.
+
+For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x).
+
+### Note
+
+Promises in Node.js 10 are significantly faster than before. Bluebird still includes a lot of features like cancellation, iteration methods and warnings that native promises don't. If you are using Bluebird for performance rather than for those - please consider giving native promises a shot and running the benchmarks yourself.
+
+# Questions and issues
+
+The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
+
+
+
+## Thanks
+
+Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8.
+
+# License
+
+The MIT License (MIT)
+
+Copyright (c) 2013-2019 Petka Antonov
+
+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/bluebird/changelog.md b/node_modules/bluebird/changelog.md
new file mode 100644
index 0000000..73b2eb6
--- /dev/null
+++ b/node_modules/bluebird/changelog.md
@@ -0,0 +1 @@
+[http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html)
diff --git a/node_modules/bluebird/js/browser/bluebird.core.js b/node_modules/bluebird/js/browser/bluebird.core.js
new file mode 100644
index 0000000..24a8bf2
--- /dev/null
+++ b/node_modules/bluebird/js/browser/bluebird.core.js
@@ -0,0 +1,3914 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2018 Petka Antonov
+ *
+ * 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.
+ *
+ */
+/**
+ * bluebird build version 3.7.2
+ * Features enabled: core
+ * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+"use strict";
+var firstLineError;
+try {throw new Error(); } catch (e) {firstLineError = e;}
+var schedule = _dereq_("./schedule");
+var Queue = _dereq_("./queue");
+
+function Async() {
+ this._customScheduler = false;
+ this._isTickUsed = false;
+ this._lateQueue = new Queue(16);
+ this._normalQueue = new Queue(16);
+ this._haveDrainedQueues = false;
+ var self = this;
+ this.drainQueues = function () {
+ self._drainQueues();
+ };
+ this._schedule = schedule;
+}
+
+Async.prototype.setScheduler = function(fn) {
+ var prev = this._schedule;
+ this._schedule = fn;
+ this._customScheduler = true;
+ return prev;
+};
+
+Async.prototype.hasCustomScheduler = function() {
+ return this._customScheduler;
+};
+
+Async.prototype.haveItemsQueued = function () {
+ return this._isTickUsed || this._haveDrainedQueues;
+};
+
+
+Async.prototype.fatalError = function(e, isNode) {
+ if (isNode) {
+ process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
+ "\n");
+ process.exit(2);
+ } else {
+ this.throwLater(e);
+ }
+};
+
+Async.prototype.throwLater = function(fn, arg) {
+ if (arguments.length === 1) {
+ arg = fn;
+ fn = function () { throw arg; };
+ }
+ if (typeof setTimeout !== "undefined") {
+ setTimeout(function() {
+ fn(arg);
+ }, 0);
+ } else try {
+ this._schedule(function() {
+ fn(arg);
+ });
+ } catch (e) {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+};
+
+function AsyncInvokeLater(fn, receiver, arg) {
+ this._lateQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncInvoke(fn, receiver, arg) {
+ this._normalQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncSettlePromises(promise) {
+ this._normalQueue._pushOne(promise);
+ this._queueTick();
+}
+
+Async.prototype.invokeLater = AsyncInvokeLater;
+Async.prototype.invoke = AsyncInvoke;
+Async.prototype.settlePromises = AsyncSettlePromises;
+
+
+function _drainQueue(queue) {
+ while (queue.length() > 0) {
+ _drainQueueStep(queue);
+ }
+}
+
+function _drainQueueStep(queue) {
+ var fn = queue.shift();
+ if (typeof fn !== "function") {
+ fn._settlePromises();
+ } else {
+ var receiver = queue.shift();
+ var arg = queue.shift();
+ fn.call(receiver, arg);
+ }
+}
+
+Async.prototype._drainQueues = function () {
+ _drainQueue(this._normalQueue);
+ this._reset();
+ this._haveDrainedQueues = true;
+ _drainQueue(this._lateQueue);
+};
+
+Async.prototype._queueTick = function () {
+ if (!this._isTickUsed) {
+ this._isTickUsed = true;
+ this._schedule(this.drainQueues);
+ }
+};
+
+Async.prototype._reset = function () {
+ this._isTickUsed = false;
+};
+
+module.exports = Async;
+module.exports.firstLineError = firstLineError;
+
+},{"./queue":17,"./schedule":18}],2:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
+var calledBind = false;
+var rejectThis = function(_, e) {
+ this._reject(e);
+};
+
+var targetRejected = function(e, context) {
+ context.promiseRejectionQueued = true;
+ context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
+};
+
+var bindingResolved = function(thisArg, context) {
+ if (((this._bitField & 50397184) === 0)) {
+ this._resolveCallback(context.target);
+ }
+};
+
+var bindingRejected = function(e, context) {
+ if (!context.promiseRejectionQueued) this._reject(e);
+};
+
+Promise.prototype.bind = function (thisArg) {
+ if (!calledBind) {
+ calledBind = true;
+ Promise.prototype._propagateFrom = debug.propagateFromFunction();
+ Promise.prototype._boundValue = debug.boundValueFunction();
+ }
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+ ret._propagateFrom(this, 1);
+ var target = this._target();
+ ret._setBoundTo(maybePromise);
+ if (maybePromise instanceof Promise) {
+ var context = {
+ promiseRejectionQueued: false,
+ promise: ret,
+ target: target,
+ bindingPromise: maybePromise
+ };
+ target._then(INTERNAL, targetRejected, undefined, ret, context);
+ maybePromise._then(
+ bindingResolved, bindingRejected, undefined, ret, context);
+ ret._setOnCancel(maybePromise);
+ } else {
+ ret._resolveCallback(target);
+ }
+ return ret;
+};
+
+Promise.prototype._setBoundTo = function (obj) {
+ if (obj !== undefined) {
+ this._bitField = this._bitField | 2097152;
+ this._boundTo = obj;
+ } else {
+ this._bitField = this._bitField & (~2097152);
+ }
+};
+
+Promise.prototype._isBound = function () {
+ return (this._bitField & 2097152) === 2097152;
+};
+
+Promise.bind = function (thisArg, value) {
+ return Promise.resolve(value).bind(thisArg);
+};
+};
+
+},{}],3:[function(_dereq_,module,exports){
+"use strict";
+var old;
+if (typeof Promise !== "undefined") old = Promise;
+function noConflict() {
+ try { if (Promise === bluebird) Promise = old; }
+ catch (e) {}
+ return bluebird;
+}
+var bluebird = _dereq_("./promise")();
+bluebird.noConflict = noConflict;
+module.exports = bluebird;
+
+},{"./promise":15}],4:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, PromiseArray, apiRejection, debug) {
+var util = _dereq_("./util");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var async = Promise._async;
+
+Promise.prototype["break"] = Promise.prototype.cancel = function() {
+ if (!debug.cancellation()) return this._warn("cancellation is disabled");
+
+ var promise = this;
+ var child = promise;
+ while (promise._isCancellable()) {
+ if (!promise._cancelBy(child)) {
+ if (child._isFollowing()) {
+ child._followee().cancel();
+ } else {
+ child._cancelBranched();
+ }
+ break;
+ }
+
+ var parent = promise._cancellationParent;
+ if (parent == null || !parent._isCancellable()) {
+ if (promise._isFollowing()) {
+ promise._followee().cancel();
+ } else {
+ promise._cancelBranched();
+ }
+ break;
+ } else {
+ if (promise._isFollowing()) promise._followee().cancel();
+ promise._setWillBeCancelled();
+ child = promise;
+ promise = parent;
+ }
+ }
+};
+
+Promise.prototype._branchHasCancelled = function() {
+ this._branchesRemainingToCancel--;
+};
+
+Promise.prototype._enoughBranchesHaveCancelled = function() {
+ return this._branchesRemainingToCancel === undefined ||
+ this._branchesRemainingToCancel <= 0;
+};
+
+Promise.prototype._cancelBy = function(canceller) {
+ if (canceller === this) {
+ this._branchesRemainingToCancel = 0;
+ this._invokeOnCancel();
+ return true;
+ } else {
+ this._branchHasCancelled();
+ if (this._enoughBranchesHaveCancelled()) {
+ this._invokeOnCancel();
+ return true;
+ }
+ }
+ return false;
+};
+
+Promise.prototype._cancelBranched = function() {
+ if (this._enoughBranchesHaveCancelled()) {
+ this._cancel();
+ }
+};
+
+Promise.prototype._cancel = function() {
+ if (!this._isCancellable()) return;
+ this._setCancelled();
+ async.invoke(this._cancelPromises, this, undefined);
+};
+
+Promise.prototype._cancelPromises = function() {
+ if (this._length() > 0) this._settlePromises();
+};
+
+Promise.prototype._unsetOnCancel = function() {
+ this._onCancelField = undefined;
+};
+
+Promise.prototype._isCancellable = function() {
+ return this.isPending() && !this._isCancelled();
+};
+
+Promise.prototype.isCancellable = function() {
+ return this.isPending() && !this.isCancelled();
+};
+
+Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
+ if (util.isArray(onCancelCallback)) {
+ for (var i = 0; i < onCancelCallback.length; ++i) {
+ this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
+ }
+ } else if (onCancelCallback !== undefined) {
+ if (typeof onCancelCallback === "function") {
+ if (!internalOnly) {
+ var e = tryCatch(onCancelCallback).call(this._boundValue());
+ if (e === errorObj) {
+ this._attachExtraTrace(e.e);
+ async.throwLater(e.e);
+ }
+ }
+ } else {
+ onCancelCallback._resultCancelled(this);
+ }
+ }
+};
+
+Promise.prototype._invokeOnCancel = function() {
+ var onCancelCallback = this._onCancel();
+ this._unsetOnCancel();
+ async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
+};
+
+Promise.prototype._invokeInternalOnCancel = function() {
+ if (this._isCancellable()) {
+ this._doInvokeOnCancel(this._onCancel(), true);
+ this._unsetOnCancel();
+ }
+};
+
+Promise.prototype._resultCancelled = function() {
+ this.cancel();
+};
+
+};
+
+},{"./util":21}],5:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(NEXT_FILTER) {
+var util = _dereq_("./util");
+var getKeys = _dereq_("./es5").keys;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function catchFilter(instances, cb, promise) {
+ return function(e) {
+ var boundTo = promise._boundValue();
+ predicateLoop: for (var i = 0; i < instances.length; ++i) {
+ var item = instances[i];
+
+ if (item === Error ||
+ (item != null && item.prototype instanceof Error)) {
+ if (e instanceof item) {
+ return tryCatch(cb).call(boundTo, e);
+ }
+ } else if (typeof item === "function") {
+ var matchesPredicate = tryCatch(item).call(boundTo, e);
+ if (matchesPredicate === errorObj) {
+ return matchesPredicate;
+ } else if (matchesPredicate) {
+ return tryCatch(cb).call(boundTo, e);
+ }
+ } else if (util.isObject(e)) {
+ var keys = getKeys(item);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ if (item[key] != e[key]) {
+ continue predicateLoop;
+ }
+ }
+ return tryCatch(cb).call(boundTo, e);
+ }
+ }
+ return NEXT_FILTER;
+ };
+}
+
+return catchFilter;
+};
+
+},{"./es5":10,"./util":21}],6:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var longStackTraces = false;
+var contextStack = [];
+
+Promise.prototype._promiseCreated = function() {};
+Promise.prototype._pushContext = function() {};
+Promise.prototype._popContext = function() {return null;};
+Promise._peekContext = Promise.prototype._peekContext = function() {};
+
+function Context() {
+ this._trace = new Context.CapturedTrace(peekContext());
+}
+Context.prototype._pushContext = function () {
+ if (this._trace !== undefined) {
+ this._trace._promiseCreated = null;
+ contextStack.push(this._trace);
+ }
+};
+
+Context.prototype._popContext = function () {
+ if (this._trace !== undefined) {
+ var trace = contextStack.pop();
+ var ret = trace._promiseCreated;
+ trace._promiseCreated = null;
+ return ret;
+ }
+ return null;
+};
+
+function createContext() {
+ if (longStackTraces) return new Context();
+}
+
+function peekContext() {
+ var lastIndex = contextStack.length - 1;
+ if (lastIndex >= 0) {
+ return contextStack[lastIndex];
+ }
+ return undefined;
+}
+Context.CapturedTrace = null;
+Context.create = createContext;
+Context.deactivateLongStackTraces = function() {};
+Context.activateLongStackTraces = function() {
+ var Promise_pushContext = Promise.prototype._pushContext;
+ var Promise_popContext = Promise.prototype._popContext;
+ var Promise_PeekContext = Promise._peekContext;
+ var Promise_peekContext = Promise.prototype._peekContext;
+ var Promise_promiseCreated = Promise.prototype._promiseCreated;
+ Context.deactivateLongStackTraces = function() {
+ Promise.prototype._pushContext = Promise_pushContext;
+ Promise.prototype._popContext = Promise_popContext;
+ Promise._peekContext = Promise_PeekContext;
+ Promise.prototype._peekContext = Promise_peekContext;
+ Promise.prototype._promiseCreated = Promise_promiseCreated;
+ longStackTraces = false;
+ };
+ longStackTraces = true;
+ Promise.prototype._pushContext = Context.prototype._pushContext;
+ Promise.prototype._popContext = Context.prototype._popContext;
+ Promise._peekContext = Promise.prototype._peekContext = peekContext;
+ Promise.prototype._promiseCreated = function() {
+ var ctx = this._peekContext();
+ if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
+ };
+};
+return Context;
+};
+
+},{}],7:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, Context,
+ enableAsyncHooks, disableAsyncHooks) {
+var async = Promise._async;
+var Warning = _dereq_("./errors").Warning;
+var util = _dereq_("./util");
+var es5 = _dereq_("./es5");
+var canAttachTrace = util.canAttachTrace;
+var unhandledRejectionHandled;
+var possiblyUnhandledRejection;
+var bluebirdFramePattern =
+ /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
+var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
+var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
+var stackFramePattern = null;
+var formatStack = null;
+var indentStackFrames = false;
+var printWarning;
+var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
+ (true ||
+ util.env("BLUEBIRD_DEBUG") ||
+ util.env("NODE_ENV") === "development"));
+
+var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
+ (debugging || util.env("BLUEBIRD_WARNINGS")));
+
+var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
+ (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
+
+var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
+ (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
+
+var deferUnhandledRejectionCheck;
+(function() {
+ var promises = [];
+
+ function unhandledRejectionCheck() {
+ for (var i = 0; i < promises.length; ++i) {
+ promises[i]._notifyUnhandledRejection();
+ }
+ unhandledRejectionClear();
+ }
+
+ function unhandledRejectionClear() {
+ promises.length = 0;
+ }
+
+ deferUnhandledRejectionCheck = function(promise) {
+ promises.push(promise);
+ setTimeout(unhandledRejectionCheck, 1);
+ };
+
+ es5.defineProperty(Promise, "_unhandledRejectionCheck", {
+ value: unhandledRejectionCheck
+ });
+ es5.defineProperty(Promise, "_unhandledRejectionClear", {
+ value: unhandledRejectionClear
+ });
+})();
+
+Promise.prototype.suppressUnhandledRejections = function() {
+ var target = this._target();
+ target._bitField = ((target._bitField & (~1048576)) |
+ 524288);
+};
+
+Promise.prototype._ensurePossibleRejectionHandled = function () {
+ if ((this._bitField & 524288) !== 0) return;
+ this._setRejectionIsUnhandled();
+ deferUnhandledRejectionCheck(this);
+};
+
+Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
+ fireRejectionEvent("rejectionHandled",
+ unhandledRejectionHandled, undefined, this);
+};
+
+Promise.prototype._setReturnedNonUndefined = function() {
+ this._bitField = this._bitField | 268435456;
+};
+
+Promise.prototype._returnedNonUndefined = function() {
+ return (this._bitField & 268435456) !== 0;
+};
+
+Promise.prototype._notifyUnhandledRejection = function () {
+ if (this._isRejectionUnhandled()) {
+ var reason = this._settledValue();
+ this._setUnhandledRejectionIsNotified();
+ fireRejectionEvent("unhandledRejection",
+ possiblyUnhandledRejection, reason, this);
+ }
+};
+
+Promise.prototype._setUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField | 262144;
+};
+
+Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField & (~262144);
+};
+
+Promise.prototype._isUnhandledRejectionNotified = function () {
+ return (this._bitField & 262144) > 0;
+};
+
+Promise.prototype._setRejectionIsUnhandled = function () {
+ this._bitField = this._bitField | 1048576;
+};
+
+Promise.prototype._unsetRejectionIsUnhandled = function () {
+ this._bitField = this._bitField & (~1048576);
+ if (this._isUnhandledRejectionNotified()) {
+ this._unsetUnhandledRejectionIsNotified();
+ this._notifyUnhandledRejectionIsHandled();
+ }
+};
+
+Promise.prototype._isRejectionUnhandled = function () {
+ return (this._bitField & 1048576) > 0;
+};
+
+Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
+ return warn(message, shouldUseOwnTrace, promise || this);
+};
+
+Promise.onPossiblyUnhandledRejection = function (fn) {
+ var context = Promise._getContext();
+ possiblyUnhandledRejection = util.contextBind(context, fn);
+};
+
+Promise.onUnhandledRejectionHandled = function (fn) {
+ var context = Promise._getContext();
+ unhandledRejectionHandled = util.contextBind(context, fn);
+};
+
+var disableLongStackTraces = function() {};
+Promise.longStackTraces = function () {
+ if (async.haveItemsQueued() && !config.longStackTraces) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ if (!config.longStackTraces && longStackTracesIsSupported()) {
+ var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
+ var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
+ var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
+ config.longStackTraces = true;
+ disableLongStackTraces = function() {
+ if (async.haveItemsQueued() && !config.longStackTraces) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ Promise.prototype._captureStackTrace = Promise_captureStackTrace;
+ Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
+ Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
+ Context.deactivateLongStackTraces();
+ config.longStackTraces = false;
+ };
+ Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
+ Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
+ Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
+ Context.activateLongStackTraces();
+ }
+};
+
+Promise.hasLongStackTraces = function () {
+ return config.longStackTraces && longStackTracesIsSupported();
+};
+
+
+var legacyHandlers = {
+ unhandledrejection: {
+ before: function() {
+ var ret = util.global.onunhandledrejection;
+ util.global.onunhandledrejection = null;
+ return ret;
+ },
+ after: function(fn) {
+ util.global.onunhandledrejection = fn;
+ }
+ },
+ rejectionhandled: {
+ before: function() {
+ var ret = util.global.onrejectionhandled;
+ util.global.onrejectionhandled = null;
+ return ret;
+ },
+ after: function(fn) {
+ util.global.onrejectionhandled = fn;
+ }
+ }
+};
+
+var fireDomEvent = (function() {
+ var dispatch = function(legacy, e) {
+ if (legacy) {
+ var fn;
+ try {
+ fn = legacy.before();
+ return !util.global.dispatchEvent(e);
+ } finally {
+ legacy.after(fn);
+ }
+ } else {
+ return !util.global.dispatchEvent(e);
+ }
+ };
+ try {
+ if (typeof CustomEvent === "function") {
+ var event = new CustomEvent("CustomEvent");
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var eventData = {
+ detail: event,
+ cancelable: true
+ };
+ var domEvent = new CustomEvent(name, eventData);
+ es5.defineProperty(
+ domEvent, "promise", {value: event.promise});
+ es5.defineProperty(
+ domEvent, "reason", {value: event.reason});
+
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ } else if (typeof Event === "function") {
+ var event = new Event("CustomEvent");
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var domEvent = new Event(name, {
+ cancelable: true
+ });
+ domEvent.detail = event;
+ es5.defineProperty(domEvent, "promise", {value: event.promise});
+ es5.defineProperty(domEvent, "reason", {value: event.reason});
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ } else {
+ var event = document.createEvent("CustomEvent");
+ event.initCustomEvent("testingtheevent", false, true, {});
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var domEvent = document.createEvent("CustomEvent");
+ domEvent.initCustomEvent(name, false, true,
+ event);
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ }
+ } catch (e) {}
+ return function() {
+ return false;
+ };
+})();
+
+var fireGlobalEvent = (function() {
+ if (util.isNode) {
+ return function() {
+ return process.emit.apply(process, arguments);
+ };
+ } else {
+ if (!util.global) {
+ return function() {
+ return false;
+ };
+ }
+ return function(name) {
+ var methodName = "on" + name.toLowerCase();
+ var method = util.global[methodName];
+ if (!method) return false;
+ method.apply(util.global, [].slice.call(arguments, 1));
+ return true;
+ };
+ }
+})();
+
+function generatePromiseLifecycleEventObject(name, promise) {
+ return {promise: promise};
+}
+
+var eventToObjectGenerator = {
+ promiseCreated: generatePromiseLifecycleEventObject,
+ promiseFulfilled: generatePromiseLifecycleEventObject,
+ promiseRejected: generatePromiseLifecycleEventObject,
+ promiseResolved: generatePromiseLifecycleEventObject,
+ promiseCancelled: generatePromiseLifecycleEventObject,
+ promiseChained: function(name, promise, child) {
+ return {promise: promise, child: child};
+ },
+ warning: function(name, warning) {
+ return {warning: warning};
+ },
+ unhandledRejection: function (name, reason, promise) {
+ return {reason: reason, promise: promise};
+ },
+ rejectionHandled: generatePromiseLifecycleEventObject
+};
+
+var activeFireEvent = function (name) {
+ var globalEventFired = false;
+ try {
+ globalEventFired = fireGlobalEvent.apply(null, arguments);
+ } catch (e) {
+ async.throwLater(e);
+ globalEventFired = true;
+ }
+
+ var domEventFired = false;
+ try {
+ domEventFired = fireDomEvent(name,
+ eventToObjectGenerator[name].apply(null, arguments));
+ } catch (e) {
+ async.throwLater(e);
+ domEventFired = true;
+ }
+
+ return domEventFired || globalEventFired;
+};
+
+Promise.config = function(opts) {
+ opts = Object(opts);
+ if ("longStackTraces" in opts) {
+ if (opts.longStackTraces) {
+ Promise.longStackTraces();
+ } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
+ disableLongStackTraces();
+ }
+ }
+ if ("warnings" in opts) {
+ var warningsOption = opts.warnings;
+ config.warnings = !!warningsOption;
+ wForgottenReturn = config.warnings;
+
+ if (util.isObject(warningsOption)) {
+ if ("wForgottenReturn" in warningsOption) {
+ wForgottenReturn = !!warningsOption.wForgottenReturn;
+ }
+ }
+ }
+ if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
+ if (async.haveItemsQueued()) {
+ throw new Error(
+ "cannot enable cancellation after promises are in use");
+ }
+ Promise.prototype._clearCancellationData =
+ cancellationClearCancellationData;
+ Promise.prototype._propagateFrom = cancellationPropagateFrom;
+ Promise.prototype._onCancel = cancellationOnCancel;
+ Promise.prototype._setOnCancel = cancellationSetOnCancel;
+ Promise.prototype._attachCancellationCallback =
+ cancellationAttachCancellationCallback;
+ Promise.prototype._execute = cancellationExecute;
+ propagateFromFunction = cancellationPropagateFrom;
+ config.cancellation = true;
+ }
+ if ("monitoring" in opts) {
+ if (opts.monitoring && !config.monitoring) {
+ config.monitoring = true;
+ Promise.prototype._fireEvent = activeFireEvent;
+ } else if (!opts.monitoring && config.monitoring) {
+ config.monitoring = false;
+ Promise.prototype._fireEvent = defaultFireEvent;
+ }
+ }
+ if ("asyncHooks" in opts && util.nodeSupportsAsyncResource) {
+ var prev = config.asyncHooks;
+ var cur = !!opts.asyncHooks;
+ if (prev !== cur) {
+ config.asyncHooks = cur;
+ if (cur) {
+ enableAsyncHooks();
+ } else {
+ disableAsyncHooks();
+ }
+ }
+ }
+ return Promise;
+};
+
+function defaultFireEvent() { return false; }
+
+Promise.prototype._fireEvent = defaultFireEvent;
+Promise.prototype._execute = function(executor, resolve, reject) {
+ try {
+ executor(resolve, reject);
+ } catch (e) {
+ return e;
+ }
+};
+Promise.prototype._onCancel = function () {};
+Promise.prototype._setOnCancel = function (handler) { ; };
+Promise.prototype._attachCancellationCallback = function(onCancel) {
+ ;
+};
+Promise.prototype._captureStackTrace = function () {};
+Promise.prototype._attachExtraTrace = function () {};
+Promise.prototype._dereferenceTrace = function () {};
+Promise.prototype._clearCancellationData = function() {};
+Promise.prototype._propagateFrom = function (parent, flags) {
+ ;
+ ;
+};
+
+function cancellationExecute(executor, resolve, reject) {
+ var promise = this;
+ try {
+ executor(resolve, reject, function(onCancel) {
+ if (typeof onCancel !== "function") {
+ throw new TypeError("onCancel must be a function, got: " +
+ util.toString(onCancel));
+ }
+ promise._attachCancellationCallback(onCancel);
+ });
+ } catch (e) {
+ return e;
+ }
+}
+
+function cancellationAttachCancellationCallback(onCancel) {
+ if (!this._isCancellable()) return this;
+
+ var previousOnCancel = this._onCancel();
+ if (previousOnCancel !== undefined) {
+ if (util.isArray(previousOnCancel)) {
+ previousOnCancel.push(onCancel);
+ } else {
+ this._setOnCancel([previousOnCancel, onCancel]);
+ }
+ } else {
+ this._setOnCancel(onCancel);
+ }
+}
+
+function cancellationOnCancel() {
+ return this._onCancelField;
+}
+
+function cancellationSetOnCancel(onCancel) {
+ this._onCancelField = onCancel;
+}
+
+function cancellationClearCancellationData() {
+ this._cancellationParent = undefined;
+ this._onCancelField = undefined;
+}
+
+function cancellationPropagateFrom(parent, flags) {
+ if ((flags & 1) !== 0) {
+ this._cancellationParent = parent;
+ var branchesRemainingToCancel = parent._branchesRemainingToCancel;
+ if (branchesRemainingToCancel === undefined) {
+ branchesRemainingToCancel = 0;
+ }
+ parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
+ }
+ if ((flags & 2) !== 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+}
+
+function bindingPropagateFrom(parent, flags) {
+ if ((flags & 2) !== 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+}
+var propagateFromFunction = bindingPropagateFrom;
+
+function boundValueFunction() {
+ var ret = this._boundTo;
+ if (ret !== undefined) {
+ if (ret instanceof Promise) {
+ if (ret.isFulfilled()) {
+ return ret.value();
+ } else {
+ return undefined;
+ }
+ }
+ }
+ return ret;
+}
+
+function longStackTracesCaptureStackTrace() {
+ this._trace = new CapturedTrace(this._peekContext());
+}
+
+function longStackTracesAttachExtraTrace(error, ignoreSelf) {
+ if (canAttachTrace(error)) {
+ var trace = this._trace;
+ if (trace !== undefined) {
+ if (ignoreSelf) trace = trace._parent;
+ }
+ if (trace !== undefined) {
+ trace.attachExtraTrace(error);
+ } else if (!error.__stackCleaned__) {
+ var parsed = parseStackAndMessage(error);
+ util.notEnumerableProp(error, "stack",
+ parsed.message + "\n" + parsed.stack.join("\n"));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+ }
+ }
+}
+
+function longStackTracesDereferenceTrace() {
+ this._trace = undefined;
+}
+
+function checkForgottenReturns(returnValue, promiseCreated, name, promise,
+ parent) {
+ if (returnValue === undefined && promiseCreated !== null &&
+ wForgottenReturn) {
+ if (parent !== undefined && parent._returnedNonUndefined()) return;
+ if ((promise._bitField & 65535) === 0) return;
+
+ if (name) name = name + " ";
+ var handlerLine = "";
+ var creatorLine = "";
+ if (promiseCreated._trace) {
+ var traceLines = promiseCreated._trace.stack.split("\n");
+ var stack = cleanStack(traceLines);
+ for (var i = stack.length - 1; i >= 0; --i) {
+ var line = stack[i];
+ if (!nodeFramePattern.test(line)) {
+ var lineMatches = line.match(parseLinePattern);
+ if (lineMatches) {
+ handlerLine = "at " + lineMatches[1] +
+ ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
+ }
+ break;
+ }
+ }
+
+ if (stack.length > 0) {
+ var firstUserLine = stack[0];
+ for (var i = 0; i < traceLines.length; ++i) {
+
+ if (traceLines[i] === firstUserLine) {
+ if (i > 0) {
+ creatorLine = "\n" + traceLines[i - 1];
+ }
+ break;
+ }
+ }
+
+ }
+ }
+ var msg = "a promise was created in a " + name +
+ "handler " + handlerLine + "but was not returned from it, " +
+ "see http://goo.gl/rRqMUw" +
+ creatorLine;
+ promise._warn(msg, true, promiseCreated);
+ }
+}
+
+function deprecated(name, replacement) {
+ var message = name +
+ " is deprecated and will be removed in a future version.";
+ if (replacement) message += " Use " + replacement + " instead.";
+ return warn(message);
+}
+
+function warn(message, shouldUseOwnTrace, promise) {
+ if (!config.warnings) return;
+ var warning = new Warning(message);
+ var ctx;
+ if (shouldUseOwnTrace) {
+ promise._attachExtraTrace(warning);
+ } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
+ ctx.attachExtraTrace(warning);
+ } else {
+ var parsed = parseStackAndMessage(warning);
+ warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
+ }
+
+ if (!activeFireEvent("warning", warning)) {
+ formatAndLogError(warning, "", true);
+ }
+}
+
+function reconstructStack(message, stacks) {
+ for (var i = 0; i < stacks.length - 1; ++i) {
+ stacks[i].push("From previous event:");
+ stacks[i] = stacks[i].join("\n");
+ }
+ if (i < stacks.length) {
+ stacks[i] = stacks[i].join("\n");
+ }
+ return message + "\n" + stacks.join("\n");
+}
+
+function removeDuplicateOrEmptyJumps(stacks) {
+ for (var i = 0; i < stacks.length; ++i) {
+ if (stacks[i].length === 0 ||
+ ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
+ stacks.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function removeCommonRoots(stacks) {
+ var current = stacks[0];
+ for (var i = 1; i < stacks.length; ++i) {
+ var prev = stacks[i];
+ var currentLastIndex = current.length - 1;
+ var currentLastLine = current[currentLastIndex];
+ var commonRootMeetPoint = -1;
+
+ for (var j = prev.length - 1; j >= 0; --j) {
+ if (prev[j] === currentLastLine) {
+ commonRootMeetPoint = j;
+ break;
+ }
+ }
+
+ for (var j = commonRootMeetPoint; j >= 0; --j) {
+ var line = prev[j];
+ if (current[currentLastIndex] === line) {
+ current.pop();
+ currentLastIndex--;
+ } else {
+ break;
+ }
+ }
+ current = prev;
+ }
+}
+
+function cleanStack(stack) {
+ var ret = [];
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ var isTraceLine = " (No stack trace)" === line ||
+ stackFramePattern.test(line);
+ var isInternalFrame = isTraceLine && shouldIgnore(line);
+ if (isTraceLine && !isInternalFrame) {
+ if (indentStackFrames && line.charAt(0) !== " ") {
+ line = " " + line;
+ }
+ ret.push(line);
+ }
+ }
+ return ret;
+}
+
+function stackFramesAsArray(error) {
+ var stack = error.stack.replace(/\s+$/g, "").split("\n");
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ if (" (No stack trace)" === line || stackFramePattern.test(line)) {
+ break;
+ }
+ }
+ if (i > 0 && error.name != "SyntaxError") {
+ stack = stack.slice(i);
+ }
+ return stack;
+}
+
+function parseStackAndMessage(error) {
+ var stack = error.stack;
+ var message = error.toString();
+ stack = typeof stack === "string" && stack.length > 0
+ ? stackFramesAsArray(error) : [" (No stack trace)"];
+ return {
+ message: message,
+ stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
+ };
+}
+
+function formatAndLogError(error, title, isSoft) {
+ if (typeof console !== "undefined") {
+ var message;
+ if (util.isObject(error)) {
+ var stack = error.stack;
+ message = title + formatStack(stack, error);
+ } else {
+ message = title + String(error);
+ }
+ if (typeof printWarning === "function") {
+ printWarning(message, isSoft);
+ } else if (typeof console.log === "function" ||
+ typeof console.log === "object") {
+ console.log(message);
+ }
+ }
+}
+
+function fireRejectionEvent(name, localHandler, reason, promise) {
+ var localEventFired = false;
+ try {
+ if (typeof localHandler === "function") {
+ localEventFired = true;
+ if (name === "rejectionHandled") {
+ localHandler(promise);
+ } else {
+ localHandler(reason, promise);
+ }
+ }
+ } catch (e) {
+ async.throwLater(e);
+ }
+
+ if (name === "unhandledRejection") {
+ if (!activeFireEvent(name, reason, promise) && !localEventFired) {
+ formatAndLogError(reason, "Unhandled rejection ");
+ }
+ } else {
+ activeFireEvent(name, promise);
+ }
+}
+
+function formatNonError(obj) {
+ var str;
+ if (typeof obj === "function") {
+ str = "[function " +
+ (obj.name || "anonymous") +
+ "]";
+ } else {
+ str = obj && typeof obj.toString === "function"
+ ? obj.toString() : util.toString(obj);
+ var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
+ if (ruselessToString.test(str)) {
+ try {
+ var newStr = JSON.stringify(obj);
+ str = newStr;
+ }
+ catch(e) {
+
+ }
+ }
+ if (str.length === 0) {
+ str = "(empty array)";
+ }
+ }
+ return ("(<" + snip(str) + ">, no stack trace)");
+}
+
+function snip(str) {
+ var maxChars = 41;
+ if (str.length < maxChars) {
+ return str;
+ }
+ return str.substr(0, maxChars - 3) + "...";
+}
+
+function longStackTracesIsSupported() {
+ return typeof captureStackTrace === "function";
+}
+
+var shouldIgnore = function() { return false; };
+var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
+function parseLineInfo(line) {
+ var matches = line.match(parseLineInfoRegex);
+ if (matches) {
+ return {
+ fileName: matches[1],
+ line: parseInt(matches[2], 10)
+ };
+ }
+}
+
+function setBounds(firstLineError, lastLineError) {
+ if (!longStackTracesIsSupported()) return;
+ var firstStackLines = (firstLineError.stack || "").split("\n");
+ var lastStackLines = (lastLineError.stack || "").split("\n");
+ var firstIndex = -1;
+ var lastIndex = -1;
+ var firstFileName;
+ var lastFileName;
+ for (var i = 0; i < firstStackLines.length; ++i) {
+ var result = parseLineInfo(firstStackLines[i]);
+ if (result) {
+ firstFileName = result.fileName;
+ firstIndex = result.line;
+ break;
+ }
+ }
+ for (var i = 0; i < lastStackLines.length; ++i) {
+ var result = parseLineInfo(lastStackLines[i]);
+ if (result) {
+ lastFileName = result.fileName;
+ lastIndex = result.line;
+ break;
+ }
+ }
+ if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
+ firstFileName !== lastFileName || firstIndex >= lastIndex) {
+ return;
+ }
+
+ shouldIgnore = function(line) {
+ if (bluebirdFramePattern.test(line)) return true;
+ var info = parseLineInfo(line);
+ if (info) {
+ if (info.fileName === firstFileName &&
+ (firstIndex <= info.line && info.line <= lastIndex)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+
+function CapturedTrace(parent) {
+ this._parent = parent;
+ this._promisesCreated = 0;
+ var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
+ captureStackTrace(this, CapturedTrace);
+ if (length > 32) this.uncycle();
+}
+util.inherits(CapturedTrace, Error);
+Context.CapturedTrace = CapturedTrace;
+
+CapturedTrace.prototype.uncycle = function() {
+ var length = this._length;
+ if (length < 2) return;
+ var nodes = [];
+ var stackToIndex = {};
+
+ for (var i = 0, node = this; node !== undefined; ++i) {
+ nodes.push(node);
+ node = node._parent;
+ }
+ length = this._length = i;
+ for (var i = length - 1; i >= 0; --i) {
+ var stack = nodes[i].stack;
+ if (stackToIndex[stack] === undefined) {
+ stackToIndex[stack] = i;
+ }
+ }
+ for (var i = 0; i < length; ++i) {
+ var currentStack = nodes[i].stack;
+ var index = stackToIndex[currentStack];
+ if (index !== undefined && index !== i) {
+ if (index > 0) {
+ nodes[index - 1]._parent = undefined;
+ nodes[index - 1]._length = 1;
+ }
+ nodes[i]._parent = undefined;
+ nodes[i]._length = 1;
+ var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
+
+ if (index < length - 1) {
+ cycleEdgeNode._parent = nodes[index + 1];
+ cycleEdgeNode._parent.uncycle();
+ cycleEdgeNode._length =
+ cycleEdgeNode._parent._length + 1;
+ } else {
+ cycleEdgeNode._parent = undefined;
+ cycleEdgeNode._length = 1;
+ }
+ var currentChildLength = cycleEdgeNode._length + 1;
+ for (var j = i - 2; j >= 0; --j) {
+ nodes[j]._length = currentChildLength;
+ currentChildLength++;
+ }
+ return;
+ }
+ }
+};
+
+CapturedTrace.prototype.attachExtraTrace = function(error) {
+ if (error.__stackCleaned__) return;
+ this.uncycle();
+ var parsed = parseStackAndMessage(error);
+ var message = parsed.message;
+ var stacks = [parsed.stack];
+
+ var trace = this;
+ while (trace !== undefined) {
+ stacks.push(cleanStack(trace.stack.split("\n")));
+ trace = trace._parent;
+ }
+ removeCommonRoots(stacks);
+ removeDuplicateOrEmptyJumps(stacks);
+ util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+};
+
+var captureStackTrace = (function stackDetection() {
+ var v8stackFramePattern = /^\s*at\s*/;
+ var v8stackFormatter = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if (error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ if (typeof Error.stackTraceLimit === "number" &&
+ typeof Error.captureStackTrace === "function") {
+ Error.stackTraceLimit += 6;
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ var captureStackTrace = Error.captureStackTrace;
+
+ shouldIgnore = function(line) {
+ return bluebirdFramePattern.test(line);
+ };
+ return function(receiver, ignoreUntil) {
+ Error.stackTraceLimit += 6;
+ captureStackTrace(receiver, ignoreUntil);
+ Error.stackTraceLimit -= 6;
+ };
+ }
+ var err = new Error();
+
+ if (typeof err.stack === "string" &&
+ err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
+ stackFramePattern = /@/;
+ formatStack = v8stackFormatter;
+ indentStackFrames = true;
+ return function captureStackTrace(o) {
+ o.stack = new Error().stack;
+ };
+ }
+
+ var hasStackAfterThrow;
+ try { throw new Error(); }
+ catch(e) {
+ hasStackAfterThrow = ("stack" in e);
+ }
+ if (!("stack" in err) && hasStackAfterThrow &&
+ typeof Error.stackTraceLimit === "number") {
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ return function captureStackTrace(o) {
+ Error.stackTraceLimit += 6;
+ try { throw new Error(); }
+ catch(e) { o.stack = e.stack; }
+ Error.stackTraceLimit -= 6;
+ };
+ }
+
+ formatStack = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if ((typeof error === "object" ||
+ typeof error === "function") &&
+ error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ return null;
+
+})([]);
+
+if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
+ printWarning = function (message) {
+ console.warn(message);
+ };
+ if (util.isNode && process.stderr.isTTY) {
+ printWarning = function(message, isSoft) {
+ var color = isSoft ? "\u001b[33m" : "\u001b[31m";
+ console.warn(color + message + "\u001b[0m\n");
+ };
+ } else if (!util.isNode && typeof (new Error().stack) === "string") {
+ printWarning = function(message, isSoft) {
+ console.warn("%c" + message,
+ isSoft ? "color: darkorange" : "color: red");
+ };
+ }
+}
+
+var config = {
+ warnings: warnings,
+ longStackTraces: false,
+ cancellation: false,
+ monitoring: false,
+ asyncHooks: false
+};
+
+if (longStackTraces) Promise.longStackTraces();
+
+return {
+ asyncHooks: function() {
+ return config.asyncHooks;
+ },
+ longStackTraces: function() {
+ return config.longStackTraces;
+ },
+ warnings: function() {
+ return config.warnings;
+ },
+ cancellation: function() {
+ return config.cancellation;
+ },
+ monitoring: function() {
+ return config.monitoring;
+ },
+ propagateFromFunction: function() {
+ return propagateFromFunction;
+ },
+ boundValueFunction: function() {
+ return boundValueFunction;
+ },
+ checkForgottenReturns: checkForgottenReturns,
+ setBounds: setBounds,
+ warn: warn,
+ deprecated: deprecated,
+ CapturedTrace: CapturedTrace,
+ fireDomEvent: fireDomEvent,
+ fireGlobalEvent: fireGlobalEvent
+};
+};
+
+},{"./errors":9,"./es5":10,"./util":21}],8:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+function returner() {
+ return this.value;
+}
+function thrower() {
+ throw this.reason;
+}
+
+Promise.prototype["return"] =
+Promise.prototype.thenReturn = function (value) {
+ if (value instanceof Promise) value.suppressUnhandledRejections();
+ return this._then(
+ returner, undefined, undefined, {value: value}, undefined);
+};
+
+Promise.prototype["throw"] =
+Promise.prototype.thenThrow = function (reason) {
+ return this._then(
+ thrower, undefined, undefined, {reason: reason}, undefined);
+};
+
+Promise.prototype.catchThrow = function (reason) {
+ if (arguments.length <= 1) {
+ return this._then(
+ undefined, thrower, undefined, {reason: reason}, undefined);
+ } else {
+ var _reason = arguments[1];
+ var handler = function() {throw _reason;};
+ return this.caught(reason, handler);
+ }
+};
+
+Promise.prototype.catchReturn = function (value) {
+ if (arguments.length <= 1) {
+ if (value instanceof Promise) value.suppressUnhandledRejections();
+ return this._then(
+ undefined, returner, undefined, {value: value}, undefined);
+ } else {
+ var _value = arguments[1];
+ if (_value instanceof Promise) _value.suppressUnhandledRejections();
+ var handler = function() {return _value;};
+ return this.caught(value, handler);
+ }
+};
+};
+
+},{}],9:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5");
+var Objectfreeze = es5.freeze;
+var util = _dereq_("./util");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+
+function subError(nameProperty, defaultMessage) {
+ function SubError(message) {
+ if (!(this instanceof SubError)) return new SubError(message);
+ notEnumerableProp(this, "message",
+ typeof message === "string" ? message : defaultMessage);
+ notEnumerableProp(this, "name", nameProperty);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ Error.call(this);
+ }
+ }
+ inherits(SubError, Error);
+ return SubError;
+}
+
+var _TypeError, _RangeError;
+var Warning = subError("Warning", "warning");
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+var AggregateError = subError("AggregateError", "aggregate error");
+try {
+ _TypeError = TypeError;
+ _RangeError = RangeError;
+} catch(e) {
+ _TypeError = subError("TypeError", "type error");
+ _RangeError = subError("RangeError", "range error");
+}
+
+var methods = ("join pop push shift unshift slice filter forEach some " +
+ "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
+
+for (var i = 0; i < methods.length; ++i) {
+ if (typeof Array.prototype[methods[i]] === "function") {
+ AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
+ }
+}
+
+es5.defineProperty(AggregateError.prototype, "length", {
+ value: 0,
+ configurable: false,
+ writable: true,
+ enumerable: true
+});
+AggregateError.prototype["isOperational"] = true;
+var level = 0;
+AggregateError.prototype.toString = function() {
+ var indent = Array(level * 4 + 1).join(" ");
+ var ret = "\n" + indent + "AggregateError of:" + "\n";
+ level++;
+ indent = Array(level * 4 + 1).join(" ");
+ for (var i = 0; i < this.length; ++i) {
+ var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
+ var lines = str.split("\n");
+ for (var j = 0; j < lines.length; ++j) {
+ lines[j] = indent + lines[j];
+ }
+ str = lines.join("\n");
+ ret += str + "\n";
+ }
+ level--;
+ return ret;
+};
+
+function OperationalError(message) {
+ if (!(this instanceof OperationalError))
+ return new OperationalError(message);
+ notEnumerableProp(this, "name", "OperationalError");
+ notEnumerableProp(this, "message", message);
+ this.cause = message;
+ this["isOperational"] = true;
+
+ if (message instanceof Error) {
+ notEnumerableProp(this, "message", message.message);
+ notEnumerableProp(this, "stack", message.stack);
+ } else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(OperationalError, Error);
+
+var errorTypes = Error["__BluebirdErrorTypes__"];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ OperationalError: OperationalError,
+ RejectionError: OperationalError,
+ AggregateError: AggregateError
+ });
+ es5.defineProperty(Error, "__BluebirdErrorTypes__", {
+ value: errorTypes,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: _TypeError,
+ RangeError: _RangeError,
+ CancellationError: errorTypes.CancellationError,
+ OperationalError: errorTypes.OperationalError,
+ TimeoutError: errorTypes.TimeoutError,
+ AggregateError: errorTypes.AggregateError,
+ Warning: Warning
+};
+
+},{"./es5":10,"./util":21}],10:[function(_dereq_,module,exports){
+var isES5 = (function(){
+ "use strict";
+ return this === undefined;
+})();
+
+if (isES5) {
+ module.exports = {
+ freeze: Object.freeze,
+ defineProperty: Object.defineProperty,
+ getDescriptor: Object.getOwnPropertyDescriptor,
+ keys: Object.keys,
+ names: Object.getOwnPropertyNames,
+ getPrototypeOf: Object.getPrototypeOf,
+ isArray: Array.isArray,
+ isES5: isES5,
+ propertyIsWritable: function(obj, prop) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
+ return !!(!descriptor || descriptor.writable || descriptor.set);
+ }
+ };
+} else {
+ var has = {}.hasOwnProperty;
+ var str = {}.toString;
+ var proto = {}.constructor.prototype;
+
+ var ObjectKeys = function (o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+
+ var ObjectGetDescriptor = function(o, key) {
+ return {value: o[key]};
+ };
+
+ var ObjectDefineProperty = function (o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ };
+
+ var ObjectFreeze = function (obj) {
+ return obj;
+ };
+
+ var ObjectGetPrototypeOf = function (obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ };
+
+ var ArrayIsArray = function (obj) {
+ try {
+ return str.call(obj) === "[object Array]";
+ }
+ catch(e) {
+ return false;
+ }
+ };
+
+ module.exports = {
+ isArray: ArrayIsArray,
+ keys: ObjectKeys,
+ names: ObjectKeys,
+ defineProperty: ObjectDefineProperty,
+ getDescriptor: ObjectGetDescriptor,
+ freeze: ObjectFreeze,
+ getPrototypeOf: ObjectGetPrototypeOf,
+ isES5: isES5,
+ propertyIsWritable: function() {
+ return true;
+ }
+ };
+}
+
+},{}],11:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
+var util = _dereq_("./util");
+var CancellationError = Promise.CancellationError;
+var errorObj = util.errorObj;
+var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
+
+function PassThroughHandlerContext(promise, type, handler) {
+ this.promise = promise;
+ this.type = type;
+ this.handler = handler;
+ this.called = false;
+ this.cancelPromise = null;
+}
+
+PassThroughHandlerContext.prototype.isFinallyHandler = function() {
+ return this.type === 0;
+};
+
+function FinallyHandlerCancelReaction(finallyHandler) {
+ this.finallyHandler = finallyHandler;
+}
+
+FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
+ checkCancel(this.finallyHandler);
+};
+
+function checkCancel(ctx, reason) {
+ if (ctx.cancelPromise != null) {
+ if (arguments.length > 1) {
+ ctx.cancelPromise._reject(reason);
+ } else {
+ ctx.cancelPromise._cancel();
+ }
+ ctx.cancelPromise = null;
+ return true;
+ }
+ return false;
+}
+
+function succeed() {
+ return finallyHandler.call(this, this.promise._target()._settledValue());
+}
+function fail(reason) {
+ if (checkCancel(this, reason)) return;
+ errorObj.e = reason;
+ return errorObj;
+}
+function finallyHandler(reasonOrValue) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ if (!this.called) {
+ this.called = true;
+ var ret = this.isFinallyHandler()
+ ? handler.call(promise._boundValue())
+ : handler.call(promise._boundValue(), reasonOrValue);
+ if (ret === NEXT_FILTER) {
+ return ret;
+ } else if (ret !== undefined) {
+ promise._setReturnedNonUndefined();
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ if (this.cancelPromise != null) {
+ if (maybePromise._isCancelled()) {
+ var reason =
+ new CancellationError("late cancellation observer");
+ promise._attachExtraTrace(reason);
+ errorObj.e = reason;
+ return errorObj;
+ } else if (maybePromise.isPending()) {
+ maybePromise._attachCancellationCallback(
+ new FinallyHandlerCancelReaction(this));
+ }
+ }
+ return maybePromise._then(
+ succeed, fail, undefined, this, undefined);
+ }
+ }
+ }
+
+ if (promise.isRejected()) {
+ checkCancel(this);
+ errorObj.e = reasonOrValue;
+ return errorObj;
+ } else {
+ checkCancel(this);
+ return reasonOrValue;
+ }
+}
+
+Promise.prototype._passThrough = function(handler, type, success, fail) {
+ if (typeof handler !== "function") return this.then();
+ return this._then(success,
+ fail,
+ undefined,
+ new PassThroughHandlerContext(this, type, handler),
+ undefined);
+};
+
+Promise.prototype.lastly =
+Promise.prototype["finally"] = function (handler) {
+ return this._passThrough(handler,
+ 0,
+ finallyHandler,
+ finallyHandler);
+};
+
+
+Promise.prototype.tap = function (handler) {
+ return this._passThrough(handler, 1, finallyHandler);
+};
+
+Promise.prototype.tapCatch = function (handlerOrPredicate) {
+ var len = arguments.length;
+ if(len === 1) {
+ return this._passThrough(handlerOrPredicate,
+ 1,
+ undefined,
+ finallyHandler);
+ } else {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (util.isObject(item)) {
+ catchInstances[j++] = item;
+ } else {
+ return Promise.reject(new TypeError(
+ "tapCatch statement predicate: "
+ + "expecting an object but got " + util.classString(item)
+ ));
+ }
+ }
+ catchInstances.length = j;
+ var handler = arguments[i];
+ return this._passThrough(catchFilter(catchInstances, handler, this),
+ 1,
+ undefined,
+ finallyHandler);
+ }
+
+};
+
+return PassThroughHandlerContext;
+};
+
+},{"./catch_filter":5,"./util":21}],12:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async) {
+var util = _dereq_("./util");
+var canEvaluate = util.canEvaluate;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var reject;
+
+if (!true) {
+if (canEvaluate) {
+ var thenCallback = function(i) {
+ return new Function("value", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = value; \n\
+ holder.checkFulfillment(this); \n\
+ ".replace(/Index/g, i));
+ };
+
+ var promiseSetter = function(i) {
+ return new Function("promise", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = promise; \n\
+ ".replace(/Index/g, i));
+ };
+
+ var generateHolderClass = function(total) {
+ var props = new Array(total);
+ for (var i = 0; i < props.length; ++i) {
+ props[i] = "this.p" + (i+1);
+ }
+ var assignment = props.join(" = ") + " = null;";
+ var cancellationCode= "var promise;\n" + props.map(function(prop) {
+ return " \n\
+ promise = " + prop + "; \n\
+ if (promise instanceof Promise) { \n\
+ promise.cancel(); \n\
+ } \n\
+ ";
+ }).join("\n");
+ var passedArguments = props.join(", ");
+ var name = "Holder$" + total;
+
+
+ var code = "return function(tryCatch, errorObj, Promise, async) { \n\
+ 'use strict'; \n\
+ function [TheName](fn) { \n\
+ [TheProperties] \n\
+ this.fn = fn; \n\
+ this.asyncNeeded = true; \n\
+ this.now = 0; \n\
+ } \n\
+ \n\
+ [TheName].prototype._callFunction = function(promise) { \n\
+ promise._pushContext(); \n\
+ var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
+ promise._popContext(); \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(ret.e, false); \n\
+ } else { \n\
+ promise._resolveCallback(ret); \n\
+ } \n\
+ }; \n\
+ \n\
+ [TheName].prototype.checkFulfillment = function(promise) { \n\
+ var now = ++this.now; \n\
+ if (now === [TheTotal]) { \n\
+ if (this.asyncNeeded) { \n\
+ async.invoke(this._callFunction, this, promise); \n\
+ } else { \n\
+ this._callFunction(promise); \n\
+ } \n\
+ \n\
+ } \n\
+ }; \n\
+ \n\
+ [TheName].prototype._resultCancelled = function() { \n\
+ [CancellationCode] \n\
+ }; \n\
+ \n\
+ return [TheName]; \n\
+ }(tryCatch, errorObj, Promise, async); \n\
+ ";
+
+ code = code.replace(/\[TheName\]/g, name)
+ .replace(/\[TheTotal\]/g, total)
+ .replace(/\[ThePassedArguments\]/g, passedArguments)
+ .replace(/\[TheProperties\]/g, assignment)
+ .replace(/\[CancellationCode\]/g, cancellationCode);
+
+ return new Function("tryCatch", "errorObj", "Promise", "async", code)
+ (tryCatch, errorObj, Promise, async);
+ };
+
+ var holderClasses = [];
+ var thenCallbacks = [];
+ var promiseSetters = [];
+
+ for (var i = 0; i < 8; ++i) {
+ holderClasses.push(generateHolderClass(i + 1));
+ thenCallbacks.push(thenCallback(i + 1));
+ promiseSetters.push(promiseSetter(i + 1));
+ }
+
+ reject = function (reason) {
+ this._reject(reason);
+ };
+}}
+
+Promise.join = function () {
+ var last = arguments.length - 1;
+ var fn;
+ if (last > 0 && typeof arguments[last] === "function") {
+ fn = arguments[last];
+ if (!true) {
+ if (last <= 8 && canEvaluate) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var HolderClass = holderClasses[last - 1];
+ var holder = new HolderClass(fn);
+ var callbacks = thenCallbacks;
+
+ for (var i = 0; i < last; ++i) {
+ var maybePromise = tryConvertToPromise(arguments[i], ret);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ var bitField = maybePromise._bitField;
+ ;
+ if (((bitField & 50397184) === 0)) {
+ maybePromise._then(callbacks[i], reject,
+ undefined, ret, holder);
+ promiseSetters[i](maybePromise, holder);
+ holder.asyncNeeded = false;
+ } else if (((bitField & 33554432) !== 0)) {
+ callbacks[i].call(ret,
+ maybePromise._value(), holder);
+ } else if (((bitField & 16777216) !== 0)) {
+ ret._reject(maybePromise._reason());
+ } else {
+ ret._cancel();
+ }
+ } else {
+ callbacks[i].call(ret, maybePromise, holder);
+ }
+ }
+
+ if (!ret._isFateSealed()) {
+ if (holder.asyncNeeded) {
+ var context = Promise._getContext();
+ holder.fn = util.contextBind(context, holder.fn);
+ }
+ ret._setAsyncGuaranteed();
+ ret._setOnCancel(holder);
+ }
+ return ret;
+ }
+ }
+ }
+ var args = [].slice.call(arguments);;
+ if (fn) args.pop();
+ var ret = new PromiseArray(args).promise();
+ return fn !== undefined ? ret.spread(fn) : ret;
+};
+
+};
+
+},{"./util":21}],13:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
+var util = _dereq_("./util");
+var tryCatch = util.tryCatch;
+
+Promise.method = function (fn) {
+ if (typeof fn !== "function") {
+ throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
+ }
+ return function () {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = tryCatch(fn).apply(this, arguments);
+ var promiseCreated = ret._popContext();
+ debug.checkForgottenReturns(
+ value, promiseCreated, "Promise.method", ret);
+ ret._resolveFromSyncValue(value);
+ return ret;
+ };
+};
+
+Promise.attempt = Promise["try"] = function (fn) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value;
+ if (arguments.length > 1) {
+ debug.deprecated("calling Promise.try with more than 1 argument");
+ var arg = arguments[1];
+ var ctx = arguments[2];
+ value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
+ : tryCatch(fn).call(ctx, arg);
+ } else {
+ value = tryCatch(fn)();
+ }
+ var promiseCreated = ret._popContext();
+ debug.checkForgottenReturns(
+ value, promiseCreated, "Promise.try", ret);
+ ret._resolveFromSyncValue(value);
+ return ret;
+};
+
+Promise.prototype._resolveFromSyncValue = function (value) {
+ if (value === util.errorObj) {
+ this._rejectCallback(value.e, false);
+ } else {
+ this._resolveCallback(value, true);
+ }
+};
+};
+
+},{"./util":21}],14:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util");
+var maybeWrapAsError = util.maybeWrapAsError;
+var errors = _dereq_("./errors");
+var OperationalError = errors.OperationalError;
+var es5 = _dereq_("./es5");
+
+function isUntypedError(obj) {
+ return obj instanceof Error &&
+ es5.getPrototypeOf(obj) === Error.prototype;
+}
+
+var rErrorKey = /^(?:name|message|stack|cause)$/;
+function wrapAsOperationalError(obj) {
+ var ret;
+ if (isUntypedError(obj)) {
+ ret = new OperationalError(obj);
+ ret.name = obj.name;
+ ret.message = obj.message;
+ ret.stack = obj.stack;
+ var keys = es5.keys(obj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!rErrorKey.test(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ util.markAsOriginatingFromRejection(obj);
+ return obj;
+}
+
+function nodebackForPromise(promise, multiArgs) {
+ return function(err, value) {
+ if (promise === null) return;
+ if (err) {
+ var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
+ promise._attachExtraTrace(wrapped);
+ promise._reject(wrapped);
+ } else if (!multiArgs) {
+ promise._fulfill(value);
+ } else {
+ var args = [].slice.call(arguments, 1);;
+ promise._fulfill(args);
+ }
+ promise = null;
+ };
+}
+
+module.exports = nodebackForPromise;
+
+},{"./errors":9,"./es5":10,"./util":21}],15:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function() {
+var makeSelfResolutionError = function () {
+ return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+};
+var reflectHandler = function() {
+ return new Promise.PromiseInspection(this._target());
+};
+var apiRejection = function(msg) {
+ return Promise.reject(new TypeError(msg));
+};
+function Proxyable() {}
+var UNDEFINED_BINDING = {};
+var util = _dereq_("./util");
+util.setReflectHandler(reflectHandler);
+
+var getDomain = function() {
+ var domain = process.domain;
+ if (domain === undefined) {
+ return null;
+ }
+ return domain;
+};
+var getContextDefault = function() {
+ return null;
+};
+var getContextDomain = function() {
+ return {
+ domain: getDomain(),
+ async: null
+ };
+};
+var AsyncResource = util.isNode && util.nodeSupportsAsyncResource ?
+ _dereq_("async_hooks").AsyncResource : null;
+var getContextAsyncHooks = function() {
+ return {
+ domain: getDomain(),
+ async: new AsyncResource("Bluebird::Promise")
+ };
+};
+var getContext = util.isNode ? getContextDomain : getContextDefault;
+util.notEnumerableProp(Promise, "_getContext", getContext);
+var enableAsyncHooks = function() {
+ getContext = getContextAsyncHooks;
+ util.notEnumerableProp(Promise, "_getContext", getContextAsyncHooks);
+};
+var disableAsyncHooks = function() {
+ getContext = getContextDomain;
+ util.notEnumerableProp(Promise, "_getContext", getContextDomain);
+};
+
+var es5 = _dereq_("./es5");
+var Async = _dereq_("./async");
+var async = new Async();
+es5.defineProperty(Promise, "_async", {value: async});
+var errors = _dereq_("./errors");
+var TypeError = Promise.TypeError = errors.TypeError;
+Promise.RangeError = errors.RangeError;
+var CancellationError = Promise.CancellationError = errors.CancellationError;
+Promise.TimeoutError = errors.TimeoutError;
+Promise.OperationalError = errors.OperationalError;
+Promise.RejectionError = errors.OperationalError;
+Promise.AggregateError = errors.AggregateError;
+var INTERNAL = function(){};
+var APPLY = {};
+var NEXT_FILTER = {};
+var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL);
+var PromiseArray =
+ _dereq_("./promise_array")(Promise, INTERNAL,
+ tryConvertToPromise, apiRejection, Proxyable);
+var Context = _dereq_("./context")(Promise);
+ /*jshint unused:false*/
+var createContext = Context.create;
+
+var debug = _dereq_("./debuggability")(Promise, Context,
+ enableAsyncHooks, disableAsyncHooks);
+var CapturedTrace = debug.CapturedTrace;
+var PassThroughHandlerContext =
+ _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER);
+var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
+var nodebackForPromise = _dereq_("./nodeback");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+function check(self, executor) {
+ if (self == null || self.constructor !== Promise) {
+ throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ if (typeof executor !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(executor));
+ }
+
+}
+
+function Promise(executor) {
+ if (executor !== INTERNAL) {
+ check(this, executor);
+ }
+ this._bitField = 0;
+ this._fulfillmentHandler0 = undefined;
+ this._rejectionHandler0 = undefined;
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._resolveFromExecutor(executor);
+ this._promiseCreated();
+ this._fireEvent("promiseCreated", this);
+}
+
+Promise.prototype.toString = function () {
+ return "[object Promise]";
+};
+
+Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
+ var len = arguments.length;
+ if (len > 1) {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (util.isObject(item)) {
+ catchInstances[j++] = item;
+ } else {
+ return apiRejection("Catch statement predicate: " +
+ "expecting an object but got " + util.classString(item));
+ }
+ }
+ catchInstances.length = j;
+ fn = arguments[i];
+
+ if (typeof fn !== "function") {
+ throw new TypeError("The last argument to .catch() " +
+ "must be a function, got " + util.toString(fn));
+ }
+ return this.then(undefined, catchFilter(catchInstances, fn, this));
+ }
+ return this.then(undefined, fn);
+};
+
+Promise.prototype.reflect = function () {
+ return this._then(reflectHandler,
+ reflectHandler, undefined, this, undefined);
+};
+
+Promise.prototype.then = function (didFulfill, didReject) {
+ if (debug.warnings() && arguments.length > 0 &&
+ typeof didFulfill !== "function" &&
+ typeof didReject !== "function") {
+ var msg = ".then() only accepts functions but was passed: " +
+ util.classString(didFulfill);
+ if (arguments.length > 1) {
+ msg += ", " + util.classString(didReject);
+ }
+ this._warn(msg);
+ }
+ return this._then(didFulfill, didReject, undefined, undefined, undefined);
+};
+
+Promise.prototype.done = function (didFulfill, didReject) {
+ var promise =
+ this._then(didFulfill, didReject, undefined, undefined, undefined);
+ promise._setIsFinal();
+};
+
+Promise.prototype.spread = function (fn) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ return this.all()._then(fn, undefined, undefined, APPLY, undefined);
+};
+
+Promise.prototype.toJSON = function () {
+ var ret = {
+ isFulfilled: false,
+ isRejected: false,
+ fulfillmentValue: undefined,
+ rejectionReason: undefined
+ };
+ if (this.isFulfilled()) {
+ ret.fulfillmentValue = this.value();
+ ret.isFulfilled = true;
+ } else if (this.isRejected()) {
+ ret.rejectionReason = this.reason();
+ ret.isRejected = true;
+ }
+ return ret;
+};
+
+Promise.prototype.all = function () {
+ if (arguments.length > 0) {
+ this._warn(".all() was passed arguments but it does not take any");
+ }
+ return new PromiseArray(this).promise();
+};
+
+Promise.prototype.error = function (fn) {
+ return this.caught(util.originatesFromRejection, fn);
+};
+
+Promise.getNewLibraryCopy = module.exports;
+
+Promise.is = function (val) {
+ return val instanceof Promise;
+};
+
+Promise.fromNode = Promise.fromCallback = function(fn) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
+ : false;
+ var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
+ if (result === errorObj) {
+ ret._rejectCallback(result.e, true);
+ }
+ if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
+ return ret;
+};
+
+Promise.all = function (promises) {
+ return new PromiseArray(promises).promise();
+};
+
+Promise.cast = function (obj) {
+ var ret = tryConvertToPromise(obj);
+ if (!(ret instanceof Promise)) {
+ ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._setFulfilled();
+ ret._rejectionHandler0 = obj;
+ }
+ return ret;
+};
+
+Promise.resolve = Promise.fulfilled = Promise.cast;
+
+Promise.reject = Promise.rejected = function (reason) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._rejectCallback(reason, true);
+ return ret;
+};
+
+Promise.setScheduler = function(fn) {
+ if (typeof fn !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(fn));
+ }
+ return async.setScheduler(fn);
+};
+
+Promise.prototype._then = function (
+ didFulfill,
+ didReject,
+ _, receiver,
+ internalData
+) {
+ var haveInternalData = internalData !== undefined;
+ var promise = haveInternalData ? internalData : new Promise(INTERNAL);
+ var target = this._target();
+ var bitField = target._bitField;
+
+ if (!haveInternalData) {
+ promise._propagateFrom(this, 3);
+ promise._captureStackTrace();
+ if (receiver === undefined &&
+ ((this._bitField & 2097152) !== 0)) {
+ if (!((bitField & 50397184) === 0)) {
+ receiver = this._boundValue();
+ } else {
+ receiver = target === this ? undefined : this._boundTo;
+ }
+ }
+ this._fireEvent("promiseChained", this, promise);
+ }
+
+ var context = getContext();
+ if (!((bitField & 50397184) === 0)) {
+ var handler, value, settler = target._settlePromiseCtx;
+ if (((bitField & 33554432) !== 0)) {
+ value = target._rejectionHandler0;
+ handler = didFulfill;
+ } else if (((bitField & 16777216) !== 0)) {
+ value = target._fulfillmentHandler0;
+ handler = didReject;
+ target._unsetRejectionIsUnhandled();
+ } else {
+ settler = target._settlePromiseLateCancellationObserver;
+ value = new CancellationError("late cancellation observer");
+ target._attachExtraTrace(value);
+ handler = didReject;
+ }
+
+ async.invoke(settler, target, {
+ handler: util.contextBind(context, handler),
+ promise: promise,
+ receiver: receiver,
+ value: value
+ });
+ } else {
+ target._addCallbacks(didFulfill, didReject, promise,
+ receiver, context);
+ }
+
+ return promise;
+};
+
+Promise.prototype._length = function () {
+ return this._bitField & 65535;
+};
+
+Promise.prototype._isFateSealed = function () {
+ return (this._bitField & 117506048) !== 0;
+};
+
+Promise.prototype._isFollowing = function () {
+ return (this._bitField & 67108864) === 67108864;
+};
+
+Promise.prototype._setLength = function (len) {
+ this._bitField = (this._bitField & -65536) |
+ (len & 65535);
+};
+
+Promise.prototype._setFulfilled = function () {
+ this._bitField = this._bitField | 33554432;
+ this._fireEvent("promiseFulfilled", this);
+};
+
+Promise.prototype._setRejected = function () {
+ this._bitField = this._bitField | 16777216;
+ this._fireEvent("promiseRejected", this);
+};
+
+Promise.prototype._setFollowing = function () {
+ this._bitField = this._bitField | 67108864;
+ this._fireEvent("promiseResolved", this);
+};
+
+Promise.prototype._setIsFinal = function () {
+ this._bitField = this._bitField | 4194304;
+};
+
+Promise.prototype._isFinal = function () {
+ return (this._bitField & 4194304) > 0;
+};
+
+Promise.prototype._unsetCancelled = function() {
+ this._bitField = this._bitField & (~65536);
+};
+
+Promise.prototype._setCancelled = function() {
+ this._bitField = this._bitField | 65536;
+ this._fireEvent("promiseCancelled", this);
+};
+
+Promise.prototype._setWillBeCancelled = function() {
+ this._bitField = this._bitField | 8388608;
+};
+
+Promise.prototype._setAsyncGuaranteed = function() {
+ if (async.hasCustomScheduler()) return;
+ var bitField = this._bitField;
+ this._bitField = bitField |
+ (((bitField & 536870912) >> 2) ^
+ 134217728);
+};
+
+Promise.prototype._setNoAsyncGuarantee = function() {
+ this._bitField = (this._bitField | 536870912) &
+ (~134217728);
+};
+
+Promise.prototype._receiverAt = function (index) {
+ var ret = index === 0 ? this._receiver0 : this[
+ index * 4 - 4 + 3];
+ if (ret === UNDEFINED_BINDING) {
+ return undefined;
+ } else if (ret === undefined && this._isBound()) {
+ return this._boundValue();
+ }
+ return ret;
+};
+
+Promise.prototype._promiseAt = function (index) {
+ return this[
+ index * 4 - 4 + 2];
+};
+
+Promise.prototype._fulfillmentHandlerAt = function (index) {
+ return this[
+ index * 4 - 4 + 0];
+};
+
+Promise.prototype._rejectionHandlerAt = function (index) {
+ return this[
+ index * 4 - 4 + 1];
+};
+
+Promise.prototype._boundValue = function() {};
+
+Promise.prototype._migrateCallback0 = function (follower) {
+ var bitField = follower._bitField;
+ var fulfill = follower._fulfillmentHandler0;
+ var reject = follower._rejectionHandler0;
+ var promise = follower._promise0;
+ var receiver = follower._receiverAt(0);
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, promise, receiver, null);
+};
+
+Promise.prototype._migrateCallbackAt = function (follower, index) {
+ var fulfill = follower._fulfillmentHandlerAt(index);
+ var reject = follower._rejectionHandlerAt(index);
+ var promise = follower._promiseAt(index);
+ var receiver = follower._receiverAt(index);
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, promise, receiver, null);
+};
+
+Promise.prototype._addCallbacks = function (
+ fulfill,
+ reject,
+ promise,
+ receiver,
+ context
+) {
+ var index = this._length();
+
+ if (index >= 65535 - 4) {
+ index = 0;
+ this._setLength(0);
+ }
+
+ if (index === 0) {
+ this._promise0 = promise;
+ this._receiver0 = receiver;
+ if (typeof fulfill === "function") {
+ this._fulfillmentHandler0 = util.contextBind(context, fulfill);
+ }
+ if (typeof reject === "function") {
+ this._rejectionHandler0 = util.contextBind(context, reject);
+ }
+ } else {
+ var base = index * 4 - 4;
+ this[base + 2] = promise;
+ this[base + 3] = receiver;
+ if (typeof fulfill === "function") {
+ this[base + 0] =
+ util.contextBind(context, fulfill);
+ }
+ if (typeof reject === "function") {
+ this[base + 1] =
+ util.contextBind(context, reject);
+ }
+ }
+ this._setLength(index + 1);
+ return index;
+};
+
+Promise.prototype._proxy = function (proxyable, arg) {
+ this._addCallbacks(undefined, undefined, arg, proxyable, null);
+};
+
+Promise.prototype._resolveCallback = function(value, shouldBind) {
+ if (((this._bitField & 117506048) !== 0)) return;
+ if (value === this)
+ return this._rejectCallback(makeSelfResolutionError(), false);
+ var maybePromise = tryConvertToPromise(value, this);
+ if (!(maybePromise instanceof Promise)) return this._fulfill(value);
+
+ if (shouldBind) this._propagateFrom(maybePromise, 2);
+
+
+ var promise = maybePromise._target();
+
+ if (promise === this) {
+ this._reject(makeSelfResolutionError());
+ return;
+ }
+
+ var bitField = promise._bitField;
+ if (((bitField & 50397184) === 0)) {
+ var len = this._length();
+ if (len > 0) promise._migrateCallback0(this);
+ for (var i = 1; i < len; ++i) {
+ promise._migrateCallbackAt(this, i);
+ }
+ this._setFollowing();
+ this._setLength(0);
+ this._setFollowee(maybePromise);
+ } else if (((bitField & 33554432) !== 0)) {
+ this._fulfill(promise._value());
+ } else if (((bitField & 16777216) !== 0)) {
+ this._reject(promise._reason());
+ } else {
+ var reason = new CancellationError("late cancellation observer");
+ promise._attachExtraTrace(reason);
+ this._reject(reason);
+ }
+};
+
+Promise.prototype._rejectCallback =
+function(reason, synchronous, ignoreNonErrorWarnings) {
+ var trace = util.ensureErrorObject(reason);
+ var hasStack = trace === reason;
+ if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
+ var message = "a promise was rejected with a non-error: " +
+ util.classString(reason);
+ this._warn(message, true);
+ }
+ this._attachExtraTrace(trace, synchronous ? hasStack : false);
+ this._reject(reason);
+};
+
+Promise.prototype._resolveFromExecutor = function (executor) {
+ if (executor === INTERNAL) return;
+ var promise = this;
+ this._captureStackTrace();
+ this._pushContext();
+ var synchronous = true;
+ var r = this._execute(executor, function(value) {
+ promise._resolveCallback(value);
+ }, function (reason) {
+ promise._rejectCallback(reason, synchronous);
+ });
+ synchronous = false;
+ this._popContext();
+
+ if (r !== undefined) {
+ promise._rejectCallback(r, true);
+ }
+};
+
+Promise.prototype._settlePromiseFromHandler = function (
+ handler, receiver, value, promise
+) {
+ var bitField = promise._bitField;
+ if (((bitField & 65536) !== 0)) return;
+ promise._pushContext();
+ var x;
+ if (receiver === APPLY) {
+ if (!value || typeof value.length !== "number") {
+ x = errorObj;
+ x.e = new TypeError("cannot .spread() a non-array: " +
+ util.classString(value));
+ } else {
+ x = tryCatch(handler).apply(this._boundValue(), value);
+ }
+ } else {
+ x = tryCatch(handler).call(receiver, value);
+ }
+ var promiseCreated = promise._popContext();
+ bitField = promise._bitField;
+ if (((bitField & 65536) !== 0)) return;
+
+ if (x === NEXT_FILTER) {
+ promise._reject(value);
+ } else if (x === errorObj) {
+ promise._rejectCallback(x.e, false);
+ } else {
+ debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
+ promise._resolveCallback(x);
+ }
+};
+
+Promise.prototype._target = function() {
+ var ret = this;
+ while (ret._isFollowing()) ret = ret._followee();
+ return ret;
+};
+
+Promise.prototype._followee = function() {
+ return this._rejectionHandler0;
+};
+
+Promise.prototype._setFollowee = function(promise) {
+ this._rejectionHandler0 = promise;
+};
+
+Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
+ var isPromise = promise instanceof Promise;
+ var bitField = this._bitField;
+ var asyncGuaranteed = ((bitField & 134217728) !== 0);
+ if (((bitField & 65536) !== 0)) {
+ if (isPromise) promise._invokeInternalOnCancel();
+
+ if (receiver instanceof PassThroughHandlerContext &&
+ receiver.isFinallyHandler()) {
+ receiver.cancelPromise = promise;
+ if (tryCatch(handler).call(receiver, value) === errorObj) {
+ promise._reject(errorObj.e);
+ }
+ } else if (handler === reflectHandler) {
+ promise._fulfill(reflectHandler.call(receiver));
+ } else if (receiver instanceof Proxyable) {
+ receiver._promiseCancelled(promise);
+ } else if (isPromise || promise instanceof PromiseArray) {
+ promise._cancel();
+ } else {
+ receiver.cancel();
+ }
+ } else if (typeof handler === "function") {
+ if (!isPromise) {
+ handler.call(receiver, value, promise);
+ } else {
+ if (asyncGuaranteed) promise._setAsyncGuaranteed();
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (receiver instanceof Proxyable) {
+ if (!receiver._isResolved()) {
+ if (((bitField & 33554432) !== 0)) {
+ receiver._promiseFulfilled(value, promise);
+ } else {
+ receiver._promiseRejected(value, promise);
+ }
+ }
+ } else if (isPromise) {
+ if (asyncGuaranteed) promise._setAsyncGuaranteed();
+ if (((bitField & 33554432) !== 0)) {
+ promise._fulfill(value);
+ } else {
+ promise._reject(value);
+ }
+ }
+};
+
+Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
+ var handler = ctx.handler;
+ var promise = ctx.promise;
+ var receiver = ctx.receiver;
+ var value = ctx.value;
+ if (typeof handler === "function") {
+ if (!(promise instanceof Promise)) {
+ handler.call(receiver, value, promise);
+ } else {
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (promise instanceof Promise) {
+ promise._reject(value);
+ }
+};
+
+Promise.prototype._settlePromiseCtx = function(ctx) {
+ this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
+};
+
+Promise.prototype._settlePromise0 = function(handler, value, bitField) {
+ var promise = this._promise0;
+ var receiver = this._receiverAt(0);
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._settlePromise(promise, handler, receiver, value);
+};
+
+Promise.prototype._clearCallbackDataAtIndex = function(index) {
+ var base = index * 4 - 4;
+ this[base + 2] =
+ this[base + 3] =
+ this[base + 0] =
+ this[base + 1] = undefined;
+};
+
+Promise.prototype._fulfill = function (value) {
+ var bitField = this._bitField;
+ if (((bitField & 117506048) >>> 16)) return;
+ if (value === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._reject(err);
+ }
+ this._setFulfilled();
+ this._rejectionHandler0 = value;
+
+ if ((bitField & 65535) > 0) {
+ if (((bitField & 134217728) !== 0)) {
+ this._settlePromises();
+ } else {
+ async.settlePromises(this);
+ }
+ this._dereferenceTrace();
+ }
+};
+
+Promise.prototype._reject = function (reason) {
+ var bitField = this._bitField;
+ if (((bitField & 117506048) >>> 16)) return;
+ this._setRejected();
+ this._fulfillmentHandler0 = reason;
+
+ if (this._isFinal()) {
+ return async.fatalError(reason, util.isNode);
+ }
+
+ if ((bitField & 65535) > 0) {
+ async.settlePromises(this);
+ } else {
+ this._ensurePossibleRejectionHandled();
+ }
+};
+
+Promise.prototype._fulfillPromises = function (len, value) {
+ for (var i = 1; i < len; i++) {
+ var handler = this._fulfillmentHandlerAt(i);
+ var promise = this._promiseAt(i);
+ var receiver = this._receiverAt(i);
+ this._clearCallbackDataAtIndex(i);
+ this._settlePromise(promise, handler, receiver, value);
+ }
+};
+
+Promise.prototype._rejectPromises = function (len, reason) {
+ for (var i = 1; i < len; i++) {
+ var handler = this._rejectionHandlerAt(i);
+ var promise = this._promiseAt(i);
+ var receiver = this._receiverAt(i);
+ this._clearCallbackDataAtIndex(i);
+ this._settlePromise(promise, handler, receiver, reason);
+ }
+};
+
+Promise.prototype._settlePromises = function () {
+ var bitField = this._bitField;
+ var len = (bitField & 65535);
+
+ if (len > 0) {
+ if (((bitField & 16842752) !== 0)) {
+ var reason = this._fulfillmentHandler0;
+ this._settlePromise0(this._rejectionHandler0, reason, bitField);
+ this._rejectPromises(len, reason);
+ } else {
+ var value = this._rejectionHandler0;
+ this._settlePromise0(this._fulfillmentHandler0, value, bitField);
+ this._fulfillPromises(len, value);
+ }
+ this._setLength(0);
+ }
+ this._clearCancellationData();
+};
+
+Promise.prototype._settledValue = function() {
+ var bitField = this._bitField;
+ if (((bitField & 33554432) !== 0)) {
+ return this._rejectionHandler0;
+ } else if (((bitField & 16777216) !== 0)) {
+ return this._fulfillmentHandler0;
+ }
+};
+
+if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
+ es5.defineProperty(Promise.prototype, Symbol.toStringTag, {
+ get: function () {
+ return "Object";
+ }
+ });
+}
+
+function deferResolve(v) {this.promise._resolveCallback(v);}
+function deferReject(v) {this.promise._rejectCallback(v, false);}
+
+Promise.defer = Promise.pending = function() {
+ debug.deprecated("Promise.defer", "new Promise");
+ var promise = new Promise(INTERNAL);
+ return {
+ promise: promise,
+ resolve: deferResolve,
+ reject: deferReject
+ };
+};
+
+util.notEnumerableProp(Promise,
+ "_makeSelfResolutionError",
+ makeSelfResolutionError);
+
+_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
+ debug);
+_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
+_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug);
+_dereq_("./direct_resolve")(Promise);
+_dereq_("./synchronous_inspection")(Promise);
+_dereq_("./join")(
+ Promise, PromiseArray, tryConvertToPromise, INTERNAL, async);
+Promise.Promise = Promise;
+Promise.version = "3.7.2";
+
+ util.toFastProperties(Promise);
+ util.toFastProperties(Promise.prototype);
+ function fillTypes(value) {
+ var p = new Promise(INTERNAL);
+ p._fulfillmentHandler0 = value;
+ p._rejectionHandler0 = value;
+ p._promise0 = value;
+ p._receiver0 = value;
+ }
+ // Complete slack tracking, opt out of field-type tracking and
+ // stabilize map
+ fillTypes({a: 1});
+ fillTypes({b: 2});
+ fillTypes({c: 3});
+ fillTypes(1);
+ fillTypes(function(){});
+ fillTypes(undefined);
+ fillTypes(false);
+ fillTypes(new Promise(INTERNAL));
+ debug.setBounds(Async.firstLineError, util.lastLineError);
+ return Promise;
+
+};
+
+},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21,"async_hooks":undefined}],16:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise,
+ apiRejection, Proxyable) {
+var util = _dereq_("./util");
+var isArray = util.isArray;
+
+function toResolutionValue(val) {
+ switch(val) {
+ case -2: return [];
+ case -3: return {};
+ case -6: return new Map();
+ }
+}
+
+function PromiseArray(values) {
+ var promise = this._promise = new Promise(INTERNAL);
+ if (values instanceof Promise) {
+ promise._propagateFrom(values, 3);
+ values.suppressUnhandledRejections();
+ }
+ promise._setOnCancel(this);
+ this._values = values;
+ this._length = 0;
+ this._totalResolved = 0;
+ this._init(undefined, -2);
+}
+util.inherits(PromiseArray, Proxyable);
+
+PromiseArray.prototype.length = function () {
+ return this._length;
+};
+
+PromiseArray.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
+ var values = tryConvertToPromise(this._values, this._promise);
+ if (values instanceof Promise) {
+ values = values._target();
+ var bitField = values._bitField;
+ ;
+ this._values = values;
+
+ if (((bitField & 50397184) === 0)) {
+ this._promise._setAsyncGuaranteed();
+ return values._then(
+ init,
+ this._reject,
+ undefined,
+ this,
+ resolveValueIfEmpty
+ );
+ } else if (((bitField & 33554432) !== 0)) {
+ values = values._value();
+ } else if (((bitField & 16777216) !== 0)) {
+ return this._reject(values._reason());
+ } else {
+ return this._cancel();
+ }
+ }
+ values = util.asArray(values);
+ if (values === null) {
+ var err = apiRejection(
+ "expecting an array or an iterable object but got " + util.classString(values)).reason();
+ this._promise._rejectCallback(err, false);
+ return;
+ }
+
+ if (values.length === 0) {
+ if (resolveValueIfEmpty === -5) {
+ this._resolveEmptyArray();
+ }
+ else {
+ this._resolve(toResolutionValue(resolveValueIfEmpty));
+ }
+ return;
+ }
+ this._iterate(values);
+};
+
+PromiseArray.prototype._iterate = function(values) {
+ var len = this.getActualLength(values.length);
+ this._length = len;
+ this._values = this.shouldCopyValues() ? new Array(len) : this._values;
+ var result = this._promise;
+ var isResolved = false;
+ var bitField = null;
+ for (var i = 0; i < len; ++i) {
+ var maybePromise = tryConvertToPromise(values[i], result);
+
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ bitField = maybePromise._bitField;
+ } else {
+ bitField = null;
+ }
+
+ if (isResolved) {
+ if (bitField !== null) {
+ maybePromise.suppressUnhandledRejections();
+ }
+ } else if (bitField !== null) {
+ if (((bitField & 50397184) === 0)) {
+ maybePromise._proxy(this, i);
+ this._values[i] = maybePromise;
+ } else if (((bitField & 33554432) !== 0)) {
+ isResolved = this._promiseFulfilled(maybePromise._value(), i);
+ } else if (((bitField & 16777216) !== 0)) {
+ isResolved = this._promiseRejected(maybePromise._reason(), i);
+ } else {
+ isResolved = this._promiseCancelled(i);
+ }
+ } else {
+ isResolved = this._promiseFulfilled(maybePromise, i);
+ }
+ }
+ if (!isResolved) result._setAsyncGuaranteed();
+};
+
+PromiseArray.prototype._isResolved = function () {
+ return this._values === null;
+};
+
+PromiseArray.prototype._resolve = function (value) {
+ this._values = null;
+ this._promise._fulfill(value);
+};
+
+PromiseArray.prototype._cancel = function() {
+ if (this._isResolved() || !this._promise._isCancellable()) return;
+ this._values = null;
+ this._promise._cancel();
+};
+
+PromiseArray.prototype._reject = function (reason) {
+ this._values = null;
+ this._promise._rejectCallback(reason, false);
+};
+
+PromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ return true;
+ }
+ return false;
+};
+
+PromiseArray.prototype._promiseCancelled = function() {
+ this._cancel();
+ return true;
+};
+
+PromiseArray.prototype._promiseRejected = function (reason) {
+ this._totalResolved++;
+ this._reject(reason);
+ return true;
+};
+
+PromiseArray.prototype._resultCancelled = function() {
+ if (this._isResolved()) return;
+ var values = this._values;
+ this._cancel();
+ if (values instanceof Promise) {
+ values.cancel();
+ } else {
+ for (var i = 0; i < values.length; ++i) {
+ if (values[i] instanceof Promise) {
+ values[i].cancel();
+ }
+ }
+ }
+};
+
+PromiseArray.prototype.shouldCopyValues = function () {
+ return true;
+};
+
+PromiseArray.prototype.getActualLength = function (len) {
+ return len;
+};
+
+return PromiseArray;
+};
+
+},{"./util":21}],17:[function(_dereq_,module,exports){
+"use strict";
+function arrayMove(src, srcIndex, dst, dstIndex, len) {
+ for (var j = 0; j < len; ++j) {
+ dst[j + dstIndex] = src[j + srcIndex];
+ src[j + srcIndex] = void 0;
+ }
+}
+
+function Queue(capacity) {
+ this._capacity = capacity;
+ this._length = 0;
+ this._front = 0;
+}
+
+Queue.prototype._willBeOverCapacity = function (size) {
+ return this._capacity < size;
+};
+
+Queue.prototype._pushOne = function (arg) {
+ var length = this.length();
+ this._checkCapacity(length + 1);
+ var i = (this._front + length) & (this._capacity - 1);
+ this[i] = arg;
+ this._length = length + 1;
+};
+
+Queue.prototype.push = function (fn, receiver, arg) {
+ var length = this.length() + 3;
+ if (this._willBeOverCapacity(length)) {
+ this._pushOne(fn);
+ this._pushOne(receiver);
+ this._pushOne(arg);
+ return;
+ }
+ var j = this._front + length - 3;
+ this._checkCapacity(length);
+ var wrapMask = this._capacity - 1;
+ this[(j + 0) & wrapMask] = fn;
+ this[(j + 1) & wrapMask] = receiver;
+ this[(j + 2) & wrapMask] = arg;
+ this._length = length;
+};
+
+Queue.prototype.shift = function () {
+ var front = this._front,
+ ret = this[front];
+
+ this[front] = undefined;
+ this._front = (front + 1) & (this._capacity - 1);
+ this._length--;
+ return ret;
+};
+
+Queue.prototype.length = function () {
+ return this._length;
+};
+
+Queue.prototype._checkCapacity = function (size) {
+ if (this._capacity < size) {
+ this._resizeTo(this._capacity << 1);
+ }
+};
+
+Queue.prototype._resizeTo = function (capacity) {
+ var oldCapacity = this._capacity;
+ this._capacity = capacity;
+ var front = this._front;
+ var length = this._length;
+ var moveItemsCount = (front + length) & (oldCapacity - 1);
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
+};
+
+module.exports = Queue;
+
+},{}],18:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util");
+var schedule;
+var noAsyncScheduler = function() {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+};
+var NativePromise = util.getNativePromise();
+if (util.isNode && typeof MutationObserver === "undefined") {
+ var GlobalSetImmediate = global.setImmediate;
+ var ProcessNextTick = process.nextTick;
+ schedule = util.isRecentNode
+ ? function(fn) { GlobalSetImmediate.call(global, fn); }
+ : function(fn) { ProcessNextTick.call(process, fn); };
+} else if (typeof NativePromise === "function" &&
+ typeof NativePromise.resolve === "function") {
+ var nativePromise = NativePromise.resolve();
+ schedule = function(fn) {
+ nativePromise.then(fn);
+ };
+} else if ((typeof MutationObserver !== "undefined") &&
+ !(typeof window !== "undefined" &&
+ window.navigator &&
+ (window.navigator.standalone || window.cordova)) &&
+ ("classList" in document.documentElement)) {
+ schedule = (function() {
+ var div = document.createElement("div");
+ var opts = {attributes: true};
+ var toggleScheduled = false;
+ var div2 = document.createElement("div");
+ var o2 = new MutationObserver(function() {
+ div.classList.toggle("foo");
+ toggleScheduled = false;
+ });
+ o2.observe(div2, opts);
+
+ var scheduleToggle = function() {
+ if (toggleScheduled) return;
+ toggleScheduled = true;
+ div2.classList.toggle("foo");
+ };
+
+ return function schedule(fn) {
+ var o = new MutationObserver(function() {
+ o.disconnect();
+ fn();
+ });
+ o.observe(div, opts);
+ scheduleToggle();
+ };
+ })();
+} else if (typeof setImmediate !== "undefined") {
+ schedule = function (fn) {
+ setImmediate(fn);
+ };
+} else if (typeof setTimeout !== "undefined") {
+ schedule = function (fn) {
+ setTimeout(fn, 0);
+ };
+} else {
+ schedule = noAsyncScheduler;
+}
+module.exports = schedule;
+
+},{"./util":21}],19:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+function PromiseInspection(promise) {
+ if (promise !== undefined) {
+ promise = promise._target();
+ this._bitField = promise._bitField;
+ this._settledValueField = promise._isFateSealed()
+ ? promise._settledValue() : undefined;
+ }
+ else {
+ this._bitField = 0;
+ this._settledValueField = undefined;
+ }
+}
+
+PromiseInspection.prototype._settledValue = function() {
+ return this._settledValueField;
+};
+
+var value = PromiseInspection.prototype.value = function () {
+ if (!this.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ return this._settledValue();
+};
+
+var reason = PromiseInspection.prototype.error =
+PromiseInspection.prototype.reason = function () {
+ if (!this.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ return this._settledValue();
+};
+
+var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
+ return (this._bitField & 33554432) !== 0;
+};
+
+var isRejected = PromiseInspection.prototype.isRejected = function () {
+ return (this._bitField & 16777216) !== 0;
+};
+
+var isPending = PromiseInspection.prototype.isPending = function () {
+ return (this._bitField & 50397184) === 0;
+};
+
+var isResolved = PromiseInspection.prototype.isResolved = function () {
+ return (this._bitField & 50331648) !== 0;
+};
+
+PromiseInspection.prototype.isCancelled = function() {
+ return (this._bitField & 8454144) !== 0;
+};
+
+Promise.prototype.__isCancelled = function() {
+ return (this._bitField & 65536) === 65536;
+};
+
+Promise.prototype._isCancelled = function() {
+ return this._target().__isCancelled();
+};
+
+Promise.prototype.isCancelled = function() {
+ return (this._target()._bitField & 8454144) !== 0;
+};
+
+Promise.prototype.isPending = function() {
+ return isPending.call(this._target());
+};
+
+Promise.prototype.isRejected = function() {
+ return isRejected.call(this._target());
+};
+
+Promise.prototype.isFulfilled = function() {
+ return isFulfilled.call(this._target());
+};
+
+Promise.prototype.isResolved = function() {
+ return isResolved.call(this._target());
+};
+
+Promise.prototype.value = function() {
+ return value.call(this._target());
+};
+
+Promise.prototype.reason = function() {
+ var target = this._target();
+ target._unsetRejectionIsUnhandled();
+ return reason.call(target);
+};
+
+Promise.prototype._value = function() {
+ return this._settledValue();
+};
+
+Promise.prototype._reason = function() {
+ this._unsetRejectionIsUnhandled();
+ return this._settledValue();
+};
+
+Promise.PromiseInspection = PromiseInspection;
+};
+
+},{}],20:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = _dereq_("./util");
+var errorObj = util.errorObj;
+var isObject = util.isObject;
+
+function tryConvertToPromise(obj, context) {
+ if (isObject(obj)) {
+ if (obj instanceof Promise) return obj;
+ var then = getThen(obj);
+ if (then === errorObj) {
+ if (context) context._pushContext();
+ var ret = Promise.reject(then.e);
+ if (context) context._popContext();
+ return ret;
+ } else if (typeof then === "function") {
+ if (isAnyBluebirdPromise(obj)) {
+ var ret = new Promise(INTERNAL);
+ obj._then(
+ ret._fulfill,
+ ret._reject,
+ undefined,
+ ret,
+ null
+ );
+ return ret;
+ }
+ return doThenable(obj, then, context);
+ }
+ }
+ return obj;
+}
+
+function doGetThen(obj) {
+ return obj.then;
+}
+
+function getThen(obj) {
+ try {
+ return doGetThen(obj);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+
+var hasProp = {}.hasOwnProperty;
+function isAnyBluebirdPromise(obj) {
+ try {
+ return hasProp.call(obj, "_promise0");
+ } catch (e) {
+ return false;
+ }
+}
+
+function doThenable(x, then, context) {
+ var promise = new Promise(INTERNAL);
+ var ret = promise;
+ if (context) context._pushContext();
+ promise._captureStackTrace();
+ if (context) context._popContext();
+ var synchronous = true;
+ var result = util.tryCatch(then).call(x, resolve, reject);
+ synchronous = false;
+
+ if (promise && result === errorObj) {
+ promise._rejectCallback(result.e, true, true);
+ promise = null;
+ }
+
+ function resolve(value) {
+ if (!promise) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }
+
+ function reject(reason) {
+ if (!promise) return;
+ promise._rejectCallback(reason, synchronous, true);
+ promise = null;
+ }
+ return ret;
+}
+
+return tryConvertToPromise;
+};
+
+},{"./util":21}],21:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5");
+var canEvaluate = typeof navigator == "undefined";
+
+var errorObj = {e: {}};
+var tryCatchTarget;
+var globalObject = typeof self !== "undefined" ? self :
+ typeof window !== "undefined" ? window :
+ typeof global !== "undefined" ? global :
+ this !== undefined ? this : null;
+
+function tryCatcher() {
+ try {
+ var target = tryCatchTarget;
+ tryCatchTarget = null;
+ return target.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+function tryCatch(fn) {
+ tryCatchTarget = fn;
+ return tryCatcher;
+}
+
+var inherits = function(Child, Parent) {
+ var hasProp = {}.hasOwnProperty;
+
+ function T() {
+ this.constructor = Child;
+ this.constructor$ = Parent;
+ for (var propertyName in Parent.prototype) {
+ if (hasProp.call(Parent.prototype, propertyName) &&
+ propertyName.charAt(propertyName.length-1) !== "$"
+ ) {
+ this[propertyName + "$"] = Parent.prototype[propertyName];
+ }
+ }
+ }
+ T.prototype = Parent.prototype;
+ Child.prototype = new T();
+ return Child.prototype;
+};
+
+
+function isPrimitive(val) {
+ return val == null || val === true || val === false ||
+ typeof val === "string" || typeof val === "number";
+
+}
+
+function isObject(value) {
+ return typeof value === "function" ||
+ typeof value === "object" && value !== null;
+}
+
+function maybeWrapAsError(maybeError) {
+ if (!isPrimitive(maybeError)) return maybeError;
+
+ return new Error(safeToString(maybeError));
+}
+
+function withAppended(target, appendee) {
+ var len = target.length;
+ var ret = new Array(len + 1);
+ var i;
+ for (i = 0; i < len; ++i) {
+ ret[i] = target[i];
+ }
+ ret[i] = appendee;
+ return ret;
+}
+
+function getDataPropertyOrDefault(obj, key, defaultValue) {
+ if (es5.isES5) {
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+
+ if (desc != null) {
+ return desc.get == null && desc.set == null
+ ? desc.value
+ : defaultValue;
+ }
+ } else {
+ return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
+ }
+}
+
+function notEnumerableProp(obj, name, value) {
+ if (isPrimitive(obj)) return obj;
+ var descriptor = {
+ value: value,
+ configurable: true,
+ enumerable: false,
+ writable: true
+ };
+ es5.defineProperty(obj, name, descriptor);
+ return obj;
+}
+
+function thrower(r) {
+ throw r;
+}
+
+var inheritedDataKeys = (function() {
+ var excludedPrototypes = [
+ Array.prototype,
+ Object.prototype,
+ Function.prototype
+ ];
+
+ var isExcludedProto = function(val) {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (excludedPrototypes[i] === val) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ if (es5.isES5) {
+ var getKeys = Object.getOwnPropertyNames;
+ return function(obj) {
+ var ret = [];
+ var visitedKeys = Object.create(null);
+ while (obj != null && !isExcludedProto(obj)) {
+ var keys;
+ try {
+ keys = getKeys(obj);
+ } catch (e) {
+ return ret;
+ }
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (visitedKeys[key]) continue;
+ visitedKeys[key] = true;
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null && desc.get == null && desc.set == null) {
+ ret.push(key);
+ }
+ }
+ obj = es5.getPrototypeOf(obj);
+ }
+ return ret;
+ };
+ } else {
+ var hasProp = {}.hasOwnProperty;
+ return function(obj) {
+ if (isExcludedProto(obj)) return [];
+ var ret = [];
+
+ /*jshint forin:false */
+ enumeration: for (var key in obj) {
+ if (hasProp.call(obj, key)) {
+ ret.push(key);
+ } else {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (hasProp.call(excludedPrototypes[i], key)) {
+ continue enumeration;
+ }
+ }
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+ }
+
+})();
+
+var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
+function isClass(fn) {
+ try {
+ if (typeof fn === "function") {
+ var keys = es5.names(fn.prototype);
+
+ var hasMethods = es5.isES5 && keys.length > 1;
+ var hasMethodsOtherThanConstructor = keys.length > 0 &&
+ !(keys.length === 1 && keys[0] === "constructor");
+ var hasThisAssignmentAndStaticMethods =
+ thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
+
+ if (hasMethods || hasMethodsOtherThanConstructor ||
+ hasThisAssignmentAndStaticMethods) {
+ return true;
+ }
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+}
+
+function toFastProperties(obj) {
+ /*jshint -W027,-W055,-W031*/
+ function FakeConstructor() {}
+ FakeConstructor.prototype = obj;
+ var receiver = new FakeConstructor();
+ function ic() {
+ return typeof receiver.foo;
+ }
+ ic();
+ ic();
+ return obj;
+ eval(obj);
+}
+
+var rident = /^[a-z$_][a-z$_0-9]*$/i;
+function isIdentifier(str) {
+ return rident.test(str);
+}
+
+function filledRange(count, prefix, suffix) {
+ var ret = new Array(count);
+ for(var i = 0; i < count; ++i) {
+ ret[i] = prefix + i + suffix;
+ }
+ return ret;
+}
+
+function safeToString(obj) {
+ try {
+ return obj + "";
+ } catch (e) {
+ return "[no string representation]";
+ }
+}
+
+function isError(obj) {
+ return obj instanceof Error ||
+ (obj !== null &&
+ typeof obj === "object" &&
+ typeof obj.message === "string" &&
+ typeof obj.name === "string");
+}
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isOperational", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
+ e["isOperational"] === true);
+}
+
+function canAttachTrace(obj) {
+ return isError(obj) && es5.propertyIsWritable(obj, "stack");
+}
+
+var ensureErrorObject = (function() {
+ if (!("stack" in new Error())) {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ try {throw new Error(safeToString(value));}
+ catch(err) {return err;}
+ };
+ } else {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ return new Error(safeToString(value));
+ };
+ }
+})();
+
+function classString(obj) {
+ return {}.toString.call(obj);
+}
+
+function copyDescriptors(from, to, filter) {
+ var keys = es5.names(from);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (filter(key)) {
+ try {
+ es5.defineProperty(to, key, es5.getDescriptor(from, key));
+ } catch (ignore) {}
+ }
+ }
+}
+
+var asArray = function(v) {
+ if (es5.isArray(v)) {
+ return v;
+ }
+ return null;
+};
+
+if (typeof Symbol !== "undefined" && Symbol.iterator) {
+ var ArrayFrom = typeof Array.from === "function" ? function(v) {
+ return Array.from(v);
+ } : function(v) {
+ var ret = [];
+ var it = v[Symbol.iterator]();
+ var itResult;
+ while (!((itResult = it.next()).done)) {
+ ret.push(itResult.value);
+ }
+ return ret;
+ };
+
+ asArray = function(v) {
+ if (es5.isArray(v)) {
+ return v;
+ } else if (v != null && typeof v[Symbol.iterator] === "function") {
+ return ArrayFrom(v);
+ }
+ return null;
+ };
+}
+
+var isNode = typeof process !== "undefined" &&
+ classString(process).toLowerCase() === "[object process]";
+
+var hasEnvVariables = typeof process !== "undefined" &&
+ typeof process.env !== "undefined";
+
+function env(key) {
+ return hasEnvVariables ? process.env[key] : undefined;
+}
+
+function getNativePromise() {
+ if (typeof Promise === "function") {
+ try {
+ var promise = new Promise(function(){});
+ if (classString(promise) === "[object Promise]") {
+ return Promise;
+ }
+ } catch (e) {}
+ }
+}
+
+var reflectHandler;
+function contextBind(ctx, cb) {
+ if (ctx === null ||
+ typeof cb !== "function" ||
+ cb === reflectHandler) {
+ return cb;
+ }
+
+ if (ctx.domain !== null) {
+ cb = ctx.domain.bind(cb);
+ }
+
+ var async = ctx.async;
+ if (async !== null) {
+ var old = cb;
+ cb = function() {
+ var args = (new Array(2)).concat([].slice.call(arguments));;
+ args[0] = old;
+ args[1] = this;
+ return async.runInAsyncScope.apply(async, args);
+ };
+ }
+ return cb;
+}
+
+var ret = {
+ setReflectHandler: function(fn) {
+ reflectHandler = fn;
+ },
+ isClass: isClass,
+ isIdentifier: isIdentifier,
+ inheritedDataKeys: inheritedDataKeys,
+ getDataPropertyOrDefault: getDataPropertyOrDefault,
+ thrower: thrower,
+ isArray: es5.isArray,
+ asArray: asArray,
+ notEnumerableProp: notEnumerableProp,
+ isPrimitive: isPrimitive,
+ isObject: isObject,
+ isError: isError,
+ canEvaluate: canEvaluate,
+ errorObj: errorObj,
+ tryCatch: tryCatch,
+ inherits: inherits,
+ withAppended: withAppended,
+ maybeWrapAsError: maybeWrapAsError,
+ toFastProperties: toFastProperties,
+ filledRange: filledRange,
+ toString: safeToString,
+ canAttachTrace: canAttachTrace,
+ ensureErrorObject: ensureErrorObject,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ classString: classString,
+ copyDescriptors: copyDescriptors,
+ isNode: isNode,
+ hasEnvVariables: hasEnvVariables,
+ env: env,
+ global: globalObject,
+ getNativePromise: getNativePromise,
+ contextBind: contextBind
+};
+ret.isRecentNode = ret.isNode && (function() {
+ var version;
+ if (process.versions && process.versions.node) {
+ version = process.versions.node.split(".").map(Number);
+ } else if (process.version) {
+ version = process.version.split(".").map(Number);
+ }
+ return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
+})();
+ret.nodeSupportsAsyncResource = ret.isNode && (function() {
+ var supportsAsync = false;
+ try {
+ var res = _dereq_("async_hooks").AsyncResource;
+ supportsAsync = typeof res.prototype.runInAsyncScope === "function";
+ } catch (e) {
+ supportsAsync = false;
+ }
+ return supportsAsync;
+})();
+
+if (ret.isNode) ret.toFastProperties(process);
+
+try {throw new Error(); } catch (e) {ret.lastLineError = e;}
+module.exports = ret;
+
+},{"./es5":10,"async_hooks":undefined}]},{},[3])(3)
+}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/node_modules/bluebird/js/browser/bluebird.core.min.js b/node_modules/bluebird/js/browser/bluebird.core.min.js
new file mode 100644
index 0000000..836176e
--- /dev/null
+++ b/node_modules/bluebird/js/browser/bluebird.core.min.js
@@ -0,0 +1,31 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2018 Petka Antonov
+ *
+ * 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.
+ *
+ */
+/**
+ * bluebird build version 3.7.2
+ * Features enabled: core
+ * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
+*/
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function o(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var i="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new f(16),this._normalQueue=new f(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=p}function o(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function i(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function a(t){this._normalQueue._pushOne(t),this._queueTick()}function s(t){for(;t.length()>0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),f=t("./queue");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},r.prototype.invokeLater=o,r.prototype.invoke=i,r.prototype.settlePromises=a,r.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":17,"./schedule":18}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var o=!1,i=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(i,i,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(i){o||(o=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(i),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===i&&(Promise=o)}catch(t){}return i}var o;"undefined"!=typeof Promise&&(o=Promise);var i=t("./promise")();i.noConflict=r,e.exports=i},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){var i=t("./util"),a=i.tryCatch,s=i.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(i.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=a(t).call(this._boundValue());r===s&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":21}],5:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,s){return function(c){var l=s._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return i(n).call(l,c)}else if("function"==typeof p){var f=i(p).call(l,c);if(f===a)return f;if(f)return i(n).call(l,c)}else if(r.isObject(c)){for(var h=o(p),d=0;d<h.length;++d){var _=h[d];if(p[_]!=c[_])continue t}return i(n).call(l,c)}}return e}}var r=t("./util"),o=t("./es5").keys,i=r.tryCatch,a=r.errorObj;return n}},{"./es5":10,"./util":21}],6:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return o?new e:void 0}function r(){var t=i.length-1;return t>=0?i[t]:void 0}var o=!1,i=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=i.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,o=!1},o=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){function i(t,e){return{promise:e}}function a(){return!1}function s(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+V.toString(t));r._attachCancellationCallback(t)})}catch(o){return o}}function c(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?V.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function l(){return this._onCancelField}function u(t){this._onCancelField=t}function p(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function d(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function _(){this._trace=new H(this._peekContext())}function v(t,e){if(q(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=F(t);V.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),V.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(){this._trace=void 0}function g(t,e,n,r,o){if(void 0===t&&null!==e&&Z){if(void 0!==o&&o._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var i="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=E(s),l=c.length-1;l>=0;--l){var u=c[l];if(!M.test(u)){var p=u.match(W);p&&(i="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l<s.length;++l)if(s[l]===f){l>0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function m(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),b(n)}function b(t,n,r){if(ut.warnings){var o,i=new D(t);if(n)r._attachExtraTrace(i);else if(ut.longStackTraces&&(o=e._peekContext()))o.attachExtraTrace(i);else{var a=F(i);i.stack=a.message+"\n"+a.stack.join("\n")}it("warning",i)||T(i,"",!0)}}function C(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function w(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function k(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],o=e.length-1,i=e[o],a=-1,s=r.length-1;s>=0;--s)if(r[s]===i){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[o]!==c)break;e.pop(),o--}e=r}}function E(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],o=" (No stack trace)"===r||$.test(r),i=o&&st(r);o&&!i&&(X&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function j(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||$.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function F(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?j(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:E(e)}}function T(t,e,n){if("undefined"!=typeof console){var r;if(V.isObject(t)){var o=t.stack;r=e+z(o,t)}else r=e+String(t);"function"==typeof B?B(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function x(t,e,n,r){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(i){I.throwLater(i)}"unhandledRejection"===t?it(t,n,r)||o||T(n,"Unhandled rejection "):it(t,r)}function R(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():V.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(o){}0===e.length&&(e="(empty array)")}return"(<"+S(e)+">, no stack trace)"}function S(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function P(){return"function"==typeof lt}function O(t){var e=t.match(ct);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function A(t,e){if(P()){for(var n,r,o=(t.stack||"").split("\n"),i=(e.stack||"").split("\n"),a=-1,s=-1,c=0;c<o.length;++c){var l=O(o[c]);if(l){n=l.fileName,a=l.line;break}}for(var c=0;c<i.length;++c){var l=O(i[c]);if(l){r=l.fileName,s=l.line;break}}0>a||0>s||!n||!r||n!==r||a>=s||(st=function(t){if(G.test(t))return!0;var e=O(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function H(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);lt(this,H),e>32&&this.uncycle()}var N,L,B,U,I=e._async,D=t("./errors").Warning,V=t("./util"),Q=t("./es5"),q=V.canAttachTrace,G=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,M=/\((?:timers\.js):\d+:\d+\)/,W=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,$=null,z=null,X=!1,K=!(0==V.env("BLUEBIRD_DEBUG")||!V.env("BLUEBIRD_DEBUG")&&"development"!==V.env("NODE_ENV")),J=!(0==V.env("BLUEBIRD_WARNINGS")||!K&&!V.env("BLUEBIRD_WARNINGS")),Y=!(0==V.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!V.env("BLUEBIRD_LONG_STACK_TRACES")),Z=0!=V.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(J||!!V.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){function t(){for(var t=0;t<r.length;++t)r[t]._notifyUnhandledRejection();n()}function n(){r.length=0}var r=[];U=function(e){r.push(e),setTimeout(t,1)},Q.defineProperty(e,"_unhandledRejectionCheck",{value:t}),Q.defineProperty(e,"_unhandledRejectionClear",{value:n})}(),e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),U(this))},e.prototype._notifyUnhandledRejectionIsHandled=function(){x("rejectionHandled",N,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),x("unhandledRejection",L,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return b(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var n=e._getContext();L=V.contextBind(n,t)},e.onUnhandledRejectionHandled=function(t){var n=e._getContext();N=V.contextBind(n,t)};var tt=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ut.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ut.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,o=e.prototype._dereferenceTrace;ut.longStackTraces=!0,tt=function(){if(I.haveItemsQueued()&&!ut.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=o,n.deactivateLongStackTraces(),ut.longStackTraces=!1},e.prototype._captureStackTrace=_,e.prototype._attachExtraTrace=v,e.prototype._dereferenceTrace=y,n.activateLongStackTraces()}},e.hasLongStackTraces=function(){return ut.longStackTraces&&P()};var et={unhandledrejection:{before:function(){var t=V.global.onunhandledrejection;return V.global.onunhandledrejection=null,t},after:function(t){V.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=V.global.onrejectionhandled;return V.global.onrejectionhandled=null,t},after:function(t){V.global.onrejectionhandled=t}}},nt=function(){var t=function(t,e){if(!t)return!V.global.dispatchEvent(e);var n;try{return n=t.before(),!V.global.dispatchEvent(e)}finally{t.after(n)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return V.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r={detail:n,cancelable:!0},o=new CustomEvent(e,r);return Q.defineProperty(o,"promise",{value:n.promise}),Q.defineProperty(o,"reason",{value:n.reason}),t(et[e],o)}}if("function"==typeof Event){var e=new Event("CustomEvent");return V.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new Event(e,{cancelable:!0});return r.detail=n,Q.defineProperty(r,"promise",{value:n.promise}),Q.defineProperty(r,"reason",{value:n.reason}),t(et[e],r)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),V.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!0,n),t(et[e],r)}}catch(n){}return function(){return!1}}(),rt=function(){return V.isNode?function(){return process.emit.apply(process,arguments)}:V.global?function(t){var e="on"+t.toLowerCase(),n=V.global[e];return n?(n.apply(V.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),ot={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:i},it=function(t){var e=!1;try{e=rt.apply(null,arguments)}catch(n){I.throwLater(n),e=!0}var r=!1;try{r=nt(t,ot[t].apply(null,arguments))}catch(n){I.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&tt()),"warnings"in t){var n=t.warnings;ut.warnings=!!n,Z=ut.warnings,V.isObject(n)&&"wForgottenReturn"in n&&(Z=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ut.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=p,e.prototype._propagateFrom=f,e.prototype._onCancel=l,e.prototype._setOnCancel=u,e.prototype._attachCancellationCallback=c,e.prototype._execute=s,at=f,ut.cancellation=!0}if("monitoring"in t&&(t.monitoring&&!ut.monitoring?(ut.monitoring=!0,e.prototype._fireEvent=it):!t.monitoring&&ut.monitoring&&(ut.monitoring=!1,e.prototype._fireEvent=a)),"asyncHooks"in t&&V.nodeSupportsAsyncResource){var i=ut.asyncHooks,h=!!t.asyncHooks;i!==h&&(ut.asyncHooks=h,h?r():o())}return e},e.prototype._fireEvent=a,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var at=h,st=function(){return!1},ct=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;V.inherits(H,Error),n.CapturedTrace=H,H.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,o=this;void 0!==o;++r)e.push(o),o=o._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var i=e[r].stack;void 0===n[i]&&(n[i]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},H.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=F(t),n=e.message,r=[e.stack],o=this;void 0!==o;)r.push(E(o.stack.split("\n"))),o=o._parent;k(r),w(r),V.notEnumerableProp(t,"stack",C(n,r)),V.notEnumerableProp(t,"__stackCleaned__",!0)}};var lt=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():R(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,$=t,z=e;var n=Error.captureStackTrace;return st=function(t){return G.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return $=/@/,z=e,X=!0,function(t){t.stack=(new Error).stack};var o;try{throw new Error}catch(i){o="stack"in i}return"stack"in r||!o||"number"!=typeof Error.stackTraceLimit?(z=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?R(e):e.toString()},null):($=t,z=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(B=function(t){console.warn(t)},V.isNode&&process.stderr.isTTY?B=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:V.isNode||"string"!=typeof(new Error).stack||(B=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ut={warnings:J,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return Y&&e.longStackTraces(),{asyncHooks:function(){return ut.asyncHooks},longStackTraces:function(){return ut.longStackTraces},warnings:function(){return ut.warnings},cancellation:function(){return ut.cancellation},monitoring:function(){return ut.monitoring},propagateFromFunction:function(){return at},boundValueFunction:function(){return d},checkForgottenReturns:g,setBounds:A,warn:b,deprecated:m,CapturedTrace:H,fireDomEvent:nt,fireGlobalEvent:rt}}},{"./errors":9,"./es5":10,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var o=function(){return r};return this.caught(n,o)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function o(t){return this instanceof o?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(t)}var i,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),d=r("TimeoutError","timeout error"),_=r("AggregateError","aggregate error");try{i=TypeError,a=RangeError}catch(v){i=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<y.length;++g)"function"==typeof Array.prototype[y[g]]&&(_.prototype[y[g]]=Array.prototype[y[g]]);s.defineProperty(_.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),_.prototype.isOperational=!0;var m=0;_.prototype.toString=function(){var t=Array(4*m+1).join(" "),e="\n"+t+"AggregateError of:\n";m++,t=Array(4*m+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",o=r.split("\n"),i=0;i<o.length;++i)o[i]=t+o[i];r=o.join("\n"),e+=r+"\n"}return m--,e},u(o,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:h,TimeoutError:d,OperationalError:o,RejectionError:o,AggregateError:_}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:i,RangeError:a,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:f}},{"./es5":10,"./util":21}],10:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var o={}.hasOwnProperty,i={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var n in t)o.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return a}},f=function(t){try{return"[object Array]"===i.call(t)}catch(e){return!1}};e.exports={isArray:f,keys:s,names:s,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],11:[function(t,e,n){"use strict";e.exports=function(e,n,r){function o(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function a(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return l.call(this,this.promise._target()._settledValue())}function c(t){return a(this,t)?void 0:(f.e=t,f)}function l(t){var o=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(o._boundValue()):l.call(o._boundValue(),t);if(u===r)return u;if(void 0!==u){o._setReturnedNonUndefined();var h=n(u,o);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var d=new p("late cancellation observer");return o._attachExtraTrace(d),f.e=d,f}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,c,void 0,this,void 0)}}}return o.isRejected()?(a(this),f.e=t,f):(a(this),t)}var u=t("./util"),p=e.CancellationError,f=u.errorObj,h=t("./catch_filter")(r);return o.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){a(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new o(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,o=new Array(n-1),i=0;for(r=0;n-1>r;++r){var a=arguments[r];if(!u.isObject(a))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(a)));o[i++]=a}o.length=i;var s=arguments[r];return this._passThrough(h(o,s,this),1,void 0,l)},o}},{"./catch_filter":5,"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var o=[].slice.call(arguments);t&&o.pop();var r=new n(o).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var o=s(t).apply(this,arguments),a=r._popContext();return i.checkForgottenReturns(o,a,"Promise.method",r),r._resolveFromSyncValue(o),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return o("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return i.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function o(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),o=0;o<n.length;++o){var i=n[o];p.test(i)||(e[i]=t[i])}return e}return a.markAsOriginatingFromRejection(t),t}function i(t,e){return function(n,r){if(null!==t){if(n){var i=o(s(n));t._attachExtraTrace(i),t._reject(i)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(r);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=i},{"./errors":9,"./es5":10,"./util":21}],15:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if(null==t||t.constructor!==o)throw new j("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new j("expecting a function but got "+f.classString(e))}function o(t){t!==T&&r(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function i(t){this.promise._resolveCallback(t)}function a(t){this.promise._rejectCallback(t,!1)}function s(t){var e=new o(T);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c=function(){return new j("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},l=function(){return new o.PromiseInspection(this._target())},u=function(t){return o.reject(new j(t))},p={},f=t("./util");f.setReflectHandler(l);var h=function(){var t=process.domain;return void 0===t?null:t},d=function(){return null},_=function(){return{domain:h(),async:null}},v=f.isNode&&f.nodeSupportsAsyncResource?t("async_hooks").AsyncResource:null,y=function(){return{domain:h(),async:new v("Bluebird::Promise")}},g=f.isNode?_:d;f.notEnumerableProp(o,"_getContext",g);var m=function(){g=y,f.notEnumerableProp(o,"_getContext",y)},b=function(){g=_,f.notEnumerableProp(o,"_getContext",_)},C=t("./es5"),w=t("./async"),k=new w;C.defineProperty(o,"_async",{value:k});var E=t("./errors"),j=o.TypeError=E.TypeError;o.RangeError=E.RangeError;var F=o.CancellationError=E.CancellationError;o.TimeoutError=E.TimeoutError,o.OperationalError=E.OperationalError,o.RejectionError=E.OperationalError,o.AggregateError=E.AggregateError;var T=function(){},x={},R={},S=t("./thenables")(o,T),P=t("./promise_array")(o,T,S,u,n),O=t("./context")(o),A=(O.create,t("./debuggability")(o,O,m,b)),H=(A.CapturedTrace,t("./finally")(o,S,R)),N=t("./catch_filter")(R),L=t("./nodeback"),B=f.errorObj,U=f.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),o=0;
+for(n=0;e-1>n;++n){var i=arguments[n];if(!f.isObject(i))return u("Catch statement predicate: expecting an object but got "+f.classString(i));r[o++]=i}if(r.length=o,t=arguments[n],"function"!=typeof t)throw new j("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,N(r,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(l,l,void 0,this,void 0)},o.prototype.then=function(t,e){if(A.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?u("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,x,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new P(this).promise()},o.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},o.getNewLibraryCopy=e.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(T);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=U(t)(L(e,n));return r===B&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new P(t).promise()},o.cast=function(t){var e=S(t);return e instanceof o||(e=new o(T),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(T);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new j("expecting a function but got "+f.classString(t));return k.setScheduler(t)},o.prototype._then=function(t,e,n,r,i){var a=void 0!==i,s=a?i:new o(T),c=this._target(),l=c._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var u=g();if(0!==(50397184&l)){var p,h,d=c._settlePromiseCtx;0!==(33554432&l)?(h=c._rejectionHandler0,p=t):0!==(16777216&l)?(h=c._fulfillmentHandler0,p=e,c._unsetRejectionIsUnhandled()):(d=c._settlePromiseLateCancellationObserver,h=new F("late cancellation observer"),c._attachExtraTrace(h),p=e),k.invoke(d,c,{handler:f.contextBind(u,p),promise:s,receiver:r,value:h})}else c._addCallbacks(t,e,s,r,u);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){if(!k.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},o.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===p?void 0:void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,o=t._receiverAt(0);void 0===o&&(o=p),this._addCallbacks(e,n,r,o,null)},o.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=p),this._addCallbacks(n,r,o,i,null)},o.prototype._addCallbacks=function(t,e,n,r,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=f.contextBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=f.contextBind(o,e));else{var a=4*i-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=f.contextBind(o,t)),"function"==typeof e&&(this[a+1]=f.contextBind(o,e))}return this._setLength(i+1),i},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var n=S(t,this);if(!(n instanceof o))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(c());var i=r._bitField;if(0===(50397184&i)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&i))this._fulfill(r._value());else if(0!==(16777216&i))this._reject(r._reason());else{var l=new F("late cancellation observer");r._attachExtraTrace(l),this._reject(l)}}},o.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),o=r===t;if(!o&&!n&&A.warnings()){var i="a promise was rejected with a non-error: "+f.classString(t);this._warn(i,!0)}this._attachExtraTrace(r,e?o:!1),this._reject(t)},o.prototype._resolveFromExecutor=function(t){if(t!==T){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},o.prototype._settlePromiseFromHandler=function(t,e,n,r){var o=r._bitField;if(0===(65536&o)){r._pushContext();var i;e===x?n&&"number"==typeof n.length?i=U(t).apply(this._boundValue(),n):(i=B,i.e=new j("cannot .spread() a non-array: "+f.classString(n))):i=U(t).call(e,n);var a=r._popContext();o=r._bitField,0===(65536&o)&&(i===R?r._reject(n):i===B?r._rejectCallback(i.e,!1):(A.checkForgottenReturns(i,a,"",r,this),r._resolveCallback(i)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,r,i){var a=t instanceof o,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof H&&r.isFinallyHandler()?(r.cancelPromise=t,U(e).call(r,i)===B&&t._reject(B.e)):e===l?t._fulfill(l.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof P?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,i=t.value;"function"==typeof e?n instanceof o?this._settlePromiseFromHandler(e,r,i,n):e.call(r,i,n):n instanceof o&&n._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,n){var r=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,o,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():k.settlePromises(this),this._dereferenceTrace())}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?k.fatalError(t,f.isNode):void((65535&e)>0?k.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,e)}},o.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&C.defineProperty(o.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),o.defer=o.pending=function(){A.deprecated("Promise.defer","new Promise");var t=new o(T);return{promise:t,resolve:i,reject:a}},f.notEnumerableProp(o,"_makeSelfResolutionError",c),t("./method")(o,T,S,u,A),t("./bind")(o,T,S,A),t("./cancel")(o,P,u,A),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,P,S,T,k),o.Promise=o,o.version="3.7.2",f.toFastProperties(o),f.toFastProperties(o.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new o(T)),A.setBounds(w.firstLineError,f.lastLineError),o}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21,async_hooks:void 0}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){function a(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function s(t){var r=this._promise=new e(n);t instanceof e&&(r._propagateFrom(t,3),t.suppressUnhandledRejections()),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var i=r(this._values,this._promise);if(i instanceof e){i=i._target();var s=i._bitField;if(this._values=i,0===(50397184&s))return this._promise._setAsyncGuaranteed(),i._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(i._reason()):this._cancel();i=i._value()}if(i=c.asArray(i),null===i){var u=o("expecting an array or an iterable object but got "+c.classString(i)).reason();return void this._promise._rejectCallback(u,!1)}return 0===i.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(i)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var o=this._promise,i=!1,a=null,s=0;n>s;++s){var c=r(t[s],o);c instanceof e?(c=c._target(),a=c._bitField):a=null,i?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):i=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(c,s)}i||o._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":21}],17:[function(t,e,n){"use strict";function r(t,e,n,r,o){for(var i=0;o>i;++i)n[i+r]=t[i+e],t[i+e]=void 0}function o(t){this._capacity=t,this._length=0,this._front=0}o.prototype._willBeOverCapacity=function(t){return this._capacity<t},o.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},o.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var o=this._front+r-3;this._checkCapacity(r);var i=this._capacity-1;this[o+0&i]=t,this[o+1&i]=e,this[o+2&i]=n,this._length=r},o.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},o.prototype.length=function(){return this._length},o.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},o.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,o=this._length,i=n+o&e-1;r(this,0,this,e,i)},e.exports=o},{}],18:[function(t,e,n){"use strict";var r,o=t("./util"),i=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},a=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var s=global.setImmediate,c=process.nextTick;r=o.isRecentNode?function(t){s.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof a&&"function"==typeof a.resolve){var l=a.resolve();r=function(t){l.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),o=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});o.observe(r,e);var i=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),i()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:i;e.exports=r},{"./util":21}],19:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},i=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return i.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],20:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var o=i(t);if(o===l){r&&r._pushContext();var c=e.reject(o.e);return r&&r._popContext(),c}if("function"==typeof o){if(a(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return s(t,o,r)}}return t}function o(t){return t.then}function i(t){try{return o(t)}catch(e){return l.e=e,l}}function a(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function s(t,r,o){function i(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,p,!0),s=null)}var s=new e(n),u=s;o&&o._pushContext(),s._captureStackTrace(),o&&o._popContext();var p=!0,f=c.tryCatch(r).call(t,i,a);return p=!1,s&&f===l&&(s._rejectCallback(f.e,!0,!0),s=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":21}],21:[function(t,e,n){"use strict";function r(){try{var t=R;return R=null,t.apply(this,arguments)}catch(e){return x.e=e,x}}function o(t){return R=t,r}function i(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return i(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,o=new Array(r+1);for(n=0;r>n;++n)o[n]=t[n];return o[n]=e,o}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(i(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=A.test(t+"")&&F.names(t).length>0;if(n||r||o)return!0}return!1}catch(i){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function d(t){return H.test(t)}function _(t,e,n){for(var r=new Array(t),o=0;t>o;++o)r[o]=e+o+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),o=0;o<r.length;++o){var i=r[o];if(n(i))try{F.defineProperty(e,i,F.getDescriptor(t,i))}catch(a){}}}function k(t){return I?process.env[t]:void 0}function E(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"===C(t))return Promise}catch(e){}}function j(t,e){if(null===t||"function"!=typeof e||e===D)return e;null!==t.domain&&(e=t.domain.bind(e));var n=t.async;if(null!==n){var r=e;e=function(){var t=new Array(2).concat([].slice.call(arguments));return t[0]=r,t[1]=this,n.runInAsyncScope.apply(n,t)}}return e}var F=t("./es5"),T="undefined"==typeof navigator,x={e:{}},R,S="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,P=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],o=Object.create(null);null!=t&&!e(t);){var i;try{i=n(t)}catch(a){return r}for(var s=0;s<i.length;++s){var c=i[s];if(!o[c]){o[c]=!0;var l=Object.getOwnPropertyDescriptor(t,c);null!=l&&null==l.get&&null==l.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var o=[];t:for(var i in n)if(r.call(n,i))o.push(i);else{for(var a=0;a<t.length;++a)if(r.call(t[a],i))continue t;o.push(i)}return o}}(),A=/this\s*\.\s*\S+\s*=/,H=/^[a-z$_][a-z$_0-9]*$/i,N=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),L=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var B="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};L=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?B(t):null}}var U="undefined"!=typeof process&&"[object process]"===C(process).toLowerCase(),I="undefined"!=typeof process&&"undefined"!=typeof process.env,D,V={setReflectHandler:function(t){D=t},isClass:f,isIdentifier:d,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:F.isArray,asArray:L,notEnumerableProp:u,isPrimitive:i,isObject:a,isError:y,canEvaluate:T,errorObj:x,tryCatch:o,inherits:P,withAppended:c,maybeWrapAsError:s,toFastProperties:h,filledRange:_,toString:v,canAttachTrace:b,ensureErrorObject:N,originatesFromRejection:m,markAsOriginatingFromRejection:g,classString:C,copyDescriptors:w,isNode:U,hasEnvVariables:I,env:k,global:S,getNativePromise:E,contextBind:j};V.isRecentNode=V.isNode&&function(){var t;return process.versions&&process.versions.node?t=process.versions.node.split(".").map(Number):process.version&&(t=process.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),V.nodeSupportsAsyncResource=V.isNode&&function(){var e=!1;try{var n=t("async_hooks").AsyncResource;e="function"==typeof n.prototype.runInAsyncScope}catch(r){e=!1}return e}(),V.isNode&&V.toFastProperties(process);try{throw new Error}catch(Q){V.lastLineError=Q}e.exports=V},{"./es5":10,async_hooks:void 0}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/node_modules/bluebird/js/browser/bluebird.js b/node_modules/bluebird/js/browser/bluebird.js
new file mode 100644
index 0000000..7f0686f
--- /dev/null
+++ b/node_modules/bluebird/js/browser/bluebird.js
@@ -0,0 +1,5778 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2018 Petka Antonov
+ *
+ * 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.
+ *
+ */
+/**
+ * bluebird build version 3.7.2
+ * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var SomePromiseArray = Promise._SomePromiseArray;
+function any(promises) {
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(1);
+ ret.setUnwrap();
+ ret.init();
+ return promise;
+}
+
+Promise.any = function (promises) {
+ return any(promises);
+};
+
+Promise.prototype.any = function () {
+ return any(this);
+};
+
+};
+
+},{}],2:[function(_dereq_,module,exports){
+"use strict";
+var firstLineError;
+try {throw new Error(); } catch (e) {firstLineError = e;}
+var schedule = _dereq_("./schedule");
+var Queue = _dereq_("./queue");
+
+function Async() {
+ this._customScheduler = false;
+ this._isTickUsed = false;
+ this._lateQueue = new Queue(16);
+ this._normalQueue = new Queue(16);
+ this._haveDrainedQueues = false;
+ var self = this;
+ this.drainQueues = function () {
+ self._drainQueues();
+ };
+ this._schedule = schedule;
+}
+
+Async.prototype.setScheduler = function(fn) {
+ var prev = this._schedule;
+ this._schedule = fn;
+ this._customScheduler = true;
+ return prev;
+};
+
+Async.prototype.hasCustomScheduler = function() {
+ return this._customScheduler;
+};
+
+Async.prototype.haveItemsQueued = function () {
+ return this._isTickUsed || this._haveDrainedQueues;
+};
+
+
+Async.prototype.fatalError = function(e, isNode) {
+ if (isNode) {
+ process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
+ "\n");
+ process.exit(2);
+ } else {
+ this.throwLater(e);
+ }
+};
+
+Async.prototype.throwLater = function(fn, arg) {
+ if (arguments.length === 1) {
+ arg = fn;
+ fn = function () { throw arg; };
+ }
+ if (typeof setTimeout !== "undefined") {
+ setTimeout(function() {
+ fn(arg);
+ }, 0);
+ } else try {
+ this._schedule(function() {
+ fn(arg);
+ });
+ } catch (e) {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+};
+
+function AsyncInvokeLater(fn, receiver, arg) {
+ this._lateQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncInvoke(fn, receiver, arg) {
+ this._normalQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncSettlePromises(promise) {
+ this._normalQueue._pushOne(promise);
+ this._queueTick();
+}
+
+Async.prototype.invokeLater = AsyncInvokeLater;
+Async.prototype.invoke = AsyncInvoke;
+Async.prototype.settlePromises = AsyncSettlePromises;
+
+
+function _drainQueue(queue) {
+ while (queue.length() > 0) {
+ _drainQueueStep(queue);
+ }
+}
+
+function _drainQueueStep(queue) {
+ var fn = queue.shift();
+ if (typeof fn !== "function") {
+ fn._settlePromises();
+ } else {
+ var receiver = queue.shift();
+ var arg = queue.shift();
+ fn.call(receiver, arg);
+ }
+}
+
+Async.prototype._drainQueues = function () {
+ _drainQueue(this._normalQueue);
+ this._reset();
+ this._haveDrainedQueues = true;
+ _drainQueue(this._lateQueue);
+};
+
+Async.prototype._queueTick = function () {
+ if (!this._isTickUsed) {
+ this._isTickUsed = true;
+ this._schedule(this.drainQueues);
+ }
+};
+
+Async.prototype._reset = function () {
+ this._isTickUsed = false;
+};
+
+module.exports = Async;
+module.exports.firstLineError = firstLineError;
+
+},{"./queue":26,"./schedule":29}],3:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
+var calledBind = false;
+var rejectThis = function(_, e) {
+ this._reject(e);
+};
+
+var targetRejected = function(e, context) {
+ context.promiseRejectionQueued = true;
+ context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
+};
+
+var bindingResolved = function(thisArg, context) {
+ if (((this._bitField & 50397184) === 0)) {
+ this._resolveCallback(context.target);
+ }
+};
+
+var bindingRejected = function(e, context) {
+ if (!context.promiseRejectionQueued) this._reject(e);
+};
+
+Promise.prototype.bind = function (thisArg) {
+ if (!calledBind) {
+ calledBind = true;
+ Promise.prototype._propagateFrom = debug.propagateFromFunction();
+ Promise.prototype._boundValue = debug.boundValueFunction();
+ }
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+ ret._propagateFrom(this, 1);
+ var target = this._target();
+ ret._setBoundTo(maybePromise);
+ if (maybePromise instanceof Promise) {
+ var context = {
+ promiseRejectionQueued: false,
+ promise: ret,
+ target: target,
+ bindingPromise: maybePromise
+ };
+ target._then(INTERNAL, targetRejected, undefined, ret, context);
+ maybePromise._then(
+ bindingResolved, bindingRejected, undefined, ret, context);
+ ret._setOnCancel(maybePromise);
+ } else {
+ ret._resolveCallback(target);
+ }
+ return ret;
+};
+
+Promise.prototype._setBoundTo = function (obj) {
+ if (obj !== undefined) {
+ this._bitField = this._bitField | 2097152;
+ this._boundTo = obj;
+ } else {
+ this._bitField = this._bitField & (~2097152);
+ }
+};
+
+Promise.prototype._isBound = function () {
+ return (this._bitField & 2097152) === 2097152;
+};
+
+Promise.bind = function (thisArg, value) {
+ return Promise.resolve(value).bind(thisArg);
+};
+};
+
+},{}],4:[function(_dereq_,module,exports){
+"use strict";
+var old;
+if (typeof Promise !== "undefined") old = Promise;
+function noConflict() {
+ try { if (Promise === bluebird) Promise = old; }
+ catch (e) {}
+ return bluebird;
+}
+var bluebird = _dereq_("./promise")();
+bluebird.noConflict = noConflict;
+module.exports = bluebird;
+
+},{"./promise":22}],5:[function(_dereq_,module,exports){
+"use strict";
+var cr = Object.create;
+if (cr) {
+ var callerCache = cr(null);
+ var getterCache = cr(null);
+ callerCache[" size"] = getterCache[" size"] = 0;
+}
+
+module.exports = function(Promise) {
+var util = _dereq_("./util");
+var canEvaluate = util.canEvaluate;
+var isIdentifier = util.isIdentifier;
+
+var getMethodCaller;
+var getGetter;
+if (!true) {
+var makeMethodCaller = function (methodName) {
+ return new Function("ensureMethod", " \n\
+ return function(obj) { \n\
+ 'use strict' \n\
+ var len = this.length; \n\
+ ensureMethod(obj, 'methodName'); \n\
+ switch(len) { \n\
+ case 1: return obj.methodName(this[0]); \n\
+ case 2: return obj.methodName(this[0], this[1]); \n\
+ case 3: return obj.methodName(this[0], this[1], this[2]); \n\
+ case 0: return obj.methodName(); \n\
+ default: \n\
+ return obj.methodName.apply(obj, this); \n\
+ } \n\
+ }; \n\
+ ".replace(/methodName/g, methodName))(ensureMethod);
+};
+
+var makeGetter = function (propertyName) {
+ return new Function("obj", " \n\
+ 'use strict'; \n\
+ return obj.propertyName; \n\
+ ".replace("propertyName", propertyName));
+};
+
+var getCompiled = function(name, compiler, cache) {
+ var ret = cache[name];
+ if (typeof ret !== "function") {
+ if (!isIdentifier(name)) {
+ return null;
+ }
+ ret = compiler(name);
+ cache[name] = ret;
+ cache[" size"]++;
+ if (cache[" size"] > 512) {
+ var keys = Object.keys(cache);
+ for (var i = 0; i < 256; ++i) delete cache[keys[i]];
+ cache[" size"] = keys.length - 256;
+ }
+ }
+ return ret;
+};
+
+getMethodCaller = function(name) {
+ return getCompiled(name, makeMethodCaller, callerCache);
+};
+
+getGetter = function(name) {
+ return getCompiled(name, makeGetter, getterCache);
+};
+}
+
+function ensureMethod(obj, methodName) {
+ var fn;
+ if (obj != null) fn = obj[methodName];
+ if (typeof fn !== "function") {
+ var message = "Object " + util.classString(obj) + " has no method '" +
+ util.toString(methodName) + "'";
+ throw new Promise.TypeError(message);
+ }
+ return fn;
+}
+
+function caller(obj) {
+ var methodName = this.pop();
+ var fn = ensureMethod(obj, methodName);
+ return fn.apply(obj, this);
+}
+Promise.prototype.call = function (methodName) {
+ var args = [].slice.call(arguments, 1);;
+ if (!true) {
+ if (canEvaluate) {
+ var maybeCaller = getMethodCaller(methodName);
+ if (maybeCaller !== null) {
+ return this._then(
+ maybeCaller, undefined, undefined, args, undefined);
+ }
+ }
+ }
+ args.push(methodName);
+ return this._then(caller, undefined, undefined, args, undefined);
+};
+
+function namedGetter(obj) {
+ return obj[this];
+}
+function indexedGetter(obj) {
+ var index = +this;
+ if (index < 0) index = Math.max(0, index + obj.length);
+ return obj[index];
+}
+Promise.prototype.get = function (propertyName) {
+ var isIndex = (typeof propertyName === "number");
+ var getter;
+ if (!isIndex) {
+ if (canEvaluate) {
+ var maybeGetter = getGetter(propertyName);
+ getter = maybeGetter !== null ? maybeGetter : namedGetter;
+ } else {
+ getter = namedGetter;
+ }
+ } else {
+ getter = indexedGetter;
+ }
+ return this._then(getter, undefined, undefined, propertyName, undefined);
+};
+};
+
+},{"./util":36}],6:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, PromiseArray, apiRejection, debug) {
+var util = _dereq_("./util");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var async = Promise._async;
+
+Promise.prototype["break"] = Promise.prototype.cancel = function() {
+ if (!debug.cancellation()) return this._warn("cancellation is disabled");
+
+ var promise = this;
+ var child = promise;
+ while (promise._isCancellable()) {
+ if (!promise._cancelBy(child)) {
+ if (child._isFollowing()) {
+ child._followee().cancel();
+ } else {
+ child._cancelBranched();
+ }
+ break;
+ }
+
+ var parent = promise._cancellationParent;
+ if (parent == null || !parent._isCancellable()) {
+ if (promise._isFollowing()) {
+ promise._followee().cancel();
+ } else {
+ promise._cancelBranched();
+ }
+ break;
+ } else {
+ if (promise._isFollowing()) promise._followee().cancel();
+ promise._setWillBeCancelled();
+ child = promise;
+ promise = parent;
+ }
+ }
+};
+
+Promise.prototype._branchHasCancelled = function() {
+ this._branchesRemainingToCancel--;
+};
+
+Promise.prototype._enoughBranchesHaveCancelled = function() {
+ return this._branchesRemainingToCancel === undefined ||
+ this._branchesRemainingToCancel <= 0;
+};
+
+Promise.prototype._cancelBy = function(canceller) {
+ if (canceller === this) {
+ this._branchesRemainingToCancel = 0;
+ this._invokeOnCancel();
+ return true;
+ } else {
+ this._branchHasCancelled();
+ if (this._enoughBranchesHaveCancelled()) {
+ this._invokeOnCancel();
+ return true;
+ }
+ }
+ return false;
+};
+
+Promise.prototype._cancelBranched = function() {
+ if (this._enoughBranchesHaveCancelled()) {
+ this._cancel();
+ }
+};
+
+Promise.prototype._cancel = function() {
+ if (!this._isCancellable()) return;
+ this._setCancelled();
+ async.invoke(this._cancelPromises, this, undefined);
+};
+
+Promise.prototype._cancelPromises = function() {
+ if (this._length() > 0) this._settlePromises();
+};
+
+Promise.prototype._unsetOnCancel = function() {
+ this._onCancelField = undefined;
+};
+
+Promise.prototype._isCancellable = function() {
+ return this.isPending() && !this._isCancelled();
+};
+
+Promise.prototype.isCancellable = function() {
+ return this.isPending() && !this.isCancelled();
+};
+
+Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
+ if (util.isArray(onCancelCallback)) {
+ for (var i = 0; i < onCancelCallback.length; ++i) {
+ this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
+ }
+ } else if (onCancelCallback !== undefined) {
+ if (typeof onCancelCallback === "function") {
+ if (!internalOnly) {
+ var e = tryCatch(onCancelCallback).call(this._boundValue());
+ if (e === errorObj) {
+ this._attachExtraTrace(e.e);
+ async.throwLater(e.e);
+ }
+ }
+ } else {
+ onCancelCallback._resultCancelled(this);
+ }
+ }
+};
+
+Promise.prototype._invokeOnCancel = function() {
+ var onCancelCallback = this._onCancel();
+ this._unsetOnCancel();
+ async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
+};
+
+Promise.prototype._invokeInternalOnCancel = function() {
+ if (this._isCancellable()) {
+ this._doInvokeOnCancel(this._onCancel(), true);
+ this._unsetOnCancel();
+ }
+};
+
+Promise.prototype._resultCancelled = function() {
+ this.cancel();
+};
+
+};
+
+},{"./util":36}],7:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(NEXT_FILTER) {
+var util = _dereq_("./util");
+var getKeys = _dereq_("./es5").keys;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function catchFilter(instances, cb, promise) {
+ return function(e) {
+ var boundTo = promise._boundValue();
+ predicateLoop: for (var i = 0; i < instances.length; ++i) {
+ var item = instances[i];
+
+ if (item === Error ||
+ (item != null && item.prototype instanceof Error)) {
+ if (e instanceof item) {
+ return tryCatch(cb).call(boundTo, e);
+ }
+ } else if (typeof item === "function") {
+ var matchesPredicate = tryCatch(item).call(boundTo, e);
+ if (matchesPredicate === errorObj) {
+ return matchesPredicate;
+ } else if (matchesPredicate) {
+ return tryCatch(cb).call(boundTo, e);
+ }
+ } else if (util.isObject(e)) {
+ var keys = getKeys(item);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ if (item[key] != e[key]) {
+ continue predicateLoop;
+ }
+ }
+ return tryCatch(cb).call(boundTo, e);
+ }
+ }
+ return NEXT_FILTER;
+ };
+}
+
+return catchFilter;
+};
+
+},{"./es5":13,"./util":36}],8:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var longStackTraces = false;
+var contextStack = [];
+
+Promise.prototype._promiseCreated = function() {};
+Promise.prototype._pushContext = function() {};
+Promise.prototype._popContext = function() {return null;};
+Promise._peekContext = Promise.prototype._peekContext = function() {};
+
+function Context() {
+ this._trace = new Context.CapturedTrace(peekContext());
+}
+Context.prototype._pushContext = function () {
+ if (this._trace !== undefined) {
+ this._trace._promiseCreated = null;
+ contextStack.push(this._trace);
+ }
+};
+
+Context.prototype._popContext = function () {
+ if (this._trace !== undefined) {
+ var trace = contextStack.pop();
+ var ret = trace._promiseCreated;
+ trace._promiseCreated = null;
+ return ret;
+ }
+ return null;
+};
+
+function createContext() {
+ if (longStackTraces) return new Context();
+}
+
+function peekContext() {
+ var lastIndex = contextStack.length - 1;
+ if (lastIndex >= 0) {
+ return contextStack[lastIndex];
+ }
+ return undefined;
+}
+Context.CapturedTrace = null;
+Context.create = createContext;
+Context.deactivateLongStackTraces = function() {};
+Context.activateLongStackTraces = function() {
+ var Promise_pushContext = Promise.prototype._pushContext;
+ var Promise_popContext = Promise.prototype._popContext;
+ var Promise_PeekContext = Promise._peekContext;
+ var Promise_peekContext = Promise.prototype._peekContext;
+ var Promise_promiseCreated = Promise.prototype._promiseCreated;
+ Context.deactivateLongStackTraces = function() {
+ Promise.prototype._pushContext = Promise_pushContext;
+ Promise.prototype._popContext = Promise_popContext;
+ Promise._peekContext = Promise_PeekContext;
+ Promise.prototype._peekContext = Promise_peekContext;
+ Promise.prototype._promiseCreated = Promise_promiseCreated;
+ longStackTraces = false;
+ };
+ longStackTraces = true;
+ Promise.prototype._pushContext = Context.prototype._pushContext;
+ Promise.prototype._popContext = Context.prototype._popContext;
+ Promise._peekContext = Promise.prototype._peekContext = peekContext;
+ Promise.prototype._promiseCreated = function() {
+ var ctx = this._peekContext();
+ if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
+ };
+};
+return Context;
+};
+
+},{}],9:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, Context,
+ enableAsyncHooks, disableAsyncHooks) {
+var async = Promise._async;
+var Warning = _dereq_("./errors").Warning;
+var util = _dereq_("./util");
+var es5 = _dereq_("./es5");
+var canAttachTrace = util.canAttachTrace;
+var unhandledRejectionHandled;
+var possiblyUnhandledRejection;
+var bluebirdFramePattern =
+ /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
+var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
+var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
+var stackFramePattern = null;
+var formatStack = null;
+var indentStackFrames = false;
+var printWarning;
+var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
+ (true ||
+ util.env("BLUEBIRD_DEBUG") ||
+ util.env("NODE_ENV") === "development"));
+
+var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
+ (debugging || util.env("BLUEBIRD_WARNINGS")));
+
+var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
+ (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
+
+var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
+ (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
+
+var deferUnhandledRejectionCheck;
+(function() {
+ var promises = [];
+
+ function unhandledRejectionCheck() {
+ for (var i = 0; i < promises.length; ++i) {
+ promises[i]._notifyUnhandledRejection();
+ }
+ unhandledRejectionClear();
+ }
+
+ function unhandledRejectionClear() {
+ promises.length = 0;
+ }
+
+ deferUnhandledRejectionCheck = function(promise) {
+ promises.push(promise);
+ setTimeout(unhandledRejectionCheck, 1);
+ };
+
+ es5.defineProperty(Promise, "_unhandledRejectionCheck", {
+ value: unhandledRejectionCheck
+ });
+ es5.defineProperty(Promise, "_unhandledRejectionClear", {
+ value: unhandledRejectionClear
+ });
+})();
+
+Promise.prototype.suppressUnhandledRejections = function() {
+ var target = this._target();
+ target._bitField = ((target._bitField & (~1048576)) |
+ 524288);
+};
+
+Promise.prototype._ensurePossibleRejectionHandled = function () {
+ if ((this._bitField & 524288) !== 0) return;
+ this._setRejectionIsUnhandled();
+ deferUnhandledRejectionCheck(this);
+};
+
+Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
+ fireRejectionEvent("rejectionHandled",
+ unhandledRejectionHandled, undefined, this);
+};
+
+Promise.prototype._setReturnedNonUndefined = function() {
+ this._bitField = this._bitField | 268435456;
+};
+
+Promise.prototype._returnedNonUndefined = function() {
+ return (this._bitField & 268435456) !== 0;
+};
+
+Promise.prototype._notifyUnhandledRejection = function () {
+ if (this._isRejectionUnhandled()) {
+ var reason = this._settledValue();
+ this._setUnhandledRejectionIsNotified();
+ fireRejectionEvent("unhandledRejection",
+ possiblyUnhandledRejection, reason, this);
+ }
+};
+
+Promise.prototype._setUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField | 262144;
+};
+
+Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField & (~262144);
+};
+
+Promise.prototype._isUnhandledRejectionNotified = function () {
+ return (this._bitField & 262144) > 0;
+};
+
+Promise.prototype._setRejectionIsUnhandled = function () {
+ this._bitField = this._bitField | 1048576;
+};
+
+Promise.prototype._unsetRejectionIsUnhandled = function () {
+ this._bitField = this._bitField & (~1048576);
+ if (this._isUnhandledRejectionNotified()) {
+ this._unsetUnhandledRejectionIsNotified();
+ this._notifyUnhandledRejectionIsHandled();
+ }
+};
+
+Promise.prototype._isRejectionUnhandled = function () {
+ return (this._bitField & 1048576) > 0;
+};
+
+Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
+ return warn(message, shouldUseOwnTrace, promise || this);
+};
+
+Promise.onPossiblyUnhandledRejection = function (fn) {
+ var context = Promise._getContext();
+ possiblyUnhandledRejection = util.contextBind(context, fn);
+};
+
+Promise.onUnhandledRejectionHandled = function (fn) {
+ var context = Promise._getContext();
+ unhandledRejectionHandled = util.contextBind(context, fn);
+};
+
+var disableLongStackTraces = function() {};
+Promise.longStackTraces = function () {
+ if (async.haveItemsQueued() && !config.longStackTraces) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ if (!config.longStackTraces && longStackTracesIsSupported()) {
+ var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
+ var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
+ var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
+ config.longStackTraces = true;
+ disableLongStackTraces = function() {
+ if (async.haveItemsQueued() && !config.longStackTraces) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ Promise.prototype._captureStackTrace = Promise_captureStackTrace;
+ Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
+ Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
+ Context.deactivateLongStackTraces();
+ config.longStackTraces = false;
+ };
+ Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
+ Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
+ Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
+ Context.activateLongStackTraces();
+ }
+};
+
+Promise.hasLongStackTraces = function () {
+ return config.longStackTraces && longStackTracesIsSupported();
+};
+
+
+var legacyHandlers = {
+ unhandledrejection: {
+ before: function() {
+ var ret = util.global.onunhandledrejection;
+ util.global.onunhandledrejection = null;
+ return ret;
+ },
+ after: function(fn) {
+ util.global.onunhandledrejection = fn;
+ }
+ },
+ rejectionhandled: {
+ before: function() {
+ var ret = util.global.onrejectionhandled;
+ util.global.onrejectionhandled = null;
+ return ret;
+ },
+ after: function(fn) {
+ util.global.onrejectionhandled = fn;
+ }
+ }
+};
+
+var fireDomEvent = (function() {
+ var dispatch = function(legacy, e) {
+ if (legacy) {
+ var fn;
+ try {
+ fn = legacy.before();
+ return !util.global.dispatchEvent(e);
+ } finally {
+ legacy.after(fn);
+ }
+ } else {
+ return !util.global.dispatchEvent(e);
+ }
+ };
+ try {
+ if (typeof CustomEvent === "function") {
+ var event = new CustomEvent("CustomEvent");
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var eventData = {
+ detail: event,
+ cancelable: true
+ };
+ var domEvent = new CustomEvent(name, eventData);
+ es5.defineProperty(
+ domEvent, "promise", {value: event.promise});
+ es5.defineProperty(
+ domEvent, "reason", {value: event.reason});
+
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ } else if (typeof Event === "function") {
+ var event = new Event("CustomEvent");
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var domEvent = new Event(name, {
+ cancelable: true
+ });
+ domEvent.detail = event;
+ es5.defineProperty(domEvent, "promise", {value: event.promise});
+ es5.defineProperty(domEvent, "reason", {value: event.reason});
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ } else {
+ var event = document.createEvent("CustomEvent");
+ event.initCustomEvent("testingtheevent", false, true, {});
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var domEvent = document.createEvent("CustomEvent");
+ domEvent.initCustomEvent(name, false, true,
+ event);
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ }
+ } catch (e) {}
+ return function() {
+ return false;
+ };
+})();
+
+var fireGlobalEvent = (function() {
+ if (util.isNode) {
+ return function() {
+ return process.emit.apply(process, arguments);
+ };
+ } else {
+ if (!util.global) {
+ return function() {
+ return false;
+ };
+ }
+ return function(name) {
+ var methodName = "on" + name.toLowerCase();
+ var method = util.global[methodName];
+ if (!method) return false;
+ method.apply(util.global, [].slice.call(arguments, 1));
+ return true;
+ };
+ }
+})();
+
+function generatePromiseLifecycleEventObject(name, promise) {
+ return {promise: promise};
+}
+
+var eventToObjectGenerator = {
+ promiseCreated: generatePromiseLifecycleEventObject,
+ promiseFulfilled: generatePromiseLifecycleEventObject,
+ promiseRejected: generatePromiseLifecycleEventObject,
+ promiseResolved: generatePromiseLifecycleEventObject,
+ promiseCancelled: generatePromiseLifecycleEventObject,
+ promiseChained: function(name, promise, child) {
+ return {promise: promise, child: child};
+ },
+ warning: function(name, warning) {
+ return {warning: warning};
+ },
+ unhandledRejection: function (name, reason, promise) {
+ return {reason: reason, promise: promise};
+ },
+ rejectionHandled: generatePromiseLifecycleEventObject
+};
+
+var activeFireEvent = function (name) {
+ var globalEventFired = false;
+ try {
+ globalEventFired = fireGlobalEvent.apply(null, arguments);
+ } catch (e) {
+ async.throwLater(e);
+ globalEventFired = true;
+ }
+
+ var domEventFired = false;
+ try {
+ domEventFired = fireDomEvent(name,
+ eventToObjectGenerator[name].apply(null, arguments));
+ } catch (e) {
+ async.throwLater(e);
+ domEventFired = true;
+ }
+
+ return domEventFired || globalEventFired;
+};
+
+Promise.config = function(opts) {
+ opts = Object(opts);
+ if ("longStackTraces" in opts) {
+ if (opts.longStackTraces) {
+ Promise.longStackTraces();
+ } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
+ disableLongStackTraces();
+ }
+ }
+ if ("warnings" in opts) {
+ var warningsOption = opts.warnings;
+ config.warnings = !!warningsOption;
+ wForgottenReturn = config.warnings;
+
+ if (util.isObject(warningsOption)) {
+ if ("wForgottenReturn" in warningsOption) {
+ wForgottenReturn = !!warningsOption.wForgottenReturn;
+ }
+ }
+ }
+ if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
+ if (async.haveItemsQueued()) {
+ throw new Error(
+ "cannot enable cancellation after promises are in use");
+ }
+ Promise.prototype._clearCancellationData =
+ cancellationClearCancellationData;
+ Promise.prototype._propagateFrom = cancellationPropagateFrom;
+ Promise.prototype._onCancel = cancellationOnCancel;
+ Promise.prototype._setOnCancel = cancellationSetOnCancel;
+ Promise.prototype._attachCancellationCallback =
+ cancellationAttachCancellationCallback;
+ Promise.prototype._execute = cancellationExecute;
+ propagateFromFunction = cancellationPropagateFrom;
+ config.cancellation = true;
+ }
+ if ("monitoring" in opts) {
+ if (opts.monitoring && !config.monitoring) {
+ config.monitoring = true;
+ Promise.prototype._fireEvent = activeFireEvent;
+ } else if (!opts.monitoring && config.monitoring) {
+ config.monitoring = false;
+ Promise.prototype._fireEvent = defaultFireEvent;
+ }
+ }
+ if ("asyncHooks" in opts && util.nodeSupportsAsyncResource) {
+ var prev = config.asyncHooks;
+ var cur = !!opts.asyncHooks;
+ if (prev !== cur) {
+ config.asyncHooks = cur;
+ if (cur) {
+ enableAsyncHooks();
+ } else {
+ disableAsyncHooks();
+ }
+ }
+ }
+ return Promise;
+};
+
+function defaultFireEvent() { return false; }
+
+Promise.prototype._fireEvent = defaultFireEvent;
+Promise.prototype._execute = function(executor, resolve, reject) {
+ try {
+ executor(resolve, reject);
+ } catch (e) {
+ return e;
+ }
+};
+Promise.prototype._onCancel = function () {};
+Promise.prototype._setOnCancel = function (handler) { ; };
+Promise.prototype._attachCancellationCallback = function(onCancel) {
+ ;
+};
+Promise.prototype._captureStackTrace = function () {};
+Promise.prototype._attachExtraTrace = function () {};
+Promise.prototype._dereferenceTrace = function () {};
+Promise.prototype._clearCancellationData = function() {};
+Promise.prototype._propagateFrom = function (parent, flags) {
+ ;
+ ;
+};
+
+function cancellationExecute(executor, resolve, reject) {
+ var promise = this;
+ try {
+ executor(resolve, reject, function(onCancel) {
+ if (typeof onCancel !== "function") {
+ throw new TypeError("onCancel must be a function, got: " +
+ util.toString(onCancel));
+ }
+ promise._attachCancellationCallback(onCancel);
+ });
+ } catch (e) {
+ return e;
+ }
+}
+
+function cancellationAttachCancellationCallback(onCancel) {
+ if (!this._isCancellable()) return this;
+
+ var previousOnCancel = this._onCancel();
+ if (previousOnCancel !== undefined) {
+ if (util.isArray(previousOnCancel)) {
+ previousOnCancel.push(onCancel);
+ } else {
+ this._setOnCancel([previousOnCancel, onCancel]);
+ }
+ } else {
+ this._setOnCancel(onCancel);
+ }
+}
+
+function cancellationOnCancel() {
+ return this._onCancelField;
+}
+
+function cancellationSetOnCancel(onCancel) {
+ this._onCancelField = onCancel;
+}
+
+function cancellationClearCancellationData() {
+ this._cancellationParent = undefined;
+ this._onCancelField = undefined;
+}
+
+function cancellationPropagateFrom(parent, flags) {
+ if ((flags & 1) !== 0) {
+ this._cancellationParent = parent;
+ var branchesRemainingToCancel = parent._branchesRemainingToCancel;
+ if (branchesRemainingToCancel === undefined) {
+ branchesRemainingToCancel = 0;
+ }
+ parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
+ }
+ if ((flags & 2) !== 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+}
+
+function bindingPropagateFrom(parent, flags) {
+ if ((flags & 2) !== 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+}
+var propagateFromFunction = bindingPropagateFrom;
+
+function boundValueFunction() {
+ var ret = this._boundTo;
+ if (ret !== undefined) {
+ if (ret instanceof Promise) {
+ if (ret.isFulfilled()) {
+ return ret.value();
+ } else {
+ return undefined;
+ }
+ }
+ }
+ return ret;
+}
+
+function longStackTracesCaptureStackTrace() {
+ this._trace = new CapturedTrace(this._peekContext());
+}
+
+function longStackTracesAttachExtraTrace(error, ignoreSelf) {
+ if (canAttachTrace(error)) {
+ var trace = this._trace;
+ if (trace !== undefined) {
+ if (ignoreSelf) trace = trace._parent;
+ }
+ if (trace !== undefined) {
+ trace.attachExtraTrace(error);
+ } else if (!error.__stackCleaned__) {
+ var parsed = parseStackAndMessage(error);
+ util.notEnumerableProp(error, "stack",
+ parsed.message + "\n" + parsed.stack.join("\n"));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+ }
+ }
+}
+
+function longStackTracesDereferenceTrace() {
+ this._trace = undefined;
+}
+
+function checkForgottenReturns(returnValue, promiseCreated, name, promise,
+ parent) {
+ if (returnValue === undefined && promiseCreated !== null &&
+ wForgottenReturn) {
+ if (parent !== undefined && parent._returnedNonUndefined()) return;
+ if ((promise._bitField & 65535) === 0) return;
+
+ if (name) name = name + " ";
+ var handlerLine = "";
+ var creatorLine = "";
+ if (promiseCreated._trace) {
+ var traceLines = promiseCreated._trace.stack.split("\n");
+ var stack = cleanStack(traceLines);
+ for (var i = stack.length - 1; i >= 0; --i) {
+ var line = stack[i];
+ if (!nodeFramePattern.test(line)) {
+ var lineMatches = line.match(parseLinePattern);
+ if (lineMatches) {
+ handlerLine = "at " + lineMatches[1] +
+ ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
+ }
+ break;
+ }
+ }
+
+ if (stack.length > 0) {
+ var firstUserLine = stack[0];
+ for (var i = 0; i < traceLines.length; ++i) {
+
+ if (traceLines[i] === firstUserLine) {
+ if (i > 0) {
+ creatorLine = "\n" + traceLines[i - 1];
+ }
+ break;
+ }
+ }
+
+ }
+ }
+ var msg = "a promise was created in a " + name +
+ "handler " + handlerLine + "but was not returned from it, " +
+ "see http://goo.gl/rRqMUw" +
+ creatorLine;
+ promise._warn(msg, true, promiseCreated);
+ }
+}
+
+function deprecated(name, replacement) {
+ var message = name +
+ " is deprecated and will be removed in a future version.";
+ if (replacement) message += " Use " + replacement + " instead.";
+ return warn(message);
+}
+
+function warn(message, shouldUseOwnTrace, promise) {
+ if (!config.warnings) return;
+ var warning = new Warning(message);
+ var ctx;
+ if (shouldUseOwnTrace) {
+ promise._attachExtraTrace(warning);
+ } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
+ ctx.attachExtraTrace(warning);
+ } else {
+ var parsed = parseStackAndMessage(warning);
+ warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
+ }
+
+ if (!activeFireEvent("warning", warning)) {
+ formatAndLogError(warning, "", true);
+ }
+}
+
+function reconstructStack(message, stacks) {
+ for (var i = 0; i < stacks.length - 1; ++i) {
+ stacks[i].push("From previous event:");
+ stacks[i] = stacks[i].join("\n");
+ }
+ if (i < stacks.length) {
+ stacks[i] = stacks[i].join("\n");
+ }
+ return message + "\n" + stacks.join("\n");
+}
+
+function removeDuplicateOrEmptyJumps(stacks) {
+ for (var i = 0; i < stacks.length; ++i) {
+ if (stacks[i].length === 0 ||
+ ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
+ stacks.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function removeCommonRoots(stacks) {
+ var current = stacks[0];
+ for (var i = 1; i < stacks.length; ++i) {
+ var prev = stacks[i];
+ var currentLastIndex = current.length - 1;
+ var currentLastLine = current[currentLastIndex];
+ var commonRootMeetPoint = -1;
+
+ for (var j = prev.length - 1; j >= 0; --j) {
+ if (prev[j] === currentLastLine) {
+ commonRootMeetPoint = j;
+ break;
+ }
+ }
+
+ for (var j = commonRootMeetPoint; j >= 0; --j) {
+ var line = prev[j];
+ if (current[currentLastIndex] === line) {
+ current.pop();
+ currentLastIndex--;
+ } else {
+ break;
+ }
+ }
+ current = prev;
+ }
+}
+
+function cleanStack(stack) {
+ var ret = [];
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ var isTraceLine = " (No stack trace)" === line ||
+ stackFramePattern.test(line);
+ var isInternalFrame = isTraceLine && shouldIgnore(line);
+ if (isTraceLine && !isInternalFrame) {
+ if (indentStackFrames && line.charAt(0) !== " ") {
+ line = " " + line;
+ }
+ ret.push(line);
+ }
+ }
+ return ret;
+}
+
+function stackFramesAsArray(error) {
+ var stack = error.stack.replace(/\s+$/g, "").split("\n");
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ if (" (No stack trace)" === line || stackFramePattern.test(line)) {
+ break;
+ }
+ }
+ if (i > 0 && error.name != "SyntaxError") {
+ stack = stack.slice(i);
+ }
+ return stack;
+}
+
+function parseStackAndMessage(error) {
+ var stack = error.stack;
+ var message = error.toString();
+ stack = typeof stack === "string" && stack.length > 0
+ ? stackFramesAsArray(error) : [" (No stack trace)"];
+ return {
+ message: message,
+ stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
+ };
+}
+
+function formatAndLogError(error, title, isSoft) {
+ if (typeof console !== "undefined") {
+ var message;
+ if (util.isObject(error)) {
+ var stack = error.stack;
+ message = title + formatStack(stack, error);
+ } else {
+ message = title + String(error);
+ }
+ if (typeof printWarning === "function") {
+ printWarning(message, isSoft);
+ } else if (typeof console.log === "function" ||
+ typeof console.log === "object") {
+ console.log(message);
+ }
+ }
+}
+
+function fireRejectionEvent(name, localHandler, reason, promise) {
+ var localEventFired = false;
+ try {
+ if (typeof localHandler === "function") {
+ localEventFired = true;
+ if (name === "rejectionHandled") {
+ localHandler(promise);
+ } else {
+ localHandler(reason, promise);
+ }
+ }
+ } catch (e) {
+ async.throwLater(e);
+ }
+
+ if (name === "unhandledRejection") {
+ if (!activeFireEvent(name, reason, promise) && !localEventFired) {
+ formatAndLogError(reason, "Unhandled rejection ");
+ }
+ } else {
+ activeFireEvent(name, promise);
+ }
+}
+
+function formatNonError(obj) {
+ var str;
+ if (typeof obj === "function") {
+ str = "[function " +
+ (obj.name || "anonymous") +
+ "]";
+ } else {
+ str = obj && typeof obj.toString === "function"
+ ? obj.toString() : util.toString(obj);
+ var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
+ if (ruselessToString.test(str)) {
+ try {
+ var newStr = JSON.stringify(obj);
+ str = newStr;
+ }
+ catch(e) {
+
+ }
+ }
+ if (str.length === 0) {
+ str = "(empty array)";
+ }
+ }
+ return ("(<" + snip(str) + ">, no stack trace)");
+}
+
+function snip(str) {
+ var maxChars = 41;
+ if (str.length < maxChars) {
+ return str;
+ }
+ return str.substr(0, maxChars - 3) + "...";
+}
+
+function longStackTracesIsSupported() {
+ return typeof captureStackTrace === "function";
+}
+
+var shouldIgnore = function() { return false; };
+var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
+function parseLineInfo(line) {
+ var matches = line.match(parseLineInfoRegex);
+ if (matches) {
+ return {
+ fileName: matches[1],
+ line: parseInt(matches[2], 10)
+ };
+ }
+}
+
+function setBounds(firstLineError, lastLineError) {
+ if (!longStackTracesIsSupported()) return;
+ var firstStackLines = (firstLineError.stack || "").split("\n");
+ var lastStackLines = (lastLineError.stack || "").split("\n");
+ var firstIndex = -1;
+ var lastIndex = -1;
+ var firstFileName;
+ var lastFileName;
+ for (var i = 0; i < firstStackLines.length; ++i) {
+ var result = parseLineInfo(firstStackLines[i]);
+ if (result) {
+ firstFileName = result.fileName;
+ firstIndex = result.line;
+ break;
+ }
+ }
+ for (var i = 0; i < lastStackLines.length; ++i) {
+ var result = parseLineInfo(lastStackLines[i]);
+ if (result) {
+ lastFileName = result.fileName;
+ lastIndex = result.line;
+ break;
+ }
+ }
+ if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
+ firstFileName !== lastFileName || firstIndex >= lastIndex) {
+ return;
+ }
+
+ shouldIgnore = function(line) {
+ if (bluebirdFramePattern.test(line)) return true;
+ var info = parseLineInfo(line);
+ if (info) {
+ if (info.fileName === firstFileName &&
+ (firstIndex <= info.line && info.line <= lastIndex)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+
+function CapturedTrace(parent) {
+ this._parent = parent;
+ this._promisesCreated = 0;
+ var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
+ captureStackTrace(this, CapturedTrace);
+ if (length > 32) this.uncycle();
+}
+util.inherits(CapturedTrace, Error);
+Context.CapturedTrace = CapturedTrace;
+
+CapturedTrace.prototype.uncycle = function() {
+ var length = this._length;
+ if (length < 2) return;
+ var nodes = [];
+ var stackToIndex = {};
+
+ for (var i = 0, node = this; node !== undefined; ++i) {
+ nodes.push(node);
+ node = node._parent;
+ }
+ length = this._length = i;
+ for (var i = length - 1; i >= 0; --i) {
+ var stack = nodes[i].stack;
+ if (stackToIndex[stack] === undefined) {
+ stackToIndex[stack] = i;
+ }
+ }
+ for (var i = 0; i < length; ++i) {
+ var currentStack = nodes[i].stack;
+ var index = stackToIndex[currentStack];
+ if (index !== undefined && index !== i) {
+ if (index > 0) {
+ nodes[index - 1]._parent = undefined;
+ nodes[index - 1]._length = 1;
+ }
+ nodes[i]._parent = undefined;
+ nodes[i]._length = 1;
+ var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
+
+ if (index < length - 1) {
+ cycleEdgeNode._parent = nodes[index + 1];
+ cycleEdgeNode._parent.uncycle();
+ cycleEdgeNode._length =
+ cycleEdgeNode._parent._length + 1;
+ } else {
+ cycleEdgeNode._parent = undefined;
+ cycleEdgeNode._length = 1;
+ }
+ var currentChildLength = cycleEdgeNode._length + 1;
+ for (var j = i - 2; j >= 0; --j) {
+ nodes[j]._length = currentChildLength;
+ currentChildLength++;
+ }
+ return;
+ }
+ }
+};
+
+CapturedTrace.prototype.attachExtraTrace = function(error) {
+ if (error.__stackCleaned__) return;
+ this.uncycle();
+ var parsed = parseStackAndMessage(error);
+ var message = parsed.message;
+ var stacks = [parsed.stack];
+
+ var trace = this;
+ while (trace !== undefined) {
+ stacks.push(cleanStack(trace.stack.split("\n")));
+ trace = trace._parent;
+ }
+ removeCommonRoots(stacks);
+ removeDuplicateOrEmptyJumps(stacks);
+ util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+};
+
+var captureStackTrace = (function stackDetection() {
+ var v8stackFramePattern = /^\s*at\s*/;
+ var v8stackFormatter = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if (error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ if (typeof Error.stackTraceLimit === "number" &&
+ typeof Error.captureStackTrace === "function") {
+ Error.stackTraceLimit += 6;
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ var captureStackTrace = Error.captureStackTrace;
+
+ shouldIgnore = function(line) {
+ return bluebirdFramePattern.test(line);
+ };
+ return function(receiver, ignoreUntil) {
+ Error.stackTraceLimit += 6;
+ captureStackTrace(receiver, ignoreUntil);
+ Error.stackTraceLimit -= 6;
+ };
+ }
+ var err = new Error();
+
+ if (typeof err.stack === "string" &&
+ err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
+ stackFramePattern = /@/;
+ formatStack = v8stackFormatter;
+ indentStackFrames = true;
+ return function captureStackTrace(o) {
+ o.stack = new Error().stack;
+ };
+ }
+
+ var hasStackAfterThrow;
+ try { throw new Error(); }
+ catch(e) {
+ hasStackAfterThrow = ("stack" in e);
+ }
+ if (!("stack" in err) && hasStackAfterThrow &&
+ typeof Error.stackTraceLimit === "number") {
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ return function captureStackTrace(o) {
+ Error.stackTraceLimit += 6;
+ try { throw new Error(); }
+ catch(e) { o.stack = e.stack; }
+ Error.stackTraceLimit -= 6;
+ };
+ }
+
+ formatStack = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if ((typeof error === "object" ||
+ typeof error === "function") &&
+ error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ return null;
+
+})([]);
+
+if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
+ printWarning = function (message) {
+ console.warn(message);
+ };
+ if (util.isNode && process.stderr.isTTY) {
+ printWarning = function(message, isSoft) {
+ var color = isSoft ? "\u001b[33m" : "\u001b[31m";
+ console.warn(color + message + "\u001b[0m\n");
+ };
+ } else if (!util.isNode && typeof (new Error().stack) === "string") {
+ printWarning = function(message, isSoft) {
+ console.warn("%c" + message,
+ isSoft ? "color: darkorange" : "color: red");
+ };
+ }
+}
+
+var config = {
+ warnings: warnings,
+ longStackTraces: false,
+ cancellation: false,
+ monitoring: false,
+ asyncHooks: false
+};
+
+if (longStackTraces) Promise.longStackTraces();
+
+return {
+ asyncHooks: function() {
+ return config.asyncHooks;
+ },
+ longStackTraces: function() {
+ return config.longStackTraces;
+ },
+ warnings: function() {
+ return config.warnings;
+ },
+ cancellation: function() {
+ return config.cancellation;
+ },
+ monitoring: function() {
+ return config.monitoring;
+ },
+ propagateFromFunction: function() {
+ return propagateFromFunction;
+ },
+ boundValueFunction: function() {
+ return boundValueFunction;
+ },
+ checkForgottenReturns: checkForgottenReturns,
+ setBounds: setBounds,
+ warn: warn,
+ deprecated: deprecated,
+ CapturedTrace: CapturedTrace,
+ fireDomEvent: fireDomEvent,
+ fireGlobalEvent: fireGlobalEvent
+};
+};
+
+},{"./errors":12,"./es5":13,"./util":36}],10:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+function returner() {
+ return this.value;
+}
+function thrower() {
+ throw this.reason;
+}
+
+Promise.prototype["return"] =
+Promise.prototype.thenReturn = function (value) {
+ if (value instanceof Promise) value.suppressUnhandledRejections();
+ return this._then(
+ returner, undefined, undefined, {value: value}, undefined);
+};
+
+Promise.prototype["throw"] =
+Promise.prototype.thenThrow = function (reason) {
+ return this._then(
+ thrower, undefined, undefined, {reason: reason}, undefined);
+};
+
+Promise.prototype.catchThrow = function (reason) {
+ if (arguments.length <= 1) {
+ return this._then(
+ undefined, thrower, undefined, {reason: reason}, undefined);
+ } else {
+ var _reason = arguments[1];
+ var handler = function() {throw _reason;};
+ return this.caught(reason, handler);
+ }
+};
+
+Promise.prototype.catchReturn = function (value) {
+ if (arguments.length <= 1) {
+ if (value instanceof Promise) value.suppressUnhandledRejections();
+ return this._then(
+ undefined, returner, undefined, {value: value}, undefined);
+ } else {
+ var _value = arguments[1];
+ if (_value instanceof Promise) _value.suppressUnhandledRejections();
+ var handler = function() {return _value;};
+ return this.caught(value, handler);
+ }
+};
+};
+
+},{}],11:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseReduce = Promise.reduce;
+var PromiseAll = Promise.all;
+
+function promiseAllThis() {
+ return PromiseAll(this);
+}
+
+function PromiseMapSeries(promises, fn) {
+ return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
+}
+
+Promise.prototype.each = function (fn) {
+ return PromiseReduce(this, fn, INTERNAL, 0)
+ ._then(promiseAllThis, undefined, undefined, this, undefined);
+};
+
+Promise.prototype.mapSeries = function (fn) {
+ return PromiseReduce(this, fn, INTERNAL, INTERNAL);
+};
+
+Promise.each = function (promises, fn) {
+ return PromiseReduce(promises, fn, INTERNAL, 0)
+ ._then(promiseAllThis, undefined, undefined, promises, undefined);
+};
+
+Promise.mapSeries = PromiseMapSeries;
+};
+
+
+},{}],12:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5");
+var Objectfreeze = es5.freeze;
+var util = _dereq_("./util");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+
+function subError(nameProperty, defaultMessage) {
+ function SubError(message) {
+ if (!(this instanceof SubError)) return new SubError(message);
+ notEnumerableProp(this, "message",
+ typeof message === "string" ? message : defaultMessage);
+ notEnumerableProp(this, "name", nameProperty);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ Error.call(this);
+ }
+ }
+ inherits(SubError, Error);
+ return SubError;
+}
+
+var _TypeError, _RangeError;
+var Warning = subError("Warning", "warning");
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+var AggregateError = subError("AggregateError", "aggregate error");
+try {
+ _TypeError = TypeError;
+ _RangeError = RangeError;
+} catch(e) {
+ _TypeError = subError("TypeError", "type error");
+ _RangeError = subError("RangeError", "range error");
+}
+
+var methods = ("join pop push shift unshift slice filter forEach some " +
+ "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
+
+for (var i = 0; i < methods.length; ++i) {
+ if (typeof Array.prototype[methods[i]] === "function") {
+ AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
+ }
+}
+
+es5.defineProperty(AggregateError.prototype, "length", {
+ value: 0,
+ configurable: false,
+ writable: true,
+ enumerable: true
+});
+AggregateError.prototype["isOperational"] = true;
+var level = 0;
+AggregateError.prototype.toString = function() {
+ var indent = Array(level * 4 + 1).join(" ");
+ var ret = "\n" + indent + "AggregateError of:" + "\n";
+ level++;
+ indent = Array(level * 4 + 1).join(" ");
+ for (var i = 0; i < this.length; ++i) {
+ var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
+ var lines = str.split("\n");
+ for (var j = 0; j < lines.length; ++j) {
+ lines[j] = indent + lines[j];
+ }
+ str = lines.join("\n");
+ ret += str + "\n";
+ }
+ level--;
+ return ret;
+};
+
+function OperationalError(message) {
+ if (!(this instanceof OperationalError))
+ return new OperationalError(message);
+ notEnumerableProp(this, "name", "OperationalError");
+ notEnumerableProp(this, "message", message);
+ this.cause = message;
+ this["isOperational"] = true;
+
+ if (message instanceof Error) {
+ notEnumerableProp(this, "message", message.message);
+ notEnumerableProp(this, "stack", message.stack);
+ } else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(OperationalError, Error);
+
+var errorTypes = Error["__BluebirdErrorTypes__"];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ OperationalError: OperationalError,
+ RejectionError: OperationalError,
+ AggregateError: AggregateError
+ });
+ es5.defineProperty(Error, "__BluebirdErrorTypes__", {
+ value: errorTypes,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: _TypeError,
+ RangeError: _RangeError,
+ CancellationError: errorTypes.CancellationError,
+ OperationalError: errorTypes.OperationalError,
+ TimeoutError: errorTypes.TimeoutError,
+ AggregateError: errorTypes.AggregateError,
+ Warning: Warning
+};
+
+},{"./es5":13,"./util":36}],13:[function(_dereq_,module,exports){
+var isES5 = (function(){
+ "use strict";
+ return this === undefined;
+})();
+
+if (isES5) {
+ module.exports = {
+ freeze: Object.freeze,
+ defineProperty: Object.defineProperty,
+ getDescriptor: Object.getOwnPropertyDescriptor,
+ keys: Object.keys,
+ names: Object.getOwnPropertyNames,
+ getPrototypeOf: Object.getPrototypeOf,
+ isArray: Array.isArray,
+ isES5: isES5,
+ propertyIsWritable: function(obj, prop) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
+ return !!(!descriptor || descriptor.writable || descriptor.set);
+ }
+ };
+} else {
+ var has = {}.hasOwnProperty;
+ var str = {}.toString;
+ var proto = {}.constructor.prototype;
+
+ var ObjectKeys = function (o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+
+ var ObjectGetDescriptor = function(o, key) {
+ return {value: o[key]};
+ };
+
+ var ObjectDefineProperty = function (o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ };
+
+ var ObjectFreeze = function (obj) {
+ return obj;
+ };
+
+ var ObjectGetPrototypeOf = function (obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ };
+
+ var ArrayIsArray = function (obj) {
+ try {
+ return str.call(obj) === "[object Array]";
+ }
+ catch(e) {
+ return false;
+ }
+ };
+
+ module.exports = {
+ isArray: ArrayIsArray,
+ keys: ObjectKeys,
+ names: ObjectKeys,
+ defineProperty: ObjectDefineProperty,
+ getDescriptor: ObjectGetDescriptor,
+ freeze: ObjectFreeze,
+ getPrototypeOf: ObjectGetPrototypeOf,
+ isES5: isES5,
+ propertyIsWritable: function() {
+ return true;
+ }
+ };
+}
+
+},{}],14:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseMap = Promise.map;
+
+Promise.prototype.filter = function (fn, options) {
+ return PromiseMap(this, fn, options, INTERNAL);
+};
+
+Promise.filter = function (promises, fn, options) {
+ return PromiseMap(promises, fn, options, INTERNAL);
+};
+};
+
+},{}],15:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
+var util = _dereq_("./util");
+var CancellationError = Promise.CancellationError;
+var errorObj = util.errorObj;
+var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
+
+function PassThroughHandlerContext(promise, type, handler) {
+ this.promise = promise;
+ this.type = type;
+ this.handler = handler;
+ this.called = false;
+ this.cancelPromise = null;
+}
+
+PassThroughHandlerContext.prototype.isFinallyHandler = function() {
+ return this.type === 0;
+};
+
+function FinallyHandlerCancelReaction(finallyHandler) {
+ this.finallyHandler = finallyHandler;
+}
+
+FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
+ checkCancel(this.finallyHandler);
+};
+
+function checkCancel(ctx, reason) {
+ if (ctx.cancelPromise != null) {
+ if (arguments.length > 1) {
+ ctx.cancelPromise._reject(reason);
+ } else {
+ ctx.cancelPromise._cancel();
+ }
+ ctx.cancelPromise = null;
+ return true;
+ }
+ return false;
+}
+
+function succeed() {
+ return finallyHandler.call(this, this.promise._target()._settledValue());
+}
+function fail(reason) {
+ if (checkCancel(this, reason)) return;
+ errorObj.e = reason;
+ return errorObj;
+}
+function finallyHandler(reasonOrValue) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ if (!this.called) {
+ this.called = true;
+ var ret = this.isFinallyHandler()
+ ? handler.call(promise._boundValue())
+ : handler.call(promise._boundValue(), reasonOrValue);
+ if (ret === NEXT_FILTER) {
+ return ret;
+ } else if (ret !== undefined) {
+ promise._setReturnedNonUndefined();
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ if (this.cancelPromise != null) {
+ if (maybePromise._isCancelled()) {
+ var reason =
+ new CancellationError("late cancellation observer");
+ promise._attachExtraTrace(reason);
+ errorObj.e = reason;
+ return errorObj;
+ } else if (maybePromise.isPending()) {
+ maybePromise._attachCancellationCallback(
+ new FinallyHandlerCancelReaction(this));
+ }
+ }
+ return maybePromise._then(
+ succeed, fail, undefined, this, undefined);
+ }
+ }
+ }
+
+ if (promise.isRejected()) {
+ checkCancel(this);
+ errorObj.e = reasonOrValue;
+ return errorObj;
+ } else {
+ checkCancel(this);
+ return reasonOrValue;
+ }
+}
+
+Promise.prototype._passThrough = function(handler, type, success, fail) {
+ if (typeof handler !== "function") return this.then();
+ return this._then(success,
+ fail,
+ undefined,
+ new PassThroughHandlerContext(this, type, handler),
+ undefined);
+};
+
+Promise.prototype.lastly =
+Promise.prototype["finally"] = function (handler) {
+ return this._passThrough(handler,
+ 0,
+ finallyHandler,
+ finallyHandler);
+};
+
+
+Promise.prototype.tap = function (handler) {
+ return this._passThrough(handler, 1, finallyHandler);
+};
+
+Promise.prototype.tapCatch = function (handlerOrPredicate) {
+ var len = arguments.length;
+ if(len === 1) {
+ return this._passThrough(handlerOrPredicate,
+ 1,
+ undefined,
+ finallyHandler);
+ } else {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (util.isObject(item)) {
+ catchInstances[j++] = item;
+ } else {
+ return Promise.reject(new TypeError(
+ "tapCatch statement predicate: "
+ + "expecting an object but got " + util.classString(item)
+ ));
+ }
+ }
+ catchInstances.length = j;
+ var handler = arguments[i];
+ return this._passThrough(catchFilter(catchInstances, handler, this),
+ 1,
+ undefined,
+ finallyHandler);
+ }
+
+};
+
+return PassThroughHandlerContext;
+};
+
+},{"./catch_filter":7,"./util":36}],16:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ apiRejection,
+ INTERNAL,
+ tryConvertToPromise,
+ Proxyable,
+ debug) {
+var errors = _dereq_("./errors");
+var TypeError = errors.TypeError;
+var util = _dereq_("./util");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+var yieldHandlers = [];
+
+function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
+ for (var i = 0; i < yieldHandlers.length; ++i) {
+ traceParent._pushContext();
+ var result = tryCatch(yieldHandlers[i])(value);
+ traceParent._popContext();
+ if (result === errorObj) {
+ traceParent._pushContext();
+ var ret = Promise.reject(errorObj.e);
+ traceParent._popContext();
+ return ret;
+ }
+ var maybePromise = tryConvertToPromise(result, traceParent);
+ if (maybePromise instanceof Promise) return maybePromise;
+ }
+ return null;
+}
+
+function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
+ if (debug.cancellation()) {
+ var internal = new Promise(INTERNAL);
+ var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
+ this._promise = internal.lastly(function() {
+ return _finallyPromise;
+ });
+ internal._captureStackTrace();
+ internal._setOnCancel(this);
+ } else {
+ var promise = this._promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ }
+ this._stack = stack;
+ this._generatorFunction = generatorFunction;
+ this._receiver = receiver;
+ this._generator = undefined;
+ this._yieldHandlers = typeof yieldHandler === "function"
+ ? [yieldHandler].concat(yieldHandlers)
+ : yieldHandlers;
+ this._yieldedPromise = null;
+ this._cancellationPhase = false;
+}
+util.inherits(PromiseSpawn, Proxyable);
+
+PromiseSpawn.prototype._isResolved = function() {
+ return this._promise === null;
+};
+
+PromiseSpawn.prototype._cleanup = function() {
+ this._promise = this._generator = null;
+ if (debug.cancellation() && this._finallyPromise !== null) {
+ this._finallyPromise._fulfill();
+ this._finallyPromise = null;
+ }
+};
+
+PromiseSpawn.prototype._promiseCancelled = function() {
+ if (this._isResolved()) return;
+ var implementsReturn = typeof this._generator["return"] !== "undefined";
+
+ var result;
+ if (!implementsReturn) {
+ var reason = new Promise.CancellationError(
+ "generator .return() sentinel");
+ Promise.coroutine.returnSentinel = reason;
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ result = tryCatch(this._generator["throw"]).call(this._generator,
+ reason);
+ this._promise._popContext();
+ } else {
+ this._promise._pushContext();
+ result = tryCatch(this._generator["return"]).call(this._generator,
+ undefined);
+ this._promise._popContext();
+ }
+ this._cancellationPhase = true;
+ this._yieldedPromise = null;
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._promiseFulfilled = function(value) {
+ this._yieldedPromise = null;
+ this._promise._pushContext();
+ var result = tryCatch(this._generator.next).call(this._generator, value);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._promiseRejected = function(reason) {
+ this._yieldedPromise = null;
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ var result = tryCatch(this._generator["throw"])
+ .call(this._generator, reason);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._resultCancelled = function() {
+ if (this._yieldedPromise instanceof Promise) {
+ var promise = this._yieldedPromise;
+ this._yieldedPromise = null;
+ promise.cancel();
+ }
+};
+
+PromiseSpawn.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseSpawn.prototype._run = function () {
+ this._generator = this._generatorFunction.call(this._receiver);
+ this._receiver =
+ this._generatorFunction = undefined;
+ this._promiseFulfilled(undefined);
+};
+
+PromiseSpawn.prototype._continue = function (result) {
+ var promise = this._promise;
+ if (result === errorObj) {
+ this._cleanup();
+ if (this._cancellationPhase) {
+ return promise.cancel();
+ } else {
+ return promise._rejectCallback(result.e, false);
+ }
+ }
+
+ var value = result.value;
+ if (result.done === true) {
+ this._cleanup();
+ if (this._cancellationPhase) {
+ return promise.cancel();
+ } else {
+ return promise._resolveCallback(value);
+ }
+ } else {
+ var maybePromise = tryConvertToPromise(value, this._promise);
+ if (!(maybePromise instanceof Promise)) {
+ maybePromise =
+ promiseFromYieldHandler(maybePromise,
+ this._yieldHandlers,
+ this._promise);
+ if (maybePromise === null) {
+ this._promiseRejected(
+ new TypeError(
+ "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) +
+ "From coroutine:\u000a" +
+ this._stack.split("\n").slice(1, -7).join("\n")
+ )
+ );
+ return;
+ }
+ }
+ maybePromise = maybePromise._target();
+ var bitField = maybePromise._bitField;
+ ;
+ if (((bitField & 50397184) === 0)) {
+ this._yieldedPromise = maybePromise;
+ maybePromise._proxy(this, null);
+ } else if (((bitField & 33554432) !== 0)) {
+ Promise._async.invoke(
+ this._promiseFulfilled, this, maybePromise._value()
+ );
+ } else if (((bitField & 16777216) !== 0)) {
+ Promise._async.invoke(
+ this._promiseRejected, this, maybePromise._reason()
+ );
+ } else {
+ this._promiseCancelled();
+ }
+ }
+};
+
+Promise.coroutine = function (generatorFunction, options) {
+ if (typeof generatorFunction !== "function") {
+ throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ var yieldHandler = Object(options).yieldHandler;
+ var PromiseSpawn$ = PromiseSpawn;
+ var stack = new Error().stack;
+ return function () {
+ var generator = generatorFunction.apply(this, arguments);
+ var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
+ stack);
+ var ret = spawn.promise();
+ spawn._generator = generator;
+ spawn._promiseFulfilled(undefined);
+ return ret;
+ };
+};
+
+Promise.coroutine.addYieldHandler = function(fn) {
+ if (typeof fn !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(fn));
+ }
+ yieldHandlers.push(fn);
+};
+
+Promise.spawn = function (generatorFunction) {
+ debug.deprecated("Promise.spawn()", "Promise.coroutine()");
+ if (typeof generatorFunction !== "function") {
+ return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ var spawn = new PromiseSpawn(generatorFunction, this);
+ var ret = spawn.promise();
+ spawn._run(Promise.spawn);
+ return ret;
+};
+};
+
+},{"./errors":12,"./util":36}],17:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async) {
+var util = _dereq_("./util");
+var canEvaluate = util.canEvaluate;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var reject;
+
+if (!true) {
+if (canEvaluate) {
+ var thenCallback = function(i) {
+ return new Function("value", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = value; \n\
+ holder.checkFulfillment(this); \n\
+ ".replace(/Index/g, i));
+ };
+
+ var promiseSetter = function(i) {
+ return new Function("promise", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = promise; \n\
+ ".replace(/Index/g, i));
+ };
+
+ var generateHolderClass = function(total) {
+ var props = new Array(total);
+ for (var i = 0; i < props.length; ++i) {
+ props[i] = "this.p" + (i+1);
+ }
+ var assignment = props.join(" = ") + " = null;";
+ var cancellationCode= "var promise;\n" + props.map(function(prop) {
+ return " \n\
+ promise = " + prop + "; \n\
+ if (promise instanceof Promise) { \n\
+ promise.cancel(); \n\
+ } \n\
+ ";
+ }).join("\n");
+ var passedArguments = props.join(", ");
+ var name = "Holder$" + total;
+
+
+ var code = "return function(tryCatch, errorObj, Promise, async) { \n\
+ 'use strict'; \n\
+ function [TheName](fn) { \n\
+ [TheProperties] \n\
+ this.fn = fn; \n\
+ this.asyncNeeded = true; \n\
+ this.now = 0; \n\
+ } \n\
+ \n\
+ [TheName].prototype._callFunction = function(promise) { \n\
+ promise._pushContext(); \n\
+ var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
+ promise._popContext(); \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(ret.e, false); \n\
+ } else { \n\
+ promise._resolveCallback(ret); \n\
+ } \n\
+ }; \n\
+ \n\
+ [TheName].prototype.checkFulfillment = function(promise) { \n\
+ var now = ++this.now; \n\
+ if (now === [TheTotal]) { \n\
+ if (this.asyncNeeded) { \n\
+ async.invoke(this._callFunction, this, promise); \n\
+ } else { \n\
+ this._callFunction(promise); \n\
+ } \n\
+ \n\
+ } \n\
+ }; \n\
+ \n\
+ [TheName].prototype._resultCancelled = function() { \n\
+ [CancellationCode] \n\
+ }; \n\
+ \n\
+ return [TheName]; \n\
+ }(tryCatch, errorObj, Promise, async); \n\
+ ";
+
+ code = code.replace(/\[TheName\]/g, name)
+ .replace(/\[TheTotal\]/g, total)
+ .replace(/\[ThePassedArguments\]/g, passedArguments)
+ .replace(/\[TheProperties\]/g, assignment)
+ .replace(/\[CancellationCode\]/g, cancellationCode);
+
+ return new Function("tryCatch", "errorObj", "Promise", "async", code)
+ (tryCatch, errorObj, Promise, async);
+ };
+
+ var holderClasses = [];
+ var thenCallbacks = [];
+ var promiseSetters = [];
+
+ for (var i = 0; i < 8; ++i) {
+ holderClasses.push(generateHolderClass(i + 1));
+ thenCallbacks.push(thenCallback(i + 1));
+ promiseSetters.push(promiseSetter(i + 1));
+ }
+
+ reject = function (reason) {
+ this._reject(reason);
+ };
+}}
+
+Promise.join = function () {
+ var last = arguments.length - 1;
+ var fn;
+ if (last > 0 && typeof arguments[last] === "function") {
+ fn = arguments[last];
+ if (!true) {
+ if (last <= 8 && canEvaluate) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var HolderClass = holderClasses[last - 1];
+ var holder = new HolderClass(fn);
+ var callbacks = thenCallbacks;
+
+ for (var i = 0; i < last; ++i) {
+ var maybePromise = tryConvertToPromise(arguments[i], ret);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ var bitField = maybePromise._bitField;
+ ;
+ if (((bitField & 50397184) === 0)) {
+ maybePromise._then(callbacks[i], reject,
+ undefined, ret, holder);
+ promiseSetters[i](maybePromise, holder);
+ holder.asyncNeeded = false;
+ } else if (((bitField & 33554432) !== 0)) {
+ callbacks[i].call(ret,
+ maybePromise._value(), holder);
+ } else if (((bitField & 16777216) !== 0)) {
+ ret._reject(maybePromise._reason());
+ } else {
+ ret._cancel();
+ }
+ } else {
+ callbacks[i].call(ret, maybePromise, holder);
+ }
+ }
+
+ if (!ret._isFateSealed()) {
+ if (holder.asyncNeeded) {
+ var context = Promise._getContext();
+ holder.fn = util.contextBind(context, holder.fn);
+ }
+ ret._setAsyncGuaranteed();
+ ret._setOnCancel(holder);
+ }
+ return ret;
+ }
+ }
+ }
+ var args = [].slice.call(arguments);;
+ if (fn) args.pop();
+ var ret = new PromiseArray(args).promise();
+ return fn !== undefined ? ret.spread(fn) : ret;
+};
+
+};
+
+},{"./util":36}],18:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL,
+ debug) {
+var util = _dereq_("./util");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var async = Promise._async;
+
+function MappingPromiseArray(promises, fn, limit, _filter) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ var context = Promise._getContext();
+ this._callback = util.contextBind(context, fn);
+ this._preservedValues = _filter === INTERNAL
+ ? new Array(this.length())
+ : null;
+ this._limit = limit;
+ this._inFlight = 0;
+ this._queue = [];
+ async.invoke(this._asyncInit, this, undefined);
+ if (util.isArray(promises)) {
+ for (var i = 0; i < promises.length; ++i) {
+ var maybePromise = promises[i];
+ if (maybePromise instanceof Promise) {
+ maybePromise.suppressUnhandledRejections();
+ }
+ }
+ }
+}
+util.inherits(MappingPromiseArray, PromiseArray);
+
+MappingPromiseArray.prototype._asyncInit = function() {
+ this._init$(undefined, -2);
+};
+
+MappingPromiseArray.prototype._init = function () {};
+
+MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var limit = this._limit;
+
+ if (index < 0) {
+ index = (index * -1) - 1;
+ values[index] = value;
+ if (limit >= 1) {
+ this._inFlight--;
+ this._drainQueue();
+ if (this._isResolved()) return true;
+ }
+ } else {
+ if (limit >= 1 && this._inFlight >= limit) {
+ values[index] = value;
+ this._queue.push(index);
+ return false;
+ }
+ if (preservedValues !== null) preservedValues[index] = value;
+
+ var promise = this._promise;
+ var callback = this._callback;
+ var receiver = promise._boundValue();
+ promise._pushContext();
+ var ret = tryCatch(callback).call(receiver, value, index, length);
+ var promiseCreated = promise._popContext();
+ debug.checkForgottenReturns(
+ ret,
+ promiseCreated,
+ preservedValues !== null ? "Promise.filter" : "Promise.map",
+ promise
+ );
+ if (ret === errorObj) {
+ this._reject(ret.e);
+ return true;
+ }
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ var bitField = maybePromise._bitField;
+ ;
+ if (((bitField & 50397184) === 0)) {
+ if (limit >= 1) this._inFlight++;
+ values[index] = maybePromise;
+ maybePromise._proxy(this, (index + 1) * -1);
+ return false;
+ } else if (((bitField & 33554432) !== 0)) {
+ ret = maybePromise._value();
+ } else if (((bitField & 16777216) !== 0)) {
+ this._reject(maybePromise._reason());
+ return true;
+ } else {
+ this._cancel();
+ return true;
+ }
+ }
+ values[index] = ret;
+ }
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= length) {
+ if (preservedValues !== null) {
+ this._filter(values, preservedValues);
+ } else {
+ this._resolve(values);
+ }
+ return true;
+ }
+ return false;
+};
+
+MappingPromiseArray.prototype._drainQueue = function () {
+ var queue = this._queue;
+ var limit = this._limit;
+ var values = this._values;
+ while (queue.length > 0 && this._inFlight < limit) {
+ if (this._isResolved()) return;
+ var index = queue.pop();
+ this._promiseFulfilled(values[index], index);
+ }
+};
+
+MappingPromiseArray.prototype._filter = function (booleans, values) {
+ var len = values.length;
+ var ret = new Array(len);
+ var j = 0;
+ for (var i = 0; i < len; ++i) {
+ if (booleans[i]) ret[j++] = values[i];
+ }
+ ret.length = j;
+ this._resolve(ret);
+};
+
+MappingPromiseArray.prototype.preservedValues = function () {
+ return this._preservedValues;
+};
+
+function map(promises, fn, options, _filter) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+
+ var limit = 0;
+ if (options !== undefined) {
+ if (typeof options === "object" && options !== null) {
+ if (typeof options.concurrency !== "number") {
+ return Promise.reject(
+ new TypeError("'concurrency' must be a number but it is " +
+ util.classString(options.concurrency)));
+ }
+ limit = options.concurrency;
+ } else {
+ return Promise.reject(new TypeError(
+ "options argument must be an object but it is " +
+ util.classString(options)));
+ }
+ }
+ limit = typeof limit === "number" &&
+ isFinite(limit) && limit >= 1 ? limit : 0;
+ return new MappingPromiseArray(promises, fn, limit, _filter).promise();
+}
+
+Promise.prototype.map = function (fn, options) {
+ return map(this, fn, options, null);
+};
+
+Promise.map = function (promises, fn, options, _filter) {
+ return map(promises, fn, options, _filter);
+};
+
+
+};
+
+},{"./util":36}],19:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
+var util = _dereq_("./util");
+var tryCatch = util.tryCatch;
+
+Promise.method = function (fn) {
+ if (typeof fn !== "function") {
+ throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
+ }
+ return function () {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = tryCatch(fn).apply(this, arguments);
+ var promiseCreated = ret._popContext();
+ debug.checkForgottenReturns(
+ value, promiseCreated, "Promise.method", ret);
+ ret._resolveFromSyncValue(value);
+ return ret;
+ };
+};
+
+Promise.attempt = Promise["try"] = function (fn) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value;
+ if (arguments.length > 1) {
+ debug.deprecated("calling Promise.try with more than 1 argument");
+ var arg = arguments[1];
+ var ctx = arguments[2];
+ value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
+ : tryCatch(fn).call(ctx, arg);
+ } else {
+ value = tryCatch(fn)();
+ }
+ var promiseCreated = ret._popContext();
+ debug.checkForgottenReturns(
+ value, promiseCreated, "Promise.try", ret);
+ ret._resolveFromSyncValue(value);
+ return ret;
+};
+
+Promise.prototype._resolveFromSyncValue = function (value) {
+ if (value === util.errorObj) {
+ this._rejectCallback(value.e, false);
+ } else {
+ this._resolveCallback(value, true);
+ }
+};
+};
+
+},{"./util":36}],20:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util");
+var maybeWrapAsError = util.maybeWrapAsError;
+var errors = _dereq_("./errors");
+var OperationalError = errors.OperationalError;
+var es5 = _dereq_("./es5");
+
+function isUntypedError(obj) {
+ return obj instanceof Error &&
+ es5.getPrototypeOf(obj) === Error.prototype;
+}
+
+var rErrorKey = /^(?:name|message|stack|cause)$/;
+function wrapAsOperationalError(obj) {
+ var ret;
+ if (isUntypedError(obj)) {
+ ret = new OperationalError(obj);
+ ret.name = obj.name;
+ ret.message = obj.message;
+ ret.stack = obj.stack;
+ var keys = es5.keys(obj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!rErrorKey.test(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ util.markAsOriginatingFromRejection(obj);
+ return obj;
+}
+
+function nodebackForPromise(promise, multiArgs) {
+ return function(err, value) {
+ if (promise === null) return;
+ if (err) {
+ var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
+ promise._attachExtraTrace(wrapped);
+ promise._reject(wrapped);
+ } else if (!multiArgs) {
+ promise._fulfill(value);
+ } else {
+ var args = [].slice.call(arguments, 1);;
+ promise._fulfill(args);
+ }
+ promise = null;
+ };
+}
+
+module.exports = nodebackForPromise;
+
+},{"./errors":12,"./es5":13,"./util":36}],21:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+var util = _dereq_("./util");
+var async = Promise._async;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function spreadAdapter(val, nodeback) {
+ var promise = this;
+ if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
+ var ret =
+ tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+function successAdapter(val, nodeback) {
+ var promise = this;
+ var receiver = promise._boundValue();
+ var ret = val === undefined
+ ? tryCatch(nodeback).call(receiver, null)
+ : tryCatch(nodeback).call(receiver, null, val);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+function errorAdapter(reason, nodeback) {
+ var promise = this;
+ if (!reason) {
+ var newReason = new Error(reason + "");
+ newReason.cause = reason;
+ reason = newReason;
+ }
+ var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,
+ options) {
+ if (typeof nodeback == "function") {
+ var adapter = successAdapter;
+ if (options !== undefined && Object(options).spread) {
+ adapter = spreadAdapter;
+ }
+ this._then(
+ adapter,
+ errorAdapter,
+ undefined,
+ this,
+ nodeback
+ );
+ }
+ return this;
+};
+};
+
+},{"./util":36}],22:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function() {
+var makeSelfResolutionError = function () {
+ return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+};
+var reflectHandler = function() {
+ return new Promise.PromiseInspection(this._target());
+};
+var apiRejection = function(msg) {
+ return Promise.reject(new TypeError(msg));
+};
+function Proxyable() {}
+var UNDEFINED_BINDING = {};
+var util = _dereq_("./util");
+util.setReflectHandler(reflectHandler);
+
+var getDomain = function() {
+ var domain = process.domain;
+ if (domain === undefined) {
+ return null;
+ }
+ return domain;
+};
+var getContextDefault = function() {
+ return null;
+};
+var getContextDomain = function() {
+ return {
+ domain: getDomain(),
+ async: null
+ };
+};
+var AsyncResource = util.isNode && util.nodeSupportsAsyncResource ?
+ _dereq_("async_hooks").AsyncResource : null;
+var getContextAsyncHooks = function() {
+ return {
+ domain: getDomain(),
+ async: new AsyncResource("Bluebird::Promise")
+ };
+};
+var getContext = util.isNode ? getContextDomain : getContextDefault;
+util.notEnumerableProp(Promise, "_getContext", getContext);
+var enableAsyncHooks = function() {
+ getContext = getContextAsyncHooks;
+ util.notEnumerableProp(Promise, "_getContext", getContextAsyncHooks);
+};
+var disableAsyncHooks = function() {
+ getContext = getContextDomain;
+ util.notEnumerableProp(Promise, "_getContext", getContextDomain);
+};
+
+var es5 = _dereq_("./es5");
+var Async = _dereq_("./async");
+var async = new Async();
+es5.defineProperty(Promise, "_async", {value: async});
+var errors = _dereq_("./errors");
+var TypeError = Promise.TypeError = errors.TypeError;
+Promise.RangeError = errors.RangeError;
+var CancellationError = Promise.CancellationError = errors.CancellationError;
+Promise.TimeoutError = errors.TimeoutError;
+Promise.OperationalError = errors.OperationalError;
+Promise.RejectionError = errors.OperationalError;
+Promise.AggregateError = errors.AggregateError;
+var INTERNAL = function(){};
+var APPLY = {};
+var NEXT_FILTER = {};
+var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL);
+var PromiseArray =
+ _dereq_("./promise_array")(Promise, INTERNAL,
+ tryConvertToPromise, apiRejection, Proxyable);
+var Context = _dereq_("./context")(Promise);
+ /*jshint unused:false*/
+var createContext = Context.create;
+
+var debug = _dereq_("./debuggability")(Promise, Context,
+ enableAsyncHooks, disableAsyncHooks);
+var CapturedTrace = debug.CapturedTrace;
+var PassThroughHandlerContext =
+ _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER);
+var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
+var nodebackForPromise = _dereq_("./nodeback");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+function check(self, executor) {
+ if (self == null || self.constructor !== Promise) {
+ throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ if (typeof executor !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(executor));
+ }
+
+}
+
+function Promise(executor) {
+ if (executor !== INTERNAL) {
+ check(this, executor);
+ }
+ this._bitField = 0;
+ this._fulfillmentHandler0 = undefined;
+ this._rejectionHandler0 = undefined;
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._resolveFromExecutor(executor);
+ this._promiseCreated();
+ this._fireEvent("promiseCreated", this);
+}
+
+Promise.prototype.toString = function () {
+ return "[object Promise]";
+};
+
+Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
+ var len = arguments.length;
+ if (len > 1) {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (util.isObject(item)) {
+ catchInstances[j++] = item;
+ } else {
+ return apiRejection("Catch statement predicate: " +
+ "expecting an object but got " + util.classString(item));
+ }
+ }
+ catchInstances.length = j;
+ fn = arguments[i];
+
+ if (typeof fn !== "function") {
+ throw new TypeError("The last argument to .catch() " +
+ "must be a function, got " + util.toString(fn));
+ }
+ return this.then(undefined, catchFilter(catchInstances, fn, this));
+ }
+ return this.then(undefined, fn);
+};
+
+Promise.prototype.reflect = function () {
+ return this._then(reflectHandler,
+ reflectHandler, undefined, this, undefined);
+};
+
+Promise.prototype.then = function (didFulfill, didReject) {
+ if (debug.warnings() && arguments.length > 0 &&
+ typeof didFulfill !== "function" &&
+ typeof didReject !== "function") {
+ var msg = ".then() only accepts functions but was passed: " +
+ util.classString(didFulfill);
+ if (arguments.length > 1) {
+ msg += ", " + util.classString(didReject);
+ }
+ this._warn(msg);
+ }
+ return this._then(didFulfill, didReject, undefined, undefined, undefined);
+};
+
+Promise.prototype.done = function (didFulfill, didReject) {
+ var promise =
+ this._then(didFulfill, didReject, undefined, undefined, undefined);
+ promise._setIsFinal();
+};
+
+Promise.prototype.spread = function (fn) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ return this.all()._then(fn, undefined, undefined, APPLY, undefined);
+};
+
+Promise.prototype.toJSON = function () {
+ var ret = {
+ isFulfilled: false,
+ isRejected: false,
+ fulfillmentValue: undefined,
+ rejectionReason: undefined
+ };
+ if (this.isFulfilled()) {
+ ret.fulfillmentValue = this.value();
+ ret.isFulfilled = true;
+ } else if (this.isRejected()) {
+ ret.rejectionReason = this.reason();
+ ret.isRejected = true;
+ }
+ return ret;
+};
+
+Promise.prototype.all = function () {
+ if (arguments.length > 0) {
+ this._warn(".all() was passed arguments but it does not take any");
+ }
+ return new PromiseArray(this).promise();
+};
+
+Promise.prototype.error = function (fn) {
+ return this.caught(util.originatesFromRejection, fn);
+};
+
+Promise.getNewLibraryCopy = module.exports;
+
+Promise.is = function (val) {
+ return val instanceof Promise;
+};
+
+Promise.fromNode = Promise.fromCallback = function(fn) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
+ : false;
+ var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
+ if (result === errorObj) {
+ ret._rejectCallback(result.e, true);
+ }
+ if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
+ return ret;
+};
+
+Promise.all = function (promises) {
+ return new PromiseArray(promises).promise();
+};
+
+Promise.cast = function (obj) {
+ var ret = tryConvertToPromise(obj);
+ if (!(ret instanceof Promise)) {
+ ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._setFulfilled();
+ ret._rejectionHandler0 = obj;
+ }
+ return ret;
+};
+
+Promise.resolve = Promise.fulfilled = Promise.cast;
+
+Promise.reject = Promise.rejected = function (reason) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._rejectCallback(reason, true);
+ return ret;
+};
+
+Promise.setScheduler = function(fn) {
+ if (typeof fn !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(fn));
+ }
+ return async.setScheduler(fn);
+};
+
+Promise.prototype._then = function (
+ didFulfill,
+ didReject,
+ _, receiver,
+ internalData
+) {
+ var haveInternalData = internalData !== undefined;
+ var promise = haveInternalData ? internalData : new Promise(INTERNAL);
+ var target = this._target();
+ var bitField = target._bitField;
+
+ if (!haveInternalData) {
+ promise._propagateFrom(this, 3);
+ promise._captureStackTrace();
+ if (receiver === undefined &&
+ ((this._bitField & 2097152) !== 0)) {
+ if (!((bitField & 50397184) === 0)) {
+ receiver = this._boundValue();
+ } else {
+ receiver = target === this ? undefined : this._boundTo;
+ }
+ }
+ this._fireEvent("promiseChained", this, promise);
+ }
+
+ var context = getContext();
+ if (!((bitField & 50397184) === 0)) {
+ var handler, value, settler = target._settlePromiseCtx;
+ if (((bitField & 33554432) !== 0)) {
+ value = target._rejectionHandler0;
+ handler = didFulfill;
+ } else if (((bitField & 16777216) !== 0)) {
+ value = target._fulfillmentHandler0;
+ handler = didReject;
+ target._unsetRejectionIsUnhandled();
+ } else {
+ settler = target._settlePromiseLateCancellationObserver;
+ value = new CancellationError("late cancellation observer");
+ target._attachExtraTrace(value);
+ handler = didReject;
+ }
+
+ async.invoke(settler, target, {
+ handler: util.contextBind(context, handler),
+ promise: promise,
+ receiver: receiver,
+ value: value
+ });
+ } else {
+ target._addCallbacks(didFulfill, didReject, promise,
+ receiver, context);
+ }
+
+ return promise;
+};
+
+Promise.prototype._length = function () {
+ return this._bitField & 65535;
+};
+
+Promise.prototype._isFateSealed = function () {
+ return (this._bitField & 117506048) !== 0;
+};
+
+Promise.prototype._isFollowing = function () {
+ return (this._bitField & 67108864) === 67108864;
+};
+
+Promise.prototype._setLength = function (len) {
+ this._bitField = (this._bitField & -65536) |
+ (len & 65535);
+};
+
+Promise.prototype._setFulfilled = function () {
+ this._bitField = this._bitField | 33554432;
+ this._fireEvent("promiseFulfilled", this);
+};
+
+Promise.prototype._setRejected = function () {
+ this._bitField = this._bitField | 16777216;
+ this._fireEvent("promiseRejected", this);
+};
+
+Promise.prototype._setFollowing = function () {
+ this._bitField = this._bitField | 67108864;
+ this._fireEvent("promiseResolved", this);
+};
+
+Promise.prototype._setIsFinal = function () {
+ this._bitField = this._bitField | 4194304;
+};
+
+Promise.prototype._isFinal = function () {
+ return (this._bitField & 4194304) > 0;
+};
+
+Promise.prototype._unsetCancelled = function() {
+ this._bitField = this._bitField & (~65536);
+};
+
+Promise.prototype._setCancelled = function() {
+ this._bitField = this._bitField | 65536;
+ this._fireEvent("promiseCancelled", this);
+};
+
+Promise.prototype._setWillBeCancelled = function() {
+ this._bitField = this._bitField | 8388608;
+};
+
+Promise.prototype._setAsyncGuaranteed = function() {
+ if (async.hasCustomScheduler()) return;
+ var bitField = this._bitField;
+ this._bitField = bitField |
+ (((bitField & 536870912) >> 2) ^
+ 134217728);
+};
+
+Promise.prototype._setNoAsyncGuarantee = function() {
+ this._bitField = (this._bitField | 536870912) &
+ (~134217728);
+};
+
+Promise.prototype._receiverAt = function (index) {
+ var ret = index === 0 ? this._receiver0 : this[
+ index * 4 - 4 + 3];
+ if (ret === UNDEFINED_BINDING) {
+ return undefined;
+ } else if (ret === undefined && this._isBound()) {
+ return this._boundValue();
+ }
+ return ret;
+};
+
+Promise.prototype._promiseAt = function (index) {
+ return this[
+ index * 4 - 4 + 2];
+};
+
+Promise.prototype._fulfillmentHandlerAt = function (index) {
+ return this[
+ index * 4 - 4 + 0];
+};
+
+Promise.prototype._rejectionHandlerAt = function (index) {
+ return this[
+ index * 4 - 4 + 1];
+};
+
+Promise.prototype._boundValue = function() {};
+
+Promise.prototype._migrateCallback0 = function (follower) {
+ var bitField = follower._bitField;
+ var fulfill = follower._fulfillmentHandler0;
+ var reject = follower._rejectionHandler0;
+ var promise = follower._promise0;
+ var receiver = follower._receiverAt(0);
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, promise, receiver, null);
+};
+
+Promise.prototype._migrateCallbackAt = function (follower, index) {
+ var fulfill = follower._fulfillmentHandlerAt(index);
+ var reject = follower._rejectionHandlerAt(index);
+ var promise = follower._promiseAt(index);
+ var receiver = follower._receiverAt(index);
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, promise, receiver, null);
+};
+
+Promise.prototype._addCallbacks = function (
+ fulfill,
+ reject,
+ promise,
+ receiver,
+ context
+) {
+ var index = this._length();
+
+ if (index >= 65535 - 4) {
+ index = 0;
+ this._setLength(0);
+ }
+
+ if (index === 0) {
+ this._promise0 = promise;
+ this._receiver0 = receiver;
+ if (typeof fulfill === "function") {
+ this._fulfillmentHandler0 = util.contextBind(context, fulfill);
+ }
+ if (typeof reject === "function") {
+ this._rejectionHandler0 = util.contextBind(context, reject);
+ }
+ } else {
+ var base = index * 4 - 4;
+ this[base + 2] = promise;
+ this[base + 3] = receiver;
+ if (typeof fulfill === "function") {
+ this[base + 0] =
+ util.contextBind(context, fulfill);
+ }
+ if (typeof reject === "function") {
+ this[base + 1] =
+ util.contextBind(context, reject);
+ }
+ }
+ this._setLength(index + 1);
+ return index;
+};
+
+Promise.prototype._proxy = function (proxyable, arg) {
+ this._addCallbacks(undefined, undefined, arg, proxyable, null);
+};
+
+Promise.prototype._resolveCallback = function(value, shouldBind) {
+ if (((this._bitField & 117506048) !== 0)) return;
+ if (value === this)
+ return this._rejectCallback(makeSelfResolutionError(), false);
+ var maybePromise = tryConvertToPromise(value, this);
+ if (!(maybePromise instanceof Promise)) return this._fulfill(value);
+
+ if (shouldBind) this._propagateFrom(maybePromise, 2);
+
+
+ var promise = maybePromise._target();
+
+ if (promise === this) {
+ this._reject(makeSelfResolutionError());
+ return;
+ }
+
+ var bitField = promise._bitField;
+ if (((bitField & 50397184) === 0)) {
+ var len = this._length();
+ if (len > 0) promise._migrateCallback0(this);
+ for (var i = 1; i < len; ++i) {
+ promise._migrateCallbackAt(this, i);
+ }
+ this._setFollowing();
+ this._setLength(0);
+ this._setFollowee(maybePromise);
+ } else if (((bitField & 33554432) !== 0)) {
+ this._fulfill(promise._value());
+ } else if (((bitField & 16777216) !== 0)) {
+ this._reject(promise._reason());
+ } else {
+ var reason = new CancellationError("late cancellation observer");
+ promise._attachExtraTrace(reason);
+ this._reject(reason);
+ }
+};
+
+Promise.prototype._rejectCallback =
+function(reason, synchronous, ignoreNonErrorWarnings) {
+ var trace = util.ensureErrorObject(reason);
+ var hasStack = trace === reason;
+ if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
+ var message = "a promise was rejected with a non-error: " +
+ util.classString(reason);
+ this._warn(message, true);
+ }
+ this._attachExtraTrace(trace, synchronous ? hasStack : false);
+ this._reject(reason);
+};
+
+Promise.prototype._resolveFromExecutor = function (executor) {
+ if (executor === INTERNAL) return;
+ var promise = this;
+ this._captureStackTrace();
+ this._pushContext();
+ var synchronous = true;
+ var r = this._execute(executor, function(value) {
+ promise._resolveCallback(value);
+ }, function (reason) {
+ promise._rejectCallback(reason, synchronous);
+ });
+ synchronous = false;
+ this._popContext();
+
+ if (r !== undefined) {
+ promise._rejectCallback(r, true);
+ }
+};
+
+Promise.prototype._settlePromiseFromHandler = function (
+ handler, receiver, value, promise
+) {
+ var bitField = promise._bitField;
+ if (((bitField & 65536) !== 0)) return;
+ promise._pushContext();
+ var x;
+ if (receiver === APPLY) {
+ if (!value || typeof value.length !== "number") {
+ x = errorObj;
+ x.e = new TypeError("cannot .spread() a non-array: " +
+ util.classString(value));
+ } else {
+ x = tryCatch(handler).apply(this._boundValue(), value);
+ }
+ } else {
+ x = tryCatch(handler).call(receiver, value);
+ }
+ var promiseCreated = promise._popContext();
+ bitField = promise._bitField;
+ if (((bitField & 65536) !== 0)) return;
+
+ if (x === NEXT_FILTER) {
+ promise._reject(value);
+ } else if (x === errorObj) {
+ promise._rejectCallback(x.e, false);
+ } else {
+ debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
+ promise._resolveCallback(x);
+ }
+};
+
+Promise.prototype._target = function() {
+ var ret = this;
+ while (ret._isFollowing()) ret = ret._followee();
+ return ret;
+};
+
+Promise.prototype._followee = function() {
+ return this._rejectionHandler0;
+};
+
+Promise.prototype._setFollowee = function(promise) {
+ this._rejectionHandler0 = promise;
+};
+
+Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
+ var isPromise = promise instanceof Promise;
+ var bitField = this._bitField;
+ var asyncGuaranteed = ((bitField & 134217728) !== 0);
+ if (((bitField & 65536) !== 0)) {
+ if (isPromise) promise._invokeInternalOnCancel();
+
+ if (receiver instanceof PassThroughHandlerContext &&
+ receiver.isFinallyHandler()) {
+ receiver.cancelPromise = promise;
+ if (tryCatch(handler).call(receiver, value) === errorObj) {
+ promise._reject(errorObj.e);
+ }
+ } else if (handler === reflectHandler) {
+ promise._fulfill(reflectHandler.call(receiver));
+ } else if (receiver instanceof Proxyable) {
+ receiver._promiseCancelled(promise);
+ } else if (isPromise || promise instanceof PromiseArray) {
+ promise._cancel();
+ } else {
+ receiver.cancel();
+ }
+ } else if (typeof handler === "function") {
+ if (!isPromise) {
+ handler.call(receiver, value, promise);
+ } else {
+ if (asyncGuaranteed) promise._setAsyncGuaranteed();
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (receiver instanceof Proxyable) {
+ if (!receiver._isResolved()) {
+ if (((bitField & 33554432) !== 0)) {
+ receiver._promiseFulfilled(value, promise);
+ } else {
+ receiver._promiseRejected(value, promise);
+ }
+ }
+ } else if (isPromise) {
+ if (asyncGuaranteed) promise._setAsyncGuaranteed();
+ if (((bitField & 33554432) !== 0)) {
+ promise._fulfill(value);
+ } else {
+ promise._reject(value);
+ }
+ }
+};
+
+Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
+ var handler = ctx.handler;
+ var promise = ctx.promise;
+ var receiver = ctx.receiver;
+ var value = ctx.value;
+ if (typeof handler === "function") {
+ if (!(promise instanceof Promise)) {
+ handler.call(receiver, value, promise);
+ } else {
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (promise instanceof Promise) {
+ promise._reject(value);
+ }
+};
+
+Promise.prototype._settlePromiseCtx = function(ctx) {
+ this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
+};
+
+Promise.prototype._settlePromise0 = function(handler, value, bitField) {
+ var promise = this._promise0;
+ var receiver = this._receiverAt(0);
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._settlePromise(promise, handler, receiver, value);
+};
+
+Promise.prototype._clearCallbackDataAtIndex = function(index) {
+ var base = index * 4 - 4;
+ this[base + 2] =
+ this[base + 3] =
+ this[base + 0] =
+ this[base + 1] = undefined;
+};
+
+Promise.prototype._fulfill = function (value) {
+ var bitField = this._bitField;
+ if (((bitField & 117506048) >>> 16)) return;
+ if (value === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._reject(err);
+ }
+ this._setFulfilled();
+ this._rejectionHandler0 = value;
+
+ if ((bitField & 65535) > 0) {
+ if (((bitField & 134217728) !== 0)) {
+ this._settlePromises();
+ } else {
+ async.settlePromises(this);
+ }
+ this._dereferenceTrace();
+ }
+};
+
+Promise.prototype._reject = function (reason) {
+ var bitField = this._bitField;
+ if (((bitField & 117506048) >>> 16)) return;
+ this._setRejected();
+ this._fulfillmentHandler0 = reason;
+
+ if (this._isFinal()) {
+ return async.fatalError(reason, util.isNode);
+ }
+
+ if ((bitField & 65535) > 0) {
+ async.settlePromises(this);
+ } else {
+ this._ensurePossibleRejectionHandled();
+ }
+};
+
+Promise.prototype._fulfillPromises = function (len, value) {
+ for (var i = 1; i < len; i++) {
+ var handler = this._fulfillmentHandlerAt(i);
+ var promise = this._promiseAt(i);
+ var receiver = this._receiverAt(i);
+ this._clearCallbackDataAtIndex(i);
+ this._settlePromise(promise, handler, receiver, value);
+ }
+};
+
+Promise.prototype._rejectPromises = function (len, reason) {
+ for (var i = 1; i < len; i++) {
+ var handler = this._rejectionHandlerAt(i);
+ var promise = this._promiseAt(i);
+ var receiver = this._receiverAt(i);
+ this._clearCallbackDataAtIndex(i);
+ this._settlePromise(promise, handler, receiver, reason);
+ }
+};
+
+Promise.prototype._settlePromises = function () {
+ var bitField = this._bitField;
+ var len = (bitField & 65535);
+
+ if (len > 0) {
+ if (((bitField & 16842752) !== 0)) {
+ var reason = this._fulfillmentHandler0;
+ this._settlePromise0(this._rejectionHandler0, reason, bitField);
+ this._rejectPromises(len, reason);
+ } else {
+ var value = this._rejectionHandler0;
+ this._settlePromise0(this._fulfillmentHandler0, value, bitField);
+ this._fulfillPromises(len, value);
+ }
+ this._setLength(0);
+ }
+ this._clearCancellationData();
+};
+
+Promise.prototype._settledValue = function() {
+ var bitField = this._bitField;
+ if (((bitField & 33554432) !== 0)) {
+ return this._rejectionHandler0;
+ } else if (((bitField & 16777216) !== 0)) {
+ return this._fulfillmentHandler0;
+ }
+};
+
+if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
+ es5.defineProperty(Promise.prototype, Symbol.toStringTag, {
+ get: function () {
+ return "Object";
+ }
+ });
+}
+
+function deferResolve(v) {this.promise._resolveCallback(v);}
+function deferReject(v) {this.promise._rejectCallback(v, false);}
+
+Promise.defer = Promise.pending = function() {
+ debug.deprecated("Promise.defer", "new Promise");
+ var promise = new Promise(INTERNAL);
+ return {
+ promise: promise,
+ resolve: deferResolve,
+ reject: deferReject
+ };
+};
+
+util.notEnumerableProp(Promise,
+ "_makeSelfResolutionError",
+ makeSelfResolutionError);
+
+_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
+ debug);
+_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
+_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug);
+_dereq_("./direct_resolve")(Promise);
+_dereq_("./synchronous_inspection")(Promise);
+_dereq_("./join")(
+ Promise, PromiseArray, tryConvertToPromise, INTERNAL, async);
+Promise.Promise = Promise;
+Promise.version = "3.7.2";
+_dereq_('./call_get.js')(Promise);
+_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
+_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
+_dereq_('./nodeify.js')(Promise);
+_dereq_('./promisify.js')(Promise, INTERNAL);
+_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
+_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
+_dereq_('./settle.js')(Promise, PromiseArray, debug);
+_dereq_('./some.js')(Promise, PromiseArray, apiRejection);
+_dereq_('./timers.js')(Promise, INTERNAL, debug);
+_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
+_dereq_('./any.js')(Promise);
+_dereq_('./each.js')(Promise, INTERNAL);
+_dereq_('./filter.js')(Promise, INTERNAL);
+
+ util.toFastProperties(Promise);
+ util.toFastProperties(Promise.prototype);
+ function fillTypes(value) {
+ var p = new Promise(INTERNAL);
+ p._fulfillmentHandler0 = value;
+ p._rejectionHandler0 = value;
+ p._promise0 = value;
+ p._receiver0 = value;
+ }
+ // Complete slack tracking, opt out of field-type tracking and
+ // stabilize map
+ fillTypes({a: 1});
+ fillTypes({b: 2});
+ fillTypes({c: 3});
+ fillTypes(1);
+ fillTypes(function(){});
+ fillTypes(undefined);
+ fillTypes(false);
+ fillTypes(new Promise(INTERNAL));
+ debug.setBounds(Async.firstLineError, util.lastLineError);
+ return Promise;
+
+};
+
+},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,"async_hooks":undefined}],23:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise,
+ apiRejection, Proxyable) {
+var util = _dereq_("./util");
+var isArray = util.isArray;
+
+function toResolutionValue(val) {
+ switch(val) {
+ case -2: return [];
+ case -3: return {};
+ case -6: return new Map();
+ }
+}
+
+function PromiseArray(values) {
+ var promise = this._promise = new Promise(INTERNAL);
+ if (values instanceof Promise) {
+ promise._propagateFrom(values, 3);
+ values.suppressUnhandledRejections();
+ }
+ promise._setOnCancel(this);
+ this._values = values;
+ this._length = 0;
+ this._totalResolved = 0;
+ this._init(undefined, -2);
+}
+util.inherits(PromiseArray, Proxyable);
+
+PromiseArray.prototype.length = function () {
+ return this._length;
+};
+
+PromiseArray.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
+ var values = tryConvertToPromise(this._values, this._promise);
+ if (values instanceof Promise) {
+ values = values._target();
+ var bitField = values._bitField;
+ ;
+ this._values = values;
+
+ if (((bitField & 50397184) === 0)) {
+ this._promise._setAsyncGuaranteed();
+ return values._then(
+ init,
+ this._reject,
+ undefined,
+ this,
+ resolveValueIfEmpty
+ );
+ } else if (((bitField & 33554432) !== 0)) {
+ values = values._value();
+ } else if (((bitField & 16777216) !== 0)) {
+ return this._reject(values._reason());
+ } else {
+ return this._cancel();
+ }
+ }
+ values = util.asArray(values);
+ if (values === null) {
+ var err = apiRejection(
+ "expecting an array or an iterable object but got " + util.classString(values)).reason();
+ this._promise._rejectCallback(err, false);
+ return;
+ }
+
+ if (values.length === 0) {
+ if (resolveValueIfEmpty === -5) {
+ this._resolveEmptyArray();
+ }
+ else {
+ this._resolve(toResolutionValue(resolveValueIfEmpty));
+ }
+ return;
+ }
+ this._iterate(values);
+};
+
+PromiseArray.prototype._iterate = function(values) {
+ var len = this.getActualLength(values.length);
+ this._length = len;
+ this._values = this.shouldCopyValues() ? new Array(len) : this._values;
+ var result = this._promise;
+ var isResolved = false;
+ var bitField = null;
+ for (var i = 0; i < len; ++i) {
+ var maybePromise = tryConvertToPromise(values[i], result);
+
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ bitField = maybePromise._bitField;
+ } else {
+ bitField = null;
+ }
+
+ if (isResolved) {
+ if (bitField !== null) {
+ maybePromise.suppressUnhandledRejections();
+ }
+ } else if (bitField !== null) {
+ if (((bitField & 50397184) === 0)) {
+ maybePromise._proxy(this, i);
+ this._values[i] = maybePromise;
+ } else if (((bitField & 33554432) !== 0)) {
+ isResolved = this._promiseFulfilled(maybePromise._value(), i);
+ } else if (((bitField & 16777216) !== 0)) {
+ isResolved = this._promiseRejected(maybePromise._reason(), i);
+ } else {
+ isResolved = this._promiseCancelled(i);
+ }
+ } else {
+ isResolved = this._promiseFulfilled(maybePromise, i);
+ }
+ }
+ if (!isResolved) result._setAsyncGuaranteed();
+};
+
+PromiseArray.prototype._isResolved = function () {
+ return this._values === null;
+};
+
+PromiseArray.prototype._resolve = function (value) {
+ this._values = null;
+ this._promise._fulfill(value);
+};
+
+PromiseArray.prototype._cancel = function() {
+ if (this._isResolved() || !this._promise._isCancellable()) return;
+ this._values = null;
+ this._promise._cancel();
+};
+
+PromiseArray.prototype._reject = function (reason) {
+ this._values = null;
+ this._promise._rejectCallback(reason, false);
+};
+
+PromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ return true;
+ }
+ return false;
+};
+
+PromiseArray.prototype._promiseCancelled = function() {
+ this._cancel();
+ return true;
+};
+
+PromiseArray.prototype._promiseRejected = function (reason) {
+ this._totalResolved++;
+ this._reject(reason);
+ return true;
+};
+
+PromiseArray.prototype._resultCancelled = function() {
+ if (this._isResolved()) return;
+ var values = this._values;
+ this._cancel();
+ if (values instanceof Promise) {
+ values.cancel();
+ } else {
+ for (var i = 0; i < values.length; ++i) {
+ if (values[i] instanceof Promise) {
+ values[i].cancel();
+ }
+ }
+ }
+};
+
+PromiseArray.prototype.shouldCopyValues = function () {
+ return true;
+};
+
+PromiseArray.prototype.getActualLength = function (len) {
+ return len;
+};
+
+return PromiseArray;
+};
+
+},{"./util":36}],24:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var THIS = {};
+var util = _dereq_("./util");
+var nodebackForPromise = _dereq_("./nodeback");
+var withAppended = util.withAppended;
+var maybeWrapAsError = util.maybeWrapAsError;
+var canEvaluate = util.canEvaluate;
+var TypeError = _dereq_("./errors").TypeError;
+var defaultSuffix = "Async";
+var defaultPromisified = {__isPromisified__: true};
+var noCopyProps = [
+ "arity", "length",
+ "name",
+ "arguments",
+ "caller",
+ "callee",
+ "prototype",
+ "__isPromisified__"
+];
+var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
+
+var defaultFilter = function(name) {
+ return util.isIdentifier(name) &&
+ name.charAt(0) !== "_" &&
+ name !== "constructor";
+};
+
+function propsFilter(key) {
+ return !noCopyPropsPattern.test(key);
+}
+
+function isPromisified(fn) {
+ try {
+ return fn.__isPromisified__ === true;
+ }
+ catch (e) {
+ return false;
+ }
+}
+
+function hasPromisified(obj, key, suffix) {
+ var val = util.getDataPropertyOrDefault(obj, key + suffix,
+ defaultPromisified);
+ return val ? isPromisified(val) : false;
+}
+function checkValid(ret, suffix, suffixRegexp) {
+ for (var i = 0; i < ret.length; i += 2) {
+ var key = ret[i];
+ if (suffixRegexp.test(key)) {
+ var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
+ for (var j = 0; j < ret.length; j += 2) {
+ if (ret[j] === keyWithoutAsyncSuffix) {
+ throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a"
+ .replace("%s", suffix));
+ }
+ }
+ }
+ }
+}
+
+function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
+ var keys = util.inheritedDataKeys(obj);
+ var ret = [];
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var value = obj[key];
+ var passesDefaultFilter = filter === defaultFilter
+ ? true : defaultFilter(key, value, obj);
+ if (typeof value === "function" &&
+ !isPromisified(value) &&
+ !hasPromisified(obj, key, suffix) &&
+ filter(key, value, obj, passesDefaultFilter)) {
+ ret.push(key, value);
+ }
+ }
+ checkValid(ret, suffix, suffixRegexp);
+ return ret;
+}
+
+var escapeIdentRegex = function(str) {
+ return str.replace(/([$])/, "\\$");
+};
+
+var makeNodePromisifiedEval;
+if (!true) {
+var switchCaseArgumentOrder = function(likelyArgumentCount) {
+ var ret = [likelyArgumentCount];
+ var min = Math.max(0, likelyArgumentCount - 1 - 3);
+ for(var i = likelyArgumentCount - 1; i >= min; --i) {
+ ret.push(i);
+ }
+ for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
+ ret.push(i);
+ }
+ return ret;
+};
+
+var argumentSequence = function(argumentCount) {
+ return util.filledRange(argumentCount, "_arg", "");
+};
+
+var parameterDeclaration = function(parameterCount) {
+ return util.filledRange(
+ Math.max(parameterCount, 3), "_arg", "");
+};
+
+var parameterCount = function(fn) {
+ if (typeof fn.length === "number") {
+ return Math.max(Math.min(fn.length, 1023 + 1), 0);
+ }
+ return 0;
+};
+
+makeNodePromisifiedEval =
+function(callback, receiver, originalName, fn, _, multiArgs) {
+ var newParameterCount = Math.max(0, parameterCount(fn) - 1);
+ var argumentOrder = switchCaseArgumentOrder(newParameterCount);
+ var shouldProxyThis = typeof callback === "string" || receiver === THIS;
+
+ function generateCallForArgumentCount(count) {
+ var args = argumentSequence(count).join(", ");
+ var comma = count > 0 ? ", " : "";
+ var ret;
+ if (shouldProxyThis) {
+ ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
+ } else {
+ ret = receiver === undefined
+ ? "ret = callback({{args}}, nodeback); break;\n"
+ : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
+ }
+ return ret.replace("{{args}}", args).replace(", ", comma);
+ }
+
+ function generateArgumentSwitchCase() {
+ var ret = "";
+ for (var i = 0; i < argumentOrder.length; ++i) {
+ ret += "case " + argumentOrder[i] +":" +
+ generateCallForArgumentCount(argumentOrder[i]);
+ }
+
+ ret += " \n\
+ default: \n\
+ var args = new Array(len + 1); \n\
+ var i = 0; \n\
+ for (var i = 0; i < len; ++i) { \n\
+ args[i] = arguments[i]; \n\
+ } \n\
+ args[i] = nodeback; \n\
+ [CodeForCall] \n\
+ break; \n\
+ ".replace("[CodeForCall]", (shouldProxyThis
+ ? "ret = callback.apply(this, args);\n"
+ : "ret = callback.apply(receiver, args);\n"));
+ return ret;
+ }
+
+ var getFunctionCode = typeof callback === "string"
+ ? ("this != null ? this['"+callback+"'] : fn")
+ : "fn";
+ var body = "'use strict'; \n\
+ var ret = function (Parameters) { \n\
+ 'use strict'; \n\
+ var len = arguments.length; \n\
+ var promise = new Promise(INTERNAL); \n\
+ promise._captureStackTrace(); \n\
+ var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\
+ var ret; \n\
+ var callback = tryCatch([GetFunctionCode]); \n\
+ switch(len) { \n\
+ [CodeForSwitchCase] \n\
+ } \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
+ } \n\
+ if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\
+ return promise; \n\
+ }; \n\
+ notEnumerableProp(ret, '__isPromisified__', true); \n\
+ return ret; \n\
+ ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
+ .replace("[GetFunctionCode]", getFunctionCode);
+ body = body.replace("Parameters", parameterDeclaration(newParameterCount));
+ return new Function("Promise",
+ "fn",
+ "receiver",
+ "withAppended",
+ "maybeWrapAsError",
+ "nodebackForPromise",
+ "tryCatch",
+ "errorObj",
+ "notEnumerableProp",
+ "INTERNAL",
+ body)(
+ Promise,
+ fn,
+ receiver,
+ withAppended,
+ maybeWrapAsError,
+ nodebackForPromise,
+ util.tryCatch,
+ util.errorObj,
+ util.notEnumerableProp,
+ INTERNAL);
+};
+}
+
+function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {
+ var defaultThis = (function() {return this;})();
+ var method = callback;
+ if (typeof method === "string") {
+ callback = fn;
+ }
+ function promisified() {
+ var _receiver = receiver;
+ if (receiver === THIS) _receiver = this;
+ var promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ var cb = typeof method === "string" && this !== defaultThis
+ ? this[method] : callback;
+ var fn = nodebackForPromise(promise, multiArgs);
+ try {
+ cb.apply(_receiver, withAppended(arguments, fn));
+ } catch(e) {
+ promise._rejectCallback(maybeWrapAsError(e), true, true);
+ }
+ if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
+ return promise;
+ }
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ return promisified;
+}
+
+var makeNodePromisified = canEvaluate
+ ? makeNodePromisifiedEval
+ : makeNodePromisifiedClosure;
+
+function promisifyAll(obj, suffix, filter, promisifier, multiArgs) {
+ var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
+ var methods =
+ promisifiableMethods(obj, suffix, suffixRegexp, filter);
+
+ for (var i = 0, len = methods.length; i < len; i+= 2) {
+ var key = methods[i];
+ var fn = methods[i+1];
+ var promisifiedKey = key + suffix;
+ if (promisifier === makeNodePromisified) {
+ obj[promisifiedKey] =
+ makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);
+ } else {
+ var promisified = promisifier(fn, function() {
+ return makeNodePromisified(key, THIS, key,
+ fn, suffix, multiArgs);
+ });
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ obj[promisifiedKey] = promisified;
+ }
+ }
+ util.toFastProperties(obj);
+ return obj;
+}
+
+function promisify(callback, receiver, multiArgs) {
+ return makeNodePromisified(callback, receiver, undefined,
+ callback, null, multiArgs);
+}
+
+Promise.promisify = function (fn, options) {
+ if (typeof fn !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(fn));
+ }
+ if (isPromisified(fn)) {
+ return fn;
+ }
+ options = Object(options);
+ var receiver = options.context === undefined ? THIS : options.context;
+ var multiArgs = !!options.multiArgs;
+ var ret = promisify(fn, receiver, multiArgs);
+ util.copyDescriptors(fn, ret, propsFilter);
+ return ret;
+};
+
+Promise.promisifyAll = function (target, options) {
+ if (typeof target !== "function" && typeof target !== "object") {
+ throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ options = Object(options);
+ var multiArgs = !!options.multiArgs;
+ var suffix = options.suffix;
+ if (typeof suffix !== "string") suffix = defaultSuffix;
+ var filter = options.filter;
+ if (typeof filter !== "function") filter = defaultFilter;
+ var promisifier = options.promisifier;
+ if (typeof promisifier !== "function") promisifier = makeNodePromisified;
+
+ if (!util.isIdentifier(suffix)) {
+ throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+
+ var keys = util.inheritedDataKeys(target);
+ for (var i = 0; i < keys.length; ++i) {
+ var value = target[keys[i]];
+ if (keys[i] !== "constructor" &&
+ util.isClass(value)) {
+ promisifyAll(value.prototype, suffix, filter, promisifier,
+ multiArgs);
+ promisifyAll(value, suffix, filter, promisifier, multiArgs);
+ }
+ }
+
+ return promisifyAll(target, suffix, filter, promisifier, multiArgs);
+};
+};
+
+
+},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(
+ Promise, PromiseArray, tryConvertToPromise, apiRejection) {
+var util = _dereq_("./util");
+var isObject = util.isObject;
+var es5 = _dereq_("./es5");
+var Es6Map;
+if (typeof Map === "function") Es6Map = Map;
+
+var mapToEntries = (function() {
+ var index = 0;
+ var size = 0;
+
+ function extractEntry(value, key) {
+ this[index] = value;
+ this[index + size] = key;
+ index++;
+ }
+
+ return function mapToEntries(map) {
+ size = map.size;
+ index = 0;
+ var ret = new Array(map.size * 2);
+ map.forEach(extractEntry, ret);
+ return ret;
+ };
+})();
+
+var entriesToMap = function(entries) {
+ var ret = new Es6Map();
+ var length = entries.length / 2 | 0;
+ for (var i = 0; i < length; ++i) {
+ var key = entries[length + i];
+ var value = entries[i];
+ ret.set(key, value);
+ }
+ return ret;
+};
+
+function PropertiesPromiseArray(obj) {
+ var isMap = false;
+ var entries;
+ if (Es6Map !== undefined && obj instanceof Es6Map) {
+ entries = mapToEntries(obj);
+ isMap = true;
+ } else {
+ var keys = es5.keys(obj);
+ var len = keys.length;
+ entries = new Array(len * 2);
+ for (var i = 0; i < len; ++i) {
+ var key = keys[i];
+ entries[i] = obj[key];
+ entries[i + len] = key;
+ }
+ }
+ this.constructor$(entries);
+ this._isMap = isMap;
+ this._init$(undefined, isMap ? -6 : -3);
+}
+util.inherits(PropertiesPromiseArray, PromiseArray);
+
+PropertiesPromiseArray.prototype._init = function () {};
+
+PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ var val;
+ if (this._isMap) {
+ val = entriesToMap(this._values);
+ } else {
+ val = {};
+ var keyOffset = this.length();
+ for (var i = 0, len = this.length(); i < len; ++i) {
+ val[this._values[i + keyOffset]] = this._values[i];
+ }
+ }
+ this._resolve(val);
+ return true;
+ }
+ return false;
+};
+
+PropertiesPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+PropertiesPromiseArray.prototype.getActualLength = function (len) {
+ return len >> 1;
+};
+
+function props(promises) {
+ var ret;
+ var castValue = tryConvertToPromise(promises);
+
+ if (!isObject(castValue)) {
+ return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ } else if (castValue instanceof Promise) {
+ ret = castValue._then(
+ Promise.props, undefined, undefined, undefined, undefined);
+ } else {
+ ret = new PropertiesPromiseArray(castValue).promise();
+ }
+
+ if (castValue instanceof Promise) {
+ ret._propagateFrom(castValue, 2);
+ }
+ return ret;
+}
+
+Promise.prototype.props = function () {
+ return props(this);
+};
+
+Promise.props = function (promises) {
+ return props(promises);
+};
+};
+
+},{"./es5":13,"./util":36}],26:[function(_dereq_,module,exports){
+"use strict";
+function arrayMove(src, srcIndex, dst, dstIndex, len) {
+ for (var j = 0; j < len; ++j) {
+ dst[j + dstIndex] = src[j + srcIndex];
+ src[j + srcIndex] = void 0;
+ }
+}
+
+function Queue(capacity) {
+ this._capacity = capacity;
+ this._length = 0;
+ this._front = 0;
+}
+
+Queue.prototype._willBeOverCapacity = function (size) {
+ return this._capacity < size;
+};
+
+Queue.prototype._pushOne = function (arg) {
+ var length = this.length();
+ this._checkCapacity(length + 1);
+ var i = (this._front + length) & (this._capacity - 1);
+ this[i] = arg;
+ this._length = length + 1;
+};
+
+Queue.prototype.push = function (fn, receiver, arg) {
+ var length = this.length() + 3;
+ if (this._willBeOverCapacity(length)) {
+ this._pushOne(fn);
+ this._pushOne(receiver);
+ this._pushOne(arg);
+ return;
+ }
+ var j = this._front + length - 3;
+ this._checkCapacity(length);
+ var wrapMask = this._capacity - 1;
+ this[(j + 0) & wrapMask] = fn;
+ this[(j + 1) & wrapMask] = receiver;
+ this[(j + 2) & wrapMask] = arg;
+ this._length = length;
+};
+
+Queue.prototype.shift = function () {
+ var front = this._front,
+ ret = this[front];
+
+ this[front] = undefined;
+ this._front = (front + 1) & (this._capacity - 1);
+ this._length--;
+ return ret;
+};
+
+Queue.prototype.length = function () {
+ return this._length;
+};
+
+Queue.prototype._checkCapacity = function (size) {
+ if (this._capacity < size) {
+ this._resizeTo(this._capacity << 1);
+ }
+};
+
+Queue.prototype._resizeTo = function (capacity) {
+ var oldCapacity = this._capacity;
+ this._capacity = capacity;
+ var front = this._front;
+ var length = this._length;
+ var moveItemsCount = (front + length) & (oldCapacity - 1);
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
+};
+
+module.exports = Queue;
+
+},{}],27:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(
+ Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var util = _dereq_("./util");
+
+var raceLater = function (promise) {
+ return promise.then(function(array) {
+ return race(array, promise);
+ });
+};
+
+function race(promises, parent) {
+ var maybePromise = tryConvertToPromise(promises);
+
+ if (maybePromise instanceof Promise) {
+ return raceLater(maybePromise);
+ } else {
+ promises = util.asArray(promises);
+ if (promises === null)
+ return apiRejection("expecting an array or an iterable object but got " + util.classString(promises));
+ }
+
+ var ret = new Promise(INTERNAL);
+ if (parent !== undefined) {
+ ret._propagateFrom(parent, 3);
+ }
+ var fulfill = ret._fulfill;
+ var reject = ret._reject;
+ for (var i = 0, len = promises.length; i < len; ++i) {
+ var val = promises[i];
+
+ if (val === undefined && !(i in promises)) {
+ continue;
+ }
+
+ Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
+ }
+ return ret;
+}
+
+Promise.race = function (promises) {
+ return race(promises, undefined);
+};
+
+Promise.prototype.race = function () {
+ return race(this, undefined);
+};
+
+};
+
+},{"./util":36}],28:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL,
+ debug) {
+var util = _dereq_("./util");
+var tryCatch = util.tryCatch;
+
+function ReductionPromiseArray(promises, fn, initialValue, _each) {
+ this.constructor$(promises);
+ var context = Promise._getContext();
+ this._fn = util.contextBind(context, fn);
+ if (initialValue !== undefined) {
+ initialValue = Promise.resolve(initialValue);
+ initialValue._attachCancellationCallback(this);
+ }
+ this._initialValue = initialValue;
+ this._currentCancellable = null;
+ if(_each === INTERNAL) {
+ this._eachValues = Array(this._length);
+ } else if (_each === 0) {
+ this._eachValues = null;
+ } else {
+ this._eachValues = undefined;
+ }
+ this._promise._captureStackTrace();
+ this._init$(undefined, -5);
+}
+util.inherits(ReductionPromiseArray, PromiseArray);
+
+ReductionPromiseArray.prototype._gotAccum = function(accum) {
+ if (this._eachValues !== undefined &&
+ this._eachValues !== null &&
+ accum !== INTERNAL) {
+ this._eachValues.push(accum);
+ }
+};
+
+ReductionPromiseArray.prototype._eachComplete = function(value) {
+ if (this._eachValues !== null) {
+ this._eachValues.push(value);
+ }
+ return this._eachValues;
+};
+
+ReductionPromiseArray.prototype._init = function() {};
+
+ReductionPromiseArray.prototype._resolveEmptyArray = function() {
+ this._resolve(this._eachValues !== undefined ? this._eachValues
+ : this._initialValue);
+};
+
+ReductionPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+ReductionPromiseArray.prototype._resolve = function(value) {
+ this._promise._resolveCallback(value);
+ this._values = null;
+};
+
+ReductionPromiseArray.prototype._resultCancelled = function(sender) {
+ if (sender === this._initialValue) return this._cancel();
+ if (this._isResolved()) return;
+ this._resultCancelled$();
+ if (this._currentCancellable instanceof Promise) {
+ this._currentCancellable.cancel();
+ }
+ if (this._initialValue instanceof Promise) {
+ this._initialValue.cancel();
+ }
+};
+
+ReductionPromiseArray.prototype._iterate = function (values) {
+ this._values = values;
+ var value;
+ var i;
+ var length = values.length;
+ if (this._initialValue !== undefined) {
+ value = this._initialValue;
+ i = 0;
+ } else {
+ value = Promise.resolve(values[0]);
+ i = 1;
+ }
+
+ this._currentCancellable = value;
+
+ for (var j = i; j < length; ++j) {
+ var maybePromise = values[j];
+ if (maybePromise instanceof Promise) {
+ maybePromise.suppressUnhandledRejections();
+ }
+ }
+
+ if (!value.isRejected()) {
+ for (; i < length; ++i) {
+ var ctx = {
+ accum: null,
+ value: values[i],
+ index: i,
+ length: length,
+ array: this
+ };
+
+ value = value._then(gotAccum, undefined, undefined, ctx, undefined);
+
+ if ((i & 127) === 0) {
+ value._setNoAsyncGuarantee();
+ }
+ }
+ }
+
+ if (this._eachValues !== undefined) {
+ value = value
+ ._then(this._eachComplete, undefined, undefined, this, undefined);
+ }
+ value._then(completed, completed, undefined, value, this);
+};
+
+Promise.prototype.reduce = function (fn, initialValue) {
+ return reduce(this, fn, initialValue, null);
+};
+
+Promise.reduce = function (promises, fn, initialValue, _each) {
+ return reduce(promises, fn, initialValue, _each);
+};
+
+function completed(valueOrReason, array) {
+ if (this.isFulfilled()) {
+ array._resolve(valueOrReason);
+ } else {
+ array._reject(valueOrReason);
+ }
+}
+
+function reduce(promises, fn, initialValue, _each) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
+ return array.promise();
+}
+
+function gotAccum(accum) {
+ this.accum = accum;
+ this.array._gotAccum(accum);
+ var value = tryConvertToPromise(this.value, this.array._promise);
+ if (value instanceof Promise) {
+ this.array._currentCancellable = value;
+ return value._then(gotValue, undefined, undefined, this, undefined);
+ } else {
+ return gotValue.call(this, value);
+ }
+}
+
+function gotValue(value) {
+ var array = this.array;
+ var promise = array._promise;
+ var fn = tryCatch(array._fn);
+ promise._pushContext();
+ var ret;
+ if (array._eachValues !== undefined) {
+ ret = fn.call(promise._boundValue(), value, this.index, this.length);
+ } else {
+ ret = fn.call(promise._boundValue(),
+ this.accum, value, this.index, this.length);
+ }
+ if (ret instanceof Promise) {
+ array._currentCancellable = ret;
+ }
+ var promiseCreated = promise._popContext();
+ debug.checkForgottenReturns(
+ ret,
+ promiseCreated,
+ array._eachValues !== undefined ? "Promise.each" : "Promise.reduce",
+ promise
+ );
+ return ret;
+}
+};
+
+},{"./util":36}],29:[function(_dereq_,module,exports){
+"use strict";
+var util = _dereq_("./util");
+var schedule;
+var noAsyncScheduler = function() {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+};
+var NativePromise = util.getNativePromise();
+if (util.isNode && typeof MutationObserver === "undefined") {
+ var GlobalSetImmediate = global.setImmediate;
+ var ProcessNextTick = process.nextTick;
+ schedule = util.isRecentNode
+ ? function(fn) { GlobalSetImmediate.call(global, fn); }
+ : function(fn) { ProcessNextTick.call(process, fn); };
+} else if (typeof NativePromise === "function" &&
+ typeof NativePromise.resolve === "function") {
+ var nativePromise = NativePromise.resolve();
+ schedule = function(fn) {
+ nativePromise.then(fn);
+ };
+} else if ((typeof MutationObserver !== "undefined") &&
+ !(typeof window !== "undefined" &&
+ window.navigator &&
+ (window.navigator.standalone || window.cordova)) &&
+ ("classList" in document.documentElement)) {
+ schedule = (function() {
+ var div = document.createElement("div");
+ var opts = {attributes: true};
+ var toggleScheduled = false;
+ var div2 = document.createElement("div");
+ var o2 = new MutationObserver(function() {
+ div.classList.toggle("foo");
+ toggleScheduled = false;
+ });
+ o2.observe(div2, opts);
+
+ var scheduleToggle = function() {
+ if (toggleScheduled) return;
+ toggleScheduled = true;
+ div2.classList.toggle("foo");
+ };
+
+ return function schedule(fn) {
+ var o = new MutationObserver(function() {
+ o.disconnect();
+ fn();
+ });
+ o.observe(div, opts);
+ scheduleToggle();
+ };
+ })();
+} else if (typeof setImmediate !== "undefined") {
+ schedule = function (fn) {
+ setImmediate(fn);
+ };
+} else if (typeof setTimeout !== "undefined") {
+ schedule = function (fn) {
+ setTimeout(fn, 0);
+ };
+} else {
+ schedule = noAsyncScheduler;
+}
+module.exports = schedule;
+
+},{"./util":36}],30:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+ function(Promise, PromiseArray, debug) {
+var PromiseInspection = Promise.PromiseInspection;
+var util = _dereq_("./util");
+
+function SettledPromiseArray(values) {
+ this.constructor$(values);
+}
+util.inherits(SettledPromiseArray, PromiseArray);
+
+SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
+ this._values[index] = inspection;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ return true;
+ }
+ return false;
+};
+
+SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 33554432;
+ ret._settledValueField = value;
+ return this._promiseResolved(index, ret);
+};
+SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 16777216;
+ ret._settledValueField = reason;
+ return this._promiseResolved(index, ret);
+};
+
+Promise.settle = function (promises) {
+ debug.deprecated(".settle()", ".reflect()");
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.allSettled = function (promises) {
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.prototype.settle = function () {
+ return Promise.settle(this);
+};
+};
+
+},{"./util":36}],31:[function(_dereq_,module,exports){
+"use strict";
+module.exports =
+function(Promise, PromiseArray, apiRejection) {
+var util = _dereq_("./util");
+var RangeError = _dereq_("./errors").RangeError;
+var AggregateError = _dereq_("./errors").AggregateError;
+var isArray = util.isArray;
+var CANCELLATION = {};
+
+
+function SomePromiseArray(values) {
+ this.constructor$(values);
+ this._howMany = 0;
+ this._unwrap = false;
+ this._initialized = false;
+}
+util.inherits(SomePromiseArray, PromiseArray);
+
+SomePromiseArray.prototype._init = function () {
+ if (!this._initialized) {
+ return;
+ }
+ if (this._howMany === 0) {
+ this._resolve([]);
+ return;
+ }
+ this._init$(undefined, -5);
+ var isArrayResolved = isArray(this._values);
+ if (!this._isResolved() &&
+ isArrayResolved &&
+ this._howMany > this._canPossiblyFulfill()) {
+ this._reject(this._getRangeError(this.length()));
+ }
+};
+
+SomePromiseArray.prototype.init = function () {
+ this._initialized = true;
+ this._init();
+};
+
+SomePromiseArray.prototype.setUnwrap = function () {
+ this._unwrap = true;
+};
+
+SomePromiseArray.prototype.howMany = function () {
+ return this._howMany;
+};
+
+SomePromiseArray.prototype.setHowMany = function (count) {
+ this._howMany = count;
+};
+
+SomePromiseArray.prototype._promiseFulfilled = function (value) {
+ this._addFulfilled(value);
+ if (this._fulfilled() === this.howMany()) {
+ this._values.length = this.howMany();
+ if (this.howMany() === 1 && this._unwrap) {
+ this._resolve(this._values[0]);
+ } else {
+ this._resolve(this._values);
+ }
+ return true;
+ }
+ return false;
+
+};
+SomePromiseArray.prototype._promiseRejected = function (reason) {
+ this._addRejected(reason);
+ return this._checkOutcome();
+};
+
+SomePromiseArray.prototype._promiseCancelled = function () {
+ if (this._values instanceof Promise || this._values == null) {
+ return this._cancel();
+ }
+ this._addRejected(CANCELLATION);
+ return this._checkOutcome();
+};
+
+SomePromiseArray.prototype._checkOutcome = function() {
+ if (this.howMany() > this._canPossiblyFulfill()) {
+ var e = new AggregateError();
+ for (var i = this.length(); i < this._values.length; ++i) {
+ if (this._values[i] !== CANCELLATION) {
+ e.push(this._values[i]);
+ }
+ }
+ if (e.length > 0) {
+ this._reject(e);
+ } else {
+ this._cancel();
+ }
+ return true;
+ }
+ return false;
+};
+
+SomePromiseArray.prototype._fulfilled = function () {
+ return this._totalResolved;
+};
+
+SomePromiseArray.prototype._rejected = function () {
+ return this._values.length - this.length();
+};
+
+SomePromiseArray.prototype._addRejected = function (reason) {
+ this._values.push(reason);
+};
+
+SomePromiseArray.prototype._addFulfilled = function (value) {
+ this._values[this._totalResolved++] = value;
+};
+
+SomePromiseArray.prototype._canPossiblyFulfill = function () {
+ return this.length() - this._rejected();
+};
+
+SomePromiseArray.prototype._getRangeError = function (count) {
+ var message = "Input array must contain at least " +
+ this._howMany + " items but contains only " + count + " items";
+ return new RangeError(message);
+};
+
+SomePromiseArray.prototype._resolveEmptyArray = function () {
+ this._reject(this._getRangeError(0));
+};
+
+function some(promises, howMany) {
+ if ((howMany | 0) !== howMany || howMany < 0) {
+ return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(howMany);
+ ret.init();
+ return promise;
+}
+
+Promise.some = function (promises, howMany) {
+ return some(promises, howMany);
+};
+
+Promise.prototype.some = function (howMany) {
+ return some(this, howMany);
+};
+
+Promise._SomePromiseArray = SomePromiseArray;
+};
+
+},{"./errors":12,"./util":36}],32:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise) {
+function PromiseInspection(promise) {
+ if (promise !== undefined) {
+ promise = promise._target();
+ this._bitField = promise._bitField;
+ this._settledValueField = promise._isFateSealed()
+ ? promise._settledValue() : undefined;
+ }
+ else {
+ this._bitField = 0;
+ this._settledValueField = undefined;
+ }
+}
+
+PromiseInspection.prototype._settledValue = function() {
+ return this._settledValueField;
+};
+
+var value = PromiseInspection.prototype.value = function () {
+ if (!this.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ return this._settledValue();
+};
+
+var reason = PromiseInspection.prototype.error =
+PromiseInspection.prototype.reason = function () {
+ if (!this.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ return this._settledValue();
+};
+
+var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
+ return (this._bitField & 33554432) !== 0;
+};
+
+var isRejected = PromiseInspection.prototype.isRejected = function () {
+ return (this._bitField & 16777216) !== 0;
+};
+
+var isPending = PromiseInspection.prototype.isPending = function () {
+ return (this._bitField & 50397184) === 0;
+};
+
+var isResolved = PromiseInspection.prototype.isResolved = function () {
+ return (this._bitField & 50331648) !== 0;
+};
+
+PromiseInspection.prototype.isCancelled = function() {
+ return (this._bitField & 8454144) !== 0;
+};
+
+Promise.prototype.__isCancelled = function() {
+ return (this._bitField & 65536) === 65536;
+};
+
+Promise.prototype._isCancelled = function() {
+ return this._target().__isCancelled();
+};
+
+Promise.prototype.isCancelled = function() {
+ return (this._target()._bitField & 8454144) !== 0;
+};
+
+Promise.prototype.isPending = function() {
+ return isPending.call(this._target());
+};
+
+Promise.prototype.isRejected = function() {
+ return isRejected.call(this._target());
+};
+
+Promise.prototype.isFulfilled = function() {
+ return isFulfilled.call(this._target());
+};
+
+Promise.prototype.isResolved = function() {
+ return isResolved.call(this._target());
+};
+
+Promise.prototype.value = function() {
+ return value.call(this._target());
+};
+
+Promise.prototype.reason = function() {
+ var target = this._target();
+ target._unsetRejectionIsUnhandled();
+ return reason.call(target);
+};
+
+Promise.prototype._value = function() {
+ return this._settledValue();
+};
+
+Promise.prototype._reason = function() {
+ this._unsetRejectionIsUnhandled();
+ return this._settledValue();
+};
+
+Promise.PromiseInspection = PromiseInspection;
+};
+
+},{}],33:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = _dereq_("./util");
+var errorObj = util.errorObj;
+var isObject = util.isObject;
+
+function tryConvertToPromise(obj, context) {
+ if (isObject(obj)) {
+ if (obj instanceof Promise) return obj;
+ var then = getThen(obj);
+ if (then === errorObj) {
+ if (context) context._pushContext();
+ var ret = Promise.reject(then.e);
+ if (context) context._popContext();
+ return ret;
+ } else if (typeof then === "function") {
+ if (isAnyBluebirdPromise(obj)) {
+ var ret = new Promise(INTERNAL);
+ obj._then(
+ ret._fulfill,
+ ret._reject,
+ undefined,
+ ret,
+ null
+ );
+ return ret;
+ }
+ return doThenable(obj, then, context);
+ }
+ }
+ return obj;
+}
+
+function doGetThen(obj) {
+ return obj.then;
+}
+
+function getThen(obj) {
+ try {
+ return doGetThen(obj);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+
+var hasProp = {}.hasOwnProperty;
+function isAnyBluebirdPromise(obj) {
+ try {
+ return hasProp.call(obj, "_promise0");
+ } catch (e) {
+ return false;
+ }
+}
+
+function doThenable(x, then, context) {
+ var promise = new Promise(INTERNAL);
+ var ret = promise;
+ if (context) context._pushContext();
+ promise._captureStackTrace();
+ if (context) context._popContext();
+ var synchronous = true;
+ var result = util.tryCatch(then).call(x, resolve, reject);
+ synchronous = false;
+
+ if (promise && result === errorObj) {
+ promise._rejectCallback(result.e, true, true);
+ promise = null;
+ }
+
+ function resolve(value) {
+ if (!promise) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }
+
+ function reject(reason) {
+ if (!promise) return;
+ promise._rejectCallback(reason, synchronous, true);
+ promise = null;
+ }
+ return ret;
+}
+
+return tryConvertToPromise;
+};
+
+},{"./util":36}],34:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function(Promise, INTERNAL, debug) {
+var util = _dereq_("./util");
+var TimeoutError = Promise.TimeoutError;
+
+function HandleWrapper(handle) {
+ this.handle = handle;
+}
+
+HandleWrapper.prototype._resultCancelled = function() {
+ clearTimeout(this.handle);
+};
+
+var afterValue = function(value) { return delay(+this).thenReturn(value); };
+var delay = Promise.delay = function (ms, value) {
+ var ret;
+ var handle;
+ if (value !== undefined) {
+ ret = Promise.resolve(value)
+ ._then(afterValue, null, null, ms, undefined);
+ if (debug.cancellation() && value instanceof Promise) {
+ ret._setOnCancel(value);
+ }
+ } else {
+ ret = new Promise(INTERNAL);
+ handle = setTimeout(function() { ret._fulfill(); }, +ms);
+ if (debug.cancellation()) {
+ ret._setOnCancel(new HandleWrapper(handle));
+ }
+ ret._captureStackTrace();
+ }
+ ret._setAsyncGuaranteed();
+ return ret;
+};
+
+Promise.prototype.delay = function (ms) {
+ return delay(ms, this);
+};
+
+var afterTimeout = function (promise, message, parent) {
+ var err;
+ if (typeof message !== "string") {
+ if (message instanceof Error) {
+ err = message;
+ } else {
+ err = new TimeoutError("operation timed out");
+ }
+ } else {
+ err = new TimeoutError(message);
+ }
+ util.markAsOriginatingFromRejection(err);
+ promise._attachExtraTrace(err);
+ promise._reject(err);
+
+ if (parent != null) {
+ parent.cancel();
+ }
+};
+
+function successClear(value) {
+ clearTimeout(this.handle);
+ return value;
+}
+
+function failureClear(reason) {
+ clearTimeout(this.handle);
+ throw reason;
+}
+
+Promise.prototype.timeout = function (ms, message) {
+ ms = +ms;
+ var ret, parent;
+
+ var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {
+ if (ret.isPending()) {
+ afterTimeout(ret, message, parent);
+ }
+ }, ms));
+
+ if (debug.cancellation()) {
+ parent = this.then();
+ ret = parent._then(successClear, failureClear,
+ undefined, handleWrapper, undefined);
+ ret._setOnCancel(handleWrapper);
+ } else {
+ ret = this._then(successClear, failureClear,
+ undefined, handleWrapper, undefined);
+ }
+
+ return ret;
+};
+
+};
+
+},{"./util":36}],35:[function(_dereq_,module,exports){
+"use strict";
+module.exports = function (Promise, apiRejection, tryConvertToPromise,
+ createContext, INTERNAL, debug) {
+ var util = _dereq_("./util");
+ var TypeError = _dereq_("./errors").TypeError;
+ var inherits = _dereq_("./util").inherits;
+ var errorObj = util.errorObj;
+ var tryCatch = util.tryCatch;
+ var NULL = {};
+
+ function thrower(e) {
+ setTimeout(function(){throw e;}, 0);
+ }
+
+ function castPreservingDisposable(thenable) {
+ var maybePromise = tryConvertToPromise(thenable);
+ if (maybePromise !== thenable &&
+ typeof thenable._isDisposable === "function" &&
+ typeof thenable._getDisposer === "function" &&
+ thenable._isDisposable()) {
+ maybePromise._setDisposable(thenable._getDisposer());
+ }
+ return maybePromise;
+ }
+ function dispose(resources, inspection) {
+ var i = 0;
+ var len = resources.length;
+ var ret = new Promise(INTERNAL);
+ function iterator() {
+ if (i >= len) return ret._fulfill();
+ var maybePromise = castPreservingDisposable(resources[i++]);
+ if (maybePromise instanceof Promise &&
+ maybePromise._isDisposable()) {
+ try {
+ maybePromise = tryConvertToPromise(
+ maybePromise._getDisposer().tryDispose(inspection),
+ resources.promise);
+ } catch (e) {
+ return thrower(e);
+ }
+ if (maybePromise instanceof Promise) {
+ return maybePromise._then(iterator, thrower,
+ null, null, null);
+ }
+ }
+ iterator();
+ }
+ iterator();
+ return ret;
+ }
+
+ function Disposer(data, promise, context) {
+ this._data = data;
+ this._promise = promise;
+ this._context = context;
+ }
+
+ Disposer.prototype.data = function () {
+ return this._data;
+ };
+
+ Disposer.prototype.promise = function () {
+ return this._promise;
+ };
+
+ Disposer.prototype.resource = function () {
+ if (this.promise().isFulfilled()) {
+ return this.promise().value();
+ }
+ return NULL;
+ };
+
+ Disposer.prototype.tryDispose = function(inspection) {
+ var resource = this.resource();
+ var context = this._context;
+ if (context !== undefined) context._pushContext();
+ var ret = resource !== NULL
+ ? this.doDispose(resource, inspection) : null;
+ if (context !== undefined) context._popContext();
+ this._promise._unsetDisposable();
+ this._data = null;
+ return ret;
+ };
+
+ Disposer.isDisposer = function (d) {
+ return (d != null &&
+ typeof d.resource === "function" &&
+ typeof d.tryDispose === "function");
+ };
+
+ function FunctionDisposer(fn, promise, context) {
+ this.constructor$(fn, promise, context);
+ }
+ inherits(FunctionDisposer, Disposer);
+
+ FunctionDisposer.prototype.doDispose = function (resource, inspection) {
+ var fn = this.data();
+ return fn.call(resource, resource, inspection);
+ };
+
+ function maybeUnwrapDisposer(value) {
+ if (Disposer.isDisposer(value)) {
+ this.resources[this.index]._setDisposable(value);
+ return value.promise();
+ }
+ return value;
+ }
+
+ function ResourceList(length) {
+ this.length = length;
+ this.promise = null;
+ this[length-1] = null;
+ }
+
+ ResourceList.prototype._resultCancelled = function() {
+ var len = this.length;
+ for (var i = 0; i < len; ++i) {
+ var item = this[i];
+ if (item instanceof Promise) {
+ item.cancel();
+ }
+ }
+ };
+
+ Promise.using = function () {
+ var len = arguments.length;
+ if (len < 2) return apiRejection(
+ "you must pass at least 2 arguments to Promise.using");
+ var fn = arguments[len - 1];
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ var input;
+ var spreadArgs = true;
+ if (len === 2 && Array.isArray(arguments[0])) {
+ input = arguments[0];
+ len = input.length;
+ spreadArgs = false;
+ } else {
+ input = arguments;
+ len--;
+ }
+ var resources = new ResourceList(len);
+ for (var i = 0; i < len; ++i) {
+ var resource = input[i];
+ if (Disposer.isDisposer(resource)) {
+ var disposer = resource;
+ resource = resource.promise();
+ resource._setDisposable(disposer);
+ } else {
+ var maybePromise = tryConvertToPromise(resource);
+ if (maybePromise instanceof Promise) {
+ resource =
+ maybePromise._then(maybeUnwrapDisposer, null, null, {
+ resources: resources,
+ index: i
+ }, undefined);
+ }
+ }
+ resources[i] = resource;
+ }
+
+ var reflectedResources = new Array(resources.length);
+ for (var i = 0; i < reflectedResources.length; ++i) {
+ reflectedResources[i] = Promise.resolve(resources[i]).reflect();
+ }
+
+ var resultPromise = Promise.all(reflectedResources)
+ .then(function(inspections) {
+ for (var i = 0; i < inspections.length; ++i) {
+ var inspection = inspections[i];
+ if (inspection.isRejected()) {
+ errorObj.e = inspection.error();
+ return errorObj;
+ } else if (!inspection.isFulfilled()) {
+ resultPromise.cancel();
+ return;
+ }
+ inspections[i] = inspection.value();
+ }
+ promise._pushContext();
+
+ fn = tryCatch(fn);
+ var ret = spreadArgs
+ ? fn.apply(undefined, inspections) : fn(inspections);
+ var promiseCreated = promise._popContext();
+ debug.checkForgottenReturns(
+ ret, promiseCreated, "Promise.using", promise);
+ return ret;
+ });
+
+ var promise = resultPromise.lastly(function() {
+ var inspection = new Promise.PromiseInspection(resultPromise);
+ return dispose(resources, inspection);
+ });
+ resources.promise = promise;
+ promise._setOnCancel(resources);
+ return promise;
+ };
+
+ Promise.prototype._setDisposable = function (disposer) {
+ this._bitField = this._bitField | 131072;
+ this._disposer = disposer;
+ };
+
+ Promise.prototype._isDisposable = function () {
+ return (this._bitField & 131072) > 0;
+ };
+
+ Promise.prototype._getDisposer = function () {
+ return this._disposer;
+ };
+
+ Promise.prototype._unsetDisposable = function () {
+ this._bitField = this._bitField & (~131072);
+ this._disposer = undefined;
+ };
+
+ Promise.prototype.disposer = function (fn) {
+ if (typeof fn === "function") {
+ return new FunctionDisposer(fn, this, createContext());
+ }
+ throw new TypeError();
+ };
+
+};
+
+},{"./errors":12,"./util":36}],36:[function(_dereq_,module,exports){
+"use strict";
+var es5 = _dereq_("./es5");
+var canEvaluate = typeof navigator == "undefined";
+
+var errorObj = {e: {}};
+var tryCatchTarget;
+var globalObject = typeof self !== "undefined" ? self :
+ typeof window !== "undefined" ? window :
+ typeof global !== "undefined" ? global :
+ this !== undefined ? this : null;
+
+function tryCatcher() {
+ try {
+ var target = tryCatchTarget;
+ tryCatchTarget = null;
+ return target.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+function tryCatch(fn) {
+ tryCatchTarget = fn;
+ return tryCatcher;
+}
+
+var inherits = function(Child, Parent) {
+ var hasProp = {}.hasOwnProperty;
+
+ function T() {
+ this.constructor = Child;
+ this.constructor$ = Parent;
+ for (var propertyName in Parent.prototype) {
+ if (hasProp.call(Parent.prototype, propertyName) &&
+ propertyName.charAt(propertyName.length-1) !== "$"
+ ) {
+ this[propertyName + "$"] = Parent.prototype[propertyName];
+ }
+ }
+ }
+ T.prototype = Parent.prototype;
+ Child.prototype = new T();
+ return Child.prototype;
+};
+
+
+function isPrimitive(val) {
+ return val == null || val === true || val === false ||
+ typeof val === "string" || typeof val === "number";
+
+}
+
+function isObject(value) {
+ return typeof value === "function" ||
+ typeof value === "object" && value !== null;
+}
+
+function maybeWrapAsError(maybeError) {
+ if (!isPrimitive(maybeError)) return maybeError;
+
+ return new Error(safeToString(maybeError));
+}
+
+function withAppended(target, appendee) {
+ var len = target.length;
+ var ret = new Array(len + 1);
+ var i;
+ for (i = 0; i < len; ++i) {
+ ret[i] = target[i];
+ }
+ ret[i] = appendee;
+ return ret;
+}
+
+function getDataPropertyOrDefault(obj, key, defaultValue) {
+ if (es5.isES5) {
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+
+ if (desc != null) {
+ return desc.get == null && desc.set == null
+ ? desc.value
+ : defaultValue;
+ }
+ } else {
+ return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
+ }
+}
+
+function notEnumerableProp(obj, name, value) {
+ if (isPrimitive(obj)) return obj;
+ var descriptor = {
+ value: value,
+ configurable: true,
+ enumerable: false,
+ writable: true
+ };
+ es5.defineProperty(obj, name, descriptor);
+ return obj;
+}
+
+function thrower(r) {
+ throw r;
+}
+
+var inheritedDataKeys = (function() {
+ var excludedPrototypes = [
+ Array.prototype,
+ Object.prototype,
+ Function.prototype
+ ];
+
+ var isExcludedProto = function(val) {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (excludedPrototypes[i] === val) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ if (es5.isES5) {
+ var getKeys = Object.getOwnPropertyNames;
+ return function(obj) {
+ var ret = [];
+ var visitedKeys = Object.create(null);
+ while (obj != null && !isExcludedProto(obj)) {
+ var keys;
+ try {
+ keys = getKeys(obj);
+ } catch (e) {
+ return ret;
+ }
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (visitedKeys[key]) continue;
+ visitedKeys[key] = true;
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null && desc.get == null && desc.set == null) {
+ ret.push(key);
+ }
+ }
+ obj = es5.getPrototypeOf(obj);
+ }
+ return ret;
+ };
+ } else {
+ var hasProp = {}.hasOwnProperty;
+ return function(obj) {
+ if (isExcludedProto(obj)) return [];
+ var ret = [];
+
+ /*jshint forin:false */
+ enumeration: for (var key in obj) {
+ if (hasProp.call(obj, key)) {
+ ret.push(key);
+ } else {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (hasProp.call(excludedPrototypes[i], key)) {
+ continue enumeration;
+ }
+ }
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+ }
+
+})();
+
+var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
+function isClass(fn) {
+ try {
+ if (typeof fn === "function") {
+ var keys = es5.names(fn.prototype);
+
+ var hasMethods = es5.isES5 && keys.length > 1;
+ var hasMethodsOtherThanConstructor = keys.length > 0 &&
+ !(keys.length === 1 && keys[0] === "constructor");
+ var hasThisAssignmentAndStaticMethods =
+ thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
+
+ if (hasMethods || hasMethodsOtherThanConstructor ||
+ hasThisAssignmentAndStaticMethods) {
+ return true;
+ }
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+}
+
+function toFastProperties(obj) {
+ /*jshint -W027,-W055,-W031*/
+ function FakeConstructor() {}
+ FakeConstructor.prototype = obj;
+ var receiver = new FakeConstructor();
+ function ic() {
+ return typeof receiver.foo;
+ }
+ ic();
+ ic();
+ return obj;
+ eval(obj);
+}
+
+var rident = /^[a-z$_][a-z$_0-9]*$/i;
+function isIdentifier(str) {
+ return rident.test(str);
+}
+
+function filledRange(count, prefix, suffix) {
+ var ret = new Array(count);
+ for(var i = 0; i < count; ++i) {
+ ret[i] = prefix + i + suffix;
+ }
+ return ret;
+}
+
+function safeToString(obj) {
+ try {
+ return obj + "";
+ } catch (e) {
+ return "[no string representation]";
+ }
+}
+
+function isError(obj) {
+ return obj instanceof Error ||
+ (obj !== null &&
+ typeof obj === "object" &&
+ typeof obj.message === "string" &&
+ typeof obj.name === "string");
+}
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isOperational", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
+ e["isOperational"] === true);
+}
+
+function canAttachTrace(obj) {
+ return isError(obj) && es5.propertyIsWritable(obj, "stack");
+}
+
+var ensureErrorObject = (function() {
+ if (!("stack" in new Error())) {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ try {throw new Error(safeToString(value));}
+ catch(err) {return err;}
+ };
+ } else {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ return new Error(safeToString(value));
+ };
+ }
+})();
+
+function classString(obj) {
+ return {}.toString.call(obj);
+}
+
+function copyDescriptors(from, to, filter) {
+ var keys = es5.names(from);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (filter(key)) {
+ try {
+ es5.defineProperty(to, key, es5.getDescriptor(from, key));
+ } catch (ignore) {}
+ }
+ }
+}
+
+var asArray = function(v) {
+ if (es5.isArray(v)) {
+ return v;
+ }
+ return null;
+};
+
+if (typeof Symbol !== "undefined" && Symbol.iterator) {
+ var ArrayFrom = typeof Array.from === "function" ? function(v) {
+ return Array.from(v);
+ } : function(v) {
+ var ret = [];
+ var it = v[Symbol.iterator]();
+ var itResult;
+ while (!((itResult = it.next()).done)) {
+ ret.push(itResult.value);
+ }
+ return ret;
+ };
+
+ asArray = function(v) {
+ if (es5.isArray(v)) {
+ return v;
+ } else if (v != null && typeof v[Symbol.iterator] === "function") {
+ return ArrayFrom(v);
+ }
+ return null;
+ };
+}
+
+var isNode = typeof process !== "undefined" &&
+ classString(process).toLowerCase() === "[object process]";
+
+var hasEnvVariables = typeof process !== "undefined" &&
+ typeof process.env !== "undefined";
+
+function env(key) {
+ return hasEnvVariables ? process.env[key] : undefined;
+}
+
+function getNativePromise() {
+ if (typeof Promise === "function") {
+ try {
+ var promise = new Promise(function(){});
+ if (classString(promise) === "[object Promise]") {
+ return Promise;
+ }
+ } catch (e) {}
+ }
+}
+
+var reflectHandler;
+function contextBind(ctx, cb) {
+ if (ctx === null ||
+ typeof cb !== "function" ||
+ cb === reflectHandler) {
+ return cb;
+ }
+
+ if (ctx.domain !== null) {
+ cb = ctx.domain.bind(cb);
+ }
+
+ var async = ctx.async;
+ if (async !== null) {
+ var old = cb;
+ cb = function() {
+ var args = (new Array(2)).concat([].slice.call(arguments));;
+ args[0] = old;
+ args[1] = this;
+ return async.runInAsyncScope.apply(async, args);
+ };
+ }
+ return cb;
+}
+
+var ret = {
+ setReflectHandler: function(fn) {
+ reflectHandler = fn;
+ },
+ isClass: isClass,
+ isIdentifier: isIdentifier,
+ inheritedDataKeys: inheritedDataKeys,
+ getDataPropertyOrDefault: getDataPropertyOrDefault,
+ thrower: thrower,
+ isArray: es5.isArray,
+ asArray: asArray,
+ notEnumerableProp: notEnumerableProp,
+ isPrimitive: isPrimitive,
+ isObject: isObject,
+ isError: isError,
+ canEvaluate: canEvaluate,
+ errorObj: errorObj,
+ tryCatch: tryCatch,
+ inherits: inherits,
+ withAppended: withAppended,
+ maybeWrapAsError: maybeWrapAsError,
+ toFastProperties: toFastProperties,
+ filledRange: filledRange,
+ toString: safeToString,
+ canAttachTrace: canAttachTrace,
+ ensureErrorObject: ensureErrorObject,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ classString: classString,
+ copyDescriptors: copyDescriptors,
+ isNode: isNode,
+ hasEnvVariables: hasEnvVariables,
+ env: env,
+ global: globalObject,
+ getNativePromise: getNativePromise,
+ contextBind: contextBind
+};
+ret.isRecentNode = ret.isNode && (function() {
+ var version;
+ if (process.versions && process.versions.node) {
+ version = process.versions.node.split(".").map(Number);
+ } else if (process.version) {
+ version = process.version.split(".").map(Number);
+ }
+ return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
+})();
+ret.nodeSupportsAsyncResource = ret.isNode && (function() {
+ var supportsAsync = false;
+ try {
+ var res = _dereq_("async_hooks").AsyncResource;
+ supportsAsync = typeof res.prototype.runInAsyncScope === "function";
+ } catch (e) {
+ supportsAsync = false;
+ }
+ return supportsAsync;
+})();
+
+if (ret.isNode) ret.toFastProperties(process);
+
+try {throw new Error(); } catch (e) {ret.lastLineError = e;}
+module.exports = ret;
+
+},{"./es5":13,"async_hooks":undefined}]},{},[4])(4)
+}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/node_modules/bluebird/js/browser/bluebird.min.js b/node_modules/bluebird/js/browser/bluebird.min.js
new file mode 100644
index 0000000..c1e907b
--- /dev/null
+++ b/node_modules/bluebird/js/browser/bluebird.min.js
@@ -0,0 +1,31 @@
+/* @preserve
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2018 Petka Antonov
+ *
+ * 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.
+ *
+ */
+/**
+ * bluebird build version 3.7.2
+ * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
+*/
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=e[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new f(16),this._normalQueue=new f(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=p}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}function a(t){for(;t.length()>0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var u;try{throw new Error}catch(l){u=l}var p=t("./schedule"),f=t("./queue");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s,r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=u},{"./queue":26,"./schedule":29}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var u=n(o),l=new t(e);l._propagateFrom(this,1);var p=this._target();if(l._setBoundTo(u),u instanceof t){var f={promiseRejectionQueued:!1,promise:l,target:p,bindingPromise:u};p._then(e,s,void 0,l,f),u._then(a,c,void 0,l,f),l._setOnCancel(u)}else l._resolveCallback(p);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var u=a._boundValue();t:for(var l=0;l<t.length;++l){var p=t[l];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(u,c)}else if("function"==typeof p){var f=o(p).call(u,c);if(f===s)return f;if(f)return o(n).call(u,c)}else if(r.isObject(c)){for(var h=i(p),_=0;_<h.length;++_){var d=h[_];if(p[d]!=c[d])continue t}return o(n).call(u,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,e){return{promise:e}}function s(){return!1}function a(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+B.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function c(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?B.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function l(t){this._onCancelField=t}function p(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function _(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function d(){this._trace=new V(this._peekContext())}function v(t,e){if(q(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=F(t);B.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),B.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(){this._trace=void 0}function g(t,e,n,r,i){if(void 0===t&&null!==e&&Z){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=k(a),u=c.length-1;u>=0;--u){var l=c[u];if(!Q.test(l)){var p=l.match(G);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],u=0;u<a.length;++u)if(a[u]===f){u>0&&(s="\n"+a[u-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(h,!0,e)}}function m(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),b(n)}function b(t,n,r){if(lt.warnings){var i,o=new U(t);if(n)r._attachExtraTrace(o);else if(lt.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=F(o);o.stack=s.message+"\n"+s.stack.join("\n")}ot("warning",o)||x(o,"",!0)}}function w(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function C(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function j(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function k(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||z.test(r),o=i&&at(r);i&&!o&&(W&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function E(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||z.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function F(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?E(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:k(e)}}function x(t,e,n){if("undefined"!=typeof console){var r;if(B.isObject(t)){var i=t.stack;r=e+X(i,t)}else r=e+String(t);"function"==typeof I?I(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function T(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){N.throwLater(o)}"unhandledRejection"===t?ot(t,n,r)||i||x(n,"Unhandled rejection "):ot(t,r)}function P(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():B.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+R(e)+">, no stack trace)"}function R(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function S(){return"function"==typeof ut}function O(t){var e=t.match(ct);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function A(t,e){if(S()){for(var n,r,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var u=O(i[c]);if(u){n=u.fileName,s=u.line;break}}for(var c=0;c<o.length;++c){var u=O(o[c]);if(u){r=u.fileName,a=u.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(at=function(t){if($.test(t))return!0;var e=O(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function V(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ut(this,V),e>32&&this.uncycle()}var H,D,I,L,N=e._async,U=t("./errors").Warning,B=t("./util"),M=t("./es5"),q=B.canAttachTrace,$=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,Q=/\((?:timers\.js):\d+:\d+\)/,G=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,z=null,X=null,W=!1,K=!(0==B.env("BLUEBIRD_DEBUG")||!B.env("BLUEBIRD_DEBUG")&&"development"!==B.env("NODE_ENV")),J=!(0==B.env("BLUEBIRD_WARNINGS")||!K&&!B.env("BLUEBIRD_WARNINGS")),Y=!(0==B.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!B.env("BLUEBIRD_LONG_STACK_TRACES")),Z=0!=B.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(J||!!B.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){function t(){for(var t=0;t<r.length;++t)r[t]._notifyUnhandledRejection();n()}function n(){r.length=0}var r=[];L=function(e){r.push(e),setTimeout(t,1)},M.defineProperty(e,"_unhandledRejectionCheck",{value:t}),M.defineProperty(e,"_unhandledRejectionClear",{value:n})}(),e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),L(this))},e.prototype._notifyUnhandledRejectionIsHandled=function(){T("rejectionHandled",H,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),T("unhandledRejection",D,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return b(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var n=e._getContext();D=B.contextBind(n,t)},e.onUnhandledRejectionHandled=function(t){var n=e._getContext();H=B.contextBind(n,t)};var tt=function(){};e.longStackTraces=function(){if(N.haveItemsQueued()&&!lt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!lt.longStackTraces&&S()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;lt.longStackTraces=!0,tt=function(){if(N.haveItemsQueued()&&!lt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),lt.longStackTraces=!1},e.prototype._captureStackTrace=d,e.prototype._attachExtraTrace=v,e.prototype._dereferenceTrace=y,n.activateLongStackTraces()}},e.hasLongStackTraces=function(){return lt.longStackTraces&&S()};var et={unhandledrejection:{before:function(){var t=B.global.onunhandledrejection;return B.global.onunhandledrejection=null,t},after:function(t){B.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=B.global.onrejectionhandled;return B.global.onrejectionhandled=null,t},after:function(t){B.global.onrejectionhandled=t}}},nt=function(){var t=function(t,e){if(!t)return!B.global.dispatchEvent(e);var n;try{return n=t.before(),!B.global.dispatchEvent(e)}finally{t.after(n)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return B.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r={detail:n,cancelable:!0},i=new CustomEvent(e,r);return M.defineProperty(i,"promise",{value:n.promise}),M.defineProperty(i,"reason",{value:n.reason}),t(et[e],i)}}if("function"==typeof Event){var e=new Event("CustomEvent");return B.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new Event(e,{cancelable:!0});return r.detail=n,M.defineProperty(r,"promise",{value:n.promise}),M.defineProperty(r,"reason",{value:n.reason}),t(et[e],r)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),B.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!0,n),t(et[e],r)}}catch(n){}return function(){return!1}}(),rt=function(){return B.isNode?function(){return process.emit.apply(process,arguments)}:B.global?function(t){var e="on"+t.toLowerCase(),n=B.global[e];return n?(n.apply(B.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),it={promiseCreated:o,promiseFulfilled:o,promiseRejected:o,promiseResolved:o,promiseCancelled:o,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:o},ot=function(t){var e=!1;try{e=rt.apply(null,arguments)}catch(n){N.throwLater(n),e=!0}var r=!1;try{r=nt(t,it[t].apply(null,arguments))}catch(n){N.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&tt()),"warnings"in t){var n=t.warnings;lt.warnings=!!n,Z=lt.warnings,B.isObject(n)&&"wForgottenReturn"in n&&(Z=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!lt.cancellation){if(N.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=p,e.prototype._propagateFrom=f,e.prototype._onCancel=u,e.prototype._setOnCancel=l,e.prototype._attachCancellationCallback=c,e.prototype._execute=a,st=f,lt.cancellation=!0}if("monitoring"in t&&(t.monitoring&&!lt.monitoring?(lt.monitoring=!0,e.prototype._fireEvent=ot):!t.monitoring&&lt.monitoring&&(lt.monitoring=!1,e.prototype._fireEvent=s)),"asyncHooks"in t&&B.nodeSupportsAsyncResource){var o=lt.asyncHooks,h=!!t.asyncHooks;o!==h&&(lt.asyncHooks=h,h?r():i())}return e},e.prototype._fireEvent=s,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var st=h,at=function(){return!1},ct=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;B.inherits(V,Error),n.CapturedTrace=V,V.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var u=c._length+1,l=r-2;l>=0;--l)e[l]._length=u,u++;return}}}},V.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=F(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(k(i.stack.split("\n"))),i=i._parent;j(r),C(r),B.notEnumerableProp(t,"stack",w(n,r)),B.notEnumerableProp(t,"__stackCleaned__",!0)}};var ut=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():P(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,z=t,X=e;var n=Error.captureStackTrace;return at=function(t){return $.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return z=/@/,X=e,W=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(X=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?P(e):e.toString()},null):(z=t,X=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(I=function(t){console.warn(t)},B.isNode&&process.stderr.isTTY?I=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:B.isNode||"string"!=typeof(new Error).stack||(I=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var lt={warnings:J,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return Y&&e.longStackTraces(),{asyncHooks:function(){return lt.asyncHooks},longStackTraces:function(){return lt.longStackTraces},warnings:function(){return lt.warnings},cancellation:function(){return lt.cancellation},monitoring:function(){return lt.monitoring},propagateFromFunction:function(){return st},boundValueFunction:function(){return _},checkForgottenReturns:g,setBounds:A,warn:b,deprecated:m,CapturedTrace:V,fireDomEvent:nt,fireGlobalEvent:rt}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return l(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,u=t("./util"),l=u.inherits,p=u.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<y.length;++g)"function"==typeof Array.prototype[y[g]]&&(d.prototype[y[g]]=Array.prototype[y[g]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var m=0;d.prototype.toString=function(){var t=Array(4*m+1).join(" "),e="\n"+t+"AggregateError of:\n";m++,t=Array(4*m+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return m--,e},l(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:h,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},u=function(t,e,n){return t[e]=n.value,t},l=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return s}},f=function(t){try{return"[object Array]"===o.call(t)}catch(e){return!1}};e.exports={isArray:f,keys:a,names:a,defineProperty:u,getDescriptor:c,freeze:l,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function s(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return u.call(this,this.promise._target()._settledValue())}function c(t){return s(this,t)?void 0:(f.e=t,f)}function u(t){var i=this.promise,u=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?u.call(i._boundValue()):u.call(i._boundValue(),t);if(l===r)return l;if(void 0!==l){i._setReturnedNonUndefined();var h=n(l,i);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),f.e=_,f}h.isPending()&&h._attachCancellationCallback(new o(this))}return h._then(a,c,void 0,this,void 0)}}}return i.isRejected()?(s(this),f.e=t,f):(s(this),t)}var l=t("./util"),p=e.CancellationError,f=l.errorObj,h=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,u);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var s=arguments[r];if(!l.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+l.classString(s)));i[o++]=s}i.length=o;var a=arguments[r];return this._passThrough(h(i,a,this),1,void 0,u)},i}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=h(n[o])(t);if(r._popContext(),s===f){r._pushContext();var a=e.reject(f.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{var u=this._promise=new e(r);u._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var u=t("./errors"),l=u.TypeError,p=t("./util"),f=p.errorObj,h=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n="undefined"!=typeof this._generator["return"];if(n)this._promise._pushContext(),t=h(this._generator["return"]).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=h(this._generator["throw"]).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator["throw"]).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===f)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);
+var o=i(r,this._promise);if(!(o instanceof e)&&(o=a(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(r))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0===(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t),this._promise._captureStackTrace();var s=e._getContext();if(this._callback=u.contextBind(s,n),this._preservedValues=i===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0),u.isArray(t))for(var a=0;a<t.length;++a){var c=t[a];c instanceof e&&c.suppressUnhandledRejections()}}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var u=t("./util"),l=u.tryCatch,p=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var u=this._promise,f=this._callback,h=u._boundValue();u._pushContext();var _=l(f).call(h,t,n,o),d=u._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",u),_===p)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var g=++this._totalResolved;return g>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],l=arguments[2];c=s.isArray(u)?a(t).apply(l,u):a(t).call(l,u)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new u(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=l.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),u=c.OperationalError,l=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if(null==t||t.constructor!==i)throw new E("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new E("expecting a function but got "+f.classString(e))}function i(t){t!==x&&r(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(x);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c=function(){return new E("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},l=function(t){return i.reject(new E(t))},p={},f=t("./util");f.setReflectHandler(u);var h=function(){var t=process.domain;return void 0===t?null:t},_=function(){return null},d=function(){return{domain:h(),async:null}},v=f.isNode&&f.nodeSupportsAsyncResource?t("async_hooks").AsyncResource:null,y=function(){return{domain:h(),async:new v("Bluebird::Promise")}},g=f.isNode?d:_;f.notEnumerableProp(i,"_getContext",g);var m=function(){g=y,f.notEnumerableProp(i,"_getContext",y)},b=function(){g=d,f.notEnumerableProp(i,"_getContext",d)},w=t("./es5"),C=t("./async"),j=new C;w.defineProperty(i,"_async",{value:j});var k=t("./errors"),E=i.TypeError=k.TypeError;i.RangeError=k.RangeError;var F=i.CancellationError=k.CancellationError;i.TimeoutError=k.TimeoutError,i.OperationalError=k.OperationalError,i.RejectionError=k.OperationalError,i.AggregateError=k.AggregateError;var x=function(){},T={},P={},R=t("./thenables")(i,x),S=t("./promise_array")(i,x,R,l,n),O=t("./context")(i),A=O.create,V=t("./debuggability")(i,O,m,b),H=(V.CapturedTrace,t("./finally")(i,R,P)),D=t("./catch_filter")(P),I=t("./nodeback"),L=f.errorObj,N=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return l("Catch statement predicate: expecting an object but got "+f.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new E("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,D(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(V.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?l("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,T,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(x);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=N(t)(I(e,n));return r===L&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new S(t).promise()},i.cast=function(t){var e=R(t);return e instanceof i||(e=new i(x),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(x);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new E("expecting a function but got "+f.classString(t));return j.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(x),c=this._target(),u=c._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var l=g();if(0!==(50397184&u)){var p,h,_=c._settlePromiseCtx;0!==(33554432&u)?(h=c._rejectionHandler0,p=t):0!==(16777216&u)?(h=c._fulfillmentHandler0,p=e,c._unsetRejectionIsUnhandled()):(_=c._settlePromiseLateCancellationObserver,h=new F("late cancellation observer"),c._attachExtraTrace(h),p=e),j.invoke(_,c,{handler:f.contextBind(l,p),promise:a,receiver:r,value:h})}else c._addCallbacks(t,e,a,r,l);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){if(!j.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},i.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===p?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=p),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=p),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=f.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=f.contextBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=f.contextBind(i,t)),"function"==typeof e&&(this[s+1]=f.contextBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var n=R(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(c());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var u=new F("late cancellation observer");r._attachExtraTrace(u),this._reject(u)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&V.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==x){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===T?n&&"number"==typeof n.length?o=N(t).apply(this._boundValue(),n):(o=L,o.e=new E("cannot .spread() a non-array: "+f.classString(n))):o=N(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===P?r._reject(n):o===L?r._rejectCallback(o.e,!1):(V.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof H&&r.isFinallyHandler()?(r.cancelPromise=t,N(e).call(r,o)===L&&t._reject(L.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof S?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():j.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?j.fatalError(t,f.isNode):void((65535&e)>0?j.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&w.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){V.deprecated("Promise.defer","new Promise");var t=new i(x);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",c),t("./method")(i,x,R,l,V),t("./bind")(i,x,R,V),t("./cancel")(i,S,l,V),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,S,R,x,j),i.Promise=i,i.version="3.7.2",t("./call_get.js")(i),t("./generators.js")(i,l,x,R,n,V),t("./map.js")(i,S,l,R,x,V),t("./nodeify.js")(i),t("./promisify.js")(i,x),t("./props.js")(i,S,R,l),t("./race.js")(i,x,R,l),t("./reduce.js")(i,S,l,R,x,V),t("./settle.js")(i,S,V),t("./some.js")(i,S,l),t("./timers.js")(i,x,V),t("./using.js")(i,l,R,A,x,V),t("./any.js")(i),t("./each.js")(i,x),t("./filter.js")(i,x),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(x)),V.setBounds(C.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var r=this._promise=new e(n);t instanceof e&&(r._propagateFrom(t,3),t.suppressUnhandledRejections()),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function u(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(u,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var l=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(l,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!C.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,n){var r=h.getDataPropertyOrDefault(t,e+n,b);return r?i(r):!1}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new g("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=h.inheritedDataKeys(t),c=[],u=0;u<a.length;++u){var l=a[u],p=t[l],f=r===j?!0:j(l,p,t);"function"!=typeof p||i(p)||o(t,l,e)||!r(l,p,t,f)||c.push(l,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===f&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof l&&this!==u?this[l]:t,c=_(o,a);try{s.apply(i,d(arguments,c))}catch(p){o._rejectCallback(v(p),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var u=function(){return this}(),l=t;return"string"==typeof l&&(t=o),h.notEnumerableProp(c,"__isPromisified__",!0),c}function u(t,e,n,r,i){for(var o=new RegExp(k(e)+"$"),s=a(t,e,o,n),c=0,u=s.length;u>c;c+=2){var l=s[c],p=s[c+1],_=l+e;if(r===E)t[_]=E(l,f,l,p,e,i);else{var d=r(p,function(){return E(l,f,l,p,e,i)});h.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return h.toFastProperties(t),t}function l(t,e,n){return E(t,e,void 0,t,null,n)}var p,f={},h=t("./util"),_=t("./nodeback"),d=h.withAppended,v=h.maybeWrapAsError,y=h.canEvaluate,g=t("./errors").TypeError,m="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},k=function(t){return t.replace(/([$])/,"\\$")},E=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?f:e.context,o=!!e.multiArgs,s=l(t,n,o);return h.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=m);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=E),!h.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=h.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&h.isClass(c)&&(u(c.prototype,r,i,o,n),u(c,r,i,o,n))}return u(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=l.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=r(t);return u(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),u=c.isObject,l=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),f=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=f(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(t=s.asArray(t),null===t)return i("expecting an array or an iterable object but got "+s.classString(t));var u=new e(n);void 0!==o&&u._propagateFrom(o,3);for(var l=u._fulfill,p=u._reject,f=0,h=t.length;h>f;++f){var _=t[f];(void 0!==_||f in t)&&e.cast(_)._then(l,p,void 0,u,null)}return u}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=e._getContext();this._fn=f.contextBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function u(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function l(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=h(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var f=t("./util"),h=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n;for(var o=r;i>o;++o){var s=t[o];s instanceof e&&s.suppressUnhandledRejections()}if(!n.isRejected())for(;i>r;++r){var a={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(l,void 0,void 0,a,void 0),0===(127&r)&&n._setNoAsyncGuarantee()}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return u(this,t,e,null)},e.reduce=function(t,e,n,r){return u(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){
+var u=s.resolve();r=function(t){u.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o;e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.allSettled=function(t){return new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,u=s.isArray,l={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=u(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(l(t)){if(t instanceof e)return t;var i=o(t);if(i===u){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return u.e=e,u}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),l=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,f=c.tryCatch(r).call(t,o,s);return p=!1,a&&f===u&&(a._rejectCallback(f.e,!0,!0),a=null),l}var c=t("./util"),u=c.errorObj,l=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(u,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return l(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function u(t,n){function i(){if(s>=u)return l._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,u=t.length,l=new e(o);return i(),l}function l(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function f(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function h(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,g=_.tryCatch,m={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},l.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==m?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,l),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},h.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new h(t),p=0;t>p;++p){var d=o[p];if(l.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var m=r(d);m instanceof e&&(d=m._then(f,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=g(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return u(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return T.e=e,T}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function u(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function l(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return V.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{l(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{F.defineProperty(e,o,F.getDescriptor(t,o))}catch(s){}}}function j(t){return N?process.env[t]:void 0}function k(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"===w(t))return Promise}catch(e){}}function E(t,e){if(null===t||"function"!=typeof e||e===U)return e;null!==t.domain&&(e=t.domain.bind(e));var n=t.async;if(null!==n){var r=e;e=function(){var t=new Array(2).concat([].slice.call(arguments));return t[0]=r,t[1]=this,n.runInAsyncScope.apply(n,t)}}return e}var F=t("./es5"),x="undefined"==typeof navigator,T={e:{}},P,R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,S=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(s){return r}for(var a=0;a<o.length;++a){var c=o[a];if(!i[c]){i[c]=!0;var u=Object.getOwnPropertyDescriptor(t,c);null!=u&&null==u.get&&null==u.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,V=/^[a-z$_][a-z$_0-9]*$/i,H=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),D=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var I="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};D=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?I(t):null}}var L="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),N="undefined"!=typeof process&&"undefined"!=typeof process.env,U,B={setReflectHandler:function(t){U=t},isClass:f,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:u,thrower:p,isArray:F.isArray,asArray:D,notEnumerableProp:l,isPrimitive:o,isObject:s,isError:y,canEvaluate:x,errorObj:T,tryCatch:i,inherits:S,withAppended:c,maybeWrapAsError:a,toFastProperties:h,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:H,originatesFromRejection:m,markAsOriginatingFromRejection:g,classString:w,copyDescriptors:C,isNode:L,hasEnvVariables:N,env:j,global:R,getNativePromise:k,contextBind:E};B.isRecentNode=B.isNode&&function(){var t;return process.versions&&process.versions.node?t=process.versions.node.split(".").map(Number):process.version&&(t=process.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),B.nodeSupportsAsyncResource=B.isNode&&function(){var e=!1;try{var n=t("async_hooks").AsyncResource;e="function"==typeof n.prototype.runInAsyncScope}catch(r){e=!1}return e}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(M){B.lastLineError=M}e.exports=B},{"./es5":13,async_hooks:void 0}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/node_modules/bluebird/js/release/any.js b/node_modules/bluebird/js/release/any.js
new file mode 100644
index 0000000..05a6228
--- /dev/null
+++ b/node_modules/bluebird/js/release/any.js
@@ -0,0 +1,21 @@
+"use strict";
+module.exports = function(Promise) {
+var SomePromiseArray = Promise._SomePromiseArray;
+function any(promises) {
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(1);
+ ret.setUnwrap();
+ ret.init();
+ return promise;
+}
+
+Promise.any = function (promises) {
+ return any(promises);
+};
+
+Promise.prototype.any = function () {
+ return any(this);
+};
+
+};
diff --git a/node_modules/bluebird/js/release/assert.js b/node_modules/bluebird/js/release/assert.js
new file mode 100644
index 0000000..4518231
--- /dev/null
+++ b/node_modules/bluebird/js/release/assert.js
@@ -0,0 +1,55 @@
+"use strict";
+module.exports = (function(){
+var AssertionError = (function() {
+ function AssertionError(a) {
+ this.constructor$(a);
+ this.message = a;
+ this.name = "AssertionError";
+ }
+ AssertionError.prototype = new Error();
+ AssertionError.prototype.constructor = AssertionError;
+ AssertionError.prototype.constructor$ = Error;
+ return AssertionError;
+})();
+
+function getParams(args) {
+ var params = [];
+ for (var i = 0; i < args.length; ++i) params.push("arg" + i);
+ return params;
+}
+
+function nativeAssert(callName, args, expect) {
+ try {
+ var params = getParams(args);
+ var constructorArgs = params;
+ constructorArgs.push("return " +
+ callName + "("+ params.join(",") + ");");
+ var fn = Function.apply(null, constructorArgs);
+ return fn.apply(null, args);
+ } catch (e) {
+ if (!(e instanceof SyntaxError)) {
+ throw e;
+ } else {
+ return expect;
+ }
+ }
+}
+
+return function assert(boolExpr, message) {
+ if (boolExpr === true) return;
+
+ if (typeof boolExpr === "string" &&
+ boolExpr.charAt(0) === "%") {
+ var nativeCallName = boolExpr;
+ var $_len = arguments.length;var args = new Array(Math.max($_len - 2, 0)); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];};
+ if (nativeAssert(nativeCallName, args, message) === message) return;
+ message = (nativeCallName + " !== " + message);
+ }
+
+ var ret = new AssertionError(message);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(ret, assert);
+ }
+ throw ret;
+};
+})();
diff --git a/node_modules/bluebird/js/release/async.js b/node_modules/bluebird/js/release/async.js
new file mode 100644
index 0000000..8eab6f8
--- /dev/null
+++ b/node_modules/bluebird/js/release/async.js
@@ -0,0 +1,120 @@
+"use strict";
+var firstLineError;
+try {throw new Error(); } catch (e) {firstLineError = e;}
+var schedule = require("./schedule");
+var Queue = require("./queue");
+
+function Async() {
+ this._customScheduler = false;
+ this._isTickUsed = false;
+ this._lateQueue = new Queue(16);
+ this._normalQueue = new Queue(16);
+ this._haveDrainedQueues = false;
+ var self = this;
+ this.drainQueues = function () {
+ self._drainQueues();
+ };
+ this._schedule = schedule;
+}
+
+Async.prototype.setScheduler = function(fn) {
+ var prev = this._schedule;
+ this._schedule = fn;
+ this._customScheduler = true;
+ return prev;
+};
+
+Async.prototype.hasCustomScheduler = function() {
+ return this._customScheduler;
+};
+
+Async.prototype.haveItemsQueued = function () {
+ return this._isTickUsed || this._haveDrainedQueues;
+};
+
+
+Async.prototype.fatalError = function(e, isNode) {
+ if (isNode) {
+ process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
+ "\n");
+ process.exit(2);
+ } else {
+ this.throwLater(e);
+ }
+};
+
+Async.prototype.throwLater = function(fn, arg) {
+ if (arguments.length === 1) {
+ arg = fn;
+ fn = function () { throw arg; };
+ }
+ if (typeof setTimeout !== "undefined") {
+ setTimeout(function() {
+ fn(arg);
+ }, 0);
+ } else try {
+ this._schedule(function() {
+ fn(arg);
+ });
+ } catch (e) {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+};
+
+function AsyncInvokeLater(fn, receiver, arg) {
+ this._lateQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncInvoke(fn, receiver, arg) {
+ this._normalQueue.push(fn, receiver, arg);
+ this._queueTick();
+}
+
+function AsyncSettlePromises(promise) {
+ this._normalQueue._pushOne(promise);
+ this._queueTick();
+}
+
+Async.prototype.invokeLater = AsyncInvokeLater;
+Async.prototype.invoke = AsyncInvoke;
+Async.prototype.settlePromises = AsyncSettlePromises;
+
+
+function _drainQueue(queue) {
+ while (queue.length() > 0) {
+ _drainQueueStep(queue);
+ }
+}
+
+function _drainQueueStep(queue) {
+ var fn = queue.shift();
+ if (typeof fn !== "function") {
+ fn._settlePromises();
+ } else {
+ var receiver = queue.shift();
+ var arg = queue.shift();
+ fn.call(receiver, arg);
+ }
+}
+
+Async.prototype._drainQueues = function () {
+ _drainQueue(this._normalQueue);
+ this._reset();
+ this._haveDrainedQueues = true;
+ _drainQueue(this._lateQueue);
+};
+
+Async.prototype._queueTick = function () {
+ if (!this._isTickUsed) {
+ this._isTickUsed = true;
+ this._schedule(this.drainQueues);
+ }
+};
+
+Async.prototype._reset = function () {
+ this._isTickUsed = false;
+};
+
+module.exports = Async;
+module.exports.firstLineError = firstLineError;
diff --git a/node_modules/bluebird/js/release/bind.js b/node_modules/bluebird/js/release/bind.js
new file mode 100644
index 0000000..fc3379d
--- /dev/null
+++ b/node_modules/bluebird/js/release/bind.js
@@ -0,0 +1,67 @@
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
+var calledBind = false;
+var rejectThis = function(_, e) {
+ this._reject(e);
+};
+
+var targetRejected = function(e, context) {
+ context.promiseRejectionQueued = true;
+ context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
+};
+
+var bindingResolved = function(thisArg, context) {
+ if (((this._bitField & 50397184) === 0)) {
+ this._resolveCallback(context.target);
+ }
+};
+
+var bindingRejected = function(e, context) {
+ if (!context.promiseRejectionQueued) this._reject(e);
+};
+
+Promise.prototype.bind = function (thisArg) {
+ if (!calledBind) {
+ calledBind = true;
+ Promise.prototype._propagateFrom = debug.propagateFromFunction();
+ Promise.prototype._boundValue = debug.boundValueFunction();
+ }
+ var maybePromise = tryConvertToPromise(thisArg);
+ var ret = new Promise(INTERNAL);
+ ret._propagateFrom(this, 1);
+ var target = this._target();
+ ret._setBoundTo(maybePromise);
+ if (maybePromise instanceof Promise) {
+ var context = {
+ promiseRejectionQueued: false,
+ promise: ret,
+ target: target,
+ bindingPromise: maybePromise
+ };
+ target._then(INTERNAL, targetRejected, undefined, ret, context);
+ maybePromise._then(
+ bindingResolved, bindingRejected, undefined, ret, context);
+ ret._setOnCancel(maybePromise);
+ } else {
+ ret._resolveCallback(target);
+ }
+ return ret;
+};
+
+Promise.prototype._setBoundTo = function (obj) {
+ if (obj !== undefined) {
+ this._bitField = this._bitField | 2097152;
+ this._boundTo = obj;
+ } else {
+ this._bitField = this._bitField & (~2097152);
+ }
+};
+
+Promise.prototype._isBound = function () {
+ return (this._bitField & 2097152) === 2097152;
+};
+
+Promise.bind = function (thisArg, value) {
+ return Promise.resolve(value).bind(thisArg);
+};
+};
diff --git a/node_modules/bluebird/js/release/bluebird.js b/node_modules/bluebird/js/release/bluebird.js
new file mode 100644
index 0000000..1c36cf3
--- /dev/null
+++ b/node_modules/bluebird/js/release/bluebird.js
@@ -0,0 +1,11 @@
+"use strict";
+var old;
+if (typeof Promise !== "undefined") old = Promise;
+function noConflict() {
+ try { if (Promise === bluebird) Promise = old; }
+ catch (e) {}
+ return bluebird;
+}
+var bluebird = require("./promise")();
+bluebird.noConflict = noConflict;
+module.exports = bluebird;
diff --git a/node_modules/bluebird/js/release/call_get.js b/node_modules/bluebird/js/release/call_get.js
new file mode 100644
index 0000000..0ed7714
--- /dev/null
+++ b/node_modules/bluebird/js/release/call_get.js
@@ -0,0 +1,123 @@
+"use strict";
+var cr = Object.create;
+if (cr) {
+ var callerCache = cr(null);
+ var getterCache = cr(null);
+ callerCache[" size"] = getterCache[" size"] = 0;
+}
+
+module.exports = function(Promise) {
+var util = require("./util");
+var canEvaluate = util.canEvaluate;
+var isIdentifier = util.isIdentifier;
+
+var getMethodCaller;
+var getGetter;
+if (!false) {
+var makeMethodCaller = function (methodName) {
+ return new Function("ensureMethod", " \n\
+ return function(obj) { \n\
+ 'use strict' \n\
+ var len = this.length; \n\
+ ensureMethod(obj, 'methodName'); \n\
+ switch(len) { \n\
+ case 1: return obj.methodName(this[0]); \n\
+ case 2: return obj.methodName(this[0], this[1]); \n\
+ case 3: return obj.methodName(this[0], this[1], this[2]); \n\
+ case 0: return obj.methodName(); \n\
+ default: \n\
+ return obj.methodName.apply(obj, this); \n\
+ } \n\
+ }; \n\
+ ".replace(/methodName/g, methodName))(ensureMethod);
+};
+
+var makeGetter = function (propertyName) {
+ return new Function("obj", " \n\
+ 'use strict'; \n\
+ return obj.propertyName; \n\
+ ".replace("propertyName", propertyName));
+};
+
+var getCompiled = function(name, compiler, cache) {
+ var ret = cache[name];
+ if (typeof ret !== "function") {
+ if (!isIdentifier(name)) {
+ return null;
+ }
+ ret = compiler(name);
+ cache[name] = ret;
+ cache[" size"]++;
+ if (cache[" size"] > 512) {
+ var keys = Object.keys(cache);
+ for (var i = 0; i < 256; ++i) delete cache[keys[i]];
+ cache[" size"] = keys.length - 256;
+ }
+ }
+ return ret;
+};
+
+getMethodCaller = function(name) {
+ return getCompiled(name, makeMethodCaller, callerCache);
+};
+
+getGetter = function(name) {
+ return getCompiled(name, makeGetter, getterCache);
+};
+}
+
+function ensureMethod(obj, methodName) {
+ var fn;
+ if (obj != null) fn = obj[methodName];
+ if (typeof fn !== "function") {
+ var message = "Object " + util.classString(obj) + " has no method '" +
+ util.toString(methodName) + "'";
+ throw new Promise.TypeError(message);
+ }
+ return fn;
+}
+
+function caller(obj) {
+ var methodName = this.pop();
+ var fn = ensureMethod(obj, methodName);
+ return fn.apply(obj, this);
+}
+Promise.prototype.call = function (methodName) {
+ var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};
+ if (!false) {
+ if (canEvaluate) {
+ var maybeCaller = getMethodCaller(methodName);
+ if (maybeCaller !== null) {
+ return this._then(
+ maybeCaller, undefined, undefined, args, undefined);
+ }
+ }
+ }
+ args.push(methodName);
+ return this._then(caller, undefined, undefined, args, undefined);
+};
+
+function namedGetter(obj) {
+ return obj[this];
+}
+function indexedGetter(obj) {
+ var index = +this;
+ if (index < 0) index = Math.max(0, index + obj.length);
+ return obj[index];
+}
+Promise.prototype.get = function (propertyName) {
+ var isIndex = (typeof propertyName === "number");
+ var getter;
+ if (!isIndex) {
+ if (canEvaluate) {
+ var maybeGetter = getGetter(propertyName);
+ getter = maybeGetter !== null ? maybeGetter : namedGetter;
+ } else {
+ getter = namedGetter;
+ }
+ } else {
+ getter = indexedGetter;
+ }
+ return this._then(getter, undefined, undefined, propertyName, undefined);
+};
+};
diff --git a/node_modules/bluebird/js/release/cancel.js b/node_modules/bluebird/js/release/cancel.js
new file mode 100644
index 0000000..7a12415
--- /dev/null
+++ b/node_modules/bluebird/js/release/cancel.js
@@ -0,0 +1,129 @@
+"use strict";
+module.exports = function(Promise, PromiseArray, apiRejection, debug) {
+var util = require("./util");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var async = Promise._async;
+
+Promise.prototype["break"] = Promise.prototype.cancel = function() {
+ if (!debug.cancellation()) return this._warn("cancellation is disabled");
+
+ var promise = this;
+ var child = promise;
+ while (promise._isCancellable()) {
+ if (!promise._cancelBy(child)) {
+ if (child._isFollowing()) {
+ child._followee().cancel();
+ } else {
+ child._cancelBranched();
+ }
+ break;
+ }
+
+ var parent = promise._cancellationParent;
+ if (parent == null || !parent._isCancellable()) {
+ if (promise._isFollowing()) {
+ promise._followee().cancel();
+ } else {
+ promise._cancelBranched();
+ }
+ break;
+ } else {
+ if (promise._isFollowing()) promise._followee().cancel();
+ promise._setWillBeCancelled();
+ child = promise;
+ promise = parent;
+ }
+ }
+};
+
+Promise.prototype._branchHasCancelled = function() {
+ this._branchesRemainingToCancel--;
+};
+
+Promise.prototype._enoughBranchesHaveCancelled = function() {
+ return this._branchesRemainingToCancel === undefined ||
+ this._branchesRemainingToCancel <= 0;
+};
+
+Promise.prototype._cancelBy = function(canceller) {
+ if (canceller === this) {
+ this._branchesRemainingToCancel = 0;
+ this._invokeOnCancel();
+ return true;
+ } else {
+ this._branchHasCancelled();
+ if (this._enoughBranchesHaveCancelled()) {
+ this._invokeOnCancel();
+ return true;
+ }
+ }
+ return false;
+};
+
+Promise.prototype._cancelBranched = function() {
+ if (this._enoughBranchesHaveCancelled()) {
+ this._cancel();
+ }
+};
+
+Promise.prototype._cancel = function() {
+ if (!this._isCancellable()) return;
+ this._setCancelled();
+ async.invoke(this._cancelPromises, this, undefined);
+};
+
+Promise.prototype._cancelPromises = function() {
+ if (this._length() > 0) this._settlePromises();
+};
+
+Promise.prototype._unsetOnCancel = function() {
+ this._onCancelField = undefined;
+};
+
+Promise.prototype._isCancellable = function() {
+ return this.isPending() && !this._isCancelled();
+};
+
+Promise.prototype.isCancellable = function() {
+ return this.isPending() && !this.isCancelled();
+};
+
+Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
+ if (util.isArray(onCancelCallback)) {
+ for (var i = 0; i < onCancelCallback.length; ++i) {
+ this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
+ }
+ } else if (onCancelCallback !== undefined) {
+ if (typeof onCancelCallback === "function") {
+ if (!internalOnly) {
+ var e = tryCatch(onCancelCallback).call(this._boundValue());
+ if (e === errorObj) {
+ this._attachExtraTrace(e.e);
+ async.throwLater(e.e);
+ }
+ }
+ } else {
+ onCancelCallback._resultCancelled(this);
+ }
+ }
+};
+
+Promise.prototype._invokeOnCancel = function() {
+ var onCancelCallback = this._onCancel();
+ this._unsetOnCancel();
+ async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
+};
+
+Promise.prototype._invokeInternalOnCancel = function() {
+ if (this._isCancellable()) {
+ this._doInvokeOnCancel(this._onCancel(), true);
+ this._unsetOnCancel();
+ }
+};
+
+Promise.prototype._resultCancelled = function() {
+ this.cancel();
+};
+
+};
diff --git a/node_modules/bluebird/js/release/catch_filter.js b/node_modules/bluebird/js/release/catch_filter.js
new file mode 100644
index 0000000..0f24ce2
--- /dev/null
+++ b/node_modules/bluebird/js/release/catch_filter.js
@@ -0,0 +1,42 @@
+"use strict";
+module.exports = function(NEXT_FILTER) {
+var util = require("./util");
+var getKeys = require("./es5").keys;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function catchFilter(instances, cb, promise) {
+ return function(e) {
+ var boundTo = promise._boundValue();
+ predicateLoop: for (var i = 0; i < instances.length; ++i) {
+ var item = instances[i];
+
+ if (item === Error ||
+ (item != null && item.prototype instanceof Error)) {
+ if (e instanceof item) {
+ return tryCatch(cb).call(boundTo, e);
+ }
+ } else if (typeof item === "function") {
+ var matchesPredicate = tryCatch(item).call(boundTo, e);
+ if (matchesPredicate === errorObj) {
+ return matchesPredicate;
+ } else if (matchesPredicate) {
+ return tryCatch(cb).call(boundTo, e);
+ }
+ } else if (util.isObject(e)) {
+ var keys = getKeys(item);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ if (item[key] != e[key]) {
+ continue predicateLoop;
+ }
+ }
+ return tryCatch(cb).call(boundTo, e);
+ }
+ }
+ return NEXT_FILTER;
+ };
+}
+
+return catchFilter;
+};
diff --git a/node_modules/bluebird/js/release/context.js b/node_modules/bluebird/js/release/context.js
new file mode 100644
index 0000000..c307414
--- /dev/null
+++ b/node_modules/bluebird/js/release/context.js
@@ -0,0 +1,69 @@
+"use strict";
+module.exports = function(Promise) {
+var longStackTraces = false;
+var contextStack = [];
+
+Promise.prototype._promiseCreated = function() {};
+Promise.prototype._pushContext = function() {};
+Promise.prototype._popContext = function() {return null;};
+Promise._peekContext = Promise.prototype._peekContext = function() {};
+
+function Context() {
+ this._trace = new Context.CapturedTrace(peekContext());
+}
+Context.prototype._pushContext = function () {
+ if (this._trace !== undefined) {
+ this._trace._promiseCreated = null;
+ contextStack.push(this._trace);
+ }
+};
+
+Context.prototype._popContext = function () {
+ if (this._trace !== undefined) {
+ var trace = contextStack.pop();
+ var ret = trace._promiseCreated;
+ trace._promiseCreated = null;
+ return ret;
+ }
+ return null;
+};
+
+function createContext() {
+ if (longStackTraces) return new Context();
+}
+
+function peekContext() {
+ var lastIndex = contextStack.length - 1;
+ if (lastIndex >= 0) {
+ return contextStack[lastIndex];
+ }
+ return undefined;
+}
+Context.CapturedTrace = null;
+Context.create = createContext;
+Context.deactivateLongStackTraces = function() {};
+Context.activateLongStackTraces = function() {
+ var Promise_pushContext = Promise.prototype._pushContext;
+ var Promise_popContext = Promise.prototype._popContext;
+ var Promise_PeekContext = Promise._peekContext;
+ var Promise_peekContext = Promise.prototype._peekContext;
+ var Promise_promiseCreated = Promise.prototype._promiseCreated;
+ Context.deactivateLongStackTraces = function() {
+ Promise.prototype._pushContext = Promise_pushContext;
+ Promise.prototype._popContext = Promise_popContext;
+ Promise._peekContext = Promise_PeekContext;
+ Promise.prototype._peekContext = Promise_peekContext;
+ Promise.prototype._promiseCreated = Promise_promiseCreated;
+ longStackTraces = false;
+ };
+ longStackTraces = true;
+ Promise.prototype._pushContext = Context.prototype._pushContext;
+ Promise.prototype._popContext = Context.prototype._popContext;
+ Promise._peekContext = Promise.prototype._peekContext = peekContext;
+ Promise.prototype._promiseCreated = function() {
+ var ctx = this._peekContext();
+ if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
+ };
+};
+return Context;
+};
diff --git a/node_modules/bluebird/js/release/debuggability.js b/node_modules/bluebird/js/release/debuggability.js
new file mode 100644
index 0000000..ce997ee
--- /dev/null
+++ b/node_modules/bluebird/js/release/debuggability.js
@@ -0,0 +1,1009 @@
+"use strict";
+module.exports = function(Promise, Context,
+ enableAsyncHooks, disableAsyncHooks) {
+var async = Promise._async;
+var Warning = require("./errors").Warning;
+var util = require("./util");
+var es5 = require("./es5");
+var canAttachTrace = util.canAttachTrace;
+var unhandledRejectionHandled;
+var possiblyUnhandledRejection;
+var bluebirdFramePattern =
+ /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
+var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
+var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
+var stackFramePattern = null;
+var formatStack = null;
+var indentStackFrames = false;
+var printWarning;
+var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
+ (false ||
+ util.env("BLUEBIRD_DEBUG") ||
+ util.env("NODE_ENV") === "development"));
+
+var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
+ (debugging || util.env("BLUEBIRD_WARNINGS")));
+
+var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
+ (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
+
+var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
+ (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
+
+var deferUnhandledRejectionCheck;
+(function() {
+ var promises = [];
+
+ function unhandledRejectionCheck() {
+ for (var i = 0; i < promises.length; ++i) {
+ promises[i]._notifyUnhandledRejection();
+ }
+ unhandledRejectionClear();
+ }
+
+ function unhandledRejectionClear() {
+ promises.length = 0;
+ }
+
+ deferUnhandledRejectionCheck = function(promise) {
+ promises.push(promise);
+ setTimeout(unhandledRejectionCheck, 1);
+ };
+
+ es5.defineProperty(Promise, "_unhandledRejectionCheck", {
+ value: unhandledRejectionCheck
+ });
+ es5.defineProperty(Promise, "_unhandledRejectionClear", {
+ value: unhandledRejectionClear
+ });
+})();
+
+Promise.prototype.suppressUnhandledRejections = function() {
+ var target = this._target();
+ target._bitField = ((target._bitField & (~1048576)) |
+ 524288);
+};
+
+Promise.prototype._ensurePossibleRejectionHandled = function () {
+ if ((this._bitField & 524288) !== 0) return;
+ this._setRejectionIsUnhandled();
+ deferUnhandledRejectionCheck(this);
+};
+
+Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
+ fireRejectionEvent("rejectionHandled",
+ unhandledRejectionHandled, undefined, this);
+};
+
+Promise.prototype._setReturnedNonUndefined = function() {
+ this._bitField = this._bitField | 268435456;
+};
+
+Promise.prototype._returnedNonUndefined = function() {
+ return (this._bitField & 268435456) !== 0;
+};
+
+Promise.prototype._notifyUnhandledRejection = function () {
+ if (this._isRejectionUnhandled()) {
+ var reason = this._settledValue();
+ this._setUnhandledRejectionIsNotified();
+ fireRejectionEvent("unhandledRejection",
+ possiblyUnhandledRejection, reason, this);
+ }
+};
+
+Promise.prototype._setUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField | 262144;
+};
+
+Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
+ this._bitField = this._bitField & (~262144);
+};
+
+Promise.prototype._isUnhandledRejectionNotified = function () {
+ return (this._bitField & 262144) > 0;
+};
+
+Promise.prototype._setRejectionIsUnhandled = function () {
+ this._bitField = this._bitField | 1048576;
+};
+
+Promise.prototype._unsetRejectionIsUnhandled = function () {
+ this._bitField = this._bitField & (~1048576);
+ if (this._isUnhandledRejectionNotified()) {
+ this._unsetUnhandledRejectionIsNotified();
+ this._notifyUnhandledRejectionIsHandled();
+ }
+};
+
+Promise.prototype._isRejectionUnhandled = function () {
+ return (this._bitField & 1048576) > 0;
+};
+
+Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
+ return warn(message, shouldUseOwnTrace, promise || this);
+};
+
+Promise.onPossiblyUnhandledRejection = function (fn) {
+ var context = Promise._getContext();
+ possiblyUnhandledRejection = util.contextBind(context, fn);
+};
+
+Promise.onUnhandledRejectionHandled = function (fn) {
+ var context = Promise._getContext();
+ unhandledRejectionHandled = util.contextBind(context, fn);
+};
+
+var disableLongStackTraces = function() {};
+Promise.longStackTraces = function () {
+ if (async.haveItemsQueued() && !config.longStackTraces) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ if (!config.longStackTraces && longStackTracesIsSupported()) {
+ var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
+ var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
+ var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
+ config.longStackTraces = true;
+ disableLongStackTraces = function() {
+ if (async.haveItemsQueued() && !config.longStackTraces) {
+ throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ Promise.prototype._captureStackTrace = Promise_captureStackTrace;
+ Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
+ Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
+ Context.deactivateLongStackTraces();
+ config.longStackTraces = false;
+ };
+ Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
+ Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
+ Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
+ Context.activateLongStackTraces();
+ }
+};
+
+Promise.hasLongStackTraces = function () {
+ return config.longStackTraces && longStackTracesIsSupported();
+};
+
+
+var legacyHandlers = {
+ unhandledrejection: {
+ before: function() {
+ var ret = util.global.onunhandledrejection;
+ util.global.onunhandledrejection = null;
+ return ret;
+ },
+ after: function(fn) {
+ util.global.onunhandledrejection = fn;
+ }
+ },
+ rejectionhandled: {
+ before: function() {
+ var ret = util.global.onrejectionhandled;
+ util.global.onrejectionhandled = null;
+ return ret;
+ },
+ after: function(fn) {
+ util.global.onrejectionhandled = fn;
+ }
+ }
+};
+
+var fireDomEvent = (function() {
+ var dispatch = function(legacy, e) {
+ if (legacy) {
+ var fn;
+ try {
+ fn = legacy.before();
+ return !util.global.dispatchEvent(e);
+ } finally {
+ legacy.after(fn);
+ }
+ } else {
+ return !util.global.dispatchEvent(e);
+ }
+ };
+ try {
+ if (typeof CustomEvent === "function") {
+ var event = new CustomEvent("CustomEvent");
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var eventData = {
+ detail: event,
+ cancelable: true
+ };
+ var domEvent = new CustomEvent(name, eventData);
+ es5.defineProperty(
+ domEvent, "promise", {value: event.promise});
+ es5.defineProperty(
+ domEvent, "reason", {value: event.reason});
+
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ } else if (typeof Event === "function") {
+ var event = new Event("CustomEvent");
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var domEvent = new Event(name, {
+ cancelable: true
+ });
+ domEvent.detail = event;
+ es5.defineProperty(domEvent, "promise", {value: event.promise});
+ es5.defineProperty(domEvent, "reason", {value: event.reason});
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ } else {
+ var event = document.createEvent("CustomEvent");
+ event.initCustomEvent("testingtheevent", false, true, {});
+ util.global.dispatchEvent(event);
+ return function(name, event) {
+ name = name.toLowerCase();
+ var domEvent = document.createEvent("CustomEvent");
+ domEvent.initCustomEvent(name, false, true,
+ event);
+ return dispatch(legacyHandlers[name], domEvent);
+ };
+ }
+ } catch (e) {}
+ return function() {
+ return false;
+ };
+})();
+
+var fireGlobalEvent = (function() {
+ if (util.isNode) {
+ return function() {
+ return process.emit.apply(process, arguments);
+ };
+ } else {
+ if (!util.global) {
+ return function() {
+ return false;
+ };
+ }
+ return function(name) {
+ var methodName = "on" + name.toLowerCase();
+ var method = util.global[methodName];
+ if (!method) return false;
+ method.apply(util.global, [].slice.call(arguments, 1));
+ return true;
+ };
+ }
+})();
+
+function generatePromiseLifecycleEventObject(name, promise) {
+ return {promise: promise};
+}
+
+var eventToObjectGenerator = {
+ promiseCreated: generatePromiseLifecycleEventObject,
+ promiseFulfilled: generatePromiseLifecycleEventObject,
+ promiseRejected: generatePromiseLifecycleEventObject,
+ promiseResolved: generatePromiseLifecycleEventObject,
+ promiseCancelled: generatePromiseLifecycleEventObject,
+ promiseChained: function(name, promise, child) {
+ return {promise: promise, child: child};
+ },
+ warning: function(name, warning) {
+ return {warning: warning};
+ },
+ unhandledRejection: function (name, reason, promise) {
+ return {reason: reason, promise: promise};
+ },
+ rejectionHandled: generatePromiseLifecycleEventObject
+};
+
+var activeFireEvent = function (name) {
+ var globalEventFired = false;
+ try {
+ globalEventFired = fireGlobalEvent.apply(null, arguments);
+ } catch (e) {
+ async.throwLater(e);
+ globalEventFired = true;
+ }
+
+ var domEventFired = false;
+ try {
+ domEventFired = fireDomEvent(name,
+ eventToObjectGenerator[name].apply(null, arguments));
+ } catch (e) {
+ async.throwLater(e);
+ domEventFired = true;
+ }
+
+ return domEventFired || globalEventFired;
+};
+
+Promise.config = function(opts) {
+ opts = Object(opts);
+ if ("longStackTraces" in opts) {
+ if (opts.longStackTraces) {
+ Promise.longStackTraces();
+ } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
+ disableLongStackTraces();
+ }
+ }
+ if ("warnings" in opts) {
+ var warningsOption = opts.warnings;
+ config.warnings = !!warningsOption;
+ wForgottenReturn = config.warnings;
+
+ if (util.isObject(warningsOption)) {
+ if ("wForgottenReturn" in warningsOption) {
+ wForgottenReturn = !!warningsOption.wForgottenReturn;
+ }
+ }
+ }
+ if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
+ if (async.haveItemsQueued()) {
+ throw new Error(
+ "cannot enable cancellation after promises are in use");
+ }
+ Promise.prototype._clearCancellationData =
+ cancellationClearCancellationData;
+ Promise.prototype._propagateFrom = cancellationPropagateFrom;
+ Promise.prototype._onCancel = cancellationOnCancel;
+ Promise.prototype._setOnCancel = cancellationSetOnCancel;
+ Promise.prototype._attachCancellationCallback =
+ cancellationAttachCancellationCallback;
+ Promise.prototype._execute = cancellationExecute;
+ propagateFromFunction = cancellationPropagateFrom;
+ config.cancellation = true;
+ }
+ if ("monitoring" in opts) {
+ if (opts.monitoring && !config.monitoring) {
+ config.monitoring = true;
+ Promise.prototype._fireEvent = activeFireEvent;
+ } else if (!opts.monitoring && config.monitoring) {
+ config.monitoring = false;
+ Promise.prototype._fireEvent = defaultFireEvent;
+ }
+ }
+ if ("asyncHooks" in opts && util.nodeSupportsAsyncResource) {
+ var prev = config.asyncHooks;
+ var cur = !!opts.asyncHooks;
+ if (prev !== cur) {
+ config.asyncHooks = cur;
+ if (cur) {
+ enableAsyncHooks();
+ } else {
+ disableAsyncHooks();
+ }
+ }
+ }
+ return Promise;
+};
+
+function defaultFireEvent() { return false; }
+
+Promise.prototype._fireEvent = defaultFireEvent;
+Promise.prototype._execute = function(executor, resolve, reject) {
+ try {
+ executor(resolve, reject);
+ } catch (e) {
+ return e;
+ }
+};
+Promise.prototype._onCancel = function () {};
+Promise.prototype._setOnCancel = function (handler) { ; };
+Promise.prototype._attachCancellationCallback = function(onCancel) {
+ ;
+};
+Promise.prototype._captureStackTrace = function () {};
+Promise.prototype._attachExtraTrace = function () {};
+Promise.prototype._dereferenceTrace = function () {};
+Promise.prototype._clearCancellationData = function() {};
+Promise.prototype._propagateFrom = function (parent, flags) {
+ ;
+ ;
+};
+
+function cancellationExecute(executor, resolve, reject) {
+ var promise = this;
+ try {
+ executor(resolve, reject, function(onCancel) {
+ if (typeof onCancel !== "function") {
+ throw new TypeError("onCancel must be a function, got: " +
+ util.toString(onCancel));
+ }
+ promise._attachCancellationCallback(onCancel);
+ });
+ } catch (e) {
+ return e;
+ }
+}
+
+function cancellationAttachCancellationCallback(onCancel) {
+ if (!this._isCancellable()) return this;
+
+ var previousOnCancel = this._onCancel();
+ if (previousOnCancel !== undefined) {
+ if (util.isArray(previousOnCancel)) {
+ previousOnCancel.push(onCancel);
+ } else {
+ this._setOnCancel([previousOnCancel, onCancel]);
+ }
+ } else {
+ this._setOnCancel(onCancel);
+ }
+}
+
+function cancellationOnCancel() {
+ return this._onCancelField;
+}
+
+function cancellationSetOnCancel(onCancel) {
+ this._onCancelField = onCancel;
+}
+
+function cancellationClearCancellationData() {
+ this._cancellationParent = undefined;
+ this._onCancelField = undefined;
+}
+
+function cancellationPropagateFrom(parent, flags) {
+ if ((flags & 1) !== 0) {
+ this._cancellationParent = parent;
+ var branchesRemainingToCancel = parent._branchesRemainingToCancel;
+ if (branchesRemainingToCancel === undefined) {
+ branchesRemainingToCancel = 0;
+ }
+ parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
+ }
+ if ((flags & 2) !== 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+}
+
+function bindingPropagateFrom(parent, flags) {
+ if ((flags & 2) !== 0 && parent._isBound()) {
+ this._setBoundTo(parent._boundTo);
+ }
+}
+var propagateFromFunction = bindingPropagateFrom;
+
+function boundValueFunction() {
+ var ret = this._boundTo;
+ if (ret !== undefined) {
+ if (ret instanceof Promise) {
+ if (ret.isFulfilled()) {
+ return ret.value();
+ } else {
+ return undefined;
+ }
+ }
+ }
+ return ret;
+}
+
+function longStackTracesCaptureStackTrace() {
+ this._trace = new CapturedTrace(this._peekContext());
+}
+
+function longStackTracesAttachExtraTrace(error, ignoreSelf) {
+ if (canAttachTrace(error)) {
+ var trace = this._trace;
+ if (trace !== undefined) {
+ if (ignoreSelf) trace = trace._parent;
+ }
+ if (trace !== undefined) {
+ trace.attachExtraTrace(error);
+ } else if (!error.__stackCleaned__) {
+ var parsed = parseStackAndMessage(error);
+ util.notEnumerableProp(error, "stack",
+ parsed.message + "\n" + parsed.stack.join("\n"));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+ }
+ }
+}
+
+function longStackTracesDereferenceTrace() {
+ this._trace = undefined;
+}
+
+function checkForgottenReturns(returnValue, promiseCreated, name, promise,
+ parent) {
+ if (returnValue === undefined && promiseCreated !== null &&
+ wForgottenReturn) {
+ if (parent !== undefined && parent._returnedNonUndefined()) return;
+ if ((promise._bitField & 65535) === 0) return;
+
+ if (name) name = name + " ";
+ var handlerLine = "";
+ var creatorLine = "";
+ if (promiseCreated._trace) {
+ var traceLines = promiseCreated._trace.stack.split("\n");
+ var stack = cleanStack(traceLines);
+ for (var i = stack.length - 1; i >= 0; --i) {
+ var line = stack[i];
+ if (!nodeFramePattern.test(line)) {
+ var lineMatches = line.match(parseLinePattern);
+ if (lineMatches) {
+ handlerLine = "at " + lineMatches[1] +
+ ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
+ }
+ break;
+ }
+ }
+
+ if (stack.length > 0) {
+ var firstUserLine = stack[0];
+ for (var i = 0; i < traceLines.length; ++i) {
+
+ if (traceLines[i] === firstUserLine) {
+ if (i > 0) {
+ creatorLine = "\n" + traceLines[i - 1];
+ }
+ break;
+ }
+ }
+
+ }
+ }
+ var msg = "a promise was created in a " + name +
+ "handler " + handlerLine + "but was not returned from it, " +
+ "see http://goo.gl/rRqMUw" +
+ creatorLine;
+ promise._warn(msg, true, promiseCreated);
+ }
+}
+
+function deprecated(name, replacement) {
+ var message = name +
+ " is deprecated and will be removed in a future version.";
+ if (replacement) message += " Use " + replacement + " instead.";
+ return warn(message);
+}
+
+function warn(message, shouldUseOwnTrace, promise) {
+ if (!config.warnings) return;
+ var warning = new Warning(message);
+ var ctx;
+ if (shouldUseOwnTrace) {
+ promise._attachExtraTrace(warning);
+ } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
+ ctx.attachExtraTrace(warning);
+ } else {
+ var parsed = parseStackAndMessage(warning);
+ warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
+ }
+
+ if (!activeFireEvent("warning", warning)) {
+ formatAndLogError(warning, "", true);
+ }
+}
+
+function reconstructStack(message, stacks) {
+ for (var i = 0; i < stacks.length - 1; ++i) {
+ stacks[i].push("From previous event:");
+ stacks[i] = stacks[i].join("\n");
+ }
+ if (i < stacks.length) {
+ stacks[i] = stacks[i].join("\n");
+ }
+ return message + "\n" + stacks.join("\n");
+}
+
+function removeDuplicateOrEmptyJumps(stacks) {
+ for (var i = 0; i < stacks.length; ++i) {
+ if (stacks[i].length === 0 ||
+ ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
+ stacks.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function removeCommonRoots(stacks) {
+ var current = stacks[0];
+ for (var i = 1; i < stacks.length; ++i) {
+ var prev = stacks[i];
+ var currentLastIndex = current.length - 1;
+ var currentLastLine = current[currentLastIndex];
+ var commonRootMeetPoint = -1;
+
+ for (var j = prev.length - 1; j >= 0; --j) {
+ if (prev[j] === currentLastLine) {
+ commonRootMeetPoint = j;
+ break;
+ }
+ }
+
+ for (var j = commonRootMeetPoint; j >= 0; --j) {
+ var line = prev[j];
+ if (current[currentLastIndex] === line) {
+ current.pop();
+ currentLastIndex--;
+ } else {
+ break;
+ }
+ }
+ current = prev;
+ }
+}
+
+function cleanStack(stack) {
+ var ret = [];
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ var isTraceLine = " (No stack trace)" === line ||
+ stackFramePattern.test(line);
+ var isInternalFrame = isTraceLine && shouldIgnore(line);
+ if (isTraceLine && !isInternalFrame) {
+ if (indentStackFrames && line.charAt(0) !== " ") {
+ line = " " + line;
+ }
+ ret.push(line);
+ }
+ }
+ return ret;
+}
+
+function stackFramesAsArray(error) {
+ var stack = error.stack.replace(/\s+$/g, "").split("\n");
+ for (var i = 0; i < stack.length; ++i) {
+ var line = stack[i];
+ if (" (No stack trace)" === line || stackFramePattern.test(line)) {
+ break;
+ }
+ }
+ if (i > 0 && error.name != "SyntaxError") {
+ stack = stack.slice(i);
+ }
+ return stack;
+}
+
+function parseStackAndMessage(error) {
+ var stack = error.stack;
+ var message = error.toString();
+ stack = typeof stack === "string" && stack.length > 0
+ ? stackFramesAsArray(error) : [" (No stack trace)"];
+ return {
+ message: message,
+ stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
+ };
+}
+
+function formatAndLogError(error, title, isSoft) {
+ if (typeof console !== "undefined") {
+ var message;
+ if (util.isObject(error)) {
+ var stack = error.stack;
+ message = title + formatStack(stack, error);
+ } else {
+ message = title + String(error);
+ }
+ if (typeof printWarning === "function") {
+ printWarning(message, isSoft);
+ } else if (typeof console.log === "function" ||
+ typeof console.log === "object") {
+ console.log(message);
+ }
+ }
+}
+
+function fireRejectionEvent(name, localHandler, reason, promise) {
+ var localEventFired = false;
+ try {
+ if (typeof localHandler === "function") {
+ localEventFired = true;
+ if (name === "rejectionHandled") {
+ localHandler(promise);
+ } else {
+ localHandler(reason, promise);
+ }
+ }
+ } catch (e) {
+ async.throwLater(e);
+ }
+
+ if (name === "unhandledRejection") {
+ if (!activeFireEvent(name, reason, promise) && !localEventFired) {
+ formatAndLogError(reason, "Unhandled rejection ");
+ }
+ } else {
+ activeFireEvent(name, promise);
+ }
+}
+
+function formatNonError(obj) {
+ var str;
+ if (typeof obj === "function") {
+ str = "[function " +
+ (obj.name || "anonymous") +
+ "]";
+ } else {
+ str = obj && typeof obj.toString === "function"
+ ? obj.toString() : util.toString(obj);
+ var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
+ if (ruselessToString.test(str)) {
+ try {
+ var newStr = JSON.stringify(obj);
+ str = newStr;
+ }
+ catch(e) {
+
+ }
+ }
+ if (str.length === 0) {
+ str = "(empty array)";
+ }
+ }
+ return ("(<" + snip(str) + ">, no stack trace)");
+}
+
+function snip(str) {
+ var maxChars = 41;
+ if (str.length < maxChars) {
+ return str;
+ }
+ return str.substr(0, maxChars - 3) + "...";
+}
+
+function longStackTracesIsSupported() {
+ return typeof captureStackTrace === "function";
+}
+
+var shouldIgnore = function() { return false; };
+var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
+function parseLineInfo(line) {
+ var matches = line.match(parseLineInfoRegex);
+ if (matches) {
+ return {
+ fileName: matches[1],
+ line: parseInt(matches[2], 10)
+ };
+ }
+}
+
+function setBounds(firstLineError, lastLineError) {
+ if (!longStackTracesIsSupported()) return;
+ var firstStackLines = (firstLineError.stack || "").split("\n");
+ var lastStackLines = (lastLineError.stack || "").split("\n");
+ var firstIndex = -1;
+ var lastIndex = -1;
+ var firstFileName;
+ var lastFileName;
+ for (var i = 0; i < firstStackLines.length; ++i) {
+ var result = parseLineInfo(firstStackLines[i]);
+ if (result) {
+ firstFileName = result.fileName;
+ firstIndex = result.line;
+ break;
+ }
+ }
+ for (var i = 0; i < lastStackLines.length; ++i) {
+ var result = parseLineInfo(lastStackLines[i]);
+ if (result) {
+ lastFileName = result.fileName;
+ lastIndex = result.line;
+ break;
+ }
+ }
+ if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
+ firstFileName !== lastFileName || firstIndex >= lastIndex) {
+ return;
+ }
+
+ shouldIgnore = function(line) {
+ if (bluebirdFramePattern.test(line)) return true;
+ var info = parseLineInfo(line);
+ if (info) {
+ if (info.fileName === firstFileName &&
+ (firstIndex <= info.line && info.line <= lastIndex)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+
+function CapturedTrace(parent) {
+ this._parent = parent;
+ this._promisesCreated = 0;
+ var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
+ captureStackTrace(this, CapturedTrace);
+ if (length > 32) this.uncycle();
+}
+util.inherits(CapturedTrace, Error);
+Context.CapturedTrace = CapturedTrace;
+
+CapturedTrace.prototype.uncycle = function() {
+ var length = this._length;
+ if (length < 2) return;
+ var nodes = [];
+ var stackToIndex = {};
+
+ for (var i = 0, node = this; node !== undefined; ++i) {
+ nodes.push(node);
+ node = node._parent;
+ }
+ length = this._length = i;
+ for (var i = length - 1; i >= 0; --i) {
+ var stack = nodes[i].stack;
+ if (stackToIndex[stack] === undefined) {
+ stackToIndex[stack] = i;
+ }
+ }
+ for (var i = 0; i < length; ++i) {
+ var currentStack = nodes[i].stack;
+ var index = stackToIndex[currentStack];
+ if (index !== undefined && index !== i) {
+ if (index > 0) {
+ nodes[index - 1]._parent = undefined;
+ nodes[index - 1]._length = 1;
+ }
+ nodes[i]._parent = undefined;
+ nodes[i]._length = 1;
+ var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
+
+ if (index < length - 1) {
+ cycleEdgeNode._parent = nodes[index + 1];
+ cycleEdgeNode._parent.uncycle();
+ cycleEdgeNode._length =
+ cycleEdgeNode._parent._length + 1;
+ } else {
+ cycleEdgeNode._parent = undefined;
+ cycleEdgeNode._length = 1;
+ }
+ var currentChildLength = cycleEdgeNode._length + 1;
+ for (var j = i - 2; j >= 0; --j) {
+ nodes[j]._length = currentChildLength;
+ currentChildLength++;
+ }
+ return;
+ }
+ }
+};
+
+CapturedTrace.prototype.attachExtraTrace = function(error) {
+ if (error.__stackCleaned__) return;
+ this.uncycle();
+ var parsed = parseStackAndMessage(error);
+ var message = parsed.message;
+ var stacks = [parsed.stack];
+
+ var trace = this;
+ while (trace !== undefined) {
+ stacks.push(cleanStack(trace.stack.split("\n")));
+ trace = trace._parent;
+ }
+ removeCommonRoots(stacks);
+ removeDuplicateOrEmptyJumps(stacks);
+ util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
+ util.notEnumerableProp(error, "__stackCleaned__", true);
+};
+
+var captureStackTrace = (function stackDetection() {
+ var v8stackFramePattern = /^\s*at\s*/;
+ var v8stackFormatter = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if (error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ if (typeof Error.stackTraceLimit === "number" &&
+ typeof Error.captureStackTrace === "function") {
+ Error.stackTraceLimit += 6;
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ var captureStackTrace = Error.captureStackTrace;
+
+ shouldIgnore = function(line) {
+ return bluebirdFramePattern.test(line);
+ };
+ return function(receiver, ignoreUntil) {
+ Error.stackTraceLimit += 6;
+ captureStackTrace(receiver, ignoreUntil);
+ Error.stackTraceLimit -= 6;
+ };
+ }
+ var err = new Error();
+
+ if (typeof err.stack === "string" &&
+ err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
+ stackFramePattern = /@/;
+ formatStack = v8stackFormatter;
+ indentStackFrames = true;
+ return function captureStackTrace(o) {
+ o.stack = new Error().stack;
+ };
+ }
+
+ var hasStackAfterThrow;
+ try { throw new Error(); }
+ catch(e) {
+ hasStackAfterThrow = ("stack" in e);
+ }
+ if (!("stack" in err) && hasStackAfterThrow &&
+ typeof Error.stackTraceLimit === "number") {
+ stackFramePattern = v8stackFramePattern;
+ formatStack = v8stackFormatter;
+ return function captureStackTrace(o) {
+ Error.stackTraceLimit += 6;
+ try { throw new Error(); }
+ catch(e) { o.stack = e.stack; }
+ Error.stackTraceLimit -= 6;
+ };
+ }
+
+ formatStack = function(stack, error) {
+ if (typeof stack === "string") return stack;
+
+ if ((typeof error === "object" ||
+ typeof error === "function") &&
+ error.name !== undefined &&
+ error.message !== undefined) {
+ return error.toString();
+ }
+ return formatNonError(error);
+ };
+
+ return null;
+
+})([]);
+
+if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
+ printWarning = function (message) {
+ console.warn(message);
+ };
+ if (util.isNode && process.stderr.isTTY) {
+ printWarning = function(message, isSoft) {
+ var color = isSoft ? "\u001b[33m" : "\u001b[31m";
+ console.warn(color + message + "\u001b[0m\n");
+ };
+ } else if (!util.isNode && typeof (new Error().stack) === "string") {
+ printWarning = function(message, isSoft) {
+ console.warn("%c" + message,
+ isSoft ? "color: darkorange" : "color: red");
+ };
+ }
+}
+
+var config = {
+ warnings: warnings,
+ longStackTraces: false,
+ cancellation: false,
+ monitoring: false,
+ asyncHooks: false
+};
+
+if (longStackTraces) Promise.longStackTraces();
+
+return {
+ asyncHooks: function() {
+ return config.asyncHooks;
+ },
+ longStackTraces: function() {
+ return config.longStackTraces;
+ },
+ warnings: function() {
+ return config.warnings;
+ },
+ cancellation: function() {
+ return config.cancellation;
+ },
+ monitoring: function() {
+ return config.monitoring;
+ },
+ propagateFromFunction: function() {
+ return propagateFromFunction;
+ },
+ boundValueFunction: function() {
+ return boundValueFunction;
+ },
+ checkForgottenReturns: checkForgottenReturns,
+ setBounds: setBounds,
+ warn: warn,
+ deprecated: deprecated,
+ CapturedTrace: CapturedTrace,
+ fireDomEvent: fireDomEvent,
+ fireGlobalEvent: fireGlobalEvent
+};
+};
diff --git a/node_modules/bluebird/js/release/direct_resolve.js b/node_modules/bluebird/js/release/direct_resolve.js
new file mode 100644
index 0000000..a890298
--- /dev/null
+++ b/node_modules/bluebird/js/release/direct_resolve.js
@@ -0,0 +1,46 @@
+"use strict";
+module.exports = function(Promise) {
+function returner() {
+ return this.value;
+}
+function thrower() {
+ throw this.reason;
+}
+
+Promise.prototype["return"] =
+Promise.prototype.thenReturn = function (value) {
+ if (value instanceof Promise) value.suppressUnhandledRejections();
+ return this._then(
+ returner, undefined, undefined, {value: value}, undefined);
+};
+
+Promise.prototype["throw"] =
+Promise.prototype.thenThrow = function (reason) {
+ return this._then(
+ thrower, undefined, undefined, {reason: reason}, undefined);
+};
+
+Promise.prototype.catchThrow = function (reason) {
+ if (arguments.length <= 1) {
+ return this._then(
+ undefined, thrower, undefined, {reason: reason}, undefined);
+ } else {
+ var _reason = arguments[1];
+ var handler = function() {throw _reason;};
+ return this.caught(reason, handler);
+ }
+};
+
+Promise.prototype.catchReturn = function (value) {
+ if (arguments.length <= 1) {
+ if (value instanceof Promise) value.suppressUnhandledRejections();
+ return this._then(
+ undefined, returner, undefined, {value: value}, undefined);
+ } else {
+ var _value = arguments[1];
+ if (_value instanceof Promise) _value.suppressUnhandledRejections();
+ var handler = function() {return _value;};
+ return this.caught(value, handler);
+ }
+};
+};
diff --git a/node_modules/bluebird/js/release/each.js b/node_modules/bluebird/js/release/each.js
new file mode 100644
index 0000000..e4f3d05
--- /dev/null
+++ b/node_modules/bluebird/js/release/each.js
@@ -0,0 +1,30 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseReduce = Promise.reduce;
+var PromiseAll = Promise.all;
+
+function promiseAllThis() {
+ return PromiseAll(this);
+}
+
+function PromiseMapSeries(promises, fn) {
+ return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
+}
+
+Promise.prototype.each = function (fn) {
+ return PromiseReduce(this, fn, INTERNAL, 0)
+ ._then(promiseAllThis, undefined, undefined, this, undefined);
+};
+
+Promise.prototype.mapSeries = function (fn) {
+ return PromiseReduce(this, fn, INTERNAL, INTERNAL);
+};
+
+Promise.each = function (promises, fn) {
+ return PromiseReduce(promises, fn, INTERNAL, 0)
+ ._then(promiseAllThis, undefined, undefined, promises, undefined);
+};
+
+Promise.mapSeries = PromiseMapSeries;
+};
+
diff --git a/node_modules/bluebird/js/release/errors.js b/node_modules/bluebird/js/release/errors.js
new file mode 100644
index 0000000..f62f323
--- /dev/null
+++ b/node_modules/bluebird/js/release/errors.js
@@ -0,0 +1,116 @@
+"use strict";
+var es5 = require("./es5");
+var Objectfreeze = es5.freeze;
+var util = require("./util");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+
+function subError(nameProperty, defaultMessage) {
+ function SubError(message) {
+ if (!(this instanceof SubError)) return new SubError(message);
+ notEnumerableProp(this, "message",
+ typeof message === "string" ? message : defaultMessage);
+ notEnumerableProp(this, "name", nameProperty);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ Error.call(this);
+ }
+ }
+ inherits(SubError, Error);
+ return SubError;
+}
+
+var _TypeError, _RangeError;
+var Warning = subError("Warning", "warning");
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+var AggregateError = subError("AggregateError", "aggregate error");
+try {
+ _TypeError = TypeError;
+ _RangeError = RangeError;
+} catch(e) {
+ _TypeError = subError("TypeError", "type error");
+ _RangeError = subError("RangeError", "range error");
+}
+
+var methods = ("join pop push shift unshift slice filter forEach some " +
+ "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
+
+for (var i = 0; i < methods.length; ++i) {
+ if (typeof Array.prototype[methods[i]] === "function") {
+ AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
+ }
+}
+
+es5.defineProperty(AggregateError.prototype, "length", {
+ value: 0,
+ configurable: false,
+ writable: true,
+ enumerable: true
+});
+AggregateError.prototype["isOperational"] = true;
+var level = 0;
+AggregateError.prototype.toString = function() {
+ var indent = Array(level * 4 + 1).join(" ");
+ var ret = "\n" + indent + "AggregateError of:" + "\n";
+ level++;
+ indent = Array(level * 4 + 1).join(" ");
+ for (var i = 0; i < this.length; ++i) {
+ var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
+ var lines = str.split("\n");
+ for (var j = 0; j < lines.length; ++j) {
+ lines[j] = indent + lines[j];
+ }
+ str = lines.join("\n");
+ ret += str + "\n";
+ }
+ level--;
+ return ret;
+};
+
+function OperationalError(message) {
+ if (!(this instanceof OperationalError))
+ return new OperationalError(message);
+ notEnumerableProp(this, "name", "OperationalError");
+ notEnumerableProp(this, "message", message);
+ this.cause = message;
+ this["isOperational"] = true;
+
+ if (message instanceof Error) {
+ notEnumerableProp(this, "message", message.message);
+ notEnumerableProp(this, "stack", message.stack);
+ } else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(OperationalError, Error);
+
+var errorTypes = Error["__BluebirdErrorTypes__"];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ OperationalError: OperationalError,
+ RejectionError: OperationalError,
+ AggregateError: AggregateError
+ });
+ es5.defineProperty(Error, "__BluebirdErrorTypes__", {
+ value: errorTypes,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: _TypeError,
+ RangeError: _RangeError,
+ CancellationError: errorTypes.CancellationError,
+ OperationalError: errorTypes.OperationalError,
+ TimeoutError: errorTypes.TimeoutError,
+ AggregateError: errorTypes.AggregateError,
+ Warning: Warning
+};
diff --git a/node_modules/bluebird/js/release/es5.js b/node_modules/bluebird/js/release/es5.js
new file mode 100644
index 0000000..ea41d5a
--- /dev/null
+++ b/node_modules/bluebird/js/release/es5.js
@@ -0,0 +1,80 @@
+var isES5 = (function(){
+ "use strict";
+ return this === undefined;
+})();
+
+if (isES5) {
+ module.exports = {
+ freeze: Object.freeze,
+ defineProperty: Object.defineProperty,
+ getDescriptor: Object.getOwnPropertyDescriptor,
+ keys: Object.keys,
+ names: Object.getOwnPropertyNames,
+ getPrototypeOf: Object.getPrototypeOf,
+ isArray: Array.isArray,
+ isES5: isES5,
+ propertyIsWritable: function(obj, prop) {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
+ return !!(!descriptor || descriptor.writable || descriptor.set);
+ }
+ };
+} else {
+ var has = {}.hasOwnProperty;
+ var str = {}.toString;
+ var proto = {}.constructor.prototype;
+
+ var ObjectKeys = function (o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+
+ var ObjectGetDescriptor = function(o, key) {
+ return {value: o[key]};
+ };
+
+ var ObjectDefineProperty = function (o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ };
+
+ var ObjectFreeze = function (obj) {
+ return obj;
+ };
+
+ var ObjectGetPrototypeOf = function (obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ };
+
+ var ArrayIsArray = function (obj) {
+ try {
+ return str.call(obj) === "[object Array]";
+ }
+ catch(e) {
+ return false;
+ }
+ };
+
+ module.exports = {
+ isArray: ArrayIsArray,
+ keys: ObjectKeys,
+ names: ObjectKeys,
+ defineProperty: ObjectDefineProperty,
+ getDescriptor: ObjectGetDescriptor,
+ freeze: ObjectFreeze,
+ getPrototypeOf: ObjectGetPrototypeOf,
+ isES5: isES5,
+ propertyIsWritable: function() {
+ return true;
+ }
+ };
+}
diff --git a/node_modules/bluebird/js/release/filter.js b/node_modules/bluebird/js/release/filter.js
new file mode 100644
index 0000000..ed57bf0
--- /dev/null
+++ b/node_modules/bluebird/js/release/filter.js
@@ -0,0 +1,12 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var PromiseMap = Promise.map;
+
+Promise.prototype.filter = function (fn, options) {
+ return PromiseMap(this, fn, options, INTERNAL);
+};
+
+Promise.filter = function (promises, fn, options) {
+ return PromiseMap(promises, fn, options, INTERNAL);
+};
+};
diff --git a/node_modules/bluebird/js/release/finally.js b/node_modules/bluebird/js/release/finally.js
new file mode 100644
index 0000000..d57444b
--- /dev/null
+++ b/node_modules/bluebird/js/release/finally.js
@@ -0,0 +1,146 @@
+"use strict";
+module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
+var util = require("./util");
+var CancellationError = Promise.CancellationError;
+var errorObj = util.errorObj;
+var catchFilter = require("./catch_filter")(NEXT_FILTER);
+
+function PassThroughHandlerContext(promise, type, handler) {
+ this.promise = promise;
+ this.type = type;
+ this.handler = handler;
+ this.called = false;
+ this.cancelPromise = null;
+}
+
+PassThroughHandlerContext.prototype.isFinallyHandler = function() {
+ return this.type === 0;
+};
+
+function FinallyHandlerCancelReaction(finallyHandler) {
+ this.finallyHandler = finallyHandler;
+}
+
+FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
+ checkCancel(this.finallyHandler);
+};
+
+function checkCancel(ctx, reason) {
+ if (ctx.cancelPromise != null) {
+ if (arguments.length > 1) {
+ ctx.cancelPromise._reject(reason);
+ } else {
+ ctx.cancelPromise._cancel();
+ }
+ ctx.cancelPromise = null;
+ return true;
+ }
+ return false;
+}
+
+function succeed() {
+ return finallyHandler.call(this, this.promise._target()._settledValue());
+}
+function fail(reason) {
+ if (checkCancel(this, reason)) return;
+ errorObj.e = reason;
+ return errorObj;
+}
+function finallyHandler(reasonOrValue) {
+ var promise = this.promise;
+ var handler = this.handler;
+
+ if (!this.called) {
+ this.called = true;
+ var ret = this.isFinallyHandler()
+ ? handler.call(promise._boundValue())
+ : handler.call(promise._boundValue(), reasonOrValue);
+ if (ret === NEXT_FILTER) {
+ return ret;
+ } else if (ret !== undefined) {
+ promise._setReturnedNonUndefined();
+ var maybePromise = tryConvertToPromise(ret, promise);
+ if (maybePromise instanceof Promise) {
+ if (this.cancelPromise != null) {
+ if (maybePromise._isCancelled()) {
+ var reason =
+ new CancellationError("late cancellation observer");
+ promise._attachExtraTrace(reason);
+ errorObj.e = reason;
+ return errorObj;
+ } else if (maybePromise.isPending()) {
+ maybePromise._attachCancellationCallback(
+ new FinallyHandlerCancelReaction(this));
+ }
+ }
+ return maybePromise._then(
+ succeed, fail, undefined, this, undefined);
+ }
+ }
+ }
+
+ if (promise.isRejected()) {
+ checkCancel(this);
+ errorObj.e = reasonOrValue;
+ return errorObj;
+ } else {
+ checkCancel(this);
+ return reasonOrValue;
+ }
+}
+
+Promise.prototype._passThrough = function(handler, type, success, fail) {
+ if (typeof handler !== "function") return this.then();
+ return this._then(success,
+ fail,
+ undefined,
+ new PassThroughHandlerContext(this, type, handler),
+ undefined);
+};
+
+Promise.prototype.lastly =
+Promise.prototype["finally"] = function (handler) {
+ return this._passThrough(handler,
+ 0,
+ finallyHandler,
+ finallyHandler);
+};
+
+
+Promise.prototype.tap = function (handler) {
+ return this._passThrough(handler, 1, finallyHandler);
+};
+
+Promise.prototype.tapCatch = function (handlerOrPredicate) {
+ var len = arguments.length;
+ if(len === 1) {
+ return this._passThrough(handlerOrPredicate,
+ 1,
+ undefined,
+ finallyHandler);
+ } else {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (util.isObject(item)) {
+ catchInstances[j++] = item;
+ } else {
+ return Promise.reject(new TypeError(
+ "tapCatch statement predicate: "
+ + "expecting an object but got " + util.classString(item)
+ ));
+ }
+ }
+ catchInstances.length = j;
+ var handler = arguments[i];
+ return this._passThrough(catchFilter(catchInstances, handler, this),
+ 1,
+ undefined,
+ finallyHandler);
+ }
+
+};
+
+return PassThroughHandlerContext;
+};
diff --git a/node_modules/bluebird/js/release/generators.js b/node_modules/bluebird/js/release/generators.js
new file mode 100644
index 0000000..500c280
--- /dev/null
+++ b/node_modules/bluebird/js/release/generators.js
@@ -0,0 +1,223 @@
+"use strict";
+module.exports = function(Promise,
+ apiRejection,
+ INTERNAL,
+ tryConvertToPromise,
+ Proxyable,
+ debug) {
+var errors = require("./errors");
+var TypeError = errors.TypeError;
+var util = require("./util");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+var yieldHandlers = [];
+
+function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
+ for (var i = 0; i < yieldHandlers.length; ++i) {
+ traceParent._pushContext();
+ var result = tryCatch(yieldHandlers[i])(value);
+ traceParent._popContext();
+ if (result === errorObj) {
+ traceParent._pushContext();
+ var ret = Promise.reject(errorObj.e);
+ traceParent._popContext();
+ return ret;
+ }
+ var maybePromise = tryConvertToPromise(result, traceParent);
+ if (maybePromise instanceof Promise) return maybePromise;
+ }
+ return null;
+}
+
+function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
+ if (debug.cancellation()) {
+ var internal = new Promise(INTERNAL);
+ var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
+ this._promise = internal.lastly(function() {
+ return _finallyPromise;
+ });
+ internal._captureStackTrace();
+ internal._setOnCancel(this);
+ } else {
+ var promise = this._promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ }
+ this._stack = stack;
+ this._generatorFunction = generatorFunction;
+ this._receiver = receiver;
+ this._generator = undefined;
+ this._yieldHandlers = typeof yieldHandler === "function"
+ ? [yieldHandler].concat(yieldHandlers)
+ : yieldHandlers;
+ this._yieldedPromise = null;
+ this._cancellationPhase = false;
+}
+util.inherits(PromiseSpawn, Proxyable);
+
+PromiseSpawn.prototype._isResolved = function() {
+ return this._promise === null;
+};
+
+PromiseSpawn.prototype._cleanup = function() {
+ this._promise = this._generator = null;
+ if (debug.cancellation() && this._finallyPromise !== null) {
+ this._finallyPromise._fulfill();
+ this._finallyPromise = null;
+ }
+};
+
+PromiseSpawn.prototype._promiseCancelled = function() {
+ if (this._isResolved()) return;
+ var implementsReturn = typeof this._generator["return"] !== "undefined";
+
+ var result;
+ if (!implementsReturn) {
+ var reason = new Promise.CancellationError(
+ "generator .return() sentinel");
+ Promise.coroutine.returnSentinel = reason;
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ result = tryCatch(this._generator["throw"]).call(this._generator,
+ reason);
+ this._promise._popContext();
+ } else {
+ this._promise._pushContext();
+ result = tryCatch(this._generator["return"]).call(this._generator,
+ undefined);
+ this._promise._popContext();
+ }
+ this._cancellationPhase = true;
+ this._yieldedPromise = null;
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._promiseFulfilled = function(value) {
+ this._yieldedPromise = null;
+ this._promise._pushContext();
+ var result = tryCatch(this._generator.next).call(this._generator, value);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._promiseRejected = function(reason) {
+ this._yieldedPromise = null;
+ this._promise._attachExtraTrace(reason);
+ this._promise._pushContext();
+ var result = tryCatch(this._generator["throw"])
+ .call(this._generator, reason);
+ this._promise._popContext();
+ this._continue(result);
+};
+
+PromiseSpawn.prototype._resultCancelled = function() {
+ if (this._yieldedPromise instanceof Promise) {
+ var promise = this._yieldedPromise;
+ this._yieldedPromise = null;
+ promise.cancel();
+ }
+};
+
+PromiseSpawn.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseSpawn.prototype._run = function () {
+ this._generator = this._generatorFunction.call(this._receiver);
+ this._receiver =
+ this._generatorFunction = undefined;
+ this._promiseFulfilled(undefined);
+};
+
+PromiseSpawn.prototype._continue = function (result) {
+ var promise = this._promise;
+ if (result === errorObj) {
+ this._cleanup();
+ if (this._cancellationPhase) {
+ return promise.cancel();
+ } else {
+ return promise._rejectCallback(result.e, false);
+ }
+ }
+
+ var value = result.value;
+ if (result.done === true) {
+ this._cleanup();
+ if (this._cancellationPhase) {
+ return promise.cancel();
+ } else {
+ return promise._resolveCallback(value);
+ }
+ } else {
+ var maybePromise = tryConvertToPromise(value, this._promise);
+ if (!(maybePromise instanceof Promise)) {
+ maybePromise =
+ promiseFromYieldHandler(maybePromise,
+ this._yieldHandlers,
+ this._promise);
+ if (maybePromise === null) {
+ this._promiseRejected(
+ new TypeError(
+ "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) +
+ "From coroutine:\u000a" +
+ this._stack.split("\n").slice(1, -7).join("\n")
+ )
+ );
+ return;
+ }
+ }
+ maybePromise = maybePromise._target();
+ var bitField = maybePromise._bitField;
+ ;
+ if (((bitField & 50397184) === 0)) {
+ this._yieldedPromise = maybePromise;
+ maybePromise._proxy(this, null);
+ } else if (((bitField & 33554432) !== 0)) {
+ Promise._async.invoke(
+ this._promiseFulfilled, this, maybePromise._value()
+ );
+ } else if (((bitField & 16777216) !== 0)) {
+ Promise._async.invoke(
+ this._promiseRejected, this, maybePromise._reason()
+ );
+ } else {
+ this._promiseCancelled();
+ }
+ }
+};
+
+Promise.coroutine = function (generatorFunction, options) {
+ if (typeof generatorFunction !== "function") {
+ throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ var yieldHandler = Object(options).yieldHandler;
+ var PromiseSpawn$ = PromiseSpawn;
+ var stack = new Error().stack;
+ return function () {
+ var generator = generatorFunction.apply(this, arguments);
+ var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
+ stack);
+ var ret = spawn.promise();
+ spawn._generator = generator;
+ spawn._promiseFulfilled(undefined);
+ return ret;
+ };
+};
+
+Promise.coroutine.addYieldHandler = function(fn) {
+ if (typeof fn !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(fn));
+ }
+ yieldHandlers.push(fn);
+};
+
+Promise.spawn = function (generatorFunction) {
+ debug.deprecated("Promise.spawn()", "Promise.coroutine()");
+ if (typeof generatorFunction !== "function") {
+ return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ var spawn = new PromiseSpawn(generatorFunction, this);
+ var ret = spawn.promise();
+ spawn._run(Promise.spawn);
+ return ret;
+};
+};
diff --git a/node_modules/bluebird/js/release/join.js b/node_modules/bluebird/js/release/join.js
new file mode 100644
index 0000000..e7e19f0
--- /dev/null
+++ b/node_modules/bluebird/js/release/join.js
@@ -0,0 +1,165 @@
+"use strict";
+module.exports =
+function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async) {
+var util = require("./util");
+var canEvaluate = util.canEvaluate;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var reject;
+
+if (!false) {
+if (canEvaluate) {
+ var thenCallback = function(i) {
+ return new Function("value", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = value; \n\
+ holder.checkFulfillment(this); \n\
+ ".replace(/Index/g, i));
+ };
+
+ var promiseSetter = function(i) {
+ return new Function("promise", "holder", " \n\
+ 'use strict'; \n\
+ holder.pIndex = promise; \n\
+ ".replace(/Index/g, i));
+ };
+
+ var generateHolderClass = function(total) {
+ var props = new Array(total);
+ for (var i = 0; i < props.length; ++i) {
+ props[i] = "this.p" + (i+1);
+ }
+ var assignment = props.join(" = ") + " = null;";
+ var cancellationCode= "var promise;\n" + props.map(function(prop) {
+ return " \n\
+ promise = " + prop + "; \n\
+ if (promise instanceof Promise) { \n\
+ promise.cancel(); \n\
+ } \n\
+ ";
+ }).join("\n");
+ var passedArguments = props.join(", ");
+ var name = "Holder$" + total;
+
+
+ var code = "return function(tryCatch, errorObj, Promise, async) { \n\
+ 'use strict'; \n\
+ function [TheName](fn) { \n\
+ [TheProperties] \n\
+ this.fn = fn; \n\
+ this.asyncNeeded = true; \n\
+ this.now = 0; \n\
+ } \n\
+ \n\
+ [TheName].prototype._callFunction = function(promise) { \n\
+ promise._pushContext(); \n\
+ var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
+ promise._popContext(); \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(ret.e, false); \n\
+ } else { \n\
+ promise._resolveCallback(ret); \n\
+ } \n\
+ }; \n\
+ \n\
+ [TheName].prototype.checkFulfillment = function(promise) { \n\
+ var now = ++this.now; \n\
+ if (now === [TheTotal]) { \n\
+ if (this.asyncNeeded) { \n\
+ async.invoke(this._callFunction, this, promise); \n\
+ } else { \n\
+ this._callFunction(promise); \n\
+ } \n\
+ \n\
+ } \n\
+ }; \n\
+ \n\
+ [TheName].prototype._resultCancelled = function() { \n\
+ [CancellationCode] \n\
+ }; \n\
+ \n\
+ return [TheName]; \n\
+ }(tryCatch, errorObj, Promise, async); \n\
+ ";
+
+ code = code.replace(/\[TheName\]/g, name)
+ .replace(/\[TheTotal\]/g, total)
+ .replace(/\[ThePassedArguments\]/g, passedArguments)
+ .replace(/\[TheProperties\]/g, assignment)
+ .replace(/\[CancellationCode\]/g, cancellationCode);
+
+ return new Function("tryCatch", "errorObj", "Promise", "async", code)
+ (tryCatch, errorObj, Promise, async);
+ };
+
+ var holderClasses = [];
+ var thenCallbacks = [];
+ var promiseSetters = [];
+
+ for (var i = 0; i < 8; ++i) {
+ holderClasses.push(generateHolderClass(i + 1));
+ thenCallbacks.push(thenCallback(i + 1));
+ promiseSetters.push(promiseSetter(i + 1));
+ }
+
+ reject = function (reason) {
+ this._reject(reason);
+ };
+}}
+
+Promise.join = function () {
+ var last = arguments.length - 1;
+ var fn;
+ if (last > 0 && typeof arguments[last] === "function") {
+ fn = arguments[last];
+ if (!false) {
+ if (last <= 8 && canEvaluate) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var HolderClass = holderClasses[last - 1];
+ var holder = new HolderClass(fn);
+ var callbacks = thenCallbacks;
+
+ for (var i = 0; i < last; ++i) {
+ var maybePromise = tryConvertToPromise(arguments[i], ret);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ var bitField = maybePromise._bitField;
+ ;
+ if (((bitField & 50397184) === 0)) {
+ maybePromise._then(callbacks[i], reject,
+ undefined, ret, holder);
+ promiseSetters[i](maybePromise, holder);
+ holder.asyncNeeded = false;
+ } else if (((bitField & 33554432) !== 0)) {
+ callbacks[i].call(ret,
+ maybePromise._value(), holder);
+ } else if (((bitField & 16777216) !== 0)) {
+ ret._reject(maybePromise._reason());
+ } else {
+ ret._cancel();
+ }
+ } else {
+ callbacks[i].call(ret, maybePromise, holder);
+ }
+ }
+
+ if (!ret._isFateSealed()) {
+ if (holder.asyncNeeded) {
+ var context = Promise._getContext();
+ holder.fn = util.contextBind(context, holder.fn);
+ }
+ ret._setAsyncGuaranteed();
+ ret._setOnCancel(holder);
+ }
+ return ret;
+ }
+ }
+ }
+ var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len ; ++$_i) {args[$_i] = arguments[$_i ];};
+ if (fn) args.pop();
+ var ret = new PromiseArray(args).promise();
+ return fn !== undefined ? ret.spread(fn) : ret;
+};
+
+};
diff --git a/node_modules/bluebird/js/release/map.js b/node_modules/bluebird/js/release/map.js
new file mode 100644
index 0000000..91d5a82
--- /dev/null
+++ b/node_modules/bluebird/js/release/map.js
@@ -0,0 +1,175 @@
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL,
+ debug) {
+var util = require("./util");
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+var async = Promise._async;
+
+function MappingPromiseArray(promises, fn, limit, _filter) {
+ this.constructor$(promises);
+ this._promise._captureStackTrace();
+ var context = Promise._getContext();
+ this._callback = util.contextBind(context, fn);
+ this._preservedValues = _filter === INTERNAL
+ ? new Array(this.length())
+ : null;
+ this._limit = limit;
+ this._inFlight = 0;
+ this._queue = [];
+ async.invoke(this._asyncInit, this, undefined);
+ if (util.isArray(promises)) {
+ for (var i = 0; i < promises.length; ++i) {
+ var maybePromise = promises[i];
+ if (maybePromise instanceof Promise) {
+ maybePromise.suppressUnhandledRejections();
+ }
+ }
+ }
+}
+util.inherits(MappingPromiseArray, PromiseArray);
+
+MappingPromiseArray.prototype._asyncInit = function() {
+ this._init$(undefined, -2);
+};
+
+MappingPromiseArray.prototype._init = function () {};
+
+MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var values = this._values;
+ var length = this.length();
+ var preservedValues = this._preservedValues;
+ var limit = this._limit;
+
+ if (index < 0) {
+ index = (index * -1) - 1;
+ values[index] = value;
+ if (limit >= 1) {
+ this._inFlight--;
+ this._drainQueue();
+ if (this._isResolved()) return true;
+ }
+ } else {
+ if (limit >= 1 && this._inFlight >= limit) {
+ values[index] = value;
+ this._queue.push(index);
+ return false;
+ }
+ if (preservedValues !== null) preservedValues[index] = value;
+
+ var promise = this._promise;
+ var callback = this._callback;
+ var receiver = promise._boundValue();
+ promise._pushContext();
+ var ret = tryCatch(callback).call(receiver, value, index, length);
+ var promiseCreated = promise._popContext();
+ debug.checkForgottenReturns(
+ ret,
+ promiseCreated,
+ preservedValues !== null ? "Promise.filter" : "Promise.map",
+ promise
+ );
+ if (ret === errorObj) {
+ this._reject(ret.e);
+ return true;
+ }
+
+ var maybePromise = tryConvertToPromise(ret, this._promise);
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ var bitField = maybePromise._bitField;
+ ;
+ if (((bitField & 50397184) === 0)) {
+ if (limit >= 1) this._inFlight++;
+ values[index] = maybePromise;
+ maybePromise._proxy(this, (index + 1) * -1);
+ return false;
+ } else if (((bitField & 33554432) !== 0)) {
+ ret = maybePromise._value();
+ } else if (((bitField & 16777216) !== 0)) {
+ this._reject(maybePromise._reason());
+ return true;
+ } else {
+ this._cancel();
+ return true;
+ }
+ }
+ values[index] = ret;
+ }
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= length) {
+ if (preservedValues !== null) {
+ this._filter(values, preservedValues);
+ } else {
+ this._resolve(values);
+ }
+ return true;
+ }
+ return false;
+};
+
+MappingPromiseArray.prototype._drainQueue = function () {
+ var queue = this._queue;
+ var limit = this._limit;
+ var values = this._values;
+ while (queue.length > 0 && this._inFlight < limit) {
+ if (this._isResolved()) return;
+ var index = queue.pop();
+ this._promiseFulfilled(values[index], index);
+ }
+};
+
+MappingPromiseArray.prototype._filter = function (booleans, values) {
+ var len = values.length;
+ var ret = new Array(len);
+ var j = 0;
+ for (var i = 0; i < len; ++i) {
+ if (booleans[i]) ret[j++] = values[i];
+ }
+ ret.length = j;
+ this._resolve(ret);
+};
+
+MappingPromiseArray.prototype.preservedValues = function () {
+ return this._preservedValues;
+};
+
+function map(promises, fn, options, _filter) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+
+ var limit = 0;
+ if (options !== undefined) {
+ if (typeof options === "object" && options !== null) {
+ if (typeof options.concurrency !== "number") {
+ return Promise.reject(
+ new TypeError("'concurrency' must be a number but it is " +
+ util.classString(options.concurrency)));
+ }
+ limit = options.concurrency;
+ } else {
+ return Promise.reject(new TypeError(
+ "options argument must be an object but it is " +
+ util.classString(options)));
+ }
+ }
+ limit = typeof limit === "number" &&
+ isFinite(limit) && limit >= 1 ? limit : 0;
+ return new MappingPromiseArray(promises, fn, limit, _filter).promise();
+}
+
+Promise.prototype.map = function (fn, options) {
+ return map(this, fn, options, null);
+};
+
+Promise.map = function (promises, fn, options, _filter) {
+ return map(promises, fn, options, _filter);
+};
+
+
+};
diff --git a/node_modules/bluebird/js/release/method.js b/node_modules/bluebird/js/release/method.js
new file mode 100644
index 0000000..ce9e4db
--- /dev/null
+++ b/node_modules/bluebird/js/release/method.js
@@ -0,0 +1,55 @@
+"use strict";
+module.exports =
+function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
+var util = require("./util");
+var tryCatch = util.tryCatch;
+
+Promise.method = function (fn) {
+ if (typeof fn !== "function") {
+ throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
+ }
+ return function () {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value = tryCatch(fn).apply(this, arguments);
+ var promiseCreated = ret._popContext();
+ debug.checkForgottenReturns(
+ value, promiseCreated, "Promise.method", ret);
+ ret._resolveFromSyncValue(value);
+ return ret;
+ };
+};
+
+Promise.attempt = Promise["try"] = function (fn) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._pushContext();
+ var value;
+ if (arguments.length > 1) {
+ debug.deprecated("calling Promise.try with more than 1 argument");
+ var arg = arguments[1];
+ var ctx = arguments[2];
+ value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
+ : tryCatch(fn).call(ctx, arg);
+ } else {
+ value = tryCatch(fn)();
+ }
+ var promiseCreated = ret._popContext();
+ debug.checkForgottenReturns(
+ value, promiseCreated, "Promise.try", ret);
+ ret._resolveFromSyncValue(value);
+ return ret;
+};
+
+Promise.prototype._resolveFromSyncValue = function (value) {
+ if (value === util.errorObj) {
+ this._rejectCallback(value.e, false);
+ } else {
+ this._resolveCallback(value, true);
+ }
+};
+};
diff --git a/node_modules/bluebird/js/release/nodeback.js b/node_modules/bluebird/js/release/nodeback.js
new file mode 100644
index 0000000..71e69eb
--- /dev/null
+++ b/node_modules/bluebird/js/release/nodeback.js
@@ -0,0 +1,51 @@
+"use strict";
+var util = require("./util");
+var maybeWrapAsError = util.maybeWrapAsError;
+var errors = require("./errors");
+var OperationalError = errors.OperationalError;
+var es5 = require("./es5");
+
+function isUntypedError(obj) {
+ return obj instanceof Error &&
+ es5.getPrototypeOf(obj) === Error.prototype;
+}
+
+var rErrorKey = /^(?:name|message|stack|cause)$/;
+function wrapAsOperationalError(obj) {
+ var ret;
+ if (isUntypedError(obj)) {
+ ret = new OperationalError(obj);
+ ret.name = obj.name;
+ ret.message = obj.message;
+ ret.stack = obj.stack;
+ var keys = es5.keys(obj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!rErrorKey.test(key)) {
+ ret[key] = obj[key];
+ }
+ }
+ return ret;
+ }
+ util.markAsOriginatingFromRejection(obj);
+ return obj;
+}
+
+function nodebackForPromise(promise, multiArgs) {
+ return function(err, value) {
+ if (promise === null) return;
+ if (err) {
+ var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
+ promise._attachExtraTrace(wrapped);
+ promise._reject(wrapped);
+ } else if (!multiArgs) {
+ promise._fulfill(value);
+ } else {
+ var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};
+ promise._fulfill(args);
+ }
+ promise = null;
+ };
+}
+
+module.exports = nodebackForPromise;
diff --git a/node_modules/bluebird/js/release/nodeify.js b/node_modules/bluebird/js/release/nodeify.js
new file mode 100644
index 0000000..ce2b190
--- /dev/null
+++ b/node_modules/bluebird/js/release/nodeify.js
@@ -0,0 +1,58 @@
+"use strict";
+module.exports = function(Promise) {
+var util = require("./util");
+var async = Promise._async;
+var tryCatch = util.tryCatch;
+var errorObj = util.errorObj;
+
+function spreadAdapter(val, nodeback) {
+ var promise = this;
+ if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
+ var ret =
+ tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+function successAdapter(val, nodeback) {
+ var promise = this;
+ var receiver = promise._boundValue();
+ var ret = val === undefined
+ ? tryCatch(nodeback).call(receiver, null)
+ : tryCatch(nodeback).call(receiver, null, val);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+function errorAdapter(reason, nodeback) {
+ var promise = this;
+ if (!reason) {
+ var newReason = new Error(reason + "");
+ newReason.cause = reason;
+ reason = newReason;
+ }
+ var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
+ if (ret === errorObj) {
+ async.throwLater(ret.e);
+ }
+}
+
+Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,
+ options) {
+ if (typeof nodeback == "function") {
+ var adapter = successAdapter;
+ if (options !== undefined && Object(options).spread) {
+ adapter = spreadAdapter;
+ }
+ this._then(
+ adapter,
+ errorAdapter,
+ undefined,
+ this,
+ nodeback
+ );
+ }
+ return this;
+};
+};
diff --git a/node_modules/bluebird/js/release/promise.js b/node_modules/bluebird/js/release/promise.js
new file mode 100644
index 0000000..622a86f
--- /dev/null
+++ b/node_modules/bluebird/js/release/promise.js
@@ -0,0 +1,819 @@
+"use strict";
+module.exports = function() {
+var makeSelfResolutionError = function () {
+ return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+};
+var reflectHandler = function() {
+ return new Promise.PromiseInspection(this._target());
+};
+var apiRejection = function(msg) {
+ return Promise.reject(new TypeError(msg));
+};
+function Proxyable() {}
+var UNDEFINED_BINDING = {};
+var util = require("./util");
+util.setReflectHandler(reflectHandler);
+
+var getDomain = function() {
+ var domain = process.domain;
+ if (domain === undefined) {
+ return null;
+ }
+ return domain;
+};
+var getContextDefault = function() {
+ return null;
+};
+var getContextDomain = function() {
+ return {
+ domain: getDomain(),
+ async: null
+ };
+};
+var AsyncResource = util.isNode && util.nodeSupportsAsyncResource ?
+ require("async_hooks").AsyncResource : null;
+var getContextAsyncHooks = function() {
+ return {
+ domain: getDomain(),
+ async: new AsyncResource("Bluebird::Promise")
+ };
+};
+var getContext = util.isNode ? getContextDomain : getContextDefault;
+util.notEnumerableProp(Promise, "_getContext", getContext);
+var enableAsyncHooks = function() {
+ getContext = getContextAsyncHooks;
+ util.notEnumerableProp(Promise, "_getContext", getContextAsyncHooks);
+};
+var disableAsyncHooks = function() {
+ getContext = getContextDomain;
+ util.notEnumerableProp(Promise, "_getContext", getContextDomain);
+};
+
+var es5 = require("./es5");
+var Async = require("./async");
+var async = new Async();
+es5.defineProperty(Promise, "_async", {value: async});
+var errors = require("./errors");
+var TypeError = Promise.TypeError = errors.TypeError;
+Promise.RangeError = errors.RangeError;
+var CancellationError = Promise.CancellationError = errors.CancellationError;
+Promise.TimeoutError = errors.TimeoutError;
+Promise.OperationalError = errors.OperationalError;
+Promise.RejectionError = errors.OperationalError;
+Promise.AggregateError = errors.AggregateError;
+var INTERNAL = function(){};
+var APPLY = {};
+var NEXT_FILTER = {};
+var tryConvertToPromise = require("./thenables")(Promise, INTERNAL);
+var PromiseArray =
+ require("./promise_array")(Promise, INTERNAL,
+ tryConvertToPromise, apiRejection, Proxyable);
+var Context = require("./context")(Promise);
+ /*jshint unused:false*/
+var createContext = Context.create;
+
+var debug = require("./debuggability")(Promise, Context,
+ enableAsyncHooks, disableAsyncHooks);
+var CapturedTrace = debug.CapturedTrace;
+var PassThroughHandlerContext =
+ require("./finally")(Promise, tryConvertToPromise, NEXT_FILTER);
+var catchFilter = require("./catch_filter")(NEXT_FILTER);
+var nodebackForPromise = require("./nodeback");
+var errorObj = util.errorObj;
+var tryCatch = util.tryCatch;
+function check(self, executor) {
+ if (self == null || self.constructor !== Promise) {
+ throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ if (typeof executor !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(executor));
+ }
+
+}
+
+function Promise(executor) {
+ if (executor !== INTERNAL) {
+ check(this, executor);
+ }
+ this._bitField = 0;
+ this._fulfillmentHandler0 = undefined;
+ this._rejectionHandler0 = undefined;
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._resolveFromExecutor(executor);
+ this._promiseCreated();
+ this._fireEvent("promiseCreated", this);
+}
+
+Promise.prototype.toString = function () {
+ return "[object Promise]";
+};
+
+Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
+ var len = arguments.length;
+ if (len > 1) {
+ var catchInstances = new Array(len - 1),
+ j = 0, i;
+ for (i = 0; i < len - 1; ++i) {
+ var item = arguments[i];
+ if (util.isObject(item)) {
+ catchInstances[j++] = item;
+ } else {
+ return apiRejection("Catch statement predicate: " +
+ "expecting an object but got " + util.classString(item));
+ }
+ }
+ catchInstances.length = j;
+ fn = arguments[i];
+
+ if (typeof fn !== "function") {
+ throw new TypeError("The last argument to .catch() " +
+ "must be a function, got " + util.toString(fn));
+ }
+ return this.then(undefined, catchFilter(catchInstances, fn, this));
+ }
+ return this.then(undefined, fn);
+};
+
+Promise.prototype.reflect = function () {
+ return this._then(reflectHandler,
+ reflectHandler, undefined, this, undefined);
+};
+
+Promise.prototype.then = function (didFulfill, didReject) {
+ if (debug.warnings() && arguments.length > 0 &&
+ typeof didFulfill !== "function" &&
+ typeof didReject !== "function") {
+ var msg = ".then() only accepts functions but was passed: " +
+ util.classString(didFulfill);
+ if (arguments.length > 1) {
+ msg += ", " + util.classString(didReject);
+ }
+ this._warn(msg);
+ }
+ return this._then(didFulfill, didReject, undefined, undefined, undefined);
+};
+
+Promise.prototype.done = function (didFulfill, didReject) {
+ var promise =
+ this._then(didFulfill, didReject, undefined, undefined, undefined);
+ promise._setIsFinal();
+};
+
+Promise.prototype.spread = function (fn) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ return this.all()._then(fn, undefined, undefined, APPLY, undefined);
+};
+
+Promise.prototype.toJSON = function () {
+ var ret = {
+ isFulfilled: false,
+ isRejected: false,
+ fulfillmentValue: undefined,
+ rejectionReason: undefined
+ };
+ if (this.isFulfilled()) {
+ ret.fulfillmentValue = this.value();
+ ret.isFulfilled = true;
+ } else if (this.isRejected()) {
+ ret.rejectionReason = this.reason();
+ ret.isRejected = true;
+ }
+ return ret;
+};
+
+Promise.prototype.all = function () {
+ if (arguments.length > 0) {
+ this._warn(".all() was passed arguments but it does not take any");
+ }
+ return new PromiseArray(this).promise();
+};
+
+Promise.prototype.error = function (fn) {
+ return this.caught(util.originatesFromRejection, fn);
+};
+
+Promise.getNewLibraryCopy = module.exports;
+
+Promise.is = function (val) {
+ return val instanceof Promise;
+};
+
+Promise.fromNode = Promise.fromCallback = function(fn) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
+ : false;
+ var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
+ if (result === errorObj) {
+ ret._rejectCallback(result.e, true);
+ }
+ if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
+ return ret;
+};
+
+Promise.all = function (promises) {
+ return new PromiseArray(promises).promise();
+};
+
+Promise.cast = function (obj) {
+ var ret = tryConvertToPromise(obj);
+ if (!(ret instanceof Promise)) {
+ ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._setFulfilled();
+ ret._rejectionHandler0 = obj;
+ }
+ return ret;
+};
+
+Promise.resolve = Promise.fulfilled = Promise.cast;
+
+Promise.reject = Promise.rejected = function (reason) {
+ var ret = new Promise(INTERNAL);
+ ret._captureStackTrace();
+ ret._rejectCallback(reason, true);
+ return ret;
+};
+
+Promise.setScheduler = function(fn) {
+ if (typeof fn !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(fn));
+ }
+ return async.setScheduler(fn);
+};
+
+Promise.prototype._then = function (
+ didFulfill,
+ didReject,
+ _, receiver,
+ internalData
+) {
+ var haveInternalData = internalData !== undefined;
+ var promise = haveInternalData ? internalData : new Promise(INTERNAL);
+ var target = this._target();
+ var bitField = target._bitField;
+
+ if (!haveInternalData) {
+ promise._propagateFrom(this, 3);
+ promise._captureStackTrace();
+ if (receiver === undefined &&
+ ((this._bitField & 2097152) !== 0)) {
+ if (!((bitField & 50397184) === 0)) {
+ receiver = this._boundValue();
+ } else {
+ receiver = target === this ? undefined : this._boundTo;
+ }
+ }
+ this._fireEvent("promiseChained", this, promise);
+ }
+
+ var context = getContext();
+ if (!((bitField & 50397184) === 0)) {
+ var handler, value, settler = target._settlePromiseCtx;
+ if (((bitField & 33554432) !== 0)) {
+ value = target._rejectionHandler0;
+ handler = didFulfill;
+ } else if (((bitField & 16777216) !== 0)) {
+ value = target._fulfillmentHandler0;
+ handler = didReject;
+ target._unsetRejectionIsUnhandled();
+ } else {
+ settler = target._settlePromiseLateCancellationObserver;
+ value = new CancellationError("late cancellation observer");
+ target._attachExtraTrace(value);
+ handler = didReject;
+ }
+
+ async.invoke(settler, target, {
+ handler: util.contextBind(context, handler),
+ promise: promise,
+ receiver: receiver,
+ value: value
+ });
+ } else {
+ target._addCallbacks(didFulfill, didReject, promise,
+ receiver, context);
+ }
+
+ return promise;
+};
+
+Promise.prototype._length = function () {
+ return this._bitField & 65535;
+};
+
+Promise.prototype._isFateSealed = function () {
+ return (this._bitField & 117506048) !== 0;
+};
+
+Promise.prototype._isFollowing = function () {
+ return (this._bitField & 67108864) === 67108864;
+};
+
+Promise.prototype._setLength = function (len) {
+ this._bitField = (this._bitField & -65536) |
+ (len & 65535);
+};
+
+Promise.prototype._setFulfilled = function () {
+ this._bitField = this._bitField | 33554432;
+ this._fireEvent("promiseFulfilled", this);
+};
+
+Promise.prototype._setRejected = function () {
+ this._bitField = this._bitField | 16777216;
+ this._fireEvent("promiseRejected", this);
+};
+
+Promise.prototype._setFollowing = function () {
+ this._bitField = this._bitField | 67108864;
+ this._fireEvent("promiseResolved", this);
+};
+
+Promise.prototype._setIsFinal = function () {
+ this._bitField = this._bitField | 4194304;
+};
+
+Promise.prototype._isFinal = function () {
+ return (this._bitField & 4194304) > 0;
+};
+
+Promise.prototype._unsetCancelled = function() {
+ this._bitField = this._bitField & (~65536);
+};
+
+Promise.prototype._setCancelled = function() {
+ this._bitField = this._bitField | 65536;
+ this._fireEvent("promiseCancelled", this);
+};
+
+Promise.prototype._setWillBeCancelled = function() {
+ this._bitField = this._bitField | 8388608;
+};
+
+Promise.prototype._setAsyncGuaranteed = function() {
+ if (async.hasCustomScheduler()) return;
+ var bitField = this._bitField;
+ this._bitField = bitField |
+ (((bitField & 536870912) >> 2) ^
+ 134217728);
+};
+
+Promise.prototype._setNoAsyncGuarantee = function() {
+ this._bitField = (this._bitField | 536870912) &
+ (~134217728);
+};
+
+Promise.prototype._receiverAt = function (index) {
+ var ret = index === 0 ? this._receiver0 : this[
+ index * 4 - 4 + 3];
+ if (ret === UNDEFINED_BINDING) {
+ return undefined;
+ } else if (ret === undefined && this._isBound()) {
+ return this._boundValue();
+ }
+ return ret;
+};
+
+Promise.prototype._promiseAt = function (index) {
+ return this[
+ index * 4 - 4 + 2];
+};
+
+Promise.prototype._fulfillmentHandlerAt = function (index) {
+ return this[
+ index * 4 - 4 + 0];
+};
+
+Promise.prototype._rejectionHandlerAt = function (index) {
+ return this[
+ index * 4 - 4 + 1];
+};
+
+Promise.prototype._boundValue = function() {};
+
+Promise.prototype._migrateCallback0 = function (follower) {
+ var bitField = follower._bitField;
+ var fulfill = follower._fulfillmentHandler0;
+ var reject = follower._rejectionHandler0;
+ var promise = follower._promise0;
+ var receiver = follower._receiverAt(0);
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, promise, receiver, null);
+};
+
+Promise.prototype._migrateCallbackAt = function (follower, index) {
+ var fulfill = follower._fulfillmentHandlerAt(index);
+ var reject = follower._rejectionHandlerAt(index);
+ var promise = follower._promiseAt(index);
+ var receiver = follower._receiverAt(index);
+ if (receiver === undefined) receiver = UNDEFINED_BINDING;
+ this._addCallbacks(fulfill, reject, promise, receiver, null);
+};
+
+Promise.prototype._addCallbacks = function (
+ fulfill,
+ reject,
+ promise,
+ receiver,
+ context
+) {
+ var index = this._length();
+
+ if (index >= 65535 - 4) {
+ index = 0;
+ this._setLength(0);
+ }
+
+ if (index === 0) {
+ this._promise0 = promise;
+ this._receiver0 = receiver;
+ if (typeof fulfill === "function") {
+ this._fulfillmentHandler0 = util.contextBind(context, fulfill);
+ }
+ if (typeof reject === "function") {
+ this._rejectionHandler0 = util.contextBind(context, reject);
+ }
+ } else {
+ var base = index * 4 - 4;
+ this[base + 2] = promise;
+ this[base + 3] = receiver;
+ if (typeof fulfill === "function") {
+ this[base + 0] =
+ util.contextBind(context, fulfill);
+ }
+ if (typeof reject === "function") {
+ this[base + 1] =
+ util.contextBind(context, reject);
+ }
+ }
+ this._setLength(index + 1);
+ return index;
+};
+
+Promise.prototype._proxy = function (proxyable, arg) {
+ this._addCallbacks(undefined, undefined, arg, proxyable, null);
+};
+
+Promise.prototype._resolveCallback = function(value, shouldBind) {
+ if (((this._bitField & 117506048) !== 0)) return;
+ if (value === this)
+ return this._rejectCallback(makeSelfResolutionError(), false);
+ var maybePromise = tryConvertToPromise(value, this);
+ if (!(maybePromise instanceof Promise)) return this._fulfill(value);
+
+ if (shouldBind) this._propagateFrom(maybePromise, 2);
+
+
+ var promise = maybePromise._target();
+
+ if (promise === this) {
+ this._reject(makeSelfResolutionError());
+ return;
+ }
+
+ var bitField = promise._bitField;
+ if (((bitField & 50397184) === 0)) {
+ var len = this._length();
+ if (len > 0) promise._migrateCallback0(this);
+ for (var i = 1; i < len; ++i) {
+ promise._migrateCallbackAt(this, i);
+ }
+ this._setFollowing();
+ this._setLength(0);
+ this._setFollowee(maybePromise);
+ } else if (((bitField & 33554432) !== 0)) {
+ this._fulfill(promise._value());
+ } else if (((bitField & 16777216) !== 0)) {
+ this._reject(promise._reason());
+ } else {
+ var reason = new CancellationError("late cancellation observer");
+ promise._attachExtraTrace(reason);
+ this._reject(reason);
+ }
+};
+
+Promise.prototype._rejectCallback =
+function(reason, synchronous, ignoreNonErrorWarnings) {
+ var trace = util.ensureErrorObject(reason);
+ var hasStack = trace === reason;
+ if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
+ var message = "a promise was rejected with a non-error: " +
+ util.classString(reason);
+ this._warn(message, true);
+ }
+ this._attachExtraTrace(trace, synchronous ? hasStack : false);
+ this._reject(reason);
+};
+
+Promise.prototype._resolveFromExecutor = function (executor) {
+ if (executor === INTERNAL) return;
+ var promise = this;
+ this._captureStackTrace();
+ this._pushContext();
+ var synchronous = true;
+ var r = this._execute(executor, function(value) {
+ promise._resolveCallback(value);
+ }, function (reason) {
+ promise._rejectCallback(reason, synchronous);
+ });
+ synchronous = false;
+ this._popContext();
+
+ if (r !== undefined) {
+ promise._rejectCallback(r, true);
+ }
+};
+
+Promise.prototype._settlePromiseFromHandler = function (
+ handler, receiver, value, promise
+) {
+ var bitField = promise._bitField;
+ if (((bitField & 65536) !== 0)) return;
+ promise._pushContext();
+ var x;
+ if (receiver === APPLY) {
+ if (!value || typeof value.length !== "number") {
+ x = errorObj;
+ x.e = new TypeError("cannot .spread() a non-array: " +
+ util.classString(value));
+ } else {
+ x = tryCatch(handler).apply(this._boundValue(), value);
+ }
+ } else {
+ x = tryCatch(handler).call(receiver, value);
+ }
+ var promiseCreated = promise._popContext();
+ bitField = promise._bitField;
+ if (((bitField & 65536) !== 0)) return;
+
+ if (x === NEXT_FILTER) {
+ promise._reject(value);
+ } else if (x === errorObj) {
+ promise._rejectCallback(x.e, false);
+ } else {
+ debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
+ promise._resolveCallback(x);
+ }
+};
+
+Promise.prototype._target = function() {
+ var ret = this;
+ while (ret._isFollowing()) ret = ret._followee();
+ return ret;
+};
+
+Promise.prototype._followee = function() {
+ return this._rejectionHandler0;
+};
+
+Promise.prototype._setFollowee = function(promise) {
+ this._rejectionHandler0 = promise;
+};
+
+Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
+ var isPromise = promise instanceof Promise;
+ var bitField = this._bitField;
+ var asyncGuaranteed = ((bitField & 134217728) !== 0);
+ if (((bitField & 65536) !== 0)) {
+ if (isPromise) promise._invokeInternalOnCancel();
+
+ if (receiver instanceof PassThroughHandlerContext &&
+ receiver.isFinallyHandler()) {
+ receiver.cancelPromise = promise;
+ if (tryCatch(handler).call(receiver, value) === errorObj) {
+ promise._reject(errorObj.e);
+ }
+ } else if (handler === reflectHandler) {
+ promise._fulfill(reflectHandler.call(receiver));
+ } else if (receiver instanceof Proxyable) {
+ receiver._promiseCancelled(promise);
+ } else if (isPromise || promise instanceof PromiseArray) {
+ promise._cancel();
+ } else {
+ receiver.cancel();
+ }
+ } else if (typeof handler === "function") {
+ if (!isPromise) {
+ handler.call(receiver, value, promise);
+ } else {
+ if (asyncGuaranteed) promise._setAsyncGuaranteed();
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (receiver instanceof Proxyable) {
+ if (!receiver._isResolved()) {
+ if (((bitField & 33554432) !== 0)) {
+ receiver._promiseFulfilled(value, promise);
+ } else {
+ receiver._promiseRejected(value, promise);
+ }
+ }
+ } else if (isPromise) {
+ if (asyncGuaranteed) promise._setAsyncGuaranteed();
+ if (((bitField & 33554432) !== 0)) {
+ promise._fulfill(value);
+ } else {
+ promise._reject(value);
+ }
+ }
+};
+
+Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
+ var handler = ctx.handler;
+ var promise = ctx.promise;
+ var receiver = ctx.receiver;
+ var value = ctx.value;
+ if (typeof handler === "function") {
+ if (!(promise instanceof Promise)) {
+ handler.call(receiver, value, promise);
+ } else {
+ this._settlePromiseFromHandler(handler, receiver, value, promise);
+ }
+ } else if (promise instanceof Promise) {
+ promise._reject(value);
+ }
+};
+
+Promise.prototype._settlePromiseCtx = function(ctx) {
+ this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
+};
+
+Promise.prototype._settlePromise0 = function(handler, value, bitField) {
+ var promise = this._promise0;
+ var receiver = this._receiverAt(0);
+ this._promise0 = undefined;
+ this._receiver0 = undefined;
+ this._settlePromise(promise, handler, receiver, value);
+};
+
+Promise.prototype._clearCallbackDataAtIndex = function(index) {
+ var base = index * 4 - 4;
+ this[base + 2] =
+ this[base + 3] =
+ this[base + 0] =
+ this[base + 1] = undefined;
+};
+
+Promise.prototype._fulfill = function (value) {
+ var bitField = this._bitField;
+ if (((bitField & 117506048) >>> 16)) return;
+ if (value === this) {
+ var err = makeSelfResolutionError();
+ this._attachExtraTrace(err);
+ return this._reject(err);
+ }
+ this._setFulfilled();
+ this._rejectionHandler0 = value;
+
+ if ((bitField & 65535) > 0) {
+ if (((bitField & 134217728) !== 0)) {
+ this._settlePromises();
+ } else {
+ async.settlePromises(this);
+ }
+ this._dereferenceTrace();
+ }
+};
+
+Promise.prototype._reject = function (reason) {
+ var bitField = this._bitField;
+ if (((bitField & 117506048) >>> 16)) return;
+ this._setRejected();
+ this._fulfillmentHandler0 = reason;
+
+ if (this._isFinal()) {
+ return async.fatalError(reason, util.isNode);
+ }
+
+ if ((bitField & 65535) > 0) {
+ async.settlePromises(this);
+ } else {
+ this._ensurePossibleRejectionHandled();
+ }
+};
+
+Promise.prototype._fulfillPromises = function (len, value) {
+ for (var i = 1; i < len; i++) {
+ var handler = this._fulfillmentHandlerAt(i);
+ var promise = this._promiseAt(i);
+ var receiver = this._receiverAt(i);
+ this._clearCallbackDataAtIndex(i);
+ this._settlePromise(promise, handler, receiver, value);
+ }
+};
+
+Promise.prototype._rejectPromises = function (len, reason) {
+ for (var i = 1; i < len; i++) {
+ var handler = this._rejectionHandlerAt(i);
+ var promise = this._promiseAt(i);
+ var receiver = this._receiverAt(i);
+ this._clearCallbackDataAtIndex(i);
+ this._settlePromise(promise, handler, receiver, reason);
+ }
+};
+
+Promise.prototype._settlePromises = function () {
+ var bitField = this._bitField;
+ var len = (bitField & 65535);
+
+ if (len > 0) {
+ if (((bitField & 16842752) !== 0)) {
+ var reason = this._fulfillmentHandler0;
+ this._settlePromise0(this._rejectionHandler0, reason, bitField);
+ this._rejectPromises(len, reason);
+ } else {
+ var value = this._rejectionHandler0;
+ this._settlePromise0(this._fulfillmentHandler0, value, bitField);
+ this._fulfillPromises(len, value);
+ }
+ this._setLength(0);
+ }
+ this._clearCancellationData();
+};
+
+Promise.prototype._settledValue = function() {
+ var bitField = this._bitField;
+ if (((bitField & 33554432) !== 0)) {
+ return this._rejectionHandler0;
+ } else if (((bitField & 16777216) !== 0)) {
+ return this._fulfillmentHandler0;
+ }
+};
+
+if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
+ es5.defineProperty(Promise.prototype, Symbol.toStringTag, {
+ get: function () {
+ return "Object";
+ }
+ });
+}
+
+function deferResolve(v) {this.promise._resolveCallback(v);}
+function deferReject(v) {this.promise._rejectCallback(v, false);}
+
+Promise.defer = Promise.pending = function() {
+ debug.deprecated("Promise.defer", "new Promise");
+ var promise = new Promise(INTERNAL);
+ return {
+ promise: promise,
+ resolve: deferResolve,
+ reject: deferReject
+ };
+};
+
+util.notEnumerableProp(Promise,
+ "_makeSelfResolutionError",
+ makeSelfResolutionError);
+
+require("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
+ debug);
+require("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
+require("./cancel")(Promise, PromiseArray, apiRejection, debug);
+require("./direct_resolve")(Promise);
+require("./synchronous_inspection")(Promise);
+require("./join")(
+ Promise, PromiseArray, tryConvertToPromise, INTERNAL, async);
+Promise.Promise = Promise;
+Promise.version = "3.7.2";
+require('./call_get.js')(Promise);
+require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
+require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
+require('./nodeify.js')(Promise);
+require('./promisify.js')(Promise, INTERNAL);
+require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
+require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
+require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
+require('./settle.js')(Promise, PromiseArray, debug);
+require('./some.js')(Promise, PromiseArray, apiRejection);
+require('./timers.js')(Promise, INTERNAL, debug);
+require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
+require('./any.js')(Promise);
+require('./each.js')(Promise, INTERNAL);
+require('./filter.js')(Promise, INTERNAL);
+
+ util.toFastProperties(Promise);
+ util.toFastProperties(Promise.prototype);
+ function fillTypes(value) {
+ var p = new Promise(INTERNAL);
+ p._fulfillmentHandler0 = value;
+ p._rejectionHandler0 = value;
+ p._promise0 = value;
+ p._receiver0 = value;
+ }
+ // Complete slack tracking, opt out of field-type tracking and
+ // stabilize map
+ fillTypes({a: 1});
+ fillTypes({b: 2});
+ fillTypes({c: 3});
+ fillTypes(1);
+ fillTypes(function(){});
+ fillTypes(undefined);
+ fillTypes(false);
+ fillTypes(new Promise(INTERNAL));
+ debug.setBounds(Async.firstLineError, util.lastLineError);
+ return Promise;
+
+};
diff --git a/node_modules/bluebird/js/release/promise_array.js b/node_modules/bluebird/js/release/promise_array.js
new file mode 100644
index 0000000..8fc665a
--- /dev/null
+++ b/node_modules/bluebird/js/release/promise_array.js
@@ -0,0 +1,186 @@
+"use strict";
+module.exports = function(Promise, INTERNAL, tryConvertToPromise,
+ apiRejection, Proxyable) {
+var util = require("./util");
+var isArray = util.isArray;
+
+function toResolutionValue(val) {
+ switch(val) {
+ case -2: return [];
+ case -3: return {};
+ case -6: return new Map();
+ }
+}
+
+function PromiseArray(values) {
+ var promise = this._promise = new Promise(INTERNAL);
+ if (values instanceof Promise) {
+ promise._propagateFrom(values, 3);
+ values.suppressUnhandledRejections();
+ }
+ promise._setOnCancel(this);
+ this._values = values;
+ this._length = 0;
+ this._totalResolved = 0;
+ this._init(undefined, -2);
+}
+util.inherits(PromiseArray, Proxyable);
+
+PromiseArray.prototype.length = function () {
+ return this._length;
+};
+
+PromiseArray.prototype.promise = function () {
+ return this._promise;
+};
+
+PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
+ var values = tryConvertToPromise(this._values, this._promise);
+ if (values instanceof Promise) {
+ values = values._target();
+ var bitField = values._bitField;
+ ;
+ this._values = values;
+
+ if (((bitField & 50397184) === 0)) {
+ this._promise._setAsyncGuaranteed();
+ return values._then(
+ init,
+ this._reject,
+ undefined,
+ this,
+ resolveValueIfEmpty
+ );
+ } else if (((bitField & 33554432) !== 0)) {
+ values = values._value();
+ } else if (((bitField & 16777216) !== 0)) {
+ return this._reject(values._reason());
+ } else {
+ return this._cancel();
+ }
+ }
+ values = util.asArray(values);
+ if (values === null) {
+ var err = apiRejection(
+ "expecting an array or an iterable object but got " + util.classString(values)).reason();
+ this._promise._rejectCallback(err, false);
+ return;
+ }
+
+ if (values.length === 0) {
+ if (resolveValueIfEmpty === -5) {
+ this._resolveEmptyArray();
+ }
+ else {
+ this._resolve(toResolutionValue(resolveValueIfEmpty));
+ }
+ return;
+ }
+ this._iterate(values);
+};
+
+PromiseArray.prototype._iterate = function(values) {
+ var len = this.getActualLength(values.length);
+ this._length = len;
+ this._values = this.shouldCopyValues() ? new Array(len) : this._values;
+ var result = this._promise;
+ var isResolved = false;
+ var bitField = null;
+ for (var i = 0; i < len; ++i) {
+ var maybePromise = tryConvertToPromise(values[i], result);
+
+ if (maybePromise instanceof Promise) {
+ maybePromise = maybePromise._target();
+ bitField = maybePromise._bitField;
+ } else {
+ bitField = null;
+ }
+
+ if (isResolved) {
+ if (bitField !== null) {
+ maybePromise.suppressUnhandledRejections();
+ }
+ } else if (bitField !== null) {
+ if (((bitField & 50397184) === 0)) {
+ maybePromise._proxy(this, i);
+ this._values[i] = maybePromise;
+ } else if (((bitField & 33554432) !== 0)) {
+ isResolved = this._promiseFulfilled(maybePromise._value(), i);
+ } else if (((bitField & 16777216) !== 0)) {
+ isResolved = this._promiseRejected(maybePromise._reason(), i);
+ } else {
+ isResolved = this._promiseCancelled(i);
+ }
+ } else {
+ isResolved = this._promiseFulfilled(maybePromise, i);
+ }
+ }
+ if (!isResolved) result._setAsyncGuaranteed();
+};
+
+PromiseArray.prototype._isResolved = function () {
+ return this._values === null;
+};
+
+PromiseArray.prototype._resolve = function (value) {
+ this._values = null;
+ this._promise._fulfill(value);
+};
+
+PromiseArray.prototype._cancel = function() {
+ if (this._isResolved() || !this._promise._isCancellable()) return;
+ this._values = null;
+ this._promise._cancel();
+};
+
+PromiseArray.prototype._reject = function (reason) {
+ this._values = null;
+ this._promise._rejectCallback(reason, false);
+};
+
+PromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ return true;
+ }
+ return false;
+};
+
+PromiseArray.prototype._promiseCancelled = function() {
+ this._cancel();
+ return true;
+};
+
+PromiseArray.prototype._promiseRejected = function (reason) {
+ this._totalResolved++;
+ this._reject(reason);
+ return true;
+};
+
+PromiseArray.prototype._resultCancelled = function() {
+ if (this._isResolved()) return;
+ var values = this._values;
+ this._cancel();
+ if (values instanceof Promise) {
+ values.cancel();
+ } else {
+ for (var i = 0; i < values.length; ++i) {
+ if (values[i] instanceof Promise) {
+ values[i].cancel();
+ }
+ }
+ }
+};
+
+PromiseArray.prototype.shouldCopyValues = function () {
+ return true;
+};
+
+PromiseArray.prototype.getActualLength = function (len) {
+ return len;
+};
+
+return PromiseArray;
+};
diff --git a/node_modules/bluebird/js/release/promisify.js b/node_modules/bluebird/js/release/promisify.js
new file mode 100644
index 0000000..aa98e5b
--- /dev/null
+++ b/node_modules/bluebird/js/release/promisify.js
@@ -0,0 +1,314 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var THIS = {};
+var util = require("./util");
+var nodebackForPromise = require("./nodeback");
+var withAppended = util.withAppended;
+var maybeWrapAsError = util.maybeWrapAsError;
+var canEvaluate = util.canEvaluate;
+var TypeError = require("./errors").TypeError;
+var defaultSuffix = "Async";
+var defaultPromisified = {__isPromisified__: true};
+var noCopyProps = [
+ "arity", "length",
+ "name",
+ "arguments",
+ "caller",
+ "callee",
+ "prototype",
+ "__isPromisified__"
+];
+var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
+
+var defaultFilter = function(name) {
+ return util.isIdentifier(name) &&
+ name.charAt(0) !== "_" &&
+ name !== "constructor";
+};
+
+function propsFilter(key) {
+ return !noCopyPropsPattern.test(key);
+}
+
+function isPromisified(fn) {
+ try {
+ return fn.__isPromisified__ === true;
+ }
+ catch (e) {
+ return false;
+ }
+}
+
+function hasPromisified(obj, key, suffix) {
+ var val = util.getDataPropertyOrDefault(obj, key + suffix,
+ defaultPromisified);
+ return val ? isPromisified(val) : false;
+}
+function checkValid(ret, suffix, suffixRegexp) {
+ for (var i = 0; i < ret.length; i += 2) {
+ var key = ret[i];
+ if (suffixRegexp.test(key)) {
+ var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
+ for (var j = 0; j < ret.length; j += 2) {
+ if (ret[j] === keyWithoutAsyncSuffix) {
+ throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a"
+ .replace("%s", suffix));
+ }
+ }
+ }
+ }
+}
+
+function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
+ var keys = util.inheritedDataKeys(obj);
+ var ret = [];
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var value = obj[key];
+ var passesDefaultFilter = filter === defaultFilter
+ ? true : defaultFilter(key, value, obj);
+ if (typeof value === "function" &&
+ !isPromisified(value) &&
+ !hasPromisified(obj, key, suffix) &&
+ filter(key, value, obj, passesDefaultFilter)) {
+ ret.push(key, value);
+ }
+ }
+ checkValid(ret, suffix, suffixRegexp);
+ return ret;
+}
+
+var escapeIdentRegex = function(str) {
+ return str.replace(/([$])/, "\\$");
+};
+
+var makeNodePromisifiedEval;
+if (!false) {
+var switchCaseArgumentOrder = function(likelyArgumentCount) {
+ var ret = [likelyArgumentCount];
+ var min = Math.max(0, likelyArgumentCount - 1 - 3);
+ for(var i = likelyArgumentCount - 1; i >= min; --i) {
+ ret.push(i);
+ }
+ for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
+ ret.push(i);
+ }
+ return ret;
+};
+
+var argumentSequence = function(argumentCount) {
+ return util.filledRange(argumentCount, "_arg", "");
+};
+
+var parameterDeclaration = function(parameterCount) {
+ return util.filledRange(
+ Math.max(parameterCount, 3), "_arg", "");
+};
+
+var parameterCount = function(fn) {
+ if (typeof fn.length === "number") {
+ return Math.max(Math.min(fn.length, 1023 + 1), 0);
+ }
+ return 0;
+};
+
+makeNodePromisifiedEval =
+function(callback, receiver, originalName, fn, _, multiArgs) {
+ var newParameterCount = Math.max(0, parameterCount(fn) - 1);
+ var argumentOrder = switchCaseArgumentOrder(newParameterCount);
+ var shouldProxyThis = typeof callback === "string" || receiver === THIS;
+
+ function generateCallForArgumentCount(count) {
+ var args = argumentSequence(count).join(", ");
+ var comma = count > 0 ? ", " : "";
+ var ret;
+ if (shouldProxyThis) {
+ ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
+ } else {
+ ret = receiver === undefined
+ ? "ret = callback({{args}}, nodeback); break;\n"
+ : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
+ }
+ return ret.replace("{{args}}", args).replace(", ", comma);
+ }
+
+ function generateArgumentSwitchCase() {
+ var ret = "";
+ for (var i = 0; i < argumentOrder.length; ++i) {
+ ret += "case " + argumentOrder[i] +":" +
+ generateCallForArgumentCount(argumentOrder[i]);
+ }
+
+ ret += " \n\
+ default: \n\
+ var args = new Array(len + 1); \n\
+ var i = 0; \n\
+ for (var i = 0; i < len; ++i) { \n\
+ args[i] = arguments[i]; \n\
+ } \n\
+ args[i] = nodeback; \n\
+ [CodeForCall] \n\
+ break; \n\
+ ".replace("[CodeForCall]", (shouldProxyThis
+ ? "ret = callback.apply(this, args);\n"
+ : "ret = callback.apply(receiver, args);\n"));
+ return ret;
+ }
+
+ var getFunctionCode = typeof callback === "string"
+ ? ("this != null ? this['"+callback+"'] : fn")
+ : "fn";
+ var body = "'use strict'; \n\
+ var ret = function (Parameters) { \n\
+ 'use strict'; \n\
+ var len = arguments.length; \n\
+ var promise = new Promise(INTERNAL); \n\
+ promise._captureStackTrace(); \n\
+ var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\
+ var ret; \n\
+ var callback = tryCatch([GetFunctionCode]); \n\
+ switch(len) { \n\
+ [CodeForSwitchCase] \n\
+ } \n\
+ if (ret === errorObj) { \n\
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
+ } \n\
+ if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\
+ return promise; \n\
+ }; \n\
+ notEnumerableProp(ret, '__isPromisified__', true); \n\
+ return ret; \n\
+ ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
+ .replace("[GetFunctionCode]", getFunctionCode);
+ body = body.replace("Parameters", parameterDeclaration(newParameterCount));
+ return new Function("Promise",
+ "fn",
+ "receiver",
+ "withAppended",
+ "maybeWrapAsError",
+ "nodebackForPromise",
+ "tryCatch",
+ "errorObj",
+ "notEnumerableProp",
+ "INTERNAL",
+ body)(
+ Promise,
+ fn,
+ receiver,
+ withAppended,
+ maybeWrapAsError,
+ nodebackForPromise,
+ util.tryCatch,
+ util.errorObj,
+ util.notEnumerableProp,
+ INTERNAL);
+};
+}
+
+function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {
+ var defaultThis = (function() {return this;})();
+ var method = callback;
+ if (typeof method === "string") {
+ callback = fn;
+ }
+ function promisified() {
+ var _receiver = receiver;
+ if (receiver === THIS) _receiver = this;
+ var promise = new Promise(INTERNAL);
+ promise._captureStackTrace();
+ var cb = typeof method === "string" && this !== defaultThis
+ ? this[method] : callback;
+ var fn = nodebackForPromise(promise, multiArgs);
+ try {
+ cb.apply(_receiver, withAppended(arguments, fn));
+ } catch(e) {
+ promise._rejectCallback(maybeWrapAsError(e), true, true);
+ }
+ if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
+ return promise;
+ }
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ return promisified;
+}
+
+var makeNodePromisified = canEvaluate
+ ? makeNodePromisifiedEval
+ : makeNodePromisifiedClosure;
+
+function promisifyAll(obj, suffix, filter, promisifier, multiArgs) {
+ var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
+ var methods =
+ promisifiableMethods(obj, suffix, suffixRegexp, filter);
+
+ for (var i = 0, len = methods.length; i < len; i+= 2) {
+ var key = methods[i];
+ var fn = methods[i+1];
+ var promisifiedKey = key + suffix;
+ if (promisifier === makeNodePromisified) {
+ obj[promisifiedKey] =
+ makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);
+ } else {
+ var promisified = promisifier(fn, function() {
+ return makeNodePromisified(key, THIS, key,
+ fn, suffix, multiArgs);
+ });
+ util.notEnumerableProp(promisified, "__isPromisified__", true);
+ obj[promisifiedKey] = promisified;
+ }
+ }
+ util.toFastProperties(obj);
+ return obj;
+}
+
+function promisify(callback, receiver, multiArgs) {
+ return makeNodePromisified(callback, receiver, undefined,
+ callback, null, multiArgs);
+}
+
+Promise.promisify = function (fn, options) {
+ if (typeof fn !== "function") {
+ throw new TypeError("expecting a function but got " + util.classString(fn));
+ }
+ if (isPromisified(fn)) {
+ return fn;
+ }
+ options = Object(options);
+ var receiver = options.context === undefined ? THIS : options.context;
+ var multiArgs = !!options.multiArgs;
+ var ret = promisify(fn, receiver, multiArgs);
+ util.copyDescriptors(fn, ret, propsFilter);
+ return ret;
+};
+
+Promise.promisifyAll = function (target, options) {
+ if (typeof target !== "function" && typeof target !== "object") {
+ throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ options = Object(options);
+ var multiArgs = !!options.multiArgs;
+ var suffix = options.suffix;
+ if (typeof suffix !== "string") suffix = defaultSuffix;
+ var filter = options.filter;
+ if (typeof filter !== "function") filter = defaultFilter;
+ var promisifier = options.promisifier;
+ if (typeof promisifier !== "function") promisifier = makeNodePromisified;
+
+ if (!util.isIdentifier(suffix)) {
+ throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+
+ var keys = util.inheritedDataKeys(target);
+ for (var i = 0; i < keys.length; ++i) {
+ var value = target[keys[i]];
+ if (keys[i] !== "constructor" &&
+ util.isClass(value)) {
+ promisifyAll(value.prototype, suffix, filter, promisifier,
+ multiArgs);
+ promisifyAll(value, suffix, filter, promisifier, multiArgs);
+ }
+ }
+
+ return promisifyAll(target, suffix, filter, promisifier, multiArgs);
+};
+};
+
diff --git a/node_modules/bluebird/js/release/props.js b/node_modules/bluebird/js/release/props.js
new file mode 100644
index 0000000..6a34aaf
--- /dev/null
+++ b/node_modules/bluebird/js/release/props.js
@@ -0,0 +1,118 @@
+"use strict";
+module.exports = function(
+ Promise, PromiseArray, tryConvertToPromise, apiRejection) {
+var util = require("./util");
+var isObject = util.isObject;
+var es5 = require("./es5");
+var Es6Map;
+if (typeof Map === "function") Es6Map = Map;
+
+var mapToEntries = (function() {
+ var index = 0;
+ var size = 0;
+
+ function extractEntry(value, key) {
+ this[index] = value;
+ this[index + size] = key;
+ index++;
+ }
+
+ return function mapToEntries(map) {
+ size = map.size;
+ index = 0;
+ var ret = new Array(map.size * 2);
+ map.forEach(extractEntry, ret);
+ return ret;
+ };
+})();
+
+var entriesToMap = function(entries) {
+ var ret = new Es6Map();
+ var length = entries.length / 2 | 0;
+ for (var i = 0; i < length; ++i) {
+ var key = entries[length + i];
+ var value = entries[i];
+ ret.set(key, value);
+ }
+ return ret;
+};
+
+function PropertiesPromiseArray(obj) {
+ var isMap = false;
+ var entries;
+ if (Es6Map !== undefined && obj instanceof Es6Map) {
+ entries = mapToEntries(obj);
+ isMap = true;
+ } else {
+ var keys = es5.keys(obj);
+ var len = keys.length;
+ entries = new Array(len * 2);
+ for (var i = 0; i < len; ++i) {
+ var key = keys[i];
+ entries[i] = obj[key];
+ entries[i + len] = key;
+ }
+ }
+ this.constructor$(entries);
+ this._isMap = isMap;
+ this._init$(undefined, isMap ? -6 : -3);
+}
+util.inherits(PropertiesPromiseArray, PromiseArray);
+
+PropertiesPromiseArray.prototype._init = function () {};
+
+PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ this._values[index] = value;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ var val;
+ if (this._isMap) {
+ val = entriesToMap(this._values);
+ } else {
+ val = {};
+ var keyOffset = this.length();
+ for (var i = 0, len = this.length(); i < len; ++i) {
+ val[this._values[i + keyOffset]] = this._values[i];
+ }
+ }
+ this._resolve(val);
+ return true;
+ }
+ return false;
+};
+
+PropertiesPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+PropertiesPromiseArray.prototype.getActualLength = function (len) {
+ return len >> 1;
+};
+
+function props(promises) {
+ var ret;
+ var castValue = tryConvertToPromise(promises);
+
+ if (!isObject(castValue)) {
+ return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ } else if (castValue instanceof Promise) {
+ ret = castValue._then(
+ Promise.props, undefined, undefined, undefined, undefined);
+ } else {
+ ret = new PropertiesPromiseArray(castValue).promise();
+ }
+
+ if (castValue instanceof Promise) {
+ ret._propagateFrom(castValue, 2);
+ }
+ return ret;
+}
+
+Promise.prototype.props = function () {
+ return props(this);
+};
+
+Promise.props = function (promises) {
+ return props(promises);
+};
+};
diff --git a/node_modules/bluebird/js/release/queue.js b/node_modules/bluebird/js/release/queue.js
new file mode 100644
index 0000000..ffd36fd
--- /dev/null
+++ b/node_modules/bluebird/js/release/queue.js
@@ -0,0 +1,73 @@
+"use strict";
+function arrayMove(src, srcIndex, dst, dstIndex, len) {
+ for (var j = 0; j < len; ++j) {
+ dst[j + dstIndex] = src[j + srcIndex];
+ src[j + srcIndex] = void 0;
+ }
+}
+
+function Queue(capacity) {
+ this._capacity = capacity;
+ this._length = 0;
+ this._front = 0;
+}
+
+Queue.prototype._willBeOverCapacity = function (size) {
+ return this._capacity < size;
+};
+
+Queue.prototype._pushOne = function (arg) {
+ var length = this.length();
+ this._checkCapacity(length + 1);
+ var i = (this._front + length) & (this._capacity - 1);
+ this[i] = arg;
+ this._length = length + 1;
+};
+
+Queue.prototype.push = function (fn, receiver, arg) {
+ var length = this.length() + 3;
+ if (this._willBeOverCapacity(length)) {
+ this._pushOne(fn);
+ this._pushOne(receiver);
+ this._pushOne(arg);
+ return;
+ }
+ var j = this._front + length - 3;
+ this._checkCapacity(length);
+ var wrapMask = this._capacity - 1;
+ this[(j + 0) & wrapMask] = fn;
+ this[(j + 1) & wrapMask] = receiver;
+ this[(j + 2) & wrapMask] = arg;
+ this._length = length;
+};
+
+Queue.prototype.shift = function () {
+ var front = this._front,
+ ret = this[front];
+
+ this[front] = undefined;
+ this._front = (front + 1) & (this._capacity - 1);
+ this._length--;
+ return ret;
+};
+
+Queue.prototype.length = function () {
+ return this._length;
+};
+
+Queue.prototype._checkCapacity = function (size) {
+ if (this._capacity < size) {
+ this._resizeTo(this._capacity << 1);
+ }
+};
+
+Queue.prototype._resizeTo = function (capacity) {
+ var oldCapacity = this._capacity;
+ this._capacity = capacity;
+ var front = this._front;
+ var length = this._length;
+ var moveItemsCount = (front + length) & (oldCapacity - 1);
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
+};
+
+module.exports = Queue;
diff --git a/node_modules/bluebird/js/release/race.js b/node_modules/bluebird/js/release/race.js
new file mode 100644
index 0000000..b862f46
--- /dev/null
+++ b/node_modules/bluebird/js/release/race.js
@@ -0,0 +1,49 @@
+"use strict";
+module.exports = function(
+ Promise, INTERNAL, tryConvertToPromise, apiRejection) {
+var util = require("./util");
+
+var raceLater = function (promise) {
+ return promise.then(function(array) {
+ return race(array, promise);
+ });
+};
+
+function race(promises, parent) {
+ var maybePromise = tryConvertToPromise(promises);
+
+ if (maybePromise instanceof Promise) {
+ return raceLater(maybePromise);
+ } else {
+ promises = util.asArray(promises);
+ if (promises === null)
+ return apiRejection("expecting an array or an iterable object but got " + util.classString(promises));
+ }
+
+ var ret = new Promise(INTERNAL);
+ if (parent !== undefined) {
+ ret._propagateFrom(parent, 3);
+ }
+ var fulfill = ret._fulfill;
+ var reject = ret._reject;
+ for (var i = 0, len = promises.length; i < len; ++i) {
+ var val = promises[i];
+
+ if (val === undefined && !(i in promises)) {
+ continue;
+ }
+
+ Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
+ }
+ return ret;
+}
+
+Promise.race = function (promises) {
+ return race(promises, undefined);
+};
+
+Promise.prototype.race = function () {
+ return race(this, undefined);
+};
+
+};
diff --git a/node_modules/bluebird/js/release/reduce.js b/node_modules/bluebird/js/release/reduce.js
new file mode 100644
index 0000000..101ac22
--- /dev/null
+++ b/node_modules/bluebird/js/release/reduce.js
@@ -0,0 +1,183 @@
+"use strict";
+module.exports = function(Promise,
+ PromiseArray,
+ apiRejection,
+ tryConvertToPromise,
+ INTERNAL,
+ debug) {
+var util = require("./util");
+var tryCatch = util.tryCatch;
+
+function ReductionPromiseArray(promises, fn, initialValue, _each) {
+ this.constructor$(promises);
+ var context = Promise._getContext();
+ this._fn = util.contextBind(context, fn);
+ if (initialValue !== undefined) {
+ initialValue = Promise.resolve(initialValue);
+ initialValue._attachCancellationCallback(this);
+ }
+ this._initialValue = initialValue;
+ this._currentCancellable = null;
+ if(_each === INTERNAL) {
+ this._eachValues = Array(this._length);
+ } else if (_each === 0) {
+ this._eachValues = null;
+ } else {
+ this._eachValues = undefined;
+ }
+ this._promise._captureStackTrace();
+ this._init$(undefined, -5);
+}
+util.inherits(ReductionPromiseArray, PromiseArray);
+
+ReductionPromiseArray.prototype._gotAccum = function(accum) {
+ if (this._eachValues !== undefined &&
+ this._eachValues !== null &&
+ accum !== INTERNAL) {
+ this._eachValues.push(accum);
+ }
+};
+
+ReductionPromiseArray.prototype._eachComplete = function(value) {
+ if (this._eachValues !== null) {
+ this._eachValues.push(value);
+ }
+ return this._eachValues;
+};
+
+ReductionPromiseArray.prototype._init = function() {};
+
+ReductionPromiseArray.prototype._resolveEmptyArray = function() {
+ this._resolve(this._eachValues !== undefined ? this._eachValues
+ : this._initialValue);
+};
+
+ReductionPromiseArray.prototype.shouldCopyValues = function () {
+ return false;
+};
+
+ReductionPromiseArray.prototype._resolve = function(value) {
+ this._promise._resolveCallback(value);
+ this._values = null;
+};
+
+ReductionPromiseArray.prototype._resultCancelled = function(sender) {
+ if (sender === this._initialValue) return this._cancel();
+ if (this._isResolved()) return;
+ this._resultCancelled$();
+ if (this._currentCancellable instanceof Promise) {
+ this._currentCancellable.cancel();
+ }
+ if (this._initialValue instanceof Promise) {
+ this._initialValue.cancel();
+ }
+};
+
+ReductionPromiseArray.prototype._iterate = function (values) {
+ this._values = values;
+ var value;
+ var i;
+ var length = values.length;
+ if (this._initialValue !== undefined) {
+ value = this._initialValue;
+ i = 0;
+ } else {
+ value = Promise.resolve(values[0]);
+ i = 1;
+ }
+
+ this._currentCancellable = value;
+
+ for (var j = i; j < length; ++j) {
+ var maybePromise = values[j];
+ if (maybePromise instanceof Promise) {
+ maybePromise.suppressUnhandledRejections();
+ }
+ }
+
+ if (!value.isRejected()) {
+ for (; i < length; ++i) {
+ var ctx = {
+ accum: null,
+ value: values[i],
+ index: i,
+ length: length,
+ array: this
+ };
+
+ value = value._then(gotAccum, undefined, undefined, ctx, undefined);
+
+ if ((i & 127) === 0) {
+ value._setNoAsyncGuarantee();
+ }
+ }
+ }
+
+ if (this._eachValues !== undefined) {
+ value = value
+ ._then(this._eachComplete, undefined, undefined, this, undefined);
+ }
+ value._then(completed, completed, undefined, value, this);
+};
+
+Promise.prototype.reduce = function (fn, initialValue) {
+ return reduce(this, fn, initialValue, null);
+};
+
+Promise.reduce = function (promises, fn, initialValue, _each) {
+ return reduce(promises, fn, initialValue, _each);
+};
+
+function completed(valueOrReason, array) {
+ if (this.isFulfilled()) {
+ array._resolve(valueOrReason);
+ } else {
+ array._reject(valueOrReason);
+ }
+}
+
+function reduce(promises, fn, initialValue, _each) {
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
+ return array.promise();
+}
+
+function gotAccum(accum) {
+ this.accum = accum;
+ this.array._gotAccum(accum);
+ var value = tryConvertToPromise(this.value, this.array._promise);
+ if (value instanceof Promise) {
+ this.array._currentCancellable = value;
+ return value._then(gotValue, undefined, undefined, this, undefined);
+ } else {
+ return gotValue.call(this, value);
+ }
+}
+
+function gotValue(value) {
+ var array = this.array;
+ var promise = array._promise;
+ var fn = tryCatch(array._fn);
+ promise._pushContext();
+ var ret;
+ if (array._eachValues !== undefined) {
+ ret = fn.call(promise._boundValue(), value, this.index, this.length);
+ } else {
+ ret = fn.call(promise._boundValue(),
+ this.accum, value, this.index, this.length);
+ }
+ if (ret instanceof Promise) {
+ array._currentCancellable = ret;
+ }
+ var promiseCreated = promise._popContext();
+ debug.checkForgottenReturns(
+ ret,
+ promiseCreated,
+ array._eachValues !== undefined ? "Promise.each" : "Promise.reduce",
+ promise
+ );
+ return ret;
+}
+};
diff --git a/node_modules/bluebird/js/release/schedule.js b/node_modules/bluebird/js/release/schedule.js
new file mode 100644
index 0000000..15197d1
--- /dev/null
+++ b/node_modules/bluebird/js/release/schedule.js
@@ -0,0 +1,62 @@
+"use strict";
+var util = require("./util");
+var schedule;
+var noAsyncScheduler = function() {
+ throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+};
+var NativePromise = util.getNativePromise();
+if (util.isNode && typeof MutationObserver === "undefined") {
+ var GlobalSetImmediate = global.setImmediate;
+ var ProcessNextTick = process.nextTick;
+ schedule = util.isRecentNode
+ ? function(fn) { GlobalSetImmediate.call(global, fn); }
+ : function(fn) { ProcessNextTick.call(process, fn); };
+} else if (typeof NativePromise === "function" &&
+ typeof NativePromise.resolve === "function") {
+ var nativePromise = NativePromise.resolve();
+ schedule = function(fn) {
+ nativePromise.then(fn);
+ };
+} else if ((typeof MutationObserver !== "undefined") &&
+ !(typeof window !== "undefined" &&
+ window.navigator &&
+ (window.navigator.standalone || window.cordova)) &&
+ ("classList" in document.documentElement)) {
+ schedule = (function() {
+ var div = document.createElement("div");
+ var opts = {attributes: true};
+ var toggleScheduled = false;
+ var div2 = document.createElement("div");
+ var o2 = new MutationObserver(function() {
+ div.classList.toggle("foo");
+ toggleScheduled = false;
+ });
+ o2.observe(div2, opts);
+
+ var scheduleToggle = function() {
+ if (toggleScheduled) return;
+ toggleScheduled = true;
+ div2.classList.toggle("foo");
+ };
+
+ return function schedule(fn) {
+ var o = new MutationObserver(function() {
+ o.disconnect();
+ fn();
+ });
+ o.observe(div, opts);
+ scheduleToggle();
+ };
+ })();
+} else if (typeof setImmediate !== "undefined") {
+ schedule = function (fn) {
+ setImmediate(fn);
+ };
+} else if (typeof setTimeout !== "undefined") {
+ schedule = function (fn) {
+ setTimeout(fn, 0);
+ };
+} else {
+ schedule = noAsyncScheduler;
+}
+module.exports = schedule;
diff --git a/node_modules/bluebird/js/release/settle.js b/node_modules/bluebird/js/release/settle.js
new file mode 100644
index 0000000..e24b204
--- /dev/null
+++ b/node_modules/bluebird/js/release/settle.js
@@ -0,0 +1,47 @@
+"use strict";
+module.exports =
+ function(Promise, PromiseArray, debug) {
+var PromiseInspection = Promise.PromiseInspection;
+var util = require("./util");
+
+function SettledPromiseArray(values) {
+ this.constructor$(values);
+}
+util.inherits(SettledPromiseArray, PromiseArray);
+
+SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
+ this._values[index] = inspection;
+ var totalResolved = ++this._totalResolved;
+ if (totalResolved >= this._length) {
+ this._resolve(this._values);
+ return true;
+ }
+ return false;
+};
+
+SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 33554432;
+ ret._settledValueField = value;
+ return this._promiseResolved(index, ret);
+};
+SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
+ var ret = new PromiseInspection();
+ ret._bitField = 16777216;
+ ret._settledValueField = reason;
+ return this._promiseResolved(index, ret);
+};
+
+Promise.settle = function (promises) {
+ debug.deprecated(".settle()", ".reflect()");
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.allSettled = function (promises) {
+ return new SettledPromiseArray(promises).promise();
+};
+
+Promise.prototype.settle = function () {
+ return Promise.settle(this);
+};
+};
diff --git a/node_modules/bluebird/js/release/some.js b/node_modules/bluebird/js/release/some.js
new file mode 100644
index 0000000..400d852
--- /dev/null
+++ b/node_modules/bluebird/js/release/some.js
@@ -0,0 +1,148 @@
+"use strict";
+module.exports =
+function(Promise, PromiseArray, apiRejection) {
+var util = require("./util");
+var RangeError = require("./errors").RangeError;
+var AggregateError = require("./errors").AggregateError;
+var isArray = util.isArray;
+var CANCELLATION = {};
+
+
+function SomePromiseArray(values) {
+ this.constructor$(values);
+ this._howMany = 0;
+ this._unwrap = false;
+ this._initialized = false;
+}
+util.inherits(SomePromiseArray, PromiseArray);
+
+SomePromiseArray.prototype._init = function () {
+ if (!this._initialized) {
+ return;
+ }
+ if (this._howMany === 0) {
+ this._resolve([]);
+ return;
+ }
+ this._init$(undefined, -5);
+ var isArrayResolved = isArray(this._values);
+ if (!this._isResolved() &&
+ isArrayResolved &&
+ this._howMany > this._canPossiblyFulfill()) {
+ this._reject(this._getRangeError(this.length()));
+ }
+};
+
+SomePromiseArray.prototype.init = function () {
+ this._initialized = true;
+ this._init();
+};
+
+SomePromiseArray.prototype.setUnwrap = function () {
+ this._unwrap = true;
+};
+
+SomePromiseArray.prototype.howMany = function () {
+ return this._howMany;
+};
+
+SomePromiseArray.prototype.setHowMany = function (count) {
+ this._howMany = count;
+};
+
+SomePromiseArray.prototype._promiseFulfilled = function (value) {
+ this._addFulfilled(value);
+ if (this._fulfilled() === this.howMany()) {
+ this._values.length = this.howMany();
+ if (this.howMany() === 1 && this._unwrap) {
+ this._resolve(this._values[0]);
+ } else {
+ this._resolve(this._values);
+ }
+ return true;
+ }
+ return false;
+
+};
+SomePromiseArray.prototype._promiseRejected = function (reason) {
+ this._addRejected(reason);
+ return this._checkOutcome();
+};
+
+SomePromiseArray.prototype._promiseCancelled = function () {
+ if (this._values instanceof Promise || this._values == null) {
+ return this._cancel();
+ }
+ this._addRejected(CANCELLATION);
+ return this._checkOutcome();
+};
+
+SomePromiseArray.prototype._checkOutcome = function() {
+ if (this.howMany() > this._canPossiblyFulfill()) {
+ var e = new AggregateError();
+ for (var i = this.length(); i < this._values.length; ++i) {
+ if (this._values[i] !== CANCELLATION) {
+ e.push(this._values[i]);
+ }
+ }
+ if (e.length > 0) {
+ this._reject(e);
+ } else {
+ this._cancel();
+ }
+ return true;
+ }
+ return false;
+};
+
+SomePromiseArray.prototype._fulfilled = function () {
+ return this._totalResolved;
+};
+
+SomePromiseArray.prototype._rejected = function () {
+ return this._values.length - this.length();
+};
+
+SomePromiseArray.prototype._addRejected = function (reason) {
+ this._values.push(reason);
+};
+
+SomePromiseArray.prototype._addFulfilled = function (value) {
+ this._values[this._totalResolved++] = value;
+};
+
+SomePromiseArray.prototype._canPossiblyFulfill = function () {
+ return this.length() - this._rejected();
+};
+
+SomePromiseArray.prototype._getRangeError = function (count) {
+ var message = "Input array must contain at least " +
+ this._howMany + " items but contains only " + count + " items";
+ return new RangeError(message);
+};
+
+SomePromiseArray.prototype._resolveEmptyArray = function () {
+ this._reject(this._getRangeError(0));
+};
+
+function some(promises, howMany) {
+ if ((howMany | 0) !== howMany || howMany < 0) {
+ return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ var ret = new SomePromiseArray(promises);
+ var promise = ret.promise();
+ ret.setHowMany(howMany);
+ ret.init();
+ return promise;
+}
+
+Promise.some = function (promises, howMany) {
+ return some(promises, howMany);
+};
+
+Promise.prototype.some = function (howMany) {
+ return some(this, howMany);
+};
+
+Promise._SomePromiseArray = SomePromiseArray;
+};
diff --git a/node_modules/bluebird/js/release/synchronous_inspection.js b/node_modules/bluebird/js/release/synchronous_inspection.js
new file mode 100644
index 0000000..9c49d2e
--- /dev/null
+++ b/node_modules/bluebird/js/release/synchronous_inspection.js
@@ -0,0 +1,103 @@
+"use strict";
+module.exports = function(Promise) {
+function PromiseInspection(promise) {
+ if (promise !== undefined) {
+ promise = promise._target();
+ this._bitField = promise._bitField;
+ this._settledValueField = promise._isFateSealed()
+ ? promise._settledValue() : undefined;
+ }
+ else {
+ this._bitField = 0;
+ this._settledValueField = undefined;
+ }
+}
+
+PromiseInspection.prototype._settledValue = function() {
+ return this._settledValueField;
+};
+
+var value = PromiseInspection.prototype.value = function () {
+ if (!this.isFulfilled()) {
+ throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ return this._settledValue();
+};
+
+var reason = PromiseInspection.prototype.error =
+PromiseInspection.prototype.reason = function () {
+ if (!this.isRejected()) {
+ throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
+ }
+ return this._settledValue();
+};
+
+var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
+ return (this._bitField & 33554432) !== 0;
+};
+
+var isRejected = PromiseInspection.prototype.isRejected = function () {
+ return (this._bitField & 16777216) !== 0;
+};
+
+var isPending = PromiseInspection.prototype.isPending = function () {
+ return (this._bitField & 50397184) === 0;
+};
+
+var isResolved = PromiseInspection.prototype.isResolved = function () {
+ return (this._bitField & 50331648) !== 0;
+};
+
+PromiseInspection.prototype.isCancelled = function() {
+ return (this._bitField & 8454144) !== 0;
+};
+
+Promise.prototype.__isCancelled = function() {
+ return (this._bitField & 65536) === 65536;
+};
+
+Promise.prototype._isCancelled = function() {
+ return this._target().__isCancelled();
+};
+
+Promise.prototype.isCancelled = function() {
+ return (this._target()._bitField & 8454144) !== 0;
+};
+
+Promise.prototype.isPending = function() {
+ return isPending.call(this._target());
+};
+
+Promise.prototype.isRejected = function() {
+ return isRejected.call(this._target());
+};
+
+Promise.prototype.isFulfilled = function() {
+ return isFulfilled.call(this._target());
+};
+
+Promise.prototype.isResolved = function() {
+ return isResolved.call(this._target());
+};
+
+Promise.prototype.value = function() {
+ return value.call(this._target());
+};
+
+Promise.prototype.reason = function() {
+ var target = this._target();
+ target._unsetRejectionIsUnhandled();
+ return reason.call(target);
+};
+
+Promise.prototype._value = function() {
+ return this._settledValue();
+};
+
+Promise.prototype._reason = function() {
+ this._unsetRejectionIsUnhandled();
+ return this._settledValue();
+};
+
+Promise.PromiseInspection = PromiseInspection;
+};
diff --git a/node_modules/bluebird/js/release/thenables.js b/node_modules/bluebird/js/release/thenables.js
new file mode 100644
index 0000000..d6ab9aa
--- /dev/null
+++ b/node_modules/bluebird/js/release/thenables.js
@@ -0,0 +1,86 @@
+"use strict";
+module.exports = function(Promise, INTERNAL) {
+var util = require("./util");
+var errorObj = util.errorObj;
+var isObject = util.isObject;
+
+function tryConvertToPromise(obj, context) {
+ if (isObject(obj)) {
+ if (obj instanceof Promise) return obj;
+ var then = getThen(obj);
+ if (then === errorObj) {
+ if (context) context._pushContext();
+ var ret = Promise.reject(then.e);
+ if (context) context._popContext();
+ return ret;
+ } else if (typeof then === "function") {
+ if (isAnyBluebirdPromise(obj)) {
+ var ret = new Promise(INTERNAL);
+ obj._then(
+ ret._fulfill,
+ ret._reject,
+ undefined,
+ ret,
+ null
+ );
+ return ret;
+ }
+ return doThenable(obj, then, context);
+ }
+ }
+ return obj;
+}
+
+function doGetThen(obj) {
+ return obj.then;
+}
+
+function getThen(obj) {
+ try {
+ return doGetThen(obj);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+
+var hasProp = {}.hasOwnProperty;
+function isAnyBluebirdPromise(obj) {
+ try {
+ return hasProp.call(obj, "_promise0");
+ } catch (e) {
+ return false;
+ }
+}
+
+function doThenable(x, then, context) {
+ var promise = new Promise(INTERNAL);
+ var ret = promise;
+ if (context) context._pushContext();
+ promise._captureStackTrace();
+ if (context) context._popContext();
+ var synchronous = true;
+ var result = util.tryCatch(then).call(x, resolve, reject);
+ synchronous = false;
+
+ if (promise && result === errorObj) {
+ promise._rejectCallback(result.e, true, true);
+ promise = null;
+ }
+
+ function resolve(value) {
+ if (!promise) return;
+ promise._resolveCallback(value);
+ promise = null;
+ }
+
+ function reject(reason) {
+ if (!promise) return;
+ promise._rejectCallback(reason, synchronous, true);
+ promise = null;
+ }
+ return ret;
+}
+
+return tryConvertToPromise;
+};
diff --git a/node_modules/bluebird/js/release/timers.js b/node_modules/bluebird/js/release/timers.js
new file mode 100644
index 0000000..cb8f1f4
--- /dev/null
+++ b/node_modules/bluebird/js/release/timers.js
@@ -0,0 +1,93 @@
+"use strict";
+module.exports = function(Promise, INTERNAL, debug) {
+var util = require("./util");
+var TimeoutError = Promise.TimeoutError;
+
+function HandleWrapper(handle) {
+ this.handle = handle;
+}
+
+HandleWrapper.prototype._resultCancelled = function() {
+ clearTimeout(this.handle);
+};
+
+var afterValue = function(value) { return delay(+this).thenReturn(value); };
+var delay = Promise.delay = function (ms, value) {
+ var ret;
+ var handle;
+ if (value !== undefined) {
+ ret = Promise.resolve(value)
+ ._then(afterValue, null, null, ms, undefined);
+ if (debug.cancellation() && value instanceof Promise) {
+ ret._setOnCancel(value);
+ }
+ } else {
+ ret = new Promise(INTERNAL);
+ handle = setTimeout(function() { ret._fulfill(); }, +ms);
+ if (debug.cancellation()) {
+ ret._setOnCancel(new HandleWrapper(handle));
+ }
+ ret._captureStackTrace();
+ }
+ ret._setAsyncGuaranteed();
+ return ret;
+};
+
+Promise.prototype.delay = function (ms) {
+ return delay(ms, this);
+};
+
+var afterTimeout = function (promise, message, parent) {
+ var err;
+ if (typeof message !== "string") {
+ if (message instanceof Error) {
+ err = message;
+ } else {
+ err = new TimeoutError("operation timed out");
+ }
+ } else {
+ err = new TimeoutError(message);
+ }
+ util.markAsOriginatingFromRejection(err);
+ promise._attachExtraTrace(err);
+ promise._reject(err);
+
+ if (parent != null) {
+ parent.cancel();
+ }
+};
+
+function successClear(value) {
+ clearTimeout(this.handle);
+ return value;
+}
+
+function failureClear(reason) {
+ clearTimeout(this.handle);
+ throw reason;
+}
+
+Promise.prototype.timeout = function (ms, message) {
+ ms = +ms;
+ var ret, parent;
+
+ var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {
+ if (ret.isPending()) {
+ afterTimeout(ret, message, parent);
+ }
+ }, ms));
+
+ if (debug.cancellation()) {
+ parent = this.then();
+ ret = parent._then(successClear, failureClear,
+ undefined, handleWrapper, undefined);
+ ret._setOnCancel(handleWrapper);
+ } else {
+ ret = this._then(successClear, failureClear,
+ undefined, handleWrapper, undefined);
+ }
+
+ return ret;
+};
+
+};
diff --git a/node_modules/bluebird/js/release/using.js b/node_modules/bluebird/js/release/using.js
new file mode 100644
index 0000000..65de531
--- /dev/null
+++ b/node_modules/bluebird/js/release/using.js
@@ -0,0 +1,226 @@
+"use strict";
+module.exports = function (Promise, apiRejection, tryConvertToPromise,
+ createContext, INTERNAL, debug) {
+ var util = require("./util");
+ var TypeError = require("./errors").TypeError;
+ var inherits = require("./util").inherits;
+ var errorObj = util.errorObj;
+ var tryCatch = util.tryCatch;
+ var NULL = {};
+
+ function thrower(e) {
+ setTimeout(function(){throw e;}, 0);
+ }
+
+ function castPreservingDisposable(thenable) {
+ var maybePromise = tryConvertToPromise(thenable);
+ if (maybePromise !== thenable &&
+ typeof thenable._isDisposable === "function" &&
+ typeof thenable._getDisposer === "function" &&
+ thenable._isDisposable()) {
+ maybePromise._setDisposable(thenable._getDisposer());
+ }
+ return maybePromise;
+ }
+ function dispose(resources, inspection) {
+ var i = 0;
+ var len = resources.length;
+ var ret = new Promise(INTERNAL);
+ function iterator() {
+ if (i >= len) return ret._fulfill();
+ var maybePromise = castPreservingDisposable(resources[i++]);
+ if (maybePromise instanceof Promise &&
+ maybePromise._isDisposable()) {
+ try {
+ maybePromise = tryConvertToPromise(
+ maybePromise._getDisposer().tryDispose(inspection),
+ resources.promise);
+ } catch (e) {
+ return thrower(e);
+ }
+ if (maybePromise instanceof Promise) {
+ return maybePromise._then(iterator, thrower,
+ null, null, null);
+ }
+ }
+ iterator();
+ }
+ iterator();
+ return ret;
+ }
+
+ function Disposer(data, promise, context) {
+ this._data = data;
+ this._promise = promise;
+ this._context = context;
+ }
+
+ Disposer.prototype.data = function () {
+ return this._data;
+ };
+
+ Disposer.prototype.promise = function () {
+ return this._promise;
+ };
+
+ Disposer.prototype.resource = function () {
+ if (this.promise().isFulfilled()) {
+ return this.promise().value();
+ }
+ return NULL;
+ };
+
+ Disposer.prototype.tryDispose = function(inspection) {
+ var resource = this.resource();
+ var context = this._context;
+ if (context !== undefined) context._pushContext();
+ var ret = resource !== NULL
+ ? this.doDispose(resource, inspection) : null;
+ if (context !== undefined) context._popContext();
+ this._promise._unsetDisposable();
+ this._data = null;
+ return ret;
+ };
+
+ Disposer.isDisposer = function (d) {
+ return (d != null &&
+ typeof d.resource === "function" &&
+ typeof d.tryDispose === "function");
+ };
+
+ function FunctionDisposer(fn, promise, context) {
+ this.constructor$(fn, promise, context);
+ }
+ inherits(FunctionDisposer, Disposer);
+
+ FunctionDisposer.prototype.doDispose = function (resource, inspection) {
+ var fn = this.data();
+ return fn.call(resource, resource, inspection);
+ };
+
+ function maybeUnwrapDisposer(value) {
+ if (Disposer.isDisposer(value)) {
+ this.resources[this.index]._setDisposable(value);
+ return value.promise();
+ }
+ return value;
+ }
+
+ function ResourceList(length) {
+ this.length = length;
+ this.promise = null;
+ this[length-1] = null;
+ }
+
+ ResourceList.prototype._resultCancelled = function() {
+ var len = this.length;
+ for (var i = 0; i < len; ++i) {
+ var item = this[i];
+ if (item instanceof Promise) {
+ item.cancel();
+ }
+ }
+ };
+
+ Promise.using = function () {
+ var len = arguments.length;
+ if (len < 2) return apiRejection(
+ "you must pass at least 2 arguments to Promise.using");
+ var fn = arguments[len - 1];
+ if (typeof fn !== "function") {
+ return apiRejection("expecting a function but got " + util.classString(fn));
+ }
+ var input;
+ var spreadArgs = true;
+ if (len === 2 && Array.isArray(arguments[0])) {
+ input = arguments[0];
+ len = input.length;
+ spreadArgs = false;
+ } else {
+ input = arguments;
+ len--;
+ }
+ var resources = new ResourceList(len);
+ for (var i = 0; i < len; ++i) {
+ var resource = input[i];
+ if (Disposer.isDisposer(resource)) {
+ var disposer = resource;
+ resource = resource.promise();
+ resource._setDisposable(disposer);
+ } else {
+ var maybePromise = tryConvertToPromise(resource);
+ if (maybePromise instanceof Promise) {
+ resource =
+ maybePromise._then(maybeUnwrapDisposer, null, null, {
+ resources: resources,
+ index: i
+ }, undefined);
+ }
+ }
+ resources[i] = resource;
+ }
+
+ var reflectedResources = new Array(resources.length);
+ for (var i = 0; i < reflectedResources.length; ++i) {
+ reflectedResources[i] = Promise.resolve(resources[i]).reflect();
+ }
+
+ var resultPromise = Promise.all(reflectedResources)
+ .then(function(inspections) {
+ for (var i = 0; i < inspections.length; ++i) {
+ var inspection = inspections[i];
+ if (inspection.isRejected()) {
+ errorObj.e = inspection.error();
+ return errorObj;
+ } else if (!inspection.isFulfilled()) {
+ resultPromise.cancel();
+ return;
+ }
+ inspections[i] = inspection.value();
+ }
+ promise._pushContext();
+
+ fn = tryCatch(fn);
+ var ret = spreadArgs
+ ? fn.apply(undefined, inspections) : fn(inspections);
+ var promiseCreated = promise._popContext();
+ debug.checkForgottenReturns(
+ ret, promiseCreated, "Promise.using", promise);
+ return ret;
+ });
+
+ var promise = resultPromise.lastly(function() {
+ var inspection = new Promise.PromiseInspection(resultPromise);
+ return dispose(resources, inspection);
+ });
+ resources.promise = promise;
+ promise._setOnCancel(resources);
+ return promise;
+ };
+
+ Promise.prototype._setDisposable = function (disposer) {
+ this._bitField = this._bitField | 131072;
+ this._disposer = disposer;
+ };
+
+ Promise.prototype._isDisposable = function () {
+ return (this._bitField & 131072) > 0;
+ };
+
+ Promise.prototype._getDisposer = function () {
+ return this._disposer;
+ };
+
+ Promise.prototype._unsetDisposable = function () {
+ this._bitField = this._bitField & (~131072);
+ this._disposer = undefined;
+ };
+
+ Promise.prototype.disposer = function (fn) {
+ if (typeof fn === "function") {
+ return new FunctionDisposer(fn, this, createContext());
+ }
+ throw new TypeError();
+ };
+
+};
diff --git a/node_modules/bluebird/js/release/util.js b/node_modules/bluebird/js/release/util.js
new file mode 100644
index 0000000..8ca4d91
--- /dev/null
+++ b/node_modules/bluebird/js/release/util.js
@@ -0,0 +1,421 @@
+"use strict";
+var es5 = require("./es5");
+var canEvaluate = typeof navigator == "undefined";
+
+var errorObj = {e: {}};
+var tryCatchTarget;
+var globalObject = typeof self !== "undefined" ? self :
+ typeof window !== "undefined" ? window :
+ typeof global !== "undefined" ? global :
+ this !== undefined ? this : null;
+
+function tryCatcher() {
+ try {
+ var target = tryCatchTarget;
+ tryCatchTarget = null;
+ return target.apply(this, arguments);
+ } catch (e) {
+ errorObj.e = e;
+ return errorObj;
+ }
+}
+function tryCatch(fn) {
+ tryCatchTarget = fn;
+ return tryCatcher;
+}
+
+var inherits = function(Child, Parent) {
+ var hasProp = {}.hasOwnProperty;
+
+ function T() {
+ this.constructor = Child;
+ this.constructor$ = Parent;
+ for (var propertyName in Parent.prototype) {
+ if (hasProp.call(Parent.prototype, propertyName) &&
+ propertyName.charAt(propertyName.length-1) !== "$"
+ ) {
+ this[propertyName + "$"] = Parent.prototype[propertyName];
+ }
+ }
+ }
+ T.prototype = Parent.prototype;
+ Child.prototype = new T();
+ return Child.prototype;
+};
+
+
+function isPrimitive(val) {
+ return val == null || val === true || val === false ||
+ typeof val === "string" || typeof val === "number";
+
+}
+
+function isObject(value) {
+ return typeof value === "function" ||
+ typeof value === "object" && value !== null;
+}
+
+function maybeWrapAsError(maybeError) {
+ if (!isPrimitive(maybeError)) return maybeError;
+
+ return new Error(safeToString(maybeError));
+}
+
+function withAppended(target, appendee) {
+ var len = target.length;
+ var ret = new Array(len + 1);
+ var i;
+ for (i = 0; i < len; ++i) {
+ ret[i] = target[i];
+ }
+ ret[i] = appendee;
+ return ret;
+}
+
+function getDataPropertyOrDefault(obj, key, defaultValue) {
+ if (es5.isES5) {
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+
+ if (desc != null) {
+ return desc.get == null && desc.set == null
+ ? desc.value
+ : defaultValue;
+ }
+ } else {
+ return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
+ }
+}
+
+function notEnumerableProp(obj, name, value) {
+ if (isPrimitive(obj)) return obj;
+ var descriptor = {
+ value: value,
+ configurable: true,
+ enumerable: false,
+ writable: true
+ };
+ es5.defineProperty(obj, name, descriptor);
+ return obj;
+}
+
+function thrower(r) {
+ throw r;
+}
+
+var inheritedDataKeys = (function() {
+ var excludedPrototypes = [
+ Array.prototype,
+ Object.prototype,
+ Function.prototype
+ ];
+
+ var isExcludedProto = function(val) {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (excludedPrototypes[i] === val) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ if (es5.isES5) {
+ var getKeys = Object.getOwnPropertyNames;
+ return function(obj) {
+ var ret = [];
+ var visitedKeys = Object.create(null);
+ while (obj != null && !isExcludedProto(obj)) {
+ var keys;
+ try {
+ keys = getKeys(obj);
+ } catch (e) {
+ return ret;
+ }
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (visitedKeys[key]) continue;
+ visitedKeys[key] = true;
+ var desc = Object.getOwnPropertyDescriptor(obj, key);
+ if (desc != null && desc.get == null && desc.set == null) {
+ ret.push(key);
+ }
+ }
+ obj = es5.getPrototypeOf(obj);
+ }
+ return ret;
+ };
+ } else {
+ var hasProp = {}.hasOwnProperty;
+ return function(obj) {
+ if (isExcludedProto(obj)) return [];
+ var ret = [];
+
+ /*jshint forin:false */
+ enumeration: for (var key in obj) {
+ if (hasProp.call(obj, key)) {
+ ret.push(key);
+ } else {
+ for (var i = 0; i < excludedPrototypes.length; ++i) {
+ if (hasProp.call(excludedPrototypes[i], key)) {
+ continue enumeration;
+ }
+ }
+ ret.push(key);
+ }
+ }
+ return ret;
+ };
+ }
+
+})();
+
+var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
+function isClass(fn) {
+ try {
+ if (typeof fn === "function") {
+ var keys = es5.names(fn.prototype);
+
+ var hasMethods = es5.isES5 && keys.length > 1;
+ var hasMethodsOtherThanConstructor = keys.length > 0 &&
+ !(keys.length === 1 && keys[0] === "constructor");
+ var hasThisAssignmentAndStaticMethods =
+ thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
+
+ if (hasMethods || hasMethodsOtherThanConstructor ||
+ hasThisAssignmentAndStaticMethods) {
+ return true;
+ }
+ }
+ return false;
+ } catch (e) {
+ return false;
+ }
+}
+
+function toFastProperties(obj) {
+ /*jshint -W027,-W055,-W031*/
+ function FakeConstructor() {}
+ FakeConstructor.prototype = obj;
+ var receiver = new FakeConstructor();
+ function ic() {
+ return typeof receiver.foo;
+ }
+ ic();
+ ic();
+ return obj;
+ eval(obj);
+}
+
+var rident = /^[a-z$_][a-z$_0-9]*$/i;
+function isIdentifier(str) {
+ return rident.test(str);
+}
+
+function filledRange(count, prefix, suffix) {
+ var ret = new Array(count);
+ for(var i = 0; i < count; ++i) {
+ ret[i] = prefix + i + suffix;
+ }
+ return ret;
+}
+
+function safeToString(obj) {
+ try {
+ return obj + "";
+ } catch (e) {
+ return "[no string representation]";
+ }
+}
+
+function isError(obj) {
+ return obj instanceof Error ||
+ (obj !== null &&
+ typeof obj === "object" &&
+ typeof obj.message === "string" &&
+ typeof obj.name === "string");
+}
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isOperational", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
+ e["isOperational"] === true);
+}
+
+function canAttachTrace(obj) {
+ return isError(obj) && es5.propertyIsWritable(obj, "stack");
+}
+
+var ensureErrorObject = (function() {
+ if (!("stack" in new Error())) {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ try {throw new Error(safeToString(value));}
+ catch(err) {return err;}
+ };
+ } else {
+ return function(value) {
+ if (canAttachTrace(value)) return value;
+ return new Error(safeToString(value));
+ };
+ }
+})();
+
+function classString(obj) {
+ return {}.toString.call(obj);
+}
+
+function copyDescriptors(from, to, filter) {
+ var keys = es5.names(from);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (filter(key)) {
+ try {
+ es5.defineProperty(to, key, es5.getDescriptor(from, key));
+ } catch (ignore) {}
+ }
+ }
+}
+
+var asArray = function(v) {
+ if (es5.isArray(v)) {
+ return v;
+ }
+ return null;
+};
+
+if (typeof Symbol !== "undefined" && Symbol.iterator) {
+ var ArrayFrom = typeof Array.from === "function" ? function(v) {
+ return Array.from(v);
+ } : function(v) {
+ var ret = [];
+ var it = v[Symbol.iterator]();
+ var itResult;
+ while (!((itResult = it.next()).done)) {
+ ret.push(itResult.value);
+ }
+ return ret;
+ };
+
+ asArray = function(v) {
+ if (es5.isArray(v)) {
+ return v;
+ } else if (v != null && typeof v[Symbol.iterator] === "function") {
+ return ArrayFrom(v);
+ }
+ return null;
+ };
+}
+
+var isNode = typeof process !== "undefined" &&
+ classString(process).toLowerCase() === "[object process]";
+
+var hasEnvVariables = typeof process !== "undefined" &&
+ typeof process.env !== "undefined";
+
+function env(key) {
+ return hasEnvVariables ? process.env[key] : undefined;
+}
+
+function getNativePromise() {
+ if (typeof Promise === "function") {
+ try {
+ var promise = new Promise(function(){});
+ if (classString(promise) === "[object Promise]") {
+ return Promise;
+ }
+ } catch (e) {}
+ }
+}
+
+var reflectHandler;
+function contextBind(ctx, cb) {
+ if (ctx === null ||
+ typeof cb !== "function" ||
+ cb === reflectHandler) {
+ return cb;
+ }
+
+ if (ctx.domain !== null) {
+ cb = ctx.domain.bind(cb);
+ }
+
+ var async = ctx.async;
+ if (async !== null) {
+ var old = cb;
+ cb = function() {
+ var $_len = arguments.length + 2;var args = new Array($_len); for(var $_i = 2; $_i < $_len ; ++$_i) {args[$_i] = arguments[$_i - 2];};
+ args[0] = old;
+ args[1] = this;
+ return async.runInAsyncScope.apply(async, args);
+ };
+ }
+ return cb;
+}
+
+var ret = {
+ setReflectHandler: function(fn) {
+ reflectHandler = fn;
+ },
+ isClass: isClass,
+ isIdentifier: isIdentifier,
+ inheritedDataKeys: inheritedDataKeys,
+ getDataPropertyOrDefault: getDataPropertyOrDefault,
+ thrower: thrower,
+ isArray: es5.isArray,
+ asArray: asArray,
+ notEnumerableProp: notEnumerableProp,
+ isPrimitive: isPrimitive,
+ isObject: isObject,
+ isError: isError,
+ canEvaluate: canEvaluate,
+ errorObj: errorObj,
+ tryCatch: tryCatch,
+ inherits: inherits,
+ withAppended: withAppended,
+ maybeWrapAsError: maybeWrapAsError,
+ toFastProperties: toFastProperties,
+ filledRange: filledRange,
+ toString: safeToString,
+ canAttachTrace: canAttachTrace,
+ ensureErrorObject: ensureErrorObject,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ classString: classString,
+ copyDescriptors: copyDescriptors,
+ isNode: isNode,
+ hasEnvVariables: hasEnvVariables,
+ env: env,
+ global: globalObject,
+ getNativePromise: getNativePromise,
+ contextBind: contextBind
+};
+ret.isRecentNode = ret.isNode && (function() {
+ var version;
+ if (process.versions && process.versions.node) {
+ version = process.versions.node.split(".").map(Number);
+ } else if (process.version) {
+ version = process.version.split(".").map(Number);
+ }
+ return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
+})();
+ret.nodeSupportsAsyncResource = ret.isNode && (function() {
+ var supportsAsync = false;
+ try {
+ var res = require("async_hooks").AsyncResource;
+ supportsAsync = typeof res.prototype.runInAsyncScope === "function";
+ } catch (e) {
+ supportsAsync = false;
+ }
+ return supportsAsync;
+})();
+
+if (ret.isNode) ret.toFastProperties(process);
+
+try {throw new Error(); } catch (e) {ret.lastLineError = e;}
+module.exports = ret;
diff --git a/node_modules/bluebird/package.json b/node_modules/bluebird/package.json
new file mode 100644
index 0000000..33f696c
--- /dev/null
+++ b/node_modules/bluebird/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "bluebird",
+ "description": "Full featured Promises/A+ implementation with exceptionally good performance",
+ "version": "3.7.2",
+ "keywords": [
+ "promise",
+ "performance",
+ "promises",
+ "promises-a",
+ "promises-aplus",
+ "async",
+ "await",
+ "deferred",
+ "deferreds",
+ "future",
+ "flow control",
+ "dsl",
+ "fluent interface"
+ ],
+ "scripts": {
+ "lint": "node scripts/jshint.js",
+ "test": "node --expose-gc tools/test.js",
+ "istanbul": "istanbul",
+ "prepublish": "npm run generate-browser-core && npm run generate-browser-full",
+ "generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify",
+ "generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js"
+ },
+ "homepage": "https://github.com/petkaantonov/bluebird",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/petkaantonov/bluebird.git"
+ },
+ "bugs": {
+ "url": "http://github.com/petkaantonov/bluebird/issues"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "Petka Antonov",
+ "email": "petka_antonov@hotmail.com",
+ "url": "http://github.com/petkaantonov/"
+ },
+ "devDependencies": {
+ "acorn": "^6.0.2",
+ "acorn-walk": "^6.1.0",
+ "baconjs": "^0.7.43",
+ "bluebird": "^2.9.2",
+ "body-parser": "^1.10.2",
+ "browserify": "^8.1.1",
+ "cli-table": "~0.3.1",
+ "co": "^4.2.0",
+ "cross-spawn": "^0.2.3",
+ "glob": "^4.3.2",
+ "grunt-saucelabs": "~8.4.1",
+ "highland": "^2.3.0",
+ "istanbul": "^0.3.5",
+ "jshint": "^2.6.0",
+ "jshint-stylish": "~0.2.0",
+ "kefir": "^2.4.1",
+ "mkdirp": "~0.5.0",
+ "mocha": "~2.1",
+ "open": "~0.0.5",
+ "optimist": "~0.6.1",
+ "rimraf": "~2.2.6",
+ "rx": "^2.3.25",
+ "serve-static": "^1.7.1",
+ "sinon": "~1.7.3",
+ "uglify-js": "~2.4.16"
+ },
+ "readmeFilename": "README.md",
+ "main": "./js/release/bluebird.js",
+ "webpack": "./js/release/bluebird.js",
+ "browser": "./js/browser/bluebird.js",
+ "files": [
+ "js/browser",
+ "js/release",
+ "LICENSE"
+ ]
+}
diff --git a/node_modules/boolean/.eslintrc.json b/node_modules/boolean/.eslintrc.json
new file mode 100644
index 0000000..0b7481d
--- /dev/null
+++ b/node_modules/boolean/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "es/node"
+}
diff --git a/node_modules/boolean/.npmpackagejsonlintrc.json b/node_modules/boolean/.npmpackagejsonlintrc.json
new file mode 100644
index 0000000..fa44555
--- /dev/null
+++ b/node_modules/boolean/.npmpackagejsonlintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "npm-package-json-lint-config-tnw/lib.json"
+} \ No newline at end of file
diff --git a/node_modules/boolean/.releaserc.json b/node_modules/boolean/.releaserc.json
new file mode 100644
index 0000000..ca62656
--- /dev/null
+++ b/node_modules/boolean/.releaserc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "semantic-release-configuration"
+}
diff --git a/node_modules/boolean/CHANGELOG.md b/node_modules/boolean/CHANGELOG.md
new file mode 100644
index 0000000..00828a5
--- /dev/null
+++ b/node_modules/boolean/CHANGELOG.md
@@ -0,0 +1,70 @@
+# [3.2.0](https://github.com/thenativeweb/boolean/compare/3.1.4...3.2.0) (2022-02-16)
+
+
+### Features
+
+* Introduce isBooleanable function. ([#341](https://github.com/thenativeweb/boolean/issues/341)) ([e2ecfb3](https://github.com/thenativeweb/boolean/commit/e2ecfb357db729990e533dfd498211cea6126a17))
+
+## [3.1.4](https://github.com/thenativeweb/boolean/compare/3.1.3...3.1.4) (2021-08-19)
+
+
+### Bug Fixes
+
+* Downgrade workflows to Node 14. ([#319](https://github.com/thenativeweb/boolean/issues/319)) ([072b068](https://github.com/thenativeweb/boolean/commit/072b0685f8de7602f6be9da9b80cda08cdd71778))
+* Rollback versions and remove engines field. ([#318](https://github.com/thenativeweb/boolean/issues/318)) ([145dfcf](https://github.com/thenativeweb/boolean/commit/145dfcf7f4c5e3f5898e43661b9a017a2d8cb6a9))
+
+## [3.1.3](https://github.com/thenativeweb/boolean/compare/3.1.2...3.1.3) (2021-08-19)
+
+
+### Bug Fixes
+
+* bump path-parse from 1.0.6 to 1.0.7 ([#316](https://github.com/thenativeweb/boolean/issues/316)) ([0817f9d](https://github.com/thenativeweb/boolean/commit/0817f9d5c7e4691558e7562146afac19258a655c))
+
+## [3.1.2](https://github.com/thenativeweb/boolean/compare/3.1.1...3.1.2) (2021-06-10)
+
+
+### Bug Fixes
+
+* bump trim-newlines from 3.0.0 to 3.0.1 ([#302](https://github.com/thenativeweb/boolean/issues/302)) ([376489f](https://github.com/thenativeweb/boolean/commit/376489fe37ec9c46aafb44d3c9abf0edeabc6f93))
+
+## [3.1.1](https://github.com/thenativeweb/boolean/compare/3.1.0...3.1.1) (2021-06-10)
+
+
+### Bug Fixes
+
+* bump glob-parent from 5.1.1 to 5.1.2 ([#303](https://github.com/thenativeweb/boolean/issues/303)) ([8265437](https://github.com/thenativeweb/boolean/commit/8265437b1b3215256f8649e10ac65d4036a38bad))
+
+# [3.1.0](https://github.com/thenativeweb/boolean/compare/3.0.4...3.1.0) (2021-05-30)
+
+
+### Features
+
+* Add support for primitive object wrappers (fixes [#295](https://github.com/thenativeweb/boolean/issues/295)) ([#296](https://github.com/thenativeweb/boolean/issues/296)) ([5ae115f](https://github.com/thenativeweb/boolean/commit/5ae115f09f123cdb624452fc163fc8724e0ab926))
+
+## [3.0.4](https://github.com/thenativeweb/boolean/compare/3.0.3...3.0.4) (2021-05-10)
+
+
+### Bug Fixes
+
+* bump hosted-git-info from 2.8.8 to 2.8.9 ([#289](https://github.com/thenativeweb/boolean/issues/289)) ([69ead2c](https://github.com/thenativeweb/boolean/commit/69ead2c8fe897d546f8329ed262e6158938581be))
+
+## [3.0.3](https://github.com/thenativeweb/boolean/compare/3.0.2...3.0.3) (2021-03-25)
+
+
+### Bug Fixes
+
+* Migrate from master to main. ([#273](https://github.com/thenativeweb/boolean/issues/273)) ([18b640a](https://github.com/thenativeweb/boolean/commit/18b640af858d26b4dd76b9de443a4039e1e2131a))
+
+## [3.0.2](https://github.com/thenativeweb/boolean/compare/3.0.1...3.0.2) (2020-11-03)
+
+
+### Bug Fixes
+
+* Fix headline for robot section in readme. ([#191](https://github.com/thenativeweb/boolean/issues/191)) ([6b7b72b](https://github.com/thenativeweb/boolean/commit/6b7b72b6d5d5c1ad2251c5959b35c8c87b3421a5))
+
+## [3.0.1](https://github.com/thenativeweb/boolean/compare/3.0.0...3.0.1) (2020-02-11)
+
+
+### Bug Fixes
+
+* Simplify comparison code to not use unicode regexp flag ([#99](https://github.com/thenativeweb/boolean/issues/99)) ([2be2aeb](https://github.com/thenativeweb/boolean/commit/2be2aeb244c060eccb388dacc6903bbad193e745))
diff --git a/node_modules/boolean/LICENSE.txt b/node_modules/boolean/LICENSE.txt
new file mode 100644
index 0000000..c152105
--- /dev/null
+++ b/node_modules/boolean/LICENSE.txt
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (c) 2014-2022 the native web.
+
+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/boolean/README.md b/node_modules/boolean/README.md
new file mode 100644
index 0000000..11fe8e5
--- /dev/null
+++ b/node_modules/boolean/README.md
@@ -0,0 +1,95 @@
+# boolean
+
+boolean converts lots of things to boolean.
+
+## Status
+
+| Category | Status |
+| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
+| Version | [![npm](https://img.shields.io/npm/v/boolean)](https://www.npmjs.com/package/boolean) |
+| Dependencies | ![David](https://img.shields.io/david/thenativeweb/boolean) |
+| Dev dependencies | ![David](https://img.shields.io/david/dev/thenativeweb/boolean) |
+| Build | ![GitHub Actions](https://github.com/thenativeweb/boolean/workflows/Release/badge.svg?branch=main) |
+| License | ![GitHub](https://img.shields.io/github/license/thenativeweb/boolean) |
+
+## Installation
+
+```shell
+$ npm install boolean
+```
+
+## Quick start
+
+First you need to add a reference to boolean in your application:
+
+```javascript
+const { boolean, isBooleanable } = require('boolean');
+```
+
+If you use TypeScript, use the following code instead:
+
+```typescript
+import { boolean, isBooleanable } from 'boolean';
+```
+
+To verify a value for its boolean value, call the `boolean` function and provide the value in question as parameter:
+
+```javascript
+console.log(boolean('true')); // => true
+```
+
+The `boolean` function considers the following values to be equivalent to `true`:
+
+- `true` (boolean)
+- `'true'` (string)
+- `'TRUE'` (string)
+- `'t'` (string)
+- `'T'` (string)
+- `'yes'` (string)
+- `'YES'` (string)
+- `'y'` (string)
+- `'Y'` (string)
+- `'on'` (string)
+- `'ON'` (string)
+- `'1'` (string)
+- `1` (number)
+
+In addition to the primitive types mentioned above, boolean also supports their object wrappers `Boolean`, `String`, and `Number`.
+
+_Please note that if you provide a `string` or a `String` object, it will be trimmed._
+
+All other values, including `undefined` and `null` are considered to be `false`.
+
+### Figuring out whether a value can be considered to be boolean
+
+From time to time, you may not want to directly convert a value to its boolean equivalent, but explicitly check whether it looks like a boolean. E.g., although `boolean('F')` returns `false`, the string `F` at least looks like a boolean, in contrast to something such as `123` (for which `boolean(123)` would also return `false`).
+
+To figure out whether a value can be considered to be a boolean, use the `isBooleanable` function:
+
+```javascript
+console.log(isBooleanable('true')); // => true
+```
+
+The `isBooleanable` function considers all of the above mentioned values to be reasonable boolean values, and additionally, also the following ones:
+
+- `false` (boolean)
+- `'false'` (string)
+- `'FALSE'` (string)
+- `'f'` (string)
+- `'F'` (string)
+- `'no'` (string)
+- `'NO'` (string)
+- `'n'` (string)
+- `'N'` (string)
+- `'off'` (string)
+- `'OFF'` (string)
+- `'0'` (string)
+- `0` (number)
+
+## Running quality assurance
+
+To run quality assurance for this module use [roboter](https://www.npmjs.com/package/roboter):
+
+```shell
+$ npx roboter
+```
diff --git a/node_modules/boolean/build/lib/boolean.d.ts b/node_modules/boolean/build/lib/boolean.d.ts
new file mode 100644
index 0000000..379e720
--- /dev/null
+++ b/node_modules/boolean/build/lib/boolean.d.ts
@@ -0,0 +1,2 @@
+declare const boolean: (value: any) => boolean;
+export { boolean };
diff --git a/node_modules/boolean/build/lib/boolean.js b/node_modules/boolean/build/lib/boolean.js
new file mode 100644
index 0000000..7716581
--- /dev/null
+++ b/node_modules/boolean/build/lib/boolean.js
@@ -0,0 +1,16 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.boolean = void 0;
+const boolean = function (value) {
+ switch (Object.prototype.toString.call(value)) {
+ case '[object String]':
+ return ['true', 't', 'yes', 'y', 'on', '1'].includes(value.trim().toLowerCase());
+ case '[object Number]':
+ return value.valueOf() === 1;
+ case '[object Boolean]':
+ return value.valueOf();
+ default:
+ return false;
+ }
+};
+exports.boolean = boolean;
diff --git a/node_modules/boolean/build/lib/index.d.ts b/node_modules/boolean/build/lib/index.d.ts
new file mode 100644
index 0000000..8ead670
--- /dev/null
+++ b/node_modules/boolean/build/lib/index.d.ts
@@ -0,0 +1,3 @@
+import { boolean } from './boolean';
+import { isBooleanable } from './isBooleanable';
+export { boolean, isBooleanable };
diff --git a/node_modules/boolean/build/lib/index.js b/node_modules/boolean/build/lib/index.js
new file mode 100644
index 0000000..cd0a2c9
--- /dev/null
+++ b/node_modules/boolean/build/lib/index.js
@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isBooleanable = exports.boolean = void 0;
+const boolean_1 = require("./boolean");
+Object.defineProperty(exports, "boolean", { enumerable: true, get: function () { return boolean_1.boolean; } });
+const isBooleanable_1 = require("./isBooleanable");
+Object.defineProperty(exports, "isBooleanable", { enumerable: true, get: function () { return isBooleanable_1.isBooleanable; } });
diff --git a/node_modules/boolean/build/lib/isBooleanable.d.ts b/node_modules/boolean/build/lib/isBooleanable.d.ts
new file mode 100644
index 0000000..d87ce7c
--- /dev/null
+++ b/node_modules/boolean/build/lib/isBooleanable.d.ts
@@ -0,0 +1,2 @@
+declare const isBooleanable: (value: any) => boolean;
+export { isBooleanable };
diff --git a/node_modules/boolean/build/lib/isBooleanable.js b/node_modules/boolean/build/lib/isBooleanable.js
new file mode 100644
index 0000000..dee9c5d
--- /dev/null
+++ b/node_modules/boolean/build/lib/isBooleanable.js
@@ -0,0 +1,19 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isBooleanable = void 0;
+const isBooleanable = function (value) {
+ switch (Object.prototype.toString.call(value)) {
+ case '[object String]':
+ return [
+ 'true', 't', 'yes', 'y', 'on', '1',
+ 'false', 'f', 'no', 'n', 'off', '0'
+ ].includes(value.trim().toLowerCase());
+ case '[object Number]':
+ return [0, 1].includes(value.valueOf());
+ case '[object Boolean]':
+ return true;
+ default:
+ return false;
+ }
+};
+exports.isBooleanable = isBooleanable;
diff --git a/node_modules/boolean/lib/boolean.ts b/node_modules/boolean/lib/boolean.ts
new file mode 100644
index 0000000..2cbdc2d
--- /dev/null
+++ b/node_modules/boolean/lib/boolean.ts
@@ -0,0 +1,17 @@
+const boolean = function (value: any): boolean {
+ switch (Object.prototype.toString.call(value)) {
+ case '[object String]':
+ return [ 'true', 't', 'yes', 'y', 'on', '1' ].includes(value.trim().toLowerCase());
+
+ case '[object Number]':
+ return value.valueOf() === 1;
+
+ case '[object Boolean]':
+ return value.valueOf();
+
+ default:
+ return false;
+ }
+};
+
+export { boolean };
diff --git a/node_modules/boolean/lib/index.ts b/node_modules/boolean/lib/index.ts
new file mode 100644
index 0000000..0388edc
--- /dev/null
+++ b/node_modules/boolean/lib/index.ts
@@ -0,0 +1,4 @@
+import { boolean } from './boolean';
+import { isBooleanable } from './isBooleanable';
+
+export { boolean, isBooleanable };
diff --git a/node_modules/boolean/lib/isBooleanable.ts b/node_modules/boolean/lib/isBooleanable.ts
new file mode 100644
index 0000000..7052ee3
--- /dev/null
+++ b/node_modules/boolean/lib/isBooleanable.ts
@@ -0,0 +1,20 @@
+const isBooleanable = function (value: any): boolean {
+ switch (Object.prototype.toString.call(value)) {
+ case '[object String]':
+ return [
+ 'true', 't', 'yes', 'y', 'on', '1',
+ 'false', 'f', 'no', 'n', 'off', '0'
+ ].includes(value.trim().toLowerCase());
+
+ case '[object Number]':
+ return [ 0, 1 ].includes(value.valueOf());
+
+ case '[object Boolean]':
+ return true;
+
+ default:
+ return false;
+ }
+};
+
+export { isBooleanable };
diff --git a/node_modules/boolean/licenseCheck.json b/node_modules/boolean/licenseCheck.json
new file mode 100644
index 0000000..d689b76
--- /dev/null
+++ b/node_modules/boolean/licenseCheck.json
@@ -0,0 +1,16 @@
+{
+ "compatibleLicenses": [
+ "0BSD",
+ "Apache-2.0",
+ "Artistic-2.0",
+ "BSD-2-Clause",
+ "BSD-3-Clause",
+ "CC0-1.0",
+ "CC-BY-3.0",
+ "CC-BY-4.0",
+ "ISC",
+ "MIT",
+ "Python-2.0",
+ "Unlicense"
+ ]
+} \ No newline at end of file
diff --git a/node_modules/boolean/package.json b/node_modules/boolean/package.json
new file mode 100644
index 0000000..402080d
--- /dev/null
+++ b/node_modules/boolean/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "boolean",
+ "version": "3.2.0",
+ "description": "boolean converts lots of things to boolean.",
+ "contributors": [
+ {
+ "name": "Golo Roden",
+ "email": "golo.roden@thenativeweb.io"
+ },
+ {
+ "name": "Matthias Wagler",
+ "email": "matthias.wagler@thenativeweb.io"
+ },
+ {
+ "name": "Ryan Smith",
+ "email": "ryan.smith@ht2labs.com"
+ },
+ {
+ "name": "Thomas Schaaf",
+ "email": "schaaf@komola.de"
+ },
+ {
+ "name": "Sebastian Mares",
+ "email": "camil.sebastian@mares.email"
+ }
+ ],
+ "private": false,
+ "main": "build/lib/index.js",
+ "types": "build/lib/index.d.ts",
+ "dependencies": {},
+ "devDependencies": {
+ "assertthat": "6.4.0",
+ "roboter": "12.7.0",
+ "semantic-release-configuration": "2.0.7"
+ },
+ "scripts": {},
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/thenativeweb/boolean.git"
+ },
+ "keywords": [
+ "boolean",
+ "parser"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/boolean/tsconfig.json b/node_modules/boolean/tsconfig.json
new file mode 100644
index 0000000..98d16e7
--- /dev/null
+++ b/node_modules/boolean/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "baseUrl": ".",
+ "declaration": true,
+ "esModuleInterop": true,
+ "lib": [ "esnext" ],
+ "module": "commonjs",
+ "outDir": "build",
+ "resolveJsonModule": true,
+ "strict": true,
+ "target": "es2019"
+ },
+ "include": [
+ "./**/*.ts"
+ ],
+ "exclude": [
+ "./build"
+ ]
+}
diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE
new file mode 100644
index 0000000..de32266
--- /dev/null
+++ b/node_modules/brace-expansion/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md
new file mode 100644
index 0000000..6b4e0e1
--- /dev/null
+++ b/node_modules/brace-expansion/README.md
@@ -0,0 +1,129 @@
+# brace-expansion
+
+[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
+as known from sh/bash, in JavaScript.
+
+[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
+[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
+[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
+
+[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
+
+## Example
+
+```js
+var expand = require('brace-expansion');
+
+expand('file-{a,b,c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('-v{,,}')
+// => ['-v', '-v', '-v']
+
+expand('file{0..2}.jpg')
+// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
+
+expand('file-{a..c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('file{2..0}.jpg')
+// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
+
+expand('file{0..4..2}.jpg')
+// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
+
+expand('file-{a..e..2}.jpg')
+// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
+
+expand('file{00..10..5}.jpg')
+// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
+
+expand('{{A..C},{a..c}}')
+// => ['A', 'B', 'C', 'a', 'b', 'c']
+
+expand('ppp{,config,oe{,conf}}')
+// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
+```
+
+## API
+
+```js
+var expand = require('brace-expansion');
+```
+
+### var expanded = expand(str)
+
+Return an array of all possible and valid expansions of `str`. If none are
+found, `[str]` is returned.
+
+Valid expansions are:
+
+```js
+/^(.*,)+(.+)?$/
+// {a,b,...}
+```
+
+A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+A numeric sequence from `x` to `y` inclusive, with optional increment.
+If `x` or `y` start with a leading `0`, all the numbers will be padded
+to have equal length. Negative numbers and backwards iteration work too.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+An alphabetic sequence from `x` to `y` inclusive, with optional increment.
+`x` and `y` must be exactly one character, and if given, `incr` must be a
+number.
+
+For compatibility reasons, the string `${` is not eligible for brace expansion.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install brace-expansion
+```
+
+## Contributors
+
+- [Julian Gruber](https://github.com/juliangruber)
+- [Isaac Z. Schlueter](https://github.com/isaacs)
+
+## Sponsors
+
+This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
+
+Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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/brace-expansion/index.js b/node_modules/brace-expansion/index.js
new file mode 100644
index 0000000..0478be8
--- /dev/null
+++ b/node_modules/brace-expansion/index.js
@@ -0,0 +1,201 @@
+var concatMap = require('concat-map');
+var balanced = require('balanced-match');
+
+module.exports = expandTop;
+
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
+
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
+}
+
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
+}
+
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
+}
+
+
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+ if (!str)
+ return [''];
+
+ var parts = [];
+ var m = balanced('{', '}', str);
+
+ if (!m)
+ return str.split(',');
+
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
+
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+
+ parts.push.apply(parts, p);
+
+ return parts;
+}
+
+function expandTop(str) {
+ if (!str)
+ return [];
+
+ // I don't know why Bash 4.3 does this, but it does.
+ // Anything starting with {} will have the first two bytes preserved
+ // but *only* at the top level, so {},a}b will not expand to anything,
+ // but a{},b}c will be expanded to [a}c,abc].
+ // One could argue that this is a bug in Bash, but since the goal of
+ // this module is to match Bash's rules, we escape a leading {}
+ if (str.substr(0, 2) === '{}') {
+ str = '\\{\\}' + str.substr(2);
+ }
+
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+}
+
+function identity(e) {
+ return e;
+}
+
+function embrace(str) {
+ return '{' + str + '}';
+}
+function isPadded(el) {
+ return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
+}
+
+function expand(str, isTop) {
+ var expansions = [];
+
+ var m = balanced('{', '}', str);
+ if (!m || /\$$/.test(m.pre)) return [str];
+
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = m.body.indexOf(',') >= 0;
+ if (!isSequence && !isOptions) {
+ // {a},b}
+ if (m.post.match(/,.*\}/)) {
+ str = m.pre + '{' + m.body + escClose + m.post;
+ return expand(str);
+ }
+ return [str];
+ }
+
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ // x{{a,b}}y ==> x{a}y x{b}y
+ n = expand(n[0], false).map(embrace);
+ if (n.length === 1) {
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
+ }
+ }
+
+ // at this point, n is the parts, and we know it's not a comma set
+ // with a single entry.
+
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
+ var pre = m.pre;
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+
+ var N;
+
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length)
+ var incr = n.length == 3
+ ? Math.abs(numeric(n[2]))
+ : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
+
+ N = [];
+
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === '\\')
+ c = '';
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join('0');
+ if (i < 0)
+ c = '-' + z + c.slice(1);
+ else
+ c = z + c;
+ }
+ }
+ }
+ N.push(c);
+ }
+ } else {
+ N = concatMap(n, function(el) { return expand(el, false) });
+ }
+
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre + N[j] + post[k];
+ if (!isTop || isSequence || expansion)
+ expansions.push(expansion);
+ }
+ }
+
+ return expansions;
+}
+
diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json
new file mode 100644
index 0000000..a18faa8
--- /dev/null
+++ b/node_modules/brace-expansion/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "brace-expansion",
+ "description": "Brace expansion as known from sh/bash",
+ "version": "1.1.11",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/brace-expansion.git"
+ },
+ "homepage": "https://github.com/juliangruber/brace-expansion",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test/*.js",
+ "gentest": "bash test/generate.sh",
+ "bench": "matcha test/perf/bench.js"
+ },
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ },
+ "devDependencies": {
+ "matcha": "^0.7.0",
+ "tape": "^4.6.0"
+ },
+ "keywords": [],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/20..latest",
+ "firefox/nightly",
+ "chrome/25..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/buffer-alloc-unsafe/index.js b/node_modules/buffer-alloc-unsafe/index.js
new file mode 100644
index 0000000..0bd335f
--- /dev/null
+++ b/node_modules/buffer-alloc-unsafe/index.js
@@ -0,0 +1,17 @@
+function allocUnsafe (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be a number')
+ }
+
+ if (size < 0) {
+ throw new RangeError('"size" argument must not be negative')
+ }
+
+ if (Buffer.allocUnsafe) {
+ return Buffer.allocUnsafe(size)
+ } else {
+ return new Buffer(size)
+ }
+}
+
+module.exports = allocUnsafe
diff --git a/node_modules/buffer-alloc-unsafe/package.json b/node_modules/buffer-alloc-unsafe/package.json
new file mode 100644
index 0000000..c2ab904
--- /dev/null
+++ b/node_modules/buffer-alloc-unsafe/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "buffer-alloc-unsafe",
+ "version": "1.1.0",
+ "license": "MIT",
+ "repository": "LinusU/buffer-alloc-unsafe",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "standard && node test"
+ },
+ "devDependencies": {
+ "standard": "^7.1.2"
+ },
+ "keywords": [
+ "allocUnsafe",
+ "allocate",
+ "buffer allocUnsafe",
+ "buffer unsafe allocate",
+ "buffer",
+ "ponyfill",
+ "unsafe allocate"
+ ]
+}
diff --git a/node_modules/buffer-alloc-unsafe/readme.md b/node_modules/buffer-alloc-unsafe/readme.md
new file mode 100644
index 0000000..8725ecf
--- /dev/null
+++ b/node_modules/buffer-alloc-unsafe/readme.md
@@ -0,0 +1,46 @@
+# Buffer Alloc Unsafe
+
+A [ponyfill](https://ponyfill.com) for `Buffer.allocUnsafe`.
+
+Works as Node.js: `v7.0.0` <br>
+Works on Node.js: `v0.10.0`
+
+## Installation
+
+```sh
+npm install --save buffer-alloc-unsafe
+```
+
+## Usage
+
+```js
+const allocUnsafe = require('buffer-alloc-unsafe')
+
+console.log(allocUnsafe(10))
+//=> <Buffer 78 0c 80 03 01 00 00 00 05 00>
+
+console.log(allocUnsafe(10))
+//=> <Buffer 58 ed bf 5f ff 7f 00 00 01 00>
+
+console.log(allocUnsafe(10))
+//=> <Buffer 50 0c 80 03 01 00 00 00 0a 00>
+
+allocUnsafe(-10)
+//=> RangeError: "size" argument must not be negative
+```
+
+## API
+
+### allocUnsafe(size)
+
+- `size` &lt;Integer&gt; The desired length of the new `Buffer`
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must be
+less than or equal to the value of `buffer.kMaxLength` and greater than or equal
+to zero. Otherwise, a `RangeError` is thrown.
+
+## See also
+
+- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
+- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill`
+- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`
diff --git a/node_modules/buffer-alloc/index.js b/node_modules/buffer-alloc/index.js
new file mode 100644
index 0000000..fe65860
--- /dev/null
+++ b/node_modules/buffer-alloc/index.js
@@ -0,0 +1,32 @@
+var bufferFill = require('buffer-fill')
+var allocUnsafe = require('buffer-alloc-unsafe')
+
+module.exports = function alloc (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be a number')
+ }
+
+ if (size < 0) {
+ throw new RangeError('"size" argument must not be negative')
+ }
+
+ if (Buffer.alloc) {
+ return Buffer.alloc(size, fill, encoding)
+ }
+
+ var buffer = allocUnsafe(size)
+
+ if (size === 0) {
+ return buffer
+ }
+
+ if (fill === undefined) {
+ return bufferFill(buffer, 0)
+ }
+
+ if (typeof encoding !== 'string') {
+ encoding = undefined
+ }
+
+ return bufferFill(buffer, fill, encoding)
+}
diff --git a/node_modules/buffer-alloc/package.json b/node_modules/buffer-alloc/package.json
new file mode 100644
index 0000000..a8a3c3a
--- /dev/null
+++ b/node_modules/buffer-alloc/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "buffer-alloc",
+ "version": "1.2.0",
+ "license": "MIT",
+ "repository": "LinusU/buffer-alloc",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "standard && node test"
+ },
+ "dependencies": {
+ "buffer-alloc-unsafe": "^1.1.0",
+ "buffer-fill": "^1.0.0"
+ },
+ "devDependencies": {
+ "standard": "^7.1.2"
+ },
+ "keywords": [
+ "alloc",
+ "allocate",
+ "buffer alloc",
+ "buffer allocate",
+ "buffer"
+ ]
+}
diff --git a/node_modules/buffer-alloc/readme.md b/node_modules/buffer-alloc/readme.md
new file mode 100644
index 0000000..80c7d7b
--- /dev/null
+++ b/node_modules/buffer-alloc/readme.md
@@ -0,0 +1,43 @@
+# Buffer Alloc
+
+A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.
+
+Works as Node.js: `v7.0.0` <br>
+Works on Node.js: `v0.10.0`
+
+## Installation
+
+```sh
+npm install --save buffer-alloc
+```
+
+## Usage
+
+```js
+const alloc = require('buffer-alloc')
+
+console.log(alloc(4))
+//=> <Buffer 00 00 00 00>
+
+console.log(alloc(6, 0x41))
+//=> <Buffer 41 41 41 41 41 41>
+
+console.log(alloc(10, 'linus', 'utf8'))
+//=> <Buffer 6c 69 6e 75 73 6c 69 6e 75 73>
+```
+
+## API
+
+### alloc(size[, fill[, encoding]])
+
+- `size` &lt;Integer&gt; The desired length of the new `Buffer`
+- `fill` &lt;String&gt; | &lt;Buffer&gt; | &lt;Integer&gt; A value to pre-fill the new `Buffer` with. **Default:** `0`
+- `encoding` &lt;String&gt; If `fill` is a string, this is its encoding. **Default:** `'utf8'`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled.
+
+## See also
+
+- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`
+- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill`
+- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`
diff --git a/node_modules/buffer-crc32/LICENSE b/node_modules/buffer-crc32/LICENSE
new file mode 100644
index 0000000..4cef10e
--- /dev/null
+++ b/node_modules/buffer-crc32/LICENSE
@@ -0,0 +1,19 @@
+The MIT License
+
+Copyright (c) 2013 Brian J. Brennan
+
+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-crc32/README.md b/node_modules/buffer-crc32/README.md
new file mode 100644
index 0000000..0d9d8b8
--- /dev/null
+++ b/node_modules/buffer-crc32/README.md
@@ -0,0 +1,47 @@
+# buffer-crc32
+
+[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)
+
+crc32 that works with binary data and fancy character sets, outputs
+buffer, signed or unsigned data and has tests.
+
+Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix
+
+# install
+```
+npm install buffer-crc32
+```
+
+# example
+```js
+var crc32 = require('buffer-crc32');
+// works with buffers
+var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])
+crc32(buf) // -> <Buffer 94 5a ab 4a>
+
+// has convenience methods for getting signed or unsigned ints
+crc32.signed(buf) // -> -1805997238
+crc32.unsigned(buf) // -> 2488970058
+
+// will cast to buffer if given a string, so you can
+// directly use foreign characters safely
+crc32('自動販売機') // -> <Buffer cb 03 1a c5>
+
+// and works in append mode too
+var partialCrc = crc32('hey');
+var partialCrc = crc32(' ', partialCrc);
+var partialCrc = crc32('sup', partialCrc);
+var partialCrc = crc32(' ', partialCrc);
+var finalCrc = crc32('bros', partialCrc); // -> <Buffer 47 fa 55 70>
+```
+
+# tests
+This was tested against the output of zlib's crc32 method. You can run
+the tests with`npm test` (requires tap)
+
+# see also
+https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also
+supports buffer inputs and return unsigned ints (thanks @tjholowaychuk).
+
+# license
+MIT/X11
diff --git a/node_modules/buffer-crc32/index.js b/node_modules/buffer-crc32/index.js
new file mode 100644
index 0000000..6727dd3
--- /dev/null
+++ b/node_modules/buffer-crc32/index.js
@@ -0,0 +1,111 @@
+var Buffer = require('buffer').Buffer;
+
+var CRC_TABLE = [
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+];
+
+if (typeof Int32Array !== 'undefined') {
+ CRC_TABLE = new Int32Array(CRC_TABLE);
+}
+
+function ensureBuffer(input) {
+ if (Buffer.isBuffer(input)) {
+ return input;
+ }
+
+ var hasNewBufferAPI =
+ typeof Buffer.alloc === "function" &&
+ typeof Buffer.from === "function";
+
+ if (typeof input === "number") {
+ return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input);
+ }
+ else if (typeof input === "string") {
+ return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input);
+ }
+ else {
+ throw new Error("input must be buffer, number, or string, received " +
+ typeof input);
+ }
+}
+
+function bufferizeInt(num) {
+ var tmp = ensureBuffer(4);
+ tmp.writeInt32BE(num, 0);
+ return tmp;
+}
+
+function _crc32(buf, previous) {
+ buf = ensureBuffer(buf);
+ if (Buffer.isBuffer(previous)) {
+ previous = previous.readUInt32BE(0);
+ }
+ var crc = ~~previous ^ -1;
+ for (var n = 0; n < buf.length; n++) {
+ crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8);
+ }
+ return (crc ^ -1);
+}
+
+function crc32() {
+ return bufferizeInt(_crc32.apply(null, arguments));
+}
+crc32.signed = function () {
+ return _crc32.apply(null, arguments);
+};
+crc32.unsigned = function () {
+ return _crc32.apply(null, arguments) >>> 0;
+};
+
+module.exports = crc32;
diff --git a/node_modules/buffer-crc32/package.json b/node_modules/buffer-crc32/package.json
new file mode 100644
index 0000000..e896bec
--- /dev/null
+++ b/node_modules/buffer-crc32/package.json
@@ -0,0 +1,39 @@
+{
+ "author": "Brian J. Brennan <brianloveswords@gmail.com>",
+ "name": "buffer-crc32",
+ "description": "A pure javascript CRC32 algorithm that plays nice with binary data",
+ "version": "0.2.13",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE"
+ }
+ ],
+ "contributors": [
+ {
+ "name": "Vladimir Kuznetsov",
+ "github": "mistakster"
+ }
+ ],
+ "homepage": "https://github.com/brianloveswords/buffer-crc32",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/brianloveswords/buffer-crc32.git"
+ },
+ "main": "index.js",
+ "scripts": {
+ "test": "./node_modules/.bin/tap tests/*.test.js"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.2.5"
+ },
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "license": "MIT",
+ "files": [
+ "index.js"
+ ]
+}
diff --git a/node_modules/buffer-equal/.travis.yml b/node_modules/buffer-equal/.travis.yml
new file mode 100644
index 0000000..dad2273
--- /dev/null
+++ b/node_modules/buffer-equal/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.8
+ - "0.10"
diff --git a/node_modules/buffer-equal/LICENSE b/node_modules/buffer-equal/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/node_modules/buffer-equal/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+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-equal/README.markdown b/node_modules/buffer-equal/README.markdown
new file mode 100644
index 0000000..8c062fd
--- /dev/null
+++ b/node_modules/buffer-equal/README.markdown
@@ -0,0 +1,62 @@
+buffer-equal
+============
+
+Return whether two buffers are equal.
+
+[![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal)
+
+example
+=======
+
+``` js
+var bufferEqual = require('buffer-equal');
+
+console.dir(bufferEqual(
+ new Buffer([253,254,255]),
+ new Buffer([253,254,255])
+));
+console.dir(bufferEqual(
+ new Buffer('abc'),
+ new Buffer('abcd')
+));
+console.dir(bufferEqual(
+ new Buffer('abc'),
+ 'abc'
+));
+```
+
+output:
+
+```
+true
+false
+undefined
+```
+
+methods
+=======
+
+``` js
+var bufferEqual = require('buffer-equal')
+```
+
+bufferEqual(a, b)
+-----------------
+
+Return whether the two buffers `a` and `b` are equal.
+
+If `a` or `b` is not a buffer, return `undefined`.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install buffer-equal
+```
+
+license
+=======
+
+MIT
diff --git a/node_modules/buffer-equal/example/eq.js b/node_modules/buffer-equal/example/eq.js
new file mode 100644
index 0000000..1eb0509
--- /dev/null
+++ b/node_modules/buffer-equal/example/eq.js
@@ -0,0 +1,14 @@
+var bufferEqual = require('../');
+
+console.dir(bufferEqual(
+ new Buffer([253,254,255]),
+ new Buffer([253,254,255])
+));
+console.dir(bufferEqual(
+ new Buffer('abc'),
+ new Buffer('abcd')
+));
+console.dir(bufferEqual(
+ new Buffer('abc'),
+ 'abc'
+));
diff --git a/node_modules/buffer-equal/index.js b/node_modules/buffer-equal/index.js
new file mode 100644
index 0000000..e640d4e
--- /dev/null
+++ b/node_modules/buffer-equal/index.js
@@ -0,0 +1,14 @@
+var Buffer = require('buffer').Buffer; // for use with browserify
+
+module.exports = function (a, b) {
+ if (!Buffer.isBuffer(a)) return undefined;
+ if (!Buffer.isBuffer(b)) return undefined;
+ if (typeof a.equals === 'function') return a.equals(b);
+ if (a.length !== b.length) return false;
+
+ for (var i = 0; i < a.length; i++) {
+ if (a[i] !== b[i]) return false;
+ }
+
+ return true;
+};
diff --git a/node_modules/buffer-equal/package.json b/node_modules/buffer-equal/package.json
new file mode 100644
index 0000000..ec5850b
--- /dev/null
+++ b/node_modules/buffer-equal/package.json
@@ -0,0 +1,33 @@
+{
+ "name" : "buffer-equal",
+ "description" : "return whether two buffers are equal",
+ "version" : "1.0.0",
+ "repository" : {
+ "type" : "git",
+ "url" : "git://github.com/substack/node-buffer-equal.git"
+ },
+ "main" : "index.js",
+ "keywords" : [
+ "buffer",
+ "equal"
+ ],
+ "directories" : {
+ "example" : "example",
+ "test" : "test"
+ },
+ "scripts" : {
+ "test" : "tap test/*.js"
+ },
+ "devDependencies" : {
+ "tap" : "0.2.4"
+ },
+ "engines" : {
+ "node" : ">=0.4.0"
+ },
+ "license" : "MIT",
+ "author" : {
+ "name" : "James Halliday",
+ "email" : "mail@substack.net",
+ "url" : "http://substack.net"
+ }
+}
diff --git a/node_modules/buffer-equal/test/eq.js b/node_modules/buffer-equal/test/eq.js
new file mode 100644
index 0000000..3d34006
--- /dev/null
+++ b/node_modules/buffer-equal/test/eq.js
@@ -0,0 +1,35 @@
+var bufferEqual = require('../');
+var test = require('tap').test;
+
+test('equal', function (t) {
+ var eq = bufferEqual(
+ new Buffer([253,254,255]),
+ new Buffer([253,254,255])
+ );
+ t.strictEqual(eq, true);
+ t.end();
+});
+
+test('not equal', function (t) {
+ var eq = bufferEqual(
+ new Buffer('abc'),
+ new Buffer('abcd')
+ );
+ t.strictEqual(eq, false);
+ t.end();
+});
+
+test('not equal not buffer', function (t) {
+ var eq = bufferEqual(
+ new Buffer('abc'),
+ 'abc'
+ );
+ t.strictEqual(eq, undefined);
+ t.end();
+});
+
+test('equal not buffer', function (t) {
+ var eq = bufferEqual('abc', 'abc');
+ t.strictEqual(eq, undefined);
+ t.end();
+});
diff --git a/node_modules/buffer-fill/index.js b/node_modules/buffer-fill/index.js
new file mode 100644
index 0000000..428a9e1
--- /dev/null
+++ b/node_modules/buffer-fill/index.js
@@ -0,0 +1,113 @@
+/* Node.js 6.4.0 and up has full support */
+var hasFullSupport = (function () {
+ try {
+ if (!Buffer.isEncoding('latin1')) {
+ return false
+ }
+
+ var buf = Buffer.alloc ? Buffer.alloc(4) : new Buffer(4)
+
+ buf.fill('ab', 'ucs2')
+
+ return (buf.toString('hex') === '61006200')
+ } catch (_) {
+ return false
+ }
+}())
+
+function isSingleByte (val) {
+ return (val.length === 1 && val.charCodeAt(0) < 256)
+}
+
+function fillWithNumber (buffer, val, start, end) {
+ if (start < 0 || end > buffer.length) {
+ throw new RangeError('Out of range index')
+ }
+
+ start = start >>> 0
+ end = end === undefined ? buffer.length : end >>> 0
+
+ if (end > start) {
+ buffer.fill(val, start, end)
+ }
+
+ return buffer
+}
+
+function fillWithBuffer (buffer, val, start, end) {
+ if (start < 0 || end > buffer.length) {
+ throw new RangeError('Out of range index')
+ }
+
+ if (end <= start) {
+ return buffer
+ }
+
+ start = start >>> 0
+ end = end === undefined ? buffer.length : end >>> 0
+
+ var pos = start
+ var len = val.length
+ while (pos <= (end - len)) {
+ val.copy(buffer, pos)
+ pos += len
+ }
+
+ if (pos !== end) {
+ val.copy(buffer, pos, 0, end - pos)
+ }
+
+ return buffer
+}
+
+function fill (buffer, val, start, end, encoding) {
+ if (hasFullSupport) {
+ return buffer.fill(val, start, end, encoding)
+ }
+
+ if (typeof val === 'number') {
+ return fillWithNumber(buffer, val, start, end)
+ }
+
+ if (typeof val === 'string') {
+ if (typeof start === 'string') {
+ encoding = start
+ start = 0
+ end = buffer.length
+ } else if (typeof end === 'string') {
+ encoding = end
+ end = buffer.length
+ }
+
+ if (encoding !== undefined && typeof encoding !== 'string') {
+ throw new TypeError('encoding must be a string')
+ }
+
+ if (encoding === 'latin1') {
+ encoding = 'binary'
+ }
+
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding)
+ }
+
+ if (val === '') {
+ return fillWithNumber(buffer, 0, start, end)
+ }
+
+ if (isSingleByte(val)) {
+ return fillWithNumber(buffer, val.charCodeAt(0), start, end)
+ }
+
+ val = new Buffer(val, encoding)
+ }
+
+ if (Buffer.isBuffer(val)) {
+ return fillWithBuffer(buffer, val, start, end)
+ }
+
+ // Other values (e.g. undefined, boolean, object) results in zero-fill
+ return fillWithNumber(buffer, 0, start, end)
+}
+
+module.exports = fill
diff --git a/node_modules/buffer-fill/package.json b/node_modules/buffer-fill/package.json
new file mode 100644
index 0000000..b8f67c5
--- /dev/null
+++ b/node_modules/buffer-fill/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "buffer-fill",
+ "version": "1.0.0",
+ "license": "MIT",
+ "repository": "LinusU/buffer-fill",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "standard && node test"
+ },
+ "devDependencies": {
+ "buffer-alloc-unsafe": "^1.1.0",
+ "standard": "^7.1.2"
+ }
+}
diff --git a/node_modules/buffer-fill/readme.md b/node_modules/buffer-fill/readme.md
new file mode 100644
index 0000000..ac30738
--- /dev/null
+++ b/node_modules/buffer-fill/readme.md
@@ -0,0 +1,54 @@
+# Buffer Fill
+
+A [ponyfill](https://ponyfill.com) for `Buffer.fill`.
+
+Works as Node.js: `v6.4.0` <br>
+Works on Node.js: `v0.10.0`
+
+## Installation
+
+```sh
+npm install --save buffer-fill
+```
+
+## Usage
+
+```js
+const fill = require('buffer-fill')
+const buf = Buffer.allocUnsafe(5)
+
+console.log(buf.fill(8))
+//=> <Buffer 08 08 08 08 08>
+
+console.log(buf.fill(9, 2, 4))
+//=> <Buffer 08 08 09 09 08>
+
+console.log(buf.fill('linus', 'latin1'))
+//=> <Buffer 6c 69 6e 75 73>
+
+console.log(buf.fill('\u0222'))
+//=> <Buffer c8 a2 c8 a2 c8>
+```
+
+## API
+
+### fill(buf, value[, offset[, end]][, encoding])
+
+- `value` &lt;String&gt; | &lt;Buffer&gt; | &lt;Integer&gt; The value to fill `buf` with
+- `offset` &lt;Integer&gt; Where to start filling `buf`. **Default:** `0`
+- `end` &lt;Integer&gt; Where to stop filling `buf` (not inclusive). **Default:** `buf.length`
+- `encoding` &lt;String&gt; If `value` is a string, this is its encoding. **Default:** `'utf8'`
+- Return: &lt;Buffer&gt; A reference to `buf`
+
+Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+the entire `buf` will be filled. This is meant to be a small simplification to
+allow the creation and filling of a `Buffer` to be done on a single line.
+
+If the final write of a `fill()` operation falls on a multi-byte character, then
+only the first bytes of that character that fit into `buf` are written.
+
+## See also
+
+- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`
+- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
+- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`
diff --git a/node_modules/buffer-from/LICENSE b/node_modules/buffer-from/LICENSE
new file mode 100644
index 0000000..e4bf1d6
--- /dev/null
+++ b/node_modules/buffer-from/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016, 2018 Linus Unnebäck
+
+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-from/index.js b/node_modules/buffer-from/index.js
new file mode 100644
index 0000000..d92a83d
--- /dev/null
+++ b/node_modules/buffer-from/index.js
@@ -0,0 +1,69 @@
+var toString = Object.prototype.toString
+
+var isModern = (
+ typeof Buffer.alloc === 'function' &&
+ typeof Buffer.allocUnsafe === 'function' &&
+ typeof Buffer.from === 'function'
+)
+
+function isArrayBuffer (input) {
+ return toString.call(input).slice(8, -1) === 'ArrayBuffer'
+}
+
+function fromArrayBuffer (obj, byteOffset, length) {
+ byteOffset >>>= 0
+
+ var maxLength = obj.byteLength - byteOffset
+
+ if (maxLength < 0) {
+ throw new RangeError("'offset' is out of bounds")
+ }
+
+ if (length === undefined) {
+ length = maxLength
+ } else {
+ length >>>= 0
+
+ if (length > maxLength) {
+ throw new RangeError("'length' is out of bounds")
+ }
+ }
+
+ return isModern
+ ? Buffer.from(obj.slice(byteOffset, byteOffset + length))
+ : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)))
+}
+
+function fromString (string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') {
+ encoding = 'utf8'
+ }
+
+ if (!Buffer.isEncoding(encoding)) {
+ throw new TypeError('"encoding" must be a valid string encoding')
+ }
+
+ return isModern
+ ? Buffer.from(string, encoding)
+ : new Buffer(string, encoding)
+}
+
+function bufferFrom (value, encodingOrOffset, length) {
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number')
+ }
+
+ if (isArrayBuffer(value)) {
+ return fromArrayBuffer(value, encodingOrOffset, length)
+ }
+
+ if (typeof value === 'string') {
+ return fromString(value, encodingOrOffset)
+ }
+
+ return isModern
+ ? Buffer.from(value)
+ : new Buffer(value)
+}
+
+module.exports = bufferFrom
diff --git a/node_modules/buffer-from/package.json b/node_modules/buffer-from/package.json
new file mode 100644
index 0000000..b002450
--- /dev/null
+++ b/node_modules/buffer-from/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "buffer-from",
+ "version": "1.1.1",
+ "license": "MIT",
+ "repository": "LinusU/buffer-from",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "standard && node test"
+ },
+ "devDependencies": {
+ "standard": "^7.1.2"
+ },
+ "keywords": [
+ "buffer",
+ "buffer from"
+ ]
+}
diff --git a/node_modules/buffer-from/readme.md b/node_modules/buffer-from/readme.md
new file mode 100644
index 0000000..9880a55
--- /dev/null
+++ b/node_modules/buffer-from/readme.md
@@ -0,0 +1,69 @@
+# Buffer From
+
+A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.
+
+## Installation
+
+```sh
+npm install --save buffer-from
+```
+
+## Usage
+
+```js
+const bufferFrom = require('buffer-from')
+
+console.log(bufferFrom([1, 2, 3, 4]))
+//=> <Buffer 01 02 03 04>
+
+const arr = new Uint8Array([1, 2, 3, 4])
+console.log(bufferFrom(arr.buffer, 1, 2))
+//=> <Buffer 02 03>
+
+console.log(bufferFrom('test', 'utf8'))
+//=> <Buffer 74 65 73 74>
+
+const buf = bufferFrom('test')
+console.log(bufferFrom(buf))
+//=> <Buffer 74 65 73 74>
+```
+
+## API
+
+### bufferFrom(array)
+
+- `array` &lt;Array&gt;
+
+Allocates a new `Buffer` using an `array` of octets.
+
+### bufferFrom(arrayBuffer[, byteOffset[, length]])
+
+- `arrayBuffer` &lt;ArrayBuffer&gt; The `.buffer` property of a TypedArray or ArrayBuffer
+- `byteOffset` &lt;Integer&gt; Where to start copying from `arrayBuffer`. **Default:** `0`
+- `length` &lt;Integer&gt; How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset`
+
+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`.
+
+### bufferFrom(buffer)
+
+- `buffer` &lt;Buffer&gt; An existing `Buffer` to copy data from
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+### bufferFrom(string[, encoding])
+
+- `string` &lt;String&gt; A string to encode.
+- `encoding` &lt;String&gt; The encoding of `string`. **Default:** `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `string`. If
+provided, the `encoding` parameter identifies the character encoding of
+`string`.
+
+## See also
+
+- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
+- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`
diff --git a/node_modules/cacheable-lookup/LICENSE b/node_modules/cacheable-lookup/LICENSE
new file mode 100755
index 0000000..92498ed
--- /dev/null
+++ b/node_modules/cacheable-lookup/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Szymon Marczak
+
+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/cacheable-lookup/README.md b/node_modules/cacheable-lookup/README.md
new file mode 100755
index 0000000..2507155
--- /dev/null
+++ b/node_modules/cacheable-lookup/README.md
@@ -0,0 +1,240 @@
+# cacheable-lookup
+
+> A cacheable [`dns.lookup(…)`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback) that respects TTL :tada:
+
+[![Node CI](https://github.com/szmarczak/cacheable-lookup/workflows/Node%20CI/badge.svg)](https://github.com/szmarczak/cacheable-lookup/actions)
+[![Coverage Status](https://coveralls.io/repos/github/szmarczak/cacheable-lookup/badge.svg?branch=master)](https://coveralls.io/github/szmarczak/cacheable-lookup?branch=master)
+[![npm](https://img.shields.io/npm/dm/cacheable-lookup.svg)](https://www.npmjs.com/package/cacheable-lookup)
+[![install size](https://packagephobia.now.sh/badge?p=cacheable-lookup)](https://packagephobia.now.sh/result?p=cacheable-lookup)
+
+Making lots of HTTP requests? You can save some time by caching DNS lookups :zap:
+
+## Usage
+
+### Using the `lookup` option
+
+```js
+const http = require('http');
+const CacheableLookup = require('cacheable-lookup');
+
+const cacheable = new CacheableLookup();
+
+http.get('http://example.com', {lookup: cacheable.lookup}, response => {
+ // Handle the response here
+});
+```
+
+### Attaching CacheableLookup to an Agent
+
+```js
+const http = require('http');
+const CacheableLookup = require('cacheable-lookup');
+
+const cacheable = new CacheableLookup();
+cacheable.install(http.globalAgent);
+
+http.get('http://example.com', response => {
+ // Handle the response here
+});
+```
+
+## API
+
+### new CacheableLookup(options)
+
+Returns a new instance of `CacheableLookup`.
+
+#### options
+
+Type: `object`<br>
+Default: `{}`
+
+Options used to cache the DNS lookups.
+
+##### cache
+
+Type: `Map` | [`Keyv`](https://github.com/lukechilds/keyv/)<br>
+Default: `new Map()`
+
+Custom cache instance. If `undefined`, it will create a new one.
+
+**Note**: If you decide to use Keyv instead of the native implementation, the performance will drop by 10x. Memory leaks may occur as it doesn't provide any way to remove all the deprecated values at once.
+
+**Tip**: [`QuickLRU`](https://github.com/sindresorhus/quick-lru) is fully compatible with the Map API, you can use it to limit the amount of cached entries. Example:
+
+```js
+const http = require('http');
+const CacheableLookup = require('cacheable-lookup');
+const QuickLRU = require('quick-lru');
+
+const cacheable = new CacheableLookup({
+ cache: new QuickLRU({maxSize: 1000})
+});
+
+http.get('http://example.com', {lookup: cacheable.lookup}, response => {
+ // Handle the response here
+});
+```
+
+##### options.maxTtl
+
+Type: `number`<br>
+Default: `Infinity`
+
+The maximum lifetime of the entries received from the specifed DNS server (TTL in seconds).
+
+If set to `0`, it will make a new DNS query each time.
+
+**Pro Tip**: This shouldn't be lower than your DNS server response time in order to prevent bottlenecks. For example, if you use Cloudflare, this value should be greater than `0.01`.
+
+##### options.fallbackDuration
+
+Type: `number`<br>
+Default: `3600` (1 hour)
+
+When the DNS server responds with `ENOTFOUND` or `ENODATA` and the OS reports that the entry is available, it will use `dns.lookup(...)` directly for the requested hostnames for the specified amount of time (in seconds).
+
+If you don't query internal hostnames (such as `localhost`, `database.local` etc.), it is strongly recommended to set this value to `0`.
+
+##### options.errorTtl
+
+Type: `number`<br>
+Default: `0.15`
+
+The time how long it needs to remember queries that threw `ENOTFOUND` or `ENODATA` (TTL in seconds).
+
+**Note**: This option is independent, `options.maxTtl` does not affect this.
+
+**Pro Tip**: This shouldn't be lower than your DNS server response time in order to prevent bottlenecks. For example, if you use Cloudflare, this value should be greater than `0.01`.
+
+##### options.resolver
+
+Type: `dns.Resolver | dns.promises.Resolver`<br>
+Default: [`new dns.promises.Resolver()`](https://nodejs.org/api/dns.html#dns_class_dns_resolver)
+
+An instance of [DNS Resolver](https://nodejs.org/api/dns.html#dns_class_dns_resolver) used to make DNS queries.
+
+##### options.lookup
+
+Type: `Function`<br>
+Default: [`dns.lookup`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback)
+
+The fallback function to use when the DNS server responds with `ENOTFOUND` or `ENODATA`.
+
+**Note**: This has no effect if the `fallbackDuration` option is less than `1`.
+
+### Entry object
+
+Type: `object`
+
+#### address
+
+Type: `string`
+
+The IP address (can be an IPv4 or IPv6 address).
+
+#### family
+
+Type: `number`
+
+The IP family (`4` or `6`).
+
+##### expires
+
+Type: `number`
+
+**Note**: This is not present when falling back to `dns.lookup(...)`!
+
+The timestamp (`Date.now() + ttl * 1000`) when the entry expires.
+
+#### ttl
+
+**Note**: This is not present when falling back to `dns.lookup(...)`!
+
+The time in seconds for its lifetime.
+
+### Entry object (callback-style)
+
+When `options.all` is `false`, then `callback(error, address, family, expires, ttl)` is called. <br>
+When `options.all` is `true`, then `callback(error, entries)` is called.
+
+### CacheableLookup instance
+
+#### servers
+
+Type: `Array`
+
+The DNS servers used to make queries. Can be overridden - doing so will clear the cache.
+
+#### [lookup(hostname, options, callback)](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback)
+
+#### lookupAsync(hostname, options)
+
+The asynchronous version of `dns.lookup(…)`.
+
+Returns an [entry object](#entry-object).<br>
+If `options.all` is true, returns an array of entry objects.
+
+##### hostname
+
+Type: `string`
+
+##### options
+
+Type: `object`
+
+The same as the [`dns.lookup(…)`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback) options.
+
+#### query(hostname)
+
+An asynchronous function which returns cached DNS lookup entries.<br>
+This is the base for `lookupAsync(hostname, options)` and `lookup(hostname, options, callback)`.
+
+**Note**: This function has no options.
+
+Returns an array of objects with `address`, `family`, `ttl` and `expires` properties.
+
+#### queryAndCache(hostname)
+
+An asynchronous function which makes two DNS queries: A and AAAA. The result is cached.<br>
+This is used by `query(hostname)` if no entry in the database is present.
+
+Returns an array of objects with `address`, `family`, `ttl` and `expires` properties.
+
+#### updateInterfaceInfo()
+
+Updates interface info. For example, you need to run this when you plug or unplug your WiFi driver.
+
+**Note:** Running `updateInterfaceInfo()` will trigger `clear()` only on network interface removal.
+
+#### clear(hostname?)
+
+Clears the cache for the given hostname. If the hostname argument is not present, the entire cache will be emptied.
+
+## High performance
+
+Performed on:
+- Query: `example.com`
+- CPU: i7-7700k
+- CPU governor: performance
+
+```
+CacheableLookup#lookupAsync x 2,896,251 ops/sec ±1.07% (85 runs sampled)
+CacheableLookup#lookupAsync.all x 2,842,664 ops/sec ±1.11% (88 runs sampled)
+CacheableLookup#lookupAsync.all.ADDRCONFIG x 2,598,283 ops/sec ±1.21% (88 runs sampled)
+CacheableLookup#lookup x 2,565,913 ops/sec ±1.56% (85 runs sampled)
+CacheableLookup#lookup.all x 2,609,039 ops/sec ±1.01% (86 runs sampled)
+CacheableLookup#lookup.all.ADDRCONFIG x 2,416,242 ops/sec ±0.89% (85 runs sampled)
+dns#lookup x 7,272 ops/sec ±0.36% (86 runs sampled)
+dns#lookup.all x 7,249 ops/sec ±0.40% (86 runs sampled)
+dns#lookup.all.ADDRCONFIG x 5,693 ops/sec ±0.28% (85 runs sampled)
+Fastest is CacheableLookup#lookupAsync.all
+```
+
+## Related
+
+ - [cacheable-request](https://github.com/lukechilds/cacheable-request) - Wrap native HTTP requests with RFC compliant cache support
+
+## License
+
+MIT
diff --git a/node_modules/cacheable-lookup/index.d.ts b/node_modules/cacheable-lookup/index.d.ts
new file mode 100755
index 0000000..528b1e2
--- /dev/null
+++ b/node_modules/cacheable-lookup/index.d.ts
@@ -0,0 +1,139 @@
+import {Resolver, promises as dnsPromises, lookup} from 'dns';
+import {Agent} from 'http';
+
+type AsyncResolver = dnsPromises.Resolver;
+
+export type IPFamily = 4 | 6;
+
+type TPromise<T> = T | Promise<T>;
+
+export interface CacheInstance {
+ set(hostname: string, entries: EntryObject[], ttl: number): TPromise<void | boolean | this>;
+ get(hostname: string): TPromise<EntryObject[] | undefined>;
+ delete(hostname: string): TPromise<boolean>;
+ clear(): TPromise<void>;
+}
+
+export interface Options {
+ /**
+ * Custom cache instance. If `undefined`, it will create a new one.
+ * @default undefined
+ */
+ cache?: CacheInstance;
+ /**
+ * Limits the cache time (TTL). If set to `0`, it will make a new DNS query each time.
+ * @default Infinity
+ */
+ maxTtl?: number;
+ /**
+ * DNS Resolver used to make DNS queries.
+ * @default new dns.promises.Resolver()
+ */
+ resolver?: Resolver | AsyncResolver;
+ /**
+ * When the DNS server responds with `ENOTFOUND` or `ENODATA` and the OS reports that the entry is available,
+ * it will use `dns.lookup(...)` directly for the requested hostnames for the specified amount of time (in seconds).
+ *
+ * If you don't query internal hostnames (such as `localhost`, `database.local` etc.),
+ * it is strongly recommended to set this value to `0`.
+ * @default 3600
+ */
+ fallbackDuration?: number;
+ /**
+ * The time how long it needs to remember failed queries (TTL in seconds).
+ *
+ * **Note**: This option is independent, `options.maxTtl` does not affect this.
+ * @default 0.15
+ */
+ errorTtl?: number;
+ /**
+ * The fallback function to use when the DNS server responds with `ENOTFOUND` or `ENODATA`.
+ *
+ * **Note**: This has no effect if the `fallbackDuration` option is less than `1`.
+ * @default dns.lookup
+ */
+ lookup?: typeof lookup;
+}
+
+export interface EntryObject {
+ /**
+ * The IP address (can be an IPv4 or IPv5 address).
+ */
+ readonly address: string;
+ /**
+ * The IP family.
+ */
+ readonly family: IPFamily;
+ /**
+ * The original TTL.
+ */
+ readonly ttl?: number;
+ /**
+ * The expiration timestamp.
+ */
+ readonly expires?: number;
+}
+
+export interface LookupOptions {
+ /**
+ * One or more supported getaddrinfo flags. Multiple flags may be passed by bitwise ORing their values.
+ */
+ hints?: number;
+ /**
+ * The record family. Must be `4` or `6`. IPv4 and IPv6 addresses are both returned by default.
+ */
+ family?: IPFamily;
+ /**
+ * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address.
+ * @default false
+ */
+ all?: boolean;
+}
+
+export default class CacheableLookup {
+ constructor(options?: Options);
+ /**
+ * The DNS servers used to make queries. Can be overridden - doing so will clear the cache.
+ */
+ servers: string[];
+ /**
+ * @see https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback
+ */
+ lookup(hostname: string, family: IPFamily, callback: (error: NodeJS.ErrnoException, address: string, family: IPFamily) => void): void;
+ lookup(hostname: string, callback: (error: NodeJS.ErrnoException, address: string, family: IPFamily) => void): void;
+ lookup(hostname: string, options: LookupOptions & {all: true}, callback: (error: NodeJS.ErrnoException, result: ReadonlyArray<EntryObject>) => void): void;
+ lookup(hostname: string, options: LookupOptions, callback: (error: NodeJS.ErrnoException, address: string, family: IPFamily) => void): void;
+ /**
+ * The asynchronous version of `dns.lookup(…)`.
+ */
+ lookupAsync(hostname: string, options: LookupOptions & {all: true}): Promise<ReadonlyArray<EntryObject>>;
+ lookupAsync(hostname: string, options: LookupOptions): Promise<EntryObject>;
+ lookupAsync(hostname: string): Promise<EntryObject>;
+ lookupAsync(hostname: string, family: IPFamily): Promise<EntryObject>;
+ /**
+ * An asynchronous function which returns cached DNS lookup entries. This is the base for `lookupAsync(hostname, options)` and `lookup(hostname, options, callback)`.
+ */
+ query(hostname: string): Promise<ReadonlyArray<EntryObject>>;
+ /**
+ * An asynchronous function which makes a new DNS lookup query and updates the database. This is used by `query(hostname, family)` if no entry in the database is present. Returns an array of objects with `address`, `family`, `ttl` and `expires` properties.
+ */
+ queryAndCache(hostname: string): Promise<ReadonlyArray<EntryObject>>;
+ /**
+ * Attaches itself to an Agent instance.
+ */
+ install(agent: Agent): void;
+ /**
+ * Removes itself from an Agent instance.
+ */
+ uninstall(agent: Agent): void;
+ /**
+ * Updates interface info. For example, you need to run this when you plug or unplug your WiFi driver.
+ *
+ * **Note:** Running `updateInterfaceInfo()` will trigger `clear()` only on network interface removal.
+ */
+ updateInterfaceInfo(): void;
+ /**
+ * Clears the cache for the given hostname. If the hostname argument is not present, the entire cache will be emptied.
+ */
+ clear(hostname?: string): void;
+}
diff --git a/node_modules/cacheable-lookup/package.json b/node_modules/cacheable-lookup/package.json
new file mode 100755
index 0000000..f20991e
--- /dev/null
+++ b/node_modules/cacheable-lookup/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "cacheable-lookup",
+ "version": "5.0.4",
+ "description": "A cacheable dns.lookup(…) that respects the TTL",
+ "engines": {
+ "node": ">=10.6.0"
+ },
+ "files": [
+ "source",
+ "index.d.ts"
+ ],
+ "main": "source/index.js",
+ "types": "index.d.ts",
+ "scripts": {
+ "test": "xo && nyc --reporter=lcovonly --reporter=text ava && tsd"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/szmarczak/cacheable-lookup.git"
+ },
+ "keywords": [
+ "dns",
+ "lookup",
+ "cacheable",
+ "ttl"
+ ],
+ "author": "Szymon Marczak",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/szmarczak/cacheable-lookup/issues"
+ },
+ "homepage": "https://github.com/szmarczak/cacheable-lookup#readme",
+ "devDependencies": {
+ "@types/keyv": "^3.1.1",
+ "ava": "^3.8.2",
+ "benchmark": "^2.1.4",
+ "coveralls": "^3.0.9",
+ "keyv": "^4.0.0",
+ "nyc": "^15.0.0",
+ "proxyquire": "^2.1.3",
+ "tsd": "^0.11.0",
+ "quick-lru": "^5.1.0",
+ "xo": "^0.25.3"
+ }
+}
diff --git a/node_modules/cacheable-lookup/source/index.js b/node_modules/cacheable-lookup/source/index.js
new file mode 100755
index 0000000..21f731e
--- /dev/null
+++ b/node_modules/cacheable-lookup/source/index.js
@@ -0,0 +1,436 @@
+'use strict';
+const {
+ V4MAPPED,
+ ADDRCONFIG,
+ ALL,
+ promises: {
+ Resolver: AsyncResolver
+ },
+ lookup: dnsLookup
+} = require('dns');
+const {promisify} = require('util');
+const os = require('os');
+
+const kCacheableLookupCreateConnection = Symbol('cacheableLookupCreateConnection');
+const kCacheableLookupInstance = Symbol('cacheableLookupInstance');
+const kExpires = Symbol('expires');
+
+const supportsALL = typeof ALL === 'number';
+
+const verifyAgent = agent => {
+ if (!(agent && typeof agent.createConnection === 'function')) {
+ throw new Error('Expected an Agent instance as the first argument');
+ }
+};
+
+const map4to6 = entries => {
+ for (const entry of entries) {
+ if (entry.family === 6) {
+ continue;
+ }
+
+ entry.address = `::ffff:${entry.address}`;
+ entry.family = 6;
+ }
+};
+
+const getIfaceInfo = () => {
+ let has4 = false;
+ let has6 = false;
+
+ for (const device of Object.values(os.networkInterfaces())) {
+ for (const iface of device) {
+ if (iface.internal) {
+ continue;
+ }
+
+ if (iface.family === 'IPv6') {
+ has6 = true;
+ } else {
+ has4 = true;
+ }
+
+ if (has4 && has6) {
+ return {has4, has6};
+ }
+ }
+ }
+
+ return {has4, has6};
+};
+
+const isIterable = map => {
+ return Symbol.iterator in map;
+};
+
+const ttl = {ttl: true};
+const all = {all: true};
+
+class CacheableLookup {
+ constructor({
+ cache = new Map(),
+ maxTtl = Infinity,
+ fallbackDuration = 3600,
+ errorTtl = 0.15,
+ resolver = new AsyncResolver(),
+ lookup = dnsLookup
+ } = {}) {
+ this.maxTtl = maxTtl;
+ this.errorTtl = errorTtl;
+
+ this._cache = cache;
+ this._resolver = resolver;
+ this._dnsLookup = promisify(lookup);
+
+ if (this._resolver instanceof AsyncResolver) {
+ this._resolve4 = this._resolver.resolve4.bind(this._resolver);
+ this._resolve6 = this._resolver.resolve6.bind(this._resolver);
+ } else {
+ this._resolve4 = promisify(this._resolver.resolve4.bind(this._resolver));
+ this._resolve6 = promisify(this._resolver.resolve6.bind(this._resolver));
+ }
+
+ this._iface = getIfaceInfo();
+
+ this._pending = {};
+ this._nextRemovalTime = false;
+ this._hostnamesToFallback = new Set();
+
+ if (fallbackDuration < 1) {
+ this._fallback = false;
+ } else {
+ this._fallback = true;
+
+ const interval = setInterval(() => {
+ this._hostnamesToFallback.clear();
+ }, fallbackDuration * 1000);
+
+ /* istanbul ignore next: There is no `interval.unref()` when running inside an Electron renderer */
+ if (interval.unref) {
+ interval.unref();
+ }
+ }
+
+ this.lookup = this.lookup.bind(this);
+ this.lookupAsync = this.lookupAsync.bind(this);
+ }
+
+ set servers(servers) {
+ this.clear();
+
+ this._resolver.setServers(servers);
+ }
+
+ get servers() {
+ return this._resolver.getServers();
+ }
+
+ lookup(hostname, options, callback) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ } else if (typeof options === 'number') {
+ options = {
+ family: options
+ };
+ }
+
+ if (!callback) {
+ throw new Error('Callback must be a function.');
+ }
+
+ // eslint-disable-next-line promise/prefer-await-to-then
+ this.lookupAsync(hostname, options).then(result => {
+ if (options.all) {
+ callback(null, result);
+ } else {
+ callback(null, result.address, result.family, result.expires, result.ttl);
+ }
+ }, callback);
+ }
+
+ async lookupAsync(hostname, options = {}) {
+ if (typeof options === 'number') {
+ options = {
+ family: options
+ };
+ }
+
+ let cached = await this.query(hostname);
+
+ if (options.family === 6) {
+ const filtered = cached.filter(entry => entry.family === 6);
+
+ if (options.hints & V4MAPPED) {
+ if ((supportsALL && options.hints & ALL) || filtered.length === 0) {
+ map4to6(cached);
+ } else {
+ cached = filtered;
+ }
+ } else {
+ cached = filtered;
+ }
+ } else if (options.family === 4) {
+ cached = cached.filter(entry => entry.family === 4);
+ }
+
+ if (options.hints & ADDRCONFIG) {
+ const {_iface} = this;
+ cached = cached.filter(entry => entry.family === 6 ? _iface.has6 : _iface.has4);
+ }
+
+ if (cached.length === 0) {
+ const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`);
+ error.code = 'ENOTFOUND';
+ error.hostname = hostname;
+
+ throw error;
+ }
+
+ if (options.all) {
+ return cached;
+ }
+
+ return cached[0];
+ }
+
+ async query(hostname) {
+ let cached = await this._cache.get(hostname);
+
+ if (!cached) {
+ const pending = this._pending[hostname];
+
+ if (pending) {
+ cached = await pending;
+ } else {
+ const newPromise = this.queryAndCache(hostname);
+ this._pending[hostname] = newPromise;
+
+ try {
+ cached = await newPromise;
+ } finally {
+ delete this._pending[hostname];
+ }
+ }
+ }
+
+ cached = cached.map(entry => {
+ return {...entry};
+ });
+
+ return cached;
+ }
+
+ async _resolve(hostname) {
+ const wrap = async promise => {
+ try {
+ return await promise;
+ } catch (error) {
+ if (error.code === 'ENODATA' || error.code === 'ENOTFOUND') {
+ return [];
+ }
+
+ throw error;
+ }
+ };
+
+ // ANY is unsafe as it doesn't trigger new queries in the underlying server.
+ const [A, AAAA] = await Promise.all([
+ this._resolve4(hostname, ttl),
+ this._resolve6(hostname, ttl)
+ ].map(promise => wrap(promise)));
+
+ let aTtl = 0;
+ let aaaaTtl = 0;
+ let cacheTtl = 0;
+
+ const now = Date.now();
+
+ for (const entry of A) {
+ entry.family = 4;
+ entry.expires = now + (entry.ttl * 1000);
+
+ aTtl = Math.max(aTtl, entry.ttl);
+ }
+
+ for (const entry of AAAA) {
+ entry.family = 6;
+ entry.expires = now + (entry.ttl * 1000);
+
+ aaaaTtl = Math.max(aaaaTtl, entry.ttl);
+ }
+
+ if (A.length > 0) {
+ if (AAAA.length > 0) {
+ cacheTtl = Math.min(aTtl, aaaaTtl);
+ } else {
+ cacheTtl = aTtl;
+ }
+ } else {
+ cacheTtl = aaaaTtl;
+ }
+
+ return {
+ entries: [
+ ...A,
+ ...AAAA
+ ],
+ cacheTtl
+ };
+ }
+
+ async _lookup(hostname) {
+ try {
+ const entries = await this._dnsLookup(hostname, {
+ all: true
+ });
+
+ return {
+ entries,
+ cacheTtl: 0
+ };
+ } catch (_) {
+ return {
+ entries: [],
+ cacheTtl: 0
+ };
+ }
+ }
+
+ async _set(hostname, data, cacheTtl) {
+ if (this.maxTtl > 0 && cacheTtl > 0) {
+ cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000;
+ data[kExpires] = Date.now() + cacheTtl;
+
+ try {
+ await this._cache.set(hostname, data, cacheTtl);
+ } catch (error) {
+ this.lookupAsync = async () => {
+ const cacheError = new Error('Cache Error. Please recreate the CacheableLookup instance.');
+ cacheError.cause = error;
+
+ throw cacheError;
+ };
+ }
+
+ if (isIterable(this._cache)) {
+ this._tick(cacheTtl);
+ }
+ }
+ }
+
+ async queryAndCache(hostname) {
+ if (this._hostnamesToFallback.has(hostname)) {
+ return this._dnsLookup(hostname, all);
+ }
+
+ let query = await this._resolve(hostname);
+
+ if (query.entries.length === 0 && this._fallback) {
+ query = await this._lookup(hostname);
+
+ if (query.entries.length !== 0) {
+ // Use `dns.lookup(...)` for that particular hostname
+ this._hostnamesToFallback.add(hostname);
+ }
+ }
+
+ const cacheTtl = query.entries.length === 0 ? this.errorTtl : query.cacheTtl;
+ await this._set(hostname, query.entries, cacheTtl);
+
+ return query.entries;
+ }
+
+ _tick(ms) {
+ const nextRemovalTime = this._nextRemovalTime;
+
+ if (!nextRemovalTime || ms < nextRemovalTime) {
+ clearTimeout(this._removalTimeout);
+
+ this._nextRemovalTime = ms;
+
+ this._removalTimeout = setTimeout(() => {
+ this._nextRemovalTime = false;
+
+ let nextExpiry = Infinity;
+
+ const now = Date.now();
+
+ for (const [hostname, entries] of this._cache) {
+ const expires = entries[kExpires];
+
+ if (now >= expires) {
+ this._cache.delete(hostname);
+ } else if (expires < nextExpiry) {
+ nextExpiry = expires;
+ }
+ }
+
+ if (nextExpiry !== Infinity) {
+ this._tick(nextExpiry - now);
+ }
+ }, ms);
+
+ /* istanbul ignore next: There is no `timeout.unref()` when running inside an Electron renderer */
+ if (this._removalTimeout.unref) {
+ this._removalTimeout.unref();
+ }
+ }
+ }
+
+ install(agent) {
+ verifyAgent(agent);
+
+ if (kCacheableLookupCreateConnection in agent) {
+ throw new Error('CacheableLookup has been already installed');
+ }
+
+ agent[kCacheableLookupCreateConnection] = agent.createConnection;
+ agent[kCacheableLookupInstance] = this;
+
+ agent.createConnection = (options, callback) => {
+ if (!('lookup' in options)) {
+ options.lookup = this.lookup;
+ }
+
+ return agent[kCacheableLookupCreateConnection](options, callback);
+ };
+ }
+
+ uninstall(agent) {
+ verifyAgent(agent);
+
+ if (agent[kCacheableLookupCreateConnection]) {
+ if (agent[kCacheableLookupInstance] !== this) {
+ throw new Error('The agent is not owned by this CacheableLookup instance');
+ }
+
+ agent.createConnection = agent[kCacheableLookupCreateConnection];
+
+ delete agent[kCacheableLookupCreateConnection];
+ delete agent[kCacheableLookupInstance];
+ }
+ }
+
+ updateInterfaceInfo() {
+ const {_iface} = this;
+
+ this._iface = getIfaceInfo();
+
+ if ((_iface.has4 && !this._iface.has4) || (_iface.has6 && !this._iface.has6)) {
+ this._cache.clear();
+ }
+ }
+
+ clear(hostname) {
+ if (hostname) {
+ this._cache.delete(hostname);
+ return;
+ }
+
+ this._cache.clear();
+ }
+}
+
+module.exports = CacheableLookup;
+module.exports.default = CacheableLookup;
diff --git a/node_modules/cacheable-request/LICENSE b/node_modules/cacheable-request/LICENSE
new file mode 100644
index 0000000..f27ee9b
--- /dev/null
+++ b/node_modules/cacheable-request/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Luke Childs
+
+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/cacheable-request/README.md b/node_modules/cacheable-request/README.md
new file mode 100644
index 0000000..725e7e0
--- /dev/null
+++ b/node_modules/cacheable-request/README.md
@@ -0,0 +1,206 @@
+# cacheable-request
+
+> Wrap native HTTP requests with RFC compliant cache support
+
+[![Build Status](https://travis-ci.org/lukechilds/cacheable-request.svg?branch=master)](https://travis-ci.org/lukechilds/cacheable-request)
+[![Coverage Status](https://coveralls.io/repos/github/lukechilds/cacheable-request/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/cacheable-request?branch=master)
+[![npm](https://img.shields.io/npm/dm/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request)
+[![npm](https://img.shields.io/npm/v/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request)
+
+[RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching for native Node.js HTTP/HTTPS requests. Caching works out of the box in memory or is easily pluggable with a wide range of storage adapters.
+
+**Note:** This is a low level wrapper around the core HTTP modules, it's not a high level request library.
+
+## Features
+
+- Only stores cacheable responses as defined by RFC 7234
+- Fresh cache entries are served directly from cache
+- Stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers
+- 304 responses from revalidation requests use cached body
+- Updates `Age` header on cached responses
+- Can completely bypass cache on a per request basis
+- In memory cache by default
+- Official support for Redis, MongoDB, SQLite, PostgreSQL and MySQL storage adapters
+- Easily plug in your own or third-party storage adapters
+- If DB connection fails, cache is automatically bypassed ([disabled by default](#optsautomaticfailover))
+- Adds cache support to any existing HTTP code with minimal changes
+- Uses [http-cache-semantics](https://github.com/pornel/http-cache-semantics) internally for HTTP RFC 7234 compliance
+
+## Install
+
+```shell
+npm install cacheable-request
+```
+
+## Usage
+
+```js
+const http = require('http');
+const CacheableRequest = require('cacheable-request');
+
+// Then instead of
+const req = http.request('http://example.com', cb);
+req.end();
+
+// You can do
+const cacheableRequest = new CacheableRequest(http.request);
+const cacheReq = cacheableRequest('http://example.com', cb);
+cacheReq.on('request', req => req.end());
+// Future requests to 'example.com' will be returned from cache if still valid
+
+// You pass in any other http.request API compatible method to be wrapped with cache support:
+const cacheableRequest = new CacheableRequest(https.request);
+const cacheableRequest = new CacheableRequest(electron.net);
+```
+
+## Storage Adapters
+
+`cacheable-request` uses [Keyv](https://github.com/lukechilds/keyv) to support a wide range of storage adapters.
+
+For example, to use Redis as a cache backend, you just need to install the official Redis Keyv storage adapter:
+
+```
+npm install @keyv/redis
+```
+
+And then you can pass `CacheableRequest` your connection string:
+
+```js
+const cacheableRequest = new CacheableRequest(http.request, 'redis://user:pass@localhost:6379');
+```
+
+[View all official Keyv storage adapters.](https://github.com/lukechilds/keyv#official-storage-adapters)
+
+Keyv also supports anything that follows the Map API so it's easy to write your own storage adapter or use a third-party solution.
+
+e.g The following are all valid storage adapters
+
+```js
+const storageAdapter = new Map();
+// or
+const storageAdapter = require('./my-storage-adapter');
+// or
+const QuickLRU = require('quick-lru');
+const storageAdapter = new QuickLRU({ maxSize: 1000 });
+
+const cacheableRequest = new CacheableRequest(http.request, storageAdapter);
+```
+
+View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters.
+
+## API
+
+### new cacheableRequest(request, [storageAdapter])
+
+Returns the provided request function wrapped with cache support.
+
+#### request
+
+Type: `function`
+
+Request function to wrap with cache support. Should be [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) or a similar API compatible request function.
+
+#### storageAdapter
+
+Type: `Keyv storage adapter`<br>
+Default: `new Map()`
+
+A [Keyv](https://github.com/lukechilds/keyv) storage adapter instance, or connection string if using with an official Keyv storage adapter.
+
+### Instance
+
+#### cacheableRequest(opts, [cb])
+
+Returns an event emitter.
+
+##### opts
+
+Type: `object`, `string`
+
+- Any of the default request functions options.
+- Any [`http-cache-semantics`](https://github.com/kornelski/http-cache-semantics#constructor-options) options.
+- Any of the following:
+
+###### opts.cache
+
+Type: `boolean`<br>
+Default: `true`
+
+If the cache should be used. Setting this to false will completely bypass the cache for the current request.
+
+###### opts.strictTtl
+
+Type: `boolean`<br>
+Default: `false`
+
+If set to `true` once a cached resource has expired it is deleted and will have to be re-requested.
+
+If set to `false` (default), after a cached resource's TTL expires it is kept in the cache and will be revalidated on the next request with `If-None-Match`/`If-Modified-Since` headers.
+
+###### opts.maxTtl
+
+Type: `number`<br>
+Default: `undefined`
+
+Limits TTL. The `number` represents milliseconds.
+
+###### opts.automaticFailover
+
+Type: `boolean`<br>
+Default: `false`
+
+When set to `true`, if the DB connection fails we will automatically fallback to a network request. DB errors will still be emitted to notify you of the problem even though the request callback may succeed.
+
+###### opts.forceRefresh
+
+Type: `boolean`<br>
+Default: `false`
+
+Forces refreshing the cache. If the response could be retrieved from the cache, it will perform a new request and override the cache instead.
+
+##### cb
+
+Type: `function`
+
+The callback function which will receive the response as an argument.
+
+The response can be either a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or a [responselike object](https://github.com/lukechilds/responselike). The response will also have a `fromCache` property set with a boolean value.
+
+##### .on('request', request)
+
+`request` event to get the request object of the request.
+
+**Note:** This event will only fire if an HTTP request is actually made, not when a response is retrieved from cache. However, you should always handle the `request` event to end the request and handle any potential request errors.
+
+##### .on('response', response)
+
+`response` event to get the response object from the HTTP request or cache.
+
+##### .on('error', error)
+
+`error` event emitted in case of an error with the cache.
+
+Errors emitted here will be an instance of `CacheableRequest.RequestError` or `CacheableRequest.CacheError`. You will only ever receive a `RequestError` if the request function throws (normally caused by invalid user input). Normal request errors should be handled inside the `request` event.
+
+To properly handle all error scenarios you should use the following pattern:
+
+```js
+cacheableRequest('example.com', cb)
+ .on('error', err => {
+ if (err instanceof CacheableRequest.CacheError) {
+ handleCacheError(err); // Cache error
+ } else if (err instanceof CacheableRequest.RequestError) {
+ handleRequestError(err); // Request function thrown
+ }
+ })
+ .on('request', req => {
+ req.on('error', handleRequestError); // Request error emitted
+ req.end();
+ });
+```
+
+**Note:** Database connection errors are emitted here, however `cacheable-request` will attempt to re-request the resource and bypass the cache on a connection error. Therefore a database connection error doesn't necessarily mean the request won't be fulfilled.
+
+## License
+
+MIT © Luke Childs
diff --git a/node_modules/cacheable-request/package.json b/node_modules/cacheable-request/package.json
new file mode 100644
index 0000000..b3e0242
--- /dev/null
+++ b/node_modules/cacheable-request/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "cacheable-request",
+ "version": "7.0.2",
+ "description": "Wrap native HTTP requests with RFC compliant cache support",
+ "license": "MIT",
+ "repository": "lukechilds/cacheable-request",
+ "author": "Luke Childs <lukechilds123@gmail.com> (http://lukechilds.co.uk)",
+ "main": "src/index.js",
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && nyc ava",
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "files": [
+ "src"
+ ],
+ "keywords": [
+ "HTTP",
+ "HTTPS",
+ "cache",
+ "caching",
+ "layer",
+ "cacheable",
+ "RFC 7234",
+ "RFC",
+ "7234",
+ "compliant"
+ ],
+ "dependencies": {
+ "clone-response": "^1.0.2",
+ "get-stream": "^5.1.0",
+ "http-cache-semantics": "^4.0.0",
+ "keyv": "^4.0.0",
+ "lowercase-keys": "^2.0.0",
+ "normalize-url": "^6.0.1",
+ "responselike": "^2.0.0"
+ },
+ "devDependencies": {
+ "@keyv/sqlite": "^2.0.0",
+ "ava": "^1.1.0",
+ "coveralls": "^3.0.0",
+ "create-test-server": "3.0.0",
+ "delay": "^4.0.0",
+ "eslint-config-xo-lukechilds": "^1.0.0",
+ "nyc": "^14.1.1",
+ "pify": "^4.0.0",
+ "sqlite3": "^4.0.2",
+ "this": "^1.0.2",
+ "xo": "^0.23.0"
+ },
+ "xo": {
+ "extends": "xo-lukechilds"
+ }
+}
diff --git a/node_modules/cacheable-request/src/index.js b/node_modules/cacheable-request/src/index.js
new file mode 100644
index 0000000..3fcea3f
--- /dev/null
+++ b/node_modules/cacheable-request/src/index.js
@@ -0,0 +1,251 @@
+'use strict';
+
+const EventEmitter = require('events');
+const urlLib = require('url');
+const normalizeUrl = require('normalize-url');
+const getStream = require('get-stream');
+const CachePolicy = require('http-cache-semantics');
+const Response = require('responselike');
+const lowercaseKeys = require('lowercase-keys');
+const cloneResponse = require('clone-response');
+const Keyv = require('keyv');
+
+class CacheableRequest {
+ constructor(request, cacheAdapter) {
+ if (typeof request !== 'function') {
+ throw new TypeError('Parameter `request` must be a function');
+ }
+
+ this.cache = new Keyv({
+ uri: typeof cacheAdapter === 'string' && cacheAdapter,
+ store: typeof cacheAdapter !== 'string' && cacheAdapter,
+ namespace: 'cacheable-request'
+ });
+
+ return this.createCacheableRequest(request);
+ }
+
+ createCacheableRequest(request) {
+ return (opts, cb) => {
+ let url;
+ if (typeof opts === 'string') {
+ url = normalizeUrlObject(urlLib.parse(opts));
+ opts = {};
+ } else if (opts instanceof urlLib.URL) {
+ url = normalizeUrlObject(urlLib.parse(opts.toString()));
+ opts = {};
+ } else {
+ const [pathname, ...searchParts] = (opts.path || '').split('?');
+ const search = searchParts.length > 0 ?
+ `?${searchParts.join('?')}` :
+ '';
+ url = normalizeUrlObject({ ...opts, pathname, search });
+ }
+
+ opts = {
+ headers: {},
+ method: 'GET',
+ cache: true,
+ strictTtl: false,
+ automaticFailover: false,
+ ...opts,
+ ...urlObjectToRequestOptions(url)
+ };
+ opts.headers = lowercaseKeys(opts.headers);
+
+ const ee = new EventEmitter();
+ const normalizedUrlString = normalizeUrl(
+ urlLib.format(url),
+ {
+ stripWWW: false,
+ removeTrailingSlash: false,
+ stripAuthentication: false
+ }
+ );
+ const key = `${opts.method}:${normalizedUrlString}`;
+ let revalidate = false;
+ let madeRequest = false;
+
+ const makeRequest = opts => {
+ madeRequest = true;
+ let requestErrored = false;
+ let requestErrorCallback;
+
+ const requestErrorPromise = new Promise(resolve => {
+ requestErrorCallback = () => {
+ if (!requestErrored) {
+ requestErrored = true;
+ resolve();
+ }
+ };
+ });
+
+ const handler = response => {
+ if (revalidate && !opts.forceRefresh) {
+ response.status = response.statusCode;
+ const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response);
+ if (!revalidatedPolicy.modified) {
+ const headers = revalidatedPolicy.policy.responseHeaders();
+ response = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url);
+ response.cachePolicy = revalidatedPolicy.policy;
+ response.fromCache = true;
+ }
+ }
+
+ if (!response.fromCache) {
+ response.cachePolicy = new CachePolicy(opts, response, opts);
+ response.fromCache = false;
+ }
+
+ let clonedResponse;
+ if (opts.cache && response.cachePolicy.storable()) {
+ clonedResponse = cloneResponse(response);
+
+ (async () => {
+ try {
+ const bodyPromise = getStream.buffer(response);
+
+ await Promise.race([
+ requestErrorPromise,
+ new Promise(resolve => response.once('end', resolve))
+ ]);
+
+ if (requestErrored) {
+ return;
+ }
+
+ const body = await bodyPromise;
+
+ const value = {
+ cachePolicy: response.cachePolicy.toObject(),
+ url: response.url,
+ statusCode: response.fromCache ? revalidate.statusCode : response.statusCode,
+ body
+ };
+
+ let ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined;
+ if (opts.maxTtl) {
+ ttl = ttl ? Math.min(ttl, opts.maxTtl) : opts.maxTtl;
+ }
+
+ await this.cache.set(key, value, ttl);
+ } catch (error) {
+ ee.emit('error', new CacheableRequest.CacheError(error));
+ }
+ })();
+ } else if (opts.cache && revalidate) {
+ (async () => {
+ try {
+ await this.cache.delete(key);
+ } catch (error) {
+ ee.emit('error', new CacheableRequest.CacheError(error));
+ }
+ })();
+ }
+
+ ee.emit('response', clonedResponse || response);
+ if (typeof cb === 'function') {
+ cb(clonedResponse || response);
+ }
+ };
+
+ try {
+ const req = request(opts, handler);
+ req.once('error', requestErrorCallback);
+ req.once('abort', requestErrorCallback);
+ ee.emit('request', req);
+ } catch (error) {
+ ee.emit('error', new CacheableRequest.RequestError(error));
+ }
+ };
+
+ (async () => {
+ const get = async opts => {
+ await Promise.resolve();
+
+ const cacheEntry = opts.cache ? await this.cache.get(key) : undefined;
+ if (typeof cacheEntry === 'undefined') {
+ return makeRequest(opts);
+ }
+
+ const policy = CachePolicy.fromObject(cacheEntry.cachePolicy);
+ if (policy.satisfiesWithoutRevalidation(opts) && !opts.forceRefresh) {
+ const headers = policy.responseHeaders();
+ const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url);
+ response.cachePolicy = policy;
+ response.fromCache = true;
+
+ ee.emit('response', response);
+ if (typeof cb === 'function') {
+ cb(response);
+ }
+ } else {
+ revalidate = cacheEntry;
+ opts.headers = policy.revalidationHeaders(opts);
+ makeRequest(opts);
+ }
+ };
+
+ const errorHandler = error => ee.emit('error', new CacheableRequest.CacheError(error));
+ this.cache.once('error', errorHandler);
+ ee.on('response', () => this.cache.removeListener('error', errorHandler));
+
+ try {
+ await get(opts);
+ } catch (error) {
+ if (opts.automaticFailover && !madeRequest) {
+ makeRequest(opts);
+ }
+
+ ee.emit('error', new CacheableRequest.CacheError(error));
+ }
+ })();
+
+ return ee;
+ };
+ }
+}
+
+function urlObjectToRequestOptions(url) {
+ const options = { ...url };
+ options.path = `${url.pathname || '/'}${url.search || ''}`;
+ delete options.pathname;
+ delete options.search;
+ return options;
+}
+
+function normalizeUrlObject(url) {
+ // If url was parsed by url.parse or new URL:
+ // - hostname will be set
+ // - host will be hostname[:port]
+ // - port will be set if it was explicit in the parsed string
+ // Otherwise, url was from request options:
+ // - hostname or host may be set
+ // - host shall not have port encoded
+ return {
+ protocol: url.protocol,
+ auth: url.auth,
+ hostname: url.hostname || url.host || 'localhost',
+ port: url.port,
+ pathname: url.pathname,
+ search: url.search
+ };
+}
+
+CacheableRequest.RequestError = class extends Error {
+ constructor(error) {
+ super(error.message);
+ this.name = 'RequestError';
+ Object.assign(this, error);
+ }
+};
+
+CacheableRequest.CacheError = class extends Error {
+ constructor(error) {
+ super(error.message);
+ this.name = 'CacheError';
+ Object.assign(this, error);
+ }
+};
+
+module.exports = CacheableRequest;
diff --git a/node_modules/camelcase-keys/index.js b/node_modules/camelcase-keys/index.js
new file mode 100644
index 0000000..0eca08c
--- /dev/null
+++ b/node_modules/camelcase-keys/index.js
@@ -0,0 +1,12 @@
+'use strict';
+var mapObj = require('map-obj');
+var camelCase = require('camelcase');
+
+module.exports = function (input, options) {
+ options = options || {};
+ var exclude = options.exclude || [];
+ return mapObj(input, function (key, val) {
+ key = exclude.indexOf(key) === -1 ? camelCase(key) : key;
+ return [key, val];
+ });
+};
diff --git a/node_modules/camelcase-keys/license b/node_modules/camelcase-keys/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/camelcase-keys/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/camelcase-keys/package.json b/node_modules/camelcase-keys/package.json
new file mode 100644
index 0000000..44a34de
--- /dev/null
+++ b/node_modules/camelcase-keys/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "camelcase-keys",
+ "version": "2.1.0",
+ "description": "Convert object keys to camelCase",
+ "license": "MIT",
+ "repository": "sindresorhus/camelcase-keys",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "map",
+ "obj",
+ "object",
+ "key",
+ "keys",
+ "value",
+ "values",
+ "val",
+ "iterate",
+ "camelcase",
+ "camel-case",
+ "camel",
+ "case",
+ "dash",
+ "hyphen",
+ "dot",
+ "underscore",
+ "separator",
+ "string",
+ "text",
+ "convert"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "dependencies": {
+ "camelcase": "^2.0.0",
+ "map-obj": "^1.0.0"
+ }
+}
diff --git a/node_modules/camelcase-keys/readme.md b/node_modules/camelcase-keys/readme.md
new file mode 100644
index 0000000..ca37328
--- /dev/null
+++ b/node_modules/camelcase-keys/readme.md
@@ -0,0 +1,54 @@
+# camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys)
+
+> Convert object keys to camelCase using [`camelcase`](https://github.com/sindresorhus/camelcase)
+
+
+## Install
+
+```
+$ npm install --save camelcase-keys
+```
+
+
+## Usage
+
+```js
+const camelcaseKeys = require('camelcase-keys');
+
+camelcaseKeys({'foo-bar': true});
+//=> {fooBar: true}
+
+
+const argv = require('minimist')(process.argv.slice(2));
+//=> {_: [], 'foo-bar': true}
+
+camelcaseKeys(argv);
+//=> {_: [], fooBar: true}
+```
+
+
+## API
+
+### camelcaseKeys(input, [options])
+
+#### input
+
+Type: `object`
+
+Object to camelCase.
+
+#### options
+
+Type: `object`
+
+##### exclude
+
+Type: `array`
+Default: `[]`
+
+Exclude keys from being camelCased.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js
new file mode 100644
index 0000000..929facb
--- /dev/null
+++ b/node_modules/camelcase/index.js
@@ -0,0 +1,56 @@
+'use strict';
+
+function preserveCamelCase(str) {
+ var isLastCharLower = false;
+
+ for (var i = 0; i < str.length; i++) {
+ var c = str.charAt(i);
+
+ if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) {
+ str = str.substr(0, i) + '-' + str.substr(i);
+ isLastCharLower = false;
+ i++;
+ } else {
+ isLastCharLower = (c.toLowerCase() === c);
+ }
+ }
+
+ return str;
+}
+
+module.exports = function () {
+ var str = [].map.call(arguments, function (str) {
+ return str.trim();
+ }).filter(function (str) {
+ return str.length;
+ }).join('-');
+
+ if (!str.length) {
+ return '';
+ }
+
+ if (str.length === 1) {
+ return str;
+ }
+
+ if (!(/[_.\- ]+/).test(str)) {
+ if (str === str.toUpperCase()) {
+ return str.toLowerCase();
+ }
+
+ if (str[0] !== str[0].toLowerCase()) {
+ return str[0].toLowerCase() + str.slice(1);
+ }
+
+ return str;
+ }
+
+ str = preserveCamelCase(str);
+
+ return str
+ .replace(/^[_.\- ]+/, '')
+ .toLowerCase()
+ .replace(/[_.\- ]+(\w|$)/g, function (m, p1) {
+ return p1.toUpperCase();
+ });
+};
diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/camelcase/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json
new file mode 100644
index 0000000..6cee2b5
--- /dev/null
+++ b/node_modules/camelcase/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "camelcase",
+ "version": "2.1.1",
+ "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar",
+ "license": "MIT",
+ "repository": "sindresorhus/camelcase",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "camelcase",
+ "camel-case",
+ "camel",
+ "case",
+ "dash",
+ "hyphen",
+ "dot",
+ "underscore",
+ "separator",
+ "string",
+ "text",
+ "convert"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md
new file mode 100644
index 0000000..080b2a1
--- /dev/null
+++ b/node_modules/camelcase/readme.md
@@ -0,0 +1,57 @@
+# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase)
+
+> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar`
+
+
+## Install
+
+```
+$ npm install --save camelcase
+```
+
+
+## Usage
+
+```js
+const camelCase = require('camelcase');
+
+camelCase('foo-bar');
+//=> 'fooBar'
+
+camelCase('foo_bar');
+//=> 'fooBar'
+
+camelCase('Foo-Bar');
+//=> 'fooBar'
+
+camelCase('--foo.bar');
+//=> 'fooBar'
+
+camelCase('__foo__bar__');
+//=> 'fooBar'
+
+camelCase('foo bar');
+//=> 'fooBar'
+
+console.log(process.argv[3]);
+//=> '--foo-bar'
+camelCase(process.argv[3]);
+//=> 'fooBar'
+
+camelCase('foo', 'bar');
+//=> 'fooBar'
+
+camelCase('__foo__', '--bar');
+//=> 'fooBar'
+```
+
+
+## Related
+
+- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
+- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/caseless/LICENSE b/node_modules/caseless/LICENSE
new file mode 100644
index 0000000..61789f4
--- /dev/null
+++ b/node_modules/caseless/LICENSE
@@ -0,0 +1,28 @@
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+1. Definitions.
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/caseless/README.md b/node_modules/caseless/README.md
new file mode 100644
index 0000000..e5077a2
--- /dev/null
+++ b/node_modules/caseless/README.md
@@ -0,0 +1,45 @@
+## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing.
+
+This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set.
+
+## Usage
+
+```javascript
+var headers = {}
+ , c = caseless(headers)
+ ;
+c.set('a-Header', 'asdf')
+c.get('a-header') === 'asdf'
+```
+
+## has(key)
+
+Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with.
+
+```javascript
+c.has('a-header') === 'a-Header'
+```
+
+## set(key, value[, clobber=true])
+
+Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header.
+
+```javascript
+c.set('a-Header', 'fdas')
+c.set('a-HEADER', 'more', false)
+c.get('a-header') === 'fdsa,more'
+```
+
+## swap(key)
+
+Swaps the casing of a header with the new one that is passed in.
+
+```javascript
+var headers = {}
+ , c = caseless(headers)
+ ;
+c.set('a-Header', 'fdas')
+c.swap('a-HEADER')
+c.has('a-header') === 'a-HEADER'
+headers === {'a-HEADER': 'fdas'}
+```
diff --git a/node_modules/caseless/index.js b/node_modules/caseless/index.js
new file mode 100644
index 0000000..b194734
--- /dev/null
+++ b/node_modules/caseless/index.js
@@ -0,0 +1,67 @@
+function Caseless (dict) {
+ this.dict = dict || {}
+}
+Caseless.prototype.set = function (name, value, clobber) {
+ if (typeof name === 'object') {
+ for (var i in name) {
+ this.set(i, name[i], value)
+ }
+ } else {
+ if (typeof clobber === 'undefined') clobber = true
+ var has = this.has(name)
+
+ if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value
+ else this.dict[has || name] = value
+ return has
+ }
+}
+Caseless.prototype.has = function (name) {
+ var keys = Object.keys(this.dict)
+ , name = name.toLowerCase()
+ ;
+ for (var i=0;i<keys.length;i++) {
+ if (keys[i].toLowerCase() === name) return keys[i]
+ }
+ return false
+}
+Caseless.prototype.get = function (name) {
+ name = name.toLowerCase()
+ var result, _key
+ var headers = this.dict
+ Object.keys(headers).forEach(function (key) {
+ _key = key.toLowerCase()
+ if (name === _key) result = headers[key]
+ })
+ return result
+}
+Caseless.prototype.swap = function (name) {
+ var has = this.has(name)
+ if (has === name) return
+ if (!has) throw new Error('There is no header than matches "'+name+'"')
+ this.dict[name] = this.dict[has]
+ delete this.dict[has]
+}
+Caseless.prototype.del = function (name) {
+ var has = this.has(name)
+ return delete this.dict[has || name]
+}
+
+module.exports = function (dict) {return new Caseless(dict)}
+module.exports.httpify = function (resp, headers) {
+ var c = new Caseless(headers)
+ resp.setHeader = function (key, value, clobber) {
+ if (typeof value === 'undefined') return
+ return c.set(key, value, clobber)
+ }
+ resp.hasHeader = function (key) {
+ return c.has(key)
+ }
+ resp.getHeader = function (key) {
+ return c.get(key)
+ }
+ resp.removeHeader = function (key) {
+ return c.del(key)
+ }
+ resp.headers = c.dict
+ return c
+}
diff --git a/node_modules/caseless/package.json b/node_modules/caseless/package.json
new file mode 100644
index 0000000..408a6e1
--- /dev/null
+++ b/node_modules/caseless/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "caseless",
+ "version": "0.12.0",
+ "description": "Caseless object set/get/has, very useful when working with HTTP headers.",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mikeal/caseless"
+ },
+ "keywords": [
+ "headers",
+ "http",
+ "caseless"
+ ],
+ "test": "node test.js",
+ "author": "Mikeal Rogers <mikeal.rogers@gmail.com>",
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/mikeal/caseless/issues"
+ },
+ "devDependencies": {
+ "tape": "^2.10.2"
+ }
+}
diff --git a/node_modules/caseless/test.js b/node_modules/caseless/test.js
new file mode 100644
index 0000000..f55196c
--- /dev/null
+++ b/node_modules/caseless/test.js
@@ -0,0 +1,67 @@
+var tape = require('tape')
+ , caseless = require('./')
+ ;
+
+tape('set get has', function (t) {
+ var headers = {}
+ , c = caseless(headers)
+ ;
+ t.plan(17)
+ c.set('a-Header', 'asdf')
+ t.equal(c.get('a-header'), 'asdf')
+ t.equal(c.has('a-header'), 'a-Header')
+ t.ok(!c.has('nothing'))
+ // old bug where we used the wrong regex
+ t.ok(!c.has('a-hea'))
+ c.set('a-header', 'fdsa')
+ t.equal(c.get('a-header'), 'fdsa')
+ t.equal(c.get('a-Header'), 'fdsa')
+ c.set('a-HEADER', 'more', false)
+ t.equal(c.get('a-header'), 'fdsa,more')
+
+ t.deepEqual(headers, {'a-Header': 'fdsa,more'})
+ c.swap('a-HEADER')
+ t.deepEqual(headers, {'a-HEADER': 'fdsa,more'})
+
+ c.set('deleteme', 'foobar')
+ t.ok(c.has('deleteme'))
+ t.ok(c.del('deleteme'))
+ t.notOk(c.has('deleteme'))
+ t.notOk(c.has('idonotexist'))
+ t.ok(c.del('idonotexist'))
+
+ c.set('tva', 'test1')
+ c.set('tva-header', 'test2')
+ t.equal(c.has('tva'), 'tva')
+ t.notOk(c.has('header'))
+
+ t.equal(c.get('tva'), 'test1')
+
+})
+
+tape('swap', function (t) {
+ var headers = {}
+ , c = caseless(headers)
+ ;
+ t.plan(4)
+ // No Header to Swap.
+ t.throws(function () {
+ c.swap('content-type')
+ })
+ // Set Header.
+ c.set('content-type', 'application/json')
+ // Swap Header With Itself.
+ c.swap('content-type')
+ // Does Not Delete Itself.
+ t.ok(c.has('content-type'))
+ // Swap Header With a Different Header.
+ c.swap('Content-Type')
+ // Still Has Header.
+ t.ok(c.has('Content-Type'))
+ // Delete Header.
+ c.del('Content-Type')
+ // No Header to Swap.
+ t.throws(function () {
+ c.swap('content-type')
+ })
+})
diff --git a/node_modules/chromium-pickle-js/README.md b/node_modules/chromium-pickle-js/README.md
new file mode 100644
index 0000000..e95d2b9
--- /dev/null
+++ b/node_modules/chromium-pickle-js/README.md
@@ -0,0 +1,132 @@
+# chromium-pickle-js [![Build Status](https://travis-ci.org/electron/node-chromium-pickle-js.svg?branch=master)](https://travis-ci.org/electron/node-chromium-pickle-js)
+
+This module ports Chromium's `Pickle` class to Node, see `Pickle`'s header for
+introduction:
+
+> This class provides facilities for basic binary value packing and unpacking.
+>
+> The Pickle class supports appending primitive values (ints, strings, etc.)
+> to a pickle instance. The Pickle instance grows its internal memory buffer
+> dynamically to hold the sequence of primitive values. The internal memory
+> buffer is exposed as the "data" of the Pickle. This "data" can be passed
+> to a Pickle object to initialize it for reading.
+>
+> When reading from a Pickle object, it is important for the consumer to know
+> what value types to read and in what order to read them as the Pickle does
+> not keep track of the type of data written to it.
+>
+> The Pickle's data has a header which contains the size of the Pickle's
+> payload. It can optionally support additional space in the header. That
+> space is controlled by the header_size parameter passed to the Pickle
+> constructor.
+
+## Install
+
+```bash
+$ npm install chromium-pickle-js
+```
+
+## Usage
+
+### createEmpty()
+
+Returns an empty `Pickle` object.
+
+### createFromBuffer(buffer)
+
+* `buffer` Buffer
+
+Returns a `Pickle` object that initialized from a `buffer`. The data is not
+copied so you have to ensure the `buffer` lives when using the Pickle object,
+and you should never modify the Pickle object created this way.
+
+### Pickle.createIterator()
+
+Returns a `PickleIterator` object that can be used to read data from this
+`Pickle` object.
+
+### Pickle.toBuffer()
+
+Returns a `Buffer` object that contains this `Pickle` object's data.
+
+### Pickle.writeBool(value)
+
+Writes `value` to `Pickle` object as `bool`. Returns `true` when succeeded and
+returns `false` when failed.
+
+### Pickle.writeInt(value)
+
+Writes `value` to `Pickle` object as `int`. Returns `true` when succeeded and
+returns `false` when failed.
+
+### Pickle.writeUInt32(value)
+
+Writes `value` to `Pickle` object as `uint32`. Returns `true` when succeeded and
+returns `false` when failed.
+
+### Pickle.writeInt64(value)
+
+Writes `value` to `Pickle` object as `int64`. Returns `true` when succeeded and
+returns `false` when failed.
+
+### Pickle.writeUInt64(value)
+
+Writes `value` to `Pickle` object as `uint64`. Returns `true` when succeeded and
+returns `false` when failed.
+
+### Pickle.writeFloat(value)
+
+Writes `value` to `Pickle` object as `float`. Returns `true` when succeeded and
+returns `false` when failed.
+
+### Pickle.writeDouble(value)
+
+Writes `value` to `Pickle` object as `Double`. Returns `true` when succeeded and
+returns `false` when failed.
+
+### Pickle.writeString(str)
+
+* `str` String
+
+Writes `str` to `Pickle` object. Returns `true` when succeeded and returns
+`false` when failed.
+
+### PickleIterator.readBool()
+
+Returns current value as `bool` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
+
+### PickleIterator.readInt()
+
+Returns current value as `int` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
+
+### PickleIterator.readUInt32()
+
+Returns current value as `uint32` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
+
+### PickleIterator.readInt64()
+
+Returns current value as `int64` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
+
+### PickleIterator.readUInt64()
+
+Returns current value as `uint64` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
+
+### PickleIterator.readFloat()
+
+Returns current value as `float` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
+
+### PickleIterator.readDouble()
+
+Returns current value as `double` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
+
+### PickleIterator.readString()
+
+Returns current value as `String` and seeks to next data. A`TypeError` exception
+would be thrown when failed.
diff --git a/node_modules/chromium-pickle-js/lib/exports.js b/node_modules/chromium-pickle-js/lib/exports.js
new file mode 100644
index 0000000..6678e0d
--- /dev/null
+++ b/node_modules/chromium-pickle-js/lib/exports.js
@@ -0,0 +1,11 @@
+var Pickle = require('./pickle')
+
+module.exports = {
+ createEmpty: function () {
+ return new Pickle()
+ },
+
+ createFromBuffer: function (buffer) {
+ return new Pickle(buffer)
+ }
+}
diff --git a/node_modules/chromium-pickle-js/lib/pickle.js b/node_modules/chromium-pickle-js/lib/pickle.js
new file mode 100644
index 0000000..afd8c59
--- /dev/null
+++ b/node_modules/chromium-pickle-js/lib/pickle.js
@@ -0,0 +1,222 @@
+// sizeof(T).
+var SIZE_INT32 = 4
+var SIZE_UINT32 = 4
+var SIZE_INT64 = 8
+var SIZE_UINT64 = 8
+var SIZE_FLOAT = 4
+var SIZE_DOUBLE = 8
+
+// The allocation granularity of the payload.
+var PAYLOAD_UNIT = 64
+
+// Largest JS number.
+var CAPACITY_READ_ONLY = 9007199254740992
+
+// Aligns 'i' by rounding it up to the next multiple of 'alignment'.
+var alignInt = function (i, alignment) {
+ return i + (alignment - (i % alignment)) % alignment
+}
+
+// PickleIterator reads data from a Pickle. The Pickle object must remain valid
+// while the PickleIterator object is in use.
+var PickleIterator = (function () {
+ function PickleIterator (pickle) {
+ this.payload = pickle.header
+ this.payloadOffset = pickle.headerSize
+ this.readIndex = 0
+ this.endIndex = pickle.getPayloadSize()
+ }
+
+ PickleIterator.prototype.readBool = function () {
+ return this.readInt() !== 0
+ }
+
+ PickleIterator.prototype.readInt = function () {
+ return this.readBytes(SIZE_INT32, Buffer.prototype.readInt32LE)
+ }
+
+ PickleIterator.prototype.readUInt32 = function () {
+ return this.readBytes(SIZE_UINT32, Buffer.prototype.readUInt32LE)
+ }
+
+ PickleIterator.prototype.readInt64 = function () {
+ return this.readBytes(SIZE_INT64, Buffer.prototype.readInt64LE)
+ }
+
+ PickleIterator.prototype.readUInt64 = function () {
+ return this.readBytes(SIZE_UINT64, Buffer.prototype.readUInt64LE)
+ }
+
+ PickleIterator.prototype.readFloat = function () {
+ return this.readBytes(SIZE_FLOAT, Buffer.prototype.readFloatLE)
+ }
+
+ PickleIterator.prototype.readDouble = function () {
+ return this.readBytes(SIZE_DOUBLE, Buffer.prototype.readDoubleLE)
+ }
+
+ PickleIterator.prototype.readString = function () {
+ return this.readBytes(this.readInt()).toString()
+ }
+
+ PickleIterator.prototype.readBytes = function (length, method) {
+ var readPayloadOffset = this.getReadPayloadOffsetAndAdvance(length)
+ if (method != null) {
+ return method.call(this.payload, readPayloadOffset, length)
+ } else {
+ return this.payload.slice(readPayloadOffset, readPayloadOffset + length)
+ }
+ }
+
+ PickleIterator.prototype.getReadPayloadOffsetAndAdvance = function (length) {
+ if (length > this.endIndex - this.readIndex) {
+ this.readIndex = this.endIndex
+ throw new Error('Failed to read data with length of ' + length)
+ }
+ var readPayloadOffset = this.payloadOffset + this.readIndex
+ this.advance(length)
+ return readPayloadOffset
+ }
+
+ PickleIterator.prototype.advance = function (size) {
+ var alignedSize = alignInt(size, SIZE_UINT32)
+ if (this.endIndex - this.readIndex < alignedSize) {
+ this.readIndex = this.endIndex
+ } else {
+ this.readIndex += alignedSize
+ }
+ }
+
+ return PickleIterator
+})()
+
+// This class provides facilities for basic binary value packing and unpacking.
+//
+// The Pickle class supports appending primitive values (ints, strings, etc.)
+// to a pickle instance. The Pickle instance grows its internal memory buffer
+// dynamically to hold the sequence of primitive values. The internal memory
+// buffer is exposed as the "data" of the Pickle. This "data" can be passed
+// to a Pickle object to initialize it for reading.
+//
+// When reading from a Pickle object, it is important for the consumer to know
+// what value types to read and in what order to read them as the Pickle does
+// not keep track of the type of data written to it.
+//
+// The Pickle's data has a header which contains the size of the Pickle's
+// payload. It can optionally support additional space in the header. That
+// space is controlled by the header_size parameter passed to the Pickle
+// constructor.
+var Pickle = (function () {
+ function Pickle (buffer) {
+ if (buffer) {
+ this.initFromBuffer(buffer)
+ } else {
+ this.initEmpty()
+ }
+ }
+
+ Pickle.prototype.initEmpty = function () {
+ this.header = new Buffer(0)
+ this.headerSize = SIZE_UINT32
+ this.capacityAfterHeader = 0
+ this.writeOffset = 0
+ this.resize(PAYLOAD_UNIT)
+ this.setPayloadSize(0)
+ }
+
+ Pickle.prototype.initFromBuffer = function (buffer) {
+ this.header = buffer
+ this.headerSize = buffer.length - this.getPayloadSize()
+ this.capacityAfterHeader = CAPACITY_READ_ONLY
+ this.writeOffset = 0
+ if (this.headerSize > buffer.length) {
+ this.headerSize = 0
+ }
+ if (this.headerSize !== alignInt(this.headerSize, SIZE_UINT32)) {
+ this.headerSize = 0
+ }
+ if (this.headerSize === 0) {
+ this.header = new Buffer(0)
+ }
+ }
+
+ Pickle.prototype.createIterator = function () {
+ return new PickleIterator(this)
+ }
+
+ Pickle.prototype.toBuffer = function () {
+ return this.header.slice(0, this.headerSize + this.getPayloadSize())
+ }
+
+ Pickle.prototype.writeBool = function (value) {
+ return this.writeInt(value ? 1 : 0)
+ }
+
+ Pickle.prototype.writeInt = function (value) {
+ return this.writeBytes(value, SIZE_INT32, Buffer.prototype.writeInt32LE)
+ }
+
+ Pickle.prototype.writeUInt32 = function (value) {
+ return this.writeBytes(value, SIZE_UINT32, Buffer.prototype.writeUInt32LE)
+ }
+
+ Pickle.prototype.writeInt64 = function (value) {
+ return this.writeBytes(value, SIZE_INT64, Buffer.prototype.writeInt64LE)
+ }
+
+ Pickle.prototype.writeUInt64 = function (value) {
+ return this.writeBytes(value, SIZE_UINT64, Buffer.prototype.writeUInt64LE)
+ }
+
+ Pickle.prototype.writeFloat = function (value) {
+ return this.writeBytes(value, SIZE_FLOAT, Buffer.prototype.writeFloatLE)
+ }
+
+ Pickle.prototype.writeDouble = function (value) {
+ return this.writeBytes(value, SIZE_DOUBLE, Buffer.prototype.writeDoubleLE)
+ }
+
+ Pickle.prototype.writeString = function (value) {
+ var length = Buffer.byteLength(value, 'utf8')
+ if (!this.writeInt(length)) {
+ return false
+ }
+ return this.writeBytes(value, length)
+ }
+
+ Pickle.prototype.setPayloadSize = function (payloadSize) {
+ return this.header.writeUInt32LE(payloadSize, 0)
+ }
+
+ Pickle.prototype.getPayloadSize = function () {
+ return this.header.readUInt32LE(0)
+ }
+
+ Pickle.prototype.writeBytes = function (data, length, method) {
+ var dataLength = alignInt(length, SIZE_UINT32)
+ var newSize = this.writeOffset + dataLength
+ if (newSize > this.capacityAfterHeader) {
+ this.resize(Math.max(this.capacityAfterHeader * 2, newSize))
+ }
+ if (method != null) {
+ method.call(this.header, data, this.headerSize + this.writeOffset)
+ } else {
+ this.header.write(data, this.headerSize + this.writeOffset, length)
+ }
+ var endOffset = this.headerSize + this.writeOffset + length
+ this.header.fill(0, endOffset, endOffset + dataLength - length)
+ this.setPayloadSize(newSize)
+ this.writeOffset = newSize
+ return true
+ }
+
+ Pickle.prototype.resize = function (newCapacity) {
+ newCapacity = alignInt(newCapacity, PAYLOAD_UNIT)
+ this.header = Buffer.concat([this.header, new Buffer(newCapacity)])
+ this.capacityAfterHeader = newCapacity
+ }
+
+ return Pickle
+})()
+
+module.exports = Pickle
diff --git a/node_modules/chromium-pickle-js/package.json b/node_modules/chromium-pickle-js/package.json
new file mode 100644
index 0000000..b6f00c3
--- /dev/null
+++ b/node_modules/chromium-pickle-js/package.json
@@ -0,0 +1,21 @@
+{
+ "main": "./lib/exports.js",
+ "name": "chromium-pickle-js",
+ "description": "Binary value packing and unpacking",
+ "version": "0.2.0",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/electron/node-chromium-pickle-js.git"
+ },
+ "bugs": {
+ "url": "https://github.com/electron/node-chromium-pickle-js/issues"
+ },
+ "scripts": {
+ "test": "mocha test && standard"
+ },
+ "devDependencies": {
+ "mocha": "^3.0.2",
+ "standard": "^8.0.0"
+ }
+}
diff --git a/node_modules/clone-response/LICENSE b/node_modules/clone-response/LICENSE
new file mode 100644
index 0000000..f27ee9b
--- /dev/null
+++ b/node_modules/clone-response/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Luke Childs
+
+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/clone-response/README.md b/node_modules/clone-response/README.md
new file mode 100644
index 0000000..d037cfe
--- /dev/null
+++ b/node_modules/clone-response/README.md
@@ -0,0 +1,62 @@
+# clone-response
+
+> Clone a Node.js HTTP response stream
+
+[![Build Status](https://travis-ci.org/lukechilds/clone-response.svg?branch=master)](https://travis-ci.org/lukechilds/clone-response)
+[![Coverage Status](https://coveralls.io/repos/github/lukechilds/clone-response/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/clone-response?branch=master)
+[![npm](https://img.shields.io/npm/dm/clone-response.svg)](https://www.npmjs.com/package/clone-response)
+[![npm](https://img.shields.io/npm/v/clone-response.svg)](https://www.npmjs.com/package/clone-response)
+
+Returns a new stream and copies over all properties and methods from the original response giving you a complete duplicate.
+
+This is useful in situations where you need to consume the response stream but also want to pass an unconsumed stream somewhere else to be consumed later.
+
+## Install
+
+```shell
+npm install --save clone-response
+```
+
+## Usage
+
+```js
+const http = require('http');
+const cloneResponse = require('clone-response');
+
+http.get('http://example.com', response => {
+ const clonedResponse = cloneResponse(response);
+ response.pipe(process.stdout);
+
+ setImmediate(() => {
+ // The response stream has already been consumed by the time this executes,
+ // however the cloned response stream is still available.
+ doSomethingWithResponse(clonedResponse);
+ });
+});
+```
+
+Please bear in mind that the process of cloning a stream consumes it. However, you can consume a stream multiple times in the same tick, therefore allowing you to create multiple clones. e.g:
+
+```js
+const clone1 = cloneResponse(response);
+const clone2 = cloneResponse(response);
+// response can still be consumed in this tick but cannot be consumed if passed
+// into any async callbacks. clone1 and clone2 can be passed around and be
+// consumed in the future.
+```
+
+## API
+
+### cloneResponse(response)
+
+Returns a clone of the passed in response.
+
+#### response
+
+Type: `stream`
+
+A [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) to clone.
+
+## License
+
+MIT © Luke Childs
diff --git a/node_modules/clone-response/package.json b/node_modules/clone-response/package.json
new file mode 100644
index 0000000..a4a0810
--- /dev/null
+++ b/node_modules/clone-response/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "clone-response",
+ "version": "1.0.3",
+ "description": "Clone a Node.js HTTP response stream",
+ "main": "src/index.js",
+ "scripts": {
+ "test": "xo && nyc ava",
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "xo": {
+ "extends": "xo-lukechilds"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/clone-response.git"
+ },
+ "keywords": [
+ "clone",
+ "duplicate",
+ "copy",
+ "response",
+ "HTTP",
+ "stream"
+ ],
+ "author": "Luke Childs <lukechilds123@gmail.com> (http://lukechilds.co.uk)",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-response": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "^0.22.0",
+ "coveralls": "^2.13.1",
+ "create-test-server": "^2.0.1",
+ "eslint-config-xo-lukechilds": "^1.0.0",
+ "get-stream": "^3.0.0",
+ "nyc": "^11.0.2",
+ "pify": "^3.0.0",
+ "xo": "^0.19.0"
+ }
+}
diff --git a/node_modules/clone-response/src/index.js b/node_modules/clone-response/src/index.js
new file mode 100644
index 0000000..0285dff
--- /dev/null
+++ b/node_modules/clone-response/src/index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+const PassThrough = require('stream').PassThrough;
+const mimicResponse = require('mimic-response');
+
+const cloneResponse = response => {
+ if (!(response && response.pipe)) {
+ throw new TypeError('Parameter `response` must be a response stream.');
+ }
+
+ const clone = new PassThrough();
+ mimicResponse(response, clone);
+
+ return response.pipe(clone);
+};
+
+module.exports = cloneResponse;
diff --git a/node_modules/code-point-at/index.js b/node_modules/code-point-at/index.js
new file mode 100644
index 0000000..0432fe6
--- /dev/null
+++ b/node_modules/code-point-at/index.js
@@ -0,0 +1,32 @@
+/* eslint-disable babel/new-cap, xo/throw-new-error */
+'use strict';
+module.exports = function (str, pos) {
+ if (str === null || str === undefined) {
+ throw TypeError();
+ }
+
+ str = String(str);
+
+ var size = str.length;
+ var i = pos ? Number(pos) : 0;
+
+ if (Number.isNaN(i)) {
+ i = 0;
+ }
+
+ if (i < 0 || i >= size) {
+ return undefined;
+ }
+
+ var first = str.charCodeAt(i);
+
+ if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) {
+ var second = str.charCodeAt(i + 1);
+
+ if (second >= 0xDC00 && second <= 0xDFFF) {
+ return ((first - 0xD800) * 0x400) + second - 0xDC00 + 0x10000;
+ }
+ }
+
+ return first;
+};
diff --git a/node_modules/code-point-at/license b/node_modules/code-point-at/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/code-point-at/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/code-point-at/package.json b/node_modules/code-point-at/package.json
new file mode 100644
index 0000000..c5907a5
--- /dev/null
+++ b/node_modules/code-point-at/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "code-point-at",
+ "version": "1.1.0",
+ "description": "ES2015 `String#codePointAt()` ponyfill",
+ "license": "MIT",
+ "repository": "sindresorhus/code-point-at",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "es2015",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "string",
+ "str",
+ "code",
+ "point",
+ "at",
+ "codepoint",
+ "unicode"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "^0.16.0"
+ }
+}
diff --git a/node_modules/code-point-at/readme.md b/node_modules/code-point-at/readme.md
new file mode 100644
index 0000000..4c97730
--- /dev/null
+++ b/node_modules/code-point-at/readme.md
@@ -0,0 +1,32 @@
+# code-point-at [![Build Status](https://travis-ci.org/sindresorhus/code-point-at.svg?branch=master)](https://travis-ci.org/sindresorhus/code-point-at)
+
+> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) [ponyfill](https://ponyfill.com)
+
+
+## Install
+
+```
+$ npm install --save code-point-at
+```
+
+
+## Usage
+
+```js
+var codePointAt = require('code-point-at');
+
+codePointAt('🐴');
+//=> 128052
+
+codePointAt('abc', 2);
+//=> 99
+```
+
+## API
+
+### codePointAt(input, [position])
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/colors/.travis.yml b/node_modules/colors/.travis.yml
new file mode 100644
index 0000000..ec43125
--- /dev/null
+++ b/node_modules/colors/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.11"
+ - "0.10"
+ - "0.8"
+ - "0.6" \ No newline at end of file
diff --git a/node_modules/colors/MIT-LICENSE.txt b/node_modules/colors/MIT-LICENSE.txt
new file mode 100644
index 0000000..3de4e33
--- /dev/null
+++ b/node_modules/colors/MIT-LICENSE.txt
@@ -0,0 +1,23 @@
+Original Library
+ - Copyright (c) Marak Squires
+
+Additional Functionality
+ - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/colors/ReadMe.md b/node_modules/colors/ReadMe.md
new file mode 100644
index 0000000..beb5b14
--- /dev/null
+++ b/node_modules/colors/ReadMe.md
@@ -0,0 +1,167 @@
+# colors.js
+
+## get color and style in your node.js console
+
+<img src="https://github.com/Marak/colors.js/raw/master/screenshots/colors.png"/>
+
+## Installation
+
+ npm install colors
+
+## colors and styles!
+
+### text colors
+
+ - black
+ - red
+ - green
+ - yellow
+ - blue
+ - magenta
+ - cyan
+ - white
+ - gray
+ - grey
+
+### background colors
+
+
+
+ - bgBlack
+ - bgRed
+ - bgGreen
+ - bgYellow
+ - bgBlue
+ - bgMagenta
+ - bgCyan
+ - bgWhite
+
+### styles
+
+ - reset
+ - bold
+ - dim
+ - italic
+ - underline
+ - inverse
+ - hidden
+ - strikethrough
+
+### extras
+
+ - rainbow
+ - zebra
+ - america
+ - trap
+ - random
+
+
+## Usage
+
+By popular demand, `colors` now ships with two types of usages!
+
+The super nifty way
+
+```js
+var colors = require('colors');
+
+console.log('hello'.green); // outputs green text
+console.log('i like cake and pies'.underline.red) // outputs red underlined text
+console.log('inverse the color'.inverse); // inverses the color
+console.log('OMG Rainbows!'.rainbow); // rainbow
+console.log('Run the trap'.trap); // Drops the bass
+
+```
+
+or a slightly less nifty way which doesn't extend `String.prototype`
+
+```js
+var colors = require('colors/safe');
+
+console.log(colors.green('hello')); // outputs green text
+console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text
+console.log(colors.inverse('inverse the color')); // inverses the color
+console.log(colors.rainbow('OMG Rainbows!')); // rainbow
+console.log(colors.trap('Run the trap')); // Drops the bass
+
+```
+
+I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way.
+
+If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object.
+
+## Disabling Colors
+
+To disable colors you can pass the following arguments in the command line to your application:
+
+```bash
+node myapp.js --no-color
+```
+
+## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data)
+
+```js
+var name = 'Marak';
+console.log(colors.green('Hello %s'), name);
+// outputs -> 'Hello Marak'
+```
+
+## Custom themes
+
+### Using standard API
+
+```js
+
+var colors = require('colors');
+
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+```
+
+### Using string safe API
+
+```js
+var colors = require('colors/safe');
+
+// set single property
+var error = colors.red;
+error('this is red');
+
+// set theme
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+```
+
+*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.* \ No newline at end of file
diff --git a/node_modules/colors/examples/normal-usage.js b/node_modules/colors/examples/normal-usage.js
new file mode 100644
index 0000000..2818741
--- /dev/null
+++ b/node_modules/colors/examples/normal-usage.js
@@ -0,0 +1,74 @@
+var colors = require('../lib/index');
+
+console.log("First some yellow text".yellow);
+
+console.log("Underline that text".yellow.underline);
+
+console.log("Make it bold and red".red.bold);
+
+console.log(("Double Raindows All Day Long").rainbow)
+
+console.log("Drop the bass".trap)
+
+console.log("DROP THE RAINBOW BASS".trap.rainbow)
+
+
+console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
+
+console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported
+console.log("Zebras are so fun!".zebra);
+
+//
+// Remark: .strikethrough may not work with Mac OS Terminal App
+//
+console.log("This is " + "not".strikethrough + " fun.");
+
+console.log('Background color attack!'.black.bgWhite)
+console.log('Use random styles on everything!'.random)
+console.log('America, Heck Yeah!'.america)
+
+
+console.log('Setting themes is useful')
+
+//
+// Custom themes
+//
+console.log('Generic logging theme as JSON'.green.bold.underline);
+// Load theme with JSON literal
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+
+// outputs grey text
+console.log("this is an input".input);
+
+console.log('Generic logging theme as file'.green.bold.underline);
+
+// Load a theme from file
+colors.setTheme(__dirname + '/../themes/generic-logging.js');
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+
+// outputs grey text
+console.log("this is an input".input);
+
+//console.log("Don't summon".zalgo) \ No newline at end of file
diff --git a/node_modules/colors/examples/safe-string.js b/node_modules/colors/examples/safe-string.js
new file mode 100644
index 0000000..111b363
--- /dev/null
+++ b/node_modules/colors/examples/safe-string.js
@@ -0,0 +1,76 @@
+var colors = require('../safe');
+
+console.log(colors.yellow("First some yellow text"));
+
+console.log(colors.yellow.underline("Underline that text"));
+
+console.log(colors.red.bold("Make it bold and red"));
+
+console.log(colors.rainbow("Double Raindows All Day Long"))
+
+console.log(colors.trap("Drop the bass"))
+
+console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS")));
+
+console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported
+
+
+console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported
+
+console.log(colors.zebra("Zebras are so fun!"));
+
+console.log("This is " + colors.strikethrough("not") + " fun.");
+
+
+console.log(colors.black.bgWhite('Background color attack!'));
+console.log(colors.random('Use random styles on everything!'))
+console.log(colors.america('America, Heck Yeah!'));
+
+console.log('Setting themes is useful')
+
+//
+// Custom themes
+//
+//console.log('Generic logging theme as JSON'.green.bold.underline);
+// Load theme with JSON literal
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+
+// outputs grey text
+console.log(colors.input("this is an input"));
+
+
+// console.log('Generic logging theme as file'.green.bold.underline);
+
+// Load a theme from file
+colors.setTheme(__dirname + '/../themes/generic-logging.js');
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+
+// outputs grey text
+console.log(colors.input("this is an input"));
+
+// console.log(colors.zalgo("Don't summon him"))
+
+
+
diff --git a/node_modules/colors/lib/colors.js b/node_modules/colors/lib/colors.js
new file mode 100644
index 0000000..59898de
--- /dev/null
+++ b/node_modules/colors/lib/colors.js
@@ -0,0 +1,176 @@
+/*
+
+The MIT License (MIT)
+
+Original Library
+ - Copyright (c) Marak Squires
+
+Additional functionality
+ - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+
+var colors = {};
+module['exports'] = colors;
+
+colors.themes = {};
+
+var ansiStyles = colors.styles = require('./styles');
+var defineProps = Object.defineProperties;
+
+colors.supportsColor = require('./system/supports-colors');
+
+if (typeof colors.enabled === "undefined") {
+ colors.enabled = colors.supportsColor;
+}
+
+colors.stripColors = colors.strip = function(str){
+ return ("" + str).replace(/\x1B\[\d+m/g, '');
+};
+
+
+var stylize = colors.stylize = function stylize (str, style) {
+ return ansiStyles[style].open + str + ansiStyles[style].close;
+}
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+var escapeStringRegexp = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+ return str.replace(matchOperatorsRe, '\\$&');
+}
+
+function build(_styles) {
+ var builder = function builder() {
+ return applyStyle.apply(builder, arguments);
+ };
+ builder._styles = _styles;
+ // __proto__ is used because we must return a function, but there is
+ // no way to create a function with a different prototype.
+ builder.__proto__ = proto;
+ return builder;
+}
+
+var styles = (function () {
+ var ret = {};
+ ansiStyles.grey = ansiStyles.gray;
+ Object.keys(ansiStyles).forEach(function (key) {
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+ ret[key] = {
+ get: function () {
+ return build(this._styles.concat(key));
+ }
+ };
+ });
+ return ret;
+})();
+
+var proto = defineProps(function colors() {}, styles);
+
+function applyStyle() {
+ var args = arguments;
+ var argsLen = args.length;
+ var str = argsLen !== 0 && String(arguments[0]);
+ if (argsLen > 1) {
+ for (var a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+
+ if (!colors.enabled || !str) {
+ return str;
+ }
+
+ var nestedStyles = this._styles;
+
+ var i = nestedStyles.length;
+ while (i--) {
+ var code = ansiStyles[nestedStyles[i]];
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
+ }
+
+ return str;
+}
+
+function applyTheme (theme) {
+ for (var style in theme) {
+ (function(style){
+ colors[style] = function(str){
+ return colors[theme[style]](str);
+ };
+ })(style)
+ }
+}
+
+colors.setTheme = function (theme) {
+ if (typeof theme === 'string') {
+ try {
+ colors.themes[theme] = require(theme);
+ applyTheme(colors.themes[theme]);
+ return colors.themes[theme];
+ } catch (err) {
+ console.log(err);
+ return err;
+ }
+ } else {
+ applyTheme(theme);
+ }
+};
+
+function init() {
+ var ret = {};
+ Object.keys(styles).forEach(function (name) {
+ ret[name] = {
+ get: function () {
+ return build([name]);
+ }
+ };
+ });
+ return ret;
+}
+
+var sequencer = function sequencer (map, str) {
+ var exploded = str.split(""), i = 0;
+ exploded = exploded.map(map);
+ return exploded.join("");
+};
+
+// custom formatter methods
+colors.trap = require('./custom/trap');
+colors.zalgo = require('./custom/zalgo');
+
+// maps
+colors.maps = {};
+colors.maps.america = require('./maps/america');
+colors.maps.zebra = require('./maps/zebra');
+colors.maps.rainbow = require('./maps/rainbow');
+colors.maps.random = require('./maps/random')
+
+for (var map in colors.maps) {
+ (function(map){
+ colors[map] = function (str) {
+ return sequencer(colors.maps[map], str);
+ }
+ })(map)
+}
+
+defineProps(colors, init()); \ No newline at end of file
diff --git a/node_modules/colors/lib/custom/trap.js b/node_modules/colors/lib/custom/trap.js
new file mode 100644
index 0000000..3f09143
--- /dev/null
+++ b/node_modules/colors/lib/custom/trap.js
@@ -0,0 +1,45 @@
+module['exports'] = function runTheTrap (text, options) {
+ var result = "";
+ text = text || "Run the trap, drop the bass";
+ text = text.split('');
+ var trap = {
+ a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"],
+ b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"],
+ c: ["\u00a9", "\u023b", "\u03fe"],
+ d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"],
+ e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"],
+ f: ["\u04fa"],
+ g: ["\u0262"],
+ h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"],
+ i: ["\u0f0f"],
+ j: ["\u0134"],
+ k: ["\u0138", "\u04a0", "\u04c3", "\u051e"],
+ l: ["\u0139"],
+ m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"],
+ n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"],
+ o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"],
+ p: ["\u01f7", "\u048e"],
+ q: ["\u09cd"],
+ r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"],
+ s: ["\u00a7", "\u03de", "\u03df", "\u03e8"],
+ t: ["\u0141", "\u0166", "\u0373"],
+ u: ["\u01b1", "\u054d"],
+ v: ["\u05d8"],
+ w: ["\u0428", "\u0460", "\u047c", "\u0d70"],
+ x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"],
+ y: ["\u00a5", "\u04b0", "\u04cb"],
+ z: ["\u01b5", "\u0240"]
+ }
+ text.forEach(function(c){
+ c = c.toLowerCase();
+ var chars = trap[c] || [" "];
+ var rand = Math.floor(Math.random() * chars.length);
+ if (typeof trap[c] !== "undefined") {
+ result += trap[c][rand];
+ } else {
+ result += c;
+ }
+ });
+ return result;
+
+}
diff --git a/node_modules/colors/lib/custom/zalgo.js b/node_modules/colors/lib/custom/zalgo.js
new file mode 100644
index 0000000..4dc20c8
--- /dev/null
+++ b/node_modules/colors/lib/custom/zalgo.js
@@ -0,0 +1,104 @@
+// please no
+module['exports'] = function zalgo(text, options) {
+ text = text || " he is here ";
+ var soul = {
+ "up" : [
+ '̍', '̎', '̄', '̅',
+ '̿', '̑', '̆', '̐',
+ '͒', '͗', '͑', '̇',
+ '̈', '̊', '͂', '̓',
+ '̈', '͊', '͋', '͌',
+ '̃', '̂', '̌', '͐',
+ '̀', '́', '̋', '̏',
+ '̒', '̓', '̔', '̽',
+ '̉', 'ͣ', 'ͤ', 'ͥ',
+ 'ͦ', 'ͧ', 'ͨ', 'ͩ',
+ 'ͪ', 'ͫ', 'ͬ', 'ͭ',
+ 'ͮ', 'ͯ', '̾', '͛',
+ '͆', '̚'
+ ],
+ "down" : [
+ '̖', '̗', '̘', '̙',
+ '̜', '̝', '̞', '̟',
+ '̠', '̤', '̥', '̦',
+ '̩', '̪', '̫', '̬',
+ '̭', '̮', '̯', '̰',
+ '̱', '̲', '̳', '̹',
+ '̺', '̻', '̼', 'ͅ',
+ '͇', '͈', '͉', '͍',
+ '͎', '͓', '͔', '͕',
+ '͖', '͙', '͚', '̣'
+ ],
+ "mid" : [
+ '̕', '̛', '̀', '́',
+ '͘', '̡', '̢', '̧',
+ '̨', '̴', '̵', '̶',
+ '͜', '͝', '͞',
+ '͟', '͠', '͢', '̸',
+ '̷', '͡', ' ҉'
+ ]
+ },
+ all = [].concat(soul.up, soul.down, soul.mid),
+ zalgo = {};
+
+ function randomNumber(range) {
+ var r = Math.floor(Math.random() * range);
+ return r;
+ }
+
+ function is_char(character) {
+ var bool = false;
+ all.filter(function (i) {
+ bool = (i === character);
+ });
+ return bool;
+ }
+
+
+ function heComes(text, options) {
+ var result = '', counts, l;
+ options = options || {};
+ options["up"] = options["up"] || true;
+ options["mid"] = options["mid"] || true;
+ options["down"] = options["down"] || true;
+ options["size"] = options["size"] || "maxi";
+ text = text.split('');
+ for (l in text) {
+ if (is_char(l)) {
+ continue;
+ }
+ result = result + text[l];
+ counts = {"up" : 0, "down" : 0, "mid" : 0};
+ switch (options.size) {
+ case 'mini':
+ counts.up = randomNumber(8);
+ counts.min = randomNumber(2);
+ counts.down = randomNumber(8);
+ break;
+ case 'maxi':
+ counts.up = randomNumber(16) + 3;
+ counts.min = randomNumber(4) + 1;
+ counts.down = randomNumber(64) + 3;
+ break;
+ default:
+ counts.up = randomNumber(8) + 1;
+ counts.mid = randomNumber(6) / 2;
+ counts.down = randomNumber(8) + 1;
+ break;
+ }
+
+ var arr = ["up", "mid", "down"];
+ for (var d in arr) {
+ var index = arr[d];
+ for (var i = 0 ; i <= counts[index]; i++) {
+ if (options[index]) {
+ result = result + soul[index][randomNumber(soul[index].length)];
+ }
+ }
+ }
+ }
+ return result;
+ }
+ // don't summon him
+ return heComes(text);
+}
diff --git a/node_modules/colors/lib/extendStringPrototype.js b/node_modules/colors/lib/extendStringPrototype.js
new file mode 100644
index 0000000..b6b5b03
--- /dev/null
+++ b/node_modules/colors/lib/extendStringPrototype.js
@@ -0,0 +1,118 @@
+var colors = require('./colors'),
+ styles = require('./styles');
+
+module['exports'] = function () {
+
+ //
+ // Extends prototype of native string object to allow for "foo".red syntax
+ //
+ var addProperty = function (color, func) {
+ String.prototype.__defineGetter__(color, func);
+ };
+
+ var sequencer = function sequencer (map, str) {
+ return function () {
+ var exploded = this.split(""), i = 0;
+ exploded = exploded.map(map);
+ return exploded.join("");
+ }
+ };
+
+ var stylize = function stylize (str, style) {
+ return styles[style].open + str + styles[style].close;
+ }
+
+ addProperty('strip', function () {
+ return colors.strip(this);
+ });
+
+ addProperty('stripColors', function () {
+ return colors.strip(this);
+ });
+
+ addProperty("trap", function(){
+ return colors.trap(this);
+ });
+
+ addProperty("zalgo", function(){
+ return colors.zalgo(this);
+ });
+
+ addProperty("zebra", function(){
+ return colors.zebra(this);
+ });
+
+ addProperty("rainbow", function(){
+ return colors.rainbow(this);
+ });
+
+ addProperty("random", function(){
+ return colors.random(this);
+ });
+
+ addProperty("america", function(){
+ return colors.america(this);
+ });
+
+ //
+ // Iterate through all default styles and colors
+ //
+ var x = Object.keys(colors.styles);
+ x.forEach(function (style) {
+ addProperty(style, function () {
+ return stylize(this, style);
+ });
+ });
+
+ function applyTheme(theme) {
+ //
+ // Remark: This is a list of methods that exist
+ // on String that you should not overwrite.
+ //
+ var stringPrototypeBlacklist = [
+ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
+ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
+ 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
+ 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
+ ];
+
+ Object.keys(theme).forEach(function (prop) {
+ if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
+ console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
+ }
+ else {
+ if (typeof(theme[prop]) === 'string') {
+ colors[prop] = colors[theme[prop]];
+ addProperty(prop, function () {
+ return colors[theme[prop]](this);
+ });
+ }
+ else {
+ addProperty(prop, function () {
+ var ret = this;
+ for (var t = 0; t < theme[prop].length; t++) {
+ ret = exports[theme[prop][t]](ret);
+ }
+ return ret;
+ });
+ }
+ }
+ });
+ }
+
+ colors.setTheme = function (theme) {
+ if (typeof theme === 'string') {
+ try {
+ colors.themes[theme] = require(theme);
+ applyTheme(colors.themes[theme]);
+ return colors.themes[theme];
+ } catch (err) {
+ console.log(err);
+ return err;
+ }
+ } else {
+ applyTheme(theme);
+ }
+ };
+
+}; \ No newline at end of file
diff --git a/node_modules/colors/lib/index.js b/node_modules/colors/lib/index.js
new file mode 100644
index 0000000..96d2b84
--- /dev/null
+++ b/node_modules/colors/lib/index.js
@@ -0,0 +1,12 @@
+var colors = require('./colors');
+module['exports'] = colors;
+
+// Remark: By default, colors will add style properties to String.prototype
+//
+// If you don't wish to extend String.prototype you can do this instead and native String will not be touched
+//
+// var colors = require('colors/safe);
+// colors.red("foo")
+//
+//
+var extendStringPrototype = require('./extendStringPrototype')(); \ No newline at end of file
diff --git a/node_modules/colors/lib/maps/america.js b/node_modules/colors/lib/maps/america.js
new file mode 100644
index 0000000..a07d832
--- /dev/null
+++ b/node_modules/colors/lib/maps/america.js
@@ -0,0 +1,12 @@
+var colors = require('../colors');
+
+module['exports'] = (function() {
+ return function (letter, i, exploded) {
+ if(letter === " ") return letter;
+ switch(i%3) {
+ case 0: return colors.red(letter);
+ case 1: return colors.white(letter)
+ case 2: return colors.blue(letter)
+ }
+ }
+})(); \ No newline at end of file
diff --git a/node_modules/colors/lib/maps/rainbow.js b/node_modules/colors/lib/maps/rainbow.js
new file mode 100644
index 0000000..a7ce24e
--- /dev/null
+++ b/node_modules/colors/lib/maps/rainbow.js
@@ -0,0 +1,13 @@
+var colors = require('../colors');
+
+module['exports'] = (function () {
+ var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
+ return function (letter, i, exploded) {
+ if (letter === " ") {
+ return letter;
+ } else {
+ return colors[rainbowColors[i++ % rainbowColors.length]](letter);
+ }
+ };
+})();
+
diff --git a/node_modules/colors/lib/maps/random.js b/node_modules/colors/lib/maps/random.js
new file mode 100644
index 0000000..5cd101f
--- /dev/null
+++ b/node_modules/colors/lib/maps/random.js
@@ -0,0 +1,8 @@
+var colors = require('../colors');
+
+module['exports'] = (function () {
+ var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
+ return function(letter, i, exploded) {
+ return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter);
+ };
+})(); \ No newline at end of file
diff --git a/node_modules/colors/lib/maps/zebra.js b/node_modules/colors/lib/maps/zebra.js
new file mode 100644
index 0000000..bf7dcde
--- /dev/null
+++ b/node_modules/colors/lib/maps/zebra.js
@@ -0,0 +1,5 @@
+var colors = require('../colors');
+
+module['exports'] = function (letter, i, exploded) {
+ return i % 2 === 0 ? letter : colors.inverse(letter);
+}; \ No newline at end of file
diff --git a/node_modules/colors/lib/styles.js b/node_modules/colors/lib/styles.js
new file mode 100644
index 0000000..067d590
--- /dev/null
+++ b/node_modules/colors/lib/styles.js
@@ -0,0 +1,77 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+
+var styles = {};
+module['exports'] = styles;
+
+var codes = {
+ reset: [0, 0],
+
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29],
+
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39],
+ grey: [90, 39],
+
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // legacy styles for colors pre v1.0.0
+ blackBG: [40, 49],
+ redBG: [41, 49],
+ greenBG: [42, 49],
+ yellowBG: [43, 49],
+ blueBG: [44, 49],
+ magentaBG: [45, 49],
+ cyanBG: [46, 49],
+ whiteBG: [47, 49]
+
+};
+
+Object.keys(codes).forEach(function (key) {
+ var val = codes[key];
+ var style = styles[key] = [];
+ style.open = '\u001b[' + val[0] + 'm';
+ style.close = '\u001b[' + val[1] + 'm';
+}); \ No newline at end of file
diff --git a/node_modules/colors/lib/system/supports-colors.js b/node_modules/colors/lib/system/supports-colors.js
new file mode 100644
index 0000000..3e008aa
--- /dev/null
+++ b/node_modules/colors/lib/system/supports-colors.js
@@ -0,0 +1,61 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+
+var argv = process.argv;
+
+module.exports = (function () {
+ if (argv.indexOf('--no-color') !== -1 ||
+ argv.indexOf('--color=false') !== -1) {
+ return false;
+ }
+
+ if (argv.indexOf('--color') !== -1 ||
+ argv.indexOf('--color=true') !== -1 ||
+ argv.indexOf('--color=always') !== -1) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return false;
+ }
+
+ if (process.platform === 'win32') {
+ return true;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return true;
+ }
+
+ if (process.env.TERM === 'dumb') {
+ return false;
+ }
+
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ return false;
+})(); \ No newline at end of file
diff --git a/node_modules/colors/package.json b/node_modules/colors/package.json
new file mode 100644
index 0000000..dc6ce6b
--- /dev/null
+++ b/node_modules/colors/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "colors",
+ "description": "get colors in your node.js console",
+ "version": "1.0.3",
+ "author": "Marak Squires",
+ "homepage": "https://github.com/Marak/colors.js",
+ "bugs": "https://github.com/Marak/colors.js/issues",
+ "keywords": [ "ansi", "terminal", "colors" ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/Marak/colors.js.git"
+ },
+ "license": "MIT",
+ "scripts": {
+ "test": "node tests/basic-test.js && node tests/safe-test.js"
+ },
+ "engines": {
+ "node": ">=0.1.90"
+ },
+ "main": "./lib/index"
+}
diff --git a/node_modules/colors/safe.js b/node_modules/colors/safe.js
new file mode 100644
index 0000000..a6a1f3a
--- /dev/null
+++ b/node_modules/colors/safe.js
@@ -0,0 +1,9 @@
+//
+// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype
+//
+// var colors = require('colors/safe);
+// colors.red("foo")
+//
+//
+var colors = require('./lib/colors');
+module['exports'] = colors; \ No newline at end of file
diff --git a/node_modules/colors/screenshots/colors.png b/node_modules/colors/screenshots/colors.png
new file mode 100644
index 0000000..7200a62
--- /dev/null
+++ b/node_modules/colors/screenshots/colors.png
Binary files differ
diff --git a/node_modules/colors/tests/basic-test.js b/node_modules/colors/tests/basic-test.js
new file mode 100644
index 0000000..fda8af4
--- /dev/null
+++ b/node_modules/colors/tests/basic-test.js
@@ -0,0 +1,50 @@
+var assert = require('assert'),
+ colors = require('../lib/index');
+
+var s = 'string';
+
+function a(s, code) {
+ return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m';
+}
+
+function aE(s, color, code) {
+ assert.equal(s[color], a(s, code));
+ assert.equal(colors[color](s), a(s, code));
+ assert.equal(s[color], colors[color](s));
+ assert.equal(s[color].strip, s);
+ assert.equal(s[color].strip, colors.strip(s));
+}
+
+function h(s, color) {
+ return '<span style="color:' + color + ';">' + s + '</span>';
+}
+
+var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow'];
+var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']);
+
+colors.mode = 'console';
+assert.equal(s.bold, '\x1B[1m' + s + '\x1B[22m');
+assert.equal(s.italic, '\x1B[3m' + s + '\x1B[23m');
+assert.equal(s.underline, '\x1B[4m' + s + '\x1B[24m');
+assert.equal(s.strikethrough, '\x1B[9m' + s + '\x1B[29m');
+assert.equal(s.inverse, '\x1B[7m' + s + '\x1B[27m');
+
+assert.ok(s.rainbow);
+
+aE(s, 'white', 37);
+aE(s, 'grey', 90);
+aE(s, 'black', 30);
+aE(s, 'blue', 34);
+aE(s, 'cyan', 36);
+aE(s, 'green', 32);
+aE(s, 'magenta', 35);
+aE(s, 'red', 31);
+aE(s, 'yellow', 33);
+
+assert.equal(s, 'string');
+
+colors.setTheme({error:'red'});
+
+assert.equal(typeof("astring".red),'string');
+assert.equal(typeof("astring".error),'string');
+
diff --git a/node_modules/colors/tests/safe-test.js b/node_modules/colors/tests/safe-test.js
new file mode 100644
index 0000000..daad4f9
--- /dev/null
+++ b/node_modules/colors/tests/safe-test.js
@@ -0,0 +1,45 @@
+var assert = require('assert'),
+ colors = require('../safe');
+
+var s = 'string';
+
+function a(s, code) {
+ return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m';
+}
+
+function aE(s, color, code) {
+ assert.equal(colors[color](s), a(s, code));
+ assert.equal(colors.strip(s), s);
+}
+
+function h(s, color) {
+ return '<span style="color:' + color + ';">' + s + '</span>';
+}
+
+var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow'];
+var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']);
+
+colors.mode = 'console';
+assert.equal(colors.bold(s), '\x1B[1m' + s + '\x1B[22m');
+assert.equal(colors.italic(s), '\x1B[3m' + s + '\x1B[23m');
+assert.equal(colors.underline(s), '\x1B[4m' + s + '\x1B[24m');
+assert.equal(colors.strikethrough(s), '\x1B[9m' + s + '\x1B[29m');
+assert.equal(colors.inverse(s), '\x1B[7m' + s + '\x1B[27m');
+
+assert.ok(colors.rainbow);
+
+aE(s, 'white', 37);
+aE(s, 'grey', 90);
+aE(s, 'black', 30);
+aE(s, 'blue', 34);
+aE(s, 'cyan', 36);
+aE(s, 'green', 32);
+aE(s, 'magenta', 35);
+aE(s, 'red', 31);
+aE(s, 'yellow', 33);
+
+assert.equal(s, 'string');
+colors.setTheme({error:'red'});
+
+assert.equal(typeof(colors.red("astring")), 'string');
+assert.equal(typeof(colors.error("astring")), 'string'); \ No newline at end of file
diff --git a/node_modules/colors/themes/generic-logging.js b/node_modules/colors/themes/generic-logging.js
new file mode 100644
index 0000000..571972c
--- /dev/null
+++ b/node_modules/colors/themes/generic-logging.js
@@ -0,0 +1,12 @@
+module['exports'] = {
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+}; \ No newline at end of file
diff --git a/node_modules/combined-stream/License b/node_modules/combined-stream/License
new file mode 100644
index 0000000..4804b7a
--- /dev/null
+++ b/node_modules/combined-stream/License
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Debuggable Limited <felix@debuggable.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/combined-stream/Readme.md b/node_modules/combined-stream/Readme.md
new file mode 100644
index 0000000..9e367b5
--- /dev/null
+++ b/node_modules/combined-stream/Readme.md
@@ -0,0 +1,138 @@
+# combined-stream
+
+A stream that emits multiple other streams one after another.
+
+**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`.
+
+- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module.
+
+- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another.
+
+## Installation
+
+``` bash
+npm install combined-stream
+```
+
+## Usage
+
+Here is a simple example that shows how you can use combined-stream to combine
+two files into one:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create();
+combinedStream.append(fs.createReadStream('file1.txt'));
+combinedStream.append(fs.createReadStream('file2.txt'));
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+While the example above works great, it will pause all source streams until
+they are needed. If you don't want that to happen, you can set `pauseStreams`
+to `false`:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create({pauseStreams: false});
+combinedStream.append(fs.createReadStream('file1.txt'));
+combinedStream.append(fs.createReadStream('file2.txt'));
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+However, what if you don't have all the source streams yet, or you don't want
+to allocate the resources (file descriptors, memory, etc.) for them right away?
+Well, in that case you can simply provide a callback that supplies the stream
+by calling a `next()` function:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create();
+combinedStream.append(function(next) {
+ next(fs.createReadStream('file1.txt'));
+});
+combinedStream.append(function(next) {
+ next(fs.createReadStream('file2.txt'));
+});
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+## API
+
+### CombinedStream.create([options])
+
+Returns a new combined stream object. Available options are:
+
+* `maxDataSize`
+* `pauseStreams`
+
+The effect of those options is described below.
+
+### combinedStream.pauseStreams = `true`
+
+Whether to apply back pressure to the underlaying streams. If set to `false`,
+the underlaying streams will never be paused. If set to `true`, the
+underlaying streams will be paused right after being appended, as well as when
+`delayedStream.pipe()` wants to throttle.
+
+### combinedStream.maxDataSize = `2 * 1024 * 1024`
+
+The maximum amount of bytes (or characters) to buffer for all source streams.
+If this value is exceeded, `combinedStream` emits an `'error'` event.
+
+### combinedStream.dataSize = `0`
+
+The amount of bytes (or characters) currently buffered by `combinedStream`.
+
+### combinedStream.append(stream)
+
+Appends the given `stream` to the combinedStream object. If `pauseStreams` is
+set to `true, this stream will also be paused right away.
+
+`streams` can also be a function that takes one parameter called `next`. `next`
+is a function that must be invoked in order to provide the `next` stream, see
+example above.
+
+Regardless of how the `stream` is appended, combined-stream always attaches an
+`'error'` listener to it, so you don't have to do that manually.
+
+Special case: `stream` can also be a String or Buffer.
+
+### combinedStream.write(data)
+
+You should not call this, `combinedStream` takes care of piping the appended
+streams into itself for you.
+
+### combinedStream.resume()
+
+Causes `combinedStream` to start drain the streams it manages. The function is
+idempotent, and also emits a `'resume'` event each time which usually goes to
+the stream that is currently being drained.
+
+### combinedStream.pause();
+
+If `combinedStream.pauseStreams` is set to `false`, this does nothing.
+Otherwise a `'pause'` event is emitted, this goes to the stream that is
+currently being drained, so you can use it to apply back pressure.
+
+### combinedStream.end();
+
+Sets `combinedStream.writable` to false, emits an `'end'` event, and removes
+all streams from the queue.
+
+### combinedStream.destroy();
+
+Same as `combinedStream.end()`, except it emits a `'close'` event instead of
+`'end'`.
+
+## License
+
+combined-stream is licensed under the MIT license.
diff --git a/node_modules/combined-stream/lib/combined_stream.js b/node_modules/combined-stream/lib/combined_stream.js
new file mode 100644
index 0000000..125f097
--- /dev/null
+++ b/node_modules/combined-stream/lib/combined_stream.js
@@ -0,0 +1,208 @@
+var util = require('util');
+var Stream = require('stream').Stream;
+var DelayedStream = require('delayed-stream');
+
+module.exports = CombinedStream;
+function CombinedStream() {
+ this.writable = false;
+ this.readable = true;
+ this.dataSize = 0;
+ this.maxDataSize = 2 * 1024 * 1024;
+ this.pauseStreams = true;
+
+ this._released = false;
+ this._streams = [];
+ this._currentStream = null;
+ this._insideLoop = false;
+ this._pendingNext = false;
+}
+util.inherits(CombinedStream, Stream);
+
+CombinedStream.create = function(options) {
+ var combinedStream = new this();
+
+ options = options || {};
+ for (var option in options) {
+ combinedStream[option] = options[option];
+ }
+
+ return combinedStream;
+};
+
+CombinedStream.isStreamLike = function(stream) {
+ return (typeof stream !== 'function')
+ && (typeof stream !== 'string')
+ && (typeof stream !== 'boolean')
+ && (typeof stream !== 'number')
+ && (!Buffer.isBuffer(stream));
+};
+
+CombinedStream.prototype.append = function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+
+ if (isStreamLike) {
+ if (!(stream instanceof DelayedStream)) {
+ var newStream = DelayedStream.create(stream, {
+ maxDataSize: Infinity,
+ pauseStream: this.pauseStreams,
+ });
+ stream.on('data', this._checkDataSize.bind(this));
+ stream = newStream;
+ }
+
+ this._handleErrors(stream);
+
+ if (this.pauseStreams) {
+ stream.pause();
+ }
+ }
+
+ this._streams.push(stream);
+ return this;
+};
+
+CombinedStream.prototype.pipe = function(dest, options) {
+ Stream.prototype.pipe.call(this, dest, options);
+ this.resume();
+ return dest;
+};
+
+CombinedStream.prototype._getNext = function() {
+ this._currentStream = null;
+
+ if (this._insideLoop) {
+ this._pendingNext = true;
+ return; // defer call
+ }
+
+ this._insideLoop = true;
+ try {
+ do {
+ this._pendingNext = false;
+ this._realGetNext();
+ } while (this._pendingNext);
+ } finally {
+ this._insideLoop = false;
+ }
+};
+
+CombinedStream.prototype._realGetNext = function() {
+ var stream = this._streams.shift();
+
+
+ if (typeof stream == 'undefined') {
+ this.end();
+ return;
+ }
+
+ if (typeof stream !== 'function') {
+ this._pipeNext(stream);
+ return;
+ }
+
+ var getStream = stream;
+ getStream(function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('data', this._checkDataSize.bind(this));
+ this._handleErrors(stream);
+ }
+
+ this._pipeNext(stream);
+ }.bind(this));
+};
+
+CombinedStream.prototype._pipeNext = function(stream) {
+ this._currentStream = stream;
+
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('end', this._getNext.bind(this));
+ stream.pipe(this, {end: false});
+ return;
+ }
+
+ var value = stream;
+ this.write(value);
+ this._getNext();
+};
+
+CombinedStream.prototype._handleErrors = function(stream) {
+ var self = this;
+ stream.on('error', function(err) {
+ self._emitError(err);
+ });
+};
+
+CombinedStream.prototype.write = function(data) {
+ this.emit('data', data);
+};
+
+CombinedStream.prototype.pause = function() {
+ if (!this.pauseStreams) {
+ return;
+ }
+
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
+ this.emit('pause');
+};
+
+CombinedStream.prototype.resume = function() {
+ if (!this._released) {
+ this._released = true;
+ this.writable = true;
+ this._getNext();
+ }
+
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
+ this.emit('resume');
+};
+
+CombinedStream.prototype.end = function() {
+ this._reset();
+ this.emit('end');
+};
+
+CombinedStream.prototype.destroy = function() {
+ this._reset();
+ this.emit('close');
+};
+
+CombinedStream.prototype._reset = function() {
+ this.writable = false;
+ this._streams = [];
+ this._currentStream = null;
+};
+
+CombinedStream.prototype._checkDataSize = function() {
+ this._updateDataSize();
+ if (this.dataSize <= this.maxDataSize) {
+ return;
+ }
+
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
+ this._emitError(new Error(message));
+};
+
+CombinedStream.prototype._updateDataSize = function() {
+ this.dataSize = 0;
+
+ var self = this;
+ this._streams.forEach(function(stream) {
+ if (!stream.dataSize) {
+ return;
+ }
+
+ self.dataSize += stream.dataSize;
+ });
+
+ if (this._currentStream && this._currentStream.dataSize) {
+ this.dataSize += this._currentStream.dataSize;
+ }
+};
+
+CombinedStream.prototype._emitError = function(err) {
+ this._reset();
+ this.emit('error', err);
+};
diff --git a/node_modules/combined-stream/package.json b/node_modules/combined-stream/package.json
new file mode 100644
index 0000000..6982b6d
--- /dev/null
+++ b/node_modules/combined-stream/package.json
@@ -0,0 +1,25 @@
+{
+ "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
+ "name": "combined-stream",
+ "description": "A stream that emits multiple other streams one after another.",
+ "version": "1.0.8",
+ "homepage": "https://github.com/felixge/node-combined-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/felixge/node-combined-stream.git"
+ },
+ "main": "./lib/combined_stream",
+ "scripts": {
+ "test": "node test/run.js"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "devDependencies": {
+ "far": "~0.0.7"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/combined-stream/yarn.lock b/node_modules/combined-stream/yarn.lock
new file mode 100644
index 0000000..7edf418
--- /dev/null
+++ b/node_modules/combined-stream/yarn.lock
@@ -0,0 +1,17 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+
+far@~0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7"
+ dependencies:
+ oop "0.0.3"
+
+oop@0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401"
diff --git a/node_modules/commander/CHANGELOG.md b/node_modules/commander/CHANGELOG.md
new file mode 100644
index 0000000..0c0587f
--- /dev/null
+++ b/node_modules/commander/CHANGELOG.md
@@ -0,0 +1,385 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). (Format adopted after v3.0.0.)
+
+<!-- markdownlint-disable MD024 -->
+
+## [5.1.0] (2020-04-25)
+
+### Added
+
+- support for multiple command aliases, the first of which is shown in the auto-generated help ([#531], [#1236])
+- configuration support in `addCommand()` for `hidden` and `isDefault` ([#1232])
+
+### Fixed
+
+- omit masked help flags from the displayed help ([#645], [#1247])
+- remove old short help flag when change help flags using `helpOption` ([#1248])
+
+### Changed
+
+- remove use of `arguments` to improve auto-generated help in editors ([#1235])
+- rename `.command()` configuration `noHelp` to `hidden` (but not remove old support) ([#1232])
+- improvements to documentation
+- update dependencies
+- update tested versions of node
+- eliminate lint errors in TypeScript ([#1208])
+
+## [5.0.0] (2020-03-14)
+
+### Added
+
+* support for nested commands with action-handlers ([#1] [#764] [#1149])
+* `.addCommand()` for adding a separately configured command ([#764] [#1149])
+* allow a non-executable to be set as the default command ([#742] [#1149])
+* implicit help command when there are subcommands (previously only if executables) ([#1149])
+* customise implicit help command with `.addHelpCommand()` ([#1149])
+* display error message for unknown subcommand, by default ([#432] [#1088] [#1149])
+* display help for missing subcommand, by default ([#1088] [#1149])
+* combined short options as single argument may include boolean flags and value flag and value (e.g. `-a -b -p 80` can be written as `-abp80`) ([#1145])
+* `.parseOption()` includes short flag and long flag expansions ([#1145])
+* `.helpInformation()` returns help text as a string, previously a private routine ([#1169])
+* `.parse()` implicitly uses `process.argv` if arguments not specified ([#1172])
+* optionally specify where `.parse()` arguments "from", if not following node conventions ([#512] [#1172])
+* suggest help option along with unknown command error ([#1179])
+* TypeScript definition for `commands` property of `Command` ([#1184])
+* export `program` property ([#1195])
+* `createCommand` factory method to simplify subclassing ([#1191])
+
+### Fixed
+
+* preserve argument order in subcommands ([#508] [#962] [#1138])
+* do not emit `command:*` for executable subcommands ([#809] [#1149])
+* action handler called whether or not there are non-option arguments ([#1062] [#1149])
+* combining option short flag and value in single argument now works for subcommands ([#1145])
+* only add implicit help command when it will not conflict with other uses of argument ([#1153] [#1149])
+* implicit help command works with command aliases ([#948] [#1149])
+* options are validated whether or not there is an action handler ([#1149])
+
+### Changed
+
+* *Breaking* `.args` contains command arguments with just recognised options removed ([#1032] [#1138])
+* *Breaking* display error if required argument for command is missing ([#995] [#1149])
+* tighten TypeScript definition of custom option processing function passed to `.option()` ([#1119])
+* *Breaking* `.allowUnknownOption()` ([#802] [#1138])
+ * unknown options included in arguments passed to command action handler
+ * unknown options included in `.args`
+* only recognised option short flags and long flags are expanded (e.g. `-ab` or `--foo=bar`) ([#1145])
+* *Breaking* `.parseOptions()` ([#1138])
+ * `args` in returned result renamed `operands` and does not include anything after first unknown option
+ * `unknown` in returned result has arguments after first unknown option including operands, not just options and values
+* *Breaking* `.on('command:*', callback)` and other command events passed (changed) results from `.parseOptions`, i.e. operands and unknown ([#1138])
+* refactor Option from prototype to class ([#1133])
+* refactor Command from prototype to class ([#1159])
+* changes to error handling ([#1165])
+ * throw for author error, not just display message
+ * preflight for variadic error
+ * add tips to missing subcommand executable
+* TypeScript fluent return types changed to be more subclass friendly, return `this` rather than `Command` ([#1180])
+* `.parseAsync` returns `Promise<this>` to be consistent with `.parse()` ([#1180])
+* update dependencies
+
+### Removed
+
+* removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on `@types/node` ([#1146])
+* removed private function `normalize` (the functionality has been integrated into `parseOptions`) ([#1145])
+* `parseExpectedArgs` is now private ([#1149])
+
+### Migration Tips
+
+If you use `.on('command:*')` or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.
+
+If you use `program.args` or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.
+
+If you use `.command('*')` to add a default command, you may be be able to switch to `isDefault:true` with a named command.
+
+## [5.0.0-4] (2020-03-03)
+
+(Released in 5.0.0)
+
+## [5.0.0-3] (2020-02-20)
+
+(Released in 5.0.0)
+
+## [5.0.0-2] (2020-02-10)
+
+(Released in 5.0.0)
+
+## [5.0.0-1] (2020-02-08)
+
+(Released in 5.0.0)
+
+## [5.0.0-0] (2020-02-02)
+
+(Released in 5.0.0)
+
+## [4.1.1] (2020-02-02)
+
+### Fixed
+
+* TypeScript definition for `.action()` should include Promise for async ([#1157])
+
+## [4.1.0] (2020-01-06)
+
+### Added
+
+* two routines to change how option values are handled, and eliminate name clashes with command properties ([#933] [#1102])
+ * see storeOptionsAsProperties and passCommandToAction in README
+* `.parseAsync` to use instead of `.parse` if supply async action handlers ([#806] [#1118])
+
+### Fixed
+
+* Remove trailing blanks from wrapped help text ([#1096])
+
+### Changed
+
+* update dependencies
+* extend security coverage for Commander 2.x to 2020-02-03
+* improvements to README
+* improvements to TypeScript definition documentation
+* move old versions out of main CHANGELOG
+* removed explicit use of `ts-node` in tests
+
+## [4.0.1] (2019-11-12)
+
+### Fixed
+
+* display help when requested, even if there are missing required options ([#1091])
+
+## [4.0.0] (2019-11-02)
+
+### Added
+
+* automatically wrap and indent help descriptions for options and commands ([#1051])
+* `.exitOverride()` allows override of calls to `process.exit` for additional error handling and to keep program running ([#1040])
+* support for declaring required options with `.requiredOptions()` ([#1071])
+* GitHub Actions support ([#1027])
+* translation links in README
+
+### Changed
+
+* dev: switch tests from Sinon+Should to Jest with major rewrite of tests ([#1035])
+* call default subcommand even when there are unknown options ([#1047])
+* *Breaking* Commander is only officially supported on Node 8 and above, and requires Node 6 ([#1053])
+
+### Fixed
+
+* *Breaking* keep command object out of program.args when action handler called ([#1048])
+ * also, action handler now passed array of unknown arguments
+* complain about unknown options when program argument supplied and action handler ([#1049])
+ * this changes parameters to `command:*` event to include unknown arguments
+* removed deprecated `customFds` option from call to `child_process.spawn` ([#1052])
+* rework TypeScript declarations to bring all types into imported namespace ([#1081])
+
+### Migration Tips
+
+#### Testing for no arguments
+
+If you were previously using code like:
+
+```js
+if (!program.args.length) ...
+```
+
+a partial replacement is:
+
+```js
+if (program.rawArgs.length < 3) ...
+```
+
+## [4.0.0-1] Prerelease (2019-10-08)
+
+(Released in 4.0.0)
+
+## [4.0.0-0] Prerelease (2019-10-01)
+
+(Released in 4.0.0)
+
+## [2.20.1] (2019-09-29)
+
+### Fixed
+
+* Improve tracking of executable subcommands.
+
+### Changed
+
+* update development dependencies
+
+## [3.0.2] (2019-09-27)
+
+### Fixed
+
+* Improve tracking of executable subcommands.
+
+### Changed
+
+* update development dependencies
+
+## [3.0.1] (2019-08-30)
+
+### Added
+
+* .name and .usage to README ([#1010])
+* Table of Contents to README ([#1010])
+* TypeScript definition for `executableFile` in CommandOptions ([#1028])
+
+### Changed
+
+* consistently use `const` rather than `var` in README ([#1026])
+
+### Fixed
+
+* help for sub commands with custom executableFile ([#1018])
+
+## [3.0.0] / 2019-08-08
+
+* Add option to specify executable file name ([#999])
+ * e.g. `.command('clone', 'clone description', { executableFile: 'myClone' })`
+* Change docs for `.command` to contrast action handler vs git-style executable. ([#938] [#990])
+* **Breaking** Change TypeScript to use overloaded function for `.command`. ([#938] [#990])
+* Change to use straight quotes around strings in error messages (like 'this' instead of `this') ([#915])
+* Add TypeScript "reference types" for node ([#974])
+* Add support for hyphen as an option argument in subcommands ([#697])
+* Add support for a short option flag and its value to be concatenated for action handler subcommands ([#599])
+ * e.g. `-p 80` can also be supplied as `-p80`
+* Add executable arguments to spawn in win32, for git-style executables ([#611])
+ * e.g. `node --harmony myCommand.js clone`
+* Add parent command as prefix of subcommand in help ([#980])
+* Add optional custom description to `.version` ([#963])
+ * e.g. `program.version('0.0.1', '-v, --vers', 'output the current version')`
+* Add `.helpOption(flags, description)` routine to customise help flags and description ([#963])
+ * e.g. `.helpOption('-e, --HELP', 'read more information')`
+* Fix behavior of --no-* options ([#795])
+ * can now define both `--foo` and `--no-foo`
+ * **Breaking** custom event listeners: `--no-foo` on cli now emits `option:no-foo` (previously `option:foo`)
+ * **Breaking** default value: defining `--no-foo` after defining `--foo` leaves the default value unchanged (previously set it to false)
+ * allow boolean default value, such as from environment ([#987])
+* Increment inspector port for spawned subcommands ([#991])
+ * e.g. `node --inspect myCommand.js clone`
+
+### Migration Tips
+
+The custom event for a negated option like `--no-foo` is `option:no-foo` (previously `option:foo`).
+
+```js
+program
+ .option('--no-foo')
+ .on('option:no-foo', () => {
+ console.log('removing foo');
+ });
+```
+
+When using TypeScript, adding a command does not allow an explicit `undefined` for an unwanted executable description (e.g
+for a command with an action handler).
+
+```js
+program
+ .command('action1', undefined, { noHelp: true }) // No longer valid
+ .command('action2', { noHelp: true }) // Correct
+```
+
+## 3.0.0-0 Prerelease / 2019-07-28
+
+(Released as 3.0.0)
+
+## Older versions
+
+* [2.x](./changelogs/CHANGELOG-2.md)
+* [1.x](./changelogs/CHANGELOG-1.md)
+* [0.x](./changelogs/CHANGELOG-0.md)
+
+[#1]: https://github.com/tj/commander.js/issues/1
+[#432]: https://github.com/tj/commander.js/issues/432
+[#508]: https://github.com/tj/commander.js/issues/508
+[#512]: https://github.com/tj/commander.js/issues/512
+[#531]: https://github.com/tj/commander.js/issues/531
+[#599]: https://github.com/tj/commander.js/issues/599
+[#611]: https://github.com/tj/commander.js/issues/611
+[#645]: https://github.com/tj/commander.js/issues/645
+[#697]: https://github.com/tj/commander.js/issues/697
+[#742]: https://github.com/tj/commander.js/issues/742
+[#764]: https://github.com/tj/commander.js/issues/764
+[#795]: https://github.com/tj/commander.js/issues/795
+[#802]: https://github.com/tj/commander.js/issues/802
+[#806]: https://github.com/tj/commander.js/issues/806
+[#809]: https://github.com/tj/commander.js/issues/809
+[#915]: https://github.com/tj/commander.js/issues/915
+[#938]: https://github.com/tj/commander.js/issues/938
+[#948]: https://github.com/tj/commander.js/issues/948
+[#962]: https://github.com/tj/commander.js/issues/962
+[#963]: https://github.com/tj/commander.js/issues/963
+[#974]: https://github.com/tj/commander.js/issues/974
+[#980]: https://github.com/tj/commander.js/issues/980
+[#987]: https://github.com/tj/commander.js/issues/987
+[#990]: https://github.com/tj/commander.js/issues/990
+[#991]: https://github.com/tj/commander.js/issues/991
+[#993]: https://github.com/tj/commander.js/issues/993
+[#995]: https://github.com/tj/commander.js/issues/995
+[#999]: https://github.com/tj/commander.js/issues/999
+[#1010]: https://github.com/tj/commander.js/pull/1010
+[#1018]: https://github.com/tj/commander.js/pull/1018
+[#1026]: https://github.com/tj/commander.js/pull/1026
+[#1027]: https://github.com/tj/commander.js/pull/1027
+[#1028]: https://github.com/tj/commander.js/pull/1028
+[#1032]: https://github.com/tj/commander.js/issues/1032
+[#1035]: https://github.com/tj/commander.js/pull/1035
+[#1040]: https://github.com/tj/commander.js/pull/1040
+[#1047]: https://github.com/tj/commander.js/pull/1047
+[#1048]: https://github.com/tj/commander.js/pull/1048
+[#1049]: https://github.com/tj/commander.js/pull/1049
+[#1051]: https://github.com/tj/commander.js/pull/1051
+[#1052]: https://github.com/tj/commander.js/pull/1052
+[#1053]: https://github.com/tj/commander.js/pull/1053
+[#1062]: https://github.com/tj/commander.js/pull/1062
+[#1071]: https://github.com/tj/commander.js/pull/1071
+[#1081]: https://github.com/tj/commander.js/pull/1081
+[#1088]: https://github.com/tj/commander.js/issues/1088
+[#1091]: https://github.com/tj/commander.js/pull/1091
+[#1096]: https://github.com/tj/commander.js/pull/1096
+[#1102]: https://github.com/tj/commander.js/pull/1102
+[#1118]: https://github.com/tj/commander.js/pull/1118
+[#1119]: https://github.com/tj/commander.js/pull/1119
+[#1133]: https://github.com/tj/commander.js/pull/1133
+[#1138]: https://github.com/tj/commander.js/pull/1138
+[#1145]: https://github.com/tj/commander.js/pull/1145
+[#1146]: https://github.com/tj/commander.js/pull/1146
+[#1149]: https://github.com/tj/commander.js/pull/1149
+[#1153]: https://github.com/tj/commander.js/issues/1153
+[#1157]: https://github.com/tj/commander.js/pull/1157
+[#1159]: https://github.com/tj/commander.js/pull/1159
+[#1165]: https://github.com/tj/commander.js/pull/1165
+[#1169]: https://github.com/tj/commander.js/pull/1169
+[#1172]: https://github.com/tj/commander.js/pull/1172
+[#1179]: https://github.com/tj/commander.js/pull/1179
+[#1180]: https://github.com/tj/commander.js/pull/1180
+[#1184]: https://github.com/tj/commander.js/pull/1184
+[#1191]: https://github.com/tj/commander.js/pull/1191
+[#1195]: https://github.com/tj/commander.js/pull/1195
+[#1208]: https://github.com/tj/commander.js/pull/1208
+[#1232]: https://github.com/tj/commander.js/pull/1232
+[#1235]: https://github.com/tj/commander.js/pull/1235
+[#1236]: https://github.com/tj/commander.js/pull/1236
+[#1247]: https://github.com/tj/commander.js/pull/1247
+[#1248]: https://github.com/tj/commander.js/pull/1248
+
+[Unreleased]: https://github.com/tj/commander.js/compare/master...develop
+[5.1.0]: https://github.com/tj/commander.js/compare/v5.0.0..v5.1.0
+[5.0.0]: https://github.com/tj/commander.js/compare/v4.1.1..v5.0.0
+[5.0.0-4]: https://github.com/tj/commander.js/compare/v5.0.0-3..v5.0.0-4
+[5.0.0-3]: https://github.com/tj/commander.js/compare/v5.0.0-2..v5.0.0-3
+[5.0.0-2]: https://github.com/tj/commander.js/compare/v5.0.0-1..v5.0.0-2
+[5.0.0-1]: https://github.com/tj/commander.js/compare/v5.0.0-0..v5.0.0-1
+[5.0.0-0]: https://github.com/tj/commander.js/compare/v4.1.1..v5.0.0-0
+[4.1.1]: https://github.com/tj/commander.js/compare/v4.1.0..v4.1.1
+[4.1.0]: https://github.com/tj/commander.js/compare/v4.0.1..v4.1.0
+[4.0.1]: https://github.com/tj/commander.js/compare/v4.0.0..v4.0.1
+[4.0.0]: https://github.com/tj/commander.js/compare/v3.0.2..v4.0.0
+[4.0.0-1]: https://github.com/tj/commander.js/compare/v4.0.0-0..v4.0.0-1
+[4.0.0-0]: https://github.com/tj/commander.js/compare/v3.0.2...v4.0.0-0
+[3.0.2]: https://github.com/tj/commander.js/compare/v3.0.1...v3.0.2
+[3.0.1]: https://github.com/tj/commander.js/compare/v3.0.0...v3.0.1
+[3.0.0]: https://github.com/tj/commander.js/compare/v2.20.1...v3.0.0
+[2.20.1]: https://github.com/tj/commander.js/compare/v2.20.0...v2.20.1
diff --git a/node_modules/commander/LICENSE b/node_modules/commander/LICENSE
new file mode 100644
index 0000000..10f997a
--- /dev/null
+++ b/node_modules/commander/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/commander/Readme.md b/node_modules/commander/Readme.md
new file mode 100644
index 0000000..fcb995a
--- /dev/null
+++ b/node_modules/commander/Readme.md
@@ -0,0 +1,737 @@
+# Commander.js
+
+[![Build Status](https://api.travis-ci.org/tj/commander.js.svg?branch=master)](http://travis-ci.org/tj/commander.js)
+[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
+[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true)
+[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander)
+
+The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander).
+
+Read this in other languages: English | [简体中文](./Readme_zh-CN.md)
+
+- [Commander.js](#commanderjs)
+ - [Installation](#installation)
+ - [Declaring _program_ variable](#declaring-program-variable)
+ - [Options](#options)
+ - [Common option types, boolean and value](#common-option-types-boolean-and-value)
+ - [Default option value](#default-option-value)
+ - [Other option types, negatable boolean and flag|value](#other-option-types-negatable-boolean-and-flagvalue)
+ - [Custom option processing](#custom-option-processing)
+ - [Required option](#required-option)
+ - [Version option](#version-option)
+ - [Commands](#commands)
+ - [Specify the argument syntax](#specify-the-argument-syntax)
+ - [Action handler (sub)commands](#action-handler-subcommands)
+ - [Stand-alone executable (sub)commands](#stand-alone-executable-subcommands)
+ - [Automated help](#automated-help)
+ - [Custom help](#custom-help)
+ - [.usage and .name](#usage-and-name)
+ - [.help(cb)](#helpcb)
+ - [.outputHelp(cb)](#outputhelpcb)
+ - [.helpInformation()](#helpinformation)
+ - [.helpOption(flags, description)](#helpoptionflags-description)
+ - [.addHelpCommand()](#addhelpcommand)
+ - [Custom event listeners](#custom-event-listeners)
+ - [Bits and pieces](#bits-and-pieces)
+ - [.parse() and .parseAsync()](#parse-and-parseasync)
+ - [Avoiding option name clashes](#avoiding-option-name-clashes)
+ - [TypeScript](#typescript)
+ - [createCommand()](#createcommand)
+ - [Node options such as `--harmony`](#node-options-such-as---harmony)
+ - [Debugging stand-alone executable subcommands](#debugging-stand-alone-executable-subcommands)
+ - [Override exit handling](#override-exit-handling)
+ - [Examples](#examples)
+ - [License](#license)
+ - [Support](#support)
+ - [Commander for enterprise](#commander-for-enterprise)
+
+## Installation
+
+```bash
+npm install commander
+```
+
+## Declaring _program_ variable
+
+Commander exports a global object which is convenient for quick programs.
+This is used in the examples in this README for brevity.
+
+```js
+const { program } = require('commander');
+program.version('0.0.1');
+```
+
+For larger programs which may use commander in multiple ways, including unit testing, it is better to create a local Command object to use.
+
+ ```js
+ const { Command } = require('commander');
+ const program = new Command();
+ program.version('0.0.1');
+ ```
+
+## Options
+
+Options are defined with the `.option()` method, also serving as documentation for the options. Each option can have a short flag (single character) and a long name, separated by a comma or space or vertical bar ('|').
+
+The options can be accessed as properties on the Command object. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. See also optional new behaviour to [avoid name clashes](#avoiding-option-name-clashes).
+
+Multiple short flags may optionally be combined in a single argument following the dash: boolean flags, the last flag may take a value, and the value.
+For example `-a -b -p 80` may be written as `-ab -p80` or even `-abp80`.
+
+You can use `--` to indicate the end of the options, and any remaining arguments will be used without being interpreted.
+This is particularly useful for passing options through to another
+command, like: `do -- git --version`.
+
+Options on the command line are not positional, and can be specified before or after other command arguments.
+
+### Common option types, boolean and value
+
+The two most used option types are a boolean flag, and an option which takes a value (declared using angle brackets). Both are `undefined` unless specified on command line.
+
+```js
+const { program } = require('commander');
+
+program
+ .option('-d, --debug', 'output extra debugging')
+ .option('-s, --small', 'small pizza size')
+ .option('-p, --pizza-type <type>', 'flavour of pizza');
+
+program.parse(process.argv);
+
+if (program.debug) console.log(program.opts());
+console.log('pizza details:');
+if (program.small) console.log('- small pizza size');
+if (program.pizzaType) console.log(`- ${program.pizzaType}`);
+```
+
+```bash
+$ pizza-options -d
+{ debug: true, small: undefined, pizzaType: undefined }
+pizza details:
+$ pizza-options -p
+error: option '-p, --pizza-type <type>' argument missing
+$ pizza-options -ds -p vegetarian
+{ debug: true, small: true, pizzaType: 'vegetarian' }
+pizza details:
+- small pizza size
+- vegetarian
+$ pizza-options --pizza-type=cheese
+pizza details:
+- cheese
+```
+
+`program.parse(arguments)` processes the arguments, leaving any args not consumed by the program options in the `program.args` array.
+
+### Default option value
+
+You can specify a default value for an option which takes a value.
+
+```js
+const { program } = require('commander');
+
+program
+ .option('-c, --cheese <type>', 'add the specified type of cheese', 'blue');
+
+program.parse(process.argv);
+
+console.log(`cheese: ${program.cheese}`);
+```
+
+```bash
+$ pizza-options
+cheese: blue
+$ pizza-options --cheese stilton
+cheese: stilton
+```
+
+### Other option types, negatable boolean and flag|value
+
+You can specify a boolean option long name with a leading `no-` to set the option value to false when used.
+Defined alone this also makes the option true by default.
+
+If you define `--foo` first, adding `--no-foo` does not change the default value from what it would
+otherwise be. You can specify a default boolean value for a boolean flag and it can be overridden on command line.
+
+```js
+const { program } = require('commander');
+
+program
+ .option('--no-sauce', 'Remove sauce')
+ .option('--cheese <flavour>', 'cheese flavour', 'mozzarella')
+ .option('--no-cheese', 'plain with no cheese')
+ .parse(process.argv);
+
+const sauceStr = program.sauce ? 'sauce' : 'no sauce';
+const cheeseStr = (program.cheese === false) ? 'no cheese' : `${program.cheese} cheese`;
+console.log(`You ordered a pizza with ${sauceStr} and ${cheeseStr}`);
+```
+
+```bash
+$ pizza-options
+You ordered a pizza with sauce and mozzarella cheese
+$ pizza-options --sauce
+error: unknown option '--sauce'
+$ pizza-options --cheese=blue
+You ordered a pizza with sauce and blue cheese
+$ pizza-options --no-sauce --no-cheese
+You ordered a pizza with no sauce and no cheese
+```
+
+You can specify an option which functions as a flag but may also take a value (declared using square brackets).
+
+```js
+const { program } = require('commander');
+
+program
+ .option('-c, --cheese [type]', 'Add cheese with optional type');
+
+program.parse(process.argv);
+
+if (program.cheese === undefined) console.log('no cheese');
+else if (program.cheese === true) console.log('add cheese');
+else console.log(`add cheese type ${program.cheese}`);
+```
+
+```bash
+$ pizza-options
+no cheese
+$ pizza-options --cheese
+add cheese
+$ pizza-options --cheese mozzarella
+add cheese type mozzarella
+```
+
+### Custom option processing
+
+You may specify a function to do custom processing of option values. The callback function receives two parameters, the user specified value and the
+previous value for the option. It returns the new value for the option.
+
+This allows you to coerce the option value to the desired type, or accumulate values, or do entirely custom processing.
+
+You can optionally specify the default/starting value for the option after the function.
+
+```js
+const { program } = require('commander');
+
+function myParseInt(value, dummyPrevious) {
+ // parseInt takes a string and an optional radix
+ return parseInt(value);
+}
+
+function increaseVerbosity(dummyValue, previous) {
+ return previous + 1;
+}
+
+function collect(value, previous) {
+ return previous.concat([value]);
+}
+
+function commaSeparatedList(value, dummyPrevious) {
+ return value.split(',');
+}
+
+program
+ .option('-f, --float <number>', 'float argument', parseFloat)
+ .option('-i, --integer <number>', 'integer argument', myParseInt)
+ .option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0)
+ .option('-c, --collect <value>', 'repeatable value', collect, [])
+ .option('-l, --list <items>', 'comma separated list', commaSeparatedList)
+;
+
+program.parse(process.argv);
+
+if (program.float !== undefined) console.log(`float: ${program.float}`);
+if (program.integer !== undefined) console.log(`integer: ${program.integer}`);
+if (program.verbose > 0) console.log(`verbosity: ${program.verbose}`);
+if (program.collect.length > 0) console.log(program.collect);
+if (program.list !== undefined) console.log(program.list);
+```
+
+```bash
+$ custom -f 1e2
+float: 100
+$ custom --integer 2
+integer: 2
+$ custom -v -v -v
+verbose: 3
+$ custom -c a -c b -c c
+[ 'a', 'b', 'c' ]
+$ custom --list x,y,z
+[ 'x', 'y', 'z' ]
+```
+
+### Required option
+
+You may specify a required (mandatory) option using `.requiredOption`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option` in format, taking flags and description, and optional default value or custom processing.
+
+```js
+const { program } = require('commander');
+
+program
+ .requiredOption('-c, --cheese <type>', 'pizza must have cheese');
+
+program.parse(process.argv);
+```
+
+```bash
+$ pizza
+error: required option '-c, --cheese <type>' not specified
+```
+
+### Version option
+
+The optional `version` method adds handling for displaying the command version. The default option flags are `-V` and `--version`, and when present the command prints the version number and exits.
+
+```js
+program.version('0.0.1');
+```
+
+```bash
+$ ./examples/pizza -V
+0.0.1
+```
+
+You may change the flags and description by passing additional parameters to the `version` method, using
+the same syntax for flags as the `option` method. The version flags can be named anything, but a long name is required.
+
+```js
+program.version('0.0.1', '-v, --vers', 'output the current version');
+```
+
+## Commands
+
+You can specify (sub)commands using `.command()` or `.addCommand()`. There are two ways these can be implemented: using an action handler attached to the command, or as a stand-alone executable file (described in more detail later). The subcommands may be nested ([example](./examples/nestedCommands.js)).
+
+In the first parameter to `.command()` you specify the command name and any command arguments. The arguments may be `<required>` or `[optional]`, and the last argument may also be `variadic...`.
+
+You can use `.addCommand()` to add an already configured subcommand to the program.
+
+For example:
+
+```js
+// Command implemented using action handler (description is supplied separately to `.command`)
+// Returns new command for configuring.
+program
+ .command('clone <source> [destination]')
+ .description('clone a repository into a newly created directory')
+ .action((source, destination) => {
+ console.log('clone command called');
+ });
+
+// Command implemented using stand-alone executable file (description is second parameter to `.command`)
+// Returns `this` for adding more commands.
+program
+ .command('start <service>', 'start named service')
+ .command('stop [service]', 'stop named service, or all if no name supplied');
+
+// Command prepared separately.
+// Returns `this` for adding more commands.
+program
+ .addCommand(build.makeBuildCommand());
+```
+
+Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `true` for `opts.hidden` will remove the command from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified ([example](./examples/defaultCommand.js)).
+
+### Specify the argument syntax
+
+You use `.arguments` to specify the arguments for the top-level command, and for subcommands they are usually included in the `.command` call. Angled brackets (e.g. `<required>`) indicate required input. Square brackets (e.g. `[optional]`) indicate optional input.
+
+```js
+const { program } = require('commander');
+
+program
+ .version('0.1.0')
+ .arguments('<cmd> [env]')
+ .action(function (cmd, env) {
+ cmdValue = cmd;
+ envValue = env;
+ });
+
+program.parse(process.argv);
+
+if (typeof cmdValue === 'undefined') {
+ console.error('no command given!');
+ process.exit(1);
+}
+console.log('command:', cmdValue);
+console.log('environment:', envValue || "no environment given");
+```
+
+ The last argument of a command can be variadic, and only the last argument. To make an argument variadic you
+ append `...` to the argument name. For example:
+
+```js
+const { program } = require('commander');
+
+program
+ .version('0.1.0')
+ .command('rmdir <dir> [otherDirs...]')
+ .action(function (dir, otherDirs) {
+ console.log('rmdir %s', dir);
+ if (otherDirs) {
+ otherDirs.forEach(function (oDir) {
+ console.log('rmdir %s', oDir);
+ });
+ }
+ });
+
+program.parse(process.argv);
+```
+
+The variadic argument is passed to the action handler as an array.
+
+### Action handler (sub)commands
+
+You can add options to a command that uses an action handler.
+The action handler gets passed a parameter for each argument you declared, and one additional argument which is the
+command object itself. This command argument has the values for the command-specific options added as properties.
+
+```js
+const { program } = require('commander');
+
+program
+ .command('rm <dir>')
+ .option('-r, --recursive', 'Remove recursively')
+ .action(function (dir, cmdObj) {
+ console.log('remove ' + dir + (cmdObj.recursive ? ' recursively' : ''))
+ })
+
+program.parse(process.argv)
+```
+
+You may supply an `async` action handler, in which case you call `.parseAsync` rather than `.parse`.
+
+```js
+async function run() { /* code goes here */ }
+
+async function main() {
+ program
+ .command('run')
+ .action(run);
+ await program.parseAsync(process.argv);
+}
+```
+
+A command's options on the command line are validated when the command is used. Any unknown options will be reported as an error.
+
+### Stand-alone executable (sub)commands
+
+When `.command()` is invoked with a description argument, this tells Commander that you're going to use stand-alone executables for subcommands.
+Commander will search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-subcommand`, like `pm-install`, `pm-search`.
+You can specify a custom name with the `executableFile` configuration option.
+
+You handle the options for an executable (sub)command in the executable, and don't declare them at the top-level.
+
+```js
+// file: ./examples/pm
+const { program } = require('commander');
+
+program
+ .version('0.1.0')
+ .command('install [name]', 'install one or more packages')
+ .command('search [query]', 'search with optional query')
+ .command('update', 'update installed packages', {executableFile: 'myUpdateSubCommand'})
+ .command('list', 'list packages installed', {isDefault: true})
+ .parse(process.argv);
+```
+
+If the program is designed to be installed globally, make sure the executables have proper modes, like `755`.
+
+## Automated help
+
+The help information is auto-generated based on the information commander already knows about your program. The default
+help option is `-h,--help`. ([example](./examples/pizza))
+
+```bash
+$ node ./examples/pizza --help
+Usage: pizza [options]
+
+An application for pizzas ordering
+
+Options:
+ -V, --version output the version number
+ -p, --peppers Add peppers
+ -c, --cheese <type> Add the specified type of cheese (default: "marble")
+ -C, --no-cheese You do not want any cheese
+ -h, --help display help for command
+```
+
+A `help` command is added by default if your command has subcommands. It can be used alone, or with a subcommand name to show
+further help for the subcommand. These are effectively the same if the `shell` program has implicit help:
+
+```bash
+shell help
+shell --help
+
+shell help spawn
+shell spawn --help
+```
+
+### Custom help
+
+You can display extra information by listening for "--help". ([example](./examples/custom-help))
+
+```js
+program
+ .option('-f, --foo', 'enable some foo');
+
+// must be before .parse()
+program.on('--help', () => {
+ console.log('');
+ console.log('Example call:');
+ console.log(' $ custom-help --help');
+});
+```
+
+Yields the following help output:
+
+```Text
+Usage: custom-help [options]
+
+Options:
+ -f, --foo enable some foo
+ -h, --help display help for command
+
+Example call:
+ $ custom-help --help
+```
+
+### .usage and .name
+
+These allow you to customise the usage description in the first line of the help. The name is otherwise
+deduced from the (full) program arguments. Given:
+
+```js
+program
+ .name("my-command")
+ .usage("[global options] command")
+```
+
+The help will start with:
+
+```Text
+Usage: my-command [global options] command
+```
+
+### .help(cb)
+
+Output help information and exit immediately. Optional callback cb allows post-processing of help text before it is displayed.
+
+### .outputHelp(cb)
+
+Output help information without exiting.
+Optional callback cb allows post-processing of help text before it is displayed.
+
+### .helpInformation()
+
+Get the command help information as a string for processing or displaying yourself. (The text does not include the custom help
+from `--help` listeners.)
+
+### .helpOption(flags, description)
+
+Override the default help flags and description.
+
+```js
+program
+ .helpOption('-e, --HELP', 'read more information');
+```
+
+### .addHelpCommand()
+
+You can explicitly turn on or off the implicit help command with `.addHelpCommand()` and `.addHelpCommand(false)`.
+
+You can both turn on and customise the help command by supplying the name and description:
+
+```js
+program.addHelpCommand('assist [command]', 'show assistance');
+```
+
+## Custom event listeners
+
+You can execute custom actions by listening to command and option events.
+
+```js
+program.on('option:verbose', function () {
+ process.env.VERBOSE = this.verbose;
+});
+
+program.on('command:*', function (operands) {
+ console.error(`error: unknown command '${operands[0]}'`);
+ const availableCommands = program.commands.map(cmd => cmd.name());
+ mySuggestBestMatch(operands[0], availableCommands);
+ process.exitCode = 1;
+});
+```
+
+## Bits and pieces
+
+### .parse() and .parseAsync()
+
+The first argument to `.parse` is the array of strings to parse. You may omit the parameter to implicitly use `process.argv`.
+
+If the arguments follow different conventions than node you can pass a `from` option in the second parameter:
+
+- 'node': default, `argv[0]` is the application and `argv[1]` is the script being run, with user parameters after that
+- 'electron': `argv[1]` varies depending on whether the electron application is packaged
+- 'user': all of the arguments from the user
+
+For example:
+
+```js
+program.parse(process.argv); // Explicit, node conventions
+program.parse(); // Implicit, and auto-detect electron
+program.parse(['-f', 'filename'], { from: 'user' });
+```
+
+### Avoiding option name clashes
+
+The original and default behaviour is that the option values are stored
+as properties on the program, and the action handler is passed a
+command object with the options values stored as properties.
+This is very convenient to code, but the downside is possible clashes with
+existing properties of Command.
+
+There are two new routines to change the behaviour, and the default behaviour may change in the future:
+
+- `storeOptionsAsProperties`: whether to store option values as properties on command object, or store separately (specify false) and access using `.opts()`
+- `passCommandToAction`: whether to pass command to action handler,
+or just the options (specify false)
+
+([example](./examples/storeOptionsAsProperties-action.js))
+
+```js
+program
+ .storeOptionsAsProperties(false)
+ .passCommandToAction(false);
+
+program
+ .name('my-program-name')
+ .option('-n,--name <name>');
+
+program
+ .command('show')
+ .option('-a,--action <action>')
+ .action((options) => {
+ console.log(options.action);
+ });
+
+program.parse(process.argv);
+
+const programOptions = program.opts();
+console.log(programOptions.name);
+```
+
+### TypeScript
+
+The Commander package includes its TypeScript Definition file.
+
+If you use `ts-node` and stand-alone executable subcommands written as `.ts` files, you need to call your program through node to get the subcommands called correctly. e.g.
+
+```bash
+node -r ts-node/register pm.ts
+```
+
+### createCommand()
+
+This factory function creates a new command. It is exported and may be used instead of using `new`, like:
+
+```js
+const { createCommand } = require('commander');
+const program = createCommand();
+```
+
+`createCommand` is also a method of the Command object, and creates a new command rather than a subcommand. This gets used internally
+when creating subcommands using `.command()`, and you may override it to
+customise the new subcommand (examples using [subclass](./examples/custom-command-class.js) and [function](./examples/custom-command-function.js)).
+
+### Node options such as `--harmony`
+
+You can enable `--harmony` option in two ways:
+
+- Use `#! /usr/bin/env node --harmony` in the subcommands scripts. (Note Windows does not support this pattern.)
+- Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning subcommand process.
+
+### Debugging stand-alone executable subcommands
+
+An executable subcommand is launched as a separate child process.
+
+If you are using the node inspector for [debugging](https://nodejs.org/en/docs/guides/debugging-getting-started/) executable subcommands using `node --inspect` et al,
+the inspector port is incremented by 1 for the spawned subcommand.
+
+If you are using VSCode to debug executable subcommands you need to set the `"autoAttachChildProcesses": true` flag in your launch.json configuration.
+
+### Override exit handling
+
+By default Commander calls `process.exit` when it detects errors, or after displaying the help or version. You can override
+this behaviour and optionally supply a callback. The default override throws a `CommanderError`.
+
+The override callback is passed a `CommanderError` with properties `exitCode` number, `code` string, and `message`. The default override behaviour is to throw the error, except for async handling of executable subcommand completion which carries on. The normal display of error messages or version or help
+is not affected by the override which is called after the display.
+
+``` js
+program.exitOverride();
+
+try {
+ program.parse(process.argv);
+} catch (err) {
+ // custom processing...
+}
+```
+
+## Examples
+
+```js
+const { program } = require('commander');
+
+program
+ .version('0.1.0')
+ .option('-C, --chdir <path>', 'change the working directory')
+ .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
+ .option('-T, --no-tests', 'ignore test hook');
+
+program
+ .command('setup [env]')
+ .description('run setup commands for all envs')
+ .option("-s, --setup_mode [mode]", "Which setup mode to use")
+ .action(function(env, options){
+ const mode = options.setup_mode || "normal";
+ env = env || 'all';
+ console.log('setup for %s env(s) with %s mode', env, mode);
+ });
+
+program
+ .command('exec <cmd>')
+ .alias('ex')
+ .description('execute the given remote cmd')
+ .option("-e, --exec_mode <mode>", "Which exec mode to use")
+ .action(function(cmd, options){
+ console.log('exec "%s" using %s mode', cmd, options.exec_mode);
+ }).on('--help', function() {
+ console.log('');
+ console.log('Examples:');
+ console.log('');
+ console.log(' $ deploy exec sequential');
+ console.log(' $ deploy exec async');
+ });
+
+program.parse(process.argv);
+```
+
+More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory.
+
+## License
+
+[MIT](https://github.com/tj/commander.js/blob/master/LICENSE)
+
+## Support
+
+Commander 5.x is fully supported on Long Term Support versions of Node, and is likely to work with Node 6 but not tested.
+(For versions of Node below Node 6, use Commander 3.x or 2.x.)
+
+The main forum for free and community support is the project [Issues](https://github.com/tj/commander.js/issues) on GitHub.
+
+### Commander for enterprise
+
+Available as part of the Tidelift Subscription
+
+The maintainers of Commander and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-commander?utm_source=npm-commander&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/node_modules/commander/index.js b/node_modules/commander/index.js
new file mode 100644
index 0000000..987b79f
--- /dev/null
+++ b/node_modules/commander/index.js
@@ -0,0 +1,1756 @@
+/**
+ * Module dependencies.
+ */
+
+const EventEmitter = require('events').EventEmitter;
+const spawn = require('child_process').spawn;
+const path = require('path');
+const fs = require('fs');
+
+// @ts-check
+
+class Option {
+ /**
+ * Initialize a new `Option` with the given `flags` and `description`.
+ *
+ * @param {string} flags
+ * @param {string} description
+ * @api public
+ */
+
+ constructor(flags, description) {
+ this.flags = flags;
+ this.required = flags.indexOf('<') >= 0; // A value must be supplied when the option is specified.
+ this.optional = flags.indexOf('[') >= 0; // A value is optional when the option is specified.
+ this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.
+ this.negate = flags.indexOf('-no-') !== -1;
+ const flagParts = flags.split(/[ ,|]+/);
+ if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) this.short = flagParts.shift();
+ this.long = flagParts.shift();
+ this.description = description || '';
+ this.defaultValue = undefined;
+ }
+
+ /**
+ * Return option name.
+ *
+ * @return {string}
+ * @api private
+ */
+
+ name() {
+ return this.long.replace(/^--/, '');
+ };
+
+ /**
+ * Return option name, in a camelcase format that can be used
+ * as a object attribute key.
+ *
+ * @return {string}
+ * @api private
+ */
+
+ attributeName() {
+ return camelcase(this.name().replace(/^no-/, ''));
+ };
+
+ /**
+ * Check if `arg` matches the short or long flag.
+ *
+ * @param {string} arg
+ * @return {boolean}
+ * @api private
+ */
+
+ is(arg) {
+ return this.short === arg || this.long === arg;
+ };
+}
+
+/**
+ * CommanderError class
+ * @class
+ */
+class CommanderError extends Error {
+ /**
+ * Constructs the CommanderError class
+ * @param {number} exitCode suggested exit code which could be used with process.exit
+ * @param {string} code an id string representing the error
+ * @param {string} message human-readable description of the error
+ * @constructor
+ */
+ constructor(exitCode, code, message) {
+ super(message);
+ // properly capture stack trace in Node.js
+ Error.captureStackTrace(this, this.constructor);
+ this.name = this.constructor.name;
+ this.code = code;
+ this.exitCode = exitCode;
+ this.nestedError = undefined;
+ }
+}
+
+class Command extends EventEmitter {
+ /**
+ * Initialize a new `Command`.
+ *
+ * @param {string} [name]
+ * @api public
+ */
+
+ constructor(name) {
+ super();
+ this.commands = [];
+ this.options = [];
+ this.parent = null;
+ this._allowUnknownOption = false;
+ this._args = [];
+ this.rawArgs = null;
+ this._scriptPath = null;
+ this._name = name || '';
+ this._optionValues = {};
+ this._storeOptionsAsProperties = true; // backwards compatible by default
+ this._passCommandToAction = true; // backwards compatible by default
+ this._actionResults = [];
+ this._actionHandler = null;
+ this._executableHandler = false;
+ this._executableFile = null; // custom name for executable
+ this._defaultCommandName = null;
+ this._exitCallback = null;
+ this._aliases = [];
+
+ this._hidden = false;
+ this._helpFlags = '-h, --help';
+ this._helpDescription = 'display help for command';
+ this._helpShortFlag = '-h';
+ this._helpLongFlag = '--help';
+ this._hasImplicitHelpCommand = undefined; // Deliberately undefined, not decided whether true or false
+ this._helpCommandName = 'help';
+ this._helpCommandnameAndArgs = 'help [command]';
+ this._helpCommandDescription = 'display help for command';
+ }
+
+ /**
+ * Define a command.
+ *
+ * There are two styles of command: pay attention to where to put the description.
+ *
+ * Examples:
+ *
+ * // Command implemented using action handler (description is supplied separately to `.command`)
+ * program
+ * .command('clone <source> [destination]')
+ * .description('clone a repository into a newly created directory')
+ * .action((source, destination) => {
+ * console.log('clone command called');
+ * });
+ *
+ * // Command implemented using separate executable file (description is second parameter to `.command`)
+ * program
+ * .command('start <service>', 'start named service')
+ * .command('stop [service]', 'stop named service, or all if no name supplied');
+ *
+ * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
+ * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)
+ * @param {Object} [execOpts] - configuration options (for executable)
+ * @return {Command} returns new command for action handler, or `this` for executable command
+ * @api public
+ */
+
+ command(nameAndArgs, actionOptsOrExecDesc, execOpts) {
+ let desc = actionOptsOrExecDesc;
+ let opts = execOpts;
+ if (typeof desc === 'object' && desc !== null) {
+ opts = desc;
+ desc = null;
+ }
+ opts = opts || {};
+ const args = nameAndArgs.split(/ +/);
+ const cmd = this.createCommand(args.shift());
+
+ if (desc) {
+ cmd.description(desc);
+ cmd._executableHandler = true;
+ }
+ if (opts.isDefault) this._defaultCommandName = cmd._name;
+
+ cmd._hidden = !!(opts.noHelp || opts.hidden);
+ cmd._helpFlags = this._helpFlags;
+ cmd._helpDescription = this._helpDescription;
+ cmd._helpShortFlag = this._helpShortFlag;
+ cmd._helpLongFlag = this._helpLongFlag;
+ cmd._helpCommandName = this._helpCommandName;
+ cmd._helpCommandnameAndArgs = this._helpCommandnameAndArgs;
+ cmd._helpCommandDescription = this._helpCommandDescription;
+ cmd._exitCallback = this._exitCallback;
+ cmd._storeOptionsAsProperties = this._storeOptionsAsProperties;
+ cmd._passCommandToAction = this._passCommandToAction;
+
+ cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor
+ this.commands.push(cmd);
+ cmd._parseExpectedArgs(args);
+ cmd.parent = this;
+
+ if (desc) return this;
+ return cmd;
+ };
+
+ /**
+ * Factory routine to create a new unattached command.
+ *
+ * See .command() for creating an attached subcommand, which uses this routine to
+ * create the command. You can override createCommand to customise subcommands.
+ *
+ * @param {string} [name]
+ * @return {Command} new command
+ * @api public
+ */
+
+ createCommand(name) {
+ return new Command(name);
+ };
+
+ /**
+ * Add a prepared subcommand.
+ *
+ * See .command() for creating an attached subcommand which inherits settings from its parent.
+ *
+ * @param {Command} cmd - new subcommand
+ * @param {Object} [opts] - configuration options
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ addCommand(cmd, opts) {
+ if (!cmd._name) throw new Error('Command passed to .addCommand() must have a name');
+
+ // To keep things simple, block automatic name generation for deeply nested executables.
+ // Fail fast and detect when adding rather than later when parsing.
+ function checkExplicitNames(commandArray) {
+ commandArray.forEach((cmd) => {
+ if (cmd._executableHandler && !cmd._executableFile) {
+ throw new Error(`Must specify executableFile for deeply nested executable: ${cmd.name()}`);
+ }
+ checkExplicitNames(cmd.commands);
+ });
+ }
+ checkExplicitNames(cmd.commands);
+
+ opts = opts || {};
+ if (opts.isDefault) this._defaultCommandName = cmd._name;
+ if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation
+
+ this.commands.push(cmd);
+ cmd.parent = this;
+ return this;
+ };
+
+ /**
+ * Define argument syntax for the command.
+ *
+ * @api public
+ */
+
+ arguments(desc) {
+ return this._parseExpectedArgs(desc.split(/ +/));
+ };
+
+ /**
+ * Override default decision whether to add implicit help command.
+ *
+ * addHelpCommand() // force on
+ * addHelpCommand(false); // force off
+ * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom detais
+ *
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ addHelpCommand(enableOrNameAndArgs, description) {
+ if (enableOrNameAndArgs === false) {
+ this._hasImplicitHelpCommand = false;
+ } else {
+ this._hasImplicitHelpCommand = true;
+ if (typeof enableOrNameAndArgs === 'string') {
+ this._helpCommandName = enableOrNameAndArgs.split(' ')[0];
+ this._helpCommandnameAndArgs = enableOrNameAndArgs;
+ }
+ this._helpCommandDescription = description || this._helpCommandDescription;
+ }
+ return this;
+ };
+
+ /**
+ * @return {boolean}
+ * @api private
+ */
+
+ _lazyHasImplicitHelpCommand() {
+ if (this._hasImplicitHelpCommand === undefined) {
+ this._hasImplicitHelpCommand = this.commands.length && !this._actionHandler && !this._findCommand('help');
+ }
+ return this._hasImplicitHelpCommand;
+ };
+
+ /**
+ * Parse expected `args`.
+ *
+ * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
+ *
+ * @param {Array} args
+ * @return {Command} `this` command for chaining
+ * @api private
+ */
+
+ _parseExpectedArgs(args) {
+ if (!args.length) return;
+ args.forEach((arg) => {
+ const argDetails = {
+ required: false,
+ name: '',
+ variadic: false
+ };
+
+ switch (arg[0]) {
+ case '<':
+ argDetails.required = true;
+ argDetails.name = arg.slice(1, -1);
+ break;
+ case '[':
+ argDetails.name = arg.slice(1, -1);
+ break;
+ }
+
+ if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') {
+ argDetails.variadic = true;
+ argDetails.name = argDetails.name.slice(0, -3);
+ }
+ if (argDetails.name) {
+ this._args.push(argDetails);
+ }
+ });
+ this._args.forEach((arg, i) => {
+ if (arg.variadic && i < this._args.length - 1) {
+ throw new Error(`only the last argument can be variadic '${arg.name}'`);
+ }
+ });
+ return this;
+ };
+
+ /**
+ * Register callback to use as replacement for calling process.exit.
+ *
+ * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ exitOverride(fn) {
+ if (fn) {
+ this._exitCallback = fn;
+ } else {
+ this._exitCallback = (err) => {
+ if (err.code !== 'commander.executeSubCommandAsync') {
+ throw err;
+ } else {
+ // Async callback from spawn events, not useful to throw.
+ }
+ };
+ }
+ return this;
+ };
+
+ /**
+ * Call process.exit, and _exitCallback if defined.
+ *
+ * @param {number} exitCode exit code for using with process.exit
+ * @param {string} code an id string representing the error
+ * @param {string} message human-readable description of the error
+ * @return never
+ * @api private
+ */
+
+ _exit(exitCode, code, message) {
+ if (this._exitCallback) {
+ this._exitCallback(new CommanderError(exitCode, code, message));
+ // Expecting this line is not reached.
+ }
+ process.exit(exitCode);
+ };
+
+ /**
+ * Register callback `fn` for the command.
+ *
+ * Examples:
+ *
+ * program
+ * .command('help')
+ * .description('display verbose help')
+ * .action(function() {
+ * // output help here
+ * });
+ *
+ * @param {Function} fn
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ action(fn) {
+ const listener = (args) => {
+ // The .action callback takes an extra parameter which is the command or options.
+ const expectedArgsCount = this._args.length;
+ const actionArgs = args.slice(0, expectedArgsCount);
+ if (this._passCommandToAction) {
+ actionArgs[expectedArgsCount] = this;
+ } else {
+ actionArgs[expectedArgsCount] = this.opts();
+ }
+ // Add the extra arguments so available too.
+ if (args.length > expectedArgsCount) {
+ actionArgs.push(args.slice(expectedArgsCount));
+ }
+
+ const actionResult = fn.apply(this, actionArgs);
+ // Remember result in case it is async. Assume parseAsync getting called on root.
+ let rootCommand = this;
+ while (rootCommand.parent) {
+ rootCommand = rootCommand.parent;
+ }
+ rootCommand._actionResults.push(actionResult);
+ };
+ this._actionHandler = listener;
+ return this;
+ };
+
+ /**
+ * Internal implementation shared by .option() and .requiredOption()
+ *
+ * @param {Object} config
+ * @param {string} flags
+ * @param {string} description
+ * @param {Function|*} [fn] - custom option processing function or default vaue
+ * @param {*} [defaultValue]
+ * @return {Command} `this` command for chaining
+ * @api private
+ */
+
+ _optionEx(config, flags, description, fn, defaultValue) {
+ const option = new Option(flags, description);
+ const oname = option.name();
+ const name = option.attributeName();
+ option.mandatory = !!config.mandatory;
+
+ // default as 3rd arg
+ if (typeof fn !== 'function') {
+ if (fn instanceof RegExp) {
+ // This is a bit simplistic (especially no error messages), and probably better handled by caller using custom option processing.
+ // No longer documented in README, but still present for backwards compatibility.
+ const regex = fn;
+ fn = (val, def) => {
+ const m = regex.exec(val);
+ return m ? m[0] : def;
+ };
+ } else {
+ defaultValue = fn;
+ fn = null;
+ }
+ }
+
+ // preassign default value for --no-*, [optional], <required>, or plain flag if boolean value
+ if (option.negate || option.optional || option.required || typeof defaultValue === 'boolean') {
+ // when --no-foo we make sure default is true, unless a --foo option is already defined
+ if (option.negate) {
+ const positiveLongFlag = option.long.replace(/^--no-/, '--');
+ defaultValue = this._findOption(positiveLongFlag) ? this._getOptionValue(name) : true;
+ }
+ // preassign only if we have a default
+ if (defaultValue !== undefined) {
+ this._setOptionValue(name, defaultValue);
+ option.defaultValue = defaultValue;
+ }
+ }
+
+ // register the option
+ this.options.push(option);
+
+ // when it's passed assign the value
+ // and conditionally invoke the callback
+ this.on('option:' + oname, (val) => {
+ // coercion
+ if (val !== null && fn) {
+ val = fn(val, this._getOptionValue(name) === undefined ? defaultValue : this._getOptionValue(name));
+ }
+
+ // unassigned or boolean value
+ if (typeof this._getOptionValue(name) === 'boolean' || typeof this._getOptionValue(name) === 'undefined') {
+ // if no value, negate false, and we have a default, then use it!
+ if (val == null) {
+ this._setOptionValue(name, option.negate
+ ? false
+ : defaultValue || true);
+ } else {
+ this._setOptionValue(name, val);
+ }
+ } else if (val !== null) {
+ // reassign
+ this._setOptionValue(name, option.negate ? false : val);
+ }
+ });
+
+ return this;
+ };
+
+ /**
+ * Define option with `flags`, `description` and optional
+ * coercion `fn`.
+ *
+ * The `flags` string should contain both the short and long flags,
+ * separated by comma, a pipe or space. The following are all valid
+ * all will output this way when `--help` is used.
+ *
+ * "-p, --pepper"
+ * "-p|--pepper"
+ * "-p --pepper"
+ *
+ * Examples:
+ *
+ * // simple boolean defaulting to undefined
+ * program.option('-p, --pepper', 'add pepper');
+ *
+ * program.pepper
+ * // => undefined
+ *
+ * --pepper
+ * program.pepper
+ * // => true
+ *
+ * // simple boolean defaulting to true (unless non-negated option is also defined)
+ * program.option('-C, --no-cheese', 'remove cheese');
+ *
+ * program.cheese
+ * // => true
+ *
+ * --no-cheese
+ * program.cheese
+ * // => false
+ *
+ * // required argument
+ * program.option('-C, --chdir <path>', 'change the working directory');
+ *
+ * --chdir /tmp
+ * program.chdir
+ * // => "/tmp"
+ *
+ * // optional argument
+ * program.option('-c, --cheese [type]', 'add cheese [marble]');
+ *
+ * @param {string} flags
+ * @param {string} description
+ * @param {Function|*} [fn] - custom option processing function or default vaue
+ * @param {*} [defaultValue]
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ option(flags, description, fn, defaultValue) {
+ return this._optionEx({}, flags, description, fn, defaultValue);
+ };
+
+ /*
+ * Add a required option which must have a value after parsing. This usually means
+ * the option must be specified on the command line. (Otherwise the same as .option().)
+ *
+ * The `flags` string should contain both the short and long flags, separated by comma, a pipe or space.
+ *
+ * @param {string} flags
+ * @param {string} description
+ * @param {Function|*} [fn] - custom option processing function or default vaue
+ * @param {*} [defaultValue]
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ requiredOption(flags, description, fn, defaultValue) {
+ return this._optionEx({ mandatory: true }, flags, description, fn, defaultValue);
+ };
+
+ /**
+ * Allow unknown options on the command line.
+ *
+ * @param {Boolean} [arg] - if `true` or omitted, no error will be thrown
+ * for unknown options.
+ * @api public
+ */
+ allowUnknownOption(arg) {
+ this._allowUnknownOption = (arg === undefined) || arg;
+ return this;
+ };
+
+ /**
+ * Whether to store option values as properties on command object,
+ * or store separately (specify false). In both cases the option values can be accessed using .opts().
+ *
+ * @param {boolean} value
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ storeOptionsAsProperties(value) {
+ this._storeOptionsAsProperties = (value === undefined) || value;
+ if (this.options.length) {
+ throw new Error('call .storeOptionsAsProperties() before adding options');
+ }
+ return this;
+ };
+
+ /**
+ * Whether to pass command to action handler,
+ * or just the options (specify false).
+ *
+ * @param {boolean} value
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ passCommandToAction(value) {
+ this._passCommandToAction = (value === undefined) || value;
+ return this;
+ };
+
+ /**
+ * Store option value
+ *
+ * @param {string} key
+ * @param {Object} value
+ * @api private
+ */
+
+ _setOptionValue(key, value) {
+ if (this._storeOptionsAsProperties) {
+ this[key] = value;
+ } else {
+ this._optionValues[key] = value;
+ }
+ };
+
+ /**
+ * Retrieve option value
+ *
+ * @param {string} key
+ * @return {Object} value
+ * @api private
+ */
+
+ _getOptionValue(key) {
+ if (this._storeOptionsAsProperties) {
+ return this[key];
+ }
+ return this._optionValues[key];
+ };
+
+ /**
+ * Parse `argv`, setting options and invoking commands when defined.
+ *
+ * The default expectation is that the arguments are from node and have the application as argv[0]
+ * and the script being run in argv[1], with user parameters after that.
+ *
+ * Examples:
+ *
+ * program.parse(process.argv);
+ * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions
+ * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
+ *
+ * @param {string[]} [argv] - optional, defaults to process.argv
+ * @param {Object} [parseOptions] - optionally specify style of options with from: node/user/electron
+ * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ parse(argv, parseOptions) {
+ if (argv !== undefined && !Array.isArray(argv)) {
+ throw new Error('first parameter to parse must be array or undefined');
+ }
+ parseOptions = parseOptions || {};
+
+ // Default to using process.argv
+ if (argv === undefined) {
+ argv = process.argv;
+ // @ts-ignore
+ if (process.versions && process.versions.electron) {
+ parseOptions.from = 'electron';
+ }
+ }
+ this.rawArgs = argv.slice();
+
+ // make it a little easier for callers by supporting various argv conventions
+ let userArgs;
+ switch (parseOptions.from) {
+ case undefined:
+ case 'node':
+ this._scriptPath = argv[1];
+ userArgs = argv.slice(2);
+ break;
+ case 'electron':
+ // @ts-ignore
+ if (process.defaultApp) {
+ this._scriptPath = argv[1];
+ userArgs = argv.slice(2);
+ } else {
+ userArgs = argv.slice(1);
+ }
+ break;
+ case 'user':
+ userArgs = argv.slice(0);
+ break;
+ default:
+ throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);
+ }
+ if (!this._scriptPath && process.mainModule) {
+ this._scriptPath = process.mainModule.filename;
+ }
+
+ // Guess name, used in usage in help.
+ this._name = this._name || (this._scriptPath && path.basename(this._scriptPath, path.extname(this._scriptPath)));
+
+ // Let's go!
+ this._parseCommand([], userArgs);
+
+ return this;
+ };
+
+ /**
+ * Parse `argv`, setting options and invoking commands when defined.
+ *
+ * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.
+ *
+ * The default expectation is that the arguments are from node and have the application as argv[0]
+ * and the script being run in argv[1], with user parameters after that.
+ *
+ * Examples:
+ *
+ * program.parseAsync(process.argv);
+ * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions
+ * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
+ *
+ * @param {string[]} [argv]
+ * @param {Object} [parseOptions]
+ * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'
+ * @return {Promise}
+ * @api public
+ */
+
+ parseAsync(argv, parseOptions) {
+ this.parse(argv, parseOptions);
+ return Promise.all(this._actionResults).then(() => this);
+ };
+
+ /**
+ * Execute a sub-command executable.
+ *
+ * @api private
+ */
+
+ _executeSubCommand(subcommand, args) {
+ args = args.slice();
+ let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.
+ const sourceExt = ['.js', '.ts', '.mjs'];
+
+ // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.
+ this._checkForMissingMandatoryOptions();
+
+ // Want the entry script as the reference for command name and directory for searching for other files.
+ const scriptPath = this._scriptPath;
+
+ let baseDir;
+ try {
+ const resolvedLink = fs.realpathSync(scriptPath);
+ baseDir = path.dirname(resolvedLink);
+ } catch (e) {
+ baseDir = '.'; // dummy, probably not going to find executable!
+ }
+
+ // name of the subcommand, like `pm-install`
+ let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name;
+ if (subcommand._executableFile) {
+ bin = subcommand._executableFile;
+ }
+
+ const localBin = path.join(baseDir, bin);
+ if (fs.existsSync(localBin)) {
+ // prefer local `./<bin>` to bin in the $PATH
+ bin = localBin;
+ } else {
+ // Look for source files.
+ sourceExt.forEach((ext) => {
+ if (fs.existsSync(`${localBin}${ext}`)) {
+ bin = `${localBin}${ext}`;
+ }
+ });
+ }
+ launchWithNode = sourceExt.includes(path.extname(bin));
+
+ let proc;
+ if (process.platform !== 'win32') {
+ if (launchWithNode) {
+ args.unshift(bin);
+ // add executable arguments to spawn
+ args = incrementNodeInspectorPort(process.execArgv).concat(args);
+
+ proc = spawn(process.argv[0], args, { stdio: 'inherit' });
+ } else {
+ proc = spawn(bin, args, { stdio: 'inherit' });
+ }
+ } else {
+ args.unshift(bin);
+ // add executable arguments to spawn
+ args = incrementNodeInspectorPort(process.execArgv).concat(args);
+ proc = spawn(process.execPath, args, { stdio: 'inherit' });
+ }
+
+ const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];
+ signals.forEach((signal) => {
+ // @ts-ignore
+ process.on(signal, () => {
+ if (proc.killed === false && proc.exitCode === null) {
+ proc.kill(signal);
+ }
+ });
+ });
+
+ // By default terminate process when spawned process terminates.
+ // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!
+ const exitCallback = this._exitCallback;
+ if (!exitCallback) {
+ proc.on('close', process.exit.bind(process));
+ } else {
+ proc.on('close', () => {
+ exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));
+ });
+ }
+ proc.on('error', (err) => {
+ // @ts-ignore
+ if (err.code === 'ENOENT') {
+ const executableMissing = `'${bin}' does not exist
+ - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name`;
+ throw new Error(executableMissing);
+ // @ts-ignore
+ } else if (err.code === 'EACCES') {
+ throw new Error(`'${bin}' not executable`);
+ }
+ if (!exitCallback) {
+ process.exit(1);
+ } else {
+ const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');
+ wrappedError.nestedError = err;
+ exitCallback(wrappedError);
+ }
+ });
+
+ // Store the reference to the child process
+ this.runningCommand = proc;
+ };
+
+ /**
+ * @api private
+ */
+ _dispatchSubcommand(commandName, operands, unknown) {
+ const subCommand = this._findCommand(commandName);
+ if (!subCommand) this._helpAndError();
+
+ if (subCommand._executableHandler) {
+ this._executeSubCommand(subCommand, operands.concat(unknown));
+ } else {
+ subCommand._parseCommand(operands, unknown);
+ }
+ };
+
+ /**
+ * Process arguments in context of this command.
+ *
+ * @api private
+ */
+
+ _parseCommand(operands, unknown) {
+ const parsed = this.parseOptions(unknown);
+ operands = operands.concat(parsed.operands);
+ unknown = parsed.unknown;
+ this.args = operands.concat(unknown);
+
+ if (operands && this._findCommand(operands[0])) {
+ this._dispatchSubcommand(operands[0], operands.slice(1), unknown);
+ } else if (this._lazyHasImplicitHelpCommand() && operands[0] === this._helpCommandName) {
+ if (operands.length === 1) {
+ this.help();
+ } else {
+ this._dispatchSubcommand(operands[1], [], [this._helpLongFlag]);
+ }
+ } else if (this._defaultCommandName) {
+ outputHelpIfRequested(this, unknown); // Run the help for default command from parent rather than passing to default command
+ this._dispatchSubcommand(this._defaultCommandName, operands, unknown);
+ } else {
+ if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
+ // probaby missing subcommand and no handler, user needs help
+ this._helpAndError();
+ }
+
+ outputHelpIfRequested(this, parsed.unknown);
+ this._checkForMissingMandatoryOptions();
+ if (parsed.unknown.length > 0) {
+ this.unknownOption(parsed.unknown[0]);
+ }
+
+ if (this._actionHandler) {
+ const args = this.args.slice();
+ this._args.forEach((arg, i) => {
+ if (arg.required && args[i] == null) {
+ this.missingArgument(arg.name);
+ } else if (arg.variadic) {
+ args[i] = args.splice(i);
+ }
+ });
+
+ this._actionHandler(args);
+ this.emit('command:' + this.name(), operands, unknown);
+ } else if (operands.length) {
+ if (this._findCommand('*')) {
+ this._dispatchSubcommand('*', operands, unknown);
+ } else if (this.listenerCount('command:*')) {
+ this.emit('command:*', operands, unknown);
+ } else if (this.commands.length) {
+ this.unknownCommand();
+ }
+ } else if (this.commands.length) {
+ // This command has subcommands and nothing hooked up at this level, so display help.
+ this._helpAndError();
+ } else {
+ // fall through for caller to handle after calling .parse()
+ }
+ }
+ };
+
+ /**
+ * Find matching command.
+ *
+ * @api private
+ */
+ _findCommand(name) {
+ if (!name) return undefined;
+ return this.commands.find(cmd => cmd._name === name || cmd._aliases.includes(name));
+ };
+
+ /**
+ * Return an option matching `arg` if any.
+ *
+ * @param {string} arg
+ * @return {Option}
+ * @api private
+ */
+
+ _findOption(arg) {
+ return this.options.find(option => option.is(arg));
+ };
+
+ /**
+ * Display an error message if a mandatory option does not have a value.
+ * Lazy calling after checking for help flags from leaf subcommand.
+ *
+ * @api private
+ */
+
+ _checkForMissingMandatoryOptions() {
+ // Walk up hierarchy so can call in subcommand after checking for displaying help.
+ for (let cmd = this; cmd; cmd = cmd.parent) {
+ cmd.options.forEach((anOption) => {
+ if (anOption.mandatory && (cmd._getOptionValue(anOption.attributeName()) === undefined)) {
+ cmd.missingMandatoryOptionValue(anOption);
+ }
+ });
+ }
+ };
+
+ /**
+ * Parse options from `argv` removing known options,
+ * and return argv split into operands and unknown arguments.
+ *
+ * Examples:
+ *
+ * argv => operands, unknown
+ * --known kkk op => [op], []
+ * op --known kkk => [op], []
+ * sub --unknown uuu op => [sub], [--unknown uuu op]
+ * sub -- --unknown uuu op => [sub --unknown uuu op], []
+ *
+ * @param {String[]} argv
+ * @return {{operands: String[], unknown: String[]}}
+ * @api public
+ */
+
+ parseOptions(argv) {
+ const operands = []; // operands, not options or values
+ const unknown = []; // first unknown option and remaining unknown args
+ let dest = operands;
+ const args = argv.slice();
+
+ function maybeOption(arg) {
+ return arg.length > 1 && arg[0] === '-';
+ }
+
+ // parse options
+ while (args.length) {
+ const arg = args.shift();
+
+ // literal
+ if (arg === '--') {
+ if (dest === unknown) dest.push(arg);
+ dest.push(...args);
+ break;
+ }
+
+ if (maybeOption(arg)) {
+ const option = this._findOption(arg);
+ // recognised option, call listener to assign value with possible custom processing
+ if (option) {
+ if (option.required) {
+ const value = args.shift();
+ if (value === undefined) this.optionMissingArgument(option);
+ this.emit(`option:${option.name()}`, value);
+ } else if (option.optional) {
+ let value = null;
+ // historical behaviour is optional value is following arg unless an option
+ if (args.length > 0 && !maybeOption(args[0])) {
+ value = args.shift();
+ }
+ this.emit(`option:${option.name()}`, value);
+ } else { // boolean flag
+ this.emit(`option:${option.name()}`);
+ }
+ continue;
+ }
+ }
+
+ // Look for combo options following single dash, eat first one if known.
+ if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {
+ const option = this._findOption(`-${arg[1]}`);
+ if (option) {
+ if (option.required || option.optional) {
+ // option with value following in same argument
+ this.emit(`option:${option.name()}`, arg.slice(2));
+ } else {
+ // boolean option, emit and put back remainder of arg for further processing
+ this.emit(`option:${option.name()}`);
+ args.unshift(`-${arg.slice(2)}`);
+ }
+ continue;
+ }
+ }
+
+ // Look for known long flag with value, like --foo=bar
+ if (/^--[^=]+=/.test(arg)) {
+ const index = arg.indexOf('=');
+ const option = this._findOption(arg.slice(0, index));
+ if (option && (option.required || option.optional)) {
+ this.emit(`option:${option.name()}`, arg.slice(index + 1));
+ continue;
+ }
+ }
+
+ // looks like an option but unknown, unknowns from here
+ if (arg.length > 1 && arg[0] === '-') {
+ dest = unknown;
+ }
+
+ // add arg
+ dest.push(arg);
+ }
+
+ return { operands, unknown };
+ };
+
+ /**
+ * Return an object containing options as key-value pairs
+ *
+ * @return {Object}
+ * @api public
+ */
+ opts() {
+ if (this._storeOptionsAsProperties) {
+ // Preserve original behaviour so backwards compatible when still using properties
+ const result = {};
+ const len = this.options.length;
+
+ for (let i = 0; i < len; i++) {
+ const key = this.options[i].attributeName();
+ result[key] = key === this._versionOptionName ? this._version : this[key];
+ }
+ return result;
+ }
+
+ return this._optionValues;
+ };
+
+ /**
+ * Argument `name` is missing.
+ *
+ * @param {string} name
+ * @api private
+ */
+
+ missingArgument(name) {
+ const message = `error: missing required argument '${name}'`;
+ console.error(message);
+ this._exit(1, 'commander.missingArgument', message);
+ };
+
+ /**
+ * `Option` is missing an argument, but received `flag` or nothing.
+ *
+ * @param {Option} option
+ * @param {string} [flag]
+ * @api private
+ */
+
+ optionMissingArgument(option, flag) {
+ let message;
+ if (flag) {
+ message = `error: option '${option.flags}' argument missing, got '${flag}'`;
+ } else {
+ message = `error: option '${option.flags}' argument missing`;
+ }
+ console.error(message);
+ this._exit(1, 'commander.optionMissingArgument', message);
+ };
+
+ /**
+ * `Option` does not have a value, and is a mandatory option.
+ *
+ * @param {Option} option
+ * @api private
+ */
+
+ missingMandatoryOptionValue(option) {
+ const message = `error: required option '${option.flags}' not specified`;
+ console.error(message);
+ this._exit(1, 'commander.missingMandatoryOptionValue', message);
+ };
+
+ /**
+ * Unknown option `flag`.
+ *
+ * @param {string} flag
+ * @api private
+ */
+
+ unknownOption(flag) {
+ if (this._allowUnknownOption) return;
+ const message = `error: unknown option '${flag}'`;
+ console.error(message);
+ this._exit(1, 'commander.unknownOption', message);
+ };
+
+ /**
+ * Unknown command.
+ *
+ * @api private
+ */
+
+ unknownCommand() {
+ const partCommands = [this.name()];
+ for (let parentCmd = this.parent; parentCmd; parentCmd = parentCmd.parent) {
+ partCommands.unshift(parentCmd.name());
+ }
+ const fullCommand = partCommands.join(' ');
+ const message = `error: unknown command '${this.args[0]}'. See '${fullCommand} ${this._helpLongFlag}'.`;
+ console.error(message);
+ this._exit(1, 'commander.unknownCommand', message);
+ };
+
+ /**
+ * Set the program version to `str`.
+ *
+ * This method auto-registers the "-V, --version" flag
+ * which will print the version number when passed.
+ *
+ * You can optionally supply the flags and description to override the defaults.
+ *
+ * @param {string} str
+ * @param {string} [flags]
+ * @param {string} [description]
+ * @return {this | string} `this` command for chaining, or version string if no arguments
+ * @api public
+ */
+
+ version(str, flags, description) {
+ if (str === undefined) return this._version;
+ this._version = str;
+ flags = flags || '-V, --version';
+ description = description || 'output the version number';
+ const versionOption = new Option(flags, description);
+ this._versionOptionName = versionOption.long.substr(2) || 'version';
+ this.options.push(versionOption);
+ this.on('option:' + this._versionOptionName, () => {
+ process.stdout.write(str + '\n');
+ this._exit(0, 'commander.version', str);
+ });
+ return this;
+ };
+
+ /**
+ * Set the description to `str`.
+ *
+ * @param {string} str
+ * @param {Object} [argsDescription]
+ * @return {string|Command}
+ * @api public
+ */
+
+ description(str, argsDescription) {
+ if (str === undefined && argsDescription === undefined) return this._description;
+ this._description = str;
+ this._argsDescription = argsDescription;
+ return this;
+ };
+
+ /**
+ * Set an alias for the command.
+ *
+ * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
+ *
+ * @param {string} [alias]
+ * @return {string|Command}
+ * @api public
+ */
+
+ alias(alias) {
+ if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility
+
+ let command = this;
+ if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
+ // assume adding alias for last added executable subcommand, rather than this
+ command = this.commands[this.commands.length - 1];
+ }
+
+ if (alias === command._name) throw new Error('Command alias can\'t be the same as its name');
+
+ command._aliases.push(alias);
+ return this;
+ };
+
+ /**
+ * Set aliases for the command.
+ *
+ * Only the first alias is shown in the auto-generated help.
+ *
+ * @param {string[]} [aliases]
+ * @return {string[]|Command}
+ * @api public
+ */
+
+ aliases(aliases) {
+ // Getter for the array of aliases is the main reason for having aliases() in addition to alias().
+ if (aliases === undefined) return this._aliases;
+
+ aliases.forEach((alias) => this.alias(alias));
+ return this;
+ };
+
+ /**
+ * Set / get the command usage `str`.
+ *
+ * @param {string} [str]
+ * @return {String|Command}
+ * @api public
+ */
+
+ usage(str) {
+ if (str === undefined) {
+ if (this._usage) return this._usage;
+
+ const args = this._args.map((arg) => {
+ return humanReadableArgName(arg);
+ });
+ return '[options]' +
+ (this.commands.length ? ' [command]' : '') +
+ (this._args.length ? ' ' + args.join(' ') : '');
+ }
+
+ this._usage = str;
+ return this;
+ };
+
+ /**
+ * Get or set the name of the command
+ *
+ * @param {string} [str]
+ * @return {String|Command}
+ * @api public
+ */
+
+ name(str) {
+ if (str === undefined) return this._name;
+ this._name = str;
+ return this;
+ };
+
+ /**
+ * Return prepared commands.
+ *
+ * @return {Array}
+ * @api private
+ */
+
+ prepareCommands() {
+ const commandDetails = this.commands.filter((cmd) => {
+ return !cmd._hidden;
+ }).map((cmd) => {
+ const args = cmd._args.map((arg) => {
+ return humanReadableArgName(arg);
+ }).join(' ');
+
+ return [
+ cmd._name +
+ (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +
+ (cmd.options.length ? ' [options]' : '') +
+ (args ? ' ' + args : ''),
+ cmd._description
+ ];
+ });
+
+ if (this._lazyHasImplicitHelpCommand()) {
+ commandDetails.push([this._helpCommandnameAndArgs, this._helpCommandDescription]);
+ }
+ return commandDetails;
+ };
+
+ /**
+ * Return the largest command length.
+ *
+ * @return {number}
+ * @api private
+ */
+
+ largestCommandLength() {
+ const commands = this.prepareCommands();
+ return commands.reduce((max, command) => {
+ return Math.max(max, command[0].length);
+ }, 0);
+ };
+
+ /**
+ * Return the largest option length.
+ *
+ * @return {number}
+ * @api private
+ */
+
+ largestOptionLength() {
+ const options = [].slice.call(this.options);
+ options.push({
+ flags: this._helpFlags
+ });
+
+ return options.reduce((max, option) => {
+ return Math.max(max, option.flags.length);
+ }, 0);
+ };
+
+ /**
+ * Return the largest arg length.
+ *
+ * @return {number}
+ * @api private
+ */
+
+ largestArgLength() {
+ return this._args.reduce((max, arg) => {
+ return Math.max(max, arg.name.length);
+ }, 0);
+ };
+
+ /**
+ * Return the pad width.
+ *
+ * @return {number}
+ * @api private
+ */
+
+ padWidth() {
+ let width = this.largestOptionLength();
+ if (this._argsDescription && this._args.length) {
+ if (this.largestArgLength() > width) {
+ width = this.largestArgLength();
+ }
+ }
+
+ if (this.commands && this.commands.length) {
+ if (this.largestCommandLength() > width) {
+ width = this.largestCommandLength();
+ }
+ }
+
+ return width;
+ };
+
+ /**
+ * Return help for options.
+ *
+ * @return {string}
+ * @api private
+ */
+
+ optionHelp() {
+ const width = this.padWidth();
+ const columns = process.stdout.columns || 80;
+ const descriptionWidth = columns - width - 4;
+ function padOptionDetails(flags, description) {
+ return pad(flags, width) + ' ' + optionalWrap(description, descriptionWidth, width + 2);
+ };
+
+ // Explicit options (including version)
+ const help = this.options.map((option) => {
+ const fullDesc = option.description +
+ ((!option.negate && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : '');
+ return padOptionDetails(option.flags, fullDesc);
+ });
+
+ // Implicit help
+ const showShortHelpFlag = this._helpShortFlag && !this._findOption(this._helpShortFlag);
+ const showLongHelpFlag = !this._findOption(this._helpLongFlag);
+ if (showShortHelpFlag || showLongHelpFlag) {
+ let helpFlags = this._helpFlags;
+ if (!showShortHelpFlag) {
+ helpFlags = this._helpLongFlag;
+ } else if (!showLongHelpFlag) {
+ helpFlags = this._helpShortFlag;
+ }
+ help.push(padOptionDetails(helpFlags, this._helpDescription));
+ }
+
+ return help.join('\n');
+ };
+
+ /**
+ * Return command help documentation.
+ *
+ * @return {string}
+ * @api private
+ */
+
+ commandHelp() {
+ if (!this.commands.length && !this._lazyHasImplicitHelpCommand()) return '';
+
+ const commands = this.prepareCommands();
+ const width = this.padWidth();
+
+ const columns = process.stdout.columns || 80;
+ const descriptionWidth = columns - width - 4;
+
+ return [
+ 'Commands:',
+ commands.map((cmd) => {
+ const desc = cmd[1] ? ' ' + cmd[1] : '';
+ return (desc ? pad(cmd[0], width) : cmd[0]) + optionalWrap(desc, descriptionWidth, width + 2);
+ }).join('\n').replace(/^/gm, ' '),
+ ''
+ ].join('\n');
+ };
+
+ /**
+ * Return program help documentation.
+ *
+ * @return {string}
+ * @api public
+ */
+
+ helpInformation() {
+ let desc = [];
+ if (this._description) {
+ desc = [
+ this._description,
+ ''
+ ];
+
+ const argsDescription = this._argsDescription;
+ if (argsDescription && this._args.length) {
+ const width = this.padWidth();
+ const columns = process.stdout.columns || 80;
+ const descriptionWidth = columns - width - 5;
+ desc.push('Arguments:');
+ desc.push('');
+ this._args.forEach((arg) => {
+ desc.push(' ' + pad(arg.name, width) + ' ' + wrap(argsDescription[arg.name], descriptionWidth, width + 4));
+ });
+ desc.push('');
+ }
+ }
+
+ let cmdName = this._name;
+ if (this._aliases[0]) {
+ cmdName = cmdName + '|' + this._aliases[0];
+ }
+ let parentCmdNames = '';
+ for (let parentCmd = this.parent; parentCmd; parentCmd = parentCmd.parent) {
+ parentCmdNames = parentCmd.name() + ' ' + parentCmdNames;
+ }
+ const usage = [
+ 'Usage: ' + parentCmdNames + cmdName + ' ' + this.usage(),
+ ''
+ ];
+
+ let cmds = [];
+ const commandHelp = this.commandHelp();
+ if (commandHelp) cmds = [commandHelp];
+
+ const options = [
+ 'Options:',
+ '' + this.optionHelp().replace(/^/gm, ' '),
+ ''
+ ];
+
+ return usage
+ .concat(desc)
+ .concat(options)
+ .concat(cmds)
+ .join('\n');
+ };
+
+ /**
+ * Output help information for this command.
+ *
+ * When listener(s) are available for the helpLongFlag
+ * those callbacks are invoked.
+ *
+ * @api public
+ */
+
+ outputHelp(cb) {
+ if (!cb) {
+ cb = (passthru) => {
+ return passthru;
+ };
+ }
+ const cbOutput = cb(this.helpInformation());
+ if (typeof cbOutput !== 'string' && !Buffer.isBuffer(cbOutput)) {
+ throw new Error('outputHelp callback must return a string or a Buffer');
+ }
+ process.stdout.write(cbOutput);
+ this.emit(this._helpLongFlag);
+ };
+
+ /**
+ * You can pass in flags and a description to override the help
+ * flags and help description for your command.
+ *
+ * @param {string} [flags]
+ * @param {string} [description]
+ * @return {Command} `this` command for chaining
+ * @api public
+ */
+
+ helpOption(flags, description) {
+ this._helpFlags = flags || this._helpFlags;
+ this._helpDescription = description || this._helpDescription;
+
+ const splitFlags = this._helpFlags.split(/[ ,|]+/);
+
+ this._helpShortFlag = undefined;
+ if (splitFlags.length > 1) this._helpShortFlag = splitFlags.shift();
+
+ this._helpLongFlag = splitFlags.shift();
+
+ return this;
+ };
+
+ /**
+ * Output help information and exit.
+ *
+ * @param {Function} [cb]
+ * @api public
+ */
+
+ help(cb) {
+ this.outputHelp(cb);
+ // exitCode: preserving original behaviour which was calling process.exit()
+ // message: do not have all displayed text available so only passing placeholder.
+ this._exit(process.exitCode || 0, 'commander.help', '(outputHelp)');
+ };
+
+ /**
+ * Output help information and exit. Display for error situations.
+ *
+ * @api private
+ */
+
+ _helpAndError() {
+ this.outputHelp();
+ // message: do not have all displayed text available so only passing placeholder.
+ this._exit(1, 'commander.help', '(outputHelp)');
+ };
+};
+
+/**
+ * Expose the root command.
+ */
+
+exports = module.exports = new Command();
+exports.program = exports; // More explicit access to global command.
+
+/**
+ * Expose classes
+ */
+
+exports.Command = Command;
+exports.Option = Option;
+exports.CommanderError = CommanderError;
+
+/**
+ * Camel-case the given `flag`
+ *
+ * @param {string} flag
+ * @return {string}
+ * @api private
+ */
+
+function camelcase(flag) {
+ return flag.split('-').reduce((str, word) => {
+ return str + word[0].toUpperCase() + word.slice(1);
+ });
+}
+
+/**
+ * Pad `str` to `width`.
+ *
+ * @param {string} str
+ * @param {number} width
+ * @return {string}
+ * @api private
+ */
+
+function pad(str, width) {
+ const len = Math.max(0, width - str.length);
+ return str + Array(len + 1).join(' ');
+}
+
+/**
+ * Wraps the given string with line breaks at the specified width while breaking
+ * words and indenting every but the first line on the left.
+ *
+ * @param {string} str
+ * @param {number} width
+ * @param {number} indent
+ * @return {string}
+ * @api private
+ */
+function wrap(str, width, indent) {
+ const regex = new RegExp('.{1,' + (width - 1) + '}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)', 'g');
+ const lines = str.match(regex) || [];
+ return lines.map((line, i) => {
+ if (line.slice(-1) === '\n') {
+ line = line.slice(0, line.length - 1);
+ }
+ return ((i > 0 && indent) ? Array(indent + 1).join(' ') : '') + line.trimRight();
+ }).join('\n');
+}
+
+/**
+ * Optionally wrap the given str to a max width of width characters per line
+ * while indenting with indent spaces. Do not wrap if insufficient width or
+ * string is manually formatted.
+ *
+ * @param {string} str
+ * @param {number} width
+ * @param {number} indent
+ * @return {string}
+ * @api private
+ */
+function optionalWrap(str, width, indent) {
+ // Detect manually wrapped and indented strings by searching for line breaks
+ // followed by multiple spaces/tabs.
+ if (str.match(/[\n]\s+/)) return str;
+ // Do not wrap to narrow columns (or can end up with a word per line).
+ const minWidth = 40;
+ if (width < minWidth) return str;
+
+ return wrap(str, width, indent);
+}
+
+/**
+ * Output help information if help flags specified
+ *
+ * @param {Command} cmd - command to output help for
+ * @param {Array} args - array of options to search for help flags
+ * @api private
+ */
+
+function outputHelpIfRequested(cmd, args) {
+ const helpOption = args.find(arg => arg === cmd._helpLongFlag || arg === cmd._helpShortFlag);
+ if (helpOption) {
+ cmd.outputHelp();
+ // (Do not have all displayed text available so only passing placeholder.)
+ cmd._exit(0, 'commander.helpDisplayed', '(outputHelp)');
+ }
+}
+
+/**
+ * Takes an argument and returns its human readable equivalent for help usage.
+ *
+ * @param {Object} arg
+ * @return {string}
+ * @api private
+ */
+
+function humanReadableArgName(arg) {
+ const nameOutput = arg.name + (arg.variadic === true ? '...' : '');
+
+ return arg.required
+ ? '<' + nameOutput + '>'
+ : '[' + nameOutput + ']';
+}
+
+/**
+ * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).
+ *
+ * @param {string[]} args - array of arguments from node.execArgv
+ * @returns {string[]}
+ * @api private
+ */
+
+function incrementNodeInspectorPort(args) {
+ // Testing for these options:
+ // --inspect[=[host:]port]
+ // --inspect-brk[=[host:]port]
+ // --inspect-port=[host:]port
+ return args.map((arg) => {
+ let result = arg;
+ if (arg.indexOf('--inspect') === 0) {
+ let debugOption;
+ let debugHost = '127.0.0.1';
+ let debugPort = '9229';
+ let match;
+ if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
+ // e.g. --inspect
+ debugOption = match[1];
+ } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
+ debugOption = match[1];
+ if (/^\d+$/.test(match[3])) {
+ // e.g. --inspect=1234
+ debugPort = match[3];
+ } else {
+ // e.g. --inspect=localhost
+ debugHost = match[3];
+ }
+ } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
+ // e.g. --inspect=localhost:1234
+ debugOption = match[1];
+ debugHost = match[3];
+ debugPort = match[4];
+ }
+
+ if (debugOption && debugPort !== '0') {
+ result = `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
+ }
+ }
+ return result;
+ });
+}
diff --git a/node_modules/commander/package.json b/node_modules/commander/package.json
new file mode 100644
index 0000000..325803e
--- /dev/null
+++ b/node_modules/commander/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "commander",
+ "version": "5.1.0",
+ "description": "the complete solution for node.js command-line programs",
+ "keywords": [
+ "commander",
+ "command",
+ "option",
+ "parser",
+ "cli",
+ "argument",
+ "args",
+ "argv"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/tj/commander.js.git"
+ },
+ "scripts": {
+ "lint": "eslint index.js \"tests/**/*.js\"",
+ "typescript-lint": "eslint typings/*.ts",
+ "test": "jest && npm run test-typings",
+ "test-typings": "tsc -p tsconfig.json"
+ },
+ "main": "index",
+ "files": [
+ "index.js",
+ "typings/index.d.ts"
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "@types/jest": "^25.2.1",
+ "@types/node": "^12.12.36",
+ "@typescript-eslint/eslint-plugin": "^2.29.0",
+ "eslint": "^6.8.0",
+ "eslint-config-standard-with-typescript": "^15.0.1",
+ "eslint-plugin-jest": "^23.8.2",
+ "jest": "^25.4.0",
+ "standard": "^14.3.3",
+ "typescript": "^3.7.5"
+ },
+ "typings": "typings/index.d.ts",
+ "engines": {
+ "node": ">= 6"
+ }
+}
diff --git a/node_modules/commander/typings/index.d.ts b/node_modules/commander/typings/index.d.ts
new file mode 100644
index 0000000..6f41bf3
--- /dev/null
+++ b/node_modules/commander/typings/index.d.ts
@@ -0,0 +1,386 @@
+// Type definitions for commander
+// Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne>
+
+declare namespace commander {
+
+ interface CommanderError extends Error {
+ code: string;
+ exitCode: number;
+ message: string;
+ nestedError?: string;
+ }
+ type CommanderErrorConstructor = new (exitCode: number, code: string, message: string) => CommanderError;
+
+ interface Option {
+ flags: string;
+ required: boolean; // A value must be supplied when the option is specified.
+ optional: boolean; // A value is optional when the option is specified.
+ mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line.
+ bool: boolean;
+ short?: string;
+ long: string;
+ description: string;
+ }
+ type OptionConstructor = new (flags: string, description?: string) => Option;
+
+ interface ParseOptions {
+ from: 'node' | 'electron' | 'user';
+ }
+
+ interface Command {
+ [key: string]: any; // options as properties
+
+ args: string[];
+
+ commands: Command[];
+
+ /**
+ * Set the program version to `str`.
+ *
+ * This method auto-registers the "-V, --version" flag
+ * which will print the version number when passed.
+ *
+ * You can optionally supply the flags and description to override the defaults.
+ */
+ version(str: string, flags?: string, description?: string): this;
+
+ /**
+ * Define a command, implemented using an action handler.
+ *
+ * @remarks
+ * The command description is supplied using `.description`, not as a parameter to `.command`.
+ *
+ * @example
+ * ```ts
+ * program
+ * .command('clone <source> [destination]')
+ * .description('clone a repository into a newly created directory')
+ * .action((source, destination) => {
+ * console.log('clone command called');
+ * });
+ * ```
+ *
+ * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
+ * @param opts - configuration options
+ * @returns new command
+ */
+ command(nameAndArgs: string, opts?: CommandOptions): ReturnType<this['createCommand']>;
+ /**
+ * Define a command, implemented in a separate executable file.
+ *
+ * @remarks
+ * The command description is supplied as the second parameter to `.command`.
+ *
+ * @example
+ * ```ts
+ * program
+ * .command('start <service>', 'start named service')
+ * .command('stop [service]', 'stop named serice, or all if no name supplied');
+ * ```
+ *
+ * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
+ * @param description - description of executable command
+ * @param opts - configuration options
+ * @returns `this` command for chaining
+ */
+ command(nameAndArgs: string, description: string, opts?: commander.ExecutableCommandOptions): this;
+
+ /**
+ * Factory routine to create a new unattached command.
+ *
+ * See .command() for creating an attached subcommand, which uses this routine to
+ * create the command. You can override createCommand to customise subcommands.
+ */
+ createCommand(name?: string): Command;
+
+ /**
+ * Add a prepared subcommand.
+ *
+ * See .command() for creating an attached subcommand which inherits settings from its parent.
+ *
+ * @returns `this` command for chaining
+ */
+ addCommand(cmd: Command, opts?: CommandOptions): this;
+
+ /**
+ * Define argument syntax for command.
+ *
+ * @returns `this` command for chaining
+ */
+ arguments(desc: string): this;
+
+ /**
+ * Register callback to use as replacement for calling process.exit.
+ */
+ exitOverride(callback?: (err: CommanderError) => never|void): this;
+
+ /**
+ * Register callback `fn` for the command.
+ *
+ * @example
+ * program
+ * .command('help')
+ * .description('display verbose help')
+ * .action(function() {
+ * // output help here
+ * });
+ *
+ * @returns `this` command for chaining
+ */
+ action(fn: (...args: any[]) => void | Promise<void>): this;
+
+ /**
+ * Define option with `flags`, `description` and optional
+ * coercion `fn`.
+ *
+ * The `flags` string should contain both the short and long flags,
+ * separated by comma, a pipe or space. The following are all valid
+ * all will output this way when `--help` is used.
+ *
+ * "-p, --pepper"
+ * "-p|--pepper"
+ * "-p --pepper"
+ *
+ * @example
+ * // simple boolean defaulting to false
+ * program.option('-p, --pepper', 'add pepper');
+ *
+ * --pepper
+ * program.pepper
+ * // => Boolean
+ *
+ * // simple boolean defaulting to true
+ * program.option('-C, --no-cheese', 'remove cheese');
+ *
+ * program.cheese
+ * // => true
+ *
+ * --no-cheese
+ * program.cheese
+ * // => false
+ *
+ * // required argument
+ * program.option('-C, --chdir <path>', 'change the working directory');
+ *
+ * --chdir /tmp
+ * program.chdir
+ * // => "/tmp"
+ *
+ * // optional argument
+ * program.option('-c, --cheese [type]', 'add cheese [marble]');
+ *
+ * @returns `this` command for chaining
+ */
+ option(flags: string, description?: string, defaultValue?: string | boolean): this;
+ option(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this;
+ option<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this;
+
+ /**
+ * Define a required option, which must have a value after parsing. This usually means
+ * the option must be specified on the command line. (Otherwise the same as .option().)
+ *
+ * The `flags` string should contain both the short and long flags, separated by comma, a pipe or space.
+ */
+ requiredOption(flags: string, description?: string, defaultValue?: string | boolean): this;
+ requiredOption(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this;
+ requiredOption<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this;
+
+ /**
+ * Whether to store option values as properties on command object,
+ * or store separately (specify false). In both cases the option values can be accessed using .opts().
+ *
+ * @returns `this` command for chaining
+ */
+ storeOptionsAsProperties(value?: boolean): this;
+
+ /**
+ * Whether to pass command to action handler,
+ * or just the options (specify false).
+ *
+ * @returns `this` command for chaining
+ */
+ passCommandToAction(value?: boolean): this;
+
+ /**
+ * Allow unknown options on the command line.
+ *
+ * @param [arg] if `true` or omitted, no error will be thrown for unknown options.
+ * @returns `this` command for chaining
+ */
+ allowUnknownOption(arg?: boolean): this;
+
+ /**
+ * Parse `argv`, setting options and invoking commands when defined.
+ *
+ * The default expectation is that the arguments are from node and have the application as argv[0]
+ * and the script being run in argv[1], with user parameters after that.
+ *
+ * Examples:
+ *
+ * program.parse(process.argv);
+ * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions
+ * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
+ *
+ * @returns `this` command for chaining
+ */
+ parse(argv?: string[], options?: ParseOptions): this;
+
+ /**
+ * Parse `argv`, setting options and invoking commands when defined.
+ *
+ * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.
+ *
+ * The default expectation is that the arguments are from node and have the application as argv[0]
+ * and the script being run in argv[1], with user parameters after that.
+ *
+ * Examples:
+ *
+ * program.parseAsync(process.argv);
+ * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions
+ * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
+ *
+ * @returns Promise
+ */
+ parseAsync(argv?: string[], options?: ParseOptions): Promise<this>;
+
+ /**
+ * Parse options from `argv` removing known options,
+ * and return argv split into operands and unknown arguments.
+ *
+ * @example
+ * argv => operands, unknown
+ * --known kkk op => [op], []
+ * op --known kkk => [op], []
+ * sub --unknown uuu op => [sub], [--unknown uuu op]
+ * sub -- --unknown uuu op => [sub --unknown uuu op], []
+ */
+ parseOptions(argv: string[]): commander.ParseOptionsResult;
+
+ /**
+ * Return an object containing options as key-value pairs
+ */
+ opts(): { [key: string]: any };
+
+ /**
+ * Set the description.
+ *
+ * @returns `this` command for chaining
+ */
+ description(str: string, argsDescription?: {[argName: string]: string}): this;
+ /**
+ * Get the description.
+ */
+ description(): string;
+
+ /**
+ * Set an alias for the command.
+ *
+ * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
+ *
+ * @returns `this` command for chaining
+ */
+ alias(alias: string): this;
+ /**
+ * Get alias for the command.
+ */
+ alias(): string;
+
+ /**
+ * Set aliases for the command.
+ *
+ * Only the first alias is shown in the auto-generated help.
+ *
+ * @returns `this` command for chaining
+ */
+ aliases(aliases: string[]): this;
+ /**
+ * Get aliases for the command.
+ */
+ aliases(): string[];
+
+ /**
+ * Set the command usage.
+ *
+ * @returns `this` command for chaining
+ */
+ usage(str: string): this;
+ /**
+ * Get the command usage.
+ */
+ usage(): string;
+
+ /**
+ * Set the name of the command.
+ *
+ * @returns `this` command for chaining
+ */
+ name(str: string): this;
+ /**
+ * Get the name of the command.
+ */
+ name(): string;
+
+ /**
+ * Output help information for this command.
+ *
+ * When listener(s) are available for the helpLongFlag
+ * those callbacks are invoked.
+ */
+ outputHelp(cb?: (str: string) => string): void;
+
+ /**
+ * Return command help documentation.
+ */
+ helpInformation(): string;
+
+ /**
+ * You can pass in flags and a description to override the help
+ * flags and help description for your command.
+ */
+ helpOption(flags?: string, description?: string): this;
+
+ /**
+ * Output help information and exit.
+ */
+ help(cb?: (str: string) => string): never;
+
+ /**
+ * Add a listener (callback) for when events occur. (Implemented using EventEmitter.)
+ *
+ * @example
+ * program
+ * .on('--help', () -> {
+ * console.log('See web site for more information.');
+ * });
+ */
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+ type CommandConstructor = new (name?: string) => Command;
+
+ interface CommandOptions {
+ noHelp?: boolean; // old name for hidden
+ hidden?: boolean;
+ isDefault?: boolean;
+ }
+ interface ExecutableCommandOptions extends CommandOptions {
+ executableFile?: string;
+ }
+
+ interface ParseOptionsResult {
+ operands: string[];
+ unknown: string[];
+ }
+
+ interface CommanderStatic extends Command {
+ program: Command;
+ Command: CommandConstructor;
+ Option: OptionConstructor;
+ CommanderError: CommanderErrorConstructor;
+ }
+
+}
+
+// Declaring namespace AND global
+// eslint-disable-next-line no-redeclare
+declare const commander: commander.CommanderStatic;
+export = commander;
diff --git a/node_modules/compare-version/README.md b/node_modules/compare-version/README.md
new file mode 100644
index 0000000..4786c3f
--- /dev/null
+++ b/node_modules/compare-version/README.md
@@ -0,0 +1,31 @@
+# compare-version [![Build Status](https://travis-ci.org/kevva/compare-version.svg?branch=master)](https://travis-ci.org/kevva/compare-version)
+
+> Compare version numbers.
+
+## Install
+
+```bash
+$ npm install --save compare-version
+```
+
+```bash
+$ component install kevva/compare-version
+```
+
+```bash
+$ bower install --save compare-version
+```
+
+## Usage
+
+```js
+var compareVersion = require('compare-version');
+
+compareVersion('1.11.0', '1.11.0'); // => 0
+compareVersion('1.11.0', '1.2.9'); // => 1
+compareVersion('1.11.3', '1.11.25'); // => -1
+```
+
+## License
+
+[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Kevin Mårtensson](https://github.com/kevva)
diff --git a/node_modules/compare-version/index.js b/node_modules/compare-version/index.js
new file mode 100644
index 0000000..42c317a
--- /dev/null
+++ b/node_modules/compare-version/index.js
@@ -0,0 +1,33 @@
+'use strict';
+
+/**
+ * Compare semver version numbers
+ *
+ * @param {String} a
+ * @param {String} b
+ * @api public
+ */
+
+module.exports = function(a, b) {
+ var i;
+ var len;
+
+ if (typeof a + typeof b !== 'stringstring') {
+ return false;
+ }
+
+ a = a.split('.');
+ b = b.split('.');
+ i = 0;
+ len = Math.max(a.length, b.length);
+
+ for (; i < len; i++) {
+ if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) {
+ return 1;
+ } else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) {
+ return -1;
+ }
+ }
+
+ return 0;
+};
diff --git a/node_modules/compare-version/package.json b/node_modules/compare-version/package.json
new file mode 100644
index 0000000..facb2ac
--- /dev/null
+++ b/node_modules/compare-version/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "compare-version",
+ "version": "0.1.2",
+ "description": "Compare semver version numbers",
+ "license": "MIT",
+ "repository": "kevva/compare-version",
+ "author": {
+ "name": "Kevin Mårtensson",
+ "email": "kevinmartensson@gmail.com",
+ "url": "https://github.com/kevva"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "browser": "browserify -s $npm_package_name -o browser.js .",
+ "test": "mocha --reporter list"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "compare",
+ "number",
+ "semver",
+ "version"
+ ],
+ "devDependencies": {
+ "browserify": "^3.44.2",
+ "mocha": "^1.18.2"
+ }
+}
diff --git a/node_modules/concat-map/.travis.yml b/node_modules/concat-map/.travis.yml
new file mode 100644
index 0000000..f1d0f13
--- /dev/null
+++ b/node_modules/concat-map/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
diff --git a/node_modules/concat-map/LICENSE b/node_modules/concat-map/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/node_modules/concat-map/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+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/concat-map/README.markdown b/node_modules/concat-map/README.markdown
new file mode 100644
index 0000000..408f70a
--- /dev/null
+++ b/node_modules/concat-map/README.markdown
@@ -0,0 +1,62 @@
+concat-map
+==========
+
+Concatenative mapdashery.
+
+[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
+
+[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
+
+example
+=======
+
+``` js
+var concatMap = require('concat-map');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
+```
+
+***
+
+```
+[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
+```
+
+methods
+=======
+
+``` js
+var concatMap = require('concat-map')
+```
+
+concatMap(xs, fn)
+-----------------
+
+Return an array of concatenated elements by calling `fn(x, i)` for each element
+`x` and each index `i` in the array `xs`.
+
+When `fn(x, i)` returns an array, its result will be concatenated with the
+result array. If `fn(x, i)` returns anything else, that value will be pushed
+onto the end of the result array.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install concat-map
+```
+
+license
+=======
+
+MIT
+
+notes
+=====
+
+This module was written while sitting high above the ground in a tree.
diff --git a/node_modules/concat-map/example/map.js b/node_modules/concat-map/example/map.js
new file mode 100644
index 0000000..3365621
--- /dev/null
+++ b/node_modules/concat-map/example/map.js
@@ -0,0 +1,6 @@
+var concatMap = require('../');
+var xs = [ 1, 2, 3, 4, 5, 6 ];
+var ys = concatMap(xs, function (x) {
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+});
+console.dir(ys);
diff --git a/node_modules/concat-map/index.js b/node_modules/concat-map/index.js
new file mode 100644
index 0000000..b29a781
--- /dev/null
+++ b/node_modules/concat-map/index.js
@@ -0,0 +1,13 @@
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json
new file mode 100644
index 0000000..d3640e6
--- /dev/null
+++ b/node_modules/concat-map/package.json
@@ -0,0 +1,43 @@
+{
+ "name" : "concat-map",
+ "description" : "concatenative mapdashery",
+ "version" : "0.0.1",
+ "repository" : {
+ "type" : "git",
+ "url" : "git://github.com/substack/node-concat-map.git"
+ },
+ "main" : "index.js",
+ "keywords" : [
+ "concat",
+ "concatMap",
+ "map",
+ "functional",
+ "higher-order"
+ ],
+ "directories" : {
+ "example" : "example",
+ "test" : "test"
+ },
+ "scripts" : {
+ "test" : "tape test/*.js"
+ },
+ "devDependencies" : {
+ "tape" : "~2.4.0"
+ },
+ "license" : "MIT",
+ "author" : {
+ "name" : "James Halliday",
+ "email" : "mail@substack.net",
+ "url" : "http://substack.net"
+ },
+ "testling" : {
+ "files" : "test/*.js",
+ "browsers" : {
+ "ie" : [ 6, 7, 8, 9 ],
+ "ff" : [ 3.5, 10, 15.0 ],
+ "chrome" : [ 10, 22 ],
+ "safari" : [ 5.1 ],
+ "opera" : [ 12 ]
+ }
+ }
+}
diff --git a/node_modules/concat-map/test/map.js b/node_modules/concat-map/test/map.js
new file mode 100644
index 0000000..fdbd702
--- /dev/null
+++ b/node_modules/concat-map/test/map.js
@@ -0,0 +1,39 @@
+var concatMap = require('../');
+var test = require('tape');
+
+test('empty or not', function (t) {
+ var xs = [ 1, 2, 3, 4, 5, 6 ];
+ var ixes = [];
+ var ys = concatMap(xs, function (x, ix) {
+ ixes.push(ix);
+ return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
+ });
+ t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
+ t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
+ t.end();
+});
+
+test('always something', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('scalars', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function (x) {
+ return x === 'b' ? [ 'B', 'B', 'B' ] : x;
+ });
+ t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
+ t.end();
+});
+
+test('undefs', function (t) {
+ var xs = [ 'a', 'b', 'c', 'd' ];
+ var ys = concatMap(xs, function () {});
+ t.same(ys, [ undefined, undefined, undefined, undefined ]);
+ t.end();
+});
diff --git a/node_modules/concat-stream/LICENSE b/node_modules/concat-stream/LICENSE
new file mode 100644
index 0000000..99c130e
--- /dev/null
+++ b/node_modules/concat-stream/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 Max Ogden
+
+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. \ No newline at end of file
diff --git a/node_modules/concat-stream/index.js b/node_modules/concat-stream/index.js
new file mode 100644
index 0000000..dd672a7
--- /dev/null
+++ b/node_modules/concat-stream/index.js
@@ -0,0 +1,144 @@
+var Writable = require('readable-stream').Writable
+var inherits = require('inherits')
+var bufferFrom = require('buffer-from')
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
+
+function ConcatStream(opts, cb) {
+ if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
+
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+ if (!opts) opts = {}
+
+ var encoding = opts.encoding
+ var shouldInferEncoding = false
+
+ if (!encoding) {
+ shouldInferEncoding = true
+ } else {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'u8' || encoding === 'uint8') {
+ encoding = 'uint8array'
+ }
+ }
+
+ Writable.call(this, { objectMode: true })
+
+ this.encoding = encoding
+ this.shouldInferEncoding = shouldInferEncoding
+
+ if (cb) this.on('finish', function () { cb(this.getBody()) })
+ this.body = []
+}
+
+module.exports = ConcatStream
+inherits(ConcatStream, Writable)
+
+ConcatStream.prototype._write = function(chunk, enc, next) {
+ this.body.push(chunk)
+ next()
+}
+
+ConcatStream.prototype.inferEncoding = function (buff) {
+ var firstBuffer = buff === undefined ? this.body[0] : buff;
+ if (Buffer.isBuffer(firstBuffer)) return 'buffer'
+ if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
+ if (Array.isArray(firstBuffer)) return 'array'
+ if (typeof firstBuffer === 'string') return 'string'
+ if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
+ return 'buffer'
+}
+
+ConcatStream.prototype.getBody = function () {
+ if (!this.encoding && this.body.length === 0) return []
+ if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
+ if (this.encoding === 'array') return arrayConcat(this.body)
+ if (this.encoding === 'string') return stringConcat(this.body)
+ if (this.encoding === 'buffer') return bufferConcat(this.body)
+ if (this.encoding === 'uint8array') return u8Concat(this.body)
+ return this.body
+}
+
+var isArray = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]'
+}
+
+function isArrayish (arr) {
+ return /Array\]$/.test(Object.prototype.toString.call(arr))
+}
+
+function isBufferish (p) {
+ return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
+}
+
+function stringConcat (parts) {
+ var strings = []
+ var needsToString = false
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (typeof p === 'string') {
+ strings.push(p)
+ } else if (Buffer.isBuffer(p)) {
+ strings.push(p)
+ } else if (isBufferish(p)) {
+ strings.push(bufferFrom(p))
+ } else {
+ strings.push(bufferFrom(String(p)))
+ }
+ }
+ if (Buffer.isBuffer(parts[0])) {
+ strings = Buffer.concat(strings)
+ strings = strings.toString('utf8')
+ } else {
+ strings = strings.join('')
+ }
+ return strings
+}
+
+function bufferConcat (parts) {
+ var bufs = []
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (Buffer.isBuffer(p)) {
+ bufs.push(p)
+ } else if (isBufferish(p)) {
+ bufs.push(bufferFrom(p))
+ } else {
+ bufs.push(bufferFrom(String(p)))
+ }
+ }
+ return Buffer.concat(bufs)
+}
+
+function arrayConcat (parts) {
+ var res = []
+ for (var i = 0; i < parts.length; i++) {
+ res.push.apply(res, parts[i])
+ }
+ return res
+}
+
+function u8Concat (parts) {
+ var len = 0
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof parts[i] === 'string') {
+ parts[i] = bufferFrom(parts[i])
+ }
+ len += parts[i].length
+ }
+ var u8 = new U8(len)
+ for (var i = 0, offset = 0; i < parts.length; i++) {
+ var part = parts[i]
+ for (var j = 0; j < part.length; j++) {
+ u8[offset++] = part[j]
+ }
+ }
+ return u8
+}
diff --git a/node_modules/concat-stream/node_modules/isarray/.npmignore b/node_modules/concat-stream/node_modules/isarray/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/concat-stream/node_modules/isarray/.travis.yml b/node_modules/concat-stream/node_modules/isarray/.travis.yml
new file mode 100644
index 0000000..cc4dba2
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/node_modules/concat-stream/node_modules/isarray/Makefile b/node_modules/concat-stream/node_modules/isarray/Makefile
new file mode 100644
index 0000000..787d56e
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/Makefile
@@ -0,0 +1,6 @@
+
+test:
+ @node_modules/.bin/tape test.js
+
+.PHONY: test
+
diff --git a/node_modules/concat-stream/node_modules/isarray/README.md b/node_modules/concat-stream/node_modules/isarray/README.md
new file mode 100644
index 0000000..16d2c59
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/README.md
@@ -0,0 +1,60 @@
+
+# isarray
+
+`Array#isArray` for older browsers.
+
+[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
+[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
+
+[![browser support](https://ci.testling.com/juliangruber/isarray.png)
+](https://ci.testling.com/juliangruber/isarray)
+
+## Usage
+
+```js
+var isArray = require('isarray');
+
+console.log(isArray([])); // => true
+console.log(isArray({})); // => false
+```
+
+## Installation
+
+With [npm](http://npmjs.org) do
+
+```bash
+$ npm install isarray
+```
+
+Then bundle for the browser with
+[browserify](https://github.com/substack/browserify).
+
+With [component](http://component.io) do
+
+```bash
+$ component install juliangruber/isarray
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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/concat-stream/node_modules/isarray/component.json b/node_modules/concat-stream/node_modules/isarray/component.json
new file mode 100644
index 0000000..9e31b68
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/component.json
@@ -0,0 +1,19 @@
+{
+ "name" : "isarray",
+ "description" : "Array#isArray for older browsers",
+ "version" : "0.0.1",
+ "repository" : "juliangruber/isarray",
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main" : "index.js",
+ "scripts" : [
+ "index.js"
+ ],
+ "dependencies" : {},
+ "keywords": ["browser","isarray","array"],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/concat-stream/node_modules/isarray/index.js b/node_modules/concat-stream/node_modules/isarray/index.js
new file mode 100644
index 0000000..a57f634
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/index.js
@@ -0,0 +1,5 @@
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
diff --git a/node_modules/concat-stream/node_modules/isarray/package.json b/node_modules/concat-stream/node_modules/isarray/package.json
new file mode 100644
index 0000000..1a4317a
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "isarray",
+ "description": "Array#isArray for older browsers",
+ "version": "1.0.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/isarray.git"
+ },
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "~2.13.4"
+ },
+ "keywords": [
+ "browser",
+ "isarray",
+ "array"
+ ],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "scripts": {
+ "test": "tape test.js"
+ }
+}
diff --git a/node_modules/concat-stream/node_modules/isarray/test.js b/node_modules/concat-stream/node_modules/isarray/test.js
new file mode 100644
index 0000000..e0c3444
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/isarray/test.js
@@ -0,0 +1,20 @@
+var isArray = require('./');
+var test = require('tape');
+
+test('is array', function(t){
+ t.ok(isArray([]));
+ t.notOk(isArray({}));
+ t.notOk(isArray(null));
+ t.notOk(isArray(false));
+
+ var obj = {};
+ obj[0] = true;
+ t.notOk(isArray(obj));
+
+ var arr = [];
+ arr.foo = 'bar';
+ t.ok(isArray(arr));
+
+ t.end();
+});
+
diff --git a/node_modules/concat-stream/node_modules/readable-stream/.travis.yml b/node_modules/concat-stream/node_modules/readable-stream/.travis.yml
new file mode 100644
index 0000000..f62cdac
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/.travis.yml
@@ -0,0 +1,34 @@
+sudo: false
+language: node_js
+before_install:
+ - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env: NPM_LEGACY=true
+ - node_js: '0.10'
+ env: NPM_LEGACY=true
+ - node_js: '0.11'
+ env: NPM_LEGACY=true
+ - node_js: '0.12'
+ env: NPM_LEGACY=true
+ - node_js: 1
+ env: NPM_LEGACY=true
+ - node_js: 2
+ env: NPM_LEGACY=true
+ - node_js: 3
+ env: NPM_LEGACY=true
+ - node_js: 4
+ - node_js: 5
+ - node_js: 6
+ - node_js: 7
+ - node_js: 8
+ - node_js: 9
+script: "npm run test"
+env:
+ global:
+ - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
+ - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000..f478d58
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md b/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000..16ffb93
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/node_modules/concat-stream/node_modules/readable-stream/LICENSE b/node_modules/concat-stream/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000..2873b3b
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
diff --git a/node_modules/concat-stream/node_modules/readable-stream/README.md b/node_modules/concat-stream/node_modules/readable-stream/README.md
new file mode 100644
index 0000000..23fe3f3
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/README.md
@@ -0,0 +1,58 @@
+# readable-stream
+
+***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+***Node-core streams for userland***
+
+This package is a mirror of the Streams2 and Streams3 implementations in
+Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
+ - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
+ - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
+* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
new file mode 100644
index 0000000..83275f1
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
@@ -0,0 +1,60 @@
+# streams WG Meeting 2015-01-30
+
+## Links
+
+* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
+* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
+* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
+
+## Agenda
+
+Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
+
+* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
+* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
+* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
+* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
+
+## Minutes
+
+### adopt a charter
+
+* group: +1's all around
+
+### What versioning scheme should be adopted?
+* group: +1’s 3.0.0
+* domenic+group: pulling in patches from other sources where appropriate
+* mikeal: version independently, suggesting versions for io.js
+* mikeal+domenic: work with TC to notify in advance of changes
+simpler stream creation
+
+### streamline creation of streams
+* sam: streamline creation of streams
+* domenic: nice simple solution posted
+ but, we lose the opportunity to change the model
+ may not be backwards incompatible (double check keys)
+
+ **action item:** domenic will check
+
+### remove implicit flowing of streams on(‘data’)
+* add isFlowing / isPaused
+* mikeal: worrying that we’re documenting polyfill methods – confuses users
+* domenic: more reflective API is probably good, with warning labels for users
+* new section for mad scientists (reflective stream access)
+* calvin: name the “third state”
+* mikeal: maybe borrow the name from whatwg?
+* domenic: we’re missing the “third state”
+* consensus: kind of difficult to name the third state
+* mikeal: figure out differences in states / compat
+* mathias: always flow on data – eliminates third state
+ * explore what it breaks
+
+**action items:**
+* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
+* ask rod/build for infrastructure
+* **chris**: explore the “flow on data” approach
+* add isPaused/isFlowing
+* add new docs section
+* move isPaused to that section
+
+
diff --git a/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js b/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js
new file mode 100644
index 0000000..f8b2db8
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/duplex-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_duplex.js');
diff --git a/node_modules/concat-stream/node_modules/readable-stream/duplex.js b/node_modules/concat-stream/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000..46924cb
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Duplex
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000..57003c3
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,131 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ keys.push(key);
+ }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = Object.create(require('core-util-is'));
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+{
+ // avoid scope creep, the keys array can then be collected
+ var keys = objectKeys(Writable.prototype);
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false) this.readable = false;
+
+ if (options && options.writable === false) this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended) return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+ this.push(null);
+ this.end();
+
+ pna.nextTick(cb, err);
+}; \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000..612edb4
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,47 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = Object.create(require('core-util-is'));
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000..0f80764
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1019 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = Object.create(require('core-util-is'));
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = require('util');
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = require('./internal/streams/BufferList');
+var destroyImpl = require('./internal/streams/destroy');
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ if (!(this instanceof Readable)) return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ get: function () {
+ if (this._readableState === undefined) {
+ return false;
+ }
+ return this._readableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._readableState.destroyed = value;
+ }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+ this.push(null);
+ cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ var state = stream._readableState;
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ stream.emit('error', new Error('stream.push() after EOF'));
+ } else {
+ state.reading = false;
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+ }
+
+ return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+ if (state.needReadable) emitReadable(stream);
+ }
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+ return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ }
+ // If we're asking for more than the current hwm, then raise the hwm.
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+ return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (n !== 0) state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ } else {
+ state.length -= n;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ pna.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+ this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+
+ cleanedUp = true;
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ increasedAwaitDrain = false;
+ var ret = dest.write(chunk);
+ if (false === ret && !increasedAwaitDrain) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
+ }
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = { hasUnpiped: false };
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+
+ if (!dest) dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, unpipeInfo);
+ }return this;
+ }
+
+ // try to find the right one.
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this, unpipeInfo);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ var state = this._readableState;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.emittedReadable = false;
+ if (!state.reading) {
+ pna.nextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ pna.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ state.awaitDrain = 0;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+
+ stream.on('end', function () {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk);
+
+ // don't skip over falsy values in objectMode
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function (method) {
+ return function () {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ }
+
+ // proxy certain important events.
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ }
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ this._read = function (n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._readableState.highWaterMark;
+ }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
+
+ return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ pna.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+} \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000..fcfc105
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,214 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+'use strict';
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = Object.create(require('core-util-is'));
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb) {
+ return this.emit('error', new Error('write callback called multiple times'));
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+
+ cb(er);
+
+ var rs = this._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+
+ // When the writable side finishes, then flush out anything remaining.
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ var _this2 = this;
+
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ _this2.emit('close');
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000..b0b0220
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,687 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = Object.create(require('core-util-is'));
+util.inherits = require('inherits');
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = require('./internal/streams/destroy');
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ options = options || {};
+
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = Math.floor(this.highWaterMark);
+
+ // if _final has been called
+ this.finalCalled = false;
+
+ // drain event flag.
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // has it been destroyed
+ this.destroyed = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function () {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function (object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function (object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+ return new Writable(options);
+ }
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+
+ if (typeof options.writev === 'function') this._writev = options.writev;
+
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ pna.nextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+ if (typeof cb !== 'function') cb = nop;
+
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function () {
+ return this._writableState.highWaterMark;
+ }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ pna.nextTick(cb, er);
+ // this can emit finish, and it will always happen
+ // after error
+ pna.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+ // this can emit finish, but finish must
+ // always follow error
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ /*<replacement>*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*</replacement>*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+
+ var count = 0;
+ var allBuffers = true;
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+ buffer.allBuffers = allBuffers;
+
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+ if (err) {
+ stream.emit('error', err);
+ }
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function') {
+ state.pendingcb++;
+ state.finalCalled = true;
+ pna.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ prefinish(stream, state);
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+ }
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = corkReq;
+ } else {
+ state.corkedRequestsFree = corkReq;
+ }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ get: function () {
+ if (this._writableState === undefined) {
+ return false;
+ }
+ return this._writableState.destroyed;
+ },
+ set: function (value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ }
+
+ // backward compatibility, the user is explicitly
+ // managing destroyed
+ this._writableState.destroyed = value;
+ }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+ this.end();
+ cb(err);
+}; \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 0000000..aefc68b
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,79 @@
+'use strict';
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = require('safe-buffer').Buffer;
+var util = require('util');
+
+function copyBuffer(src, target, offset) {
+ src.copy(target, offset);
+}
+
+module.exports = function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ BufferList.prototype.push = function push(v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.unshift = function unshift(v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ };
+
+ BufferList.prototype.shift = function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ };
+
+ BufferList.prototype.clear = function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ };
+
+ BufferList.prototype.join = function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+ };
+
+ BufferList.prototype.concat = function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+ };
+
+ return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000..5a0a0d8
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,74 @@
+'use strict';
+
+/*<replacement>*/
+
+var pna = require('process-nextick-args');
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+ pna.nextTick(emitErrorNT, this, err);
+ }
+ return this;
+ }
+
+ // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ }
+
+ // if this is a duplex stream mark the writable part as destroyed as well
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ pna.nextTick(emitErrorNT, _this, err);
+ if (_this._writableState) {
+ _this._writableState.errorEmitted = true;
+ }
+ } else if (cb) {
+ cb(err);
+ }
+ });
+
+ return this;
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy
+}; \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000..9332a3f
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000..ce2ad5b
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/node_modules/concat-stream/node_modules/readable-stream/package.json b/node_modules/concat-stream/node_modules/readable-stream/package.json
new file mode 100644
index 0000000..2afa6fb
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "readable-stream",
+ "version": "2.3.7",
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "main": "readable.js",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ },
+ "devDependencies": {
+ "assert": "^1.4.0",
+ "babel-polyfill": "^6.9.1",
+ "buffer": "^4.9.0",
+ "lolex": "^2.3.2",
+ "nyc": "^6.4.0",
+ "tap": "^0.7.0",
+ "tape": "^4.8.0"
+ },
+ "scripts": {
+ "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js",
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream"
+ },
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "browser": {
+ "util": false,
+ "./readable.js": "./readable-browser.js",
+ "./writable.js": "./writable-browser.js",
+ "./duplex.js": "./duplex-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/concat-stream/node_modules/readable-stream/passthrough.js b/node_modules/concat-stream/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000..ffd791d
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require('./readable').PassThrough
diff --git a/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js b/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000..e503725
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,7 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/node_modules/concat-stream/node_modules/readable-stream/readable.js b/node_modules/concat-stream/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000..ec89ec5
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/readable.js
@@ -0,0 +1,19 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
+ exports = module.exports = Stream.Readable;
+ exports.Readable = Stream.Readable;
+ exports.Writable = Stream.Writable;
+ exports.Duplex = Stream.Duplex;
+ exports.Transform = Stream.Transform;
+ exports.PassThrough = Stream.PassThrough;
+ exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+}
diff --git a/node_modules/concat-stream/node_modules/readable-stream/transform.js b/node_modules/concat-stream/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000..b1baba2
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require('./readable').Transform
diff --git a/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js b/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js
new file mode 100644
index 0000000..ebdde6a
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/writable-browser.js
@@ -0,0 +1 @@
+module.exports = require('./lib/_stream_writable.js');
diff --git a/node_modules/concat-stream/node_modules/readable-stream/writable.js b/node_modules/concat-stream/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000..3211a6f
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/readable-stream/writable.js
@@ -0,0 +1,8 @@
+var Stream = require("stream")
+var Writable = require("./lib/_stream_writable.js")
+
+if (process.env.READABLE_STREAM === 'disable') {
+ module.exports = Stream && Stream.Writable || Writable
+} else {
+ module.exports = Writable
+}
diff --git a/node_modules/concat-stream/node_modules/safe-buffer/LICENSE b/node_modules/concat-stream/node_modules/safe-buffer/LICENSE
new file mode 100644
index 0000000..0c068ce
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/safe-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+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/concat-stream/node_modules/safe-buffer/README.md b/node_modules/concat-stream/node_modules/safe-buffer/README.md
new file mode 100644
index 0000000..e9a81af
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/safe-buffer/README.md
@@ -0,0 +1,584 @@
+# safe-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/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+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.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 a0 0f>
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 70 17>
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+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'`.
+
+```js
+const buf1 = Buffer.from('this is a tést');
+console.log(buf1.toString());
+ // prints: this is a tést
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tést
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ // <Buffer 61 61 61 61 61>
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ // <Buffer 78 e0 82 02 01>
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/node_modules/concat-stream/node_modules/safe-buffer/index.d.ts b/node_modules/concat-stream/node_modules/safe-buffer/index.d.ts
new file mode 100644
index 0000000..e9fed80
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/safe-buffer/index.d.ts
@@ -0,0 +1,187 @@
+declare module "safe-buffer" {
+ export class Buffer {
+ 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;
+ 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): 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 initalizing
+ */
+ 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;
+ }
+} \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/safe-buffer/index.js b/node_modules/concat-stream/node_modules/safe-buffer/index.js
new file mode 100644
index 0000000..22438da
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/safe-buffer/index.js
@@ -0,0 +1,62 @@
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/node_modules/concat-stream/node_modules/safe-buffer/package.json b/node_modules/concat-stream/node_modules/safe-buffer/package.json
new file mode 100644
index 0000000..623fbc3
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/safe-buffer/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "safe-buffer",
+ "description": "Safer Node.js Buffer API",
+ "version": "5.1.2",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^4.0.0"
+ },
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/*.js"
+ }
+}
diff --git a/node_modules/concat-stream/node_modules/string_decoder/.travis.yml b/node_modules/concat-stream/node_modules/string_decoder/.travis.yml
new file mode 100644
index 0000000..3347a72
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/string_decoder/.travis.yml
@@ -0,0 +1,50 @@
+sudo: false
+language: node_js
+before_install:
+ - npm install -g npm@2
+ - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
+notifications:
+ email: false
+matrix:
+ fast_finish: true
+ include:
+ - node_js: '0.8'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.10'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.11'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: '0.12'
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 1
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 2
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 3
+ env:
+ - TASK=test
+ - NPM_LEGACY=true
+ - node_js: 4
+ env: TASK=test
+ - node_js: 5
+ env: TASK=test
+ - node_js: 6
+ env: TASK=test
+ - node_js: 7
+ env: TASK=test
+ - node_js: 8
+ env: TASK=test
+ - node_js: 9
+ env: TASK=test
diff --git a/node_modules/concat-stream/node_modules/string_decoder/LICENSE b/node_modules/concat-stream/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000..778edb2
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/string_decoder/LICENSE
@@ -0,0 +1,48 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
+
diff --git a/node_modules/concat-stream/node_modules/string_decoder/README.md b/node_modules/concat-stream/node_modules/string_decoder/README.md
new file mode 100644
index 0000000..5fd5831
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js b/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000..2e89e63
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/node_modules/concat-stream/node_modules/string_decoder/package.json b/node_modules/concat-stream/node_modules/string_decoder/package.json
new file mode 100644
index 0000000..518c3eb
--- /dev/null
+++ b/node_modules/concat-stream/node_modules/string_decoder/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "string_decoder",
+ "version": "1.1.1",
+ "description": "The string_decoder module from Node core",
+ "main": "lib/string_decoder.js",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ },
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "scripts": {
+ "test": "tap test/parallel/*.js && node test/verify-dependencies",
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/concat-stream/package.json b/node_modules/concat-stream/package.json
new file mode 100644
index 0000000..f709022
--- /dev/null
+++ b/node_modules/concat-stream/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "concat-stream",
+ "version": "1.6.2",
+ "description": "writable stream that concatenates strings or binary data and calls a callback with the result",
+ "tags": [
+ "stream",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "author": "Max Ogden <max@maxogden.com>",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/maxogden/concat-stream.git"
+ },
+ "bugs": {
+ "url": "http://github.com/maxogden/concat-stream/issues"
+ },
+ "engines": [
+ "node >= 0.8"
+ ],
+ "main": "index.js",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ },
+ "devDependencies": {
+ "tape": "^4.6.3"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/concat-stream/readme.md b/node_modules/concat-stream/readme.md
new file mode 100644
index 0000000..7aa19c4
--- /dev/null
+++ b/node_modules/concat-stream/readme.md
@@ -0,0 +1,102 @@
+# concat-stream
+
+Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.
+
+[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream)
+
+[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)
+
+### description
+
+Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.
+
+Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).
+
+There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.
+
+## Related
+
+`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+
+### examples
+
+#### Buffers
+
+```js
+var fs = require('fs')
+var concat = require('concat-stream')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = concat(gotPicture)
+
+readStream.on('error', handleError)
+readStream.pipe(concatStream)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+
+```
+
+#### Arrays
+
+```js
+var write = concat(function(data) {})
+write.write([1,2,3])
+write.write([4,5,6])
+write.end()
+// data will be [1,2,3,4,5,6] in the above callback
+```
+
+#### Uint8Arrays
+
+```js
+var write = concat(function(data) {})
+var a = new Uint8Array(3)
+a[0] = 97; a[1] = 98; a[2] = 99
+write.write(a)
+write.write('!')
+write.end(Buffer.from('!!1'))
+```
+
+See `test/` for more examples
+
+# methods
+
+```js
+var concat = require('concat-stream')
+```
+
+## var writable = concat(opts={}, cb)
+
+Return a `writable` stream that will fire `cb(data)` with all of the data that
+was written to the stream. Data can be written to `writable` as strings,
+Buffers, arrays of byte integers, and Uint8Arrays.
+
+By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.
+
+* `string` - get a string
+* `buffer` - get back a Buffer
+* `array` - get an array of byte integers
+* `uint8array`, `u8`, `uint8` - get back a Uint8Array
+* `object`, get back an array of Objects
+
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+
+If nothing is written to `writable` then `data` will be an empty array `[]`.
+
+# error handling
+
+`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
+
+We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.
+
+# license
+
+MIT LICENSE
diff --git a/node_modules/config-chain/LICENCE b/node_modules/config-chain/LICENCE
new file mode 100644
index 0000000..171dd97
--- /dev/null
+++ b/node_modules/config-chain/LICENCE
@@ -0,0 +1,22 @@
+Copyright (c) 2011 Dominic Tarr
+
+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. \ No newline at end of file
diff --git a/node_modules/config-chain/index.js b/node_modules/config-chain/index.js
new file mode 100755
index 0000000..0ef3a91
--- /dev/null
+++ b/node_modules/config-chain/index.js
@@ -0,0 +1,282 @@
+var ProtoList = require('proto-list')
+ , path = require('path')
+ , fs = require('fs')
+ , ini = require('ini')
+ , EE = require('events').EventEmitter
+ , url = require('url')
+ , http = require('http')
+
+var exports = module.exports = function () {
+ var args = [].slice.call(arguments)
+ , conf = new ConfigChain()
+
+ while(args.length) {
+ var a = args.shift()
+ if(a) conf.push
+ ( 'string' === typeof a
+ ? json(a)
+ : a )
+ }
+
+ return conf
+}
+
+//recursively find a file...
+
+var find = exports.find = function () {
+ var rel = path.join.apply(null, [].slice.call(arguments))
+
+ function find(start, rel) {
+ var file = path.join(start, rel)
+ try {
+ fs.statSync(file)
+ return file
+ } catch (err) {
+ if(path.dirname(start) !== start) // root
+ return find(path.dirname(start), rel)
+ }
+ }
+ return find(__dirname, rel)
+}
+
+var parse = exports.parse = function (content, file, type) {
+ content = '' + content
+ // if we don't know what it is, try json and fall back to ini
+ // if we know what it is, then it must be that.
+ if (!type) {
+ try { return JSON.parse(content) }
+ catch (er) { return ini.parse(content) }
+ } else if (type === 'json') {
+ if (this.emit) {
+ try { return JSON.parse(content) }
+ catch (er) { this.emit('error', er) }
+ } else {
+ return JSON.parse(content)
+ }
+ } else {
+ return ini.parse(content)
+ }
+}
+
+var json = exports.json = function () {
+ var args = [].slice.call(arguments).filter(function (arg) { return arg != null })
+ var file = path.join.apply(null, args)
+ var content
+ try {
+ content = fs.readFileSync(file,'utf-8')
+ } catch (err) {
+ return
+ }
+ return parse(content, file, 'json')
+}
+
+var env = exports.env = function (prefix, env) {
+ env = env || process.env
+ var obj = {}
+ var l = prefix.length
+ for(var k in env) {
+ if(k.indexOf(prefix) === 0)
+ obj[k.substring(l)] = env[k]
+ }
+
+ return obj
+}
+
+exports.ConfigChain = ConfigChain
+function ConfigChain () {
+ EE.apply(this)
+ ProtoList.apply(this, arguments)
+ this._awaiting = 0
+ this._saving = 0
+ this.sources = {}
+}
+
+// multi-inheritance-ish
+var extras = {
+ constructor: { value: ConfigChain }
+}
+Object.keys(EE.prototype).forEach(function (k) {
+ extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k)
+})
+ConfigChain.prototype = Object.create(ProtoList.prototype, extras)
+
+ConfigChain.prototype.del = function (key, where) {
+ // if not specified where, then delete from the whole chain, scorched
+ // earth style
+ if (where) {
+ var target = this.sources[where]
+ target = target && target.data
+ if (!target) {
+ return this.emit('error', new Error('not found '+where))
+ }
+ delete target[key]
+ } else {
+ for (var i = 0, l = this.list.length; i < l; i ++) {
+ delete this.list[i][key]
+ }
+ }
+ return this
+}
+
+ConfigChain.prototype.set = function (key, value, where) {
+ var target
+
+ if (where) {
+ target = this.sources[where]
+ target = target && target.data
+ if (!target) {
+ return this.emit('error', new Error('not found '+where))
+ }
+ } else {
+ target = this.list[0]
+ if (!target) {
+ return this.emit('error', new Error('cannot set, no confs!'))
+ }
+ }
+ target[key] = value
+ return this
+}
+
+ConfigChain.prototype.get = function (key, where) {
+ if (where) {
+ where = this.sources[where]
+ if (where) where = where.data
+ if (where && Object.hasOwnProperty.call(where, key)) return where[key]
+ return undefined
+ }
+ return this.list[0][key]
+}
+
+ConfigChain.prototype.save = function (where, type, cb) {
+ if (typeof type === 'function') cb = type, type = null
+ var target = this.sources[where]
+ if (!target || !(target.path || target.source) || !target.data) {
+ // TODO: maybe save() to a url target could be a PUT or something?
+ // would be easy to swap out with a reddis type thing, too
+ return this.emit('error', new Error('bad save target: '+where))
+ }
+
+ if (target.source) {
+ var pref = target.prefix || ''
+ Object.keys(target.data).forEach(function (k) {
+ target.source[pref + k] = target.data[k]
+ })
+ return this
+ }
+
+ var type = type || target.type
+ var data = target.data
+ if (target.type === 'json') {
+ data = JSON.stringify(data)
+ } else {
+ data = ini.stringify(data)
+ }
+
+ this._saving ++
+ fs.writeFile(target.path, data, 'utf8', function (er) {
+ this._saving --
+ if (er) {
+ if (cb) return cb(er)
+ else return this.emit('error', er)
+ }
+ if (this._saving === 0) {
+ if (cb) cb()
+ this.emit('save')
+ }
+ }.bind(this))
+ return this
+}
+
+ConfigChain.prototype.addFile = function (file, type, name) {
+ name = name || file
+ var marker = {__source__:name}
+ this.sources[name] = { path: file, type: type }
+ this.push(marker)
+ this._await()
+ fs.readFile(file, 'utf8', function (er, data) {
+ if (er) this.emit('error', er)
+ this.addString(data, file, type, marker)
+ }.bind(this))
+ return this
+}
+
+ConfigChain.prototype.addEnv = function (prefix, env, name) {
+ name = name || 'env'
+ var data = exports.env(prefix, env)
+ this.sources[name] = { data: data, source: env, prefix: prefix }
+ return this.add(data, name)
+}
+
+ConfigChain.prototype.addUrl = function (req, type, name) {
+ this._await()
+ var href = url.format(req)
+ name = name || href
+ var marker = {__source__:name}
+ this.sources[name] = { href: href, type: type }
+ this.push(marker)
+ http.request(req, function (res) {
+ var c = []
+ var ct = res.headers['content-type']
+ if (!type) {
+ type = ct.indexOf('json') !== -1 ? 'json'
+ : ct.indexOf('ini') !== -1 ? 'ini'
+ : href.match(/\.json$/) ? 'json'
+ : href.match(/\.ini$/) ? 'ini'
+ : null
+ marker.type = type
+ }
+
+ res.on('data', c.push.bind(c))
+ .on('end', function () {
+ this.addString(Buffer.concat(c), href, type, marker)
+ }.bind(this))
+ .on('error', this.emit.bind(this, 'error'))
+
+ }.bind(this))
+ .on('error', this.emit.bind(this, 'error'))
+ .end()
+
+ return this
+}
+
+ConfigChain.prototype.addString = function (data, file, type, marker) {
+ data = this.parse(data, file, type)
+ this.add(data, marker)
+ return this
+}
+
+ConfigChain.prototype.add = function (data, marker) {
+ if (marker && typeof marker === 'object') {
+ var i = this.list.indexOf(marker)
+ if (i === -1) {
+ return this.emit('error', new Error('bad marker'))
+ }
+ this.splice(i, 1, data)
+ marker = marker.__source__
+ this.sources[marker] = this.sources[marker] || {}
+ this.sources[marker].data = data
+ // we were waiting for this. maybe emit 'load'
+ this._resolve()
+ } else {
+ if (typeof marker === 'string') {
+ this.sources[marker] = this.sources[marker] || {}
+ this.sources[marker].data = data
+ }
+ // trigger the load event if nothing was already going to do so.
+ this._await()
+ this.push(data)
+ process.nextTick(this._resolve.bind(this))
+ }
+ return this
+}
+
+ConfigChain.prototype.parse = exports.parse
+
+ConfigChain.prototype._await = function () {
+ this._awaiting++
+}
+
+ConfigChain.prototype._resolve = function () {
+ this._awaiting--
+ if (this._awaiting === 0) this.emit('load', this)
+}
diff --git a/node_modules/config-chain/package.json b/node_modules/config-chain/package.json
new file mode 100644
index 0000000..17b8a47
--- /dev/null
+++ b/node_modules/config-chain/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "config-chain",
+ "version": "1.1.13",
+ "license": {
+ "type": "MIT",
+ "url": "https://raw.githubusercontent.com/dominictarr/config-chain/master/LICENCE"
+ },
+ "description": "HANDLE CONFIGURATION ONCE AND FOR ALL",
+ "homepage": "http://github.com/dominictarr/config-chain",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dominictarr/config-chain.git"
+ },
+ "files": [
+ "index.js"
+ ],
+ "dependencies": {
+ "proto-list": "~1.2.1",
+ "ini": "^1.3.4"
+ },
+ "devDependencies": {
+ "tap": "0.3.0"
+ },
+ "author": "Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)",
+ "scripts": {
+ "test": "tap test/*"
+ }
+}
diff --git a/node_modules/config-chain/readme.markdown b/node_modules/config-chain/readme.markdown
new file mode 100644
index 0000000..47f894c
--- /dev/null
+++ b/node_modules/config-chain/readme.markdown
@@ -0,0 +1,257 @@
+# config-chain
+
+A module for loading custom configurations
+
+## NOTE: Feature Freeze
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+This module is frozen.
+
+In general, we recommend using [rc](https://github.com/dominictarr/rc) instead,
+but as [npm](https://github.com/npmjs/npm) depends on this, it cannot be changed.
+
+
+## Install
+
+```sh
+yarn add config-chain
+
+# npm users
+npm install --save config-chain
+```
+
+## Usage
+
+```js
+const cc = require('config-chain');
+
+console.log(cc.env('TERM_', process.env));
+/*
+{ SESSION_ID: 'w1:5F38',
+ PROGRAM_VERSION: '3.1.2',
+ PROGRAM: 'iTerm.app' }
+*/
+```
+
+The `.env` function gets all the keys on the provided object which are
+prefixed by the specified prefix, removes the prefix, and puts the values on a new object.
+
+<br/>
+
+## Full Usage
+
+``` js
+
+ // npm install config-chain
+
+ var cc = require('config-chain')
+ , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.
+ , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.
+
+ // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN
+ // EARLIER ITEMS OVERIDE LATER ITEMS
+ // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!
+
+ //strings are interpereted as filenames.
+ //will be loaded synchronously
+
+ var conf =
+ cc(
+ //OVERRIDE SETTINGS WITH COMMAND LINE OPTS
+ opts,
+
+ //ENV VARS IF PREFIXED WITH 'myApp_'
+
+ cc.env('myApp_'), //myApp_foo = 'like this'
+
+ //FILE NAMED BY ENV
+ path.join(__dirname, 'config.' + env + '.json'),
+
+ //IF `env` is PRODUCTION
+ env === 'prod'
+ ? path.join(__dirname, 'special.json') //load a special file
+ : null //NULL IS IGNORED!
+
+ //SUBDIR FOR ENV CONFIG
+ path.join(__dirname, 'config', env, 'config.json'),
+
+ //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE
+ cc.find('config.json'),
+
+ //PUT DEFAULTS LAST
+ {
+ host: 'localhost'
+ port: 8000
+ })
+
+ var host = conf.get('host')
+
+ // or
+
+ var host = conf.store.host
+
+```
+
+Finally, flexible configurations! 👌
+
+## Custom Configuations
+
+```javascript
+var cc = require('config-chain')
+
+// all the stuff you did before
+var config = cc({
+ some: 'object'
+ },
+ cc.find('config.json'),
+ cc.env('myApp_')
+ )
+ // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG!
+ .addUrl('http://configurator:1234/my-configs')
+ // ASYNC FTW!
+ .addFile('/path/to/file.json')
+
+ // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT
+ // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST
+ // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE
+ .add({ another: 'object' })
+
+ // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!
+ .on('error', function (er) {
+ // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW
+ // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\
+ throw er
+ })
+
+ // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!
+ .on('load', function (config) {
+ console.awesome('HOLY SHIT!')
+ })
+```
+
+# API Docs
+
+## cc(...args)
+
+MAKE A CHAIN AND ADD ALL THE ARGS.
+
+If the arg is a STRING, then it shall be a JSON FILENAME.
+
+RETURN THE CHAIN!
+
+## cc.json(...args)
+
+Join the args into a JSON filename!
+
+SYNC I/O!
+
+## cc.find(relativePath)
+
+SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.
+
+RETURN THE FOUND PATH!
+
+SYNC I/O!
+
+## cc.parse(content, file, type)
+
+Parse the content string, and guess the type from either the
+specified type or the filename.
+
+RETURN THE RESULTING OBJECT!
+
+NO I/O!
+
+## cc.env(prefix, env=process.env)
+
+Get all the keys on the provided object which are
+prefixed by the specified prefix, removes the prefix, and puts the values on a new object.
+
+RETURN THE RESULTING OBJECT!
+
+NO I/O!
+
+## cc.ConfigChain()
+
+The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!
+
+One of these is returned by the main exported function, as well.
+
+It inherits (prototypically) from
+[ProtoList](https://github.com/isaacs/proto-list/), and also inherits
+(parasitically) from
+[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)
+
+It has all the methods from both, and except where noted, they are
+unchanged.
+
+### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.
+
+## chain.sources
+
+A list of all the places where it got stuff. The keys are the names
+passed to addFile or addUrl etc, and the value is an object with some
+info about the data source.
+
+## chain.addFile(filename, type, [name=filename])
+
+Filename is the name of the file. Name is an arbitrary string to be
+used later if you desire. Type is either 'ini' or 'json', and will
+try to guess intelligently if omitted.
+
+Loaded files can be saved later.
+
+## chain.addUrl(url, type, [name=url])
+
+Same as the filename thing, but with a url.
+
+Can't be saved later.
+
+## chain.addEnv(prefix, env, [name='env'])
+
+Add all the keys from the env object that start with the prefix.
+
+## chain.addString(data, file, type, [name])
+
+Parse the string and add it to the set. (Mainly used internally.)
+
+## chain.add(object, [name])
+
+Add the object to the set.
+
+## chain.root {Object}
+
+The root from which all the other config objects in the set descend
+prototypically.
+
+Put your defaults here.
+
+## chain.set(key, value, name)
+
+Set the key to the value on the named config object. If name is
+unset, then set it on the first config object in the set. (That is,
+the one with the highest priority, which was added first.)
+
+## chain.get(key, [name])
+
+Get the key from the named config object explicitly, or from the
+resolved configs if not specified.
+
+## chain.save(name, type)
+
+Write the named config object back to its origin.
+
+Currently only supported for env and file config types.
+
+For files, encode the data according to the type.
+
+## chain.on('save', function () {})
+
+When one or more files are saved, emits `save` event when they're all
+saved.
+
+## chain.on('load', function (chain) {})
+
+When the config chain has loaded all the specified files and urls and
+such, the 'load' event fires.
diff --git a/node_modules/core-util-is/LICENSE b/node_modules/core-util-is/LICENSE
new file mode 100644
index 0000000..d8d7f94
--- /dev/null
+++ b/node_modules/core-util-is/LICENSE
@@ -0,0 +1,19 @@
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/node_modules/core-util-is/README.md b/node_modules/core-util-is/README.md
new file mode 100644
index 0000000..5a76b41
--- /dev/null
+++ b/node_modules/core-util-is/README.md
@@ -0,0 +1,3 @@
+# core-util-is
+
+The `util.is*` functions introduced in Node v0.12.
diff --git a/node_modules/core-util-is/float.patch b/node_modules/core-util-is/float.patch
new file mode 100644
index 0000000..a06d5c0
--- /dev/null
+++ b/node_modules/core-util-is/float.patch
@@ -0,0 +1,604 @@
+diff --git a/lib/util.js b/lib/util.js
+index a03e874..9074e8e 100644
+--- a/lib/util.js
++++ b/lib/util.js
+@@ -19,430 +19,6 @@
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-var formatRegExp = /%[sdj%]/g;
+-exports.format = function(f) {
+- if (!isString(f)) {
+- var objects = [];
+- for (var i = 0; i < arguments.length; i++) {
+- objects.push(inspect(arguments[i]));
+- }
+- return objects.join(' ');
+- }
+-
+- var i = 1;
+- var args = arguments;
+- var len = args.length;
+- var str = String(f).replace(formatRegExp, function(x) {
+- if (x === '%%') return '%';
+- if (i >= len) return x;
+- switch (x) {
+- case '%s': return String(args[i++]);
+- case '%d': return Number(args[i++]);
+- case '%j':
+- try {
+- return JSON.stringify(args[i++]);
+- } catch (_) {
+- return '[Circular]';
+- }
+- default:
+- return x;
+- }
+- });
+- for (var x = args[i]; i < len; x = args[++i]) {
+- if (isNull(x) || !isObject(x)) {
+- str += ' ' + x;
+- } else {
+- str += ' ' + inspect(x);
+- }
+- }
+- return str;
+-};
+-
+-
+-// Mark that a method should not be used.
+-// Returns a modified function which warns once by default.
+-// If --no-deprecation is set, then it is a no-op.
+-exports.deprecate = function(fn, msg) {
+- // Allow for deprecating things in the process of starting up.
+- if (isUndefined(global.process)) {
+- return function() {
+- return exports.deprecate(fn, msg).apply(this, arguments);
+- };
+- }
+-
+- if (process.noDeprecation === true) {
+- return fn;
+- }
+-
+- var warned = false;
+- function deprecated() {
+- if (!warned) {
+- if (process.throwDeprecation) {
+- throw new Error(msg);
+- } else if (process.traceDeprecation) {
+- console.trace(msg);
+- } else {
+- console.error(msg);
+- }
+- warned = true;
+- }
+- return fn.apply(this, arguments);
+- }
+-
+- return deprecated;
+-};
+-
+-
+-var debugs = {};
+-var debugEnviron;
+-exports.debuglog = function(set) {
+- if (isUndefined(debugEnviron))
+- debugEnviron = process.env.NODE_DEBUG || '';
+- set = set.toUpperCase();
+- if (!debugs[set]) {
+- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+- var pid = process.pid;
+- debugs[set] = function() {
+- var msg = exports.format.apply(exports, arguments);
+- console.error('%s %d: %s', set, pid, msg);
+- };
+- } else {
+- debugs[set] = function() {};
+- }
+- }
+- return debugs[set];
+-};
+-
+-
+-/**
+- * Echos the value of a value. Trys to print the value out
+- * in the best way possible given the different types.
+- *
+- * @param {Object} obj The object to print out.
+- * @param {Object} opts Optional options object that alters the output.
+- */
+-/* legacy: obj, showHidden, depth, colors*/
+-function inspect(obj, opts) {
+- // default options
+- var ctx = {
+- seen: [],
+- stylize: stylizeNoColor
+- };
+- // legacy...
+- if (arguments.length >= 3) ctx.depth = arguments[2];
+- if (arguments.length >= 4) ctx.colors = arguments[3];
+- if (isBoolean(opts)) {
+- // legacy...
+- ctx.showHidden = opts;
+- } else if (opts) {
+- // got an "options" object
+- exports._extend(ctx, opts);
+- }
+- // set default options
+- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+- if (isUndefined(ctx.depth)) ctx.depth = 2;
+- if (isUndefined(ctx.colors)) ctx.colors = false;
+- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+- if (ctx.colors) ctx.stylize = stylizeWithColor;
+- return formatValue(ctx, obj, ctx.depth);
+-}
+-exports.inspect = inspect;
+-
+-
+-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+-inspect.colors = {
+- 'bold' : [1, 22],
+- 'italic' : [3, 23],
+- 'underline' : [4, 24],
+- 'inverse' : [7, 27],
+- 'white' : [37, 39],
+- 'grey' : [90, 39],
+- 'black' : [30, 39],
+- 'blue' : [34, 39],
+- 'cyan' : [36, 39],
+- 'green' : [32, 39],
+- 'magenta' : [35, 39],
+- 'red' : [31, 39],
+- 'yellow' : [33, 39]
+-};
+-
+-// Don't use 'blue' not visible on cmd.exe
+-inspect.styles = {
+- 'special': 'cyan',
+- 'number': 'yellow',
+- 'boolean': 'yellow',
+- 'undefined': 'grey',
+- 'null': 'bold',
+- 'string': 'green',
+- 'date': 'magenta',
+- // "name": intentionally not styling
+- 'regexp': 'red'
+-};
+-
+-
+-function stylizeWithColor(str, styleType) {
+- var style = inspect.styles[styleType];
+-
+- if (style) {
+- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+- '\u001b[' + inspect.colors[style][1] + 'm';
+- } else {
+- return str;
+- }
+-}
+-
+-
+-function stylizeNoColor(str, styleType) {
+- return str;
+-}
+-
+-
+-function arrayToHash(array) {
+- var hash = {};
+-
+- array.forEach(function(val, idx) {
+- hash[val] = true;
+- });
+-
+- return hash;
+-}
+-
+-
+-function formatValue(ctx, value, recurseTimes) {
+- // Provide a hook for user-specified inspect functions.
+- // Check that value is an object with an inspect function on it
+- if (ctx.customInspect &&
+- value &&
+- isFunction(value.inspect) &&
+- // Filter out the util module, it's inspect function is special
+- value.inspect !== exports.inspect &&
+- // Also filter out any prototype objects using the circular check.
+- !(value.constructor && value.constructor.prototype === value)) {
+- var ret = value.inspect(recurseTimes, ctx);
+- if (!isString(ret)) {
+- ret = formatValue(ctx, ret, recurseTimes);
+- }
+- return ret;
+- }
+-
+- // Primitive types cannot have properties
+- var primitive = formatPrimitive(ctx, value);
+- if (primitive) {
+- return primitive;
+- }
+-
+- // Look up the keys of the object.
+- var keys = Object.keys(value);
+- var visibleKeys = arrayToHash(keys);
+-
+- if (ctx.showHidden) {
+- keys = Object.getOwnPropertyNames(value);
+- }
+-
+- // Some type of object without properties can be shortcutted.
+- if (keys.length === 0) {
+- if (isFunction(value)) {
+- var name = value.name ? ': ' + value.name : '';
+- return ctx.stylize('[Function' + name + ']', 'special');
+- }
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- }
+- if (isDate(value)) {
+- return ctx.stylize(Date.prototype.toString.call(value), 'date');
+- }
+- if (isError(value)) {
+- return formatError(value);
+- }
+- }
+-
+- var base = '', array = false, braces = ['{', '}'];
+-
+- // Make Array say that they are Array
+- if (isArray(value)) {
+- array = true;
+- braces = ['[', ']'];
+- }
+-
+- // Make functions say that they are functions
+- if (isFunction(value)) {
+- var n = value.name ? ': ' + value.name : '';
+- base = ' [Function' + n + ']';
+- }
+-
+- // Make RegExps say that they are RegExps
+- if (isRegExp(value)) {
+- base = ' ' + RegExp.prototype.toString.call(value);
+- }
+-
+- // Make dates with properties first say the date
+- if (isDate(value)) {
+- base = ' ' + Date.prototype.toUTCString.call(value);
+- }
+-
+- // Make error with message first say the error
+- if (isError(value)) {
+- base = ' ' + formatError(value);
+- }
+-
+- if (keys.length === 0 && (!array || value.length == 0)) {
+- return braces[0] + base + braces[1];
+- }
+-
+- if (recurseTimes < 0) {
+- if (isRegExp(value)) {
+- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+- } else {
+- return ctx.stylize('[Object]', 'special');
+- }
+- }
+-
+- ctx.seen.push(value);
+-
+- var output;
+- if (array) {
+- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+- } else {
+- output = keys.map(function(key) {
+- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+- });
+- }
+-
+- ctx.seen.pop();
+-
+- return reduceToSingleString(output, base, braces);
+-}
+-
+-
+-function formatPrimitive(ctx, value) {
+- if (isUndefined(value))
+- return ctx.stylize('undefined', 'undefined');
+- if (isString(value)) {
+- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+- .replace(/'/g, "\\'")
+- .replace(/\\"/g, '"') + '\'';
+- return ctx.stylize(simple, 'string');
+- }
+- if (isNumber(value)) {
+- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
+- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
+- if (value === 0 && 1 / value < 0)
+- return ctx.stylize('-0', 'number');
+- return ctx.stylize('' + value, 'number');
+- }
+- if (isBoolean(value))
+- return ctx.stylize('' + value, 'boolean');
+- // For some reason typeof null is "object", so special case here.
+- if (isNull(value))
+- return ctx.stylize('null', 'null');
+-}
+-
+-
+-function formatError(value) {
+- return '[' + Error.prototype.toString.call(value) + ']';
+-}
+-
+-
+-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+- var output = [];
+- for (var i = 0, l = value.length; i < l; ++i) {
+- if (hasOwnProperty(value, String(i))) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- String(i), true));
+- } else {
+- output.push('');
+- }
+- }
+- keys.forEach(function(key) {
+- if (!key.match(/^\d+$/)) {
+- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+- key, true));
+- }
+- });
+- return output;
+-}
+-
+-
+-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+- var name, str, desc;
+- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+- if (desc.get) {
+- if (desc.set) {
+- str = ctx.stylize('[Getter/Setter]', 'special');
+- } else {
+- str = ctx.stylize('[Getter]', 'special');
+- }
+- } else {
+- if (desc.set) {
+- str = ctx.stylize('[Setter]', 'special');
+- }
+- }
+- if (!hasOwnProperty(visibleKeys, key)) {
+- name = '[' + key + ']';
+- }
+- if (!str) {
+- if (ctx.seen.indexOf(desc.value) < 0) {
+- if (isNull(recurseTimes)) {
+- str = formatValue(ctx, desc.value, null);
+- } else {
+- str = formatValue(ctx, desc.value, recurseTimes - 1);
+- }
+- if (str.indexOf('\n') > -1) {
+- if (array) {
+- str = str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n').substr(2);
+- } else {
+- str = '\n' + str.split('\n').map(function(line) {
+- return ' ' + line;
+- }).join('\n');
+- }
+- }
+- } else {
+- str = ctx.stylize('[Circular]', 'special');
+- }
+- }
+- if (isUndefined(name)) {
+- if (array && key.match(/^\d+$/)) {
+- return str;
+- }
+- name = JSON.stringify('' + key);
+- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+- name = name.substr(1, name.length - 2);
+- name = ctx.stylize(name, 'name');
+- } else {
+- name = name.replace(/'/g, "\\'")
+- .replace(/\\"/g, '"')
+- .replace(/(^"|"$)/g, "'");
+- name = ctx.stylize(name, 'string');
+- }
+- }
+-
+- return name + ': ' + str;
+-}
+-
+-
+-function reduceToSingleString(output, base, braces) {
+- var numLinesEst = 0;
+- var length = output.reduce(function(prev, cur) {
+- numLinesEst++;
+- if (cur.indexOf('\n') >= 0) numLinesEst++;
+- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+- }, 0);
+-
+- if (length > 60) {
+- return braces[0] +
+- (base === '' ? '' : base + '\n ') +
+- ' ' +
+- output.join(',\n ') +
+- ' ' +
+- braces[1];
+- }
+-
+- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+-}
+-
+-
+ // NOTE: These type checking functions intentionally don't use `instanceof`
+ // because it is fragile and can be easily faked with `Object.create()`.
+ function isArray(ar) {
+@@ -522,166 +98,10 @@ function isPrimitive(arg) {
+ exports.isPrimitive = isPrimitive;
+
+ function isBuffer(arg) {
+- return arg instanceof Buffer;
++ return Buffer.isBuffer(arg);
+ }
+ exports.isBuffer = isBuffer;
+
+ function objectToString(o) {
+ return Object.prototype.toString.call(o);
+-}
+-
+-
+-function pad(n) {
+- return n < 10 ? '0' + n.toString(10) : n.toString(10);
+-}
+-
+-
+-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+- 'Oct', 'Nov', 'Dec'];
+-
+-// 26 Feb 16:19:34
+-function timestamp() {
+- var d = new Date();
+- var time = [pad(d.getHours()),
+- pad(d.getMinutes()),
+- pad(d.getSeconds())].join(':');
+- return [d.getDate(), months[d.getMonth()], time].join(' ');
+-}
+-
+-
+-// log is just a thin wrapper to console.log that prepends a timestamp
+-exports.log = function() {
+- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+-};
+-
+-
+-/**
+- * Inherit the prototype methods from one constructor into another.
+- *
+- * The Function.prototype.inherits from lang.js rewritten as a standalone
+- * function (not on Function.prototype). NOTE: If this file is to be loaded
+- * during bootstrapping this function needs to be rewritten using some native
+- * functions as prototype setup using normal JavaScript does not work as
+- * expected during bootstrapping (see mirror.js in r114903).
+- *
+- * @param {function} ctor Constructor function which needs to inherit the
+- * prototype.
+- * @param {function} superCtor Constructor function to inherit prototype from.
+- */
+-exports.inherits = function(ctor, superCtor) {
+- ctor.super_ = superCtor;
+- ctor.prototype = Object.create(superCtor.prototype, {
+- constructor: {
+- value: ctor,
+- enumerable: false,
+- writable: true,
+- configurable: true
+- }
+- });
+-};
+-
+-exports._extend = function(origin, add) {
+- // Don't do anything if add isn't an object
+- if (!add || !isObject(add)) return origin;
+-
+- var keys = Object.keys(add);
+- var i = keys.length;
+- while (i--) {
+- origin[keys[i]] = add[keys[i]];
+- }
+- return origin;
+-};
+-
+-function hasOwnProperty(obj, prop) {
+- return Object.prototype.hasOwnProperty.call(obj, prop);
+-}
+-
+-
+-// Deprecated old stuff.
+-
+-exports.p = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- console.error(exports.inspect(arguments[i]));
+- }
+-}, 'util.p: Use console.error() instead');
+-
+-
+-exports.exec = exports.deprecate(function() {
+- return require('child_process').exec.apply(this, arguments);
+-}, 'util.exec is now called `child_process.exec`.');
+-
+-
+-exports.print = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(String(arguments[i]));
+- }
+-}, 'util.print: Use console.log instead');
+-
+-
+-exports.puts = exports.deprecate(function() {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stdout.write(arguments[i] + '\n');
+- }
+-}, 'util.puts: Use console.log instead');
+-
+-
+-exports.debug = exports.deprecate(function(x) {
+- process.stderr.write('DEBUG: ' + x + '\n');
+-}, 'util.debug: Use console.error instead');
+-
+-
+-exports.error = exports.deprecate(function(x) {
+- for (var i = 0, len = arguments.length; i < len; ++i) {
+- process.stderr.write(arguments[i] + '\n');
+- }
+-}, 'util.error: Use console.error instead');
+-
+-
+-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
+- var callbackCalled = false;
+-
+- function call(a, b, c) {
+- if (callback && !callbackCalled) {
+- callback(a, b, c);
+- callbackCalled = true;
+- }
+- }
+-
+- readStream.addListener('data', function(chunk) {
+- if (writeStream.write(chunk) === false) readStream.pause();
+- });
+-
+- writeStream.addListener('drain', function() {
+- readStream.resume();
+- });
+-
+- readStream.addListener('end', function() {
+- writeStream.end();
+- });
+-
+- readStream.addListener('close', function() {
+- call();
+- });
+-
+- readStream.addListener('error', function(err) {
+- writeStream.end();
+- call(err);
+- });
+-
+- writeStream.addListener('error', function(err) {
+- readStream.destroy();
+- call(err);
+- });
+-}, 'util.pump(): Use readableStream.pipe() instead');
+-
+-
+-var uv;
+-exports._errnoException = function(err, syscall) {
+- if (isUndefined(uv)) uv = process.binding('uv');
+- var errname = uv.errname(err);
+- var e = new Error(syscall + ' ' + errname);
+- e.code = errname;
+- e.errno = errname;
+- e.syscall = syscall;
+- return e;
+-};
++} \ No newline at end of file
diff --git a/node_modules/core-util-is/lib/util.js b/node_modules/core-util-is/lib/util.js
new file mode 100644
index 0000000..ff4c851
--- /dev/null
+++ b/node_modules/core-util-is/lib/util.js
@@ -0,0 +1,107 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+
+function isArray(arg) {
+ if (Array.isArray) {
+ return Array.isArray(arg);
+ }
+ return objectToString(arg) === '[object Array]';
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = Buffer.isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json
new file mode 100644
index 0000000..3368e95
--- /dev/null
+++ b/node_modules/core-util-is/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "core-util-is",
+ "version": "1.0.2",
+ "description": "The `util.is*` functions introduced in Node v0.12.",
+ "main": "lib/util.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/core-util-is"
+ },
+ "keywords": [
+ "util",
+ "isBuffer",
+ "isArray",
+ "isNumber",
+ "isString",
+ "isRegExp",
+ "isThis",
+ "isThat",
+ "polyfill"
+ ],
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/isaacs/core-util-is/issues"
+ },
+ "scripts": {
+ "test": "tap test.js"
+ },
+ "devDependencies": {
+ "tap": "^2.3.0"
+ }
+}
diff --git a/node_modules/core-util-is/test.js b/node_modules/core-util-is/test.js
new file mode 100644
index 0000000..1a490c6
--- /dev/null
+++ b/node_modules/core-util-is/test.js
@@ -0,0 +1,68 @@
+var assert = require('tap');
+
+var t = require('./lib/util');
+
+assert.equal(t.isArray([]), true);
+assert.equal(t.isArray({}), false);
+
+assert.equal(t.isBoolean(null), false);
+assert.equal(t.isBoolean(true), true);
+assert.equal(t.isBoolean(false), true);
+
+assert.equal(t.isNull(null), true);
+assert.equal(t.isNull(undefined), false);
+assert.equal(t.isNull(false), false);
+assert.equal(t.isNull(), false);
+
+assert.equal(t.isNullOrUndefined(null), true);
+assert.equal(t.isNullOrUndefined(undefined), true);
+assert.equal(t.isNullOrUndefined(false), false);
+assert.equal(t.isNullOrUndefined(), true);
+
+assert.equal(t.isNumber(null), false);
+assert.equal(t.isNumber('1'), false);
+assert.equal(t.isNumber(1), true);
+
+assert.equal(t.isString(null), false);
+assert.equal(t.isString('1'), true);
+assert.equal(t.isString(1), false);
+
+assert.equal(t.isSymbol(null), false);
+assert.equal(t.isSymbol('1'), false);
+assert.equal(t.isSymbol(1), false);
+assert.equal(t.isSymbol(Symbol()), true);
+
+assert.equal(t.isUndefined(null), false);
+assert.equal(t.isUndefined(undefined), true);
+assert.equal(t.isUndefined(false), false);
+assert.equal(t.isUndefined(), true);
+
+assert.equal(t.isRegExp(null), false);
+assert.equal(t.isRegExp('1'), false);
+assert.equal(t.isRegExp(new RegExp()), true);
+
+assert.equal(t.isObject({}), true);
+assert.equal(t.isObject([]), true);
+assert.equal(t.isObject(new RegExp()), true);
+assert.equal(t.isObject(new Date()), true);
+
+assert.equal(t.isDate(null), false);
+assert.equal(t.isDate('1'), false);
+assert.equal(t.isDate(new Date()), true);
+
+assert.equal(t.isError(null), false);
+assert.equal(t.isError({ err: true }), false);
+assert.equal(t.isError(new Error()), true);
+
+assert.equal(t.isFunction(null), false);
+assert.equal(t.isFunction({ }), false);
+assert.equal(t.isFunction(function() {}), true);
+
+assert.equal(t.isPrimitive(null), true);
+assert.equal(t.isPrimitive(''), true);
+assert.equal(t.isPrimitive(0), true);
+assert.equal(t.isPrimitive(new Date()), false);
+
+assert.equal(t.isBuffer(null), false);
+assert.equal(t.isBuffer({}), false);
+assert.equal(t.isBuffer(new Buffer(0)), true);
diff --git a/node_modules/cross-spawn-windows-exe/LICENSE b/node_modules/cross-spawn-windows-exe/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/cross-spawn-windows-exe/README.md b/node_modules/cross-spawn-windows-exe/README.md
new file mode 100644
index 0000000..0fb5ad0
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/README.md
@@ -0,0 +1,67 @@
+# `cross-spawn-windows-exe`
+
+> Cross-platform support for running Windows executables via Node.js.
+
+[![CI](https://github.com/malept/cross-spawn-windows-exe/workflows/CI/badge.svg)](https://github.com/malept/cross-spawn-windows-exe/actions?query=workflow%3ACI)
+[![codecov](https://codecov.io/gh/malept/cross-spawn-windows-exe/branch/main/graph/badge.svg)](https://codecov.io/gh/malept/cross-spawn-windows-exe)
+
+Utilizes [`@malept/cross-spawn-promise`](https://npm.im/@malept/cross-spawn-promise) (and by
+extension, [`cross-spawn`](https://npm.im/cross-spawn)) to execute Windows executables regardless
+of platform.
+
+For all platforms, Node 10 or above is required.
+
+On non-Windows, non-WSL host systems, the following dependencies are required:
+
+- .NET executables: [Mono](https://www.mono-project.com/)
+- All other Windows executables: [Wine](https://www.winehq.org/)
+
+## Usage
+
+Using the `cross-spawn-windows-exe` API is similar in terms of function signature to `spawn` in
+`@malept/cross-spawn-promise`.
+
+### Running a .NET executable
+
+```javascript
+// Note: top-level await exists in Node >= 14.8.0. In earlier versions of Node, please wrap in an
+// async function.
+
+const { spawnDotNet } = require("cross-spawn-windows-exe");
+
+await spawnDotNet("./hellodotnet.exe", ["--arg1"]);
+```
+
+### Running a Windows executable
+
+```javascript
+// Note: top-level await exists in Node >= 14.8.0. In earlier versions of Node, please wrap in an
+// async function.
+
+const { spawnExe } = require("cross-spawn-windows-exe");
+
+await spawnExe("./hellowindows.exe", ["--arg1"]);
+```
+
+### Normalizing Paths
+
+Executables generally can't handle UNIX-style paths that Windows Subsystem for Linux (WSL) passes
+in, since it's a Linux environment. This module provides a function to convert those paths from
+UNIX-style to Windows-style (via `wslpath`, which should be installed by default on every WSL
+distribution), if the host system is determined to be WSL. For non-WSL environments, this is a
+no-op.
+
+```javascript
+// Note: top-level await exists in Node >= 14.8.0. In earlier versions of Node, please wrap in an
+// async function.
+
+const { normalizePath, spawnExe } = require("cross-spawn-windows-exe");
+
+const normalizedPath = await normalizePath("/tmp/foo");
+await spawnExe("./openfile.exe", ["--filename", normalizedPath]);
+```
+
+## Legal
+
+This module is licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
+See `LICENSE` for details.
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/arch.d.ts b/node_modules/cross-spawn-windows-exe/dist/src/arch.d.ts
new file mode 100644
index 0000000..9bccafd
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/arch.d.ts
@@ -0,0 +1,6 @@
+/**
+ * Determines whether the given architecture is a 64-bit arch.
+ *
+ * @param arch - a Node.js-style architecture name
+ */
+export declare function is64BitArch(arch: string): boolean;
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/arch.js b/node_modules/cross-spawn-windows-exe/dist/src/arch.js
new file mode 100644
index 0000000..e9ed6a3
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/arch.js
@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.is64BitArch = void 0;
+// List of Node.js-formatted 64 bit arches
+const SIXTY_FOUR_BIT_ARCHES = ["arm64", "x64"];
+/**
+ * Determines whether the given architecture is a 64-bit arch.
+ *
+ * @param arch - a Node.js-style architecture name
+ */
+function is64BitArch(arch) {
+ return SIXTY_FOUR_BIT_ARCHES.includes(arch);
+}
+exports.is64BitArch = is64BitArch;
+//# sourceMappingURL=arch.js.map \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/arch.js.map b/node_modules/cross-spawn-windows-exe/dist/src/arch.js.map
new file mode 100644
index 0000000..4b70fd6
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/arch.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"arch.js","sourceRoot":"","sources":["../../src/arch.ts"],"names":[],"mappings":";;;AAAA,0CAA0C;AAC1C,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAE/C;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAY;IACtC,OAAO,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAFD,kCAEC"} \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/dotnet.d.ts b/node_modules/cross-spawn-windows-exe/dist/src/dotnet.d.ts
new file mode 100644
index 0000000..2d47c99
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/dotnet.d.ts
@@ -0,0 +1,22 @@
+import { CrossSpawnArgs } from "@malept/cross-spawn-promise";
+import { CrossSpawnExeOptions } from "./wrapper";
+/**
+ * Installation instructions for dependencies related to running .NET executables on the
+ * host platform (i.e., Mono on non-Windows platforms).
+ */
+export declare function dotNetDependencyInstallInstructions(): string;
+/**
+ * Heuristically determine the path to `mono` to use.
+ *
+ * Method used to determine the path:
+ *
+ * 1. `customDotNetPath`, if provided to the function
+ * 2. The `MONO_BINARY` environment variable, if set and non-empty
+ * 3. `mono` found by searching the directories in the `PATH` environment variable
+ */
+export declare function determineDotNetWrapper(customDotNetPath?: string): string;
+/**
+ * Spawn a .NET executable. On non-Windows platforms, use [Nono](https://www.mono-project.com/)
+ * to run it.
+ */
+export declare function spawnDotNet(cmd: string, args?: CrossSpawnArgs, options?: CrossSpawnExeOptions): Promise<string>;
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/dotnet.js b/node_modules/cross-spawn-windows-exe/dist/src/dotnet.js
new file mode 100644
index 0000000..ca6fc75
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/dotnet.js
@@ -0,0 +1,54 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.spawnDotNet = exports.determineDotNetWrapper = exports.dotNetDependencyInstallInstructions = void 0;
+const wrapper_1 = require("./wrapper");
+/**
+ * Installation instructions for dependencies related to running .NET executables on the
+ * host platform (i.e., Mono on non-Windows platforms).
+ */
+function dotNetDependencyInstallInstructions() {
+ switch (process.platform) {
+ /* istanbul ignore next */
+ case "win32":
+ return "No wrapper necessary";
+ case "darwin":
+ return "Run `brew install mono` to install Mono on macOS via Homebrew.";
+ case "linux":
+ return "Consult your Linux distribution's package manager to determine how to install Mono.";
+ /* istanbul ignore next */
+ default:
+ return "Consult your operating system's package manager to determine how to install Mono.";
+ }
+}
+exports.dotNetDependencyInstallInstructions = dotNetDependencyInstallInstructions;
+/**
+ * Heuristically determine the path to `mono` to use.
+ *
+ * Method used to determine the path:
+ *
+ * 1. `customDotNetPath`, if provided to the function
+ * 2. The `MONO_BINARY` environment variable, if set and non-empty
+ * 3. `mono` found by searching the directories in the `PATH` environment variable
+ */
+function determineDotNetWrapper(customDotNetPath) {
+ if (customDotNetPath) {
+ return customDotNetPath;
+ }
+ if (process.env.MONO_BINARY) {
+ return process.env.MONO_BINARY;
+ }
+ return "mono";
+}
+exports.determineDotNetWrapper = determineDotNetWrapper;
+/**
+ * Spawn a .NET executable. On non-Windows platforms, use [Nono](https://www.mono-project.com/)
+ * to run it.
+ */
+async function spawnDotNet(cmd, args, options) {
+ var _a;
+ options !== null && options !== void 0 ? options : (options = {});
+ (_a = options.wrapperInstructions) !== null && _a !== void 0 ? _a : (options.wrapperInstructions = dotNetDependencyInstallInstructions());
+ return wrapper_1.spawnWrapperFromFunction(determineDotNetWrapper, cmd, args, options);
+}
+exports.spawnDotNet = spawnDotNet;
+//# sourceMappingURL=dotnet.js.map \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/dotnet.js.map b/node_modules/cross-spawn-windows-exe/dist/src/dotnet.js.map
new file mode 100644
index 0000000..cc4d3e1
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/dotnet.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"dotnet.js","sourceRoot":"","sources":["../../src/dotnet.ts"],"names":[],"mappings":";;;AACA,uCAA2E;AAE3E;;;GAGG;AACH,SAAgB,mCAAmC;IACjD,QAAQ,OAAO,CAAC,QAAQ,EAAE;QACxB,0BAA0B;QAC1B,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC;QAChC,KAAK,QAAQ;YACX,OAAO,gEAAgE,CAAC;QAC1E,KAAK,OAAO;YACV,OAAO,qFAAqF,CAAC;QAC/F,0BAA0B;QAC1B;YACE,OAAO,mFAAmF,CAAC;KAC9F;AACH,CAAC;AAbD,kFAaC;AAED;;;;;;;;GAQG;AACH,SAAgB,sBAAsB,CAAC,gBAAyB;IAC9D,IAAI,gBAAgB,EAAE;QACpB,OAAO,gBAAgB,CAAC;KACzB;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;KAChC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAVD,wDAUC;AAED;;;GAGG;AACI,KAAK,UAAU,WAAW,CAC/B,GAAW,EACX,IAAqB,EACrB,OAA8B;;IAE9B,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAAE,EAAC;IACf,MAAA,OAAO,CAAC,mBAAmB,oCAA3B,OAAO,CAAC,mBAAmB,GAAK,mCAAmC,EAAE,EAAC;IACtE,OAAO,kCAAwB,CAAC,sBAAsB,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AARD,kCAQC"} \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/exe.d.ts b/node_modules/cross-spawn-windows-exe/dist/src/exe.d.ts
new file mode 100644
index 0000000..3c54957
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/exe.d.ts
@@ -0,0 +1,24 @@
+import { CrossSpawnArgs } from "@malept/cross-spawn-promise";
+import { CrossSpawnExeOptions } from "./wrapper";
+/**
+ * Installation instructions for dependencies related to running Windows executables on the
+ * host platform (i.e., Wine on non-Windows platforms).
+ */
+export declare function exeDependencyInstallInstructions(): string;
+/**
+ * Heuristically determine the path to `wine` to use.
+ *
+ * Method used to determine the path:
+ *
+ * 1. `customWinePath`, if provided to the function
+ * 2. The `WINE_BINARY` environment variable, if set and non-empty
+ * 3. If the host architecture is x86-64, `wine64` found by searching the directories in the `PATH`
+ * environment variable
+ * 4. `wine` found by searching the directories in the `PATH` environment variable
+ */
+export declare function determineWineWrapper(customWinePath?: string): string;
+/**
+ * Spawn a Windows executable. On non-Windows platforms, use [Wine](https://www.winehq.org/)
+ * to run it.
+ */
+export declare function spawnExe(cmd: string, args?: CrossSpawnArgs, options?: CrossSpawnExeOptions): Promise<string>;
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/exe.js b/node_modules/cross-spawn-windows-exe/dist/src/exe.js
new file mode 100644
index 0000000..228d860
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/exe.js
@@ -0,0 +1,60 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.spawnExe = exports.determineWineWrapper = exports.exeDependencyInstallInstructions = void 0;
+const wrapper_1 = require("./wrapper");
+const arch_1 = require("./arch");
+/**
+ * Installation instructions for dependencies related to running Windows executables on the
+ * host platform (i.e., Wine on non-Windows platforms).
+ */
+function exeDependencyInstallInstructions() {
+ switch (process.platform) {
+ /* istanbul ignore next */
+ case "win32":
+ return "No wrapper necessary";
+ case "darwin":
+ return "Run `brew install --cask wine-stable` to install 64-bit wine on macOS via Homebrew.";
+ case "linux":
+ return "Consult your Linux distribution's package manager to determine how to install Wine.";
+ /* istanbul ignore next */
+ default:
+ return "Consult your operating system's package manager to determine how to install Wine.";
+ }
+}
+exports.exeDependencyInstallInstructions = exeDependencyInstallInstructions;
+/**
+ * Heuristically determine the path to `wine` to use.
+ *
+ * Method used to determine the path:
+ *
+ * 1. `customWinePath`, if provided to the function
+ * 2. The `WINE_BINARY` environment variable, if set and non-empty
+ * 3. If the host architecture is x86-64, `wine64` found by searching the directories in the `PATH`
+ * environment variable
+ * 4. `wine` found by searching the directories in the `PATH` environment variable
+ */
+function determineWineWrapper(customWinePath) {
+ if (customWinePath) {
+ return customWinePath;
+ }
+ if (process.env.WINE_BINARY) {
+ return process.env.WINE_BINARY;
+ }
+ if (arch_1.is64BitArch(process.arch)) {
+ return "wine64";
+ }
+ return "wine";
+}
+exports.determineWineWrapper = determineWineWrapper;
+/**
+ * Spawn a Windows executable. On non-Windows platforms, use [Wine](https://www.winehq.org/)
+ * to run it.
+ */
+async function spawnExe(cmd, args, options) {
+ var _a;
+ options !== null && options !== void 0 ? options : (options = {});
+ (_a = options.wrapperInstructions) !== null && _a !== void 0 ? _a : (options.wrapperInstructions = exeDependencyInstallInstructions());
+ return wrapper_1.spawnWrapperFromFunction(determineWineWrapper, cmd, args, options);
+}
+exports.spawnExe = spawnExe;
+//# sourceMappingURL=exe.js.map \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/exe.js.map b/node_modules/cross-spawn-windows-exe/dist/src/exe.js.map
new file mode 100644
index 0000000..a79ba22
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/exe.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"exe.js","sourceRoot":"","sources":["../../src/exe.ts"],"names":[],"mappings":";;;AACA,uCAA2E;AAC3E,iCAAqC;AAErC;;;GAGG;AACH,SAAgB,gCAAgC;IAC9C,QAAQ,OAAO,CAAC,QAAQ,EAAE;QACxB,0BAA0B;QAC1B,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC;QAChC,KAAK,QAAQ;YACX,OAAO,qFAAqF,CAAC;QAC/F,KAAK,OAAO;YACV,OAAO,qFAAqF,CAAC;QAC/F,0BAA0B;QAC1B;YACE,OAAO,mFAAmF,CAAC;KAC9F;AACH,CAAC;AAbD,4EAaC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,oBAAoB,CAAC,cAAuB;IAC1D,IAAI,cAAc,EAAE;QAClB,OAAO,cAAc,CAAC;KACvB;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;KAChC;IAED,IAAI,kBAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC7B,OAAO,QAAQ,CAAC;KACjB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAdD,oDAcC;AAED;;;GAGG;AACI,KAAK,UAAU,QAAQ,CAC5B,GAAW,EACX,IAAqB,EACrB,OAA8B;;IAE9B,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAAE,EAAC;IACf,MAAA,OAAO,CAAC,mBAAmB,oCAA3B,OAAO,CAAC,mBAAmB,GAAK,gCAAgC,EAAE,EAAC;IACnE,OAAO,kCAAwB,CAAC,oBAAoB,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC;AARD,4BAQC"} \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/index.d.ts b/node_modules/cross-spawn-windows-exe/dist/src/index.d.ts
new file mode 100644
index 0000000..d1c8b39
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/index.d.ts
@@ -0,0 +1,5 @@
+export { canRunWindowsExeNatively, CrossSpawnExeOptions, DetermineWrapperFunction, spawnWrapper as spawn, spawnWrapperFromFunction, WrapperError, } from "./wrapper";
+export { is64BitArch } from "./arch";
+export { normalizePath } from "./normalize-path";
+export { dotNetDependencyInstallInstructions, spawnDotNet } from "./dotnet";
+export { exeDependencyInstallInstructions, spawnExe } from "./exe";
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/index.js b/node_modules/cross-spawn-windows-exe/dist/src/index.js
new file mode 100644
index 0000000..d4327be
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/index.js
@@ -0,0 +1,19 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.spawnExe = exports.exeDependencyInstallInstructions = exports.spawnDotNet = exports.dotNetDependencyInstallInstructions = exports.normalizePath = exports.is64BitArch = exports.WrapperError = exports.spawnWrapperFromFunction = exports.spawn = exports.canRunWindowsExeNatively = void 0;
+var wrapper_1 = require("./wrapper");
+Object.defineProperty(exports, "canRunWindowsExeNatively", { enumerable: true, get: function () { return wrapper_1.canRunWindowsExeNatively; } });
+Object.defineProperty(exports, "spawn", { enumerable: true, get: function () { return wrapper_1.spawnWrapper; } });
+Object.defineProperty(exports, "spawnWrapperFromFunction", { enumerable: true, get: function () { return wrapper_1.spawnWrapperFromFunction; } });
+Object.defineProperty(exports, "WrapperError", { enumerable: true, get: function () { return wrapper_1.WrapperError; } });
+var arch_1 = require("./arch");
+Object.defineProperty(exports, "is64BitArch", { enumerable: true, get: function () { return arch_1.is64BitArch; } });
+var normalize_path_1 = require("./normalize-path");
+Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return normalize_path_1.normalizePath; } });
+var dotnet_1 = require("./dotnet");
+Object.defineProperty(exports, "dotNetDependencyInstallInstructions", { enumerable: true, get: function () { return dotnet_1.dotNetDependencyInstallInstructions; } });
+Object.defineProperty(exports, "spawnDotNet", { enumerable: true, get: function () { return dotnet_1.spawnDotNet; } });
+var exe_1 = require("./exe");
+Object.defineProperty(exports, "exeDependencyInstallInstructions", { enumerable: true, get: function () { return exe_1.exeDependencyInstallInstructions; } });
+Object.defineProperty(exports, "spawnExe", { enumerable: true, get: function () { return exe_1.spawnExe; } });
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/index.js.map b/node_modules/cross-spawn-windows-exe/dist/src/index.js.map
new file mode 100644
index 0000000..dd2399a
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAOmB;AANjB,mHAAA,wBAAwB,OAAA;AAGxB,gGAAA,YAAY,OAAS;AACrB,mHAAA,wBAAwB,OAAA;AACxB,uGAAA,YAAY,OAAA;AAGd,+BAAqC;AAA5B,mGAAA,WAAW,OAAA;AACpB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AAEtB,mCAA4E;AAAnE,6HAAA,mCAAmC,OAAA;AAAE,qGAAA,WAAW,OAAA;AACzD,6BAAmE;AAA1D,uHAAA,gCAAgC,OAAA;AAAE,+FAAA,QAAQ,OAAA"} \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.d.ts b/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.d.ts
new file mode 100644
index 0000000..2c13c9b
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.d.ts
@@ -0,0 +1,9 @@
+/**
+ * Converts a UNIX-style path to a Windows-style path via `wslpath`, which should come with any
+ * WSL distribution.
+ */
+export declare function convertUNIXPathToWindows(wslPath: string): Promise<string>;
+/**
+ * Converts a UNIX-style path to a Windows-style path if run in a WSL environment.
+ */
+export declare function normalizePath(pathToNormalize: string): Promise<string>;
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js b/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js
new file mode 100644
index 0000000..0b07b45
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js
@@ -0,0 +1,38 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.normalizePath = exports.convertUNIXPathToWindows = void 0;
+const is_wsl_1 = __importDefault(require("is-wsl"));
+const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
+/**
+ * Provides a human-friendly error message when `@malept/cross-spawn-promise` can't find `wslpath`.
+ */
+function updateWSLPathError(error) {
+ if (error.code === "ENOENT" && error.syscall === "spawn wslpath") {
+ error.message = `Could not find 'wslpath' in any of the directories listed in the PATH environment variable, which is needed to convert WSL paths to Windows-style paths.`;
+ }
+}
+/**
+ * Converts a UNIX-style path to a Windows-style path via `wslpath`, which should come with any
+ * WSL distribution.
+ */
+async function convertUNIXPathToWindows(wslPath) {
+ const output = await cross_spawn_promise_1.spawn("wslpath", ["-w", wslPath], {
+ updateErrorCallback: updateWSLPathError,
+ });
+ return output.trim();
+}
+exports.convertUNIXPathToWindows = convertUNIXPathToWindows;
+/**
+ * Converts a UNIX-style path to a Windows-style path if run in a WSL environment.
+ */
+async function normalizePath(pathToNormalize) {
+ if (is_wsl_1.default) {
+ return convertUNIXPathToWindows(pathToNormalize);
+ }
+ return pathToNormalize;
+}
+exports.normalizePath = normalizePath;
+//# sourceMappingURL=normalize-path.js.map \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js.map b/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js.map
new file mode 100644
index 0000000..8f8630e
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/normalize-path.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"normalize-path.js","sourceRoot":"","sources":["../../src/normalize-path.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA2B;AAC3B,qEAAoD;AAEpD;;GAEG;AACH,SAAS,kBAAkB,CAAC,KAA4B;IACtD,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,KAAK,eAAe,EAAE;QAChE,KAAK,CAAC,OAAO,GAAG,0JAA0J,CAAC;KAC5K;AACH,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,wBAAwB,CAC5C,OAAe;IAEf,MAAM,MAAM,GAAG,MAAM,2BAAK,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QACrD,mBAAmB,EAAE,kBAAkB;KACxC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC;AAPD,4DAOC;AAED;;GAEG;AACI,KAAK,UAAU,aAAa,CAAC,eAAuB;IACzD,IAAI,gBAAK,EAAE;QACT,OAAO,wBAAwB,CAAC,eAAe,CAAC,CAAC;KAClD;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAND,sCAMC"} \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/wrapper.d.ts b/node_modules/cross-spawn-windows-exe/dist/src/wrapper.d.ts
new file mode 100644
index 0000000..dda92f9
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/wrapper.d.ts
@@ -0,0 +1,50 @@
+import { CrossSpawnArgs, CrossSpawnOptions } from "@malept/cross-spawn-promise";
+export declare function canRunWindowsExeNatively(): boolean;
+/**
+ * The exception thrown when the wrapper command could not be found to execute.
+ */
+export declare class WrapperError extends Error {
+ /**
+ * @param wrapperCommand - The wrapper that tried to be executed
+ * @param installInstructions - Instructions on how to install the wrapper
+ */
+ constructor(wrapperCommand: string, installInstructions?: string);
+}
+/**
+ * A function which determines the wrapper path or binary to use in [[spawnWrapper]].
+ *
+ * @param customPath - The path specified by [[CrossSpawnExeOptions|CrossSpawnExeOptions.wrapperCommand]], usually
+ * prioritized over other paths/binaries in the function.
+ */
+export declare type DetermineWrapperFunction = (customPath?: string) => string;
+/**
+ * An extension to `CrossSpawnOptions` to optionally specify a custom wrapper command and
+ * instructions to install the wrapper.
+ */
+export declare type CrossSpawnExeOptions = CrossSpawnOptions & {
+ /**
+ * The path to a binary that wraps the called executable.
+ *
+ * Defaults to `wine64` or `wine`, depending on the host machine's architecture.
+ */
+ wrapperCommand?: string;
+ /**
+ * Instructions for installing the wrapper binary.
+ */
+ wrapperInstructions?: string;
+};
+/**
+ * Determines if the specified command exists, either in the `PATH` environment variable or if the
+ * absolute path exists.
+ */
+export declare function wrapperCommandExists(wrapperCommand: string): Promise<boolean>;
+/**
+ * A wrapper for `cross-spawn`'s `spawn` function that wraps the `cmd` with `wrapperCommand` if it
+ * is specified.
+ */
+export declare function spawnWrapper(cmd: string, args?: CrossSpawnArgs, options?: CrossSpawnExeOptions): Promise<string>;
+/**
+ * A helper variant of [[spawnWrapper]] which uses a [[DetermineWrapperFunction]] to
+ * determine `wrapperCommand`.
+ */
+export declare function spawnWrapperFromFunction(wrapperFunction: DetermineWrapperFunction, cmd: string, args?: CrossSpawnArgs, options?: CrossSpawnExeOptions): Promise<string>;
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js b/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js
new file mode 100644
index 0000000..26154ff
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js
@@ -0,0 +1,98 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.spawnWrapperFromFunction = exports.spawnWrapper = exports.wrapperCommandExists = exports.WrapperError = exports.canRunWindowsExeNatively = void 0;
+const cross_spawn_promise_1 = require("@malept/cross-spawn-promise");
+const fs = __importStar(require("fs"));
+const is_wsl_1 = __importDefault(require("is-wsl"));
+const path = __importStar(require("path"));
+const which_1 = __importDefault(require("which"));
+function canRunWindowsExeNatively() {
+ return process.platform === "win32" || is_wsl_1.default;
+}
+exports.canRunWindowsExeNatively = canRunWindowsExeNatively;
+/**
+ * The exception thrown when the wrapper command could not be found to execute.
+ */
+class WrapperError extends Error {
+ /**
+ * @param wrapperCommand - The wrapper that tried to be executed
+ * @param installInstructions - Instructions on how to install the wrapper
+ */
+ constructor(wrapperCommand, installInstructions) {
+ const message = `Wrapper command '${wrapperCommand}' not found on the system.${installInstructions ? " " + installInstructions : ""}`;
+ super(message);
+ }
+}
+exports.WrapperError = WrapperError;
+/**
+ * Determines if the specified command exists, either in the `PATH` environment variable or if the
+ * absolute path exists.
+ */
+async function wrapperCommandExists(wrapperCommand) {
+ if (path.isAbsolute(wrapperCommand)) {
+ return fs.existsSync(wrapperCommand);
+ }
+ else {
+ try {
+ await which_1.default(wrapperCommand);
+ return true;
+ }
+ catch (_a) {
+ return false;
+ }
+ }
+}
+exports.wrapperCommandExists = wrapperCommandExists;
+/**
+ * A wrapper for `cross-spawn`'s `spawn` function that wraps the `cmd` with `wrapperCommand` if it
+ * is specified.
+ */
+async function spawnWrapper(cmd, args, options) {
+ options !== null && options !== void 0 ? options : (options = {});
+ const { wrapperCommand, wrapperInstructions, ...crossSpawnOptions } = options;
+ if (wrapperCommand) {
+ if (!(await wrapperCommandExists(wrapperCommand))) {
+ throw new WrapperError(wrapperCommand, wrapperInstructions);
+ }
+ const augmentedArgs = args ? [cmd, ...args] : [cmd];
+ return cross_spawn_promise_1.spawn(wrapperCommand, augmentedArgs, crossSpawnOptions);
+ }
+ return cross_spawn_promise_1.spawn(cmd, args, crossSpawnOptions);
+}
+exports.spawnWrapper = spawnWrapper;
+/**
+ * A helper variant of [[spawnWrapper]] which uses a [[DetermineWrapperFunction]] to
+ * determine `wrapperCommand`.
+ */
+async function spawnWrapperFromFunction(wrapperFunction, cmd, args, options) {
+ let exeOptions = options;
+ if (!canRunWindowsExeNatively()) {
+ const wrapperCommand = wrapperFunction(options === null || options === void 0 ? void 0 : options.wrapperCommand);
+ exeOptions = options ? { ...options, wrapperCommand } : { wrapperCommand };
+ }
+ return spawnWrapper(cmd, args, exeOptions);
+}
+exports.spawnWrapperFromFunction = spawnWrapperFromFunction;
+//# sourceMappingURL=wrapper.js.map \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js.map b/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js.map
new file mode 100644
index 0000000..b5cdffb
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../src/wrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAIqC;AACrC,uCAAyB;AACzB,oDAA2B;AAC3B,2CAA6B;AAC7B,kDAA0B;AAE1B,SAAgB,wBAAwB;IACtC,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,IAAI,gBAAK,CAAC;AAC/C,CAAC;AAFD,4DAEC;AAED;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IACrC;;;OAGG;IACH,YAAY,cAAsB,EAAE,mBAA4B;QAC9D,MAAM,OAAO,GAAG,oBAAoB,cAAc,6BAChD,mBAAmB,CAAC,CAAC,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC,CAAC,EACpD,EAAE,CAAC;QACH,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAXD,oCAWC;AA4BD;;;GAGG;AACI,KAAK,UAAU,oBAAoB,CACxC,cAAsB;IAEtB,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;QACnC,OAAO,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;KACtC;SAAM;QACL,IAAI;YACF,MAAM,eAAK,CAAC,cAAc,CAAC,CAAC;YAC5B,OAAO,IAAI,CAAC;SACb;QAAC,WAAM;YACN,OAAO,KAAK,CAAC;SACd;KACF;AACH,CAAC;AAbD,oDAaC;AAED;;;GAGG;AACI,KAAK,UAAU,YAAY,CAChC,GAAW,EACX,IAAqB,EACrB,OAA8B;IAE9B,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAA0B,EAAC;IAEvC,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,GAAG,iBAAiB,EAAE,GAAG,OAAO,CAAC;IAC9E,IAAI,cAAc,EAAE;QAClB,IAAI,CAAC,CAAC,MAAM,oBAAoB,CAAC,cAAc,CAAC,CAAC,EAAE;YACjD,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;SAC7D;QAED,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAEpD,OAAO,2BAAK,CAAC,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;KAChE;IAED,OAAO,2BAAK,CAAC,GAAG,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;AAC7C,CAAC;AAnBD,oCAmBC;AAED;;;GAGG;AACI,KAAK,UAAU,wBAAwB,CAC5C,eAAyC,EACzC,GAAW,EACX,IAAqB,EACrB,OAA8B;IAE9B,IAAI,UAAU,GAAG,OAAO,CAAC;IACzB,IAAI,CAAC,wBAAwB,EAAE,EAAE;QAC/B,MAAM,cAAc,GAAW,eAAe,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,CAAC,CAAC;QACxE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC;KAC5E;IACD,OAAO,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAZD,4DAYC"} \ No newline at end of file
diff --git a/node_modules/cross-spawn-windows-exe/package.json b/node_modules/cross-spawn-windows-exe/package.json
new file mode 100644
index 0000000..7ae0b2d
--- /dev/null
+++ b/node_modules/cross-spawn-windows-exe/package.json
@@ -0,0 +1,153 @@
+{
+ "name": "cross-spawn-windows-exe",
+ "version": "1.2.0",
+ "description": "Cross-platform support for running Windows executables",
+ "main": "dist/src/index.js",
+ "files": [
+ "dist"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/malept/cross-spawn-windows-exe.git"
+ },
+ "bugs": {
+ "url": "https://github.com/malept/cross-spawn-windows-exe/issues"
+ },
+ "homepage": "https://github.com/malept/cross-spawn-windows-exe#readme",
+ "keywords": [
+ "cross-platform",
+ "spawn",
+ "windows",
+ "exe"
+ ],
+ "author": "Mark Lee",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 10"
+ },
+ "scripts": {
+ "ava": "ava",
+ "build": "tsc",
+ "coverage": "nyc --reporter=lcov --reporter=text ava",
+ "docs": "typedoc src/index.ts",
+ "lint": "prettier --check . && eslint --ext .ts .",
+ "prepare": "npm run build && husky install",
+ "test": "yarn lint && yarn ava"
+ },
+ "dependencies": {
+ "@malept/cross-spawn-promise": "^1.1.0",
+ "is-wsl": "^2.2.0",
+ "which": "^2.0.2"
+ },
+ "devDependencies": {
+ "@istanbuljs/nyc-config-typescript": "^1.0.1",
+ "@types/node": "^16.0.0",
+ "@types/sinon": "^10.0.0",
+ "@types/which": "^2.0.0",
+ "@typescript-eslint/eslint-plugin": "^4.3.0",
+ "@typescript-eslint/parser": "^4.3.0",
+ "ava": "^3.9.0",
+ "eslint": "^7.3.0",
+ "eslint-config-prettier": "^8.0.0",
+ "eslint-plugin-ava": "^12.0.0",
+ "eslint-plugin-import": "^2.21.2",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-prettier": "^3.1.4",
+ "eslint-plugin-promise": "^5.1.0",
+ "eslint-plugin-tsdoc": "^0.2.5",
+ "husky": "^6.0.0",
+ "lint-staged": "^11.0.0",
+ "nyc": "^15.1.0",
+ "prettier": "^2.0.5",
+ "sinon": "^11.1.0",
+ "source-map-support": "^0.5.19",
+ "ts-node": "^9.0.0",
+ "typedoc": "^0.20.0-beta.24",
+ "typescript": "~4.2.4"
+ },
+ "ava": {
+ "extensions": [
+ "ts"
+ ],
+ "require": [
+ "ts-node/register"
+ ],
+ "timeout": "3m"
+ },
+ "eslintConfig": {
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaVersion": "2018",
+ "sourceType": "module"
+ },
+ "plugins": [
+ "@typescript-eslint",
+ "eslint-plugin-tsdoc"
+ ],
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:ava/recommended",
+ "plugin:import/errors",
+ "plugin:import/warnings",
+ "plugin:import/typescript",
+ "plugin:node/recommended",
+ "plugin:prettier/recommended",
+ "plugin:promise/recommended",
+ "prettier"
+ ],
+ "rules": {
+ "node/no-unsupported-features/es-syntax": [
+ "error",
+ {
+ "ignores": [
+ "modules"
+ ]
+ }
+ ],
+ "strict": "error",
+ "tsdoc/syntax": "warn"
+ },
+ "overrides": [
+ {
+ "files": "test/*.ts",
+ "rules": {
+ "import/no-named-as-default-member": "off"
+ }
+ }
+ ],
+ "settings": {
+ "node": {
+ "tryExtensions": [
+ ".js",
+ ".json",
+ ".node",
+ ".ts"
+ ]
+ }
+ }
+ },
+ "eslintIgnore": [
+ "dist"
+ ],
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/malept"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/subscription/pkg/npm-cross-spawn-windows-exe?utm_medium=referral&utm_source=npm_fund"
+ }
+ ],
+ "lint-staged": {
+ "*.{json,md,yml}": "prettier --write",
+ "*.ts": [
+ "prettier --write",
+ "eslint --fix"
+ ]
+ },
+ "nyc": {
+ "extends": "@istanbuljs/nyc-config-typescript"
+ }
+}
diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md
new file mode 100644
index 0000000..d07c9e5
--- /dev/null
+++ b/node_modules/cross-spawn/CHANGELOG.md
@@ -0,0 +1,130 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+### [7.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.2...v7.0.3) (2020-05-25)
+
+
+### Bug Fixes
+
+* detect path key based on correct environment ([#133](https://github.com/moxystudio/node-cross-spawn/issues/133)) ([159e7e9](https://github.com/moxystudio/node-cross-spawn/commit/159e7e9785e57451cba034ae51719f97135074ae))
+
+### [7.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.1...v7.0.2) (2020-04-04)
+
+
+### Bug Fixes
+
+* fix worker threads in Node >=11.10.0 ([#132](https://github.com/moxystudio/node-cross-spawn/issues/132)) ([6c5b4f0](https://github.com/moxystudio/node-cross-spawn/commit/6c5b4f015814a6c4f6b33230dfd1a860aedc0aaf))
+
+### [7.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.0...v7.0.1) (2019-10-07)
+
+
+### Bug Fixes
+
+* **core:** support worker threads ([#127](https://github.com/moxystudio/node-cross-spawn/issues/127)) ([cfd49c9](https://github.com/moxystudio/node-cross-spawn/commit/cfd49c9))
+
+## [7.0.0](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v7.0.0) (2019-09-03)
+
+
+### ⚠ BREAKING CHANGES
+
+* drop support for Node.js < 8
+
+* drop support for versions below Node.js 8 ([#125](https://github.com/moxystudio/node-cross-spawn/issues/125)) ([16feb53](https://github.com/moxystudio/node-cross-spawn/commit/16feb53))
+
+<a name="6.0.5"></a>
+## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02)
+
+
+### Bug Fixes
+
+* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005)
+
+
+
+<a name="6.0.4"></a>
+## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31)
+
+
+### Bug Fixes
+
+* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90)
+
+
+
+<a name="6.0.3"></a>
+## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23)
+
+
+
+<a name="6.0.2"></a>
+## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23)
+
+
+
+<a name="6.0.1"></a>
+## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23)
+
+
+
+<a name="6.0.0"></a>
+# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23)
+
+
+### Bug Fixes
+
+* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51)
+* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
+* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
+* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
+
+
+### Features
+
+* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
+* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10))
+
+
+### Chores
+
+* upgrade tooling
+* upgrate project to es6 (node v4)
+
+
+### BREAKING CHANGES
+
+* remove support for older nodejs versions, only `node >= 4` is supported
+
+
+<a name="5.1.0"></a>
+## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26)
+
+
+### Bug Fixes
+
+* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0)
+
+
+<a name="5.0.1"></a>
+## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04)
+
+
+### Bug Fixes
+
+* fix `options.shell` support for NodeJS v7
+
+
+<a name="5.0.0"></a>
+# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30)
+
+
+## Features
+
+* add support for `options.shell`
+* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module
+
+
+## Chores
+
+* refactor some code to make it more clear
+* update README caveats
diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE
new file mode 100644
index 0000000..8407b9a
--- /dev/null
+++ b/node_modules/cross-spawn/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
+
+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/cross-spawn/README.md b/node_modules/cross-spawn/README.md
new file mode 100644
index 0000000..c4a4da8
--- /dev/null
+++ b/node_modules/cross-spawn/README.md
@@ -0,0 +1,96 @@
+# cross-spawn
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
+
+[npm-url]:https://npmjs.org/package/cross-spawn
+[downloads-image]:https://img.shields.io/npm/dm/cross-spawn.svg
+[npm-image]:https://img.shields.io/npm/v/cross-spawn.svg
+[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn
+[travis-image]:https://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg
+[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
+[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
+[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn
+[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg
+[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn
+[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg
+[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev
+[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg
+
+A cross platform solution to node's spawn and spawnSync.
+
+
+## Installation
+
+Node.js version 8 and up:
+`$ npm install cross-spawn`
+
+Node.js version 7 and under:
+`$ npm install cross-spawn@6`
+
+## Why
+
+Node has issues when using spawn on Windows:
+
+- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
+- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
+- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
+- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
+- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
+- No `options.shell` support on node `<v4.8`
+
+All these issues are handled correctly by `cross-spawn`.
+There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
+
+
+## Usage
+
+Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
+
+
+```js
+const spawn = require('cross-spawn');
+
+// Spawn NPM asynchronously
+const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
+
+// Spawn NPM synchronously
+const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
+```
+
+
+## Caveats
+
+### Using `options.shell` as an alternative to `cross-spawn`
+
+Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves
+the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but:
+
+- It's not supported in node `<v4.8`
+- You must manually escape the command and arguments which is very error prone, specially when passing user input
+- There are a lot of other unresolved issues from the [Why](#why) section that you must take into account
+
+If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
+
+### `options.shell` support
+
+While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its enhancements are disabled.
+
+This mimics the Node.js behavior. More specifically, the command and its arguments will not be automatically escaped nor shebang support will be offered. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway and you don't want things to get into your way.
+
+### Shebangs support
+
+While `cross-spawn` handles shebangs on Windows, its support is limited. More specifically, it just supports `#!/usr/bin/env <program>` where `<program>` must not contain any arguments.
+If you would like to have the shebang support improved, feel free to contribute via a pull-request.
+
+Remember to always test your code on Windows!
+
+
+## Tests
+
+`$ npm test`
+`$ npm test -- --watch` during development
+
+
+## License
+
+Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).
diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js
new file mode 100644
index 0000000..5509742
--- /dev/null
+++ b/node_modules/cross-spawn/index.js
@@ -0,0 +1,39 @@
+'use strict';
+
+const cp = require('child_process');
+const parse = require('./lib/parse');
+const enoent = require('./lib/enoent');
+
+function spawn(command, args, options) {
+ // Parse the arguments
+ const parsed = parse(command, args, options);
+
+ // Spawn the child process
+ const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
+
+ // Hook into child process "exit" event to emit an error if the command
+ // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ enoent.hookChildProcess(spawned, parsed);
+
+ return spawned;
+}
+
+function spawnSync(command, args, options) {
+ // Parse the arguments
+ const parsed = parse(command, args, options);
+
+ // Spawn the child process
+ const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
+
+ // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
+
+ return result;
+}
+
+module.exports = spawn;
+module.exports.spawn = spawn;
+module.exports.sync = spawnSync;
+
+module.exports._parse = parse;
+module.exports._enoent = enoent;
diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js
new file mode 100644
index 0000000..14df9b6
--- /dev/null
+++ b/node_modules/cross-spawn/lib/enoent.js
@@ -0,0 +1,59 @@
+'use strict';
+
+const isWin = process.platform === 'win32';
+
+function notFoundError(original, syscall) {
+ return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
+ code: 'ENOENT',
+ errno: 'ENOENT',
+ syscall: `${syscall} ${original.command}`,
+ path: original.command,
+ spawnargs: original.args,
+ });
+}
+
+function hookChildProcess(cp, parsed) {
+ if (!isWin) {
+ return;
+ }
+
+ const originalEmit = cp.emit;
+
+ cp.emit = function (name, arg1) {
+ // If emitting "exit" event and exit code is 1, we need to check if
+ // the command exists and emit an "error" instead
+ // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ if (name === 'exit') {
+ const err = verifyENOENT(arg1, parsed, 'spawn');
+
+ if (err) {
+ return originalEmit.call(cp, 'error', err);
+ }
+ }
+
+ return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
+ };
+}
+
+function verifyENOENT(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawn');
+ }
+
+ return null;
+}
+
+function verifyENOENTSync(status, parsed) {
+ if (isWin && status === 1 && !parsed.file) {
+ return notFoundError(parsed.original, 'spawnSync');
+ }
+
+ return null;
+}
+
+module.exports = {
+ hookChildProcess,
+ verifyENOENT,
+ verifyENOENTSync,
+ notFoundError,
+};
diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js
new file mode 100644
index 0000000..0129d74
--- /dev/null
+++ b/node_modules/cross-spawn/lib/parse.js
@@ -0,0 +1,91 @@
+'use strict';
+
+const path = require('path');
+const resolveCommand = require('./util/resolveCommand');
+const escape = require('./util/escape');
+const readShebang = require('./util/readShebang');
+
+const isWin = process.platform === 'win32';
+const isExecutableRegExp = /\.(?:com|exe)$/i;
+const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
+
+function detectShebang(parsed) {
+ parsed.file = resolveCommand(parsed);
+
+ const shebang = parsed.file && readShebang(parsed.file);
+
+ if (shebang) {
+ parsed.args.unshift(parsed.file);
+ parsed.command = shebang;
+
+ return resolveCommand(parsed);
+ }
+
+ return parsed.file;
+}
+
+function parseNonShell(parsed) {
+ if (!isWin) {
+ return parsed;
+ }
+
+ // Detect & add support for shebangs
+ const commandFile = detectShebang(parsed);
+
+ // We don't need a shell if the command filename is an executable
+ const needsShell = !isExecutableRegExp.test(commandFile);
+
+ // If a shell is required, use cmd.exe and take care of escaping everything correctly
+ // Note that `forceShell` is an hidden option used only in tests
+ if (parsed.options.forceShell || needsShell) {
+ // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
+ // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
+ // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
+ // we need to double escape them
+ const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
+
+ // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
+ // This is necessary otherwise it will always fail with ENOENT in those cases
+ parsed.command = path.normalize(parsed.command);
+
+ // Escape command & arguments
+ parsed.command = escape.command(parsed.command);
+ parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
+
+ const shellCommand = [parsed.command].concat(parsed.args).join(' ');
+
+ parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
+ parsed.command = process.env.comspec || 'cmd.exe';
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ }
+
+ return parsed;
+}
+
+function parse(command, args, options) {
+ // Normalize arguments, similar to nodejs
+ if (args && !Array.isArray(args)) {
+ options = args;
+ args = null;
+ }
+
+ args = args ? args.slice(0) : []; // Clone array to avoid changing the original
+ options = Object.assign({}, options); // Clone object to avoid changing the original
+
+ // Build our parsed object
+ const parsed = {
+ command,
+ args,
+ options,
+ file: undefined,
+ original: {
+ command,
+ args,
+ },
+ };
+
+ // Delegate further parsing to shell or non-shell
+ return options.shell ? parsed : parseNonShell(parsed);
+}
+
+module.exports = parse;
diff --git a/node_modules/cross-spawn/lib/util/escape.js b/node_modules/cross-spawn/lib/util/escape.js
new file mode 100644
index 0000000..b0bb84c
--- /dev/null
+++ b/node_modules/cross-spawn/lib/util/escape.js
@@ -0,0 +1,45 @@
+'use strict';
+
+// See http://www.robvanderwoude.com/escapechars.php
+const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
+
+function escapeCommand(arg) {
+ // Escape meta chars
+ arg = arg.replace(metaCharsRegExp, '^$1');
+
+ return arg;
+}
+
+function escapeArgument(arg, doubleEscapeMetaChars) {
+ // Convert to string
+ arg = `${arg}`;
+
+ // Algorithm below is based on https://qntm.org/cmd
+
+ // Sequence of backslashes followed by a double quote:
+ // double up all the backslashes and escape the double quote
+ arg = arg.replace(/(\\*)"/g, '$1$1\\"');
+
+ // Sequence of backslashes followed by the end of the string
+ // (which will become a double quote later):
+ // double up all the backslashes
+ arg = arg.replace(/(\\*)$/, '$1$1');
+
+ // All other backslashes occur literally
+
+ // Quote the whole thing:
+ arg = `"${arg}"`;
+
+ // Escape meta chars
+ arg = arg.replace(metaCharsRegExp, '^$1');
+
+ // Double escape meta chars if necessary
+ if (doubleEscapeMetaChars) {
+ arg = arg.replace(metaCharsRegExp, '^$1');
+ }
+
+ return arg;
+}
+
+module.exports.command = escapeCommand;
+module.exports.argument = escapeArgument;
diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js
new file mode 100644
index 0000000..5e83733
--- /dev/null
+++ b/node_modules/cross-spawn/lib/util/readShebang.js
@@ -0,0 +1,23 @@
+'use strict';
+
+const fs = require('fs');
+const shebangCommand = require('shebang-command');
+
+function readShebang(command) {
+ // Read the first 150 bytes from the file
+ const size = 150;
+ const buffer = Buffer.alloc(size);
+
+ let fd;
+
+ try {
+ fd = fs.openSync(command, 'r');
+ fs.readSync(fd, buffer, 0, size, 0);
+ fs.closeSync(fd);
+ } catch (e) { /* Empty */ }
+
+ // Attempt to extract shebang (null is returned if not a shebang)
+ return shebangCommand(buffer.toString());
+}
+
+module.exports = readShebang;
diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js
new file mode 100644
index 0000000..7972455
--- /dev/null
+++ b/node_modules/cross-spawn/lib/util/resolveCommand.js
@@ -0,0 +1,52 @@
+'use strict';
+
+const path = require('path');
+const which = require('which');
+const getPathKey = require('path-key');
+
+function resolveCommandAttempt(parsed, withoutPathExt) {
+ const env = parsed.options.env || process.env;
+ const cwd = process.cwd();
+ const hasCustomCwd = parsed.options.cwd != null;
+ // Worker threads do not have process.chdir()
+ const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
+
+ // If a custom `cwd` was specified, we need to change the process cwd
+ // because `which` will do stat calls but does not support a custom cwd
+ if (shouldSwitchCwd) {
+ try {
+ process.chdir(parsed.options.cwd);
+ } catch (err) {
+ /* Empty */
+ }
+ }
+
+ let resolved;
+
+ try {
+ resolved = which.sync(parsed.command, {
+ path: env[getPathKey({ env })],
+ pathExt: withoutPathExt ? path.delimiter : undefined,
+ });
+ } catch (e) {
+ /* Empty */
+ } finally {
+ if (shouldSwitchCwd) {
+ process.chdir(cwd);
+ }
+ }
+
+ // If we successfully resolved, ensure that an absolute path is returned
+ // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
+ if (resolved) {
+ resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
+ }
+
+ return resolved;
+}
+
+function resolveCommand(parsed) {
+ return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
+}
+
+module.exports = resolveCommand;
diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json
new file mode 100644
index 0000000..232ff97
--- /dev/null
+++ b/node_modules/cross-spawn/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "cross-spawn",
+ "version": "7.0.3",
+ "description": "Cross platform child_process#spawn and child_process#spawnSync",
+ "keywords": [
+ "spawn",
+ "spawnSync",
+ "windows",
+ "cross-platform",
+ "path-ext",
+ "shebang",
+ "cmd",
+ "execute"
+ ],
+ "author": "André Cruz <andre@moxy.studio>",
+ "homepage": "https://github.com/moxystudio/node-cross-spawn",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:moxystudio/node-cross-spawn.git"
+ },
+ "license": "MIT",
+ "main": "index.js",
+ "files": [
+ "lib"
+ ],
+ "scripts": {
+ "lint": "eslint .",
+ "test": "jest --env node --coverage",
+ "prerelease": "npm t && npm run lint",
+ "release": "standard-version",
+ "postrelease": "git push --follow-tags origin HEAD && npm publish"
+ },
+ "husky": {
+ "hooks": {
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "eslint --fix",
+ "git add"
+ ]
+ },
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "^8.1.0",
+ "@commitlint/config-conventional": "^8.1.0",
+ "babel-core": "^6.26.3",
+ "babel-jest": "^24.9.0",
+ "babel-preset-moxy": "^3.1.0",
+ "eslint": "^5.16.0",
+ "eslint-config-moxy": "^7.1.0",
+ "husky": "^3.0.5",
+ "jest": "^24.9.0",
+ "lint-staged": "^9.2.5",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^3.0.0",
+ "standard-version": "^7.0.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+}
diff --git a/node_modules/currently-unhandled/browser.js b/node_modules/currently-unhandled/browser.js
new file mode 100644
index 0000000..aa9e56f
--- /dev/null
+++ b/node_modules/currently-unhandled/browser.js
@@ -0,0 +1,27 @@
+'use strict';
+var core = require('./core');
+
+function unwrapEvent(event) {
+ if (event && event.detail && event.detail.promise) {
+ return event.detail;
+ }
+
+ return event;
+}
+
+module.exports = function (w) {
+ w = w || window;
+ var c = core();
+
+ w.addEventListener('unhandledrejection', function (event) {
+ event = unwrapEvent(event);
+ c.onUnhandledRejection(event.reason, event.promise);
+ });
+
+ w.addEventListener('rejectionhandled', function (event) {
+ event = unwrapEvent(event);
+ c.onRejectionHandled(event.promise);
+ });
+
+ return c.currentlyUnhandled;
+};
diff --git a/node_modules/currently-unhandled/core.js b/node_modules/currently-unhandled/core.js
new file mode 100644
index 0000000..73db22e
--- /dev/null
+++ b/node_modules/currently-unhandled/core.js
@@ -0,0 +1,33 @@
+'use strict';
+var arrayFindIndex = require('array-find-index');
+
+module.exports = function () {
+ var unhandledRejections = [];
+
+ function onUnhandledRejection(reason, promise) {
+ unhandledRejections.push({reason: reason, promise: promise});
+ }
+
+ function onRejectionHandled(promise) {
+ var index = arrayFindIndex(unhandledRejections, function (x) {
+ return x.promise === promise;
+ });
+
+ unhandledRejections.splice(index, 1);
+ }
+
+ function currentlyUnhandled() {
+ return unhandledRejections.map(function (entry) {
+ return {
+ reason: entry.reason,
+ promise: entry.promise
+ };
+ });
+ }
+
+ return {
+ onUnhandledRejection: onUnhandledRejection,
+ onRejectionHandled: onRejectionHandled,
+ currentlyUnhandled: currentlyUnhandled
+ };
+};
diff --git a/node_modules/currently-unhandled/index.js b/node_modules/currently-unhandled/index.js
new file mode 100644
index 0000000..238b9d9
--- /dev/null
+++ b/node_modules/currently-unhandled/index.js
@@ -0,0 +1,12 @@
+'use strict';
+var core = require('./core');
+
+module.exports = function (p) {
+ p = p || process;
+ var c = core();
+
+ p.on('unhandledRejection', c.onUnhandledRejection);
+ p.on('rejectionHandled', c.onRejectionHandled);
+
+ return c.currentlyUnhandled;
+};
diff --git a/node_modules/currently-unhandled/license b/node_modules/currently-unhandled/license
new file mode 100644
index 0000000..ad5d021
--- /dev/null
+++ b/node_modules/currently-unhandled/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) James Talmage <james@talmage.io> (github.com/jamestalmage)
+
+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/currently-unhandled/package.json b/node_modules/currently-unhandled/package.json
new file mode 100644
index 0000000..3baae3d
--- /dev/null
+++ b/node_modules/currently-unhandled/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "currently-unhandled",
+ "version": "0.4.1",
+ "description": "Track the list of currently unhandled promise rejections.",
+ "license": "MIT",
+ "repository": "jamestalmage/currently-unhandled",
+ "author": {
+ "name": "James Talmage",
+ "email": "james@talmage.io",
+ "url": "github.com/jamestalmage"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && nyc ava"
+ },
+ "files": [
+ "index.js",
+ "core.js",
+ "browser.js"
+ ],
+ "keywords": [
+ "unhandled",
+ "unhandledRejection",
+ "rejected",
+ "promises"
+ ],
+ "dependencies": {
+ "array-find-index": "^1.0.1"
+ },
+ "devDependencies": {
+ "ava": "^0.15.1",
+ "bluebird": "^3.4.0",
+ "browserify": "^13.0.1",
+ "coveralls": "^2.11.9",
+ "delay": "^1.3.1",
+ "is-ci": "^1.0.8",
+ "karma": "^0.13.22",
+ "karma-browserify": "^5.0.5",
+ "karma-chrome-launcher": "^1.0.1",
+ "karma-firefox-launcher": "^1.0.0",
+ "karma-mocha": "^1.0.1",
+ "mocha": "^2.5.3",
+ "nyc": "^6.4.0",
+ "watchify": "^3.7.0",
+ "xo": "^0.15.0"
+ },
+ "browser": {
+ "./index.js": "./browser.js"
+ },
+ "ava": {
+ "files": "test.js"
+ },
+ "nyc": {
+ "reporter": [
+ "lcov",
+ "text"
+ ]
+ },
+ "xo": {
+ "ignores": [
+ "browser-bluebird-test.js"
+ ],
+ "envs": [
+ "browser",
+ "mocha",
+ "node"
+ ]
+ }
+}
diff --git a/node_modules/currently-unhandled/readme.md b/node_modules/currently-unhandled/readme.md
new file mode 100644
index 0000000..b73c568
--- /dev/null
+++ b/node_modules/currently-unhandled/readme.md
@@ -0,0 +1,44 @@
+# currently-unhandled [![Build Status](https://travis-ci.org/jamestalmage/currently-unhandled.svg?branch=master)](https://travis-ci.org/jamestalmage/currently-unhandled) [![Coverage Status](https://coveralls.io/repos/github/jamestalmage/currently-unhandled/badge.svg?branch=master)](https://coveralls.io/github/jamestalmage/currently-unhandled?branch=master)
+
+> Track the list of currently unhandled promise rejections.
+
+
+## Install
+
+```
+$ npm install --save currently-unhandled
+```
+
+
+## Usage
+
+```js
+const currentlyUnhandled = require('currently-unhandled')(); // <- note the invocation
+
+var fooError = new Error('foo');
+var p = Promise.reject(new Error('foo'));
+
+// on the next tick - unhandled rejected promise is added to the list:
+currentlyUnhandled();
+//=> [{promise: p, reason: fooError}]'
+
+p.catch(() => {});
+
+// on the next tick - handled promise is now removed from the list:
+currentlyUnhandled();
+//=> [];
+```
+
+## API
+
+### currentlyUnhandled()
+
+Returns an array of objects with `promise` and `reason` properties representing the rejected promises that currently do not have a rejection handler. The list grows and shrinks as unhandledRejections are published, and later handled.
+
+## Browser Support
+
+This module can be bundled with `browserify`. At time of writing, it will work with native Promises in the Chrome browser only. For best cross-browser support, use `bluebird` instead of native Promise support in browsers.
+
+## License
+
+MIT © [James Talmage](http://github.com/jamestalmage)
diff --git a/node_modules/dashdash/CHANGES.md b/node_modules/dashdash/CHANGES.md
new file mode 100644
index 0000000..d7c8f4e
--- /dev/null
+++ b/node_modules/dashdash/CHANGES.md
@@ -0,0 +1,364 @@
+# node-dashdash changelog
+
+## not yet released
+
+(nothing yet)
+
+## 1.14.1
+
+- [issue #30] Change the output used by dashdash's Bash completion support to
+ indicate "there are no completions for this argument" to cope with different
+ sorting rules on different Bash/platforms. For example:
+
+ $ triton -v -p test2 package get <TAB> # before
+ ##-no -tritonpackage- completions-##
+
+ $ triton -v -p test2 package get <TAB> # after
+ ##-no-completion- -results-##
+
+## 1.14.0
+
+- New `synopsisFromOpt(<option spec>)` function. This will be used by
+ [node-cmdln](https://github.com/trentm/node-cmdln) to put together a synopsis
+ of options for a command. Some examples:
+
+ > synopsisFromOpt({names: ['help', 'h'], type: 'bool'});
+ '[ --help | -h ]'
+ > synopsisFromOpt({name: 'file', type: 'string', helpArg: 'FILE'});
+ '[ --file=FILE ]'
+
+
+## 1.13.1
+
+- [issue #20] `bashCompletionSpecFromOptions` breaks on an options array with
+ an empty-string group.
+
+
+## 1.13.0
+
+- Update assert-plus dep to 1.x to get recent fixes (particularly for
+ `assert.optional*`).
+
+- Drop testing (and official support in packages.json#engines) for node 0.8.x.
+ Add testing against node 5.x and 4.x with `make testall`.
+
+- [pull #16] Change the `positiveInteger` type to NOT accept zero (0).
+ For those who might need the old behaviour, see
+ "examples/custom-option-intGteZero.js". (By Dave Pacheco.)
+
+
+## 1.12.2
+
+- Bash completion: Add `argtypes` to specify the types of positional args.
+ E.g. this would allow you to have an `ssh` command with `argtypes = ['host',
+ 'cmd']` for bash completion. You then have to provide Bash functions to
+ handle completing those types via the `specExtra` arg. See
+ "[examples/ddcompletion.js](examples/ddcompletion.js)" for an example.
+
+- Bash completion: Tweak so that options or only offered as completions when
+ there is a leading '-'. E.g. `mytool <TAB>` does NOT offer options, `mytool
+ -<TAB>` *does*. Without this, a tool with options would never be able to
+ fallback to Bash's "default" completion. For example `ls <TAB>` wouldn't
+ result in filename completion. Now it will.
+
+- Bash completion: A workaround for not being able to explicitly have *no*
+ completion results. Because dashdash's completion uses `complete -o default`,
+ we fallback to Bash's "default" completion (typically for filename
+ completion). Before this change, an attempt to explicitly say "there are
+ no completions that match" would unintentionally trigger filename completion.
+ Instead as a workaround we return:
+
+ $ ddcompletion --none <TAB> # the 'none' argtype
+ ##-no completions-##
+
+ $ ddcompletion # a custom 'fruit' argtype
+ apple banana orange
+ $ ddcompletion z
+ ##-no -fruit- completions-##
+
+ This is a bit of a hack, but IMO a better experience than the surprise
+ of matching a local filename beginning with 'z', which isn't, in this
+ case, a "fruit".
+
+## 1.12.1
+
+- Bash completion: Document `<option spec>.completionType`. Add `includeHidden`
+ option to `bashCompletionSpecFromOptions()`. Add support for dealing with
+ hidden subcmds.
+
+
+## 1.12.0
+
+- Support for generating Bash completion files. See the "Bash completion"
+ section of the README.md and "examples/ddcompletion.js" for an example.
+
+
+## 1.11.0
+
+- Add the `arrayFlatten` boolean option to `dashdash.addOptionType` used for
+ custom option types. This allows one to create an `arrayOf...` option type
+ where each usage of the option can return multiple results. For example:
+
+ node mytool.js --foo a,b --foo c
+
+ We could define an option type for `--foo` such that
+ `opts.foo = ['a', 'b', 'c']`. See
+ "[examples/custom-option-arrayOfCommaSepString.js](examples/custom-option-arrayOfCommaSepString.js)"
+ for an example.
+
+
+## 1.10.1
+
+- Trim the published package to the minimal bits. Before: 24K tarball, 144K unpacked.
+ After: 12K tarball, 48K unpacked. `npm` won't let me drop the README.md. :)
+
+
+## 1.10.0
+
+- [issue #9] Support `includeDefault` in help config (similar to `includeEnv`) to have a
+ note of an option's default value, if any, in help output.
+- [issue #11] Fix option group breakage introduced in v1.9.0.
+
+
+## 1.9.0
+
+- [issue #10] Custom option types added with `addOptionType` can specify a
+ "default" value. See "examples/custom-option-fruit.js".
+
+
+## 1.8.0
+
+- Support `hidden: true` in an option spec to have help output exclude this
+ option.
+
+
+## 1.7.3
+
+- [issue #8] Fix parsing of a short option group when one of the
+ option takes an argument. For example, consider `tail` with
+ a `-f` boolean option and a `-n` option that takes a number
+ argument. This should parse:
+
+ tail -fn5
+
+ Before this change, that would not parse correctly.
+ It is suspected that this was introduced in version 1.4.0
+ (with commit 656fa8bc71c372ebddad0a7026bd71611e2ec99a).
+
+
+## 1.7.2
+
+- Known issues: #8
+
+- Exclude 'tools/' dir in packages published to npm.
+
+
+## 1.7.1
+
+- Known issues: #8
+
+- Support an option group *empty string* value:
+
+ ...
+ { group: '' },
+ ...
+
+ to render as a blank line in option help. This can help separate loosely
+ related sets of options without resorting to a title for option groups.
+
+
+## 1.7.0
+
+- Known issues: #8
+
+- [pull #7] Support for `<parser>.help({helpWrap: false, ...})` option to be able
+ to fully control the formatting for option help (by Patrick Mooney) `helpWrap:
+ false` can also be set on individual options in the option objects, e.g.:
+
+ var options = [
+ {
+ names: ['foo'],
+ type: 'string',
+ helpWrap: false,
+ help: 'long help with\n newlines' +
+ '\n spaces\n and such\nwill render correctly'
+ },
+ ...
+ ];
+
+
+## 1.6.0
+
+- Known issues: #8
+
+- [pull #6] Support headings between groups of options (by Joshua M. Clulow)
+ so that this code:
+
+ var options = [
+ { group: 'Armament Options' },
+ { names: [ 'weapon', 'w' ], type: 'string' },
+ { group: 'General Options' },
+ { names: [ 'help', 'h' ], type: 'bool' }
+ ];
+ ...
+
+ will give you this help output:
+
+ ...
+ Armament Options:
+ -w, --weapon
+
+ General Options:
+ -h, --help
+ ...
+
+
+## 1.5.0
+
+- Known issues: #8
+
+- Add support for adding custom option types. "examples/custom-option-duration.js"
+ shows an example adding a "duration" option type.
+
+ $ node custom-option-duration.js -t 1h
+ duration: 3600000 ms
+ $ node custom-option-duration.js -t 1s
+ duration: 1000 ms
+ $ node custom-option-duration.js -t 5d
+ duration: 432000000 ms
+ $ node custom-option-duration.js -t bogus
+ custom-option-duration.js: error: arg for "-t" is not a valid duration: "bogus"
+
+ A custom option type is added via:
+
+ var dashdash = require('dashdash');
+ dashdash.addOptionType({
+ name: '...',
+ takesArg: true,
+ helpArg: '...',
+ parseArg: function (option, optstr, arg) {
+ ...
+ }
+ });
+
+- [issue #4] Add `date` and `arrayOfDate` option types. They accept these date
+ formats: epoch second times (e.g. 1396031701) and ISO 8601 format:
+ `YYYY-MM-DD[THH:MM:SS[.sss][Z]]` (e.g. "2014-03-28",
+ "2014-03-28T18:35:01.489Z"). See "examples/date.js" for an example usage.
+
+ $ node examples/date.js -s 2014-01-01 -e $(date +%s)
+ start at 2014-01-01T00:00:00.000Z
+ end at 2014-03-29T04:26:18.000Z
+
+
+## 1.4.0
+
+- Known issues: #8
+
+- [pull #2, pull #3] Add a `allowUnknown: true` option on `createParser` to
+ allow unknown options to be passed through as `opts._args` instead of parsing
+ throwing an exception (by https://github.com/isaacs).
+
+ See 'allowUnknown' in the README for a subtle caveat.
+
+
+## 1.3.2
+
+- Fix a subtlety where a *bool* option using both `env` and `default` didn't
+ work exactly correctly. If `default: false` then all was fine (by luck).
+ However, if you had an option like this:
+
+ options: [ {
+ names: ['verbose', 'v'],
+ env: 'FOO_VERBOSE',
+ 'default': true, // <--- this
+ type: 'bool'
+ } ],
+
+ wanted `FOO_VERBOSE=0` to make the option false, then you need the fix
+ in this version of dashdash.
+
+
+## 1.3.1
+
+- [issue #1] Fix an envvar not winning over an option 'default'. Previously
+ an option with both `default` and `env` would never take a value from the
+ environment variable. E.g. `FOO_FILE` would never work here:
+
+ options: [ {
+ names: ['file', 'f'],
+ env: 'FOO_FILE',
+ 'default': 'default.file',
+ type: 'string'
+ } ],
+
+
+## 1.3.0
+
+- [Backward incompatible change for boolean envvars] Change the
+ interpretation of environment variables for boolean options to consider '0'
+ to be false. Previous to this *any* value to the envvar was considered
+ true -- which was quite misleading. Example:
+
+ $ FOO_VERBOSE=0 node examples/foo.js
+ # opts: { verbose: [ false ],
+ _order: [ { key: 'verbose', value: false, from: 'env' } ],
+ _args: [] }
+ # args: []
+
+
+## 1.2.1
+
+- Fix for `parse.help({includeEnv: true, ...})` handling to ensure that an
+ option with an `env` **but no `help`** still has the "Environment: ..."
+ output. E.g.:
+
+ { names: ['foo'], type: 'string', env: 'FOO' }
+
+ ...
+
+ --foo=ARG Environment: FOO=ARG
+
+
+## 1.2.0
+
+- Transform the option key on the `opts` object returned from
+ `<parser>.parse()` for convenience. Currently this is just
+ `s/-/_/g`, e.g. '--dry-run' -> `opts.dry_run`. This allow one to use hyphen
+ in option names (common) but not have to do silly things like
+ `opt["dry-run"]` to access the parsed results.
+
+
+## 1.1.0
+
+- Environment variable integration. Envvars can be associated with an option,
+ then option processing will fallback to using that envvar if defined and
+ if the option isn't specified in argv. See the "Environment variable
+ integration" section in the README.
+
+- Change the `<parser>.parse()` signature to take a single object with keys
+ for arguments. The old signature is still supported.
+
+- `dashdash.createParser(CONFIG)` alternative to `new dashdash.Parser(CONFIG)`
+ a la many node-land APIs.
+
+
+## 1.0.2
+
+- Add "positiveInteger" and "arrayOfPositiveInteger" option types that only
+ accept positive integers.
+
+- Add "integer" and "arrayOfInteger" option types that accepts only integers.
+ Note that, for better or worse, these do NOT accept: "0x42" (hex), "1e2"
+ (with exponent) or "1.", "3.0" (floats).
+
+
+## 1.0.1
+
+- Fix not modifying the given option spec objects (which breaks creating
+ a Parser with them more than once).
+
+
+## 1.0.0
+
+First release.
diff --git a/node_modules/dashdash/LICENSE.txt b/node_modules/dashdash/LICENSE.txt
new file mode 100644
index 0000000..54706c6
--- /dev/null
+++ b/node_modules/dashdash/LICENSE.txt
@@ -0,0 +1,24 @@
+# This is the MIT license
+
+Copyright (c) 2013 Trent Mick. All rights reserved.
+Copyright (c) 2013 Joyent Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/dashdash/README.md b/node_modules/dashdash/README.md
new file mode 100644
index 0000000..e47b106
--- /dev/null
+++ b/node_modules/dashdash/README.md
@@ -0,0 +1,574 @@
+A light, featureful and explicit option parsing library for node.js.
+
+[Why another one? See below](#why). tl;dr: The others I've tried are one of
+too loosey goosey (not explicit), too big/too many deps, or ill specified.
+YMMV.
+
+Follow <a href="https://twitter.com/intent/user?screen_name=trentmick" target="_blank">@trentmick</a>
+for updates to node-dashdash.
+
+# Install
+
+ npm install dashdash
+
+
+# Usage
+
+```javascript
+var dashdash = require('dashdash');
+
+// Specify the options. Minimally `name` (or `names`) and `type`
+// must be given for each.
+var options = [
+ {
+ // `names` or a single `name`. First element is the `opts.KEY`.
+ names: ['help', 'h'],
+ // See "Option specs" below for types.
+ type: 'bool',
+ help: 'Print this help and exit.'
+ }
+];
+
+// Shortcut form. As called it infers `process.argv`. See below for
+// the longer form to use methods like `.help()` on the Parser object.
+var opts = dashdash.parse({options: options});
+
+console.log("opts:", opts);
+console.log("args:", opts._args);
+```
+
+
+# Longer Example
+
+A more realistic [starter script "foo.js"](./examples/foo.js) is as follows.
+This also shows using `parser.help()` for formatted option help.
+
+```javascript
+var dashdash = require('./lib/dashdash');
+
+var options = [
+ {
+ name: 'version',
+ type: 'bool',
+ help: 'Print tool version and exit.'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Print this help and exit.'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'arrayOfBool',
+ help: 'Verbose output. Use multiple times for more verbose.'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'File to process',
+ helpArg: 'FILE'
+ }
+];
+
+var parser = dashdash.createParser({options: options});
+try {
+ var opts = parser.parse(process.argv);
+} catch (e) {
+ console.error('foo: error: %s', e.message);
+ process.exit(1);
+}
+
+console.log("# opts:", opts);
+console.log("# args:", opts._args);
+
+// Use `parser.help()` for formatted options help.
+if (opts.help) {
+ var help = parser.help({includeEnv: true}).trimRight();
+ console.log('usage: node foo.js [OPTIONS]\n'
+ + 'options:\n'
+ + help);
+ process.exit(0);
+}
+
+// ...
+```
+
+
+Some example output from this script (foo.js):
+
+```
+$ node foo.js -h
+# opts: { help: true,
+ _order: [ { name: 'help', value: true, from: 'argv' } ],
+ _args: [] }
+# args: []
+usage: node foo.js [OPTIONS]
+options:
+ --version Print tool version and exit.
+ -h, --help Print this help and exit.
+ -v, --verbose Verbose output. Use multiple times for more verbose.
+ -f FILE, --file=FILE File to process
+
+$ node foo.js -v
+# opts: { verbose: [ true ],
+ _order: [ { name: 'verbose', value: true, from: 'argv' } ],
+ _args: [] }
+# args: []
+
+$ node foo.js --version arg1
+# opts: { version: true,
+ _order: [ { name: 'version', value: true, from: 'argv' } ],
+ _args: [ 'arg1' ] }
+# args: [ 'arg1' ]
+
+$ node foo.js -f bar.txt
+# opts: { file: 'bar.txt',
+ _order: [ { name: 'file', value: 'bar.txt', from: 'argv' } ],
+ _args: [] }
+# args: []
+
+$ node foo.js -vvv --file=blah
+# opts: { verbose: [ true, true, true ],
+ file: 'blah',
+ _order:
+ [ { name: 'verbose', value: true, from: 'argv' },
+ { name: 'verbose', value: true, from: 'argv' },
+ { name: 'verbose', value: true, from: 'argv' },
+ { name: 'file', value: 'blah', from: 'argv' } ],
+ _args: [] }
+# args: []
+```
+
+
+See the ["examples"](examples/) dir for a number of starter examples using
+some of dashdash's features.
+
+
+# Environment variable integration
+
+If you want to allow environment variables to specify options to your tool,
+dashdash makes this easy. We can change the 'verbose' option in the example
+above to include an 'env' field:
+
+```javascript
+ {
+ names: ['verbose', 'v'],
+ type: 'arrayOfBool',
+ env: 'FOO_VERBOSE', // <--- add this line
+ help: 'Verbose output. Use multiple times for more verbose.'
+ },
+```
+
+then the **"FOO_VERBOSE" environment variable** can be used to set this
+option:
+
+```shell
+$ FOO_VERBOSE=1 node foo.js
+# opts: { verbose: [ true ],
+ _order: [ { name: 'verbose', value: true, from: 'env' } ],
+ _args: [] }
+# args: []
+```
+
+Boolean options will interpret the empty string as unset, '0' as false
+and anything else as true.
+
+```shell
+$ FOO_VERBOSE= node examples/foo.js # not set
+# opts: { _order: [], _args: [] }
+# args: []
+
+$ FOO_VERBOSE=0 node examples/foo.js # '0' is false
+# opts: { verbose: [ false ],
+ _order: [ { key: 'verbose', value: false, from: 'env' } ],
+ _args: [] }
+# args: []
+
+$ FOO_VERBOSE=1 node examples/foo.js # true
+# opts: { verbose: [ true ],
+ _order: [ { key: 'verbose', value: true, from: 'env' } ],
+ _args: [] }
+# args: []
+
+$ FOO_VERBOSE=boogabooga node examples/foo.js # true
+# opts: { verbose: [ true ],
+ _order: [ { key: 'verbose', value: true, from: 'env' } ],
+ _args: [] }
+# args: []
+```
+
+Non-booleans can be used as well. Strings:
+
+```shell
+$ FOO_FILE=data.txt node examples/foo.js
+# opts: { file: 'data.txt',
+ _order: [ { key: 'file', value: 'data.txt', from: 'env' } ],
+ _args: [] }
+# args: []
+```
+
+Numbers:
+
+```shell
+$ FOO_TIMEOUT=5000 node examples/foo.js
+# opts: { timeout: 5000,
+ _order: [ { key: 'timeout', value: 5000, from: 'env' } ],
+ _args: [] }
+# args: []
+
+$ FOO_TIMEOUT=blarg node examples/foo.js
+foo: error: arg for "FOO_TIMEOUT" is not a positive integer: "blarg"
+```
+
+With the `includeEnv: true` config to `parser.help()` the environment
+variable can also be included in **help output**:
+
+ usage: node foo.js [OPTIONS]
+ options:
+ --version Print tool version and exit.
+ -h, --help Print this help and exit.
+ -v, --verbose Verbose output. Use multiple times for more verbose.
+ Environment: FOO_VERBOSE=1
+ -f FILE, --file=FILE File to process
+
+
+# Bash completion
+
+Dashdash provides a simple way to create a Bash completion file that you
+can place in your "bash_completion.d" directory -- sometimes that is
+"/usr/local/etc/bash_completion.d/"). Features:
+
+- Support for short and long opts
+- Support for knowing which options take arguments
+- Support for subcommands (e.g. 'git log <TAB>' to show just options for the
+ log subcommand). See
+ [node-cmdln](https://github.com/trentm/node-cmdln#bash-completion) for
+ how to integrate that.
+- Does the right thing with "--" to stop options.
+- Custom optarg and arg types for custom completions.
+
+Dashdash will return bash completion file content given a parser instance:
+
+ var parser = dashdash.createParser({options: options});
+ console.log( parser.bashCompletion({name: 'mycli'}) );
+
+or directly from a `options` array of options specs:
+
+ var code = dashdash.bashCompletionFromOptions({
+ name: 'mycli',
+ options: OPTIONS
+ });
+
+Write that content to "/usr/local/etc/bash_completion.d/mycli" and you will
+have Bash completions for `mycli`. Alternatively you can write it to
+any file (e.g. "~/.bashrc") and source it.
+
+You could add a `--completion` hidden option to your tool that emits the
+completion content and document for your users to call that to install
+Bash completions.
+
+See [examples/ddcompletion.js](examples/ddcompletion.js) for a complete
+example, including how one can define bash functions for completion of custom
+option types. Also see [node-cmdln](https://github.com/trentm/node-cmdln) for
+how it uses this for Bash completion for full multi-subcommand tools.
+
+- TODO: document specExtra
+- TODO: document includeHidden
+- TODO: document custom types, `function complete\_FOO` guide, completionType
+- TODO: document argtypes
+
+
+# Parser config
+
+Parser construction (i.e. `dashdash.createParser(CONFIG)`) takes the
+following fields:
+
+- `options` (Array of option specs). Required. See the
+ [Option specs](#option-specs) section below.
+
+- `interspersed` (Boolean). Optional. Default is true. If true this allows
+ interspersed arguments and options. I.e.:
+
+ node ./tool.js -v arg1 arg2 -h # '-h' is after interspersed args
+
+ Set it to false to have '-h' **not** get parsed as an option in the above
+ example.
+
+- `allowUnknown` (Boolean). Optional. Default is false. If false, this causes
+ unknown arguments to throw an error. I.e.:
+
+ node ./tool.js -v arg1 --afe8asefksjefhas
+
+ Set it to true to treat the unknown option as a positional
+ argument.
+
+ **Caveat**: When a shortopt group, such as `-xaz` contains a mix of
+ known and unknown options, the *entire* group is passed through
+ unmolested as a positional argument.
+
+ Consider if you have a known short option `-a`, and parse the
+ following command line:
+
+ node ./tool.js -xaz
+
+ where `-x` and `-z` are unknown. There are multiple ways to
+ interpret this:
+
+ 1. `-x` takes a value: `{x: 'az'}`
+ 2. `-x` and `-z` are both booleans: `{x:true,a:true,z:true}`
+
+ Since dashdash does not know what `-x` and `-z` are, it can't know
+ if you'd prefer to receive `{a:true,_args:['-x','-z']}` or
+ `{x:'az'}`, or `{_args:['-xaz']}`. Leaving the positional arg unprocessed
+ is the easiest mistake for the user to recover from.
+
+
+# Option specs
+
+Example using all fields (required fields are noted):
+
+```javascript
+{
+ names: ['file', 'f'], // Required (one of `names` or `name`).
+ type: 'string', // Required.
+ completionType: 'filename',
+ env: 'MYTOOL_FILE',
+ help: 'Config file to load before running "mytool"',
+ helpArg: 'PATH',
+ helpWrap: false,
+ default: path.resolve(process.env.HOME, '.mytoolrc')
+}
+```
+
+Each option spec in the `options` array must/can have the following fields:
+
+- `name` (String) or `names` (Array). Required. These give the option name
+ and aliases. The first name (if more than one given) is the key for the
+ parsed `opts` object.
+
+- `type` (String). Required. One of:
+
+ - bool
+ - string
+ - number
+ - integer
+ - positiveInteger
+ - date (epoch seconds, e.g. 1396031701, or ISO 8601 format
+ `YYYY-MM-DD[THH:MM:SS[.sss][Z]]`, e.g. "2014-03-28T18:35:01.489Z")
+ - arrayOfBool
+ - arrayOfString
+ - arrayOfNumber
+ - arrayOfInteger
+ - arrayOfPositiveInteger
+ - arrayOfDate
+
+ FWIW, these names attempt to match with asserts on
+ [assert-plus](https://github.com/mcavage/node-assert-plus).
+ You can add your own custom option types with `dashdash.addOptionType`.
+ See below.
+
+- `completionType` (String). Optional. This is used for [Bash
+ completion](#bash-completion) for an option argument. If not specified,
+ then the value of `type` is used. Any string may be specified, but only the
+ following values have meaning:
+
+ - `none`: Provide no completions.
+ - `file`: Bash's default completion (i.e. `complete -o default`), which
+ includes filenames.
+ - *Any string FOO for which a `function complete_FOO` Bash function is
+ defined.* This is for custom completions for a given tool. Typically
+ these custom functions are provided in the `specExtra` argument to
+ `dashdash.bashCompletionFromOptions()`. See
+ ["examples/ddcompletion.js"](examples/ddcompletion.js) for an example.
+
+- `env` (String or Array of String). Optional. An environment variable name
+ (or names) that can be used as a fallback for this option. For example,
+ given a "foo.js" like this:
+
+ var options = [{names: ['dry-run', 'n'], env: 'FOO_DRY_RUN'}];
+ var opts = dashdash.parse({options: options});
+
+ Both `node foo.js --dry-run` and `FOO_DRY_RUN=1 node foo.js` would result
+ in `opts.dry_run = true`.
+
+ An environment variable is only used as a fallback, i.e. it is ignored if
+ the associated option is given in `argv`.
+
+- `help` (String). Optional. Used for `parser.help()` output.
+
+- `helpArg` (String). Optional. Used in help output as the placeholder for
+ the option argument, e.g. the "PATH" in:
+
+ ...
+ -f PATH, --file=PATH File to process
+ ...
+
+- `helpWrap` (Boolean). Optional, default true. Set this to `false` to have
+ that option's `help` *not* be text wrapped in `<parser>.help()` output.
+
+- `default`. Optional. A default value used for this option, if the
+ option isn't specified in argv.
+
+- `hidden` (Boolean). Optional, default false. If true, help output will not
+ include this option. See also the `includeHidden` option to
+ `bashCompletionFromOptions()` for [Bash completion](#bash-completion).
+
+
+# Option group headings
+
+You can add headings between option specs in the `options` array. To do so,
+simply add an object with only a `group` property -- the string to print as
+the heading for the subsequent options in the array. For example:
+
+```javascript
+var options = [
+ {
+ group: 'Armament Options'
+ },
+ {
+ names: [ 'weapon', 'w' ],
+ type: 'string'
+ },
+ {
+ group: 'General Options'
+ },
+ {
+ names: [ 'help', 'h' ],
+ type: 'bool'
+ }
+];
+...
+```
+
+Note: You can use an empty string, `{group: ''}`, to get a blank line in help
+output between groups of options.
+
+
+# Help config
+
+The `parser.help(...)` function is configurable as follows:
+
+ Options:
+ Armament Options:
+ ^^ -w WEAPON, --weapon=WEAPON Weapon with which to crush. One of: |
+ / sword, spear, maul |
+ / General Options: |
+ / -h, --help Print this help and exit. |
+ / ^^^^ ^ |
+ \ `-- indent `-- helpCol maxCol ---'
+ `-- headingIndent
+
+- `indent` (Number or String). Default 4. Set to a number (for that many
+ spaces) or a string for the literal indent.
+- `headingIndent` (Number or String). Default half length of `indent`. Set to
+ a number (for that many spaces) or a string for the literal indent. This
+ indent applies to group heading lines, between normal option lines.
+- `nameSort` (String). Default is 'length'. By default the names are
+ sorted to put the short opts first (i.e. '-h, --help' preferred
+ to '--help, -h'). Set to 'none' to not do this sorting.
+- `maxCol` (Number). Default 80. Note that reflow is just done on whitespace
+ so a long token in the option help can overflow maxCol.
+- `helpCol` (Number). If not set a reasonable value will be determined
+ between `minHelpCol` and `maxHelpCol`.
+- `minHelpCol` (Number). Default 20.
+- `maxHelpCol` (Number). Default 40.
+- `helpWrap` (Boolean). Default true. Set to `false` to have option `help`
+ strings *not* be textwrapped to the helpCol..maxCol range.
+- `includeEnv` (Boolean). Default false. If the option has associated
+ environment variables (via the `env` option spec attribute), then
+ append mentioned of those envvars to the help string.
+- `includeDefault` (Boolean). Default false. If the option has a default value
+ (via the `default` option spec attribute, or a default on the option's type),
+ then a "Default: VALUE" string will be appended to the help string.
+
+
+# Custom option types
+
+Dashdash includes a good starter set of option types that it will parse for
+you. However, you can add your own via:
+
+ var dashdash = require('dashdash');
+ dashdash.addOptionType({
+ name: '...',
+ takesArg: true,
+ helpArg: '...',
+ parseArg: function (option, optstr, arg) {
+ ...
+ },
+ array: false, // optional
+ arrayFlatten: false, // optional
+ default: ..., // optional
+ completionType: ... // optional
+ });
+
+For example, a simple option type that accepts 'yes', 'y', 'no' or 'n' as
+a boolean argument would look like:
+
+ var dashdash = require('dashdash');
+
+ function parseYesNo(option, optstr, arg) {
+ var argLower = arg.toLowerCase()
+ if (~['yes', 'y'].indexOf(argLower)) {
+ return true;
+ } else if (~['no', 'n'].indexOf(argLower)) {
+ return false;
+ } else {
+ throw new Error(format(
+ 'arg for "%s" is not "yes" or "no": "%s"',
+ optstr, arg));
+ }
+ }
+
+ dashdash.addOptionType({
+ name: 'yesno'
+ takesArg: true,
+ helpArg: '<yes|no>',
+ parseArg: parseYesNo
+ });
+
+ var options = {
+ {names: ['answer', 'a'], type: 'yesno'}
+ };
+ var opts = dashdash.parse({options: options});
+
+See "examples/custom-option-\*.js" for other examples.
+See the `addOptionType` block comment in "lib/dashdash.js" for more details.
+Please let me know [with an
+issue](https://github.com/trentm/node-dashdash/issues/new) if you write a
+generally useful one.
+
+
+
+# Why
+
+Why another node.js option parsing lib?
+
+- `nopt` really is just for "tools like npm". Implicit opts (e.g. '--no-foo'
+ works for every '--foo'). Can't disable abbreviated opts. Can't do multiple
+ usages of same opt, e.g. '-vvv' (I think). Can't do grouped short opts.
+
+- `optimist` has surprise interpretation of options (at least to me).
+ Implicit opts mean ambiguities and poor error handling for fat-fingering.
+ `process.exit` calls makes it hard to use as a libary.
+
+- `optparse` Incomplete docs. Is this an attempted clone of Python's `optparse`.
+ Not clear. Some divergence. `parser.on("name", ...)` API is weird.
+
+- `argparse` Dep on underscore. No thanks just for option processing.
+ `find lib | wc -l` -> `26`. Overkill.
+ Argparse is a bit different anyway. Not sure I want that.
+
+- `posix-getopt` No type validation. Though that isn't a killer. AFAIK can't
+ have a long opt without a short alias. I.e. no `getopt_long` semantics.
+ Also, no whizbang features like generated help output.
+
+- ["commander.js"](https://github.com/visionmedia/commander.js): I wrote
+ [a critique](http://trentm.com/2014/01/a-critique-of-commander-for-nodejs.html)
+ a while back. It seems fine, but last I checked had
+ [an outstanding bug](https://github.com/visionmedia/commander.js/pull/121)
+ that would prevent me from using it.
+
+
+# License
+
+MIT. See LICENSE.txt.
diff --git a/node_modules/dashdash/etc/dashdash.bash_completion.in b/node_modules/dashdash/etc/dashdash.bash_completion.in
new file mode 100644
index 0000000..dc33309
--- /dev/null
+++ b/node_modules/dashdash/etc/dashdash.bash_completion.in
@@ -0,0 +1,389 @@
+#!/bin/bash
+#
+# Bash completion generated for '{{name}}' at {{date}}.
+#
+# The original template lives here:
+# https://github.com/trentm/node-dashdash/blob/master/etc/dashdash.bash_completion.in
+#
+
+#
+# Copyright 2016 Trent Mick
+# Copyright 2016 Joyent, Inc.
+#
+#
+# A generic Bash completion driver script.
+#
+# This is meant to provide a re-usable chunk of Bash to use for
+# "etc/bash_completion.d/" files for individual tools. Only the "Configuration"
+# section with tool-specific info need differ. Features:
+#
+# - support for short and long opts
+# - support for knowing which options take arguments
+# - support for subcommands (e.g. 'git log <TAB>' to show just options for the
+# log subcommand)
+# - does the right thing with "--" to stop options
+# - custom optarg and arg types for custom completions
+# - (TODO) support for shells other than Bash (tcsh, zsh, fish?, etc.)
+#
+#
+# Examples/design:
+#
+# 1. Bash "default" completion. By default Bash's 'complete -o default' is
+# enabled. That means when there are no completions (e.g. if no opts match
+# the current word), then you'll get Bash's default completion. Most notably
+# that means you get filename completion. E.g.:
+# $ tool ./<TAB>
+# $ tool READ<TAB>
+#
+# 2. all opts and subcmds:
+# $ tool <TAB>
+# $ tool -v <TAB> # assuming '-v' doesn't take an arg
+# $ tool -<TAB> # matching opts
+# $ git lo<TAB> # matching subcmds
+#
+# Long opt completions are given *without* the '=', i.e. we prefer space
+# separated because that's easier for good completions.
+#
+# 3. long opt arg with '='
+# $ tool --file=<TAB>
+# $ tool --file=./d<TAB>
+# We maintain the "--file=" prefix. Limitation: With the attached prefix
+# the 'complete -o filenames' doesn't know to do dirname '/' suffixing. Meh.
+#
+# 4. envvars:
+# $ tool $<TAB>
+# $ tool $P<TAB>
+# Limitation: Currently only getting exported vars, so we miss "PS1" and
+# others.
+#
+# 5. Defer to other completion in a subshell:
+# $ tool --file $(cat ./<TAB>
+# We get this from 'complete -o default ...'.
+#
+# 6. Custom completion types from a provided bash function.
+# $ tool --profile <TAB> # complete available "profiles"
+#
+#
+# Dev Notes:
+# - compgen notes, from http://unix.stackexchange.com/questions/151118/understand-compgen-builtin-command
+# - https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html
+#
+
+
+# Debugging this completion:
+# 1. Uncomment the "_{{name}}_log_file=..." line.
+# 2. 'tail -f /var/tmp/dashdash-completion.log' in one terminal.
+# 3. Re-source this bash completion file.
+#_{{name}}_log=/var/tmp/dashdash-completion.log
+
+function _{{name}}_completer {
+
+ # ---- cmd definition
+
+ {{spec}}
+
+
+ # ---- locals
+
+ declare -a argv
+
+
+ # ---- support functions
+
+ function trace {
+ [[ -n "$_{{name}}_log" ]] && echo "$*" >&2
+ }
+
+ function _dashdash_complete {
+ local idx context
+ idx=$1
+ context=$2
+
+ local shortopts longopts optargs subcmds allsubcmds argtypes
+ shortopts="$(eval "echo \${cmd${context}_shortopts}")"
+ longopts="$(eval "echo \${cmd${context}_longopts}")"
+ optargs="$(eval "echo \${cmd${context}_optargs}")"
+ subcmds="$(eval "echo \${cmd${context}_subcmds}")"
+ allsubcmds="$(eval "echo \${cmd${context}_allsubcmds}")"
+ IFS=', ' read -r -a argtypes <<< "$(eval "echo \${cmd${context}_argtypes}")"
+
+ trace ""
+ trace "_dashdash_complete(idx=$idx, context=$context)"
+ trace " shortopts: $shortopts"
+ trace " longopts: $longopts"
+ trace " optargs: $optargs"
+ trace " subcmds: $subcmds"
+ trace " allsubcmds: $allsubcmds"
+
+ # Get 'state' of option parsing at this COMP_POINT.
+ # Copying "dashdash.js#parse()" behaviour here.
+ local state=
+ local nargs=0
+ local i=$idx
+ local argtype
+ local optname
+ local prefix
+ local word
+ local dashdashseen=
+ while [[ $i -lt $len && $i -le $COMP_CWORD ]]; do
+ argtype=
+ optname=
+ prefix=
+ word=
+
+ arg=${argv[$i]}
+ trace " consider argv[$i]: '$arg'"
+
+ if [[ "$arg" == "--" && $i -lt $COMP_CWORD ]]; then
+ trace " dashdash seen"
+ dashdashseen=yes
+ state=arg
+ word=$arg
+ elif [[ -z "$dashdashseen" && "${arg:0:2}" == "--" ]]; then
+ arg=${arg:2}
+ if [[ "$arg" == *"="* ]]; then
+ optname=${arg%%=*}
+ val=${arg##*=}
+ trace " long opt: optname='$optname' val='$val'"
+ state=arg
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ word=$val
+ prefix="--$optname="
+ else
+ optname=$arg
+ val=
+ trace " long opt: optname='$optname'"
+ state=longopt
+ word=--$optname
+
+ if [[ "$optargs" == *"-$optname="* && $i -lt $COMP_CWORD ]]; then
+ i=$(( $i + 1 ))
+ state=arg
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ word=${argv[$i]}
+ trace " takes arg (consume argv[$i], word='$word')"
+ fi
+ fi
+ elif [[ -z "$dashdashseen" && "${arg:0:1}" == "-" ]]; then
+ trace " short opt group"
+ state=shortopt
+ word=$arg
+
+ local j=1
+ while [[ $j -lt ${#arg} ]]; do
+ optname=${arg:$j:1}
+ trace " consider index $j: optname '$optname'"
+
+ if [[ "$optargs" == *"-$optname="* ]]; then
+ argtype=$(echo "$optargs" | awk -F "-$optname=" '{print $2}' | cut -d' ' -f1)
+ if [[ $(( $j + 1 )) -lt ${#arg} ]]; then
+ state=arg
+ word=${arg:$(( $j + 1 ))}
+ trace " takes arg (rest of this arg, word='$word', argtype='$argtype')"
+ elif [[ $i -lt $COMP_CWORD ]]; then
+ state=arg
+ i=$(( $i + 1 ))
+ word=${argv[$i]}
+ trace " takes arg (word='$word', argtype='$argtype')"
+ fi
+ break
+ fi
+
+ j=$(( $j + 1 ))
+ done
+ elif [[ $i -lt $COMP_CWORD && -n "$arg" ]] && $(echo "$allsubcmds" | grep -w "$arg" >/dev/null); then
+ trace " complete subcmd: recurse _dashdash_complete"
+ _dashdash_complete $(( $i + 1 )) "${context}__${arg/-/_}"
+ return
+ else
+ trace " not an opt or a complete subcmd"
+ state=arg
+ word=$arg
+ nargs=$(( $nargs + 1 ))
+ if [[ ${#argtypes[@]} -gt 0 ]]; then
+ argtype="${argtypes[$(( $nargs - 1 ))]}"
+ if [[ -z "$argtype" ]]; then
+ # If we have more args than argtypes, we use the
+ # last type.
+ argtype="${argtypes[@]: -1:1}"
+ fi
+ fi
+ fi
+
+ trace " state=$state prefix='$prefix' word='$word'"
+ i=$(( $i + 1 ))
+ done
+
+ trace " parsed: state=$state optname='$optname' argtype='$argtype' prefix='$prefix' word='$word' dashdashseen=$dashdashseen"
+ local compgen_opts=
+ if [[ -n "$prefix" ]]; then
+ compgen_opts="$compgen_opts -P $prefix"
+ fi
+
+ case $state in
+ shortopt)
+ compgen $compgen_opts -W "$shortopts $longopts" -- "$word"
+ ;;
+ longopt)
+ compgen $compgen_opts -W "$longopts" -- "$word"
+ ;;
+ arg)
+ # If we don't know what completion to do, then emit nothing. We
+ # expect that we are running with:
+ # complete -o default ...
+ # where "default" means: "Use Readline's default completion if
+ # the compspec generates no matches." This gives us the good filename
+ # completion, completion in subshells/backticks.
+ #
+ # We cannot support an argtype="directory" because
+ # compgen -S '/' -A directory -- "$word"
+ # doesn't give a satisfying result. It doesn't stop at the trailing '/'
+ # so you cannot descend into dirs.
+ if [[ "${word:0:1}" == '$' ]]; then
+ # By default, Bash will complete '$<TAB>' to all envvars. Apparently
+ # 'complete -o default' does *not* give us that. The following
+ # gets *close* to the same completions: '-A export' misses envvars
+ # like "PS1".
+ trace " completing envvars"
+ compgen $compgen_opts -P '$' -A export -- "${word:1}"
+ elif [[ -z "$argtype" ]]; then
+ # Only include opts in completions if $word is not empty.
+ # This is to avoid completing the leading '-', which foils
+ # using 'default' completion.
+ if [[ -n "$dashdashseen" ]]; then
+ trace " completing subcmds, if any (no argtype, dashdash seen)"
+ compgen $compgen_opts -W "$subcmds" -- "$word"
+ elif [[ -z "$word" ]]; then
+ trace " completing subcmds, if any (no argtype, empty word)"
+ compgen $compgen_opts -W "$subcmds" -- "$word"
+ else
+ trace " completing opts & subcmds (no argtype)"
+ compgen $compgen_opts -W "$shortopts $longopts $subcmds" -- "$word"
+ fi
+ elif [[ $argtype == "none" ]]; then
+ # We want *no* completions, i.e. some way to get the active
+ # 'complete -o default' to not do filename completion.
+ trace " completing 'none' (hack to imply no completions)"
+ echo "##-no-completion- -results-##"
+ elif [[ $argtype == "file" ]]; then
+ # 'complete -o default' gives the best filename completion, at least
+ # on Mac.
+ trace " completing 'file' (let 'complete -o default' handle it)"
+ echo ""
+ elif ! type complete_$argtype 2>/dev/null >/dev/null; then
+ trace " completing '$argtype' (fallback to default b/c complete_$argtype is unknown)"
+ echo ""
+ else
+ trace " completing custom '$argtype'"
+ completions=$(complete_$argtype "$word")
+ if [[ -z "$completions" ]]; then
+ trace " no custom '$argtype' completions"
+ # These are in ascii and "dictionary" order so they sort
+ # correctly.
+ echo "##-no-completion- -results-##"
+ else
+ echo $completions
+ fi
+ fi
+ ;;
+ *)
+ trace " unknown state: $state"
+ ;;
+ esac
+ }
+
+
+ trace ""
+ trace "-- $(date)"
+ #trace "\$IFS: '$IFS'"
+ #trace "\$@: '$@'"
+ #trace "COMP_WORDBREAKS: '$COMP_WORDBREAKS'"
+ trace "COMP_CWORD: '$COMP_CWORD'"
+ trace "COMP_LINE: '$COMP_LINE'"
+ trace "COMP_POINT: $COMP_POINT"
+
+ # Guard against negative COMP_CWORD. This is a Bash bug at least on
+ # Mac 10.10.4's bash. See
+ # <https://lists.gnu.org/archive/html/bug-bash/2009-07/msg00125.html>.
+ if [[ $COMP_CWORD -lt 0 ]]; then
+ trace "abort on negative COMP_CWORD"
+ exit 1;
+ fi
+
+ # I don't know how to do array manip on argv vars,
+ # so copy over to argv array to work on them.
+ shift # the leading '--'
+ i=0
+ len=$#
+ while [[ $# -gt 0 ]]; do
+ argv[$i]=$1
+ shift;
+ i=$(( $i + 1 ))
+ done
+ trace "argv: '${argv[@]}'"
+ trace "argv[COMP_CWORD-1]: '${argv[$(( $COMP_CWORD - 1 ))]}'"
+ trace "argv[COMP_CWORD]: '${argv[$COMP_CWORD]}'"
+ trace "argv len: '$len'"
+
+ _dashdash_complete 1 ""
+}
+
+
+# ---- mainline
+
+# Note: This if-block to help work with 'compdef' and 'compctl' is
+# adapted from 'npm completion'.
+if type complete &>/dev/null; then
+ function _{{name}}_completion {
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \
+ COMP_LINE="$COMP_LINE" \
+ COMP_POINT="$COMP_POINT" \
+ _{{name}}_completer -- "${COMP_WORDS[@]}" \
+ 2>$_log_file)) || return $?
+ }
+ complete -o default -F _{{name}}_completion {{name}}
+elif type compdef &>/dev/null; then
+ function _{{name}}_completion {
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ compadd -- $(COMP_CWORD=$((CURRENT-1)) \
+ COMP_LINE=$BUFFER \
+ COMP_POINT=0 \
+ _{{name}}_completer -- "${words[@]}" \
+ 2>$_log_file)
+ }
+ compdef _{{name}}_completion {{name}}
+elif type compctl &>/dev/null; then
+ function _{{name}}_completion {
+ local cword line point words si
+ read -Ac words
+ read -cn cword
+ let cword-=1
+ read -l line
+ read -ln point
+ local _log_file=/dev/null
+ [[ -z "$_{{name}}_log" ]] || _log_file="$_{{name}}_log"
+ reply=($(COMP_CWORD="$cword" \
+ COMP_LINE="$line" \
+ COMP_POINT="$point" \
+ _{{name}}_completer -- "${words[@]}" \
+ 2>$_log_file)) || return $?
+ }
+ compctl -K _{{name}}_completion {{name}}
+fi
+
+
+##
+## This is a Bash completion file for the '{{name}}' command. You can install
+## with either:
+##
+## cp FILE /usr/local/etc/bash_completion.d/{{name}} # Mac
+## cp FILE /etc/bash_completion.d/{{name}} # Linux
+##
+## or:
+##
+## cp FILE > ~/.{{name}}.completion
+## echo "source ~/.{{name}}.completion" >> ~/.bashrc
+## \ No newline at end of file
diff --git a/node_modules/dashdash/lib/dashdash.js b/node_modules/dashdash/lib/dashdash.js
new file mode 100644
index 0000000..adb6f13
--- /dev/null
+++ b/node_modules/dashdash/lib/dashdash.js
@@ -0,0 +1,1055 @@
+/**
+ * dashdash - A light, featureful and explicit option parsing library for
+ * node.js.
+ */
+// vim: set ts=4 sts=4 sw=4 et:
+
+var assert = require('assert-plus');
+var format = require('util').format;
+var fs = require('fs');
+var path = require('path');
+
+
+var DEBUG = true;
+if (DEBUG) {
+ var debug = console.warn;
+} else {
+ var debug = function () {};
+}
+
+
+
+// ---- internal support stuff
+
+// Replace {{variable}} in `s` with the template data in `d`.
+function renderTemplate(s, d) {
+ return s.replace(/{{([a-zA-Z]+)}}/g, function (match, key) {
+ return d.hasOwnProperty(key) ? d[key] : match;
+ });
+}
+
+/**
+ * Return a shallow copy of the given object;
+ */
+function shallowCopy(obj) {
+ if (!obj) {
+ return (obj);
+ }
+ var copy = {};
+ Object.keys(obj).forEach(function (k) {
+ copy[k] = obj[k];
+ });
+ return (copy);
+}
+
+
+function space(n) {
+ var s = '';
+ for (var i = 0; i < n; i++) {
+ s += ' ';
+ }
+ return s;
+}
+
+
+function makeIndent(arg, deflen, name) {
+ if (arg === null || arg === undefined)
+ return space(deflen);
+ else if (typeof (arg) === 'number')
+ return space(arg);
+ else if (typeof (arg) === 'string')
+ return arg;
+ else
+ assert.fail('invalid "' + name + '": not a string or number: ' + arg);
+}
+
+
+/**
+ * Return an array of lines wrapping the given text to the given width.
+ * This splits on whitespace. Single tokens longer than `width` are not
+ * broken up.
+ */
+function textwrap(s, width) {
+ var words = s.trim().split(/\s+/);
+ var lines = [];
+ var line = '';
+ words.forEach(function (w) {
+ var newLength = line.length + w.length;
+ if (line.length > 0)
+ newLength += 1;
+ if (newLength > width) {
+ lines.push(line);
+ line = '';
+ }
+ if (line.length > 0)
+ line += ' ';
+ line += w;
+ });
+ lines.push(line);
+ return lines;
+}
+
+
+/**
+ * Transform an option name to a "key" that is used as the field
+ * on the `opts` object returned from `<parser>.parse()`.
+ *
+ * Transformations:
+ * - '-' -> '_': This allow one to use hyphen in option names (common)
+ * but not have to do silly things like `opt["dry-run"]` to access the
+ * parsed results.
+ */
+function optionKeyFromName(name) {
+ return name.replace(/-/g, '_');
+}
+
+
+
+// ---- Option types
+
+function parseBool(option, optstr, arg) {
+ return Boolean(arg);
+}
+
+function parseString(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ return arg;
+}
+
+function parseNumber(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var num = Number(arg);
+ if (isNaN(num)) {
+ throw new Error(format('arg for "%s" is not a number: "%s"',
+ optstr, arg));
+ }
+ return num;
+}
+
+function parseInteger(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var num = Number(arg);
+ if (!/^[0-9-]+$/.test(arg) || isNaN(num)) {
+ throw new Error(format('arg for "%s" is not an integer: "%s"',
+ optstr, arg));
+ }
+ return num;
+}
+
+function parsePositiveInteger(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var num = Number(arg);
+ if (!/^[0-9]+$/.test(arg) || isNaN(num) || num === 0) {
+ throw new Error(format('arg for "%s" is not a positive integer: "%s"',
+ optstr, arg));
+ }
+ return num;
+}
+
+/**
+ * Supported date args:
+ * - epoch second times (e.g. 1396031701)
+ * - ISO 8601 format: YYYY-MM-DD[THH:MM:SS[.sss][Z]]
+ * 2014-03-28T18:35:01.489Z
+ * 2014-03-28T18:35:01.489
+ * 2014-03-28T18:35:01Z
+ * 2014-03-28T18:35:01
+ * 2014-03-28
+ */
+function parseDate(option, optstr, arg) {
+ assert.string(arg, 'arg');
+ var date;
+ if (/^\d+$/.test(arg)) {
+ // epoch seconds
+ date = new Date(Number(arg) * 1000);
+ /* JSSTYLED */
+ } else if (/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?Z?)?$/i.test(arg)) {
+ // ISO 8601 format
+ date = new Date(arg);
+ } else {
+ throw new Error(format('arg for "%s" is not a valid date format: "%s"',
+ optstr, arg));
+ }
+ if (date.toString() === 'Invalid Date') {
+ throw new Error(format('arg for "%s" is an invalid date: "%s"',
+ optstr, arg));
+ }
+ return date;
+}
+
+var optionTypes = {
+ bool: {
+ takesArg: false,
+ parseArg: parseBool
+ },
+ string: {
+ takesArg: true,
+ helpArg: 'ARG',
+ parseArg: parseString
+ },
+ number: {
+ takesArg: true,
+ helpArg: 'NUM',
+ parseArg: parseNumber
+ },
+ integer: {
+ takesArg: true,
+ helpArg: 'INT',
+ parseArg: parseInteger
+ },
+ positiveInteger: {
+ takesArg: true,
+ helpArg: 'INT',
+ parseArg: parsePositiveInteger
+ },
+ date: {
+ takesArg: true,
+ helpArg: 'DATE',
+ parseArg: parseDate
+ },
+ arrayOfBool: {
+ takesArg: false,
+ array: true,
+ parseArg: parseBool
+ },
+ arrayOfString: {
+ takesArg: true,
+ helpArg: 'ARG',
+ array: true,
+ parseArg: parseString
+ },
+ arrayOfNumber: {
+ takesArg: true,
+ helpArg: 'NUM',
+ array: true,
+ parseArg: parseNumber
+ },
+ arrayOfInteger: {
+ takesArg: true,
+ helpArg: 'INT',
+ array: true,
+ parseArg: parseInteger
+ },
+ arrayOfPositiveInteger: {
+ takesArg: true,
+ helpArg: 'INT',
+ array: true,
+ parseArg: parsePositiveInteger
+ },
+ arrayOfDate: {
+ takesArg: true,
+ helpArg: 'INT',
+ array: true,
+ parseArg: parseDate
+ },
+};
+
+
+
+// ---- Parser
+
+/**
+ * Parser constructor.
+ *
+ * @param config {Object} The parser configuration
+ * - options {Array} Array of option specs. See the README for how to
+ * specify each option spec.
+ * - allowUnknown {Boolean} Default false. Whether to throw on unknown
+ * options. If false, then unknown args are included in the _args array.
+ * - interspersed {Boolean} Default true. Whether to allow interspersed
+ * arguments (non-options) and options. E.g.:
+ * node tool.js arg1 arg2 -v
+ * '-v' is after some args here. If `interspersed: false` then '-v'
+ * would not be parsed out. Note that regardless of `interspersed`
+ * the presence of '--' will stop option parsing, as all good
+ * option parsers should.
+ */
+function Parser(config) {
+ assert.object(config, 'config');
+ assert.arrayOfObject(config.options, 'config.options');
+ assert.optionalBool(config.interspersed, 'config.interspersed');
+ var self = this;
+
+ // Allow interspersed arguments (true by default).
+ this.interspersed = (config.interspersed !== undefined
+ ? config.interspersed : true);
+
+ // Don't allow unknown flags (true by default).
+ this.allowUnknown = (config.allowUnknown !== undefined
+ ? config.allowUnknown : false);
+
+ this.options = config.options.map(function (o) { return shallowCopy(o); });
+ this.optionFromName = {};
+ this.optionFromEnv = {};
+ for (var i = 0; i < this.options.length; i++) {
+ var o = this.options[i];
+ if (o.group !== undefined && o.group !== null) {
+ assert.optionalString(o.group,
+ format('config.options.%d.group', i));
+ continue;
+ }
+ assert.ok(optionTypes[o.type],
+ format('invalid config.options.%d.type: "%s" in %j',
+ i, o.type, o));
+ assert.optionalString(o.name, format('config.options.%d.name', i));
+ assert.optionalArrayOfString(o.names,
+ format('config.options.%d.names', i));
+ assert.ok((o.name || o.names) && !(o.name && o.names),
+ format('exactly one of "name" or "names" required: %j', o));
+ assert.optionalString(o.help, format('config.options.%d.help', i));
+ var env = o.env || [];
+ if (typeof (env) === 'string') {
+ env = [env];
+ }
+ assert.optionalArrayOfString(env, format('config.options.%d.env', i));
+ assert.optionalString(o.helpGroup,
+ format('config.options.%d.helpGroup', i));
+ assert.optionalBool(o.helpWrap,
+ format('config.options.%d.helpWrap', i));
+ assert.optionalBool(o.hidden, format('config.options.%d.hidden', i));
+
+ if (o.name) {
+ o.names = [o.name];
+ } else {
+ assert.string(o.names[0],
+ format('config.options.%d.names is empty', i));
+ }
+ o.key = optionKeyFromName(o.names[0]);
+ o.names.forEach(function (n) {
+ if (self.optionFromName[n]) {
+ throw new Error(format(
+ 'option name collision: "%s" used in %j and %j',
+ n, self.optionFromName[n], o));
+ }
+ self.optionFromName[n] = o;
+ });
+ env.forEach(function (n) {
+ if (self.optionFromEnv[n]) {
+ throw new Error(format(
+ 'option env collision: "%s" used in %j and %j',
+ n, self.optionFromEnv[n], o));
+ }
+ self.optionFromEnv[n] = o;
+ });
+ }
+}
+
+Parser.prototype.optionTakesArg = function optionTakesArg(option) {
+ return optionTypes[option.type].takesArg;
+};
+
+/**
+ * Parse options from the given argv.
+ *
+ * @param inputs {Object} Optional.
+ * - argv {Array} Optional. The argv to parse. Defaults to
+ * `process.argv`.
+ * - slice {Number} The index into argv at which options/args begin.
+ * Default is 2, as appropriate for `process.argv`.
+ * - env {Object} Optional. The env to use for 'env' entries in the
+ * option specs. Defaults to `process.env`.
+ * @returns {Object} Parsed `opts`. It has special keys `_args` (the
+ * remaining args from `argv`) and `_order` (gives the order that
+ * options were specified).
+ */
+Parser.prototype.parse = function parse(inputs) {
+ var self = this;
+
+ // Old API was `parse([argv, [slice]])`
+ if (Array.isArray(arguments[0])) {
+ inputs = {argv: arguments[0], slice: arguments[1]};
+ }
+
+ assert.optionalObject(inputs, 'inputs');
+ if (!inputs) {
+ inputs = {};
+ }
+ assert.optionalArrayOfString(inputs.argv, 'inputs.argv');
+ //assert.optionalNumber(slice, 'slice');
+ var argv = inputs.argv || process.argv;
+ var slice = inputs.slice !== undefined ? inputs.slice : 2;
+ var args = argv.slice(slice);
+ var env = inputs.env || process.env;
+ var opts = {};
+ var _order = [];
+
+ function addOpt(option, optstr, key, val, from) {
+ var type = optionTypes[option.type];
+ var parsedVal = type.parseArg(option, optstr, val);
+ if (type.array) {
+ if (!opts[key]) {
+ opts[key] = [];
+ }
+ if (type.arrayFlatten && Array.isArray(parsedVal)) {
+ for (var i = 0; i < parsedVal.length; i++) {
+ opts[key].push(parsedVal[i]);
+ }
+ } else {
+ opts[key].push(parsedVal);
+ }
+ } else {
+ opts[key] = parsedVal;
+ }
+ var item = { key: key, value: parsedVal, from: from };
+ _order.push(item);
+ }
+
+ // Parse args.
+ var _args = [];
+ var i = 0;
+ outer: while (i < args.length) {
+ var arg = args[i];
+
+ // End of options marker.
+ if (arg === '--') {
+ i++;
+ break;
+
+ // Long option
+ } else if (arg.slice(0, 2) === '--') {
+ var name = arg.slice(2);
+ var val = null;
+ var idx = name.indexOf('=');
+ if (idx !== -1) {
+ val = name.slice(idx + 1);
+ name = name.slice(0, idx);
+ }
+ var option = this.optionFromName[name];
+ if (!option) {
+ if (!this.allowUnknown)
+ throw new Error(format('unknown option: "--%s"', name));
+ else if (this.interspersed)
+ _args.push(arg);
+ else
+ break outer;
+ } else {
+ var takesArg = this.optionTakesArg(option);
+ if (val !== null && !takesArg) {
+ throw new Error(format('argument given to "--%s" option '
+ + 'that does not take one: "%s"', name, arg));
+ }
+ if (!takesArg) {
+ addOpt(option, '--'+name, option.key, true, 'argv');
+ } else if (val !== null) {
+ addOpt(option, '--'+name, option.key, val, 'argv');
+ } else if (i + 1 >= args.length) {
+ throw new Error(format('do not have enough args for "--%s" '
+ + 'option', name));
+ } else {
+ addOpt(option, '--'+name, option.key, args[i + 1], 'argv');
+ i++;
+ }
+ }
+
+ // Short option
+ } else if (arg[0] === '-' && arg.length > 1) {
+ var j = 1;
+ var allFound = true;
+ while (j < arg.length) {
+ var name = arg[j];
+ var option = this.optionFromName[name];
+ if (!option) {
+ allFound = false;
+ if (this.allowUnknown) {
+ if (this.interspersed) {
+ _args.push(arg);
+ break;
+ } else
+ break outer;
+ } else if (arg.length > 2) {
+ throw new Error(format(
+ 'unknown option: "-%s" in "%s" group',
+ name, arg));
+ } else {
+ throw new Error(format('unknown option: "-%s"', name));
+ }
+ } else if (this.optionTakesArg(option)) {
+ break;
+ }
+ j++;
+ }
+
+ j = 1;
+ while (allFound && j < arg.length) {
+ var name = arg[j];
+ var val = arg.slice(j + 1); // option val if it takes an arg
+ var option = this.optionFromName[name];
+ var takesArg = this.optionTakesArg(option);
+ if (!takesArg) {
+ addOpt(option, '-'+name, option.key, true, 'argv');
+ } else if (val) {
+ addOpt(option, '-'+name, option.key, val, 'argv');
+ break;
+ } else {
+ if (i + 1 >= args.length) {
+ throw new Error(format('do not have enough args '
+ + 'for "-%s" option', name));
+ }
+ addOpt(option, '-'+name, option.key, args[i + 1], 'argv');
+ i++;
+ break;
+ }
+ j++;
+ }
+
+ // An interspersed arg
+ } else if (this.interspersed) {
+ _args.push(arg);
+
+ // An arg and interspersed args are not allowed, so done options.
+ } else {
+ break outer;
+ }
+ i++;
+ }
+ _args = _args.concat(args.slice(i));
+
+ // Parse environment.
+ Object.keys(this.optionFromEnv).forEach(function (envname) {
+ var val = env[envname];
+ if (val === undefined)
+ return;
+ var option = self.optionFromEnv[envname];
+ if (opts[option.key] !== undefined)
+ return;
+ var takesArg = self.optionTakesArg(option);
+ if (takesArg) {
+ addOpt(option, envname, option.key, val, 'env');
+ } else if (val !== '') {
+ // Boolean envvar handling:
+ // - VAR=<empty-string> not set (as if the VAR was not set)
+ // - VAR=0 false
+ // - anything else true
+ addOpt(option, envname, option.key, (val !== '0'), 'env');
+ }
+ });
+
+ // Apply default values.
+ this.options.forEach(function (o) {
+ if (opts[o.key] === undefined) {
+ if (o.default !== undefined) {
+ opts[o.key] = o.default;
+ } else if (o.type && optionTypes[o.type].default !== undefined) {
+ opts[o.key] = optionTypes[o.type].default;
+ }
+ }
+ });
+
+ opts._order = _order;
+ opts._args = _args;
+ return opts;
+};
+
+
+/**
+ * Return help output for the current options.
+ *
+ * E.g.: if the current options are:
+ * [{names: ['help', 'h'], type: 'bool', help: 'Show help and exit.'}]
+ * then this would return:
+ * ' -h, --help Show help and exit.\n'
+ *
+ * @param config {Object} Config for controlling the option help output.
+ * - indent {Number|String} Default 4. An indent/prefix to use for
+ * each option line.
+ * - nameSort {String} Default is 'length'. By default the names are
+ * sorted to put the short opts first (i.e. '-h, --help' preferred
+ * to '--help, -h'). Set to 'none' to not do this sorting.
+ * - maxCol {Number} Default 80. Note that long tokens in a help string
+ * can go past this.
+ * - helpCol {Number} Set to specify a specific column at which
+ * option help will be aligned. By default this is determined
+ * automatically.
+ * - minHelpCol {Number} Default 20.
+ * - maxHelpCol {Number} Default 40.
+ * - includeEnv {Boolean} Default false. If true, a note stating the `env`
+ * envvar (if specified for this option) will be appended to the help
+ * output.
+ * - includeDefault {Boolean} Default false. If true, a note stating
+ * the `default` for this option, if any, will be appended to the help
+ * output.
+ * - helpWrap {Boolean} Default true. Wrap help text in helpCol..maxCol
+ * bounds.
+ * @returns {String}
+ */
+Parser.prototype.help = function help(config) {
+ config = config || {};
+ assert.object(config, 'config');
+
+ var indent = makeIndent(config.indent, 4, 'config.indent');
+ var headingIndent = makeIndent(config.headingIndent,
+ Math.round(indent.length / 2), 'config.headingIndent');
+
+ assert.optionalString(config.nameSort, 'config.nameSort');
+ var nameSort = config.nameSort || 'length';
+ assert.ok(~['length', 'none'].indexOf(nameSort),
+ 'invalid "config.nameSort"');
+ assert.optionalNumber(config.maxCol, 'config.maxCol');
+ assert.optionalNumber(config.maxHelpCol, 'config.maxHelpCol');
+ assert.optionalNumber(config.minHelpCol, 'config.minHelpCol');
+ assert.optionalNumber(config.helpCol, 'config.helpCol');
+ assert.optionalBool(config.includeEnv, 'config.includeEnv');
+ assert.optionalBool(config.includeDefault, 'config.includeDefault');
+ assert.optionalBool(config.helpWrap, 'config.helpWrap');
+ var maxCol = config.maxCol || 80;
+ var minHelpCol = config.minHelpCol || 20;
+ var maxHelpCol = config.maxHelpCol || 40;
+
+ var lines = [];
+ var maxWidth = 0;
+ this.options.forEach(function (o) {
+ if (o.hidden) {
+ return;
+ }
+ if (o.group !== undefined && o.group !== null) {
+ // We deal with groups in the next pass
+ lines.push(null);
+ return;
+ }
+ var type = optionTypes[o.type];
+ var arg = o.helpArg || type.helpArg || 'ARG';
+ var line = '';
+ var names = o.names.slice();
+ if (nameSort === 'length') {
+ names.sort(function (a, b) {
+ if (a.length < b.length)
+ return -1;
+ else if (b.length < a.length)
+ return 1;
+ else
+ return 0;
+ })
+ }
+ names.forEach(function (name, i) {
+ if (i > 0)
+ line += ', ';
+ if (name.length === 1) {
+ line += '-' + name
+ if (type.takesArg)
+ line += ' ' + arg;
+ } else {
+ line += '--' + name
+ if (type.takesArg)
+ line += '=' + arg;
+ }
+ });
+ maxWidth = Math.max(maxWidth, line.length);
+ lines.push(line);
+ });
+
+ // Add help strings.
+ var helpCol = config.helpCol;
+ if (!helpCol) {
+ helpCol = maxWidth + indent.length + 2;
+ helpCol = Math.min(Math.max(helpCol, minHelpCol), maxHelpCol);
+ }
+ var i = -1;
+ this.options.forEach(function (o) {
+ if (o.hidden) {
+ return;
+ }
+ i++;
+
+ if (o.group !== undefined && o.group !== null) {
+ if (o.group === '') {
+ // Support a empty string "group" to have a blank line between
+ // sets of options.
+ lines[i] = '';
+ } else {
+ // Render the group heading with the heading-specific indent.
+ lines[i] = (i === 0 ? '' : '\n') + headingIndent +
+ o.group + ':';
+ }
+ return;
+ }
+
+ var helpDefault;
+ if (config.includeDefault) {
+ if (o.default !== undefined) {
+ helpDefault = format('Default: %j', o.default);
+ } else if (o.type && optionTypes[o.type].default !== undefined) {
+ helpDefault = format('Default: %j',
+ optionTypes[o.type].default);
+ }
+ }
+
+ var line = lines[i] = indent + lines[i];
+ if (!o.help && !(config.includeEnv && o.env) && !helpDefault) {
+ return;
+ }
+ var n = helpCol - line.length;
+ if (n >= 0) {
+ line += space(n);
+ } else {
+ line += '\n' + space(helpCol);
+ }
+
+ var helpEnv = '';
+ if (o.env && o.env.length && config.includeEnv) {
+ helpEnv += 'Environment: ';
+ var type = optionTypes[o.type];
+ var arg = o.helpArg || type.helpArg || 'ARG';
+ var envs = (Array.isArray(o.env) ? o.env : [o.env]).map(
+ function (e) {
+ if (type.takesArg) {
+ return e + '=' + arg;
+ } else {
+ return e + '=1';
+ }
+ }
+ );
+ helpEnv += envs.join(', ');
+ }
+ var help = (o.help || '').trim();
+ if (o.helpWrap !== false && config.helpWrap !== false) {
+ // Wrap help description normally.
+ if (help.length && !~'.!?"\''.indexOf(help.slice(-1))) {
+ help += '.';
+ }
+ if (help.length) {
+ help += ' ';
+ }
+ help += helpEnv;
+ if (helpDefault) {
+ if (helpEnv) {
+ help += '. ';
+ }
+ help += helpDefault;
+ }
+ line += textwrap(help, maxCol - helpCol).join(
+ '\n' + space(helpCol));
+ } else {
+ // Do not wrap help description, but indent newlines appropriately.
+ var helpLines = help.split('\n').filter(
+ function (ln) { return ln.length });
+ if (helpEnv !== '') {
+ helpLines.push(helpEnv);
+ }
+ if (helpDefault) {
+ helpLines.push(helpDefault);
+ }
+ line += helpLines.join('\n' + space(helpCol));
+ }
+
+ lines[i] = line;
+ });
+
+ var rv = '';
+ if (lines.length > 0) {
+ rv = lines.join('\n') + '\n';
+ }
+ return rv;
+};
+
+
+/**
+ * Return a string suitable for a Bash completion file for this tool.
+ *
+ * @param args.name {String} The tool name.
+ * @param args.specExtra {String} Optional. Extra Bash code content to add
+ * to the end of the "spec". Typically this is used to append Bash
+ * "complete_TYPE" functions for custom option types. See
+ * "examples/ddcompletion.js" for an example.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+Parser.prototype.bashCompletion = function bashCompletion(args) {
+ assert.object(args, 'args');
+ assert.string(args.name, 'args.name');
+ assert.optionalString(args.specExtra, 'args.specExtra');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ return bashCompletionFromOptions({
+ name: args.name,
+ specExtra: args.specExtra,
+ argtypes: args.argtypes,
+ options: this.options
+ });
+};
+
+
+// ---- Bash completion
+
+const BASH_COMPLETION_TEMPLATE_PATH = path.join(
+ __dirname, '../etc/dashdash.bash_completion.in');
+
+/**
+ * Return the Bash completion "spec" (the string value for the "{{spec}}"
+ * var in the "dashdash.bash_completion.in" template) for this tool.
+ *
+ * The "spec" is Bash code that defines the CLI options and subcmds for
+ * the template's completion code. It looks something like this:
+ *
+ * local cmd_shortopts="-J ..."
+ * local cmd_longopts="--help ..."
+ * local cmd_optargs="-p=tritonprofile ..."
+ *
+ * @param args.options {Array} The array of dashdash option specs.
+ * @param args.context {String} Optional. A context string for the "local cmd*"
+ * vars in the spec. By default it is the empty string. When used to
+ * scope for completion on a *sub-command* (e.g. for "git log" on a "git"
+ * tool), then it would have a value (e.g. "__log"). See
+ * <http://github.com/trentm/node-cmdln> Bash completion for details.
+ * @param opts.includeHidden {Boolean} Optional. Default false. By default
+ * hidden options and subcmds are "excluded". Here excluded means they
+ * won't be offered as a completion, but if used, their argument type
+ * will be completed. "Hidden" options and subcmds are ones with the
+ * `hidden: true` attribute to exclude them from default help output.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+function bashCompletionSpecFromOptions(args) {
+ assert.object(args, 'args');
+ assert.object(args.options, 'args.options');
+ assert.optionalString(args.context, 'args.context');
+ assert.optionalBool(args.includeHidden, 'args.includeHidden');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ var context = args.context || '';
+ var includeHidden = (args.includeHidden === undefined
+ ? false : args.includeHidden);
+
+ var spec = [];
+ var shortopts = [];
+ var longopts = [];
+ var optargs = [];
+ (args.options || []).forEach(function (o) {
+ if (o.group !== undefined && o.group !== null) {
+ // Skip group headers.
+ return;
+ }
+
+ var optNames = o.names || [o.name];
+ var optType = getOptionType(o.type);
+ if (optType.takesArg) {
+ var completionType = o.completionType ||
+ optType.completionType || o.type;
+ optNames.forEach(function (optName) {
+ if (optName.length === 1) {
+ if (includeHidden || !o.hidden) {
+ shortopts.push('-' + optName);
+ }
+ // Include even hidden options in `optargs` so that bash
+ // completion of its arg still works.
+ optargs.push('-' + optName + '=' + completionType);
+ } else {
+ if (includeHidden || !o.hidden) {
+ longopts.push('--' + optName);
+ }
+ optargs.push('--' + optName + '=' + completionType);
+ }
+ });
+ } else {
+ optNames.forEach(function (optName) {
+ if (includeHidden || !o.hidden) {
+ if (optName.length === 1) {
+ shortopts.push('-' + optName);
+ } else {
+ longopts.push('--' + optName);
+ }
+ }
+ });
+ }
+ });
+
+ spec.push(format('local cmd%s_shortopts="%s"',
+ context, shortopts.sort().join(' ')));
+ spec.push(format('local cmd%s_longopts="%s"',
+ context, longopts.sort().join(' ')));
+ spec.push(format('local cmd%s_optargs="%s"',
+ context, optargs.sort().join(' ')));
+ if (args.argtypes) {
+ spec.push(format('local cmd%s_argtypes="%s"',
+ context, args.argtypes.join(' ')));
+ }
+ return spec.join('\n');
+}
+
+
+/**
+ * Return a string suitable for a Bash completion file for this tool.
+ *
+ * @param args.name {String} The tool name.
+ * @param args.options {Array} The array of dashdash option specs.
+ * @param args.specExtra {String} Optional. Extra Bash code content to add
+ * to the end of the "spec". Typically this is used to append Bash
+ * "complete_TYPE" functions for custom option types. See
+ * "examples/ddcompletion.js" for an example.
+ * @param args.argtypes {Array} Optional. Array of completion types for
+ * positional args (i.e. non-options). E.g.
+ * argtypes = ['fruit', 'veggie', 'file']
+ * will result in completion of fruits for the first arg, veggies for the
+ * second, and filenames for the third and subsequent positional args.
+ * If not given, positional args will use Bash's 'default' completion.
+ * See `specExtra` for providing Bash `complete_TYPE` functions, e.g.
+ * `complete_fruit` and `complete_veggie` in this example.
+ */
+function bashCompletionFromOptions(args) {
+ assert.object(args, 'args');
+ assert.object(args.options, 'args.options');
+ assert.string(args.name, 'args.name');
+ assert.optionalString(args.specExtra, 'args.specExtra');
+ assert.optionalArrayOfString(args.argtypes, 'args.argtypes');
+
+ // Gather template data.
+ var data = {
+ name: args.name,
+ date: new Date(),
+ spec: bashCompletionSpecFromOptions({
+ options: args.options,
+ argtypes: args.argtypes
+ }),
+ };
+ if (args.specExtra) {
+ data.spec += '\n\n' + args.specExtra;
+ }
+
+ // Render template.
+ var template = fs.readFileSync(BASH_COMPLETION_TEMPLATE_PATH, 'utf8');
+ return renderTemplate(template, data);
+}
+
+
+
+// ---- exports
+
+function createParser(config) {
+ return new Parser(config);
+}
+
+/**
+ * Parse argv with the given options.
+ *
+ * @param config {Object} A merge of all the available fields from
+ * `dashdash.Parser` and `dashdash.Parser.parse`: options, interspersed,
+ * argv, env, slice.
+ */
+function parse(config) {
+ assert.object(config, 'config');
+ assert.optionalArrayOfString(config.argv, 'config.argv');
+ assert.optionalObject(config.env, 'config.env');
+ var config = shallowCopy(config);
+ var argv = config.argv;
+ delete config.argv;
+ var env = config.env;
+ delete config.env;
+
+ var parser = new Parser(config);
+ return parser.parse({argv: argv, env: env});
+}
+
+
+/**
+ * Add a new option type.
+ *
+ * @params optionType {Object}:
+ * - name {String} Required.
+ * - takesArg {Boolean} Required. Whether this type of option takes an
+ * argument on process.argv. Typically this is true for all but the
+ * "bool" type.
+ * - helpArg {String} Required iff `takesArg === true`. The string to
+ * show in generated help for options of this type.
+ * - parseArg {Function} Require. `function (option, optstr, arg)` parser
+ * that takes a string argument and returns an instance of the
+ * appropriate type, or throws an error if the arg is invalid.
+ * - array {Boolean} Optional. Set to true if this is an 'arrayOf' type
+ * that collects multiple usages of the option in process.argv and
+ * puts results in an array.
+ * - arrayFlatten {Boolean} Optional. XXX
+ * - default Optional. Default value for options of this type, if no
+ * default is specified in the option type usage.
+ */
+function addOptionType(optionType) {
+ assert.object(optionType, 'optionType');
+ assert.string(optionType.name, 'optionType.name');
+ assert.bool(optionType.takesArg, 'optionType.takesArg');
+ if (optionType.takesArg) {
+ assert.string(optionType.helpArg, 'optionType.helpArg');
+ }
+ assert.func(optionType.parseArg, 'optionType.parseArg');
+ assert.optionalBool(optionType.array, 'optionType.array');
+ assert.optionalBool(optionType.arrayFlatten, 'optionType.arrayFlatten');
+
+ optionTypes[optionType.name] = {
+ takesArg: optionType.takesArg,
+ helpArg: optionType.helpArg,
+ parseArg: optionType.parseArg,
+ array: optionType.array,
+ arrayFlatten: optionType.arrayFlatten,
+ default: optionType.default
+ }
+}
+
+
+function getOptionType(name) {
+ assert.string(name, 'name');
+ return optionTypes[name];
+}
+
+
+/**
+ * Return a synopsis string for the given option spec.
+ *
+ * Examples:
+ * > synopsisFromOpt({names: ['help', 'h'], type: 'bool'});
+ * '[ --help | -h ]'
+ * > synopsisFromOpt({name: 'file', type: 'string', helpArg: 'FILE'});
+ * '[ --file=FILE ]'
+ */
+function synopsisFromOpt(o) {
+ assert.object(o, 'o');
+
+ if (o.hasOwnProperty('group')) {
+ return null;
+ }
+ var names = o.names || [o.name];
+ // `type` here could be undefined if, for example, the command has a
+ // dashdash option spec with a bogus 'type'.
+ var type = getOptionType(o.type);
+ var helpArg = o.helpArg || (type && type.helpArg) || 'ARG';
+ var parts = [];
+ names.forEach(function (name) {
+ var part = (name.length === 1 ? '-' : '--') + name;
+ if (type && type.takesArg) {
+ part += (name.length === 1 ? ' ' + helpArg : '=' + helpArg);
+ }
+ parts.push(part);
+ });
+ return ('[ ' + parts.join(' | ') + ' ]');
+};
+
+
+module.exports = {
+ createParser: createParser,
+ Parser: Parser,
+ parse: parse,
+ addOptionType: addOptionType,
+ getOptionType: getOptionType,
+ synopsisFromOpt: synopsisFromOpt,
+
+ // Bash completion-related exports
+ BASH_COMPLETION_TEMPLATE_PATH: BASH_COMPLETION_TEMPLATE_PATH,
+ bashCompletionFromOptions: bashCompletionFromOptions,
+ bashCompletionSpecFromOptions: bashCompletionSpecFromOptions,
+
+ // Export the parseFoo parsers because they might be useful as primitives
+ // for custom option types.
+ parseBool: parseBool,
+ parseString: parseString,
+ parseNumber: parseNumber,
+ parseInteger: parseInteger,
+ parsePositiveInteger: parsePositiveInteger,
+ parseDate: parseDate
+};
diff --git a/node_modules/dashdash/package.json b/node_modules/dashdash/package.json
new file mode 100644
index 0000000..a11e1f5
--- /dev/null
+++ b/node_modules/dashdash/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "dashdash",
+ "description": "A light, featureful and explicit option parsing library.",
+ "version": "1.14.1",
+ "author": "Trent Mick <trentm@gmail.com> (http://trentm.com)",
+ "keywords": ["option", "parser", "parsing", "cli", "command", "args",
+ "bash", "completion"],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/trentm/node-dashdash.git"
+ },
+ "main": "./lib/dashdash.js",
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ },
+ "devDependencies": {
+ "nodeunit": "0.9.x"
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "scripts": {
+ "test": "nodeunit test/*.test.js"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/debug/CHANGELOG.md b/node_modules/debug/CHANGELOG.md
new file mode 100644
index 0000000..820d21e
--- /dev/null
+++ b/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,395 @@
+
+3.1.0 / 2017-09-26
+==================
+
+ * Add `DEBUG_HIDE_DATE` env var (#486)
+ * Remove ReDoS regexp in %o formatter (#504)
+ * Remove "component" from package.json
+ * Remove `component.json`
+ * Ignore package-lock.json
+ * Examples: fix colors printout
+ * Fix: browser detection
+ * Fix: spelling mistake (#496, @EdwardBetts)
+
+3.0.1 / 2017-08-24
+==================
+
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
+
+3.0.0 / 2017-08-08
+==================
+
+ * Breaking: Remove DEBUG_FD (#406)
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
+ * Addition: document `enabled` flag (#465)
+ * Addition: add 256 colors mode (#481)
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
+ * Update: component: update "ms" to v2.0.0
+ * Update: separate the Node and Browser tests in Travis-CI
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
+ * Update: separate Node.js and web browser examples for organization
+ * Update: update "browserify" to v14.4.0
+ * Fix: fix Readme typo (#473)
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE
new file mode 100644
index 0000000..658c933
--- /dev/null
+++ b/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md
new file mode 100644
index 0000000..0ee7634
--- /dev/null
+++ b/node_modules/debug/README.md
@@ -0,0 +1,437 @@
+# debug
+[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/debug/node.js b/node_modules/debug/node.js
new file mode 100644
index 0000000..7fc36fe
--- /dev/null
+++ b/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json
new file mode 100644
index 0000000..191c815
--- /dev/null
+++ b/node_modules/debug/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "debug",
+ "version": "3.2.7",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "node.js",
+ "dist/debug.js",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.1"
+ },
+ "devDependencies": {
+ "@babel/cli": "^7.0.0",
+ "@babel/core": "^7.0.0",
+ "@babel/preset-env": "^7.0.0",
+ "browserify": "14.4.0",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.0.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "xo": "^0.23.0"
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "unpkg": "./dist/debug.js"
+}
diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..c924b0a
--- /dev/null
+++ b/node_modules/debug/src/browser.js
@@ -0,0 +1,180 @@
+"use strict";
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+/**
+ * Colors.
+ */
+
+exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+// eslint-disable-next-line complexity
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ } // Internet Explorer and Edge do not support colors.
+
+
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ } // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+
+
+ return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
+ typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
+}
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function (match) {
+ if (match === '%%') {
+ return;
+ }
+
+ index++;
+
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+ args.splice(lastC, 0, c);
+}
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+
+function log() {
+ var _console;
+
+ // This hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
+}
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {// Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+
+function load() {
+ var r;
+
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {} // Swallow
+ // XXX (@Qix-) should we be logging these?
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+
+
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {// Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+var formatters = module.exports.formatters;
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
+
diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js
new file mode 100644
index 0000000..e0de3fb
--- /dev/null
+++ b/node_modules/debug/src/common.js
@@ -0,0 +1,249 @@
+"use strict";
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ Object.keys(env).forEach(function (key) {
+ createDebug[key] = env[key];
+ });
+ /**
+ * Active `debug` instances.
+ */
+
+ createDebug.instances = [];
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+ createDebug.formatters = {};
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+
+ function selectColor(namespace) {
+ var hash = 0;
+
+ for (var i = 0; i < namespace.length; i++) {
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+
+ createDebug.selectColor = selectColor;
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+ function createDebug(namespace) {
+ var prevTime;
+
+ function debug() {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var self = debug; // Set `diff` timestamp
+
+ var curr = Number(new Date());
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ } // Apply any `formatters` transformations
+
+
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return match;
+ }
+
+ index++;
+ var formatter = createDebug.formatters[format];
+
+ if (typeof formatter === 'function') {
+ var val = args[index];
+ match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
+
+ args.splice(index, 1);
+ index--;
+ }
+
+ return match;
+ }); // Apply env-specific formatting (colors, etc.)
+
+ createDebug.formatArgs.call(self, args);
+ var logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = createDebug.enabled(namespace);
+ debug.useColors = createDebug.useColors();
+ debug.color = selectColor(namespace);
+ debug.destroy = destroy;
+ debug.extend = extend; // Debug.formatArgs = formatArgs;
+ // debug.rawLog = rawLog;
+ // env-specific initialization logic for debug instances
+
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ createDebug.instances.push(debug);
+ return debug;
+ }
+
+ function destroy() {
+ var index = createDebug.instances.indexOf(this);
+
+ if (index !== -1) {
+ createDebug.instances.splice(index, 1);
+ return true;
+ }
+
+ return false;
+ }
+
+ function extend(namespace, delimiter) {
+ return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ }
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.names = [];
+ createDebug.skips = [];
+ var i;
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+
+ for (i = 0; i < createDebug.instances.length; i++) {
+ var instance = createDebug.instances[i];
+ instance.enabled = createDebug.enabled(instance.namespace);
+ }
+ }
+ /**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+
+ function disable() {
+ createDebug.enable('');
+ }
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ var i;
+ var len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+
+ return val;
+ }
+
+ createDebug.enable(createDebug.load());
+ return createDebug;
+}
+
+module.exports = setup;
+
diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js
new file mode 100644
index 0000000..0217315
--- /dev/null
+++ b/node_modules/debug/src/index.js
@@ -0,0 +1,12 @@
+"use strict";
+
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
+
diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js
new file mode 100644
index 0000000..1e6a5f1
--- /dev/null
+++ b/node_modules/debug/src/node.js
@@ -0,0 +1,177 @@
+"use strict";
+
+/**
+ * Module dependencies.
+ */
+var tty = require('tty');
+
+var util = require('util');
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ var supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
+ }
+} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // Camel-case
+ var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
+ return k.toUpperCase();
+ }); // Coerce string value into JS value
+
+ var val = process.env[key];
+
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
+}
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+
+function formatArgs(args) {
+ var name = this.namespace,
+ useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
+ var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+
+ return new Date().toISOString() + ' ';
+}
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+
+function log() {
+ return process.stderr.write(util.format.apply(util, arguments) + '\n');
+}
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+
+function load() {
+ return process.env.DEBUG;
+}
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+
+function init(debug) {
+ debug.inspectOpts = {};
+ var keys = Object.keys(exports.inspectOpts);
+
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+var formatters = module.exports.formatters;
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(function (str) { return str.trim(); })
+ .join(' ');
+};
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
diff --git a/node_modules/decamelize/index.js b/node_modules/decamelize/index.js
new file mode 100644
index 0000000..8d5bab7
--- /dev/null
+++ b/node_modules/decamelize/index.js
@@ -0,0 +1,13 @@
+'use strict';
+module.exports = function (str, sep) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ sep = typeof sep === 'undefined' ? '_' : sep;
+
+ return str
+ .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
+ .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2')
+ .toLowerCase();
+};
diff --git a/node_modules/decamelize/license b/node_modules/decamelize/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/decamelize/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/decamelize/package.json b/node_modules/decamelize/package.json
new file mode 100644
index 0000000..ca35790
--- /dev/null
+++ b/node_modules/decamelize/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "decamelize",
+ "version": "1.2.0",
+ "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow",
+ "license": "MIT",
+ "repository": "sindresorhus/decamelize",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "decamelize",
+ "decamelcase",
+ "camelcase",
+ "lowercase",
+ "case",
+ "dash",
+ "hyphen",
+ "string",
+ "str",
+ "text",
+ "convert"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/decamelize/readme.md b/node_modules/decamelize/readme.md
new file mode 100644
index 0000000..624c7ee
--- /dev/null
+++ b/node_modules/decamelize/readme.md
@@ -0,0 +1,48 @@
+# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize)
+
+> Convert a camelized string into a lowercased one with a custom separator<br>
+> Example: `unicornRainbow` → `unicorn_rainbow`
+
+
+## Install
+
+```
+$ npm install --save decamelize
+```
+
+
+## Usage
+
+```js
+const decamelize = require('decamelize');
+
+decamelize('unicornRainbow');
+//=> 'unicorn_rainbow'
+
+decamelize('unicornRainbow', '-');
+//=> 'unicorn-rainbow'
+```
+
+
+## API
+
+### decamelize(input, [separator])
+
+#### input
+
+Type: `string`
+
+#### separator
+
+Type: `string`<br>
+Default: `_`
+
+
+## Related
+
+See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/decompress-response/index.d.ts b/node_modules/decompress-response/index.d.ts
new file mode 100644
index 0000000..c0be175
--- /dev/null
+++ b/node_modules/decompress-response/index.d.ts
@@ -0,0 +1,22 @@
+/// <reference types="node"/>
+import {IncomingMessage} from 'http';
+
+/**
+Decompress a HTTP response if needed.
+
+@param response - The HTTP incoming stream with compressed data.
+@returns The decompressed HTTP response stream.
+
+@example
+```
+import {http} from 'http';
+import decompressResponse = require('decompress-response');
+
+http.get('https://sindresorhus.com', response => {
+ response = decompressResponse(response);
+});
+```
+*/
+declare function decompressResponse(response: IncomingMessage): IncomingMessage;
+
+export = decompressResponse;
diff --git a/node_modules/decompress-response/index.js b/node_modules/decompress-response/index.js
new file mode 100644
index 0000000..c861036
--- /dev/null
+++ b/node_modules/decompress-response/index.js
@@ -0,0 +1,58 @@
+'use strict';
+const {Transform, PassThrough} = require('stream');
+const zlib = require('zlib');
+const mimicResponse = require('mimic-response');
+
+module.exports = response => {
+ const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
+
+ if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) {
+ return response;
+ }
+
+ // TODO: Remove this when targeting Node.js 12.
+ const isBrotli = contentEncoding === 'br';
+ if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') {
+ response.destroy(new Error('Brotli is not supported on Node.js < 12'));
+ return response;
+ }
+
+ let isEmpty = true;
+
+ const checker = new Transform({
+ transform(data, _encoding, callback) {
+ isEmpty = false;
+
+ callback(null, data);
+ },
+
+ flush(callback) {
+ callback();
+ }
+ });
+
+ const finalStream = new PassThrough({
+ autoDestroy: false,
+ destroy(error, callback) {
+ response.destroy();
+
+ callback(error);
+ }
+ });
+
+ const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip();
+
+ decompressStream.once('error', error => {
+ if (isEmpty && !response.readable) {
+ finalStream.end();
+ return;
+ }
+
+ finalStream.destroy(error);
+ });
+
+ mimicResponse(response, finalStream);
+ response.pipe(checker).pipe(decompressStream).pipe(finalStream);
+
+ return finalStream;
+};
diff --git a/node_modules/decompress-response/license b/node_modules/decompress-response/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/decompress-response/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/decompress-response/node_modules/mimic-response/index.d.ts b/node_modules/decompress-response/node_modules/mimic-response/index.d.ts
new file mode 100644
index 0000000..65a51e9
--- /dev/null
+++ b/node_modules/decompress-response/node_modules/mimic-response/index.d.ts
@@ -0,0 +1,17 @@
+import {IncomingMessage} from 'http';
+
+/**
+Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
+
+Makes `toStream` include the properties from `fromStream`.
+
+@param fromStream - The stream to copy the properties from.
+@param toStream - The stream to copy the properties to.
+@return The same object as `toStream`.
+*/
+declare function mimicResponse<T extends NodeJS.ReadableStream>(
+ fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types
+ toStream: T,
+): T & IncomingMessage;
+
+export = mimicResponse;
diff --git a/node_modules/decompress-response/node_modules/mimic-response/index.js b/node_modules/decompress-response/node_modules/mimic-response/index.js
new file mode 100644
index 0000000..404e111
--- /dev/null
+++ b/node_modules/decompress-response/node_modules/mimic-response/index.js
@@ -0,0 +1,77 @@
+'use strict';
+
+// We define these manually to ensure they're always copied
+// even if they would move up the prototype chain
+// https://nodejs.org/api/http.html#http_class_http_incomingmessage
+const knownProperties = [
+ 'aborted',
+ 'complete',
+ 'headers',
+ 'httpVersion',
+ 'httpVersionMinor',
+ 'httpVersionMajor',
+ 'method',
+ 'rawHeaders',
+ 'rawTrailers',
+ 'setTimeout',
+ 'socket',
+ 'statusCode',
+ 'statusMessage',
+ 'trailers',
+ 'url'
+];
+
+module.exports = (fromStream, toStream) => {
+ if (toStream._readableState.autoDestroy) {
+ throw new Error('The second stream must have the `autoDestroy` option set to `false`');
+ }
+
+ const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties));
+
+ const properties = {};
+
+ for (const property of fromProperties) {
+ // Don't overwrite existing properties.
+ if (property in toStream) {
+ continue;
+ }
+
+ properties[property] = {
+ get() {
+ const value = fromStream[property];
+ const isFunction = typeof value === 'function';
+
+ return isFunction ? value.bind(fromStream) : value;
+ },
+ set(value) {
+ fromStream[property] = value;
+ },
+ enumerable: true,
+ configurable: false
+ };
+ }
+
+ Object.defineProperties(toStream, properties);
+
+ fromStream.once('aborted', () => {
+ toStream.destroy();
+
+ toStream.emit('aborted');
+ });
+
+ fromStream.once('close', () => {
+ if (fromStream.complete) {
+ if (toStream.readable) {
+ toStream.once('end', () => {
+ toStream.emit('close');
+ });
+ } else {
+ toStream.emit('close');
+ }
+ } else {
+ toStream.emit('close');
+ }
+ });
+
+ return toStream;
+};
diff --git a/node_modules/decompress-response/node_modules/mimic-response/license b/node_modules/decompress-response/node_modules/mimic-response/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/decompress-response/node_modules/mimic-response/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/decompress-response/node_modules/mimic-response/package.json b/node_modules/decompress-response/node_modules/mimic-response/package.json
new file mode 100644
index 0000000..d478b0f
--- /dev/null
+++ b/node_modules/decompress-response/node_modules/mimic-response/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "mimic-response",
+ "version": "3.1.0",
+ "description": "Mimic a Node.js HTTP response stream",
+ "license": "MIT",
+ "repository": "sindresorhus/mimic-response",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.d.ts",
+ "index.js"
+ ],
+ "keywords": [
+ "mimic",
+ "response",
+ "stream",
+ "http",
+ "https",
+ "request",
+ "get",
+ "core"
+ ],
+ "devDependencies": {
+ "@types/node": "^14.0.1",
+ "ava": "^2.4.0",
+ "create-test-server": "^2.4.0",
+ "p-event": "^4.1.0",
+ "pify": "^5.0.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.30.0"
+ }
+}
diff --git a/node_modules/decompress-response/node_modules/mimic-response/readme.md b/node_modules/decompress-response/node_modules/mimic-response/readme.md
new file mode 100644
index 0000000..e968620
--- /dev/null
+++ b/node_modules/decompress-response/node_modules/mimic-response/readme.md
@@ -0,0 +1,78 @@
+# mimic-response [![Build Status](https://travis-ci.com/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.com/sindresorhus/mimic-response)
+
+> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
+
+## Install
+
+```
+$ npm install mimic-response
+```
+
+## Usage
+
+```js
+const stream = require('stream');
+const mimicResponse = require('mimic-response');
+
+const responseStream = getHttpResponseStream();
+const myStream = new stream.PassThrough();
+
+mimicResponse(responseStream, myStream);
+
+console.log(myStream.statusCode);
+//=> 200
+```
+
+## API
+
+### mimicResponse(from, to)
+
+**Note #1:** The `from.destroy(error)` function is not proxied. You have to call it manually:
+
+```js
+const stream = require('stream');
+const mimicResponse = require('mimic-response');
+
+const responseStream = getHttpResponseStream();
+
+const myStream = new stream.PassThrough({
+ destroy(error, callback) {
+ responseStream.destroy();
+
+ callback(error);
+ }
+});
+
+myStream.destroy();
+```
+
+Please note that `myStream` and `responseStream` never throws. The error is passed to the request instead.
+
+#### from
+
+Type: `Stream`
+
+[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
+
+#### to
+
+Type: `Stream`
+
+Any stream.
+
+## Related
+
+- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one
+- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-mimic-response?utm_source=npm-mimic-response&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/decompress-response/package.json b/node_modules/decompress-response/package.json
new file mode 100644
index 0000000..57df889
--- /dev/null
+++ b/node_modules/decompress-response/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "decompress-response",
+ "version": "6.0.0",
+ "description": "Decompress a HTTP response if needed",
+ "license": "MIT",
+ "repository": "sindresorhus/decompress-response",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "decompress",
+ "response",
+ "http",
+ "https",
+ "zlib",
+ "gzip",
+ "zip",
+ "deflate",
+ "unzip",
+ "ungzip",
+ "incoming",
+ "message",
+ "stream",
+ "compressed",
+ "brotli"
+ ],
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "devDependencies": {
+ "@types/node": "^14.0.1",
+ "ava": "^2.2.0",
+ "get-stream": "^5.0.0",
+ "pify": "^5.0.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.30.0"
+ },
+ "xo": {
+ "rules": {
+ "@typescript-eslint/prefer-readonly-parameter-types": "off"
+ }
+ }
+}
diff --git a/node_modules/decompress-response/readme.md b/node_modules/decompress-response/readme.md
new file mode 100644
index 0000000..58523ef
--- /dev/null
+++ b/node_modules/decompress-response/readme.md
@@ -0,0 +1,48 @@
+# decompress-response [![Build Status](https://travis-ci.com/sindresorhus/decompress-response.svg?branch=master)](https://travis-ci.com/sindresorhus/decompress-response)
+
+> Decompress a HTTP response if needed
+
+Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through.
+
+Used by [`got`](https://github.com/sindresorhus/got).
+
+## Install
+
+```
+$ npm install decompress-response
+```
+
+## Usage
+
+```js
+const http = require('http');
+const decompressResponse = require('decompress-response');
+
+http.get('https://sindresorhus.com', response => {
+ response = decompressResponse(response);
+});
+```
+
+## API
+
+### decompressResponse(response)
+
+Returns the decompressed HTTP response stream.
+
+#### response
+
+Type: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
+
+The HTTP incoming stream with compressed data.
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-decompress-response?utm_source=npm-decompress-response&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/deep-extend/CHANGELOG.md b/node_modules/deep-extend/CHANGELOG.md
new file mode 100644
index 0000000..dd13ec1
--- /dev/null
+++ b/node_modules/deep-extend/CHANGELOG.md
@@ -0,0 +1,46 @@
+Changelog
+=========
+
+v0.6.0
+------
+
+- Updated "devDependencies" versions to fix vulnerability alerts
+- Dropped support of io.js and node.js v0.12.x and lower since new versions of
+ "devDependencies" couldn't work with those old node.js versions
+ (minimal supported version of node.js now is v4.0.0)
+
+v0.5.1
+------
+
+- Fix prototype pollution vulnerability (thanks to @mwakerman for the PR)
+- Avoid using deprecated Buffer API (thanks to @ChALkeR for the PR)
+
+v0.5.0
+------
+
+- Auto-testing provided by Travis CI;
+- Support older Node.JS versions (`v0.11.x` and `v0.10.x`);
+- Removed tests files from npm package.
+
+v0.4.2
+------
+
+- Fix for `null` as an argument.
+
+v0.4.1
+------
+
+- Removed test code from <b>npm</b> package
+ ([see pull request #21](https://github.com/unclechu/node-deep-extend/pull/21));
+- Increased minimal version of Node from `0.4.0` to `0.12.0`
+ (because can't run tests on lesser version anyway).
+
+v0.4.0
+------
+
+- **WARNING!** Broken backward compatibility with `v0.3.x`;
+- Fixed bug with extending arrays instead of cloning;
+- Deep cloning for arrays;
+- Check for own property;
+- Fixed some documentation issues;
+- Strict JS mode.
diff --git a/node_modules/deep-extend/LICENSE b/node_modules/deep-extend/LICENSE
new file mode 100644
index 0000000..5c58916
--- /dev/null
+++ b/node_modules/deep-extend/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2018, Viacheslav Lotsmanov
+
+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/deep-extend/README.md b/node_modules/deep-extend/README.md
new file mode 100644
index 0000000..67c7fc0
--- /dev/null
+++ b/node_modules/deep-extend/README.md
@@ -0,0 +1,91 @@
+Deep Extend
+===========
+
+Recursive object extending.
+
+[![Build Status](https://api.travis-ci.org/unclechu/node-deep-extend.svg?branch=master)](https://travis-ci.org/unclechu/node-deep-extend)
+
+[![NPM](https://nodei.co/npm/deep-extend.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/deep-extend/)
+
+Install
+-------
+
+```bash
+$ npm install deep-extend
+```
+
+Usage
+-----
+
+```javascript
+var deepExtend = require('deep-extend');
+var obj1 = {
+ a: 1,
+ b: 2,
+ d: {
+ a: 1,
+ b: [],
+ c: { test1: 123, test2: 321 }
+ },
+ f: 5,
+ g: 123,
+ i: 321,
+ j: [1, 2]
+};
+var obj2 = {
+ b: 3,
+ c: 5,
+ d: {
+ b: { first: 'one', second: 'two' },
+ c: { test2: 222 }
+ },
+ e: { one: 1, two: 2 },
+ f: [],
+ g: (void 0),
+ h: /abc/g,
+ i: null,
+ j: [3, 4]
+};
+
+deepExtend(obj1, obj2);
+
+console.log(obj1);
+/*
+{ a: 1,
+ b: 3,
+ d:
+ { a: 1,
+ b: { first: 'one', second: 'two' },
+ c: { test1: 123, test2: 222 } },
+ f: [],
+ g: undefined,
+ c: 5,
+ e: { one: 1, two: 2 },
+ h: /abc/g,
+ i: null,
+ j: [3, 4] }
+*/
+```
+
+Unit testing
+------------
+
+```bash
+$ npm test
+```
+
+Changelog
+---------
+
+[CHANGELOG.md](./CHANGELOG.md)
+
+Any issues?
+-----------
+
+Please, report about issues
+[here](https://github.com/unclechu/node-deep-extend/issues).
+
+License
+-------
+
+[MIT](./LICENSE)
diff --git a/node_modules/deep-extend/index.js b/node_modules/deep-extend/index.js
new file mode 100644
index 0000000..762d81e
--- /dev/null
+++ b/node_modules/deep-extend/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/deep-extend');
diff --git a/node_modules/deep-extend/lib/deep-extend.js b/node_modules/deep-extend/lib/deep-extend.js
new file mode 100644
index 0000000..651fd8d
--- /dev/null
+++ b/node_modules/deep-extend/lib/deep-extend.js
@@ -0,0 +1,150 @@
+/*!
+ * @description Recursive object extending
+ * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
+ * @license MIT
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2018 Viacheslav Lotsmanov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+'use strict';
+
+function isSpecificValue(val) {
+ return (
+ val instanceof Buffer
+ || val instanceof Date
+ || val instanceof RegExp
+ ) ? true : false;
+}
+
+function cloneSpecificValue(val) {
+ if (val instanceof Buffer) {
+ var x = Buffer.alloc
+ ? Buffer.alloc(val.length)
+ : new Buffer(val.length);
+ val.copy(x);
+ return x;
+ } else if (val instanceof Date) {
+ return new Date(val.getTime());
+ } else if (val instanceof RegExp) {
+ return new RegExp(val);
+ } else {
+ throw new Error('Unexpected situation');
+ }
+}
+
+/**
+ * Recursive cloning array.
+ */
+function deepCloneArray(arr) {
+ var clone = [];
+ arr.forEach(function (item, index) {
+ if (typeof item === 'object' && item !== null) {
+ if (Array.isArray(item)) {
+ clone[index] = deepCloneArray(item);
+ } else if (isSpecificValue(item)) {
+ clone[index] = cloneSpecificValue(item);
+ } else {
+ clone[index] = deepExtend({}, item);
+ }
+ } else {
+ clone[index] = item;
+ }
+ });
+ return clone;
+}
+
+function safeGetProperty(object, property) {
+ return property === '__proto__' ? undefined : object[property];
+}
+
+/**
+ * Extening object that entered in first argument.
+ *
+ * Returns extended object or false if have no target object or incorrect type.
+ *
+ * If you wish to clone source object (without modify it), just use empty new
+ * object as first argument, like this:
+ * deepExtend({}, yourObj_1, [yourObj_N]);
+ */
+var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
+ if (arguments.length < 1 || typeof arguments[0] !== 'object') {
+ return false;
+ }
+
+ if (arguments.length < 2) {
+ return arguments[0];
+ }
+
+ var target = arguments[0];
+
+ // convert arguments to array and cut off target object
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ var val, src, clone;
+
+ args.forEach(function (obj) {
+ // skip argument if isn't an object, is null, or is an array
+ if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
+ return;
+ }
+
+ Object.keys(obj).forEach(function (key) {
+ src = safeGetProperty(target, key); // source value
+ val = safeGetProperty(obj, key); // new value
+
+ // recursion prevention
+ if (val === target) {
+ return;
+
+ /**
+ * if new value isn't object then just overwrite by new value
+ * instead of extending.
+ */
+ } else if (typeof val !== 'object' || val === null) {
+ target[key] = val;
+ return;
+
+ // just clone arrays (and recursive clone objects inside)
+ } else if (Array.isArray(val)) {
+ target[key] = deepCloneArray(val);
+ return;
+
+ // custom cloning and overwrite for specific objects
+ } else if (isSpecificValue(val)) {
+ target[key] = cloneSpecificValue(val);
+ return;
+
+ // overwrite by new value if source isn't object or array
+ } else if (typeof src !== 'object' || src === null || Array.isArray(src)) {
+ target[key] = deepExtend({}, val);
+ return;
+
+ // source value and new value is objects both, extending...
+ } else {
+ target[key] = deepExtend(src, val);
+ return;
+ }
+ });
+ });
+
+ return target;
+};
diff --git a/node_modules/deep-extend/package.json b/node_modules/deep-extend/package.json
new file mode 100644
index 0000000..5f2195f
--- /dev/null
+++ b/node_modules/deep-extend/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "deep-extend",
+ "description": "Recursive object extending",
+ "license": "MIT",
+ "version": "0.6.0",
+ "homepage": "https://github.com/unclechu/node-deep-extend",
+ "keywords": [
+ "deep-extend",
+ "extend",
+ "deep",
+ "recursive",
+ "xtend",
+ "clone",
+ "merge",
+ "json"
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.githubusercontent.com/unclechu/node-deep-extend/master/LICENSE"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/unclechu/node-deep-extend.git"
+ },
+ "author": "Viacheslav Lotsmanov <lotsmanov89@gmail.com>",
+ "bugs": "https://github.com/unclechu/node-deep-extend/issues",
+ "contributors": [
+ {
+ "name": "Romain Prieto",
+ "url": "https://github.com/rprieto"
+ },
+ {
+ "name": "Max Maximov",
+ "url": "https://github.com/maxmaximov"
+ },
+ {
+ "name": "Marshall Bowers",
+ "url": "https://github.com/maxdeviant"
+ },
+ {
+ "name": "Misha Wakerman",
+ "url": "https://github.com/mwakerman"
+ }
+ ],
+ "main": "lib/deep-extend.js",
+ "engines": {
+ "node": ">=4.0.0"
+ },
+ "scripts": {
+ "test": "./node_modules/.bin/mocha"
+ },
+ "devDependencies": {
+ "mocha": "5.2.0",
+ "should": "13.2.1"
+ },
+ "files": [
+ "index.js",
+ "lib/"
+ ]
+}
diff --git a/node_modules/defer-to-connect/LICENSE b/node_modules/defer-to-connect/LICENSE
new file mode 100644
index 0000000..15ad2e8
--- /dev/null
+++ b/node_modules/defer-to-connect/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Szymon Marczak
+
+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/defer-to-connect/README.md b/node_modules/defer-to-connect/README.md
new file mode 100644
index 0000000..4dd36c2
--- /dev/null
+++ b/node_modules/defer-to-connect/README.md
@@ -0,0 +1,38 @@
+# defer-to-connect
+
+> The safe way to handle the `connect` socket event
+
+[![Coverage Status](https://coveralls.io/repos/github/szmarczak/defer-to-connect/badge.svg?branch=master)](https://coveralls.io/github/szmarczak/defer-to-connect?branch=master)
+
+Once you receive the socket, it may be already connected (or disconnected).<br>
+To avoid checking that, use `defer-to-connect`. It'll do that for you.
+
+## Usage
+
+```js
+const deferToConnect = require('defer-to-connect');
+
+deferToConnect(socket, () => {
+ console.log('Connected!');
+});
+```
+
+## API
+
+### deferToConnect(socket, connectListener)
+
+Calls `connectListener()` when connected.
+
+### deferToConnect(socket, listeners)
+
+#### listeners
+
+An object representing `connect`, `secureConnect` and `close` properties.
+
+Calls `connect()` when the socket is connected.<br>
+Calls `secureConnect()` when the socket is securely connected.<br>
+Calls `close()` when the socket is destroyed.
+
+## License
+
+MIT
diff --git a/node_modules/defer-to-connect/dist/source/index.d.ts b/node_modules/defer-to-connect/dist/source/index.d.ts
new file mode 100644
index 0000000..8db8dbb
--- /dev/null
+++ b/node_modules/defer-to-connect/dist/source/index.d.ts
@@ -0,0 +1,10 @@
+/// <reference types="node" />
+import { Socket } from 'net';
+import { TLSSocket } from 'tls';
+interface Listeners {
+ connect?: () => void;
+ secureConnect?: () => void;
+ close?: (hadError: boolean) => void;
+}
+declare const deferToConnect: (socket: TLSSocket | Socket, fn: Listeners | (() => void)) => void;
+export default deferToConnect;
diff --git a/node_modules/defer-to-connect/dist/source/index.js b/node_modules/defer-to-connect/dist/source/index.js
new file mode 100644
index 0000000..f26c4fa
--- /dev/null
+++ b/node_modules/defer-to-connect/dist/source/index.js
@@ -0,0 +1,47 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function isTLSSocket(socket) {
+ return socket.encrypted;
+}
+const deferToConnect = (socket, fn) => {
+ let listeners;
+ if (typeof fn === 'function') {
+ const connect = fn;
+ listeners = { connect };
+ }
+ else {
+ listeners = fn;
+ }
+ const hasConnectListener = typeof listeners.connect === 'function';
+ const hasSecureConnectListener = typeof listeners.secureConnect === 'function';
+ const hasCloseListener = typeof listeners.close === 'function';
+ const onConnect = () => {
+ if (hasConnectListener) {
+ listeners.connect();
+ }
+ if (isTLSSocket(socket) && hasSecureConnectListener) {
+ if (socket.authorized) {
+ listeners.secureConnect();
+ }
+ else if (!socket.authorizationError) {
+ socket.once('secureConnect', listeners.secureConnect);
+ }
+ }
+ if (hasCloseListener) {
+ socket.once('close', listeners.close);
+ }
+ };
+ if (socket.writable && !socket.connecting) {
+ onConnect();
+ }
+ else if (socket.connecting) {
+ socket.once('connect', onConnect);
+ }
+ else if (socket.destroyed && hasCloseListener) {
+ listeners.close(socket._hadError);
+ }
+};
+exports.default = deferToConnect;
+// For CommonJS default export support
+module.exports = deferToConnect;
+module.exports.default = deferToConnect;
diff --git a/node_modules/defer-to-connect/package.json b/node_modules/defer-to-connect/package.json
new file mode 100644
index 0000000..4dbd1c6
--- /dev/null
+++ b/node_modules/defer-to-connect/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "defer-to-connect",
+ "version": "2.0.1",
+ "description": "The safe way to handle the `connect` socket event",
+ "main": "dist/source",
+ "files": [
+ "dist/source"
+ ],
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "build": "del-cli dist && tsc",
+ "prepare": "npm run build",
+ "test": "xo && tsc --noEmit && nyc ava",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "keywords": [
+ "socket",
+ "connect",
+ "event"
+ ],
+ "author": "Szymon Marczak",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/szmarczak/defer-to-connect.git"
+ },
+ "bugs": {
+ "url": "https://github.com/szmarczak/defer-to-connect/issues"
+ },
+ "homepage": "https://github.com/szmarczak/defer-to-connect#readme",
+ "xo": {
+ "extends": "xo-typescript",
+ "extensions": [
+ "ts"
+ ]
+ },
+ "devDependencies": {
+ "@ava/typescript": "^1.1.0",
+ "@sindresorhus/tsconfig": "^0.7.0",
+ "@types/node": "^13.5.0",
+ "@typescript-eslint/eslint-plugin": "^2.18.0",
+ "@typescript-eslint/parser": "^2.18.0",
+ "ava": "^3.2.0",
+ "coveralls": "^3.0.9",
+ "create-cert": "^1.0.6",
+ "del-cli": "^3.0.0",
+ "eslint-config-xo-typescript": "^0.24.1",
+ "nyc": "^15.0.0",
+ "p-event": "^4.1.0",
+ "typescript": "^3.7.5",
+ "xo": "^0.25.3"
+ },
+ "nyc": {
+ "include": [
+ "dist/source"
+ ],
+ "extension": [
+ ".ts"
+ ]
+ },
+ "ava": {
+ "typescript": {
+ "rewritePaths": {
+ "tests/": "dist/tests/"
+ }
+ }
+ },
+ "types": "dist/source/index.d.ts"
+}
diff --git a/node_modules/define-properties/.editorconfig b/node_modules/define-properties/.editorconfig
new file mode 100644
index 0000000..eaa2141
--- /dev/null
+++ b/node_modules/define-properties/.editorconfig
@@ -0,0 +1,13 @@
+root = true
+
+[*]
+indent_style = tab;
+insert_final_newline = true;
+quote_type = auto;
+space_after_anonymous_functions = true;
+space_after_control_statements = true;
+spaces_around_operators = true;
+trim_trailing_whitespace = true;
+spaces_in_brackets = false;
+end_of_line = lf;
+
diff --git a/node_modules/define-properties/.eslintrc b/node_modules/define-properties/.eslintrc
new file mode 100644
index 0000000..4297a97
--- /dev/null
+++ b/node_modules/define-properties/.eslintrc
@@ -0,0 +1,19 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "id-length": [2, { "min": 1, "max": 35 }],
+ "max-params": [2, 4],
+ },
+
+ "overrides": [
+ {
+ "files": "test/**",
+ "rules": {
+ "max-lines-per-function": 0,
+ },
+ },
+ ],
+}
diff --git a/node_modules/define-properties/.github/FUNDING.yml b/node_modules/define-properties/.github/FUNDING.yml
new file mode 100644
index 0000000..c70f264
--- /dev/null
+++ b/node_modules/define-properties/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/define-properties
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/node_modules/define-properties/.nycrc b/node_modules/define-properties/.nycrc
new file mode 100644
index 0000000..bdd626c
--- /dev/null
+++ b/node_modules/define-properties/.nycrc
@@ -0,0 +1,9 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/node_modules/define-properties/CHANGELOG.md b/node_modules/define-properties/CHANGELOG.md
new file mode 100644
index 0000000..9c86b5b
--- /dev/null
+++ b/node_modules/define-properties/CHANGELOG.md
@@ -0,0 +1,63 @@
+1.1.4 / 2022-04-14
+=================
+ * [Refactor] use `has-property-descriptors`
+ * [readme] add github actions/codecov badges
+ * [Docs] fix header parsing; remove testling
+ * [Deps] update `object-keys`
+ * [meta] use `prepublishOnly` script for npm 7+
+ * [meta] add `funding` field; create FUNDING.yml
+ * [actions] add "Allow Edits" workflow; automatic rebasing / merge commit blocking
+ * [actions] reuse common workflows
+ * [actions] update codecov uploader
+ * [actions] use `node/install` instead of `node/run`; use `codecov` action
+ * [Tests] migrate tests to Github Actions
+ * [Tests] run `nyc` on all tests; use `tape` runner
+ * [Tests] use shared travis-ci config
+ * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops
+ * [Tests] remove `jscs`
+ * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape`; add `aud`, `safe-publish-latest`
+
+1.1.3 / 2018-08-14
+=================
+ * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes
+ * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty`
+ * [Deps] update `object-keys`
+ * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep
+ * [Tests] use pretest/posttest for linting/security
+ * [Tests] fix npm upgrades on older nodes
+
+1.1.2 / 2015-10-14
+=================
+ * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
+ * [Deps] Update `object-keys`
+ * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp`
+ * [Tests] up to `io.js` `v3.3`, `node` `v4.2`
+
+1.1.1 / 2015-07-21
+=================
+ * [Deps] Update `object-keys`
+ * [Dev Deps] Update `tape`, `eslint`
+ * [Tests] Test on `io.js` `v2.4`
+
+1.1.0 / 2015-07-01
+=================
+ * [New] Add support for symbol-valued properties.
+ * [Dev Deps] Update `nsp`, `eslint`
+ * [Tests] Test up to `io.js` `v2.3`
+
+1.0.3 / 2015-05-30
+=================
+ * Using a more reliable check for supported property descriptors.
+
+1.0.2 / 2015-05-23
+=================
+ * Test up to `io.js` `v2.0`
+ * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert`
+
+1.0.1 / 2015-01-06
+=================
+ * Update `object-keys` to fix ES3 support
+
+1.0.0 / 2015-01-04
+=================
+ * v1.0.0
diff --git a/node_modules/define-properties/LICENSE b/node_modules/define-properties/LICENSE
new file mode 100644
index 0000000..8c271c1
--- /dev/null
+++ b/node_modules/define-properties/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (C) 2015 Jordan Harband
+
+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. \ No newline at end of file
diff --git a/node_modules/define-properties/README.md b/node_modules/define-properties/README.md
new file mode 100644
index 0000000..650adfa
--- /dev/null
+++ b/node_modules/define-properties/README.md
@@ -0,0 +1,84 @@
+# define-properties <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][package-url]
+
+Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.
+Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides.
+
+## Example
+
+```js
+var define = require('define-properties');
+var assert = require('assert');
+
+var obj = define({ a: 1, b: 2 }, {
+ a: 10,
+ b: 20,
+ c: 30
+});
+assert(obj.a === 1);
+assert(obj.b === 2);
+assert(obj.c === 30);
+if (define.supportsDescriptors) {
+ assert.deepEqual(Object.keys(obj), ['a', 'b']);
+ assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), {
+ configurable: true,
+ enumerable: false,
+ value: 30,
+ writable: false
+ });
+}
+```
+
+Then, with predicates:
+```js
+var define = require('define-properties');
+var assert = require('assert');
+
+var obj = define({ a: 1, b: 2, c: 3 }, {
+ a: 10,
+ b: 20,
+ c: 30
+}, {
+ a: function () { return false; },
+ b: function () { return true; }
+});
+assert(obj.a === 1);
+assert(obj.b === 20);
+assert(obj.c === 3);
+if (define.supportsDescriptors) {
+ assert.deepEqual(Object.keys(obj), ['a', 'c']);
+ assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), {
+ configurable: true,
+ enumerable: false,
+ value: 20,
+ writable: false
+ });
+}
+```
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+[package-url]: https://npmjs.org/package/define-properties
+[npm-version-svg]: https://versionbadg.es/ljharb/define-properties.svg
+[deps-svg]: https://david-dm.org/ljharb/define-properties.svg
+[deps-url]: https://david-dm.org/ljharb/define-properties
+[dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg
+[dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/define-properties.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/define-properties.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=define-properties
+[codecov-image]: https://codecov.io/gh/ljharb/define-properties/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/ljharb/define-properties/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-properties
+[actions-url]: https://github.com/ljharb/define-properties/actions
diff --git a/node_modules/define-properties/index.js b/node_modules/define-properties/index.js
new file mode 100644
index 0000000..453afb9
--- /dev/null
+++ b/node_modules/define-properties/index.js
@@ -0,0 +1,47 @@
+'use strict';
+
+var keys = require('object-keys');
+var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
+
+var toStr = Object.prototype.toString;
+var concat = Array.prototype.concat;
+var origDefineProperty = Object.defineProperty;
+
+var isFunction = function (fn) {
+ return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
+};
+
+var hasPropertyDescriptors = require('has-property-descriptors')();
+
+var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
+
+var defineProperty = function (object, name, value, predicate) {
+ if (name in object && (!isFunction(predicate) || !predicate())) {
+ return;
+ }
+ if (supportsDescriptors) {
+ origDefineProperty(object, name, {
+ configurable: true,
+ enumerable: false,
+ value: value,
+ writable: true
+ });
+ } else {
+ object[name] = value; // eslint-disable-line no-param-reassign
+ }
+};
+
+var defineProperties = function (object, map) {
+ var predicates = arguments.length > 2 ? arguments[2] : {};
+ var props = keys(map);
+ if (hasSymbols) {
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
+ }
+ for (var i = 0; i < props.length; i += 1) {
+ defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
+ }
+};
+
+defineProperties.supportsDescriptors = !!supportsDescriptors;
+
+module.exports = defineProperties;
diff --git a/node_modules/define-properties/node_modules/object-keys/.editorconfig b/node_modules/define-properties/node_modules/object-keys/.editorconfig
new file mode 100644
index 0000000..eaa2141
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/.editorconfig
@@ -0,0 +1,13 @@
+root = true
+
+[*]
+indent_style = tab;
+insert_final_newline = true;
+quote_type = auto;
+space_after_anonymous_functions = true;
+space_after_control_statements = true;
+spaces_around_operators = true;
+trim_trailing_whitespace = true;
+spaces_in_brackets = false;
+end_of_line = lf;
+
diff --git a/node_modules/define-properties/node_modules/object-keys/.eslintrc b/node_modules/define-properties/node_modules/object-keys/.eslintrc
new file mode 100644
index 0000000..9a8d5b0
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/.eslintrc
@@ -0,0 +1,17 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "complexity": [2, 23],
+ "id-length": [2, { "min": 1, "max": 40 }],
+ "max-params": [2, 3],
+ "max-statements": [2, 23],
+ "max-statements-per-line": [2, { "max": 2 }],
+ "no-extra-parens": [1],
+ "no-invalid-this": [1],
+ "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"],
+ "operator-linebreak": [2, "after"]
+ }
+}
diff --git a/node_modules/define-properties/node_modules/object-keys/.travis.yml b/node_modules/define-properties/node_modules/object-keys/.travis.yml
new file mode 100644
index 0000000..94a6ce4
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/.travis.yml
@@ -0,0 +1,277 @@
+language: node_js
+os:
+ - linux
+node_js:
+ - "11.8"
+ - "10.15"
+ - "9.11"
+ - "8.15"
+ - "7.10"
+ - "6.16"
+ - "5.12"
+ - "4.9"
+ - "iojs-v3.3"
+ - "iojs-v2.5"
+ - "iojs-v1.8"
+ - "0.12"
+ - "0.10"
+ - "0.8"
+before_install:
+ - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
+ - 'nvm install-latest-npm'
+install:
+ - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
+script:
+ - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
+ - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
+ - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
+ - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
+sudo: false
+env:
+ - TEST=true
+matrix:
+ fast_finish: true
+ include:
+ - node_js: "lts/*"
+ env: PRETEST=true
+ - node_js: "lts/*"
+ env: POSTTEST=true
+ - node_js: "4"
+ env: COVERAGE=true
+ - node_js: "11.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "11.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "11.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "11.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "11.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "11.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "11.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "11.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.14"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.13"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.12"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.14"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.13"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.12"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.15"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.14"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.13"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.12"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.4"
+ env: TEST=true ALLOW_FAILURE=true
+ allow_failures:
+ - os: osx
+ - env: TEST=true ALLOW_FAILURE=true
+ - env: COVERAGE=true
+ - env: POSTTEST=true
diff --git a/node_modules/define-properties/node_modules/object-keys/CHANGELOG.md b/node_modules/define-properties/node_modules/object-keys/CHANGELOG.md
new file mode 100644
index 0000000..b7d92df
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/CHANGELOG.md
@@ -0,0 +1,232 @@
+1.1.1 / 2019-04-06
+=================
+ * [Fix] exclude deprecated Firefox keys (#53)
+
+1.1.0 / 2019-02-10
+=================
+ * [New] [Refactor] move full implementation to `implementation` entry point
+ * [Refactor] only evaluate the implementation if `Object.keys` is not present
+ * [Tests] up to `node` `v11.8`, `v10.15`, `v8.15`, `v6.16`
+ * [Tests] remove jscs
+ * [Tests] switch to `npm audit` from `nsp`
+
+1.0.12 / 2018-06-18
+=================
+ * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46)
+
+1.0.11 / 2016-07-05
+=================
+ * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32)
+
+1.0.10 / 2016-07-04
+=================
+ * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31)
+ * [Fix] In IE 6, `window.external` makes `Object.keys` throw
+ * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4`
+ * [Tests] use pretest/posttest for linting/security
+ * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`
+ * [Dev Deps] remove unused eccheck script + dep
+
+1.0.9 / 2015-10-19
+=================
+ * [Fix] Blacklist 'frame' property on window (#16, #17)
+ * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`
+
+1.0.8 / 2015-10-14
+=================
+ * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327)
+ * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322)
+ * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
+ * [Tests] up to `io.js` `v3.3`, `node` `v4.2`
+ * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs`
+
+1.0.7 / 2015-07-18
+=================
+ * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8.
+ * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15)
+ * [Tests] Improve test output for automation equality bugfix
+ * [Tests] Test on `io.js` `v2.4`
+
+1.0.6 / 2015-07-09
+=================
+ * [Fix] Use an object lookup rather than ES5's `indexOf` (#14)
+ * [Tests] ES3 browsers don't have `Array.isArray`
+ * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs.
+
+1.0.5 / 2015-07-03
+=================
+ * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws
+ * [Tests] Test up to `io.js` `v2.3`
+ * [Dev Deps] Update `nsp`, `eslint`
+
+1.0.4 / 2015-05-23
+=================
+ * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments`
+ * Test on latest `node` and `io.js`
+ * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert`
+
+1.0.3 / 2015-01-06
+=================
+ * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance
+
+1.0.2 / 2014-12-28
+=================
+ * Update lots of dev dependencies
+ * Tweaks to README
+ * Make `object-keys` more robust against later environment tampering
+
+1.0.1 / 2014-09-03
+=================
+ * Update URLs and badges in README
+
+1.0.0 / 2014-08-26
+=================
+ * v1.0.0
+
+0.6.1 / 2014-08-25
+=================
+ * v0.6.1
+ * Updating dependencies (tape, covert, is)
+ * Update badges in readme
+ * Use separate var statements
+
+0.6.0 / 2014-04-23
+=================
+ * v0.6.0
+ * Updating dependencies (tape, covert)
+ * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers
+ * Improve test matrix: test all node versions, but only latest two stables are a failure
+ * Remove internal foreach shim.
+
+0.5.1 / 2014-03-09
+=================
+ * 0.5.1
+ * Updating dependencies (tape, covert, is)
+ * Removing forEach from the module (but keeping it in tests)
+
+0.5.0 / 2014-01-30
+=================
+ * 0.5.0
+ * Explicitly returning the shim, instead of returning native Object.keys when present
+ * Adding a changelog.
+ * Cleaning up IIFE wrapping
+ * Testing on node 0.4 through 0.11
+
+0.4.0 / 2013-08-14
+==================
+
+ * v0.4.0
+ * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function'
+ * If it's a string, make sure to use charAt instead of brackets.
+ * Only use Function#call if necessary.
+ * Making sure the context tests actually run.
+ * Better function detection
+ * Adding the android browser
+ * Fixing testling files
+ * Updating tape
+ * Removing the "is" dependency.
+ * Making an isArguments shim.
+ * Adding a local forEach shim and tests.
+ * Updating paths.
+ * Moving the shim test.
+ * v0.3.0
+
+0.3.0 / 2013-05-18
+==================
+
+ * README tweak.
+ * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5).
+ * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5)
+ * Updating readme.
+ * Updating dependencies.
+ * Giving credit to lodash.
+ * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3).
+ * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2).
+ * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3).
+ * Adding node 0.10 to travis.
+ * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3)
+ * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2)
+ * Moving "indexof" and "is" to be dev dependencies.
+ * Making sure the shim works with functions.
+ * Flattening the tests.
+
+0.2.0 / 2013-05-10
+==================
+
+ * v0.2.0
+ * Object.keys should work with arrays.
+
+0.1.8 / 2013-05-10
+==================
+
+ * v0.1.8
+ * Upgrading dependencies.
+ * Using a simpler check.
+ * Fixing a bug in hasDontEnumBug browsers.
+ * Using the newest tape!
+ * Fixing this error test.
+ * "undefined" is probably a reserved word in ES3.
+ * Better test message.
+
+0.1.7 / 2013-04-17
+==================
+
+ * Upgrading "is" once more.
+ * The key "null" is breaking some browsers.
+
+0.1.6 / 2013-04-17
+==================
+
+ * v0.1.6
+ * Upgrading "is"
+
+0.1.5 / 2013-04-14
+==================
+
+ * Bumping version.
+ * Adding more testling browsers.
+ * Updating "is"
+
+0.1.4 / 2013-04-08
+==================
+
+ * Using "is" instead of "is-extended".
+
+0.1.3 / 2013-04-07
+==================
+
+ * Using "foreach" instead of my own shim.
+ * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug.
+
+0.1.2 / 2013-04-03
+==================
+
+ * Adding dependency status; moving links to an index at the bottom.
+ * Upgrading is-extended; version 0.1.2
+ * Adding an npm version badge.
+
+0.1.1 / 2013-04-01
+==================
+
+ * Adding Travis CI.
+ * Bumping the version.
+ * Adding indexOf since IE sucks.
+ * Adding a forEach shim since older browsers don't have Array#forEach.
+ * Upgrading tape - 0.3.2 uses Array#map
+ * Using explicit end instead of plan.
+ * Can't test with Array.isArray in older browsers.
+ * Using is-extended.
+ * Fixing testling files.
+ * JSHint/JSLint-ing.
+ * Removing an unused object.
+ * Using strict mode.
+
+0.1.0 / 2013-03-30
+==================
+
+ * Changing the exports should have meant a higher version bump.
+ * Oops, fixing the repo URL.
+ * Adding more tests.
+ * 0.0.2
+ * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1)
+ * Move shim export to a separate file.
diff --git a/node_modules/define-properties/node_modules/object-keys/LICENSE b/node_modules/define-properties/node_modules/object-keys/LICENSE
new file mode 100644
index 0000000..28553fd
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (C) 2013 Jordan Harband
+
+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. \ No newline at end of file
diff --git a/node_modules/define-properties/node_modules/object-keys/README.md b/node_modules/define-properties/node_modules/object-keys/README.md
new file mode 100644
index 0000000..ed4c277
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/README.md
@@ -0,0 +1,76 @@
+#object-keys <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
+
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][package-url]
+
+[![browser support][testling-svg]][testling-url]
+
+An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable.
+
+Most common usage:
+```js
+var keys = Object.keys || require('object-keys');
+```
+
+## Example
+
+```js
+var keys = require('object-keys');
+var assert = require('assert');
+var obj = {
+ a: true,
+ b: true,
+ c: true
+};
+
+assert.deepEqual(keys(obj), ['a', 'b', 'c']);
+```
+
+```js
+var keys = require('object-keys');
+var assert = require('assert');
+/* when Object.keys is not present */
+delete Object.keys;
+var shimmedKeys = keys.shim();
+assert.equal(shimmedKeys, keys);
+assert.deepEqual(Object.keys(obj), keys(obj));
+```
+
+```js
+var keys = require('object-keys');
+var assert = require('assert');
+/* when Object.keys is present */
+var shimmedKeys = keys.shim();
+assert.equal(shimmedKeys, Object.keys);
+assert.deepEqual(Object.keys(obj), keys(obj));
+```
+
+## Source
+Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url].
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+[package-url]: https://npmjs.org/package/object-keys
+[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg
+[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg
+[travis-url]: https://travis-ci.org/ljharb/object-keys
+[deps-svg]: https://david-dm.org/ljharb/object-keys.svg
+[deps-url]: https://david-dm.org/ljharb/object-keys
+[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg
+[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies
+[testling-svg]: https://ci.testling.com/ljharb/object-keys.png
+[testling-url]: https://ci.testling.com/ljharb/object-keys
+[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589
+[lodash-url]: https://github.com/lodash/lodash
+[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true
+[license-image]: http://img.shields.io/npm/l/object-keys.svg
+[license-url]: LICENSE
+[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg
+[downloads-url]: http://npm-stat.com/charts.html?package=object-keys
+
diff --git a/node_modules/define-properties/node_modules/object-keys/implementation.js b/node_modules/define-properties/node_modules/object-keys/implementation.js
new file mode 100644
index 0000000..5b32986
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/implementation.js
@@ -0,0 +1,122 @@
+'use strict';
+
+var keysShim;
+if (!Object.keys) {
+ // modified from https://github.com/es-shims/es5-shim
+ var has = Object.prototype.hasOwnProperty;
+ var toStr = Object.prototype.toString;
+ var isArgs = require('./isArguments'); // eslint-disable-line global-require
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
+ var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
+ var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
+ var dontEnums = [
+ 'toString',
+ 'toLocaleString',
+ 'valueOf',
+ 'hasOwnProperty',
+ 'isPrototypeOf',
+ 'propertyIsEnumerable',
+ 'constructor'
+ ];
+ var equalsConstructorPrototype = function (o) {
+ var ctor = o.constructor;
+ return ctor && ctor.prototype === o;
+ };
+ var excludedKeys = {
+ $applicationCache: true,
+ $console: true,
+ $external: true,
+ $frame: true,
+ $frameElement: true,
+ $frames: true,
+ $innerHeight: true,
+ $innerWidth: true,
+ $onmozfullscreenchange: true,
+ $onmozfullscreenerror: true,
+ $outerHeight: true,
+ $outerWidth: true,
+ $pageXOffset: true,
+ $pageYOffset: true,
+ $parent: true,
+ $scrollLeft: true,
+ $scrollTop: true,
+ $scrollX: true,
+ $scrollY: true,
+ $self: true,
+ $webkitIndexedDB: true,
+ $webkitStorageInfo: true,
+ $window: true
+ };
+ var hasAutomationEqualityBug = (function () {
+ /* global window */
+ if (typeof window === 'undefined') { return false; }
+ for (var k in window) {
+ try {
+ if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
+ try {
+ equalsConstructorPrototype(window[k]);
+ } catch (e) {
+ return true;
+ }
+ }
+ } catch (e) {
+ return true;
+ }
+ }
+ return false;
+ }());
+ var equalsConstructorPrototypeIfNotBuggy = function (o) {
+ /* global window */
+ if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
+ return equalsConstructorPrototype(o);
+ }
+ try {
+ return equalsConstructorPrototype(o);
+ } catch (e) {
+ return false;
+ }
+ };
+
+ keysShim = function keys(object) {
+ var isObject = object !== null && typeof object === 'object';
+ var isFunction = toStr.call(object) === '[object Function]';
+ var isArguments = isArgs(object);
+ var isString = isObject && toStr.call(object) === '[object String]';
+ var theKeys = [];
+
+ if (!isObject && !isFunction && !isArguments) {
+ throw new TypeError('Object.keys called on a non-object');
+ }
+
+ var skipProto = hasProtoEnumBug && isFunction;
+ if (isString && object.length > 0 && !has.call(object, 0)) {
+ for (var i = 0; i < object.length; ++i) {
+ theKeys.push(String(i));
+ }
+ }
+
+ if (isArguments && object.length > 0) {
+ for (var j = 0; j < object.length; ++j) {
+ theKeys.push(String(j));
+ }
+ } else {
+ for (var name in object) {
+ if (!(skipProto && name === 'prototype') && has.call(object, name)) {
+ theKeys.push(String(name));
+ }
+ }
+ }
+
+ if (hasDontEnumBug) {
+ var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
+
+ for (var k = 0; k < dontEnums.length; ++k) {
+ if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
+ theKeys.push(dontEnums[k]);
+ }
+ }
+ }
+ return theKeys;
+ };
+}
+module.exports = keysShim;
diff --git a/node_modules/define-properties/node_modules/object-keys/index.js b/node_modules/define-properties/node_modules/object-keys/index.js
new file mode 100644
index 0000000..a43807d
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/index.js
@@ -0,0 +1,32 @@
+'use strict';
+
+var slice = Array.prototype.slice;
+var isArgs = require('./isArguments');
+
+var origKeys = Object.keys;
+var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');
+
+var originalKeys = Object.keys;
+
+keysShim.shim = function shimObjectKeys() {
+ if (Object.keys) {
+ var keysWorksWithArguments = (function () {
+ // Safari 5.0 bug
+ var args = Object.keys(arguments);
+ return args && args.length === arguments.length;
+ }(1, 2));
+ if (!keysWorksWithArguments) {
+ Object.keys = function keys(object) { // eslint-disable-line func-name-matching
+ if (isArgs(object)) {
+ return originalKeys(slice.call(object));
+ }
+ return originalKeys(object);
+ };
+ }
+ } else {
+ Object.keys = keysShim;
+ }
+ return Object.keys || keysShim;
+};
+
+module.exports = keysShim;
diff --git a/node_modules/define-properties/node_modules/object-keys/isArguments.js b/node_modules/define-properties/node_modules/object-keys/isArguments.js
new file mode 100644
index 0000000..f2a2a90
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/isArguments.js
@@ -0,0 +1,17 @@
+'use strict';
+
+var toStr = Object.prototype.toString;
+
+module.exports = function isArguments(value) {
+ var str = toStr.call(value);
+ var isArgs = str === '[object Arguments]';
+ if (!isArgs) {
+ isArgs = str !== '[object Array]' &&
+ value !== null &&
+ typeof value === 'object' &&
+ typeof value.length === 'number' &&
+ value.length >= 0 &&
+ toStr.call(value.callee) === '[object Function]';
+ }
+ return isArgs;
+};
diff --git a/node_modules/define-properties/node_modules/object-keys/package.json b/node_modules/define-properties/node_modules/object-keys/package.json
new file mode 100644
index 0000000..99ea923
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "object-keys",
+ "version": "1.1.1",
+ "author": {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ },
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ },
+ {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net"
+ },
+ {
+ "name": "Ivan Starkov",
+ "email": "istarkov@gmail.com"
+ },
+ {
+ "name": "Gary Katsevman",
+ "email": "git@gkatsev.com"
+ }
+ ],
+ "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim",
+ "license": "MIT",
+ "main": "index.js",
+ "scripts": {
+ "pretest": "npm run --silent lint",
+ "test": "npm run --silent tests-only",
+ "posttest": "npm run --silent audit",
+ "tests-only": "node test/index.js",
+ "coverage": "covert test/*.js",
+ "coverage-quiet": "covert test/*.js --quiet",
+ "lint": "eslint .",
+ "preaudit": "npm install --package-lock --package-lock-only",
+ "audit": "npm audit",
+ "postaudit": "rm package-lock.json"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ljharb/object-keys.git"
+ },
+ "keywords": [
+ "Object.keys",
+ "keys",
+ "ES5",
+ "shim"
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "@ljharb/eslint-config": "^13.1.1",
+ "covert": "^1.1.1",
+ "eslint": "^5.13.0",
+ "foreach": "^2.0.5",
+ "indexof": "^0.0.1",
+ "is": "^3.3.0",
+ "tape": "^4.9.2"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "iexplore/6.0..latest",
+ "firefox/3.0..6.0",
+ "firefox/15.0..latest",
+ "firefox/nightly",
+ "chrome/4.0..10.0",
+ "chrome/20.0..latest",
+ "chrome/canary",
+ "opera/10.0..latest",
+ "opera/next",
+ "safari/4.0..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2"
+ ]
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+}
diff --git a/node_modules/define-properties/node_modules/object-keys/test/index.js b/node_modules/define-properties/node_modules/object-keys/test/index.js
new file mode 100644
index 0000000..5402465
--- /dev/null
+++ b/node_modules/define-properties/node_modules/object-keys/test/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+require('./isArguments');
+
+require('./shim');
diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json
new file mode 100644
index 0000000..bb34ff3
--- /dev/null
+++ b/node_modules/define-properties/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "define-properties",
+ "version": "1.1.4",
+ "author": "Jordan Harband <ljharb@gmail.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.",
+ "license": "MIT",
+ "main": "index.js",
+ "scripts": {
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "prepublishOnly": "safe-publish-latest",
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "posttest": "aud --production",
+ "tests-only": "nyc tape 'test/**/*.js'",
+ "lint": "eslint --ext=js,mjs ."
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ljharb/define-properties.git"
+ },
+ "keywords": [
+ "Object.defineProperty",
+ "Object.defineProperties",
+ "object",
+ "property descriptor",
+ "descriptor",
+ "define",
+ "ES5"
+ ],
+ "dependencies": {
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^21.0.0",
+ "aud": "^2.0.0",
+ "eslint": "=8.8.0",
+ "nyc": "^10.3.2",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.5.3"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "iexplore/6.0..latest",
+ "firefox/3.0..6.0",
+ "firefox/15.0..latest",
+ "firefox/nightly",
+ "chrome/4.0..10.0",
+ "chrome/20.0..latest",
+ "chrome/canary",
+ "opera/10.0..latest",
+ "opera/next",
+ "safari/4.0..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2"
+ ]
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+}
diff --git a/node_modules/delayed-stream/.npmignore b/node_modules/delayed-stream/.npmignore
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/node_modules/delayed-stream/.npmignore
@@ -0,0 +1 @@
+test
diff --git a/node_modules/delayed-stream/License b/node_modules/delayed-stream/License
new file mode 100644
index 0000000..4804b7a
--- /dev/null
+++ b/node_modules/delayed-stream/License
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Debuggable Limited <felix@debuggable.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/delayed-stream/Makefile b/node_modules/delayed-stream/Makefile
new file mode 100644
index 0000000..b4ff85a
--- /dev/null
+++ b/node_modules/delayed-stream/Makefile
@@ -0,0 +1,7 @@
+SHELL := /bin/bash
+
+test:
+ @./test/run.js
+
+.PHONY: test
+
diff --git a/node_modules/delayed-stream/Readme.md b/node_modules/delayed-stream/Readme.md
new file mode 100644
index 0000000..aca36f9
--- /dev/null
+++ b/node_modules/delayed-stream/Readme.md
@@ -0,0 +1,141 @@
+# delayed-stream
+
+Buffers events from a stream until you are ready to handle them.
+
+## Installation
+
+``` bash
+npm install delayed-stream
+```
+
+## Usage
+
+The following example shows how to write a http echo server that delays its
+response by 1000 ms.
+
+``` javascript
+var DelayedStream = require('delayed-stream');
+var http = require('http');
+
+http.createServer(function(req, res) {
+ var delayed = DelayedStream.create(req);
+
+ setTimeout(function() {
+ res.writeHead(200);
+ delayed.pipe(res);
+ }, 1000);
+});
+```
+
+If you are not using `Stream#pipe`, you can also manually release the buffered
+events by calling `delayedStream.resume()`:
+
+``` javascript
+var delayed = DelayedStream.create(req);
+
+setTimeout(function() {
+ // Emit all buffered events and resume underlaying source
+ delayed.resume();
+}, 1000);
+```
+
+## Implementation
+
+In order to use this meta stream properly, here are a few things you should
+know about the implementation.
+
+### Event Buffering / Proxying
+
+All events of the `source` stream are hijacked by overwriting the `source.emit`
+method. Until node implements a catch-all event listener, this is the only way.
+
+However, delayed-stream still continues to emit all events it captures on the
+`source`, regardless of whether you have released the delayed stream yet or
+not.
+
+Upon creation, delayed-stream captures all `source` events and stores them in
+an internal event buffer. Once `delayedStream.release()` is called, all
+buffered events are emitted on the `delayedStream`, and the event buffer is
+cleared. After that, delayed-stream merely acts as a proxy for the underlaying
+source.
+
+### Error handling
+
+Error events on `source` are buffered / proxied just like any other events.
+However, `delayedStream.create` attaches a no-op `'error'` listener to the
+`source`. This way you only have to handle errors on the `delayedStream`
+object, rather than in two places.
+
+### Buffer limits
+
+delayed-stream provides a `maxDataSize` property that can be used to limit
+the amount of data being buffered. In order to protect you from bad `source`
+streams that don't react to `source.pause()`, this feature is enabled by
+default.
+
+## API
+
+### DelayedStream.create(source, [options])
+
+Returns a new `delayedStream`. Available options are:
+
+* `pauseStream`
+* `maxDataSize`
+
+The description for those properties can be found below.
+
+### delayedStream.source
+
+The `source` stream managed by this object. This is useful if you are
+passing your `delayedStream` around, and you still want to access properties
+on the `source` object.
+
+### delayedStream.pauseStream = true
+
+Whether to pause the underlaying `source` when calling
+`DelayedStream.create()`. Modifying this property afterwards has no effect.
+
+### delayedStream.maxDataSize = 1024 * 1024
+
+The amount of data to buffer before emitting an `error`.
+
+If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
+refers to bytes.
+
+If the underlaying source is emitting JavaScript strings, the size refers to
+characters.
+
+If you know what you are doing, you can set this property to `Infinity` to
+disable this feature. You can also modify this property during runtime.
+
+### delayedStream.dataSize = 0
+
+The amount of data buffered so far.
+
+### delayedStream.readable
+
+An ECMA5 getter that returns the value of `source.readable`.
+
+### delayedStream.resume()
+
+If the `delayedStream` has not been released so far, `delayedStream.release()`
+is called.
+
+In either case, `source.resume()` is called.
+
+### delayedStream.pause()
+
+Calls `source.pause()`.
+
+### delayedStream.pipe(dest)
+
+Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.
+
+### delayedStream.release()
+
+Emits and clears all events that have been buffered up so far. This does not
+resume the underlaying source, use `delayedStream.resume()` instead.
+
+## License
+
+delayed-stream is licensed under the MIT license.
diff --git a/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/delayed-stream/lib/delayed_stream.js
new file mode 100644
index 0000000..b38fc85
--- /dev/null
+++ b/node_modules/delayed-stream/lib/delayed_stream.js
@@ -0,0 +1,107 @@
+var Stream = require('stream').Stream;
+var util = require('util');
+
+module.exports = DelayedStream;
+function DelayedStream() {
+ this.source = null;
+ this.dataSize = 0;
+ this.maxDataSize = 1024 * 1024;
+ this.pauseStream = true;
+
+ this._maxDataSizeExceeded = false;
+ this._released = false;
+ this._bufferedEvents = [];
+}
+util.inherits(DelayedStream, Stream);
+
+DelayedStream.create = function(source, options) {
+ var delayedStream = new this();
+
+ options = options || {};
+ for (var option in options) {
+ delayedStream[option] = options[option];
+ }
+
+ delayedStream.source = source;
+
+ var realEmit = source.emit;
+ source.emit = function() {
+ delayedStream._handleEmit(arguments);
+ return realEmit.apply(source, arguments);
+ };
+
+ source.on('error', function() {});
+ if (delayedStream.pauseStream) {
+ source.pause();
+ }
+
+ return delayedStream;
+};
+
+Object.defineProperty(DelayedStream.prototype, 'readable', {
+ configurable: true,
+ enumerable: true,
+ get: function() {
+ return this.source.readable;
+ }
+});
+
+DelayedStream.prototype.setEncoding = function() {
+ return this.source.setEncoding.apply(this.source, arguments);
+};
+
+DelayedStream.prototype.resume = function() {
+ if (!this._released) {
+ this.release();
+ }
+
+ this.source.resume();
+};
+
+DelayedStream.prototype.pause = function() {
+ this.source.pause();
+};
+
+DelayedStream.prototype.release = function() {
+ this._released = true;
+
+ this._bufferedEvents.forEach(function(args) {
+ this.emit.apply(this, args);
+ }.bind(this));
+ this._bufferedEvents = [];
+};
+
+DelayedStream.prototype.pipe = function() {
+ var r = Stream.prototype.pipe.apply(this, arguments);
+ this.resume();
+ return r;
+};
+
+DelayedStream.prototype._handleEmit = function(args) {
+ if (this._released) {
+ this.emit.apply(this, args);
+ return;
+ }
+
+ if (args[0] === 'data') {
+ this.dataSize += args[1].length;
+ this._checkIfMaxDataSizeExceeded();
+ }
+
+ this._bufferedEvents.push(args);
+};
+
+DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
+ if (this._maxDataSizeExceeded) {
+ return;
+ }
+
+ if (this.dataSize <= this.maxDataSize) {
+ return;
+ }
+
+ this._maxDataSizeExceeded = true;
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
+ this.emit('error', new Error(message));
+};
diff --git a/node_modules/delayed-stream/package.json b/node_modules/delayed-stream/package.json
new file mode 100644
index 0000000..eea3291
--- /dev/null
+++ b/node_modules/delayed-stream/package.json
@@ -0,0 +1,27 @@
+{
+ "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
+ "contributors": [
+ "Mike Atkins <apeherder@gmail.com>"
+ ],
+ "name": "delayed-stream",
+ "description": "Buffers events from a stream until you are ready to handle them.",
+ "license": "MIT",
+ "version": "1.0.0",
+ "homepage": "https://github.com/felixge/node-delayed-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/felixge/node-delayed-stream.git"
+ },
+ "main": "./lib/delayed_stream",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "fake": "0.2.0",
+ "far": "0.0.1"
+ }
+}
diff --git a/node_modules/detect-node/LICENSE b/node_modules/detect-node/LICENSE
new file mode 100644
index 0000000..3113356
--- /dev/null
+++ b/node_modules/detect-node/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Ilya Kantor
+
+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/detect-node/Readme.md b/node_modules/detect-node/Readme.md
new file mode 100644
index 0000000..73c57b9
--- /dev/null
+++ b/node_modules/detect-node/Readme.md
@@ -0,0 +1,30 @@
+### Install
+
+```shell
+npm install --save detect-node
+```
+
+### Usage:
+
+```js
+var isNode = require('detect-node');
+
+if (isNode) {
+ console.log("Running under Node.JS");
+} else {
+ alert("Hello from browser (or whatever not-a-node env)");
+}
+```
+
+The check is performed as:
+```js
+module.exports = false;
+
+// Only Node.JS has a process variable that is of [[Class]] process
+try {
+ module.exports = Object.prototype.toString.call(global.process) === '[object process]'
+} catch(e) {}
+
+```
+
+Thanks to Ingvar Stepanyan for the initial idea. This check is both **the most reliable I could find** and it does not use `process` env directly, which would cause browserify to include it into the build.
diff --git a/node_modules/detect-node/browser.js b/node_modules/detect-node/browser.js
new file mode 100644
index 0000000..4172696
--- /dev/null
+++ b/node_modules/detect-node/browser.js
@@ -0,0 +1,2 @@
+module.exports = false;
+
diff --git a/node_modules/detect-node/index.esm.js b/node_modules/detect-node/index.esm.js
new file mode 100644
index 0000000..b4b379f
--- /dev/null
+++ b/node_modules/detect-node/index.esm.js
@@ -0,0 +1,2 @@
+// Only Node.JS has a process variable that is of [[Class]] process
+export default Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
diff --git a/node_modules/detect-node/index.js b/node_modules/detect-node/index.js
new file mode 100644
index 0000000..229949e
--- /dev/null
+++ b/node_modules/detect-node/index.js
@@ -0,0 +1,2 @@
+// Only Node.JS has a process variable that is of [[Class]] process
+module.exports = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
diff --git a/node_modules/detect-node/package.json b/node_modules/detect-node/package.json
new file mode 100644
index 0000000..3cbabbe
--- /dev/null
+++ b/node_modules/detect-node/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "detect-node",
+ "version": "2.1.0",
+ "description": "Detect Node.JS (as opposite to browser environment) (reliable)",
+ "main": "index.js",
+ "module": "index.esm.js",
+ "browser": "browser.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/iliakan/detect-node"
+ },
+ "keywords": [
+ "detect",
+ "node"
+ ],
+ "author": "Ilya Kantor",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/iliakan/detect-node/issues"
+ },
+ "homepage": "https://github.com/iliakan/detect-node"
+}
diff --git a/node_modules/dir-compare/LICENSE b/node_modules/dir-compare/LICENSE
new file mode 100644
index 0000000..50df0a3
--- /dev/null
+++ b/node_modules/dir-compare/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2014 Liviu Grigorescu (grigoresculiviu@gmail.com)
+
+This project is free software released under the MIT license:
+http://www.opensource.org/licenses/mit-license.php
+
+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. \ No newline at end of file
diff --git a/node_modules/dir-compare/README.md b/node_modules/dir-compare/README.md
new file mode 100644
index 0000000..ec0b265
--- /dev/null
+++ b/node_modules/dir-compare/README.md
@@ -0,0 +1,374 @@
+dir-compare
+==========
+Node JS directory compare
+
+[![Build Status](https://api.travis-ci.org/gliviu/dir-compare.svg?branch=master)](https://travis-ci.org/gliviu/dir-compare)
+[![Build status](https://ci.appveyor.com/api/projects/status/fpnqkr2gfg7pwkxk/branch/master?svg=true)](https://ci.appveyor.com/project/gliviu/dir-compare)
+[![codecov.io](http://codecov.io/github/gliviu/dir-compare/coverage.svg?branch=master)](http://codecov.io/github/gliviu/dir-compare?branch=master)
+
+- [Installation](#installation)
+- [Library](#library)
+ * [Use](#use)
+ * [Api](#api)
+ * [Glob patterns](#glob-patterns)
+ * [Custom file content comparators](#custom-file-content-comparators)
+ + [Ignore line endings and white spaces](#ignore-line-endings-and-white-spaces)
+ * [Custom name comparators](#custom-name-comparators)
+ * [Custom result builder](#custom-result-builder)
+ * [Symbolic links](#symbolic-links)
+- [Command line](#command-line)
+- [Changelog](#changelog)
+
+# Installation
+```shell
+$ npm install dir-compare
+```
+or
+```shell
+$ npm install -g dir-compare
+```
+for command line utility.
+
+# Library
+
+## Use
+```javascript
+const dircompare = require('dir-compare');
+
+const options = { compareSize: true };
+// Multiple compare strategy can be used simultaneously - compareSize, compareContent, compareDate, compareSymlink.
+// If one comparison fails for a pair of files, they are considered distinct.
+const path1 = '...';
+const path2 = '...';
+
+// Synchronous
+const res = dircompare.compareSync(path1, path2, options)
+print(res)
+
+// Asynchronous
+dircompare.compare(path1, path2, options)
+ .then(res => print(res))
+ .catch(error => console.error(error));
+
+
+function print(result) {
+ console.log('Directories are %s', result.same ? 'identical' : 'different')
+
+ console.log('Statistics - equal entries: %s, distinct entries: %s, left only entries: %s, right only entries: %s, differences: %s',
+ result.equal, result.distinct, result.left, result.right, result.differences)
+
+ result.diffSet.forEach(dif => console.log('Difference - name1: %s, type1: %s, name2: %s, type2: %s, state: %s',
+ dif.name1, dif.type1, dif.name2, dif.type2, dif.state))
+}
+```
+
+Typescript
+```typescript
+import { compare, compareSync, Options, Result } from "dir-compare";
+const path1 = '...';
+const path2 = '...';
+const options: Options = { compareSize: true };
+
+const res: Result = compareSync(path1, path2, options);
+console.log(res)
+
+compare(path1, path2, options)
+ .then(res => console.log(res))
+ .catch(error => console.error(error));
+```
+
+## Api
+
+
+Below is a quick recap of the api. For more details check the [reference documentation](https://gliviu.github.io/dc-api/).
+```typescript
+compare(path1: string, path2: string, options?: Options): Promise<Result>
+compareSync(path1: string, path2: string, options?: Options): Result
+```
+
+```Options```
+* **compareSize**: true/false - Compares files by size. Defaults to 'false'.
+* **compareContent**: true/false - Compares files by content. Defaults to 'false'.
+* **compareFileSync**, **compareFileAsync**: Callbacks for file comparison. See [Custom file content comparators](#custom-file-content-comparators).
+* **compareDate**: true/false - Compares files by date of modification (stat.mtime). Defaults to 'false'.
+* **compareNameHandler**: Callback for name comparison. See [Custom name comparators](#custom-name-comparators).
+* **dateTolerance**: milliseconds - Two files are considered to have the same date if the difference between their modification dates fits within date tolerance. Defaults to 1000 ms.
+* **compareSymlink**: true/false - Compares entries by symlink. Defaults to 'false'.
+* **skipSymlinks**: true/false - Ignore symbolic links. Defaults to 'false'.
+* **skipSubdirs**: true/false - Skips sub directories. Defaults to 'false'.
+* **ignoreCase**: true/false - Ignores case when comparing names. Defaults to 'false'.
+* **noDiffSet**: true/false - Toggles presence of diffSet in output. If true, only statistics are provided. Use this when comparing large number of files to avoid out of memory situations. Defaults to 'false'.
+* **includeFilter**: File name filter. Comma separated [minimatch](https://www.npmjs.com/package/minimatch) patterns. See [Glob patterns](#glob-patterns) below.
+* **excludeFilter**: File/directory name exclude filter. Comma separated [minimatch](https://www.npmjs.com/package/minimatch) patterns. See [Glob patterns](#glob-patterns) below.
+* **resultBuilder**: Callback for constructing result. Called for each compared entry pair. Updates `statistics` and `diffSet`. More details in [Custom result builder](#custom-result-builder).
+
+```Result```
+* **same**: true if directories are identical
+* **distinct**: number of distinct entries
+* **equal**: number of equal entries
+* **left**: number of entries only in path1
+* **right**: number of entries only in path2
+* **differences**: total number of differences (distinct+left+right)
+* **total**: total number of entries (differences+equal)
+* **distinctFiles**: number of distinct files
+* **equalFiles**: number of equal files
+* **leftFiles**: number of files only in path1
+* **rightFiles**: number of files only in path2
+* **differencesFiles**: total number of different files (distinctFiles+leftFiles+rightFiles)
+* **totalFiles**: total number of files (differencesFiles+equalFiles)
+* **distinctDirs**: number of distinct directories
+* **equalDirs**: number of equal directories
+* **leftDirs**: number of directories only in path1
+* **rightDirs**: number of directories only in path2
+* **differencesDirs**: total number of different directories (distinctDirs+leftDirs+rightDirs)
+* **totalDirs**: total number of directories (differencesDirs+equalDirs)
+* **brokenLinks**:
+ * **leftBrokenLinks**: number of broken links only in path1
+ * **rightBrokenLinks**: number of broken links only in path2
+ * **distinctBrokenLinks**: number of broken links with same name appearing in both path1 and path2
+ * **totalBrokenLinks**: total number of broken links (leftBrokenLinks+rightBrokenLinks+distinctBrokenLinks)
+* **symlinks**: Statistics available if `compareSymlink` options is used
+ * **distinctSymlinks**: number of distinct links
+ * **equalSymlinks**: number of equal links
+ * **leftSymlinks**: number of links only in path1
+ * **rightSymlinks**: number of links only in path2
+ * **differencesSymlinks**: total number of different links (distinctSymlinks+leftSymlinks+rightSymlinks)
+ * **totalSymlinks**: total number of links (differencesSymlinks+equalSymlinks)
+* **diffSet** - List of changes (present if `options.noDiffSet` is false)
+ * **path1**: path not including file/directory name; can be relative or absolute depending on call to compare(),
+ * **path2**: path not including file/directory name; can be relative or absolute depending on call to compare(),
+ * **relativePath**: path relative to root,
+ * **name1**: file/directory name
+ * **name2**: file/directory name
+ * **state**: one of equal, left, right, distinct,
+ * **type1**: one of missing, file, directory, broken-link
+ * **type2**: one of missing, file, directory, broken-link
+ * **size1**: file size
+ * **size2**: file size
+ * **date1**: modification date (stat.mtime)
+ * **date2**: modification date (stat.mtime)
+ * **level**: depth
+ * **reason**: Provides reason when two identically named entries are distinct.
+ Not available if entries are equal.
+ One of "different-size", "different-date", "different-content", "broken-link", "different-symlink".
+
+## Glob patterns
+[Minimatch](https://www.npmjs.com/package/minimatch) patterns are used to include/exclude files to be compared.
+
+The pattern is matched against the relative path of the entry being compared.
+
+Following examples assume we are comparing two [dir-compare](https://github.com/gliviu/dir-compare) code bases.
+
+
+```
+dircompare -x ".git,node_modules" dir1 dir2') exclude git and node modules directories
+dircompare -x "expected" dir1 dir2') exclude '/tests/expected' directory
+dircompare -x "/tests/expected" dir1 dir2') exclude '/tests/expected' directory
+dircompare -x "**/expected" dir1 dir2') exclude '/tests/expected' directory
+dircompare -x "**/tests/**/*.js" dir1 dir2') exclude all js files in '/tests' directory and subdirectories
+dircompare -f "*.js,*.yml" dir1 dir2') include js and yaml files
+dircompare -f "/tests/**/*.js" dir1 dir2') include all js files in '/tests' directory and subdirectories
+dircompare -f "**/tests/**/*.ts" dir1 dir2') include all js files in '/tests' directory and subdirectories
+```
+
+## Custom file content comparators
+By default file content is binary compared. As of version 1.5.0 custom file comparison handlers may be specified.
+
+Custom handlers are specified by `compareFileSync` and `compareFileAsync` options which correspond to `dircompare.compareSync()` or `dircompare.compare()` methods.
+
+A couple of handlers are included in the library:
+* binary sync compare - `dircompare.fileCompareHandlers.defaultFileCompare.compareSync`
+* binary async compare - `dircompare.fileCompareHandlers.defaultFileCompare.compareAsync`
+* text sync compare - `dircompare.fileCompareHandlers.lineBasedFileCompare.compareSync`
+* text async compare - `dircompare.fileCompareHandlers.lineBasedFileCompare.compareAsync`
+
+Use [defaultFileCompare.js](https://github.com/gliviu/dir-compare/blob/master/src/fileCompareHandler/defaultFileCompare.js) as an example to create your own.
+
+### Ignore line endings and white spaces
+Line based comparator can be used to ignore line ending and white space differences. This comparator is not available in [CLI](#command-line) mode.
+```javascript
+var dircompare = require('dir-compare');
+
+var options = {
+ compareContent: true,
+ compareFileSync: dircompare.fileCompareHandlers.lineBasedFileCompare.compareSync,
+ compareFileAsync: dircompare.fileCompareHandlers.lineBasedFileCompare.compareAsync,
+ ignoreLineEnding: true,
+ ignoreWhiteSpaces: true
+};
+
+var path1 = '...';
+var path2 = '...';
+var res = dircompare.compareSync(path1, path2, options);
+console.log(res)
+
+dircompare.compare(path1, path2, options)
+.then(res => console.log(res))
+```
+## Custom name comparators
+If [default](https://github.com/gliviu/dir-compare/blob/master/src/nameCompare/defaultNameCompare.js) name comparison is not enough, custom behavior can be specified with [compareNameHandler](https://gliviu.github.io/dc-api/index.html#comparenamehandler) option.
+Following example adds the possibility to ignore file extensions.
+```typescript
+import { Options, compare } from 'dir-compare'
+import path from 'path'
+
+var options: Options = {
+ compareSize: false, // compare only name by disabling size and content criteria
+ compareContent: false,
+ compareNameHandler: customNameCompare, // new name comparator used to ignore extensions
+ ignoreExtension: true, // supported by the custom name compare below
+};
+
+function customNameCompare(name1: string, name2: string, options: Options) {
+ if (options.ignoreCase) {
+ name1 = name1.toLowerCase()
+ name2 = name2.toLowerCase()
+ }
+ if (options.ignoreExtension) {
+ name1 = path.basename(name1, path.extname(name1))
+ name2 = path.basename(name2, path.extname(name2))
+ }
+ return ((name1 === name2) ? 0 : ((name1 > name2) ? 1 : -1))
+}
+
+var path1 = '/tmp/a';
+var path2 = '/tmp/b';
+
+var res = compare(path1, path2, options).then(res => {
+ console.log(`Same: ${res.same}`)
+ if (!res.diffSet) {
+ return
+ }
+ res.diffSet.forEach(dif => console.log(`${dif.name1} ${dif.name2} ${dif.state}`))
+})
+
+// Outputs
+// icon.svg icon.png equal
+// logo.svg logo.jpg equal
+```
+
+## Custom result builder
+[Result builder](https://gliviu.github.io/dc-api/index.html#resultbuilder) is called for each pair of entries encountered during comparison. Its purpose is to append entries in `diffSet` and eventually update `statistics` object with new stats.
+
+If needed it can be replaced with custom implementation.
+
+```javascript
+var dircompare = require("dircompare")
+
+var customResultBuilder = function (entry1, entry2, state, level, relativePath, options, statistics, diffSet, reason) {
+ ...
+}
+
+var options = {
+ compareSize: true,
+ resultBuilder: customResultBuilder
+}
+var res = dircompare.compareSync('...', '...', options)
+
+```
+
+The [default](https://github.com/gliviu/dir-compare/blob/master/src/resultBuilder/defaultResultBuilderCallback.js) builder can be used as an example.
+
+## Symbolic links
+Unless `compareSymlink` option is used, symbolic links are resolved and any comparison is applied to the file/directory they point to.
+
+Circular loops are handled by breaking the loop as soon as it is detected.
+
+Version `1.x` treats broken links as `ENOENT: no such file or directory`.
+Since `2.0` they are treated as a special type of entry - `broken-link` - and are available as stats (`totalBrokenLinks`, `distinctBrokenLinks`, ...).
+
+Using `compareSymlink` option causes `dircompare` to check symlink values for equality.
+In this mode two entries with identical name are considered different if
+* one is symlink, the other is not
+* both are symlinks but point to different locations
+
+These rules are applied in addition to the other comparison modes; ie. by content, by size...
+
+If entries are different because of symlinks, `reason` will be `different-symlink`. Also statistics summarizes differences caused by symbolik links.
+
+# Command line
+```
+ Usage: dircompare [options] leftdir rightdir
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -c, --compare-content compare files by content
+ -D, --compare-date compare files by date
+ --date-tolerance [type] tolerance to be used in date comparison (milliseconds)
+ --compare-symlink compare files and directories by symlink
+ -f, --filter [type] file name filter
+ -x, --exclude [type] file/directory name exclude filter
+ -S, --skip-subdirs do not recurse into subdirectories
+ -L, --skip-symlinks ignore symlinks
+ -i, --ignore-case ignores case when comparing file names
+ -l, --show-left report - show entries occurring in left dir
+ -r, --show-right report - show entries occurring in right dir
+ -e, --show-equal report - show identic entries occurring in both dirs
+ -d, --show-distinct report - show distinct entries occurring in both dirs
+ -a, --show-all report - show all entries
+ -w, --whole-report report - include directories in detailed report
+ --reason report - show reason when entries are distinct
+ --csv report - print details as csv
+ --nocolors don't use console colors
+ --async Make use of multiple cores
+
+ By default files are compared by size.
+ --date-tolerance defaults to 1000 ms. Two files are considered to have
+ the same date if the difference between their modification dates fits
+ within date tolerance.
+
+ Exit codes:
+ 0 - entries are identical
+ 1 - entries are different
+ 2 - error occurred
+
+ Examples:
+ compare by content dircompare -c dir1 dir2
+ show only different files dircompare -d dir1 dir2
+
+ exclude filter dircompare -x ".git,node_modules" dir1 dir2
+ dircompare -x "/tests/expected" dir1 dir2
+ dircompare -x "**/expected" dir1 dir2
+ dircompare -x "**/tests/**/*.ts" dir1 dir2
+
+ include filter dircompare -f "*.js,*.yml" dir1 dir2
+ dircompare -f "/tests/**/*.js" dir1 dir2
+ dircompare -f "**/tests/**/*.ts" dir1 dir2
+```
+
+# Changelog
+* v2.4.0 New option to customize file/folder name comparison
+* v2.3.0 Fixes
+* v2.1.0 Removed [bluebird](https://github.com/petkaantonov/bluebird/#note) dependency
+* v2.0.0
+ * New option to compare symlinks.
+ * New field indicating reason for two entries being distinct.
+ * Improved command line output format.
+ * Tests are no longer part of published package.
+ * Generated [Api](#api) documentation.
+
+ Breaking changes:
+ * Broken links are no longer treated as errors. As a result there are new statistics (leftBrokenLinks, rightBrokenLinks, distinctBrokenLinks, totalBrokenLinks) and new entry type - broken-link.
+ Details in [Symbolic links](#symbolic-links).
+ * Typescript correction: new interface `Result` replaced `Statistics`.
+* v1.8.0
+ * globstar patterns
+ * typescript corrections
+ * removed support for node 0.11, 0.12, iojs
+* v1.7.0 performance improvements
+* v1.6.0 typescript support
+* v1.5.0 added option to ignore line endings and white space differences
+* v1.3.0 added date tolerance option
+* v1.2.0 added compare by date option
+* v1.1.0
+ * detect symlink loops
+ * improved color scheme for command line utility
+* v1.0.0
+ * asynchronous processing
+ * new library options: noDiffSet, resultBuilder
+ * new statistics: distinctFiles, equalFiles, leftFiles, rightFiles, distinctDirs, equalDirs, leftDirs, rightDirs
+ * new --async command line option
+ * Fix for https://github.com/tj/commander.js/issues/125
+* v0.0.3 Fix fille ordering issue for newer node versions
diff --git a/node_modules/dir-compare/node_modules/commander/History.md b/node_modules/dir-compare/node_modules/commander/History.md
new file mode 100644
index 0000000..1b47439
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/commander/History.md
@@ -0,0 +1,261 @@
+
+2.9.0 / 2015-10-13
+==================
+
+ * Add option `isDefault` to set default subcommand #415 @Qix-
+ * Add callback to allow filtering or post-processing of help text #434 @djulien
+ * Fix `undefined` text in help information close #414 #416 @zhiyelee
+
+2.8.1 / 2015-04-22
+==================
+
+ * Back out `support multiline description` Close #396 #397
+
+2.8.0 / 2015-04-07
+==================
+
+ * Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee
+ * Fix bug in Git-style sub-commands #372 @zhiyelee
+ * Allow commands to be hidden from help #383 @tonylukasavage
+ * When git-style sub-commands are in use, yet none are called, display help #382 @claylo
+ * Add ability to specify arguments syntax for top-level command #258 @rrthomas
+ * Support multiline descriptions #208 @zxqfox
+
+2.7.1 / 2015-03-11
+==================
+
+ * Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367.
+
+2.7.0 / 2015-03-09
+==================
+
+ * Fix git-style bug when installed globally. Close #335 #349 @zhiyelee
+ * Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage
+ * Add support for camelCase on `opts()`. Close #353 @nkzawa
+ * Add node.js 0.12 and io.js to travis.yml
+ * Allow RegEx options. #337 @palanik
+ * Fixes exit code when sub-command failing. Close #260 #332 @pirelenito
+ * git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee
+
+2.6.0 / 2014-12-30
+==================
+
+ * added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee
+ * Add application description to the help msg. Close #112 @dalssoft
+
+2.5.1 / 2014-12-15
+==================
+
+ * fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee
+
+2.5.0 / 2014-10-24
+==================
+
+ * add support for variadic arguments. Closes #277 @whitlockjc
+
+2.4.0 / 2014-10-17
+==================
+
+ * fixed a bug on executing the coercion function of subcommands option. Closes #270
+ * added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage
+ * added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage
+ * fixed a bug on subcommand name. Closes #248 @jonathandelgado
+ * fixed function normalize doesn’t honor option terminator. Closes #216 @abbr
+
+2.3.0 / 2014-07-16
+==================
+
+ * add command alias'. Closes PR #210
+ * fix: Typos. Closes #99
+ * fix: Unused fs module. Closes #217
+
+2.2.0 / 2014-03-29
+==================
+
+ * add passing of previous option value
+ * fix: support subcommands on windows. Closes #142
+ * Now the defaultValue passed as the second argument of the coercion function.
+
+2.1.0 / 2013-11-21
+==================
+
+ * add: allow cflag style option params, unit test, fixes #174
+
+2.0.0 / 2013-07-18
+==================
+
+ * remove input methods (.prompt, .confirm, etc)
+
+1.3.2 / 2013-07-18
+==================
+
+ * add support for sub-commands to co-exist with the original command
+
+1.3.1 / 2013-07-18
+==================
+
+ * add quick .runningCommand hack so you can opt-out of other logic when running a sub command
+
+1.3.0 / 2013-07-09
+==================
+
+ * add EACCES error handling
+ * fix sub-command --help
+
+1.2.0 / 2013-06-13
+==================
+
+ * allow "-" hyphen as an option argument
+ * support for RegExp coercion
+
+1.1.1 / 2012-11-20
+==================
+
+ * add more sub-command padding
+ * fix .usage() when args are present. Closes #106
+
+1.1.0 / 2012-11-16
+==================
+
+ * add git-style executable subcommand support. Closes #94
+
+1.0.5 / 2012-10-09
+==================
+
+ * fix `--name` clobbering. Closes #92
+ * fix examples/help. Closes #89
+
+1.0.4 / 2012-09-03
+==================
+
+ * add `outputHelp()` method.
+
+1.0.3 / 2012-08-30
+==================
+
+ * remove invalid .version() defaulting
+
+1.0.2 / 2012-08-24
+==================
+
+ * add `--foo=bar` support [arv]
+ * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus]
+
+1.0.1 / 2012-08-03
+==================
+
+ * fix issue #56
+ * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode())
+
+1.0.0 / 2012-07-05
+==================
+
+ * add support for optional option descriptions
+ * add defaulting of `.version()` to package.json's version
+
+0.6.1 / 2012-06-01
+==================
+
+ * Added: append (yes or no) on confirmation
+ * Added: allow node.js v0.7.x
+
+0.6.0 / 2012-04-10
+==================
+
+ * Added `.prompt(obj, callback)` support. Closes #49
+ * Added default support to .choose(). Closes #41
+ * Fixed the choice example
+
+0.5.1 / 2011-12-20
+==================
+
+ * Fixed `password()` for recent nodes. Closes #36
+
+0.5.0 / 2011-12-04
+==================
+
+ * Added sub-command option support [itay]
+
+0.4.3 / 2011-12-04
+==================
+
+ * Fixed custom help ordering. Closes #32
+
+0.4.2 / 2011-11-24
+==================
+
+ * Added travis support
+ * Fixed: line-buffered input automatically trimmed. Closes #31
+
+0.4.1 / 2011-11-18
+==================
+
+ * Removed listening for "close" on --help
+
+0.4.0 / 2011-11-15
+==================
+
+ * Added support for `--`. Closes #24
+
+0.3.3 / 2011-11-14
+==================
+
+ * Fixed: wait for close event when writing help info [Jerry Hamlet]
+
+0.3.2 / 2011-11-01
+==================
+
+ * Fixed long flag definitions with values [felixge]
+
+0.3.1 / 2011-10-31
+==================
+
+ * Changed `--version` short flag to `-V` from `-v`
+ * Changed `.version()` so it's configurable [felixge]
+
+0.3.0 / 2011-10-31
+==================
+
+ * Added support for long flags only. Closes #18
+
+0.2.1 / 2011-10-24
+==================
+
+ * "node": ">= 0.4.x < 0.7.0". Closes #20
+
+0.2.0 / 2011-09-26
+==================
+
+ * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs]
+
+0.1.0 / 2011-08-24
+==================
+
+ * Added support for custom `--help` output
+
+0.0.5 / 2011-08-18
+==================
+
+ * Changed: when the user enters nothing prompt for password again
+ * Fixed issue with passwords beginning with numbers [NuckChorris]
+
+0.0.4 / 2011-08-15
+==================
+
+ * Fixed `Commander#args`
+
+0.0.3 / 2011-08-15
+==================
+
+ * Added default option value support
+
+0.0.2 / 2011-08-15
+==================
+
+ * Added mask support to `Command#password(str[, mask], fn)`
+ * Added `Command#password(str, fn)`
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/dir-compare/node_modules/commander/LICENSE b/node_modules/dir-compare/node_modules/commander/LICENSE
new file mode 100644
index 0000000..10f997a
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/commander/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/dir-compare/node_modules/commander/Readme.md b/node_modules/dir-compare/node_modules/commander/Readme.md
new file mode 100644
index 0000000..08b9e4c
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/commander/Readme.md
@@ -0,0 +1,351 @@
+# Commander.js
+
+
+[![Build Status](https://api.travis-ci.org/tj/commander.js.svg)](http://travis-ci.org/tj/commander.js)
+[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
+[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
+[![Join the chat at https://gitter.im/tj/commander.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+ The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/tj/commander).
+ [API documentation](http://tj.github.com/commander.js/)
+
+
+## Installation
+
+ $ npm install commander
+
+## Option parsing
+
+ Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-p, --peppers', 'Add peppers')
+ .option('-P, --pineapple', 'Add pineapple')
+ .option('-b, --bbq-sauce', 'Add bbq sauce')
+ .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')
+ .parse(process.argv);
+
+console.log('you ordered a pizza with:');
+if (program.peppers) console.log(' - peppers');
+if (program.pineapple) console.log(' - pineapple');
+if (program.bbqSauce) console.log(' - bbq');
+console.log(' - %s cheese', program.cheese);
+```
+
+ Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.
+
+
+## Coercion
+
+```js
+function range(val) {
+ return val.split('..').map(Number);
+}
+
+function list(val) {
+ return val.split(',');
+}
+
+function collect(val, memo) {
+ memo.push(val);
+ return memo;
+}
+
+function increaseVerbosity(v, total) {
+ return total + 1;
+}
+
+program
+ .version('0.0.1')
+ .usage('[options] <file ...>')
+ .option('-i, --integer <n>', 'An integer argument', parseInt)
+ .option('-f, --float <n>', 'A float argument', parseFloat)
+ .option('-r, --range <a>..<b>', 'A range', range)
+ .option('-l, --list <items>', 'A list', list)
+ .option('-o, --optional [value]', 'An optional value')
+ .option('-c, --collect [value]', 'A repeatable value', collect, [])
+ .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0)
+ .parse(process.argv);
+
+console.log(' int: %j', program.integer);
+console.log(' float: %j', program.float);
+console.log(' optional: %j', program.optional);
+program.range = program.range || [];
+console.log(' range: %j..%j', program.range[0], program.range[1]);
+console.log(' list: %j', program.list);
+console.log(' collect: %j', program.collect);
+console.log(' verbosity: %j', program.verbose);
+console.log(' args: %j', program.args);
+```
+
+## Regular Expression
+```js
+program
+ .version('0.0.1')
+ .option('-s --size <size>', 'Pizza size', /^(large|medium|small)$/i, 'medium')
+ .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i)
+ .parse(process.argv);
+
+console.log(' size: %j', program.size);
+console.log(' drink: %j', program.drink);
+```
+
+## Variadic arguments
+
+ The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to
+ append `...` to the argument name. Here is an example:
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .command('rmdir <dir> [otherDirs...]')
+ .action(function (dir, otherDirs) {
+ console.log('rmdir %s', dir);
+ if (otherDirs) {
+ otherDirs.forEach(function (oDir) {
+ console.log('rmdir %s', oDir);
+ });
+ }
+ });
+
+program.parse(process.argv);
+```
+
+ An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed
+ to your action as demonstrated above.
+
+## Specify the argument syntax
+
+```js
+#!/usr/bin/env node
+
+var program = require('../');
+
+program
+ .version('0.0.1')
+ .arguments('<cmd> [env]')
+ .action(function (cmd, env) {
+ cmdValue = cmd;
+ envValue = env;
+ });
+
+program.parse(process.argv);
+
+if (typeof cmdValue === 'undefined') {
+ console.error('no command given!');
+ process.exit(1);
+}
+console.log('command:', cmdValue);
+console.log('environment:', envValue || "no environment given");
+```
+
+## Git-style sub-commands
+
+```js
+// file: ./examples/pm
+var program = require('..');
+
+program
+ .version('0.0.1')
+ .command('install [name]', 'install one or more packages')
+ .command('search [query]', 'search with optional query')
+ .command('list', 'list packages installed', {isDefault: true})
+ .parse(process.argv);
+```
+
+When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools.
+The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`.
+
+Options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the option from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified.
+
+If the program is designed to be installed globally, make sure the executables have proper modes, like `755`.
+
+### `--harmony`
+
+You can enable `--harmony` option in two ways:
+* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern.
+* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process.
+
+## Automated --help
+
+ The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
+
+```
+ $ ./examples/pizza --help
+
+ Usage: pizza [options]
+
+ An application for pizzas ordering
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -p, --peppers Add peppers
+ -P, --pineapple Add pineapple
+ -b, --bbq Add bbq sauce
+ -c, --cheese <type> Add the specified type of cheese [marble]
+ -C, --no-cheese You do not want any cheese
+
+```
+
+## Custom help
+
+ You can display arbitrary `-h, --help` information
+ by listening for "--help". Commander will automatically
+ exit once you are done so that the remainder of your program
+ does not execute causing undesired behaviours, for example
+ in the following executable "stuff" will not output when
+ `--help` is used.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-f, --foo', 'enable some foo')
+ .option('-b, --bar', 'enable some bar')
+ .option('-B, --baz', 'enable some baz');
+
+// must be before .parse() since
+// node's emit() is immediate
+
+program.on('--help', function(){
+ console.log(' Examples:');
+ console.log('');
+ console.log(' $ custom-help --help');
+ console.log(' $ custom-help -h');
+ console.log('');
+});
+
+program.parse(process.argv);
+
+console.log('stuff');
+```
+
+Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run:
+
+```
+
+Usage: custom-help [options]
+
+Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -f, --foo enable some foo
+ -b, --bar enable some bar
+ -B, --baz enable some baz
+
+Examples:
+
+ $ custom-help --help
+ $ custom-help -h
+
+```
+
+## .outputHelp(cb)
+
+Output help information without exiting.
+Optional callback cb allows post-processing of help text before it is displayed.
+
+If you want to display help by default (e.g. if no command was provided), you can use something like:
+
+```js
+var program = require('commander');
+var colors = require('colors');
+
+program
+ .version('0.0.1')
+ .command('getstream [url]', 'get stream URL')
+ .parse(process.argv);
+
+ if (!process.argv.slice(2).length) {
+ program.outputHelp(make_red);
+ }
+
+function make_red(txt) {
+ return colors.red(txt); //display the help text in red on the console
+}
+```
+
+## .help(cb)
+
+ Output help information and exit immediately.
+ Optional callback cb allows post-processing of help text before it is displayed.
+
+## Examples
+
+```js
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-C, --chdir <path>', 'change the working directory')
+ .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
+ .option('-T, --no-tests', 'ignore test hook')
+
+program
+ .command('setup [env]')
+ .description('run setup commands for all envs')
+ .option("-s, --setup_mode [mode]", "Which setup mode to use")
+ .action(function(env, options){
+ var mode = options.setup_mode || "normal";
+ env = env || 'all';
+ console.log('setup for %s env(s) with %s mode', env, mode);
+ });
+
+program
+ .command('exec <cmd>')
+ .alias('ex')
+ .description('execute the given remote cmd')
+ .option("-e, --exec_mode <mode>", "Which exec mode to use")
+ .action(function(cmd, options){
+ console.log('exec "%s" using %s mode', cmd, options.exec_mode);
+ }).on('--help', function() {
+ console.log(' Examples:');
+ console.log();
+ console.log(' $ deploy exec sequential');
+ console.log(' $ deploy exec async');
+ console.log();
+ });
+
+program
+ .command('*')
+ .action(function(env){
+ console.log('deploying "%s"', env);
+ });
+
+program.parse(process.argv);
+```
+
+More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory.
+
+## License
+
+MIT
+
diff --git a/node_modules/dir-compare/node_modules/commander/index.js b/node_modules/dir-compare/node_modules/commander/index.js
new file mode 100644
index 0000000..a19c05d
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/commander/index.js
@@ -0,0 +1,1110 @@
+/**
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter;
+var spawn = require('child_process').spawn;
+var readlink = require('graceful-readlink').readlinkSync;
+var path = require('path');
+var dirname = path.dirname;
+var basename = path.basename;
+var fs = require('fs');
+
+/**
+ * Expose the root command.
+ */
+
+exports = module.exports = new Command();
+
+/**
+ * Expose `Command`.
+ */
+
+exports.Command = Command;
+
+/**
+ * Expose `Option`.
+ */
+
+exports.Option = Option;
+
+/**
+ * Initialize a new `Option` with the given `flags` and `description`.
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @api public
+ */
+
+function Option(flags, description) {
+ this.flags = flags;
+ this.required = ~flags.indexOf('<');
+ this.optional = ~flags.indexOf('[');
+ this.bool = !~flags.indexOf('-no-');
+ flags = flags.split(/[ ,|]+/);
+ if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
+ this.long = flags.shift();
+ this.description = description || '';
+}
+
+/**
+ * Return option name.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Option.prototype.name = function() {
+ return this.long
+ .replace('--', '')
+ .replace('no-', '');
+};
+
+/**
+ * Check if `arg` matches the short or long flag.
+ *
+ * @param {String} arg
+ * @return {Boolean}
+ * @api private
+ */
+
+Option.prototype.is = function(arg) {
+ return arg == this.short || arg == this.long;
+};
+
+/**
+ * Initialize a new `Command`.
+ *
+ * @param {String} name
+ * @api public
+ */
+
+function Command(name) {
+ this.commands = [];
+ this.options = [];
+ this._execs = {};
+ this._allowUnknownOption = false;
+ this._args = [];
+ this._name = name || '';
+}
+
+/**
+ * Inherit from `EventEmitter.prototype`.
+ */
+
+Command.prototype.__proto__ = EventEmitter.prototype;
+
+/**
+ * Add command `name`.
+ *
+ * The `.action()` callback is invoked when the
+ * command `name` is specified via __ARGV__,
+ * and the remaining arguments are applied to the
+ * function for access.
+ *
+ * When the `name` is "*" an un-matched command
+ * will be passed as the first arg, followed by
+ * the rest of __ARGV__ remaining.
+ *
+ * Examples:
+ *
+ * program
+ * .version('0.0.1')
+ * .option('-C, --chdir <path>', 'change the working directory')
+ * .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
+ * .option('-T, --no-tests', 'ignore test hook')
+ *
+ * program
+ * .command('setup')
+ * .description('run remote setup commands')
+ * .action(function() {
+ * console.log('setup');
+ * });
+ *
+ * program
+ * .command('exec <cmd>')
+ * .description('run the given remote command')
+ * .action(function(cmd) {
+ * console.log('exec "%s"', cmd);
+ * });
+ *
+ * program
+ * .command('teardown <dir> [otherDirs...]')
+ * .description('run teardown commands')
+ * .action(function(dir, otherDirs) {
+ * console.log('dir "%s"', dir);
+ * if (otherDirs) {
+ * otherDirs.forEach(function (oDir) {
+ * console.log('dir "%s"', oDir);
+ * });
+ * }
+ * });
+ *
+ * program
+ * .command('*')
+ * .description('deploy the given env')
+ * .action(function(env) {
+ * console.log('deploying "%s"', env);
+ * });
+ *
+ * program.parse(process.argv);
+ *
+ * @param {String} name
+ * @param {String} [desc] for git-style sub-commands
+ * @return {Command} the new command
+ * @api public
+ */
+
+Command.prototype.command = function(name, desc, opts) {
+ opts = opts || {};
+ var args = name.split(/ +/);
+ var cmd = new Command(args.shift());
+
+ if (desc) {
+ cmd.description(desc);
+ this.executables = true;
+ this._execs[cmd._name] = true;
+ if (opts.isDefault) this.defaultExecutable = cmd._name;
+ }
+
+ cmd._noHelp = !!opts.noHelp;
+ this.commands.push(cmd);
+ cmd.parseExpectedArgs(args);
+ cmd.parent = this;
+
+ if (desc) return this;
+ return cmd;
+};
+
+/**
+ * Define argument syntax for the top-level command.
+ *
+ * @api public
+ */
+
+Command.prototype.arguments = function (desc) {
+ return this.parseExpectedArgs(desc.split(/ +/));
+};
+
+/**
+ * Add an implicit `help [cmd]` subcommand
+ * which invokes `--help` for the given command.
+ *
+ * @api private
+ */
+
+Command.prototype.addImplicitHelpCommand = function() {
+ this.command('help [cmd]', 'display help for [cmd]');
+};
+
+/**
+ * Parse expected `args`.
+ *
+ * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parseExpectedArgs = function(args) {
+ if (!args.length) return;
+ var self = this;
+ args.forEach(function(arg) {
+ var argDetails = {
+ required: false,
+ name: '',
+ variadic: false
+ };
+
+ switch (arg[0]) {
+ case '<':
+ argDetails.required = true;
+ argDetails.name = arg.slice(1, -1);
+ break;
+ case '[':
+ argDetails.name = arg.slice(1, -1);
+ break;
+ }
+
+ if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') {
+ argDetails.variadic = true;
+ argDetails.name = argDetails.name.slice(0, -3);
+ }
+ if (argDetails.name) {
+ self._args.push(argDetails);
+ }
+ });
+ return this;
+};
+
+/**
+ * Register callback `fn` for the command.
+ *
+ * Examples:
+ *
+ * program
+ * .command('help')
+ * .description('display verbose help')
+ * .action(function() {
+ * // output help here
+ * });
+ *
+ * @param {Function} fn
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.action = function(fn) {
+ var self = this;
+ var listener = function(args, unknown) {
+ // Parse any so-far unknown options
+ args = args || [];
+ unknown = unknown || [];
+
+ var parsed = self.parseOptions(unknown);
+
+ // Output help if necessary
+ outputHelpIfNecessary(self, parsed.unknown);
+
+ // If there are still any unknown options, then we simply
+ // die, unless someone asked for help, in which case we give it
+ // to them, and then we die.
+ if (parsed.unknown.length > 0) {
+ self.unknownOption(parsed.unknown[0]);
+ }
+
+ // Leftover arguments need to be pushed back. Fixes issue #56
+ if (parsed.args.length) args = parsed.args.concat(args);
+
+ self._args.forEach(function(arg, i) {
+ if (arg.required && null == args[i]) {
+ self.missingArgument(arg.name);
+ } else if (arg.variadic) {
+ if (i !== self._args.length - 1) {
+ self.variadicArgNotLast(arg.name);
+ }
+
+ args[i] = args.splice(i);
+ }
+ });
+
+ // Always append ourselves to the end of the arguments,
+ // to make sure we match the number of arguments the user
+ // expects
+ if (self._args.length) {
+ args[self._args.length] = self;
+ } else {
+ args.push(self);
+ }
+
+ fn.apply(self, args);
+ };
+ var parent = this.parent || this;
+ var name = parent === this ? '*' : this._name;
+ parent.on(name, listener);
+ if (this._alias) parent.on(this._alias, listener);
+ return this;
+};
+
+/**
+ * Define option with `flags`, `description` and optional
+ * coercion `fn`.
+ *
+ * The `flags` string should contain both the short and long flags,
+ * separated by comma, a pipe or space. The following are all valid
+ * all will output this way when `--help` is used.
+ *
+ * "-p, --pepper"
+ * "-p|--pepper"
+ * "-p --pepper"
+ *
+ * Examples:
+ *
+ * // simple boolean defaulting to false
+ * program.option('-p, --pepper', 'add pepper');
+ *
+ * --pepper
+ * program.pepper
+ * // => Boolean
+ *
+ * // simple boolean defaulting to true
+ * program.option('-C, --no-cheese', 'remove cheese');
+ *
+ * program.cheese
+ * // => true
+ *
+ * --no-cheese
+ * program.cheese
+ * // => false
+ *
+ * // required argument
+ * program.option('-C, --chdir <path>', 'change the working directory');
+ *
+ * --chdir /tmp
+ * program.chdir
+ * // => "/tmp"
+ *
+ * // optional argument
+ * program.option('-c, --cheese [type]', 'add cheese [marble]');
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @param {Function|Mixed} fn or default
+ * @param {Mixed} defaultValue
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.option = function(flags, description, fn, defaultValue) {
+ var self = this
+ , option = new Option(flags, description)
+ , oname = option.name()
+ , name = camelcase(oname);
+
+ // default as 3rd arg
+ if (typeof fn != 'function') {
+ if (fn instanceof RegExp) {
+ var regex = fn;
+ fn = function(val, def) {
+ var m = regex.exec(val);
+ return m ? m[0] : def;
+ }
+ }
+ else {
+ defaultValue = fn;
+ fn = null;
+ }
+ }
+
+ // preassign default value only for --no-*, [optional], or <required>
+ if (false == option.bool || option.optional || option.required) {
+ // when --no-* we make sure default is true
+ if (false == option.bool) defaultValue = true;
+ // preassign only if we have a default
+ if (undefined !== defaultValue) self[name] = defaultValue;
+ }
+
+ // register the option
+ this.options.push(option);
+
+ // when it's passed assign the value
+ // and conditionally invoke the callback
+ this.on(oname, function(val) {
+ // coercion
+ if (null !== val && fn) val = fn(val, undefined === self[name]
+ ? defaultValue
+ : self[name]);
+
+ // unassigned or bool
+ if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) {
+ // if no value, bool true, and we have a default, then use it!
+ if (null == val) {
+ self[name] = option.bool
+ ? defaultValue || true
+ : false;
+ } else {
+ self[name] = val;
+ }
+ } else if (null !== val) {
+ // reassign
+ self[name] = val;
+ }
+ });
+
+ return this;
+};
+
+/**
+ * Allow unknown options on the command line.
+ *
+ * @param {Boolean} arg if `true` or omitted, no error will be thrown
+ * for unknown options.
+ * @api public
+ */
+Command.prototype.allowUnknownOption = function(arg) {
+ this._allowUnknownOption = arguments.length === 0 || arg;
+ return this;
+};
+
+/**
+ * Parse `argv`, settings options and invoking commands when defined.
+ *
+ * @param {Array} argv
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parse = function(argv) {
+ // implicit help
+ if (this.executables) this.addImplicitHelpCommand();
+
+ // store raw args
+ this.rawArgs = argv;
+
+ // guess name
+ this._name = this._name || basename(argv[1], '.js');
+
+ // github-style sub-commands with no sub-command
+ if (this.executables && argv.length < 3 && !this.defaultExecutable) {
+ // this user needs help
+ argv.push('--help');
+ }
+
+ // process argv
+ var parsed = this.parseOptions(this.normalize(argv.slice(2)));
+ var args = this.args = parsed.args;
+
+ var result = this.parseArgs(this.args, parsed.unknown);
+
+ // executable sub-commands
+ var name = result.args[0];
+ if (this._execs[name] && typeof this._execs[name] != "function") {
+ return this.executeSubCommand(argv, args, parsed.unknown);
+ } else if (this.defaultExecutable) {
+ // use the default subcommand
+ args.unshift(name = this.defaultExecutable);
+ return this.executeSubCommand(argv, args, parsed.unknown);
+ }
+
+ return result;
+};
+
+/**
+ * Execute a sub-command executable.
+ *
+ * @param {Array} argv
+ * @param {Array} args
+ * @param {Array} unknown
+ * @api private
+ */
+
+Command.prototype.executeSubCommand = function(argv, args, unknown) {
+ args = args.concat(unknown);
+
+ if (!args.length) this.help();
+ if ('help' == args[0] && 1 == args.length) this.help();
+
+ // <cmd> --help
+ if ('help' == args[0]) {
+ args[0] = args[1];
+ args[1] = '--help';
+ }
+
+ // executable
+ var f = argv[1];
+ // name of the subcommand, link `pm-install`
+ var bin = basename(f, '.js') + '-' + args[0];
+
+
+ // In case of globally installed, get the base dir where executable
+ // subcommand file should be located at
+ var baseDir
+ , link = readlink(f);
+
+ // when symbolink is relative path
+ if (link !== f && link.charAt(0) !== '/') {
+ link = path.join(dirname(f), link)
+ }
+ baseDir = dirname(link);
+
+ // prefer local `./<bin>` to bin in the $PATH
+ var localBin = path.join(baseDir, bin);
+
+ // whether bin file is a js script with explicit `.js` extension
+ var isExplicitJS = false;
+ if (exists(localBin + '.js')) {
+ bin = localBin + '.js';
+ isExplicitJS = true;
+ } else if (exists(localBin)) {
+ bin = localBin;
+ }
+
+ args = args.slice(1);
+
+ var proc;
+ if (process.platform !== 'win32') {
+ if (isExplicitJS) {
+ args.unshift(localBin);
+ // add executable arguments to spawn
+ args = (process.execArgv || []).concat(args);
+
+ proc = spawn('node', args, { stdio: 'inherit', customFds: [0, 1, 2] });
+ } else {
+ proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] });
+ }
+ } else {
+ args.unshift(localBin);
+ proc = spawn(process.execPath, args, { stdio: 'inherit'});
+ }
+
+ proc.on('close', process.exit.bind(process));
+ proc.on('error', function(err) {
+ if (err.code == "ENOENT") {
+ console.error('\n %s(1) does not exist, try --help\n', bin);
+ } else if (err.code == "EACCES") {
+ console.error('\n %s(1) not executable. try chmod or run with root\n', bin);
+ }
+ process.exit(1);
+ });
+
+ // Store the reference to the child process
+ this.runningCommand = proc;
+};
+
+/**
+ * Normalize `args`, splitting joined short flags. For example
+ * the arg "-abc" is equivalent to "-a -b -c".
+ * This also normalizes equal sign and splits "--abc=def" into "--abc def".
+ *
+ * @param {Array} args
+ * @return {Array}
+ * @api private
+ */
+
+Command.prototype.normalize = function(args) {
+ var ret = []
+ , arg
+ , lastOpt
+ , index;
+
+ for (var i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ if (i > 0) {
+ lastOpt = this.optionFor(args[i-1]);
+ }
+
+ if (arg === '--') {
+ // Honor option terminator
+ ret = ret.concat(args.slice(i));
+ break;
+ } else if (lastOpt && lastOpt.required) {
+ ret.push(arg);
+ } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) {
+ arg.slice(1).split('').forEach(function(c) {
+ ret.push('-' + c);
+ });
+ } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) {
+ ret.push(arg.slice(0, index), arg.slice(index + 1));
+ } else {
+ ret.push(arg);
+ }
+ }
+
+ return ret;
+};
+
+/**
+ * Parse command `args`.
+ *
+ * When listener(s) are available those
+ * callbacks are invoked, otherwise the "*"
+ * event is emitted and those actions are invoked.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api private
+ */
+
+Command.prototype.parseArgs = function(args, unknown) {
+ var name;
+
+ if (args.length) {
+ name = args[0];
+ if (this.listeners(name).length) {
+ this.emit(args.shift(), args, unknown);
+ } else {
+ this.emit('*', args);
+ }
+ } else {
+ outputHelpIfNecessary(this, unknown);
+
+ // If there were no args and we have unknown options,
+ // then they are extraneous and we need to error.
+ if (unknown.length > 0) {
+ this.unknownOption(unknown[0]);
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Return an option matching `arg` if any.
+ *
+ * @param {String} arg
+ * @return {Option}
+ * @api private
+ */
+
+Command.prototype.optionFor = function(arg) {
+ for (var i = 0, len = this.options.length; i < len; ++i) {
+ if (this.options[i].is(arg)) {
+ return this.options[i];
+ }
+ }
+};
+
+/**
+ * Parse options from `argv` returning `argv`
+ * void of these options.
+ *
+ * @param {Array} argv
+ * @return {Array}
+ * @api public
+ */
+
+Command.prototype.parseOptions = function(argv) {
+ var args = []
+ , len = argv.length
+ , literal
+ , option
+ , arg;
+
+ var unknownOptions = [];
+
+ // parse options
+ for (var i = 0; i < len; ++i) {
+ arg = argv[i];
+
+ // literal args after --
+ if ('--' == arg) {
+ literal = true;
+ continue;
+ }
+
+ if (literal) {
+ args.push(arg);
+ continue;
+ }
+
+ // find matching Option
+ option = this.optionFor(arg);
+
+ // option is defined
+ if (option) {
+ // requires arg
+ if (option.required) {
+ arg = argv[++i];
+ if (null == arg) return this.optionMissingArgument(option);
+ this.emit(option.name(), arg);
+ // optional arg
+ } else if (option.optional) {
+ arg = argv[i+1];
+ if (null == arg || ('-' == arg[0] && '-' != arg)) {
+ arg = null;
+ } else {
+ ++i;
+ }
+ this.emit(option.name(), arg);
+ // bool
+ } else {
+ this.emit(option.name());
+ }
+ continue;
+ }
+
+ // looks like an option
+ if (arg.length > 1 && '-' == arg[0]) {
+ unknownOptions.push(arg);
+
+ // If the next argument looks like it might be
+ // an argument for this option, we pass it on.
+ // If it isn't, then it'll simply be ignored
+ if (argv[i+1] && '-' != argv[i+1][0]) {
+ unknownOptions.push(argv[++i]);
+ }
+ continue;
+ }
+
+ // arg
+ args.push(arg);
+ }
+
+ return { args: args, unknown: unknownOptions };
+};
+
+/**
+ * Return an object containing options as key-value pairs
+ *
+ * @return {Object}
+ * @api public
+ */
+Command.prototype.opts = function() {
+ var result = {}
+ , len = this.options.length;
+
+ for (var i = 0 ; i < len; i++) {
+ var key = camelcase(this.options[i].name());
+ result[key] = key === 'version' ? this._version : this[key];
+ }
+ return result;
+};
+
+/**
+ * Argument `name` is missing.
+ *
+ * @param {String} name
+ * @api private
+ */
+
+Command.prototype.missingArgument = function(name) {
+ console.error();
+ console.error(" error: missing required argument `%s'", name);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * `Option` is missing an argument, but received `flag` or nothing.
+ *
+ * @param {String} option
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.optionMissingArgument = function(option, flag) {
+ console.error();
+ if (flag) {
+ console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
+ } else {
+ console.error(" error: option `%s' argument missing", option.flags);
+ }
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Unknown option `flag`.
+ *
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.unknownOption = function(flag) {
+ if (this._allowUnknownOption) return;
+ console.error();
+ console.error(" error: unknown option `%s'", flag);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Variadic argument with `name` is not the last argument as required.
+ *
+ * @param {String} name
+ * @api private
+ */
+
+Command.prototype.variadicArgNotLast = function(name) {
+ console.error();
+ console.error(" error: variadic arguments must be last `%s'", name);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Set the program version to `str`.
+ *
+ * This method auto-registers the "-V, --version" flag
+ * which will print the version number when passed.
+ *
+ * @param {String} str
+ * @param {String} flags
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.version = function(str, flags) {
+ if (0 == arguments.length) return this._version;
+ this._version = str;
+ flags = flags || '-V, --version';
+ this.option(flags, 'output the version number');
+ this.on('version', function() {
+ process.stdout.write(str + '\n');
+ process.exit(0);
+ });
+ return this;
+};
+
+/**
+ * Set the description to `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.description = function(str) {
+ if (0 === arguments.length) return this._description;
+ this._description = str;
+ return this;
+};
+
+/**
+ * Set an alias for the command
+ *
+ * @param {String} alias
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.alias = function(alias) {
+ if (0 == arguments.length) return this._alias;
+ this._alias = alias;
+ return this;
+};
+
+/**
+ * Set / get the command usage `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.usage = function(str) {
+ var args = this._args.map(function(arg) {
+ return humanReadableArgName(arg);
+ });
+
+ var usage = '[options]'
+ + (this.commands.length ? ' [command]' : '')
+ + (this._args.length ? ' ' + args.join(' ') : '');
+
+ if (0 == arguments.length) return this._usage || usage;
+ this._usage = str;
+
+ return this;
+};
+
+/**
+ * Get the name of the command
+ *
+ * @param {String} name
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.name = function() {
+ return this._name;
+};
+
+/**
+ * Return the largest option length.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+Command.prototype.largestOptionLength = function() {
+ return this.options.reduce(function(max, option) {
+ return Math.max(max, option.flags.length);
+ }, 0);
+};
+
+/**
+ * Return help for options.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.optionHelp = function() {
+ var width = this.largestOptionLength();
+
+ // Prepend the help information
+ return [pad('-h, --help', width) + ' ' + 'output usage information']
+ .concat(this.options.map(function(option) {
+ return pad(option.flags, width) + ' ' + option.description;
+ }))
+ .join('\n');
+};
+
+/**
+ * Return command help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.commandHelp = function() {
+ if (!this.commands.length) return '';
+
+ var commands = this.commands.filter(function(cmd) {
+ return !cmd._noHelp;
+ }).map(function(cmd) {
+ var args = cmd._args.map(function(arg) {
+ return humanReadableArgName(arg);
+ }).join(' ');
+
+ return [
+ cmd._name
+ + (cmd._alias ? '|' + cmd._alias : '')
+ + (cmd.options.length ? ' [options]' : '')
+ + ' ' + args
+ , cmd.description()
+ ];
+ });
+
+ var width = commands.reduce(function(max, command) {
+ return Math.max(max, command[0].length);
+ }, 0);
+
+ return [
+ ''
+ , ' Commands:'
+ , ''
+ , commands.map(function(cmd) {
+ var desc = cmd[1] ? ' ' + cmd[1] : '';
+ return pad(cmd[0], width) + desc;
+ }).join('\n').replace(/^/gm, ' ')
+ , ''
+ ].join('\n');
+};
+
+/**
+ * Return program help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.helpInformation = function() {
+ var desc = [];
+ if (this._description) {
+ desc = [
+ ' ' + this._description
+ , ''
+ ];
+ }
+
+ var cmdName = this._name;
+ if (this._alias) {
+ cmdName = cmdName + '|' + this._alias;
+ }
+ var usage = [
+ ''
+ ,' Usage: ' + cmdName + ' ' + this.usage()
+ , ''
+ ];
+
+ var cmds = [];
+ var commandHelp = this.commandHelp();
+ if (commandHelp) cmds = [commandHelp];
+
+ var options = [
+ ' Options:'
+ , ''
+ , '' + this.optionHelp().replace(/^/gm, ' ')
+ , ''
+ , ''
+ ];
+
+ return usage
+ .concat(cmds)
+ .concat(desc)
+ .concat(options)
+ .join('\n');
+};
+
+/**
+ * Output help information for this command
+ *
+ * @api public
+ */
+
+Command.prototype.outputHelp = function(cb) {
+ if (!cb) {
+ cb = function(passthru) {
+ return passthru;
+ }
+ }
+ process.stdout.write(cb(this.helpInformation()));
+ this.emit('--help');
+};
+
+/**
+ * Output help information and exit.
+ *
+ * @api public
+ */
+
+Command.prototype.help = function(cb) {
+ this.outputHelp(cb);
+ process.exit();
+};
+
+/**
+ * Camel-case the given `flag`
+ *
+ * @param {String} flag
+ * @return {String}
+ * @api private
+ */
+
+function camelcase(flag) {
+ return flag.split('-').reduce(function(str, word) {
+ return str + word[0].toUpperCase() + word.slice(1);
+ });
+}
+
+/**
+ * Pad `str` to `width`.
+ *
+ * @param {String} str
+ * @param {Number} width
+ * @return {String}
+ * @api private
+ */
+
+function pad(str, width) {
+ var len = Math.max(0, width - str.length);
+ return str + Array(len + 1).join(' ');
+}
+
+/**
+ * Output help information if necessary
+ *
+ * @param {Command} command to output help for
+ * @param {Array} array of options to search for -h or --help
+ * @api private
+ */
+
+function outputHelpIfNecessary(cmd, options) {
+ options = options || [];
+ for (var i = 0; i < options.length; i++) {
+ if (options[i] == '--help' || options[i] == '-h') {
+ cmd.outputHelp();
+ process.exit(0);
+ }
+ }
+}
+
+/**
+ * Takes an argument an returns its human readable equivalent for help usage.
+ *
+ * @param {Object} arg
+ * @return {String}
+ * @api private
+ */
+
+function humanReadableArgName(arg) {
+ var nameOutput = arg.name + (arg.variadic === true ? '...' : '');
+
+ return arg.required
+ ? '<' + nameOutput + '>'
+ : '[' + nameOutput + ']'
+}
+
+// for versions before node v0.8 when there weren't `fs.existsSync`
+function exists(file) {
+ try {
+ if (fs.statSync(file).isFile()) {
+ return true;
+ }
+ } catch (e) {
+ return false;
+ }
+}
+
diff --git a/node_modules/dir-compare/node_modules/commander/package.json b/node_modules/dir-compare/node_modules/commander/package.json
new file mode 100644
index 0000000..7731149
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/commander/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "commander",
+ "version": "2.9.0",
+ "description": "the complete solution for node.js command-line programs",
+ "keywords": [
+ "command",
+ "option",
+ "parser"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/tj/commander.js.git"
+ },
+ "devDependencies": {
+ "should": ">= 0.0.1",
+ "sinon": ">=1.17.1"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "main": "index",
+ "engines": {
+ "node": ">= 0.6.x"
+ },
+ "files": [
+ "index.js"
+ ],
+ "dependencies": {
+ "graceful-readlink": ">= 1.0.0"
+ }
+}
diff --git a/node_modules/dir-compare/node_modules/minimatch/LICENSE b/node_modules/dir-compare/node_modules/minimatch/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/minimatch/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/dir-compare/node_modules/minimatch/README.md b/node_modules/dir-compare/node_modules/minimatch/README.md
new file mode 100644
index 0000000..ad72b81
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/minimatch/README.md
@@ -0,0 +1,209 @@
+# minimatch
+
+A minimal matching utility.
+
+[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+## Minimatch Class
+
+Create a minimatch object by instantiating the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself if this option is set. When not set, an empty list
+is returned if there are no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
+
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
diff --git a/node_modules/dir-compare/node_modules/minimatch/minimatch.js b/node_modules/dir-compare/node_modules/minimatch/minimatch.js
new file mode 100644
index 0000000..5b5f8cf
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/minimatch/minimatch.js
@@ -0,0 +1,923 @@
+module.exports = minimatch
+minimatch.Minimatch = Minimatch
+
+var path = { sep: '/' }
+try {
+ path = require('path')
+} catch (er) {}
+
+var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+var expand = require('brace-expansion')
+
+var plTypes = {
+ '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
+ '?': { open: '(?:', close: ')?' },
+ '+': { open: '(?:', close: ')+' },
+ '*': { open: '(?:', close: ')*' },
+ '@': { open: '(?:', close: ')' }
+}
+
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
+
+// * => any number of characters
+var star = qmark + '*?'
+
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === '') return p === ''
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
+ }
+
+ if (typeof pattern !== 'string') {
+ throw new TypeError('glob pattern string required')
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
+ }
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.debug = function () {}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = console.error
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
+
+ if (options.nonegate) return
+
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ if (typeof pattern === 'undefined') {
+ throw new TypeError('undefined pattern')
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ if (pattern.length > 1024 * 64) {
+ throw new TypeError('pattern is too long')
+ }
+
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === '**') return GLOBSTAR
+ if (pattern === '') return ''
+
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ switch (c) {
+ case '/':
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
+
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
+
+ patternListStack.push({
+ type: stateChar,
+ start: i - 1,
+ reStart: re.length,
+ open: plTypes[stateChar].open,
+ close: plTypes[stateChar].close
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ var pl = patternListStack.pop()
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:<pattern>)<type>
+ re += pl.close
+ if (pl.type === '!') {
+ negativeLists.push(pl)
+ }
+ pl.reEnd = re.length
+ continue
+
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += '|'
+ continue
+
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ if (inClass) {
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + pl.open.length)
+ this.debug('setting tail', re, pl)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
+
+ this.debug('tail=%j\n %s', tail, tail, pl, re)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '.':
+ case '[':
+ case '(': addPatternStart = true
+ }
+
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
+
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ try {
+ var regExp = new RegExp('^' + re + '$', flags)
+ } catch (er) {
+ // If it was an invalid regular expression, then it can't match
+ // anything. This trick looks for a character after the end of
+ // the string, which is of course impossible, except in multi-line
+ // mode, but it's not a /m regex.
+ return new RegExp('$.')
+ }
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
+
+ this.debug('matchOne', file.length, pattern.length)
+
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
+
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
diff --git a/node_modules/dir-compare/node_modules/minimatch/package.json b/node_modules/dir-compare/node_modules/minimatch/package.json
new file mode 100644
index 0000000..c4514c8
--- /dev/null
+++ b/node_modules/dir-compare/node_modules/minimatch/package.json
@@ -0,0 +1,30 @@
+{
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "3.0.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "main": "minimatch.js",
+ "scripts": {
+ "test": "tap test/*.js --cov",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "devDependencies": {
+ "tap": "^10.3.2"
+ },
+ "license": "ISC",
+ "files": [
+ "minimatch.js"
+ ]
+}
diff --git a/node_modules/dir-compare/package.json b/node_modules/dir-compare/package.json
new file mode 100644
index 0000000..d5ccb56
--- /dev/null
+++ b/node_modules/dir-compare/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "dir-compare",
+ "version": "2.4.0",
+ "description": "Node JS directory compare",
+ "main": "src/index.js",
+ "types": "src/index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/gliviu/dir-compare"
+ },
+ "keywords": [
+ "compare",
+ "directory",
+ "folder"
+ ],
+ "files": [
+ "src"
+ ],
+ "scripts": {
+ "clean": "rm -rf build && rm -rf .nyc_output && rm -rf coverage",
+ "copydeps": "copyfiles \"test/expected/**\" test/testdir.tar \"test/extended/res/**\" package.json build",
+ "build": "tsc && npm run copydeps",
+ "lint": "tslint -p tsconfig.json",
+ "pretest": "npm install && npm run build",
+ "test": "node build/test/runTests.js",
+ "extest": "npm run pretest && ./test/extended/init.sh && test/extended/runall.sh",
+ "coverage": "npx nyc --exclude \"build/test/**\" --reporter=lcov npm test && npx nyc report",
+ "toc": "npx markdown-toc README.md; echo \n",
+ "docs": "typedoc --includeVersion --includeDeclarations --excludeExternals --theme minimal --mode file --readme none --gitRevision master --toc compare,compareSync,fileCompareHandlers,Options,Result --out docs ./src/index.d.ts"
+ },
+ "dependencies": {
+ "buffer-equal": "1.0.0",
+ "colors": "1.0.3",
+ "commander": "2.9.0",
+ "minimatch": "3.0.4"
+ },
+ "devDependencies": {
+ "@types/node": "^12.11.7",
+ "copyfiles": "^1.2.0",
+ "memory-streams": "0.1.0",
+ "semver": "5.6.0",
+ "shelljs": "0.3.0",
+ "tar-fs": "2.1.1",
+ "temp": "0.9.0",
+ "ts-node": "^8.5.4",
+ "tslint": "^5.20.0",
+ "tslint-config-prettier": "^1.13.0",
+ "typedoc": "0.19.2",
+ "typescript": "^3.7.4"
+ },
+ "bin": {
+ "dircompare": "src/cli/dircompare.js"
+ },
+ "author": "Liviu Grigorescu",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/gliviu/dir-compare/issues"
+ }
+}
diff --git a/node_modules/dir-compare/src/cli/dircompare.js b/node_modules/dir-compare/src/cli/dircompare.js
new file mode 100755
index 0000000..593621d
--- /dev/null
+++ b/node_modules/dir-compare/src/cli/dircompare.js
@@ -0,0 +1,147 @@
+#!/usr/bin/env node
+
+var program = require('commander')
+var dircompare = require('../index')
+var fs = require('fs')
+var util = require('util')
+var print = require('./print')
+var pjson = require('../../package.json')
+
+program
+ .version(pjson.version)
+ .usage('[options] leftdir rightdir')
+ .option('-c, --compare-content', 'compare files by content')
+ .option('-D, --compare-date', 'compare files by date')
+ .option('--date-tolerance [type]', 'tolerance to be used in date comparison (milliseconds)')
+ .option('--compare-symlink', 'compare files and directories by symlink')
+ .option('-f, --filter [type]', 'file name filter', undefined)
+ .option('-x, --exclude [type]', 'file/directory name exclude filter', undefined)
+ .option('-S, --skip-subdirs', 'do not recurse into subdirectories')
+ .option('-L, --skip-symlinks', 'ignore symlinks')
+ .option('-i, --ignore-case', 'ignores case when comparing file names')
+ .option('-l, --show-left', 'report - show entries occurring in left dir')
+ .option('-r, --show-right', 'report - show entries occurring in right dir')
+ .option('-e, --show-equal', 'report - show identic entries occurring in both dirs')
+ .option('-d, --show-distinct', 'report - show distinct entries occurring in both dirs')
+ .option('-a, --show-all', 'report - show all entries')
+ .option('-w, --whole-report', 'report - include directories in detailed report')
+ .option('--reason', 'report - show reason when entries are distinct')
+ .option('--csv', 'report - print details as csv')
+ .option('--nocolors', 'don\'t use console colors')
+ .option('--async', 'Make use of multiple cores')
+
+
+program.on('--help', function () {
+ console.log(' By default files are compared by size.')
+ console.log(' --date-tolerance defaults to 1000 ms. Two files are considered to have')
+ console.log(' the same date if the difference between their modification dates fits')
+ console.log(' within date tolerance.')
+ console.log()
+ console.log(' Exit codes:')
+ console.log(' 0 - entries are identical')
+ console.log(' 1 - entries are different')
+ console.log(' 2 - error occurred')
+ console.log()
+ console.log(' Examples:')
+ console.log(' compare by content dircompare -c dir1 dir2')
+ console.log(' show only different files dircompare -d dir1 dir2')
+ console.log()
+ console.log(' exclude filter dircompare -x ".git,node_modules" dir1 dir2')
+ console.log(' dircompare -x "/tests/expected" dir1 dir2')
+ console.log(' dircompare -x "**/expected" dir1 dir2')
+ console.log(' dircompare -x "**/tests/**/*.ts" dir1 dir2')
+ console.log()
+ console.log(' include filter dircompare -f "*.js,*.yml" dir1 dir2')
+ console.log(' dircompare -f "/tests/**/*.js" dir1 dir2')
+ console.log(' dircompare -f "**/tests/**/*.ts" dir1 dir2')
+})
+
+// Fix for https://github.com/tj/commander.js/issues/125
+program.allowUnknownOption()
+program.parse(process.argv)
+var parsed = program.parseOptions(program.normalize(process.argv.slice(2)))
+if (parsed.unknown.length > 0) {
+ console.error('Unknown options: ' + parsed.unknown)
+ process.exit(2)
+}
+
+var run = function () {
+ try {
+ if (program.args.length !== 2) {
+ program.outputHelp()
+ process.exit(2)
+ } else {
+ var options = {}
+
+
+ options.compareContent = program.compareContent
+ options.compareDate = program.compareDate
+ options.compareSymlink = program.compareSymlink
+ options.compareSize = true
+ options.skipSubdirs = program.skipSubdirs
+ options.skipSymlinks = program.skipSymlinks
+ options.ignoreCase = program.ignoreCase
+ options.includeFilter = program.filter
+ options.excludeFilter = program.exclude
+ options.noDiffSet = !(program.showAll || program.showEqual || program.showLeft || program.showRight || program.showDistinct)
+ options.dateTolerance = program.dateTolerance || 1000
+
+ var async = program.async
+
+ var path1 = program.args[0]
+ var path2 = program.args[1]
+ var abort = false
+ if (!isNumeric(options.dateTolerance)) {
+ console.error("Numeric value expected for --date-tolerance")
+ abort = true
+ }
+ if (!fs.existsSync(path1)) {
+ console.error(util.format("Path '%s' missing"), path1)
+ abort = true
+ }
+ if (!fs.existsSync(path2)) {
+ console.error(util.format("Path '%s' missing"), path2)
+ abort = true
+ }
+ if (!abort) {
+ // compare
+ var comparePromise
+ if (async) {
+ comparePromise = dircompare.compare(path1, path2, options)
+ } else {
+ comparePromise = new Promise(function (resolve, reject) {
+ resolve(dircompare.compareSync(path1, path2, options))
+ })
+ }
+
+ comparePromise.then(
+ function (res) {
+ // PRINT DETAILS
+ print(res, process.stdout, program)
+ if (res.same) {
+ process.exit(0)
+ } else {
+ process.exit(1)
+ }
+ },
+ function (error) {
+ console.error('Error occurred: ' + (error instanceof Error ? error.stack : error))
+ process.exit(2)
+ })
+ } else {
+ process.exit(2)
+ }
+ }
+ } catch (e) {
+ console.error(e.stack)
+ process.exit(2)
+ }
+}
+
+function isNumeric(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n)
+}
+
+
+
+run()
diff --git a/node_modules/dir-compare/src/cli/print.js b/node_modules/dir-compare/src/cli/print.js
new file mode 100644
index 0000000..9861896
--- /dev/null
+++ b/node_modules/dir-compare/src/cli/print.js
@@ -0,0 +1,192 @@
+var colors = require('colors')
+var util = require('util')
+var pathUtils = require('path')
+
+var PATH_SEP = pathUtils.sep
+
+// Prints dir compare results.
+// 'program' represents display options and correspond to dircompare command line parameters.
+// Example: 'dircompare --show-all --exclude *.js dir1 dir2' translates into
+// program: {showAll: true, exclude: '*.js'}
+//
+var print = function (res, writer, program) {
+ var noColor = function (str) { return str }
+ var colorEqual = program.nocolors ? noColor : colors.green
+ var colorDistinct = program.nocolors ? noColor : colors.red
+ var colorLeft = noColor
+ var colorRight = noColor
+ var colorDir = noColor
+ var colorBrokenLinks = noColor
+ var colorMissing = program.nocolors ? noColor : colors.yellow
+
+ // calculate relative path length for pretty print
+ var relativePathMaxLength = 0, fileNameMaxLength = 0
+ if (!program.csv && res.diffSet) {
+ res.diffSet.forEach(function (diff) {
+ if (diff.relativePath.length > relativePathMaxLength) {
+ relativePathMaxLength = diff.relativePath.length
+ }
+ var len = getCompareFile(diff, '??', colorMissing).length
+ if (len > fileNameMaxLength) {
+ fileNameMaxLength = len
+ }
+ })
+ }
+
+ // csv header
+ if (program.csv) {
+ writer.write('path,name,state,type,size1,size2,date1,date2,reason\n')
+ }
+ if (res.diffSet) {
+ for (var i = 0; i < res.diffSet.length; i++) {
+ var detail = res.diffSet[i]
+ var color, show = true
+
+ if (!program.wholeReport) {
+ // show only files or broken links
+ var type = detail.type1 !== 'missing' ? detail.type1 : detail.type2
+ if (type !== 'file' && type !== 'broken-link') {
+ show = false
+ }
+ }
+ if (show) {
+ switch (detail.state) {
+ case 'equal':
+ color = colorEqual
+ show = program.showAll || program.showEqual ? true : false
+ break
+ case 'left':
+ color = colorLeft
+ show = program.showAll || program.showLeft ? true : false
+ break
+ case 'right':
+ color = colorRight
+ show = program.showAll || program.showRight ? true : false
+ break
+ case 'distinct':
+ color = colorDistinct
+ show = program.showAll || program.showDistinct ? true : false
+ break
+ default:
+ show = true
+ color = colors.gray
+ }
+ if (show) {
+ if (program.csv) {
+ printCsv(writer, detail, color)
+ } else {
+ printPretty(writer, program, detail, color, colorDir, colorMissing, relativePathMaxLength, fileNameMaxLength)
+ }
+ }
+ }
+ }
+ }
+
+ // PRINT STATISTICS
+ var statTotal, statEqual, statLeft, statRight, statDistinct
+ if (program.wholeReport) {
+ statTotal = res.total
+ statEqual = res.equal
+ statLeft = res.left
+ statRight = res.right
+ statDistinct = res.distinct
+ } else {
+ var brokenLInksStats = res.brokenLinks
+ statTotal = res.totalFiles + brokenLInksStats.totalBrokenLinks
+ statEqual = res.equalFiles
+ statLeft = res.leftFiles + brokenLInksStats.leftBrokenLinks
+ statRight = res.rightFiles + brokenLInksStats.rightBrokenLinks
+ statDistinct = res.distinctFiles + brokenLInksStats.distinctBrokenLinks
+ }
+ if (!program.noDiffIndicator) {
+ writer.write(res.same ? colorEqual('Entries are identical\n') : colorDistinct('Entries are different\n'))
+ }
+ var stats = util.format('total: %s, equal: %s, distinct: %s, only left: %s, only right: %s',
+ statTotal,
+ colorEqual(statEqual),
+ colorDistinct(statDistinct),
+ colorLeft(statLeft),
+ colorRight(statRight)
+ )
+ if (res.brokenLinks.totalBrokenLinks > 0) {
+ stats += util.format(', broken links: %s', colorBrokenLinks(res.brokenLinks.totalBrokenLinks))
+ }
+ stats += '\n'
+ writer.write(stats)
+}
+
+/**
+ * Print details for default view mode
+ */
+var printPretty = function (writer, program, detail, color, dirColor, missingColor, relativePathMaxLength, fileNameMaxLength) {
+ var path = detail.relativePath === '' ? PATH_SEP : detail.relativePath
+
+ var state
+ switch (detail.state) {
+ case 'equal':
+ state = '=='
+ break
+ case 'left':
+ state = '->'
+ break
+ case 'right':
+ state = '<-'
+ break
+ case 'distinct':
+ state = '<>'
+ break
+ default:
+ state = '?'
+ }
+ var type = ''
+ type = detail.type1 !== 'missing' ? detail.type1 : detail.type2
+ if (type === 'directory') {
+ type = dirColor(type)
+ }
+ var cmpEntry = getCompareFile(detail, color(state), missingColor)
+ var reason = ''
+ if (program.reason && detail.reason) {
+ reason = util.format(' <%s>', detail.reason)
+ }
+ if (program.wholeReport || type === 'broken-link') {
+ writer.write(util.format('[%s] %s (%s)%s\n', path, cmpEntry, type, reason))
+ } else {
+ writer.write(util.format('[%s] %s%s\n', path, cmpEntry, reason))
+ }
+}
+
+var getCompareFile = function (detail, state, missingcolor) {
+ p1 = detail.name1 ? detail.name1 : ''
+ p2 = detail.name2 ? detail.name2 : ''
+ var missing1 = detail.type1 === 'missing' ? missingcolor('missing') : ''
+ var missing2 = detail.type2 === 'missing' ? missingcolor('missing') : ''
+ return util.format('%s%s %s %s%s', missing1, p1, state, missing2, p2)
+}
+
+/**
+ * Print csv details.
+ */
+var printCsv = function (writer, detail, color) {
+ var size1 = '', size2 = ''
+ if (detail.type1 === 'file') {
+ size1 = detail.size1 !== undefined ? detail.size1 : ''
+ }
+ if (detail.type2 === 'file') {
+ size2 = detail.size2 !== undefined ? detail.size2 : ''
+ }
+
+ var date1 = '', date2 = ''
+ date1 = detail.date1 !== undefined ? detail.date1.toISOString() : ''
+ date2 = detail.date2 !== undefined ? detail.date2.toISOString() : ''
+
+ var type = ''
+ type = detail.type1 !== 'missing' ? detail.type1 : detail.type2
+
+ var path = detail.relativePath ? detail.relativePath : PATH_SEP
+ var name = (detail.name1 ? detail.name1 : detail.name2)
+ var reason = detail.reason || ''
+
+ writer.write(util.format('%s,%s,%s,%s,%s,%s,%s,%s,%s\n', path, name, color(detail.state), type, size1, size2, date1, date2, reason))
+}
+
+module.exports = print
diff --git a/node_modules/dir-compare/src/compareAsync.js b/node_modules/dir-compare/src/compareAsync.js
new file mode 100644
index 0000000..26a9d68
--- /dev/null
+++ b/node_modules/dir-compare/src/compareAsync.js
@@ -0,0 +1,141 @@
+var fs = require('fs')
+var entryBuilder = require('./entry/entryBuilder')
+var entryEquality = require('./entry/entryEquality')
+var stats = require('./statistics/statisticsUpdate')
+var pathUtils = require('path')
+var fsPromise = require('./fs/fsPromise')
+var loopDetector = require('./symlink/loopDetector')
+var entryComparator = require('./entry/entryComparator')
+var entryType = require('./entry/entryType')
+
+/**
+ * Returns the sorted list of entries in a directory.
+ */
+var getEntries = function (rootEntry, relativePath, loopDetected, options) {
+ if (!rootEntry || loopDetected) {
+ return Promise.resolve([])
+ }
+ if (rootEntry.isDirectory) {
+ return fsPromise.readdir(rootEntry.absolutePath)
+ .then(function (entries) {
+ return entryBuilder.buildDirEntries(rootEntry, entries, relativePath, options)
+ })
+ }
+ return Promise.resolve([rootEntry])
+}
+
+/**
+ * Compares two directories asynchronously.
+ */
+var compare = function (rootEntry1, rootEntry2, level, relativePath, options, statistics, diffSet, symlinkCache) {
+ var loopDetected1 = loopDetector.detectLoop(rootEntry1, symlinkCache.dir1)
+ var loopDetected2 = loopDetector.detectLoop(rootEntry2, symlinkCache.dir2)
+ loopDetector.updateSymlinkCache(symlinkCache, rootEntry1, rootEntry2, loopDetected1, loopDetected2)
+
+ return Promise.all([getEntries(rootEntry1, relativePath, loopDetected1, options), getEntries(rootEntry2, relativePath, loopDetected2, options)]).then(
+ function (entriesResult) {
+ var entries1 = entriesResult[0]
+ var entries2 = entriesResult[1]
+ var i1 = 0, i2 = 0
+ var comparePromises = []
+ var compareFilePromises = []
+ var subDiffSet
+
+ while (i1 < entries1.length || i2 < entries2.length) {
+ var entry1 = entries1[i1]
+ var entry2 = entries2[i2]
+ var type1, type2
+
+ // compare entry name (-1, 0, 1)
+ var cmp
+ if (i1 < entries1.length && i2 < entries2.length) {
+ cmp = entryComparator.compareEntry(entry1, entry2, options)
+ type1 = entryType.getType(entry1)
+ type2 = entryType.getType(entry2)
+ } else if (i1 < entries1.length) {
+ type1 = entryType.getType(entry1)
+ type2 = entryType.getType(undefined)
+ cmp = -1
+ } else {
+ type1 = entryType.getType(undefined)
+ type2 = entryType.getType(entry2)
+ cmp = 1
+ }
+
+ // process entry
+ if (cmp === 0) {
+ // Both left/right exist and have the same name and type
+ var compareAsyncRes = entryEquality.isEntryEqualAsync(entry1, entry2, type1, diffSet, options)
+ var samePromise = compareAsyncRes.samePromise
+ var same = compareAsyncRes.same
+ if (same !== undefined) {
+ options.resultBuilder(entry1, entry2,
+ same ? 'equal' : 'distinct',
+ level, relativePath, options, statistics, diffSet,
+ compareAsyncRes.reason)
+ stats.updateStatisticsBoth(entry1, entry2, compareAsyncRes.same, compareAsyncRes.reason, type1, statistics, options)
+ } else {
+ compareFilePromises.push(samePromise)
+ }
+
+ i1++
+ i2++
+ if (!options.skipSubdirs && type1 === 'directory') {
+ if (!options.noDiffSet) {
+ subDiffSet = []
+ diffSet.push(subDiffSet)
+ }
+ comparePromises.push(compare(entry1, entry2, level + 1,
+ pathUtils.join(relativePath, entry1.name),
+ options, statistics, subDiffSet, loopDetector.cloneSymlinkCache(symlinkCache)))
+ }
+ } else if (cmp < 0) {
+ // Right missing
+ options.resultBuilder(entry1, undefined, 'left', level, relativePath, options, statistics, diffSet)
+ stats.updateStatisticsLeft(entry1, type1, statistics, options)
+ i1++
+ if (type1 === 'directory' && !options.skipSubdirs) {
+ if (!options.noDiffSet) {
+ subDiffSet = []
+ diffSet.push(subDiffSet)
+ }
+ comparePromises.push(compare(entry1, undefined,
+ level + 1,
+ pathUtils.join(relativePath, entry1.name), options, statistics, subDiffSet, loopDetector.cloneSymlinkCache(symlinkCache)))
+ }
+ } else {
+ // Left missing
+ options.resultBuilder(undefined, entry2, 'right', level, relativePath, options, statistics, diffSet)
+ stats.updateStatisticsRight(entry2, type2, statistics, options)
+ i2++
+ if (type2 === 'directory' && !options.skipSubdirs) {
+ if (!options.noDiffSet) {
+ subDiffSet = []
+ diffSet.push(subDiffSet)
+ }
+ comparePromises.push(compare(undefined, entry2,
+ level + 1,
+ pathUtils.join(relativePath, entry2.name), options, statistics, subDiffSet, loopDetector.cloneSymlinkCache(symlinkCache)))
+ }
+ }
+ }
+ return Promise.all(comparePromises).then(function () {
+ return Promise.all(compareFilePromises).then(function (sameResults) {
+ for (var i = 0; i < sameResults.length; i++) {
+ var sameResult = sameResults[i]
+ if (sameResult.error) {
+ return Promise.reject(sameResult.error)
+ } else {
+ options.resultBuilder(sameResult.entry1, sameResult.entry2,
+ sameResult.same ? 'equal' : 'distinct',
+ level, relativePath, options, statistics, sameResult.diffSet,
+ sameResult.reason)
+ stats.updateStatisticsBoth(sameResult.entries1, sameResult.entries2, sameResult.same, sameResult.reason, sameResult.type1, statistics, options)
+ }
+ }
+ })
+ })
+ })
+}
+
+module.exports = compare
diff --git a/node_modules/dir-compare/src/compareSync.js b/node_modules/dir-compare/src/compareSync.js
new file mode 100644
index 0000000..84ff4b3
--- /dev/null
+++ b/node_modules/dir-compare/src/compareSync.js
@@ -0,0 +1,90 @@
+var fs = require('fs')
+var pathUtils = require('path')
+var entryBuilder = require('./entry/entryBuilder')
+var entryEquality = require('./entry/entryEquality')
+var stats = require('./statistics/statisticsUpdate')
+var loopDetector = require('./symlink/loopDetector')
+var entryComparator = require('./entry/entryComparator')
+var entryType = require('./entry/entryType')
+
+/**
+ * Returns the sorted list of entries in a directory.
+ */
+var getEntries = function (rootEntry, relativePath, loopDetected, options) {
+ if (!rootEntry || loopDetected) {
+ return []
+ }
+ if (rootEntry.isDirectory) {
+ var entries = fs.readdirSync(rootEntry.absolutePath)
+ return entryBuilder.buildDirEntries(rootEntry, entries, relativePath, options)
+ }
+ return [rootEntry]
+}
+
+/**
+ * Compares two directories synchronously.
+ */
+var compare = function (rootEntry1, rootEntry2, level, relativePath, options, statistics, diffSet, symlinkCache) {
+ var loopDetected1 = loopDetector.detectLoop(rootEntry1, symlinkCache.dir1)
+ var loopDetected2 = loopDetector.detectLoop(rootEntry2, symlinkCache.dir2)
+ loopDetector.updateSymlinkCache(symlinkCache, rootEntry1, rootEntry2, loopDetected1, loopDetected2)
+
+ var entries1 = getEntries(rootEntry1, relativePath, loopDetected1, options)
+ var entries2 = getEntries(rootEntry2, relativePath, loopDetected2, options)
+ var i1 = 0, i2 = 0
+ while (i1 < entries1.length || i2 < entries2.length) {
+ var entry1 = entries1[i1]
+ var entry2 = entries2[i2]
+ var type1, type2
+
+ // compare entry name (-1, 0, 1)
+ var cmp
+ if (i1 < entries1.length && i2 < entries2.length) {
+ cmp = entryComparator.compareEntry(entry1, entry2, options)
+ type1 = entryType.getType(entry1)
+ type2 = entryType.getType(entry2)
+ } else if (i1 < entries1.length) {
+ type1 = entryType.getType(entry1)
+ type2 = entryType.getType(undefined)
+ cmp = -1
+ } else {
+ type1 = entryType.getType(undefined)
+ type2 = entryType.getType(entry2)
+ cmp = 1
+ }
+
+ // process entry
+ if (cmp === 0) {
+ // Both left/right exist and have the same name and type
+ var compareEntryRes = entryEquality.isEntryEqualSync(entry1, entry2, type1, options)
+ options.resultBuilder(entry1, entry2,
+ compareEntryRes.same ? 'equal' : 'distinct',
+ level, relativePath, options, statistics, diffSet,
+ compareEntryRes.reason)
+ stats.updateStatisticsBoth(entry1, entry2, compareEntryRes.same, compareEntryRes.reason, type1, statistics, options)
+ i1++
+ i2++
+ if (!options.skipSubdirs && type1 === 'directory') {
+ compare(entry1, entry2, level + 1, pathUtils.join(relativePath, entry1.name), options, statistics, diffSet, loopDetector.cloneSymlinkCache(symlinkCache))
+ }
+ } else if (cmp < 0) {
+ // Right missing
+ options.resultBuilder(entry1, undefined, 'left', level, relativePath, options, statistics, diffSet)
+ stats.updateStatisticsLeft(entry1, type1, statistics, options)
+ i1++
+ if (type1 === 'directory' && !options.skipSubdirs) {
+ compare(entry1, undefined, level + 1, pathUtils.join(relativePath, entry1.name), options, statistics, diffSet, loopDetector.cloneSymlinkCache(symlinkCache))
+ }
+ } else {
+ // Left missing
+ options.resultBuilder(undefined, entry2, 'right', level, relativePath, options, statistics, diffSet)
+ stats.updateStatisticsRight(entry2, type2, statistics, options)
+ i2++
+ if (type2 === 'directory' && !options.skipSubdirs) {
+ compare(undefined, entry2, level + 1, pathUtils.join(relativePath, entry2.name), options, statistics, diffSet, loopDetector.cloneSymlinkCache(symlinkCache))
+ }
+ }
+ }
+}
+
+module.exports = compare
diff --git a/node_modules/dir-compare/src/entry/entryBuilder.js b/node_modules/dir-compare/src/entry/entryBuilder.js
new file mode 100644
index 0000000..6a46c62
--- /dev/null
+++ b/node_modules/dir-compare/src/entry/entryBuilder.js
@@ -0,0 +1,102 @@
+var fs = require('fs')
+var minimatch = require('minimatch')
+var pathUtils = require('path')
+var entryComparator = require('./entryComparator')
+
+var PATH_SEP = pathUtils.sep
+
+module.exports = {
+ /**
+ * Returns the sorted list of entries in a directory.
+ */
+ buildDirEntries: function (rootEntry, dirEntries, relativePath, options) {
+ var res = []
+ for (var i = 0; i < dirEntries.length; i++) {
+ var entryName = dirEntries[i]
+ var entryAbsolutePath = rootEntry.absolutePath + PATH_SEP + entryName
+ var entryPath = rootEntry.path + PATH_SEP + entryName
+
+ var entry = this.buildEntry(entryAbsolutePath, entryPath, entryName)
+ if (options.skipSymlinks && entry.isSymlink) {
+ entry.stat = undefined
+ }
+
+ if (filterEntry(entry, relativePath, options)) {
+ res.push(entry)
+ }
+ }
+ return res.sort((a, b) => entryComparator.compareEntry(a, b, options))
+ },
+
+ buildEntry: function (absolutePath, path, name) {
+ var stats = getStatIgnoreBrokenLink(absolutePath)
+
+ return {
+ name: name,
+ absolutePath: absolutePath,
+ path: path,
+ stat: stats.stat,
+ lstat: stats.lstat,
+ isSymlink: stats.lstat.isSymbolicLink(),
+ isBrokenLink: stats.isBrokenLink,
+ isDirectory: stats.stat.isDirectory()
+ }
+ },
+
+}
+
+
+function getStatIgnoreBrokenLink(absolutePath) {
+ var lstat = fs.lstatSync(absolutePath)
+ try {
+ return {
+ stat: fs.statSync(absolutePath),
+ lstat: lstat,
+ isBrokenLink: false
+ }
+ } catch (error) {
+ if (error.code === 'ENOENT') {
+ return {
+ stat: lstat,
+ lstat: lstat,
+ isBrokenLink: true
+ }
+ }
+ throw error
+ }
+}
+
+/**
+ * Filter entries by file name. Returns true if the file is to be processed.
+ */
+function filterEntry(entry, relativePath, options) {
+ if (entry.isSymlink && options.skipSymlinks) {
+ return false
+ }
+ var path = pathUtils.join(relativePath, entry.name)
+
+ if ((entry.stat.isFile() && options.includeFilter) && (!match(path, options.includeFilter))) {
+ return false
+ }
+
+ if ((options.excludeFilter) && (match(path, options.excludeFilter))) {
+ return false
+ }
+
+ return true
+}
+
+/**
+ * Matches path by pattern.
+ */
+function match(path, pattern) {
+ var patternArray = pattern.split(',')
+ for (var i = 0; i < patternArray.length; i++) {
+ var pat = patternArray[i]
+ if (minimatch(path, pat, { dot: true, matchBase: true })) { //nocase
+ return true
+ }
+ }
+ return false
+}
+
diff --git a/node_modules/dir-compare/src/entry/entryComparator.js b/node_modules/dir-compare/src/entry/entryComparator.js
new file mode 100644
index 0000000..d0361f5
--- /dev/null
+++ b/node_modules/dir-compare/src/entry/entryComparator.js
@@ -0,0 +1,20 @@
+/**
+ * Determines order criteria for sorting entries in a directory.
+ */
+module.exports = {
+ compareEntry: function (a, b, options) {
+ if (a.isBrokenLink && b.isBrokenLink) {
+ return options.compareNameHandler(a.name, b.name, options)
+ } else if (a.isBrokenLink) {
+ return -1
+ } else if (b.isBrokenLink) {
+ return 1
+ } else if (a.stat.isDirectory() && b.stat.isFile()) {
+ return -1
+ } else if (a.stat.isFile() && b.stat.isDirectory()) {
+ return 1
+ } else {
+ return options.compareNameHandler(a.name, b.name, options)
+ }
+ }
+}
diff --git a/node_modules/dir-compare/src/entry/entryEquality.js b/node_modules/dir-compare/src/entry/entryEquality.js
new file mode 100644
index 0000000..f1b8d78
--- /dev/null
+++ b/node_modules/dir-compare/src/entry/entryEquality.js
@@ -0,0 +1,135 @@
+var fs = require('fs')
+/**
+ * Compares two entries with identical name and type.
+ */
+module.exports = {
+ isEntryEqualSync: function (entry1, entry2, type, options) {
+ if (type === 'file') {
+ return isFileEqualSync(entry1, entry2, options)
+ }
+ if (type === 'directory') {
+ return isDirectoryEqual(entry1, entry2, options)
+ }
+ if (type === 'broken-link') {
+ return isBrokenLinkEqual()
+ }
+ throw new Error('Unexpected type ' + type)
+ },
+
+ isEntryEqualAsync: function (entry1, entry2, type, diffSet, options) {
+ if (type === 'file') {
+ return isFileEqualAsync(entry1, entry2, type, diffSet, options)
+ }
+ if (type === 'directory') {
+ return isDirectoryEqual(entry1, entry2, options)
+ }
+ if (type === 'broken-link') {
+ return isBrokenLinkEqual()
+ }
+ throw new Error('Unexpected type ' + type)
+ }
+}
+
+
+function isFileEqualSync(entry1, entry2, options) {
+ var p1 = entry1 ? entry1.absolutePath : undefined
+ var p2 = entry2 ? entry2.absolutePath : undefined
+ if (options.compareSymlink && !isSymlinkEqual(entry1, entry2)) {
+ return { same: false, reason: 'different-symlink' }
+ }
+ if (options.compareSize && entry1.stat.size !== entry2.stat.size) {
+ return { same: false, reason: 'different-size' }
+ }
+ if (options.compareDate && !isDateEqual(entry1.stat.mtime, entry2.stat.mtime, options.dateTolerance)) {
+ return { same: false, reason: 'different-date' }
+ }
+ if (options.compareContent && !options.compareFileSync(p1, entry1.stat, p2, entry2.stat, options)) {
+ return { same: false, reason: 'different-content' }
+ }
+ return { same: true }
+}
+
+function isFileEqualAsync(entry1, entry2, type, diffSet, options) {
+ var p1 = entry1 ? entry1.absolutePath : undefined
+ var p2 = entry2 ? entry2.absolutePath : undefined
+ if (options.compareSymlink && !isSymlinkEqual(entry1, entry2)) {
+ return { same: false, reason: 'different-symlink' }
+ }
+ if (options.compareSize && entry1.stat.size !== entry2.stat.size) {
+ return { same: false, samePromise: undefined, reason: 'different-size' }
+ }
+
+ if (options.compareDate && !isDateEqual(entry1.stat.mtime, entry2.stat.mtime, options.dateTolerance)) {
+ return { same: false, samePromise: undefined, reason: 'different-date' }
+ }
+
+ if (options.compareContent) {
+ var samePromise = undefined
+ var subDiffSet
+ if (!options.noDiffSet) {
+ subDiffSet = []
+ diffSet.push(subDiffSet)
+ }
+ samePromise = options.compareFileAsync(p1, entry1.stat, p2, entry2.stat, options)
+ .then(function (comparisonResult) {
+ var same, error
+ if (typeof (comparisonResult) === "boolean") {
+ same = comparisonResult
+ } else {
+ error = comparisonResult
+ }
+
+ return {
+ entry1: entry1, entry2: entry2, same: same,
+ error: error, type1: type, type2: type,
+ diffSet: subDiffSet,
+ reason: same ? undefined : 'different-content'
+ }
+ })
+ .catch(function (error) {
+ return {
+ error: error
+ }
+ })
+
+ return { same: undefined, samePromise: samePromise }
+ }
+
+ return { same: true, samePromise: undefined }
+}
+
+function isDirectoryEqual(entry1, entry2, options) {
+ if (options.compareSymlink && !isSymlinkEqual(entry1, entry2)) {
+ return { same: false, reason: 'different-symlink' }
+ }
+ return { same: true }
+}
+
+function isBrokenLinkEqual() {
+ return { same: false, reason: 'broken-link' } // broken links are never considered equal
+}
+
+/**
+ * Compares two dates and returns true/false depending on tolerance (milliseconds).
+ * Two dates are considered equal if the difference in milliseconds between them is less or equal than tolerance.
+ */
+function isDateEqual(date1, date2, tolerance) {
+ return Math.abs(date1.getTime() - date2.getTime()) <= tolerance ? true : false
+}
+
+/**
+ * Compares two entries for symlink equality.
+ */
+function isSymlinkEqual(entry1, entry2) {
+ if (!entry1.isSymlink && !entry2.isSymlink) {
+ return true
+ }
+ if (entry1.isSymlink && entry2.isSymlink && hasIdenticalLink(entry1.absolutePath, entry2.absolutePath)) {
+ return true
+ }
+ return false
+}
+
+function hasIdenticalLink(path1, path2) {
+ return fs.readlinkSync(path1) === fs.readlinkSync(path2)
+} \ No newline at end of file
diff --git a/node_modules/dir-compare/src/entry/entryType.js b/node_modules/dir-compare/src/entry/entryType.js
new file mode 100644
index 0000000..5dac42a
--- /dev/null
+++ b/node_modules/dir-compare/src/entry/entryType.js
@@ -0,0 +1,18 @@
+
+module.exports = {
+ /**
+ * One of 'missing','file','directory','broken-link'
+ */
+ getType: function (entry) {
+ if (!entry) {
+ return 'missing'
+ }
+ if (entry.isBrokenLink) {
+ return 'broken-link'
+ }
+ if (entry.isDirectory) {
+ return 'directory'
+ }
+ return 'file'
+ }
+} \ No newline at end of file
diff --git a/node_modules/dir-compare/src/fileCompareHandler/closeFile.js b/node_modules/dir-compare/src/fileCompareHandler/closeFile.js
new file mode 100644
index 0000000..10118e1
--- /dev/null
+++ b/node_modules/dir-compare/src/fileCompareHandler/closeFile.js
@@ -0,0 +1,28 @@
+var fs = require('fs')
+
+var closeFilesSync = function (fd1, fd2) {
+ if (fd1) {
+ fs.closeSync(fd1)
+ }
+ if (fd2) {
+ fs.closeSync(fd2)
+ }
+}
+
+var closeFilesAsync = function (fd1, fd2, fdQueue) {
+ if (fd1 && fd2) {
+ return fdQueue.promises.close(fd1).then(() => fdQueue.promises.close(fd2))
+ }
+ if (fd1) {
+ return fdQueue.promises.close(fd1)
+ }
+ if (fd2) {
+ return fdQueue.promises.close(fd2)
+ }
+}
+
+
+module.exports = {
+ closeFilesSync: closeFilesSync,
+ closeFilesAsync: closeFilesAsync
+}
diff --git a/node_modules/dir-compare/src/fileCompareHandler/defaultFileCompare.js b/node_modules/dir-compare/src/fileCompareHandler/defaultFileCompare.js
new file mode 100644
index 0000000..26188ca
--- /dev/null
+++ b/node_modules/dir-compare/src/fileCompareHandler/defaultFileCompare.js
@@ -0,0 +1,113 @@
+var fs = require('fs')
+var bufferEqual = require('buffer-equal')
+var FileDescriptorQueue = require('../fs/FileDescriptorQueue')
+var closeFilesSync = require('./closeFile').closeFilesSync
+var closeFilesAsync = require('./closeFile').closeFilesAsync
+var fsPromise = require('../fs/fsPromise')
+var BufferPool = require('../fs/BufferPool')
+
+var MAX_CONCURRENT_FILE_COMPARE = 8
+var BUF_SIZE = 100000
+var fdQueue = new FileDescriptorQueue(MAX_CONCURRENT_FILE_COMPARE * 2)
+var bufferPool = new BufferPool(BUF_SIZE, MAX_CONCURRENT_FILE_COMPARE); // fdQueue guarantees there will be no more than MAX_CONCURRENT_FILE_COMPARE async processes accessing the buffers concurrently
+
+
+/**
+ * Compares two partial buffers.
+ */
+var compareBuffers = function (buf1, buf2, contentSize) {
+ return bufferEqual(buf1.slice(0, contentSize), buf2.slice(0, contentSize))
+}
+
+/**
+ * Compares two files by content.
+ */
+var compareSync = function (path1, stat1, path2, stat2, options) {
+ var fd1, fd2
+ if (stat1.size !== stat2.size) {
+ return false
+ }
+ var bufferPair = bufferPool.allocateBuffers()
+ try {
+ fd1 = fs.openSync(path1, 'r')
+ fd2 = fs.openSync(path2, 'r')
+ var buf1 = bufferPair.buf1
+ var buf2 = bufferPair.buf2
+ var progress = 0
+ while (true) {
+ var size1 = fs.readSync(fd1, buf1, 0, BUF_SIZE, null)
+ var size2 = fs.readSync(fd2, buf2, 0, BUF_SIZE, null)
+ if (size1 !== size2) {
+ return false
+ } else if (size1 === 0) {
+ // End of file reached
+ return true
+ } else if (!compareBuffers(buf1, buf2, size1)) {
+ return false
+ }
+ }
+ } finally {
+ closeFilesSync(fd1, fd2)
+ bufferPool.freeBuffers(bufferPair)
+ }
+}
+
+
+/**
+ * Compares two files by content
+ */
+var compareAsync = function (path1, stat1, path2, stat2, options) {
+ var fd1, fd2
+ var bufferPair
+ if (stat1.size !== stat2.size) {
+ return Promise.resolve(false)
+ }
+ return Promise.all([fdQueue.promises.open(path1, 'r'), fdQueue.promises.open(path2, 'r')])
+ .then(function (fds) {
+ bufferPair = bufferPool.allocateBuffers()
+ fd1 = fds[0]
+ fd2 = fds[1]
+ var buf1 = bufferPair.buf1
+ var buf2 = bufferPair.buf2
+ var progress = 0
+ var compareAsyncInternal = function () {
+ return Promise.all([
+ fsPromise.read(fd1, buf1, 0, BUF_SIZE, null),
+ fsPromise.read(fd2, buf2, 0, BUF_SIZE, null)
+ ]).then(function (bufferSizes) {
+ var size1 = bufferSizes[0]
+ var size2 = bufferSizes[1]
+ if (size1 !== size2) {
+ return false
+ } else if (size1 === 0) {
+ // End of file reached
+ return true
+ } else if (!compareBuffers(buf1, buf2, size1)) {
+ return false
+ } else {
+ return compareAsyncInternal()
+ }
+ })
+ }
+ return compareAsyncInternal()
+ })
+ .then(
+ // 'finally' polyfill for node 8 and below
+ function (res) {
+ return finalizeAsync(fd1, fd2, bufferPair).then(() => res)
+ },
+ function (err) {
+ return finalizeAsync(fd1, fd2, bufferPair).then(() => { throw err; })
+ }
+ )
+}
+
+function finalizeAsync(fd1, fd2, bufferPair) {
+ bufferPool.freeBuffers(bufferPair)
+ return closeFilesAsync(fd1, fd2, fdQueue)
+}
+
+module.exports = {
+ compareSync: compareSync,
+ compareAsync: compareAsync
+}
diff --git a/node_modules/dir-compare/src/fileCompareHandler/lineBasedFileCompare.js b/node_modules/dir-compare/src/fileCompareHandler/lineBasedFileCompare.js
new file mode 100644
index 0000000..c2de4b2
--- /dev/null
+++ b/node_modules/dir-compare/src/fileCompareHandler/lineBasedFileCompare.js
@@ -0,0 +1,196 @@
+/**
+ * Compare files line by line with options to ignore
+ * line endings and white space differencies.
+ */
+var fs = require('fs')
+var FileDescriptorQueue = require('../fs/FileDescriptorQueue')
+var closeFilesSync = require('./closeFile').closeFilesSync
+var closeFilesAsync = require('./closeFile').closeFilesAsync
+var fsPromise = require('../fs/fsPromise')
+var BufferPool = require('../fs/BufferPool')
+
+const LINE_TOKENIZER_REGEXP = /[^\n]+\n?|\n/g
+const TRIM_LINE_ENDING_REGEXP = /\r\n$/g
+const SPLIT_CONTENT_AND_LINE_ENDING_REGEXP = /([^\r\n]*)([\r\n]*)/
+const TRIM_WHITE_SPACES_REGEXP = /^[ \f\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+|[ \f\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+$/g
+
+var MAX_CONCURRENT_FILE_COMPARE = 8
+var BUF_SIZE = 100000
+var fdQueue = new FileDescriptorQueue(MAX_CONCURRENT_FILE_COMPARE * 2)
+var bufferPool = new BufferPool(BUF_SIZE, MAX_CONCURRENT_FILE_COMPARE); // fdQueue guarantees there will be no more than MAX_CONCURRENT_FILE_COMPARE async processes accessing the buffers concurrently
+
+function compareSync(path1, stat1, path2, stat2, options) {
+ var fd1, fd2
+ var bufferPair = bufferPool.allocateBuffers()
+ var bufferSize = options.lineBasedHandlerBufferSize || BUF_SIZE
+ try {
+ fd1 = fs.openSync(path1, 'r')
+ fd2 = fs.openSync(path2, 'r')
+ var buf1 = bufferPair.buf1
+ var buf2 = bufferPair.buf2
+ var nextPosition1 = 0, nextPosition2 = 0
+ while (true) {
+ var lines1 = readLinesSync(fd1, buf1, bufferSize, nextPosition1)
+ var lines2 = readLinesSync(fd2, buf2, bufferSize, nextPosition2)
+ if (lines1.length === 0 && lines2.length === 0) {
+ // End of file reached
+ return true
+ }
+ var equalLines = compareLines(lines1, lines2, options)
+ if (equalLines === 0) {
+ return false
+ }
+ nextPosition1 += calculateSize(lines1, equalLines)
+ nextPosition2 += calculateSize(lines2, equalLines)
+ }
+ } finally {
+ closeFilesSync(fd1, fd2)
+ bufferPool.freeBuffers(bufferPair)
+ }
+}
+
+async function compareAsync(path1, stat1, path2, stat2, options) {
+ var fd1, fd2
+ var bufferSize = options.lineBasedHandlerBufferSize || BUF_SIZE
+ var bufferPair
+ try {
+ var fds = await Promise.all([fdQueue.promises.open(path1, 'r'), fdQueue.promises.open(path2, 'r')])
+ bufferPair = bufferPool.allocateBuffers()
+ fd1 = fds[0]
+ fd2 = fds[1]
+ var buf1 = bufferPair.buf1
+ var buf2 = bufferPair.buf2
+ var nextPosition1 = 0, nextPosition2 = 0
+ while (true) {
+ var lines1 = await readLinesAsync(fd1, buf1, bufferSize, nextPosition1)
+ var lines2 = await readLinesAsync(fd2, buf2, bufferSize, nextPosition2)
+ if (lines1.length === 0 && lines2.length === 0) {
+ // End of file reached
+ return true
+ }
+ var equalLines = compareLines(lines1, lines2, options)
+ if (equalLines === 0) {
+ return false
+ }
+ nextPosition1 += calculateSize(lines1, equalLines)
+ nextPosition2 += calculateSize(lines2, equalLines)
+ }
+ } finally {
+ bufferPool.freeBuffers(bufferPair)
+ await closeFilesAsync(fd1, fd2, fdQueue)
+ }
+}
+
+/**
+ * Read lines from file starting with nextPosition.
+ * Returns 0 lines if eof is reached, otherwise returns at least one complete line.
+ */
+function readLinesSync(fd, buf, bufferSize, nextPosition) {
+ var lines = []
+ var chunk = ""
+ while (true) {
+ var size = fs.readSync(fd, buf, 0, bufferSize, nextPosition)
+ if (size === 0) {
+ // end of file
+ normalizeLastFileLine(lines)
+ return lines
+ }
+ chunk += buf.toString('utf8', 0, size)
+ lines = chunk.match(LINE_TOKENIZER_REGEXP)
+ if (lines.length > 1) {
+ return removeLastIncompleteLine(lines)
+ }
+ nextPosition += size
+ }
+}
+
+/**
+ * Read lines from file starting with nextPosition.
+ * Returns 0 lines if eof is reached, otherwise returns at least one complete line.
+ */
+async function readLinesAsync(fd, buf, bufferSize, nextPosition) {
+ var lines = []
+ var chunk = ""
+ while (true) {
+ var size = await fsPromise.read(fd, buf, 0, bufferSize, nextPosition)
+ if (size === 0) {
+ // end of file
+ normalizeLastFileLine(lines)
+ return lines
+ }
+ chunk += buf.toString('utf8', 0, size)
+ lines = chunk.match(LINE_TOKENIZER_REGEXP)
+ if (lines.length > 1) {
+ return removeLastIncompleteLine(lines)
+ }
+ nextPosition += size
+ }
+}
+
+function removeLastIncompleteLine(lines) {
+ const lastLine = lines[lines.length - 1]
+ if (!lastLine.endsWith('\n')) {
+ return lines.slice(0, lines.length - 1)
+ }
+ return lines
+}
+
+function normalizeLastFileLine(lines) {
+ if (lines.length === 0) {
+ return
+ }
+ const lastLine = lines[lines.length - 1]
+ if (!lastLine.endsWith('\n')) {
+ lines[lines.length - 1] = lastLine + '\n'
+ }
+}
+
+function calculateSize(lines, numberOfLines) {
+ var size = 0
+ for (var i = 0; i < numberOfLines; i++) {
+ var line = lines[i]
+ size += line.length
+ }
+ return size
+}
+
+function compareLines(lines1, lines2, options) {
+ var equalLines = 0
+ var len = lines1.length < lines2.length ? lines1.length : lines2.length
+ for (var i = 0; i < len; i++) {
+ var line1 = lines1[i]
+ var line2 = lines2[i]
+ if (options.ignoreLineEnding) {
+ line1 = trimLineEnding(line1)
+ line2 = trimLineEnding(line2)
+ }
+ if (options.ignoreWhiteSpaces) {
+ line1 = trimSpaces(line1)
+ line2 = trimSpaces(line2)
+ }
+ if (line1 !== line2) {
+ return equalLines
+ }
+ equalLines++
+ }
+ return equalLines
+}
+
+// Trims string like ' abc \n' into 'abc\n'
+function trimSpaces(s) {
+ var matchResult = s.match(SPLIT_CONTENT_AND_LINE_ENDING_REGEXP);
+ var content = matchResult[1]
+ var lineEnding = matchResult[2]
+ var trimmed = content.replace(TRIM_WHITE_SPACES_REGEXP, '')
+ return trimmed + lineEnding
+}
+
+// Trims string like 'abc\r\n' into 'abc\n'
+function trimLineEnding(s) {
+ return s.replace(TRIM_LINE_ENDING_REGEXP, '\n')
+}
+
+module.exports = {
+ compareSync: compareSync,
+ compareAsync: compareAsync
+}
diff --git a/node_modules/dir-compare/src/fs/BufferPool.js b/node_modules/dir-compare/src/fs/BufferPool.js
new file mode 100644
index 0000000..48febce
--- /dev/null
+++ b/node_modules/dir-compare/src/fs/BufferPool.js
@@ -0,0 +1,46 @@
+/**
+ * Collection of buffers to be shared between async processes.
+ * Avoids allocating buffers each time async process starts.
+ * bufSize - size of each buffer
+ * bufNo - number of buffers
+ * Caller has to make sure no more than bufNo async processes run simultaneously.
+ */
+function BufferPool(bufSize, bufNo) {
+ var bufferPool = []
+ for (var i = 0; i < bufNo; i++) {
+ bufferPool.push({
+ buf1: alloc(bufSize),
+ buf2: alloc(bufSize),
+ busy: false
+ })
+ }
+
+ var allocateBuffers = function () {
+ for (var j = 0; j < bufNo; j++) {
+ var bufferPair = bufferPool[j]
+ if (!bufferPair.busy) {
+ bufferPair.busy = true
+ return bufferPair
+ }
+ }
+ throw new Error('Async buffer limit reached')
+ }
+
+ return {
+ allocateBuffers: allocateBuffers,
+ freeBuffers: freeBuffers
+ }
+
+ function freeBuffers(bufferPair) {
+ bufferPair.busy = false
+ }
+}
+
+function alloc(bufSize) {
+ if (Buffer.alloc) {
+ return Buffer.alloc(bufSize)
+ }
+ return new Buffer(bufSize)
+}
+
+module.exports = BufferPool
diff --git a/node_modules/dir-compare/src/fs/FileDescriptorQueue.js b/node_modules/dir-compare/src/fs/FileDescriptorQueue.js
new file mode 100644
index 0000000..f017b20
--- /dev/null
+++ b/node_modules/dir-compare/src/fs/FileDescriptorQueue.js
@@ -0,0 +1,78 @@
+'use strict'
+
+var fs = require('fs')
+var Queue = require('./Queue')
+/**
+ * Limits the number of concurrent file handlers.
+ * Use it as a wrapper over fs.open() and fs.close().
+ * Example:
+ * var fdQueue = new FileDescriptorQueue(8)
+ * fdQueue.open(path, flags, (err, fd) =>{
+ * ...
+ * fdQueue.close(fd, (err) =>{
+ * ...
+ * })
+ * })
+ * As of node v7, calling fd.close without a callback is deprecated.
+ */
+var FileDescriptorQueue = function (maxFilesNo) {
+ var pendingJobs = new Queue()
+ var activeCount = 0
+
+ var open = function (path, flags, callback) {
+ pendingJobs.enqueue({
+ path: path,
+ flags: flags,
+ callback: callback
+ })
+ process()
+ }
+
+ var process = function () {
+ if (pendingJobs.getLength() > 0 && activeCount < maxFilesNo) {
+ var job = pendingJobs.dequeue()
+ activeCount++
+ fs.open(job.path, job.flags, job.callback)
+ }
+ }
+
+ var close = function (fd, callback) {
+ activeCount--
+ fs.close(fd, callback)
+ process()
+ }
+
+ var promises = {
+ open: function (path, flags) {
+ return new Promise(function (resolve, reject) {
+ open(path, flags, function (err, fd) {
+ if (err) {
+ reject(err)
+ } else {
+ resolve(fd)
+ }
+ })
+ })
+ },
+
+ close: function (fd) {
+ return new Promise(function (resolve, reject) {
+ close(fd, function (err) {
+ if (err) {
+ reject(err)
+ } else {
+ resolve()
+ }
+ })
+ })
+ }
+ }
+
+ return {
+ open: open,
+ close: close,
+ promises: promises
+ }
+}
+
+module.exports = FileDescriptorQueue
diff --git a/node_modules/dir-compare/src/fs/Queue.js b/node_modules/dir-compare/src/fs/Queue.js
new file mode 100644
index 0000000..4d86dd5
--- /dev/null
+++ b/node_modules/dir-compare/src/fs/Queue.js
@@ -0,0 +1,63 @@
+/*
+
+Queue.js
+
+A function to represent a queue
+
+Created by Kate Morley - http://code.iamkate.com/ - and released under the terms
+of the CC0 1.0 Universal legal code:
+
+http://creativecommons.org/publicdomain/zero/1.0/legalcode
+
+*/
+
+var MAX_UNUSED_ARRAY_SIZE = 10000
+
+/* Creates a new queue. A queue is a first-in-first-out (FIFO) data structure -
+ * items are added to the end of the queue and removed from the front.
+ */
+function Queue() {
+
+ // initialise the queue and offset
+ var queue = []
+ var offset = 0
+
+ // Returns the length of the queue.
+ this.getLength = function () {
+ return (queue.length - offset)
+ }
+
+ /* Enqueues the specified item. The parameter is:
+ *
+ * item - the item to enqueue
+ */
+ this.enqueue = function (item) {
+ queue.push(item)
+ }
+
+ /* Dequeues an item and returns it. If the queue is empty, the value
+ * 'undefined' is returned.
+ */
+ this.dequeue = function () {
+
+ // if the queue is empty, return immediately
+ if (queue.length === 0) {
+ return undefined
+ }
+
+ // store the item at the front of the queue
+ var item = queue[offset]
+
+ // increment the offset and remove the free space if necessary
+ if (++offset > MAX_UNUSED_ARRAY_SIZE) {
+ queue = queue.slice(offset)
+ offset = 0
+ }
+
+ // return the dequeued item
+ return item
+
+ }
+}
+
+module.exports = Queue
diff --git a/node_modules/dir-compare/src/fs/fsPromise.js b/node_modules/dir-compare/src/fs/fsPromise.js
new file mode 100644
index 0000000..f6e3c5a
--- /dev/null
+++ b/node_modules/dir-compare/src/fs/fsPromise.js
@@ -0,0 +1,26 @@
+var fs = require('fs')
+
+module.exports = {
+ readdir: function (path) {
+ return new Promise(function (resolve, reject) {
+ fs.readdir(path, function (err, files) {
+ if (err) {
+ reject(err)
+ } else {
+ resolve(files)
+ }
+ })
+ })
+ },
+ read: function (fd, buffer, offset, length, position) {
+ return new Promise(function (resolve, reject) {
+ fs.read(fd, buffer, offset, length, position, function(err, bytesRead) {
+ if(err){
+ reject(err)
+ } else {
+ resolve(bytesRead)
+ }
+ })
+ })
+ },
+}
diff --git a/node_modules/dir-compare/src/index.d.ts b/node_modules/dir-compare/src/index.d.ts
new file mode 100644
index 0000000..fc84980
--- /dev/null
+++ b/node_modules/dir-compare/src/index.d.ts
@@ -0,0 +1,476 @@
+/// <reference types="node" />
+
+import * as fs from "fs"
+
+/**
+ * Synchronously compares given paths.
+ * @param path1 Left file or directory to be compared.
+ * @param path2 Right file or directory to be compared.
+ * @param options Comparison options.
+ */
+export function compareSync(path1: string, path2: string, options?: Options): Result
+
+/**
+ * Asynchronously compares given paths.
+ * @param path1 Left file or directory to be compared.
+ * @param path2 Right file or directory to be compared.
+ * @param options Comparison options.
+ */
+export function compare(path1: string, path2: string, options?: Options): Promise<Result>
+
+/**
+ * Comparison options.
+ */
+export interface Options {
+ /**
+ * Properties to be used in various extension points ie. result builder.
+ */
+ [key: string]: any
+
+ /**
+ * Compares files by size. Defaults to 'false'.
+ */
+ compareSize?: boolean
+
+ /**
+ * Compares files by date of modification (stat.mtime). Defaults to 'false'.
+ */
+ compareDate?: boolean
+
+ /**
+ * Two files are considered to have the same date if the difference between their modification dates fits within date tolerance. Defaults to 1000 ms.
+ */
+ dateTolerance?: number
+
+ /**
+ * Compares files by content. Defaults to 'false'.
+ */
+ compareContent?: boolean
+
+ /**
+ * Compares entries by symlink. Defaults to 'false'.
+ */
+ compareSymlink?: boolean
+
+ /**
+ * Skips sub directories. Defaults to 'false'.
+ */
+ skipSubdirs?: boolean
+
+ /**
+ * Ignore symbolic links. Defaults to 'false'.
+ */
+ skipSymlinks?: boolean
+
+ /**
+ * Ignores case when comparing names. Defaults to 'false'.
+ */
+ ignoreCase?: boolean
+
+ /**
+ * Toggles presence of diffSet in output. If true, only statistics are provided. Use this when comparing large number of files to avoid out of memory situations. Defaults to 'false'.
+ */
+ noDiffSet?: boolean
+
+ /**
+ * File name filter. Comma separated minimatch patterns. See [Glob patterns](https://github.com/gliviu/dir-compare#glob-patterns).
+ */
+ includeFilter?: string
+
+ /**
+ * File/directory name exclude filter. Comma separated minimatch patterns. See [Glob patterns](https://github.com/gliviu/dir-compare#glob-patterns)
+ */
+ excludeFilter?: string
+
+ /**
+ * Callback for constructing result. Called for each compared entry pair.
+ *
+ * Updates 'statistics' and 'diffSet'.
+ *
+ * See [Custom result builder](https://github.com/gliviu/dir-compare#custom-result-builder).
+ */
+ resultBuilder?: ResultBuilder
+
+ /**
+ * File comparison handler. See [Custom file comparators](https://github.com/gliviu/dir-compare#custom-file-content-comparators).
+ */
+ compareFileSync?: CompareFileSync
+
+ /**
+ * File comparison handler. See [Custom file comparators](https://github.com/gliviu/dir-compare#custom-file-content-comparators).
+ */
+ compareFileAsync?: CompareFileAsync
+
+ /**
+ * Entry name comparison handler. See [Custom name comparators](https://github.com/gliviu/dir-compare#custom-name-comparators).
+ */
+ compareNameHandler?: CompareNameHandler
+}
+
+/**
+ * Callback for constructing result. Called for each compared entry pair.
+ *
+ * Updates 'statistics' and 'diffSet'.
+ */
+export type ResultBuilder =
+ /**
+ * @param entry1 Left entry.
+ * @param entry2 Right entry.
+ * @param state See [[DifferenceState]].
+ * @param level Depth level relative to root dir.
+ * @param relativePath Path relative to root dir.
+ * @param statistics Statistics to be updated.
+ * @param diffSet Status per each entry to be appended.
+ * Do not append if [[Options.noDiffSet]] is false.
+ * @param reason See [[Reason]]. Not available if entries are equal.
+ */
+ (
+ entry1: Entry | undefined,
+ entry2: Entry | undefined,
+ state: DifferenceState,
+ level: number,
+ relativePath: string,
+ options: Options,
+ statistics: Statistics,
+ diffSet: Array<Difference> | undefined,
+ reason: Reason | undefined
+ ) => void
+
+export interface Entry {
+ name: string
+ absolutePath: string
+ path: string
+ stat: fs.Stats
+ lstat: fs.Stats
+ symlink: boolean
+}
+
+/**
+ * Comparison result.
+ */
+export interface Result extends Statistics {
+ /**
+ * List of changes (present if [[Options.noDiffSet]] is false).
+ */
+ diffSet?: Array<Difference>
+}
+
+export interface Statistics {
+ /**
+ * Any property is allowed if default result builder is not used.
+ */
+ [key: string]: any
+
+ /**
+ * True if directories are identical.
+ */
+ same: boolean
+
+ /**
+ * Number of distinct entries.
+ */
+ distinct: number
+
+ /**
+ * Number of equal entries.
+ */
+ equal: number
+
+ /**
+ * Number of entries only in path1.
+ */
+ left: number
+
+ /**
+ * Number of entries only in path2.
+ */
+ right: number
+
+ /**
+ * Total number of differences (distinct+left+right).
+ */
+ differences: number
+
+ /**
+ * Total number of entries (differences+equal).
+ */
+ total: number
+
+ /**
+ * Number of distinct files.
+ */
+ distinctFiles: number
+
+ /**
+ * Number of equal files.
+ */
+ equalFiles: number
+
+ /**
+ * Number of files only in path1.
+ */
+ leftFiles: number
+
+ /**
+ * Number of files only in path2
+ */
+ rightFiles: number
+
+ /**
+ * Total number of different files (distinctFiles+leftFiles+rightFiles).
+ */
+ differencesFiles: number
+
+ /**
+ * Total number of files (differencesFiles+equalFiles).
+ */
+ totalFiles: number
+
+ /**
+ * Number of distinct directories.
+ */
+ distinctDirs: number
+
+ /**
+ * Number of equal directories.
+ */
+ equalDirs: number
+
+ /**
+ * Number of directories only in path1.
+ */
+ leftDirs: number
+
+ /**
+ * Number of directories only in path2.
+ */
+ rightDirs: number
+
+ /**
+ * Total number of different directories (distinctDirs+leftDirs+rightDirs).
+ */
+ differencesDirs: number
+
+ /**
+ * Total number of directories (differencesDirs+equalDirs).
+ */
+ totalDirs: number
+
+ /**
+ * Stats about broken links.
+ */
+ brokenLinks: BrokenLinksStatistics
+
+ /**
+ * Statistics available if 'compareSymlink' options is used.
+ */
+ symlinks?: SymlinkStatistics
+}
+
+export interface BrokenLinksStatistics {
+ /**
+ * Number of broken links only in path1
+ */
+ leftBrokenLinks: number
+
+ /**
+ * Number of broken links only in path2
+ */
+ rightBrokenLinks: number
+
+ /**
+ * Number of broken links with same name appearing in both path1 and path2 (leftBrokenLinks+rightBrokenLinks+distinctBrokenLinks)
+ */
+ distinctBrokenLinks: number
+
+ /**
+ * Total number of broken links
+ */
+ totalBrokenLinks: number
+
+}
+
+export interface SymlinkStatistics {
+ /**
+ * Number of distinct links.
+ */
+ distinctSymlinks: number
+
+ /**
+ * Number of equal links.
+ */
+ equalSymlinks: number
+
+ /**
+ * Number of links only in path1.
+ */
+ leftSymlinks: number
+
+ /**
+ * Number of links only in path2
+ */
+ rightSymlinks: number
+
+ /**
+ * Total number of different links (distinctSymlinks+leftSymlinks+rightSymlinks).
+ */
+ differencesSymlinks: number
+
+ /**
+ * Total number of links (differencesSymlinks+equalSymlinks).
+ */
+ totalSymlinks: number
+
+}
+
+/**
+ * State of left/right entries relative to each other.
+ */
+export type DifferenceState = "equal" | "left" | "right" | "distinct"
+
+/**
+ * Type of entry.
+ */
+export type DifferenceType = "missing" | "file" | "directory" | "broken-link"
+
+/**
+ * Provides reason when two identically named entries are distinct.
+ */
+export type Reason = "different-size" | "different-date" | "different-content" | "broken-link" | 'different-symlink'
+
+export interface Difference {
+ /**
+ * Any property is allowed if default result builder is not used.
+ */
+ [key: string]: any
+
+ /**
+ * Path not including file/directory name; can be relative or absolute depending on call to compare().
+ */
+ path1?: string
+
+ /**
+ * Path not including file/directory name; can be relative or absolute depending on call to compare().
+ */
+ path2?: string
+
+ /**
+ * Path relative to root dir.
+ */
+ relativePath: string
+
+ /**
+ * Left file/directory name.
+ */
+ name1?: string
+
+ /**
+ * Right file/directory name.
+ */
+ name2?: string
+
+ /**
+ * See [[DifferenceState]]
+ */
+ state: DifferenceState
+
+ /**
+ * Type of left entry.
+ */
+ type1: DifferenceType
+
+ /**
+ * Type of right entry.
+ */
+ type2: DifferenceType
+
+ /**
+ * Left file size.
+ */
+ size1?: number
+
+ /**
+ * Right file size.
+ */
+ size2?: number
+
+ /**
+ * Left entry modification date (stat.mtime).
+ */
+ date1?: number
+
+ /**
+ * Right entry modification date (stat.mtime).
+ */
+ date2?: number
+
+ /**
+ * Depth level relative to root dir.
+ */
+ level: number
+
+ /**
+ * See [[Reason]].
+ * Not available if entries are equal.
+ */
+ reason?: Reason
+}
+
+/**
+ * Synchronous file content comparison handler.
+ */
+export type CompareFileSync = (
+ path1: string,
+ stat1: fs.Stats,
+ path2: string,
+ stat2: fs.Stats,
+ options: Options
+) => boolean
+
+/**
+ * Asynchronous file content comparison handler.
+ */
+export type CompareFileAsync = (
+ path1: string,
+ stat1: fs.Stats,
+ path2: string,
+ stat2: fs.Stats,
+ options: Options
+) => Promise<boolean>
+
+export interface CompareFileHandler {
+ compareSync: CompareFileSync,
+ compareAsync: CompareFileAsync
+}
+
+/**
+ * Available file content comparison handlers.
+ * These handlers are used when [[Options.compareContent]] is set.
+ */
+export const fileCompareHandlers: {
+ /**
+ * Default file content comparison handlers, used if [[Options.compareFileAsync]] or [[Options.compareFileSync]] are not specified.
+ *
+ * Performs binary comparison.
+ */
+ defaultFileCompare: CompareFileHandler,
+ /**
+ * Compares files line by line.
+ *
+ * Options:
+ * * ignoreLineEnding - tru/false (default: false)
+ * * ignoreWhiteSpaces - tru/false (default: false)
+ */
+ lineBasedFileCompare: CompareFileHandler
+}
+
+/**
+ * Compares the names of two entries.
+ * The comparison should be dependent on received options (ie. case sensitive, ...).
+ * Returns 0 if names are identical, -1 if name1<name2, 1 if name1>name2.
+ */
+export type CompareNameHandler = (
+ name1: string,
+ name2: string,
+ options: Options
+) => 0 | 1 | -1
diff --git a/node_modules/dir-compare/src/index.js b/node_modules/dir-compare/src/index.js
new file mode 100644
index 0000000..fb1b6b8
--- /dev/null
+++ b/node_modules/dir-compare/src/index.js
@@ -0,0 +1,204 @@
+var util = require('util')
+var pathUtils = require('path')
+var fs = require('fs')
+var compareSyncInternal = require('./compareSync')
+var compareAsyncInternal = require('./compareAsync')
+var defaultResultBuilderCallback = require('./resultBuilder/defaultResultBuilderCallback')
+var defaultFileCompare = require('./fileCompareHandler/defaultFileCompare')
+var lineBasedFileCompare = require('./fileCompareHandler/lineBasedFileCompare')
+var defaultNameCompare = require('./nameCompare/defaultNameCompare')
+var entryBuilder = require('./entry/entryBuilder')
+var statsLifecycle = require('./statistics/statisticsLifecycle')
+var loopDetector = require('./symlink/loopDetector')
+
+var ROOT_PATH = pathUtils.sep
+
+var compareSync = function (path1, path2, options) {
+ 'use strict'
+ // realpathSync() is necessary for loop detection to work properly
+ var absolutePath1 = pathUtils.normalize(pathUtils.resolve(fs.realpathSync(path1)))
+ var absolutePath2 = pathUtils.normalize(pathUtils.resolve(fs.realpathSync(path2)))
+ var diffSet
+ options = prepareOptions(options)
+ if (!options.noDiffSet) {
+ diffSet = []
+ }
+ var statistics = statsLifecycle.initStats(options)
+ compareSyncInternal(
+ entryBuilder.buildEntry(absolutePath1, path1, pathUtils.basename(absolutePath1)),
+ entryBuilder.buildEntry(absolutePath2, path2, pathUtils.basename(absolutePath2)),
+ 0, ROOT_PATH, options, statistics, diffSet, loopDetector.initSymlinkCache())
+ statsLifecycle.completeStatistics(statistics, options)
+ statistics.diffSet = diffSet
+
+ return statistics
+}
+
+var wrapper = {
+ realPath: function(path, options) {
+ return new Promise(function (resolve, reject) {
+ fs.realpath(path, options, function(err, resolvedPath) {
+ if(err){
+ reject(err)
+ } else {
+ resolve(resolvedPath)
+ }
+ })
+ })
+ }
+}
+
+var compareAsync = function (path1, path2, options) {
+ 'use strict'
+ var absolutePath1, absolutePath2
+ return Promise.resolve()
+ .then(function () {
+ return Promise.all([wrapper.realPath(path1), wrapper.realPath(path2)])
+ })
+ .then(function (realPaths) {
+ var realPath1 = realPaths[0]
+ var realPath2 = realPaths[1]
+ // realpath() is necessary for loop detection to work properly
+ absolutePath1 = pathUtils.normalize(pathUtils.resolve(realPath1))
+ absolutePath2 = pathUtils.normalize(pathUtils.resolve(realPath2))
+ })
+ .then(function () {
+ options = prepareOptions(options)
+ var asyncDiffSet
+ if (!options.noDiffSet) {
+ asyncDiffSet = []
+ }
+ var statistics = statsLifecycle.initStats(options)
+ return compareAsyncInternal(
+ entryBuilder.buildEntry(absolutePath1, path1, pathUtils.basename(path1)),
+ entryBuilder.buildEntry(absolutePath2, path2, pathUtils.basename(path2)),
+ 0, ROOT_PATH, options, statistics, asyncDiffSet, loopDetector.initSymlinkCache()).then(
+ function () {
+ statsLifecycle.completeStatistics(statistics, options)
+ if (!options.noDiffSet) {
+ var diffSet = []
+ rebuildAsyncDiffSet(statistics, asyncDiffSet, diffSet)
+ statistics.diffSet = diffSet
+ }
+ return statistics
+ })
+ })
+}
+
+var prepareOptions = function (options) {
+ options = options || {}
+ var clone = JSON.parse(JSON.stringify(options))
+ clone.resultBuilder = options.resultBuilder
+ clone.compareFileSync = options.compareFileSync
+ clone.compareFileAsync = options.compareFileAsync
+ clone.compareNameHandler = options.compareNameHandler
+ if (!clone.resultBuilder) {
+ clone.resultBuilder = defaultResultBuilderCallback
+ }
+ if (!clone.compareFileSync) {
+ clone.compareFileSync = defaultFileCompare.compareSync
+ }
+ if (!clone.compareFileAsync) {
+ clone.compareFileAsync = defaultFileCompare.compareAsync
+ }
+ if(!clone.compareNameHandler) {
+ clone.compareNameHandler = defaultNameCompare
+ }
+ clone.dateTolerance = clone.dateTolerance || 1000
+ clone.dateTolerance = Number(clone.dateTolerance)
+ if (isNaN(clone.dateTolerance)) {
+ throw new Error('Date tolerance is not a number')
+ }
+ return clone
+}
+
+
+// Async diffsets are kept into recursive structures.
+// This method transforms them into one dimensional arrays.
+var rebuildAsyncDiffSet = function (statistics, asyncDiffSet, diffSet) {
+ asyncDiffSet.forEach(function (rawDiff) {
+ if (!Array.isArray(rawDiff)) {
+ diffSet.push(rawDiff)
+ } else {
+ rebuildAsyncDiffSet(statistics, rawDiff, diffSet)
+ }
+ })
+}
+
+
+/**
+ * Options:
+ * compareSize: true/false - Compares files by size. Defaults to 'false'.
+ * compareDate: true/false - Compares files by date of modification (stat.mtime). Defaults to 'false'.
+ * dateTolerance: milliseconds - Two files are considered to have the same date if the difference between their modification dates fits within date tolerance. Defaults to 1000 ms.
+ * compareContent: true/false - Compares files by content. Defaults to 'false'.
+ * compareSymlink: true/false - Compares entries by symlink. Defaults to 'false'.
+ * skipSubdirs: true/false - Skips sub directories. Defaults to 'false'.
+ * skipSymlinks: true/false - Skips symbolic links. Defaults to 'false'.
+ * ignoreCase: true/false - Ignores case when comparing names. Defaults to 'false'.
+ * noDiffSet: true/false - Toggles presence of diffSet in output. If true, only statistics are provided. Use this when comparing large number of files to avoid out of memory situations. Defaults to 'false'.
+ * includeFilter: File name filter. Comma separated [minimatch](https://www.npmjs.com/package/minimatch) patterns.
+ * excludeFilter: File/directory name exclude filter. Comma separated [minimatch](https://www.npmjs.com/package/minimatch) patterns.
+ * resultBuilder: Callback for constructing result.
+ * function (entry1, entry2, state, level, relativePath, options, statistics, diffSet). Called for each compared entry pair. Updates 'statistics' and 'diffSet'.
+ * compareFileSync, compareFileAsync: Callbacks for file comparison.
+ * compareNameHandler: Callback for name comparison
+ *
+ * Result:
+ * same: true if directories are identical
+ * distinct: number of distinct entries
+ * equal: number of equal entries
+ * left: number of entries only in path1
+ * right: number of entries only in path2
+ * differences: total number of differences (distinct+left+right)
+ * total: total number of entries (differences+equal)
+ * distinctFiles: number of distinct files
+ * equalFiles: number of equal files
+ * leftFiles: number of files only in path1
+ * rightFiles: number of files only in path2
+ * differencesFiles: total number of different files (distinctFiles+leftFiles+rightFiles)
+ * totalFiles: total number of files (differencesFiles+equalFiles)
+ * distinctDirs: number of distinct directories
+ * equalDirs: number of equal directories
+ * leftDirs: number of directories only in path1
+ * rightDirs: number of directories only in path2
+ * differencesDirs: total number of different directories (distinctDirs+leftDirs+rightDirs)
+ * totalDirs: total number of directories (differencesDirs+equalDirs)
+ * brokenLinks:
+ * leftBrokenLinks: number of broken links only in path1
+ * rightBrokenLinks: number of broken links only in path2
+ * distinctBrokenLinks: number of broken links with same name appearing in both path1 and path2
+ * totalBrokenLinks: total number of broken links (leftBrokenLinks+rightBrokenLinks+distinctBrokenLinks)
+ * symlinks: Statistics available if 'compareSymlink' options is used
+ * distinctSymlinks: number of distinct links
+ * equalSymlinks: number of equal links
+ * leftSymlinks: number of links only in path1
+ * rightSymlinks: number of links only in path2
+ * differencesSymlinks: total number of different links (distinctSymlinks+leftSymlinks+rightSymlinks)
+ * totalSymlinks: total number of links (differencesSymlinks+equalSymlinks)
+ * diffSet - List of changes (present if Options.noDiffSet is false)
+ * path1: absolute path not including file/directory name,
+ * path2: absolute path not including file/directory name,
+ * relativePath: common path relative to root,
+ * name1: file/directory name
+ * name2: file/directory name
+ * state: one of equal, left, right, distinct,
+ * type1: one of missing, file, directory, broken-link
+ * type2: one of missing, file, directory, broken-link
+ * size1: file size
+ * size2: file size
+ * date1: modification date (stat.mtime)
+ * date2: modification date (stat.mtime)
+ * level: depth
+ * reason: Provides reason when two identically named entries are distinct
+ * Not available if entries are equal
+ * One of "different-size", "different-date", "different-content", "broken-link", "different-symlink"
+ */
+module.exports = {
+ compareSync: compareSync,
+ compare: compareAsync,
+ fileCompareHandlers: {
+ defaultFileCompare: defaultFileCompare,
+ lineBasedFileCompare: lineBasedFileCompare
+ }
+}
diff --git a/node_modules/dir-compare/src/nameCompare/defaultNameCompare.js b/node_modules/dir-compare/src/nameCompare/defaultNameCompare.js
new file mode 100644
index 0000000..4ed2e99
--- /dev/null
+++ b/node_modules/dir-compare/src/nameCompare/defaultNameCompare.js
@@ -0,0 +1,12 @@
+
+module.exports = function compareName(name1, name2, options) {
+ if (options.ignoreCase) {
+ name1 = name1.toLowerCase()
+ name2 = name2.toLowerCase()
+ }
+ return strcmp(name1, name2)
+}
+
+function strcmp(str1, str2) {
+ return ((str1 === str2) ? 0 : ((str1 > str2) ? 1 : -1))
+}
diff --git a/node_modules/dir-compare/src/resultBuilder/defaultResultBuilderCallback.js b/node_modules/dir-compare/src/resultBuilder/defaultResultBuilderCallback.js
new file mode 100644
index 0000000..224b927
--- /dev/null
+++ b/node_modules/dir-compare/src/resultBuilder/defaultResultBuilderCallback.js
@@ -0,0 +1,27 @@
+'use strict'
+
+var pathUtils = require('path')
+var common = require('../entry/entryBuilder')
+var entryType = require('../entry/entryType')
+
+module.exports = function (entry1, entry2, state, level, relativePath, options, statistics, diffSet, reason) {
+ if (options.noDiffSet) {
+ return
+ }
+ diffSet.push({
+ path1: entry1 ? pathUtils.dirname(entry1.path) : undefined,
+ path2: entry2 ? pathUtils.dirname(entry2.path) : undefined,
+ relativePath: relativePath,
+ name1: entry1 ? entry1.name : undefined,
+ name2: entry2 ? entry2.name : undefined,
+ state: state,
+ type1: entryType.getType(entry1),
+ type2: entryType.getType(entry2),
+ level: level,
+ size1: entry1 ? entry1.stat.size : undefined,
+ size2: entry2 ? entry2.stat.size : undefined,
+ date1: entry1 ? entry1.stat.mtime : undefined,
+ date2: entry2 ? entry2.stat.mtime : undefined,
+ reason: reason
+ })
+}
diff --git a/node_modules/dir-compare/src/statistics/statisticsLifecycle.js b/node_modules/dir-compare/src/statistics/statisticsLifecycle.js
new file mode 100644
index 0000000..549ec5e
--- /dev/null
+++ b/node_modules/dir-compare/src/statistics/statisticsLifecycle.js
@@ -0,0 +1,59 @@
+/**
+ * Controls creation/completion of global statistics object.
+ */
+module.exports = {
+ initStats(options) {
+ var symlinkStatistics = undefined
+ if (options.compareSymlink) {
+ symlinkStatistics = {
+ distinctSymlinks: 0,
+ equalSymlinks: 0,
+ leftSymlinks: 0,
+ rightSymlinks: 0,
+ differencesSymlinks: 0,
+ totalSymlinks: 0,
+ }
+ }
+ var brokenLinksStatistics = {
+ leftBrokenLinks: 0,
+ rightBrokenLinks: 0,
+ distinctBrokenLinks: 0,
+ }
+ return {
+ distinct: 0,
+ equal: 0,
+ left: 0,
+ right: 0,
+ distinctFiles: 0,
+ equalFiles: 0,
+ leftFiles: 0,
+ rightFiles: 0,
+ distinctDirs: 0,
+ equalDirs: 0,
+ leftDirs: 0,
+ rightDirs: 0,
+ brokenLinks: brokenLinksStatistics,
+ symlinks: symlinkStatistics,
+ same: undefined
+ }
+ },
+
+ completeStatistics(statistics, options) {
+ statistics.differences = statistics.distinct + statistics.left + statistics.right
+ statistics.differencesFiles = statistics.distinctFiles + statistics.leftFiles + statistics.rightFiles
+ statistics.differencesDirs = statistics.distinctDirs + statistics.leftDirs + statistics.rightDirs
+ statistics.total = statistics.equal + statistics.differences
+ statistics.totalFiles = statistics.equalFiles + statistics.differencesFiles
+ statistics.totalDirs = statistics.equalDirs + statistics.differencesDirs
+ var brokenLInksStats = statistics.brokenLinks
+ brokenLInksStats.totalBrokenLinks = brokenLInksStats.leftBrokenLinks + brokenLInksStats.rightBrokenLinks + brokenLInksStats.distinctBrokenLinks
+ statistics.same = statistics.differences ? false : true
+
+ if (options.compareSymlink) {
+ statistics.symlinks.differencesSymlinks = statistics.symlinks.distinctSymlinks +
+ statistics.symlinks.leftSymlinks + statistics.symlinks.rightSymlinks
+ statistics.symlinks.totalSymlinks = statistics.symlinks.differencesSymlinks + statistics.symlinks.equalSymlinks
+ }
+ }
+
+} \ No newline at end of file
diff --git a/node_modules/dir-compare/src/statistics/statisticsUpdate.js b/node_modules/dir-compare/src/statistics/statisticsUpdate.js
new file mode 100644
index 0000000..a1b2312
--- /dev/null
+++ b/node_modules/dir-compare/src/statistics/statisticsUpdate.js
@@ -0,0 +1,62 @@
+/**
+ * Calculates comparison statistics.
+ */
+module.exports = {
+ updateStatisticsBoth: function (entry1, entry2, same, reason, type, statistics, options) {
+ same ? statistics.equal++ : statistics.distinct++
+ if (type === 'file') {
+ same ? statistics.equalFiles++ : statistics.distinctFiles++
+ } else if (type === 'directory') {
+ same ? statistics.equalDirs++ : statistics.distinctDirs++
+ } else if (type === 'broken-link') {
+ statistics.brokenLinks.distinctBrokenLinks++
+ } else {
+ throw new Error('Unexpected type ' + type)
+ }
+
+ var isSymlink1 = entry1 ? entry1.isSymlink : false
+ var isSymlink2 = entry2 ? entry2.isSymlink : false
+ var isSymlink = isSymlink1 || isSymlink2
+ if (options.compareSymlink && isSymlink) {
+ var symlinks = statistics.symlinks
+ if (reason === 'different-symlink') {
+ symlinks.distinctSymlinks++
+ } else {
+ symlinks.equalSymlinks++
+ }
+ }
+
+ },
+ updateStatisticsLeft: function (entry1, type, statistics, options) {
+ statistics.left++
+ if (type === 'file') {
+ statistics.leftFiles++
+ } else if (type === 'directory') {
+ statistics.leftDirs++
+ } else if (type === 'broken-link') {
+ statistics.brokenLinks.leftBrokenLinks++
+ } else {
+ throw new Error('Unexpected type ' + type)
+ }
+
+ if (options.compareSymlink && entry1.isSymlink) {
+ statistics.symlinks.leftSymlinks++
+ }
+ },
+ updateStatisticsRight: function (entry2, type, statistics, options) {
+ statistics.right++
+ if (type === 'file') {
+ statistics.rightFiles++
+ } else if (type === 'directory') {
+ statistics.rightDirs++
+ } else if (type === 'broken-link') {
+ statistics.brokenLinks.rightBrokenLinks++
+ } else {
+ throw new Error('Unexpected type ' + type)
+ }
+
+ if (options.compareSymlink && entry2.isSymlink) {
+ statistics.symlinks.rightSymlinks++
+ }
+ },
+} \ No newline at end of file
diff --git a/node_modules/dir-compare/src/symlink/loopDetector.js b/node_modules/dir-compare/src/symlink/loopDetector.js
new file mode 100644
index 0000000..0376ebb
--- /dev/null
+++ b/node_modules/dir-compare/src/symlink/loopDetector.js
@@ -0,0 +1,51 @@
+var fs = require('fs')
+
+/**
+ * Provides symlink loop detection to directory traversal algorithm.
+ */
+module.exports = {
+ detectLoop: function (entry, symlinkCache) {
+ if (entry && entry.isSymlink) {
+ var realPath = fs.realpathSync(entry.absolutePath)
+ if (symlinkCache[realPath]) {
+ return true
+ }
+ }
+ return false
+ },
+
+ initSymlinkCache: function() {
+ return {
+ dir1: {},
+ dir2: {}
+ }
+ },
+
+ updateSymlinkCache: function(symlinkCache, rootEntry1, rootEntry2, loopDetected1, loopDetected2) {
+ var symlinkCachePath1, symlinkCachePath2
+ if (rootEntry1 && !loopDetected1) {
+ symlinkCachePath1 = rootEntry1.isSymlink ? fs.realpathSync(rootEntry1.absolutePath) : rootEntry1.absolutePath
+ symlinkCache.dir1[symlinkCachePath1] = true
+ }
+ if (rootEntry2 && !loopDetected2) {
+ symlinkCachePath2 = rootEntry2.isSymlink ? fs.realpathSync(rootEntry2.absolutePath) : rootEntry2.absolutePath
+ symlinkCache.dir2[symlinkCachePath2] = true
+ }
+ },
+
+ cloneSymlinkCache: function (symlinkCache) {
+ return {
+ dir1: shallowClone(symlinkCache.dir1),
+ dir2: shallowClone(symlinkCache.dir2)
+ }
+ },
+}
+
+function shallowClone(obj) {
+ var cloned = {}
+ Object.keys(obj).forEach(function (key) {
+ cloned[key] = obj[key]
+ })
+ return cloned
+}
+
diff --git a/node_modules/ecc-jsbn/LICENSE b/node_modules/ecc-jsbn/LICENSE
new file mode 100755
index 0000000..f668fef
--- /dev/null
+++ b/node_modules/ecc-jsbn/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Jeremie Miller
+
+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. \ No newline at end of file
diff --git a/node_modules/ecc-jsbn/README.md b/node_modules/ecc-jsbn/README.md
new file mode 100755
index 0000000..b5d0b9d
--- /dev/null
+++ b/node_modules/ecc-jsbn/README.md
@@ -0,0 +1,8 @@
+ecc-jsbn
+========
+
+ECC package based on [jsbn](https://github.com/andyperlitch/jsbn) from [Tom Wu](http://www-cs-students.stanford.edu/~tjw/).
+
+This is a subset of the same interface as the [node compiled module](https://github.com/quartzjer/ecc), but works in the browser too.
+
+Also uses point compression now from [https://github.com/kaielvin](https://github.com/kaielvin/jsbn-ec-point-compression).
diff --git a/node_modules/ecc-jsbn/index.js b/node_modules/ecc-jsbn/index.js
new file mode 100755
index 0000000..fb19a1d
--- /dev/null
+++ b/node_modules/ecc-jsbn/index.js
@@ -0,0 +1,58 @@
+var crypto = require("crypto");
+var BigInteger = require("jsbn").BigInteger;
+var ECPointFp = require("./lib/ec.js").ECPointFp;
+var Buffer = require("safer-buffer").Buffer;
+exports.ECCurves = require("./lib/sec.js");
+
+// zero prepad
+function unstupid(hex,len)
+{
+ return (hex.length >= len) ? hex : unstupid("0"+hex,len);
+}
+
+exports.ECKey = function(curve, key, isPublic)
+{
+ var priv;
+ var c = curve();
+ var n = c.getN();
+ var bytes = Math.floor(n.bitLength()/8);
+
+ if(key)
+ {
+ if(isPublic)
+ {
+ var curve = c.getCurve();
+// var x = key.slice(1,bytes+1); // skip the 04 for uncompressed format
+// var y = key.slice(bytes+1);
+// this.P = new ECPointFp(curve,
+// curve.fromBigInteger(new BigInteger(x.toString("hex"), 16)),
+// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16)));
+ this.P = curve.decodePointHex(key.toString("hex"));
+ }else{
+ if(key.length != bytes) return false;
+ priv = new BigInteger(key.toString("hex"), 16);
+ }
+ }else{
+ var n1 = n.subtract(BigInteger.ONE);
+ var r = new BigInteger(crypto.randomBytes(n.bitLength()));
+ priv = r.mod(n1).add(BigInteger.ONE);
+ this.P = c.getG().multiply(priv);
+ }
+ if(this.P)
+ {
+// var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2);
+// this.PublicKey = Buffer.from("04"+pubhex,"hex");
+ this.PublicKey = Buffer.from(c.getCurve().encodeCompressedPointHex(this.P),"hex");
+ }
+ if(priv)
+ {
+ this.PrivateKey = Buffer.from(unstupid(priv.toString(16),bytes*2),"hex");
+ this.deriveSharedSecret = function(key)
+ {
+ if(!key || !key.P) return false;
+ var S = key.P.multiply(priv);
+ return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex");
+ }
+ }
+}
+
diff --git a/node_modules/ecc-jsbn/lib/LICENSE-jsbn b/node_modules/ecc-jsbn/lib/LICENSE-jsbn
new file mode 100755
index 0000000..24502a9
--- /dev/null
+++ b/node_modules/ecc-jsbn/lib/LICENSE-jsbn
@@ -0,0 +1,40 @@
+Licensing
+---------
+
+This software is covered under the following copyright:
+
+/*
+ * Copyright (c) 2003-2005 Tom Wu
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
+ * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * In addition, the following condition applies:
+ *
+ * All redistributions must retain an intact copy of this copyright notice
+ * and disclaimer.
+ */
+
+Address all questions regarding this license to:
+
+ Tom Wu
+ tjw@cs.Stanford.EDU
diff --git a/node_modules/ecc-jsbn/lib/ec.js b/node_modules/ecc-jsbn/lib/ec.js
new file mode 100755
index 0000000..3852671
--- /dev/null
+++ b/node_modules/ecc-jsbn/lib/ec.js
@@ -0,0 +1,561 @@
+// Basic Javascript Elliptic Curve implementation
+// Ported loosely from BouncyCastle's Java EC code
+// Only Fp curves implemented for now
+
+// Requires jsbn.js and jsbn2.js
+var BigInteger = require('jsbn').BigInteger
+var Barrett = BigInteger.prototype.Barrett
+
+// ----------------
+// ECFieldElementFp
+
+// constructor
+function ECFieldElementFp(q,x) {
+ this.x = x;
+ // TODO if(x.compareTo(q) >= 0) error
+ this.q = q;
+}
+
+function feFpEquals(other) {
+ if(other == this) return true;
+ return (this.q.equals(other.q) && this.x.equals(other.x));
+}
+
+function feFpToBigInteger() {
+ return this.x;
+}
+
+function feFpNegate() {
+ return new ECFieldElementFp(this.q, this.x.negate().mod(this.q));
+}
+
+function feFpAdd(b) {
+ return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q));
+}
+
+function feFpSubtract(b) {
+ return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q));
+}
+
+function feFpMultiply(b) {
+ return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q));
+}
+
+function feFpSquare() {
+ return new ECFieldElementFp(this.q, this.x.square().mod(this.q));
+}
+
+function feFpDivide(b) {
+ return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q));
+}
+
+ECFieldElementFp.prototype.equals = feFpEquals;
+ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger;
+ECFieldElementFp.prototype.negate = feFpNegate;
+ECFieldElementFp.prototype.add = feFpAdd;
+ECFieldElementFp.prototype.subtract = feFpSubtract;
+ECFieldElementFp.prototype.multiply = feFpMultiply;
+ECFieldElementFp.prototype.square = feFpSquare;
+ECFieldElementFp.prototype.divide = feFpDivide;
+
+// ----------------
+// ECPointFp
+
+// constructor
+function ECPointFp(curve,x,y,z) {
+ this.curve = curve;
+ this.x = x;
+ this.y = y;
+ // Projective coordinates: either zinv == null or z * zinv == 1
+ // z and zinv are just BigIntegers, not fieldElements
+ if(z == null) {
+ this.z = BigInteger.ONE;
+ }
+ else {
+ this.z = z;
+ }
+ this.zinv = null;
+ //TODO: compression flag
+}
+
+function pointFpGetX() {
+ if(this.zinv == null) {
+ this.zinv = this.z.modInverse(this.curve.q);
+ }
+ var r = this.x.toBigInteger().multiply(this.zinv);
+ this.curve.reduce(r);
+ return this.curve.fromBigInteger(r);
+}
+
+function pointFpGetY() {
+ if(this.zinv == null) {
+ this.zinv = this.z.modInverse(this.curve.q);
+ }
+ var r = this.y.toBigInteger().multiply(this.zinv);
+ this.curve.reduce(r);
+ return this.curve.fromBigInteger(r);
+}
+
+function pointFpEquals(other) {
+ if(other == this) return true;
+ if(this.isInfinity()) return other.isInfinity();
+ if(other.isInfinity()) return this.isInfinity();
+ var u, v;
+ // u = Y2 * Z1 - Y1 * Z2
+ u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q);
+ if(!u.equals(BigInteger.ZERO)) return false;
+ // v = X2 * Z1 - X1 * Z2
+ v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q);
+ return v.equals(BigInteger.ZERO);
+}
+
+function pointFpIsInfinity() {
+ if((this.x == null) && (this.y == null)) return true;
+ return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO);
+}
+
+function pointFpNegate() {
+ return new ECPointFp(this.curve, this.x, this.y.negate(), this.z);
+}
+
+function pointFpAdd(b) {
+ if(this.isInfinity()) return b;
+ if(b.isInfinity()) return this;
+
+ // u = Y2 * Z1 - Y1 * Z2
+ var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q);
+ // v = X2 * Z1 - X1 * Z2
+ var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);
+
+ if(BigInteger.ZERO.equals(v)) {
+ if(BigInteger.ZERO.equals(u)) {
+ return this.twice(); // this == b, so double
+ }
+ return this.curve.getInfinity(); // this = -b, so infinity
+ }
+
+ var THREE = new BigInteger("3");
+ var x1 = this.x.toBigInteger();
+ var y1 = this.y.toBigInteger();
+ var x2 = b.x.toBigInteger();
+ var y2 = b.y.toBigInteger();
+
+ var v2 = v.square();
+ var v3 = v2.multiply(v);
+ var x1v2 = x1.multiply(v2);
+ var zu2 = u.square().multiply(this.z);
+
+ // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3)
+ var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q);
+ // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3
+ var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q);
+ // z3 = v^3 * z1 * z2
+ var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q);
+
+ return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
+}
+
+function pointFpTwice() {
+ if(this.isInfinity()) return this;
+ if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();
+
+ // TODO: optimized handling of constants
+ var THREE = new BigInteger("3");
+ var x1 = this.x.toBigInteger();
+ var y1 = this.y.toBigInteger();
+
+ var y1z1 = y1.multiply(this.z);
+ var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q);
+ var a = this.curve.a.toBigInteger();
+
+ // w = 3 * x1^2 + a * z1^2
+ var w = x1.square().multiply(THREE);
+ if(!BigInteger.ZERO.equals(a)) {
+ w = w.add(this.z.square().multiply(a));
+ }
+ w = w.mod(this.curve.q);
+ //this.curve.reduce(w);
+ // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1)
+ var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q);
+ // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3
+ var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q);
+ // z3 = 8 * (y1 * z1)^3
+ var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q);
+
+ return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
+}
+
+// Simple NAF (Non-Adjacent Form) multiplication algorithm
+// TODO: modularize the multiplication algorithm
+function pointFpMultiply(k) {
+ if(this.isInfinity()) return this;
+ if(k.signum() == 0) return this.curve.getInfinity();
+
+ var e = k;
+ var h = e.multiply(new BigInteger("3"));
+
+ var neg = this.negate();
+ var R = this;
+
+ var i;
+ for(i = h.bitLength() - 2; i > 0; --i) {
+ R = R.twice();
+
+ var hBit = h.testBit(i);
+ var eBit = e.testBit(i);
+
+ if (hBit != eBit) {
+ R = R.add(hBit ? this : neg);
+ }
+ }
+
+ return R;
+}
+
+// Compute this*j + x*k (simultaneous multiplication)
+function pointFpMultiplyTwo(j,x,k) {
+ var i;
+ if(j.bitLength() > k.bitLength())
+ i = j.bitLength() - 1;
+ else
+ i = k.bitLength() - 1;
+
+ var R = this.curve.getInfinity();
+ var both = this.add(x);
+ while(i >= 0) {
+ R = R.twice();
+ if(j.testBit(i)) {
+ if(k.testBit(i)) {
+ R = R.add(both);
+ }
+ else {
+ R = R.add(this);
+ }
+ }
+ else {
+ if(k.testBit(i)) {
+ R = R.add(x);
+ }
+ }
+ --i;
+ }
+
+ return R;
+}
+
+ECPointFp.prototype.getX = pointFpGetX;
+ECPointFp.prototype.getY = pointFpGetY;
+ECPointFp.prototype.equals = pointFpEquals;
+ECPointFp.prototype.isInfinity = pointFpIsInfinity;
+ECPointFp.prototype.negate = pointFpNegate;
+ECPointFp.prototype.add = pointFpAdd;
+ECPointFp.prototype.twice = pointFpTwice;
+ECPointFp.prototype.multiply = pointFpMultiply;
+ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo;
+
+// ----------------
+// ECCurveFp
+
+// constructor
+function ECCurveFp(q,a,b) {
+ this.q = q;
+ this.a = this.fromBigInteger(a);
+ this.b = this.fromBigInteger(b);
+ this.infinity = new ECPointFp(this, null, null);
+ this.reducer = new Barrett(this.q);
+}
+
+function curveFpGetQ() {
+ return this.q;
+}
+
+function curveFpGetA() {
+ return this.a;
+}
+
+function curveFpGetB() {
+ return this.b;
+}
+
+function curveFpEquals(other) {
+ if(other == this) return true;
+ return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b));
+}
+
+function curveFpGetInfinity() {
+ return this.infinity;
+}
+
+function curveFpFromBigInteger(x) {
+ return new ECFieldElementFp(this.q, x);
+}
+
+function curveReduce(x) {
+ this.reducer.reduce(x);
+}
+
+// for now, work with hex strings because they're easier in JS
+function curveFpDecodePointHex(s) {
+ switch(parseInt(s.substr(0,2), 16)) { // first byte
+ case 0:
+ return this.infinity;
+ case 2:
+ case 3:
+ // point compression not supported yet
+ return null;
+ case 4:
+ case 6:
+ case 7:
+ var len = (s.length - 2) / 2;
+ var xHex = s.substr(2, len);
+ var yHex = s.substr(len+2, len);
+
+ return new ECPointFp(this,
+ this.fromBigInteger(new BigInteger(xHex, 16)),
+ this.fromBigInteger(new BigInteger(yHex, 16)));
+
+ default: // unsupported
+ return null;
+ }
+}
+
+function curveFpEncodePointHex(p) {
+ if (p.isInfinity()) return "00";
+ var xHex = p.getX().toBigInteger().toString(16);
+ var yHex = p.getY().toBigInteger().toString(16);
+ var oLen = this.getQ().toString(16).length;
+ if ((oLen % 2) != 0) oLen++;
+ while (xHex.length < oLen) {
+ xHex = "0" + xHex;
+ }
+ while (yHex.length < oLen) {
+ yHex = "0" + yHex;
+ }
+ return "04" + xHex + yHex;
+}
+
+ECCurveFp.prototype.getQ = curveFpGetQ;
+ECCurveFp.prototype.getA = curveFpGetA;
+ECCurveFp.prototype.getB = curveFpGetB;
+ECCurveFp.prototype.equals = curveFpEquals;
+ECCurveFp.prototype.getInfinity = curveFpGetInfinity;
+ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger;
+ECCurveFp.prototype.reduce = curveReduce;
+//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex;
+ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex;
+
+// from: https://github.com/kaielvin/jsbn-ec-point-compression
+ECCurveFp.prototype.decodePointHex = function(s)
+{
+ var yIsEven;
+ switch(parseInt(s.substr(0,2), 16)) { // first byte
+ case 0:
+ return this.infinity;
+ case 2:
+ yIsEven = false;
+ case 3:
+ if(yIsEven == undefined) yIsEven = true;
+ var len = s.length - 2;
+ var xHex = s.substr(2, len);
+ var x = this.fromBigInteger(new BigInteger(xHex,16));
+ var alpha = x.multiply(x.square().add(this.getA())).add(this.getB());
+ var beta = alpha.sqrt();
+
+ if (beta == null) throw "Invalid point compression";
+
+ var betaValue = beta.toBigInteger();
+ if (betaValue.testBit(0) != yIsEven)
+ {
+ // Use the other root
+ beta = this.fromBigInteger(this.getQ().subtract(betaValue));
+ }
+ return new ECPointFp(this,x,beta);
+ case 4:
+ case 6:
+ case 7:
+ var len = (s.length - 2) / 2;
+ var xHex = s.substr(2, len);
+ var yHex = s.substr(len+2, len);
+
+ return new ECPointFp(this,
+ this.fromBigInteger(new BigInteger(xHex, 16)),
+ this.fromBigInteger(new BigInteger(yHex, 16)));
+
+ default: // unsupported
+ return null;
+ }
+}
+ECCurveFp.prototype.encodeCompressedPointHex = function(p)
+{
+ if (p.isInfinity()) return "00";
+ var xHex = p.getX().toBigInteger().toString(16);
+ var oLen = this.getQ().toString(16).length;
+ if ((oLen % 2) != 0) oLen++;
+ while (xHex.length < oLen)
+ xHex = "0" + xHex;
+ var yPrefix;
+ if(p.getY().toBigInteger().isEven()) yPrefix = "02";
+ else yPrefix = "03";
+
+ return yPrefix + xHex;
+}
+
+
+ECFieldElementFp.prototype.getR = function()
+{
+ if(this.r != undefined) return this.r;
+
+ this.r = null;
+ var bitLength = this.q.bitLength();
+ if (bitLength > 128)
+ {
+ var firstWord = this.q.shiftRight(bitLength - 64);
+ if (firstWord.intValue() == -1)
+ {
+ this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q);
+ }
+ }
+ return this.r;
+}
+ECFieldElementFp.prototype.modMult = function(x1,x2)
+{
+ return this.modReduce(x1.multiply(x2));
+}
+ECFieldElementFp.prototype.modReduce = function(x)
+{
+ if (this.getR() != null)
+ {
+ var qLen = q.bitLength();
+ while (x.bitLength() > (qLen + 1))
+ {
+ var u = x.shiftRight(qLen);
+ var v = x.subtract(u.shiftLeft(qLen));
+ if (!this.getR().equals(BigInteger.ONE))
+ {
+ u = u.multiply(this.getR());
+ }
+ x = u.add(v);
+ }
+ while (x.compareTo(q) >= 0)
+ {
+ x = x.subtract(q);
+ }
+ }
+ else
+ {
+ x = x.mod(q);
+ }
+ return x;
+}
+ECFieldElementFp.prototype.sqrt = function()
+{
+ if (!this.q.testBit(0)) throw "unsupported";
+
+ // p mod 4 == 3
+ if (this.q.testBit(1))
+ {
+ var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));
+ return z.square().equals(this) ? z : null;
+ }
+
+ // p mod 4 == 1
+ var qMinusOne = this.q.subtract(BigInteger.ONE);
+
+ var legendreExponent = qMinusOne.shiftRight(1);
+ if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE)))
+ {
+ return null;
+ }
+
+ var u = qMinusOne.shiftRight(2);
+ var k = u.shiftLeft(1).add(BigInteger.ONE);
+
+ var Q = this.x;
+ var fourQ = modDouble(modDouble(Q));
+
+ var U, V;
+ do
+ {
+ var P;
+ do
+ {
+ P = new BigInteger(this.q.bitLength(), new SecureRandom());
+ }
+ while (P.compareTo(this.q) >= 0
+ || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne)));
+
+ var result = this.lucasSequence(P, Q, k);
+ U = result[0];
+ V = result[1];
+
+ if (this.modMult(V, V).equals(fourQ))
+ {
+ // Integer division by 2, mod q
+ if (V.testBit(0))
+ {
+ V = V.add(q);
+ }
+
+ V = V.shiftRight(1);
+
+ return new ECFieldElementFp(q,V);
+ }
+ }
+ while (U.equals(BigInteger.ONE) || U.equals(qMinusOne));
+
+ return null;
+}
+ECFieldElementFp.prototype.lucasSequence = function(P,Q,k)
+{
+ var n = k.bitLength();
+ var s = k.getLowestSetBit();
+
+ var Uh = BigInteger.ONE;
+ var Vl = BigInteger.TWO;
+ var Vh = P;
+ var Ql = BigInteger.ONE;
+ var Qh = BigInteger.ONE;
+
+ for (var j = n - 1; j >= s + 1; --j)
+ {
+ Ql = this.modMult(Ql, Qh);
+
+ if (k.testBit(j))
+ {
+ Qh = this.modMult(Ql, Q);
+ Uh = this.modMult(Uh, Vh);
+ Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
+ Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1)));
+ }
+ else
+ {
+ Qh = Ql;
+ Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
+ Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
+ Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
+ }
+ }
+
+ Ql = this.modMult(Ql, Qh);
+ Qh = this.modMult(Ql, Q);
+ Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
+ Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
+ Ql = this.modMult(Ql, Qh);
+
+ for (var j = 1; j <= s; ++j)
+ {
+ Uh = this.modMult(Uh, Vl);
+ Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
+ Ql = this.modMult(Ql, Ql);
+ }
+
+ return [ Uh, Vl ];
+}
+
+var exports = {
+ ECCurveFp: ECCurveFp,
+ ECPointFp: ECPointFp,
+ ECFieldElementFp: ECFieldElementFp
+}
+
+module.exports = exports
diff --git a/node_modules/ecc-jsbn/lib/sec.js b/node_modules/ecc-jsbn/lib/sec.js
new file mode 100755
index 0000000..5eec817
--- /dev/null
+++ b/node_modules/ecc-jsbn/lib/sec.js
@@ -0,0 +1,170 @@
+// Named EC curves
+
+// Requires ec.js, jsbn.js, and jsbn2.js
+var BigInteger = require('jsbn').BigInteger
+var ECCurveFp = require('./ec.js').ECCurveFp
+
+
+// ----------------
+// X9ECParameters
+
+// constructor
+function X9ECParameters(curve,g,n,h) {
+ this.curve = curve;
+ this.g = g;
+ this.n = n;
+ this.h = h;
+}
+
+function x9getCurve() {
+ return this.curve;
+}
+
+function x9getG() {
+ return this.g;
+}
+
+function x9getN() {
+ return this.n;
+}
+
+function x9getH() {
+ return this.h;
+}
+
+X9ECParameters.prototype.getCurve = x9getCurve;
+X9ECParameters.prototype.getG = x9getG;
+X9ECParameters.prototype.getN = x9getN;
+X9ECParameters.prototype.getH = x9getH;
+
+// ----------------
+// SECNamedCurves
+
+function fromHex(s) { return new BigInteger(s, 16); }
+
+function secp128r1() {
+ // p = 2^128 - 2^97 - 1
+ var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");
+ var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");
+ var b = fromHex("E87579C11079F43DD824993C2CEE5ED3");
+ //byte[] S = Hex.decode("000E0D4D696E6768756151750CC03A4473D03679");
+ var n = fromHex("FFFFFFFE0000000075A30D1B9038A115");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "161FF7528B899B2D0C28607CA52C5B86"
+ + "CF5AC8395BAFEB13C02DA292DDED7A83");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp160k1() {
+ // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
+ var a = BigInteger.ZERO;
+ var b = fromHex("7");
+ //byte[] S = null;
+ var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
+ + "938CF935318FDCED6BC28286531733C3F03C4FEE");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp160r1() {
+ // p = 2^160 - 2^31 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");
+ var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");
+ var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");
+ //byte[] S = Hex.decode("1053CDE42C14D696E67687561517533BF3F83345");
+ var n = fromHex("0100000000000000000001F4C8F927AED3CA752257");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "4A96B5688EF573284664698968C38BB913CBFC82"
+ + "23A628553168947D59DCC912042351377AC5FB32");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp192k1() {
+ // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");
+ var a = BigInteger.ZERO;
+ var b = fromHex("3");
+ //byte[] S = null;
+ var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
+ + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp192r1() {
+ // p = 2^192 - 2^64 - 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");
+ var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");
+ var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");
+ //byte[] S = Hex.decode("3045AE6FC8422F64ED579528D38120EAE12196D5");
+ var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"
+ + "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp224r1() {
+ // p = 2^224 - 2^96 + 1
+ var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");
+ var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");
+ var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");
+ //byte[] S = Hex.decode("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5");
+ var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"
+ + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+function secp256r1() {
+ // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1
+ var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");
+ var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");
+ var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");
+ //byte[] S = Hex.decode("C49D360886E704936A6678E1139D26B7819F7E90");
+ var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");
+ var h = BigInteger.ONE;
+ var curve = new ECCurveFp(p, a, b);
+ var G = curve.decodePointHex("04"
+ + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"
+ + "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");
+ return new X9ECParameters(curve, G, n, h);
+}
+
+// TODO: make this into a proper hashtable
+function getSECCurveByName(name) {
+ if(name == "secp128r1") return secp128r1();
+ if(name == "secp160k1") return secp160k1();
+ if(name == "secp160r1") return secp160r1();
+ if(name == "secp192k1") return secp192k1();
+ if(name == "secp192r1") return secp192r1();
+ if(name == "secp224r1") return secp224r1();
+ if(name == "secp256r1") return secp256r1();
+ return null;
+}
+
+module.exports = {
+ "secp128r1":secp128r1,
+ "secp160k1":secp160k1,
+ "secp160r1":secp160r1,
+ "secp192k1":secp192k1,
+ "secp192r1":secp192r1,
+ "secp224r1":secp224r1,
+ "secp256r1":secp256r1
+}
diff --git a/node_modules/ecc-jsbn/package.json b/node_modules/ecc-jsbn/package.json
new file mode 100755
index 0000000..3612fcf
--- /dev/null
+++ b/node_modules/ecc-jsbn/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "ecc-jsbn",
+ "version": "0.1.2",
+ "description": "ECC JS code based on JSBN",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/quartzjer/ecc-jsbn.git"
+ },
+ "keywords": [
+ "jsbn",
+ "ecc",
+ "browserify"
+ ],
+ "author": {
+ "name": "Jeremie Miller",
+ "email": "jeremie@jabber.org",
+ "url": "http://jeremie.com/"
+ },
+ "maintainers": [
+ {
+ "name": "Jeremie Miller",
+ "email": "jeremie@jabber.org",
+ "url": "http://jeremie.com/"
+ },
+ {
+ "name": "Ryan Bennett",
+ "url": "https://github.com/rynomad"
+ }
+ ],
+ "dependencies": {
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.1.0"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/quartzjer/ecc-jsbn/issues"
+ },
+ "homepage": "https://github.com/quartzjer/ecc-jsbn"
+}
diff --git a/node_modules/ecc-jsbn/test.js b/node_modules/ecc-jsbn/test.js
new file mode 100755
index 0000000..bd52abf
--- /dev/null
+++ b/node_modules/ecc-jsbn/test.js
@@ -0,0 +1,14 @@
+var ecc = require("./index.js");
+var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1);
+var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1);
+console.log(key1.deriveSharedSecret(key2));
+var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey);
+var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true);
+console.log(key3.deriveSharedSecret(key4));
+
+var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1);
+var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1);
+console.log(key1.deriveSharedSecret(key2));
+var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey);
+var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true);
+console.log(key3.deriveSharedSecret(key4));
diff --git a/node_modules/electron-download/CODE_OF_CONDUCT.md b/node_modules/electron-download/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..1fa4492
--- /dev/null
+++ b/node_modules/electron-download/CODE_OF_CONDUCT.md
@@ -0,0 +1,5 @@
+# Code of Conduct
+
+This project is a part of the Electron ecosystem. As such, all contributions to this project follow
+[Electron's code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md)
+where appropriate.
diff --git a/node_modules/electron-download/LICENSE b/node_modules/electron-download/LICENSE
new file mode 100644
index 0000000..35fdbc8
--- /dev/null
+++ b/node_modules/electron-download/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, Electron Userland
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/electron-download/collaborators.md b/node_modules/electron-download/collaborators.md
new file mode 100644
index 0000000..fb551a1
--- /dev/null
+++ b/node_modules/electron-download/collaborators.md
@@ -0,0 +1,8 @@
+## Collaborators
+
+electron-download is only possible due to the excellent work of the following collaborators:
+
+<table><tbody><tr><th align="left">maxogden</th><td><a href="https://github.com/maxogden">GitHub/maxogden</a></td></tr>
+<tr><th align="left">mafintosh</th><td><a href="https://github.com/mafintosh">GitHub/mafintosh</a></td></tr>
+<tr><th align="left">fritx</th><td><a href="https://github.com/fritx">GitHub/fritx</a></td></tr>
+</tbody></table>
diff --git a/node_modules/electron-download/lib/arch.js b/node_modules/electron-download/lib/arch.js
new file mode 100644
index 0000000..46a0ed5
--- /dev/null
+++ b/node_modules/electron-download/lib/arch.js
@@ -0,0 +1,30 @@
+'use strict'
+
+const execSync = require('child_process').execSync
+
+module.exports = {
+ host: function host (quiet) {
+ const arch = process.arch
+ if (arch === 'arm') {
+ switch (process.config.variables.arm_version) {
+ case '6':
+ return module.exports.uname()
+ case '7':
+ return 'armv7l'
+ default:
+ if (!quiet) {
+ console.warn(`WARNING: Could not determine specific ARM arch. Detected ARM version: ${JSON.stringify(process.config.variables.arm_version)}`)
+ }
+ }
+ }
+
+ return arch
+ },
+
+ /**
+ * Returns the arch name from the `uname` utility.
+ */
+ uname: function uname () {
+ return execSync('uname -m').toString().trim()
+ }
+}
diff --git a/node_modules/electron-download/lib/cli.js b/node_modules/electron-download/lib/cli.js
new file mode 100755
index 0000000..32e2f12
--- /dev/null
+++ b/node_modules/electron-download/lib/cli.js
@@ -0,0 +1,18 @@
+#!/usr/bin/env node
+
+'use strict'
+
+const download = require('./')
+const minimist = require('minimist')
+
+const opts = minimist(process.argv.slice(2))
+
+if (opts['strict-ssl'] === false) {
+ opts.strictSSL = false
+}
+
+download(opts, (err, zipPath) => {
+ if (err) throw err
+ console.log('Downloaded zip:', zipPath)
+ process.exit(0)
+})
diff --git a/node_modules/electron-download/lib/index.js b/node_modules/electron-download/lib/index.js
new file mode 100644
index 0000000..11c037d
--- /dev/null
+++ b/node_modules/electron-download/lib/index.js
@@ -0,0 +1,336 @@
+'use strict'
+
+const arch = require('./arch')
+const debug = require('debug')('electron-download')
+const envPaths = require('env-paths')
+const fs = require('fs-extra')
+const rc = require('rc')
+const nugget = require('nugget')
+const os = require('os')
+const path = require('path')
+const pathExists = require('path-exists')
+const semver = require('semver')
+const sumchecker = require('sumchecker')
+
+class ElectronDownloader {
+ constructor (opts) {
+ this.opts = Object.assign({ autoDownload: true }, opts)
+ if (this.opts.force && !this.opts.autoDownload) {
+ throw new Error('force and autoDownload options are incompatible for Electron Download')
+ }
+
+ this.npmrc = {}
+ try {
+ rc('npm', this.npmrc)
+ } catch (error) {
+ console.error(`Error reading npm configuration: ${error.message}`)
+ }
+ }
+
+ get baseUrl () {
+ if (this.version.indexOf('nightly') !== -1) {
+ return process.env.NPM_CONFIG_ELECTRON_NIGHTLY_MIRROR ||
+ process.env.npm_config_electron_nightly_mirror ||
+ process.env.npm_package_config_electron_nightly_mirror ||
+ process.env.ELECTRON_NIGHTLY_MIRROR ||
+ this.opts.nightly_mirror ||
+ 'https://github.com/electron/nightlies/releases/download/v'
+ }
+ return process.env.NPM_CONFIG_ELECTRON_MIRROR ||
+ process.env.npm_config_electron_mirror ||
+ process.env.npm_package_config_electron_mirror ||
+ process.env.ELECTRON_MIRROR ||
+ this.opts.mirror ||
+ 'https://github.com/electron/electron/releases/download/v'
+ }
+
+ get middleUrl () {
+ return process.env.NPM_CONFIG_ELECTRON_CUSTOM_DIR ||
+ process.env.npm_config_electron_custom_dir ||
+ process.env.npm_package_config_electron_custom_dir ||
+ process.env.ELECTRON_CUSTOM_DIR ||
+ this.opts.customDir ||
+ this.version
+ }
+
+ get urlSuffix () {
+ return process.env.NPM_CONFIG_ELECTRON_CUSTOM_FILENAME ||
+ process.env.npm_config_electron_custom_filename ||
+ process.env.npm_package_config_electron_custom_filename ||
+ process.env.ELECTRON_CUSTOM_FILENAME ||
+ this.opts.customFilename ||
+ this.filename
+ }
+
+ get arch () {
+ return this.opts.arch || arch.host(this.quiet)
+ }
+
+ get cache () {
+ const cacheLocation = this.opts.cache || process.env.ELECTRON_CACHE
+ if (cacheLocation) return cacheLocation
+
+ const oldCacheDirectory = path.join(os.homedir(), './.electron')
+ if (pathExists.sync(path.join(oldCacheDirectory, this.filename))) {
+ return oldCacheDirectory
+ }
+ // use passed argument or XDG environment variable fallback to OS default
+ return envPaths('electron', {suffix: ''}).cache
+ }
+
+ get cachedChecksum () {
+ return path.join(this.cache, `${this.checksumFilename}-${this.version}`)
+ }
+
+ get cachedZip () {
+ return path.join(this.cache, this.filename)
+ }
+
+ get checksumFilename () {
+ return 'SHASUMS256.txt'
+ }
+
+ get checksumUrl () {
+ return `${this.baseUrl}${this.middleUrl}/${this.checksumFilename}`
+ }
+
+ get filename () {
+ const type = `${this.platform}-${this.arch}`
+ const suffix = `v${this.version}-${type}`
+
+ if (this.chromedriver) {
+ // Chromedriver started using Electron's version in asset name in 1.7.0
+ if (semver.gte(this.version, '1.7.0')) {
+ return `chromedriver-${suffix}.zip`
+ } else {
+ return `chromedriver-v2.21-${type}.zip`
+ }
+ } else if (this.mksnapshot) {
+ return `mksnapshot-${suffix}.zip`
+ } else if (this.ffmpeg) {
+ return `ffmpeg-${suffix}.zip`
+ } else if (this.symbols) {
+ return `electron-${suffix}-symbols.zip`
+ } else if (this.dsym) {
+ return `electron-${suffix}-dsym.zip`
+ } else {
+ return `electron-${suffix}.zip`
+ }
+ }
+
+ get platform () {
+ return this.opts.platform || os.platform()
+ }
+
+ get proxy () {
+ let proxy
+ if (this.npmrc && this.npmrc.proxy) proxy = this.npmrc.proxy
+ if (this.npmrc && this.npmrc['https-proxy']) proxy = this.npmrc['https-proxy']
+
+ return proxy
+ }
+
+ get quiet () {
+ return this.opts.quiet || process.stdout.rows < 1
+ }
+
+ get strictSSL () {
+ let strictSSL = true
+ if (this.opts.strictSSL === false || this.npmrc['strict-ssl'] === false) {
+ strictSSL = false
+ }
+
+ return strictSSL
+ }
+
+ get force () {
+ return this.opts.force || false
+ }
+
+ get symbols () {
+ return this.opts.symbols || false
+ }
+
+ get dsym () {
+ return this.opts.dsym || false
+ }
+
+ get chromedriver () {
+ return this.opts.chromedriver || false
+ }
+
+ get mksnapshot () {
+ return this.opts.mksnapshot || false
+ }
+
+ get ffmpeg () {
+ return this.opts.ffmpeg || false
+ }
+
+ get url () {
+ return process.env.ELECTRON_DOWNLOAD_OVERRIDE_URL ||
+ `${this.baseUrl}${this.middleUrl}/${this.urlSuffix}`
+ }
+
+ get verifyChecksumNeeded () {
+ return !this.opts.disableChecksumSafetyCheck && semver.gte(this.version, '1.3.2')
+ }
+
+ get version () {
+ return this.opts.version
+ }
+
+ get headers () {
+ return this.opts.headers
+ }
+
+ checkForCachedChecksum (cb) {
+ pathExists(this.cachedChecksum)
+ .then(exists => {
+ if (exists && !this.force) {
+ this.verifyChecksum(cb)
+ } else {
+ this.downloadChecksum(cb)
+ }
+ })
+ }
+
+ checkForCachedZip (cb) {
+ pathExists(this.cachedZip).then(exists => {
+ if (exists && !this.force) {
+ debug('zip exists', this.cachedZip)
+ this.checkIfZipNeedsVerifying(cb)
+ } else if (this.opts.autoDownload) {
+ this.ensureCacheDir(cb)
+ } else {
+ cb(new Error(`File: "${this.cachedZip}" does not exist locally and autoDownload is false`))
+ }
+ })
+ }
+
+ checkIfZipNeedsVerifying (cb) {
+ if (this.verifyChecksumNeeded) {
+ debug('Verifying zip with checksum')
+ return this.checkForCachedChecksum(cb)
+ }
+ return cb(null, this.cachedZip)
+ }
+
+ createCacheDir (cb) {
+ fs.mkdirs(this.cache, (err) => {
+ if (err) {
+ if (err.code !== 'EACCES') return cb(err)
+ // try local folder if homedir is off limits (e.g. some linuxes return '/' as homedir)
+ const localCache = path.resolve('./.electron')
+ return fs.mkdirs(localCache, function (err) {
+ if (err) return cb(err)
+ cb(null, localCache)
+ })
+ }
+ cb(null, this.cache)
+ })
+ }
+
+ downloadChecksum (cb) {
+ this.downloadFile(this.checksumUrl, this.cachedChecksum, cb, this.verifyChecksum.bind(this))
+ }
+
+ downloadFile (url, cacheFilename, cb, onSuccess) {
+ const tempFileName = `tmp-${process.pid}-${(ElectronDownloader.tmpFileCounter++).toString(16)}-${path.basename(cacheFilename)}`
+ debug('downloading', url, 'to', this.cache)
+ const nuggetOpts = {
+ target: tempFileName,
+ dir: this.cache,
+ resume: true,
+ quiet: this.quiet,
+ strictSSL: this.strictSSL,
+ proxy: this.proxy,
+ headers: this.headers
+ }
+ nugget(url, nuggetOpts, (errors) => {
+ if (errors) {
+ // nugget returns an array of errors but we only need 1st because we only have 1 url
+ return this.handleDownloadError(cb, errors[0])
+ }
+
+ this.moveFileToCache(tempFileName, cacheFilename, cb, onSuccess)
+ })
+ }
+
+ downloadIfNotCached (cb) {
+ if (!this.version) return cb(new Error('must specify version'))
+ debug('info', {cache: this.cache, filename: this.filename, url: this.url})
+ this.checkForCachedZip(cb)
+ }
+
+ downloadZip (cb) {
+ this.downloadFile(this.url, this.cachedZip, cb, this.checkIfZipNeedsVerifying.bind(this))
+ }
+
+ ensureCacheDir (cb) {
+ debug('creating cache dir')
+ this.createCacheDir((err, actualCache) => {
+ if (err) return cb(err)
+ this.opts.cache = actualCache // in case cache dir changed
+ this.downloadZip(cb)
+ })
+ }
+
+ handleDownloadError (cb, error) {
+ if (error.message.indexOf('404') === -1) return cb(error)
+ if (this.symbols) {
+ error.message = `Failed to find Electron symbols v${this.version} for ${this.platform}-${this.arch} at ${this.url}`
+ } else {
+ error.message = `Failed to find Electron v${this.version} for ${this.platform}-${this.arch} at ${this.url}`
+ }
+
+ return cb(error)
+ }
+
+ moveFileToCache (filename, target, cb, onSuccess) {
+ const cache = this.cache
+ debug('moving', filename, 'from', cache, 'to', target)
+ fs.rename(path.join(cache, filename), target, (err) => {
+ if (err) {
+ fs.unlink(cache, cleanupError => {
+ try {
+ if (cleanupError) {
+ console.error(`Error deleting cache file: ${cleanupError.message}`)
+ }
+ } finally {
+ cb(err)
+ }
+ })
+ } else {
+ onSuccess(cb)
+ }
+ })
+ }
+
+ verifyChecksum (cb) {
+ const options = {}
+ if (semver.lt(this.version, '1.3.5')) {
+ options.defaultTextEncoding = 'binary'
+ }
+ const checker = new sumchecker.ChecksumValidator('sha256', this.cachedChecksum, options)
+ checker.validate(this.cache, this.filename).then(() => {
+ cb(null, this.cachedZip)
+ }, (err) => {
+ fs.unlink(this.cachedZip, (fsErr) => {
+ if (fsErr) return cb(fsErr)
+ cb(err)
+ })
+ })
+ }
+}
+
+ElectronDownloader.tmpFileCounter = 0
+
+module.exports = function download (opts, cb) {
+ try {
+ const downloader = new ElectronDownloader(opts)
+ downloader.downloadIfNotCached(cb)
+ } catch (err) {
+ cb(err)
+ }
+}
diff --git a/node_modules/electron-download/package.json b/node_modules/electron-download/package.json
new file mode 100644
index 0000000..86dc5cb
--- /dev/null
+++ b/node_modules/electron-download/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "electron-download",
+ "version": "4.1.1",
+ "description": "download electron prebuilt binary zips from github releases",
+ "main": "lib/index.js",
+ "bin": {
+ "electron-download": "lib/cli.js"
+ },
+ "scripts": {
+ "lint": "eslint lib test",
+ "unit-tests": "tape test/*.js",
+ "test": "npm run unit-tests && npm run lint"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/electron-userland/electron-download.git"
+ },
+ "author": "max ogden",
+ "license": "BSD-3-Clause",
+ "bugs": {
+ "url": "https://github.com/electron-userland/electron-download/issues"
+ },
+ "homepage": "https://github.com/electron-userland/electron-download#readme",
+ "dependencies": {
+ "debug": "^3.0.0",
+ "env-paths": "^1.0.0",
+ "fs-extra": "^4.0.1",
+ "minimist": "^1.2.0",
+ "nugget": "^2.0.1",
+ "path-exists": "^3.0.0",
+ "rc": "^1.2.1",
+ "semver": "^5.4.1",
+ "sumchecker": "^2.0.2"
+ },
+ "devDependencies": {
+ "eslint": "^4.4.1",
+ "eslint-config-standard": "^10.2.1",
+ "eslint-plugin-import": "^2.7.0",
+ "eslint-plugin-node": "^5.1.1",
+ "eslint-plugin-promise": "^3.5.0",
+ "eslint-plugin-standard": "^3.0.1",
+ "sinon": "^6.1.4",
+ "tape": "^4.8.0",
+ "temp": "^0.8.3"
+ },
+ "eslintConfig": {
+ "extends": "standard",
+ "parserOptions": {
+ "sourceType": "script"
+ },
+ "rules": {
+ "strict": [
+ "error"
+ ],
+ "prefer-const": [
+ "error"
+ ]
+ }
+ },
+ "keywords": [],
+ "engines": {
+ "node": ">= 4.0"
+ }
+}
diff --git a/node_modules/electron-download/readme.md b/node_modules/electron-download/readme.md
new file mode 100644
index 0000000..364cad2
--- /dev/null
+++ b/node_modules/electron-download/readme.md
@@ -0,0 +1,106 @@
+# electron-download
+
+[![Travis Build Status](https://travis-ci.org/electron-userland/electron-download.svg?branch=master)](https://travis-ci.org/electron-userland/electron-download)
+[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/fmfbjmrs42d7bctn/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-download/branch/master)
+
+[![NPM](https://nodei.co/npm/electron-download.png?downloads=true)](https://www.npmjs.com/package/electron-download)
+
+Downloads an Electron release zip from GitHub.
+
+Used by [electron-prebuilt](https://npmjs.org/electron-prebuilt) and [electron-packager](https://npmjs.org/electron-packager)
+
+### Usage
+
+**Note: Requires Node >= 4.0 to run.**
+
+```shell
+$ npm install --global electron-download
+$ electron-download --version=0.31.1
+```
+
+```javascript
+const download = require('electron-download')
+
+download({
+ version: '0.25.1',
+ arch: 'ia32',
+ platform: 'win32',
+ cache: './zips'
+}, function (err, zipPath) {
+ // zipPath will be the path of the zip that it downloaded.
+ // If the zip was already cached it will skip
+ // downloading and call the cb with the cached zip path.
+ // If it wasn't cached it will download the zip and save
+ // it in the cache path.
+})
+```
+
+If you don't specify `arch` or `platform` args it will use the built-in `os` module to get the values from the current OS. Specifying `version` is mandatory. If there is a `SHASUMS256.txt` file available for the `version`, the file downloaded will be validated against its checksum to ensure that it was downloaded without errors.
+
+You can also use `electron-download` to download the `chromedriver`, `ffmpeg`,
+`mksnapshot`, and symbols assets for a specific Electron release. This can be
+configured by setting the `chromedriver`, `ffmpeg`, `mksnapshot`, or
+`symbols` property to `true` in the specified options object. Only one of
+these options may be specified per download call.
+
+You can force a re-download of the asset and the `SHASUM` file by setting the
+`force` option to `true`.
+
+If you would like to override the mirror location, three options are available. The mirror URL is composed as `url = ELECTRON_MIRROR + ELECTRON_CUSTOM_DIR + '/' + ELECTRON_CUSTOM_FILENAME`.
+
+You can set the `ELECTRON_MIRROR` or [`NPM_CONFIG_ELECTRON_MIRROR`](https://docs.npmjs.com/misc/config#environment-variables) environment variable or `mirror` opt variable to use a custom base URL for grabbing Electron zips. The same pattern applies to `ELECTRON_CUSTOM_DIR` and `ELECTRON_CUSTOM_FILENAME`:
+
+```plain
+## Electron Mirror of China
+ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"
+
+## or for a local mirror
+ELECTRON_MIRROR="https://10.1.2.105/"
+ELECTRON_CUSTOM_DIR="our/internal/filePath"
+ELECTRON_CUSTOM_FILENAME="electron.zip"
+```
+
+You can set ELECTRON_MIRROR in `.npmrc` as well, using the lowercase name:
+
+```plain
+electron_mirror=https://10.1.2.105/
+electron_custom_dir="our/internal/filePath"
+electron_custom_filename="electron.zip"
+```
+
+You can also set the same variables in your project's package.json:
+
+```json
+{
+ "name" : "my-electron-project",
+ "config" : {
+ "electron_mirror": "https://10.1.2.105/",
+ "electron_custom_dir": "our/internal/filePath",
+ "electron_custom_filename": "electron.zip"
+ }
+}
+```
+
+The order of precedence is:
+
+1. npm config or .npmrc, uppercase (`process.env.NPM_CONFIG_ELECTRON_*`)
+1. npm config or .npmrc, lowercase(`process.env.npm_config_electron_*`)
+1. package.json (`process.env.npm_package_config_electron_*`)
+1. environment variables (`process.env.ELECTRON_*`)
+1. the options given to `download`
+1. defaults
+
+You can also disable checksum validation if you really want to (this is in
+general a bad idea). Do this by setting `disableChecksumSafetyCheck` to `true`
+in the options object. Use this only when testing local build of Electron,
+if you have internal builds of Electron you should generate the SHASUMS file
+yourself and let `electron-download` still perform its hash validations.
+
+### Cache location
+The location of the cache depends on the operating system, the defaults are:
+- Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`
+- MacOS: `~/Library/Caches/electron/`
+- Windows: `$LOCALAPPDATA/electron/Cache` or `~/AppData/Local/electron/Cache/`
+
+You can set the `ELECTRON_CACHE` environment variable to set cache location explicitly.
+
diff --git a/node_modules/electron-notarize/LICENSE b/node_modules/electron-notarize/LICENSE
new file mode 100644
index 0000000..4e3eb8a
--- /dev/null
+++ b/node_modules/electron-notarize/LICENSE
@@ -0,0 +1,7 @@
+Copyright 2018 Samuel Attard and 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/electron-notarize/README.md b/node_modules/electron-notarize/README.md
new file mode 100644
index 0000000..e4c2db6
--- /dev/null
+++ b/node_modules/electron-notarize/README.md
@@ -0,0 +1,130 @@
+Electron Notarize
+-----------
+
+> Notarize your Electron apps seamlessly for macOS
+
+[![CircleCI status](https://circleci.com/gh/electron/electron-notarize.svg?style=svg)](https://circleci.com/gh/electron/electron-notarize)
+[![NPM package](https://img.shields.io/npm/v/electron-notarize)](https://npm.im/electron-notarize)
+
+## Installation
+
+```bash
+# npm
+npm install electron-notarize --save-dev
+
+# yarn
+yarn add electron-notarize --dev
+```
+
+## What is app "notarization"?
+
+From Apple's docs in XCode:
+
+> A notarized app is a macOS app that was uploaded to Apple for processing before it was distributed. When you export a notarized app from Xcode, it code signs the app with a Developer ID certificate and staples a ticket from Apple to the app. The ticket confirms that you previously uploaded the app to Apple.
+
+> On macOS 10.14 and later, the user can launch notarized apps when Gatekeeper is enabled. When the user first launches a notarized app, Gatekeeper looks for the app’s ticket online. If the user is offline, Gatekeeper looks for the ticket that was stapled to the app.
+
+Apple has made this a hard requirement as of 10.15 (Catalina).
+
+## Prerequisites
+
+For notarization, you need the following things:
+
+1. Xcode 10 or later installed on your Mac.
+2. An [Apple Developer](https://developer.apple.com/) account.
+3. [An app-specific password for your ADC account’s Apple ID](https://support.apple.com/HT204397).
+4. Your app may need to be signed with `hardened-runtime` and the following entitlements:
+ 1. `com.apple.security.cs.allow-jit`
+ 2. `com.apple.security.cs.allow-unsigned-executable-memory`
+
+## API
+
+### Method: `notarize(opts): Promise<void>`
+
+* `options` Object
+ * `tool` String - The notarization tool to use, default is `legacy`. Can be `legacy` or `notarytool`. `notarytool` is substantially (10x) faster.
+ * `appPath` String - The absolute path to your `.app` file
+ * There are different options for each tool: Legacy
+ * `appBundleId` String - The app bundle identifier your Electron app is using. E.g. `com.github.electron`
+ * `ascProvider` String (optional) - Your [Team Short Name](#notes-on-your-team-short-name).
+ * There are two authentication methods available: user name with password:
+ * `appleId` String - The username of your apple developer account
+ * `appleIdPassword` String - The [app-specific password](https://support.apple.com/HT204397) (not your Apple ID password).
+ * ... or apiKey with apiIssuer:
+ * `appleApiKey` String - Required for JWT authentication. See Note on JWT authentication below.
+ * `appleApiIssuer` String - Issuer ID. Required if `appleApiKey` is specified.
+ * ... or Notary Tool
+ * There are three authentication methods available: user name with password:
+ * `appleId` String - The username of your apple developer account
+ * `appleIdPassword` String - The [app-specific password](https://support.apple.com/HT204397) (not your Apple ID password).
+ * `teamId` String - The team ID you want to notarize under.
+ * ... or apiKey with apiIssuer:
+ * `appleApiKey` String - Required for JWT authentication. See Note on JWT authentication below.
+ * `appleApiKeyId` String - Required for JWT authentication. See Note on JWT authentication below.
+ * `appleApiIssuer` String - Issuer ID. Required if `appleApiKey` is specified.
+ * ... or keychain with keychainProfile:
+ * `keychain` String - The name of the keychain or path to the keychain you stored notarization credentials in.
+ * `keychainProfile` String - The name of the profile you provided when storing notarization credentials.
+
+## Safety when using `appleIdPassword`
+
+1. Never hard code your password into your packaging scripts, use an environment
+variable at a minimum.
+2. It is possible to provide a keychain reference instead of your actual password (assuming that you have already logged into
+the Application Loader from Xcode). For example:
+
+```javascript
+const password = `@keychain:"Application Loader: ${appleId}"`;
+```
+
+Another option is that you can add a new keychain item using either the Keychain Access app or from the command line using the `security` utility:
+
+```bash
+security add-generic-password -a "AC_USERNAME" -w <app_specific_password> -s "AC_PASSWORD"
+```
+where `AC_USERNAME` should be replaced with your Apple ID, and then in your code you can use:
+
+```javascript
+const password = `@keychain:AC_PASSWORD`;
+```
+
+## Notes on JWT authentication
+
+You can obtain an API key from [Appstore Connect](https://appstoreconnect.apple.com/access/api). Create a key with _App Manager_ access. Note down the Issuer ID and download the `.p8` file. This file is your API key and comes with the name of `AuthKey_<api_key>.p8`. This is the string you have to supply when calling `notarize`.
+
+Based on the `ApiKey`, `altool` will look in the following places for that file:
+
+* `./private_keys`
+* `~/private_keys`
+* `~/.private_keys`
+* `~/.appstoreconnect/private_keys`
+
+## Notes on your Team Short Name
+
+If you are a member of multiple teams or organizations, you have to tell Apple on behalf of which organization you're uploading. To find your [team's short name](https://forums.developer.apple.com/thread/113798)), you can ask `iTMSTransporter`, which is part of the now deprecated `Application Loader` as well as the newer [`Transporter`](https://apps.apple.com/us/app/transporter/id1450874784?mt=12).
+
+With `Transporter` installed, run:
+```sh
+/Applications/Transporter.app/Contents/itms/bin/iTMSTransporter -m provider -u APPLE_DEV_ACCOUNT -p APP_PASSWORD
+```
+
+Alternatively, with older versions of Xcode, run:
+```sh
+/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u APPLE_DEV_ACCOUNT -p APP_PASSWORD
+```
+## Example Usage
+
+```javascript
+import { notarize } from 'electron-notarize';
+
+async function packageTask () {
+ // Package your app here, and code sign with hardened runtime
+ await notarize({
+ appBundleId,
+ appPath,
+ appleId,
+ appleIdPassword,
+ ascProvider, // This parameter is optional
+ });
+}
+```
diff --git a/node_modules/electron-notarize/lib/helpers.d.ts b/node_modules/electron-notarize/lib/helpers.d.ts
new file mode 100644
index 0000000..774dc2e
--- /dev/null
+++ b/node_modules/electron-notarize/lib/helpers.d.ts
@@ -0,0 +1,13 @@
+export declare function withTempDir<T>(fn: (dir: string) => Promise<T>): Promise<T>;
+export declare function makeSecret(s: string): string;
+export declare function isSecret(s: string): boolean;
+export interface NotarizationInfo {
+ uuid: string;
+ date: Date;
+ status: 'invalid' | 'in progress' | 'success';
+ logFileUrl: string | null;
+ statusCode?: 0 | 2;
+ statusMessage?: string;
+}
+export declare function parseNotarizationInfo(info: string): NotarizationInfo;
+export declare function delay(ms: number): Promise<void>;
diff --git a/node_modules/electron-notarize/lib/helpers.js b/node_modules/electron-notarize/lib/helpers.js
new file mode 100644
index 0000000..27519ab
--- /dev/null
+++ b/node_modules/electron-notarize/lib/helpers.js
@@ -0,0 +1,78 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug = require("debug");
+const fs = require("fs-extra");
+const os = require("os");
+const path = require("path");
+const d = debug('electron-notarize:helpers');
+function withTempDir(fn) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const dir = yield fs.mkdtemp(path.resolve(os.tmpdir(), 'electron-notarize-'));
+ d('doing work inside temp dir:', dir);
+ let result;
+ try {
+ result = yield fn(dir);
+ }
+ catch (err) {
+ d('work failed');
+ yield fs.remove(dir);
+ throw err;
+ }
+ d('work succeeded');
+ yield fs.remove(dir);
+ return result;
+ });
+}
+exports.withTempDir = withTempDir;
+class Secret {
+ constructor(value) {
+ this.value = value;
+ }
+ toString() {
+ return this.value;
+ }
+ inspect() {
+ return '******';
+ }
+}
+function makeSecret(s) {
+ return new Secret(s);
+}
+exports.makeSecret = makeSecret;
+function isSecret(s) {
+ return s instanceof Secret;
+}
+exports.isSecret = isSecret;
+function parseNotarizationInfo(info) {
+ const out = {};
+ const matchToProperty = (key, r, modifier) => {
+ const exec = r.exec(info);
+ if (exec) {
+ out[key] = modifier ? modifier(exec[1]) : exec[1];
+ }
+ };
+ matchToProperty('uuid', /\n *RequestUUID: (.+?)\n/);
+ matchToProperty('date', /\n *Date: (.+?)\n/, d => new Date(d));
+ matchToProperty('status', /\n *Status: (.+?)\n/);
+ matchToProperty('logFileUrl', /\n *LogFileURL: (.+?)\n/);
+ matchToProperty('statusCode', /\n *Status Code: (.+?)\n/, n => parseInt(n, 10));
+ matchToProperty('statusMessage', /\n *Status Message: (.+?)\n/);
+ if (out.logFileUrl === '(null)') {
+ out.logFileUrl = null;
+ }
+ return out;
+}
+exports.parseNotarizationInfo = parseNotarizationInfo;
+function delay(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+}
+exports.delay = delay;
+//# sourceMappingURL=helpers.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/helpers.js.map b/node_modules/electron-notarize/lib/helpers.js.map
new file mode 100644
index 0000000..ed5e9bd
--- /dev/null
+++ b/node_modules/electron-notarize/lib/helpers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+BAA+B;AAC/B,+BAA+B;AAC/B,yBAAyB;AACzB,6BAA6B;AAE7B,MAAM,CAAC,GAAG,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAE7C,SAAsB,WAAW,CAAI,EAA+B;;QAClE,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;QACtC,IAAI,MAAS,CAAC;QACd,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;SACxB;QAAC,OAAO,GAAG,EAAE;YACZ,CAAC,CAAC,aAAa,CAAC,CAAC;YACjB,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACrB,MAAM,GAAG,CAAC;SACX;QACD,CAAC,CAAC,gBAAgB,CAAC,CAAC;QACpB,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AAdD,kCAcC;AAED,MAAM,MAAM;IACV,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAErC,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,OAAO;QACL,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED,SAAgB,UAAU,CAAC,CAAS;IAClC,OAAQ,IAAI,MAAM,CAAC,CAAC,CAAmB,CAAC;AAC1C,CAAC;AAFD,gCAEC;AAED,SAAgB,QAAQ,CAAC,CAAS;IAChC,OAAQ,CAAS,YAAY,MAAM,CAAC;AACtC,CAAC;AAFD,4BAEC;AAYD,SAAgB,qBAAqB,CAAC,IAAY;IAChD,MAAM,GAAG,GAAG,EAAS,CAAC;IACtB,MAAM,eAAe,GAAG,CACtB,GAAM,EACN,CAAS,EACT,QAA6C,EAC7C,EAAE;QACF,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,IAAI,EAAE;YACR,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACnD;IACH,CAAC,CAAC;IACF,eAAe,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACpD,eAAe,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,eAAe,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;IACjD,eAAe,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAC;IACzD,eAAe,CAAC,YAAY,EAAE,0BAA0B,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAQ,CAAC,CAAC;IACvF,eAAe,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC;IAEhE,IAAI,GAAG,CAAC,UAAU,KAAK,QAAQ,EAAE;QAC/B,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC;KACvB;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAxBD,sDAwBC;AAED,SAAgB,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC;AAFD,sBAEC"} \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/index.d.ts b/node_modules/electron-notarize/lib/index.d.ts
new file mode 100644
index 0000000..b013467
--- /dev/null
+++ b/node_modules/electron-notarize/lib/index.d.ts
@@ -0,0 +1,4 @@
+import { NotarizeOptions } from './types';
+export { NotarizeOptions };
+export { validateLegacyAuthorizationArgs as validateAuthorizationArgs } from './validate-args';
+export declare function notarize({ appPath, ...otherOptions }: NotarizeOptions): Promise<void>;
diff --git a/node_modules/electron-notarize/lib/index.js b/node_modules/electron-notarize/lib/index.js
new file mode 100644
index 0000000..9c0a58d
--- /dev/null
+++ b/node_modules/electron-notarize/lib/index.js
@@ -0,0 +1,60 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug = require("debug");
+const helpers_1 = require("./helpers");
+const legacy_1 = require("./legacy");
+const notarytool_1 = require("./notarytool");
+const staple_1 = require("./staple");
+const d = debug('electron-notarize');
+var validate_args_1 = require("./validate-args");
+exports.validateAuthorizationArgs = validate_args_1.validateLegacyAuthorizationArgs;
+function notarize(_a) {
+ var { appPath } = _a, otherOptions = __rest(_a, ["appPath"]);
+ return __awaiter(this, void 0, void 0, function* () {
+ if (otherOptions.tool === 'notarytool') {
+ d('notarizing using the new notarytool system');
+ if (!(yield notarytool_1.isNotaryToolAvailable())) {
+ throw new Error('notarytool is not available, you must be on at least Xcode 13');
+ }
+ yield notarytool_1.notarizeAndWaitForNotaryTool(Object.assign({ appPath }, otherOptions));
+ }
+ else {
+ d('notarizing using the legacy notarization system, this will be slow');
+ const { uuid } = yield legacy_1.startLegacyNotarize(Object.assign({ appPath }, otherOptions));
+ /**
+ * Wait for Apples API to initialize the status UUID
+ *
+ * If we start checking too quickly the UUID is not ready yet
+ * and this step will fail. It takes Apple a number of minutes
+ * to actually complete the job so an extra 10 second delay here
+ * is not a big deal
+ */
+ d('notarization started, waiting for 10 seconds before pinging Apple for status');
+ yield helpers_1.delay(10000);
+ d('starting to poll for notarization status');
+ yield legacy_1.waitForLegacyNotarize(Object.assign({ uuid }, otherOptions));
+ }
+ yield staple_1.stapleApp({ appPath });
+ });
+}
+exports.notarize = notarize;
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/index.js.map b/node_modules/electron-notarize/lib/index.js.map
new file mode 100644
index 0000000..02f0627
--- /dev/null
+++ b/node_modules/electron-notarize/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;AAC/B,uCAAkC;AAClC,qCAAsE;AACtE,6CAAmF;AACnF,qCAAqC;AAGrC,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAIrC,iDAA+F;AAAtF,oDAAA,+BAA+B,CAA6B;AAErE,SAAsB,QAAQ,CAAC,EAA6C;QAA7C,EAAE,OAAO,OAAoC,EAAlC,sCAAe;;QACvD,IAAI,YAAY,CAAC,IAAI,KAAK,YAAY,EAAE;YACtC,CAAC,CAAC,4CAA4C,CAAC,CAAC;YAChD,IAAI,CAAC,CAAC,MAAM,kCAAqB,EAAE,CAAC,EAAE;gBACpC,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;aAClF;YAED,MAAM,yCAA4B,iBAChC,OAAO,IACJ,YAAY,EACf,CAAC;SACJ;aAAM;YACL,CAAC,CAAC,oEAAoE,CAAC,CAAC;YACxE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,4BAAmB,iBACxC,OAAO,IACJ,YAAY,EACf,CAAC;YACH;;;;;;;eAOG;YACH,CAAC,CAAC,8EAA8E,CAAC,CAAC;YAClF,MAAM,eAAK,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC,CAAC,0CAA0C,CAAC,CAAC;YAC9C,MAAM,8BAAqB,iBAAG,IAAI,IAAK,YAAY,EAAG,CAAC;SACxD;QAED,MAAM,kBAAS,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;;CAC9B;AAhCD,4BAgCC"} \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/legacy.d.ts b/node_modules/electron-notarize/lib/legacy.d.ts
new file mode 100644
index 0000000..2534eaa
--- /dev/null
+++ b/node_modules/electron-notarize/lib/legacy.d.ts
@@ -0,0 +1,3 @@
+import { NotarizeResult, LegacyNotarizeStartOptions, LegacyNotarizeWaitOptions } from './types';
+export declare function startLegacyNotarize(opts: LegacyNotarizeStartOptions): Promise<NotarizeResult>;
+export declare function waitForLegacyNotarize(opts: LegacyNotarizeWaitOptions): Promise<void>;
diff --git a/node_modules/electron-notarize/lib/legacy.js b/node_modules/electron-notarize/lib/legacy.js
new file mode 100644
index 0000000..90bdafe
--- /dev/null
+++ b/node_modules/electron-notarize/lib/legacy.js
@@ -0,0 +1,115 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug = require("debug");
+const path = require("path");
+const spawn_1 = require("./spawn");
+const helpers_1 = require("./helpers");
+const validate_args_1 = require("./validate-args");
+const d = debug('electron-notarize:legacy');
+function authorizationArgs(rawOpts) {
+ const opts = validate_args_1.validateLegacyAuthorizationArgs(rawOpts);
+ if (validate_args_1.isLegacyPasswordCredentials(opts)) {
+ return ['-u', helpers_1.makeSecret(opts.appleId), '-p', helpers_1.makeSecret(opts.appleIdPassword)];
+ }
+ else {
+ return [
+ '--apiKey',
+ helpers_1.makeSecret(opts.appleApiKey),
+ '--apiIssuer',
+ helpers_1.makeSecret(opts.appleApiIssuer),
+ ];
+ }
+}
+function startLegacyNotarize(opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ d('starting notarize process for app:', opts.appPath);
+ return yield helpers_1.withTempDir((dir) => __awaiter(this, void 0, void 0, function* () {
+ const zipPath = path.resolve(dir, `${path.basename(opts.appPath, '.app')}.zip`);
+ d('zipping application to:', zipPath);
+ const zipResult = yield spawn_1.spawn('ditto', ['-c', '-k', '--sequesterRsrc', '--keepParent', path.basename(opts.appPath), zipPath], {
+ cwd: path.dirname(opts.appPath),
+ });
+ if (zipResult.code !== 0) {
+ throw new Error(`Failed to zip application, exited with code: ${zipResult.code}\n\n${zipResult.output}`);
+ }
+ d('zip succeeded, attempting to upload to Apple');
+ const notarizeArgs = [
+ 'altool',
+ '--notarize-app',
+ '-f',
+ zipPath,
+ '--primary-bundle-id',
+ opts.appBundleId,
+ ...authorizationArgs(opts),
+ ];
+ if (opts.ascProvider) {
+ notarizeArgs.push('-itc_provider', opts.ascProvider);
+ }
+ const result = yield spawn_1.spawn('xcrun', notarizeArgs);
+ if (result.code !== 0) {
+ throw new Error(`Failed to upload app to Apple's notarization servers\n\n${result.output}`);
+ }
+ d('upload success');
+ const uuidMatch = /\nRequestUUID = (.+?)\n/g.exec(result.output);
+ if (!uuidMatch) {
+ throw new Error(`Failed to find request UUID in output:\n\n${result.output}`);
+ }
+ d('found UUID:', uuidMatch[1]);
+ return {
+ uuid: uuidMatch[1],
+ };
+ }));
+ });
+}
+exports.startLegacyNotarize = startLegacyNotarize;
+function waitForLegacyNotarize(opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ d('checking notarization status:', opts.uuid);
+ const result = yield spawn_1.spawn('xcrun', [
+ 'altool',
+ '--notarization-info',
+ opts.uuid,
+ ...authorizationArgs(opts),
+ ]);
+ if (result.code !== 0) {
+ // These checks could fail for all sorts of reasons, including:
+ // * The status of a request isn't available as soon as the upload request returns, so
+ // it may just not be ready yet.
+ // * If using keychain password, user's mac went to sleep and keychain locked.
+ // * Regular old connectivity failure.
+ d(`Failed to check status of notarization request, retrying in 30 seconds: ${opts.uuid}\n\n${result.output}`);
+ yield helpers_1.delay(30000);
+ return waitForLegacyNotarize(opts);
+ }
+ const notarizationInfo = helpers_1.parseNotarizationInfo(result.output);
+ if (notarizationInfo.status === 'in progress') {
+ d('still in progress, waiting 30 seconds');
+ yield helpers_1.delay(30000);
+ return waitForLegacyNotarize(opts);
+ }
+ d('notarzation done with info:', notarizationInfo);
+ if (notarizationInfo.status === 'invalid') {
+ d('notarization failed');
+ throw new Error(`Apple failed to notarize your application, check the logs for more info
+
+Status Code: ${notarizationInfo.statusCode || 'No Code'}
+Message: ${notarizationInfo.statusMessage || 'No Message'}
+Logs: ${notarizationInfo.logFileUrl}`);
+ }
+ if (notarizationInfo.status !== 'success') {
+ throw new Error(`Unrecognized notarization status: "${notarizationInfo.status}"`);
+ }
+ d('notarization was successful');
+ return;
+ });
+}
+exports.waitForLegacyNotarize = waitForLegacyNotarize;
+//# sourceMappingURL=legacy.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/legacy.js.map b/node_modules/electron-notarize/lib/legacy.js.map
new file mode 100644
index 0000000..1f8a0c0
--- /dev/null
+++ b/node_modules/electron-notarize/lib/legacy.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../src/legacy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+BAA+B;AAC/B,6BAA6B;AAE7B,mCAAgC;AAChC,uCAAkF;AAClF,mDAA+F;AAQ/F,MAAM,CAAC,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAE5C,SAAS,iBAAiB,CAAC,OAAkC;IAC3D,MAAM,IAAI,GAAG,+CAA+B,CAAC,OAAO,CAAC,CAAC;IACtD,IAAI,2CAA2B,CAAC,IAAI,CAAC,EAAE;QACrC,OAAO,CAAC,IAAI,EAAE,oBAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,oBAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;KACjF;SAAM;QACL,OAAO;YACL,UAAU;YACV,oBAAU,CAAC,IAAI,CAAC,WAAW,CAAC;YAC5B,aAAa;YACb,oBAAU,CAAC,IAAI,CAAC,cAAc,CAAC;SAChC,CAAC;KACH;AACH,CAAC;AAED,SAAsB,mBAAmB,CACvC,IAAgC;;QAEhC,CAAC,CAAC,oCAAoC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,MAAM,qBAAW,CAAiB,CAAM,GAAG,EAAC,EAAE;YACnD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;YAChF,CAAC,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;YACtC,MAAM,SAAS,GAAG,MAAM,aAAK,CAC3B,OAAO,EACP,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EACrF;gBACE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;aAChC,CACF,CAAC;YACF,IAAI,SAAS,CAAC,IAAI,KAAK,CAAC,EAAE;gBACxB,MAAM,IAAI,KAAK,CACb,gDAAgD,SAAS,CAAC,IAAI,OAAO,SAAS,CAAC,MAAM,EAAE,CACxF,CAAC;aACH;YACD,CAAC,CAAC,8CAA8C,CAAC,CAAC;YAElD,MAAM,YAAY,GAAG;gBACnB,QAAQ;gBACR,gBAAgB;gBAChB,IAAI;gBACJ,OAAO;gBACP,qBAAqB;gBACrB,IAAI,CAAC,WAAW;gBAChB,GAAG,iBAAiB,CAAC,IAAI,CAAC;aAC3B,CAAC;YAEF,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpB,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;aACtD;YAED,MAAM,MAAM,GAAG,MAAM,aAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YAClD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;gBACrB,MAAM,IAAI,KAAK,CAAC,2DAA2D,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;aAC7F;YACD,CAAC,CAAC,gBAAgB,CAAC,CAAC;YAEpB,MAAM,SAAS,GAAG,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACjE,IAAI,CAAC,SAAS,EAAE;gBACd,MAAM,IAAI,KAAK,CAAC,6CAA6C,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;aAC/E;YAED,CAAC,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAE/B,OAAO;gBACL,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;aACnB,CAAC;QACJ,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;CAAA;AApDD,kDAoDC;AAED,SAAsB,qBAAqB,CAAC,IAA+B;;QACzE,CAAC,CAAC,+BAA+B,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAM,aAAK,CAAC,OAAO,EAAE;YAClC,QAAQ;YACR,qBAAqB;YACrB,IAAI,CAAC,IAAI;YACT,GAAG,iBAAiB,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;YACrB,+DAA+D;YAC/D,uFAAuF;YACvF,mCAAmC;YACnC,+EAA+E;YAC/E,uCAAuC;YACvC,CAAC,CACC,2EAA2E,IAAI,CAAC,IAAI,OAAO,MAAM,CAAC,MAAM,EAAE,CAC3G,CAAC;YACF,MAAM,eAAK,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;SACpC;QACD,MAAM,gBAAgB,GAAG,+BAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE9D,IAAI,gBAAgB,CAAC,MAAM,KAAK,aAAa,EAAE;YAC7C,CAAC,CAAC,uCAAuC,CAAC,CAAC;YAC3C,MAAM,eAAK,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;SACpC;QAED,CAAC,CAAC,6BAA6B,EAAE,gBAAgB,CAAC,CAAC;QAEnD,IAAI,gBAAgB,CAAC,MAAM,KAAK,SAAS,EAAE;YACzC,CAAC,CAAC,qBAAqB,CAAC,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC;;eAEL,gBAAgB,CAAC,UAAU,IAAI,SAAS;WAC5C,gBAAgB,CAAC,aAAa,IAAI,YAAY;QACjD,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC;SACpC;QAED,IAAI,gBAAgB,CAAC,MAAM,KAAK,SAAS,EAAE;YACzC,MAAM,IAAI,KAAK,CAAC,sCAAsC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;SACnF;QAED,CAAC,CAAC,6BAA6B,CAAC,CAAC;QACjC,OAAO;IACT,CAAC;CAAA;AA7CD,sDA6CC"} \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/notarytool.d.ts b/node_modules/electron-notarize/lib/notarytool.d.ts
new file mode 100644
index 0000000..7eab59d
--- /dev/null
+++ b/node_modules/electron-notarize/lib/notarytool.d.ts
@@ -0,0 +1,3 @@
+import { NotaryToolStartOptions } from './types';
+export declare function isNotaryToolAvailable(): Promise<boolean>;
+export declare function notarizeAndWaitForNotaryTool(opts: NotaryToolStartOptions): Promise<void>;
diff --git a/node_modules/electron-notarize/lib/notarytool.js b/node_modules/electron-notarize/lib/notarytool.js
new file mode 100644
index 0000000..ed59c82
--- /dev/null
+++ b/node_modules/electron-notarize/lib/notarytool.js
@@ -0,0 +1,100 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug = require("debug");
+const path = require("path");
+const spawn_1 = require("./spawn");
+const helpers_1 = require("./helpers");
+const validate_args_1 = require("./validate-args");
+const d = debug('electron-notarize:notarytool');
+function authorizationArgs(rawOpts) {
+ const opts = validate_args_1.validateNotaryToolAuthorizationArgs(rawOpts);
+ if (validate_args_1.isNotaryToolPasswordCredentials(opts)) {
+ return [
+ '--apple-id',
+ helpers_1.makeSecret(opts.appleId),
+ '--password',
+ helpers_1.makeSecret(opts.appleIdPassword),
+ '--team-id',
+ helpers_1.makeSecret(opts.teamId),
+ ];
+ }
+ else if (validate_args_1.isNotaryToolApiKeyCredentials(opts)) {
+ return [
+ '--key',
+ helpers_1.makeSecret(opts.appleApiKey),
+ '--key-id',
+ helpers_1.makeSecret(opts.appleApiKeyId),
+ '--issuer',
+ helpers_1.makeSecret(opts.appleApiIssuer),
+ ];
+ }
+ else {
+ // --keychain is optional -- when not specified, the iCloud keychain is used by notarytool
+ if (opts.keychain) {
+ return ['--keychain', opts.keychain, '--keychain-profile', opts.keychainProfile];
+ }
+ return ['--keychain-profile', opts.keychainProfile];
+ }
+}
+function isNotaryToolAvailable() {
+ return __awaiter(this, void 0, void 0, function* () {
+ const result = yield spawn_1.spawn('xcrun', ['--find', 'notarytool']);
+ return result.code === 0;
+ });
+}
+exports.isNotaryToolAvailable = isNotaryToolAvailable;
+function notarizeAndWaitForNotaryTool(opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ d('starting notarize process for app:', opts.appPath);
+ return yield helpers_1.withTempDir((dir) => __awaiter(this, void 0, void 0, function* () {
+ const zipPath = path.resolve(dir, `${path.parse(opts.appPath).name}.zip`);
+ d('zipping application to:', zipPath);
+ const zipResult = yield spawn_1.spawn('ditto', ['-c', '-k', '--sequesterRsrc', '--keepParent', path.basename(opts.appPath), zipPath], {
+ cwd: path.dirname(opts.appPath),
+ });
+ if (zipResult.code !== 0) {
+ throw new Error(`Failed to zip application, exited with code: ${zipResult.code}\n\n${zipResult.output}`);
+ }
+ d('zip succeeded, attempting to upload to Apple');
+ const notarizeArgs = [
+ 'notarytool',
+ 'submit',
+ zipPath,
+ ...authorizationArgs(opts),
+ '--wait',
+ '--output-format',
+ 'json',
+ ];
+ const result = yield spawn_1.spawn('xcrun', notarizeArgs);
+ if (result.code !== 0) {
+ try {
+ const parsed = JSON.parse(result.output.trim());
+ if (parsed && parsed.id) {
+ const logResult = yield spawn_1.spawn('xcrun', [
+ 'notarytool',
+ 'log',
+ parsed.id,
+ ...authorizationArgs(opts),
+ ]);
+ d('notarization log', logResult.output);
+ }
+ }
+ catch (e) {
+ d('failed to pull notarization logs', e);
+ }
+ throw new Error(`Failed to notarize via notarytool\n\n${result.output}`);
+ }
+ d('notarization success');
+ }));
+ });
+}
+exports.notarizeAndWaitForNotaryTool = notarizeAndWaitForNotaryTool;
+//# sourceMappingURL=notarytool.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/notarytool.js.map b/node_modules/electron-notarize/lib/notarytool.js.map
new file mode 100644
index 0000000..5f086a1
--- /dev/null
+++ b/node_modules/electron-notarize/lib/notarytool.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"notarytool.js","sourceRoot":"","sources":["../src/notarytool.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+BAA+B;AAC/B,6BAA6B;AAE7B,mCAAgC;AAChC,uCAAoD;AACpD,mDAIyB;AAGzB,MAAM,CAAC,GAAG,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAEhD,SAAS,iBAAiB,CAAC,OAA8B;IACvD,MAAM,IAAI,GAAG,mDAAmC,CAAC,OAAO,CAAC,CAAC;IAC1D,IAAI,+CAA+B,CAAC,IAAI,CAAC,EAAE;QACzC,OAAO;YACL,YAAY;YACZ,oBAAU,CAAC,IAAI,CAAC,OAAO,CAAC;YACxB,YAAY;YACZ,oBAAU,CAAC,IAAI,CAAC,eAAe,CAAC;YAChC,WAAW;YACX,oBAAU,CAAC,IAAI,CAAC,MAAM,CAAC;SACxB,CAAC;KACH;SAAM,IAAI,6CAA6B,CAAC,IAAI,CAAC,EAAE;QAC9C,OAAO;YACL,OAAO;YACP,oBAAU,CAAC,IAAI,CAAC,WAAW,CAAC;YAC5B,UAAU;YACV,oBAAU,CAAC,IAAI,CAAC,aAAa,CAAC;YAC9B,UAAU;YACV,oBAAU,CAAC,IAAI,CAAC,cAAc,CAAC;SAChC,CAAC;KACH;SAAM;QACL,0FAA0F;QAC1F,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,EAAE,oBAAoB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;SAClF;QACD,OAAO,CAAC,oBAAoB,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;KACrD;AACH,CAAC;AAED,SAAsB,qBAAqB;;QACzC,MAAM,MAAM,GAAG,MAAM,aAAK,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;QAC9D,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC;IAC3B,CAAC;CAAA;AAHD,sDAGC;AAED,SAAsB,4BAA4B,CAAC,IAA4B;;QAC7E,CAAC,CAAC,oCAAoC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,MAAM,qBAAW,CAAC,CAAM,GAAG,EAAC,EAAE;YACnC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;YAC1E,CAAC,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;YACtC,MAAM,SAAS,GAAG,MAAM,aAAK,CAC3B,OAAO,EACP,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EACrF;gBACE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;aAChC,CACF,CAAC;YACF,IAAI,SAAS,CAAC,IAAI,KAAK,CAAC,EAAE;gBACxB,MAAM,IAAI,KAAK,CACb,gDAAgD,SAAS,CAAC,IAAI,OAAO,SAAS,CAAC,MAAM,EAAE,CACxF,CAAC;aACH;YACD,CAAC,CAAC,8CAA8C,CAAC,CAAC;YAElD,MAAM,YAAY,GAAG;gBACnB,YAAY;gBACZ,QAAQ;gBACR,OAAO;gBACP,GAAG,iBAAiB,CAAC,IAAI,CAAC;gBAC1B,QAAQ;gBACR,iBAAiB;gBACjB,MAAM;aACP,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,aAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YAElD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;gBACrB,IAAI;oBACF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;oBAChD,IAAI,MAAM,IAAI,MAAM,CAAC,EAAE,EAAE;wBACvB,MAAM,SAAS,GAAG,MAAM,aAAK,CAAC,OAAO,EAAE;4BACrC,YAAY;4BACZ,KAAK;4BACL,MAAM,CAAC,EAAE;4BACT,GAAG,iBAAiB,CAAC,IAAI,CAAC;yBAC3B,CAAC,CAAC;wBACH,CAAC,CAAC,kBAAkB,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;qBACzC;iBACF;gBAAC,OAAO,CAAC,EAAE;oBACV,CAAC,CAAC,kCAAkC,EAAE,CAAC,CAAC,CAAC;iBAC1C;gBACD,MAAM,IAAI,KAAK,CAAC,wCAAwC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;aAC1E;YACD,CAAC,CAAC,sBAAsB,CAAC,CAAC;QAC5B,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;CAAA;AAlDD,oEAkDC"} \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/spawn.d.ts b/node_modules/electron-notarize/lib/spawn.d.ts
new file mode 100644
index 0000000..df894c1
--- /dev/null
+++ b/node_modules/electron-notarize/lib/spawn.d.ts
@@ -0,0 +1,7 @@
+/// <reference types="node" />
+import { SpawnOptions } from 'child_process';
+export interface SpawnResult {
+ code: number | null;
+ output: string;
+}
+export declare const spawn: (cmd: string, args?: string[], opts?: SpawnOptions) => Promise<SpawnResult>;
diff --git a/node_modules/electron-notarize/lib/spawn.js b/node_modules/electron-notarize/lib/spawn.js
new file mode 100644
index 0000000..505e34a
--- /dev/null
+++ b/node_modules/electron-notarize/lib/spawn.js
@@ -0,0 +1,23 @@
+Object.defineProperty(exports, "__esModule", { value: true });
+const child_process_1 = require("child_process");
+const debug = require("debug");
+const helpers_1 = require("./helpers");
+const d = debug('electron-notarize:spawn');
+exports.spawn = (cmd, args = [], opts = {}) => {
+ d('spawning cmd:', cmd, 'args:', args.map(arg => (helpers_1.isSecret(arg) ? '*********' : arg)), 'opts:', opts);
+ const child = child_process_1.spawn(cmd, args, opts);
+ const out = [];
+ const dataHandler = (data) => out.push(data.toString());
+ child.stdout.on('data', dataHandler);
+ child.stderr.on('data', dataHandler);
+ return new Promise(resolve => {
+ child.on('exit', code => {
+ d(`cmd ${cmd} terminated with code: ${code}`);
+ resolve({
+ code,
+ output: out.join(''),
+ });
+ });
+ });
+};
+//# sourceMappingURL=spawn.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/spawn.js.map b/node_modules/electron-notarize/lib/spawn.js.map
new file mode 100644
index 0000000..b9be838
--- /dev/null
+++ b/node_modules/electron-notarize/lib/spawn.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"spawn.js","sourceRoot":"","sources":["../src/spawn.ts"],"names":[],"mappings":";AAAA,iDAA+D;AAC/D,+BAA+B;AAC/B,uCAAqC;AAErC,MAAM,CAAC,GAAG,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAO9B,QAAA,KAAK,GAAG,CACnB,GAAW,EACX,OAAiB,EAAE,EACnB,OAAqB,EAAE,EACD,EAAE;IACxB,CAAC,CACC,eAAe,EACf,GAAG,EACH,OAAO,EACP,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,kBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EACpD,OAAO,EACP,IAAI,CACL,CAAC;IACF,MAAM,KAAK,GAAG,qBAAO,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACvC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChE,KAAK,CAAC,MAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACtC,KAAK,CAAC,MAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACtC,OAAO,IAAI,OAAO,CAAc,OAAO,CAAC,EAAE;QACxC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;YACtB,CAAC,CAAC,OAAO,GAAG,0BAA0B,IAAI,EAAE,CAAC,CAAC;YAC9C,OAAO,CAAC;gBACN,IAAI;gBACJ,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;aACrB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/staple.d.ts b/node_modules/electron-notarize/lib/staple.d.ts
new file mode 100644
index 0000000..e507c1e
--- /dev/null
+++ b/node_modules/electron-notarize/lib/staple.d.ts
@@ -0,0 +1,2 @@
+import { NotarizeStapleOptions } from './types';
+export declare function stapleApp(opts: NotarizeStapleOptions): Promise<void>;
diff --git a/node_modules/electron-notarize/lib/staple.js b/node_modules/electron-notarize/lib/staple.js
new file mode 100644
index 0000000..d89a944
--- /dev/null
+++ b/node_modules/electron-notarize/lib/staple.js
@@ -0,0 +1,29 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug = require("debug");
+const path = require("path");
+const spawn_1 = require("./spawn");
+const d = debug('electron-notarize:staple');
+function stapleApp(opts) {
+ return __awaiter(this, void 0, void 0, function* () {
+ d('attempting to staple app:', opts.appPath);
+ const result = yield spawn_1.spawn('xcrun', ['stapler', 'staple', '-v', path.basename(opts.appPath)], {
+ cwd: path.dirname(opts.appPath),
+ });
+ if (result.code !== 0) {
+ throw new Error(`Failed to staple your application with code: ${result.code}\n\n${result.output}`);
+ }
+ d('staple succeeded');
+ return;
+ });
+}
+exports.stapleApp = stapleApp;
+//# sourceMappingURL=staple.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/staple.js.map b/node_modules/electron-notarize/lib/staple.js.map
new file mode 100644
index 0000000..85a699e
--- /dev/null
+++ b/node_modules/electron-notarize/lib/staple.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"staple.js","sourceRoot":"","sources":["../src/staple.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+BAA+B;AAC/B,6BAA6B;AAE7B,mCAAgC;AAGhC,MAAM,CAAC,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAE5C,SAAsB,SAAS,CAAC,IAA2B;;QACzD,CAAC,CAAC,2BAA2B,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,MAAM,aAAK,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE;YAC5F,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;SAChC,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;YACrB,MAAM,IAAI,KAAK,CACb,gDAAgD,MAAM,CAAC,IAAI,OAAO,MAAM,CAAC,MAAM,EAAE,CAClF,CAAC;SACH;QAED,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACtB,OAAO;IACT,CAAC;CAAA;AAdD,8BAcC"} \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/types.d.ts b/node_modules/electron-notarize/lib/types.d.ts
new file mode 100644
index 0000000..5a9d6d0
--- /dev/null
+++ b/node_modules/electron-notarize/lib/types.d.ts
@@ -0,0 +1,47 @@
+export interface LegacyNotarizePasswordCredentials {
+ appleId: string;
+ appleIdPassword: string;
+}
+export interface NotaryToolPasswordCredentials {
+ appleId: string;
+ appleIdPassword: string;
+ teamId: string;
+}
+export interface LegacyNotarizeApiKeyCredentials {
+ appleApiKey: string;
+ appleApiIssuer: string;
+}
+export interface NotaryToolApiKeyCredentials {
+ appleApiKey: string;
+ appleApiKeyId: string;
+ appleApiIssuer: string;
+}
+export interface NotaryToolKeychainCredentials {
+ keychainProfile: string;
+ keychain?: string;
+}
+export declare type LegacyNotarizeCredentials = LegacyNotarizePasswordCredentials | LegacyNotarizeApiKeyCredentials;
+export declare type NotaryToolCredentials = NotaryToolPasswordCredentials | NotaryToolApiKeyCredentials | NotaryToolKeychainCredentials;
+export declare type NotarizeCredentials = LegacyNotarizeCredentials | NotaryToolCredentials;
+export interface LegacyNotarizeAppOptions {
+ appPath: string;
+ appBundleId: string;
+}
+export interface NotaryToolNotarizeAppOptions {
+ appPath: string;
+}
+export interface TransporterOptions {
+ ascProvider?: string;
+}
+export interface NotarizeResult {
+ uuid: string;
+}
+export declare type LegacyNotarizeStartOptions = LegacyNotarizeAppOptions & LegacyNotarizeCredentials & TransporterOptions;
+export declare type NotaryToolStartOptions = NotaryToolNotarizeAppOptions & NotaryToolCredentials;
+export declare type LegacyNotarizeWaitOptions = NotarizeResult & LegacyNotarizeCredentials;
+export declare type NotarizeStapleOptions = Pick<LegacyNotarizeAppOptions, 'appPath'>;
+export declare type NotarizeOptions = ({
+ tool?: 'legacy';
+} & LegacyNotarizeStartOptions) | ({
+ tool: 'notarytool';
+} & NotaryToolStartOptions);
diff --git a/node_modules/electron-notarize/lib/types.js b/node_modules/electron-notarize/lib/types.js
new file mode 100644
index 0000000..5fb9015
--- /dev/null
+++ b/node_modules/electron-notarize/lib/types.js
@@ -0,0 +1,2 @@
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/types.js.map b/node_modules/electron-notarize/lib/types.js.map
new file mode 100644
index 0000000..c768b79
--- /dev/null
+++ b/node_modules/electron-notarize/lib/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/validate-args.d.ts b/node_modules/electron-notarize/lib/validate-args.d.ts
new file mode 100644
index 0000000..20b815b
--- /dev/null
+++ b/node_modules/electron-notarize/lib/validate-args.d.ts
@@ -0,0 +1,8 @@
+import { LegacyNotarizeApiKeyCredentials, LegacyNotarizeCredentials, LegacyNotarizePasswordCredentials, NotaryToolApiKeyCredentials, NotaryToolCredentials, NotaryToolKeychainCredentials, NotaryToolPasswordCredentials } from './types';
+export declare function isLegacyPasswordCredentials(opts: LegacyNotarizeCredentials): opts is LegacyNotarizePasswordCredentials;
+export declare function isLegacyApiKeyCredentials(opts: LegacyNotarizeCredentials): opts is LegacyNotarizeApiKeyCredentials;
+export declare function validateLegacyAuthorizationArgs(opts: LegacyNotarizeCredentials): LegacyNotarizeCredentials;
+export declare function isNotaryToolPasswordCredentials(opts: NotaryToolCredentials): opts is NotaryToolPasswordCredentials;
+export declare function isNotaryToolApiKeyCredentials(opts: NotaryToolCredentials): opts is NotaryToolApiKeyCredentials;
+export declare function isNotaryToolKeychainCredentials(opts: NotaryToolCredentials): opts is NotaryToolKeychainCredentials;
+export declare function validateNotaryToolAuthorizationArgs(opts: NotaryToolCredentials): NotaryToolCredentials;
diff --git a/node_modules/electron-notarize/lib/validate-args.js b/node_modules/electron-notarize/lib/validate-args.js
new file mode 100644
index 0000000..9a72caf
--- /dev/null
+++ b/node_modules/electron-notarize/lib/validate-args.js
@@ -0,0 +1,101 @@
+Object.defineProperty(exports, "__esModule", { value: true });
+function isLegacyPasswordCredentials(opts) {
+ const creds = opts;
+ return creds.appleId !== undefined || creds.appleIdPassword !== undefined;
+}
+exports.isLegacyPasswordCredentials = isLegacyPasswordCredentials;
+function isLegacyApiKeyCredentials(opts) {
+ const creds = opts;
+ return creds.appleApiKey !== undefined || creds.appleApiIssuer !== undefined;
+}
+exports.isLegacyApiKeyCredentials = isLegacyApiKeyCredentials;
+function validateLegacyAuthorizationArgs(opts) {
+ const isPassword = isLegacyPasswordCredentials(opts);
+ const isApiKey = isLegacyApiKeyCredentials(opts);
+ if (isPassword && isApiKey) {
+ throw new Error('Cannot use both password credentials and API key credentials at once');
+ }
+ if (isPassword) {
+ const passwordCreds = opts;
+ if (!passwordCreds.appleId) {
+ throw new Error('The appleId property is required when using notarization with appleIdPassword');
+ }
+ else if (!passwordCreds.appleIdPassword) {
+ throw new Error('The appleIdPassword property is required when using notarization with appleId');
+ }
+ return passwordCreds;
+ }
+ if (isApiKey) {
+ const apiKeyCreds = opts;
+ if (!apiKeyCreds.appleApiKey) {
+ throw new Error('The appleApiKey property is required when using notarization with appleApiIssuer');
+ }
+ else if (!apiKeyCreds.appleApiIssuer) {
+ throw new Error('The appleApiIssuer property is required when using notarization with appleApiKey');
+ }
+ return apiKeyCreds;
+ }
+ throw new Error('No authentication properties provided (e.g. appleId, appleApiKey)');
+}
+exports.validateLegacyAuthorizationArgs = validateLegacyAuthorizationArgs;
+function isNotaryToolPasswordCredentials(opts) {
+ const creds = opts;
+ return (creds.appleId !== undefined || creds.appleIdPassword !== undefined || creds.teamId !== undefined);
+}
+exports.isNotaryToolPasswordCredentials = isNotaryToolPasswordCredentials;
+function isNotaryToolApiKeyCredentials(opts) {
+ const creds = opts;
+ return (creds.appleApiIssuer !== undefined ||
+ creds.appleApiKey !== undefined ||
+ creds.appleApiKeyId !== undefined);
+}
+exports.isNotaryToolApiKeyCredentials = isNotaryToolApiKeyCredentials;
+function isNotaryToolKeychainCredentials(opts) {
+ const creds = opts;
+ return creds.keychain !== undefined || creds.keychainProfile !== undefined;
+}
+exports.isNotaryToolKeychainCredentials = isNotaryToolKeychainCredentials;
+function validateNotaryToolAuthorizationArgs(opts) {
+ const isPassword = isNotaryToolPasswordCredentials(opts);
+ const isApiKey = isNotaryToolApiKeyCredentials(opts);
+ const isKeychain = isNotaryToolKeychainCredentials(opts);
+ if ((isPassword ? 1 : 0) + (isApiKey ? 1 : 0) + (isKeychain ? 1 : 0) > 1) {
+ throw new Error('Cannot use password credentials, API key credentials and keychain credentials at once');
+ }
+ if (isPassword) {
+ const passwordCreds = opts;
+ if (!passwordCreds.appleId) {
+ throw new Error('The appleId property is required when using notarization with password credentials');
+ }
+ else if (!passwordCreds.appleIdPassword) {
+ throw new Error('The appleIdPassword property is required when using notarization with password credentials');
+ }
+ else if (!passwordCreds.teamId) {
+ throw new Error('The teamId property is required when using notarization with password credentials');
+ }
+ return passwordCreds;
+ }
+ if (isApiKey) {
+ const apiKeyCreds = opts;
+ if (!apiKeyCreds.appleApiKey) {
+ throw new Error('The appleApiKey property is required when using notarization with ASC credentials');
+ }
+ else if (!apiKeyCreds.appleApiIssuer) {
+ throw new Error('The appleApiIssuer property is required when using notarization with ASC credentials');
+ }
+ else if (!apiKeyCreds.appleApiKeyId) {
+ throw new Error('The appleApiKeyId property is required when using notarization with ASC credentials');
+ }
+ return apiKeyCreds;
+ }
+ if (isKeychain) {
+ const keychainCreds = opts;
+ if (!keychainCreds.keychainProfile) {
+ throw new Error('The keychainProfile property is required when using notarization with keychain credentials');
+ }
+ return keychainCreds;
+ }
+ throw new Error('No authentication properties provided (e.g. appleId, appleApiKey, keychain)');
+}
+exports.validateNotaryToolAuthorizationArgs = validateNotaryToolAuthorizationArgs;
+//# sourceMappingURL=validate-args.js.map \ No newline at end of file
diff --git a/node_modules/electron-notarize/lib/validate-args.js.map b/node_modules/electron-notarize/lib/validate-args.js.map
new file mode 100644
index 0000000..0e1b3e1
--- /dev/null
+++ b/node_modules/electron-notarize/lib/validate-args.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"validate-args.js","sourceRoot":"","sources":["../src/validate-args.ts"],"names":[],"mappings":";AAUA,SAAgB,2BAA2B,CACzC,IAA+B;IAE/B,MAAM,KAAK,GAAG,IAAyC,CAAC;IACxD,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,eAAe,KAAK,SAAS,CAAC;AAC5E,CAAC;AALD,kEAKC;AAED,SAAgB,yBAAyB,CACvC,IAA+B;IAE/B,MAAM,KAAK,GAAG,IAAuC,CAAC;IACtD,OAAO,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,KAAK,CAAC,cAAc,KAAK,SAAS,CAAC;AAC/E,CAAC;AALD,8DAKC;AAED,SAAgB,+BAA+B,CAC7C,IAA+B;IAE/B,MAAM,UAAU,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,UAAU,IAAI,QAAQ,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;KACzF;IACD,IAAI,UAAU,EAAE;QACd,MAAM,aAAa,GAAG,IAAyC,CAAC;QAChE,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;SACH;aAAM,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE;YACzC,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;SACH;QACD,OAAO,aAAa,CAAC;KACtB;IACD,IAAI,QAAQ,EAAE;QACZ,MAAM,WAAW,GAAG,IAAuC,CAAC;QAC5D,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;YAC5B,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;SACH;aAAM,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;YACtC,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;SACH;QACD,OAAO,WAAW,CAAC;KACpB;IACD,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;AACvF,CAAC;AAnCD,0EAmCC;AAED,SAAgB,+BAA+B,CAC7C,IAA2B;IAE3B,MAAM,KAAK,GAAG,IAAqC,CAAC;IACpD,OAAO,CACL,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,eAAe,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CACjG,CAAC;AACJ,CAAC;AAPD,0EAOC;AAED,SAAgB,6BAA6B,CAC3C,IAA2B;IAE3B,MAAM,KAAK,GAAG,IAAmC,CAAC;IAClD,OAAO,CACL,KAAK,CAAC,cAAc,KAAK,SAAS;QAClC,KAAK,CAAC,WAAW,KAAK,SAAS;QAC/B,KAAK,CAAC,aAAa,KAAK,SAAS,CAClC,CAAC;AACJ,CAAC;AATD,sEASC;AAED,SAAgB,+BAA+B,CAC7C,IAA2B;IAE3B,MAAM,KAAK,GAAG,IAAqC,CAAC;IACpD,OAAO,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,eAAe,KAAK,SAAS,CAAC;AAC7E,CAAC;AALD,0EAKC;AAED,SAAgB,mCAAmC,CACjD,IAA2B;IAE3B,MAAM,UAAU,GAAG,+BAA+B,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,6BAA6B,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,+BAA+B,CAAC,IAAI,CAAC,CAAC;IACzD,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;QACxE,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;KACH;IACD,IAAI,UAAU,EAAE;QACd,MAAM,aAAa,GAAG,IAAqC,CAAC;QAC5D,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,oFAAoF,CACrF,CAAC;SACH;aAAM,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE;YACzC,MAAM,IAAI,KAAK,CACb,4FAA4F,CAC7F,CAAC;SACH;aAAM,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;YAChC,MAAM,IAAI,KAAK,CACb,mFAAmF,CACpF,CAAC;SACH;QACD,OAAO,aAAa,CAAC;KACtB;IACD,IAAI,QAAQ,EAAE;QACZ,MAAM,WAAW,GAAG,IAAmC,CAAC;QACxD,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;YAC5B,MAAM,IAAI,KAAK,CACb,mFAAmF,CACpF,CAAC;SACH;aAAM,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;YACtC,MAAM,IAAI,KAAK,CACb,sFAAsF,CACvF,CAAC;SACH;aAAM,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;YACrC,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAC;SACH;QACD,OAAO,WAAW,CAAC;KACpB;IACD,IAAI,UAAU,EAAE;QACd,MAAM,aAAa,GAAG,IAAqC,CAAC;QAC5D,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE;YAClC,MAAM,IAAI,KAAK,CACb,4FAA4F,CAC7F,CAAC;SACH;QACD,OAAO,aAAa,CAAC;KACtB;IACD,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;AACjG,CAAC;AAvDD,kFAuDC"} \ No newline at end of file
diff --git a/node_modules/electron-notarize/node_modules/debug/LICENSE b/node_modules/electron-notarize/node_modules/debug/LICENSE
new file mode 100644
index 0000000..1a9820e
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+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/electron-notarize/node_modules/debug/README.md b/node_modules/electron-notarize/node_modules/debug/README.md
new file mode 100644
index 0000000..e9c3e04
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/debug/README.md
@@ -0,0 +1,481 @@
+# debug
+[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
+
+<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2018-2021 Josh Junon
+
+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/electron-notarize/node_modules/debug/package.json b/node_modules/electron-notarize/node_modules/debug/package.json
new file mode 100644
index 0000000..3bcdc24
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/debug/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "debug",
+ "version": "4.3.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "Josh Junon <josh.junon@protonmail.com>",
+ "contributors": [
+ "TJ Holowaychuk <tj@vision-media.ca>",
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ }
+}
diff --git a/node_modules/electron-notarize/node_modules/debug/src/browser.js b/node_modules/electron-notarize/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..cd0fc35
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/node_modules/electron-notarize/node_modules/debug/src/common.js b/node_modules/electron-notarize/node_modules/debug/src/common.js
new file mode 100644
index 0000000..e3291b2
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/node_modules/electron-notarize/node_modules/debug/src/index.js b/node_modules/electron-notarize/node_modules/debug/src/index.js
new file mode 100644
index 0000000..bf4c57f
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/electron-notarize/node_modules/debug/src/node.js b/node_modules/electron-notarize/node_modules/debug/src/node.js
new file mode 100644
index 0000000..79bc085
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/CHANGELOG.md b/node_modules/electron-notarize/node_modules/fs-extra/CHANGELOG.md
new file mode 100644
index 0000000..225fdca
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/CHANGELOG.md
@@ -0,0 +1,902 @@
+9.1.0 / 2021-01-19
+------------------
+
+- Add promise support for `fs.rm()` ([#841](https://github.com/jprichardson/node-fs-extra/issues/841), [#860](https://github.com/jprichardson/node-fs-extra/pull/860))
+- Upgrade universalify for performance improvments ([#825](https://github.com/jprichardson/node-fs-extra/pull/825))
+
+9.0.1 / 2020-06-03
+------------------
+
+- Fix issue with `ensureFile()` when used with Jest on Windows ([#804](https://github.com/jprichardson/node-fs-extra/issues/804), [#805](https://github.com/jprichardson/node-fs-extra/pull/805))
+- Remove unneeded `process.umask()` call ([#791](https://github.com/jprichardson/node-fs-extra/pull/791))
+- Docs improvements ([#753](https://github.com/jprichardson/node-fs-extra/pull/753), [#795](https://github.com/jprichardson/node-fs-extra/pull/795), [#797](https://github.com/jprichardson/node-fs-extra/pull/797))
+
+9.0.0 / 2020-03-19
+------------------
+
+### Breaking changes
+
+- Requires Node.js version 10 or greater ([#725](https://github.com/jprichardson/node-fs-extra/issues/725), [#751](https://github.com/jprichardson/node-fs-extra/pull/751))
+- Switched `ensureDir*` to use a fork of https://github.com/sindresorhus/make-dir to make use of native recursive `fs.mkdir` where possible ([#619](https://github.com/jprichardson/node-fs-extra/issues/619), [#756](https://github.com/jprichardson/node-fs-extra/pull/756))
+- Properly preserve `atime` for `copy*` with `preserveTimestamps` option ([#633](https://github.com/jprichardson/node-fs-extra/pull/633))
+
+**The following changes, allthough technically breaking, will not affect the vast majority of users:**
+
+- `outputJson` now outputs objects as they were when the function was called, even if they are mutated later ([#702](https://github.com/jprichardson/node-fs-extra/issues/702), [#768](https://github.com/jprichardson/node-fs-extra/pull/768))
+- Cannot pass `null` as an options parameter to `*Json*` methods ([#745](https://github.com/jprichardson/node-fs-extra/issues/745), [#768](https://github.com/jprichardson/node-fs-extra/pull/768))
+
+### Improvements
+
+- Add promise shims for `fs.writev` & `fs.opendir` ([#747](https://github.com/jprichardson/node-fs-extra/pull/747))
+- Better errors for `ensureFile` ([#696](https://github.com/jprichardson/node-fs-extra/issues/696), [#744](https://github.com/jprichardson/node-fs-extra/pull/744))
+- Better file comparison for older Node versions ([#694](https://github.com/jprichardson/node-fs-extra/pull/694))
+
+### Miscellaneous changes
+- Peformance optimizations ([#762](https://github.com/jprichardson/node-fs-extra/issues/762), [#764](https://github.com/jprichardson/node-fs-extra/pull/764))
+- Add missing documentation for aliases ([#758](https://github.com/jprichardson/node-fs-extra/issues/758), [#766](https://github.com/jprichardson/node-fs-extra/pull/766))
+- Update `universalify` dependency ([#767](https://github.com/jprichardson/node-fs-extra/pull/767))
+
+8.1.0 / 2019-06-28
+------------------
+
+- Add support for promisified `fs.realpath.native` in Node v9.2+ ([#650](https://github.com/jprichardson/node-fs-extra/issues/650), [#682](https://github.com/jprichardson/node-fs-extra/pull/682))
+- Update `graceful-fs` dependency ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+- Use `graceful-fs` everywhere ([#700](https://github.com/jprichardson/node-fs-extra/pull/700))
+
+8.0.1 / 2019-05-13
+------------------
+
+- Fix bug `Maximum call stack size exceeded` error in `util/stat` ([#679](https://github.com/jprichardson/node-fs-extra/pull/679))
+
+8.0.0 / 2019-05-11
+------------------
+
+**NOTE:** Node.js v6 support is deprecated, and will be dropped in the next major release.
+
+- Use `renameSync()` under the hood in `moveSync()`
+- Fix bug with bind-mounted directories in `copy*()` ([#613](https://github.com/jprichardson/node-fs-extra/issues/613), [#618](https://github.com/jprichardson/node-fs-extra/pull/618))
+- Fix bug in `move()` with case-insensitive file systems
+- Use `fs.stat()`'s `bigint` option in `copy*()` & `move*()` where possible ([#657](https://github.com/jprichardson/node-fs-extra/issues/657))
+
+7.0.1 / 2018-11-07
+------------------
+
+- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
+- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
+- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))
+
+7.0.0 / 2018-07-16
+------------------
+
+- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
+- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
+- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
+- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))
+
+6.0.1 / 2018-05-09
+------------------
+
+- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))
+
+6.0.0 / 2018-05-01
+------------------
+
+- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
+- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
+- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
+- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
+- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
+- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))
+
+5.0.0 / 2017-12-11
+------------------
+
+Significant refactor of `copy()` & `copySync()`, including breaking changes. No changes to other functions in this release.
+
+Huge thanks to **[@manidlou](https://github.com/manidlou)** for doing most of the work on this release.
+
+- The `filter` option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. [#512](https://github.com/jprichardson/node-fs-extra/pull/512)
+- `copy()`'s `filter` option can now be a function that returns a Promise. [#518](https://github.com/jprichardson/node-fs-extra/pull/518)
+- `copy()` & `copySync()` now use `fs.copyFile()`/`fs.copyFileSync()` in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. [#505](https://github.com/jprichardson/node-fs-extra/pull/505)
+- Don't allow copying a directory into itself. [#83](https://github.com/jprichardson/node-fs-extra/issues/83)
+- Handle copying between identical files. [#198](https://github.com/jprichardson/node-fs-extra/issues/198)
+- Error out when copying an empty folder to a path that already exists. [#464](https://github.com/jprichardson/node-fs-extra/issues/464)
+- Don't create `dest`'s parent if the `filter` function aborts the `copy()` operation. [#517](https://github.com/jprichardson/node-fs-extra/pull/517)
+- Fix `writeStream` not being closed if there was an error in `copy()`. [#516](https://github.com/jprichardson/node-fs-extra/pull/516)
+
+4.0.3 / 2017-12-05
+------------------
+
+- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501)
+- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520)
+
+4.0.2 / 2017-09-12
+------------------
+
+- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4)
+- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+
+- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485)
+
+4.0.1 / 2017-07-31
+------------------
+
+### Fixed
+
+- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470)
+
+4.0.0 / 2017-07-14
+------------------
+
+### Changed
+
+- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449)
+- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458)
+- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459)
+
+### Fixed
+
+- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428)
+
+Also clarified the docs in a few places.
+
+3.0.1 / 2017-05-04
+------------------
+
+- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415)
+
+3.0.0 / 2017-04-27
+------------------
+
+### Added
+
+- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403)
+- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406)
+
+### Removed
+
+- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+
+### Changed
+
+- Upgraded jsonfile dependency to v3.0.0:
+ - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`.
+- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394)
+
+### Fixed
+
+- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408)
+
+2.1.2 / 2017-03-16
+------------------
+
+### Fixed
+
+- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393)
+
+2.1.1 / 2017-03-15
+------------------
+
+### Fixed
+
+- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`.
+- Remove `Buffer.alloc()` usage in `moveSync()`.
+
+2.1.0 / 2017-03-15
+------------------
+
+Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release!
+
+### Added
+- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou))
+- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou))
+
+### Changed
+- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou))
+- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264)
+- Refactored docs. ([@manidlou](https://github.com/manidlou))
+
+### Fixed
+
+- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton))
+
+2.0.0 / 2017-01-16
+------------------
+
+### Removed
+- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it
+on Jan 1st, 2017.
+- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little
+over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just
+an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339]
+
+### Changed
+- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333]
+- Moved docs, to `docs/`. [#340]
+
+### Fixed
+- Apply filters to directories in `copySync()` like in `copy()`. [#324]
+- A specific condition when disk is under heavy use, `copy()` can fail. [#326]
+
+
+1.0.0 / 2016-11-01
+------------------
+
+After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes
+to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release!
+
+### Added
+- `walkSync()`
+
+### Changed
+- **BREAKING**: dropped Node v0.10 support.
+- disabled `rimaf` globbing, wasn't used. [#280]
+- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function.
+- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300]
+
+### Fixed
+- bug fix proper closing of file handle on `utimesMillis()` [#271]
+- proper escaping of files with dollar signs [#291]
+- `copySync()` failed if user didn't own file. [#199], [#301]
+
+
+0.30.0 / 2016-04-28
+-------------------
+- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**.
+
+0.29.0 / 2016-04-27
+-------------------
+- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well.
+
+0.28.0 / 2016-04-17
+-------------------
+- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]
+- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237]
+- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93]
+
+0.27.0 / 2016-04-15
+-------------------
+- add `dereference` option to `copySync()`. [#235][#235]
+
+0.26.7 / 2016-03-16
+-------------------
+- fixed `copy()` if source and dest are the same. [#230][#230]
+
+0.26.6 / 2016-03-15
+-------------------
+- fixed if `emptyDir()` does not have a callback: [#229][#229]
+
+0.26.5 / 2016-01-27
+-------------------
+- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215]
+
+0.26.4 / 2016-01-05
+-------------------
+- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208]
+
+0.26.3 / 2015-12-17
+-------------------
+- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193]
+
+0.26.2 / 2015-11-02
+-------------------
+- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces`
+
+0.26.1 / 2015-11-02
+-------------------
+- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190]
+
+0.26.0 / 2015-10-25
+-------------------
+- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw).
+
+0.25.0 / 2015-10-24
+-------------------
+- now has a file walker `walk()`
+
+0.24.0 / 2015-08-28
+-------------------
+- removed alias `delete()` and `deleteSync()`. See: [#171][#171]
+
+0.23.1 / 2015-08-07
+-------------------
+- Better handling of errors for `move()` when moving across devices. [#170][#170]
+- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169]
+
+0.23.0 / 2015-08-06
+-------------------
+- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165]
+
+0.22.1 / 2015-07-09
+-------------------
+- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149].
+Fixes regression that was introduced in `0.21.0`.
+
+0.22.0 / 2015-07-09
+-------------------
+- preserve permissions / ownership in `copy()`. See: [#54][#54]
+
+0.21.0 / 2015-07-04
+-------------------
+- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141]
+- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks)
+
+0.20.1 / 2015-06-23
+-------------------
+- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
+
+0.20.0 / 2015-06-19
+-------------------
+- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g.
+this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`.
+- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code.
+- started moving tests inline
+- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()`
+
+0.19.0 / 2015-06-08
+-------------------
+- `fs.copy()` had support for Node v0.8, dropped support
+
+0.18.4 / 2015-05-22
+-------------------
+- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0
+
+0.18.3 / 2015-05-08
+-------------------
+- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134]
+
+0.18.2 / 2015-04-17
+-------------------
+- bugfix: allow `F_OK` ([#120][#120])
+
+0.18.1 / 2015-04-15
+-------------------
+- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b
+- fixed a lot of tests for Windows (appveyor)
+
+0.18.0 / 2015-03-31
+-------------------
+- added `emptyDir()` and `emptyDirSync()`
+
+0.17.0 / 2015-03-28
+-------------------
+- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists).
+**Only works with files at the moment.**
+- `createOutputStream()` added. See: [#118][#118]
+
+0.16.5 / 2015-03-08
+-------------------
+- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114]
+
+0.16.4 / 2015-03-01
+-------------------
+- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66
+
+0.16.3 / 2015-01-28
+-------------------
+- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9
+
+
+0.16.2 / 2015-01-28
+-------------------
+- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future)
+
+0.16.1 / 2015-01-28
+-------------------
+- if `setImmediate` is not available, fall back to `process.nextTick`
+
+0.16.0 / 2015-01-28
+-------------------
+- bugfix `fs.move()` into itself. Closes [#104]
+- bugfix `fs.move()` moving directory across device. Closes [#108]
+- added coveralls support
+- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98]
+- misc fs.copy code cleanups
+
+0.15.0 / 2015-01-21
+-------------------
+- dropped `ncp`, imported code in
+- because of previous, now supports `io.js`
+- `graceful-fs` is now a dependency
+
+0.14.0 / 2015-01-05
+-------------------
+- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100]
+- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests)
+
+0.13.0 / 2014-12-10
+-------------------
+- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch)
+- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"`
+- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59])
+
+0.12.0 / 2014-09-22
+-------------------
+- copy symlinks in `copySync()` [#85][#85]
+
+0.11.1 / 2014-09-02
+-------------------
+- bugfix `copySync()` preserve file permissions [#80][#80]
+
+0.11.0 / 2014-08-11
+-------------------
+- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"`
+- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()`
+see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details.
+
+0.10.0 / 2014-06-29
+------------------
+* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change
+from `~` to `^`. [#67]
+
+0.9.1 / 2014-05-22
+------------------
+* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there
+
+0.9.0 / 2014-05-22
+------------------
+* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58]
+* upgraded `rimraf` from `~2.2.6` to `^2.2.8`
+* upgraded `mkdirp` from `0.3.x` to `^0.5.0`
+* added methods `ensureFile()`, `ensureFileSync()`
+* added methods `ensureDir()`, `ensureDirSync()` [#31]
+* added `move()` method. From: https://github.com/andrewrk/node-mv
+
+
+0.8.1 / 2013-10-24
+------------------
+* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39])
+
+0.8.0 / 2013-10-14
+------------------
+* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36])
+
+0.7.1 / 2013-10-12
+------------------
+* `copySync()` implemented (Srirangan / [#33])
+* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32]
+
+0.7.0 / 2013-10-07
+------------------
+* update readme conventions
+* `copy()` now works if destination directory does not exist. Closes [#29]
+
+0.6.4 / 2013-09-05
+------------------
+* changed `homepage` field in package.json to remove NPM warning
+
+0.6.3 / 2013-06-28
+------------------
+* changed JSON spacing default from `4` to `2` to follow Node conventions
+* updated `jsonfile` dep
+* updated `rimraf` dep
+
+0.6.2 / 2013-06-28
+------------------
+* added .npmignore, [#25]
+
+0.6.1 / 2013-05-14
+------------------
+* modified for `strict` mode, closes [#24]
+* added `outputJson()/outputJsonSync()`, closes [#23]
+
+0.6.0 / 2013-03-18
+------------------
+* removed node 0.6 support
+* added node 0.10 support
+* upgraded to latest `ncp` and `rimraf`.
+* optional `graceful-fs` support. Closes [#17]
+
+
+0.5.0 / 2013-02-03
+------------------
+* Removed `readTextFile`.
+* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write.
+* Restructured documentation a bit. Added roadmap.
+
+0.4.0 / 2013-01-28
+------------------
+* Set default spaces in `jsonfile` from 4 to 2.
+* Updated `testutil` deps for tests.
+* Renamed `touch()` to `createFile()`
+* Added `outputFile()` and `outputFileSync()`
+* Changed creation of testing diretories so the /tmp dir is not littered.
+* Added `readTextFile()` and `readTextFileSync()`.
+
+0.3.2 / 2012-11-01
+------------------
+* Added `touch()` and `touchSync()` methods.
+
+0.3.1 / 2012-10-11
+------------------
+* Fixed some stray globals.
+
+0.3.0 / 2012-10-09
+------------------
+* Removed all CoffeeScript from tests.
+* Renamed `mkdir` to `mkdirs`/`mkdirp`.
+
+0.2.1 / 2012-09-11
+------------------
+* Updated `rimraf` dep.
+
+0.2.0 / 2012-09-10
+------------------
+* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript)
+* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile)
+* Added Travis-CI.
+
+0.1.3 / 2012-08-13
+------------------
+* Added method `readJSONFile`.
+
+0.1.2 / 2012-06-15
+------------------
+* Bug fix: `deleteSync()` didn't exist.
+* Verified Node v0.8 compatibility.
+
+0.1.1 / 2012-06-15
+------------------
+* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed.
+
+0.1.0 / 2012-05-31
+------------------
+* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too.
+* Renamed `rmrf()` to `remove()`.
+* `remove()` aliased with `delete()`.
+* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`.
+* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead.
+
+0.0.4 / 2012-03-14
+------------------
+* Removed CoffeeScript dependency
+
+0.0.3 / 2012-01-11
+------------------
+* Added methods rmrf and rmrfSync
+* Moved tests from Jasmine to Mocha
+
+
+[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year"
+[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme"
+[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move"
+[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]"
+[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]"
+[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]"
+[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]"
+[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value"
+[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]"
+[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]"
+[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]"
+[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]"
+[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support"
+[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]"
+[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]"
+[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]"
+[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]"
+[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]"
+[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]"
+[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]"
+[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]"
+[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?"
+[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative"
+[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]"
+[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink "
+[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists"
+[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]"
+[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms"
+[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]"
+[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug."
+[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]"
+[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters."
+[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]"
+[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]"
+[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]"
+[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]"
+[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link"
+[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage"
+[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error"
+[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls"
+[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]"
+[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]"
+[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated"
+[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]"
+[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]"
+[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]"
+[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]"
+[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node"
+[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]"
+[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]"
+[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]"
+[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs"
+[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]"
+[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying"
+[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]"
+[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]"
+[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function"
+[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390"
+[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not"
+[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()"
+[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()"
+[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?"
+[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing"
+[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]"
+[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership"
+[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options"
+[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]"
+[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API"
+[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]"
+[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`"
+[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]"
+[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error"
+[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]"
+[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]"
+[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111"
+[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!"
+[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra"
+[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?"
+[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]"
+[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]"
+[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()"
+[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined"
+[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require"
+[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty"
+[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp"
+[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails"
+[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme "
+[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version"
+[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method"
+[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists"
+[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission"
+[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you"
+[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)"
+[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers"
+[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy"
+[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package"
+[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file"
+[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]"
+[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories"
+[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?"
+[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]"
+[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream"
+[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request"
+[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]"
+[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread."
+[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..."
+[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo"
+[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)"
+[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci"
+[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]"
+[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. "
+[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML"
+[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test"
+[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir"
+[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out"
+[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]"
+[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory"
+[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink"
+[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error"
+[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync"
+[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function"
+[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md"
+[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods."
+[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example"
+[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug"
+[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug"
+[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug"
+[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]"
+[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag"
+[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo"
+[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE"
+[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files"
+[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]"
+[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]"
+[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]"
+[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions"
+[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync"
+[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]"
+[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files"
+[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]"
+[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?"
+[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]"
+[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync"
+[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]"
+[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]"
+[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]"
+[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]"
+[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?"
+[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file"
+[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]"
+[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()"
+[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]"
+[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true"
+[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows"
+[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform"
+[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]"
+[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]"
+[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x"
+[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra"
+[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]"
+[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified"
+[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]"
+[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]"
+[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir"
+[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync "
+[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]"
+[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event"
+[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]"
+[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter"
+[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs"
+[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`"
+[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases"
+[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives"
+[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error"
+[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error"
+[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]"
+[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content"
+[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink"
+[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content"
+[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]"
+[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link"
+[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link"
+[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link"
+[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link"
+[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods"
+[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted"
+[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods"
+[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme"
+[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync"
+[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152"
+[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]"
+[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]"
+[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code."
+[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync"
+[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation"
+[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty"
+[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works"
+[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist."
+[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing"
+[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs"
+[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature"
+[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps"
+[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'"
+[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138"
+[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files"
+[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input"
+[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute"
+[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided"
+[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir"
+[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`"
+[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method"
+[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]"
+[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features."
+[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?"
+[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;"
+[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists"
+[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object #<Object> has no method 'access'"
+[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync"
+[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'"
+[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory"
+[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids."
+[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined"
+[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'"
+[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows"
+[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream"
+[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows"
+[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]"
+[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]"
+[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true"
+[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists"
+[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory"
+[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory "
+[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory"
+[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails"
+[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work"
+[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it"
+[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]"
+[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs"
+[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]"
+[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy"
+[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?"
+[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified"
+[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp"
+[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]"
+[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]"
+[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug"
+[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined."
+[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp"
+[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]"
+[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]"
+[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird"
+[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]"
+[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine"
+[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows"
+[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries"
+[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?"
+[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?"
+[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync"
+[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?"
+[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]"
+[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move"
+[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move"
+[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync"
+[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty"
+[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories"
+[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird"
+[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript"
+[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]"
+[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module"
+[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme"
+[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality"
+[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work"
+[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]"
+[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name"
+[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]"
+[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options"
+[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG"
+[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy"
+[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls"
+[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk"
+[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work"
+[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies"
+[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs"
+[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]"
+[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error"
+[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?"
+[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy "
+[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?"
+[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons"
+[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode"
+[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync"
+[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README"
+[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile"
+[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6"
+[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]"
+[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0"
+[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year"
+[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites"
+[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support"
+[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting "
+[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?"
+[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now"
+[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime "
+[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error"
+[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null"
+[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]"
+[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`"
+[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` "
+[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]"
+[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync"
+[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]"
+[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]"
+[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`"
+[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?"
+[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted."
+[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme"
+[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]"
+[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file"
+[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]"
+[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories"
+[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()"
+[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0"
+[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted"
+[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array"
+[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function"
+[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`"
+[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md"
+[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]"
+[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1"
+[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]"
+[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global"
+[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]"
+[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]"
+[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra"
+[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version"
+[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency"
+[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming"
+[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2"
+[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!"
+[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp"
+[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist"
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/LICENSE b/node_modules/electron-notarize/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+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/electron-notarize/node_modules/fs-extra/README.md b/node_modules/electron-notarize/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..b4a5370
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/README.md
@@ -0,0 +1,264 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
+
+[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![License](https://img.shields.io/npm/l/express.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
+[![build status](https://img.shields.io/travis/jprichardson/node-fs-extra/master.svg)](http://travis-ci.org/jprichardson/node-fs-extra)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
+[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![Coverage Status](https://img.shields.io/coveralls/github/jprichardson/node-fs-extra/master.svg)](https://coveralls.io/github/jprichardson/node-fs-extra)
+[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install fs-extra
+
+
+
+Usage
+-----
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+Sync vs Async vs Async/Await
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Also Async/Await will throw an error if one occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+
+// Async/Await:
+async function copyFiles () {
+ try {
+ await fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+ } catch (err) {
+ console.error(err)
+ }
+}
+
+copyFiles()
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirp](docs/ensureDir.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirpSync](docs/ensureDir-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+### CLI
+
+[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+### Obtain Filesystem (Devices, Partitions) Information
+
+[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
+
+### Misc.
+
+- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage. See coveralls output for more info.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm test`: runs both the linter and the tests
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/copy-sync.js
new file mode 100644
index 0000000..31f06e4
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/copy-sync.js
@@ -0,0 +1,166 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirsSync = require('../mkdirs').mkdirsSync
+const utimesMillisSync = require('../util/utimes').utimesMillisSync
+const stat = require('../util/stat')
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy')
+ stat.checkParentPathsSync(src, srcStat, dest, 'copy')
+ return handleFilterAndCopy(destStat, src, dest, opts)
+}
+
+function handleFilterAndCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirsSync(destParent)
+ return startCopy(destStat, src, dest, opts)
+}
+
+function startCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ fs.copyFileSync(src, dest)
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
+ return setDestMode(dest, srcStat.mode)
+}
+
+function handleTimestamps (srcMode, src, dest) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
+ return setDestTimestamps(src, dest)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode) {
+ return setDestMode(dest, srcMode | 0o200)
+}
+
+function setDestMode (dest, srcMode) {
+ return fs.chmodSync(dest, srcMode)
+}
+
+function setDestTimestamps (src, dest) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ const updatedSrcStat = fs.statSync(src)
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
+ if (destStat && !destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
+ }
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return setDestMode(dest, srcMode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy')
+ return startCopy(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+module.exports = copySync
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/index.js
new file mode 100644
index 0000000..65945ae
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ copySync: require('./copy-sync')
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/copy/copy.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..328f102
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,232 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirs = require('../mkdirs').mkdirs
+const pathExists = require('../path-exists').pathExists
+const utimesMillis = require('../util/utimes').utimesMillis
+const stat = require('../util/stat')
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ stat.checkPaths(src, dest, 'copy', (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
+ if (err) return cb(err)
+ if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
+ return checkParentDir(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return startCopy(destStat, src, dest, opts, cb)
+ mkdirs(destParent, err => {
+ if (err) return cb(err)
+ return startCopy(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function handleFilter (onInclude, destStat, src, dest, opts, cb) {
+ Promise.resolve(opts.filter(src, dest)).then(include => {
+ if (include) return onInclude(destStat, src, dest, opts, cb)
+ return cb()
+ }, error => cb(error))
+}
+
+function startCopy (destStat, src, dest, opts, cb) {
+ if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
+ return getStats(destStat, src, dest, opts, cb)
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
+ return setDestMode(dest, srcStat.mode, cb)
+ })
+}
+
+function handleTimestampsAndMode (srcMode, src, dest, cb) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) {
+ return makeFileWritable(dest, srcMode, err => {
+ if (err) return cb(err)
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+ })
+ }
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode, cb) {
+ return setDestMode(dest, srcMode | 0o200, cb)
+}
+
+function setDestTimestampsAndMode (srcMode, src, dest, cb) {
+ setDestTimestamps(src, dest, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+}
+
+function setDestMode (dest, srcMode, cb) {
+ return fs.chmod(dest, srcMode, cb)
+}
+
+function setDestTimestamps (src, dest, cb) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ fs.stat(src, (err, updatedSrcStat) => {
+ if (err) return cb(err)
+ return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
+ if (destStat && !destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
+ }
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => {
+ if (err) return cb(err)
+ const { destStat } = stats
+ startCopy(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+module.exports = copy
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/copy/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..b7e4f7f
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy'))
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/empty/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..90fb469
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,48 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(function emptyDir (dir, callback) {
+ callback = callback || function () {}
+ fs.readdir(dir, (err, items) => {
+ if (err) return mkdir.mkdirs(dir, callback)
+
+ items = items.map(item => path.join(dir, item))
+
+ deleteItem()
+
+ function deleteItem () {
+ const item = items.pop()
+ if (!item) return callback()
+ remove.remove(item, err => {
+ if (err) return callback(err)
+ deleteItem()
+ })
+ }
+ })
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/file.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..15cc473
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,69 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ fs.stat(dir, (err, stats) => {
+ if (err) {
+ // if the directory doesn't exist, make it
+ if (err.code === 'ENOENT') {
+ return mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ }
+ return callback(err)
+ }
+
+ if (stats.isDirectory()) makeFile()
+ else {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdir(dir, err => {
+ if (err) return callback(err)
+ })
+ }
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ try {
+ if (!fs.statSync(dir).isDirectory()) {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdirSync(dir)
+ }
+ } catch (err) {
+ // If the stat call above failed because the directory doesn't exist, create it
+ if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
+ else throw err
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..c1f67b7
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const file = require('./file')
+const link = require('./link')
+const symlink = require('./symlink')
+
+module.exports = {
+ // file
+ createFile: file.createFile,
+ createFileSync: file.createFileSync,
+ ensureFile: file.createFile,
+ ensureFileSync: file.createFileSync,
+ // link
+ createLink: link.createLink,
+ createLinkSync: link.createLinkSync,
+ ensureLink: link.createLink,
+ ensureLinkSync: link.createLinkSync,
+ // symlink
+ createSymlink: symlink.createSymlink,
+ createSymlinkSync: symlink.createSymlinkSync,
+ ensureSymlink: symlink.createSymlink,
+ ensureSymlinkSync: symlink.createSymlinkSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/link.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..2cd4196
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,61 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ try {
+ fs.lstatSync(srcpath)
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..33cd760
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..42dc0ce
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..fe68b79
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,63 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/fs/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..9bbaea4
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,130 @@
+'use strict'
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchmod',
+ 'lchown',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'opendir',
+ 'readdir',
+ 'readFile',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rm',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.opendir was added in Node.js v12.12.0
+ // fs.rm was added in Node.js v14.14.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export all keys:
+Object.keys(fs).forEach(key => {
+ if (key === 'promises') {
+ // fs.promises is a getter property that triggers ExperimentalWarning
+ // Don't re-export it here, the getter is defined in "lib/index.js"
+ return
+ }
+ exports[key] = fs[key]
+})
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
+
+// fs.writev only available in Node v12.9.0+
+if (typeof fs.writev === 'function') {
+ // Function signature is
+ // s.writev(fd, buffers[, position], callback)
+ // We need to handle the optional arg, so we use ...args
+ exports.writev = function (fd, buffers, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.writev(fd, buffers, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffers })
+ })
+ })
+ }
+}
+
+// fs.realpath.native only available in Node v9.2+
+if (typeof fs.realpath.native === 'function') {
+ exports.realpath.native = u(fs.realpath.native)
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..d9468e6
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,27 @@
+'use strict'
+
+module.exports = {
+ // Export promiseified graceful-fs:
+ ...require('./fs'),
+ // Export extra methods:
+ ...require('./copy-sync'),
+ ...require('./copy'),
+ ...require('./empty'),
+ ...require('./ensure'),
+ ...require('./json'),
+ ...require('./mkdirs'),
+ ...require('./move-sync'),
+ ...require('./move'),
+ ...require('./output'),
+ ...require('./path-exists'),
+ ...require('./remove')
+}
+
+// Export fs.promises as a getter property so that we don't trigger
+// ExperimentalWarning before fs.promises is actually accessed.
+const fs = require('fs')
+if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
+ Object.defineProperty(module.exports, 'promises', {
+ get () { return fs.promises }
+ })
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/json/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..900126a
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..f11d34d
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: jsonFile.readFile,
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: jsonFile.writeFile,
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..f76b474
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFileSync } = require('../output')
+
+function outputJsonSync (file, data, options) {
+ const str = stringify(data, options)
+
+ outputFileSync(file, str, options)
+}
+
+module.exports = outputJsonSync
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..0fc6689
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFile } = require('../output')
+
+async function outputJson (file, data, options = {}) {
+ const str = stringify(data, options)
+
+ await outputFile(file, str, options)
+}
+
+module.exports = outputJson
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..9edecee
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromPromise
+const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
+const makeDir = u(_makeDir)
+
+module.exports = {
+ mkdirs: makeDir,
+ mkdirsSync: makeDirSync,
+ // alias
+ mkdirp: makeDir,
+ mkdirpSync: makeDirSync,
+ ensureDir: makeDir,
+ ensureDirSync: makeDirSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/make-dir.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/make-dir.js
new file mode 100644
index 0000000..3e7e836
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/mkdirs/make-dir.js
@@ -0,0 +1,141 @@
+// Adapted from https://github.com/sindresorhus/make-dir
+// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+'use strict'
+const fs = require('../fs')
+const path = require('path')
+const atLeastNode = require('at-least-node')
+
+const useNativeRecursiveOption = atLeastNode('10.12.0')
+
+// https://github.com/nodejs/node/issues/8987
+// https://github.com/libuv/libuv/pull/1088
+const checkPath = pth => {
+ if (process.platform === 'win32') {
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
+
+ if (pathHasInvalidWinCharacters) {
+ const error = new Error(`Path contains invalid characters: ${pth}`)
+ error.code = 'EINVAL'
+ throw error
+ }
+ }
+}
+
+const processOptions = options => {
+ const defaults = { mode: 0o777 }
+ if (typeof options === 'number') options = { mode: options }
+ return { ...defaults, ...options }
+}
+
+const permissionError = pth => {
+ // This replicates the exception of `fs.mkdir` with native the
+ // `recusive` option when run on an invalid drive under Windows.
+ const error = new Error(`operation not permitted, mkdir '${pth}'`)
+ error.code = 'EPERM'
+ error.errno = -4048
+ error.path = pth
+ error.syscall = 'mkdir'
+ return error
+}
+
+module.exports.makeDir = async (input, options) => {
+ checkPath(input)
+ options = processOptions(options)
+
+ if (useNativeRecursiveOption) {
+ const pth = path.resolve(input)
+
+ return fs.mkdir(pth, {
+ mode: options.mode,
+ recursive: true
+ })
+ }
+
+ const make = async pth => {
+ try {
+ await fs.mkdir(pth, options.mode)
+ } catch (error) {
+ if (error.code === 'EPERM') {
+ throw error
+ }
+
+ if (error.code === 'ENOENT') {
+ if (path.dirname(pth) === pth) {
+ throw permissionError(pth)
+ }
+
+ if (error.message.includes('null bytes')) {
+ throw error
+ }
+
+ await make(path.dirname(pth))
+ return make(pth)
+ }
+
+ try {
+ const stats = await fs.stat(pth)
+ if (!stats.isDirectory()) {
+ // This error is never exposed to the user
+ // it is caught below, and the original error is thrown
+ throw new Error('The path is not a directory')
+ }
+ } catch {
+ throw error
+ }
+ }
+ }
+
+ return make(path.resolve(input))
+}
+
+module.exports.makeDirSync = (input, options) => {
+ checkPath(input)
+ options = processOptions(options)
+
+ if (useNativeRecursiveOption) {
+ const pth = path.resolve(input)
+
+ return fs.mkdirSync(pth, {
+ mode: options.mode,
+ recursive: true
+ })
+ }
+
+ const make = pth => {
+ try {
+ fs.mkdirSync(pth, options.mode)
+ } catch (error) {
+ if (error.code === 'EPERM') {
+ throw error
+ }
+
+ if (error.code === 'ENOENT') {
+ if (path.dirname(pth) === pth) {
+ throw permissionError(pth)
+ }
+
+ if (error.message.includes('null bytes')) {
+ throw error
+ }
+
+ make(path.dirname(pth))
+ return make(pth)
+ }
+
+ try {
+ if (!fs.statSync(pth).isDirectory()) {
+ // This error is never exposed to the user
+ // it is caught below, and the original error is thrown
+ throw new Error('The path is not a directory')
+ }
+ } catch {
+ throw error
+ }
+ }
+ }
+
+ return make(path.resolve(input))
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/index.js
new file mode 100644
index 0000000..af90b06
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ moveSync: require('./move-sync')
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/move-sync.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/move-sync.js
new file mode 100644
index 0000000..20f910c
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/move-sync/move-sync.js
@@ -0,0 +1,47 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy-sync').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirpSync
+const stat = require('../util/stat')
+
+function moveSync (src, dest, opts) {
+ opts = opts || {}
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ const { srcStat } = stat.checkPathsSync(src, dest, 'move')
+ stat.checkParentPathsSync(src, srcStat, dest, 'move')
+ mkdirpSync(path.dirname(dest))
+ return doRename(src, dest, overwrite)
+}
+
+function doRename (src, dest, overwrite) {
+ if (overwrite) {
+ removeSync(dest)
+ return rename(src, dest, overwrite)
+ }
+ if (fs.existsSync(dest)) throw new Error('dest already exists.')
+ return rename(src, dest, overwrite)
+}
+
+function rename (src, dest, overwrite) {
+ try {
+ fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code !== 'EXDEV') throw err
+ return moveAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveAcrossDevice (src, dest, overwrite) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copySync(src, dest, opts)
+ return removeSync(src)
+}
+
+module.exports = moveSync
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/move/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..3785345
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ move: u(require('./move'))
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/move/move.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/move/move.js
new file mode 100644
index 0000000..fa3ea61
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/move/move.js
@@ -0,0 +1,65 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copy = require('../copy').copy
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirp
+const pathExists = require('../path-exists').pathExists
+const stat = require('../util/stat')
+
+function move (src, dest, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ stat.checkPaths(src, dest, 'move', (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'move', err => {
+ if (err) return cb(err)
+ mkdirp(path.dirname(dest), err => {
+ if (err) return cb(err)
+ return doRename(src, dest, overwrite, cb)
+ })
+ })
+ })
+}
+
+function doRename (src, dest, overwrite, cb) {
+ if (overwrite) {
+ return remove(dest, err => {
+ if (err) return cb(err)
+ return rename(src, dest, overwrite, cb)
+ })
+ }
+ pathExists(dest, (err, destExists) => {
+ if (err) return cb(err)
+ if (destExists) return cb(new Error('dest already exists.'))
+ return rename(src, dest, overwrite, cb)
+ })
+}
+
+function rename (src, dest, overwrite, cb) {
+ fs.rename(src, dest, err => {
+ if (!err) return cb()
+ if (err.code !== 'EXDEV') return cb(err)
+ return moveAcrossDevice(src, dest, overwrite, cb)
+ })
+}
+
+function moveAcrossDevice (src, dest, overwrite, cb) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copy(src, dest, opts, err => {
+ if (err) return cb(err)
+ return remove(src, cb)
+ })
+}
+
+module.exports = move
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/output/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/output/index.js
new file mode 100644
index 0000000..92297ca
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/output/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, ...args) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync(file, ...args)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync(file, ...args)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/remove/index.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..cee5340
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,9 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const rimraf = require('./rimraf')
+
+module.exports = {
+ remove: u(rimraf),
+ removeSync: rimraf.sync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/remove/rimraf.js
new file mode 100644
index 0000000..2c77102
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/remove/rimraf.js
@@ -0,0 +1,302 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const assert = require('assert')
+
+const isWindows = (process.platform === 'win32')
+
+function defaults (options) {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+}
+
+function rimraf (p, options, cb) {
+ let busyTries = 0
+
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
+ busyTries < options.maxBusyTries) {
+ busyTries++
+ const time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), time)
+ }
+
+ // already gone
+ if (er.code === 'ENOENT') er = null
+ }
+
+ cb(er)
+ })
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === 'ENOENT') {
+ return cb(null)
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === 'EPERM' && isWindows) {
+ return fixWinEPERM(p, options, er, cb)
+ }
+
+ if (st && st.isDirectory()) {
+ return rmdir(p, options, er, cb)
+ }
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === 'ENOENT') {
+ return cb(null)
+ }
+ if (er.code === 'EPERM') {
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ }
+ if (er.code === 'EISDIR') {
+ return rmdir(p, options, er, cb)
+ }
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2) {
+ cb(er2.code === 'ENOENT' ? null : er)
+ } else {
+ options.stat(p, (er3, stats) => {
+ if (er3) {
+ cb(er3.code === 'ENOENT' ? null : er)
+ } else if (stats.isDirectory()) {
+ rmdir(p, options, er, cb)
+ } else {
+ options.unlink(p, cb)
+ }
+ })
+ }
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ let stats
+
+ assert(p)
+ assert(options)
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ if (stats.isDirectory()) {
+ rmdirSync(p, options, er)
+ } else {
+ options.unlinkSync(p)
+ }
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
+ rmkids(p, options, cb)
+ } else if (er && er.code === 'ENOTDIR') {
+ cb(originalEr)
+ } else {
+ cb(er)
+ }
+ })
+}
+
+function rmkids (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er) return cb(er)
+
+ let n = files.length
+ let errState
+
+ if (n === 0) return options.rmdir(p, cb)
+
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState) {
+ return
+ }
+ if (er) return cb(errState = er)
+ if (--n === 0) {
+ options.rmdir(p, cb)
+ }
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ let st
+
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === 'EPERM' && isWindows) {
+ fixWinEPERMSync(p, options, er)
+ }
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory()) {
+ rmdirSync(p, options, null)
+ } else {
+ options.unlinkSync(p)
+ }
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ } else if (er.code === 'EPERM') {
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ } else if (er.code !== 'EISDIR') {
+ throw er
+ }
+ rmdirSync(p, options, er)
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === 'ENOTDIR') {
+ throw originalEr
+ } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
+ rmkidsSync(p, options)
+ } else if (er.code !== 'ENOENT') {
+ throw er
+ }
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ if (isWindows) {
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const startTime = Date.now()
+ do {
+ try {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ } catch {}
+ } while (Date.now() - startTime < 500) // give up after 500ms
+ } else {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ }
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/util/stat.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/util/stat.js
new file mode 100644
index 0000000..0b1c1b0
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/util/stat.js
@@ -0,0 +1,139 @@
+'use strict'
+
+const fs = require('../fs')
+const path = require('path')
+const util = require('util')
+const atLeastNode = require('at-least-node')
+
+const nodeSupportsBigInt = atLeastNode('10.5.0')
+const stat = (file) => nodeSupportsBigInt ? fs.stat(file, { bigint: true }) : fs.stat(file)
+const statSync = (file) => nodeSupportsBigInt ? fs.statSync(file, { bigint: true }) : fs.statSync(file)
+
+function getStats (src, dest) {
+ return Promise.all([
+ stat(src),
+ stat(dest).catch(err => {
+ if (err.code === 'ENOENT') return null
+ throw err
+ })
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
+}
+
+function getStatsSync (src, dest) {
+ let destStat
+ const srcStat = statSync(src)
+ try {
+ destStat = statSync(dest)
+ } catch (err) {
+ if (err.code === 'ENOENT') return { srcStat, destStat: null }
+ throw err
+ }
+ return { srcStat, destStat }
+}
+
+function checkPaths (src, dest, funcName, cb) {
+ util.callbackify(getStats)(src, dest, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ if (destStat && areIdentical(srcStat, destStat)) {
+ return cb(new Error('Source and destination must not be the same.'))
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return cb(null, { srcStat, destStat })
+ })
+}
+
+function checkPathsSync (src, dest, funcName) {
+ const { srcStat, destStat } = getStatsSync(src, dest)
+ if (destStat && areIdentical(srcStat, destStat)) {
+ throw new Error('Source and destination must not be the same.')
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return { srcStat, destStat }
+}
+
+// recursively check if dest parent is a subdirectory of src.
+// It works for all file types including symlinks since it
+// checks the src and dest inodes. It starts from the deepest
+// parent and stops once it reaches the src parent or the root path.
+function checkParentPaths (src, srcStat, dest, funcName, cb) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
+ const callback = (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb()
+ return cb(err)
+ }
+ if (areIdentical(srcStat, destStat)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return checkParentPaths(src, srcStat, destParent, funcName, cb)
+ }
+ if (nodeSupportsBigInt) fs.stat(destParent, { bigint: true }, callback)
+ else fs.stat(destParent, callback)
+}
+
+function checkParentPathsSync (src, srcStat, dest, funcName) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return
+ let destStat
+ try {
+ destStat = statSync(destParent)
+ } catch (err) {
+ if (err.code === 'ENOENT') return
+ throw err
+ }
+ if (areIdentical(srcStat, destStat)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return checkParentPathsSync(src, srcStat, destParent, funcName)
+}
+
+function areIdentical (srcStat, destStat) {
+ if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) {
+ if (nodeSupportsBigInt || destStat.ino < Number.MAX_SAFE_INTEGER) {
+ // definitive answer
+ return true
+ }
+ // Use additional heuristics if we can't use 'bigint'.
+ // Different 'ino' could be represented the same if they are >= Number.MAX_SAFE_INTEGER
+ // See issue 657
+ if (destStat.size === srcStat.size &&
+ destStat.mode === srcStat.mode &&
+ destStat.nlink === srcStat.nlink &&
+ destStat.atimeMs === srcStat.atimeMs &&
+ destStat.mtimeMs === srcStat.mtimeMs &&
+ destStat.ctimeMs === srcStat.ctimeMs &&
+ destStat.birthtimeMs === srcStat.birthtimeMs) {
+ // heuristic answer
+ return true
+ }
+ }
+ return false
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// It only checks the path strings.
+function isSrcSubdir (src, dest) {
+ const srcArr = path.resolve(src).split(path.sep).filter(i => i)
+ const destArr = path.resolve(dest).split(path.sep).filter(i => i)
+ return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
+}
+
+function errMsg (src, dest, funcName) {
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
+}
+
+module.exports = {
+ checkPaths,
+ checkPathsSync,
+ checkParentPaths,
+ checkParentPathsSync,
+ isSrcSubdir
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/lib/util/utimes.js b/node_modules/electron-notarize/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..75395de
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,26 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+function utimesMillisSync (path, atime, mtime) {
+ const fd = fs.openSync(path, 'r+')
+ fs.futimesSync(fd, atime, mtime)
+ return fs.closeSync(fd)
+}
+
+module.exports = {
+ utimesMillis,
+ utimesMillisSync
+}
diff --git a/node_modules/electron-notarize/node_modules/fs-extra/package.json b/node_modules/electron-notarize/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..6f7d8dd
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/fs-extra/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "fs-extra",
+ "version": "9.1.0",
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
+ "engines": {
+ "node": ">=10"
+ },
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jprichardson/node-fs-extra"
+ },
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move",
+ "promise"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "at-least-node": "^1.0.0",
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "devDependencies": {
+ "coveralls": "^3.0.0",
+ "klaw": "^2.1.1",
+ "klaw-sync": "^3.0.2",
+ "minimist": "^1.1.1",
+ "mocha": "^5.0.5",
+ "nyc": "^15.0.0",
+ "proxyquire": "^2.0.1",
+ "read-dir-files": "^0.1.1",
+ "standard": "^14.1.0"
+ },
+ "main": "./lib/index.js",
+ "files": [
+ "lib/",
+ "!lib/**/__tests__/"
+ ],
+ "scripts": {
+ "full-ci": "npm run lint && npm run coverage",
+ "coverage": "nyc -r lcovonly npm run unit",
+ "coveralls": "coveralls < coverage/lcov.info",
+ "lint": "standard",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "test": "npm run lint && npm run unit",
+ "unit": "node test.js"
+ }
+}
diff --git a/node_modules/electron-notarize/node_modules/jsonfile/CHANGELOG.md b/node_modules/electron-notarize/node_modules/jsonfile/CHANGELOG.md
new file mode 100644
index 0000000..d772e43
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/jsonfile/CHANGELOG.md
@@ -0,0 +1,171 @@
+6.1.0 / 2020-10-31
+------------------
+
+- Add `finalEOL` option to disable writing final EOL ([#115](https://github.com/jprichardson/node-jsonfile/issues/115), [#137](https://github.com/jprichardson/node-jsonfile/pull/137))
+- Update dependency ([#138](https://github.com/jprichardson/node-jsonfile/pull/138))
+
+6.0.1 / 2020-03-07
+------------------
+
+- Update dependency ([#130](https://github.com/jprichardson/node-jsonfile/pull/130))
+- Fix code style ([#129](https://github.com/jprichardson/node-jsonfile/pull/129))
+
+6.0.0 / 2020-02-24
+------------------
+
+- **BREAKING:** Drop support for Node 6 & 8 ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- **BREAKING:** Do not allow passing `null` as options to `readFile()` or `writeFile()` ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- Refactor internals ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+
+5.0.0 / 2018-09-08
+------------------
+
+- **BREAKING:** Drop Node 4 support
+- **BREAKING:** If no callback is passed to an asynchronous method, a promise is now returned ([#109](https://github.com/jprichardson/node-jsonfile/pull/109))
+- Cleanup docs
+
+4.0.0 / 2017-07-12
+------------------
+
+- **BREAKING:** Remove global `spaces` option.
+- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js.
+- Remove undocumented `passParsingErrors` option.
+- Added `EOL` override option to `writeFile` when using `spaces`. [#89]
+
+3.0.1 / 2017-07-05
+------------------
+
+- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written.
+
+3.0.0 / 2017-04-25
+------------------
+
+- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false`
+
+2.4.0 / 2016-09-15
+------------------
+### Changed
+- added optional support for `graceful-fs` [#62]
+
+2.3.1 / 2016-05-13
+------------------
+- fix to support BOM. [#45][#45]
+
+2.3.0 / 2016-04-16
+------------------
+- add `throws` to `readFile()`. See [#39][#39]
+- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs)
+
+2.2.3 / 2015-10-14
+------------------
+- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34
+
+2.2.2 / 2015-09-16
+------------------
+- split out tests into separate files
+- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33
+
+2.2.1 / 2015-06-25
+------------------
+- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28
+
+2.2.0 / 2015-06-25
+------------------
+- added `options.spaces` to `writeFile()` and `writeFileSync()`
+
+2.1.2 / 2015-06-22
+------------------
+- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25
+
+2.1.1 / 2015-06-19
+------------------
+- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24
+
+2.1.0 / 2015-06-19
+------------------
+- cleanup: JavaScript Standard Style, rename files, dropped terst for assert
+- methods now support JSON revivers/replacers
+
+2.0.1 / 2015-05-24
+------------------
+- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21
+
+2.0.0 / 2014-07-28
+------------------
+* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14)
+* added `options.throws` to `readFileSync()`
+* dropped support for Node v0.8
+
+1.2.0 / 2014-06-29
+------------------
+* removed semicolons
+* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but
+changes it according to docs. [#12][#12]
+
+1.1.1 / 2013-11-11
+------------------
+* fixed catching of callback bug (ffissore / #5)
+
+1.1.0 / 2013-10-11
+------------------
+* added `options` param to methods, (seanodell / #4)
+
+1.0.1 / 2013-09-05
+------------------
+* removed `homepage` field from package.json to remove NPM warning
+
+1.0.0 / 2013-06-28
+------------------
+* added `.npmignore`, #1
+* changed spacing default from `4` to `2` to follow Node conventions
+
+0.0.1 / 2012-09-10
+------------------
+* Initial release.
+
+[#89]: https://github.com/jprichardson/node-jsonfile/pull/89
+[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails"
+[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file"
+[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file"
+[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch"
+[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working"
+[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value"
+[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)"
+[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature"
+[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file"
+[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file."
+[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file."
+[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename"
+[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()"
+[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?"
+[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string"
+[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?"
+[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?"
+[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken "
+[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality"
+[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra"
+[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods"
+[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error"
+[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync"
+[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated"
+[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute"
+[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity"
+[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method"
+[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods"
+[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem"
+[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null"
+[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`"
+[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF"
+[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline"
+[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options"
+[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync"
+[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile"
+[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example."
+[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me."
+[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message"
+[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible"
+[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite."
+[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync"
+[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2"
+[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted."
+[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file"
diff --git a/node_modules/electron-notarize/node_modules/jsonfile/LICENSE b/node_modules/electron-notarize/node_modules/jsonfile/LICENSE
new file mode 100644
index 0000000..cb7e807
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/jsonfile/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2012-2015, JP Richardson <jprichardson@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/electron-notarize/node_modules/jsonfile/README.md b/node_modules/electron-notarize/node_modules/jsonfile/README.md
new file mode 100644
index 0000000..910cde0
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/jsonfile/README.md
@@ -0,0 +1,230 @@
+Node.js - jsonfile
+================
+
+Easily read/write JSON files in Node.js. _Note: this module cannot be used in the browser._
+
+[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile)
+[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
+
+<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
+
+Why?
+----
+
+Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
+
+
+
+Installation
+------------
+
+ npm install --save jsonfile
+
+
+
+API
+---
+
+* [`readFile(filename, [options], callback)`](#readfilefilename-options-callback)
+* [`readFileSync(filename, [options])`](#readfilesyncfilename-options)
+* [`writeFile(filename, obj, [options], callback)`](#writefilefilename-obj-options-callback)
+* [`writeFileSync(filename, obj, [options])`](#writefilesyncfilename-obj-options)
+
+----
+
+### readFile(filename, [options], callback)
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+ - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
+ If `false`, returns `null` for the object.
+
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file, function (err, obj) {
+ if (err) console.error(err)
+ console.dir(obj)
+})
+```
+
+You can also use this method with promises. The `readFile` method will return a promise if you do not pass a callback function.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file)
+ .then(obj => console.dir(obj))
+ .catch(error => console.error(error))
+```
+
+----
+
+### readFileSync(filename, [options])
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+
+console.dir(jsonfile.readFileSync(file))
+```
+
+----
+
+### writeFile(filename, obj, [options], callback)
+
+`options`: Pass in any [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, function (err) {
+ if (err) console.error(err)
+})
+```
+Or use with promises as follows:
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj)
+ .then(res => {
+ console.log('Write complete')
+ })
+ .catch(error => console.error(error))
+```
+
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2 }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, finalEOL: false }, function (err) {
+ if (err) console.log(err)
+})
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFile` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { flag: 'a' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+----
+
+### writeFileSync(filename, obj, [options])
+
+`options`: Pass in any [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj)
+```
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2 })
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' })
+```
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, finalEOL: false })
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFileSync` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { flag: 'a' })
+```
+
+License
+-------
+
+(MIT License)
+
+Copyright 2012-2016, JP Richardson <jprichardson@gmail.com>
diff --git a/node_modules/electron-notarize/node_modules/jsonfile/index.js b/node_modules/electron-notarize/node_modules/jsonfile/index.js
new file mode 100644
index 0000000..0582868
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/jsonfile/index.js
@@ -0,0 +1,88 @@
+let _fs
+try {
+ _fs = require('graceful-fs')
+} catch (_) {
+ _fs = require('fs')
+}
+const universalify = require('universalify')
+const { stringify, stripBom } = require('./utils')
+
+async function _readFile (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ let data = await universalify.fromCallback(fs.readFile)(file, options)
+
+ data = stripBom(data)
+
+ let obj
+ try {
+ obj = JSON.parse(data, options ? options.reviver : null)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+
+ return obj
+}
+
+const readFile = universalify.fromPromise(_readFile)
+
+function readFileSync (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ try {
+ let content = fs.readFileSync(file, options)
+ content = stripBom(content)
+ return JSON.parse(content, options.reviver)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+}
+
+async function _writeFile (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+
+ await universalify.fromCallback(fs.writeFile)(file, str, options)
+}
+
+const writeFile = universalify.fromPromise(_writeFile)
+
+function writeFileSync (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+ // not sure if fs.writeFileSync returns anything, but just in case
+ return fs.writeFileSync(file, str, options)
+}
+
+const jsonfile = {
+ readFile,
+ readFileSync,
+ writeFile,
+ writeFileSync
+}
+
+module.exports = jsonfile
diff --git a/node_modules/electron-notarize/node_modules/jsonfile/package.json b/node_modules/electron-notarize/node_modules/jsonfile/package.json
new file mode 100644
index 0000000..4d01eb1
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/jsonfile/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "jsonfile",
+ "version": "6.1.0",
+ "description": "Easily read/write JSON files.",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:jprichardson/node-jsonfile.git"
+ },
+ "keywords": [
+ "read",
+ "write",
+ "file",
+ "json",
+ "fs",
+ "fs-extra"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ },
+ "devDependencies": {
+ "mocha": "^8.2.0",
+ "rimraf": "^2.4.0",
+ "standard": "^16.0.1"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js",
+ "utils.js"
+ ],
+ "scripts": {
+ "lint": "standard",
+ "test": "npm run lint && npm run unit",
+ "unit": "mocha"
+ }
+}
diff --git a/node_modules/electron-notarize/node_modules/jsonfile/utils.js b/node_modules/electron-notarize/node_modules/jsonfile/utils.js
new file mode 100644
index 0000000..b5ff48e
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/jsonfile/utils.js
@@ -0,0 +1,14 @@
+function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
+ const EOF = finalEOL ? EOL : ''
+ const str = JSON.stringify(obj, replacer, spaces)
+
+ return str.replace(/\n/g, EOL) + EOF
+}
+
+function stripBom (content) {
+ // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
+ if (Buffer.isBuffer(content)) content = content.toString('utf8')
+ return content.replace(/^\uFEFF/, '')
+}
+
+module.exports = { stringify, stripBom }
diff --git a/node_modules/electron-notarize/node_modules/ms/index.js b/node_modules/electron-notarize/node_modules/ms/index.js
new file mode 100644
index 0000000..c4498bc
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/electron-notarize/node_modules/ms/license.md b/node_modules/electron-notarize/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/electron-notarize/node_modules/ms/package.json b/node_modules/electron-notarize/node_modules/ms/package.json
new file mode 100644
index 0000000..eea666e
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.1.2",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ }
+}
diff --git a/node_modules/electron-notarize/node_modules/ms/readme.md b/node_modules/electron-notarize/node_modules/ms/readme.md
new file mode 100644
index 0000000..9a1996b
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/electron-notarize/node_modules/universalify/LICENSE b/node_modules/electron-notarize/node_modules/universalify/LICENSE
new file mode 100644
index 0000000..514e84e
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/universalify/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2017, Ryan Zimmerman <opensrc@ryanzim.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the 'Software'), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/electron-notarize/node_modules/universalify/README.md b/node_modules/electron-notarize/node_modules/universalify/README.md
new file mode 100644
index 0000000..aa12474
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/universalify/README.md
@@ -0,0 +1,76 @@
+# universalify
+
+[![Travis branch](https://img.shields.io/travis/RyanZim/universalify/master.svg)](https://travis-ci.org/RyanZim/universalify)
+![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg)
+![npm](https://img.shields.io/npm/dm/universalify.svg)
+![npm](https://img.shields.io/npm/l/universalify.svg)
+
+Make a callback- or promise-based function support both promises and callbacks.
+
+Uses the native promise implementation.
+
+## Installation
+
+```bash
+npm install universalify
+```
+
+## API
+
+### `universalify.fromCallback(fn)`
+
+Takes a callback-based function to universalify, and returns the universalified function.
+
+Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once.
+
+```js
+function callbackFn (n, cb) {
+ setTimeout(() => cb(null, n), 15)
+}
+
+const fn = universalify.fromCallback(callbackFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+### `universalify.fromPromise(fn)`
+
+Takes a promise-based function to universalify, and returns the universalified function.
+
+Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned.
+
+```js
+function promiseFn (n) {
+ return new Promise(resolve => {
+ setTimeout(() => resolve(n), 15)
+ })
+}
+
+const fn = universalify.fromPromise(promiseFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+## License
+
+MIT
diff --git a/node_modules/electron-notarize/node_modules/universalify/index.js b/node_modules/electron-notarize/node_modules/universalify/index.js
new file mode 100644
index 0000000..ba6c662
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/universalify/index.js
@@ -0,0 +1,24 @@
+'use strict'
+
+exports.fromCallback = function (fn) {
+ return Object.defineProperty(function (...args) {
+ if (typeof args[args.length - 1] === 'function') fn.apply(this, args)
+ else {
+ return new Promise((resolve, reject) => {
+ fn.call(
+ this,
+ ...args,
+ (err, res) => (err != null) ? reject(err) : resolve(res)
+ )
+ })
+ }
+ }, 'name', { value: fn.name })
+}
+
+exports.fromPromise = function (fn) {
+ return Object.defineProperty(function (...args) {
+ const cb = args[args.length - 1]
+ if (typeof cb !== 'function') return fn.apply(this, args)
+ else fn.apply(this, args.slice(0, -1)).then(r => cb(null, r), cb)
+ }, 'name', { value: fn.name })
+}
diff --git a/node_modules/electron-notarize/node_modules/universalify/package.json b/node_modules/electron-notarize/node_modules/universalify/package.json
new file mode 100644
index 0000000..006d4cc
--- /dev/null
+++ b/node_modules/electron-notarize/node_modules/universalify/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "universalify",
+ "version": "2.0.0",
+ "description": "Make a callback- or promise-based function support both promises and callbacks.",
+ "keywords": [
+ "callback",
+ "native",
+ "promise"
+ ],
+ "homepage": "https://github.com/RyanZim/universalify#readme",
+ "bugs": "https://github.com/RyanZim/universalify/issues",
+ "license": "MIT",
+ "author": "Ryan Zimmerman <opensrc@ryanzim.com>",
+ "files": [
+ "index.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/RyanZim/universalify.git"
+ },
+ "scripts": {
+ "test": "standard && nyc tape test/*.js | colortape"
+ },
+ "devDependencies": {
+ "colortape": "^0.1.2",
+ "coveralls": "^3.0.1",
+ "nyc": "^15.0.0",
+ "standard": "^14.3.1",
+ "tape": "^5.0.1"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+}
diff --git a/node_modules/electron-notarize/package.json b/node_modules/electron-notarize/package.json
new file mode 100644
index 0000000..18c051a
--- /dev/null
+++ b/node_modules/electron-notarize/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "electron-notarize",
+ "version": "1.2.1",
+ "description": "Notarize your Electron app",
+ "main": "lib/index.js",
+ "typings": "lib/index.d.ts",
+ "author": "Samuel Attard",
+ "license": "MIT",
+ "homepage": "https://github.com/electron/electron-notarize#readme",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/electron/electron-notarize.git"
+ },
+ "bugs": {
+ "url": "https://github.com/electron/electron-notarize/issues"
+ },
+ "scripts": {
+ "build": "tsc",
+ "lint": "prettier --check \"src/**/*.ts\"",
+ "prepare": "yarn build",
+ "test": "jest"
+ },
+ "files": [
+ "lib"
+ ],
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "devDependencies": {
+ "@continuous-auth/semantic-release-npm": "^2.0.0",
+ "@types/debug": "^4.1.5",
+ "@types/fs-extra": "^9.0.1",
+ "@types/jest": "^25.1.4",
+ "@types/node": "^13.7.7",
+ "jest": "^25.1.0",
+ "prettier": "^1.18.2",
+ "semantic-release": "^17.2.3",
+ "ts-jest": "^25.2.1",
+ "typescript": "^3.6.4"
+ },
+ "dependencies": {
+ "debug": "^4.1.1",
+ "fs-extra": "^9.0.1"
+ }
+}
diff --git a/node_modules/electron-osx-sign/LICENSE b/node_modules/electron-osx-sign/LICENSE
new file mode 100644
index 0000000..ce0af62
--- /dev/null
+++ b/node_modules/electron-osx-sign/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2015-2016 Zhuo Lu, Jason Hinkle, et al.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/electron-osx-sign/README.md b/node_modules/electron-osx-sign/README.md
new file mode 100644
index 0000000..12e945f
--- /dev/null
+++ b/node_modules/electron-osx-sign/README.md
@@ -0,0 +1,458 @@
+# electron-osx-sign [![npm][npm_img]][npm_url] [![Build Status][circleci_img]][circleci_url]
+
+Codesign Electron macOS apps
+
+## About
+
+[`electron-osx-sign`][electron-osx-sign] minimizes the extra work needed to eventually prepare your apps for shipping, providing the most basic tools and assets. Note that the bare necessities here are sufficient for enabling app sandbox, yet other configurations for network access etc. require additional work.
+
+Check out [`electron-osx-sign` guide](https://mintkit.net/electron-userland/electron-osx-sign/guide/) for suggestions on setting up your environment and workflow for distribution or development.
+
+Please visit our [wiki](https://github.com/electron-userland/electron-osx-sign/wiki) for walk-throughs, notes and [frequently asked questions](https://github.com/electron-userland/electron-osx-sign/wiki/FAQ) from past projects shipped with [`electron-packager`][electron-packager] and [`electron-osx-sign`][electron-osx-sign].
+
+*NB: Since [`electron-osx-sign`][electron-osx-sign] injects the entry `com.apple.security.application-groups` into the entitlements file as part of the pre-signing process, this would reportedly limit app transfer on iTunes Connect (see [#150](https://github.com/electron-userland/electron-osx-sign/issues/150)). However, opting out entitlements automation `opts['pre-auto-entitlements'] === false` may result in worse graphics performance.*
+
+*The signing procedure implemented in this package is based on what described in [Mac App Store Submission Guide](https://github.com/atom/electron/blob/master/docs/tutorial/mac-app-store-submission-guide.md).*
+
+### [Electron]
+
+It is worth noting as well that starting from [Electron] v1.1.1, a new mechanism was introduced to allow IPC in App Sandbox (see [electron#5601](https://github.com/electron/electron/pull/5601)); wish to have full support of legacy Electron versions, please utilize `opts.version`, which option brings less hassle with making default settings among Electron builds.
+
+We are trying to keep updated to the latest [Electron] specs; please [file us an issue](https://github.com/electron-userland/electron-osx-sign/issues/new) if having any suggestions or experiencing difficulties code signing your products.
+
+### An [OPEN Open Source Project](http://openopensource.org/)
+
+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.
+
+### Collaborators
+
+Thanks to [seanchas116](https://github.com/seanchas116), [jasonhinkle](https://github.com/jasonhinkle), and [develar](https://github.com/develar) for improving the usability of this project implementation.
+
+## Installation
+
+```sh
+# For use in npm scripts
+npm install --save electron-osx-sign
+```
+
+```sh
+# For use from CLI
+npm install -g electron-osx-sign
+```
+
+*Note: `electron-osx-sign` is a dependency of `electron-packager` as of 6.0.0 for signing apps on macOS. However, feel free to install this package globally for more customization beyond specifying identity and entitlements.*
+
+## Usage
+
+### electron-osx-sign
+
+#### From the Command Line
+
+```sh
+electron-osx-sign app [embedded-binary ...] [options ...]
+```
+
+##### Examples
+
+Since `electron-osx-sign` adds the entry `com.apple.developer.team-identifier` to a temporary copy of the specified entitlements file (with the default option `--pre-auto-entitlements`) distribution builds can no longer be run directly. To run the app codesigned for distribution locally after codesigning, you may manually add `ElectronTeamID` in your `Info.plist` and `com.apple.security.application-groups` in the entitlements file, and provide the flag `--no-pre-auto-entitlements` for `electron-osx-sign` to avoid this extra bit. Note that "certain features are only allowed across apps whose team-identifier value match" ([Technical Note TN2415](https://developer.apple.com/library/content/technotes/tn2415/_index.html#//apple_ref/doc/uid/DTS40016427-CH1-ENTITLEMENTSLIST)).
+
+The examples below assume that `--pre-auto-entitlements` is enabled.
+
+- To sign a distribution version by default:
+ ```sh
+ electron-osx-sign path/to/my.app
+ ```
+ For distribution in the Mac App Store: Have the provisioning profile for distribution placed in the current working directory and the signing identity installed in the default keychain. *The app is not expected to run after codesigning since there is no provisioned device, and it is intended only for submission to iTunes Connect.*
+ For distribution outside the Mac App Store: Have the signing identity for distribution installed in the default keychain and optionally place the provisioning profile in the current working directory. By default App Sandbox is not enabled. *The app should run on all devices.*
+
+- To sign development version:
+ ```sh
+ electron-osx-sign path/to/my.app --type=development
+ ```
+ For testing Mac App Store builds: Have the provisioning profile for development placed in the current working directory and the signing identity installed in the default keychain. *The app will only run on provisioned devices.*
+ For testing apps for distribution outside the Mac App Store, have the signing identity for development installed in the default keychain and optionally the provisioning profile placed in the current working directory. *The app will only run on provisioned devices.* However, you may prefer to just go with signing a distribution version because the app is expected to launch properly after codesigned.
+
+- It is recommended to place the provisioning profile(s) under the working directory for `electron-osx-sign` to pick up automatically; however, to specify provisioning profile to be embedded explicitly:
+ ```sh
+ electron-osx-sign path/to/my.app --provisioning-profile=path/to/my.provisionprofile
+ ```
+
+- To specify the entitlements file:
+ ```sh
+ electron-osx-sign path/to/my.app --entitlements=path/to/my.entitlements
+ ```
+
+- It is recommended to make use of `--version` while signing legacy versions of Electron:
+ ```sh
+ electron-osx-sign path/to/my.app --version=0.34.0
+ ```
+
+Run `electron-osx-sign --help` or see [electron-osx-sign-usage.txt](https://github.com/electron-userland/electron-osx-sign/blob/master/bin/electron-osx-sign-usage.txt) for CLI-specific options.
+
+#### From the API
+
+```javascript
+var sign = require('electron-osx-sign')
+sign(opts[, function done (err) {}])
+```
+
+Example:
+
+```javascript
+var sign = require('electron-osx-sign')
+sign({
+ app: 'path/to/my.app'
+}, function done (err) {
+ if (err) {
+ // Handle the error
+ return;
+ }
+ // Application signed
+})
+```
+
+From release v0.4.0-beta, [Bluebird] promises are introduced for better async method calls; the following is also available for use.
+
+```javascript
+var signAsync = require('electron-osx-sign').signAsync
+signAsync(opts)
+ [.then(function () {})]
+ [.catch(function (err) {})]
+```
+
+Example:
+
+```javascript
+var signAsync = require('electron-osx-sign').signAsync
+signAsync({
+ app: 'path/to/my.app'
+})
+ .then(function () {
+ // Application signed
+ })
+ .catch(function (err) {
+ // Handle the error
+ })
+```
+
+###### opts - Options
+
+**Required**
+
+`app` - *String*
+
+Path to the application package.
+Needs file extension `.app`.
+
+**Optional**
+
+`binaries` - *Array*
+
+Path to additional binaries that will be signed along with built-ins of Electron.
+Default to `undefined`.
+
+`entitlements` - *String*
+
+Path to entitlements file for signing the app.
+Default to built-in entitlements file, Sandbox enabled for Mac App Store platform.
+See [default.entitlements.mas.plist](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist) or [default.entitlements.darwin.plist](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.plist) with respect to your platform.
+
+`entitlements-inherit` - *String*
+
+Path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. *This option only applies when signing with entitlements.*
+See [default.entitlements.mas.inherit.plist](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist) or [default.entitlements.darwin.inherit.plist](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist) with respect to your platform.
+
+`entitlements-loginhelper` - *String*
+
+Path to login helper entitlement file. When using App Sandbox, the inherited entitlement should not be used since this is a standalone executable. *This option only applies when signing with entitlements.*
+Default to the same entitlements file used for signing the app bundle.
+
+`entitlementsForFile` - *Function*
+
+Function that receives the path to a file and the current codesign arguments as parameters. If you wish to override the entitlements used for this file path this function should return the absolute path to a different entitlements file.
+
+**Note:** Only available via the JS API
+
+`gatekeeper-assess` - *Boolean*
+
+Flag to enable/disable Gatekeeper assessment after signing the app. Disabling it is useful for signing with self-signed certificates.
+Gatekeeper assessment is enabled by default on `darwin` platform.
+Default to `true`.
+
+`hardenedRuntime` or `hardened-runtime` - *Boolean*
+
+Flag to enable the Mojave hardened runtime when signing the app. Disabled by default, requires Xcode >= 10 and
+macOS >= 10.13.6.
+
+`identity` - *String*
+
+Name of certificate to use when signing.
+Default to be selected with respect to `provisioning-profile` and `platform` from `keychain` or keychain by system default.
+
+Signing platform `mas` will look for `3rd Party Mac Developer Application: * (*)`, and platform `darwin` will look for `Developer ID Application: * (*)` by default.
+
+`identity-validation` - *Boolean*
+
+Flag to enable/disable validation for the signing identity. If enabled, the `identity` provided will be validated in the `keychain` specified.
+Default to `true`.
+
+`keychain` - *String*
+
+The keychain name.
+Default to system default keychain.
+
+`ignore` - *RegExp|Function|Array.<(RegExp|Function)>*
+
+Regex, function or an array of regex's and functions that signal skipping signing a file.
+Elements of other types are treated as `RegExp`.
+Default to `undefined`.
+
+`platform` - *String*
+
+Build platform of Electron.
+Allowed values: `darwin`, `mas`.
+Default to auto detect by presence of `Squirrel.framework` within the application bundle.
+
+`pre-auto-entitlements` - *Boolean*
+
+Flag to enable/disable automation of `com.apple.security.application-groups` in entitlements file and update `Info.plist` with `ElectronTeamID`.
+Default to `true`.
+
+`pre-embed-provisioning-profile` - *Boolean*
+
+Flag to enable/disable embedding of provisioning profile in the current working directory.
+Default to `true`.
+
+`provisioning-profile` - *String*
+
+Path to provisioning profile.
+
+`requirements` - *String*
+
+Specify the criteria that you recommend to be used to evaluate the code signature.
+See more info from https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html
+Default to `undefined`.
+
+`restrict` - *Boolean*
+
+**To be deprecated, see `signature-flags`.**
+Restrict dyld loading. See doc about this [code signature flag](https://developer.apple.com/documentation/security/seccodesignatureflags/kseccodesignaturerestrict?language=objc) for more details. Disabled by default.
+
+`signature-flags` - *String*
+Comma separated string or array for [code signature flag](https://developer.apple.com/documentation/security/seccodesignatureflags?language=objc). Default to `undefined`.
+
+`signature-size` - *Number*
+Provide a value to be passed to `codesign` along with the `--signature-size` flag, to work around the *signature too large to embed* issue. A value of `12000` should do it - see the [FAQ](https://github.com/electron/electron-osx-sign/wiki/FAQ) for details. Default to `undefined`.
+
+`strict-verify` - *Boolean|String|Array.<String>*
+
+Flag to enable/disable `--strict` flag when verifying the signed application bundle.
+If provided as a string, each component should be separated with comma (`,`).
+If provided as an array, each item should be a string corresponding to a component.
+Default to `true`.
+
+`timestamp` - *String*
+
+Specify the URL of the timestamp authority server, default to server provided by Apple. Please note that this default server may not support signatures not furnished by Apple.
+Disable the timestamp service with `none`.
+
+`type` - *String*
+
+Specify whether to sign app for development or for distribution.
+Allowed values: `development`, `distribution`.
+Default to `distribution`.
+
+`version` - *String*
+
+Build version of Electron.
+Values may be like: `1.1.1`, `1.2.0`.
+Default to latest Electron version.
+
+It is recommended to utilize this option for best support of specific Electron versions. This may trigger pre/post operations for signing: For example, automation of setting `com.apple.security.application-groups` in entitlements file and of updating `Info.plist` with `ElectronTeamID` is enabled for all versions starting from `1.1.1`; set `pre-auto-entitlements` option to `false` to disable this feature.
+
+###### cb - Callback
+
+`err` - *Error*
+
+### electron-osx-flat
+
+#### From the Command Line
+
+```sh
+electron-osx-flat app [options ...]
+```
+
+Example:
+
+```sh
+electron-osx-flat path/to/my.app
+```
+
+Run `electron-osx-flat --help` or see [electron-osx-flat-usage.txt](https://github.com/electron-userland/electron-osx-sign/blob/master/bin/electron-osx-flat-usage.txt) for CLI-specific options.
+
+#### From the API
+
+```javascript
+var flat = require('electron-osx-sign').flat
+flat(opts[, function done (err) {}])
+```
+
+Example:
+
+```javascript
+var flat = require('electron-osx-sign').flat
+flat({
+ app: 'path/to/my.app'
+}, function done (err) {
+ if (err) {
+ // Handle the error
+ return;
+ }
+ // Application flattened
+})
+```
+
+From release v0.4.0-beta, [Bluebird] promises are introduced for better async method calls; the following is also available for use.
+
+```javascript
+var flatAsync = require('electron-osx-sign').flatAsync
+flatAsync(opts)
+ [.then(function () {})]
+ [.catch(function (err) {})]
+```
+
+Example:
+
+```javascript
+var flatAsync = require('electron-osx-sign').flatAsync
+flatAsync({
+ app: 'path/to/my.app'
+})
+ .then(function () {
+ // Application flattened
+ })
+ .catch(function (err) {
+ // Handle the error
+ })
+```
+
+###### opts - Options
+
+**Required**
+
+`app` - *String*
+
+Path to the application bundle.
+Needs file extension `.app`.
+
+**Optional**
+
+`identity` - *String*
+
+Name of certificate to use when signing.
+Default to be selected with respect to `platform` from `keychain` or keychain by system default.
+
+Flattening platform `mas` will look for `3rd Party Mac Developer Installer: * (*)`, and platform `darwin` will look for `Developer ID Installer: * (*)` by default.
+
+`identity-validation` - *Boolean*
+
+Flag to enable/disable validation for signing identity. If enabled, the `identity` provided will be validated in the `keychain` specified.
+Default to `true`.
+
+`install` - *String*
+
+Path to install the bundle.
+Default to `/Applications`.
+
+`keychain` - *String*
+
+The keychain name.
+Default to system default keychain.
+
+`platform` - *String*
+
+Build platform of Electron. Allowed values: `darwin`, `mas`.
+Default to auto detect by presence of `Squirrel.framework` within the application bundle.
+
+`pkg` - *String*
+
+Path to the output the flattened package.
+Needs file extension `.pkg`.
+
+`scripts` - *String*
+Path to a directory containing pre and/or post install scripts.
+
+###### cb - Callback
+
+`err` - *Error*
+
+## Debug
+
+As of release v0.3.1, external module `debug` is used to display logs and messages; remember to `export DEBUG=electron-osx-sign*` when necessary.
+
+## Test
+
+The project's configured to run automated tests on CircleCI.
+
+If you wish to manually test the module, first comment out `opts.identity` in `test/basic.js` to enable auto discovery. Then run the command `npm test` from the dev directory.
+
+When this command is run for the first time: `electron-download` will download macOS Electron releases defined in `test/config.json`, and save to `~/.electron/`, which might take up less than 1GB of disk space.
+
+A successful testing should look something like:
+
+```
+$ npm test
+
+> electron-osx-sign@0.4.17 pretest electron-osx-sign
+> rimraf test/work
+
+> electron-osx-sign@0.4.17 test electron-osx-sign
+> standard && tape test
+
+Calling electron-download before running tests...
+Running tests...
+TAP version 13
+# setup
+# defaults-test:v7.0.0-beta.3-darwin-x64
+ok 1 app signed
+# defaults-test:v7.0.0-beta.3-mas-x64
+ok 2 app signed
+# defaults-test:v6.0.3-darwin-x64
+ok 3 app signed
+# defaults-test:v6.0.3-mas-x64
+ok 4 app signed
+# defaults-test:v5.0.10-darwin-x64
+ok 5 app signed
+# defaults-test:v5.0.10-mas-x64
+ok 6 app signed
+# defaults-test:v4.2.9-darwin-x64
+ok 7 app signed
+# defaults-test:v4.2.9-mas-x64
+ok 8 app signed
+# defaults-test:v3.1.2-darwin-x64
+ok 9 app signed
+# defaults-test:v3.1.2-mas-x64
+ok 10 app signed
+# teardown
+
+1..10
+# tests 10
+# pass 10
+
+# ok
+```
+
+## Related
+
+- [electron-packager] - Package your electron app in OS executables (.app, .exe, etc) via JS or CLI
+- [electron-builder] - A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
+
+[Bluebird]: https://github.com/petkaantonov/bluebird
+[Electron]: https://github.com/electron/electron
+[electron-builder]: https://github.com/electron-userland/electron-builder
+[electron-packager]: https://github.com/electron-userland/electron-packager
+[electron-osx-sign]: https://github.com/electron-userland/electron-osx-sign
+[npm_img]: https://img.shields.io/npm/v/electron-osx-sign.svg
+[npm_url]: https://npmjs.org/package/electron-osx-sign
+[circleci_img]: https://img.shields.io/circleci/build/github/electron/electron-osx-sign
+[circleci_url]: https://circleci.com/gh/electron/electron-osx-sign
diff --git a/node_modules/electron-osx-sign/bin/electron-osx-flat-usage.txt b/node_modules/electron-osx-sign/bin/electron-osx-flat-usage.txt
new file mode 100644
index 0000000..e9071ff
--- /dev/null
+++ b/node_modules/electron-osx-sign/bin/electron-osx-flat-usage.txt
@@ -0,0 +1,41 @@
+
+NAME
+ electron-osx-flat -- product building for Electron apps
+
+SYNOPSIS
+ electron-osx-flat app [options ...]
+
+DESCRIPTION
+ app
+ Path to the application package.
+ Needs file extension ``.app''.
+
+ --help
+ Flag to display all commands.
+
+ --identity=identity
+ Name of certificate to use when signing.
+ Default to selected with respect to --platform from --keychain specified or keychain by system default.
+
+ --identity-validation, --no-identity-validation
+ Flag to enable/disable validation for the signing identity.
+
+ --install=install-path
+ Path to install the bundle.
+ Default to ``/Applications''.
+
+ --keychain=keychain
+ The keychain name.
+ Default to system default keychain.
+
+ --platform=platform
+ Build platform of Electron.
+ Allowed values: ``darwin'', ``mas''.
+ Default to auto detect from application bundle.
+
+ --pkg
+ Path to the output the flattened package.
+ Needs file extension ``.pkg''.
+
+ --scripts
+ Path to a directory containing pre and/or post install scripts.
diff --git a/node_modules/electron-osx-sign/bin/electron-osx-flat.js b/node_modules/electron-osx-sign/bin/electron-osx-flat.js
new file mode 100755
index 0000000..57b0ab1
--- /dev/null
+++ b/node_modules/electron-osx-sign/bin/electron-osx-flat.js
@@ -0,0 +1,34 @@
+#!/usr/bin/env node
+
+var fs = require('fs')
+var path = require('path')
+var args = require('minimist')(process.argv.slice(2), {
+ 'boolean': [
+ 'help'
+ ]
+})
+var usage = fs.readFileSync(path.join(__dirname, 'electron-osx-flat-usage.txt')).toString()
+var flat = require('../').flat
+
+args.app = args._.shift()
+
+if (!args.app || args.help) {
+ console.log(usage)
+ process.exit(0)
+}
+
+// Remove excess arguments
+delete args._
+delete args.help
+
+flat(args, function done (err) {
+ if (err) {
+ console.error('Flat failed:')
+ if (err.message) console.error(err.message)
+ else if (err.stack) console.error(err.stack)
+ else console.log(err)
+ process.exit(1)
+ }
+ console.log('Application flattened, saved to:', args.pkg)
+ process.exit(0)
+})
diff --git a/node_modules/electron-osx-sign/bin/electron-osx-sign-usage.txt b/node_modules/electron-osx-sign/bin/electron-osx-sign-usage.txt
new file mode 100644
index 0000000..1d61018
--- /dev/null
+++ b/node_modules/electron-osx-sign/bin/electron-osx-sign-usage.txt
@@ -0,0 +1,97 @@
+
+NAME
+ electron-osx-sign -- code signing for Electron apps
+
+SYNOPSIS
+ electron-osx-sign app [embedded-binary ...] [options ...]
+
+DESCRIPTION
+ app
+ Path to the application package.
+ Needs file extension ``.app''.
+
+ embedded-binary ...
+ Path to additional binaries that will be signed along with built-ins of Electron, spaced.
+
+ --entitlements=file
+ Path to entitlements file for signing the app.
+ Default to built-in entitlements file, Sandbox enabled for Mac App Store platform.
+
+ --entitlements-inherit=file
+ Path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution.
+ This option only applies when signing with entitlements.
+
+ --entitlements-loginhelper=file
+ Path to login helper entitlement file. When using App Sandbox, the inherited entitlement should not be used since this is a standalone executable.
+ This option only applies when signing with entitlements.
+
+ --gatekeeper-assess, --no-gatekeeper-assess
+ Flag to enable/disable Gatekeeper assessment after signing the app. Disabling it is useful for signing with self-signed certificates.
+ Gatekeeper assessment is enabled by default on ``darwin'' platform.
+
+ --hardened-runtime
+ Flag to enable the Mojave hardened runtime when signing the app. Disabled by default, requires Xcode >= 10 and macOS
+ >= 10.13.6.
+
+ --help
+ Flag to display all commands.
+
+ --identity=identity
+ Name of certificate to use when signing.
+ Default to selected with respect to --provisioning-profile and --platform from --keychain specified or keychain by system default.
+
+ --identity-validation, --no-identity-validation
+ Flag to enable/disable validation for the signing identity.
+
+ --ignore=path
+ Path to skip signing. The string will be treated as a regular expression when used to match the file paths.
+
+ --keychain=keychain
+ The keychain name.
+ Default to system default keychain.
+
+ --platform=platform
+ Build platform of Electron.
+ Allowed values: ``darwin'', ``mas''.
+ Default to auto detect from application bundle.
+
+ --pre-auto-entitlements, --no-pre-auto-entitlements
+ Flag to enable/disable automation of entitlements file and Info.plist.
+
+ --pre-embed-provisioning-profile, --no-pre-embed-provisioning-profile
+ Flag to enable/disable embedding of provisioning profile.
+
+ --provisioning-profile=file
+ Path to provisioning profile.
+
+ --requirements=requirements
+ Specify the criteria that you recommend to be used to evaluate the code signature.
+
+ --restrict
+ (This will be deprecated soon, see --sign-flags.)
+ Flag to enable restrict mode. Disabled by default.
+
+ --signature-flags=flags
+ Code signature flags. Default to none.
+
+ --signature-size=size
+ Signature size. Default to none.
+
+ --strict-verify, --strict-verify=options, --no-strict-verify
+ Flag to enable/disable ``--strict'' flag when verifying the signed application bundle.
+ Each component should be separated in ``options'' with comma (``,'').
+ Enabled by default.
+
+ --timestamp=timestamp
+ Specify the URL of the timestamp authority server, default to server provided by Apple.
+ Disable the timestamp service with ``none''.
+
+ --type=type
+ Specify whether to sign app for development or for distribution.
+ Allowed values: ``development'', ``distribution''.
+ Default to ``distribution''.
+
+ --version=version
+ Build version of Electron.
+ Values may be: ``1.2.0''.
+ Default to latest Electron version.
diff --git a/node_modules/electron-osx-sign/bin/electron-osx-sign.js b/node_modules/electron-osx-sign/bin/electron-osx-sign.js
new file mode 100755
index 0000000..dfc6924
--- /dev/null
+++ b/node_modules/electron-osx-sign/bin/electron-osx-sign.js
@@ -0,0 +1,51 @@
+#!/usr/bin/env node
+
+var fs = require('fs')
+var path = require('path')
+var args = require('minimist')(process.argv.slice(2), {
+ 'string': [
+ 'signature-flags'
+ ],
+ 'number': [
+ 'signature-size'
+ ],
+ 'boolean': [
+ 'help',
+ 'pre-auto-entitlements',
+ 'pre-embed-provisioning-profile',
+ 'gatekeeper-assess',
+ 'hardened-runtime',
+ 'restrict'
+ ],
+ 'default': {
+ 'pre-auto-entitlements': true,
+ 'pre-embed-provisioning-profile': true,
+ 'gatekeeper-assess': true
+ }
+})
+var usage = fs.readFileSync(path.join(__dirname, 'electron-osx-sign-usage.txt')).toString()
+var sign = require('../').sign
+
+args.app = args._.shift()
+args.binaries = args._
+
+if (!args.app || args.help) {
+ console.log(usage)
+ process.exit(0)
+}
+
+// Remove excess arguments
+delete args._
+delete args.help
+
+sign(args, function done (err) {
+ if (err) {
+ console.error('Sign failed:')
+ if (err.message) console.error(err.message)
+ else if (err.stack) console.error(err.stack)
+ else console.log(err)
+ process.exit(1)
+ }
+ console.log('Application signed:', args.app)
+ process.exit(0)
+})
diff --git a/node_modules/electron-osx-sign/default.entitlements.darwin.inherit.plist b/node_modules/electron-osx-sign/default.entitlements.darwin.inherit.plist
new file mode 100644
index 0000000..1da3936
--- /dev/null
+++ b/node_modules/electron-osx-sign/default.entitlements.darwin.inherit.plist
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ </dict>
+</plist>
diff --git a/node_modules/electron-osx-sign/default.entitlements.darwin.plist b/node_modules/electron-osx-sign/default.entitlements.darwin.plist
new file mode 100644
index 0000000..1da3936
--- /dev/null
+++ b/node_modules/electron-osx-sign/default.entitlements.darwin.plist
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ </dict>
+</plist>
diff --git a/node_modules/electron-osx-sign/default.entitlements.mas.inherit.plist b/node_modules/electron-osx-sign/default.entitlements.mas.inherit.plist
new file mode 100755
index 0000000..d8dc69e
--- /dev/null
+++ b/node_modules/electron-osx-sign/default.entitlements.mas.inherit.plist
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>com.apple.security.app-sandbox</key>
+ <true/>
+ <key>com.apple.security.inherit</key>
+ <true/>
+ </dict>
+</plist>
diff --git a/node_modules/electron-osx-sign/default.entitlements.mas.plist b/node_modules/electron-osx-sign/default.entitlements.mas.plist
new file mode 100755
index 0000000..8e31f75
--- /dev/null
+++ b/node_modules/electron-osx-sign/default.entitlements.mas.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>com.apple.security.app-sandbox</key>
+ <true/>
+ </dict>
+</plist>
diff --git a/node_modules/electron-osx-sign/flat.js b/node_modules/electron-osx-sign/flat.js
new file mode 100644
index 0000000..688375d
--- /dev/null
+++ b/node_modules/electron-osx-sign/flat.js
@@ -0,0 +1,155 @@
+/**
+ * @module flat
+ */
+
+'use strict'
+
+const path = require('path')
+
+const Promise = require('bluebird')
+
+const pkg = require('./package.json')
+const util = require('./util')
+const debuglog = util.debuglog
+const debugwarn = util.debugwarn
+const execFileAsync = util.execFileAsync
+const validateOptsAppAsync = util.validateOptsAppAsync
+const validateOptsPlatformAsync = util.validateOptsPlatformAsync
+const Identity = require('./util-identities').findIdentitiesAsync
+const findIdentitiesAsync = require('./util-identities').findIdentitiesAsync
+
+/**
+ * This function returns a promise validating all options passed in opts.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+function validateFlatOptsAsync (opts) {
+ if (opts.pkg) {
+ if (typeof opts.pkg !== 'string') return Promise.reject(new Error('`pkg` must be a string.'))
+ if (path.extname(opts.pkg) !== '.pkg') return Promise.reject(new Error('Extension of output package must be `.pkg`.'))
+ } else {
+ debugwarn('No `pkg` passed in arguments, will fallback to default inferred from the given application.')
+ opts.pkg = path.join(path.dirname(opts.app), path.basename(opts.app, '.app') + '.pkg')
+ }
+
+ if (opts.install) {
+ if (typeof opts.install !== 'string') return Promise.reject(new Error('`install` must be a string.'))
+ } else {
+ debugwarn('No `install` passed in arguments, will fallback to default `/Applications`.')
+ opts.install = '/Applications'
+ }
+
+ return Promise.map([
+ validateOptsAppAsync,
+ validateOptsPlatformAsync
+ ], function (validate) {
+ return validate(opts)
+ })
+}
+
+/**
+ * This function returns a promise flattening the application.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+function flatApplicationAsync (opts) {
+ var args = [
+ '--component', opts.app, opts.install,
+ '--sign', opts.identity.name,
+ opts.pkg
+ ]
+ if (opts.keychain) {
+ args.unshift('--keychain', opts.keychain)
+ }
+ if (opts.scripts) {
+ args.unshift('--scripts', opts.scripts)
+ }
+
+ debuglog('Flattening... ' + opts.app)
+ return execFileAsync('productbuild', args)
+ .thenReturn(undefined)
+}
+
+/**
+ * This function is exported and returns a promise flattening the application.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+var flatAsync = module.exports.flatAsync = function (opts) {
+ debuglog('electron-osx-sign@%s', pkg.version)
+ return validateFlatOptsAsync(opts)
+ .then(function () {
+ var promise
+ if (opts.identity) {
+ debuglog('`identity` passed in arguments.')
+ if (opts['identity-validation'] === false || opts.identity instanceof Identity) {
+ return Promise.resolve()
+ }
+ promise = findIdentitiesAsync(opts, opts.identity)
+ } else {
+ debugwarn('No `identity` passed in arguments...')
+ if (opts.platform === 'mas') {
+ debuglog('Finding `3rd Party Mac Developer Installer` certificate for flattening app distribution in the Mac App Store...')
+ promise = findIdentitiesAsync(opts, '3rd Party Mac Developer Installer:')
+ } else {
+ debuglog('Finding `Developer ID Application` certificate for distribution outside the Mac App Store...')
+ promise = findIdentitiesAsync(opts, 'Developer ID Installer:')
+ }
+ }
+ return promise
+ .then(function (identities) {
+ if (identities.length > 0) {
+ // Provisioning profile(s) found
+ if (identities.length > 1) {
+ debugwarn('Multiple identities found, will use the first discovered.')
+ } else {
+ debuglog('Found 1 identity.')
+ }
+ opts.identity = identities[0]
+ } else {
+ // No identity found
+ return Promise.reject(new Error('No identity found for signing.'))
+ }
+ })
+ })
+ .then(function () {
+ // Pre-flat operations
+ })
+ .then(function () {
+ debuglog('Flattening application...', '\n',
+ '> Application:', opts.app, '\n',
+ '> Package output:', opts.pkg, '\n',
+ '> Install path:', opts.install, '\n',
+ '> Identity:', opts.identity, '\n',
+ '> Scripts:', opts.scripts)
+ return flatApplicationAsync(opts)
+ })
+ .then(function () {
+ // Post-flat operations
+ debuglog('Application flattened.')
+ })
+}
+
+/**
+ * This function is exported with normal callback implementation.
+ * @function
+ * @param {Object} opts - Options.
+ * @param {RequestCallback} cb - Callback.
+ */
+module.exports.flat = function (opts, cb) {
+ flatAsync(opts)
+ .then(function () {
+ debuglog('Application flattened, saved to: ' + opts.app)
+ if (cb) cb()
+ })
+ .catch(function (err) {
+ debuglog('Flat failed:')
+ if (err.message) debuglog(err.message)
+ else if (err.stack) debuglog(err.stack)
+ else debuglog(err)
+ if (cb) cb(err)
+ })
+}
diff --git a/node_modules/electron-osx-sign/index.d.ts b/node_modules/electron-osx-sign/index.d.ts
new file mode 100644
index 0000000..d1b4ce1
--- /dev/null
+++ b/node_modules/electron-osx-sign/index.d.ts
@@ -0,0 +1,41 @@
+declare module "electron-osx-sign" {
+ interface BaseSignOptions {
+ app: string;
+ identity?: string;
+ platform?: string;
+ keychain?: string;
+ }
+
+ interface SignOptions extends BaseSignOptions {
+ binaries?: string[];
+ entitlements?: string;
+ 'entitlements-inherit'?: string;
+ 'entitlements-loginhelper'?: string;
+ 'gatekeeper-assess'?: boolean;
+ hardenedRuntime?: boolean;
+ 'identity-validation'?: boolean;
+ ignore?: string;
+ 'pre-auto-entitlements'?: boolean;
+ 'pre-embed-provisioning-profile'?: boolean;
+ 'provisioning-profile'?: string;
+ 'requirements'?: string;
+ 'signature-size'?: number;
+ 'type'?: string;
+ version?: string;
+ }
+
+ export function sign(opts: SignOptions, callback: (error: Error) => void): void;
+
+ export function signAsync(opts: SignOptions): Promise<any>;
+
+ interface FlatOptions extends BaseSignOptions {
+ 'identity-validation'?: boolean;
+ install?: string;
+ pkg?: string;
+ scripts?: string;
+ }
+
+ export function flat(opts: FlatOptions, callback: (error: Error) => void): void;
+
+ export function flatAsync(opts: FlatOptions): Promise<any>;
+}
diff --git a/node_modules/electron-osx-sign/index.js b/node_modules/electron-osx-sign/index.js
new file mode 100644
index 0000000..ead61a4
--- /dev/null
+++ b/node_modules/electron-osx-sign/index.js
@@ -0,0 +1,47 @@
+/**
+ * @module electron-osx-sign
+ */
+
+'use strict'
+
+const sign = require('./sign')
+const flat = require('./flat')
+
+/**
+ * This function is a normal callback implementation.
+ * @param {Object} opts - Options.
+ * @param {RequestCallback} cb - Callback.
+ */
+module.exports = sign.sign // Aliasing
+
+/**
+ * This function is a normal callback implementation.
+ * @function
+ * @param {Object} opts - Options.
+ * @param {RequestCallback} cb - Callback.
+ */
+module.exports.sign = sign.sign
+
+/**
+ * This function returns a promise signing the application.
+ * @function
+ * @param {mixed} opts - Options.
+ * @returns {Promise} Promise.
+ */
+module.exports.signAsync = sign.signAsync
+
+/**
+ * This function is exported with normal callback implementation.
+ * @function
+ * @param {Object} opts - Options.
+ * @param {RequestCallback} cb - Callback.
+ */
+module.exports.flat = flat.flat
+
+/**
+ * This function is exported and returns a promise flattening the application.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+module.exports.flatAsync = flat.flatAsync
diff --git a/node_modules/electron-osx-sign/node_modules/debug/.coveralls.yml b/node_modules/electron-osx-sign/node_modules/debug/.coveralls.yml
new file mode 100644
index 0000000..20a7068
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/node_modules/electron-osx-sign/node_modules/debug/.eslintrc b/node_modules/electron-osx-sign/node_modules/debug/.eslintrc
new file mode 100644
index 0000000..8a37ae2
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "rules": {
+ "no-console": 0,
+ "no-empty": [1, { "allowEmptyCatch": true }]
+ },
+ "extends": "eslint:recommended"
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/.npmignore b/node_modules/electron-osx-sign/node_modules/debug/.npmignore
new file mode 100644
index 0000000..5f60eec
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/.npmignore
@@ -0,0 +1,9 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
+coverage
+bower.json
diff --git a/node_modules/electron-osx-sign/node_modules/debug/.travis.yml b/node_modules/electron-osx-sign/node_modules/debug/.travis.yml
new file mode 100644
index 0000000..6c6090c
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/.travis.yml
@@ -0,0 +1,14 @@
+
+language: node_js
+node_js:
+ - "6"
+ - "5"
+ - "4"
+
+install:
+ - make node_modules
+
+script:
+ - make lint
+ - make test
+ - make coveralls
diff --git a/node_modules/electron-osx-sign/node_modules/debug/CHANGELOG.md b/node_modules/electron-osx-sign/node_modules/debug/CHANGELOG.md
new file mode 100644
index 0000000..eadaa18
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,362 @@
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/electron-osx-sign/node_modules/debug/LICENSE b/node_modules/electron-osx-sign/node_modules/debug/LICENSE
new file mode 100644
index 0000000..658c933
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/electron-osx-sign/node_modules/debug/Makefile b/node_modules/electron-osx-sign/node_modules/debug/Makefile
new file mode 100644
index 0000000..584da8b
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/Makefile
@@ -0,0 +1,50 @@
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+.FORCE:
+
+install: node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+lint: .FORCE
+ eslint browser.js debug.js index.js node.js
+
+test-node: .FORCE
+ istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+
+test-browser: .FORCE
+ mkdir -p dist
+
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+ karma start --single-run
+ rimraf dist
+
+test: .FORCE
+ concurrently \
+ "make test-node" \
+ "make test-browser"
+
+coveralls:
+ cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+.PHONY: all install clean distclean
diff --git a/node_modules/electron-osx-sign/node_modules/debug/README.md b/node_modules/electron-osx-sign/node_modules/debug/README.md
new file mode 100644
index 0000000..f67be6b
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/README.md
@@ -0,0 +1,312 @@
+# debug
+[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+
+
+A tiny node.js debugging utility modelled after node core's debugging technique.
+
+**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+ Note that PowerShell uses different syntax to set environment variables.
+
+ ```cmd
+ $env:DEBUG = "*,-not_this"
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Environment Variables
+
+ When running through Node.js, you can set a few environment variables that will
+ change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+ __Note:__ The environment variables beginning with `DEBUG_` end up being
+ converted into an Options object that gets used with `%o`/`%O` formatters.
+ See the Node.js documentation for
+ [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+ for the complete list.
+
+## Formatters
+
+
+ Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+### Custom formatters
+
+ You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+## Browser support
+ You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+ or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+ if you don't want to build it yourself.
+
+ Debug's enable state is currently persisted by `localStorage`.
+ Consider the situation shown below where you have `worker:a` and `worker:b`,
+ and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/electron-osx-sign/node_modules/debug/component.json b/node_modules/electron-osx-sign/node_modules/debug/component.json
new file mode 100644
index 0000000..9de2641
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.6.9",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "src/browser.js",
+ "scripts": [
+ "src/browser.js",
+ "src/debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/karma.conf.js b/node_modules/electron-osx-sign/node_modules/debug/karma.conf.js
new file mode 100644
index 0000000..103a82d
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/karma.conf.js
@@ -0,0 +1,70 @@
+// Karma configuration
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
+
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'dist/debug.js',
+ 'test/*spec.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ 'src/node.js'
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['progress'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/node.js b/node_modules/electron-osx-sign/node_modules/debug/node.js
new file mode 100644
index 0000000..7fc36fe
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/node_modules/electron-osx-sign/node_modules/debug/package.json b/node_modules/electron-osx-sign/node_modules/debug/package.json
new file mode 100644
index 0000000..dc787ba
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "debug",
+ "version": "2.6.9",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ }
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/src/browser.js b/node_modules/electron-osx-sign/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..7106924
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/src/browser.js
@@ -0,0 +1,185 @@
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return;
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit')
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/src/debug.js b/node_modules/electron-osx-sign/node_modules/debug/src/debug.js
new file mode 100644
index 0000000..6a5e3fc
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/src/debug.js
@@ -0,0 +1,202 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
+
+ var self = debug;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ return debug;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ exports.names = [];
+ exports.skips = [];
+
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/src/index.js b/node_modules/electron-osx-sign/node_modules/debug/src/index.js
new file mode 100644
index 0000000..e12cf4d
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process !== 'undefined' && process.type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/src/inspector-log.js b/node_modules/electron-osx-sign/node_modules/debug/src/inspector-log.js
new file mode 100644
index 0000000..60ea6c0
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/src/inspector-log.js
@@ -0,0 +1,15 @@
+module.exports = inspectorLog;
+
+// black hole
+const nullStream = new (require('stream').Writable)();
+nullStream._write = () => {};
+
+/**
+ * Outputs a `console.log()` to the Node.js Inspector console *only*.
+ */
+function inspectorLog() {
+ const stdout = console._stdout;
+ console._stdout = nullStream;
+ console.log.apply(console, arguments);
+ console._stdout = stdout;
+}
diff --git a/node_modules/electron-osx-sign/node_modules/debug/src/node.js b/node_modules/electron-osx-sign/node_modules/debug/src/node.js
new file mode 100644
index 0000000..b15109c
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/debug/src/node.js
@@ -0,0 +1,248 @@
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // camel-case
+ var prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+ // coerce string value into JS value
+ var val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === 'null') val = null;
+ else val = Number(val);
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+
+if (1 !== fd && 2 !== fd) {
+ util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
+}
+
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var name = this.namespace;
+ var useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ */
+
+function log() {
+ return stream.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+ debug.inspectOpts = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/node_modules/electron-osx-sign/node_modules/ms/index.js b/node_modules/electron-osx-sign/node_modules/ms/index.js
new file mode 100644
index 0000000..6a522b1
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/ms/index.js
@@ -0,0 +1,152 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) {
+ return;
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name;
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/node_modules/electron-osx-sign/node_modules/ms/license.md b/node_modules/electron-osx-sign/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/electron-osx-sign/node_modules/ms/package.json b/node_modules/electron-osx-sign/node_modules/ms/package.json
new file mode 100644
index 0000000..6a31c81
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.0.0",
+ "description": "Tiny milisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "expect.js": "0.3.1",
+ "husky": "0.13.3",
+ "lint-staged": "3.4.1",
+ "mocha": "3.4.1"
+ }
+}
diff --git a/node_modules/electron-osx-sign/node_modules/ms/readme.md b/node_modules/electron-osx-sign/node_modules/ms/readme.md
new file mode 100644
index 0000000..84a9974
--- /dev/null
+++ b/node_modules/electron-osx-sign/node_modules/ms/readme.md
@@ -0,0 +1,51 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+```
+
+### Convert from milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time format written-out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+
+## Caught a bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/electron-osx-sign/package.json b/node_modules/electron-osx-sign/package.json
new file mode 100644
index 0000000..c96b9d9
--- /dev/null
+++ b/node_modules/electron-osx-sign/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "electron-osx-sign",
+ "version": "0.5.0",
+ "description": "Codesign Electron macOS apps",
+ "main": "index.js",
+ "bin": {
+ "electron-osx-flat": "bin/electron-osx-flat.js",
+ "electron-osx-sign": "bin/electron-osx-sign.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/electron-userland/electron-osx-sign.git"
+ },
+ "author": "sethlu",
+ "license": "BSD-2-Clause",
+ "bugs": {
+ "url": "https://github.com/electron-userland/electron-osx-sign/issues"
+ },
+ "homepage": "https://github.com/electron-userland/electron-osx-sign",
+ "dependencies": {
+ "bluebird": "^3.5.0",
+ "compare-version": "^0.1.2",
+ "debug": "^2.6.8",
+ "isbinaryfile": "^3.0.2",
+ "minimist": "^1.2.0",
+ "plist": "^3.0.1"
+ },
+ "devDependencies": {
+ "electron-download": "^4.1.0",
+ "eslint": "^4.2.0",
+ "eslint-config-eslint": "^4.0.0",
+ "extract-zip": "^1.6.5",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.6.1",
+ "run-series": "^1.1.4",
+ "run-waterfall": "^1.1.3",
+ "standard": "^10.0.2",
+ "tape": "^4.7.0"
+ },
+ "scripts": {
+ "code-standard": "standard",
+ "pretest": "rimraf test/work",
+ "test": "standard && tape test"
+ },
+ "standard": {
+ "ignore": [
+ "test/work"
+ ]
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+}
diff --git a/node_modules/electron-osx-sign/sign.js b/node_modules/electron-osx-sign/sign.js
new file mode 100644
index 0000000..e227c0e
--- /dev/null
+++ b/node_modules/electron-osx-sign/sign.js
@@ -0,0 +1,464 @@
+/**
+ * @module sign
+ */
+
+'use strict'
+
+const path = require('path')
+
+const Promise = require('bluebird')
+const compareVersion = require('compare-version')
+
+const pkg = require('./package.json')
+const util = require('./util')
+const debuglog = util.debuglog
+const debugwarn = util.debugwarn
+const getAppContentsPath = util.getAppContentsPath
+const execFileAsync = util.execFileAsync
+const validateOptsAppAsync = util.validateOptsAppAsync
+const validateOptsPlatformAsync = util.validateOptsPlatformAsync
+const walkAsync = util.walkAsync
+const Identity = require('./util-identities').Identity
+const findIdentitiesAsync = require('./util-identities').findIdentitiesAsync
+const ProvisioningProfile = require('./util-provisioning-profiles').ProvisioningProfile
+const preEmbedProvisioningProfile = require('./util-provisioning-profiles').preEmbedProvisioningProfile
+const preAutoEntitlements = require('./util-entitlements').preAutoEntitlements
+
+const osRelease = require('os').release()
+
+/**
+ * This function returns a promise validating opts.binaries, the additional binaries to be signed along with the discovered enclosed components.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+function validateOptsBinariesAsync (opts) {
+ return new Promise(function (resolve, reject) {
+ if (opts.binaries) {
+ if (!Array.isArray(opts.binaries)) {
+ reject(new Error('Additional binaries should be an Array.'))
+ return
+ }
+ // TODO: Presence check for binary files, reject if any does not exist
+ }
+ resolve()
+ })
+}
+
+/**
+ * This function returns a promise validating all options passed in opts.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+function validateSignOptsAsync (opts) {
+ if (opts.ignore && !(opts.ignore instanceof Array)) {
+ opts.ignore = [opts.ignore]
+ }
+
+ if (opts['provisioning-profile']) {
+ if (typeof opts['provisioning-profile'] !== 'string' && !(opts['provisioning-profile'] instanceof ProvisioningProfile)) return Promise.reject(new Error('Path to provisioning profile should be a string or a ProvisioningProfile object.'))
+ }
+
+ if (opts['type']) {
+ if (opts['type'] !== 'development' && opts['type'] !== 'distribution') return Promise.reject(new Error('Type must be either `development` or `distribution`.'))
+ } else {
+ opts['type'] = 'distribution'
+ }
+
+ return Promise.map([
+ validateOptsAppAsync,
+ validateOptsPlatformAsync,
+ validateOptsBinariesAsync
+ ], function (validate) {
+ return validate(opts)
+ })
+}
+
+/**
+ * This function returns a promise verifying the code sign of application bundle.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise resolving output.
+ */
+function verifySignApplicationAsync (opts) {
+ // Verify with codesign
+ var compareVersion = require('compare-version')
+ debuglog('Verifying application bundle with codesign...')
+
+ var promise = execFileAsync('codesign', [
+ '--verify',
+ '--deep'
+ ]
+ .concat(
+ opts['strict-verify'] !== false &&
+ compareVersion(osRelease, '15.0.0') >= 0 // Strict flag since darwin 15.0.0 --> OS X 10.11.0 El Capitan
+ ? ['--strict' +
+ (opts['strict-verify']
+ ? '=' + opts['strict-verify'] // Array should be converted to a comma separated string
+ : '')]
+ : [],
+ ['--verbose=2', opts.app]))
+
+ // Additionally test Gatekeeper acceptance for darwin platform
+ if (opts.platform === 'darwin' && opts['gatekeeper-assess'] !== false) {
+ promise = promise
+ .then(function () {
+ debuglog('Verifying Gatekeeper acceptance for darwin platform...')
+ return execFileAsync('spctl', [
+ '--assess',
+ '--type', 'execute',
+ '--verbose',
+ '--ignore-cache',
+ '--no-cache',
+ opts.app
+ ])
+ })
+ }
+
+ return promise
+ .thenReturn()
+}
+
+/**
+ * This function returns a promise codesigning only.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+function signApplicationAsync (opts) {
+ return walkAsync(getAppContentsPath(opts))
+ .then(function (childPaths) {
+ function ignoreFilePath (opts, filePath) {
+ if (opts.ignore) {
+ return opts.ignore.some(function (ignore) {
+ if (typeof ignore === 'function') {
+ return ignore(filePath)
+ }
+ return filePath.match(ignore)
+ })
+ }
+ return false
+ }
+
+ if (opts.binaries) childPaths = childPaths.concat(opts.binaries)
+
+ var args = [
+ '--sign', opts.identity.hash || opts.identity.name,
+ '--force'
+ ]
+ if (opts.keychain) {
+ args.push('--keychain', opts.keychain)
+ }
+ if (opts.requirements) {
+ args.push('--requirements', opts.requirements)
+ }
+ if (opts.timestamp) {
+ args.push('--timestamp=' + opts.timestamp)
+ } else {
+ args.push('--timestamp')
+ }
+ if (opts['signature-size']) {
+ if (Number.isInteger(opts['signature-size']) && opts['signature-size'] > 0) {
+ args.push('--signature-size', opts['signature-size'])
+ } else {
+ debugwarn(`Invalid value provided for --signature-size (${opts['signature-size']}). Must be a positive integer.`)
+ }
+ }
+
+ let optionsArguments = []
+
+ if (opts['signature-flags']) {
+ if (Array.isArray(opts['signature-flags'])) {
+ optionsArguments = [...opts['signature-flags']]
+ } else {
+ const flags = opts['signature-flags'].split(',').map(function (flag) { return flag.trim() })
+ optionsArguments = [...flags]
+ }
+ }
+
+ if (opts.hardenedRuntime || opts['hardened-runtime'] || optionsArguments.includes('runtime')) {
+ // Hardened runtime since darwin 17.7.0 --> macOS 10.13.6
+ if (compareVersion(osRelease, '17.7.0') >= 0) {
+ optionsArguments.push('runtime')
+ } else {
+ // Remove runtime if passed in with --signature-flags
+ debuglog('Not enabling hardened runtime, current macOS version too low, requires 10.13.6 and higher')
+ optionsArguments = optionsArguments.filter(function (element, index) { return element !== 'runtime' })
+ }
+ }
+
+ if (opts['restrict']) {
+ optionsArguments.push('restrict')
+ debugwarn('This flag is to be deprecated, consider using --signature-flags=restrict instead')
+ }
+
+ if (optionsArguments.length) {
+ args.push('--options', [...new Set(optionsArguments)].join(','))
+ }
+
+ var promise
+ /**
+ * Sort the child paths by how deep they are in the file tree. Some arcane apple
+ * logic expects the deeper files to be signed first otherwise strange errors get
+ * thrown our way
+ */
+ childPaths = childPaths.sort((a, b) => {
+ const aDepth = a.split(path.sep).length
+ const bDepth = b.split(path.sep).length
+ return bDepth - aDepth
+ })
+ if (opts.entitlements) {
+ // Sign with entitlements
+ promise = Promise.mapSeries(childPaths, function (filePath) {
+ if (ignoreFilePath(opts, filePath)) {
+ debuglog('Skipped... ' + filePath)
+ return
+ }
+ debuglog('Signing... ' + filePath)
+
+ let entitlementsFile = opts['entitlements-inherit']
+ if (filePath.includes('Library/LoginItems')) {
+ entitlementsFile = opts['entitlements-loginhelper']
+ }
+
+ const clonedArgs = args.concat([]);
+ if (opts.entitlementsForFile) {
+ entitlementsFile = opts.entitlementsForFile(filePath, clonedArgs) || entitlementsFile
+ }
+
+ return execFileAsync('codesign', clonedArgs.concat('--entitlements', entitlementsFile, filePath))
+ })
+ .then(function () {
+ debuglog('Signing... ' + opts.app)
+
+ const clonedArgs = args.concat([]);
+ let entitlementsFile = opts.entitlements
+ if (opts.entitlementsForFile) {
+ entitlementsFile = opts.entitlementsForFile(opts.app, clonedArgs) || entitlementsFile;
+ }
+
+ return execFileAsync('codesign', clonedArgs.concat('--entitlements', opts.entitlements, opts.app))
+ })
+ } else {
+ // Otherwise normally
+ promise = Promise.mapSeries(childPaths, function (filePath) {
+ if (ignoreFilePath(opts, filePath)) {
+ debuglog('Skipped... ' + filePath)
+ return
+ }
+ debuglog('Signing... ' + filePath)
+ return execFileAsync('codesign', args.concat(filePath))
+ })
+ .then(function () {
+ debuglog('Signing... ' + opts.app)
+ return execFileAsync('codesign', args.concat(opts.app))
+ })
+ }
+
+ return promise
+ .then(function () {
+ // Verify code sign
+ debuglog('Verifying...')
+ var promise = verifySignApplicationAsync(opts)
+ .then(function (result) {
+ debuglog('Verified.')
+ })
+
+ // Check entitlements if applicable
+ if (opts.entitlements) {
+ promise = promise
+ .then(function () {
+ debuglog('Displaying entitlements...')
+ return execFileAsync('codesign', [
+ '--display',
+ '--entitlements', ':-', // Write to standard output and strip off the blob header
+ opts.app
+ ])
+ })
+ .then(function (result) {
+ debuglog('Entitlements:', '\n',
+ result)
+ })
+ }
+
+ return promise
+ })
+ })
+}
+
+/**
+ * This function returns a promise signing the application.
+ * @function
+ * @param {mixed} opts - Options.
+ * @returns {Promise} Promise.
+ */
+var signAsync = module.exports.signAsync = function (opts) {
+ debuglog('electron-osx-sign@%s', pkg.version)
+ return validateSignOptsAsync(opts)
+ .then(function () {
+ // Determine identity for signing
+ var promise
+ if (opts.identity) {
+ debuglog('`identity` passed in arguments.')
+ if (opts['identity-validation'] === false) {
+ if (!(opts.identity instanceof Identity)) {
+ opts.identity = new Identity(opts.identity)
+ }
+ return Promise.resolve()
+ }
+ promise = findIdentitiesAsync(opts, opts.identity)
+ } else {
+ debugwarn('No `identity` passed in arguments...')
+ if (opts.platform === 'mas') {
+ if (opts.type === 'distribution') {
+ debuglog('Finding `3rd Party Mac Developer Application` certificate for signing app distribution in the Mac App Store...')
+ promise = findIdentitiesAsync(opts, '3rd Party Mac Developer Application:')
+ } else {
+ debuglog('Finding `Mac Developer` certificate for signing app in development for the Mac App Store signing...')
+ promise = findIdentitiesAsync(opts, 'Mac Developer:')
+ }
+ } else {
+ debuglog('Finding `Developer ID Application` certificate for distribution outside the Mac App Store...')
+ promise = findIdentitiesAsync(opts, 'Developer ID Application:')
+ }
+ }
+ return promise
+ .then(function (identities) {
+ if (identities.length > 0) {
+ // Identity(/ies) found
+ if (identities.length > 1) {
+ debugwarn('Multiple identities found, will use the first discovered.')
+ } else {
+ debuglog('Found 1 identity.')
+ }
+ opts.identity = identities[0]
+ } else {
+ // No identity found
+ return Promise.reject(new Error('No identity found for signing.'))
+ }
+ })
+ })
+ .then(function () {
+ // Determine entitlements for code signing
+ var filePath
+ if (opts.platform === 'mas') {
+ // To sign apps for Mac App Store, an entitlements file is required, especially for app sandboxing (as well some other services).
+ // Fallback entitlements for sandboxing by default: Note this may cause troubles while running an signed app due to missing keys special to the project.
+ // Further reading: https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html
+ if (!opts.entitlements) {
+ filePath = path.join(__dirname, 'default.entitlements.mas.plist')
+ debugwarn('No `entitlements` passed in arguments:', '\n',
+ '* Sandbox entitlements are required for Mac App Store distribution, your codesign entitlements file is default to:', filePath)
+ opts.entitlements = filePath
+ }
+ if (!opts['entitlements-inherit']) {
+ filePath = path.join(__dirname, 'default.entitlements.mas.inherit.plist')
+ debugwarn('No `entitlements-inherit` passed in arguments:', '\n',
+ '* Sandbox entitlements file for enclosed app files is default to:', filePath)
+ opts['entitlements-inherit'] = filePath
+ }
+ // The default value for opts['entitlements-file'] will be processed later
+ } else {
+ // Not necessary to have entitlements for non Mac App Store distribution
+ if (!opts.entitlements) {
+ debugwarn('No `entitlements` passed in arguments:', '\n',
+ '* Provide `entitlements` to specify entitlements file for codesign.')
+ } else {
+ // If entitlements is provided as a boolean flag, fallback to default
+ if (opts.entitlements === true) {
+ filePath = path.join(__dirname, 'default.entitlements.darwin.plist')
+ debugwarn('`entitlements` not specified in arguments:', '\n',
+ '* Provide `entitlements` to specify entitlements file for codesign.', '\n',
+ '* Entitlements file is default to:', filePath)
+ opts.entitlements = filePath
+ }
+ if (!opts['entitlements-inherit']) {
+ filePath = path.join(__dirname, 'default.entitlements.darwin.inherit.plist')
+ debugwarn('No `entitlements-inherit` passed in arguments:', '\n',
+ '* Entitlements file for enclosed app files is default to:', filePath)
+ opts['entitlements-inherit'] = filePath
+ }
+ // The default value for opts['entitlements-file'] will be processed later
+ }
+ }
+ })
+ .then(function () {
+ // Pre-sign operations
+ var preSignOperations = []
+
+ if (opts['pre-embed-provisioning-profile'] === false) {
+ debugwarn('Pre-sign operation disabled for provisioning profile embedding:', '\n',
+ '* Enable by setting `pre-embed-provisioning-profile` to `true`.')
+ } else {
+ debuglog('Pre-sign operation enabled for provisioning profile:', '\n',
+ '* Disable by setting `pre-embed-provisioning-profile` to `false`.')
+ preSignOperations.push(preEmbedProvisioningProfile)
+ }
+
+ if (opts['pre-auto-entitlements'] === false) {
+ debugwarn('Pre-sign operation disabled for entitlements automation.')
+ } else {
+ debuglog('Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`:', '\n',
+ '* Disable by setting `pre-auto-entitlements` to `false`.')
+ if (opts.entitlements && (!opts.version || compareVersion(opts.version, '1.1.1') >= 0)) {
+ // Enable Mac App Store sandboxing without using temporary-exception, introduced in Electron v1.1.1. Relates to electron#5601
+ preSignOperations.push(preAutoEntitlements)
+ }
+ }
+
+ // preAutoEntitlements may update opts.entitlements,
+ // so we wait after it's done before giving opts['entitlements-loginhelper'] its default value
+ preSignOperations.push(function (opts) {
+ if (opts.entitlements) {
+ if (!opts['entitlements-loginhelper']) {
+ // Default to App Sandbox enabled
+ const filePath = opts.entitlements
+ debugwarn('No `entitlements-loginhelper` passed in arguments:', '\n',
+ '* Entitlements file for login helper is default to:', filePath)
+ opts['entitlements-loginhelper'] = filePath
+ }
+ }
+ })
+
+ return Promise.mapSeries(preSignOperations, function (preSignOperation) {
+ return preSignOperation(opts)
+ })
+ })
+ .then(function () {
+ debuglog('Signing application...', '\n',
+ '> Application:', opts.app, '\n',
+ '> Platform:', opts.platform, '\n',
+ '> Entitlements:', opts.entitlements, '\n',
+ '> Child entitlements:', opts['entitlements-inherit'], '\n',
+ '> Login helper entitlements:', opts['entitlements-loginhelper'], '\n',
+ '> Additional binaries:', opts.binaries, '\n',
+ '> Identity:', opts.identity)
+ return signApplicationAsync(opts)
+ })
+ .then(function () {
+ // Post-sign operations
+ debuglog('Application signed.')
+ })
+}
+
+/**
+ * This function is a normal callback implementation.
+ * @function
+ * @param {Object} opts - Options.
+ * @param {RequestCallback} cb - Callback.
+ */
+module.exports.sign = function (opts, cb) {
+ signAsync(opts)
+ .then(function () {
+ debuglog('Application signed: ' + opts.app)
+ if (cb) cb()
+ })
+ .catch(function (err) {
+ debuglog('Sign failed:')
+ if (err.message) debuglog(err.message)
+ else if (err.stack) debuglog(err.stack)
+ else debuglog(err)
+ if (cb) cb(err)
+ })
+}
diff --git a/node_modules/electron-osx-sign/util-entitlements.js b/node_modules/electron-osx-sign/util-entitlements.js
new file mode 100644
index 0000000..fed42ac
--- /dev/null
+++ b/node_modules/electron-osx-sign/util-entitlements.js
@@ -0,0 +1,102 @@
+/**
+ * @module util-entitlements
+ */
+
+'use strict'
+
+const os = require('os')
+const path = require('path')
+
+const plist = require('plist')
+
+const util = require('./util')
+const debuglog = util.debuglog
+const getAppContentsPath = util.getAppContentsPath
+const readFileAsync = util.readFileAsync
+const writeFileAsync = util.writeFileAsync
+
+let tmpFileCounter = 0
+
+/**
+ * This function returns a promise completing the entitlements automation: The process includes checking in `Info.plist` for `ElectronTeamID` or setting parsed value from identity, and checking in entitlements file for `com.apple.security.application-groups` or inserting new into array. A temporary entitlements file may be created to replace the input for any changes introduced.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+module.exports.preAutoEntitlements = function (opts) {
+ // If entitlements file not provided, default will be used. Fixes #41
+ var appInfoPath = path.join(getAppContentsPath(opts), 'Info.plist')
+ var appInfo
+ var entitlements
+
+ debuglog('Automating entitlement app group...', '\n',
+ '> Info.plist:', appInfoPath, '\n',
+ '> Entitlements:', opts.entitlements)
+ return readFileAsync(opts.entitlements, 'utf8')
+ .then(function (result) {
+ entitlements = plist.parse(result)
+ if (!entitlements['com.apple.security.app-sandbox']) {
+ // Only automate when app sandbox enabled by user
+ return
+ }
+
+ return readFileAsync(appInfoPath, 'utf8')
+ .then(function (result) {
+ appInfo = plist.parse(result)
+ // Use ElectronTeamID in Info.plist if already specified
+ if (appInfo.ElectronTeamID) {
+ debuglog('`ElectronTeamID` found in `Info.plist`: ' + appInfo.ElectronTeamID)
+ } else {
+ // The team identifier in signing identity should not be trusted
+ if (opts['provisioning-profile']) {
+ appInfo.ElectronTeamID = opts['provisioning-profile'].message.Entitlements['com.apple.developer.team-identifier']
+ debuglog('`ElectronTeamID` not found in `Info.plist`, use parsed from provisioning profile: ' + appInfo.ElectronTeamID)
+ } else {
+ appInfo.ElectronTeamID = opts.identity.name.substring(opts.identity.name.indexOf('(') + 1, opts.identity.name.lastIndexOf(')'))
+ debuglog('`ElectronTeamID` not found in `Info.plist`, use parsed from signing identity: ' + appInfo.ElectronTeamID)
+ }
+ return writeFileAsync(appInfoPath, plist.build(appInfo), 'utf8')
+ .then(function () {
+ debuglog('`Info.plist` updated:', '\n',
+ '> Info.plist:', appInfoPath)
+ })
+ }
+ })
+ .then(function () {
+ var appIdentifier = appInfo.ElectronTeamID + '.' + appInfo.CFBundleIdentifier
+ // Insert application identifier if not exists
+ if (entitlements['com.apple.application-identifier']) {
+ debuglog('`com.apple.application-identifier` found in entitlements file: ' + entitlements['com.apple.application-identifier'])
+ } else {
+ debuglog('`com.apple.application-identifier` not found in entitlements file, new inserted: ' + appIdentifier)
+ entitlements['com.apple.application-identifier'] = appIdentifier
+ }
+ // Insert developer team identifier if not exists
+ if (entitlements['com.apple.developer.team-identifier']) {
+ debuglog('`com.apple.developer.team-identifier` found in entitlements file: ' + entitlements['com.apple.developer.team-identifier'])
+ } else {
+ debuglog('`com.apple.developer.team-identifier` not found in entitlements file, new inserted: ' + appInfo.ElectronTeamID)
+ entitlements['com.apple.developer.team-identifier'] = appInfo.ElectronTeamID
+ }
+ // Init entitlements app group key to array if not exists
+ if (!entitlements['com.apple.security.application-groups']) {
+ entitlements['com.apple.security.application-groups'] = []
+ }
+ // Insert app group if not exists
+ if (Array.isArray(entitlements['com.apple.security.application-groups']) && entitlements['com.apple.security.application-groups'].indexOf(appIdentifier) === -1) {
+ debuglog('`com.apple.security.application-groups` not found in entitlements file, new inserted: ' + appIdentifier)
+ entitlements['com.apple.security.application-groups'].push(appIdentifier)
+ } else {
+ debuglog('`com.apple.security.application-groups` found in entitlements file: ' + appIdentifier)
+ }
+ // Create temporary entitlements file
+ const entitlementsPath = path.join(os.tmpdir(), `tmp-entitlements-${process.pid.toString(16)}-${(tmpFileCounter++).toString(16)}.plist`)
+ opts.entitlements = entitlementsPath
+ return writeFileAsync(entitlementsPath, plist.build(entitlements), 'utf8')
+ .then(function () {
+ debuglog('Entitlements file updated:', '\n',
+ '> Entitlements:', entitlementsPath)
+ })
+ })
+ })
+}
diff --git a/node_modules/electron-osx-sign/util-identities.js b/node_modules/electron-osx-sign/util-identities.js
new file mode 100644
index 0000000..37cfbdb
--- /dev/null
+++ b/node_modules/electron-osx-sign/util-identities.js
@@ -0,0 +1,55 @@
+/**
+ * @module util-identities
+ */
+
+'use strict'
+
+const util = require('./util')
+const debuglog = util.debuglog
+const flatList = util.flatList
+const execFileAsync = util.execFileAsync
+
+/**
+ * @constructor
+ * @param {string} name - Name of the signing identity.
+ * @param {String} hash - SHA-1 hash of the identity.
+ */
+var Identity = module.exports.Identity = function (name, hash) {
+ this.name = name
+ this.hash = hash
+}
+
+/**
+ * This function returns a promise checking the indentity proposed and updates the identity option to a exact finding from results.
+ * @function
+ * @param {Object} opts - Options.
+ * @param {string} identity - The proposed identity.
+ * @returns {Promise} Promise.
+ */
+module.exports.findIdentitiesAsync = function (opts, identity) {
+ // Only to look for valid identities, excluding those flagged with
+ // CSSMERR_TP_CERT_EXPIRED or CSSMERR_TP_NOT_TRUSTED. Fixes #9
+
+ var args = [
+ 'find-identity',
+ '-v'
+ ]
+ if (opts.keychain) {
+ args.push(opts.keychain)
+ }
+
+ return execFileAsync('security', args)
+ .then(function (result) {
+ return result.split('\n').map(function (line) {
+ if (line.indexOf(identity) >= 0) {
+ var identityFound = line.substring(line.indexOf('"') + 1, line.lastIndexOf('"'))
+ var identityHashFound = line.substring(line.indexOf(')') + 2, line.indexOf('"') - 1)
+ debuglog('Identity:', '\n',
+ '> Name:', identityFound, '\n',
+ '> Hash:', identityHashFound)
+ return new Identity(identityFound, identityHashFound)
+ }
+ })
+ })
+ .then(flatList)
+}
diff --git a/node_modules/electron-osx-sign/util-provisioning-profiles.js b/node_modules/electron-osx-sign/util-provisioning-profiles.js
new file mode 100644
index 0000000..a966ee6
--- /dev/null
+++ b/node_modules/electron-osx-sign/util-provisioning-profiles.js
@@ -0,0 +1,180 @@
+/**
+ * @module util-provisioning-profiles
+ */
+
+'use strict'
+
+const path = require('path')
+
+const Promise = require('bluebird')
+const plist = require('plist')
+
+const util = require('./util')
+const debuglog = util.debuglog
+const debugwarn = util.debugwarn
+const getAppContentsPath = util.getAppContentsPath
+const flatList = util.flatList
+const copyFileAsync = util.copyFileAsync
+const execFileAsync = util.execFileAsync
+const lstatAsync = util.lstatAsync
+const readdirAsync = util.readdirAsync
+
+/**
+ * @constructor
+ * @param {string} filePath - Path to provisioning profile.
+ * @param {Object} message - Decoded message in provisioning profile.
+ */
+var ProvisioningProfile = module.exports.ProvisioningProfile = function (filePath, message) {
+ this.filePath = filePath
+ this.message = message
+}
+
+Object.defineProperty(ProvisioningProfile.prototype, 'name', {
+ get: function () {
+ return this.message['Name']
+ }
+})
+
+Object.defineProperty(ProvisioningProfile.prototype, 'platforms', {
+ get: function () {
+ if ('ProvisionsAllDevices' in this.message) return ['darwin'] // Developer ID
+ else if (this.type === 'distribution') return ['mas'] // Mac App Store
+ else return ['darwin', 'mas'] // Mac App Development
+ }
+})
+
+Object.defineProperty(ProvisioningProfile.prototype, 'type', {
+ get: function () {
+ if ('ProvisionedDevices' in this.message) return 'development' // Mac App Development
+ else return 'distribution' // Developer ID or Mac App Store
+ }
+})
+
+/**
+ * Returns a promise resolving to a ProvisioningProfile instance based on file.
+ * @function
+ * @param {string} filePath - Path to provisioning profile.
+ * @param {string} keychain - Keychain to use when unlocking provisioning profile.
+ * @returns {Promise} Promise.
+ */
+var getProvisioningProfileAsync = module.exports.getProvisioningProfileAsync = function (filePath, keychain = null) {
+ var securityArgs = [
+ 'cms',
+ '-D', // Decode a CMS message
+ '-i', filePath // Use infile as source of data
+ ]
+
+ if (keychain) {
+ securityArgs.push('-k', keychain)
+ }
+
+ return execFileAsync('security', securityArgs)
+ .then(function (result) {
+ var provisioningProfile = new ProvisioningProfile(filePath, plist.parse(result))
+ debuglog('Provisioning profile:', '\n',
+ '> Name:', provisioningProfile.name, '\n',
+ '> Platforms:', provisioningProfile.platforms, '\n',
+ '> Type:', provisioningProfile.type, '\n',
+ '> Path:', provisioningProfile.filePath, '\n',
+ '> Message:', provisioningProfile.message)
+ return provisioningProfile
+ })
+}
+
+/**
+ * Returns a promise resolving to a list of suitable provisioning profile within the current working directory.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+var findProvisioningProfilesAsync = module.exports.findProvisioningProfilesAsync = function (opts) {
+ return Promise.map([
+ process.cwd() // Current working directory
+ ], function (dirPath) {
+ return readdirAsync(dirPath)
+ .map(function (name) {
+ var filePath = path.join(dirPath, name)
+ return lstatAsync(filePath)
+ .then(function (stat) {
+ if (stat.isFile()) {
+ switch (path.extname(filePath)) {
+ case '.provisionprofile':
+ return filePath
+ }
+ }
+ return undefined
+ })
+ })
+ })
+ .then(flatList)
+ .map(function (filePath) {
+ return getProvisioningProfileAsync(filePath)
+ .then(function (provisioningProfile) {
+ if (provisioningProfile.platforms.indexOf(opts.platform) >= 0 && provisioningProfile.type === opts.type) return provisioningProfile
+ debugwarn('Provisioning profile above ignored, not for ' + opts.platform + ' ' + opts.type + '.')
+ return undefined
+ })
+ })
+ .then(flatList)
+}
+
+/**
+ * Returns a promise embedding the provisioning profile in the app Contents folder.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+module.exports.preEmbedProvisioningProfile = function (opts) {
+ function embedProvisioningProfile () {
+ if (opts['provisioning-profile']) {
+ debuglog('Looking for existing provisioning profile...')
+ var embeddedFilePath = path.join(getAppContentsPath(opts), 'embedded.provisionprofile')
+ return lstatAsync(embeddedFilePath)
+ .then(function (stat) {
+ debuglog('Found embedded provisioning profile:', '\n',
+ '* Please manually remove the existing file if not wanted.', '\n',
+ '* Current file at:', embeddedFilePath)
+ })
+ .catch(function (err) {
+ if (err.code === 'ENOENT') {
+ // File does not exist
+ debuglog('Embedding provisioning profile...')
+ return copyFileAsync(opts['provisioning-profile'].filePath, embeddedFilePath)
+ } else throw err
+ })
+ }
+ }
+
+ if (opts['provisioning-profile']) {
+ // User input provisioning profile
+ debuglog('`provisioning-profile` passed in arguments.')
+ if (opts['provisioning-profile'] instanceof ProvisioningProfile) {
+ return embedProvisioningProfile()
+ } else {
+ return getProvisioningProfileAsync(opts['provisioning-profile'], opts['keychain'])
+ .then(function (provisioningProfile) {
+ opts['provisioning-profile'] = provisioningProfile
+ })
+ .then(embedProvisioningProfile)
+ }
+ } else {
+ // Discover provisioning profile
+ debuglog('No `provisioning-profile` passed in arguments, will find in current working directory and in user library...')
+ return findProvisioningProfilesAsync(opts)
+ .then(function (provisioningProfiles) {
+ if (provisioningProfiles.length > 0) {
+ // Provisioning profile(s) found
+ if (provisioningProfiles.length > 1) {
+ debuglog('Multiple provisioning profiles found, will use the first discovered.')
+ } else {
+ debuglog('Found 1 provisioning profile.')
+ }
+ opts['provisioning-profile'] = provisioningProfiles[0]
+ } else {
+ // No provisioning profile found
+ debuglog('No provisioning profile found, will not embed profile in app contents.')
+ }
+ })
+ .then(embedProvisioningProfile)
+ }
+}
diff --git a/node_modules/electron-osx-sign/util.js b/node_modules/electron-osx-sign/util.js
new file mode 100644
index 0000000..c92ea56
--- /dev/null
+++ b/node_modules/electron-osx-sign/util.js
@@ -0,0 +1,249 @@
+/**
+ * @module util
+ */
+
+'use strict'
+
+const child = require('child_process')
+const fs = require('fs')
+const path = require('path')
+
+const Promise = require('bluebird')
+const debug = require('debug')
+
+/**
+ * This callback is used across signing and flattening.
+ * @callback RequestCallback
+ * @param {?Error} err
+ */
+
+/** @function */
+const debuglog = module.exports.debuglog = debug('electron-osx-sign')
+debuglog.log = console.log.bind(console)
+
+/** @function */
+const debugwarn = module.exports.debugwarn = debug('electron-osx-sign:warn')
+debugwarn.log = console.warn.bind(console)
+
+/** @function */
+const isBinaryFileAsync = module.exports.isBinaryFileAsync = Promise.promisify(require('isbinaryfile'))
+
+/** @function */
+const removePassword = function (input) {
+ return input.replace(/(-P |pass:|\/p|-pass )([^ ]+)/, function (match, p1, p2) {
+ return `${p1}***`
+ })
+}
+
+/** @function */
+module.exports.execFileAsync = function (file, args, options) {
+ if (debuglog.enabled) {
+ debuglog('Executing...', file, args && Array.isArray(args) ? removePassword(args.join(' ')) : '')
+ }
+
+ return new Promise(function (resolve, reject) {
+ child.execFile(file, args, options, function (err, stdout, stderr) {
+ if (err) {
+ debuglog('Error executing file:', '\n',
+ '> Stdout:', stdout, '\n',
+ '> Stderr:', stderr)
+ reject(err)
+ return
+ }
+ resolve(stdout)
+ })
+ })
+}
+
+/** @function */
+const lstatAsync = module.exports.lstatAsync = Promise.promisify(fs.lstat)
+
+/** @function */
+const readdirAsync = module.exports.readdirAsync = Promise.promisify(fs.readdir)
+
+/** @function */
+module.exports.readFileAsync = Promise.promisify(fs.readFile)
+
+/** @function */
+module.exports.writeFileAsync = Promise.promisify(fs.writeFile)
+
+/**
+ * This function returns a flattened list of elements from an array of lists.
+ * @function
+ * @param {*} list - List.
+ * @returns Flattened list.
+ */
+var flatList = module.exports.flatList = function (list) {
+ function populateResult (list) {
+ if (!Array.isArray(list)) {
+ result.push(list)
+ } else if (list.length > 0) {
+ for (let item of list) if (item) populateResult(item)
+ }
+ }
+
+ var result = []
+ populateResult(list)
+ return result
+}
+
+/**
+ * This function returns the path to app contents.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {string} App contents path.
+ */
+var getAppContentsPath = module.exports.getAppContentsPath = function (opts) {
+ return path.join(opts.app, 'Contents')
+}
+
+/**
+ * This function returns the path to app frameworks within contents.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {string} App frameworks path.
+ */
+var getAppFrameworksPath = module.exports.getAppFrameworksPath = function (opts) {
+ return path.join(getAppContentsPath(opts), 'Frameworks')
+}
+
+/**
+ * This function returns a promise copying a file from the source to the target.
+ * @function
+ * @param {string} source - Source path.
+ * @param {string} target - Target path.
+ * @returns {Promise} Promise.
+ */
+module.exports.copyFileAsync = function (source, target) {
+ debuglog('Copying file...', '\n',
+ '> Source:', source, '\n',
+ '> Target:', target)
+ return new Promise(function (resolve, reject) {
+ var readStream = fs.createReadStream(source)
+ readStream.on('error', reject)
+ var writeStream = fs.createWriteStream(target)
+ writeStream.on('error', reject)
+ writeStream.on('close', resolve)
+ readStream.pipe(writeStream)
+ })
+}
+
+/**
+ * This function returns a promise with platform resolved.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise resolving platform.
+ */
+var detectElectronPlatformAsync = module.exports.detectElectronPlatformAsync = function (opts) {
+ return new Promise(function (resolve) {
+ var appFrameworksPath = getAppFrameworksPath(opts)
+ // The presence of Squirrel.framework identifies a Mac App Store build as used in https://github.com/atom/electron/blob/master/docs/tutorial/mac-app-store-submission-guide.md
+ return lstatAsync(path.join(appFrameworksPath, 'Squirrel.framework'))
+ .then(function () {
+ resolve('darwin')
+ })
+ .catch(function () {
+ resolve('mas')
+ })
+ })
+}
+
+/**
+ * This function returns a promise resolving the file path if file binary.
+ * @function
+ * @param {string} filePath - Path to file.
+ * @returns {Promise} Promise resolving file path or undefined.
+ */
+var getFilePathIfBinaryAsync = module.exports.getFilePathIfBinaryAsync = function (filePath) {
+ return isBinaryFileAsync(filePath)
+ .then(function (isBinary) {
+ return isBinary ? filePath : undefined
+ })
+}
+
+/**
+ * This function returns a promise validating opts.app, the application to be signed or flattened.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+module.exports.validateOptsAppAsync = function (opts) {
+ if (!opts.app) {
+ return Promise.reject(new Error('Path to aplication must be specified.'))
+ }
+ if (path.extname(opts.app) !== '.app') {
+ return Promise.reject(new Error('Extension of application must be `.app`.'))
+ }
+ return lstatAsync(opts.app)
+ .thenReturn()
+}
+
+/**
+ * This function returns a promise validating opts.platform, the platform of Electron build. It allows auto-discovery if no opts.platform is specified.
+ * @function
+ * @param {Object} opts - Options.
+ * @returns {Promise} Promise.
+ */
+module.exports.validateOptsPlatformAsync = function (opts) {
+ if (opts.platform) {
+ if (opts.platform === 'mas' || opts.platform === 'darwin') {
+ return Promise.resolve()
+ } else {
+ debugwarn('`platform` passed in arguments not supported, checking Electron platform...')
+ }
+ } else {
+ debugwarn('No `platform` passed in arguments, checking Electron platform...')
+ }
+
+ return detectElectronPlatformAsync(opts)
+ .then(function (platform) {
+ opts.platform = platform
+ })
+}
+
+/**
+ * This function returns a promise resolving all child paths within the directory specified.
+ * @function
+ * @param {string} dirPath - Path to directory.
+ * @returns {Promise} Promise resolving child paths needing signing in order.
+ */
+module.exports.walkAsync = function (dirPath) {
+ debuglog('Walking... ' + dirPath)
+
+ var unlinkAsync = Promise.promisify(fs.unlink)
+
+ function _walkAsync (dirPath) {
+ return readdirAsync(dirPath)
+ .then(function (names) {
+ return Promise.map(names, function (name) {
+ var filePath = path.join(dirPath, name)
+ return lstatAsync(filePath)
+ .then(function (stat) {
+ if (stat.isFile()) {
+ switch (path.extname(filePath)) {
+ case '.cstemp': // Temporary file generated from past codesign
+ debuglog('Removing... ' + filePath)
+ return unlinkAsync(filePath)
+ .thenReturn(undefined)
+ default:
+ return getFilePathIfBinaryAsync(filePath)
+ }
+ } else if (stat.isDirectory() && !stat.isSymbolicLink()) {
+ return _walkAsync(filePath)
+ .then(function (result) {
+ switch (path.extname(filePath)) {
+ case '.app': // Application
+ case '.framework': // Framework
+ result.push(filePath)
+ }
+ return result
+ })
+ }
+ })
+ })
+ })
+ }
+
+ return _walkAsync(dirPath)
+ .then(flatList)
+}
diff --git a/node_modules/electron-packager/LICENSE b/node_modules/electron-packager/LICENSE
new file mode 100644
index 0000000..3f64d56
--- /dev/null
+++ b/node_modules/electron-packager/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2015 Max Ogden and other contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/node_modules/electron-packager/NEWS.md b/node_modules/electron-packager/NEWS.md
new file mode 100644
index 0000000..91cb4c8
--- /dev/null
+++ b/node_modules/electron-packager/NEWS.md
@@ -0,0 +1,944 @@
+# Electron Packager: Changes by Version
+
+## [Unreleased]
+
+[Unreleased]: https://github.com/electron/electron-packager/compare/v16.0.0...main
+
+## [16.0.0] - 2022-08-23
+
+[16.0.0]: https://github.com/electron/electron-packager/compare/v15.5.1...v16.0.0
+
+### Fixed
+
+* Properly import info logger (#1405)
+
+### Changed
+
+* Bump `got` to 2.0.0 (#1397)
+
+### Removed
+
+* Node 12 support (#1399)
+
+## [15.5.2] - 2022-08-22
+
+[15.5.2]: https://github.com/electron/electron-packager/compare/v15.5.1...v15.5.2
+
+### Fixed
+
+* Package should not log info on `--quiet` flag
+* Ignore `node_gyp_bins` directory if it exists
+
+## [15.5.1] - 2022-04-20
+
+[15.5.1]: https://github.com/electron/electron-packager/compare/v15.5.0...v15.5.1
+
+### Fixed
+
+* Univeral builds single-arch components are now built sequentially instead of in parallel to fix race conditions in hooks
+* The typescript definition for HookFunction now correctly allows an error to be passed
+
+## [15.5.0] - 2022-04-19
+
+[15.5.0]: https://github.com/electron/electron-packager/compare/v15.4.0...v15.5.0
+
+### Added
+
+* New `universal` architecture supported when packaging for macOS to generate a universal app
+* `osxUniveral` option to allow providing options to `@electron/universal` when packaging a universal app
+
+## [15.4.0] - 2021-09-10
+
+[15.4.0]: https://github.com/electron/electron-packager/compare/v15.3.0...v15.4.0
+
+### Added
+
+* `extendHelperInfo` option to allow extending helper app `Info.plist` files (#1233)
+* Automatically insert `ElectronAsarIntegrity` into `Info.plist` files (#1279)
+
+### Fixed
+
+* Compatibility with `electron-notarize@^1.1.0` (#1278)
+
+## [15.3.0] - 2021-07-17
+
+[15.3.0]: https://github.com/electron/electron-packager/compare/v15.2.0...v15.3.0
+
+### Added
+
+* Bundled app validation to ensure that both `package.json` and the main entry point exist (#1257)
+* Support for customizing Windows targets on darwin/arm64 (#1260)
+* Support for customizing Windows targets on WSL without Wine installed (#1260)
+
+## [15.2.0] - 2020-12-04
+
+[15.2.0]: https://github.com/electron/electron-packager/compare/v15.1.0...v15.2.0
+
+### Added
+
+* Upgrade `electron-osx-sign` to 0.5.0 which adds a new option, `entitlementsForFile` (#1189)
+
+### Fixed
+
+* Add package manager lockfiles to default ignore list (#1182)
+* Allow checking official builds against prerelease versions (#1191)
+
+## [15.1.0] - 2020-08-21
+
+[15.1.0]: https://github.com/electron/electron-packager/compare/v15.0.0...v15.1.0
+
+### Added
+
+* add darwin/arm64 and mas/arm64 as official platform/arch combinations (#1168)
+
+### Fixed
+
+* TypeScript: ensure `OsxNotarizeOptions` definition contains credentials (#1167)
+
+## [15.0.0] - 2020-06-27
+
+[15.0.0]: https://github.com/electron/electron-packager/compare/v14.2.1...v15.0.0
+
+### Added
+
+* mac: app API key notarization (#1127)
+* TypeScript definition (#1131)
+
+### Changed
+
+* Replace `cross-zip` with `extract-zip` (#1139)
+
+### Removed
+
+* Node &lt; 10 support (#1122)
+
+## [14.2.1] - 2020-02-07
+
+[14.2.1]: https://github.com/electron/electron-packager/compare/v14.2.0...v14.2.1
+
+### Fixed
+
+* mac: don't fail if the icon path doesn't exist (#1101)
+* win32: correctly catch missing wine exceptions (#1117)
+
+## [14.2.0] - 2020-01-13
+
+[14.2.0]: https://github.com/electron/electron-packager/compare/v14.1.1...v14.2.0
+
+### Added
+
+* `electronZipDir` option (#1094)
+
+## [14.1.1] - 2019-11-19
+
+[14.1.1]: https://github.com/electron/electron-packager/compare/v14.1.0...v14.1.1
+
+### Fixed
+
+* Regression that caused the symlink test on Windows to not work as intended (#1071)
+* Always initialize proxy support when running the CLI (#1077)
+* Clarify the error message when infer cannot find a package.json file (#1079)
+* Handle a missing inferred app version better (#1079)
+
+### Chores
+
+* Upgrade `electron-notarize` to `^0.2.0` (#1069)
+
+## [14.1.0] - 2019-10-28
+
+[14.1.0]: https://github.com/electron/electron-packager/compare/v14.0.6...v14.1.0
+
+### Added
+
+* (darwin/mas only) `usageDescription` option (#1049)
+* Support for official win32/arm64 builds (#1053)
+
+## [14.0.6] - 2019-09-09
+
+[14.0.6]: https://github.com/electron/electron-packager/compare/v14.0.5...v14.0.6
+
+### Fixed
+
+* Send the properly formatted options from the CLI to electron-osx-sign (#1047)
+
+## [14.0.5] - 2019-08-28
+
+[14.0.5]: https://github.com/electron/electron-packager/compare/v14.0.4...v14.0.5
+
+### Fixed
+
+* Ensure that CFBundleExecutable and friends are correct for helper apps (#1046)
+
+## [14.0.4] - 2019-07-30
+
+[14.0.4]: https://github.com/electron/electron-packager/compare/v14.0.3...v14.0.4
+
+### Fixed
+
+* Packaging apps based on Electron >= 6.0.0 correctly renames and packages the new
+ Electron GPU Helper bundles (#1036)
+
+## [14.0.3] - 2019-07-18
+
+[14.0.3]: https://github.com/electron/electron-packager/compare/v14.0.2...v14.0.3
+
+### Fixed
+
+* Packaging Electron 6 based apps now correctly renames and packages the new
+ Electron Helper bundles (#1033)
+
+## [14.0.2] - 2019-07-18
+
+[14.0.2]: https://github.com/electron/electron-packager/compare/v14.0.1...v14.0.2
+
+### Fixed
+
+* Warn Windows 7 users of the unzip dependencies (#1030)
+
+## [14.0.1] - 2019-07-02
+
+[14.0.1]: https://github.com/electron/electron-packager/compare/v14.0.0...v14.0.1
+
+### Changed
+
+* Upgrade `fs-extra` to `^8.1.0` (#993)
+
+### Fixed
+
+* Host info shows OS release
+
+## [14.0.0] - 2019-06-20
+
+[14.0.0]: https://github.com/electron/electron-packager/compare/v13.1.1...v14.0.0
+
+### Added
+
+* Ignore system junk files by default (#1005)
+
+### Fixed
+
+* Handle inference when `electron-prebuilt-compile` points to a non-version (#978)
+
+### Changed
+
+* Replace `extract-zip` with `cross-zip` - on macOS/Linux, the `zip` binary is required; on Windows,
+ a relatively recent Powershell and .NET runtime is required, see `cross-zip` for details (#984)
+* Convert from `electron-download` to `@electron/get` (#1002). Drops support for versions of Electron
+ &lt; 1.3.2, plus all of the `download` options have changed, notably:
+ * `cache` is now `cacheRoot`
+ * `strictSSL` is now `rejectUnauthorized`
+ * The `mirror` URL string is now a set of options defined by `mirrorOptions`
+ * `quiet` is removed as the default downloader no longer has a progress bar
+* Linux/ia32 support for Electron >= 4 is downgraded to a warning from `@electron/get` (#1016)
+
+### Removed
+
+* Node &lt; 8 support (#973)
+
+## [13.1.1] - 2019-03-04
+
+[13.1.1]: https://github.com/electron/electron-packager/compare/v13.1.0...v13.1.1
+
+### Fixed
+
+* Linux/ia32 is no longer officially supported for Electron >= 4 (#957)
+
+## [13.1.0] - 2019-02-19
+
+[13.1.0]: https://github.com/electron/electron-packager/compare/v13.0.1...v13.1.0
+
+### Added
+
+* Support for inferring version from Electron nightlies (#931)
+
+### Fixed
+
+* Infer versions from `electron-prebuilt-compile` better (#932)
+* Upgrade `asar` to `^1.0.0`, which removes a vulnerable transitive dependency (#952)
+
+## [13.0.1] - 2018-12-12
+
+[13.0.1]: https://github.com/electron/electron-packager/compare/v13.0.0...v13.0.1
+
+### Fixed
+
+* Ensure relative out dirs are correctly ignored when copying (#919)
+
+## [13.0.0] - 2018-12-04
+
+[13.0.0]: https://github.com/electron/electron-packager/compare/v12.2.0...v13.0.0
+
+### Added
+
+* `prebuiltAsar` option to specify a prebuilt ASAR file (#823)
+* support for macOS Mojave app notarization (#899)
+
+### Changed
+
+* **Dropped support for running on Node &lt; 6.0.** (#900)
+
+### Removed
+
+* Deprecated target arch APIs (#915)
+* The callback version of the API (use `nodeify` if you need that syntax style) (#916)
+
+## [12.2.0] - 2018-10-02
+
+[12.2.0]: https://github.com/electron/electron-packager/compare/v12.1.2...v12.2.0
+
+### Added
+
+* darwinDarkModeSupport option to support macOS Mojave dark mode for older Electron versions (#893)
+
+### Fixed
+
+* Don't handle EH/NP Helpers if they don't exist (#894)
+
+## [12.1.2] - 2018-09-12
+
+[12.1.2]: https://github.com/electron/electron-packager/compare/v12.1.1...v12.1.2
+
+### Fixed
+
+* Prune user-namespaced modules (#889)
+
+## [12.1.1] - 2018-08-18
+
+[12.1.1]: https://github.com/electron/electron-packager/compare/v12.1.0...v12.1.1
+
+### Changed
+
+* Host arch utilities moved to electron-download. This is not a breaking change, as the existing API
+ has been kept the same.
+
+### Deprecated
+
+* `hostArch` and `unameArch` in `electron-packager/targets`, replaced with `host` and `uname` in
+ `electron-download/lib/arch`, respectively
+
+## [12.1.0] - 2018-05-18
+
+[12.1.0]: https://github.com/electron/electron-packager/compare/v12.0.2...v12.1.0
+
+### Added
+
+* `--version` shows the Packager/Node versions & host platform/arch (#841)
+
+### Fixed
+
+* `mips64el` arch is only available with Electron 1.8.x (#843)
+* better detection of node modules (#847)
+
+## [12.0.2] - 2018-05-02
+
+[12.0.2]: https://github.com/electron/electron-packager/compare/v12.0.1...v12.0.2
+
+### Fixed
+
+* Support for Node 10 via the CLI (#835)
+
+### Deprecated
+
+* The callback version of the API (use `nodeify` if you need that syntax style) (#837)
+
+## [12.0.1] - 2018-04-10
+
+[12.0.1]: https://github.com/electron/electron-packager/compare/v12.0.0...v12.0.1
+
+### Fixed
+
+* Upgraded `galactus` to `^0.2.1` to fix a bug with relative paths
+
+## [12.0.0] - 2018-04-03
+
+[12.0.0]: https://github.com/electron/electron-packager/compare/v11.2.0...v12.0.0
+
+### Changed
+
+* `prune` exclusively utilizes the `galactus` module for pruning devDependencies, instead of
+ depending on package managers (#819)
+* `electron-packager` is no longer ignored by default (#819)
+* A warning is emitted when an Electron module is a production dependency (#819)
+
+### Removed
+
+* `packageManager` option (#819)
+
+## [11.2.1] - 2019-01-02
+
+[11.2.1]: https://github.com/electron/electron-packager/compare/v11.2.0...v11.2.1
+
+### Fixed
+
+* Don't handle EH/NP Helpers if they don't exist (Backport of #894)
+
+## [11.2.0] - 2018-03-24
+
+[11.2.0]: https://github.com/electron/electron-packager/compare/v11.1.0...v11.2.0
+
+### Added
+
+* Utility function to execute hooks serially (#814)
+
+## [11.1.0] - 2018-03-04
+
+[11.1.0]: https://github.com/electron/electron-packager/compare/v11.0.1...v11.1.0
+
+### Added
+
+* Support for MAS Login Helper (Electron 2.0.0-beta.1 and above) (#807)
+
+## [11.0.1] - 2018-02-12
+
+[11.0.1]: https://github.com/electron/electron-packager/compare/v11.0.0...v11.0.1
+
+### Fixed
+
+* `rcedit` module updated to 1.0.0, which fixes some bugs (#804)
+* `--help` prints usage to stdout (#805)
+
+## [11.0.0] - 2018-02-06
+
+[11.0.0]: https://github.com/electron/electron-packager/compare/v10.1.2...v11.0.0
+
+### Added
+
+* `linux` platform, `mips64el` arch builds (Electron 1.8.2-beta.5 and above) (#800)
+
+### Changed
+
+* `all` or `platform=linux, arch=all` now include `arch=mips64el` if the Electron version specified
+ is 1.8.2-beta.5 or above (#800)
+
+## [10.1.2] - 2018-01-26
+
+[10.1.2]: https://github.com/electron/electron-packager/compare/v10.1.1...v10.1.2
+
+### Fixed
+
+* `overwrite: true` when no platform/arch is specified (#794)
+
+## [10.1.1] - 2018-01-02
+
+[10.1.1]: https://github.com/electron/electron-packager/compare/v10.1.0...v10.1.1
+
+### Fixed
+
+* ARM detection with prebuilt armv7l Node.js (#783)
+* Don't create `yarn.lock` when pruning with Yarn (#784)
+
+## [10.1.0] - 2017-11-19
+
+[10.1.0]: https://github.com/electron/electron-packager/compare/v10.0.0...v10.1.0
+
+### Added
+
+* Option to set the executable name separate from the app name (#758)
+
+### Fixed
+
+* `mz` dependency (#759)
+
+## [10.0.0] - 2017-11-19
+
+[10.0.0]: https://github.com/electron/electron-packager/compare/v9.1.0...v10.0.0
+
+### Changed
+
+* Switch from `minimist` to `yargs-parser` (#732)
+* Electron Packager only officially supports Node versions that are supported by the
+ NodeJS team (#747)
+* Refactor to use `Promise`s internally. This has the side effect of somewhat parallelizing
+ building two or more targets at once and/or two or more functions for a given hook, via
+ `Promise.all` (#753)
+
+## [9.1.0] - 2017-09-15
+
+[9.1.0]: https://github.com/electron/electron-packager/compare/v9.0.1...v9.1.0
+
+### Added
+
+* `hostArch()` and `allOfficialArchsForPlatformAndVersion()` (#727)
+
+### Changed
+
+* CLI arguments with nonstandard argument values emit warnings (#722)
+
+### Deprecated
+
+* In the CLI, `--tmpdir=false` has been deprecated in favor of `--no-tmpdir` (#722)
+
+## [9.0.1] - 2017-09-02
+
+[9.0.1]: https://github.com/electron/electron-packager/compare/v9.0.0...v9.0.1
+
+### Fixed
+
+* Inferring `win32metadata.CompanyName` from `author` in `package.json` when it's an Object (#718)
+
+## [9.0.0] - 2017-08-23
+
+[9.0.0]: https://github.com/electron/electron-packager/compare/v8.7.2...v9.0.0
+
+### Added
+
+* API hook for afterPrune (#677)
+* Package manager-agnostic pruning support (set `packageManager` to `false`) (#690)
+* `linux` platform, `arm64` arch builds (Electron 1.8.0 and above) (#711)
+
+### Changed
+
+* Promise support for `packager` - function returns a Promise instead of the return value of the
+ callback (#658)
+* `win32metadata.CompanyName` defaults to `author` name from nearest `package.json` (#667)
+* `win32metadata.FileDescription` defaults to `productName` or `name` from
+ nearest `package.json` (#667)
+* `win32metadata.OriginalFilename` defaults to renamed `.exe` (#667)
+* `win32metadata.ProductName` defaults to `productName` or `name` from nearest `package.json` (#667)
+* `win32metadata.InternalName` defaults to `productName` or `name` from
+ nearest `package.json` (#667)
+* Warn when downloading from the official Electron releases and the arch/platform combination
+ specified is invalid (#562)
+* Do not error out immediately if a `download.mirror` is specified and an unofficial arch/platform
+ is specified (#670)
+* Allow spaces when specifying archs/platforms as a string, rather than an array (#487)
+* The `extraResource` option works on all target platforms (#637)
+* `all` or `platform=linux, arch=all` now include `arch=arm64` if the Electron version specified is
+ 1.8.0 or above (#711)
+
+### Fixed
+
+* `common.warning` for codesigning (#694)
+
+### Removed
+
+* `version` is removed in favor of `electronVersion` (CLI: `--electron-version`) (#665)
+* `version-string` is removed in favor of `win32metadata` (#668)
+* Options set via the JavaScript API formatted in kebab-case (i.e., with hyphens) are removed in
+ favor of their camelCase variants, per JavaScript naming standards (#669)
+
+## [8.7.2] - 2017-06-25
+
+[8.7.2]: https://github.com/electron/electron-packager/compare/v8.7.1...v8.7.2
+
+### Fixed
+
+* Stop yarn creating `.bin` folders when pruning (#678)
+
+## [8.7.1] - 2017-06-05
+
+[8.7.1]: https://github.com/electron/electron-packager/compare/v8.7.0...v8.7.1
+
+### Fixed
+
+* Usage docs for `win32metadata.application-manifest` and `win32metadata.requested-execution-level`
+
+## [8.7.0] - 2017-05-01
+
+[8.7.0]: https://github.com/electron/electron-packager/compare/v8.6.0...v8.7.0
+
+### Added
+
+* `packageManager` (`--package-manager` via CLI) option (#618)
+* `win32metadata.application-manifest` option (#610)
+* `win32metadata.requested-execution-level` option (#610)
+
+### Fixed
+
+* Support for `extract-zip` >= 1.6.1
+
+## [8.6.0] - 2017-03-14
+
+[8.6.0]: https://github.com/electron/electron-packager/compare/v8.5.2...v8.6.0
+
+### Added
+
+* Limited support for electron-prebuilt-compile (#608)
+
+### Changed
+
+* Options formatted in kebab-case (i.e., with hyphens) are available in camelCase, per JavaScript naming standards (#580)
+* rcedit upgraded to 0.8.0
+
+### Deprecated
+
+* Options formatted in kebab-case (i.e., with hyphens) are deprecated in favor of their camelCase variants, per JavaScript naming standards (#580)
+
+## [8.5.2] - 2017-02-19
+
+[8.5.2]: https://github.com/electron/electron-packager/compare/v8.5.1...v8.5.2
+
+### Fixed
+
+* Prepend all warning messages with "WARNING:" (#593)
+* Ignore the generated temporary directory on Linux (#596)
+* Prevent app names from ending in " Helper" (#600)
+
+## [8.5.1] - 2017-01-22
+
+[8.5.1]: https://github.com/electron/electron-packager/compare/v8.5.0...v8.5.1
+
+### Fixed
+
+* Show CLI option when showing option deprecation message (#560)
+
+## [8.5.0] - 2017-01-10
+
+[8.5.0]: https://github.com/electron/electron-packager/compare/v8.4.0...v8.5.0
+
+### Added
+
+* `electronVersion` (`--electron-version` via CLI) option (#547)
+
+### Deprecated
+
+* `version` is deprecated in favor of `electronVersion` (`--electron-version` via CLI) (#547)
+
+## [8.4.0] - 2016-12-08
+
+[8.4.0]: https://github.com/electron/electron-packager/compare/v8.3.0...v8.4.0
+
+### Added
+
+* `quiet` option (#541)
+
+### Fixed
+
+* Better type checking when validating arch/platform (#534)
+
+## [8.3.0] - 2016-11-16
+
+[8.3.0]: https://github.com/electron/electron-packager/compare/v8.2.0...v8.3.0
+
+### Changed
+
+* Upgrade to electron-osx-sign 0.4.x (#384)
+
+### Fixed
+
+* Clarify symlink error message for Windows
+
+## [8.2.0] - 2016-10-29
+
+[8.2.0]: https://github.com/electron/electron-packager/compare/v8.1.0...v8.2.0
+
+### Added
+
+* Allow `extend-info` to specify an object instead of a filename (#510)
+
+### Fixed
+
+* Retrieving metadata from `package.json` by upgrading `get-package-info` (#505)
+* Typo when using `extend-info` (#510)
+
+## [8.1.0] - 2016-09-30
+
+[8.1.0]: https://github.com/electron/electron-packager/compare/v8.0.0...v8.1.0
+
+### Added
+
+* `.o` and `.obj` files are ignored by default (#491)
+* Electron downloads are now checked against their published checksums (#493)
+* Documentation for `download.quiet` option to enable/disable progress bar (#494)
+* The `build-version` property, when unspecified, now defaults to the
+ `app-version` property value on Windows (#501)
+
+## [8.0.0] - 2016-09-03
+
+[8.0.0]: https://github.com/electron/electron-packager/compare/v7.7.0...v8.0.0
+
+### Added
+
+* `win32metadata` option (#331, #463)
+* `linux` platform, `armv7l` arch support (#106, #474)
+
+### Changed
+
+* `all` now includes the `linux` platform, `armv7l` arch combination
+* Default the `platform` option to the host platform (#464)
+* Default the `arch` option to the host arch (#36, #464)
+* Default the `prune` option to `true` (#235, #472)
+
+### Fixed
+
+* Allow scoped package names as Electron app names - invalid characters are replaced with
+ hyphens (#308, #455)
+
+### Deprecated
+
+* `version-string` is deprecated in favor of `win32metadata` (#331, #463)
+
+### Removed
+
+* `asar-unpack` is removed in favor of `asar.unpack`
+* `asar-unpack-dir` is removed in favor of `asar.unpackDir`
+* `cache` is removed in favor of `download.cache`
+* `strict-ssl` is removed in favor of `download.strictSSL`
+
+## [7.7.0] - 2016-08-20
+
+[7.7.0]: https://github.com/electron/electron-packager/compare/v7.6.0...v7.7.0
+
+### Added
+
+* The `package.json` `version` property is the default app version if `--app-version` is
+ unspecified (#449)
+
+### Changed
+
+* [darwin/mas] Explicitly disallow `osx-sign.binaries` (#459)
+
+## [7.6.0] - 2016-08-14
+
+[7.6.0]: https://github.com/electron/electron-packager/compare/v7.5.1...v7.6.0
+
+### Added
+
+* [API] hook for afterCopy (#448)
+* [darwin/mas] Documentation for `protocol` and `protocol-name` options (#121, #450)
+
+### Changed
+
+* [CLI] Minimum Node version is enforced (#454)
+
+### Fixed
+
+* [CLI] ensure --out has either a string or null value (#442)
+* Use `get-package-info` (again) to support finding prebuilt in parent directories (#445)
+
+## [7.5.1] - 2016-08-06
+
+[7.5.1]: https://github.com/electron/electron-packager/compare/v7.5.0...v7.5.1
+
+### Fixed
+
+* Resolve to absolute path when inferring app name/Electron version (#440)
+
+## [7.5.0] - 2016-08-04
+
+[7.5.0]: https://github.com/electron/electron-packager/compare/v7.4.0...v7.5.0
+
+### Added
+
+* Support the new `electron` package name (#435)
+
+## [7.4.0] - 2016-07-31
+
+[7.4.0]: https://github.com/electron/electron-packager/compare/v7.3.0...v7.4.0
+
+### Added
+
+* Basic debugging messages via the `debug` module - see CONTRIBUTING.md for usage (#433)
+
+### Changed
+
+* Clearer error message when inferring the app name and/or Electron version fails
+
+### Fixed
+
+* (Test) apps named "Electron" can be packaged successfully (#415)
+
+## [7.3.0] - 2016-07-10
+
+[7.3.0]: https://github.com/electron/electron-packager/compare/v7.2.0...v7.3.0
+
+### Added
+
+* `asar` options can be specified as an `Object` (via the API) or with dot notation (via the CLI) -
+ see the respective docs for details (#353, #417)
+
+### Deprecated
+
+* `asar-unpack` is deprecated in favor of `asar.unpack` (#417)
+* `asar-unpack-dir` is deprecated in favor of `asar.unpackDir` (#417)
+
+## [7.2.0] - 2016-07-03
+
+[7.2.0]: https://github.com/electron/electron-packager/compare/v7.1.0...v7.2.0
+
+### Added
+
+* `derefSymlinks` option (#410)
+
+### Fixed
+
+* Clarified message when `wine` is not found (#357)
+
+## [7.1.0] - 2016-06-22
+
+[7.1.0]: https://github.com/electron/electron-packager/compare/v7.0.4...v7.1.0
+
+### Added
+
+* Add `afterExtract` hook (#354, #403)
+
+## [7.0.4] - 2016-06-14
+
+[7.0.4]: https://github.com/electron/electron-packager/compare/v7.0.3...v7.0.4
+
+### Fixed
+
+* Clarified app name/Electron version error message (#390)
+
+## [7.0.3] - 2016-05-31
+
+[7.0.3]: https://github.com/electron/electron-packager/compare/v7.0.2...v7.0.3
+
+### Changed
+
+* [contributors] Code contributions need to be validated in "strict" mode (#342, #351)
+
+### Fixed
+
+* CLI output truncated when using Node 6 (and possibly earlier) (#381)
+
+## [7.0.2] - 2016-05-18
+
+[7.0.2]: https://github.com/electron/electron-packager/compare/v7.0.1...v7.0.2
+
+### Fixed
+
+* The default `.git` ignore only ignores that directory (#344)
+* Specifying the `download.strictSSL` CLI parameter no longer triggers a deprecation warning for
+ `strict-ssl` (#349)
+
+## [7.0.1] - 2016-04-21
+
+[7.0.1]: https://github.com/electron/electron-packager/compare/v7.0.0...v7.0.1
+
+### Fixed
+
+* Not specifying `strict-ssl` CLI parameter no longer triggers a deprecation warning (#335)
+
+## [7.0.0] - 2016-04-17
+
+[7.0.0]: https://github.com/electron/electron-packager/compare/v6.0.2...v7.0.0
+
+### Added
+
+* Add `download` parameter (#320)
+
+### Changed
+
+* **Dropped support for running on Node &lt; 4.0.** (#319)
+
+### Fixed
+
+* `strict-ssl` (and by extension, `download.strictSSL`) defaults to `true`, as documented (#320)
+
+### Deprecated
+
+* `cache` is deprecated in favor of `download.cache` (#320)
+* `strict-ssl` is deprecated in favor of `download.strictSSL` (#320)
+
+### Removed
+
+* [win32] `version-string.FileVersion` and `version-string.ProductVersion` are replaced by
+ favor of `app-version` and `build-version`, respectively (#327)
+* [win32] `version-string.LegalCopyright` is replaced by `app-copyright` (#327)
+
+## [6.0.2] - 2016-04-09
+
+[6.0.2]: https://github.com/electron/electron-packager/compare/v6.0.1...v6.0.2
+
+### Changed
+
+* [win32] `rcedit` dependency updated to 0.5.x. **The DLL mentioned in the 6.0.1 release notes
+ is no longer required.**
+
+## [6.0.1] - 2016-04-08
+
+[6.0.1]: https://github.com/electron/electron-packager/compare/v6.0.0...v6.0.1
+
+### Changed
+
+* [win32] `rcedit` dependency updated to 0.4.x. **A new DLL is required to run the new version
+ of rcedit, please see [the documentation](https://github.com/electron/electron-packager/blob/main/README.md#building-windows-apps-from-non-windows-platforms)
+ for details**
+* API documentation moved from readme.md to docs/api.md (#296)
+
+### Fixed
+
+* [darwin/mas] The OSX icon is properly replaced when Electron ≥ 0.37.4 is used (#301)
+* `default_app.asar` is deleted during packaging (necessary when Electron ≥ 0.37.4 is used).
+ The `default_app` folder is still deleted for older Electron versions (#298, #311)
+
+## [6.0.0] - 2016-03-28
+
+[6.0.0]: https://github.com/electron/electron-packager/compare/v5.2.1...v6.0.0
+
+### Added
+
+* Add support for a new target platform, Mac App Store (`mas`), including signing OS X apps
+ (#223, #278)
+* Add `app-copyright` parameter (#223)
+* Add `tmpdir` parameter to specify a custom temp directory (#230); set to `false` to disable
+ using a temporary directory at all (#251, #276)
+* Add `NEWS.md`, a human-readable list of changes in each version (since 5.2.0) (#263)
+
+### Changed
+
+* **The GitHub repository has been moved into an organization,
+ [electron-userland](https://github.com/electron-userland)**
+* Allow the `ignore` parameter to take a function (#247)
+* [contributors] Update Standard (JavaScript coding standard) package to 5.4.x
+* [contributors] Add code coverage support via Coveralls (#257)
+* Better docs around contributing to the project (#258)
+* Ignore the directory specified by the `out` parameter by default (#255)
+* [darwin/mas] Add support for merging arbitrary plist files and adding arbitrary resource
+ files (#253)
+* Split out the code to sign OS X apps into a separate Node module,
+ [electron-osx-sign](https://github.com/electron-userland/electron-osx-sign) (#223)
+* [darwin/mas] **BREAKING**: The `sign` parameter is now `osx-sign` (for better cross-platform
+ compatibility) and optionally takes several of the same sub-parameters as
+ electron-osx-sign (#286)
+
+### Deprecated
+
+* [win32] `version-string.LegalCopyright` is deprecated in favor of `app-copyright` (#268)
+
+### Fixed
+
+* [darwin/mas] Ensure `CFBundleVersion` and `CFBundleShortVersionString` are strings (#250)
+* [darwin/mas] Correctly set the helper bundle ID in all relevant plist files (#223)
+* [darwin/mas] OSX-specific binaries are correctly renamed to the application name (#244, #293)
+
+ **If you are upgrading from ≤ 5.2.1 and building for a `darwin` target, you may experience problems. See #323 for details.**
+
+## [5.2.1] - 2016-01-17
+
+[5.2.1]: https://github.com/electron/electron-packager/compare/v5.2.0...v5.2.1
+
+### Changed
+
+* [win32] Add support for Windows for the `app-version` and `build-version` parameters (#229)
+* If `appname` and/or `version` are omitted from the parameters, infer from `package.json` (#94)
+
+### Deprecated
+
+* [win32] `version-string.FileVersion` and `version-string.ProductVersion` are deprecated in
+ favor of `app-version` and `build-version`, respectively (#229)
+
+### Fixed
+
+* Remove `default_app` from built packages (#206)
+* Add documentation for optional arguments (#226)
+* [darwin] Don't declare helper app as a protocol handler (#220)
+
+## [5.2.0] - 2015-12-16
+
+[5.2.0]: https://github.com/electron/electron-packager/compare/v5.1.1...v5.2.0
+
+### Added
+
+* Add `asar-unpack-dir` parameter (#174)
+* [darwin] Add `app-category-type` parameter (#202)
+* Add `strict-ssl` parameter (#209)
+
+### Changed
+
+* Ignore `node_modules/.bin` by default (#189)
+
+----
+
+For versions prior to 5.2.0, please see `git log`.
diff --git a/node_modules/electron-packager/README.md b/node_modules/electron-packager/README.md
new file mode 100644
index 0000000..c380877
--- /dev/null
+++ b/node_modules/electron-packager/README.md
@@ -0,0 +1,206 @@
+# Electron Packager
+
+Package your [Electron](https://electronjs.org) app into OS-specific bundles (`.app`, `.exe`, etc.) via JavaScript or the command line.
+
+[![CircleCI Build Status](https://circleci.com/gh/electron/electron-packager/tree/main.svg?style=svg)](https://circleci.com/gh/electron/electron-packager/tree/main)
+[![Coverage Status](https://codecov.io/gh/electron/electron-packager/branch/main/graph/badge.svg)](https://codecov.io/gh/electron/electron-packager)
+[![NPM](https://badgen.net/npm/v/electron-packager)](https://npm.im/electron-packager)
+[![Discord](https://img.shields.io/discord/745037351163527189?color=blueviolet&logo=discord)](https://discord.com/invite/APGC3k5yaH)
+
+[Supported Platforms](#supported-platforms) |
+[Installation](#installation) |
+[Usage](#usage) |
+[API](https://electron.github.io/electron-packager/main/) |
+[Contributing](https://github.com/electron/electron-packager/blob/main/CONTRIBUTING.md) |
+[Support](https://github.com/electron/electron-packager/blob/main/SUPPORT.md) |
+[Related Apps/Libraries](#related) |
+[FAQ](https://github.com/electron/electron-packager/blob/main/docs/faq.md) |
+[Release Notes](https://github.com/electron/electron-packager/blob/main/NEWS.md)
+
+----
+
+## About
+
+Electron Packager is a command line tool and Node.js library that bundles Electron-based application
+source code with a renamed Electron executable and supporting files into folders ready for distribution.
+
+For creating distributables like installers and Linux packages, consider using either [Electron
+Forge](https://github.com/electron-userland/electron-forge) (which uses Electron Packager
+internally), or one of the [related Electron tools](#distributable-creators), which utilizes
+Electron Packager-created folders as a basis.
+
+Note that packaged Electron applications can be relatively large. A zipped, minimal Electron
+application is approximately the same size as the zipped prebuilt binary for a given target
+platform, target arch, and [Electron version](https://github.com/electron/electron/releases)
+_(files named `electron-v${version}-${platform}-${arch}.zip`)_.
+
+## Supported Platforms
+
+Electron Packager is known to run on the following **host** platforms:
+
+* Windows (32/64 bit)
+* macOS (formerly known as OS X)
+* Linux (x86/x86_64)
+
+It generates executables/bundles for the following **target** platforms:
+
+* Windows (also known as `win32`, for x86, x86_64, and arm64 architectures)
+* macOS (also known as `darwin`) / [Mac App Store](https://electronjs.org/docs/tutorial/mac-app-store-submission-guide/) (also known as `mas`)<sup>*</sup> (for x86_64, arm64, and universal architectures)
+* Linux (for x86, x86_64, armv7l, arm64, and mips64el architectures)
+
+<sup>*</sup> *Note for macOS / Mac App Store target bundles: the `.app` bundle can only be signed when building on a host macOS platform.*
+
+## Installation
+
+This module requires Node.js 10.0 or higher to run.
+
+```sh
+npm install --save-dev electron-packager
+```
+
+It is **not** recommended to install `electron-packager` globally.
+
+### Building Windows apps from non-Windows platforms
+
+Building an Electron app for the Windows target platform requires editing the `Electron.exe` file.
+Currently, Electron Packager uses [`node-rcedit`](https://github.com/atom/node-rcedit) to accomplish
+this. A Windows executable is bundled in that Node package and needs to be run in order for this
+functionality to work, so on non-Windows host platforms (not including WSL),
+[Wine](https://www.winehq.org/) 1.6 or later needs to be installed. On macOS, it is installable
+via [Homebrew](http://brew.sh/).
+
+## Usage
+
+JavaScript API usage can be found in the [API documentation](https://electron.github.io/electron-packager/main/modules/electronpackager.html).
+
+### From the Command Line
+
+Running Electron Packager from the command line has this basic form:
+
+```
+npx electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> [optional flags...]
+```
+
+**Note**: `npx` can be substituted for `yarn` or `npm exec` depending on what package manager and
+the version you have installed.
+
+This will:
+
+- Find or download the correct release of Electron
+- Use that version of Electron to create an app in `<out>/<appname>-<platform>-<arch>` *(this can be customized via an optional flag)*
+
+`--platform` and `--arch` can be omitted, in two cases:
+
+* If you specify `--all` instead, bundles for all valid combinations of target
+ platforms/architectures will be created.
+* Otherwise, a single bundle for the host platform/architecture will be created.
+
+For an overview of the other optional flags, run `electron-packager --help` or see
+[usage.txt](https://github.com/electron/electron-packager/blob/main/usage.txt). For
+detailed descriptions, see the [API documentation](https://electron.github.io/electron-packager/main/modules/electronpackager.html).
+
+If `appname` is omitted, this will use the name specified by "productName" or "name" in the nearest package.json.
+
+**Characters in the Electron app name which are not allowed in all target platforms' filenames
+(e.g., `/`), will be replaced by hyphens (`-`).**
+
+You should be able to launch the app on the platform you built for. If not, check your settings and try again.
+
+**Be careful** not to include `node_modules` you don't want into your final app. If you put them in
+the `devDependencies` section of `package.json`, by default none of the modules related to those
+dependencies will be copied in the app bundles. (This behavior can be turned off with the
+`prune: false` API option or `--no-prune` CLI flag.) In addition, folders like `.git` and
+`node_modules/.bin` will be ignored by default. You can use `--ignore` to ignore files and folders
+via a regular expression (*not* a [glob pattern](https://en.wikipedia.org/wiki/Glob_%28programming%29)).
+Examples include `--ignore=\.gitignore` or `--ignore="\.git(ignore|modules)"`.
+
+#### Example
+
+Let's assume that you have made an app based on the [electron-quick-start](https://github.com/electron/electron-quick-start) repository on a macOS host platform with the following file structure:
+
+```
+foobar
+├── package.json
+├── index.html
+├── […other files, like the app's LICENSE…]
+└── script.js
+```
+
+…and that the following is true:
+
+* `electron-packager` is installed locally
+* `productName` in `package.json` has been set to `Foo Bar`
+* The `electron` module is in the `devDependencies` section of `package.json`, and set to the exact version of `1.4.15`.
+* `npm install` for the `Foo Bar` app has been run at least once
+
+When one runs the following command for the first time in the `foobar` directory:
+
+```
+npx electron-packager .
+```
+
+`electron-packager` will do the following:
+
+* Use the current directory for the `sourcedir`
+* Infer the `appname` from the `productName` in `package.json`
+* Infer the `appVersion` from the `version` in `package.json`
+* Infer the `platform` and `arch` from the host, in this example, `darwin` platform and `x64` arch.
+* Download the darwin x64 build of Electron 1.4.15 (and cache the downloads in `~/.electron`)
+* Build the macOS `Foo Bar.app`
+* Place `Foo Bar.app` in `foobar/Foo Bar-darwin-x64/` (since an `out` directory was not specified, it used the current working directory)
+
+The file structure now looks like:
+
+```
+foobar
+├── Foo Bar-darwin-x64
+│   ├── Foo Bar.app
+│   │   └── […Mac app contents…]
+│ ├── LICENSE [the Electron license]
+│ └── version
+├── […other application bundles, like "Foo Bar-win32-x64" (sans quotes)…]
+├── package.json
+├── index.html
+├── […other files, like the app's LICENSE…]
+└── script.js
+```
+
+The `Foo Bar.app` folder generated can be executed by a system running macOS, which will start the packaged Electron app. This is also true of the Windows x64 build on a system running a new enough version of Windows for a 64-bit system (via `Foo Bar-win32-x64/Foo Bar.exe`), and so on.
+
+## Related
+
+- [Electron Forge](https://github.com/electron-userland/electron-forge) - creates, builds, and distributes modern Electron applications
+- [electron-packager-interactive](https://github.com/Urucas/electron-packager-interactive) - an interactive CLI for electron-packager
+- [grunt-electron](https://github.com/sindresorhus/grunt-electron) - grunt plugin for electron-packager
+
+### Distributable Creators
+
+* [electron-installer-zip](https://github.com/electron-userland/electron-installer-zip) - creates symlink-compatible ZIP files
+
+Windows:
+
+* [electron-winstaller](https://github.com/electron/windows-installer) - Squirrel.Windows-based installer from the Electron maintainers group
+* [electron-windows-store](https://github.com/felixrieseberg/electron-windows-store) - creates an AppX package for the Windows Store
+* [electron-wix-msi](https://github.com/felixrieseberg/electron-wix-msi) - creates traditional MSI installers
+* [electron-installer-windows](https://github.com/electron-userland/electron-installer-windows) - alternative Squirrel.Windows-based installer
+
+macOS:
+
+* [electron-installer-dmg](https://github.com/electron-userland/electron-installer-dmg) - creates a DMG
+
+Linux:
+
+* [electron-installer-debian](https://github.com/electron-userland/electron-installer-debian) - creates a DEB file
+* [electron-installer-redhat](https://github.com/electron-userland/electron-installer-redhat) - creates an RPM
+* [electron-installer-flatpak](https://github.com/endlessm/electron-installer-flatpak) - creates a Flatpak file
+* [electron-installer-snap](https://github.com/electron-userland/electron-installer-snap) - creates a Snap file
+
+### Plugins
+
+These Node modules utilize Electron Packager API hooks:
+
+- [electron-packager-languages](https://npm.im/electron-packager-languages) - sets the locales
+ available to Electron when packaged, which is used by the Mac App Store, among other places
+- [electron-packager-plugin-non-proprietary-codecs-ffmpeg](https://www.npmjs.com/package/electron-packager-plugin-non-proprietary-codecs-ffmpeg) - replaces the normal version of FFmpeg in Electron with a version without proprietary codecs
+- [electron-rebuild](https://github.com/electron/electron-rebuild) - rebuilds native Node.js modules
+ against the packaged Electron version
diff --git a/node_modules/electron-packager/bin/electron-packager.js b/node_modules/electron-packager/bin/electron-packager.js
new file mode 100755
index 0000000..5383e93
--- /dev/null
+++ b/node_modules/electron-packager/bin/electron-packager.js
@@ -0,0 +1,16 @@
+#!/usr/bin/env node
+
+'use strict'
+
+/* eslint-disable no-var */
+// WHY: not consts so that this file can load in Node < 4.0
+var packageJSON = require('../package.json')
+var semver = require('semver')
+if (!semver.satisfies(process.versions.node, packageJSON.engines.node)) {
+ console.error('CANNOT RUN WITH NODE ' + process.versions.node)
+ console.error('Electron Packager requires Node ' + packageJSON.engines.node + '.')
+ process.exit(1)
+}
+
+var cli = require('../src/cli')
+cli.run(process.argv.slice(2))
diff --git a/node_modules/electron-packager/collaborators.md b/node_modules/electron-packager/collaborators.md
new file mode 100644
index 0000000..9ec9d1f
--- /dev/null
+++ b/node_modules/electron-packager/collaborators.md
@@ -0,0 +1,8 @@
+## Collaborators
+
+Electron Packager is only possible due to the excellent work of the following collaborators:
+
+* [malept](https://github.com/malept) (current primary maintainer)
+* [maxogden](https://github.com/maxogden) (Creator & maintainer emeritus)
+
+and many others as shown in the [GitHub contributors graph](https://github.com/electron/electron-packager/graphs/contributors).
diff --git a/node_modules/electron-packager/docs/api.md b/node_modules/electron-packager/docs/api.md
new file mode 100644
index 0000000..0136885
--- /dev/null
+++ b/node_modules/electron-packager/docs/api.md
@@ -0,0 +1 @@
+[API Documentation](https://electron.github.io/electron-packager/) has moved.
diff --git a/node_modules/electron-packager/docs/faq.md b/node_modules/electron-packager/docs/faq.md
new file mode 100644
index 0000000..198cf94
--- /dev/null
+++ b/node_modules/electron-packager/docs/faq.md
@@ -0,0 +1,50 @@
+# Frequently Asked Questions
+
+## Why does the menubar appear when running in development mode, but disappear when packaged?
+
+**Note**: as of Electron 5, the menubar always appears, so this question is not relevant to
+officially supported versions of Electron.
+
+Based on [a comment from **@MarshallOfSound**](https://github.com/electron/electron-packager/issues/553#issuecomment-270805213):
+
+When you're running in "development mode" (for example, `electron /path/to/app`), Electron uses the
+`default_app` codepath to run your app, which also provides a default menubar. When the app is
+packaged, Electron runs your app directly. To have a menubar that's consistent between development
+and packaged modes, you'll need to [define it yourself](https://electronjs.org/docs/api/menu/).
+
+## Why isn't my `ignore` option working?
+
+As stated in the documentation for [`ignore`](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#ignore), it uses "[one] or more additional
+[regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
+patterns. […] Please note that [glob patterns](https://en.wikipedia.org/wiki/Glob_%28programming%29)
+will not work."
+
+## Why isn't the relative path in my app code working?
+
+To make a path work in both development and packaged mode, you'll need to generate a path based on
+the location of the JavaScript file that is referencing the file. For example, if you had an app
+structure like the following:
+
+```
+AppName
+├── package.json
+├── data
+│   └── somedata.json
+└── src
+    └── main.js
+```
+
+In `src/main.js`, you would access `data/somedata.json` similar to this:
+
+```javascript
+const path = require('path');
+const jsonFilename = path.resolve(__dirname, '..', 'data', 'somedata.json');
+console.log(require(jsonFilename));
+```
+
+## How do I set an icon on Linux?
+
+The docs for [`icon`](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#icon)
+already show how to set an icon on your `BrowserWindow`, but your dock/taskbar may not use that and
+instead use the `Icon` value in your `.desktop` file. The [Linux distributable creators](https://github.com/electron/electron-packager#distributable-creators)
+can help you set/distribute the appropriate icon in that case.
diff --git a/node_modules/electron-packager/node_modules/.bin/extract-zip b/node_modules/electron-packager/node_modules/.bin/extract-zip
new file mode 120000
index 0000000..af9b561
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/.bin/extract-zip
@@ -0,0 +1 @@
+../extract-zip/cli.js \ No newline at end of file
diff --git a/node_modules/electron-packager/node_modules/.bin/semver b/node_modules/electron-packager/node_modules/.bin/semver
new file mode 120000
index 0000000..5aaadf4
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver.js \ No newline at end of file
diff --git a/node_modules/electron-packager/node_modules/debug/LICENSE b/node_modules/electron-packager/node_modules/debug/LICENSE
new file mode 100644
index 0000000..1a9820e
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+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/electron-packager/node_modules/debug/README.md b/node_modules/electron-packager/node_modules/debug/README.md
new file mode 100644
index 0000000..e9c3e04
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/debug/README.md
@@ -0,0 +1,481 @@
+# debug
+[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
+
+<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2018-2021 Josh Junon
+
+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/electron-packager/node_modules/debug/package.json b/node_modules/electron-packager/node_modules/debug/package.json
new file mode 100644
index 0000000..3bcdc24
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/debug/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "debug",
+ "version": "4.3.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "Josh Junon <josh.junon@protonmail.com>",
+ "contributors": [
+ "TJ Holowaychuk <tj@vision-media.ca>",
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ }
+}
diff --git a/node_modules/electron-packager/node_modules/debug/src/browser.js b/node_modules/electron-packager/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..cd0fc35
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/node_modules/electron-packager/node_modules/debug/src/common.js b/node_modules/electron-packager/node_modules/debug/src/common.js
new file mode 100644
index 0000000..e3291b2
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/node_modules/electron-packager/node_modules/debug/src/index.js b/node_modules/electron-packager/node_modules/debug/src/index.js
new file mode 100644
index 0000000..bf4c57f
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/electron-packager/node_modules/debug/src/node.js b/node_modules/electron-packager/node_modules/debug/src/node.js
new file mode 100644
index 0000000..79bc085
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/node_modules/electron-packager/node_modules/extract-zip/LICENSE b/node_modules/electron-packager/node_modules/extract-zip/LICENSE
new file mode 100644
index 0000000..2921069
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/extract-zip/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2014 Max Ogden and other contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/electron-packager/node_modules/extract-zip/cli.js b/node_modules/electron-packager/node_modules/extract-zip/cli.js
new file mode 100755
index 0000000..b594016
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/extract-zip/cli.js
@@ -0,0 +1,19 @@
+#!/usr/bin/env node
+
+/* eslint-disable no-process-exit */
+
+var extract = require('./')
+
+var args = process.argv.slice(2)
+var source = args[0]
+var dest = args[1] || process.cwd()
+if (!source) {
+ console.error('Usage: extract-zip foo.zip <targetDirectory>')
+ process.exit(1)
+}
+
+extract(source, { dir: dest })
+ .catch(function (err) {
+ console.error('error!', err)
+ process.exit(1)
+ })
diff --git a/node_modules/electron-packager/node_modules/extract-zip/index.d.ts b/node_modules/electron-packager/node_modules/extract-zip/index.d.ts
new file mode 100644
index 0000000..6dbcc80
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/extract-zip/index.d.ts
@@ -0,0 +1,21 @@
+// Based on the type definitions for extract-zip 1.6
+// Definitions by: Mizunashi Mana <https://github.com/mizunashi-mana>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e69b58e/types/extract-zip/index.d.ts
+
+import { Entry, ZipFile } from 'yauzl';
+
+declare namespace extract {
+ interface Options {
+ dir: string;
+ defaultDirMode?: number;
+ defaultFileMode?: number;
+ onEntry?: (entry: Entry, zipfile: ZipFile) => void;
+ }
+}
+
+declare function extract(
+ zipPath: string,
+ opts: extract.Options,
+): Promise<void>;
+
+export = extract;
diff --git a/node_modules/electron-packager/node_modules/extract-zip/index.js b/node_modules/electron-packager/node_modules/extract-zip/index.js
new file mode 100644
index 0000000..23384ea
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/extract-zip/index.js
@@ -0,0 +1,173 @@
+const debug = require('debug')('extract-zip')
+// eslint-disable-next-line node/no-unsupported-features/node-builtins
+const { createWriteStream, promises: fs } = require('fs')
+const getStream = require('get-stream')
+const path = require('path')
+const { promisify } = require('util')
+const stream = require('stream')
+const yauzl = require('yauzl')
+
+const openZip = promisify(yauzl.open)
+const pipeline = promisify(stream.pipeline)
+
+class Extractor {
+ constructor (zipPath, opts) {
+ this.zipPath = zipPath
+ this.opts = opts
+ }
+
+ async extract () {
+ debug('opening', this.zipPath, 'with opts', this.opts)
+
+ this.zipfile = await openZip(this.zipPath, { lazyEntries: true })
+ this.canceled = false
+
+ return new Promise((resolve, reject) => {
+ this.zipfile.on('error', err => {
+ this.canceled = true
+ reject(err)
+ })
+ this.zipfile.readEntry()
+
+ this.zipfile.on('close', () => {
+ if (!this.canceled) {
+ debug('zip extraction complete')
+ resolve()
+ }
+ })
+
+ this.zipfile.on('entry', async entry => {
+ /* istanbul ignore if */
+ if (this.canceled) {
+ debug('skipping entry', entry.fileName, { cancelled: this.canceled })
+ return
+ }
+
+ debug('zipfile entry', entry.fileName)
+
+ if (entry.fileName.startsWith('__MACOSX/')) {
+ this.zipfile.readEntry()
+ return
+ }
+
+ const destDir = path.dirname(path.join(this.opts.dir, entry.fileName))
+
+ try {
+ await fs.mkdir(destDir, { recursive: true })
+
+ const canonicalDestDir = await fs.realpath(destDir)
+ const relativeDestDir = path.relative(this.opts.dir, canonicalDestDir)
+
+ if (relativeDestDir.split(path.sep).includes('..')) {
+ throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`)
+ }
+
+ await this.extractEntry(entry)
+ debug('finished processing', entry.fileName)
+ this.zipfile.readEntry()
+ } catch (err) {
+ this.canceled = true
+ this.zipfile.close()
+ reject(err)
+ }
+ })
+ })
+ }
+
+ async extractEntry (entry) {
+ /* istanbul ignore if */
+ if (this.canceled) {
+ debug('skipping entry extraction', entry.fileName, { cancelled: this.canceled })
+ return
+ }
+
+ if (this.opts.onEntry) {
+ this.opts.onEntry(entry, this.zipfile)
+ }
+
+ const dest = path.join(this.opts.dir, entry.fileName)
+
+ // convert external file attr int into a fs stat mode int
+ const mode = (entry.externalFileAttributes >> 16) & 0xFFFF
+ // check if it's a symlink or dir (using stat mode constants)
+ const IFMT = 61440
+ const IFDIR = 16384
+ const IFLNK = 40960
+ const symlink = (mode & IFMT) === IFLNK
+ let isDir = (mode & IFMT) === IFDIR
+
+ // Failsafe, borrowed from jsZip
+ if (!isDir && entry.fileName.endsWith('/')) {
+ isDir = true
+ }
+
+ // check for windows weird way of specifying a directory
+ // https://github.com/maxogden/extract-zip/issues/13#issuecomment-154494566
+ const madeBy = entry.versionMadeBy >> 8
+ if (!isDir) isDir = (madeBy === 0 && entry.externalFileAttributes === 16)
+
+ debug('extracting entry', { filename: entry.fileName, isDir: isDir, isSymlink: symlink })
+
+ const procMode = this.getExtractedMode(mode, isDir) & 0o777
+
+ // always ensure folders are created
+ const destDir = isDir ? dest : path.dirname(dest)
+
+ const mkdirOptions = { recursive: true }
+ if (isDir) {
+ mkdirOptions.mode = procMode
+ }
+ debug('mkdir', { dir: destDir, ...mkdirOptions })
+ await fs.mkdir(destDir, mkdirOptions)
+ if (isDir) return
+
+ debug('opening read stream', dest)
+ const readStream = await promisify(this.zipfile.openReadStream.bind(this.zipfile))(entry)
+
+ if (symlink) {
+ const link = await getStream(readStream)
+ debug('creating symlink', link, dest)
+ await fs.symlink(link, dest)
+ } else {
+ await pipeline(readStream, createWriteStream(dest, { mode: procMode }))
+ }
+ }
+
+ getExtractedMode (entryMode, isDir) {
+ let mode = entryMode
+ // Set defaults, if necessary
+ if (mode === 0) {
+ if (isDir) {
+ if (this.opts.defaultDirMode) {
+ mode = parseInt(this.opts.defaultDirMode, 10)
+ }
+
+ if (!mode) {
+ mode = 0o755
+ }
+ } else {
+ if (this.opts.defaultFileMode) {
+ mode = parseInt(this.opts.defaultFileMode, 10)
+ }
+
+ if (!mode) {
+ mode = 0o644
+ }
+ }
+ }
+
+ return mode
+ }
+}
+
+module.exports = async function (zipPath, opts) {
+ debug('creating target directory', opts.dir)
+
+ if (!path.isAbsolute(opts.dir)) {
+ throw new Error('Target directory is expected to be absolute')
+ }
+
+ await fs.mkdir(opts.dir, { recursive: true })
+ opts.dir = await fs.realpath(opts.dir)
+ return new Extractor(zipPath, opts).extract()
+}
diff --git a/node_modules/electron-packager/node_modules/extract-zip/package.json b/node_modules/electron-packager/node_modules/extract-zip/package.json
new file mode 100644
index 0000000..f59a35a
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/extract-zip/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "extract-zip",
+ "version": "2.0.1",
+ "description": "unzip a zip file into a directory using 100% javascript",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "scripts": {
+ "ava": "ava",
+ "coverage": "nyc ava",
+ "lint": "yarn lint:js && yarn lint:ts && yarn tsd",
+ "lint:js": "eslint .",
+ "lint:ts": "eslint --config .eslintrc.typescript.js --ext .ts .",
+ "test": "yarn lint && ava",
+ "tsd": "tsd"
+ },
+ "files": [
+ "cli.js",
+ "index.d.ts"
+ ],
+ "author": "max ogden",
+ "license": "BSD-2-Clause",
+ "repository": "maxogden/extract-zip",
+ "keywords": [
+ "unzip",
+ "zip",
+ "extract"
+ ],
+ "engines": {
+ "node": ">= 10.17.0"
+ },
+ "dependencies": {
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
+ },
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "^3.2.0",
+ "@typescript-eslint/parser": "^3.2.0",
+ "ava": "^3.5.1",
+ "eslint": "^7.2.0",
+ "eslint-config-standard": "^14.1.1",
+ "eslint-plugin-ava": "^10.2.0",
+ "eslint-plugin-import": "^2.20.1",
+ "eslint-plugin-node": "^11.0.0",
+ "eslint-plugin-promise": "^4.2.1",
+ "eslint-plugin-standard": "^4.0.1",
+ "fs-extra": "^9.0.0",
+ "husky": "^4.2.3",
+ "lint-staged": "^10.0.9",
+ "nyc": "^15.0.0",
+ "tsd": "^0.11.0",
+ "typescript": "^3.8.3"
+ },
+ "eslintConfig": {
+ "extends": [
+ "eslint:recommended",
+ "plugin:ava/recommended",
+ "plugin:import/errors",
+ "plugin:import/warnings",
+ "plugin:node/recommended",
+ "plugin:promise/recommended",
+ "standard"
+ ]
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "*.js": "yarn lint:js --fix",
+ "*.ts": "yarn lint:ts --fix"
+ }
+}
diff --git a/node_modules/electron-packager/node_modules/extract-zip/readme.md b/node_modules/electron-packager/node_modules/extract-zip/readme.md
new file mode 100644
index 0000000..4ee7108
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/extract-zip/readme.md
@@ -0,0 +1,57 @@
+# extract-zip
+
+Unzip written in pure JavaScript. Extracts a zip into a directory. Available as a library or a command line program.
+
+Uses the [`yauzl`](http://npmjs.org/yauzl) ZIP parser.
+
+[![NPM](https://nodei.co/npm/extract-zip.png?global=true)](https://npm.im/extract-zip)
+[![Uses JS Standard Style](https://cdn.jsdelivr.net/gh/standard/standard/badge.svg)](https://github.com/standard/standard)
+[![Build Status](https://github.com/maxogden/extract-zip/workflows/CI/badge.svg)](https://github.com/maxogden/extract-zip/actions?query=workflow%3ACI)
+
+## Installation
+
+Make sure you have Node 10 or greater installed.
+
+Get the library:
+
+```
+npm install extract-zip --save
+```
+
+Install the command line program:
+
+```
+npm install extract-zip -g
+```
+
+## JS API
+
+```javascript
+const extract = require('extract-zip')
+
+async function main () {
+ try {
+ await extract(source, { dir: target })
+ console.log('Extraction complete')
+ } catch (err) {
+ // handle any errors
+ }
+}
+```
+
+### Options
+
+- `dir` (required) - the path to the directory where the extracted files are written
+- `defaultDirMode` - integer - Directory Mode (permissions), defaults to `0o755`
+- `defaultFileMode` - integer - File Mode (permissions), defaults to `0o644`
+- `onEntry` - function - if present, will be called with `(entry, zipfile)`, entry is every entry from the zip file forwarded from the `entry` event from yauzl. `zipfile` is the `yauzl` instance
+
+Default modes are only used if no permissions are set in the zip file.
+
+## CLI Usage
+
+```
+extract-zip foo.zip <targetDirectory>
+```
+
+If not specified, `targetDirectory` will default to `process.cwd()`.
diff --git a/node_modules/electron-packager/node_modules/fs-extra/LICENSE b/node_modules/electron-packager/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+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/electron-packager/node_modules/fs-extra/README.md b/node_modules/electron-packager/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..6ed8b6a
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/README.md
@@ -0,0 +1,262 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
+
+[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![License](https://img.shields.io/npm/l/fs-extra.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
+[![build status](https://img.shields.io/github/workflow/status/jprichardson/node-fs-extra/Node.js%20CI/master)](https://github.com/jprichardson/node-fs-extra/actions/workflows/ci.yml?query=branch%3Amaster)
+[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install fs-extra
+
+
+
+Usage
+-----
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+Sync vs Async vs Async/Await
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Also Async/Await will throw an error if one occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+
+// Async/Await:
+async function copyFiles () {
+ try {
+ await fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+ } catch (err) {
+ console.error(err)
+ }
+}
+
+copyFiles()
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirp](docs/ensureDir.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirpSync](docs/ensureDir-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+### CLI
+
+[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+### Obtain Filesystem (Devices, Partitions) Information
+
+[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
+
+### Misc.
+
+- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm test`: runs both the linter and the tests
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js b/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js
new file mode 100644
index 0000000..551abe0
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js
@@ -0,0 +1,169 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirsSync = require('../mkdirs').mkdirsSync
+const utimesMillisSync = require('../util/utimes').utimesMillisSync
+const stat = require('../util/stat')
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ process.emitWarning(
+ 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
+ '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
+ 'Warning', 'fs-extra-WARN0002'
+ )
+ }
+
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
+ stat.checkParentPathsSync(src, srcStat, dest, 'copy')
+ return handleFilterAndCopy(destStat, src, dest, opts)
+}
+
+function handleFilterAndCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirsSync(destParent)
+ return getStats(destStat, src, dest, opts)
+}
+
+function startCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+ else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
+ else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
+ throw new Error(`Unknown file: ${src}`)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ fs.copyFileSync(src, dest)
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
+ return setDestMode(dest, srcStat.mode)
+}
+
+function handleTimestamps (srcMode, src, dest) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
+ return setDestTimestamps(src, dest)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode) {
+ return setDestMode(dest, srcMode | 0o200)
+}
+
+function setDestMode (dest, srcMode) {
+ return fs.chmodSync(dest, srcMode)
+}
+
+function setDestTimestamps (src, dest) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ const updatedSrcStat = fs.statSync(src)
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return setDestMode(dest, srcMode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
+ return startCopy(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+module.exports = copySync
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js b/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..09d53df
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,235 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirs = require('../mkdirs').mkdirs
+const pathExists = require('../path-exists').pathExists
+const utimesMillis = require('../util/utimes').utimesMillis
+const stat = require('../util/stat')
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ process.emitWarning(
+ 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
+ '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
+ 'Warning', 'fs-extra-WARN0001'
+ )
+ }
+
+ stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
+ if (err) return cb(err)
+ if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
+ return checkParentDir(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return getStats(destStat, src, dest, opts, cb)
+ mkdirs(destParent, err => {
+ if (err) return cb(err)
+ return getStats(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function handleFilter (onInclude, destStat, src, dest, opts, cb) {
+ Promise.resolve(opts.filter(src, dest)).then(include => {
+ if (include) return onInclude(destStat, src, dest, opts, cb)
+ return cb()
+ }, error => cb(error))
+}
+
+function startCopy (destStat, src, dest, opts, cb) {
+ if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
+ return getStats(destStat, src, dest, opts, cb)
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
+ else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
+ return cb(new Error(`Unknown file: ${src}`))
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
+ return setDestMode(dest, srcStat.mode, cb)
+ })
+}
+
+function handleTimestampsAndMode (srcMode, src, dest, cb) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) {
+ return makeFileWritable(dest, srcMode, err => {
+ if (err) return cb(err)
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+ })
+ }
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode, cb) {
+ return setDestMode(dest, srcMode | 0o200, cb)
+}
+
+function setDestTimestampsAndMode (srcMode, src, dest, cb) {
+ setDestTimestamps(src, dest, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+}
+
+function setDestMode (dest, srcMode, cb) {
+ return fs.chmod(dest, srcMode, cb)
+}
+
+function setDestTimestamps (src, dest, cb) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ fs.stat(src, (err, updatedSrcStat) => {
+ if (err) return cb(err)
+ return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { destStat } = stats
+ startCopy(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+module.exports = copy
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..45c07a2
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,7 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy')),
+ copySync: require('./copy-sync')
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..b4a2e82
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,39 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(async function emptyDir (dir) {
+ let items
+ try {
+ items = await fs.readdir(dir)
+ } catch {
+ return mkdir.mkdirs(dir)
+ }
+
+ return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..15cc473
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,69 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ fs.stat(dir, (err, stats) => {
+ if (err) {
+ // if the directory doesn't exist, make it
+ if (err.code === 'ENOENT') {
+ return mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ }
+ return callback(err)
+ }
+
+ if (stats.isDirectory()) makeFile()
+ else {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdir(dir, err => {
+ if (err) return callback(err)
+ })
+ }
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ try {
+ if (!fs.statSync(dir).isDirectory()) {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdirSync(dir)
+ }
+ } catch (err) {
+ // If the stat call above failed because the directory doesn't exist, create it
+ if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
+ else throw err
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..ecbcdd0
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const { createFile, createFileSync } = require('./file')
+const { createLink, createLinkSync } = require('./link')
+const { createSymlink, createSymlinkSync } = require('./symlink')
+
+module.exports = {
+ // file
+ createFile,
+ createFileSync,
+ ensureFile: createFile,
+ ensureFileSync: createFileSync,
+ // link
+ createLink,
+ createLinkSync,
+ ensureLink: createLink,
+ ensureLinkSync: createLinkSync,
+ // symlink
+ createSymlink,
+ createSymlinkSync,
+ ensureSymlink: createSymlink,
+ ensureSymlinkSync: createSymlinkSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..f6d6748
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,64 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+const { areIdentical } = require('../util/stat')
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ fs.lstat(dstpath, (_, dstStat) => {
+ fs.lstat(srcpath, (err, srcStat) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+ if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ let dstStat
+ try {
+ dstStat = fs.lstatSync(dstpath)
+ } catch {}
+
+ try {
+ const srcStat = fs.lstatSync(srcpath)
+ if (dstStat && areIdentical(srcStat, dstStat)) return
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..33cd760
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..42dc0ce
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..2b93052
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,82 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('../fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+const { areIdentical } = require('../util/stat')
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ fs.lstat(dstpath, (err, stats) => {
+ if (!err && stats.isSymbolicLink()) {
+ Promise.all([
+ fs.stat(srcpath),
+ fs.stat(dstpath)
+ ]).then(([srcStat, dstStat]) => {
+ if (areIdentical(srcStat, dstStat)) return callback(null)
+ _createSymlink(srcpath, dstpath, type, callback)
+ })
+ } else _createSymlink(srcpath, dstpath, type, callback)
+ })
+}
+
+function _createSymlink (srcpath, dstpath, type, callback) {
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ let stats
+ try {
+ stats = fs.lstatSync(dstpath)
+ } catch {}
+ if (stats && stats.isSymbolicLink()) {
+ const srcStat = fs.statSync(srcpath)
+ const dstStat = fs.statSync(dstpath)
+ if (areIdentical(srcStat, dstStat)) return
+ }
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..7b025e2
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,128 @@
+'use strict'
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchmod',
+ 'lchown',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'opendir',
+ 'readdir',
+ 'readFile',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rm',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.opendir was added in Node.js v12.12.0
+ // fs.rm was added in Node.js v14.14.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export cloned fs:
+Object.assign(exports, fs)
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
+
+// fs.writev only available in Node v12.9.0+
+if (typeof fs.writev === 'function') {
+ // Function signature is
+ // s.writev(fd, buffers[, position], callback)
+ // We need to handle the optional arg, so we use ...args
+ exports.writev = function (fd, buffers, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.writev(fd, buffers, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffers })
+ })
+ })
+ }
+}
+
+// fs.realpath.native sometimes not available if fs is monkey-patched
+if (typeof fs.realpath.native === 'function') {
+ exports.realpath.native = u(fs.realpath.native)
+} else {
+ process.emitWarning(
+ 'fs.realpath.native is not a function. Is fs being monkey-patched?',
+ 'Warning', 'fs-extra-WARN0003'
+ )
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..da6711a
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+module.exports = {
+ // Export promiseified graceful-fs:
+ ...require('./fs'),
+ // Export extra methods:
+ ...require('./copy'),
+ ...require('./empty'),
+ ...require('./ensure'),
+ ...require('./json'),
+ ...require('./mkdirs'),
+ ...require('./move'),
+ ...require('./output-file'),
+ ...require('./path-exists'),
+ ...require('./remove')
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..900126a
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..f11d34d
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: jsonFile.readFile,
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: jsonFile.writeFile,
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..d4e564f
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFileSync } = require('../output-file')
+
+function outputJsonSync (file, data, options) {
+ const str = stringify(data, options)
+
+ outputFileSync(file, str, options)
+}
+
+module.exports = outputJsonSync
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js b/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..0afdeb6
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFile } = require('../output-file')
+
+async function outputJson (file, data, options = {}) {
+ const str = stringify(data, options)
+
+ await outputFile(file, str, options)
+}
+
+module.exports = outputJson
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..9edecee
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromPromise
+const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
+const makeDir = u(_makeDir)
+
+module.exports = {
+ mkdirs: makeDir,
+ mkdirsSync: makeDirSync,
+ // alias
+ mkdirp: makeDir,
+ mkdirpSync: makeDirSync,
+ ensureDir: makeDir,
+ ensureDirSync: makeDirSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js b/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js
new file mode 100644
index 0000000..45ece64
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js
@@ -0,0 +1,27 @@
+'use strict'
+const fs = require('../fs')
+const { checkPath } = require('./utils')
+
+const getMode = options => {
+ const defaults = { mode: 0o777 }
+ if (typeof options === 'number') return options
+ return ({ ...defaults, ...options }).mode
+}
+
+module.exports.makeDir = async (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdir(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
+
+module.exports.makeDirSync = (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdirSync(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js b/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js
new file mode 100644
index 0000000..a4059ad
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js
@@ -0,0 +1,21 @@
+// Adapted from https://github.com/sindresorhus/make-dir
+// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+'use strict'
+const path = require('path')
+
+// https://github.com/nodejs/node/issues/8987
+// https://github.com/libuv/libuv/pull/1088
+module.exports.checkPath = function checkPath (pth) {
+ if (process.platform === 'win32') {
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
+
+ if (pathHasInvalidWinCharacters) {
+ const error = new Error(`Path contains invalid characters: ${pth}`)
+ error.code = 'EINVAL'
+ throw error
+ }
+ }
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..fcee73c
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,7 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ move: u(require('./move')),
+ moveSync: require('./move-sync')
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js b/node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js
new file mode 100644
index 0000000..8453366
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js
@@ -0,0 +1,54 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirpSync
+const stat = require('../util/stat')
+
+function moveSync (src, dest, opts) {
+ opts = opts || {}
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)
+ stat.checkParentPathsSync(src, srcStat, dest, 'move')
+ if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))
+ return doRename(src, dest, overwrite, isChangingCase)
+}
+
+function isParentRoot (dest) {
+ const parent = path.dirname(dest)
+ const parsedPath = path.parse(parent)
+ return parsedPath.root === parent
+}
+
+function doRename (src, dest, overwrite, isChangingCase) {
+ if (isChangingCase) return rename(src, dest, overwrite)
+ if (overwrite) {
+ removeSync(dest)
+ return rename(src, dest, overwrite)
+ }
+ if (fs.existsSync(dest)) throw new Error('dest already exists.')
+ return rename(src, dest, overwrite)
+}
+
+function rename (src, dest, overwrite) {
+ try {
+ fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code !== 'EXDEV') throw err
+ return moveAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveAcrossDevice (src, dest, overwrite) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copySync(src, dest, opts)
+ return removeSync(src)
+}
+
+module.exports = moveSync
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js b/node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js
new file mode 100644
index 0000000..7dc6ecd
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js
@@ -0,0 +1,75 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copy = require('../copy').copy
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirp
+const pathExists = require('../path-exists').pathExists
+const stat = require('../util/stat')
+
+function move (src, dest, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+
+ opts = opts || {}
+
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ stat.checkPaths(src, dest, 'move', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, isChangingCase = false } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'move', err => {
+ if (err) return cb(err)
+ if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)
+ mkdirp(path.dirname(dest), err => {
+ if (err) return cb(err)
+ return doRename(src, dest, overwrite, isChangingCase, cb)
+ })
+ })
+ })
+}
+
+function isParentRoot (dest) {
+ const parent = path.dirname(dest)
+ const parsedPath = path.parse(parent)
+ return parsedPath.root === parent
+}
+
+function doRename (src, dest, overwrite, isChangingCase, cb) {
+ if (isChangingCase) return rename(src, dest, overwrite, cb)
+ if (overwrite) {
+ return remove(dest, err => {
+ if (err) return cb(err)
+ return rename(src, dest, overwrite, cb)
+ })
+ }
+ pathExists(dest, (err, destExists) => {
+ if (err) return cb(err)
+ if (destExists) return cb(new Error('dest already exists.'))
+ return rename(src, dest, overwrite, cb)
+ })
+}
+
+function rename (src, dest, overwrite, cb) {
+ fs.rename(src, dest, err => {
+ if (!err) return cb()
+ if (err.code !== 'EXDEV') return cb(err)
+ return moveAcrossDevice(src, dest, overwrite, cb)
+ })
+}
+
+function moveAcrossDevice (src, dest, overwrite, cb) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+ copy(src, dest, opts, err => {
+ if (err) return cb(err)
+ return remove(src, cb)
+ })
+}
+
+module.exports = move
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js
new file mode 100644
index 0000000..92297ca
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, ...args) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync(file, ...args)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync(file, ...args)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js b/node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..4428e59
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,22 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const u = require('universalify').fromCallback
+const rimraf = require('./rimraf')
+
+function remove (path, callback) {
+ // Node 14.14.0+
+ if (fs.rm) return fs.rm(path, { recursive: true, force: true }, callback)
+ rimraf(path, callback)
+}
+
+function removeSync (path) {
+ // Node 14.14.0+
+ if (fs.rmSync) return fs.rmSync(path, { recursive: true, force: true })
+ rimraf.sync(path)
+}
+
+module.exports = {
+ remove: u(remove),
+ removeSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/electron-packager/node_modules/fs-extra/lib/remove/rimraf.js
new file mode 100644
index 0000000..2c77102
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/remove/rimraf.js
@@ -0,0 +1,302 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const assert = require('assert')
+
+const isWindows = (process.platform === 'win32')
+
+function defaults (options) {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+}
+
+function rimraf (p, options, cb) {
+ let busyTries = 0
+
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
+ busyTries < options.maxBusyTries) {
+ busyTries++
+ const time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), time)
+ }
+
+ // already gone
+ if (er.code === 'ENOENT') er = null
+ }
+
+ cb(er)
+ })
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === 'ENOENT') {
+ return cb(null)
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === 'EPERM' && isWindows) {
+ return fixWinEPERM(p, options, er, cb)
+ }
+
+ if (st && st.isDirectory()) {
+ return rmdir(p, options, er, cb)
+ }
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === 'ENOENT') {
+ return cb(null)
+ }
+ if (er.code === 'EPERM') {
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ }
+ if (er.code === 'EISDIR') {
+ return rmdir(p, options, er, cb)
+ }
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2) {
+ cb(er2.code === 'ENOENT' ? null : er)
+ } else {
+ options.stat(p, (er3, stats) => {
+ if (er3) {
+ cb(er3.code === 'ENOENT' ? null : er)
+ } else if (stats.isDirectory()) {
+ rmdir(p, options, er, cb)
+ } else {
+ options.unlink(p, cb)
+ }
+ })
+ }
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ let stats
+
+ assert(p)
+ assert(options)
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ if (stats.isDirectory()) {
+ rmdirSync(p, options, er)
+ } else {
+ options.unlinkSync(p)
+ }
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
+ rmkids(p, options, cb)
+ } else if (er && er.code === 'ENOTDIR') {
+ cb(originalEr)
+ } else {
+ cb(er)
+ }
+ })
+}
+
+function rmkids (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er) return cb(er)
+
+ let n = files.length
+ let errState
+
+ if (n === 0) return options.rmdir(p, cb)
+
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState) {
+ return
+ }
+ if (er) return cb(errState = er)
+ if (--n === 0) {
+ options.rmdir(p, cb)
+ }
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ let st
+
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === 'EPERM' && isWindows) {
+ fixWinEPERMSync(p, options, er)
+ }
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory()) {
+ rmdirSync(p, options, null)
+ } else {
+ options.unlinkSync(p)
+ }
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ } else if (er.code === 'EPERM') {
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ } else if (er.code !== 'EISDIR') {
+ throw er
+ }
+ rmdirSync(p, options, er)
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === 'ENOTDIR') {
+ throw originalEr
+ } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
+ rmkidsSync(p, options)
+ } else if (er.code !== 'ENOENT') {
+ throw er
+ }
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ if (isWindows) {
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const startTime = Date.now()
+ do {
+ try {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ } catch {}
+ } while (Date.now() - startTime < 500) // give up after 500ms
+ } else {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ }
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js b/node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js
new file mode 100644
index 0000000..0ed5aec
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js
@@ -0,0 +1,154 @@
+'use strict'
+
+const fs = require('../fs')
+const path = require('path')
+const util = require('util')
+
+function getStats (src, dest, opts) {
+ const statFunc = opts.dereference
+ ? (file) => fs.stat(file, { bigint: true })
+ : (file) => fs.lstat(file, { bigint: true })
+ return Promise.all([
+ statFunc(src),
+ statFunc(dest).catch(err => {
+ if (err.code === 'ENOENT') return null
+ throw err
+ })
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
+}
+
+function getStatsSync (src, dest, opts) {
+ let destStat
+ const statFunc = opts.dereference
+ ? (file) => fs.statSync(file, { bigint: true })
+ : (file) => fs.lstatSync(file, { bigint: true })
+ const srcStat = statFunc(src)
+ try {
+ destStat = statFunc(dest)
+ } catch (err) {
+ if (err.code === 'ENOENT') return { srcStat, destStat: null }
+ throw err
+ }
+ return { srcStat, destStat }
+}
+
+function checkPaths (src, dest, funcName, opts, cb) {
+ util.callbackify(getStats)(src, dest, opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+
+ if (destStat) {
+ if (areIdentical(srcStat, destStat)) {
+ const srcBaseName = path.basename(src)
+ const destBaseName = path.basename(dest)
+ if (funcName === 'move' &&
+ srcBaseName !== destBaseName &&
+ srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
+ return cb(null, { srcStat, destStat, isChangingCase: true })
+ }
+ return cb(new Error('Source and destination must not be the same.'))
+ }
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
+ }
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
+ }
+ }
+
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return cb(null, { srcStat, destStat })
+ })
+}
+
+function checkPathsSync (src, dest, funcName, opts) {
+ const { srcStat, destStat } = getStatsSync(src, dest, opts)
+
+ if (destStat) {
+ if (areIdentical(srcStat, destStat)) {
+ const srcBaseName = path.basename(src)
+ const destBaseName = path.basename(dest)
+ if (funcName === 'move' &&
+ srcBaseName !== destBaseName &&
+ srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
+ return { srcStat, destStat, isChangingCase: true }
+ }
+ throw new Error('Source and destination must not be the same.')
+ }
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
+ }
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
+ }
+ }
+
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return { srcStat, destStat }
+}
+
+// recursively check if dest parent is a subdirectory of src.
+// It works for all file types including symlinks since it
+// checks the src and dest inodes. It starts from the deepest
+// parent and stops once it reaches the src parent or the root path.
+function checkParentPaths (src, srcStat, dest, funcName, cb) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
+ fs.stat(destParent, { bigint: true }, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb()
+ return cb(err)
+ }
+ if (areIdentical(srcStat, destStat)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return checkParentPaths(src, srcStat, destParent, funcName, cb)
+ })
+}
+
+function checkParentPathsSync (src, srcStat, dest, funcName) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return
+ let destStat
+ try {
+ destStat = fs.statSync(destParent, { bigint: true })
+ } catch (err) {
+ if (err.code === 'ENOENT') return
+ throw err
+ }
+ if (areIdentical(srcStat, destStat)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return checkParentPathsSync(src, srcStat, destParent, funcName)
+}
+
+function areIdentical (srcStat, destStat) {
+ return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// It only checks the path strings.
+function isSrcSubdir (src, dest) {
+ const srcArr = path.resolve(src).split(path.sep).filter(i => i)
+ const destArr = path.resolve(dest).split(path.sep).filter(i => i)
+ return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
+}
+
+function errMsg (src, dest, funcName) {
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
+}
+
+module.exports = {
+ checkPaths,
+ checkPathsSync,
+ checkParentPaths,
+ checkParentPathsSync,
+ isSrcSubdir,
+ areIdentical
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js b/node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..75395de
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,26 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+function utimesMillisSync (path, atime, mtime) {
+ const fd = fs.openSync(path, 'r+')
+ fs.futimesSync(fd, atime, mtime)
+ return fs.closeSync(fd)
+}
+
+module.exports = {
+ utimesMillis,
+ utimesMillisSync
+}
diff --git a/node_modules/electron-packager/node_modules/fs-extra/package.json b/node_modules/electron-packager/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..059000e
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/fs-extra/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "fs-extra",
+ "version": "10.1.0",
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
+ "engines": {
+ "node": ">=12"
+ },
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jprichardson/node-fs-extra"
+ },
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move",
+ "promise"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "devDependencies": {
+ "at-least-node": "^1.0.0",
+ "klaw": "^2.1.1",
+ "klaw-sync": "^3.0.2",
+ "minimist": "^1.1.1",
+ "mocha": "^5.0.5",
+ "nyc": "^15.0.0",
+ "proxyquire": "^2.0.1",
+ "read-dir-files": "^0.1.1",
+ "standard": "^16.0.3"
+ },
+ "main": "./lib/index.js",
+ "files": [
+ "lib/",
+ "!lib/**/__tests__/"
+ ],
+ "scripts": {
+ "lint": "standard",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "test": "npm run lint && npm run unit",
+ "unit": "nyc node test.js"
+ },
+ "sideEffects": false
+}
diff --git a/node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md b/node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md
new file mode 100644
index 0000000..d772e43
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md
@@ -0,0 +1,171 @@
+6.1.0 / 2020-10-31
+------------------
+
+- Add `finalEOL` option to disable writing final EOL ([#115](https://github.com/jprichardson/node-jsonfile/issues/115), [#137](https://github.com/jprichardson/node-jsonfile/pull/137))
+- Update dependency ([#138](https://github.com/jprichardson/node-jsonfile/pull/138))
+
+6.0.1 / 2020-03-07
+------------------
+
+- Update dependency ([#130](https://github.com/jprichardson/node-jsonfile/pull/130))
+- Fix code style ([#129](https://github.com/jprichardson/node-jsonfile/pull/129))
+
+6.0.0 / 2020-02-24
+------------------
+
+- **BREAKING:** Drop support for Node 6 & 8 ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- **BREAKING:** Do not allow passing `null` as options to `readFile()` or `writeFile()` ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- Refactor internals ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+
+5.0.0 / 2018-09-08
+------------------
+
+- **BREAKING:** Drop Node 4 support
+- **BREAKING:** If no callback is passed to an asynchronous method, a promise is now returned ([#109](https://github.com/jprichardson/node-jsonfile/pull/109))
+- Cleanup docs
+
+4.0.0 / 2017-07-12
+------------------
+
+- **BREAKING:** Remove global `spaces` option.
+- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js.
+- Remove undocumented `passParsingErrors` option.
+- Added `EOL` override option to `writeFile` when using `spaces`. [#89]
+
+3.0.1 / 2017-07-05
+------------------
+
+- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written.
+
+3.0.0 / 2017-04-25
+------------------
+
+- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false`
+
+2.4.0 / 2016-09-15
+------------------
+### Changed
+- added optional support for `graceful-fs` [#62]
+
+2.3.1 / 2016-05-13
+------------------
+- fix to support BOM. [#45][#45]
+
+2.3.0 / 2016-04-16
+------------------
+- add `throws` to `readFile()`. See [#39][#39]
+- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs)
+
+2.2.3 / 2015-10-14
+------------------
+- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34
+
+2.2.2 / 2015-09-16
+------------------
+- split out tests into separate files
+- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33
+
+2.2.1 / 2015-06-25
+------------------
+- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28
+
+2.2.0 / 2015-06-25
+------------------
+- added `options.spaces` to `writeFile()` and `writeFileSync()`
+
+2.1.2 / 2015-06-22
+------------------
+- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25
+
+2.1.1 / 2015-06-19
+------------------
+- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24
+
+2.1.0 / 2015-06-19
+------------------
+- cleanup: JavaScript Standard Style, rename files, dropped terst for assert
+- methods now support JSON revivers/replacers
+
+2.0.1 / 2015-05-24
+------------------
+- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21
+
+2.0.0 / 2014-07-28
+------------------
+* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14)
+* added `options.throws` to `readFileSync()`
+* dropped support for Node v0.8
+
+1.2.0 / 2014-06-29
+------------------
+* removed semicolons
+* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but
+changes it according to docs. [#12][#12]
+
+1.1.1 / 2013-11-11
+------------------
+* fixed catching of callback bug (ffissore / #5)
+
+1.1.0 / 2013-10-11
+------------------
+* added `options` param to methods, (seanodell / #4)
+
+1.0.1 / 2013-09-05
+------------------
+* removed `homepage` field from package.json to remove NPM warning
+
+1.0.0 / 2013-06-28
+------------------
+* added `.npmignore`, #1
+* changed spacing default from `4` to `2` to follow Node conventions
+
+0.0.1 / 2012-09-10
+------------------
+* Initial release.
+
+[#89]: https://github.com/jprichardson/node-jsonfile/pull/89
+[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails"
+[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file"
+[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file"
+[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch"
+[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working"
+[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value"
+[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)"
+[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature"
+[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file"
+[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file."
+[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file."
+[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename"
+[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()"
+[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?"
+[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string"
+[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?"
+[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?"
+[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken "
+[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality"
+[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra"
+[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods"
+[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error"
+[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync"
+[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated"
+[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute"
+[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity"
+[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method"
+[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods"
+[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem"
+[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null"
+[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`"
+[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF"
+[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline"
+[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options"
+[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync"
+[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile"
+[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example."
+[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me."
+[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message"
+[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible"
+[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite."
+[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync"
+[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2"
+[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted."
+[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file"
diff --git a/node_modules/electron-packager/node_modules/jsonfile/LICENSE b/node_modules/electron-packager/node_modules/jsonfile/LICENSE
new file mode 100644
index 0000000..cb7e807
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/jsonfile/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2012-2015, JP Richardson <jprichardson@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/electron-packager/node_modules/jsonfile/README.md b/node_modules/electron-packager/node_modules/jsonfile/README.md
new file mode 100644
index 0000000..910cde0
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/jsonfile/README.md
@@ -0,0 +1,230 @@
+Node.js - jsonfile
+================
+
+Easily read/write JSON files in Node.js. _Note: this module cannot be used in the browser._
+
+[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile)
+[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
+
+<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
+
+Why?
+----
+
+Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
+
+
+
+Installation
+------------
+
+ npm install --save jsonfile
+
+
+
+API
+---
+
+* [`readFile(filename, [options], callback)`](#readfilefilename-options-callback)
+* [`readFileSync(filename, [options])`](#readfilesyncfilename-options)
+* [`writeFile(filename, obj, [options], callback)`](#writefilefilename-obj-options-callback)
+* [`writeFileSync(filename, obj, [options])`](#writefilesyncfilename-obj-options)
+
+----
+
+### readFile(filename, [options], callback)
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+ - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
+ If `false`, returns `null` for the object.
+
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file, function (err, obj) {
+ if (err) console.error(err)
+ console.dir(obj)
+})
+```
+
+You can also use this method with promises. The `readFile` method will return a promise if you do not pass a callback function.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file)
+ .then(obj => console.dir(obj))
+ .catch(error => console.error(error))
+```
+
+----
+
+### readFileSync(filename, [options])
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+
+console.dir(jsonfile.readFileSync(file))
+```
+
+----
+
+### writeFile(filename, obj, [options], callback)
+
+`options`: Pass in any [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, function (err) {
+ if (err) console.error(err)
+})
+```
+Or use with promises as follows:
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj)
+ .then(res => {
+ console.log('Write complete')
+ })
+ .catch(error => console.error(error))
+```
+
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2 }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, finalEOL: false }, function (err) {
+ if (err) console.log(err)
+})
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFile` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { flag: 'a' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+----
+
+### writeFileSync(filename, obj, [options])
+
+`options`: Pass in any [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj)
+```
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2 })
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' })
+```
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, finalEOL: false })
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFileSync` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { flag: 'a' })
+```
+
+License
+-------
+
+(MIT License)
+
+Copyright 2012-2016, JP Richardson <jprichardson@gmail.com>
diff --git a/node_modules/electron-packager/node_modules/jsonfile/index.js b/node_modules/electron-packager/node_modules/jsonfile/index.js
new file mode 100644
index 0000000..0582868
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/jsonfile/index.js
@@ -0,0 +1,88 @@
+let _fs
+try {
+ _fs = require('graceful-fs')
+} catch (_) {
+ _fs = require('fs')
+}
+const universalify = require('universalify')
+const { stringify, stripBom } = require('./utils')
+
+async function _readFile (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ let data = await universalify.fromCallback(fs.readFile)(file, options)
+
+ data = stripBom(data)
+
+ let obj
+ try {
+ obj = JSON.parse(data, options ? options.reviver : null)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+
+ return obj
+}
+
+const readFile = universalify.fromPromise(_readFile)
+
+function readFileSync (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ try {
+ let content = fs.readFileSync(file, options)
+ content = stripBom(content)
+ return JSON.parse(content, options.reviver)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+}
+
+async function _writeFile (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+
+ await universalify.fromCallback(fs.writeFile)(file, str, options)
+}
+
+const writeFile = universalify.fromPromise(_writeFile)
+
+function writeFileSync (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+ // not sure if fs.writeFileSync returns anything, but just in case
+ return fs.writeFileSync(file, str, options)
+}
+
+const jsonfile = {
+ readFile,
+ readFileSync,
+ writeFile,
+ writeFileSync
+}
+
+module.exports = jsonfile
diff --git a/node_modules/electron-packager/node_modules/jsonfile/package.json b/node_modules/electron-packager/node_modules/jsonfile/package.json
new file mode 100644
index 0000000..4d01eb1
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/jsonfile/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "jsonfile",
+ "version": "6.1.0",
+ "description": "Easily read/write JSON files.",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:jprichardson/node-jsonfile.git"
+ },
+ "keywords": [
+ "read",
+ "write",
+ "file",
+ "json",
+ "fs",
+ "fs-extra"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ },
+ "devDependencies": {
+ "mocha": "^8.2.0",
+ "rimraf": "^2.4.0",
+ "standard": "^16.0.1"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js",
+ "utils.js"
+ ],
+ "scripts": {
+ "lint": "standard",
+ "test": "npm run lint && npm run unit",
+ "unit": "mocha"
+ }
+}
diff --git a/node_modules/electron-packager/node_modules/jsonfile/utils.js b/node_modules/electron-packager/node_modules/jsonfile/utils.js
new file mode 100644
index 0000000..b5ff48e
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/jsonfile/utils.js
@@ -0,0 +1,14 @@
+function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
+ const EOF = finalEOL ? EOL : ''
+ const str = JSON.stringify(obj, replacer, spaces)
+
+ return str.replace(/\n/g, EOL) + EOF
+}
+
+function stripBom (content) {
+ // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
+ if (Buffer.isBuffer(content)) content = content.toString('utf8')
+ return content.replace(/^\uFEFF/, '')
+}
+
+module.exports = { stringify, stripBom }
diff --git a/node_modules/electron-packager/node_modules/ms/index.js b/node_modules/electron-packager/node_modules/ms/index.js
new file mode 100644
index 0000000..c4498bc
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/electron-packager/node_modules/ms/license.md b/node_modules/electron-packager/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/electron-packager/node_modules/ms/package.json b/node_modules/electron-packager/node_modules/ms/package.json
new file mode 100644
index 0000000..eea666e
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.1.2",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ }
+}
diff --git a/node_modules/electron-packager/node_modules/ms/readme.md b/node_modules/electron-packager/node_modules/ms/readme.md
new file mode 100644
index 0000000..9a1996b
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/electron-packager/node_modules/semver/LICENSE b/node_modules/electron-packager/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/electron-packager/node_modules/semver/README.md b/node_modules/electron-packager/node_modules/semver/README.md
new file mode 100644
index 0000000..df54e7a
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/README.md
@@ -0,0 +1,568 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+You can also just load the module for the function that you care about, if
+you'd like to minimize your footprint.
+
+```js
+// load the whole API at once in a single object
+const semver = require('semver')
+
+// or just load the bits you need
+// all of them listed here, just pick and choose what you want
+
+// classes
+const SemVer = require('semver/classes/semver')
+const Comparator = require('semver/classes/comparator')
+const Range = require('semver/classes/range')
+
+// functions for working with versions
+const semverParse = require('semver/functions/parse')
+const semverValid = require('semver/functions/valid')
+const semverClean = require('semver/functions/clean')
+const semverInc = require('semver/functions/inc')
+const semverDiff = require('semver/functions/diff')
+const semverMajor = require('semver/functions/major')
+const semverMinor = require('semver/functions/minor')
+const semverPatch = require('semver/functions/patch')
+const semverPrerelease = require('semver/functions/prerelease')
+const semverCompare = require('semver/functions/compare')
+const semverRcompare = require('semver/functions/rcompare')
+const semverCompareLoose = require('semver/functions/compare-loose')
+const semverCompareBuild = require('semver/functions/compare-build')
+const semverSort = require('semver/functions/sort')
+const semverRsort = require('semver/functions/rsort')
+
+// low-level comparators between versions
+const semverGt = require('semver/functions/gt')
+const semverLt = require('semver/functions/lt')
+const semverEq = require('semver/functions/eq')
+const semverNeq = require('semver/functions/neq')
+const semverGte = require('semver/functions/gte')
+const semverLte = require('semver/functions/lte')
+const semverCmp = require('semver/functions/cmp')
+const semverCoerce = require('semver/functions/coerce')
+
+// working with ranges
+const semverSatisfies = require('semver/functions/satisfies')
+const semverMaxSatisfying = require('semver/ranges/max-satisfying')
+const semverMinSatisfying = require('semver/ranges/min-satisfying')
+const semverToComparators = require('semver/ranges/to-comparators')
+const semverMinVersion = require('semver/ranges/min-version')
+const semverValidRange = require('semver/ranges/valid')
+const semverOutside = require('semver/ranges/outside')
+const semverGtr = require('semver/ranges/gtr')
+const semverLtr = require('semver/ranges/ltr')
+const semverIntersects = require('semver/ranges/intersects')
+const simplifyRange = require('semver/ranges/simplify')
+const rangeSubset = require('semver/ranges/subset')
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless
+ `includePrerelease` is specified, in which case any version at all
+ satisfies)
+* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero element in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0-0`
+* `^0.2.3` := `>=0.2.3 <0.3.0-0`
+* `^0.0.3` := `>=0.0.3 <0.0.4-0`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0-0`
+* `^0.0.x` := `>=0.0.0 <0.1.0-0`
+* `^0.0` := `>=0.0.0 <0.1.0-0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0-0`
+* `^0.x` := `>=0.0.0 <1.0.0-0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
+ are equal. Sorts in ascending order if passed to `Array.sort()`.
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+* `simplifyRange(versions, range)`: Return a "simplified" range that
+ matches the same items in `versions` list as the range specified. Note
+ that it does *not* guarantee that it would match the same versions in all
+ cases, only for the set of versions provided. This is useful when
+ generating ranges by joining together multiple versions with `||`
+ programmatically, to provide the user with something a bit more
+ ergonomic. If the provided range is shorter in string-length than the
+ generated range, then that is returned.
+* `subset(subRange, superRange)`: Return `true` if the `subRange` range is
+ entirely contained by the `superRange` range.
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version, options)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
+
+If the `options.rtl` flag is set, then `coerce` will return the right-most
+coercible tuple that does not share an ending index with a longer coercible
+tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
+`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
+any other overlapping SemVer tuple.
+
+### Clean
+
+* `clean(version)`: Clean a string to be a valid semver if possible
+
+This will return a cleaned and trimmed semver version. If the provided
+version is not valid a null will be returned. This does not work for
+ranges.
+
+ex.
+* `s.clean(' = v 2.1.5foo')`: `null`
+* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean(' = v 2.1.5-foo')`: `null`
+* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean('=v2.1.5')`: `'2.1.5'`
+* `s.clean(' =v2.1.5')`: `2.1.5`
+* `s.clean(' 2.1.5 ')`: `'2.1.5'`
+* `s.clean('~1.0.0')`: `null`
+
+## Exported Modules
+
+<!--
+TODO: Make sure that all of these items are documented (classes aren't,
+eg), and then pull the module name into the documentation for that specific
+thing.
+-->
+
+You may pull in just the part of this semver utility that you need, if you
+are sensitive to packing and tree-shaking concerns. The main
+`require('semver')` export uses getter functions to lazily load the parts
+of the API that are used.
+
+The following modules are available:
+
+* `require('semver')`
+* `require('semver/classes')`
+* `require('semver/classes/comparator')`
+* `require('semver/classes/range')`
+* `require('semver/classes/semver')`
+* `require('semver/functions/clean')`
+* `require('semver/functions/cmp')`
+* `require('semver/functions/coerce')`
+* `require('semver/functions/compare')`
+* `require('semver/functions/compare-build')`
+* `require('semver/functions/compare-loose')`
+* `require('semver/functions/diff')`
+* `require('semver/functions/eq')`
+* `require('semver/functions/gt')`
+* `require('semver/functions/gte')`
+* `require('semver/functions/inc')`
+* `require('semver/functions/lt')`
+* `require('semver/functions/lte')`
+* `require('semver/functions/major')`
+* `require('semver/functions/minor')`
+* `require('semver/functions/neq')`
+* `require('semver/functions/parse')`
+* `require('semver/functions/patch')`
+* `require('semver/functions/prerelease')`
+* `require('semver/functions/rcompare')`
+* `require('semver/functions/rsort')`
+* `require('semver/functions/satisfies')`
+* `require('semver/functions/sort')`
+* `require('semver/functions/valid')`
+* `require('semver/ranges/gtr')`
+* `require('semver/ranges/intersects')`
+* `require('semver/ranges/ltr')`
+* `require('semver/ranges/max-satisfying')`
+* `require('semver/ranges/min-satisfying')`
+* `require('semver/ranges/min-version')`
+* `require('semver/ranges/outside')`
+* `require('semver/ranges/to-comparators')`
+* `require('semver/ranges/valid')`
diff --git a/node_modules/electron-packager/node_modules/semver/bin/semver.js b/node_modules/electron-packager/node_modules/semver/bin/semver.js
new file mode 100755
index 0000000..8d1b557
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/bin/semver.js
@@ -0,0 +1,183 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+const argv = process.argv.slice(2)
+
+let versions = []
+
+const range = []
+
+let inc = null
+
+const version = require('../package.json').version
+
+let loose = false
+
+let includePrerelease = false
+
+let coerce = false
+
+let rtl = false
+
+let identifier
+
+const semver = require('../')
+
+let reverse = false
+
+let options = {}
+
+const main = () => {
+ if (!argv.length) {
+ return help()
+ }
+ while (argv.length) {
+ let a = argv.shift()
+ const indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ const value = a.slice(indexOfEqualSign + 1)
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(value)
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '--rtl':
+ rtl = true
+ break
+ case '--ltr':
+ rtl = false
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
+
+ versions = versions.map((v) => {
+ return coerce ? (semver.coerce(v, options) || { version: v }).version : v
+ }).filter((v) => {
+ return semver.valid(v)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ if (inc && (versions.length !== 1 || range.length)) {
+ return failInc()
+ }
+
+ for (let i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter((v) => {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ }
+ return success(versions)
+}
+
+const failInc = () => {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+const fail = () => process.exit(1)
+
+const success = () => {
+ const compare = reverse ? 'rcompare' : 'compare'
+ versions.sort((a, b) => {
+ return semver[compare](a, b, options)
+ }).map((v) => {
+ return semver.clean(v, options)
+ }).map((v) => {
+ return inc ? semver.inc(v, inc, options, identifier) : v
+ }).forEach((v, i, _) => {
+ console.log(v)
+ })
+}
+
+const help = () => console.log(
+`SemVer ${version}
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.`)
+
+main()
diff --git a/node_modules/electron-packager/node_modules/semver/classes/comparator.js b/node_modules/electron-packager/node_modules/semver/classes/comparator.js
new file mode 100644
index 0000000..62cd204
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/classes/comparator.js
@@ -0,0 +1,136 @@
+const ANY = Symbol('SemVer ANY')
+// hoisted class for cyclic dependency
+class Comparator {
+ static get ANY () {
+ return ANY
+ }
+
+ constructor (comp, options) {
+ options = parseOptions(options)
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+ }
+
+ parse (comp) {
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ const m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError(`Invalid comparator: ${comp}`)
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : ''
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+ }
+
+ toString () {
+ return this.value
+ }
+
+ test (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY || version === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+ }
+
+ intersects (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false,
+ }
+ }
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true
+ }
+ return new Range(comp.value, options).test(this.value)
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true
+ }
+ return new Range(this.value, options).test(comp.semver)
+ }
+
+ const sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>')
+ const sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ const sameSemVer = this.semver.version === comp.semver.version
+ const differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=')
+ const oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, options) &&
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ const oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, options) &&
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>')
+
+ return (
+ sameDirectionIncreasing ||
+ sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan ||
+ oppositeDirectionsGreaterThan
+ )
+ }
+}
+
+module.exports = Comparator
+
+const parseOptions = require('../internal/parse-options')
+const { re, t } = require('../internal/re')
+const cmp = require('../functions/cmp')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const Range = require('./range')
diff --git a/node_modules/electron-packager/node_modules/semver/classes/index.js b/node_modules/electron-packager/node_modules/semver/classes/index.js
new file mode 100644
index 0000000..5e3f5c9
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/classes/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ SemVer: require('./semver.js'),
+ Range: require('./range.js'),
+ Comparator: require('./comparator.js'),
+}
diff --git a/node_modules/electron-packager/node_modules/semver/classes/range.js b/node_modules/electron-packager/node_modules/semver/classes/range.js
new file mode 100644
index 0000000..7dc24bc
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/classes/range.js
@@ -0,0 +1,519 @@
+// hoisted class for cyclic dependency
+class Range {
+ constructor (range, options) {
+ options = parseOptions(options)
+
+ if (range instanceof Range) {
+ if (
+ range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease
+ ) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ // just put it in the set and return
+ this.raw = range.value
+ this.set = [[range]]
+ this.format()
+ return this
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First, split based on boolean or ||
+ this.raw = range
+ this.set = range
+ .split('||')
+ // map the range to a 2d array of comparators
+ .map(r => this.parseRange(r.trim()))
+ // throw out any comparator lists that are empty
+ // this generally means that it was not a valid range, which is allowed
+ // in loose mode, but will still throw if the WHOLE range is invalid.
+ .filter(c => c.length)
+
+ if (!this.set.length) {
+ throw new TypeError(`Invalid SemVer Range: ${range}`)
+ }
+
+ // if we have any that are not the null set, throw out null sets.
+ if (this.set.length > 1) {
+ // keep the first one, in case they're all null sets
+ const first = this.set[0]
+ this.set = this.set.filter(c => !isNullSet(c[0]))
+ if (this.set.length === 0) {
+ this.set = [first]
+ } else if (this.set.length > 1) {
+ // if we have any that are *, then the range is just *
+ for (const c of this.set) {
+ if (c.length === 1 && isAny(c[0])) {
+ this.set = [c]
+ break
+ }
+ }
+ }
+ }
+
+ this.format()
+ }
+
+ format () {
+ this.range = this.set
+ .map((comps) => {
+ return comps.join(' ').trim()
+ })
+ .join('||')
+ .trim()
+ return this.range
+ }
+
+ toString () {
+ return this.range
+ }
+
+ parseRange (range) {
+ range = range.trim()
+
+ // memoize range parsing for performance.
+ // this is a very hot path, and fully deterministic.
+ const memoOpts = Object.keys(this.options).join(',')
+ const memoKey = `parseRange:${memoOpts}:${range}`
+ const cached = cache.get(memoKey)
+ if (cached) {
+ return cached
+ }
+
+ const loose = this.options.loose
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
+ debug('hyphen replace', range)
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range)
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ')
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ let rangeList = range
+ .split(' ')
+ .map(comp => parseComparator(comp, this.options))
+ .join(' ')
+ .split(/\s+/)
+ // >=0.0.0 is equivalent to *
+ .map(comp => replaceGTE0(comp, this.options))
+
+ if (loose) {
+ // in loose mode, throw out any that are not valid comparators
+ rangeList = rangeList.filter(comp => {
+ debug('loose invalid filter', comp, this.options)
+ return !!comp.match(re[t.COMPARATORLOOSE])
+ })
+ }
+ debug('range list', rangeList)
+
+ // if any comparators are the null set, then replace with JUST null set
+ // if more than one comparator, remove any * comparators
+ // also, don't include the same comparator more than once
+ const rangeMap = new Map()
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
+ for (const comp of comparators) {
+ if (isNullSet(comp)) {
+ return [comp]
+ }
+ rangeMap.set(comp.value, comp)
+ }
+ if (rangeMap.size > 1 && rangeMap.has('')) {
+ rangeMap.delete('')
+ }
+
+ const result = [...rangeMap.values()]
+ cache.set(memoKey, result)
+ return result
+ }
+
+ intersects (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some((thisComparators) => {
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some((rangeComparators) => {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every((thisComparator) => {
+ return rangeComparators.every((rangeComparator) => {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
+ })
+ )
+ })
+ }
+
+ // if ANY of the sets match ALL of its comparators, then pass
+ test (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ for (let i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+ }
+}
+module.exports = Range
+
+const LRU = require('lru-cache')
+const cache = new LRU({ max: 1000 })
+
+const parseOptions = require('../internal/parse-options')
+const Comparator = require('./comparator')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const {
+ re,
+ t,
+ comparatorTrimReplace,
+ tildeTrimReplace,
+ caretTrimReplace,
+} = require('../internal/re')
+
+const isNullSet = c => c.value === '<0.0.0-0'
+const isAny = c => c.value === ''
+
+// take a set of comparators and determine whether there
+// exists a version which can satisfy it
+const isSatisfiable = (comparators, options) => {
+ let result = true
+ const remainingComparators = comparators.slice()
+ let testComparator = remainingComparators.pop()
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every((otherComparator) => {
+ return testComparator.intersects(otherComparator, options)
+ })
+
+ testComparator = remainingComparators.pop()
+ }
+
+ return result
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+const parseComparator = (comp, options) => {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
+const replaceTildes = (comp, options) =>
+ comp.trim().split(/\s+/).map((c) => {
+ return replaceTilde(c, options)
+ }).join(' ')
+
+const replaceTilde = (comp, options) => {
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('tilde', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0-0
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
+ ret = `>=${M}.${m}.${p
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
+// ^1.2.3 --> >=1.2.3 <2.0.0-0
+// ^1.2.0 --> >=1.2.0 <2.0.0-0
+const replaceCarets = (comp, options) =>
+ comp.trim().split(/\s+/).map((c) => {
+ return replaceCaret(c, options)
+ }).join(' ')
+
+const replaceCaret = (comp, options) => {
+ debug('caret', comp, options)
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
+ const z = options.includePrerelease ? '-0' : ''
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('caret', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
+ } else {
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${+M + 1}.0.0-0`
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p
+ } <${+M + 1}.0.0-0`
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+const replaceXRanges = (comp, options) => {
+ debug('replaceXRanges', comp, options)
+ return comp.split(/\s+/).map((c) => {
+ return replaceXRange(c, options)
+ }).join(' ')
+}
+
+const replaceXRange = (comp, options) => {
+ comp = comp.trim()
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ const xM = isX(M)
+ const xm = xM || isX(m)
+ const xp = xm || isX(p)
+ const anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+ pr = options.includePrerelease ? '-0' : ''
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ if (gtlt === '<') {
+ pr = '-0'
+ }
+
+ ret = `${gtlt + M}.${m}.${p}${pr}`
+ } else if (xm) {
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
+ } else if (xp) {
+ ret = `>=${M}.${m}.0${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+const replaceStars = (comp, options) => {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[t.STAR], '')
+}
+
+const replaceGTE0 = (comp, options) => {
+ debug('replaceGTE0', comp, options)
+ return comp.trim()
+ .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
+}
+
+// This function is passed to string.replace(re[t.HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
+const hyphenReplace = incPr => ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) => {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`
+ } else if (isX(fp)) {
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
+ } else if (fpr) {
+ from = `>=${from}`
+ } else {
+ from = `>=${from}${incPr ? '-0' : ''}`
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = `<${+tM + 1}.0.0-0`
+ } else if (isX(tp)) {
+ to = `<${tM}.${+tm + 1}.0-0`
+ } else if (tpr) {
+ to = `<=${tM}.${tm}.${tp}-${tpr}`
+ } else if (incPr) {
+ to = `<${tM}.${tm}.${+tp + 1}-0`
+ } else {
+ to = `<=${to}`
+ }
+
+ return (`${from} ${to}`).trim()
+}
+
+const testSet = (set, version, options) => {
+ for (let i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (let i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === Comparator.ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ const allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
diff --git a/node_modules/electron-packager/node_modules/semver/classes/semver.js b/node_modules/electron-packager/node_modules/semver/classes/semver.js
new file mode 100644
index 0000000..af62955
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/classes/semver.js
@@ -0,0 +1,287 @@
+const debug = require('../internal/debug')
+const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
+const { re, t } = require('../internal/re')
+
+const parseOptions = require('../internal/parse-options')
+const { compareIdentifiers } = require('../internal/identifiers')
+class SemVer {
+ constructor (version, options) {
+ options = parseOptions(options)
+
+ if (version instanceof SemVer) {
+ if (version.loose === !!options.loose &&
+ version.includePrerelease === !!options.includePrerelease) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError(`Invalid Version: ${version}`)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError(
+ `version is longer than ${MAX_LENGTH} characters`
+ )
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+ // this isn't actually relevant for versions, but keep it so that we
+ // don't run into trouble passing this.options around.
+ this.includePrerelease = !!options.includePrerelease
+
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
+
+ if (!m) {
+ throw new TypeError(`Invalid Version: ${version}`)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map((id) => {
+ if (/^[0-9]+$/.test(id)) {
+ const num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+ }
+
+ format () {
+ this.version = `${this.major}.${this.minor}.${this.patch}`
+ if (this.prerelease.length) {
+ this.version += `-${this.prerelease.join('.')}`
+ }
+ return this.version
+ }
+
+ toString () {
+ return this.version
+ }
+
+ compare (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ if (typeof other === 'string' && other === this.version) {
+ return 0
+ }
+ other = new SemVer(other, this.options)
+ }
+
+ if (other.version === this.version) {
+ return 0
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+ }
+
+ compareMain (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return (
+ compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+ )
+ }
+
+ comparePre (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ let i = 0
+ do {
+ const a = this.prerelease[i]
+ const b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ compareBuild (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ let i = 0
+ do {
+ const a = this.build[i]
+ const b = other.build[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ // preminor will bump the version up to the next minor release, and immediately
+ // down to pre-release. premajor and prepatch work the same way.
+ inc (release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier)
+ this.inc('pre', identifier)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier)
+ }
+ this.inc('pre', identifier)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (
+ this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0
+ ) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0]
+ } else {
+ let i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ this.prerelease.push(0)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0]
+ }
+ } else {
+ this.prerelease = [identifier, 0]
+ }
+ }
+ break
+
+ default:
+ throw new Error(`invalid increment argument: ${release}`)
+ }
+ this.format()
+ this.raw = this.version
+ return this
+ }
+}
+
+module.exports = SemVer
diff --git a/node_modules/electron-packager/node_modules/semver/functions/clean.js b/node_modules/electron-packager/node_modules/semver/functions/clean.js
new file mode 100644
index 0000000..811fe6b
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/clean.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const clean = (version, options) => {
+ const s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+module.exports = clean
diff --git a/node_modules/electron-packager/node_modules/semver/functions/cmp.js b/node_modules/electron-packager/node_modules/semver/functions/cmp.js
new file mode 100644
index 0000000..4011909
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/cmp.js
@@ -0,0 +1,52 @@
+const eq = require('./eq')
+const neq = require('./neq')
+const gt = require('./gt')
+const gte = require('./gte')
+const lt = require('./lt')
+const lte = require('./lte')
+
+const cmp = (a, op, b, loose) => {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError(`Invalid operator: ${op}`)
+ }
+}
+module.exports = cmp
diff --git a/node_modules/electron-packager/node_modules/semver/functions/coerce.js b/node_modules/electron-packager/node_modules/semver/functions/coerce.js
new file mode 100644
index 0000000..2e01452
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/coerce.js
@@ -0,0 +1,52 @@
+const SemVer = require('../classes/semver')
+const parse = require('./parse')
+const { re, t } = require('../internal/re')
+
+const coerce = (version, options) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version === 'number') {
+ version = String(version)
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ options = options || {}
+
+ let match = null
+ if (!options.rtl) {
+ match = version.match(re[t.COERCE])
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ let next
+ while ((next = re[t.COERCERTL].exec(version)) &&
+ (!match || match.index + match[0].length !== version.length)
+ ) {
+ if (!match ||
+ next.index + next[0].length !== match.index + match[0].length) {
+ match = next
+ }
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
+ }
+ // leave it in a clean state
+ re[t.COERCERTL].lastIndex = -1
+ }
+
+ if (match === null) {
+ return null
+ }
+
+ return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
+}
+module.exports = coerce
diff --git a/node_modules/electron-packager/node_modules/semver/functions/compare-build.js b/node_modules/electron-packager/node_modules/semver/functions/compare-build.js
new file mode 100644
index 0000000..9eb881b
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/compare-build.js
@@ -0,0 +1,7 @@
+const SemVer = require('../classes/semver')
+const compareBuild = (a, b, loose) => {
+ const versionA = new SemVer(a, loose)
+ const versionB = new SemVer(b, loose)
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
+}
+module.exports = compareBuild
diff --git a/node_modules/electron-packager/node_modules/semver/functions/compare-loose.js b/node_modules/electron-packager/node_modules/semver/functions/compare-loose.js
new file mode 100644
index 0000000..4881fbe
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/compare-loose.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const compareLoose = (a, b) => compare(a, b, true)
+module.exports = compareLoose
diff --git a/node_modules/electron-packager/node_modules/semver/functions/compare.js b/node_modules/electron-packager/node_modules/semver/functions/compare.js
new file mode 100644
index 0000000..748b7af
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/compare.js
@@ -0,0 +1,5 @@
+const SemVer = require('../classes/semver')
+const compare = (a, b, loose) =>
+ new SemVer(a, loose).compare(new SemVer(b, loose))
+
+module.exports = compare
diff --git a/node_modules/electron-packager/node_modules/semver/functions/diff.js b/node_modules/electron-packager/node_modules/semver/functions/diff.js
new file mode 100644
index 0000000..87200ef
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/diff.js
@@ -0,0 +1,23 @@
+const parse = require('./parse')
+const eq = require('./eq')
+
+const diff = (version1, version2) => {
+ if (eq(version1, version2)) {
+ return null
+ } else {
+ const v1 = parse(version1)
+ const v2 = parse(version2)
+ const hasPre = v1.prerelease.length || v2.prerelease.length
+ const prefix = hasPre ? 'pre' : ''
+ const defaultResult = hasPre ? 'prerelease' : ''
+ for (const key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return prefix + key
+ }
+ }
+ }
+ return defaultResult // may be undefined
+ }
+}
+module.exports = diff
diff --git a/node_modules/electron-packager/node_modules/semver/functions/eq.js b/node_modules/electron-packager/node_modules/semver/functions/eq.js
new file mode 100644
index 0000000..271fed9
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/eq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const eq = (a, b, loose) => compare(a, b, loose) === 0
+module.exports = eq
diff --git a/node_modules/electron-packager/node_modules/semver/functions/gt.js b/node_modules/electron-packager/node_modules/semver/functions/gt.js
new file mode 100644
index 0000000..d9b2156
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/gt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gt = (a, b, loose) => compare(a, b, loose) > 0
+module.exports = gt
diff --git a/node_modules/electron-packager/node_modules/semver/functions/gte.js b/node_modules/electron-packager/node_modules/semver/functions/gte.js
new file mode 100644
index 0000000..5aeaa63
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/gte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gte = (a, b, loose) => compare(a, b, loose) >= 0
+module.exports = gte
diff --git a/node_modules/electron-packager/node_modules/semver/functions/inc.js b/node_modules/electron-packager/node_modules/semver/functions/inc.js
new file mode 100644
index 0000000..62d1da2
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/inc.js
@@ -0,0 +1,18 @@
+const SemVer = require('../classes/semver')
+
+const inc = (version, release, options, identifier) => {
+ if (typeof (options) === 'string') {
+ identifier = options
+ options = undefined
+ }
+
+ try {
+ return new SemVer(
+ version instanceof SemVer ? version.version : version,
+ options
+ ).inc(release, identifier).version
+ } catch (er) {
+ return null
+ }
+}
+module.exports = inc
diff --git a/node_modules/electron-packager/node_modules/semver/functions/lt.js b/node_modules/electron-packager/node_modules/semver/functions/lt.js
new file mode 100644
index 0000000..b440ab7
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/lt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lt = (a, b, loose) => compare(a, b, loose) < 0
+module.exports = lt
diff --git a/node_modules/electron-packager/node_modules/semver/functions/lte.js b/node_modules/electron-packager/node_modules/semver/functions/lte.js
new file mode 100644
index 0000000..6dcc956
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/lte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lte = (a, b, loose) => compare(a, b, loose) <= 0
+module.exports = lte
diff --git a/node_modules/electron-packager/node_modules/semver/functions/major.js b/node_modules/electron-packager/node_modules/semver/functions/major.js
new file mode 100644
index 0000000..4283165
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/major.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const major = (a, loose) => new SemVer(a, loose).major
+module.exports = major
diff --git a/node_modules/electron-packager/node_modules/semver/functions/minor.js b/node_modules/electron-packager/node_modules/semver/functions/minor.js
new file mode 100644
index 0000000..57b3455
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/minor.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const minor = (a, loose) => new SemVer(a, loose).minor
+module.exports = minor
diff --git a/node_modules/electron-packager/node_modules/semver/functions/neq.js b/node_modules/electron-packager/node_modules/semver/functions/neq.js
new file mode 100644
index 0000000..f944c01
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/neq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const neq = (a, b, loose) => compare(a, b, loose) !== 0
+module.exports = neq
diff --git a/node_modules/electron-packager/node_modules/semver/functions/parse.js b/node_modules/electron-packager/node_modules/semver/functions/parse.js
new file mode 100644
index 0000000..a66663a
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/parse.js
@@ -0,0 +1,33 @@
+const { MAX_LENGTH } = require('../internal/constants')
+const { re, t } = require('../internal/re')
+const SemVer = require('../classes/semver')
+
+const parseOptions = require('../internal/parse-options')
+const parse = (version, options) => {
+ options = parseOptions(options)
+
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ if (version.length > MAX_LENGTH) {
+ return null
+ }
+
+ const r = options.loose ? re[t.LOOSE] : re[t.FULL]
+ if (!r.test(version)) {
+ return null
+ }
+
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ return null
+ }
+}
+
+module.exports = parse
diff --git a/node_modules/electron-packager/node_modules/semver/functions/patch.js b/node_modules/electron-packager/node_modules/semver/functions/patch.js
new file mode 100644
index 0000000..63afca2
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/patch.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const patch = (a, loose) => new SemVer(a, loose).patch
+module.exports = patch
diff --git a/node_modules/electron-packager/node_modules/semver/functions/prerelease.js b/node_modules/electron-packager/node_modules/semver/functions/prerelease.js
new file mode 100644
index 0000000..06aa132
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/prerelease.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const prerelease = (version, options) => {
+ const parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+module.exports = prerelease
diff --git a/node_modules/electron-packager/node_modules/semver/functions/rcompare.js b/node_modules/electron-packager/node_modules/semver/functions/rcompare.js
new file mode 100644
index 0000000..0ac509e
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/rcompare.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const rcompare = (a, b, loose) => compare(b, a, loose)
+module.exports = rcompare
diff --git a/node_modules/electron-packager/node_modules/semver/functions/rsort.js b/node_modules/electron-packager/node_modules/semver/functions/rsort.js
new file mode 100644
index 0000000..82404c5
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/rsort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
+module.exports = rsort
diff --git a/node_modules/electron-packager/node_modules/semver/functions/satisfies.js b/node_modules/electron-packager/node_modules/semver/functions/satisfies.js
new file mode 100644
index 0000000..50af1c1
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/satisfies.js
@@ -0,0 +1,10 @@
+const Range = require('../classes/range')
+const satisfies = (version, range, options) => {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+module.exports = satisfies
diff --git a/node_modules/electron-packager/node_modules/semver/functions/sort.js b/node_modules/electron-packager/node_modules/semver/functions/sort.js
new file mode 100644
index 0000000..4d10917
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/sort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
+module.exports = sort
diff --git a/node_modules/electron-packager/node_modules/semver/functions/valid.js b/node_modules/electron-packager/node_modules/semver/functions/valid.js
new file mode 100644
index 0000000..f27bae1
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/functions/valid.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const valid = (version, options) => {
+ const v = parse(version, options)
+ return v ? v.version : null
+}
+module.exports = valid
diff --git a/node_modules/electron-packager/node_modules/semver/index.js b/node_modules/electron-packager/node_modules/semver/index.js
new file mode 100644
index 0000000..57e2ae6
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/index.js
@@ -0,0 +1,48 @@
+// just pre-load all the stuff that index.js lazily exports
+const internalRe = require('./internal/re')
+module.exports = {
+ re: internalRe.re,
+ src: internalRe.src,
+ tokens: internalRe.t,
+ SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION,
+ SemVer: require('./classes/semver'),
+ compareIdentifiers: require('./internal/identifiers').compareIdentifiers,
+ rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers,
+ parse: require('./functions/parse'),
+ valid: require('./functions/valid'),
+ clean: require('./functions/clean'),
+ inc: require('./functions/inc'),
+ diff: require('./functions/diff'),
+ major: require('./functions/major'),
+ minor: require('./functions/minor'),
+ patch: require('./functions/patch'),
+ prerelease: require('./functions/prerelease'),
+ compare: require('./functions/compare'),
+ rcompare: require('./functions/rcompare'),
+ compareLoose: require('./functions/compare-loose'),
+ compareBuild: require('./functions/compare-build'),
+ sort: require('./functions/sort'),
+ rsort: require('./functions/rsort'),
+ gt: require('./functions/gt'),
+ lt: require('./functions/lt'),
+ eq: require('./functions/eq'),
+ neq: require('./functions/neq'),
+ gte: require('./functions/gte'),
+ lte: require('./functions/lte'),
+ cmp: require('./functions/cmp'),
+ coerce: require('./functions/coerce'),
+ Comparator: require('./classes/comparator'),
+ Range: require('./classes/range'),
+ satisfies: require('./functions/satisfies'),
+ toComparators: require('./ranges/to-comparators'),
+ maxSatisfying: require('./ranges/max-satisfying'),
+ minSatisfying: require('./ranges/min-satisfying'),
+ minVersion: require('./ranges/min-version'),
+ validRange: require('./ranges/valid'),
+ outside: require('./ranges/outside'),
+ gtr: require('./ranges/gtr'),
+ ltr: require('./ranges/ltr'),
+ intersects: require('./ranges/intersects'),
+ simplifyRange: require('./ranges/simplify'),
+ subset: require('./ranges/subset'),
+}
diff --git a/node_modules/electron-packager/node_modules/semver/internal/constants.js b/node_modules/electron-packager/node_modules/semver/internal/constants.js
new file mode 100644
index 0000000..4f0de59
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/internal/constants.js
@@ -0,0 +1,17 @@
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+const SEMVER_SPEC_VERSION = '2.0.0'
+
+const MAX_LENGTH = 256
+const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+/* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+const MAX_SAFE_COMPONENT_LENGTH = 16
+
+module.exports = {
+ SEMVER_SPEC_VERSION,
+ MAX_LENGTH,
+ MAX_SAFE_INTEGER,
+ MAX_SAFE_COMPONENT_LENGTH,
+}
diff --git a/node_modules/electron-packager/node_modules/semver/internal/debug.js b/node_modules/electron-packager/node_modules/semver/internal/debug.js
new file mode 100644
index 0000000..1c00e13
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/internal/debug.js
@@ -0,0 +1,9 @@
+const debug = (
+ typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)
+) ? (...args) => console.error('SEMVER', ...args)
+ : () => {}
+
+module.exports = debug
diff --git a/node_modules/electron-packager/node_modules/semver/internal/identifiers.js b/node_modules/electron-packager/node_modules/semver/internal/identifiers.js
new file mode 100644
index 0000000..e612d0a
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/internal/identifiers.js
@@ -0,0 +1,23 @@
+const numeric = /^[0-9]+$/
+const compareIdentifiers = (a, b) => {
+ const anum = numeric.test(a)
+ const bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
+
+module.exports = {
+ compareIdentifiers,
+ rcompareIdentifiers,
+}
diff --git a/node_modules/electron-packager/node_modules/semver/internal/parse-options.js b/node_modules/electron-packager/node_modules/semver/internal/parse-options.js
new file mode 100644
index 0000000..bbd9ec7
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/internal/parse-options.js
@@ -0,0 +1,11 @@
+// parse out just the options we care about so we always get a consistent
+// obj with keys in a consistent order.
+const opts = ['includePrerelease', 'loose', 'rtl']
+const parseOptions = options =>
+ !options ? {}
+ : typeof options !== 'object' ? { loose: true }
+ : opts.filter(k => options[k]).reduce((o, k) => {
+ o[k] = true
+ return o
+ }, {})
+module.exports = parseOptions
diff --git a/node_modules/electron-packager/node_modules/semver/internal/re.js b/node_modules/electron-packager/node_modules/semver/internal/re.js
new file mode 100644
index 0000000..ed88398
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/internal/re.js
@@ -0,0 +1,182 @@
+const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')
+const debug = require('./debug')
+exports = module.exports = {}
+
+// The actual regexps go on exports.re
+const re = exports.re = []
+const src = exports.src = []
+const t = exports.t = {}
+let R = 0
+
+const createToken = (name, value, isGlobal) => {
+ const index = R++
+ debug(name, index, value)
+ t[name] = index
+ src[index] = value
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
+}
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
+createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*')
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})`)
+
+createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
+}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
+
+createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
+}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
+}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
+}${src[t.PRERELEASE]}?${
+ src[t.BUILD]}?`)
+
+createToken('FULL', `^${src[t.FULLPLAIN]}$`)
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
+}${src[t.PRERELEASELOOSE]}?${
+ src[t.BUILD]}?`)
+
+createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
+
+createToken('GTLT', '((?:<|>)?=?)')
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
+createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
+
+createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:${src[t.PRERELEASE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:${src[t.PRERELEASELOOSE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
+createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+createToken('COERCE', `${'(^|[^\\d])' +
+ '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:$|[^\\d])`)
+createToken('COERCERTL', src[t.COERCE], true)
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+createToken('LONETILDE', '(?:~>?)')
+
+createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
+exports.tildeTrimReplace = '$1~'
+
+createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
+createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+createToken('LONECARET', '(?:\\^)')
+
+createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
+exports.caretTrimReplace = '$1^'
+
+createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
+createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
+createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
+}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
+exports.comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAIN]})` +
+ `\\s*$`)
+
+createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s*$`)
+
+// Star ranges basically just allow anything at all.
+createToken('STAR', '(<|>)?=?\\s*\\*')
+// >=0.0.0 is like a star
+createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
+createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
diff --git a/node_modules/electron-packager/node_modules/semver/package.json b/node_modules/electron-packager/node_modules/semver/package.json
new file mode 100644
index 0000000..7898f59
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "semver",
+ "version": "7.3.7",
+ "description": "The semantic version parser used by npm.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --follow-tags",
+ "lint": "eslint \"**/*.js\"",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run lint -- --fix",
+ "prepublishOnly": "git push origin --follow-tags",
+ "posttest": "npm run lint",
+ "template-oss-apply": "template-oss-apply --force"
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^3.0.1",
+ "@npmcli/template-oss": "3.3.2",
+ "tap": "^16.0.0"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "files": [
+ "bin/",
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "tap": {
+ "check-coverage": true,
+ "coverage-map": "map.js"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "3.3.2",
+ "engines": ">=10",
+ "ciVersions": [
+ "10.0.0",
+ "10.x",
+ "12.x",
+ "14.x",
+ "16.x"
+ ],
+ "distPaths": [
+ "bin/",
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ]
+ }
+}
diff --git a/node_modules/electron-packager/node_modules/semver/preload.js b/node_modules/electron-packager/node_modules/semver/preload.js
new file mode 100644
index 0000000..947cd4f
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/preload.js
@@ -0,0 +1,2 @@
+// XXX remove in v8 or beyond
+module.exports = require('./index.js')
diff --git a/node_modules/electron-packager/node_modules/semver/range.bnf b/node_modules/electron-packager/node_modules/semver/range.bnf
new file mode 100644
index 0000000..d4c6ae0
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/gtr.js b/node_modules/electron-packager/node_modules/semver/ranges/gtr.js
new file mode 100644
index 0000000..db7e355
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/gtr.js
@@ -0,0 +1,4 @@
+// Determine if version is greater than all the versions possible in the range.
+const outside = require('./outside')
+const gtr = (version, range, options) => outside(version, range, '>', options)
+module.exports = gtr
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/intersects.js b/node_modules/electron-packager/node_modules/semver/ranges/intersects.js
new file mode 100644
index 0000000..3d1a6f3
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/intersects.js
@@ -0,0 +1,7 @@
+const Range = require('../classes/range')
+const intersects = (r1, r2, options) => {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2)
+}
+module.exports = intersects
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/ltr.js b/node_modules/electron-packager/node_modules/semver/ranges/ltr.js
new file mode 100644
index 0000000..528a885
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/ltr.js
@@ -0,0 +1,4 @@
+const outside = require('./outside')
+// Determine if version is less than all the versions possible in the range
+const ltr = (version, range, options) => outside(version, range, '<', options)
+module.exports = ltr
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js b/node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js
new file mode 100644
index 0000000..6e3d993
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js
@@ -0,0 +1,25 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+
+const maxSatisfying = (versions, range, options) => {
+ let max = null
+ let maxSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+module.exports = maxSatisfying
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js b/node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js
new file mode 100644
index 0000000..9b60974
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js
@@ -0,0 +1,24 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const minSatisfying = (versions, range, options) => {
+ let min = null
+ let minSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+module.exports = minSatisfying
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/min-version.js b/node_modules/electron-packager/node_modules/semver/ranges/min-version.js
new file mode 100644
index 0000000..350e1f7
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/min-version.js
@@ -0,0 +1,61 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const gt = require('../functions/gt')
+
+const minVersion = (range, loose) => {
+ range = new Range(range, loose)
+
+ let minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let setMin = null
+ comparators.forEach((comparator) => {
+ // Clone to avoid manipulating the comparator's semver object.
+ const compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!setMin || gt(compver, setMin)) {
+ setMin = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected operation: ${comparator.operator}`)
+ }
+ })
+ if (setMin && (!minver || gt(minver, setMin))) {
+ minver = setMin
+ }
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+module.exports = minVersion
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/outside.js b/node_modules/electron-packager/node_modules/semver/ranges/outside.js
new file mode 100644
index 0000000..ae99b10
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/outside.js
@@ -0,0 +1,80 @@
+const SemVer = require('../classes/semver')
+const Comparator = require('../classes/comparator')
+const { ANY } = Comparator
+const Range = require('../classes/range')
+const satisfies = require('../functions/satisfies')
+const gt = require('../functions/gt')
+const lt = require('../functions/lt')
+const lte = require('../functions/lte')
+const gte = require('../functions/gte')
+
+const outside = (version, range, hilo, options) => {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ let gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisfies the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let high = null
+ let low = null
+
+ comparators.forEach((comparator) => {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+module.exports = outside
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/simplify.js b/node_modules/electron-packager/node_modules/semver/ranges/simplify.js
new file mode 100644
index 0000000..618d5b6
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/simplify.js
@@ -0,0 +1,47 @@
+// given a set of versions and a range, create a "simplified" range
+// that includes the same versions that the original range does
+// If the original range is shorter than the simplified one, return that.
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+module.exports = (versions, range, options) => {
+ const set = []
+ let first = null
+ let prev = null
+ const v = versions.sort((a, b) => compare(a, b, options))
+ for (const version of v) {
+ const included = satisfies(version, range, options)
+ if (included) {
+ prev = version
+ if (!first) {
+ first = version
+ }
+ } else {
+ if (prev) {
+ set.push([first, prev])
+ }
+ prev = null
+ first = null
+ }
+ }
+ if (first) {
+ set.push([first, null])
+ }
+
+ const ranges = []
+ for (const [min, max] of set) {
+ if (min === max) {
+ ranges.push(min)
+ } else if (!max && min === v[0]) {
+ ranges.push('*')
+ } else if (!max) {
+ ranges.push(`>=${min}`)
+ } else if (min === v[0]) {
+ ranges.push(`<=${max}`)
+ } else {
+ ranges.push(`${min} - ${max}`)
+ }
+ }
+ const simplified = ranges.join(' || ')
+ const original = typeof range.raw === 'string' ? range.raw : String(range)
+ return simplified.length < original.length ? simplified : range
+}
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/subset.js b/node_modules/electron-packager/node_modules/semver/ranges/subset.js
new file mode 100644
index 0000000..e0dea43
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/subset.js
@@ -0,0 +1,244 @@
+const Range = require('../classes/range.js')
+const Comparator = require('../classes/comparator.js')
+const { ANY } = Comparator
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+
+// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
+// - Every simple range `r1, r2, ...` is a null set, OR
+// - Every simple range `r1, r2, ...` which is not a null set is a subset of
+// some `R1, R2, ...`
+//
+// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
+// - If c is only the ANY comparator
+// - If C is only the ANY comparator, return true
+// - Else if in prerelease mode, return false
+// - else replace c with `[>=0.0.0]`
+// - If C is only the ANY comparator
+// - if in prerelease mode, return true
+// - else replace C with `[>=0.0.0]`
+// - Let EQ be the set of = comparators in c
+// - If EQ is more than one, return true (null set)
+// - Let GT be the highest > or >= comparator in c
+// - Let LT be the lowest < or <= comparator in c
+// - If GT and LT, and GT.semver > LT.semver, return true (null set)
+// - If any C is a = range, and GT or LT are set, return false
+// - If EQ
+// - If GT, and EQ does not satisfy GT, return true (null set)
+// - If LT, and EQ does not satisfy LT, return true (null set)
+// - If EQ satisfies every C, return true
+// - Else return false
+// - If GT
+// - If GT.semver is lower than any > or >= comp in C, return false
+// - If GT is >=, and GT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the GT.semver tuple, return false
+// - If LT
+// - If LT.semver is greater than any < or <= comp in C, return false
+// - If LT is <=, and LT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the LT.semver tuple, return false
+// - Else return true
+
+const subset = (sub, dom, options = {}) => {
+ if (sub === dom) {
+ return true
+ }
+
+ sub = new Range(sub, options)
+ dom = new Range(dom, options)
+ let sawNonNull = false
+
+ OUTER: for (const simpleSub of sub.set) {
+ for (const simpleDom of dom.set) {
+ const isSub = simpleSubset(simpleSub, simpleDom, options)
+ sawNonNull = sawNonNull || isSub !== null
+ if (isSub) {
+ continue OUTER
+ }
+ }
+ // the null set is a subset of everything, but null simple ranges in
+ // a complex range should be ignored. so if we saw a non-null range,
+ // then we know this isn't a subset, but if EVERY simple range was null,
+ // then it is a subset.
+ if (sawNonNull) {
+ return false
+ }
+ }
+ return true
+}
+
+const simpleSubset = (sub, dom, options) => {
+ if (sub === dom) {
+ return true
+ }
+
+ if (sub.length === 1 && sub[0].semver === ANY) {
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ return true
+ } else if (options.includePrerelease) {
+ sub = [new Comparator('>=0.0.0-0')]
+ } else {
+ sub = [new Comparator('>=0.0.0')]
+ }
+ }
+
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ if (options.includePrerelease) {
+ return true
+ } else {
+ dom = [new Comparator('>=0.0.0')]
+ }
+ }
+
+ const eqSet = new Set()
+ let gt, lt
+ for (const c of sub) {
+ if (c.operator === '>' || c.operator === '>=') {
+ gt = higherGT(gt, c, options)
+ } else if (c.operator === '<' || c.operator === '<=') {
+ lt = lowerLT(lt, c, options)
+ } else {
+ eqSet.add(c.semver)
+ }
+ }
+
+ if (eqSet.size > 1) {
+ return null
+ }
+
+ let gtltComp
+ if (gt && lt) {
+ gtltComp = compare(gt.semver, lt.semver, options)
+ if (gtltComp > 0) {
+ return null
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
+ return null
+ }
+ }
+
+ // will iterate one or zero times
+ for (const eq of eqSet) {
+ if (gt && !satisfies(eq, String(gt), options)) {
+ return null
+ }
+
+ if (lt && !satisfies(eq, String(lt), options)) {
+ return null
+ }
+
+ for (const c of dom) {
+ if (!satisfies(eq, String(c), options)) {
+ return false
+ }
+ }
+
+ return true
+ }
+
+ let higher, lower
+ let hasDomLT, hasDomGT
+ // if the subset has a prerelease, we need a comparator in the superset
+ // with the same tuple and a prerelease, or it's not a subset
+ let needDomLTPre = lt &&
+ !options.includePrerelease &&
+ lt.semver.prerelease.length ? lt.semver : false
+ let needDomGTPre = gt &&
+ !options.includePrerelease &&
+ gt.semver.prerelease.length ? gt.semver : false
+ // exception: <1.2.3-0 is the same as <1.2.3
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
+ lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
+ needDomLTPre = false
+ }
+
+ for (const c of dom) {
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
+ if (gt) {
+ if (needDomGTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomGTPre.major &&
+ c.semver.minor === needDomGTPre.minor &&
+ c.semver.patch === needDomGTPre.patch) {
+ needDomGTPre = false
+ }
+ }
+ if (c.operator === '>' || c.operator === '>=') {
+ higher = higherGT(gt, c, options)
+ if (higher === c && higher !== gt) {
+ return false
+ }
+ } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (lt) {
+ if (needDomLTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomLTPre.major &&
+ c.semver.minor === needDomLTPre.minor &&
+ c.semver.patch === needDomLTPre.patch) {
+ needDomLTPre = false
+ }
+ }
+ if (c.operator === '<' || c.operator === '<=') {
+ lower = lowerLT(lt, c, options)
+ if (lower === c && lower !== lt) {
+ return false
+ }
+ } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
+ return false
+ }
+ }
+
+ // if there was a < or >, and nothing in the dom, then must be false
+ // UNLESS it was limited by another range in the other direction.
+ // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
+ return false
+ }
+
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
+ return false
+ }
+
+ // we needed a prerelease range in a specific tuple, but didn't get one
+ // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
+ // because it includes prereleases in the 1.2.3 tuple
+ if (needDomGTPre || needDomLTPre) {
+ return false
+ }
+
+ return true
+}
+
+// >=1.2.3 is lower than >1.2.3
+const higherGT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp > 0 ? a
+ : comp < 0 ? b
+ : b.operator === '>' && a.operator === '>=' ? b
+ : a
+}
+
+// <=1.2.3 is higher than <1.2.3
+const lowerLT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp < 0 ? a
+ : comp > 0 ? b
+ : b.operator === '<' && a.operator === '<=' ? b
+ : a
+}
+
+module.exports = subset
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js b/node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js
new file mode 100644
index 0000000..6c8bc7e
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js
@@ -0,0 +1,8 @@
+const Range = require('../classes/range')
+
+// Mostly just for testing and legacy API reasons
+const toComparators = (range, options) =>
+ new Range(range, options).set
+ .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
+
+module.exports = toComparators
diff --git a/node_modules/electron-packager/node_modules/semver/ranges/valid.js b/node_modules/electron-packager/node_modules/semver/ranges/valid.js
new file mode 100644
index 0000000..365f356
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/semver/ranges/valid.js
@@ -0,0 +1,11 @@
+const Range = require('../classes/range')
+const validRange = (range, options) => {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+module.exports = validRange
diff --git a/node_modules/electron-packager/node_modules/universalify/LICENSE b/node_modules/electron-packager/node_modules/universalify/LICENSE
new file mode 100644
index 0000000..514e84e
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/universalify/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2017, Ryan Zimmerman <opensrc@ryanzim.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the 'Software'), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/electron-packager/node_modules/universalify/README.md b/node_modules/electron-packager/node_modules/universalify/README.md
new file mode 100644
index 0000000..aa12474
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/universalify/README.md
@@ -0,0 +1,76 @@
+# universalify
+
+[![Travis branch](https://img.shields.io/travis/RyanZim/universalify/master.svg)](https://travis-ci.org/RyanZim/universalify)
+![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg)
+![npm](https://img.shields.io/npm/dm/universalify.svg)
+![npm](https://img.shields.io/npm/l/universalify.svg)
+
+Make a callback- or promise-based function support both promises and callbacks.
+
+Uses the native promise implementation.
+
+## Installation
+
+```bash
+npm install universalify
+```
+
+## API
+
+### `universalify.fromCallback(fn)`
+
+Takes a callback-based function to universalify, and returns the universalified function.
+
+Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once.
+
+```js
+function callbackFn (n, cb) {
+ setTimeout(() => cb(null, n), 15)
+}
+
+const fn = universalify.fromCallback(callbackFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+### `universalify.fromPromise(fn)`
+
+Takes a promise-based function to universalify, and returns the universalified function.
+
+Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned.
+
+```js
+function promiseFn (n) {
+ return new Promise(resolve => {
+ setTimeout(() => resolve(n), 15)
+ })
+}
+
+const fn = universalify.fromPromise(promiseFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+## License
+
+MIT
diff --git a/node_modules/electron-packager/node_modules/universalify/index.js b/node_modules/electron-packager/node_modules/universalify/index.js
new file mode 100644
index 0000000..ba6c662
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/universalify/index.js
@@ -0,0 +1,24 @@
+'use strict'
+
+exports.fromCallback = function (fn) {
+ return Object.defineProperty(function (...args) {
+ if (typeof args[args.length - 1] === 'function') fn.apply(this, args)
+ else {
+ return new Promise((resolve, reject) => {
+ fn.call(
+ this,
+ ...args,
+ (err, res) => (err != null) ? reject(err) : resolve(res)
+ )
+ })
+ }
+ }, 'name', { value: fn.name })
+}
+
+exports.fromPromise = function (fn) {
+ return Object.defineProperty(function (...args) {
+ const cb = args[args.length - 1]
+ if (typeof cb !== 'function') return fn.apply(this, args)
+ else fn.apply(this, args.slice(0, -1)).then(r => cb(null, r), cb)
+ }, 'name', { value: fn.name })
+}
diff --git a/node_modules/electron-packager/node_modules/universalify/package.json b/node_modules/electron-packager/node_modules/universalify/package.json
new file mode 100644
index 0000000..006d4cc
--- /dev/null
+++ b/node_modules/electron-packager/node_modules/universalify/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "universalify",
+ "version": "2.0.0",
+ "description": "Make a callback- or promise-based function support both promises and callbacks.",
+ "keywords": [
+ "callback",
+ "native",
+ "promise"
+ ],
+ "homepage": "https://github.com/RyanZim/universalify#readme",
+ "bugs": "https://github.com/RyanZim/universalify/issues",
+ "license": "MIT",
+ "author": "Ryan Zimmerman <opensrc@ryanzim.com>",
+ "files": [
+ "index.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/RyanZim/universalify.git"
+ },
+ "scripts": {
+ "test": "standard && nyc tape test/*.js | colortape"
+ },
+ "devDependencies": {
+ "colortape": "^0.1.2",
+ "coveralls": "^3.0.1",
+ "nyc": "^15.0.0",
+ "standard": "^14.3.1",
+ "tape": "^5.0.1"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+}
diff --git a/node_modules/electron-packager/package.json b/node_modules/electron-packager/package.json
new file mode 100644
index 0000000..78b8a06
--- /dev/null
+++ b/node_modules/electron-packager/package.json
@@ -0,0 +1,137 @@
+{
+ "name": "electron-packager",
+ "version": "16.0.0",
+ "description": "Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI",
+ "main": "src/index.js",
+ "types": "src/index.d.ts",
+ "bin": {
+ "electron-packager": "bin/electron-packager.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/electron/electron-packager.git"
+ },
+ "author": "Mark Lee",
+ "license": "BSD-2-Clause",
+ "bugs": {
+ "url": "https://github.com/electron/electron-packager/issues"
+ },
+ "homepage": "https://github.com/electron/electron-packager",
+ "files": [
+ "collaborators.md",
+ "bin",
+ "docs/*.md",
+ "NEWS.md",
+ "src",
+ "usage.txt"
+ ],
+ "dependencies": {
+ "@electron/get": "^2.0.0",
+ "@electron/universal": "^1.2.1",
+ "asar": "^3.1.0",
+ "cross-spawn-windows-exe": "^1.2.0",
+ "debug": "^4.0.1",
+ "electron-notarize": "^1.1.1",
+ "electron-osx-sign": "^0.5.0",
+ "extract-zip": "^2.0.0",
+ "filenamify": "^4.1.0",
+ "fs-extra": "^10.1.0",
+ "galactus": "^0.2.1",
+ "get-package-info": "^1.0.0",
+ "junk": "^3.1.0",
+ "parse-author": "^2.0.0",
+ "plist": "^3.0.0",
+ "rcedit": "^3.0.1",
+ "resolve": "^1.1.6",
+ "semver": "^7.1.3",
+ "yargs-parser": "^21.1.1"
+ },
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "^4.0.1",
+ "@typescript-eslint/parser": "^4.0.1",
+ "ava": "^3.10.1",
+ "buffer-equal": "^1.0.0",
+ "codecov": "^3.0.0",
+ "eslint": "^7.12.1",
+ "eslint-config-standard": "^16.0.0",
+ "eslint-plugin-ava": "^12.0.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-node": "^11.0.0",
+ "eslint-plugin-promise": "^5.1.0",
+ "nyc": "^15.0.0",
+ "pkg-up": "^3.0.1",
+ "sinon": "^14.0.0",
+ "tsd": "^0.14.0",
+ "typedoc": "^0.19.0",
+ "typescript": "^4.0.2"
+ },
+ "engines": {
+ "node": ">= 14.17.5"
+ },
+ "scripts": {
+ "ava": "ava test/index.js",
+ "codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
+ "coverage": "nyc ava test/index.js",
+ "docs:build": "node test/ci/build_docs.js",
+ "lint": "npm run lint:js && npm run lint:ts",
+ "lint:js": "eslint .",
+ "lint:ts": "eslint --config .eslintrc.typescript.js --ext .ts .",
+ "test": "npm run lint && npm run tsd && npm run coverage",
+ "tsd": "tsd"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "keywords": [
+ "electron",
+ "packager",
+ "bundler",
+ "app"
+ ],
+ "ava": {
+ "timeout": "60s"
+ },
+ "eslintConfig": {
+ "extends": [
+ "eslint:recommended",
+ "plugin:ava/recommended",
+ "plugin:import/errors",
+ "plugin:import/warnings",
+ "plugin:promise/recommended",
+ "standard"
+ ],
+ "parserOptions": {
+ "sourceType": "script"
+ },
+ "plugins": [
+ "ava"
+ ],
+ "rules": {
+ "ava/no-import-test-files": 0,
+ "ava/no-ignored-test-files": 0,
+ "indent": [
+ "error",
+ 2,
+ {
+ "CallExpression": {
+ "arguments": "first"
+ },
+ "SwitchCase": 1
+ }
+ ],
+ "no-console": 0,
+ "strict": "error"
+ }
+ },
+ "eslintIgnore": [
+ "typedoc/**/*",
+ "**/test/fixtures/**/node_modules/**",
+ "**/test/work/*"
+ ],
+ "tsd": {
+ "directory": "test"
+ },
+ "funding": {
+ "url": "https://github.com/electron/electron-packager?sponsor=1"
+ }
+}
diff --git a/node_modules/electron-packager/src/cli.js b/node_modules/electron-packager/src/cli.js
new file mode 100644
index 0000000..4fe540e
--- /dev/null
+++ b/node_modules/electron-packager/src/cli.js
@@ -0,0 +1,143 @@
+'use strict'
+
+const { info, hostInfo, warning } = require('./common')
+const fs = require('fs-extra')
+const { initializeProxy } = require('@electron/get')
+const packager = require('..')
+const path = require('path')
+const yargs = require('yargs-parser')
+
+/* istanbul ignore next */
+async function printUsageAndExit (isError) {
+ const usage = (await fs.readFile(path.resolve(__dirname, '..', 'usage.txt'))).toString()
+ const print = isError ? console.error : console.log
+ print(usage)
+ process.exit(isError ? 1 : 0)
+}
+
+module.exports = {
+ parseArgs: function parseArgs (argv) {
+ const args = yargs(argv, {
+ boolean: [
+ 'all',
+ 'deref-symlinks',
+ 'download.rejectUnauthorized',
+ 'junk',
+ 'overwrite',
+ 'prune',
+ 'quiet'
+ ],
+ default: {
+ 'deref-symlinks': true,
+ 'download.rejectUnauthorized': true,
+ junk: true,
+ prune: true
+ },
+ string: [
+ 'electron-version',
+ 'out'
+ ]
+ })
+
+ args.dir = args._[0]
+ args.name = args._[1]
+
+ const protocolSchemes = [].concat(args.protocol || [])
+ const protocolNames = [].concat(args.protocolName || [])
+
+ if (protocolSchemes && protocolNames && protocolNames.length === protocolSchemes.length) {
+ args.protocols = protocolSchemes.map(function (scheme, i) {
+ return { schemes: [scheme], name: protocolNames[i] }
+ })
+ }
+
+ if (args.out === '') {
+ warning('Specifying --out= without a value is the same as the default value')
+ args.out = null
+ }
+
+ // Overrides for multi-typed arguments, because minimist doesn't support it
+
+ // asar: `Object` or `true`
+ if (args.asar === 'true' || args.asar instanceof Array) {
+ warning('--asar does not take any arguments, it only has sub-properties (see --help)')
+ args.asar = true
+ }
+
+ // osx-sign: `Object` or `true`
+ if (args.osxSign === 'true') {
+ warning('--osx-sign does not take any arguments, it only has sub-properties (see --help)')
+ args.osxSign = true
+ } else if (typeof args['osx-sign'] === 'object') {
+ if (Array.isArray(args['osx-sign'])) {
+ warning('Remove --osx-sign (the bare flag) from the command line, only specify sub-properties (see --help)')
+ } else {
+ // Keep kebab case of sub properties
+ args.osxSign = args['osx-sign']
+ }
+ }
+
+ if (args.osxNotarize) {
+ let notarize = true
+ if (typeof args.osxNotarize !== 'object' || Array.isArray(args.osxNotarize)) {
+ warning('--osx-notarize does not take any arguments, it only has sub-properties (see --help)')
+ notarize = false
+ } else if (!args.osxSign) {
+ warning('Notarization was enabled but macOS code signing was not, code signing is a requirement for notarization, notarize will not run')
+ notarize = false
+ }
+
+ if (!notarize) {
+ args.osxNotarize = null
+ }
+ }
+
+ // tmpdir: `String` or `false`
+ if (args.tmpdir === 'false') {
+ warning('--tmpdir=false is deprecated, use --no-tmpdir instead')
+ args.tmpdir = false
+ }
+
+ return args
+ },
+ run: /* istanbul ignore next */ async function run (argv) {
+ const args = module.exports.parseArgs(argv)
+
+ // temporary fix for https://github.com/nodejs/node/issues/6456
+ for (const stdioWriter of [process.stdout, process.stderr]) {
+ if (stdioWriter._handle && stdioWriter._handle.setBlocking) {
+ stdioWriter._handle.setBlocking(true)
+ }
+ }
+
+ if (args.help) {
+ await printUsageAndExit(false)
+ } else if (args.version) {
+ if (typeof args.version !== 'boolean') {
+ console.error('--version does not take an argument. Perhaps you meant --app-version or --electron-version?\n')
+ }
+ console.log(hostInfo())
+ process.exit(0)
+ } else if (!args.dir) {
+ await printUsageAndExit(true)
+ }
+
+ initializeProxy()
+
+ try {
+ const appPaths = await packager(args)
+ if (appPaths.length > 1) {
+ info(`Wrote new apps to:\n${appPaths.join('\n')}`)
+ } else if (appPaths.length === 1) {
+ info('Wrote new app to', appPaths[0])
+ }
+ } catch (err) {
+ if (err.message) {
+ console.error(err.message)
+ } else {
+ console.error(err, err.stack)
+ }
+ process.exit(1)
+ }
+ }
+}
diff --git a/node_modules/electron-packager/src/common.js b/node_modules/electron-packager/src/common.js
new file mode 100644
index 0000000..0c18623
--- /dev/null
+++ b/node_modules/electron-packager/src/common.js
@@ -0,0 +1,128 @@
+'use strict'
+
+const debug = require('debug')('electron-packager')
+const filenamify = require('filenamify')
+const fs = require('fs-extra')
+const metadata = require('../package.json')
+const os = require('os')
+const path = require('path')
+
+function sanitizeAppName (name) {
+ return filenamify(name, { replacement: '-' })
+}
+
+function generateFinalBasename (opts) {
+ return `${sanitizeAppName(opts.name)}-${opts.platform}-${opts.arch}`
+}
+
+function generateFinalPath (opts) {
+ return path.join(opts.out || process.cwd(), generateFinalBasename(opts))
+}
+
+function info (message, quiet) {
+ if (!quiet) {
+ console.error(message)
+ }
+}
+
+function warning (message, quiet) {
+ if (!quiet) {
+ console.warn(`WARNING: ${message}`)
+ }
+}
+
+function subOptionWarning (properties, optionName, parameter, value, quiet) {
+ if (Object.prototype.hasOwnProperty.call(properties, parameter)) {
+ warning(`${optionName}.${parameter} will be inferred from the main options`, quiet)
+ }
+ properties[parameter] = value
+}
+
+function createAsarOpts (opts) {
+ let asarOptions
+ if (opts.asar === true) {
+ asarOptions = {}
+ } else if (typeof opts.asar === 'object') {
+ asarOptions = opts.asar
+ } else if (opts.asar === false || opts.asar === undefined) {
+ return false
+ } else {
+ warning(`asar parameter set to an invalid value (${opts.asar}), ignoring and disabling asar`)
+ return false
+ }
+
+ return asarOptions
+}
+
+module.exports = {
+ ensureArray: function ensureArray (value) {
+ return Array.isArray(value) ? value : [value]
+ },
+ isPlatformMac: function isPlatformMac (platform) {
+ return platform === 'darwin' || platform === 'mas'
+ },
+
+ createAsarOpts: createAsarOpts,
+
+ deprecatedParameter: function deprecatedParameter (properties, oldName, newName, newCLIName) {
+ if (Object.prototype.hasOwnProperty.call(properties, oldName)) {
+ warning(`The ${oldName} parameter is deprecated, use ${newName} (or --${newCLIName} in the CLI) instead`)
+ if (!Object.prototype.hasOwnProperty.call(properties, newName)) {
+ properties[newName] = properties[oldName]
+ }
+ delete properties[oldName]
+ }
+ },
+ subOptionWarning: subOptionWarning,
+
+ baseTempDir: function baseTempDir (opts) {
+ return path.join(opts.tmpdir || os.tmpdir(), 'electron-packager')
+ },
+ generateFinalBasename: generateFinalBasename,
+ generateFinalPath: generateFinalPath,
+ sanitizeAppName,
+ /**
+ * Convert slashes to UNIX-format separators.
+ */
+ normalizePath: function normalizePath (pathToNormalize) {
+ return pathToNormalize.replace(/\\/g, '/')
+ },
+ /**
+ * Validates that the application directory contains a package.json file, and that there exists an
+ * appropriate main entry point file, per the rules of the "main" field in package.json.
+ *
+ * See: https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main
+ *
+ * @param appDir - the directory specified by the user
+ * @param bundledAppDir - the directory where the appDir is copied to in the bundled Electron app
+ */
+ validateElectronApp: async function validateElectronApp (appDir, bundledAppDir) {
+ debug('Validating bundled Electron app')
+ debug('Checking for a package.json file')
+
+ const bundledPackageJSONPath = path.join(bundledAppDir, 'package.json')
+ if (!(await fs.pathExists(bundledPackageJSONPath))) {
+ const originalPackageJSONPath = path.join(appDir, 'package.json')
+ throw new Error(`Application manifest was not found. Make sure "${originalPackageJSONPath}" exists and does not get ignored by your ignore option`)
+ }
+
+ debug('Checking for the main entry point file')
+ const packageJSON = await fs.readJson(bundledPackageJSONPath)
+ const mainScriptBasename = packageJSON.main || 'index.js'
+ const mainScript = path.resolve(bundledAppDir, mainScriptBasename)
+ if (!(await fs.pathExists(mainScript))) {
+ const originalMainScript = path.join(appDir, mainScriptBasename)
+ throw new Error(`The main entry point to your app was not found. Make sure "${originalMainScript}" exists and does not get ignored by your ignore option`)
+ }
+
+ debug('Validation complete')
+ },
+
+ hostInfo: function hostInfo () {
+ return `Electron Packager ${metadata.version}\n` +
+ `Node ${process.version}\n` +
+ `Host Operating system: ${process.platform} ${os.release()} (${process.arch})`
+ },
+ info: info,
+ warning: warning
+}
diff --git a/node_modules/electron-packager/src/copy-filter.js b/node_modules/electron-packager/src/copy-filter.js
new file mode 100644
index 0000000..e7b5ec0
--- /dev/null
+++ b/node_modules/electron-packager/src/copy-filter.js
@@ -0,0 +1,110 @@
+'use strict'
+
+const common = require('./common')
+const debug = require('debug')('electron-packager')
+const junk = require('junk')
+const path = require('path')
+const prune = require('./prune')
+const targets = require('./targets')
+
+const DEFAULT_IGNORES = [
+ '/package-lock\\.json$',
+ '/yarn\\.lock$',
+ '/\\.git($|/)',
+ '/node_modules/\\.bin($|/)',
+ '\\.o(bj)?$',
+ '/node_gyp_bins($|/)'
+]
+
+function populateIgnoredPaths (opts) {
+ opts.originalIgnore = opts.ignore
+ if (typeof (opts.ignore) !== 'function') {
+ if (opts.ignore) {
+ opts.ignore = common.ensureArray(opts.ignore).concat(DEFAULT_IGNORES)
+ } else {
+ opts.ignore = [].concat(DEFAULT_IGNORES)
+ }
+ if (process.platform === 'linux') {
+ opts.ignore.push(common.baseTempDir(opts))
+ }
+
+ debug('Ignored path regular expressions:', opts.ignore)
+ }
+}
+
+function generateIgnoredOutDirs (opts) {
+ const normalizedOut = opts.out ? path.resolve(opts.out) : null
+ const ignoredOutDirs = []
+ if (normalizedOut === null || normalizedOut === process.cwd()) {
+ for (const [platform, archs] of Object.entries(targets.officialPlatformArchCombos)) {
+ for (const arch of archs) {
+ const basenameOpts = {
+ arch: arch,
+ name: opts.name,
+ platform: platform
+ }
+ ignoredOutDirs.push(path.join(process.cwd(), common.generateFinalBasename(basenameOpts)))
+ }
+ }
+ } else {
+ ignoredOutDirs.push(normalizedOut)
+ }
+
+ debug('Ignored paths based on the out param:', ignoredOutDirs)
+
+ return ignoredOutDirs
+}
+
+function generateFilterFunction (ignore) {
+ if (typeof (ignore) === 'function') {
+ return file => !ignore(file)
+ } else {
+ const ignoredRegexes = common.ensureArray(ignore)
+
+ return function filterByRegexes (file) {
+ return !ignoredRegexes.some(regex => file.match(regex))
+ }
+ }
+}
+
+function userPathFilter (opts) {
+ const filterFunc = generateFilterFunction(opts.ignore || [])
+ const ignoredOutDirs = generateIgnoredOutDirs(opts)
+ const pruner = opts.prune ? new prune.Pruner(opts.dir) : null
+
+ return async function filter (file) {
+ const fullPath = path.resolve(file)
+
+ if (ignoredOutDirs.includes(fullPath)) {
+ return false
+ }
+
+ if (opts.junk !== false) { // defaults to true
+ if (junk.is(path.basename(fullPath))) {
+ return false
+ }
+ }
+
+ let name = fullPath.split(path.resolve(opts.dir))[1]
+
+ if (path.sep === '\\') {
+ name = common.normalizePath(name)
+ }
+
+ if (pruner && name.startsWith('/node_modules/')) {
+ if (await prune.isModule(file)) {
+ return pruner.pruneModule(name)
+ } else {
+ return filterFunc(name)
+ }
+ }
+
+ return filterFunc(name)
+ }
+}
+
+module.exports = {
+ populateIgnoredPaths,
+ generateIgnoredOutDirs,
+ userPathFilter
+}
diff --git a/node_modules/electron-packager/src/download.js b/node_modules/electron-packager/src/download.js
new file mode 100644
index 0000000..9c104a0
--- /dev/null
+++ b/node_modules/electron-packager/src/download.js
@@ -0,0 +1,37 @@
+'use strict'
+
+const common = require('./common')
+const debug = require('debug')('electron-packager')
+const { downloadArtifact } = require('@electron/get')
+const semver = require('semver')
+const targets = require('./targets')
+
+function createDownloadOpts (opts, platform, arch) {
+ const downloadOpts = { ...opts.download }
+
+ common.subOptionWarning(downloadOpts, 'download', 'platform', platform, opts.quiet)
+ common.subOptionWarning(downloadOpts, 'download', 'arch', arch, opts.quiet)
+ common.subOptionWarning(downloadOpts, 'download', 'version', opts.electronVersion, opts.quiet)
+ common.subOptionWarning(downloadOpts, 'download', 'artifactName', 'electron', opts.quiet)
+
+ return downloadOpts
+}
+
+module.exports = {
+ createDownloadCombos: function createDownloadCombos (opts, selectedPlatforms, selectedArchs, ignoreFunc) {
+ return targets.createPlatformArchPairs(opts, selectedPlatforms, selectedArchs, ignoreFunc).map(([platform, arch]) => {
+ return createDownloadOpts(opts, platform, arch)
+ })
+ },
+ createDownloadOpts: createDownloadOpts,
+ downloadElectronZip: async function downloadElectronZip (downloadOpts) {
+ // armv7l builds have only been backfilled for Electron >= 1.0.0.
+ // See: https://github.com/electron/electron/pull/6986
+ /* istanbul ignore if */
+ if (downloadOpts.arch === 'armv7l' && semver.lt(downloadOpts.version, '1.0.0')) {
+ downloadOpts.arch = 'arm'
+ }
+ debug(`Downloading Electron with options ${JSON.stringify(downloadOpts)}`)
+ return downloadArtifact(downloadOpts)
+ }
+}
diff --git a/node_modules/electron-packager/src/hooks.js b/node_modules/electron-packager/src/hooks.js
new file mode 100644
index 0000000..a16426a
--- /dev/null
+++ b/node_modules/electron-packager/src/hooks.js
@@ -0,0 +1,24 @@
+'use strict'
+
+const { promisify } = require('util')
+
+module.exports = {
+ promisifyHooks: async function promisifyHooks (hooks, args) {
+ if (!hooks || !Array.isArray(hooks)) {
+ return Promise.resolve()
+ }
+
+ await Promise.all(hooks.map(hookFn => promisify(hookFn).apply(this, args)))
+ },
+ serialHooks: function serialHooks (hooks) {
+ return async function () {
+ const args = Array.prototype.splice.call(arguments, 0, arguments.length - 1)
+ const done = arguments[arguments.length - 1]
+ for (const hook of hooks) {
+ await hook.apply(this, args)
+ }
+
+ return done() // eslint-disable-line promise/no-callback-in-promise
+ }
+ }
+}
diff --git a/node_modules/electron-packager/src/index.d.ts b/node_modules/electron-packager/src/index.d.ts
new file mode 100644
index 0000000..492b51c
--- /dev/null
+++ b/node_modules/electron-packager/src/index.d.ts
@@ -0,0 +1,568 @@
+// Originally based on the type definitions for electron-packager 14.0
+// Project: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/electron-packager
+// Original Authors:
+// * Maxime LUCE <https://github.com/SomaticIT>
+// * Juan Jimenez-Anca <https://github.com/cortopy>
+// * John Kleinschmidt <https://github.com/jkleinsc>
+// * Brendan Forster <https://github.com/shiftkey>
+// * Mark Lee <https://github.com/malept>
+// * Florian Keller <https://github.com/ffflorian>
+
+import { CreateOptions as AsarOptions } from 'asar';
+import { ElectronDownloadRequestOptions as ElectronDownloadOptions } from '@electron/get';
+import {
+ LegacyNotarizeCredentials,
+ NotaryToolCredentials,
+ TransporterOptions
+} from 'electron-notarize/lib/types';
+import { SignOptions } from 'electron-osx-sign';
+import type { makeUniversalApp } from '@electron/universal';
+
+type MakeUniversalOpts = Parameters<typeof makeUniversalApp>[0]
+
+type NotarizeLegacyOptions = LegacyNotarizeCredentials & TransporterOptions;
+
+/**
+ * Bundles Electron-based application source code with a renamed/customized Electron executable and
+ * its supporting files into folders ready for distribution.
+ *
+ * Briefly, this function:
+ * - finds or downloads the correct release of Electron
+ * - uses that version of Electron to create a app in `<out>/<appname>-<platform>-<arch>`
+ *
+ * Short example:
+ *
+ * ```javascript
+ * const packager = require('electron-packager')
+ *
+ * async function bundleElectronApp(options) {
+ * const appPaths = await packager(options)
+ * console.log(`Electron app bundles created:\n${appPaths.join("\n")}`)
+ * }
+ * ```
+ *
+ * @param opts - Options to configure packaging.
+ *
+ * @returns A Promise containing the paths to the newly created application bundles.
+ */
+declare function electronPackager(opts: electronPackager.Options): Promise<string[]>;
+
+declare namespace electronPackager {
+ /**
+ * Architectures that have been supported by the official Electron prebuilt binaries, past
+ * and present.
+ */
+ type OfficialArch = 'ia32' | 'x64' | 'armv7l' | 'arm64' | 'mips64el';
+ /**
+ * Platforms that have been supported by the official Electron prebuilt binaries, past and present.
+ */
+ type OfficialPlatform = 'linux' | 'win32' | 'darwin' | 'mas';
+ type TargetArch = OfficialArch | string;
+ type TargetPlatform = OfficialPlatform | string;
+ type ArchOption = TargetArch | 'all';
+ type PlatformOption = TargetPlatform | 'all';
+
+ /**
+ * A predicate function that, given an absolute file `path`, returns `true` if the file should be
+ * ignored, or `false` if the file should be kept. *This does not use any of the default ignored
+ * files/directories listed for the [[ignore]] option.*
+ */
+ type IgnoreFunction = (path: string) => boolean;
+ /**
+ * A function that is called on the completion of a packaging stage.
+ *
+ * By default, the functions are called in parallel (via
+ * [`Promise.all`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all)).
+ * If you need the functions called serially, there is a utility function provided. Please note that
+ * **callback-style functions are not supported by `serialHooks`.** For example:
+ *
+ * ```javascript
+ * const packager = require('electron-packager')
+ * const { serialHooks } = require('electron-packager/src/hooks')
+ *
+ * packager({
+ * // ...
+ * afterCopy: [serialHooks([
+ * (buildPath, electronVersion, platform, arch) => {
+ * return new Promise((resolve, reject) => {
+ * setTimeout(() => {
+ * console.log('first function')
+ * resolve()
+ * }, 1000)
+ * })
+ * },
+ * (buildPath, electronVersion, platform, arch) => {
+ * console.log('second function')
+ * }
+ * ])],
+ * // ...
+ * })
+ * ```
+ *
+ * For real-world examples of `HookFunction`s, see the [list of related
+ * plugins](https://github.com/electron/electron-packager#plugins).
+ */
+ type HookFunction =
+ /**
+ * @param buildPath - For [[afterExtract]], the path to the temporary folder where the prebuilt
+ * Electron binary has been extracted to. For [[afterCopy]] and [[afterPrune]], the path to the
+ * folder where the Electron app has been copied to.
+ * @param electronVersion - the version of Electron that is being bundled with the application.
+ * @param platform - The target platform you are packaging for.
+ * @param arch - The target architecture you are packaging for.
+ * @param callback - Must be called once you have completed your actions.
+ */
+ (
+ buildPath: string,
+ electronVersion: string,
+ platform: TargetArch,
+ arch: TargetArch,
+ callback: (err?: Error | null) => void
+ ) => void;
+
+ /** See the documentation for [`electron-osx-sign`](https://npm.im/electron-osx-sign#opts) for details. */
+ type OsxSignOptions = Omit<SignOptions, 'app' | 'binaries' | 'platform' | 'version'>;
+
+ /**
+ * See the documentation for [`electron-notarize`](https://npm.im/electron-notarize#method-notarizeopts-promisevoid)
+ * for details.
+ */
+ type OsxNotarizeOptions =
+ | ({ tool?: 'legacy' } & NotarizeLegacyOptions)
+ | ({ tool: 'notarytool' } & NotaryToolCredentials);
+
+ /**
+ * See the documentation for [`@electron/universal`](https://github.com/electron/universal)
+ * for details.
+ */
+ type OsxUniversalOptions = Omit<MakeUniversalOpts, 'x64AppPath' | 'arm64AppPath' | 'outAppPath' | 'force'>
+
+ /**
+ * Defines URL protocol schemes to be used on macOS.
+ */
+ interface MacOSProtocol {
+ /**
+ * The descriptive name. Maps to the `CFBundleURLName` metadata property.
+ */
+ name: string;
+ /**
+ * One or more protocol schemes associated with the app. For example, specifying `myapp`
+ * would cause URLs such as `myapp://path` to be opened with the app. Maps to the
+ * `CFBundleURLSchemes` metadata property.
+ */
+ schemes: string[];
+ }
+
+ /**
+ * A collection of application metadata to embed into the Windows executable.
+ *
+ * For more information, read the [`rcedit` Node module documentation](https://github.com/electron/node-rcedit#docs).
+ */
+ interface Win32MetadataOptions {
+ /** Defaults to the `author` name from the nearest `package.json`. */
+ CompanyName?: string;
+ /** Defaults to either `productName` or `name` from the nearest `package.json`. */
+ FileDescription?: string;
+ /** Defaults to the renamed Electron `.exe` file. */
+ OriginalFilename?: string;
+ /** Defaults to either `productName` or `name` from the nearest `package.json`. */
+ ProductName?: string;
+ /** Defaults to either `productName` or `name` from the nearest `package.json`. */
+ InternalName?: string;
+ /** See [MSDN](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) for details. */
+ 'requested-execution-level'?: 'asInvoker' | 'highestAvailable' | 'requireAdministrator';
+ /**
+ * Path to a local manifest file.
+ *
+ * See [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/aa374191.aspx) for more details.
+ */
+ 'application-manifest'?: string;
+ }
+
+ /** Options passed to the `packager()` function. */
+ interface Options {
+ /** The source directory. */
+ dir: string;
+ /**
+ * Functions to be called after your app directory has been copied to a temporary directory.
+ *
+ * **Note**: `afterCopy` will not be called if the [[prebuiltAsar]] option is set.
+ */
+ afterCopy?: HookFunction[];
+ /** Functions to be called after the prebuilt Electron binary has been extracted to a temporary directory. */
+ afterExtract?: HookFunction[];
+ /**
+ * Functions to be called after Node module pruning has been applied to the application.
+ *
+ * **Note**: None of these functions will be called if the [[prune]] option is `false` or
+ * the [[prebuiltAsar]] option is set.
+ */
+ afterPrune?: HookFunction[];
+
+ /** When `true`, sets both [[arch]] and [[platform]] to `all`. */
+ all?: boolean;
+ /*
+ * The bundle identifier to use in the application's `Info.plist`.
+ *
+ * @category macOS
+ */
+ appBundleId?: string;
+ /**
+ * The application category type, as shown in the Finder via *View → Arrange by Application
+ * Category* when viewing the Applications directory.
+ *
+ * For example, `app-category-type=public.app-category.developer-tools` will set the
+ * application category to *Developer Tools*.
+ *
+ * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).
+ *
+ * @category macOS
+ */
+ appCategoryType?: string;
+ /**
+ * The human-readable copyright line for the app. Maps to the `LegalCopyright` metadata
+ * property on Windows, and `NSHumanReadableCopyright` on macOS.
+ */
+ appCopyright?: string;
+ /**
+ * The release version of the application.
+ *
+ * By default the `version` property in the `package.json` is used, but it can be overridden
+ * with this argument. If neither are provided, the version of Electron will be used. Maps
+ * to the `ProductVersion` metadata property on Windows, and `CFBundleShortVersionString`
+ * on macOS.
+ */
+ appVersion?: string;
+ /**
+ * The target system architecture(s) to build for.
+ *
+ * Not required if the [[all]] option is set. If `arch` is set to `all`, all supported
+ * architectures for the target platforms specified by [[platform]] will be built.
+ * Arbitrary combinations of individual architectures are also supported via a comma-delimited
+ * string or array of strings. The non-`all` values correspond to the architecture names used
+ * by [Electron releases](https://github.com/electron/electron/releases). This value
+ * is not restricted to the official set if [[download|`download.mirrorOptions`]] is set.
+ *
+ * Defaults to the arch of the host computer running Electron Packager.
+ *
+ * Arch values for the official prebuilt Electron binaries:
+ * - `ia32`
+ * - `x64`
+ * - `armv7l`
+ * - `arm64` _(Linux: Electron 1.8.0 and above; Windows: 6.0.8 and above; macOS: 11.0.0-beta.1 and above)_
+ * - `mips64el` _(Electron 1.8.2-beta.5 to 1.8.8)_
+ */
+ arch?: ArchOption | ArchOption[];
+ /**
+ * Whether to package the application's source code into an archive, using [Electron's
+ * archive format](https://github.com/electron/asar). Reasons why you may want to enable
+ * this feature include mitigating issues around long path names on Windows, slightly speeding
+ * up `require`, and concealing your source code from cursory inspection. When the value
+ * is `true`, it passes the default configuration to the `asar` module. The configuration
+ * values can be customized when the value is an `Object`. Supported sub-options include, but
+ * are not limited to:
+ * - `ordering` (*string*): A path to an ordering file for packing files. An explanation can be
+ * found on the [Atom issue tracker](https://github.com/atom/atom/issues/10163).
+ * - `unpack` (*string*): A [glob expression](https://github.com/isaacs/minimatch#features),
+ * when specified, unpacks the file with matching names to the `app.asar.unpacked` directory.
+ * - `unpackDir` (*string*): Unpacks the dir to the `app.asar.unpacked` directory whose names
+ * exactly or pattern match this string. The `asar.unpackDir` is relative to [[dir]].
+ *
+ * Defaults to `false`.
+ *
+ * Some examples:
+ *
+ * - `asar.unpackDir = 'sub_dir'` will unpack the directory `/<dir>/sub_dir`
+ * - `asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '*')` will unpack the directories `/<dir>/sub_dir1/sub_sub_dir` and `/<dir>/sub_dir2`, but it will not include their subdirectories.
+ * - `asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '**')` will unpack the subdirectories of the directories `/<dir>/sub_dir1/sub_sub_dir` and `/<dir>/sub_dir2`.
+ * - `asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '**', '*')` will unpack the directories `/<dir>/sub_dir1/sub_sub_dir` and `/<dir>/sub_dir2` and their subdirectories.
+ *
+ * **Note:** `asar` will have no effect if the [[prebuiltAsar]] option is set.
+ */
+ asar?: boolean | AsarOptions;
+ /**
+ * The build version of the application. Defaults to the value of the [[appVersion]] option.
+ * Maps to the `FileVersion` metadata property on Windows, and `CFBundleVersion` on macOS.
+ */
+ buildVersion?: string;
+ /**
+ * Forces support for Mojave (macOS 10.14) dark mode in your packaged app. This sets the
+ * `NSRequiresAquaSystemAppearance` key to `false` in your app's `Info.plist`. For more information,
+ * see the [Electron documentation](https://www.electronjs.org/docs/tutorial/mojave-dark-mode-guide)
+ * and the [Apple developer documentation](https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_app).
+ *
+ * @category macOS
+ */
+ darwinDarkModeSupport?: boolean;
+ /**
+ * Whether symlinks should be dereferenced during the copying of the application source.
+ * Defaults to `true`.
+ *
+ * **Note:** `derefSymlinks` will have no effect if the [[prebuiltAsar]] option is set.
+ */
+ derefSymlinks?: boolean;
+ /**
+ * If present, passes custom options to [`@electron/get`](https://npm.im/@electron/get). See
+ * the module for option descriptions, proxy support, and defaults. Supported parameters
+ * include, but are not limited to:
+ * - `cacheRoot` (*string*): The directory where prebuilt, pre-packaged Electron downloads are cached.
+ * - `mirrorOptions` (*Object*): Options to override the default Electron download location.
+ * - `rejectUnauthorized` (*boolean* - default: `true`): Whether SSL certificates are required to be
+ * valid when downloading Electron.
+ *
+ * **Note:** `download` sub-options will have no effect if the [[electronZipDir]] option is set.
+ */
+ download?: ElectronDownloadOptions;
+ /**
+ * The Electron version with which the app is built (without the leading 'v') - for example,
+ * [`1.4.13`](https://github.com/electron/electron/releases/tag/v1.4.13). See [Electron
+ * releases](https://github.com/electron/electron/releases) for valid versions. If omitted, it
+ * will use the version of the nearest local installation of `electron`,
+ * `electron-prebuilt-compile`, or `electron-prebuilt`, defined in `package.json` in either
+ * `devDependencies` or `dependencies`.
+ */
+ electronVersion?: string;
+ /**
+ * The local path to a directory containing Electron ZIP files for Electron Packager to unzip, instead
+ * of downloading them. The ZIP filenames should be in the same format as the ones downloaded from the
+ * [Electron releases](https://github.com/electron/electron/releases) site.
+ *
+ * **Note:** Setting this option prevents the [[download]] sub-options from being used, as
+ * the functionality gets skipped over.
+ */
+ electronZipDir?: string;
+ /**
+ * The name of the executable file, sans file extension. Defaults to the value for the [[name]]
+ * option. For `darwin` or `mas` target platforms, this does not affect the name of the
+ * `.app` folder - this will use the [[name]] option instead.
+ */
+ executableName?: string;
+ /**
+ * When the value is a string, specifies the filename of a `plist` file. Its contents are merged
+ * into the app's `Info.plist`.
+ * When the value is an `Object`, it specifies an already-parsed `plist` data structure that is
+ * merged into the app's `Info.plist`.
+ *
+ * Entries from `extendInfo` override entries in the base `Info.plist` file supplied by
+ * `electron`, `electron-prebuilt-compile`, or `electron-prebuilt`, but are overridden by other
+ * options such as [[appVersion]] or [[appBundleId]].
+ *
+ * @category macOS
+ */
+ extendInfo?: string | { [property: string]: any }; // eslint-disable-line @typescript-eslint/no-explicit-any
+ /**
+ * When the value is a string, specifies the filename of a `plist` file. Its contents are merged
+ * into all the Helper apps' `Info.plist` files.
+ * When the value is an `Object`, it specifies an already-parsed `plist` data structure that is
+ * merged into all the Helper apps' `Info.plist` files.
+ *
+ * Entries from `extendHelperInfo` override entries in the helper apps' `Info.plist` file supplied by
+ * `electron`, `electron-prebuilt-compile`, or `electron-prebuilt`, but are overridden by other
+ * options such as [[appVersion]] or [[appBundleId]].
+ *
+ * @category macOS
+ */
+ extendHelperInfo?: string | { [property: string]: any }; // eslint-disable-line @typescript-eslint/no-explicit-any
+ /**
+ * One or more files to be copied directly into the app's `Contents/Resources` directory for
+ * macOS target platforms, and the `resources` directory for other target platforms. The
+ * resources directory can be referenced in the packaged app via the
+ * [`process.resourcesPath`](https://www.electronjs.org/docs/api/process#processresourcespath-readonly) value.
+ */
+ extraResource?: string | string[];
+ /**
+ * The bundle identifier to use in the application helper's `Info.plist`.
+ *
+ * @category macOS
+ */
+ helperBundleId?: string;
+ /**
+ * The local path to the icon file, if the target platform supports setting embedding an icon.
+ *
+ * Currently you must look for conversion tools in order to supply an icon in the format required by the platform:
+ *
+ * - macOS: `.icns`
+ * - Windows: `.ico` ([See the readme](https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms) for details on non-Windows platforms)
+ * - Linux: this option is not supported, as the dock/window list icon is set via
+ * [the `icon` option in the `BrowserWindow` constructor](https://electronjs.org/docs/api/browser-window/#new-browserwindowoptions).
+ * *Please note that you need to use a PNG, and not the macOS or Windows icon formats, in order for it
+ * to show up in the dock/window list.* Setting the icon in the file manager is not currently supported.
+ *
+ * If the file extension is omitted, it is auto-completed to the correct extension based on the
+ * platform, including when [[platform|`platform: 'all'`]] is in effect.
+ */
+ icon?: string;
+ /**
+ * One or more additional [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
+ * patterns which specify which files to ignore when copying files to create the app bundle(s). The
+ * regular expressions are matched against the absolute path of a given file/directory to be copied.
+ *
+ * **Please note that [glob patterns](https://en.wikipedia.org/wiki/Glob_%28programming%29) will not work.**
+ *
+ * The following paths are always ignored (*when you aren't using an [[IgnoreFunction]]*):
+ *
+ * - the directory specified by the [[out]] option
+ * - the temporary directory used to build the Electron app
+ * - `node_modules/.bin`
+ * - `node_modules/electron`
+ * - `node_modules/electron-prebuilt`
+ * - `node_modules/electron-prebuilt-compile`
+ * - `.git`
+ * - files and folders ending in `.o` and `.obj`
+ *
+ * **Note**: Node modules specified in `devDependencies` are ignored by default, via the
+ * [[prune]] option.
+ *
+ * **Note:** `ignore` will have no effect if the [[prebuiltAsar]] option is set.
+ */
+ ignore?: RegExp | RegExp[] | IgnoreFunction;
+ /**
+ * Ignores [system junk files](https://github.com/sindresorhus/junk) when copying the Electron app,
+ * regardless of the [[ignore]] option.
+ *
+ * **Note:** `junk` will have no effect if the [[prebuiltAsar]] option is set.
+ */
+ junk?: boolean;
+ /**
+ * The application name. If omitted, it will use the `productName` or `name` value from the
+ * nearest `package.json`.
+ *
+ * **Regardless of source, characters in the Electron app name which are not allowed in all target
+ * platforms' filenames (e.g., `/`), will be replaced by hyphens (`-`).**
+ */
+ name?: string;
+ /**
+ * If present, notarizes macOS target apps when the host platform is macOS and XCode is installed.
+ * See [`electron-notarize`](https://github.com/electron/electron-notarize#method-notarizeopts-promisevoid)
+ * for option descriptions, such as how to use `appleIdPassword` safely or obtain an API key.
+ *
+ * **Requires the [[osxSign]] option to be set.**
+ *
+ * @category macOS
+ */
+ osxNotarize?: OsxNotarizeOptions;
+ /**
+ * If present, signs macOS target apps when the host platform is macOS and XCode is installed.
+ * When the value is `true`, pass default configuration to the signing module. See
+ * [electron-osx-sign](https://npm.im/electron-osx-sign#opts---options) for sub-option descriptions and
+ * their defaults. Options include, but are not limited to:
+ * - `identity` (*string*): The identity used when signing the package via `codesign`.
+ * - `entitlements` (*string*): The path to the 'parent' entitlements.
+ * - `entitlements-inherit` (*string*): The path to the 'child' entitlements.
+ *
+ * @category macOS
+ */
+ osxSign?: true | OsxSignOptions;
+ /**
+ * Used to provide custom options to the internal call to `@electron/universal` when building a macOS
+ * app with the target architecture of "universal". Unused otherwise, providing a value does not imply
+ * a universal app is built.
+ */
+ osxUniversal?: OsxUniversalOptions;
+ /**
+ * The base directory where the finished package(s) are created.
+ *
+ * Defaults to the current working directory.
+ */
+ out?: string;
+ /**
+ * Whether to replace an already existing output directory for a given platform (`true`) or
+ * skip recreating it (`false`). Defaults to `false`.
+ */
+ overwrite?: boolean;
+ /**
+ * The target platform(s) to build for.
+ *
+ * Not required if the [[all]] option is set. If `platform` is set to `all`, all officially
+ * supported target platforms for the target architectures specified by the [[arch]] option
+ * will be built. Arbitrary combinations of individual platforms are also supported via a
+ * comma-delimited string or array of strings.
+ *
+ * The official non-`all` values correspond to the platform names used by [Electron
+ * releases](https://github.com/electron/electron/releases). This value is not restricted to
+ * the official set if [[download|`download.mirrorOptions]] is set.
+ *
+ * Defaults to the platform of the host computer running Electron Packager.
+ *
+ * Platform values for the official prebuilt Electron binaries:
+ * - `darwin` (macOS)
+ * - `linux`
+ * - `mas` (macOS, specifically for submitting to the Mac App Store)
+ * - `win32`
+ */
+ platform?: PlatformOption | PlatformOption[];
+ /**
+ * The path to a prebuilt ASAR file.
+ *
+ * **Note:** Setting this option prevents the following options from being used, as the functionality
+ * gets skipped over:
+ *
+ * - [[asar]]
+ * - [[afterCopy]]
+ * - [[afterPrune]]
+ * - [[derefSymlinks]]
+ * - [[ignore]]
+ * - [[junk]]
+ * - [[prune]]
+ */
+ prebuiltAsar?: string;
+ /**
+ * The URL protocol schemes associated with the Electron app.
+ *
+ * @category macOS
+ */
+ protocols?: MacOSProtocol[];
+ /**
+ * Walks the `node_modules` dependency tree to remove all of the packages specified in the
+ * `devDependencies` section of `package.json` from the outputted Electron app.
+ *
+ * Defaults to `true`.
+ *
+ * **Note:** `prune` will have no effect if the [[prebuiltAsar]] option is set.
+ */
+ prune?: boolean;
+ /**
+ * If `true`, disables printing informational and warning messages to the console when
+ * packaging the application. This does not disable errors.
+ *
+ * Defaults to `false`.
+ */
+ quiet?: boolean;
+ /**
+ * The base directory to use as a temporary directory. Set to `false` to disable use of a
+ * temporary directory. Defaults to the system's temporary directory.
+ */
+ tmpdir?: string | false;
+ /**
+ * Human-readable descriptions of how the Electron app uses certain macOS features. These are displayed
+ * in the App Store. A non-exhaustive list of available properties:
+ *
+ * * `Camera` - required for media access API usage in macOS Catalina
+ * * `Microphone` - required for media access API usage in macOS Catalina
+ *
+ * Valid properties are the [Cocoa keys for MacOS](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)
+ * of the pattern `NS(.*)UsageDescription`, where the captured group is the key to use.
+ *
+ * Example:
+ *
+ * ```javascript
+ * {
+ * usageDescription: {
+ * Camera: 'Needed for video calls',
+ * Microphone: 'Needed for voice calls'
+ * }
+ * }
+ * ```
+ *
+ * @category macOS
+ */
+ usageDescription?: { [property: string]: string };
+ /**
+ * Application metadata to embed into the Windows executable.
+ * @category Windows
+ */
+ win32metadata?: Win32MetadataOptions;
+ }
+}
+
+export = electronPackager;
diff --git a/node_modules/electron-packager/src/index.js b/node_modules/electron-packager/src/index.js
new file mode 100644
index 0000000..bab5fa9
--- /dev/null
+++ b/node_modules/electron-packager/src/index.js
@@ -0,0 +1,204 @@
+'use strict'
+
+const common = require('./common')
+const copyFilter = require('./copy-filter')
+const debug = require('debug')('electron-packager')
+const download = require('./download')
+const fs = require('fs-extra')
+const getMetadataFromPackageJSON = require('./infer')
+const hooks = require('./hooks')
+const path = require('path')
+const targets = require('./targets')
+const unzip = require('./unzip')
+const { packageUniversalMac } = require('./universal')
+
+function debugHostInfo () {
+ debug(common.hostInfo())
+}
+
+class Packager {
+ constructor (opts) {
+ this.opts = opts
+ this.tempBase = common.baseTempDir(opts)
+ this.useTempDir = opts.tmpdir !== false
+ this.canCreateSymlinks = undefined
+ }
+
+ async ensureTempDir () {
+ if (this.useTempDir) {
+ await fs.remove(this.tempBase)
+ } else {
+ return Promise.resolve()
+ }
+ }
+
+ async testSymlink (comboOpts, zipPath) {
+ const testPath = path.join(this.tempBase, `symlink-test-${comboOpts.platform}-${comboOpts.arch}`)
+ const testFile = path.join(testPath, 'test')
+ const testLink = path.join(testPath, 'testlink')
+
+ try {
+ await fs.outputFile(testFile, '')
+ await fs.symlink(testFile, testLink)
+ this.canCreateSymlinks = true
+ } catch (e) {
+ /* istanbul ignore next */
+ this.canCreateSymlinks = false
+ } finally {
+ await fs.remove(testPath)
+ }
+
+ if (this.canCreateSymlinks) {
+ return this.checkOverwrite(comboOpts, zipPath)
+ }
+
+ /* istanbul ignore next */
+ return this.skipHostPlatformSansSymlinkSupport(comboOpts)
+ }
+
+ /* istanbul ignore next */
+ skipHostPlatformSansSymlinkSupport (comboOpts) {
+ common.info(`Cannot create symlinks (on Windows hosts, it requires admin privileges); skipping ${comboOpts.platform} platform`, this.opts.quiet)
+ return Promise.resolve()
+ }
+
+ async overwriteAndCreateApp (outDir, comboOpts, zipPath) {
+ debug(`Removing ${outDir} due to setting overwrite: true`)
+ await fs.remove(outDir)
+ return this.createApp(comboOpts, zipPath)
+ }
+
+ async extractElectronZip (comboOpts, zipPath, buildDir) {
+ debug(`Extracting ${zipPath} to ${buildDir}`)
+ await unzip(zipPath, buildDir)
+ await hooks.promisifyHooks(this.opts.afterExtract, [buildDir, comboOpts.electronVersion, comboOpts.platform, comboOpts.arch])
+ }
+
+ buildDir (platform, arch) {
+ let buildParentDir
+ if (this.useTempDir) {
+ buildParentDir = this.tempBase
+ } else {
+ buildParentDir = this.opts.out || process.cwd()
+ }
+ return path.resolve(buildParentDir, `${platform}-${arch}-template`)
+ }
+
+ async createApp (comboOpts, zipPath) {
+ const buildDir = this.buildDir(comboOpts.platform, comboOpts.arch)
+ common.info(`Packaging app for platform ${comboOpts.platform} ${comboOpts.arch} using electron v${comboOpts.electronVersion}`, this.opts.quiet)
+
+ debug(`Creating ${buildDir}`)
+ await fs.ensureDir(buildDir)
+ await this.extractElectronZip(comboOpts, zipPath, buildDir)
+ const os = require(targets.osModules[comboOpts.platform])
+ const app = new os.App(comboOpts, buildDir)
+ return app.create()
+ }
+
+ async checkOverwrite (comboOpts, zipPath) {
+ const finalPath = common.generateFinalPath(comboOpts)
+ if (await fs.pathExists(finalPath)) {
+ if (this.opts.overwrite) {
+ return this.overwriteAndCreateApp(finalPath, comboOpts, zipPath)
+ } else {
+ common.info(`Skipping ${comboOpts.platform} ${comboOpts.arch} (output dir already exists, use --overwrite to force)`, this.opts.quiet)
+ return true
+ }
+ } else {
+ return this.createApp(comboOpts, zipPath)
+ }
+ }
+
+ async getElectronZipPath (downloadOpts) {
+ if (this.opts.electronZipDir) {
+ if (await fs.pathExists(this.opts.electronZipDir)) {
+ const zipPath = path.resolve(
+ this.opts.electronZipDir,
+ `electron-v${downloadOpts.version}-${downloadOpts.platform}-${downloadOpts.arch}.zip`
+ )
+ if (!await fs.pathExists(zipPath)) {
+ throw new Error(`The specified Electron ZIP file does not exist: ${zipPath}`)
+ }
+
+ return zipPath
+ }
+
+ throw new Error(`The specified Electron ZIP directory does not exist: ${this.opts.electronZipDir}`)
+ } else {
+ return download.downloadElectronZip(downloadOpts)
+ }
+ }
+
+ async packageForPlatformAndArchWithOpts (comboOpts, downloadOpts) {
+ const zipPath = await this.getElectronZipPath(downloadOpts)
+
+ if (!this.useTempDir) {
+ return this.createApp(comboOpts, zipPath)
+ }
+
+ if (common.isPlatformMac(comboOpts.platform)) {
+ /* istanbul ignore else */
+ if (this.canCreateSymlinks === undefined) {
+ return this.testSymlink(comboOpts, zipPath)
+ } else if (!this.canCreateSymlinks) {
+ return this.skipHostPlatformSansSymlinkSupport(comboOpts)
+ }
+ }
+
+ return this.checkOverwrite(comboOpts, zipPath)
+ }
+
+ async packageForPlatformAndArch (downloadOpts) {
+ // Create delegated options object with specific platform and arch, for output directory naming
+ const comboOpts = {
+ ...this.opts,
+ arch: downloadOpts.arch,
+ platform: downloadOpts.platform,
+ electronVersion: downloadOpts.version
+ }
+
+ if (common.isPlatformMac(comboOpts.platform) && comboOpts.arch === 'universal') {
+ return packageUniversalMac(this.packageForPlatformAndArchWithOpts.bind(this), this.buildDir(comboOpts.platform, comboOpts.arch), comboOpts, downloadOpts, this.tempBase)
+ }
+
+ return this.packageForPlatformAndArchWithOpts(comboOpts, downloadOpts)
+ }
+}
+
+async function packageAllSpecifiedCombos (opts, archs, platforms) {
+ const packager = new Packager(opts)
+ await packager.ensureTempDir()
+ return Promise.all(download.createDownloadCombos(opts, platforms, archs).map(
+ downloadOpts => packager.packageForPlatformAndArch(downloadOpts)
+ ))
+}
+
+module.exports = async function packager (opts) {
+ debugHostInfo()
+ if (debug.enabled) debug(`Packager Options: ${JSON.stringify(opts)}`)
+
+ const archs = targets.validateListFromOptions(opts, 'arch')
+ const platforms = targets.validateListFromOptions(opts, 'platform')
+ if (!Array.isArray(archs)) return Promise.reject(archs)
+ if (!Array.isArray(platforms)) return Promise.reject(platforms)
+
+ debug(`Target Platforms: ${platforms.join(', ')}`)
+ debug(`Target Architectures: ${archs.join(', ')}`)
+
+ const packageJSONDir = path.resolve(process.cwd(), opts.dir) || process.cwd()
+
+ await getMetadataFromPackageJSON(platforms, opts, packageJSONDir)
+ if (opts.name.endsWith(' Helper')) {
+ throw new Error('Application names cannot end in " Helper" due to limitations on macOS')
+ }
+
+ debug(`Application name: ${opts.name}`)
+ debug(`Target Electron version: ${opts.electronVersion}`)
+
+ copyFilter.populateIgnoredPaths(opts)
+
+ const appPaths = await packageAllSpecifiedCombos(opts, archs, platforms)
+ // Remove falsy entries (e.g. skipped platforms)
+ return appPaths.filter(appPath => appPath)
+}
diff --git a/node_modules/electron-packager/src/infer.js b/node_modules/electron-packager/src/infer.js
new file mode 100644
index 0000000..9dde6d7
--- /dev/null
+++ b/node_modules/electron-packager/src/infer.js
@@ -0,0 +1,178 @@
+'use strict'
+
+const debug = require('debug')('electron-packager')
+const getPackageInfo = require('get-package-info')
+const parseAuthor = require('parse-author')
+const path = require('path')
+const resolve = require('resolve')
+const semver = require('semver')
+
+function isMissingRequiredProperty (props) {
+ return props.some(prop => prop === 'productName' || prop === 'dependencies.electron')
+}
+
+function errorMessageForProperty (prop) {
+ let hash, propDescription
+ switch (prop) {
+ case 'productName':
+ hash = 'name'
+ propDescription = 'application name'
+ break
+ case 'dependencies.electron':
+ hash = 'electronversion'
+ propDescription = 'Electron version'
+ break
+ case 'version':
+ hash = 'appversion'
+ propDescription = 'application version'
+ break
+ /* istanbul ignore next */
+ default:
+ hash = ''
+ propDescription = `[Unknown Property (${prop})]`
+ }
+
+ return `Unable to determine ${propDescription}. Please specify an ${propDescription}\n\n` +
+ 'For more information, please see\n' +
+ `https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#${hash}\n`
+}
+
+function resolvePromise (id, options) {
+ // eslint-disable-next-line promise/param-names
+ return new Promise((accept, reject) => {
+ resolve(id, options, (err, mainPath, pkg) => {
+ if (err) {
+ /* istanbul ignore next */
+ reject(err)
+ } else {
+ accept([mainPath, pkg])
+ }
+ })
+ })
+}
+
+function rangeFromElectronVersion (electronVersion) {
+ try {
+ return new semver.Range(electronVersion)
+ } catch (error) {
+ return null
+ }
+}
+
+async function getVersion (opts, electronProp) {
+ const [depType, packageName] = electronProp.prop.split('.')
+ const src = electronProp.src
+ if (packageName === 'electron-prebuilt-compile') {
+ const electronVersion = electronProp.pkg[depType][packageName]
+ const versionRange = rangeFromElectronVersion(electronVersion)
+ if (versionRange !== null && versionRange.intersects(new semver.Range('< 1.6.5'))) {
+ if (!/^\d+\.\d+\.\d+/.test(electronVersion)) {
+ // electron-prebuilt-compile cannot be resolved because `main` does not point
+ // to a valid JS file.
+ throw new Error('Using electron-prebuilt-compile with Electron Packager requires specifying an exact Electron version')
+ }
+
+ opts.electronVersion = electronVersion
+ return Promise.resolve()
+ }
+ }
+
+ const pkg = (await resolvePromise(packageName, { basedir: path.dirname(src) }))[1]
+ debug(`Inferring target Electron version from ${packageName} in ${src}`)
+ opts.electronVersion = pkg.version
+ return null
+}
+
+async function handleMetadata (opts, result) {
+ if (result.values.productName) {
+ debug(`Inferring application name from ${result.source.productName.prop} in ${result.source.productName.src}`)
+ opts.name = result.values.productName
+ }
+
+ if (result.values.version) {
+ debug(`Inferring appVersion from version in ${result.source.version.src}`)
+ opts.appVersion = result.values.version
+ }
+
+ if (result.values.author && !opts.win32metadata) {
+ opts.win32metadata = {}
+ }
+
+ if (result.values.author) {
+ debug(`Inferring win32metadata.CompanyName from author in ${result.source.author.src}`)
+ if (typeof result.values.author === 'string') {
+ opts.win32metadata.CompanyName = parseAuthor(result.values.author).name
+ } else if (result.values.author.name) {
+ opts.win32metadata.CompanyName = result.values.author.name
+ } else {
+ debug('Cannot infer win32metadata.CompanyName from author, no name found')
+ }
+ }
+
+ // eslint-disable-next-line no-prototype-builtins
+ if (result.values.hasOwnProperty('dependencies.electron')) {
+ return getVersion(opts, result.source['dependencies.electron'])
+ } else {
+ return Promise.resolve()
+ }
+}
+
+function handleMissingProperties (opts, err) {
+ const missingProps = err.missingProps.map(prop => {
+ return Array.isArray(prop) ? prop[0] : prop
+ })
+
+ if (isMissingRequiredProperty(missingProps)) {
+ const messages = missingProps.map(errorMessageForProperty)
+
+ debug(err.message)
+ err.message = messages.join('\n') + '\n'
+ throw err
+ } else {
+ // Missing props not required, can continue w/ partial result
+ return handleMetadata(opts, err.result)
+ }
+}
+
+module.exports = async function getMetadataFromPackageJSON (platforms, opts, dir) {
+ const props = []
+ if (!opts.name) props.push(['productName', 'name'])
+ if (!opts.appVersion) props.push('version')
+ if (!opts.electronVersion) {
+ props.push([
+ 'dependencies.electron',
+ 'devDependencies.electron',
+ 'dependencies.electron-nightly',
+ 'devDependencies.electron-nightly',
+ 'dependencies.electron-prebuilt-compile',
+ 'devDependencies.electron-prebuilt-compile',
+ 'dependencies.electron-prebuilt',
+ 'devDependencies.electron-prebuilt'
+ ])
+ }
+
+ if (platforms.includes('win32') && !(opts.win32metadata && opts.win32metadata.CompanyName)) {
+ debug('Requiring author in package.json, as CompanyName was not specified for win32metadata')
+ props.push('author')
+ }
+
+ // Name and version provided, no need to infer
+ if (props.length === 0) return Promise.resolve()
+
+ // Search package.json files to infer name and version from
+ try {
+ const result = await getPackageInfo(props, dir)
+ return handleMetadata(opts, result)
+ } catch (err) {
+ if (err.missingProps) {
+ if (err.missingProps.length === props.length) {
+ debug(err.message)
+ err.message = `Could not locate a package.json file in "${path.resolve(opts.dir)}" or its parent directories for an Electron app with the following fields: ${err.missingProps.join(', ')}`
+ } else {
+ return handleMissingProperties(opts, err)
+ }
+ }
+
+ throw err
+ }
+}
diff --git a/node_modules/electron-packager/src/linux.js b/node_modules/electron-packager/src/linux.js
new file mode 100644
index 0000000..1e98414
--- /dev/null
+++ b/node_modules/electron-packager/src/linux.js
@@ -0,0 +1,25 @@
+'use strict'
+
+const App = require('./platform')
+const common = require('./common')
+
+class LinuxApp extends App {
+ get originalElectronName () {
+ return 'electron'
+ }
+
+ get newElectronName () {
+ return common.sanitizeAppName(this.executableName)
+ }
+
+ async create () {
+ await this.initialize()
+ await this.renameElectron()
+ await this.copyExtraResources()
+ return this.move()
+ }
+}
+
+module.exports = {
+ App: LinuxApp
+}
diff --git a/node_modules/electron-packager/src/mac.js b/node_modules/electron-packager/src/mac.js
new file mode 100644
index 0000000..2d6e769
--- /dev/null
+++ b/node_modules/electron-packager/src/mac.js
@@ -0,0 +1,444 @@
+'use strict'
+
+const App = require('./platform')
+const common = require('./common')
+const debug = require('debug')('electron-packager')
+const fs = require('fs-extra')
+const path = require('path')
+const plist = require('plist')
+const { notarize } = require('electron-notarize')
+const { signAsync } = require('electron-osx-sign')
+
+class MacApp extends App {
+ constructor (opts, templatePath) {
+ super(opts, templatePath)
+
+ this.appName = opts.name
+ }
+
+ get appCategoryType () {
+ return this.opts.appCategoryType
+ }
+
+ get appCopyright () {
+ return this.opts.appCopyright
+ }
+
+ get appVersion () {
+ return this.opts.appVersion
+ }
+
+ get buildVersion () {
+ return this.opts.buildVersion
+ }
+
+ get enableDarkMode () {
+ return this.opts.darwinDarkModeSupport
+ }
+
+ get usageDescription () {
+ return this.opts.usageDescription
+ }
+
+ get protocols () {
+ return this.opts.protocols.map((protocol) => {
+ return {
+ CFBundleURLName: protocol.name,
+ CFBundleURLSchemes: [].concat(protocol.schemes)
+ }
+ })
+ }
+
+ get dotAppName () {
+ return `${common.sanitizeAppName(this.appName)}.app`
+ }
+
+ get defaultBundleName () {
+ return `com.electron.${common.sanitizeAppName(this.appName).toLowerCase()}`
+ }
+
+ get bundleName () {
+ return filterCFBundleIdentifier(this.opts.appBundleId || this.defaultBundleName)
+ }
+
+ get originalResourcesDir () {
+ return path.join(this.contentsPath, 'Resources')
+ }
+
+ get resourcesDir () {
+ return path.join(this.dotAppName, 'Contents', 'Resources')
+ }
+
+ get electronBinaryDir () {
+ return path.join(this.contentsPath, 'MacOS')
+ }
+
+ get originalElectronName () {
+ return 'Electron'
+ }
+
+ get newElectronName () {
+ return this.appPlist.CFBundleExecutable
+ }
+
+ get renamedAppPath () {
+ return path.join(this.stagingPath, this.dotAppName)
+ }
+
+ get electronAppPath () {
+ return path.join(this.stagingPath, `${this.originalElectronName}.app`)
+ }
+
+ get contentsPath () {
+ return path.join(this.electronAppPath, 'Contents')
+ }
+
+ get frameworksPath () {
+ return path.join(this.contentsPath, 'Frameworks')
+ }
+
+ get loginItemsPath () {
+ return path.join(this.contentsPath, 'Library', 'LoginItems')
+ }
+
+ get loginHelperPath () {
+ return path.join(this.loginItemsPath, 'Electron Login Helper.app')
+ }
+
+ updatePlist (basePlist, displayName, identifier, name) {
+ return Object.assign(basePlist, {
+ CFBundleDisplayName: displayName,
+ CFBundleExecutable: common.sanitizeAppName(displayName),
+ CFBundleIdentifier: identifier,
+ CFBundleName: common.sanitizeAppName(name)
+ })
+ }
+
+ updateHelperPlist (basePlist, suffix, identifierIgnoresSuffix) {
+ let helperSuffix, identifier, name
+ if (suffix) {
+ helperSuffix = `Helper ${suffix}`
+ if (identifierIgnoresSuffix) {
+ identifier = this.helperBundleIdentifier
+ } else {
+ identifier = `${this.helperBundleIdentifier}.${suffix}`
+ }
+ name = `${this.appName} ${helperSuffix}`
+ } else {
+ helperSuffix = 'Helper'
+ identifier = this.helperBundleIdentifier
+ name = this.appName
+ }
+ return this.updatePlist(basePlist, `${this.appName} ${helperSuffix}`, identifier, name)
+ }
+
+ async extendPlist (basePlist, propsOrFilename) {
+ if (!propsOrFilename) {
+ return Promise.resolve()
+ }
+
+ if (typeof propsOrFilename === 'string') {
+ const plist = await this.loadPlist(propsOrFilename)
+ return Object.assign(basePlist, plist)
+ } else {
+ return Object.assign(basePlist, propsOrFilename)
+ }
+ }
+
+ async loadPlist (filename, propName) {
+ const loadedPlist = plist.parse((await fs.readFile(filename)).toString())
+ if (propName) {
+ this[propName] = loadedPlist
+ }
+ return loadedPlist
+ }
+
+ ehPlistFilename (helper) {
+ return this.helperPlistFilename(path.join(this.frameworksPath, helper))
+ }
+
+ helperPlistFilename (helperApp) {
+ return path.join(helperApp, 'Contents', 'Info.plist')
+ }
+
+ async determinePlistFilesToUpdate () {
+ const appPlistFilename = path.join(this.contentsPath, 'Info.plist')
+
+ const plists = [
+ [appPlistFilename, 'appPlist'],
+ [this.ehPlistFilename('Electron Helper.app'), 'helperPlist']
+ ]
+
+ const possiblePlists = [
+ [this.ehPlistFilename('Electron Helper (Renderer).app'), 'helperRendererPlist'],
+ [this.ehPlistFilename('Electron Helper (Plugin).app'), 'helperPluginPlist'],
+ [this.ehPlistFilename('Electron Helper (GPU).app'), 'helperGPUPlist'],
+ [this.ehPlistFilename('Electron Helper EH.app'), 'helperEHPlist'],
+ [this.ehPlistFilename('Electron Helper NP.app'), 'helperNPPlist'],
+ [this.helperPlistFilename(this.loginHelperPath), 'loginHelperPlist']
+ ]
+
+ const optional = await Promise.all(possiblePlists.map(async item =>
+ (await fs.pathExists(item[0])) ? item : null))
+ return plists.concat(optional.filter(item => item))
+ }
+
+ appRelativePath (p) {
+ return path.relative(this.contentsPath, p)
+ }
+
+ async updatePlistFiles () {
+ const appBundleIdentifier = this.bundleName
+ this.helperBundleIdentifier = filterCFBundleIdentifier(this.opts.helperBundleId || `${appBundleIdentifier}.helper`)
+
+ const plists = await this.determinePlistFilesToUpdate()
+ await Promise.all(plists.map(plistArgs => this.loadPlist(...plistArgs)))
+ await this.extendPlist(this.appPlist, this.opts.extendInfo)
+ if (this.asarIntegrity) {
+ await this.extendPlist(this.appPlist, {
+ ElectronAsarIntegrity: this.asarIntegrity
+ })
+ }
+ this.appPlist = this.updatePlist(this.appPlist, this.executableName, appBundleIdentifier, this.appName)
+
+ const updateIfExists = [
+ ['helperRendererPlist', '(Renderer)', true],
+ ['helperPluginPlist', '(Plugin)', true],
+ ['helperGPUPlist', '(GPU)', true],
+ ['helperEHPlist', 'EH'],
+ ['helperNPPlist', 'NP']
+ ]
+
+ for (const [plistKey] of [...updateIfExists, ['helperPlist']]) {
+ if (!this[plistKey]) continue
+ await this.extendPlist(this[plistKey], this.opts.extendHelperInfo)
+ }
+
+ this.helperPlist = this.updateHelperPlist(this.helperPlist)
+ for (const [plistKey, ...suffixArgs] of updateIfExists) {
+ if (!this[plistKey]) continue
+ this[plistKey] = this.updateHelperPlist(this[plistKey], ...suffixArgs)
+ }
+
+ // Some properties need to go on all helpers as well, version, usage info, etc.
+ const plistsToUpdate = updateIfExists
+ .filter(([key]) => !!this[key])
+ .map(([key]) => key)
+ .concat(['appPlist', 'helperPlist'])
+
+ if (this.loginHelperPlist) {
+ const loginHelperName = common.sanitizeAppName(`${this.appName} Login Helper`)
+ this.loginHelperPlist.CFBundleExecutable = loginHelperName
+ this.loginHelperPlist.CFBundleIdentifier = `${appBundleIdentifier}.loginhelper`
+ this.loginHelperPlist.CFBundleName = loginHelperName
+ }
+
+ if (this.appVersion) {
+ const appVersionString = '' + this.appVersion
+ for (const plistKey of plistsToUpdate) {
+ this[plistKey].CFBundleShortVersionString = this[plistKey].CFBundleVersion = appVersionString
+ }
+ }
+
+ if (this.buildVersion) {
+ const buildVersionString = '' + this.buildVersion
+ for (const plistKey of plistsToUpdate) {
+ this[plistKey].CFBundleVersion = buildVersionString
+ }
+ }
+
+ if (this.opts.protocols && this.opts.protocols.length) {
+ this.appPlist.CFBundleURLTypes = this.protocols
+ }
+
+ if (this.appCategoryType) {
+ this.appPlist.LSApplicationCategoryType = this.appCategoryType
+ }
+
+ if (this.appCopyright) {
+ this.appPlist.NSHumanReadableCopyright = this.appCopyright
+ }
+
+ if (this.enableDarkMode) {
+ this.appPlist.NSRequiresAquaSystemAppearance = false
+ }
+
+ if (this.usageDescription) {
+ for (const [type, description] of Object.entries(this.usageDescription)) {
+ const usageTypeKey = `NS${type}UsageDescription`
+ for (const plistKey of plistsToUpdate) {
+ this[plistKey][usageTypeKey] = description
+ }
+ this.appPlist[usageTypeKey] = description
+ }
+ }
+
+ await Promise.all(plists.map(([filename, varName]) =>
+ fs.writeFile(filename, plist.build(this[varName]))))
+ }
+
+ async moveHelpers () {
+ const helpers = [' Helper', ' Helper EH', ' Helper NP', ' Helper (Renderer)', ' Helper (Plugin)', ' Helper (GPU)']
+ await Promise.all(helpers.map(suffix => this.moveHelper(this.frameworksPath, suffix)))
+ if (await fs.pathExists(this.loginItemsPath)) {
+ await this.moveHelper(this.loginItemsPath, ' Login Helper')
+ }
+ }
+
+ async moveHelper (helperDirectory, suffix) {
+ const originalBasename = `Electron${suffix}`
+
+ if (await fs.pathExists(path.join(helperDirectory, `${originalBasename}.app`))) {
+ return this.renameHelperAndExecutable(
+ helperDirectory,
+ originalBasename,
+ `${common.sanitizeAppName(this.appName)}${suffix}`
+ )
+ } else {
+ return Promise.resolve()
+ }
+ }
+
+ async renameHelperAndExecutable (helperDirectory, originalBasename, newBasename) {
+ const originalAppname = `${originalBasename}.app`
+ const executableBasePath = path.join(helperDirectory, originalAppname, 'Contents', 'MacOS')
+ await this.relativeRename(executableBasePath, originalBasename, newBasename)
+ await this.relativeRename(helperDirectory, originalAppname, `${newBasename}.app`)
+ }
+
+ async copyIcon () {
+ if (!this.opts.icon) {
+ return Promise.resolve()
+ }
+
+ let icon
+
+ try {
+ icon = await this.normalizeIconExtension('.icns')
+ } catch {
+ // Ignore error if icon doesn't exist, in case it's only available for other OSes
+ /* istanbul ignore next */
+ return Promise.resolve()
+ }
+ if (icon) {
+ debug(`Copying icon "${icon}" to app's Resources as "${this.appPlist.CFBundleIconFile}"`)
+ await fs.copy(icon, path.join(this.originalResourcesDir, this.appPlist.CFBundleIconFile))
+ }
+ }
+
+ async renameAppAndHelpers () {
+ await this.moveHelpers()
+ await fs.rename(this.electronAppPath, this.renamedAppPath)
+ }
+
+ async signAppIfSpecified () {
+ const osxSignOpt = this.opts.osxSign
+ const platform = this.opts.platform
+ const version = this.opts.electronVersion
+
+ if ((platform === 'all' || platform === 'mas') &&
+ osxSignOpt === undefined) {
+ common.warning('signing is required for mas builds. Provide the osx-sign option, ' +
+ 'or manually sign the app later.')
+ }
+
+ if (osxSignOpt) {
+ const signOpts = createSignOpts(osxSignOpt, platform, this.renamedAppPath, version, this.opts.osxNotarize, this.opts.quiet)
+ debug(`Running electron-osx-sign with the options ${JSON.stringify(signOpts)}`)
+ try {
+ await signAsync(signOpts)
+ } catch (err) {
+ // Although not signed successfully, the application is packed.
+ common.warning(`Code sign failed; please retry manually. ${err}`)
+ }
+ }
+ }
+
+ async notarizeAppIfSpecified () {
+ const osxNotarizeOpt = this.opts.osxNotarize
+
+ /* istanbul ignore if */
+ if (osxNotarizeOpt) {
+ const notarizeOpts = createNotarizeOpts(
+ osxNotarizeOpt,
+ this.bundleName,
+ this.renamedAppPath,
+ this.opts.quiet
+ )
+ if (notarizeOpts) {
+ return notarize(notarizeOpts)
+ }
+ }
+ }
+
+ async create () {
+ await this.initialize()
+ await this.updatePlistFiles()
+ await this.copyIcon()
+ await this.renameElectron()
+ await this.renameAppAndHelpers()
+ await this.copyExtraResources()
+ await this.signAppIfSpecified()
+ await this.notarizeAppIfSpecified()
+ return this.move()
+ }
+}
+
+/**
+ * Remove special characters and allow only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.)
+ * Apple documentation:
+ * https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070
+ */
+function filterCFBundleIdentifier (identifier) {
+ return identifier.replace(/ /g, '-').replace(/[^a-zA-Z0-9.-]/g, '')
+}
+
+function createSignOpts (properties, platform, app, version, notarize, quiet) {
+ // use default sign opts if osx-sign is true, otherwise clone osx-sign object
+ const signOpts = properties === true ? { identity: null } : { ...properties }
+
+ // osx-sign options are handed off to sign module, but
+ // with a few additions from the main options
+ // user may think they can pass platform, app, or version, but they will be ignored
+ common.subOptionWarning(signOpts, 'osx-sign', 'platform', platform, quiet)
+ common.subOptionWarning(signOpts, 'osx-sign', 'app', app, quiet)
+ common.subOptionWarning(signOpts, 'osx-sign', 'version', version, quiet)
+
+ if (signOpts.binaries) {
+ common.warning('osx-sign.binaries is not an allowed sub-option. Not passing to electron-osx-sign.')
+ delete signOpts.binaries
+ }
+
+ // Take argument osx-sign as signing identity:
+ // if opts.osxSign is true (bool), fallback to identity=null for
+ // autodiscovery. Otherwise, provide signing certificate info.
+ if (signOpts.identity === true) {
+ signOpts.identity = null
+ }
+
+ if (notarize && !signOpts.hardenedRuntime && !signOpts['hardened-runtime']) {
+ common.warning('notarization is enabled but hardenedRuntime was not enabled in the signing ' +
+ 'options. It has been enabled for you but you should enable it in your config.')
+ signOpts.hardenedRuntime = true
+ }
+
+ return signOpts
+}
+
+function createNotarizeOpts (properties, appBundleId, appPath, quiet) {
+ // osxNotarize options are handed off to the electron-notarize module, but with a few
+ // additions from the main options. The user may think they can pass bundle ID or appPath,
+ // but they will be ignored.
+ if (properties.tool !== 'notarytool') {
+ common.subOptionWarning(properties, 'osxNotarize', 'appBundleId', appBundleId, quiet)
+ }
+ common.subOptionWarning(properties, 'osxNotarize', 'appPath', appPath, quiet)
+ return properties
+}
+
+module.exports = {
+ App: MacApp,
+ createNotarizeOpts: createNotarizeOpts,
+ createSignOpts: createSignOpts,
+ filterCFBundleIdentifier: filterCFBundleIdentifier
+}
diff --git a/node_modules/electron-packager/src/platform.js b/node_modules/electron-packager/src/platform.js
new file mode 100644
index 0000000..9489e3d
--- /dev/null
+++ b/node_modules/electron-packager/src/platform.js
@@ -0,0 +1,238 @@
+'use strict'
+
+const asar = require('asar')
+const crypto = require('crypto')
+const debug = require('debug')('electron-packager')
+const fs = require('fs-extra')
+const path = require('path')
+
+const common = require('./common')
+const copyFilter = require('./copy-filter')
+const hooks = require('./hooks')
+
+class App {
+ constructor (opts, templatePath) {
+ this.opts = opts
+ this.templatePath = templatePath
+ this.asarOptions = common.createAsarOpts(opts)
+
+ if (this.opts.prune === undefined) {
+ this.opts.prune = true
+ }
+ }
+
+ /**
+ * Resource directory path before renaming.
+ */
+ get originalResourcesDir () {
+ return this.resourcesDir
+ }
+
+ /**
+ * Resource directory path after renaming.
+ */
+ get resourcesDir () {
+ return path.join(this.stagingPath, 'resources')
+ }
+
+ get originalResourcesAppDir () {
+ return path.join(this.originalResourcesDir, 'app')
+ }
+
+ get electronBinaryDir () {
+ return this.stagingPath
+ }
+
+ get originalElectronName () {
+ /* istanbul ignore next */
+ throw new Error('Child classes must implement this')
+ }
+
+ get newElectronName () {
+ /* istanbul ignore next */
+ throw new Error('Child classes must implement this')
+ }
+
+ get executableName () {
+ return this.opts.executableName || this.opts.name
+ }
+
+ get stagingPath () {
+ if (this.opts.tmpdir === false) {
+ return common.generateFinalPath(this.opts)
+ } else {
+ return path.join(
+ common.baseTempDir(this.opts),
+ `${this.opts.platform}-${this.opts.arch}`,
+ common.generateFinalBasename(this.opts)
+ )
+ }
+ }
+
+ get appAsarPath () {
+ return path.join(this.originalResourcesDir, 'app.asar')
+ }
+
+ async relativeRename (basePath, oldName, newName) {
+ debug(`Renaming ${oldName} to ${newName} in ${basePath}`)
+ await fs.rename(path.join(basePath, oldName), path.join(basePath, newName))
+ }
+
+ async renameElectron () {
+ return this.relativeRename(this.electronBinaryDir, this.originalElectronName, this.newElectronName)
+ }
+
+ /**
+ * Performs the following initial operations for an app:
+ * * Creates temporary directory
+ * * Remove default_app (which is either a folder or an asar file)
+ * * If a prebuilt asar is specified:
+ * * Copies asar into temporary directory as app.asar
+ * * Otherwise:
+ * * Copies template into temporary directory
+ * * Copies user's app into temporary directory
+ * * Prunes non-production node_modules (if opts.prune is either truthy or undefined)
+ * * Creates an asar (if opts.asar is set)
+ *
+ * Prune and asar are performed before platform-specific logic, primarily so that
+ * this.originalResourcesAppDir is predictable (e.g. before .app is renamed for Mac)
+ */
+ async initialize () {
+ debug(`Initializing app in ${this.stagingPath} from ${this.templatePath} template`)
+
+ await fs.move(this.templatePath, this.stagingPath, { clobber: true })
+ await this.removeDefaultApp()
+ if (this.opts.prebuiltAsar) {
+ await this.copyPrebuiltAsar()
+ } else {
+ await this.buildApp()
+ }
+ }
+
+ async buildApp () {
+ await this.copyTemplate()
+ await common.validateElectronApp(this.opts.dir, this.originalResourcesAppDir)
+ await this.asarApp()
+ }
+
+ async copyTemplate () {
+ const hookArgs = [
+ this.originalResourcesAppDir,
+ this.opts.electronVersion,
+ this.opts.platform,
+ this.opts.arch
+ ]
+
+ await fs.copy(this.opts.dir, this.originalResourcesAppDir, {
+ filter: copyFilter.userPathFilter(this.opts),
+ dereference: this.opts.derefSymlinks
+ })
+ await hooks.promisifyHooks(this.opts.afterCopy, hookArgs)
+ if (this.opts.prune) {
+ await hooks.promisifyHooks(this.opts.afterPrune, hookArgs)
+ }
+ }
+
+ async removeDefaultApp () {
+ await Promise.all(['default_app', 'default_app.asar'].map(async basename => fs.remove(path.join(this.originalResourcesDir, basename))))
+ }
+
+ /**
+ * Forces an icon filename to a given extension and returns the normalized filename,
+ * if it exists. Otherwise, returns null.
+ *
+ * This error path is used by win32 if no icon is specified.
+ */
+ async normalizeIconExtension (targetExt) {
+ if (!this.opts.icon) throw new Error('No filename specified to normalizeIconExtension')
+
+ let iconFilename = this.opts.icon
+ const ext = path.extname(iconFilename)
+ if (ext !== targetExt) {
+ iconFilename = path.join(path.dirname(iconFilename), path.basename(iconFilename, ext) + targetExt)
+ }
+
+ if (await fs.pathExists(iconFilename)) {
+ return iconFilename
+ } else {
+ /* istanbul ignore next */
+ common.warning(`Could not find icon "${iconFilename}", not updating app icon`)
+ }
+ }
+
+ prebuiltAsarWarning (option, triggerWarning) {
+ if (triggerWarning) {
+ common.warning(`prebuiltAsar and ${option} are incompatible, ignoring the ${option} option`)
+ }
+ }
+
+ async copyPrebuiltAsar () {
+ if (this.asarOptions) {
+ common.warning('prebuiltAsar has been specified, all asar options will be ignored')
+ }
+
+ for (const hookName of ['afterCopy', 'afterPrune']) {
+ if (this.opts[hookName]) {
+ throw new Error(`${hookName} is incompatible with prebuiltAsar`)
+ }
+ }
+
+ this.prebuiltAsarWarning('ignore', this.opts.originalIgnore)
+ this.prebuiltAsarWarning('prune', !this.opts.prune)
+ this.prebuiltAsarWarning('derefSymlinks', this.opts.derefSymlinks !== undefined)
+
+ const src = path.resolve(this.opts.prebuiltAsar)
+
+ const stat = await fs.stat(src)
+ if (!stat.isFile()) {
+ throw new Error(`${src} specified in prebuiltAsar must be an asar file.`)
+ }
+
+ debug(`Copying asar: ${src} to ${this.appAsarPath}`)
+ await fs.copy(src, this.appAsarPath, { overwrite: false, errorOnExist: true })
+ }
+
+ appRelativePath (p) {
+ return path.relative(this.stagingPath, p)
+ }
+
+ async asarApp () {
+ if (!this.asarOptions) {
+ return Promise.resolve()
+ }
+
+ debug(`Running asar with the options ${JSON.stringify(this.asarOptions)}`)
+ await asar.createPackageWithOptions(this.originalResourcesAppDir, this.appAsarPath, this.asarOptions)
+ const { headerString } = asar.getRawHeader(this.appAsarPath)
+ this.asarIntegrity = {
+ [this.appRelativePath(this.appAsarPath)]: {
+ algorithm: 'SHA256',
+ hash: crypto.createHash('SHA256').update(headerString).digest('hex')
+ }
+ }
+ await fs.remove(this.originalResourcesAppDir)
+ }
+
+ async copyExtraResources () {
+ if (!this.opts.extraResource) return Promise.resolve()
+
+ const extraResources = common.ensureArray(this.opts.extraResource)
+
+ await Promise.all(extraResources.map(
+ resource => fs.copy(resource, path.resolve(this.stagingPath, this.resourcesDir, path.basename(resource)))
+ ))
+ }
+
+ async move () {
+ const finalPath = common.generateFinalPath(this.opts)
+
+ if (this.opts.tmpdir !== false) {
+ debug(`Moving ${this.stagingPath} to ${finalPath}`)
+ await fs.move(this.stagingPath, finalPath)
+ }
+
+ return finalPath
+ }
+}
+
+module.exports = App
diff --git a/node_modules/electron-packager/src/prune.js b/node_modules/electron-packager/src/prune.js
new file mode 100644
index 0000000..e5739ef
--- /dev/null
+++ b/node_modules/electron-packager/src/prune.js
@@ -0,0 +1,68 @@
+'use strict'
+
+const common = require('./common')
+const galactus = require('galactus')
+const fs = require('fs-extra')
+const path = require('path')
+
+const ELECTRON_MODULES = [
+ 'electron',
+ 'electron-prebuilt',
+ 'electron-prebuilt-compile'
+]
+
+class Pruner {
+ constructor (dir) {
+ this.baseDir = common.normalizePath(dir)
+ this.galactus = new galactus.DestroyerOfModules({
+ rootDirectory: dir,
+ shouldKeepModuleTest: (module, isDevDep) => this.shouldKeepModule(module, isDevDep)
+ })
+ this.walkedTree = false
+ }
+
+ setModules (moduleMap) {
+ const modulePaths = Array.from(moduleMap.keys()).map(modulePath => `/${common.normalizePath(modulePath)}`)
+ this.modules = new Set(modulePaths)
+ this.walkedTree = true
+ }
+
+ async pruneModule (name) {
+ if (this.walkedTree) {
+ return this.isProductionModule(name)
+ } else {
+ const moduleMap = await this.galactus.collectKeptModules({ relativePaths: true })
+ this.setModules(moduleMap)
+ return this.isProductionModule(name)
+ }
+ }
+
+ shouldKeepModule (module, isDevDep) {
+ if (isDevDep || module.depType === galactus.DepType.ROOT) {
+ return false
+ }
+
+ if (ELECTRON_MODULES.includes(module.name)) {
+ common.warning(`Found '${module.name}' but not as a devDependency, pruning anyway`)
+ return false
+ }
+
+ return true
+ }
+
+ isProductionModule (name) {
+ return this.modules.has(name)
+ }
+}
+
+function isNodeModuleFolder (pathToCheck) {
+ return path.basename(path.dirname(pathToCheck)) === 'node_modules' ||
+ (path.basename(path.dirname(pathToCheck)).startsWith('@') && path.basename(path.resolve(pathToCheck, `..${path.sep}..`)) === 'node_modules')
+}
+
+module.exports = {
+ isModule: async function isModule (pathToCheck) {
+ return (await fs.pathExists(path.join(pathToCheck, 'package.json'))) && isNodeModuleFolder(pathToCheck)
+ },
+ Pruner: Pruner
+}
diff --git a/node_modules/electron-packager/src/targets.js b/node_modules/electron-packager/src/targets.js
new file mode 100644
index 0000000..39b50dd
--- /dev/null
+++ b/node_modules/electron-packager/src/targets.js
@@ -0,0 +1,148 @@
+'use strict'
+
+const common = require('./common')
+const { getHostArch } = require('@electron/get')
+const semver = require('semver')
+
+const officialArchs = ['ia32', 'x64', 'armv7l', 'arm64', 'mips64el', 'universal']
+const officialPlatforms = ['darwin', 'linux', 'mas', 'win32']
+const officialPlatformArchCombos = {
+ darwin: ['x64', 'arm64', 'universal'],
+ linux: ['ia32', 'x64', 'armv7l', 'arm64', 'mips64el'],
+ mas: ['x64', 'arm64', 'universal'],
+ win32: ['ia32', 'x64', 'arm64']
+}
+
+const buildVersions = {
+ darwin: {
+ arm64: '>= 11.0.0-beta.1',
+ universal: '>= 11.0.0-beta.1'
+ },
+ linux: {
+ arm64: '>= 1.8.0',
+ mips64el: '^1.8.2-beta.5'
+ },
+ mas: {
+ arm64: '>= 11.0.0-beta.1',
+ universal: '>= 11.0.0-beta.1'
+ },
+ win32: {
+ arm64: '>= 6.0.8'
+ }
+}
+
+// Maps to module filename for each platform (lazy-required if used)
+const osModules = {
+ darwin: './mac',
+ linux: './linux',
+ mas: './mac', // map to darwin
+ win32: './win32'
+}
+
+const supported = {
+ arch: new Set(officialArchs),
+ platform: new Set(officialPlatforms)
+}
+
+function createPlatformArchPairs (opts, selectedPlatforms, selectedArchs, ignoreFunc) {
+ const combinations = []
+ for (const arch of selectedArchs) {
+ for (const platform of selectedPlatforms) {
+ if (usingOfficialElectronPackages(opts)) {
+ if (!validOfficialPlatformArch(opts, platform, arch)) {
+ warnIfAllNotSpecified(opts, `The platform/arch combination ${platform}/${arch} is not currently supported by Electron Packager`)
+ continue
+ } else if (buildVersions[platform] && buildVersions[platform][arch]) {
+ const buildVersion = buildVersions[platform][arch]
+ if (buildVersion && !officialBuildExists(opts, buildVersion)) {
+ warnIfAllNotSpecified(opts, `Official ${platform}/${arch} support only exists in Electron ${buildVersion}`)
+ continue
+ }
+ }
+ if (typeof ignoreFunc === 'function' && ignoreFunc(platform, arch)) continue
+ }
+ combinations.push([platform, arch])
+ }
+ }
+
+ return combinations
+}
+
+function unsupportedListOption (name, value, supported) {
+ return new Error(`Unsupported ${name}=${value} (${typeof value}); must be a string matching: ${Array.from(supported.values()).join(', ')}`)
+}
+
+function usingOfficialElectronPackages (opts) {
+ return !opts.download || !Object.prototype.hasOwnProperty.call(opts.download, 'mirrorOptions')
+}
+
+function validOfficialPlatformArch (opts, platform, arch) {
+ return officialPlatformArchCombos[platform] && officialPlatformArchCombos[platform].includes(arch)
+}
+
+function officialBuildExists (opts, buildVersion) {
+ return semver.satisfies(opts.electronVersion, buildVersion, { includePrerelease: true })
+}
+
+function allPlatformsOrArchsSpecified (opts) {
+ return opts.all || opts.arch === 'all' || opts.platform === 'all'
+}
+
+function warnIfAllNotSpecified (opts, message) {
+ if (!allPlatformsOrArchsSpecified(opts)) {
+ common.warning(message)
+ }
+}
+
+module.exports = {
+ allOfficialArchsForPlatformAndVersion: function allOfficialArchsForPlatformAndVersion (platform, electronVersion) {
+ const archs = officialPlatformArchCombos[platform]
+ if (buildVersions[platform]) {
+ const excludedArchs = Object.keys(buildVersions[platform])
+ .filter(arch => !officialBuildExists({ electronVersion: electronVersion }, buildVersions[platform][arch]))
+ return archs.filter(arch => !excludedArchs.includes(arch))
+ }
+
+ return archs
+ },
+ createPlatformArchPairs,
+ officialArchs,
+ officialPlatformArchCombos,
+ officialPlatforms,
+ osModules,
+ supported,
+ // Validates list of architectures or platforms.
+ // Returns a normalized array if successful, or throws an Error.
+ validateListFromOptions: function validateListFromOptions (opts, name) {
+ if (opts.all) return Array.from(supported[name].values())
+
+ let list = opts[name]
+ if (!list) {
+ if (name === 'arch') {
+ list = getHostArch()
+ } else {
+ list = process[name]
+ }
+ } else if (list === 'all') {
+ return Array.from(supported[name].values())
+ }
+
+ if (!Array.isArray(list)) {
+ if (typeof list === 'string') {
+ list = list.split(/,\s*/)
+ } else {
+ return unsupportedListOption(name, list, supported[name])
+ }
+ }
+
+ const officialElectronPackages = usingOfficialElectronPackages(opts)
+
+ for (const value of list) {
+ if (officialElectronPackages && !supported[name].has(value)) {
+ return unsupportedListOption(name, value, supported[name])
+ }
+ }
+
+ return list
+ }
+}
diff --git a/node_modules/electron-packager/src/universal.js b/node_modules/electron-packager/src/universal.js
new file mode 100644
index 0000000..8ae7cb1
--- /dev/null
+++ b/node_modules/electron-packager/src/universal.js
@@ -0,0 +1,80 @@
+'use strict'
+
+const universal = require('@electron/universal')
+const common = require('./common')
+const fs = require('fs-extra')
+const path = require('path')
+
+async function packageUniversalMac (packageForPlatformAndArchWithOpts, buildDir, comboOpts, downloadOpts, tempBase) {
+ // In order to generate a universal macOS build we actually need to build the x64 and the arm64 app
+ // and then glue them together
+ common.info(`Packaging app for platform ${comboOpts.platform} universal using electron v${comboOpts.electronVersion} - Building x64 and arm64 slices now`, comboOpts.quiet)
+ await fs.mkdirp(tempBase)
+ const tempDir = await fs.mkdtemp(path.resolve(tempBase, 'electron-packager-universal-'))
+
+ const { App } = require('./mac')
+ const app = new App(comboOpts, buildDir)
+ const universalStagingPath = app.stagingPath
+ const finalUniversalPath = common.generateFinalPath(app.opts)
+
+ if (await fs.pathExists(finalUniversalPath)) {
+ if (comboOpts.overwrite) {
+ await fs.remove(finalUniversalPath)
+ } else {
+ common.info(`Skipping ${comboOpts.platform} ${comboOpts.arch} (output dir already exists, use --overwrite to force)`, comboOpts.quiet)
+ return true
+ }
+ }
+
+ const tempPackages = {}
+
+ for (const tempArch of ['x64', 'arm64']) {
+ const tempOpts = {
+ ...comboOpts,
+ arch: tempArch,
+ out: tempDir
+ }
+ const tempDownloadOpts = {
+ ...downloadOpts,
+ arch: tempArch
+ }
+ // Do not sign or notarize the individual slices, we sign and notarize the merged app later
+ delete tempOpts.osxSign
+ delete tempOpts.osxNotarize
+
+ tempPackages[tempArch] = await packageForPlatformAndArchWithOpts(tempOpts, tempDownloadOpts)
+ }
+
+ const x64AppPath = tempPackages.x64
+ const arm64AppPath = tempPackages.arm64
+
+ common.info(`Stitching universal app for platform ${comboOpts.platform}`, comboOpts.quiet)
+
+ const generatedFiles = await fs.readdir(x64AppPath)
+ const appName = generatedFiles.filter(file => path.extname(file) === '.app')[0]
+
+ await universal.makeUniversalApp({
+ ...comboOpts.osxUniversal,
+ x64AppPath: path.resolve(x64AppPath, appName),
+ arm64AppPath: path.resolve(arm64AppPath, appName),
+ outAppPath: path.resolve(universalStagingPath, appName)
+ })
+
+ await app.signAppIfSpecified()
+ await app.notarizeAppIfSpecified()
+ await app.move()
+
+ for (const generatedFile of generatedFiles) {
+ if (path.extname(generatedFile) === '.app') continue
+
+ await fs.copy(path.resolve(x64AppPath, generatedFile), path.resolve(finalUniversalPath, generatedFile))
+ }
+
+ await fs.remove(tempDir)
+
+ return finalUniversalPath
+}
+
+module.exports = {
+ packageUniversalMac
+}
diff --git a/node_modules/electron-packager/src/unzip.js b/node_modules/electron-packager/src/unzip.js
new file mode 100644
index 0000000..705c552
--- /dev/null
+++ b/node_modules/electron-packager/src/unzip.js
@@ -0,0 +1,7 @@
+'use strict'
+
+const extractZip = require('extract-zip')
+
+module.exports = async function extractElectronZip (zipPath, targetDir) {
+ await extractZip(zipPath, { dir: targetDir })
+}
diff --git a/node_modules/electron-packager/src/win32.js b/node_modules/electron-packager/src/win32.js
new file mode 100644
index 0000000..9416617
--- /dev/null
+++ b/node_modules/electron-packager/src/win32.js
@@ -0,0 +1,113 @@
+'use strict'
+
+const debug = require('debug')('electron-packager')
+const path = require('path')
+const { WrapperError } = require('cross-spawn-windows-exe')
+
+const App = require('./platform')
+const common = require('./common')
+
+function updateWineMissingException (err) {
+ if (err instanceof WrapperError) {
+ err.message += '\n\n' +
+ 'Wine is required to use the appCopyright, appVersion, buildVersion, icon, and \n' +
+ 'win32metadata parameters for Windows targets.\n\n' +
+ 'See https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms for details.'
+ }
+
+ return err
+}
+
+class WindowsApp extends App {
+ get originalElectronName () {
+ return 'electron.exe'
+ }
+
+ get newElectronName () {
+ return `${common.sanitizeAppName(this.executableName)}.exe`
+ }
+
+ get electronBinaryPath () {
+ return path.join(this.stagingPath, this.newElectronName)
+ }
+
+ generateRceditOptionsSansIcon () {
+ const win32metadata = {
+ FileDescription: this.opts.name,
+ InternalName: this.opts.name,
+ OriginalFilename: this.newElectronName,
+ ProductName: this.opts.name,
+ ...this.opts.win32metadata
+ }
+
+ const rcOpts = { 'version-string': win32metadata }
+
+ if (this.opts.appVersion) {
+ rcOpts['product-version'] = rcOpts['file-version'] = this.opts.appVersion
+ }
+
+ if (this.opts.buildVersion) {
+ rcOpts['file-version'] = this.opts.buildVersion
+ }
+
+ if (this.opts.appCopyright) {
+ rcOpts['version-string'].LegalCopyright = this.opts.appCopyright
+ }
+
+ const manifestProperties = ['application-manifest', 'requested-execution-level']
+ for (const manifestProperty of manifestProperties) {
+ if (win32metadata[manifestProperty]) {
+ rcOpts[manifestProperty] = win32metadata[manifestProperty]
+ }
+ }
+
+ return rcOpts
+ }
+
+ async getIconPath () {
+ if (!this.opts.icon) {
+ return Promise.resolve()
+ }
+
+ return this.normalizeIconExtension('.ico')
+ }
+
+ needsRcedit () {
+ return this.opts.icon || this.opts.win32metadata || this.opts.appCopyright || this.opts.appVersion || this.opts.buildVersion
+ }
+
+ async runRcedit () {
+ /* istanbul ignore if */
+ if (!this.needsRcedit()) {
+ return Promise.resolve()
+ }
+
+ const rcOpts = this.generateRceditOptionsSansIcon()
+
+ // Icon might be omitted or only exist in one OS's format, so skip it if normalizeExt reports an error
+ const icon = await this.getIconPath()
+ if (icon) {
+ rcOpts.icon = icon
+ }
+
+ debug(`Running rcedit with the options ${JSON.stringify(rcOpts)}`)
+ try {
+ await require('rcedit')(this.electronBinaryPath, rcOpts)
+ } catch (err) {
+ throw updateWineMissingException(err)
+ }
+ }
+
+ async create () {
+ await this.initialize()
+ await this.renameElectron()
+ await this.copyExtraResources()
+ await this.runRcedit()
+ return this.move()
+ }
+}
+
+module.exports = {
+ App: WindowsApp,
+ updateWineMissingException: updateWineMissingException
+}
diff --git a/node_modules/electron-packager/usage.txt b/node_modules/electron-packager/usage.txt
new file mode 100644
index 0000000..c0ff945
--- /dev/null
+++ b/node_modules/electron-packager/usage.txt
@@ -0,0 +1,124 @@
+Usage: electron-packager <sourcedir> <appname> [options...]
+
+Required parameters
+
+sourcedir the base directory of the application source
+
+ Examples: electron-packager ./
+ electron-packager ./ --all
+
+Optional parameters
+
+appname the name of the app, if it needs to be different from the "productName" or "name"
+ in the nearest package.json
+
+Options
+
+version prints the version of Electron Packager and Node, plus the target platform and
+ arch, for bug reporting purposes, and exits immediately
+
+* All platforms *
+
+all equivalent to --platform=all --arch=all
+app-copyright human-readable copyright line for the app
+app-version release version to set for the app
+arch all, or one or more of: ia32, x64, armv7l, arm64, mips64el, universal (comma-delimited if
+ multiple). Defaults to the host arch.
+ For info on arch/platform support see https://github.com/electron/electron-packager/#supported-platforms
+asar whether to package the source code within your app into an archive. You can either
+ pass --asar by itself to use the default configuration, OR use dot notation to
+ configure a list of sub-properties, e.g. --asar.unpackDir=sub_dir - do not use
+ --asar and its sub-properties simultaneously.
+
+ Properties supported include:
+ - ordering: path to an ordering file for file packing
+ - unpack: unpacks the files to the app.asar.unpacked directory whose filenames
+ regex .match this string
+ - unpackDir: unpacks the dir to the app.asar.unpacked directory whose names glob
+ pattern or exactly match this string. It's relative to the <sourcedir>.
+build-version build version to set for the app
+download a list of sub-options to pass to @electron/get. They are specified via dot
+ notation, e.g., --download.cacheRoot=/tmp/cache
+ Properties supported:
+ - cacheRoot: directory of cached Electron downloads. For default value, see
+ @electron/get documentation
+ - mirrorOptions: alternate URL options for downloading Electron zips. See
+ @electron/get documentation for details
+ - rejectUnauthorized: whether SSL certs are required to be valid when downloading
+ Electron. Defaults to true, use --no-download.rejectUnauthorized to disable
+ checks.
+electron-version the version of Electron that is being packaged, see
+ https://github.com/electron/electron/releases
+electron-zip-dir the local path to a directory containing Electron ZIP files
+executable-name the name of the executable file, sans file extension. Defaults to appname
+extra-resource a file to copy into the app's resources directory
+icon the local path to an icon file to use as the icon for the app.
+ Note: Format depends on platform.
+ignore do not copy files into app whose filenames RegExp.match this string. See also:
+ https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#ignore
+ and --no-prune. Can be specified multiple times
+no-deref-symlinks make sure symlinks are not dereferenced within the app source
+no-junk do not ignore system junk files from the packaged app
+no-prune do not prune devDependencies from the packaged app
+out the dir to put the app into at the end. Defaults to current working dir
+overwrite if output directory for a platform already exists, replaces it rather than
+ skipping it
+platform all, or one or more of: darwin, linux, mas, win32 (comma-delimited if multiple).
+ Defaults to the host platform
+prebuilt-asar path to a prebuilt asar file (asar, ignore, no-prune, and no-deref-symlinks
+ options are incompatible with this option and will be ignored)
+quiet Do not print informational or warning messages
+tmpdir temp directory. Defaults to system temp directory, use --no-tmpdir to disable
+ use of a temporary directory.
+
+* darwin/mas target platforms only *
+
+app-bundle-id bundle identifier to use in the app plist
+app-category-type the application category type
+ For example, `app-category-type=public.app-category.developer-tools` will set the
+ application category to 'Developer Tools'.
+darwin-dark-mode-support
+ forces support for Mojave/10.14 dark mode in the packaged app
+extend-info a plist file to merge into the app plist
+helper-bundle-id bundle identifier to use in the app helper plist
+osx-sign (macOS host platform only) Whether to sign the macOS app packages. You can either
+ pass --osx-sign by itself to use the default configuration, or use dot notation
+ to configure a list of sub-properties, e.g. --osx-sign.identity="My Name"
+ For info on supported values see https://npm.im/electron-osx-sign#opts---options
+ Properties supported include:
+ - identity: should contain the identity to be used when running `codesign`
+ - entitlements: the path to entitlements used in signing
+ - entitlements-inherit: the path to the 'child' entitlements
+osx-notarize (macOS host platform only, requires --osx-sign) Whether to notarize the macOS app
+ packages. You must use dot notation to configure a list of sub-properties, e.g.
+ --osx-notarize.appleId="foo@example.com"
+ For info on supported values see https://npm.im/electron-notarize#method-notarizeopts-promisevoid
+ Properties supported include:
+ - appleId: should contain your apple ID username / email
+ - appleIdPassword: should contain the password for the provided apple ID
+ - appleApiKey: should contain an App Store Connect API key
+ - appleApiIssuer: should contain the API key's issuer
+protocol URL protocol scheme to register the app as an opener of.
+ For example, `--protocol=myapp` would register the app to open
+ URLs such as `myapp://path`. This argument requires a `--protocol-name`
+ argument to also be specified.
+protocol-name Descriptive name of URL protocol scheme specified via `--protocol`
+usage-description Human-readable descriptions of how the app uses certain macOS features. Displayed
+ in the App Store. A non-exhaustive list of properties supported:
+ - Camera
+ - Microphone
+
+* win32 target platform only *
+
+win32metadata a list of sub-properties used to set the application metadata embedded into
+ the executable. They are specified via dot notation,
+ e.g. --win32metadata.CompanyName="Company Inc."
+ or --win32metadata.ProductName="Product"
+ Properties supported:
+ - CompanyName (default: author name from nearest package.json)
+ - FileDescription (default: appname)
+ - OriginalFilename (default: renamed exe)
+ - ProductName (default: appname)
+ - InternalName (default: appname)
+ - requested-execution-level (user, asInvoker, or requireAdministrator)
+ - application-manifest
diff --git a/node_modules/electron/LICENSE b/node_modules/electron/LICENSE
new file mode 100644
index 0000000..7a40eac
--- /dev/null
+++ b/node_modules/electron/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013-2018 GitHub Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/electron/README.md b/node_modules/electron/README.md
new file mode 100644
index 0000000..5842ba5
--- /dev/null
+++ b/node_modules/electron/README.md
@@ -0,0 +1,104 @@
+[![Electron Logo](https://electronjs.org/images/electron-logo.svg)](https://electronjs.org)
+
+
+[![CircleCI Build Status](https://circleci.com/gh/electron/electron/tree/master.svg?style=shield)](https://circleci.com/gh/electron/electron/tree/master)
+[![AppVeyor Build Status](https://windows-ci.electronjs.org/api/projects/status/nilyf07hcef14dvj/branch/master?svg=true)](https://windows-ci.electronjs.org/project/AppVeyor/electron/branch/master)
+[![devDependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron?type=dev)
+[![Join the Electron Community on Slack](https://atom-slack.herokuapp.com/badge.svg)](https://atom-slack.herokuapp.com/)
+
+:memo: Available Translations: 🇨🇳 🇹🇼 🇧🇷 🇪🇸 🇰🇷 🇯🇵 🇷🇺 🇫🇷 🇹🇭 🇳🇱 🇹🇷 🇮🇩 🇺🇦 🇨🇿 🇮🇹.
+View these docs in other languages at [electron/i18n](https://github.com/electron/i18n/tree/master/content/).
+
+The Electron framework lets you write cross-platform desktop applications
+using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
+[Chromium](https://www.chromium.org) and is used by the [Atom
+editor](https://github.com/atom/atom) and many other [apps](https://electronjs.org/apps).
+
+Follow [@ElectronJS](https://twitter.com/electronjs) on Twitter for important
+announcements.
+
+This project adheres to the Contributor Covenant
+[code of conduct](https://github.com/electron/electron/tree/master/CODE_OF_CONDUCT.md).
+By participating, you are expected to uphold this code. Please report unacceptable
+behavior to [coc@electronjs.org](mailto:coc@electronjs.org).
+
+## Installation
+
+To install prebuilt Electron binaries, use [`npm`](https://docs.npmjs.com/).
+The preferred method is to install Electron as a development dependency in your
+app:
+
+```sh
+npm install electron --save-dev [--save-exact]
+```
+
+The `--save-exact` flag is recommended for Electron prior to version 2, as it does not follow semantic
+versioning. As of version 2.0.0, Electron follows semver, so you don't need `--save-exact` flag. For info on how to manage Electron versions in your apps, see
+[Electron versioning](docs/tutorial/electron-versioning.md).
+
+For more installation options and troubleshooting tips, see
+[installation](docs/tutorial/installation.md).
+
+## Quick start & Electron Fiddle
+
+Use [`Electron Fiddle`](https://github.com/electron/fiddle)
+to build, run, and package small Electron experiments, to see code examples for all of Electron's APIs, and
+to try out different versions of Electron. It's designed to make the start of your journey with
+Electron easier.
+
+Alternatively, clone and run the
+[electron/electron-quick-start](https://github.com/electron/electron-quick-start)
+repository to see a minimal Electron app in action:
+
+```sh
+git clone https://github.com/electron/electron-quick-start
+cd electron-quick-start
+npm install
+npm start
+```
+
+## Resources for learning Electron
+
+- [electronjs.org/docs](https://electronjs.org/docs) - all of Electron's documentation
+- [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
+- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - a very basic starter Electron app
+- [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - sample starter apps created by the community
+- [electron/simple-samples](https://github.com/electron/simple-samples) - small applications with ideas for taking them further
+- [electron/electron-api-demos](https://github.com/electron/electron-api-demos) - an Electron app that teaches you how to use Electron
+- [hokein/electron-sample-apps](https://github.com/hokein/electron-sample-apps) - small demo apps for the various Electron APIs
+
+## Programmatic usage
+
+Most people use Electron from the command line, but if you require `electron` inside
+your **Node app** (not your Electron app) it will return the file path to the
+binary. Use this to spawn Electron from Node scripts:
+
+```javascript
+const electron = require('electron')
+const proc = require('child_process')
+
+// will print something similar to /Users/maf/.../Electron
+console.log(electron)
+
+// spawn Electron
+const child = proc.spawn(electron)
+```
+
+### Mirrors
+
+- [China](https://npm.taobao.org/mirrors/electron)
+
+## Documentation Translations
+
+Find documentation translations in [electron/i18n](https://github.com/electron/i18n).
+
+## Community
+
+Info on reporting bugs, getting help, finding third-party tools and sample apps,
+and more can be found in the [support document](docs/tutorial/support.md#finding-support).
+
+## License
+
+[MIT](https://github.com/electron/electron/blob/master/LICENSE)
+
+When using the Electron or other GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).
diff --git a/node_modules/electron/cli.js b/node_modules/electron/cli.js
new file mode 100755
index 0000000..92f3b71
--- /dev/null
+++ b/node_modules/electron/cli.js
@@ -0,0 +1,21 @@
+#!/usr/bin/env node
+
+var electron = require('./')
+
+var proc = require('child_process')
+
+var child = proc.spawn(electron, process.argv.slice(2), { stdio: 'inherit', windowsHide: false })
+child.on('close', function (code) {
+ process.exit(code)
+})
+
+const handleTerminationSignal = function (signal) {
+ process.on(signal, function signalHandler () {
+ if (!child.killed) {
+ child.kill(signal)
+ }
+ })
+}
+
+handleTerminationSignal('SIGINT')
+handleTerminationSignal('SIGTERM')
diff --git a/node_modules/electron/dist/LICENSE b/node_modules/electron/dist/LICENSE
new file mode 100644
index 0000000..7a40eac
--- /dev/null
+++ b/node_modules/electron/dist/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013-2018 GitHub Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/electron/dist/LICENSES.chromium.html b/node_modules/electron/dist/LICENSES.chromium.html
new file mode 100644
index 0000000..f048f9c
--- /dev/null
+++ b/node_modules/electron/dist/LICENSES.chromium.html
@@ -0,0 +1,39191 @@
+<!-- Generated by licenses.py; do not edit. --><!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width">
+<title>Credits</title>
+<link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
+<style>
+body {
+ background-color: white;
+ font-size: 84%;
+ max-width: 1020px;
+}
+.page-title {
+ font-size: 164%;
+ font-weight: bold;
+}
+.product {
+ background-color: #c3d9ff;
+ border-radius: 5px;
+ margin-top: 16px;
+ overflow: auto;
+ padding: 2px;
+}
+.product .title {
+ float: left;
+ font-size: 110%;
+ font-weight: bold;
+ margin: 3px;
+}
+.product .homepage {
+ color: blue;
+ float: right;
+ margin: 3px;
+ text-align: right;
+}
+.product .homepage::before {
+ content: " - ";
+}
+.product .show {
+ color: blue;
+ float: right;
+ margin: 3px;
+ text-align: right;
+ text-decoration: underline;
+}
+.licence {
+ background-color: #e8eef7;
+ border-radius: 3px;
+ clear: both;
+ display: none;
+ padding: 16px;
+}
+.licence h3 {
+ margin-top: 0;
+}
+.licence pre {
+ white-space: pre-wrap;
+}
+.dialog #print-link,
+.dialog .homepage {
+ display: none;
+}
+input + label + div {
+ display: none;
+}
+input + label::after {
+ content: "show license";
+ cursor: pointer;
+}
+input:checked + label + div {
+ display: block;
+}
+input:checked + label::after {
+ content: "hide license";
+ cursor: pointer;
+}
+</style>
+</head>
+<body>
+<span class="page-title" style="float:left;">Credits</span>
+<a id="print-link" href="#" style="float:right;" hidden>Print</a>
+<div style="clear:both; overflow:auto;"><!-- Chromium <3s the following projects -->
+<div class="product">
+<span class="title">Abseil</span>
+<span class="homepage"><a href="https://github.com/abseil/abseil-cpp">homepage</a></span>
+<input type="checkbox" hidden id="0">
+<label class="show" for="0" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ </pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Accessibility Audit library, from Accessibility Developer Tools</span>
+<span class="homepage"><a href="https://raw.githubusercontent.com/GoogleChrome/accessibility-developer-tools/master/dist/js/axs_testing.js">homepage</a></span>
+<input type="checkbox" hidden id="1">
+<label class="show" for="1" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Alliance for Open Media Video Codec</span>
+<span class="homepage"><a href="https://aomedia.googlesource.com/aom/">homepage</a></span>
+<input type="checkbox" hidden id="2">
+<label class="show" for="2" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2016, Alliance for Open Media. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Almost Native Graphics Layer Engine</span>
+<span class="homepage"><a href="http://code.google.com/p/angleproject/">homepage</a></span>
+<input type="checkbox" hidden id="3">
+<label class="show" for="3" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2018 The ANGLE Project Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
+// Ltd., nor the names of their contributors may be used to endorse
+// or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">American Fuzzy Lop</span>
+<span class="homepage"><a href="http://lcamtuf.coredump.cx/afl/">homepage</a></span>
+<input type="checkbox" hidden id="4">
+<label class="show" for="4" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android</span>
+<span class="homepage"><a href="http://source.android.com">homepage</a></span>
+<input type="checkbox" hidden id="5">
+<label class="show" for="5" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android bionic libc</span>
+<span class="homepage"><a href="https://android.googlesource.com/platform/bionic/+/master/libc/">homepage</a></span>
+<input type="checkbox" hidden id="6">
+<label class="show" for="6" tabindex="0"></label>
+<div class="licence">
+<pre> Copyright (c) 2014, Linaro Limited
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Linaro nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+ strchr - find a character in a string
+
+ Copyright (c) 2014, ARM Limited
+ All rights Reserved.
+ Copyright (c) 2014, Linaro Ltd.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the company nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+ Copyright (c) 1993 John Brezak
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+====================================================
+Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+
+Developed at SunPro, a Sun Microsystems, Inc. business.
+Permission to use, copy, modify, and distribute this
+software is freely granted, provided that this notice
+is preserved.
+
+-------------------------------------------------------------------
+
+Based on the UCB version with the ID appearing below.
+This is ANSIish only when "multibyte character == plain character".
+
+Copyright (c) 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC")
+Copyright (C) 1995-1999, 2001, 2003 Internet Software Consortium.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC")
+Copyright (C) 1997-2001 Internet Software Consortium.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2006 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2006 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2008 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2008 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2008 The Android Open Source Project
+All rights reserved.
+Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2009 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2010 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2010 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2010 The Android Open Source Project
+Copyright (c) 2008 ARM Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Android adaptation and tweak by Jim Huang &lt;jserv@0xlab.org&gt;.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2011 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2012 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2012 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+All rights reserved.
+Copyright (c) 2013-2014 NVIDIA Corporation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2014 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2014 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2015 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2015 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1980, 1983, 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1982, 1986, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1982, 1986, 1993
+ The Regents of the University of California. All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1987, 1989
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1989
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1990, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1987 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1987, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1987, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software written by Ken Arnold and
+published in UNIX Review, Vol. 6, No. 8.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms are permitted
+provided that the above copyright notice and this paragraph are
+duplicated in all such forms and that any documentation,
+advertising materials, and other materials related to such
+distribution and use acknowledge that the software was developed
+by the University of California, Berkeley. The name of the
+University may not be used to endorse or promote products derived
+from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989 The Regents of the University of California.
+All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Roger L. Snyder.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+ The Regents of the University of California. All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993, 1994
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from locore.s.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Chris Torek.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+William Jolitz.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Chris Torek.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Donn Seeley at UUNET Technologies, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Donn Seeley at UUNET Technologies, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+ The Regents of the University of California. All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993, 1994
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993, 1994
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Chris Torek.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Berkeley Software Design, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993
+ The Regents of the University of California. All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+This code is derived from software contributed to Berkeley by
+Hugh Smith at The University of Guelph.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993, 1995,
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Havard Eidnes.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992 Henry Spencer.
+Copyright (c) 1992, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Henry Spencer of the University of Toronto.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Ralph Campbell.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Ralph Campbell. This file is derived from the MIPS RISC
+Architecture book by Gerry Kane.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+ The Regents of the University of California. All rights reserved.
+
+This software was developed by the Computer Systems Engineering group
+at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+contributed to Berkeley.
+
+All advertising materials mentioning features or use of this software
+must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Lawrence Berkeley Laboratory.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+ The Regents of the University of California. All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993, 1994
+ The Regents of the University of California. All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Henry Spencer.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993, 1994 Henry Spencer.
+
+This code is derived from software contributed to Berkeley by
+Henry Spencer.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1993 Martin Birgmeier
+All rights reserved.
+
+You may redistribute unmodified or modified versions of this source
+code provided that the above copyright notice and this and the
+following conditions are retained.
+
+This software is provided ``as is'', and comes with no warranties
+of any kind. I shall in no event be liable for anything that happens
+to anyone/anything when using this software.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1994 SigmaSoft, Th. Lockert &lt;tholo@sigmasoft.com&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1996 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1996, David Mazieres &lt;dm@uun.org&gt;
+Copyright (c) 2008, Damien Miller &lt;djm@openbsd.org&gt;
+Copyright (c) 2013, Markus Friedl &lt;markus@openbsd.org&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1996-1998, 2008 Theo de Raadt
+Copyright (c) 1997, 2008-2009 Todd C. Miller
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Mark Brinicombe
+Copyright (c) 2010 Android Open Source Project.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by Mark Brinicombe
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code was contributed to The NetBSD Foundation by Klaus Klein.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the NetBSD
+ Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Luke Mewburn.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Luke Mewburn; and by Jason R. Thorpe.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the NetBSD
+ Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 2005 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 Softweyr LLC. All rights reserved.
+
+strtok_r, from Berkeley strtok
+Oct 13, 1998 by Wes Peters &lt;wes@softweyr.com&gt;
+
+Copyright (c) 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notices, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notices, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWEYR LLC, THE
+REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Klaus Klein.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the NetBSD
+ Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1999
+ David E. O'Brien
+Copyright (c) 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2000 Ben Harris.
+Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2000 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Atsushi Onoe.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the NetBSD
+ Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2000 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Dieter Baron and Thomas Klausner.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001 Mike Barcroft &lt;mike@FreeBSD.org&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001 Wasabi Systems, Inc.
+All rights reserved.
+
+Written by Frank van der Linden for Wasabi Systems, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed for the NetBSD Project by
+ Wasabi Systems, Inc.
+4. The name of Wasabi Systems, Inc. may not be used to endorse
+ or promote products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of Opsycon AB nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Daniel Hartmeier
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Marc Espie.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD
+PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Christos Zoulas.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Tim J. Robbins
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Sponsored in part by the Defense Advanced Research Projects
+Agency (DARPA) and Air Force Research Laboratory, Air Force
+Materiel Command, USAF, under agreement number F39502-99-1-0512.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002, 2003 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002-2004 Tim J. Robbins
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002-2004 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 Constantin S. Svintsoff &lt;kostik@iclub.nsu.ru&gt;
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The names of the authors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 David Schultz &lt;das@FreeBSD.ORG&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 Networks Associates Technology, Inc.
+All rights reserved.
+
+Portions of this software were developed for the FreeBSD Project by
+Jacques A. Vidrine, Safeport Network Services, and Network
+Associates Laboratories, the Security Research Division of Network
+Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
+("CBOSS"), as part of the DARPA CHATS research program.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Sponsored in part by the Defense Advanced Research Projects
+Agency (DARPA) and Air Force Research Laboratory, Air Force
+Materiel Command, USAF, under agreement number F39502-99-1-0512.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Christos Zoulas.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the NetBSD
+ Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995,1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-1999 by Internet Software Consortium
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1996,1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1996-1999 by Internet Software Consortium
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1996-1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1997,1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004, 2005 David Schultz &lt;das@FreeBSD.ORG&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2005 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-1999 by Internet Software Consortium
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2007 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2007-2008 Michael G Schwern
+
+This software originally derived from Paul Sheer's pivotal_gmtime_r.c.
+
+The MIT License:
+
+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.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2007-2008 Michael G Schwern
+
+This software originally derived from Paul Sheer's pivotal_gmtime_r.c.
+
+The MIT License:
+
+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.
+
+Origin: http://code.google.com/p/y2038
+Modified for Bionic by the Android Open Source Project
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008 Android Open Source Project (query id randomization)
+Copyright (c) 1985, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008 Otto Moerbeek &lt;otto@drijf.net&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008 Todd C. Miller &lt;millert@openbsd.org&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008, Damien Miller &lt;djm@openbsd.org&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2009 David Schultz &lt;das@FreeBSD.org&gt;
+All rights reserved.
+
+Copyright (c) 2011 The FreeBSD Foundation
+All rights reserved.
+Portions of this software were developed by David Chisnall
+under sponsorship from the FreeBSD Foundation.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2009 David Schultz &lt;das@FreeBSD.org&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2009 The NetBSD Foundation, Inc.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Roy Marples.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010 MIPS Technologies, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with
+ the distribution.
+ * Neither the name of MIPS Technologies Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 David Chisnall
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Ed Schouten &lt;ed@FreeBSD.org&gt;
+ David Chisnall &lt;theraven@FreeBSD.org&gt;
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Martin Pieuchot &lt;mpi@openbsd.org&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Martin Pieuchot &lt;mpi@openbsd.org&gt;
+Copyright (c) 2009 Ted Unangst
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 The Android Open Source Project
+Copyright (c) 2008 ARM Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011, 2012, 2013 Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011, VMware, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the VMware, Inc. nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2012, Linaro Limited
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Linaro nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2012, Linaro Limited
+ All rights reserved.
+ Copyright (c) 2014, NVIDIA Corporation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Linaro nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2012-2015
+ MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013
+ MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013 ARM Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013 Antoine Jacoutot &lt;ajacoutot@openbsd.org&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Christos Zoulas.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014
+ Imagination Technologies Limited.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY IMAGINATION TECHNOLOGIES LIMITED ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL IMAGINATION TECHNOLOGIES LIMITED BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014 Theo de Raadt &lt;deraadt@openbsd.org&gt;
+Copyright (c) 2014 Bob Beck &lt;beck@obtuse.com&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Emulation of getentropy(2) as documented at:
+http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014, Linaro Limited
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Linaro nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)1999 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)1999, 2000, 2001 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)2001 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)2003 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright 1997 Niels Provos &lt;provos@physnet.uni-hamburg.de&gt;
+Copyright 2008 Damien Miller &lt;djm@openbsd.org&gt;
+All rights reserved.
+
+Theo de Raadt &lt;deraadt@openbsd.org&gt; came up with the idea of using
+such a mathematical system to generate more random (yet non-repeating)
+ids to solve the resolver/named problem. But Niels designed the
+actual system based on the constraints.
+
+Later modified by Damien Miller to wrap the LCG output in a 15-bit
+permutation generator based on a Luby-Rackoff block cipher. This
+ensures the output is non-repeating and preserves the MSB twiddle
+trick, but makes it more resistant to LCG prediction.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright 2008 Android Open Source Project (source port randomization)
+Copyright (c) 1985, 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
+Portions Copyright (C) 1996-2003 Internet Software Consortium.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Portions Copyright (c) 1995 by International Business Machines, Inc.
+
+International Business Machines, Inc. (hereinafter called IBM) grants
+permission under its copyrights to use, copy, modify, and distribute this
+Software with or without fee, provided that the above copyright notice and
+all paragraphs of this notice appear in all copies, and that the name of IBM
+not be used in connection with the marketing of any product incorporating
+the Software or modifications thereof, without specific, written prior
+permission.
+
+To the extent it has a right to do so, IBM grants an immunity from suit
+under its patents, if any, for the use, sale or manufacture of products to
+the extent that such products are used for performing Domain Name System
+dynamic updates in TCP/IP networks by means of the Software. No immunity is
+granted for any product per se or for any other function of any product.
+
+THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
+DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
+OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
+IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+-------------------------------------------------------------------
+
+Portions Copyright(C) 1995, Jason Downs. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998, 1999 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998, 2000 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998-2000 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998-2001 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 2000 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+memchr - find a character in a memory zone
+
+Copyright (c) 2014, ARM Limited
+All rights Reserved.
+Copyright (c) 2014, Linaro Ltd.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the company nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android Crazy Linker</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/chromium/src.git/+/master/third_party/android_crazy_linker/">homepage</a></span>
+<input type="checkbox" hidden id="7">
+<label class="show" for="7" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2014 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android Explicit Synchronization</span>
+<span class="homepage"><a href="http://source.android.com">homepage</a></span>
+<input type="checkbox" hidden id="8">
+<label class="show" for="8" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android FloatProperty</span>
+<span class="homepage"><a href="https://developer.android.com/reference/android/util/FloatProperty.html">homepage</a></span>
+<input type="checkbox" hidden id="9">
+<label class="show" for="9" tabindex="0"></label>
+<div class="licence">
+<pre> Copyright (c) 2005-2008, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ use this file except in compliance with the License.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations under
+ the License.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2011 Google Inc. All Rights Reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android Open Source Project - App Compat Library</span>
+<span class="homepage"><a href="https://android.googlesource.com/platform/frameworks/support">homepage</a></span>
+<input type="checkbox" hidden id="10">
+<label class="show" for="10" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android Open Source Project - Settings App</span>
+<span class="homepage"><a href="https://android.googlesource.com/platform/packages/apps/Settings/">homepage</a></span>
+<input type="checkbox" hidden id="11">
+<label class="show" for="11" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Android SDK</span>
+<span class="homepage"><a href="http://developer.android.com/sdk/index.html">homepage</a></span>
+<input type="checkbox" hidden id="12">
+<label class="show" for="12" tabindex="0"></label>
+<div class="licence">
+<pre>Notice for all the files in this folder.
+------------------------------------------------------------
+
+
+
+ Copyright (c) 2005-2008, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ use this file except in compliance with the License.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations under
+ the License.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2011 Google Inc. All Rights Reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Apple sample code</span>
+<span class="homepage"><a href="http://developer.apple.com/">homepage</a></span>
+<input type="checkbox" hidden id="13">
+<label class="show" for="13" tabindex="0"></label>
+<div class="licence">
+<pre>Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
+Inc. ("Apple") in consideration of your agreement to the following
+terms, and your use, installation, modification or redistribution of
+this Apple software constitutes acceptance of these terms. If you do
+not agree with these terms, please do not use, install, modify or
+redistribute this Apple software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, Apple grants you a personal, non-exclusive
+license, under Apple's copyrights in this original Apple software (the
+"Apple Software"), to use, reproduce, modify and redistribute the Apple
+Software, with or without modifications, in source and/or binary forms;
+provided that if you redistribute the Apple Software in its entirety and
+without modifications, you must retain this notice and the following
+text and disclaimers in all such redistributions of the Apple Software.
+Neither the name, trademarks, service marks or logos of Apple Inc. may
+be used to endorse or promote products derived from the Apple Software
+without specific prior written permission from Apple. Except as
+expressly stated in this notice, no other rights or licenses, express or
+implied, are granted by Apple herein, including but not limited to any
+patent rights that may be infringed by your derivative works or by other
+works in which the Apple Software may be incorporated.
+
+The Apple Software is provided by Apple on an "AS IS" basis. APPLE
+MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+Copyright (C) 2009 Apple Inc. All Rights Reserved.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">ARCore SDK</span>
+<span class="homepage"><a href="https://github.com/google-ar/arcore-android-sdk">homepage</a></span>
+<input type="checkbox" hidden id="14">
+<label class="show" for="14" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2017, Google Inc.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+1. Definitions.
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+END OF TERMS AND CONDITIONS
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">AsyncTask</span>
+<span class="homepage"><a href="https://android.googlesource.com/platform/frameworks/base/+/oreo-release/core/java/android/os/AsyncTask.java">homepage</a></span>
+<input type="checkbox" hidden id="15">
+<label class="show" for="15" tabindex="0"></label>
+<div class="licence">
+<pre>Notice for all the files in this folder.
+------------------------------------------------------------
+
+
+
+ Copyright (c) 2005-2008, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ use this file except in compliance with the License.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations under
+ the License.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2011 Google Inc. All Rights Reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">AXE-CORE Accessibility Audit</span>
+<span class="homepage"><a href="https://github.com/dequelabs/axe-core/">homepage</a></span>
+<input type="checkbox" hidden id="16">
+<label class="show" for="16" tabindex="0"></label>
+<div class="licence">
+<pre>Mozilla Public License, version 2.0
+
+1. Definitions
+
+1.1. "Contributor"
+
+ means each individual or legal entity that creates, contributes to the
+ creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+
+ means the combination of the Contributions of others (if any) used by a
+ Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+
+ means Source Code Form to which the initial Contributor has attached the
+ notice in Exhibit A, the Executable Form of such Source Code Form, and
+ Modifications of such Source Code Form, in each case including portions
+ thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ a. that the initial Contributor has attached the notice described in
+ Exhibit B to the Covered Software; or
+
+ b. that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the terms of
+ a Secondary License.
+
+1.6. "Executable Form"
+
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+
+ means a work that combines Covered Software with other material, in a
+ separate file or files, that is not Covered Software.
+
+1.8. "License"
+
+ means this document.
+
+1.9. "Licensable"
+
+ means having the right to grant, to the maximum extent possible, whether
+ at the time of the initial grant or subsequently, any and all of the
+ rights conveyed by this License.
+
+1.10. "Modifications"
+
+ means any of the following:
+
+ a. any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered Software; or
+
+ b. any new file in Source Code Form that contains any Covered Software.
+
+1.11. "Patent Claims" of a Contributor
+
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the License,
+ by the making, using, selling, offering for sale, having made, import,
+ or transfer of either its Contributions or its Contributor Version.
+
+1.12. "Secondary License"
+
+ means either the GNU General Public License, Version 2.0, the GNU Lesser
+ General Public License, Version 2.1, the GNU Affero General Public
+ License, Version 3.0, or any later versions of those licenses.
+
+1.13. "Source Code Form"
+
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that controls, is
+ controlled by, or is under common control with You. For purposes of this
+ definition, "control" means (a) the power, direct or indirect, to cause
+ the direction or management of such entity, whether by contract or
+ otherwise, or (b) ownership of more than fifty percent (50%) of the
+ outstanding shares or beneficial ownership of such entity.
+
+
+2. License Grants and Conditions
+
+2.1. Grants
+
+ Each Contributor hereby grants You a world-wide, royalty-free,
+ non-exclusive license:
+
+ a. under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+ b. under Patent Claims of such Contributor to make, use, sell, offer for
+ sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+ The licenses granted in Section 2.1 with respect to any Contribution
+ become effective for each Contribution on the date the Contributor first
+ distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+ The licenses granted in this Section 2 are the only rights granted under
+ this License. No additional rights or licenses will be implied from the
+ distribution or licensing of Covered Software under this License.
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
+ Contributor:
+
+ a. for any code that a Contributor has removed from Covered Software; or
+
+ b. for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+ c. under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+ This License does not grant any rights in the trademarks, service marks,
+ or logos of any Contributor (except as may be necessary to comply with
+ the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+ No Contributor makes additional grants as a result of Your choice to
+ distribute the Covered Software under a subsequent version of this
+ License (see Section 10.2) or under the terms of a Secondary License (if
+ permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+ Each Contributor represents that the Contributor believes its
+ Contributions are its original creation(s) or it has sufficient rights to
+ grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+ This License is not intended to limit any rights You have under
+ applicable copyright doctrines of fair use, fair dealing, or other
+ equivalents.
+
+2.7. Conditions
+
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
+ Section 2.1.
+
+
+3. Responsibilities
+
+3.1. Distribution of Source Form
+
+ All distribution of Covered Software in Source Code Form, including any
+ Modifications that You create or to which You contribute, must be under
+ the terms of this License. You must inform recipients that the Source
+ Code Form of the Covered Software is governed by the terms of this
+ License, and how they can obtain a copy of this License. You may not
+ attempt to alter or restrict the recipients' rights in the Source Code
+ Form.
+
+3.2. Distribution of Executable Form
+
+ If You distribute Covered Software in Executable Form then:
+
+ a. such Covered Software must also be made available in Source Code Form,
+ as described in Section 3.1, and You must inform recipients of the
+ Executable Form how they can obtain a copy of such Source Code Form by
+ reasonable means in a timely manner, at a charge no more than the cost
+ of distribution to the recipient; and
+
+ b. You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter the
+ recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+ You may create and distribute a Larger Work under terms of Your choice,
+ provided that You also comply with the requirements of this License for
+ the Covered Software. If the Larger Work is a combination of Covered
+ Software with a work governed by one or more Secondary Licenses, and the
+ Covered Software is not Incompatible With Secondary Licenses, this
+ License permits You to additionally distribute such Covered Software
+ under the terms of such Secondary License(s), so that the recipient of
+ the Larger Work may, at their option, further distribute the Covered
+ Software under the terms of either this License or such Secondary
+ License(s).
+
+3.4. Notices
+
+ You may not remove or alter the substance of any license notices
+ (including copyright notices, patent notices, disclaimers of warranty, or
+ limitations of liability) contained within the Source Code Form of the
+ Covered Software, except that You may alter any license notices to the
+ extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+ You may choose to offer, and to charge a fee for, warranty, support,
+ indemnity or liability obligations to one or more recipients of Covered
+ Software. However, You may do so only on Your own behalf, and not on
+ behalf of any Contributor. You must make it absolutely clear that any
+ such warranty, support, indemnity, or liability obligation is offered by
+ You alone, and You hereby agree to indemnify every Contributor for any
+ liability incurred by such Contributor as a result of warranty, support,
+ indemnity or liability terms You offer. You may include additional
+ disclaimers of warranty and limitations of liability specific to any
+ jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+
+ If it is impossible for You to comply with any of the terms of this License
+ with respect to some or all of the Covered Software due to statute,
+ judicial order, or regulation then You must: (a) comply with the terms of
+ this License to the maximum extent possible; and (b) describe the
+ limitations and the code they affect. Such description must be placed in a
+ text file included with all distributions of the Covered Software under
+ this License. Except to the extent prohibited by statute or regulation,
+ such description must be sufficiently detailed for a recipient of ordinary
+ skill to be able to understand it.
+
+5. Termination
+
+5.1. The rights granted under this License will terminate automatically if You
+ fail to comply with any of its terms. However, if You become compliant,
+ then the rights granted under this License from a particular Contributor
+ are reinstated (a) provisionally, unless and until such Contributor
+ explicitly and finally terminates Your grants, and (b) on an ongoing
+ basis, if such Contributor fails to notify You of the non-compliance by
+ some reasonable means prior to 60 days after You have come back into
+ compliance. Moreover, Your grants from a particular Contributor are
+ reinstated on an ongoing basis if such Contributor notifies You of the
+ non-compliance by some reasonable means, this is the first time You have
+ received notice of non-compliance with this License from such
+ Contributor, and You become compliant prior to 30 days after Your receipt
+ of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+ infringement claim (excluding declaratory judgment actions,
+ counter-claims, and cross-claims) alleging that a Contributor Version
+ directly or indirectly infringes any patent, then the rights granted to
+ You by any and all Contributors for the Covered Software under Section
+ 2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
+ license agreements (excluding distributors and resellers) which have been
+ validly granted by You or Your distributors under this License prior to
+ termination shall survive termination.
+
+6. Disclaimer of Warranty
+
+ Covered Software is provided under this License on an "as is" basis,
+ without warranty of any kind, either expressed, implied, or statutory,
+ including, without limitation, warranties that the Covered Software is free
+ of defects, merchantable, fit for a particular purpose or non-infringing.
+ The entire risk as to the quality and performance of the Covered Software
+ is with You. Should any Covered Software prove defective in any respect,
+ You (not any Contributor) assume the cost of any necessary servicing,
+ repair, or correction. This disclaimer of warranty constitutes an essential
+ part of this License. No use of any Covered Software is authorized under
+ this License except under this disclaimer.
+
+7. Limitation of Liability
+
+ Under no circumstances and under no legal theory, whether tort (including
+ negligence), contract, or otherwise, shall any Contributor, or anyone who
+ distributes Covered Software as permitted above, be liable to You for any
+ direct, indirect, special, incidental, or consequential damages of any
+ character including, without limitation, damages for lost profits, loss of
+ goodwill, work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses, even if such party shall have been
+ informed of the possibility of such damages. This limitation of liability
+ shall not apply to liability for death or personal injury resulting from
+ such party's negligence to the extent applicable law prohibits such
+ limitation. Some jurisdictions do not allow the exclusion or limitation of
+ incidental or consequential damages, so this exclusion and limitation may
+ not apply to You.
+
+8. Litigation
+
+ Any litigation relating to this License may be brought only in the courts
+ of a jurisdiction where the defendant maintains its principal place of
+ business and such litigation shall be governed by laws of that
+ jurisdiction, without reference to its conflict-of-law provisions. Nothing
+ in this Section shall prevent a party's ability to bring cross-claims or
+ counter-claims.
+
+9. Miscellaneous
+
+ This License represents the complete agreement concerning the subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. Any law or regulation which provides that
+ the language of a contract shall be construed against the drafter shall not
+ be used to construe this License against a Contributor.
+
+
+10. Versions of the License
+
+10.1. New Versions
+
+ Mozilla Foundation is the license steward. Except as provided in Section
+ 10.3, no one other than the license steward has the right to modify or
+ publish new versions of this License. Each version will be given a
+ distinguishing version number.
+
+10.2. Effect of New Versions
+
+ You may distribute the Covered Software under the terms of the version
+ of the License under which You originally received the Covered Software,
+ or under the terms of any subsequent version published by the license
+ steward.
+
+10.3. Modified Versions
+
+ If you create software not governed by this License, and you want to
+ create a new license for such software, you may create and use a
+ modified version of this License if you rename the license and remove
+ any references to the name of the license steward (except to note that
+ such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+ Licenses If You choose to distribute Source Code Form that is
+ Incompatible With Secondary Licenses under the terms of this version of
+ the License, the notice described in Exhibit B of this License must be
+ attached.
+
+Exhibit A - Source Code Form License Notice
+
+ This Source Code Form is subject to the
+ terms of the Mozilla Public License, v.
+ 2.0. If a copy of the MPL was not
+ distributed with this file, You can
+ obtain one at
+ http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular file,
+then You may include the notice in a location (such as a LICENSE file in a
+relevant directory) where a recipient would be likely to look for such a
+notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+
+ This Source Code Form is "Incompatible
+ With Secondary Licenses", as defined by
+ the Mozilla Public License, v. 2.0.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Blackmagic DeckLink SDK - Mac</span>
+<span class="homepage"><a href="http://software.blackmagicdesign.com/DeckLink/v10.7/Blackmagic_DeckLink_SDK_10.7.zip">homepage</a></span>
+<input type="checkbox" hidden id="17">
+<label class="show" for="17" tabindex="0"></label>
+<div class="licence">
+<pre>Extracted from mac/include/DeckLinkAPI.h:
+
+** Copyright (c) 2014 Blackmagic Design
+**
+** Permission is hereby granted, free of charge, to any person or organization
+** obtaining a copy of the software and accompanying documentation covered by
+** this license (the "Software") to use, reproduce, display, distribute,
+** execute, and transmit the Software, and to prepare derivative works of the
+** Software, and to permit third-parties to whom the Software is furnished to
+** do so, all subject to the following:
+**
+** The copyright notices in the Software and this entire statement, including
+** the above license grant, this restriction and the following disclaimer,
+** must be included in all copies of the Software, in whole or in part, and
+** all derivative works of the Software, unless such copies or derivative
+** works are solely in the form of machine-executable object code generated by
+** a source language processor.
+**
+** 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+** DEALINGS IN THE SOFTWARE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">blink HTMLTokenizer</span>
+<span class="homepage"><a href="http://www.chromium.org/blink">homepage</a></span>
+<input type="checkbox" hidden id="18">
+<label class="show" for="18" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (C) 2008 Apple Inc. All Rights Reserved.
+Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/
+Copyright (C) 2010 Google, Inc. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ *
+THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">BoringSSL</span>
+<span class="homepage"><a href="https://boringssl.googlesource.com/boringssl">homepage</a></span>
+<input type="checkbox" hidden id="19">
+<label class="show" for="19" tabindex="0"></label>
+<div class="licence">
+<pre>BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
+licensing. Files that are completely new have a Google copyright and an ISC
+license. This license is reproduced at the bottom of this file.
+
+Contributors to BoringSSL are required to follow the CLA rules for Chromium:
+https://cla.developers.google.com/clas
+
+Files in third_party/ have their own licenses, as described therein. The MIT
+license, for third_party/fiat, which, unlike other third_party directories, is
+compiled into non-test libraries, is included below.
+
+The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
+OpenSSL License and the original SSLeay license apply to the toolkit. See below
+for the actual license texts. Actually both licenses are BSD-style Open Source
+licenses. In case of any license issues related to OpenSSL please contact
+openssl-core@openssl.org.
+
+The following are Google-internal bug numbers where explicit permission from
+some authors is recorded for use of their work. (This is purely for our own
+record keeping.)
+ 27287199
+ 27287880
+ 27287883
+
+ OpenSSL License
+ ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+
+ISC license used for completely new code in BoringSSL:
+
+/* Copyright (c) 2015, Google Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+
+
+The code in third_party/fiat carries the MIT license:
+
+Copyright (c) 2015-2016 the fiat-crypto authors (see
+https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+Licenses for support code
+-------------------------
+
+Parts of the TLS test suite are under the Go license. This code is not included
+in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so
+distributing code linked against BoringSSL does not trigger this license:
+
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+BoringSSL uses the Chromium test infrastructure to run a continuous build,
+trybots etc. The scripts which manage this, and the script for generating build
+metadata, are under the Chromium license. Distributing code linked against
+BoringSSL does not trigger this license.
+
+Copyright 2015 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Braille Translation Library</span>
+<span class="homepage"><a href="https://github.com/liblouis/liblouis">homepage</a></span>
+<input type="checkbox" hidden id="20">
+<label class="show" for="20" tabindex="0"></label>
+<div class="licence">
+<pre>(Copied from src/liblouis/liblouis.h.in)
+
+/* liblouis Braille Translation and Back-Translation Library
+
+ Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by
+ The BRLTTY Team
+
+ Copyright (C) 2004, 2005, 2006, 2009 ViewPlus Technologies, Inc.
+ www.viewplus.com and JJB Software, Inc. www.jjb-software.com
+
+ liblouis is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ liblouis is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program. If not, see
+ &lt;http://www.gnu.org/licenses/&gt;.
+
+ Maintained by John J. Boyer john.boyer@abilitiessoft.com
+ */
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Breakpad, An open-source multi-platform crash reporting system</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/breakpad/breakpad">homepage</a></span>
+<input type="checkbox" hidden id="21">
+<label class="show" for="21" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2006, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2011, Daniel Stenberg, &lt;daniel@haxx.se&gt;.
+
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 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.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+
+Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+
+@APPLE_LICENSE_HEADER_START@
+
+This file contains Original Code and/or Modifications of Original Code
+as defined in and that are subject to the Apple Public Source License
+Version 2.0 (the 'License'). You may not use this file except in
+compliance with the License. Please obtain a copy of the License at
+http://www.opensource.apple.com/apsl/ and read it before using this
+file.
+
+The Original Code and all software distributed under the License are
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+Please see the License for the specific language governing rights and
+limitations under the License.
+
+@APPLE_LICENSE_HEADER_END@
+
+
+Copyright 2007-2008 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy
+of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Brotli</span>
+<span class="homepage"><a href="https://github.com/google/brotli">homepage</a></span>
+<input type="checkbox" hidden id="22">
+<label class="show" for="22" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">BSDiff</span>
+<span class="homepage"><a href="http://www.daemonology.net/bsdiff/">homepage</a></span>
+<input type="checkbox" hidden id="23">
+<label class="show" for="23" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2003-2005 Colin Percival
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted providing that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">bsdiff</span>
+<span class="homepage"><a href="http://www.daemonology.net/bsdiff/">homepage</a></span>
+<input type="checkbox" hidden id="24">
+<label class="show" for="24" tabindex="0"></label>
+<div class="licence">
+<pre>BSD Protection License
+February 2002
+
+Preamble
+--------
+
+The Berkeley Software Distribution ("BSD") license has proven very effective
+over the years at allowing for a wide spread of work throughout both
+commercial and non-commercial products. For programmers whose primary
+intention is to improve the general quality of available software, it is
+arguable that there is no better license than the BSD license, as it
+permits improvements to be used wherever they will help, without idealogical
+or metallic constraint.
+
+This is of particular value to those who produce reference implementations
+of proposed standards: The case of TCP/IP clearly illustrates that freely
+and universally available implementations leads the rapid acceptance of
+standards -- often even being used instead of a de jure standard (eg, OSI
+network models).
+
+With the rapid proliferation of software licensed under the GNU General
+Public License, however, the continued success of this role is called into
+question. Given that the inclusion of a few lines of "GPL-tainted" work
+into a larger body of work will result in restricted distribution -- and
+given that further work will likely build upon the "tainted" portions,
+making them difficult to remove at a future date -- there are inevitable
+circumstances where authors would, in order to protect their goal of
+providing for the widespread usage of their work, wish to guard against
+such "GPL-taint".
+
+In addition, one can imagine that companies which operate by producing and
+selling (possibly closed-source) code would wish to protect themselves
+against the rise of a GPL-licensed competitor. While under existing
+licenses this would mean not releasing their code under any form of open
+license, if a license existed under which they could incorporate any
+improvements back into their own (commercial) products then they might be
+far more willing to provide for non-closed distribution.
+
+For the above reasons, we put forth this "BSD Protection License": A
+license designed to retain the freedom granted by the BSD license to use
+licensed works in a wide variety of settings, both non-commercial and
+commercial, while protecting the work from having future contributors
+restrict that freedom.
+
+The precise terms and conditions for copying, distribution, and
+modification follow.
+
+BSD PROTECTION LICENSE
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
+----------------------------------------------------------------
+
+0. Definitions.
+ a) "Program", below, refers to any program or work distributed under
+ the terms of this license.
+ b) A "work based on the Program", below, refers to either the Program
+ or any derivative work under copyright law.
+ c) "Modification", below, refers to the act of creating derivative works.
+ d) "You", below, refers to each licensee.
+
+1. Scope.
+ This license governs the copying, distribution, and modification of the
+ Program. Other activities are outside the scope of this license; The
+ act of running the Program is not restricted, and the output from the
+ Program is covered only if its contents constitute a work based on the
+ Program.
+
+2. Verbatim copies.
+ You may copy and distribute verbatim copies of the Program as you
+ receive it, in any medium, provided that you conspicuously and
+ appropriately publish on each copy an appropriate copyright notice; keep
+ intact all the notices that refer to this License and to the absence of
+ any warranty; and give any other recipients of the Program a copy of this
+ License along with the Program.
+
+3. Modification and redistribution under closed license.
+ You may modify your copy or copies of the Program, and distribute
+ the resulting derivative works, provided that you meet the
+ following conditions:
+ a) The copyright notice and disclaimer on the Program must be reproduced
+ and included in the source code, documentation, and/or other materials
+ provided in a manner in which such notices are normally distributed.
+ b) The derivative work must be clearly identified as such, in order that
+ it may not be confused with the original work.
+ c) The license under which the derivative work is distributed must
+ expressly prohibit the distribution of further derivative works.
+
+4. Modification and redistribution under open license.
+ You may modify your copy or copies of the Program, and distribute
+ the resulting derivative works, provided that you meet the
+ following conditions:
+ a) The copyright notice and disclaimer on the Program must be reproduced
+ and included in the source code, documentation, and/or other materials
+ provided in a manner in which such notices are normally distributed.
+ b) You must clearly indicate the nature and date of any changes made
+ to the Program. The full details need not necessarily be included in
+ the individual modified files, provided that each modified file is
+ clearly marked as such and instructions are included on where the
+ full details of the modifications may be found.
+ c) You must cause any work that you distribute or publish, that in whole
+ or in part contains or is derived from the Program or any part
+ thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+5. Implied acceptance.
+ You may not copy or distribute the Program or any derivative works except
+ as expressly provided under this license. Consequently, any such action
+ will be taken as implied acceptance of the terms of this license.
+
+6. NO WARRANTY.
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ THE COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ TORT, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">bspatch</span>
+<span class="homepage"><a href="http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/">homepage</a></span>
+<input type="checkbox" hidden id="25">
+<label class="show" for="25" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2003,2004 Colin Percival
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted providing that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Chrome Custom Tabs - Example and Usage</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/external/github.com/GoogleChrome/custom-tabs-client">homepage</a></span>
+<input type="checkbox" hidden id="26">
+<label class="show" for="26" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">ChromeVox</span>
+<span class="homepage"><a href="http://code.google.com/p/google-axs-chrome/">homepage</a></span>
+<input type="checkbox" hidden id="27">
+<label class="show" for="27" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2013 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Chromium OS system API</span>
+<span class="homepage"><a href="http://www.chromium.org/chromium-os">homepage</a></span>
+<input type="checkbox" hidden id="28">
+<label class="show" for="28" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright (c) 2006-2009 The Chromium OS Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Closure compiler</span>
+<span class="homepage"><a href="http://github.com/google/closure-compiler">homepage</a></span>
+<input type="checkbox" hidden id="29">
+<label class="show" for="29" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Cocoa extension code from Camino</span>
+<span class="homepage"><a href="http://caminobrowser.org/">homepage</a></span>
+<input type="checkbox" hidden id="30">
+<label class="show" for="30" tabindex="0"></label>
+<div class="licence">
+<pre>/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2002
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Compact Encoding Detection</span>
+<span class="homepage"><a href="https://github.com/google/compact_enc_det">homepage</a></span>
+<input type="checkbox" hidden id="31">
+<label class="show" for="31" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Compact Language Detector v3</span>
+<span class="homepage"><a href="https://github.com/google/cld3">homepage</a></span>
+<input type="checkbox" hidden id="32">
+<label class="show" for="32" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2016 Google Inc. All rights reserved.
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2016, Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Crashpad</span>
+<span class="homepage"><a href="https://crashpad.chromium.org/">homepage</a></span>
+<input type="checkbox" hidden id="33">
+<label class="show" for="33" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">CRC32C</span>
+<span class="homepage"><a href="https://github.com/google/crc32c">homepage</a></span>
+<input type="checkbox" hidden id="34">
+<label class="show" for="34" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2017, The CRC32C Authors.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">d3</span>
+<span class="homepage"><a href="https://github.com/mbostock/d3">homepage</a></span>
+<input type="checkbox" hidden id="35">
+<label class="show" for="35" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2010-2014, Michael Bostock
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* The name Michael Bostock may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Darwin</span>
+<span class="homepage"><a href="http://www.opensource.apple.com/">homepage</a></span>
+<input type="checkbox" hidden id="36">
+<label class="show" for="36" tabindex="0"></label>
+<div class="licence">
+<pre>APPLE PUBLIC SOURCE LICENSE Version 2.0 - August 6, 2003
+
+Please read this License carefully before downloading this software. By
+downloading or using this software, you are agreeing to be bound by the terms of
+this License. If you do not or cannot agree to the terms of this License,
+please do not download or use the software.
+
+Apple Note: In January 2007, Apple changed its corporate name from "Apple
+Computer, Inc." to "Apple Inc." This change has been reflected below and
+copyright years updated, but no other changes have been made to the APSL 2.0.
+
+1. General; Definitions. This License applies to any program or other work
+which Apple Inc. ("Apple") makes publicly available and which contains a notice
+placed by Apple identifying such program or work as "Original Code" and stating
+that it is subject to the terms of this Apple Public Source License version 2.0
+("License"). As used in this License:
+
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the
+grantor of rights, (i) claims of patents that are now or hereafter acquired,
+owned by or assigned to Apple and (ii) that cover subject matter contained in
+the Original Code, but only to the extent necessary to use, reproduce and/or
+distribute the Original Code without infringement; and (b) in the case where You
+are the grantor of rights, (i) claims of patents that are now or hereafter
+acquired, owned by or assigned to You and (ii) that cover subject matter in Your
+Modifications, taken alone or in combination with Original Code.
+
+1.2 "Contributor" means any person or entity that creates or contributes to the
+creation of Modifications.
+
+1.3 "Covered Code" means the Original Code, Modifications, the combination of
+Original Code and any Modifications, and/or any respective portions thereof.
+
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make
+Covered Code available, directly or indirectly, to anyone other than You; and/or
+(b) to use Covered Code, alone or as part of a Larger Work, in any way to
+provide a service, including but not limited to delivery of content, through
+electronic communication with a client other than You.
+
+1.5 "Larger Work" means a work which combines Covered Code or portions thereof
+with code not governed by the terms of this License.
+
+1.6 "Modifications" mean any addition to, deletion from, and/or change to, the
+substance and/or structure of the Original Code, any previous Modifications, the
+combination of Original Code and any previous Modifications, and/or any
+respective portions thereof. When code is released as a series of files, a
+Modification is: (a) any addition to or deletion from the contents of a file
+containing Covered Code; and/or (b) any new file or other representation of
+computer program statements that contains any part of Covered Code.
+
+1.7 "Original Code" means (a) the Source Code of a program or other work as
+originally made available by Apple under this License, including the Source Code
+of any updates or upgrades to such programs or works made available by Apple
+under this License, and that has been expressly identified by Apple as such in
+the header file(s) of such work; and (b) the object code compiled from such
+Source Code and originally made available by Apple under this License
+
+1.8 "Source Code" means the human readable form of a program or other work that
+is suitable for making modifications to it, including all modules it contains,
+plus any associated interface definition files, scripts used to control
+compilation and installation of an executable (object code).
+
+1.9 "You" or "Your" means an individual or a legal entity exercising rights
+under this License. For legal entities, "You" or "Your" includes any entity
+which controls, is controlled by, or is under common control with, You, where
+"control" means (a) the power, direct or indirect, to cause the direction or
+management of such entity, whether by contract or otherwise, or (b) ownership of
+fifty percent (50%) or more of the outstanding shares or beneficial ownership of
+such entity.
+
+2. Permitted Uses; Conditions &amp; Restrictions. Subject to the terms and
+conditions of this License, Apple hereby grants You, effective on the date You
+accept this License and download the Original Code, a world-wide, royalty-free,
+non-exclusive license, to the extent of Apple's Applicable Patent Rights and
+copyrights covering the Original Code, to do the following:
+
+2.1 Unmodified Code. You may use, reproduce, display, perform, internally
+distribute within Your organization, and Externally Deploy verbatim, unmodified
+copies of the Original Code, for commercial or non-commercial purposes, provided
+that in each instance:
+
+(a) You must retain and reproduce in all copies of Original Code the copyright
+and other proprietary notices and disclaimers of Apple as they appear in the
+Original Code, and keep intact all notices in the Original Code that refer to
+this License; and
+
+(b) You must include a copy of this License with every copy of Source Code of
+Covered Code and documentation You distribute or Externally Deploy, and You may
+not offer or impose any terms on such Source Code that alter or restrict this
+License or the recipients' rights hereunder, except as permitted under Section
+6.
+
+2.2 Modified Code. You may modify Covered Code and use, reproduce, display,
+perform, internally distribute within Your organization, and Externally Deploy
+Your Modifications and Covered Code, for commercial or non-commercial purposes,
+provided that in each instance You also meet all of these conditions:
+
+(a) You must satisfy all the conditions of Section 2.1 with respect to the
+Source Code of the Covered Code;
+
+(b) You must duplicate, to the extent it does not already exist, the notice in
+Exhibit A in each file of the Source Code of all Your Modifications, and cause
+the modified files to carry prominent notices stating that You changed the files
+and the date of any change; and
+
+(c) If You Externally Deploy Your Modifications, You must make Source Code of
+all Your Externally Deployed Modifications either available to those to whom You
+have Externally Deployed Your Modifications, or publicly available. Source Code
+of Your Externally Deployed Modifications must be released under the terms set
+forth in this License, including the license grants set forth in Section 3
+below, for as long as you Externally Deploy the Covered Code or twelve (12)
+months from the date of initial External Deployment, whichever is longer. You
+should preferably distribute the Source Code of Your Externally Deployed
+Modifications electronically (e.g. download from a web site).
+
+2.3 Distribution of Executable Versions. In addition, if You Externally Deploy
+Covered Code (Original Code and/or Modifications) in object code, executable
+form only, You must include a prominent notice, in the code itself as well as in
+related documentation, stating that Source Code of the Covered Code is available
+under the terms of this License with information on how and where to obtain such
+Source Code.
+
+2.4 Third Party Rights. You expressly acknowledge and agree that although
+Apple and each Contributor grants the licenses to their respective portions of
+the Covered Code set forth herein, no assurances are provided by Apple or any
+Contributor that the Covered Code does not infringe the patent or other
+intellectual property rights of any other entity. Apple and each Contributor
+disclaim any liability to You for claims brought by any other entity based on
+infringement of intellectual property rights or otherwise. As a condition to
+exercising the rights and licenses granted hereunder, You hereby assume sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow You to
+distribute the Covered Code, it is Your responsibility to acquire that license
+before distributing the Covered Code.
+
+3. Your Grants. In consideration of, and as a condition to, the licenses
+granted to You under this License, You hereby grant to any person or entity
+receiving or distributing Covered Code under this License a non-exclusive,
+royalty-free, perpetual, irrevocable license, under Your Applicable Patent
+Rights and other intellectual property rights (other than patent) owned or
+controlled by You, to use, reproduce, display, perform, modify, sublicense,
+distribute and Externally Deploy Your Modifications of the same scope and extent
+as Apple's licenses under Sections 2.1 and 2.2 above.
+
+4. Larger Works. You may create a Larger Work by combining Covered Code with
+other code not governed by the terms of this License and distribute the Larger
+Work as a single product. In each such instance, You must make sure the
+requirements of this License are fulfilled for the Covered Code or any portion
+thereof.
+
+5. Limitations on Patent License. Except as expressly stated in Section 2, no
+other patent rights, express or implied, are granted by Apple herein.
+Modifications and/or Larger Works may require additional patent licenses from
+Apple which Apple may grant in its sole discretion.
+
+6. Additional Terms. You may choose to offer, and to charge a fee for,
+warranty, support, indemnity or liability obligations and/or other rights
+consistent with the scope of the license granted herein ("Additional Terms") to
+one or more recipients of Covered Code. However, You may do so only on Your own
+behalf and as Your sole responsibility, and not on behalf of Apple or any
+Contributor. You must obtain the recipient's agreement that any such Additional
+Terms are offered by You alone, and You hereby agree to indemnify, defend and
+hold Apple and every Contributor harmless for any liability incurred by or
+claims asserted against Apple or such Contributor by reason of any such
+Additional Terms.
+
+7. Versions of the License. Apple may publish revised and/or new versions of
+this License from time to time. Each version will be given a distinguishing
+version number. Once Original Code has been published under a particular
+version of this License, You may continue to use it under the terms of that
+version. You may also choose to use such Original Code under the terms of any
+subsequent version of this License published by Apple. No one other than Apple
+has the right to modify the terms applicable to Covered Code created under this
+License.
+
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part
+pre-release, untested, or not fully tested works. The Covered Code may contain
+errors that could cause failures or loss of data, and may be incomplete or
+contain inaccuracies. You expressly acknowledge and agree that use of the
+Covered Code, or any portion thereof, is at Your sole and entire risk. THE
+COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF
+ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE"
+FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY
+QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT,
+AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT
+WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
+FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE
+OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT
+DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION
+OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR
+SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended
+for use in the operation of nuclear facilities, aircraft navigation,
+communication systems, or air traffic control machines in which case the failure
+of the Covered Code could lead to death, personal injury, or severe physical or
+environmental damage.
+
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT
+SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE
+OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A
+THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR
+OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
+REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In
+no event shall Apple's total liability to You for all damages (other than as may
+be required by applicable law) under this License exceed the amount of fifty
+dollars ($50.00).
+
+10. Trademarks. This License does not grant any rights to use the trademarks
+or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming
+Server" or any other trademarks, service marks, logos or trade names belonging
+to Apple (collectively "Apple Marks") or to any trademark, service mark, logo or
+trade name belonging to any Contributor. You agree not to use any Apple Marks
+in or as part of the name of products derived from the Original Code or to
+endorse or promote products derived from the Original Code other than as
+expressly permitted by and in strict compliance at all times with Apple's third
+party trademark usage guidelines which are posted at
+http://www.apple.com/legal/guidelinesfor3rdparties.html.
+
+11. Ownership. Subject to the licenses granted under this License, each
+Contributor retains all rights, title and interest in and to any Modifications
+made by such Contributor. Apple retains all rights, title and interest in and
+to the Original Code and any Modifications made by or on behalf of Apple ("Apple
+Modifications"), and such Apple Modifications will not be automatically subject
+to this License. Apple may, at its sole discretion, choose to license such
+Apple Modifications under this License, or on different terms from those
+contained in this License or may choose not to license them at all.
+
+12. Termination.
+
+12.1 Termination. This License and the rights granted hereunder will
+terminate:
+
+(a) automatically without notice from Apple if You fail to comply with any
+term(s) of this License and fail to cure such breach within 30 days of becoming
+aware of such breach; (b) immediately in the event of the circumstances
+described in Section 13.5(b); or (c) automatically without notice from Apple if
+You, at any time during the term of this License, commence an action for patent
+infringement against Apple; provided that Apple did not first commence an action
+for patent infringement against You in that instance.
+
+12.2 Effect of Termination. Upon termination, You agree to immediately stop
+any further use, reproduction, modification, sublicensing and distribution of
+the Covered Code. All sublicenses to the Covered Code which have been properly
+granted prior to termination shall survive any termination of this License.
+Provisions which, by their nature, should remain in effect beyond the
+termination of this License shall survive, including but not limited to Sections
+3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for
+compensation, indemnity or damages of any sort solely as a result of terminating
+this License in accordance with its terms, and termination of this License will
+be without prejudice to any other right or remedy of any party.
+
+13. Miscellaneous.
+
+13.1 Government End Users. The Covered Code is a "commercial item" as defined
+in FAR 2.101. Government software and technical data rights in the Covered Code
+include only those rights customarily provided to the public as defined in this
+License. This customary commercial license in technical data and software is
+provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer
+Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical
+Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software
+or Computer Software Documentation). Accordingly, all U.S. Government End Users
+acquire Covered Code with only those rights set forth herein.
+
+13.2 Relationship of Parties. This License will not be construed as creating
+an agency, partnership, joint venture or any other form of legal association
+between or among You, Apple or any Contributor, and You will not represent to
+the contrary, whether expressly, by implication, appearance or otherwise.
+
+13.3 Independent Development. Nothing in this License will impair Apple's
+right to acquire, license, develop, have others develop for it, market and/or
+distribute technology or products that perform the same or similar functions as,
+or otherwise compete with, Modifications, Larger Works, technology or products
+that You may develop, produce, market or distribute.
+
+13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any
+provision of this License will not be deemed a waiver of future enforcement of
+that or any other provision. Any law or regulation which provides that the
+language of a contract shall be construed against the drafter will not apply to
+this License.
+
+13.5 Severability. (a) If for any reason a court of competent jurisdiction
+finds any provision of this License, or portion thereof, to be unenforceable,
+that provision of the License will be enforced to the maximum extent permissible
+so as to effect the economic benefits and intent of the parties, and the
+remainder of this License will continue in full force and effect. (b)
+Notwithstanding the foregoing, if applicable law prohibits or restricts You from
+fully and/or specifically complying with Sections 2 and/or 3 or prevents the
+enforceability of either of those Sections, this License will immediately
+terminate and You must immediately discontinue any use of the Covered Code and
+destroy all copies of it that are in your possession or control.
+
+13.6 Dispute Resolution. Any litigation or other dispute resolution between
+You and Apple relating to this License shall take place in the Northern District
+of California, and You and Apple hereby consent to the personal jurisdiction of,
+and venue in, the state and federal courts within that District with respect to
+this License. The application of the United Nations Convention on Contracts for
+the International Sale of Goods is expressly excluded.
+
+13.7 Entire Agreement; Governing Law. This License constitutes the entire
+agreement between the parties with respect to the subject matter hereof. This
+License shall be governed by the laws of the United States and the State of
+California, except that body of California law concerning conflicts of law.
+
+Where You are located in the province of Quebec, Canada, the following clause
+applies: The parties hereby confirm that they have requested that this License
+and all related documents be drafted in English. Les parties ont exigé que le
+présent contrat et tous les documents connexes soient rédigés en anglais.
+
+EXHIBIT A.
+
+"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved.
+
+This file contains Original Code and/or Modifications of Original Code as
+defined in and that are subject to the Apple Public Source License Version 2.0
+(the 'License'). You may not use this file except in compliance with the
+License. Please obtain a copy of the License at
+http://www.opensource.apple.com/apsl/ and read it before using this file.
+
+The Original Code and all software distributed under the License are distributed
+on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION,
+ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
+ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language
+governing rights and limitations under the License."
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">David M. Gay's floating point routines</span>
+<span class="homepage"><a href="http://www.netlib.org/fp/">homepage</a></span>
+<input type="checkbox" hidden id="37">
+<label class="show" for="37" tabindex="0"></label>
+<div class="licence">
+<pre>/****************************************************************
+ *
+ * The author of this software is David M. Gay.
+ *
+ * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ *
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+ *
+ ***************************************************************/
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">divsufsort</span>
+<span class="homepage"><a href="https://github.com/y-256/libdivsufsort">homepage</a></span>
+<input type="checkbox" hidden id="38">
+<label class="show" for="38" tabindex="0"></label>
+<div class="licence">
+<pre>The MIT License (MIT)
+
+Copyright (c) 2003 Yuta Mori All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">dom-distiller-js</span>
+<span class="homepage"><a href="https://github.com/chromium/dom-distiller">homepage</a></span>
+<input type="checkbox" hidden id="39">
+<label class="show" for="39" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2014 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+Parts of the following directories are available under Apache v2.0
+
+src/de
+Copyright (c) 2009-2011 Christian Kohlschütter
+
+third_party/gwt_exporter
+Copyright 2007 Timepedia.org
+
+third_party/gwt-2.5.1
+Copyright 2008 Google
+
+java/org/chromium/distiller/dev
+Copyright 2008 Google
+
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">drawElements Quality Program</span>
+<span class="homepage"><a href="https://source.android.com/devices/graphics/testing.html">homepage</a></span>
+<input type="checkbox" hidden id="40">
+<label class="show" for="40" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">dynamic annotations</span>
+<span class="homepage"><a href="http://code.google.com/p/data-race-test/wiki/DynamicAnnotations">homepage</a></span>
+<input type="checkbox" hidden id="41">
+<label class="show" for="41" tabindex="0"></label>
+<div class="licence">
+<pre>/* Copyright (c) 2008-2009, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ---
+ * Author: Kostya Serebryany
+ */
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">etc1</span>
+<span class="homepage"><a href="https://source.android.com/">homepage</a></span>
+<input type="checkbox" hidden id="42">
+<label class="show" for="42" tabindex="0"></label>
+<div class="licence">
+<pre>/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Expat XML Parser</span>
+<span class="homepage"><a href="http://sourceforge.net/projects/expat/">homepage</a></span>
+<input type="checkbox" hidden id="43">
+<label class="show" for="43" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
+Copyright (c) 2001-2017 Expat maintainers
+
+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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">fdlibm</span>
+<span class="homepage"><a href="http://www.netlib.org/fdlibm/">homepage</a></span>
+<input type="checkbox" hidden id="44">
+<label class="show" for="44" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
+
+Developed at SunSoft, a Sun Microsystems, Inc. business.
+Permission to use, copy, modify, and distribute this
+software is freely granted, provided that this notice
+is preserved.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Feed</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/feed">homepage</a></span>
+<input type="checkbox" hidden id="45">
+<label class="show" for="45" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">ffmpeg</span>
+<span class="homepage"><a href="http://ffmpeg.org/">homepage</a></span>
+<input type="checkbox" hidden id="46">
+<label class="show" for="46" tabindex="0"></label>
+<div class="licence">
+<pre># License
+
+Most files in FFmpeg are under the GNU Lesser General Public License version 2.1
+or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other
+files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to
+FFmpeg.
+
+Some optional parts of FFmpeg are licensed under the GNU General Public License
+version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of
+these parts are used by default, you have to explicitly pass `--enable-gpl` to
+configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
+
+Specifically, the GPL parts of FFmpeg are:
+
+- libpostproc
+- optional x86 optimization in the files
+ - `libavcodec/x86/flac_dsp_gpl.asm`
+ - `libavcodec/x86/idct_mmx.c`
+ - `libavfilter/x86/vf_removegrain.asm`
+- the following building and testing tools
+ - `compat/solaris/make_sunver.pl`
+ - `doc/t2h.pm`
+ - `doc/texi2pod.pl`
+ - `libswresample/swresample-test.c`
+ - `tests/checkasm/*`
+ - `tests/tiny_ssim.c`
+- the following filters in libavfilter:
+ - `vf_blackframe.c`
+ - `vf_boxblur.c`
+ - `vf_colormatrix.c`
+ - `vf_cover_rect.c`
+ - `vf_cropdetect.c`
+ - `vf_delogo.c`
+ - `vf_eq.c`
+ - `vf_find_rect.c`
+ - `vf_fspp.c`
+ - `vf_geq.c`
+ - `vf_histeq.c`
+ - `vf_hqdn3d.c`
+ - `vf_interlace.c`
+ - `vf_kerndeint.c`
+ - `vf_mcdeint.c`
+ - `vf_mpdecimate.c`
+ - `vf_owdenoise.c`
+ - `vf_perspective.c`
+ - `vf_phase.c`
+ - `vf_pp.c`
+ - `vf_pp7.c`
+ - `vf_pullup.c`
+ - `vf_repeatfields.c`
+ - `vf_sab.c`
+ - `vf_smartblur.c`
+ - `vf_spp.c`
+ - `vf_stereo3d.c`
+ - `vf_super2xsai.c`
+ - `vf_tinterlace.c`
+ - `vf_uspp.c`
+ - `vsrc_mptestsrc.c`
+
+Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then
+the configure parameter `--enable-version3` will activate this licensing option
+for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts,
+`COPYING.GPLv3` to learn the exact legal terms that apply in this case.
+
+There are a handful of files under other licensing terms, namely:
+
+* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and
+ `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for
+ licensing details. Specifically note that you must credit the IJG in the
+ documentation accompanying your program if you only distribute executables.
+ You must also indicate any changes including additions and deletions to
+ those three files in the documentation.
+* `tests/reference.pnm` is under the expat license.
+
+
+## External libraries
+
+FFmpeg can be combined with a number of external libraries, which sometimes
+affect the licensing of binaries resulting from the combination.
+
+### Compatible libraries
+
+The following libraries are under GPL:
+- frei0r
+- libcdio
+- librubberband
+- libvidstab
+- libx264
+- libx265
+- libxavs
+- libxvid
+
+When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
+passing `--enable-gpl` to configure.
+
+The OpenCORE and VisualOn libraries are under the Apache License 2.0. That
+license is incompatible with the LGPL v2.1 and the GPL v2, but not with
+version 3 of those licenses. So to combine these libraries with FFmpeg, the
+license version needs to be upgraded by passing `--enable-version3` to configure.
+
+### Incompatible libraries
+
+There are certain libraries you can combine with FFmpeg whose licenses are not
+compatible with the GPL and/or the LGPL. If you wish to enable these
+libraries, even in circumstances that their license may be incompatible, pass
+`--enable-nonfree` to configure. But note that if you enable any of these
+libraries the resulting binary will be under a complex license mix that is
+more restrictive than the LGPL and that may result in additional obligations.
+It is possible that these restrictions cause the resulting binary to be
+unredistributable.
+
+The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are
+incompatible with the GPLv2 and v3. To the best of our knowledge, they are
+compatible with the LGPL.
+
+The NVENC library, while its header file is licensed under the compatible MIT
+license, requires a proprietary binary blob at run time, and is deemed to be
+incompatible with the GPL. We are not certain if it is compatible with the
+LGPL, but we require `--enable-nonfree` even with LGPL configurations in case
+it is not.
+
+
+********************************************************************************
+
+libavcodec/arm/vp8dsp_armv6.S
+
+VP8 ARMv6 optimisations
+
+Copyright (c) 2010 Google Inc.
+Copyright (c) 2010 Rob Clark &lt;rob@ti.com&gt;
+Copyright (c) 2011 Mans Rullgard &lt;mans@mansr.com&gt;
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+This code was partially ported from libvpx, which uses this license:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the
+distribution.
+
+* Neither the name of Google nor the names of its contributors may
+be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+********************************************************************************
+
+libavcodec/x86/xvididct.asm
+
+XVID MPEG-4 VIDEO CODEC
+
+ Conversion from gcc syntax to x264asm syntax with modifications
+ by Christophe Gisquet &lt;christophe.gisquet@gmail.com&gt;
+
+ =========== SSE2 inverse discrete cosine transform ===========
+
+ Copyright(C) 2003 Pascal Massimino &lt;skal@planet-d.net&gt;
+
+ Conversion to gcc syntax with modifications
+ by Alexander Strange &lt;astrange@ithinksw.com&gt;
+
+ Originally from dct/x86_asm/fdct_sse2_skal.asm in Xvid.
+
+ Vertical pass is an implementation of the scheme:
+ Loeffler C., Ligtenberg A., and Moschytz C.S.:
+ Practical Fast 1D DCT Algorithm with Eleven Multiplications,
+ Proc. ICASSP 1989, 988-991.
+
+ Horizontal pass is a double 4x4 vector/matrix multiplication,
+ (see also Intel's Application Note 922:
+ http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
+ Copyright (C) 1999 Intel Corporation)
+
+ More details at http://skal.planet-d.net/coding/dct.html
+
+ ======= MMX and XMM forward discrete cosine transform =======
+
+ Copyright(C) 2001 Peter Ross &lt;pross@xvid.org&gt;
+
+ Originally provided by Intel at AP-922
+ http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
+ (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm)
+ but in a limited edition.
+ New macro implements a column part for precise iDCT
+ The routine precision now satisfies IEEE standard 1180-1990.
+
+ Copyright(C) 2000-2001 Peter Gubanov &lt;peter@elecard.net.ru&gt;
+ Rounding trick Copyright(C) 2000 Michel Lespinasse &lt;walken@zoy.org&gt;
+
+ http://www.elecard.com/peter/idct.html
+ http://www.linuxvideo.org/mpeg2dec/
+
+ These examples contain code fragments for first stage iDCT 8x8
+ (for rows) and first stage DCT 8x8 (for columns)
+
+ conversion to gcc syntax by Michael Niedermayer
+
+ ======================================================================
+
+ This file is part of FFmpeg.
+
+ FFmpeg is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ FFmpeg is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with FFmpeg; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/arm/jrevdct_arm.S
+
+C-like prototype :
+ void j_rev_dct_arm(DCTBLOCK data)
+
+ With DCTBLOCK being a pointer to an array of 64 'signed shorts'
+
+ Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org)
+
+ 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
+ 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.
+
+********************************************************************************
+
+libswresample/version.h
+
+Version macros.
+
+This file is part of libswresample
+
+libswresample is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+libswresample is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with libswresample; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/mips/amrwbdec_mips.c
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Author: Nedeljko Babic (nbabic@mips.com)
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/mips/celp_math_mips.c
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Author: Nedeljko Babic (nbabic@mips.com)
+
+Math operations optimized for MIPS
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavformat/oggparsetheora.c
+
+Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi
+
+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.
+
+********************************************************************************
+
+libavcodec/mips/fft_mips.c
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Author: Stanislav Ocovaj (socovaj@mips.com)
+Author: Zoran Lukic (zoranl@mips.com)
+
+Optimized MDCT/IMDCT and FFT transforms
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/mips/acelp_filters_mips.c
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Author: Nedeljko Babic (nbabic@mips.com)
+
+various filters for ACELP-based codecs optimized for MIPS
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/mips/mpegaudiodsp_mips_float.c
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Author: Bojan Zivkovic (bojan@mips.com)
+
+MPEG Audio decoder optimized for MIPS floating-point architecture
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/mips/acelp_vectors_mips.c
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Author: Nedeljko Babic (nbabic@mips.com)
+
+adaptive and fixed codebook vector operations for ACELP-based codecs
+optimized for MIPS
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/mips/celp_filters_mips.c
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Author: Nedeljko Babic (nbabic@mips.com)
+
+various filters for CELP-based codecs optimized for MIPS
+
+This file is part of FFmpeg.
+
+FFmpeg is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+FFmpeg is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with FFmpeg; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libswresample/swresample.h
+
+Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at)
+
+This file is part of libswresample
+
+libswresample is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+libswresample is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with libswresample; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+********************************************************************************
+
+libavcodec/jfdctfst.c
+libavcodec/jfdctint_template.c
+libavcodec/jrevdct.c
+
+This file is part of the Independent JPEG Group's software.
+
+The authors make NO WARRANTY or representation, either express or implied,
+with respect to this software, its quality, accuracy, merchantability, or
+fitness for a particular purpose. This software is provided "AS IS", and
+you, its user, assume the entire risk as to its quality and accuracy.
+
+This software is copyright (C) 1994-1996, Thomas G. Lane.
+All Rights Reserved except as specified below.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+software (or portions thereof) for any purpose, without fee, subject to
+these conditions:
+(1) If any part of the source code for this software is distributed, then
+this README file must be included, with this copyright and no-warranty
+notice unaltered; and any additions, deletions, or changes to the original
+files must be clearly indicated in accompanying documentation.
+(2) If only executable code is distributed, then the accompanying
+documentation must state that "this software is based in part on the work
+of the Independent JPEG Group".
+(3) Permission for use of this software is granted only if the user accepts
+full responsibility for any undesirable consequences; the authors accept
+NO LIABILITY for damages of any kind.
+
+These conditions apply to any software derived from or based on the IJG
+code, not just to the unmodified library. If you use our work, you ought
+to acknowledge us.
+
+Permission is NOT granted for the use of any IJG author's name or company
+name in advertising or publicity relating to this software or products
+derived from it. This software may be referred to only as "the Independent
+JPEG Group's software".
+
+We specifically permit and encourage the use of this software as the basis
+of commercial products, provided that all warranty or liability claims are
+assumed by the product vendor.
+
+********************************************************************************
+
+libavcodec/fft_fixed_32.c
+libavcodec/fft_init_table.c
+libavcodec/fft_table.h
+libavcodec/mdct_fixed_32.c
+libavcodec/mips/aacdec_mips.c
+libavcodec/mips/aacdec_mips.h
+libavcodec/mips/aacpsdsp_mips.c
+libavcodec/mips/aacsbr_mips.c
+libavcodec/mips/aacsbr_mips.h
+libavcodec/mips/amrwbdec_mips.h
+libavcodec/mips/compute_antialias_fixed.h
+libavcodec/mips/compute_antialias_float.h
+libavcodec/mips/lsp_mips.h
+libavcodec/mips/sbrdsp_mips.c
+libavutil/fixed_dsp.c
+libavutil/fixed_dsp.h
+libavutil/mips/float_dsp_mips.c
+libavutil/mips/libm_mips.h
+libavutil/softfloat_tables.h
+
+Copyright (c) 2012
+MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Authors:
+Branimir Vasic (bvasic@mips.com)
+Darko Laus (darko@mips.com)
+Djordje Pesut (djordje@mips.com)
+Goran Cordasic (goran@mips.com)
+Nedeljko Babic (nedeljko.babic imgtec com)
+Mirjana Vulin (mvulin@mips.com)
+Stanislav Ocovaj (socovaj@mips.com)
+Zoran Lukic (zoranl@mips.com)
+
+********************************************************************************
+
+libavformat/oggdec.c
+libavformat/oggdec.h
+libavformat/oggparseogm.c
+libavformat/oggparsevorbis.c
+
+Copyright (C) 2005 Michael Ahlberg, Måns Rullgård
+
+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.
+
+********************************************************************************
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Fiat-Crypto: Synthesizing Correct-by-Construction Code for Cryptographic Primitives</span>
+<span class="homepage"><a href="https://github.com/mit-plv/fiat-crypto">homepage</a></span>
+<input type="checkbox" hidden id="47">
+<label class="show" for="47" tabindex="0"></label>
+<div class="licence">
+<pre>The MIT License (MIT)
+
+Copyright (c) 2015-2016 the fiat-crypto authors (see
+https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">fips181</span>
+<span class="homepage"><a href="http://www.adel.nursat.kz/apg/">homepage</a></span>
+<input type="checkbox" hidden id="48">
+<label class="show" for="48" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 1999, 2000, 2001, 2002
+Adel I. Mirzazhanov. All rights reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ 1.Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2.Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3.The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ </pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">flac</span>
+<span class="homepage"><a href="http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz">homepage</a></span>
+<input type="checkbox" hidden id="49">
+<label class="show" for="49" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (C) 2000-2009 Josh Coalson
+Copyright (C) 2011-2014 Xiph.Org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">FlatBuffers</span>
+<span class="homepage"><a href="https://github.com/google/flatbuffers">homepage</a></span>
+<input type="checkbox" hidden id="50">
+<label class="show" for="50" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2014 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Flot Javascript/JQuery library for creating graphs</span>
+<span class="homepage"><a href="http://www.flotcharts.org">homepage</a></span>
+<input type="checkbox" hidden id="51">
+<label class="show" for="51" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2007-2013 IOLA and Ole Laursen
+
+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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">fontconfig</span>
+<span class="homepage"><a href="http://www.freedesktop.org/wiki/Software/fontconfig/">homepage</a></span>
+<input type="checkbox" hidden id="52">
+<label class="show" for="52" tabindex="0"></label>
+<div class="licence">
+<pre>fontconfig/COPYING
+
+Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard
+Copyright © 2005 Patrick Lam
+Copyright © 2009 Roozbeh Pournader
+Copyright © 2008,2009 Red Hat, Inc.
+Copyright © 2008 Danilo Šegan
+Copyright © 2012 Google, Inc.
+
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of the author(s) not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. The authors make no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">FreeType</span>
+<span class="homepage"><a href="http://www.freetype.org/">homepage</a></span>
+<input type="checkbox" hidden id="53">
+<label class="show" for="53" tabindex="0"></label>
+<div class="licence">
+<pre> The FreeType Project LICENSE
+ ----------------------------
+
+ 2006-Jan-27
+
+ Copyright 1996-2002, 2006 by
+ David Turner, Robert Wilhelm, and Werner Lemberg
+
+
+
+Introduction
+============
+
+ The FreeType Project is distributed in several archive packages;
+ some of them may contain, in addition to the FreeType font engine,
+ various tools and contributions which rely on, or relate to, the
+ FreeType Project.
+
+ This license applies to all files found in such packages, and
+ which do not fall under their own explicit license. The license
+ affects thus the FreeType font engine, the test programs,
+ documentation and makefiles, at the very least.
+
+ This license was inspired by the BSD, Artistic, and IJG
+ (Independent JPEG Group) licenses, which all encourage inclusion
+ and use of free software in commercial and freeware products
+ alike. As a consequence, its main points are that:
+
+ o We don't promise that this software works. However, we will be
+ interested in any kind of bug reports. (`as is' distribution)
+
+ o You can use this software for whatever you want, in parts or
+ full form, without having to pay us. (`royalty-free' usage)
+
+ o You may not pretend that you wrote this software. If you use
+ it, or only parts of it, in a program, you must acknowledge
+ somewhere in your documentation that you have used the
+ FreeType code. (`credits')
+
+ We specifically permit and encourage the inclusion of this
+ software, with or without modifications, in commercial products.
+ We disclaim all warranties covering The FreeType Project and
+ assume no liability related to The FreeType Project.
+
+
+ Finally, many people asked us for a preferred form for a
+ credit/disclaimer to use in compliance with this license. We thus
+ encourage you to use the following text:
+
+ """
+ Portions of this software are copyright © &lt;year&gt; The FreeType
+ Project (www.freetype.org). All rights reserved.
+ """
+
+ Please replace &lt;year&gt; with the value from the FreeType version you
+ actually use.
+
+
+Legal Terms
+===========
+
+0. Definitions
+--------------
+
+ Throughout this license, the terms `package', `FreeType Project',
+ and `FreeType archive' refer to the set of files originally
+ distributed by the authors (David Turner, Robert Wilhelm, and
+ Werner Lemberg) as the `FreeType Project', be they named as alpha,
+ beta or final release.
+
+ `You' refers to the licensee, or person using the project, where
+ `using' is a generic term including compiling the project's source
+ code as well as linking it to form a `program' or `executable'.
+ This program is referred to as `a program using the FreeType
+ engine'.
+
+ This license applies to all files distributed in the original
+ FreeType Project, including all source code, binaries and
+ documentation, unless otherwise stated in the file in its
+ original, unmodified form as distributed in the original archive.
+ If you are unsure whether or not a particular file is covered by
+ this license, you must contact us to verify this.
+
+ The FreeType Project is copyright (C) 1996-2000 by David Turner,
+ Robert Wilhelm, and Werner Lemberg. All rights reserved except as
+ specified below.
+
+1. No Warranty
+--------------
+
+ THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
+ USE, OF THE FREETYPE PROJECT.
+
+2. Redistribution
+-----------------
+
+ This license grants a worldwide, royalty-free, perpetual and
+ irrevocable right and license to use, execute, perform, compile,
+ display, copy, create derivative works of, distribute and
+ sublicense the FreeType Project (in both source and object code
+ forms) and derivative works thereof for any purpose; and to
+ authorize others to exercise some or all of the rights granted
+ herein, subject to the following conditions:
+
+ o Redistribution of source code must retain this license file
+ (`FTL.TXT') unaltered; any additions, deletions or changes to
+ the original files must be clearly indicated in accompanying
+ documentation. The copyright notices of the unaltered,
+ original files must be preserved in all copies of source
+ files.
+
+ o Redistribution in binary form must provide a disclaimer that
+ states that the software is based in part of the work of the
+ FreeType Team, in the distribution documentation. We also
+ encourage you to put an URL to the FreeType web page in your
+ documentation, though this isn't mandatory.
+
+ These conditions apply to any software derived from or based on
+ the FreeType Project, not just the unmodified files. If you use
+ our work, you must acknowledge us. However, no fee need be paid
+ to us.
+
+3. Advertising
+--------------
+
+ Neither the FreeType authors and contributors nor you shall use
+ the name of the other for commercial, advertising, or promotional
+ purposes without specific prior written permission.
+
+ We suggest, but do not require, that you use one or more of the
+ following phrases to refer to this software in your documentation
+ or advertising materials: `FreeType Project', `FreeType Engine',
+ `FreeType library', or `FreeType Distribution'.
+
+ As you have not signed this license, you are not required to
+ accept it. However, as the FreeType Project is copyrighted
+ material, only this license, or another one contracted with the
+ authors, grants you the right to use, distribute, and modify it.
+ Therefore, by using, distributing, or modifying the FreeType
+ Project, you indicate that you understand and accept all the terms
+ of this license.
+
+4. Contacts
+-----------
+
+ There are two mailing lists related to FreeType:
+
+ o freetype@nongnu.org
+
+ Discusses general use and applications of FreeType, as well as
+ future and wanted additions to the library and distribution.
+ If you are looking for support, start in this list if you
+ haven't found anything to help you in the documentation.
+
+ o freetype-devel@nongnu.org
+
+ Discusses bugs, as well as engine internals, design issues,
+ specific licenses, porting, etc.
+
+ Our home page can be found at
+
+ https://www.freetype.org
+
+
+--- end of FTL.TXT ---
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">gestures</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/chromiumos/platform/gestures">homepage</a></span>
+<input type="checkbox" hidden id="54">
+<label class="show" for="54" tabindex="0"></label>
+<div class="licence">
+<pre>gestures/LICENSE
+
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">GifPlayer Animated GIF Library</span>
+<span class="homepage"><a href="http://android-gifview.googlecode.com/svn/!svn/bc/8/trunk/">homepage</a></span>
+<input type="checkbox" hidden id="55">
+<label class="show" for="55" tabindex="0"></label>
+<div class="licence">
+<pre> Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Google Cache Invalidation API</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/chromium/src/+/master/third_party/cacheinvalidation/README.chromium">homepage</a></span>
+<input type="checkbox" hidden id="56">
+<label class="show" for="56" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Google fork of Khronos reference front-end for GLSL and ESSL</span>
+<span class="homepage"><a href="https://github.com/google/glslang">homepage</a></span>
+<input type="checkbox" hidden id="57">
+<label class="show" for="57" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2015-2016 The Khronos Group Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and/or associated documentation files (the
+"Materials"), to deal in the Materials without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Materials, and to
+permit persons to whom the Materials are 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 Materials.
+
+MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+ https://www.khronos.org/registry/
+
+THE MATERIALS ARE 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
+MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Google Input Tools</span>
+<span class="homepage"><a href="https://github.com/googlei18n/google-input-tools.git">homepage</a></span>
+<input type="checkbox" hidden id="58">
+<label class="show" for="58" tabindex="0"></label>
+<div class="licence">
+<pre> Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2013 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Google Toolbox for Mac</span>
+<span class="homepage"><a href="https://github.com/google/google-toolbox-for-mac">homepage</a></span>
+<input type="checkbox" hidden id="59">
+<label class="show" for="59" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">google-glog's symbolization library</span>
+<span class="homepage"><a href="https://github.com/google/glog">homepage</a></span>
+<input type="checkbox" hidden id="60">
+<label class="show" for="60" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright (c) 2006, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">google-jstemplate</span>
+<span class="homepage"><a href="http://code.google.com/p/google-jstemplate/">homepage</a></span>
+<input type="checkbox" hidden id="61">
+<label class="show" for="61" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">GVR Android SDK</span>
+<span class="homepage"><a href="https://github.com/googlevr/gvr-android-sdk">homepage</a></span>
+<input type="checkbox" hidden id="62">
+<label class="show" for="62" tabindex="0"></label>
+<div class="licence">
+<pre> Copyright (c) 2015, Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+====================
+Open Source Licenses
+====================
+
+This software may use portions of the following libraries subject to the accompanying licenses:
+
+****************************
+chromium_audio
+****************************
+// Copyright 2014 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+curl
+****************************
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2014, Daniel Stenberg, &lt;daniel@haxx.se&gt;.
+
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 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.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+
+****************************
+dynamic_annotations
+****************************
+Copyright (c) 2008-2009, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+eigen3
+****************************
+Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:
+ http://www.mozilla.org/MPL/2.0/
+ http://www.mozilla.org/MPL/2.0/FAQ.html
+
+Some files contain third-party code under BSD or LGPL licenses, whence
+the other COPYING.* files here.
+
+All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later.
+For this reason, the COPYING.LGPL file contains the LGPL 2.1 text.
+
+If you want to guarantee that the Eigen code that you are #including
+is licensed under the MPL2 and possibly more permissive licenses (like
+BSD), #define this preprocessor symbol: EIGEN_MPL2_ONLY
+For example, with most compilers, you could add this to your project
+ CXXFLAGS: -DEIGEN_MPL2_ONLY
+This will cause a compilation error to be generated if you #include
+any code that is LGPL licensed.
+
+----------------------------------------------------------------------
+Following applies to:
+./test/mapstaticmethods.cpp
+./test/schur_real.cpp
+./test/prec_inverse_4x4.cpp
+./test/smallvectors.cpp
+./test/redux.cpp
+./test/special_numbers.cpp
+./test/adjoint.cpp
+./test/resize.cpp
+./test/mixingtypes.cpp
+./test/product_trmv.cpp
+./test/sparse_solvers.cpp
+./test/cholesky.cpp
+./test/geo_quaternion.cpp
+./test/miscmatrices.cpp
+./test/stddeque.cpp
+./test/integer_types.cpp
+./test/product_large.cpp
+./test/eigensolver_generic.cpp
+./test/householder.cpp
+./test/geo_orthomethods.cpp
+./test/array_for_matrix.cpp
+./test/sparseLM.cpp
+./test/upperbidiagonalization.cpp
+./test/nomalloc.cpp
+./test/packetmath.cpp
+./test/jacobisvd.cpp
+./test/geo_transformations.cpp
+./test/swap.cpp
+./test/eigensolver_selfadjoint.cpp
+./test/inverse.cpp
+./test/product_selfadjoint.cpp
+./test/product_trsolve.cpp
+./test/product_extra.cpp
+./test/sparse_solver.h
+./test/mapstride.cpp
+./test/mapped_matrix.cpp
+./test/geo_eulerangles.cpp
+./test/eigen2support.cpp
+./test/denseLM.cpp
+./test/stdvector.cpp
+./test/nesting_ops.cpp
+./test/sparse_permutations.cpp
+./test/zerosized.cpp
+./test/exceptions.cpp
+./test/vectorwiseop.cpp
+./test/cwiseop.cpp
+./test/basicstuff.cpp
+./test/product_trmm.cpp
+./test/linearstructure.cpp
+./test/sparse_product.cpp
+./test/stdvector_overload.cpp
+./test/stable_norm.cpp
+./test/umeyama.cpp
+./test/unalignedcount.cpp
+./test/triangular.cpp
+./test/product_mmtr.cpp
+./test/sparse_basic.cpp
+./test/sparse_vector.cpp
+./test/meta.cpp
+./test/real_qz.cpp
+./test/ref.cpp
+./test/eigensolver_complex.cpp
+./test/cholmod_support.cpp
+./test/conjugate_gradient.cpp
+./test/sparse.h
+./test/simplicial_cholesky.cpp
+./test/bicgstab.cpp
+./test/dynalloc.cpp
+./test/product_notemporary.cpp
+./test/geo_hyperplane.cpp
+./test/lu.cpp
+./test/qr.cpp
+./test/hessenberg.cpp
+./test/sizeof.cpp
+./test/main.h
+./test/selfadjoint.cpp
+./test/permutationmatrices.cpp
+./test/superlu_support.cpp
+./test/qtvector.cpp
+./test/geo_homogeneous.cpp
+./test/determinant.cpp
+./test/array_reverse.cpp
+./test/unalignedassert.cpp
+./test/stdlist.cpp
+./test/product_symm.cpp
+./test/corners.cpp
+./test/dontalign.cpp
+./test/visitor.cpp
+./test/geo_alignedbox.cpp
+./test/diagonalmatrices.cpp
+./test/product_small.cpp
+./test/eigensolver_generalized_real.cpp
+./test/umfpack_support.cpp
+./test/first_aligned.cpp
+./test/qr_fullpivoting.cpp
+./test/array_replicate.cpp
+./test/geo_parametrizedline.cpp
+./test/eigen2/eigen2_unalignedassert.cpp
+./test/eigen2/eigen2_prec_inverse_4x4.cpp
+./test/eigen2/eigen2_alignedbox.cpp
+./test/eigen2/eigen2_sparse_product.cpp
+./test/eigen2/eigen2_meta.cpp
+./test/eigen2/eigen2_nomalloc.cpp
+./test/eigen2/eigen2_visitor.cpp
+./test/eigen2/eigen2_packetmath.cpp
+./test/eigen2/eigen2_svd.cpp
+./test/eigen2/eigen2_mixingtypes.cpp
+./test/eigen2/eigen2_qr.cpp
+./test/eigen2/eigen2_cwiseop.cpp
+./test/eigen2/eigen2_geometry_with_eigen2_prefix.cpp
+./test/eigen2/eigen2_smallvectors.cpp
+./test/eigen2/eigen2_commainitializer.cpp
+./test/eigen2/eigen2_sparse_solvers.cpp
+./test/eigen2/eigen2_hyperplane.cpp
+./test/eigen2/eigen2_eigensolver.cpp
+./test/eigen2/eigen2_linearstructure.cpp
+./test/eigen2/eigen2_sizeof.cpp
+./test/eigen2/eigen2_parametrizedline.cpp
+./test/eigen2/eigen2_lu.cpp
+./test/eigen2/eigen2_adjoint.cpp
+./test/eigen2/eigen2_geometry.cpp
+./test/eigen2/eigen2_stdvector.cpp
+./test/eigen2/eigen2_newstdvector.cpp
+./test/eigen2/eigen2_submatrices.cpp
+./test/eigen2/sparse.h
+./test/eigen2/eigen2_swap.cpp
+./test/eigen2/eigen2_triangular.cpp
+./test/eigen2/eigen2_basicstuff.cpp
+./test/eigen2/gsl_helper.h
+./test/eigen2/eigen2_dynalloc.cpp
+./test/eigen2/eigen2_array.cpp
+./test/eigen2/eigen2_map.cpp
+./test/eigen2/main.h
+./test/eigen2/eigen2_miscmatrices.cpp
+./test/eigen2/eigen2_product_large.cpp
+./test/eigen2/eigen2_first_aligned.cpp
+./test/eigen2/eigen2_cholesky.cpp
+./test/eigen2/eigen2_determinant.cpp
+./test/eigen2/eigen2_sum.cpp
+./test/eigen2/eigen2_inverse.cpp
+./test/eigen2/eigen2_regression.cpp
+./test/eigen2/eigen2_product_small.cpp
+./test/eigen2/eigen2_qtvector.cpp
+./test/eigen2/eigen2_sparse_vector.cpp
+./test/eigen2/product.h
+./test/eigen2/eigen2_sparse_basic.cpp
+./test/eigen2/eigen2_bug_132.cpp
+./test/array.cpp
+./test/product_syrk.cpp
+./test/commainitializer.cpp
+./test/conservative_resize.cpp
+./test/qr_colpivoting.cpp
+./test/nullary.cpp
+./test/bandmatrix.cpp
+./test/pastix_support.cpp
+./test/product.h
+./test/block.cpp
+./test/vectorization_logic.cpp
+./test/jacobi.cpp
+./test/diagonal.cpp
+./test/schur_complex.cpp
+./test/sizeoverflow.cpp
+./bench/BenchTimer.h
+./bench/benchFFT.cpp
+./bench/eig33.cpp
+./bench/spbench/spbenchsolver.h
+./bench/spbench/spbenchstyle.h
+./lapack/complex_double.cpp
+./lapack/cholesky.cpp
+./lapack/lapack_common.h
+./lapack/eigenvalues.cpp
+./lapack/single.cpp
+./lapack/lu.cpp
+./lapack/complex_single.cpp
+./lapack/double.cpp
+./demos/mix_eigen_and_c/binary_library.cpp
+./demos/mix_eigen_and_c/binary_library.h
+./demos/mix_eigen_and_c/example.c
+./demos/mandelbrot/mandelbrot.cpp
+./demos/mandelbrot/mandelbrot.h
+./demos/opengl/icosphere.cpp
+./demos/opengl/icosphere.h
+./demos/opengl/camera.cpp
+./demos/opengl/quaternion_demo.h
+./demos/opengl/camera.h
+./demos/opengl/trackball.h
+./demos/opengl/gpuhelper.h
+./demos/opengl/trackball.cpp
+./demos/opengl/gpuhelper.cpp
+./demos/opengl/quaternion_demo.cpp
+./debug/gdb/printers.py
+./unsupported/test/minres.cpp
+./unsupported/test/openglsupport.cpp
+./unsupported/test/jacobisvd.cpp
+./unsupported/test/dgmres.cpp
+./unsupported/test/matrix_square_root.cpp
+./unsupported/test/bdcsvd.cpp
+./unsupported/test/matrix_exponential.cpp
+./unsupported/test/forward_adolc.cpp
+./unsupported/test/polynomialsolver.cpp
+./unsupported/test/matrix_function.cpp
+./unsupported/test/sparse_extra.cpp
+./unsupported/test/matrix_functions.h
+./unsupported/test/svd_common.h
+./unsupported/test/FFTW.cpp
+./unsupported/test/alignedvector3.cpp
+./unsupported/test/autodiff.cpp
+./unsupported/test/gmres.cpp
+./unsupported/test/BVH.cpp
+./unsupported/test/levenberg_marquardt.cpp
+./unsupported/test/matrix_power.cpp
+./unsupported/test/kronecker_product.cpp
+./unsupported/test/splines.cpp
+./unsupported/test/polynomialutils.cpp
+./unsupported/bench/bench_svd.cpp
+./unsupported/Eigen/IterativeSolvers
+./unsupported/Eigen/src/IterativeSolvers/DGMRES.h
+./unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h
+./unsupported/Eigen/src/IterativeSolvers/GMRES.h
+./unsupported/Eigen/src/IterativeSolvers/IncompleteCholesky.h
+./unsupported/Eigen/src/IterativeSolvers/Scaling.h
+./unsupported/Eigen/src/IterativeSolvers/MINRES.h
+./unsupported/Eigen/src/SparseExtra/RandomSetter.h
+./unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h
+./unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h
+./unsupported/Eigen/src/SparseExtra/MarketIO.h
+./unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h
+./unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h
+./unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h
+./unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h
+./unsupported/Eigen/src/BVH/BVAlgorithms.h
+./unsupported/Eigen/src/BVH/KdBVH.h
+./unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h
+./unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+./unsupported/Eigen/src/AutoDiff/AutoDiffVector.h
+./unsupported/Eigen/src/Splines/Spline.h
+./unsupported/Eigen/src/Splines/SplineFitting.h
+./unsupported/Eigen/src/Splines/SplineFwd.h
+./unsupported/Eigen/src/SVD/JacobiSVD.h
+./unsupported/Eigen/src/SVD/BDCSVD.h
+./unsupported/Eigen/src/SVD/SVDBase.h
+./unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h
+./unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h
+./unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h
+./unsupported/Eigen/src/MatrixFunctions/StemFunction.h
+./unsupported/Eigen/src/MatrixFunctions/MatrixPower.h
+./unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
+./unsupported/Eigen/src/MatrixFunctions/MatrixFunctionAtomic.h
+./unsupported/Eigen/src/MoreVectorization/MathFunctions.h
+./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h
+./unsupported/Eigen/src/FFT/ei_fftw_impl.h
+./unsupported/Eigen/src/FFT/ei_kissfft_impl.h
+./unsupported/Eigen/src/Polynomials/PolynomialSolver.h
+./unsupported/Eigen/src/Polynomials/Companion.h
+./unsupported/Eigen/src/Polynomials/PolynomialUtils.h
+./unsupported/Eigen/src/NumericalDiff/NumericalDiff.h
+./unsupported/Eigen/src/Skyline/SkylineProduct.h
+./unsupported/Eigen/src/Skyline/SkylineMatrixBase.h
+./unsupported/Eigen/src/Skyline/SkylineStorage.h
+./unsupported/Eigen/src/Skyline/SkylineUtil.h
+./unsupported/Eigen/src/Skyline/SkylineInplaceLU.h
+./unsupported/Eigen/src/Skyline/SkylineMatrix.h
+./unsupported/Eigen/SparseExtra
+./unsupported/Eigen/AdolcForward
+./unsupported/Eigen/KroneckerProduct
+./unsupported/Eigen/NonLinearOptimization
+./unsupported/Eigen/BVH
+./unsupported/Eigen/OpenGLSupport
+./unsupported/Eigen/ArpackSupport
+./unsupported/Eigen/AutoDiff
+./unsupported/Eigen/Splines
+./unsupported/Eigen/MPRealSupport
+./unsupported/Eigen/MatrixFunctions
+./unsupported/Eigen/MoreVectorization
+./unsupported/Eigen/LevenbergMarquardt
+./unsupported/Eigen/AlignedVector3
+./unsupported/Eigen/FFT
+./unsupported/Eigen/Polynomials
+./unsupported/Eigen/NumericalDiff
+./unsupported/Eigen/Skyline
+./COPYING.README
+./COPYING.README
+./LICENSE
+./LICENSE
+./LICENSE
+./Eigen/Eigen2Support
+./Eigen/src/Eigen2Support/VectorBlock.h
+./Eigen/src/Eigen2Support/Cwise.h
+./Eigen/src/Eigen2Support/Minor.h
+./Eigen/src/Eigen2Support/Lazy.h
+./Eigen/src/Eigen2Support/Memory.h
+./Eigen/src/Eigen2Support/MathFunctions.h
+./Eigen/src/Eigen2Support/Geometry/AlignedBox.h
+./Eigen/src/Eigen2Support/Geometry/Hyperplane.h
+./Eigen/src/Eigen2Support/Geometry/Quaternion.h
+./Eigen/src/Eigen2Support/Geometry/Rotation2D.h
+./Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h
+./Eigen/src/Eigen2Support/Geometry/RotationBase.h
+./Eigen/src/Eigen2Support/Geometry/Translation.h
+./Eigen/src/Eigen2Support/Geometry/Scaling.h
+./Eigen/src/Eigen2Support/Geometry/AngleAxis.h
+./Eigen/src/Eigen2Support/Geometry/Transform.h
+./Eigen/src/Eigen2Support/TriangularSolver.h
+./Eigen/src/Eigen2Support/LU.h
+./Eigen/src/Eigen2Support/QR.h
+./Eigen/src/Eigen2Support/SVD.h
+./Eigen/src/Eigen2Support/Meta.h
+./Eigen/src/Eigen2Support/Block.h
+./Eigen/src/Eigen2Support/Macros.h
+./Eigen/src/Eigen2Support/LeastSquares.h
+./Eigen/src/Eigen2Support/CwiseOperators.h
+./Eigen/src/Jacobi/Jacobi.h
+./Eigen/src/misc/Kernel.h
+./Eigen/src/misc/SparseSolve.h
+./Eigen/src/misc/Solve.h
+./Eigen/src/misc/Image.h
+./Eigen/src/SparseCore/SparseColEtree.h
+./Eigen/src/SparseCore/SparseTranspose.h
+./Eigen/src/SparseCore/SparseUtil.h
+./Eigen/src/SparseCore/SparseCwiseBinaryOp.h
+./Eigen/src/SparseCore/SparseDiagonalProduct.h
+./Eigen/src/SparseCore/SparseProduct.h
+./Eigen/src/SparseCore/SparseDot.h
+./Eigen/src/SparseCore/SparseCwiseUnaryOp.h
+./Eigen/src/SparseCore/SparseSparseProductWithPruning.h
+./Eigen/src/SparseCore/SparseBlock.h
+./Eigen/src/SparseCore/SparseDenseProduct.h
+./Eigen/src/SparseCore/CompressedStorage.h
+./Eigen/src/SparseCore/SparseMatrixBase.h
+./Eigen/src/SparseCore/MappedSparseMatrix.h
+./Eigen/src/SparseCore/SparseTriangularView.h
+./Eigen/src/SparseCore/SparseView.h
+./Eigen/src/SparseCore/SparseFuzzy.h
+./Eigen/src/SparseCore/TriangularSolver.h
+./Eigen/src/SparseCore/SparseSelfAdjointView.h
+./Eigen/src/SparseCore/SparseMatrix.h
+./Eigen/src/SparseCore/SparseVector.h
+./Eigen/src/SparseCore/AmbiVector.h
+./Eigen/src/SparseCore/ConservativeSparseSparseProduct.h
+./Eigen/src/SparseCore/SparseRedux.h
+./Eigen/src/SparseCore/SparsePermutation.h
+./Eigen/src/Eigenvalues/RealSchur.h
+./Eigen/src/Eigenvalues/ComplexEigenSolver.h
+./Eigen/src/Eigenvalues/GeneralizedEigenSolver.h
+./Eigen/src/Eigenvalues/ComplexSchur.h
+./Eigen/src/Eigenvalues/RealQZ.h
+./Eigen/src/Eigenvalues/EigenSolver.h
+./Eigen/src/Eigenvalues/HessenbergDecomposition.h
+./Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h
+./Eigen/src/Eigenvalues/Tridiagonalization.h
+./Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
+./Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h
+./Eigen/src/SuperLUSupport/SuperLUSupport.h
+./Eigen/src/StlSupport/StdDeque.h
+./Eigen/src/StlSupport/StdVector.h
+./Eigen/src/StlSupport/StdList.h
+./Eigen/src/StlSupport/details.h
+./Eigen/src/SparseQR/SparseQR.h
+./Eigen/src/LU/Inverse.h
+./Eigen/src/LU/arch/Inverse_SSE.h
+./Eigen/src/LU/Determinant.h
+./Eigen/src/LU/PartialPivLU.h
+./Eigen/src/LU/FullPivLU.h
+./Eigen/src/UmfPackSupport/UmfPackSupport.h
+./Eigen/src/OrderingMethods/Ordering.h
+./Eigen/src/OrderingMethods/Eigen_Colamd.h
+./Eigen/src/QR/HouseholderQR.h
+./Eigen/src/QR/ColPivHouseholderQR.h
+./Eigen/src/QR/FullPivHouseholderQR.h
+./Eigen/src/SVD/JacobiSVD.h
+./Eigen/src/SVD/UpperBidiagonalization.h
+./Eigen/src/Geometry/OrthoMethods.h
+./Eigen/src/Geometry/AlignedBox.h
+./Eigen/src/Geometry/Hyperplane.h
+./Eigen/src/Geometry/Quaternion.h
+./Eigen/src/Geometry/EulerAngles.h
+./Eigen/src/Geometry/Rotation2D.h
+./Eigen/src/Geometry/ParametrizedLine.h
+./Eigen/src/Geometry/RotationBase.h
+./Eigen/src/Geometry/arch/Geometry_SSE.h
+./Eigen/src/Geometry/Umeyama.h
+./Eigen/src/Geometry/Homogeneous.h
+./Eigen/src/Geometry/Translation.h
+./Eigen/src/Geometry/Scaling.h
+./Eigen/src/Geometry/AngleAxis.h
+./Eigen/src/Geometry/Transform.h
+./Eigen/src/plugins/BlockMethods.h
+./Eigen/src/plugins/CommonCwiseUnaryOps.h
+./Eigen/src/plugins/CommonCwiseBinaryOps.h
+./Eigen/src/plugins/MatrixCwiseUnaryOps.h
+./Eigen/src/plugins/MatrixCwiseBinaryOps.h
+./Eigen/src/Householder/Householder.h
+./Eigen/src/Householder/HouseholderSequence.h
+./Eigen/src/Householder/BlockHouseholder.h
+./Eigen/src/Core/VectorBlock.h
+./Eigen/src/Core/Matrix.h
+./Eigen/src/Core/Ref.h
+./Eigen/src/Core/SelfAdjointView.h
+./Eigen/src/Core/MathFunctions.h
+./Eigen/src/Core/GlobalFunctions.h
+./Eigen/src/Core/MapBase.h
+./Eigen/src/Core/EigenBase.h
+./Eigen/src/Core/GenericPacketMath.h
+./Eigen/src/Core/NestByValue.h
+./Eigen/src/Core/CwiseUnaryOp.h
+./Eigen/src/Core/SolveTriangular.h
+./Eigen/src/Core/Fuzzy.h
+./Eigen/src/Core/Visitor.h
+./Eigen/src/Core/Map.h
+./Eigen/src/Core/NoAlias.h
+./Eigen/src/Core/Diagonal.h
+./Eigen/src/Core/StableNorm.h
+./Eigen/src/Core/CoreIterators.h
+./Eigen/src/Core/products/Parallelizer.h
+./Eigen/src/Core/products/SelfadjointMatrixVector.h
+./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
+./Eigen/src/Core/products/TriangularSolverMatrix.h
+./Eigen/src/Core/products/GeneralMatrixMatrix.h
+./Eigen/src/Core/products/SelfadjointProduct.h
+./Eigen/src/Core/products/CoeffBasedProduct.h
+./Eigen/src/Core/products/TriangularMatrixVector.h
+./Eigen/src/Core/products/SelfadjointMatrixMatrix.h
+./Eigen/src/Core/products/TriangularSolverVector.h
+./Eigen/src/Core/products/SelfadjointRank2Update.h
+./Eigen/src/Core/products/GeneralBlockPanelKernel.h
+./Eigen/src/Core/products/GeneralMatrixVector.h
+./Eigen/src/Core/products/TriangularMatrixMatrix.h
+./Eigen/src/Core/Reverse.h
+./Eigen/src/Core/BooleanRedux.h
+./Eigen/src/Core/Replicate.h
+./Eigen/src/Core/arch/AltiVec/PacketMath.h
+./Eigen/src/Core/arch/AltiVec/Complex.h
+./Eigen/src/Core/arch/SSE/PacketMath.h
+./Eigen/src/Core/arch/SSE/Complex.h
+./Eigen/src/Core/arch/SSE/MathFunctions.h
+./Eigen/src/Core/arch/NEON/PacketMath.h
+./Eigen/src/Core/arch/NEON/Complex.h
+./Eigen/src/Core/arch/Default/Settings.h
+./Eigen/src/Core/CwiseUnaryView.h
+./Eigen/src/Core/Array.h
+./Eigen/src/Core/ArrayWrapper.h
+./Eigen/src/Core/Swap.h
+./Eigen/src/Core/Transpositions.h
+./Eigen/src/Core/Random.h
+./Eigen/src/Core/IO.h
+./Eigen/src/Core/SelfCwiseBinaryOp.h
+./Eigen/src/Core/VectorwiseOp.h
+./Eigen/src/Core/Select.h
+./Eigen/src/Core/ArrayBase.h
+./Eigen/src/Core/DenseCoeffsBase.h
+./Eigen/src/Core/DiagonalProduct.h
+./Eigen/src/Core/Assign.h
+./Eigen/src/Core/Redux.h
+./Eigen/src/Core/ForceAlignedAccess.h
+./Eigen/src/Core/BandMatrix.h
+./Eigen/src/Core/PlainObjectBase.h
+./Eigen/src/Core/DenseBase.h
+./Eigen/src/Core/Flagged.h
+./Eigen/src/Core/CwiseBinaryOp.h
+./Eigen/src/Core/ProductBase.h
+./Eigen/src/Core/TriangularMatrix.h
+./Eigen/src/Core/Transpose.h
+./Eigen/src/Core/DiagonalMatrix.h
+./Eigen/src/Core/Dot.h
+./Eigen/src/Core/Functors.h
+./Eigen/src/Core/PermutationMatrix.h
+./Eigen/src/Core/NumTraits.h
+./Eigen/src/Core/MatrixBase.h
+./Eigen/src/Core/DenseStorage.h
+./Eigen/src/Core/util/Memory.h
+./Eigen/src/Core/util/StaticAssert.h
+./Eigen/src/Core/util/BlasUtil.h
+./Eigen/src/Core/util/MatrixMapper.h
+./Eigen/src/Core/util/XprHelper.h
+./Eigen/src/Core/util/ForwardDeclarations.h
+./Eigen/src/Core/util/Meta.h
+./Eigen/src/Core/util/Macros.h
+./Eigen/src/Core/util/Constants.h
+./Eigen/src/Core/CwiseNullaryOp.h
+./Eigen/src/Core/Block.h
+./Eigen/src/Core/GeneralProduct.h
+./Eigen/src/Core/CommaInitializer.h
+./Eigen/src/Core/ReturnByValue.h
+./Eigen/src/Core/Stride.h
+./Eigen/src/SPQRSupport/SuiteSparseQRSupport.h
+./Eigen/src/SparseLU/SparseLU_column_dfs.h
+./Eigen/src/SparseLU/SparseLU_panel_dfs.h
+./Eigen/src/SparseLU/SparseLU_relax_snode.h
+./Eigen/src/SparseLU/SparseLU_panel_bmod.h
+./Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h
+./Eigen/src/SparseLU/SparseLU_Utils.h
+./Eigen/src/SparseLU/SparseLU_gemm_kernel.h
+./Eigen/src/SparseLU/SparseLU_kernel_bmod.h
+./Eigen/src/SparseLU/SparseLU_pivotL.h
+./Eigen/src/SparseLU/SparseLU_Memory.h
+./Eigen/src/SparseLU/SparseLU_heap_relax_snode.h
+./Eigen/src/SparseLU/SparseLUImpl.h
+./Eigen/src/SparseLU/SparseLU_copy_to_ucol.h
+./Eigen/src/SparseLU/SparseLU_Structs.h
+./Eigen/src/SparseLU/SparseLU.h
+./Eigen/src/SparseLU/SparseLU_column_bmod.h
+./Eigen/src/SparseLU/SparseLU_pruneL.h
+./Eigen/src/IterativeLinearSolvers/IncompleteLUT.h
+./Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h
+./Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h
+./Eigen/src/IterativeLinearSolvers/ConjugateGradient.h
+./Eigen/src/IterativeLinearSolvers/BiCGSTAB.h
+./Eigen/src/SparseCholesky/SimplicialCholesky.h
+./Eigen/src/Cholesky/LDLT.h
+./Eigen/src/Cholesky/LLT.h
+./Eigen/src/CholmodSupport/CholmodSupport.h
+./Eigen/src/PaStiXSupport/PaStiXSupport.h
+./Eigen/src/MetisSupport/MetisSupport.h
+./Eigen/StdVector
+./Eigen/Core
+./Eigen/SparseLU
+./Eigen/StdList
+./Eigen/StdDeque
+./Eigen/SparseCholesky
+./scripts/relicense.py
+./scripts/relicense.py
+./blas/BandTriangularSolver.h
+./blas/PackedTriangularMatrixVector.h
+./blas/complex_double.cpp
+./blas/level2_real_impl.h
+./blas/level1_cplx_impl.h
+./blas/level1_impl.h
+./blas/level1_real_impl.h
+./blas/level3_impl.h
+./blas/single.cpp
+./blas/level2_cplx_impl.h
+./blas/PackedSelfadjointProduct.h
+./blas/Rank2Update.h
+./blas/complex_single.cpp
+./blas/PackedTriangularSolverVector.h
+./blas/double.cpp
+./blas/common.h
+./blas/level2_impl.h
+./blas/GeneralRank1Update.h
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
+----------------------------------------------------------------------
+Following applies to:
+./doc/UsingIntelMKL.dox
+./doc/UsingIntelMKL.dox
+./Eigen/src/Eigenvalues/ComplexSchur_MKL.h
+./Eigen/src/Eigenvalues/ComplexSchur_MKL.h
+./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h
+./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h
+./Eigen/src/Eigenvalues/RealSchur_MKL.h
+./Eigen/src/Eigenvalues/RealSchur_MKL.h
+./Eigen/src/LU/arch/Inverse_SSE.h
+./Eigen/src/LU/arch/Inverse_SSE.h
+./Eigen/src/LU/PartialPivLU_MKL.h
+./Eigen/src/LU/PartialPivLU_MKL.h
+./Eigen/src/QR/HouseholderQR_MKL.h
+./Eigen/src/QR/HouseholderQR_MKL.h
+./Eigen/src/QR/ColPivHouseholderQR_MKL.h
+./Eigen/src/QR/ColPivHouseholderQR_MKL.h
+./Eigen/src/SVD/JacobiSVD_MKL.h
+./Eigen/src/SVD/JacobiSVD_MKL.h
+./Eigen/src/PardisoSupport/PardisoSupport.h
+./Eigen/src/PardisoSupport/PardisoSupport.h
+./Eigen/src/Core/Assign_MKL.h
+./Eigen/src/Core/Assign_MKL.h
+./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h
+./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h
+./Eigen/src/Core/products/GeneralMatrixVector_MKL.h
+./Eigen/src/Core/products/GeneralMatrixVector_MKL.h
+./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h
+./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h
+./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h
+./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h
+./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h
+./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h
+./Eigen/src/Core/products/TriangularMatrixVector_MKL.h
+./Eigen/src/Core/products/TriangularMatrixVector_MKL.h
+./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h
+./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h
+./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h
+./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h
+./Eigen/src/Core/util/MKL_support.h
+./Eigen/src/Core/util/MKL_support.h
+./Eigen/src/Cholesky/LLT_MKL.h
+./Eigen/src/Cholesky/LLT_MKL.h
+
+/*
+ Copyright (c) 2011, Intel Corporation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer. *
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the
+ distribution. * Neither the name of Intel Corporation nor the
+ names of its contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+----------------------------------------------------------------------
+Following applies to:
+ everything under ./bench/btl
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds
+of works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal,
+family, or household purposes, or (2) anything designed or sold for
+incorporation into a dwelling. In determining whether a product is a
+consumer product, doubtful cases shall be resolved in favor of
+coverage. For a particular product received by a particular user,
+"normally used" refers to a typical or common use of that class of
+product, regardless of the status of the particular user or of the way
+in which the particular user actually uses, or expects or is expected
+to use, the product. A product is a consumer product regardless of
+whether the product has substantial commercial, industrial or
+non-consumer uses, unless such uses represent the only significant
+mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to
+install and execute modified versions of a covered work in that User
+Product from a modified version of its Corresponding Source. The
+information must suffice to ensure that the continued functioning of
+the modified object code is in no case prevented or interfered with
+solely because modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include
+a requirement to continue to provide support service, warranty, or
+updates for a work that has been modified or installed by the
+recipient, or for the User Product in which it has been modified or
+installed. Access to a network may be denied when the modification
+itself materially and adversely affects the operation of the network
+or violates the rules and protocols for communication across the
+network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material
+you add to a covered work, you may (if authorized by the copyright
+holders of that material) supplement the terms of this License with
+terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions
+ of it) with contractual assumptions of liability to the recipient,
+ for any liability that these contractual assumptions directly
+ impose on those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement
+or otherwise) that contradict the conditions of this License, they do
+not excuse you from the conditions of this License. If you cannot
+convey a covered work so as to satisfy simultaneously your obligations
+under this License and any other pertinent obligations, then as a
+consequence you may not convey it at all. For example, if you agree
+to terms that obligate you to collect a royalty for further conveying
+from those to whom you convey the Program, the only way you could
+satisfy both those terms and this License would be to refrain entirely
+from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
+WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
+CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
+AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
+(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the program's name and a brief idea of what it
+ does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This program is free software: you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see
+ &lt;http://www.gnu.org/licenses/&gt;.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ &lt;program&gt; Copyright (C) &lt;year&gt; &lt;name of author&gt; This program comes
+ with ABSOLUTELY NO WARRANTY; for details type `show w'. This is
+ free software, and you are welcome to redistribute it under
+ certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License. Of course, your
+program's commands might be different; for a GUI interface, you would
+use an "about box".
+
+ You should also get your employer (if you work as a programmer) or
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. For more information on this, and how to apply and follow
+the GNU GPL, see &lt;http://www.gnu.org/licenses/&gt;.
+
+ The GNU General Public License does not permit incorporating your
+program into proprietary programs. If your program is a subroutine
+library, you may consider it more useful to permit linking proprietary
+applications with the library. If this is what you want to do, use
+the GNU Lesser General Public License instead of this License. But
+first, please read &lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
+
+
+----------------------------------------------------------------------
+Following applies to:
+./test/metis_support.cpp
+./test/sparselu.cpp
+./unsupported/test/mpreal/mpreal.h
+./unsupported/Eigen/src/IterativeSolvers/IterationController.h
+./unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h
+./unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h
+./Eigen/src/OrderingMethods/Amd.h
+./Eigen/src/SparseCholesky/SimplicialCholesky_impl.h
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the
+GNU General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this
+ license document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this
+ license document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of
+ this License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
+
+----------------------------------------------------------------------
+Following applies to:
+./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h
+./unsupported/Eigen/src/LevenbergMarquardt/LMcovar.h
+./unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h
+./unsupported/Eigen/src/LevenbergMarquardt/LMpar.h
+./unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h
+
+Minpack Copyright Notice (1999) University of Chicago. All rights
+reserved
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer.
+
+2. Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials
+provided with the distribution.
+
+3. The end-user documentation included with the
+redistribution, if any, must include the following
+acknowledgment:
+
+ "This product includes software developed by the
+ University of Chicago, as Operator of Argonne National
+ Laboratory.
+
+Alternately, this acknowledgment may appear in the software
+itself, if and wherever such third-party acknowledgments
+normally appear.
+
+4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
+WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
+UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
+THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
+OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
+OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
+USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
+THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
+DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
+UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
+BE CORRECTED.
+
+5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
+HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
+ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
+INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
+ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
+PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
+SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
+(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
+EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
+POSSIBILITY OF SUCH LOSS OR DAMAGES.
+
+
+****************************
+freetype2
+****************************
+FreeType
+
+Quoth http://freetype.sourceforge.net/license.html:
+
+FreeType comes with two licenses from which you can choose the one
+which fits your needs best.
+
+ * The FreeType License is the most commonly used one.
+ It is a BSD-style license with a credit clause (and thus not
+ compatible with the GPL).
+
+ * The GNU General Public License (GPL).
+ For all projects which use the GPL also or which need a license
+ compatible to the GPL.
+
+FTL.TXT:
+---
+
+ The FreeType Project LICENSE
+ ----------------------------
+
+ 2006-Jan-27
+
+ Copyright 1996-2002, 2006 by
+ David Turner, Robert Wilhelm, and Werner Lemberg
+
+
+
+Introduction
+============
+
+ The FreeType Project is distributed in several archive packages;
+ some of them may contain, in addition to the FreeType font engine,
+ various tools and contributions which rely on, or relate to, the
+ FreeType Project.
+
+ This license applies to all files found in such packages, and
+ which do not fall under their own explicit license. The license
+ affects thus the FreeType font engine, the test programs,
+ documentation and makefiles, at the very least.
+
+ This license was inspired by the BSD, Artistic, and IJG
+ (Independent JPEG Group) licenses, which all encourage inclusion
+ and use of free software in commercial and freeware products
+ alike. As a consequence, its main points are that:
+
+ o We don't promise that this software works. However, we will be
+ interested in any kind of bug reports. (`as is' distribution)
+
+ o You can use this software for whatever you want, in parts or
+ full form, without having to pay us. (`royalty-free' usage)
+
+ o You may not pretend that you wrote this software. If you use
+ it, or only parts of it, in a program, you must acknowledge
+ somewhere in your documentation that you have used the
+ FreeType code. (`credits')
+
+ We specifically permit and encourage the inclusion of this
+ software, with or without modifications, in commercial products.
+ We disclaim all warranties covering The FreeType Project and
+ assume no liability related to The FreeType Project.
+
+
+ Finally, many people asked us for a preferred form for a
+ credit/disclaimer to use in compliance with this license. We thus
+ encourage you to use the following text:
+
+ """
+ Portions of this software are copyright (C) &lt;year&gt; The FreeType
+ Project (www.freetype.org). All rights reserved.
+ """
+
+ Please replace &lt;year&gt; with the value from the FreeType version you
+ actually use.
+
+
+Legal Terms
+===========
+
+0. Definitions
+--------------
+
+ Throughout this license, the terms `package', `FreeType Project',
+ and `FreeType archive' refer to the set of files originally
+ distributed by the authors (David Turner, Robert Wilhelm, and
+ Werner Lemberg) as the `FreeType Project', be they named as alpha,
+ beta or final release.
+
+ `You' refers to the licensee, or person using the project, where
+ `using' is a generic term including compiling the project's source
+ code as well as linking it to form a `program' or `executable'.
+ This program is referred to as `a program using the FreeType
+ engine'.
+
+ This license applies to all files distributed in the original
+ FreeType Project, including all source code, binaries and
+ documentation, unless otherwise stated in the file in its
+ original, unmodified form as distributed in the original archive.
+ If you are unsure whether or not a particular file is covered by
+ this license, you must contact us to verify this.
+
+ The FreeType Project is copyright (C) 1996-2000 by David Turner,
+ Robert Wilhelm, and Werner Lemberg. All rights reserved except as
+ specified below.
+
+1. No Warranty
+--------------
+
+ THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
+ USE, OF THE FREETYPE PROJECT.
+
+2. Redistribution
+-----------------
+
+ This license grants a worldwide, royalty-free, perpetual and
+ irrevocable right and license to use, execute, perform, compile,
+ display, copy, create derivative works of, distribute and
+ sublicense the FreeType Project (in both source and object code
+ forms) and derivative works thereof for any purpose; and to
+ authorize others to exercise some or all of the rights granted
+ herein, subject to the following conditions:
+
+ o Redistribution of source code must retain this license file
+ (`FTL.TXT') unaltered; any additions, deletions or changes to
+ the original files must be clearly indicated in accompanying
+ documentation. The copyright notices of the unaltered,
+ original files must be preserved in all copies of source
+ files.
+
+ o Redistribution in binary form must provide a disclaimer that
+ states that the software is based in part of the work of the
+ FreeType Team, in the distribution documentation. We also
+ encourage you to put an URL to the FreeType web page in your
+ documentation, though this isn't mandatory.
+
+ These conditions apply to any software derived from or based on
+ the FreeType Project, not just the unmodified files. If you use
+ our work, you must acknowledge us. However, no fee need be paid
+ to us.
+
+3. Advertising
+--------------
+
+ Neither the FreeType authors and contributors nor you shall use
+ the name of the other for commercial, advertising, or promotional
+ purposes without specific prior written permission.
+
+ We suggest, but do not require, that you use one or more of the
+ following phrases to refer to this software in your documentation
+ or advertising materials: `FreeType Project', `FreeType Engine',
+ `FreeType library', or `FreeType Distribution'.
+
+ As you have not signed this license, you are not required to
+ accept it. However, as the FreeType Project is copyrighted
+ material, only this license, or another one contracted with the
+ authors, grants you the right to use, distribute, and modify it.
+ Therefore, by using, distributing, or modifying the FreeType
+ Project, you indicate that you understand and accept all the terms
+ of this license.
+
+4. Contacts
+-----------
+
+ There are two mailing lists related to FreeType:
+
+ o freetype@nongnu.org
+
+ Discusses general use and applications of FreeType, as well as
+ future and wanted additions to the library and distribution.
+ If you are looking for support, start in this list if you
+ haven't found anything to help you in the documentation.
+
+ o freetype-devel@nongnu.org
+
+ Discusses bugs, as well as engine internals, design issues,
+ specific licenses, porting, etc.
+
+ Our home page can be found at
+
+ http://www.freetype.org
+
+
+--- end of FTL.TXT ---
+
+
+****************************
+GL
+****************************
+Mesa Component Licenses
+
+Component Location Primary Author License
+----------------------------------------------------------------------------
+Main Mesa code src/mesa/ Brian Paul Mesa (MIT)
+
+Device drivers src/mesa/drivers/* See drivers See drivers
+
+Ext headers include/GL/glext.h SGI SGI Free B
+ include/GL/glxext.h
+
+GLUT src/glut/ Mark Kilgard Mark's copyright
+
+GLEW src/glew-1.13.0 Nigel Stewart Modified BSD
+
+Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL
+
+SGI GLU library src/glu/sgi/ SGI SGI Free B
+
+demo programs progs/demos/ various see source files
+
+X demos progs/xdemos/ Brian Paul see source files
+
+SGI demos progs/samples/ SGI SGI copyright
+
+RedBook demos progs/redbook/ SGI SGI copyright
+
+---------------------
+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
+BRIAN PAUL 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.
+----------------------------
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Alan Hourihane not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Alan Hourihane makes no representations
+about the suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+
+----------------------------------------------------------------------
+
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+---------------------
+
+The OpenGL Extension Wrangler Library
+Copyright (C) 2002-2008, Milan Ikits &lt;milan ikits[]ieee org&gt;
+Copyright (C) 2002-2008, Marcelo E. Magallon &lt;mmagallo[]debian org&gt;
+Copyright (C) 2002, Lev Povalahev
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* The name of the author may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+gradle
+****************************
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+------------------------------------------------------------------------------
+License for the slf4j package
+------------------------------------------------------------------------------
+SLF4J License
+
+Copyright (c) 2004-2007 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+These terms are identical to those of the MIT License, also called the X License or the X11 License,
+which is a simple, permissive non-copyleft free software license. It is deemed compatible with virtually
+all types of licenses, commercial or otherwise. In particular, the Free Software Foundation has declared it
+compatible with GNU GPL. It is also known to be approved by the Apache Software Foundation as compatible
+with Apache Software License.
+
+
+------------------------------------------------------------------------------
+License for the JUnit package
+------------------------------------------------------------------------------
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses
+to its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright license set
+forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered
+by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such
+Contributor, and informs licensees how to obtain it in a reasonable manner on or
+through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement, including but not limited to the risks and costs of
+program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such Recipient
+under this Agreement shall terminate as of the date such litigation is filed. In
+addition, if Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
+as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+------------------------------------------------------------------------------
+License for the JCIFS package
+------------------------------------------------------------------------------
+JCIFS License
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+****************************
+icu
+****************************
+ICU
+
+There are two licenses here:
+- ICU license
+- Unicode Terms of Use
+------------------------------------------------------------------------------
+ICU License - ICU 1.8.1 and later
+From http://source.icu-project.org/repos/icu/icu/trunk/license.html
+X License (old version). For license pedigree see the
+ICU FAQ at http://icu-project.org/userguide/icufaq.html
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2006 International Business Machines Corporation and others
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so,
+provided that the above copyright notice(s) and this permission notice appear
+in all copies of the Software and that both the above copyright notice(s) and
+this permission notice appear in supporting documentation.
+
+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 OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
+LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+All trademarks and registered trademarks mentioned herein are the property of their respective owners.
+
+------------------------------------------------------------------------------
+Unicode Terms of Use, from http://www.unicode.org/copyright.html
+
+ For the general privacy policy governing access to this site, see the
+Unicode Privacy Policy. For trademark usage, see the Unicode Consortium
+Trademarks and Logo Policy.
+ Notice to End User: Terms of Use
+ Carefully read the following legal agreement ("Agreement"). Use or copying
+of the software and/or codes provided with this agreement (The "Software")
+constitutes your acceptance of these terms
+
+ 1. Unicode Copyright.
+ 1. Copyright 1991-2007 Unicode, Inc. All rights reserved.
+ 2. Certain documents and files on this website contain a legend
+indicating that "Modification is permitted." Any person is hereby authorized,
+without fee, to modify such documents and files to create derivative works
+conforming to the Unicode Standard, subject to Terms and Conditions herein.
+ 3. Any person is hereby authorized, without fee, to view, use,
+reproduce, and distribute all documents and files solely for informational
+purposes in the creation of products supporting the Unicode Standard, subject
+to the Terms and Conditions herein.
+ 4. Further specifications of rights and restrictions pertaining
+to the use of the particular set of data files known as the "Unicode Character
+Database" can be found in Exhibit 1.
+ 5. Each version of the Unicode Standard has further specifications
+of rights and restrictions of use. For the book editions, these are found on
+the back of the title page. For the online edition, certain files (such as the
+PDF files for book chapters and code charts) carry specific restrictions. All
+other files are covered under these general Terms of Use. To request a
+permission to reproduce any part of the Unicode Standard, please contact the
+Unicode Consortium.
+ 6. No license is granted to "mirror" the Unicode website where a
+fee is charged for access to the "mirror" site.
+ 7. Modification is not permitted with respect to this document.
+All copies of this document must be verbatim.
+ 2. Restricted Rights Legend. Any technical data or software which is
+licensed to the United States of America, its agencies and/or instrumentalities
+under this Agreement is commercial technical data or commercial computer
+software developed exclusively at private expense as defined in FAR 2.101, or
+DFARS 252.227-7014 (June 1995), as applicable. For technical data, use,
+duplication, or disclosure by the Government is subject to restrictions as set
+forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995)
+and this Agreement. For Software, in accordance with FAR 12-212 or
+DFARS 227-7202, as applicable, use, duplication or disclosure by the Government
+is subject to the restrictions set forth in this Agreement.
+ 3. Warranties and Disclaimers.
+ 1. This publication and/or website may include technical or
+typographical errors or other inaccuracies . Changes are periodically added to
+the information herein; these changes will be incorporated in new editions of
+the publication and/or website. Unicode may make improvements and/or changes
+in the product(s) and/or program(s) described in this publication and/or
+website at any time.
+ 2. If this file has been purchased on magnetic or optical media
+from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange
+of the defective media within ninety (90) days of original purchase.
+ 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR
+SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS,
+IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN
+THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR
+LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE.
+ 4. Waiver of Damages. In no event shall Unicode or its licensors be
+liable for any special, incidental, indirect or consequential damages of any
+kind, or any damages whatsoever, whether or not Unicode was advised of the
+possibility of the damage, including, without limitation, those resulting from
+the following: loss of use, data or profits, in connection with the use,
+modification or distribution of this information or its derivatives.
+ 5. Trademarks.
+ 1. Unicode and the Unicode logo are registered trademarks of
+Unicode, Inc.
+ 2. This site contains product names and corporate names of other
+companies. All product names and company names and logos mentioned herein are
+the trademarks or registered trademarks of their respective owners. Other
+products and corporate names mentioned herein which are trademarks of a third
+party are used only for explanation and for the owners' benefit and with no
+intent to infringe.
+ 3. Use of third party products or information referred to herein
+is at the user\x{2019}s risk.
+ 6. Miscellaneous.
+ 1. Jurisdiction and Venue. This server is operated from a location
+in the State of California, United States of America. Unicode makes no
+representation that the materials are appropriate for use in other locations.
+If you access this server from other locations, you are responsible for
+compliance with local laws. This Agreement, all use of this site and any
+claims and damages resulting from use of this site are governed solely by the
+laws of the State of California without regard to any principles which would
+apply the laws of a different jurisdiction. The user agrees that any disputes
+regarding this site shall be resolved solely in the courts located in Santa
+Clara County, California. The user agrees said courts have personal
+jurisdiction and agree to waive any right to transfer the dispute to any other
+forum.
+ 2. Modification by Unicode Unicode shall have the right to modify
+this Agreement at any time by posting it to this site. The user may not assign
+any part of this Agreement without Unicode\x{2019}s prior written consent.
+ 3. Taxes. The user agrees to pay any taxes arising from access to
+this website or use of the information herein, except for those based on
+Unicode\x{2019}s net income.
+ 4. Severability. If any provision of this Agreement is declared
+invalid or unenforceable, the remaining provisions of this Agreement shall
+remain in effect.
+ 5. Entire Agreement. This Agreement constitutes the entire
+agreement between the parties.
+
+EXHIBIT 1
+UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
+
+ Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
+http://www.unicode.org/cldr/data/ . Unicode Software includes any source code
+published in the Unicode Standard or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
+http://www.unicode.org/cldr/data/.
+
+ NOTICE TO USER: Carefully read the following legal agreement. BY
+DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES
+("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND
+AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF
+YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA
+FILES OR SOFTWARE.
+
+ COPYRIGHT AND PERMISSION NOTICE
+
+ Copyright 1991-2007 Unicode, Inc. All rights reserved. Distributed under
+the Terms of Use in http://www.unicode.org/copyright.html.
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+copy of the Unicode data files and any associated documentation (the "Data
+Files") or Unicode software and any associated documentation (the "Software")
+to deal in the Data Files or Software without restriction, including without
+limitation the rights to use, copy, modify, merge, publish, distribute, and/or
+sell copies of the Data Files or Software, and to permit persons to whom the
+Data Files or Software are furnished to do so, provided that (a) the above
+copyright notice(s) and this permission notice appear with all copies of the
+Data Files or Software, (b) both the above copyright notice(s) and this
+permission notice appear in associated documentation, and (c) there is clear
+notice in each modified Data File or in the Software as well as in the
+documentation associated with the Data File(s) or Software that the data or
+software has been modified.
+
+ THE DATA FILES AND SOFTWARE ARE 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 OF THIRD
+PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+SOFTWARE.
+
+ Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in these Data Files or Software without prior written authorization
+of the copyright holder.
+
+ Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be
+registered in some jurisdictions. All other trademarks and registered
+trademarks mentioned herein are the property of their respective owners.
+
+
+****************************
+icu
+****************************
+ICU
+
+There are two licenses here:
+- ICU license
+- Unicode Terms of Use
+------------------------------------------------------------------------------
+ICU License - ICU 1.8.1 and later
+From http://source.icu-project.org/repos/icu/icu/trunk/license.html
+X License (old version). For license pedigree see the
+ICU FAQ at http://icu-project.org/userguide/icufaq.html
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2006 International Business Machines Corporation and others
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so,
+provided that the above copyright notice(s) and this permission notice appear
+in all copies of the Software and that both the above copyright notice(s) and
+this permission notice appear in supporting documentation.
+
+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 OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
+LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+
+All trademarks and registered trademarks mentioned herein are the property of their respective owners.
+
+------------------------------------------------------------------------------
+Unicode Terms of Use, from http://www.unicode.org/copyright.html
+
+ For the general privacy policy governing access to this site, see the
+Unicode Privacy Policy. For trademark usage, see the Unicode Consortium
+Trademarks and Logo Policy.
+ Notice to End User: Terms of Use
+ Carefully read the following legal agreement ("Agreement"). Use or copying
+of the software and/or codes provided with this agreement (The "Software")
+constitutes your acceptance of these terms
+
+ 1. Unicode Copyright.
+ 1. Copyright 1991-2007 Unicode, Inc. All rights reserved.
+ 2. Certain documents and files on this website contain a legend
+indicating that "Modification is permitted." Any person is hereby authorized,
+without fee, to modify such documents and files to create derivative works
+conforming to the Unicode Standard, subject to Terms and Conditions herein.
+ 3. Any person is hereby authorized, without fee, to view, use,
+reproduce, and distribute all documents and files solely for informational
+purposes in the creation of products supporting the Unicode Standard, subject
+to the Terms and Conditions herein.
+ 4. Further specifications of rights and restrictions pertaining
+to the use of the particular set of data files known as the "Unicode Character
+Database" can be found in Exhibit 1.
+ 5. Each version of the Unicode Standard has further specifications
+of rights and restrictions of use. For the book editions, these are found on
+the back of the title page. For the online edition, certain files (such as the
+PDF files for book chapters and code charts) carry specific restrictions. All
+other files are covered under these general Terms of Use. To request a
+permission to reproduce any part of the Unicode Standard, please contact the
+Unicode Consortium.
+ 6. No license is granted to "mirror" the Unicode website where a
+fee is charged for access to the "mirror" site.
+ 7. Modification is not permitted with respect to this document.
+All copies of this document must be verbatim.
+ 2. Restricted Rights Legend. Any technical data or software which is
+licensed to the United States of America, its agencies and/or instrumentalities
+under this Agreement is commercial technical data or commercial computer
+software developed exclusively at private expense as defined in FAR 2.101, or
+DFARS 252.227-7014 (June 1995), as applicable. For technical data, use,
+duplication, or disclosure by the Government is subject to restrictions as set
+forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995)
+and this Agreement. For Software, in accordance with FAR 12-212 or
+DFARS 227-7202, as applicable, use, duplication or disclosure by the Government
+is subject to the restrictions set forth in this Agreement.
+ 3. Warranties and Disclaimers.
+ 1. This publication and/or website may include technical or
+typographical errors or other inaccuracies . Changes are periodically added to
+the information herein; these changes will be incorporated in new editions of
+the publication and/or website. Unicode may make improvements and/or changes
+in the product(s) and/or program(s) described in this publication and/or
+website at any time.
+ 2. If this file has been purchased on magnetic or optical media
+from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange
+of the defective media within ninety (90) days of original purchase.
+ 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR
+SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS,
+IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN
+THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR
+LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE.
+ 4. Waiver of Damages. In no event shall Unicode or its licensors be
+liable for any special, incidental, indirect or consequential damages of any
+kind, or any damages whatsoever, whether or not Unicode was advised of the
+possibility of the damage, including, without limitation, those resulting from
+the following: loss of use, data or profits, in connection with the use,
+modification or distribution of this information or its derivatives.
+ 5. Trademarks.
+ 1. Unicode and the Unicode logo are registered trademarks of
+Unicode, Inc.
+ 2. This site contains product names and corporate names of other
+companies. All product names and company names and logos mentioned herein are
+the trademarks or registered trademarks of their respective owners. Other
+products and corporate names mentioned herein which are trademarks of a third
+party are used only for explanation and for the owners' benefit and with no
+intent to infringe.
+ 3. Use of third party products or information referred to herein
+is at the user\x{2019}s risk.
+ 6. Miscellaneous.
+ 1. Jurisdiction and Venue. This server is operated from a location
+in the State of California, United States of America. Unicode makes no
+representation that the materials are appropriate for use in other locations.
+If you access this server from other locations, you are responsible for
+compliance with local laws. This Agreement, all use of this site and any
+claims and damages resulting from use of this site are governed solely by the
+laws of the State of California without regard to any principles which would
+apply the laws of a different jurisdiction. The user agrees that any disputes
+regarding this site shall be resolved solely in the courts located in Santa
+Clara County, California. The user agrees said courts have personal
+jurisdiction and agree to waive any right to transfer the dispute to any other
+forum.
+ 2. Modification by Unicode Unicode shall have the right to modify
+this Agreement at any time by posting it to this site. The user may not assign
+any part of this Agreement without Unicode\x{2019}s prior written consent.
+ 3. Taxes. The user agrees to pay any taxes arising from access to
+this website or use of the information herein, except for those based on
+Unicode\x{2019}s net income.
+ 4. Severability. If any provision of this Agreement is declared
+invalid or unenforceable, the remaining provisions of this Agreement shall
+remain in effect.
+ 5. Entire Agreement. This Agreement constitutes the entire
+agreement between the parties.
+
+EXHIBIT 1
+UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
+
+ Unicode Data Files include all data files under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
+http://www.unicode.org/cldr/data/ . Unicode Software includes any source code
+published in the Unicode Standard or under the directories
+http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
+http://www.unicode.org/cldr/data/.
+
+ NOTICE TO USER: Carefully read the following legal agreement. BY
+DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES
+("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND
+AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF
+YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA
+FILES OR SOFTWARE.
+
+ COPYRIGHT AND PERMISSION NOTICE
+
+ Copyright 1991-2007 Unicode, Inc. All rights reserved. Distributed under
+the Terms of Use in http://www.unicode.org/copyright.html.
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+copy of the Unicode data files and any associated documentation (the "Data
+Files") or Unicode software and any associated documentation (the "Software")
+to deal in the Data Files or Software without restriction, including without
+limitation the rights to use, copy, modify, merge, publish, distribute, and/or
+sell copies of the Data Files or Software, and to permit persons to whom the
+Data Files or Software are furnished to do so, provided that (a) the above
+copyright notice(s) and this permission notice appear with all copies of the
+Data Files or Software, (b) both the above copyright notice(s) and this
+permission notice appear in associated documentation, and (c) there is clear
+notice in each modified Data File or in the Software as well as in the
+documentation associated with the Data File(s) or Software that the data or
+software has been modified.
+
+ THE DATA FILES AND SOFTWARE ARE 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 OF THIRD
+PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR
+SOFTWARE.
+
+ Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in these Data Files or Software without prior written authorization
+of the copyright holder.
+
+ Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be
+registered in some jurisdictions. All other trademarks and registered
+trademarks mentioned herein are the property of their respective owners.
+
+
+****************************
+java/android_libs/exoplayer
+****************************
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+****************************
+java/android_libs/protobuf_nano
+****************************
+Copyright 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
+
+
+****************************
+javascript/jquery_ui
+****************************
+The MIT License (MIT)
+
+Copyright (c) 2015 jQuery Foundation 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.
+
+
+****************************
+javascript/jquery/v2_0_1
+****************************
+Copyright 2013 jQuery Foundation and other contributors
+http://jquery.com/
+
+https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
+https://github.com/jquery/sizzle/blob/master/LICENSE
+
+jQuery and Sizzle are released under MIT Licence.
+
+The text is provided below.
+
+MIT License
+----
+
+Copyright 2013 jQuery Foundation and other contributors
+http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+****************************
+javascript/tracing_framework
+****************************
+Copyright 2012, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+java_src/android_libs/exoplayer
+****************************
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+****************************
+java_src/android_libs/protobuf_nano/v2
+****************************
+Copyright 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
+
+
+****************************
+jpeg
+****************************
+(extracted from src/README)
+
+LEGAL ISSUES
+============
+
+In plain English:
+
+1. We don't promise that this software works. (But if you find any bugs,
+ please let us know!)
+2. You can use this software for whatever you want. You don't have to pay us.
+3. You may not pretend that you wrote this software. If you use it in a
+ program, you must acknowledge somewhere in your documentation that
+ you've used the IJG code.
+
+In legalese:
+
+The authors make NO WARRANTY or representation, either express or implied,
+with respect to this software, its quality, accuracy, merchantability, or
+fitness for a particular purpose. This software is provided "AS IS", and you,
+its user, assume the entire risk as to its quality and accuracy.
+
+This software is copyright (C) 1991-1998, Thomas G. Lane.
+All Rights Reserved except as specified below.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+software (or portions thereof) for any purpose, without fee, subject to these
+conditions:
+(1) If any part of the source code for this software is distributed, then this
+README file must be included, with this copyright and no-warranty notice
+unaltered; and any additions, deletions, or changes to the original files
+must be clearly indicated in accompanying documentation.
+(2) If only executable code is distributed, then the accompanying
+documentation must state that "this software is based in part on the work of
+the Independent JPEG Group".
+(3) Permission for use of this software is granted only if the user accepts
+full responsibility for any undesirable consequences; the authors accept
+NO LIABILITY for damages of any kind.
+
+These conditions apply to any software derived from or based on the IJG code,
+not just to the unmodified library. If you use our work, you ought to
+acknowledge us.
+
+Permission is NOT granted for the use of any IJG author's name or company name
+in advertising or publicity relating to this software or products derived from
+it. This software may be referred to only as "the Independent JPEG Group's
+software".
+
+We specifically permit and encourage the use of this software as the basis of
+commercial products, provided that all warranty or liability claims are
+assumed by the product vendor.
+
+
+ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
+sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
+ansi2knr.c is NOT covered by the above copyright and conditions, but instead
+by the usual distribution terms of the Free Software Foundation; principally,
+that you must include source code if you redistribute it. (See the file
+ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
+of any program generated from the IJG code, this does not limit you more than
+the foregoing paragraphs do.
+
+The Unix configuration script "configure" was produced with GNU Autoconf.
+It is copyright by the Free Software Foundation but is freely distributable.
+The same holds for its supporting scripts (config.guess, config.sub,
+ltconfig, ltmain.sh). Another support script, install-sh, is copyright
+by M.I.T. but is also freely distributable.
+
+It appears that the arithmetic coding option of the JPEG spec is covered by
+patents owned by IBM, AT&amp;T, and Mitsubishi. Hence arithmetic coding cannot
+legally be used without obtaining one or more licenses. For this reason,
+support for arithmetic coding has been removed from the free JPEG software.
+(Since arithmetic coding provides only a marginal gain over the unpatented
+Huffman mode, it is unlikely that very many implementations will support it.)
+So far as we are aware, there are no patent restrictions on the remaining
+code.
+
+The IJG distribution formerly included code to read and write GIF files.
+To avoid entanglement with the Unisys LZW patent, GIF reading support has
+been removed altogether, and the GIF writer has been simplified to produce
+"uncompressed GIFs". This technique does not use the LZW algorithm; the
+resulting GIF files are larger than usual, but are readable by all standard
+GIF decoders.
+
+We are required to state that
+ "The Graphics Interchange Format(c) is the Copyright property of
+ CompuServe Incorporated. GIF(sm) is a Service Mark property of
+ CompuServe Incorporated."
+
+
+****************************
+libogg
+****************************
+Copyright (c) 2002, Xiph.org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+****************************
+libunwind
+****************************
+Copyright (c) 2002 Hewlett-Packard Co.
+
+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.
+
+
+****************************
+libvorbis
+****************************
+Copyright (c) 2002-2008 Xiph.org Foundation
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+libxcb
+****************************
+Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute,
+sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall
+be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+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.
+
+Except as contained in this notice, the names of the authors
+or their institutions shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this
+Software without prior written authorization from the
+authors.
+
+
+****************************
+libxml
+****************************
+Libxml2, an XML C Parser
+
+Except where otherwise noted in the source code (e.g. the files hash.c,
+list.c and the trio files, which are covered by a similar licence but
+with different Copyright notices) all the files are:
+
+ Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished 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, FIT-
+NESS 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.
+
+--------------------------------------------------------------------
+
+Copyright (C) 2000,2012 Bjorn Reese and Daniel Veillard.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+
+Author: breese@users.sourceforge.net
+
+(taken from hash.c)
+
+--------------------------------------------------------------------
+
+ Copyright (C) 2000 Gary Pennington and Daniel Veillard.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+
+Author: Gary.Pennington@uk.sun.com
+
+(taken from list.c)
+
+--------------------------------------------------------------------
+
+Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+
+(taken from trio.h and trio.c)
+
+--------------------------------------------------------------------
+
+Copyright (C) 2001 Bjorn Reese &lt;breese@users.sourceforge.net&gt;
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+
+(taken from triodef.h, trionan.h, and trionan.c)
+
+--------------------------------------------------------------------
+
+Copyright (C) 2000 Bjorn Reese and Daniel Stenberg.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+
+(taken from triop.h)
+
+--------------------------------------------------------------------
+
+Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+
+(taken from triostr.h and triostr.c)
+
+*************************************************************************
+
+http://ctrio.sourceforge.net/
+
+*************************************************************************
+
+
+****************************
+lodepng
+****************************
+LodePNG
+
+Copyright (c) 2005-2013 Lode Vandevenne
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+
+
+****************************
+minizip
+****************************
+zlib
+
+(extracted from README, except for match.S)
+
+Copyright notice:
+
+ (C) 1995-2004 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+(extracted from match.S, for match.S only)
+
+ Copyright (C) 1998, 2007 Brian Raiter &lt;breadbox@muppetlabs.com&gt;
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the author be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+
+****************************
+mongoose
+****************************
+Copyright (c) 2004-2013 Sergey Lyubka
+
+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.
+
+
+****************************
+objective_c/gtm_session_fetcher
+****************************
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+****************************
+openctm
+****************************
+Copyright (c) 2009-2010 Marcus Geelnard
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not
+ be misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+
+
+****************************
+OpenCV
+****************************
+IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+
+By downloading, copying, installing or using the software you agree to this license.
+If you do not agree to this license, do not download, install,
+copy or use the software.
+
+
+ Intel License Agreement
+ For Open Source Computer Vision Library
+
+Copyright (C) 2000, 2001, Intel Corporation, all rights reserved.
+Copyright (C) 2013, OpenCV Foundation, all rights reserved.
+Third party copyrights are property of their respective owners.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistribution's of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistribution's in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * The name of Intel Corporation may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+This software is provided by the copyright holders and contributors "as is" and
+any express or implied warranties, including, but not limited to, the implied
+warranties of merchantability and fitness for a particular purpose are disclaimed.
+In no event shall the Intel Corporation or contributors be liable for any direct,
+indirect, incidental, special, exemplary, or consequential damages
+(including, but not limited to, procurement of substitute goods or services;
+loss of use, data, or profits; or business interruption) however caused
+and on any theory of liability, whether in contract, strict liability,
+or tort (including negligence or otherwise) arising in any way out of
+the use of this software, even if advised of the possibility of such damage.
+
+****************************
+openssl
+****************************
+BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
+licensing. Files that are completely new have a Google copyright and an ISC
+license. This license is reproduced at the bottom of this file.
+
+Contributors to BoringSSL are required to follow the CLA rules for Chromium:
+https://cla.developers.google.com/clas
+
+Some files from Intel are under yet another license, which is also included
+underneath.
+
+The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
+OpenSSL License and the original SSLeay license apply to the toolkit. See below
+for the actual license texts. Actually both licenses are BSD-style Open Source
+licenses. In case of any license issues related to OpenSSL please contact
+openssl-core@openssl.org.
+
+ OpenSSL License
+ ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+
+ISC license used for completely new code in BoringSSL:
+
+/* Copyright (c) 2015, Google Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+
+
+Some files from Intel carry the following license:
+
+# Copyright (c) 2012, Intel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+#
+# * Neither the name of the Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+openssl/boringssl
+****************************
+BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
+licensing. Files that are completely new have a Google copyright and an ISC
+license. This license is reproduced at the bottom of this file.
+
+Contributors to BoringSSL are required to follow the CLA rules for Chromium:
+https://cla.developers.google.com/clas
+
+Some files from Intel are under yet another license, which is also included
+underneath.
+
+The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
+OpenSSL License and the original SSLeay license apply to the toolkit. See below
+for the actual license texts. Actually both licenses are BSD-style Open Source
+licenses. In case of any license issues related to OpenSSL please contact
+openssl-core@openssl.org.
+
+ OpenSSL License
+ ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+
+ISC license used for completely new code in BoringSSL:
+
+/* Copyright (c) 2015, Google Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+
+
+Some files from Intel carry the following license:
+
+# Copyright (c) 2012, Intel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+#
+# * Neither the name of the Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+pcre
+****************************
+PCRE LICENCE
+------------
+
+PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
+specified below. The documentation for PCRE, supplied in the "doc"
+directory, is distributed under the same terms as the software itself. The data
+in the testdata directory is not copyrighted and is in the public domain.
+
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a set of C++ wrapper functions, and a
+just-in-time compiler that can be used to optimize pattern matching. These
+are both optional features that can be omitted when the library is built.
+
+
+THE BASIC LIBRARY FUNCTIONS
+---------------------------
+
+Written by: Philip Hazel
+Email local part: ph10
+Email domain: cam.ac.uk
+
+University of Cambridge Computing Service,
+Cambridge, England.
+
+Copyright (c) 1997-2015 University of Cambridge
+All rights reserved.
+
+
+PCRE JUST-IN-TIME COMPILATION SUPPORT
+-------------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2010-2015 Zoltan Herczeg
+All rights reserved.
+
+
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2009-2015 Zoltan Herczeg
+All rights reserved.
+
+
+THE C++ WRAPPER FUNCTIONS
+-------------------------
+
+Contributed by: Google Inc.
+
+Copyright (c) 2007-2012, Google Inc.
+All rights reserved.
+
+
+THE "BSD" LICENCE
+-----------------
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the name of Google
+ Inc. nor the names of their contributors may be used to endorse or
+ promote products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+End
+
+
+****************************
+pffft
+****************************
+Copyright (c) 2013 Julien Pommier ( pommier@modartt.com )
+
+Based on original fortran 77 code from FFTPACKv4 from NETLIB,
+authored by Dr Paul Swarztrauber of NCAR, in 1985.
+
+As confirmed by the NCAR fftpack software curators, the following
+FFTPACKv5 license applies to FFTPACKv4 sources. My changes are
+released under the same terms.
+
+FFTPACK license:
+
+http://www.cisl.ucar.edu/css/software/fftpack5/ftpk.html
+
+Copyright (c) 2004 the University Corporation for Atmospheric
+Research ("UCAR"). All rights reserved. Developed by NCAR's
+Computational and Information Systems Laboratory, UCAR,
+www.cisl.ucar.edu.
+
+Redistribution and use of the Software in source and binary forms,
+with or without modification, is permitted provided that the
+following conditions are met:
+
+- Neither the names of NCAR's Computational and Information Systems
+Laboratory, the University Corporation for Atmospheric Research,
+nor the names of its sponsors or contributors may be used to
+endorse or promote products derived from this Software without
+specific prior written permission.
+
+- Redistributions of source code must retain the above copyright
+notices, this list of conditions, and the disclaimer below.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions, and the disclaimer below in the
+documentation and/or other materials provided with the
+distribution.
+
+THIS 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 CONTRIBUTORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL 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 WITH THE
+SOFTWARE.
+
+
+****************************
+png
+****************************
+libpng
+
+This copy of the libpng notices is provided for your convenience. In case of
+any discrepancy between this copy and the notices in the file png.h that is
+included in the libpng distribution, the latter shall prevail.
+
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+
+If you modify libpng you may insert additional notices immediately following
+this sentence.
+
+libpng versions 1.2.6, August 15, 2004, through 1.2.27, April 29, 2008, are
+Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are
+distributed according to the same disclaimer and license as libpng-1.2.5
+with the following individual added to the list of Contributing Authors
+
+ Cosmin Truta
+
+libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
+Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
+distributed according to the same disclaimer and license as libpng-1.0.6
+with the following individuals added to the list of Contributing Authors
+
+ Simon-Pierre Cadieux
+ Eric S. Raymond
+ Gilles Vollant
+
+and with the following additions to the disclaimer:
+
+ There is no warranty against interference with your enjoyment of the
+ library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is with
+ the user.
+
+libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
+distributed according to the same disclaimer and license as libpng-0.96,
+with the following individuals added to the list of Contributing Authors:
+
+ Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik
+
+libpng versions 0.89, June 1996, through 0.96, May 1997, are
+Copyright (c) 1996, 1997 Andreas Dilger
+Distributed according to the same disclaimer and license as libpng-0.88,
+with the following individuals added to the list of Contributing Authors:
+
+ John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner
+
+libpng versions 0.5, May 1995, through 0.88, January 1996, are
+Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+
+For the purposes of this copyright and license, "Contributing Authors"
+is defined as the following set of individuals:
+
+ Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner
+
+The PNG Reference Library is supplied "AS IS". The Contributing Authors
+and Group 42, Inc. disclaim all warranties, expressed or implied,
+including, without limitation, the warranties of merchantability and of
+fitness for any purpose. The Contributing Authors and Group 42, Inc.
+assume no liability for direct, indirect, incidental, special, exemplary,
+or consequential damages, which may result from the use of the PNG
+Reference Library, even if advised of the possibility of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+source code, or portions hereof, for any purpose, without fee, subject
+to the following restrictions:
+
+1. The origin of this source code must not be misrepresented.
+
+2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
+
+3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+The Contributing Authors and Group 42, Inc. specifically permit, without
+fee, and encourage the use of this source code as a component to
+supporting the PNG file format in commercial products. If you use this
+source code in a product, acknowledgment is not required but would be
+appreciated.
+
+
+A "png_get_copyright" function is available, for convenient use in "about"
+boxes and the like:
+
+ printf("%s",png_get_copyright(NULL));
+
+Also, the PNG logo (in PNG format, of course) is supplied in the
+files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
+
+Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
+certification mark of the Open Source Initiative.
+
+Glenn Randers-Pehrson
+glennrp at users.sourceforge.net
+April 29, 2008
+
+
+****************************
+protobuf
+****************************
+Copyright 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
+
+
+****************************
+re2
+****************************
+// Copyright (c) 2009 The RE2 Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+stblib
+****************************
+ License for STBLIB - A collection of public-domain single-file C/C++
+ libraries, primarily aimed at game developers.
+
+The compilation and test files are licensed under the MIT license, but the
+single-file libraries themselves are in the public domain (free for use and
+modification for any purpose without legal friction).
+
+The MIT License (MIT)
+
+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.
+
+
+****************************
+stl
+****************************
+SGI STL
+
+The STL portion of GNU libstdc++ that is used with gcc3 and gcc4 is licensed
+under the GPL, with the following exception:
+
+# As a special exception, you may use this file as part of a free software
+# library without restriction. Specifically, if other files instantiate
+# templates or use macros or inline functions from this file, or you compile
+# this file and link it with other files to produce an executable, this
+# file does not by itself cause the resulting executable to be covered by
+# the GNU General Public License. This exception does not however
+# invalidate any other reasons why the executable file might be covered by
+# the GNU General Public License.
+
+
+
+****************************
+tinyxml
+****************************
+TinyXml is released under the zlib license:
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+
+
+
+****************************
+tz
+****************************
+With a few exceptions, all files in the tz code and data (including
+this one) are in the public domain. The exceptions are tzcode's
+date.c, newstrftime.3, and strftime.c, which contain material derived
+from BSD and which use the BSD 3-clause license.
+
+
+****************************
+utf
+****************************
+UTF-8 Library
+
+The authors of this software are Rob Pike and Ken Thompson.
+ Copyright (c) 1998-2002 by Lucent Technologies.
+Permission to use, copy, modify, and distribute this software for any
+purpose without fee is hereby granted, provided that this entire notice
+is included in all copies of any software which is or includes a copy
+or modification of this software and in all copies of the supporting
+documentation for such software.
+THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
+REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+
+****************************
+xmpmeta
+****************************
+xmpmeta. A fast XMP metadata parsing and writing library.
+Copyright 2016 Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Google Inc. nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+****************************
+Xorg
+****************************
+The following is the 'standard copyright' agreed upon by most contributors,
+and is currently the canonical license preferred by the X.Org Foundation.
+This is a slight variant of the common MIT license form published by the
+Open Source Initiative at http://www.opensource.org/licenses/mit-license.php
+
+Copyright holders of new code should use this license statement where
+possible, and insert their name to this list. Please sort by surname
+for people, and by the full name for other entities (e.g. Juliusz
+Chroboczek sorts before Intel Corporation sorts before Daniel Stone).
+
+See each individual source file or directory for the license that applies
+to that file.
+
+Copyright (C) 2003-2006,2008 Jamey Sharp, Josh Triplett
+Copyright © 2009 Red Hat, Inc.
+Copyright 1990-1992,1999,2000,2004,2009,2010 Oracle and/or its affiliates.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) 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.
+
+ ----------------------------------------------------------------------
+
+The following licenses are 'legacy' - usually MIT/X11 licenses with the name
+of the copyright holder(s) in the license statement:
+
+Copyright 1984-1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+OPEN GROUP 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.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+X Window System is a trademark of The Open Group.
+
+ ----------------------------------------
+
+Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
+Copyright 2000 The XFree86 Project, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+Digital Equipment Corporation
+
+Portions Copyright 1990, 1991 by Tektronix, Inc.
+
+Permission to use, copy, modify and distribute this documentation for
+any purpose and without fee is hereby granted, provided that the above
+copyright notice appears in all copies and that both that copyright notice
+and this permission notice appear in all copies, and that the names of
+Digital and Tektronix not be used in in advertising or publicity pertaining
+to this documentation without specific, written prior permission.
+Digital and Tektronix makes no representations about the suitability
+of this documentation for any purpose.
+It is provided ``as is'' without express or implied warranty.
+
+ ----------------------------------------
+
+Copyright (c) 1999-2000 Free Software Foundation, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+FREE SOFTWARE FOUNDATION 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.
+
+Except as contained in this notice, the name of the Free Software Foundation
+shall not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from the
+Free Software Foundation.
+
+ ----------------------------------------
+
+Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
+ All Rights Reserved
+
+This file is a component of an X Window System-specific implementation
+of Xcms based on the TekColor Color Management System. TekColor is a
+trademark of Tektronix, Inc. The term "TekHVC" designates a particular
+color space that is the subject of U.S. Patent No. 4,985,853 (equivalent
+foreign patents pending). Permission is hereby granted to use, copy,
+modify, sell, and otherwise distribute this software and its
+documentation for any purpose and without fee, provided that:
+
+1. This copyright, permission, and disclaimer notice is reproduced in
+ all copies of this software and any modification thereof and in
+ supporting documentation;
+2. Any color-handling application which displays TekHVC color
+ cooordinates identifies these as TekHVC color coordinates in any
+ interface that displays these coordinates and in any associated
+ documentation;
+3. The term "TekHVC" is always used, and is only used, in association
+ with the mathematical derivations of the TekHVC Color Space,
+ including those provided in this file and any equivalent pathways and
+ mathematical derivations, regardless of digital (e.g., floating point
+ or integer) representation.
+
+Tektronix makes no representation about the suitability of this software
+for any purpose. It is provided "as is" and with all faults.
+
+TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
+INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+(c) Copyright 1995 FUJITSU LIMITED
+This is source code modified by FUJITSU LIMITED under the Joint
+Development Agreement for the CDE/Motif PST.
+
+ ----------------------------------------
+
+Copyright 1992 by Oki Technosystems Laboratory, Inc.
+Copyright 1992 by Fuji Xerox Co., Ltd.
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of Oki Technosystems
+Laboratory and Fuji Xerox not be used in advertising or publicity
+pertaining to distribution of the software without specific, written
+prior permission.
+Oki Technosystems Laboratory and Fuji Xerox make no representations
+about the suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+OKI TECHNOSYSTEMS LABORATORY AND FUJI XEROX DISCLAIM ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OKI TECHNOSYSTEMS
+LABORATORY AND FUJI XEROX BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1990, 1991, 1992, 1993, 1994 by FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of FUJITSU LIMITED
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+FUJITSU LIMITED makes no representations about the suitability of
+this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+
+Copyright (c) 1995 David E. Wexelblat. All rights reserved
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL DAVID E. WEXELBLAT 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.
+
+Except as contained in this notice, the name of David E. Wexelblat shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from David E. Wexelblat.
+
+ ----------------------------------------
+
+Copyright 1990, 1991 by OMRON Corporation
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name OMRON not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. OMRON makes no representations
+about the suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
+Digital Equipment Corporation
+
+Portions Copyright 1990, 1991 by Tektronix, Inc
+
+Rewritten for X.org by Chris Lee &lt;clee@freedesktop.org&gt;
+
+Permission to use, copy, modify, distribute, and sell this documentation
+for any purpose and without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+Chris Lee makes no representations about the suitability for any purpose
+of the information in this document. It is provided \`\`as-is'' without
+express or implied warranty.
+
+ ----------------------------------------
+
+Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+Copyright 1994 by FUJITSU LIMITED
+Copyright 1994 by Sony Corporation
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital, FUJITSU
+LIMITED and Sony Corporation not be used in advertising or publicity
+pertaining to distribution of the software without specific, written
+prior permission.
+
+DIGITAL, FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL, FUJITSU LIMITED
+AND SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+
+Copyright 1991 by the Open Software Foundation
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Open Software Foundation
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission. Open Software
+Foundation makes no representations about the suitability of this
+software for any purpose. It is provided "as is" without express or
+implied warranty.
+
+OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1990, 1991, 1992,1993, 1994 by FUJITSU LIMITED
+Copyright 1993, 1994 by Sony Corporation
+
+Permission to use, copy, modify, distribute, and sell this software and
+its documentation for any purpose is hereby granted without fee, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of FUJITSU LIMITED and Sony Corporation
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission. FUJITSU LIMITED and
+Sony Corporation makes no representations about the suitability of this
+software for any purpose. It is provided "as is" without express or
+implied warranty.
+
+FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL FUJITSU LIMITED OR SONY CORPORATION BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright (c) 1993, 1995 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1991, 1992, 1993, 1994 by FUJITSU LIMITED
+Copyright 1993 by Digital Equipment Corporation
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of FUJITSU LIMITED and
+Digital Equipment Corporation not be used in advertising or publicity
+pertaining to distribution of the software without specific, written
+prior permission. FUJITSU LIMITED and Digital Equipment Corporation
+makes no representations about the suitability of this software for
+any purpose. It is provided "as is" without express or implied
+warranty.
+
+FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1992, 1993 by FUJITSU LIMITED
+Copyright 1993 by Fujitsu Open Systems Solutions, Inc.
+Copyright 1994 by Sony Corporation
+
+Permission to use, copy, modify, distribute and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of FUJITSU LIMITED,
+Fujitsu Open Systems Solutions, Inc. and Sony Corporation not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+FUJITSU LIMITED, Fujitsu Open Systems Solutions, Inc. and
+Sony Corporation make no representations about the suitability of
+this software for any purpose. It is provided "as is" without
+express or implied warranty.
+
+FUJITSU LIMITED, FUJITSU OPEN SYSTEMS SOLUTIONS, INC. AND SONY
+CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+IN NO EVENT SHALL FUJITSU OPEN SYSTEMS SOLUTIONS, INC., FUJITSU LIMITED
+AND SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1987, 1988, 1990, 1993 by Digital Equipment Corporation,
+Maynard, Massachusetts,
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1993 by SunSoft, Inc.
+Copyright 1999-2000 by Bruno Haible
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the names of SunSoft, Inc. and
+Bruno Haible not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission. SunSoft, Inc. and Bruno Haible make no representations
+about the suitability of this software for any purpose. It is
+provided "as is" without express or implied warranty.
+
+SunSoft Inc. AND Bruno Haible DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL SunSoft, Inc. OR Bruno Haible BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1991 by the Open Software Foundation
+Copyright 1993 by the TOSHIBA Corp.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of Open Software Foundation and TOSHIBA
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission. Open Software
+Foundation and TOSHIBA make no representations about the suitability of this
+software for any purpose. It is provided "as is" without express or
+implied warranty.
+
+OPEN SOFTWARE FOUNDATION AND TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN OR TOSHIBA BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1988 by Wyse Technology, Inc., San Jose, Ca.,
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name Wyse not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+ ----------------------------------------
+
+
+Copyright 1991 by the Open Software Foundation
+Copyright 1993, 1994 by the Sony Corporation
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of Open Software Foundation and
+Sony Corporation not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior permission.
+Open Software Foundation and Sony Corporation make no
+representations about the suitability of this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+OPEN SOFTWARE FOUNDATION AND SONY CORPORATION DISCLAIM ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OPEN
+SOFTWARE FOUNDATIONN OR SONY CORPORATION BE LIABLE FOR ANY SPECIAL,
+INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1992, 1993 by FUJITSU LIMITED
+Copyright 1993 by Fujitsu Open Systems Solutions, Inc.
+
+Permission to use, copy, modify, distribute and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of FUJITSU LIMITED and
+Fujitsu Open Systems Solutions, Inc. not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission.
+FUJITSU LIMITED and Fujitsu Open Systems Solutions, Inc. makes no
+representations about the suitability of this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+FUJITSU LIMITED AND FUJITSU OPEN SYSTEMS SOLUTIONS, INC. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJITSU OPEN SYSTEMS
+SOLUTIONS, INC. AND FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT
+OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1993, 1994 by Sony Corporation
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of Sony Corporation
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+Sony Corporation makes no representations about the suitability of
+this software for any purpose. It is provided "as is" without
+express or implied warranty.
+
+SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1986, 1998 The Open Group
+Copyright (c) 2000 The XFree86 Project, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+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
+X CONSORTIUM OR THE XFREE86 PROJECT 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.
+
+Except as contained in this notice, the name of the X Consortium or of the
+XFree86 Project shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from the X Consortium and the XFree86 Project.
+
+ ----------------------------------------
+
+Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
+ and Nippon Telegraph and Telephone Corporation
+Copyright 1991 by the Open Software Foundation
+Copyright 1993 by the FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of OMRON, NTT Software, NTT, and
+Open Software Foundation not be used in advertising or publicity
+pertaining to distribution of the software without specific,
+written prior permission. OMRON, NTT Software, NTT, and Open Software
+Foundation make no representations about the suitability of this
+software for any purpose. It is provided "as is" without express or
+implied warranty.
+
+OMRON, NTT SOFTWARE, NTT, AND OPEN SOFTWARE FOUNDATION
+DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
+SHALL OMRON, NTT SOFTWARE, NTT, OR OPEN SOFTWARE FOUNDATION BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1988 by Wyse Technology, Inc., San Jose, Ca,
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND WYSE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL DIGITAL OR WYSE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+
+Copyright 1991, 1992 by Fuji Xerox Co., Ltd.
+Copyright 1992, 1993, 1994 by FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of Fuji Xerox,
+FUJITSU LIMITED not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission. Fuji Xerox, FUJITSU LIMITED make no representations
+about the suitability of this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+FUJI XEROX, FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJI XEROX,
+FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 2006 Josh Triplett
+
+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 X CONSORTIUM 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.
+
+ ----------------------------------------
+
+(c) Copyright 1996 by Sebastien Marineau and Holger Veit
+ &lt;marineau@genie.uottawa.ca&gt;
+ &lt;Holger.Veit@gmd.de&gt;
+
+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
+HOLGER VEIT 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.
+
+Except as contained in this notice, the name of Sebastien Marineau or Holger Veit
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Holger Veit or
+Sebastien Marineau.
+
+ ----------------------------------------
+
+Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
+ and Nippon Telegraph and Telephone Corporation
+Copyright 1991 by the Open Software Foundation
+Copyright 1993 by the TOSHIBA Corp.
+Copyright 1993, 1994 by Sony Corporation
+Copyright 1993, 1994 by the FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of OMRON, NTT Software, NTT, Open
+Software Foundation, and Sony Corporation not be used in advertising
+or publicity pertaining to distribution of the software without specific,
+written prior permission. OMRON, NTT Software, NTT, Open Software
+Foundation, and Sony Corporation make no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without express or implied warranty.
+
+OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY
+CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
+SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY
+CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 2000 by Bruno Haible
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of Bruno Haible not
+be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission. Bruno Haible
+makes no representations about the suitability of this software for
+any purpose. It is provided "as is" without express or implied
+warranty.
+
+Bruno Haible DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+NO EVENT SHALL Bruno Haible BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+OR PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright © 2003 Keith Packard
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Keith Packard not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Keith Packard makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ ----------------------------------------
+
+Copyright (c) 2007-2009, Troy D. Hanson
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ----------------------------------------
+
+Copyright 1992, 1993 by TOSHIBA Corp.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of TOSHIBA not be used in advertising
+or publicity pertaining to distribution of the software without specific,
+written prior permission. TOSHIBA make no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without express or implied warranty.
+
+TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+
+ ----------------------------------------
+
+Copyright IBM Corporation 1993
+
+All Rights Reserved
+
+License to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of IBM not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND
+NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
+IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+ ----------------------------------------
+
+Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
+ and Nippon Telegraph and Telephone Corporation
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of OMRON, NTT Software, and NTT
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission. OMRON, NTT Software,
+and NTT make no representations about the suitability of this
+software for any purpose. It is provided "as is" without express or
+implied warranty.
+
+OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT, BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+****************************
+zlib
+****************************
+(extracted from README, except for match.S)
+
+Copyright notice:
+
+ (C) 1995-2013 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+If you use the zlib library in a product, we would appreciate *not* receiving
+lengthy legal documents to sign. The sources are provided for free but without
+warranty of any kind. The library has been entirely written by Jean-loup
+Gailly and Mark Adler; it does not include third-party code.
+
+If you redistribute modified sources, we would appreciate that you include in
+the file ChangeLog history information documenting your changes. Please read
+the FAQ for more information on the distribution of modified source versions.
+
+(extracted from match.S, for match.S only)
+
+Copyright (C) 1998, 2007 Brian Raiter &lt;breadbox@muppetlabs.com&gt;
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the author be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+
+****************************
+googleurl
+****************************
+Copyright 2007, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------------------
+
+The file url_parse.cc is based on nsURLParsers.cc from Mozilla. This file is
+licensed separately as follows:
+
+The contents of this file are subject to the Mozilla Public License Version
+1.1 (the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the
+License.
+
+The Original Code is mozilla.org code.
+
+The Initial Developer of the Original Code is
+Netscape Communications Corporation.
+Portions created by the Initial Developer are Copyright (C) 1998
+the Initial Developer. All Rights Reserved.
+
+Contributor(s):
+ Darin Fisher (original author)
+
+Alternatively, the contents of this file may be used under the terms of
+either the GNU General Public License Version 2 or later (the "GPL"), or
+the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+in which case the provisions of the GPL or the LGPL are applicable instead
+of those above. If you wish to allow use of your version of this file only
+under the terms of either the GPL or the LGPL, and not to allow others to
+use your version of this file under the terms of the MPL, indicate your
+decision by deleting the provisions above and replace them with the notice
+and other provisions required by the GPL or the LGPL. If you do not delete
+the provisions above, a recipient may use your version of this file under
+the terms of any one of the MPL, the GPL or the LGPL.
+
+-------------------------------------------------------------------------------
+
+The file icu_utf.cc is from IBM. This file is licensed separately as follows:
+
+ICU License - ICU 1.8.1 and later
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2009 International Business Machines Corporation and others
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+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
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
+SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
+
+****************************
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+****************************
+jsoncpp
+****************************
+The JsonCpp library's source code, including accompanying documentation,
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all
+jurisdictions which recognize such a disclaimer. In such jurisdictions,
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this
+software may choose to accept it either as 1) Public Domain, 2) under the
+conditions of the MIT License (see below), or 3) under the terms of dual
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+ http://en.wikipedia.org/wiki/MIT_License
+
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+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.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+
+
+****************************
+libwebp
+****************************
+Copyright (c) 2010, Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Google nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">GVR Keyboard</span>
+<span class="homepage"><a href="NA">homepage</a></span>
+<input type="checkbox" hidden id="63">
+<label class="show" for="63" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">harfbuzz-ng</span>
+<span class="homepage"><a href="http://harfbuzz.org">homepage</a></span>
+<input type="checkbox" hidden id="64">
+<label class="show" for="64" tabindex="0"></label>
+<div class="licence">
+<pre>HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
+For parts of HarfBuzz that are licensed under different licenses see individual
+files names COPYING in subdirectories where applicable.
+
+Copyright © 2010,2011,2012 Google, Inc.
+Copyright © 2012 Mozilla Foundation
+Copyright © 2011 Codethink Limited
+Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
+Copyright © 2009 Keith Stribley
+Copyright © 2009 Martin Hosken and SIL International
+Copyright © 2007 Chris Wilson
+Copyright © 2006 Behdad Esfahbod
+Copyright © 2005 David Turner
+Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
+Copyright © 1998-2004 David Turner and Werner Lemberg
+
+For full copyright notices consult the individual files in the package.
+
+
+Permission is hereby granted, without written agreement and without
+license or royalty fees, to use, copy, modify, and distribute this
+software and its documentation for any purpose, provided that the
+above copyright notice and the following two paragraphs appear in
+all copies of this software.
+
+IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Headless Android Heap Analyzer</span>
+<span class="homepage"><a href="https://github.com/square/haha">homepage</a></span>
+<input type="checkbox" hidden id="65">
+<label class="show" for="65" tabindex="0"></label>
+<div class="licence">
+<pre>perflib, guava:
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+================================================================================
+trove4j:
+
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free
+Software Foundation; either version 2.1 of the License, or (at your option) any
+later version. This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+for more details. You should have received a copy of the GNU Lesser General
+Public License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Two classes (HashFunctions and PrimeFinder) included in Trove are licensed
+under the following terms:
+
+Copyright (c) 1999 CERN - European Organization for Nuclear Research.
+Permission to use, copy, modify, distribute and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that the
+above copyright notice appear in all copies and that both that copyright notice
+and this permission notice appear in supporting documentation. CERN makes no
+representations about the suitability of this software for any purpose. It is
+provided "as is" without expressed or implied warranty.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">hunspell</span>
+<span class="homepage"><a href="http://hunspell.sourceforge.net/">homepage</a></span>
+<input type="checkbox" hidden id="66">
+<label class="show" for="66" tabindex="0"></label>
+<div class="licence">
+<pre> MOZILLA PUBLIC LICENSE
+ Version 1.1
+
+ ---------------
+
+1. Definitions.
+
+ 1.0.1. "Commercial Use" means distribution or otherwise making the
+ Covered Code available to a third party.
+
+ 1.1. "Contributor" means each entity that creates or contributes to
+ the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the Original
+ Code, prior Modifications used by a Contributor, and the Modifications
+ made by that particular Contributor.
+
+ 1.3. "Covered Code" means the Original Code or Modifications or the
+ combination of the Original Code and Modifications, in each case
+ including portions thereof.
+
+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
+ accepted in the software development community for the electronic
+ transfer of data.
+
+ 1.5. "Executable" means Covered Code in any form other than Source
+ Code.
+
+ 1.6. "Initial Developer" means the individual or entity identified
+ as the Initial Developer in the Source Code notice required by Exhibit
+ A.
+
+ 1.7. "Larger Work" means a work which combines Covered Code or
+ portions thereof with code not governed by the terms of this License.
+
+ 1.8. "License" means this document.
+
+ 1.8.1. "Licensable" means having the right to grant, to the maximum
+ extent possible, whether at the time of the initial grant or
+ subsequently acquired, any and all of the rights conveyed herein.
+
+ 1.9. "Modifications" means any addition to or deletion from the
+ substance or structure of either the Original Code or any previous
+ Modifications. When Covered Code is released as a series of files, a
+ Modification is:
+ A. Any addition to or deletion from the contents of a file
+ containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+ 1.10. "Original Code" means Source Code of computer software code
+ which is described in the Source Code notice required by Exhibit A as
+ Original Code, and which, at the time of its release under this
+ License is not already Covered Code governed by this License.
+
+ 1.10.1. "Patent Claims" means any patent claim(s), now owned or
+ hereafter acquired, including without limitation, method, process,
+ and apparatus claims, in any patent Licensable by grantor.
+
+ 1.11. "Source Code" means the preferred form of the Covered Code for
+ making modifications to it, including all modules it contains, plus
+ any associated interface definition files, scripts used to control
+ compilation and installation of an Executable, or source code
+ differential comparisons against either the Original Code or another
+ well known, available Covered Code of the Contributor's choice. The
+ Source Code can be in a compressed or archival form, provided the
+ appropriate decompression or de-archiving software is widely available
+ for no charge.
+
+ 1.12. "You" (or "Your") means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of, this
+ License or a future version of this License issued under Section 6.1.
+ For legal entities, "You" includes any entity which controls, is
+ controlled by, or is under common control with You. For purposes of
+ this definition, "control" means (a) the power, direct or indirect,
+ to cause the direction or management of such entity, whether by
+ contract or otherwise, or (b) ownership of more than fifty percent
+ (50%) of the outstanding shares or beneficial ownership of such
+ entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+ The Initial Developer hereby grants You a world-wide, royalty-free,
+ non-exclusive license, subject to third party intellectual property
+ claims:
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Initial Developer to use, reproduce,
+ modify, display, perform, sublicense and distribute the Original
+ Code (or portions thereof) with or without Modifications, and/or
+ as part of a Larger Work; and
+
+ (b) under Patents Claims infringed by the making, using or
+ selling of Original Code, to make, have made, use, practice,
+ sell, and offer for sale, and/or otherwise dispose of the
+ Original Code (or portions thereof).
+
+ (c) the licenses granted in this Section 2.1(a) and (b) are
+ effective on the date Initial Developer first distributes
+ Original Code under the terms of this License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is
+ granted: 1) for code that You delete from the Original Code; 2)
+ separate from the Original Code; or 3) for infringements caused
+ by: i) the modification of the Original Code or ii) the
+ combination of the Original Code with other software or devices.
+
+ 2.2. Contributor Grant.
+ Subject to third party intellectual property claims, each Contributor
+ hereby grants You a world-wide, royalty-free, non-exclusive license
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Contributor, to use, reproduce, modify,
+ display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof) either on an
+ unmodified basis, with other Modifications, as Covered Code
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using, or
+ selling of Modifications made by that Contributor either alone
+ and/or in combination with its Contributor Version (or portions
+ of such combination), to make, use, sell, offer for sale, have
+ made, and/or otherwise dispose of: 1) Modifications made by that
+ Contributor (or portions thereof); and 2) the combination of
+ Modifications made by that Contributor with its Contributor
+ Version (or portions of such combination).
+
+ (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+ effective on the date Contributor first makes Commercial Use of
+ the Covered Code.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent license is
+ granted: 1) for any code that Contributor has deleted from the
+ Contributor Version; 2) separate from the Contributor Version;
+ 3) for infringements caused by: i) third party modifications of
+ Contributor Version or ii) the combination of Modifications made
+ by that Contributor with other software (except as part of the
+ Contributor Version) or other devices; or 4) under Patent Claims
+ infringed by Covered Code in the absence of Modifications made by
+ that Contributor.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are
+ governed by the terms of this License, including without limitation
+ Section 2.2. The Source Code version of Covered Code may be
+ distributed only under the terms of this License or a future version
+ of this License released under Section 6.1, and You must include a
+ copy of this License with every copy of the Source Code You
+ distribute. You may not offer or impose any terms on any Source Code
+ version that alters or restricts the applicable version of this
+ License or the recipients' rights hereunder. However, You may include
+ an additional document offering the additional rights described in
+ Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be
+ made available in Source Code form under the terms of this License
+ either on the same media as an Executable version or via an accepted
+ Electronic Distribution Mechanism to anyone to whom you made an
+ Executable version available; and if made available via Electronic
+ Distribution Mechanism, must remain available for at least twelve (12)
+ months after the date it initially became available, or at least six
+ (6) months after a subsequent version of that particular Modification
+ has been made available to such recipients. You are responsible for
+ ensuring that the Source Code version remains available even if the
+ Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which You contribute to contain a
+ file documenting the changes You made to create that Covered Code and
+ the date of any change. You must include a prominent statement that
+ the Modification is derived, directly or indirectly, from Original
+ Code provided by the Initial Developer and including the name of the
+ Initial Developer in (a) the Source Code, and (b) in any notice in an
+ Executable version or related documentation in which You describe the
+ origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+ (a) Third Party Claims.
+ If Contributor has knowledge that a license under a third party's
+ intellectual property rights is required to exercise the rights
+ granted by such Contributor under Sections 2.1 or 2.2,
+ Contributor must include a text file with the Source Code
+ distribution titled "LEGAL" which describes the claim and the
+ party making the claim in sufficient detail that a recipient will
+ know whom to contact. If Contributor obtains such knowledge after
+ the Modification is made available as described in Section 3.2,
+ Contributor shall promptly modify the LEGAL file in all copies
+ Contributor makes available thereafter and shall take other steps
+ (such as notifying appropriate mailing lists or newsgroups)
+ reasonably calculated to inform those who received the Covered
+ Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Contributor's Modifications include an application programming
+ interface and Contributor has knowledge of patent licenses which
+ are reasonably necessary to implement that API, Contributor must
+ also include this information in the LEGAL file.
+
+ (c) Representations.
+ Contributor represents that, except as disclosed pursuant to
+ Section 3.4(a) above, Contributor believes that Contributor's
+ Modifications are Contributor's original creation(s) and/or
+ Contributor has sufficient rights to grant the rights conveyed by
+ this License.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source
+ Code. If it is not possible to put such notice in a particular Source
+ Code file due to its structure, then You must include such notice in a
+ location (such as a relevant directory) where a user would be likely
+ to look for such a notice. If You created one or more Modification(s)
+ You may add your name as a Contributor to the notice described in
+ Exhibit A. You must also duplicate this License in any documentation
+ for the Source Code where You describe recipients' rights or ownership
+ rights relating to Covered Code. You may choose to offer, and to
+ charge a fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Code. However, You
+ may do so only on Your own behalf, and not on behalf of the Initial
+ Developer or any Contributor. You must make it absolutely clear than
+ any such warranty, support, indemnity or liability obligation is
+ offered by You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred by the
+ Initial Developer or such Contributor as a result of warranty,
+ support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the
+ requirements of Section 3.1-3.5 have been met for that Covered Code,
+ and if You include a notice stating that the Source Code version of
+ the Covered Code is available under the terms of this License,
+ including a description of how and where You have fulfilled the
+ obligations of Section 3.2. The notice must be conspicuously included
+ in any notice in an Executable version, related documentation or
+ collateral in which You describe recipients' rights relating to the
+ Covered Code. You may distribute the Executable version of Covered
+ Code or ownership rights under a license of Your choice, which may
+ contain terms different from this License, provided that You are in
+ compliance with the terms of this License and that the license for the
+ Executable version does not attempt to limit or alter the recipient's
+ rights in the Source Code version from the rights set forth in this
+ License. If You distribute the Executable version under a different
+ license You must make it absolutely clear that any terms which differ
+ from this License are offered by You alone, not by the Initial
+ Developer or any Contributor. You hereby agree to indemnify the
+ Initial Developer and every Contributor for any liability incurred by
+ the Initial Developer or such Contributor as a result of any such
+ terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code
+ not governed by the terms of this License and distribute the Larger
+ Work as a single product. In such a case, You must make sure the
+ requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this
+ License with respect to some or all of the Covered Code due to
+ statute, judicial order, or regulation then You must: (a) comply with
+ the terms of this License to the maximum extent possible; and (b)
+ describe the limitations and the code they affect. Such description
+ must be included in the LEGAL file described in Section 3.4 and must
+ be included with all distributions of the Source Code. Except to the
+ extent prohibited by statute or regulation, such description must be
+ sufficiently detailed for a recipient of ordinary skill to be able to
+ understand it.
+
+5. Application of this License.
+
+ This License applies to code to which the Initial Developer has
+ attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation ("Netscape") may publish revised
+ and/or new versions of the License from time to time. Each version
+ will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the
+ License, You may always continue to use it under the terms of that
+ version. You may also choose to use such Covered Code under the terms
+ of any subsequent version of the License published by Netscape. No one
+ other than Netscape has the right to modify the terms applicable to
+ Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If You create or use a modified version of this License (which you may
+ only do in order to apply it to code which is not already Covered Code
+ governed by this License), You must (a) rename Your license so that
+ the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+ "MPL", "NPL" or any confusingly similar phrase do not appear in your
+ license (except to note that your license differs from this License)
+ and (b) otherwise make it clear that Your version of the license
+ contains terms which differ from the Mozilla Public License and
+ Netscape Public License. (Filling in the name of the Initial
+ Developer, Original Code or Contributor in the notice described in
+ Exhibit A shall not of themselves be deemed to be modifications of
+ this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+ DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+ IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+ YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+ 8.1. This License and the rights granted hereunder will terminate
+ automatically if You fail to comply with terms herein and fail to cure
+ such breach within 30 days of becoming aware of the breach. All
+ sublicenses to the Covered Code which are properly granted shall
+ survive any termination of this License. Provisions which, by their
+ nature, must remain in effect beyond the termination of this License
+ shall survive.
+
+ 8.2. If You initiate litigation by asserting a patent infringement
+ claim (excluding declatory judgment actions) against Initial Developer
+ or a Contributor (the Initial Developer or Contributor against whom
+ You file such action is referred to as "Participant") alleging that:
+
+ (a) such Participant's Contributor Version directly or indirectly
+ infringes any patent, then any and all rights granted by such
+ Participant to You under Sections 2.1 and/or 2.2 of this License
+ shall, upon 60 days notice from Participant terminate prospectively,
+ unless if within 60 days after receipt of notice You either: (i)
+ agree in writing to pay Participant a mutually agreeable reasonable
+ royalty for Your past and future use of Modifications made by such
+ Participant, or (ii) withdraw Your litigation claim with respect to
+ the Contributor Version against such Participant. If within 60 days
+ of notice, a reasonable royalty and payment arrangement are not
+ mutually agreed upon in writing by the parties or the litigation claim
+ is not withdrawn, the rights granted by Participant to You under
+ Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+ the 60 day notice period specified above.
+
+ (b) any software, hardware, or device, other than such Participant's
+ Contributor Version, directly or indirectly infringes any patent, then
+ any rights granted to You by such Participant under Sections 2.1(b)
+ and 2.2(b) are revoked effective as of the date You first made, used,
+ sold, distributed, or had made, Modifications made by that
+ Participant.
+
+ 8.3. If You assert a patent infringement claim against Participant
+ alleging that such Participant's Contributor Version directly or
+ indirectly infringes any patent where such claim is resolved (such as
+ by license or settlement) prior to the initiation of patent
+ infringement litigation, then the reasonable value of the licenses
+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
+ into account in determining the amount or value of any payment or
+ license.
+
+ 8.4. In the event of termination under Sections 8.1 or 8.2 above,
+ all end user license agreements (excluding distributors and resellers)
+ which have been validly granted by You or any distributor hereunder
+ prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+ DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+ OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+ ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+ CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+ WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+ RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+ THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in
+ 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+ software" and "commercial computer software documentation," as such
+ terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+ C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+ all U.S. Government End Users acquire Covered Code with only those
+ rights set forth herein.
+
+11. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. This License shall be governed by
+ California law provisions (except to the extent applicable law, if
+ any, provides otherwise), excluding its conflict-of-law provisions.
+ With respect to disputes in which at least one party is a citizen of,
+ or an entity chartered or registered to do business in the United
+ States of America, any litigation relating to this License shall be
+ subject to the jurisdiction of the Federal Courts of the Northern
+ District of California, with venue lying in Santa Clara County,
+ California, with the losing party responsible for costs, including
+ without limitation, court costs and reasonable attorneys' fees and
+ expenses. The application of the United Nations Convention on
+ Contracts for the International Sale of Goods is expressly excluded.
+ Any law or regulation which provides that the language of a contract
+ shall be construed against the drafter shall not apply to this
+ License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or indirectly,
+ out of its utilization of rights under this License and You agree to
+ work with Initial Developer and Contributors to distribute such
+ responsibility on an equitable basis. Nothing herein is intended or
+ shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+ Initial Developer may designate portions of the Covered Code as
+ "Multiple-Licensed". "Multiple-Licensed" means that the Initial
+ Developer permits you to utilize portions of the Covered Code under
+ Your choice of the NPL or the alternative licenses, if any, specified
+ by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+ ``The contents of this file are subject to the Mozilla Public License
+ Version 1.1 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ License for the specific language governing rights and limitations
+ under the License.
+
+ The Original Code is ______________________________________.
+
+ The Initial Developer of the Original Code is ________________________.
+ Portions created by ______________________ are Copyright (C) ______
+ _______________________. All Rights Reserved.
+
+ Contributor(s): ______________________________________.
+
+ Alternatively, the contents of this file may be used under the terms
+ of the _____ license (the "[___] License"), in which case the
+ provisions of [______] License are applicable instead of those
+ above. If you wish to allow use of your version of this file only
+ under the terms of the [____] License and not to allow others to use
+ your version of this file under the MPL, indicate your decision by
+ deleting the provisions above and replace them with the notice and
+ other provisions required by the [___] License. If you do not delete
+ the provisions above, a recipient may use your version of this file
+ under either the MPL or the [___] License."
+
+ [NOTE: The text of this Exhibit A may differ slightly from the text of
+ the notices in the Source Code files of the Original Code. You should
+ use the text of this Exhibit A rather than the text found in the
+ Original Code Source Code for Your Modifications.]
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">hunspell dictionaries</span>
+<span class="homepage"><a href="http://bgoffice.sourceforge.net/">homepage</a></span>
+<input type="checkbox" hidden id="67">
+<label class="show" for="67" tabindex="0"></label>
+<div class="licence">
+<pre>GPL 2.0/LGPL 2.1/MPL 1.1 tri-license
+
+The contents of this software may be used under the terms of
+the GNU General Public License Version 2 or later (the "GPL"), or
+the GNU Lesser General Public License Version 2.1 or later (the "LGPL",
+see COPYING.LGPL) or (excepting the LGPLed GNU gettext library in the
+intl/ directory) the Mozilla Public License Version 1.1 or later
+(the "MPL", see COPYING.MPL).
+
+Software distributed under these licenses is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences
+for the specific language governing rights and limitations under the licenses.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">IAccessible2 COM interfaces for accessibility</span>
+<span class="homepage"><a href="https://github.com/LinuxA11y/IAccessible2">homepage</a></span>
+<input type="checkbox" hidden id="68">
+<label class="show" for="68" tabindex="0"></label>
+<div class="licence">
+<pre>/*************************************************************************
+ *
+ * IAccessible2 IDL Specification
+ *
+ * Copyright (c) 2007, 2010 Linux Foundation
+ * Copyright (c) 2006 IBM Corporation
+ * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
+ * All rights reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This BSD License conforms to the Open Source Initiative "Simplified
+ * BSD License" as published at:
+ * http://www.opensource.org/licenses/bsd-license.php
+ *
+ * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
+ * mark may be used in accordance with the Linux Foundation Trademark
+ * Policy to indicate compliance with the IAccessible2 specification.
+ *
+ ************************************************************************/
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">iccjpeg</span>
+<span class="homepage"><a href="http://www.ijg.org">homepage</a></span>
+<input type="checkbox" hidden id="69">
+<label class="show" for="69" tabindex="0"></label>
+<div class="licence">
+<pre>(Copied from the README.)
+
+--------------------------------------------------------------------------------
+
+LICENSE extracted from IJG's jpeg distribution:
+-----------------------------------------------
+
+In plain English:
+
+1. We don't promise that this software works. (But if you find any bugs,
+ please let us know!)
+2. You can use this software for whatever you want. You don't have to pay us.
+3. You may not pretend that you wrote this software. If you use it in a
+ program, you must acknowledge somewhere in your documentation that
+ you've used the IJG code.
+
+In legalese:
+
+The authors make NO WARRANTY or representation, either express or implied,
+with respect to this software, its quality, accuracy, merchantability, or
+fitness for a particular purpose. This software is provided "AS IS", and you,
+its user, assume the entire risk as to its quality and accuracy.
+
+This software is copyright (C) 1991-1998, Thomas G. Lane.
+All Rights Reserved except as specified below.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+software (or portions thereof) for any purpose, without fee, subject to these
+conditions:
+(1) If any part of the source code for this software is distributed, then this
+README file must be included, with this copyright and no-warranty notice
+unaltered; and any additions, deletions, or changes to the original files
+must be clearly indicated in accompanying documentation.
+(2) If only executable code is distributed, then the accompanying
+documentation must state that "this software is based in part on the work of
+the Independent JPEG Group".
+(3) Permission for use of this software is granted only if the user accepts
+full responsibility for any undesirable consequences; the authors accept
+NO LIABILITY for damages of any kind.
+
+These conditions apply to any software derived from or based on the IJG code,
+not just to the unmodified library. If you use our work, you ought to
+acknowledge us.
+
+Permission is NOT granted for the use of any IJG author's name or company name
+in advertising or publicity relating to this software or products derived from
+it. This software may be referred to only as "the Independent JPEG Group's
+software".
+
+We specifically permit and encourage the use of this software as the basis of
+commercial products, provided that all warranty or liability claims are
+assumed by the product vendor.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">icu</span>
+<span class="homepage"><a href="http://site.icu-project.org/">homepage</a></span>
+<input type="checkbox" hidden id="70">
+<label class="show" for="70" tabindex="0"></label>
+<div class="licence">
+<pre>COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
+
+Copyright © 1991-2018 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Unicode data files and any associated documentation
+(the "Data Files") or Unicode software and any associated documentation
+(the "Software") to deal in the Data Files or Software
+without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, and/or sell copies of
+the Data Files or Software, and to permit persons to whom the Data Files
+or Software are furnished to do so, provided that either
+(a) this copyright and permission notice appear with all copies
+of the Data Files or Software, or
+(b) this copyright and permission notice appear in associated
+Documentation.
+
+THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in these Data Files or Software without prior
+written authorization of the copyright holder.
+
+---------------------
+
+Third-Party Software Licenses
+
+This section contains third-party software notices and/or additional
+terms for licensed third-party software components included within ICU
+libraries.
+
+1. ICU License - ICU 1.8.1 to ICU 57.1
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2016 International Business Machines Corporation and others
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+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
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
+SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
+All trademarks and registered trademarks mentioned herein are the
+property of their respective owners.
+
+2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
+
+ # The Google Chrome software developed by Google is licensed under
+ # the BSD license. Other software included in this distribution is
+ # provided under other licenses, as set forth below.
+ #
+ # The BSD License
+ # http://opensource.org/licenses/bsd-license.php
+ # Copyright (C) 2006-2008, Google Inc.
+ #
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification, are permitted provided that the following conditions are met:
+ #
+ # Redistributions of source code must retain the above copyright notice,
+ # this list of conditions and the following disclaimer.
+ # Redistributions in binary form must reproduce the above
+ # copyright notice, this list of conditions and the following
+ # disclaimer in the documentation and/or other materials provided with
+ # the distribution.
+ # Neither the name of Google Inc. nor the names of its
+ # contributors may be used to endorse or promote products derived from
+ # this software without specific prior written permission.
+ #
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #
+ #
+ # The word list in cjdict.txt are generated by combining three word lists
+ # listed below with further processing for compound word breaking. The
+ # frequency is generated with an iterative training against Google web
+ # corpora.
+ #
+ # * Libtabe (Chinese)
+ # - https://sourceforge.net/project/?group_id=1519
+ # - Its license terms and conditions are shown below.
+ #
+ # * IPADIC (Japanese)
+ # - http://chasen.aist-nara.ac.jp/chasen/distribution.html
+ # - Its license terms and conditions are shown below.
+ #
+ # ---------COPYING.libtabe ---- BEGIN--------------------
+ #
+ # /*
+ # * Copyright (c) 1999 TaBE Project.
+ # * Copyright (c) 1999 Pai-Hsiang Hsiao.
+ # * All rights reserved.
+ # *
+ # * Redistribution and use in source and binary forms, with or without
+ # * modification, are permitted provided that the following conditions
+ # * are met:
+ # *
+ # * . Redistributions of source code must retain the above copyright
+ # * notice, this list of conditions and the following disclaimer.
+ # * . Redistributions in binary form must reproduce the above copyright
+ # * notice, this list of conditions and the following disclaimer in
+ # * the documentation and/or other materials provided with the
+ # * distribution.
+ # * . Neither the name of the TaBE Project nor the names of its
+ # * contributors may be used to endorse or promote products derived
+ # * from this software without specific prior written permission.
+ # *
+ # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ # * OF THE POSSIBILITY OF SUCH DAMAGE.
+ # */
+ #
+ # /*
+ # * Copyright (c) 1999 Computer Systems and Communication Lab,
+ # * Institute of Information Science, Academia
+ # * Sinica. All rights reserved.
+ # *
+ # * Redistribution and use in source and binary forms, with or without
+ # * modification, are permitted provided that the following conditions
+ # * are met:
+ # *
+ # * . Redistributions of source code must retain the above copyright
+ # * notice, this list of conditions and the following disclaimer.
+ # * . Redistributions in binary form must reproduce the above copyright
+ # * notice, this list of conditions and the following disclaimer in
+ # * the documentation and/or other materials provided with the
+ # * distribution.
+ # * . Neither the name of the Computer Systems and Communication Lab
+ # * nor the names of its contributors may be used to endorse or
+ # * promote products derived from this software without specific
+ # * prior written permission.
+ # *
+ # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ # * OF THE POSSIBILITY OF SUCH DAMAGE.
+ # */
+ #
+ # Copyright 1996 Chih-Hao Tsai @ Beckman Institute,
+ # University of Illinois
+ # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4
+ #
+ # ---------------COPYING.libtabe-----END--------------------------------
+ #
+ #
+ # ---------------COPYING.ipadic-----BEGIN-------------------------------
+ #
+ # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
+ # and Technology. All Rights Reserved.
+ #
+ # Use, reproduction, and distribution of this software is permitted.
+ # Any copy of this software, whether in its original form or modified,
+ # must include both the above copyright notice and the following
+ # paragraphs.
+ #
+ # Nara Institute of Science and Technology (NAIST),
+ # the copyright holders, disclaims all warranties with regard to this
+ # software, including all implied warranties of merchantability and
+ # fitness, in no event shall NAIST be liable for
+ # any special, indirect or consequential damages or any damages
+ # whatsoever resulting from loss of use, data or profits, whether in an
+ # action of contract, negligence or other tortuous action, arising out
+ # of or in connection with the use or performance of this software.
+ #
+ # A large portion of the dictionary entries
+ # originate from ICOT Free Software. The following conditions for ICOT
+ # Free Software applies to the current dictionary as well.
+ #
+ # Each User may also freely distribute the Program, whether in its
+ # original form or modified, to any third party or parties, PROVIDED
+ # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
+ # on, or be attached to, the Program, which is distributed substantially
+ # in the same form as set out herein and that such intended
+ # distribution, if actually made, will neither violate or otherwise
+ # contravene any of the laws and regulations of the countries having
+ # jurisdiction over the User or the intended distribution itself.
+ #
+ # NO WARRANTY
+ #
+ # The program was produced on an experimental basis in the course of the
+ # research and development conducted during the project and is provided
+ # to users as so produced on an experimental basis. Accordingly, the
+ # program is provided without any warranty whatsoever, whether express,
+ # implied, statutory or otherwise. The term "warranty" used herein
+ # includes, but is not limited to, any warranty of the quality,
+ # performance, merchantability and fitness for a particular purpose of
+ # the program and the nonexistence of any infringement or violation of
+ # any right of any third party.
+ #
+ # Each user of the program will agree and understand, and be deemed to
+ # have agreed and understood, that there is no warranty whatsoever for
+ # the program and, accordingly, the entire risk arising from or
+ # otherwise connected with the program is assumed by the user.
+ #
+ # Therefore, neither ICOT, the copyright holder, or any other
+ # organization that participated in or was otherwise related to the
+ # development of the program and their respective officials, directors,
+ # officers and other employees shall be held liable for any and all
+ # damages, including, without limitation, general, special, incidental
+ # and consequential damages, arising out of or otherwise in connection
+ # with the use or inability to use the program or any product, material
+ # or result produced or otherwise obtained by using the program,
+ # regardless of whether they have been advised of, or otherwise had
+ # knowledge of, the possibility of such damages at any time during the
+ # project or thereafter. Each user will be deemed to have agreed to the
+ # foregoing by his or her commencement of use of the program. The term
+ # "use" as used herein includes, but is not limited to, the use,
+ # modification, copying and distribution of the program and the
+ # production of secondary products from the program.
+ #
+ # In the case where the program, whether in its original form or
+ # modified, was distributed or delivered to or received by a user from
+ # any person, organization or entity other than ICOT, unless it makes or
+ # grants independently of ICOT any specific warranty to the user in
+ # writing, such person, organization or entity, will also be exempted
+ # from and not be held liable to the user for any such damages as noted
+ # above as far as the program is concerned.
+ #
+ # ---------------COPYING.ipadic-----END----------------------------------
+
+3. Lao Word Break Dictionary Data (laodict.txt)
+
+ # Copyright (c) 2013 International Business Machines Corporation
+ # and others. All Rights Reserved.
+ #
+ # Project: http://code.google.com/p/lao-dictionary/
+ # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
+ # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt
+ # (copied below)
+ #
+ # This file is derived from the above dictionary, with slight
+ # modifications.
+ # ----------------------------------------------------------------------
+ # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification,
+ # are permitted provided that the following conditions are met:
+ #
+ #
+ # Redistributions of source code must retain the above copyright notice, this
+ # list of conditions and the following disclaimer. Redistributions in
+ # binary form must reproduce the above copyright notice, this list of
+ # conditions and the following disclaimer in the documentation and/or
+ # other materials provided with the distribution.
+ #
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ # OF THE POSSIBILITY OF SUCH DAMAGE.
+ # --------------------------------------------------------------------------
+
+4. Burmese Word Break Dictionary Data (burmesedict.txt)
+
+ # Copyright (c) 2014 International Business Machines Corporation
+ # and others. All Rights Reserved.
+ #
+ # This list is part of a project hosted at:
+ # github.com/kanyawtech/myanmar-karen-word-lists
+ #
+ # --------------------------------------------------------------------------
+ # Copyright (c) 2013, LeRoy Benjamin Sharon
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification, are permitted provided that the following conditions
+ # are met: Redistributions of source code must retain the above
+ # copyright notice, this list of conditions and the following
+ # disclaimer. Redistributions in binary form must reproduce the
+ # above copyright notice, this list of conditions and the following
+ # disclaimer in the documentation and/or other materials provided
+ # with the distribution.
+ #
+ # Neither the name Myanmar Karen Word Lists, nor the names of its
+ # contributors may be used to endorse or promote products derived
+ # from this software without specific prior written permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ # SUCH DAMAGE.
+ # --------------------------------------------------------------------------
+
+5. Time Zone Database
+
+ ICU uses the public domain data and code derived from Time Zone
+Database for its time zone support. The ownership of the TZ database
+is explained in BCP 175: Procedure for Maintaining the Time Zone
+Database section 7.
+
+ # 7. Database Ownership
+ #
+ # The TZ database itself is not an IETF Contribution or an IETF
+ # document. Rather it is a pre-existing and regularly updated work
+ # that is in the public domain, and is intended to remain in the
+ # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do
+ # not apply to the TZ Database or contributions that individuals make
+ # to it. Should any claims be made and substantiated against the TZ
+ # Database, the organization that is providing the IANA
+ # Considerations defined in this RFC, under the memorandum of
+ # understanding with the IETF, currently ICANN, may act in accordance
+ # with all competent court orders. No ownership claims will be made
+ # by ICANN or the IETF Trust on the database or the code. Any person
+ # making a contribution to the database or code waives all rights to
+ # future claims in that contribution or in the TZ Database.
+
+6. Google double-conversion
+
+Copyright 2006-2011, the V8 project authors. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">inspector protocol</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/deps/inspector_protocol/">homepage</a></span>
+<input type="checkbox" hidden id="71">
+<label class="show" for="71" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2016 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">International Phone Number Library</span>
+<span class="homepage"><a href="https://github.com/googlei18n/libphonenumber/">homepage</a></span>
+<input type="checkbox" hidden id="72">
+<label class="show" for="72" tabindex="0"></label>
+<div class="licence">
+<pre> Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">ISimpleDOM COM interfaces for accessibility</span>
+<span class="homepage"><a href="http://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs">homepage</a></span>
+<input type="checkbox" hidden id="73">
+<label class="show" for="73" tabindex="0"></label>
+<div class="licence">
+<pre>/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2002
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Jinja2 Python Template Engine</span>
+<span class="homepage"><a href="http://jinja.pocoo.org/">homepage</a></span>
+<input type="checkbox" hidden id="74">
+<label class="show" for="74" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details.
+
+Some rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * The names of the contributors may not be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">jsoncpp</span>
+<span class="homepage"><a href="https://github.com/open-source-parsers/jsoncpp">homepage</a></span>
+<input type="checkbox" hidden id="75">
+<label class="show" for="75" tabindex="0"></label>
+<div class="licence">
+<pre>The JsonCpp library's source code, including accompanying documentation,
+tests and demonstration applications, are licensed under the following
+conditions...
+
+The author (Baptiste Lepilleur) explicitly disclaims copyright in all
+jurisdictions which recognize such a disclaimer. In such jurisdictions,
+this software is released into the Public Domain.
+
+In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
+2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
+released under the terms of the MIT License (see below).
+
+In jurisdictions which recognize Public Domain property, the user of this
+software may choose to accept it either as 1) Public Domain, 2) under the
+conditions of the MIT License (see below), or 3) under the terms of dual
+Public Domain/MIT License conditions described here, as they choose.
+
+The MIT License is about as close to Public Domain as a license can get, and is
+described in clear, concise terms at:
+
+ http://en.wikipedia.org/wiki/MIT_License
+
+The full text of the MIT License follows:
+
+========================================================================
+Copyright (c) 2007-2010 Baptiste Lepilleur
+
+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.
+========================================================================
+(END LICENSE TEXT)
+
+The MIT license is compatible with both the GPL and commercial
+software, affording one all of the rights of Public Domain with the
+minor nuisance of being required to keep the above copyright notice
+and license text in the source code. Note also that by accepting the
+Public Domain "license" you can re-license your copy using whatever
+license you like.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Khronos header files</span>
+<span class="homepage"><a href="http://www.khronos.org/registry">homepage</a></span>
+<input type="checkbox" hidden id="76">
+<label class="show" for="76" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2007-2010 The Khronos Group Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and/or associated documentation files (the
+"Materials"), to deal in the Materials without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Materials, and to
+permit persons to whom the Materials are 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 Materials.
+
+THE MATERIALS ARE 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
+MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+
+
+SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+
+Copyright (C) 1992 Silicon Graphics, Inc. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice including the dates of first publication and either
+this permission notice or a reference to http://oss.sgi.com/projects/FreeB/
+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 SILICON
+GRAPHICS, INC. 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.
+
+Except as contained in this notice, the name of Silicon Graphics, Inc. shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Silicon
+Graphics, Inc.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">LCOV - the LTP GCOV extension</span>
+<span class="homepage"><a href="http://ltp.sourceforge.net/coverage/lcov.php">homepage</a></span>
+<input type="checkbox" hidden id="77">
+<label class="show" for="77" tabindex="0"></label>
+<div class="licence">
+<pre> GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the program's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">LeakCanary</span>
+<span class="homepage"><a href="https://github.com/square/leakcanary">homepage</a></span>
+<input type="checkbox" hidden id="78">
+<label class="show" for="78" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">LevelDB: A Fast Persistent Key-Value Store</span>
+<span class="homepage"><a href="https://github.com/google/leveldb.git">homepage</a></span>
+<input type="checkbox" hidden id="79">
+<label class="show" for="79" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2011 The LevelDB Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libaddressinput</span>
+<span class="homepage"><a href="https://github.com/googlei18n/libaddressinput">homepage</a></span>
+<input type="checkbox" hidden id="80">
+<label class="show" for="80" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libcxx</span>
+<span class="homepage"><a href="http://libcxx.llvm.org/">homepage</a></span>
+<input type="checkbox" hidden id="81">
+<label class="show" for="81" tabindex="0"></label>
+<div class="licence">
+<pre>==============================================================================
+libc++ License
+==============================================================================
+
+The libc++ library is dual licensed under both the University of Illinois
+"BSD-Like" license and the MIT license. As a user of this code you may choose
+to use it under either license. As a contributor, you agree to allow your code
+to be used under both.
+
+Full text of the relevant licenses is included below.
+
+==============================================================================
+
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT
+
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+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:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+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
+CONTRIBUTORS 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 WITH THE
+SOFTWARE.
+
+==============================================================================
+
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
+
+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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libcxxabi</span>
+<span class="homepage"><a href="http://libcxxabi.llvm.org/">homepage</a></span>
+<input type="checkbox" hidden id="82">
+<label class="show" for="82" tabindex="0"></label>
+<div class="licence">
+<pre>==============================================================================
+libc++abi License
+==============================================================================
+
+The libc++abi library is dual licensed under both the University of Illinois
+"BSD-Like" license and the MIT license. As a user of this code you may choose
+to use it under either license. As a contributor, you agree to allow your code
+to be used under both.
+
+Full text of the relevant licenses is included below.
+
+==============================================================================
+
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT
+
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+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:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+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
+CONTRIBUTORS 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 WITH THE
+SOFTWARE.
+
+==============================================================================
+
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
+
+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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libevdev</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/chromiumos/platform/libevdev">homepage</a></span>
+<input type="checkbox" hidden id="83">
+<label class="show" for="83" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libevent</span>
+<span class="homepage"><a href="http://libevent.org/">homepage</a></span>
+<input type="checkbox" hidden id="84">
+<label class="show" for="84" tabindex="0"></label>
+<div class="licence">
+<pre>Libevent is available for use under the following license, commonly known
+as the 3-clause (or "modified") BSD license:
+
+==============================
+Copyright (c) 2000-2007 Niels Provos &lt;provos@citi.umich.edu&gt;
+Copyright (c) 2007-2010 Niels Provos and Nick Mathewson
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+==============================
+
+Portions of Libevent are based on works by others, also made available by
+them under the three-clause BSD license above. The copyright notices are
+available in the corresponding source files; the license is as above. Here's
+a list:
+
+log.c:
+ Copyright (c) 2000 Dug Song &lt;dugsong@monkey.org&gt;
+ Copyright (c) 1993 The Regents of the University of California.
+
+strlcpy.c:
+ Copyright (c) 1998 Todd C. Miller &lt;Todd.Miller@courtesan.com&gt;
+
+win32.c:
+ Copyright (c) 2003 Michael A. Davis &lt;mike@datanerds.net&gt;
+
+evport.c:
+ Copyright (c) 2007 Sun Microsystems
+
+min_heap.h:
+ Copyright (c) 2006 Maxim Yegorushkin &lt;maxim.yegorushkin@gmail.com&gt;
+
+tree.h:
+ Copyright 2002 Niels Provos &lt;provos@citi.umich.edu&gt;
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libFuzzer</span>
+<span class="homepage"><a href="http://llvm.org/docs/LibFuzzer.html">homepage</a></span>
+<input type="checkbox" hidden id="85">
+<label class="show" for="85" tabindex="0"></label>
+<div class="licence">
+<pre>==============================================================================
+LLVM Release License
+==============================================================================
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2003-2015 University of Illinois at Urbana-Champaign.
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+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:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+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
+CONTRIBUTORS 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 WITH THE
+SOFTWARE.
+
+==============================================================================
+Copyrights and Licenses for Third Party Software Distributed with LLVM:
+==============================================================================
+The LLVM software contains code written by third parties. Such software will
+have its own individual LICENSE.TXT file in the directory in which it appears.
+This file will describe the copyrights, license, and restrictions which apply
+to that code.
+
+The disclaimer of warranty in the University of Illinois Open Source License
+applies to all code in the LLVM Distribution, and nothing in any of the
+other licenses gives permission to use the names of the LLVM Team or the
+University of Illinois to endorse or promote products derived from this
+Software.
+
+The following pieces of software have additional or alternate copyrights,
+licenses, and/or restrictions:
+
+Program Directory
+------- ---------
+Autoconf llvm/autoconf
+ llvm/projects/ModuleMaker/autoconf
+Google Test llvm/utils/unittest/googletest
+OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex}
+pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT}
+ARM contributions llvm/lib/Target/ARM/LICENSE.TXT
+md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libjingle XMPP and xmllite libraries</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/external/webrtc">homepage</a></span>
+<input type="checkbox" hidden id="86">
+<label class="show" for="86" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2011, The WebRTC project authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Google nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libjpeg</span>
+<span class="homepage"><a href="http://www.ijg.org/">homepage</a></span>
+<input type="checkbox" hidden id="87">
+<label class="show" for="87" tabindex="0"></label>
+<div class="licence">
+<pre>(Copied from the README.)
+
+--------------------------------------------------------------------------------
+
+The authors make NO WARRANTY or representation, either express or implied,
+with respect to this software, its quality, accuracy, merchantability, or
+fitness for a particular purpose. This software is provided "AS IS", and you,
+its user, assume the entire risk as to its quality and accuracy.
+
+This software is copyright (C) 1991-1998, Thomas G. Lane.
+All Rights Reserved except as specified below.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+software (or portions thereof) for any purpose, without fee, subject to these
+conditions:
+(1) If any part of the source code for this software is distributed, then this
+README file must be included, with this copyright and no-warranty notice
+unaltered; and any additions, deletions, or changes to the original files
+must be clearly indicated in accompanying documentation.
+(2) If only executable code is distributed, then the accompanying
+documentation must state that "this software is based in part on the work of
+the Independent JPEG Group".
+(3) Permission for use of this software is granted only if the user accepts
+full responsibility for any undesirable consequences; the authors accept
+NO LIABILITY for damages of any kind.
+
+These conditions apply to any software derived from or based on the IJG code,
+not just to the unmodified library. If you use our work, you ought to
+acknowledge us.
+
+Permission is NOT granted for the use of any IJG author's name or company name
+in advertising or publicity relating to this software or products derived from
+it. This software may be referred to only as "the Independent JPEG Group's
+software".
+
+We specifically permit and encourage the use of this software as the basis of
+commercial products, provided that all warranty or liability claims are
+assumed by the product vendor.
+
+
+ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
+sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
+ansi2knr.c is NOT covered by the above copyright and conditions, but instead
+by the usual distribution terms of the Free Software Foundation; principally,
+that you must include source code if you redistribute it. (See the file
+ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
+of any program generated from the IJG code, this does not limit you more than
+the foregoing paragraphs do.
+
+The Unix configuration script "configure" was produced with GNU Autoconf.
+It is copyright by the Free Software Foundation but is freely distributable.
+The same holds for its supporting scripts (config.guess, config.sub,
+ltconfig, ltmain.sh). Another support script, install-sh, is copyright
+by M.I.T. but is also freely distributable.
+
+It appears that the arithmetic coding option of the JPEG spec is covered by
+patents owned by IBM, AT&amp;T, and Mitsubishi. Hence arithmetic coding cannot
+legally be used without obtaining one or more licenses. For this reason,
+support for arithmetic coding has been removed from the free JPEG software.
+(Since arithmetic coding provides only a marginal gain over the unpatented
+Huffman mode, it is unlikely that very many implementations will support it.)
+So far as we are aware, there are no patent restrictions on the remaining
+code.
+
+The IJG distribution formerly included code to read and write GIF files.
+To avoid entanglement with the Unisys LZW patent, GIF reading support has
+been removed altogether, and the GIF writer has been simplified to produce
+"uncompressed GIFs". This technique does not use the LZW algorithm; the
+resulting GIF files are larger than usual, but are readable by all standard
+GIF decoders.
+
+We are required to state that
+ "The Graphics Interchange Format(c) is the Copyright property of
+ CompuServe Incorporated. GIF(sm) is a Service Mark property of
+ CompuServe Incorporated."
+
+--------------------------------------------------------------------------------
+
+jconfig.h is distributed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license.
+
+jmorecfg.h contains modifications, which are distributed under the Netscape
+Public License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libjpeg-turbo</span>
+<span class="homepage"><a href="https://github.com/libjpeg-turbo/libjpeg-turbo/">homepage</a></span>
+<input type="checkbox" hidden id="88">
+<label class="show" for="88" tabindex="0"></label>
+<div class="licence">
+<pre>libjpeg-turbo Licenses
+======================
+
+libjpeg-turbo is covered by three compatible BSD-style open source licenses:
+
+- The IJG (Independent JPEG Group) License, which is listed in
+ [README.ijg](README.ijg)
+
+ This license applies to the libjpeg API library and associated programs
+ (any code inherited from libjpeg, and any modifications to that code.)
+
+- The Modified (3-clause) BSD License, which is listed in
+ [turbojpeg.c](turbojpeg.c)
+
+ This license covers the TurboJPEG API library and associated programs.
+
+- The zlib License, which is listed in [simd/jsimdext.inc](simd/jsimdext.inc)
+
+ This license is a subset of the other two, and it covers the libjpeg-turbo
+ SIMD extensions.
+
+
+Complying with the libjpeg-turbo Licenses
+=========================================
+
+This section provides a roll-up of the libjpeg-turbo licensing terms, to the
+best of our understanding.
+
+1. If you are distributing a modified version of the libjpeg-turbo source,
+ then:
+
+ 1. You cannot alter or remove any existing copyright or license notices
+ from the source.
+
+ **Origin**
+ - Clause 1 of the IJG License
+ - Clause 1 of the Modified BSD License
+ - Clauses 1 and 3 of the zlib License
+
+ 2. You must add your own copyright notice to the header of each source
+ file you modified, so others can tell that you modified that file (if
+ there is not an existing copyright header in that file, then you can
+ simply add a notice stating that you modified the file.)
+
+ **Origin**
+ - Clause 1 of the IJG License
+ - Clause 2 of the zlib License
+
+ 3. You must include the IJG README file, and you must not alter any of the
+ copyright or license text in that file.
+
+ **Origin**
+ - Clause 1 of the IJG License
+
+2. If you are distributing only libjpeg-turbo binaries without the source, or
+ if you are distributing an application that statically links with
+ libjpeg-turbo, then:
+
+ 1. Your product documentation must include a message stating:
+
+ This software is based in part on the work of the Independent JPEG
+ Group.
+
+ **Origin**
+ - Clause 2 of the IJG license
+
+ 2. If your binary distribution includes or uses the TurboJPEG API, then
+ your product documentation must include the text of the Modified BSD
+ License.
+
+ **Origin**
+ - Clause 2 of the Modified BSD License
+
+3. You cannot use the name of the IJG or The libjpeg-turbo Project or the
+ contributors thereof in advertising, publicity, etc.
+
+ **Origin**
+ - IJG License
+ - Clause 3 of the Modified BSD License
+
+4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be
+ free of defects, nor do we accept any liability for undesirable
+ consequences resulting from your use of the software.
+
+ **Origin**
+ - IJG License
+ - Modified BSD License
+ - zlib License
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libpng</span>
+<span class="homepage"><a href="http://libpng.org/">homepage</a></span>
+<input type="checkbox" hidden id="89">
+<label class="show" for="89" tabindex="0"></label>
+<div class="licence">
+<pre>
+This copy of the libpng notices is provided for your convenience. In case of
+any discrepancy between this copy and the notices in the file png.h that is
+included in the libpng distribution, the latter shall prevail.
+
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+
+If you modify libpng you may insert additional notices immediately following
+this sentence.
+
+Using custom versions of pnglibconf.h and pngprefix.h for Chrome.
+
+This code is released under the libpng license.
+
+libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
+Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
+derived from libpng-1.0.6, and are distributed according to the same
+disclaimer and license as libpng-1.0.6 with the following individuals
+added to the list of Contributing Authors:
+
+ Simon-Pierre Cadieux
+ Eric S. Raymond
+ Mans Rullgard
+ Cosmin Truta
+ Gilles Vollant
+ James Yu
+ Mandar Sahastrabuddhe
+ Google Inc.
+ Vadim Barkov
+
+and with the following additions to the disclaimer:
+
+ There is no warranty against interference with your enjoyment of the
+ library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is with
+ the user.
+
+Some files in the "contrib" directory and some configure-generated
+files that are distributed with libpng have other copyright owners and
+are released under other open source licenses.
+
+libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+libpng-0.96, and are distributed according to the same disclaimer and
+license as libpng-0.96, with the following individuals added to the list
+of Contributing Authors:
+
+ Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik
+
+libpng versions 0.89, June 1996, through 0.96, May 1997, are
+Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+and are distributed according to the same disclaimer and license as
+libpng-0.88, with the following individuals added to the list of
+Contributing Authors:
+
+ John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner
+
+Some files in the "scripts" directory have other copyright owners
+but are released under this license.
+
+libpng versions 0.5, May 1995, through 0.88, January 1996, are
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+For the purposes of this copyright and license, "Contributing Authors"
+is defined as the following set of individuals:
+
+ Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner
+
+The PNG Reference Library is supplied "AS IS". The Contributing Authors
+and Group 42, Inc. disclaim all warranties, expressed or implied,
+including, without limitation, the warranties of merchantability and of
+fitness for any purpose. The Contributing Authors and Group 42, Inc.
+assume no liability for direct, indirect, incidental, special, exemplary,
+or consequential damages, which may result from the use of the PNG
+Reference Library, even if advised of the possibility of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+source code, or portions hereof, for any purpose, without fee, subject
+to the following restrictions:
+
+ 1. The origin of this source code must not be misrepresented.
+
+ 2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
+
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+The Contributing Authors and Group 42, Inc. specifically permit, without
+fee, and encourage the use of this source code as a component to
+supporting the PNG file format in commercial products. If you use this
+source code in a product, acknowledgment is not required but would be
+appreciated.
+
+END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
+
+TRADEMARK:
+
+The name "libpng" has not been registered by the Copyright owner
+as a trademark in any jurisdiction. However, because libpng has
+been distributed and maintained world-wide, continually since 1995,
+the Copyright owner claims "common-law trademark protection" in any
+jurisdiction where common-law trademark is recognized.
+
+OSI CERTIFICATION:
+
+Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
+a certification mark of the Open Source Initiative. OSI has not addressed
+the additional disclaimers inserted at version 1.0.7.
+
+EXPORT CONTROL:
+
+The Copyright owner believes that the Export Control Classification
+Number (ECCN) for libpng is EAR99, which means not subject to export
+controls or International Traffic in Arms Regulations (ITAR) because
+it is open source, publicly available software, that does not contain
+any encryption software. See the EAR, paragraphs 734.3(b)(3) and
+734.7(b).
+
+Glenn Randers-Pehrson
+glennrp at users.sourceforge.net
+September 29, 2017
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libprotobuf-mutator</span>
+<span class="homepage"><a href="https://github.com/google/libprotobuf-mutator">homepage</a></span>
+<input type="checkbox" hidden id="90">
+<label class="show" for="90" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libsecret</span>
+<span class="homepage"><a href="https://git.gnome.org/browse/libsecret/">homepage</a></span>
+<input type="checkbox" hidden id="91">
+<label class="show" for="91" tabindex="0"></label>
+<div class="licence">
+<pre> GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libsrtp</span>
+<span class="homepage"><a href="https://github.com/cisco/libsrtp">homepage</a></span>
+<input type="checkbox" hidden id="92">
+<label class="show" for="92" tabindex="0"></label>
+<div class="licence">
+<pre>/*
+ *
+ * Copyright (c) 2001-2017 Cisco Systems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * Neither the name of the Cisco Systems, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libudev</span>
+<span class="homepage"><a href="http://www.freedesktop.org/wiki/Software/systemd/">homepage</a></span>
+<input type="checkbox" hidden id="93">
+<label class="show" for="93" tabindex="0"></label>
+<div class="licence">
+<pre> GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libunwind</span>
+<span class="homepage"><a href="https://llvm.org/svn/llvm-project/libunwind/trunk/">homepage</a></span>
+<input type="checkbox" hidden id="94">
+<label class="show" for="94" tabindex="0"></label>
+<div class="licence">
+<pre>==============================================================================
+libunwind License
+==============================================================================
+
+The libunwind library is dual licensed under both the University of Illinois
+"BSD-Like" license and the MIT license. As a user of this code you may choose
+to use it under either license. As a contributor, you agree to allow your code
+to be used under both.
+
+Full text of the relevant licenses is included below.
+
+==============================================================================
+
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT
+
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+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:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+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
+CONTRIBUTORS 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 WITH THE
+SOFTWARE.
+
+==============================================================================
+
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
+
+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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libusbx</span>
+<span class="homepage"><a href="http://libusb.org">homepage</a></span>
+<input type="checkbox" hidden id="95">
+<label class="show" for="95" tabindex="0"></label>
+<div class="licence">
+<pre> GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libvpx</span>
+<span class="homepage"><a href="http://www.webmproject.org">homepage</a></span>
+<input type="checkbox" hidden id="96">
+<label class="show" for="96" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2010, The WebM Project authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Google, nor the WebM Project, nor the names
+ of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libxml</span>
+<span class="homepage"><a href="http://xmlsoft.org">homepage</a></span>
+<input type="checkbox" hidden id="97">
+<label class="show" for="97" tabindex="0"></label>
+<div class="licence">
+<pre>Except where otherwise noted in the source code (e.g. the files hash.c,
+list.c and the trio files, which are covered by a similar licence but
+with different Copyright notices) all the files are:
+
+ Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished 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, FIT-
+NESS 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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libxslt</span>
+<span class="homepage"><a href="http://xmlsoft.org/XSLT">homepage</a></span>
+<input type="checkbox" hidden id="98">
+<label class="show" for="98" tabindex="0"></label>
+<div class="licence">
+<pre>Licence for libxslt except libexslt
+----------------------------------------------------------------------
+ Copyright (C) 2001-2002 Daniel Veillard. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished 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, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Daniel Veillard shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from him.
+
+----------------------------------------------------------------------
+
+Licence for libexslt
+----------------------------------------------------------------------
+ Copyright (C) 2001-2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard.
+ All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished 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, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the authors shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from him.
+----------------------------------------------------------------------
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">libyuv</span>
+<span class="homepage"><a href="http://code.google.com/p/libyuv/">homepage</a></span>
+<input type="checkbox" hidden id="99">
+<label class="show" for="99" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2011 The LibYuv Project Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Google nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">linux-syscall-support</span>
+<span class="homepage"><a href="http://code.google.com/p/linux-syscall-support/">homepage</a></span>
+<input type="checkbox" hidden id="100">
+<label class="show" for="100" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2015 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">logilab</span>
+<span class="homepage"><a href="http://www.logilab.org/">homepage</a></span>
+<input type="checkbox" hidden id="101">
+<label class="show" for="101" tabindex="0"></label>
+<div class="licence">
+<pre> GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the program's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">LZMA SDK</span>
+<span class="homepage"><a href="http://www.7-zip.org/sdk.html">homepage</a></span>
+<input type="checkbox" hidden id="102">
+<label class="show" for="102" tabindex="0"></label>
+<div class="licence">
+<pre>LZMA SDK is placed in the public domain.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">mach_override</span>
+<span class="homepage"><a href="https://github.com/rentzsch/mach_override">homepage</a></span>
+<input type="checkbox" hidden id="103">
+<label class="show" for="103" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2003-2012 Jonathan 'Wolf' Rentzsch: http://rentzsch.com
+Some rights reserved: http://opensource.org/licenses/mit
+
+mach_override includes a copy of libudis86, licensed as follows:
+
+Copyright (c) 2002-2009 Vivek Thampi
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Material Components for iOS</span>
+<span class="homepage"><a href="https://github.com/material-components/material-components-ios">homepage</a></span>
+<input type="checkbox" hidden id="104">
+<label class="show" for="104" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Material Design Icons</span>
+<span class="homepage"><a href="https://github.com/google/material-design-icons">homepage</a></span>
+<input type="checkbox" hidden id="105">
+<label class="show" for="105" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Material Font Disk Loader iOS</span>
+<span class="homepage"><a href="https://github.com/material-foundation/material-font-disk-loader-ios">homepage</a></span>
+<input type="checkbox" hidden id="106">
+<label class="show" for="106" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Material Internationalization for iOS</span>
+<span class="homepage"><a href="https://github.com/material-foundation/material-internationalization-ios">homepage</a></span>
+<input type="checkbox" hidden id="107">
+<label class="show" for="107" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Material Roboto Font Loader iOS</span>
+<span class="homepage"><a href="https://github.com/material-foundation/material-roboto-font-loader-ios">homepage</a></span>
+<input type="checkbox" hidden id="108">
+<label class="show" for="108" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Material Sprited Animation View</span>
+<span class="homepage"><a href="https://github.com/material-foundation/material-sprited-animation-view-ios">homepage</a></span>
+<input type="checkbox" hidden id="109">
+<label class="show" for="109" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Material Text Accessibility iOS</span>
+<span class="homepage"><a href="https://github.com/material-foundation/material-text-accessibility-ios">homepage</a></span>
+<input type="checkbox" hidden id="110">
+<label class="show" for="110" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">MediaController Android sample.</span>
+<span class="homepage"><a href="https://android.googlesource.com/platform/development/+/b356564/samples/Support4Demos/src/com/example/android/supportv4/media/MediaController.java">homepage</a></span>
+<input type="checkbox" hidden id="111">
+<label class="show" for="111" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">mesa</span>
+<span class="homepage"><a href="http://www.mesa3d.org/">homepage</a></span>
+<input type="checkbox" hidden id="112">
+<label class="show" for="112" tabindex="0"></label>
+<div class="licence">
+<pre>The default Mesa license is as follows:
+
+Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+BRIAN PAUL 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.
+
+
+
+Some parts of Mesa are copyrighted under the GNU LGPL. See the
+Mesa/docs/COPYRIGHT file for details.
+
+The following is the standard GNU copyright file.
+----------------------------------------------------------------------
+
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Metrics Protos</span>
+<span class="homepage"><a href="This is the canonical public repository">homepage</a></span>
+<input type="checkbox" hidden id="113">
+<label class="show" for="113" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2015 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">minigbm</span>
+<span class="homepage"><a href="https://chromium.googlesource.com/chromiumos/platform/minigbm">homepage</a></span>
+<input type="checkbox" hidden id="114">
+<label class="show" for="114" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2014 The Chromium OS Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">modp base64 decoder</span>
+<span class="homepage"><a href="https://github.com/client9/stringencoders">homepage</a></span>
+<input type="checkbox" hidden id="115">
+<label class="show" for="115" tabindex="0"></label>
+<div class="licence">
+<pre> * MODP_B64 - High performance base64 encoder/decoder
+ * Version 1.3 -- 17-Mar-2006
+ * http://modp.com/release/base64
+ *
+ * Copyright (c) 2005, 2006 Nick Galbreath -- nickg [at] modp [dot] com
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the modp.com nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Motion Animator for Objective-C</span>
+<span class="homepage"><a href="https://github.com/material-motion/motion-animator-objc">homepage</a></span>
+<input type="checkbox" hidden id="116">
+<label class="show" for="116" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Motion Interchange for Objective-C</span>
+<span class="homepage"><a href="https://github.com/material-motion/motion-interchange-objc">homepage</a></span>
+<input type="checkbox" hidden id="117">
+<label class="show" for="117" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Motion Transitioning for Objective-C</span>
+<span class="homepage"><a href="https://github.com/material-motion/motion-transitioning-objc">homepage</a></span>
+<input type="checkbox" hidden id="118">
+<label class="show" for="118" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Mozilla Personal Security Manager</span>
+<span class="homepage"><a href="https://dxr.mozilla.org/mozilla-central/source/security/manager/">homepage</a></span>
+<input type="checkbox" hidden id="119">
+<label class="show" for="119" tabindex="0"></label>
+<div class="licence">
+<pre>/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape security libraries.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Netscape Portable Runtime (NSPR)</span>
+<span class="homepage"><a href="http://www.mozilla.org/projects/nspr/">homepage</a></span>
+<input type="checkbox" hidden id="120">
+<label class="show" for="120" tabindex="0"></label>
+<div class="licence">
+<pre>/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Network Security Services (NSS)</span>
+<span class="homepage"><a href="http://www.mozilla.org/projects/security/pki/nss/">homepage</a></span>
+<input type="checkbox" hidden id="121">
+<label class="show" for="121" tabindex="0"></label>
+<div class="licence">
+<pre>NSS is available under the Mozilla Public License, version 2, a copy of which
+is below.
+
+Note on GPL Compatibility
+-------------------------
+
+The MPL 2, section 3.3, permits you to combine NSS with code under the GNU
+General Public License (GPL) version 2, or any later version of that
+license, to make a Larger Work, and distribute the result under the GPL.
+The only condition is that you must also make NSS, and any changes you
+have made to it, available to recipients under the terms of the MPL 2 also.
+
+Anyone who receives the combined code from you does not have to continue
+to dual licence in this way, and may, if they wish, distribute under the
+terms of either of the two licences - either the MPL alone or the GPL
+alone. However, we discourage people from distributing copies of NSS under
+the GPL alone, because it means that any improvements they make cannot be
+reincorporated into the main version of NSS. There is never a need to do
+this for license compatibility reasons.
+
+Note on LGPL Compatibility
+--------------------------
+
+The above also applies to combining MPLed code in a single library with
+code under the GNU Lesser General Public License (LGPL) version 2.1, or
+any later version of that license. If the LGPLed code and the MPLed code
+are not in the same library, then the copyleft coverage of the two
+licences does not overlap, so no issues arise.
+
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">newlib-extras</span>
+<span class="homepage"><a href="ftp://sourceware.org/pub/newlib/newlib-2.0.0.tar.gz">homepage</a></span>
+<input type="checkbox" hidden id="122">
+<label class="show" for="122" tabindex="0"></label>
+<div class="licence">
+<pre> README for newlib-2.0.0 release
+ (mostly cribbed from the README in the gdb-4.13 release)
+
+This is `newlib', a simple ANSI C library, math library, and collection
+of board support packages.
+
+The newlib and libgloss subdirectories are a collection of software from
+several sources, each wi6h their own copyright and license. See the file
+COPYING.NEWLIB for details. The rest of the release tree is under either
+the GNU GPL or LGPL licenses.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Unpacking and Installation -- quick overview
+==========================
+
+When you unpack the newlib-2.0.0.tar.gz file, you'll find a directory
+called `newlib-2.0.0', which contains:
+
+COPYING config/ install-sh* mpw-configure
+COPYING.LIB config-ml.in libgloss/ mpw-install
+COPYING.NEWLIB config.guess* mkinstalldirs* newlib/
+CYGNUS config.sub* move-if-change* symlink-tree*
+ChangeLog configure* mpw-README texinfo/
+Makefile.in configure.in mpw-build.in
+README etc/ mpw-config.in
+
+To build NEWLIB, you must follow the instructions in the section entitled
+"Compiling NEWLIB".
+
+This will configure and build all the libraries and crt0 (if one exists).
+If `configure' can't determine your host system type, specify one as its
+argument, e.g., sun4 or sun4sol2. NEWLIB is most often used in cross
+environments.
+
+NOTE THAT YOU MUST HAVE ALREADY BUILT AND INSTALLED GCC and BINUTILS.
+
+
+More Documentation
+==================
+
+ Newlib documentation is available on the net via:
+ http://sourceware.org/newlib/docs.html
+
+ All the documentation for NEWLIB comes as part of the machine-readable
+distribution. The documentation is written in Texinfo format, which is
+a documentation system that uses a single source file to produce both
+on-line information and a printed manual. You can use one of the Info
+formatting commands to create the on-line version of the documentation
+and TeX (or `texi2roff') to typeset the printed version.
+
+ If you want to format these Info files yourself, you need one of the
+Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
+
+ If you want to typeset and print copies of this manual, you need TeX,
+a program to print its DVI output files, and `texinfo.tex', the Texinfo
+definitions file.
+
+ TeX is a typesetting program; it does not print files directly, but
+produces output files called DVI files. To print a typeset document,
+you need a program to print DVI files. If your system has TeX
+installed, chances are it has such a program. The precise command to
+use depends on your system; `lpr -d' is common; another (for PostScript
+devices) is `dvips'. The DVI print command may require a file name
+without any extension or a `.dvi' extension.
+
+ TeX also requires a macro definitions file called `texinfo.tex'.
+This file tells TeX how to typeset a document written in Texinfo
+format. On its own, TeX cannot read, much less typeset a Texinfo file.
+`texinfo.tex' is distributed with NEWLIB and is located in the
+`newlib-VERSION-NUMBER/texinfo' directory.
+
+
+
+Compiling NEWLIB
+================
+
+ To compile NEWLIB, you must build it in a directory separate from
+the source directory. If you want to run NEWLIB versions for several host
+or target machines, you need a different `newlib' compiled for each combination
+of host and target. `configure' is designed to make this easy by allowing
+you to generate each configuration in a separate subdirectory.
+If your `make' program handles the `VPATH' feature correctly (like GNU `make')
+running `make' in each of these directories builds the `newlib' libraries
+specified there.
+
+ To build `newlib' in a specific directory, run `configure' with the
+`--srcdir' option to specify where to find the source. (You also need
+to specify a path to find `configure' itself from your working
+directory. If the path to `configure' would be the same as the
+argument to `--srcdir', you can leave out the `--srcdir' option; it
+will be assumed.)
+
+ For example, with version 2.0.0, you can build NEWLIB in a separate
+directory for a Sun 4 cross m68k-aout environment like this:
+
+ cd newlib-2.0.0
+ mkdir ../newlib-m68k-aout
+ cd ../newlib-m68k-aout
+ ../newlib-2.0.0/configure --host=sun4 --target=m68k-aout
+ make
+
+ When `configure' builds a configuration using a remote source
+directory, it creates a tree for the binaries with the same structure
+(and using the same names) as the tree under the source directory. In
+the example, you'd find the Sun 4 library `libiberty.a' in the
+directory `newlib-m68k-aout/libiberty', and NEWLIB itself in
+`newlib-m68k-aout/newlib'.
+
+ When you run `make' to build a program or library, you must run it
+in a configured directory--whatever directory you were in when you
+called `configure' (or one of its subdirectories).
+
+ The `Makefile' that `configure' generates in each source directory
+also runs recursively. If you type `make' in a source directory such
+as `newlib-2.0.0' (or in a separate configured directory configured with
+`--srcdir=PATH/newlib-2.0.0'), you will build all the required libraries.
+
+ When you have multiple hosts or targets configured in separate
+directories, you can run `make' on them in parallel (for example, if
+they are NFS-mounted on each of the hosts); they will not interfere
+with each other.
+
+
+Specifying names for hosts and targets
+======================================
+
+ The specifications used for hosts and targets in the `configure'
+script are based on a three-part naming scheme, but some short
+predefined aliases are also supported. The full naming scheme encodes
+three pieces of information in the following pattern:
+
+ ARCHITECTURE-VENDOR-OS
+
+ For example, you can use the alias `sun4' as a HOST argument or in a
+`--target=TARGET' option. The equivalent full name is
+`sparc-sun-sunos4'.
+
+ The `configure' script accompanying NEWLIB does not provide any query
+facility to list all supported host and target names or aliases.
+`configure' calls the Bourne shell script `config.sub' to map
+abbreviations to full names; you can read the script, if you wish, or
+you can use it to test your guesses on abbreviations--for example:
+
+ % sh config.sub sun4
+ sparc-sun-sunos4.1.1
+ % sh config.sub sun3
+ m68k-sun-sunos4.1.1
+ % sh config.sub decstation
+ mips-dec-ultrix4.2
+ % sh config.sub hp300bsd
+ m68k-hp-bsd
+ % sh config.sub i386v
+ i386-pc-sysv
+ % sh config.sub i786v
+ Invalid configuration `i786v': machine `i786v' not recognized
+
+The Build, Host and Target Concepts in newlib
+=============================================
+
+The build, host and target concepts are defined for gcc as follows:
+
+build: the platform on which gcc is built.
+host: the platform on which gcc is run.
+target: the platform for which gcc generates code.
+
+Since newlib is a library, the target concept does not apply to it, and the
+build, host, and target options given to the top-level configure script must
+be changed for newlib's use.
+
+The options are shifted according to these correspondences:
+
+gcc's build platform has no equivalent in newlib.
+gcc's host platform is newlib's build platform.
+gcc's target platform is newlib's host platform.
+and as mentioned before, newlib has no concept of target.
+
+`configure' options
+===================
+
+ Here is a summary of the `configure' options and arguments that are
+most often useful for building NEWLIB. `configure' also has several other
+options not listed here.
+
+ configure [--help]
+ [--prefix=DIR]
+ [--srcdir=PATH]
+ [--target=TARGET] HOST
+
+You may introduce options with a single `-' rather than `--' if you
+prefer; but you may abbreviate option names if you use `--'.
+
+`--help'
+ Display a quick summary of how to invoke `configure'.
+
+`--prefix=DIR'
+ Configure the source to install programs and files in directory
+ `DIR'.
+
+`--exec-prefix=DIR'
+ Configure the source to install host-dependent files in directory
+ `DIR'.
+
+`--srcdir=PATH'
+ *Warning: using this option requires GNU `make', or another `make'
+ that compatibly implements the `VPATH' feature.
+ Use this option to make configurations in directories separate
+ from the NEWLIB source directories. Among other things, you can use
+ this to build (or maintain) several configurations simultaneously,
+ in separate directories. `configure' writes configuration
+ specific files in the current directory, but arranges for them to
+ use the source in the directory PATH. `configure' will create
+ directories under the working directory in parallel to the source
+ directories below PATH.
+
+`--norecursion'
+ Configure only the directory level where `configure' is executed;
+ do not propagate configuration to subdirectories.
+
+`--target=TARGET'
+ Configure NEWLIB for running on the specified TARGET.
+
+ There is no convenient way to generate a list of all available
+ targets.
+
+`HOST ...'
+ Configure NEWLIB to be built using a cross compiler running on
+ the specified HOST.
+
+ There is no convenient way to generate a list of all available
+ hosts.
+
+To fit diverse usage models, NEWLIB supports a group of configuration
+options so that library features can be turned on/off according to
+target system's requirements.
+
+One feature can be enabled by specifying `--enable-FEATURE=yes' or
+`--enable-FEATURE'. Or it can be disable by `--enable-FEATURE=no' or
+`--disable-FEATURE'.
+
+`--enable-newlib-io-pos-args'
+ Enable printf-family positional arg support.
+ Disabled by default, but some hosts enable it in configure.host.
+
+`--enable-newlib-io-c99-formats'
+ Enable C99 support in IO functions like printf/scanf.
+ Disabled by default, but some hosts enable it in configure.host.
+
+`--enable-newlib-register-fini'
+ Enable finalization function registration using atexit.
+ Disabled by default.
+
+`--enable-newlib-io-long-long'
+ Enable long long type support in IO functions like printf/scanf.
+ Disabled by default, but many hosts enable it in configure.host.
+
+`--enable-newlib-io-long-double'
+ Enable long double type support in IO functions printf/scanf.
+ Disabled by default, but some hosts enable it in configure.host.
+
+`--enable-newlib-mb'
+ Enable multibyte support.
+ Disabled by default.
+
+`--enable-newlib-iconv-encodings'
+ Enable specific comma-separated list of bidirectional iconv
+ encodings to be built-in.
+ Disabled by default.
+
+`--enable-newlib-iconv-from-encodings'
+ Enable specific comma-separated list of \"from\" iconv encodings
+ to be built-in.
+ Disabled by default.
+
+`--enable-newlib-iconv-to-encodings'
+ Enable specific comma-separated list of \"to\" iconv encodings
+ to be built-in.
+ Disabled by default.
+
+`--enable-newlib-iconv-external-ccs'
+ Enable capabilities to load external CCS files for iconv.
+ Disabled by default.
+
+`--disable-newlib-atexit-dynamic-alloc'
+ Disable dynamic allocation of atexit entries.
+ Most hosts and targets have it enabled in configure.host.
+
+`--enable-newlib-reent-small'
+ Enable small reentrant struct support.
+ Disabled by default.
+
+`--disable-newlib-fvwrite-in-streamio'
+ NEWLIB implements the vector buffer mechanism to support stream IO
+ buffering required by C standard. This feature is possibly
+ unnecessary for embedded systems which won't change file buffering
+ with functions like `setbuf' or `setvbuf'. The buffering mechanism
+ still acts as default for STDIN/STDOUT/STDERR even if this option
+ is specified.
+ Enabled by default.
+
+`--disable-newlib-fseek-optimization'
+ Disable fseek optimization. It can decrease code size of application
+ calling `fseek`.
+ Enabled by default.
+
+`--disable-newlib-wide-orient'
+ C99 states that each stream has an orientation, wide or byte. This
+ feature is possibly unnecessary for embedded systems which only do
+ byte input/output operations on stream. It can decrease code size
+ by disable the feature.
+ Enabled by default.
+
+`--enable-newlib-nano-malloc'
+ NEWLIB has two implementations of malloc family's functions, one in
+ `mallocr.c' and the other one in `nano-mallocr.c'. This options
+ enables the nano-malloc implementation, which is for small systems
+ with very limited memory. Note that this implementation does not
+ support `--enable-malloc-debugging' any more.
+ Disabled by default.
+
+`--disable-newlib-unbuf-stream-opt'
+ NEWLIB does optimization when `fprintf to write only unbuffered unix
+ file'. It creates a temorary buffer to do the optimization that
+ increases stack consumption by about `BUFSIZ' bytes. This option
+ disables the optimization and saves size of text and stack.
+ Enabled by default.
+
+`--enable-multilib'
+ Build many library versions.
+ Enabled by default.
+
+`--enable-target-optspace'
+ Optimize for space.
+ Disabled by default.
+
+`--enable-malloc-debugging'
+ Indicate malloc debugging requested.
+ Disabled by default.
+
+`--enable-newlib-multithread'
+ Enable support for multiple threads.
+ Enabled by default.
+
+`--enable-newlib-iconv'
+ Enable iconv library support.
+ Disabled by default.
+
+`--enable-newlib-elix-level'
+ Supply desired elix library level (1-4). Please refer to HOWTO for
+ more information about this option.
+ Set to level 0 by default.
+
+`--disable-newlib-io-float'
+ Disable printf/scanf family float support.
+ Enabled by default.
+
+`--disable-newlib-supplied-syscalls'
+ Disable newlib from supplying syscalls.
+ Enabled by default.
+
+`--enable-lite-exit'
+ Enable lite exit, a size-reduced implementation of exit that doesn't
+ invoke clean-up functions such as _fini or global destructors.
+ Disabled by default.
+
+Running the Testsuite
+=====================
+
+To run newlib's testsuite, you'll need a site.exp in your home
+directory which points dejagnu to the proper baseboards directory and
+the proper exp file for your target.
+
+Before running make check-target-newlib, set the DEJAGNU environment
+variable to point to ~/site.exp.
+
+Here is a sample site.exp:
+
+# Make sure we look in the right place for the board description files.
+if ![info exists boards_dir] {
+ set boards_dir {}
+}
+lappend boards_dir "your dejagnu/baseboards here"
+
+verbose "Global Config File: target_triplet is $target_triplet" 2
+
+global target_list
+case "$target_triplet" in {
+
+ { "mips-*elf*" } {
+ set target_list "mips-sim"
+ }
+
+ default {
+ set target_list { "unix" }
+ }
+}
+
+mips-sim refers to an exp file in the baseboards directory. You'll
+need to add the other targets you're testing to the case statement.
+
+Now type make check-target-newlib in the top-level build directory to
+run the testsuite.
+
+Shared newlib
+=============
+
+newlib uses libtool when it is being compiled natively (with
+--target=i[34567]86-pc-linux-gnu) on an i[34567]86-pc-linux-gnu
+host. This allows newlib to be compiled as a shared library.
+
+To configure newlib, do the following from your build directory:
+
+$(source_dir)/src/configure --with-newlib --prefix=$(install_dir)
+
+configure will recognize that host == target ==
+i[34567]86-pc-linux-gnu, so it will tell newlib to compile itself using
+libtool. By default, libtool will build shared and static versions of
+newlib.
+
+To compile a program against shared newlib, do the following (where
+target_install_dir = $(install_dir)/i[34567]86-pc-linux-gnu):
+
+gcc -nostdlib $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm -lgcc
+
+To run the program, make sure that $(target_install_dir)/lib is listed
+in the LD_LIBRARY_PATH environment variable.
+
+To create a static binary linked against newlib, do the following:
+
+gcc -nostdlib -static $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm
+
+libtool can be instructed to produce only static libraries. To build
+newlib as a static library only, do the following from your build
+directory:
+
+$(source_dir)/src/configure --with-newlib --prefix=$(install_dir) --disable-shared
+
+Regenerating Configuration Files
+================================
+
+At times you will need to make changes to configure.in and Makefile.am files.
+This will mean that configure and Makefile.in files will need to be
+regenerated.
+
+At the top level of newlib is the file: acinclude.m4. This file contains
+the definition of the NEWLIB_CONFIGURE macro which is used by all configure.in
+files in newlib. You will notice that each directory in newlib containing
+a configure.in file also contains an aclocal.m4 file. This file is
+generated by issuing: aclocal -I${relative_path_to_toplevel_newlib_dir}
+-I${relative_path_to_toplevel_src_dir}
+The first relative directory is to access acinclude.m4. The second relative
+directory is to access libtool information in the top-level src directory.
+
+For example, to regenerate aclocal.m4 in newlib/libc/machine/arm:
+
+ aclocal -I ../../.. -I ../../../..
+
+Note that if the top level acinclude.m4 is altered, every aclocal.m4 file
+in newlib should be regenerated.
+
+If the aclocal.m4 file is regenerated due to a change in acinclude.m4 or
+if a configure.in file is modified, the corresponding configure file in the
+directory must be regenerated using autoconf. No parameters are necessary.
+In the previous example, we would issue:
+
+ autoconf
+
+from the newlib/libc/machine/arm directory.
+
+If you have regenerated a configure file or if you have modified a Makefile.am
+file, you will need to regenerate the appropriate Makefile.in file(s).
+For newlib, automake is a bit trickier. First of all, all Makefile.in
+files in newlib (and libgloss) are generated using the --cygnus option
+of automake.
+
+Makefile.in files are generated from the nearest directory up the chain
+which contains a configure.in file. In most cases, this is the same
+directory containing configure.in, but there are exceptions.
+For example, the newlib/libc directory has a number of
+subdirectories that do not contain their own configure.in files (e.g. stdio).
+For these directories, you must issue the automake command from newlib/libc
+which is the nearest parent directory that contains a configure.in.
+When you issue the automake command, you specify the subdirectory for
+the Makefile.in you are regenerating. For example:
+
+ automake --cygnus stdio/Makefile stdlib/Makefile
+
+Note how multiple Makefile.in files can be created in the same step. You
+would not specify machine/Makefile or sys/Makefile in the previous example
+because both of these subdirectories contain their own configure.in files.
+One would change to each of these subdirectories and in turn issue:
+
+ automake --cygnus Makefile
+
+Let's say you create a new machine directory XXXX off of newlib/libc/machine.
+After creating a new configure.in and Makefile.am file, you would issue:
+
+ aclocal -I ../../..
+ autoconf
+ automake --cygnus Makefile
+
+from newlib/libc/machine/XXXX
+
+It is strongly advised that you use an adequate version of autotools.
+For this latest release, the following were used: autoconf 2.68, aclocal 1.11.6, and
+automake 1.11.6.
+
+Reporting Bugs
+==============
+
+The correct address for reporting bugs found in NEWLIB is
+"newlib@sourceware.org". Please email all bug reports to that
+address. Please include the NEWLIB version number (e.g., newlib-2.0.0),
+and how you configured it (e.g., "sun4 host and m68k-aout target").
+Since NEWLIB supports many different configurations, it is important
+that you be precise about this.
+
+Archives of the newlib mailing list are on-line, see
+ http://sourceware.org/ml/newlib/
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">nmoinvaz/minizip</span>
+<span class="homepage"><a href="https://github.com/nmoinvaz/minizip">homepage</a></span>
+<input type="checkbox" hidden id="123">
+<label class="show" for="123" tabindex="0"></label>
+<div class="licence">
+<pre>Condition of use and distribution are the same as zlib:
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgement in the product documentation would be
+ appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">NSBezierPath additions from Sean Patrick O'Brien</span>
+<span class="homepage"><a href="http://www.seanpatrickobrien.com/journal/posts/3">homepage</a></span>
+<input type="checkbox" hidden id="124">
+<label class="show" for="124" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2008 MolokoCacao
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted providing that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">NVidia Control X Extension Library</span>
+<span class="homepage"><a href="http://cgit.freedesktop.org/~aplattner/nvidia-settings/">homepage</a></span>
+<input type="checkbox" hidden id="125">
+<label class="show" for="125" tabindex="0"></label>
+<div class="licence">
+<pre>/*
+ * Copyright (c) 2008 NVIDIA, 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 (including the next
+ * paragraph) 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.
+ */</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Oculus SDK for Windows</span>
+<span class="homepage"><a href="https://developer.oculus.com/downloads/package/oculus-sdk-for-windows/">homepage</a></span>
+<input type="checkbox" hidden id="126">
+<label class="show" for="126" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright © 2014-2017 Oculus VR, LLC. All rights reserved.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">OpenH264</span>
+<span class="homepage"><a href="http://www.openh264.org/">homepage</a></span>
+<input type="checkbox" hidden id="127">
+<label class="show" for="127" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2013, Cisco Systems
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">OpenMAX DL</span>
+<span class="homepage"><a href="https://silver.arm.com/download/Software/Graphics/OX000-BU-00010-r1p0-00bet0/OX000-BU-00010-r1p0-00bet0.tgz">homepage</a></span>
+<input type="checkbox" hidden id="128">
+<label class="show" for="128" tabindex="0"></label>
+<div class="licence">
+<pre>Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file in the root of the source tree. All
+contributing project authors may be found in the AUTHORS file in the
+root of the source tree.
+
+The files were originally licensed by ARM Limited.
+
+The following files:
+
+ * dl/api/omxtypes.h
+ * dl/sp/api/omxSP.h
+
+are licensed by Khronos:
+
+Copyright © 2005-2008 The Khronos Group Inc. All Rights Reserved.
+
+These materials are protected by copyright laws and contain material
+proprietary to the Khronos Group, Inc. You may use these materials
+for implementing Khronos specifications, without altering or removing
+any trademark, copyright or other notice from the specification.
+
+Khronos Group makes no, and expressly disclaims any, representations
+or warranties, express or implied, regarding these materials, including,
+without limitation, any implied warranties of merchantability or fitness
+for a particular purpose or non-infringement of any intellectual property.
+Khronos Group makes no, and expressly disclaims any, warranties, express
+or implied, regarding the correctness, accuracy, completeness, timeliness,
+and reliability of these materials.
+
+Under no circumstances will the Khronos Group, or any of its Promoters,
+Contributors or Members or their respective partners, officers, directors,
+employees, agents or representatives be liable for any damages, whether
+direct, indirect, special or consequential damages for lost revenues,
+lost profits, or otherwise, arising from or in connection with these
+materials.
+
+Khronos and OpenMAX are trademarks of the Khronos Group Inc.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">OpenVR SDK</span>
+<span class="homepage"><a href="https://github.com/ValveSoftware/openvr">homepage</a></span>
+<input type="checkbox" hidden id="129">
+<label class="show" for="129" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2015, Valve Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+may be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">opus</span>
+<span class="homepage"><a href="https://git.xiph.org/?p=opus.git;a=snapshot;h=3fe744ea04fdcc418fb85c2c133d13372ebb019b;sf=tgz">homepage</a></span>
+<input type="checkbox" hidden id="130">
+<label class="show" for="130" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
+ Jean-Marc Valin, Timothy B. Terriberry,
+ CSIRO, Gregory Maxwell, Mark Borgerding,
+ Erik de Castro Lopo
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of Internet Society, IETF or IETF Trust, nor the
+names of specific contributors, may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Opus is subject to the royalty-free patent licenses which are
+specified at:
+
+Xiph.Org Foundation:
+https://datatracker.ietf.org/ipr/1524/
+
+Microsoft Corporation:
+https://datatracker.ietf.org/ipr/1914/
+
+Broadcom Corporation:
+https://datatracker.ietf.org/ipr/1526/
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">OTS (OpenType Sanitizer)</span>
+<span class="homepage"><a href="https://github.com/khaledhosny/ots.git">homepage</a></span>
+<input type="checkbox" hidden id="131">
+<label class="show" for="131" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2009-2017 The OTS Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Paul Hsieh's SuperFastHash</span>
+<span class="homepage"><a href="http://www.azillionmonkeys.com/qed/hash.html">homepage</a></span>
+<input type="checkbox" hidden id="132">
+<label class="show" for="132" tabindex="0"></label>
+<div class="licence">
+<pre>Paul Hsieh OLD BSD license
+
+Copyright (c) 2010, Paul Hsieh
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+* Neither my name, Paul Hsieh, nor the names of any other contributors to the
+ code use may not be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">PDFium</span>
+<span class="homepage"><a href="http://code.google.com/p/pdfium/">homepage</a></span>
+<input type="checkbox" hidden id="133">
+<label class="show" for="133" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2014 PDFium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Perfetto</span>
+<span class="homepage"><a href="https://android.googlesource.com/platform/external/perfetto/">homepage</a></span>
+<input type="checkbox" hidden id="134">
+<label class="show" for="134" tabindex="0"></label>
+<div class="licence">
+<pre>
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">PLY (Python Lex-Yacc)</span>
+<span class="homepage"><a href="http://www.dabeaz.com/ply/ply-3.4.tar.gz">homepage</a></span>
+<input type="checkbox" hidden id="135">
+<label class="show" for="135" tabindex="0"></label>
+<div class="licence">
+<pre>PLY (Python Lex-Yacc) Version 3.4
+
+Copyright (C) 2001-2011,
+David M. Beazley (Dabeaz LLC)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of the David Beazley or Dabeaz LLC may be used to
+ endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Polymer</span>
+<span class="homepage"><a href="http://www.polymer-project.org">homepage</a></span>
+<input type="checkbox" hidden id="136">
+<label class="show" for="136" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright (c) 2012 The Polymer Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Protocol Buffers</span>
+<span class="homepage"><a href="https://github.com/google/protobuf">homepage</a></span>
+<input type="checkbox" hidden id="137">
+<label class="show" for="137" tabindex="0"></label>
+<div class="licence">
+<pre>This license applies to all parts of Protocol Buffers except the following:
+
+ - Atomicops support for generic gcc, located in
+ src/google/protobuf/stubs/atomicops_internals_generic_gcc.h.
+ This file is copyrighted by Red Hat Inc.
+
+ - Atomicops support for AIX/POWER, located in
+ src/google/protobuf/stubs/atomicops_internals_power.h.
+ This file is copyrighted by Bloomberg Finance LP.
+
+Copyright 2014, Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it. This code is not
+standalone and requires a support library to be linked with it. This
+support library is itself covered by the above license.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">pyjson5</span>
+<span class="homepage"><a href="https://github.com/dpranke/pyjson5">homepage</a></span>
+<input type="checkbox" hidden id="138">
+<label class="show" for="138" tabindex="0"></label>
+<div class="licence">
+<pre>Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">pylint</span>
+<span class="homepage"><a href="http://www.pylint.org/">homepage</a></span>
+<input type="checkbox" hidden id="139">
+<label class="show" for="139" tabindex="0"></label>
+<div class="licence">
+<pre> GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the program's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Quick Color Management System</span>
+<span class="homepage"><a href="https://github.com/jrmuizel/qcms/tree/v4">homepage</a></span>
+<input type="checkbox" hidden id="140">
+<label class="show" for="140" tabindex="0"></label>
+<div class="licence">
+<pre>qcms
+Copyright (C) 2009 Mozilla Corporation
+Copyright (C) 1998-2007 Marti Maria
+
+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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">re2 - an efficient, principled regular expression library</span>
+<span class="homepage"><a href="https://github.com/google/re2">homepage</a></span>
+<input type="checkbox" hidden id="141">
+<label class="show" for="141" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright (c) 2009 The RE2 Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Recurrent neural network for audio noise reduction</span>
+<span class="homepage"><a href="https://github.com/xiph/rnnoise">homepage</a></span>
+<input type="checkbox" hidden id="142">
+<label class="show" for="142" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2017, Mozilla
+Copyright (c) 2007-2017, Jean-Marc Valin
+Copyright (c) 2005-2017, Xiph.Org Foundation
+Copyright (c) 2003-2004, Mark Borgerding
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.Org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">sfntly</span>
+<span class="homepage"><a href="https://github.com/googlei18n/sfntly">homepage</a></span>
+<input type="checkbox" hidden id="143">
+<label class="show" for="143" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2011 Google Inc. All Rights Reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">simplejson</span>
+<span class="homepage"><a href="https://github.com/simplejson/simplejson">homepage</a></span>
+<input type="checkbox" hidden id="144">
+<label class="show" for="144" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2006 Bob Ippolito
+
+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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Skia</span>
+<span class="homepage"><a href="https://skia.org/">homepage</a></span>
+<input type="checkbox" hidden id="145">
+<label class="show" for="145" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright (c) 2011 Google Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------------------
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">SMHasher</span>
+<span class="homepage"><a href="http://code.google.com/p/smhasher/">homepage</a></span>
+<input type="checkbox" hidden id="146">
+<label class="show" for="146" tabindex="0"></label>
+<div class="licence">
+<pre>All MurmurHash source files are placed in the public domain.
+
+The license below applies to all other code in SMHasher:
+
+Copyright (c) 2011 Google, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Snappy: A fast compressor/decompressor</span>
+<span class="homepage"><a href="http://google.github.io/snappy/">homepage</a></span>
+<input type="checkbox" hidden id="147">
+<label class="show" for="147" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2011, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===
+
+Some of the benchmark data in testdata/ is licensed differently:
+
+ - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and
+ is licensed under the Creative Commons Attribution 3.0 license
+ (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/
+ for more information.
+
+ - kppkn.gtb is taken from the Gaviota chess tablebase set, and
+ is licensed under the MIT License. See
+ https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1
+ for more information.
+
+ - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper
+ “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA
+ Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro,
+ which is licensed under the CC-BY license. See
+ http://www.ploscompbiol.org/static/license for more ifnormation.
+
+ - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project
+ Gutenberg. The first three have expired copyrights and are in the public
+ domain; the latter does not have expired copyright, but is still in the
+ public domain according to the license information
+ (http://www.gutenberg.org/ebooks/53).
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Speech Dispatcher</span>
+<span class="homepage"><a href="http://devel.freebsoft.org/speechd">homepage</a></span>
+<input type="checkbox" hidden id="148">
+<label class="show" for="148" tabindex="0"></label>
+<div class="licence">
+<pre> GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the program's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
+
+
+
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">SPIR-V Tools</span>
+<span class="homepage"><a href="https://github.com/KhronosGroup/SPIRV-Tools.git">homepage</a></span>
+<input type="checkbox" hidden id="149">
+<label class="show" for="149" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2015-2016 The Khronos Group Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and/or associated documentation files (the
+"Materials"), to deal in the Materials without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Materials, and to
+permit persons to whom the Materials are 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 Materials.
+
+MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+ https://www.khronos.org/registry/
+
+THE MATERIALS ARE 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
+MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">sqlite</span>
+<span class="homepage"><a href="https://sqlite.org/">homepage</a></span>
+<input type="checkbox" hidden id="150">
+<label class="show" for="150" tabindex="0"></label>
+<div class="licence">
+<pre>The author disclaims copyright to this source code. In place of
+a legal notice, here is a blessing:
+
+ May you do good and not evil.
+ May you find forgiveness for yourself and forgive others.
+ May you share freely, never taking more than you give.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Strongtalk</span>
+<span class="homepage"><a href="http://www.strongtalk.org/">homepage</a></span>
+<input type="checkbox" hidden id="151">
+<label class="show" for="151" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 1994-2006 Sun Microsystems Inc.
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+- Redistribution in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of Sun Microsystems or the names of contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Sudden Motion Sensor library</span>
+<span class="homepage"><a href="http://www.suitable.com/tools/smslib.html">homepage</a></span>
+<input type="checkbox" hidden id="152">
+<label class="show" for="152" tabindex="0"></label>
+<div class="licence">
+<pre>SMSLib Sudden Motion Sensor Access Library
+Copyright (c) 2010 Suitable Systems
+All rights reserved.
+
+Developed by: Daniel Griscom
+ Suitable Systems
+ http://www.suitable.com
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal with 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:
+
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimers.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimers in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the names of Suitable Systems nor the names of its
+contributors may be used to endorse or promote products derived from
+this Software without specific prior written permission.
+
+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 CONTRIBUTORS 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 WITH THE SOFTWARE.
+
+For more information about SMSLib, see
+ &lt;http://www.suitable.com/tools/smslib.html&gt;
+or contact
+ Daniel Griscom
+ Suitable Systems
+ 1 Centre Street, Suite 204
+ Wakefield, MA 01880
+ (781) 665-0053
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">SwiftShader</span>
+<span class="homepage"><a href="https://swiftshader.googlesource.com/SwiftShader">homepage</a></span>
+<input type="checkbox" hidden id="153">
+<label class="show" for="153" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">tcmalloc</span>
+<span class="homepage"><a href="http://gperftools.googlecode.com/">homepage</a></span>
+<input type="checkbox" hidden id="154">
+<label class="show" for="154" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">test_fonts</span>
+<span class="homepage"><a href="https://pagure.io/lohit, http://www.nongnu.org/freebangfont/downloads.html#mukti, https://dejavu-fonts.github.io/Download.html">homepage</a></span>
+<input type="checkbox" hidden id="155">
+<label class="show" for="155" tabindex="0"></label>
+<div class="licence">
+<pre>The SIL OPEN FONT LICENSE applies to the following files:
+Gelasio-Bold.ttf
+Gelasio-BoldItalic.ttf
+Gelasio-Italic.ttf
+Gelasio-Regular.ttf
+Lohit-Devanagari.ttf
+Lohit-Gurmukhi.ttf
+Lohit-Tamil.ttf
+
+
+Copyright 2011-13 Lohit Fonts Project contributors
+ &lt;http://fedorahosted.org/lohit&gt;
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION &amp; CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+
+--------------------------------------------------------------------------------
+The GPL v2 license applies to the following files
+Garuda.ttf
+MuktiNarrow.ttf
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the program's name and a brief idea of what it does.&gt;
+ Copyright (C) 19yy &lt;name of author&gt;
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
+--------------------------------------------------------------------------------
+The Vera Bitstream License applies to the following files:
+DejaVuSans-Bold.ttf
+DejaVuSans.ttf
+
+
+Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
+Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
+
+
+Bitstream Vera Fonts Copyright
+------------------------------
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
+a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute the
+Font Software, including without limitation the rights to use, copy, merge,
+publish, distribute, and/or sell copies of the Font Software, and to permit
+persons to whom the Font Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright and trademark notices and this permission notice shall
+be included in all copies of one or more of the Font Software typefaces.
+
+The Font Software may be modified, altered, or added to, and in particular
+the designs of glyphs or characters in the Fonts may be modified and
+additional glyphs or characters may be added to the Fonts, only if the fonts
+are renamed to names not containing either the words "Bitstream" or the word
+"Vera".
+
+This License becomes null and void to the extent applicable to Fonts or Font
+Software that has been modified and is distributed under the "Bitstream
+Vera" names.
+
+The Font Software may be sold as part of a larger software package but no
+copy of one or more of the Font Software typefaces may be sold by itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
+FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
+ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
+FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font Software
+without prior written authorization from the Gnome Foundation or Bitstream
+Inc., respectively. For further information, contact: fonts at gnome dot
+org.
+
+Arev Fonts Copyright
+------------------------------
+
+Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and
+associated documentation files (the "Font Software"), to reproduce
+and distribute the modifications to the Bitstream Vera Font Software,
+including without limitation the rights to use, copy, merge, publish,
+distribute, and/or sell copies of the Font Software, and to permit
+persons to whom the Font Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Tavmjong Bah" or the word "Arev".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Tavmjong Bah Arev" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the name of Tavmjong Bah shall not
+be used in advertising or otherwise to promote the sale, use or other
+dealings in this Font Software without prior written authorization
+from Tavmjong Bah. For further information, contact: tavmjong @ free
+. fr.
+
+TeX Gyre DJV Math
+-----------------
+Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
+
+Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski
+(on behalf of TeX users groups) are in public domain.
+
+Letters imported from Euler Fraktur from AMSfonts are (c) American
+Mathematical Society (see below).
+Bitstream Vera Fonts Copyright
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera
+is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of the fonts accompanying this license (“Fonts”) and associated
+documentation
+files (the “Font Software”), to reproduce and distribute the Font Software,
+including without limitation the rights to use, copy, merge, publish,
+distribute,
+and/or sell copies of the Font Software, and to permit persons to whom
+the Font Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be
+included in all copies of one or more of the Font Software typefaces.
+
+The Font Software may be modified, altered, or added to, and in particular
+the designs of glyphs or characters in the Fonts may be modified and
+additional
+glyphs or characters may be added to the Fonts, only if the fonts are
+renamed
+to names not containing either the words “Bitstream” or the word “Vera”.
+
+This License becomes null and void to the extent applicable to Fonts or
+Font Software
+that has been modified and is distributed under the “Bitstream Vera”
+names.
+
+The Font Software may be sold as part of a larger software package but
+no copy
+of one or more of the Font Software typefaces may be sold by itself.
+
+THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
+FOUNDATION
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL,
+SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN
+ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
+INABILITY TO USE
+THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+Except as contained in this notice, the names of GNOME, the GNOME
+Foundation,
+and Bitstream Inc., shall not be used in advertising or otherwise to promote
+the sale, use or other dealings in this Font Software without prior written
+authorization from the GNOME Foundation or Bitstream Inc., respectively.
+For further information, contact: fonts at gnome dot org.
+
+AMSFonts (v. 2.2) copyright
+
+The PostScript Type 1 implementation of the AMSFonts produced by and
+previously distributed by Blue Sky Research and Y&amp;Y, Inc. are now freely
+available for general use. This has been accomplished through the
+cooperation
+of a consortium of scientific publishers with Blue Sky Research and Y&amp;Y.
+Members of this consortium include:
+
+Elsevier Science IBM Corporation Society for Industrial and Applied
+Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS)
+
+In order to assure the authenticity of these fonts, copyright will be
+held by
+the American Mathematical Society. This is not meant to restrict in any way
+the legitimate use of the fonts, such as (but not limited to) electronic
+distribution of documents containing these fonts, inclusion of these fonts
+into other public domain or commercial font collections or computer
+applications, use of the outline data to create derivative fonts and/or
+faces, etc. However, the AMS does require that the AMS copyright notice be
+removed from any derivative versions of the fonts which have been altered in
+any way. In addition, to ensure the fidelity of TeX documents using Computer
+Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces,
+has requested that any alterations which yield different font metrics be
+given a different name.
+
+$Id$
+--------------------------------------------------------------------------------
+The SIL OPEN FONT LICENSE for Noto applies to the following files:
+NotoSansKhmer-Regular.ttf
+
+This Font Software is licensed under the SIL Open Font License,
+Version 1.1.
+
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font
+creation efforts of academic and linguistic communities, and to
+provide a free and open framework in which fonts may be shared and
+improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply to
+any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software
+components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to,
+deleting, or substituting -- in part or in whole -- any of the
+components of the Original Version, by changing formats or by porting
+the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION &amp; CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed,
+modify, redistribute, and sell modified and unmodified copies of the
+Font Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components, in
+Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the
+corresponding Copyright Holder. This restriction only applies to the
+primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created using
+the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+
+--------------------------------------------------------------------------------
+The Apache License applies to the following files
+Arimo-Bold.ttf
+Arimo-BoldItalic.ttf
+Arimo-Italic.ttf
+Arimo-Regular.ttf
+Cousine-Bold.ttf
+Cousine-BoldItalic.ttf
+Cousine-Italic.ttf
+Cousine-Regular.ttf
+Tinos-Bold.ttf
+Tinos-BoldItalic.ttf
+Tinos-Italic.ttf
+Tinos-Regular.ttf
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+--------------------------------------------------------------------------------
+The public domain/Creative Commons Zero license applies to the following files
+Ahem.ttf
+
+The Ahem font in this directory belongs to the public domain. In
+jurisdictions that do not recognize public domain ownership of these
+files, the following Creative Commons Zero declaration applies:
+
+&lt;http://labs.creativecommons.org/licenses/zero-waive/1.0/us/legalcode&gt;
+
+which is quoted below:
+
+ The person who has associated a work with this document (the "Work")
+ affirms that he or she (the "Affirmer") is the/an author or owner of
+ the Work. The Work may be any work of authorship, including a
+ database.
+
+ The Affirmer hereby fully, permanently and irrevocably waives and
+ relinquishes all of her or his copyright and related or neighboring
+ legal rights in the Work available under any federal or state law,
+ treaty or contract, including but not limited to moral rights,
+ publicity and privacy rights, rights protecting against unfair
+ competition and any rights protecting the extraction, dissemination
+ and reuse of data, whether such rights are present or future, vested
+ or contingent (the "Waiver"). The Affirmer makes the Waiver for the
+ benefit of the public at large and to the detriment of the Affirmer's
+ heirs or successors.
+
+ The Affirmer understands and intends that the Waiver has the effect
+ of eliminating and entirely removing from the Affirmer's control all
+ the copyright and related or neighboring legal rights previously held
+ by the Affirmer in the Work, to that extent making the Work freely
+ available to the public for any and all uses and purposes without
+ restriction of any kind, including commercial use and uses in media
+ and formats or by methods that have not yet been invented or
+ conceived. Should the Waiver for any reason be judged legally
+ ineffective in any jurisdiction, the Affirmer hereby grants a free,
+ full, permanent, irrevocable, nonexclusive and worldwide license for
+ all her or his copyright and related or neighboring legal rights in
+ the Work.
+
+
+--------------------------------------------------------------------------------
+The public domain license applies to the following files
+GardinerModBug.ttf
+GardinerModCat.ttf
+
+In lieu of a licence Fonts in this site are offered free for any use; they may be installed, embedded, opened, edited,
+modified, regenerated, posted, packaged and redistributed. George Douros
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">The Chromium Project</span>
+<span class="homepage"><a href="http://www.chromium.org">homepage</a></span>
+<input type="checkbox" hidden id="156">
+<label class="show" for="156" tabindex="0"></label>
+<div class="licence">
+<pre>// Copyright 2015 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">The USB ID Repository</span>
+<span class="homepage"><a href="http://www.linux-usb.org/usb-ids.html">homepage</a></span>
+<input type="checkbox" hidden id="157">
+<label class="show" for="157" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2012, Linux USB Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+o Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+o Neither the name of the Linux USB Project nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">tlslite</span>
+<span class="homepage"><a href="http://trevp.net/tlslite/">homepage</a></span>
+<input type="checkbox" hidden id="158">
+<label class="show" for="158" tabindex="0"></label>
+<div class="licence">
+<pre>
+TLS Lite includes code from different sources. All code is either dedicated to
+the public domain by its authors, or available under a BSD-style license. In
+particular:
+
+-
+
+Code written by Trevor Perrin, Kees Bos, Sam Rushing, Dimitris Moraitis,
+Marcelo Fernandez, Martin von Loewis, Dave Baggett, and Yngve Pettersen is
+available under the following terms:
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute
+this software, either in source code form or as a compiled binary, for any
+purpose, commercial or non-commercial, and by any means.
+
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-
+
+Code written by Bram Cohen (rijndael.py) was dedicated to the public domain by
+its author. See rijndael.py for details.
+
+-
+
+Code written by Google is available under the following terms:
+
+Copyright (c) 2008, The Chromium Authors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * Neither the name of the Google Inc. nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">UnRAR source for decompressing .RAR and other files.</span>
+<span class="homepage"><a href="https://github.com/aawc/unrar.git">homepage</a></span>
+<input type="checkbox" hidden id="159">
+<label class="show" for="159" tabindex="0"></label>
+<div class="licence">
+<pre> ****** ***** ****** UnRAR - free utility for RAR archives
+ ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ****** ******* ****** License for use and distribution of
+ ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ** ** ** ** ** ** FREE portable version
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ The source code of UnRAR utility is freeware. This means:
+
+ 1. All copyrights to RAR and the utility UnRAR are exclusively
+ owned by the author - Alexander Roshal.
+
+ 2. UnRAR source code may be used in any software to handle
+ RAR archives without limitations free of charge, but cannot be
+ used to develop RAR (WinRAR) compatible archiver and to
+ re-create RAR compression algorithm, which is proprietary.
+ Distribution of modified UnRAR source code in separate form
+ or as a part of other software is permitted, provided that
+ full text of this paragraph, starting from "UnRAR source code"
+ words, is included in license, or in documentation if license
+ is not available, and in source code comments of resulting package.
+
+ 3. The UnRAR utility may be freely distributed. It is allowed
+ to distribute UnRAR inside of other software packages.
+
+ 4. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED "AS IS".
+ NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT
+ YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,
+ DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING
+ OR MISUSING THIS SOFTWARE.
+
+ 5. Installing and using the UnRAR utility signifies acceptance of
+ these terms and conditions of the license.
+
+ 6. If you don't agree with terms of the license you must remove
+ UnRAR files from your storage devices and cease to use the
+ utility.
+
+ Thank you for your interest in RAR and UnRAR.
+
+
+ Alexander L. Roshal
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">url_parse</span>
+<span class="homepage"><a href="http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/src/nsURLParsers.cpp">homepage</a></span>
+<input type="checkbox" hidden id="160">
+<label class="show" for="160" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright 2007, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------------------
+
+The file url_parse.cc is based on nsURLParsers.cc from Mozilla. This file is
+licensed separately as follows:
+
+The contents of this file are subject to the Mozilla Public License Version
+1.1 (the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the
+License.
+
+The Original Code is mozilla.org code.
+
+The Initial Developer of the Original Code is
+Netscape Communications Corporation.
+Portions created by the Initial Developer are Copyright (C) 1998
+the Initial Developer. All Rights Reserved.
+
+Contributor(s):
+ Darin Fisher (original author)
+
+Alternatively, the contents of this file may be used under the terms of
+either the GNU General Public License Version 2 or later (the "GPL"), or
+the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+in which case the provisions of the GPL or the LGPL are applicable instead
+of those above. If you wish to allow use of your version of this file only
+under the terms of either the GPL or the LGPL, and not to allow others to
+use your version of this file under the terms of the MPL, indicate your
+decision by deleting the provisions above and replace them with the notice
+and other provisions required by the GPL or the LGPL. If you do not delete
+the provisions above, a recipient may use your version of this file under
+the terms of any one of the MPL, the GPL or the LGPL.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">usrsctp</span>
+<span class="homepage"><a href="http://github.com/sctplab/usrsctp">homepage</a></span>
+<input type="checkbox" hidden id="161">
+<label class="show" for="161" tabindex="0"></label>
+<div class="licence">
+<pre>(Copied from the COPYRIGHT file of
+https://code.google.com/p/sctp-refimpl/source/browse/trunk/COPYRIGHT)
+--------------------------------------------------------------------------------
+
+Copyright (c) 2001, 2002 Cisco Systems, Inc.
+Copyright (c) 2002-12 Randall R. Stewart
+Copyright (c) 2002-12 Michael Tuexen
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">v4l-utils</span>
+<span class="homepage"><a href="http://git.linuxtv.org/v4l-utils.git">homepage</a></span>
+<input type="checkbox" hidden id="162">
+<label class="show" for="162" tabindex="0"></label>
+<div class="licence">
+<pre>
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+ Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">V8 JavaScript Engine</span>
+<span class="homepage"><a href="http://code.google.com/p/v8">homepage</a></span>
+<input type="checkbox" hidden id="163">
+<label class="show" for="163" tabindex="0"></label>
+<div class="licence">
+<pre>This license applies to all parts of V8 that are not externally
+maintained libraries. The externally maintained libraries used by V8
+are:
+
+ - PCRE test suite, located in
+ test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the
+ test suite from PCRE-7.3, which is copyrighted by the University
+ of Cambridge and Google, Inc. The copyright notice and license
+ are embedded in regexp-pcre.js.
+
+ - Layout tests, located in test/mjsunit/third_party/object-keys. These are
+ based on layout tests from webkit.org which are copyrighted by
+ Apple Computer, Inc. and released under a 3-clause BSD license.
+
+ - Strongtalk assembler, the basis of the files assembler-arm-inl.h,
+ assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h,
+ assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h,
+ assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h,
+ assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h.
+ This code is copyrighted by Sun Microsystems Inc. and released
+ under a 3-clause BSD license.
+
+ - Valgrind client API header, located at third_party/valgrind/valgrind.h
+ This is release under the BSD license.
+
+ - antlr4 parser generator Cpp library located in third_party/antlr4
+ This is release under the BSD license.
+
+These libraries have their own licenses; we recommend you read them,
+as their terms may differ from the terms below.
+
+Further license information can be found in LICENSE files located in
+sub-directories.
+
+Copyright 2014, the V8 project authors. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">valgrind</span>
+<span class="homepage"><a href="http://valgrind.org">homepage</a></span>
+<input type="checkbox" hidden id="164">
+<label class="show" for="164" tabindex="0"></label>
+<div class="licence">
+<pre> Notice that the following BSD-style license applies to the Valgrind header
+ files used by Chromium (valgrind.h and memcheck.h). However, the rest of
+ Valgrind is licensed under the terms of the GNU General Public License,
+ version 2, unless otherwise indicated.
+
+ ----------------------------------------------------------------
+
+ Copyright (C) 2000-2008 Julian Seward. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. The origin of this software must not be misrepresented; you must
+ not claim that you wrote the original software. If you use this
+ software in a product, an acknowledgment in the product
+ documentation would be appreciated but is not required.
+
+ 3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">wayland</span>
+<span class="homepage"><a href="http://wayland.freedesktop.org/">homepage</a></span>
+<input type="checkbox" hidden id="165">
+<label class="show" for="165" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright © 2008-2012 Kristian Høgsberg
+Copyright © 2010-2012 Intel Corporation
+Copyright © 2011 Benjamin Franzke
+Copyright © 2012 Collabora, Ltd.
+
+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 (including the next
+paragraph) 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.
+
+---
+
+The above is the version of the MIT "Expat" License used by X.org:
+
+ http://cgit.freedesktop.org/xorg/xserver/tree/COPYING
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">wayland-protocols</span>
+<span class="homepage"><a href="http://wayland.freedesktop.org/">homepage</a></span>
+<input type="checkbox" hidden id="166">
+<label class="show" for="166" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright © 2008-2013 Kristian Høgsberg
+Copyright © 2010-2013 Intel Corporation
+Copyright © 2013 Rafael Antognolli
+Copyright © 2013 Jasper St. Pierre
+Copyright © 2014 Jonas Ådahl
+Copyright © 2014 Jason Ekstrand
+Copyright © 2014-2015 Collabora, Ltd.
+Copyright © 2015 Red Hat Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) 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.
+
+---
+
+The above is the version of the MIT "Expat" License used by X.org:
+
+ http://cgit.freedesktop.org/xorg/xserver/tree/COPYING
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">WDS</span>
+<span class="homepage"><a href="https://github.com/01org/wds">homepage</a></span>
+<input type="checkbox" hidden id="167">
+<label class="show" for="167" tabindex="0"></label>
+<div class="licence">
+<pre> GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ &lt;signature of Ty Coon&gt;, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Web Animations JS</span>
+<span class="homepage"><a href="https://github.com/web-animations/web-animations-js">homepage</a></span>
+<input type="checkbox" hidden id="168">
+<label class="show" for="168" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">WebKit</span>
+<span class="homepage"><a href="http://webkit.org/">homepage</a></span>
+<input type="checkbox" hidden id="169">
+<label class="show" for="169" tabindex="0"></label>
+<div class="licence">
+<pre>(WebKit doesn't distribute an explicit license. This LICENSE is derived from
+license text in the source.)
+
+Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+2006, 2007 Alexander Kellett, Alexey Proskuryakov, Alex Mathews, Allan
+Sandfeld Jensen, Alp Toker, Anders Carlsson, Andrew Wellington, Antti
+Koivisto, Apple Inc., Arthur Langereis, Baron Schwartz, Bjoern Graf,
+Brent Fulgham, Cameron Zwarich, Charles Samuels, Christian Dywan,
+Collabora Ltd., Cyrus Patel, Daniel Molkentin, Dave Maclachlan, David
+Smith, Dawit Alemayehu, Dirk Mueller, Dirk Schulze, Don Gibson, Enrico
+Ros, Eric Seidel, Frederik Holljen, Frerich Raabe, Friedmann Kleint,
+George Staikos, Google Inc., Graham Dennis, Harri Porten, Henry Mason,
+Hiroyuki Ikezoe, Holger Hans Peter Freyther, IBM, James G. Speth, Jan
+Alonzo, Jean-Loup Gailly, John Reis, Jonas Witt, Jon Shier, Jonas
+Witt, Julien Chaffraix, Justin Haygood, Kevin Ollivier, Kevin Watters,
+Kimmo Kinnunen, Kouhei Sutou, Krzysztof Kowalczyk, Lars Knoll, Luca
+Bruno, Maks Orlovich, Malte Starostik, Mark Adler, Martin Jones,
+Marvin Decker, Matt Lilek, Michael Emmel, Mitz Pettel, mozilla.org,
+Netscape Communications Corporation, Nicholas Shanks, Nikolas
+Zimmermann, Nokia, Oliver Hunt, Opened Hand, Paul Johnston, Peter
+Kelly, Pioneer Research Center USA, Rich Moore, Rob Buis, Robin Dunn,
+Ronald Tschalär, Samuel Weinig, Simon Hausmann, Staikos Computing
+Services Inc., Stefan Schimanski, Symantec Corporation, The Dojo
+Foundation, The Karbon Developers, Thomas Boyer, Tim Copperfield,
+Tobias Anton, Torben Weis, Trolltech, University of Cambridge, Vaclav
+Slavik, Waldo Bastian, Xan Lopez, Zack Rusin
+
+The terms and conditions vary from file to file, but are one of:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the
+ distribution.
+
+*OR*
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the
+ distribution.
+3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">WebM container parser and writer.</span>
+<span class="homepage"><a href="http://www.webmproject.org/code/">homepage</a></span>
+<input type="checkbox" hidden id="170">
+<label class="show" for="170" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2010, Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Google nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">WebP image encoder/decoder</span>
+<span class="homepage"><a href="http://developers.google.com/speed/webp">homepage</a></span>
+<input type="checkbox" hidden id="171">
+<label class="show" for="171" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2010, Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Google nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Additional IP Rights Grant (Patents)
+------------------------------------
+
+"These implementations" means the copyrightable works that implement the WebM
+codecs distributed by Google as part of the WebM Project.
+
+Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable (except as stated in this section) patent license to
+make, have made, use, offer to sell, sell, import, transfer, and otherwise
+run, modify and propagate the contents of these implementations of WebM, where
+such license applies only to those patent claims, both currently owned by
+Google and acquired in the future, licensable by Google that are necessarily
+infringed by these implementations of WebM. This grant does not include claims
+that would be infringed only as a consequence of further modification of these
+implementations. If you or your agent or exclusive licensee institute or order
+or agree to the institution of patent litigation or any other patent
+enforcement activity against any entity (including a cross-claim or
+counterclaim in a lawsuit) alleging that any of these implementations of WebM
+or any code incorporated within any of these implementations of WebM
+constitute direct or contributory patent infringement, or inducement of
+patent infringement, then any patent rights granted to you under this License
+for these implementations of WebM shall terminate as of the date such
+litigation is filed.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">WebRTC</span>
+<span class="homepage"><a href="http://www.webrtc.org">homepage</a></span>
+<input type="checkbox" hidden id="172">
+<label class="show" for="172" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2011, The WebRTC project authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Google nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Windows Template Library (WTL)</span>
+<span class="homepage"><a href="http://wtl.sourceforge.net/">homepage</a></span>
+<input type="checkbox" hidden id="173">
+<label class="show" for="173" tabindex="0"></label>
+<div class="licence">
+<pre>Microsoft Permissive License (Ms-PL)
+Published: October 12, 2006
+
+
+This license governs use of the accompanying software. If you use the software,
+you accept this license. If you do not accept the license, do not use the
+software.
+
+
+1. Definitions
+
+The terms "reproduce," "reproduction," "derivative works," and "distribution"
+have the same meaning here as under U.S. copyright law.
+
+A "contribution" is the original software, or any additions or changes to the
+software.
+
+A "contributor" is any person that distributes its contribution under this
+license.
+
+"Licensed patents" are a contributor’s patent claims that read directly on its
+contribution.
+
+
+2. Grant of Rights
+
+(A) Copyright Grant- Subject to the terms of this license, including the
+license conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free copyright license to reproduce its
+contribution, prepare derivative works of its contribution, and distribute its
+contribution or any derivative works that you create.
+
+(B) Patent Grant- Subject to the terms of this license, including the license
+conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free license under its licensed patents to
+make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
+its contribution in the software or derivative works of the contribution in the
+software.
+
+
+3. Conditions and Limitations
+
+(A) No Trademark License- This license does not grant you rights to use any
+contributors’ name, logo, or trademarks.
+
+(B) If you bring a patent claim against any contributor over patents that you
+claim are infringed by the software, your patent license from such contributor
+to the software ends automatically.
+
+(C) If you distribute any portion of the software, you must retain all
+copyright, patent, trademark, and attribution notices that are present in the
+software.
+
+(D) If you distribute any portion of the software in source code form, you may
+do so only under this license by including a complete copy of this license with
+your distribution. If you distribute any portion of the software in compiled or
+object code form, you may only do so under a license that complies with this
+license.
+
+(E) The software is licensed "as-is." You bear the risk of using it. The
+contributors give no express warranties, guarantees or conditions. You may have
+additional consumer rights under your local laws which this license cannot
+change. To the extent permitted under your local laws, the contributors exclude
+the implied warranties of merchantability, fitness for a particular purpose and
+non-infringement.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">woff2</span>
+<span class="homepage"><a href="https://github.com/google/woff2">homepage</a></span>
+<input type="checkbox" hidden id="174">
+<label class="show" for="174" tabindex="0"></label>
+<div class="licence">
+<pre>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">xdg-mime</span>
+<span class="homepage"><a href="http://freedesktop.org">homepage</a></span>
+<input type="checkbox" hidden id="175">
+<label class="show" for="175" tabindex="0"></label>
+<div class="licence">
+<pre>Licensed under the Academic Free License version 2.0 (below)
+Or under the following terms:
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the
+Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+
+
+--------------------------------------------------------------------------------
+Academic Free License v. 2.0
+--------------------------------------------------------------------------------
+
+This Academic Free License (the "License") applies to any original work of
+authorship (the "Original Work") whose owner (the "Licensor") has placed the
+following notice immediately following the copyright notice for the Original
+Work:
+
+Licensed under the Academic Free License version 2.0
+1) Grant of Copyright License. Licensor hereby grants You a world-wide,
+royalty-free, non-exclusive, perpetual, sublicenseable license to do the
+following:
+
+a) to reproduce the Original Work in copies;
+b) to prepare derivative works ("Derivative Works") based upon the Original
+ Work;
+c) to distribute copies of the Original Work and Derivative Works to the
+ public;
+d) to perform the Original Work publicly; and
+e) to display the Original Work publicly.
+
+2) Grant of Patent License. Licensor hereby grants You a world-wide,
+royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
+claims owned or controlled by the Licensor that are embodied in the Original
+Work as furnished by the Licensor, to make, use, sell and offer for sale the
+Original Work and Derivative Works.
+
+3) Grant of Source Code License. The term "Source Code" means the preferred
+form of the Original Work for making modifications to it and all available
+documentation describing how to modify the Original Work. Licensor hereby
+agrees to provide a machine-readable copy of the Source Code of the Original
+Work along with each copy of the Original Work that Licensor distributes.
+Licensor reserves the right to satisfy this obligation by placing a
+machine-readable copy of the Source Code in an information repository
+reasonably calculated to permit inexpensive and convenient access by You for as
+long as Licensor continues to distribute the Original Work, and by publishing
+the address of that information repository in a notice immediately following
+the copyright notice that applies to the Original Work.
+
+4) Exclusions From License Grant. Neither the names of Licensor, nor the names
+of any contributors to the Original Work, nor any of their trademarks or
+service marks, may be used to endorse or promote products derived from this
+Original Work without express prior written permission of the Licensor. Nothing
+in this License shall be deemed to grant any rights to trademarks, copyrights,
+patents, trade secrets or any other intellectual property of Licensor except as
+expressly stated herein. No patent license is granted to make, use, sell or
+offer to sell embodiments of any patent claims other than the licensed claims
+defined in Section 2. No right is granted to the trademarks of Licensor even if
+such marks are included in the Original Work. Nothing in this License shall be
+interpreted to prohibit Licensor from licensing under different terms from this
+License any Original Work that Licensor otherwise would have a right to
+license.
+
+5) This section intentionally omitted.
+
+6) Attribution Rights. You must retain, in the Source Code of any Derivative
+Works that You create, all copyright, patent or trademark notices from the
+Source Code of the Original Work, as well as any notices of licensing and any
+descriptive text identified therein as an "Attribution Notice." You must cause
+the Source Code for any Derivative Works that You create to carry a prominent
+Attribution Notice reasonably calculated to inform recipients that You have
+modified the Original Work.
+
+7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
+the copyright in and to the Original Work and the patent rights granted herein
+by Licensor are owned by the Licensor or are sublicensed to You under the terms
+of this License with the permission of the contributor(s) of those copyrights
+and patent rights. Except as expressly stated in the immediately proceeding
+sentence, the Original Work is provided under this License on an "AS IS" BASIS
+and WITHOUT WARRANTY, either express or implied, including, without limitation,
+the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
+This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
+license to Original Work is granted hereunder except under this disclaimer.
+
+8) Limitation of Liability. Under no circumstances and under no legal theory,
+whether in tort (including negligence), contract, or otherwise, shall the
+Licensor be liable to any person for any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License
+or the use of the Original Work including, without limitation, damages for loss
+of goodwill, work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses. This limitation of liability shall not
+apply to liability for death or personal injury resulting from Licensor's
+negligence to the extent applicable law prohibits such limitation. Some
+jurisdictions do not allow the exclusion or limitation of incidental or
+consequential damages, so this exclusion and limitation may not apply to You.
+
+9) Acceptance and Termination. If You distribute copies of the Original Work or
+a Derivative Work, You must make a reasonable effort under the circumstances to
+obtain the express assent of recipients to the terms of this License. Nothing
+else but this License (or another written agreement between Licensor and You)
+grants You permission to create Derivative Works based upon the Original Work
+or to exercise any of the rights granted in Section 1 herein, and any attempt
+to do so except under the terms of this License (or another written agreement
+between Licensor and You) is expressly prohibited by U.S. copyright law, the
+equivalent laws of other countries, and by international treaty. Therefore, by
+exercising any of the rights granted to You in Section 1 herein, You indicate
+Your acceptance of this License and all of its terms and conditions.
+
+10) Termination for Patent Action. This License shall terminate automatically
+and You may no longer exercise any of the rights granted to You by this License
+as of the date You commence an action, including a cross-claim or counterclaim,
+for patent infringement (i) against Licensor with respect to a patent
+applicable to software or (ii) against any entity with respect to a patent
+applicable to the Original Work (but excluding combinations of the Original
+Work with other software or hardware).
+
+11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
+License may be brought only in the courts of a jurisdiction wherein the
+Licensor resides or in which Licensor conducts its primary business, and under
+the laws of that jurisdiction excluding its conflict-of-law provisions. The
+application of the United Nations Convention on Contracts for the International
+Sale of Goods is expressly excluded. Any use of the Original Work outside the
+scope of this License or after its termination shall be subject to the
+requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq.,
+the equivalent laws of other countries, and international treaty. This section
+shall survive the termination of this License.
+
+12) Attorneys Fees. In any action to enforce the terms of this License or
+seeking damages relating thereto, the prevailing party shall be entitled to
+recover its costs and expenses, including, without limitation, reasonable
+attorneys' fees and costs incurred in connection with such action, including
+any appeal of such action. This section shall survive the termination of this
+License.
+
+13) Miscellaneous. This License represents the complete agreement concerning
+the subject matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent necessary to
+make it enforceable.
+
+14) Definition of "You" in This License. "You" throughout this License, whether
+in upper or lower case, means an individual or a legal entity exercising rights
+under, and complying with all of the terms of, this License. For legal
+entities, "You" includes any entity that controls, is controlled by, or is
+under common control with you. For purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty percent
+(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
+entity.
+
+15) Right to Use. You may use the Original Work in all ways not otherwise
+restricted or conditioned by this License or by law, and Licensor promises not
+to interfere with or be responsible for such uses by You.
+
+This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved.
+Permission is hereby granted to copy and distribute this license without
+modification. This license may not be modified without the express written
+permission of its copyright owner.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">xdg-user-dirs</span>
+<span class="homepage"><a href="http://www.freedesktop.org/wiki/Software/xdg-user-dirs">homepage</a></span>
+<input type="checkbox" hidden id="176">
+<label class="show" for="176" tabindex="0"></label>
+<div class="licence">
+<pre> Copyright (c) 2007 Red Hat, inc
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">xdg-utils</span>
+<span class="homepage"><a href="http://portland.freedesktop.org/wiki/">homepage</a></span>
+<input type="checkbox" hidden id="177">
+<label class="show" for="177" tabindex="0"></label>
+<div class="licence">
+<pre>#
+# 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.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">XZ Utils</span>
+<span class="homepage"><a href="http://tukaani.org/xz/">homepage</a></span>
+<input type="checkbox" hidden id="178">
+<label class="show" for="178" tabindex="0"></label>
+<div class="licence">
+<pre>See http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/xz/COPYING
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">Yara</span>
+<span class="homepage"><a href="https://github.com/virustotal/yara">homepage</a></span>
+<input type="checkbox" hidden id="179">
+<label class="show" for="179" tabindex="0"></label>
+<div class="licence">
+<pre>Copyright (c) 2007-2016. The YARA Authors. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+may be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">yasm</span>
+<span class="homepage"><a href="http://www.tortall.net/projects/yasm/">homepage</a></span>
+<input type="checkbox" hidden id="180">
+<label class="show" for="180" tabindex="0"></label>
+<div class="licence">
+<pre>Yasm is Copyright (c) 2001-2014 Peter Johnson and other Yasm developers.
+
+Yasm developers and/or contributors include:
+ Peter Johnson
+ Michael Urman
+ Brian Gladman (Visual Studio build files, other fixes)
+ Stanislav Karchebny (options parser)
+ Mathieu Monnier (SSE4 instruction patches, NASM preprocessor additions)
+ Anonymous "NASM64" developer (NASM preprocessor fixes)
+ Stephen Polkowski (x86 instruction patches)
+ Henryk Richter (Mach-O object format)
+ Ben Skeggs (patches, bug reports)
+ Alexei Svitkine (GAS preprocessor)
+ Samuel Thibault (TASM parser and frontend)
+
+-----------------------------------
+Yasm licensing overview and summary
+-----------------------------------
+
+Note: This document does not provide legal advice nor is it the actual
+license of any part of Yasm. See the individual licenses for complete
+details. Consult a lawyer for legal advice.
+
+The primary license of Yasm is the 2-clause BSD license. Please use this
+license if you plan on submitting code to the project.
+
+Yasm has absolutely no warranty; not even for merchantibility or fitness
+for a particular purpose.
+
+-------
+Libyasm
+-------
+Libyasm is 2-clause or 3-clause BSD licensed, with the exception of
+bitvect, which is triple-licensed under the Artistic license, GPL, and
+LGPL. Libyasm is thus GPL and LGPL compatible. In addition, this also
+means that libyasm is free for binary-only distribution as long as the
+terms of the 3-clause BSD license and Artistic license (as it applies to
+bitvect) are fulfilled.
+
+-------
+Modules
+-------
+The modules are 2-clause or 3-clause BSD licensed.
+
+---------
+Frontends
+---------
+The frontends are 2-clause BSD licensed.
+
+-------------
+License Texts
+-------------
+The full text of all licenses are provided in separate files in the source
+distribution. Each source file may include the entire license (in the case
+of the BSD and Artistic licenses), or may reference the GPL or LGPL license
+file.
+
+BSD.txt - 2-clause and 3-clause BSD licenses
+Artistic.txt - Artistic license
+GNU_GPL-2.0 - GNU General Public License
+GNU_LGPL-2.0 - GNU Library General Public License
+</pre>
+</div>
+</div>
+
+<div class="product">
+<span class="title">zlib</span>
+<span class="homepage"><a href="http://zlib.net/">homepage</a></span>
+<input type="checkbox" hidden id="181">
+<label class="show" for="181" tabindex="0"></label>
+<div class="licence">
+<pre>version 1.2.11, January 15th, 2017
+
+Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+</pre>
+</div>
+</div>
+
+</div>
diff --git a/node_modules/electron/dist/chrome_100_percent.pak b/node_modules/electron/dist/chrome_100_percent.pak
new file mode 100644
index 0000000..ce0a00d
--- /dev/null
+++ b/node_modules/electron/dist/chrome_100_percent.pak
Binary files differ
diff --git a/node_modules/electron/dist/chrome_200_percent.pak b/node_modules/electron/dist/chrome_200_percent.pak
new file mode 100644
index 0000000..7ef1100
--- /dev/null
+++ b/node_modules/electron/dist/chrome_200_percent.pak
Binary files differ
diff --git a/node_modules/electron/dist/electron b/node_modules/electron/dist/electron
new file mode 100755
index 0000000..75ee00a
--- /dev/null
+++ b/node_modules/electron/dist/electron
Binary files differ
diff --git a/node_modules/electron/dist/icudtl.dat b/node_modules/electron/dist/icudtl.dat
new file mode 100644
index 0000000..e601a45
--- /dev/null
+++ b/node_modules/electron/dist/icudtl.dat
Binary files differ
diff --git a/node_modules/electron/dist/libEGL.so b/node_modules/electron/dist/libEGL.so
new file mode 100755
index 0000000..d3782f1
--- /dev/null
+++ b/node_modules/electron/dist/libEGL.so
Binary files differ
diff --git a/node_modules/electron/dist/libGLESv2.so b/node_modules/electron/dist/libGLESv2.so
new file mode 100755
index 0000000..216763b
--- /dev/null
+++ b/node_modules/electron/dist/libGLESv2.so
Binary files differ
diff --git a/node_modules/electron/dist/libffmpeg.so b/node_modules/electron/dist/libffmpeg.so
new file mode 100755
index 0000000..e07b4bf
--- /dev/null
+++ b/node_modules/electron/dist/libffmpeg.so
Binary files differ
diff --git a/node_modules/electron/dist/locales/am.pak b/node_modules/electron/dist/locales/am.pak
new file mode 100644
index 0000000..0745216
--- /dev/null
+++ b/node_modules/electron/dist/locales/am.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ar.pak b/node_modules/electron/dist/locales/ar.pak
new file mode 100644
index 0000000..6e891bf
--- /dev/null
+++ b/node_modules/electron/dist/locales/ar.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/bg.pak b/node_modules/electron/dist/locales/bg.pak
new file mode 100644
index 0000000..e76ae64
--- /dev/null
+++ b/node_modules/electron/dist/locales/bg.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/bn.pak b/node_modules/electron/dist/locales/bn.pak
new file mode 100644
index 0000000..e798381
--- /dev/null
+++ b/node_modules/electron/dist/locales/bn.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ca.pak b/node_modules/electron/dist/locales/ca.pak
new file mode 100644
index 0000000..605692f
--- /dev/null
+++ b/node_modules/electron/dist/locales/ca.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/cs.pak b/node_modules/electron/dist/locales/cs.pak
new file mode 100644
index 0000000..8a0c7db
--- /dev/null
+++ b/node_modules/electron/dist/locales/cs.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/da.pak b/node_modules/electron/dist/locales/da.pak
new file mode 100644
index 0000000..c9191d8
--- /dev/null
+++ b/node_modules/electron/dist/locales/da.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/de.pak b/node_modules/electron/dist/locales/de.pak
new file mode 100644
index 0000000..9bdcc02
--- /dev/null
+++ b/node_modules/electron/dist/locales/de.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/el.pak b/node_modules/electron/dist/locales/el.pak
new file mode 100644
index 0000000..280000a
--- /dev/null
+++ b/node_modules/electron/dist/locales/el.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/en-GB.pak b/node_modules/electron/dist/locales/en-GB.pak
new file mode 100644
index 0000000..eb72b3f
--- /dev/null
+++ b/node_modules/electron/dist/locales/en-GB.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/en-US.pak b/node_modules/electron/dist/locales/en-US.pak
new file mode 100644
index 0000000..6f04967
--- /dev/null
+++ b/node_modules/electron/dist/locales/en-US.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/es-419.pak b/node_modules/electron/dist/locales/es-419.pak
new file mode 100644
index 0000000..f2178a1
--- /dev/null
+++ b/node_modules/electron/dist/locales/es-419.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/es.pak b/node_modules/electron/dist/locales/es.pak
new file mode 100644
index 0000000..67d6156
--- /dev/null
+++ b/node_modules/electron/dist/locales/es.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/et.pak b/node_modules/electron/dist/locales/et.pak
new file mode 100644
index 0000000..6579d54
--- /dev/null
+++ b/node_modules/electron/dist/locales/et.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/fa.pak b/node_modules/electron/dist/locales/fa.pak
new file mode 100644
index 0000000..403cbbd
--- /dev/null
+++ b/node_modules/electron/dist/locales/fa.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/fi.pak b/node_modules/electron/dist/locales/fi.pak
new file mode 100644
index 0000000..d8f6a69
--- /dev/null
+++ b/node_modules/electron/dist/locales/fi.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/fil.pak b/node_modules/electron/dist/locales/fil.pak
new file mode 100644
index 0000000..edcd0ae
--- /dev/null
+++ b/node_modules/electron/dist/locales/fil.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/fr.pak b/node_modules/electron/dist/locales/fr.pak
new file mode 100644
index 0000000..bef4217
--- /dev/null
+++ b/node_modules/electron/dist/locales/fr.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/gu.pak b/node_modules/electron/dist/locales/gu.pak
new file mode 100644
index 0000000..75c9fac
--- /dev/null
+++ b/node_modules/electron/dist/locales/gu.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/he.pak b/node_modules/electron/dist/locales/he.pak
new file mode 100644
index 0000000..0a70b7e
--- /dev/null
+++ b/node_modules/electron/dist/locales/he.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/hi.pak b/node_modules/electron/dist/locales/hi.pak
new file mode 100644
index 0000000..16878ba
--- /dev/null
+++ b/node_modules/electron/dist/locales/hi.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/hr.pak b/node_modules/electron/dist/locales/hr.pak
new file mode 100644
index 0000000..2e7b0e3
--- /dev/null
+++ b/node_modules/electron/dist/locales/hr.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/hu.pak b/node_modules/electron/dist/locales/hu.pak
new file mode 100644
index 0000000..31cb4cb
--- /dev/null
+++ b/node_modules/electron/dist/locales/hu.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/id.pak b/node_modules/electron/dist/locales/id.pak
new file mode 100644
index 0000000..b993afd
--- /dev/null
+++ b/node_modules/electron/dist/locales/id.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/it.pak b/node_modules/electron/dist/locales/it.pak
new file mode 100644
index 0000000..a041b79
--- /dev/null
+++ b/node_modules/electron/dist/locales/it.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ja.pak b/node_modules/electron/dist/locales/ja.pak
new file mode 100644
index 0000000..b080dc5
--- /dev/null
+++ b/node_modules/electron/dist/locales/ja.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/kn.pak b/node_modules/electron/dist/locales/kn.pak
new file mode 100644
index 0000000..37c3150
--- /dev/null
+++ b/node_modules/electron/dist/locales/kn.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ko.pak b/node_modules/electron/dist/locales/ko.pak
new file mode 100644
index 0000000..d2f7cdc
--- /dev/null
+++ b/node_modules/electron/dist/locales/ko.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/lt.pak b/node_modules/electron/dist/locales/lt.pak
new file mode 100644
index 0000000..f4f9d95
--- /dev/null
+++ b/node_modules/electron/dist/locales/lt.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/lv.pak b/node_modules/electron/dist/locales/lv.pak
new file mode 100644
index 0000000..84686d2
--- /dev/null
+++ b/node_modules/electron/dist/locales/lv.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ml.pak b/node_modules/electron/dist/locales/ml.pak
new file mode 100644
index 0000000..a468453
--- /dev/null
+++ b/node_modules/electron/dist/locales/ml.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/mr.pak b/node_modules/electron/dist/locales/mr.pak
new file mode 100644
index 0000000..1c4a407
--- /dev/null
+++ b/node_modules/electron/dist/locales/mr.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ms.pak b/node_modules/electron/dist/locales/ms.pak
new file mode 100644
index 0000000..d97e052
--- /dev/null
+++ b/node_modules/electron/dist/locales/ms.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/nb.pak b/node_modules/electron/dist/locales/nb.pak
new file mode 100644
index 0000000..589cf56
--- /dev/null
+++ b/node_modules/electron/dist/locales/nb.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/nl.pak b/node_modules/electron/dist/locales/nl.pak
new file mode 100644
index 0000000..1c68f25
--- /dev/null
+++ b/node_modules/electron/dist/locales/nl.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/pl.pak b/node_modules/electron/dist/locales/pl.pak
new file mode 100644
index 0000000..9ee8fb5
--- /dev/null
+++ b/node_modules/electron/dist/locales/pl.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/pt-BR.pak b/node_modules/electron/dist/locales/pt-BR.pak
new file mode 100644
index 0000000..8941e43
--- /dev/null
+++ b/node_modules/electron/dist/locales/pt-BR.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/pt-PT.pak b/node_modules/electron/dist/locales/pt-PT.pak
new file mode 100644
index 0000000..ad4a0f8
--- /dev/null
+++ b/node_modules/electron/dist/locales/pt-PT.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ro.pak b/node_modules/electron/dist/locales/ro.pak
new file mode 100644
index 0000000..bdc3133
--- /dev/null
+++ b/node_modules/electron/dist/locales/ro.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ru.pak b/node_modules/electron/dist/locales/ru.pak
new file mode 100644
index 0000000..0afde29
--- /dev/null
+++ b/node_modules/electron/dist/locales/ru.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/sk.pak b/node_modules/electron/dist/locales/sk.pak
new file mode 100644
index 0000000..b4be07a
--- /dev/null
+++ b/node_modules/electron/dist/locales/sk.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/sl.pak b/node_modules/electron/dist/locales/sl.pak
new file mode 100644
index 0000000..96d39b9
--- /dev/null
+++ b/node_modules/electron/dist/locales/sl.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/sr.pak b/node_modules/electron/dist/locales/sr.pak
new file mode 100644
index 0000000..0e53de2
--- /dev/null
+++ b/node_modules/electron/dist/locales/sr.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/sv.pak b/node_modules/electron/dist/locales/sv.pak
new file mode 100644
index 0000000..b3b2c75
--- /dev/null
+++ b/node_modules/electron/dist/locales/sv.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/sw.pak b/node_modules/electron/dist/locales/sw.pak
new file mode 100644
index 0000000..f24de04
--- /dev/null
+++ b/node_modules/electron/dist/locales/sw.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/ta.pak b/node_modules/electron/dist/locales/ta.pak
new file mode 100644
index 0000000..da8a3bc
--- /dev/null
+++ b/node_modules/electron/dist/locales/ta.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/te.pak b/node_modules/electron/dist/locales/te.pak
new file mode 100644
index 0000000..48d5f4b
--- /dev/null
+++ b/node_modules/electron/dist/locales/te.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/th.pak b/node_modules/electron/dist/locales/th.pak
new file mode 100644
index 0000000..6a20b6c
--- /dev/null
+++ b/node_modules/electron/dist/locales/th.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/tr.pak b/node_modules/electron/dist/locales/tr.pak
new file mode 100644
index 0000000..7a3c1a1
--- /dev/null
+++ b/node_modules/electron/dist/locales/tr.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/uk.pak b/node_modules/electron/dist/locales/uk.pak
new file mode 100644
index 0000000..f3700df
--- /dev/null
+++ b/node_modules/electron/dist/locales/uk.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/vi.pak b/node_modules/electron/dist/locales/vi.pak
new file mode 100644
index 0000000..74fb7e9
--- /dev/null
+++ b/node_modules/electron/dist/locales/vi.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/zh-CN.pak b/node_modules/electron/dist/locales/zh-CN.pak
new file mode 100644
index 0000000..f97345d
--- /dev/null
+++ b/node_modules/electron/dist/locales/zh-CN.pak
Binary files differ
diff --git a/node_modules/electron/dist/locales/zh-TW.pak b/node_modules/electron/dist/locales/zh-TW.pak
new file mode 100644
index 0000000..eb2f4e2
--- /dev/null
+++ b/node_modules/electron/dist/locales/zh-TW.pak
Binary files differ
diff --git a/node_modules/electron/dist/natives_blob.bin b/node_modules/electron/dist/natives_blob.bin
new file mode 100644
index 0000000..25466a7
--- /dev/null
+++ b/node_modules/electron/dist/natives_blob.bin
Binary files differ
diff --git a/node_modules/electron/dist/resources.pak b/node_modules/electron/dist/resources.pak
new file mode 100644
index 0000000..f343d50
--- /dev/null
+++ b/node_modules/electron/dist/resources.pak
Binary files differ
diff --git a/node_modules/electron/dist/resources/default_app.asar b/node_modules/electron/dist/resources/default_app.asar
new file mode 100644
index 0000000..f6ecbb0
--- /dev/null
+++ b/node_modules/electron/dist/resources/default_app.asar
Binary files differ
diff --git a/node_modules/electron/dist/resources/electron.asar b/node_modules/electron/dist/resources/electron.asar
new file mode 100644
index 0000000..d061505
--- /dev/null
+++ b/node_modules/electron/dist/resources/electron.asar
Binary files differ
diff --git a/node_modules/electron/dist/snapshot_blob.bin b/node_modules/electron/dist/snapshot_blob.bin
new file mode 100644
index 0000000..5860547
--- /dev/null
+++ b/node_modules/electron/dist/snapshot_blob.bin
Binary files differ
diff --git a/node_modules/electron/dist/swiftshader/libEGL.so b/node_modules/electron/dist/swiftshader/libEGL.so
new file mode 100755
index 0000000..7a7d576
--- /dev/null
+++ b/node_modules/electron/dist/swiftshader/libEGL.so
Binary files differ
diff --git a/node_modules/electron/dist/swiftshader/libGLESv2.so b/node_modules/electron/dist/swiftshader/libGLESv2.so
new file mode 100755
index 0000000..faa744b
--- /dev/null
+++ b/node_modules/electron/dist/swiftshader/libGLESv2.so
Binary files differ
diff --git a/node_modules/electron/dist/v8_context_snapshot.bin b/node_modules/electron/dist/v8_context_snapshot.bin
new file mode 100644
index 0000000..c6e20dd
--- /dev/null
+++ b/node_modules/electron/dist/v8_context_snapshot.bin
Binary files differ
diff --git a/node_modules/electron/dist/version b/node_modules/electron/dist/version
new file mode 100644
index 0000000..3fca978
--- /dev/null
+++ b/node_modules/electron/dist/version
@@ -0,0 +1 @@
+4.2.12 \ No newline at end of file
diff --git a/node_modules/electron/electron.d.ts b/node_modules/electron/electron.d.ts
new file mode 100644
index 0000000..eecb5a5
--- /dev/null
+++ b/node_modules/electron/electron.d.ts
@@ -0,0 +1,9861 @@
+// Type definitions for Electron 4.2.12
+// Project: http://electronjs.org/
+// Definitions by: The Electron Team <https://github.com/electron/electron>
+// Definitions: https://github.com/electron/electron-typescript-definitions
+
+/// <reference types="node" />
+
+type GlobalEvent = Event;
+
+declare namespace Electron {
+ class EventEmitter {
+ addListener(event: string, listener: Function): this;
+ on(event: string, listener: Function): this;
+ once(event: string, listener: Function): this;
+ removeListener(event: string, listener: Function): this;
+ removeAllListeners(event?: string): this;
+ setMaxListeners(n: number): this;
+ getMaxListeners(): number;
+ listeners(event: string): Function[];
+ emit(event: string, ...args: any[]): boolean;
+ listenerCount(type: string): number;
+ prependListener(event: string, listener: Function): this;
+ prependOnceListener(event: string, listener: Function): this;
+ eventNames(): string[];
+ }
+
+ class Accelerator extends String {
+
+ }
+
+ interface Event extends GlobalEvent {
+ preventDefault: () => void;
+ sender: WebContents;
+ returnValue: any;
+ ctrlKey?: boolean;
+ metaKey?: boolean;
+ shiftKey?: boolean;
+ altKey?: boolean;
+ }
+
+ interface CommonInterface {
+ clipboard: Clipboard;
+ crashReporter: CrashReporter;
+ nativeImage: typeof NativeImage;
+ screen: Screen;
+ shell: Shell;
+ }
+
+ interface MainInterface extends CommonInterface {
+ app: App;
+ autoUpdater: AutoUpdater;
+ BrowserView: typeof BrowserView;
+ BrowserWindow: typeof BrowserWindow;
+ ClientRequest: typeof ClientRequest;
+ contentTracing: ContentTracing;
+ Cookies: typeof Cookies;
+ Debugger: typeof Debugger;
+ dialog: Dialog;
+ DownloadItem: typeof DownloadItem;
+ globalShortcut: GlobalShortcut;
+ inAppPurchase: InAppPurchase;
+ IncomingMessage: typeof IncomingMessage;
+ ipcMain: IpcMain;
+ Menu: typeof Menu;
+ MenuItem: typeof MenuItem;
+ net: Net;
+ netLog: NetLog;
+ Notification: typeof Notification;
+ powerMonitor: PowerMonitor;
+ powerSaveBlocker: PowerSaveBlocker;
+ protocol: Protocol;
+ session: typeof Session;
+ systemPreferences: SystemPreferences;
+ TouchBar: typeof TouchBar;
+ Tray: typeof Tray;
+ webContents: typeof WebContents;
+ WebRequest: typeof WebRequest;
+ }
+
+ interface RendererInterface extends CommonInterface {
+ BrowserWindowProxy: typeof BrowserWindowProxy;
+ desktopCapturer: DesktopCapturer;
+ ipcRenderer: IpcRenderer;
+ remote: Remote;
+ webFrame: WebFrame;
+ webviewTag: WebviewTag;
+ }
+
+ interface AllElectron extends MainInterface, RendererInterface {}
+
+ const app: App;
+ const autoUpdater: AutoUpdater;
+ const clipboard: Clipboard;
+ const contentTracing: ContentTracing;
+ const crashReporter: CrashReporter;
+ const desktopCapturer: DesktopCapturer;
+ const dialog: Dialog;
+ const globalShortcut: GlobalShortcut;
+ const inAppPurchase: InAppPurchase;
+ const ipcMain: IpcMain;
+ const ipcRenderer: IpcRenderer;
+ type nativeImage = NativeImage;
+ const nativeImage: typeof NativeImage;
+ const net: Net;
+ const netLog: NetLog;
+ const powerMonitor: PowerMonitor;
+ const powerSaveBlocker: PowerSaveBlocker;
+ const protocol: Protocol;
+ const remote: Remote;
+ const screen: Screen;
+ type session = Session;
+ const session: typeof Session;
+ const shell: Shell;
+ const systemPreferences: SystemPreferences;
+ type webContents = WebContents;
+ const webContents: typeof WebContents;
+ const webFrame: WebFrame;
+ const webviewTag: WebviewTag;
+
+ interface App extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/app
+
+ /**
+ * Emitted when Chrome's accessibility support changes. This event fires when
+ * assistive technologies, such as screen readers, are enabled or disabled. See
+ * https://www.chromium.org/developers/design-documents/accessibility for more
+ * details.
+ */
+ on(event: 'accessibility-support-changed', listener: (event: Event,
+ /**
+ * `true` when Chrome's accessibility support is enabled, `false` otherwise.
+ */
+ accessibilitySupportEnabled: boolean) => void): this;
+ once(event: 'accessibility-support-changed', listener: (event: Event,
+ /**
+ * `true` when Chrome's accessibility support is enabled, `false` otherwise.
+ */
+ accessibilitySupportEnabled: boolean) => void): this;
+ addListener(event: 'accessibility-support-changed', listener: (event: Event,
+ /**
+ * `true` when Chrome's accessibility support is enabled, `false` otherwise.
+ */
+ accessibilitySupportEnabled: boolean) => void): this;
+ removeListener(event: 'accessibility-support-changed', listener: (event: Event,
+ /**
+ * `true` when Chrome's accessibility support is enabled, `false` otherwise.
+ */
+ accessibilitySupportEnabled: boolean) => void): this;
+ /**
+ * Emitted when the application is activated. Various actions can trigger this
+ * event, such as launching the application for the first time, attempting to
+ * re-launch the application when it's already running, or clicking on the
+ * application's dock or taskbar icon.
+ */
+ on(event: 'activate', listener: (event: Event,
+ hasVisibleWindows: boolean) => void): this;
+ once(event: 'activate', listener: (event: Event,
+ hasVisibleWindows: boolean) => void): this;
+ addListener(event: 'activate', listener: (event: Event,
+ hasVisibleWindows: boolean) => void): this;
+ removeListener(event: 'activate', listener: (event: Event,
+ hasVisibleWindows: boolean) => void): this;
+ /**
+ * Emitted during Handoff after an activity from this device was successfully
+ * resumed on another one.
+ */
+ on(event: 'activity-was-continued', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ once(event: 'activity-was-continued', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ addListener(event: 'activity-was-continued', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ removeListener(event: 'activity-was-continued', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ /**
+ * Emitted before the application starts closing its windows. Calling
+ * event.preventDefault() will prevent the default behaviour, which is terminating
+ * the application. Note: If application quit was initiated by
+ * autoUpdater.quitAndInstall() then before-quit is emitted after emitting close
+ * event on all windows and closing them. Note: On Windows, this event will not be
+ * emitted if the app is closed due to a shutdown/restart of the system or a user
+ * logout.
+ */
+ on(event: 'before-quit', listener: (event: Event) => void): this;
+ once(event: 'before-quit', listener: (event: Event) => void): this;
+ addListener(event: 'before-quit', listener: (event: Event) => void): this;
+ removeListener(event: 'before-quit', listener: (event: Event) => void): this;
+ /**
+ * Emitted when a browserWindow gets blurred.
+ */
+ on(event: 'browser-window-blur', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ once(event: 'browser-window-blur', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ addListener(event: 'browser-window-blur', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ removeListener(event: 'browser-window-blur', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ /**
+ * Emitted when a new browserWindow is created.
+ */
+ on(event: 'browser-window-created', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ once(event: 'browser-window-created', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ addListener(event: 'browser-window-created', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ removeListener(event: 'browser-window-created', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ /**
+ * Emitted when a browserWindow gets focused.
+ */
+ on(event: 'browser-window-focus', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ once(event: 'browser-window-focus', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ addListener(event: 'browser-window-focus', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ removeListener(event: 'browser-window-focus', listener: (event: Event,
+ window: BrowserWindow) => void): this;
+ /**
+ * Emitted when failed to verify the certificate for url, to trust the certificate
+ * you should prevent the default behavior with event.preventDefault() and call
+ * callback(true).
+ */
+ on(event: 'certificate-error', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ /**
+ * The error code
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ once(event: 'certificate-error', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ /**
+ * The error code
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ addListener(event: 'certificate-error', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ /**
+ * The error code
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ removeListener(event: 'certificate-error', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ /**
+ * The error code
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ /**
+ * Emitted during Handoff when an activity from a different device wants to be
+ * resumed. You should call event.preventDefault() if you want to handle this
+ * event. A user activity can be continued only in an app that has the same
+ * developer Team ID as the activity's source app and that supports the activity's
+ * type. Supported activity types are specified in the app's Info.plist under the
+ * NSUserActivityTypes key.
+ */
+ on(event: 'continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity on another device.
+ */
+ userInfo: any) => void): this;
+ once(event: 'continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity on another device.
+ */
+ userInfo: any) => void): this;
+ addListener(event: 'continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity on another device.
+ */
+ userInfo: any) => void): this;
+ removeListener(event: 'continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity on another device.
+ */
+ userInfo: any) => void): this;
+ /**
+ * Emitted during Handoff when an activity from a different device fails to be
+ * resumed.
+ */
+ on(event: 'continue-activity-error', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * A string with the error's localized description.
+ */
+ error: string) => void): this;
+ once(event: 'continue-activity-error', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * A string with the error's localized description.
+ */
+ error: string) => void): this;
+ addListener(event: 'continue-activity-error', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * A string with the error's localized description.
+ */
+ error: string) => void): this;
+ removeListener(event: 'continue-activity-error', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * A string with the error's localized description.
+ */
+ error: string) => void): this;
+ /**
+ * Emitted when the gpu process crashes or is killed.
+ */
+ on(event: 'gpu-process-crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ once(event: 'gpu-process-crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ addListener(event: 'gpu-process-crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ removeListener(event: 'gpu-process-crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ /**
+ * Emitted when webContents wants to do basic auth. The default behavior is to
+ * cancel all authentications, to override this you should prevent the default
+ * behavior with event.preventDefault() and call callback(username, password) with
+ * the credentials.
+ */
+ on(event: 'login', listener: (event: Event,
+ webContents: WebContents,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ once(event: 'login', listener: (event: Event,
+ webContents: WebContents,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ addListener(event: 'login', listener: (event: Event,
+ webContents: WebContents,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ removeListener(event: 'login', listener: (event: Event,
+ webContents: WebContents,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ /**
+ * Emitted when the user clicks the native macOS new tab button. The new tab button
+ * is only visible if the current BrowserWindow has a tabbingIdentifier
+ */
+ on(event: 'new-window-for-tab', listener: (event: Event) => void): this;
+ once(event: 'new-window-for-tab', listener: (event: Event) => void): this;
+ addListener(event: 'new-window-for-tab', listener: (event: Event) => void): this;
+ removeListener(event: 'new-window-for-tab', listener: (event: Event) => void): this;
+ /**
+ * Emitted when the user wants to open a file with the application. The open-file
+ * event is usually emitted when the application is already open and the OS wants
+ * to reuse the application to open the file. open-file is also emitted when a file
+ * is dropped onto the dock and the application is not yet running. Make sure to
+ * listen for the open-file event very early in your application startup to handle
+ * this case (even before the ready event is emitted). You should call
+ * event.preventDefault() if you want to handle this event. On Windows, you have to
+ * parse process.argv (in the main process) to get the filepath.
+ */
+ on(event: 'open-file', listener: (event: Event,
+ path: string) => void): this;
+ once(event: 'open-file', listener: (event: Event,
+ path: string) => void): this;
+ addListener(event: 'open-file', listener: (event: Event,
+ path: string) => void): this;
+ removeListener(event: 'open-file', listener: (event: Event,
+ path: string) => void): this;
+ /**
+ * Emitted when the user wants to open a URL with the application. Your
+ * application's Info.plist file must define the url scheme within the
+ * CFBundleURLTypes key, and set NSPrincipalClass to AtomApplication. You should
+ * call event.preventDefault() if you want to handle this event.
+ */
+ on(event: 'open-url', listener: (event: Event,
+ url: string) => void): this;
+ once(event: 'open-url', listener: (event: Event,
+ url: string) => void): this;
+ addListener(event: 'open-url', listener: (event: Event,
+ url: string) => void): this;
+ removeListener(event: 'open-url', listener: (event: Event,
+ url: string) => void): this;
+ /**
+ * Emitted when the application is quitting. Note: On Windows, this event will not
+ * be emitted if the app is closed due to a shutdown/restart of the system or a
+ * user logout.
+ */
+ on(event: 'quit', listener: (event: Event,
+ exitCode: number) => void): this;
+ once(event: 'quit', listener: (event: Event,
+ exitCode: number) => void): this;
+ addListener(event: 'quit', listener: (event: Event,
+ exitCode: number) => void): this;
+ removeListener(event: 'quit', listener: (event: Event,
+ exitCode: number) => void): this;
+ /**
+ * Emitted when Electron has finished initializing. On macOS, launchInfo holds the
+ * userInfo of the NSUserNotification that was used to open the application, if it
+ * was launched from Notification Center. You can call app.isReady() to check if
+ * this event has already fired.
+ */
+ on(event: 'ready', listener: (launchInfo: any) => void): this;
+ once(event: 'ready', listener: (launchInfo: any) => void): this;
+ addListener(event: 'ready', listener: (launchInfo: any) => void): this;
+ removeListener(event: 'ready', listener: (launchInfo: any) => void): this;
+ /**
+ * Emitted when remote.getBuiltin() is called in the renderer process of
+ * webContents. Calling event.preventDefault() will prevent the module from being
+ * returned. Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-builtin', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ once(event: 'remote-get-builtin', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ addListener(event: 'remote-get-builtin', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ removeListener(event: 'remote-get-builtin', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ /**
+ * Emitted when remote.getCurrentWebContents() is called in the renderer process of
+ * webContents. Calling event.preventDefault() will prevent the object from being
+ * returned. Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-current-web-contents', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ once(event: 'remote-get-current-web-contents', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ addListener(event: 'remote-get-current-web-contents', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ removeListener(event: 'remote-get-current-web-contents', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ /**
+ * Emitted when remote.getCurrentWindow() is called in the renderer process of
+ * webContents. Calling event.preventDefault() will prevent the object from being
+ * returned. Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-current-window', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ once(event: 'remote-get-current-window', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ addListener(event: 'remote-get-current-window', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ removeListener(event: 'remote-get-current-window', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ /**
+ * Emitted when remote.getGlobal() is called in the renderer process of
+ * webContents. Calling event.preventDefault() will prevent the global from being
+ * returned. Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-global', listener: (event: Event,
+ webContents: WebContents,
+ globalName: string) => void): this;
+ once(event: 'remote-get-global', listener: (event: Event,
+ webContents: WebContents,
+ globalName: string) => void): this;
+ addListener(event: 'remote-get-global', listener: (event: Event,
+ webContents: WebContents,
+ globalName: string) => void): this;
+ removeListener(event: 'remote-get-global', listener: (event: Event,
+ webContents: WebContents,
+ globalName: string) => void): this;
+ /**
+ * Emitted when <webview>.getWebContents() is called in the renderer process of
+ * webContents. Calling event.preventDefault() will prevent the object from being
+ * returned. Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ webContents: WebContents,
+ guestWebContents: WebContents) => void): this;
+ once(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ webContents: WebContents,
+ guestWebContents: WebContents) => void): this;
+ addListener(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ webContents: WebContents,
+ guestWebContents: WebContents) => void): this;
+ removeListener(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ webContents: WebContents,
+ guestWebContents: WebContents) => void): this;
+ /**
+ * Emitted when remote.require() is called in the renderer process of webContents.
+ * Calling event.preventDefault() will prevent the module from being returned.
+ * Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-require', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ once(event: 'remote-require', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ addListener(event: 'remote-require', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ removeListener(event: 'remote-require', listener: (event: Event,
+ webContents: WebContents,
+ moduleName: string) => void): this;
+ /**
+ * This event will be emitted inside the primary instance of your application when
+ * a second instance has been executed. argv is an Array of the second instance's
+ * command line arguments, and workingDirectory is its current working directory.
+ * Usually applications respond to this by making their primary window focused and
+ * non-minimized. This event is guaranteed to be emitted after the ready event of
+ * app gets emitted.
+ */
+ on(event: 'second-instance', listener: (event: Event,
+ /**
+ * An array of the second instance's command line arguments
+ */
+ argv: string[],
+ /**
+ * The second instance's working directory
+ */
+ workingDirectory: string) => void): this;
+ once(event: 'second-instance', listener: (event: Event,
+ /**
+ * An array of the second instance's command line arguments
+ */
+ argv: string[],
+ /**
+ * The second instance's working directory
+ */
+ workingDirectory: string) => void): this;
+ addListener(event: 'second-instance', listener: (event: Event,
+ /**
+ * An array of the second instance's command line arguments
+ */
+ argv: string[],
+ /**
+ * The second instance's working directory
+ */
+ workingDirectory: string) => void): this;
+ removeListener(event: 'second-instance', listener: (event: Event,
+ /**
+ * An array of the second instance's command line arguments
+ */
+ argv: string[],
+ /**
+ * The second instance's working directory
+ */
+ workingDirectory: string) => void): this;
+ /**
+ * Emitted when a client certificate is requested. The url corresponds to the
+ * navigation entry requesting the client certificate and callback can be called
+ * with an entry filtered from the list. Using event.preventDefault() prevents the
+ * application from using the first certificate from the store.
+ */
+ on(event: 'select-client-certificate', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate?: Certificate) => void) => void): this;
+ once(event: 'select-client-certificate', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate?: Certificate) => void) => void): this;
+ addListener(event: 'select-client-certificate', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate?: Certificate) => void) => void): this;
+ removeListener(event: 'select-client-certificate', listener: (event: Event,
+ webContents: WebContents,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate?: Certificate) => void) => void): this;
+ /**
+ * Emitted when Electron has created a new session.
+ */
+ on(event: 'session-created', listener: (session: Session) => void): this;
+ once(event: 'session-created', listener: (session: Session) => void): this;
+ addListener(event: 'session-created', listener: (session: Session) => void): this;
+ removeListener(event: 'session-created', listener: (session: Session) => void): this;
+ /**
+ * Emitted when Handoff is about to be resumed on another device. If you need to
+ * update the state to be transferred, you should call event.preventDefault()
+ * immediately, construct a new userInfo dictionary and call
+ * app.updateCurrentActiviy() in a timely manner. Otherwise the operation will fail
+ * and continue-activity-error will be called.
+ */
+ on(event: 'update-activity-state', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ once(event: 'update-activity-state', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ addListener(event: 'update-activity-state', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ removeListener(event: 'update-activity-state', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string,
+ /**
+ * Contains app-specific state stored by the activity.
+ */
+ userInfo: any) => void): this;
+ /**
+ * Emitted when a new webContents is created.
+ */
+ on(event: 'web-contents-created', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ once(event: 'web-contents-created', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ addListener(event: 'web-contents-created', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ removeListener(event: 'web-contents-created', listener: (event: Event,
+ webContents: WebContents) => void): this;
+ /**
+ * Emitted during Handoff before an activity from a different device wants to be
+ * resumed. You should call event.preventDefault() if you want to handle this
+ * event.
+ */
+ on(event: 'will-continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string) => void): this;
+ once(event: 'will-continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string) => void): this;
+ addListener(event: 'will-continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string) => void): this;
+ removeListener(event: 'will-continue-activity', listener: (event: Event,
+ /**
+ * A string identifying the activity. Maps to .
+ */
+ type: string) => void): this;
+ /**
+ * Emitted when the application has finished basic startup. On Windows and Linux,
+ * the will-finish-launching event is the same as the ready event; on macOS, this
+ * event represents the applicationWillFinishLaunching notification of
+ * NSApplication. You would usually set up listeners for the open-file and open-url
+ * events here, and start the crash reporter and auto updater. In most cases, you
+ * should do everything in the ready event handler.
+ */
+ on(event: 'will-finish-launching', listener: Function): this;
+ once(event: 'will-finish-launching', listener: Function): this;
+ addListener(event: 'will-finish-launching', listener: Function): this;
+ removeListener(event: 'will-finish-launching', listener: Function): this;
+ /**
+ * Emitted when all windows have been closed and the application will quit. Calling
+ * event.preventDefault() will prevent the default behaviour, which is terminating
+ * the application. See the description of the window-all-closed event for the
+ * differences between the will-quit and window-all-closed events. Note: On
+ * Windows, this event will not be emitted if the app is closed due to a
+ * shutdown/restart of the system or a user logout.
+ */
+ on(event: 'will-quit', listener: (event: Event) => void): this;
+ once(event: 'will-quit', listener: (event: Event) => void): this;
+ addListener(event: 'will-quit', listener: (event: Event) => void): this;
+ removeListener(event: 'will-quit', listener: (event: Event) => void): this;
+ /**
+ * Emitted when all windows have been closed. If you do not subscribe to this event
+ * and all windows are closed, the default behavior is to quit the app; however, if
+ * you subscribe, you control whether the app quits or not. If the user pressed Cmd
+ * + Q, or the developer called app.quit(), Electron will first try to close all
+ * the windows and then emit the will-quit event, and in this case the
+ * window-all-closed event would not be emitted.
+ */
+ on(event: 'window-all-closed', listener: Function): this;
+ once(event: 'window-all-closed', listener: Function): this;
+ addListener(event: 'window-all-closed', listener: Function): this;
+ removeListener(event: 'window-all-closed', listener: Function): this;
+ /**
+ * Adds path to the recent documents list. This list is managed by the OS. On
+ * Windows you can visit the list from the task bar, and on macOS you can visit it
+ * from dock menu.
+ */
+ addRecentDocument(path: string): void;
+ /**
+ * Clears the recent documents list.
+ */
+ clearRecentDocuments(): void;
+ /**
+ * By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per domain
+ * basis if the GPU processes crashes too frequently. This function disables that
+ * behaviour. This method can only be called before app is ready.
+ */
+ disableDomainBlockingFor3DAPIs(): void;
+ /**
+ * Disables hardware acceleration for current app. This method can only be called
+ * before app is ready.
+ */
+ disableHardwareAcceleration(): void;
+ /**
+ * Enables mixed sandbox mode on the app. This method can only be called before app
+ * is ready.
+ */
+ enableMixedSandbox(): void;
+ /**
+ * Enables full sandbox mode on the app. This method can only be called before app
+ * is ready.
+ */
+ enableSandbox(): void;
+ /**
+ * Exits immediately with exitCode. exitCode defaults to 0. All windows will be
+ * closed immediately without asking user and the before-quit and will-quit events
+ * will not be emitted.
+ */
+ exit(exitCode?: number): void;
+ /**
+ * On Linux, focuses on the first visible window. On macOS, makes the application
+ * the active app. On Windows, focuses on the application's first window.
+ */
+ focus(): void;
+ getAppMetrics(): ProcessMetric[];
+ getAppPath(): string;
+ getBadgeCount(): number;
+ getCurrentActivityType(): string;
+ /**
+ * Fetches a path's associated icon. On Windows, there a 2 kinds of icons: On Linux
+ * and macOS, icons depend on the application associated with file mime type.
+ */
+ getFileIcon(path: string, callback: (error: Error, icon: NativeImage) => void): void;
+ /**
+ * Fetches a path's associated icon. On Windows, there a 2 kinds of icons: On Linux
+ * and macOS, icons depend on the application associated with file mime type.
+ */
+ getFileIcon(path: string, options: FileIconOptions, callback: (error: Error, icon: NativeImage) => void): void;
+ getGPUFeatureStatus(): GPUFeatureStatus;
+ /**
+ * For infoType equal to complete: Promise is fulfilled with Object containing all
+ * the GPU Information as in chromium's GPUInfo object. This includes the version
+ * and driver information that's shown on chrome://gpu page. For infoType equal to
+ * basic: Promise is fulfilled with Object containing fewer attributes than when
+ * requested with complete. Here's an example of basic response: Using basic should
+ * be preferred if only basic information like vendorId or driverId is needed.
+ */
+ getGPUInfo(infoType: string): Promise<any>;
+ getJumpListSettings(): JumpListSettings;
+ /**
+ * To set the locale, you'll want to use a command line switch at app startup,
+ * which may be found here. Note: When distributing your packaged app, you have to
+ * also ship the locales folder. Note: On Windows you have to call it after the
+ * ready events gets emitted.
+ */
+ getLocale(): string;
+ /**
+ * If you provided path and args options to app.setLoginItemSettings then you need
+ * to pass the same arguments here for openAtLogin to be set correctly.
+ */
+ getLoginItemSettings(options?: LoginItemSettingsOptions): LoginItemSettings;
+ /**
+ * Usually the name field of package.json is a short lowercased name, according to
+ * the npm modules spec. You should usually also specify a productName field, which
+ * is your application's full capitalized name, and which will be preferred over
+ * name by Electron.
+ */
+ getName(): string;
+ /**
+ * You can request the following paths by the name:
+ */
+ getPath(name: string): string;
+ getVersion(): string;
+ /**
+ * This method returns whether or not this instance of your app is currently
+ * holding the single instance lock. You can request the lock with
+ * app.requestSingleInstanceLock() and release with app.releaseSingleInstanceLock()
+ */
+ hasSingleInstanceLock(): boolean;
+ /**
+ * Hides all application windows without minimizing them.
+ */
+ hide(): void;
+ /**
+ * Imports the certificate in pkcs12 format into the platform certificate store.
+ * callback is called with the result of import operation, a value of 0 indicates
+ * success while any other value indicates failure according to Chromium
+ * net_error_list.
+ */
+ importCertificate(options: ImportCertificateOptions, callback: (result: number) => void): void;
+ /**
+ * Invalidates the current Handoff user activity.
+ */
+ invalidateCurrentActivity(type: string): void;
+ isAccessibilitySupportEnabled(): boolean;
+ /**
+ * This method checks if the current executable is the default handler for a
+ * protocol (aka URI scheme). If so, it will return true. Otherwise, it will return
+ * false. Note: On macOS, you can use this method to check if the app has been
+ * registered as the default protocol handler for a protocol. You can also verify
+ * this by checking ~/Library/Preferences/com.apple.LaunchServices.plist on the
+ * macOS machine. Please refer to Apple's documentation for details. The API uses
+ * the Windows Registry and LSCopyDefaultHandlerForURLScheme internally.
+ */
+ isDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean;
+ isInApplicationsFolder(): boolean;
+ isReady(): boolean;
+ isUnityRunning(): boolean;
+ /**
+ * No confirmation dialog will be presented by default, if you wish to allow the
+ * user to confirm the operation you may do so using the dialog API. NOTE: This
+ * method throws errors if anything other than the user causes the move to fail.
+ * For instance if the user cancels the authorization dialog this method returns
+ * false. If we fail to perform the copy then this method will throw an error. The
+ * message in the error should be informative and tell you exactly what went wrong
+ */
+ moveToApplicationsFolder(): boolean;
+ /**
+ * Try to close all windows. The before-quit event will be emitted first. If all
+ * windows are successfully closed, the will-quit event will be emitted and by
+ * default the application will terminate. This method guarantees that all
+ * beforeunload and unload event handlers are correctly executed. It is possible
+ * that a window cancels the quitting by returning false in the beforeunload event
+ * handler.
+ */
+ quit(): void;
+ /**
+ * Relaunches the app when current instance exits. By default the new instance will
+ * use the same working directory and command line arguments with current instance.
+ * When args is specified, the args will be passed as command line arguments
+ * instead. When execPath is specified, the execPath will be executed for relaunch
+ * instead of current app. Note that this method does not quit the app when
+ * executed, you have to call app.quit or app.exit after calling app.relaunch to
+ * make the app restart. When app.relaunch is called for multiple times, multiple
+ * instances will be started after current instance exited. An example of
+ * restarting current instance immediately and adding a new command line argument
+ * to the new instance:
+ */
+ relaunch(options?: RelaunchOptions): void;
+ /**
+ * Releases all locks that were created by requestSingleInstanceLock. This will
+ * allow multiple instances of the application to once again run side by side.
+ */
+ releaseSingleInstanceLock(): void;
+ /**
+ * This method checks if the current executable as the default handler for a
+ * protocol (aka URI scheme). If so, it will remove the app as the default handler.
+ */
+ removeAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean;
+ /**
+ * This method makes your application a Single Instance Application - instead of
+ * allowing multiple instances of your app to run, this will ensure that only a
+ * single instance of your app is running, and other instances signal this instance
+ * and exit. The return value of this method indicates whether or not this instance
+ * of your application successfully obtained the lock. If it failed to obtain the
+ * lock you can assume that another instance of your application is already running
+ * with the lock and exit immediately. I.e. This method returns true if your
+ * process is the primary instance of your application and your app should continue
+ * loading. It returns false if your process should immediately quit as it has
+ * sent its parameters to another instance that has already acquired the lock. On
+ * macOS the system enforces single instance automatically when users try to open a
+ * second instance of your app in Finder, and the open-file and open-url events
+ * will be emitted for that. However when users start your app in command line the
+ * system's single instance mechanism will be bypassed and you have to use this
+ * method to ensure single instance. An example of activating the window of primary
+ * instance when a second instance starts:
+ */
+ requestSingleInstanceLock(): boolean;
+ /**
+ * Set the about panel options. This will override the values defined in the app's
+ * .plist file. See the Apple docs for more details.
+ */
+ setAboutPanelOptions(options: AboutPanelOptionsOptions): void;
+ /**
+ * Manually enables Chrome's accessibility support, allowing to expose
+ * accessibility switch to users in application settings. See Chromium's
+ * accessibility docs for more details. Disabled by default. This API must be
+ * called after the ready event is emitted. Note: Rendering accessibility tree can
+ * significantly affect the performance of your app. It should not be enabled by
+ * default.
+ */
+ setAccessibilitySupportEnabled(enabled: boolean): void;
+ /**
+ * Changes the Application User Model ID to id.
+ */
+ setAppUserModelId(id: string): void;
+ /**
+ * This method sets the current executable as the default handler for a protocol
+ * (aka URI scheme). It allows you to integrate your app deeper into the operating
+ * system. Once registered, all links with your-protocol:// will be opened with the
+ * current executable. The whole link, including protocol, will be passed to your
+ * application as a parameter. On Windows you can provide optional parameters path,
+ * the path to your executable, and args, an array of arguments to be passed to
+ * your executable when it launches. Note: On macOS, you can only register
+ * protocols that have been added to your app's info.plist, which can not be
+ * modified at runtime. You can however change the file with a simple text editor
+ * or script during build time. Please refer to Apple's documentation for details.
+ * The API uses the Windows Registry and LSSetDefaultHandlerForURLScheme
+ * internally.
+ */
+ setAsDefaultProtocolClient(protocol: string, path?: string, args?: string[]): boolean;
+ /**
+ * Sets the counter badge for current app. Setting the count to 0 will hide the
+ * badge. On macOS it shows on the dock icon. On Linux it only works for Unity
+ * launcher, Note: Unity launcher requires the existence of a .desktop file to
+ * work, for more information please read Desktop Environment Integration.
+ */
+ setBadgeCount(count: number): boolean;
+ /**
+ * Sets or removes a custom Jump List for the application, and returns one of the
+ * following strings: If categories is null the previously set custom Jump List (if
+ * any) will be replaced by the standard Jump List for the app (managed by
+ * Windows). Note: If a JumpListCategory object has neither the type nor the name
+ * property set then its type is assumed to be tasks. If the name property is set
+ * but the type property is omitted then the type is assumed to be custom. Note:
+ * Users can remove items from custom categories, and Windows will not allow a
+ * removed item to be added back into a custom category until after the next
+ * successful call to app.setJumpList(categories). Any attempt to re-add a removed
+ * item to a custom category earlier than that will result in the entire custom
+ * category being omitted from the Jump List. The list of removed items can be
+ * obtained using app.getJumpListSettings(). Here's a very simple example of
+ * creating a custom Jump List:
+ */
+ setJumpList(categories: JumpListCategory[]): void;
+ /**
+ * Set the app's login item settings. To work with Electron's autoUpdater on
+ * Windows, which uses Squirrel, you'll want to set the launch path to Update.exe,
+ * and pass arguments that specify your application name. For example:
+ */
+ setLoginItemSettings(settings: Settings): void;
+ /**
+ * Overrides the current application's name.
+ */
+ setName(name: string): void;
+ /**
+ * Overrides the path to a special directory or file associated with name. If the
+ * path specifies a directory that does not exist, the directory will be created by
+ * this method. On failure an Error is thrown. You can only override paths of a
+ * name defined in app.getPath. By default, web pages' cookies and caches will be
+ * stored under the userData directory. If you want to change this location, you
+ * have to override the userData path before the ready event of the app module is
+ * emitted.
+ */
+ setPath(name: string, path: string): void;
+ /**
+ * Creates an NSUserActivity and sets it as the current activity. The activity is
+ * eligible for Handoff to another device afterward.
+ */
+ setUserActivity(type: string, userInfo: any, webpageURL?: string): void;
+ /**
+ * Adds tasks to the Tasks category of the JumpList on Windows. tasks is an array
+ * of Task objects. Note: If you'd like to customize the Jump List even more use
+ * app.setJumpList(categories) instead.
+ */
+ setUserTasks(tasks: Task[]): boolean;
+ /**
+ * Shows application windows after they were hidden. Does not automatically focus
+ * them.
+ */
+ show(): void;
+ /**
+ * Show the about panel with the values defined in the app's .plist file or with
+ * the options set via app.setAboutPanelOptions(options).
+ */
+ showAboutPanel(): void;
+ /**
+ * Start accessing a security scoped resource. With this method Electron
+ * applications that are packaged for the Mac App Store may reach outside their
+ * sandbox to access files chosen by the user. See Apple's documentation for a
+ * description of how this system works.
+ */
+ startAccessingSecurityScopedResource(bookmarkData: string): Function;
+ /**
+ * Updates the current activity if its type matches type, merging the entries from
+ * userInfo into its current userInfo dictionary.
+ */
+ updateCurrentActivity(type: string, userInfo: any): void;
+ whenReady(): Promise<void>;
+ commandLine: CommandLine;
+ dock: Dock;
+ /**
+ * A Boolean property that returns true if the app is packaged, false otherwise.
+ * For many apps, this property can be used to distinguish development and
+ * production environments.
+ */
+ isPackaged?: boolean;
+ /**
+ * A String which is the user agent string Electron will use as a global fallback.
+ * This is the user agent that will be used when no user agent is set at the
+ * webContents or session level. Useful for ensuring your entire app has the same
+ * user agent. Set to a custom value as early as possible in your apps
+ * initialization to ensure that your overridden value is used.
+ */
+ userAgentFallback?: string;
+ }
+
+ interface AutoUpdater extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/auto-updater
+
+ /**
+ * This event is emitted after a user calls quitAndInstall(). When this API is
+ * called, the before-quit event is not emitted before all windows are closed. As a
+ * result you should listen to this event if you wish to perform actions before the
+ * windows are closed while a process is quitting, as well as listening to
+ * before-quit.
+ */
+ on(event: 'before-quit-for-update', listener: Function): this;
+ once(event: 'before-quit-for-update', listener: Function): this;
+ addListener(event: 'before-quit-for-update', listener: Function): this;
+ removeListener(event: 'before-quit-for-update', listener: Function): this;
+ /**
+ * Emitted when checking if an update has started.
+ */
+ on(event: 'checking-for-update', listener: Function): this;
+ once(event: 'checking-for-update', listener: Function): this;
+ addListener(event: 'checking-for-update', listener: Function): this;
+ removeListener(event: 'checking-for-update', listener: Function): this;
+ /**
+ * Emitted when there is an error while updating.
+ */
+ on(event: 'error', listener: (error: Error) => void): this;
+ once(event: 'error', listener: (error: Error) => void): this;
+ addListener(event: 'error', listener: (error: Error) => void): this;
+ removeListener(event: 'error', listener: (error: Error) => void): this;
+ /**
+ * Emitted when there is an available update. The update is downloaded
+ * automatically.
+ */
+ on(event: 'update-available', listener: Function): this;
+ once(event: 'update-available', listener: Function): this;
+ addListener(event: 'update-available', listener: Function): this;
+ removeListener(event: 'update-available', listener: Function): this;
+ /**
+ * Emitted when an update has been downloaded. On Windows only releaseName is
+ * available. Note: It is not strictly necessary to handle this event. A
+ * successfully downloaded update will still be applied the next time the
+ * application starts.
+ */
+ on(event: 'update-downloaded', listener: (event: Event,
+ releaseNotes: string,
+ releaseName: string,
+ releaseDate: Date,
+ updateURL: string) => void): this;
+ once(event: 'update-downloaded', listener: (event: Event,
+ releaseNotes: string,
+ releaseName: string,
+ releaseDate: Date,
+ updateURL: string) => void): this;
+ addListener(event: 'update-downloaded', listener: (event: Event,
+ releaseNotes: string,
+ releaseName: string,
+ releaseDate: Date,
+ updateURL: string) => void): this;
+ removeListener(event: 'update-downloaded', listener: (event: Event,
+ releaseNotes: string,
+ releaseName: string,
+ releaseDate: Date,
+ updateURL: string) => void): this;
+ /**
+ * Emitted when there is no available update.
+ */
+ on(event: 'update-not-available', listener: Function): this;
+ once(event: 'update-not-available', listener: Function): this;
+ addListener(event: 'update-not-available', listener: Function): this;
+ removeListener(event: 'update-not-available', listener: Function): this;
+ /**
+ * Asks the server whether there is an update. You must call setFeedURL before
+ * using this API.
+ */
+ checkForUpdates(): void;
+ getFeedURL(): string;
+ /**
+ * Restarts the app and installs the update after it has been downloaded. It should
+ * only be called after update-downloaded has been emitted. Under the hood calling
+ * autoUpdater.quitAndInstall() will close all application windows first, and
+ * automatically call app.quit() after all windows have been closed. Note: It is
+ * not strictly necessary to call this function to apply an update, as a
+ * successfully downloaded update will always be applied the next time the
+ * application starts.
+ */
+ quitAndInstall(): void;
+ /**
+ * Sets the url and initialize the auto updater.
+ */
+ setFeedURL(options: FeedURLOptions): void;
+ }
+
+ interface BluetoothDevice {
+
+ // Docs: http://electronjs.org/docs/api/structures/bluetooth-device
+
+ deviceId: string;
+ deviceName: string;
+ }
+
+ class BrowserView extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/browser-view
+
+ constructor(options?: BrowserViewConstructorOptions);
+ static fromId(id: number): BrowserView;
+ static fromWebContents(webContents: WebContents): (BrowserView) | (null);
+ static getAllViews(): BrowserView[];
+ /**
+ * Force closing the view, the unload and beforeunload events won't be emitted for
+ * the web page. After you're done with a view, call this function in order to free
+ * memory and other resources as soon as possible.
+ */
+ destroy(): void;
+ isDestroyed(): boolean;
+ setAutoResize(options: AutoResizeOptions): void;
+ setBackgroundColor(color: string): void;
+ /**
+ * Resizes and moves the view to the supplied bounds relative to the window.
+ */
+ setBounds(bounds: Rectangle): void;
+ id: number;
+ webContents: WebContents;
+ }
+
+ class BrowserWindow extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/browser-window
+
+ /**
+ * Emitted when the window is set or unset to show always on top of other windows.
+ */
+ on(event: 'always-on-top-changed', listener: (event: Event,
+ isAlwaysOnTop: boolean) => void): this;
+ once(event: 'always-on-top-changed', listener: (event: Event,
+ isAlwaysOnTop: boolean) => void): this;
+ addListener(event: 'always-on-top-changed', listener: (event: Event,
+ isAlwaysOnTop: boolean) => void): this;
+ removeListener(event: 'always-on-top-changed', listener: (event: Event,
+ isAlwaysOnTop: boolean) => void): this;
+ /**
+ * Emitted when an App Command is invoked. These are typically related to keyboard
+ * media keys or browser commands, as well as the "Back" button built into some
+ * mice on Windows. Commands are lowercased, underscores are replaced with hyphens,
+ * and the APPCOMMAND_ prefix is stripped off. e.g. APPCOMMAND_BROWSER_BACKWARD is
+ * emitted as browser-backward.
+ */
+ on(event: 'app-command', listener: (event: Event,
+ command: string) => void): this;
+ once(event: 'app-command', listener: (event: Event,
+ command: string) => void): this;
+ addListener(event: 'app-command', listener: (event: Event,
+ command: string) => void): this;
+ removeListener(event: 'app-command', listener: (event: Event,
+ command: string) => void): this;
+ /**
+ * Emitted when the window loses focus.
+ */
+ on(event: 'blur', listener: Function): this;
+ once(event: 'blur', listener: Function): this;
+ addListener(event: 'blur', listener: Function): this;
+ removeListener(event: 'blur', listener: Function): this;
+ /**
+ * Emitted when the window is going to be closed. It's emitted before the
+ * beforeunload and unload event of the DOM. Calling event.preventDefault() will
+ * cancel the close. Usually you would want to use the beforeunload handler to
+ * decide whether the window should be closed, which will also be called when the
+ * window is reloaded. In Electron, returning any value other than undefined would
+ * cancel the close. For example: Note: There is a subtle difference between the
+ * behaviors of window.onbeforeunload = handler and
+ * window.addEventListener('beforeunload', handler). It is recommended to always
+ * set the event.returnValue explicitly, instead of only returning a value, as the
+ * former works more consistently within Electron.
+ */
+ on(event: 'close', listener: (event: Event) => void): this;
+ once(event: 'close', listener: (event: Event) => void): this;
+ addListener(event: 'close', listener: (event: Event) => void): this;
+ removeListener(event: 'close', listener: (event: Event) => void): this;
+ /**
+ * Emitted when the window is closed. After you have received this event you should
+ * remove the reference to the window and avoid using it any more.
+ */
+ on(event: 'closed', listener: Function): this;
+ once(event: 'closed', listener: Function): this;
+ addListener(event: 'closed', listener: Function): this;
+ removeListener(event: 'closed', listener: Function): this;
+ /**
+ * Emitted when the window enters a full-screen state.
+ */
+ on(event: 'enter-full-screen', listener: Function): this;
+ once(event: 'enter-full-screen', listener: Function): this;
+ addListener(event: 'enter-full-screen', listener: Function): this;
+ removeListener(event: 'enter-full-screen', listener: Function): this;
+ /**
+ * Emitted when the window enters a full-screen state triggered by HTML API.
+ */
+ on(event: 'enter-html-full-screen', listener: Function): this;
+ once(event: 'enter-html-full-screen', listener: Function): this;
+ addListener(event: 'enter-html-full-screen', listener: Function): this;
+ removeListener(event: 'enter-html-full-screen', listener: Function): this;
+ /**
+ * Emitted when the window gains focus.
+ */
+ on(event: 'focus', listener: Function): this;
+ once(event: 'focus', listener: Function): this;
+ addListener(event: 'focus', listener: Function): this;
+ removeListener(event: 'focus', listener: Function): this;
+ /**
+ * Emitted when the window is hidden.
+ */
+ on(event: 'hide', listener: Function): this;
+ once(event: 'hide', listener: Function): this;
+ addListener(event: 'hide', listener: Function): this;
+ removeListener(event: 'hide', listener: Function): this;
+ /**
+ * Emitted when the window leaves a full-screen state.
+ */
+ on(event: 'leave-full-screen', listener: Function): this;
+ once(event: 'leave-full-screen', listener: Function): this;
+ addListener(event: 'leave-full-screen', listener: Function): this;
+ removeListener(event: 'leave-full-screen', listener: Function): this;
+ /**
+ * Emitted when the window leaves a full-screen state triggered by HTML API.
+ */
+ on(event: 'leave-html-full-screen', listener: Function): this;
+ once(event: 'leave-html-full-screen', listener: Function): this;
+ addListener(event: 'leave-html-full-screen', listener: Function): this;
+ removeListener(event: 'leave-html-full-screen', listener: Function): this;
+ /**
+ * Emitted when window is maximized.
+ */
+ on(event: 'maximize', listener: Function): this;
+ once(event: 'maximize', listener: Function): this;
+ addListener(event: 'maximize', listener: Function): this;
+ removeListener(event: 'maximize', listener: Function): this;
+ /**
+ * Emitted when the window is minimized.
+ */
+ on(event: 'minimize', listener: Function): this;
+ once(event: 'minimize', listener: Function): this;
+ addListener(event: 'minimize', listener: Function): this;
+ removeListener(event: 'minimize', listener: Function): this;
+ /**
+ * Emitted when the window is being moved to a new position. Note: On macOS this
+ * event is an alias of moved.
+ */
+ on(event: 'move', listener: Function): this;
+ once(event: 'move', listener: Function): this;
+ addListener(event: 'move', listener: Function): this;
+ removeListener(event: 'move', listener: Function): this;
+ /**
+ * Emitted once when the window is moved to a new position.
+ */
+ on(event: 'moved', listener: Function): this;
+ once(event: 'moved', listener: Function): this;
+ addListener(event: 'moved', listener: Function): this;
+ removeListener(event: 'moved', listener: Function): this;
+ /**
+ * Emitted when the native new tab button is clicked.
+ */
+ on(event: 'new-window-for-tab', listener: Function): this;
+ once(event: 'new-window-for-tab', listener: Function): this;
+ addListener(event: 'new-window-for-tab', listener: Function): this;
+ removeListener(event: 'new-window-for-tab', listener: Function): this;
+ /**
+ * Emitted when the document changed its title, calling event.preventDefault() will
+ * prevent the native window's title from changing. explicitSet is false when title
+ * is synthesized from file url.
+ */
+ on(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ once(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ addListener(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ removeListener(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ /**
+ * Emitted when the web page has been rendered (while not being shown) and window
+ * can be displayed without a visual flash.
+ */
+ on(event: 'ready-to-show', listener: Function): this;
+ once(event: 'ready-to-show', listener: Function): this;
+ addListener(event: 'ready-to-show', listener: Function): this;
+ removeListener(event: 'ready-to-show', listener: Function): this;
+ /**
+ * Emitted after the window has been resized.
+ */
+ on(event: 'resize', listener: Function): this;
+ once(event: 'resize', listener: Function): this;
+ addListener(event: 'resize', listener: Function): this;
+ removeListener(event: 'resize', listener: Function): this;
+ /**
+ * Emitted when the unresponsive web page becomes responsive again.
+ */
+ on(event: 'responsive', listener: Function): this;
+ once(event: 'responsive', listener: Function): this;
+ addListener(event: 'responsive', listener: Function): this;
+ removeListener(event: 'responsive', listener: Function): this;
+ /**
+ * Emitted when the window is restored from a minimized state.
+ */
+ on(event: 'restore', listener: Function): this;
+ once(event: 'restore', listener: Function): this;
+ addListener(event: 'restore', listener: Function): this;
+ removeListener(event: 'restore', listener: Function): this;
+ /**
+ * Emitted when scroll wheel event phase has begun.
+ */
+ on(event: 'scroll-touch-begin', listener: Function): this;
+ once(event: 'scroll-touch-begin', listener: Function): this;
+ addListener(event: 'scroll-touch-begin', listener: Function): this;
+ removeListener(event: 'scroll-touch-begin', listener: Function): this;
+ /**
+ * Emitted when scroll wheel event phase filed upon reaching the edge of element.
+ */
+ on(event: 'scroll-touch-edge', listener: Function): this;
+ once(event: 'scroll-touch-edge', listener: Function): this;
+ addListener(event: 'scroll-touch-edge', listener: Function): this;
+ removeListener(event: 'scroll-touch-edge', listener: Function): this;
+ /**
+ * Emitted when scroll wheel event phase has ended.
+ */
+ on(event: 'scroll-touch-end', listener: Function): this;
+ once(event: 'scroll-touch-end', listener: Function): this;
+ addListener(event: 'scroll-touch-end', listener: Function): this;
+ removeListener(event: 'scroll-touch-end', listener: Function): this;
+ /**
+ * Emitted when window session is going to end due to force shutdown or machine
+ * restart or session log off.
+ */
+ on(event: 'session-end', listener: Function): this;
+ once(event: 'session-end', listener: Function): this;
+ addListener(event: 'session-end', listener: Function): this;
+ removeListener(event: 'session-end', listener: Function): this;
+ /**
+ * Emitted when the window opens a sheet.
+ */
+ on(event: 'sheet-begin', listener: Function): this;
+ once(event: 'sheet-begin', listener: Function): this;
+ addListener(event: 'sheet-begin', listener: Function): this;
+ removeListener(event: 'sheet-begin', listener: Function): this;
+ /**
+ * Emitted when the window has closed a sheet.
+ */
+ on(event: 'sheet-end', listener: Function): this;
+ once(event: 'sheet-end', listener: Function): this;
+ addListener(event: 'sheet-end', listener: Function): this;
+ removeListener(event: 'sheet-end', listener: Function): this;
+ /**
+ * Emitted when the window is shown.
+ */
+ on(event: 'show', listener: Function): this;
+ once(event: 'show', listener: Function): this;
+ addListener(event: 'show', listener: Function): this;
+ removeListener(event: 'show', listener: Function): this;
+ /**
+ * Emitted on 3-finger swipe. Possible directions are up, right, down, left.
+ */
+ on(event: 'swipe', listener: (event: Event,
+ direction: string) => void): this;
+ once(event: 'swipe', listener: (event: Event,
+ direction: string) => void): this;
+ addListener(event: 'swipe', listener: (event: Event,
+ direction: string) => void): this;
+ removeListener(event: 'swipe', listener: (event: Event,
+ direction: string) => void): this;
+ /**
+ * Emitted when the window exits from a maximized state.
+ */
+ on(event: 'unmaximize', listener: Function): this;
+ once(event: 'unmaximize', listener: Function): this;
+ addListener(event: 'unmaximize', listener: Function): this;
+ removeListener(event: 'unmaximize', listener: Function): this;
+ /**
+ * Emitted when the web page becomes unresponsive.
+ */
+ on(event: 'unresponsive', listener: Function): this;
+ once(event: 'unresponsive', listener: Function): this;
+ addListener(event: 'unresponsive', listener: Function): this;
+ removeListener(event: 'unresponsive', listener: Function): this;
+ /**
+ * Emitted before the window is moved. Calling event.preventDefault() will prevent
+ * the window from being moved. Note that this is only emitted when the window is
+ * being resized manually. Resizing the window with setBounds/setSize will not emit
+ * this event.
+ */
+ on(event: 'will-move', listener: (event: Event,
+ /**
+ * ` Location the window is being moved to.
+ */
+ newBounds: Rectangle) => void): this;
+ once(event: 'will-move', listener: (event: Event,
+ /**
+ * ` Location the window is being moved to.
+ */
+ newBounds: Rectangle) => void): this;
+ addListener(event: 'will-move', listener: (event: Event,
+ /**
+ * ` Location the window is being moved to.
+ */
+ newBounds: Rectangle) => void): this;
+ removeListener(event: 'will-move', listener: (event: Event,
+ /**
+ * ` Location the window is being moved to.
+ */
+ newBounds: Rectangle) => void): this;
+ /**
+ * Emitted before the window is resized. Calling event.preventDefault() will
+ * prevent the window from being resized. Note that this is only emitted when the
+ * window is being resized manually. Resizing the window with setBounds/setSize
+ * will not emit this event.
+ */
+ on(event: 'will-resize', listener: (event: Event,
+ /**
+ * ` Size the window is being resized to.
+ */
+ newBounds: Rectangle) => void): this;
+ once(event: 'will-resize', listener: (event: Event,
+ /**
+ * ` Size the window is being resized to.
+ */
+ newBounds: Rectangle) => void): this;
+ addListener(event: 'will-resize', listener: (event: Event,
+ /**
+ * ` Size the window is being resized to.
+ */
+ newBounds: Rectangle) => void): this;
+ removeListener(event: 'will-resize', listener: (event: Event,
+ /**
+ * ` Size the window is being resized to.
+ */
+ newBounds: Rectangle) => void): this;
+ constructor(options?: BrowserWindowConstructorOptions);
+ /**
+ * Adds DevTools extension located at path, and returns extension's name. The
+ * extension will be remembered so you only need to call this API once, this API is
+ * not for programming use. If you try to add an extension that has already been
+ * loaded, this method will not return and instead log a warning to the console.
+ * The method will also not return if the extension's manifest is missing or
+ * incomplete. Note: This API cannot be called before the ready event of the app
+ * module is emitted.
+ */
+ static addDevToolsExtension(path: string): void;
+ /**
+ * Adds Chrome extension located at path, and returns extension's name. The method
+ * will also not return if the extension's manifest is missing or incomplete. Note:
+ * This API cannot be called before the ready event of the app module is emitted.
+ */
+ static addExtension(path: string): void;
+ static fromBrowserView(browserView: BrowserView): (BrowserWindow) | (null);
+ static fromId(id: number): BrowserWindow;
+ static fromWebContents(webContents: WebContents): BrowserWindow;
+ static getAllWindows(): BrowserWindow[];
+ /**
+ * To check if a DevTools extension is installed you can run the following: Note:
+ * This API cannot be called before the ready event of the app module is emitted.
+ */
+ static getDevToolsExtensions(): DevToolsExtensions;
+ /**
+ * Note: This API cannot be called before the ready event of the app module is
+ * emitted.
+ */
+ static getExtensions(): Extensions;
+ static getFocusedWindow(): (BrowserWindow) | (null);
+ /**
+ * Remove a DevTools extension by name. Note: This API cannot be called before the
+ * ready event of the app module is emitted.
+ */
+ static removeDevToolsExtension(name: string): void;
+ /**
+ * Remove a Chrome extension by name. Note: This API cannot be called before the
+ * ready event of the app module is emitted.
+ */
+ static removeExtension(name: string): void;
+ /**
+ * Adds a window as a tab on this window, after the tab for the window instance.
+ */
+ addTabbedWindow(browserWindow: BrowserWindow): void;
+ /**
+ * Removes focus from the window.
+ */
+ blur(): void;
+ blurWebView(): void;
+ /**
+ * Same as webContents.capturePage([rect, ]callback).
+ */
+ capturePage(callback: (image: NativeImage) => void): void;
+ /**
+ * Same as webContents.capturePage([rect, ]callback).
+ */
+ capturePage(rect: Rectangle, callback: (image: NativeImage) => void): void;
+ /**
+ * Moves window to the center of the screen.
+ */
+ center(): void;
+ /**
+ * Try to close the window. This has the same effect as a user manually clicking
+ * the close button of the window. The web page may cancel the close though. See
+ * the close event.
+ */
+ close(): void;
+ /**
+ * Closes the currently open Quick Look panel.
+ */
+ closeFilePreview(): void;
+ /**
+ * Force closing the window, the unload and beforeunload event won't be emitted for
+ * the web page, and close event will also not be emitted for this window, but it
+ * guarantees the closed event will be emitted.
+ */
+ destroy(): void;
+ /**
+ * Starts or stops flashing the window to attract user's attention.
+ */
+ flashFrame(flag: boolean): void;
+ /**
+ * Focuses on the window.
+ */
+ focus(): void;
+ focusOnWebView(): void;
+ getBounds(): Rectangle;
+ /**
+ * Note: The BrowserView API is currently experimental and may change or be removed
+ * in future Electron releases.
+ */
+ getBrowserView(): (BrowserView) | (null);
+ getChildWindows(): BrowserWindow[];
+ getContentBounds(): Rectangle;
+ getContentSize(): number[];
+ getMaximumSize(): number[];
+ getMinimumSize(): number[];
+ /**
+ * The native type of the handle is HWND on Windows, NSView* on macOS, and Window
+ * (unsigned long) on Linux.
+ */
+ getNativeWindowHandle(): Buffer;
+ /**
+ * Note: whatever the current state of the window : maximized, minimized or in
+ * fullscreen, this function always returns the position and size of the window in
+ * normal state. In normal state, getBounds and getNormalBounds returns the same
+ * Rectangle.
+ */
+ getNormalBounds(): Rectangle;
+ getOpacity(): number;
+ getParentWindow(): BrowserWindow;
+ getPosition(): number[];
+ getRepresentedFilename(): string;
+ getSize(): number[];
+ /**
+ * Note: The title of web page can be different from the title of the native
+ * window.
+ */
+ getTitle(): string;
+ /**
+ * On Windows and Linux always returns true.
+ */
+ hasShadow(): boolean;
+ /**
+ * Hides the window.
+ */
+ hide(): void;
+ /**
+ * Hooks a windows message. The callback is called when the message is received in
+ * the WndProc.
+ */
+ hookWindowMessage(message: number, callback: Function): void;
+ isAlwaysOnTop(): boolean;
+ /**
+ * On Linux always returns true.
+ */
+ isClosable(): boolean;
+ isDestroyed(): boolean;
+ isDocumentEdited(): boolean;
+ isFocused(): boolean;
+ isFullScreen(): boolean;
+ isFullScreenable(): boolean;
+ isKiosk(): boolean;
+ /**
+ * On Linux always returns true.
+ */
+ isMaximizable(): boolean;
+ isMaximized(): boolean;
+ isMenuBarAutoHide(): boolean;
+ isMenuBarVisible(): boolean;
+ /**
+ * On Linux always returns true.
+ */
+ isMinimizable(): boolean;
+ isMinimized(): boolean;
+ isModal(): boolean;
+ /**
+ * On Linux always returns true.
+ */
+ isMovable(): boolean;
+ isNormal(): boolean;
+ isResizable(): boolean;
+ isSimpleFullScreen(): boolean;
+ isVisible(): boolean;
+ /**
+ * Note: This API always returns false on Windows.
+ */
+ isVisibleOnAllWorkspaces(): boolean;
+ isWindowMessageHooked(message: number): boolean;
+ /**
+ * Same as webContents.loadFile, filePath should be a path to an HTML file relative
+ * to the root of your application. See the webContents docs for more information.
+ */
+ loadFile(filePath: string, options?: LoadFileOptions): void;
+ /**
+ * Same as webContents.loadURL(url[, options]). The url can be a remote address
+ * (e.g. http://) or a path to a local HTML file using the file:// protocol. To
+ * ensure that file URLs are properly formatted, it is recommended to use Node's
+ * url.format method: You can load a URL using a POST request with URL-encoded data
+ * by doing the following:
+ */
+ loadURL(url: string, options?: LoadURLOptions): void;
+ /**
+ * Maximizes the window. This will also show (but not focus) the window if it isn't
+ * being displayed already.
+ */
+ maximize(): void;
+ /**
+ * Merges all windows into one window with multiple tabs when native tabs are
+ * enabled and there is more than one open window.
+ */
+ mergeAllWindows(): void;
+ /**
+ * Minimizes the window. On some platforms the minimized window will be shown in
+ * the Dock.
+ */
+ minimize(): void;
+ /**
+ * Moves the current tab into a new window if native tabs are enabled and there is
+ * more than one tab in the current window.
+ */
+ moveTabToNewWindow(): void;
+ /**
+ * Moves window to top(z-order) regardless of focus
+ */
+ moveTop(): void;
+ /**
+ * Uses Quick Look to preview a file at a given path.
+ */
+ previewFile(path: string, displayName?: string): void;
+ /**
+ * Same as webContents.reload.
+ */
+ reload(): void;
+ /**
+ * Restores the window from minimized state to its previous state.
+ */
+ restore(): void;
+ /**
+ * Selects the next tab when native tabs are enabled and there are other tabs in
+ * the window.
+ */
+ selectNextTab(): void;
+ /**
+ * Selects the previous tab when native tabs are enabled and there are other tabs
+ * in the window.
+ */
+ selectPreviousTab(): void;
+ /**
+ * Sets whether the window should show always on top of other windows. After
+ * setting this, the window is still a normal window, not a toolbox window which
+ * can not be focused on.
+ */
+ setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
+ /**
+ * Sets the properties for the window's taskbar button. Note: relaunchCommand and
+ * relaunchDisplayName must always be set together. If one of those properties is
+ * not set, then neither will be used.
+ */
+ setAppDetails(options: AppDetailsOptions): void;
+ /**
+ * This will make a window maintain an aspect ratio. The extra size allows a
+ * developer to have space, specified in pixels, not included within the aspect
+ * ratio calculations. This API already takes into account the difference between a
+ * window's size and its content size. Consider a normal window with an HD video
+ * player and associated controls. Perhaps there are 15 pixels of controls on the
+ * left edge, 25 pixels of controls on the right edge and 50 pixels of controls
+ * below the player. In order to maintain a 16:9 aspect ratio (standard aspect
+ * ratio for HD @1920x1080) within the player itself we would call this function
+ * with arguments of 16/9 and [ 40, 50 ]. The second argument doesn't care where
+ * the extra width and height are within the content view--only that they exist.
+ * Sum any extra width and height areas you have within the overall content view.
+ * Calling this function with a value of 0 will remove any previously set aspect
+ * ratios.
+ */
+ setAspectRatio(aspectRatio: number, extraSize: Size): void;
+ /**
+ * Controls whether to hide cursor when typing.
+ */
+ setAutoHideCursor(autoHide: boolean): void;
+ /**
+ * Sets whether the window menu bar should hide itself automatically. Once set the
+ * menu bar will only show when users press the single Alt key. If the menu bar is
+ * already visible, calling setAutoHideMenuBar(true) won't hide it immediately.
+ */
+ setAutoHideMenuBar(hide: boolean): void;
+ /**
+ * Sets the background color of the window. See Setting backgroundColor.
+ */
+ setBackgroundColor(backgroundColor: string): void;
+ /**
+ * Resizes and moves the window to the supplied bounds. Any properties that are not
+ * supplied will default to their current values.
+ */
+ setBounds(bounds: Rectangle, animate?: boolean): void;
+ setBrowserView(browserView: BrowserView): void;
+ /**
+ * Sets whether the window can be manually closed by user. On Linux does nothing.
+ */
+ setClosable(closable: boolean): void;
+ /**
+ * Resizes and moves the window's client area (e.g. the web page) to the supplied
+ * bounds.
+ */
+ setContentBounds(bounds: Rectangle, animate?: boolean): void;
+ /**
+ * Prevents the window contents from being captured by other apps. On macOS it sets
+ * the NSWindow's sharingType to NSWindowSharingNone. On Windows it calls
+ * SetWindowDisplayAffinity with WDA_MONITOR.
+ */
+ setContentProtection(enable: boolean): void;
+ /**
+ * Resizes the window's client area (e.g. the web page) to width and height.
+ */
+ setContentSize(width: number, height: number, animate?: boolean): void;
+ /**
+ * Specifies whether the window’s document has been edited, and the icon in title
+ * bar will become gray when set to true.
+ */
+ setDocumentEdited(edited: boolean): void;
+ /**
+ * Disable or enable the window.
+ */
+ setEnabled(enable: boolean): void;
+ /**
+ * Changes whether the window can be focused.
+ */
+ setFocusable(focusable: boolean): void;
+ /**
+ * Sets whether the window should be in fullscreen mode.
+ */
+ setFullScreen(flag: boolean): void;
+ /**
+ * Sets whether the maximize/zoom window button toggles fullscreen mode or
+ * maximizes the window.
+ */
+ setFullScreenable(fullscreenable: boolean): void;
+ /**
+ * Sets whether the window should have a shadow. On Windows and Linux does nothing.
+ */
+ setHasShadow(hasShadow: boolean): void;
+ /**
+ * Changes window icon.
+ */
+ setIcon(icon: NativeImage): void;
+ /**
+ * Makes the window ignore all mouse events. All mouse events happened in this
+ * window will be passed to the window below this window, but if this window has
+ * focus, it will still receive keyboard events.
+ */
+ setIgnoreMouseEvents(ignore: boolean, options?: IgnoreMouseEventsOptions): void;
+ /**
+ * Enters or leaves the kiosk mode.
+ */
+ setKiosk(flag: boolean): void;
+ /**
+ * Sets whether the window can be manually maximized by user. On Linux does
+ * nothing.
+ */
+ setMaximizable(maximizable: boolean): void;
+ /**
+ * Sets the maximum size of window to width and height.
+ */
+ setMaximumSize(width: number, height: number): void;
+ /**
+ * Sets the menu as the window's menu bar, setting it to null will remove the menu
+ * bar.
+ */
+ setMenu(menu: (Menu) | (null)): void;
+ /**
+ * Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
+ * can still bring up the menu bar by pressing the single Alt key.
+ */
+ setMenuBarVisibility(visible: boolean): void;
+ /**
+ * Sets whether the window can be manually minimized by user. On Linux does
+ * nothing.
+ */
+ setMinimizable(minimizable: boolean): void;
+ /**
+ * Sets the minimum size of window to width and height.
+ */
+ setMinimumSize(width: number, height: number): void;
+ /**
+ * Sets whether the window can be moved by user. On Linux does nothing.
+ */
+ setMovable(movable: boolean): void;
+ /**
+ * Sets the opacity of the window. On Linux does nothing.
+ */
+ setOpacity(opacity: number): void;
+ /**
+ * Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to
+ * convey some sort of application status or to passively notify the user.
+ */
+ setOverlayIcon(overlay: (NativeImage) | (null), description: string): void;
+ /**
+ * Sets parent as current window's parent window, passing null will turn current
+ * window into a top-level window.
+ */
+ setParentWindow(parent: BrowserWindow): void;
+ /**
+ * Moves window to x and y.
+ */
+ setPosition(x: number, y: number, animate?: boolean): void;
+ /**
+ * Sets progress value in progress bar. Valid range is [0, 1.0]. Remove progress
+ * bar when progress < 0; Change to indeterminate mode when progress > 1. On Linux
+ * platform, only supports Unity desktop environment, you need to specify the
+ * *.desktop file name to desktopName field in package.json. By default, it will
+ * assume app.getName().desktop. On Windows, a mode can be passed. Accepted values
+ * are none, normal, indeterminate, error, and paused. If you call setProgressBar
+ * without a mode set (but with a value within the valid range), normal will be
+ * assumed.
+ */
+ setProgressBar(progress: number, options?: ProgressBarOptions): void;
+ /**
+ * Sets the pathname of the file the window represents, and the icon of the file
+ * will show in window's title bar.
+ */
+ setRepresentedFilename(filename: string): void;
+ /**
+ * Sets whether the window can be manually resized by user.
+ */
+ setResizable(resizable: boolean): void;
+ /**
+ * Setting a window shape determines the area within the window where the system
+ * permits drawing and user interaction. Outside of the given region, no pixels
+ * will be drawn and no mouse events will be registered. Mouse events outside of
+ * the region will not be received by that window, but will fall through to
+ * whatever is behind the window.
+ */
+ setShape(rects: Rectangle[]): void;
+ /**
+ * Changes the attachment point for sheets on macOS. By default, sheets are
+ * attached just below the window frame, but you may want to display them beneath a
+ * HTML-rendered toolbar. For example:
+ */
+ setSheetOffset(offsetY: number, offsetX?: number): void;
+ /**
+ * Enters or leaves simple fullscreen mode. Simple fullscreen mode emulates the
+ * native fullscreen behavior found in versions of Mac OS X prior to Lion (10.7).
+ */
+ setSimpleFullScreen(flag: boolean): void;
+ /**
+ * Resizes the window to width and height. If width or height are below any set
+ * minimum size constraints the window will snap to its minimum size.
+ */
+ setSize(width: number, height: number, animate?: boolean): void;
+ /**
+ * Makes the window not show in the taskbar.
+ */
+ setSkipTaskbar(skip: boolean): void;
+ /**
+ * Add a thumbnail toolbar with a specified set of buttons to the thumbnail image
+ * of a window in a taskbar button layout. Returns a Boolean object indicates
+ * whether the thumbnail has been added successfully. The number of buttons in
+ * thumbnail toolbar should be no greater than 7 due to the limited room. Once you
+ * setup the thumbnail toolbar, the toolbar cannot be removed due to the platform's
+ * limitation. But you can call the API with an empty array to clean the buttons.
+ * The buttons is an array of Button objects: The flags is an array that can
+ * include following Strings:
+ */
+ setThumbarButtons(buttons: ThumbarButton[]): boolean;
+ /**
+ * Sets the region of the window to show as the thumbnail image displayed when
+ * hovering over the window in the taskbar. You can reset the thumbnail to be the
+ * entire window by specifying an empty region: { x: 0, y: 0, width: 0, height: 0
+ * }.
+ */
+ setThumbnailClip(region: Rectangle): void;
+ /**
+ * Sets the toolTip that is displayed when hovering over the window thumbnail in
+ * the taskbar.
+ */
+ setThumbnailToolTip(toolTip: string): void;
+ /**
+ * Changes the title of native window to title.
+ */
+ setTitle(title: string): void;
+ /**
+ * Sets the touchBar layout for the current window. Specifying null or undefined
+ * clears the touch bar. This method only has an effect if the machine has a touch
+ * bar and is running on macOS 10.12.1+. Note: The TouchBar API is currently
+ * experimental and may change or be removed in future Electron releases.
+ */
+ setTouchBar(touchBar: TouchBar): void;
+ /**
+ * Adds a vibrancy effect to the browser window. Passing null or an empty string
+ * will remove the vibrancy effect on the window.
+ */
+ setVibrancy(type: 'appearance-based' | 'light' | 'dark' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'medium-light' | 'ultra-dark'): void;
+ /**
+ * Sets whether the window should be visible on all workspaces. Note: This API does
+ * nothing on Windows.
+ */
+ setVisibleOnAllWorkspaces(visible: boolean, options?: VisibleOnAllWorkspacesOptions): void;
+ /**
+ * Sets whether the window traffic light buttons should be visible. This cannot be
+ * called when titleBarStyle is set to customButtonsOnHover.
+ */
+ setWindowButtonVisibility(visible: boolean): void;
+ /**
+ * Shows and gives focus to the window.
+ */
+ show(): void;
+ /**
+ * Same as webContents.showDefinitionForSelection().
+ */
+ showDefinitionForSelection(): void;
+ /**
+ * Shows the window but doesn't focus on it.
+ */
+ showInactive(): void;
+ /**
+ * Toggles the visibility of the tab bar if native tabs are enabled and there is
+ * only one tab in the current window.
+ */
+ toggleTabBar(): void;
+ /**
+ * Unhooks all of the window messages.
+ */
+ unhookAllWindowMessages(): void;
+ /**
+ * Unhook the window message.
+ */
+ unhookWindowMessage(message: number): void;
+ /**
+ * Unmaximizes the window.
+ */
+ unmaximize(): void;
+ id: number;
+ webContents: WebContents;
+ }
+
+ class BrowserWindowProxy extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/browser-window-proxy
+
+ /**
+ * Removes focus from the child window.
+ */
+ blur(): void;
+ /**
+ * Forcefully closes the child window without calling its unload event.
+ */
+ close(): void;
+ /**
+ * Evaluates the code in the child window.
+ */
+ eval(code: string): void;
+ /**
+ * Focuses the child window (brings the window to front).
+ */
+ focus(): void;
+ /**
+ * Sends a message to the child window with the specified origin or * for no origin
+ * preference. In addition to these methods, the child window implements
+ * window.opener object with no properties and a single method.
+ */
+ postMessage(message: string, targetOrigin: string): void;
+ /**
+ * Invokes the print dialog on the child window.
+ */
+ print(): void;
+ closed: boolean;
+ }
+
+ interface Certificate {
+
+ // Docs: http://electronjs.org/docs/api/structures/certificate
+
+ /**
+ * PEM encoded data
+ */
+ data: string;
+ /**
+ * Fingerprint of the certificate
+ */
+ fingerprint: string;
+ /**
+ * Issuer principal
+ */
+ issuer: CertificatePrincipal;
+ /**
+ * Issuer certificate (if not self-signed)
+ */
+ issuerCert: Certificate;
+ /**
+ * Issuer's Common Name
+ */
+ issuerName: string;
+ /**
+ * Hex value represented string
+ */
+ serialNumber: string;
+ /**
+ * Subject principal
+ */
+ subject: CertificatePrincipal;
+ /**
+ * Subject's Common Name
+ */
+ subjectName: string;
+ /**
+ * End date of the certificate being valid in seconds
+ */
+ validExpiry: number;
+ /**
+ * Start date of the certificate being valid in seconds
+ */
+ validStart: number;
+ }
+
+ interface CertificatePrincipal {
+
+ // Docs: http://electronjs.org/docs/api/structures/certificate-principal
+
+ /**
+ * Common Name.
+ */
+ commonName: string;
+ /**
+ * Country or region.
+ */
+ country: string;
+ /**
+ * Locality.
+ */
+ locality: string;
+ /**
+ * Organization names.
+ */
+ organizations: string[];
+ /**
+ * Organization Unit names.
+ */
+ organizationUnits: string[];
+ /**
+ * State or province.
+ */
+ state: string;
+ }
+
+ class ClientRequest extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/client-request
+
+ /**
+ * Emitted when the request is aborted. The abort event will not be fired if the
+ * request is already closed.
+ */
+ on(event: 'abort', listener: Function): this;
+ once(event: 'abort', listener: Function): this;
+ addListener(event: 'abort', listener: Function): this;
+ removeListener(event: 'abort', listener: Function): this;
+ /**
+ * Emitted as the last event in the HTTP request-response transaction. The close
+ * event indicates that no more events will be emitted on either the request or
+ * response objects.
+ */
+ on(event: 'close', listener: Function): this;
+ once(event: 'close', listener: Function): this;
+ addListener(event: 'close', listener: Function): this;
+ removeListener(event: 'close', listener: Function): this;
+ /**
+ * Emitted when the net module fails to issue a network request. Typically when the
+ * request object emits an error event, a close event will subsequently follow and
+ * no response object will be provided.
+ */
+ on(event: 'error', listener: (
+ /**
+ * an error object providing some information about the failure.
+ */
+ error: Error) => void): this;
+ once(event: 'error', listener: (
+ /**
+ * an error object providing some information about the failure.
+ */
+ error: Error) => void): this;
+ addListener(event: 'error', listener: (
+ /**
+ * an error object providing some information about the failure.
+ */
+ error: Error) => void): this;
+ removeListener(event: 'error', listener: (
+ /**
+ * an error object providing some information about the failure.
+ */
+ error: Error) => void): this;
+ /**
+ * Emitted just after the last chunk of the request's data has been written into
+ * the request object.
+ */
+ on(event: 'finish', listener: Function): this;
+ once(event: 'finish', listener: Function): this;
+ addListener(event: 'finish', listener: Function): this;
+ removeListener(event: 'finish', listener: Function): this;
+ /**
+ * Emitted when an authenticating proxy is asking for user credentials. The
+ * callback function is expected to be called back with user credentials: Providing
+ * empty credentials will cancel the request and report an authentication error on
+ * the response object:
+ */
+ on(event: 'login', listener: (authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ once(event: 'login', listener: (authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ addListener(event: 'login', listener: (authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ removeListener(event: 'login', listener: (authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ /**
+ * Emitted when there is redirection and the mode is manual. Calling
+ * request.followRedirect will continue with the redirection.
+ */
+ on(event: 'redirect', listener: (statusCode: number,
+ method: string,
+ redirectUrl: string,
+ responseHeaders: any) => void): this;
+ once(event: 'redirect', listener: (statusCode: number,
+ method: string,
+ redirectUrl: string,
+ responseHeaders: any) => void): this;
+ addListener(event: 'redirect', listener: (statusCode: number,
+ method: string,
+ redirectUrl: string,
+ responseHeaders: any) => void): this;
+ removeListener(event: 'redirect', listener: (statusCode: number,
+ method: string,
+ redirectUrl: string,
+ responseHeaders: any) => void): this;
+ on(event: 'response', listener: (
+ /**
+ * An object representing the HTTP response message.
+ */
+ response: IncomingMessage) => void): this;
+ once(event: 'response', listener: (
+ /**
+ * An object representing the HTTP response message.
+ */
+ response: IncomingMessage) => void): this;
+ addListener(event: 'response', listener: (
+ /**
+ * An object representing the HTTP response message.
+ */
+ response: IncomingMessage) => void): this;
+ removeListener(event: 'response', listener: (
+ /**
+ * An object representing the HTTP response message.
+ */
+ response: IncomingMessage) => void): this;
+ constructor(options: 'method' | 'url' | 'session' | 'partition' | 'protocol' | 'host' | 'hostname' | 'port' | 'path' | 'redirect');
+ /**
+ * Cancels an ongoing HTTP transaction. If the request has already emitted the
+ * close event, the abort operation will have no effect. Otherwise an ongoing event
+ * will emit abort and close events. Additionally, if there is an ongoing response
+ * object,it will emit the aborted event.
+ */
+ abort(): void;
+ /**
+ * Sends the last chunk of the request data. Subsequent write or end operations
+ * will not be allowed. The finish event is emitted just after the end operation.
+ */
+ end(chunk?: (string) | (Buffer), encoding?: string, callback?: Function): void;
+ /**
+ * Continues any deferred redirection request when the redirection mode is manual.
+ */
+ followRedirect(): void;
+ getHeader(name: string): Header;
+ /**
+ * You can use this method in conjunction with POST requests to get the progress of
+ * a file upload or other data transfer.
+ */
+ getUploadProgress(): UploadProgress;
+ /**
+ * Removes a previously set extra header name. This method can be called only
+ * before first write. Trying to call it after the first write will throw an error.
+ */
+ removeHeader(name: string): void;
+ /**
+ * Adds an extra HTTP header. The header name will issued as it is without
+ * lowercasing. It can be called only before first write. Calling this method after
+ * the first write will throw an error. If the passed value is not a String, its
+ * toString() method will be called to obtain the final value.
+ */
+ setHeader(name: string, value: any): void;
+ /**
+ * callback is essentially a dummy function introduced in the purpose of keeping
+ * similarity with the Node.js API. It is called asynchronously in the next tick
+ * after chunk content have been delivered to the Chromium networking layer.
+ * Contrary to the Node.js implementation, it is not guaranteed that chunk content
+ * have been flushed on the wire before callback is called. Adds a chunk of data to
+ * the request body. The first write operation may cause the request headers to be
+ * issued on the wire. After the first write operation, it is not allowed to add or
+ * remove a custom header.
+ */
+ write(chunk: (string) | (Buffer), encoding?: string, callback?: Function): void;
+ chunkedEncoding: boolean;
+ }
+
+ interface Clipboard extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/clipboard
+
+ availableFormats(type?: string): string[];
+ /**
+ * Clears the clipboard content.
+ */
+ clear(type?: string): void;
+ has(format: string, type?: string): boolean;
+ read(format: string): string;
+ /**
+ * Returns an Object containing title and url keys representing the bookmark in the
+ * clipboard. The title and url values will be empty strings when the bookmark is
+ * unavailable.
+ */
+ readBookmark(): ReadBookmark;
+ readBuffer(format: string): Buffer;
+ readFindText(): string;
+ readHTML(type?: string): string;
+ readImage(type?: string): NativeImage;
+ readRTF(type?: string): string;
+ readText(type?: string): string;
+ /**
+ * Writes data to the clipboard.
+ */
+ write(data: Data, type?: string): void;
+ /**
+ * Writes the title and url into the clipboard as a bookmark. Note: Most apps on
+ * Windows don't support pasting bookmarks into them so you can use clipboard.write
+ * to write both a bookmark and fallback text to the clipboard.
+ */
+ writeBookmark(title: string, url: string, type?: string): void;
+ /**
+ * Writes the buffer into the clipboard as format.
+ */
+ writeBuffer(format: string, buffer: Buffer, type?: string): void;
+ /**
+ * Writes the text into the find pasteboard as plain text. This method uses
+ * synchronous IPC when called from the renderer process.
+ */
+ writeFindText(text: string): void;
+ /**
+ * Writes markup to the clipboard.
+ */
+ writeHTML(markup: string, type?: string): void;
+ /**
+ * Writes image to the clipboard.
+ */
+ writeImage(image: NativeImage, type?: string): void;
+ /**
+ * Writes the text into the clipboard in RTF.
+ */
+ writeRTF(text: string, type?: string): void;
+ /**
+ * Writes the text into the clipboard as plain text.
+ */
+ writeText(text: string, type?: string): void;
+ }
+
+ interface ContentTracing extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/content-tracing
+
+ /**
+ * Get the current monitoring traced data. Child processes typically cache trace
+ * data and only rarely flush and send trace data back to the main process. This is
+ * because it may be an expensive operation to send the trace data over IPC and we
+ * would like to avoid unneeded runtime overhead from tracing. So, to end tracing,
+ * we must asynchronously ask all child processes to flush any pending trace data.
+ * Once all child processes have acknowledged the captureMonitoringSnapshot request
+ * the callback will be called with a file that contains the traced data.
+ */
+ captureMonitoringSnapshot(resultFilePath: string, callback: (resultFilePath: string) => void): void;
+ /**
+ * Get a set of category groups. The category groups can change as new code paths
+ * are reached. Once all child processes have acknowledged the getCategories
+ * request the callback is invoked with an array of category groups.
+ */
+ getCategories(callback: (categories: string[]) => void): void;
+ /**
+ * Get the maximum usage across processes of trace buffer as a percentage of the
+ * full state. When the TraceBufferUsage value is determined the callback is
+ * called.
+ */
+ getTraceBufferUsage(callback: (value: number, percentage: number) => void): void;
+ /**
+ * Start monitoring on all processes. Monitoring begins immediately locally and
+ * asynchronously on child processes as soon as they receive the startMonitoring
+ * request. Once all child processes have acknowledged the startMonitoring request
+ * the callback will be called.
+ */
+ startMonitoring(options: StartMonitoringOptions, callback: Function): void;
+ /**
+ * Start recording on all processes. Recording begins immediately locally and
+ * asynchronously on child processes as soon as they receive the EnableRecording
+ * request. The callback will be called once all child processes have acknowledged
+ * the startRecording request.
+ */
+ startRecording(options: (TraceCategoriesAndOptions) | (TraceConfig), callback: Function): void;
+ /**
+ * Stop monitoring on all processes. Once all child processes have acknowledged the
+ * stopMonitoring request the callback is called.
+ */
+ stopMonitoring(callback: Function): void;
+ /**
+ * Stop recording on all processes. Child processes typically cache trace data and
+ * only rarely flush and send trace data back to the main process. This helps to
+ * minimize the runtime overhead of tracing since sending trace data over IPC can
+ * be an expensive operation. So, to end tracing, we must asynchronously ask all
+ * child processes to flush any pending trace data. Once all child processes have
+ * acknowledged the stopRecording request, callback will be called with a file that
+ * contains the traced data. Trace data will be written into resultFilePath if it
+ * is not empty or into a temporary file. The actual file path will be passed to
+ * callback if it's not null.
+ */
+ stopRecording(resultFilePath: string, callback: (resultFilePath: string) => void): void;
+ }
+
+ interface Cookie {
+
+ // Docs: http://electronjs.org/docs/api/structures/cookie
+
+ /**
+ * The domain of the cookie; this will be normalized with a preceding dot so that
+ * it's also valid for subdomains.
+ */
+ domain?: string;
+ /**
+ * The expiration date of the cookie as the number of seconds since the UNIX epoch.
+ * Not provided for session cookies.
+ */
+ expirationDate?: number;
+ /**
+ * Whether the cookie is a host-only cookie; this will only be true if no domain
+ * was passed.
+ */
+ hostOnly?: boolean;
+ /**
+ * Whether the cookie is marked as HTTP only.
+ */
+ httpOnly?: boolean;
+ /**
+ * The name of the cookie.
+ */
+ name: string;
+ /**
+ * The path of the cookie.
+ */
+ path?: string;
+ /**
+ * Whether the cookie is marked as secure.
+ */
+ secure?: boolean;
+ /**
+ * Whether the cookie is a session cookie or a persistent cookie with an expiration
+ * date.
+ */
+ session?: boolean;
+ /**
+ * The value of the cookie.
+ */
+ value: string;
+ }
+
+ class Cookies extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/cookies
+
+ /**
+ * Emitted when a cookie is changed because it was added, edited, removed, or
+ * expired.
+ */
+ on(event: 'changed', listener: (event: Event,
+ /**
+ * The cookie that was changed.
+ */
+ cookie: Cookie,
+ /**
+ * The cause of the change with one of the following values:
+ */
+ cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
+ /**
+ * `true` if the cookie was removed, `false` otherwise.
+ */
+ removed: boolean) => void): this;
+ once(event: 'changed', listener: (event: Event,
+ /**
+ * The cookie that was changed.
+ */
+ cookie: Cookie,
+ /**
+ * The cause of the change with one of the following values:
+ */
+ cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
+ /**
+ * `true` if the cookie was removed, `false` otherwise.
+ */
+ removed: boolean) => void): this;
+ addListener(event: 'changed', listener: (event: Event,
+ /**
+ * The cookie that was changed.
+ */
+ cookie: Cookie,
+ /**
+ * The cause of the change with one of the following values:
+ */
+ cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
+ /**
+ * `true` if the cookie was removed, `false` otherwise.
+ */
+ removed: boolean) => void): this;
+ removeListener(event: 'changed', listener: (event: Event,
+ /**
+ * The cookie that was changed.
+ */
+ cookie: Cookie,
+ /**
+ * The cause of the change with one of the following values:
+ */
+ cause: ('explicit' | 'overwrite' | 'expired' | 'evicted' | 'expired-overwrite'),
+ /**
+ * `true` if the cookie was removed, `false` otherwise.
+ */
+ removed: boolean) => void): this;
+ /**
+ * Writes any unwritten cookies data to disk.
+ */
+ flushStore(callback: Function): void;
+ /**
+ * Sends a request to get all cookies matching filter, callback will be called with
+ * callback(error, cookies) on complete.
+ */
+ get(filter: Filter, callback: (error: Error, cookies: Cookie[]) => void): void;
+ /**
+ * Removes the cookies matching url and name, callback will called with callback()
+ * on complete.
+ */
+ remove(url: string, name: string, callback: Function): void;
+ /**
+ * Sets a cookie with details, callback will be called with callback(error) on
+ * complete.
+ */
+ set(details: Details, callback: (error: Error) => void): void;
+ }
+
+ interface CPUUsage {
+
+ // Docs: http://electronjs.org/docs/api/structures/cpu-usage
+
+ /**
+ * The number of average idle cpu wakeups per second since the last call to
+ * getCPUUsage. First call returns 0. Will always return 0 on Windows.
+ */
+ idleWakeupsPerSecond: number;
+ /**
+ * Percentage of CPU used since the last call to getCPUUsage. First call returns 0.
+ */
+ percentCPUUsage: number;
+ }
+
+ interface CrashReport {
+
+ // Docs: http://electronjs.org/docs/api/structures/crash-report
+
+ date: Date;
+ id: string;
+ }
+
+ interface CrashReporter extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/crash-reporter
+
+ /**
+ * Set an extra parameter to be sent with the crash report. The values specified
+ * here will be sent in addition to any values set via the extra option when start
+ * was called. This API is only available on macOS, if you need to add/update extra
+ * parameters on Linux and Windows after your first call to start you can call
+ * start again with the updated extra options.
+ */
+ addExtraParameter(key: string, value: string): void;
+ /**
+ * Returns the date and ID of the last crash report. Only crash reports that have
+ * been uploaded will be returned; even if a crash report is present on disk it
+ * will not be returned until it is uploaded. In the case that there are no
+ * uploaded reports, null is returned.
+ */
+ getLastCrashReport(): CrashReport;
+ /**
+ * See all of the current parameters being passed to the crash reporter.
+ */
+ getParameters(): void;
+ /**
+ * Returns all uploaded crash reports. Each report contains the date and uploaded
+ * ID.
+ */
+ getUploadedReports(): CrashReport[];
+ /**
+ * Note: This API can only be called from the main process.
+ */
+ getUploadToServer(): boolean;
+ /**
+ * Remove a extra parameter from the current set of parameters so that it will not
+ * be sent with the crash report.
+ */
+ removeExtraParameter(key: string): void;
+ /**
+ * This would normally be controlled by user preferences. This has no effect if
+ * called before start is called. Note: This API can only be called from the main
+ * process.
+ */
+ setUploadToServer(uploadToServer: boolean): void;
+ /**
+ * You are required to call this method before using any other crashReporter APIs
+ * and in each process (main/renderer) from which you want to collect crash
+ * reports. You can pass different options to crashReporter.start when calling from
+ * different processes. Note Child processes created via the child_process module
+ * will not have access to the Electron modules. Therefore, to collect crash
+ * reports from them, use process.crashReporter.start instead. Pass the same
+ * options as above along with an additional one called crashesDirectory that
+ * should point to a directory to store the crash reports temporarily. You can test
+ * this out by calling process.crash() to crash the child process. Note: To collect
+ * crash reports from child process in Windows, you need to add this extra code as
+ * well. This will start the process that will monitor and send the crash reports.
+ * Replace submitURL, productName and crashesDirectory with appropriate values.
+ * Note: If you need send additional/updated extra parameters after your first call
+ * start you can call addExtraParameter on macOS or call start again with the
+ * new/updated extra parameters on Linux and Windows. Note: On macOS, Electron uses
+ * a new crashpad client for crash collection and reporting. If you want to enable
+ * crash reporting, initializing crashpad from the main process using
+ * crashReporter.start is required regardless of which process you want to collect
+ * crashes from. Once initialized this way, the crashpad handler collects crashes
+ * from all processes. You still have to call crashReporter.start from the renderer
+ * or child process, otherwise crashes from them will get reported without
+ * companyName, productName or any of the extra information.
+ */
+ start(options: CrashReporterStartOptions): void;
+ }
+
+ class Debugger extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/debugger
+
+ /**
+ * Emitted when debugging session is terminated. This happens either when
+ * webContents is closed or devtools is invoked for the attached webContents.
+ */
+ on(event: 'detach', listener: (event: Event,
+ /**
+ * Reason for detaching debugger.
+ */
+ reason: string) => void): this;
+ once(event: 'detach', listener: (event: Event,
+ /**
+ * Reason for detaching debugger.
+ */
+ reason: string) => void): this;
+ addListener(event: 'detach', listener: (event: Event,
+ /**
+ * Reason for detaching debugger.
+ */
+ reason: string) => void): this;
+ removeListener(event: 'detach', listener: (event: Event,
+ /**
+ * Reason for detaching debugger.
+ */
+ reason: string) => void): this;
+ /**
+ * Emitted whenever debugging target issues instrumentation event.
+ */
+ on(event: 'message', listener: (event: Event,
+ /**
+ * Method name.
+ */
+ method: string,
+ /**
+ * Event parameters defined by the 'parameters' attribute in the remote debugging
+ * protocol.
+ */
+ params: any) => void): this;
+ once(event: 'message', listener: (event: Event,
+ /**
+ * Method name.
+ */
+ method: string,
+ /**
+ * Event parameters defined by the 'parameters' attribute in the remote debugging
+ * protocol.
+ */
+ params: any) => void): this;
+ addListener(event: 'message', listener: (event: Event,
+ /**
+ * Method name.
+ */
+ method: string,
+ /**
+ * Event parameters defined by the 'parameters' attribute in the remote debugging
+ * protocol.
+ */
+ params: any) => void): this;
+ removeListener(event: 'message', listener: (event: Event,
+ /**
+ * Method name.
+ */
+ method: string,
+ /**
+ * Event parameters defined by the 'parameters' attribute in the remote debugging
+ * protocol.
+ */
+ params: any) => void): this;
+ /**
+ * Attaches the debugger to the webContents.
+ */
+ attach(protocolVersion?: string): void;
+ /**
+ * Detaches the debugger from the webContents.
+ */
+ detach(): void;
+ isAttached(): boolean;
+ /**
+ * Send given command to the debugging target.
+ */
+ sendCommand(method: string, commandParams?: any, callback?: (error: any, result: any) => void): void;
+ }
+
+ interface DesktopCapturer extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/desktop-capturer
+
+ /**
+ * Starts gathering information about all available desktop media sources, and
+ * calls callback(error, sources) when finished. sources is an array of
+ * DesktopCapturerSource objects, each DesktopCapturerSource represents a screen or
+ * an individual window that can be captured.
+ */
+ getSources(options: SourcesOptions, callback: (error: Error, sources: DesktopCapturerSource[]) => void): void;
+ }
+
+ interface DesktopCapturerSource {
+
+ // Docs: http://electronjs.org/docs/api/structures/desktop-capturer-source
+
+ /**
+ * A unique identifier that will correspond to the id of the matching returned by
+ * the . On some platforms, this is equivalent to the XX portion of the id field
+ * above and on others it will differ. It will be an empty string if not available.
+ */
+ display_id: string;
+ /**
+ * The identifier of a window or screen that can be used as a chromeMediaSourceId
+ * constraint when calling [navigator.webkitGetUserMedia]. The format of the
+ * identifier will be window:XX or screen:XX, where XX is a random generated
+ * number.
+ */
+ id: string;
+ /**
+ * A screen source will be named either Entire Screen or Screen , while the name of
+ * a window source will match the window title.
+ */
+ name: string;
+ /**
+ * A thumbnail image. There is no guarantee that the size of the thumbnail is the
+ * same as the thumbnailSize specified in the options passed to
+ * desktopCapturer.getSources. The actual size depends on the scale of the screen
+ * or window.
+ */
+ thumbnail: NativeImage;
+ }
+
+ interface Dialog extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/dialog
+
+ /**
+ * On macOS, this displays a modal dialog that shows a message and certificate
+ * information, and gives the user the option of trusting/importing the
+ * certificate. If you provide a browserWindow argument the dialog will be attached
+ * to the parent window, making it modal. On Windows the options are more limited,
+ * due to the Win32 APIs used:
+ */
+ showCertificateTrustDialog(browserWindow: BrowserWindow, options: CertificateTrustDialogOptions, callback: Function): void;
+ /**
+ * On macOS, this displays a modal dialog that shows a message and certificate
+ * information, and gives the user the option of trusting/importing the
+ * certificate. If you provide a browserWindow argument the dialog will be attached
+ * to the parent window, making it modal. On Windows the options are more limited,
+ * due to the Win32 APIs used:
+ */
+ showCertificateTrustDialog(options: CertificateTrustDialogOptions, callback: Function): void;
+ /**
+ * On macOS, this displays a modal dialog that shows a message and certificate
+ * information, and gives the user the option of trusting/importing the
+ * certificate. If you provide a browserWindow argument the dialog will be attached
+ * to the parent window, making it modal. On Windows the options are more limited,
+ * due to the Win32 APIs used:
+ */
+ showCertificateTrustDialog(browserWindow: BrowserWindow, options: CertificateTrustDialogOptions, callback: Function): void;
+ /**
+ * Displays a modal dialog that shows an error message. This API can be called
+ * safely before the ready event the app module emits, it is usually used to report
+ * errors in early stage of startup. If called before the app readyevent on Linux,
+ * the message will be emitted to stderr, and no GUI dialog will appear.
+ */
+ showErrorBox(title: string, content: string): void;
+ /**
+ * Shows a message box, it will block the process until the message box is closed.
+ * It returns the index of the clicked button. The browserWindow argument allows
+ * the dialog to attach itself to a parent window, making it modal. If a callback
+ * is passed, the dialog will not block the process. The API call will be
+ * asynchronous and the result will be passed via callback(response).
+ */
+ showMessageBox(browserWindow: BrowserWindow, options: MessageBoxOptions, callback?: (response: number, checkboxChecked: boolean) => void): number;
+ /**
+ * Shows a message box, it will block the process until the message box is closed.
+ * It returns the index of the clicked button. The browserWindow argument allows
+ * the dialog to attach itself to a parent window, making it modal. If a callback
+ * is passed, the dialog will not block the process. The API call will be
+ * asynchronous and the result will be passed via callback(response).
+ */
+ showMessageBox(options: MessageBoxOptions, callback?: (response: number, checkboxChecked: boolean) => void): number;
+ /**
+ * The browserWindow argument allows the dialog to attach itself to a parent
+ * window, making it modal. The filters specifies an array of file types that can
+ * be displayed or selected when you want to limit the user to a specific type. For
+ * example: The extensions array should contain extensions without wildcards or
+ * dots (e.g. 'png' is good but '.png' and '*.png' are bad). To show all files, use
+ * the '*' wildcard (no other wildcard is supported). If a callback is passed, the
+ * API call will be asynchronous and the result will be passed via
+ * callback(filenames). Note: On Windows and Linux an open dialog can not be both a
+ * file selector and a directory selector, so if you set properties to ['openFile',
+ * 'openDirectory'] on these platforms, a directory selector will be shown.
+ */
+ showOpenDialog(browserWindow: BrowserWindow, options: OpenDialogOptions, callback?: (filePaths: string[], bookmarks: string[]) => void): (string[]) | (undefined);
+ /**
+ * The browserWindow argument allows the dialog to attach itself to a parent
+ * window, making it modal. The filters specifies an array of file types that can
+ * be displayed or selected when you want to limit the user to a specific type. For
+ * example: The extensions array should contain extensions without wildcards or
+ * dots (e.g. 'png' is good but '.png' and '*.png' are bad). To show all files, use
+ * the '*' wildcard (no other wildcard is supported). If a callback is passed, the
+ * API call will be asynchronous and the result will be passed via
+ * callback(filenames). Note: On Windows and Linux an open dialog can not be both a
+ * file selector and a directory selector, so if you set properties to ['openFile',
+ * 'openDirectory'] on these platforms, a directory selector will be shown.
+ */
+ showOpenDialog(options: OpenDialogOptions, callback?: (filePaths: string[], bookmarks: string[]) => void): (string[]) | (undefined);
+ /**
+ * The browserWindow argument allows the dialog to attach itself to a parent
+ * window, making it modal. The filters specifies an array of file types that can
+ * be displayed, see dialog.showOpenDialog for an example. If a callback is passed,
+ * the API call will be asynchronous and the result will be passed via
+ * callback(filename).
+ */
+ showSaveDialog(browserWindow: BrowserWindow, options: SaveDialogOptions, callback?: (filename: string, bookmark: string) => void): (string) | (undefined);
+ /**
+ * The browserWindow argument allows the dialog to attach itself to a parent
+ * window, making it modal. The filters specifies an array of file types that can
+ * be displayed, see dialog.showOpenDialog for an example. If a callback is passed,
+ * the API call will be asynchronous and the result will be passed via
+ * callback(filename).
+ */
+ showSaveDialog(options: SaveDialogOptions, callback?: (filename: string, bookmark: string) => void): (string) | (undefined);
+ }
+
+ interface Display {
+
+ // Docs: http://electronjs.org/docs/api/structures/display
+
+ bounds: Rectangle;
+ /**
+ * Unique identifier associated with the display.
+ */
+ id: number;
+ /**
+ * Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees.
+ */
+ rotation: number;
+ /**
+ * Output device's pixel scale factor.
+ */
+ scaleFactor: number;
+ size: Size;
+ /**
+ * Can be available, unavailable, unknown.
+ */
+ touchSupport: ('available' | 'unavailable' | 'unknown');
+ workArea: Rectangle;
+ workAreaSize: Size;
+ }
+
+ class DownloadItem extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/download-item
+
+ /**
+ * Emitted when the download is in a terminal state. This includes a completed
+ * download, a cancelled download (via downloadItem.cancel()), and interrupted
+ * download that can't be resumed. The state can be one of following:
+ */
+ on(event: 'done', listener: (event: Event,
+ /**
+ * Can be `completed`, `cancelled` or `interrupted`.
+ */
+ state: ('completed' | 'cancelled' | 'interrupted')) => void): this;
+ once(event: 'done', listener: (event: Event,
+ /**
+ * Can be `completed`, `cancelled` or `interrupted`.
+ */
+ state: ('completed' | 'cancelled' | 'interrupted')) => void): this;
+ addListener(event: 'done', listener: (event: Event,
+ /**
+ * Can be `completed`, `cancelled` or `interrupted`.
+ */
+ state: ('completed' | 'cancelled' | 'interrupted')) => void): this;
+ removeListener(event: 'done', listener: (event: Event,
+ /**
+ * Can be `completed`, `cancelled` or `interrupted`.
+ */
+ state: ('completed' | 'cancelled' | 'interrupted')) => void): this;
+ /**
+ * Emitted when the download has been updated and is not done. The state can be one
+ * of following:
+ */
+ on(event: 'updated', listener: (event: Event,
+ /**
+ * Can be `progressing` or `interrupted`.
+ */
+ state: ('progressing' | 'interrupted')) => void): this;
+ once(event: 'updated', listener: (event: Event,
+ /**
+ * Can be `progressing` or `interrupted`.
+ */
+ state: ('progressing' | 'interrupted')) => void): this;
+ addListener(event: 'updated', listener: (event: Event,
+ /**
+ * Can be `progressing` or `interrupted`.
+ */
+ state: ('progressing' | 'interrupted')) => void): this;
+ removeListener(event: 'updated', listener: (event: Event,
+ /**
+ * Can be `progressing` or `interrupted`.
+ */
+ state: ('progressing' | 'interrupted')) => void): this;
+ /**
+ * Cancels the download operation.
+ */
+ cancel(): void;
+ canResume(): boolean;
+ getContentDisposition(): string;
+ getETag(): string;
+ /**
+ * Note: The file name is not always the same as the actual one saved in local
+ * disk. If user changes the file name in a prompted download saving dialog, the
+ * actual name of saved file will be different.
+ */
+ getFilename(): string;
+ getLastModifiedTime(): string;
+ getMimeType(): string;
+ getReceivedBytes(): number;
+ getSavePath(): string;
+ getStartTime(): number;
+ /**
+ * Note: The following methods are useful specifically to resume a cancelled item
+ * when session is restarted.
+ */
+ getState(): ('progressing' | 'completed' | 'cancelled' | 'interrupted');
+ /**
+ * If the size is unknown, it returns 0.
+ */
+ getTotalBytes(): number;
+ getURL(): string;
+ getURLChain(): string[];
+ hasUserGesture(): boolean;
+ isPaused(): boolean;
+ /**
+ * Pauses the download.
+ */
+ pause(): void;
+ /**
+ * Resumes the download that has been paused. Note: To enable resumable downloads
+ * the server you are downloading from must support range requests and provide both
+ * Last-Modified and ETag header values. Otherwise resume() will dismiss previously
+ * received bytes and restart the download from the beginning.
+ */
+ resume(): void;
+ /**
+ * The API is only available in session's will-download callback function. If user
+ * doesn't set the save path via the API, Electron will use the original routine to
+ * determine the save path(Usually prompts a save dialog).
+ */
+ setSavePath(path: string): void;
+ }
+
+ interface FileFilter {
+
+ // Docs: http://electronjs.org/docs/api/structures/file-filter
+
+ extensions: string[];
+ name: string;
+ }
+
+ interface GlobalShortcut extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/global-shortcut
+
+ /**
+ * When the accelerator is already taken by other applications, this call will
+ * still return false. This behavior is intended by operating systems, since they
+ * don't want applications to fight for global shortcuts.
+ */
+ isRegistered(accelerator: Accelerator): boolean;
+ /**
+ * Registers a global shortcut of accelerator. The callback is called when the
+ * registered shortcut is pressed by the user. When the accelerator is already
+ * taken by other applications, this call will silently fail. This behavior is
+ * intended by operating systems, since they don't want applications to fight for
+ * global shortcuts. The following accelerators will not be registered successfully
+ * on macOS 10.14 Mojave unless the app has been authorized as a trusted
+ * accessibility client:
+ */
+ register(accelerator: Accelerator, callback: Function): void;
+ /**
+ * Unregisters the global shortcut of accelerator.
+ */
+ unregister(accelerator: Accelerator): void;
+ /**
+ * Unregisters all of the global shortcuts.
+ */
+ unregisterAll(): void;
+ }
+
+ interface GPUFeatureStatus {
+
+ // Docs: http://electronjs.org/docs/api/structures/gpu-feature-status
+
+ /**
+ * Canvas.
+ */
+ '2d_canvas': string;
+ /**
+ * Flash.
+ */
+ flash_3d: string;
+ /**
+ * Flash Stage3D.
+ */
+ flash_stage3d: string;
+ /**
+ * Flash Stage3D Baseline profile.
+ */
+ flash_stage3d_baseline: string;
+ /**
+ * Compositing.
+ */
+ gpu_compositing: string;
+ /**
+ * Multiple Raster Threads.
+ */
+ multiple_raster_threads: string;
+ /**
+ * Native GpuMemoryBuffers.
+ */
+ native_gpu_memory_buffers: string;
+ /**
+ * Rasterization.
+ */
+ rasterization: string;
+ /**
+ * Video Decode.
+ */
+ video_decode: string;
+ /**
+ * Video Encode.
+ */
+ video_encode: string;
+ /**
+ * VPx Video Decode.
+ */
+ vpx_decode: string;
+ /**
+ * WebGL.
+ */
+ webgl: string;
+ /**
+ * WebGL2.
+ */
+ webgl2: string;
+ }
+
+ interface InAppPurchase extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/in-app-purchase
+
+ /**
+ * Emitted when one or more transactions have been updated.
+ */
+ on(event: 'transactions-updated', listener: (event: Event,
+ /**
+ * Array of objects.
+ */
+ transactions: Transaction[]) => void): this;
+ once(event: 'transactions-updated', listener: (event: Event,
+ /**
+ * Array of objects.
+ */
+ transactions: Transaction[]) => void): this;
+ addListener(event: 'transactions-updated', listener: (event: Event,
+ /**
+ * Array of objects.
+ */
+ transactions: Transaction[]) => void): this;
+ removeListener(event: 'transactions-updated', listener: (event: Event,
+ /**
+ * Array of objects.
+ */
+ transactions: Transaction[]) => void): this;
+ canMakePayments(): boolean;
+ /**
+ * Completes all pending transactions.
+ */
+ finishAllTransactions(): void;
+ /**
+ * Completes the pending transactions corresponding to the date.
+ */
+ finishTransactionByDate(date: string): void;
+ /**
+ * Retrieves the product descriptions.
+ */
+ getProducts(productIDs: string[], callback: (products: Product[]) => void): void;
+ getReceiptURL(): string;
+ /**
+ * You should listen for the transactions-updated event as soon as possible and
+ * certainly before you call purchaseProduct.
+ */
+ purchaseProduct(productID: string, quantity?: number, callback?: (isProductValid: boolean) => void): void;
+ }
+
+ class IncomingMessage extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/incoming-message
+
+ /**
+ * Emitted when a request has been canceled during an ongoing HTTP transaction.
+ */
+ on(event: 'aborted', listener: Function): this;
+ once(event: 'aborted', listener: Function): this;
+ addListener(event: 'aborted', listener: Function): this;
+ removeListener(event: 'aborted', listener: Function): this;
+ /**
+ * The data event is the usual method of transferring response data into
+ * applicative code.
+ */
+ on(event: 'data', listener: (
+ /**
+ * A chunk of response body's data.
+ */
+ chunk: Buffer) => void): this;
+ once(event: 'data', listener: (
+ /**
+ * A chunk of response body's data.
+ */
+ chunk: Buffer) => void): this;
+ addListener(event: 'data', listener: (
+ /**
+ * A chunk of response body's data.
+ */
+ chunk: Buffer) => void): this;
+ removeListener(event: 'data', listener: (
+ /**
+ * A chunk of response body's data.
+ */
+ chunk: Buffer) => void): this;
+ /**
+ * Indicates that response body has ended.
+ */
+ on(event: 'end', listener: Function): this;
+ once(event: 'end', listener: Function): this;
+ addListener(event: 'end', listener: Function): this;
+ removeListener(event: 'end', listener: Function): this;
+ /**
+ * error Error - Typically holds an error string identifying failure root cause.
+ * Emitted when an error was encountered while streaming response data events. For
+ * instance, if the server closes the underlying while the response is still
+ * streaming, an error event will be emitted on the response object and a close
+ * event will subsequently follow on the request object.
+ */
+ on(event: 'error', listener: Function): this;
+ once(event: 'error', listener: Function): this;
+ addListener(event: 'error', listener: Function): this;
+ removeListener(event: 'error', listener: Function): this;
+ headers: any;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ statusCode: number;
+ statusMessage: string;
+ }
+
+ interface IOCounters {
+
+ // Docs: http://electronjs.org/docs/api/structures/io-counters
+
+ /**
+ * Then number of I/O other operations.
+ */
+ otherOperationCount: number;
+ /**
+ * Then number of I/O other transfers.
+ */
+ otherTransferCount: number;
+ /**
+ * The number of I/O read operations.
+ */
+ readOperationCount: number;
+ /**
+ * The number of I/O read transfers.
+ */
+ readTransferCount: number;
+ /**
+ * The number of I/O write operations.
+ */
+ writeOperationCount: number;
+ /**
+ * The number of I/O write transfers.
+ */
+ writeTransferCount: number;
+ }
+
+ interface IpcMain extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/ipc-main
+
+ /**
+ * Listens to channel, when a new message arrives listener would be called with
+ * listener(event, args...).
+ */
+ on(channel: string, listener: Function): this;
+ /**
+ * Adds a one time listener function for the event. This listener is invoked only
+ * the next time a message is sent to channel, after which it is removed.
+ */
+ once(channel: string, listener: Function): this;
+ /**
+ * Removes listeners of the specified channel.
+ */
+ removeAllListeners(channel: string): this;
+ /**
+ * Removes the specified listener from the listener array for the specified
+ * channel.
+ */
+ removeListener(channel: string, listener: Function): this;
+ }
+
+ interface IpcRenderer extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/ipc-renderer
+
+ /**
+ * Listens to channel, when a new message arrives listener would be called with
+ * listener(event, args...).
+ */
+ on(channel: string, listener: Function): this;
+ /**
+ * Adds a one time listener function for the event. This listener is invoked only
+ * the next time a message is sent to channel, after which it is removed.
+ */
+ once(channel: string, listener: Function): this;
+ /**
+ * Removes all listeners, or those of the specified channel.
+ */
+ removeAllListeners(channel: string): this;
+ /**
+ * Removes the specified listener from the listener array for the specified
+ * channel.
+ */
+ removeListener(channel: string, listener: Function): this;
+ /**
+ * Send a message to the main process asynchronously via channel, you can also send
+ * arbitrary arguments. Arguments will be serialized in JSON internally and hence
+ * no functions or prototype chain will be included. The main process handles it by
+ * listening for channel with ipcMain module.
+ */
+ send(channel: string, ...args: any[]): void;
+ /**
+ * Send a message to the main process synchronously via channel, you can also send
+ * arbitrary arguments. Arguments will be serialized in JSON internally and hence
+ * no functions or prototype chain will be included. The main process handles it by
+ * listening for channel with ipcMain module, and replies by setting
+ * event.returnValue. Note: Sending a synchronous message will block the whole
+ * renderer process, unless you know what you are doing you should never use it.
+ */
+ sendSync(channel: string, ...args: any[]): any;
+ /**
+ * Sends a message to a window with webContentsId via channel.
+ */
+ sendTo(webContentsId: number, channel: string, ...args: any[]): void;
+ /**
+ * Like ipcRenderer.send but the event will be sent to the <webview> element in the
+ * host page instead of the main process.
+ */
+ sendToHost(channel: string, ...args: any[]): void;
+ }
+
+ interface JumpListCategory {
+
+ // Docs: http://electronjs.org/docs/api/structures/jump-list-category
+
+ /**
+ * Array of objects if type is tasks or custom, otherwise it should be omitted.
+ */
+ items?: JumpListItem[];
+ /**
+ * Must be set if type is custom, otherwise it should be omitted.
+ */
+ name?: string;
+ /**
+ * One of the following:
+ */
+ type?: ('tasks' | 'frequent' | 'recent' | 'custom');
+ }
+
+ interface JumpListItem {
+
+ // Docs: http://electronjs.org/docs/api/structures/jump-list-item
+
+ /**
+ * The command line arguments when program is executed. Should only be set if type
+ * is task.
+ */
+ args?: string;
+ /**
+ * Description of the task (displayed in a tooltip). Should only be set if type is
+ * task.
+ */
+ description?: string;
+ /**
+ * The index of the icon in the resource file. If a resource file contains multiple
+ * icons this value can be used to specify the zero-based index of the icon that
+ * should be displayed for this task. If a resource file contains only one icon,
+ * this property should be set to zero.
+ */
+ iconIndex?: number;
+ /**
+ * The absolute path to an icon to be displayed in a Jump List, which can be an
+ * arbitrary resource file that contains an icon (e.g. .ico, .exe, .dll). You can
+ * usually specify process.execPath to show the program icon.
+ */
+ iconPath?: string;
+ /**
+ * Path of the file to open, should only be set if type is file.
+ */
+ path?: string;
+ /**
+ * Path of the program to execute, usually you should specify process.execPath
+ * which opens the current program. Should only be set if type is task.
+ */
+ program?: string;
+ /**
+ * The text to be displayed for the item in the Jump List. Should only be set if
+ * type is task.
+ */
+ title?: string;
+ /**
+ * One of the following:
+ */
+ type?: ('task' | 'separator' | 'file');
+ }
+
+ interface MemoryUsageDetails {
+
+ // Docs: http://electronjs.org/docs/api/structures/memory-usage-details
+
+ count: number;
+ liveSize: number;
+ size: number;
+ }
+
+ class Menu {
+
+ // Docs: http://electronjs.org/docs/api/menu
+
+ /**
+ * Emitted when a popup is closed either manually or with menu.closePopup().
+ */
+ on(event: 'menu-will-close', listener: (event: Event) => void): this;
+ once(event: 'menu-will-close', listener: (event: Event) => void): this;
+ addListener(event: 'menu-will-close', listener: (event: Event) => void): this;
+ removeListener(event: 'menu-will-close', listener: (event: Event) => void): this;
+ /**
+ * Emitted when menu.popup() is called.
+ */
+ on(event: 'menu-will-show', listener: (event: Event) => void): this;
+ once(event: 'menu-will-show', listener: (event: Event) => void): this;
+ addListener(event: 'menu-will-show', listener: (event: Event) => void): this;
+ removeListener(event: 'menu-will-show', listener: (event: Event) => void): this;
+ constructor();
+ /**
+ * Generally, the template is an array of options for constructing a MenuItem. The
+ * usage can be referenced above. You can also attach other fields to the element
+ * of the template and they will become properties of the constructed menu items.
+ */
+ static buildFromTemplate(template: MenuItemConstructorOptions[]): Menu;
+ /**
+ * Note: The returned Menu instance doesn't support dynamic addition or removal of
+ * menu items. Instance properties can still be dynamically modified.
+ */
+ static getApplicationMenu(): (Menu) | (null);
+ /**
+ * Sends the action to the first responder of application. This is used for
+ * emulating default macOS menu behaviors. Usually you would use the role property
+ * of a MenuItem. See the macOS Cocoa Event Handling Guide for more information on
+ * macOS' native actions.
+ */
+ static sendActionToFirstResponder(action: string): void;
+ /**
+ * Sets menu as the application menu on macOS. On Windows and Linux, the menu will
+ * be set as each window's top menu. Passing null will remove the menu bar on
+ * Windows and Linux but has no effect on macOS. Note: This API has to be called
+ * after the ready event of app module.
+ */
+ static setApplicationMenu(menu: (Menu) | (null)): void;
+ /**
+ * Appends the menuItem to the menu.
+ */
+ append(menuItem: MenuItem): void;
+ /**
+ * Closes the context menu in the browserWindow.
+ */
+ closePopup(browserWindow?: BrowserWindow): void;
+ getMenuItemById(id: string): MenuItem;
+ /**
+ * Inserts the menuItem to the pos position of the menu.
+ */
+ insert(pos: number, menuItem: MenuItem): void;
+ /**
+ * Pops up this menu as a context menu in the BrowserWindow.
+ */
+ popup(options?: PopupOptions): void;
+ items: MenuItem[];
+ }
+
+ class MenuItem {
+
+ // Docs: http://electronjs.org/docs/api/menu-item
+
+ constructor(options: MenuItemConstructorOptions);
+ checked: boolean;
+ click: Function;
+ enabled: boolean;
+ label: string;
+ visible: boolean;
+ }
+
+ interface MimeTypedBuffer {
+
+ // Docs: http://electronjs.org/docs/api/structures/mime-typed-buffer
+
+ /**
+ * The actual Buffer content.
+ */
+ data: Buffer;
+ /**
+ * The mimeType of the Buffer that you are sending.
+ */
+ mimeType: string;
+ }
+
+ class NativeImage {
+
+ // Docs: http://electronjs.org/docs/api/native-image
+
+ /**
+ * Creates an empty NativeImage instance.
+ */
+ static createEmpty(): NativeImage;
+ /**
+ * Creates a new NativeImage instance from buffer.
+ */
+ static createFromBuffer(buffer: Buffer, options?: CreateFromBufferOptions): NativeImage;
+ /**
+ * Creates a new NativeImage instance from dataURL.
+ */
+ static createFromDataURL(dataURL: string): NativeImage;
+ /**
+ * Creates a new NativeImage instance from the NSImage that maps to the given image
+ * name. See NSImageName for a list of possible values. The hslShift is applied to
+ * the image with the following rules This means that [-1, 0, 1] will make the
+ * image completely white and [-1, 1, 0] will make the image completely black. In
+ * some cases, the NSImageName doesn't match its string representation; one example
+ * of this is NSFolderImageName, whose string representation would actually be
+ * NSFolder. Therefore, you'll need to determine the correct string representation
+ * for your image before passing it in. This can be done with the following: echo
+ * -e '#import <Cocoa/Cocoa.h>\nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); }' |
+ * clang -otest -x objective-c -framework Cocoa - && ./test where SYSTEM_IMAGE_NAME
+ * should be replaced with any value from this list.
+ */
+ static createFromNamedImage(imageName: string, hslShift: number[]): NativeImage;
+ /**
+ * Creates a new NativeImage instance from a file located at path. This method
+ * returns an empty image if the path does not exist, cannot be read, or is not a
+ * valid image.
+ */
+ static createFromPath(path: string): NativeImage;
+ /**
+ * Add an image representation for a specific scale factor. This can be used to
+ * explicitly add different scale factor representations to an image. This can be
+ * called on empty images.
+ */
+ addRepresentation(options: AddRepresentationOptions): void;
+ crop(rect: Rectangle): NativeImage;
+ getAspectRatio(): number;
+ /**
+ * The difference between getBitmap() and toBitmap() is, getBitmap() does not copy
+ * the bitmap data, so you have to use the returned Buffer immediately in current
+ * event loop tick, otherwise the data might be changed or destroyed.
+ */
+ getBitmap(options?: BitmapOptions): Buffer;
+ /**
+ * Notice that the returned pointer is a weak pointer to the underlying native
+ * image instead of a copy, so you must ensure that the associated nativeImage
+ * instance is kept around.
+ */
+ getNativeHandle(): Buffer;
+ getSize(): Size;
+ isEmpty(): boolean;
+ isTemplateImage(): boolean;
+ /**
+ * If only the height or the width are specified then the current aspect ratio will
+ * be preserved in the resized image.
+ */
+ resize(options: ResizeOptions): NativeImage;
+ /**
+ * Marks the image as a template image.
+ */
+ setTemplateImage(option: boolean): void;
+ toBitmap(options?: ToBitmapOptions): Buffer;
+ toDataURL(options?: ToDataURLOptions): string;
+ toJPEG(quality: number): Buffer;
+ toPNG(options?: ToPNGOptions): Buffer;
+ }
+
+ interface Net extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/net
+
+ /**
+ * Creates a ClientRequest instance using the provided options which are directly
+ * forwarded to the ClientRequest constructor. The net.request method would be used
+ * to issue both secure and insecure HTTP requests according to the specified
+ * protocol scheme in the options object.
+ */
+ request(options: (any) | (string)): ClientRequest;
+ }
+
+ interface NetLog extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/net-log
+
+ /**
+ * Starts recording network events to path.
+ */
+ startLogging(path: string): void;
+ /**
+ * Stops recording network events. If not called, net logging will automatically
+ * end when app quits.
+ */
+ stopLogging(callback?: (path: string) => void): void;
+ /**
+ * A Boolean property that indicates whether network logs are recorded.
+ */
+ currentlyLogging?: boolean;
+ /**
+ * A String property that returns the path to the current log file.
+ */
+ currentlyLoggingPath?: string;
+ }
+
+ class Notification extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/notification
+
+ on(event: 'action', listener: (event: Event,
+ /**
+ * The index of the action that was activated.
+ */
+ index: number) => void): this;
+ once(event: 'action', listener: (event: Event,
+ /**
+ * The index of the action that was activated.
+ */
+ index: number) => void): this;
+ addListener(event: 'action', listener: (event: Event,
+ /**
+ * The index of the action that was activated.
+ */
+ index: number) => void): this;
+ removeListener(event: 'action', listener: (event: Event,
+ /**
+ * The index of the action that was activated.
+ */
+ index: number) => void): this;
+ /**
+ * Emitted when the notification is clicked by the user.
+ */
+ on(event: 'click', listener: (event: Event) => void): this;
+ once(event: 'click', listener: (event: Event) => void): this;
+ addListener(event: 'click', listener: (event: Event) => void): this;
+ removeListener(event: 'click', listener: (event: Event) => void): this;
+ /**
+ * Emitted when the notification is closed by manual intervention from the user.
+ * This event is not guaranteed to be emitted in all cases where the notification
+ * is closed.
+ */
+ on(event: 'close', listener: (event: Event) => void): this;
+ once(event: 'close', listener: (event: Event) => void): this;
+ addListener(event: 'close', listener: (event: Event) => void): this;
+ removeListener(event: 'close', listener: (event: Event) => void): this;
+ /**
+ * Emitted when the user clicks the "Reply" button on a notification with hasReply:
+ * true.
+ */
+ on(event: 'reply', listener: (event: Event,
+ /**
+ * The string the user entered into the inline reply field.
+ */
+ reply: string) => void): this;
+ once(event: 'reply', listener: (event: Event,
+ /**
+ * The string the user entered into the inline reply field.
+ */
+ reply: string) => void): this;
+ addListener(event: 'reply', listener: (event: Event,
+ /**
+ * The string the user entered into the inline reply field.
+ */
+ reply: string) => void): this;
+ removeListener(event: 'reply', listener: (event: Event,
+ /**
+ * The string the user entered into the inline reply field.
+ */
+ reply: string) => void): this;
+ /**
+ * Emitted when the notification is shown to the user, note this could be fired
+ * multiple times as a notification can be shown multiple times through the show()
+ * method.
+ */
+ on(event: 'show', listener: (event: Event) => void): this;
+ once(event: 'show', listener: (event: Event) => void): this;
+ addListener(event: 'show', listener: (event: Event) => void): this;
+ removeListener(event: 'show', listener: (event: Event) => void): this;
+ constructor(options: NotificationConstructorOptions);
+ static isSupported(): boolean;
+ /**
+ * Dismisses the notification.
+ */
+ close(): void;
+ /**
+ * Immediately shows the notification to the user, please note this means unlike
+ * the HTML5 Notification implementation, instantiating a new Notification does not
+ * immediately show it to the user, you need to call this method before the OS will
+ * display it. If the notification has been shown before, this method will dismiss
+ * the previously shown notification and create a new one with identical
+ * properties.
+ */
+ show(): void;
+ }
+
+ interface NotificationAction {
+
+ // Docs: http://electronjs.org/docs/api/structures/notification-action
+
+ /**
+ * The label for the given action.
+ */
+ text?: string;
+ /**
+ * The type of action, can be button.
+ */
+ type: ('button');
+ }
+
+ interface Point {
+
+ // Docs: http://electronjs.org/docs/api/structures/point
+
+ x: number;
+ y: number;
+ }
+
+ interface PowerMonitor extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/power-monitor
+
+ /**
+ * Emitted when the system is about to lock the screen.
+ */
+ on(event: 'lock-screen', listener: Function): this;
+ once(event: 'lock-screen', listener: Function): this;
+ addListener(event: 'lock-screen', listener: Function): this;
+ removeListener(event: 'lock-screen', listener: Function): this;
+ /**
+ * Emitted when the system changes to AC power.
+ */
+ on(event: 'on-ac', listener: Function): this;
+ once(event: 'on-ac', listener: Function): this;
+ addListener(event: 'on-ac', listener: Function): this;
+ removeListener(event: 'on-ac', listener: Function): this;
+ /**
+ * Emitted when system changes to battery power.
+ */
+ on(event: 'on-battery', listener: Function): this;
+ once(event: 'on-battery', listener: Function): this;
+ addListener(event: 'on-battery', listener: Function): this;
+ removeListener(event: 'on-battery', listener: Function): this;
+ /**
+ * Emitted when system is resuming.
+ */
+ on(event: 'resume', listener: Function): this;
+ once(event: 'resume', listener: Function): this;
+ addListener(event: 'resume', listener: Function): this;
+ removeListener(event: 'resume', listener: Function): this;
+ /**
+ * Emitted when the system is about to reboot or shut down. If the event handler
+ * invokes e.preventDefault(), Electron will attempt to delay system shutdown in
+ * order for the app to exit cleanly. If e.preventDefault() is called, the app
+ * should exit as soon as possible by calling something like app.quit().
+ */
+ on(event: 'shutdown', listener: Function): this;
+ once(event: 'shutdown', listener: Function): this;
+ addListener(event: 'shutdown', listener: Function): this;
+ removeListener(event: 'shutdown', listener: Function): this;
+ /**
+ * Emitted when the system is suspending.
+ */
+ on(event: 'suspend', listener: Function): this;
+ once(event: 'suspend', listener: Function): this;
+ addListener(event: 'suspend', listener: Function): this;
+ removeListener(event: 'suspend', listener: Function): this;
+ /**
+ * Emitted as soon as the systems screen is unlocked.
+ */
+ on(event: 'unlock-screen', listener: Function): this;
+ once(event: 'unlock-screen', listener: Function): this;
+ addListener(event: 'unlock-screen', listener: Function): this;
+ removeListener(event: 'unlock-screen', listener: Function): this;
+ /**
+ * Calculate the system idle state. idleThreshold is the amount of time (in
+ * seconds) before considered idle. callback will be called synchronously on some
+ * systems and with an idleState argument that describes the system's state. locked
+ * is available on supported systems only.
+ */
+ querySystemIdleState(idleThreshold: number, callback: (idleState: 'active' | 'idle' | 'locked' | 'unknown') => void): void;
+ /**
+ * Calculate system idle time in seconds.
+ */
+ querySystemIdleTime(callback: (idleTime: number) => void): void;
+ }
+
+ interface PowerSaveBlocker extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/power-save-blocker
+
+ isStarted(id: number): boolean;
+ /**
+ * Starts preventing the system from entering lower-power mode. Returns an integer
+ * identifying the power save blocker. Note: prevent-display-sleep has higher
+ * precedence over prevent-app-suspension. Only the highest precedence type takes
+ * effect. In other words, prevent-display-sleep always takes precedence over
+ * prevent-app-suspension. For example, an API calling A requests for
+ * prevent-app-suspension, and another calling B requests for
+ * prevent-display-sleep. prevent-display-sleep will be used until B stops its
+ * request. After that, prevent-app-suspension is used.
+ */
+ start(type: 'prevent-app-suspension' | 'prevent-display-sleep'): number;
+ /**
+ * Stops the specified power save blocker.
+ */
+ stop(id: number): void;
+ }
+
+ interface PrinterInfo {
+
+ // Docs: http://electronjs.org/docs/api/structures/printer-info
+
+ description: string;
+ isDefault: boolean;
+ name: string;
+ status: number;
+ }
+
+ interface ProcessMetric {
+
+ // Docs: http://electronjs.org/docs/api/structures/process-metric
+
+ /**
+ * CPU usage of the process.
+ */
+ cpu: CPUUsage;
+ /**
+ * Process id of the process.
+ */
+ pid: number;
+ /**
+ * Process type (Browser or Tab or GPU etc).
+ */
+ type: string;
+ }
+
+ interface Product {
+
+ // Docs: http://electronjs.org/docs/api/structures/product
+
+ /**
+ * The total size of the content, in bytes.
+ */
+ contentLengths: number[];
+ /**
+ * A string that identifies the version of the content.
+ */
+ contentVersion: string;
+ /**
+ * A Boolean value that indicates whether the App Store has downloadable content
+ * for this product.
+ */
+ downloadable: boolean;
+ /**
+ * The locale formatted price of the product.
+ */
+ formattedPrice: string;
+ /**
+ * A description of the product.
+ */
+ localizedDescription: string;
+ /**
+ * The name of the product.
+ */
+ localizedTitle: string;
+ /**
+ * The cost of the product in the local currency.
+ */
+ price: number;
+ /**
+ * The string that identifies the product to the Apple App Store.
+ */
+ productIdentifier: string;
+ }
+
+ interface Protocol extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/protocol
+
+ /**
+ * Intercepts scheme protocol and uses handler as the protocol's new handler which
+ * sends a Buffer as a response.
+ */
+ interceptBufferProtocol(scheme: string, handler: (request: InterceptBufferProtocolRequest, callback: (buffer?: Buffer) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Intercepts scheme protocol and uses handler as the protocol's new handler which
+ * sends a file as a response.
+ */
+ interceptFileProtocol(scheme: string, handler: (request: InterceptFileProtocolRequest, callback: (filePath: string) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Intercepts scheme protocol and uses handler as the protocol's new handler which
+ * sends a new HTTP request as a response.
+ */
+ interceptHttpProtocol(scheme: string, handler: (request: InterceptHttpProtocolRequest, callback: (redirectRequest: RedirectRequest) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Same as protocol.registerStreamProtocol, except that it replaces an existing
+ * protocol handler.
+ */
+ interceptStreamProtocol(scheme: string, handler: (request: InterceptStreamProtocolRequest, callback: (stream?: (NodeJS.ReadableStream) | (StreamProtocolResponse)) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Intercepts scheme protocol and uses handler as the protocol's new handler which
+ * sends a String as a response.
+ */
+ interceptStringProtocol(scheme: string, handler: (request: InterceptStringProtocolRequest, callback: (data?: string) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * The callback will be called with a boolean that indicates whether there is
+ * already a handler for scheme.
+ */
+ isProtocolHandled(scheme: string, callback: (error: Error) => void): void;
+ /**
+ * Registers a protocol of scheme that will send a Buffer as a response. The usage
+ * is the same with registerFileProtocol, except that the callback should be called
+ * with either a Buffer object or an object that has the data, mimeType, and
+ * charset properties. Example:
+ */
+ registerBufferProtocol(scheme: string, handler: (request: RegisterBufferProtocolRequest, callback: (buffer?: (Buffer) | (MimeTypedBuffer)) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Registers a protocol of scheme that will send the file as a response. The
+ * handler will be called with handler(request, callback) when a request is going
+ * to be created with scheme. completion will be called with completion(null) when
+ * scheme is successfully registered or completion(error) when failed. To handle
+ * the request, the callback should be called with either the file's path or an
+ * object that has a path property, e.g. callback(filePath) or callback({ path:
+ * filePath }). When callback is called with nothing, a number, or an object that
+ * has an error property, the request will fail with the error number you
+ * specified. For the available error numbers you can use, please see the net error
+ * list. By default the scheme is treated like http:, which is parsed differently
+ * than protocols that follow the "generic URI syntax" like file:, so you probably
+ * want to call protocol.registerStandardSchemes to have your scheme treated as a
+ * standard scheme.
+ */
+ registerFileProtocol(scheme: string, handler: (request: RegisterFileProtocolRequest, callback: (filePath?: string) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Registers a protocol of scheme that will send an HTTP request as a response. The
+ * usage is the same with registerFileProtocol, except that the callback should be
+ * called with a redirectRequest object that has the url, method, referrer,
+ * uploadData and session properties. By default the HTTP request will reuse the
+ * current session. If you want the request to have a different session you should
+ * set session to null. For POST requests the uploadData object must be provided.
+ */
+ registerHttpProtocol(scheme: string, handler: (request: RegisterHttpProtocolRequest, callback: (redirectRequest: RedirectRequest) => void) => void, completion?: (error: Error) => void): void;
+ registerServiceWorkerSchemes(schemes: string[]): void;
+ /**
+ * A standard scheme adheres to what RFC 3986 calls generic URI syntax. For example
+ * http and https are standard schemes, while file is not. Registering a scheme as
+ * standard, will allow relative and absolute resources to be resolved correctly
+ * when served. Otherwise the scheme will behave like the file protocol, but
+ * without the ability to resolve relative URLs. For example when you load
+ * following page with custom protocol without registering it as standard scheme,
+ * the image will not be loaded because non-standard schemes can not recognize
+ * relative URLs: Registering a scheme as standard will allow access to files
+ * through the FileSystem API. Otherwise the renderer will throw a security error
+ * for the scheme. By default web storage apis (localStorage, sessionStorage,
+ * webSQL, indexedDB, cookies) are disabled for non standard schemes. So in general
+ * if you want to register a custom protocol to replace the http protocol, you have
+ * to register it as a standard scheme: Note: This method can only be used before
+ * the ready event of the app module gets emitted.
+ */
+ registerStandardSchemes(schemes: string[], options?: RegisterStandardSchemesOptions): void;
+ /**
+ * Registers a protocol of scheme that will send a Readable as a response. The
+ * usage is similar to the other register{Any}Protocol, except that the callback
+ * should be called with either a Readable object or an object that has the data,
+ * statusCode, and headers properties. Example: It is possible to pass any object
+ * that implements the readable stream API (emits data/end/error events). For
+ * example, here's how a file could be returned:
+ */
+ registerStreamProtocol(scheme: string, handler: (request: RegisterStreamProtocolRequest, callback: (stream?: (NodeJS.ReadableStream) | (StreamProtocolResponse)) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Registers a protocol of scheme that will send a String as a response. The usage
+ * is the same with registerFileProtocol, except that the callback should be called
+ * with either a String or an object that has the data, mimeType, and charset
+ * properties.
+ */
+ registerStringProtocol(scheme: string, handler: (request: RegisterStringProtocolRequest, callback: (data?: string) => void) => void, completion?: (error: Error) => void): void;
+ /**
+ * Remove the interceptor installed for scheme and restore its original handler.
+ */
+ uninterceptProtocol(scheme: string, completion?: (error: Error) => void): void;
+ /**
+ * Unregisters the custom protocol of scheme.
+ */
+ unregisterProtocol(scheme: string, completion?: (error: Error) => void): void;
+ }
+
+ interface Rectangle {
+
+ // Docs: http://electronjs.org/docs/api/structures/rectangle
+
+ /**
+ * The height of the rectangle (must be an integer).
+ */
+ height: number;
+ /**
+ * The width of the rectangle (must be an integer).
+ */
+ width: number;
+ /**
+ * The x coordinate of the origin of the rectangle (must be an integer).
+ */
+ x: number;
+ /**
+ * The y coordinate of the origin of the rectangle (must be an integer).
+ */
+ y: number;
+ }
+
+ interface Referrer {
+
+ // Docs: http://electronjs.org/docs/api/structures/referrer
+
+ /**
+ * Can be default, unsafe-url, no-referrer-when-downgrade, no-referrer, origin,
+ * strict-origin-when-cross-origin, same-origin or strict-origin. See the for more
+ * details on the meaning of these values.
+ */
+ policy: ('default' | 'unsafe-url' | 'no-referrer-when-downgrade' | 'no-referrer' | 'origin' | 'strict-origin-when-cross-origin' | 'same-origin' | 'strict-origin');
+ /**
+ * HTTP Referrer URL.
+ */
+ url: string;
+ }
+
+ interface Remote extends MainInterface {
+
+ // Docs: http://electronjs.org/docs/api/remote
+
+ getCurrentWebContents(): WebContents;
+ /**
+ * Note: Do not use removeAllListeners on BrowserWindow. Use of this can remove all
+ * blur listeners, disable click events on touch bar buttons, and other unintended
+ * consequences.
+ */
+ getCurrentWindow(): BrowserWindow;
+ getGlobal(name: string): any;
+ /**
+ * e.g.
+ */
+ require(module: string): any;
+ /**
+ * The process object in the main process. This is the same as
+ * remote.getGlobal('process') but is cached.
+ */
+ process?: any;
+ }
+
+ interface RemoveClientCertificate {
+
+ // Docs: http://electronjs.org/docs/api/structures/remove-client-certificate
+
+ /**
+ * Origin of the server whose associated client certificate must be removed from
+ * the cache.
+ */
+ origin: string;
+ /**
+ * clientCertificate.
+ */
+ type: string;
+ }
+
+ interface RemovePassword {
+
+ // Docs: http://electronjs.org/docs/api/structures/remove-password
+
+ /**
+ * When provided, the authentication info related to the origin will only be
+ * removed otherwise the entire cache will be cleared.
+ */
+ origin?: string;
+ /**
+ * Credentials of the authentication. Must be provided if removing by origin.
+ */
+ password?: string;
+ /**
+ * Realm of the authentication. Must be provided if removing by origin.
+ */
+ realm?: string;
+ /**
+ * Scheme of the authentication. Can be basic, digest, ntlm, negotiate. Must be
+ * provided if removing by origin.
+ */
+ scheme?: ('basic' | 'digest' | 'ntlm' | 'negotiate');
+ /**
+ * password.
+ */
+ type: string;
+ /**
+ * Credentials of the authentication. Must be provided if removing by origin.
+ */
+ username?: string;
+ }
+
+ interface Screen extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/screen
+
+ /**
+ * Emitted when newDisplay has been added.
+ */
+ on(event: 'display-added', listener: (event: Event,
+ newDisplay: Display) => void): this;
+ once(event: 'display-added', listener: (event: Event,
+ newDisplay: Display) => void): this;
+ addListener(event: 'display-added', listener: (event: Event,
+ newDisplay: Display) => void): this;
+ removeListener(event: 'display-added', listener: (event: Event,
+ newDisplay: Display) => void): this;
+ /**
+ * Emitted when one or more metrics change in a display. The changedMetrics is an
+ * array of strings that describe the changes. Possible changes are bounds,
+ * workArea, scaleFactor and rotation.
+ */
+ on(event: 'display-metrics-changed', listener: (event: Event,
+ display: Display,
+ changedMetrics: string[]) => void): this;
+ once(event: 'display-metrics-changed', listener: (event: Event,
+ display: Display,
+ changedMetrics: string[]) => void): this;
+ addListener(event: 'display-metrics-changed', listener: (event: Event,
+ display: Display,
+ changedMetrics: string[]) => void): this;
+ removeListener(event: 'display-metrics-changed', listener: (event: Event,
+ display: Display,
+ changedMetrics: string[]) => void): this;
+ /**
+ * Emitted when oldDisplay has been removed.
+ */
+ on(event: 'display-removed', listener: (event: Event,
+ oldDisplay: Display) => void): this;
+ once(event: 'display-removed', listener: (event: Event,
+ oldDisplay: Display) => void): this;
+ addListener(event: 'display-removed', listener: (event: Event,
+ oldDisplay: Display) => void): this;
+ removeListener(event: 'display-removed', listener: (event: Event,
+ oldDisplay: Display) => void): this;
+ /**
+ * Converts a screen DIP point to a screen physical point. The DPI scale is
+ * performed relative to the display containing the DIP point.
+ */
+ dipToScreenPoint(point: Point): Point;
+ /**
+ * Converts a screen DIP rect to a screen physical rect. The DPI scale is performed
+ * relative to the display nearest to window. If window is null, scaling will be
+ * performed to the display nearest to rect.
+ */
+ dipToScreenRect(window: (BrowserWindow) | (null), rect: Rectangle): Rectangle;
+ getAllDisplays(): Display[];
+ /**
+ * The current absolute position of the mouse pointer.
+ */
+ getCursorScreenPoint(): Point;
+ getDisplayMatching(rect: Rectangle): Display;
+ getDisplayNearestPoint(point: Point): Display;
+ getPrimaryDisplay(): Display;
+ /**
+ * Converts a screen physical point to a screen DIP point. The DPI scale is
+ * performed relative to the display containing the physical point.
+ */
+ screenToDipPoint(point: Point): Point;
+ /**
+ * Converts a screen physical rect to a screen DIP rect. The DPI scale is performed
+ * relative to the display nearest to window. If window is null, scaling will be
+ * performed to the display nearest to rect.
+ */
+ screenToDipRect(window: (BrowserWindow) | (null), rect: Rectangle): Rectangle;
+ }
+
+ interface ScrubberItem {
+
+ // Docs: http://electronjs.org/docs/api/structures/scrubber-item
+
+ /**
+ * The image to appear in this item.
+ */
+ icon?: NativeImage;
+ /**
+ * The text to appear in this item.
+ */
+ label?: string;
+ }
+
+ interface SegmentedControlSegment {
+
+ // Docs: http://electronjs.org/docs/api/structures/segmented-control-segment
+
+ /**
+ * Whether this segment is selectable. Default: true.
+ */
+ enabled?: boolean;
+ /**
+ * The image to appear in this segment.
+ */
+ icon?: NativeImage;
+ /**
+ * The text to appear in this segment.
+ */
+ label?: string;
+ }
+
+ class Session extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/session
+
+ /**
+ * If partition starts with persist:, the page will use a persistent session
+ * available to all pages in the app with the same partition. if there is no
+ * persist: prefix, the page will use an in-memory session. If the partition is
+ * empty then default session of the app will be returned. To create a Session with
+ * options, you have to ensure the Session with the partition has never been used
+ * before. There is no way to change the options of an existing Session object.
+ */
+ static fromPartition(partition: string, options?: FromPartitionOptions): Session;
+ /**
+ * A Session object, the default session object of the app.
+ */
+ static defaultSession?: Session;
+ /**
+ * Emitted when Electron is about to download item in webContents. Calling
+ * event.preventDefault() will cancel the download and item will not be available
+ * from next tick of the process.
+ */
+ on(event: 'will-download', listener: (event: Event,
+ item: DownloadItem,
+ webContents: WebContents) => void): this;
+ once(event: 'will-download', listener: (event: Event,
+ item: DownloadItem,
+ webContents: WebContents) => void): this;
+ addListener(event: 'will-download', listener: (event: Event,
+ item: DownloadItem,
+ webContents: WebContents) => void): this;
+ removeListener(event: 'will-download', listener: (event: Event,
+ item: DownloadItem,
+ webContents: WebContents) => void): this;
+ /**
+ * Dynamically sets whether to always send credentials for HTTP NTLM or Negotiate
+ * authentication.
+ */
+ allowNTLMCredentialsForDomains(domains: string): void;
+ /**
+ * Clears the session’s HTTP authentication cache.
+ */
+ clearAuthCache(options: (RemovePassword) | (RemoveClientCertificate), callback?: Function): void;
+ /**
+ * Clears the session’s HTTP cache.
+ */
+ clearCache(callback: Function): void;
+ /**
+ * Clears the host resolver cache.
+ */
+ clearHostResolverCache(callback?: Function): void;
+ /**
+ * Clears the data of web storages.
+ */
+ clearStorageData(options?: ClearStorageDataOptions, callback?: Function): void;
+ /**
+ * Allows resuming cancelled or interrupted downloads from previous Session. The
+ * API will generate a DownloadItem that can be accessed with the will-download
+ * event. The DownloadItem will not have any WebContents associated with it and the
+ * initial state will be interrupted. The download will start only when the resume
+ * API is called on the DownloadItem.
+ */
+ createInterruptedDownload(options: CreateInterruptedDownloadOptions): void;
+ /**
+ * Disables any network emulation already active for the session. Resets to the
+ * original network configuration.
+ */
+ disableNetworkEmulation(): void;
+ /**
+ * Emulates network with the given configuration for the session.
+ */
+ enableNetworkEmulation(options: EnableNetworkEmulationOptions): void;
+ /**
+ * Writes any unwritten DOMStorage data to disk.
+ */
+ flushStorageData(): void;
+ getBlobData(identifier: string, callback: (result: Buffer) => void): void;
+ /**
+ * Callback is invoked with the session's current cache size.
+ */
+ getCacheSize(callback: (size: number) => void): void;
+ getPreloads(): string[];
+ getUserAgent(): string;
+ /**
+ * Resolves the proxy information for url. The callback will be called with
+ * callback(proxy) when the request is performed.
+ */
+ resolveProxy(url: string, callback: (proxy: string) => void): void;
+ /**
+ * Sets the certificate verify proc for session, the proc will be called with
+ * proc(request, callback) whenever a server certificate verification is requested.
+ * Calling callback(0) accepts the certificate, calling callback(-2) rejects it.
+ * Calling setCertificateVerifyProc(null) will revert back to default certificate
+ * verify proc.
+ */
+ setCertificateVerifyProc(proc: (request: CertificateVerifyProcRequest, callback: (verificationResult: number) => void) => void): void;
+ /**
+ * Sets download saving directory. By default, the download directory will be the
+ * Downloads under the respective app folder.
+ */
+ setDownloadPath(path: string): void;
+ /**
+ * Sets the handler which can be used to respond to permission checks for the
+ * session. Returning true will allow the permission and false will reject it. To
+ * clear the handler, call setPermissionCheckHandler(null).
+ */
+ setPermissionCheckHandler(handler: ((webContents: WebContents, permission: string, requestingOrigin: string, details: PermissionCheckHandlerDetails) => boolean) | (null)): void;
+ /**
+ * Sets the handler which can be used to respond to permission requests for the
+ * session. Calling callback(true) will allow the permission and callback(false)
+ * will reject it. To clear the handler, call setPermissionRequestHandler(null).
+ */
+ setPermissionRequestHandler(handler: ((webContents: WebContents, permission: string, callback: (permissionGranted: boolean) => void, details: PermissionRequestHandlerDetails) => void) | (null)): void;
+ /**
+ * Adds scripts that will be executed on ALL web contents that are associated with
+ * this session just before normal preload scripts run.
+ */
+ setPreloads(preloads: string[]): void;
+ /**
+ * Sets the proxy settings. When pacScript and proxyRules are provided together,
+ * the proxyRules option is ignored and pacScript configuration is applied. The
+ * proxyRules has to follow the rules below: For example: The proxyBypassRules is a
+ * comma separated list of rules described below:
+ */
+ setProxy(config: Config, callback: Function): void;
+ /**
+ * Overrides the userAgent and acceptLanguages for this session. The
+ * acceptLanguages must a comma separated ordered list of language codes, for
+ * example "en-US,fr,de,ko,zh-CN,ja". This doesn't affect existing WebContents, and
+ * each WebContents can use webContents.setUserAgent to override the session-wide
+ * user agent.
+ */
+ setUserAgent(userAgent: string, acceptLanguages?: string): void;
+ cookies: Cookies;
+ netLog: NetLog;
+ protocol: Protocol;
+ webRequest: WebRequest;
+ }
+
+ interface Shell {
+
+ // Docs: http://electronjs.org/docs/api/shell
+
+ /**
+ * Play the beep sound.
+ */
+ beep(): void;
+ /**
+ * Move the given file to trash and returns a boolean status for the operation.
+ */
+ moveItemToTrash(fullPath: string): boolean;
+ /**
+ * Open the given external protocol URL in the desktop's default manner. (For
+ * example, mailto: URLs in the user's default mail agent).
+ */
+ openExternal(url: string, options?: OpenExternalOptions, callback?: (error: Error) => void): boolean;
+ /**
+ * Open the given file in the desktop's default manner.
+ */
+ openItem(fullPath: string): boolean;
+ /**
+ * Resolves the shortcut link at shortcutPath. An exception will be thrown when any
+ * error happens.
+ */
+ readShortcutLink(shortcutPath: string): ShortcutDetails;
+ /**
+ * Show the given file in a file manager. If possible, select the file.
+ */
+ showItemInFolder(fullPath: string): boolean;
+ /**
+ * Creates or updates a shortcut link at shortcutPath.
+ */
+ writeShortcutLink(shortcutPath: string, operation: 'create' | 'update' | 'replace', options: ShortcutDetails): boolean;
+ /**
+ * Creates or updates a shortcut link at shortcutPath.
+ */
+ writeShortcutLink(shortcutPath: string, options: ShortcutDetails): boolean;
+ }
+
+ interface ShortcutDetails {
+
+ // Docs: http://electronjs.org/docs/api/structures/shortcut-details
+
+ /**
+ * The Application User Model ID. Default is empty.
+ */
+ appUserModelId?: string;
+ /**
+ * The arguments to be applied to target when launching from this shortcut. Default
+ * is empty.
+ */
+ args?: string;
+ /**
+ * The working directory. Default is empty.
+ */
+ cwd?: string;
+ /**
+ * The description of the shortcut. Default is empty.
+ */
+ description?: string;
+ /**
+ * The path to the icon, can be a DLL or EXE. icon and iconIndex have to be set
+ * together. Default is empty, which uses the target's icon.
+ */
+ icon?: string;
+ /**
+ * The resource ID of icon when icon is a DLL or EXE. Default is 0.
+ */
+ iconIndex?: number;
+ /**
+ * The target to launch from this shortcut.
+ */
+ target: string;
+ }
+
+ interface Size {
+
+ // Docs: http://electronjs.org/docs/api/structures/size
+
+ height: number;
+ width: number;
+ }
+
+ interface StreamProtocolResponse {
+
+ // Docs: http://electronjs.org/docs/api/structures/stream-protocol-response
+
+ /**
+ * A Node.js readable stream representing the response body.
+ */
+ data: NodeJS.ReadableStream;
+ /**
+ * An object containing the response headers.
+ */
+ headers: Headers;
+ /**
+ * The HTTP response code.
+ */
+ statusCode: number;
+ }
+
+ interface SystemPreferences extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/system-preferences
+
+ on(event: 'accent-color-changed', listener: (event: Event,
+ /**
+ * The new RGBA color the user assigned to be their system accent color.
+ */
+ newColor: string) => void): this;
+ once(event: 'accent-color-changed', listener: (event: Event,
+ /**
+ * The new RGBA color the user assigned to be their system accent color.
+ */
+ newColor: string) => void): this;
+ addListener(event: 'accent-color-changed', listener: (event: Event,
+ /**
+ * The new RGBA color the user assigned to be their system accent color.
+ */
+ newColor: string) => void): this;
+ removeListener(event: 'accent-color-changed', listener: (event: Event,
+ /**
+ * The new RGBA color the user assigned to be their system accent color.
+ */
+ newColor: string) => void): this;
+ on(event: 'color-changed', listener: (event: Event) => void): this;
+ once(event: 'color-changed', listener: (event: Event) => void): this;
+ addListener(event: 'color-changed', listener: (event: Event) => void): this;
+ removeListener(event: 'color-changed', listener: (event: Event) => void): this;
+ on(event: 'inverted-color-scheme-changed', listener: (event: Event,
+ /**
+ * `true` if an inverted color scheme, such as a high contrast theme, is being
+ * used, `false` otherwise.
+ */
+ invertedColorScheme: boolean) => void): this;
+ once(event: 'inverted-color-scheme-changed', listener: (event: Event,
+ /**
+ * `true` if an inverted color scheme, such as a high contrast theme, is being
+ * used, `false` otherwise.
+ */
+ invertedColorScheme: boolean) => void): this;
+ addListener(event: 'inverted-color-scheme-changed', listener: (event: Event,
+ /**
+ * `true` if an inverted color scheme, such as a high contrast theme, is being
+ * used, `false` otherwise.
+ */
+ invertedColorScheme: boolean) => void): this;
+ removeListener(event: 'inverted-color-scheme-changed', listener: (event: Event,
+ /**
+ * `true` if an inverted color scheme, such as a high contrast theme, is being
+ * used, `false` otherwise.
+ */
+ invertedColorScheme: boolean) => void): this;
+ /**
+ * Important: In order to properly leverage this API, you must set the
+ * NSMicrophoneUsageDescription and NSCameraUsageDescription strings in your app's
+ * Info.plist file. The values for these keys will be used to populate the
+ * permission dialogs so that the user will be properly informed as to the purpose
+ * of the permission request. See Electron Application Distribution for more
+ * information about how to set these in the context of Electron. This user consent
+ * was not required until macOS 10.14 Mojave, so this method will always return
+ * true if your system is running 10.13 High Sierra or lower.
+ */
+ askForMediaAccess(mediaType: 'microphone' | 'camera'): Promise<Boolean>;
+ getAccentColor(): string;
+ /**
+ * Gets the macOS appearance setting that you have declared you want for your
+ * application, maps to NSApplication.appearance. You can use the
+ * setAppLevelAppearance API to set this value.
+ */
+ getAppLevelAppearance(): ('dark' | 'light' | 'unknown');
+ getColor(color: '3d-dark-shadow' | '3d-face' | '3d-highlight' | '3d-light' | '3d-shadow' | 'active-border' | 'active-caption' | 'active-caption-gradient' | 'app-workspace' | 'button-text' | 'caption-text' | 'desktop' | 'disabled-text' | 'highlight' | 'highlight-text' | 'hotlight' | 'inactive-border' | 'inactive-caption' | 'inactive-caption-gradient' | 'inactive-caption-text' | 'info-background' | 'info-text' | 'menu' | 'menu-highlight' | 'menubar' | 'menu-text' | 'scrollbar' | 'window' | 'window-frame' | 'window-text'): string;
+ /**
+ * Gets the macOS appearance setting that is currently applied to your application,
+ * maps to NSApplication.effectiveAppearance Please note that until Electron is
+ * built targeting the 10.14 SDK, your application's effectiveAppearance will
+ * default to 'light' and won't inherit the OS preference. In the interim in order
+ * for your application to inherit the OS preference you must set the
+ * NSRequiresAquaSystemAppearance key in your apps Info.plist to false. If you are
+ * using electron-packager or electron-forge just set the enableDarwinDarkMode
+ * packager option to true. See the Electron Packager API for more details.
+ */
+ getEffectiveAppearance(): ('dark' | 'light' | 'unknown');
+ /**
+ * This user consent was not required until macOS 10.14 Mojave, so this method will
+ * always return granted if your system is running 10.13 High Sierra or lower.
+ */
+ getMediaAccessStatus(mediaType: string): ('not-determined' | 'granted' | 'denied' | 'restricted' | 'unknown');
+ /**
+ * Some popular key and types are:
+ */
+ getUserDefault(key: string, type: 'string' | 'boolean' | 'integer' | 'float' | 'double' | 'url' | 'array' | 'dictionary'): any;
+ /**
+ * An example of using it to determine if you should create a transparent window or
+ * not (transparent windows won't work correctly when DWM composition is disabled):
+ */
+ isAeroGlassEnabled(): boolean;
+ isDarkMode(): boolean;
+ isInvertedColorScheme(): boolean;
+ isSwipeTrackingFromScrollEventsEnabled(): boolean;
+ isTrustedAccessibilityClient(prompt: boolean): boolean;
+ /**
+ * Posts event as native notifications of macOS. The userInfo is an Object that
+ * contains the user information dictionary sent along with the notification.
+ */
+ postLocalNotification(event: string, userInfo: any): void;
+ /**
+ * Posts event as native notifications of macOS. The userInfo is an Object that
+ * contains the user information dictionary sent along with the notification.
+ */
+ postNotification(event: string, userInfo: any): void;
+ /**
+ * Posts event as native notifications of macOS. The userInfo is an Object that
+ * contains the user information dictionary sent along with the notification.
+ */
+ postWorkspaceNotification(event: string, userInfo: any): void;
+ /**
+ * Add the specified defaults to your application's NSUserDefaults.
+ */
+ registerDefaults(defaults: any): void;
+ /**
+ * Removes the key in NSUserDefaults. This can be used to restore the default or
+ * global value of a key previously set with setUserDefault.
+ */
+ removeUserDefault(key: string): void;
+ /**
+ * Sets the appearance setting for your application, this should override the
+ * system default and override the value of getEffectiveAppearance.
+ */
+ setAppLevelAppearance(appearance: 'dark' | 'light'): void;
+ /**
+ * Set the value of key in NSUserDefaults. Note that type should match actual type
+ * of value. An exception is thrown if they don't. Some popular key and types are:
+ */
+ setUserDefault(key: string, type: string, value: string): void;
+ /**
+ * Same as subscribeNotification, but uses NSNotificationCenter for local defaults.
+ * This is necessary for events such as NSUserDefaultsDidChangeNotification.
+ */
+ subscribeLocalNotification(event: string, callback: (event: string, userInfo: any) => void): number;
+ /**
+ * Subscribes to native notifications of macOS, callback will be called with
+ * callback(event, userInfo) when the corresponding event happens. The userInfo is
+ * an Object that contains the user information dictionary sent along with the
+ * notification. The id of the subscriber is returned, which can be used to
+ * unsubscribe the event. Under the hood this API subscribes to
+ * NSDistributedNotificationCenter, example values of event are:
+ */
+ subscribeNotification(event: string, callback: (event: string, userInfo: any) => void): number;
+ /**
+ * Same as subscribeNotification, but uses
+ * NSWorkspace.sharedWorkspace.notificationCenter. This is necessary for events
+ * such as NSWorkspaceDidActivateApplicationNotification.
+ */
+ subscribeWorkspaceNotification(event: string, callback: (event: string, userInfo: any) => void): void;
+ /**
+ * Same as unsubscribeNotification, but removes the subscriber from
+ * NSNotificationCenter.
+ */
+ unsubscribeLocalNotification(id: number): void;
+ /**
+ * Removes the subscriber with id.
+ */
+ unsubscribeNotification(id: number): void;
+ /**
+ * Same as unsubscribeNotification, but removes the subscriber from
+ * NSWorkspace.sharedWorkspace.notificationCenter.
+ */
+ unsubscribeWorkspaceNotification(id: number): void;
+ }
+
+ interface Task {
+
+ // Docs: http://electronjs.org/docs/api/structures/task
+
+ /**
+ * The command line arguments when program is executed.
+ */
+ arguments: string;
+ /**
+ * Description of this task.
+ */
+ description: string;
+ /**
+ * The icon index in the icon file. If an icon file consists of two or more icons,
+ * set this value to identify the icon. If an icon file consists of one icon, this
+ * value is 0.
+ */
+ iconIndex: number;
+ /**
+ * The absolute path to an icon to be displayed in a JumpList, which can be an
+ * arbitrary resource file that contains an icon. You can usually specify
+ * process.execPath to show the icon of the program.
+ */
+ iconPath: string;
+ /**
+ * Path of the program to execute, usually you should specify process.execPath
+ * which opens the current program.
+ */
+ program: string;
+ /**
+ * The string to be displayed in a JumpList.
+ */
+ title: string;
+ }
+
+ interface ThumbarButton {
+
+ // Docs: http://electronjs.org/docs/api/structures/thumbar-button
+
+ click: Function;
+ /**
+ * Control specific states and behaviors of the button. By default, it is
+ * ['enabled'].
+ */
+ flags?: string[];
+ /**
+ * The icon showing in thumbnail toolbar.
+ */
+ icon: NativeImage;
+ /**
+ * The text of the button's tooltip.
+ */
+ tooltip?: string;
+ }
+
+ class TouchBarButton extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-button
+
+ constructor(options: TouchBarButtonConstructorOptions);
+ backgroundColor: string;
+ icon: NativeImage;
+ label: string;
+ }
+
+ class TouchBarColorPicker extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-color-picker
+
+ constructor(options: TouchBarColorPickerConstructorOptions);
+ availableColors: string[];
+ selectedColor: string;
+ }
+
+ class TouchBarGroup extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-group
+
+ constructor(options: TouchBarGroupConstructorOptions);
+ }
+
+ class TouchBarLabel extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-label
+
+ constructor(options: TouchBarLabelConstructorOptions);
+ label: string;
+ textColor: string;
+ }
+
+ class TouchBarPopover extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-popover
+
+ constructor(options: TouchBarPopoverConstructorOptions);
+ icon: NativeImage;
+ label: string;
+ }
+
+ class TouchBarScrubber extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-scrubber
+
+ constructor(options: TouchBarScrubberConstructorOptions);
+ continuous: boolean;
+ items: ScrubberItem[];
+ mode: string;
+ overlayStyle: string;
+ selectedStyle: string;
+ showArrowButtons: boolean;
+ }
+
+ class TouchBarSegmentedControl extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-segmented-control
+
+ constructor(options: TouchBarSegmentedControlConstructorOptions);
+ segments: SegmentedControlSegment[];
+ segmentStyle: string;
+ selectedIndex: number;
+ }
+
+ class TouchBarSlider extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-slider
+
+ constructor(options: TouchBarSliderConstructorOptions);
+ label: string;
+ maxValue: number;
+ minValue: number;
+ value: number;
+ }
+
+ class TouchBarSpacer extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar-spacer
+
+ constructor(options: TouchBarSpacerConstructorOptions);
+ }
+
+ class TouchBar extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/touch-bar
+
+ constructor(options: TouchBarConstructorOptions);
+ escapeItem: (TouchBarButton | TouchBarColorPicker | TouchBarGroup | TouchBarLabel | TouchBarPopover | TouchBarScrubber | TouchBarSegmentedControl | TouchBarSlider | TouchBarSpacer | null);
+ static TouchBarButton: typeof TouchBarButton;
+ static TouchBarColorPicker: typeof TouchBarColorPicker;
+ static TouchBarGroup: typeof TouchBarGroup;
+ static TouchBarLabel: typeof TouchBarLabel;
+ static TouchBarPopover: typeof TouchBarPopover;
+ static TouchBarScrubber: typeof TouchBarScrubber;
+ static TouchBarSegmentedControl: typeof TouchBarSegmentedControl;
+ static TouchBarSlider: typeof TouchBarSlider;
+ static TouchBarSpacer: typeof TouchBarSpacer;
+ }
+
+ interface TraceCategoriesAndOptions {
+
+ // Docs: http://electronjs.org/docs/api/structures/trace-categories-and-options
+
+ /**
+ * – is a filter to control what category groups should be traced. A filter can
+ * have an optional prefix to exclude category groups that contain a matching
+ * category. Having both included and excluded category patterns in the same list
+ * is not supported. Examples: test_MyTest*, test_MyTest*,test_OtherStuff,
+ * -excluded_category1,-excluded_category2.
+ */
+ categoryFilter: string;
+ /**
+ * Controls what kind of tracing is enabled, it is a comma-delimited sequence of
+ * the following strings: record-until-full, record-continuously, trace-to-console,
+ * enable-sampling, enable-systrace, e.g. 'record-until-full,enable-sampling'. The
+ * first 3 options are trace recording modes and hence mutually exclusive. If more
+ * than one trace recording modes appear in the traceOptions string, the last one
+ * takes precedence. If none of the trace recording modes are specified, recording
+ * mode is record-until-full. The trace option will first be reset to the default
+ * option (record_mode set to record-until-full, enable_sampling and
+ * enable_systrace set to false) before options parsed from traceOptions are
+ * applied on it.
+ */
+ traceOptions: string;
+ }
+
+ interface TraceConfig {
+
+ // Docs: http://electronjs.org/docs/api/structures/trace-config
+
+ excluded_categories?: string[];
+ included_categories?: string[];
+ memory_dump_config?: MemoryDumpConfig;
+ }
+
+ interface Transaction {
+
+ // Docs: http://electronjs.org/docs/api/structures/transaction
+
+ /**
+ * The error code if an error occurred while processing the transaction.
+ */
+ errorCode: number;
+ /**
+ * The error message if an error occurred while processing the transaction.
+ */
+ errorMessage: string;
+ /**
+ * The identifier of the restored transaction by the App Store.
+ */
+ originalTransactionIdentifier: string;
+ payment: Payment;
+ /**
+ * The date the transaction was added to the App Store’s payment queue.
+ */
+ transactionDate: string;
+ /**
+ * A string that uniquely identifies a successful payment transaction.
+ */
+ transactionIdentifier: string;
+ /**
+ * The transaction state, can be purchasing, purchased, failed, restored or
+ * deferred.
+ */
+ transactionState: ('purchasing' | 'purchased' | 'failed' | 'restored' | 'deferred');
+ }
+
+ class Tray extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/tray
+
+ /**
+ * Emitted when the tray balloon is clicked.
+ */
+ on(event: 'balloon-click', listener: Function): this;
+ once(event: 'balloon-click', listener: Function): this;
+ addListener(event: 'balloon-click', listener: Function): this;
+ removeListener(event: 'balloon-click', listener: Function): this;
+ /**
+ * Emitted when the tray balloon is closed because of timeout or user manually
+ * closes it.
+ */
+ on(event: 'balloon-closed', listener: Function): this;
+ once(event: 'balloon-closed', listener: Function): this;
+ addListener(event: 'balloon-closed', listener: Function): this;
+ removeListener(event: 'balloon-closed', listener: Function): this;
+ /**
+ * Emitted when the tray balloon shows.
+ */
+ on(event: 'balloon-show', listener: Function): this;
+ once(event: 'balloon-show', listener: Function): this;
+ addListener(event: 'balloon-show', listener: Function): this;
+ removeListener(event: 'balloon-show', listener: Function): this;
+ /**
+ * Emitted when the tray icon is clicked.
+ */
+ on(event: 'click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ once(event: 'click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ addListener(event: 'click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ removeListener(event: 'click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ /**
+ * Emitted when the tray icon is double clicked.
+ */
+ on(event: 'double-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ once(event: 'double-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ addListener(event: 'double-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ removeListener(event: 'double-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ /**
+ * Emitted when a drag operation ends on the tray or ends at another location.
+ */
+ on(event: 'drag-end', listener: Function): this;
+ once(event: 'drag-end', listener: Function): this;
+ addListener(event: 'drag-end', listener: Function): this;
+ removeListener(event: 'drag-end', listener: Function): this;
+ /**
+ * Emitted when a drag operation enters the tray icon.
+ */
+ on(event: 'drag-enter', listener: Function): this;
+ once(event: 'drag-enter', listener: Function): this;
+ addListener(event: 'drag-enter', listener: Function): this;
+ removeListener(event: 'drag-enter', listener: Function): this;
+ /**
+ * Emitted when a drag operation exits the tray icon.
+ */
+ on(event: 'drag-leave', listener: Function): this;
+ once(event: 'drag-leave', listener: Function): this;
+ addListener(event: 'drag-leave', listener: Function): this;
+ removeListener(event: 'drag-leave', listener: Function): this;
+ /**
+ * Emitted when any dragged items are dropped on the tray icon.
+ */
+ on(event: 'drop', listener: Function): this;
+ once(event: 'drop', listener: Function): this;
+ addListener(event: 'drop', listener: Function): this;
+ removeListener(event: 'drop', listener: Function): this;
+ /**
+ * Emitted when dragged files are dropped in the tray icon.
+ */
+ on(event: 'drop-files', listener: (event: Event,
+ /**
+ * The paths of the dropped files.
+ */
+ files: string[]) => void): this;
+ once(event: 'drop-files', listener: (event: Event,
+ /**
+ * The paths of the dropped files.
+ */
+ files: string[]) => void): this;
+ addListener(event: 'drop-files', listener: (event: Event,
+ /**
+ * The paths of the dropped files.
+ */
+ files: string[]) => void): this;
+ removeListener(event: 'drop-files', listener: (event: Event,
+ /**
+ * The paths of the dropped files.
+ */
+ files: string[]) => void): this;
+ /**
+ * Emitted when dragged text is dropped in the tray icon.
+ */
+ on(event: 'drop-text', listener: (event: Event,
+ /**
+ * the dropped text string.
+ */
+ text: string) => void): this;
+ once(event: 'drop-text', listener: (event: Event,
+ /**
+ * the dropped text string.
+ */
+ text: string) => void): this;
+ addListener(event: 'drop-text', listener: (event: Event,
+ /**
+ * the dropped text string.
+ */
+ text: string) => void): this;
+ removeListener(event: 'drop-text', listener: (event: Event,
+ /**
+ * the dropped text string.
+ */
+ text: string) => void): this;
+ /**
+ * Emitted when the mouse enters the tray icon.
+ */
+ on(event: 'mouse-enter', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ once(event: 'mouse-enter', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ addListener(event: 'mouse-enter', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ removeListener(event: 'mouse-enter', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ /**
+ * Emitted when the mouse exits the tray icon.
+ */
+ on(event: 'mouse-leave', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ once(event: 'mouse-leave', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ addListener(event: 'mouse-leave', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ removeListener(event: 'mouse-leave', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ /**
+ * Emitted when the mouse moves in the tray icon.
+ */
+ on(event: 'mouse-move', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ once(event: 'mouse-move', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ addListener(event: 'mouse-move', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ removeListener(event: 'mouse-move', listener: (event: Event,
+ /**
+ * The position of the event.
+ */
+ position: Point) => void): this;
+ /**
+ * Emitted when the tray icon is right clicked.
+ */
+ on(event: 'right-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ once(event: 'right-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ addListener(event: 'right-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ removeListener(event: 'right-click', listener: (event: Event,
+ /**
+ * The bounds of tray icon.
+ */
+ bounds: Rectangle) => void): this;
+ constructor(image: (NativeImage) | (string));
+ /**
+ * Destroys the tray icon immediately.
+ */
+ destroy(): void;
+ /**
+ * Displays a tray balloon.
+ */
+ displayBalloon(options: DisplayBalloonOptions): void;
+ /**
+ * The bounds of this tray icon as Object.
+ */
+ getBounds(): Rectangle;
+ getIgnoreDoubleClickEvents(): boolean;
+ isDestroyed(): boolean;
+ /**
+ * Pops up the context menu of the tray icon. When menu is passed, the menu will be
+ * shown instead of the tray icon's context menu. The position is only available on
+ * Windows, and it is (0, 0) by default.
+ */
+ popUpContextMenu(menu?: Menu, position?: Point): void;
+ /**
+ * Sets the context menu for this icon.
+ */
+ setContextMenu(menu: (Menu) | (null)): void;
+ /**
+ * Sets when the tray's icon background becomes highlighted (in blue). Note: You
+ * can use highlightMode with a BrowserWindow by toggling between 'never' and
+ * 'always' modes when the window visibility changes.
+ */
+ setHighlightMode(mode: 'selection' | 'always' | 'never'): void;
+ /**
+ * Sets the option to ignore double click events. Ignoring these events allows you
+ * to detect every individual click of the tray icon. This value is set to false by
+ * default.
+ */
+ setIgnoreDoubleClickEvents(ignore: boolean): void;
+ /**
+ * Sets the image associated with this tray icon.
+ */
+ setImage(image: (NativeImage) | (string)): void;
+ /**
+ * Sets the image associated with this tray icon when pressed on macOS.
+ */
+ setPressedImage(image: (NativeImage) | (string)): void;
+ /**
+ * Sets the title displayed aside of the tray icon in the status bar (Support ANSI
+ * colors).
+ */
+ setTitle(title: string): void;
+ /**
+ * Sets the hover text for this tray icon.
+ */
+ setToolTip(toolTip: string): void;
+ }
+
+ interface UploadBlob {
+
+ // Docs: http://electronjs.org/docs/api/structures/upload-blob
+
+ /**
+ * UUID of blob data to upload.
+ */
+ blobUUID: string;
+ /**
+ * blob.
+ */
+ type: string;
+ }
+
+ interface UploadData {
+
+ // Docs: http://electronjs.org/docs/api/structures/upload-data
+
+ /**
+ * UUID of blob data. Use method to retrieve the data.
+ */
+ blobUUID: string;
+ /**
+ * Content being sent.
+ */
+ bytes: Buffer;
+ /**
+ * Path of file being uploaded.
+ */
+ file: string;
+ }
+
+ interface UploadFile {
+
+ // Docs: http://electronjs.org/docs/api/structures/upload-file
+
+ /**
+ * Path of file to be uploaded.
+ */
+ filePath: string;
+ /**
+ * Number of bytes to read from offset. Defaults to 0.
+ */
+ length: number;
+ /**
+ * Last Modification time in number of seconds since the UNIX epoch.
+ */
+ modificationTime: number;
+ /**
+ * Defaults to 0.
+ */
+ offset: number;
+ /**
+ * file.
+ */
+ type: string;
+ }
+
+ interface UploadRawData {
+
+ // Docs: http://electronjs.org/docs/api/structures/upload-raw-data
+
+ /**
+ * Data to be uploaded.
+ */
+ bytes: Buffer;
+ /**
+ * rawData.
+ */
+ type: string;
+ }
+
+ class WebContents extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/web-contents
+
+ static fromId(id: number): WebContents;
+ static getAllWebContents(): WebContents[];
+ static getFocusedWebContents(): WebContents;
+ /**
+ * Emitted before dispatching the keydown and keyup events in the page. Calling
+ * event.preventDefault will prevent the page keydown/keyup events and the menu
+ * shortcuts. To only prevent the menu shortcuts, use setIgnoreMenuShortcuts:
+ */
+ on(event: 'before-input-event', listener: (event: Event,
+ /**
+ * Input properties.
+ */
+ input: Input) => void): this;
+ once(event: 'before-input-event', listener: (event: Event,
+ /**
+ * Input properties.
+ */
+ input: Input) => void): this;
+ addListener(event: 'before-input-event', listener: (event: Event,
+ /**
+ * Input properties.
+ */
+ input: Input) => void): this;
+ removeListener(event: 'before-input-event', listener: (event: Event,
+ /**
+ * Input properties.
+ */
+ input: Input) => void): this;
+ /**
+ * Emitted when failed to verify the certificate for url. The usage is the same
+ * with the certificate-error event of app.
+ */
+ on(event: 'certificate-error', listener: (event: Event,
+ url: string,
+ /**
+ * The error code.
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ once(event: 'certificate-error', listener: (event: Event,
+ url: string,
+ /**
+ * The error code.
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ addListener(event: 'certificate-error', listener: (event: Event,
+ url: string,
+ /**
+ * The error code.
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ removeListener(event: 'certificate-error', listener: (event: Event,
+ url: string,
+ /**
+ * The error code.
+ */
+ error: string,
+ certificate: Certificate,
+ callback: (isTrusted: boolean) => void) => void): this;
+ /**
+ * Emitted when the associated window logs a console message. Will not be emitted
+ * for windows with offscreen rendering enabled.
+ */
+ on(event: 'console-message', listener: (event: Event,
+ level: number,
+ message: string,
+ line: number,
+ sourceId: string) => void): this;
+ once(event: 'console-message', listener: (event: Event,
+ level: number,
+ message: string,
+ line: number,
+ sourceId: string) => void): this;
+ addListener(event: 'console-message', listener: (event: Event,
+ level: number,
+ message: string,
+ line: number,
+ sourceId: string) => void): this;
+ removeListener(event: 'console-message', listener: (event: Event,
+ level: number,
+ message: string,
+ line: number,
+ sourceId: string) => void): this;
+ /**
+ * Emitted when there is a new context menu that needs to be handled.
+ */
+ on(event: 'context-menu', listener: (event: Event,
+ params: ContextMenuParams) => void): this;
+ once(event: 'context-menu', listener: (event: Event,
+ params: ContextMenuParams) => void): this;
+ addListener(event: 'context-menu', listener: (event: Event,
+ params: ContextMenuParams) => void): this;
+ removeListener(event: 'context-menu', listener: (event: Event,
+ params: ContextMenuParams) => void): this;
+ /**
+ * Emitted when the renderer process crashes or is killed.
+ */
+ on(event: 'crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ once(event: 'crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ addListener(event: 'crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ removeListener(event: 'crashed', listener: (event: Event,
+ killed: boolean) => void): this;
+ /**
+ * Emitted when the cursor's type changes. The type parameter can be default,
+ * crosshair, pointer, text, wait, help, e-resize, n-resize, ne-resize, nw-resize,
+ * s-resize, se-resize, sw-resize, w-resize, ns-resize, ew-resize, nesw-resize,
+ * nwse-resize, col-resize, row-resize, m-panning, e-panning, n-panning,
+ * ne-panning, nw-panning, s-panning, se-panning, sw-panning, w-panning, move,
+ * vertical-text, cell, context-menu, alias, progress, nodrop, copy, none,
+ * not-allowed, zoom-in, zoom-out, grab, grabbing or custom. If the type parameter
+ * is custom, the image parameter will hold the custom cursor image in a
+ * NativeImage, and scale, size and hotspot will hold additional information about
+ * the custom cursor.
+ */
+ on(event: 'cursor-changed', listener: (event: Event,
+ type: string,
+ image?: NativeImage,
+ /**
+ * scaling factor for the custom cursor.
+ */
+ scale?: number,
+ /**
+ * the size of the `image`.
+ */
+ size?: Size,
+ /**
+ * coordinates of the custom cursor's hotspot.
+ */
+ hotspot?: Point) => void): this;
+ once(event: 'cursor-changed', listener: (event: Event,
+ type: string,
+ image?: NativeImage,
+ /**
+ * scaling factor for the custom cursor.
+ */
+ scale?: number,
+ /**
+ * the size of the `image`.
+ */
+ size?: Size,
+ /**
+ * coordinates of the custom cursor's hotspot.
+ */
+ hotspot?: Point) => void): this;
+ addListener(event: 'cursor-changed', listener: (event: Event,
+ type: string,
+ image?: NativeImage,
+ /**
+ * scaling factor for the custom cursor.
+ */
+ scale?: number,
+ /**
+ * the size of the `image`.
+ */
+ size?: Size,
+ /**
+ * coordinates of the custom cursor's hotspot.
+ */
+ hotspot?: Point) => void): this;
+ removeListener(event: 'cursor-changed', listener: (event: Event,
+ type: string,
+ image?: NativeImage,
+ /**
+ * scaling factor for the custom cursor.
+ */
+ scale?: number,
+ /**
+ * the size of the `image`.
+ */
+ size?: Size,
+ /**
+ * coordinates of the custom cursor's hotspot.
+ */
+ hotspot?: Point) => void): this;
+ /**
+ * Emitted when webContents is destroyed.
+ */
+ on(event: 'destroyed', listener: Function): this;
+ once(event: 'destroyed', listener: Function): this;
+ addListener(event: 'destroyed', listener: Function): this;
+ removeListener(event: 'destroyed', listener: Function): this;
+ /**
+ * Emitted when DevTools is closed.
+ */
+ on(event: 'devtools-closed', listener: Function): this;
+ once(event: 'devtools-closed', listener: Function): this;
+ addListener(event: 'devtools-closed', listener: Function): this;
+ removeListener(event: 'devtools-closed', listener: Function): this;
+ /**
+ * Emitted when DevTools is focused / opened.
+ */
+ on(event: 'devtools-focused', listener: Function): this;
+ once(event: 'devtools-focused', listener: Function): this;
+ addListener(event: 'devtools-focused', listener: Function): this;
+ removeListener(event: 'devtools-focused', listener: Function): this;
+ /**
+ * Emitted when DevTools is opened.
+ */
+ on(event: 'devtools-opened', listener: Function): this;
+ once(event: 'devtools-opened', listener: Function): this;
+ addListener(event: 'devtools-opened', listener: Function): this;
+ removeListener(event: 'devtools-opened', listener: Function): this;
+ /**
+ * Emitted when the devtools window instructs the webContents to reload
+ */
+ on(event: 'devtools-reload-page', listener: Function): this;
+ once(event: 'devtools-reload-page', listener: Function): this;
+ addListener(event: 'devtools-reload-page', listener: Function): this;
+ removeListener(event: 'devtools-reload-page', listener: Function): this;
+ /**
+ * Emitted when a <webview> has been attached to this web contents.
+ */
+ on(event: 'did-attach-webview', listener: (event: Event,
+ /**
+ * The guest web contents that is used by the `
+ */
+ webContents: WebContents) => void): this;
+ once(event: 'did-attach-webview', listener: (event: Event,
+ /**
+ * The guest web contents that is used by the `
+ */
+ webContents: WebContents) => void): this;
+ addListener(event: 'did-attach-webview', listener: (event: Event,
+ /**
+ * The guest web contents that is used by the `
+ */
+ webContents: WebContents) => void): this;
+ removeListener(event: 'did-attach-webview', listener: (event: Event,
+ /**
+ * The guest web contents that is used by the `
+ */
+ webContents: WebContents) => void): this;
+ /**
+ * Emitted when a page's theme color changes. This is usually due to encountering a
+ * meta tag:
+ */
+ on(event: 'did-change-theme-color', listener: (event: Event,
+ /**
+ * Theme color is in format of '#rrggbb'. It is `null` when no theme color is set.
+ */
+ color: (string) | (null)) => void): this;
+ once(event: 'did-change-theme-color', listener: (event: Event,
+ /**
+ * Theme color is in format of '#rrggbb'. It is `null` when no theme color is set.
+ */
+ color: (string) | (null)) => void): this;
+ addListener(event: 'did-change-theme-color', listener: (event: Event,
+ /**
+ * Theme color is in format of '#rrggbb'. It is `null` when no theme color is set.
+ */
+ color: (string) | (null)) => void): this;
+ removeListener(event: 'did-change-theme-color', listener: (event: Event,
+ /**
+ * Theme color is in format of '#rrggbb'. It is `null` when no theme color is set.
+ */
+ color: (string) | (null)) => void): this;
+ /**
+ * This event is like did-finish-load but emitted when the load failed or was
+ * cancelled, e.g. window.stop() is invoked. The full list of error codes and their
+ * meaning is available here.
+ */
+ on(event: 'did-fail-load', listener: (event: Event,
+ errorCode: number,
+ errorDescription: string,
+ validatedURL: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ once(event: 'did-fail-load', listener: (event: Event,
+ errorCode: number,
+ errorDescription: string,
+ validatedURL: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ addListener(event: 'did-fail-load', listener: (event: Event,
+ errorCode: number,
+ errorDescription: string,
+ validatedURL: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ removeListener(event: 'did-fail-load', listener: (event: Event,
+ errorCode: number,
+ errorDescription: string,
+ validatedURL: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ /**
+ * Emitted when the navigation is done, i.e. the spinner of the tab has stopped
+ * spinning, and the onload event was dispatched.
+ */
+ on(event: 'did-finish-load', listener: Function): this;
+ once(event: 'did-finish-load', listener: Function): this;
+ addListener(event: 'did-finish-load', listener: Function): this;
+ removeListener(event: 'did-finish-load', listener: Function): this;
+ /**
+ * Emitted when a frame has done navigation.
+ */
+ on(event: 'did-frame-finish-load', listener: (event: Event,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ once(event: 'did-frame-finish-load', listener: (event: Event,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ addListener(event: 'did-frame-finish-load', listener: (event: Event,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ removeListener(event: 'did-frame-finish-load', listener: (event: Event,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ /**
+ * Emitted when any frame navigation is done. This event is not emitted for in-page
+ * navigations, such as clicking anchor links or updating the window.location.hash.
+ * Use did-navigate-in-page event for this purpose.
+ */
+ on(event: 'did-frame-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations,
+ */
+ httpStatusText: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ once(event: 'did-frame-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations,
+ */
+ httpStatusText: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ addListener(event: 'did-frame-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations,
+ */
+ httpStatusText: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ removeListener(event: 'did-frame-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations,
+ */
+ httpStatusText: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ /**
+ * Emitted when a main frame navigation is done. This event is not emitted for
+ * in-page navigations, such as clicking anchor links or updating the
+ * window.location.hash. Use did-navigate-in-page event for this purpose.
+ */
+ on(event: 'did-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations
+ */
+ httpStatusText: string) => void): this;
+ once(event: 'did-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations
+ */
+ httpStatusText: string) => void): this;
+ addListener(event: 'did-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations
+ */
+ httpStatusText: string) => void): this;
+ removeListener(event: 'did-navigate', listener: (event: Event,
+ url: string,
+ /**
+ * -1 for non HTTP navigations
+ */
+ httpResponseCode: number,
+ /**
+ * empty for non HTTP navigations
+ */
+ httpStatusText: string) => void): this;
+ /**
+ * Emitted when an in-page navigation happened in any frame. When in-page
+ * navigation happens, the page URL changes but does not cause navigation outside
+ * of the page. Examples of this occurring are when anchor links are clicked or
+ * when the DOM hashchange event is triggered.
+ */
+ on(event: 'did-navigate-in-page', listener: (event: Event,
+ url: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ once(event: 'did-navigate-in-page', listener: (event: Event,
+ url: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ addListener(event: 'did-navigate-in-page', listener: (event: Event,
+ url: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ removeListener(event: 'did-navigate-in-page', listener: (event: Event,
+ url: string,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ /**
+ * Emitted after a server side redirect occurs during navigation. For example a
+ * 302 redirect. This event can not be prevented, if you want to prevent redirects
+ * you should checkout out the will-redirect event above.
+ */
+ on(event: 'did-redirect-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ once(event: 'did-redirect-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ addListener(event: 'did-redirect-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ removeListener(event: 'did-redirect-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ /**
+ * Corresponds to the points in time when the spinner of the tab started spinning.
+ */
+ on(event: 'did-start-loading', listener: Function): this;
+ once(event: 'did-start-loading', listener: Function): this;
+ addListener(event: 'did-start-loading', listener: Function): this;
+ removeListener(event: 'did-start-loading', listener: Function): this;
+ /**
+ * Emitted when any frame (including main) starts navigating. isInplace will be
+ * true for in-page navigations.
+ */
+ on(event: 'did-start-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ once(event: 'did-start-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ addListener(event: 'did-start-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ removeListener(event: 'did-start-navigation', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ /**
+ * Corresponds to the points in time when the spinner of the tab stopped spinning.
+ */
+ on(event: 'did-stop-loading', listener: Function): this;
+ once(event: 'did-stop-loading', listener: Function): this;
+ addListener(event: 'did-stop-loading', listener: Function): this;
+ removeListener(event: 'did-stop-loading', listener: Function): this;
+ /**
+ * Emitted when the document in the given frame is loaded.
+ */
+ on(event: 'dom-ready', listener: (event: Event) => void): this;
+ once(event: 'dom-ready', listener: (event: Event) => void): this;
+ addListener(event: 'dom-ready', listener: (event: Event) => void): this;
+ removeListener(event: 'dom-ready', listener: (event: Event) => void): this;
+ /**
+ * Emitted when a result is available for [webContents.findInPage] request.
+ */
+ on(event: 'found-in-page', listener: (event: Event,
+ result: Result) => void): this;
+ once(event: 'found-in-page', listener: (event: Event,
+ result: Result) => void): this;
+ addListener(event: 'found-in-page', listener: (event: Event,
+ result: Result) => void): this;
+ removeListener(event: 'found-in-page', listener: (event: Event,
+ result: Result) => void): this;
+ /**
+ * Emitted when webContents wants to do basic auth. The usage is the same with the
+ * login event of app.
+ */
+ on(event: 'login', listener: (event: Event,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ once(event: 'login', listener: (event: Event,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ addListener(event: 'login', listener: (event: Event,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ removeListener(event: 'login', listener: (event: Event,
+ request: Request,
+ authInfo: AuthInfo,
+ callback: (username: string, password: string) => void) => void): this;
+ /**
+ * Emitted when media is paused or done playing.
+ */
+ on(event: 'media-paused', listener: Function): this;
+ once(event: 'media-paused', listener: Function): this;
+ addListener(event: 'media-paused', listener: Function): this;
+ removeListener(event: 'media-paused', listener: Function): this;
+ /**
+ * Emitted when media starts playing.
+ */
+ on(event: 'media-started-playing', listener: Function): this;
+ once(event: 'media-started-playing', listener: Function): this;
+ addListener(event: 'media-started-playing', listener: Function): this;
+ removeListener(event: 'media-started-playing', listener: Function): this;
+ /**
+ * Emitted when the page requests to open a new window for a url. It could be
+ * requested by window.open or an external link like <a target='_blank'>. By
+ * default a new BrowserWindow will be created for the url. Calling
+ * event.preventDefault() will prevent Electron from automatically creating a new
+ * BrowserWindow. If you call event.preventDefault() and manually create a new
+ * BrowserWindow then you must set event.newGuest to reference the new
+ * BrowserWindow instance, failing to do so may result in unexpected behavior. For
+ * example:
+ */
+ on(event: 'new-window', listener: (event: Event,
+ url: string,
+ frameName: string,
+ /**
+ * Can be `default`, `foreground-tab`, `background-tab`, `new-window`,
+ * `save-to-disk` and `other`.
+ */
+ disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'),
+ /**
+ * The options which will be used for creating the new .
+ */
+ options: any,
+ /**
+ * The non-standard features (features not handled by Chromium or Electron) given
+ * to `window.open()`.
+ */
+ additionalFeatures: string[],
+ /**
+ * The referrer that will be passed to the new window. May or may not result in the
+ * `Referer` header being sent, depending on the referrer policy.
+ */
+ referrer: Referrer) => void): this;
+ once(event: 'new-window', listener: (event: Event,
+ url: string,
+ frameName: string,
+ /**
+ * Can be `default`, `foreground-tab`, `background-tab`, `new-window`,
+ * `save-to-disk` and `other`.
+ */
+ disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'),
+ /**
+ * The options which will be used for creating the new .
+ */
+ options: any,
+ /**
+ * The non-standard features (features not handled by Chromium or Electron) given
+ * to `window.open()`.
+ */
+ additionalFeatures: string[],
+ /**
+ * The referrer that will be passed to the new window. May or may not result in the
+ * `Referer` header being sent, depending on the referrer policy.
+ */
+ referrer: Referrer) => void): this;
+ addListener(event: 'new-window', listener: (event: Event,
+ url: string,
+ frameName: string,
+ /**
+ * Can be `default`, `foreground-tab`, `background-tab`, `new-window`,
+ * `save-to-disk` and `other`.
+ */
+ disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'),
+ /**
+ * The options which will be used for creating the new .
+ */
+ options: any,
+ /**
+ * The non-standard features (features not handled by Chromium or Electron) given
+ * to `window.open()`.
+ */
+ additionalFeatures: string[],
+ /**
+ * The referrer that will be passed to the new window. May or may not result in the
+ * `Referer` header being sent, depending on the referrer policy.
+ */
+ referrer: Referrer) => void): this;
+ removeListener(event: 'new-window', listener: (event: Event,
+ url: string,
+ frameName: string,
+ /**
+ * Can be `default`, `foreground-tab`, `background-tab`, `new-window`,
+ * `save-to-disk` and `other`.
+ */
+ disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'),
+ /**
+ * The options which will be used for creating the new .
+ */
+ options: any,
+ /**
+ * The non-standard features (features not handled by Chromium or Electron) given
+ * to `window.open()`.
+ */
+ additionalFeatures: string[],
+ /**
+ * The referrer that will be passed to the new window. May or may not result in the
+ * `Referer` header being sent, depending on the referrer policy.
+ */
+ referrer: Referrer) => void): this;
+ /**
+ * Emitted when page receives favicon urls.
+ */
+ on(event: 'page-favicon-updated', listener: (event: Event,
+ /**
+ * Array of URLs.
+ */
+ favicons: string[]) => void): this;
+ once(event: 'page-favicon-updated', listener: (event: Event,
+ /**
+ * Array of URLs.
+ */
+ favicons: string[]) => void): this;
+ addListener(event: 'page-favicon-updated', listener: (event: Event,
+ /**
+ * Array of URLs.
+ */
+ favicons: string[]) => void): this;
+ removeListener(event: 'page-favicon-updated', listener: (event: Event,
+ /**
+ * Array of URLs.
+ */
+ favicons: string[]) => void): this;
+ /**
+ * Fired when page title is set during navigation. explicitSet is false when title
+ * is synthesized from file url.
+ */
+ on(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ once(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ addListener(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ removeListener(event: 'page-title-updated', listener: (event: Event,
+ title: string,
+ explicitSet: boolean) => void): this;
+ /**
+ * Emitted when a new frame is generated. Only the dirty area is passed in the
+ * buffer.
+ */
+ on(event: 'paint', listener: (event: Event,
+ dirtyRect: Rectangle,
+ /**
+ * The image data of the whole frame.
+ */
+ image: NativeImage) => void): this;
+ once(event: 'paint', listener: (event: Event,
+ dirtyRect: Rectangle,
+ /**
+ * The image data of the whole frame.
+ */
+ image: NativeImage) => void): this;
+ addListener(event: 'paint', listener: (event: Event,
+ dirtyRect: Rectangle,
+ /**
+ * The image data of the whole frame.
+ */
+ image: NativeImage) => void): this;
+ removeListener(event: 'paint', listener: (event: Event,
+ dirtyRect: Rectangle,
+ /**
+ * The image data of the whole frame.
+ */
+ image: NativeImage) => void): this;
+ /**
+ * Emitted when a plugin process has crashed.
+ */
+ on(event: 'plugin-crashed', listener: (event: Event,
+ name: string,
+ version: string) => void): this;
+ once(event: 'plugin-crashed', listener: (event: Event,
+ name: string,
+ version: string) => void): this;
+ addListener(event: 'plugin-crashed', listener: (event: Event,
+ name: string,
+ version: string) => void): this;
+ removeListener(event: 'plugin-crashed', listener: (event: Event,
+ name: string,
+ version: string) => void): this;
+ /**
+ * Emitted when remote.getBuiltin() is called in the renderer process. Calling
+ * event.preventDefault() will prevent the module from being returned. Custom value
+ * can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-builtin', listener: (event: Event,
+ moduleName: string) => void): this;
+ once(event: 'remote-get-builtin', listener: (event: Event,
+ moduleName: string) => void): this;
+ addListener(event: 'remote-get-builtin', listener: (event: Event,
+ moduleName: string) => void): this;
+ removeListener(event: 'remote-get-builtin', listener: (event: Event,
+ moduleName: string) => void): this;
+ /**
+ * Emitted when remote.getCurrentWebContents() is called in the renderer process.
+ * Calling event.preventDefault() will prevent the object from being returned.
+ * Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-current-web-contents', listener: (event: Event) => void): this;
+ once(event: 'remote-get-current-web-contents', listener: (event: Event) => void): this;
+ addListener(event: 'remote-get-current-web-contents', listener: (event: Event) => void): this;
+ removeListener(event: 'remote-get-current-web-contents', listener: (event: Event) => void): this;
+ /**
+ * Emitted when remote.getCurrentWindow() is called in the renderer process.
+ * Calling event.preventDefault() will prevent the object from being returned.
+ * Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-current-window', listener: (event: Event) => void): this;
+ once(event: 'remote-get-current-window', listener: (event: Event) => void): this;
+ addListener(event: 'remote-get-current-window', listener: (event: Event) => void): this;
+ removeListener(event: 'remote-get-current-window', listener: (event: Event) => void): this;
+ /**
+ * Emitted when remote.getGlobal() is called in the renderer process. Calling
+ * event.preventDefault() will prevent the global from being returned. Custom value
+ * can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-global', listener: (event: Event,
+ globalName: string) => void): this;
+ once(event: 'remote-get-global', listener: (event: Event,
+ globalName: string) => void): this;
+ addListener(event: 'remote-get-global', listener: (event: Event,
+ globalName: string) => void): this;
+ removeListener(event: 'remote-get-global', listener: (event: Event,
+ globalName: string) => void): this;
+ /**
+ * Emitted when <webview>.getWebContents() is called in the renderer process.
+ * Calling event.preventDefault() will prevent the object from being returned.
+ * Custom value can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ guestWebContents: WebContents) => void): this;
+ once(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ guestWebContents: WebContents) => void): this;
+ addListener(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ guestWebContents: WebContents) => void): this;
+ removeListener(event: 'remote-get-guest-web-contents', listener: (event: Event,
+ guestWebContents: WebContents) => void): this;
+ /**
+ * Emitted when remote.require() is called in the renderer process. Calling
+ * event.preventDefault() will prevent the module from being returned. Custom value
+ * can be returned by setting event.returnValue.
+ */
+ on(event: 'remote-require', listener: (event: Event,
+ moduleName: string) => void): this;
+ once(event: 'remote-require', listener: (event: Event,
+ moduleName: string) => void): this;
+ addListener(event: 'remote-require', listener: (event: Event,
+ moduleName: string) => void): this;
+ removeListener(event: 'remote-require', listener: (event: Event,
+ moduleName: string) => void): this;
+ /**
+ * Emitted when the unresponsive web page becomes responsive again.
+ */
+ on(event: 'responsive', listener: Function): this;
+ once(event: 'responsive', listener: Function): this;
+ addListener(event: 'responsive', listener: Function): this;
+ removeListener(event: 'responsive', listener: Function): this;
+ /**
+ * Emitted when bluetooth device needs to be selected on call to
+ * navigator.bluetooth.requestDevice. To use navigator.bluetooth api webBluetooth
+ * should be enabled. If event.preventDefault is not called, first available device
+ * will be selected. callback should be called with deviceId to be selected,
+ * passing empty string to callback will cancel the request.
+ */
+ on(event: 'select-bluetooth-device', listener: (event: Event,
+ devices: BluetoothDevice[],
+ callback: (deviceId: string) => void) => void): this;
+ once(event: 'select-bluetooth-device', listener: (event: Event,
+ devices: BluetoothDevice[],
+ callback: (deviceId: string) => void) => void): this;
+ addListener(event: 'select-bluetooth-device', listener: (event: Event,
+ devices: BluetoothDevice[],
+ callback: (deviceId: string) => void) => void): this;
+ removeListener(event: 'select-bluetooth-device', listener: (event: Event,
+ devices: BluetoothDevice[],
+ callback: (deviceId: string) => void) => void): this;
+ /**
+ * Emitted when a client certificate is requested. The usage is the same with the
+ * select-client-certificate event of app.
+ */
+ on(event: 'select-client-certificate', listener: (event: Event,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate: Certificate) => void) => void): this;
+ once(event: 'select-client-certificate', listener: (event: Event,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate: Certificate) => void) => void): this;
+ addListener(event: 'select-client-certificate', listener: (event: Event,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate: Certificate) => void) => void): this;
+ removeListener(event: 'select-client-certificate', listener: (event: Event,
+ url: string,
+ certificateList: Certificate[],
+ callback: (certificate: Certificate) => void) => void): this;
+ /**
+ * Emitted when the web page becomes unresponsive.
+ */
+ on(event: 'unresponsive', listener: Function): this;
+ once(event: 'unresponsive', listener: Function): this;
+ addListener(event: 'unresponsive', listener: Function): this;
+ removeListener(event: 'unresponsive', listener: Function): this;
+ /**
+ * Emitted when mouse moves over a link or the keyboard moves the focus to a link.
+ */
+ on(event: 'update-target-url', listener: (event: Event,
+ url: string) => void): this;
+ once(event: 'update-target-url', listener: (event: Event,
+ url: string) => void): this;
+ addListener(event: 'update-target-url', listener: (event: Event,
+ url: string) => void): this;
+ removeListener(event: 'update-target-url', listener: (event: Event,
+ url: string) => void): this;
+ /**
+ * Emitted when a <webview>'s web contents is being attached to this web contents.
+ * Calling event.preventDefault() will destroy the guest page. This event can be
+ * used to configure webPreferences for the webContents of a <webview> before it's
+ * loaded, and provides the ability to set settings that can't be set via <webview>
+ * attributes. Note: The specified preload script option will be appear as
+ * preloadURL (not preload) in the webPreferences object emitted with this event.
+ */
+ on(event: 'will-attach-webview', listener: (event: Event,
+ /**
+ * The web preferences that will be used by the guest page. This object can be
+ * modified to adjust the preferences for the guest page.
+ */
+ webPreferences: any,
+ /**
+ * The other `
+ */
+ params: any) => void): this;
+ once(event: 'will-attach-webview', listener: (event: Event,
+ /**
+ * The web preferences that will be used by the guest page. This object can be
+ * modified to adjust the preferences for the guest page.
+ */
+ webPreferences: any,
+ /**
+ * The other `
+ */
+ params: any) => void): this;
+ addListener(event: 'will-attach-webview', listener: (event: Event,
+ /**
+ * The web preferences that will be used by the guest page. This object can be
+ * modified to adjust the preferences for the guest page.
+ */
+ webPreferences: any,
+ /**
+ * The other `
+ */
+ params: any) => void): this;
+ removeListener(event: 'will-attach-webview', listener: (event: Event,
+ /**
+ * The web preferences that will be used by the guest page. This object can be
+ * modified to adjust the preferences for the guest page.
+ */
+ webPreferences: any,
+ /**
+ * The other `
+ */
+ params: any) => void): this;
+ /**
+ * Emitted when a user or the page wants to start navigation. It can happen when
+ * the window.location object is changed or a user clicks a link in the page. This
+ * event will not emit when the navigation is started programmatically with APIs
+ * like webContents.loadURL and webContents.back. It is also not emitted for
+ * in-page navigations, such as clicking anchor links or updating the
+ * window.location.hash. Use did-navigate-in-page event for this purpose. Calling
+ * event.preventDefault() will prevent the navigation.
+ */
+ on(event: 'will-navigate', listener: (event: Event,
+ url: string) => void): this;
+ once(event: 'will-navigate', listener: (event: Event,
+ url: string) => void): this;
+ addListener(event: 'will-navigate', listener: (event: Event,
+ url: string) => void): this;
+ removeListener(event: 'will-navigate', listener: (event: Event,
+ url: string) => void): this;
+ /**
+ * Emitted when a beforeunload event handler is attempting to cancel a page unload.
+ * Calling event.preventDefault() will ignore the beforeunload event handler and
+ * allow the page to be unloaded.
+ */
+ on(event: 'will-prevent-unload', listener: (event: Event) => void): this;
+ once(event: 'will-prevent-unload', listener: (event: Event) => void): this;
+ addListener(event: 'will-prevent-unload', listener: (event: Event) => void): this;
+ removeListener(event: 'will-prevent-unload', listener: (event: Event) => void): this;
+ /**
+ * Emitted as a server side redirect occurs during navigation. For example a 302
+ * redirect. This event will be emitted after did-start-navigation and always
+ * before the did-redirect-navigation event for the same navigation. Calling
+ * event.preventDefault() will prevent the navigation (not just the redirect).
+ */
+ on(event: 'will-redirect', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ once(event: 'will-redirect', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ addListener(event: 'will-redirect', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ removeListener(event: 'will-redirect', listener: (event: Event,
+ url: string,
+ isInPlace: boolean,
+ isMainFrame: boolean,
+ frameProcessId: number,
+ frameRoutingId: number) => void): this;
+ /**
+ * Adds the specified path to DevTools workspace. Must be used after DevTools
+ * creation:
+ */
+ addWorkSpace(path: string): void;
+ /**
+ * Begin subscribing for presentation events and captured frames, the callback will
+ * be called with callback(image, dirtyRect) when there is a presentation event.
+ * The image is an instance of NativeImage that stores the captured frame. The
+ * dirtyRect is an object with x, y, width, height properties that describes which
+ * part of the page was repainted. If onlyDirty is set to true, image will only
+ * contain the repainted area. onlyDirty defaults to false.
+ */
+ beginFrameSubscription(callback: (image: NativeImage, dirtyRect: Rectangle) => void): void;
+ /**
+ * Begin subscribing for presentation events and captured frames, the callback will
+ * be called with callback(image, dirtyRect) when there is a presentation event.
+ * The image is an instance of NativeImage that stores the captured frame. The
+ * dirtyRect is an object with x, y, width, height properties that describes which
+ * part of the page was repainted. If onlyDirty is set to true, image will only
+ * contain the repainted area. onlyDirty defaults to false.
+ */
+ beginFrameSubscription(onlyDirty: boolean, callback: (image: NativeImage, dirtyRect: Rectangle) => void): void;
+ canGoBack(): boolean;
+ canGoForward(): boolean;
+ canGoToOffset(offset: number): boolean;
+ /**
+ * Captures a snapshot of the page within rect. Upon completion callback will be
+ * called with callback(image). The image is an instance of NativeImage that stores
+ * data of the snapshot. Omitting rect will capture the whole visible page.
+ */
+ capturePage(rect: Rectangle, callback: (image: NativeImage) => void): void;
+ /**
+ * Captures a snapshot of the page within rect. Upon completion callback will be
+ * called with callback(image). The image is an instance of NativeImage that stores
+ * data of the snapshot. Omitting rect will capture the whole visible page.
+ */
+ capturePage(callback: (image: NativeImage) => void): void;
+ /**
+ * Clears the navigation history.
+ */
+ clearHistory(): void;
+ /**
+ * Closes the devtools.
+ */
+ closeDevTools(): void;
+ /**
+ * Executes the editing command copy in web page.
+ */
+ copy(): void;
+ /**
+ * Copy the image at the given position to the clipboard.
+ */
+ copyImageAt(x: number, y: number): void;
+ /**
+ * Executes the editing command cut in web page.
+ */
+ cut(): void;
+ /**
+ * Executes the editing command delete in web page.
+ */
+ delete(): void;
+ /**
+ * Disable device emulation enabled by webContents.enableDeviceEmulation.
+ */
+ disableDeviceEmulation(): void;
+ /**
+ * Initiates a download of the resource at url without navigating. The
+ * will-download event of session will be triggered.
+ */
+ downloadURL(url: string): void;
+ /**
+ * Enable device emulation with the given parameters.
+ */
+ enableDeviceEmulation(parameters: Parameters): void;
+ /**
+ * End subscribing for frame presentation events.
+ */
+ endFrameSubscription(): void;
+ /**
+ * Evaluates code in page. In the browser window some HTML APIs like
+ * requestFullScreen can only be invoked by a gesture from the user. Setting
+ * userGesture to true will remove this limitation. If the result of the executed
+ * code is a promise the callback result will be the resolved value of the promise.
+ * We recommend that you use the returned Promise to handle code that results in a
+ * Promise.
+ */
+ executeJavaScript(code: string, userGesture?: boolean, callback?: (result: any) => void): Promise<any>;
+ /**
+ * Starts a request to find all matches for the text in the web page. The result of
+ * the request can be obtained by subscribing to found-in-page event.
+ */
+ findInPage(text: string, options?: FindInPageOptions): number;
+ /**
+ * Focuses the web page.
+ */
+ focus(): void;
+ getFrameRate(): number;
+ getOSProcessId(): number;
+ /**
+ * Get the system printer list.
+ */
+ getPrinters(): PrinterInfo[];
+ getProcessId(): number;
+ getTitle(): string;
+ getType(): ('backgroundPage' | 'window' | 'browserView' | 'remote' | 'webview' | 'offscreen');
+ getURL(): string;
+ getUserAgent(): string;
+ getWebRTCIPHandlingPolicy(): string;
+ /**
+ * Sends a request to get current zoom factor, the callback will be called with
+ * callback(zoomFactor).
+ */
+ getZoomFactor(callback: (zoomFactor: number) => void): void;
+ /**
+ * Sends a request to get current zoom level, the callback will be called with
+ * callback(zoomLevel).
+ */
+ getZoomLevel(callback: (zoomLevel: number) => void): void;
+ /**
+ * Makes the browser go back a web page.
+ */
+ goBack(): void;
+ /**
+ * Makes the browser go forward a web page.
+ */
+ goForward(): void;
+ /**
+ * Navigates browser to the specified absolute web page index.
+ */
+ goToIndex(index: number): void;
+ /**
+ * Navigates to the specified offset from the "current entry".
+ */
+ goToOffset(offset: number): void;
+ /**
+ * Checks if any ServiceWorker is registered and returns a boolean as response to
+ * callback.
+ */
+ hasServiceWorker(callback: (hasWorker: boolean) => void): void;
+ /**
+ * Injects CSS into the current web page.
+ */
+ insertCSS(css: string): void;
+ /**
+ * Inserts text to the focused element.
+ */
+ insertText(text: string): void;
+ /**
+ * Starts inspecting element at position (x, y).
+ */
+ inspectElement(x: number, y: number): void;
+ /**
+ * Opens the developer tools for the service worker context.
+ */
+ inspectServiceWorker(): void;
+ /**
+ * Schedules a full repaint of the window this web contents is in. If offscreen
+ * rendering is enabled invalidates the frame and generates a new one through the
+ * 'paint' event.
+ */
+ invalidate(): void;
+ isAudioMuted(): boolean;
+ isCrashed(): boolean;
+ isCurrentlyAudible(): boolean;
+ isDestroyed(): boolean;
+ isDevToolsFocused(): boolean;
+ isDevToolsOpened(): boolean;
+ isFocused(): boolean;
+ isLoading(): boolean;
+ isLoadingMainFrame(): boolean;
+ isOffscreen(): boolean;
+ isPainting(): boolean;
+ isWaitingForResponse(): boolean;
+ /**
+ * Loads the given file in the window, filePath should be a path to an HTML file
+ * relative to the root of your application. For instance an app structure like
+ * this: Would require code like this
+ */
+ loadFile(filePath: string, options?: LoadFileOptions): void;
+ /**
+ * Loads the url in the window. The url must contain the protocol prefix, e.g. the
+ * http:// or file://. If the load should bypass http cache then use the pragma
+ * header to achieve it.
+ */
+ loadURL(url: string, options?: LoadURLOptions): void;
+ /**
+ * Opens the devtools. When contents is a <webview> tag, the mode would be detach
+ * by default, explicitly passing an empty mode can force using last used dock
+ * state.
+ */
+ openDevTools(options?: OpenDevToolsOptions): void;
+ /**
+ * Executes the editing command paste in web page.
+ */
+ paste(): void;
+ /**
+ * Executes the editing command pasteAndMatchStyle in web page.
+ */
+ pasteAndMatchStyle(): void;
+ /**
+ * Prints window's web page. When silent is set to true, Electron will pick the
+ * system's default printer if deviceName is empty and the default settings for
+ * printing. Calling window.print() in web page is equivalent to calling
+ * webContents.print({ silent: false, printBackground: false, deviceName: '' }).
+ * Use page-break-before: always; CSS style to force to print to a new page.
+ */
+ print(options?: PrintOptions, callback?: (success: boolean) => void): void;
+ /**
+ * Prints window's web page as PDF with Chromium's preview printing custom
+ * settings. The callback will be called with callback(error, data) on completion.
+ * The data is a Buffer that contains the generated PDF data. The landscape will be
+ * ignored if @page CSS at-rule is used in the web page. By default, an empty
+ * options will be regarded as: Use page-break-before: always; CSS style to force
+ * to print to a new page. An example of webContents.printToPDF:
+ */
+ printToPDF(options: PrintToPDFOptions, callback: (error: Error, data: Buffer) => void): void;
+ /**
+ * Executes the editing command redo in web page.
+ */
+ redo(): void;
+ /**
+ * Reloads the current web page.
+ */
+ reload(): void;
+ /**
+ * Reloads current page and ignores cache.
+ */
+ reloadIgnoringCache(): void;
+ /**
+ * Removes the specified path from DevTools workspace.
+ */
+ removeWorkSpace(path: string): void;
+ /**
+ * Executes the editing command replace in web page.
+ */
+ replace(text: string): void;
+ /**
+ * Executes the editing command replaceMisspelling in web page.
+ */
+ replaceMisspelling(text: string): void;
+ savePage(fullPath: string, saveType: 'HTMLOnly' | 'HTMLComplete' | 'MHTML', callback: (error: Error) => void): boolean;
+ /**
+ * Executes the editing command selectAll in web page.
+ */
+ selectAll(): void;
+ /**
+ * Send an asynchronous message to renderer process via channel, you can also send
+ * arbitrary arguments. Arguments will be serialized in JSON internally and hence
+ * no functions or prototype chain will be included. The renderer process can
+ * handle the message by listening to channel with the ipcRenderer module. An
+ * example of sending messages from the main process to the renderer process:
+ */
+ send(channel: string, ...args: any[]): void;
+ /**
+ * Sends an input event to the page. Note: The BrowserWindow containing the
+ * contents needs to be focused for sendInputEvent() to work. For keyboard events,
+ * the event object also have following properties: For mouse events, the event
+ * object also have following properties: For the mouseWheel event, the event
+ * object also have following properties:
+ */
+ sendInputEvent(event: Event): void;
+ /**
+ * Mute the audio on the current web page.
+ */
+ setAudioMuted(muted: boolean): void;
+ /**
+ * Controls whether or not this WebContents will throttle animations and timers
+ * when the page becomes backgrounded. This also affects the Page Visibility API.
+ */
+ setBackgroundThrottling(allowed: boolean): void;
+ /**
+ * Uses the devToolsWebContents as the target WebContents to show devtools. The
+ * devToolsWebContents must not have done any navigation, and it should not be used
+ * for other purposes after the call. By default Electron manages the devtools by
+ * creating an internal WebContents with native view, which developers have very
+ * limited control of. With the setDevToolsWebContents method, developers can use
+ * any WebContents to show the devtools in it, including BrowserWindow, BrowserView
+ * and <webview> tag. Note that closing the devtools does not destroy the
+ * devToolsWebContents, it is caller's responsibility to destroy
+ * devToolsWebContents. An example of showing devtools in a <webview> tag: An
+ * example of showing devtools in a BrowserWindow:
+ */
+ setDevToolsWebContents(devToolsWebContents: WebContents): void;
+ /**
+ * If offscreen rendering is enabled sets the frame rate to the specified number.
+ * Only values between 1 and 60 are accepted.
+ */
+ setFrameRate(fps: number): void;
+ /**
+ * Ignore application menu shortcuts while this web contents is focused.
+ */
+ setIgnoreMenuShortcuts(ignore: boolean): void;
+ /**
+ * Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
+ */
+ setLayoutZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
+ /**
+ * Overrides the user agent for this web page.
+ */
+ setUserAgent(userAgent: string): void;
+ /**
+ * Sets the maximum and minimum pinch-to-zoom level.
+ */
+ setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
+ /**
+ * Setting the WebRTC IP handling policy allows you to control which IPs are
+ * exposed via WebRTC. See BrowserLeaks for more details.
+ */
+ setWebRTCIPHandlingPolicy(policy: 'default' | 'default_public_interface_only' | 'default_public_and_private_interfaces' | 'disable_non_proxied_udp'): void;
+ /**
+ * Changes the zoom factor to the specified factor. Zoom factor is zoom percent
+ * divided by 100, so 300% = 3.0.
+ */
+ setZoomFactor(factor: number): void;
+ /**
+ * Changes the zoom level to the specified level. The original size is 0 and each
+ * increment above or below represents zooming 20% larger or smaller to default
+ * limits of 300% and 50% of original size, respectively. The formula for this is
+ * scale := 1.2 ^ level.
+ */
+ setZoomLevel(level: number): void;
+ /**
+ * Shows pop-up dictionary that searches the selected word on the page.
+ */
+ showDefinitionForSelection(): void;
+ /**
+ * Sets the item as dragging item for current drag-drop operation, file is the
+ * absolute path of the file to be dragged, and icon is the image showing under the
+ * cursor when dragging.
+ */
+ startDrag(item: Item): void;
+ /**
+ * If offscreen rendering is enabled and not painting, start painting.
+ */
+ startPainting(): void;
+ /**
+ * Stops any pending navigation.
+ */
+ stop(): void;
+ /**
+ * Stops any findInPage request for the webContents with the provided action.
+ */
+ stopFindInPage(action: 'clearSelection' | 'keepSelection' | 'activateSelection'): void;
+ /**
+ * If offscreen rendering is enabled and painting, stop painting.
+ */
+ stopPainting(): void;
+ /**
+ * Takes a V8 heap snapshot and saves it to filePath.
+ */
+ takeHeapSnapshot(filePath: string): Promise<void>;
+ /**
+ * Toggles the developer tools.
+ */
+ toggleDevTools(): void;
+ /**
+ * Executes the editing command undo in web page.
+ */
+ undo(): void;
+ /**
+ * Unregisters any ServiceWorker if present and returns a boolean as response to
+ * callback when the JS promise is fulfilled or false when the JS promise is
+ * rejected.
+ */
+ unregisterServiceWorker(callback: (success: boolean) => void): void;
+ /**
+ * Executes the editing command unselect in web page.
+ */
+ unselect(): void;
+ debugger: Debugger;
+ devToolsWebContents: WebContents;
+ hostWebContents: WebContents;
+ id: number;
+ session: Session;
+ }
+
+ interface WebFrame extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/web-frame
+
+ /**
+ * Attempts to free memory that is no longer being used (like images from a
+ * previous navigation). Note that blindly calling this method probably makes
+ * Electron slower since it will have to refill these emptied caches, you should
+ * only call it if an event in your app has occurred that makes you think your page
+ * is actually using less memory (i.e. you have navigated from a super heavy page
+ * to a mostly empty one, and intend to stay there).
+ */
+ clearCache(): void;
+ /**
+ * Evaluates code in page. In the browser window some HTML APIs like
+ * requestFullScreen can only be invoked by a gesture from the user. Setting
+ * userGesture to true will remove this limitation.
+ */
+ executeJavaScript(code: string, userGesture?: boolean, callback?: (result: any) => void): Promise<any>;
+ /**
+ * Work like executeJavaScript but evaluates scripts in an isolated context.
+ */
+ executeJavaScriptInIsolatedWorld(worldId: number, scripts: WebSource[], userGesture?: boolean, callback?: (result: any) => void): void;
+ findFrameByName(name: string): WebFrame;
+ findFrameByRoutingId(routingId: number): WebFrame;
+ getFrameForSelector(selector: string): WebFrame;
+ /**
+ * Returns an object describing usage information of Blink's internal memory
+ * caches. This will generate:
+ */
+ getResourceUsage(): ResourceUsage;
+ getZoomFactor(): number;
+ getZoomLevel(): number;
+ /**
+ * Inserts text to the focused element.
+ */
+ insertText(text: string): void;
+ /**
+ * Resources will be loaded from this scheme regardless of the current page's
+ * Content Security Policy.
+ */
+ registerURLSchemeAsBypassingCSP(scheme: string): void;
+ /**
+ * Registers the scheme as secure, bypasses content security policy for resources,
+ * allows registering ServiceWorker and supports fetch API. Specify an option with
+ * the value of false to omit it from the registration. An example of registering a
+ * privileged scheme, without bypassing Content Security Policy:
+ */
+ registerURLSchemeAsPrivileged(scheme: string, options?: RegisterURLSchemeAsPrivilegedOptions): void;
+ /**
+ * Set the content security policy of the isolated world.
+ */
+ setIsolatedWorldContentSecurityPolicy(worldId: number, csp: string): void;
+ /**
+ * Set the name of the isolated world. Useful in devtools.
+ */
+ setIsolatedWorldHumanReadableName(worldId: number, name: string): void;
+ /**
+ * Set the security origin of the isolated world.
+ */
+ setIsolatedWorldSecurityOrigin(worldId: number, securityOrigin: string): void;
+ /**
+ * Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
+ */
+ setLayoutZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
+ /**
+ * Sets a provider for spell checking in input fields and text areas. The provider
+ * must be an object that has a spellCheck method that returns whether the word
+ * passed is correctly spelled. An example of using node-spellchecker as provider:
+ */
+ setSpellCheckProvider(language: string, autoCorrectWord: boolean, provider: Provider): void;
+ /**
+ * Sets the maximum and minimum pinch-to-zoom level.
+ */
+ setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
+ /**
+ * Changes the zoom factor to the specified factor. Zoom factor is zoom percent
+ * divided by 100, so 300% = 3.0.
+ */
+ setZoomFactor(factor: number): void;
+ /**
+ * Changes the zoom level to the specified level. The original size is 0 and each
+ * increment above or below represents zooming 20% larger or smaller to default
+ * limits of 300% and 50% of original size, respectively.
+ */
+ setZoomLevel(level: number): void;
+ /**
+ * A WebFrame representing the first child frame of webFrame, the property would be
+ * null if webFrame has no children or if first child is not in the current
+ * renderer process.
+ */
+ firstChild?: WebFrame;
+ /**
+ * A WebFrame representing next sibling frame, the property would be null if
+ * webFrame is the last frame in its parent or if the next sibling is not in the
+ * current renderer process.
+ */
+ nextSibling?: WebFrame;
+ /**
+ * A WebFrame representing the frame which opened webFrame, the property would be
+ * null if there's no opener or opener is not in the current renderer process.
+ */
+ opener?: WebFrame;
+ /**
+ * A WebFrame representing parent frame of webFrame, the property would be null if
+ * webFrame is top or parent is not in the current renderer process.
+ */
+ parent?: WebFrame;
+ /**
+ * An Integer representing the unique frame id in the current renderer process.
+ * Distinct WebFrame instances that refer to the same underlying frame will have
+ * the same routingId.
+ */
+ routingId?: number;
+ /**
+ * A WebFrame representing top frame in frame hierarchy to which webFrame belongs,
+ * the property would be null if top frame is not in the current renderer process.
+ */
+ top?: WebFrame;
+ }
+
+ class WebRequest extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/web-request
+
+ /**
+ * The listener will be called with listener(details) when a server initiated
+ * redirect is about to occur.
+ */
+ onBeforeRedirect(listener: (details: OnBeforeRedirectDetails) => void): void;
+ /**
+ * The listener will be called with listener(details) when a server initiated
+ * redirect is about to occur.
+ */
+ onBeforeRedirect(filter: OnBeforeRedirectFilter, listener: (details: OnBeforeRedirectDetails) => void): void;
+ /**
+ * The listener will be called with listener(details, callback) when a request is
+ * about to occur. The uploadData is an array of UploadData objects. The callback
+ * has to be called with an response object.
+ */
+ onBeforeRequest(listener: (details: OnBeforeRequestDetails, callback: (response: Response) => void) => void): void;
+ /**
+ * The listener will be called with listener(details, callback) when a request is
+ * about to occur. The uploadData is an array of UploadData objects. The callback
+ * has to be called with an response object.
+ */
+ onBeforeRequest(filter: OnBeforeRequestFilter, listener: (details: OnBeforeRequestDetails, callback: (response: Response) => void) => void): void;
+ /**
+ * The listener will be called with listener(details, callback) before sending an
+ * HTTP request, once the request headers are available. This may occur after a TCP
+ * connection is made to the server, but before any http data is sent. The callback
+ * has to be called with an response object.
+ */
+ onBeforeSendHeaders(filter: OnBeforeSendHeadersFilter, listener: (details: OnBeforeSendHeadersDetails, callback: (response: OnBeforeSendHeadersResponse) => void) => void): void;
+ /**
+ * The listener will be called with listener(details, callback) before sending an
+ * HTTP request, once the request headers are available. This may occur after a TCP
+ * connection is made to the server, but before any http data is sent. The callback
+ * has to be called with an response object.
+ */
+ onBeforeSendHeaders(listener: (details: OnBeforeSendHeadersDetails, callback: (response: OnBeforeSendHeadersResponse) => void) => void): void;
+ /**
+ * The listener will be called with listener(details) when a request is completed.
+ */
+ onCompleted(filter: OnCompletedFilter, listener: (details: OnCompletedDetails) => void): void;
+ /**
+ * The listener will be called with listener(details) when a request is completed.
+ */
+ onCompleted(listener: (details: OnCompletedDetails) => void): void;
+ /**
+ * The listener will be called with listener(details) when an error occurs.
+ */
+ onErrorOccurred(listener: (details: OnErrorOccurredDetails) => void): void;
+ /**
+ * The listener will be called with listener(details) when an error occurs.
+ */
+ onErrorOccurred(filter: OnErrorOccurredFilter, listener: (details: OnErrorOccurredDetails) => void): void;
+ /**
+ * The listener will be called with listener(details, callback) when HTTP response
+ * headers of a request have been received. The callback has to be called with an
+ * response object.
+ */
+ onHeadersReceived(filter: OnHeadersReceivedFilter, listener: (details: OnHeadersReceivedDetails, callback: (response: OnHeadersReceivedResponse) => void) => void): void;
+ /**
+ * The listener will be called with listener(details, callback) when HTTP response
+ * headers of a request have been received. The callback has to be called with an
+ * response object.
+ */
+ onHeadersReceived(listener: (details: OnHeadersReceivedDetails, callback: (response: OnHeadersReceivedResponse) => void) => void): void;
+ /**
+ * The listener will be called with listener(details) when first byte of the
+ * response body is received. For HTTP requests, this means that the status line
+ * and response headers are available.
+ */
+ onResponseStarted(listener: (details: OnResponseStartedDetails) => void): void;
+ /**
+ * The listener will be called with listener(details) when first byte of the
+ * response body is received. For HTTP requests, this means that the status line
+ * and response headers are available.
+ */
+ onResponseStarted(filter: OnResponseStartedFilter, listener: (details: OnResponseStartedDetails) => void): void;
+ /**
+ * The listener will be called with listener(details) just before a request is
+ * going to be sent to the server, modifications of previous onBeforeSendHeaders
+ * response are visible by the time this listener is fired.
+ */
+ onSendHeaders(filter: OnSendHeadersFilter, listener: (details: OnSendHeadersDetails) => void): void;
+ /**
+ * The listener will be called with listener(details) just before a request is
+ * going to be sent to the server, modifications of previous onBeforeSendHeaders
+ * response are visible by the time this listener is fired.
+ */
+ onSendHeaders(listener: (details: OnSendHeadersDetails) => void): void;
+ }
+
+ interface WebSource {
+
+ // Docs: http://electronjs.org/docs/api/structures/web-source
+
+ code: string;
+ /**
+ * Default is 1.
+ */
+ startLine?: number;
+ url?: string;
+ }
+
+ interface WebviewTag extends HTMLElement {
+
+ // Docs: http://electronjs.org/docs/api/webview-tag
+
+ /**
+ * Fired when a load has committed. This includes navigation within the current
+ * document as well as subframe document-level loads, but does not include
+ * asynchronous resource loads.
+ */
+ addEventListener(event: 'load-commit', listener: (event: LoadCommitEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'load-commit', listener: (event: LoadCommitEvent) => void): this;
+ /**
+ * Fired when the navigation is done, i.e. the spinner of the tab will stop
+ * spinning, and the onload event is dispatched.
+ */
+ addEventListener(event: 'did-finish-load', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-finish-load', listener: (event: Event) => void): this;
+ /**
+ * This event is like did-finish-load, but fired when the load failed or was
+ * cancelled, e.g. window.stop() is invoked.
+ */
+ addEventListener(event: 'did-fail-load', listener: (event: DidFailLoadEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-fail-load', listener: (event: DidFailLoadEvent) => void): this;
+ /**
+ * Fired when a frame has done navigation.
+ */
+ addEventListener(event: 'did-frame-finish-load', listener: (event: DidFrameFinishLoadEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-frame-finish-load', listener: (event: DidFrameFinishLoadEvent) => void): this;
+ /**
+ * Corresponds to the points in time when the spinner of the tab starts spinning.
+ */
+ addEventListener(event: 'did-start-loading', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-start-loading', listener: (event: Event) => void): this;
+ /**
+ * Corresponds to the points in time when the spinner of the tab stops spinning.
+ */
+ addEventListener(event: 'did-stop-loading', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-stop-loading', listener: (event: Event) => void): this;
+ /**
+ * Fired when document in the given frame is loaded.
+ */
+ addEventListener(event: 'dom-ready', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'dom-ready', listener: (event: Event) => void): this;
+ /**
+ * Fired when page title is set during navigation. explicitSet is false when title
+ * is synthesized from file url.
+ */
+ addEventListener(event: 'page-title-updated', listener: (event: PageTitleUpdatedEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'page-title-updated', listener: (event: PageTitleUpdatedEvent) => void): this;
+ /**
+ * Fired when page receives favicon urls.
+ */
+ addEventListener(event: 'page-favicon-updated', listener: (event: PageFaviconUpdatedEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'page-favicon-updated', listener: (event: PageFaviconUpdatedEvent) => void): this;
+ /**
+ * Fired when page enters fullscreen triggered by HTML API.
+ */
+ addEventListener(event: 'enter-html-full-screen', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'enter-html-full-screen', listener: (event: Event) => void): this;
+ /**
+ * Fired when page leaves fullscreen triggered by HTML API.
+ */
+ addEventListener(event: 'leave-html-full-screen', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'leave-html-full-screen', listener: (event: Event) => void): this;
+ /**
+ * Fired when the guest window logs a console message. The following example code
+ * forwards all log messages to the embedder's console without regard for log level
+ * or other properties.
+ */
+ addEventListener(event: 'console-message', listener: (event: ConsoleMessageEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'console-message', listener: (event: ConsoleMessageEvent) => void): this;
+ /**
+ * Fired when a result is available for webview.findInPage request.
+ */
+ addEventListener(event: 'found-in-page', listener: (event: FoundInPageEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'found-in-page', listener: (event: FoundInPageEvent) => void): this;
+ /**
+ * Fired when the guest page attempts to open a new browser window. The following
+ * example code opens the new url in system's default browser.
+ */
+ addEventListener(event: 'new-window', listener: (event: NewWindowEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'new-window', listener: (event: NewWindowEvent) => void): this;
+ /**
+ * Emitted when a user or the page wants to start navigation. It can happen when
+ * the window.location object is changed or a user clicks a link in the page. This
+ * event will not emit when the navigation is started programmatically with APIs
+ * like <webview>.loadURL and <webview>.back. It is also not emitted during in-page
+ * navigation, such as clicking anchor links or updating the window.location.hash.
+ * Use did-navigate-in-page event for this purpose. Calling event.preventDefault()
+ * does NOT have any effect.
+ */
+ addEventListener(event: 'will-navigate', listener: (event: WillNavigateEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'will-navigate', listener: (event: WillNavigateEvent) => void): this;
+ /**
+ * Emitted when a navigation is done. This event is not emitted for in-page
+ * navigations, such as clicking anchor links or updating the window.location.hash.
+ * Use did-navigate-in-page event for this purpose.
+ */
+ addEventListener(event: 'did-navigate', listener: (event: DidNavigateEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-navigate', listener: (event: DidNavigateEvent) => void): this;
+ /**
+ * Emitted when an in-page navigation happened. When in-page navigation happens,
+ * the page URL changes but does not cause navigation outside of the page. Examples
+ * of this occurring are when anchor links are clicked or when the DOM hashchange
+ * event is triggered.
+ */
+ addEventListener(event: 'did-navigate-in-page', listener: (event: DidNavigateInPageEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-navigate-in-page', listener: (event: DidNavigateInPageEvent) => void): this;
+ /**
+ * Fired when the guest page attempts to close itself. The following example code
+ * navigates the webview to about:blank when the guest attempts to close itself.
+ */
+ addEventListener(event: 'close', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'close', listener: (event: Event) => void): this;
+ /**
+ * Fired when the guest page has sent an asynchronous message to embedder page.
+ * With sendToHost method and ipc-message event you can communicate between guest
+ * page and embedder page:
+ */
+ addEventListener(event: 'ipc-message', listener: (event: IpcMessageEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'ipc-message', listener: (event: IpcMessageEvent) => void): this;
+ /**
+ * Fired when the renderer process is crashed.
+ */
+ addEventListener(event: 'crashed', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'crashed', listener: (event: Event) => void): this;
+ /**
+ * Fired when a plugin process is crashed.
+ */
+ addEventListener(event: 'plugin-crashed', listener: (event: PluginCrashedEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'plugin-crashed', listener: (event: PluginCrashedEvent) => void): this;
+ /**
+ * Fired when the WebContents is destroyed.
+ */
+ addEventListener(event: 'destroyed', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'destroyed', listener: (event: Event) => void): this;
+ /**
+ * Emitted when media starts playing.
+ */
+ addEventListener(event: 'media-started-playing', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'media-started-playing', listener: (event: Event) => void): this;
+ /**
+ * Emitted when media is paused or done playing.
+ */
+ addEventListener(event: 'media-paused', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'media-paused', listener: (event: Event) => void): this;
+ /**
+ * Emitted when a page's theme color changes. This is usually due to encountering a
+ * meta tag:
+ */
+ addEventListener(event: 'did-change-theme-color', listener: (event: DidChangeThemeColorEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'did-change-theme-color', listener: (event: DidChangeThemeColorEvent) => void): this;
+ /**
+ * Emitted when mouse moves over a link or the keyboard moves the focus to a link.
+ */
+ addEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'update-target-url', listener: (event: UpdateTargetUrlEvent) => void): this;
+ /**
+ * Emitted when DevTools is opened.
+ */
+ addEventListener(event: 'devtools-opened', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'devtools-opened', listener: (event: Event) => void): this;
+ /**
+ * Emitted when DevTools is closed.
+ */
+ addEventListener(event: 'devtools-closed', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'devtools-closed', listener: (event: Event) => void): this;
+ /**
+ * Emitted when DevTools is focused / opened.
+ */
+ addEventListener(event: 'devtools-focused', listener: (event: Event) => void, useCapture?: boolean): this;
+ removeEventListener(event: 'devtools-focused', listener: (event: Event) => void): this;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ canGoBack(): boolean;
+ canGoForward(): boolean;
+ canGoToOffset(offset: number): boolean;
+ /**
+ * Captures a snapshot of the webview's page. Same as
+ * webContents.capturePage([rect, ]callback).
+ */
+ capturePage(callback: (image: NativeImage) => void): void;
+ /**
+ * Captures a snapshot of the webview's page. Same as
+ * webContents.capturePage([rect, ]callback).
+ */
+ capturePage(rect: Rectangle, callback: (image: NativeImage) => void): void;
+ /**
+ * Clears the navigation history.
+ */
+ clearHistory(): void;
+ /**
+ * Closes the DevTools window of guest page.
+ */
+ closeDevTools(): void;
+ /**
+ * Executes editing command copy in page.
+ */
+ copy(): void;
+ /**
+ * Executes editing command cut in page.
+ */
+ cut(): void;
+ /**
+ * Executes editing command delete in page.
+ */
+ delete(): void;
+ /**
+ * Initiates a download of the resource at url without navigating.
+ */
+ downloadURL(url: string): void;
+ /**
+ * Evaluates code in page. If userGesture is set, it will create the user gesture
+ * context in the page. HTML APIs like requestFullScreen, which require user
+ * action, can take advantage of this option for automation.
+ */
+ executeJavaScript(code: string, userGesture?: boolean, callback?: (result: any) => void): void;
+ /**
+ * Starts a request to find all matches for the text in the web page. The result of
+ * the request can be obtained by subscribing to found-in-page event.
+ */
+ findInPage(text: string, options?: FindInPageOptions): number;
+ getTitle(): string;
+ getURL(): string;
+ getUserAgent(): string;
+ /**
+ * It depends on the remote module, it is therefore not available when this module
+ * is disabled.
+ */
+ getWebContents(): WebContents;
+ /**
+ * Sends a request to get current zoom factor, the callback will be called with
+ * callback(zoomFactor).
+ */
+ getZoomFactor(callback: (zoomFactor: number) => void): void;
+ /**
+ * Sends a request to get current zoom level, the callback will be called with
+ * callback(zoomLevel).
+ */
+ getZoomLevel(callback: (zoomLevel: number) => void): void;
+ /**
+ * Makes the guest page go back.
+ */
+ goBack(): void;
+ /**
+ * Makes the guest page go forward.
+ */
+ goForward(): void;
+ /**
+ * Navigates to the specified absolute index.
+ */
+ goToIndex(index: number): void;
+ /**
+ * Navigates to the specified offset from the "current entry".
+ */
+ goToOffset(offset: number): void;
+ /**
+ * Injects CSS into the guest page.
+ */
+ insertCSS(css: string): void;
+ /**
+ * Inserts text to the focused element.
+ */
+ insertText(text: string): void;
+ /**
+ * Starts inspecting element at position (x, y) of guest page.
+ */
+ inspectElement(x: number, y: number): void;
+ /**
+ * Opens the DevTools for the service worker context present in the guest page.
+ */
+ inspectServiceWorker(): void;
+ isAudioMuted(): boolean;
+ isCrashed(): boolean;
+ isCurrentlyAudible(): boolean;
+ isDevToolsFocused(): boolean;
+ isDevToolsOpened(): boolean;
+ isLoading(): boolean;
+ isLoadingMainFrame(): boolean;
+ isWaitingForResponse(): boolean;
+ /**
+ * Loads the url in the webview, the url must contain the protocol prefix, e.g. the
+ * http:// or file://.
+ */
+ loadURL(url: string, options?: LoadURLOptions): void;
+ /**
+ * Opens a DevTools window for guest page.
+ */
+ openDevTools(): void;
+ /**
+ * Executes editing command paste in page.
+ */
+ paste(): void;
+ /**
+ * Executes editing command pasteAndMatchStyle in page.
+ */
+ pasteAndMatchStyle(): void;
+ /**
+ * Prints webview's web page. Same as webContents.print([options]).
+ */
+ print(options?: PrintOptions): void;
+ /**
+ * Prints webview's web page as PDF, Same as webContents.printToPDF(options,
+ * callback).
+ */
+ printToPDF(options: PrintToPDFOptions, callback: (error: Error, data: Buffer) => void): void;
+ /**
+ * Executes editing command redo in page.
+ */
+ redo(): void;
+ /**
+ * Reloads the guest page.
+ */
+ reload(): void;
+ /**
+ * Reloads the guest page and ignores cache.
+ */
+ reloadIgnoringCache(): void;
+ /**
+ * Executes editing command replace in page.
+ */
+ replace(text: string): void;
+ /**
+ * Executes editing command replaceMisspelling in page.
+ */
+ replaceMisspelling(text: string): void;
+ /**
+ * Executes editing command selectAll in page.
+ */
+ selectAll(): void;
+ /**
+ * Send an asynchronous message to renderer process via channel, you can also send
+ * arbitrary arguments. The renderer process can handle the message by listening to
+ * the channel event with the ipcRenderer module. See webContents.send for
+ * examples.
+ */
+ send(channel: string, ...args: any[]): void;
+ /**
+ * Sends an input event to the page. See webContents.sendInputEvent for detailed
+ * description of event object.
+ */
+ sendInputEvent(event: any): void;
+ /**
+ * Set guest page muted.
+ */
+ setAudioMuted(muted: boolean): void;
+ /**
+ * Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
+ */
+ setLayoutZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
+ /**
+ * Overrides the user agent for the guest page.
+ */
+ setUserAgent(userAgent: string): void;
+ /**
+ * Sets the maximum and minimum pinch-to-zoom level.
+ */
+ setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void;
+ /**
+ * Changes the zoom factor to the specified factor. Zoom factor is zoom percent
+ * divided by 100, so 300% = 3.0.
+ */
+ setZoomFactor(factor: number): void;
+ /**
+ * Changes the zoom level to the specified level. The original size is 0 and each
+ * increment above or below represents zooming 20% larger or smaller to default
+ * limits of 300% and 50% of original size, respectively. The formula for this is
+ * scale := 1.2 ^ level.
+ */
+ setZoomLevel(level: number): void;
+ /**
+ * Shows pop-up dictionary that searches the selected word on the page.
+ */
+ showDefinitionForSelection(): void;
+ /**
+ * Stops any pending navigation.
+ */
+ stop(): void;
+ /**
+ * Stops any findInPage request for the webview with the provided action.
+ */
+ stopFindInPage(action: 'clearSelection' | 'keepSelection' | 'activateSelection'): void;
+ /**
+ * Executes editing command undo in page.
+ */
+ undo(): void;
+ /**
+ * Executes editing command unselect in page.
+ */
+ unselect(): void;
+ /**
+ * When this attribute is present the guest page will be allowed to open new
+ * windows. Popups are disabled by default.
+ */
+ allowpopups?: string;
+ /**
+ * When this attribute is present the webview container will automatically resize
+ * within the bounds specified by the attributes minwidth, minheight, maxwidth, and
+ * maxheight. These constraints do not impact the webview unless autosize is
+ * enabled. When autosize is enabled, the webview container size cannot be less
+ * than the minimum values or greater than the maximum.
+ */
+ autosize?: string;
+ /**
+ * A list of strings which specifies the blink features to be disabled separated by
+ * ,. The full list of supported feature strings can be found in the
+ * RuntimeEnabledFeatures.json5 file.
+ */
+ disableblinkfeatures?: string;
+ /**
+ * When this attribute is present the guest page will have web security disabled.
+ * Web security is enabled by default.
+ */
+ disablewebsecurity?: string;
+ /**
+ * A list of strings which specifies the blink features to be enabled separated by
+ * ,. The full list of supported feature strings can be found in the
+ * RuntimeEnabledFeatures.json5 file.
+ */
+ enableblinkfeatures?: string;
+ /**
+ * When this attribute is false the guest page in webview will not have access to
+ * the remote module. The remote module is avaiable by default.
+ */
+ enableremotemodule?: string;
+ /**
+ * Sets the referrer URL for the guest page.
+ */
+ httpreferrer?: string;
+ /**
+ * When this attribute is present the guest page in webview will have node
+ * integration and can use node APIs like require and process to access low level
+ * system resources. Node integration is disabled by default in the guest page.
+ */
+ nodeintegration?: string;
+ /**
+ * Sets the session used by the page. If partition starts with persist:, the page
+ * will use a persistent session available to all pages in the app with the same
+ * partition. if there is no persist: prefix, the page will use an in-memory
+ * session. By assigning the same partition, multiple pages can share the same
+ * session. If the partition is unset then default session of the app will be used.
+ * This value can only be modified before the first navigation, since the session
+ * of an active renderer process cannot change. Subsequent attempts to modify the
+ * value will fail with a DOM exception.
+ */
+ partition?: string;
+ /**
+ * When this attribute is present the guest page in webview will be able to use
+ * browser plugins. Plugins are disabled by default.
+ */
+ plugins?: string;
+ /**
+ * Specifies a script that will be loaded before other scripts run in the guest
+ * page. The protocol of script's URL must be either file: or asar:, because it
+ * will be loaded by require in guest page under the hood. When the guest page
+ * doesn't have node integration this script will still have access to all Node
+ * APIs, but global objects injected by Node will be deleted after this script has
+ * finished executing. Note: This option will be appear as preloadURL (not preload)
+ * in the webPreferences specified to the will-attach-webview event.
+ */
+ preload?: string;
+ /**
+ * Returns the visible URL. Writing to this attribute initiates top-level
+ * navigation. Assigning src its own value will reload the current page. The src
+ * attribute can also accept data URLs, such as data:text/plain,Hello, world!.
+ */
+ src?: string;
+ /**
+ * Sets the user agent for the guest page before the page is navigated to. Once the
+ * page is loaded, use the setUserAgent method to change the user agent.
+ */
+ useragent?: string;
+ /**
+ * A list of strings which specifies the web preferences to be set on the webview,
+ * separated by ,. The full list of supported preference strings can be found in
+ * BrowserWindow. The string follows the same format as the features string in
+ * window.open. A name by itself is given a true boolean value. A preference can be
+ * set to another value by including an =, followed by the value. Special values
+ * yes and 1 are interpreted as true, while no and 0 are interpreted as false.
+ */
+ webpreferences?: string;
+ }
+
+ interface AboutPanelOptionsOptions {
+ /**
+ * The app's name.
+ */
+ applicationName?: string;
+ /**
+ * The app's version.
+ */
+ applicationVersion?: string;
+ /**
+ * Copyright information.
+ */
+ copyright?: string;
+ /**
+ * Credit information.
+ */
+ credits?: string;
+ /**
+ * The app's build version number.
+ */
+ version?: string;
+ }
+
+ interface AddRepresentationOptions {
+ /**
+ * The scale factor to add the image representation for.
+ */
+ scaleFactor: number;
+ /**
+ * Defaults to 0. Required if a bitmap buffer is specified as buffer.
+ */
+ width?: number;
+ /**
+ * Defaults to 0. Required if a bitmap buffer is specified as buffer.
+ */
+ height?: number;
+ /**
+ * The buffer containing the raw image data.
+ */
+ buffer?: Buffer;
+ /**
+ * The data URL containing either a base 64 encoded PNG or JPEG image.
+ */
+ dataURL?: string;
+ }
+
+ interface AppDetailsOptions {
+ /**
+ * Window's . It has to be set, otherwise the other options will have no effect.
+ */
+ appId?: string;
+ /**
+ * Window's .
+ */
+ appIconPath?: string;
+ /**
+ * Index of the icon in appIconPath. Ignored when appIconPath is not set. Default
+ * is 0.
+ */
+ appIconIndex?: number;
+ /**
+ * Window's .
+ */
+ relaunchCommand?: string;
+ /**
+ * Window's .
+ */
+ relaunchDisplayName?: string;
+ }
+
+ interface AuthInfo {
+ isProxy: boolean;
+ scheme: string;
+ host: string;
+ port: number;
+ realm: string;
+ }
+
+ interface AutoResizeOptions {
+ /**
+ * If true, the view's width will grow and shrink together with the window. false
+ * by default.
+ */
+ width: boolean;
+ /**
+ * If true, the view's height will grow and shrink together with the window. false
+ * by default.
+ */
+ height: boolean;
+ }
+
+ interface BitmapOptions {
+ /**
+ * Defaults to 1.0.
+ */
+ scaleFactor?: number;
+ }
+
+ interface BrowserViewConstructorOptions {
+ /**
+ * See .
+ */
+ webPreferences?: WebPreferences;
+ }
+
+ interface BrowserWindowConstructorOptions {
+ /**
+ * Window's width in pixels. Default is 800.
+ */
+ width?: number;
+ /**
+ * Window's height in pixels. Default is 600.
+ */
+ height?: number;
+ /**
+ * ( if y is used) Window's left offset from screen. Default is to center the
+ * window.
+ */
+ x?: number;
+ /**
+ * ( if x is used) Window's top offset from screen. Default is to center the
+ * window.
+ */
+ y?: number;
+ /**
+ * The width and height would be used as web page's size, which means the actual
+ * window's size will include window frame's size and be slightly larger. Default
+ * is false.
+ */
+ useContentSize?: boolean;
+ /**
+ * Show window in the center of the screen.
+ */
+ center?: boolean;
+ /**
+ * Window's minimum width. Default is 0.
+ */
+ minWidth?: number;
+ /**
+ * Window's minimum height. Default is 0.
+ */
+ minHeight?: number;
+ /**
+ * Window's maximum width. Default is no limit.
+ */
+ maxWidth?: number;
+ /**
+ * Window's maximum height. Default is no limit.
+ */
+ maxHeight?: number;
+ /**
+ * Whether window is resizable. Default is true.
+ */
+ resizable?: boolean;
+ /**
+ * Whether window is movable. This is not implemented on Linux. Default is true.
+ */
+ movable?: boolean;
+ /**
+ * Whether window is minimizable. This is not implemented on Linux. Default is
+ * true.
+ */
+ minimizable?: boolean;
+ /**
+ * Whether window is maximizable. This is not implemented on Linux. Default is
+ * true.
+ */
+ maximizable?: boolean;
+ /**
+ * Whether window is closable. This is not implemented on Linux. Default is true.
+ */
+ closable?: boolean;
+ /**
+ * Whether the window can be focused. Default is true. On Windows setting
+ * focusable: false also implies setting skipTaskbar: true. On Linux setting
+ * focusable: false makes the window stop interacting with wm, so the window will
+ * always stay on top in all workspaces.
+ */
+ focusable?: boolean;
+ /**
+ * Whether the window should always stay on top of other windows. Default is false.
+ */
+ alwaysOnTop?: boolean;
+ /**
+ * Whether the window should show in fullscreen. When explicitly set to false the
+ * fullscreen button will be hidden or disabled on macOS. Default is false.
+ */
+ fullscreen?: boolean;
+ /**
+ * Whether the window can be put into fullscreen mode. On macOS, also whether the
+ * maximize/zoom button should toggle full screen mode or maximize window. Default
+ * is true.
+ */
+ fullscreenable?: boolean;
+ /**
+ * Use pre-Lion fullscreen on macOS. Default is false.
+ */
+ simpleFullscreen?: boolean;
+ /**
+ * Whether to show the window in taskbar. Default is false.
+ */
+ skipTaskbar?: boolean;
+ /**
+ * The kiosk mode. Default is false.
+ */
+ kiosk?: boolean;
+ /**
+ * Default window title. Default is "Electron".
+ */
+ title?: string;
+ /**
+ * The window icon. On Windows it is recommended to use ICO icons to get best
+ * visual effects, you can also leave it undefined so the executable's icon will be
+ * used.
+ */
+ icon?: (NativeImage) | (string);
+ /**
+ * Whether window should be shown when created. Default is true.
+ */
+ show?: boolean;
+ /**
+ * Specify false to create a . Default is true.
+ */
+ frame?: boolean;
+ /**
+ * Specify parent window. Default is null.
+ */
+ parent?: BrowserWindow;
+ /**
+ * Whether this is a modal window. This only works when the window is a child
+ * window. Default is false.
+ */
+ modal?: boolean;
+ /**
+ * Whether the web view accepts a single mouse-down event that simultaneously
+ * activates the window. Default is false.
+ */
+ acceptFirstMouse?: boolean;
+ /**
+ * Whether to hide cursor when typing. Default is false.
+ */
+ disableAutoHideCursor?: boolean;
+ /**
+ * Auto hide the menu bar unless the Alt key is pressed. Default is false.
+ */
+ autoHideMenuBar?: boolean;
+ /**
+ * Enable the window to be resized larger than screen. Default is false.
+ */
+ enableLargerThanScreen?: boolean;
+ /**
+ * Window's background color as a hexadecimal value, like #66CD00 or #FFF or
+ * #80FFFFFF (alpha is supported if transparent is set to true). Default is #FFF
+ * (white).
+ */
+ backgroundColor?: string;
+ /**
+ * Whether window should have a shadow. This is only implemented on macOS. Default
+ * is true.
+ */
+ hasShadow?: boolean;
+ /**
+ * Set the initial opacity of the window, between 0.0 (fully transparent) and 1.0
+ * (fully opaque). This is only implemented on Windows and macOS.
+ */
+ opacity?: number;
+ /**
+ * Forces using dark theme for the window, only works on some GTK+3 desktop
+ * environments. Default is false.
+ */
+ darkTheme?: boolean;
+ /**
+ * Makes the window . Default is false.
+ */
+ transparent?: boolean;
+ /**
+ * The type of window, default is normal window. See more about this below.
+ */
+ type?: string;
+ /**
+ * The style of window title bar. Default is default. Possible values are:
+ */
+ titleBarStyle?: ('default' | 'hidden' | 'hiddenInset' | 'customButtonsOnHover');
+ /**
+ * Shows the title in the title bar in full screen mode on macOS for all
+ * titleBarStyle options. Default is false.
+ */
+ fullscreenWindowTitle?: boolean;
+ /**
+ * Use WS_THICKFRAME style for frameless windows on Windows, which adds standard
+ * window frame. Setting it to false will remove window shadow and window
+ * animations. Default is true.
+ */
+ thickFrame?: boolean;
+ /**
+ * Add a type of vibrancy effect to the window, only on macOS. Can be
+ * appearance-based, light, dark, titlebar, selection, menu, popover, sidebar,
+ * medium-light or ultra-dark. Please note that using frame: false in combination
+ * with a vibrancy value requires that you use a non-default titleBarStyle as well.
+ */
+ vibrancy?: ('appearance-based' | 'light' | 'dark' | 'titlebar' | 'selection' | 'menu' | 'popover' | 'sidebar' | 'medium-light' | 'ultra-dark');
+ /**
+ * Controls the behavior on macOS when option-clicking the green stoplight button
+ * on the toolbar or by clicking the Window > Zoom menu item. If true, the window
+ * will grow to the preferred width of the web page when zoomed, false will cause
+ * it to zoom to the width of the screen. This will also affect the behavior when
+ * calling maximize() directly. Default is false.
+ */
+ zoomToPageWidth?: boolean;
+ /**
+ * Tab group name, allows opening the window as a native tab on macOS 10.12+.
+ * Windows with the same tabbing identifier will be grouped together. This also
+ * adds a native new tab button to your window's tab bar and allows your app and
+ * window to receive the new-window-for-tab event.
+ */
+ tabbingIdentifier?: string;
+ /**
+ * Settings of web page's features.
+ */
+ webPreferences?: WebPreferences;
+ }
+
+ interface CertificateTrustDialogOptions {
+ /**
+ * The certificate to trust/import.
+ */
+ certificate: Certificate;
+ /**
+ * The message to display to the user.
+ */
+ message: string;
+ }
+
+ interface CertificateVerifyProcRequest {
+ hostname: string;
+ certificate: Certificate;
+ /**
+ * Verification result from chromium.
+ */
+ verificationResult: string;
+ /**
+ * Error code.
+ */
+ errorCode: number;
+ }
+
+ interface ClearStorageDataOptions {
+ /**
+ * Should follow window.location.origin’s representation scheme://host:port.
+ */
+ origin?: string;
+ /**
+ * The types of storages to clear, can contain: appcache, cookies, filesystem,
+ * indexdb, localstorage, shadercache, websql, serviceworkers, cachestorage.
+ */
+ storages?: string[];
+ /**
+ * The types of quotas to clear, can contain: temporary, persistent, syncable.
+ */
+ quotas?: string[];
+ }
+
+ interface CommandLine {
+ /**
+ * Append a switch (with optional value) to Chromium's command line. Note: This
+ * will not affect process.argv, and is mainly used by developers to control some
+ * low-level Chromium behaviors.
+ */
+ appendSwitch: (the_switch: string, value?: string) => void;
+ /**
+ * Append an argument to Chromium's command line. The argument will be quoted
+ * correctly. Note: This will not affect process.argv.
+ */
+ appendArgument: (value: string) => void;
+ }
+
+ interface Config {
+ /**
+ * The URL associated with the PAC file.
+ */
+ pacScript: string;
+ /**
+ * Rules indicating which proxies to use.
+ */
+ proxyRules: string;
+ /**
+ * Rules indicating which URLs should bypass the proxy settings.
+ */
+ proxyBypassRules: string;
+ }
+
+ interface ConsoleMessageEvent extends Event {
+ level: number;
+ message: string;
+ line: number;
+ sourceId: string;
+ }
+
+ interface ContextMenuParams {
+ /**
+ * x coordinate.
+ */
+ x: number;
+ /**
+ * y coordinate.
+ */
+ y: number;
+ /**
+ * URL of the link that encloses the node the context menu was invoked on.
+ */
+ linkURL: string;
+ /**
+ * Text associated with the link. May be an empty string if the contents of the
+ * link are an image.
+ */
+ linkText: string;
+ /**
+ * URL of the top level page that the context menu was invoked on.
+ */
+ pageURL: string;
+ /**
+ * URL of the subframe that the context menu was invoked on.
+ */
+ frameURL: string;
+ /**
+ * Source URL for the element that the context menu was invoked on. Elements with
+ * source URLs are images, audio and video.
+ */
+ srcURL: string;
+ /**
+ * Type of the node the context menu was invoked on. Can be none, image, audio,
+ * video, canvas, file or plugin.
+ */
+ mediaType: ('none' | 'image' | 'audio' | 'video' | 'canvas' | 'file' | 'plugin');
+ /**
+ * Whether the context menu was invoked on an image which has non-empty contents.
+ */
+ hasImageContents: boolean;
+ /**
+ * Whether the context is editable.
+ */
+ isEditable: boolean;
+ /**
+ * Text of the selection that the context menu was invoked on.
+ */
+ selectionText: string;
+ /**
+ * Title or alt text of the selection that the context was invoked on.
+ */
+ titleText: string;
+ /**
+ * The misspelled word under the cursor, if any.
+ */
+ misspelledWord: string;
+ /**
+ * The character encoding of the frame on which the menu was invoked.
+ */
+ frameCharset: string;
+ /**
+ * If the context menu was invoked on an input field, the type of that field.
+ * Possible values are none, plainText, password, other.
+ */
+ inputFieldType: string;
+ /**
+ * Input source that invoked the context menu. Can be none, mouse, keyboard, touch
+ * or touchMenu.
+ */
+ menuSourceType: ('none' | 'mouse' | 'keyboard' | 'touch' | 'touchMenu');
+ /**
+ * The flags for the media element the context menu was invoked on.
+ */
+ mediaFlags: MediaFlags;
+ /**
+ * These flags indicate whether the renderer believes it is able to perform the
+ * corresponding action.
+ */
+ editFlags: EditFlags;
+ }
+
+ interface CrashReporterStartOptions {
+ companyName: string;
+ /**
+ * URL that crash reports will be sent to as POST.
+ */
+ submitURL: string;
+ /**
+ * Defaults to app.getName().
+ */
+ productName?: string;
+ /**
+ * Whether crash reports should be sent to the server Default is true.
+ */
+ uploadToServer?: boolean;
+ /**
+ * Default is false.
+ */
+ ignoreSystemCrashHandler?: boolean;
+ /**
+ * An object you can define that will be sent along with the report. Only string
+ * properties are sent correctly. Nested objects are not supported and the property
+ * names and values must be less than 64 characters long.
+ */
+ extra?: Extra;
+ /**
+ * Directory to store the crashreports temporarily (only used when the crash
+ * reporter is started via process.crashReporter.start).
+ */
+ crashesDirectory?: string;
+ }
+
+ interface CreateFromBufferOptions {
+ /**
+ * Required for bitmap buffers.
+ */
+ width?: number;
+ /**
+ * Required for bitmap buffers.
+ */
+ height?: number;
+ /**
+ * Defaults to 1.0.
+ */
+ scaleFactor?: number;
+ }
+
+ interface CreateInterruptedDownloadOptions {
+ /**
+ * Absolute path of the download.
+ */
+ path: string;
+ /**
+ * Complete URL chain for the download.
+ */
+ urlChain: string[];
+ mimeType?: string;
+ /**
+ * Start range for the download.
+ */
+ offset: number;
+ /**
+ * Total length of the download.
+ */
+ length: number;
+ /**
+ * Last-Modified header value.
+ */
+ lastModified: string;
+ /**
+ * ETag header value.
+ */
+ eTag: string;
+ /**
+ * Time when download was started in number of seconds since UNIX epoch.
+ */
+ startTime?: number;
+ }
+
+ interface Data {
+ text?: string;
+ html?: string;
+ image?: NativeImage;
+ rtf?: string;
+ /**
+ * The title of the url at text.
+ */
+ bookmark?: string;
+ }
+
+ interface Details {
+ /**
+ * The url to associate the cookie with.
+ */
+ url: string;
+ /**
+ * The name of the cookie. Empty by default if omitted.
+ */
+ name?: string;
+ /**
+ * The value of the cookie. Empty by default if omitted.
+ */
+ value?: string;
+ /**
+ * The domain of the cookie; this will be normalized with a preceding dot so that
+ * it's also valid for subdomains. Empty by default if omitted.
+ */
+ domain?: string;
+ /**
+ * The path of the cookie. Empty by default if omitted.
+ */
+ path?: string;
+ /**
+ * Whether the cookie should be marked as Secure. Defaults to false.
+ */
+ secure?: boolean;
+ /**
+ * Whether the cookie should be marked as HTTP only. Defaults to false.
+ */
+ httpOnly?: boolean;
+ /**
+ * The expiration date of the cookie as the number of seconds since the UNIX epoch.
+ * If omitted then the cookie becomes a session cookie and will not be retained
+ * between sessions.
+ */
+ expirationDate?: number;
+ }
+
+ interface DevToolsExtensions {
+ }
+
+ interface DidChangeThemeColorEvent extends Event {
+ themeColor: string;
+ }
+
+ interface DidFailLoadEvent extends Event {
+ errorCode: number;
+ errorDescription: string;
+ validatedURL: string;
+ isMainFrame: boolean;
+ }
+
+ interface DidFrameFinishLoadEvent extends Event {
+ isMainFrame: boolean;
+ }
+
+ interface DidNavigateEvent extends Event {
+ url: string;
+ }
+
+ interface DidNavigateInPageEvent extends Event {
+ isMainFrame: boolean;
+ url: string;
+ }
+
+ interface DisplayBalloonOptions {
+ /**
+ * -
+ */
+ icon?: (NativeImage) | (string);
+ title: string;
+ content: string;
+ }
+
+ interface Dock {
+ /**
+ * When critical is passed, the dock icon will bounce until either the application
+ * becomes active or the request is canceled. When informational is passed, the
+ * dock icon will bounce for one second. However, the request remains active until
+ * either the application becomes active or the request is canceled.
+ */
+ bounce: (type?: 'critical' | 'informational') => number;
+ /**
+ * Cancel the bounce of id.
+ */
+ cancelBounce: (id: number) => void;
+ /**
+ * Bounces the Downloads stack if the filePath is inside the Downloads folder.
+ */
+ downloadFinished: (filePath: string) => void;
+ /**
+ * Sets the string to be displayed in the dock’s badging area.
+ */
+ setBadge: (text: string) => void;
+ getBadge: () => string;
+ /**
+ * Hides the dock icon.
+ */
+ hide: () => void;
+ /**
+ * Shows the dock icon.
+ */
+ show: () => void;
+ isVisible: () => boolean;
+ /**
+ * Sets the application's dock menu.
+ */
+ setMenu: (menu: Menu) => void;
+ /**
+ * Sets the image associated with this dock icon.
+ */
+ setIcon: (image: (NativeImage) | (string)) => void;
+ }
+
+ interface EnableNetworkEmulationOptions {
+ /**
+ * Whether to emulate network outage. Defaults to false.
+ */
+ offline?: boolean;
+ /**
+ * RTT in ms. Defaults to 0 which will disable latency throttling.
+ */
+ latency?: number;
+ /**
+ * Download rate in Bps. Defaults to 0 which will disable download throttling.
+ */
+ downloadThroughput?: number;
+ /**
+ * Upload rate in Bps. Defaults to 0 which will disable upload throttling.
+ */
+ uploadThroughput?: number;
+ }
+
+ interface Extensions {
+ }
+
+ interface FeedURLOptions {
+ url: string;
+ /**
+ * HTTP request headers.
+ */
+ headers?: Headers;
+ /**
+ * Either json or default, see the README for more information.
+ */
+ serverType?: string;
+ }
+
+ interface FileIconOptions {
+ size: ('small' | 'normal' | 'large');
+ }
+
+ interface Filter {
+ /**
+ * Retrieves cookies which are associated with url. Empty implies retrieving
+ * cookies of all urls.
+ */
+ url?: string;
+ /**
+ * Filters cookies by name.
+ */
+ name?: string;
+ /**
+ * Retrieves cookies whose domains match or are subdomains of domains.
+ */
+ domain?: string;
+ /**
+ * Retrieves cookies whose path matches path.
+ */
+ path?: string;
+ /**
+ * Filters cookies by their Secure property.
+ */
+ secure?: boolean;
+ /**
+ * Filters out session or persistent cookies.
+ */
+ session?: boolean;
+ }
+
+ interface FindInPageOptions {
+ /**
+ * Whether to search forward or backward, defaults to true.
+ */
+ forward?: boolean;
+ /**
+ * Whether the operation is first request or a follow up, defaults to false.
+ */
+ findNext?: boolean;
+ /**
+ * Whether search should be case-sensitive, defaults to false.
+ */
+ matchCase?: boolean;
+ /**
+ * Whether to look only at the start of words. defaults to false.
+ */
+ wordStart?: boolean;
+ /**
+ * When combined with wordStart, accepts a match in the middle of a word if the
+ * match begins with an uppercase letter followed by a lowercase or non-letter.
+ * Accepts several other intra-word matches, defaults to false.
+ */
+ medialCapitalAsWordStart?: boolean;
+ }
+
+ interface FoundInPageEvent extends Event {
+ result: FoundInPageResult;
+ }
+
+ interface FromPartitionOptions {
+ /**
+ * Whether to enable cache.
+ */
+ cache: boolean;
+ }
+
+ interface Header {
+ /**
+ * Specify an extra header name.
+ */
+ name: string;
+ }
+
+ interface Headers {
+ }
+
+ interface HeapStatistics {
+ totalHeapSize: number;
+ totalHeapSizeExecutable: number;
+ totalPhysicalSize: number;
+ totalAvailableSize: number;
+ usedHeapSize: number;
+ heapSizeLimit: number;
+ mallocedMemory: number;
+ peakMallocedMemory: number;
+ doesZapGarbage: boolean;
+ }
+
+ interface IgnoreMouseEventsOptions {
+ /**
+ * If true, forwards mouse move messages to Chromium, enabling mouse related events
+ * such as mouseleave. Only used when ignore is true. If ignore is false,
+ * forwarding is always disabled regardless of this value.
+ */
+ forward?: boolean;
+ }
+
+ interface ImportCertificateOptions {
+ /**
+ * Path for the pkcs12 file.
+ */
+ certificate: string;
+ /**
+ * Passphrase for the certificate.
+ */
+ password: string;
+ }
+
+ interface Input {
+ /**
+ * Either keyUp or keyDown.
+ */
+ type: string;
+ /**
+ * Equivalent to .
+ */
+ key: string;
+ /**
+ * Equivalent to .
+ */
+ code: string;
+ /**
+ * Equivalent to .
+ */
+ isAutoRepeat: boolean;
+ /**
+ * Equivalent to .
+ */
+ shift: boolean;
+ /**
+ * Equivalent to .
+ */
+ control: boolean;
+ /**
+ * Equivalent to .
+ */
+ alt: boolean;
+ /**
+ * Equivalent to .
+ */
+ meta: boolean;
+ }
+
+ interface InterceptBufferProtocolRequest {
+ url: string;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface InterceptFileProtocolRequest {
+ url: string;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface InterceptHttpProtocolRequest {
+ url: string;
+ headers: Headers;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface InterceptStreamProtocolRequest {
+ url: string;
+ headers: Headers;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface InterceptStringProtocolRequest {
+ url: string;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface IpcMessageEvent extends Event {
+ channel: string;
+ args: any[];
+ }
+
+ interface Item {
+ /**
+ * or files Array The path(s) to the file(s) being dragged.
+ */
+ file: string;
+ /**
+ * The image must be non-empty on macOS.
+ */
+ icon: NativeImage;
+ }
+
+ interface JumpListSettings {
+ /**
+ * The minimum number of items that will be shown in the Jump List (for a more
+ * detailed description of this value see the ).
+ */
+ minItems: number;
+ /**
+ * Array of JumpListItem objects that correspond to items that the user has
+ * explicitly removed from custom categories in the Jump List. These items must not
+ * be re-added to the Jump List in the call to app.setJumpList(), Windows will not
+ * display any custom category that contains any of the removed items.
+ */
+ removedItems: JumpListItem[];
+ }
+
+ interface LoadCommitEvent extends Event {
+ url: string;
+ isMainFrame: boolean;
+ }
+
+ interface LoadFileOptions {
+ /**
+ * Passed to url.format().
+ */
+ query?: Query;
+ /**
+ * Passed to url.format().
+ */
+ search?: string;
+ /**
+ * Passed to url.format().
+ */
+ hash?: string;
+ }
+
+ interface LoadURLOptions {
+ /**
+ * An HTTP Referrer url.
+ */
+ httpReferrer?: (string) | (Referrer);
+ /**
+ * A user agent originating the request.
+ */
+ userAgent?: string;
+ /**
+ * Extra headers separated by "\n"
+ */
+ extraHeaders?: string;
+ postData?: (UploadRawData[]) | (UploadFile[]) | (UploadBlob[]);
+ /**
+ * Base url (with trailing path separator) for files to be loaded by the data url.
+ * This is needed only if the specified url is a data url and needs to load other
+ * files.
+ */
+ baseURLForDataURL?: string;
+ }
+
+ interface LoginItemSettings {
+ options?: Options;
+ /**
+ * true if the app is set to open at login.
+ */
+ openAtLogin: boolean;
+ /**
+ * true if the app is set to open as hidden at login. This setting is not available
+ * on .
+ */
+ openAsHidden: boolean;
+ /**
+ * true if the app was opened at login automatically. This setting is not available
+ * on .
+ */
+ wasOpenedAtLogin: boolean;
+ /**
+ * true if the app was opened as a hidden login item. This indicates that the app
+ * should not open any windows at startup. This setting is not available on .
+ */
+ wasOpenedAsHidden: boolean;
+ /**
+ * true if the app was opened as a login item that should restore the state from
+ * the previous session. This indicates that the app should restore the windows
+ * that were open the last time the app was closed. This setting is not available
+ * on .
+ */
+ restoreState: boolean;
+ }
+
+ interface LoginItemSettingsOptions {
+ /**
+ * The executable path to compare against. Defaults to process.execPath.
+ */
+ path?: string;
+ /**
+ * The command-line arguments to compare against. Defaults to an empty array.
+ */
+ args?: string[];
+ }
+
+ interface MemoryDumpConfig {
+ }
+
+ interface MenuItemConstructorOptions {
+ /**
+ * Will be called with click(menuItem, browserWindow, event) when the menu item is
+ * clicked.
+ */
+ click?: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => void;
+ /**
+ * Define the action of the menu item, when specified the click property will be
+ * ignored. See .
+ */
+ role?: string;
+ /**
+ * Can be normal, separator, submenu, checkbox or radio.
+ */
+ type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
+ label?: string;
+ sublabel?: string;
+ accelerator?: Accelerator;
+ icon?: (NativeImage) | (string);
+ /**
+ * If false, the menu item will be greyed out and unclickable.
+ */
+ enabled?: boolean;
+ /**
+ * If false, the menu item will be entirely hidden.
+ */
+ visible?: boolean;
+ /**
+ * Should only be specified for checkbox or radio type menu items.
+ */
+ checked?: boolean;
+ /**
+ * If false, the accelerator won't be registered with the system, but it will still
+ * be displayed. Defaults to true.
+ */
+ registerAccelerator?: boolean;
+ /**
+ * Should be specified for submenu type menu items. If submenu is specified, the
+ * type: 'submenu' can be omitted. If the value is not a then it will be
+ * automatically converted to one using Menu.buildFromTemplate.
+ */
+ submenu?: (MenuItemConstructorOptions[]) | (Menu);
+ /**
+ * Unique within a single menu. If defined then it can be used as a reference to
+ * this item by the position attribute.
+ */
+ id?: string;
+ /**
+ * Inserts this item before the item with the specified label. If the referenced
+ * item doesn't exist the item will be inserted at the end of the menu. Also
+ * implies that the menu item in question should be placed in the same “group” as
+ * the item.
+ */
+ before?: string[];
+ /**
+ * Inserts this item after the item with the specified label. If the referenced
+ * item doesn't exist the item will be inserted at the end of the menu.
+ */
+ after?: string[];
+ /**
+ * Provides a means for a single context menu to declare the placement of their
+ * containing group before the containing group of the item with the specified
+ * label.
+ */
+ beforeGroupContaining?: string[];
+ /**
+ * Provides a means for a single context menu to declare the placement of their
+ * containing group after the containing group of the item with the specified
+ * label.
+ */
+ afterGroupContaining?: string[];
+ }
+
+ interface MessageBoxOptions {
+ /**
+ * Can be "none", "info", "error", "question" or "warning". On Windows, "question"
+ * displays the same icon as "info", unless you set an icon using the "icon"
+ * option. On macOS, both "warning" and "error" display the same warning icon.
+ */
+ type?: string;
+ /**
+ * Array of texts for buttons. On Windows, an empty array will result in one button
+ * labeled "OK".
+ */
+ buttons?: string[];
+ /**
+ * Index of the button in the buttons array which will be selected by default when
+ * the message box opens.
+ */
+ defaultId?: number;
+ /**
+ * Title of the message box, some platforms will not show it.
+ */
+ title?: string;
+ /**
+ * Content of the message box.
+ */
+ message: string;
+ /**
+ * Extra information of the message.
+ */
+ detail?: string;
+ /**
+ * If provided, the message box will include a checkbox with the given label. The
+ * checkbox state can be inspected only when using callback.
+ */
+ checkboxLabel?: string;
+ /**
+ * Initial checked state of the checkbox. false by default.
+ */
+ checkboxChecked?: boolean;
+ icon?: NativeImage;
+ /**
+ * The index of the button to be used to cancel the dialog, via the Esc key. By
+ * default this is assigned to the first button with "cancel" or "no" as the label.
+ * If no such labeled buttons exist and this option is not set, 0 will be used as
+ * the return value or callback response.
+ */
+ cancelId?: number;
+ /**
+ * On Windows Electron will try to figure out which one of the buttons are common
+ * buttons (like "Cancel" or "Yes"), and show the others as command links in the
+ * dialog. This can make the dialog appear in the style of modern Windows apps. If
+ * you don't like this behavior, you can set noLink to true.
+ */
+ noLink?: boolean;
+ /**
+ * Normalize the keyboard access keys across platforms. Default is false. Enabling
+ * this assumes & is used in the button labels for the placement of the keyboard
+ * shortcut access key and labels will be converted so they work correctly on each
+ * platform, & characters are removed on macOS, converted to _ on Linux, and left
+ * untouched on Windows. For example, a button label of Vie&w will be converted to
+ * Vie_w on Linux and View on macOS and can be selected via Alt-W on Windows and
+ * Linux.
+ */
+ normalizeAccessKeys?: boolean;
+ }
+
+ interface NewWindowEvent extends Event {
+ url: string;
+ frameName: string;
+ /**
+ * Can be `default`, `foreground-tab`, `background-tab`, `new-window`,
+ * `save-to-disk` and `other`.
+ */
+ disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other');
+ /**
+ * The options which should be used for creating the new .
+ */
+ options: Options;
+ }
+
+ interface NotificationConstructorOptions {
+ /**
+ * A title for the notification, which will be shown at the top of the notification
+ * window when it is shown.
+ */
+ title: string;
+ /**
+ * A subtitle for the notification, which will be displayed below the title.
+ */
+ subtitle?: string;
+ /**
+ * The body text of the notification, which will be displayed below the title or
+ * subtitle.
+ */
+ body: string;
+ /**
+ * Whether or not to emit an OS notification noise when showing the notification.
+ */
+ silent?: boolean;
+ /**
+ * An icon to use in the notification.
+ */
+ icon?: (string) | (NativeImage);
+ /**
+ * Whether or not to add an inline reply option to the notification.
+ */
+ hasReply?: boolean;
+ /**
+ * The placeholder to write in the inline reply input field.
+ */
+ replyPlaceholder?: string;
+ /**
+ * The name of the sound file to play when the notification is shown.
+ */
+ sound?: string;
+ /**
+ * Actions to add to the notification. Please read the available actions and
+ * limitations in the NotificationAction documentation.
+ */
+ actions?: NotificationAction[];
+ /**
+ * A custom title for the close button of an alert. An empty string will cause the
+ * default localized text to be used.
+ */
+ closeButtonText?: string;
+ }
+
+ interface OnBeforeRedirectDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ timestamp: number;
+ redirectURL: string;
+ statusCode: number;
+ /**
+ * The server IP address that the request was actually sent to.
+ */
+ ip?: string;
+ fromCache: boolean;
+ responseHeaders: ResponseHeaders;
+ }
+
+ interface OnBeforeRedirectFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OnBeforeRequestDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ timestamp: number;
+ uploadData: UploadData[];
+ }
+
+ interface OnBeforeRequestFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OnBeforeSendHeadersDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ timestamp: number;
+ requestHeaders: RequestHeaders;
+ }
+
+ interface OnBeforeSendHeadersFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OnBeforeSendHeadersResponse {
+ cancel?: boolean;
+ /**
+ * When provided, request will be made with these headers.
+ */
+ requestHeaders?: RequestHeaders;
+ }
+
+ interface OnCompletedDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ referrer: string;
+ timestamp: number;
+ responseHeaders: ResponseHeaders;
+ fromCache: boolean;
+ statusCode: number;
+ statusLine: string;
+ }
+
+ interface OnCompletedFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OnErrorOccurredDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ timestamp: number;
+ fromCache: boolean;
+ /**
+ * The error description.
+ */
+ error: string;
+ }
+
+ interface OnErrorOccurredFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OnHeadersReceivedDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ timestamp: number;
+ statusLine: string;
+ statusCode: number;
+ responseHeaders: ResponseHeaders;
+ }
+
+ interface OnHeadersReceivedFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OnHeadersReceivedResponse {
+ cancel?: boolean;
+ /**
+ * When provided, the server is assumed to have responded with these headers.
+ */
+ responseHeaders?: ResponseHeaders;
+ /**
+ * Should be provided when overriding responseHeaders to change header status
+ * otherwise original response header's status will be used.
+ */
+ statusLine?: string;
+ }
+
+ interface OnResponseStartedDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ timestamp: number;
+ responseHeaders: ResponseHeaders;
+ /**
+ * Indicates whether the response was fetched from disk cache.
+ */
+ fromCache: boolean;
+ statusCode: number;
+ statusLine: string;
+ }
+
+ interface OnResponseStartedFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OnSendHeadersDetails {
+ id: number;
+ url: string;
+ method: string;
+ webContentsId?: number;
+ resourceType: string;
+ timestamp: number;
+ requestHeaders: RequestHeaders;
+ }
+
+ interface OnSendHeadersFilter {
+ /**
+ * Array of URL patterns that will be used to filter out the requests that do not
+ * match the URL patterns.
+ */
+ urls: string[];
+ }
+
+ interface OpenDevToolsOptions {
+ /**
+ * Opens the devtools with specified dock state, can be right, bottom, undocked,
+ * detach. Defaults to last used dock state. In undocked mode it's possible to dock
+ * back. In detach mode it's not.
+ */
+ mode: ('right' | 'bottom' | 'undocked' | 'detach');
+ }
+
+ interface OpenDialogOptions {
+ title?: string;
+ defaultPath?: string;
+ /**
+ * Custom label for the confirmation button, when left empty the default label will
+ * be used.
+ */
+ buttonLabel?: string;
+ filters?: FileFilter[];
+ /**
+ * Contains which features the dialog should use. The following values are
+ * supported:
+ */
+ properties?: Array<'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory'>;
+ /**
+ * Message to display above input boxes.
+ */
+ message?: string;
+ /**
+ * Create when packaged for the Mac App Store.
+ */
+ securityScopedBookmarks?: boolean;
+ }
+
+ interface OpenExternalOptions {
+ /**
+ * true to bring the opened application to the foreground. The default is true.
+ */
+ activate?: boolean;
+ /**
+ * The working directory.
+ */
+ workingDirectory?: string;
+ }
+
+ interface PageFaviconUpdatedEvent extends Event {
+ /**
+ * Array of URLs.
+ */
+ favicons: string[];
+ }
+
+ interface PageTitleUpdatedEvent extends Event {
+ title: string;
+ explicitSet: boolean;
+ }
+
+ interface Parameters {
+ /**
+ * Specify the screen type to emulate (default: desktop):
+ */
+ screenPosition: ('desktop' | 'mobile');
+ /**
+ * Set the emulated screen size (screenPosition == mobile).
+ */
+ screenSize: Size;
+ /**
+ * Position the view on the screen (screenPosition == mobile) (default: { x: 0, y:
+ * 0 }).
+ */
+ viewPosition: Point;
+ /**
+ * Set the device scale factor (if zero defaults to original device scale factor)
+ * (default: 0).
+ */
+ deviceScaleFactor: number;
+ /**
+ * Set the emulated view size (empty means no override)
+ */
+ viewSize: Size;
+ /**
+ * Scale of emulated view inside available space (not in fit to view mode)
+ * (default: 1).
+ */
+ scale: number;
+ }
+
+ interface Payment {
+ /**
+ * The identifier of the purchased product.
+ */
+ productIdentifier: string;
+ /**
+ * The quantity purchased.
+ */
+ quantity: number;
+ }
+
+ interface PermissionCheckHandlerDetails {
+ /**
+ * The security orign of the media check.
+ */
+ securityOrigin: string;
+ /**
+ * The type of media access being requested, can be video, audio or unknown
+ */
+ mediaType: ('video' | 'audio' | 'unknown');
+ /**
+ * The last URL the requesting frame loaded
+ */
+ requestingUrl: string;
+ /**
+ * Whether the frame making the request is the main frame
+ */
+ isMainFrame: boolean;
+ }
+
+ interface PermissionRequestHandlerDetails {
+ /**
+ * The url of the openExternal request.
+ */
+ externalURL?: string;
+ /**
+ * The types of media access being requested, elements can be video or audio
+ */
+ mediaTypes?: Array<'video' | 'audio'>;
+ /**
+ * The last URL the requesting frame loaded
+ */
+ requestingUrl: string;
+ /**
+ * Whether the frame making the request is the main frame
+ */
+ isMainFrame: boolean;
+ }
+
+ interface PluginCrashedEvent extends Event {
+ name: string;
+ version: string;
+ }
+
+ interface PopupOptions {
+ /**
+ * Default is the focused window.
+ */
+ window?: BrowserWindow;
+ /**
+ * Default is the current mouse cursor position. Must be declared if y is declared.
+ */
+ x?: number;
+ /**
+ * Default is the current mouse cursor position. Must be declared if x is declared.
+ */
+ y?: number;
+ /**
+ * The index of the menu item to be positioned under the mouse cursor at the
+ * specified coordinates. Default is -1.
+ */
+ positioningItem?: number;
+ /**
+ * Called when menu is closed.
+ */
+ callback?: () => void;
+ }
+
+ interface PrintOptions {
+ /**
+ * Don't ask user for print settings. Default is false.
+ */
+ silent?: boolean;
+ /**
+ * Also prints the background color and image of the web page. Default is false.
+ */
+ printBackground?: boolean;
+ /**
+ * Set the printer device name to use. Default is ''.
+ */
+ deviceName?: string;
+ }
+
+ interface PrintToPDFOptions {
+ /**
+ * Specifies the type of margins to use. Uses 0 for default margin, 1 for no
+ * margin, and 2 for minimum margin.
+ */
+ marginsType?: number;
+ /**
+ * Specify page size of the generated PDF. Can be A3, A4, A5, Legal, Letter,
+ * Tabloid or an Object containing height and width in microns.
+ */
+ pageSize?: (string) | (Size);
+ /**
+ * Whether to print CSS backgrounds.
+ */
+ printBackground?: boolean;
+ /**
+ * Whether to print selection only.
+ */
+ printSelectionOnly?: boolean;
+ /**
+ * true for landscape, false for portrait.
+ */
+ landscape?: boolean;
+ }
+
+ interface ProcessMemoryInfo {
+ /**
+ * and The amount of memory currently pinned to actual physical RAM in Kilobytes.
+ */
+ residentSet: number;
+ /**
+ * The amount of memory not shared by other processes, such as JS heap or HTML
+ * content in Kilobytes.
+ */
+ private: number;
+ /**
+ * The amount of memory shared between processes, typically memory consumed by the
+ * Electron code itself in Kilobytes.
+ */
+ shared: number;
+ }
+
+ interface ProgressBarOptions {
+ /**
+ * Mode for the progress bar. Can be none, normal, indeterminate, error or paused.
+ */
+ mode: ('none' | 'normal' | 'indeterminate' | 'error' | 'paused');
+ }
+
+ interface Provider {
+ /**
+ * Returns Boolean.
+ */
+ spellCheck: (text: string) => void;
+ }
+
+ interface ReadBookmark {
+ title: string;
+ url: string;
+ }
+
+ interface RedirectRequest {
+ url: string;
+ method: string;
+ session?: Session;
+ uploadData?: UploadData;
+ }
+
+ interface RegisterBufferProtocolRequest {
+ url: string;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface RegisterFileProtocolRequest {
+ url: string;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface RegisterHttpProtocolRequest {
+ url: string;
+ headers: Headers;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface RegisterStandardSchemesOptions {
+ /**
+ * true to register the scheme as secure. Default false.
+ */
+ secure?: boolean;
+ }
+
+ interface RegisterStreamProtocolRequest {
+ url: string;
+ headers: Headers;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface RegisterStringProtocolRequest {
+ url: string;
+ referrer: string;
+ method: string;
+ uploadData: UploadData[];
+ }
+
+ interface RegisterURLSchemeAsPrivilegedOptions {
+ /**
+ * Default true.
+ */
+ secure?: boolean;
+ /**
+ * Default true.
+ */
+ bypassCSP?: boolean;
+ /**
+ * Default true.
+ */
+ allowServiceWorkers?: boolean;
+ /**
+ * Default true.
+ */
+ supportFetchAPI?: boolean;
+ /**
+ * Default true.
+ */
+ corsEnabled?: boolean;
+ }
+
+ interface RelaunchOptions {
+ args?: string[];
+ execPath?: string;
+ }
+
+ interface Request {
+ method: string;
+ url: string;
+ referrer: string;
+ }
+
+ interface ResizeOptions {
+ /**
+ * Defaults to the image's width.
+ */
+ width?: number;
+ /**
+ * Defaults to the image's height.
+ */
+ height?: number;
+ /**
+ * The desired quality of the resize image. Possible values are good, better or
+ * best. The default is best. These values express a desired quality/speed
+ * tradeoff. They are translated into an algorithm-specific method that depends on
+ * the capabilities (CPU, GPU) of the underlying platform. It is possible for all
+ * three methods to be mapped to the same algorithm on a given platform.
+ */
+ quality?: string;
+ }
+
+ interface ResourceUsage {
+ images: MemoryUsageDetails;
+ scripts: MemoryUsageDetails;
+ cssStyleSheets: MemoryUsageDetails;
+ xslStyleSheets: MemoryUsageDetails;
+ fonts: MemoryUsageDetails;
+ other: MemoryUsageDetails;
+ }
+
+ interface Response {
+ cancel?: boolean;
+ /**
+ * The original request is prevented from being sent or completed and is instead
+ * redirected to the given URL.
+ */
+ redirectURL?: string;
+ }
+
+ interface Result {
+ requestId: number;
+ /**
+ * Position of the active match.
+ */
+ activeMatchOrdinal: number;
+ /**
+ * Number of Matches.
+ */
+ matches: number;
+ /**
+ * Coordinates of first match region.
+ */
+ selectionArea: SelectionArea;
+ finalUpdate: boolean;
+ }
+
+ interface SaveDialogOptions {
+ title?: string;
+ /**
+ * Absolute directory path, absolute file path, or file name to use by default.
+ */
+ defaultPath?: string;
+ /**
+ * Custom label for the confirmation button, when left empty the default label will
+ * be used.
+ */
+ buttonLabel?: string;
+ filters?: FileFilter[];
+ /**
+ * Message to display above text fields.
+ */
+ message?: string;
+ /**
+ * Custom label for the text displayed in front of the filename text field.
+ */
+ nameFieldLabel?: string;
+ /**
+ * Show the tags input box, defaults to true.
+ */
+ showsTagField?: boolean;
+ /**
+ * Create a when packaged for the Mac App Store. If this option is enabled and the
+ * file doesn't already exist a blank file will be created at the chosen path.
+ */
+ securityScopedBookmarks?: boolean;
+ }
+
+ interface Settings {
+ /**
+ * true to open the app at login, false to remove the app as a login item. Defaults
+ * to false.
+ */
+ openAtLogin?: boolean;
+ /**
+ * true to open the app as hidden. Defaults to false. The user can edit this
+ * setting from the System Preferences so
+ * app.getLoginItemSettings().wasOpenedAsHidden should be checked when the app is
+ * opened to know the current value. This setting is not available on .
+ */
+ openAsHidden?: boolean;
+ /**
+ * The executable to launch at login. Defaults to process.execPath.
+ */
+ path?: string;
+ /**
+ * The command-line arguments to pass to the executable. Defaults to an empty
+ * array. Take care to wrap paths in quotes.
+ */
+ args?: string[];
+ }
+
+ interface SourcesOptions {
+ /**
+ * An array of Strings that lists the types of desktop sources to be captured,
+ * available types are screen and window.
+ */
+ types: string[];
+ /**
+ * The size that the media source thumbnail should be scaled to. Default is 150 x
+ * 150.
+ */
+ thumbnailSize?: Size;
+ }
+
+ interface StartMonitoringOptions {
+ categoryFilter: string;
+ traceOptions: string;
+ }
+
+ interface SystemMemoryInfo {
+ /**
+ * The total amount of physical memory in Kilobytes available to the system.
+ */
+ total: number;
+ /**
+ * The total amount of memory not being used by applications or disk cache.
+ */
+ free: number;
+ /**
+ * The total amount of swap memory in Kilobytes available to the system.
+ */
+ swapTotal: number;
+ /**
+ * The free amount of swap memory in Kilobytes available to the system.
+ */
+ swapFree: number;
+ }
+
+ interface ToBitmapOptions {
+ /**
+ * Defaults to 1.0.
+ */
+ scaleFactor?: number;
+ }
+
+ interface ToDataURLOptions {
+ /**
+ * Defaults to 1.0.
+ */
+ scaleFactor?: number;
+ }
+
+ interface ToPNGOptions {
+ /**
+ * Defaults to 1.0.
+ */
+ scaleFactor?: number;
+ }
+
+ interface TouchBarButtonConstructorOptions {
+ /**
+ * Button text.
+ */
+ label?: string;
+ /**
+ * Button background color in hex format, i.e #ABCDEF.
+ */
+ backgroundColor?: string;
+ /**
+ * Button icon.
+ */
+ icon?: NativeImage;
+ /**
+ * Can be left, right or overlay.
+ */
+ iconPosition?: ('left' | 'right' | 'overlay');
+ /**
+ * Function to call when the button is clicked.
+ */
+ click?: () => void;
+ }
+
+ interface TouchBarColorPickerConstructorOptions {
+ /**
+ * Array of hex color strings to appear as possible colors to select.
+ */
+ availableColors?: string[];
+ /**
+ * The selected hex color in the picker, i.e #ABCDEF.
+ */
+ selectedColor?: string;
+ /**
+ * Function to call when a color is selected.
+ */
+ change?: (color: string) => void;
+ }
+
+ interface TouchBarConstructorOptions {
+ items: Array<(TouchBarButton) | (TouchBarColorPicker) | (TouchBarGroup) | (TouchBarLabel) | (TouchBarPopover) | (TouchBarScrubber) | (TouchBarSegmentedControl) | (TouchBarSlider) | (TouchBarSpacer)>;
+ escapeItem?: (TouchBarButton) | (TouchBarColorPicker) | (TouchBarGroup) | (TouchBarLabel) | (TouchBarPopover) | (TouchBarScrubber) | (TouchBarSegmentedControl) | (TouchBarSlider) | (TouchBarSpacer) | (null);
+ }
+
+ interface TouchBarGroupConstructorOptions {
+ /**
+ * Items to display as a group.
+ */
+ items: TouchBar;
+ }
+
+ interface TouchBarLabelConstructorOptions {
+ /**
+ * Text to display.
+ */
+ label?: string;
+ /**
+ * Hex color of text, i.e #ABCDEF.
+ */
+ textColor?: string;
+ }
+
+ interface TouchBarPopoverConstructorOptions {
+ /**
+ * Popover button text.
+ */
+ label?: string;
+ /**
+ * Popover button icon.
+ */
+ icon?: NativeImage;
+ /**
+ * Items to display in the popover.
+ */
+ items?: TouchBar;
+ /**
+ * true to display a close button on the left of the popover, false to not show it.
+ * Default is true.
+ */
+ showCloseButton?: boolean;
+ }
+
+ interface TouchBarScrubberConstructorOptions {
+ /**
+ * An array of items to place in this scrubber.
+ */
+ items: ScrubberItem[];
+ /**
+ * Called when the user taps an item that was not the last tapped item.
+ */
+ select: (selectedIndex: number) => void;
+ /**
+ * Called when the user taps any item.
+ */
+ highlight: (highlightedIndex: number) => void;
+ /**
+ * Selected item style. Defaults to null.
+ */
+ selectedStyle: string;
+ /**
+ * Selected overlay item style. Defaults to null.
+ */
+ overlayStyle: string;
+ /**
+ * Defaults to false.
+ */
+ showArrowButtons: boolean;
+ /**
+ * Defaults to free.
+ */
+ mode: string;
+ /**
+ * Defaults to true.
+ */
+ continuous: boolean;
+ }
+
+ interface TouchBarSegmentedControlConstructorOptions {
+ /**
+ * Style of the segments:
+ */
+ segmentStyle?: ('automatic' | 'rounded' | 'textured-rounded' | 'round-rect' | 'textured-square' | 'capsule' | 'small-square' | 'separated');
+ /**
+ * The selection mode of the control:
+ */
+ mode?: ('single' | 'multiple' | 'buttons');
+ /**
+ * An array of segments to place in this control.
+ */
+ segments: SegmentedControlSegment[];
+ /**
+ * The index of the currently selected segment, will update automatically with user
+ * interaction. When the mode is multiple it will be the last selected item.
+ */
+ selectedIndex?: number;
+ /**
+ * Called when the user selects a new segment.
+ */
+ change: (selectedIndex: number, isSelected: boolean) => void;
+ }
+
+ interface TouchBarSliderConstructorOptions {
+ /**
+ * Label text.
+ */
+ label?: string;
+ /**
+ * Selected value.
+ */
+ value?: number;
+ /**
+ * Minimum value.
+ */
+ minValue?: number;
+ /**
+ * Maximum value.
+ */
+ maxValue?: number;
+ /**
+ * Function to call when the slider is changed.
+ */
+ change?: (newValue: number) => void;
+ }
+
+ interface TouchBarSpacerConstructorOptions {
+ /**
+ * Size of spacer, possible values are:
+ */
+ size?: ('small' | 'large' | 'flexible');
+ }
+
+ interface UpdateTargetUrlEvent extends Event {
+ url: string;
+ }
+
+ interface UploadProgress {
+ /**
+ * Whether the request is currently active. If this is false no other properties
+ * will be set
+ */
+ active: boolean;
+ /**
+ * Whether the upload has started. If this is false both current and total will be
+ * set to 0.
+ */
+ started: boolean;
+ /**
+ * The number of bytes that have been uploaded so far
+ */
+ current: number;
+ /**
+ * The number of bytes that will be uploaded this request
+ */
+ total: number;
+ }
+
+ interface Versions {
+ /**
+ * A String representing Chrome's version string.
+ */
+ chrome?: string;
+ /**
+ * A String representing Electron's version string.
+ */
+ electron?: string;
+ }
+
+ interface VisibleOnAllWorkspacesOptions {
+ /**
+ * Sets whether the window should be visible above fullscreen windows
+ */
+ visibleOnFullScreen?: boolean;
+ }
+
+ interface WillNavigateEvent extends Event {
+ url: string;
+ }
+
+ interface EditFlags {
+ /**
+ * Whether the renderer believes it can undo.
+ */
+ canUndo: boolean;
+ /**
+ * Whether the renderer believes it can redo.
+ */
+ canRedo: boolean;
+ /**
+ * Whether the renderer believes it can cut.
+ */
+ canCut: boolean;
+ /**
+ * Whether the renderer believes it can copy
+ */
+ canCopy: boolean;
+ /**
+ * Whether the renderer believes it can paste.
+ */
+ canPaste: boolean;
+ /**
+ * Whether the renderer believes it can delete.
+ */
+ canDelete: boolean;
+ /**
+ * Whether the renderer believes it can select all.
+ */
+ canSelectAll: boolean;
+ }
+
+ interface Extra {
+ }
+
+ interface FoundInPageResult {
+ requestId: number;
+ /**
+ * Position of the active match.
+ */
+ activeMatchOrdinal: number;
+ /**
+ * Number of Matches.
+ */
+ matches: number;
+ /**
+ * Coordinates of first match region.
+ */
+ selectionArea: SelectionArea;
+ finalUpdate: boolean;
+ }
+
+ interface MediaFlags {
+ /**
+ * Whether the media element has crashed.
+ */
+ inError: boolean;
+ /**
+ * Whether the media element is paused.
+ */
+ isPaused: boolean;
+ /**
+ * Whether the media element is muted.
+ */
+ isMuted: boolean;
+ /**
+ * Whether the media element has audio.
+ */
+ hasAudio: boolean;
+ /**
+ * Whether the media element is looping.
+ */
+ isLooping: boolean;
+ /**
+ * Whether the media element's controls are visible.
+ */
+ isControlsVisible: boolean;
+ /**
+ * Whether the media element's controls are toggleable.
+ */
+ canToggleControls: boolean;
+ /**
+ * Whether the media element can be rotated.
+ */
+ canRotate: boolean;
+ }
+
+ interface Options {
+ }
+
+ interface Query {
+ }
+
+ interface RequestHeaders {
+ }
+
+ interface ResponseHeaders {
+ }
+
+ interface SelectionArea {
+ }
+
+ interface WebPreferences {
+ /**
+ * Whether to enable DevTools. If it is set to false, can not use
+ * BrowserWindow.webContents.openDevTools() to open DevTools. Default is true.
+ */
+ devTools?: boolean;
+ /**
+ * Whether node integration is enabled. Default is true.
+ */
+ nodeIntegration?: boolean;
+ /**
+ * Whether node integration is enabled in web workers. Default is false. More about
+ * this can be found in .
+ */
+ nodeIntegrationInWorker?: boolean;
+ /**
+ * Specifies a script that will be loaded before other scripts run in the page.
+ * This script will always have access to node APIs no matter whether node
+ * integration is turned on or off. The value should be the absolute file path to
+ * the script. When node integration is turned off, the preload script can
+ * reintroduce Node global symbols back to the global scope. See example .
+ */
+ preload?: string;
+ /**
+ * If set, this will sandbox the renderer associated with the window, making it
+ * compatible with the Chromium OS-level sandbox and disabling the Node.js engine.
+ * This is not the same as the nodeIntegration option and the APIs available to the
+ * preload script are more limited. Read more about the option . This option is
+ * currently experimental and may change or be removed in future Electron releases.
+ */
+ sandbox?: boolean;
+ /**
+ * Whether to enable the module. Default is true.
+ */
+ enableRemoteModule?: boolean;
+ /**
+ * Sets the session used by the page. Instead of passing the Session object
+ * directly, you can also choose to use the partition option instead, which accepts
+ * a partition string. When both session and partition are provided, session will
+ * be preferred. Default is the default session.
+ */
+ session?: Session;
+ /**
+ * Sets the session used by the page according to the session's partition string.
+ * If partition starts with persist:, the page will use a persistent session
+ * available to all pages in the app with the same partition. If there is no
+ * persist: prefix, the page will use an in-memory session. By assigning the same
+ * partition, multiple pages can share the same session. Default is the default
+ * session.
+ */
+ partition?: string;
+ /**
+ * When specified, web pages with the same affinity will run in the same renderer
+ * process. Note that due to reusing the renderer process, certain webPreferences
+ * options will also be shared between the web pages even when you specified
+ * different values for them, including but not limited to preload, sandbox and
+ * nodeIntegration. So it is suggested to use exact same webPreferences for web
+ * pages with the same affinity.
+ */
+ affinity?: string;
+ /**
+ * The default zoom factor of the page, 3.0 represents 300%. Default is 1.0.
+ */
+ zoomFactor?: number;
+ /**
+ * Enables JavaScript support. Default is true.
+ */
+ javascript?: boolean;
+ /**
+ * When false, it will disable the same-origin policy (usually using testing
+ * websites by people), and set allowRunningInsecureContent to true if this options
+ * has not been set by user. Default is true.
+ */
+ webSecurity?: boolean;
+ /**
+ * Allow an https page to run JavaScript, CSS or plugins from http URLs. Default is
+ * false.
+ */
+ allowRunningInsecureContent?: boolean;
+ /**
+ * Enables image support. Default is true.
+ */
+ images?: boolean;
+ /**
+ * Make TextArea elements resizable. Default is true.
+ */
+ textAreasAreResizable?: boolean;
+ /**
+ * Enables WebGL support. Default is true.
+ */
+ webgl?: boolean;
+ /**
+ * Enables WebAudio support. Default is true.
+ */
+ webaudio?: boolean;
+ /**
+ * Whether plugins should be enabled. Default is false.
+ */
+ plugins?: boolean;
+ /**
+ * Enables Chromium's experimental features. Default is false.
+ */
+ experimentalFeatures?: boolean;
+ /**
+ * Enables scroll bounce (rubber banding) effect on macOS. Default is false.
+ */
+ scrollBounce?: boolean;
+ /**
+ * A list of feature strings separated by ,, like CSSVariables,KeyboardEventKey to
+ * enable. The full list of supported feature strings can be found in the file.
+ */
+ enableBlinkFeatures?: string;
+ /**
+ * A list of feature strings separated by ,, like CSSVariables,KeyboardEventKey to
+ * disable. The full list of supported feature strings can be found in the file.
+ */
+ disableBlinkFeatures?: string;
+ /**
+ * Sets the default font for the font-family.
+ */
+ defaultFontFamily?: DefaultFontFamily;
+ /**
+ * Defaults to 16.
+ */
+ defaultFontSize?: number;
+ /**
+ * Defaults to 13.
+ */
+ defaultMonospaceFontSize?: number;
+ /**
+ * Defaults to 0.
+ */
+ minimumFontSize?: number;
+ /**
+ * Defaults to ISO-8859-1.
+ */
+ defaultEncoding?: string;
+ /**
+ * Whether to throttle animations and timers when the page becomes background. This
+ * also affects the . Defaults to true.
+ */
+ backgroundThrottling?: boolean;
+ /**
+ * Whether to enable offscreen rendering for the browser window. Defaults to false.
+ * See the for more details.
+ */
+ offscreen?: boolean;
+ /**
+ * Whether to run Electron APIs and the specified preload script in a separate
+ * JavaScript context. Defaults to false. The context that the preload script runs
+ * in will still have full access to the document and window globals but it will
+ * use its own set of JavaScript builtins (Array, Object, JSON, etc.) and will be
+ * isolated from any changes made to the global environment by the loaded page. The
+ * Electron API will only be available in the preload script and not the loaded
+ * page. This option should be used when loading potentially untrusted remote
+ * content to ensure the loaded content cannot tamper with the preload script and
+ * any Electron APIs being used. This option uses the same technique used by . You
+ * can access this context in the dev tools by selecting the 'Electron Isolated
+ * Context' entry in the combo box at the top of the Console tab.
+ */
+ contextIsolation?: boolean;
+ /**
+ * Whether to use native window.open(). If set to true, the webPreferences of child
+ * window will always be the same with parent window, regardless of the parameters
+ * passed to window.open(). Defaults to false. This option is currently
+ * experimental.
+ */
+ nativeWindowOpen?: boolean;
+ /**
+ * Whether to enable the . Defaults to the value of the nodeIntegration option. The
+ * preload script configured for the will have node integration enabled when it is
+ * executed so you should ensure remote/untrusted content is not able to create a
+ * tag with a possibly malicious preload script. You can use the
+ * will-attach-webview event on to strip away the preload script and to validate or
+ * alter the 's initial settings.
+ */
+ webviewTag?: boolean;
+ /**
+ * A list of strings that will be appended to process.argv in the renderer process
+ * of this app. Useful for passing small bits of data down to renderer process
+ * preload scripts.
+ */
+ additionalArguments?: string[];
+ /**
+ * Whether to enable browser style consecutive dialog protection. Default is false.
+ */
+ safeDialogs?: boolean;
+ /**
+ * The message to display when consecutive dialog protection is triggered. If not
+ * defined the default message would be used, note that currently the default
+ * message is in English and not localized.
+ */
+ safeDialogsMessage?: string;
+ /**
+ * Whether dragging and dropping a file or link onto the page causes a navigation.
+ * Default is false.
+ */
+ navigateOnDragDrop?: boolean;
+ }
+
+ interface DefaultFontFamily {
+ /**
+ * Defaults to Times New Roman.
+ */
+ standard?: string;
+ /**
+ * Defaults to Times New Roman.
+ */
+ serif?: string;
+ /**
+ * Defaults to Arial.
+ */
+ sansSerif?: string;
+ /**
+ * Defaults to Courier New.
+ */
+ monospace?: string;
+ /**
+ * Defaults to Script.
+ */
+ cursive?: string;
+ /**
+ * Defaults to Impact.
+ */
+ fantasy?: string;
+ }
+
+}
+
+declare module 'electron' {
+ export = Electron;
+}
+
+interface NodeRequireFunction {
+ (moduleName: 'electron'): typeof Electron;
+}
+
+interface File {
+ /**
+ * The real path to the file on the users filesystem
+ */
+ path: string;
+}
+
+declare module 'original-fs' {
+ import * as fs from 'fs';
+ export = fs;
+}
+
+interface Document {
+ createElement(tagName: 'webview'): Electron.WebviewTag;
+}
+
+declare namespace NodeJS {
+ interface Process extends EventEmitter {
+
+ // Docs: http://electronjs.org/docs/api/process
+
+ /**
+ * Emitted when Electron has loaded its internal initialization script and is
+ * beginning to load the web page or the main script. It can be used by the preload
+ * script to add removed Node global symbols back to the global scope when node
+ * integration is turned off:
+ */
+ on(event: 'loaded', listener: Function): this;
+ once(event: 'loaded', listener: Function): this;
+ addListener(event: 'loaded', listener: Function): this;
+ removeListener(event: 'loaded', listener: Function): this;
+ /**
+ * Causes the main thread of the current process crash.
+ */
+ crash(): void;
+ getCPUUsage(): Electron.CPUUsage;
+ /**
+ * Indicates the creation time of the application. The time is represented as
+ * number of milliseconds since epoch. It returns null if it is unable to get the
+ * process creation time.
+ */
+ getCreationTime(): (number) | (null);
+ /**
+ * Returns an object with V8 heap statistics. Note that all statistics are reported
+ * in Kilobytes.
+ */
+ getHeapStatistics(): Electron.HeapStatistics;
+ getIOCounters(): Electron.IOCounters;
+ /**
+ * Returns an object giving memory usage statistics about the current process. Note
+ * that all statistics are reported in Kilobytes. This api should be called after
+ * app ready. Chromium does not provide residentSet value for macOS. This is
+ * because macOS performs in-memory compression of pages that haven't been recently
+ * used. As a result the resident set size value is not what one would expect.
+ * private memory is more representative of the actual pre-compression memory usage
+ * of the process on macOS.
+ */
+ getProcessMemoryInfo(): Electron.ProcessMemoryInfo;
+ /**
+ * Returns an object giving memory usage statistics about the entire system. Note
+ * that all statistics are reported in Kilobytes.
+ */
+ getSystemMemoryInfo(): Electron.SystemMemoryInfo;
+ /**
+ * Causes the main thread of the current process hang.
+ */
+ hang(): void;
+ /**
+ * Sets the file descriptor soft limit to maxDescriptors or the OS hard limit,
+ * whichever is lower for the current process.
+ */
+ setFdLimit(maxDescriptors: number): void;
+ /**
+ * Takes a V8 heap snapshot and saves it to filePath.
+ */
+ takeHeapSnapshot(filePath: string): boolean;
+ /**
+ * A Boolean. When app is started by being passed as parameter to the default app,
+ * this property is true in the main process, otherwise it is undefined.
+ */
+ defaultApp?: boolean;
+ /**
+ * A Boolean. For Mac App Store build, this property is true, for other builds it
+ * is undefined.
+ */
+ mas?: boolean;
+ /**
+ * A Boolean that controls ASAR support inside your application. Setting this to
+ * true will disable the support for asar archives in Node's built-in modules.
+ */
+ noAsar?: boolean;
+ /**
+ * A Boolean that controls whether or not deprecation warnings are printed to
+ * stderr. Setting this to true will silence deprecation warnings. This property is
+ * used instead of the --no-deprecation command line flag.
+ */
+ noDeprecation?: boolean;
+ /**
+ * A String representing the path to the resources directory.
+ */
+ resourcesPath?: string;
+ /**
+ * A Boolean. When the renderer process is sandboxed, this property is true,
+ * otherwise it is undefined.
+ */
+ sandboxed?: boolean;
+ /**
+ * A Boolean that controls whether or not deprecation warnings will be thrown as
+ * exceptions. Setting this to true will throw errors for deprecations. This
+ * property is used instead of the --throw-deprecation command line flag.
+ */
+ throwDeprecation?: boolean;
+ /**
+ * A Boolean that controls whether or not deprecations printed to stderr include
+ * their stack trace. Setting this to true will print stack traces for
+ * deprecations. This property is instead of the --trace-deprecation command line
+ * flag.
+ */
+ traceDeprecation?: boolean;
+ /**
+ * A Boolean that controls whether or not process warnings printed to stderr
+ * include their stack trace. Setting this to true will print stack traces for
+ * process warnings (including deprecations). This property is instead of the
+ * --trace-warnings command line flag.
+ */
+ traceProcessWarnings?: boolean;
+ /**
+ * A String representing the current process's type, can be "browser" (i.e. main
+ * process) or "renderer".
+ */
+ type?: string;
+ /**
+ * A Boolean. If the app is running as a Windows Store app (appx), this property is
+ * true, for otherwise it is undefined.
+ */
+ windowsStore?: boolean;
+ }
+ interface ProcessVersions {
+ electron: string;
+ chrome: string;
+ }
+}
diff --git a/node_modules/electron/index.js b/node_modules/electron/index.js
new file mode 100644
index 0000000..b33c9b4
--- /dev/null
+++ b/node_modules/electron/index.js
@@ -0,0 +1,18 @@
+var fs = require('fs')
+var path = require('path')
+
+var pathFile = path.join(__dirname, 'path.txt')
+
+function getElectronPath () {
+ if (fs.existsSync(pathFile)) {
+ var executablePath = fs.readFileSync(pathFile, 'utf-8')
+ if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {
+ return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath)
+ }
+ return path.join(__dirname, 'dist', executablePath)
+ } else {
+ throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
+ }
+}
+
+module.exports = getElectronPath()
diff --git a/node_modules/electron/install.js b/node_modules/electron/install.js
new file mode 100644
index 0000000..3f59ce1
--- /dev/null
+++ b/node_modules/electron/install.js
@@ -0,0 +1,66 @@
+#!/usr/bin/env node
+
+var version = require('./package').version
+
+var fs = require('fs')
+var os = require('os')
+var path = require('path')
+var extract = require('extract-zip')
+var download = require('electron-download')
+
+var installedVersion = null
+try {
+ installedVersion = fs.readFileSync(path.join(__dirname, 'dist', 'version'), 'utf-8').replace(/^v/, '')
+} catch (ignored) {
+ // do nothing
+}
+
+var platformPath = getPlatformPath()
+
+var electronPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist', platformPath)
+
+if (installedVersion === version && fs.existsSync(electronPath)) {
+ process.exit(0)
+}
+
+// downloads if not cached
+download({
+ cache: process.env.electron_config_cache,
+ version: version,
+ platform: process.env.npm_config_platform,
+ arch: process.env.npm_config_arch,
+ strictSSL: process.env.npm_config_strict_ssl === 'true',
+ force: process.env.force_no_cache === 'true',
+ quiet: process.env.npm_config_loglevel === 'silent' || process.env.CI
+}, extractFile)
+
+// unzips and makes path.txt point at the correct executable
+function extractFile (err, zipPath) {
+ if (err) return onerror(err)
+ extract(zipPath, { dir: path.join(__dirname, 'dist') }, function (err) {
+ if (err) return onerror(err)
+ fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, function (err) {
+ if (err) return onerror(err)
+ })
+ })
+}
+
+function onerror (err) {
+ throw err
+}
+
+function getPlatformPath () {
+ var platform = process.env.npm_config_platform || os.platform()
+
+ switch (platform) {
+ case 'darwin':
+ return 'Electron.app/Contents/MacOS/Electron'
+ case 'freebsd':
+ case 'linux':
+ return 'electron'
+ case 'win32':
+ return 'electron.exe'
+ default:
+ throw new Error('Electron builds are not available on platform: ' + platform)
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/LICENSE b/node_modules/electron/node_modules/@types/node/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/electron/node_modules/@types/node/README.md b/node_modules/electron/node_modules/@types/node/README.md
new file mode 100644
index 0000000..4855e88
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for Node.js (http://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v10.
+
+### Additional Details
+ * Last updated: Thu, 14 Jan 2021 21:29:59 GMT
+ * Dependencies: none
+ * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `require`, `setImmediate`, `setInterval`, `setTimeout`
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alexander T.](https://github.com/a-tarasyuk), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Flarna](https://github.com/Flarna), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Zane Hannan AU](https://github.com/ZaneHannanAU), [Jeremie Rodriguez](https://github.com/jeremiergz), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [Thanik Bhongbhibhat](https://github.com/bhongy), [Minh Son Nguyen](https://github.com/nguymin4), and [ExE Boss](https://github.com/ExE-Boss).
diff --git a/node_modules/electron/node_modules/@types/node/assert.d.ts b/node_modules/electron/node_modules/@types/node/assert.d.ts
new file mode 100644
index 0000000..0d20efb
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/assert.d.ts
@@ -0,0 +1,99 @@
+declare module 'assert' {
+ function assert(value: any, message?: string | Error): asserts value;
+ namespace assert {
+ class AssertionError implements Error {
+ name: string;
+ message: string;
+ actual: any;
+ expected: any;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+
+ constructor(options?: {
+ message?: string;
+ actual?: any;
+ expected?: any;
+ operator?: string;
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function;
+ });
+ }
+
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
+
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: any,
+ expected: any,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function,
+ ): never;
+ function ok(value: any, message?: string | Error): asserts value;
+ /** @deprecated since v9.9.0 - use strictEqual() instead. */
+ function equal(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
+ function notEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
+ function deepEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
+ function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
+ function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
+ function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
+ function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
+ function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
+
+ function throws(block: () => any, message?: string | Error): void;
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
+ function doesNotThrow(block: () => any, message?: string | Error): void;
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
+
+ function ifError(value: any): asserts value is null | undefined;
+
+ function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function rejects(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+ function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function doesNotReject(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+
+ const strict: Omit<
+ typeof assert,
+ | 'equal'
+ | 'notEqual'
+ | 'deepEqual'
+ | 'notDeepEqual'
+ | 'ok'
+ | 'strictEqual'
+ | 'deepStrictEqual'
+ | 'ifError'
+ | 'strict'
+ > & {
+ (value: any, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+
+ export = assert;
+}
diff --git a/node_modules/electron/node_modules/@types/node/async_hooks.d.ts b/node_modules/electron/node_modules/@types/node/async_hooks.d.ts
new file mode 100644
index 0000000..2c77932
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/async_hooks.d.ts
@@ -0,0 +1,144 @@
+/**
+ * Async Hooks module: https://nodejs.org/api/async_hooks.html
+ */
+declare module "async_hooks" {
+ /**
+ * Returns the asyncId of the current execution context.
+ */
+ function executionAsyncId(): number;
+
+ /**
+ * Returns the ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: Object): void;
+
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+
+ /**
+ * Registers functions to be called for different lifetime events of each async operation.
+ * @param options the callbacks to register
+ * @return an AsyncHooks instance used for disabling and enabling hooks
+ */
+ function createHook(options: HookCallbacks): AsyncHook;
+
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * Default: `executionAsyncId()`
+ */
+ triggerAsyncId?: number;
+
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * Default: `false`
+ */
+ requireManualDestroy?: boolean;
+ }
+
+ /**
+ * The class AsyncResource was designed to be extended by the embedder's async resources.
+ * Using this users can easily trigger the lifetime events of their own resources.
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since 9.3)
+ */
+ constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
+
+ /**
+ * Call AsyncHooks before callbacks.
+ * @deprecated since 9.6 - Use asyncResource.runInAsyncScope() instead.
+ */
+ emitBefore(): void;
+
+ /**
+ * Call AsyncHooks after callbacks.
+ * @deprecated since 9.6 - Use asyncResource.runInAsyncScope() instead.
+ */
+ emitAfter(): void;
+
+ /**
+ * Call the provided function with the provided arguments in the
+ * execution context of the async resource. This will establish the
+ * context, trigger the AsyncHooks before callbacks, call the function,
+ * trigger the AsyncHooks after callbacks, and then restore the original
+ * execution context.
+ * @param fn The function to call in the execution context of this
+ * async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+
+ /**
+ * Call AsyncHooks destroy callbacks.
+ */
+ emitDestroy(): void;
+
+ /**
+ * @return the unique ID assigned to this AsyncResource instance.
+ */
+ asyncId(): number;
+
+ /**
+ * @return the trigger ID for this AsyncResource instance.
+ */
+ triggerAsyncId(): number;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/base.d.ts b/node_modules/electron/node_modules/@types/node/base.d.ts
new file mode 100644
index 0000000..fa67179
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/base.d.ts
@@ -0,0 +1,19 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.7.
+
+// NOTE: TypeScript version-specific augmentations can be found in the following paths:
+// - ~/base.d.ts - Shared definitions common to all TypeScript versions
+// - ~/index.d.ts - Definitions specific to TypeScript 2.1
+// - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7
+// - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in
+
+// Reference required types from the default lib:
+/// <reference lib="es2018" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+/// <reference path="ts3.6/base.d.ts" />
+
+// TypeScript 3.7-specific augmentations:
+/// <reference path="assert.d.ts" />
diff --git a/node_modules/electron/node_modules/@types/node/buffer.d.ts b/node_modules/electron/node_modules/@types/node/buffer.d.ts
new file mode 100644
index 0000000..0fe668b
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/buffer.d.ts
@@ -0,0 +1,16 @@
+declare module "buffer" {
+ export const INSPECT_MAX_BYTES: number;
+ const BuffType: typeof Buffer;
+
+ export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
+
+ export function transcode(source: Buffer | Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */
+ new(size: number): Buffer;
+ prototype: Buffer;
+ };
+
+ export { BuffType as Buffer };
+}
diff --git a/node_modules/electron/node_modules/@types/node/child_process.d.ts b/node_modules/electron/node_modules/@types/node/child_process.d.ts
new file mode 100644
index 0000000..4426105
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/child_process.d.ts
@@ -0,0 +1,369 @@
+declare module "child_process" {
+ import * as events from "events";
+ import * as stream from "stream";
+ import * as net from "net";
+
+ interface ChildProcess extends events.EventEmitter {
+ stdin: stream.Writable;
+ stdout: stream.Readable;
+ stderr: stream.Readable;
+ readonly channel?: stream.Pipe | null;
+ stdio: [stream.Writable, stream.Readable, stream.Readable];
+ killed: boolean;
+ pid: number;
+ readonly exitCode: number | null;
+ readonly signalCode: number | null;
+ kill(signal?: string): void;
+ send(message: any, callback?: (error: Error) => void): boolean;
+ send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error) => void): boolean;
+ send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error) => void): boolean;
+ connected: boolean;
+ disconnect(): void;
+ unref(): void;
+ ref(): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. disconnect
+ * 3. error
+ * 4. exit
+ * 5. message
+ */
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: (code: number, signal: string) => void): this;
+ addListener(event: "disconnect", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
+ addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close", code: number, signal: string): boolean;
+ emit(event: "disconnect"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "exit", code: number | null, signal: string | null): boolean;
+ emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: (code: number, signal: string) => void): this;
+ on(event: "disconnect", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
+ on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: (code: number, signal: string) => void): this;
+ once(event: "disconnect", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
+ once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: (code: number, signal: string) => void): this;
+ prependListener(event: "disconnect", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
+ prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: "disconnect", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
+ prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
+ }
+
+ interface MessageOptions {
+ keepOpen?: boolean;
+ }
+
+ type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | stream.Stream | number | null | undefined)>;
+
+ interface SpawnOptions {
+ cwd?: string;
+ env?: NodeJS.ProcessEnv;
+ argv0?: string;
+ stdio?: StdioOptions;
+ detached?: boolean;
+ uid?: number;
+ gid?: number;
+ shell?: boolean | string;
+ windowsVerbatimArguments?: boolean;
+ windowsHide?: boolean;
+ }
+
+ function spawn(command: string, options?: SpawnOptions): ChildProcess;
+ function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptions): ChildProcess;
+
+ interface ExecOptions {
+ cwd?: string;
+ env?: NodeJS.ProcessEnv;
+ shell?: string;
+ timeout?: number;
+ maxBuffer?: number;
+ killSignal?: string;
+ uid?: number;
+ gid?: number;
+ windowsHide?: boolean;
+ }
+
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: string | null; // specify `null`.
+ }
+
+ interface ExecException extends Error {
+ cmd?: string;
+ killed?: boolean;
+ code?: number;
+ signal?: string;
+ }
+
+ // no `options` definitely means stdout/stderr are `string`.
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
+
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: ({ encoding?: string | null } & ExecOptions) | undefined | null,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
+ ): ChildProcess;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace exec {
+ function __promisify__(command: string): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): Promise<{ stdout: Buffer, stderr: Buffer }>;
+ function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(command: string, options: ExecOptions): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ }
+
+ interface ExecFileOptions {
+ cwd?: string;
+ env?: NodeJS.ProcessEnv;
+ timeout?: number;
+ maxBuffer?: number;
+ killSignal?: string;
+ uid?: number;
+ gid?: number;
+ windowsHide?: boolean;
+ windowsVerbatimArguments?: boolean;
+ shell?: boolean | string;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: 'buffer' | null;
+ }
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
+ encoding: string;
+ }
+
+ function execFile(file: string): ChildProcess;
+ function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
+ function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
+
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
+ ): ChildProcess;
+
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback: (error: ExecException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function execFile(
+ file: string,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
+ ): ChildProcess;
+
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions,
+ callback: (error: ExecException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
+ ): ChildProcess;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace execFile {
+ function __promisify__(file: string): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>;
+ function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ function __promisify__(file: string, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
+ ): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ }
+
+ interface ForkOptions {
+ cwd?: string;
+ env?: NodeJS.ProcessEnv;
+ execPath?: string;
+ execArgv?: string[];
+ silent?: boolean;
+ stdio?: StdioOptions;
+ detached?: boolean;
+ windowsVerbatimArguments?: boolean;
+ uid?: number;
+ gid?: number;
+ }
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
+
+ interface SpawnSyncOptions {
+ argv0?: string; // Not specified in the docs
+ cwd?: string;
+ input?: string | Buffer | NodeJS.TypedArray | DataView;
+ stdio?: StdioOptions;
+ env?: NodeJS.ProcessEnv;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string | number;
+ maxBuffer?: number;
+ encoding?: string;
+ shell?: boolean | string;
+ windowsVerbatimArguments?: boolean;
+ windowsHide?: boolean;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ interface SpawnSyncReturns<T> {
+ pid: number;
+ output: string[];
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: string | null;
+ error?: Error;
+ }
+ function spawnSync(command: string): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
+
+ interface ExecSyncOptions {
+ cwd?: string;
+ input?: string | Buffer | Uint8Array;
+ stdio?: StdioOptions;
+ env?: NodeJS.ProcessEnv;
+ shell?: string;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string | number;
+ maxBuffer?: number;
+ encoding?: string;
+ windowsHide?: boolean;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ function execSync(command: string): Buffer;
+ function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
+ function execSync(command: string, options?: ExecSyncOptions): Buffer;
+
+ interface ExecFileSyncOptions {
+ cwd?: string;
+ input?: string | Buffer | NodeJS.TypedArray | DataView;
+ stdio?: StdioOptions;
+ env?: NodeJS.ProcessEnv;
+ uid?: number;
+ gid?: number;
+ timeout?: number;
+ killSignal?: string | number;
+ maxBuffer?: number;
+ encoding?: string;
+ windowsHide?: boolean;
+ shell?: boolean | string;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding: string; // specify `null`.
+ }
+ function execFileSync(command: string): Buffer;
+ function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
+ function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
+}
diff --git a/node_modules/electron/node_modules/@types/node/cluster.d.ts b/node_modules/electron/node_modules/@types/node/cluster.d.ts
new file mode 100644
index 0000000..f089a41
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/cluster.d.ts
@@ -0,0 +1,260 @@
+declare module "cluster" {
+ import * as child from "child_process";
+ import * as events from "events";
+ import * as net from "net";
+
+ // interfaces
+ interface ClusterSettings {
+ execArgv?: string[]; // default: process.execArgv
+ exec?: string;
+ args?: string[];
+ silent?: boolean;
+ stdio?: any[];
+ uid?: number;
+ gid?: number;
+ inspectPort?: number | (() => number);
+ }
+
+ interface Address {
+ address: string;
+ port: number;
+ addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
+ }
+
+ class Worker extends events.EventEmitter {
+ id: number;
+ process: child.ChildProcess;
+ send(message: any, sendHandle?: any, callback?: (error: Error) => void): boolean;
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ disconnect(): void;
+ isConnected(): boolean;
+ isDead(): boolean;
+ exitedAfterDisconnect: boolean;
+
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. error
+ * 3. exit
+ * 4. listening
+ * 5. message
+ * 6. online
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "disconnect", listener: () => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "exit", listener: (code: number, signal: string) => void): this;
+ addListener(event: "listening", listener: (address: Address) => void): this;
+ addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: "online", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "disconnect"): boolean;
+ emit(event: "error", error: Error): boolean;
+ emit(event: "exit", code: number, signal: string): boolean;
+ emit(event: "listening", address: Address): boolean;
+ emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: "online"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "disconnect", listener: () => void): this;
+ on(event: "error", listener: (error: Error) => void): this;
+ on(event: "exit", listener: (code: number, signal: string) => void): this;
+ on(event: "listening", listener: (address: Address) => void): this;
+ on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: "online", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "disconnect", listener: () => void): this;
+ once(event: "error", listener: (error: Error) => void): this;
+ once(event: "exit", listener: (code: number, signal: string) => void): this;
+ once(event: "listening", listener: (address: Address) => void): this;
+ once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: "online", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "disconnect", listener: () => void): this;
+ prependListener(event: "error", listener: (error: Error) => void): this;
+ prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
+ prependListener(event: "listening", listener: (address: Address) => void): this;
+ prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: "online", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "disconnect", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
+ prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: "listening", listener: (address: Address) => void): this;
+ prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: "online", listener: () => void): this;
+ }
+
+ interface Cluster extends events.EventEmitter {
+ Worker: Worker;
+ disconnect(callback?: Function): void;
+ fork(env?: any): Worker;
+ isMaster: boolean;
+ isWorker: boolean;
+ // TODO: cluster.schedulingPolicy
+ settings: ClusterSettings;
+ setupMaster(settings?: ClusterSettings): void;
+ worker?: Worker;
+ workers?: {
+ [index: string]: Worker | undefined
+ };
+
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "disconnect", listener: (worker: Worker) => void): this;
+ addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ addListener(event: "fork", listener: (worker: Worker) => void): this;
+ addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: "online", listener: (worker: Worker) => void): this;
+ addListener(event: "setup", listener: (settings: any) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "disconnect", worker: Worker): boolean;
+ emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
+ emit(event: "fork", worker: Worker): boolean;
+ emit(event: "listening", worker: Worker, address: Address): boolean;
+ emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: "online", worker: Worker): boolean;
+ emit(event: "setup", settings: any): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "disconnect", listener: (worker: Worker) => void): this;
+ on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ on(event: "fork", listener: (worker: Worker) => void): this;
+ on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: "online", listener: (worker: Worker) => void): this;
+ on(event: "setup", listener: (settings: any) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "disconnect", listener: (worker: Worker) => void): this;
+ once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ once(event: "fork", listener: (worker: Worker) => void): this;
+ once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: "online", listener: (worker: Worker) => void): this;
+ once(event: "setup", listener: (settings: any) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "disconnect", listener: (worker: Worker) => void): this;
+ prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependListener(event: "fork", listener: (worker: Worker) => void): this;
+ prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: "online", listener: (worker: Worker) => void): this;
+ prependListener(event: "setup", listener: (settings: any) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this;
+ prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependOnceListener(event: "fork", listener: (worker: Worker) => void): this;
+ prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
+ prependOnceListener(event: "online", listener: (worker: Worker) => void): this;
+ prependOnceListener(event: "setup", listener: (settings: any) => void): this;
+ }
+
+ function disconnect(callback?: Function): void;
+ function fork(env?: any): Worker;
+ const isMaster: boolean;
+ const isWorker: boolean;
+ // TODO: cluster.schedulingPolicy
+ const settings: ClusterSettings;
+ function setupMaster(settings?: ClusterSettings): void;
+ const worker: Worker;
+ const workers: {
+ [index: string]: Worker | undefined
+ };
+
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ function addListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function addListener(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
+ function addListener(event: "online", listener: (worker: Worker) => void): Cluster;
+ function addListener(event: "setup", listener: (settings: any) => void): Cluster;
+
+ function emit(event: string | symbol, ...args: any[]): boolean;
+ function emit(event: "disconnect", worker: Worker): boolean;
+ function emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
+ function emit(event: "fork", worker: Worker): boolean;
+ function emit(event: "listening", worker: Worker, address: Address): boolean;
+ function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ function emit(event: "online", worker: Worker): boolean;
+ function emit(event: "setup", settings: any): boolean;
+
+ function on(event: string, listener: (...args: any[]) => void): Cluster;
+ function on(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function on(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
+ function on(event: "online", listener: (worker: Worker) => void): Cluster;
+ function on(event: "setup", listener: (settings: any) => void): Cluster;
+
+ function once(event: string, listener: (...args: any[]) => void): Cluster;
+ function once(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function once(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
+ function once(event: "online", listener: (worker: Worker) => void): Cluster;
+ function once(event: "setup", listener: (settings: any) => void): Cluster;
+
+ function removeListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function removeAllListeners(event?: string): Cluster;
+ function setMaxListeners(n: number): Cluster;
+ function getMaxListeners(): number;
+ function listeners(event: string): Function[];
+ function listenerCount(type: string): number;
+
+ function prependListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
+ function prependListener(event: "online", listener: (worker: Worker) => void): Cluster;
+ function prependListener(event: "setup", listener: (settings: any) => void): Cluster;
+
+ function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
+ function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster;
+ function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster;
+
+ function eventNames(): string[];
+}
diff --git a/node_modules/electron/node_modules/@types/node/console.d.ts b/node_modules/electron/node_modules/@types/node/console.d.ts
new file mode 100644
index 0000000..d30d13f
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/console.d.ts
@@ -0,0 +1,3 @@
+declare module "console" {
+ export = console;
+}
diff --git a/node_modules/electron/node_modules/@types/node/constants.d.ts b/node_modules/electron/node_modules/@types/node/constants.d.ts
new file mode 100644
index 0000000..626c698
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/constants.d.ts
@@ -0,0 +1,449 @@
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module "constants" {
+ /** @deprecated since v6.3.0 - use `os.constants.errno.E2BIG` instead. */
+ const E2BIG: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EACCES` instead. */
+ const EACCES: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EADDRINUSE` instead. */
+ const EADDRINUSE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EADDRNOTAVAIL` instead. */
+ const EADDRNOTAVAIL: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EAFNOSUPPORT` instead. */
+ const EAFNOSUPPORT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EAGAIN` instead. */
+ const EAGAIN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EALREADY` instead. */
+ const EALREADY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EBADF` instead. */
+ const EBADF: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EBADMSG` instead. */
+ const EBADMSG: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EBUSY` instead. */
+ const EBUSY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ECANCELED` instead. */
+ const ECANCELED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ECHILD` instead. */
+ const ECHILD: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ECONNABORTED` instead. */
+ const ECONNABORTED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ECONNREFUSED` instead. */
+ const ECONNREFUSED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ECONNRESET` instead. */
+ const ECONNRESET: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EDEADLK` instead. */
+ const EDEADLK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EDESTADDRREQ` instead. */
+ const EDESTADDRREQ: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EDOM` instead. */
+ const EDOM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EEXIST` instead. */
+ const EEXIST: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EFAULT` instead. */
+ const EFAULT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EFBIG` instead. */
+ const EFBIG: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EHOSTUNREACH` instead. */
+ const EHOSTUNREACH: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EIDRM` instead. */
+ const EIDRM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EILSEQ` instead. */
+ const EILSEQ: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EINPROGRESS` instead. */
+ const EINPROGRESS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EINTR` instead. */
+ const EINTR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EINVAL` instead. */
+ const EINVAL: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EIO` instead. */
+ const EIO: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EISCONN` instead. */
+ const EISCONN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EISDIR` instead. */
+ const EISDIR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ELOOP` instead. */
+ const ELOOP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EMFILE` instead. */
+ const EMFILE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EMLINK` instead. */
+ const EMLINK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EMSGSIZE` instead. */
+ const EMSGSIZE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENAMETOOLONG` instead. */
+ const ENAMETOOLONG: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENETDOWN` instead. */
+ const ENETDOWN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENETRESET` instead. */
+ const ENETRESET: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENETUNREACH` instead. */
+ const ENETUNREACH: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENFILE` instead. */
+ const ENFILE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOBUFS` instead. */
+ const ENOBUFS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENODATA` instead. */
+ const ENODATA: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENODEV` instead. */
+ const ENODEV: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOENT` instead. */
+ const ENOENT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOEXEC` instead. */
+ const ENOEXEC: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOLCK` instead. */
+ const ENOLCK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOLINK` instead. */
+ const ENOLINK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOMEM` instead. */
+ const ENOMEM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOMSG` instead. */
+ const ENOMSG: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOPROTOOPT` instead. */
+ const ENOPROTOOPT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSPC` instead. */
+ const ENOSPC: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSR` instead. */
+ const ENOSR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSTR` instead. */
+ const ENOSTR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOSYS` instead. */
+ const ENOSYS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTCONN` instead. */
+ const ENOTCONN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTDIR` instead. */
+ const ENOTDIR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTEMPTY` instead. */
+ const ENOTEMPTY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTSOCK` instead. */
+ const ENOTSOCK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTSUP` instead. */
+ const ENOTSUP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENOTTY` instead. */
+ const ENOTTY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ENXIO` instead. */
+ const ENXIO: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EOPNOTSUPP` instead. */
+ const EOPNOTSUPP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EOVERFLOW` instead. */
+ const EOVERFLOW: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EPERM` instead. */
+ const EPERM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EPIPE` instead. */
+ const EPIPE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EPROTO` instead. */
+ const EPROTO: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EPROTONOSUPPORT` instead. */
+ const EPROTONOSUPPORT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EPROTOTYPE` instead. */
+ const EPROTOTYPE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ERANGE` instead. */
+ const ERANGE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EROFS` instead. */
+ const EROFS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ESPIPE` instead. */
+ const ESPIPE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ESRCH` instead. */
+ const ESRCH: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ETIME` instead. */
+ const ETIME: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ETIMEDOUT` instead. */
+ const ETIMEDOUT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.ETXTBSY` instead. */
+ const ETXTBSY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EWOULDBLOCK` instead. */
+ const EWOULDBLOCK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.EXDEV` instead. */
+ const EXDEV: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINTR` instead. */
+ const WSAEINTR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEBADF` instead. */
+ const WSAEBADF: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEACCES` instead. */
+ const WSAEACCES: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEFAULT` instead. */
+ const WSAEFAULT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVAL` instead. */
+ const WSAEINVAL: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEMFILE` instead. */
+ const WSAEMFILE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEWOULDBLOCK` instead. */
+ const WSAEWOULDBLOCK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINPROGRESS` instead. */
+ const WSAEINPROGRESS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEALREADY` instead. */
+ const WSAEALREADY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTSOCK` instead. */
+ const WSAENOTSOCK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDESTADDRREQ` instead. */
+ const WSAEDESTADDRREQ: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEMSGSIZE` instead. */
+ const WSAEMSGSIZE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROTOTYPE` instead. */
+ const WSAEPROTOTYPE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOPROTOOPT` instead. */
+ const WSAENOPROTOOPT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROTONOSUPPORT` instead. */
+ const WSAEPROTONOSUPPORT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAESOCKTNOSUPPORT` instead. */
+ const WSAESOCKTNOSUPPORT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEOPNOTSUPP` instead. */
+ const WSAEOPNOTSUPP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPFNOSUPPORT` instead. */
+ const WSAEPFNOSUPPORT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEAFNOSUPPORT` instead. */
+ const WSAEAFNOSUPPORT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEADDRINUSE` instead. */
+ const WSAEADDRINUSE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEADDRNOTAVAIL` instead. */
+ const WSAEADDRNOTAVAIL: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETDOWN` instead. */
+ const WSAENETDOWN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETUNREACH` instead. */
+ const WSAENETUNREACH: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENETRESET` instead. */
+ const WSAENETRESET: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNABORTED` instead. */
+ const WSAECONNABORTED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNRESET` instead. */
+ const WSAECONNRESET: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOBUFS` instead. */
+ const WSAENOBUFS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEISCONN` instead. */
+ const WSAEISCONN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTCONN` instead. */
+ const WSAENOTCONN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAESHUTDOWN` instead. */
+ const WSAESHUTDOWN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAETOOMANYREFS` instead. */
+ const WSAETOOMANYREFS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAETIMEDOUT` instead. */
+ const WSAETIMEDOUT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECONNREFUSED` instead. */
+ const WSAECONNREFUSED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAELOOP` instead. */
+ const WSAELOOP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENAMETOOLONG` instead. */
+ const WSAENAMETOOLONG: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEHOSTDOWN` instead. */
+ const WSAEHOSTDOWN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEHOSTUNREACH` instead. */
+ const WSAEHOSTUNREACH: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOTEMPTY` instead. */
+ const WSAENOTEMPTY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROCLIM` instead. */
+ const WSAEPROCLIM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEUSERS` instead. */
+ const WSAEUSERS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDQUOT` instead. */
+ const WSAEDQUOT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAESTALE` instead. */
+ const WSAESTALE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEREMOTE` instead. */
+ const WSAEREMOTE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSASYSNOTREADY` instead. */
+ const WSASYSNOTREADY: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAVERNOTSUPPORTED` instead. */
+ const WSAVERNOTSUPPORTED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSANOTINITIALISED` instead. */
+ const WSANOTINITIALISED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEDISCON` instead. */
+ const WSAEDISCON: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAENOMORE` instead. */
+ const WSAENOMORE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAECANCELLED` instead. */
+ const WSAECANCELLED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVALIDPROCTABLE` instead. */
+ const WSAEINVALIDPROCTABLE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEINVALIDPROVIDER` instead. */
+ const WSAEINVALIDPROVIDER: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEPROVIDERFAILEDINIT` instead. */
+ const WSAEPROVIDERFAILEDINIT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSASYSCALLFAILURE` instead. */
+ const WSASYSCALLFAILURE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSASERVICE_NOT_FOUND` instead. */
+ const WSASERVICE_NOT_FOUND: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSATYPE_NOT_FOUND` instead. */
+ const WSATYPE_NOT_FOUND: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSA_E_NO_MORE` instead. */
+ const WSA_E_NO_MORE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSA_E_CANCELLED` instead. */
+ const WSA_E_CANCELLED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.errno.WSAEREFUSED` instead. */
+ const WSAEREFUSED: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGHUP` instead. */
+ const SIGHUP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGINT` instead. */
+ const SIGINT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGILL` instead. */
+ const SIGILL: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGABRT` instead. */
+ const SIGABRT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGFPE` instead. */
+ const SIGFPE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGKILL` instead. */
+ const SIGKILL: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSEGV` instead. */
+ const SIGSEGV: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTERM` instead. */
+ const SIGTERM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGBREAK` instead. */
+ const SIGBREAK: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGWINCH` instead. */
+ const SIGWINCH: number;
+ const SSL_OP_ALL: number;
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ const SSL_OP_EPHEMERAL_RSA: number;
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
+ const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
+ const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
+ const SSL_OP_NETSCAPE_CA_DN_BUG: number;
+ const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
+ const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
+ const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
+ const SSL_OP_NO_COMPRESSION: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ const SSL_OP_NO_SSLv2: number;
+ const SSL_OP_NO_SSLv3: number;
+ const SSL_OP_NO_TICKET: number;
+ const SSL_OP_NO_TLSv1: number;
+ const SSL_OP_NO_TLSv1_1: number;
+ const SSL_OP_NO_TLSv1_2: number;
+ const SSL_OP_PKCS1_CHECK_1: number;
+ const SSL_OP_PKCS1_CHECK_2: number;
+ const SSL_OP_SINGLE_DH_USE: number;
+ const SSL_OP_SINGLE_ECDH_USE: number;
+ const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
+ const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
+ const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
+ const SSL_OP_TLS_D5_BUG: number;
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_ECDH: number;
+ const ENGINE_METHOD_ECDSA: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_STORE: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+ const NPN_ENABLED: number;
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+ const O_RDONLY: number;
+ const O_WRONLY: number;
+ const O_RDWR: number;
+ const S_IFMT: number;
+ const S_IFREG: number;
+ const S_IFDIR: number;
+ const S_IFCHR: number;
+ const S_IFBLK: number;
+ const S_IFIFO: number;
+ const S_IFSOCK: number;
+ const S_IRWXU: number;
+ const S_IRUSR: number;
+ const S_IWUSR: number;
+ const S_IXUSR: number;
+ const S_IRWXG: number;
+ const S_IRGRP: number;
+ const S_IWGRP: number;
+ const S_IXGRP: number;
+ const S_IRWXO: number;
+ const S_IROTH: number;
+ const S_IWOTH: number;
+ const S_IXOTH: number;
+ const S_IFLNK: number;
+ const O_CREAT: number;
+ const O_EXCL: number;
+ const O_NOCTTY: number;
+ const O_DIRECTORY: number;
+ const O_NOATIME: number;
+ const O_NOFOLLOW: number;
+ const O_SYNC: number;
+ const O_DSYNC: number;
+ const O_SYMLINK: number;
+ const O_DIRECT: number;
+ const O_NONBLOCK: number;
+ const O_TRUNC: number;
+ const O_APPEND: number;
+ const F_OK: number;
+ const R_OK: number;
+ const W_OK: number;
+ const X_OK: number;
+ const COPYFILE_EXCL: number;
+ const COPYFILE_FICLONE: number;
+ const COPYFILE_FICLONE_FORCE: number;
+ const UV_UDP_REUSEADDR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGQUIT` instead. */
+ const SIGQUIT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTRAP` instead. */
+ const SIGTRAP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGIOT` instead. */
+ const SIGIOT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGBUS` instead. */
+ const SIGBUS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR1` instead. */
+ const SIGUSR1: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR2` instead. */
+ const SIGUSR2: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPIPE` instead. */
+ const SIGPIPE: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGALRM` instead. */
+ const SIGALRM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGCHLD` instead. */
+ const SIGCHLD: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTKFLT` instead. */
+ const SIGSTKFLT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGCONT` instead. */
+ const SIGCONT: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTOP` instead. */
+ const SIGSTOP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTSTP` instead. */
+ const SIGTSTP: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTIN` instead. */
+ const SIGTTIN: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTOU` instead. */
+ const SIGTTOU: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGURG` instead. */
+ const SIGURG: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGXCPU` instead. */
+ const SIGXCPU: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGXFSZ` instead. */
+ const SIGXFSZ: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGVTALRM` instead. */
+ const SIGVTALRM: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPROF` instead. */
+ const SIGPROF: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGIO` instead. */
+ const SIGIO: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPOLL` instead. */
+ const SIGPOLL: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGPWR` instead. */
+ const SIGPWR: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGSYS` instead. */
+ const SIGSYS: number;
+ /** @deprecated since v6.3.0 - use `os.constants.signals.SIGUNUSED` instead. */
+ const SIGUNUSED: number;
+ const defaultCoreCipherList: string;
+ const defaultCipherList: string;
+ const ENGINE_METHOD_RSA: number;
+ const ALPN_ENABLED: number;
+}
diff --git a/node_modules/electron/node_modules/@types/node/crypto.d.ts b/node_modules/electron/node_modules/@types/node/crypto.d.ts
new file mode 100644
index 0000000..f5f59d4
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/crypto.d.ts
@@ -0,0 +1,613 @@
+declare module 'crypto' {
+ import * as stream from 'stream';
+
+ interface Certificate {
+ exportChallenge(spkac: string | Buffer | NodeJS.TypedArray | DataView): Buffer;
+ exportPublicKey(spkac: string | Buffer | NodeJS.TypedArray | DataView): Buffer;
+ verifySpkac(spkac: Buffer | NodeJS.TypedArray | DataView): boolean;
+ }
+ const Certificate: {
+ new (): Certificate;
+ (): Certificate;
+ };
+
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+
+ interface CredentialDetails {
+ pfx: string;
+ key: string;
+ passphrase: string;
+ cert: string;
+ ca: string | string[];
+ crl: string | string[];
+ ciphers: string;
+ }
+ /** @deprecated since v0.11.13 - use tls.SecureContext instead. */
+ interface Credentials {
+ context?: any;
+ }
+ /** @deprecated since v0.11.13 - use tls.createSecureContext instead. */
+ function createCredentials(details: CredentialDetails): Credentials;
+ function createHash(algorithm: string, options?: stream.TransformOptions): Hash;
+ function createHmac(
+ algorithm: string,
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: stream.TransformOptions,
+ ): Hmac;
+
+ type Utf8AsciiLatin1Encoding = 'utf8' | 'ascii' | 'latin1';
+ type HexBase64Latin1Encoding = 'latin1' | 'hex' | 'base64';
+ type Utf8AsciiBinaryEncoding = 'utf8' | 'ascii' | 'binary';
+ type HexBase64BinaryEncoding = 'binary' | 'base64' | 'hex';
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
+
+ interface Hash extends stream.Transform {
+ update(data: string | Buffer | NodeJS.TypedArray | DataView): Hash;
+ update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash;
+ digest(): Buffer;
+ digest(encoding: HexBase64Latin1Encoding): string;
+ }
+ interface Hmac extends stream.Transform {
+ update(data: string | Buffer | NodeJS.TypedArray | DataView): Hmac;
+ update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
+ digest(): Buffer;
+ digest(encoding: HexBase64Latin1Encoding): string;
+ }
+ type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm';
+ type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number;
+ }
+ /** @deprecated since v10.0.0 use createCipheriv() */
+ function createCipher(
+ algorithm: CipherCCMTypes,
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ options: CipherCCMOptions,
+ ): CipherCCM;
+ /** @deprecated since v10.0.0 use createCipheriv() */
+ function createCipher(
+ algorithm: CipherGCMTypes,
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: CipherGCMOptions,
+ ): CipherGCM;
+ /** @deprecated since v10.0.0 use createCipheriv() */
+ function createCipher(
+ algorithm: string,
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: stream.TransformOptions,
+ ): Cipher;
+
+ function createCipheriv(
+ algorithm: CipherCCMTypes,
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
+ options: CipherCCMOptions,
+ ): CipherCCM;
+ function createCipheriv(
+ algorithm: CipherGCMTypes,
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: CipherGCMOptions,
+ ): CipherGCM;
+ function createCipheriv(
+ algorithm: string,
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: stream.TransformOptions,
+ ): Cipher;
+
+ interface Cipher extends stream.Transform {
+ update(data: string | Buffer | NodeJS.TypedArray | DataView): Buffer;
+ update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
+ update(data: Buffer | NodeJS.TypedArray | DataView, output_encoding: HexBase64BinaryEncoding): string;
+ update(
+ data: Buffer | NodeJS.TypedArray | DataView,
+ input_encoding: any,
+ output_encoding: HexBase64BinaryEncoding,
+ ): string;
+ // second arg ignored
+ update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string;
+ final(): Buffer;
+ final(output_encoding: string): string;
+ setAutoPadding(auto_padding?: boolean): this;
+ // getAuthTag(): Buffer;
+ // setAAD(buffer: Buffer): this; // docs only say buffer
+ }
+ interface CipherCCM extends Cipher {
+ setAAD(buffer: Buffer, options: { plaintextLength: number }): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherGCM extends Cipher {
+ setAAD(buffer: Buffer, options?: { plaintextLength: number }): this;
+ getAuthTag(): Buffer;
+ }
+ /** @deprecated since v10.0.0 use createDecipheriv() */
+ function createDecipher(
+ algorithm: CipherCCMTypes,
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ options: CipherCCMOptions,
+ ): DecipherCCM;
+ /** @deprecated since v10.0.0 use createDecipheriv() */
+ function createDecipher(
+ algorithm: CipherGCMTypes,
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: CipherGCMOptions,
+ ): DecipherGCM;
+ /** @deprecated since v10.0.0 use createDecipheriv() */
+ function createDecipher(
+ algorithm: string,
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: stream.TransformOptions,
+ ): Decipher;
+
+ function createDecipheriv(
+ algorithm: CipherCCMTypes,
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
+ options: CipherCCMOptions,
+ ): DecipherCCM;
+ function createDecipheriv(
+ algorithm: CipherGCMTypes,
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: CipherGCMOptions,
+ ): DecipherGCM;
+ function createDecipheriv(
+ algorithm: string,
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
+ options?: stream.TransformOptions,
+ ): Decipher;
+
+ interface Decipher extends stream.Transform {
+ update(data: Buffer | NodeJS.TypedArray | DataView): Buffer;
+ update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
+ update(
+ data: Buffer | NodeJS.TypedArray | DataView,
+ input_encoding: HexBase64BinaryEncoding | undefined,
+ output_encoding: Utf8AsciiBinaryEncoding,
+ ): string;
+ // second arg is ignored
+ update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string;
+ final(): Buffer;
+ final(output_encoding: string): string;
+ setAutoPadding(auto_padding?: boolean): this;
+ // setAuthTag(tag: Buffer | NodeJS.TypedArray | DataView): this;
+ // setAAD(buffer: Buffer | NodeJS.TypedArray | DataView): this;
+ }
+ interface DecipherCCM extends Decipher {
+ setAuthTag(buffer: Buffer | NodeJS.TypedArray | DataView): this;
+ setAAD(buffer: Buffer | NodeJS.TypedArray | DataView, options: { plaintextLength: number }): this;
+ }
+ interface DecipherGCM extends Decipher {
+ setAuthTag(buffer: Buffer | NodeJS.TypedArray | DataView): this;
+ setAAD(buffer: Buffer | NodeJS.TypedArray | DataView, options?: { plaintextLength: number }): this;
+ }
+
+ function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
+ interface Signer extends NodeJS.WritableStream {
+ update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer;
+ update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
+ sign(private_key: string | { key: string; passphrase?: string; padding?: number; saltLength?: number }): Buffer;
+ sign(
+ private_key: string | { key: string; passphrase?: string; padding?: number; saltLength?: number },
+ output_format: HexBase64Latin1Encoding,
+ ): string;
+ }
+ function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
+ interface Verify extends NodeJS.WritableStream {
+ update(data: string | Buffer | NodeJS.TypedArray | DataView): Verify;
+ update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
+ verify(object: string | Object, signature: Buffer | NodeJS.TypedArray | DataView): boolean;
+ verify(object: string | Object, signature: string, signature_format: HexBase64Latin1Encoding): boolean;
+ // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
+ // The signature field accepts a TypedArray type, but it is only available starting ES2017
+ }
+ function createDiffieHellman(
+ prime_length: number,
+ generator?: number | Buffer | NodeJS.TypedArray | DataView,
+ ): DiffieHellman;
+ function createDiffieHellman(prime: Buffer | NodeJS.TypedArray | DataView): DiffieHellman;
+ function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
+ function createDiffieHellman(
+ prime: string,
+ prime_encoding: HexBase64Latin1Encoding,
+ generator: number | Buffer | NodeJS.TypedArray | DataView,
+ ): DiffieHellman;
+ function createDiffieHellman(
+ prime: string,
+ prime_encoding: HexBase64Latin1Encoding,
+ generator: string,
+ generator_encoding: HexBase64Latin1Encoding,
+ ): DiffieHellman;
+ interface DiffieHellman {
+ generateKeys(): Buffer;
+ generateKeys(encoding: HexBase64Latin1Encoding): string;
+ computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView): Buffer;
+ computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
+ computeSecret(
+ other_public_key: Buffer | NodeJS.TypedArray | DataView,
+ output_encoding: HexBase64Latin1Encoding,
+ ): string;
+ computeSecret(
+ other_public_key: string,
+ input_encoding: HexBase64Latin1Encoding,
+ output_encoding: HexBase64Latin1Encoding,
+ ): string;
+ getPrime(): Buffer;
+ getPrime(encoding: HexBase64Latin1Encoding): string;
+ getGenerator(): Buffer;
+ getGenerator(encoding: HexBase64Latin1Encoding): string;
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: HexBase64Latin1Encoding): string;
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: HexBase64Latin1Encoding): string;
+ setPublicKey(public_key: Buffer | NodeJS.TypedArray | DataView): void;
+ setPublicKey(public_key: string, encoding: string): void;
+ setPrivateKey(private_key: Buffer | NodeJS.TypedArray | DataView): void;
+ setPrivateKey(private_key: string, encoding: string): void;
+ verifyError: number;
+ }
+ function getDiffieHellman(group_name: string): DiffieHellman;
+ function pbkdf2(
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ salt: string | Buffer | NodeJS.TypedArray | DataView,
+ iterations: number,
+ keylen: number,
+ digest: string,
+ callback: (err: Error | null, derivedKey: Buffer) => any,
+ ): void;
+ function pbkdf2Sync(
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ salt: string | Buffer | NodeJS.TypedArray | DataView,
+ iterations: number,
+ keylen: number,
+ digest: string,
+ ): Buffer;
+
+ function randomBytes(size: number): Buffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ function pseudoRandomBytes(size: number): Buffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+
+ function randomFillSync<T extends Buffer | NodeJS.TypedArray | DataView>(
+ buffer: T,
+ offset?: number,
+ size?: number,
+ ): T;
+ function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
+ buffer: T,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+ function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
+ buffer: T,
+ offset: number,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+ function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
+ buffer: T,
+ offset: number,
+ size: number,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+
+ interface ScryptOptions {
+ cost?: number;
+ blockSize?: number;
+ parallelization?: number;
+ N?: number;
+ r?: number;
+ p?: number;
+ maxmem?: number;
+ }
+ function scrypt(
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ salt: string | Buffer | NodeJS.TypedArray | DataView,
+ keylen: number,
+ callback: (err: Error | null, derivedKey: Buffer) => void,
+ ): void;
+ function scrypt(
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ salt: string | Buffer | NodeJS.TypedArray | DataView,
+ keylen: number,
+ options: ScryptOptions,
+ callback: (err: Error | null, derivedKey: Buffer) => void,
+ ): void;
+ function scryptSync(
+ password: string | Buffer | NodeJS.TypedArray | DataView,
+ salt: string | Buffer | NodeJS.TypedArray | DataView,
+ keylen: number,
+ options?: ScryptOptions,
+ ): Buffer;
+
+ interface RsaPublicKey {
+ key: string;
+ padding?: number;
+ }
+ interface RsaPrivateKey {
+ key: string;
+ passphrase?: string;
+ padding?: number;
+ }
+ function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer;
+ function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer;
+ function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer;
+ function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer | NodeJS.TypedArray | DataView): Buffer;
+ function getCiphers(): string[];
+ function getCurves(): string[];
+ function getFips(): 1 | 0;
+ function getHashes(): string[];
+ class ECDH {
+ static convertKey(
+ key: string | Buffer | NodeJS.TypedArray | DataView,
+ curve: string,
+ inputEncoding?: HexBase64Latin1Encoding,
+ outputEncoding?: 'latin1' | 'hex' | 'base64',
+ format?: 'uncompressed' | 'compressed' | 'hybrid',
+ ): Buffer | string;
+ generateKeys(): Buffer;
+ generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
+ computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView): Buffer;
+ computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
+ computeSecret(
+ other_public_key: Buffer | NodeJS.TypedArray | DataView,
+ output_encoding: HexBase64Latin1Encoding,
+ ): string;
+ computeSecret(
+ other_public_key: string,
+ input_encoding: HexBase64Latin1Encoding,
+ output_encoding: HexBase64Latin1Encoding,
+ ): string;
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: HexBase64Latin1Encoding): string;
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
+ setPrivateKey(private_key: Buffer | NodeJS.TypedArray | DataView): void;
+ setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void;
+ }
+ function createECDH(curve_name: string): ECDH;
+ function timingSafeEqual(
+ a: Buffer | NodeJS.TypedArray | DataView,
+ b: Buffer | NodeJS.TypedArray | DataView,
+ ): boolean;
+ /** @deprecated since v10.0.0 */
+ const DEFAULT_ENCODING: string;
+
+ export type KeyType = 'rsa' | 'dsa' | 'ec';
+ export type KeyFormat = 'pem' | 'der';
+
+ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
+ format: T;
+ cipher?: string;
+ passphrase?: string;
+ }
+
+ interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * @default 0x10001
+ */
+ publicExponent?: number;
+
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs1' | 'pkcs8';
+ };
+ }
+
+ interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'sec1' | 'pkcs8';
+ };
+ }
+
+ interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
+ publicKey: T1;
+ privateKey: T2;
+ }
+
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+
+ namespace generateKeyPair {
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/dgram.d.ts b/node_modules/electron/node_modules/@types/node/dgram.d.ts
new file mode 100644
index 0000000..fa05f2b
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/dgram.d.ts
@@ -0,0 +1,97 @@
+declare module "dgram" {
+ import { AddressInfo } from "net";
+ import * as dns from "dns";
+ import * as events from "events";
+
+ interface RemoteInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+
+ interface BindOptions {
+ port: number;
+ address?: string;
+ exclusive?: boolean;
+ }
+
+ type SocketType = "udp4" | "udp6";
+
+ interface SocketOptions {
+ type: SocketType;
+ reuseAddr?: boolean;
+ recvBufferSize?: number;
+ sendBufferSize?: number;
+ lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
+ }
+
+ function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+
+ class Socket extends events.EventEmitter {
+ send(msg: Buffer | string | Uint8Array | ReadonlyArray<any>, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: Buffer | string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ bind(port?: number, address?: string, callback?: () => void): void;
+ bind(port?: number, callback?: () => void): void;
+ bind(callback?: () => void): void;
+ bind(options: BindOptions, callback?: Function): void;
+ close(callback?: () => void): void;
+ address(): AddressInfo | string;
+ setBroadcast(flag: boolean): void;
+ setTTL(ttl: number): void;
+ setMulticastTTL(ttl: number): void;
+ setMulticastInterface(multicastInterface: string): void;
+ setMulticastLoopback(flag: boolean): void;
+ addMembership(multicastAddress: string, multicastInterface?: string): void;
+ dropMembership(multicastAddress: string, multicastInterface?: string): void;
+ ref(): this;
+ unref(): this;
+ setRecvBufferSize(size: number): void;
+ setSendBufferSize(size: number): void;
+ getRecvBufferSize(): number;
+ getSendBufferSize(): number;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. error
+ * 3. listening
+ * 4. message
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "listening", listener: () => void): this;
+ addListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "listening"): boolean;
+ emit(event: "message", msg: Buffer, rinfo: AddressInfo): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "listening", listener: () => void): this;
+ on(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "listening", listener: () => void): this;
+ once(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "listening", listener: () => void): this;
+ prependListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "listening", listener: () => void): this;
+ prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/dns.d.ts b/node_modules/electron/node_modules/@types/node/dns.d.ts
new file mode 100644
index 0000000..879d690
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/dns.d.ts
@@ -0,0 +1,366 @@
+declare module "dns" {
+ // Supported getaddrinfo flags.
+ const ADDRCONFIG: number;
+ const V4MAPPED: number;
+
+ interface LookupOptions {
+ family?: number;
+ hints?: number;
+ all?: boolean;
+ verbatim?: boolean;
+ }
+
+ interface LookupOneOptions extends LookupOptions {
+ all?: false;
+ }
+
+ interface LookupAllOptions extends LookupOptions {
+ all: true;
+ }
+
+ interface LookupAddress {
+ address: string;
+ family: number;
+ }
+
+ function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
+ function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
+ function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace lookup {
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<{ address: LookupAddress[] }>;
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>;
+ function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>;
+ }
+
+ function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
+
+ namespace lookupService {
+ function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
+ }
+
+ interface ResolveOptions {
+ ttl: boolean;
+ }
+
+ interface ResolveWithTtlOptions extends ResolveOptions {
+ ttl: true;
+ }
+
+ interface RecordWithTtl {
+ address: string;
+ ttl: number;
+ }
+
+ /** @deprecated Use AnyARecord or AnyAaaaRecord instead. */
+ type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
+
+ interface AnyARecord extends RecordWithTtl {
+ type: "A";
+ }
+
+ interface AnyAaaaRecord extends RecordWithTtl {
+ type: "AAAA";
+ }
+
+ interface MxRecord {
+ priority: number;
+ exchange: string;
+ }
+
+ interface AnyMxRecord extends MxRecord {
+ type: "MX";
+ }
+
+ interface NaptrRecord {
+ flags: string;
+ service: string;
+ regexp: string;
+ replacement: string;
+ order: number;
+ preference: number;
+ }
+
+ interface AnyNaptrRecord extends NaptrRecord {
+ type: "NAPTR";
+ }
+
+ interface SoaRecord {
+ nsname: string;
+ hostmaster: string;
+ serial: number;
+ refresh: number;
+ retry: number;
+ expire: number;
+ minttl: number;
+ }
+
+ interface AnySoaRecord extends SoaRecord {
+ type: "SOA";
+ }
+
+ interface SrvRecord {
+ priority: number;
+ weight: number;
+ port: number;
+ name: string;
+ }
+
+ interface AnySrvRecord extends SrvRecord {
+ type: "SRV";
+ }
+
+ interface AnyTxtRecord {
+ type: "TXT";
+ entries: string[];
+ }
+
+ interface AnyNsRecord {
+ type: "NS";
+ value: string;
+ }
+
+ interface AnyPtrRecord {
+ type: "PTR";
+ value: string;
+ }
+
+ interface AnyCnameRecord {
+ type: "CNAME";
+ value: string;
+ }
+
+ type AnyRecord = AnyARecord |
+ AnyAaaaRecord |
+ AnyCnameRecord |
+ AnyMxRecord |
+ AnyNaptrRecord |
+ AnyNsRecord |
+ AnyPtrRecord |
+ AnySoaRecord |
+ AnySrvRecord |
+ AnyTxtRecord;
+
+ function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
+ function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ function resolve(
+ hostname: string,
+ rrtype: string,
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
+ ): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace resolve {
+ function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
+ function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
+ function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
+ function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
+ function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
+ function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
+ function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
+ function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ }
+
+ function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace resolve4 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+
+ function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace resolve6 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+
+ function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ namespace resolveCname {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+
+ function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ namespace resolveMx {
+ function __promisify__(hostname: string): Promise<MxRecord[]>;
+ }
+
+ function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ namespace resolveNaptr {
+ function __promisify__(hostname: string): Promise<NaptrRecord[]>;
+ }
+
+ function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ namespace resolveNs {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+
+ function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ namespace resolvePtr {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+
+ function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
+ namespace resolveSoa {
+ function __promisify__(hostname: string): Promise<SoaRecord>;
+ }
+
+ function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ namespace resolveSrv {
+ function __promisify__(hostname: string): Promise<SrvRecord[]>;
+ }
+
+ function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ namespace resolveTxt {
+ function __promisify__(hostname: string): Promise<string[][]>;
+ }
+
+ function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ namespace resolveAny {
+ function __promisify__(hostname: string): Promise<AnyRecord[]>;
+ }
+
+ function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
+ function setServers(servers: ReadonlyArray<string>): void;
+ function getServers(): string[];
+
+ // Error codes
+ const NODATA: string;
+ const FORMERR: string;
+ const SERVFAIL: string;
+ const NOTFOUND: string;
+ const NOTIMP: string;
+ const REFUSED: string;
+ const BADQUERY: string;
+ const BADNAME: string;
+ const BADFAMILY: string;
+ const BADRESP: string;
+ const CONNREFUSED: string;
+ const TIMEOUT: string;
+ const EOF: string;
+ const FILE: string;
+ const NOMEM: string;
+ const DESTRUCTION: string;
+ const BADSTR: string;
+ const BADFLAGS: string;
+ const NONAME: string;
+ const BADHINTS: string;
+ const NOTINITIALIZED: string;
+ const LOADIPHLPAPI: string;
+ const ADDRGETNETWORKPARAMS: string;
+ const CANCELLED: string;
+
+ class Resolver {
+ getServers: typeof getServers;
+ setServers: typeof setServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ cancel(): void;
+ }
+
+ namespace promises {
+ function getServers(): string[];
+
+ function lookup(hostname: string, family: number): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ function lookup(hostname: string): Promise<LookupAddress>;
+
+ function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
+
+ function resolve(hostname: string): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
+ function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
+ function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
+ function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
+ function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
+ function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
+ function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+
+ function resolve4(hostname: string): Promise<string[]>;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+
+ function resolve6(hostname: string): Promise<string[]>;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+
+ function resolveAny(hostname: string): Promise<AnyRecord[]>;
+
+ function resolveCname(hostname: string): Promise<string[]>;
+
+ function resolveMx(hostname: string): Promise<MxRecord[]>;
+
+ function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
+
+ function resolveNs(hostname: string): Promise<string[]>;
+
+ function resolvePtr(hostname: string): Promise<string[]>;
+
+ function resolveSoa(hostname: string): Promise<SoaRecord>;
+
+ function resolveSrv(hostname: string): Promise<SrvRecord[]>;
+
+ function resolveTxt(hostname: string): Promise<string[][]>;
+
+ function reverse(ip: string): Promise<string[]>;
+
+ function setServers(servers: ReadonlyArray<string>): void;
+
+ class Resolver {
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ setServers: typeof setServers;
+ }
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/domain.d.ts b/node_modules/electron/node_modules/@types/node/domain.d.ts
new file mode 100644
index 0000000..80c558b
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/domain.d.ts
@@ -0,0 +1,16 @@
+declare module 'domain' {
+ import EventEmitter = require('events');
+
+ class Domain extends EventEmitter implements NodeJS.Domain {
+ run(fn: Function): void;
+ add(emitter: EventEmitter): void;
+ remove(emitter: EventEmitter): void;
+ bind(cb: (err: Error, data: any) => any): any;
+ intercept(cb: (data: any) => any): any;
+ members: any[];
+ enter(): void;
+ exit(): void;
+ }
+
+ function create(): Domain;
+}
diff --git a/node_modules/electron/node_modules/@types/node/events.d.ts b/node_modules/electron/node_modules/@types/node/events.d.ts
new file mode 100644
index 0000000..fb17361
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/events.d.ts
@@ -0,0 +1,30 @@
+declare module 'events' {
+ interface NodeEventTarget {
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ interface DOMEventTarget {
+ addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
+ }
+
+ class EventEmitter extends NodeJS.EventEmitter {
+ constructor();
+
+ static once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
+ static once(emitter: DOMEventTarget, event: string): Promise<any[]>;
+
+ /** @deprecated since v4.0.0 */
+ static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
+
+ // TODO: This should be described using a static getter/setter pair:
+ static defaultMaxListeners: number;
+ }
+
+ import internal = require('events');
+ namespace EventEmitter {
+ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
+ export { internal as EventEmitter };
+ }
+
+ export = EventEmitter;
+}
diff --git a/node_modules/electron/node_modules/@types/node/fs.d.ts b/node_modules/electron/node_modules/@types/node/fs.d.ts
new file mode 100644
index 0000000..ba6c999
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/fs.d.ts
@@ -0,0 +1,2302 @@
+declare module "fs" {
+ import * as stream from "stream";
+ import * as events from "events";
+ import { URL } from "url";
+
+ /**
+ * Valid types for path values in "fs".
+ */
+ type PathLike = string | Buffer | URL;
+
+ type BinaryData = Buffer | DataView | NodeJS.TypedArray;
+ class Stats {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ dev: number;
+ ino: number;
+ mode: number;
+ nlink: number;
+ uid: number;
+ gid: number;
+ rdev: number;
+ size: number;
+ blksize: number;
+ blocks: number;
+ atimeMs: number;
+ mtimeMs: number;
+ ctimeMs: number;
+ birthtimeMs: number;
+ atime: Date;
+ mtime: Date;
+ ctime: Date;
+ birthtime: Date;
+ }
+
+ class Dirent {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ name: string;
+ }
+
+ interface FSWatcher extends events.EventEmitter {
+ close(): void;
+
+ /**
+ * events.EventEmitter
+ * 1. change
+ * 2. error
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "close", listener: () => void): this;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ on(event: "error", listener: (error: Error) => void): this;
+ on(event: "close", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ once(event: "error", listener: (error: Error) => void): this;
+ once(event: "close", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependListener(event: "error", listener: (error: Error) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ }
+
+ class ReadStream extends stream.Readable {
+ close(): void;
+ bytesRead: number;
+ path: string | Buffer;
+
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "open", listener: (fd: number) => void): this;
+ addListener(event: "close", listener: () => void): this;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "open", listener: (fd: number) => void): this;
+ on(event: "close", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "open", listener: (fd: number) => void): this;
+ once(event: "close", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "open", listener: (fd: number) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "open", listener: (fd: number) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ }
+
+ class WriteStream extends stream.Writable {
+ close(): void;
+ bytesWritten: number;
+ path: string | Buffer;
+
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "open", listener: (fd: number) => void): this;
+ addListener(event: "close", listener: () => void): this;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "open", listener: (fd: number) => void): this;
+ on(event: "close", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "open", listener: (fd: number) => void): this;
+ once(event: "close", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "open", listener: (fd: number) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "open", listener: (fd: number) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ }
+
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace rename {
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+
+ /**
+ * Synchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function renameSync(oldPath: PathLike, newPath: PathLike): void;
+
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace truncate {
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(path: PathLike, len?: number | null): Promise<void>;
+ }
+
+ /**
+ * Synchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function truncateSync(path: PathLike, len?: number | null): void;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ */
+ function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace ftruncate {
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(fd: number, len?: number | null): Promise<void>;
+ }
+
+ /**
+ * Synchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function ftruncateSync(fd: number, len?: number | null): void;
+
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace chown {
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function chownSync(path: PathLike, uid: number, gid: number): void;
+
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace fchown {
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function fchownSync(fd: number, uid: number, gid: number): void;
+
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace lchown {
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lchownSync(path: PathLike, uid: number, gid: number): void;
+
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace chmod {
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: string | number): Promise<void>;
+ }
+
+ /**
+ * Synchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function chmodSync(path: PathLike, mode: string | number): void;
+
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace fchmod {
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(fd: number, mode: string | number): Promise<void>;
+ }
+
+ /**
+ * Synchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function fchmodSync(fd: number, mode: string | number): void;
+
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace lchmod {
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: string | number): Promise<void>;
+ }
+
+ /**
+ * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function lchmodSync(path: PathLike, mode: string | number): void;
+
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace stat {
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<Stats>;
+ }
+
+ /**
+ * Synchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function statSync(path: PathLike): Stats;
+
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace fstat {
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<Stats>;
+ }
+
+ /**
+ * Synchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function fstatSync(fd: number): Stats;
+
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace lstat {
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<Stats>;
+ }
+
+ /**
+ * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lstatSync(path: PathLike): Stats;
+
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace link {
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+
+ /**
+ * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function linkSync(existingPath: PathLike, newPath: PathLike): void;
+
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ */
+ function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace symlink {
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+
+ type Type = "dir" | "file" | "junction";
+ }
+
+ /**
+ * Synchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(
+ path: PathLike,
+ options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, linkString: string) => void
+ ): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace readlink {
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
+ }
+
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlinkSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string;
+
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlinkSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer;
+
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlinkSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(
+ path: PathLike,
+ options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
+ ): void;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace realpath {
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
+
+ function native(
+ path: PathLike,
+ options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
+ ): void;
+ function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ }
+
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpathSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string;
+
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpathSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer;
+
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer;
+
+ namespace realpathSync {
+ function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string;
+ function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer;
+ function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer;
+ }
+
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace unlink {
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<void>;
+ }
+
+ /**
+ * Synchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function unlinkSync(path: PathLike): void;
+
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace rmdir {
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<void>;
+ }
+
+ /**
+ * Synchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function rmdirSync(path: PathLike): void;
+
+ export interface MakeDirectoryOptions {
+ /**
+ * Indicates whether parent folders should be created.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
+ * @default 0o777.
+ */
+ mode?: number;
+ }
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace mkdir {
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise<void>;
+ }
+
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdirSync(path: PathLike, options?: number | string | MakeDirectoryOptions | null): void;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ */
+ function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace mkdtemp {
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
+ }
+
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtempSync(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string;
+
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtempSync(prefix: string, options: { encoding: "buffer" } | "buffer"): Buffer;
+
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtempSync(prefix: string, options?: { encoding?: string | null } | string | null): string | Buffer;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
+ ): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(
+ path: PathLike,
+ options: { encoding?: string | null; withFileTypes?: false } | string | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void,
+ ): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace readdir {
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise<Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise<string[] | Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
+ */
+ function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise<Dirent[]>;
+ }
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[];
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[];
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[];
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[];
+
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace close {
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function closeSync(fd: number): void;
+
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace open {
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function __promisify__(path: PathLike, flags: string | number, mode?: string | number | null): Promise<number>;
+ }
+
+ /**
+ * Synchronous open(2) - open and possibly create a file, returning a file descriptor..
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function openSync(path: PathLike, flags: string | number, mode?: string | number | null): number;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace utimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+ }
+
+ /**
+ * Synchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace futimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+ }
+
+ /**
+ * Synchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void;
+
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace fsync {
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function fsyncSync(fd: number): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function write<TBuffer extends BinaryData>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ position: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+ ): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ */
+ function write<TBuffer extends BinaryData>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+ ): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ */
+ function write<TBuffer extends BinaryData>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ */
+ function write<TBuffer extends BinaryData>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write. If something other than a string is supplied it will be coerced to a string.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function write(
+ fd: number,
+ string: any,
+ position: number | undefined | null,
+ encoding: string | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
+ ): void;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write. If something other than a string is supplied it will be coerced to a string.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write. If something other than a string is supplied it will be coerced to a string.
+ */
+ function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace write {
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function __promisify__<TBuffer extends BinaryData>(
+ fd: number,
+ buffer?: TBuffer,
+ offset?: number,
+ length?: number,
+ position?: number | null,
+ ): Promise<{ bytesWritten: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write. If something other than a string is supplied it will be coerced to a string.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function __promisify__(fd: number, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>;
+ }
+
+ /**
+ * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function writeSync(fd: number, buffer: BinaryData, offset?: number | null, length?: number | null, position?: number | null): number;
+
+ /**
+ * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param string A string to write. If something other than a string is supplied it will be coerced to a string.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function writeSync(fd: number, string: any, position?: number | null, encoding?: string | null): number;
+
+ /**
+ * Asynchronously reads data from the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function read<TBuffer extends BinaryData>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: number | null,
+ callback?: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
+ ): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace read {
+ /**
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function __promisify__<TBuffer extends BinaryData>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
+ }
+
+ /**
+ * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read.
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function readSync(fd: number, buffer: BinaryData, offset: number, length: number, position: number | null): number;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(
+ path: PathLike | number,
+ options: { encoding?: string | null; flag?: string; } | string | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void,
+ ): void;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ */
+ function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace readFile {
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise<Buffer>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(path: PathLike | number, options: { encoding: string; flag?: string; } | string): Promise<string>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): Promise<string | Buffer>;
+ }
+
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer;
+
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFileSync(path: PathLike | number, options: { encoding: string; flag?: string; } | string): string;
+
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer;
+
+ type WriteFileOptions = { encoding?: string | null; mode?: number | string; flag?: string; } | string | null;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace writeFile {
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function __promisify__(path: PathLike | number, data: any, options?: WriteFileOptions): Promise<void>;
+ }
+
+ /**
+ * Synchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace appendFile {
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function __promisify__(file: PathLike | number, data: any, options?: WriteFileOptions): Promise<void>;
+ }
+
+ /**
+ * Synchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function appendFileSync(file: PathLike | number, data: any, options?: WriteFileOptions): void;
+
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ */
+ function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void;
+
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void;
+
+ /**
+ * Stop watching for changes on `filename`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(
+ filename: PathLike,
+ options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null,
+ listener?: (event: string, filename: string) => void,
+ ): FSWatcher;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(filename: PathLike, options: { encoding: "buffer", persistent?: boolean, recursive?: boolean } | "buffer", listener?: (event: string, filename: Buffer) => void): FSWatcher;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ function watch(
+ filename: PathLike,
+ options: { encoding?: string | null, persistent?: boolean, recursive?: boolean } | string | null,
+ listener?: (event: string, filename: string | Buffer) => void,
+ ): FSWatcher;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function watch(filename: PathLike, listener?: (event: string, filename: string) => any): FSWatcher;
+
+ /**
+ * Asynchronously tests whether or not the given path exists by checking with the file system.
+ * @deprecated
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function exists(path: PathLike, callback: (exists: boolean) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace exists {
+ /**
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike): Promise<boolean>;
+ }
+
+ /**
+ * Synchronously tests whether or not the given path exists by checking with the file system.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function existsSync(path: PathLike): boolean;
+
+ namespace constants {
+ // File Access Constants
+
+ /** Constant for fs.access(). File is visible to the calling process. */
+ const F_OK: number;
+
+ /** Constant for fs.access(). File can be read by the calling process. */
+ const R_OK: number;
+
+ /** Constant for fs.access(). File can be written by the calling process. */
+ const W_OK: number;
+
+ /** Constant for fs.access(). File can be executed by the calling process. */
+ const X_OK: number;
+
+ // File Copy Constants
+
+ /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
+ const COPYFILE_EXCL: number;
+
+ /**
+ * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
+ */
+ const COPYFILE_FICLONE: number;
+
+ /**
+ * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
+ */
+ const COPYFILE_FICLONE_FORCE: number;
+
+ // File Open Constants
+
+ /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
+ const O_RDONLY: number;
+
+ /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
+ const O_WRONLY: number;
+
+ /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
+ const O_RDWR: number;
+
+ /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
+ const O_CREAT: number;
+
+ /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
+ const O_EXCL: number;
+
+ /**
+ * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
+ * opening the path shall not cause that terminal to become the controlling terminal for the process
+ * (if the process does not already have one).
+ */
+ const O_NOCTTY: number;
+
+ /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
+ const O_TRUNC: number;
+
+ /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
+ const O_APPEND: number;
+
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
+ const O_DIRECTORY: number;
+
+ /**
+ * constant for fs.open().
+ * Flag indicating reading accesses to the file system will no longer result in
+ * an update to the atime information associated with the file.
+ * This flag is available on Linux operating systems only.
+ */
+ const O_NOATIME: number;
+
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
+ const O_NOFOLLOW: number;
+
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
+ const O_SYNC: number;
+
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
+ const O_DSYNC: number;
+
+ /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
+ const O_SYMLINK: number;
+
+ /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
+ const O_DIRECT: number;
+
+ /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
+ const O_NONBLOCK: number;
+
+ // File Type Constants
+
+ /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
+ const S_IFMT: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
+ const S_IFREG: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
+ const S_IFDIR: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
+ const S_IFCHR: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
+ const S_IFBLK: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
+ const S_IFIFO: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
+ const S_IFLNK: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
+ const S_IFSOCK: number;
+
+ // File Mode Constants
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
+ const S_IRWXU: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
+ const S_IRUSR: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
+ const S_IWUSR: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
+ const S_IXUSR: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
+ const S_IRWXG: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
+ const S_IRGRP: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
+ const S_IWGRP: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
+ const S_IXGRP: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
+ const S_IRWXO: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
+ const S_IROTH: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
+ const S_IWOTH: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
+ const S_IXOTH: number;
+ }
+
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function access(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace access {
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike, mode?: number): Promise<void>;
+ }
+
+ /**
+ * Synchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function accessSync(path: PathLike, mode?: number): void;
+
+ /**
+ * Returns a new `ReadStream` object.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function createReadStream(path: PathLike, options?: string | {
+ flags?: string;
+ encoding?: string;
+ fd?: number;
+ mode?: number;
+ autoClose?: boolean;
+ start?: number;
+ end?: number;
+ highWaterMark?: number;
+ }): ReadStream;
+
+ /**
+ * Returns a new `WriteStream` object.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function createWriteStream(path: PathLike, options?: string | {
+ flags?: string;
+ encoding?: string;
+ fd?: number;
+ mode?: number;
+ autoClose?: boolean;
+ start?: number;
+ highWaterMark?: number;
+ }): WriteStream;
+
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace fdatasync {
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function fdatasyncSync(fd: number): void;
+
+ /**
+ * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * No arguments other than a possible exception are given to the callback function.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ */
+ function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
+ /**
+ * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * No arguments other than a possible exception are given to the callback function.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
+ */
+ function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace copyFile {
+ /**
+ * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * No arguments other than a possible exception are given to the callback function.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An optional integer that specifies the behavior of the copy operation.
+ * The only supported flag is fs.constants.COPYFILE_EXCL,
+ * which causes the copy operation to fail if dest already exists.
+ */
+ function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise<void>;
+ }
+
+ /**
+ * Synchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An optional integer that specifies the behavior of the copy operation.
+ * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
+ */
+ function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void;
+
+ namespace promises {
+ interface FileHandle {
+ /**
+ * Gets the file descriptor for this file handle.
+ */
+ readonly fd: number;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for appending.
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ appendFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
+
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ */
+ chown(uid: number, gid: number): Promise<void>;
+
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ chmod(mode: string | number): Promise<void>;
+
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ */
+ datasync(): Promise<void>;
+
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ */
+ sync(): Promise<void>;
+
+ /**
+ * Asynchronously reads data from the file.
+ * The `FileHandle` must have been opened for reading.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ read<TBuffer extends Buffer | Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(options?: { encoding?: null, flag?: string | number } | null): Promise<Buffer>;
+
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise<string>;
+
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(options?: { encoding?: string | null, flag?: string | number } | string | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ */
+ stat(): Promise<Stats>;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param len If not specified, defaults to `0`.
+ */
+ truncate(len?: number): Promise<void>;
+
+ /**
+ * Asynchronously change file timestamps of the file.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+
+ /**
+ * Asynchronously writes `buffer` to the file.
+ * The `FileHandle` must have been opened for writing.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ write<TBuffer extends Buffer | Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `string` to the file.
+ * The `FileHandle` must have been opened for writing.
+ * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise`
+ * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
+ * @param string A string to write. If something other than a string is supplied it will be coerced to a string.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ write(data: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for writing.
+ * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ writeFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
+
+ /**
+ * Asynchronous close(2) - close a `FileHandle`.
+ */
+ close(): Promise<void>;
+ }
+
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function access(path: PathLike, mode?: number): Promise<void>;
+
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An optional integer that specifies the behavior of the copy operation. The only
+ * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if
+ * `dest` already exists.
+ */
+ function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>;
+
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
+ * supplied, defaults to `0o666`.
+ */
+ function open(path: PathLike, flags: string | number, mode?: string | number): Promise<FileHandle>;
+
+ /**
+ * Asynchronously reads data from the file referenced by the supplied `FileHandle`.
+ * @param handle A `FileHandle`.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If
+ * `null`, data will be read from the current position.
+ */
+ function read<TBuffer extends Buffer | Uint8Array>(
+ handle: FileHandle,
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null,
+ position?: number | null,
+ ): Promise<{ bytesRead: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`.
+ * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
+ * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
+ * @param handle A `FileHandle`.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function write<TBuffer extends Buffer | Uint8Array>(
+ handle: FileHandle,
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`.
+ * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
+ * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
+ * @param handle A `FileHandle`.
+ * @param string A string to write. If something other than a string is supplied it will be coerced to a string.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function write(handle: FileHandle, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>;
+
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
+
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function truncate(path: PathLike, len?: number): Promise<void>;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param handle A `FileHandle`.
+ * @param len If not specified, defaults to `0`.
+ */
+ function ftruncate(handle: FileHandle, len?: number): Promise<void>;
+
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function rmdir(path: PathLike): Promise<void>;
+
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param handle A `FileHandle`.
+ */
+ function fdatasync(handle: FileHandle): Promise<void>;
+
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param handle A `FileHandle`.
+ */
+ function fsync(handle: FileHandle): Promise<void>;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise<void>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise<Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise<string[] | Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise<Dirent[]>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param handle A `FileHandle`.
+ */
+ function fstat(handle: FileHandle): Promise<Stats>;
+
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lstat(path: PathLike): Promise<Stats>;
+
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function stat(path: PathLike): Promise<Stats>;
+
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
+
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function unlink(path: PathLike): Promise<void>;
+
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param handle A `FileHandle`.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function fchmod(handle: FileHandle, mode: string | number): Promise<void>;
+
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function chmod(path: PathLike, mode: string | number): Promise<void>;
+
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function lchmod(path: PathLike, mode: string | number): Promise<void>;
+
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
+
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param handle A `FileHandle`.
+ */
+ function fchown(handle: FileHandle, uid: number, gid: number): Promise<void>;
+
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function chown(path: PathLike, uid: number, gid: number): Promise<void>;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`.
+ * @param handle A `FileHandle`.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function writeFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function appendFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: string | number } | null): Promise<Buffer>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise<string>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | FileHandle, options?: { encoding?: string | null, flag?: string | number } | string | null): Promise<string | Buffer>;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/globals.d.ts b/node_modules/electron/node_modules/@types/node/globals.d.ts
new file mode 100644
index 0000000..dedd06c
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/globals.d.ts
@@ -0,0 +1,1025 @@
+// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
+interface Console {
+ Console: NodeJS.ConsoleConstructor;
+ /**
+ * A simple assertion test that verifies whether `value` is truthy.
+ * If it is not, an `AssertionError` is thrown.
+ * If provided, the error `message` is formatted using `util.format()` and used as the error message.
+ */
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ /**
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY.
+ * When `stdout` is not a TTY, this method does nothing.
+ */
+ clear(): void;
+ /**
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`.
+ */
+ count(label?: string): void;
+ /**
+ * Resets the internal counter specific to `label`.
+ */
+ countReset(label?: string): void;
+ /**
+ * The `console.debug()` function is an alias for {@link console.log()}.
+ */
+ debug(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
+ * This function bypasses any custom `inspect()` function defined on `obj`.
+ */
+ dir(obj: any, options?: NodeJS.InspectOptions): void;
+ /**
+ * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * Prints to `stderr` with newline.
+ */
+ error(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Increases indentation of subsequent lines by two spaces.
+ * If one or more `label`s are provided, those are printed first without the additional indentation.
+ */
+ group(...label: any[]): void;
+ /**
+ * The `console.groupCollapsed()` function is an alias for {@link console.group()}.
+ */
+ groupCollapsed(): void;
+ /**
+ * Decreases indentation of subsequent lines by two spaces.
+ */
+ groupEnd(): void;
+ /**
+ * The {@link console.info()} function is an alias for {@link console.log()}.
+ */
+ info(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Prints to `stdout` with newline.
+ */
+ log(message?: any, ...optionalParams: any[]): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Prints to `stdout` the array `array` formatted as a table.
+ */
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
+ /**
+ * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
+ */
+ time(label?: string): void;
+ /**
+ * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
+ */
+ timeEnd(label?: string): void;
+ /**
+ * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ /**
+ * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
+ */
+ trace(message?: any, ...optionalParams: any[]): void;
+ /**
+ * The {@link console.warn()} function is an alias for {@link console.error()}.
+ */
+ warn(message?: any, ...optionalParams: any[]): void;
+
+ // --- Inspector mode only ---
+ /**
+ * This method does not display anything unless used in the inspector.
+ * The console.markTimeline() method is the deprecated form of console.timeStamp().
+ *
+ * @deprecated Use console.timeStamp() instead.
+ */
+ markTimeline(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Starts a JavaScript CPU profile with an optional label.
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Adds an event with the label `label` to the Timeline panel of the inspector.
+ */
+ timeStamp(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * The console.timeline() method is the deprecated form of console.time().
+ *
+ * @deprecated Use console.time() instead.
+ */
+ timeline(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * The console.timelineEnd() method is the deprecated form of console.timeEnd().
+ *
+ * @deprecated Use console.timeEnd() instead.
+ */
+ timelineEnd(label?: string): void;
+}
+
+interface Error {
+ stack?: string;
+}
+
+// Declare "static" methods in Error
+interface ErrorConstructor {
+ /** Create .stack property on a target object */
+ captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
+
+ /**
+ * Optional override for formatting stack traces
+ *
+ * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces
+ */
+ prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
+
+ stackTraceLimit: number;
+}
+
+interface SymbolConstructor {
+ readonly observable: symbol;
+}
+
+// Node.js ESNEXT support
+interface String {
+ /** Removes whitespace from the left end of a string. */
+ trimLeft(): string;
+ /** Removes whitespace from the right end of a string. */
+ trimRight(): string;
+
+ /** Returns a copy with leading whitespace removed. */
+ trimStart(): string;
+ /** Returns a copy with trailing whitespace removed. */
+ trimEnd(): string;
+}
+
+/*-----------------------------------------------*
+ * *
+ * GLOBAL *
+ * *
+ ------------------------------------------------*/
+declare var process: NodeJS.Process;
+declare var global: NodeJS.Global;
+declare var console: Console;
+
+declare var __filename: string;
+declare var __dirname: string;
+
+declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
+declare namespace setTimeout {
+ function __promisify__(ms: number): Promise<void>;
+ function __promisify__<T>(ms: number, value: T): Promise<T>;
+}
+declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
+declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
+declare function clearInterval(intervalId: NodeJS.Timeout): void;
+declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
+declare namespace setImmediate {
+ function __promisify__(): Promise<void>;
+ function __promisify__<T>(value: T): Promise<T>;
+}
+declare function clearImmediate(immediateId: NodeJS.Immediate): void;
+
+// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
+interface NodeRequireFunction {
+ (id: string): any;
+}
+
+interface NodeRequire extends NodeRequireFunction {
+ resolve: RequireResolve;
+ cache: any;
+ extensions: NodeExtensions;
+ main: NodeModule | undefined;
+}
+
+interface RequireResolve {
+ (id: string, options?: { paths?: string[]; }): string;
+ paths(request: string): string[] | null;
+}
+
+interface NodeExtensions {
+ '.js': (m: NodeModule, filename: string) => any;
+ '.json': (m: NodeModule, filename: string) => any;
+ '.node': (m: NodeModule, filename: string) => any;
+ [ext: string]: (m: NodeModule, filename: string) => any;
+}
+
+declare var require: NodeRequire;
+
+interface NodeModule {
+ exports: any;
+ require: NodeRequireFunction;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ parent: NodeModule | null;
+ children: NodeModule[];
+ paths: string[];
+}
+
+declare var module: NodeModule;
+
+// Same as module.exports
+declare var exports: any;
+
+// Buffer class
+type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex";
+interface Buffer extends Uint8Array {
+ constructor: typeof Buffer;
+ 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: Uint8Array): boolean;
+ compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+ copy(targetBuffer: Uint8Array, 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;
+ 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 | Uint8Array, byteOffset?: number, encoding?: string): number;
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: string): number;
+ entries(): IterableIterator<[number, number]>;
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
+ keys(): IterableIterator<number>;
+ values(): IterableIterator<number>;
+}
+
+/**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ */
+declare const Buffer: {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new(str: string, encoding?: string): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new(size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new(array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new(array: ReadonlyArray<any>): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new(buffer: Buffer): Buffer;
+ prototype: 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 any TypedArray or a new ArrayBuffer()
+ */
+ from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: ReadonlyArray<any>): Buffer;
+ from(data: Uint8Array): Buffer;
+ /**
+ * Creates a new buffer containing the coerced value of an object
+ * A `TypeError` will be thrown if {obj} has not mentioned methods or is not of other type appropriate for `Buffer.from()` variants.
+ * @param obj An object supporting `Symbol.toPrimitive` or `valueOf()`.
+ */
+ from(obj: { valueOf(): string | object } | { [Symbol.toPrimitive](hint: 'string'): string }, byteOffset?: number, length?: number): 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'.
+ */
+ from(str: string, encoding?: string): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ 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.
+ */
+ isEncoding(encoding: string): boolean | undefined;
+ /**
+ * 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')
+ */
+ byteLength(string: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer, 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.
+ */
+ concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): 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 initalizing
+ */
+ 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
+ */
+ 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
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
+ */
+ poolSize: number;
+};
+
+/*----------------------------------------------*
+* *
+* GLOBAL INTERFACES *
+* *
+*-----------------------------------------------*/
+declare namespace NodeJS {
+ interface InspectOptions {
+ showHidden?: boolean;
+ depth?: number | null;
+ colors?: boolean;
+ customInspect?: boolean;
+ showProxy?: boolean;
+ maxArrayLength?: number | null;
+ breakLength?: number;
+ compact?: boolean;
+ sorted?: boolean | ((a: string, b: string) => number);
+ }
+
+ interface ConsoleConstructorOptions {
+ stdout: WritableStream;
+ stderr?: WritableStream;
+ ignoreErrors?: boolean;
+ colorMode?: boolean | 'auto';
+ }
+
+ interface ConsoleConstructor {
+ prototype: Console;
+ new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console;
+ new(options: ConsoleConstructorOptions): Console;
+ }
+
+ interface CallSite {
+ /**
+ * Value of "this"
+ */
+ getThis(): any;
+
+ /**
+ * Type of "this" as a string.
+ * This is the name of the function stored in the constructor field of
+ * "this", if available. Otherwise the object's [[Class]] internal
+ * property.
+ */
+ getTypeName(): string | null;
+
+ /**
+ * Current function
+ */
+ getFunction(): Function | undefined;
+
+ /**
+ * Name of the current function, typically its name property.
+ * If a name property is not available an attempt will be made to try
+ * to infer a name from the function's context.
+ */
+ getFunctionName(): string | null;
+
+ /**
+ * Name of the property [of "this" or one of its prototypes] that holds
+ * the current function
+ */
+ getMethodName(): string | null;
+
+ /**
+ * Name of the script [if this function was defined in a script]
+ */
+ getFileName(): string | null;
+
+ /**
+ * Current line number [if this function was defined in a script]
+ */
+ getLineNumber(): number | null;
+
+ /**
+ * Current column number [if this function was defined in a script]
+ */
+ getColumnNumber(): number | null;
+
+ /**
+ * A call site object representing the location where eval was called
+ * [if this function was created using a call to eval]
+ */
+ getEvalOrigin(): string | undefined;
+
+ /**
+ * Is this a toplevel invocation, that is, is "this" the global object?
+ */
+ isToplevel(): boolean;
+
+ /**
+ * Does this call take place in code defined by a call to eval?
+ */
+ isEval(): boolean;
+
+ /**
+ * Is this call in native V8 code?
+ */
+ isNative(): boolean;
+
+ /**
+ * Is this a constructor call?
+ */
+ isConstructor(): boolean;
+ }
+
+ interface ErrnoException extends Error {
+ errno?: number;
+ code?: string;
+ path?: string;
+ syscall?: string;
+ stack?: string;
+ }
+
+ class EventEmitter {
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeAllListeners(event?: string | symbol): this;
+ setMaxListeners(n: number): this;
+ getMaxListeners(): number;
+ listeners(event: string | symbol): Function[];
+ rawListeners(event: string | symbol): Function[];
+ emit(event: string | symbol, ...args: any[]): boolean;
+ listenerCount(type: string | symbol): number;
+ // Added in Node 6...
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ eventNames(): Array<string | symbol>;
+ }
+
+ interface ReadableStream extends EventEmitter {
+ readable: boolean;
+ read(size?: number): string | Buffer;
+ setEncoding(encoding: string): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
+ unpipe(destination?: WritableStream): this;
+ unshift(chunk: string): void;
+ unshift(chunk: Buffer): void;
+ wrap(oldStream: ReadableStream): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
+ }
+
+ interface WritableStream extends EventEmitter {
+ writable: boolean;
+ write(buffer: Buffer | string, cb?: Function): boolean;
+ write(str: string, encoding?: string, cb?: Function): boolean;
+ end(cb?: Function): void;
+ end(buffer: Buffer, cb?: Function): void;
+ end(str: string, cb?: Function): void;
+ end(str: string, encoding?: string, cb?: Function): void;
+ }
+
+ interface ReadWriteStream extends ReadableStream, WritableStream { }
+
+ interface Events extends EventEmitter { }
+
+ interface Domain extends Events {
+ run(fn: Function): void;
+ add(emitter: Events): void;
+ remove(emitter: Events): void;
+ bind(cb: (err: Error, data: any) => any): any;
+ intercept(cb: (data: any) => any): any;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ removeListener(event: string, listener: (...args: any[]) => void): this;
+ removeAllListeners(event?: string): this;
+ }
+
+ interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ external: number;
+ }
+
+ interface CpuUsage {
+ user: number;
+ system: number;
+ }
+
+ interface ProcessRelease {
+ name: string;
+ sourceUrl?: string;
+ headersUrl?: string;
+ libUrl?: string;
+ lts?: string;
+ }
+
+ interface ProcessVersions {
+ http_parser: string;
+ node: string;
+ v8: string;
+ ares: string;
+ uv: string;
+ zlib: string;
+ modules: string;
+ openssl: string;
+ }
+
+ type Platform = 'aix'
+ | 'android'
+ | 'darwin'
+ | 'freebsd'
+ | 'linux'
+ | 'openbsd'
+ | 'sunos'
+ | 'win32'
+ | 'cygwin';
+
+ type Signals =
+ "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
+ "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" |
+ "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
+ "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
+
+ type MultipleResolveType = 'resolve' | 'reject';
+
+ type BeforeExitListener = (code: number) => void;
+ type DisconnectListener = () => void;
+ type ExitListener = (code: number) => void;
+ type RejectionHandledListener = (promise: Promise<any>) => void;
+ type UncaughtExceptionListener = (error: Error) => void;
+ type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<any>) => void;
+ type WarningListener = (warning: Error) => void;
+ type MessageListener = (message: any, sendHandle: any) => void;
+ type SignalsListener = (signal: Signals) => void;
+ type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
+ type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
+
+ interface Socket extends ReadWriteStream {
+ isTTY?: true;
+ }
+
+ interface ProcessEnv {
+ [key: string]: string | undefined;
+ }
+
+ interface WriteStream extends Socket {
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ columns?: number;
+ rows?: number;
+ _write(chunk: any, encoding: string, callback: Function): void;
+ _destroy(err: Error | null, callback: Function): void;
+ _final(callback: Function): void;
+ setDefaultEncoding(encoding: string): this;
+ cork(): void;
+ uncork(): void;
+ destroy(error?: Error): void;
+ }
+ interface ReadStream extends Socket {
+ readonly readableFlowing: boolean | null;
+ readonly readableHighWaterMark: number;
+ readonly readableLength: number;
+ isRaw?: boolean;
+ setRawMode?(mode: boolean): void;
+ _read(size: number): void;
+ _destroy(err: Error | null, callback: Function): void;
+ push(chunk: any, encoding?: string): boolean;
+ destroy(error?: Error): void;
+ }
+
+ interface HRTime {
+ (time?: [number, number]): [number, number];
+ bigint(): bigint;
+ }
+
+ interface Process extends EventEmitter {
+ stdout: WriteStream;
+ stderr: WriteStream;
+ stdin: ReadStream;
+ openStdin(): Socket;
+ argv: string[];
+ argv0: string;
+ execArgv: string[];
+ execPath: string;
+ abort(): never;
+ chdir(directory: string): void;
+ cwd(): string;
+ debugPort: number;
+ emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
+ env: ProcessEnv;
+ exit(code?: number): never;
+ exitCode?: number;
+ getgid(): number;
+ setgid(id: number | string): void;
+ getuid(): number;
+ setuid(id: number | string): void;
+ geteuid(): number;
+ seteuid(id: number | string): void;
+ getegid(): number;
+ setegid(id: number | string): void;
+ getgroups(): number[];
+ setgroups(groups: ReadonlyArray<string | number>): void;
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
+ hasUncaughtExceptionCaptureCallback(): boolean;
+ version: string;
+ versions: ProcessVersions;
+ config: {
+ target_defaults: {
+ cflags: any[];
+ default_configuration: string;
+ defines: string[];
+ include_dirs: string[];
+ libraries: string[];
+ };
+ variables: {
+ clang: number;
+ host_arch: string;
+ node_install_npm: boolean;
+ node_install_waf: boolean;
+ node_prefix: string;
+ node_shared_openssl: boolean;
+ node_shared_v8: boolean;
+ node_shared_zlib: boolean;
+ node_use_dtrace: boolean;
+ node_use_etw: boolean;
+ node_use_openssl: boolean;
+ target_arch: string;
+ v8_no_strict_aliasing: number;
+ v8_use_snapshot: boolean;
+ visibility: string;
+ };
+ };
+ kill(pid: number, signal?: string | number): void;
+ pid: number;
+ ppid: number;
+ title: string;
+ arch: string;
+ platform: Platform;
+ mainModule?: NodeModule;
+ memoryUsage(): MemoryUsage;
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
+ nextTick(callback: Function, ...args: any[]): void;
+ release: ProcessRelease;
+ umask(mask?: number): number;
+ uptime(): number;
+ hrtime: HRTime;
+ domain: Domain;
+
+ // Worker
+ send?(message: any, sendHandle?: any): void;
+ disconnect(): void;
+ connected: boolean;
+
+ /**
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
+ * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][]
+ * environment variable.
+ */
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
+
+ /**
+ * EventEmitter
+ * 1. beforeExit
+ * 2. disconnect
+ * 3. exit
+ * 4. message
+ * 5. rejectionHandled
+ * 6. uncaughtException
+ * 7. unhandledRejection
+ * 8. warning
+ * 9. message
+ * 10. <All OS Signals>
+ * 11. newListener/removeListener inherited from EventEmitter
+ */
+ addListener(event: "beforeExit", listener: BeforeExitListener): this;
+ addListener(event: "disconnect", listener: DisconnectListener): this;
+ addListener(event: "exit", listener: ExitListener): this;
+ addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ addListener(event: "warning", listener: WarningListener): this;
+ addListener(event: "message", listener: MessageListener): this;
+ addListener(event: Signals, listener: SignalsListener): this;
+ addListener(event: "newListener", listener: NewListenerListener): this;
+ addListener(event: "removeListener", listener: RemoveListenerListener): this;
+ addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ emit(event: "beforeExit", code: number): boolean;
+ emit(event: "disconnect"): boolean;
+ emit(event: "exit", code: number): boolean;
+ emit(event: "rejectionHandled", promise: Promise<any>): boolean;
+ emit(event: "uncaughtException", error: Error): boolean;
+ emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean;
+ emit(event: "warning", warning: Error): boolean;
+ emit(event: "message", message: any, sendHandle: any): this;
+ emit(event: Signals, signal: Signals): boolean;
+ emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this;
+ emit(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ on(event: "beforeExit", listener: BeforeExitListener): this;
+ on(event: "disconnect", listener: DisconnectListener): this;
+ on(event: "exit", listener: ExitListener): this;
+ on(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ on(event: "warning", listener: WarningListener): this;
+ on(event: "message", listener: MessageListener): this;
+ on(event: Signals, listener: SignalsListener): this;
+ on(event: "newListener", listener: NewListenerListener): this;
+ on(event: "removeListener", listener: RemoveListenerListener): this;
+ on(event: "multipleResolves", listener: MultipleResolveListener): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "beforeExit", listener: BeforeExitListener): this;
+ once(event: "disconnect", listener: DisconnectListener): this;
+ once(event: "exit", listener: ExitListener): this;
+ once(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ once(event: "warning", listener: WarningListener): this;
+ once(event: "message", listener: MessageListener): this;
+ once(event: Signals, listener: SignalsListener): this;
+ once(event: "newListener", listener: NewListenerListener): this;
+ once(event: "removeListener", listener: RemoveListenerListener): this;
+ once(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ prependListener(event: "beforeExit", listener: BeforeExitListener): this;
+ prependListener(event: "disconnect", listener: DisconnectListener): this;
+ prependListener(event: "exit", listener: ExitListener): this;
+ prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ prependListener(event: "warning", listener: WarningListener): this;
+ prependListener(event: "message", listener: MessageListener): this;
+ prependListener(event: Signals, listener: SignalsListener): this;
+ prependListener(event: "newListener", listener: NewListenerListener): this;
+ prependListener(event: "removeListener", listener: RemoveListenerListener): this;
+ prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
+ prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
+ prependOnceListener(event: "exit", listener: ExitListener): this;
+ prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ prependOnceListener(event: "warning", listener: WarningListener): this;
+ prependOnceListener(event: "message", listener: MessageListener): this;
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
+ prependOnceListener(event: "newListener", listener: NewListenerListener): this;
+ prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this;
+ prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ listeners(event: "beforeExit"): BeforeExitListener[];
+ listeners(event: "disconnect"): DisconnectListener[];
+ listeners(event: "exit"): ExitListener[];
+ listeners(event: "rejectionHandled"): RejectionHandledListener[];
+ listeners(event: "uncaughtException"): UncaughtExceptionListener[];
+ listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
+ listeners(event: "warning"): WarningListener[];
+ listeners(event: "message"): MessageListener[];
+ listeners(event: Signals): SignalsListener[];
+ listeners(event: "newListener"): NewListenerListener[];
+ listeners(event: "removeListener"): RemoveListenerListener[];
+ listeners(event: "multipleResolves"): MultipleResolveListener[];
+ }
+
+ interface Global {
+ Array: typeof Array;
+ ArrayBuffer: typeof ArrayBuffer;
+ Boolean: typeof Boolean;
+ Buffer: typeof Buffer;
+ DataView: typeof DataView;
+ Date: typeof Date;
+ Error: typeof Error;
+ EvalError: typeof EvalError;
+ Float32Array: typeof Float32Array;
+ Float64Array: typeof Float64Array;
+ Function: typeof Function;
+ GLOBAL: Global;
+ Infinity: typeof Infinity;
+ Int16Array: typeof Int16Array;
+ Int32Array: typeof Int32Array;
+ Int8Array: typeof Int8Array;
+ Intl: typeof Intl;
+ JSON: typeof JSON;
+ Map: MapConstructor;
+ Math: typeof Math;
+ NaN: typeof NaN;
+ Number: typeof Number;
+ Object: typeof Object;
+ Promise: Function;
+ RangeError: typeof RangeError;
+ ReferenceError: typeof ReferenceError;
+ RegExp: typeof RegExp;
+ Set: SetConstructor;
+ String: typeof String;
+ Symbol: Function;
+ SyntaxError: typeof SyntaxError;
+ TypeError: typeof TypeError;
+ URIError: typeof URIError;
+ Uint16Array: typeof Uint16Array;
+ Uint32Array: typeof Uint32Array;
+ Uint8Array: typeof Uint8Array;
+ Uint8ClampedArray: Function;
+ WeakMap: WeakMapConstructor;
+ WeakSet: WeakSetConstructor;
+ clearImmediate: (immediateId: Immediate) => void;
+ clearInterval: (intervalId: Timeout) => void;
+ clearTimeout: (timeoutId: Timeout) => void;
+ console: typeof console;
+ decodeURI: typeof decodeURI;
+ decodeURIComponent: typeof decodeURIComponent;
+ encodeURI: typeof encodeURI;
+ encodeURIComponent: typeof encodeURIComponent;
+ escape: (str: string) => string;
+ eval: typeof eval;
+ global: Global;
+ isFinite: typeof isFinite;
+ isNaN: typeof isNaN;
+ parseFloat: typeof parseFloat;
+ parseInt: typeof parseInt;
+ process: Process;
+ root: Global;
+ setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
+ setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
+ setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
+ undefined: typeof undefined;
+ unescape: (str: string) => string;
+ gc: () => void;
+ v8debug?: any;
+ }
+
+ interface Timer {
+ ref(): this;
+ refresh(): this;
+ unref(): this;
+ }
+
+ class Immediate {
+ ref(): this;
+ refresh(): this;
+ unref(): this;
+ _onImmediate: Function; // to distinguish it from the Timeout class
+ }
+
+ class Timeout implements Timer {
+ ref(): this;
+ refresh(): this;
+ unref(): this;
+ }
+
+ class Module {
+ static runMain(): void;
+ static wrap(code: string): string;
+ static createRequireFromPath(path: string): (path: string) => any;
+ static builtinModules: string[];
+
+ static Module: typeof Module;
+
+ exports: any;
+ require: NodeRequireFunction;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ parent: Module | null;
+ children: Module[];
+ paths: string[];
+
+ constructor(id: string, parent?: Module);
+ }
+
+ type TypedArray =
+ | Uint8Array
+ | Uint8ClampedArray
+ | Uint16Array
+ | Uint32Array
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | BigUint64Array
+ | BigInt64Array
+ | Float32Array
+ | Float64Array;
+ type ArrayBufferView = TypedArray | DataView;
+}
diff --git a/node_modules/electron/node_modules/@types/node/http.d.ts b/node_modules/electron/node_modules/@types/node/http.d.ts
new file mode 100644
index 0000000..8611916
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/http.d.ts
@@ -0,0 +1,273 @@
+declare module "http" {
+ import * as events from "events";
+ import * as net from "net";
+ import * as stream from "stream";
+ import { URL } from "url";
+
+ // incoming headers will never contain number
+ interface IncomingHttpHeaders {
+ 'accept-patch'?: string;
+ 'accept-ranges'?: string;
+ 'accept'?: string;
+ 'access-control-allow-credentials'?: string;
+ 'access-control-allow-headers'?: string;
+ 'access-control-allow-methods'?: string;
+ 'access-control-allow-origin'?: string;
+ 'access-control-expose-headers'?: string;
+ 'access-control-max-age'?: string;
+ 'access-control-request-headers'?: string;
+ 'access-control-request-method'?: string;
+ 'age'?: string;
+ 'allow'?: string;
+ 'alt-svc'?: string;
+ 'authorization'?: string;
+ 'cache-control'?: string;
+ 'connection'?: string;
+ 'content-disposition'?: string;
+ 'content-encoding'?: string;
+ 'content-language'?: string;
+ 'content-length'?: string;
+ 'content-location'?: string;
+ 'content-range'?: string;
+ 'content-type'?: string;
+ 'cookie'?: string;
+ 'date'?: string;
+ 'expect'?: string;
+ 'expires'?: string;
+ 'forwarded'?: string;
+ 'from'?: string;
+ 'host'?: string;
+ 'if-match'?: string;
+ 'if-modified-since'?: string;
+ 'if-none-match'?: string;
+ 'if-unmodified-since'?: string;
+ 'last-modified'?: string;
+ 'location'?: string;
+ 'origin'?: string;
+ 'pragma'?: string;
+ 'proxy-authenticate'?: string;
+ 'proxy-authorization'?: string;
+ 'public-key-pins'?: string;
+ 'range'?: string;
+ 'referer'?: string;
+ 'retry-after'?: string;
+ 'set-cookie'?: string[];
+ 'strict-transport-security'?: string;
+ 'tk'?: string;
+ 'trailer'?: string;
+ 'transfer-encoding'?: string;
+ 'upgrade'?: string;
+ 'user-agent'?: string;
+ 'vary'?: string;
+ 'via'?: string;
+ 'warning'?: string;
+ 'www-authenticate'?: string;
+ [header: string]: string | string[] | undefined;
+ }
+
+ // outgoing headers allows numbers (as they are converted internally to strings)
+ interface OutgoingHttpHeaders {
+ [header: string]: number | string | string[] | undefined;
+ }
+
+ interface ClientRequestArgs {
+ protocol?: string;
+ host?: string;
+ hostname?: string;
+ family?: number;
+ port?: number | string;
+ defaultPort?: number | string;
+ localAddress?: string;
+ socketPath?: string;
+ method?: string;
+ path?: string;
+ headers?: OutgoingHttpHeaders;
+ auth?: string;
+ agent?: Agent | boolean;
+ _defaultAgent?: Agent;
+ timeout?: number;
+ setHost?: boolean;
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
+ createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: net.Socket) => void) => net.Socket;
+ }
+
+ interface ServerOptions {
+ IncomingMessage?: typeof IncomingMessage;
+ ServerResponse?: typeof ServerResponse;
+ }
+
+ type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
+
+ class Server extends net.Server {
+ constructor(requestListener?: RequestListener);
+ constructor(options: ServerOptions, requestListener?: RequestListener);
+
+ setTimeout(msecs?: number, callback?: () => void): this;
+ setTimeout(callback: () => void): this;
+ /**
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+ * @default 2000
+ * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount}
+ */
+ maxHeadersCount: number | null;
+ timeout: number;
+ /**
+ * Limit the amount of time the parser will wait to receive the complete HTTP headers.
+ * @default 40000
+ * {@link https://nodejs.org/api/http.html#http_server_headerstimeout}
+ */
+ headersTimeout: number;
+ keepAliveTimeout: number;
+ }
+
+ // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js
+ class OutgoingMessage extends stream.Writable {
+ upgrading: boolean;
+ chunkedEncoding: boolean;
+ shouldKeepAlive: boolean;
+ useChunkedEncodingByDefault: boolean;
+ sendDate: boolean;
+ finished: boolean;
+ headersSent: boolean;
+ connection: net.Socket;
+
+ constructor();
+
+ setTimeout(msecs: number, callback?: () => void): this;
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ getHeader(name: string): number | string | string[] | undefined;
+ getHeaders(): OutgoingHttpHeaders;
+ getHeaderNames(): string[];
+ hasHeader(name: string): boolean;
+ removeHeader(name: string): void;
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
+ flushHeaders(): void;
+ }
+
+ // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256
+ class ServerResponse extends OutgoingMessage {
+ statusCode: number;
+ statusMessage: string;
+
+ constructor(req: IncomingMessage);
+
+ assignSocket(socket: net.Socket): void;
+ detachSocket(socket: net.Socket): void;
+ // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53
+ // no args in writeContinue callback
+ writeContinue(callback?: () => void): void;
+ writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): void;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void;
+ }
+
+ // https://github.com/nodejs/node/blob/v10.23.0/lib/_http_client.js#L65
+ class ClientRequest extends OutgoingMessage {
+ connection: net.Socket;
+ socket: net.Socket;
+ aborted: number;
+
+ constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
+
+ method: string;
+ path: string;
+ abort(): void;
+ onSocket(socket: net.Socket): void;
+ setTimeout(timeout: number, callback?: () => void): this;
+ setNoDelay(noDelay?: boolean): void;
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+ }
+
+ class IncomingMessage extends stream.Readable {
+ constructor(socket: net.Socket);
+
+ aborted: boolean;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ connection: net.Socket;
+ headers: IncomingHttpHeaders;
+ rawHeaders: string[];
+ trailers: { [key: string]: string | undefined };
+ rawTrailers: string[];
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * Only valid for request obtained from http.Server.
+ */
+ method?: string;
+ /**
+ * Only valid for request obtained from http.Server.
+ */
+ url?: string;
+ /**
+ * Only valid for response obtained from http.ClientRequest.
+ */
+ statusCode?: number;
+ /**
+ * Only valid for response obtained from http.ClientRequest.
+ */
+ statusMessage?: string;
+ socket: net.Socket;
+ destroy(error?: Error): void;
+ }
+
+ interface AgentOptions {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number;
+ /**
+ * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
+ */
+ timeout?: number;
+ }
+
+ class Agent {
+ maxFreeSockets: number;
+ maxSockets: number;
+ sockets: any;
+ requests: any;
+
+ constructor(opts?: AgentOptions);
+
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
+ * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
+ * sockets may hang open for quite a long time before the server terminates them.
+ */
+ destroy(): void;
+ }
+
+ const METHODS: string[];
+
+ const STATUS_CODES: {
+ [errorCode: number]: string | undefined;
+ [errorCode: string]: string | undefined;
+ };
+
+ function createServer(requestListener?: RequestListener): Server;
+ function createServer(options: ServerOptions, requestListener?: RequestListener): Server;
+ function createClient(port?: number, host?: string): any;
+
+ // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
+ // create interface RequestOptions would make the naming more clear to developers
+ interface RequestOptions extends ClientRequestArgs { }
+ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ let globalAgent: Agent;
+}
diff --git a/node_modules/electron/node_modules/@types/node/http2.d.ts b/node_modules/electron/node_modules/@types/node/http2.d.ts
new file mode 100644
index 0000000..2142c88
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/http2.d.ts
@@ -0,0 +1,859 @@
+declare module "http2" {
+ import * as events from "events";
+ import * as fs from "fs";
+ import * as net from "net";
+ import * as stream from "stream";
+ import * as tls from "tls";
+ import * as url from "url";
+
+ import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders } from "http";
+ export { OutgoingHttpHeaders } from "http";
+
+ export interface IncomingHttpStatusHeader {
+ ":status"?: number;
+ }
+
+ export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
+ ":path"?: string;
+ ":method"?: string;
+ ":authority"?: string;
+ ":scheme"?: string;
+ }
+
+ // Http2Stream
+
+ export interface StreamPriorityOptions {
+ exclusive?: boolean;
+ parent?: number;
+ weight?: number;
+ silent?: boolean;
+ }
+
+ export interface StreamState {
+ localWindowSize?: number;
+ state?: number;
+ streamLocalClose?: number;
+ streamRemoteClose?: number;
+ sumDependencyWeight?: number;
+ weight?: number;
+ }
+
+ export interface ServerStreamResponseOptions {
+ endStream?: boolean;
+ waitForTrailers?: boolean;
+ }
+
+ export interface StatOptions {
+ offset: number;
+ length: number;
+ }
+
+ export interface ServerStreamFileResponseOptions {
+ statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean;
+ getTrailers?: (trailers: OutgoingHttpHeaders) => void;
+ offset?: number;
+ length?: number;
+ }
+
+ export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
+ onError?: (err: NodeJS.ErrnoException) => void;
+ }
+
+ export interface Http2Stream extends stream.Duplex {
+ readonly aborted: boolean;
+ readonly closed: boolean;
+ readonly destroyed: boolean;
+ readonly pending: boolean;
+ readonly rstCode: number;
+ readonly sentHeaders: OutgoingHttpHeaders;
+ readonly sentInfoHeaders?: OutgoingHttpHeaders[];
+ readonly sentTrailers?: OutgoingHttpHeaders;
+ readonly session: Http2Session;
+ readonly state: StreamState;
+ /**
+ * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received,
+ * indicating that no additional data should be received and the readable side of the Http2Stream will be closed.
+ */
+ readonly endAfterHeaders: boolean;
+ close(code?: number, callback?: () => void): void;
+ priority(options: StreamPriorityOptions): void;
+ setTimeout(msecs: number, callback?: () => void): void;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "aborted", listener: () => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "finish", listener: () => void): this;
+ addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: "streamClosed", listener: (code: number) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+ addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "wantTrailers", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "aborted"): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "data", chunk: Buffer | string): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "end"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "finish"): boolean;
+ emit(event: "frameError", frameType: number, errorCode: number): boolean;
+ emit(event: "pipe", src: stream.Readable): boolean;
+ emit(event: "unpipe", src: stream.Readable): boolean;
+ emit(event: "streamClosed", code: number): boolean;
+ emit(event: "timeout"): boolean;
+ emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "wantTrailers"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "aborted", listener: () => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "data", listener: (chunk: Buffer | string) => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "finish", listener: () => void): this;
+ on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ on(event: "pipe", listener: (src: stream.Readable) => void): this;
+ on(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ on(event: "streamClosed", listener: (code: number) => void): this;
+ on(event: "timeout", listener: () => void): this;
+ on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "wantTrailers", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "aborted", listener: () => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "data", listener: (chunk: Buffer | string) => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "finish", listener: () => void): this;
+ once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ once(event: "pipe", listener: (src: stream.Readable) => void): this;
+ once(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ once(event: "streamClosed", listener: (code: number) => void): this;
+ once(event: "timeout", listener: () => void): this;
+ once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "wantTrailers", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "aborted", listener: () => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "finish", listener: () => void): this;
+ prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: "streamClosed", listener: (code: number) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+ prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "wantTrailers", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "aborted", listener: () => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "finish", listener: () => void): this;
+ prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: "streamClosed", listener: (code: number) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "wantTrailers", listener: () => void): this;
+
+ sendTrailers(headers: OutgoingHttpHeaders): this;
+ }
+
+ export interface ClientHttp2Stream extends Http2Stream {
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ }
+
+ export interface ServerHttp2Stream extends Http2Stream {
+ additionalHeaders(headers: OutgoingHttpHeaders): void;
+ readonly headersSent: boolean;
+ readonly pushAllowed: boolean;
+ pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
+ respondWithFD(fd: number, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
+ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
+ }
+
+ // Http2Session
+
+ export interface Settings {
+ headerTableSize?: number;
+ enablePush?: boolean;
+ initialWindowSize?: number;
+ maxFrameSize?: number;
+ maxConcurrentStreams?: number;
+ maxHeaderListSize?: number;
+ }
+
+ export interface ClientSessionRequestOptions {
+ endStream?: boolean;
+ exclusive?: boolean;
+ parent?: number;
+ weight?: number;
+ getTrailers?: (trailers: OutgoingHttpHeaders, flags: number) => void;
+ }
+
+ export interface SessionState {
+ effectiveLocalWindowSize?: number;
+ effectiveRecvDataLength?: number;
+ nextStreamID?: number;
+ localWindowSize?: number;
+ lastProcStreamID?: number;
+ remoteWindowSize?: number;
+ outboundQueueSize?: number;
+ deflateDynamicTableSize?: number;
+ inflateDynamicTableSize?: number;
+ }
+
+ export interface Http2Session extends events.EventEmitter {
+ readonly alpnProtocol?: string;
+ close(callback?: () => void): void;
+ readonly closed: boolean;
+ readonly connecting: boolean;
+ destroy(error?: Error, code?: number): void;
+ readonly destroyed: boolean;
+ readonly encrypted?: boolean;
+ goaway(code?: number, lastStreamID?: number, opaqueData?: Buffer | DataView | NodeJS.TypedArray): void;
+ readonly localSettings: Settings;
+ readonly originSet?: string[];
+ readonly pendingSettingsAck: boolean;
+ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ping(payload: Buffer | DataView | NodeJS.TypedArray , callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ref(): void;
+ readonly remoteSettings: Settings;
+ rstStream(stream: Http2Stream, code?: number): void;
+ setTimeout(msecs: number, callback?: () => void): void;
+ readonly socket: net.Socket | tls.TLSSocket;
+ readonly state: SessionState;
+ priority(stream: Http2Stream, options: StreamPriorityOptions): void;
+ settings(settings: Settings): void;
+ readonly type: number;
+ unref(): void;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ addListener(event: "localSettings", listener: (settings: Settings) => void): this;
+ addListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+ addListener(event: "ping", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean;
+ emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
+ emit(event: "localSettings", settings: Settings): boolean;
+ emit(event: "remoteSettings", settings: Settings): boolean;
+ emit(event: "timeout"): boolean;
+ emit(event: "ping"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ on(event: "localSettings", listener: (settings: Settings) => void): this;
+ on(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ on(event: "timeout", listener: () => void): this;
+ on(event: "ping", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ once(event: "localSettings", listener: (settings: Settings) => void): this;
+ once(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ once(event: "timeout", listener: () => void): this;
+ once(event: "ping", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependListener(event: "localSettings", listener: (settings: Settings) => void): this;
+ prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+ prependListener(event: "ping", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;
+ prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ prependOnceListener(event: "ping", listener: () => void): this;
+ }
+
+ export interface ClientHttp2Session extends Http2Session {
+ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
+ emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ }
+
+ export interface AlternativeServiceOptions {
+ origin: number | string | url.URL;
+ }
+
+ export interface ServerHttp2Session extends Http2Session {
+ altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
+ readonly server: Http2Server | Http2SecureServer;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ }
+
+ // Http2Server
+
+ export interface SessionOptions {
+ maxDeflateDynamicTableSize?: number;
+ maxReservedRemoteStreams?: number;
+ maxSendHeaderBlockLength?: number;
+ paddingStrategy?: number;
+ peerMaxConcurrentStreams?: number;
+ selectPadding?: (frameLen: number, maxFrameLen: number) => number;
+ settings?: Settings;
+ createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
+ }
+
+ export type ClientSessionOptions = SessionOptions;
+ export type ServerSessionOptions = SessionOptions;
+
+ export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
+ export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
+
+ export interface ServerOptions extends ServerSessionOptions { }
+
+ export interface SecureServerOptions extends SecureServerSessionOptions {
+ allowHTTP1?: boolean;
+ }
+
+ export interface Http2Server extends net.Server {
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "sessionError", listener: (err: Error) => void): this;
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "sessionError", err: Error): boolean;
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "timeout"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "sessionError", listener: (err: Error) => void): this;
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "timeout", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "sessionError", listener: (err: Error) => void): this;
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "timeout", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ }
+
+ export interface Http2SecureServer extends tls.Server {
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "sessionError", listener: (err: Error) => void): this;
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+ addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "sessionError", err: Error): boolean;
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "timeout"): boolean;
+ emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "sessionError", listener: (err: Error) => void): this;
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "timeout", listener: () => void): this;
+ on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "sessionError", listener: (err: Error) => void): this;
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "timeout", listener: () => void): this;
+ once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+ prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+ }
+
+ export class Http2ServerRequest extends stream.Readable {
+ private constructor();
+ headers: IncomingHttpHeaders;
+ httpVersion: string;
+ method: string;
+ rawHeaders: string[];
+ rawTrailers: string[];
+ setTimeout(msecs: number, callback?: () => void): void;
+ socket: net.Socket | tls.TLSSocket;
+ stream: ServerHttp2Stream;
+ trailers: IncomingHttpHeaders;
+ url: string;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "aborted", hadError: boolean, code: number): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ }
+
+ export class Http2ServerResponse extends stream.Stream {
+ private constructor();
+ addTrailers(trailers: OutgoingHttpHeaders): void;
+ connection: net.Socket | tls.TLSSocket;
+ end(callback?: () => void): void;
+ end(data?: string | Buffer, callback?: () => void): void;
+ end(data?: string | Buffer, encoding?: string, callback?: () => void): void;
+ readonly finished: boolean;
+ getHeader(name: string): string;
+ getHeaderNames(): string[];
+ getHeaders(): OutgoingHttpHeaders;
+ hasHeader(name: string): boolean;
+ readonly headersSent: boolean;
+ removeHeader(name: string): void;
+ sendDate: boolean;
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ setTimeout(msecs: number, callback?: () => void): void;
+ socket: net.Socket | tls.TLSSocket;
+ statusCode: number;
+ statusMessage: '';
+ stream: ServerHttp2Stream;
+ write(chunk: string | Buffer, callback?: (err: Error) => void): boolean;
+ write(chunk: string | Buffer, encoding?: string, callback?: (err: Error) => void): boolean;
+ writeContinue(): void;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void;
+ writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders): void;
+ createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "finish", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "aborted", hadError: boolean, code: number): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "error", error: Error): boolean;
+ emit(event: "finish"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "error", listener: (error: Error) => void): this;
+ on(event: "finish", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "error", listener: (error: Error) => void): this;
+ once(event: "finish", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "error", listener: (error: Error) => void): this;
+ prependListener(event: "finish", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
+ prependOnceListener(event: "finish", listener: () => void): this;
+ }
+
+ // Public API
+
+ export namespace constants {
+ const NGHTTP2_SESSION_SERVER: number;
+ const NGHTTP2_SESSION_CLIENT: number;
+ const NGHTTP2_STREAM_STATE_IDLE: number;
+ const NGHTTP2_STREAM_STATE_OPEN: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_CLOSED: number;
+ const NGHTTP2_NO_ERROR: number;
+ const NGHTTP2_PROTOCOL_ERROR: number;
+ const NGHTTP2_INTERNAL_ERROR: number;
+ const NGHTTP2_FLOW_CONTROL_ERROR: number;
+ const NGHTTP2_SETTINGS_TIMEOUT: number;
+ const NGHTTP2_STREAM_CLOSED: number;
+ const NGHTTP2_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_REFUSED_STREAM: number;
+ const NGHTTP2_CANCEL: number;
+ const NGHTTP2_COMPRESSION_ERROR: number;
+ const NGHTTP2_CONNECT_ERROR: number;
+ const NGHTTP2_ENHANCE_YOUR_CALM: number;
+ const NGHTTP2_INADEQUATE_SECURITY: number;
+ const NGHTTP2_HTTP_1_1_REQUIRED: number;
+ const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_FLAG_NONE: number;
+ const NGHTTP2_FLAG_END_STREAM: number;
+ const NGHTTP2_FLAG_END_HEADERS: number;
+ const NGHTTP2_FLAG_ACK: number;
+ const NGHTTP2_FLAG_PADDED: number;
+ const NGHTTP2_FLAG_PRIORITY: number;
+ const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
+ const DEFAULT_SETTINGS_ENABLE_PUSH: number;
+ const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
+ const MAX_MAX_FRAME_SIZE: number;
+ const MIN_MAX_FRAME_SIZE: number;
+ const MAX_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_DEFAULT_WEIGHT: number;
+ const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
+ const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
+ const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
+ const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
+ const PADDING_STRATEGY_NONE: number;
+ const PADDING_STRATEGY_MAX: number;
+ const PADDING_STRATEGY_CALLBACK: number;
+ const HTTP2_HEADER_STATUS: string;
+ const HTTP2_HEADER_METHOD: string;
+ const HTTP2_HEADER_AUTHORITY: string;
+ const HTTP2_HEADER_SCHEME: string;
+ const HTTP2_HEADER_PATH: string;
+ const HTTP2_HEADER_ACCEPT_CHARSET: string;
+ const HTTP2_HEADER_ACCEPT_ENCODING: string;
+ const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
+ const HTTP2_HEADER_ACCEPT_RANGES: string;
+ const HTTP2_HEADER_ACCEPT: string;
+ const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
+ const HTTP2_HEADER_AGE: string;
+ const HTTP2_HEADER_ALLOW: string;
+ const HTTP2_HEADER_AUTHORIZATION: string;
+ const HTTP2_HEADER_CACHE_CONTROL: string;
+ const HTTP2_HEADER_CONNECTION: string;
+ const HTTP2_HEADER_CONTENT_DISPOSITION: string;
+ const HTTP2_HEADER_CONTENT_ENCODING: string;
+ const HTTP2_HEADER_CONTENT_LANGUAGE: string;
+ const HTTP2_HEADER_CONTENT_LENGTH: string;
+ const HTTP2_HEADER_CONTENT_LOCATION: string;
+ const HTTP2_HEADER_CONTENT_MD5: string;
+ const HTTP2_HEADER_CONTENT_RANGE: string;
+ const HTTP2_HEADER_CONTENT_TYPE: string;
+ const HTTP2_HEADER_COOKIE: string;
+ const HTTP2_HEADER_DATE: string;
+ const HTTP2_HEADER_ETAG: string;
+ const HTTP2_HEADER_EXPECT: string;
+ const HTTP2_HEADER_EXPIRES: string;
+ const HTTP2_HEADER_FROM: string;
+ const HTTP2_HEADER_HOST: string;
+ const HTTP2_HEADER_IF_MATCH: string;
+ const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
+ const HTTP2_HEADER_IF_NONE_MATCH: string;
+ const HTTP2_HEADER_IF_RANGE: string;
+ const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
+ const HTTP2_HEADER_LAST_MODIFIED: string;
+ const HTTP2_HEADER_LINK: string;
+ const HTTP2_HEADER_LOCATION: string;
+ const HTTP2_HEADER_MAX_FORWARDS: string;
+ const HTTP2_HEADER_PREFER: string;
+ const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
+ const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
+ const HTTP2_HEADER_RANGE: string;
+ const HTTP2_HEADER_REFERER: string;
+ const HTTP2_HEADER_REFRESH: string;
+ const HTTP2_HEADER_RETRY_AFTER: string;
+ const HTTP2_HEADER_SERVER: string;
+ const HTTP2_HEADER_SET_COOKIE: string;
+ const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
+ const HTTP2_HEADER_TRANSFER_ENCODING: string;
+ const HTTP2_HEADER_TE: string;
+ const HTTP2_HEADER_UPGRADE: string;
+ const HTTP2_HEADER_USER_AGENT: string;
+ const HTTP2_HEADER_VARY: string;
+ const HTTP2_HEADER_VIA: string;
+ const HTTP2_HEADER_WWW_AUTHENTICATE: string;
+ const HTTP2_HEADER_HTTP2_SETTINGS: string;
+ const HTTP2_HEADER_KEEP_ALIVE: string;
+ const HTTP2_HEADER_PROXY_CONNECTION: string;
+ const HTTP2_METHOD_ACL: string;
+ const HTTP2_METHOD_BASELINE_CONTROL: string;
+ const HTTP2_METHOD_BIND: string;
+ const HTTP2_METHOD_CHECKIN: string;
+ const HTTP2_METHOD_CHECKOUT: string;
+ const HTTP2_METHOD_CONNECT: string;
+ const HTTP2_METHOD_COPY: string;
+ const HTTP2_METHOD_DELETE: string;
+ const HTTP2_METHOD_GET: string;
+ const HTTP2_METHOD_HEAD: string;
+ const HTTP2_METHOD_LABEL: string;
+ const HTTP2_METHOD_LINK: string;
+ const HTTP2_METHOD_LOCK: string;
+ const HTTP2_METHOD_MERGE: string;
+ const HTTP2_METHOD_MKACTIVITY: string;
+ const HTTP2_METHOD_MKCALENDAR: string;
+ const HTTP2_METHOD_MKCOL: string;
+ const HTTP2_METHOD_MKREDIRECTREF: string;
+ const HTTP2_METHOD_MKWORKSPACE: string;
+ const HTTP2_METHOD_MOVE: string;
+ const HTTP2_METHOD_OPTIONS: string;
+ const HTTP2_METHOD_ORDERPATCH: string;
+ const HTTP2_METHOD_PATCH: string;
+ const HTTP2_METHOD_POST: string;
+ const HTTP2_METHOD_PRI: string;
+ const HTTP2_METHOD_PROPFIND: string;
+ const HTTP2_METHOD_PROPPATCH: string;
+ const HTTP2_METHOD_PUT: string;
+ const HTTP2_METHOD_REBIND: string;
+ const HTTP2_METHOD_REPORT: string;
+ const HTTP2_METHOD_SEARCH: string;
+ const HTTP2_METHOD_TRACE: string;
+ const HTTP2_METHOD_UNBIND: string;
+ const HTTP2_METHOD_UNCHECKOUT: string;
+ const HTTP2_METHOD_UNLINK: string;
+ const HTTP2_METHOD_UNLOCK: string;
+ const HTTP2_METHOD_UPDATE: string;
+ const HTTP2_METHOD_UPDATEREDIRECTREF: string;
+ const HTTP2_METHOD_VERSION_CONTROL: string;
+ const HTTP_STATUS_CONTINUE: number;
+ const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
+ const HTTP_STATUS_PROCESSING: number;
+ const HTTP_STATUS_OK: number;
+ const HTTP_STATUS_CREATED: number;
+ const HTTP_STATUS_ACCEPTED: number;
+ const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
+ const HTTP_STATUS_NO_CONTENT: number;
+ const HTTP_STATUS_RESET_CONTENT: number;
+ const HTTP_STATUS_PARTIAL_CONTENT: number;
+ const HTTP_STATUS_MULTI_STATUS: number;
+ const HTTP_STATUS_ALREADY_REPORTED: number;
+ const HTTP_STATUS_IM_USED: number;
+ const HTTP_STATUS_MULTIPLE_CHOICES: number;
+ const HTTP_STATUS_MOVED_PERMANENTLY: number;
+ const HTTP_STATUS_FOUND: number;
+ const HTTP_STATUS_SEE_OTHER: number;
+ const HTTP_STATUS_NOT_MODIFIED: number;
+ const HTTP_STATUS_USE_PROXY: number;
+ const HTTP_STATUS_TEMPORARY_REDIRECT: number;
+ const HTTP_STATUS_PERMANENT_REDIRECT: number;
+ const HTTP_STATUS_BAD_REQUEST: number;
+ const HTTP_STATUS_UNAUTHORIZED: number;
+ const HTTP_STATUS_PAYMENT_REQUIRED: number;
+ const HTTP_STATUS_FORBIDDEN: number;
+ const HTTP_STATUS_NOT_FOUND: number;
+ const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
+ const HTTP_STATUS_NOT_ACCEPTABLE: number;
+ const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
+ const HTTP_STATUS_REQUEST_TIMEOUT: number;
+ const HTTP_STATUS_CONFLICT: number;
+ const HTTP_STATUS_GONE: number;
+ const HTTP_STATUS_LENGTH_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_FAILED: number;
+ const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
+ const HTTP_STATUS_URI_TOO_LONG: number;
+ const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
+ const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
+ const HTTP_STATUS_EXPECTATION_FAILED: number;
+ const HTTP_STATUS_TEAPOT: number;
+ const HTTP_STATUS_MISDIRECTED_REQUEST: number;
+ const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
+ const HTTP_STATUS_LOCKED: number;
+ const HTTP_STATUS_FAILED_DEPENDENCY: number;
+ const HTTP_STATUS_UNORDERED_COLLECTION: number;
+ const HTTP_STATUS_UPGRADE_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_REQUIRED: number;
+ const HTTP_STATUS_TOO_MANY_REQUESTS: number;
+ const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
+ const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
+ const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
+ const HTTP_STATUS_NOT_IMPLEMENTED: number;
+ const HTTP_STATUS_BAD_GATEWAY: number;
+ const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
+ const HTTP_STATUS_GATEWAY_TIMEOUT: number;
+ const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
+ const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
+ const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
+ const HTTP_STATUS_LOOP_DETECTED: number;
+ const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
+ const HTTP_STATUS_NOT_EXTENDED: number;
+ const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
+ }
+
+ export function getDefaultSettings(): Settings;
+ export function getPackedSettings(settings: Settings): Settings;
+ export function getUnpackedSettings(buf: Buffer | Uint8Array): Settings;
+
+ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+
+ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+
+ export function connect(authority: string | url.URL, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
+ export function connect(
+ authority: string | url.URL,
+ options?: ClientSessionOptions | SecureClientSessionOptions,
+ listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
+ ): ClientHttp2Session;
+}
diff --git a/node_modules/electron/node_modules/@types/node/https.d.ts b/node_modules/electron/node_modules/@types/node/https.d.ts
new file mode 100644
index 0000000..dea042e
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/https.d.ts
@@ -0,0 +1,51 @@
+declare module "https" {
+ import * as tls from "tls";
+ import * as events from "events";
+ import * as http from "http";
+ import { URL } from "url";
+
+ type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
+
+ type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
+ rejectUnauthorized?: boolean; // Defaults to true
+ servername?: string; // SNI TLS Extension
+ };
+
+ interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
+ rejectUnauthorized?: boolean;
+ maxCachedSessions?: number;
+ }
+
+ class Agent extends http.Agent {
+ constructor(options?: AgentOptions);
+ options: AgentOptions;
+ }
+
+ class Server extends tls.Server {
+ constructor(options: ServerOptions, requestListener?: http.RequestListener);
+
+ setTimeout(callback: () => void): this;
+ setTimeout(msecs?: number, callback?: () => void): this;
+ /**
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+ * @default 2000
+ * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount}
+ */
+ maxHeadersCount: number | null;
+ timeout: number;
+ /**
+ * Limit the amount of time the parser will wait to receive the complete HTTP headers.
+ * @default 40000
+ * {@link https://nodejs.org/api/http.html#http_server_headerstimeout}
+ */
+ headersTimeout: number;
+ keepAliveTimeout: number;
+ }
+
+ function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
+ function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ let globalAgent: Agent;
+}
diff --git a/node_modules/electron/node_modules/@types/node/index.d.ts b/node_modules/electron/node_modules/@types/node/index.d.ts
new file mode 100644
index 0000000..0d075c0
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/index.d.ts
@@ -0,0 +1,45 @@
+// Type definitions for Node.js 10.17
+// Project: http://nodejs.org/
+// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
+// DefinitelyTyped <https://github.com/DefinitelyTyped>
+// Alberto Schiabel <https://github.com/jkomyno>
+// Alexander T. <https://github.com/a-tarasyuk>
+// Alvis HT Tang <https://github.com/alvis>
+// Andrew Makarov <https://github.com/r3nya>
+// Bruno Scheufler <https://github.com/brunoscheufler>
+// Chigozirim C. <https://github.com/smac89>
+// Deividas Bakanas <https://github.com/DeividasBakanas>
+// Eugene Y. Q. Shen <https://github.com/eyqs>
+// Flarna <https://github.com/Flarna>
+// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
+// Hoàng Văn Khải <https://github.com/KSXGitHub>
+// Huw <https://github.com/hoo29>
+// Kelvin Jin <https://github.com/kjin>
+// Klaus Meinhardt <https://github.com/ajafff>
+// Lishude <https://github.com/islishude>
+// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
+// Mohsen Azimi <https://github.com/mohsen1>
+// Nicolas Even <https://github.com/n-e>
+// Nikita Galkin <https://github.com/galkin>
+// Parambir Singh <https://github.com/parambirs>
+// Sebastian Silbermann <https://github.com/eps1lon>
+// Simon Schick <https://github.com/SimonSchick>
+// Thomas den Hollander <https://github.com/ThomasdenH>
+// Wilco Bakker <https://github.com/WilcoBakker>
+// wwwy3y3 <https://github.com/wwwy3y3>
+// Zane Hannan AU <https://github.com/ZaneHannanAU>
+// Jeremie Rodriguez <https://github.com/jeremiergz>
+// Samuel Ainsworth <https://github.com/samuela>
+// Kyle Uehlein <https://github.com/kuehlein>
+// Jordi Oliveras Rovira <https://github.com/j-oliveras>
+// Thanik Bhongbhibhat <https://github.com/bhongy>
+// Minh Son Nguyen <https://github.com/nguymin4>
+// ExE Boss <https://github.com/ExE-Boss>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+// NOTE: These definitions support NodeJS and TypeScript 3.7.
+// This isn't strictly needed since 3.7 has the assert module, but this way we're consistent.
+// Typically type modificatons should be made in base.d.ts instead of here
+
+/// <reference path="base.d.ts" />
+/// <reference path="ts3.6/base.d.ts" />
diff --git a/node_modules/electron/node_modules/@types/node/inspector.d.ts b/node_modules/electron/node_modules/@types/node/inspector.d.ts
new file mode 100644
index 0000000..9e1eea4
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/inspector.d.ts
@@ -0,0 +1,3162 @@
+// tslint:disable-next-line:dt-header
+// Type definitions for inspector
+
+// These definitions are auto-generated.
+// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
+// for more information.
+
+/**
+ * The inspector module provides an API for interacting with the V8 inspector.
+ */
+declare module "inspector" {
+ import { EventEmitter } from 'events';
+
+ interface InspectorNotification<T> {
+ method: string;
+ params: T;
+ }
+
+ namespace Console {
+ /**
+ * Console message.
+ */
+ interface ConsoleMessage {
+ /**
+ * Message source.
+ */
+ source: string;
+ /**
+ * Message severity.
+ */
+ level: string;
+ /**
+ * Message text.
+ */
+ text: string;
+ /**
+ * URL of the message origin.
+ */
+ url?: string;
+ /**
+ * Line number in the resource that generated this message (1-based).
+ */
+ line?: number;
+ /**
+ * Column number in the resource that generated this message (1-based).
+ */
+ column?: number;
+ }
+
+ interface MessageAddedEventDataType {
+ /**
+ * Console message that has been added.
+ */
+ message: ConsoleMessage;
+ }
+ }
+
+ namespace Debugger {
+ /**
+ * Breakpoint identifier.
+ */
+ type BreakpointId = string;
+
+ /**
+ * Call frame identifier.
+ */
+ type CallFrameId = string;
+
+ /**
+ * Location in the source code.
+ */
+ interface Location {
+ /**
+ * Script identifier as reported in the `Debugger.scriptParsed`.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number;
+ }
+
+ /**
+ * Location in the source code.
+ * @experimental
+ */
+ interface ScriptPosition {
+ lineNumber: number;
+ columnNumber: number;
+ }
+
+ /**
+ * JavaScript call frame. Array of call frames form the call stack.
+ */
+ interface CallFrame {
+ /**
+ * Call frame identifier. This identifier is only valid while the virtual machine is paused.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Name of the JavaScript function called on this call frame.
+ */
+ functionName: string;
+ /**
+ * Location in the source code.
+ */
+ functionLocation?: Location;
+ /**
+ * Location in the source code.
+ */
+ location: Location;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Scope chain for this call frame.
+ */
+ scopeChain: Scope[];
+ /**
+ * `this` object for this call frame.
+ */
+ this: Runtime.RemoteObject;
+ /**
+ * The value being returned, if the function is at return point.
+ */
+ returnValue?: Runtime.RemoteObject;
+ }
+
+ /**
+ * Scope description.
+ */
+ interface Scope {
+ /**
+ * Scope type.
+ */
+ type: string;
+ /**
+ * Object representing the scope. For `global` and `with` scopes it represents the actual
+ * object; for the rest of the scopes, it is artificial transient object enumerating scope
+ * variables as its properties.
+ */
+ object: Runtime.RemoteObject;
+ name?: string;
+ /**
+ * Location in the source code where scope starts
+ */
+ startLocation?: Location;
+ /**
+ * Location in the source code where scope ends
+ */
+ endLocation?: Location;
+ }
+
+ /**
+ * Search match for resource.
+ */
+ interface SearchMatch {
+ /**
+ * Line number in resource content.
+ */
+ lineNumber: number;
+ /**
+ * Line with match content.
+ */
+ lineContent: string;
+ }
+
+ interface BreakLocation {
+ /**
+ * Script identifier as reported in the `Debugger.scriptParsed`.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number;
+ type?: string;
+ }
+
+ interface ContinueToLocationParameterType {
+ /**
+ * Location to continue to.
+ */
+ location: Location;
+ targetCallFrames?: string;
+ }
+
+ interface EvaluateOnCallFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * String object group name to put result into (allows rapid releasing resulting object handles
+ * using `releaseObjectGroup`).
+ */
+ objectGroup?: string;
+ /**
+ * Specifies whether command line API should be available to the evaluated expression, defaults
+ * to false.
+ */
+ includeCommandLineAPI?: boolean;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause
+ * execution. Overrides `setPauseOnException` state.
+ */
+ silent?: boolean;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ */
+ throwOnSideEffect?: boolean;
+ /**
+ * Terminate execution after timing out (number of milliseconds).
+ * @experimental
+ */
+ timeout?: Runtime.TimeDelta;
+ }
+
+ interface GetPossibleBreakpointsParameterType {
+ /**
+ * Start of range to search possible breakpoint locations in.
+ */
+ start: Location;
+ /**
+ * End of range to search possible breakpoint locations in (excluding). When not specified, end
+ * of scripts is used as end of range.
+ */
+ end?: Location;
+ /**
+ * Only consider locations which are in the same (non-nested) function as start.
+ */
+ restrictToFunction?: boolean;
+ }
+
+ interface GetScriptSourceParameterType {
+ /**
+ * Id of the script to get source for.
+ */
+ scriptId: Runtime.ScriptId;
+ }
+
+ interface GetStackTraceParameterType {
+ stackTraceId: Runtime.StackTraceId;
+ }
+
+ interface PauseOnAsyncCallParameterType {
+ /**
+ * Debugger will pause when async call with given stack trace is started.
+ */
+ parentStackTraceId: Runtime.StackTraceId;
+ }
+
+ interface RemoveBreakpointParameterType {
+ breakpointId: BreakpointId;
+ }
+
+ interface RestartFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ }
+
+ interface SearchInContentParameterType {
+ /**
+ * Id of the script to search in.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * String to search for.
+ */
+ query: string;
+ /**
+ * If true, search is case sensitive.
+ */
+ caseSensitive?: boolean;
+ /**
+ * If true, treats string parameter as regex.
+ */
+ isRegex?: boolean;
+ }
+
+ interface SetAsyncCallStackDepthParameterType {
+ /**
+ * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
+ * call stacks (default).
+ */
+ maxDepth: number;
+ }
+
+ interface SetBlackboxPatternsParameterType {
+ /**
+ * Array of regexps that will be used to check script url for blackbox state.
+ */
+ patterns: string[];
+ }
+
+ interface SetBlackboxedRangesParameterType {
+ /**
+ * Id of the script.
+ */
+ scriptId: Runtime.ScriptId;
+ positions: ScriptPosition[];
+ }
+
+ interface SetBreakpointParameterType {
+ /**
+ * Location to set breakpoint in.
+ */
+ location: Location;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
+ * breakpoint if this expression evaluates to true.
+ */
+ condition?: string;
+ }
+
+ interface SetBreakpointByUrlParameterType {
+ /**
+ * Line number to set breakpoint at.
+ */
+ lineNumber: number;
+ /**
+ * URL of the resources to set breakpoint on.
+ */
+ url?: string;
+ /**
+ * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
+ * `urlRegex` must be specified.
+ */
+ urlRegex?: string;
+ /**
+ * Script hash of the resources to set breakpoint on.
+ */
+ scriptHash?: string;
+ /**
+ * Offset in the line to set breakpoint at.
+ */
+ columnNumber?: number;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
+ * breakpoint if this expression evaluates to true.
+ */
+ condition?: string;
+ }
+
+ interface SetBreakpointOnFunctionCallParameterType {
+ /**
+ * Function object id.
+ */
+ objectId: Runtime.RemoteObjectId;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will
+ * stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string;
+ }
+
+ interface SetBreakpointsActiveParameterType {
+ /**
+ * New value for breakpoints active state.
+ */
+ active: boolean;
+ }
+
+ interface SetPauseOnExceptionsParameterType {
+ /**
+ * Pause on exceptions mode.
+ */
+ state: string;
+ }
+
+ interface SetReturnValueParameterType {
+ /**
+ * New return value.
+ */
+ newValue: Runtime.CallArgument;
+ }
+
+ interface SetScriptSourceParameterType {
+ /**
+ * Id of the script to edit.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * New content of the script.
+ */
+ scriptSource: string;
+ /**
+ * If true the change will not actually be applied. Dry run may be used to get result
+ * description without actually modifying the code.
+ */
+ dryRun?: boolean;
+ }
+
+ interface SetSkipAllPausesParameterType {
+ /**
+ * New value for skip pauses state.
+ */
+ skip: boolean;
+ }
+
+ interface SetVariableValueParameterType {
+ /**
+ * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
+ * scope types are allowed. Other scopes could be manipulated manually.
+ */
+ scopeNumber: number;
+ /**
+ * Variable name.
+ */
+ variableName: string;
+ /**
+ * New variable value.
+ */
+ newValue: Runtime.CallArgument;
+ /**
+ * Id of callframe that holds variable.
+ */
+ callFrameId: CallFrameId;
+ }
+
+ interface StepIntoParameterType {
+ /**
+ * Debugger will issue additional Debugger.paused notification if any async task is scheduled
+ * before next pause.
+ * @experimental
+ */
+ breakOnAsyncCall?: boolean;
+ }
+
+ interface EnableReturnType {
+ /**
+ * Unique identifier of the debugger.
+ * @experimental
+ */
+ debuggerId: Runtime.UniqueDebuggerId;
+ }
+
+ interface EvaluateOnCallFrameReturnType {
+ /**
+ * Object wrapper for the evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails;
+ }
+
+ interface GetPossibleBreakpointsReturnType {
+ /**
+ * List of the possible breakpoint locations.
+ */
+ locations: BreakLocation[];
+ }
+
+ interface GetScriptSourceReturnType {
+ /**
+ * Script source.
+ */
+ scriptSource: string;
+ }
+
+ interface GetStackTraceReturnType {
+ stackTrace: Runtime.StackTrace;
+ }
+
+ interface RestartFrameReturnType {
+ /**
+ * New stack trace.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId;
+ }
+
+ interface SearchInContentReturnType {
+ /**
+ * List of search matches.
+ */
+ result: SearchMatch[];
+ }
+
+ interface SetBreakpointReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Location this breakpoint resolved into.
+ */
+ actualLocation: Location;
+ }
+
+ interface SetBreakpointByUrlReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * List of the locations this breakpoint resolved into upon addition.
+ */
+ locations: Location[];
+ }
+
+ interface SetBreakpointOnFunctionCallReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ }
+
+ interface SetScriptSourceReturnType {
+ /**
+ * New stack trace in case editing has happened while VM was stopped.
+ */
+ callFrames?: CallFrame[];
+ /**
+ * Whether current call stack was modified after applying the changes.
+ */
+ stackChanged?: boolean;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId;
+ /**
+ * Exception details if any.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails;
+ }
+
+ interface BreakpointResolvedEventDataType {
+ /**
+ * Breakpoint unique identifier.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Actual breakpoint location.
+ */
+ location: Location;
+ }
+
+ interface PausedEventDataType {
+ /**
+ * Call stack the virtual machine stopped on.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Pause reason.
+ */
+ reason: string;
+ /**
+ * Object containing break-specific auxiliary properties.
+ */
+ data?: {};
+ /**
+ * Hit breakpoints IDs
+ */
+ hitBreakpoints?: string[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId;
+ /**
+ * Just scheduled async call will have this stack trace as parent stack during async execution.
+ * This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag.
+ * @experimental
+ */
+ asyncCallStackTraceId?: Runtime.StackTraceId;
+ }
+
+ interface ScriptFailedToParseEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {};
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean;
+ /**
+ * This script length.
+ */
+ length?: number;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace;
+ }
+
+ interface ScriptParsedEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {};
+ /**
+ * True, if this script is generated as a result of the live edit operation.
+ * @experimental
+ */
+ isLiveEdit?: boolean;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean;
+ /**
+ * This script length.
+ */
+ length?: number;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace;
+ }
+ }
+
+ namespace HeapProfiler {
+ /**
+ * Heap snapshot object id.
+ */
+ type HeapSnapshotObjectId = string;
+
+ /**
+ * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+ */
+ interface SamplingHeapProfileNode {
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Allocations size in bytes for the node excluding children.
+ */
+ selfSize: number;
+ /**
+ * Child nodes.
+ */
+ children: SamplingHeapProfileNode[];
+ }
+
+ /**
+ * Profile.
+ */
+ interface SamplingHeapProfile {
+ head: SamplingHeapProfileNode;
+ }
+
+ interface AddInspectedHeapObjectParameterType {
+ /**
+ * Heap snapshot object id to be accessible by means of $x command line API.
+ */
+ heapObjectId: HeapSnapshotObjectId;
+ }
+
+ interface GetHeapObjectIdParameterType {
+ /**
+ * Identifier of the object to get heap object id for.
+ */
+ objectId: Runtime.RemoteObjectId;
+ }
+
+ interface GetObjectByHeapObjectIdParameterType {
+ objectId: HeapSnapshotObjectId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string;
+ }
+
+ interface StartSamplingParameterType {
+ /**
+ * Average sample interval in bytes. Poisson distribution is used for the intervals. The
+ * default value is 32768 bytes.
+ */
+ samplingInterval?: number;
+ }
+
+ interface StartTrackingHeapObjectsParameterType {
+ trackAllocations?: boolean;
+ }
+
+ interface StopTrackingHeapObjectsParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
+ * when the tracking is stopped.
+ */
+ reportProgress?: boolean;
+ }
+
+ interface TakeHeapSnapshotParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+ */
+ reportProgress?: boolean;
+ }
+
+ interface GetHeapObjectIdReturnType {
+ /**
+ * Id of the heap snapshot object corresponding to the passed remote object id.
+ */
+ heapSnapshotObjectId: HeapSnapshotObjectId;
+ }
+
+ interface GetObjectByHeapObjectIdReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ }
+
+ interface GetSamplingProfileReturnType {
+ /**
+ * Return the sampling profile being collected.
+ */
+ profile: SamplingHeapProfile;
+ }
+
+ interface StopSamplingReturnType {
+ /**
+ * Recorded sampling heap profile.
+ */
+ profile: SamplingHeapProfile;
+ }
+
+ interface AddHeapSnapshotChunkEventDataType {
+ chunk: string;
+ }
+
+ interface HeapStatsUpdateEventDataType {
+ /**
+ * An array of triplets. Each triplet describes a fragment. The first integer is the fragment
+ * index, the second integer is a total count of objects for the fragment, the third integer is
+ * a total size of the objects for the fragment.
+ */
+ statsUpdate: number[];
+ }
+
+ interface LastSeenObjectIdEventDataType {
+ lastSeenObjectId: number;
+ timestamp: number;
+ }
+
+ interface ReportHeapSnapshotProgressEventDataType {
+ done: number;
+ total: number;
+ finished?: boolean;
+ }
+ }
+
+ namespace Profiler {
+ /**
+ * Profile node. Holds callsite information, execution statistics and child nodes.
+ */
+ interface ProfileNode {
+ /**
+ * Unique id of the node.
+ */
+ id: number;
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Number of samples where this node was on top of the call stack.
+ */
+ hitCount?: number;
+ /**
+ * Child node ids.
+ */
+ children?: number[];
+ /**
+ * The reason of being not optimized. The function may be deoptimized or marked as don't
+ * optimize.
+ */
+ deoptReason?: string;
+ /**
+ * An array of source position ticks.
+ */
+ positionTicks?: PositionTickInfo[];
+ }
+
+ /**
+ * Profile.
+ */
+ interface Profile {
+ /**
+ * The list of profile nodes. First item is the root node.
+ */
+ nodes: ProfileNode[];
+ /**
+ * Profiling start timestamp in microseconds.
+ */
+ startTime: number;
+ /**
+ * Profiling end timestamp in microseconds.
+ */
+ endTime: number;
+ /**
+ * Ids of samples top nodes.
+ */
+ samples?: number[];
+ /**
+ * Time intervals between adjacent samples in microseconds. The first delta is relative to the
+ * profile startTime.
+ */
+ timeDeltas?: number[];
+ }
+
+ /**
+ * Specifies a number of samples attributed to a certain source position.
+ */
+ interface PositionTickInfo {
+ /**
+ * Source line number (1-based).
+ */
+ line: number;
+ /**
+ * Number of samples attributed to the source line.
+ */
+ ticks: number;
+ }
+
+ /**
+ * Coverage data for a source range.
+ */
+ interface CoverageRange {
+ /**
+ * JavaScript script source offset for the range start.
+ */
+ startOffset: number;
+ /**
+ * JavaScript script source offset for the range end.
+ */
+ endOffset: number;
+ /**
+ * Collected execution count of the source range.
+ */
+ count: number;
+ }
+
+ /**
+ * Coverage data for a JavaScript function.
+ */
+ interface FunctionCoverage {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * Source ranges inside the function with coverage data.
+ */
+ ranges: CoverageRange[];
+ /**
+ * Whether coverage data for this function has block granularity.
+ */
+ isBlockCoverage: boolean;
+ }
+
+ /**
+ * Coverage data for a JavaScript script.
+ */
+ interface ScriptCoverage {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Functions contained in the script that has coverage data.
+ */
+ functions: FunctionCoverage[];
+ }
+
+ /**
+ * Describes a type collected during runtime.
+ * @experimental
+ */
+ interface TypeObject {
+ /**
+ * Name of a type collected with type profiling.
+ */
+ name: string;
+ }
+
+ /**
+ * Source offset and types for a parameter or return value.
+ * @experimental
+ */
+ interface TypeProfileEntry {
+ /**
+ * Source offset of the parameter or end of function for return values.
+ */
+ offset: number;
+ /**
+ * The types for this parameter or return value.
+ */
+ types: TypeObject[];
+ }
+
+ /**
+ * Type profile data collected during runtime for a JavaScript script.
+ * @experimental
+ */
+ interface ScriptTypeProfile {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Type profile entries for parameters and return values of the functions in the script.
+ */
+ entries: TypeProfileEntry[];
+ }
+
+ interface SetSamplingIntervalParameterType {
+ /**
+ * New sampling interval in microseconds.
+ */
+ interval: number;
+ }
+
+ interface StartPreciseCoverageParameterType {
+ /**
+ * Collect accurate call counts beyond simple 'covered' or 'not covered'.
+ */
+ callCount?: boolean;
+ /**
+ * Collect block-based coverage.
+ */
+ detailed?: boolean;
+ }
+
+ interface GetBestEffortCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+
+ interface StopReturnType {
+ /**
+ * Recorded profile.
+ */
+ profile: Profile;
+ }
+
+ interface TakePreciseCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+
+ interface TakeTypeProfileReturnType {
+ /**
+ * Type profile for all scripts since startTypeProfile() was turned on.
+ */
+ result: ScriptTypeProfile[];
+ }
+
+ interface ConsoleProfileFinishedEventDataType {
+ id: string;
+ /**
+ * Location of console.profileEnd().
+ */
+ location: Debugger.Location;
+ profile: Profile;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string;
+ }
+
+ interface ConsoleProfileStartedEventDataType {
+ id: string;
+ /**
+ * Location of console.profile().
+ */
+ location: Debugger.Location;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string;
+ }
+ }
+
+ namespace Runtime {
+ /**
+ * Unique script identifier.
+ */
+ type ScriptId = string;
+
+ /**
+ * Unique object identifier.
+ */
+ type RemoteObjectId = string;
+
+ /**
+ * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
+ * `-Infinity`, and bigint literals.
+ */
+ type UnserializableValue = string;
+
+ /**
+ * Mirror object referencing original JavaScript object.
+ */
+ interface RemoteObject {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for `object` type values only.
+ */
+ subtype?: string;
+ /**
+ * Object class (constructor) name. Specified for `object` type values only.
+ */
+ className?: string;
+ /**
+ * Remote object value in case of primitive values or JSON values (if it was requested).
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified does not have `value`, but gets this
+ * property.
+ */
+ unserializableValue?: UnserializableValue;
+ /**
+ * String representation of the object.
+ */
+ description?: string;
+ /**
+ * Unique object identifier (for non-primitive values).
+ */
+ objectId?: RemoteObjectId;
+ /**
+ * Preview containing abbreviated property values. Specified for `object` type values only.
+ * @experimental
+ */
+ preview?: ObjectPreview;
+ /**
+ * @experimental
+ */
+ customPreview?: CustomPreview;
+ }
+
+ /**
+ * @experimental
+ */
+ interface CustomPreview {
+ header: string;
+ hasBody: boolean;
+ formatterObjectId: RemoteObjectId;
+ bindRemoteObjectFunctionId: RemoteObjectId;
+ configObjectId?: RemoteObjectId;
+ }
+
+ /**
+ * Object containing abbreviated remote object value.
+ * @experimental
+ */
+ interface ObjectPreview {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for `object` type values only.
+ */
+ subtype?: string;
+ /**
+ * String representation of the object.
+ */
+ description?: string;
+ /**
+ * True iff some of the properties or entries of the original object did not fit.
+ */
+ overflow: boolean;
+ /**
+ * List of the properties.
+ */
+ properties: PropertyPreview[];
+ /**
+ * List of the entries. Specified for `map` and `set` subtype values only.
+ */
+ entries?: EntryPreview[];
+ }
+
+ /**
+ * @experimental
+ */
+ interface PropertyPreview {
+ /**
+ * Property name.
+ */
+ name: string;
+ /**
+ * Object type. Accessor means that the property itself is an accessor property.
+ */
+ type: string;
+ /**
+ * User-friendly property value string.
+ */
+ value?: string;
+ /**
+ * Nested value preview.
+ */
+ valuePreview?: ObjectPreview;
+ /**
+ * Object subtype hint. Specified for `object` type values only.
+ */
+ subtype?: string;
+ }
+
+ /**
+ * @experimental
+ */
+ interface EntryPreview {
+ /**
+ * Preview of the key. Specified for map-like collection entries.
+ */
+ key?: ObjectPreview;
+ /**
+ * Preview of the value.
+ */
+ value: ObjectPreview;
+ }
+
+ /**
+ * Object property descriptor.
+ */
+ interface PropertyDescriptor {
+ /**
+ * Property name or symbol description.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject;
+ /**
+ * True if the value associated with the property may be changed (data descriptors only).
+ */
+ writable?: boolean;
+ /**
+ * A function which serves as a getter for the property, or `undefined` if there is no getter
+ * (accessor descriptors only).
+ */
+ get?: RemoteObject;
+ /**
+ * A function which serves as a setter for the property, or `undefined` if there is no setter
+ * (accessor descriptors only).
+ */
+ set?: RemoteObject;
+ /**
+ * True if the type of this property descriptor may be changed and if the property may be
+ * deleted from the corresponding object.
+ */
+ configurable: boolean;
+ /**
+ * True if this property shows up during enumeration of the properties on the corresponding
+ * object.
+ */
+ enumerable: boolean;
+ /**
+ * True if the result was thrown during the evaluation.
+ */
+ wasThrown?: boolean;
+ /**
+ * True if the property is owned for the object.
+ */
+ isOwn?: boolean;
+ /**
+ * Property symbol object, if the property is of the `symbol` type.
+ */
+ symbol?: RemoteObject;
+ }
+
+ /**
+ * Object internal property descriptor. This property isn't normally visible in JavaScript code.
+ */
+ interface InternalPropertyDescriptor {
+ /**
+ * Conventional property name.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject;
+ }
+
+ /**
+ * Represents function call argument. Either remote object id `objectId`, primitive `value`,
+ * unserializable primitive value or neither of (for undefined) them should be specified.
+ */
+ interface CallArgument {
+ /**
+ * Primitive value or serializable javascript object.
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified.
+ */
+ unserializableValue?: UnserializableValue;
+ /**
+ * Remote object handle.
+ */
+ objectId?: RemoteObjectId;
+ }
+
+ /**
+ * Id of an execution context.
+ */
+ type ExecutionContextId = number;
+
+ /**
+ * Description of an isolated world.
+ */
+ interface ExecutionContextDescription {
+ /**
+ * Unique id of the execution context. It can be used to specify in which execution context
+ * script evaluation should be performed.
+ */
+ id: ExecutionContextId;
+ /**
+ * Execution context origin.
+ */
+ origin: string;
+ /**
+ * Human readable name describing given context.
+ */
+ name: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ auxData?: {};
+ }
+
+ /**
+ * Detailed information about exception (or error) that was thrown during script compilation or
+ * execution.
+ */
+ interface ExceptionDetails {
+ /**
+ * Exception id.
+ */
+ exceptionId: number;
+ /**
+ * Exception text, which should be used together with exception object when available.
+ */
+ text: string;
+ /**
+ * Line number of the exception location (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number of the exception location (0-based).
+ */
+ columnNumber: number;
+ /**
+ * Script ID of the exception location.
+ */
+ scriptId?: ScriptId;
+ /**
+ * URL of the exception location, to be used when the script was not reported.
+ */
+ url?: string;
+ /**
+ * JavaScript stack trace if available.
+ */
+ stackTrace?: StackTrace;
+ /**
+ * Exception object if available.
+ */
+ exception?: RemoteObject;
+ /**
+ * Identifier of the context where exception happened.
+ */
+ executionContextId?: ExecutionContextId;
+ }
+
+ /**
+ * Number of milliseconds since epoch.
+ */
+ type Timestamp = number;
+
+ /**
+ * Number of milliseconds.
+ */
+ type TimeDelta = number;
+
+ /**
+ * Stack entry for runtime errors and assertions.
+ */
+ interface CallFrame {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * JavaScript script id.
+ */
+ scriptId: ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * JavaScript script line number (0-based).
+ */
+ lineNumber: number;
+ /**
+ * JavaScript script column number (0-based).
+ */
+ columnNumber: number;
+ }
+
+ /**
+ * Call frames for assertions or error messages.
+ */
+ interface StackTrace {
+ /**
+ * String label of this stack trace. For async traces this may be a name of the function that
+ * initiated the async call.
+ */
+ description?: string;
+ /**
+ * JavaScript function name.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ */
+ parent?: StackTrace;
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ * @experimental
+ */
+ parentId?: StackTraceId;
+ }
+
+ /**
+ * Unique identifier of current debugger.
+ * @experimental
+ */
+ type UniqueDebuggerId = string;
+
+ /**
+ * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
+ * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
+ * @experimental
+ */
+ interface StackTraceId {
+ id: string;
+ debuggerId?: UniqueDebuggerId;
+ }
+
+ interface AwaitPromiseParameterType {
+ /**
+ * Identifier of the promise.
+ */
+ promiseObjectId: RemoteObjectId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean;
+ }
+
+ interface CallFunctionOnParameterType {
+ /**
+ * Declaration of the function to call.
+ */
+ functionDeclaration: string;
+ /**
+ * Identifier of the object to call function on. Either objectId or executionContextId should
+ * be specified.
+ */
+ objectId?: RemoteObjectId;
+ /**
+ * Call arguments. All call arguments must belong to the same JavaScript world as the target
+ * object.
+ */
+ arguments?: CallArgument[];
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause
+ * execution. Overrides `setPauseOnException` state.
+ */
+ silent?: boolean;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean;
+ /**
+ * Whether execution should `await` for resulting value and return once awaited promise is
+ * resolved.
+ */
+ awaitPromise?: boolean;
+ /**
+ * Specifies execution context which global object will be used to call function on. Either
+ * executionContextId or objectId should be specified.
+ */
+ executionContextId?: ExecutionContextId;
+ /**
+ * Symbolic group name that can be used to release multiple objects. If objectGroup is not
+ * specified and objectId is, objectGroup will be inherited from object.
+ */
+ objectGroup?: string;
+ }
+
+ interface CompileScriptParameterType {
+ /**
+ * Expression to compile.
+ */
+ expression: string;
+ /**
+ * Source url to be set for the script.
+ */
+ sourceURL: string;
+ /**
+ * Specifies whether the compiled script should be persisted.
+ */
+ persistScript: boolean;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the
+ * evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId;
+ }
+
+ interface EvaluateParameterType {
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause
+ * execution. Overrides `setPauseOnException` state.
+ */
+ silent?: boolean;
+ /**
+ * Specifies in which execution context to perform evaluation. If the parameter is omitted the
+ * evaluation will be performed in the context of the inspected page.
+ */
+ contextId?: ExecutionContextId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean;
+ /**
+ * Whether execution should `await` for resulting value and return once awaited promise is
+ * resolved.
+ */
+ awaitPromise?: boolean;
+ /**
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ * @experimental
+ */
+ throwOnSideEffect?: boolean;
+ /**
+ * Terminate execution after timing out (number of milliseconds).
+ * @experimental
+ */
+ timeout?: TimeDelta;
+ }
+
+ interface GetPropertiesParameterType {
+ /**
+ * Identifier of the object to return properties for.
+ */
+ objectId: RemoteObjectId;
+ /**
+ * If true, returns properties belonging only to the element itself, not to its prototype
+ * chain.
+ */
+ ownProperties?: boolean;
+ /**
+ * If true, returns accessor properties (with getter/setter) only; internal properties are not
+ * returned either.
+ * @experimental
+ */
+ accessorPropertiesOnly?: boolean;
+ /**
+ * Whether preview should be generated for the results.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ }
+
+ interface GlobalLexicalScopeNamesParameterType {
+ /**
+ * Specifies in which execution context to lookup global scope variables.
+ */
+ executionContextId?: ExecutionContextId;
+ }
+
+ interface QueryObjectsParameterType {
+ /**
+ * Identifier of the prototype to return objects for.
+ */
+ prototypeObjectId: RemoteObjectId;
+ /**
+ * Symbolic group name that can be used to release the results.
+ */
+ objectGroup?: string;
+ }
+
+ interface ReleaseObjectParameterType {
+ /**
+ * Identifier of the object to release.
+ */
+ objectId: RemoteObjectId;
+ }
+
+ interface ReleaseObjectGroupParameterType {
+ /**
+ * Symbolic object group name.
+ */
+ objectGroup: string;
+ }
+
+ interface RunScriptParameterType {
+ /**
+ * Id of the script to run.
+ */
+ scriptId: ScriptId;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the
+ * evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause
+ * execution. Overrides `setPauseOnException` state.
+ */
+ silent?: boolean;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether execution should `await` for resulting value and return once awaited promise is
+ * resolved.
+ */
+ awaitPromise?: boolean;
+ }
+
+ interface SetCustomObjectFormatterEnabledParameterType {
+ enabled: boolean;
+ }
+
+ interface AwaitPromiseReturnType {
+ /**
+ * Promise result. Will contain rejected value if promise was rejected.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details if stack strace is available.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface CallFunctionOnReturnType {
+ /**
+ * Call result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface CompileScriptReturnType {
+ /**
+ * Id of the script.
+ */
+ scriptId?: ScriptId;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface EvaluateReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface GetIsolateIdReturnType {
+ /**
+ * The isolate id.
+ */
+ id: string;
+ }
+
+ interface GetHeapUsageReturnType {
+ /**
+ * Used heap size in bytes.
+ */
+ usedSize: number;
+ /**
+ * Allocated heap size in bytes.
+ */
+ totalSize: number;
+ }
+
+ interface GetPropertiesReturnType {
+ /**
+ * Object properties.
+ */
+ result: PropertyDescriptor[];
+ /**
+ * Internal object properties (only of the element itself).
+ */
+ internalProperties?: InternalPropertyDescriptor[];
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface GlobalLexicalScopeNamesReturnType {
+ names: string[];
+ }
+
+ interface QueryObjectsReturnType {
+ /**
+ * Array with objects.
+ */
+ objects: RemoteObject;
+ }
+
+ interface RunScriptReturnType {
+ /**
+ * Run result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface ConsoleAPICalledEventDataType {
+ /**
+ * Type of the call.
+ */
+ type: string;
+ /**
+ * Call arguments.
+ */
+ args: RemoteObject[];
+ /**
+ * Identifier of the context where the call was made.
+ */
+ executionContextId: ExecutionContextId;
+ /**
+ * Call timestamp.
+ */
+ timestamp: Timestamp;
+ /**
+ * Stack trace captured when the call was made.
+ */
+ stackTrace?: StackTrace;
+ /**
+ * Console context descriptor for calls on non-default console context (not console.*):
+ * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
+ * on named context.
+ * @experimental
+ */
+ context?: string;
+ }
+
+ interface ExceptionRevokedEventDataType {
+ /**
+ * Reason describing why exception was revoked.
+ */
+ reason: string;
+ /**
+ * The id of revoked exception, as reported in `exceptionThrown`.
+ */
+ exceptionId: number;
+ }
+
+ interface ExceptionThrownEventDataType {
+ /**
+ * Timestamp of the exception.
+ */
+ timestamp: Timestamp;
+ exceptionDetails: ExceptionDetails;
+ }
+
+ interface ExecutionContextCreatedEventDataType {
+ /**
+ * A newly created execution context.
+ */
+ context: ExecutionContextDescription;
+ }
+
+ interface ExecutionContextDestroyedEventDataType {
+ /**
+ * Id of the destroyed context
+ */
+ executionContextId: ExecutionContextId;
+ }
+
+ interface InspectRequestedEventDataType {
+ object: RemoteObject;
+ hints: {};
+ }
+ }
+
+ namespace Schema {
+ /**
+ * Description of the protocol domain.
+ */
+ interface Domain {
+ /**
+ * Domain name.
+ */
+ name: string;
+ /**
+ * Domain version.
+ */
+ version: string;
+ }
+
+ interface GetDomainsReturnType {
+ /**
+ * List of supported domains.
+ */
+ domains: Domain[];
+ }
+ }
+
+ namespace NodeTracing {
+ interface TraceConfig {
+ /**
+ * Controls how the trace buffer stores data.
+ */
+ recordMode?: string;
+ /**
+ * Included category filters.
+ */
+ includedCategories: string[];
+ }
+
+ interface StartParameterType {
+ traceConfig: TraceConfig;
+ }
+
+ interface GetCategoriesReturnType {
+ /**
+ * A list of supported tracing categories.
+ */
+ categories: string[];
+ }
+
+ interface DataCollectedEventDataType {
+ value: Array<{}>;
+ }
+ }
+
+ namespace NodeWorker {
+ type WorkerID = string;
+
+ /**
+ * Unique identifier of attached debugging session.
+ */
+ type SessionID = string;
+
+ interface WorkerInfo {
+ workerId: WorkerID;
+ type: string;
+ title: string;
+ url: string;
+ }
+
+ interface SendMessageToWorkerParameterType {
+ message: string;
+ /**
+ * Identifier of the session.
+ */
+ sessionId: SessionID;
+ }
+
+ interface EnableParameterType {
+ /**
+ * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+ * message to run them.
+ */
+ waitForDebuggerOnStart: boolean;
+ }
+
+ interface AttachedToWorkerEventDataType {
+ /**
+ * Identifier assigned to the session used to send/receive messages.
+ */
+ sessionId: SessionID;
+ workerInfo: WorkerInfo;
+ waitingForDebugger: boolean;
+ }
+
+ interface DetachedFromWorkerEventDataType {
+ /**
+ * Detached session identifier.
+ */
+ sessionId: SessionID;
+ }
+
+ interface ReceivedMessageFromWorkerEventDataType {
+ /**
+ * Identifier of a session which sends a message.
+ */
+ sessionId: SessionID;
+ message: string;
+ }
+ }
+
+ /**
+ * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.
+ */
+ class Session extends EventEmitter {
+ /**
+ * Create a new instance of the inspector.Session class.
+ * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
+ */
+ constructor();
+
+ /**
+ * Connects a session to the inspector back-end.
+ * An exception will be thrown if there is already a connected session established either
+ * through the API or by a front-end connected to the Inspector WebSocket port.
+ */
+ connect(): void;
+
+ /**
+ * Immediately close the session. All pending message callbacks will be called with an error.
+ * session.connect() will need to be called to be able to send messages again.
+ * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
+ */
+ disconnect(): void;
+
+ /**
+ * Posts a message to the inspector back-end. callback will be notified when a response is received.
+ * callback is a function that accepts two optional arguments - error and message-specific result.
+ */
+ post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
+ post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
+
+ /**
+ * Does nothing.
+ */
+ post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Disables console domain, prevents further console messages from being reported to the client.
+ */
+ post(method: "Console.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enables console domain, sends the messages collected so far to the client by means of the
+ * `messageAdded` notification.
+ */
+ post(method: "Console.enable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Continues execution until specific location is reached.
+ */
+ post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Disables debugger for given page.
+ */
+ post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enables debugger for the given page. Clients should not assume that the debugging has been
+ * enabled until the result for this command is received.
+ */
+ post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
+
+ /**
+ * Evaluates expression on a given call frame.
+ */
+ post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+
+ /**
+ * Returns possible locations for breakpoint. scriptId in start and end range locations should be
+ * the same.
+ */
+ post(
+ method: "Debugger.getPossibleBreakpoints",
+ params?: Debugger.GetPossibleBreakpointsParameterType,
+ callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
+ ): void;
+ post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
+
+ /**
+ * Returns source for the script with given id.
+ */
+ post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+
+ /**
+ * Returns stack trace with given `stackTraceId`.
+ * @experimental
+ */
+ post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+
+ /**
+ * Stops on the next JavaScript statement.
+ */
+ post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
+
+ /**
+ * @experimental
+ */
+ post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Removes JavaScript breakpoint.
+ */
+ post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Restarts particular call frame from the beginning.
+ */
+ post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+
+ /**
+ * Resumes JavaScript execution.
+ */
+ post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
+
+ /**
+ * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and
+ * Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled
+ * before next pause. Returns success when async task is actually scheduled, returns error if no
+ * task were scheduled or another scheduleStepIntoAsync was called.
+ * @experimental
+ */
+ post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Searches for given string in script content.
+ */
+ post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+
+ /**
+ * Enables or disables async call stacks tracking.
+ */
+ post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
+ * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
+ * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+ * @experimental
+ */
+ post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
+ * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+ * Positions array contains positions where blackbox state is changed. First interval isn't
+ * blackboxed. Array should be sorted.
+ * @experimental
+ */
+ post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Sets JavaScript breakpoint at a given location.
+ */
+ post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+
+ /**
+ * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
+ * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
+ * `locations` property. Further matching script parsing will result in subsequent
+ * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
+ */
+ post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+
+ /**
+ * Sets JavaScript breakpoint before each call to the given function.
+ * If another function was created from the same source as a given one,
+ * calling it will also trigger the breakpoint.
+ * @experimental
+ */
+ post(
+ method: "Debugger.setBreakpointOnFunctionCall",
+ params?: Debugger.SetBreakpointOnFunctionCallParameterType,
+ callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void
+ ): void;
+ post(method: "Debugger.setBreakpointOnFunctionCall", callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void): void;
+
+ /**
+ * Activates / deactivates all breakpoints on the page.
+ */
+ post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
+ * no exceptions. Initial pause on exceptions state is `none`.
+ */
+ post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Changes return value in top frame. Available only at return break position.
+ * @experimental
+ */
+ post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Edits JavaScript source live.
+ */
+ post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+
+ /**
+ * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+ */
+ post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Changes value of variable in a callframe. Object-based scopes are not supported and must be
+ * mutated manually.
+ */
+ post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Steps into the function call.
+ */
+ post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Steps out of the function call.
+ */
+ post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Steps over the statement.
+ */
+ post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enables console to refer to the node with given id via $x (see Command Line API for more details
+ * $x functions).
+ */
+ post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+
+ post(
+ method: "HeapProfiler.getObjectByHeapObjectId",
+ params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
+ callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
+ ): void;
+ post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
+
+ post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
+
+ post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
+
+ post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Collect coverage data for the current isolate. The coverage data may be incomplete due to
+ * garbage collection.
+ */
+ post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
+
+ /**
+ * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+ */
+ post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
+ * coverage may be incomplete. Enabling prevents running optimized code and resets execution
+ * counters.
+ */
+ post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enable type profile.
+ * @experimental
+ */
+ post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
+
+ /**
+ * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
+ * executing optimized code.
+ */
+ post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Disable type profile. Disabling releases type profile data collected so far.
+ * @experimental
+ */
+ post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Collect coverage data for the current isolate, and resets execution counters. Precise code
+ * coverage needs to have started.
+ */
+ post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
+
+ /**
+ * Collect type profile.
+ * @experimental
+ */
+ post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
+
+ /**
+ * Add handler to promise with given promise object id.
+ */
+ post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+
+ /**
+ * Calls function with given declaration on the given object. Object group of the result is
+ * inherited from the target object.
+ */
+ post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+
+ /**
+ * Compiles expression.
+ */
+ post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+
+ /**
+ * Disables reporting of execution contexts creation.
+ */
+ post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Discards collected exceptions and console API calls.
+ */
+ post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
+ * When the reporting gets enabled the event will be sent immediately for each existing execution
+ * context.
+ */
+ post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Evaluates expression on global object.
+ */
+ post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+
+ /**
+ * Returns the isolate id.
+ * @experimental
+ */
+ post(method: "Runtime.getIsolateId", callback?: (err: Error | null, params: Runtime.GetIsolateIdReturnType) => void): void;
+
+ /**
+ * Returns the JavaScript heap usage.
+ * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
+ * @experimental
+ */
+ post(method: "Runtime.getHeapUsage", callback?: (err: Error | null, params: Runtime.GetHeapUsageReturnType) => void): void;
+
+ /**
+ * Returns properties of a given object. Object group of the result is inherited from the target
+ * object.
+ */
+ post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+
+ /**
+ * Returns all let, const and class variables from global scope.
+ */
+ post(
+ method: "Runtime.globalLexicalScopeNames",
+ params?: Runtime.GlobalLexicalScopeNamesParameterType,
+ callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
+ ): void;
+ post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
+
+ post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+
+ /**
+ * Releases remote object with given id.
+ */
+ post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Releases all remote objects that belong to a given group.
+ */
+ post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Tells inspected instance to run if it was waiting for debugger to attach.
+ */
+ post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Runs script with given id in a given context.
+ */
+ post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+
+ /**
+ * @experimental
+ */
+ post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Terminate current or next JavaScript execution.
+ * Will cancel the termination when the outer-most script execution ends.
+ * @experimental
+ */
+ post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Returns supported domains.
+ */
+ post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
+
+ /**
+ * Gets supported tracing categories.
+ */
+ post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
+
+ /**
+ * Start trace events collection.
+ */
+ post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Stop trace events collection. Remaining collected events will be sent as a sequence of
+ * dataCollected events followed by tracingComplete event.
+ */
+ post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Sends protocol message over session with given id.
+ */
+ post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Instructs the inspector to attach to running workers. Will also attach to new workers
+ * as they start
+ */
+ post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Detaches from all running workers and disables attaching to new workers as they are started.
+ */
+ post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
+
+ // Events
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ addListener(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected
+ * scripts upon enabling debugger.
+ */
+ addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last
+ * seen object id and corresponding timestamp. If the were changes in the heap since last event
+ * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API
+ * call).
+ */
+ addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
+ emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+ emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+ emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+ emit(event: "Debugger.resumed"): boolean;
+ emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+ emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+ emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+ emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+ emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+ emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+ emit(event: "HeapProfiler.resetProfiles"): boolean;
+ emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+ emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+ emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+ emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+ emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+ emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+ emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+ emit(event: "Runtime.executionContextsCleared"): boolean;
+ emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+ emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+ emit(event: "NodeTracing.tracingComplete"): boolean;
+ emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+ emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+ emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ on(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected
+ * scripts upon enabling debugger.
+ */
+ on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last
+ * seen object id and corresponding timestamp. If the were changes in the heap since last event
+ * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ on(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API
+ * call).
+ */
+ on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ on(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ once(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected
+ * scripts upon enabling debugger.
+ */
+ once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last
+ * seen object id and corresponding timestamp. If the were changes in the heap since last event
+ * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ once(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API
+ * call).
+ */
+ once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ once(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependListener(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected
+ * scripts upon enabling debugger.
+ */
+ prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last
+ * seen object id and corresponding timestamp. If the were changes in the heap since last event
+ * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API
+ * call).
+ */
+ prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected
+ * scripts upon enabling debugger.
+ */
+ prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last
+ * seen object id and corresponding timestamp. If the were changes in the heap since last event
+ * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+ prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API
+ * call).
+ */
+ prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+ }
+
+ // Top Level API
+
+ /**
+ * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started.
+ * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client.
+ * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
+ * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
+ * @param wait Block until a client has connected. Optional, defaults to false.
+ */
+ function open(port?: number, host?: string, wait?: boolean): void;
+
+ /**
+ * Deactivate the inspector. Blocks until there are no active connections.
+ */
+ function close(): void;
+
+ /**
+ * Return the URL of the active inspector, or `undefined` if there is none.
+ */
+ function url(): string | undefined;
+}
diff --git a/node_modules/electron/node_modules/@types/node/module.d.ts b/node_modules/electron/node_modules/@types/node/module.d.ts
new file mode 100644
index 0000000..f512be7
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/module.d.ts
@@ -0,0 +1,3 @@
+declare module "module" {
+ export = NodeJS.Module;
+}
diff --git a/node_modules/electron/node_modules/@types/node/net.d.ts b/node_modules/electron/node_modules/@types/node/net.d.ts
new file mode 100644
index 0000000..056cdec
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/net.d.ts
@@ -0,0 +1,251 @@
+declare module "net" {
+ import * as stream from "stream";
+ import * as events from "events";
+ import * as dns from "dns";
+
+ type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
+
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+
+ interface SocketConstructorOpts {
+ fd?: number;
+ allowHalfOpen?: boolean;
+ readable?: boolean;
+ writable?: boolean;
+ }
+
+ interface TcpSocketConnectOpts {
+ port: number;
+ host?: string;
+ localAddress?: string;
+ localPort?: number;
+ hints?: number;
+ family?: number;
+ lookup?: LookupFunction;
+ }
+
+ interface IpcSocketConnectOpts {
+ path: string;
+ }
+
+ type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
+
+ class Socket extends stream.Duplex {
+ constructor(options?: SocketConstructorOpts);
+
+ // Extended base methods
+ write(buffer: Buffer): boolean;
+ write(buffer: Buffer, cb?: Function): boolean;
+ write(str: string, cb?: Function): boolean;
+ write(str: string, encoding?: string, cb?: Function): boolean;
+ write(str: string, encoding?: string, fd?: string): boolean;
+ write(data: any, encoding?: string, callback?: Function): void;
+
+ connect(options: SocketConnectOpts, connectionListener?: Function): this;
+ connect(port: number, host: string, connectionListener?: Function): this;
+ connect(port: number, connectionListener?: Function): this;
+ connect(path: string, connectionListener?: Function): this;
+
+ setEncoding(encoding?: string): this;
+ pause(): this;
+ resume(): this;
+ setTimeout(timeout: number, callback?: Function): this;
+ setNoDelay(noDelay?: boolean): this;
+ setKeepAlive(enable?: boolean, initialDelay?: number): this;
+ address(): AddressInfo | string;
+ unref(): void;
+ ref(): void;
+
+ readonly bufferSize: number;
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ readonly connecting: boolean;
+ readonly destroyed: boolean;
+ readonly localAddress: string;
+ readonly localPort: number;
+ readonly remoteAddress?: string;
+ readonly remoteFamily?: string;
+ readonly remotePort?: number;
+
+ // Extended base methods
+ end(): void;
+ end(buffer: Buffer, cb?: Function): void;
+ end(str: string, cb?: Function): void;
+ end(str: string, encoding?: string, cb?: Function): void;
+ end(data?: any, encoding?: string): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. data
+ * 4. drain
+ * 5. end
+ * 6. error
+ * 7. lookup
+ * 8. timeout
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: (had_error: boolean) => void): this;
+ addListener(event: "connect", listener: () => void): this;
+ addListener(event: "data", listener: (data: Buffer) => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close", had_error: boolean): boolean;
+ emit(event: "connect"): boolean;
+ emit(event: "data", data: Buffer): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "end"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
+ emit(event: "timeout"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: (had_error: boolean) => void): this;
+ on(event: "connect", listener: () => void): this;
+ on(event: "data", listener: (data: Buffer) => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ on(event: "timeout", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: (had_error: boolean) => void): this;
+ once(event: "connect", listener: () => void): this;
+ once(event: "data", listener: (data: Buffer) => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ once(event: "timeout", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: (had_error: boolean) => void): this;
+ prependListener(event: "connect", listener: () => void): this;
+ prependListener(event: "data", listener: (data: Buffer) => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: (had_error: boolean) => void): this;
+ prependOnceListener(event: "connect", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (data: Buffer) => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ }
+
+ interface ListenOptions {
+ port?: number;
+ host?: string;
+ backlog?: number;
+ path?: string;
+ exclusive?: boolean;
+ readableAll?: boolean;
+ writableAll?: boolean;
+ }
+
+ // https://github.com/nodejs/node/blob/master/lib/net.js
+ class Server extends events.EventEmitter {
+ constructor(connectionListener?: (socket: Socket) => void);
+ constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void);
+
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: Function): this;
+ listen(port?: number, hostname?: string, listeningListener?: Function): this;
+ listen(port?: number, backlog?: number, listeningListener?: Function): this;
+ listen(port?: number, listeningListener?: Function): this;
+ listen(path: string, backlog?: number, listeningListener?: Function): this;
+ listen(path: string, listeningListener?: Function): this;
+ listen(options: ListenOptions, listeningListener?: Function): this;
+ listen(handle: any, backlog?: number, listeningListener?: Function): this;
+ listen(handle: any, listeningListener?: Function): this;
+ close(callback?: (err?: Error) => void): this;
+ address(): AddressInfo | string;
+ getConnections(cb: (error: Error | null, count: number) => void): void;
+ ref(): this;
+ unref(): this;
+ maxConnections: number;
+ connections: number;
+ listening: boolean;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connection
+ * 3. error
+ * 4. listening
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "connection", listener: (socket: Socket) => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "listening", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "connection", socket: Socket): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "listening"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "connection", listener: (socket: Socket) => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "listening", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "connection", listener: (socket: Socket) => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "listening", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "connection", listener: (socket: Socket) => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "listening", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "listening", listener: () => void): this;
+ }
+
+ interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number;
+ }
+
+ interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number;
+ }
+
+ type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
+
+ function createServer(connectionListener?: (socket: Socket) => void): Server;
+ function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server;
+ function connect(options: NetConnectOpts, connectionListener?: Function): Socket;
+ function connect(port: number, host?: string, connectionListener?: Function): Socket;
+ function connect(path: string, connectionListener?: Function): Socket;
+ function createConnection(options: NetConnectOpts, connectionListener?: Function): Socket;
+ function createConnection(port: number, host?: string, connectionListener?: Function): Socket;
+ function createConnection(path: string, connectionListener?: Function): Socket;
+ function isIP(input: string): number;
+ function isIPv4(input: string): boolean;
+ function isIPv6(input: string): boolean;
+}
diff --git a/node_modules/electron/node_modules/@types/node/os.d.ts b/node_modules/electron/node_modules/@types/node/os.d.ts
new file mode 100644
index 0000000..2bcf106
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/os.d.ts
@@ -0,0 +1,254 @@
+declare module "os" {
+ interface CpuInfo {
+ model: string;
+ speed: number;
+ times: {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+ };
+ }
+
+ interface NetworkInterfaceBase {
+ address: string;
+ netmask: string;
+ mac: string;
+ internal: boolean;
+ cidr: string | null;
+ }
+
+ interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
+ family: "IPv4";
+ }
+
+ interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
+ family: "IPv6";
+ scopeid: number;
+ }
+
+ type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
+
+ function hostname(): string;
+ function loadavg(): number[];
+ function uptime(): number;
+ function freemem(): number;
+ function totalmem(): number;
+ function cpus(): CpuInfo[];
+ function type(): string;
+ function release(): string;
+ function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] };
+ function homedir(): string;
+ function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string };
+ const constants: {
+ UV_UDP_REUSEADDR: number;
+ // signals: { [key in NodeJS.Signals]: number; }; @todo: change after migration to typescript 2.1
+ signals: {
+ SIGHUP: number;
+ SIGINT: number;
+ SIGQUIT: number;
+ SIGILL: number;
+ SIGTRAP: number;
+ SIGABRT: number;
+ SIGIOT: number;
+ SIGBUS: number;
+ SIGFPE: number;
+ SIGKILL: number;
+ SIGUSR1: number;
+ SIGSEGV: number;
+ SIGUSR2: number;
+ SIGPIPE: number;
+ SIGALRM: number;
+ SIGTERM: number;
+ SIGCHLD: number;
+ SIGSTKFLT: number;
+ SIGCONT: number;
+ SIGSTOP: number;
+ SIGTSTP: number;
+ SIGBREAK: number;
+ SIGTTIN: number;
+ SIGTTOU: number;
+ SIGURG: number;
+ SIGXCPU: number;
+ SIGXFSZ: number;
+ SIGVTALRM: number;
+ SIGPROF: number;
+ SIGWINCH: number;
+ SIGIO: number;
+ SIGPOLL: number;
+ SIGLOST: number;
+ SIGPWR: number;
+ SIGINFO: number;
+ SIGSYS: number;
+ SIGUNUSED: number;
+ };
+ errno: {
+ E2BIG: number;
+ EACCES: number;
+ EADDRINUSE: number;
+ EADDRNOTAVAIL: number;
+ EAFNOSUPPORT: number;
+ EAGAIN: number;
+ EALREADY: number;
+ EBADF: number;
+ EBADMSG: number;
+ EBUSY: number;
+ ECANCELED: number;
+ ECHILD: number;
+ ECONNABORTED: number;
+ ECONNREFUSED: number;
+ ECONNRESET: number;
+ EDEADLK: number;
+ EDESTADDRREQ: number;
+ EDOM: number;
+ EDQUOT: number;
+ EEXIST: number;
+ EFAULT: number;
+ EFBIG: number;
+ EHOSTUNREACH: number;
+ EIDRM: number;
+ EILSEQ: number;
+ EINPROGRESS: number;
+ EINTR: number;
+ EINVAL: number;
+ EIO: number;
+ EISCONN: number;
+ EISDIR: number;
+ ELOOP: number;
+ EMFILE: number;
+ EMLINK: number;
+ EMSGSIZE: number;
+ EMULTIHOP: number;
+ ENAMETOOLONG: number;
+ ENETDOWN: number;
+ ENETRESET: number;
+ ENETUNREACH: number;
+ ENFILE: number;
+ ENOBUFS: number;
+ ENODATA: number;
+ ENODEV: number;
+ ENOENT: number;
+ ENOEXEC: number;
+ ENOLCK: number;
+ ENOLINK: number;
+ ENOMEM: number;
+ ENOMSG: number;
+ ENOPROTOOPT: number;
+ ENOSPC: number;
+ ENOSR: number;
+ ENOSTR: number;
+ ENOSYS: number;
+ ENOTCONN: number;
+ ENOTDIR: number;
+ ENOTEMPTY: number;
+ ENOTSOCK: number;
+ ENOTSUP: number;
+ ENOTTY: number;
+ ENXIO: number;
+ EOPNOTSUPP: number;
+ EOVERFLOW: number;
+ EPERM: number;
+ EPIPE: number;
+ EPROTO: number;
+ EPROTONOSUPPORT: number;
+ EPROTOTYPE: number;
+ ERANGE: number;
+ EROFS: number;
+ ESPIPE: number;
+ ESRCH: number;
+ ESTALE: number;
+ ETIME: number;
+ ETIMEDOUT: number;
+ ETXTBSY: number;
+ EWOULDBLOCK: number;
+ EXDEV: number;
+ WSAEINTR: number;
+ WSAEBADF: number;
+ WSAEACCES: number;
+ WSAEFAULT: number;
+ WSAEINVAL: number;
+ WSAEMFILE: number;
+ WSAEWOULDBLOCK: number;
+ WSAEINPROGRESS: number;
+ WSAEALREADY: number;
+ WSAENOTSOCK: number;
+ WSAEDESTADDRREQ: number;
+ WSAEMSGSIZE: number;
+ WSAEPROTOTYPE: number;
+ WSAENOPROTOOPT: number;
+ WSAEPROTONOSUPPORT: number;
+ WSAESOCKTNOSUPPORT: number;
+ WSAEOPNOTSUPP: number;
+ WSAEPFNOSUPPORT: number;
+ WSAEAFNOSUPPORT: number;
+ WSAEADDRINUSE: number;
+ WSAEADDRNOTAVAIL: number;
+ WSAENETDOWN: number;
+ WSAENETUNREACH: number;
+ WSAENETRESET: number;
+ WSAECONNABORTED: number;
+ WSAECONNRESET: number;
+ WSAENOBUFS: number;
+ WSAEISCONN: number;
+ WSAENOTCONN: number;
+ WSAESHUTDOWN: number;
+ WSAETOOMANYREFS: number;
+ WSAETIMEDOUT: number;
+ WSAECONNREFUSED: number;
+ WSAELOOP: number;
+ WSAENAMETOOLONG: number;
+ WSAEHOSTDOWN: number;
+ WSAEHOSTUNREACH: number;
+ WSAENOTEMPTY: number;
+ WSAEPROCLIM: number;
+ WSAEUSERS: number;
+ WSAEDQUOT: number;
+ WSAESTALE: number;
+ WSAEREMOTE: number;
+ WSASYSNOTREADY: number;
+ WSAVERNOTSUPPORTED: number;
+ WSANOTINITIALISED: number;
+ WSAEDISCON: number;
+ WSAENOMORE: number;
+ WSAECANCELLED: number;
+ WSAEINVALIDPROCTABLE: number;
+ WSAEINVALIDPROVIDER: number;
+ WSAEPROVIDERFAILEDINIT: number;
+ WSASYSCALLFAILURE: number;
+ WSASERVICE_NOT_FOUND: number;
+ WSATYPE_NOT_FOUND: number;
+ WSA_E_NO_MORE: number;
+ WSA_E_CANCELLED: number;
+ WSAEREFUSED: number;
+ };
+ priority: {
+ PRIORITY_LOW: number;
+ PRIORITY_BELOW_NORMAL: number;
+ PRIORITY_NORMAL: number;
+ PRIORITY_ABOVE_NORMAL: number;
+ PRIORITY_HIGH: number;
+ PRIORITY_HIGHEST: number;
+ }
+ };
+ function arch(): string;
+ function platform(): NodeJS.Platform;
+ function tmpdir(): string;
+ const EOL: string;
+ function endianness(): "BE" | "LE";
+ /**
+ * Gets the priority of a process.
+ * Defaults to current process.
+ */
+ function getPriority(pid?: number): number;
+ /**
+ * Sets the priority of the current process.
+ * @param priority Must be in range of -20 to 19
+ */
+ function setPriority(priority: number): void;
+ /**
+ * Sets the priority of the process specified process.
+ * @param priority Must be in range of -20 to 19
+ */
+ function setPriority(pid: number, priority: number): void;
+}
diff --git a/node_modules/electron/node_modules/@types/node/package.json b/node_modules/electron/node_modules/@types/node/package.json
new file mode 100644
index 0000000..bb4e910
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/package.json
@@ -0,0 +1,201 @@
+{
+ "name": "@types/node",
+ "version": "10.17.51",
+ "description": "TypeScript definitions for Node.js",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Microsoft TypeScript",
+ "url": "https://github.com/Microsoft",
+ "githubUsername": "Microsoft"
+ },
+ {
+ "name": "DefinitelyTyped",
+ "url": "https://github.com/DefinitelyTyped",
+ "githubUsername": "DefinitelyTyped"
+ },
+ {
+ "name": "Alberto Schiabel",
+ "url": "https://github.com/jkomyno",
+ "githubUsername": "jkomyno"
+ },
+ {
+ "name": "Alexander T.",
+ "url": "https://github.com/a-tarasyuk",
+ "githubUsername": "a-tarasyuk"
+ },
+ {
+ "name": "Alvis HT Tang",
+ "url": "https://github.com/alvis",
+ "githubUsername": "alvis"
+ },
+ {
+ "name": "Andrew Makarov",
+ "url": "https://github.com/r3nya",
+ "githubUsername": "r3nya"
+ },
+ {
+ "name": "Bruno Scheufler",
+ "url": "https://github.com/brunoscheufler",
+ "githubUsername": "brunoscheufler"
+ },
+ {
+ "name": "Chigozirim C.",
+ "url": "https://github.com/smac89",
+ "githubUsername": "smac89"
+ },
+ {
+ "name": "Deividas Bakanas",
+ "url": "https://github.com/DeividasBakanas",
+ "githubUsername": "DeividasBakanas"
+ },
+ {
+ "name": "Eugene Y. Q. Shen",
+ "url": "https://github.com/eyqs",
+ "githubUsername": "eyqs"
+ },
+ {
+ "name": "Flarna",
+ "url": "https://github.com/Flarna",
+ "githubUsername": "Flarna"
+ },
+ {
+ "name": "Hannes Magnusson",
+ "url": "https://github.com/Hannes-Magnusson-CK",
+ "githubUsername": "Hannes-Magnusson-CK"
+ },
+ {
+ "name": "Hoàng Văn Khải",
+ "url": "https://github.com/KSXGitHub",
+ "githubUsername": "KSXGitHub"
+ },
+ {
+ "name": "Huw",
+ "url": "https://github.com/hoo29",
+ "githubUsername": "hoo29"
+ },
+ {
+ "name": "Kelvin Jin",
+ "url": "https://github.com/kjin",
+ "githubUsername": "kjin"
+ },
+ {
+ "name": "Klaus Meinhardt",
+ "url": "https://github.com/ajafff",
+ "githubUsername": "ajafff"
+ },
+ {
+ "name": "Lishude",
+ "url": "https://github.com/islishude",
+ "githubUsername": "islishude"
+ },
+ {
+ "name": "Mariusz Wiktorczyk",
+ "url": "https://github.com/mwiktorczyk",
+ "githubUsername": "mwiktorczyk"
+ },
+ {
+ "name": "Mohsen Azimi",
+ "url": "https://github.com/mohsen1",
+ "githubUsername": "mohsen1"
+ },
+ {
+ "name": "Nicolas Even",
+ "url": "https://github.com/n-e",
+ "githubUsername": "n-e"
+ },
+ {
+ "name": "Nikita Galkin",
+ "url": "https://github.com/galkin",
+ "githubUsername": "galkin"
+ },
+ {
+ "name": "Parambir Singh",
+ "url": "https://github.com/parambirs",
+ "githubUsername": "parambirs"
+ },
+ {
+ "name": "Sebastian Silbermann",
+ "url": "https://github.com/eps1lon",
+ "githubUsername": "eps1lon"
+ },
+ {
+ "name": "Simon Schick",
+ "url": "https://github.com/SimonSchick",
+ "githubUsername": "SimonSchick"
+ },
+ {
+ "name": "Thomas den Hollander",
+ "url": "https://github.com/ThomasdenH",
+ "githubUsername": "ThomasdenH"
+ },
+ {
+ "name": "Wilco Bakker",
+ "url": "https://github.com/WilcoBakker",
+ "githubUsername": "WilcoBakker"
+ },
+ {
+ "name": "wwwy3y3",
+ "url": "https://github.com/wwwy3y3",
+ "githubUsername": "wwwy3y3"
+ },
+ {
+ "name": "Zane Hannan AU",
+ "url": "https://github.com/ZaneHannanAU",
+ "githubUsername": "ZaneHannanAU"
+ },
+ {
+ "name": "Jeremie Rodriguez",
+ "url": "https://github.com/jeremiergz",
+ "githubUsername": "jeremiergz"
+ },
+ {
+ "name": "Samuel Ainsworth",
+ "url": "https://github.com/samuela",
+ "githubUsername": "samuela"
+ },
+ {
+ "name": "Kyle Uehlein",
+ "url": "https://github.com/kuehlein",
+ "githubUsername": "kuehlein"
+ },
+ {
+ "name": "Jordi Oliveras Rovira",
+ "url": "https://github.com/j-oliveras",
+ "githubUsername": "j-oliveras"
+ },
+ {
+ "name": "Thanik Bhongbhibhat",
+ "url": "https://github.com/bhongy",
+ "githubUsername": "bhongy"
+ },
+ {
+ "name": "Minh Son Nguyen",
+ "url": "https://github.com/nguymin4",
+ "githubUsername": "nguymin4"
+ },
+ {
+ "name": "ExE Boss",
+ "url": "https://github.com/ExE-Boss",
+ "githubUsername": "ExE-Boss"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "typesVersions": {
+ "<=3.6": {
+ "*": [
+ "ts3.6/*"
+ ]
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/node"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "bbd718db1c53e260f6ff473038d10401fd5cef497e1370e55cf0651a29743384",
+ "typeScriptVersion": "3.4"
+} \ No newline at end of file
diff --git a/node_modules/electron/node_modules/@types/node/path.d.ts b/node_modules/electron/node_modules/@types/node/path.d.ts
new file mode 100644
index 0000000..bbc1709
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/path.d.ts
@@ -0,0 +1,159 @@
+declare module "path" {
+ /**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+ interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+ }
+ interface FormatInputPathObject {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root?: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir?: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base?: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext?: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name?: string;
+ }
+
+ /**
+ * Normalize a string path, reducing '..' and '.' parts.
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
+ *
+ * @param p string path to normalize.
+ */
+ function normalize(p: string): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
+ *
+ * @param paths paths to join.
+ */
+ function join(...paths: string[]): string;
+ /**
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+ *
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+ *
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
+ * until an absolute path is found. If after using all {from} paths still no absolute path is found,
+ * the current working directory is used as well. The resulting path is normalized,
+ * and trailing slashes are removed unless the path gets resolved to the root directory.
+ *
+ * @param pathSegments string paths to join. Non-string arguments are ignored.
+ */
+ function resolve(...pathSegments: string[]): string;
+ /**
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+ *
+ * @param path path to test.
+ */
+ function isAbsolute(path: string): boolean;
+ /**
+ * Solve the relative path from {from} to {to}.
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+ */
+ function relative(from: string, to: string): string;
+ /**
+ * Return the directory name of a path. Similar to the Unix dirname command.
+ *
+ * @param p the path to evaluate.
+ */
+ function dirname(p: string): string;
+ /**
+ * Return the last portion of a path. Similar to the Unix basename command.
+ * Often used to extract the file name from a fully qualified path.
+ *
+ * @param p the path to evaluate.
+ * @param ext optionally, an extension to remove from the result.
+ */
+ function basename(p: string, ext?: string): string;
+ /**
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
+ *
+ * @param p the path to evaluate.
+ */
+ function extname(p: string): string;
+ /**
+ * The platform-specific file separator. '\\' or '/'.
+ */
+ const sep: '\\' | '/';
+ /**
+ * The platform-specific file delimiter. ';' or ':'.
+ */
+ const delimiter: ';' | ':';
+ /**
+ * Returns an object from a path string - the opposite of format().
+ *
+ * @param pathString path to evaluate.
+ */
+ function parse(pathString: string): ParsedPath;
+ /**
+ * Returns a path string from an object - the opposite of parse().
+ *
+ * @param pathString path to evaluate.
+ */
+ function format(pathObject: FormatInputPathObject): string;
+
+ namespace posix {
+ function normalize(p: string): string;
+ function join(...paths: any[]): string;
+ function resolve(...pathSegments: any[]): string;
+ function isAbsolute(p: string): boolean;
+ function relative(from: string, to: string): string;
+ function dirname(p: string): string;
+ function basename(p: string, ext?: string): string;
+ function extname(p: string): string;
+ const sep: string;
+ const delimiter: string;
+ function parse(p: string): ParsedPath;
+ function format(pP: FormatInputPathObject): string;
+ }
+
+ namespace win32 {
+ function normalize(p: string): string;
+ function join(...paths: any[]): string;
+ function resolve(...pathSegments: any[]): string;
+ function isAbsolute(p: string): boolean;
+ function relative(from: string, to: string): string;
+ function dirname(p: string): string;
+ function basename(p: string, ext?: string): string;
+ function extname(p: string): string;
+ const sep: string;
+ const delimiter: string;
+ function parse(p: string): ParsedPath;
+ function format(pP: FormatInputPathObject): string;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/perf_hooks.d.ts b/node_modules/electron/node_modules/@types/node/perf_hooks.d.ts
new file mode 100644
index 0000000..b4777bd
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/perf_hooks.d.ts
@@ -0,0 +1,169 @@
+declare module "perf_hooks" {
+ import { AsyncResource } from "async_hooks";
+
+ interface PerformanceEntry {
+ /**
+ * The total number of milliseconds elapsed for this entry.
+ * This value will not be meaningful for all Performance Entry types.
+ */
+ readonly duration: number;
+
+ /**
+ * The name of the performance entry.
+ */
+ readonly name: string;
+
+ /**
+ * The high resolution millisecond timestamp marking the starting time of the Performance Entry.
+ */
+ readonly startTime: number;
+
+ /**
+ * The type of the performance entry.
+ * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'.
+ */
+ readonly entryType: string;
+
+ /**
+ * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies
+ * the type of garbage collection operation that occurred.
+ * The value may be one of perf_hooks.constants.
+ */
+ readonly kind?: number;
+ }
+
+ interface PerformanceNodeTiming extends PerformanceEntry {
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process completed bootstrap.
+ * If bootstrapping has not yet finished, the property has the value of -1.
+ */
+ readonly bootstrapComplete: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop exited.
+ * If the event loop has not yet exited, the property has the value of -1.
+ * It can only have a value of not -1 in a handler of the 'exit' event.
+ */
+ readonly loopExit: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop started.
+ * If the event loop has not yet started (e.g., in the first tick of the main script), the property has the value of -1.
+ */
+ readonly loopStart: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process was initialized.
+ */
+ readonly nodeStart: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the V8 platform was initialized.
+ */
+ readonly v8Start: number;
+ }
+
+ interface Performance {
+ /**
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
+ * If name is provided, removes only the named mark.
+ * @param name
+ */
+ clearMarks(name?: string): void;
+
+ /**
+ * Creates a new PerformanceMark entry in the Performance Timeline.
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
+ * and whose performanceEntry.duration is always 0.
+ * Performance marks are used to mark specific significant moments in the Performance Timeline.
+ * @param name
+ */
+ mark(name?: string): void;
+
+ /**
+ * Creates a new PerformanceMeasure entry in the Performance Timeline.
+ * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
+ * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
+ *
+ * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
+ * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
+ * then startMark is set to timeOrigin by default.
+ *
+ * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
+ * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
+ * @param name
+ * @param startMark
+ * @param endMark
+ */
+ measure(name: string, startMark: string, endMark: string): void;
+
+ /**
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
+ */
+ readonly nodeTiming: PerformanceNodeTiming;
+
+ /**
+ * @return the current high resolution millisecond timestamp
+ */
+ now(): number;
+
+ /**
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
+ */
+ readonly timeOrigin: number;
+
+ /**
+ * Wraps a function within a new function that measures the running time of the wrapped function.
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
+ * @param fn
+ */
+ timerify<T extends (...optionalParams: any[]) => any>(fn: T): T;
+ }
+
+ interface PerformanceObserverEntryList {
+ /**
+ * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime.
+ */
+ getEntries(): PerformanceEntry[];
+
+ /**
+ * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
+ * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type.
+ */
+ getEntriesByName(name: string, type?: string): PerformanceEntry[];
+
+ /**
+ * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
+ * whose performanceEntry.entryType is equal to type.
+ */
+ getEntriesByType(type: string): PerformanceEntry[];
+ }
+
+ type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
+
+ class PerformanceObserver extends AsyncResource {
+ constructor(callback: PerformanceObserverCallback);
+
+ /**
+ * Disconnects the PerformanceObserver instance from all notifications.
+ */
+ disconnect(): void;
+
+ /**
+ * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes.
+ * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance.
+ * Property buffered defaults to false.
+ * @param options
+ */
+ observe(options: { entryTypes: ReadonlyArray<string>, buffered?: boolean }): void;
+ }
+
+ namespace constants {
+ const NODE_PERFORMANCE_GC_MAJOR: number;
+ const NODE_PERFORMANCE_GC_MINOR: number;
+ const NODE_PERFORMANCE_GC_INCREMENTAL: number;
+ const NODE_PERFORMANCE_GC_WEAKCB: number;
+ }
+
+ const performance: Performance;
+}
diff --git a/node_modules/electron/node_modules/@types/node/process.d.ts b/node_modules/electron/node_modules/@types/node/process.d.ts
new file mode 100644
index 0000000..ccd5c9c
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/process.d.ts
@@ -0,0 +1,3 @@
+declare module "process" {
+ export = process;
+}
diff --git a/node_modules/electron/node_modules/@types/node/punycode.d.ts b/node_modules/electron/node_modules/@types/node/punycode.d.ts
new file mode 100644
index 0000000..2b771d4
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/punycode.d.ts
@@ -0,0 +1,68 @@
+declare module "punycode" {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function decode(string: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function encode(string: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function toUnicode(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function toASCII(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const ucs2: ucs2;
+ interface ucs2 {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ decode(string: string): number[];
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ encode(codePoints: ReadonlyArray<number>): string;
+ }
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const version: string;
+}
diff --git a/node_modules/electron/node_modules/@types/node/querystring.d.ts b/node_modules/electron/node_modules/@types/node/querystring.d.ts
new file mode 100644
index 0000000..f54d352
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/querystring.d.ts
@@ -0,0 +1,17 @@
+declare module "querystring" {
+ interface StringifyOptions {
+ encodeURIComponent?: Function;
+ }
+
+ interface ParseOptions {
+ maxKeys?: number;
+ decodeURIComponent?: Function;
+ }
+
+ interface ParsedUrlQuery { [key: string]: string | string[]; }
+
+ function stringify(obj?: {}, sep?: string, eq?: string, options?: StringifyOptions): string;
+ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
+ function escape(str: string): string;
+ function unescape(str: string): string;
+}
diff --git a/node_modules/electron/node_modules/@types/node/readline.d.ts b/node_modules/electron/node_modules/@types/node/readline.d.ts
new file mode 100644
index 0000000..85e190a
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/readline.d.ts
@@ -0,0 +1,143 @@
+declare module "readline" {
+ import * as events from "events";
+ import * as stream from "stream";
+
+ interface Key {
+ sequence?: string;
+ name?: string;
+ ctrl?: boolean;
+ meta?: boolean;
+ shift?: boolean;
+ }
+
+ class Interface extends events.EventEmitter {
+ readonly terminal: boolean;
+
+ // Need direct access to line/cursor data, for use in external processes
+ // see: https://github.com/nodejs/node/issues/30347
+ /** The current input data */
+ readonly line: string;
+ /** The current cursor position in the input line */
+ readonly cursor: number;
+
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(options: ReadLineOptions);
+
+ setPrompt(prompt: string): void;
+ prompt(preserveCursor?: boolean): void;
+ question(query: string, callback: (answer: string) => void): void;
+ pause(): this;
+ resume(): this;
+ close(): void;
+ write(data: string | Buffer, key?: Key): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. line
+ * 3. pause
+ * 4. resume
+ * 5. SIGCONT
+ * 6. SIGINT
+ * 7. SIGTSTP
+ */
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "line", listener: (input: string) => void): this;
+ addListener(event: "pause", listener: () => void): this;
+ addListener(event: "resume", listener: () => void): this;
+ addListener(event: "SIGCONT", listener: () => void): this;
+ addListener(event: "SIGINT", listener: () => void): this;
+ addListener(event: "SIGTSTP", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "line", input: string): boolean;
+ emit(event: "pause"): boolean;
+ emit(event: "resume"): boolean;
+ emit(event: "SIGCONT"): boolean;
+ emit(event: "SIGINT"): boolean;
+ emit(event: "SIGTSTP"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "line", listener: (input: string) => void): this;
+ on(event: "pause", listener: () => void): this;
+ on(event: "resume", listener: () => void): this;
+ on(event: "SIGCONT", listener: () => void): this;
+ on(event: "SIGINT", listener: () => void): this;
+ on(event: "SIGTSTP", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "line", listener: (input: string) => void): this;
+ once(event: "pause", listener: () => void): this;
+ once(event: "resume", listener: () => void): this;
+ once(event: "SIGCONT", listener: () => void): this;
+ once(event: "SIGINT", listener: () => void): this;
+ once(event: "SIGTSTP", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "line", listener: (input: string) => void): this;
+ prependListener(event: "pause", listener: () => void): this;
+ prependListener(event: "resume", listener: () => void): this;
+ prependListener(event: "SIGCONT", listener: () => void): this;
+ prependListener(event: "SIGINT", listener: () => void): this;
+ prependListener(event: "SIGTSTP", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "line", listener: (input: string) => void): this;
+ prependOnceListener(event: "pause", listener: () => void): this;
+ prependOnceListener(event: "resume", listener: () => void): this;
+ prependOnceListener(event: "SIGCONT", listener: () => void): this;
+ prependOnceListener(event: "SIGINT", listener: () => void): this;
+ prependOnceListener(event: "SIGTSTP", listener: () => void): this;
+ }
+
+ type ReadLine = Interface; // type forwarded for backwards compatiblity
+
+ type Completer = (line: string) => CompleterResult;
+ type AsyncCompleter = (line: string, callback: (err: any, result: CompleterResult) => void) => any;
+
+ type CompleterResult = [string[], string];
+
+ interface ReadLineOptions {
+ input: NodeJS.ReadableStream;
+ output?: NodeJS.WritableStream;
+ completer?: Completer | AsyncCompleter;
+ terminal?: boolean;
+ historySize?: number;
+ prompt?: string;
+ crlfDelay?: number;
+ removeHistoryDuplicates?: boolean;
+ escapeCodeTimeout?: number;
+ }
+
+ function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ function createInterface(options: ReadLineOptions): Interface;
+
+ function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void;
+ function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void;
+ function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void;
+ function clearLine(stream: NodeJS.WritableStream, dir: number): void;
+ function clearScreenDown(stream: NodeJS.WritableStream): void;
+}
diff --git a/node_modules/electron/node_modules/@types/node/repl.d.ts b/node_modules/electron/node_modules/@types/node/repl.d.ts
new file mode 100644
index 0000000..0caf3db
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/repl.d.ts
@@ -0,0 +1,380 @@
+declare module "repl" {
+ import { Interface, Completer, AsyncCompleter } from "readline";
+ import { Context } from "vm";
+ import { InspectOptions } from "util";
+
+ interface ReplOptions {
+ /**
+ * The input prompt to display.
+ * Default: `"> "`
+ */
+ prompt?: string;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ * Default: `process.stdin`
+ */
+ input?: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ * Default: `process.stdout`
+ */
+ output?: NodeJS.WritableStream;
+ /**
+ * If `true`, specifies that the output should be treated as a TTY terminal, and have
+ * ANSI/VT100 escape codes written to it.
+ * Default: checking the value of the `isTTY` property on the output stream upon
+ * instantiation.
+ */
+ terminal?: boolean;
+ /**
+ * The function to be used when evaluating each given line of input.
+ * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
+ * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
+ * additional lines.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
+ */
+ eval?: REPLEval;
+ /**
+ * If `true`, specifies that the default `writer` function should include ANSI color
+ * styling to REPL output. If a custom `writer` function is provided then this has no
+ * effect.
+ * Default: the REPL instance's `terminal` value.
+ */
+ useColors?: boolean;
+ /**
+ * If `true`, specifies that the default evaluation function will use the JavaScript
+ * `global` as the context as opposed to creating a new separate context for the REPL
+ * instance. The node CLI REPL sets this value to `true`.
+ * Default: `false`.
+ */
+ useGlobal?: boolean;
+ /**
+ * If `true`, specifies that the default writer will not output the return value of a
+ * command if it evaluates to `undefined`.
+ * Default: `false`.
+ */
+ ignoreUndefined?: boolean;
+ /**
+ * The function to invoke to format the output of each command before writing to `output`.
+ * Default: a wrapper for `util.inspect`.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
+ */
+ writer?: REPLWriter;
+ /**
+ * An optional function used for custom Tab auto completion.
+ *
+ * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
+ */
+ completer?: Completer | AsyncCompleter;
+ /**
+ * A flag that specifies whether the default evaluator executes all JavaScript commands in
+ * strict mode or default (sloppy) mode.
+ * Accepted values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+ /**
+ * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
+ * pressed. This cannot be used together with a custom `eval` function.
+ * Default: `false`.
+ */
+ breakEvalOnSigint?: boolean;
+ }
+
+ type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
+ type REPLWriter = (this: REPLServer, obj: any) => string;
+
+ /**
+ * This is the default "writer" value, if none is passed in the REPL options,
+ * and it can be overridden by custom print functions.
+ */
+ const writer: REPLWriter & { options: InspectOptions };
+
+ type REPLCommandAction = (this: REPLServer, text: string) => void;
+
+ interface REPLCommand {
+ /**
+ * Help text to be displayed when `.help` is entered.
+ */
+ help?: string;
+ /**
+ * The function to execute, optionally accepting a single string argument.
+ */
+ action: REPLCommandAction;
+ }
+
+ /**
+ * Provides a customizable Read-Eval-Print-Loop (REPL).
+ *
+ * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those
+ * according to a user-defined evaluation function, then output the result. Input and output
+ * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`.
+ *
+ * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style
+ * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session
+ * state, error recovery, and customizable evaluation functions.
+ *
+ * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_
+ * be created directly using the JavaScript `new` keyword.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl
+ */
+ class REPLServer extends Interface {
+ /**
+ * The `vm.Context` provided to the `eval` function to be used for JavaScript
+ * evaluation.
+ */
+ readonly context: Context;
+ /**
+ * Outdated alias for `input`.
+ */
+ readonly inputStream: NodeJS.ReadableStream;
+ /**
+ * Outdated alias for `output`.
+ */
+ readonly outputStream: NodeJS.WritableStream;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ */
+ readonly input: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ */
+ readonly output: NodeJS.WritableStream;
+ /**
+ * The commands registered via `replServer.defineCommand()`.
+ */
+ readonly commands: { readonly [name: string]: REPLCommand | undefined };
+ /**
+ * A value indicating whether the REPL is currently in "editor mode".
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys
+ */
+ readonly editorMode: boolean;
+ /**
+ * A value indicating whether the `_` variable has been assigned.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreAssigned: boolean;
+ /**
+ * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly last: any;
+ /**
+ * A value indicating whether the `_error` variable has been assigned.
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreErrAssigned: boolean;
+ /**
+ * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly lastError: any;
+ /**
+ * Specified in the REPL options, this is the function to be used when evaluating each
+ * given line of input. If not specified in the REPL options, this is an async wrapper
+ * for the JavaScript `eval()` function.
+ */
+ readonly eval: REPLEval;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default
+ * `writer` function should include ANSI color styling to REPL output.
+ */
+ readonly useColors: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `eval`
+ * function will use the JavaScript `global` as the context as opposed to creating a new
+ * separate context for the REPL instance.
+ */
+ readonly useGlobal: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `writer`
+ * function should output the result of a command if it evaluates to `undefined`.
+ */
+ readonly ignoreUndefined: boolean;
+ /**
+ * Specified in the REPL options, this is the function to invoke to format the output of
+ * each command before writing to `outputStream`. If not specified in the REPL options,
+ * this will be a wrapper for `util.inspect`.
+ */
+ readonly writer: REPLWriter;
+ /**
+ * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
+ */
+ readonly completer: Completer | AsyncCompleter;
+ /**
+ * Specified in the REPL options, this is a flag that specifies whether the default `eval`
+ * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
+ * Possible values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
+ * > _should not_ be created directly using the JavaScript `new` keyword.
+ *
+ * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver
+ */
+ private constructor();
+
+ /**
+ * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked
+ * by typing a `.` followed by the `keyword`.
+ *
+ * @param keyword The command keyword (_without_ a leading `.` character).
+ * @param cmd The function to invoke when the command is processed.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd
+ */
+ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
+ /**
+ * Readies the REPL instance for input from the user, printing the configured `prompt` to a
+ * new line in the `output` and resuming the `input` to accept new input.
+ *
+ * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'.
+ *
+ * This method is primarily intended to be called from within the action function for
+ * commands registered using the `replServer.defineCommand()` method.
+ *
+ * @param preserveCursor When `true`, the cursor placement will not be reset to `0`.
+ */
+ displayPrompt(preserveCursor?: boolean): void;
+ /**
+ * Clears any command that has been buffered but not yet executed.
+ *
+ * This method is primarily intended to be called from within the action function for
+ * commands registered using the `replServer.defineCommand()` method.
+ *
+ * @since v9.0.0
+ */
+ clearBufferedCommand(): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close - inherited from `readline.Interface`
+ * 2. line - inherited from `readline.Interface`
+ * 3. pause - inherited from `readline.Interface`
+ * 4. resume - inherited from `readline.Interface`
+ * 5. SIGCONT - inherited from `readline.Interface`
+ * 6. SIGINT - inherited from `readline.Interface`
+ * 7. SIGTSTP - inherited from `readline.Interface`
+ * 8. exit
+ * 9. reset
+ */
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "line", listener: (input: string) => void): this;
+ addListener(event: "pause", listener: () => void): this;
+ addListener(event: "resume", listener: () => void): this;
+ addListener(event: "SIGCONT", listener: () => void): this;
+ addListener(event: "SIGINT", listener: () => void): this;
+ addListener(event: "SIGTSTP", listener: () => void): this;
+ addListener(event: "exit", listener: () => void): this;
+ addListener(event: "reset", listener: (context: Context) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "line", input: string): boolean;
+ emit(event: "pause"): boolean;
+ emit(event: "resume"): boolean;
+ emit(event: "SIGCONT"): boolean;
+ emit(event: "SIGINT"): boolean;
+ emit(event: "SIGTSTP"): boolean;
+ emit(event: "exit"): boolean;
+ emit(event: "reset", context: Context): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "line", listener: (input: string) => void): this;
+ on(event: "pause", listener: () => void): this;
+ on(event: "resume", listener: () => void): this;
+ on(event: "SIGCONT", listener: () => void): this;
+ on(event: "SIGINT", listener: () => void): this;
+ on(event: "SIGTSTP", listener: () => void): this;
+ on(event: "exit", listener: () => void): this;
+ on(event: "reset", listener: (context: Context) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "line", listener: (input: string) => void): this;
+ once(event: "pause", listener: () => void): this;
+ once(event: "resume", listener: () => void): this;
+ once(event: "SIGCONT", listener: () => void): this;
+ once(event: "SIGINT", listener: () => void): this;
+ once(event: "SIGTSTP", listener: () => void): this;
+ once(event: "exit", listener: () => void): this;
+ once(event: "reset", listener: (context: Context) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "line", listener: (input: string) => void): this;
+ prependListener(event: "pause", listener: () => void): this;
+ prependListener(event: "resume", listener: () => void): this;
+ prependListener(event: "SIGCONT", listener: () => void): this;
+ prependListener(event: "SIGINT", listener: () => void): this;
+ prependListener(event: "SIGTSTP", listener: () => void): this;
+ prependListener(event: "exit", listener: () => void): this;
+ prependListener(event: "reset", listener: (context: Context) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "line", listener: (input: string) => void): this;
+ prependOnceListener(event: "pause", listener: () => void): this;
+ prependOnceListener(event: "resume", listener: () => void): this;
+ prependOnceListener(event: "SIGCONT", listener: () => void): this;
+ prependOnceListener(event: "SIGINT", listener: () => void): this;
+ prependOnceListener(event: "SIGTSTP", listener: () => void): this;
+ prependOnceListener(event: "exit", listener: () => void): this;
+ prependOnceListener(event: "reset", listener: (context: Context) => void): this;
+ }
+
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
+ */
+ export const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol
+
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in strict mode.
+ * This is equivalent to prefacing every repl statement with `'use strict'`.
+ */
+ export const REPL_MODE_STRICT: symbol; // TODO: unique symbol
+
+ /**
+ * Creates and starts a `repl.REPLServer` instance.
+ *
+ * @param options The options for the `REPLServer`. If `options` is a string, then it specifies
+ * the input prompt.
+ */
+ function start(options?: string | ReplOptions): REPLServer;
+
+ /**
+ * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors
+ */
+ class Recoverable extends SyntaxError {
+ err: Error;
+
+ constructor(err: Error);
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/stream.d.ts b/node_modules/electron/node_modules/@types/node/stream.d.ts
new file mode 100644
index 0000000..0eff191
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/stream.d.ts
@@ -0,0 +1,313 @@
+declare module 'stream' {
+ import EventEmitter = require('events');
+
+ class internal extends EventEmitter {
+ pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
+ }
+
+ namespace internal {
+ class Stream extends internal { }
+
+ interface ReadableOptions {
+ highWaterMark?: number;
+ encoding?: string;
+ objectMode?: boolean;
+ read?(this: Readable, size: number): void;
+ destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void;
+ }
+
+ class Readable extends Stream implements NodeJS.ReadableStream {
+ readable: boolean;
+ readonly readableFlowing: boolean | null;
+ readonly readableHighWaterMark: number;
+ readonly readableLength: number;
+ constructor(opts?: ReadableOptions);
+ _read(size: number): void;
+ read(size?: number): any;
+ setEncoding(encoding: string): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ unpipe(destination?: NodeJS.WritableStream): this;
+ unshift(chunk: any): void;
+ wrap(oldStream: NodeJS.ReadableStream): this;
+ push(chunk: any, encoding?: string): boolean;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ destroy(error?: Error): void;
+
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. end
+ * 4. readable
+ * 5. error
+ */
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "data", listener: (chunk: any) => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "readable", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "data", chunk: any): boolean;
+ emit(event: "end"): boolean;
+ emit(event: "readable"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "data", listener: (chunk: any) => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "readable", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "data", listener: (chunk: any) => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "readable", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "data", listener: (chunk: any) => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "readable", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (chunk: any) => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "readable", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: () => void): this;
+ removeListener(event: "data", listener: (chunk: any) => void): this;
+ removeListener(event: "end", listener: () => void): this;
+ removeListener(event: "readable", listener: () => void): this;
+ removeListener(event: "error", listener: (err: Error) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
+ }
+
+ interface WritableOptions {
+ highWaterMark?: number;
+ decodeStrings?: boolean;
+ objectMode?: boolean;
+ write?(this: Writable, chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
+ writev?(this: Writable, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
+ destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
+ }
+
+ class Writable extends Stream implements NodeJS.WritableStream {
+ writable: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ constructor(opts?: WritableOptions);
+ _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
+ _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: string): this;
+ end(cb?: () => void): void;
+ end(chunk: any, cb?: () => void): void;
+ end(chunk: any, encoding?: string, cb?: () => void): void;
+ cork(): void;
+ uncork(): void;
+ destroy(error?: Error): void;
+
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. drain
+ * 3. error
+ * 4. finish
+ * 5. pipe
+ * 6. unpipe
+ */
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "finish", listener: () => void): this;
+ addListener(event: "pipe", listener: (src: Readable) => void): this;
+ addListener(event: "unpipe", listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "finish"): boolean;
+ emit(event: "pipe", src: Readable): boolean;
+ emit(event: "unpipe", src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "finish", listener: () => void): this;
+ on(event: "pipe", listener: (src: Readable) => void): this;
+ on(event: "unpipe", listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "finish", listener: () => void): this;
+ once(event: "pipe", listener: (src: Readable) => void): this;
+ once(event: "unpipe", listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "finish", listener: () => void): this;
+ prependListener(event: "pipe", listener: (src: Readable) => void): this;
+ prependListener(event: "unpipe", listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "finish", listener: () => void): this;
+ prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
+ prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: () => void): this;
+ removeListener(event: "drain", listener: () => void): this;
+ removeListener(event: "error", listener: (err: Error) => void): this;
+ removeListener(event: "finish", listener: () => void): this;
+ removeListener(event: "pipe", listener: (src: Readable) => void): this;
+ removeListener(event: "unpipe", listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ interface DuplexOptions extends ReadableOptions, WritableOptions {
+ allowHalfOpen?: boolean;
+ readableObjectMode?: boolean;
+ writableObjectMode?: boolean;
+ readableHighWaterMark?: number;
+ writableHighWaterMark?: number;
+ read?(this: Duplex, size: number): void;
+ write?(this: Duplex, chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
+ writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
+ }
+
+ // Note: Duplex extends both Readable and Writable.
+ class Duplex extends Readable implements Writable {
+ writable: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ constructor(opts?: DuplexOptions);
+ _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
+ _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: string): this;
+ end(cb?: () => void): void;
+ end(chunk: any, cb?: () => void): void;
+ end(chunk: any, encoding?: string, cb?: () => void): void;
+ cork(): void;
+ uncork(): void;
+ }
+
+ type TransformCallback = (error?: Error, data?: any) => void;
+
+ interface TransformOptions extends DuplexOptions {
+ read?(this: Transform, size: number): void;
+ write?(this: Transform, chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
+ writev?(this: Transform, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
+ transform?(this: Transform, chunk: any, encoding: string, callback: TransformCallback): void;
+ flush?(this: Transform, callback: TransformCallback): void;
+ }
+
+ class Transform extends Duplex {
+ constructor(opts?: TransformOptions);
+ _transform(chunk: any, encoding: string, callback: TransformCallback): void;
+ _flush(callback: TransformCallback): void;
+ }
+
+ class PassThrough extends Transform { }
+
+ interface FinishedOptions {
+ error?: boolean;
+ readable?: boolean;
+ writable?: boolean;
+ }
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ namespace finished {
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ }
+
+ function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
+ function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
+ function pipeline<T extends NodeJS.WritableStream>(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream,
+ stream3: NodeJS.ReadWriteStream,
+ stream4: T,
+ callback?: (err: NodeJS.ErrnoException | null) => void,
+ ): T;
+ function pipeline<T extends NodeJS.WritableStream>(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream,
+ stream3: NodeJS.ReadWriteStream,
+ stream4: NodeJS.ReadWriteStream,
+ stream5: T,
+ callback?: (err: NodeJS.ErrnoException | null) => void,
+ ): T;
+ function pipeline(
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
+ callback?: (err: NodeJS.ErrnoException | null) => void,
+ ): NodeJS.WritableStream;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>,
+ ): NodeJS.WritableStream;
+ namespace pipeline {
+ function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise<void>;
+ function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise<void>;
+ function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream,
+ stream3: NodeJS.ReadWriteStream,
+ stream4: NodeJS.ReadWriteStream,
+ stream5: NodeJS.WritableStream,
+ ): Promise<void>;
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream>,
+ ): Promise<void>;
+ }
+
+ interface Pipe {
+ close(): void;
+ hasRef(): boolean;
+ ref(): void;
+ unref(): void;
+ }
+ }
+
+ export = internal;
+}
diff --git a/node_modules/electron/node_modules/@types/node/string_decoder.d.ts b/node_modules/electron/node_modules/@types/node/string_decoder.d.ts
new file mode 100644
index 0000000..762a4d8
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/string_decoder.d.ts
@@ -0,0 +1,9 @@
+declare module "string_decoder" {
+ interface NodeStringDecoder {
+ write(buffer: Buffer): string;
+ end(buffer?: Buffer): string;
+ }
+ const StringDecoder: {
+ new(encoding?: string): NodeStringDecoder;
+ };
+}
diff --git a/node_modules/electron/node_modules/@types/node/timers.d.ts b/node_modules/electron/node_modules/@types/node/timers.d.ts
new file mode 100644
index 0000000..e64a673
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/timers.d.ts
@@ -0,0 +1,16 @@
+declare module "timers" {
+ function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
+ namespace setTimeout {
+ function __promisify__(ms: number): Promise<void>;
+ function __promisify__<T>(ms: number, value: T): Promise<T>;
+ }
+ function clearTimeout(timeoutId: NodeJS.Timeout): void;
+ function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
+ function clearInterval(intervalId: NodeJS.Timeout): void;
+ function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
+ namespace setImmediate {
+ function __promisify__(): Promise<void>;
+ function __promisify__<T>(value: T): Promise<T>;
+ }
+ function clearImmediate(immediateId: NodeJS.Immediate): void;
+}
diff --git a/node_modules/electron/node_modules/@types/node/tls.d.ts b/node_modules/electron/node_modules/@types/node/tls.d.ts
new file mode 100644
index 0000000..940332c
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/tls.d.ts
@@ -0,0 +1,459 @@
+declare module "tls" {
+ import * as crypto from "crypto";
+ import * as dns from "dns";
+ import * as net from "net";
+ import * as stream from "stream";
+
+ const CLIENT_RENEG_LIMIT: number;
+ const CLIENT_RENEG_WINDOW: number;
+
+ interface Certificate {
+ /**
+ * Country code.
+ */
+ C: string;
+ /**
+ * Street.
+ */
+ ST: string;
+ /**
+ * Locality.
+ */
+ L: string;
+ /**
+ * Organization.
+ */
+ O: string;
+ /**
+ * Organizational unit.
+ */
+ OU: string;
+ /**
+ * Common name.
+ */
+ CN: string;
+ }
+
+ interface PeerCertificate {
+ subject: Certificate;
+ issuer: Certificate;
+ subjectaltname: string;
+ infoAccess: { [index: string]: string[] | undefined };
+ modulus: string;
+ exponent: string;
+ valid_from: string;
+ valid_to: string;
+ fingerprint: string;
+ fingerprint256: string;
+ ext_key_usage: string[];
+ serialNumber: string;
+ raw: Buffer;
+ }
+
+ interface DetailedPeerCertificate extends PeerCertificate {
+ issuerCertificate: DetailedPeerCertificate;
+ }
+
+ interface CipherNameAndProtocol {
+ /**
+ * The cipher name.
+ */
+ name: string;
+ /**
+ * SSL/TLS protocol version.
+ */
+ version: string;
+ }
+
+ interface EphemeralKeyInfo {
+ /**
+ * The supported types are 'DH' and 'ECDH'.
+ */
+ type: string;
+ /**
+ * The name property is available only when type is 'ECDH'.
+ */
+ name?: string;
+ /**
+ * The size of parameter of an ephemeral key exchange.
+ */
+ size: number;
+ }
+
+ class TLSSocket extends net.Socket {
+ /**
+ * Construct a new tls.TLSSocket object from an existing TCP socket.
+ */
+ constructor(socket: net.Socket, options?: {
+ /**
+ * An optional TLS context object from tls.createSecureContext()
+ */
+ secureContext?: SecureContext,
+ /**
+ * If true the TLS socket will be instantiated in server-mode.
+ * Defaults to false.
+ */
+ isServer?: boolean,
+ /**
+ * An optional net.Server instance.
+ */
+ server?: net.Server,
+ /**
+ * If true the server will request a certificate from clients that
+ * connect and attempt to verify that certificate. Defaults to
+ * false.
+ */
+ requestCert?: boolean,
+ /**
+ * If true the server will reject any connection which is not
+ * authorized with the list of supplied CAs. This option only has an
+ * effect if requestCert is true. Defaults to false.
+ */
+ rejectUnauthorized?: boolean,
+ /**
+ * An array of strings or a Buffer naming possible NPN protocols.
+ * (Protocols should be ordered by their priority.)
+ */
+ NPNProtocols?: ReadonlyArray<string> | ReadonlyArray<Buffer> | ReadonlyArray<Uint8Array> | Buffer | Uint8Array,
+ /**
+ * An array of strings or a Buffer naming possible ALPN protocols.
+ * (Protocols should be ordered by their priority.) When the server
+ * receives both NPN and ALPN extensions from the client, ALPN takes
+ * precedence over NPN and the server does not send an NPN extension
+ * to the client.
+ */
+ ALPNProtocols?: ReadonlyArray<string> | ReadonlyArray<Buffer> | ReadonlyArray<Uint8Array> | Buffer | Uint8Array,
+ /**
+ * SNICallback(servername, cb) <Function> A function that will be
+ * called if the client supports SNI TLS extension. Two arguments
+ * will be passed when called: servername and cb. SNICallback should
+ * invoke cb(null, ctx), where ctx is a SecureContext instance.
+ * (tls.createSecureContext(...) can be used to get a proper
+ * SecureContext.) If SNICallback wasn't provided the default callback
+ * with high-level API will be used (see below).
+ */
+ SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void,
+ /**
+ * An optional Buffer instance containing a TLS session.
+ */
+ session?: Buffer,
+ /**
+ * If true, specifies that the OCSP status request extension will be
+ * added to the client hello and an 'OCSPResponse' event will be
+ * emitted on the socket before establishing a secure communication
+ */
+ requestOCSP?: boolean
+ });
+
+ /**
+ * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false.
+ */
+ authorized: boolean;
+ /**
+ * The reason why the peer's certificate has not been verified.
+ * This property becomes available only when tlsSocket.authorized === false.
+ */
+ authorizationError: Error;
+ /**
+ * Static boolean value, always true.
+ * May be used to distinguish TLS sockets from regular ones.
+ */
+ encrypted: boolean;
+
+ /**
+ * String containing the selected ALPN protocol.
+ * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.
+ */
+ alpnProtocol?: string;
+
+ /**
+ * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.
+ * @returns Returns an object representing the cipher name
+ * and the SSL/TLS protocol version of the current connection.
+ */
+ getCipher(): CipherNameAndProtocol;
+ /**
+ * Returns an object representing the type, name, and size of parameter
+ * of an ephemeral key exchange in Perfect Forward Secrecy on a client
+ * connection. It returns an empty object when the key exchange is not
+ * ephemeral. As this is only supported on a client socket; null is
+ * returned if called on a server socket. The supported types are 'DH'
+ * and 'ECDH'. The name property is available only when type is 'ECDH'.
+ *
+ * For example: { type: 'ECDH', name: 'prime256v1', size: 256 }.
+ */
+ getEphemeralKeyInfo(): EphemeralKeyInfo | object | null;
+ /**
+ * Returns the latest Finished message that has
+ * been sent to the socket as part of a SSL/TLS handshake, or undefined
+ * if no Finished message has been sent yet.
+ *
+ * As the Finished messages are message digests of the complete
+ * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
+ * 3.0), they can be used for external authentication procedures when
+ * the authentication provided by SSL/TLS is not desired or is not
+ * enough.
+ *
+ * Corresponds to the SSL_get_finished routine in OpenSSL and may be
+ * used to implement the tls-unique channel binding from RFC 5929.
+ */
+ getFinished(): Buffer | undefined;
+ /**
+ * Returns an object representing the peer's certificate.
+ * The returned object has some properties corresponding to the field of the certificate.
+ * If detailed argument is true the full chain with issuer property will be returned,
+ * if false only the top certificate without issuer property.
+ * If the peer does not provide a certificate, it returns null or an empty object.
+ * @param detailed - If true; the full chain with issuer property will be returned.
+ * @returns An object representing the peer's certificate.
+ */
+ getPeerCertificate(detailed: true): DetailedPeerCertificate;
+ getPeerCertificate(detailed?: false): PeerCertificate;
+ getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
+ /**
+ * Returns the latest Finished message that is expected or has actually
+ * been received from the socket as part of a SSL/TLS handshake, or
+ * undefined if there is no Finished message so far.
+ *
+ * As the Finished messages are message digests of the complete
+ * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
+ * 3.0), they can be used for external authentication procedures when
+ * the authentication provided by SSL/TLS is not desired or is not
+ * enough.
+ *
+ * Corresponds to the SSL_get_peer_finished routine in OpenSSL and may
+ * be used to implement the tls-unique channel binding from RFC 5929.
+ */
+ getPeerFinished(): Buffer | undefined;
+ /**
+ * Returns a string containing the negotiated SSL/TLS protocol version of the current connection.
+ * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process.
+ * The value `null` will be returned for server sockets or disconnected client sockets.
+ * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information.
+ * @returns negotiated SSL/TLS protocol version of the current connection
+ */
+ getProtocol(): string | null;
+ /**
+ * Could be used to speed up handshake establishment when reconnecting to the server.
+ * @returns ASN.1 encoded TLS session or undefined if none was negotiated.
+ */
+ getSession(): any;
+ /**
+ * NOTE: Works only with client TLS sockets.
+ * Useful only for debugging, for session reuse provide session option to tls.connect().
+ * @returns TLS session ticket or undefined if none was negotiated.
+ */
+ getTLSTicket(): any;
+ /**
+ * Returns true if the session was reused, false otherwise.
+ */
+ isSessionReused(): boolean;
+ /**
+ * Initiate TLS renegotiation process.
+ *
+ * NOTE: Can be used to request peer's certificate after the secure connection has been established.
+ * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout.
+ * @param options - The options may contain the following fields: rejectUnauthorized,
+ * requestCert (See tls.createServer() for details).
+ * @param callback - callback(err) will be executed with null as err, once the renegotiation
+ * is successfully completed.
+ */
+ renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): any;
+ /**
+ * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
+ * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
+ * the TLS layer until the entire fragment is received and its integrity is verified;
+ * large fragments can span multiple roundtrips, and their processing can be delayed due to packet
+ * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead,
+ * which may decrease overall server throughput.
+ * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512).
+ * @returns Returns true on success, false otherwise.
+ */
+ setMaxSendFragment(size: number): boolean;
+
+ /**
+ * Disables TLS renegotiation for this TLSSocket instance. Once called,
+ * attempts to renegotiate will trigger an 'error' event on the
+ * TLSSocket.
+ */
+ disableRenegotiation(): void;
+
+ /**
+ * events.EventEmitter
+ * 1. OCSPResponse
+ * 2. secureConnect
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ addListener(event: "secureConnect", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "OCSPResponse", response: Buffer): boolean;
+ emit(event: "secureConnect"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ on(event: "secureConnect", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ once(event: "secureConnect", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ prependListener(event: "secureConnect", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ prependOnceListener(event: "secureConnect", listener: () => void): this;
+ }
+
+ interface TlsOptions extends SecureContextOptions {
+ handshakeTimeout?: number;
+ requestCert?: boolean;
+ rejectUnauthorized?: boolean;
+ NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
+ ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
+ SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
+ sessionTimeout?: number;
+ ticketKeys?: Buffer;
+ }
+
+ interface ConnectionOptions extends SecureContextOptions {
+ host?: string;
+ port?: number;
+ path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
+ socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
+ rejectUnauthorized?: boolean; // Defaults to true
+ NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
+ ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
+ checkServerIdentity?: typeof checkServerIdentity;
+ servername?: string; // SNI TLS Extension
+ session?: Buffer;
+ minDHSize?: number;
+ secureContext?: SecureContext; // If not provided, the entire ConnectionOptions object will be passed to tls.createSecureContext()
+ lookup?: net.LookupFunction;
+ }
+
+ class Server extends net.Server {
+ /**
+ * The server.addContext() method adds a secure context that will be
+ * used if the client request's SNI name matches the supplied hostname
+ * (or wildcard).
+ */
+ addContext(hostName: string, credentials: {
+ key: string;
+ cert: string;
+ ca: string;
+ }): void;
+ /**
+ * Returns the session ticket keys.
+ */
+ getTicketKeys(): Buffer;
+ /**
+ * The server.setSecureContext() method replaces the secure context of
+ * an existing server. Existing connections to the server are not
+ * interrupted.
+ */
+ setTicketKeys(keys: Buffer): void;
+
+ /**
+ * events.EventEmitter
+ * 1. tlsClientError
+ * 2. newSession
+ * 3. OCSPRequest
+ * 4. resumeSession
+ * 5. secureConnection
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ addListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this;
+ addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this;
+ addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this;
+ addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
+ emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean;
+ emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean;
+ emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean;
+ emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ on(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this;
+ on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this;
+ on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this;
+ on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ once(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this;
+ once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this;
+ once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this;
+ once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this;
+ prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this;
+ prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this;
+ prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this;
+ prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+ }
+
+ interface SecurePair {
+ encrypted: any;
+ cleartext: any;
+ }
+
+ interface SecureContextOptions {
+ pfx?: string | Buffer | Array<string | Buffer | Object>;
+ key?: string | Buffer | Array<Buffer | Object>;
+ passphrase?: string;
+ cert?: string | Buffer | Array<string | Buffer>;
+ ca?: string | Buffer | Array<string | Buffer>;
+ ciphers?: string;
+ honorCipherOrder?: boolean;
+ ecdhCurve?: string;
+ clientCertEngine?: string;
+ crl?: string | Buffer | Array<string | Buffer>;
+ dhparam?: string | Buffer;
+ secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options
+ secureProtocol?: string; // SSL Method, e.g. SSLv23_method
+ sessionIdContext?: string;
+ }
+
+ interface SecureContext {
+ context: any;
+ }
+
+ /*
+ * Verifies the certificate `cert` is issued to host `host`.
+ * @host The hostname to verify the certificate against
+ * @cert PeerCertificate representing the peer's certificate
+ *
+ * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined.
+ */
+ function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined;
+ function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
+ function createSecureContext(options?: SecureContextOptions): SecureContext;
+ function getCiphers(): string[];
+
+ /**
+ * The default curve name to use for ECDH key agreement in a tls server.
+ * The default value is 'auto'. See tls.createSecureContext() for further
+ * information.
+ */
+ let DEFAULT_ECDH_CURVE: string;
+}
diff --git a/node_modules/electron/node_modules/@types/node/trace_events.d.ts b/node_modules/electron/node_modules/@types/node/trace_events.d.ts
new file mode 100644
index 0000000..9d1a59b
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/trace_events.d.ts
@@ -0,0 +1,61 @@
+declare module "trace_events" {
+ /**
+ * The `Tracing` object is used to enable or disable tracing for sets of
+ * categories. Instances are created using the
+ * `trace_events.createTracing()` method.
+ *
+ * When created, the `Tracing` object is disabled. Calling the
+ * `tracing.enable()` method adds the categories to the set of enabled trace
+ * event categories. Calling `tracing.disable()` will remove the categories
+ * from the set of enabled trace event categories.
+ */
+ export interface Tracing {
+ /**
+ * A comma-separated list of the trace event categories covered by this
+ * `Tracing` object.
+ */
+ readonly categories: string;
+
+ /**
+ * Disables this `Tracing` object.
+ *
+ * Only trace event categories _not_ covered by other enabled `Tracing`
+ * objects and _not_ specified by the `--trace-event-categories` flag
+ * will be disabled.
+ */
+ disable(): void;
+
+ /**
+ * Enables this `Tracing` object for the set of categories covered by
+ * the `Tracing` object.
+ */
+ enable(): void;
+
+ /**
+ * `true` only if the `Tracing` object has been enabled.
+ */
+ readonly enabled: boolean;
+ }
+
+ interface CreateTracingOptions {
+ /**
+ * An array of trace category names. Values included in the array are
+ * coerced to a string when possible. An error will be thrown if the
+ * value cannot be coerced.
+ */
+ categories: string[];
+ }
+
+ /**
+ * Creates and returns a Tracing object for the given set of categories.
+ */
+ export function createTracing(options: CreateTracingOptions): Tracing;
+
+ /**
+ * Returns a comma-separated list of all currently-enabled trace event
+ * categories. The current set of enabled trace event categories is
+ * determined by the union of all currently-enabled `Tracing` objects and
+ * any categories enabled using the `--trace-event-categories` flag.
+ */
+ export function getEnabledCategories(): string;
+}
diff --git a/node_modules/electron/node_modules/@types/node/ts3.6/assert.d.ts b/node_modules/electron/node_modules/@types/node/ts3.6/assert.d.ts
new file mode 100644
index 0000000..3a30d5f
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/ts3.6/assert.d.ts
@@ -0,0 +1,73 @@
+declare module 'assert' {
+ function assert(value: any, message?: string | Error): void;
+ namespace assert {
+ class AssertionError implements Error {
+ name: string;
+ message: string;
+ actual: any;
+ expected: any;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+
+ constructor(options?: {
+ message?: string;
+ actual?: any;
+ expected?: any;
+ operator?: string;
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function;
+ });
+ }
+
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
+
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: any,
+ expected: any,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function,
+ ): never;
+ function ok(value: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use strictEqual() instead. */
+ function equal(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
+ function notEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
+ function deepEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
+ function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
+ function strictEqual(actual: any, expected: any, message?: string | Error): void;
+ function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
+ function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
+ function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
+
+ function throws(block: () => any, message?: string | Error): void;
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
+ function doesNotThrow(block: () => any, message?: string | Error): void;
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
+
+ function ifError(value: any): void;
+
+ function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function rejects(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+ function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function doesNotReject(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+
+ const strict: typeof assert;
+ }
+
+ export = assert;
+}
diff --git a/node_modules/electron/node_modules/@types/node/ts3.6/base.d.ts b/node_modules/electron/node_modules/@types/node/ts3.6/base.d.ts
new file mode 100644
index 0000000..7811900
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/ts3.6/base.d.ts
@@ -0,0 +1,54 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.2.
+
+// NOTE: TypeScript version-specific augmentations can be found in the following paths:
+// - ~/base.d.ts - Shared definitions common to all TypeScript versions
+// - ~/index.d.ts - Definitions specific to TypeScript 2.1
+// - ~/ts3.2/base.d.ts - Definitions specific to TypeScript 3.2
+// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 with assert pulled in
+
+// Reference required types from the default lib:
+/// <reference lib="es2018" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// base definitions for all NodeJS modules that are not specific to any version of TypeScript
+/// <reference path="../globals.d.ts" />
+/// <reference path="../async_hooks.d.ts" />
+/// <reference path="../buffer.d.ts" />
+/// <reference path="../child_process.d.ts" />
+/// <reference path="../cluster.d.ts" />
+/// <reference path="../console.d.ts" />
+/// <reference path="../constants.d.ts" />
+/// <reference path="../crypto.d.ts" />
+/// <reference path="../dgram.d.ts" />
+/// <reference path="../dns.d.ts" />
+/// <reference path="../domain.d.ts" />
+/// <reference path="../events.d.ts" />
+/// <reference path="../fs.d.ts" />
+/// <reference path="../http.d.ts" />
+/// <reference path="../http2.d.ts" />
+/// <reference path="../https.d.ts" />
+/// <reference path="../inspector.d.ts" />
+/// <reference path="../module.d.ts" />
+/// <reference path="../net.d.ts" />
+/// <reference path="../os.d.ts" />
+/// <reference path="../path.d.ts" />
+/// <reference path="../perf_hooks.d.ts" />
+/// <reference path="../process.d.ts" />
+/// <reference path="../punycode.d.ts" />
+/// <reference path="../querystring.d.ts" />
+/// <reference path="../readline.d.ts" />
+/// <reference path="../repl.d.ts" />
+/// <reference path="../stream.d.ts" />
+/// <reference path="../string_decoder.d.ts" />
+/// <reference path="../timers.d.ts" />
+/// <reference path="../tls.d.ts" />
+/// <reference path="../trace_events.d.ts" />
+/// <reference path="../tty.d.ts" />
+/// <reference path="../url.d.ts" />
+/// <reference path="../util.d.ts" />
+/// <reference path="../v8.d.ts" />
+/// <reference path="../vm.d.ts" />
+/// <reference path="../worker_threads.d.ts" />
+/// <reference path="../zlib.d.ts" />
diff --git a/node_modules/electron/node_modules/@types/node/ts3.6/index.d.ts b/node_modules/electron/node_modules/@types/node/ts3.6/index.d.ts
new file mode 100644
index 0000000..bc0357f
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/ts3.6/index.d.ts
@@ -0,0 +1,6 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.2.
+// This is required to enable typing assert in ts3.7 without causing errors
+// Typically type modifications should be made in base.d.ts instead of here
+
+/// <reference path="base.d.ts" />
+/// <reference path="assert.d.ts" />
diff --git a/node_modules/electron/node_modules/@types/node/tty.d.ts b/node_modules/electron/node_modules/@types/node/tty.d.ts
new file mode 100644
index 0000000..55c0c36
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/tty.d.ts
@@ -0,0 +1,17 @@
+declare module "tty" {
+ import * as net from "net";
+
+ function isatty(fd: number): boolean;
+ class ReadStream extends net.Socket {
+ constructor(fd: number, options?: net.SocketConstructorOpts);
+ isRaw: boolean;
+ setRawMode(mode: boolean): this;
+ isTTY: boolean;
+ }
+ class WriteStream extends net.Socket {
+ constructor(fd: number);
+ columns: number;
+ rows: number;
+ isTTY: boolean;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/url.d.ts b/node_modules/electron/node_modules/@types/node/url.d.ts
new file mode 100644
index 0000000..9d1af9e
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/url.d.ts
@@ -0,0 +1,104 @@
+declare module "url" {
+ import { ParsedUrlQuery } from 'querystring';
+
+ interface UrlObjectCommon {
+ auth?: string;
+ hash?: string;
+ host?: string;
+ hostname?: string;
+ href?: string;
+ pathname?: string;
+ protocol?: string;
+ search?: string;
+ slashes?: boolean;
+ }
+
+ // Input to `url.format`
+ interface UrlObject extends UrlObjectCommon {
+ port?: string | number;
+ query?: string | null | { [key: string]: any };
+ }
+
+ // Output of `url.parse`
+ interface Url extends UrlObjectCommon {
+ port?: string;
+ query?: string | null | ParsedUrlQuery;
+ path?: string;
+ }
+
+ interface UrlWithParsedQuery extends Url {
+ query: ParsedUrlQuery;
+ }
+
+ interface UrlWithStringQuery extends Url {
+ query: string | null;
+ }
+
+ function parse(urlStr: string): UrlWithStringQuery;
+ function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
+ function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
+ function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
+
+ function format(URL: URL, options?: URLFormatOptions): string;
+ function format(urlObject: UrlObject | string): string;
+ function resolve(from: string, to: string): string;
+
+ function domainToASCII(domain: string): string;
+ function domainToUnicode(domain: string): string;
+
+ /**
+ * This function ensures the correct decodings of percent-encoded characters as
+ * well as ensuring a cross-platform valid absolute path string.
+ * @param url The file URL string or URL object to convert to a path.
+ */
+ function fileURLToPath(url: string | URL): string;
+
+ /**
+ * This function ensures that path is resolved absolutely, and that the URL
+ * control characters are correctly encoded when converting into a File URL.
+ * @param url The path to convert to a File URL.
+ */
+ function pathToFileURL(url: string): URL;
+
+ interface URLFormatOptions {
+ auth?: boolean;
+ fragment?: boolean;
+ search?: boolean;
+ unicode?: boolean;
+ }
+
+ class URL {
+ constructor(input: string, base?: string | URL);
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ readonly searchParams: URLSearchParams;
+ username: string;
+ toString(): string;
+ toJSON(): string;
+ }
+
+ class URLSearchParams implements Iterable<[string, string]> {
+ constructor(init?: URLSearchParams | string | { [key: string]: string | ReadonlyArray<string> | undefined } | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ entries(): IterableIterator<[string, string]>;
+ forEach(callback: (value: string, name: string, searchParams: this) => void): void;
+ get(name: string): string | null;
+ getAll(name: string): string[];
+ has(name: string): boolean;
+ keys(): IterableIterator<string>;
+ set(name: string, value: string): void;
+ sort(): void;
+ toString(): string;
+ values(): IterableIterator<string>;
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/util.d.ts b/node_modules/electron/node_modules/@types/node/util.d.ts
new file mode 100644
index 0000000..2432e97
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/util.d.ts
@@ -0,0 +1,187 @@
+declare module "util" {
+ interface InspectOptions extends NodeJS.InspectOptions { }
+ function format(format: any, ...param: any[]): string;
+ function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string;
+ /** @deprecated since v0.11.3 - use `console.error()` instead. */
+ function debug(string: string): void;
+ /** @deprecated since v0.11.3 - use `console.error()` instead. */
+ function error(...param: any[]): void;
+ /** @deprecated since v0.11.3 - use `console.log()` instead. */
+ function puts(...param: any[]): void;
+ /** @deprecated since v0.11.3 - use `console.log()` instead. */
+ function print(...param: any[]): void;
+ /** @deprecated since v0.11.3 - use a third party module instead. */
+ function log(string: string): void;
+ function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
+ function inspect(object: any, options: InspectOptions): string;
+ namespace inspect {
+ let colors: {
+ [color: string]: [number, number] | undefined
+ };
+ const custom: unique symbol;
+ let styles: {
+ [style: string]: string | undefined
+ };
+ let defaultOptions: InspectOptions;
+ }
+ /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
+ function isArray(object: any): object is any[];
+ /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
+ function isRegExp(object: any): object is RegExp;
+ /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
+ function isDate(object: any): object is Date;
+ /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
+ function isError(object: any): object is Error;
+ function inherits(constructor: any, superConstructor: any): void;
+ function debuglog(key: string): (msg: string, ...param: any[]) => void;
+ /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
+ function isBoolean(object: any): object is boolean;
+ /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
+ function isBuffer(object: any): object is Buffer;
+ /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
+ function isFunction(object: any): boolean;
+ /** @deprecated since v4.0.0 - use `value === null` instead. */
+ function isNull(object: any): object is null;
+ /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
+ function isNullOrUndefined(object: any): object is null | undefined;
+ /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
+ function isNumber(object: any): object is number;
+ /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
+ function isObject(object: any): boolean;
+ /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
+ function isPrimitive(object: any): boolean;
+ /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
+ function isString(object: any): object is string;
+ /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
+ function isSymbol(object: any): object is symbol;
+ /** @deprecated since v4.0.0 - use `value === undefined` instead. */
+ function isUndefined(object: any): object is undefined;
+ function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
+ function isDeepStrictEqual(val1: any, val2: any): boolean;
+
+ interface CustomPromisify<TCustom extends Function> extends Function {
+ __promisify__: TCustom;
+ }
+
+ function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3, T4>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5, T6>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+
+ function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
+ function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
+ function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise<void>;
+ function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise<void>;
+ function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
+ function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
+ function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
+ function promisify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
+ function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
+ function promisify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
+ function promisify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
+ function promisify(fn: Function): Function;
+
+ namespace types {
+ function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
+ function isArgumentsObject(object: any): object is IArguments;
+ function isArrayBuffer(object: any): object is ArrayBuffer;
+ function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
+ function isAsyncFunction(object: any): boolean;
+ function isBigInt64Array(value: any): value is BigInt64Array;
+ function isBigUint64Array(value: any): value is BigUint64Array;
+ function isBooleanObject(object: any): object is Boolean;
+ function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
+ function isDataView(object: any): object is DataView;
+ function isDate(object: any): object is Date;
+ function isExternal(object: any): boolean;
+ function isFloat32Array(object: any): object is Float32Array;
+ function isFloat64Array(object: any): object is Float64Array;
+ function isGeneratorFunction(object: any): object is GeneratorFunction;
+ function isGeneratorObject(object: any): object is Generator;
+ function isInt8Array(object: any): object is Int8Array;
+ function isInt16Array(object: any): object is Int16Array;
+ function isInt32Array(object: any): object is Int32Array;
+ function isMap<T>(
+ object: T | {},
+ ): object is T extends ReadonlyMap<any, any>
+ ? unknown extends T
+ ? never
+ : ReadonlyMap<any, any>
+ : Map<any, any>;
+ function isMapIterator(object: any): boolean;
+ function isModuleNamespaceObject(value: any): boolean;
+ function isNativeError(object: any): object is Error;
+ function isNumberObject(object: any): object is Number;
+ function isPromise(object: any): object is Promise<any>;
+ function isProxy(object: any): boolean;
+ function isRegExp(object: any): object is RegExp;
+ function isSet<T>(
+ object: T | {},
+ ): object is T extends ReadonlySet<any>
+ ? unknown extends T
+ ? never
+ : ReadonlySet<any>
+ : Set<any>;
+ function isSetIterator(object: any): boolean;
+ function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
+ function isStringObject(object: any): object is String;
+ function isSymbolObject(object: any): object is Symbol;
+ function isTypedArray(object: any): object is NodeJS.TypedArray;
+ function isUint8Array(object: any): object is Uint8Array;
+ function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
+ function isUint16Array(object: any): object is Uint16Array;
+ function isUint32Array(object: any): object is Uint32Array;
+ function isWeakMap(object: any): object is WeakMap<any, any>;
+ function isWeakSet(object: any): object is WeakSet<any>;
+ /** @deprecated Removed in v14.0.0 */
+ function isWebAssemblyCompiledModule(object: any): boolean;
+ }
+
+ class TextDecoder {
+ readonly encoding: string;
+ readonly fatal: boolean;
+ readonly ignoreBOM: boolean;
+ constructor(
+ encoding?: string,
+ options?: { fatal?: boolean; ignoreBOM?: boolean }
+ );
+ decode(
+ input?: NodeJS.TypedArray | DataView | ArrayBuffer | null,
+ options?: { stream?: boolean }
+ ): string;
+ }
+
+ class TextEncoder {
+ readonly encoding: string;
+ constructor();
+ encode(input?: string): Uint8Array;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/v8.d.ts b/node_modules/electron/node_modules/@types/node/v8.d.ts
new file mode 100644
index 0000000..ee5f707
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/v8.d.ts
@@ -0,0 +1,28 @@
+declare module "v8" {
+ interface HeapSpaceInfo {
+ space_name: string;
+ space_size: number;
+ space_used_size: number;
+ space_available_size: number;
+ physical_space_size: number;
+ }
+
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
+ type DoesZapCodeSpaceFlag = 0 | 1;
+
+ interface HeapInfo {
+ total_heap_size: number;
+ total_heap_size_executable: number;
+ total_physical_size: number;
+ total_available_size: number;
+ used_heap_size: number;
+ heap_size_limit: number;
+ malloced_memory: number;
+ peak_malloced_memory: number;
+ does_zap_garbage: DoesZapCodeSpaceFlag;
+ }
+
+ function getHeapStatistics(): HeapInfo;
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
+ function setFlagsFromString(flags: string): void;
+}
diff --git a/node_modules/electron/node_modules/@types/node/vm.d.ts b/node_modules/electron/node_modules/@types/node/vm.d.ts
new file mode 100644
index 0000000..9a11af3
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/vm.d.ts
@@ -0,0 +1,79 @@
+declare module "vm" {
+ interface Context {
+ [key: string]: any;
+ }
+ interface BaseOptions {
+ /**
+ * Specifies the filename used in stack traces produced by this script.
+ * Default: `''`.
+ */
+ filename?: string;
+ /**
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
+ * Default: `0`.
+ */
+ lineOffset?: number;
+ /**
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
+ * Default: `0`
+ */
+ columnOffset?: number;
+ }
+ interface ScriptOptions extends BaseOptions {
+ displayErrors?: boolean;
+ timeout?: number;
+ cachedData?: Buffer;
+ produceCachedData?: boolean;
+ }
+ interface RunningScriptOptions extends BaseOptions {
+ /**
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
+ * Default: `true`.
+ */
+ displayErrors?: boolean;
+ /**
+ * Specifies the number of milliseconds to execute code before terminating execution.
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
+ */
+ timeout?: number;
+ /**
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
+ * If execution is terminated, an `Error` will be thrown.
+ * Default: `false`.
+ */
+ breakOnSigint?: boolean;
+ }
+ interface CompileFunctionOptions extends BaseOptions {
+ /**
+ * Provides an optional data with V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer;
+ /**
+ * Specifies whether to produce new cache data.
+ * Default: `false`,
+ */
+ produceCachedData?: boolean;
+ /**
+ * The sandbox/context in which the said function should be compiled in.
+ */
+ parsingContext?: Context;
+
+ /**
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
+ */
+ contextExtensions?: Object[];
+ }
+ class Script {
+ constructor(code: string, options?: ScriptOptions);
+ runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
+ runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
+ runInThisContext(options?: RunningScriptOptions): any;
+ }
+ function createContext(sandbox?: Context): Context;
+ function isContext(sandbox: Context): boolean;
+ function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
+ function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
+ function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
+}
diff --git a/node_modules/electron/node_modules/@types/node/worker_threads.d.ts b/node_modules/electron/node_modules/@types/node/worker_threads.d.ts
new file mode 100644
index 0000000..a044824
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/worker_threads.d.ts
@@ -0,0 +1,124 @@
+declare module "worker_threads" {
+ import { EventEmitter } from "events";
+ import { Readable, Writable } from "stream";
+
+ const isMainThread: boolean;
+ const parentPort: null | MessagePort;
+ const threadId: number;
+ const workerData: any;
+
+ class MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+ }
+
+ class MessagePort extends EventEmitter {
+ close(): void;
+ postMessage(value: any, transferList?: ReadonlyArray<ArrayBuffer | MessagePort>): void;
+ ref(): void;
+ unref(): void;
+ start(): void;
+
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "message", listener: (value: any) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "message", value: any): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "message", listener: (value: any) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "message", listener: (value: any) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "message", listener: (value: any) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: () => void): this;
+ removeListener(event: "message", listener: (value: any) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ off(event: "close", listener: () => void): this;
+ off(event: "message", listener: (value: any) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ interface WorkerOptions {
+ eval?: boolean;
+ workerData?: any;
+ stdin?: boolean;
+ stdout?: boolean;
+ stderr?: boolean;
+ }
+
+ class Worker extends EventEmitter {
+ readonly stdin: Writable | null;
+ readonly stdout: Readable;
+ readonly stderr: Readable;
+ readonly threadId: number;
+
+ constructor(filename: string, options?: WorkerOptions);
+
+ postMessage(value: any, transferList?: ReadonlyArray<ArrayBuffer | MessagePort>): void;
+ ref(): void;
+ unref(): void;
+ terminate(callback?: (err: any, exitCode: number) => void): void;
+
+ addListener(event: "error", listener: (err: any) => void): this;
+ addListener(event: "exit", listener: (exitCode: number) => void): this;
+ addListener(event: "message", listener: (value: any) => void): this;
+ addListener(event: "online", listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "error", err: any): boolean;
+ emit(event: "exit", exitCode: number): boolean;
+ emit(event: "message", value: any): boolean;
+ emit(event: "online"): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "error", listener: (err: any) => void): this;
+ on(event: "exit", listener: (exitCode: number) => void): this;
+ on(event: "message", listener: (value: any) => void): this;
+ on(event: "online", listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "error", listener: (err: any) => void): this;
+ once(event: "exit", listener: (exitCode: number) => void): this;
+ once(event: "message", listener: (value: any) => void): this;
+ once(event: "online", listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "error", listener: (err: any) => void): this;
+ prependListener(event: "exit", listener: (exitCode: number) => void): this;
+ prependListener(event: "message", listener: (value: any) => void): this;
+ prependListener(event: "online", listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "error", listener: (err: any) => void): this;
+ prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
+ prependOnceListener(event: "online", listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "error", listener: (err: any) => void): this;
+ removeListener(event: "exit", listener: (exitCode: number) => void): this;
+ removeListener(event: "message", listener: (value: any) => void): this;
+ removeListener(event: "online", listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ off(event: "error", listener: (err: any) => void): this;
+ off(event: "exit", listener: (exitCode: number) => void): this;
+ off(event: "message", listener: (value: any) => void): this;
+ off(event: "online", listener: () => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+}
diff --git a/node_modules/electron/node_modules/@types/node/zlib.d.ts b/node_modules/electron/node_modules/@types/node/zlib.d.ts
new file mode 100644
index 0000000..467783a
--- /dev/null
+++ b/node_modules/electron/node_modules/@types/node/zlib.d.ts
@@ -0,0 +1,327 @@
+declare module "zlib" {
+ import * as stream from "stream";
+
+ interface ZlibOptions {
+ flush?: number; // default: zlib.constants.Z_NO_FLUSH
+ finishFlush?: number; // default: zlib.constants.Z_FINISH
+ chunkSize?: number; // default: 16*1024
+ windowBits?: number;
+ level?: number; // compression only
+ memLevel?: number; // compression only
+ strategy?: number; // compression only
+ dictionary?: Buffer | NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
+ info?: boolean;
+ }
+
+ interface BrotliOptions {
+ /**
+ * @default constants.BROTLI_OPERATION_PROCESS
+ */
+ flush?: number;
+ /**
+ * @default constants.BROTLI_OPERATION_FINISH
+ */
+ finishFlush?: number;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number;
+ params?: {
+ /**
+ * Each key is a `constants.BROTLI_*` constant.
+ */
+ [key: number]: boolean | number;
+ };
+ }
+
+ interface Zlib {
+ /** @deprecated Use bytesWritten instead. */
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ shell?: boolean | string;
+ close(callback?: () => void): void;
+ flush(kind?: number, callback?: () => void): void;
+ flush(callback?: () => void): void;
+ }
+
+ interface ZlibParams {
+ params(level: number, strategy: number, callback: () => void): void;
+ }
+
+ interface ZlibReset {
+ reset(): void;
+ }
+
+ interface BrotliCompress extends stream.Transform, Zlib { }
+ interface BrotliDecompress extends stream.Transform, Zlib { }
+ interface Gzip extends stream.Transform, Zlib { }
+ interface Gunzip extends stream.Transform, Zlib { }
+ interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
+ interface Inflate extends stream.Transform, Zlib, ZlibReset { }
+ interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
+ interface InflateRaw extends stream.Transform, Zlib, ZlibReset { }
+ interface Unzip extends stream.Transform, Zlib { }
+
+ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
+ function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
+ function createGzip(options?: ZlibOptions): Gzip;
+ function createGunzip(options?: ZlibOptions): Gunzip;
+ function createDeflate(options?: ZlibOptions): Deflate;
+ function createInflate(options?: ZlibOptions): Inflate;
+ function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
+ function createInflateRaw(options?: ZlibOptions): InflateRaw;
+ function createUnzip(options?: ZlibOptions): Unzip;
+
+ type InputType = string | Buffer | DataView | ArrayBuffer | NodeJS.TypedArray;
+
+ type CompressCallback = (error: Error | null, result: Buffer) => void;
+
+ function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliCompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliCompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+
+ function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliDecompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliDecompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+
+ function deflate(buf: InputType, callback: CompressCallback): void;
+ function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function deflateRaw(buf: InputType, callback: CompressCallback): void;
+ function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function gzip(buf: InputType, callback: CompressCallback): void;
+ function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function gunzip(buf: InputType, callback: CompressCallback): void;
+ function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gunzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function inflate(buf: InputType, callback: CompressCallback): void;
+ function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function inflateRaw(buf: InputType, callback: CompressCallback): void;
+ function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function unzip(buf: InputType, callback: CompressCallback): void;
+ function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace unzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ namespace constants {
+ // Allowed flush values.
+
+ const Z_NO_FLUSH: number;
+ const Z_PARTIAL_FLUSH: number;
+ const Z_SYNC_FLUSH: number;
+ const Z_FULL_FLUSH: number;
+ const Z_FINISH: number;
+ const Z_BLOCK: number;
+ const Z_TREES: number;
+
+ // Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events.
+
+ const Z_OK: number;
+ const Z_STREAM_END: number;
+ const Z_NEED_DICT: number;
+ const Z_ERRNO: number;
+ const Z_STREAM_ERROR: number;
+ const Z_DATA_ERROR: number;
+ const Z_MEM_ERROR: number;
+ const Z_BUF_ERROR: number;
+ const Z_VERSION_ERROR: number;
+
+ // Compression levels.
+
+ const Z_NO_COMPRESSION: number;
+ const Z_BEST_SPEED: number;
+ const Z_BEST_COMPRESSION: number;
+ const Z_DEFAULT_COMPRESSION: number;
+
+ // Compression strategy.
+
+ const Z_FILTERED: number;
+ const Z_HUFFMAN_ONLY: number;
+ const Z_RLE: number;
+ const Z_FIXED: number;
+ const Z_DEFAULT_STRATEGY: number;
+
+ const BROTLI_DECODE: number;
+ const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
+ const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
+ const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
+ const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
+ const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
+ const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
+ const BROTLI_DECODER_ERROR_UNREACHABLE: number;
+ const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_NO_ERROR: number;
+ const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
+ const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
+ const BROTLI_DECODER_RESULT_ERROR: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_RESULT_SUCCESS: number;
+ const BROTLI_DECODER_SUCCESS: number;
+
+ const BROTLI_DEFAULT_MODE: number;
+ const BROTLI_DEFAULT_QUALITY: number;
+ const BROTLI_DEFAULT_WINDOW: number;
+ const BROTLI_ENCODE: number;
+ const BROTLI_LARGE_MAX_WINDOW_BITS: number;
+ const BROTLI_MAX_INPUT_BLOCK_BITS: number;
+ const BROTLI_MAX_QUALITY: number;
+ const BROTLI_MAX_WINDOW_BITS: number;
+ const BROTLI_MIN_INPUT_BLOCK_BITS: number;
+ const BROTLI_MIN_QUALITY: number;
+ const BROTLI_MIN_WINDOW_BITS: number;
+
+ const BROTLI_MODE_FONT: number;
+ const BROTLI_MODE_GENERIC: number;
+ const BROTLI_MODE_TEXT: number;
+
+ const BROTLI_OPERATION_EMIT_METADATA: number;
+ const BROTLI_OPERATION_FINISH: number;
+ const BROTLI_OPERATION_FLUSH: number;
+ const BROTLI_OPERATION_PROCESS: number;
+
+ const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
+ const BROTLI_PARAM_LARGE_WINDOW: number;
+ const BROTLI_PARAM_LGBLOCK: number;
+ const BROTLI_PARAM_LGWIN: number;
+ const BROTLI_PARAM_MODE: number;
+ const BROTLI_PARAM_NDIRECT: number;
+ const BROTLI_PARAM_NPOSTFIX: number;
+ const BROTLI_PARAM_QUALITY: number;
+ const BROTLI_PARAM_SIZE_HINT: number;
+ }
+
+ // Allowed flush values.
+ /** @deprecated Use `constants.Z_NO_FLUSH` */
+ const Z_NO_FLUSH: number;
+ /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
+ const Z_PARTIAL_FLUSH: number;
+ /** @deprecated Use `constants.Z_SYNC_FLUSH` */
+ const Z_SYNC_FLUSH: number;
+ /** @deprecated Use `constants.Z_FULL_FLUSH` */
+ const Z_FULL_FLUSH: number;
+ /** @deprecated Use `constants.Z_FINISH` */
+ const Z_FINISH: number;
+ /** @deprecated Use `constants.Z_BLOCK` */
+ const Z_BLOCK: number;
+ /** @deprecated Use `constants.Z_TREES` */
+ const Z_TREES: number;
+
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ /** @deprecated Use `constants.Z_OK` */
+ const Z_OK: number;
+ /** @deprecated Use `constants.Z_STREAM_END` */
+ const Z_STREAM_END: number;
+ /** @deprecated Use `constants.Z_NEED_DICT` */
+ const Z_NEED_DICT: number;
+ /** @deprecated Use `constants.Z_ERRNO` */
+ const Z_ERRNO: number;
+ /** @deprecated Use `constants.Z_STREAM_ERROR` */
+ const Z_STREAM_ERROR: number;
+ /** @deprecated Use `constants.Z_DATA_ERROR` */
+ const Z_DATA_ERROR: number;
+ /** @deprecated Use `constants.Z_MEM_ERROR` */
+ const Z_MEM_ERROR: number;
+ /** @deprecated Use `constants.Z_BUF_ERROR` */
+ const Z_BUF_ERROR: number;
+ /** @deprecated Use `constants.Z_VERSION_ERROR` */
+ const Z_VERSION_ERROR: number;
+
+ // Compression levels.
+ /** @deprecated Use `constants.Z_NO_COMPRESSION` */
+ const Z_NO_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_BEST_SPEED` */
+ const Z_BEST_SPEED: number;
+ /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
+ const Z_BEST_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
+ const Z_DEFAULT_COMPRESSION: number;
+
+ // Compression strategy.
+ /** @deprecated Use `constants.Z_FILTERED` */
+ const Z_FILTERED: number;
+ /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
+ const Z_HUFFMAN_ONLY: number;
+ /** @deprecated Use `constants.Z_RLE` */
+ const Z_RLE: number;
+ /** @deprecated Use `constants.Z_FIXED` */
+ const Z_FIXED: number;
+ /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
+ const Z_DEFAULT_STRATEGY: number;
+
+ /** @deprecated */
+ const Z_BINARY: number;
+ /** @deprecated */
+ const Z_TEXT: number;
+ /** @deprecated */
+ const Z_ASCII: number;
+ /** @deprecated */
+ const Z_UNKNOWN: number;
+ /** @deprecated */
+ const Z_DEFLATED: number;
+}
diff --git a/node_modules/electron/package.json b/node_modules/electron/package.json
new file mode 100644
index 0000000..c1d4a6d
--- /dev/null
+++ b/node_modules/electron/package.json
@@ -0,0 +1,38 @@
+{
+ "scripts": {
+ "cache-clean": "rm -rf ~/.electron && rm -rf dist",
+ "postinstall": "node install.js",
+ "pretest": "npm run cache-clean",
+ "test": "standard"
+ },
+ "bin": {
+ "electron": "cli.js"
+ },
+ "main": "index.js",
+ "types": "electron.d.ts",
+ "dependencies": {
+ "@types/node": "^10.12.18",
+ "electron-download": "^4.1.0",
+ "extract-zip": "^1.0.3"
+ },
+ "devDependencies": {
+ "home-path": "^0.1.1",
+ "path-exists": "^2.0.0",
+ "standard": "^5.4.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "engines": {
+ "node": ">= 4.0"
+ },
+ "name": "electron",
+ "version": "4.2.12",
+ "repository": "https://github.com/electron/electron",
+ "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
+ "license": "MIT",
+ "author": "Electron Community",
+ "keywords": [
+ "electron"
+ ]
+} \ No newline at end of file
diff --git a/node_modules/electron/path.txt b/node_modules/electron/path.txt
new file mode 100644
index 0000000..cfa345d
--- /dev/null
+++ b/node_modules/electron/path.txt
@@ -0,0 +1 @@
+electron \ No newline at end of file
diff --git a/node_modules/encodeurl/HISTORY.md b/node_modules/encodeurl/HISTORY.md
new file mode 100644
index 0000000..41313b2
--- /dev/null
+++ b/node_modules/encodeurl/HISTORY.md
@@ -0,0 +1,14 @@
+1.0.2 / 2018-01-21
+==================
+
+ * Fix encoding `%` as last character
+
+1.0.1 / 2016-06-09
+==================
+
+ * Fix encoding unpaired surrogates at start/end of string
+
+1.0.0 / 2016-06-08
+==================
+
+ * Initial release
diff --git a/node_modules/encodeurl/LICENSE b/node_modules/encodeurl/LICENSE
new file mode 100644
index 0000000..8812229
--- /dev/null
+++ b/node_modules/encodeurl/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2016 Douglas Christopher Wilson
+
+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/encodeurl/README.md b/node_modules/encodeurl/README.md
new file mode 100644
index 0000000..127c5a0
--- /dev/null
+++ b/node_modules/encodeurl/README.md
@@ -0,0 +1,128 @@
+# encodeurl
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Encode a URL to a percent-encoded form, excluding already-encoded sequences
+
+## Installation
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install encodeurl
+```
+
+## API
+
+```js
+var encodeUrl = require('encodeurl')
+```
+
+### encodeUrl(url)
+
+Encode a URL to a percent-encoded form, excluding already-encoded sequences.
+
+This function will take an already-encoded URL and encode all the non-URL
+code points (as UTF-8 byte sequences). This function will not encode the
+"%" character unless it is not part of a valid sequence (`%20` will be
+left as-is, but `%foo` will be encoded as `%25foo`).
+
+This encode is meant to be "safe" and does not throw errors. It will try as
+hard as it can to properly encode the given URL, including replacing any raw,
+unpaired surrogate pairs with the Unicode replacement character prior to
+encoding.
+
+This function is _similar_ to the intrinsic function `encodeURI`, except it
+will not encode the `%` character if that is part of a valid sequence, will
+not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired
+surrogate pairs with the Unicode replacement character (instead of throwing).
+
+## Examples
+
+### Encode a URL containing user-controled data
+
+```js
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+
+http.createServer(function onRequest (req, res) {
+ // get encoded form of inbound url
+ var url = encodeUrl(req.url)
+
+ // create html message
+ var body = '<p>Location ' + escapeHtml(url) + ' not found</p>'
+
+ // send a 404
+ res.statusCode = 404
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
+ res.end(body, 'utf-8')
+})
+```
+
+### Encode a URL for use in a header field
+
+```js
+var encodeUrl = require('encodeurl')
+var escapeHtml = require('escape-html')
+var url = require('url')
+
+http.createServer(function onRequest (req, res) {
+ // parse inbound url
+ var href = url.parse(req)
+
+ // set new host for redirect
+ href.host = 'localhost'
+ href.protocol = 'https:'
+ href.slashes = true
+
+ // create location header
+ var location = encodeUrl(url.format(href))
+
+ // create html message
+ var body = '<p>Redirecting to new site: ' + escapeHtml(location) + '</p>'
+
+ // send a 301
+ res.statusCode = 301
+ res.setHeader('Content-Type', 'text/html; charset=UTF-8')
+ res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
+ res.setHeader('Location', location)
+ res.end(body, 'utf-8')
+})
+```
+
+## Testing
+
+```sh
+$ npm test
+$ npm run lint
+```
+
+## References
+
+- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986]
+- [WHATWG URL Living Standard][whatwg-url]
+
+[rfc-3986]: https://tools.ietf.org/html/rfc3986
+[whatwg-url]: https://url.spec.whatwg.org/
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/encodeurl.svg
+[npm-url]: https://npmjs.org/package/encodeurl
+[node-version-image]: https://img.shields.io/node/v/encodeurl.svg
+[node-version-url]: https://nodejs.org/en/download
+[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg
+[travis-url]: https://travis-ci.org/pillarjs/encodeurl
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg
+[downloads-url]: https://npmjs.org/package/encodeurl
diff --git a/node_modules/encodeurl/index.js b/node_modules/encodeurl/index.js
new file mode 100644
index 0000000..fc4906c
--- /dev/null
+++ b/node_modules/encodeurl/index.js
@@ -0,0 +1,60 @@
+/*!
+ * encodeurl
+ * Copyright(c) 2016 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = encodeUrl
+
+/**
+ * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
+ * and including invalid escape sequences.
+ * @private
+ */
+
+var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g
+
+/**
+ * RegExp to match unmatched surrogate pair.
+ * @private
+ */
+
+var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
+
+/**
+ * String to replace unmatched surrogate pair with.
+ * @private
+ */
+
+var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2'
+
+/**
+ * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
+ *
+ * This function will take an already-encoded URL and encode all the non-URL
+ * code points. This function will not encode the "%" character unless it is
+ * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
+ * be encoded as `%25foo`).
+ *
+ * This encode is meant to be "safe" and does not throw errors. It will try as
+ * hard as it can to properly encode the given URL, including replacing any raw,
+ * unpaired surrogate pairs with the Unicode replacement character prior to
+ * encoding.
+ *
+ * @param {string} url
+ * @return {string}
+ * @public
+ */
+
+function encodeUrl (url) {
+ return String(url)
+ .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)
+ .replace(ENCODE_CHARS_REGEXP, encodeURI)
+}
diff --git a/node_modules/encodeurl/package.json b/node_modules/encodeurl/package.json
new file mode 100644
index 0000000..b9f25ef
--- /dev/null
+++ b/node_modules/encodeurl/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "encodeurl",
+ "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences",
+ "version": "1.0.2",
+ "contributors": [
+ "Douglas Christopher Wilson <doug@somethingdoug.com>"
+ ],
+ "license": "MIT",
+ "keywords": [
+ "encode",
+ "encodeurl",
+ "url"
+ ],
+ "repository": "pillarjs/encodeurl",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "eslint-config-standard": "10.2.1",
+ "eslint-plugin-import": "2.8.0",
+ "eslint-plugin-node": "5.2.1",
+ "eslint-plugin-promise": "3.6.0",
+ "eslint-plugin-standard": "3.0.1",
+ "istanbul": "0.4.5",
+ "mocha": "2.5.3"
+ },
+ "files": [
+ "LICENSE",
+ "HISTORY.md",
+ "README.md",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
+ }
+}
diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE
new file mode 100644
index 0000000..757562e
--- /dev/null
+++ b/node_modules/end-of-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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. \ No newline at end of file
diff --git a/node_modules/end-of-stream/README.md b/node_modules/end-of-stream/README.md
new file mode 100644
index 0000000..857b14b
--- /dev/null
+++ b/node_modules/end-of-stream/README.md
@@ -0,0 +1,54 @@
+# end-of-stream
+
+A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
+
+ npm install end-of-stream
+
+[![Build status](https://travis-ci.org/mafintosh/end-of-stream.svg?branch=master)](https://travis-ci.org/mafintosh/end-of-stream)
+
+## Usage
+
+Simply pass a stream and a callback to the `eos`.
+Both legacy streams, streams2 and stream3 are supported.
+
+``` js
+var eos = require('end-of-stream');
+
+eos(readableStream, function(err) {
+ // this will be set to the stream instance
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended', this === readableStream);
+});
+
+eos(writableStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished', this === writableStream);
+});
+
+eos(duplexStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended and finished', this === duplexStream);
+});
+
+eos(duplexStream, {readable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished but might still be readable');
+});
+
+eos(duplexStream, {writable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended but might still be writable');
+});
+
+eos(readableStream, {error:false}, function(err) {
+ // do not treat emit('error', err) as a end-of-stream
+});
+```
+
+## License
+
+MIT
+
+## Related
+
+`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js
new file mode 100644
index 0000000..c77f0d5
--- /dev/null
+++ b/node_modules/end-of-stream/index.js
@@ -0,0 +1,94 @@
+var once = require('once');
+
+var noop = function() {};
+
+var isRequest = function(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+};
+
+var isChildProcess = function(stream) {
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+};
+
+var eos = function(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+
+ callback = once(callback || noop);
+
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
+ var cancelled = false;
+
+ var onlegacyfinish = function() {
+ if (!stream.writable) onfinish();
+ };
+
+ var onfinish = function() {
+ writable = false;
+ if (!readable) callback.call(stream);
+ };
+
+ var onend = function() {
+ readable = false;
+ if (!writable) callback.call(stream);
+ };
+
+ var onexit = function(exitCode) {
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
+ };
+
+ var onerror = function(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function() {
+ process.nextTick(onclosenexttick);
+ };
+
+ var onclosenexttick = function() {
+ if (cancelled) return;
+ if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
+ if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
+ };
+
+ var onrequest = function() {
+ stream.req.on('finish', onfinish);
+ };
+
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();
+ else stream.on('request', onrequest);
+ } else if (writable && !ws) { // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ if (isChildProcess(stream)) stream.on('exit', onexit);
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
+
+ return function() {
+ cancelled = true;
+ stream.removeListener('complete', onfinish);
+ stream.removeListener('abort', onclose);
+ stream.removeListener('request', onrequest);
+ if (stream.req) stream.req.removeListener('finish', onfinish);
+ stream.removeListener('end', onlegacyfinish);
+ stream.removeListener('close', onlegacyfinish);
+ stream.removeListener('finish', onfinish);
+ stream.removeListener('exit', onexit);
+ stream.removeListener('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+};
+
+module.exports = eos;
diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json
new file mode 100644
index 0000000..b75bbf0
--- /dev/null
+++ b/node_modules/end-of-stream/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "end-of-stream",
+ "version": "1.4.4",
+ "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/end-of-stream.git"
+ },
+ "dependencies": {
+ "once": "^1.4.0"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "stream",
+ "streams",
+ "callback",
+ "finish",
+ "close",
+ "end",
+ "wait"
+ ],
+ "bugs": {
+ "url": "https://github.com/mafintosh/end-of-stream/issues"
+ },
+ "homepage": "https://github.com/mafintosh/end-of-stream",
+ "main": "index.js",
+ "author": "Mathias Buus <mathiasbuus@gmail.com>",
+ "license": "MIT",
+ "devDependencies": {
+ "tape": "^4.11.0"
+ }
+}
diff --git a/node_modules/env-paths/index.js b/node_modules/env-paths/index.js
new file mode 100644
index 0000000..4a04b71
--- /dev/null
+++ b/node_modules/env-paths/index.js
@@ -0,0 +1,69 @@
+'use strict';
+const path = require('path');
+const os = require('os');
+
+const homedir = os.homedir();
+const tmpdir = os.tmpdir();
+const env = process.env;
+
+const macos = name => {
+ const library = path.join(homedir, 'Library');
+
+ return {
+ data: path.join(library, 'Application Support', name),
+ config: path.join(library, 'Preferences', name),
+ cache: path.join(library, 'Caches', name),
+ log: path.join(library, 'Logs', name),
+ temp: path.join(tmpdir, name)
+ };
+};
+
+const windows = name => {
+ const appData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local');
+
+ return {
+ // data/config/cache/log are invented by me as Windows isn't opinionated about this
+ data: path.join(appData, name, 'Data'),
+ config: path.join(appData, name, 'Config'),
+ cache: path.join(appData, name, 'Cache'),
+ log: path.join(appData, name, 'Log'),
+ temp: path.join(tmpdir, name)
+ };
+};
+
+// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+const linux = name => {
+ const username = path.basename(homedir);
+
+ return {
+ data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name),
+ config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name),
+ cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name),
+ // https://wiki.debian.org/XDGBaseDirectorySpecification#state
+ log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name),
+ temp: path.join(tmpdir, username, name)
+ };
+};
+
+module.exports = (name, opts) => {
+ if (typeof name !== 'string') {
+ throw new TypeError(`Expected string, got ${typeof name}`);
+ }
+
+ opts = Object.assign({suffix: 'nodejs'}, opts);
+
+ if (opts.suffix) {
+ // add suffix to prevent possible conflict with native apps
+ name += `-${opts.suffix}`;
+ }
+
+ if (process.platform === 'darwin') {
+ return macos(name);
+ }
+
+ if (process.platform === 'win32') {
+ return windows(name);
+ }
+
+ return linux(name);
+};
diff --git a/node_modules/env-paths/license b/node_modules/env-paths/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/env-paths/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/env-paths/package.json b/node_modules/env-paths/package.json
new file mode 100644
index 0000000..74773ce
--- /dev/null
+++ b/node_modules/env-paths/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "env-paths",
+ "version": "1.0.0",
+ "description": "Get paths for storing things like data, config, cache, etc",
+ "license": "MIT",
+ "repository": "sindresorhus/env-paths",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "common",
+ "user",
+ "paths",
+ "env",
+ "environment",
+ "directory",
+ "dir",
+ "appdir",
+ "path",
+ "data",
+ "config",
+ "cache",
+ "logs",
+ "temp",
+ "linux",
+ "unix"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/env-paths/readme.md b/node_modules/env-paths/readme.md
new file mode 100644
index 0000000..0bdc2ac
--- /dev/null
+++ b/node_modules/env-paths/readme.md
@@ -0,0 +1,71 @@
+# env-paths [![Build Status](https://travis-ci.org/sindresorhus/env-paths.svg?branch=master)](https://travis-ci.org/sindresorhus/env-paths)
+
+> Get paths for storing things like data, config, cache, etc
+
+
+## Install
+
+```
+$ npm install --save env-paths
+```
+
+
+## Usage
+
+```js
+const envPaths = require('env-paths');
+const paths = envPaths('MyApp');
+
+paths.data;
+//=> '/home/sindresorhus/.local/share/MyApp-nodejs'
+
+paths.config
+//=> '/home/sindresorhus/.config/MyApp-nodejs'
+```
+
+
+## API
+
+### paths = envPaths(name, [options])
+
+#### name
+
+Type: `string`
+
+Name of your project. Used to generate the paths.
+
+#### options
+
+##### suffix
+
+Type: `string`<br>
+Default: `'nodejs'`
+
+**Don't use this option unless you really have to!**<br>
+Suffix appended to the project name to avoid name conflicts with native
+apps. Pass an empty string to disable it.
+
+### paths.data
+
+Directory for data files.
+
+### paths.config
+
+Directory for config files.
+
+### paths.cache
+
+Directory for non-essential data files.
+
+### paths.log
+
+Directory for log files.
+
+### paths.temp
+
+Directory for temporary files.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/error-ex/LICENSE b/node_modules/error-ex/LICENSE
new file mode 100644
index 0000000..0a5f461
--- /dev/null
+++ b/node_modules/error-ex/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 JD Ballard
+
+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/error-ex/README.md b/node_modules/error-ex/README.md
new file mode 100644
index 0000000..97f744a
--- /dev/null
+++ b/node_modules/error-ex/README.md
@@ -0,0 +1,144 @@
+# node-error-ex [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-error-ex.svg?style=flat-square)](https://travis-ci.org/Qix-/node-error-ex) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-error-ex.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-error-ex)
+> Easily subclass and customize new Error types
+
+## Examples
+To include in your project:
+```javascript
+var errorEx = require('error-ex');
+```
+
+To create an error message type with a specific name (note, that `ErrorFn.name`
+will not reflect this):
+```javascript
+var JSONError = errorEx('JSONError');
+
+var err = new JSONError('error');
+err.name; //-> JSONError
+throw err; //-> JSONError: error
+```
+
+To add a stack line:
+```javascript
+var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')});
+
+var err = new JSONError('error')
+err.fileName = '/a/b/c/foo.json';
+throw err; //-> (line 2)-> in /a/b/c/foo.json
+```
+
+To append to the error message:
+```javascript
+var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')});
+
+var err = new JSONError('error');
+err.fileName = '/a/b/c/foo.json';
+throw err; //-> JSONError: error in /a/b/c/foo.json
+```
+
+## API
+
+#### `errorEx([name], [properties])`
+Creates a new ErrorEx error type
+
+- `name`: the name of the new type (appears in the error message upon throw;
+ defaults to `Error.name`)
+- `properties`: if supplied, used as a key/value dictionary of properties to
+ use when building up the stack message. Keys are property names that are
+ looked up on the error message, and then passed to function values.
+ - `line`: if specified and is a function, return value is added as a stack
+ entry (error-ex will indent for you). Passed the property value given
+ the key.
+ - `stack`: if specified and is a function, passed the value of the property
+ using the key, and the raw stack lines as a second argument. Takes no
+ return value (but the stack can be modified directly).
+ - `message`: if specified and is a function, return value is used as new
+ `.message` value upon get. Passed the property value of the property named
+ by key, and the existing message is passed as the second argument as an
+ array of lines (suitable for multi-line messages).
+
+Returns a constructor (Function) that can be used just like the regular Error
+constructor.
+
+```javascript
+var errorEx = require('error-ex');
+
+var BasicError = errorEx();
+
+var NamedError = errorEx('NamedError');
+
+// --
+
+var AdvancedError = errorEx('AdvancedError', {
+ foo: {
+ line: function (value, stack) {
+ if (value) {
+ return 'bar ' + value;
+ }
+ return null;
+ }
+ }
+}
+
+var err = new AdvancedError('hello, world');
+err.foo = 'baz';
+throw err;
+
+/*
+ AdvancedError: hello, world
+ bar baz
+ at tryReadme() (readme.js:20:1)
+*/
+```
+
+#### `errorEx.line(str)`
+Creates a stack line using a delimiter
+
+> This is a helper function. It is to be used in lieu of writing a value object
+> for `properties` values.
+
+- `str`: The string to create
+ - Use the delimiter `%s` to specify where in the string the value should go
+
+```javascript
+var errorEx = require('error-ex');
+
+var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')});
+
+var err = new FileError('problem reading file');
+err.fileName = '/a/b/c/d/foo.js';
+throw err;
+
+/*
+ FileError: problem reading file
+ in /a/b/c/d/foo.js
+ at tryReadme() (readme.js:7:1)
+*/
+```
+
+#### `errorEx.append(str)`
+Appends to the `error.message` string
+
+> This is a helper function. It is to be used in lieu of writing a value object
+> for `properties` values.
+
+- `str`: The string to append
+ - Use the delimiter `%s` to specify where in the string the value should go
+
+```javascript
+var errorEx = require('error-ex');
+
+var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')});
+
+var err = new SyntaxError('improper indentation');
+err.fileName = '/a/b/c/d/foo.js';
+throw err;
+
+/*
+ SyntaxError: improper indentation in /a/b/c/d/foo.js
+ at tryReadme() (readme.js:7:1)
+*/
+```
+
+## License
+Licensed under the [MIT License](http://opensource.org/licenses/MIT).
+You can find a copy of it in [LICENSE](LICENSE).
diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js
new file mode 100644
index 0000000..4fb20b4
--- /dev/null
+++ b/node_modules/error-ex/index.js
@@ -0,0 +1,141 @@
+'use strict';
+
+var util = require('util');
+var isArrayish = require('is-arrayish');
+
+var errorEx = function errorEx(name, properties) {
+ if (!name || name.constructor !== String) {
+ properties = name || {};
+ name = Error.name;
+ }
+
+ var errorExError = function ErrorEXError(message) {
+ if (!this) {
+ return new ErrorEXError(message);
+ }
+
+ message = message instanceof Error
+ ? message.message
+ : (message || this.message);
+
+ Error.call(this, message);
+ Error.captureStackTrace(this, errorExError);
+
+ this.name = name;
+
+ Object.defineProperty(this, 'message', {
+ configurable: true,
+ enumerable: false,
+ get: function () {
+ var newMessage = message.split(/\r?\n/g);
+
+ for (var key in properties) {
+ if (!properties.hasOwnProperty(key)) {
+ continue;
+ }
+
+ var modifier = properties[key];
+
+ if ('message' in modifier) {
+ newMessage = modifier.message(this[key], newMessage) || newMessage;
+ if (!isArrayish(newMessage)) {
+ newMessage = [newMessage];
+ }
+ }
+ }
+
+ return newMessage.join('\n');
+ },
+ set: function (v) {
+ message = v;
+ }
+ });
+
+ var overwrittenStack = null;
+
+ var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
+ var stackGetter = stackDescriptor.get;
+ var stackValue = stackDescriptor.value;
+ delete stackDescriptor.value;
+ delete stackDescriptor.writable;
+
+ stackDescriptor.set = function (newstack) {
+ overwrittenStack = newstack;
+ };
+
+ stackDescriptor.get = function () {
+ var stack = (overwrittenStack || ((stackGetter)
+ ? stackGetter.call(this)
+ : stackValue)).split(/\r?\n+/g);
+
+ // starting in Node 7, the stack builder caches the message.
+ // just replace it.
+ if (!overwrittenStack) {
+ stack[0] = this.name + ': ' + this.message;
+ }
+
+ var lineCount = 1;
+ for (var key in properties) {
+ if (!properties.hasOwnProperty(key)) {
+ continue;
+ }
+
+ var modifier = properties[key];
+
+ if ('line' in modifier) {
+ var line = modifier.line(this[key]);
+ if (line) {
+ stack.splice(lineCount++, 0, ' ' + line);
+ }
+ }
+
+ if ('stack' in modifier) {
+ modifier.stack(this[key], stack);
+ }
+ }
+
+ return stack.join('\n');
+ };
+
+ Object.defineProperty(this, 'stack', stackDescriptor);
+ };
+
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(errorExError.prototype, Error.prototype);
+ Object.setPrototypeOf(errorExError, Error);
+ } else {
+ util.inherits(errorExError, Error);
+ }
+
+ return errorExError;
+};
+
+errorEx.append = function (str, def) {
+ return {
+ message: function (v, message) {
+ v = v || def;
+
+ if (v) {
+ message[0] += ' ' + str.replace('%s', v.toString());
+ }
+
+ return message;
+ }
+ };
+};
+
+errorEx.line = function (str, def) {
+ return {
+ line: function (v) {
+ v = v || def;
+
+ if (v) {
+ return str.replace('%s', v.toString());
+ }
+
+ return null;
+ }
+ };
+};
+
+module.exports = errorEx;
diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json
new file mode 100644
index 0000000..f3d9ae0
--- /dev/null
+++ b/node_modules/error-ex/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "error-ex",
+ "description": "Easy error subclassing and stack customization",
+ "version": "1.3.2",
+ "maintainers": [
+ "Josh Junon <i.am.qix@gmail.com> (github.com/qix-)",
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)"
+ ],
+ "keywords": [
+ "error",
+ "errors",
+ "extend",
+ "extending",
+ "extension",
+ "subclass",
+ "stack",
+ "custom"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "pretest": "xo",
+ "test": "mocha --compilers coffee:coffee-script/register"
+ },
+ "xo": {
+ "rules": {
+ "operator-linebreak": [
+ 0
+ ]
+ }
+ },
+ "repository": "qix-/node-error-ex",
+ "files": [
+ "index.js"
+ ],
+ "devDependencies": {
+ "coffee-script": "^1.9.3",
+ "coveralls": "^2.11.2",
+ "istanbul": "^0.3.17",
+ "mocha": "^2.2.5",
+ "should": "^7.0.1",
+ "xo": "^0.7.1"
+ },
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+}
diff --git a/node_modules/es6-error/CHANGELOG.md b/node_modules/es6-error/CHANGELOG.md
new file mode 100644
index 0000000..9e82c81
--- /dev/null
+++ b/node_modules/es6-error/CHANGELOG.md
@@ -0,0 +1,26 @@
+# Change Log
+
+## [v4.0.1] - 2017-01-04
+### Fixed
+ - jsnext build uses `babel-plugin-transform-builtin-extend` (#27)
+
+## [v4.0.0] - 2016-10-03
+### Added
+ - jsnext build (#26)
+
+## [v3.2.0] - 2016-09-29
+### Added
+ - TypeScript definitions (#24)
+
+## [v3.1.0] - 2016-09-08
+### Changed
+ - Point jsnext build to transpiled code (#23)
+
+## [v3.0.1] - 2016-07-14
+### Changed
+ - Move Babel config to `.babelrc` (#20)
+
+## [v3.0.0] - 2016-05-18
+### Changed
+ - Upgrade to Babel 6 (#16)
+ - Make `message`, `name`, and `stack` properties configurable (to match built-in `Error`) (#17)
diff --git a/node_modules/es6-error/LICENSE.md b/node_modules/es6-error/LICENSE.md
new file mode 100644
index 0000000..4737fd1
--- /dev/null
+++ b/node_modules/es6-error/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Ben Youngblood
+
+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/es6-error/README.md b/node_modules/es6-error/README.md
new file mode 100644
index 0000000..8a8f130
--- /dev/null
+++ b/node_modules/es6-error/README.md
@@ -0,0 +1,59 @@
+# es6-error
+
+[![npm version](https://badge.fury.io/js/es6-error.svg)](https://www.npmjs.com/package/es6-error)
+[![Build Status](https://travis-ci.org/bjyoungblood/es6-error.svg?branch=master)](https://travis-ci.org/bjyoungblood/es6-error)
+
+An easily-extendable error class for use with ES6 classes (or ES5, if you so
+choose).
+
+Tested in Node 4.0, Chrome, and Firefox.
+
+## Why?
+
+I made this because I wanted to be able to extend Error for inheritance and type
+checking, but can never remember to add
+`Error.captureStackTrace(this, this.constructor.name)` to the constructor or how
+to get the proper name to print from `console.log`.
+
+## ES6 Usage
+
+```javascript
+
+import ExtendableError from 'es6-error';
+
+class MyError extends ExtendableError {
+ // constructor is optional; you should omit it if you just want a custom error
+ // type for inheritance and type checking
+ constructor(message = 'Default message') {
+ super(message);
+ }
+}
+
+export default MyError;
+```
+
+## ES5 Usage
+
+```javascript
+
+var util = require('util');
+var ExtendableError = require('es6-error');
+
+function MyError(message) {
+ message = message || 'Default message';
+ ExtendableError.call(this, message);
+}
+
+util.inherits(MyError, ExtendableError);
+
+module.exports = MyError;
+```
+
+### Known Issues
+
+- Uglification can obscure error class names ([#31](https://github.com/bjyoungblood/es6-error/issues/31#issuecomment-301128220))
+
+#### Todo
+
+- Better browser compatibility
+- Browser tests
diff --git a/node_modules/es6-error/es6/index.js b/node_modules/es6-error/es6/index.js
new file mode 100644
index 0000000..70fbfbc
--- /dev/null
+++ b/node_modules/es6-error/es6/index.js
@@ -0,0 +1,72 @@
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+function _extendableBuiltin(cls) {
+ function ExtendableBuiltin() {
+ cls.apply(this, arguments);
+ }
+
+ ExtendableBuiltin.prototype = Object.create(cls.prototype, {
+ constructor: {
+ value: cls,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(ExtendableBuiltin, cls);
+ } else {
+ ExtendableBuiltin.__proto__ = cls;
+ }
+
+ return ExtendableBuiltin;
+}
+
+var ExtendableError = function (_extendableBuiltin2) {
+ _inherits(ExtendableError, _extendableBuiltin2);
+
+ function ExtendableError() {
+ var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+
+ _classCallCheck(this, ExtendableError);
+
+ // extending Error is weird and does not propagate `message`
+ var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));
+
+ Object.defineProperty(_this, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ });
+
+ Object.defineProperty(_this, 'name', {
+ configurable: true,
+ enumerable: false,
+ value: _this.constructor.name,
+ writable: true
+ });
+
+ if (Error.hasOwnProperty('captureStackTrace')) {
+ Error.captureStackTrace(_this, _this.constructor);
+ return _possibleConstructorReturn(_this);
+ }
+
+ Object.defineProperty(_this, 'stack', {
+ configurable: true,
+ enumerable: false,
+ value: new Error(message).stack,
+ writable: true
+ });
+ return _this;
+ }
+
+ return ExtendableError;
+}(_extendableBuiltin(Error));
+
+export default ExtendableError;
diff --git a/node_modules/es6-error/lib/index.js b/node_modules/es6-error/lib/index.js
new file mode 100644
index 0000000..617bef7
--- /dev/null
+++ b/node_modules/es6-error/lib/index.js
@@ -0,0 +1,79 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+function _extendableBuiltin(cls) {
+ function ExtendableBuiltin() {
+ cls.apply(this, arguments);
+ }
+
+ ExtendableBuiltin.prototype = Object.create(cls.prototype, {
+ constructor: {
+ value: cls,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(ExtendableBuiltin, cls);
+ } else {
+ ExtendableBuiltin.__proto__ = cls;
+ }
+
+ return ExtendableBuiltin;
+}
+
+var ExtendableError = function (_extendableBuiltin2) {
+ _inherits(ExtendableError, _extendableBuiltin2);
+
+ function ExtendableError() {
+ var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+
+ _classCallCheck(this, ExtendableError);
+
+ // extending Error is weird and does not propagate `message`
+ var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));
+
+ Object.defineProperty(_this, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ });
+
+ Object.defineProperty(_this, 'name', {
+ configurable: true,
+ enumerable: false,
+ value: _this.constructor.name,
+ writable: true
+ });
+
+ if (Error.hasOwnProperty('captureStackTrace')) {
+ Error.captureStackTrace(_this, _this.constructor);
+ return _possibleConstructorReturn(_this);
+ }
+
+ Object.defineProperty(_this, 'stack', {
+ configurable: true,
+ enumerable: false,
+ value: new Error(message).stack,
+ writable: true
+ });
+ return _this;
+ }
+
+ return ExtendableError;
+}(_extendableBuiltin(Error));
+
+exports.default = ExtendableError;
+module.exports = exports['default'];
diff --git a/node_modules/es6-error/package.json b/node_modules/es6-error/package.json
new file mode 100644
index 0000000..c5782a5
--- /dev/null
+++ b/node_modules/es6-error/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "es6-error",
+ "version": "4.1.1",
+ "description": "Easily-extendable error for use with ES6 classes",
+ "main": "./lib/index",
+ "module": "./es6/index.js",
+ "typings": "./typings/index.d.ts",
+ "files": [
+ "lib",
+ "es6",
+ "typings"
+ ],
+ "scripts": {
+ "test": "cross-env BABEL_ENV=test mocha --require babel-core/register --recursive",
+ "clean": "rimraf lib es6",
+ "build": "npm run clean && npm run build:cjs && npm run build:es6",
+ "build:cjs": "mkdir -p lib && cross-env BABEL_ENV=cjs babel src/index.js -o lib/index.js",
+ "build:es6": "mkdir -p es6 && cross-env BABEL_ENV=es6 babel src/index.js -o es6/index.js",
+ "prepublishOnly": "npm run build && npm run test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/bjyoungblood/es6-error.git"
+ },
+ "keywords": [
+ "es6",
+ "error",
+ "babel"
+ ],
+ "author": "Ben Youngblood",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/bjyoungblood/es6-error/issues"
+ },
+ "homepage": "https://github.com/bjyoungblood/es6-error",
+ "devDependencies": {
+ "babel-cli": "^6.26.0",
+ "babel-core": "^6.26.0",
+ "babel-plugin-add-module-exports": "^0.2.1",
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
+ "babel-preset-env": "^1.6.1",
+ "chai": "^4.1.2",
+ "cross-env": "^5.1.1",
+ "mocha": "^4.0.1",
+ "rimraf": "^2.6.2"
+ },
+ "dependencies": {}
+}
diff --git a/node_modules/es6-error/typings/index.d.ts b/node_modules/es6-error/typings/index.d.ts
new file mode 100644
index 0000000..c1b1f12
--- /dev/null
+++ b/node_modules/es6-error/typings/index.d.ts
@@ -0,0 +1 @@
+export default class ExtendableError extends Error { }
diff --git a/node_modules/escape-string-regexp/index.d.ts b/node_modules/escape-string-regexp/index.d.ts
new file mode 100644
index 0000000..7d34edc
--- /dev/null
+++ b/node_modules/escape-string-regexp/index.d.ts
@@ -0,0 +1,18 @@
+/**
+Escape RegExp special characters.
+
+You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
+
+@example
+```
+import escapeStringRegexp = require('escape-string-regexp');
+
+const escapedString = escapeStringRegexp('How much $ for a 🦄?');
+//=> 'How much \\$ for a 🦄\\?'
+
+new RegExp(escapedString);
+```
+*/
+declare const escapeStringRegexp: (string: string) => string;
+
+export = escapeStringRegexp;
diff --git a/node_modules/escape-string-regexp/index.js b/node_modules/escape-string-regexp/index.js
new file mode 100644
index 0000000..387c561
--- /dev/null
+++ b/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = string => {
+ if (typeof string !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ // Escape characters with special meaning either inside or outside character sets.
+ // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
+ return string
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
+ .replace(/-/g, '\\x2d');
+};
diff --git a/node_modules/escape-string-regexp/license b/node_modules/escape-string-regexp/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/escape-string-regexp/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/escape-string-regexp/package.json b/node_modules/escape-string-regexp/package.json
new file mode 100644
index 0000000..c6eb4a9
--- /dev/null
+++ b/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "escape-string-regexp",
+ "version": "4.0.0",
+ "description": "Escape RegExp special characters",
+ "license": "MIT",
+ "repository": "sindresorhus/escape-string-regexp",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "escape",
+ "regex",
+ "regexp",
+ "regular",
+ "expression",
+ "string",
+ "special",
+ "characters"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.11.0",
+ "xo": "^0.28.3"
+ }
+}
diff --git a/node_modules/escape-string-regexp/readme.md b/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 0000000..2945dfc
--- /dev/null
+++ b/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,34 @@
+# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+## Install
+
+```
+$ npm install escape-string-regexp
+```
+
+## Usage
+
+```js
+const escapeStringRegexp = require('escape-string-regexp');
+
+const escapedString = escapeStringRegexp('How much $ for a 🦄?');
+//=> 'How much \\$ for a 🦄\\?'
+
+new RegExp(escapedString);
+```
+
+You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/extend/.editorconfig b/node_modules/extend/.editorconfig
new file mode 100644
index 0000000..bc228f8
--- /dev/null
+++ b/node_modules/extend/.editorconfig
@@ -0,0 +1,20 @@
+root = true
+
+[*]
+indent_style = tab
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+max_line_length = 150
+
+[CHANGELOG.md]
+indent_style = space
+indent_size = 2
+
+[*.json]
+max_line_length = off
+
+[Makefile]
+max_line_length = off
diff --git a/node_modules/extend/.eslintrc b/node_modules/extend/.eslintrc
new file mode 100644
index 0000000..a34cf28
--- /dev/null
+++ b/node_modules/extend/.eslintrc
@@ -0,0 +1,17 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "complexity": [2, 20],
+ "eqeqeq": [2, "allow-null"],
+ "func-name-matching": [1],
+ "max-depth": [1, 4],
+ "max-statements": [2, 26],
+ "no-extra-parens": [1],
+ "no-magic-numbers": [0],
+ "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
+ "sort-keys": [0],
+ }
+}
diff --git a/node_modules/extend/.jscs.json b/node_modules/extend/.jscs.json
new file mode 100644
index 0000000..3cce01d
--- /dev/null
+++ b/node_modules/extend/.jscs.json
@@ -0,0 +1,175 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": {
+ "allExcept": [],
+ "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
+ },
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceAfterComma": false,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": { "allExcept": ["keywords"] },
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 6
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "disallowMultiLineTernary": true,
+
+ "validateOrderInObjectKeys": false,
+
+ "disallowIdenticalDestructuringNames": true,
+
+ "disallowNestedTernaries": { "maxLevel": 1 },
+
+ "requireSpaceAfterComma": { "allExcept": ["trailing"] },
+ "requireAlignedMultilineParams": false,
+
+ "requireSpacesInGenerator": {
+ "afterStar": true
+ },
+
+ "disallowSpacesInGenerator": {
+ "beforeStar": true
+ },
+
+ "disallowVar": false,
+
+ "requireArrayDestructuring": false,
+
+ "requireEnhancedObjectLiterals": false,
+
+ "requireObjectDestructuring": false,
+
+ "requireEarlyReturn": false,
+
+ "requireCapitalizedConstructorsNew": {
+ "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
+ },
+
+ "requireImportAlphabetized": false,
+
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeDestructuredValues": true,
+
+ "disallowSpacesInsideTemplateStringPlaceholders": true,
+
+ "disallowArrayDestructuringReturn": false,
+
+ "requireNewlineBeforeSingleStatementsInIf": false,
+
+ "disallowUnusedVariables": true,
+
+ "requireSpacesInsideImportedObjectBraces": true,
+
+ "requireUseStrict": true
+}
+
diff --git a/node_modules/extend/.travis.yml b/node_modules/extend/.travis.yml
new file mode 100644
index 0000000..5ccdfc4
--- /dev/null
+++ b/node_modules/extend/.travis.yml
@@ -0,0 +1,230 @@
+language: node_js
+os:
+ - linux
+node_js:
+ - "10.7"
+ - "9.11"
+ - "8.11"
+ - "7.10"
+ - "6.14"
+ - "5.12"
+ - "4.9"
+ - "iojs-v3.3"
+ - "iojs-v2.5"
+ - "iojs-v1.8"
+ - "0.12"
+ - "0.10"
+ - "0.8"
+before_install:
+ - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
+ - 'nvm install-latest-npm'
+install:
+ - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
+script:
+ - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
+ - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
+ - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
+ - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
+sudo: false
+env:
+ - TEST=true
+matrix:
+ fast_finish: true
+ include:
+ - node_js: "lts/*"
+ env: PRETEST=true
+ - node_js: "lts/*"
+ env: POSTTEST=true
+ - node_js: "4"
+ env: COVERAGE=true
+ - node_js: "10.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "10.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "9.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.13"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.12"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.4"
+ env: TEST=true ALLOW_FAILURE=true
+ allow_failures:
+ - os: osx
+ - env: TEST=true ALLOW_FAILURE=true
diff --git a/node_modules/extend/CHANGELOG.md b/node_modules/extend/CHANGELOG.md
new file mode 100644
index 0000000..2cf7de6
--- /dev/null
+++ b/node_modules/extend/CHANGELOG.md
@@ -0,0 +1,83 @@
+3.0.2 / 2018-07-19
+==================
+ * [Fix] Prevent merging `__proto__` property (#48)
+ * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
+ * [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`
+
+3.0.1 / 2017-04-27
+==================
+ * [Fix] deep extending should work with a non-object (#46)
+ * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`
+ * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix
+ * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG.
+ * [Docs] Add example to readme (#34)
+
+3.0.0 / 2015-07-01
+==================
+ * [Possible breaking change] Use global "strict" directive (#32)
+ * [Tests] `int` is an ES3 reserved word
+ * [Tests] Test up to `io.js` `v2.3`
+ * [Tests] Add `npm run eslint`
+ * [Dev Deps] Update `covert`, `jscs`
+
+2.0.1 / 2015-04-25
+==================
+ * Use an inline `isArray` check, for ES3 browsers. (#27)
+ * Some old browsers fail when an identifier is `toString`
+ * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds
+ * Add license info to package.json (#25)
+ * Update `tape`, `jscs`
+ * Adding a CHANGELOG
+
+2.0.0 / 2014-10-01
+==================
+ * Increase code coverage to 100%; run code coverage as part of tests
+ * Add `npm run lint`; Run linter as part of tests
+ * Remove nodeType and setInterval checks in isPlainObject
+ * Updating `tape`, `jscs`, `covert`
+ * General style and README cleanup
+
+1.3.0 / 2014-06-20
+==================
+ * Add component.json for browser support (#18)
+ * Use SVG for badges in README (#16)
+ * Updating `tape`, `covert`
+ * Updating travis-ci to work with multiple node versions
+ * Fix `deep === false` bug (returning target as {}) (#14)
+ * Fixing constructor checks in isPlainObject
+ * Adding additional test coverage
+ * Adding `npm run coverage`
+ * Add LICENSE (#13)
+ * Adding a warning about `false`, per #11
+ * General style and whitespace cleanup
+
+1.2.1 / 2013-09-14
+==================
+ * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8
+ * Updating `tape`
+
+1.2.0 / 2013-09-02
+==================
+ * Updating the README: add badges
+ * Adding a missing variable reference.
+ * Using `tape` instead of `buster` for tests; add more tests (#7)
+ * Adding node 0.10 to Travis CI (#6)
+ * Enabling "npm test" and cleaning up package.json (#5)
+ * Add Travis CI.
+
+1.1.3 / 2012-12-06
+==================
+ * Added unit tests.
+ * Ensure extend function is named. (Looks nicer in a stack trace.)
+ * README cleanup.
+
+1.1.1 / 2012-11-07
+==================
+ * README cleanup.
+ * Added installation instructions.
+ * Added a missing semicolon
+
+1.0.0 / 2012-04-08
+==================
+ * Initial commit
+
diff --git a/node_modules/extend/LICENSE b/node_modules/extend/LICENSE
new file mode 100644
index 0000000..e16d6a5
--- /dev/null
+++ b/node_modules/extend/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Stefan Thomas
+
+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/extend/README.md b/node_modules/extend/README.md
new file mode 100644
index 0000000..5b8249a
--- /dev/null
+++ b/node_modules/extend/README.md
@@ -0,0 +1,81 @@
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+
+# extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup>
+
+`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
+
+Notes:
+
+* Since Node.js >= 4,
+ [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ now offers the same functionality natively (but without the "deep copy" option).
+ See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).
+* Some native implementations of `Object.assign` in both Node.js and many
+ browsers (since NPM modules are for the browser too) may not be fully
+ spec-compliant.
+ Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for
+ a compliant candidate.
+
+## Installation
+
+This package is available on [npm][npm-url] as: `extend`
+
+``` sh
+npm install extend
+```
+
+## Usage
+
+**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
+
+*Extend one object with one or more others, returning the modified object.*
+
+**Example:**
+
+``` js
+var extend = require('extend');
+extend(targetObject, object1, object2);
+```
+
+Keep in mind that the target object will be modified, and will be returned from extend().
+
+If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
+Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
+Warning: passing `false` as the first argument is not supported.
+
+### Arguments
+
+* `deep` *Boolean* (optional)
+If set, the merge becomes recursive (i.e. deep copy).
+* `target` *Object*
+The object to extend.
+* `object1` *Object*
+The object that will be merged into the first.
+* `objectN` *Object* (Optional)
+More objects to merge into the first.
+
+## License
+
+`node-extend` is licensed under the [MIT License][mit-license-url].
+
+## Acknowledgements
+
+All credit to the jQuery authors for perfecting this amazing utility.
+
+Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
+
+[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
+[travis-url]: https://travis-ci.org/justmoon/node-extend
+[npm-url]: https://npmjs.org/package/extend
+[mit-license-url]: http://opensource.org/licenses/MIT
+[github-justmoon]: https://github.com/justmoon
+[github-insin]: https://github.com/insin
+[github-ljharb]: https://github.com/ljharb
+[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg
+[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
+[deps-url]: https://david-dm.org/justmoon/node-extend
+[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
+[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
+
diff --git a/node_modules/extend/component.json b/node_modules/extend/component.json
new file mode 100644
index 0000000..1500a2f
--- /dev/null
+++ b/node_modules/extend/component.json
@@ -0,0 +1,32 @@
+{
+ "name": "extend",
+ "author": "Stefan Thomas <justmoon@members.fsf.org> (http://www.justmoon.net)",
+ "version": "3.0.0",
+ "description": "Port of jQuery.extend for node.js and the browser.",
+ "scripts": [
+ "index.js"
+ ],
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "repository" : {
+ "type": "git",
+ "url": "https://github.com/justmoon/node-extend.git"
+ },
+ "dependencies": {
+ },
+ "devDependencies": {
+ "tape" : "~3.0.0",
+ "covert": "~0.4.0",
+ "jscs": "~1.6.2"
+ }
+}
+
diff --git a/node_modules/extend/index.js b/node_modules/extend/index.js
new file mode 100644
index 0000000..2aa3faa
--- /dev/null
+++ b/node_modules/extend/index.js
@@ -0,0 +1,117 @@
+'use strict';
+
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+var defineProperty = Object.defineProperty;
+var gOPD = Object.getOwnPropertyDescriptor;
+
+var isArray = function isArray(arr) {
+ if (typeof Array.isArray === 'function') {
+ return Array.isArray(arr);
+ }
+
+ return toStr.call(arr) === '[object Array]';
+};
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
+ }
+
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) { /**/ }
+
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
+var setProperty = function setProperty(target, options) {
+ if (defineProperty && options.name === '__proto__') {
+ defineProperty(target, options.name, {
+ enumerable: true,
+ configurable: true,
+ value: options.newValue,
+ writable: true
+ });
+ } else {
+ target[options.name] = options.newValue;
+ }
+};
+
+// Return undefined instead of __proto__ if '__proto__' is not an own property
+var getProperty = function getProperty(obj, name) {
+ if (name === '__proto__') {
+ if (!hasOwn.call(obj, name)) {
+ return void 0;
+ } else if (gOPD) {
+ // In early versions of node, obj['__proto__'] is buggy when obj has
+ // __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
+ return gOPD(obj, name).value;
+ }
+ }
+
+ return obj[name];
+};
+
+module.exports = function extend() {
+ var options, name, src, copy, copyIsArray, clone;
+ var target = arguments[0];
+ var i = 1;
+ var length = arguments.length;
+ var deep = false;
+
+ // Handle a deep copy situation
+ if (typeof target === 'boolean') {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+ if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
+ target = {};
+ }
+
+ for (; i < length; ++i) {
+ options = arguments[i];
+ // Only deal with non-null/undefined values
+ if (options != null) {
+ // Extend the base object
+ for (name in options) {
+ src = getProperty(target, name);
+ copy = getProperty(options, name);
+
+ // Prevent never-ending loop
+ if (target !== copy) {
+ // Recurse if we're merging plain objects or arrays
+ if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
+ if (copyIsArray) {
+ copyIsArray = false;
+ clone = src && isArray(src) ? src : [];
+ } else {
+ clone = src && isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
+
+ // Don't bring in undefined values
+ } else if (typeof copy !== 'undefined') {
+ setProperty(target, { name: name, newValue: copy });
+ }
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
diff --git a/node_modules/extend/package.json b/node_modules/extend/package.json
new file mode 100644
index 0000000..85279f7
--- /dev/null
+++ b/node_modules/extend/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "extend",
+ "author": "Stefan Thomas <justmoon@members.fsf.org> (http://www.justmoon.net)",
+ "version": "3.0.2",
+ "description": "Port of jQuery.extend for node.js and the browser",
+ "main": "index",
+ "scripts": {
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "posttest": "npm run coverage-quiet",
+ "tests-only": "node test",
+ "coverage": "covert test/index.js",
+ "coverage-quiet": "covert test/index.js --quiet",
+ "lint": "npm run jscs && npm run eslint",
+ "jscs": "jscs *.js */*.js",
+ "eslint": "eslint *.js */*.js"
+ },
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/justmoon/node-extend.git"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "covert": "^1.1.0",
+ "eslint": "^4.19.1",
+ "jscs": "^3.0.7",
+ "tape": "^4.9.1"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/extract-zip/.travis.yml b/node_modules/extract-zip/.travis.yml
new file mode 100644
index 0000000..2e470e0
--- /dev/null
+++ b/node_modules/extract-zip/.travis.yml
@@ -0,0 +1,9 @@
+sudo: false
+language: node_js
+node_js:
+ - '0.12'
+ - 'iojs'
+ - '4'
+ - '6'
+ - '8'
+ - '10'
diff --git a/node_modules/extract-zip/CONTRIBUTING.md b/node_modules/extract-zip/CONTRIBUTING.md
new file mode 100644
index 0000000..eea6b39
--- /dev/null
+++ b/node_modules/extract-zip/CONTRIBUTING.md
@@ -0,0 +1 @@
+Before potentially wasting your time by making major, opinionated changes to this codebase please feel free to open a discussion repos in the Issues section of the repository. Outline your proposed idea and seek feedback from the maintainer first before implementing major features. \ No newline at end of file
diff --git a/node_modules/extract-zip/LICENSE b/node_modules/extract-zip/LICENSE
new file mode 100644
index 0000000..2921069
--- /dev/null
+++ b/node_modules/extract-zip/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2014 Max Ogden and other contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/extract-zip/cli.js b/node_modules/extract-zip/cli.js
new file mode 100755
index 0000000..76c337d
--- /dev/null
+++ b/node_modules/extract-zip/cli.js
@@ -0,0 +1,20 @@
+#!/usr/bin/env node
+
+var extract = require('./')
+
+var args = process.argv.slice(2)
+var source = args[0]
+var dest = args[1] || process.cwd()
+if (!source) {
+ console.error('Usage: extract-zip foo.zip <targetDirectory>')
+ process.exit(1)
+}
+
+extract(source, {dir: dest}, function (err, results) {
+ if (err) {
+ console.error('error!', err)
+ process.exit(1)
+ } else {
+ process.exit(0)
+ }
+})
diff --git a/node_modules/extract-zip/index.js b/node_modules/extract-zip/index.js
new file mode 100644
index 0000000..682d401
--- /dev/null
+++ b/node_modules/extract-zip/index.js
@@ -0,0 +1,211 @@
+var fs = require('fs')
+var path = require('path')
+var yauzl = require('yauzl')
+var mkdirp = require('mkdirp')
+var concat = require('concat-stream')
+var debug = require('debug')('extract-zip')
+
+module.exports = function (zipPath, opts, cb) {
+ debug('creating target directory', opts.dir)
+
+ if (path.isAbsolute(opts.dir) === false) {
+ return cb(new Error('Target directory is expected to be absolute'))
+ }
+
+ mkdirp(opts.dir, function (err) {
+ if (err) return cb(err)
+
+ fs.realpath(opts.dir, function (err, canonicalDir) {
+ if (err) return cb(err)
+
+ opts.dir = canonicalDir
+
+ openZip(opts)
+ })
+ })
+
+ function openZip () {
+ debug('opening', zipPath, 'with opts', opts)
+
+ yauzl.open(zipPath, {lazyEntries: true}, function (err, zipfile) {
+ if (err) return cb(err)
+
+ var cancelled = false
+
+ zipfile.on('error', function (err) {
+ if (err) {
+ cancelled = true
+ return cb(err)
+ }
+ })
+ zipfile.readEntry()
+
+ zipfile.on('close', function () {
+ if (!cancelled) {
+ debug('zip extraction complete')
+ cb()
+ }
+ })
+
+ zipfile.on('entry', function (entry) {
+ if (cancelled) {
+ debug('skipping entry', entry.fileName, {cancelled: cancelled})
+ return
+ }
+
+ debug('zipfile entry', entry.fileName)
+
+ if (/^__MACOSX\//.test(entry.fileName)) {
+ // dir name starts with __MACOSX/
+ zipfile.readEntry()
+ return
+ }
+
+ var destDir = path.dirname(path.join(opts.dir, entry.fileName))
+
+ mkdirp(destDir, function (err) {
+ if (err) {
+ cancelled = true
+ zipfile.close()
+ return cb(err)
+ }
+
+ fs.realpath(destDir, function (err, canonicalDestDir) {
+ if (err) {
+ cancelled = true
+ zipfile.close()
+ return cb(err)
+ }
+
+ var relativeDestDir = path.relative(opts.dir, canonicalDestDir)
+
+ if (relativeDestDir.split(path.sep).indexOf('..') !== -1) {
+ cancelled = true
+ zipfile.close()
+ return cb(new Error('Out of bound path "' + canonicalDestDir + '" found while processing file ' + entry.fileName))
+ }
+
+ extractEntry(entry, function (err) {
+ // if any extraction fails then abort everything
+ if (err) {
+ cancelled = true
+ zipfile.close()
+ return cb(err)
+ }
+ debug('finished processing', entry.fileName)
+ zipfile.readEntry()
+ })
+ })
+ })
+ })
+
+ function extractEntry (entry, done) {
+ if (cancelled) {
+ debug('skipping entry extraction', entry.fileName, {cancelled: cancelled})
+ return setImmediate(done)
+ }
+
+ if (opts.onEntry) {
+ opts.onEntry(entry, zipfile)
+ }
+
+ var dest = path.join(opts.dir, entry.fileName)
+
+ // convert external file attr int into a fs stat mode int
+ var mode = (entry.externalFileAttributes >> 16) & 0xFFFF
+ // check if it's a symlink or dir (using stat mode constants)
+ var IFMT = 61440
+ var IFDIR = 16384
+ var IFLNK = 40960
+ var symlink = (mode & IFMT) === IFLNK
+ var isDir = (mode & IFMT) === IFDIR
+
+ // Failsafe, borrowed from jsZip
+ if (!isDir && entry.fileName.slice(-1) === '/') {
+ isDir = true
+ }
+
+ // check for windows weird way of specifying a directory
+ // https://github.com/maxogden/extract-zip/issues/13#issuecomment-154494566
+ var madeBy = entry.versionMadeBy >> 8
+ if (!isDir) isDir = (madeBy === 0 && entry.externalFileAttributes === 16)
+
+ // if no mode then default to default modes
+ if (mode === 0) {
+ if (isDir) {
+ if (opts.defaultDirMode) mode = parseInt(opts.defaultDirMode, 10)
+ if (!mode) mode = 493 // Default to 0755
+ } else {
+ if (opts.defaultFileMode) mode = parseInt(opts.defaultFileMode, 10)
+ if (!mode) mode = 420 // Default to 0644
+ }
+ }
+
+ debug('extracting entry', { filename: entry.fileName, isDir: isDir, isSymlink: symlink })
+
+ // reverse umask first (~)
+ var umask = ~process.umask()
+ // & with processes umask to override invalid perms
+ var procMode = mode & umask
+
+ // always ensure folders are created
+ var destDir = dest
+ if (!isDir) destDir = path.dirname(dest)
+
+ debug('mkdirp', {dir: destDir})
+ mkdirp(destDir, function (err) {
+ if (err) {
+ debug('mkdirp error', destDir, {error: err})
+ cancelled = true
+ return done(err)
+ }
+
+ if (isDir) return done()
+
+ debug('opening read stream', dest)
+ zipfile.openReadStream(entry, function (err, readStream) {
+ if (err) {
+ debug('openReadStream error', err)
+ cancelled = true
+ return done(err)
+ }
+
+ readStream.on('error', function (err) {
+ console.log('read err', err)
+ })
+
+ if (symlink) writeSymlink()
+ else writeStream()
+
+ function writeStream () {
+ var writeStream = fs.createWriteStream(dest, {mode: procMode})
+ readStream.pipe(writeStream)
+
+ writeStream.on('finish', function () {
+ done()
+ })
+
+ writeStream.on('error', function (err) {
+ debug('write error', {error: err})
+ cancelled = true
+ return done(err)
+ })
+ }
+
+ // AFAICT the content of the symlink file itself is the symlink target filename string
+ function writeSymlink () {
+ readStream.pipe(concat(function (data) {
+ var link = data.toString()
+ debug('creating symlink', link, dest)
+ fs.symlink(link, dest, function (err) {
+ if (err) cancelled = true
+ done(err)
+ })
+ }))
+ }
+ })
+ })
+ }
+ })
+ }
+}
diff --git a/node_modules/extract-zip/node_modules/debug/.coveralls.yml b/node_modules/extract-zip/node_modules/debug/.coveralls.yml
new file mode 100644
index 0000000..20a7068
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/node_modules/extract-zip/node_modules/debug/.eslintrc b/node_modules/extract-zip/node_modules/debug/.eslintrc
new file mode 100644
index 0000000..8a37ae2
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "rules": {
+ "no-console": 0,
+ "no-empty": [1, { "allowEmptyCatch": true }]
+ },
+ "extends": "eslint:recommended"
+}
diff --git a/node_modules/extract-zip/node_modules/debug/.npmignore b/node_modules/extract-zip/node_modules/debug/.npmignore
new file mode 100644
index 0000000..5f60eec
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/.npmignore
@@ -0,0 +1,9 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
+coverage
+bower.json
diff --git a/node_modules/extract-zip/node_modules/debug/.travis.yml b/node_modules/extract-zip/node_modules/debug/.travis.yml
new file mode 100644
index 0000000..6c6090c
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/.travis.yml
@@ -0,0 +1,14 @@
+
+language: node_js
+node_js:
+ - "6"
+ - "5"
+ - "4"
+
+install:
+ - make node_modules
+
+script:
+ - make lint
+ - make test
+ - make coveralls
diff --git a/node_modules/extract-zip/node_modules/debug/CHANGELOG.md b/node_modules/extract-zip/node_modules/debug/CHANGELOG.md
new file mode 100644
index 0000000..eadaa18
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,362 @@
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/extract-zip/node_modules/debug/LICENSE b/node_modules/extract-zip/node_modules/debug/LICENSE
new file mode 100644
index 0000000..658c933
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/extract-zip/node_modules/debug/Makefile b/node_modules/extract-zip/node_modules/debug/Makefile
new file mode 100644
index 0000000..584da8b
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/Makefile
@@ -0,0 +1,50 @@
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+.FORCE:
+
+install: node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+lint: .FORCE
+ eslint browser.js debug.js index.js node.js
+
+test-node: .FORCE
+ istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+
+test-browser: .FORCE
+ mkdir -p dist
+
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+ karma start --single-run
+ rimraf dist
+
+test: .FORCE
+ concurrently \
+ "make test-node" \
+ "make test-browser"
+
+coveralls:
+ cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+.PHONY: all install clean distclean
diff --git a/node_modules/extract-zip/node_modules/debug/README.md b/node_modules/extract-zip/node_modules/debug/README.md
new file mode 100644
index 0000000..f67be6b
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/README.md
@@ -0,0 +1,312 @@
+# debug
+[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+
+
+A tiny node.js debugging utility modelled after node core's debugging technique.
+
+**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+ Note that PowerShell uses different syntax to set environment variables.
+
+ ```cmd
+ $env:DEBUG = "*,-not_this"
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Environment Variables
+
+ When running through Node.js, you can set a few environment variables that will
+ change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+ __Note:__ The environment variables beginning with `DEBUG_` end up being
+ converted into an Options object that gets used with `%o`/`%O` formatters.
+ See the Node.js documentation for
+ [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+ for the complete list.
+
+## Formatters
+
+
+ Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+### Custom formatters
+
+ You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+## Browser support
+ You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+ or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+ if you don't want to build it yourself.
+
+ Debug's enable state is currently persisted by `localStorage`.
+ Consider the situation shown below where you have `worker:a` and `worker:b`,
+ and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/extract-zip/node_modules/debug/component.json b/node_modules/extract-zip/node_modules/debug/component.json
new file mode 100644
index 0000000..9de2641
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.6.9",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "src/browser.js",
+ "scripts": [
+ "src/browser.js",
+ "src/debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/node_modules/extract-zip/node_modules/debug/karma.conf.js b/node_modules/extract-zip/node_modules/debug/karma.conf.js
new file mode 100644
index 0000000..103a82d
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/karma.conf.js
@@ -0,0 +1,70 @@
+// Karma configuration
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
+
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'dist/debug.js',
+ 'test/*spec.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ 'src/node.js'
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['progress'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}
diff --git a/node_modules/extract-zip/node_modules/debug/node.js b/node_modules/extract-zip/node_modules/debug/node.js
new file mode 100644
index 0000000..7fc36fe
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/node_modules/extract-zip/node_modules/debug/package.json b/node_modules/extract-zip/node_modules/debug/package.json
new file mode 100644
index 0000000..dc787ba
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "debug",
+ "version": "2.6.9",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ }
+}
diff --git a/node_modules/extract-zip/node_modules/debug/src/browser.js b/node_modules/extract-zip/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..7106924
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/src/browser.js
@@ -0,0 +1,185 @@
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return;
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit')
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/node_modules/extract-zip/node_modules/debug/src/debug.js b/node_modules/extract-zip/node_modules/debug/src/debug.js
new file mode 100644
index 0000000..6a5e3fc
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/src/debug.js
@@ -0,0 +1,202 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
+
+ var self = debug;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ return debug;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ exports.names = [];
+ exports.skips = [];
+
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/node_modules/extract-zip/node_modules/debug/src/index.js b/node_modules/extract-zip/node_modules/debug/src/index.js
new file mode 100644
index 0000000..e12cf4d
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process !== 'undefined' && process.type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/extract-zip/node_modules/debug/src/inspector-log.js b/node_modules/extract-zip/node_modules/debug/src/inspector-log.js
new file mode 100644
index 0000000..60ea6c0
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/src/inspector-log.js
@@ -0,0 +1,15 @@
+module.exports = inspectorLog;
+
+// black hole
+const nullStream = new (require('stream').Writable)();
+nullStream._write = () => {};
+
+/**
+ * Outputs a `console.log()` to the Node.js Inspector console *only*.
+ */
+function inspectorLog() {
+ const stdout = console._stdout;
+ console._stdout = nullStream;
+ console.log.apply(console, arguments);
+ console._stdout = stdout;
+}
diff --git a/node_modules/extract-zip/node_modules/debug/src/node.js b/node_modules/extract-zip/node_modules/debug/src/node.js
new file mode 100644
index 0000000..b15109c
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/debug/src/node.js
@@ -0,0 +1,248 @@
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // camel-case
+ var prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+ // coerce string value into JS value
+ var val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === 'null') val = null;
+ else val = Number(val);
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+
+if (1 !== fd && 2 !== fd) {
+ util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
+}
+
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var name = this.namespace;
+ var useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ */
+
+function log() {
+ return stream.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+ debug.inspectOpts = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/node_modules/extract-zip/node_modules/ms/index.js b/node_modules/extract-zip/node_modules/ms/index.js
new file mode 100644
index 0000000..6a522b1
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/ms/index.js
@@ -0,0 +1,152 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) {
+ return;
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name;
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/node_modules/extract-zip/node_modules/ms/license.md b/node_modules/extract-zip/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/extract-zip/node_modules/ms/package.json b/node_modules/extract-zip/node_modules/ms/package.json
new file mode 100644
index 0000000..6a31c81
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.0.0",
+ "description": "Tiny milisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "expect.js": "0.3.1",
+ "husky": "0.13.3",
+ "lint-staged": "3.4.1",
+ "mocha": "3.4.1"
+ }
+}
diff --git a/node_modules/extract-zip/node_modules/ms/readme.md b/node_modules/extract-zip/node_modules/ms/readme.md
new file mode 100644
index 0000000..84a9974
--- /dev/null
+++ b/node_modules/extract-zip/node_modules/ms/readme.md
@@ -0,0 +1,51 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+```
+
+### Convert from milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time format written-out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+
+## Caught a bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/extract-zip/package.json b/node_modules/extract-zip/package.json
new file mode 100644
index 0000000..ff9269a
--- /dev/null
+++ b/node_modules/extract-zip/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "extract-zip",
+ "version": "1.7.0",
+ "description": "unzip a zip file into a directory using 100% javascript",
+ "main": "index.js",
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "scripts": {
+ "test": "standard && node test/test.js"
+ },
+ "author": "max ogden",
+ "license": "BSD-2-Clause",
+ "repository": "maxogden/extract-zip",
+ "keywords": [
+ "unzip",
+ "zip",
+ "extract"
+ ],
+ "dependencies": {
+ "concat-stream": "^1.6.2",
+ "debug": "^2.6.9",
+ "mkdirp": "^0.5.4",
+ "yauzl": "^2.10.0"
+ },
+ "devDependencies": {
+ "rimraf": "^2.2.8",
+ "standard": "^5.2.2",
+ "tape": "^4.2.0",
+ "temp": "^0.8.3"
+ },
+ "directories": {
+ "test": "test"
+ }
+}
diff --git a/node_modules/extract-zip/readme.md b/node_modules/extract-zip/readme.md
new file mode 100644
index 0000000..af17885
--- /dev/null
+++ b/node_modules/extract-zip/readme.md
@@ -0,0 +1,49 @@
+# extract-zip
+
+Unzip written in pure JavaScript. Extracts a zip into a directory. Available as a library or a command line program.
+
+Uses the [`yauzl`](http://npmjs.org/yauzl) ZIP parser.
+
+[![NPM](https://nodei.co/npm/extract-zip.png?global=true)](https://nodei.co/npm/extract-zip/)
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+[![Build Status](https://travis-ci.org/maxogden/extract-zip.svg?branch=master)](https://travis-ci.org/maxogden/extract-zip)
+
+## Installation
+
+Get the library:
+
+```
+npm install extract-zip --save
+```
+
+Install the command line program:
+
+```
+npm install extract-zip -g
+```
+
+## JS API
+
+```js
+var extract = require('extract-zip')
+extract(source, {dir: target}, function (err) {
+ // extraction is complete. make sure to handle the err
+})
+```
+
+### Options
+
+- `dir` - defaults to `process.cwd()`
+- `defaultDirMode` - integer - Directory Mode (permissions) will default to `493` (octal `0755` in integer)
+- `defaultFileMode` - integer - File Mode (permissions) will default to `420` (octal `0644` in integer)
+- `onEntry` - function - if present, will be called with `(entry, zipfile)`, entry is every entry from the zip file forwarded from the `entry` event from yauzl. `zipfile` is the `yauzl` instance
+
+Default modes are only used if no permissions are set in the zip file.
+
+## CLI Usage
+
+```
+extract-zip foo.zip <targetDirectory>
+```
+
+If not specified, `targetDirectory` will default to `process.cwd()`.
diff --git a/node_modules/extsprintf/.gitmodules b/node_modules/extsprintf/.gitmodules
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/extsprintf/.gitmodules
diff --git a/node_modules/extsprintf/.npmignore b/node_modules/extsprintf/.npmignore
new file mode 100644
index 0000000..6ed1ae9
--- /dev/null
+++ b/node_modules/extsprintf/.npmignore
@@ -0,0 +1,2 @@
+/deps
+/examples
diff --git a/node_modules/extsprintf/LICENSE b/node_modules/extsprintf/LICENSE
new file mode 100644
index 0000000..cbc0bb3
--- /dev/null
+++ b/node_modules/extsprintf/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012, Joyent, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE
diff --git a/node_modules/extsprintf/Makefile b/node_modules/extsprintf/Makefile
new file mode 100644
index 0000000..db84518
--- /dev/null
+++ b/node_modules/extsprintf/Makefile
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile: top-level Makefile
+#
+# This Makefile contains only repo-specific logic and uses included makefiles
+# to supply common targets (javascriptlint, jsstyle, restdown, etc.), which are
+# used by other repos as well.
+#
+
+#
+# Files
+#
+JSL = jsl
+JSSTYLE = jsstyle
+JS_FILES := $(shell find examples lib -name '*.js')
+JSL_FILES_NODE = $(JS_FILES)
+JSSTYLE_FILES = $(JS_FILES)
+JSL_CONF_NODE = jsl.node.conf
+
+# Default target is "check"
+check:
+
+include ./Makefile.targ
diff --git a/node_modules/extsprintf/Makefile.targ b/node_modules/extsprintf/Makefile.targ
new file mode 100644
index 0000000..2a64fe7
--- /dev/null
+++ b/node_modules/extsprintf/Makefile.targ
@@ -0,0 +1,285 @@
+# -*- mode: makefile -*-
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile.targ: common targets.
+#
+# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped
+# into other repos as-is without requiring any modifications. If you find
+# yourself changing this file, you should instead update the original copy in
+# eng.git and then update your repo to use the new version.
+#
+# This Makefile defines several useful targets and rules. You can use it by
+# including it from a Makefile that specifies some of the variables below.
+#
+# Targets defined in this Makefile:
+#
+# check Checks JavaScript files for lint and style
+# Checks bash scripts for syntax
+# Checks SMF manifests for validity against the SMF DTD
+#
+# clean Removes built files
+#
+# docs Builds restdown documentation in docs/
+#
+# prepush Depends on "check" and "test"
+#
+# test Does nothing (you should override this)
+#
+# xref Generates cscope (source cross-reference index)
+#
+# For details on what these targets are supposed to do, see the Joyent
+# Engineering Guide.
+#
+# To make use of these targets, you'll need to set some of these variables. Any
+# variables left unset will simply not be used.
+#
+# BASH_FILES Bash scripts to check for syntax
+# (paths relative to top-level Makefile)
+#
+# CLEAN_FILES Files to remove as part of the "clean" target. Note
+# that files generated by targets in this Makefile are
+# automatically included in CLEAN_FILES. These include
+# restdown-generated HTML and JSON files.
+#
+# DOC_FILES Restdown (documentation source) files. These are
+# assumed to be contained in "docs/", and must NOT
+# contain the "docs/" prefix.
+#
+# JSL_CONF_NODE Specify JavaScriptLint configuration files
+# JSL_CONF_WEB (paths relative to top-level Makefile)
+#
+# Node.js and Web configuration files are separate
+# because you'll usually want different global variable
+# configurations. If no file is specified, none is given
+# to jsl, which causes it to use a default configuration,
+# which probably isn't what you want.
+#
+# JSL_FILES_NODE JavaScript files to check with Node config file.
+# JSL_FILES_WEB JavaScript files to check with Web config file.
+#
+# You can also override these variables:
+#
+# BASH Path to bash (default: bash)
+#
+# CSCOPE_DIRS Directories to search for source files for the cscope
+# index. (default: ".")
+#
+# JSL Path to JavaScriptLint (default: "jsl")
+#
+# JSL_FLAGS_NODE Additional flags to pass through to JSL
+# JSL_FLAGS_WEB
+# JSL_FLAGS
+#
+# JSSTYLE Path to jsstyle (default: jsstyle)
+#
+# JSSTYLE_FLAGS Additional flags to pass through to jsstyle
+#
+
+#
+# Defaults for the various tools we use.
+#
+BASH ?= bash
+BASHSTYLE ?= tools/bashstyle
+CP ?= cp
+CSCOPE ?= cscope
+CSCOPE_DIRS ?= .
+JSL ?= jsl
+JSSTYLE ?= jsstyle
+MKDIR ?= mkdir -p
+MV ?= mv
+RESTDOWN_FLAGS ?=
+RMTREE ?= rm -rf
+JSL_FLAGS ?= --nologo --nosummary
+
+ifeq ($(shell uname -s),SunOS)
+ TAR ?= gtar
+else
+ TAR ?= tar
+endif
+
+
+#
+# Defaults for other fixed values.
+#
+BUILD = build
+DISTCLEAN_FILES += $(BUILD)
+DOC_BUILD = $(BUILD)/docs/public
+
+#
+# Configure JSL_FLAGS_{NODE,WEB} based on JSL_CONF_{NODE,WEB}.
+#
+ifneq ($(origin JSL_CONF_NODE), undefined)
+ JSL_FLAGS_NODE += --conf=$(JSL_CONF_NODE)
+endif
+
+ifneq ($(origin JSL_CONF_WEB), undefined)
+ JSL_FLAGS_WEB += --conf=$(JSL_CONF_WEB)
+endif
+
+#
+# Targets. For descriptions on what these are supposed to do, see the
+# Joyent Engineering Guide.
+#
+
+#
+# Instruct make to keep around temporary files. We have rules below that
+# automatically update git submodules as needed, but they employ a deps/*/.git
+# temporary file. Without this directive, make tries to remove these .git
+# directories after the build has completed.
+#
+.SECONDARY: $($(wildcard deps/*):%=%/.git)
+
+#
+# This rule enables other rules that use files from a git submodule to have
+# those files depend on deps/module/.git and have "make" automatically check
+# out the submodule as needed.
+#
+deps/%/.git:
+ git submodule update --init deps/$*
+
+#
+# These recipes make heavy use of dynamically-created phony targets. The parent
+# Makefile defines a list of input files like BASH_FILES. We then say that each
+# of these files depends on a fake target called filename.bashchk, and then we
+# define a pattern rule for those targets that runs bash in check-syntax-only
+# mode. This mechanism has the nice properties that if you specify zero files,
+# the rule becomes a noop (unlike a single rule to check all bash files, which
+# would invoke bash with zero files), and you can check individual files from
+# the command line with "make filename.bashchk".
+#
+.PHONY: check-bash
+check-bash: $(BASH_FILES:%=%.bashchk) $(BASH_FILES:%=%.bashstyle)
+
+%.bashchk: %
+ $(BASH) -n $^
+
+%.bashstyle: %
+ $(BASHSTYLE) $^
+
+.PHONY: check-jsl check-jsl-node check-jsl-web
+check-jsl: check-jsl-node check-jsl-web
+
+check-jsl-node: $(JSL_FILES_NODE:%=%.jslnodechk)
+
+check-jsl-web: $(JSL_FILES_WEB:%=%.jslwebchk)
+
+%.jslnodechk: % $(JSL_EXEC)
+ $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_NODE) $<
+
+%.jslwebchk: % $(JSL_EXEC)
+ $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_WEB) $<
+
+.PHONY: check-jsstyle
+check-jsstyle: $(JSSTYLE_FILES:%=%.jsstylechk)
+
+%.jsstylechk: % $(JSSTYLE_EXEC)
+ $(JSSTYLE) $(JSSTYLE_FLAGS) $<
+
+.PHONY: check
+check: check-jsl check-jsstyle check-bash
+ @echo check ok
+
+.PHONY: clean
+clean::
+ -$(RMTREE) $(CLEAN_FILES)
+
+.PHONY: distclean
+distclean:: clean
+ -$(RMTREE) $(DISTCLEAN_FILES)
+
+CSCOPE_FILES = cscope.in.out cscope.out cscope.po.out
+CLEAN_FILES += $(CSCOPE_FILES)
+
+.PHONY: xref
+xref: cscope.files
+ $(CSCOPE) -bqR
+
+.PHONY: cscope.files
+cscope.files:
+ find $(CSCOPE_DIRS) -name '*.c' -o -name '*.h' -o -name '*.cc' \
+ -o -name '*.js' -o -name '*.s' -o -name '*.cpp' > $@
+
+#
+# The "docs" target is complicated because we do several things here:
+#
+# (1) Use restdown to build HTML and JSON files from each of DOC_FILES.
+#
+# (2) Copy these files into $(DOC_BUILD) (build/docs/public), which
+# functions as a complete copy of the documentation that could be
+# mirrored or served over HTTP.
+#
+# (3) Then copy any directories and media from docs/media into
+# $(DOC_BUILD)/media. This allows projects to include their own media,
+# including files that will override same-named files provided by
+# restdown.
+#
+# Step (3) is the surprisingly complex part: in order to do this, we need to
+# identify the subdirectories in docs/media, recreate them in
+# $(DOC_BUILD)/media, then do the same with the files.
+#
+DOC_MEDIA_DIRS := $(shell find docs/media -type d 2>/dev/null | grep -v "^docs/media$$")
+DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/media/%=%)
+DOC_MEDIA_DIRS_BUILD := $(DOC_MEDIA_DIRS:%=$(DOC_BUILD)/media/%)
+
+DOC_MEDIA_FILES := $(shell find docs/media -type f 2>/dev/null)
+DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/media/%=%)
+DOC_MEDIA_FILES_BUILD := $(DOC_MEDIA_FILES:%=$(DOC_BUILD)/media/%)
+
+#
+# Like the other targets, "docs" just depends on the final files we want to
+# create in $(DOC_BUILD), leveraging other targets and recipes to define how
+# to get there.
+#
+.PHONY: docs
+docs: \
+ $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.html) \
+ $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.json) \
+ $(DOC_MEDIA_FILES_BUILD)
+
+#
+# We keep the intermediate files so that the next build can see whether the
+# files in DOC_BUILD are up to date.
+#
+.PRECIOUS: \
+ $(DOC_FILES:%.restdown=docs/%.html) \
+ $(DOC_FILES:%.restdown=docs/%json)
+
+#
+# We do clean those intermediate files, as well as all of DOC_BUILD.
+#
+CLEAN_FILES += \
+ $(DOC_BUILD) \
+ $(DOC_FILES:%.restdown=docs/%.html) \
+ $(DOC_FILES:%.restdown=docs/%.json)
+
+#
+# Before installing the files, we must make sure the directories exist. The |
+# syntax tells make that the dependency need only exist, not be up to date.
+# Otherwise, it might try to rebuild spuriously because the directory itself
+# appears out of date.
+#
+$(DOC_MEDIA_FILES_BUILD): | $(DOC_MEDIA_DIRS_BUILD)
+
+$(DOC_BUILD)/%: docs/% | $(DOC_BUILD)
+ $(CP) $< $@
+
+docs/%.json docs/%.html: docs/%.restdown | $(DOC_BUILD) $(RESTDOWN_EXEC)
+ $(RESTDOWN) $(RESTDOWN_FLAGS) -m $(DOC_BUILD) $<
+
+$(DOC_BUILD):
+ $(MKDIR) $@
+
+$(DOC_MEDIA_DIRS_BUILD):
+ $(MKDIR) $@
+
+#
+# The default "test" target does nothing. This should usually be overridden by
+# the parent Makefile. It's included here so we can define "prepush" without
+# requiring the repo to define "test".
+#
+.PHONY: test
+test:
+
+.PHONY: prepush
+prepush: check test
diff --git a/node_modules/extsprintf/README.md b/node_modules/extsprintf/README.md
new file mode 100644
index 0000000..b22998d
--- /dev/null
+++ b/node_modules/extsprintf/README.md
@@ -0,0 +1,46 @@
+# extsprintf: extended POSIX-style sprintf
+
+Stripped down version of s[n]printf(3c). We make a best effort to throw an
+exception when given a format string we don't understand, rather than ignoring
+it, so that we won't break existing programs if/when we go implement the rest
+of this.
+
+This implementation currently supports specifying
+
+* field alignment ('-' flag),
+* zero-pad ('0' flag)
+* always show numeric sign ('+' flag),
+* field width
+* conversions for strings, decimal integers, and floats (numbers).
+* argument size specifiers. These are all accepted but ignored, since
+ Javascript has no notion of the physical size of an argument.
+
+Everything else is currently unsupported, most notably: precision, unsigned
+numbers, non-decimal numbers, and characters.
+
+Besides the usual POSIX conversions, this implementation supports:
+
+* `%j`: pretty-print a JSON object (using node's "inspect")
+* `%r`: pretty-print an Error object
+
+# Example
+
+First, install it:
+
+ # npm install extsprintf
+
+Now, use it:
+
+ var mod_extsprintf = require('extsprintf');
+ console.log(mod_extsprintf.sprintf('hello %25s', 'world'));
+
+outputs:
+
+ hello world
+
+# Also supported
+
+**printf**: same args as sprintf, but prints the result to stdout
+
+**fprintf**: same args as sprintf, preceded by a Node stream. Prints the result
+to the given stream.
diff --git a/node_modules/extsprintf/jsl.node.conf b/node_modules/extsprintf/jsl.node.conf
new file mode 100644
index 0000000..03f787f
--- /dev/null
+++ b/node_modules/extsprintf/jsl.node.conf
@@ -0,0 +1,137 @@
+#
+# Configuration File for JavaScript Lint
+#
+# This configuration file can be used to lint a collection of scripts, or to enable
+# or disable warnings for scripts that are linted via the command line.
+#
+
+### Warnings
+# Enable or disable warnings based on requirements.
+# Use "+WarningName" to display or "-WarningName" to suppress.
+#
++ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent
++ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
++ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
++anon_no_return_value # anonymous function does not always return value
++assign_to_function_call # assignment to a function call
+-block_without_braces # block statement without curly braces
++comma_separated_stmts # multiple statements separated by commas (use semicolons?)
++comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
++default_not_at_end # the default case is not at the end of the switch statement
++dup_option_explicit # duplicate "option explicit" control comment
++duplicate_case_in_switch # duplicate case in switch statement
++duplicate_formal # duplicate formal argument {name}
++empty_statement # empty statement or extra semicolon
++identifier_hides_another # identifer {name} hides an identifier in a parent scope
+-inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
++incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version.
++invalid_fallthru # unexpected "fallthru" control comment
++invalid_pass # unexpected "pass" control comment
++jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
++leading_decimal_point # leading decimal point may indicate a number or an object member
++legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
++meaningless_block # meaningless block; curly braces have no impact
++mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence
++misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
++missing_break # missing break statement
++missing_break_for_last_case # missing break statement for last case in switch
++missing_default_case # missing default case in switch statement
++missing_option_explicit # the "option explicit" control comment is missing
++missing_semicolon # missing semicolon
++missing_semicolon_for_lambda # missing semicolon for lambda assignment
++multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
++nested_comment # nested comment
++no_return_value # function {name} does not always return a value
++octal_number # leading zeros make an octal number
++parseint_missing_radix # parseInt missing radix parameter
++partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
++redeclared_var # redeclaration of {name}
++trailing_comma_in_array # extra comma is not recommended in array initializers
++trailing_decimal_point # trailing decimal point may indicate a number or an object member
++undeclared_identifier # undeclared identifier: {name}
++unreachable_code # unreachable code
+-unreferenced_argument # argument declared but never referenced: {name}
+-unreferenced_function # function is declared but never referenced: {name}
++unreferenced_variable # variable is declared but never referenced: {name}
++unsupported_version # JavaScript {version} is not supported
++use_of_label # use of label
++useless_assign # useless assignment
++useless_comparison # useless comparison; comparing identical expressions
+-useless_quotes # the quotation marks are unnecessary
++useless_void # use of the void type may be unnecessary (void is always undefined)
++var_hides_arg # variable {name} hides argument
++want_assign_or_call # expected an assignment or function call
++with_statement # with statement hides undeclared variables; use temporary variable instead
+
+
+### Output format
+# Customize the format of the error message.
+# __FILE__ indicates current file path
+# __FILENAME__ indicates current file name
+# __LINE__ indicates current line
+# __COL__ indicates current column
+# __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__)
+# __ERROR_NAME__ indicates error name (used in configuration file)
+# __ERROR_PREFIX__ indicates error prefix
+# __ERROR_MSG__ indicates error message
+#
+# For machine-friendly output, the output format can be prefixed with
+# "encode:". If specified, all items will be encoded with C-slashes.
+#
+# Visual Studio syntax (default):
++output-format __FILE__(__LINE__): __ERROR__
+# Alternative syntax:
+#+output-format __FILE__:__LINE__: __ERROR__
+
+
+### Context
+# Show the in-line position of the error.
+# Use "+context" to display or "-context" to suppress.
+#
++context
+
+
+### Control Comments
+# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
+# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
+# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
+# although legacy control comments are enabled by default for backward compatibility.
+#
+-legacy_control_comments
+
+
+### Defining identifiers
+# By default, "option explicit" is enabled on a per-file basis.
+# To enable this for all files, use "+always_use_option_explicit"
+-always_use_option_explicit
+
+# Define certain identifiers of which the lint is not aware.
+# (Use this in conjunction with the "undeclared identifier" warning.)
+#
+# Common uses for webpages might be:
++define __dirname
++define clearInterval
++define clearTimeout
++define console
++define exports
++define global
++define process
++define require
++define setInterval
++define setTimeout
++define Buffer
++define JSON
++define Math
+
+### JavaScript Version
+# To change the default JavaScript version:
+#+default-type text/javascript;version=1.5
+#+default-type text/javascript;e4x=1
+
+### Files
+# Specify which files to lint
+# Use "+recurse" to enable recursion (disabled by default).
+# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
+# or "+process Folder\Path\*.htm".
+#
+
diff --git a/node_modules/extsprintf/lib/extsprintf.js b/node_modules/extsprintf/lib/extsprintf.js
new file mode 100644
index 0000000..ed883d3
--- /dev/null
+++ b/node_modules/extsprintf/lib/extsprintf.js
@@ -0,0 +1,183 @@
+/*
+ * extsprintf.js: extended POSIX-style sprintf
+ */
+
+var mod_assert = require('assert');
+var mod_util = require('util');
+
+/*
+ * Public interface
+ */
+exports.sprintf = jsSprintf;
+exports.printf = jsPrintf;
+exports.fprintf = jsFprintf;
+
+/*
+ * Stripped down version of s[n]printf(3c). We make a best effort to throw an
+ * exception when given a format string we don't understand, rather than
+ * ignoring it, so that we won't break existing programs if/when we go implement
+ * the rest of this.
+ *
+ * This implementation currently supports specifying
+ * - field alignment ('-' flag),
+ * - zero-pad ('0' flag)
+ * - always show numeric sign ('+' flag),
+ * - field width
+ * - conversions for strings, decimal integers, and floats (numbers).
+ * - argument size specifiers. These are all accepted but ignored, since
+ * Javascript has no notion of the physical size of an argument.
+ *
+ * Everything else is currently unsupported, most notably precision, unsigned
+ * numbers, non-decimal numbers, and characters.
+ */
+function jsSprintf(fmt)
+{
+ var regex = [
+ '([^%]*)', /* normal text */
+ '%', /* start of format */
+ '([\'\\-+ #0]*?)', /* flags (optional) */
+ '([1-9]\\d*)?', /* width (optional) */
+ '(\\.([1-9]\\d*))?', /* precision (optional) */
+ '[lhjztL]*?', /* length mods (ignored) */
+ '([diouxXfFeEgGaAcCsSp%jr])' /* conversion */
+ ].join('');
+
+ var re = new RegExp(regex);
+ var args = Array.prototype.slice.call(arguments, 1);
+ var flags, width, precision, conversion;
+ var left, pad, sign, arg, match;
+ var ret = '';
+ var argn = 1;
+
+ mod_assert.equal('string', typeof (fmt));
+
+ while ((match = re.exec(fmt)) !== null) {
+ ret += match[1];
+ fmt = fmt.substring(match[0].length);
+
+ flags = match[2] || '';
+ width = match[3] || 0;
+ precision = match[4] || '';
+ conversion = match[6];
+ left = false;
+ sign = false;
+ pad = ' ';
+
+ if (conversion == '%') {
+ ret += '%';
+ continue;
+ }
+
+ if (args.length === 0)
+ throw (new Error('too few args to sprintf'));
+
+ arg = args.shift();
+ argn++;
+
+ if (flags.match(/[\' #]/))
+ throw (new Error(
+ 'unsupported flags: ' + flags));
+
+ if (precision.length > 0)
+ throw (new Error(
+ 'non-zero precision not supported'));
+
+ if (flags.match(/-/))
+ left = true;
+
+ if (flags.match(/0/))
+ pad = '0';
+
+ if (flags.match(/\+/))
+ sign = true;
+
+ switch (conversion) {
+ case 's':
+ if (arg === undefined || arg === null)
+ throw (new Error('argument ' + argn +
+ ': attempted to print undefined or null ' +
+ 'as a string'));
+ ret += doPad(pad, width, left, arg.toString());
+ break;
+
+ case 'd':
+ arg = Math.floor(arg);
+ /*jsl:fallthru*/
+ case 'f':
+ sign = sign && arg > 0 ? '+' : '';
+ ret += sign + doPad(pad, width, left,
+ arg.toString());
+ break;
+
+ case 'x':
+ ret += doPad(pad, width, left, arg.toString(16));
+ break;
+
+ case 'j': /* non-standard */
+ if (width === 0)
+ width = 10;
+ ret += mod_util.inspect(arg, false, width);
+ break;
+
+ case 'r': /* non-standard */
+ ret += dumpException(arg);
+ break;
+
+ default:
+ throw (new Error('unsupported conversion: ' +
+ conversion));
+ }
+ }
+
+ ret += fmt;
+ return (ret);
+}
+
+function jsPrintf() {
+ var args = Array.prototype.slice.call(arguments);
+ args.unshift(process.stdout);
+ jsFprintf.apply(null, args);
+}
+
+function jsFprintf(stream) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return (stream.write(jsSprintf.apply(this, args)));
+}
+
+function doPad(chr, width, left, str)
+{
+ var ret = str;
+
+ while (ret.length < width) {
+ if (left)
+ ret += chr;
+ else
+ ret = chr + ret;
+ }
+
+ return (ret);
+}
+
+/*
+ * This function dumps long stack traces for exceptions having a cause() method.
+ * See node-verror for an example.
+ */
+function dumpException(ex)
+{
+ var ret;
+
+ if (!(ex instanceof Error))
+ throw (new Error(jsSprintf('invalid type for %%r: %j', ex)));
+
+ /* Note that V8 prepends "ex.stack" with ex.toString(). */
+ ret = 'EXCEPTION: ' + ex.constructor.name + ': ' + ex.stack;
+
+ if (ex.cause && typeof (ex.cause) === 'function') {
+ var cex = ex.cause();
+ if (cex) {
+ ret += '\nCaused by: ' + dumpException(cex);
+ }
+ }
+
+ return (ret);
+}
diff --git a/node_modules/extsprintf/package.json b/node_modules/extsprintf/package.json
new file mode 100644
index 0000000..b788895
--- /dev/null
+++ b/node_modules/extsprintf/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "extsprintf",
+ "version": "1.3.0",
+ "description": "extended POSIX-style sprintf",
+ "main": "./lib/extsprintf.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/davepacheco/node-extsprintf.git"
+ },
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/fast-deep-equal/LICENSE b/node_modules/fast-deep-equal/LICENSE
new file mode 100644
index 0000000..7f15435
--- /dev/null
+++ b/node_modules/fast-deep-equal/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Evgeny Poberezkin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/fast-deep-equal/README.md b/node_modules/fast-deep-equal/README.md
new file mode 100644
index 0000000..d3f4ffc
--- /dev/null
+++ b/node_modules/fast-deep-equal/README.md
@@ -0,0 +1,96 @@
+# fast-deep-equal
+The fastest deep equal with ES6 Map, Set and Typed arrays support.
+
+[![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal)
+[![npm](https://img.shields.io/npm/v/fast-deep-equal.svg)](https://www.npmjs.com/package/fast-deep-equal)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master)
+
+
+## Install
+
+```bash
+npm install fast-deep-equal
+```
+
+
+## Features
+
+- ES5 compatible
+- works in node.js (8+) and browsers (IE9+)
+- checks equality of Date and RegExp objects by value.
+
+ES6 equal (`require('fast-deep-equal/es6')`) also supports:
+- Maps
+- Sets
+- Typed arrays
+
+
+## Usage
+
+```javascript
+var equal = require('fast-deep-equal');
+console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true
+```
+
+To support ES6 Maps, Sets and Typed arrays equality use:
+
+```javascript
+var equal = require('fast-deep-equal/es6');
+console.log(equal(Int16Array([1, 2]), Int16Array([1, 2]))); // true
+```
+
+To use with React (avoiding the traversal of React elements' _owner
+property that contains circular references and is not needed when
+comparing the elements - borrowed from [react-fast-compare](https://github.com/FormidableLabs/react-fast-compare)):
+
+```javascript
+var equal = require('fast-deep-equal/react');
+var equal = require('fast-deep-equal/es6/react');
+```
+
+
+## Performance benchmark
+
+Node.js v12.6.0:
+
+```
+fast-deep-equal x 261,950 ops/sec ±0.52% (89 runs sampled)
+fast-deep-equal/es6 x 212,991 ops/sec ±0.34% (92 runs sampled)
+fast-equals x 230,957 ops/sec ±0.83% (85 runs sampled)
+nano-equal x 187,995 ops/sec ±0.53% (88 runs sampled)
+shallow-equal-fuzzy x 138,302 ops/sec ±0.49% (90 runs sampled)
+underscore.isEqual x 74,423 ops/sec ±0.38% (89 runs sampled)
+lodash.isEqual x 36,637 ops/sec ±0.72% (90 runs sampled)
+deep-equal x 2,310 ops/sec ±0.37% (90 runs sampled)
+deep-eql x 35,312 ops/sec ±0.67% (91 runs sampled)
+ramda.equals x 12,054 ops/sec ±0.40% (91 runs sampled)
+util.isDeepStrictEqual x 46,440 ops/sec ±0.43% (90 runs sampled)
+assert.deepStrictEqual x 456 ops/sec ±0.71% (88 runs sampled)
+
+The fastest is fast-deep-equal
+```
+
+To run benchmark (requires node.js 6+):
+
+```bash
+npm run benchmark
+```
+
+__Please note__: this benchmark runs against the available test cases. To choose the most performant library for your application, it is recommended to benchmark against your data and to NOT expect this benchmark to reflect the performance difference in your application.
+
+
+## Enterprise support
+
+fast-deep-equal package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-deep-equal?utm_source=npm-fast-deep-equal&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers.
+
+
+## Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues.
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE)
diff --git a/node_modules/fast-deep-equal/es6/index.d.ts b/node_modules/fast-deep-equal/es6/index.d.ts
new file mode 100644
index 0000000..c7eb9c7
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/index.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/fast-deep-equal/es6/index.js b/node_modules/fast-deep-equal/es6/index.js
new file mode 100644
index 0000000..d980be2
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/index.js
@@ -0,0 +1,72 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+ var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+ if ((a instanceof Map) && (b instanceof Map)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ for (i of a.entries())
+ if (!equal(i[1], b.get(i[0]))) return false;
+ return true;
+ }
+
+ if ((a instanceof Set) && (b instanceof Set)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ return true;
+ }
+
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (a[i] !== b[i]) return false;
+ return true;
+ }
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/fast-deep-equal/es6/react.d.ts b/node_modules/fast-deep-equal/es6/react.d.ts
new file mode 100644
index 0000000..c7eb9c7
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/react.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/fast-deep-equal/es6/react.js b/node_modules/fast-deep-equal/es6/react.js
new file mode 100644
index 0000000..98e2f9b
--- /dev/null
+++ b/node_modules/fast-deep-equal/es6/react.js
@@ -0,0 +1,79 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+ var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+ if ((a instanceof Map) && (b instanceof Map)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ for (i of a.entries())
+ if (!equal(i[1], b.get(i[0]))) return false;
+ return true;
+ }
+
+ if ((a instanceof Set) && (b instanceof Set)) {
+ if (a.size !== b.size) return false;
+ for (i of a.entries())
+ if (!b.has(i[0])) return false;
+ return true;
+ }
+
+ if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (a[i] !== b[i]) return false;
+ return true;
+ }
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (key === '_owner' && a.$$typeof) {
+ // React-specific: avoid traversing React elements' _owner.
+ // _owner contains circular references
+ // and is not needed when comparing the actual elements (and not their owners)
+ continue;
+ }
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/fast-deep-equal/index.d.ts b/node_modules/fast-deep-equal/index.d.ts
new file mode 100644
index 0000000..3c042ca
--- /dev/null
+++ b/node_modules/fast-deep-equal/index.d.ts
@@ -0,0 +1,4 @@
+declare module 'fast-deep-equal' {
+ const equal: (a: any, b: any) => boolean;
+ export = equal;
+}
diff --git a/node_modules/fast-deep-equal/index.js b/node_modules/fast-deep-equal/index.js
new file mode 100644
index 0000000..30dd1ba
--- /dev/null
+++ b/node_modules/fast-deep-equal/index.js
@@ -0,0 +1,46 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/fast-deep-equal/package.json b/node_modules/fast-deep-equal/package.json
new file mode 100644
index 0000000..3cfe66c
--- /dev/null
+++ b/node_modules/fast-deep-equal/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "fast-deep-equal",
+ "version": "3.1.3",
+ "description": "Fast deep equal",
+ "main": "index.js",
+ "scripts": {
+ "eslint": "eslint *.js benchmark/*.js spec/*.js",
+ "build": "node build",
+ "benchmark": "npm i && npm run build && cd ./benchmark && npm i && node ./",
+ "test-spec": "mocha spec/*.spec.js -R spec",
+ "test-cov": "nyc npm run test-spec",
+ "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts",
+ "test": "npm run build && npm run eslint && npm run test-ts && npm run test-cov",
+ "prepublish": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/fast-deep-equal.git"
+ },
+ "keywords": [
+ "fast",
+ "equal",
+ "deep-equal"
+ ],
+ "author": "Evgeny Poberezkin",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/epoberezkin/fast-deep-equal/issues"
+ },
+ "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme",
+ "devDependencies": {
+ "coveralls": "^3.1.0",
+ "dot": "^1.1.2",
+ "eslint": "^7.2.0",
+ "mocha": "^7.2.0",
+ "nyc": "^15.1.0",
+ "pre-commit": "^1.2.2",
+ "react": "^16.12.0",
+ "react-test-renderer": "^16.12.0",
+ "sinon": "^9.0.2",
+ "typescript": "^3.9.5"
+ },
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "react.js",
+ "react.d.ts",
+ "es6/"
+ ],
+ "types": "index.d.ts"
+}
diff --git a/node_modules/fast-deep-equal/react.d.ts b/node_modules/fast-deep-equal/react.d.ts
new file mode 100644
index 0000000..c7eb9c7
--- /dev/null
+++ b/node_modules/fast-deep-equal/react.d.ts
@@ -0,0 +1,2 @@
+declare const equal: (a: any, b: any) => boolean;
+export = equal;
diff --git a/node_modules/fast-deep-equal/react.js b/node_modules/fast-deep-equal/react.js
new file mode 100644
index 0000000..3489b98
--- /dev/null
+++ b/node_modules/fast-deep-equal/react.js
@@ -0,0 +1,53 @@
+'use strict';
+
+// do not edit .js files directly - edit src/index.jst
+
+
+
+module.exports = function equal(a, b) {
+ if (a === b) return true;
+
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
+ if (a.constructor !== b.constructor) return false;
+
+ var length, i, keys;
+ if (Array.isArray(a)) {
+ length = a.length;
+ if (length != b.length) return false;
+ for (i = length; i-- !== 0;)
+ if (!equal(a[i], b[i])) return false;
+ return true;
+ }
+
+
+
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
+
+ keys = Object.keys(a);
+ length = keys.length;
+ if (length !== Object.keys(b).length) return false;
+
+ for (i = length; i-- !== 0;)
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
+
+ for (i = length; i-- !== 0;) {
+ var key = keys[i];
+
+ if (key === '_owner' && a.$$typeof) {
+ // React-specific: avoid traversing React elements' _owner.
+ // _owner contains circular references
+ // and is not needed when comparing the actual elements (and not their owners)
+ continue;
+ }
+
+ if (!equal(a[key], b[key])) return false;
+ }
+
+ return true;
+ }
+
+ // true if both NaN, false otherwise
+ return a!==a && b!==b;
+};
diff --git a/node_modules/fast-json-stable-stringify/.eslintrc.yml b/node_modules/fast-json-stable-stringify/.eslintrc.yml
new file mode 100644
index 0000000..1c77b0d
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/.eslintrc.yml
@@ -0,0 +1,26 @@
+extends: eslint:recommended
+env:
+ node: true
+ browser: true
+rules:
+ block-scoped-var: 2
+ callback-return: 2
+ dot-notation: 2
+ indent: 2
+ linebreak-style: [2, unix]
+ new-cap: 2
+ no-console: [2, allow: [warn, error]]
+ no-else-return: 2
+ no-eq-null: 2
+ no-fallthrough: 2
+ no-invalid-this: 2
+ no-return-assign: 2
+ no-shadow: 1
+ no-trailing-spaces: 2
+ no-use-before-define: [2, nofunc]
+ quotes: [2, single, avoid-escape]
+ semi: [2, always]
+ strict: [2, global]
+ valid-jsdoc: [2, requireReturn: false]
+ no-control-regex: 0
+ no-useless-escape: 2
diff --git a/node_modules/fast-json-stable-stringify/.github/FUNDING.yml b/node_modules/fast-json-stable-stringify/.github/FUNDING.yml
new file mode 100644
index 0000000..61f9daa
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/.github/FUNDING.yml
@@ -0,0 +1 @@
+tidelift: "npm/fast-json-stable-stringify"
diff --git a/node_modules/fast-json-stable-stringify/.travis.yml b/node_modules/fast-json-stable-stringify/.travis.yml
new file mode 100644
index 0000000..b61e8f0
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "8"
+ - "10"
+ - "12"
+ - "13"
+after_script:
+ - coveralls < coverage/lcov.info
diff --git a/node_modules/fast-json-stable-stringify/LICENSE b/node_modules/fast-json-stable-stringify/LICENSE
new file mode 100644
index 0000000..c932223
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/LICENSE
@@ -0,0 +1,21 @@
+This software is released under the MIT license:
+
+Copyright (c) 2017 Evgeny Poberezkin
+Copyright (c) 2013 James Halliday
+
+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/fast-json-stable-stringify/README.md b/node_modules/fast-json-stable-stringify/README.md
new file mode 100644
index 0000000..02cf49f
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/README.md
@@ -0,0 +1,131 @@
+# fast-json-stable-stringify
+
+Deterministic `JSON.stringify()` - a faster version of [@substack](https://github.com/substack)'s json-stable-strigify without [jsonify](https://github.com/substack/jsonify).
+
+You can also pass in a custom comparison function.
+
+[![Build Status](https://travis-ci.org/epoberezkin/fast-json-stable-stringify.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-json-stable-stringify)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-json-stable-stringify/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-json-stable-stringify?branch=master)
+
+# example
+
+``` js
+var stringify = require('fast-json-stable-stringify');
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+console.log(stringify(obj));
+```
+
+output:
+
+```
+{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
+```
+
+
+# methods
+
+``` js
+var stringify = require('fast-json-stable-stringify')
+```
+
+## var str = stringify(obj, opts)
+
+Return a deterministic stringified string `str` from the object `obj`.
+
+
+## options
+
+### cmp
+
+If `opts` is given, you can supply an `opts.cmp` to have a custom comparison
+function for object keys. Your function `opts.cmp` is called with these
+parameters:
+
+``` js
+opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })
+```
+
+For example, to sort on the object key names in reverse order you could write:
+
+``` js
+var stringify = require('fast-json-stable-stringify');
+
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+var s = stringify(obj, function (a, b) {
+ return a.key < b.key ? 1 : -1;
+});
+console.log(s);
+```
+
+which results in the output string:
+
+```
+{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
+```
+
+Or if you wanted to sort on the object values in reverse order, you could write:
+
+```
+var stringify = require('fast-json-stable-stringify');
+
+var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
+var s = stringify(obj, function (a, b) {
+ return a.value < b.value ? 1 : -1;
+});
+console.log(s);
+```
+
+which outputs:
+
+```
+{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10}
+```
+
+### cycles
+
+Pass `true` in `opts.cycles` to stringify circular property as `__cycle__` - the result will not be a valid JSON string in this case.
+
+TypeError will be thrown in case of circular object without this option.
+
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install fast-json-stable-stringify
+```
+
+
+# benchmark
+
+To run benchmark (requires Node.js 6+):
+```
+node benchmark
+```
+
+Results:
+```
+fast-json-stable-stringify x 17,189 ops/sec ±1.43% (83 runs sampled)
+json-stable-stringify x 13,634 ops/sec ±1.39% (85 runs sampled)
+fast-stable-stringify x 20,212 ops/sec ±1.20% (84 runs sampled)
+faster-stable-stringify x 15,549 ops/sec ±1.12% (84 runs sampled)
+The fastest is fast-stable-stringify
+```
+
+
+## Enterprise support
+
+fast-json-stable-stringify package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-fast-json-stable-stringify?utm_source=npm-fast-json-stable-stringify&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers.
+
+
+## Security contact
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues.
+
+
+# license
+
+[MIT](https://github.com/epoberezkin/fast-json-stable-stringify/blob/master/LICENSE)
diff --git a/node_modules/fast-json-stable-stringify/benchmark/index.js b/node_modules/fast-json-stable-stringify/benchmark/index.js
new file mode 100644
index 0000000..e725f9f
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/benchmark/index.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const Benchmark = require('benchmark');
+const suite = new Benchmark.Suite;
+const testData = require('./test.json');
+
+
+const stringifyPackages = {
+ // 'JSON.stringify': JSON.stringify,
+ 'fast-json-stable-stringify': require('../index'),
+ 'json-stable-stringify': true,
+ 'fast-stable-stringify': true,
+ 'faster-stable-stringify': true
+};
+
+
+for (const name in stringifyPackages) {
+ let func = stringifyPackages[name];
+ if (func === true) func = require(name);
+
+ suite.add(name, function() {
+ func(testData);
+ });
+}
+
+suite
+ .on('cycle', (event) => console.log(String(event.target)))
+ .on('complete', function () {
+ console.log('The fastest is ' + this.filter('fastest').map('name'));
+ })
+ .run({async: true});
diff --git a/node_modules/fast-json-stable-stringify/benchmark/test.json b/node_modules/fast-json-stable-stringify/benchmark/test.json
new file mode 100644
index 0000000..c9118c1
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/benchmark/test.json
@@ -0,0 +1,137 @@
+[
+ {
+ "_id": "59ef4a83ee8364808d761beb",
+ "index": 0,
+ "guid": "e50ffae9-7128-4148-9ee5-40c3fc523c5d",
+ "isActive": false,
+ "balance": "$2,341.81",
+ "picture": "http://placehold.it/32x32",
+ "age": 28,
+ "eyeColor": "brown",
+ "name": "Carey Savage",
+ "gender": "female",
+ "company": "VERAQ",
+ "email": "careysavage@veraq.com",
+ "phone": "+1 (897) 574-3014",
+ "address": "458 Willow Street, Henrietta, California, 7234",
+ "about": "Nisi reprehenderit nulla ad officia pariatur non dolore laboris irure cupidatat laborum. Minim eu ex Lorem adipisicing exercitation irure minim sunt est enim mollit incididunt voluptate nulla. Ut mollit anim reprehenderit et aliqua ex esse aliquip. Aute sit duis deserunt do incididunt consequat minim qui dolor commodo deserunt et voluptate.\r\n",
+ "registered": "2014-05-21T01:56:51 -01:00",
+ "latitude": 63.89502,
+ "longitude": 62.369807,
+ "tags": [
+ "nostrud",
+ "nisi",
+ "consectetur",
+ "ullamco",
+ "cupidatat",
+ "culpa",
+ "commodo"
+ ],
+ "friends": [
+ {
+ "id": 0,
+ "name": "Henry Walls"
+ },
+ {
+ "id": 1,
+ "name": "Janice Baker"
+ },
+ {
+ "id": 2,
+ "name": "Russell Bush"
+ }
+ ],
+ "greeting": "Hello, Carey Savage! You have 4 unread messages.",
+ "favoriteFruit": "banana"
+ },
+ {
+ "_id": "59ef4a83ff5774a691454e89",
+ "index": 1,
+ "guid": "2bee9efc-4095-4c2e-87ef-d08c8054c89d",
+ "isActive": true,
+ "balance": "$1,618.15",
+ "picture": "http://placehold.it/32x32",
+ "age": 35,
+ "eyeColor": "blue",
+ "name": "Elinor Pearson",
+ "gender": "female",
+ "company": "FLEXIGEN",
+ "email": "elinorpearson@flexigen.com",
+ "phone": "+1 (923) 548-3751",
+ "address": "600 Bayview Avenue, Draper, Montana, 3088",
+ "about": "Mollit commodo ea sit Lorem velit. Irure anim esse Lorem sint quis officia ut. Aliqua nisi dolore in aute deserunt mollit ex ea in mollit.\r\n",
+ "registered": "2017-04-22T07:58:41 -01:00",
+ "latitude": -87.824919,
+ "longitude": 69.538927,
+ "tags": [
+ "fugiat",
+ "labore",
+ "proident",
+ "quis",
+ "eiusmod",
+ "qui",
+ "est"
+ ],
+ "friends": [
+ {
+ "id": 0,
+ "name": "Massey Wagner"
+ },
+ {
+ "id": 1,
+ "name": "Marcella Ferrell"
+ },
+ {
+ "id": 2,
+ "name": "Evans Mckee"
+ }
+ ],
+ "greeting": "Hello, Elinor Pearson! You have 3 unread messages.",
+ "favoriteFruit": "strawberry"
+ },
+ {
+ "_id": "59ef4a839ec8a4be4430b36b",
+ "index": 2,
+ "guid": "ddd6e8c0-95bd-416d-8b46-a768d6363809",
+ "isActive": false,
+ "balance": "$2,046.95",
+ "picture": "http://placehold.it/32x32",
+ "age": 40,
+ "eyeColor": "green",
+ "name": "Irwin Davidson",
+ "gender": "male",
+ "company": "DANJA",
+ "email": "irwindavidson@danja.com",
+ "phone": "+1 (883) 537-2041",
+ "address": "439 Cook Street, Chapin, Kentucky, 7398",
+ "about": "Irure velit non commodo aliqua exercitation ut nostrud minim magna. Dolor ad ad ut irure eu. Non pariatur dolor eiusmod ipsum do et exercitation cillum. Et amet laboris minim eiusmod ullamco magna ea reprehenderit proident sunt.\r\n",
+ "registered": "2016-09-01T07:49:08 -01:00",
+ "latitude": -49.803812,
+ "longitude": 104.93279,
+ "tags": [
+ "consequat",
+ "enim",
+ "quis",
+ "magna",
+ "est",
+ "culpa",
+ "tempor"
+ ],
+ "friends": [
+ {
+ "id": 0,
+ "name": "Ruth Hansen"
+ },
+ {
+ "id": 1,
+ "name": "Kathrine Austin"
+ },
+ {
+ "id": 2,
+ "name": "Rivera Munoz"
+ }
+ ],
+ "greeting": "Hello, Irwin Davidson! You have 2 unread messages.",
+ "favoriteFruit": "banana"
+ }
+]
diff --git a/node_modules/fast-json-stable-stringify/example/key_cmp.js b/node_modules/fast-json-stable-stringify/example/key_cmp.js
new file mode 100644
index 0000000..d5f6675
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/example/key_cmp.js
@@ -0,0 +1,7 @@
+var stringify = require('../');
+
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+var s = stringify(obj, function (a, b) {
+ return a.key < b.key ? 1 : -1;
+});
+console.log(s);
diff --git a/node_modules/fast-json-stable-stringify/example/nested.js b/node_modules/fast-json-stable-stringify/example/nested.js
new file mode 100644
index 0000000..9a672fc
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/example/nested.js
@@ -0,0 +1,3 @@
+var stringify = require('../');
+var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+console.log(stringify(obj));
diff --git a/node_modules/fast-json-stable-stringify/example/str.js b/node_modules/fast-json-stable-stringify/example/str.js
new file mode 100644
index 0000000..9b4b3cd
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/example/str.js
@@ -0,0 +1,3 @@
+var stringify = require('../');
+var obj = { c: 6, b: [4,5], a: 3 };
+console.log(stringify(obj));
diff --git a/node_modules/fast-json-stable-stringify/example/value_cmp.js b/node_modules/fast-json-stable-stringify/example/value_cmp.js
new file mode 100644
index 0000000..09f1c5f
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/example/value_cmp.js
@@ -0,0 +1,7 @@
+var stringify = require('../');
+
+var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
+var s = stringify(obj, function (a, b) {
+ return a.value < b.value ? 1 : -1;
+});
+console.log(s);
diff --git a/node_modules/fast-json-stable-stringify/index.d.ts b/node_modules/fast-json-stable-stringify/index.d.ts
new file mode 100644
index 0000000..23e46ca
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/index.d.ts
@@ -0,0 +1,4 @@
+declare module 'fast-json-stable-stringify' {
+ function stringify(obj: any): string;
+ export = stringify;
+}
diff --git a/node_modules/fast-json-stable-stringify/index.js b/node_modules/fast-json-stable-stringify/index.js
new file mode 100644
index 0000000..c44e6a4
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/index.js
@@ -0,0 +1,59 @@
+'use strict';
+
+module.exports = function (data, opts) {
+ if (!opts) opts = {};
+ if (typeof opts === 'function') opts = { cmp: opts };
+ var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
+
+ var cmp = opts.cmp && (function (f) {
+ return function (node) {
+ return function (a, b) {
+ var aobj = { key: a, value: node[a] };
+ var bobj = { key: b, value: node[b] };
+ return f(aobj, bobj);
+ };
+ };
+ })(opts.cmp);
+
+ var seen = [];
+ return (function stringify (node) {
+ if (node && node.toJSON && typeof node.toJSON === 'function') {
+ node = node.toJSON();
+ }
+
+ if (node === undefined) return;
+ if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
+ if (typeof node !== 'object') return JSON.stringify(node);
+
+ var i, out;
+ if (Array.isArray(node)) {
+ out = '[';
+ for (i = 0; i < node.length; i++) {
+ if (i) out += ',';
+ out += stringify(node[i]) || 'null';
+ }
+ return out + ']';
+ }
+
+ if (node === null) return 'null';
+
+ if (seen.indexOf(node) !== -1) {
+ if (cycles) return JSON.stringify('__cycle__');
+ throw new TypeError('Converting circular structure to JSON');
+ }
+
+ var seenIndex = seen.push(node) - 1;
+ var keys = Object.keys(node).sort(cmp && cmp(node));
+ out = '';
+ for (i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = stringify(node[key]);
+
+ if (!value) continue;
+ if (out) out += ',';
+ out += JSON.stringify(key) + ':' + value;
+ }
+ seen.splice(seenIndex, 1);
+ return '{' + out + '}';
+ })(data);
+};
diff --git a/node_modules/fast-json-stable-stringify/package.json b/node_modules/fast-json-stable-stringify/package.json
new file mode 100644
index 0000000..ad2c8bf
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "fast-json-stable-stringify",
+ "version": "2.1.0",
+ "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "dependencies": {},
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "coveralls": "^3.0.0",
+ "eslint": "^6.7.0",
+ "fast-stable-stringify": "latest",
+ "faster-stable-stringify": "latest",
+ "json-stable-stringify": "latest",
+ "nyc": "^14.1.0",
+ "pre-commit": "^1.2.2",
+ "tape": "^4.11.0"
+ },
+ "scripts": {
+ "eslint": "eslint index.js test",
+ "test-spec": "tape test/*.js",
+ "test": "npm run eslint && nyc npm run test-spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/epoberezkin/fast-json-stable-stringify.git"
+ },
+ "homepage": "https://github.com/epoberezkin/fast-json-stable-stringify",
+ "keywords": [
+ "json",
+ "stringify",
+ "deterministic",
+ "hash",
+ "stable"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT",
+ "nyc": {
+ "exclude": [
+ "test",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ }
+}
diff --git a/node_modules/fast-json-stable-stringify/test/cmp.js b/node_modules/fast-json-stable-stringify/test/cmp.js
new file mode 100644
index 0000000..4efd6b5
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/test/cmp.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var test = require('tape');
+var stringify = require('../');
+
+test('custom comparison function', function (t) {
+ t.plan(1);
+ var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+ var s = stringify(obj, function (a, b) {
+ return a.key < b.key ? 1 : -1;
+ });
+ t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}');
+});
diff --git a/node_modules/fast-json-stable-stringify/test/nested.js b/node_modules/fast-json-stable-stringify/test/nested.js
new file mode 100644
index 0000000..167a358
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/test/nested.js
@@ -0,0 +1,44 @@
+'use strict';
+
+var test = require('tape');
+var stringify = require('../');
+
+test('nested', function (t) {
+ t.plan(1);
+ var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
+ t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}');
+});
+
+test('cyclic (default)', function (t) {
+ t.plan(1);
+ var one = { a: 1 };
+ var two = { a: 2, one: one };
+ one.two = two;
+ try {
+ stringify(one);
+ } catch (ex) {
+ t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
+ }
+});
+
+test('cyclic (specifically allowed)', function (t) {
+ t.plan(1);
+ var one = { a: 1 };
+ var two = { a: 2, one: one };
+ one.two = two;
+ t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}');
+});
+
+test('repeated non-cyclic value', function(t) {
+ t.plan(1);
+ var one = { x: 1 };
+ var two = { a: one, b: one };
+ t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}');
+});
+
+test('acyclic but with reused obj-property pointers', function (t) {
+ t.plan(1);
+ var x = { a: 1 };
+ var y = { b: x, c: x };
+ t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}');
+});
diff --git a/node_modules/fast-json-stable-stringify/test/str.js b/node_modules/fast-json-stable-stringify/test/str.js
new file mode 100644
index 0000000..99a9ade
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/test/str.js
@@ -0,0 +1,46 @@
+'use strict';
+
+var test = require('tape');
+var stringify = require('../');
+
+test('simple object', function (t) {
+ t.plan(1);
+ var obj = { c: 6, b: [4,5], a: 3, z: null };
+ t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
+});
+
+test('object with undefined', function (t) {
+ t.plan(1);
+ var obj = { a: 3, z: undefined };
+ t.equal(stringify(obj), '{"a":3}');
+});
+
+test('object with null', function (t) {
+ t.plan(1);
+ var obj = { a: 3, z: null };
+ t.equal(stringify(obj), '{"a":3,"z":null}');
+});
+
+test('object with NaN and Infinity', function (t) {
+ t.plan(1);
+ var obj = { a: 3, b: NaN, c: Infinity };
+ t.equal(stringify(obj), '{"a":3,"b":null,"c":null}');
+});
+
+test('array with undefined', function (t) {
+ t.plan(1);
+ var obj = [4, undefined, 6];
+ t.equal(stringify(obj), '[4,null,6]');
+});
+
+test('object with empty string', function (t) {
+ t.plan(1);
+ var obj = { a: 3, z: '' };
+ t.equal(stringify(obj), '{"a":3,"z":""}');
+});
+
+test('array with empty string', function (t) {
+ t.plan(1);
+ var obj = [4, '', 6];
+ t.equal(stringify(obj), '[4,"",6]');
+});
diff --git a/node_modules/fast-json-stable-stringify/test/to-json.js b/node_modules/fast-json-stable-stringify/test/to-json.js
new file mode 100644
index 0000000..2fb2cfa
--- /dev/null
+++ b/node_modules/fast-json-stable-stringify/test/to-json.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var test = require('tape');
+var stringify = require('../');
+
+test('toJSON function', function (t) {
+ t.plan(1);
+ var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } };
+ t.equal(stringify(obj), '{"one":1}' );
+});
+
+test('toJSON returns string', function (t) {
+ t.plan(1);
+ var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } };
+ t.equal(stringify(obj), '"one"');
+});
+
+test('toJSON returns array', function (t) {
+ t.plan(1);
+ var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } };
+ t.equal(stringify(obj), '["one"]');
+});
diff --git a/node_modules/fd-slicer/.npmignore b/node_modules/fd-slicer/.npmignore
new file mode 100644
index 0000000..ccc2930
--- /dev/null
+++ b/node_modules/fd-slicer/.npmignore
@@ -0,0 +1,2 @@
+/coverage
+/node_modules
diff --git a/node_modules/fd-slicer/.travis.yml b/node_modules/fd-slicer/.travis.yml
new file mode 100644
index 0000000..77b7202
--- /dev/null
+++ b/node_modules/fd-slicer/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+node_js:
+ - "0.10"
+script:
+ - "npm run test-travis"
+after_script:
+ - "npm install coveralls@2 && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
diff --git a/node_modules/fd-slicer/CHANGELOG.md b/node_modules/fd-slicer/CHANGELOG.md
new file mode 100644
index 0000000..783042f
--- /dev/null
+++ b/node_modules/fd-slicer/CHANGELOG.md
@@ -0,0 +1,49 @@
+### 1.0.1
+
+ * use `setImmediate` instead of `nextTick`
+
+### 1.0.0
+
+ * `new FdSlicer(fd, options)` must now be `fdSlicer.createFromFd(fd, options)`
+ * fix behavior when `end` is 0.
+ * fix `createWriteStream` when using `createFromBuffer`
+
+### 0.4.0
+
+ * add ability to create an FdSlicer instance from a Buffer
+
+### 0.3.2
+
+ * fix write stream and read stream destroy behavior
+
+### 0.3.1
+
+ * write stream: fix end option behavior
+
+### 0.3.0
+
+ * write stream emits 'progress' events
+ * write stream supports 'end' option which causes the stream to emit an error
+ if a maximum size is exceeded
+ * improve documentation
+
+### 0.2.1
+
+ * Update pend dependency to latest bugfix version.
+
+### 0.2.0
+
+ * Add read and write functions
+
+### 0.1.0
+
+ * Add `autoClose` option and `ref()` and `unref()`.
+
+### 0.0.2
+
+ * Add API documentation
+ * read stream: create buffer at last possible moment
+
+### 0.0.1
+
+ * Initial release
diff --git a/node_modules/fd-slicer/LICENSE b/node_modules/fd-slicer/LICENSE
new file mode 100644
index 0000000..e57596d
--- /dev/null
+++ b/node_modules/fd-slicer/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2014 Andrew Kelley
+
+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/fd-slicer/README.md b/node_modules/fd-slicer/README.md
new file mode 100644
index 0000000..ad7f0ec
--- /dev/null
+++ b/node_modules/fd-slicer/README.md
@@ -0,0 +1,199 @@
+# fd-slicer
+
+[![Build Status](https://travis-ci.org/andrewrk/node-fd-slicer.svg?branch=master)](https://travis-ci.org/andrewrk/node-fd-slicer)
+
+Safe `fs.ReadStream` and `fs.WriteStream` using the same fd.
+
+Let's say that you want to perform a parallel upload of a file to a remote
+server. To do this, we want to create multiple read streams. The first thing
+you might think of is to use the `{start: 0, end: 0}` API of
+`fs.createReadStream`. This gives you two choices:
+
+ 0. Use the same file descriptor for all `fs.ReadStream` objects.
+ 0. Open the file multiple times, resulting in a separate file descriptor
+ for each read stream.
+
+Neither of these are acceptable options. The first one is a severe bug,
+because the API docs for `fs.write` state:
+
+> Note that it is unsafe to use `fs.write` multiple times on the same file
+> without waiting for the callback. For this scenario, `fs.createWriteStream`
+> is strongly recommended.
+
+`fs.createWriteStream` will solve the problem if you only create one of them
+for the file descriptor, but it will exhibit this unsafety if you create
+multiple write streams per file descriptor.
+
+The second option suffers from a race condition. For each additional time the
+file is opened after the first, it is possible that the file is modified. So
+in our parallel uploading example, we might upload a corrupt file that never
+existed on the client's computer.
+
+This module solves this problem by providing `createReadStream` and
+`createWriteStream` that operate on a shared file descriptor and provides
+the convenient stream API while still allowing slicing and dicing.
+
+This module also gives you some additional power that the builtin
+`fs.createWriteStream` do not give you. These features are:
+
+ * Emitting a 'progress' event on write.
+ * Ability to set a maximum size and emit an error if this size is exceeded.
+ * Ability to create an `FdSlicer` instance from a `Buffer`. This enables you
+ to provide API for handling files as well as buffers using the same API.
+
+## Usage
+
+```js
+var fdSlicer = require('fd-slicer');
+var fs = require('fs');
+
+fs.open("file.txt", 'r', function(err, fd) {
+ if (err) throw err;
+ var slicer = fdSlicer.createFromFd(fd);
+ var firstPart = slicer.createReadStream({start: 0, end: 100});
+ var secondPart = slicer.createReadStream({start: 100});
+ var firstOut = fs.createWriteStream("first.txt");
+ var secondOut = fs.createWriteStream("second.txt");
+ firstPart.pipe(firstOut);
+ secondPart.pipe(secondOut);
+});
+```
+
+You can also create from a buffer:
+
+```js
+var fdSlicer = require('fd-slicer');
+var slicer = FdSlicer.createFromBuffer(someBuffer);
+var firstPart = slicer.createReadStream({start: 0, end: 100});
+var secondPart = slicer.createReadStream({start: 100});
+var firstOut = fs.createWriteStream("first.txt");
+var secondOut = fs.createWriteStream("second.txt");
+firstPart.pipe(firstOut);
+secondPart.pipe(secondOut);
+```
+
+## API Documentation
+
+### fdSlicer.createFromFd(fd, [options])
+
+```js
+var fdSlicer = require('fd-slicer');
+fs.open("file.txt", 'r', function(err, fd) {
+ if (err) throw err;
+ var slicer = fdSlicer.createFromFd(fd);
+ // ...
+});
+```
+
+Make sure `fd` is a properly initialized file descriptor. If you want to
+use `createReadStream` make sure you open it for reading and if you want
+to use `createWriteStream` make sure you open it for writing.
+
+`options` is an optional object which can contain:
+
+ * `autoClose` - if set to `true`, the file descriptor will be automatically
+ closed once the last stream that references it is closed. Defaults to
+ `false`. `ref()` and `unref()` can be used to increase or decrease the
+ reference count, respectively.
+
+### fdSlicer.createFromBuffer(buffer, [options])
+
+```js
+var fdSlicer = require('fd-slicer');
+var slicer = fdSlicer.createFromBuffer(someBuffer);
+// ...
+```
+
+`options` is an optional object which can contain:
+
+ * `maxChunkSize` - A `Number` of bytes. see `createReadStream()`.
+ If falsey, defaults to unlimited.
+
+#### Properties
+
+##### fd
+
+The file descriptor passed in. `undefined` if created from a buffer.
+
+#### Methods
+
+##### createReadStream(options)
+
+Available `options`:
+
+ * `start` - Number. The offset into the file to start reading from. Defaults
+ to 0.
+ * `end` - Number. Exclusive upper bound offset into the file to stop reading
+ from.
+ * `highWaterMark` - Number. The maximum number of bytes to store in the
+ internal buffer before ceasing to read from the underlying resource.
+ Defaults to 16 KB.
+ * `encoding` - String. If specified, then buffers will be decoded to strings
+ using the specified encoding. Defaults to `null`.
+
+The ReadableStream that this returns has these additional methods:
+
+ * `destroy(err)` - stop streaming. `err` is optional and is the error that
+ will be emitted in order to cause the streaming to stop. Defaults to
+ `new Error("stream destroyed")`.
+
+If `maxChunkSize` was specified (see `createFromBuffer()`), the read stream
+will provide chunks of at most that size. Normally, the read stream provides
+the entire range requested in a single chunk, but this can cause performance
+problems in some circumstances.
+See [thejoshwolfe/yauzl#87](https://github.com/thejoshwolfe/yauzl/issues/87).
+
+##### createWriteStream(options)
+
+Available `options`:
+
+ * `start` - Number. The offset into the file to start writing to. Defaults to
+ 0.
+ * `end` - Number. Exclusive upper bound offset into the file. If this offset
+ is reached, the write stream will emit an 'error' event and stop functioning.
+ In this situation, `err.code === 'ETOOBIG'`. Defaults to `Infinity`.
+ * `highWaterMark` - Number. Buffer level when `write()` starts returning
+ false. Defaults to 16KB.
+ * `decodeStrings` - Boolean. Whether or not to decode strings into Buffers
+ before passing them to` _write()`. Defaults to `true`.
+
+The WritableStream that this returns has these additional methods:
+
+ * `destroy()` - stop streaming
+
+And these additional properties:
+
+ * `bytesWritten` - number of bytes written to the stream
+
+And these additional events:
+
+ * 'progress' - emitted when `bytesWritten` changes.
+
+##### read(buffer, offset, length, position, callback)
+
+Equivalent to `fs.read`, but with concurrency protection.
+`callback` must be defined.
+
+##### write(buffer, offset, length, position, callback)
+
+Equivalent to `fs.write`, but with concurrency protection.
+`callback` must be defined.
+
+##### ref()
+
+Increase the `autoClose` reference count by 1.
+
+##### unref()
+
+Decrease the `autoClose` reference count by 1.
+
+#### Events
+
+##### 'error'
+
+Emitted if `fs.close` returns an error when auto closing.
+
+##### 'close'
+
+Emitted when fd-slicer closes the file descriptor due to `autoClose`. Never
+emitted if created from a buffer.
diff --git a/node_modules/fd-slicer/index.js b/node_modules/fd-slicer/index.js
new file mode 100644
index 0000000..65d32a3
--- /dev/null
+++ b/node_modules/fd-slicer/index.js
@@ -0,0 +1,296 @@
+var fs = require('fs');
+var util = require('util');
+var stream = require('stream');
+var Readable = stream.Readable;
+var Writable = stream.Writable;
+var PassThrough = stream.PassThrough;
+var Pend = require('pend');
+var EventEmitter = require('events').EventEmitter;
+
+exports.createFromBuffer = createFromBuffer;
+exports.createFromFd = createFromFd;
+exports.BufferSlicer = BufferSlicer;
+exports.FdSlicer = FdSlicer;
+
+util.inherits(FdSlicer, EventEmitter);
+function FdSlicer(fd, options) {
+ options = options || {};
+ EventEmitter.call(this);
+
+ this.fd = fd;
+ this.pend = new Pend();
+ this.pend.max = 1;
+ this.refCount = 0;
+ this.autoClose = !!options.autoClose;
+}
+
+FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
+ var self = this;
+ self.pend.go(function(cb) {
+ fs.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
+ cb();
+ callback(err, bytesRead, buffer);
+ });
+ });
+};
+
+FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
+ var self = this;
+ self.pend.go(function(cb) {
+ fs.write(self.fd, buffer, offset, length, position, function(err, written, buffer) {
+ cb();
+ callback(err, written, buffer);
+ });
+ });
+};
+
+FdSlicer.prototype.createReadStream = function(options) {
+ return new ReadStream(this, options);
+};
+
+FdSlicer.prototype.createWriteStream = function(options) {
+ return new WriteStream(this, options);
+};
+
+FdSlicer.prototype.ref = function() {
+ this.refCount += 1;
+};
+
+FdSlicer.prototype.unref = function() {
+ var self = this;
+ self.refCount -= 1;
+
+ if (self.refCount > 0) return;
+ if (self.refCount < 0) throw new Error("invalid unref");
+
+ if (self.autoClose) {
+ fs.close(self.fd, onCloseDone);
+ }
+
+ function onCloseDone(err) {
+ if (err) {
+ self.emit('error', err);
+ } else {
+ self.emit('close');
+ }
+ }
+};
+
+util.inherits(ReadStream, Readable);
+function ReadStream(context, options) {
+ options = options || {};
+ Readable.call(this, options);
+
+ this.context = context;
+ this.context.ref();
+
+ this.start = options.start || 0;
+ this.endOffset = options.end;
+ this.pos = this.start;
+ this.destroyed = false;
+}
+
+ReadStream.prototype._read = function(n) {
+ var self = this;
+ if (self.destroyed) return;
+
+ var toRead = Math.min(self._readableState.highWaterMark, n);
+ if (self.endOffset != null) {
+ toRead = Math.min(toRead, self.endOffset - self.pos);
+ }
+ if (toRead <= 0) {
+ self.destroyed = true;
+ self.push(null);
+ self.context.unref();
+ return;
+ }
+ self.context.pend.go(function(cb) {
+ if (self.destroyed) return cb();
+ var buffer = new Buffer(toRead);
+ fs.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
+ if (err) {
+ self.destroy(err);
+ } else if (bytesRead === 0) {
+ self.destroyed = true;
+ self.push(null);
+ self.context.unref();
+ } else {
+ self.pos += bytesRead;
+ self.push(buffer.slice(0, bytesRead));
+ }
+ cb();
+ });
+ });
+};
+
+ReadStream.prototype.destroy = function(err) {
+ if (this.destroyed) return;
+ err = err || new Error("stream destroyed");
+ this.destroyed = true;
+ this.emit('error', err);
+ this.context.unref();
+};
+
+util.inherits(WriteStream, Writable);
+function WriteStream(context, options) {
+ options = options || {};
+ Writable.call(this, options);
+
+ this.context = context;
+ this.context.ref();
+
+ this.start = options.start || 0;
+ this.endOffset = (options.end == null) ? Infinity : +options.end;
+ this.bytesWritten = 0;
+ this.pos = this.start;
+ this.destroyed = false;
+
+ this.on('finish', this.destroy.bind(this));
+}
+
+WriteStream.prototype._write = function(buffer, encoding, callback) {
+ var self = this;
+ if (self.destroyed) return;
+
+ if (self.pos + buffer.length > self.endOffset) {
+ var err = new Error("maximum file length exceeded");
+ err.code = 'ETOOBIG';
+ self.destroy();
+ callback(err);
+ return;
+ }
+ self.context.pend.go(function(cb) {
+ if (self.destroyed) return cb();
+ fs.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err, bytes) {
+ if (err) {
+ self.destroy();
+ cb();
+ callback(err);
+ } else {
+ self.bytesWritten += bytes;
+ self.pos += bytes;
+ self.emit('progress');
+ cb();
+ callback();
+ }
+ });
+ });
+};
+
+WriteStream.prototype.destroy = function() {
+ if (this.destroyed) return;
+ this.destroyed = true;
+ this.context.unref();
+};
+
+util.inherits(BufferSlicer, EventEmitter);
+function BufferSlicer(buffer, options) {
+ EventEmitter.call(this);
+
+ options = options || {};
+ this.refCount = 0;
+ this.buffer = buffer;
+ this.maxChunkSize = options.maxChunkSize || Number.MAX_SAFE_INTEGER;
+}
+
+BufferSlicer.prototype.read = function(buffer, offset, length, position, callback) {
+ var end = position + length;
+ var delta = end - this.buffer.length;
+ var written = (delta > 0) ? delta : length;
+ this.buffer.copy(buffer, offset, position, end);
+ setImmediate(function() {
+ callback(null, written);
+ });
+};
+
+BufferSlicer.prototype.write = function(buffer, offset, length, position, callback) {
+ buffer.copy(this.buffer, position, offset, offset + length);
+ setImmediate(function() {
+ callback(null, length, buffer);
+ });
+};
+
+BufferSlicer.prototype.createReadStream = function(options) {
+ options = options || {};
+ var readStream = new PassThrough(options);
+ readStream.destroyed = false;
+ readStream.start = options.start || 0;
+ readStream.endOffset = options.end;
+ // by the time this function returns, we'll be done.
+ readStream.pos = readStream.endOffset || this.buffer.length;
+
+ // respect the maxChunkSize option to slice up the chunk into smaller pieces.
+ var entireSlice = this.buffer.slice(readStream.start, readStream.pos);
+ var offset = 0;
+ while (true) {
+ var nextOffset = offset + this.maxChunkSize;
+ if (nextOffset >= entireSlice.length) {
+ // last chunk
+ if (offset < entireSlice.length) {
+ readStream.write(entireSlice.slice(offset, entireSlice.length));
+ }
+ break;
+ }
+ readStream.write(entireSlice.slice(offset, nextOffset));
+ offset = nextOffset;
+ }
+
+ readStream.end();
+ readStream.destroy = function() {
+ readStream.destroyed = true;
+ };
+ return readStream;
+};
+
+BufferSlicer.prototype.createWriteStream = function(options) {
+ var bufferSlicer = this;
+ options = options || {};
+ var writeStream = new Writable(options);
+ writeStream.start = options.start || 0;
+ writeStream.endOffset = (options.end == null) ? this.buffer.length : +options.end;
+ writeStream.bytesWritten = 0;
+ writeStream.pos = writeStream.start;
+ writeStream.destroyed = false;
+ writeStream._write = function(buffer, encoding, callback) {
+ if (writeStream.destroyed) return;
+
+ var end = writeStream.pos + buffer.length;
+ if (end > writeStream.endOffset) {
+ var err = new Error("maximum file length exceeded");
+ err.code = 'ETOOBIG';
+ writeStream.destroyed = true;
+ callback(err);
+ return;
+ }
+ buffer.copy(bufferSlicer.buffer, writeStream.pos, 0, buffer.length);
+
+ writeStream.bytesWritten += buffer.length;
+ writeStream.pos = end;
+ writeStream.emit('progress');
+ callback();
+ };
+ writeStream.destroy = function() {
+ writeStream.destroyed = true;
+ };
+ return writeStream;
+};
+
+BufferSlicer.prototype.ref = function() {
+ this.refCount += 1;
+};
+
+BufferSlicer.prototype.unref = function() {
+ this.refCount -= 1;
+
+ if (this.refCount < 0) {
+ throw new Error("invalid unref");
+ }
+};
+
+function createFromBuffer(buffer, options) {
+ return new BufferSlicer(buffer, options);
+}
+
+function createFromFd(fd, options) {
+ return new FdSlicer(fd, options);
+}
diff --git a/node_modules/fd-slicer/package.json b/node_modules/fd-slicer/package.json
new file mode 100644
index 0000000..407f677
--- /dev/null
+++ b/node_modules/fd-slicer/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "fd-slicer",
+ "version": "1.1.0",
+ "description": "safely create multiple ReadStream or WriteStream objects from the same file descriptor",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha --reporter spec --check-leaks",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/test.js",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --timeout 10000 --reporter spec --check-leaks test/test.js"
+ },
+ "author": "Andrew Kelley <superjoe30@gmail.com>",
+ "license": "MIT",
+ "devDependencies": {
+ "istanbul": "~0.3.3",
+ "mocha": "~2.0.1",
+ "stream-equal": "~0.1.5",
+ "streamsink": "~1.2.0"
+ },
+ "dependencies": {
+ "pend": "~1.2.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/andrewrk/node-fd-slicer.git"
+ },
+ "bugs": {
+ "url": "https://github.com/andrewrk/node-fd-slicer/issues"
+ },
+ "keywords": [
+ "createReadStream",
+ "createWriteStream"
+ ]
+}
diff --git a/node_modules/fd-slicer/test/test.js b/node_modules/fd-slicer/test/test.js
new file mode 100644
index 0000000..d05ab00
--- /dev/null
+++ b/node_modules/fd-slicer/test/test.js
@@ -0,0 +1,350 @@
+var fdSlicer = require('../');
+var fs = require('fs');
+var crypto = require('crypto');
+var path = require('path');
+var streamEqual = require('stream-equal');
+var assert = require('assert');
+var Pend = require('pend');
+var StreamSink = require('streamsink');
+
+var describe = global.describe;
+var it = global.it;
+var before = global.before;
+var beforeEach = global.beforeEach;
+var after = global.after;
+
+var testBlobFile = path.join(__dirname, "test-blob.bin");
+var testBlobFileSize = 20 * 1024 * 1024;
+var testOutBlobFile = path.join(__dirname, "test-blob-out.bin");
+
+describe("FdSlicer", function() {
+ before(function(done) {
+ var out = fs.createWriteStream(testBlobFile);
+ for (var i = 0; i < testBlobFileSize / 1024; i += 1) {
+ out.write(crypto.pseudoRandomBytes(1024));
+ }
+ out.end();
+ out.on('close', done);
+ });
+ beforeEach(function() {
+ try {
+ fs.unlinkSync(testOutBlobFile);
+ } catch (err) {
+ }
+ });
+ after(function() {
+ try {
+ fs.unlinkSync(testBlobFile);
+ fs.unlinkSync(testOutBlobFile);
+ } catch (err) {
+ }
+ });
+ it("reads a 20MB file (autoClose on)", function(done) {
+ fs.open(testBlobFile, 'r', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var actualStream = slicer.createReadStream();
+ var expectedStream = fs.createReadStream(testBlobFile);
+
+ var pend = new Pend();
+ pend.go(function(cb) {
+ slicer.on('close', cb);
+ });
+ pend.go(function(cb) {
+ streamEqual(expectedStream, actualStream, function(err, equal) {
+ if (err) return done(err);
+ assert.ok(equal);
+ cb();
+ });
+ });
+ pend.wait(done);
+ });
+ });
+ it("reads 4 chunks simultaneously", function(done) {
+ fs.open(testBlobFile, 'r', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd);
+ var actualPart1 = slicer.createReadStream({start: testBlobFileSize * 0/4, end: testBlobFileSize * 1/4});
+ var actualPart2 = slicer.createReadStream({start: testBlobFileSize * 1/4, end: testBlobFileSize * 2/4});
+ var actualPart3 = slicer.createReadStream({start: testBlobFileSize * 2/4, end: testBlobFileSize * 3/4});
+ var actualPart4 = slicer.createReadStream({start: testBlobFileSize * 3/4, end: testBlobFileSize * 4/4});
+ var expectedPart1 = slicer.createReadStream({start: testBlobFileSize * 0/4, end: testBlobFileSize * 1/4});
+ var expectedPart2 = slicer.createReadStream({start: testBlobFileSize * 1/4, end: testBlobFileSize * 2/4});
+ var expectedPart3 = slicer.createReadStream({start: testBlobFileSize * 2/4, end: testBlobFileSize * 3/4});
+ var expectedPart4 = slicer.createReadStream({start: testBlobFileSize * 3/4, end: testBlobFileSize * 4/4});
+ var pend = new Pend();
+ pend.go(function(cb) {
+ streamEqual(expectedPart1, actualPart1, function(err, equal) {
+ assert.ok(equal);
+ cb(err);
+ });
+ });
+ pend.go(function(cb) {
+ streamEqual(expectedPart2, actualPart2, function(err, equal) {
+ assert.ok(equal);
+ cb(err);
+ });
+ });
+ pend.go(function(cb) {
+ streamEqual(expectedPart3, actualPart3, function(err, equal) {
+ assert.ok(equal);
+ cb(err);
+ });
+ });
+ pend.go(function(cb) {
+ streamEqual(expectedPart4, actualPart4, function(err, equal) {
+ assert.ok(equal);
+ cb(err);
+ });
+ });
+ pend.wait(function(err) {
+ if (err) return done(err);
+ fs.close(fd, done);
+ });
+ });
+ });
+
+ it("writes a 20MB file (autoClose on)", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var actualStream = slicer.createWriteStream();
+ var inStream = fs.createReadStream(testBlobFile);
+
+ slicer.on('close', function() {
+ var expected = fs.createReadStream(testBlobFile);
+ var actual = fs.createReadStream(testOutBlobFile);
+
+ streamEqual(expected, actual, function(err, equal) {
+ if (err) return done(err);
+ assert.ok(equal);
+ done();
+ });
+ });
+ inStream.pipe(actualStream);
+ });
+ });
+
+ it("writes 4 chunks simultaneously", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd);
+ var actualPart1 = slicer.createWriteStream({start: testBlobFileSize * 0/4});
+ var actualPart2 = slicer.createWriteStream({start: testBlobFileSize * 1/4});
+ var actualPart3 = slicer.createWriteStream({start: testBlobFileSize * 2/4});
+ var actualPart4 = slicer.createWriteStream({start: testBlobFileSize * 3/4});
+ var in1 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 0/4, end: testBlobFileSize * 1/4});
+ var in2 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 1/4, end: testBlobFileSize * 2/4});
+ var in3 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 2/4, end: testBlobFileSize * 3/4});
+ var in4 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 3/4, end: testBlobFileSize * 4/4});
+ var pend = new Pend();
+ pend.go(function(cb) {
+ actualPart1.on('finish', cb);
+ });
+ pend.go(function(cb) {
+ actualPart2.on('finish', cb);
+ });
+ pend.go(function(cb) {
+ actualPart3.on('finish', cb);
+ });
+ pend.go(function(cb) {
+ actualPart4.on('finish', cb);
+ });
+ in1.pipe(actualPart1);
+ in2.pipe(actualPart2);
+ in3.pipe(actualPart3);
+ in4.pipe(actualPart4);
+ pend.wait(function() {
+ fs.close(fd, function(err) {
+ if (err) return done(err);
+ var expected = fs.createReadStream(testBlobFile);
+ var actual = fs.createReadStream(testOutBlobFile);
+ streamEqual(expected, actual, function(err, equal) {
+ if (err) return done(err);
+ assert.ok(equal);
+ done();
+ });
+ });
+ });
+ });
+ });
+
+ it("throws on invalid ref", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ assert.throws(function() {
+ slicer.unref();
+ }, /invalid unref/);
+ fs.close(fd, done);
+ });
+ });
+
+ it("write stream emits error when max size exceeded", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var ws = slicer.createWriteStream({start: 0, end: 1000});
+ ws.on('error', function(err) {
+ assert.strictEqual(err.code, 'ETOOBIG');
+ slicer.on('close', done);
+ });
+ ws.end(new Buffer(1001));
+ });
+ });
+
+ it("write stream does not emit error when max size not exceeded", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var ws = slicer.createWriteStream({end: 1000});
+ slicer.on('close', done);
+ ws.end(new Buffer(1000));
+ });
+ });
+
+ it("write stream start and end work together", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var ws = slicer.createWriteStream({start: 1, end: 1000});
+ ws.on('error', function(err) {
+ assert.strictEqual(err.code, 'ETOOBIG');
+ slicer.on('close', done);
+ });
+ ws.end(new Buffer(1000));
+ });
+ });
+
+ it("write stream emits progress events", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var ws = slicer.createWriteStream();
+ var progressEventCount = 0;
+ var prevBytesWritten = 0;
+ ws.on('progress', function() {
+ progressEventCount += 1;
+ assert.ok(ws.bytesWritten > prevBytesWritten);
+ prevBytesWritten = ws.bytesWritten;
+ });
+ slicer.on('close', function() {
+ assert.ok(progressEventCount > 5);
+ done();
+ });
+ for (var i = 0; i < 10; i += 1) {
+ ws.write(new Buffer(16 * 1024 * 2));
+ }
+ ws.end();
+ });
+ });
+
+ it("write stream unrefs when destroyed", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var ws = slicer.createWriteStream();
+ slicer.on('close', done);
+ ws.write(new Buffer(1000));
+ ws.destroy();
+ });
+ });
+
+ it("read stream unrefs when destroyed", function(done) {
+ fs.open(testBlobFile, 'r', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd, {autoClose: true});
+ var rs = slicer.createReadStream();
+ rs.on('error', function(err) {
+ assert.strictEqual(err.message, "stream destroyed");
+ slicer.on('close', done);
+ });
+ rs.destroy();
+ });
+ });
+
+ it("fdSlicer.read", function(done) {
+ fs.open(testBlobFile, 'r', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd);
+ var outBuf = new Buffer(1024);
+ slicer.read(outBuf, 0, 10, 0, function(err, bytesRead, buf) {
+ assert.strictEqual(bytesRead, 10);
+ fs.close(fd, done);
+ });
+ });
+ });
+
+ it("fdSlicer.write", function(done) {
+ fs.open(testOutBlobFile, 'w', function(err, fd) {
+ if (err) return done(err);
+ var slicer = fdSlicer.createFromFd(fd);
+ slicer.write(new Buffer("blah\n"), 0, 5, 0, function() {
+ if (err) return done(err);
+ fs.close(fd, done);
+ });
+ });
+ });
+});
+
+describe("BufferSlicer", function() {
+ it("invalid ref", function() {
+ var slicer = fdSlicer.createFromBuffer(new Buffer(16));
+ slicer.ref();
+ slicer.unref();
+ assert.throws(function() {
+ slicer.unref();
+ }, /invalid unref/);
+ });
+ it("read and write", function(done) {
+ var buf = new Buffer("through the tangled thread the needle finds its way");
+ var slicer = fdSlicer.createFromBuffer(buf);
+ var outBuf = new Buffer(1024);
+ slicer.read(outBuf, 10, 11, 8, function(err) {
+ if (err) return done(err);
+ assert.strictEqual(outBuf.toString('utf8', 10, 21), "the tangled");
+ slicer.write(new Buffer("derp"), 0, 4, 7, function(err) {
+ if (err) return done(err);
+ assert.strictEqual(buf.toString('utf8', 7, 19), "derp tangled");
+ done();
+ });
+ });
+ });
+ it("createReadStream", function(done) {
+ var str = "I never conquered rarely came, 16 just held such better days";
+ var buf = new Buffer(str);
+ var slicer = fdSlicer.createFromBuffer(buf);
+ var inStream = slicer.createReadStream();
+ var sink = new StreamSink();
+ inStream.pipe(sink);
+ sink.on('finish', function() {
+ assert.strictEqual(sink.toString(), str);
+ inStream.destroy();
+ done();
+ });
+ });
+ it("createWriteStream exceed buffer size", function(done) {
+ var slicer = fdSlicer.createFromBuffer(new Buffer(4));
+ var outStream = slicer.createWriteStream();
+ outStream.on('error', function(err) {
+ assert.strictEqual(err.code, 'ETOOBIG');
+ done();
+ });
+ outStream.write("hi!\n");
+ outStream.write("it warked\n");
+ outStream.end();
+ });
+ it("createWriteStream ok", function(done) {
+ var buf = new Buffer(1024);
+ var slicer = fdSlicer.createFromBuffer(buf);
+ var outStream = slicer.createWriteStream();
+ outStream.on('finish', function() {
+ assert.strictEqual(buf.toString('utf8', 0, "hi!\nit warked\n".length), "hi!\nit warked\n");
+ outStream.destroy();
+ done();
+ });
+ outStream.write("hi!\n");
+ outStream.write("it warked\n");
+ outStream.end();
+ });
+});
diff --git a/node_modules/filename-reserved-regex/index.js b/node_modules/filename-reserved-regex/index.js
new file mode 100644
index 0000000..174f46f
--- /dev/null
+++ b/node_modules/filename-reserved-regex/index.js
@@ -0,0 +1,5 @@
+'use strict';
+/* eslint-disable no-control-regex */
+// TODO: remove parens when Node.js 6 is targeted. Node.js 4 barfs at it.
+module.exports = () => (/[<>:"\/\\|?*\x00-\x1F]/g);
+module.exports.windowsNames = () => (/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i);
diff --git a/node_modules/filename-reserved-regex/license b/node_modules/filename-reserved-regex/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/filename-reserved-regex/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/filename-reserved-regex/package.json b/node_modules/filename-reserved-regex/package.json
new file mode 100644
index 0000000..37074a0
--- /dev/null
+++ b/node_modules/filename-reserved-regex/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "filename-reserved-regex",
+ "version": "2.0.0",
+ "description": "Regular expression for matching reserved filename characters",
+ "license": "MIT",
+ "repository": "sindresorhus/filename-reserved-regex",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "re",
+ "regex",
+ "regexp",
+ "filename",
+ "reserved",
+ "illegal"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/filename-reserved-regex/readme.md b/node_modules/filename-reserved-regex/readme.md
new file mode 100644
index 0000000..91641b5
--- /dev/null
+++ b/node_modules/filename-reserved-regex/readme.md
@@ -0,0 +1,49 @@
+# filename-reserved-regex [![Build Status](https://travis-ci.org/sindresorhus/filename-reserved-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/filename-reserved-regex)
+
+> Regular expression for matching reserved filename characters
+
+On Unix-like systems `/` is reserved and [`<>:"/\|?*`](http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29#naming_conventions) as well as non-printable characters `\x00-\x1F` on Windows.
+
+
+## Install
+
+```
+$ npm install --save filename-reserved-regex
+```
+
+
+## Usage
+
+```js
+const filenameReservedRegex = require('filename-reserved-regex');
+
+filenameReservedRegex().test('foo/bar');
+//=> true
+
+filenameReservedRegex().test('foo-bar');
+//=> false
+
+'foo/bar'.replace(filenameReservedRegex(), '!');
+//=> 'foo!bar'
+
+filenameReservedRegex.windowsNames().test('aux');
+//=> true
+```
+
+## API
+
+### filenameReservedRegex()
+
+Returns a regex that matches all invalid characters.
+
+### filenameReservedRegex.windowsNames()
+
+Returns a exact-match case-insensitive regex that matches invalid Windows
+filenames. These include `CON`, `PRN`, `AUX`, `NUL`, `COM1`, `COM2`, `COM3`, `COM4`, `COM5`,
+`COM6`, `COM7`, `COM8`, `COM9`, `LPT1`, `LPT2`, `LPT3`, `LPT4`, `LPT5`, `LPT6`, `LPT7`, `LPT8`
+and `LPT9`.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/filenamify/filenamify-path.d.ts b/node_modules/filenamify/filenamify-path.d.ts
new file mode 100644
index 0000000..2346602
--- /dev/null
+++ b/node_modules/filenamify/filenamify-path.d.ts
@@ -0,0 +1,8 @@
+import filenamify = require('./filenamify');
+
+/**
+Convert the filename in a path a valid filename and return the augmented path.
+*/
+declare const filenamifyPath: (path: string, options?: filenamify.Options) => string;
+
+export = filenamifyPath;
diff --git a/node_modules/filenamify/filenamify-path.js b/node_modules/filenamify/filenamify-path.js
new file mode 100644
index 0000000..359c119
--- /dev/null
+++ b/node_modules/filenamify/filenamify-path.js
@@ -0,0 +1,10 @@
+'use strict';
+const path = require('path');
+const filenamify = require('./filenamify');
+
+const filenamifyPath = (filePath, options) => {
+ filePath = path.resolve(filePath);
+ return path.join(path.dirname(filePath), filenamify(path.basename(filePath), options));
+};
+
+module.exports = filenamifyPath;
diff --git a/node_modules/filenamify/filenamify.d.ts b/node_modules/filenamify/filenamify.d.ts
new file mode 100644
index 0000000..cc17d11
--- /dev/null
+++ b/node_modules/filenamify/filenamify.d.ts
@@ -0,0 +1,39 @@
+declare namespace filenamify {
+ interface Options {
+ /**
+ String to use as replacement for reserved filename characters.
+
+ Cannot contain: `<` `>` `:` `"` `/` `\` `|` `?` `*`
+
+ @default '!'
+ */
+ readonly replacement?: string;
+
+ /**
+ Truncate the filename to the given length.
+
+ Systems generally allow up to 255 characters, but we default to 100 for usability reasons.
+
+ @default 100
+ */
+ readonly maxLength?: number;
+ }
+}
+
+/**
+Convert a string to a valid filename.
+
+@example
+```
+import filenamify = require('filenamify');
+
+filenamify('<foo/bar>');
+//=> 'foo!bar'
+
+filenamify('foo:"bar"', {replacement: '🐴'});
+//=> 'foo🐴bar'
+```
+*/
+declare const filenamify: (string: string, options?: filenamify.Options) => string;
+
+export = filenamify;
diff --git a/node_modules/filenamify/filenamify.js b/node_modules/filenamify/filenamify.js
new file mode 100644
index 0000000..a548430
--- /dev/null
+++ b/node_modules/filenamify/filenamify.js
@@ -0,0 +1,40 @@
+'use strict';
+const trimRepeated = require('trim-repeated');
+const filenameReservedRegex = require('filename-reserved-regex');
+const stripOuter = require('strip-outer');
+
+// Doesn't make sense to have longer filenames
+const MAX_FILENAME_LENGTH = 100;
+
+const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g; // eslint-disable-line no-control-regex
+const reRelativePath = /^\.+/;
+const reTrailingPeriods = /\.+$/;
+
+const filenamify = (string, options = {}) => {
+ if (typeof string !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ const replacement = options.replacement === undefined ? '!' : options.replacement;
+
+ if (filenameReservedRegex().test(replacement) && reControlChars.test(replacement)) {
+ throw new Error('Replacement string cannot contain reserved filename characters');
+ }
+
+ string = string.replace(filenameReservedRegex(), replacement);
+ string = string.replace(reControlChars, replacement);
+ string = string.replace(reRelativePath, replacement);
+ string = string.replace(reTrailingPeriods, '');
+
+ if (replacement.length > 0) {
+ string = trimRepeated(string, replacement);
+ string = string.length > 1 ? stripOuter(string, replacement) : string;
+ }
+
+ string = filenameReservedRegex.windowsNames().test(string) ? string + replacement : string;
+ string = string.slice(0, typeof options.maxLength === 'number' ? options.maxLength : MAX_FILENAME_LENGTH);
+
+ return string;
+};
+
+module.exports = filenamify;
diff --git a/node_modules/filenamify/index.d.ts b/node_modules/filenamify/index.d.ts
new file mode 100644
index 0000000..4aea46f
--- /dev/null
+++ b/node_modules/filenamify/index.d.ts
@@ -0,0 +1,24 @@
+import filenamify = require('./filenamify');
+import filenamifyPath = require('./filenamify-path');
+
+declare const filenamifyCombined: {
+ /**
+ Convert a string to a valid filename.
+
+ @example
+ ```
+ import filenamify = require('filenamify');
+
+ filenamify('<foo/bar>');
+ //=> 'foo!bar'
+
+ filenamify('foo:"bar"', {replacement: '🐴'});
+ //=> 'foo🐴bar'
+ ```
+ */
+ (string: string, options?: filenamify.Options): string;
+
+ path: typeof filenamifyPath;
+};
+
+export = filenamifyCombined;
diff --git a/node_modules/filenamify/index.js b/node_modules/filenamify/index.js
new file mode 100644
index 0000000..260bbd1
--- /dev/null
+++ b/node_modules/filenamify/index.js
@@ -0,0 +1,8 @@
+'use strict';
+const filenamify = require('./filenamify');
+const filenamifyPath = require('./filenamify-path');
+
+const filenamifyCombined = filenamify;
+filenamifyCombined.path = filenamifyPath;
+
+module.exports = filenamify;
diff --git a/node_modules/filenamify/license b/node_modules/filenamify/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/filenamify/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/filenamify/package.json b/node_modules/filenamify/package.json
new file mode 100644
index 0000000..9b22083
--- /dev/null
+++ b/node_modules/filenamify/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "filenamify",
+ "version": "4.3.0",
+ "description": "Convert a string to a valid safe filename",
+ "license": "MIT",
+ "repository": "sindresorhus/filenamify",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "filenamify-path.d.ts",
+ "filenamify-path.js",
+ "filenamify.d.ts",
+ "filenamify.js",
+ "index.d.ts",
+ "index.js"
+ ],
+ "exports": {
+ ".": "./index.js",
+ "./browser": "./filenamify.js"
+ },
+ "keywords": [
+ "filename",
+ "safe",
+ "sanitize",
+ "file",
+ "name",
+ "string",
+ "path",
+ "filepath",
+ "convert",
+ "valid",
+ "dirname"
+ ],
+ "dependencies": {
+ "filename-reserved-regex": "^2.0.0",
+ "strip-outer": "^1.0.1",
+ "trim-repeated": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/filenamify/readme.md b/node_modules/filenamify/readme.md
new file mode 100644
index 0000000..3b0d747
--- /dev/null
+++ b/node_modules/filenamify/readme.md
@@ -0,0 +1,74 @@
+# filenamify
+
+> Convert a string to a valid safe filename
+
+On Unix-like systems, `/` is reserved. On Windows, [`<>:"/\|?*`](http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29#naming_conventions) along with trailing periods are reserved.
+
+## Install
+
+```
+$ npm install filenamify
+```
+
+## Usage
+
+```js
+const filenamify = require('filenamify');
+
+filenamify('<foo/bar>');
+//=> 'foo!bar'
+
+filenamify('foo:"bar"', {replacement: '🐴'});
+//=> 'foo🐴bar'
+```
+
+## API
+
+### filenamify(string, options?)
+
+Convert a string to a valid filename.
+
+### filenamify.path(path, options?)
+
+Convert the filename in a path a valid filename and return the augmented path.
+
+#### options
+
+Type: `object`
+
+##### replacement
+
+Type: `string`\
+Default: `'!'`
+
+String to use as replacement for reserved filename characters.
+
+Cannot contain: `<` `>` `:` `"` `/` `\` `|` `?` `*`
+
+##### maxLength
+
+Type: `number`\
+Default: `100`
+
+Truncate the filename to the given length.
+
+Systems generally allow up to 255 characters, but we default to 100 for usability reasons.
+
+## Browser-only import
+
+You can also import `filenamify/browser`, which only imports `filenamify` and not `filenamify.path`, which relies on `path` being available or polyfilled. Importing `filenamify` this way is therefore useful when it is shipped using `webpack` or similar tools, and if `filenamify.path` is not needed.
+
+```js
+const filenamify = require('filenamify/browser');
+
+filenamify('<foo/bar>');
+//=> 'foo!bar'
+```
+
+## Related
+
+- [filenamify-cli](https://github.com/sindresorhus/filenamify-cli) - CLI for this module
+- [filenamify-url](https://github.com/sindresorhus/filenamify-url) - Convert a URL to a valid filename
+- [valid-filename](https://github.com/sindresorhus/valid-filename) - Check if a string is a valid filename
+- [unused-filename](https://github.com/sindresorhus/unused-filename) - Get a unused filename by appending a number if it exists
+- [slugify](https://github.com/sindresorhus/slugify) - Slugify a string
diff --git a/node_modules/find-up/index.js b/node_modules/find-up/index.js
new file mode 100644
index 0000000..7ff0e2b
--- /dev/null
+++ b/node_modules/find-up/index.js
@@ -0,0 +1,53 @@
+'use strict';
+var path = require('path');
+var pathExists = require('path-exists');
+var Promise = require('pinkie-promise');
+
+function splitPath(x) {
+ return path.resolve(x || '').split(path.sep);
+}
+
+function join(parts, filename) {
+ return path.resolve(parts.join(path.sep) + path.sep, filename);
+}
+
+module.exports = function (filename, opts) {
+ opts = opts || {};
+
+ var parts = splitPath(opts.cwd);
+
+ return new Promise(function (resolve) {
+ (function find() {
+ var fp = join(parts, filename);
+
+ pathExists(fp).then(function (exists) {
+ if (exists) {
+ resolve(fp);
+ } else if (parts.pop()) {
+ find();
+ } else {
+ resolve(null);
+ }
+ });
+ })();
+ });
+};
+
+module.exports.sync = function (filename, opts) {
+ opts = opts || {};
+
+ var parts = splitPath(opts.cwd);
+ var len = parts.length;
+
+ while (len--) {
+ var fp = join(parts, filename);
+
+ if (pathExists.sync(fp)) {
+ return fp;
+ }
+
+ parts.pop();
+ }
+
+ return null;
+};
diff --git a/node_modules/find-up/license b/node_modules/find-up/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/find-up/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/find-up/node_modules/path-exists/index.js b/node_modules/find-up/node_modules/path-exists/index.js
new file mode 100644
index 0000000..a7e680a
--- /dev/null
+++ b/node_modules/find-up/node_modules/path-exists/index.js
@@ -0,0 +1,24 @@
+'use strict';
+var fs = require('fs');
+var Promise = require('pinkie-promise');
+
+module.exports = function (fp) {
+ var fn = typeof fs.access === 'function' ? fs.access : fs.stat;
+
+ return new Promise(function (resolve) {
+ fn(fp, function (err) {
+ resolve(!err);
+ });
+ });
+};
+
+module.exports.sync = function (fp) {
+ var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync;
+
+ try {
+ fn(fp);
+ return true;
+ } catch (err) {
+ return false;
+ }
+};
diff --git a/node_modules/find-up/node_modules/path-exists/license b/node_modules/find-up/node_modules/path-exists/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/find-up/node_modules/path-exists/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/find-up/node_modules/path-exists/package.json b/node_modules/find-up/node_modules/path-exists/package.json
new file mode 100644
index 0000000..5477ee8
--- /dev/null
+++ b/node_modules/find-up/node_modules/path-exists/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "path-exists",
+ "version": "2.1.0",
+ "description": "Check if a path exists",
+ "license": "MIT",
+ "repository": "sindresorhus/path-exists",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "exists",
+ "exist",
+ "file",
+ "filepath",
+ "fs",
+ "filesystem",
+ "file-system",
+ "access",
+ "stat"
+ ],
+ "dependencies": {
+ "pinkie-promise": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/find-up/node_modules/path-exists/readme.md b/node_modules/find-up/node_modules/path-exists/readme.md
new file mode 100644
index 0000000..8fbcd68
--- /dev/null
+++ b/node_modules/find-up/node_modules/path-exists/readme.md
@@ -0,0 +1,45 @@
+# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists)
+
+> Check if a path exists
+
+Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
+
+Never use this before handling a file though:
+
+> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.
+
+
+## Install
+
+```
+$ npm install --save path-exists
+```
+
+
+## Usage
+
+```js
+// foo.js
+var pathExists = require('path-exists');
+
+pathExists('foo.js').then(function (exists) {
+ console.log(exists);
+ //=> true
+});
+```
+
+
+## API
+
+### pathExists(path)
+
+Returns a promise that resolves to a boolean of whether the path exists.
+
+### pathExists.sync(path)
+
+Returns a boolean of whether the path exists.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/find-up/package.json b/node_modules/find-up/package.json
new file mode 100644
index 0000000..478866c
--- /dev/null
+++ b/node_modules/find-up/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "find-up",
+ "version": "1.1.2",
+ "description": "Find a file by walking up parent directories",
+ "license": "MIT",
+ "repository": "sindresorhus/find-up",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "find",
+ "up",
+ "find-up",
+ "findup",
+ "look-up",
+ "look",
+ "file",
+ "search",
+ "match",
+ "package",
+ "resolve",
+ "parent",
+ "parents",
+ "folder",
+ "directory",
+ "dir",
+ "walk",
+ "walking",
+ "path"
+ ],
+ "dependencies": {
+ "path-exists": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "tempfile": "^1.1.1",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/find-up/readme.md b/node_modules/find-up/readme.md
new file mode 100644
index 0000000..9ea0611
--- /dev/null
+++ b/node_modules/find-up/readme.md
@@ -0,0 +1,72 @@
+# find-up [![Build Status](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up)
+
+> Find a file by walking up parent directories
+
+
+## Install
+
+```
+$ npm install --save find-up
+```
+
+
+## Usage
+
+```
+/
+└── Users
+ └── sindresorhus
+ ├── unicorn.png
+ └── foo
+ └── bar
+ ├── baz
+ └── example.js
+```
+
+```js
+// example.js
+const findUp = require('find-up');
+
+findUp('unicorn.png').then(filepath => {
+ console.log(filepath);
+ //=> '/Users/sindresorhus/unicorn.png'
+});
+```
+
+
+## API
+
+### findUp(filename, [options])
+
+Returns a promise for the filepath or `null`.
+
+### findUp.sync(filename, [options])
+
+Returns a filepath or `null`.
+
+#### filename
+
+Type: `string`
+
+Filename of the file to find.
+
+#### options
+
+##### cwd
+
+Type: `string`
+Default: `process.cwd()`
+
+Directory to start from.
+
+
+## Related
+
+- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
+- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
+- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/flora-colossus/.travis.yml b/node_modules/flora-colossus/.travis.yml
new file mode 100644
index 0000000..a443a72
--- /dev/null
+++ b/node_modules/flora-colossus/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+node_js:
+ - "6"
+ - "8"
+cache: yarn
+
+script: yarn test \ No newline at end of file
diff --git a/node_modules/flora-colossus/README.md b/node_modules/flora-colossus/README.md
new file mode 100644
index 0000000..074dc60
--- /dev/null
+++ b/node_modules/flora-colossus/README.md
@@ -0,0 +1,43 @@
+Flora Colossus
+-----------
+
+> Walk your node_modules tree
+
+## Installation
+
+```bash
+npm i --save-dev flora-colossus
+```
+
+## API
+
+### Enum: `DepType`
+
+```js
+import { DepType } from 'flora-colossus';
+
+// DepType.PROD --> Production dependency
+// DepType.OPTIONAL --> Optional dependency
+// DepType.DEV --> Development dependency
+// DepType.DEV_OPTIONAL --> Optional dependency of a development dependency
+// DepType.ROOT --> The root module
+```
+
+####
+
+### Class: `Walker`
+
+```js
+import { Walker } from 'flora-colossus';
+
+// modulePath is the root folder of your module
+const walker = new Walker(modulePath);
+```
+
+#### `walker.walkTree()`
+
+Returns `Promise<Module[]>`
+
+Will walk your entire node_modules tree reporting back an array of "modules", each
+module has a "path", "name" and "depType". See the typescript definition file
+for more information. \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/Walker.d.ts b/node_modules/flora-colossus/lib/Walker.d.ts
new file mode 100644
index 0000000..a338c58
--- /dev/null
+++ b/node_modules/flora-colossus/lib/Walker.d.ts
@@ -0,0 +1,35 @@
+import { DepType } from './depTypes';
+import { NativeModuleType } from './nativeModuleTypes';
+export declare type VersionRange = string;
+export interface PackageJSON {
+ name: string;
+ dependencies: {
+ [name: string]: VersionRange;
+ };
+ devDependencies: {
+ [name: string]: VersionRange;
+ };
+ optionalDependencies: {
+ [name: string]: VersionRange;
+ };
+}
+export interface Module {
+ path: string;
+ depType: DepType;
+ nativeModuleType: NativeModuleType;
+ name: string;
+}
+export declare class Walker {
+ private rootModule;
+ private modules;
+ private walkHistory;
+ constructor(modulePath: string);
+ private relativeModule;
+ private loadPackageJSON;
+ private walkDependenciesForModuleInModule;
+ private detectNativeModuleType;
+ private walkDependenciesForModule;
+ private cache;
+ walkTree(): Promise<Module[]>;
+ getRootModule(): string;
+}
diff --git a/node_modules/flora-colossus/lib/Walker.js b/node_modules/flora-colossus/lib/Walker.js
new file mode 100644
index 0000000..2448554
--- /dev/null
+++ b/node_modules/flora-colossus/lib/Walker.js
@@ -0,0 +1,287 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var debug = require("debug");
+var fs = require("fs-extra");
+var path = require("path");
+var depTypes_1 = require("./depTypes");
+var nativeModuleTypes_1 = require("./nativeModuleTypes");
+var d = debug('flora-colossus');
+var Walker = /** @class */ (function () {
+ function Walker(modulePath) {
+ this.walkHistory = new Set();
+ this.cache = null;
+ if (!modulePath || typeof modulePath !== 'string') {
+ throw new Error('modulePath must be provided as a string');
+ }
+ d("creating walker with rootModule=" + modulePath);
+ this.rootModule = modulePath;
+ }
+ Walker.prototype.relativeModule = function (rootPath, moduleName) {
+ return path.resolve(rootPath, 'node_modules', moduleName);
+ };
+ Walker.prototype.loadPackageJSON = function (modulePath) {
+ return __awaiter(this, void 0, void 0, function () {
+ var pJPath, pJ;
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ pJPath = path.resolve(modulePath, 'package.json');
+ return [4 /*yield*/, fs.pathExists(pJPath)];
+ case 1:
+ if (!_a.sent()) return [3 /*break*/, 3];
+ return [4 /*yield*/, fs.readJson(pJPath)];
+ case 2:
+ pJ = _a.sent();
+ if (!pJ.dependencies)
+ pJ.dependencies = {};
+ if (!pJ.devDependencies)
+ pJ.devDependencies = {};
+ if (!pJ.optionalDependencies)
+ pJ.optionalDependencies = {};
+ return [2 /*return*/, pJ];
+ case 3: return [2 /*return*/, null];
+ }
+ });
+ });
+ };
+ Walker.prototype.walkDependenciesForModuleInModule = function (moduleName, modulePath, depType) {
+ return __awaiter(this, void 0, void 0, function () {
+ var testPath, discoveredPath, lastRelative;
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ testPath = modulePath;
+ discoveredPath = null;
+ lastRelative = null;
+ _a.label = 1;
+ case 1:
+ if (!(!discoveredPath && this.relativeModule(testPath, moduleName) !== lastRelative)) return [3 /*break*/, 3];
+ lastRelative = this.relativeModule(testPath, moduleName);
+ return [4 /*yield*/, fs.pathExists(lastRelative)];
+ case 2:
+ if (_a.sent()) {
+ discoveredPath = lastRelative;
+ }
+ else {
+ if (path.basename(path.dirname(testPath)) !== 'node_modules') {
+ testPath = path.dirname(testPath);
+ }
+ testPath = path.dirname(path.dirname(testPath));
+ }
+ return [3 /*break*/, 1];
+ case 3:
+ // If we can't find it the install is probably buggered
+ if (!discoveredPath && depType !== depTypes_1.DepType.OPTIONAL && depType !== depTypes_1.DepType.DEV_OPTIONAL) {
+ throw new Error("Failed to locate module \"" + moduleName + "\" from \"" + modulePath + "\"\n\n This normally means that either you have deleted this package already somehow (check your ignore settings if using electron-packager). Or your module installation failed.");
+ }
+ if (!discoveredPath) return [3 /*break*/, 5];
+ return [4 /*yield*/, this.walkDependenciesForModule(discoveredPath, depType)];
+ case 4:
+ _a.sent();
+ _a.label = 5;
+ case 5: return [2 /*return*/];
+ }
+ });
+ });
+ };
+ Walker.prototype.detectNativeModuleType = function (modulePath, pJ) {
+ return __awaiter(this, void 0, void 0, function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ if (!pJ.dependencies['prebuild-install']) return [3 /*break*/, 1];
+ return [2 /*return*/, nativeModuleTypes_1.NativeModuleType.PREBUILD];
+ case 1: return [4 /*yield*/, fs.pathExists(path.join(modulePath, 'binding.gyp'))];
+ case 2:
+ if (_a.sent()) {
+ return [2 /*return*/, nativeModuleTypes_1.NativeModuleType.NODE_GYP];
+ }
+ _a.label = 3;
+ case 3: return [2 /*return*/, nativeModuleTypes_1.NativeModuleType.NONE];
+ }
+ });
+ });
+ };
+ Walker.prototype.walkDependenciesForModule = function (modulePath, depType) {
+ return __awaiter(this, void 0, void 0, function () {
+ var existingModule, pJ, _a, _b, _c, _d, _e, _i, moduleName, _f, _g, _h, moduleName, _j, _k, _l, moduleName;
+ return __generator(this, function (_m) {
+ switch (_m.label) {
+ case 0:
+ d('walk reached:', modulePath, ' Type is:', depTypes_1.DepType[depType]);
+ // We have already traversed this module
+ if (this.walkHistory.has(modulePath)) {
+ d('already walked this route');
+ existingModule = this.modules.find(function (module) { return module.path === modulePath; });
+ // If the depType we are traversing with now is higher than the
+ // last traversal then update it (prod superseeds dev for instance)
+ if (depTypes_1.depTypeGreater(depType, existingModule.depType)) {
+ d("existing module has a type of \"" + existingModule.depType + "\", new module type would be \"" + depType + "\" therefore updating");
+ existingModule.depType = depType;
+ }
+ return [2 /*return*/];
+ }
+ return [4 /*yield*/, this.loadPackageJSON(modulePath)];
+ case 1:
+ pJ = _m.sent();
+ // If the module doesn't have a package.json file it is probably a
+ // dead install from yarn (they dont clean up for some reason)
+ if (!pJ) {
+ d('walk hit a dead end, this module is incomplete');
+ return [2 /*return*/];
+ }
+ // Record this module as being traversed
+ this.walkHistory.add(modulePath);
+ _b = (_a = this.modules).push;
+ _c = {
+ depType: depType
+ };
+ return [4 /*yield*/, this.detectNativeModuleType(modulePath, pJ)];
+ case 2:
+ _b.apply(_a, [(_c.nativeModuleType = _m.sent(),
+ _c.path = modulePath,
+ _c.name = pJ.name,
+ _c)]);
+ _d = [];
+ for (_e in pJ.dependencies)
+ _d.push(_e);
+ _i = 0;
+ _m.label = 3;
+ case 3:
+ if (!(_i < _d.length)) return [3 /*break*/, 6];
+ moduleName = _d[_i];
+ // npm decides it's a funny thing to put optional dependencies in the "dependencies" section
+ // after install, because that makes perfect sense
+ if (moduleName in pJ.optionalDependencies) {
+ d("found " + moduleName + " in prod deps of " + modulePath + " but it is also marked optional");
+ return [3 /*break*/, 5];
+ }
+ return [4 /*yield*/, this.walkDependenciesForModuleInModule(moduleName, modulePath, depTypes_1.childDepType(depType, depTypes_1.DepType.PROD))];
+ case 4:
+ _m.sent();
+ _m.label = 5;
+ case 5:
+ _i++;
+ return [3 /*break*/, 3];
+ case 6:
+ _f = [];
+ for (_g in pJ.optionalDependencies)
+ _f.push(_g);
+ _h = 0;
+ _m.label = 7;
+ case 7:
+ if (!(_h < _f.length)) return [3 /*break*/, 10];
+ moduleName = _f[_h];
+ return [4 /*yield*/, this.walkDependenciesForModuleInModule(moduleName, modulePath, depTypes_1.childDepType(depType, depTypes_1.DepType.OPTIONAL))];
+ case 8:
+ _m.sent();
+ _m.label = 9;
+ case 9:
+ _h++;
+ return [3 /*break*/, 7];
+ case 10:
+ if (!(depType === depTypes_1.DepType.ROOT)) return [3 /*break*/, 14];
+ d('we\'re still at the beginning, walking down the dev route');
+ _j = [];
+ for (_k in pJ.devDependencies)
+ _j.push(_k);
+ _l = 0;
+ _m.label = 11;
+ case 11:
+ if (!(_l < _j.length)) return [3 /*break*/, 14];
+ moduleName = _j[_l];
+ return [4 /*yield*/, this.walkDependenciesForModuleInModule(moduleName, modulePath, depTypes_1.childDepType(depType, depTypes_1.DepType.DEV))];
+ case 12:
+ _m.sent();
+ _m.label = 13;
+ case 13:
+ _l++;
+ return [3 /*break*/, 11];
+ case 14: return [2 /*return*/];
+ }
+ });
+ });
+ };
+ Walker.prototype.walkTree = function () {
+ return __awaiter(this, void 0, void 0, function () {
+ var _this = this;
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ d('starting tree walk');
+ if (!this.cache) {
+ this.cache = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
+ var err_1;
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0:
+ this.modules = [];
+ _a.label = 1;
+ case 1:
+ _a.trys.push([1, 3, , 4]);
+ return [4 /*yield*/, this.walkDependenciesForModule(this.rootModule, depTypes_1.DepType.ROOT)];
+ case 2:
+ _a.sent();
+ return [3 /*break*/, 4];
+ case 3:
+ err_1 = _a.sent();
+ reject(err_1);
+ return [2 /*return*/];
+ case 4:
+ resolve(this.modules);
+ return [2 /*return*/];
+ }
+ });
+ }); });
+ }
+ else {
+ d('tree walk in progress / completed already, waiting for existing walk to complete');
+ }
+ return [4 /*yield*/, this.cache];
+ case 1: return [2 /*return*/, _a.sent()];
+ }
+ });
+ });
+ };
+ Walker.prototype.getRootModule = function () {
+ return this.rootModule;
+ };
+ return Walker;
+}());
+exports.Walker = Walker;
+//# sourceMappingURL=Walker.js.map \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/Walker.js.map b/node_modules/flora-colossus/lib/Walker.js.map
new file mode 100644
index 0000000..7d69070
--- /dev/null
+++ b/node_modules/flora-colossus/lib/Walker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Walker.js","sourceRoot":"","sources":["../src/Walker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,6BAA+B;AAC/B,2BAA6B;AAE7B,uCAAmE;AACnE,yDAAuD;AAgBvD,IAAM,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAElC;IAKE,gBAAY,UAAkB;QAFtB,gBAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;QAuIrC,UAAK,GAA6B,IAAI,CAAC;QApI7C,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;YACjD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC5D;QACD,CAAC,CAAC,qCAAmC,UAAY,CAAC,CAAC;QACnD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEO,+BAAc,GAAtB,UAAuB,QAAgB,EAAE,UAAkB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IAEa,gCAAe,GAA7B,UAA8B,UAAkB;;;;;;wBACxC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;wBACpD,qBAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAA;;6BAA3B,SAA2B,EAA3B,wBAA2B;wBAClB,qBAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAA;;wBAA9B,EAAE,GAAG,SAAyB;wBACpC,IAAI,CAAC,EAAE,CAAC,YAAY;4BAAE,EAAE,CAAC,YAAY,GAAG,EAAE,CAAC;wBAC3C,IAAI,CAAC,EAAE,CAAC,eAAe;4BAAE,EAAE,CAAC,eAAe,GAAG,EAAE,CAAC;wBACjD,IAAI,CAAC,EAAE,CAAC,oBAAoB;4BAAE,EAAE,CAAC,oBAAoB,GAAG,EAAE,CAAC;wBAC3D,sBAAO,EAAE,EAAC;4BAEZ,sBAAO,IAAI,EAAC;;;;KACb;IAEa,kDAAiC,GAA/C,UAAgD,UAAkB,EAAE,UAAkB,EAAE,OAAgB;;;;;;wBAClG,QAAQ,GAAG,UAAU,CAAC;wBACtB,cAAc,GAAkB,IAAI,CAAC;wBACrC,YAAY,GAAkB,IAAI,CAAC;;;6BAEhC,CAAA,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,YAAY,CAAA;wBAClF,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;wBACrD,qBAAM,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAA;;wBAArC,IAAI,SAAiC,EAAE;4BACrC,cAAc,GAAG,YAAY,CAAC;yBAC/B;6BAAM;4BACL,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,cAAc,EAAE;gCAC5D,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;6BACnC;4BACD,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;yBACjD;;;wBAEH,uDAAuD;wBACvD,IAAI,CAAC,cAAc,IAAI,OAAO,KAAK,kBAAO,CAAC,QAAQ,IAAI,OAAO,KAAK,kBAAO,CAAC,YAAY,EAAE;4BACvF,MAAM,IAAI,KAAK,CACb,+BAA4B,UAAU,kBAAW,UAAU,8LAEiH,CAC7K,CAAC;yBACH;6BAEG,cAAc,EAAd,wBAAc;wBAChB,qBAAM,IAAI,CAAC,yBAAyB,CAAC,cAAc,EAAE,OAAO,CAAC,EAAA;;wBAA7D,SAA6D,CAAC;;;;;;KAEjE;IAEa,uCAAsB,GAApC,UAAqC,UAAkB,EAAE,EAAe;;;;;6BAClE,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,EAAnC,wBAAmC;wBACrC,sBAAO,oCAAgB,CAAC,QAAQ,EAAA;4BACvB,qBAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,EAAA;;wBAA7D,IAAI,SAAyD,EAAE;4BACpE,sBAAO,oCAAgB,CAAC,QAAQ,EAAA;yBACjC;;4BACD,sBAAO,oCAAgB,CAAC,IAAI,EAAA;;;;KAC7B;IAEa,0CAAyB,GAAvC,UAAwC,UAAkB,EAAE,OAAgB;;;;;;wBAC1E,CAAC,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAO,CAAC,OAAO,CAAC,CAAC,CAAC;wBAC9D,wCAAwC;wBACxC,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;4BACpC,CAAC,CAAC,2BAA2B,CAAC,CAAC;4BAEzB,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAA,MAAM,IAAK,OAAA,MAAM,CAAC,IAAI,KAAK,UAAU,EAA1B,CAA0B,CAAW,CAAC;4BAC1F,+DAA+D;4BAC/D,mEAAmE;4BACnE,IAAI,yBAAc,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE;gCACnD,CAAC,CAAC,qCAAkC,cAAc,CAAC,OAAO,uCAAgC,OAAO,0BAAsB,CAAC,CAAC;gCACzH,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;6BAClC;4BACD,sBAAO;yBACR;wBAEU,qBAAM,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,EAAA;;wBAA3C,EAAE,GAAG,SAAsC;wBACjD,kEAAkE;wBAClE,8DAA8D;wBAC9D,IAAI,CAAC,EAAE,EAAE;4BACP,CAAC,CAAC,gDAAgD,CAAC,CAAC;4BACpD,sBAAO;yBACR;wBAED,wCAAwC;wBACxC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;wBACjC,KAAA,CAAA,KAAA,IAAI,CAAC,OAAO,CAAA,CAAC,IAAI,CAAA;;4BACf,OAAO,SAAA;;wBACW,qBAAM,IAAI,CAAC,sBAAsB,CAAC,UAAU,EAAE,EAAE,CAAC,EAAA;;wBAFrE,eAEE,mBAAgB,GAAE,SAAiD;gCACnE,OAAI,GAAE,UAAU;gCAChB,OAAI,GAAE,EAAE,CAAC,IAAI;qCACb,CAAC;;mCAGsB,EAAE,CAAC,YAAY;;;;;;;wBACtC,4FAA4F;wBAC5F,kDAAkD;wBAClD,IAAI,UAAU,IAAI,EAAE,CAAC,oBAAoB,EAAE;4BACzC,CAAC,CAAC,WAAS,UAAU,yBAAoB,UAAU,oCAAiC,CAAC,CAAC;4BACtF,wBAAS;yBACV;wBACD,qBAAM,IAAI,CAAC,iCAAiC,CAC1C,UAAU,EACV,UAAU,EACV,uBAAY,CAAC,OAAO,EAAE,kBAAO,CAAC,IAAI,CAAC,CACpC,EAAA;;wBAJD,SAIC,CAAC;;;;;;;mCAIqB,EAAE,CAAC,oBAAoB;;;;;;;wBAC9C,qBAAM,IAAI,CAAC,iCAAiC,CAC1C,UAAU,EACV,UAAU,EACV,uBAAY,CAAC,OAAO,EAAE,kBAAO,CAAC,QAAQ,CAAC,CACxC,EAAA;;wBAJD,SAIC,CAAC;;;;;;6BAIA,CAAA,OAAO,KAAK,kBAAO,CAAC,IAAI,CAAA,EAAxB,yBAAwB;wBAC1B,CAAC,CAAC,2DAA2D,CAAC,CAAC;;mCACtC,EAAE,CAAC,eAAe;;;;;;;wBACzC,qBAAM,IAAI,CAAC,iCAAiC,CAC1C,UAAU,EACV,UAAU,EACV,uBAAY,CAAC,OAAO,EAAE,kBAAO,CAAC,GAAG,CAAC,CACnC,EAAA;;wBAJD,SAIC,CAAC;;;;;;;;;KAGP;IAGK,yBAAQ,GAAd;;;;;;wBACE,CAAC,CAAC,oBAAoB,CAAC,CAAC;wBACxB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;4BACf,IAAI,CAAC,KAAK,GAAG,IAAI,OAAO,CAAW,UAAO,OAAO,EAAE,MAAM;;;;;4CACvD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;;;;4CAEhB,qBAAM,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAO,CAAC,IAAI,CAAC,EAAA;;4CAAnE,SAAmE,CAAC;;;;4CAEpE,MAAM,CAAC,KAAG,CAAC,CAAC;4CACZ,sBAAO;;4CAET,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;;;;iCACvB,CAAC,CAAC;yBACJ;6BAAM;4BACL,CAAC,CAAC,kFAAkF,CAAC,CAAC;yBACvF;wBACM,qBAAM,IAAI,CAAC,KAAK,EAAA;4BAAvB,sBAAO,SAAgB,EAAC;;;;KACzB;IAEM,8BAAa,GAApB;QACE,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACH,aAAC;AAAD,CAAC,AAjKD,IAiKC;AAjKY,wBAAM"} \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/depTypes.d.ts b/node_modules/flora-colossus/lib/depTypes.d.ts
new file mode 100644
index 0000000..43cec60
--- /dev/null
+++ b/node_modules/flora-colossus/lib/depTypes.d.ts
@@ -0,0 +1,9 @@
+export declare enum DepType {
+ PROD = 0,
+ DEV = 1,
+ OPTIONAL = 2,
+ DEV_OPTIONAL = 3,
+ ROOT = 4
+}
+export declare const depTypeGreater: (newType: DepType, existing: DepType) => boolean;
+export declare const childDepType: (parentType: DepType, childType: DepType) => DepType.PROD | DepType.PROD | DepType.DEV | DepType.DEV | DepType.OPTIONAL | DepType.OPTIONAL | DepType.DEV_OPTIONAL | DepType.DEV_OPTIONAL;
diff --git a/node_modules/flora-colossus/lib/depTypes.js b/node_modules/flora-colossus/lib/depTypes.js
new file mode 100644
index 0000000..8138b5b
--- /dev/null
+++ b/node_modules/flora-colossus/lib/depTypes.js
@@ -0,0 +1,92 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var DepType;
+(function (DepType) {
+ DepType[DepType["PROD"] = 0] = "PROD";
+ DepType[DepType["DEV"] = 1] = "DEV";
+ DepType[DepType["OPTIONAL"] = 2] = "OPTIONAL";
+ DepType[DepType["DEV_OPTIONAL"] = 3] = "DEV_OPTIONAL";
+ DepType[DepType["ROOT"] = 4] = "ROOT";
+})(DepType = exports.DepType || (exports.DepType = {}));
+exports.depTypeGreater = function (newType, existing) {
+ switch (existing) {
+ case DepType.DEV:
+ switch (newType) {
+ case DepType.OPTIONAL:
+ case DepType.PROD:
+ case DepType.ROOT:
+ return true;
+ case DepType.DEV:
+ case DepType.DEV_OPTIONAL:
+ default:
+ return false;
+ }
+ case DepType.DEV_OPTIONAL:
+ switch (newType) {
+ case DepType.OPTIONAL:
+ case DepType.PROD:
+ case DepType.ROOT:
+ case DepType.DEV:
+ return true;
+ case DepType.DEV_OPTIONAL:
+ default:
+ return false;
+ }
+ case DepType.OPTIONAL:
+ switch (newType) {
+ case DepType.PROD:
+ case DepType.ROOT:
+ return true;
+ case DepType.OPTIONAL:
+ case DepType.DEV:
+ case DepType.DEV_OPTIONAL:
+ default:
+ return false;
+ }
+ case DepType.PROD:
+ switch (newType) {
+ case DepType.ROOT:
+ return true;
+ case DepType.PROD:
+ case DepType.OPTIONAL:
+ case DepType.DEV:
+ case DepType.DEV_OPTIONAL:
+ default:
+ return false;
+ }
+ case DepType.ROOT:
+ switch (newType) {
+ case DepType.ROOT:
+ case DepType.PROD:
+ case DepType.OPTIONAL:
+ case DepType.DEV:
+ case DepType.DEV_OPTIONAL:
+ default:
+ return false;
+ }
+ default:
+ return false;
+ }
+};
+exports.childDepType = function (parentType, childType) {
+ if (childType === DepType.ROOT) {
+ throw new Error('Something went wrong, a child dependency can\'t be marked as the ROOT');
+ }
+ switch (parentType) {
+ case DepType.ROOT:
+ return childType;
+ case DepType.PROD:
+ if (childType === DepType.OPTIONAL)
+ return DepType.OPTIONAL;
+ return DepType.PROD;
+ case DepType.OPTIONAL:
+ return DepType.OPTIONAL;
+ case DepType.DEV_OPTIONAL:
+ return DepType.DEV_OPTIONAL;
+ case DepType.DEV:
+ if (childType === DepType.OPTIONAL)
+ return DepType.DEV_OPTIONAL;
+ return DepType.DEV;
+ }
+};
+//# sourceMappingURL=depTypes.js.map \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/depTypes.js.map b/node_modules/flora-colossus/lib/depTypes.js.map
new file mode 100644
index 0000000..a367398
--- /dev/null
+++ b/node_modules/flora-colossus/lib/depTypes.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"depTypes.js","sourceRoot":"","sources":["../src/depTypes.ts"],"names":[],"mappings":";;AAAA,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,qCAAI,CAAA;IACJ,mCAAG,CAAA;IACH,6CAAQ,CAAA;IACR,qDAAY,CAAA;IACZ,qCAAI,CAAA;AACN,CAAC,EANW,OAAO,GAAP,eAAO,KAAP,eAAO,QAMlB;AAEY,QAAA,cAAc,GAAG,UAAC,OAAgB,EAAE,QAAiB;IAChE,QAAQ,QAAQ,EAAE;QAChB,KAAK,OAAO,CAAC,GAAG;YACd,QAAQ,OAAO,EAAE;gBACf,KAAK,OAAO,CAAC,QAAQ,CAAC;gBACtB,KAAK,OAAO,CAAC,IAAI,CAAC;gBAClB,KAAK,OAAO,CAAC,IAAI;oBACf,OAAO,IAAI,CAAC;gBACd,KAAK,OAAO,CAAC,GAAG,CAAC;gBACjB,KAAK,OAAO,CAAC,YAAY,CAAC;gBAC1B;oBACE,OAAO,KAAK,CAAC;aAChB;QACH,KAAK,OAAO,CAAC,YAAY;YACvB,QAAQ,OAAO,EAAE;gBACf,KAAK,OAAO,CAAC,QAAQ,CAAC;gBACtB,KAAK,OAAO,CAAC,IAAI,CAAC;gBAClB,KAAK,OAAO,CAAC,IAAI,CAAC;gBAClB,KAAK,OAAO,CAAC,GAAG;oBACd,OAAO,IAAI,CAAC;gBACd,KAAK,OAAO,CAAC,YAAY,CAAC;gBAC1B;oBACE,OAAO,KAAK,CAAC;aAChB;QACH,KAAK,OAAO,CAAC,QAAQ;YACnB,QAAQ,OAAO,EAAE;gBACf,KAAK,OAAO,CAAC,IAAI,CAAC;gBAClB,KAAK,OAAO,CAAC,IAAI;oBACf,OAAO,IAAI,CAAC;gBACd,KAAK,OAAO,CAAC,QAAQ,CAAC;gBACtB,KAAK,OAAO,CAAC,GAAG,CAAC;gBACjB,KAAK,OAAO,CAAC,YAAY,CAAC;gBAC1B;oBACE,OAAO,KAAK,CAAC;aAChB;QACH,KAAK,OAAO,CAAC,IAAI;YACf,QAAQ,OAAO,EAAE;gBACf,KAAK,OAAO,CAAC,IAAI;oBACf,OAAO,IAAI,CAAC;gBACd,KAAK,OAAO,CAAC,IAAI,CAAC;gBAClB,KAAK,OAAO,CAAC,QAAQ,CAAC;gBACtB,KAAK,OAAO,CAAC,GAAG,CAAC;gBACjB,KAAK,OAAO,CAAC,YAAY,CAAC;gBAC1B;oBACE,OAAO,KAAK,CAAC;aAChB;QACH,KAAK,OAAO,CAAC,IAAI;YACf,QAAQ,OAAO,EAAE;gBACf,KAAK,OAAO,CAAC,IAAI,CAAC;gBAClB,KAAK,OAAO,CAAC,IAAI,CAAC;gBAClB,KAAK,OAAO,CAAC,QAAQ,CAAC;gBACtB,KAAK,OAAO,CAAC,GAAG,CAAC;gBACjB,KAAK,OAAO,CAAC,YAAY,CAAC;gBAC1B;oBACE,OAAO,KAAK,CAAC;aAChB;QACH;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAA;AAEY,QAAA,YAAY,GAAG,UAAC,UAAmB,EAAE,SAAkB;IAClE,IAAI,SAAS,KAAK,OAAO,CAAC,IAAI,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;KAC1F;IACD,QAAQ,UAAU,EAAE;QAClB,KAAK,OAAO,CAAC,IAAI;YACf,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO,CAAC,IAAI;YACf,IAAI,SAAS,KAAK,OAAO,CAAC,QAAQ;gBAAE,OAAO,OAAO,CAAC,QAAQ,CAAC;YAC5D,OAAO,OAAO,CAAC,IAAI,CAAC;QACtB,KAAK,OAAO,CAAC,QAAQ;YACnB,OAAO,OAAO,CAAC,QAAQ,CAAC;QAC1B,KAAK,OAAO,CAAC,YAAY;YACvB,OAAO,OAAO,CAAC,YAAY,CAAC;QAC9B,KAAK,OAAO,CAAC,GAAG;YACd,IAAI,SAAS,KAAK,OAAO,CAAC,QAAQ;gBAAE,OAAO,OAAO,CAAC,YAAY,CAAC;YAChE,OAAO,OAAO,CAAC,GAAG,CAAC;KACtB;AACH,CAAC,CAAA"} \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/index.d.ts b/node_modules/flora-colossus/lib/index.d.ts
new file mode 100644
index 0000000..5e3eee2
--- /dev/null
+++ b/node_modules/flora-colossus/lib/index.d.ts
@@ -0,0 +1,2 @@
+export * from './Walker';
+export * from './depTypes';
diff --git a/node_modules/flora-colossus/lib/index.js b/node_modules/flora-colossus/lib/index.js
new file mode 100644
index 0000000..efa196a
--- /dev/null
+++ b/node_modules/flora-colossus/lib/index.js
@@ -0,0 +1,8 @@
+"use strict";
+function __export(m) {
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(require("./Walker"));
+__export(require("./depTypes"));
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/index.js.map b/node_modules/flora-colossus/lib/index.js.map
new file mode 100644
index 0000000..67e73c7
--- /dev/null
+++ b/node_modules/flora-colossus/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,8BAAyB;AACzB,gCAA2B"} \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/nativeModuleTypes.d.ts b/node_modules/flora-colossus/lib/nativeModuleTypes.d.ts
new file mode 100644
index 0000000..febfd58
--- /dev/null
+++ b/node_modules/flora-colossus/lib/nativeModuleTypes.d.ts
@@ -0,0 +1,5 @@
+export declare enum NativeModuleType {
+ NONE = 0,
+ NODE_GYP = 1,
+ PREBUILD = 2
+}
diff --git a/node_modules/flora-colossus/lib/nativeModuleTypes.js b/node_modules/flora-colossus/lib/nativeModuleTypes.js
new file mode 100644
index 0000000..58361ad
--- /dev/null
+++ b/node_modules/flora-colossus/lib/nativeModuleTypes.js
@@ -0,0 +1,9 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var NativeModuleType;
+(function (NativeModuleType) {
+ NativeModuleType[NativeModuleType["NONE"] = 0] = "NONE";
+ NativeModuleType[NativeModuleType["NODE_GYP"] = 1] = "NODE_GYP";
+ NativeModuleType[NativeModuleType["PREBUILD"] = 2] = "PREBUILD";
+})(NativeModuleType = exports.NativeModuleType || (exports.NativeModuleType = {}));
+//# sourceMappingURL=nativeModuleTypes.js.map \ No newline at end of file
diff --git a/node_modules/flora-colossus/lib/nativeModuleTypes.js.map b/node_modules/flora-colossus/lib/nativeModuleTypes.js.map
new file mode 100644
index 0000000..b2818bf
--- /dev/null
+++ b/node_modules/flora-colossus/lib/nativeModuleTypes.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"nativeModuleTypes.js","sourceRoot":"","sources":["../src/nativeModuleTypes.ts"],"names":[],"mappings":";;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uDAAI,CAAA;IACJ,+DAAQ,CAAA;IACR,+DAAQ,CAAA;AACV,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B"} \ No newline at end of file
diff --git a/node_modules/flora-colossus/node_modules/debug/LICENSE b/node_modules/flora-colossus/node_modules/debug/LICENSE
new file mode 100644
index 0000000..1a9820e
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+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/flora-colossus/node_modules/debug/README.md b/node_modules/flora-colossus/node_modules/debug/README.md
new file mode 100644
index 0000000..e9c3e04
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/debug/README.md
@@ -0,0 +1,481 @@
+# debug
+[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
+
+<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2018-2021 Josh Junon
+
+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/flora-colossus/node_modules/debug/package.json b/node_modules/flora-colossus/node_modules/debug/package.json
new file mode 100644
index 0000000..3bcdc24
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/debug/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "debug",
+ "version": "4.3.4",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "Josh Junon <josh.junon@protonmail.com>",
+ "contributors": [
+ "TJ Holowaychuk <tj@vision-media.ca>",
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ }
+}
diff --git a/node_modules/flora-colossus/node_modules/debug/src/browser.js b/node_modules/flora-colossus/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..cd0fc35
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/node_modules/flora-colossus/node_modules/debug/src/common.js b/node_modules/flora-colossus/node_modules/debug/src/common.js
new file mode 100644
index 0000000..e3291b2
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/node_modules/flora-colossus/node_modules/debug/src/index.js b/node_modules/flora-colossus/node_modules/debug/src/index.js
new file mode 100644
index 0000000..bf4c57f
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/flora-colossus/node_modules/debug/src/node.js b/node_modules/flora-colossus/node_modules/debug/src/node.js
new file mode 100644
index 0000000..79bc085
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/CHANGELOG.md b/node_modules/flora-colossus/node_modules/fs-extra/CHANGELOG.md
new file mode 100644
index 0000000..7c78713
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/CHANGELOG.md
@@ -0,0 +1,842 @@
+7.0.1 / 2018-11-07
+------------------
+
+- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
+- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
+- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))
+
+7.0.0 / 2018-07-16
+------------------
+
+- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
+- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
+- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
+- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))
+
+6.0.1 / 2018-05-09
+------------------
+
+- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))
+
+6.0.0 / 2018-05-01
+------------------
+
+- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
+- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
+- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
+- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
+- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
+- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))
+
+5.0.0 / 2017-12-11
+------------------
+
+Significant refactor of `copy()` & `copySync()`, including breaking changes. No changes to other functions in this release.
+
+Huge thanks to **[@manidlou](https://github.com/manidlou)** for doing most of the work on this release.
+
+- The `filter` option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. [#512](https://github.com/jprichardson/node-fs-extra/pull/512)
+- `copy()`'s `filter` option can now be a function that returns a Promise. [#518](https://github.com/jprichardson/node-fs-extra/pull/518)
+- `copy()` & `copySync()` now use `fs.copyFile()`/`fs.copyFileSync()` in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. [#505](https://github.com/jprichardson/node-fs-extra/pull/505)
+- Don't allow copying a directory into itself. [#83](https://github.com/jprichardson/node-fs-extra/issues/83)
+- Handle copying between identical files. [#198](https://github.com/jprichardson/node-fs-extra/issues/198)
+- Error out when copying an empty folder to a path that already exists. [#464](https://github.com/jprichardson/node-fs-extra/issues/464)
+- Don't create `dest`'s parent if the `filter` function aborts the `copy()` operation. [#517](https://github.com/jprichardson/node-fs-extra/pull/517)
+- Fix `writeStream` not being closed if there was an error in `copy()`. [#516](https://github.com/jprichardson/node-fs-extra/pull/516)
+
+4.0.3 / 2017-12-05
+------------------
+
+- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501)
+- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520)
+
+4.0.2 / 2017-09-12
+------------------
+
+- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4)
+- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+
+- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485)
+
+4.0.1 / 2017-07-31
+------------------
+
+### Fixed
+
+- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470)
+
+4.0.0 / 2017-07-14
+------------------
+
+### Changed
+
+- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449)
+- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458)
+- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459)
+
+### Fixed
+
+- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428)
+
+Also clarified the docs in a few places.
+
+3.0.1 / 2017-05-04
+------------------
+
+- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415)
+
+3.0.0 / 2017-04-27
+------------------
+
+### Added
+
+- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403)
+- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406)
+
+### Removed
+
+- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+
+### Changed
+
+- Upgraded jsonfile dependency to v3.0.0:
+ - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`.
+- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394)
+
+### Fixed
+
+- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408)
+
+2.1.2 / 2017-03-16
+------------------
+
+### Fixed
+
+- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393)
+
+2.1.1 / 2017-03-15
+------------------
+
+### Fixed
+
+- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`.
+- Remove `Buffer.alloc()` usage in `moveSync()`.
+
+2.1.0 / 2017-03-15
+------------------
+
+Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release!
+
+### Added
+- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou))
+- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou))
+
+### Changed
+- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou))
+- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264)
+- Refactored docs. ([@manidlou](https://github.com/manidlou))
+
+### Fixed
+
+- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton))
+
+2.0.0 / 2017-01-16
+------------------
+
+### Removed
+- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it
+on Jan 1st, 2017.
+- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little
+over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just
+an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339]
+
+### Changed
+- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333]
+- Moved docs, to `docs/`. [#340]
+
+### Fixed
+- Apply filters to directories in `copySync()` like in `copy()`. [#324]
+- A specific condition when disk is under heavy use, `copy()` can fail. [#326]
+
+
+1.0.0 / 2016-11-01
+------------------
+
+After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes
+to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release!
+
+### Added
+- `walkSync()`
+
+### Changed
+- **BREAKING**: dropped Node v0.10 support.
+- disabled `rimaf` globbing, wasn't used. [#280]
+- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function.
+- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300]
+
+### Fixed
+- bug fix proper closing of file handle on `utimesMillis()` [#271]
+- proper escaping of files with dollar signs [#291]
+- `copySync()` failed if user didn't own file. [#199], [#301]
+
+
+0.30.0 / 2016-04-28
+-------------------
+- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**.
+
+0.29.0 / 2016-04-27
+-------------------
+- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well.
+
+0.28.0 / 2016-04-17
+-------------------
+- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]
+- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237]
+- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93]
+
+0.27.0 / 2016-04-15
+-------------------
+- add `dereference` option to `copySync()`. [#235][#235]
+
+0.26.7 / 2016-03-16
+-------------------
+- fixed `copy()` if source and dest are the same. [#230][#230]
+
+0.26.6 / 2016-03-15
+-------------------
+- fixed if `emptyDir()` does not have a callback: [#229][#229]
+
+0.26.5 / 2016-01-27
+-------------------
+- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215]
+
+0.26.4 / 2016-01-05
+-------------------
+- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208]
+
+0.26.3 / 2015-12-17
+-------------------
+- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193]
+
+0.26.2 / 2015-11-02
+-------------------
+- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces`
+
+0.26.1 / 2015-11-02
+-------------------
+- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190]
+
+0.26.0 / 2015-10-25
+-------------------
+- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw).
+
+0.25.0 / 2015-10-24
+-------------------
+- now has a file walker `walk()`
+
+0.24.0 / 2015-08-28
+-------------------
+- removed alias `delete()` and `deleteSync()`. See: [#171][#171]
+
+0.23.1 / 2015-08-07
+-------------------
+- Better handling of errors for `move()` when moving across devices. [#170][#170]
+- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169]
+
+0.23.0 / 2015-08-06
+-------------------
+- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165]
+
+0.22.1 / 2015-07-09
+-------------------
+- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149].
+Fixes regression that was introduced in `0.21.0`.
+
+0.22.0 / 2015-07-09
+-------------------
+- preserve permissions / ownership in `copy()`. See: [#54][#54]
+
+0.21.0 / 2015-07-04
+-------------------
+- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141]
+- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks)
+
+0.20.1 / 2015-06-23
+-------------------
+- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
+
+0.20.0 / 2015-06-19
+-------------------
+- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g.
+this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`.
+- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code.
+- started moving tests inline
+- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()`
+
+0.19.0 / 2015-06-08
+-------------------
+- `fs.copy()` had support for Node v0.8, dropped support
+
+0.18.4 / 2015-05-22
+-------------------
+- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0
+
+0.18.3 / 2015-05-08
+-------------------
+- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134]
+
+0.18.2 / 2015-04-17
+-------------------
+- bugfix: allow `F_OK` ([#120][#120])
+
+0.18.1 / 2015-04-15
+-------------------
+- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b
+- fixed a lot of tests for Windows (appveyor)
+
+0.18.0 / 2015-03-31
+-------------------
+- added `emptyDir()` and `emptyDirSync()`
+
+0.17.0 / 2015-03-28
+-------------------
+- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists).
+**Only works with files at the moment.**
+- `createOutputStream()` added. See: [#118][#118]
+
+0.16.5 / 2015-03-08
+-------------------
+- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114]
+
+0.16.4 / 2015-03-01
+-------------------
+- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66
+
+0.16.3 / 2015-01-28
+-------------------
+- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9
+
+
+0.16.2 / 2015-01-28
+-------------------
+- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future)
+
+0.16.1 / 2015-01-28
+-------------------
+- if `setImmediate` is not available, fall back to `process.nextTick`
+
+0.16.0 / 2015-01-28
+-------------------
+- bugfix `fs.move()` into itself. Closes [#104]
+- bugfix `fs.move()` moving directory across device. Closes [#108]
+- added coveralls support
+- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98]
+- misc fs.copy code cleanups
+
+0.15.0 / 2015-01-21
+-------------------
+- dropped `ncp`, imported code in
+- because of previous, now supports `io.js`
+- `graceful-fs` is now a dependency
+
+0.14.0 / 2015-01-05
+-------------------
+- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100]
+- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests)
+
+0.13.0 / 2014-12-10
+-------------------
+- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch)
+- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"`
+- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59])
+
+0.12.0 / 2014-09-22
+-------------------
+- copy symlinks in `copySync()` [#85][#85]
+
+0.11.1 / 2014-09-02
+-------------------
+- bugfix `copySync()` preserve file permissions [#80][#80]
+
+0.11.0 / 2014-08-11
+-------------------
+- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"`
+- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()`
+see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details.
+
+0.10.0 / 2014-06-29
+------------------
+* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change
+from `~` to `^`. [#67]
+
+0.9.1 / 2014-05-22
+------------------
+* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there
+
+0.9.0 / 2014-05-22
+------------------
+* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58]
+* upgraded `rimraf` from `~2.2.6` to `^2.2.8`
+* upgraded `mkdirp` from `0.3.x` to `^0.5.0`
+* added methods `ensureFile()`, `ensureFileSync()`
+* added methods `ensureDir()`, `ensureDirSync()` [#31]
+* added `move()` method. From: https://github.com/andrewrk/node-mv
+
+
+0.8.1 / 2013-10-24
+------------------
+* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39])
+
+0.8.0 / 2013-10-14
+------------------
+* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36])
+
+0.7.1 / 2013-10-12
+------------------
+* `copySync()` implemented (Srirangan / [#33])
+* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32]
+
+0.7.0 / 2013-10-07
+------------------
+* update readme conventions
+* `copy()` now works if destination directory does not exist. Closes [#29]
+
+0.6.4 / 2013-09-05
+------------------
+* changed `homepage` field in package.json to remove NPM warning
+
+0.6.3 / 2013-06-28
+------------------
+* changed JSON spacing default from `4` to `2` to follow Node conventions
+* updated `jsonfile` dep
+* updated `rimraf` dep
+
+0.6.2 / 2013-06-28
+------------------
+* added .npmignore, [#25]
+
+0.6.1 / 2013-05-14
+------------------
+* modified for `strict` mode, closes [#24]
+* added `outputJson()/outputJsonSync()`, closes [#23]
+
+0.6.0 / 2013-03-18
+------------------
+* removed node 0.6 support
+* added node 0.10 support
+* upgraded to latest `ncp` and `rimraf`.
+* optional `graceful-fs` support. Closes [#17]
+
+
+0.5.0 / 2013-02-03
+------------------
+* Removed `readTextFile`.
+* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write.
+* Restructured documentation a bit. Added roadmap.
+
+0.4.0 / 2013-01-28
+------------------
+* Set default spaces in `jsonfile` from 4 to 2.
+* Updated `testutil` deps for tests.
+* Renamed `touch()` to `createFile()`
+* Added `outputFile()` and `outputFileSync()`
+* Changed creation of testing diretories so the /tmp dir is not littered.
+* Added `readTextFile()` and `readTextFileSync()`.
+
+0.3.2 / 2012-11-01
+------------------
+* Added `touch()` and `touchSync()` methods.
+
+0.3.1 / 2012-10-11
+------------------
+* Fixed some stray globals.
+
+0.3.0 / 2012-10-09
+------------------
+* Removed all CoffeeScript from tests.
+* Renamed `mkdir` to `mkdirs`/`mkdirp`.
+
+0.2.1 / 2012-09-11
+------------------
+* Updated `rimraf` dep.
+
+0.2.0 / 2012-09-10
+------------------
+* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript)
+* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile)
+* Added Travis-CI.
+
+0.1.3 / 2012-08-13
+------------------
+* Added method `readJSONFile`.
+
+0.1.2 / 2012-06-15
+------------------
+* Bug fix: `deleteSync()` didn't exist.
+* Verified Node v0.8 compatibility.
+
+0.1.1 / 2012-06-15
+------------------
+* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed.
+
+0.1.0 / 2012-05-31
+------------------
+* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too.
+* Renamed `rmrf()` to `remove()`.
+* `remove()` aliased with `delete()`.
+* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`.
+* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead.
+
+0.0.4 / 2012-03-14
+------------------
+* Removed CoffeeScript dependency
+
+0.0.3 / 2012-01-11
+------------------
+* Added methods rmrf and rmrfSync
+* Moved tests from Jasmine to Mocha
+
+
+[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year"
+[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme"
+[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move"
+[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]"
+[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]"
+[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]"
+[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]"
+[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value"
+[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]"
+[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]"
+[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]"
+[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]"
+[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support"
+[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]"
+[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]"
+[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]"
+[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]"
+[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]"
+[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]"
+[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]"
+[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]"
+[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?"
+[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative"
+[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]"
+[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink "
+[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists"
+[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]"
+[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms"
+[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]"
+[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug."
+[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]"
+[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters."
+[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]"
+[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]"
+[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]"
+[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]"
+[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link"
+[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage"
+[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error"
+[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls"
+[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]"
+[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]"
+[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated"
+[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]"
+[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]"
+[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]"
+[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]"
+[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node"
+[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]"
+[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]"
+[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]"
+[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs"
+[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]"
+[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying"
+[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]"
+[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]"
+[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function"
+[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390"
+[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not"
+[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()"
+[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()"
+[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?"
+[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing"
+[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]"
+[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership"
+[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options"
+[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]"
+[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API"
+[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]"
+[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`"
+[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]"
+[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error"
+[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]"
+[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]"
+[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111"
+[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!"
+[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra"
+[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?"
+[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]"
+[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]"
+[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()"
+[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined"
+[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require"
+[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty"
+[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp"
+[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails"
+[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme "
+[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version"
+[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method"
+[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists"
+[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission"
+[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you"
+[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)"
+[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers"
+[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy"
+[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package"
+[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file"
+[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]"
+[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories"
+[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?"
+[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]"
+[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream"
+[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request"
+[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]"
+[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread."
+[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..."
+[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo"
+[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)"
+[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci"
+[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]"
+[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. "
+[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML"
+[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test"
+[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir"
+[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out"
+[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]"
+[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory"
+[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink"
+[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error"
+[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync"
+[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function"
+[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md"
+[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods."
+[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example"
+[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug"
+[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug"
+[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug"
+[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]"
+[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag"
+[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo"
+[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE"
+[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files"
+[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]"
+[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]"
+[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]"
+[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions"
+[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync"
+[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]"
+[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files"
+[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]"
+[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?"
+[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]"
+[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync"
+[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]"
+[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]"
+[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]"
+[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]"
+[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?"
+[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file"
+[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]"
+[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()"
+[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]"
+[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true"
+[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows"
+[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform"
+[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]"
+[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]"
+[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x"
+[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra"
+[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]"
+[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified"
+[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]"
+[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]"
+[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir"
+[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync "
+[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]"
+[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event"
+[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]"
+[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter"
+[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs"
+[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`"
+[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases"
+[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives"
+[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error"
+[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error"
+[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]"
+[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content"
+[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink"
+[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content"
+[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]"
+[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link"
+[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link"
+[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link"
+[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link"
+[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods"
+[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted"
+[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods"
+[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme"
+[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync"
+[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152"
+[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]"
+[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]"
+[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code."
+[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync"
+[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation"
+[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty"
+[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works"
+[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist."
+[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing"
+[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs"
+[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature"
+[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps"
+[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'"
+[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138"
+[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files"
+[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input"
+[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute"
+[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided"
+[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir"
+[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`"
+[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method"
+[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]"
+[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features."
+[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?"
+[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;"
+[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists"
+[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object #<Object> has no method 'access'"
+[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync"
+[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'"
+[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory"
+[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids."
+[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined"
+[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'"
+[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows"
+[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream"
+[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows"
+[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]"
+[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]"
+[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true"
+[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists"
+[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory"
+[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory "
+[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory"
+[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails"
+[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work"
+[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it"
+[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]"
+[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs"
+[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]"
+[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy"
+[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?"
+[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified"
+[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp"
+[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]"
+[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]"
+[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug"
+[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined."
+[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp"
+[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]"
+[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]"
+[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird"
+[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]"
+[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine"
+[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows"
+[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries"
+[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?"
+[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?"
+[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync"
+[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?"
+[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]"
+[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move"
+[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move"
+[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync"
+[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty"
+[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories"
+[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird"
+[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript"
+[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]"
+[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module"
+[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme"
+[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality"
+[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work"
+[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]"
+[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name"
+[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]"
+[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options"
+[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG"
+[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy"
+[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls"
+[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk"
+[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work"
+[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies"
+[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs"
+[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]"
+[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error"
+[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?"
+[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy "
+[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?"
+[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons"
+[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode"
+[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync"
+[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README"
+[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile"
+[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6"
+[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]"
+[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0"
+[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year"
+[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites"
+[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support"
+[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting "
+[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?"
+[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now"
+[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime "
+[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error"
+[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null"
+[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]"
+[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`"
+[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` "
+[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]"
+[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync"
+[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]"
+[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]"
+[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`"
+[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?"
+[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted."
+[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme"
+[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]"
+[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file"
+[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]"
+[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories"
+[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()"
+[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0"
+[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted"
+[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array"
+[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function"
+[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`"
+[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md"
+[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]"
+[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1"
+[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]"
+[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global"
+[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]"
+[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]"
+[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra"
+[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version"
+[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency"
+[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming"
+[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2"
+[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!"
+[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp"
+[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist"
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/LICENSE b/node_modules/flora-colossus/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+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/flora-colossus/node_modules/fs-extra/README.md b/node_modules/flora-colossus/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..f09f79f
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/README.md
@@ -0,0 +1,261 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
+
+[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![License](https://img.shields.io/npm/l/express.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
+[![build status](https://img.shields.io/travis/jprichardson/node-fs-extra/master.svg)](http://travis-ci.org/jprichardson/node-fs-extra)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
+[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![Coverage Status](https://img.shields.io/coveralls/github/jprichardson/node-fs-extra/master.svg)](https://coveralls.io/github/jprichardson/node-fs-extra)
+[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install --save fs-extra
+
+
+
+Usage
+-----
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+Sync vs Async vs Async/Await
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Also Async/Await will throw an error if one occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+
+// Async/Await:
+async function copyFiles () {
+ try {
+ await fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+ } catch (err) {
+ console.error(err)
+ }
+}
+
+copyFiles()
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirp](docs/ensureDir.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirpSync](docs/ensureDir-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()` & `fs.write()`](docs/fs-read-write.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+### Obtain Filesystem (Devices, Partitions) Information
+
+[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
+
+### Misc.
+
+- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage. See coveralls output for more info.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm test`: runs both the linter and the tests
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/copy-sync.js
new file mode 100644
index 0000000..14ad993
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/copy-sync.js
@@ -0,0 +1,193 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirpSync = require('../mkdirs').mkdirsSync
+const utimesSync = require('../util/utimes.js').utimesMillisSync
+
+const notExist = Symbol('notExist')
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = {filter: opts}
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ const destStat = checkPaths(src, dest)
+
+ if (opts.filter && !opts.filter(src, dest)) return
+
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirpSync(destParent)
+ return startCopy(destStat, src, dest, opts)
+}
+
+function startCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (destStat === notExist) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ if (typeof fs.copyFileSync === 'function') {
+ fs.copyFileSync(src, dest)
+ fs.chmodSync(dest, srcStat.mode)
+ if (opts.preserveTimestamps) {
+ return utimesSync(dest, srcStat.atime, srcStat.mtime)
+ }
+ return
+ }
+ return copyFileFallback(srcStat, src, dest, opts)
+}
+
+function copyFileFallback (srcStat, src, dest, opts) {
+ const BUF_LENGTH = 64 * 1024
+ const _buff = require('../util/buffer')(BUF_LENGTH)
+
+ const fdr = fs.openSync(src, 'r')
+ const fdw = fs.openSync(dest, 'w', srcStat.mode)
+ let pos = 0
+
+ while (pos < srcStat.size) {
+ const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)
+ fs.writeSync(fdw, _buff, 0, bytesRead)
+ pos += bytesRead
+ }
+
+ if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime)
+
+ fs.closeSync(fdr)
+ fs.closeSync(fdw)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts)
+ if (destStat && !destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
+ }
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcStat, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return fs.chmodSync(dest, srcStat.mode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ const destStat = checkPaths(srcItem, destItem)
+ return startCopy(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (destStat === notExist) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (fs.statSync(dest).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+// return true if dest is a subdir of src, otherwise false.
+function isSrcSubdir (src, dest) {
+ const srcArray = path.resolve(src).split(path.sep)
+ const destArray = path.resolve(dest).split(path.sep)
+ return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true)
+}
+
+function checkStats (src, dest) {
+ const srcStat = fs.statSync(src)
+ let destStat
+ try {
+ destStat = fs.statSync(dest)
+ } catch (err) {
+ if (err.code === 'ENOENT') return {srcStat, destStat: notExist}
+ throw err
+ }
+ return {srcStat, destStat}
+}
+
+function checkPaths (src, dest) {
+ const {srcStat, destStat} = checkStats(src, dest)
+ if (destStat.ino && destStat.ino === srcStat.ino) {
+ throw new Error('Source and destination must not be the same.')
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`)
+ }
+ return destStat
+}
+
+module.exports = copySync
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/index.js
new file mode 100644
index 0000000..65945ae
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy-sync/index.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = {
+ copySync: require('./copy-sync')
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/copy/copy.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..3dfbc54
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,246 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirp = require('../mkdirs').mkdirs
+const pathExists = require('../path-exists').pathExists
+const utimes = require('../util/utimes').utimesMillis
+
+const notExist = Symbol('notExist')
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = {filter: opts}
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ checkPaths(src, dest, (err, destStat) => {
+ if (err) return cb(err)
+ if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
+ return checkParentDir(destStat, src, dest, opts, cb)
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return startCopy(destStat, src, dest, opts, cb)
+ mkdirp(destParent, err => {
+ if (err) return cb(err)
+ return startCopy(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function handleFilter (onInclude, destStat, src, dest, opts, cb) {
+ Promise.resolve(opts.filter(src, dest)).then(include => {
+ if (include) {
+ if (destStat) return onInclude(destStat, src, dest, opts, cb)
+ return onInclude(src, dest, opts, cb)
+ }
+ return cb()
+ }, error => cb(error))
+}
+
+function startCopy (destStat, src, dest, opts, cb) {
+ if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
+ return getStats(destStat, src, dest, opts, cb)
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (destStat === notExist) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ if (typeof fs.copyFile === 'function') {
+ return fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ return setDestModeAndTimestamps(srcStat, dest, opts, cb)
+ })
+ }
+ return copyFileFallback(srcStat, src, dest, opts, cb)
+}
+
+function copyFileFallback (srcStat, src, dest, opts, cb) {
+ const rs = fs.createReadStream(src)
+ rs.on('error', err => cb(err)).once('open', () => {
+ const ws = fs.createWriteStream(dest, { mode: srcStat.mode })
+ ws.on('error', err => cb(err))
+ .on('open', () => rs.pipe(ws))
+ .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb))
+ })
+}
+
+function setDestModeAndTimestamps (srcStat, dest, opts, cb) {
+ fs.chmod(dest, srcStat.mode, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) {
+ return utimes(dest, srcStat.atime, srcStat.mtime, cb)
+ }
+ return cb()
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts, cb)
+ if (destStat && !destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
+ }
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcStat, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return fs.chmod(dest, srcStat.mode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ checkPaths(srcItem, destItem, (err, destStat) => {
+ if (err) return cb(err)
+ startCopy(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (destStat === notExist) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (destStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+// return true if dest is a subdir of src, otherwise false.
+function isSrcSubdir (src, dest) {
+ const srcArray = path.resolve(src).split(path.sep)
+ const destArray = path.resolve(dest).split(path.sep)
+ return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true)
+}
+
+function checkStats (src, dest, cb) {
+ fs.stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+ fs.stat(dest, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb(null, {srcStat, destStat: notExist})
+ return cb(err)
+ }
+ return cb(null, {srcStat, destStat})
+ })
+ })
+}
+
+function checkPaths (src, dest, cb) {
+ checkStats(src, dest, (err, stats) => {
+ if (err) return cb(err)
+ const {srcStat, destStat} = stats
+ if (destStat.ino && destStat.ino === srcStat.ino) {
+ return cb(new Error('Source and destination must not be the same.'))
+ }
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`))
+ }
+ return cb(null, destStat)
+ })
+}
+
+module.exports = copy
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/copy/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..b7e4f7f
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,6 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy'))
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/empty/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..db05c17
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,48 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(function emptyDir (dir, callback) {
+ callback = callback || function () {}
+ fs.readdir(dir, (err, items) => {
+ if (err) return mkdir.mkdirs(dir, callback)
+
+ items = items.map(item => path.join(dir, item))
+
+ deleteItem()
+
+ function deleteItem () {
+ const item = items.pop()
+ if (!item) return callback()
+ remove.remove(item, err => {
+ if (err) return callback(err)
+ deleteItem()
+ })
+ }
+ })
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch (err) {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/file.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..67eed30
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,49 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeFile()
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch (e) {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ if (!fs.existsSync(dir)) {
+ mkdir.mkdirsSync(dir)
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..c1f67b7
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const file = require('./file')
+const link = require('./link')
+const symlink = require('./symlink')
+
+module.exports = {
+ // file
+ createFile: file.createFile,
+ createFileSync: file.createFileSync,
+ ensureFile: file.createFile,
+ ensureFileSync: file.createFileSync,
+ // link
+ createLink: link.createLink,
+ createLinkSync: link.createLinkSync,
+ ensureLink: link.createLink,
+ ensureLinkSync: link.createLinkSync,
+ // symlink
+ createSymlink: symlink.createSymlink,
+ createSymlinkSync: symlink.createSymlinkSync,
+ ensureSymlink: symlink.createSymlink,
+ ensureSymlinkSync: symlink.createSymlinkSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/link.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..2cd4196
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,61 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ try {
+ fs.lstatSync(srcpath)
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..24e7e1c
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ 'toCwd': srcpath,
+ 'toDst': srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ 'toCwd': relativeToDst,
+ 'toDst': srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ 'toCwd': srcpath,
+ 'toDst': path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ 'toCwd': srcpath,
+ 'toDst': srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ 'toCwd': relativeToDst,
+ 'toDst': srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ 'toCwd': srcpath,
+ 'toDst': path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..4f8787c
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch (e) {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..fe68b79
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,63 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/fs/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..8ffdf7b
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,104 @@
+'use strict'
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchown',
+ 'lchmod',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'readFile',
+ 'readdir',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.copyFile was added in Node.js v8.5.0
+ // fs.mkdtemp was added in Node.js v5.10.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export all keys:
+Object.keys(fs).forEach(key => {
+ if (key === 'promises') {
+ // fs.promises is a getter property that triggers ExperimentalWarning
+ // Don't re-export it here, the getter is defined in "lib/index.js"
+ return
+ }
+ exports[key] = fs[key]
+})
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read() & fs.write need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..40e37b1
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,28 @@
+'use strict'
+
+module.exports = Object.assign(
+ {},
+ // Export promiseified graceful-fs:
+ require('./fs'),
+ // Export extra methods:
+ require('./copy-sync'),
+ require('./copy'),
+ require('./empty'),
+ require('./ensure'),
+ require('./json'),
+ require('./mkdirs'),
+ require('./move-sync'),
+ require('./move'),
+ require('./output'),
+ require('./path-exists'),
+ require('./remove')
+)
+
+// Export fs.promises as a getter property so that we don't trigger
+// ExperimentalWarning before fs.promises is actually accessed.
+const fs = require('fs')
+if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
+ Object.defineProperty(module.exports, 'promises', {
+ get () { return fs.promises }
+ })
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/json/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..bae68d4
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..59cdb3e
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: u(jsonFile.readFile),
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: u(jsonFile.writeFile),
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..6f76710
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,18 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const jsonFile = require('./jsonfile')
+
+function outputJsonSync (file, data, options) {
+ const dir = path.dirname(file)
+
+ if (!fs.existsSync(dir)) {
+ mkdir.mkdirsSync(dir)
+ }
+
+ jsonFile.writeJsonSync(file, data, options)
+}
+
+module.exports = outputJsonSync
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..d45edb8
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,27 @@
+'use strict'
+
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+const jsonFile = require('./jsonfile')
+
+function outputJson (file, data, options, callback) {
+ if (typeof options === 'function') {
+ callback = options
+ options = {}
+ }
+
+ const dir = path.dirname(file)
+
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return jsonFile.writeJson(file, data, options, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ jsonFile.writeJson(file, data, options, callback)
+ })
+ })
+}
+
+module.exports = outputJson
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..d6e7e5b
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromCallback
+const mkdirs = u(require('./mkdirs'))
+const mkdirsSync = require('./mkdirs-sync')
+
+module.exports = {
+ mkdirs,
+ mkdirsSync,
+ // alias
+ mkdirp: mkdirs,
+ mkdirpSync: mkdirsSync,
+ ensureDir: mkdirs,
+ ensureDirSync: mkdirsSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
new file mode 100644
index 0000000..a34acb9
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
@@ -0,0 +1,54 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const invalidWin32Path = require('./win32').invalidWin32Path
+
+const o777 = parseInt('0777', 8)
+
+function mkdirsSync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts }
+ }
+
+ let mode = opts.mode
+ const xfs = opts.fs || fs
+
+ if (process.platform === 'win32' && invalidWin32Path(p)) {
+ const errInval = new Error(p + ' contains invalid WIN32 path characters.')
+ errInval.code = 'EINVAL'
+ throw errInval
+ }
+
+ if (mode === undefined) {
+ mode = o777 & (~process.umask())
+ }
+ if (!made) made = null
+
+ p = path.resolve(p)
+
+ try {
+ xfs.mkdirSync(p, mode)
+ made = made || p
+ } catch (err0) {
+ if (err0.code === 'ENOENT') {
+ if (path.dirname(p) === p) throw err0
+ made = mkdirsSync(path.dirname(p), opts, made)
+ mkdirsSync(p, opts, made)
+ } else {
+ // In the case of any other error, just see if there's a dir there
+ // already. If so, then hooray! If not, then something is borked.
+ let stat
+ try {
+ stat = xfs.statSync(p)
+ } catch (err1) {
+ throw err0
+ }
+ if (!stat.isDirectory()) throw err0
+ }
+ }
+
+ return made
+}
+
+module.exports = mkdirsSync
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs.js
new file mode 100644
index 0000000..1897533
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/mkdirs.js
@@ -0,0 +1,63 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const invalidWin32Path = require('./win32').invalidWin32Path
+
+const o777 = parseInt('0777', 8)
+
+function mkdirs (p, opts, callback, made) {
+ if (typeof opts === 'function') {
+ callback = opts
+ opts = {}
+ } else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts }
+ }
+
+ if (process.platform === 'win32' && invalidWin32Path(p)) {
+ const errInval = new Error(p + ' contains invalid WIN32 path characters.')
+ errInval.code = 'EINVAL'
+ return callback(errInval)
+ }
+
+ let mode = opts.mode
+ const xfs = opts.fs || fs
+
+ if (mode === undefined) {
+ mode = o777 & (~process.umask())
+ }
+ if (!made) made = null
+
+ callback = callback || function () {}
+ p = path.resolve(p)
+
+ xfs.mkdir(p, mode, er => {
+ if (!er) {
+ made = made || p
+ return callback(null, made)
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ if (path.dirname(p) === p) return callback(er)
+ mkdirs(path.dirname(p), opts, (er, made) => {
+ if (er) callback(er, made)
+ else mkdirs(p, opts, callback, made)
+ })
+ break
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, (er2, stat) => {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) callback(er, made)
+ else callback(null, made)
+ })
+ break
+ }
+ })
+}
+
+module.exports = mkdirs
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/win32.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/win32.js
new file mode 100644
index 0000000..99b3920
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/mkdirs/win32.js
@@ -0,0 +1,25 @@
+'use strict'
+
+const path = require('path')
+
+// get drive on windows
+function getRootPath (p) {
+ p = path.normalize(path.resolve(p)).split(path.sep)
+ if (p.length > 0) return p[0]
+ return null
+}
+
+// http://stackoverflow.com/a/62888/10333 contains more accurate
+// TODO: expand to include the rest
+const INVALID_PATH_CHARS = /[<>:"|?*]/
+
+function invalidWin32Path (p) {
+ const rp = getRootPath(p)
+ p = p.replace(rp, '')
+ return INVALID_PATH_CHARS.test(p)
+}
+
+module.exports = {
+ getRootPath,
+ invalidWin32Path
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/move-sync/index.js
new file mode 100644
index 0000000..6d4f56f
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/move-sync/index.js
@@ -0,0 +1,117 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy-sync').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirsSync
+const buffer = require('../util/buffer')
+
+function moveSync (src, dest, options) {
+ options = options || {}
+ const overwrite = options.overwrite || options.clobber || false
+
+ src = path.resolve(src)
+ dest = path.resolve(dest)
+
+ if (src === dest) return fs.accessSync(src)
+
+ if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`)
+
+ mkdirpSync(path.dirname(dest))
+ tryRenameSync()
+
+ function tryRenameSync () {
+ if (overwrite) {
+ try {
+ return fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') {
+ removeSync(dest)
+ options.overwrite = false // just overwriteed it, no need to do it again
+ return moveSync(src, dest, options)
+ }
+
+ if (err.code !== 'EXDEV') throw err
+ return moveSyncAcrossDevice(src, dest, overwrite)
+ }
+ } else {
+ try {
+ fs.linkSync(src, dest)
+ return fs.unlinkSync(src)
+ } catch (err) {
+ if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') {
+ return moveSyncAcrossDevice(src, dest, overwrite)
+ }
+ throw err
+ }
+ }
+ }
+}
+
+function moveSyncAcrossDevice (src, dest, overwrite) {
+ const stat = fs.statSync(src)
+
+ if (stat.isDirectory()) {
+ return moveDirSyncAcrossDevice(src, dest, overwrite)
+ } else {
+ return moveFileSyncAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveFileSyncAcrossDevice (src, dest, overwrite) {
+ const BUF_LENGTH = 64 * 1024
+ const _buff = buffer(BUF_LENGTH)
+
+ const flags = overwrite ? 'w' : 'wx'
+
+ const fdr = fs.openSync(src, 'r')
+ const stat = fs.fstatSync(fdr)
+ const fdw = fs.openSync(dest, flags, stat.mode)
+ let pos = 0
+
+ while (pos < stat.size) {
+ const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)
+ fs.writeSync(fdw, _buff, 0, bytesRead)
+ pos += bytesRead
+ }
+
+ fs.closeSync(fdr)
+ fs.closeSync(fdw)
+ return fs.unlinkSync(src)
+}
+
+function moveDirSyncAcrossDevice (src, dest, overwrite) {
+ const options = {
+ overwrite: false
+ }
+
+ if (overwrite) {
+ removeSync(dest)
+ tryCopySync()
+ } else {
+ tryCopySync()
+ }
+
+ function tryCopySync () {
+ copySync(src, dest, options)
+ return removeSync(src)
+ }
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// extract dest base dir and check if that is the same as src basename
+function isSrcSubdir (src, dest) {
+ try {
+ return fs.statSync(src).isDirectory() &&
+ src !== dest &&
+ dest.indexOf(src) > -1 &&
+ dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src)
+ } catch (e) {
+ return false
+ }
+}
+
+module.exports = {
+ moveSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/move/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..68947f0
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,82 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const copy = require('../copy').copy
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirp
+const pathExists = require('../path-exists').pathExists
+
+function move (src, dest, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ src = path.resolve(src)
+ dest = path.resolve(dest)
+
+ if (src === dest) return fs.access(src, cb)
+
+ fs.stat(src, (err, st) => {
+ if (err) return cb(err)
+
+ if (st.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`))
+ }
+ mkdirp(path.dirname(dest), err => {
+ if (err) return cb(err)
+ return doRename(src, dest, overwrite, cb)
+ })
+ })
+}
+
+function doRename (src, dest, overwrite, cb) {
+ if (overwrite) {
+ return remove(dest, err => {
+ if (err) return cb(err)
+ return rename(src, dest, overwrite, cb)
+ })
+ }
+ pathExists(dest, (err, destExists) => {
+ if (err) return cb(err)
+ if (destExists) return cb(new Error('dest already exists.'))
+ return rename(src, dest, overwrite, cb)
+ })
+}
+
+function rename (src, dest, overwrite, cb) {
+ fs.rename(src, dest, err => {
+ if (!err) return cb()
+ if (err.code !== 'EXDEV') return cb(err)
+ return moveAcrossDevice(src, dest, overwrite, cb)
+ })
+}
+
+function moveAcrossDevice (src, dest, overwrite, cb) {
+ const opts = {
+ overwrite,
+ errorOnExist: true
+ }
+
+ copy(src, dest, opts, err => {
+ if (err) return cb(err)
+ return remove(src, cb)
+ })
+}
+
+function isSrcSubdir (src, dest) {
+ const srcArray = src.split(path.sep)
+ const destArray = dest.split(path.sep)
+
+ return srcArray.reduce((acc, current, i) => {
+ return acc && destArray[i] === current
+ }, true)
+}
+
+module.exports = {
+ move: u(move)
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/output/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/output/index.js
new file mode 100644
index 0000000..92297ca
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/output/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, ...args) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync(file, ...args)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync(file, ...args)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/remove/index.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..cee5340
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,9 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const rimraf = require('./rimraf')
+
+module.exports = {
+ remove: u(rimraf),
+ removeSync: rimraf.sync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/remove/rimraf.js
new file mode 100644
index 0000000..f287e4e
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/remove/rimraf.js
@@ -0,0 +1,314 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const assert = require('assert')
+
+const isWindows = (process.platform === 'win32')
+
+function defaults (options) {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+}
+
+function rimraf (p, options, cb) {
+ let busyTries = 0
+
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
+ busyTries < options.maxBusyTries) {
+ busyTries++
+ const time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), time)
+ }
+
+ // already gone
+ if (er.code === 'ENOENT') er = null
+ }
+
+ cb(er)
+ })
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === 'ENOENT') {
+ return cb(null)
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === 'EPERM' && isWindows) {
+ return fixWinEPERM(p, options, er, cb)
+ }
+
+ if (st && st.isDirectory()) {
+ return rmdir(p, options, er, cb)
+ }
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === 'ENOENT') {
+ return cb(null)
+ }
+ if (er.code === 'EPERM') {
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ }
+ if (er.code === 'EISDIR') {
+ return rmdir(p, options, er, cb)
+ }
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+ if (er) {
+ assert(er instanceof Error)
+ }
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2) {
+ cb(er2.code === 'ENOENT' ? null : er)
+ } else {
+ options.stat(p, (er3, stats) => {
+ if (er3) {
+ cb(er3.code === 'ENOENT' ? null : er)
+ } else if (stats.isDirectory()) {
+ rmdir(p, options, er, cb)
+ } else {
+ options.unlink(p, cb)
+ }
+ })
+ }
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ let stats
+
+ assert(p)
+ assert(options)
+ if (er) {
+ assert(er instanceof Error)
+ }
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ if (stats.isDirectory()) {
+ rmdirSync(p, options, er)
+ } else {
+ options.unlinkSync(p)
+ }
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ if (originalEr) {
+ assert(originalEr instanceof Error)
+ }
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
+ rmkids(p, options, cb)
+ } else if (er && er.code === 'ENOTDIR') {
+ cb(originalEr)
+ } else {
+ cb(er)
+ }
+ })
+}
+
+function rmkids (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er) return cb(er)
+
+ let n = files.length
+ let errState
+
+ if (n === 0) return options.rmdir(p, cb)
+
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState) {
+ return
+ }
+ if (er) return cb(errState = er)
+ if (--n === 0) {
+ options.rmdir(p, cb)
+ }
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ let st
+
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
+
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === 'EPERM' && isWindows) {
+ fixWinEPERMSync(p, options, er)
+ }
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory()) {
+ rmdirSync(p, options, null)
+ } else {
+ options.unlinkSync(p)
+ }
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ } else if (er.code === 'EPERM') {
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ } else if (er.code !== 'EISDIR') {
+ throw er
+ }
+ rmdirSync(p, options, er)
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+ if (originalEr) {
+ assert(originalEr instanceof Error)
+ }
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === 'ENOTDIR') {
+ throw originalEr
+ } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
+ rmkidsSync(p, options)
+ } else if (er.code !== 'ENOENT') {
+ throw er
+ }
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ if (isWindows) {
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const startTime = Date.now()
+ do {
+ try {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ } catch (er) { }
+ } while (Date.now() - startTime < 500) // give up after 500ms
+ } else {
+ const ret = options.rmdirSync(p, options)
+ return ret
+ }
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/util/buffer.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/util/buffer.js
new file mode 100644
index 0000000..dabf288
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/util/buffer.js
@@ -0,0 +1,12 @@
+'use strict'
+/* eslint-disable node/no-deprecated-api */
+module.exports = function (size) {
+ if (typeof Buffer.allocUnsafe === 'function') {
+ try {
+ return Buffer.allocUnsafe(size)
+ } catch (e) {
+ return new Buffer(size)
+ }
+ }
+ return new Buffer(size)
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/lib/util/utimes.js b/node_modules/flora-colossus/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..8916a1b
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,79 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const os = require('os')
+const path = require('path')
+
+// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
+function hasMillisResSync () {
+ let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2))
+ tmpfile = path.join(os.tmpdir(), tmpfile)
+
+ // 550 millis past UNIX epoch
+ const d = new Date(1435410243862)
+ fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
+ const fd = fs.openSync(tmpfile, 'r+')
+ fs.futimesSync(fd, d, d)
+ fs.closeSync(fd)
+ return fs.statSync(tmpfile).mtime > 1435410243000
+}
+
+function hasMillisRes (callback) {
+ let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2))
+ tmpfile = path.join(os.tmpdir(), tmpfile)
+
+ // 550 millis past UNIX epoch
+ const d = new Date(1435410243862)
+ fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => {
+ if (err) return callback(err)
+ fs.open(tmpfile, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, d, d, err => {
+ if (err) return callback(err)
+ fs.close(fd, err => {
+ if (err) return callback(err)
+ fs.stat(tmpfile, (err, stats) => {
+ if (err) return callback(err)
+ callback(null, stats.mtime > 1435410243000)
+ })
+ })
+ })
+ })
+ })
+}
+
+function timeRemoveMillis (timestamp) {
+ if (typeof timestamp === 'number') {
+ return Math.floor(timestamp / 1000) * 1000
+ } else if (timestamp instanceof Date) {
+ return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
+ } else {
+ throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
+ }
+}
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+function utimesMillisSync (path, atime, mtime) {
+ const fd = fs.openSync(path, 'r+')
+ fs.futimesSync(fd, atime, mtime)
+ return fs.closeSync(fd)
+}
+
+module.exports = {
+ hasMillisRes,
+ hasMillisResSync,
+ timeRemoveMillis,
+ utimesMillis,
+ utimesMillisSync
+}
diff --git a/node_modules/flora-colossus/node_modules/fs-extra/package.json b/node_modules/flora-colossus/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..9d992b8
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/fs-extra/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "fs-extra",
+ "version": "7.0.1",
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.",
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ },
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jprichardson/node-fs-extra"
+ },
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "devDependencies": {
+ "coveralls": "^3.0.0",
+ "istanbul": "^0.4.5",
+ "klaw": "^2.1.1",
+ "klaw-sync": "^3.0.2",
+ "minimist": "^1.1.1",
+ "mocha": "^5.0.5",
+ "proxyquire": "^2.0.1",
+ "read-dir-files": "^0.1.1",
+ "rimraf": "^2.2.8",
+ "secure-random": "^1.1.1",
+ "semver": "^5.3.0",
+ "standard": "^11.0.1",
+ "standard-markdown": "^4.0.1"
+ },
+ "main": "./lib/index.js",
+ "scripts": {
+ "full-ci": "npm run lint && npm run coverage",
+ "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js",
+ "coveralls": "coveralls < coverage/lcov.info",
+ "lint": "standard",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "test": "npm run lint && npm run unit",
+ "unit": "node test.js"
+ }
+}
diff --git a/node_modules/flora-colossus/node_modules/ms/index.js b/node_modules/flora-colossus/node_modules/ms/index.js
new file mode 100644
index 0000000..c4498bc
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/flora-colossus/node_modules/ms/license.md b/node_modules/flora-colossus/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/flora-colossus/node_modules/ms/package.json b/node_modules/flora-colossus/node_modules/ms/package.json
new file mode 100644
index 0000000..eea666e
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.1.2",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ }
+}
diff --git a/node_modules/flora-colossus/node_modules/ms/readme.md b/node_modules/flora-colossus/node_modules/ms/readme.md
new file mode 100644
index 0000000..9a1996b
--- /dev/null
+++ b/node_modules/flora-colossus/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/flora-colossus/package.json b/node_modules/flora-colossus/package.json
new file mode 100644
index 0000000..7ae6bdc
--- /dev/null
+++ b/node_modules/flora-colossus/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "flora-colossus",
+ "version": "1.0.1",
+ "description": "Walks your node_modules tree",
+ "main": "lib/index.js",
+ "typings": "lib/index.d.ts",
+ "scripts": {
+ "build": "tsc",
+ "prepublish": "npm run build",
+ "pretest": "cd test/fixtures/xml2js && yarn --frozen-lockfile",
+ "test": "mocha --require ts-node/register test/*_spec.ts"
+ },
+ "keywords": [
+ "prune",
+ "production"
+ ],
+ "author": "Samuel Attard",
+ "license": "MIT",
+ "devDependencies": {
+ "@types/chai": "^4.1.7",
+ "@types/debug": "^0.0.31",
+ "@types/fs-extra": "^5.0.4",
+ "@types/mocha": "^5.2.5",
+ "chai": "^4.2.0",
+ "mocha": "^5.2.0",
+ "sane": "^2.5.0",
+ "ts-node": "^7.0.1",
+ "typescript": "^3.2.2"
+ },
+ "dependencies": {
+ "debug": "^4.1.1",
+ "fs-extra": "^7.0.0"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+}
diff --git a/node_modules/flora-colossus/tsconfig.json b/node_modules/flora-colossus/tsconfig.json
new file mode 100644
index 0000000..47c306b
--- /dev/null
+++ b/node_modules/flora-colossus/tsconfig.json
@@ -0,0 +1,32 @@
+{
+ "compilerOptions": {
+ "removeComments": false,
+ "preserveConstEnums": true,
+ "sourceMap": true,
+ "declaration": true,
+ "noImplicitAny": true,
+ "noImplicitReturns": true,
+ "suppressImplicitAnyIndexErrors": true,
+ "strictNullChecks": true,
+ "noUnusedLocals": true,
+ "noImplicitThis": true,
+ "noUnusedParameters": true,
+ "module": "commonjs",
+ "moduleResolution": "node",
+ "pretty": true,
+ "target": "ES5",
+ "outDir": "lib",
+ "lib":[
+ "es2015"
+ ]
+ },
+ "formatCodeOptions": {
+ "indentSize": 2,
+ "tabSize": 2
+ },
+ "exclude": [
+ "node_modules",
+ "lib",
+ "test"
+ ]
+} \ No newline at end of file
diff --git a/node_modules/flora-colossus/yarn.lock b/node_modules/flora-colossus/yarn.lock
new file mode 100644
index 0000000..647b522
--- /dev/null
+++ b/node_modules/flora-colossus/yarn.lock
@@ -0,0 +1,1342 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@types/chai@^4.1.7":
+ version "4.1.7"
+ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.7.tgz#1b8e33b61a8c09cbe1f85133071baa0dbf9fa71a"
+ integrity sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA==
+
+"@types/debug@^0.0.31":
+ version "0.0.31"
+ resolved "https://registry.yarnpkg.com/@types/debug/-/debug-0.0.31.tgz#bac8d8aab6a823e91deb7f79083b2a35fa638f33"
+ integrity sha512-LS1MCPaQKqspg7FvexuhmDbWUhE2yIJ+4AgVIyObfc06/UKZ8REgxGNjZc82wPLWmbeOm7S+gSsLgo75TanG4A==
+
+"@types/fs-extra@^5.0.4":
+ version "5.0.4"
+ resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599"
+ integrity sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g==
+ dependencies:
+ "@types/node" "*"
+
+"@types/mocha@^5.2.5":
+ version "5.2.5"
+ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073"
+ integrity sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==
+
+"@types/node@*":
+ version "8.5.2"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.2.tgz#83b8103fa9a2c2e83d78f701a9aa7c9539739aa5"
+
+abbrev@1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
+ integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+ integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+anymatch@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
+ dependencies:
+ micromatch "^3.1.4"
+ normalize-path "^2.1.1"
+
+aproba@^1.0.3:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
+ integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
+
+are-we-there-yet@~1.1.2:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
+ integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^2.0.6"
+
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+
+arr-flatten@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+
+arrify@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+
+assertion-error@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
+ integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==
+
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+
+atob@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc"
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
+brace-expansion@^1.1.7:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb"
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ kind-of "^6.0.2"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
+browser-stdout@1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
+ integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
+
+bser@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719"
+ dependencies:
+ node-int64 "^0.4.0"
+
+buffer-from@^1.0.0, buffer-from@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
+ integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
+
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+capture-exit@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f"
+ integrity sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=
+ dependencies:
+ rsvp "^3.3.3"
+
+chai@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5"
+ integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==
+ dependencies:
+ assertion-error "^1.1.0"
+ check-error "^1.0.2"
+ deep-eql "^3.0.1"
+ get-func-name "^2.0.0"
+ pathval "^1.1.0"
+ type-detect "^4.0.5"
+
+check-error@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
+ integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=
+
+chownr@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
+ integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==
+
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+ integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
+
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
+commander@2.15.1:
+ version "2.15.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
+ integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==
+
+component-emitter@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+console-control-strings@^1.0.0, console-control-strings@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
+ integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+
+core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+debug@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
+ dependencies:
+ ms "2.0.0"
+
+debug@^2.2.0, debug@^2.3.3:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ dependencies:
+ ms "2.0.0"
+
+debug@^3.2.6:
+ version "3.2.6"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
+ integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
+ dependencies:
+ ms "^2.1.1"
+
+debug@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
+ integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
+ dependencies:
+ ms "^2.1.1"
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+
+deep-eql@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df"
+ integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==
+ dependencies:
+ type-detect "^4.0.0"
+
+deep-extend@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
+ integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
+
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
+delegates@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+ integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
+
+detect-libc@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
+ integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
+
+diff@3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
+ integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==
+
+diff@^3.1.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
+
+escape-string-regexp@1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+exec-sh@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38"
+ dependencies:
+ merge "^1.1.3"
+
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+fb-watchman@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58"
+ dependencies:
+ bser "^2.0.0"
+
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
+for-in@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ dependencies:
+ map-cache "^0.2.2"
+
+fs-extra@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
+ integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
+fs-minipass@^1.2.5:
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07"
+ integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==
+ dependencies:
+ minipass "^2.2.1"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+fsevents@^1.2.3:
+ version "1.2.9"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f"
+ integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==
+ dependencies:
+ nan "^2.12.1"
+ node-pre-gyp "^0.12.0"
+
+gauge@~2.7.3:
+ version "2.7.4"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
+ integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=
+ dependencies:
+ aproba "^1.0.3"
+ console-control-strings "^1.0.0"
+ has-unicode "^2.0.0"
+ object-assign "^4.1.0"
+ signal-exit "^3.0.0"
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+ wide-align "^1.1.0"
+
+get-func-name@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
+
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+
+glob@7.1.2:
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^7.1.3:
+ version "7.1.4"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
+ integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+graceful-fs@^4.1.2, graceful-fs@^4.1.6:
+ version "4.1.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
+
+growl@1.10.5:
+ version "1.10.5"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
+ integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==
+
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+
+has-unicode@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
+ integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+he@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
+
+iconv-lite@^0.4.4:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+ignore-walk@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"
+ integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==
+ dependencies:
+ minimatch "^3.0.4"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@~2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+
+ini@~1.3.0:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
+ integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
+
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ dependencies:
+ kind-of "^6.0.0"
+
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ dependencies:
+ kind-of "^6.0.0"
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs=
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
+
+is-odd@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24"
+ dependencies:
+ is-number "^4.0.0"
+
+is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ dependencies:
+ isobject "^3.0.1"
+
+is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+
+isarray@1.0.0, isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+
+jsonfile@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
+
+make-error@^1.1.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.2.tgz#8762ffad2444dd8ff1f7c819629fa28e24fea1c4"
+
+makeerror@1.0.x:
+ version "1.0.11"
+ resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
+ dependencies:
+ tmpl "1.0.x"
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ dependencies:
+ object-visit "^1.0.0"
+
+merge@^1.1.3:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
+
+micromatch@^3.1.4:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
+minimatch@3.0.4, minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+minimist@^1.1.1, minimist@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+
+minipass@^2.2.1, minipass@^2.3.5:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
+ integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==
+ dependencies:
+ safe-buffer "^5.1.2"
+ yallist "^3.0.0"
+
+minizlib@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614"
+ integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==
+ dependencies:
+ minipass "^2.2.1"
+
+mixin-deep@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
+mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ dependencies:
+ minimist "0.0.8"
+
+mocha@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6"
+ integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==
+ dependencies:
+ browser-stdout "1.3.1"
+ commander "2.15.1"
+ debug "3.1.0"
+ diff "3.5.0"
+ escape-string-regexp "1.0.5"
+ glob "7.1.2"
+ growl "1.10.5"
+ he "1.1.1"
+ minimatch "3.0.4"
+ mkdirp "0.5.1"
+ supports-color "5.4.0"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+
+ms@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
+ integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
+
+nan@^2.12.1:
+ version "2.14.0"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
+ integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
+
+nanomatch@^1.2.9:
+ version "1.2.9"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2"
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-odd "^2.0.0"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+needle@^2.2.1:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c"
+ integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==
+ dependencies:
+ debug "^3.2.6"
+ iconv-lite "^0.4.4"
+ sax "^1.2.4"
+
+node-int64@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
+
+node-pre-gyp@^0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149"
+ integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==
+ dependencies:
+ detect-libc "^1.0.2"
+ mkdirp "^0.5.1"
+ needle "^2.2.1"
+ nopt "^4.0.1"
+ npm-packlist "^1.1.6"
+ npmlog "^4.0.2"
+ rc "^1.2.7"
+ rimraf "^2.6.1"
+ semver "^5.3.0"
+ tar "^4"
+
+nopt@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
+ integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=
+ dependencies:
+ abbrev "1"
+ osenv "^0.1.4"
+
+normalize-path@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+ dependencies:
+ remove-trailing-separator "^1.0.1"
+
+npm-bundled@^1.0.1:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd"
+ integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==
+
+npm-packlist@^1.1.6:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc"
+ integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==
+ dependencies:
+ ignore-walk "^3.0.1"
+ npm-bundled "^1.0.1"
+
+npmlog@^4.0.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
+ integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
+ dependencies:
+ are-we-there-yet "~1.1.2"
+ console-control-strings "~1.1.0"
+ gauge "~2.7.3"
+ set-blocking "~2.0.0"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+ integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
+
+object-assign@^4.1.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
+
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ dependencies:
+ isobject "^3.0.0"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ dependencies:
+ isobject "^3.0.1"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ dependencies:
+ wrappy "1"
+
+os-homedir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+ integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
+
+os-tmpdir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+osenv@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
+ integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.0"
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+pathval@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
+ integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA=
+
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+
+process-nextick-args@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
+ integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==
+
+rc@^1.2.7:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
+ integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
+ dependencies:
+ deep-extend "^0.6.0"
+ ini "~1.3.0"
+ minimist "^1.2.0"
+ strip-json-comments "~2.0.1"
+
+readable-stream@^2.0.6:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
+ integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
+remove-trailing-separator@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+
+repeat-element@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
+
+repeat-string@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+
+rimraf@^2.6.1:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
+ integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
+ dependencies:
+ glob "^7.1.3"
+
+rsvp@^3.3.3:
+ version "3.6.2"
+ resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a"
+ integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==
+
+safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ dependencies:
+ ret "~0.1.10"
+
+"safer-buffer@>= 2.1.2 < 3":
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+sane@^2.5.0:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa"
+ integrity sha1-tNwYYcIbQn6SlQej51HiosuKs/o=
+ dependencies:
+ anymatch "^2.0.0"
+ capture-exit "^1.2.0"
+ exec-sh "^0.2.0"
+ fb-watchman "^2.0.0"
+ micromatch "^3.1.4"
+ minimist "^1.1.1"
+ walker "~1.0.5"
+ watch "~0.18.0"
+ optionalDependencies:
+ fsevents "^1.2.3"
+
+sax@^1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
+ integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
+
+semver@^5.3.0:
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
+ integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
+
+set-blocking@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+ integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
+
+set-value@^0.4.3:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.1"
+ to-object-path "^0.3.0"
+
+set-value@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
+signal-exit@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
+source-map-resolve@^0.5.0:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a"
+ dependencies:
+ atob "^2.0.0"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-support@^0.5.6:
+ version "0.5.10"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c"
+ integrity sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map-url@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+
+source-map@^0.5.6:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+
+source-map@^0.6.0:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ dependencies:
+ extend-shallow "^3.0.0"
+
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+string-width@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+"string-width@^1.0.2 || 2":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-json-comments@~2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+ integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
+
+supports-color@5.4.0:
+ version "5.4.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
+ integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==
+ dependencies:
+ has-flag "^3.0.0"
+
+tar@^4:
+ version "4.4.10"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1"
+ integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==
+ dependencies:
+ chownr "^1.1.1"
+ fs-minipass "^1.2.5"
+ minipass "^2.3.5"
+ minizlib "^1.2.1"
+ mkdirp "^0.5.0"
+ safe-buffer "^5.1.2"
+ yallist "^3.0.3"
+
+tmpl@1.0.x:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ dependencies:
+ kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
+ts-node@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf"
+ integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==
+ dependencies:
+ arrify "^1.0.0"
+ buffer-from "^1.1.0"
+ diff "^3.1.0"
+ make-error "^1.1.1"
+ minimist "^1.2.0"
+ mkdirp "^0.5.1"
+ source-map-support "^0.5.6"
+ yn "^2.0.0"
+
+type-detect@^4.0.0:
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.5.tgz#d70e5bc81db6de2a381bcaca0c6e0cbdc7635de2"
+
+type-detect@^4.0.5:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
+ integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
+
+typescript@^3.2.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5"
+ integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==
+
+union-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^0.4.3"
+
+universalify@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
+
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+
+use@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544"
+ dependencies:
+ kind-of "^6.0.2"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
+
+walker@~1.0.5:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
+ dependencies:
+ makeerror "1.0.x"
+
+watch@~0.18.0:
+ version "0.18.0"
+ resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986"
+ dependencies:
+ exec-sh "^0.2.0"
+ minimist "^1.2.0"
+
+wide-align@^1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
+ integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
+ dependencies:
+ string-width "^1.0.2 || 2"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+
+yallist@^3.0.0, yallist@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"
+ integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
+
+yn@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
diff --git a/node_modules/forever-agent/LICENSE b/node_modules/forever-agent/LICENSE
new file mode 100644
index 0000000..a4a9aee
--- /dev/null
+++ b/node_modules/forever-agent/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/forever-agent/README.md b/node_modules/forever-agent/README.md
new file mode 100644
index 0000000..9d5b663
--- /dev/null
+++ b/node_modules/forever-agent/README.md
@@ -0,0 +1,4 @@
+forever-agent
+=============
+
+HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.
diff --git a/node_modules/forever-agent/index.js b/node_modules/forever-agent/index.js
new file mode 100644
index 0000000..416c7ab
--- /dev/null
+++ b/node_modules/forever-agent/index.js
@@ -0,0 +1,138 @@
+module.exports = ForeverAgent
+ForeverAgent.SSL = ForeverAgentSSL
+
+var util = require('util')
+ , Agent = require('http').Agent
+ , net = require('net')
+ , tls = require('tls')
+ , AgentSSL = require('https').Agent
+
+function getConnectionName(host, port) {
+ var name = ''
+ if (typeof host === 'string') {
+ name = host + ':' + port
+ } else {
+ // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name.
+ name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':')
+ }
+ return name
+}
+
+function ForeverAgent(options) {
+ var self = this
+ self.options = options || {}
+ self.requests = {}
+ self.sockets = {}
+ self.freeSockets = {}
+ self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
+ self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
+ self.on('free', function(socket, host, port) {
+ var name = getConnectionName(host, port)
+
+ if (self.requests[name] && self.requests[name].length) {
+ self.requests[name].shift().onSocket(socket)
+ } else if (self.sockets[name].length < self.minSockets) {
+ if (!self.freeSockets[name]) self.freeSockets[name] = []
+ self.freeSockets[name].push(socket)
+
+ // if an error happens while we don't use the socket anyway, meh, throw the socket away
+ var onIdleError = function() {
+ socket.destroy()
+ }
+ socket._onIdleError = onIdleError
+ socket.on('error', onIdleError)
+ } else {
+ // If there are no pending requests just destroy the
+ // socket and it will get removed from the pool. This
+ // gets us out of timeout issues and allows us to
+ // default to Connection:keep-alive.
+ socket.destroy()
+ }
+ })
+
+}
+util.inherits(ForeverAgent, Agent)
+
+ForeverAgent.defaultMinSockets = 5
+
+
+ForeverAgent.prototype.createConnection = net.createConnection
+ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
+ForeverAgent.prototype.addRequest = function(req, host, port) {
+ var name = getConnectionName(host, port)
+
+ if (typeof host !== 'string') {
+ var options = host
+ port = options.port
+ host = options.host
+ }
+
+ if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
+ var idleSocket = this.freeSockets[name].pop()
+ idleSocket.removeListener('error', idleSocket._onIdleError)
+ delete idleSocket._onIdleError
+ req._reusedSocket = true
+ req.onSocket(idleSocket)
+ } else {
+ this.addRequestNoreuse(req, host, port)
+ }
+}
+
+ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
+ if (this.sockets[name]) {
+ var index = this.sockets[name].indexOf(s)
+ if (index !== -1) {
+ this.sockets[name].splice(index, 1)
+ }
+ } else if (this.sockets[name] && this.sockets[name].length === 0) {
+ // don't leak
+ delete this.sockets[name]
+ delete this.requests[name]
+ }
+
+ if (this.freeSockets[name]) {
+ var index = this.freeSockets[name].indexOf(s)
+ if (index !== -1) {
+ this.freeSockets[name].splice(index, 1)
+ if (this.freeSockets[name].length === 0) {
+ delete this.freeSockets[name]
+ }
+ }
+ }
+
+ if (this.requests[name] && this.requests[name].length) {
+ // If we have pending requests and a socket gets closed a new one
+ // needs to be created to take over in the pool for the one that closed.
+ this.createSocket(name, host, port).emit('free')
+ }
+}
+
+function ForeverAgentSSL (options) {
+ ForeverAgent.call(this, options)
+}
+util.inherits(ForeverAgentSSL, ForeverAgent)
+
+ForeverAgentSSL.prototype.createConnection = createConnectionSSL
+ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
+
+function createConnectionSSL (port, host, options) {
+ if (typeof port === 'object') {
+ options = port;
+ } else if (typeof host === 'object') {
+ options = host;
+ } else if (typeof options === 'object') {
+ options = options;
+ } else {
+ options = {};
+ }
+
+ if (typeof port === 'number') {
+ options.port = port;
+ }
+
+ if (typeof host === 'string') {
+ options.host = host;
+ }
+
+ return tls.connect(options);
+}
diff --git a/node_modules/forever-agent/package.json b/node_modules/forever-agent/package.json
new file mode 100644
index 0000000..f760629
--- /dev/null
+++ b/node_modules/forever-agent/package.json
@@ -0,0 +1,17 @@
+{
+ "author": "Mikeal Rogers <mikeal.rogers@gmail.com> (http://www.futurealoof.com)",
+ "name": "forever-agent",
+ "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.",
+ "version": "0.6.1",
+ "license": "Apache-2.0",
+ "repository": {
+ "url": "https://github.com/mikeal/forever-agent"
+ },
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ }
+}
diff --git a/node_modules/form-data/License b/node_modules/form-data/License
new file mode 100644
index 0000000..c7ff12a
--- /dev/null
+++ b/node_modules/form-data/License
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and 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/form-data/README.md b/node_modules/form-data/README.md
new file mode 100644
index 0000000..d780936
--- /dev/null
+++ b/node_modules/form-data/README.md
@@ -0,0 +1,234 @@
+# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data)
+
+A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications.
+
+The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
+
+[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
+
+[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.3.3.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data)
+[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.3.3.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data)
+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.3.3.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data)
+
+[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.3.3.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
+[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
+[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)
+
+## Install
+
+```
+npm install --save form-data
+```
+
+## Usage
+
+In this example we are constructing a form with 3 fields that contain a string,
+a buffer and a file stream.
+
+``` javascript
+var FormData = require('form-data');
+var fs = require('fs');
+
+var form = new FormData();
+form.append('my_field', 'my value');
+form.append('my_buffer', new Buffer(10));
+form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
+```
+
+Also you can use http-response stream:
+
+``` javascript
+var FormData = require('form-data');
+var http = require('http');
+
+var form = new FormData();
+
+http.request('http://nodejs.org/images/logo.png', function(response) {
+ form.append('my_field', 'my value');
+ form.append('my_buffer', new Buffer(10));
+ form.append('my_logo', response);
+});
+```
+
+Or @mikeal's [request](https://github.com/request/request) stream:
+
+``` javascript
+var FormData = require('form-data');
+var request = require('request');
+
+var form = new FormData();
+
+form.append('my_field', 'my value');
+form.append('my_buffer', new Buffer(10));
+form.append('my_logo', request('http://nodejs.org/images/logo.png'));
+```
+
+In order to submit this form to a web application, call ```submit(url, [callback])``` method:
+
+``` javascript
+form.submit('http://example.org/', function(err, res) {
+ // res – response object (http.IncomingMessage) //
+ res.resume();
+});
+
+```
+
+For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
+
+### Custom options
+
+You can provide custom options, such as `maxDataSize`:
+
+``` javascript
+var FormData = require('form-data');
+
+var form = new FormData({ maxDataSize: 20971520 });
+form.append('my_field', 'my value');
+form.append('my_buffer', /* something big */);
+```
+
+List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15)
+
+### Alternative submission methods
+
+You can use node's http client interface:
+
+``` javascript
+var http = require('http');
+
+var request = http.request({
+ method: 'post',
+ host: 'example.org',
+ path: '/upload',
+ headers: form.getHeaders()
+});
+
+form.pipe(request);
+
+request.on('response', function(res) {
+ console.log(res.statusCode);
+});
+```
+
+Or if you would prefer the `'Content-Length'` header to be set for you:
+
+``` javascript
+form.submit('example.org/upload', function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+To use custom headers and pre-known length in parts:
+
+``` javascript
+var CRLF = '\r\n';
+var form = new FormData();
+
+var options = {
+ header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,
+ knownLength: 1
+};
+
+form.append('my_buffer', buffer, options);
+
+form.submit('http://example.com/', function(err, res) {
+ if (err) throw err;
+ console.log('Done');
+});
+```
+
+Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually:
+
+``` javascript
+someModule.stream(function(err, stdout, stderr) {
+ if (err) throw err;
+
+ var form = new FormData();
+
+ form.append('file', stdout, {
+ filename: 'unicycle.jpg', // ... or:
+ filepath: 'photos/toys/unicycle.jpg',
+ contentType: 'image/jpeg',
+ knownLength: 19806
+ });
+
+ form.submit('http://example.com/', function(err, res) {
+ if (err) throw err;
+ console.log('Done');
+ });
+});
+```
+
+The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory).
+
+For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:
+
+``` javascript
+form.submit({
+ host: 'example.com',
+ path: '/probably.php?extra=params',
+ auth: 'username:password'
+}, function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:
+
+``` javascript
+form.submit({
+ host: 'example.com',
+ path: '/surelynot.php',
+ headers: {'x-test-header': 'test-header-value'}
+}, function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+### Integration with other libraries
+
+#### Request
+
+Form submission using [request](https://github.com/request/request):
+
+```javascript
+var formData = {
+ my_field: 'my_value',
+ my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
+};
+
+request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {
+ if (err) {
+ return console.error('upload failed:', err);
+ }
+ console.log('Upload successful! Server responded with:', body);
+});
+```
+
+For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).
+
+#### node-fetch
+
+You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):
+
+```javascript
+var form = new FormData();
+
+form.append('a', 1);
+
+fetch('http://example.com', { method: 'POST', body: form })
+ .then(function(res) {
+ return res.json();
+ }).then(function(json) {
+ console.log(json);
+ });
+```
+
+## Notes
+
+- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
+- Starting version `2.x` FormData has dropped support for `node@0.10.x`.
+
+## License
+
+Form-Data is released under the [MIT](License) license.
diff --git a/node_modules/form-data/README.md.bak b/node_modules/form-data/README.md.bak
new file mode 100644
index 0000000..0524d60
--- /dev/null
+++ b/node_modules/form-data/README.md.bak
@@ -0,0 +1,234 @@
+# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data)
+
+A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications.
+
+The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
+
+[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
+
+[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data)
+[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data)
+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/master.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data)
+
+[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master)
+[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data)
+[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data)
+
+## Install
+
+```
+npm install --save form-data
+```
+
+## Usage
+
+In this example we are constructing a form with 3 fields that contain a string,
+a buffer and a file stream.
+
+``` javascript
+var FormData = require('form-data');
+var fs = require('fs');
+
+var form = new FormData();
+form.append('my_field', 'my value');
+form.append('my_buffer', new Buffer(10));
+form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
+```
+
+Also you can use http-response stream:
+
+``` javascript
+var FormData = require('form-data');
+var http = require('http');
+
+var form = new FormData();
+
+http.request('http://nodejs.org/images/logo.png', function(response) {
+ form.append('my_field', 'my value');
+ form.append('my_buffer', new Buffer(10));
+ form.append('my_logo', response);
+});
+```
+
+Or @mikeal's [request](https://github.com/request/request) stream:
+
+``` javascript
+var FormData = require('form-data');
+var request = require('request');
+
+var form = new FormData();
+
+form.append('my_field', 'my value');
+form.append('my_buffer', new Buffer(10));
+form.append('my_logo', request('http://nodejs.org/images/logo.png'));
+```
+
+In order to submit this form to a web application, call ```submit(url, [callback])``` method:
+
+``` javascript
+form.submit('http://example.org/', function(err, res) {
+ // res – response object (http.IncomingMessage) //
+ res.resume();
+});
+
+```
+
+For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
+
+### Custom options
+
+You can provide custom options, such as `maxDataSize`:
+
+``` javascript
+var FormData = require('form-data');
+
+var form = new FormData({ maxDataSize: 20971520 });
+form.append('my_field', 'my value');
+form.append('my_buffer', /* something big */);
+```
+
+List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15)
+
+### Alternative submission methods
+
+You can use node's http client interface:
+
+``` javascript
+var http = require('http');
+
+var request = http.request({
+ method: 'post',
+ host: 'example.org',
+ path: '/upload',
+ headers: form.getHeaders()
+});
+
+form.pipe(request);
+
+request.on('response', function(res) {
+ console.log(res.statusCode);
+});
+```
+
+Or if you would prefer the `'Content-Length'` header to be set for you:
+
+``` javascript
+form.submit('example.org/upload', function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+To use custom headers and pre-known length in parts:
+
+``` javascript
+var CRLF = '\r\n';
+var form = new FormData();
+
+var options = {
+ header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,
+ knownLength: 1
+};
+
+form.append('my_buffer', buffer, options);
+
+form.submit('http://example.com/', function(err, res) {
+ if (err) throw err;
+ console.log('Done');
+});
+```
+
+Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually:
+
+``` javascript
+someModule.stream(function(err, stdout, stderr) {
+ if (err) throw err;
+
+ var form = new FormData();
+
+ form.append('file', stdout, {
+ filename: 'unicycle.jpg', // ... or:
+ filepath: 'photos/toys/unicycle.jpg',
+ contentType: 'image/jpeg',
+ knownLength: 19806
+ });
+
+ form.submit('http://example.com/', function(err, res) {
+ if (err) throw err;
+ console.log('Done');
+ });
+});
+```
+
+The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory).
+
+For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:
+
+``` javascript
+form.submit({
+ host: 'example.com',
+ path: '/probably.php?extra=params',
+ auth: 'username:password'
+}, function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:
+
+``` javascript
+form.submit({
+ host: 'example.com',
+ path: '/surelynot.php',
+ headers: {'x-test-header': 'test-header-value'}
+}, function(err, res) {
+ console.log(res.statusCode);
+});
+```
+
+### Integration with other libraries
+
+#### Request
+
+Form submission using [request](https://github.com/request/request):
+
+```javascript
+var formData = {
+ my_field: 'my_value',
+ my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
+};
+
+request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) {
+ if (err) {
+ return console.error('upload failed:', err);
+ }
+ console.log('Upload successful! Server responded with:', body);
+});
+```
+
+For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads).
+
+#### node-fetch
+
+You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch):
+
+```javascript
+var form = new FormData();
+
+form.append('a', 1);
+
+fetch('http://example.com', { method: 'POST', body: form })
+ .then(function(res) {
+ return res.json();
+ }).then(function(json) {
+ console.log(json);
+ });
+```
+
+## Notes
+
+- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
+- Starting version `2.x` FormData has dropped support for `node@0.10.x`.
+
+## License
+
+Form-Data is released under the [MIT](License) license.
diff --git a/node_modules/form-data/lib/browser.js b/node_modules/form-data/lib/browser.js
new file mode 100644
index 0000000..09e7c70
--- /dev/null
+++ b/node_modules/form-data/lib/browser.js
@@ -0,0 +1,2 @@
+/* eslint-env browser */
+module.exports = typeof self == 'object' ? self.FormData : window.FormData;
diff --git a/node_modules/form-data/lib/form_data.js b/node_modules/form-data/lib/form_data.js
new file mode 100644
index 0000000..3a1bb82
--- /dev/null
+++ b/node_modules/form-data/lib/form_data.js
@@ -0,0 +1,457 @@
+var CombinedStream = require('combined-stream');
+var util = require('util');
+var path = require('path');
+var http = require('http');
+var https = require('https');
+var parseUrl = require('url').parse;
+var fs = require('fs');
+var mime = require('mime-types');
+var asynckit = require('asynckit');
+var populate = require('./populate.js');
+
+// Public API
+module.exports = FormData;
+
+// make it a Stream
+util.inherits(FormData, CombinedStream);
+
+/**
+ * Create readable "multipart/form-data" streams.
+ * Can be used to submit forms
+ * and file uploads to other web applications.
+ *
+ * @constructor
+ * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
+ */
+function FormData(options) {
+ if (!(this instanceof FormData)) {
+ return new FormData();
+ }
+
+ this._overheadLength = 0;
+ this._valueLength = 0;
+ this._valuesToMeasure = [];
+
+ CombinedStream.call(this);
+
+ options = options || {};
+ for (var option in options) {
+ this[option] = options[option];
+ }
+}
+
+FormData.LINE_BREAK = '\r\n';
+FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
+
+FormData.prototype.append = function(field, value, options) {
+
+ options = options || {};
+
+ // allow filename as single option
+ if (typeof options == 'string') {
+ options = {filename: options};
+ }
+
+ var append = CombinedStream.prototype.append.bind(this);
+
+ // all that streamy business can't handle numbers
+ if (typeof value == 'number') {
+ value = '' + value;
+ }
+
+ // https://github.com/felixge/node-form-data/issues/38
+ if (util.isArray(value)) {
+ // Please convert your array into string
+ // the way web server expects it
+ this._error(new Error('Arrays are not supported.'));
+ return;
+ }
+
+ var header = this._multiPartHeader(field, value, options);
+ var footer = this._multiPartFooter();
+
+ append(header);
+ append(value);
+ append(footer);
+
+ // pass along options.knownLength
+ this._trackLength(header, value, options);
+};
+
+FormData.prototype._trackLength = function(header, value, options) {
+ var valueLength = 0;
+
+ // used w/ getLengthSync(), when length is known.
+ // e.g. for streaming directly from a remote server,
+ // w/ a known file a size, and not wanting to wait for
+ // incoming file to finish to get its size.
+ if (options.knownLength != null) {
+ valueLength += +options.knownLength;
+ } else if (Buffer.isBuffer(value)) {
+ valueLength = value.length;
+ } else if (typeof value === 'string') {
+ valueLength = Buffer.byteLength(value);
+ }
+
+ this._valueLength += valueLength;
+
+ // @check why add CRLF? does this account for custom/multiple CRLFs?
+ this._overheadLength +=
+ Buffer.byteLength(header) +
+ FormData.LINE_BREAK.length;
+
+ // empty or either doesn't have path or not an http response
+ if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
+ return;
+ }
+
+ // no need to bother with the length
+ if (!options.knownLength) {
+ this._valuesToMeasure.push(value);
+ }
+};
+
+FormData.prototype._lengthRetriever = function(value, callback) {
+
+ if (value.hasOwnProperty('fd')) {
+
+ // take read range into a account
+ // `end` = Infinity –> read file till the end
+ //
+ // TODO: Looks like there is bug in Node fs.createReadStream
+ // it doesn't respect `end` options without `start` options
+ // Fix it when node fixes it.
+ // https://github.com/joyent/node/issues/7819
+ if (value.end != undefined && value.end != Infinity && value.start != undefined) {
+
+ // when end specified
+ // no need to calculate range
+ // inclusive, starts with 0
+ callback(null, value.end + 1 - (value.start ? value.start : 0));
+
+ // not that fast snoopy
+ } else {
+ // still need to fetch file size from fs
+ fs.stat(value.path, function(err, stat) {
+
+ var fileSize;
+
+ if (err) {
+ callback(err);
+ return;
+ }
+
+ // update final size based on the range options
+ fileSize = stat.size - (value.start ? value.start : 0);
+ callback(null, fileSize);
+ });
+ }
+
+ // or http response
+ } else if (value.hasOwnProperty('httpVersion')) {
+ callback(null, +value.headers['content-length']);
+
+ // or request stream http://github.com/mikeal/request
+ } else if (value.hasOwnProperty('httpModule')) {
+ // wait till response come back
+ value.on('response', function(response) {
+ value.pause();
+ callback(null, +response.headers['content-length']);
+ });
+ value.resume();
+
+ // something else
+ } else {
+ callback('Unknown stream');
+ }
+};
+
+FormData.prototype._multiPartHeader = function(field, value, options) {
+ // custom header specified (as string)?
+ // it becomes responsible for boundary
+ // (e.g. to handle extra CRLFs on .NET servers)
+ if (typeof options.header == 'string') {
+ return options.header;
+ }
+
+ var contentDisposition = this._getContentDisposition(value, options);
+ var contentType = this._getContentType(value, options);
+
+ var contents = '';
+ var headers = {
+ // add custom disposition as third element or keep it two elements if not
+ 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
+ // if no content type. allow it to be empty array
+ 'Content-Type': [].concat(contentType || [])
+ };
+
+ // allow custom headers.
+ if (typeof options.header == 'object') {
+ populate(headers, options.header);
+ }
+
+ var header;
+ for (var prop in headers) {
+ if (!headers.hasOwnProperty(prop)) continue;
+ header = headers[prop];
+
+ // skip nullish headers.
+ if (header == null) {
+ continue;
+ }
+
+ // convert all headers to arrays.
+ if (!Array.isArray(header)) {
+ header = [header];
+ }
+
+ // add non-empty headers.
+ if (header.length) {
+ contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
+ }
+ }
+
+ return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
+};
+
+FormData.prototype._getContentDisposition = function(value, options) {
+
+ var filename
+ , contentDisposition
+ ;
+
+ if (typeof options.filepath === 'string') {
+ // custom filepath for relative paths
+ filename = path.normalize(options.filepath).replace(/\\/g, '/');
+ } else if (options.filename || value.name || value.path) {
+ // custom filename take precedence
+ // formidable and the browser add a name property
+ // fs- and request- streams have path property
+ filename = path.basename(options.filename || value.name || value.path);
+ } else if (value.readable && value.hasOwnProperty('httpVersion')) {
+ // or try http response
+ filename = path.basename(value.client._httpMessage.path);
+ }
+
+ if (filename) {
+ contentDisposition = 'filename="' + filename + '"';
+ }
+
+ return contentDisposition;
+};
+
+FormData.prototype._getContentType = function(value, options) {
+
+ // use custom content-type above all
+ var contentType = options.contentType;
+
+ // or try `name` from formidable, browser
+ if (!contentType && value.name) {
+ contentType = mime.lookup(value.name);
+ }
+
+ // or try `path` from fs-, request- streams
+ if (!contentType && value.path) {
+ contentType = mime.lookup(value.path);
+ }
+
+ // or if it's http-reponse
+ if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
+ contentType = value.headers['content-type'];
+ }
+
+ // or guess it from the filepath or filename
+ if (!contentType && (options.filepath || options.filename)) {
+ contentType = mime.lookup(options.filepath || options.filename);
+ }
+
+ // fallback to the default content type if `value` is not simple value
+ if (!contentType && typeof value == 'object') {
+ contentType = FormData.DEFAULT_CONTENT_TYPE;
+ }
+
+ return contentType;
+};
+
+FormData.prototype._multiPartFooter = function() {
+ return function(next) {
+ var footer = FormData.LINE_BREAK;
+
+ var lastPart = (this._streams.length === 0);
+ if (lastPart) {
+ footer += this._lastBoundary();
+ }
+
+ next(footer);
+ }.bind(this);
+};
+
+FormData.prototype._lastBoundary = function() {
+ return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
+};
+
+FormData.prototype.getHeaders = function(userHeaders) {
+ var header;
+ var formHeaders = {
+ 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
+ };
+
+ for (header in userHeaders) {
+ if (userHeaders.hasOwnProperty(header)) {
+ formHeaders[header.toLowerCase()] = userHeaders[header];
+ }
+ }
+
+ return formHeaders;
+};
+
+FormData.prototype.getBoundary = function() {
+ if (!this._boundary) {
+ this._generateBoundary();
+ }
+
+ return this._boundary;
+};
+
+FormData.prototype._generateBoundary = function() {
+ // This generates a 50 character boundary similar to those used by Firefox.
+ // They are optimized for boyer-moore parsing.
+ var boundary = '--------------------------';
+ for (var i = 0; i < 24; i++) {
+ boundary += Math.floor(Math.random() * 10).toString(16);
+ }
+
+ this._boundary = boundary;
+};
+
+// Note: getLengthSync DOESN'T calculate streams length
+// As workaround one can calculate file size manually
+// and add it as knownLength option
+FormData.prototype.getLengthSync = function() {
+ var knownLength = this._overheadLength + this._valueLength;
+
+ // Don't get confused, there are 3 "internal" streams for each keyval pair
+ // so it basically checks if there is any value added to the form
+ if (this._streams.length) {
+ knownLength += this._lastBoundary().length;
+ }
+
+ // https://github.com/form-data/form-data/issues/40
+ if (!this.hasKnownLength()) {
+ // Some async length retrievers are present
+ // therefore synchronous length calculation is false.
+ // Please use getLength(callback) to get proper length
+ this._error(new Error('Cannot calculate proper length in synchronous way.'));
+ }
+
+ return knownLength;
+};
+
+// Public API to check if length of added values is known
+// https://github.com/form-data/form-data/issues/196
+// https://github.com/form-data/form-data/issues/262
+FormData.prototype.hasKnownLength = function() {
+ var hasKnownLength = true;
+
+ if (this._valuesToMeasure.length) {
+ hasKnownLength = false;
+ }
+
+ return hasKnownLength;
+};
+
+FormData.prototype.getLength = function(cb) {
+ var knownLength = this._overheadLength + this._valueLength;
+
+ if (this._streams.length) {
+ knownLength += this._lastBoundary().length;
+ }
+
+ if (!this._valuesToMeasure.length) {
+ process.nextTick(cb.bind(this, null, knownLength));
+ return;
+ }
+
+ asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
+ if (err) {
+ cb(err);
+ return;
+ }
+
+ values.forEach(function(length) {
+ knownLength += length;
+ });
+
+ cb(null, knownLength);
+ });
+};
+
+FormData.prototype.submit = function(params, cb) {
+ var request
+ , options
+ , defaults = {method: 'post'}
+ ;
+
+ // parse provided url if it's string
+ // or treat it as options object
+ if (typeof params == 'string') {
+
+ params = parseUrl(params);
+ options = populate({
+ port: params.port,
+ path: params.pathname,
+ host: params.hostname,
+ protocol: params.protocol
+ }, defaults);
+
+ // use custom params
+ } else {
+
+ options = populate(params, defaults);
+ // if no port provided use default one
+ if (!options.port) {
+ options.port = options.protocol == 'https:' ? 443 : 80;
+ }
+ }
+
+ // put that good code in getHeaders to some use
+ options.headers = this.getHeaders(params.headers);
+
+ // https if specified, fallback to http in any other case
+ if (options.protocol == 'https:') {
+ request = https.request(options);
+ } else {
+ request = http.request(options);
+ }
+
+ // get content length and fire away
+ this.getLength(function(err, length) {
+ if (err) {
+ this._error(err);
+ return;
+ }
+
+ // add content length
+ request.setHeader('Content-Length', length);
+
+ this.pipe(request);
+ if (cb) {
+ request.on('error', cb);
+ request.on('response', cb.bind(this, null));
+ }
+ }.bind(this));
+
+ return request;
+};
+
+FormData.prototype._error = function(err) {
+ if (!this.error) {
+ this.error = err;
+ this.pause();
+ this.emit('error', err);
+ }
+};
+
+FormData.prototype.toString = function () {
+ return '[object FormData]';
+};
diff --git a/node_modules/form-data/lib/populate.js b/node_modules/form-data/lib/populate.js
new file mode 100644
index 0000000..4d35738
--- /dev/null
+++ b/node_modules/form-data/lib/populate.js
@@ -0,0 +1,10 @@
+// populates missing values
+module.exports = function(dst, src) {
+
+ Object.keys(src).forEach(function(prop)
+ {
+ dst[prop] = dst[prop] || src[prop];
+ });
+
+ return dst;
+};
diff --git a/node_modules/form-data/package.json b/node_modules/form-data/package.json
new file mode 100644
index 0000000..adacbae
--- /dev/null
+++ b/node_modules/form-data/package.json
@@ -0,0 +1,65 @@
+{
+ "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
+ "name": "form-data",
+ "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
+ "version": "2.3.3",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/form-data/form-data.git"
+ },
+ "main": "./lib/form_data",
+ "browser": "./lib/browser",
+ "scripts": {
+ "pretest": "rimraf coverage test/tmp",
+ "test": "istanbul cover test/run.js",
+ "posttest": "istanbul report lcov text",
+ "lint": "eslint lib/*.js test/*.js test/integration/*.js",
+ "report": "istanbul report lcov text",
+ "ci-lint": "is-node-modern 6 && npm run lint || is-node-not-modern 6",
+ "ci-test": "npm run test && npm run browser && npm run report",
+ "predebug": "rimraf coverage test/tmp",
+ "debug": "verbose=1 ./test/run.js",
+ "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",
+ "check": "istanbul check-coverage coverage/coverage*.json",
+ "files": "pkgfiles --sort=name",
+ "get-version": "node -e \"console.log(require('./package.json').version)\"",
+ "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md",
+ "restore-readme": "mv README.md.bak README.md",
+ "prepublish": "in-publish && npm run update-readme || not-in-publish",
+ "postpublish": "npm run restore-readme"
+ },
+ "pre-commit": [
+ "lint",
+ "ci-test",
+ "check"
+ ],
+ "engines": {
+ "node": ">= 0.12"
+ },
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.6",
+ "mime-types": "^2.1.12"
+ },
+ "devDependencies": {
+ "browserify": "^13.1.1",
+ "browserify-istanbul": "^2.0.0",
+ "coveralls": "^2.11.14",
+ "cross-spawn": "^4.0.2",
+ "eslint": "^3.9.1",
+ "fake": "^0.2.2",
+ "far": "^0.0.7",
+ "formidable": "^1.0.17",
+ "in-publish": "^2.0.0",
+ "is-node-modern": "^1.0.0",
+ "istanbul": "^0.4.5",
+ "obake": "^0.1.2",
+ "phantomjs-prebuilt": "^2.1.13",
+ "pkgfiles": "^2.3.0",
+ "pre-commit": "^1.1.3",
+ "request": "2.76.0",
+ "rimraf": "^2.5.4",
+ "tape": "^4.6.2"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/form-data/yarn.lock b/node_modules/form-data/yarn.lock
new file mode 100644
index 0000000..ab55059
--- /dev/null
+++ b/node_modules/form-data/yarn.lock
@@ -0,0 +1,2662 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+JSONStream@^1.0.3:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea"
+ dependencies:
+ jsonparse "^1.2.0"
+ through ">=2.2.7 <3"
+
+abbrev@1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
+
+abbrev@1.0.x:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
+
+acorn-jsx@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
+ dependencies:
+ acorn "^3.0.4"
+
+acorn-node@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.3.0.tgz#5f86d73346743810ef1269b901dbcbded020861b"
+ dependencies:
+ acorn "^5.4.1"
+ xtend "^4.0.1"
+
+acorn@^3.0.4:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
+
+acorn@^4.0.3:
+ version "4.0.13"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
+
+acorn@^5.2.1, acorn@^5.4.0, acorn@^5.4.1:
+ version "5.4.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102"
+
+ajv-keywords@^1.0.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"
+
+ajv@^4.7.0:
+ version "4.11.8"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
+ dependencies:
+ co "^4.6.0"
+ json-stable-stringify "^1.0.1"
+
+ajv@^5.1.0:
+ version "5.5.2"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
+ dependencies:
+ co "^4.6.0"
+ fast-deep-equal "^1.0.0"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.3.0"
+
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
+amdefine@>=0.0.4:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+
+ansi-escapes@^1.1.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+
+argparse@^1.0.7:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
+ dependencies:
+ sprintf-js "~1.0.2"
+
+array-filter@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
+
+array-map@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
+
+array-reduce@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
+
+array-union@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
+ dependencies:
+ array-uniq "^1.0.1"
+
+array-uniq@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
+
+arrify@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+
+asn1.js@^4.0.0:
+ version "4.9.2"
+ resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.2.tgz#8117ef4f7ed87cd8f89044b5bff97ac243a16c9a"
+ dependencies:
+ bn.js "^4.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+asn1@~0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
+
+assert-plus@1.0.0, assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+
+assert-plus@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
+
+assert@^1.4.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91"
+ dependencies:
+ util "0.10.3"
+
+astw@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917"
+ dependencies:
+ acorn "^4.0.3"
+
+async@1.x, async@^1.4.0:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
+
+async@~0.1.22:
+ version "0.1.22"
+ resolved "https://registry.yarnpkg.com/async/-/async-0.1.22.tgz#0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061"
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+
+aws-sign2@~0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
+
+aws-sign2@~0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+
+aws4@^1.2.1, aws4@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"
+
+babel-code-frame@^6.16.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
+ dependencies:
+ chalk "^1.1.3"
+ esutils "^2.0.2"
+ js-tokens "^3.0.2"
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+
+base64-js@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886"
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d"
+ dependencies:
+ tweetnacl "^0.14.3"
+
+bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
+ version "4.11.8"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
+
+boom@2.x.x:
+ version "2.10.1"
+ resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
+ dependencies:
+ hoek "2.x.x"
+
+boom@4.x.x:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31"
+ dependencies:
+ hoek "4.x.x"
+
+boom@5.x.x:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02"
+ dependencies:
+ hoek "4.x.x"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+brorand@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
+
+browser-pack@^6.0.1:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.4.tgz#9a73beb3b48f9e36868be007b64400102c04a99f"
+ dependencies:
+ JSONStream "^1.0.3"
+ combine-source-map "~0.8.0"
+ defined "^1.0.0"
+ safe-buffer "^5.1.1"
+ through2 "^2.0.0"
+ umd "^3.0.0"
+
+browser-resolve@^1.11.0, browser-resolve@^1.7.0:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce"
+ dependencies:
+ resolve "1.1.7"
+
+browserify-aes@^1.0.0, browserify-aes@^1.0.4:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f"
+ dependencies:
+ buffer-xor "^1.0.3"
+ cipher-base "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.3"
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+browserify-cipher@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a"
+ dependencies:
+ browserify-aes "^1.0.4"
+ browserify-des "^1.0.0"
+ evp_bytestokey "^1.0.0"
+
+browserify-des@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd"
+ dependencies:
+ cipher-base "^1.0.1"
+ des.js "^1.0.0"
+ inherits "^2.0.1"
+
+browserify-istanbul@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/browserify-istanbul/-/browserify-istanbul-2.0.0.tgz#85a4b425da1f7c09e02ba32a3b44f6535d38c257"
+ dependencies:
+ minimatch "^3.0.0"
+ through "^2.3.8"
+
+browserify-rsa@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524"
+ dependencies:
+ bn.js "^4.1.0"
+ randombytes "^2.0.1"
+
+browserify-sign@^4.0.0:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298"
+ dependencies:
+ bn.js "^4.1.1"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.2"
+ elliptic "^6.0.0"
+ inherits "^2.0.1"
+ parse-asn1 "^5.0.0"
+
+browserify-zlib@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d"
+ dependencies:
+ pako "~0.2.0"
+
+browserify@^13.1.1:
+ version "13.3.0"
+ resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce"
+ dependencies:
+ JSONStream "^1.0.3"
+ assert "^1.4.0"
+ browser-pack "^6.0.1"
+ browser-resolve "^1.11.0"
+ browserify-zlib "~0.1.2"
+ buffer "^4.1.0"
+ cached-path-relative "^1.0.0"
+ concat-stream "~1.5.1"
+ console-browserify "^1.1.0"
+ constants-browserify "~1.0.0"
+ crypto-browserify "^3.0.0"
+ defined "^1.0.0"
+ deps-sort "^2.0.0"
+ domain-browser "~1.1.0"
+ duplexer2 "~0.1.2"
+ events "~1.1.0"
+ glob "^7.1.0"
+ has "^1.0.0"
+ htmlescape "^1.1.0"
+ https-browserify "~0.0.0"
+ inherits "~2.0.1"
+ insert-module-globals "^7.0.0"
+ labeled-stream-splicer "^2.0.0"
+ module-deps "^4.0.8"
+ os-browserify "~0.1.1"
+ parents "^1.0.1"
+ path-browserify "~0.0.0"
+ process "~0.11.0"
+ punycode "^1.3.2"
+ querystring-es3 "~0.2.0"
+ read-only-stream "^2.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.1.4"
+ shasum "^1.0.0"
+ shell-quote "^1.6.1"
+ stream-browserify "^2.0.0"
+ stream-http "^2.0.0"
+ string_decoder "~0.10.0"
+ subarg "^1.0.0"
+ syntax-error "^1.1.1"
+ through2 "^2.0.0"
+ timers-browserify "^1.0.1"
+ tty-browserify "~0.0.0"
+ url "~0.11.0"
+ util "~0.10.1"
+ vm-browserify "~0.0.1"
+ xtend "^4.0.0"
+
+buffer-xor@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
+
+buffer@^4.1.0:
+ version "4.9.1"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
+ dependencies:
+ base64-js "^1.0.2"
+ ieee754 "^1.1.4"
+ isarray "^1.0.0"
+
+builtin-status-codes@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
+
+cached-path-relative@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7"
+
+caller-path@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
+ dependencies:
+ callsites "^0.2.0"
+
+callsites@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+caseless@~0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
+
+caseless@~0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
+chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+circular-json@^0.3.1:
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
+
+cli-cursor@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
+ dependencies:
+ restore-cursor "^1.0.1"
+
+cli-width@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
+
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+clone@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f"
+
+co@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+
+columnify@^1.5.4:
+ version "1.5.4"
+ resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb"
+ dependencies:
+ strip-ansi "^3.0.0"
+ wcwidth "^1.0.0"
+
+combine-source-map@~0.7.1:
+ version "0.7.2"
+ resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e"
+ dependencies:
+ convert-source-map "~1.1.0"
+ inline-source-map "~0.6.0"
+ lodash.memoize "~3.0.3"
+ source-map "~0.5.3"
+
+combine-source-map@~0.8.0:
+ version "0.8.0"
+ resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b"
+ dependencies:
+ convert-source-map "~1.1.0"
+ inline-source-map "~0.6.0"
+ lodash.memoize "~3.0.3"
+ source-map "~0.5.3"
+
+combined-stream@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
+ dependencies:
+ delayed-stream "~1.0.0"
+
+combined-stream@^1.0.5, combined-stream@~1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
+ dependencies:
+ delayed-stream "~1.0.0"
+
+commander@^2.9.0:
+ version "2.14.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+concat-stream@1.6.0, concat-stream@^1.4.7, concat-stream@^1.4.8, concat-stream@^1.5.2:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7"
+ dependencies:
+ inherits "^2.0.3"
+ readable-stream "^2.2.2"
+ typedarray "^0.0.6"
+
+concat-stream@~1.5.0, concat-stream@~1.5.1:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266"
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "~2.0.0"
+ typedarray "~0.0.5"
+
+console-browserify@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
+ dependencies:
+ date-now "^0.1.4"
+
+constants-browserify@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
+
+convert-source-map@^1.0.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
+
+convert-source-map@~1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860"
+
+core-util-is@1.0.2, core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+
+coveralls@^2.11.14:
+ version "2.13.3"
+ resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7"
+ dependencies:
+ js-yaml "3.6.1"
+ lcov-parse "0.0.10"
+ log-driver "1.2.5"
+ minimist "1.2.0"
+ request "2.79.0"
+
+create-ecdh@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d"
+ dependencies:
+ bn.js "^4.1.0"
+ elliptic "^6.0.0"
+
+create-hash@^1.1.0, create-hash@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd"
+ dependencies:
+ cipher-base "^1.0.1"
+ inherits "^2.0.1"
+ ripemd160 "^2.0.0"
+ sha.js "^2.4.0"
+
+create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06"
+ dependencies:
+ cipher-base "^1.0.3"
+ create-hash "^1.1.0"
+ inherits "^2.0.1"
+ ripemd160 "^2.0.0"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+cross-spawn@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
+cross-spawn@^5.0.1:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
+ dependencies:
+ lru-cache "^4.0.1"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+cryptiles@2.x.x:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
+ dependencies:
+ boom "2.x.x"
+
+cryptiles@3.x.x:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe"
+ dependencies:
+ boom "5.x.x"
+
+crypto-browserify@^3.0.0:
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
+ dependencies:
+ browserify-cipher "^1.0.0"
+ browserify-sign "^4.0.0"
+ create-ecdh "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.0"
+ diffie-hellman "^5.0.0"
+ inherits "^2.0.1"
+ pbkdf2 "^3.0.3"
+ public-encrypt "^4.0.0"
+ randombytes "^2.0.0"
+ randomfill "^1.0.3"
+
+d@1:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"
+ dependencies:
+ es5-ext "^0.10.9"
+
+dashdash@^1.12.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+ dependencies:
+ assert-plus "^1.0.0"
+
+date-now@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
+
+debug@2.6.9, debug@^2.1.1:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ dependencies:
+ ms "2.0.0"
+
+decamelize@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+
+deep-equal@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
+
+deep-is@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+
+deeply@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/deeply/-/deeply-1.0.0.tgz#ed573160b5c91ff5138917bf701e5453b19f574b"
+
+defaults@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
+ dependencies:
+ clone "^1.0.2"
+
+define-properties@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
+ dependencies:
+ foreach "^2.0.5"
+ object-keys "^1.0.8"
+
+defined@^1.0.0, defined@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
+
+del@^2.0.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
+ dependencies:
+ globby "^5.0.0"
+ is-path-cwd "^1.0.0"
+ is-path-in-cwd "^1.0.0"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ rimraf "^2.2.8"
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+
+deps-sort@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5"
+ dependencies:
+ JSONStream "^1.0.3"
+ shasum "^1.0.0"
+ subarg "^1.0.0"
+ through2 "^2.0.0"
+
+des.js@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc"
+ dependencies:
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+detective@^4.0.0:
+ version "4.7.1"
+ resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e"
+ dependencies:
+ acorn "^5.2.1"
+ defined "^1.0.0"
+
+diffie-hellman@^5.0.0:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e"
+ dependencies:
+ bn.js "^4.1.0"
+ miller-rabin "^4.0.0"
+ randombytes "^2.0.0"
+
+doctrine@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
+ dependencies:
+ esutils "^2.0.2"
+
+domain-browser@~1.1.0:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
+
+du@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/du/-/du-0.1.0.tgz#f26e340a09c7bc5b6fd69af6dbadea60fa8c6f4d"
+ dependencies:
+ async "~0.1.22"
+
+duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
+ dependencies:
+ readable-stream "^2.0.2"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
+ dependencies:
+ jsbn "~0.1.0"
+
+elliptic@^6.0.0:
+ version "6.4.0"
+ resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df"
+ dependencies:
+ bn.js "^4.4.0"
+ brorand "^1.0.1"
+ hash.js "^1.0.0"
+ hmac-drbg "^1.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.0"
+
+envar@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/envar/-/envar-2.0.0.tgz#44f7cdafbf976b732b73ad1acb2e8808ecf8876e"
+ dependencies:
+ deeply "^1.0.0"
+ minimist "^1.2.0"
+
+es-abstract@^1.5.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
+ dependencies:
+ es-to-primitive "^1.1.1"
+ function-bind "^1.1.1"
+ has "^1.0.1"
+ is-callable "^1.1.3"
+ is-regex "^1.0.4"
+
+es-to-primitive@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
+ dependencies:
+ is-callable "^1.1.1"
+ is-date-object "^1.0.1"
+ is-symbol "^1.0.1"
+
+es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14:
+ version "0.10.38"
+ resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.38.tgz#fa7d40d65bbc9bb8a67e1d3f9cc656a00530eed3"
+ dependencies:
+ es6-iterator "~2.0.3"
+ es6-symbol "~3.1.1"
+
+es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
+ dependencies:
+ d "1"
+ es5-ext "^0.10.35"
+ es6-symbol "^3.1.1"
+
+es6-map@^0.1.3:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0"
+ dependencies:
+ d "1"
+ es5-ext "~0.10.14"
+ es6-iterator "~2.0.1"
+ es6-set "~0.1.5"
+ es6-symbol "~3.1.1"
+ event-emitter "~0.3.5"
+
+es6-promise@^4.0.3:
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
+
+es6-set@~0.1.5:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1"
+ dependencies:
+ d "1"
+ es5-ext "~0.10.14"
+ es6-iterator "~2.0.1"
+ es6-symbol "3.1.1"
+ event-emitter "~0.3.5"
+
+es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
+ dependencies:
+ d "1"
+ es5-ext "~0.10.14"
+
+es6-weak-map@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f"
+ dependencies:
+ d "1"
+ es5-ext "^0.10.14"
+ es6-iterator "^2.0.1"
+ es6-symbol "^3.1.1"
+
+escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+escodegen@1.8.x:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018"
+ dependencies:
+ esprima "^2.7.1"
+ estraverse "^1.9.1"
+ esutils "^2.0.2"
+ optionator "^0.8.1"
+ optionalDependencies:
+ source-map "~0.2.0"
+
+escope@^3.6.0:
+ version "3.6.0"
+ resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3"
+ dependencies:
+ es6-map "^0.1.3"
+ es6-weak-map "^2.0.1"
+ esrecurse "^4.1.0"
+ estraverse "^4.1.1"
+
+eslint@^3.9.1:
+ version "3.19.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc"
+ dependencies:
+ babel-code-frame "^6.16.0"
+ chalk "^1.1.3"
+ concat-stream "^1.5.2"
+ debug "^2.1.1"
+ doctrine "^2.0.0"
+ escope "^3.6.0"
+ espree "^3.4.0"
+ esquery "^1.0.0"
+ estraverse "^4.2.0"
+ esutils "^2.0.2"
+ file-entry-cache "^2.0.0"
+ glob "^7.0.3"
+ globals "^9.14.0"
+ ignore "^3.2.0"
+ imurmurhash "^0.1.4"
+ inquirer "^0.12.0"
+ is-my-json-valid "^2.10.0"
+ is-resolvable "^1.0.0"
+ js-yaml "^3.5.1"
+ json-stable-stringify "^1.0.0"
+ levn "^0.3.0"
+ lodash "^4.0.0"
+ mkdirp "^0.5.0"
+ natural-compare "^1.4.0"
+ optionator "^0.8.2"
+ path-is-inside "^1.0.1"
+ pluralize "^1.2.1"
+ progress "^1.1.8"
+ require-uncached "^1.0.2"
+ shelljs "^0.7.5"
+ strip-bom "^3.0.0"
+ strip-json-comments "~2.0.1"
+ table "^3.7.8"
+ text-table "~0.2.0"
+ user-home "^2.0.0"
+
+espree@^3.4.0:
+ version "3.5.3"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6"
+ dependencies:
+ acorn "^5.4.0"
+ acorn-jsx "^3.0.0"
+
+esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1:
+ version "2.7.3"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
+
+esprima@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
+
+esquery@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa"
+ dependencies:
+ estraverse "^4.0.0"
+
+esrecurse@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163"
+ dependencies:
+ estraverse "^4.1.0"
+ object-assign "^4.0.1"
+
+estraverse@^1.9.1:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
+
+estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
+
+esutils@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
+
+event-emitter@~0.3.5:
+ version "0.3.5"
+ resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39"
+ dependencies:
+ d "1"
+ es5-ext "~0.10.14"
+
+events@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
+
+evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02"
+ dependencies:
+ md5.js "^1.3.4"
+ safe-buffer "^5.1.1"
+
+exit-hook@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
+
+extend@~3.0.0, extend@~3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
+
+extract-zip@^1.6.5:
+ version "1.6.6"
+ resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.6.tgz#1290ede8d20d0872b429fd3f351ca128ec5ef85c"
+ dependencies:
+ concat-stream "1.6.0"
+ debug "2.6.9"
+ mkdirp "0.5.0"
+ yauzl "2.4.1"
+
+extsprintf@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
+
+extsprintf@^1.2.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
+
+fake@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/fake/-/fake-0.2.2.tgz#68fe672725ff0f5c89ba92c539b31111f122d1f3"
+
+far@^0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7"
+ dependencies:
+ oop "0.0.3"
+
+fast-deep-equal@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff"
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
+
+fast-levenshtein@~2.0.4:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
+
+fd-slicer@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65"
+ dependencies:
+ pend "~1.2.0"
+
+figures@^1.3.5:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
+ dependencies:
+ escape-string-regexp "^1.0.5"
+ object-assign "^4.1.0"
+
+file-entry-cache@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361"
+ dependencies:
+ flat-cache "^1.2.1"
+ object-assign "^4.0.1"
+
+flat-cache@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481"
+ dependencies:
+ circular-json "^0.3.1"
+ del "^2.0.2"
+ graceful-fs "^4.1.2"
+ write "^0.2.1"
+
+for-each@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.2.tgz#2c40450b9348e97f281322593ba96704b9abd4d4"
+ dependencies:
+ is-function "~1.0.0"
+
+foreach@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+
+form-data@~2.1.1:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.5"
+ mime-types "^2.1.12"
+
+form-data@~2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf"
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.5"
+ mime-types "^2.1.12"
+
+formidable@^1.0.17:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.1.1.tgz#96b8886f7c3c3508b932d6bd70c4d3a88f35f1a9"
+
+fs-extra@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^2.1.0"
+ klaw "^1.0.0"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+fstream-ignore@^1.0.0:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105"
+ dependencies:
+ fstream "^1.0.0"
+ inherits "2"
+ minimatch "^3.0.0"
+
+fstream-npm@^1.2.0:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/fstream-npm/-/fstream-npm-1.2.1.tgz#08c4a452f789dcbac4c89a4563c902b2c862fd5b"
+ dependencies:
+ fstream-ignore "^1.0.0"
+ inherits "2"
+
+fstream@^1.0.0:
+ version "1.0.11"
+ resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171"
+ dependencies:
+ graceful-fs "^4.1.2"
+ inherits "~2.0.0"
+ mkdirp ">=0.5 0"
+ rimraf "2"
+
+function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+
+generate-function@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74"
+
+generate-object-property@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0"
+ dependencies:
+ is-property "^1.0.0"
+
+getpass@^0.1.1:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
+ dependencies:
+ assert-plus "^1.0.0"
+
+ghostface@^1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/ghostface/-/ghostface-1.5.0.tgz#b93e7ab6560ec93b4509032fdd43a4bec93044fd"
+ dependencies:
+ chalk "^1.0.0"
+ concat-stream "^1.4.8"
+ convert-source-map "^1.0.0"
+ minimist "^1.1.1"
+ semver "^4.3.3"
+ source-map "^0.4.2"
+ which "^1.0.9"
+
+glob@^5.0.15:
+ version "5.0.15"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
+ dependencies:
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "2 || 3"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@~7.1.2:
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^9.14.0:
+ version "9.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+
+globby@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
+ dependencies:
+ array-union "^1.0.1"
+ arrify "^1.0.0"
+ glob "^7.0.3"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
+ version "4.1.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
+
+handlebars@^4.0.1:
+ version "4.0.11"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
+ dependencies:
+ async "^1.4.0"
+ optimist "^0.6.1"
+ source-map "^0.4.4"
+ optionalDependencies:
+ uglify-js "^2.6"
+
+har-schema@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
+
+har-validator@~2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d"
+ dependencies:
+ chalk "^1.1.1"
+ commander "^2.9.0"
+ is-my-json-valid "^2.12.4"
+ pinkie-promise "^2.0.0"
+
+har-validator@~5.0.3:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
+ dependencies:
+ ajv "^5.1.0"
+ har-schema "^2.0.0"
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+
+has@^1.0.0, has@^1.0.1, has@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
+ dependencies:
+ function-bind "^1.0.2"
+
+hash-base@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1"
+ dependencies:
+ inherits "^2.0.1"
+
+hash-base@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918"
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+hash.js@^1.0.0, hash.js@^1.0.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846"
+ dependencies:
+ inherits "^2.0.3"
+ minimalistic-assert "^1.0.0"
+
+hasha@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1"
+ dependencies:
+ is-stream "^1.0.1"
+ pinkie-promise "^2.0.0"
+
+hawk@~3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
+ dependencies:
+ boom "2.x.x"
+ cryptiles "2.x.x"
+ hoek "2.x.x"
+ sntp "1.x.x"
+
+hawk@~6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
+ dependencies:
+ boom "4.x.x"
+ cryptiles "3.x.x"
+ hoek "4.x.x"
+ sntp "2.x.x"
+
+hmac-drbg@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
+ dependencies:
+ hash.js "^1.0.3"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.1"
+
+hoek@2.x.x:
+ version "2.16.3"
+ resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
+
+hoek@4.x.x:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"
+
+htmlescape@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351"
+
+http-signature@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
+ dependencies:
+ assert-plus "^0.2.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+http-signature@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
+ dependencies:
+ assert-plus "^1.0.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+https-browserify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82"
+
+ieee754@^1.1.4:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
+
+ignore@^3.2.0:
+ version "3.3.7"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+
+in-publish@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51"
+
+indexof@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+
+inherits@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
+
+inline-source-map@~0.6.0:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5"
+ dependencies:
+ source-map "~0.5.3"
+
+inquirer@^0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e"
+ dependencies:
+ ansi-escapes "^1.1.0"
+ ansi-regex "^2.0.0"
+ chalk "^1.0.0"
+ cli-cursor "^1.0.1"
+ cli-width "^2.0.0"
+ figures "^1.3.5"
+ lodash "^4.3.0"
+ readline2 "^1.0.1"
+ run-async "^0.1.0"
+ rx-lite "^3.1.2"
+ string-width "^1.0.1"
+ strip-ansi "^3.0.0"
+ through "^2.3.6"
+
+insert-module-globals@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3"
+ dependencies:
+ JSONStream "^1.0.3"
+ combine-source-map "~0.7.1"
+ concat-stream "~1.5.1"
+ is-buffer "^1.1.0"
+ lexical-scope "^1.2.0"
+ process "~0.11.0"
+ through2 "^2.0.0"
+ xtend "^4.0.0"
+
+interpret@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
+
+is-buffer@^1.1.0, is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+
+is-callable@^1.1.1, is-callable@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
+
+is-date-object@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+
+is-function@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5"
+
+is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4:
+ version "2.17.1"
+ resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz#3da98914a70a22f0a8563ef1511a246c6fc55471"
+ dependencies:
+ generate-function "^2.0.0"
+ generate-object-property "^1.1.0"
+ jsonpointer "^4.0.0"
+ xtend "^4.0.0"
+
+is-node-modern@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-node-modern/-/is-node-modern-1.0.0.tgz#cfe2607be7403b05b28a566f66cbf8a583d4fc63"
+
+is-path-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
+
+is-path-in-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc"
+ dependencies:
+ is-path-inside "^1.0.0"
+
+is-path-inside@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
+ dependencies:
+ path-is-inside "^1.0.1"
+
+is-property@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
+
+is-regex@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
+ dependencies:
+ has "^1.0.1"
+
+is-resolvable@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
+
+is-stream@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+
+is-symbol@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+
+isarray@^1.0.0, isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+
+isarray@~0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+
+istanbul@^0.4.5:
+ version "0.4.5"
+ resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"
+ dependencies:
+ abbrev "1.0.x"
+ async "1.x"
+ escodegen "1.8.x"
+ esprima "2.7.x"
+ glob "^5.0.15"
+ handlebars "^4.0.1"
+ js-yaml "3.x"
+ mkdirp "0.5.x"
+ nopt "3.x"
+ once "1.x"
+ resolve "1.1.x"
+ supports-color "^3.1.0"
+ which "^1.1.1"
+ wordwrap "^1.0.0"
+
+js-tokens@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+
+js-yaml@3.6.1:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^2.6.0"
+
+js-yaml@3.x, js-yaml@^3.5.1:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsbn@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+
+json-schema-traverse@^0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+
+json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
+ dependencies:
+ jsonify "~0.0.0"
+
+json-stable-stringify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45"
+ dependencies:
+ jsonify "~0.0.0"
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+
+jsonfile@^2.1.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+jsonify@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
+
+jsonparse@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
+
+jsonpointer@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9"
+
+jsprim@^1.2.2:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
+ dependencies:
+ assert-plus "1.0.0"
+ extsprintf "1.3.0"
+ json-schema "0.2.3"
+ verror "1.10.0"
+
+kew@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b"
+
+kind-of@^3.0.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ dependencies:
+ is-buffer "^1.1.5"
+
+klaw@^1.0.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
+ optionalDependencies:
+ graceful-fs "^4.1.9"
+
+labeled-stream-splicer@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59"
+ dependencies:
+ inherits "^2.0.1"
+ isarray "~0.0.1"
+ stream-splicer "^2.0.0"
+
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+lcov-parse@0.0.10:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
+
+levn@^0.3.0, levn@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
+ dependencies:
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+
+lexical-scope@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4"
+ dependencies:
+ astw "^2.0.0"
+
+lodash.memoize@~3.0.3:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f"
+
+lodash@^4.0.0, lodash@^4.3.0:
+ version "4.17.5"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
+
+log-driver@1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056"
+
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+lru-cache@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
+ dependencies:
+ pseudomap "^1.0.2"
+ yallist "^2.1.2"
+
+map-limit@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/map-limit/-/map-limit-0.0.1.tgz#eb7961031c0f0e8d001bf2d56fab685d58822f38"
+ dependencies:
+ once "~1.3.0"
+
+md5.js@^1.3.4:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d"
+ dependencies:
+ hash-base "^3.0.0"
+ inherits "^2.0.1"
+
+miller-rabin@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
+ dependencies:
+ bn.js "^4.0.0"
+ brorand "^1.0.1"
+
+mime-db@~1.30.0:
+ version "1.30.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01"
+
+mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7:
+ version "2.1.17"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a"
+ dependencies:
+ mime-db "~1.30.0"
+
+minimalistic-assert@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3"
+
+minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
+
+"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+
+minimist@~0.0.1:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
+
+mkdirp@0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12"
+ dependencies:
+ minimist "0.0.8"
+
+mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ dependencies:
+ minimist "0.0.8"
+
+module-deps@^4.0.8:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd"
+ dependencies:
+ JSONStream "^1.0.3"
+ browser-resolve "^1.7.0"
+ cached-path-relative "^1.0.0"
+ concat-stream "~1.5.0"
+ defined "^1.0.0"
+ detective "^4.0.0"
+ duplexer2 "^0.1.2"
+ inherits "^2.0.1"
+ parents "^1.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.1.3"
+ stream-combiner2 "^1.1.1"
+ subarg "^1.0.0"
+ through2 "^2.0.0"
+ xtend "^4.0.0"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+
+mute-stream@0.0.5:
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0"
+
+natural-compare@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+
+node-uuid@~1.4.7:
+ version "1.4.8"
+ resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907"
+
+nopt@3.x:
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
+ dependencies:
+ abbrev "1"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+
+oauth-sign@~0.8.1, oauth-sign@~0.8.2:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
+
+obake@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/obake/-/obake-0.1.2.tgz#64a477c9ddfbbccc18cff3a750924974d22c29d3"
+ dependencies:
+ envar "^2.0.0"
+ ghostface "^1.5.0"
+
+object-assign@^4.0.1, object-assign@^4.1.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+
+object-inspect@~1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.3.0.tgz#5b1eb8e6742e2ee83342a637034d844928ba2f6d"
+
+object-keys@^1.0.8:
+ version "1.0.11"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
+
+once@1.x, once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ dependencies:
+ wrappy "1"
+
+once@~1.3.0:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
+ dependencies:
+ wrappy "1"
+
+onetime@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
+
+oop@0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401"
+
+optimist@^0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
+ dependencies:
+ minimist "~0.0.1"
+ wordwrap "~0.0.2"
+
+optionator@^0.8.1, optionator@^0.8.2:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
+ dependencies:
+ deep-is "~0.1.3"
+ fast-levenshtein "~2.0.4"
+ levn "~0.3.0"
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+ wordwrap "~1.0.0"
+
+os-browserify@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54"
+
+os-homedir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+
+os-shim@^0.1.2:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917"
+
+pako@~0.2.0:
+ version "0.2.9"
+ resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
+
+parents@^1.0.0, parents@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751"
+ dependencies:
+ path-platform "~0.11.15"
+
+parse-asn1@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712"
+ dependencies:
+ asn1.js "^4.0.0"
+ browserify-aes "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.0"
+ pbkdf2 "^3.0.3"
+
+path-browserify@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+path-is-inside@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+
+path-parse@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
+
+path-platform@~0.11.15:
+ version "0.11.15"
+ resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2"
+
+pbkdf2@^3.0.3:
+ version "3.0.14"
+ resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade"
+ dependencies:
+ create-hash "^1.1.2"
+ create-hmac "^1.1.4"
+ ripemd160 "^2.0.1"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+pend@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
+
+performance-now@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+
+phantomjs-prebuilt@^2.1.13:
+ version "2.1.16"
+ resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef"
+ dependencies:
+ es6-promise "^4.0.3"
+ extract-zip "^1.6.5"
+ fs-extra "^1.0.0"
+ hasha "^2.2.0"
+ kew "^0.7.0"
+ progress "^1.1.8"
+ request "^2.81.0"
+ request-progress "^2.0.1"
+ which "^1.2.10"
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+
+pkgfiles@^2.3.0:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/pkgfiles/-/pkgfiles-2.3.2.tgz#1b54a7a8dbe32caa84b0955f44917e1500d33d05"
+ dependencies:
+ columnify "^1.5.4"
+ du "^0.1.0"
+ fstream-npm "^1.2.0"
+ map-limit "0.0.1"
+ minimist "^1.2.0"
+ pkgresolve "^1.1.4"
+ pretty-bytes "^4.0.2"
+
+pkgresolve@^1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/pkgresolve/-/pkgresolve-1.1.4.tgz#0fa499ca366888c31e97357446c6053025ae47b6"
+ dependencies:
+ minimist "~1.2.0"
+
+pluralize@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45"
+
+pre-commit@^1.1.3:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6"
+ dependencies:
+ cross-spawn "^5.0.1"
+ spawn-sync "^1.0.15"
+ which "1.2.x"
+
+prelude-ls@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
+
+pretty-bytes@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
+
+process-nextick-args@~1.0.6:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
+
+process-nextick-args@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
+
+process@~0.11.0:
+ version "0.11.10"
+ resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+
+progress@^1.1.8:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
+
+pseudomap@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+
+public-encrypt@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6"
+ dependencies:
+ bn.js "^4.1.0"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ parse-asn1 "^5.0.0"
+ randombytes "^2.0.1"
+
+punycode@1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
+
+punycode@^1.3.2, punycode@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+
+qs@~6.3.0:
+ version "6.3.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
+
+qs@~6.5.1:
+ version "6.5.1"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
+
+querystring-es3@~0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
+
+querystring@0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
+
+randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80"
+ dependencies:
+ safe-buffer "^5.1.0"
+
+randomfill@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.3.tgz#b96b7df587f01dd91726c418f30553b1418e3d62"
+ dependencies:
+ randombytes "^2.0.5"
+ safe-buffer "^5.1.0"
+
+read-only-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0"
+ dependencies:
+ readable-stream "^2.0.2"
+
+readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3:
+ version "2.3.4"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.0.3"
+ util-deprecate "~1.0.1"
+
+readable-stream@~2.0.0:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ string_decoder "~0.10.x"
+ util-deprecate "~1.0.1"
+
+readline2@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35"
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ mute-stream "0.0.5"
+
+rechoir@^0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
+ dependencies:
+ resolve "^1.1.6"
+
+repeat-string@^1.5.2:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+
+request-progress@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08"
+ dependencies:
+ throttleit "^1.0.0"
+
+request@2.76.0:
+ version "2.76.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.76.0.tgz#be44505afef70360a0436955106be3945d95560e"
+ dependencies:
+ aws-sign2 "~0.6.0"
+ aws4 "^1.2.1"
+ caseless "~0.11.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.0"
+ forever-agent "~0.6.1"
+ form-data "~2.1.1"
+ har-validator "~2.0.6"
+ hawk "~3.1.3"
+ http-signature "~1.1.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.7"
+ node-uuid "~1.4.7"
+ oauth-sign "~0.8.1"
+ qs "~6.3.0"
+ stringstream "~0.0.4"
+ tough-cookie "~2.3.0"
+ tunnel-agent "~0.4.1"
+
+request@2.79.0:
+ version "2.79.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
+ dependencies:
+ aws-sign2 "~0.6.0"
+ aws4 "^1.2.1"
+ caseless "~0.11.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.0"
+ forever-agent "~0.6.1"
+ form-data "~2.1.1"
+ har-validator "~2.0.6"
+ hawk "~3.1.3"
+ http-signature "~1.1.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.7"
+ oauth-sign "~0.8.1"
+ qs "~6.3.0"
+ stringstream "~0.0.4"
+ tough-cookie "~2.3.0"
+ tunnel-agent "~0.4.1"
+ uuid "^3.0.0"
+
+request@^2.81.0:
+ version "2.83.0"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356"
+ dependencies:
+ aws-sign2 "~0.7.0"
+ aws4 "^1.6.0"
+ caseless "~0.12.0"
+ combined-stream "~1.0.5"
+ extend "~3.0.1"
+ forever-agent "~0.6.1"
+ form-data "~2.3.1"
+ har-validator "~5.0.3"
+ hawk "~6.0.2"
+ http-signature "~1.2.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.17"
+ oauth-sign "~0.8.2"
+ performance-now "^2.1.0"
+ qs "~6.5.1"
+ safe-buffer "^5.1.1"
+ stringstream "~0.0.5"
+ tough-cookie "~2.3.3"
+ tunnel-agent "^0.6.0"
+ uuid "^3.1.0"
+
+require-uncached@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
+ dependencies:
+ caller-path "^0.1.0"
+ resolve-from "^1.0.0"
+
+resolve-from@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
+
+resolve@1.1.7, resolve@1.1.x:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
+
+resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
+ dependencies:
+ path-parse "^1.0.5"
+
+resolve@~1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
+ dependencies:
+ path-parse "^1.0.5"
+
+restore-cursor@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
+ dependencies:
+ exit-hook "^1.0.0"
+ onetime "^1.0.0"
+
+resumer@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759"
+ dependencies:
+ through "~2.3.4"
+
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ dependencies:
+ align-text "^0.1.1"
+
+rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4:
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
+ dependencies:
+ glob "^7.0.5"
+
+ripemd160@^2.0.0, ripemd160@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7"
+ dependencies:
+ hash-base "^2.0.0"
+ inherits "^2.0.1"
+
+run-async@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389"
+ dependencies:
+ once "^1.3.0"
+
+rx-lite@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"
+
+safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
+
+semver@^4.3.3:
+ version "4.3.6"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
+
+sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4:
+ version "2.4.10"
+ resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.10.tgz#b1fde5cd7d11a5626638a07c604ab909cfa31f9b"
+ dependencies:
+ inherits "^2.0.1"
+ safe-buffer "^5.0.1"
+
+shasum@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f"
+ dependencies:
+ json-stable-stringify "~0.0.0"
+ sha.js "~2.4.4"
+
+shebang-command@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+ dependencies:
+ shebang-regex "^1.0.0"
+
+shebang-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+
+shell-quote@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
+ dependencies:
+ array-filter "~0.0.0"
+ array-map "~0.0.0"
+ array-reduce "~0.0.0"
+ jsonify "~0.0.0"
+
+shelljs@^0.7.5:
+ version "0.7.8"
+ resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
+ dependencies:
+ glob "^7.0.0"
+ interpret "^1.0.0"
+ rechoir "^0.6.2"
+
+slice-ansi@0.0.4:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
+
+sntp@1.x.x:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
+ dependencies:
+ hoek "2.x.x"
+
+sntp@2.x.x:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
+ dependencies:
+ hoek "4.x.x"
+
+source-map@^0.4.2, source-map@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@~0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@~0.5.1, source-map@~0.5.3:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+
+spawn-sync@^1.0.15:
+ version "1.0.15"
+ resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476"
+ dependencies:
+ concat-stream "^1.4.7"
+ os-shim "^0.1.2"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+
+sshpk@^1.7.0:
+ version "1.13.1"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ dashdash "^1.12.0"
+ getpass "^0.1.1"
+ optionalDependencies:
+ bcrypt-pbkdf "^1.0.0"
+ ecc-jsbn "~0.1.1"
+ jsbn "~0.1.0"
+ tweetnacl "~0.14.0"
+
+stream-browserify@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db"
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "^2.0.2"
+
+stream-combiner2@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
+ dependencies:
+ duplexer2 "~0.1.0"
+ readable-stream "^2.0.2"
+
+stream-http@^2.0.0:
+ version "2.8.0"
+ resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10"
+ dependencies:
+ builtin-status-codes "^3.0.0"
+ inherits "^2.0.1"
+ readable-stream "^2.3.3"
+ to-arraybuffer "^1.0.0"
+ xtend "^4.0.0"
+
+stream-splicer@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83"
+ dependencies:
+ inherits "^2.0.1"
+ readable-stream "^2.0.2"
+
+string-width@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+string-width@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+string.prototype.trim@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea"
+ dependencies:
+ define-properties "^1.1.2"
+ es-abstract "^1.5.0"
+ function-bind "^1.0.2"
+
+string_decoder@~0.10.0, string_decoder@~0.10.x:
+ version "0.10.31"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
+
+string_decoder@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
+ dependencies:
+ safe-buffer "~5.1.0"
+
+stringstream@~0.0.4, stringstream@~0.0.5:
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
+
+strip-ansi@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+
+strip-json-comments@~2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+
+subarg@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
+ dependencies:
+ minimist "^1.1.0"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+
+supports-color@^3.1.0:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
+ dependencies:
+ has-flag "^1.0.0"
+
+syntax-error@^1.1.1:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c"
+ dependencies:
+ acorn-node "^1.2.0"
+
+table@^3.7.8:
+ version "3.8.3"
+ resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f"
+ dependencies:
+ ajv "^4.7.0"
+ ajv-keywords "^1.0.0"
+ chalk "^1.1.1"
+ lodash "^4.0.0"
+ slice-ansi "0.0.4"
+ string-width "^2.0.0"
+
+tape@^4.6.2:
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/tape/-/tape-4.8.0.tgz#f6a9fec41cc50a1de50fa33603ab580991f6068e"
+ dependencies:
+ deep-equal "~1.0.1"
+ defined "~1.0.0"
+ for-each "~0.3.2"
+ function-bind "~1.1.0"
+ glob "~7.1.2"
+ has "~1.0.1"
+ inherits "~2.0.3"
+ minimist "~1.2.0"
+ object-inspect "~1.3.0"
+ resolve "~1.4.0"
+ resumer "~0.0.0"
+ string.prototype.trim "~1.1.2"
+ through "~2.3.8"
+
+text-table@~0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
+
+throttleit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c"
+
+through2@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
+ dependencies:
+ readable-stream "^2.1.5"
+ xtend "~4.0.1"
+
+"through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.8:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+
+timers-browserify@^1.0.1:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d"
+ dependencies:
+ process "~0.11.0"
+
+to-arraybuffer@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
+
+tough-cookie@~2.3.0, tough-cookie@~2.3.3:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561"
+ dependencies:
+ punycode "^1.4.1"
+
+tty-browserify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811"
+
+tunnel-agent@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
+ dependencies:
+ safe-buffer "^5.0.1"
+
+tunnel-agent@~0.4.1:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.5"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+
+type-check@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
+ dependencies:
+ prelude-ls "~1.1.2"
+
+typedarray@^0.0.6, typedarray@~0.0.5:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+
+uglify-js@^2.6:
+ version "2.8.29"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+ dependencies:
+ source-map "~0.5.1"
+ yargs "~3.10.0"
+ optionalDependencies:
+ uglify-to-browserify "~1.0.0"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+
+umd@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e"
+
+url@~0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
+ dependencies:
+ punycode "1.3.2"
+ querystring "0.2.0"
+
+user-home@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f"
+ dependencies:
+ os-homedir "^1.0.0"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+
+util@0.10.3, util@~0.10.1:
+ version "0.10.3"
+ resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
+ dependencies:
+ inherits "2.0.1"
+
+uuid@^3.0.0, uuid@^3.1.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
+
+verror@1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
+ dependencies:
+ assert-plus "^1.0.0"
+ core-util-is "1.0.2"
+ extsprintf "^1.2.0"
+
+vm-browserify@~0.0.1:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
+ dependencies:
+ indexof "0.0.1"
+
+wcwidth@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
+ dependencies:
+ defaults "^1.0.3"
+
+which@1.2.x:
+ version "1.2.14"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
+ dependencies:
+ isexe "^2.0.0"
+
+which@^1.0.9, which@^1.1.1, which@^1.2.10, which@^1.2.9:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
+ dependencies:
+ isexe "^2.0.0"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
+wordwrap@^1.0.0, wordwrap@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
+
+wordwrap@~0.0.2:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+
+write@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
+ dependencies:
+ mkdirp "^0.5.1"
+
+xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
+
+yallist@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
+yauzl@2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"
+ dependencies:
+ fd-slicer "~1.0.1"
diff --git a/node_modules/fs-extra/CHANGELOG.md b/node_modules/fs-extra/CHANGELOG.md
new file mode 100644
index 0000000..29a37b5
--- /dev/null
+++ b/node_modules/fs-extra/CHANGELOG.md
@@ -0,0 +1,796 @@
+4.0.3 / 2017-12-05
+------------------
+
+- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501)
+- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520)
+
+4.0.2 / 2017-09-12
+------------------
+
+- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4)
+- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+
+- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485)
+
+4.0.1 / 2017-07-31
+------------------
+
+### Fixed
+
+- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470)
+
+4.0.0 / 2017-07-14
+------------------
+
+### Changed
+
+- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449)
+- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458)
+- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459)
+
+### Fixed
+
+- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428)
+
+Also clarified the docs in a few places.
+
+3.0.1 / 2017-05-04
+------------------
+
+- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415)
+
+3.0.0 / 2017-04-27
+------------------
+
+### Added
+
+- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403)
+- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406)
+
+### Removed
+
+- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+
+### Changed
+
+- Upgraded jsonfile dependency to v3.0.0:
+ - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`.
+- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402)
+- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394)
+
+### Fixed
+
+- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408)
+
+2.1.2 / 2017-03-16
+------------------
+
+### Fixed
+
+- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393)
+
+2.1.1 / 2017-03-15
+------------------
+
+### Fixed
+
+- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`.
+- Remove `Buffer.alloc()` usage in `moveSync()`.
+
+2.1.0 / 2017-03-15
+------------------
+
+Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release!
+
+### Added
+- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou))
+- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou))
+
+### Changed
+- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou))
+- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264)
+- Refactored docs. ([@manidlou](https://github.com/manidlou))
+
+### Fixed
+
+- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton))
+
+2.0.0 / 2017-01-16
+------------------
+
+### Removed
+- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it
+on Jan 1st, 2017.
+- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little
+over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just
+an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339]
+
+### Changed
+- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333]
+- Moved docs, to `docs/`. [#340]
+
+### Fixed
+- Apply filters to directories in `copySync()` like in `copy()`. [#324]
+- A specific condition when disk is under heavy use, `copy()` can fail. [#326]
+
+
+1.0.0 / 2016-11-01
+------------------
+
+After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes
+to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release!
+
+### Added
+- `walkSync()`
+
+### Changed
+- **BREAKING**: dropped Node v0.10 support.
+- disabled `rimaf` globbing, wasn't used. [#280]
+- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function.
+- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300]
+
+### Fixed
+- bug fix proper closing of file handle on `utimesMillis()` [#271]
+- proper escaping of files with dollar signs [#291]
+- `copySync()` failed if user didn't own file. [#199], [#301]
+
+
+0.30.0 / 2016-04-28
+-------------------
+- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**.
+
+0.29.0 / 2016-04-27
+-------------------
+- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well.
+
+0.28.0 / 2016-04-17
+-------------------
+- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192]
+- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237]
+- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93]
+
+0.27.0 / 2016-04-15
+-------------------
+- add `dereference` option to `copySync()`. [#235][#235]
+
+0.26.7 / 2016-03-16
+-------------------
+- fixed `copy()` if source and dest are the same. [#230][#230]
+
+0.26.6 / 2016-03-15
+-------------------
+- fixed if `emptyDir()` does not have a callback: [#229][#229]
+
+0.26.5 / 2016-01-27
+-------------------
+- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215]
+
+0.26.4 / 2016-01-05
+-------------------
+- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208]
+
+0.26.3 / 2015-12-17
+-------------------
+- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193]
+
+0.26.2 / 2015-11-02
+-------------------
+- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces`
+
+0.26.1 / 2015-11-02
+-------------------
+- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190]
+
+0.26.0 / 2015-10-25
+-------------------
+- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw).
+
+0.25.0 / 2015-10-24
+-------------------
+- now has a file walker `walk()`
+
+0.24.0 / 2015-08-28
+-------------------
+- removed alias `delete()` and `deleteSync()`. See: [#171][#171]
+
+0.23.1 / 2015-08-07
+-------------------
+- Better handling of errors for `move()` when moving across devices. [#170][#170]
+- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169]
+
+0.23.0 / 2015-08-06
+-------------------
+- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165]
+
+0.22.1 / 2015-07-09
+-------------------
+- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149].
+Fixes regression that was introduced in `0.21.0`.
+
+0.22.0 / 2015-07-09
+-------------------
+- preserve permissions / ownership in `copy()`. See: [#54][#54]
+
+0.21.0 / 2015-07-04
+-------------------
+- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141]
+- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks)
+
+0.20.1 / 2015-06-23
+-------------------
+- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26
+
+0.20.0 / 2015-06-19
+-------------------
+- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g.
+this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`.
+- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code.
+- started moving tests inline
+- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()`
+
+0.19.0 / 2015-06-08
+-------------------
+- `fs.copy()` had support for Node v0.8, dropped support
+
+0.18.4 / 2015-05-22
+-------------------
+- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0
+
+0.18.3 / 2015-05-08
+-------------------
+- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134]
+
+0.18.2 / 2015-04-17
+-------------------
+- bugfix: allow `F_OK` ([#120][#120])
+
+0.18.1 / 2015-04-15
+-------------------
+- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b
+- fixed a lot of tests for Windows (appveyor)
+
+0.18.0 / 2015-03-31
+-------------------
+- added `emptyDir()` and `emptyDirSync()`
+
+0.17.0 / 2015-03-28
+-------------------
+- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists).
+**Only works with files at the moment.**
+- `createOutputStream()` added. See: [#118][#118]
+
+0.16.5 / 2015-03-08
+-------------------
+- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114]
+
+0.16.4 / 2015-03-01
+-------------------
+- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66
+
+0.16.3 / 2015-01-28
+-------------------
+- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9
+
+
+0.16.2 / 2015-01-28
+-------------------
+- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future)
+
+0.16.1 / 2015-01-28
+-------------------
+- if `setImmediate` is not available, fall back to `process.nextTick`
+
+0.16.0 / 2015-01-28
+-------------------
+- bugfix `fs.move()` into itself. Closes [#104]
+- bugfix `fs.move()` moving directory across device. Closes [#108]
+- added coveralls support
+- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98]
+- misc fs.copy code cleanups
+
+0.15.0 / 2015-01-21
+-------------------
+- dropped `ncp`, imported code in
+- because of previous, now supports `io.js`
+- `graceful-fs` is now a dependency
+
+0.14.0 / 2015-01-05
+-------------------
+- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100]
+- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests)
+
+0.13.0 / 2014-12-10
+-------------------
+- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch)
+- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"`
+- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59])
+
+0.12.0 / 2014-09-22
+-------------------
+- copy symlinks in `copySync()` [#85][#85]
+
+0.11.1 / 2014-09-02
+-------------------
+- bugfix `copySync()` preserve file permissions [#80][#80]
+
+0.11.0 / 2014-08-11
+-------------------
+- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"`
+- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()`
+see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details.
+
+0.10.0 / 2014-06-29
+------------------
+* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change
+from `~` to `^`. [#67]
+
+0.9.1 / 2014-05-22
+------------------
+* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there
+
+0.9.0 / 2014-05-22
+------------------
+* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58]
+* upgraded `rimraf` from `~2.2.6` to `^2.2.8`
+* upgraded `mkdirp` from `0.3.x` to `^0.5.0`
+* added methods `ensureFile()`, `ensureFileSync()`
+* added methods `ensureDir()`, `ensureDirSync()` [#31]
+* added `move()` method. From: https://github.com/andrewrk/node-mv
+
+
+0.8.1 / 2013-10-24
+------------------
+* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39])
+
+0.8.0 / 2013-10-14
+------------------
+* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36])
+
+0.7.1 / 2013-10-12
+------------------
+* `copySync()` implemented (Srirangan / [#33])
+* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32]
+
+0.7.0 / 2013-10-07
+------------------
+* update readme conventions
+* `copy()` now works if destination directory does not exist. Closes [#29]
+
+0.6.4 / 2013-09-05
+------------------
+* changed `homepage` field in package.json to remove NPM warning
+
+0.6.3 / 2013-06-28
+------------------
+* changed JSON spacing default from `4` to `2` to follow Node conventions
+* updated `jsonfile` dep
+* updated `rimraf` dep
+
+0.6.2 / 2013-06-28
+------------------
+* added .npmignore, [#25]
+
+0.6.1 / 2013-05-14
+------------------
+* modified for `strict` mode, closes [#24]
+* added `outputJson()/outputJsonSync()`, closes [#23]
+
+0.6.0 / 2013-03-18
+------------------
+* removed node 0.6 support
+* added node 0.10 support
+* upgraded to latest `ncp` and `rimraf`.
+* optional `graceful-fs` support. Closes [#17]
+
+
+0.5.0 / 2013-02-03
+------------------
+* Removed `readTextFile`.
+* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write.
+* Restructured documentation a bit. Added roadmap.
+
+0.4.0 / 2013-01-28
+------------------
+* Set default spaces in `jsonfile` from 4 to 2.
+* Updated `testutil` deps for tests.
+* Renamed `touch()` to `createFile()`
+* Added `outputFile()` and `outputFileSync()`
+* Changed creation of testing diretories so the /tmp dir is not littered.
+* Added `readTextFile()` and `readTextFileSync()`.
+
+0.3.2 / 2012-11-01
+------------------
+* Added `touch()` and `touchSync()` methods.
+
+0.3.1 / 2012-10-11
+------------------
+* Fixed some stray globals.
+
+0.3.0 / 2012-10-09
+------------------
+* Removed all CoffeeScript from tests.
+* Renamed `mkdir` to `mkdirs`/`mkdirp`.
+
+0.2.1 / 2012-09-11
+------------------
+* Updated `rimraf` dep.
+
+0.2.0 / 2012-09-10
+------------------
+* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript)
+* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile)
+* Added Travis-CI.
+
+0.1.3 / 2012-08-13
+------------------
+* Added method `readJSONFile`.
+
+0.1.2 / 2012-06-15
+------------------
+* Bug fix: `deleteSync()` didn't exist.
+* Verified Node v0.8 compatibility.
+
+0.1.1 / 2012-06-15
+------------------
+* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed.
+
+0.1.0 / 2012-05-31
+------------------
+* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too.
+* Renamed `rmrf()` to `remove()`.
+* `remove()` aliased with `delete()`.
+* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`.
+* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead.
+
+0.0.4 / 2012-03-14
+------------------
+* Removed CoffeeScript dependency
+
+0.0.3 / 2012-01-11
+------------------
+* Added methods rmrf and rmrfSync
+* Moved tests from Jasmine to Mocha
+
+
+[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year"
+[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme"
+[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move"
+[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]"
+[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]"
+[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]"
+[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]"
+[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value"
+[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]"
+[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]"
+[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]"
+[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]"
+[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support"
+[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]"
+[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]"
+[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]"
+[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]"
+[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]"
+[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]"
+[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]"
+[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]"
+[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?"
+[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative"
+[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]"
+[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink "
+[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists"
+[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]"
+[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms"
+[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]"
+[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug."
+[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]"
+[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters."
+[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]"
+[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]"
+[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]"
+[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]"
+[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link"
+[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage"
+[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error"
+[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls"
+[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]"
+[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]"
+[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated"
+[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]"
+[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]"
+[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]"
+[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]"
+[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node"
+[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]"
+[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]"
+[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]"
+[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs"
+[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]"
+[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying"
+[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]"
+[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error"
+[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]"
+[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function"
+[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390"
+[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not"
+[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()"
+[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()"
+[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?"
+[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing"
+[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]"
+[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership"
+[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options"
+[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]"
+[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API"
+[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]"
+[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`"
+[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]"
+[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error"
+[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]"
+[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]"
+[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111"
+[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!"
+[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra"
+[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?"
+[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]"
+[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]"
+[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()"
+[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined"
+[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require"
+[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty"
+[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp"
+[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails"
+[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme "
+[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version"
+[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method"
+[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists"
+[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission"
+[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you"
+[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)"
+[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers"
+[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy"
+[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package"
+[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file"
+[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]"
+[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories"
+[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?"
+[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]"
+[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream"
+[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request"
+[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]"
+[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread."
+[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..."
+[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo"
+[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)"
+[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci"
+[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]"
+[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. "
+[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML"
+[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test"
+[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir"
+[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out"
+[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]"
+[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory"
+[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink"
+[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error"
+[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync"
+[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function"
+[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md"
+[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods."
+[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example"
+[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug"
+[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug"
+[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug"
+[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]"
+[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag"
+[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo"
+[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE"
+[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files"
+[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]"
+[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]"
+[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]"
+[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions"
+[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync"
+[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]"
+[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files"
+[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]"
+[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?"
+[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]"
+[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync"
+[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]"
+[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]"
+[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]"
+[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]"
+[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?"
+[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file"
+[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]"
+[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()"
+[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]"
+[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true"
+[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows"
+[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform"
+[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]"
+[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]"
+[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x"
+[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra"
+[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]"
+[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified"
+[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]"
+[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]"
+[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir"
+[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync "
+[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]"
+[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event"
+[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]"
+[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter"
+[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs"
+[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`"
+[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases"
+[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives"
+[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error"
+[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error"
+[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]"
+[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content"
+[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink"
+[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content"
+[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]"
+[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link"
+[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link"
+[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link"
+[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link"
+[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods"
+[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted"
+[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods"
+[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme"
+[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync"
+[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152"
+[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]"
+[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]"
+[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code."
+[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync"
+[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation"
+[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty"
+[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works"
+[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist."
+[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing"
+[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs"
+[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature"
+[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps"
+[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'"
+[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138"
+[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files"
+[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input"
+[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute"
+[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided"
+[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir"
+[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`"
+[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method"
+[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]"
+[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features."
+[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?"
+[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;"
+[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists"
+[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object #<Object> has no method 'access'"
+[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync"
+[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'"
+[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory"
+[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids."
+[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined"
+[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'"
+[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows"
+[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream"
+[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows"
+[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]"
+[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]"
+[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true"
+[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists"
+[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory"
+[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory "
+[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory"
+[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails"
+[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work"
+[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it"
+[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]"
+[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs"
+[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]"
+[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy"
+[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?"
+[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified"
+[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp"
+[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]"
+[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]"
+[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug"
+[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined."
+[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp"
+[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]"
+[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]"
+[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird"
+[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]"
+[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine"
+[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows"
+[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries"
+[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?"
+[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?"
+[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync"
+[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?"
+[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]"
+[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move"
+[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move"
+[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync"
+[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty"
+[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories"
+[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird"
+[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript"
+[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]"
+[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module"
+[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme"
+[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality"
+[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work"
+[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]"
+[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name"
+[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]"
+[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options"
+[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG"
+[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy"
+[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls"
+[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk"
+[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work"
+[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies"
+[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs"
+[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]"
+[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error"
+[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?"
+[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy "
+[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?"
+[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons"
+[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode"
+[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync"
+[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README"
+[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile"
+[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6"
+[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]"
+[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0"
+[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year"
+[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites"
+[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support"
+[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting "
+[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?"
+[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now"
+[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime "
+[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error"
+[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null"
+[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]"
+[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`"
+[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` "
+[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]"
+[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync"
+[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]"
+[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]"
+[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`"
+[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?"
+[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted."
+[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme"
+[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]"
+[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file"
+[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]"
+[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories"
+[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()"
+[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0"
+[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted"
+[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array"
+[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function"
+[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`"
+[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md"
+[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]"
+[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1"
+[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]"
+[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global"
+[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]"
+[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]"
+[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra"
+[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version"
+[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency"
+[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming"
+[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2"
+[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!"
+[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp"
+[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist"
diff --git a/node_modules/fs-extra/LICENSE b/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+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/fs-extra/README.md b/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..7dbb9f7
--- /dev/null
+++ b/node_modules/fs-extra/README.md
@@ -0,0 +1,242 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It should be a drop in replacement for `fs`.
+
+[![npm Package](https://img.shields.io/npm/v/fs-extra.svg?style=flat-square)](https://www.npmjs.org/package/fs-extra)
+[![build status](https://api.travis-ci.org/jprichardson/node-fs-extra.svg)](http://travis-ci.org/jprichardson/node-fs-extra)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
+[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![Coverage Status](https://img.shields.io/coveralls/jprichardson/node-fs-extra.svg)](https://coveralls.io/r/jprichardson/node-fs-extra)
+
+<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
+
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install --save fs-extra
+
+
+
+Usage
+-----
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+Sync vs Async
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()` & `fs.write()`](docs/fs-read-write.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+
+### Misc.
+
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage. See coveralls output for more info.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm test`: runs both the linter and the tests
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/node_modules/fs-extra/docs/copy-sync.md b/node_modules/fs-extra/docs/copy-sync.md
new file mode 100644
index 0000000..8e61c2b
--- /dev/null
+++ b/node_modules/fs-extra/docs/copy-sync.md
@@ -0,0 +1,37 @@
+# copySync(src, dest, [options])
+
+Copy a file or directory. The directory can have contents. Like `cp -r`.
+
+- `src` `<String>`
+- `dest` `<String>`
+- `options` `<Object>`
+ - `overwrite` `<boolean>`: overwrite existing file or directory, default is `true`. _Note that the copy operation will silently fail if you set this to `false` and the destination exists._ Use the `errorOnExist` option to change this behavior.
+ - `errorOnExist` `<boolean>`: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`.
+ - `dereference` `<boolean>`: dereference symlinks, default is `false`.
+ - `preserveTimestamps` `<boolean>`: will set last modification and access times to the ones of the original source files, default is `false`.
+ - `filter` `<Function>`: Function to filter copied files. Return `true` to include, `false` to exclude. This can also be a RegExp, however this is deprecated (See [issue #239](https://github.com/jprichardson/node-fs-extra/issues/239) for background).
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+// copy file
+fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+
+// copy directory, even if it has subdirectories or files
+fs.copySync('/tmp/mydir', '/tmp/mynewdir')
+```
+
+**Using filter function**
+
+```js
+const fs = require('fs-extra')
+
+const filterFunc = (src, dest) => {
+ // your logic here
+ // it will be copied if return true
+}
+
+fs.copySync('/tmp/mydir', '/tmp/mynewdir', { filter: filterFunc })
+```
diff --git a/node_modules/fs-extra/docs/copy.md b/node_modules/fs-extra/docs/copy.md
new file mode 100644
index 0000000..8440726
--- /dev/null
+++ b/node_modules/fs-extra/docs/copy.md
@@ -0,0 +1,57 @@
+# copy(src, dest, [options, callback])
+
+Copy a file or directory. The directory can have contents. Like `cp -r`.
+
+- `src` `<String>`
+- `dest` `<String>` Note that if `src` is a file, `dest` cannot be a directory (see [issue #323](https://github.com/jprichardson/node-fs-extra/issues/323)).
+- `options` `<Object>`
+ - `overwrite` `<boolean>`: overwrite existing file or directory, default is `true`. _Note that the copy operation will silently fail if you set this to `false` and the destination exists._ Use the `errorOnExist` option to change this behavior.
+ - `errorOnExist` `<boolean>`: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`.
+ - `dereference` `<boolean>`: dereference symlinks, default is `false`.
+ - `preserveTimestamps` `<boolean>`: will set last modification and access times to the ones of the original source files, default is `false`.
+ - `filter` `<Function>`: Function to filter copied files. Return `true` to include, `false` to exclude. This can also be a RegExp, however this is deprecated (See [issue #239](https://github.com/jprichardson/node-fs-extra/issues/239) for background).
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+}) // copies file
+
+fs.copy('/tmp/mydir', '/tmp/mynewdir', err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+}) // copies directory, even if it has subdirectories or files
+
+// Promise usage:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
+
+**Using filter function**
+
+```js
+const fs = require('fs-extra')
+
+const filterFunc = (src, dest) => {
+ // your logic here
+ // it will be copied if return true
+}
+
+fs.copy('/tmp/mydir', '/tmp/mynewdir', { filter: filterFunc }, err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+})
+```
diff --git a/node_modules/fs-extra/docs/emptyDir-sync.md b/node_modules/fs-extra/docs/emptyDir-sync.md
new file mode 100644
index 0000000..7decdbc
--- /dev/null
+++ b/node_modules/fs-extra/docs/emptyDir-sync.md
@@ -0,0 +1,16 @@
+# emptyDirSync(dir)
+
+Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted.
+
+**Alias:** `emptydirSync()`
+
+- `dir` `<String>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+// assume this directory has a lot of files and folders
+fs.emptyDirSync('/tmp/some/dir')
+```
diff --git a/node_modules/fs-extra/docs/emptyDir.md b/node_modules/fs-extra/docs/emptyDir.md
new file mode 100644
index 0000000..6553e9a
--- /dev/null
+++ b/node_modules/fs-extra/docs/emptyDir.md
@@ -0,0 +1,30 @@
+# emptyDir(dir, [callback])
+
+Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted.
+
+**Alias:** `emptydir()`
+
+- `dir` `<String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+// assume this directory has a lot of files and folders
+fs.emptyDir('/tmp/some/dir', err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+})
+
+// With promises
+fs.emptyDir('/tmp/some/dir')
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/ensureDir-sync.md b/node_modules/fs-extra/docs/ensureDir-sync.md
new file mode 100644
index 0000000..8f083d2
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureDir-sync.md
@@ -0,0 +1,17 @@
+# ensureDirSync(dir)
+
+Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`.
+
+**Aliases:** `mkdirsSync()`, `mkdirpSync()`
+
+- `dir` `<String>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const dir = '/tmp/this/path/does/not/exist'
+fs.ensureDirSync(dir)
+// dir has now been created, including the directory it is to be placed in
+```
diff --git a/node_modules/fs-extra/docs/ensureDir.md b/node_modules/fs-extra/docs/ensureDir.md
new file mode 100644
index 0000000..d030d86
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureDir.md
@@ -0,0 +1,29 @@
+# ensureDir(dir, [callback])
+
+Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`.
+
+**Aliases:** `mkdirs()`, `mkdirp()`
+
+- `dir` `<String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const dir = '/tmp/this/path/does/not/exist'
+fs.ensureDir(dir, err => {
+ console.log(err) // => null
+ // dir has now been created, including the directory it is to be placed in
+})
+
+// With Promises:
+fs.ensureDir(dir)
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/ensureFile-sync.md b/node_modules/fs-extra/docs/ensureFile-sync.md
new file mode 100644
index 0000000..25ac39d
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureFile-sync.md
@@ -0,0 +1,17 @@
+# ensureFileSync(file)
+
+Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**.
+
+**Alias:** `createFileSync()`
+
+- `file` `<String>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/this/path/does/not/exist/file.txt'
+fs.ensureFileSync(file)
+// file has now been created, including the directory it is to be placed in
+```
diff --git a/node_modules/fs-extra/docs/ensureFile.md b/node_modules/fs-extra/docs/ensureFile.md
new file mode 100644
index 0000000..987be63
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureFile.md
@@ -0,0 +1,29 @@
+# ensureFile(file, [callback])
+
+Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**.
+
+**Alias:** `createFile()`
+
+- `file` `<String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/this/path/does/not/exist/file.txt'
+fs.ensureFile(file, err => {
+ console.log(err) // => null
+ // file has now been created, including the directory it is to be placed in
+})
+
+// With Promises:
+fs.ensureFile(file)
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/ensureLink-sync.md b/node_modules/fs-extra/docs/ensureLink-sync.md
new file mode 100644
index 0000000..74769d3
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureLink-sync.md
@@ -0,0 +1,17 @@
+# ensureLinkSync(srcpath, dstpath)
+
+Ensures that the link exists. If the directory structure does not exist, it is created.
+
+- `srcpath` `<String>`
+- `dstpath` `<String>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const srcpath = '/tmp/file.txt'
+const dstpath = '/tmp/this/path/does/not/exist/file.txt'
+fs.ensureLinkSync(srcpath, dstpath)
+// link has now been created, including the directory it is to be placed in
+```
diff --git a/node_modules/fs-extra/docs/ensureLink.md b/node_modules/fs-extra/docs/ensureLink.md
new file mode 100644
index 0000000..90d2a5d
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureLink.md
@@ -0,0 +1,29 @@
+# ensureLink(srcpath, dstpath, [callback])
+
+Ensures that the link exists. If the directory structure does not exist, it is created.
+
+- `srcpath` `<String>`
+- `dstpath` `<String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const srcpath = '/tmp/file.txt'
+const dstpath = '/tmp/this/path/does/not/exist/file.txt'
+fs.ensureLink(srcpath, dstpath, err => {
+ console.log(err) // => null
+ // link has now been created, including the directory it is to be placed in
+})
+
+// With Promises:
+fs.ensureLink(srcpath, dstpath)
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/ensureSymlink-sync.md b/node_modules/fs-extra/docs/ensureSymlink-sync.md
new file mode 100644
index 0000000..328d4c4
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureSymlink-sync.md
@@ -0,0 +1,18 @@
+# ensureSymlinkSync(srcpath, dstpath, [type])
+
+Ensures that the symlink exists. If the directory structure does not exist, it is created.
+
+- `srcpath` `<String>`
+- `dstpath` `<String>`
+- `type` `<String>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const srcpath = '/tmp/file.txt'
+const dstpath = '/tmp/this/path/does/not/exist/file.txt'
+fs.ensureSymlinkSync(srcpath, dstpath)
+// symlink has now been created, including the directory it is to be placed in
+```
diff --git a/node_modules/fs-extra/docs/ensureSymlink.md b/node_modules/fs-extra/docs/ensureSymlink.md
new file mode 100644
index 0000000..45524f1
--- /dev/null
+++ b/node_modules/fs-extra/docs/ensureSymlink.md
@@ -0,0 +1,30 @@
+# ensureSymlink(srcpath, dstpath, [type, callback])
+
+Ensures that the symlink exists. If the directory structure does not exist, it is created.
+
+- `srcpath` `<String>`
+- `dstpath` `<String>`
+- `type` `<String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const srcpath = '/tmp/file.txt'
+const dstpath = '/tmp/this/path/does/not/exist/file.txt'
+fs.ensureSymlink(srcpath, dstpath, err => {
+ console.log(err) // => null
+ // symlink has now been created, including the directory it is to be placed in
+})
+
+// With Promises:
+fs.ensureSymlink(srcpath, dstpath)
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/fs-read-write.md b/node_modules/fs-extra/docs/fs-read-write.md
new file mode 100644
index 0000000..805ea3c
--- /dev/null
+++ b/node_modules/fs-extra/docs/fs-read-write.md
@@ -0,0 +1,39 @@
+# About `fs.read()` & `fs.write()`
+
+[`fs.read()`](https://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback) & [`fs.write()`](https://nodejs.org/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback) are different from other `fs` methods in that their callbacks are called with 3 arguments instead of the usual 2 arguments.
+
+If you're using them with callbacks, they will behave as usual. However, their promise usage is a little different. `fs-extra` promisifies these methods like [`util.promisify()`](https://nodejs.org/api/util.html#util_util_promisify_original) (only available in Node 8+) does.
+
+Here's the example promise usage:
+
+## `fs.read()`
+
+```js
+// Basic promises
+fs.read(fd, buffer, offset, length, position)
+ .then(results => {
+ console.log(results)
+ // { bytesRead: 20, buffer: <Buffer 0f 34 5d ...> }
+ })
+
+// Async/await usage:
+async function example () {
+ const { bytesRead, buffer } = await fs.read(fd, Buffer.alloc(length), offset, length, position)
+}
+```
+
+## `fs.write()`
+
+```js
+// Basic promises
+fs.write(fd, buffer, offset, length, position)
+ .then(results => {
+ console.log(results)
+ // { bytesWritten: 20, buffer: <Buffer 0f 34 5d ...> }
+ })
+
+// Async/await usage:
+async function example () {
+ const { bytesWritten, buffer } = await fs.write(fd, Buffer.alloc(length), offset, length, position)
+}
+```
diff --git a/node_modules/fs-extra/docs/move-sync.md b/node_modules/fs-extra/docs/move-sync.md
new file mode 100644
index 0000000..cd701fe
--- /dev/null
+++ b/node_modules/fs-extra/docs/move-sync.md
@@ -0,0 +1,24 @@
+# moveSync(src, dest, [options])
+
+Moves a file or directory, even across devices.
+
+- `src` `<String>`
+- `dest` `<String>`
+- `options` `<Object>`
+ - `overwrite` `<boolean>`: overwrite existing file or directory, default is `false`.
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+fs.moveSync('/tmp/somefile', '/tmp/does/not/exist/yet/somefile')
+```
+
+**Using `overwrite` option**
+
+```js
+const fs = require('fs-extra')
+
+fs.moveSync('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true })
+```
diff --git a/node_modules/fs-extra/docs/move.md b/node_modules/fs-extra/docs/move.md
new file mode 100644
index 0000000..0dd210c
--- /dev/null
+++ b/node_modules/fs-extra/docs/move.md
@@ -0,0 +1,41 @@
+# move(src, dest, [options, callback])
+
+Moves a file or directory, even across devices.
+
+- `src` `<String>`
+- `dest` `<String>`
+- `options` `<Object>`
+ - `overwrite` `<boolean>`: overwrite existing file or directory, default is `false`.
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+fs.move('/tmp/somefile', '/tmp/does/not/exist/yet/somefile', err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+})
+
+fs.move('/tmp/somefile', '/tmp/does/not/exist/yet/somefile')
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
+
+**Using `overwrite` option**
+
+```js
+const fs = require('fs-extra')
+
+fs.move('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true }, err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+})
+```
diff --git a/node_modules/fs-extra/docs/outputFile-sync.md b/node_modules/fs-extra/docs/outputFile-sync.md
new file mode 100644
index 0000000..38eee8b
--- /dev/null
+++ b/node_modules/fs-extra/docs/outputFile-sync.md
@@ -0,0 +1,19 @@
+# outputFileSync(file, data, [options])
+
+Almost the same as `writeFileSync` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFileSync()`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options).
+
+- `file` `<String>`
+- `data` `<String> | <Buffer> | <Uint8Array>`
+- `options` `<Object> | <String>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/this/path/does/not/exist/file.txt'
+fs.outputFileSync(file, 'hello!')
+
+const data = fs.readFileSync(file, 'utf8')
+console.log(data) // => hello!
+```
diff --git a/node_modules/fs-extra/docs/outputFile.md b/node_modules/fs-extra/docs/outputFile.md
new file mode 100644
index 0000000..766787d
--- /dev/null
+++ b/node_modules/fs-extra/docs/outputFile.md
@@ -0,0 +1,34 @@
+# outputFile(file, data, [options, callback])
+
+Almost the same as `writeFile` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFile()`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback).
+
+- `file` `<String>`
+- `data` `<String> | <Buffer> | <Uint8Array>`
+- `options` `<Object> | <String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/this/path/does/not/exist/file.txt'
+fs.outputFile(file, 'hello!', err => {
+ console.log(err) // => null
+
+ fs.readFile(file, 'utf8', (err, data) => {
+ if (err) return console.error(err)
+ console.log(data) // => hello!
+ })
+})
+
+// With Promises:
+fs.outputFile(file, 'hello!')
+.then(() => fs.readFile(file, 'utf8'))
+.then(data => {
+ console.log(data) // => hello!
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/outputJson-sync.md b/node_modules/fs-extra/docs/outputJson-sync.md
new file mode 100644
index 0000000..ef78f80
--- /dev/null
+++ b/node_modules/fs-extra/docs/outputJson-sync.md
@@ -0,0 +1,25 @@
+# outputJsonSync(file, object, [options])
+
+Almost the same as [`writeJsonSync`](writeJson-sync.md), except that if the directory does not exist, it's created.
+
+**Alias:** `outputJSONSync()`
+
+- `file` `<String>`
+- `object` `<Object>`
+- `options` `<Object>`
+ - `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
+ - `EOL` `<String>` Set EOL character. Default is `\n`.
+ - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)
+ - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options)
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/this/path/does/not/exist/file.json'
+fs.outputJsonSync(file, {name: 'JP'})
+
+const data = fs.readJsonSync(file)
+console.log(data.name) // => JP
+```
diff --git a/node_modules/fs-extra/docs/outputJson.md b/node_modules/fs-extra/docs/outputJson.md
new file mode 100644
index 0000000..7156991
--- /dev/null
+++ b/node_modules/fs-extra/docs/outputJson.md
@@ -0,0 +1,40 @@
+# outputJson(file, object, [options, callback])
+
+Almost the same as [`writeJson`](writeJson.md), except that if the directory does not exist, it's created.
+
+**Alias:** `outputJSON()`
+
+- `file` `<String>`
+- `object` `<Object>`
+- `options` `<Object>`
+ - `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
+ - `EOL` `<String>` Set EOL character. Default is `\n`.
+ - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)
+ - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/this/path/does/not/exist/file.json'
+fs.outputJson(file, {name: 'JP'}, err => {
+ console.log(err) // => null
+
+ fs.readJson(file, (err, data) => {
+ if (err) return console.error(err)
+ console.log(data.name) // => JP
+ })
+})
+
+// With Promises:
+fs.outputJson(file, {name: 'JP'})
+.then(() => fs.readJson(file))
+.then(data => {
+ console.log(data.name) // => JP
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/pathExists-sync.md b/node_modules/fs-extra/docs/pathExists-sync.md
new file mode 100644
index 0000000..3ef973c
--- /dev/null
+++ b/node_modules/fs-extra/docs/pathExists-sync.md
@@ -0,0 +1,3 @@
+# pathExistsSync(file)
+
+An alias for [`fs.existsSync()`](https://nodejs.org/api/fs.html#fs_fs_existssync_path), created for consistency with [`pathExists()`](pathExists.md).
diff --git a/node_modules/fs-extra/docs/pathExists.md b/node_modules/fs-extra/docs/pathExists.md
new file mode 100644
index 0000000..0302b09
--- /dev/null
+++ b/node_modules/fs-extra/docs/pathExists.md
@@ -0,0 +1,22 @@
+# pathExists(file[, callback])
+
+Test whether or not the given path exists by checking with the file system. Like [`fs.exists`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback), but with a normal callback signature (err, exists). Uses `fs.access` under the hood.
+
+- `file` `<String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/this/path/does/not/exist/file.txt'
+// Promise usage:
+fs.pathExists(file)
+ .then(exists => console.log(exists)) // => false
+// Callback usage:
+fs.pathExists(file, (err, exists) => {
+ console.log(err) // => null
+ console.log(exists) // => false
+})
+```
diff --git a/node_modules/fs-extra/docs/readJson-sync.md b/node_modules/fs-extra/docs/readJson-sync.md
new file mode 100644
index 0000000..a135637
--- /dev/null
+++ b/node_modules/fs-extra/docs/readJson-sync.md
@@ -0,0 +1,33 @@
+# readJsonSync(file, [options])
+
+Reads a JSON file and then parses it into an object. `options` are the same
+that you'd pass to [`jsonFile.readFileSync`](https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options).
+
+**Alias:** `readJSONSync()`
+
+- `file` `<String>`
+- `options` `<Object>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+const packageObj = fs.readJsonSync('./package.json')
+console.log(packageObj.version) // => 2.0.0
+```
+
+---
+
+`readJsonSync()` can take a `throws` option set to `false` and it won't throw if the JSON is invalid. Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/some-invalid.json'
+const data = '{not valid JSON'
+fs.writeFileSync(file, data)
+
+const obj = fs.readJsonSync(file, { throws: false })
+console.log(obj) // => null
+```
diff --git a/node_modules/fs-extra/docs/readJson.md b/node_modules/fs-extra/docs/readJson.md
new file mode 100644
index 0000000..6edc329
--- /dev/null
+++ b/node_modules/fs-extra/docs/readJson.md
@@ -0,0 +1,58 @@
+# readJson(file, [options, callback])
+
+Reads a JSON file and then parses it into an object. `options` are the same
+that you'd pass to [`jsonFile.readFile`](https://github.com/jprichardson/node-jsonfile#readfilefilename-options-callback).
+
+**Alias:** `readJSON()`
+
+- `file` `<String>`
+- `options` `<Object>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+fs.readJson('./package.json', (err, packageObj) => {
+ if (err) console.error(err)
+
+ console.log(packageObj.version) // => 0.1.3
+})
+
+// Promise Usage
+fs.readJson('./package.json')
+.then(packageObj => {
+ console.log(packageObj.version) // => 0.1.3
+})
+.catch(err => {
+ console.error(err)
+})
+```
+
+---
+
+`readJson()` can take a `throws` option set to `false` and it won't throw if the JSON is invalid. Example:
+
+```js
+const fs = require('fs-extra')
+
+const file = '/tmp/some-invalid.json'
+const data = '{not valid JSON'
+fs.writeFileSync(file, data)
+
+fs.readJson(file, { throws: false }, (err, obj) => {
+ if (err) console.error(err)
+
+ console.log(obj) // => null
+})
+
+// Promise Usage
+fs.readJson(file, { throws: false })
+.then(obj => {
+ console.log(obj) // => null
+})
+.catch(err => {
+ console.error(err) // Not called
+})
+```
diff --git a/node_modules/fs-extra/docs/remove-sync.md b/node_modules/fs-extra/docs/remove-sync.md
new file mode 100644
index 0000000..fb01fe8
--- /dev/null
+++ b/node_modules/fs-extra/docs/remove-sync.md
@@ -0,0 +1,16 @@
+# removeSync(path)
+
+Removes a file or directory. The directory can have contents. Like `rm -rf`.
+
+- `path` `<String>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+// remove file
+fs.removeSync('/tmp/myfile')
+
+fs.removeSync('/home/jprichardson') // I just deleted my entire HOME directory.
+```
diff --git a/node_modules/fs-extra/docs/remove.md b/node_modules/fs-extra/docs/remove.md
new file mode 100644
index 0000000..3640293
--- /dev/null
+++ b/node_modules/fs-extra/docs/remove.md
@@ -0,0 +1,34 @@
+# remove(path, [callback])
+
+Removes a file or directory. The directory can have contents. Like `rm -rf`.
+
+- `path` `<String>`
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+// remove file
+fs.remove('/tmp/myfile', err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+})
+
+fs.remove('/home/jprichardson', err => {
+ if (err) return console.error(err)
+
+ console.log('success!') // I just deleted my entire HOME directory.
+})
+
+// Promise Usage
+fs.remove('/tmp/myfile')
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
diff --git a/node_modules/fs-extra/docs/writeJson-sync.md b/node_modules/fs-extra/docs/writeJson-sync.md
new file mode 100644
index 0000000..c22459d
--- /dev/null
+++ b/node_modules/fs-extra/docs/writeJson-sync.md
@@ -0,0 +1,24 @@
+# writeJsonSync(file, object, [options])
+
+Writes an object to a JSON file.
+
+**Alias:** `writeJSONSync()`
+
+- `file` `<String>`
+- `object` `<Object>`
+- `options` `<Object>`
+ - `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
+ - `EOL` `<String>` Set EOL character. Default is `\n`.
+ - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)
+ - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options)
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+fs.writeJsonSync('./package.json', {name: 'fs-extra'})
+```
+---
+
+**See also:** [`outputJsonSync()`](outputJson-sync.md)
diff --git a/node_modules/fs-extra/docs/writeJson.md b/node_modules/fs-extra/docs/writeJson.md
new file mode 100644
index 0000000..8e35271
--- /dev/null
+++ b/node_modules/fs-extra/docs/writeJson.md
@@ -0,0 +1,39 @@
+# writeJson(file, object, [options, callback])
+
+Writes an object to a JSON file.
+
+**Alias:** `writeJSON()`
+
+- `file` `<String>`
+- `object` `<Object>`
+- `options` `<Object>`
+ - `spaces` `<Number|String>` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info.
+ - `EOL` `<String>` Set EOL character. Default is `\n`.
+ - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter)
+ - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
+- `callback` `<Function>`
+
+## Example:
+
+```js
+const fs = require('fs-extra')
+
+fs.writeJson('./package.json', {name: 'fs-extra'}, err => {
+ if (err) return console.error(err)
+
+ console.log('success!')
+})
+
+// With Promises
+fs.writeJson('./package.json', {name: 'fs-extra'})
+.then(() => {
+ console.log('success!')
+})
+.catch(err => {
+ console.error(err)
+})
+```
+
+---
+
+**See also:** [`outputJson()`](outputJson.md)
diff --git a/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js
new file mode 100644
index 0000000..102a6be
--- /dev/null
+++ b/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js
@@ -0,0 +1,41 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+const BUF_LENGTH = 64 * 1024
+const _buff = require('../util/buffer')(BUF_LENGTH)
+
+function copyFileSync (srcFile, destFile, options) {
+ const overwrite = options.overwrite
+ const errorOnExist = options.errorOnExist
+ const preserveTimestamps = options.preserveTimestamps
+
+ if (fs.existsSync(destFile)) {
+ if (overwrite) {
+ fs.unlinkSync(destFile)
+ } else if (errorOnExist) {
+ throw new Error(`${destFile} already exists`)
+ } else return
+ }
+
+ const fdr = fs.openSync(srcFile, 'r')
+ const stat = fs.fstatSync(fdr)
+ const fdw = fs.openSync(destFile, 'w', stat.mode)
+ let bytesRead = 1
+ let pos = 0
+
+ while (bytesRead > 0) {
+ bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)
+ fs.writeSync(fdw, _buff, 0, bytesRead)
+ pos += bytesRead
+ }
+
+ if (preserveTimestamps) {
+ fs.futimesSync(fdw, stat.atime, stat.mtime)
+ }
+
+ fs.closeSync(fdr)
+ fs.closeSync(fdw)
+}
+
+module.exports = copyFileSync
diff --git a/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-sync.js
new file mode 100644
index 0000000..9d5639c
--- /dev/null
+++ b/node_modules/fs-extra/lib/copy-sync/copy-sync.js
@@ -0,0 +1,62 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copyFileSync = require('./copy-file-sync')
+const mkdir = require('../mkdirs')
+
+function copySync (src, dest, options) {
+ if (typeof options === 'function' || options instanceof RegExp) {
+ options = {filter: options}
+ }
+
+ options = options || {}
+ options.recursive = !!options.recursive
+
+ // default to true for now
+ options.clobber = 'clobber' in options ? !!options.clobber : true
+ // overwrite falls back to clobber
+ options.overwrite = 'overwrite' in options ? !!options.overwrite : options.clobber
+ options.dereference = 'dereference' in options ? !!options.dereference : false
+ options.preserveTimestamps = 'preserveTimestamps' in options ? !!options.preserveTimestamps : false
+
+ options.filter = options.filter || function () { return true }
+
+ // Warn about using preserveTimestamps on 32-bit node:
+ if (options.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ const stats = (options.recursive && !options.dereference) ? fs.lstatSync(src) : fs.statSync(src)
+ const destFolder = path.dirname(dest)
+ const destFolderExists = fs.existsSync(destFolder)
+ let performCopy = false
+
+ if (options.filter instanceof RegExp) {
+ console.warn('Warning: fs-extra: Passing a RegExp filter is deprecated, use a function')
+ performCopy = options.filter.test(src)
+ } else if (typeof options.filter === 'function') performCopy = options.filter(src, dest)
+
+ if (stats.isFile() && performCopy) {
+ if (!destFolderExists) mkdir.mkdirsSync(destFolder)
+ copyFileSync(src, dest, {
+ overwrite: options.overwrite,
+ errorOnExist: options.errorOnExist,
+ preserveTimestamps: options.preserveTimestamps
+ })
+ } else if (stats.isDirectory() && performCopy) {
+ if (!fs.existsSync(dest)) mkdir.mkdirsSync(dest)
+ const contents = fs.readdirSync(src)
+ contents.forEach(content => {
+ const opts = options
+ opts.recursive = true
+ copySync(path.join(src, content), path.join(dest, content), opts)
+ })
+ } else if (options.recursive && stats.isSymbolicLink() && performCopy) {
+ const srcPath = fs.readlinkSync(src)
+ fs.symlinkSync(srcPath, dest)
+ }
+}
+
+module.exports = copySync
diff --git a/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/fs-extra/lib/copy-sync/index.js
new file mode 100644
index 0000000..ebc7e0b
--- /dev/null
+++ b/node_modules/fs-extra/lib/copy-sync/index.js
@@ -0,0 +1,3 @@
+module.exports = {
+ copySync: require('./copy-sync')
+}
diff --git a/node_modules/fs-extra/lib/copy/copy.js b/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..309a93d
--- /dev/null
+++ b/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,54 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const ncp = require('./ncp')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function copy (src, dest, options, callback) {
+ if (typeof options === 'function' && !callback) {
+ callback = options
+ options = {}
+ } else if (typeof options === 'function' || options instanceof RegExp) {
+ options = {filter: options}
+ }
+ callback = callback || function () {}
+ options = options || {}
+
+ // Warn about using preserveTimestamps on 32-bit node:
+ if (options.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ // don't allow src and dest to be the same
+ const basePath = process.cwd()
+ const currentPath = path.resolve(basePath, src)
+ const targetPath = path.resolve(basePath, dest)
+ if (currentPath === targetPath) return callback(new Error('Source and destination must not be the same.'))
+
+ fs.lstat(src, (err, stats) => {
+ if (err) return callback(err)
+
+ let dir = null
+ if (stats.isDirectory()) {
+ const parts = dest.split(path.sep)
+ parts.pop()
+ dir = parts.join(path.sep)
+ } else {
+ dir = path.dirname(dest)
+ }
+
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return ncp(src, dest, options, callback)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ ncp(src, dest, options, callback)
+ })
+ })
+ })
+}
+
+module.exports = copy
diff --git a/node_modules/fs-extra/lib/copy/index.js b/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..a6a51da
--- /dev/null
+++ b/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,4 @@
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy'))
+}
diff --git a/node_modules/fs-extra/lib/copy/ncp.js b/node_modules/fs-extra/lib/copy/ncp.js
new file mode 100644
index 0000000..9670ee0
--- /dev/null
+++ b/node_modules/fs-extra/lib/copy/ncp.js
@@ -0,0 +1,234 @@
+// imported from ncp (this is temporary, will rewrite)
+
+var fs = require('graceful-fs')
+var path = require('path')
+var utimes = require('../util/utimes')
+
+function ncp (source, dest, options, callback) {
+ if (!callback) {
+ callback = options
+ options = {}
+ }
+
+ var basePath = process.cwd()
+ var currentPath = path.resolve(basePath, source)
+ var targetPath = path.resolve(basePath, dest)
+
+ var filter = options.filter
+ var transform = options.transform
+ var overwrite = options.overwrite
+ // If overwrite is undefined, use clobber, otherwise default to true:
+ if (overwrite === undefined) overwrite = options.clobber
+ if (overwrite === undefined) overwrite = true
+ var errorOnExist = options.errorOnExist
+ var dereference = options.dereference
+ var preserveTimestamps = options.preserveTimestamps === true
+
+ var started = 0
+ var finished = 0
+ var running = 0
+
+ var errored = false
+
+ startCopy(currentPath)
+
+ function startCopy (source) {
+ started++
+ if (filter) {
+ if (filter instanceof RegExp) {
+ console.warn('Warning: fs-extra: Passing a RegExp filter is deprecated, use a function')
+ if (!filter.test(source)) {
+ return doneOne(true)
+ }
+ } else if (typeof filter === 'function') {
+ if (!filter(source, dest)) {
+ return doneOne(true)
+ }
+ }
+ }
+ return getStats(source)
+ }
+
+ function getStats (source) {
+ var stat = dereference ? fs.stat : fs.lstat
+ running++
+ stat(source, function (err, stats) {
+ if (err) return onError(err)
+
+ // We need to get the mode from the stats object and preserve it.
+ var item = {
+ name: source,
+ mode: stats.mode,
+ mtime: stats.mtime, // modified time
+ atime: stats.atime, // access time
+ stats: stats // temporary
+ }
+
+ if (stats.isDirectory()) {
+ return onDir(item)
+ } else if (stats.isFile() || stats.isCharacterDevice() || stats.isBlockDevice()) {
+ return onFile(item)
+ } else if (stats.isSymbolicLink()) {
+ // Symlinks don't really need to know about the mode.
+ return onLink(source)
+ }
+ })
+ }
+
+ function onFile (file) {
+ var target = file.name.replace(currentPath, targetPath.replace('$', '$$$$')) // escapes '$' with '$$'
+ isWritable(target, function (writable) {
+ if (writable) {
+ copyFile(file, target)
+ } else {
+ if (overwrite) {
+ rmFile(target, function () {
+ copyFile(file, target)
+ })
+ } else if (errorOnExist) {
+ onError(new Error(target + ' already exists'))
+ } else {
+ doneOne()
+ }
+ }
+ })
+ }
+
+ function copyFile (file, target) {
+ var readStream = fs.createReadStream(file.name)
+ var writeStream = fs.createWriteStream(target, { mode: file.mode })
+
+ readStream.on('error', onError)
+ writeStream.on('error', onError)
+
+ if (transform) {
+ transform(readStream, writeStream, file)
+ } else {
+ writeStream.on('open', function () {
+ readStream.pipe(writeStream)
+ })
+ }
+
+ writeStream.once('close', function () {
+ fs.chmod(target, file.mode, function (err) {
+ if (err) return onError(err)
+ if (preserveTimestamps) {
+ utimes.utimesMillis(target, file.atime, file.mtime, function (err) {
+ if (err) return onError(err)
+ return doneOne()
+ })
+ } else {
+ doneOne()
+ }
+ })
+ })
+ }
+
+ function rmFile (file, done) {
+ fs.unlink(file, function (err) {
+ if (err) return onError(err)
+ return done()
+ })
+ }
+
+ function onDir (dir) {
+ var target = dir.name.replace(currentPath, targetPath.replace('$', '$$$$')) // escapes '$' with '$$'
+ isWritable(target, function (writable) {
+ if (writable) {
+ return mkDir(dir, target)
+ }
+ copyDir(dir.name)
+ })
+ }
+
+ function mkDir (dir, target) {
+ fs.mkdir(target, dir.mode, function (err) {
+ if (err) return onError(err)
+ // despite setting mode in fs.mkdir, doesn't seem to work
+ // so we set it here.
+ fs.chmod(target, dir.mode, function (err) {
+ if (err) return onError(err)
+ copyDir(dir.name)
+ })
+ })
+ }
+
+ function copyDir (dir) {
+ fs.readdir(dir, function (err, items) {
+ if (err) return onError(err)
+ items.forEach(function (item) {
+ startCopy(path.join(dir, item))
+ })
+ return doneOne()
+ })
+ }
+
+ function onLink (link) {
+ var target = link.replace(currentPath, targetPath)
+ fs.readlink(link, function (err, resolvedPath) {
+ if (err) return onError(err)
+ checkLink(resolvedPath, target)
+ })
+ }
+
+ function checkLink (resolvedPath, target) {
+ if (dereference) {
+ resolvedPath = path.resolve(basePath, resolvedPath)
+ }
+ isWritable(target, function (writable) {
+ if (writable) {
+ return makeLink(resolvedPath, target)
+ }
+ fs.readlink(target, function (err, targetDest) {
+ if (err) return onError(err)
+
+ if (dereference) {
+ targetDest = path.resolve(basePath, targetDest)
+ }
+ if (targetDest === resolvedPath) {
+ return doneOne()
+ }
+ return rmFile(target, function () {
+ makeLink(resolvedPath, target)
+ })
+ })
+ })
+ }
+
+ function makeLink (linkPath, target) {
+ fs.symlink(linkPath, target, function (err) {
+ if (err) return onError(err)
+ return doneOne()
+ })
+ }
+
+ function isWritable (path, done) {
+ fs.lstat(path, function (err) {
+ if (err) {
+ if (err.code === 'ENOENT') return done(true)
+ return done(false)
+ }
+ return done(false)
+ })
+ }
+
+ function onError (err) {
+ // ensure callback is defined & called only once:
+ if (!errored && callback !== undefined) {
+ errored = true
+ return callback(err)
+ }
+ }
+
+ function doneOne (skipped) {
+ if (!skipped) running--
+ finished++
+ if ((started === finished) && (running === 0)) {
+ if (callback !== undefined) {
+ return callback(null)
+ }
+ }
+ }
+}
+
+module.exports = ncp
diff --git a/node_modules/fs-extra/lib/empty/index.js b/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..db05c17
--- /dev/null
+++ b/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,48 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(function emptyDir (dir, callback) {
+ callback = callback || function () {}
+ fs.readdir(dir, (err, items) => {
+ if (err) return mkdir.mkdirs(dir, callback)
+
+ items = items.map(item => path.join(dir, item))
+
+ deleteItem()
+
+ function deleteItem () {
+ const item = items.pop()
+ if (!item) return callback()
+ remove.remove(item, err => {
+ if (err) return callback(err)
+ deleteItem()
+ })
+ }
+ })
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch (err) {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/node_modules/fs-extra/lib/ensure/file.js b/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..67eed30
--- /dev/null
+++ b/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,49 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeFile()
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch (e) {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ if (!fs.existsSync(dir)) {
+ mkdir.mkdirsSync(dir)
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/node_modules/fs-extra/lib/ensure/index.js b/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..c1f67b7
--- /dev/null
+++ b/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const file = require('./file')
+const link = require('./link')
+const symlink = require('./symlink')
+
+module.exports = {
+ // file
+ createFile: file.createFile,
+ createFileSync: file.createFileSync,
+ ensureFile: file.createFile,
+ ensureFileSync: file.createFileSync,
+ // link
+ createLink: link.createLink,
+ createLinkSync: link.createLinkSync,
+ ensureLink: link.createLink,
+ ensureLinkSync: link.createLinkSync,
+ // symlink
+ createSymlink: symlink.createSymlink,
+ createSymlinkSync: symlink.createSymlinkSync,
+ ensureSymlink: symlink.createSymlink,
+ ensureSymlinkSync: symlink.createSymlinkSync
+}
diff --git a/node_modules/fs-extra/lib/ensure/link.js b/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..49fe379
--- /dev/null
+++ b/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,61 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ fs.lstat(srcpath, (err, stat) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath, callback) {
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ try {
+ fs.lstatSync(srcpath)
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..4a6b78a
--- /dev/null
+++ b/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err, stat) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ 'toCwd': srcpath,
+ 'toDst': srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ 'toCwd': relativeToDst,
+ 'toDst': srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err, stat) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ 'toCwd': srcpath,
+ 'toDst': path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ 'toCwd': srcpath,
+ 'toDst': srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ 'toCwd': relativeToDst,
+ 'toDst': srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ 'toCwd': srcpath,
+ 'toDst': path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..4f8787c
--- /dev/null
+++ b/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch (e) {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..847c1b9
--- /dev/null
+++ b/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,66 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ pathExists(dstpath, (err, destinationExists) => {
+ if (err) return callback(err)
+ if (destinationExists) return callback(null)
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ const destinationExists = fs.existsSync(dstpath)
+ if (destinationExists) return undefined
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/node_modules/fs-extra/lib/fs/index.js b/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..1821fd0
--- /dev/null
+++ b/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,107 @@
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchown',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'readFile',
+ 'readdir',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.copyFile was added in Node.js v8.5.0
+ // fs.mkdtemp was added in Node.js v5.10.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export all keys:
+Object.keys(fs).forEach(key => {
+ exports[key] = fs[key]
+})
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read() & fs.write need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// so we need to handle both cases
+exports.write = function (fd, buffer, a, b, c, callback) {
+ if (typeof arguments[arguments.length - 1] === 'function') {
+ return fs.write(fd, buffer, a, b, c, callback)
+ }
+
+ // Check for old, depricated fs.write(fd, string[, position[, encoding]], callback)
+ if (typeof buffer === 'string') {
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, a, b, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, a, b, c, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
diff --git a/node_modules/fs-extra/lib/index.js b/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..cb7dd9e
--- /dev/null
+++ b/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,22 @@
+'use strict'
+
+const assign = require('./util/assign')
+
+const fs = {}
+
+// Export graceful-fs:
+assign(fs, require('./fs'))
+// Export extra methods:
+assign(fs, require('./copy'))
+assign(fs, require('./copy-sync'))
+assign(fs, require('./mkdirs'))
+assign(fs, require('./remove'))
+assign(fs, require('./json'))
+assign(fs, require('./move'))
+assign(fs, require('./move-sync'))
+assign(fs, require('./empty'))
+assign(fs, require('./ensure'))
+assign(fs, require('./output'))
+assign(fs, require('./path-exists'))
+
+module.exports = fs
diff --git a/node_modules/fs-extra/lib/json/index.js b/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..bae68d4
--- /dev/null
+++ b/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..59cdb3e
--- /dev/null
+++ b/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: u(jsonFile.readFile),
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: u(jsonFile.writeFile),
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..6f76710
--- /dev/null
+++ b/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,18 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const jsonFile = require('./jsonfile')
+
+function outputJsonSync (file, data, options) {
+ const dir = path.dirname(file)
+
+ if (!fs.existsSync(dir)) {
+ mkdir.mkdirsSync(dir)
+ }
+
+ jsonFile.writeJsonSync(file, data, options)
+}
+
+module.exports = outputJsonSync
diff --git a/node_modules/fs-extra/lib/json/output-json.js b/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..d45edb8
--- /dev/null
+++ b/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,27 @@
+'use strict'
+
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+const jsonFile = require('./jsonfile')
+
+function outputJson (file, data, options, callback) {
+ if (typeof options === 'function') {
+ callback = options
+ options = {}
+ }
+
+ const dir = path.dirname(file)
+
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return jsonFile.writeJson(file, data, options, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ jsonFile.writeJson(file, data, options, callback)
+ })
+ })
+}
+
+module.exports = outputJson
diff --git a/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..29975c5
--- /dev/null
+++ b/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromCallback
+const mkdirs = u(require('./mkdirs'))
+const mkdirsSync = require('./mkdirs-sync')
+
+module.exports = {
+ mkdirs: mkdirs,
+ mkdirsSync: mkdirsSync,
+ // alias
+ mkdirp: mkdirs,
+ mkdirpSync: mkdirsSync,
+ ensureDir: mkdirs,
+ ensureDirSync: mkdirsSync
+}
diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js b/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
new file mode 100644
index 0000000..a3ece40
--- /dev/null
+++ b/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js
@@ -0,0 +1,59 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const invalidWin32Path = require('./win32').invalidWin32Path
+
+const o777 = parseInt('0777', 8)
+
+function mkdirsSync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts }
+ }
+
+ let mode = opts.mode
+ const xfs = opts.fs || fs
+
+ if (process.platform === 'win32' && invalidWin32Path(p)) {
+ const errInval = new Error(p + ' contains invalid WIN32 path characters.')
+ errInval.code = 'EINVAL'
+ throw errInval
+ }
+
+ if (mode === undefined) {
+ mode = o777 & (~process.umask())
+ }
+ if (!made) made = null
+
+ p = path.resolve(p)
+
+ try {
+ xfs.mkdirSync(p, mode)
+ made = made || p
+ } catch (err0) {
+ switch (err0.code) {
+ case 'ENOENT':
+ if (path.dirname(p) === p) throw err0
+ made = mkdirsSync(path.dirname(p), opts, made)
+ mkdirsSync(p, opts, made)
+ break
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ let stat
+ try {
+ stat = xfs.statSync(p)
+ } catch (err1) {
+ throw err0
+ }
+ if (!stat.isDirectory()) throw err0
+ break
+ }
+ }
+
+ return made
+}
+
+module.exports = mkdirsSync
diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs.js b/node_modules/fs-extra/lib/mkdirs/mkdirs.js
new file mode 100644
index 0000000..1897533
--- /dev/null
+++ b/node_modules/fs-extra/lib/mkdirs/mkdirs.js
@@ -0,0 +1,63 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const invalidWin32Path = require('./win32').invalidWin32Path
+
+const o777 = parseInt('0777', 8)
+
+function mkdirs (p, opts, callback, made) {
+ if (typeof opts === 'function') {
+ callback = opts
+ opts = {}
+ } else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts }
+ }
+
+ if (process.platform === 'win32' && invalidWin32Path(p)) {
+ const errInval = new Error(p + ' contains invalid WIN32 path characters.')
+ errInval.code = 'EINVAL'
+ return callback(errInval)
+ }
+
+ let mode = opts.mode
+ const xfs = opts.fs || fs
+
+ if (mode === undefined) {
+ mode = o777 & (~process.umask())
+ }
+ if (!made) made = null
+
+ callback = callback || function () {}
+ p = path.resolve(p)
+
+ xfs.mkdir(p, mode, er => {
+ if (!er) {
+ made = made || p
+ return callback(null, made)
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ if (path.dirname(p) === p) return callback(er)
+ mkdirs(path.dirname(p), opts, (er, made) => {
+ if (er) callback(er, made)
+ else mkdirs(p, opts, callback, made)
+ })
+ break
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, (er2, stat) => {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) callback(er, made)
+ else callback(null, made)
+ })
+ break
+ }
+ })
+}
+
+module.exports = mkdirs
diff --git a/node_modules/fs-extra/lib/mkdirs/win32.js b/node_modules/fs-extra/lib/mkdirs/win32.js
new file mode 100644
index 0000000..99b3920
--- /dev/null
+++ b/node_modules/fs-extra/lib/mkdirs/win32.js
@@ -0,0 +1,25 @@
+'use strict'
+
+const path = require('path')
+
+// get drive on windows
+function getRootPath (p) {
+ p = path.normalize(path.resolve(p)).split(path.sep)
+ if (p.length > 0) return p[0]
+ return null
+}
+
+// http://stackoverflow.com/a/62888/10333 contains more accurate
+// TODO: expand to include the rest
+const INVALID_PATH_CHARS = /[<>:"|?*]/
+
+function invalidWin32Path (p) {
+ const rp = getRootPath(p)
+ p = p.replace(rp, '')
+ return INVALID_PATH_CHARS.test(p)
+}
+
+module.exports = {
+ getRootPath,
+ invalidWin32Path
+}
diff --git a/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/fs-extra/lib/move-sync/index.js
new file mode 100644
index 0000000..a5e9114
--- /dev/null
+++ b/node_modules/fs-extra/lib/move-sync/index.js
@@ -0,0 +1,118 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy-sync').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirsSync
+const buffer = require('../util/buffer')
+
+function moveSync (src, dest, options) {
+ options = options || {}
+ const overwrite = options.overwrite || options.clobber || false
+
+ src = path.resolve(src)
+ dest = path.resolve(dest)
+
+ if (src === dest) return fs.accessSync(src)
+
+ if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`)
+
+ mkdirpSync(path.dirname(dest))
+ tryRenameSync()
+
+ function tryRenameSync () {
+ if (overwrite) {
+ try {
+ return fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') {
+ removeSync(dest)
+ options.overwrite = false // just overwriteed it, no need to do it again
+ return moveSync(src, dest, options)
+ }
+
+ if (err.code !== 'EXDEV') throw err
+ return moveSyncAcrossDevice(src, dest, overwrite)
+ }
+ } else {
+ try {
+ fs.linkSync(src, dest)
+ return fs.unlinkSync(src)
+ } catch (err) {
+ if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') {
+ return moveSyncAcrossDevice(src, dest, overwrite)
+ }
+ throw err
+ }
+ }
+ }
+}
+
+function moveSyncAcrossDevice (src, dest, overwrite) {
+ const stat = fs.statSync(src)
+
+ if (stat.isDirectory()) {
+ return moveDirSyncAcrossDevice(src, dest, overwrite)
+ } else {
+ return moveFileSyncAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveFileSyncAcrossDevice (src, dest, overwrite) {
+ const BUF_LENGTH = 64 * 1024
+ const _buff = buffer(BUF_LENGTH)
+
+ const flags = overwrite ? 'w' : 'wx'
+
+ const fdr = fs.openSync(src, 'r')
+ const stat = fs.fstatSync(fdr)
+ const fdw = fs.openSync(dest, flags, stat.mode)
+ let bytesRead = 1
+ let pos = 0
+
+ while (bytesRead > 0) {
+ bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos)
+ fs.writeSync(fdw, _buff, 0, bytesRead)
+ pos += bytesRead
+ }
+
+ fs.closeSync(fdr)
+ fs.closeSync(fdw)
+ return fs.unlinkSync(src)
+}
+
+function moveDirSyncAcrossDevice (src, dest, overwrite) {
+ const options = {
+ overwrite: false
+ }
+
+ if (overwrite) {
+ removeSync(dest)
+ tryCopySync()
+ } else {
+ tryCopySync()
+ }
+
+ function tryCopySync () {
+ copySync(src, dest, options)
+ return removeSync(src)
+ }
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// extract dest base dir and check if that is the same as src basename
+function isSrcSubdir (src, dest) {
+ try {
+ return fs.statSync(src).isDirectory() &&
+ src !== dest &&
+ dest.indexOf(src) > -1 &&
+ dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src)
+ } catch (e) {
+ return false
+ }
+}
+
+module.exports = {
+ moveSync
+}
diff --git a/node_modules/fs-extra/lib/move/index.js b/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..eeeb30f
--- /dev/null
+++ b/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,170 @@
+'use strict'
+
+// most of this code was written by Andrew Kelley
+// licensed under the BSD license: see
+// https://github.com/andrewrk/node-mv/blob/master/package.json
+
+// this needs a cleanup
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const ncp = require('../copy/ncp')
+const path = require('path')
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirs
+
+function move (src, dest, options, callback) {
+ if (typeof options === 'function') {
+ callback = options
+ options = {}
+ }
+
+ const overwrite = options.overwrite || options.clobber || false
+
+ isSrcSubdir(src, dest, (err, itIs) => {
+ if (err) return callback(err)
+ if (itIs) return callback(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`))
+ mkdirp(path.dirname(dest), err => {
+ if (err) return callback(err)
+ doRename()
+ })
+ })
+
+ function doRename () {
+ if (path.resolve(src) === path.resolve(dest)) {
+ fs.access(src, callback)
+ } else if (overwrite) {
+ fs.rename(src, dest, err => {
+ if (!err) return callback()
+
+ if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST') {
+ remove(dest, err => {
+ if (err) return callback(err)
+ options.overwrite = false // just overwriteed it, no need to do it again
+ move(src, dest, options, callback)
+ })
+ return
+ }
+
+ // weird Windows shit
+ if (err.code === 'EPERM') {
+ setTimeout(() => {
+ remove(dest, err => {
+ if (err) return callback(err)
+ options.overwrite = false
+ move(src, dest, options, callback)
+ })
+ }, 200)
+ return
+ }
+
+ if (err.code !== 'EXDEV') return callback(err)
+ moveAcrossDevice(src, dest, overwrite, callback)
+ })
+ } else {
+ fs.link(src, dest, err => {
+ if (err) {
+ if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') {
+ return moveAcrossDevice(src, dest, overwrite, callback)
+ }
+ return callback(err)
+ }
+ return fs.unlink(src, callback)
+ })
+ }
+ }
+}
+
+function moveAcrossDevice (src, dest, overwrite, callback) {
+ fs.stat(src, (err, stat) => {
+ if (err) return callback(err)
+
+ if (stat.isDirectory()) {
+ moveDirAcrossDevice(src, dest, overwrite, callback)
+ } else {
+ moveFileAcrossDevice(src, dest, overwrite, callback)
+ }
+ })
+}
+
+function moveFileAcrossDevice (src, dest, overwrite, callback) {
+ const flags = overwrite ? 'w' : 'wx'
+ const ins = fs.createReadStream(src)
+ const outs = fs.createWriteStream(dest, { flags })
+
+ ins.on('error', err => {
+ ins.destroy()
+ outs.destroy()
+ outs.removeListener('close', onClose)
+
+ // may want to create a directory but `out` line above
+ // creates an empty file for us: See #108
+ // don't care about error here
+ fs.unlink(dest, () => {
+ // note: `err` here is from the input stream errror
+ if (err.code === 'EISDIR' || err.code === 'EPERM') {
+ moveDirAcrossDevice(src, dest, overwrite, callback)
+ } else {
+ callback(err)
+ }
+ })
+ })
+
+ outs.on('error', err => {
+ ins.destroy()
+ outs.destroy()
+ outs.removeListener('close', onClose)
+ callback(err)
+ })
+
+ outs.once('close', onClose)
+ ins.pipe(outs)
+
+ function onClose () {
+ fs.unlink(src, callback)
+ }
+}
+
+function moveDirAcrossDevice (src, dest, overwrite, callback) {
+ const options = {
+ overwrite: false
+ }
+
+ if (overwrite) {
+ remove(dest, err => {
+ if (err) return callback(err)
+ startNcp()
+ })
+ } else {
+ startNcp()
+ }
+
+ function startNcp () {
+ ncp(src, dest, options, err => {
+ if (err) return callback(err)
+ remove(src, callback)
+ })
+ }
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// extract dest base dir and check if that is the same as src basename
+function isSrcSubdir (src, dest, cb) {
+ fs.stat(src, (err, st) => {
+ if (err) return cb(err)
+ if (st.isDirectory()) {
+ const baseDir = dest.split(path.dirname(src) + path.sep)[1]
+ if (baseDir) {
+ const destBasename = baseDir.split(path.sep)[0]
+ if (destBasename) return cb(null, src !== dest && dest.indexOf(src) > -1 && destBasename === path.basename(src))
+ return cb(null, false)
+ }
+ return cb(null, false)
+ }
+ return cb(null, false)
+ })
+}
+
+module.exports = {
+ move: u(move)
+}
diff --git a/node_modules/fs-extra/lib/output/index.js b/node_modules/fs-extra/lib/output/index.js
new file mode 100644
index 0000000..53d5905
--- /dev/null
+++ b/node_modules/fs-extra/lib/output/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, data, encoding) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync.apply(fs, arguments)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync.apply(fs, arguments)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/node_modules/fs-extra/lib/remove/index.js b/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..cee5340
--- /dev/null
+++ b/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,9 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const rimraf = require('./rimraf')
+
+module.exports = {
+ remove: u(rimraf),
+ removeSync: rimraf.sync
+}
diff --git a/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/fs-extra/lib/remove/rimraf.js
new file mode 100644
index 0000000..f078694
--- /dev/null
+++ b/node_modules/fs-extra/lib/remove/rimraf.js
@@ -0,0 +1,314 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const assert = require('assert')
+
+const isWindows = (process.platform === 'win32')
+
+function defaults (options) {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+}
+
+function rimraf (p, options, cb) {
+ let busyTries = 0
+
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+ assert.equal(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.equal(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ rimraf_(p, options, function CB (er) {
+ if (er) {
+ if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
+ busyTries < options.maxBusyTries) {
+ busyTries++
+ let time = busyTries * 100
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), time)
+ }
+
+ // already gone
+ if (er.code === 'ENOENT') er = null
+ }
+
+ cb(er)
+ })
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+function rimraf_ (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === 'ENOENT') {
+ return cb(null)
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === 'EPERM' && isWindows) {
+ return fixWinEPERM(p, options, er, cb)
+ }
+
+ if (st && st.isDirectory()) {
+ return rmdir(p, options, er, cb)
+ }
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === 'ENOENT') {
+ return cb(null)
+ }
+ if (er.code === 'EPERM') {
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ }
+ if (er.code === 'EISDIR') {
+ return rmdir(p, options, er, cb)
+ }
+ }
+ return cb(er)
+ })
+ })
+}
+
+function fixWinEPERM (p, options, er, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+ if (er) {
+ assert(er instanceof Error)
+ }
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2) {
+ cb(er2.code === 'ENOENT' ? null : er)
+ } else {
+ options.stat(p, (er3, stats) => {
+ if (er3) {
+ cb(er3.code === 'ENOENT' ? null : er)
+ } else if (stats.isDirectory()) {
+ rmdir(p, options, er, cb)
+ } else {
+ options.unlink(p, cb)
+ }
+ })
+ }
+ })
+}
+
+function fixWinEPERMSync (p, options, er) {
+ let stats
+
+ assert(p)
+ assert(options)
+ if (er) {
+ assert(er instanceof Error)
+ }
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === 'ENOENT') {
+ return
+ } else {
+ throw er
+ }
+ }
+
+ if (stats.isDirectory()) {
+ rmdirSync(p, options, er)
+ } else {
+ options.unlinkSync(p)
+ }
+}
+
+function rmdir (p, options, originalEr, cb) {
+ assert(p)
+ assert(options)
+ if (originalEr) {
+ assert(originalEr instanceof Error)
+ }
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
+ rmkids(p, options, cb)
+ } else if (er && er.code === 'ENOTDIR') {
+ cb(originalEr)
+ } else {
+ cb(er)
+ }
+ })
+}
+
+function rmkids (p, options, cb) {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er) return cb(er)
+
+ let n = files.length
+ let errState
+
+ if (n === 0) return options.rmdir(p, cb)
+
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState) {
+ return
+ }
+ if (er) return cb(errState = er)
+ if (--n === 0) {
+ options.rmdir(p, cb)
+ }
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+function rimrafSync (p, options) {
+ let st
+
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.equal(typeof options, 'object', 'rimraf: options should be object')
+
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ }
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === 'EPERM' && isWindows) {
+ fixWinEPERMSync(p, options, er)
+ }
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory()) {
+ rmdirSync(p, options, null)
+ } else {
+ options.unlinkSync(p)
+ }
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ return
+ } else if (er.code === 'EPERM') {
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ } else if (er.code !== 'EISDIR') {
+ throw er
+ }
+ rmdirSync(p, options, er)
+ }
+}
+
+function rmdirSync (p, options, originalEr) {
+ assert(p)
+ assert(options)
+ if (originalEr) {
+ assert(originalEr instanceof Error)
+ }
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === 'ENOTDIR') {
+ throw originalEr
+ } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
+ rmkidsSync(p, options)
+ } else if (er.code !== 'ENOENT') {
+ throw er
+ }
+ }
+}
+
+function rmkidsSync (p, options) {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const retries = isWindows ? 100 : 1
+ let i = 0
+ do {
+ let threw = true
+ try {
+ const ret = options.rmdirSync(p, options)
+ threw = false
+ return ret
+ } finally {
+ if (++i < retries && threw) continue // eslint-disable-line
+ }
+ } while (true)
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/fs-extra/lib/util/assign.js b/node_modules/fs-extra/lib/util/assign.js
new file mode 100644
index 0000000..317e5ec
--- /dev/null
+++ b/node_modules/fs-extra/lib/util/assign.js
@@ -0,0 +1,16 @@
+'use strict'
+
+// simple mutable assign
+function assign () {
+ const args = [].slice.call(arguments).filter(i => i)
+ const dest = args.shift()
+ args.forEach(src => {
+ Object.keys(src).forEach(key => {
+ dest[key] = src[key]
+ })
+ })
+
+ return dest
+}
+
+module.exports = assign
diff --git a/node_modules/fs-extra/lib/util/buffer.js b/node_modules/fs-extra/lib/util/buffer.js
new file mode 100644
index 0000000..93af51b
--- /dev/null
+++ b/node_modules/fs-extra/lib/util/buffer.js
@@ -0,0 +1,11 @@
+/* eslint-disable node/no-deprecated-api */
+module.exports = function (size) {
+ if (typeof Buffer.allocUnsafe === 'function') {
+ try {
+ return Buffer.allocUnsafe(size)
+ } catch (e) {
+ return new Buffer(size)
+ }
+ }
+ return new Buffer(size)
+}
diff --git a/node_modules/fs-extra/lib/util/utimes.js b/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..4c32099
--- /dev/null
+++ b/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,72 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const os = require('os')
+const path = require('path')
+
+// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
+function hasMillisResSync () {
+ let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2))
+ tmpfile = path.join(os.tmpdir(), tmpfile)
+
+ // 550 millis past UNIX epoch
+ const d = new Date(1435410243862)
+ fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
+ const fd = fs.openSync(tmpfile, 'r+')
+ fs.futimesSync(fd, d, d)
+ fs.closeSync(fd)
+ return fs.statSync(tmpfile).mtime > 1435410243000
+}
+
+function hasMillisRes (callback) {
+ let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2))
+ tmpfile = path.join(os.tmpdir(), tmpfile)
+
+ // 550 millis past UNIX epoch
+ const d = new Date(1435410243862)
+ fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => {
+ if (err) return callback(err)
+ fs.open(tmpfile, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, d, d, err => {
+ if (err) return callback(err)
+ fs.close(fd, err => {
+ if (err) return callback(err)
+ fs.stat(tmpfile, (err, stats) => {
+ if (err) return callback(err)
+ callback(null, stats.mtime > 1435410243000)
+ })
+ })
+ })
+ })
+ })
+}
+
+function timeRemoveMillis (timestamp) {
+ if (typeof timestamp === 'number') {
+ return Math.floor(timestamp / 1000) * 1000
+ } else if (timestamp instanceof Date) {
+ return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
+ } else {
+ throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
+ }
+}
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+module.exports = {
+ hasMillisRes,
+ hasMillisResSync,
+ timeRemoveMillis,
+ utimesMillis
+}
diff --git a/node_modules/fs-extra/package.json b/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..8ceeb74
--- /dev/null
+++ b/node_modules/fs-extra/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "fs-extra",
+ "version": "4.0.3",
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.",
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jprichardson/node-fs-extra"
+ },
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "devDependencies": {
+ "coveralls": "^2.11.2",
+ "istanbul": "^0.4.5",
+ "klaw": "^1.0.0",
+ "klaw-sync": "^1.1.2",
+ "minimist": "^1.1.1",
+ "mocha": "^3.1.2",
+ "proxyquire": "^1.7.10",
+ "read-dir-files": "^0.1.1",
+ "rimraf": "^2.2.8",
+ "secure-random": "^1.1.1",
+ "semver": "^5.3.0",
+ "standard": "^10.0.2",
+ "standard-markdown": "^4.0.1"
+ },
+ "main": "./lib/index.js",
+ "scripts": {
+ "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js",
+ "coveralls": "coveralls < coverage/lcov.info",
+ "lint": "standard && standard-markdown",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "test": "npm run lint && npm run unit",
+ "unit": "node test.js"
+ }
+}
diff --git a/node_modules/fs.realpath/LICENSE b/node_modules/fs.realpath/LICENSE
new file mode 100644
index 0000000..5bd884c
--- /dev/null
+++ b/node_modules/fs.realpath/LICENSE
@@ -0,0 +1,43 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+----
+
+This library bundles a version of the `fs.realpath` and `fs.realpathSync`
+methods from Node.js v0.10 under the terms of the Node.js MIT license.
+
+Node's license follows, also included at the header of `old.js` which contains
+the licensed code:
+
+ Copyright Joyent, Inc. and other Node contributors.
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/fs.realpath/README.md b/node_modules/fs.realpath/README.md
new file mode 100644
index 0000000..a42ceac
--- /dev/null
+++ b/node_modules/fs.realpath/README.md
@@ -0,0 +1,33 @@
+# fs.realpath
+
+A backwards-compatible fs.realpath for Node v6 and above
+
+In Node v6, the JavaScript implementation of fs.realpath was replaced
+with a faster (but less resilient) native implementation. That raises
+new and platform-specific errors and cannot handle long or excessively
+symlink-looping paths.
+
+This module handles those cases by detecting the new errors and
+falling back to the JavaScript implementation. On versions of Node
+prior to v6, it has no effect.
+
+## USAGE
+
+```js
+var rp = require('fs.realpath')
+
+// async version
+rp.realpath(someLongAndLoopingPath, function (er, real) {
+ // the ELOOP was handled, but it was a bit slower
+})
+
+// sync version
+var real = rp.realpathSync(someLongAndLoopingPath)
+
+// monkeypatch at your own risk!
+// This replaces the fs.realpath/fs.realpathSync builtins
+rp.monkeypatch()
+
+// un-do the monkeypatching
+rp.unmonkeypatch()
+```
diff --git a/node_modules/fs.realpath/index.js b/node_modules/fs.realpath/index.js
new file mode 100644
index 0000000..b09c7c7
--- /dev/null
+++ b/node_modules/fs.realpath/index.js
@@ -0,0 +1,66 @@
+module.exports = realpath
+realpath.realpath = realpath
+realpath.sync = realpathSync
+realpath.realpathSync = realpathSync
+realpath.monkeypatch = monkeypatch
+realpath.unmonkeypatch = unmonkeypatch
+
+var fs = require('fs')
+var origRealpath = fs.realpath
+var origRealpathSync = fs.realpathSync
+
+var version = process.version
+var ok = /^v[0-5]\./.test(version)
+var old = require('./old.js')
+
+function newError (er) {
+ return er && er.syscall === 'realpath' && (
+ er.code === 'ELOOP' ||
+ er.code === 'ENOMEM' ||
+ er.code === 'ENAMETOOLONG'
+ )
+}
+
+function realpath (p, cache, cb) {
+ if (ok) {
+ return origRealpath(p, cache, cb)
+ }
+
+ if (typeof cache === 'function') {
+ cb = cache
+ cache = null
+ }
+ origRealpath(p, cache, function (er, result) {
+ if (newError(er)) {
+ old.realpath(p, cache, cb)
+ } else {
+ cb(er, result)
+ }
+ })
+}
+
+function realpathSync (p, cache) {
+ if (ok) {
+ return origRealpathSync(p, cache)
+ }
+
+ try {
+ return origRealpathSync(p, cache)
+ } catch (er) {
+ if (newError(er)) {
+ return old.realpathSync(p, cache)
+ } else {
+ throw er
+ }
+ }
+}
+
+function monkeypatch () {
+ fs.realpath = realpath
+ fs.realpathSync = realpathSync
+}
+
+function unmonkeypatch () {
+ fs.realpath = origRealpath
+ fs.realpathSync = origRealpathSync
+}
diff --git a/node_modules/fs.realpath/old.js b/node_modules/fs.realpath/old.js
new file mode 100644
index 0000000..b40305e
--- /dev/null
+++ b/node_modules/fs.realpath/old.js
@@ -0,0 +1,303 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var pathModule = require('path');
+var isWindows = process.platform === 'win32';
+var fs = require('fs');
+
+// JavaScript implementation of realpath, ported from node pre-v6
+
+var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
+
+function rethrow() {
+ // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
+ // is fairly slow to generate.
+ var callback;
+ if (DEBUG) {
+ var backtrace = new Error;
+ callback = debugCallback;
+ } else
+ callback = missingCallback;
+
+ return callback;
+
+ function debugCallback(err) {
+ if (err) {
+ backtrace.message = err.message;
+ err = backtrace;
+ missingCallback(err);
+ }
+ }
+
+ function missingCallback(err) {
+ if (err) {
+ if (process.throwDeprecation)
+ throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
+ else if (!process.noDeprecation) {
+ var msg = 'fs: missing callback ' + (err.stack || err.message);
+ if (process.traceDeprecation)
+ console.trace(msg);
+ else
+ console.error(msg);
+ }
+ }
+ }
+}
+
+function maybeCallback(cb) {
+ return typeof cb === 'function' ? cb : rethrow();
+}
+
+var normalize = pathModule.normalize;
+
+// Regexp that finds the next partion of a (partial) path
+// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
+if (isWindows) {
+ var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
+} else {
+ var nextPartRe = /(.*?)(?:[\/]+|$)/g;
+}
+
+// Regex to find the device root, including trailing slash. E.g. 'c:\\'.
+if (isWindows) {
+ var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
+} else {
+ var splitRootRe = /^[\/]*/;
+}
+
+exports.realpathSync = function realpathSync(p, cache) {
+ // make p is absolute
+ p = pathModule.resolve(p);
+
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
+ return cache[p];
+ }
+
+ var original = p,
+ seenLinks = {},
+ knownHard = {};
+
+ // current character position in p
+ var pos;
+ // the partial path so far, including a trailing slash if any
+ var current;
+ // the partial path without a trailing slash (except when pointing at a root)
+ var base;
+ // the partial path scanned in the previous round, with slash
+ var previous;
+
+ start();
+
+ function start() {
+ // Skip over roots
+ var m = splitRootRe.exec(p);
+ pos = m[0].length;
+ current = m[0];
+ base = m[0];
+ previous = '';
+
+ // On windows, check that the root exists. On unix there is no need.
+ if (isWindows && !knownHard[base]) {
+ fs.lstatSync(base);
+ knownHard[base] = true;
+ }
+ }
+
+ // walk down the path, swapping out linked pathparts for their real
+ // values
+ // NB: p.length changes.
+ while (pos < p.length) {
+ // find the next part
+ nextPartRe.lastIndex = pos;
+ var result = nextPartRe.exec(p);
+ previous = current;
+ current += result[0];
+ base = previous + result[1];
+ pos = nextPartRe.lastIndex;
+
+ // continue if not a symlink
+ if (knownHard[base] || (cache && cache[base] === base)) {
+ continue;
+ }
+
+ var resolvedLink;
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
+ // some known symbolic link. no need to stat again.
+ resolvedLink = cache[base];
+ } else {
+ var stat = fs.lstatSync(base);
+ if (!stat.isSymbolicLink()) {
+ knownHard[base] = true;
+ if (cache) cache[base] = base;
+ continue;
+ }
+
+ // read the link if it wasn't read before
+ // dev/ino always return 0 on windows, so skip the check.
+ var linkTarget = null;
+ if (!isWindows) {
+ var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
+ if (seenLinks.hasOwnProperty(id)) {
+ linkTarget = seenLinks[id];
+ }
+ }
+ if (linkTarget === null) {
+ fs.statSync(base);
+ linkTarget = fs.readlinkSync(base);
+ }
+ resolvedLink = pathModule.resolve(previous, linkTarget);
+ // track this, if given a cache.
+ if (cache) cache[base] = resolvedLink;
+ if (!isWindows) seenLinks[id] = linkTarget;
+ }
+
+ // resolve the link, then start over
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
+ start();
+ }
+
+ if (cache) cache[original] = p;
+
+ return p;
+};
+
+
+exports.realpath = function realpath(p, cache, cb) {
+ if (typeof cb !== 'function') {
+ cb = maybeCallback(cache);
+ cache = null;
+ }
+
+ // make p is absolute
+ p = pathModule.resolve(p);
+
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
+ return process.nextTick(cb.bind(null, null, cache[p]));
+ }
+
+ var original = p,
+ seenLinks = {},
+ knownHard = {};
+
+ // current character position in p
+ var pos;
+ // the partial path so far, including a trailing slash if any
+ var current;
+ // the partial path without a trailing slash (except when pointing at a root)
+ var base;
+ // the partial path scanned in the previous round, with slash
+ var previous;
+
+ start();
+
+ function start() {
+ // Skip over roots
+ var m = splitRootRe.exec(p);
+ pos = m[0].length;
+ current = m[0];
+ base = m[0];
+ previous = '';
+
+ // On windows, check that the root exists. On unix there is no need.
+ if (isWindows && !knownHard[base]) {
+ fs.lstat(base, function(err) {
+ if (err) return cb(err);
+ knownHard[base] = true;
+ LOOP();
+ });
+ } else {
+ process.nextTick(LOOP);
+ }
+ }
+
+ // walk down the path, swapping out linked pathparts for their real
+ // values
+ function LOOP() {
+ // stop if scanned past end of path
+ if (pos >= p.length) {
+ if (cache) cache[original] = p;
+ return cb(null, p);
+ }
+
+ // find the next part
+ nextPartRe.lastIndex = pos;
+ var result = nextPartRe.exec(p);
+ previous = current;
+ current += result[0];
+ base = previous + result[1];
+ pos = nextPartRe.lastIndex;
+
+ // continue if not a symlink
+ if (knownHard[base] || (cache && cache[base] === base)) {
+ return process.nextTick(LOOP);
+ }
+
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
+ // known symbolic link. no need to stat again.
+ return gotResolvedLink(cache[base]);
+ }
+
+ return fs.lstat(base, gotStat);
+ }
+
+ function gotStat(err, stat) {
+ if (err) return cb(err);
+
+ // if not a symlink, skip to the next path part
+ if (!stat.isSymbolicLink()) {
+ knownHard[base] = true;
+ if (cache) cache[base] = base;
+ return process.nextTick(LOOP);
+ }
+
+ // stat & read the link if not read before
+ // call gotTarget as soon as the link target is known
+ // dev/ino always return 0 on windows, so skip the check.
+ if (!isWindows) {
+ var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
+ if (seenLinks.hasOwnProperty(id)) {
+ return gotTarget(null, seenLinks[id], base);
+ }
+ }
+ fs.stat(base, function(err) {
+ if (err) return cb(err);
+
+ fs.readlink(base, function(err, target) {
+ if (!isWindows) seenLinks[id] = target;
+ gotTarget(err, target);
+ });
+ });
+ }
+
+ function gotTarget(err, target, base) {
+ if (err) return cb(err);
+
+ var resolvedLink = pathModule.resolve(previous, target);
+ if (cache) cache[base] = resolvedLink;
+ gotResolvedLink(resolvedLink);
+ }
+
+ function gotResolvedLink(resolvedLink) {
+ // resolve the link, then start over
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
+ start();
+ }
+};
diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json
new file mode 100644
index 0000000..3edc57d
--- /dev/null
+++ b/node_modules/fs.realpath/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "fs.realpath",
+ "version": "1.0.0",
+ "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {},
+ "scripts": {
+ "test": "tap test/*.js --cov"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/fs.realpath.git"
+ },
+ "keywords": [
+ "realpath",
+ "fs",
+ "polyfill"
+ ],
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "ISC",
+ "files": [
+ "old.js",
+ "index.js"
+ ]
+}
diff --git a/node_modules/function-bind/.editorconfig b/node_modules/function-bind/.editorconfig
new file mode 100644
index 0000000..ac29ade
--- /dev/null
+++ b/node_modules/function-bind/.editorconfig
@@ -0,0 +1,20 @@
+root = true
+
+[*]
+indent_style = tab
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+max_line_length = 120
+
+[CHANGELOG.md]
+indent_style = space
+indent_size = 2
+
+[*.json]
+max_line_length = off
+
+[Makefile]
+max_line_length = off
diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc
new file mode 100644
index 0000000..9b33d8e
--- /dev/null
+++ b/node_modules/function-bind/.eslintrc
@@ -0,0 +1,15 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "func-name-matching": 0,
+ "indent": [2, 4],
+ "max-nested-callbacks": [2, 3],
+ "max-params": [2, 3],
+ "max-statements": [2, 20],
+ "no-new-func": [1],
+ "strict": [0]
+ }
+}
diff --git a/node_modules/function-bind/.jscs.json b/node_modules/function-bind/.jscs.json
new file mode 100644
index 0000000..8c44794
--- /dev/null
+++ b/node_modules/function-bind/.jscs.json
@@ -0,0 +1,176 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": {
+ "allExcept": [],
+ "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
+ },
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceAfterComma": false,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "ForInStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": { "allExcept": ["keywords"] },
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 8
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "disallowMultiLineTernary": true,
+
+ "validateOrderInObjectKeys": "asc-insensitive",
+
+ "disallowIdenticalDestructuringNames": true,
+
+ "disallowNestedTernaries": { "maxLevel": 1 },
+
+ "requireSpaceAfterComma": { "allExcept": ["trailing"] },
+ "requireAlignedMultilineParams": false,
+
+ "requireSpacesInGenerator": {
+ "afterStar": true
+ },
+
+ "disallowSpacesInGenerator": {
+ "beforeStar": true
+ },
+
+ "disallowVar": false,
+
+ "requireArrayDestructuring": false,
+
+ "requireEnhancedObjectLiterals": false,
+
+ "requireObjectDestructuring": false,
+
+ "requireEarlyReturn": false,
+
+ "requireCapitalizedConstructorsNew": {
+ "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
+ },
+
+ "requireImportAlphabetized": false,
+
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeDestructuredValues": true,
+
+ "disallowSpacesInsideTemplateStringPlaceholders": true,
+
+ "disallowArrayDestructuringReturn": false,
+
+ "requireNewlineBeforeSingleStatementsInIf": false,
+
+ "disallowUnusedVariables": true,
+
+ "requireSpacesInsideImportedObjectBraces": true,
+
+ "requireUseStrict": true
+}
+
diff --git a/node_modules/function-bind/.npmignore b/node_modules/function-bind/.npmignore
new file mode 100644
index 0000000..dbb555f
--- /dev/null
+++ b/node_modules/function-bind/.npmignore
@@ -0,0 +1,22 @@
+# gitignore
+.DS_Store
+.monitor
+.*.swp
+.nodemonignore
+releases
+*.log
+*.err
+fleet.json
+public/browserify
+bin/*.json
+.bin
+build
+compile
+.lock-wscript
+coverage
+node_modules
+
+# Only apps should have lockfiles
+npm-shrinkwrap.json
+package-lock.json
+yarn.lock
diff --git a/node_modules/function-bind/.travis.yml b/node_modules/function-bind/.travis.yml
new file mode 100644
index 0000000..85f70d2
--- /dev/null
+++ b/node_modules/function-bind/.travis.yml
@@ -0,0 +1,168 @@
+language: node_js
+os:
+ - linux
+node_js:
+ - "8.4"
+ - "7.10"
+ - "6.11"
+ - "5.12"
+ - "4.8"
+ - "iojs-v3.3"
+ - "iojs-v2.5"
+ - "iojs-v1.8"
+ - "0.12"
+ - "0.10"
+ - "0.8"
+before_install:
+ - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
+ - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi'
+install:
+ - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
+script:
+ - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
+ - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
+ - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
+ - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
+sudo: false
+env:
+ - TEST=true
+matrix:
+ fast_finish: true
+ include:
+ - node_js: "node"
+ env: PRETEST=true
+ - node_js: "4"
+ env: COVERAGE=true
+ - node_js: "8.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "8.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "7.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "6.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.10"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.8"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "5.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "4.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v3.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v2.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.7"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.5"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.4"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.3"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.2"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.1"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "iojs-v1.0"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.11"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.9"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.6"
+ env: TEST=true ALLOW_FAILURE=true
+ - node_js: "0.4"
+ env: TEST=true ALLOW_FAILURE=true
+ allow_failures:
+ - os: osx
+ - env: TEST=true ALLOW_FAILURE=true
diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE
new file mode 100644
index 0000000..62d6d23
--- /dev/null
+++ b/node_modules/function-bind/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013 Raynos.
+
+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/function-bind/README.md b/node_modules/function-bind/README.md
new file mode 100644
index 0000000..81862a0
--- /dev/null
+++ b/node_modules/function-bind/README.md
@@ -0,0 +1,48 @@
+# function-bind
+
+<!--
+ [![build status][travis-svg]][travis-url]
+ [![NPM version][npm-badge-svg]][npm-url]
+ [![Coverage Status][5]][6]
+ [![gemnasium Dependency Status][7]][8]
+ [![Dependency status][deps-svg]][deps-url]
+ [![Dev Dependency status][dev-deps-svg]][dev-deps-url]
+-->
+
+<!-- [![browser support][11]][12] -->
+
+Implementation of function.prototype.bind
+
+## Example
+
+I mainly do this for unit tests I run on phantomjs.
+PhantomJS does not have Function.prototype.bind :(
+
+```js
+Function.prototype.bind = require("function-bind")
+```
+
+## Installation
+
+`npm install function-bind`
+
+## Contributors
+
+ - Raynos
+
+## MIT Licenced
+
+ [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg
+ [travis-url]: https://travis-ci.org/Raynos/function-bind
+ [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg
+ [npm-url]: https://npmjs.org/package/function-bind
+ [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png
+ [6]: https://coveralls.io/r/Raynos/function-bind
+ [7]: https://gemnasium.com/Raynos/function-bind.png
+ [8]: https://gemnasium.com/Raynos/function-bind
+ [deps-svg]: https://david-dm.org/Raynos/function-bind.svg
+ [deps-url]: https://david-dm.org/Raynos/function-bind
+ [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg
+ [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies
+ [11]: https://ci.testling.com/Raynos/function-bind.png
+ [12]: https://ci.testling.com/Raynos/function-bind
diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js
new file mode 100644
index 0000000..cc4daec
--- /dev/null
+++ b/node_modules/function-bind/implementation.js
@@ -0,0 +1,52 @@
+'use strict';
+
+/* eslint no-invalid-this: 1 */
+
+var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
+var slice = Array.prototype.slice;
+var toStr = Object.prototype.toString;
+var funcType = '[object Function]';
+
+module.exports = function bind(that) {
+ var target = this;
+ if (typeof target !== 'function' || toStr.call(target) !== funcType) {
+ throw new TypeError(ERROR_MESSAGE + target);
+ }
+ var args = slice.call(arguments, 1);
+
+ var bound;
+ var binder = function () {
+ if (this instanceof bound) {
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+ }
+ };
+
+ var boundLength = Math.max(0, target.length - args.length);
+ var boundArgs = [];
+ for (var i = 0; i < boundLength; i++) {
+ boundArgs.push('$' + i);
+ }
+
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
+
+ if (target.prototype) {
+ var Empty = function Empty() {};
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+
+ return bound;
+};
diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js
new file mode 100644
index 0000000..3bb6b96
--- /dev/null
+++ b/node_modules/function-bind/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var implementation = require('./implementation');
+
+module.exports = Function.prototype.bind || implementation;
diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json
new file mode 100644
index 0000000..20a1727
--- /dev/null
+++ b/node_modules/function-bind/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "function-bind",
+ "version": "1.1.1",
+ "description": "Implementation of Function.prototype.bind",
+ "keywords": [
+ "function",
+ "bind",
+ "shim",
+ "es5"
+ ],
+ "author": "Raynos <raynos2@gmail.com>",
+ "repository": "git://github.com/Raynos/function-bind.git",
+ "main": "index",
+ "homepage": "https://github.com/Raynos/function-bind",
+ "contributors": [
+ {
+ "name": "Raynos"
+ },
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "bugs": {
+ "url": "https://github.com/Raynos/function-bind/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "covert": "^1.1.0",
+ "eslint": "^4.5.0",
+ "jscs": "^3.0.7",
+ "tape": "^4.8.0"
+ },
+ "license": "MIT",
+ "scripts": {
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "posttest": "npm run coverage -- --quiet",
+ "tests-only": "node test",
+ "coverage": "covert test/*.js",
+ "lint": "npm run jscs && npm run eslint",
+ "jscs": "jscs *.js */*.js",
+ "eslint": "eslint *.js */*.js"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc
new file mode 100644
index 0000000..8a56d5b
--- /dev/null
+++ b/node_modules/function-bind/test/.eslintrc
@@ -0,0 +1,9 @@
+{
+ "rules": {
+ "array-bracket-newline": 0,
+ "array-element-newline": 0,
+ "max-statements-per-line": [2, { "max": 2 }],
+ "no-invalid-this": 0,
+ "no-magic-numbers": 0,
+ }
+}
diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js
new file mode 100644
index 0000000..2edecce
--- /dev/null
+++ b/node_modules/function-bind/test/index.js
@@ -0,0 +1,252 @@
+// jscs:disable requireUseStrict
+
+var test = require('tape');
+
+var functionBind = require('../implementation');
+var getCurrentContext = function () { return this; };
+
+test('functionBind is a function', function (t) {
+ t.equal(typeof functionBind, 'function');
+ t.end();
+});
+
+test('non-functions', function (t) {
+ var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g];
+ t.plan(nonFunctions.length);
+ for (var i = 0; i < nonFunctions.length; ++i) {
+ try { functionBind.call(nonFunctions[i]); } catch (ex) {
+ t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i]));
+ }
+ }
+ t.end();
+});
+
+test('without a context', function (t) {
+ t.test('binds properly', function (st) {
+ var args, context;
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ context = this;
+ })
+ };
+ namespace.func(1, 2, 3);
+ st.deepEqual(args, [1, 2, 3]);
+ st.equal(context, getCurrentContext.call());
+ st.end();
+ });
+
+ t.test('binds properly, and still supplies bound arguments', function (st) {
+ var args, context;
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ context = this;
+ }, undefined, 1, 2, 3)
+ };
+ namespace.func(4, 5, 6);
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6]);
+ st.equal(context, getCurrentContext.call());
+ st.end();
+ });
+
+ t.test('returns properly', function (st) {
+ var args;
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ return this;
+ }, null)
+ };
+ var context = namespace.func(1, 2, 3);
+ st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
+ st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
+ st.end();
+ });
+
+ t.test('returns properly with bound arguments', function (st) {
+ var args;
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ return this;
+ }, null, 1, 2, 3)
+ };
+ var context = namespace.func(4, 5, 6);
+ st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
+ st.end();
+ });
+
+ t.test('called as a constructor', function (st) {
+ var thunkify = function (value) {
+ return function () { return value; };
+ };
+ st.test('returns object value', function (sst) {
+ var expectedReturnValue = [1, 2, 3];
+ var Constructor = functionBind.call(thunkify(expectedReturnValue), null);
+ var result = new Constructor();
+ sst.equal(result, expectedReturnValue);
+ sst.end();
+ });
+
+ st.test('does not return primitive value', function (sst) {
+ var Constructor = functionBind.call(thunkify(42), null);
+ var result = new Constructor();
+ sst.notEqual(result, 42);
+ sst.end();
+ });
+
+ st.test('object from bound constructor is instance of original and bound constructor', function (sst) {
+ var A = function (x) {
+ this.name = x || 'A';
+ };
+ var B = functionBind.call(A, null, 'B');
+
+ var result = new B();
+ sst.ok(result instanceof B, 'result is instance of bound constructor');
+ sst.ok(result instanceof A, 'result is instance of original constructor');
+ sst.end();
+ });
+
+ st.end();
+ });
+
+ t.end();
+});
+
+test('with a context', function (t) {
+ t.test('with no bound arguments', function (st) {
+ var args, context;
+ var boundContext = {};
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ context = this;
+ }, boundContext)
+ };
+ namespace.func(1, 2, 3);
+ st.equal(context, boundContext, 'binds a context properly');
+ st.deepEqual(args, [1, 2, 3], 'supplies passed arguments');
+ st.end();
+ });
+
+ t.test('with bound arguments', function (st) {
+ var args, context;
+ var boundContext = {};
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ context = this;
+ }, boundContext, 1, 2, 3)
+ };
+ namespace.func(4, 5, 6);
+ st.equal(context, boundContext, 'binds a context properly');
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments');
+ st.end();
+ });
+
+ t.test('returns properly', function (st) {
+ var boundContext = {};
+ var args;
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ return this;
+ }, boundContext)
+ };
+ var context = namespace.func(1, 2, 3);
+ st.equal(context, boundContext, 'returned context is bound context');
+ st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
+ st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
+ st.end();
+ });
+
+ t.test('returns properly with bound arguments', function (st) {
+ var boundContext = {};
+ var args;
+ var namespace = {
+ func: functionBind.call(function () {
+ args = Array.prototype.slice.call(arguments);
+ return this;
+ }, boundContext, 1, 2, 3)
+ };
+ var context = namespace.func(4, 5, 6);
+ st.equal(context, boundContext, 'returned context is bound context');
+ st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
+ st.end();
+ });
+
+ t.test('passes the correct arguments when called as a constructor', function (st) {
+ var expected = { name: 'Correct' };
+ var namespace = {
+ Func: functionBind.call(function (arg) {
+ return arg;
+ }, { name: 'Incorrect' })
+ };
+ var returned = new namespace.Func(expected);
+ st.equal(returned, expected, 'returns the right arg when called as a constructor');
+ st.end();
+ });
+
+ t.test('has the new instance\'s context when called as a constructor', function (st) {
+ var actualContext;
+ var expectedContext = { foo: 'bar' };
+ var namespace = {
+ Func: functionBind.call(function () {
+ actualContext = this;
+ }, expectedContext)
+ };
+ var result = new namespace.Func();
+ st.equal(result instanceof namespace.Func, true);
+ st.notEqual(actualContext, expectedContext);
+ st.end();
+ });
+
+ t.end();
+});
+
+test('bound function length', function (t) {
+ t.test('sets a correct length without thisArg', function (st) {
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; });
+ st.equal(subject.length, 3);
+ st.equal(subject(1, 2, 3), 6);
+ st.end();
+ });
+
+ t.test('sets a correct length with thisArg', function (st) {
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {});
+ st.equal(subject.length, 3);
+ st.equal(subject(1, 2, 3), 6);
+ st.end();
+ });
+
+ t.test('sets a correct length without thisArg and first argument', function (st) {
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1);
+ st.equal(subject.length, 2);
+ st.equal(subject(2, 3), 6);
+ st.end();
+ });
+
+ t.test('sets a correct length with thisArg and first argument', function (st) {
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1);
+ st.equal(subject.length, 2);
+ st.equal(subject(2, 3), 6);
+ st.end();
+ });
+
+ t.test('sets a correct length without thisArg and too many arguments', function (st) {
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4);
+ st.equal(subject.length, 0);
+ st.equal(subject(), 6);
+ st.end();
+ });
+
+ t.test('sets a correct length with thisArg and too many arguments', function (st) {
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4);
+ st.equal(subject.length, 0);
+ st.equal(subject(), 6);
+ st.end();
+ });
+});
diff --git a/node_modules/galactus/.npmignore b/node_modules/galactus/.npmignore
new file mode 100644
index 0000000..f2a1a21
--- /dev/null
+++ b/node_modules/galactus/.npmignore
@@ -0,0 +1,2 @@
+src
+test \ No newline at end of file
diff --git a/node_modules/galactus/.nyc_output/00c728c3437da37b0c97398e7e596f35.json b/node_modules/galactus/.nyc_output/00c728c3437da37b0c97398e7e596f35.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/node_modules/galactus/.nyc_output/00c728c3437da37b0c97398e7e596f35.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/node_modules/galactus/.nyc_output/b1b801e11369500b7ee32c579e280104.json b/node_modules/galactus/.nyc_output/b1b801e11369500b7ee32c579e280104.json
new file mode 100644
index 0000000..cc80ddb
--- /dev/null
+++ b/node_modules/galactus/.nyc_output/b1b801e11369500b7ee32c579e280104.json
@@ -0,0 +1 @@
+{"C:\\Users\\Samuel\\projects\\galactus\\src\\index.ts":{"path":"C:\\Users\\Samuel\\projects\\galactus\\src\\index.ts","statementMap":{"0":{"start":{"line":3,"column":4},"end":{"line":3,"column":71}},"1":{"start":{"line":3,"column":21},"end":{"line":3,"column":71}},"2":{"start":{"line":3,"column":53},"end":{"line":3,"column":71}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":42}},"5":{"start":{"line":7,"column":0},"end":{"line":7,"column":36}}},"fnMap":{"0":{"name":"__export","decl":{"start":{"line":2,"column":9},"end":{"line":2,"column":17}},"loc":{"start":{"line":2,"column":21},"end":{"line":4,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":21},"end":{"line":3,"column":71}},"type":"if","locations":[{"start":{"line":3,"column":21},"end":{"line":3,"column":71}},{"start":{"line":3,"column":21},"end":{"line":3,"column":71}}],"line":3}},"s":{"0":2,"1":5,"2":5,"3":1,"4":1,"5":1},"f":{"0":2},"b":{"0":[5,0]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"03530c19cf12a9b1e32f3c60c832982a9c315e44","contentHash":"da7ba6bdcde7a724fa08c5ca7c553520_11.4.1"},"C:\\Users\\Samuel\\projects\\galactus\\src\\DestroyerOfModules.ts":{"path":"C:\\Users\\Samuel\\projects\\galactus\\src\\DestroyerOfModules.ts","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":9,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":8,"column":7}},"2":{"start":{"line":4,"column":36},"end":{"line":4,"column":97}},"3":{"start":{"line":4,"column":42},"end":{"line":4,"column":70}},"4":{"start":{"line":4,"column":85},"end":{"line":4,"column":95}},"5":{"start":{"line":5,"column":35},"end":{"line":5,"column":100}},"6":{"start":{"line":5,"column":41},"end":{"line":5,"column":73}},"7":{"start":{"line":5,"column":88},"end":{"line":5,"column":98}},"8":{"start":{"line":6,"column":32},"end":{"line":6,"column":149}},"9":{"start":{"line":6,"column":97},"end":{"line":6,"column":119}},"10":{"start":{"line":7,"column":8},"end":{"line":7,"column":78}},"11":{"start":{"line":10,"column":18},"end":{"line":36,"column":1}},"12":{"start":{"line":11,"column":12},"end":{"line":11,"column":104}},"13":{"start":{"line":11,"column":43},"end":{"line":11,"column":68}},"14":{"start":{"line":11,"column":57},"end":{"line":11,"column":68}},"15":{"start":{"line":11,"column":69},"end":{"line":11,"column":81}},"16":{"start":{"line":12,"column":4},"end":{"line":12,"column":157}},"17":{"start":{"line":12,"column":138},"end":{"line":12,"column":150}},"18":{"start":{"line":13,"column":23},"end":{"line":13,"column":68}},"19":{"start":{"line":13,"column":45},"end":{"line":13,"column":65}},"20":{"start":{"line":15,"column":8},"end":{"line":15,"column":70}},"21":{"start":{"line":15,"column":15},"end":{"line":15,"column":70}},"22":{"start":{"line":16,"column":8},"end":{"line":33,"column":66}},"23":{"start":{"line":16,"column":18},"end":{"line":33,"column":66}},"24":{"start":{"line":17,"column":12},"end":{"line":17,"column":127}},"25":{"start":{"line":17,"column":118},"end":{"line":17,"column":127}},"26":{"start":{"line":18,"column":12},"end":{"line":18,"column":44}},"27":{"start":{"line":18,"column":26},"end":{"line":18,"column":44}},"28":{"start":{"line":19,"column":12},"end":{"line":31,"column":13}},"29":{"start":{"line":20,"column":32},"end":{"line":20,"column":39}},"30":{"start":{"line":20,"column":40},"end":{"line":20,"column":46}},"31":{"start":{"line":21,"column":24},"end":{"line":21,"column":34}},"32":{"start":{"line":21,"column":35},"end":{"line":21,"column":72}},"33":{"start":{"line":22,"column":24},"end":{"line":22,"column":34}},"34":{"start":{"line":22,"column":35},"end":{"line":22,"column":45}},"35":{"start":{"line":22,"column":46},"end":{"line":22,"column":55}},"36":{"start":{"line":22,"column":56},"end":{"line":22,"column":65}},"37":{"start":{"line":23,"column":24},"end":{"line":23,"column":41}},"38":{"start":{"line":23,"column":42},"end":{"line":23,"column":55}},"39":{"start":{"line":23,"column":56},"end":{"line":23,"column":65}},"40":{"start":{"line":25,"column":20},"end":{"line":25,"column":128}},"41":{"start":{"line":25,"column":110},"end":{"line":25,"column":116}},"42":{"start":{"line":25,"column":117},"end":{"line":25,"column":126}},"43":{"start":{"line":26,"column":20},"end":{"line":26,"column":106}},"44":{"start":{"line":26,"column":81},"end":{"line":26,"column":97}},"45":{"start":{"line":26,"column":98},"end":{"line":26,"column":104}},"46":{"start":{"line":27,"column":20},"end":{"line":27,"column":89}},"47":{"start":{"line":27,"column":57},"end":{"line":27,"column":72}},"48":{"start":{"line":27,"column":73},"end":{"line":27,"column":80}},"49":{"start":{"line":27,"column":81},"end":{"line":27,"column":87}},"50":{"start":{"line":28,"column":20},"end":{"line":28,"column":87}},"51":{"start":{"line":28,"column":47},"end":{"line":28,"column":62}},"52":{"start":{"line":28,"column":63},"end":{"line":28,"column":78}},"53":{"start":{"line":28,"column":79},"end":{"line":28,"column":85}},"54":{"start":{"line":29,"column":20},"end":{"line":29,"column":42}},"55":{"start":{"line":29,"column":30},"end":{"line":29,"column":42}},"56":{"start":{"line":30,"column":20},"end":{"line":30,"column":33}},"57":{"start":{"line":30,"column":34},"end":{"line":30,"column":43}},"58":{"start":{"line":32,"column":12},"end":{"line":32,"column":39}},"59":{"start":{"line":33,"column":22},"end":{"line":33,"column":34}},"60":{"start":{"line":33,"column":35},"end":{"line":33,"column":41}},"61":{"start":{"line":33,"column":54},"end":{"line":33,"column":64}},"62":{"start":{"line":34,"column":8},"end":{"line":34,"column":35}},"63":{"start":{"line":34,"column":23},"end":{"line":34,"column":35}},"64":{"start":{"line":34,"column":36},"end":{"line":34,"column":89}},"65":{"start":{"line":37,"column":0},"end":{"line":37,"column":62}},"66":{"start":{"line":38,"column":9},"end":{"line":38,"column":28}},"67":{"start":{"line":39,"column":11},"end":{"line":39,"column":26}},"68":{"start":{"line":40,"column":23},"end":{"line":40,"column":48}},"69":{"start":{"line":41,"column":40},"end":{"line":161,"column":3}},"70":{"start":{"line":43,"column":28},"end":{"line":43,"column":44}},"71":{"start":{"line":43,"column":55},"end":{"line":43,"column":64}},"72":{"start":{"line":43,"column":89},"end":{"line":43,"column":112}},"73":{"start":{"line":44,"column":8},"end":{"line":52,"column":9}},"74":{"start":{"line":45,"column":12},"end":{"line":45,"column":69}},"75":{"start":{"line":47,"column":13},"end":{"line":52,"column":9}},"76":{"start":{"line":48,"column":12},"end":{"line":48,"column":33}},"77":{"start":{"line":51,"column":12},"end":{"line":51,"column":84}},"78":{"start":{"line":53,"column":8},"end":{"line":55,"column":9}},"79":{"start":{"line":54,"column":12},"end":{"line":54,"column":53}},"80":{"start":{"line":57,"column":4},"end":{"line":112,"column":6}},"81":{"start":{"line":58,"column":8},"end":{"line":111,"column":11}},"82":{"start":{"line":60,"column":12},"end":{"line":110,"column":15}},"83":{"start":{"line":61,"column":16},"end":{"line":109,"column":17}},"84":{"start":{"line":63,"column":24},"end":{"line":63,"column":59}},"85":{"start":{"line":64,"column":24},"end":{"line":64,"column":62}},"86":{"start":{"line":64,"column":37},"end":{"line":64,"column":62}},"87":{"start":{"line":65,"column":24},"end":{"line":65,"column":83}},"88":{"start":{"line":66,"column":24},"end":{"line":66,"column":77}},"89":{"start":{"line":68,"column":24},"end":{"line":70,"column":25}},"90":{"start":{"line":69,"column":28},"end":{"line":69,"column":50}},"91":{"start":{"line":71,"column":24},"end":{"line":71,"column":31}},"92":{"start":{"line":72,"column":24},"end":{"line":72,"column":74}},"93":{"start":{"line":74,"column":24},"end":{"line":74,"column":39}},"94":{"start":{"line":75,"column":24},"end":{"line":75,"column":37}},"95":{"start":{"line":77,"column":24},"end":{"line":77,"column":72}},"96":{"start":{"line":77,"column":47},"end":{"line":77,"column":72}},"97":{"start":{"line":78,"column":24},"end":{"line":78,"column":47}},"98":{"start":{"line":79,"column":24},"end":{"line":79,"column":84}},"99":{"start":{"line":79,"column":60},"end":{"line":79,"column":84}},"100":{"start":{"line":80,"column":24},"end":{"line":80,"column":31}},"101":{"start":{"line":81,"column":24},"end":{"line":81,"column":103}},"102":{"start":{"line":83,"column":24},"end":{"line":83,"column":39}},"103":{"start":{"line":84,"column":24},"end":{"line":84,"column":37}},"104":{"start":{"line":86,"column":24},"end":{"line":86,"column":71}},"105":{"start":{"line":86,"column":47},"end":{"line":86,"column":71}},"106":{"start":{"line":87,"column":24},"end":{"line":87,"column":53}},"107":{"start":{"line":88,"column":24},"end":{"line":88,"column":143}},"108":{"start":{"line":90,"column":24},"end":{"line":90,"column":34}},"109":{"start":{"line":91,"column":24},"end":{"line":91,"column":37}},"110":{"start":{"line":93,"column":24},"end":{"line":93,"column":29}},"111":{"start":{"line":94,"column":24},"end":{"line":94,"column":48}},"112":{"start":{"line":95,"column":28},"end":{"line":95,"column":53}},"113":{"start":{"line":96,"column":28},"end":{"line":96,"column":126}},"114":{"start":{"line":98,"column":24},"end":{"line":98,"column":34}},"115":{"start":{"line":99,"column":24},"end":{"line":99,"column":38}},"116":{"start":{"line":101,"column":24},"end":{"line":101,"column":29}},"117":{"start":{"line":102,"column":24},"end":{"line":102,"column":48}},"118":{"start":{"line":103,"column":29},"end":{"line":103,"column":54}},"119":{"start":{"line":104,"column":29},"end":{"line":104,"column":73}},"120":{"start":{"line":106,"column":24},"end":{"line":106,"column":34}},"121":{"start":{"line":107,"column":24},"end":{"line":107,"column":38}},"122":{"start":{"line":108,"column":29},"end":{"line":108,"column":51}},"123":{"start":{"line":113,"column":4},"end":{"line":137,"column":6}},"124":{"start":{"line":114,"column":17},"end":{"line":114,"column":33}},"125":{"start":{"line":114,"column":51},"end":{"line":114,"column":77}},"126":{"start":{"line":115,"column":8},"end":{"line":136,"column":11}},"127":{"start":{"line":117,"column":12},"end":{"line":135,"column":15}},"128":{"start":{"line":118,"column":16},"end":{"line":134,"column":17}},"129":{"start":{"line":119,"column":28},"end":{"line":119,"column":73}},"130":{"start":{"line":121,"column":24},"end":{"line":121,"column":44}},"131":{"start":{"line":122,"column":24},"end":{"line":122,"column":46}},"132":{"start":{"line":123,"column":24},"end":{"line":132,"column":25}},"133":{"start":{"line":124,"column":28},"end":{"line":124,"column":51}},"134":{"start":{"line":125,"column":28},"end":{"line":131,"column":29}},"135":{"start":{"line":126,"column":32},"end":{"line":126,"column":57}},"136":{"start":{"line":127,"column":32},"end":{"line":129,"column":33}},"137":{"start":{"line":128,"column":36},"end":{"line":128,"column":117}},"138":{"start":{"line":130,"column":32},"end":{"line":130,"column":66}},"139":{"start":{"line":133,"column":24},"end":{"line":133,"column":57}},"140":{"start":{"line":138,"column":4},"end":{"line":154,"column":6}},"141":{"start":{"line":139,"column":8},"end":{"line":153,"column":11}},"142":{"start":{"line":141,"column":12},"end":{"line":152,"column":15}},"143":{"start":{"line":142,"column":16},"end":{"line":151,"column":17}},"144":{"start":{"line":144,"column":24},"end":{"line":144,"column":48}},"145":{"start":{"line":145,"column":24},"end":{"line":145,"column":59}},"146":{"start":{"line":146,"column":24},"end":{"line":146,"column":96}},"147":{"start":{"line":147,"column":28},"end":{"line":147,"column":89}},"148":{"start":{"line":149,"column":24},"end":{"line":149,"column":34}},"149":{"start":{"line":150,"column":24},"end":{"line":150,"column":46}},"150":{"start":{"line":155,"column":4},"end":{"line":159,"column":6}},"151":{"start":{"line":156,"column":23},"end":{"line":156,"column":130}},"152":{"start":{"line":157,"column":25},"end":{"line":157,"column":92}},"153":{"start":{"line":158,"column":8},"end":{"line":158,"column":26}},"154":{"start":{"line":160,"column":4},"end":{"line":160,"column":30}},"155":{"start":{"line":162,"column":0},"end":{"line":162,"column":48}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":44},"end":{"line":2,"column":45}},"loc":{"start":{"line":2,"column":89},"end":{"line":9,"column":1}},"line":2},"1":{"name":"(anonymous_1)","decl":{"start":{"line":3,"column":36},"end":{"line":3,"column":37}},"loc":{"start":{"line":3,"column":63},"end":{"line":8,"column":5}},"line":3},"2":{"name":"fulfilled","decl":{"start":{"line":4,"column":17},"end":{"line":4,"column":26}},"loc":{"start":{"line":4,"column":34},"end":{"line":4,"column":99}},"line":4},"3":{"name":"rejected","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":25}},"loc":{"start":{"line":5,"column":33},"end":{"line":5,"column":102}},"line":5},"4":{"name":"step","decl":{"start":{"line":6,"column":17},"end":{"line":6,"column":21}},"loc":{"start":{"line":6,"column":30},"end":{"line":6,"column":151}},"line":6},"5":{"name":"(anonymous_5)","decl":{"start":{"line":6,"column":76},"end":{"line":6,"column":77}},"loc":{"start":{"line":6,"column":95},"end":{"line":6,"column":121}},"line":6},"6":{"name":"(anonymous_6)","decl":{"start":{"line":10,"column":48},"end":{"line":10,"column":49}},"loc":{"start":{"line":10,"column":73},"end":{"line":36,"column":1}},"line":10},"7":{"name":"(anonymous_7)","decl":{"start":{"line":11,"column":30},"end":{"line":11,"column":31}},"loc":{"start":{"line":11,"column":41},"end":{"line":11,"column":83}},"line":11},"8":{"name":"(anonymous_8)","decl":{"start":{"line":12,"column":125},"end":{"line":12,"column":126}},"loc":{"start":{"line":12,"column":136},"end":{"line":12,"column":152}},"line":12},"9":{"name":"verb","decl":{"start":{"line":13,"column":13},"end":{"line":13,"column":17}},"loc":{"start":{"line":13,"column":21},"end":{"line":13,"column":70}},"line":13},"10":{"name":"(anonymous_10)","decl":{"start":{"line":13,"column":30},"end":{"line":13,"column":31}},"loc":{"start":{"line":13,"column":43},"end":{"line":13,"column":67}},"line":13},"11":{"name":"step","decl":{"start":{"line":14,"column":13},"end":{"line":14,"column":17}},"loc":{"start":{"line":14,"column":22},"end":{"line":35,"column":5}},"line":14},"12":{"name":"(anonymous_12)","decl":{"start":{"line":41,"column":40},"end":{"line":41,"column":41}},"loc":{"start":{"line":41,"column":52},"end":{"line":161,"column":1}},"line":41},"13":{"name":"DestroyerOfModules","decl":{"start":{"line":42,"column":13},"end":{"line":42,"column":31}},"loc":{"start":{"line":42,"column":36},"end":{"line":56,"column":5}},"line":42},"14":{"name":"(anonymous_14)","decl":{"start":{"line":57,"column":49},"end":{"line":57,"column":50}},"loc":{"start":{"line":57,"column":82},"end":{"line":112,"column":5}},"line":57},"15":{"name":"(anonymous_15)","decl":{"start":{"line":58,"column":47},"end":{"line":58,"column":48}},"loc":{"start":{"line":58,"column":59},"end":{"line":111,"column":9}},"line":58},"16":{"name":"(anonymous_16)","decl":{"start":{"line":60,"column":37},"end":{"line":60,"column":38}},"loc":{"start":{"line":60,"column":51},"end":{"line":110,"column":13}},"line":60},"17":{"name":"(anonymous_17)","decl":{"start":{"line":113,"column":54},"end":{"line":113,"column":55}},"loc":{"start":{"line":113,"column":68},"end":{"line":137,"column":5}},"line":113},"18":{"name":"(anonymous_18)","decl":{"start":{"line":115,"column":47},"end":{"line":115,"column":48}},"loc":{"start":{"line":115,"column":59},"end":{"line":136,"column":9}},"line":115},"19":{"name":"(anonymous_19)","decl":{"start":{"line":117,"column":37},"end":{"line":117,"column":38}},"loc":{"start":{"line":117,"column":51},"end":{"line":135,"column":13}},"line":117},"20":{"name":"(anonymous_20)","decl":{"start":{"line":138,"column":43},"end":{"line":138,"column":44}},"loc":{"start":{"line":138,"column":55},"end":{"line":154,"column":5}},"line":138},"21":{"name":"(anonymous_21)","decl":{"start":{"line":139,"column":47},"end":{"line":139,"column":48}},"loc":{"start":{"line":139,"column":59},"end":{"line":153,"column":9}},"line":139},"22":{"name":"(anonymous_22)","decl":{"start":{"line":141,"column":37},"end":{"line":141,"column":38}},"loc":{"start":{"line":141,"column":51},"end":{"line":152,"column":13}},"line":141},"23":{"name":"(anonymous_23)","decl":{"start":{"line":155,"column":52},"end":{"line":155,"column":53}},"loc":{"start":{"line":155,"column":70},"end":{"line":159,"column":5}},"line":155}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":16},"end":{"line":9,"column":1}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":9,"column":1}}],"line":2},"1":{"loc":{"start":{"line":3,"column":16},"end":{"line":3,"column":34}},"type":"binary-expr","locations":[{"start":{"line":3,"column":16},"end":{"line":3,"column":17}},{"start":{"line":3,"column":22},"end":{"line":3,"column":33}}],"line":3},"2":{"loc":{"start":{"line":6,"column":32},"end":{"line":6,"column":148}},"type":"cond-expr","locations":[{"start":{"line":6,"column":46},"end":{"line":6,"column":67}},{"start":{"line":6,"column":70},"end":{"line":6,"column":148}}],"line":6},"3":{"loc":{"start":{"line":7,"column":51},"end":{"line":7,"column":67}},"type":"binary-expr","locations":[{"start":{"line":7,"column":51},"end":{"line":7,"column":61}},{"start":{"line":7,"column":65},"end":{"line":7,"column":67}}],"line":7},"4":{"loc":{"start":{"line":10,"column":18},"end":{"line":36,"column":1}},"type":"binary-expr","locations":[{"start":{"line":10,"column":19},"end":{"line":10,"column":23}},{"start":{"line":10,"column":27},"end":{"line":10,"column":43}},{"start":{"line":10,"column":48},"end":{"line":36,"column":1}}],"line":10},"5":{"loc":{"start":{"line":11,"column":43},"end":{"line":11,"column":68}},"type":"if","locations":[{"start":{"line":11,"column":43},"end":{"line":11,"column":68}},{"start":{"line":11,"column":43},"end":{"line":11,"column":68}}],"line":11},"6":{"loc":{"start":{"line":12,"column":71},"end":{"line":12,"column":153}},"type":"binary-expr","locations":[{"start":{"line":12,"column":71},"end":{"line":12,"column":99}},{"start":{"line":12,"column":104},"end":{"line":12,"column":152}}],"line":12},"7":{"loc":{"start":{"line":15,"column":8},"end":{"line":15,"column":70}},"type":"if","locations":[{"start":{"line":15,"column":8},"end":{"line":15,"column":70}},{"start":{"line":15,"column":8},"end":{"line":15,"column":70}}],"line":15},"8":{"loc":{"start":{"line":17,"column":12},"end":{"line":17,"column":127}},"type":"if","locations":[{"start":{"line":17,"column":12},"end":{"line":17,"column":127}},{"start":{"line":17,"column":12},"end":{"line":17,"column":127}}],"line":17},"9":{"loc":{"start":{"line":17,"column":23},"end":{"line":17,"column":116}},"type":"binary-expr","locations":[{"start":{"line":17,"column":23},"end":{"line":17,"column":24}},{"start":{"line":17,"column":29},"end":{"line":17,"column":83}},{"start":{"line":17,"column":88},"end":{"line":17,"column":116}}],"line":17},"10":{"loc":{"start":{"line":17,"column":35},"end":{"line":17,"column":82}},"type":"cond-expr","locations":[{"start":{"line":17,"column":47},"end":{"line":17,"column":55}},{"start":{"line":17,"column":58},"end":{"line":17,"column":82}}],"line":17},"11":{"loc":{"start":{"line":17,"column":58},"end":{"line":17,"column":82}},"type":"cond-expr","locations":[{"start":{"line":17,"column":66},"end":{"line":17,"column":73}},{"start":{"line":17,"column":76},"end":{"line":17,"column":82}}],"line":17},"12":{"loc":{"start":{"line":18,"column":12},"end":{"line":18,"column":44}},"type":"if","locations":[{"start":{"line":18,"column":12},"end":{"line":18,"column":44}},{"start":{"line":18,"column":12},"end":{"line":18,"column":44}}],"line":18},"13":{"loc":{"start":{"line":19,"column":12},"end":{"line":31,"column":13}},"type":"switch","locations":[{"start":{"line":20,"column":16},"end":{"line":20,"column":23}},{"start":{"line":20,"column":24},"end":{"line":20,"column":46}},{"start":{"line":21,"column":16},"end":{"line":21,"column":72}},{"start":{"line":22,"column":16},"end":{"line":22,"column":65}},{"start":{"line":23,"column":16},"end":{"line":23,"column":65}},{"start":{"line":24,"column":16},"end":{"line":30,"column":43}}],"line":19},"14":{"loc":{"start":{"line":25,"column":20},"end":{"line":25,"column":128}},"type":"if","locations":[{"start":{"line":25,"column":20},"end":{"line":25,"column":128}},{"start":{"line":25,"column":20},"end":{"line":25,"column":128}}],"line":25},"15":{"loc":{"start":{"line":25,"column":24},"end":{"line":25,"column":106}},"type":"binary-expr","locations":[{"start":{"line":25,"column":24},"end":{"line":25,"column":74}},{"start":{"line":25,"column":79},"end":{"line":25,"column":90}},{"start":{"line":25,"column":94},"end":{"line":25,"column":105}}],"line":25},"16":{"loc":{"start":{"line":25,"column":42},"end":{"line":25,"column":73}},"type":"binary-expr","locations":[{"start":{"line":25,"column":42},"end":{"line":25,"column":54}},{"start":{"line":25,"column":58},"end":{"line":25,"column":73}}],"line":25},"17":{"loc":{"start":{"line":26,"column":20},"end":{"line":26,"column":106}},"type":"if","locations":[{"start":{"line":26,"column":20},"end":{"line":26,"column":106}},{"start":{"line":26,"column":20},"end":{"line":26,"column":106}}],"line":26},"18":{"loc":{"start":{"line":26,"column":24},"end":{"line":26,"column":77}},"type":"binary-expr","locations":[{"start":{"line":26,"column":24},"end":{"line":26,"column":35}},{"start":{"line":26,"column":40},"end":{"line":26,"column":42}},{"start":{"line":26,"column":47},"end":{"line":26,"column":59}},{"start":{"line":26,"column":63},"end":{"line":26,"column":75}}],"line":26},"19":{"loc":{"start":{"line":27,"column":20},"end":{"line":27,"column":89}},"type":"if","locations":[{"start":{"line":27,"column":20},"end":{"line":27,"column":89}},{"start":{"line":27,"column":20},"end":{"line":27,"column":89}}],"line":27},"20":{"loc":{"start":{"line":27,"column":24},"end":{"line":27,"column":53}},"type":"binary-expr","locations":[{"start":{"line":27,"column":24},"end":{"line":27,"column":35}},{"start":{"line":27,"column":39},"end":{"line":27,"column":53}}],"line":27},"21":{"loc":{"start":{"line":28,"column":20},"end":{"line":28,"column":87}},"type":"if","locations":[{"start":{"line":28,"column":20},"end":{"line":28,"column":87}},{"start":{"line":28,"column":20},"end":{"line":28,"column":87}}],"line":28},"22":{"loc":{"start":{"line":28,"column":24},"end":{"line":28,"column":43}},"type":"binary-expr","locations":[{"start":{"line":28,"column":24},"end":{"line":28,"column":25}},{"start":{"line":28,"column":29},"end":{"line":28,"column":43}}],"line":28},"23":{"loc":{"start":{"line":29,"column":20},"end":{"line":29,"column":42}},"type":"if","locations":[{"start":{"line":29,"column":20},"end":{"line":29,"column":42}},{"start":{"line":29,"column":20},"end":{"line":29,"column":42}}],"line":29},"24":{"loc":{"start":{"line":34,"column":8},"end":{"line":34,"column":35}},"type":"if","locations":[{"start":{"line":34,"column":8},"end":{"line":34,"column":35}},{"start":{"line":34,"column":8},"end":{"line":34,"column":35}}],"line":34},"25":{"loc":{"start":{"line":34,"column":52},"end":{"line":34,"column":74}},"type":"cond-expr","locations":[{"start":{"line":34,"column":60},"end":{"line":34,"column":65}},{"start":{"line":34,"column":68},"end":{"line":34,"column":74}}],"line":34},"26":{"loc":{"start":{"line":44,"column":8},"end":{"line":52,"column":9}},"type":"if","locations":[{"start":{"line":44,"column":8},"end":{"line":52,"column":9}},{"start":{"line":44,"column":8},"end":{"line":52,"column":9}}],"line":44},"27":{"loc":{"start":{"line":47,"column":13},"end":{"line":52,"column":9}},"type":"if","locations":[{"start":{"line":47,"column":13},"end":{"line":52,"column":9}},{"start":{"line":47,"column":13},"end":{"line":52,"column":9}}],"line":47},"28":{"loc":{"start":{"line":53,"column":8},"end":{"line":55,"column":9}},"type":"if","locations":[{"start":{"line":53,"column":8},"end":{"line":55,"column":9}},{"start":{"line":53,"column":8},"end":{"line":55,"column":9}}],"line":53},"29":{"loc":{"start":{"line":61,"column":16},"end":{"line":109,"column":17}},"type":"switch","locations":[{"start":{"line":62,"column":20},"end":{"line":66,"column":77}},{"start":{"line":67,"column":20},"end":{"line":72,"column":74}},{"start":{"line":73,"column":20},"end":{"line":75,"column":37}},{"start":{"line":76,"column":20},"end":{"line":81,"column":103}},{"start":{"line":82,"column":20},"end":{"line":84,"column":37}},{"start":{"line":85,"column":20},"end":{"line":88,"column":143}},{"start":{"line":89,"column":20},"end":{"line":91,"column":37}},{"start":{"line":92,"column":20},"end":{"line":94,"column":48}},{"start":{"line":95,"column":20},"end":{"line":95,"column":53}},{"start":{"line":96,"column":20},"end":{"line":96,"column":126}},{"start":{"line":97,"column":20},"end":{"line":99,"column":38}},{"start":{"line":100,"column":20},"end":{"line":102,"column":48}},{"start":{"line":103,"column":20},"end":{"line":103,"column":54}},{"start":{"line":104,"column":20},"end":{"line":104,"column":73}},{"start":{"line":105,"column":20},"end":{"line":107,"column":38}},{"start":{"line":108,"column":20},"end":{"line":108,"column":51}}],"line":61},"30":{"loc":{"start":{"line":64,"column":24},"end":{"line":64,"column":62}},"type":"if","locations":[{"start":{"line":64,"column":24},"end":{"line":64,"column":62}},{"start":{"line":64,"column":24},"end":{"line":64,"column":62}}],"line":64},"31":{"loc":{"start":{"line":68,"column":24},"end":{"line":70,"column":25}},"type":"if","locations":[{"start":{"line":68,"column":24},"end":{"line":70,"column":25}},{"start":{"line":68,"column":24},"end":{"line":70,"column":25}}],"line":68},"32":{"loc":{"start":{"line":77,"column":24},"end":{"line":77,"column":72}},"type":"if","locations":[{"start":{"line":77,"column":24},"end":{"line":77,"column":72}},{"start":{"line":77,"column":24},"end":{"line":77,"column":72}}],"line":77},"33":{"loc":{"start":{"line":79,"column":24},"end":{"line":79,"column":84}},"type":"if","locations":[{"start":{"line":79,"column":24},"end":{"line":79,"column":84}},{"start":{"line":79,"column":24},"end":{"line":79,"column":84}}],"line":79},"34":{"loc":{"start":{"line":86,"column":24},"end":{"line":86,"column":71}},"type":"if","locations":[{"start":{"line":86,"column":24},"end":{"line":86,"column":71}},{"start":{"line":86,"column":24},"end":{"line":86,"column":71}}],"line":86},"35":{"loc":{"start":{"line":114,"column":51},"end":{"line":114,"column":77}},"type":"cond-expr","locations":[{"start":{"line":114,"column":67},"end":{"line":114,"column":72}},{"start":{"line":114,"column":75},"end":{"line":114,"column":77}}],"line":114},"36":{"loc":{"start":{"line":118,"column":16},"end":{"line":134,"column":17}},"type":"switch","locations":[{"start":{"line":119,"column":20},"end":{"line":119,"column":73}},{"start":{"line":120,"column":20},"end":{"line":133,"column":57}}],"line":118},"37":{"loc":{"start":{"line":125,"column":28},"end":{"line":131,"column":29}},"type":"if","locations":[{"start":{"line":125,"column":28},"end":{"line":131,"column":29}},{"start":{"line":125,"column":28},"end":{"line":131,"column":29}}],"line":125},"38":{"loc":{"start":{"line":127,"column":32},"end":{"line":129,"column":33}},"type":"if","locations":[{"start":{"line":127,"column":32},"end":{"line":129,"column":33}},{"start":{"line":127,"column":32},"end":{"line":129,"column":33}}],"line":127},"39":{"loc":{"start":{"line":142,"column":16},"end":{"line":151,"column":17}},"type":"switch","locations":[{"start":{"line":143,"column":20},"end":{"line":146,"column":96}},{"start":{"line":147,"column":20},"end":{"line":147,"column":89}},{"start":{"line":148,"column":20},"end":{"line":150,"column":46}}],"line":142},"40":{"loc":{"start":{"line":156,"column":23},"end":{"line":156,"column":130}},"type":"binary-expr","locations":[{"start":{"line":156,"column":23},"end":{"line":156,"column":70}},{"start":{"line":156,"column":74},"end":{"line":156,"column":130}}],"line":156},"41":{"loc":{"start":{"line":157,"column":25},"end":{"line":157,"column":92}},"type":"cond-expr","locations":[{"start":{"line":157,"column":45},"end":{"line":157,"column":80}},{"start":{"line":157,"column":83},"end":{"line":157,"column":92}}],"line":157}},"s":{"0":1,"1":220,"2":437,"3":437,"4":0,"5":0,"6":0,"7":0,"8":657,"9":437,"10":220,"11":1,"12":220,"13":437,"14":0,"15":437,"16":220,"17":0,"18":660,"19":657,"20":657,"21":0,"22":657,"23":1729,"24":1729,"25":0,"26":1729,"27":0,"28":1729,"29":657,"30":657,"31":437,"32":437,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":635,"41":220,"42":220,"43":415,"44":415,"45":415,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":1072,"59":0,"60":0,"61":1729,"62":220,"63":0,"64":220,"65":1,"66":1,"67":1,"68":1,"69":1,"70":21,"71":21,"72":21,"73":21,"74":11,"75":10,"76":9,"77":1,"78":20,"79":1,"80":1,"81":181,"82":181,"83":975,"84":181,"85":181,"86":55,"87":126,"88":126,"89":126,"90":108,"91":18,"92":18,"93":18,"94":18,"95":144,"96":18,"97":126,"98":126,"99":108,"100":18,"101":18,"102":18,"103":18,"104":72,"105":18,"106":54,"107":54,"108":54,"109":54,"110":54,"111":54,"112":18,"113":108,"114":108,"115":108,"116":126,"117":126,"118":18,"119":55,"120":55,"121":55,"122":73,"123":1,"124":20,"125":20,"126":20,"127":20,"128":40,"129":20,"130":20,"131":20,"132":20,"133":180,"134":180,"135":133,"136":133,"137":7,"138":133,"139":20,"140":1,"141":19,"142":19,"143":57,"144":19,"145":19,"146":19,"147":19,"148":19,"149":19,"150":1,"151":180,"152":180,"153":180,"154":1,"155":1},"f":{"0":220,"1":220,"2":437,"3":0,"4":657,"5":437,"6":220,"7":437,"8":0,"9":660,"10":657,"11":657,"12":1,"13":21,"14":181,"15":181,"16":975,"17":20,"18":20,"19":40,"20":19,"21":19,"22":57,"23":180},"b":{"0":[1,1,1],"1":[220,220],"2":[220,437],"3":[220,220],"4":[1,1,1],"5":[0,437],"6":[220,220],"7":[0,657],"8":[0,1729],"9":[1729,0,0],"10":[0,0],"11":[0,0],"12":[0,1729],"13":[657,657,437,0,0,635],"14":[220,415],"15":[635,635,635],"16":[635,0],"17":[415,0],"18":[415,415,0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,220],"25":[220,0],"26":[11,10],"27":[9,1],"28":[1,19],"29":[181,126,18,144,18,72,54,54,18,108,108,126,18,55,55,73],"30":[55,126],"31":[108,18],"32":[18,126],"33":[108,18],"34":[18,54],"35":[0,20],"36":[20,20],"37":[133,47],"38":[7,126],"39":[19,19,19],"40":[180,140],"41":[9,171]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"23fb4381ed34e5bf4939e8e500e2a545e2dae1ec","contentHash":"2572ea0d5525b52a410f31cb2bed525f_11.4.1"}} \ No newline at end of file
diff --git a/node_modules/galactus/README.md b/node_modules/galactus/README.md
new file mode 100644
index 0000000..0f95c69
--- /dev/null
+++ b/node_modules/galactus/README.md
@@ -0,0 +1,46 @@
+Galactus
+-----------
+
+> A JS implementation of `prune --production`
+
+## Installation
+
+```bash
+npm i --save-dev galactus
+```
+
+## API
+
+### Class: `DestroyerOfModules`
+
+```js
+import { DestroyerOfModules } from 'galactus';
+
+// modulePath is the root folder of your module
+const destroyer = new DestroyerOfModules({
+ rootDirectory: __dirname,
+ // Optionally provide your own walker from 'flora-colossus'
+ walker: myWalker,
+ // Optionally provide a method to override the default
+ // keep or destroy test
+ shouldKeepModuleTest: (module, isDepDep) => true,
+});
+```
+
+#### `destroyer.destroy()`
+
+Returns a `Promise` that resolves once the destruction is complete. By default
+it will destroy all dependencies that aren't required for production or
+optional dependencies. You can override this behavior by providing a
+`shouldKeepModuleTest` function in the constructor.
+
+#### `destroyer.collectKeptModules()`
+
+Returns a `Promise` of a `ModuleMap` (a `Map` of paths to `Module`s). The
+`Promise` resolves when the walker finishes walking the module tree. The
+`ModuleMap` only contains the `Module`s that would be kept by a call
+to `destroy()`.
+
+There is one optional keyword argument, `relativePaths`. By default, the paths
+in the `ModuleMap` are absolute. If `relativePaths` is `true`, they are relative
+to the `rootDirectory` specified in the constructor.
diff --git a/node_modules/galactus/lib/DestroyerOfModules.d.ts b/node_modules/galactus/lib/DestroyerOfModules.d.ts
new file mode 100644
index 0000000..482f30c
--- /dev/null
+++ b/node_modules/galactus/lib/DestroyerOfModules.d.ts
@@ -0,0 +1,18 @@
+import { Module, Walker } from 'flora-colossus';
+export declare type ShouldKeepModuleTest = (module: Module, isDevDep: boolean) => boolean;
+export declare type ModuleMap = Map<string, Module>;
+export declare class DestroyerOfModules {
+ private walker;
+ private shouldKeepFn;
+ constructor({rootDirectory, walker, shouldKeepModuleTest}: {
+ rootDirectory?: string;
+ walker?: Walker;
+ shouldKeepModuleTest?: ShouldKeepModuleTest;
+ });
+ destroyModule(modulePath: string, moduleMap: ModuleMap): Promise<void>;
+ collectKeptModules({relativePaths}: {
+ relativePaths: boolean;
+ }): Promise<ModuleMap>;
+ destroy(): Promise<void>;
+ private shouldKeepModule(module);
+}
diff --git a/node_modules/galactus/lib/DestroyerOfModules.js b/node_modules/galactus/lib/DestroyerOfModules.js
new file mode 100644
index 0000000..659f2f1
--- /dev/null
+++ b/node_modules/galactus/lib/DestroyerOfModules.js
@@ -0,0 +1,164 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [0, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var fs = require("fs-extra");
+var path = require("path");
+var flora_colossus_1 = require("flora-colossus");
+var DestroyerOfModules = /** @class */ (function () {
+ function DestroyerOfModules(_a) {
+ var rootDirectory = _a.rootDirectory, walker = _a.walker, shouldKeepModuleTest = _a.shouldKeepModuleTest;
+ if (rootDirectory) {
+ this.walker = new flora_colossus_1.Walker(rootDirectory);
+ }
+ else if (walker) {
+ this.walker = walker;
+ }
+ else {
+ throw new Error('Must either provide rootDirectory or walker argument');
+ }
+ if (shouldKeepModuleTest) {
+ this.shouldKeepFn = shouldKeepModuleTest;
+ }
+ }
+ DestroyerOfModules.prototype.destroyModule = function (modulePath, moduleMap) {
+ return __awaiter(this, void 0, void 0, function () {
+ var module, nodeModulesPath, _i, _a, subModuleName, _b, _c, subScopedModuleName;
+ return __generator(this, function (_d) {
+ switch (_d.label) {
+ case 0:
+ module = moduleMap.get(modulePath);
+ if (!module) return [3 /*break*/, 13];
+ nodeModulesPath = path.resolve(modulePath, 'node_modules');
+ return [4 /*yield*/, fs.pathExists(nodeModulesPath)];
+ case 1:
+ if (!(_d.sent())) {
+ return [2 /*return*/];
+ }
+ _i = 0;
+ return [4 /*yield*/, fs.readdir(nodeModulesPath)];
+ case 2:
+ _a = _d.sent();
+ _d.label = 3;
+ case 3:
+ if (!(_i < _a.length)) return [3 /*break*/, 12];
+ subModuleName = _a[_i];
+ if (!subModuleName.startsWith('@')) return [3 /*break*/, 9];
+ _b = 0;
+ return [4 /*yield*/, fs.readdir(path.resolve(nodeModulesPath, subModuleName))];
+ case 4:
+ _c = _d.sent();
+ _d.label = 5;
+ case 5:
+ if (!(_b < _c.length)) return [3 /*break*/, 8];
+ subScopedModuleName = _c[_b];
+ return [4 /*yield*/, this.destroyModule(path.resolve(nodeModulesPath, subModuleName, subScopedModuleName), moduleMap)];
+ case 6:
+ _d.sent();
+ _d.label = 7;
+ case 7:
+ _b++;
+ return [3 /*break*/, 5];
+ case 8: return [3 /*break*/, 11];
+ case 9: return [4 /*yield*/, this.destroyModule(path.resolve(nodeModulesPath, subModuleName), moduleMap)];
+ case 10:
+ _d.sent();
+ _d.label = 11;
+ case 11:
+ _i++;
+ return [3 /*break*/, 3];
+ case 12: return [3 /*break*/, 15];
+ case 13: return [4 /*yield*/, fs.remove(modulePath)];
+ case 14:
+ _d.sent();
+ _d.label = 15;
+ case 15: return [2 /*return*/];
+ }
+ });
+ });
+ };
+ DestroyerOfModules.prototype.collectKeptModules = function (_a) {
+ var _b = _a.relativePaths, relativePaths = _b === void 0 ? false : _b;
+ return __awaiter(this, void 0, void 0, function () {
+ var modules, moduleMap, rootPath, _i, modules_1, module_1, modulePath;
+ return __generator(this, function (_c) {
+ switch (_c.label) {
+ case 0: return [4 /*yield*/, this.walker.walkTree()];
+ case 1:
+ modules = _c.sent();
+ moduleMap = new Map();
+ rootPath = path.resolve(this.walker.getRootModule());
+ for (_i = 0, modules_1 = modules; _i < modules_1.length; _i++) {
+ module_1 = modules_1[_i];
+ if (this.shouldKeepModule(module_1)) {
+ modulePath = module_1.path;
+ if (relativePaths) {
+ modulePath = modulePath.replace("" + rootPath + path.sep, '');
+ }
+ moduleMap.set(modulePath, module_1);
+ }
+ }
+ return [2 /*return*/, moduleMap];
+ }
+ });
+ });
+ };
+ DestroyerOfModules.prototype.destroy = function () {
+ return __awaiter(this, void 0, void 0, function () {
+ var _a, _b;
+ return __generator(this, function (_c) {
+ switch (_c.label) {
+ case 0:
+ _a = this.destroyModule;
+ _b = [this.walker.getRootModule()];
+ return [4 /*yield*/, this.collectKeptModules({ relativePaths: false })];
+ case 1: return [4 /*yield*/, _a.apply(this, _b.concat([_c.sent()]))];
+ case 2:
+ _c.sent();
+ return [2 /*return*/];
+ }
+ });
+ });
+ };
+ DestroyerOfModules.prototype.shouldKeepModule = function (module) {
+ var isDevDep = module.depType === flora_colossus_1.DepType.DEV || module.depType === flora_colossus_1.DepType.DEV_OPTIONAL;
+ var shouldKeep = this.shouldKeepFn ? this.shouldKeepFn(module, isDevDep) : !isDevDep;
+ return shouldKeep;
+ };
+ return DestroyerOfModules;
+}());
+exports.DestroyerOfModules = DestroyerOfModules;
+//# sourceMappingURL=DestroyerOfModules.js.map \ No newline at end of file
diff --git a/node_modules/galactus/lib/DestroyerOfModules.js.map b/node_modules/galactus/lib/DestroyerOfModules.js.map
new file mode 100644
index 0000000..a5302bc
--- /dev/null
+++ b/node_modules/galactus/lib/DestroyerOfModules.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DestroyerOfModules.js","sourceRoot":"","sources":["../src/DestroyerOfModules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,2BAA6B;AAE7B,iDAAyD;AAMzD;IAIE,4BAAY,EAQX;YAPC,gCAAa,EACb,kBAAM,EACN,8CAAoB;QAMpB,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAM,CAAC,aAAa,CAAC,CAAC;QAC1C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC1E,CAAC;QACD,EAAE,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC;YACzB,IAAI,CAAC,YAAY,GAAG,oBAAoB,CAAC;QAC3C,CAAC;IACH,CAAC;IAEY,0CAAa,GAA1B,UAA2B,UAAkB,EAAE,SAAoB;;;;;;wBAC3D,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;6BACrC,MAAM,EAAN,yBAAM;wBACF,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;wBAC5D,qBAAM,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAA;;wBAAzC,EAAE,CAAC,CAAC,CAAC,CAAA,SAAoC,CAAA,CAAC,CAAC,CAAC;4BAC1C,MAAM,gBAAC;wBACT,CAAC;8BAE4D;wBAAjC,qBAAM,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,EAAA;;wBAAjC,KAAA,SAAiC;;;6BAAjC,CAAA,cAAiC,CAAA;wBAAlD,aAAa;6BAClB,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,EAA7B,wBAA6B;8BACiE;wBAA9D,qBAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,EAAA;;wBAA9D,KAAA,SAA8D;;;6BAA9D,CAAA,cAA8D,CAAA;wBAArF,mBAAmB;wBAC5B,qBAAM,IAAI,CAAC,aAAa,CACtB,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,aAAa,EAAE,mBAAmB,CAAC,EACjE,SAAS,CACV,EAAA;;wBAHD,SAGC,CAAC;;;wBAJ8B,IAA8D,CAAA;;;4BAOhG,qBAAM,IAAI,CAAC,aAAa,CACtB,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,aAAa,CAAC,EAC5C,SAAS,CACV,EAAA;;wBAHD,SAGC,CAAC;;;wBAZsB,IAAiC,CAAA;;;6BAgB7D,qBAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAAA;;wBAA3B,SAA2B,CAAC;;;;;;KAE/B;IAEY,+CAAkB,GAA/B,UAAgC,EAAqD;YAAnD,qBAAqB,EAArB,0CAAqB;;;;;4BACrC,qBAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAA;;wBAAtC,OAAO,GAAG,SAA4B;wBACtC,SAAS,GAAc,IAAI,GAAG,EAAE,CAAC;wBACjC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;wBAC3D,GAAG,CAAC,OAAwB,EAAP,mBAAO,EAAP,qBAAO,EAAP,IAAO;4BAAvB;4BACH,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAM,CAAC,CAAC,CAAC,CAAC;gCAC9B,UAAU,GAAG,QAAM,CAAC,IAAI,CAAC;gCAC7B,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;oCAClB,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAG,QAAQ,GAAG,IAAI,CAAC,GAAK,EAAE,EAAE,CAAC,CAAC;gCAChE,CAAC;gCACD,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,QAAM,CAAC,CAAC;4BACpC,CAAC;yBACF;wBAED,sBAAO,SAAS,EAAC;;;;KAClB;IAEY,oCAAO,GAApB;;;;;;wBACQ,KAAA,IAAI,CAAC,aAAa,CAAA;8BAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;wBAAE,qBAAM,IAAI,CAAC,kBAAkB,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAA;4BAA7G,qBAAM,SAAA,IAAI,aAA4C,SAAuD,GAAC,EAAA;;wBAA9G,SAA8G,CAAC;;;;;KAChH;IAEO,6CAAgB,GAAxB,UAAyB,MAAc;QACrC,IAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,KAAK,wBAAO,CAAC,GAAG,IAAI,MAAM,CAAC,OAAO,KAAK,wBAAO,CAAC,YAAY,CAAC;QAC3F,IAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QACvF,MAAM,CAAC,UAAU,CAAC;IACpB,CAAC;IACH,yBAAC;AAAD,CAAC,AA/ED,IA+EC;AA/EY,gDAAkB"} \ No newline at end of file
diff --git a/node_modules/galactus/lib/index.d.ts b/node_modules/galactus/lib/index.d.ts
new file mode 100644
index 0000000..7ccd9ab
--- /dev/null
+++ b/node_modules/galactus/lib/index.d.ts
@@ -0,0 +1,2 @@
+export * from './DestroyerOfModules';
+export * from 'flora-colossus';
diff --git a/node_modules/galactus/lib/index.js b/node_modules/galactus/lib/index.js
new file mode 100644
index 0000000..c2424a4
--- /dev/null
+++ b/node_modules/galactus/lib/index.js
@@ -0,0 +1,8 @@
+"use strict";
+function __export(m) {
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(require("./DestroyerOfModules"));
+__export(require("flora-colossus"));
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/galactus/lib/index.js.map b/node_modules/galactus/lib/index.js.map
new file mode 100644
index 0000000..382ffba
--- /dev/null
+++ b/node_modules/galactus/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,0CAAqC;AACrC,oCAA+B"} \ No newline at end of file
diff --git a/node_modules/galactus/package.json b/node_modules/galactus/package.json
new file mode 100644
index 0000000..7469853
--- /dev/null
+++ b/node_modules/galactus/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "galactus",
+ "version": "0.2.1",
+ "description": "Prunes dependencies from your package",
+ "main": "lib/index.js",
+ "scripts": {
+ "build": "tsc",
+ "prepublish": "npm run build",
+ "lint": "tslint src/**/*.ts test/**/*.ts",
+ "mocha": "nyc mocha test/*_spec.ts",
+ "test": "npm run lint && npm run mocha"
+ },
+ "keywords": [
+ "prune",
+ "production"
+ ],
+ "author": "Samuel Attard",
+ "license": "MIT",
+ "devDependencies": {
+ "@types/chai": "^4.0.10",
+ "@types/debug": "^0.0.30",
+ "@types/fs-extra": "^4.0.0",
+ "@types/mocha": "^2.2.45",
+ "@types/tempy": "^0.1.0",
+ "chai": "^4.1.2",
+ "mocha": "^4.1.0",
+ "nyc": "^11.4.1",
+ "tempy": "^0.2.1",
+ "ts-node": "^4.1.0",
+ "tslint": "^5.9.1",
+ "typescript": "^2.4.2"
+ },
+ "dependencies": {
+ "debug": "^3.1.0",
+ "flora-colossus": "^1.0.0",
+ "fs-extra": "^4.0.0"
+ },
+ "nyc": {
+ "extension": [
+ ".ts"
+ ],
+ "instrument": true,
+ "require": [
+ "ts-node/register"
+ ],
+ "sourceMap": true
+ }
+}
diff --git a/node_modules/galactus/tsconfig.json b/node_modules/galactus/tsconfig.json
new file mode 100644
index 0000000..ca60641
--- /dev/null
+++ b/node_modules/galactus/tsconfig.json
@@ -0,0 +1,32 @@
+{
+ "compilerOptions": {
+ "removeComments": false,
+ "preserveConstEnums": true,
+ "sourceMap": true,
+ "declaration": true,
+ "noImplicitAny": true,
+ "noImplicitReturns": true,
+ "suppressImplicitAnyIndexErrors": true,
+ "strictNullChecks": true,
+ "noUnusedLocals": true,
+ "noImplicitThis": true,
+ "noUnusedParameters": true,
+ "module": "commonjs",
+ "moduleResolution": "node",
+ "pretty": true,
+ "target": "ES5",
+ "outDir": "lib",
+ "lib":[
+ "es2015"
+ ]
+ },
+ "formatCodeOptions": {
+ "indentSize": 2,
+ "tabSize": 2
+ },
+ "exclude": [
+ "node_modules",
+ "lib",
+ "test"
+ ]
+} \ No newline at end of file
diff --git a/node_modules/galactus/tslint.json b/node_modules/galactus/tslint.json
new file mode 100644
index 0000000..6571923
--- /dev/null
+++ b/node_modules/galactus/tslint.json
@@ -0,0 +1,12 @@
+{
+ "defaultSeverity": "error",
+ "extends": [
+ "tslint:recommended"
+ ],
+ "jsRules": {},
+ "rules": {
+ "quotemark": [true, "single", "avoid-escape", "avoid-template"],
+ "variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"]
+ },
+ "rulesDirectory": []
+}
diff --git a/node_modules/galactus/yarn.lock b/node_modules/galactus/yarn.lock
new file mode 100644
index 0000000..fd22932
--- /dev/null
+++ b/node_modules/galactus/yarn.lock
@@ -0,0 +1,1554 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@types/chai@^4.0.10":
+ version "4.0.10"
+ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.10.tgz#0eb222c7353adde8e0980bea04165d4d3b6afef3"
+
+"@types/debug@^0.0.30":
+ version "0.0.30"
+ resolved "https://registry.yarnpkg.com/@types/debug/-/debug-0.0.30.tgz#dc1e40f7af3b9c815013a7860e6252f6352a84df"
+
+"@types/fs-extra@^4.0.0":
+ version "4.0.7"
+ resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-4.0.7.tgz#02533262386b5a6b9a49797dc82feffdf269140a"
+ dependencies:
+ "@types/node" "*"
+
+"@types/mocha@^2.2.45":
+ version "2.2.45"
+ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.45.tgz#816572b6e45164526a36d4faa123e8267d6d5d0a"
+ dependencies:
+ "@types/node" "*"
+
+"@types/node@*":
+ version "8.5.2"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.2.tgz#83b8103fa9a2c2e83d78f701a9aa7c9539739aa5"
+
+"@types/strip-bom@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@types/strip-bom/-/strip-bom-3.0.0.tgz#14a8ec3956c2e81edb7520790aecf21c290aebd2"
+
+"@types/strip-json-comments@0.0.30":
+ version "0.0.30"
+ resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1"
+
+"@types/tempy@^0.1.0":
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/@types/tempy/-/tempy-0.1.0.tgz#8ba0339dcd5abb554f301683dc3396d153ec5bfd"
+
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
+amdefine@>=0.0.4:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+
+ansi-styles@^3.1.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
+ dependencies:
+ color-convert "^1.9.0"
+
+append-transform@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"
+ dependencies:
+ default-require-extensions "^1.0.0"
+
+archy@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
+
+argparse@^1.0.7:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+ dependencies:
+ sprintf-js "~1.0.2"
+
+arr-diff@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
+ dependencies:
+ arr-flatten "^1.0.1"
+
+arr-flatten@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+
+array-unique@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
+
+arrify@^1.0.0, arrify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+
+assertion-error@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
+
+async@^1.4.0:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
+
+babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
+ dependencies:
+ chalk "^1.1.3"
+ esutils "^2.0.2"
+ js-tokens "^3.0.2"
+
+babel-generator@^6.18.0:
+ version "6.26.1"
+ resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
+ dependencies:
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ detect-indent "^4.0.0"
+ jsesc "^1.3.0"
+ lodash "^4.17.4"
+ source-map "^0.5.7"
+ trim-right "^1.0.1"
+
+babel-messages@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.11.0"
+
+babel-template@^6.16.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ lodash "^4.17.4"
+
+babel-traverse@^6.18.0, babel-traverse@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ debug "^2.6.8"
+ globals "^9.18.0"
+ invariant "^2.2.2"
+ lodash "^4.17.4"
+
+babel-types@^6.18.0, babel-types@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
+ dependencies:
+ babel-runtime "^6.26.0"
+ esutils "^2.0.2"
+ lodash "^4.17.4"
+ to-fast-properties "^1.0.3"
+
+babylon@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+
+brace-expansion@^1.1.7:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^1.8.2:
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+ dependencies:
+ expand-range "^1.8.1"
+ preserve "^0.2.0"
+ repeat-element "^1.1.2"
+
+browser-stdout@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
+
+builtin-modules@^1.0.0, builtin-modules@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+
+caching-transform@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1"
+ dependencies:
+ md5-hex "^1.2.0"
+ mkdirp "^0.5.1"
+ write-file-atomic "^1.1.4"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+camelcase@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
+
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
+chai@^4.1.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
+ dependencies:
+ assertion-error "^1.0.1"
+ check-error "^1.0.1"
+ deep-eql "^3.0.0"
+ get-func-name "^2.0.0"
+ pathval "^1.0.0"
+ type-detect "^4.0.0"
+
+chalk@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+chalk@^2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
+ dependencies:
+ ansi-styles "^3.1.0"
+ escape-string-regexp "^1.0.5"
+ supports-color "^4.0.0"
+
+check-error@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
+
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+cliui@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc"
+ dependencies:
+ string-width "^2.1.1"
+ strip-ansi "^4.0.0"
+ wrap-ansi "^2.0.0"
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+
+color-convert@^1.9.0:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
+ dependencies:
+ color-name "^1.1.1"
+
+color-name@^1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+
+commander@2.11.0:
+ version "2.11.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
+
+commander@^2.12.1:
+ version "2.14.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
+
+commondir@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+convert-source-map@^1.3.0:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
+
+core-js@^2.4.0:
+ version "2.5.3"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e"
+
+cross-spawn@^4:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
+cross-spawn@^5.0.1:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
+ dependencies:
+ lru-cache "^4.0.1"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+crypto-random-string@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
+
+debug-log@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
+
+debug@3.1.0, debug@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
+ dependencies:
+ ms "2.0.0"
+
+debug@^2.6.8:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ dependencies:
+ ms "2.0.0"
+
+decamelize@^1.0.0, decamelize@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+
+deep-eql@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df"
+ dependencies:
+ type-detect "^4.0.0"
+
+default-require-extensions@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
+ dependencies:
+ strip-bom "^2.0.0"
+
+detect-indent@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
+ dependencies:
+ repeating "^2.0.0"
+
+diff@3.3.1:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
+
+diff@^3.1.0, diff@^3.2.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
+
+error-ex@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
+ dependencies:
+ is-arrayish "^0.2.1"
+
+escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+esprima@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
+
+esutils@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
+
+execa@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
+ dependencies:
+ cross-spawn "^5.0.1"
+ get-stream "^3.0.0"
+ is-stream "^1.1.0"
+ npm-run-path "^2.0.0"
+ p-finally "^1.0.0"
+ signal-exit "^3.0.0"
+ strip-eof "^1.0.0"
+
+expand-brackets@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+ dependencies:
+ is-posix-bracket "^0.1.0"
+
+expand-range@^1.8.1:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+ dependencies:
+ fill-range "^2.1.0"
+
+extglob@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
+ dependencies:
+ is-extglob "^1.0.0"
+
+filename-regex@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
+
+fill-range@^2.1.0:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
+ dependencies:
+ is-number "^2.1.0"
+ isobject "^2.0.0"
+ randomatic "^1.1.3"
+ repeat-element "^1.1.2"
+ repeat-string "^1.5.2"
+
+find-cache-dir@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9"
+ dependencies:
+ commondir "^1.0.1"
+ mkdirp "^0.5.1"
+ pkg-dir "^1.0.0"
+
+find-up@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
+ dependencies:
+ path-exists "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+find-up@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
+ dependencies:
+ locate-path "^2.0.0"
+
+flora-colossus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/flora-colossus/-/flora-colossus-1.0.0.tgz#54729c361edecee014dd441679e1a37c1d773a45"
+ dependencies:
+ debug "^3.1.0"
+ fs-extra "^4.0.0"
+
+for-in@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+
+for-own@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
+ dependencies:
+ for-in "^1.0.1"
+
+foreground-child@^1.5.3, foreground-child@^1.5.6:
+ version "1.5.6"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9"
+ dependencies:
+ cross-spawn "^4"
+ signal-exit "^3.0.0"
+
+fs-extra@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+get-caller-file@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
+
+get-func-name@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
+
+get-stream@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
+
+glob-base@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+ dependencies:
+ glob-parent "^2.0.0"
+ is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+ dependencies:
+ is-glob "^2.0.0"
+
+glob@7.1.2, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1:
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^9.18.0:
+ version "9.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+
+graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
+ version "4.1.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
+
+growl@1.10.3:
+ version "1.10.3"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
+
+handlebars@^4.0.3:
+ version "4.0.11"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
+ dependencies:
+ async "^1.4.0"
+ optimist "^0.6.1"
+ source-map "^0.4.4"
+ optionalDependencies:
+ uglify-js "^2.6"
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+
+has-flag@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
+
+he@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
+
+homedir-polyfill@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc"
+ dependencies:
+ parse-passwd "^1.0.0"
+
+hosted-git-info@^2.1.4:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+
+invariant@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
+ dependencies:
+ loose-envify "^1.0.0"
+
+invert-kv@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+
+is-builtin-module@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
+ dependencies:
+ builtin-modules "^1.0.0"
+
+is-dotfile@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
+
+is-equal-shallow@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+ dependencies:
+ is-primitive "^2.0.0"
+
+is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+
+is-extglob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+
+is-finite@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+
+is-glob@^2.0.0, is-glob@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+ dependencies:
+ is-extglob "^1.0.0"
+
+is-number@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-posix-bracket@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+
+is-primitive@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+
+is-stream@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+
+is-utf8@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+
+isarray@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ dependencies:
+ isarray "1.0.0"
+
+istanbul-lib-coverage@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da"
+
+istanbul-lib-hook@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b"
+ dependencies:
+ append-transform "^0.4.0"
+
+istanbul-lib-instrument@^1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e"
+ dependencies:
+ babel-generator "^6.18.0"
+ babel-template "^6.16.0"
+ babel-traverse "^6.18.0"
+ babel-types "^6.18.0"
+ babylon "^6.18.0"
+ istanbul-lib-coverage "^1.1.1"
+ semver "^5.3.0"
+
+istanbul-lib-report@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz#922be27c13b9511b979bd1587359f69798c1d425"
+ dependencies:
+ istanbul-lib-coverage "^1.1.1"
+ mkdirp "^0.5.1"
+ path-parse "^1.0.5"
+ supports-color "^3.1.2"
+
+istanbul-lib-source-maps@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#750578602435f28a0c04ee6d7d9e0f2960e62c1c"
+ dependencies:
+ debug "^3.1.0"
+ istanbul-lib-coverage "^1.1.1"
+ mkdirp "^0.5.1"
+ rimraf "^2.6.1"
+ source-map "^0.5.3"
+
+istanbul-reports@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.3.tgz#3b9e1e8defb6d18b1d425da8e8b32c5a163f2d10"
+ dependencies:
+ handlebars "^4.0.3"
+
+js-tokens@^3.0.0, js-tokens@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+
+js-yaml@^3.7.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsesc@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+
+jsonfile@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+kind-of@^3.0.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ dependencies:
+ is-buffer "^1.1.5"
+
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+lcid@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
+ dependencies:
+ invert-kv "^1.0.0"
+
+load-json-file@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^2.2.0"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ strip-bom "^2.0.0"
+
+locate-path@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
+ dependencies:
+ p-locate "^2.0.0"
+ path-exists "^3.0.0"
+
+lodash@^4.17.4:
+ version "4.17.5"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
+
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+loose-envify@^1.0.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
+ dependencies:
+ js-tokens "^3.0.0"
+
+lru-cache@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
+ dependencies:
+ pseudomap "^1.0.2"
+ yallist "^2.1.2"
+
+make-error@^1.1.1:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.2.tgz#8762ffad2444dd8ff1f7c819629fa28e24fea1c4"
+
+md5-hex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4"
+ dependencies:
+ md5-o-matic "^0.1.1"
+
+md5-o-matic@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3"
+
+mem@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
+ dependencies:
+ mimic-fn "^1.0.0"
+
+merge-source-map@^1.0.2:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646"
+ dependencies:
+ source-map "^0.6.1"
+
+micromatch@^2.3.11:
+ version "2.3.11"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
+ dependencies:
+ arr-diff "^2.0.0"
+ array-unique "^0.2.1"
+ braces "^1.8.2"
+ expand-brackets "^0.1.4"
+ extglob "^0.3.1"
+ filename-regex "^2.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.1"
+ kind-of "^3.0.2"
+ normalize-path "^2.0.1"
+ object.omit "^2.0.0"
+ parse-glob "^3.0.4"
+ regex-cache "^0.4.2"
+
+mimic-fn@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
+
+minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+minimist@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+
+minimist@~0.0.1:
+ version "0.0.10"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
+
+mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ dependencies:
+ minimist "0.0.8"
+
+mocha@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
+ dependencies:
+ browser-stdout "1.3.0"
+ commander "2.11.0"
+ debug "3.1.0"
+ diff "3.3.1"
+ escape-string-regexp "1.0.5"
+ glob "7.1.2"
+ growl "1.10.3"
+ he "1.1.1"
+ mkdirp "0.5.1"
+ supports-color "4.4.0"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+
+normalize-package-data@^2.3.2:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
+ dependencies:
+ hosted-git-info "^2.1.4"
+ is-builtin-module "^1.0.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
+normalize-path@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+ dependencies:
+ remove-trailing-separator "^1.0.1"
+
+npm-run-path@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
+ dependencies:
+ path-key "^2.0.0"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+
+nyc@^11.4.1:
+ version "11.4.1"
+ resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.4.1.tgz#13fdf7e7ef22d027c61d174758f6978a68f4f5e5"
+ dependencies:
+ archy "^1.0.0"
+ arrify "^1.0.1"
+ caching-transform "^1.0.0"
+ convert-source-map "^1.3.0"
+ debug-log "^1.0.1"
+ default-require-extensions "^1.0.0"
+ find-cache-dir "^0.1.1"
+ find-up "^2.1.0"
+ foreground-child "^1.5.3"
+ glob "^7.0.6"
+ istanbul-lib-coverage "^1.1.1"
+ istanbul-lib-hook "^1.1.0"
+ istanbul-lib-instrument "^1.9.1"
+ istanbul-lib-report "^1.1.2"
+ istanbul-lib-source-maps "^1.2.2"
+ istanbul-reports "^1.1.3"
+ md5-hex "^1.2.0"
+ merge-source-map "^1.0.2"
+ micromatch "^2.3.11"
+ mkdirp "^0.5.0"
+ resolve-from "^2.0.0"
+ rimraf "^2.5.4"
+ signal-exit "^3.0.1"
+ spawn-wrap "^1.4.2"
+ test-exclude "^4.1.1"
+ yargs "^10.0.3"
+ yargs-parser "^8.0.0"
+
+object-assign@^4.1.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+
+object.omit@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
+ dependencies:
+ for-own "^0.1.4"
+ is-extendable "^0.1.1"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ dependencies:
+ wrappy "1"
+
+optimist@^0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
+ dependencies:
+ minimist "~0.0.1"
+ wordwrap "~0.0.2"
+
+os-homedir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+
+os-locale@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2"
+ dependencies:
+ execa "^0.7.0"
+ lcid "^1.0.0"
+ mem "^1.1.0"
+
+p-finally@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+
+p-limit@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c"
+ dependencies:
+ p-try "^1.0.0"
+
+p-locate@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
+ dependencies:
+ p-limit "^1.1.0"
+
+p-try@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
+
+parse-glob@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+ dependencies:
+ glob-base "^0.3.0"
+ is-dotfile "^1.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.0"
+
+parse-json@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+ dependencies:
+ error-ex "^1.2.0"
+
+parse-passwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
+
+path-exists@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
+ dependencies:
+ pinkie-promise "^2.0.0"
+
+path-exists@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+path-key@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
+
+path-parse@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
+
+path-type@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
+ dependencies:
+ graceful-fs "^4.1.2"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+pathval@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+
+pkg-dir@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
+ dependencies:
+ find-up "^1.0.0"
+
+preserve@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+
+pseudomap@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+
+randomatic@^1.1.3:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+read-pkg-up@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
+ dependencies:
+ find-up "^1.0.0"
+ read-pkg "^1.0.0"
+
+read-pkg@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
+ dependencies:
+ load-json-file "^1.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^1.0.0"
+
+regenerator-runtime@^0.11.0:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+
+regex-cache@^0.4.2:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
+ dependencies:
+ is-equal-shallow "^0.1.3"
+
+remove-trailing-separator@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+
+repeat-element@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
+
+repeat-string@^1.5.2:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+
+repeating@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
+ dependencies:
+ is-finite "^1.0.0"
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+
+require-main-filename@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+
+resolve-from@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
+
+resolve@^1.3.2:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
+ dependencies:
+ path-parse "^1.0.5"
+
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ dependencies:
+ align-text "^0.1.1"
+
+rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
+ dependencies:
+ glob "^7.0.5"
+
+"semver@2 || 3 || 4 || 5", semver@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
+
+set-blocking@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+
+shebang-command@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+ dependencies:
+ shebang-regex "^1.0.0"
+
+shebang-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+
+signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+
+slide@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
+
+source-map-support@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.0.tgz#2018a7ad2bdf8faf2691e5fddab26bed5a2bacab"
+ dependencies:
+ source-map "^0.6.0"
+
+source-map@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@^0.5.3, source-map@^0.5.7, source-map@~0.5.1:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+
+source-map@^0.6.0, source-map@^0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+
+spawn-wrap@^1.4.2:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c"
+ dependencies:
+ foreground-child "^1.5.6"
+ mkdirp "^0.5.0"
+ os-homedir "^1.0.1"
+ rimraf "^2.6.2"
+ signal-exit "^3.0.2"
+ which "^1.3.0"
+
+spdx-correct@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
+ dependencies:
+ spdx-license-ids "^1.0.2"
+
+spdx-expression-parse@~1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c"
+
+spdx-license-ids@^1.0.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+
+string-width@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+string-width@^2.0.0, string-width@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-bom@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
+ dependencies:
+ is-utf8 "^0.2.0"
+
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+
+strip-eof@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
+
+strip-json-comments@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+
+supports-color@4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
+ dependencies:
+ has-flag "^2.0.0"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+
+supports-color@^3.1.2:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
+ dependencies:
+ has-flag "^1.0.0"
+
+supports-color@^4.0.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b"
+ dependencies:
+ has-flag "^2.0.0"
+
+temp-dir@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
+
+tempy@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/tempy/-/tempy-0.2.1.tgz#9038e4dbd1c201b74472214179bc2c6f7776e54c"
+ dependencies:
+ temp-dir "^1.0.0"
+ unique-string "^1.0.0"
+
+test-exclude@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26"
+ dependencies:
+ arrify "^1.0.1"
+ micromatch "^2.3.11"
+ object-assign "^4.1.0"
+ read-pkg-up "^1.0.1"
+ require-main-filename "^1.0.1"
+
+to-fast-properties@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
+
+trim-right@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
+
+ts-node@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-4.1.0.tgz#36d9529c7b90bb993306c408cd07f7743de20712"
+ dependencies:
+ arrify "^1.0.0"
+ chalk "^2.3.0"
+ diff "^3.1.0"
+ make-error "^1.1.1"
+ minimist "^1.2.0"
+ mkdirp "^0.5.1"
+ source-map-support "^0.5.0"
+ tsconfig "^7.0.0"
+ v8flags "^3.0.0"
+ yn "^2.0.0"
+
+tsconfig@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-7.0.0.tgz#84538875a4dc216e5c4a5432b3a4dec3d54e91b7"
+ dependencies:
+ "@types/strip-bom" "^3.0.0"
+ "@types/strip-json-comments" "0.0.30"
+ strip-bom "^3.0.0"
+ strip-json-comments "^2.0.0"
+
+tslib@^1.8.0, tslib@^1.8.1:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
+
+tslint@^5.9.1:
+ version "5.9.1"
+ resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae"
+ dependencies:
+ babel-code-frame "^6.22.0"
+ builtin-modules "^1.1.1"
+ chalk "^2.3.0"
+ commander "^2.12.1"
+ diff "^3.2.0"
+ glob "^7.1.1"
+ js-yaml "^3.7.0"
+ minimatch "^3.0.4"
+ resolve "^1.3.2"
+ semver "^5.3.0"
+ tslib "^1.8.0"
+ tsutils "^2.12.1"
+
+tsutils@^2.12.1:
+ version "2.21.1"
+ resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.21.1.tgz#5b23c263233300ed7442b4217855cbc7547c296a"
+ dependencies:
+ tslib "^1.8.1"
+
+type-detect@^4.0.0:
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.5.tgz#d70e5bc81db6de2a381bcaca0c6e0cbdc7635de2"
+
+typescript@^2.4.2:
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
+
+uglify-js@^2.6:
+ version "2.8.29"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+ dependencies:
+ source-map "~0.5.1"
+ yargs "~3.10.0"
+ optionalDependencies:
+ uglify-to-browserify "~1.0.0"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+
+unique-string@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"
+ dependencies:
+ crypto-random-string "^1.0.0"
+
+universalify@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
+
+v8flags@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.0.1.tgz#dce8fc379c17d9f2c9e9ed78d89ce00052b1b76b"
+ dependencies:
+ homedir-polyfill "^1.0.1"
+
+validate-npm-package-license@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
+ dependencies:
+ spdx-correct "~1.0.0"
+ spdx-expression-parse "~1.0.0"
+
+which-module@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
+
+which@^1.2.9, which@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
+ dependencies:
+ isexe "^2.0.0"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
+wordwrap@~0.0.2:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+
+wrap-ansi@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+
+write-file-atomic@^1.1.4:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f"
+ dependencies:
+ graceful-fs "^4.1.11"
+ imurmurhash "^0.1.4"
+ slide "^1.1.5"
+
+y18n@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
+
+yallist@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
+
+yargs-parser@^8.0.0, yargs-parser@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950"
+ dependencies:
+ camelcase "^4.1.0"
+
+yargs@^10.0.3:
+ version "10.1.2"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5"
+ dependencies:
+ cliui "^4.0.0"
+ decamelize "^1.1.1"
+ find-up "^2.1.0"
+ get-caller-file "^1.0.1"
+ os-locale "^2.0.0"
+ require-directory "^2.1.1"
+ require-main-filename "^1.0.1"
+ set-blocking "^2.0.0"
+ string-width "^2.0.0"
+ which-module "^2.0.0"
+ y18n "^3.2.1"
+ yargs-parser "^8.1.0"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
+yn@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc
new file mode 100644
index 0000000..0ab0876
--- /dev/null
+++ b/node_modules/get-intrinsic/.eslintrc
@@ -0,0 +1,37 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "env": {
+ "es6": true,
+ "es2017": true,
+ "es2020": true,
+ "es2021": true,
+ "es2022": true,
+ },
+
+ "rules": {
+ "array-bracket-newline": 0,
+ "complexity": 0,
+ "eqeqeq": [2, "allow-null"],
+ "func-name-matching": 0,
+ "id-length": 0,
+ "max-lines-per-function": [2, 90],
+ "max-params": [2, 4],
+ "max-statements": 0,
+ "max-statements-per-line": [2, { "max": 2 }],
+ "multiline-comment-style": 0,
+ "no-magic-numbers": 0,
+ "sort-keys": 0,
+ },
+
+ "overrides": [
+ {
+ "files": "test/**",
+ "rules": {
+ "new-cap": 0,
+ },
+ },
+ ],
+}
diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml
new file mode 100644
index 0000000..8e8da0d
--- /dev/null
+++ b/node_modules/get-intrinsic/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/get-intrinsic
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc
new file mode 100644
index 0000000..bdd626c
--- /dev/null
+++ b/node_modules/get-intrinsic/.nycrc
@@ -0,0 +1,9 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md
new file mode 100644
index 0000000..1bb52d3
--- /dev/null
+++ b/node_modules/get-intrinsic/CHANGELOG.md
@@ -0,0 +1,98 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12
+
+### Commits
+
+- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688)
+- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5)
+
+## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08
+
+### Fixed
+
+- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16)
+
+### Commits
+
+- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d)
+- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad)
+- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5)
+- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de)
+- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d)
+- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932)
+- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8)
+- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496)
+- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97)
+- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d)
+- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd)
+- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5)
+- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20)
+- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359)
+
+## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03
+
+### Fixed
+
+- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9)
+
+### Commits
+
+- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614)
+- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36)
+- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd)
+
+## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25
+
+### Fixed
+
+- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3)
+
+### Commits
+
+- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4)
+- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e)
+- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7)
+- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347)
+- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc)
+
+## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17
+
+### Commits
+
+- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b)
+- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525)
+- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9)
+
+## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30
+
+### Commits
+
+- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6)
+- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e)
+- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc)
+
+## v1.0.0 - 2020-10-29
+
+### Commits
+
+- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb)
+- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2)
+- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44)
+- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902)
+- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550)
+- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1)
+- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1)
+- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd)
+- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05)
diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE
new file mode 100644
index 0000000..48f05d0
--- /dev/null
+++ b/node_modules/get-intrinsic/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Jordan Harband
+
+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/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md
new file mode 100644
index 0000000..3aa0bba
--- /dev/null
+++ b/node_modules/get-intrinsic/README.md
@@ -0,0 +1,71 @@
+# get-intrinsic <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][package-url]
+
+Get and robustly cache all JS language-level intrinsics at first require time.
+
+See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference.
+
+## Example
+
+```js
+var GetIntrinsic = require('get-intrinsic');
+var assert = require('assert');
+
+// static methods
+assert.equal(GetIntrinsic('%Math.pow%'), Math.pow);
+assert.equal(Math.pow(2, 3), 8);
+assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);
+delete Math.pow;
+assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);
+
+// instance methods
+var arr = [1];
+assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push);
+assert.deepEqual(arr, [1]);
+
+arr.push(2);
+assert.deepEqual(arr, [1, 2]);
+
+GetIntrinsic('%Array.prototype.push%').call(arr, 3);
+assert.deepEqual(arr, [1, 2, 3]);
+
+delete Array.prototype.push;
+GetIntrinsic('%Array.prototype.push%').call(arr, 4);
+assert.deepEqual(arr, [1, 2, 3, 4]);
+
+// missing features
+delete JSON.parse; // to simulate a real intrinsic that is missing in the environment
+assert.throws(() => GetIntrinsic('%JSON.parse%'));
+assert.equal(undefined, GetIntrinsic('%JSON.parse%', true));
+```
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+## Security
+
+Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
+
+[package-url]: https://npmjs.org/package/get-intrinsic
+[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg
+[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg
+[deps-url]: https://david-dm.org/ljharb/get-intrinsic
+[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg
+[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic
+[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic
+[actions-url]: https://github.com/ljharb/get-intrinsic/actions
diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js
new file mode 100644
index 0000000..3c3d93e
--- /dev/null
+++ b/node_modules/get-intrinsic/index.js
@@ -0,0 +1,334 @@
+'use strict';
+
+var undefined;
+
+var $SyntaxError = SyntaxError;
+var $Function = Function;
+var $TypeError = TypeError;
+
+// eslint-disable-next-line consistent-return
+var getEvalledConstructor = function (expressionSyntax) {
+ try {
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
+ } catch (e) {}
+};
+
+var $gOPD = Object.getOwnPropertyDescriptor;
+if ($gOPD) {
+ try {
+ $gOPD({}, '');
+ } catch (e) {
+ $gOPD = null; // this is IE 8, which has a broken gOPD
+ }
+}
+
+var throwTypeError = function () {
+ throw new $TypeError();
+};
+var ThrowTypeError = $gOPD
+ ? (function () {
+ try {
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
+ arguments.callee; // IE 8 does not throw here
+ return throwTypeError;
+ } catch (calleeThrows) {
+ try {
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
+ return $gOPD(arguments, 'callee').get;
+ } catch (gOPDthrows) {
+ return throwTypeError;
+ }
+ }
+ }())
+ : throwTypeError;
+
+var hasSymbols = require('has-symbols')();
+
+var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
+
+var needsEval = {};
+
+var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
+
+var INTRINSICS = {
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
+ '%Array%': Array,
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
+ '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
+ '%AsyncFromSyncIteratorPrototype%': undefined,
+ '%AsyncFunction%': needsEval,
+ '%AsyncGenerator%': needsEval,
+ '%AsyncGeneratorFunction%': needsEval,
+ '%AsyncIteratorPrototype%': needsEval,
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
+ '%Boolean%': Boolean,
+ '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
+ '%Date%': Date,
+ '%decodeURI%': decodeURI,
+ '%decodeURIComponent%': decodeURIComponent,
+ '%encodeURI%': encodeURI,
+ '%encodeURIComponent%': encodeURIComponent,
+ '%Error%': Error,
+ '%eval%': eval, // eslint-disable-line no-eval
+ '%EvalError%': EvalError,
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
+ '%Function%': $Function,
+ '%GeneratorFunction%': needsEval,
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
+ '%isFinite%': isFinite,
+ '%isNaN%': isNaN,
+ '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined,
+ '%Map%': typeof Map === 'undefined' ? undefined : Map,
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
+ '%Math%': Math,
+ '%Number%': Number,
+ '%Object%': Object,
+ '%parseFloat%': parseFloat,
+ '%parseInt%': parseInt,
+ '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
+ '%RangeError%': RangeError,
+ '%ReferenceError%': ReferenceError,
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
+ '%RegExp%': RegExp,
+ '%Set%': typeof Set === 'undefined' ? undefined : Set,
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
+ '%String%': String,
+ '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
+ '%Symbol%': hasSymbols ? Symbol : undefined,
+ '%SyntaxError%': $SyntaxError,
+ '%ThrowTypeError%': ThrowTypeError,
+ '%TypedArray%': TypedArray,
+ '%TypeError%': $TypeError,
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
+ '%URIError%': URIError,
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
+};
+
+var doEval = function doEval(name) {
+ var value;
+ if (name === '%AsyncFunction%') {
+ value = getEvalledConstructor('async function () {}');
+ } else if (name === '%GeneratorFunction%') {
+ value = getEvalledConstructor('function* () {}');
+ } else if (name === '%AsyncGeneratorFunction%') {
+ value = getEvalledConstructor('async function* () {}');
+ } else if (name === '%AsyncGenerator%') {
+ var fn = doEval('%AsyncGeneratorFunction%');
+ if (fn) {
+ value = fn.prototype;
+ }
+ } else if (name === '%AsyncIteratorPrototype%') {
+ var gen = doEval('%AsyncGenerator%');
+ if (gen) {
+ value = getProto(gen.prototype);
+ }
+ }
+
+ INTRINSICS[name] = value;
+
+ return value;
+};
+
+var LEGACY_ALIASES = {
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
+ '%ArrayPrototype%': ['Array', 'prototype'],
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
+ '%DataViewPrototype%': ['DataView', 'prototype'],
+ '%DatePrototype%': ['Date', 'prototype'],
+ '%ErrorPrototype%': ['Error', 'prototype'],
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
+ '%FunctionPrototype%': ['Function', 'prototype'],
+ '%Generator%': ['GeneratorFunction', 'prototype'],
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
+ '%JSONParse%': ['JSON', 'parse'],
+ '%JSONStringify%': ['JSON', 'stringify'],
+ '%MapPrototype%': ['Map', 'prototype'],
+ '%NumberPrototype%': ['Number', 'prototype'],
+ '%ObjectPrototype%': ['Object', 'prototype'],
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
+ '%PromisePrototype%': ['Promise', 'prototype'],
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
+ '%Promise_all%': ['Promise', 'all'],
+ '%Promise_reject%': ['Promise', 'reject'],
+ '%Promise_resolve%': ['Promise', 'resolve'],
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
+ '%SetPrototype%': ['Set', 'prototype'],
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
+ '%StringPrototype%': ['String', 'prototype'],
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
+};
+
+var bind = require('function-bind');
+var hasOwn = require('has');
+var $concat = bind.call(Function.call, Array.prototype.concat);
+var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
+var $replace = bind.call(Function.call, String.prototype.replace);
+var $strSlice = bind.call(Function.call, String.prototype.slice);
+var $exec = bind.call(Function.call, RegExp.prototype.exec);
+
+/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
+var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
+var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
+var stringToPath = function stringToPath(string) {
+ var first = $strSlice(string, 0, 1);
+ var last = $strSlice(string, -1);
+ if (first === '%' && last !== '%') {
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
+ } else if (last === '%' && first !== '%') {
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
+ }
+ var result = [];
+ $replace(string, rePropName, function (match, number, quote, subString) {
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
+ });
+ return result;
+};
+/* end adaptation */
+
+var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
+ var intrinsicName = name;
+ var alias;
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
+ alias = LEGACY_ALIASES[intrinsicName];
+ intrinsicName = '%' + alias[0] + '%';
+ }
+
+ if (hasOwn(INTRINSICS, intrinsicName)) {
+ var value = INTRINSICS[intrinsicName];
+ if (value === needsEval) {
+ value = doEval(intrinsicName);
+ }
+ if (typeof value === 'undefined' && !allowMissing) {
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
+ }
+
+ return {
+ alias: alias,
+ name: intrinsicName,
+ value: value
+ };
+ }
+
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
+};
+
+module.exports = function GetIntrinsic(name, allowMissing) {
+ if (typeof name !== 'string' || name.length === 0) {
+ throw new $TypeError('intrinsic name must be a non-empty string');
+ }
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
+ throw new $TypeError('"allowMissing" argument must be a boolean');
+ }
+
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
+ }
+ var parts = stringToPath(name);
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
+
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
+ var intrinsicRealName = intrinsic.name;
+ var value = intrinsic.value;
+ var skipFurtherCaching = false;
+
+ var alias = intrinsic.alias;
+ if (alias) {
+ intrinsicBaseName = alias[0];
+ $spliceApply(parts, $concat([0, 1], alias));
+ }
+
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
+ var part = parts[i];
+ var first = $strSlice(part, 0, 1);
+ var last = $strSlice(part, -1);
+ if (
+ (
+ (first === '"' || first === "'" || first === '`')
+ || (last === '"' || last === "'" || last === '`')
+ )
+ && first !== last
+ ) {
+ throw new $SyntaxError('property names with quotes must have matching quotes');
+ }
+ if (part === 'constructor' || !isOwn) {
+ skipFurtherCaching = true;
+ }
+
+ intrinsicBaseName += '.' + part;
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
+
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
+ value = INTRINSICS[intrinsicRealName];
+ } else if (value != null) {
+ if (!(part in value)) {
+ if (!allowMissing) {
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
+ }
+ return void undefined;
+ }
+ if ($gOPD && (i + 1) >= parts.length) {
+ var desc = $gOPD(value, part);
+ isOwn = !!desc;
+
+ // By convention, when a data property is converted to an accessor
+ // property to emulate a data property that does not suffer from
+ // the override mistake, that accessor's getter is marked with
+ // an `originalValue` property. Here, when we detect this, we
+ // uphold the illusion by pretending to see that original data
+ // property, i.e., returning the value rather than the getter
+ // itself.
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
+ value = desc.get;
+ } else {
+ value = value[part];
+ }
+ } else {
+ isOwn = hasOwn(value, part);
+ value = value[part];
+ }
+
+ if (isOwn && !skipFurtherCaching) {
+ INTRINSICS[intrinsicRealName] = value;
+ }
+ }
+ }
+ return value;
+};
diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json
new file mode 100644
index 0000000..dfde032
--- /dev/null
+++ b/node_modules/get-intrinsic/package.json
@@ -0,0 +1,91 @@
+{
+ "name": "get-intrinsic",
+ "version": "1.1.3",
+ "description": "Get and robustly cache all JS language-level intrinsics at first require time",
+ "main": "index.js",
+ "exports": {
+ ".": [
+ {
+ "default": "./index.js"
+ },
+ "./index.js"
+ ],
+ "./package.json": "./package.json"
+ },
+ "scripts": {
+ "prepack": "npmignore --auto --commentLines=autogenerated",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "prepublishOnly": "safe-publish-latest",
+ "prelint": "evalmd README.md",
+ "lint": "eslint --ext=.js,.mjs .",
+ "pretest": "npm run lint",
+ "tests-only": "nyc tape 'test/**/*.js'",
+ "test": "npm run tests-only",
+ "posttest": "aud --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ljharb/get-intrinsic.git"
+ },
+ "keywords": [
+ "javascript",
+ "ecmascript",
+ "es",
+ "js",
+ "intrinsic",
+ "getintrinsic",
+ "es-abstract"
+ ],
+ "author": "Jordan Harband <ljharb@gmail.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ljharb/get-intrinsic/issues"
+ },
+ "homepage": "https://github.com/ljharb/get-intrinsic#readme",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^21.0.0",
+ "aud": "^2.0.0",
+ "auto-changelog": "^2.4.0",
+ "call-bind": "^1.0.2",
+ "es-abstract": "^1.20.2",
+ "es-value-fixtures": "^1.4.2",
+ "eslint": "=8.8.0",
+ "evalmd": "^0.0.19",
+ "for-each": "^0.3.3",
+ "make-async-function": "^1.0.0",
+ "make-async-generator-function": "^1.0.0",
+ "make-generator-function": "^2.0.0",
+ "mock-property": "^1.0.0",
+ "npmignore": "^0.3.0",
+ "nyc": "^10.3.2",
+ "object-inspect": "^1.12.2",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.6.0"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ },
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.3"
+ },
+ "testling": {
+ "files": "test/GetIntrinsic.js"
+ },
+ "publishConfig": {
+ "ignore": [
+ ".github/workflows"
+ ]
+ }
+}
diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js
new file mode 100644
index 0000000..7e0ea30
--- /dev/null
+++ b/node_modules/get-intrinsic/test/GetIntrinsic.js
@@ -0,0 +1,274 @@
+'use strict';
+
+var GetIntrinsic = require('../');
+
+var test = require('tape');
+var forEach = require('for-each');
+var debug = require('object-inspect');
+var generatorFns = require('make-generator-function')();
+var asyncFns = require('make-async-function').list();
+var asyncGenFns = require('make-async-generator-function')();
+var mockProperty = require('mock-property');
+
+var callBound = require('call-bind/callBound');
+var v = require('es-value-fixtures');
+var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
+var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow');
+
+var $isProto = callBound('%Object.prototype.isPrototypeOf%');
+
+test('export', function (t) {
+ t.equal(typeof GetIntrinsic, 'function', 'it is a function');
+ t.equal(GetIntrinsic.length, 2, 'function has length of 2');
+
+ t.end();
+});
+
+test('throws', function (t) {
+ t['throws'](
+ function () { GetIntrinsic('not an intrinsic'); },
+ SyntaxError,
+ 'nonexistent intrinsic throws a syntax error'
+ );
+
+ t['throws'](
+ function () { GetIntrinsic(''); },
+ TypeError,
+ 'empty string intrinsic throws a type error'
+ );
+
+ t['throws'](
+ function () { GetIntrinsic('.'); },
+ SyntaxError,
+ '"just a dot" intrinsic throws a syntax error'
+ );
+
+ t['throws'](
+ function () { GetIntrinsic('%String'); },
+ SyntaxError,
+ 'Leading % without trailing % throws a syntax error'
+ );
+
+ t['throws'](
+ function () { GetIntrinsic('String%'); },
+ SyntaxError,
+ 'Trailing % without leading % throws a syntax error'
+ );
+
+ t['throws'](
+ function () { GetIntrinsic("String['prototype]"); },
+ SyntaxError,
+ 'Dynamic property access is disallowed for intrinsics (unterminated string)'
+ );
+
+ t['throws'](
+ function () { GetIntrinsic('%Proxy.prototype.undefined%'); },
+ TypeError,
+ "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)"
+ );
+
+ t['throws'](
+ function () { GetIntrinsic('%Array.prototype%garbage%'); },
+ SyntaxError,
+ 'Throws with extra percent signs'
+ );
+
+ t['throws'](
+ function () { GetIntrinsic('%Array.prototype%push%'); },
+ SyntaxError,
+ 'Throws with extra percent signs, even on an existing intrinsic'
+ );
+
+ forEach(v.nonStrings, function (nonString) {
+ t['throws'](
+ function () { GetIntrinsic(nonString); },
+ TypeError,
+ debug(nonString) + ' is not a String'
+ );
+ });
+
+ forEach(v.nonBooleans, function (nonBoolean) {
+ t['throws'](
+ function () { GetIntrinsic('%', nonBoolean); },
+ TypeError,
+ debug(nonBoolean) + ' is not a Boolean'
+ );
+ });
+
+ forEach([
+ 'toString',
+ 'propertyIsEnumerable',
+ 'hasOwnProperty'
+ ], function (objectProtoMember) {
+ t['throws'](
+ function () { GetIntrinsic(objectProtoMember); },
+ SyntaxError,
+ debug(objectProtoMember) + ' is not an intrinsic'
+ );
+ });
+
+ t.end();
+});
+
+test('base intrinsics', function (t) {
+ t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object');
+ t.equal(GetIntrinsic('Object'), Object, 'Object yields Object');
+ t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array');
+ t.equal(GetIntrinsic('Array'), Array, 'Array yields Array');
+
+ t.end();
+});
+
+test('dotted paths', function (t) {
+ t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString');
+ t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString');
+ t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push');
+ t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push');
+
+ test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) {
+ var original = GetIntrinsic('%ObjProto_toString%');
+
+ forEach([
+ '%Object.prototype.toString%',
+ 'Object.prototype.toString',
+ '%ObjectPrototype.toString%',
+ 'ObjectPrototype.toString',
+ '%ObjProto_toString%',
+ 'ObjProto_toString'
+ ], function (name) {
+ DefinePropertyOrThrow(Object.prototype, 'toString', {
+ '[[Value]]': function toString() {
+ return original.apply(this, arguments);
+ }
+ });
+ st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString');
+ });
+
+ DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original });
+ st.end();
+ });
+
+ test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) {
+ var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%');
+
+ forEach([
+ '%Object.prototype.propertyIsEnumerable%',
+ 'Object.prototype.propertyIsEnumerable',
+ '%ObjectPrototype.propertyIsEnumerable%',
+ 'ObjectPrototype.propertyIsEnumerable'
+ ], function (name) {
+ var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', {
+ value: function propertyIsEnumerable() {
+ return original.apply(this, arguments);
+ }
+ });
+ st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable');
+
+ restore();
+ });
+
+ st.end();
+ });
+
+ test('dotted path reports correct error', function (st) {
+ st['throws'](function () {
+ GetIntrinsic('%NonExistentIntrinsic.prototype.property%');
+ }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%');
+
+ st['throws'](function () {
+ GetIntrinsic('%NonExistentIntrinsicPrototype.property%');
+ }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%');
+
+ st.end();
+ });
+
+ t.end();
+});
+
+test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) {
+ var actual = $gOPD(Map.prototype, 'size');
+ t.ok(actual, 'Map.prototype.size has a descriptor');
+ t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function');
+ t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it');
+ t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it');
+
+ t.end();
+});
+
+test('generator functions', { skip: !generatorFns.length }, function (t) {
+ var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%');
+ var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%');
+ var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%');
+
+ forEach(generatorFns, function (genFn) {
+ var fnName = genFn.name;
+ fnName = fnName ? "'" + fnName + "'" : 'genFn';
+
+ t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%');
+ t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName);
+ t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype');
+ });
+
+ t.end();
+});
+
+test('async functions', { skip: !asyncFns.length }, function (t) {
+ var $AsyncFunction = GetIntrinsic('%AsyncFunction%');
+ var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%');
+
+ forEach(asyncFns, function (asyncFn) {
+ var fnName = asyncFn.name;
+ fnName = fnName ? "'" + fnName + "'" : 'asyncFn';
+
+ t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%');
+ t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName);
+ });
+
+ t.end();
+});
+
+test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) {
+ var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%');
+ var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%');
+ var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%');
+
+ forEach(asyncGenFns, function (asyncGenFn) {
+ var fnName = asyncGenFn.name;
+ fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn';
+
+ t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%');
+ t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName);
+ t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype');
+ });
+
+ t.end();
+});
+
+test('%ThrowTypeError%', function (t) {
+ var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%');
+
+ t.equal(typeof $ThrowTypeError, 'function', 'is a function');
+ t['throws'](
+ $ThrowTypeError,
+ TypeError,
+ '%ThrowTypeError% throws a TypeError'
+ );
+
+ t.end();
+});
+
+test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) {
+ t['throws'](
+ function () { GetIntrinsic('%AsyncGeneratorPrototype%'); },
+ TypeError,
+ 'throws when missing'
+ );
+
+ t.equal(
+ GetIntrinsic('%AsyncGeneratorPrototype%', true),
+ undefined,
+ 'does not throw when allowMissing'
+ );
+
+ t.end();
+});
diff --git a/node_modules/get-package-info/.babelrc b/node_modules/get-package-info/.babelrc
new file mode 100644
index 0000000..3c078e9
--- /dev/null
+++ b/node_modules/get-package-info/.babelrc
@@ -0,0 +1,5 @@
+{
+ "presets": [
+ "es2015"
+ ]
+}
diff --git a/node_modules/get-package-info/.npmignore b/node_modules/get-package-info/.npmignore
new file mode 100644
index 0000000..41ccd35
--- /dev/null
+++ b/node_modules/get-package-info/.npmignore
@@ -0,0 +1,4 @@
+node_modules/
+src/
+
+*.log \ No newline at end of file
diff --git a/node_modules/get-package-info/.travis.yml b/node_modules/get-package-info/.travis.yml
new file mode 100644
index 0000000..b29cf66
--- /dev/null
+++ b/node_modules/get-package-info/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "4"
+ - "6"
diff --git a/node_modules/get-package-info/LICENSE b/node_modules/get-package-info/LICENSE
new file mode 100644
index 0000000..d03a494
--- /dev/null
+++ b/node_modules/get-package-info/LICENSE
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Rahat Ahmed
+
+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/get-package-info/README.md b/node_modules/get-package-info/README.md
new file mode 100644
index 0000000..09d6a80
--- /dev/null
+++ b/node_modules/get-package-info/README.md
@@ -0,0 +1,66 @@
+# get-package-info [![Build Status](https://travis-ci.org/rahatarmanahmed/get-package-info.svg?branch=master)](https://travis-ci.org/rahatarmanahmed/get-package-info)
+Gets properties from package.json files in parent directories.
+
+## Installing
+`npm install get-package-info`
+
+## Usage
+
+### `getPackageInfo(props, dir, [cb])`
+
+Searches for properties from package.json starting from the given directory going upwards, until all properties are found. Properties are set to the first instance found, and not overwritten. It returns a promise that resolves with the results (see [example](#Example) below for the structure of the results object). You may also specify a node-style callback if you prefer.
+
+#### `props`
+
+An array of string properties to search for. Nested properties can be retreived with dot notation (ex: `dependencies.lodash`).
+
+If an individual property is an array, it will search for those properties in order, and the first value found will be saved under all the given properties. This is useful if you want at least one of those properties, but don't want the search to fail when it finds one but not another. Ex: `getPackageInfo([['dependencies.lodash', 'devDependencies.lodash']], dir)` will search for lodash in both `dependencies` and `devDependencies`, and save whichever one it finds first under both properties in the results.
+
+#### `dir`
+
+The initial directory to search in. `getPackageInfo(props, dir)` will look for a package.json in `dir`, and get the requested properties. If all the properties are not found, it will look in package.json files in parent directories.
+
+## Example
+```js
+var getPackageInfo = require('get-package-info');
+
+getPackageInfo([['productName', 'name'], 'dependencies.lodash'], '/path/to/dir')
+.then((result) => {
+ console.log(result);
+});
+```
+
+Possible output, depending on the directory structure and package.json contents:
+
+```
+{
+ values: {
+ name: 'package-name',
+ 'dependencies.lodash': '~3.0.0'
+ },
+ source: {
+ productName: {
+ src: '/path/to/dir/package.json',
+ pkg: { ... }, // the parsed package.json this property came from
+ prop: 'productName'
+ },
+ name: {
+ src: '/path/to/dir/package.json',
+ pkg: { ... }, // the parsed package.json this property came from
+ prop: 'productName' // name uses productName's value because productName has priority
+ },
+ 'dependencies.lodash': {
+ src: '/path/to/package.json', // This property was found in a higher directory
+ pkg: { ... },
+ prop: 'dependencies.lodash'
+ }
+ }
+}
+*/
+```
+
+## Handling Errors
+
+If all the properties cannot be found in parent package.json files, then `getPackageInfo()` will reject it's promise (or callback with err argument) with an Error. `err.missingProps` will have an array of the properties that it could not find, and `err.result` will contain all the props that were found.
+
+If any other error occurs(like I/O or runtime errors), `getPackageInfo()` will reject with that error itself.
diff --git a/node_modules/get-package-info/lib/index.js b/node_modules/get-package-info/lib/index.js
new file mode 100644
index 0000000..61b17dc
--- /dev/null
+++ b/node_modules/get-package-info/lib/index.js
@@ -0,0 +1,88 @@
+'use strict';
+
+var Promise = require('bluebird');
+var get = require('lodash.get');
+var readPkgUp = require('read-pkg-up');
+var path = require('path');
+var debug = require('debug')('get-package-info');
+
+var getInfo = function getInfo(props, dir, result) {
+ if (!Array.isArray(props)) return Promise.reject(new Error('First argument must be array of properties to retrieve.'));
+ if (!props.length) return Promise.resolve(result);
+
+ debug('Getting props: ', props);
+ debug('Looking up starting from directory: ', dir);
+ debug('Result so far:', result);
+
+ return Promise.resolve(readPkgUp({ cwd: dir, normalize: false })).then(function (_ref) {
+ var src = _ref.path;
+ var pkg = _ref.pkg;
+
+ if (!src) {
+ debug('Couldn\'t find any more package.json files');
+ var err = new Error('Unable to find all properties in parent package.json files. Missing props: ' + props.map(function (prop) {
+ return JSON.stringify(prop);
+ }).join(', '));
+ err.missingProps = props;
+ err.result = result;
+ throw err;
+ }
+
+ debug('Checking props in package.json found at:', src);
+ var nextProps = [];
+
+ props.forEach(function (prop) {
+ // For props given as array
+ // Look for props in that order, and when found
+ // save value under all given props
+ if (Array.isArray(prop)) {
+ (function () {
+ var value = void 0,
+ sourceProp = void 0;
+
+ prop.some(function (p) {
+ sourceProp = p;
+ value = get(pkg, p);
+ return value;
+ });
+
+ if (value !== undefined) {
+ debug('Found prop:', prop);
+ prop.forEach(function (p) {
+ result.values[p] = value;
+ result.source[p] = { src: src, pkg: pkg, prop: sourceProp };
+ });
+ } else {
+ debug('Couldn\'t find prop:', prop);
+ nextProps.push(prop);
+ }
+ })();
+ } else {
+ // For regular string props, just look normally
+ var _value = get(pkg, prop);
+
+ if (_value !== undefined) {
+ debug('Found prop:', prop);
+ result.values[prop] = _value;
+ result.source[prop] = { src: src, pkg: pkg, prop: prop };
+ } else {
+ debug('Couldn\'t find prop:', prop);
+ nextProps.push(prop);
+ }
+ }
+ });
+
+ // Still have props to look for, look at another package.json above this one
+ if (nextProps.length) {
+ debug('Not all props satisfied, looking for parent package.json');
+ return getInfo(nextProps, path.join(path.dirname(src), '..'), result);
+ }
+
+ debug('Found all props!');
+ return result;
+ });
+};
+
+module.exports = function (props, dir, cb) {
+ return getInfo(props, dir, { values: {}, source: {} }).nodeify(cb);
+}; \ No newline at end of file
diff --git a/node_modules/get-package-info/node_modules/debug/.coveralls.yml b/node_modules/get-package-info/node_modules/debug/.coveralls.yml
new file mode 100644
index 0000000..20a7068
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/node_modules/get-package-info/node_modules/debug/.eslintrc b/node_modules/get-package-info/node_modules/debug/.eslintrc
new file mode 100644
index 0000000..8a37ae2
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "rules": {
+ "no-console": 0,
+ "no-empty": [1, { "allowEmptyCatch": true }]
+ },
+ "extends": "eslint:recommended"
+}
diff --git a/node_modules/get-package-info/node_modules/debug/.npmignore b/node_modules/get-package-info/node_modules/debug/.npmignore
new file mode 100644
index 0000000..5f60eec
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/.npmignore
@@ -0,0 +1,9 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
+coverage
+bower.json
diff --git a/node_modules/get-package-info/node_modules/debug/.travis.yml b/node_modules/get-package-info/node_modules/debug/.travis.yml
new file mode 100644
index 0000000..6c6090c
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/.travis.yml
@@ -0,0 +1,14 @@
+
+language: node_js
+node_js:
+ - "6"
+ - "5"
+ - "4"
+
+install:
+ - make node_modules
+
+script:
+ - make lint
+ - make test
+ - make coveralls
diff --git a/node_modules/get-package-info/node_modules/debug/CHANGELOG.md b/node_modules/get-package-info/node_modules/debug/CHANGELOG.md
new file mode 100644
index 0000000..eadaa18
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,362 @@
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/get-package-info/node_modules/debug/LICENSE b/node_modules/get-package-info/node_modules/debug/LICENSE
new file mode 100644
index 0000000..658c933
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/get-package-info/node_modules/debug/Makefile b/node_modules/get-package-info/node_modules/debug/Makefile
new file mode 100644
index 0000000..584da8b
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/Makefile
@@ -0,0 +1,50 @@
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+.FORCE:
+
+install: node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+lint: .FORCE
+ eslint browser.js debug.js index.js node.js
+
+test-node: .FORCE
+ istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+
+test-browser: .FORCE
+ mkdir -p dist
+
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+ karma start --single-run
+ rimraf dist
+
+test: .FORCE
+ concurrently \
+ "make test-node" \
+ "make test-browser"
+
+coveralls:
+ cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+.PHONY: all install clean distclean
diff --git a/node_modules/get-package-info/node_modules/debug/README.md b/node_modules/get-package-info/node_modules/debug/README.md
new file mode 100644
index 0000000..f67be6b
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/README.md
@@ -0,0 +1,312 @@
+# debug
+[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+
+
+A tiny node.js debugging utility modelled after node core's debugging technique.
+
+**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+ Note that PowerShell uses different syntax to set environment variables.
+
+ ```cmd
+ $env:DEBUG = "*,-not_this"
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Environment Variables
+
+ When running through Node.js, you can set a few environment variables that will
+ change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+ __Note:__ The environment variables beginning with `DEBUG_` end up being
+ converted into an Options object that gets used with `%o`/`%O` formatters.
+ See the Node.js documentation for
+ [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+ for the complete list.
+
+## Formatters
+
+
+ Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+### Custom formatters
+
+ You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+## Browser support
+ You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+ or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+ if you don't want to build it yourself.
+
+ Debug's enable state is currently persisted by `localStorage`.
+ Consider the situation shown below where you have `worker:a` and `worker:b`,
+ and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/get-package-info/node_modules/debug/component.json b/node_modules/get-package-info/node_modules/debug/component.json
new file mode 100644
index 0000000..9de2641
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.6.9",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "src/browser.js",
+ "scripts": [
+ "src/browser.js",
+ "src/debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/debug/karma.conf.js b/node_modules/get-package-info/node_modules/debug/karma.conf.js
new file mode 100644
index 0000000..103a82d
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/karma.conf.js
@@ -0,0 +1,70 @@
+// Karma configuration
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
+
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'dist/debug.js',
+ 'test/*spec.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ 'src/node.js'
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['progress'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}
diff --git a/node_modules/get-package-info/node_modules/debug/node.js b/node_modules/get-package-info/node_modules/debug/node.js
new file mode 100644
index 0000000..7fc36fe
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/node_modules/get-package-info/node_modules/debug/package.json b/node_modules/get-package-info/node_modules/debug/package.json
new file mode 100644
index 0000000..dc787ba
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "debug",
+ "version": "2.6.9",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/debug/src/browser.js b/node_modules/get-package-info/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..7106924
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/src/browser.js
@@ -0,0 +1,185 @@
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return;
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit')
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/node_modules/get-package-info/node_modules/debug/src/debug.js b/node_modules/get-package-info/node_modules/debug/src/debug.js
new file mode 100644
index 0000000..6a5e3fc
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/src/debug.js
@@ -0,0 +1,202 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
+
+ var self = debug;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ return debug;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ exports.names = [];
+ exports.skips = [];
+
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/node_modules/get-package-info/node_modules/debug/src/index.js b/node_modules/get-package-info/node_modules/debug/src/index.js
new file mode 100644
index 0000000..e12cf4d
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process !== 'undefined' && process.type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/get-package-info/node_modules/debug/src/inspector-log.js b/node_modules/get-package-info/node_modules/debug/src/inspector-log.js
new file mode 100644
index 0000000..60ea6c0
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/src/inspector-log.js
@@ -0,0 +1,15 @@
+module.exports = inspectorLog;
+
+// black hole
+const nullStream = new (require('stream').Writable)();
+nullStream._write = () => {};
+
+/**
+ * Outputs a `console.log()` to the Node.js Inspector console *only*.
+ */
+function inspectorLog() {
+ const stdout = console._stdout;
+ console._stdout = nullStream;
+ console.log.apply(console, arguments);
+ console._stdout = stdout;
+}
diff --git a/node_modules/get-package-info/node_modules/debug/src/node.js b/node_modules/get-package-info/node_modules/debug/src/node.js
new file mode 100644
index 0000000..b15109c
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/debug/src/node.js
@@ -0,0 +1,248 @@
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // camel-case
+ var prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+ // coerce string value into JS value
+ var val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === 'null') val = null;
+ else val = Number(val);
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+
+if (1 !== fd && 2 !== fd) {
+ util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
+}
+
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var name = this.namespace;
+ var useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ */
+
+function log() {
+ return stream.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+ debug.inspectOpts = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/node_modules/get-package-info/node_modules/find-up/index.js b/node_modules/get-package-info/node_modules/find-up/index.js
new file mode 100644
index 0000000..939c955
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/find-up/index.js
@@ -0,0 +1,48 @@
+'use strict';
+const path = require('path');
+const locatePath = require('locate-path');
+
+module.exports = (filename, opts) => {
+ opts = opts || {};
+
+ const startDir = path.resolve(opts.cwd || '');
+ const root = path.parse(startDir).root;
+
+ const filenames = [].concat(filename);
+
+ return new Promise(resolve => {
+ (function find(dir) {
+ locatePath(filenames, {cwd: dir}).then(file => {
+ if (file) {
+ resolve(path.join(dir, file));
+ } else if (dir === root) {
+ resolve(null);
+ } else {
+ find(path.dirname(dir));
+ }
+ });
+ })(startDir);
+ });
+};
+
+module.exports.sync = (filename, opts) => {
+ opts = opts || {};
+
+ let dir = path.resolve(opts.cwd || '');
+ const root = path.parse(dir).root;
+
+ const filenames = [].concat(filename);
+
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ const file = locatePath.sync(filenames, {cwd: dir});
+
+ if (file) {
+ return path.join(dir, file);
+ } else if (dir === root) {
+ return null;
+ }
+
+ dir = path.dirname(dir);
+ }
+};
diff --git a/node_modules/get-package-info/node_modules/find-up/license b/node_modules/get-package-info/node_modules/find-up/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/find-up/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/get-package-info/node_modules/find-up/package.json b/node_modules/get-package-info/node_modules/find-up/package.json
new file mode 100644
index 0000000..7ec85bb
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/find-up/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "find-up",
+ "version": "2.1.0",
+ "description": "Find a file by walking up parent directories",
+ "license": "MIT",
+ "repository": "sindresorhus/find-up",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "find",
+ "up",
+ "find-up",
+ "findup",
+ "look-up",
+ "look",
+ "file",
+ "search",
+ "match",
+ "package",
+ "resolve",
+ "parent",
+ "parents",
+ "folder",
+ "directory",
+ "dir",
+ "walk",
+ "walking",
+ "path"
+ ],
+ "dependencies": {
+ "locate-path": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "tempfile": "^1.1.1",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/find-up/readme.md b/node_modules/get-package-info/node_modules/find-up/readme.md
new file mode 100644
index 0000000..b5ad694
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/find-up/readme.md
@@ -0,0 +1,85 @@
+# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master)
+
+> Find a file by walking up parent directories
+
+
+## Install
+
+```
+$ npm install --save find-up
+```
+
+
+## Usage
+
+```
+/
+└── Users
+ └── sindresorhus
+ ├── unicorn.png
+ └── foo
+ └── bar
+ ├── baz
+ └── example.js
+```
+
+```js
+// example.js
+const findUp = require('find-up');
+
+findUp('unicorn.png').then(filepath => {
+ console.log(filepath);
+ //=> '/Users/sindresorhus/unicorn.png'
+});
+
+findUp(['rainbow.png', 'unicorn.png']).then(filepath => {
+ console.log(filepath);
+ //=> '/Users/sindresorhus/unicorn.png'
+});
+```
+
+
+## API
+
+### findUp(filename, [options])
+
+Returns a `Promise` for the filepath or `null`.
+
+### findUp([filenameA, filenameB], [options])
+
+Returns a `Promise` for the first filepath found (by respecting the order) or `null`.
+
+### findUp.sync(filename, [options])
+
+Returns a filepath or `null`.
+
+### findUp.sync([filenameA, filenameB], [options])
+
+Returns the first filepath found (by respecting the order) or `null`.
+
+#### filename
+
+Type: `string`
+
+Filename of the file to find.
+
+#### options
+
+##### cwd
+
+Type: `string`<br>
+Default: `process.cwd()`
+
+Directory to start from.
+
+
+## Related
+
+- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
+- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
+- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/get-package-info/node_modules/load-json-file/index.js b/node_modules/get-package-info/node_modules/load-json-file/index.js
new file mode 100644
index 0000000..b2767e3
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/load-json-file/index.js
@@ -0,0 +1,11 @@
+'use strict';
+const path = require('path');
+const fs = require('graceful-fs');
+const stripBom = require('strip-bom');
+const parseJson = require('parse-json');
+const pify = require('pify');
+
+const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp));
+
+module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp));
+module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp);
diff --git a/node_modules/get-package-info/node_modules/load-json-file/license b/node_modules/get-package-info/node_modules/load-json-file/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/load-json-file/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/get-package-info/node_modules/load-json-file/package.json b/node_modules/get-package-info/node_modules/load-json-file/package.json
new file mode 100644
index 0000000..e5809e5
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/load-json-file/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "load-json-file",
+ "version": "2.0.0",
+ "description": "Read and parse a JSON file",
+ "license": "MIT",
+ "repository": "sindresorhus/load-json-file",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "read",
+ "json",
+ "parse",
+ "file",
+ "fs",
+ "graceful",
+ "load"
+ ],
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "strip-bom": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/load-json-file/readme.md b/node_modules/get-package-info/node_modules/load-json-file/readme.md
new file mode 100644
index 0000000..3319c26
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/load-json-file/readme.md
@@ -0,0 +1,45 @@
+# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file)
+
+> Read and parse a JSON file
+
+[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json).
+
+
+## Install
+
+```
+$ npm install --save load-json-file
+```
+
+
+## Usage
+
+```js
+const loadJsonFile = require('load-json-file');
+
+loadJsonFile('foo.json').then(json => {
+ console.log(json);
+ //=> {foo: true}
+});
+```
+
+
+## API
+
+### loadJsonFile(filepath)
+
+Returns a promise for the parsed JSON.
+
+### loadJsonFile.sync(filepath)
+
+Returns the parsed JSON.
+
+
+## Related
+
+- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/get-package-info/node_modules/ms/index.js b/node_modules/get-package-info/node_modules/ms/index.js
new file mode 100644
index 0000000..6a522b1
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/ms/index.js
@@ -0,0 +1,152 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) {
+ return;
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name;
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/node_modules/get-package-info/node_modules/ms/license.md b/node_modules/get-package-info/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/get-package-info/node_modules/ms/package.json b/node_modules/get-package-info/node_modules/ms/package.json
new file mode 100644
index 0000000..6a31c81
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.0.0",
+ "description": "Tiny milisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "expect.js": "0.3.1",
+ "husky": "0.13.3",
+ "lint-staged": "3.4.1",
+ "mocha": "3.4.1"
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/ms/readme.md b/node_modules/get-package-info/node_modules/ms/readme.md
new file mode 100644
index 0000000..84a9974
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/ms/readme.md
@@ -0,0 +1,51 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+```
+
+### Convert from milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time format written-out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+
+## Caught a bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/get-package-info/node_modules/path-type/index.js b/node_modules/get-package-info/node_modules/path-type/index.js
new file mode 100644
index 0000000..4ac9dd9
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/path-type/index.js
@@ -0,0 +1,26 @@
+'use strict';
+const fs = require('fs');
+const pify = require('pify');
+
+function type(fn, fn2, fp) {
+ if (typeof fp !== 'string') {
+ return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`));
+ }
+
+ return pify(fs[fn])(fp).then(stats => stats[fn2]());
+}
+
+function typeSync(fn, fn2, fp) {
+ if (typeof fp !== 'string') {
+ throw new TypeError(`Expected a string, got ${typeof fp}`);
+ }
+
+ return fs[fn](fp)[fn2]();
+}
+
+exports.file = type.bind(null, 'stat', 'isFile');
+exports.dir = type.bind(null, 'stat', 'isDirectory');
+exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink');
+exports.fileSync = typeSync.bind(null, 'statSync', 'isFile');
+exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory');
+exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
diff --git a/node_modules/get-package-info/node_modules/path-type/license b/node_modules/get-package-info/node_modules/path-type/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/path-type/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/get-package-info/node_modules/path-type/package.json b/node_modules/get-package-info/node_modules/path-type/package.json
new file mode 100644
index 0000000..54336f3
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/path-type/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "path-type",
+ "version": "2.0.0",
+ "description": "Check if a path is a file, directory, or symlink",
+ "license": "MIT",
+ "repository": "sindresorhus/path-type",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "fs",
+ "type",
+ "is",
+ "check",
+ "directory",
+ "dir",
+ "file",
+ "filepath",
+ "symlink",
+ "symbolic",
+ "link",
+ "stat",
+ "stats",
+ "filesystem"
+ ],
+ "dependencies": {
+ "pify": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/path-type/readme.md b/node_modules/get-package-info/node_modules/path-type/readme.md
new file mode 100644
index 0000000..b1ea61f
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/path-type/readme.md
@@ -0,0 +1,42 @@
+# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type)
+
+> Check if a path is a file, directory, or symlink
+
+
+## Install
+
+```
+$ npm install --save path-type
+```
+
+
+## Usage
+
+```js
+const pathType = require('path-type');
+
+pathType.file('package.json').then(isFile => {
+ console.log(isFile);
+ //=> true
+})
+```
+
+
+## API
+
+### .file(path)
+### .dir(path)
+### .symlink(path)
+
+Returns a `Promise` for a `boolean` of whether the path is the checked type.
+
+### .fileSync(path)
+### .dirSync(path)
+### .symlinkSync(path)
+
+Returns a `boolean` of whether the path is the checked type.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/get-package-info/node_modules/read-pkg-up/index.js b/node_modules/get-package-info/node_modules/read-pkg-up/index.js
new file mode 100644
index 0000000..2607976
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg-up/index.js
@@ -0,0 +1,26 @@
+'use strict';
+const findUp = require('find-up');
+const readPkg = require('read-pkg');
+
+module.exports = opts => {
+ return findUp('package.json', opts).then(fp => {
+ if (!fp) {
+ return {};
+ }
+
+ return readPkg(fp, opts).then(pkg => ({pkg, path: fp}));
+ });
+};
+
+module.exports.sync = opts => {
+ const fp = findUp.sync('package.json', opts);
+
+ if (!fp) {
+ return {};
+ }
+
+ return {
+ pkg: readPkg.sync(fp, opts),
+ path: fp
+ };
+};
diff --git a/node_modules/get-package-info/node_modules/read-pkg-up/license b/node_modules/get-package-info/node_modules/read-pkg-up/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg-up/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/get-package-info/node_modules/read-pkg-up/package.json b/node_modules/get-package-info/node_modules/read-pkg-up/package.json
new file mode 100644
index 0000000..f09bf3c
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg-up/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "read-pkg-up",
+ "version": "2.0.0",
+ "description": "Read the closest package.json file",
+ "license": "MIT",
+ "repository": "sindresorhus/read-pkg-up",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "json",
+ "read",
+ "parse",
+ "file",
+ "fs",
+ "graceful",
+ "load",
+ "pkg",
+ "package",
+ "find",
+ "up",
+ "find-up",
+ "findup",
+ "look-up",
+ "look",
+ "file",
+ "search",
+ "match",
+ "package",
+ "resolve",
+ "parent",
+ "parents",
+ "folder",
+ "directory",
+ "dir",
+ "walk",
+ "walking",
+ "path"
+ ],
+ "dependencies": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/read-pkg-up/readme.md b/node_modules/get-package-info/node_modules/read-pkg-up/readme.md
new file mode 100644
index 0000000..ba18780
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg-up/readme.md
@@ -0,0 +1,80 @@
+# read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up)
+
+> Read the closest package.json file
+
+
+## Why
+
+- [Finds the closest package.json](https://github.com/sindresorhus/find-up)
+- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
+- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
+- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
+- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
+
+
+## Install
+
+```
+$ npm install --save read-pkg-up
+```
+
+
+## Usage
+
+```js
+const readPkgUp = require('read-pkg-up');
+
+readPkgUp().then(result => {
+ console.log(result);
+ /*
+ {
+ pkg: {
+ name: 'awesome-package',
+ version: '1.0.0',
+ ...
+ },
+ path: '/Users/sindresorhus/dev/awesome-package/package.json'
+ }
+ */
+});
+```
+
+
+## API
+
+### readPkgUp([options])
+
+Returns a `Promise` for the result object.
+
+### readPkgUp.sync([options])
+
+Returns the result object.
+
+#### options
+
+##### cwd
+
+Type: `string`<br>
+Default: `.`
+
+Directory to start looking for a package.json file.
+
+##### normalize
+
+Type: `boolean`<br>
+Default: `true`
+
+[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
+
+
+## Related
+
+- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file
+- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
+- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories
+- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/get-package-info/node_modules/read-pkg/index.js b/node_modules/get-package-info/node_modules/read-pkg/index.js
new file mode 100644
index 0000000..dff948b
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg/index.js
@@ -0,0 +1,47 @@
+'use strict';
+const path = require('path');
+const loadJsonFile = require('load-json-file');
+const pathType = require('path-type');
+
+module.exports = (fp, opts) => {
+ if (typeof fp !== 'string') {
+ opts = fp;
+ fp = '.';
+ }
+
+ opts = opts || {};
+
+ return pathType.dir(fp)
+ .then(isDir => {
+ if (isDir) {
+ fp = path.join(fp, 'package.json');
+ }
+
+ return loadJsonFile(fp);
+ })
+ .then(x => {
+ if (opts.normalize !== false) {
+ require('normalize-package-data')(x);
+ }
+
+ return x;
+ });
+};
+
+module.exports.sync = (fp, opts) => {
+ if (typeof fp !== 'string') {
+ opts = fp;
+ fp = '.';
+ }
+
+ opts = opts || {};
+ fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp;
+
+ const x = loadJsonFile.sync(fp);
+
+ if (opts.normalize !== false) {
+ require('normalize-package-data')(x);
+ }
+
+ return x;
+};
diff --git a/node_modules/get-package-info/node_modules/read-pkg/license b/node_modules/get-package-info/node_modules/read-pkg/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/get-package-info/node_modules/read-pkg/package.json b/node_modules/get-package-info/node_modules/read-pkg/package.json
new file mode 100644
index 0000000..b232219
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "read-pkg",
+ "version": "2.0.0",
+ "description": "Read a package.json file",
+ "license": "MIT",
+ "repository": "sindresorhus/read-pkg",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "json",
+ "read",
+ "parse",
+ "file",
+ "fs",
+ "graceful",
+ "load",
+ "pkg",
+ "package",
+ "normalize"
+ ],
+ "dependencies": {
+ "load-json-file": "^2.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/read-pkg/readme.md b/node_modules/get-package-info/node_modules/read-pkg/readme.md
new file mode 100644
index 0000000..5796008
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/read-pkg/readme.md
@@ -0,0 +1,79 @@
+# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg)
+
+> Read a package.json file
+
+
+## Why
+
+- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
+- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
+- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
+- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
+
+
+## Install
+
+```
+$ npm install --save read-pkg
+```
+
+
+## Usage
+
+```js
+const readPkg = require('read-pkg');
+
+readPkg().then(pkg => {
+ console.log(pkg);
+ //=> {name: 'read-pkg', ...}
+});
+
+readPkg(__dirname).then(pkg => {
+ console.log(pkg);
+ //=> {name: 'read-pkg', ...}
+});
+
+readPkg(path.join('unicorn', 'package.json')).then(pkg => {
+ console.log(pkg);
+ //=> {name: 'read-pkg', ...}
+});
+```
+
+
+## API
+
+### readPkg([path], [options])
+
+Returns a `Promise` for the parsed JSON.
+
+### readPkg.sync([path], [options])
+
+Returns the parsed JSON.
+
+#### path
+
+Type: `string`<br>
+Default: `.`
+
+Path to a `package.json` file or its directory.
+
+#### options
+
+##### normalize
+
+Type: `boolean`<br>
+Default: `true`
+
+[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
+
+
+## Related
+
+- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file
+- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file
+- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/get-package-info/node_modules/strip-bom/index.js b/node_modules/get-package-info/node_modules/strip-bom/index.js
new file mode 100644
index 0000000..b00feb9
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/strip-bom/index.js
@@ -0,0 +1,14 @@
+'use strict';
+module.exports = x => {
+ if (typeof x !== 'string') {
+ throw new TypeError('Expected a string, got ' + typeof x);
+ }
+
+ // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
+ // conversion translates it to FEFF (UTF-16 BOM)
+ if (x.charCodeAt(0) === 0xFEFF) {
+ return x.slice(1);
+ }
+
+ return x;
+};
diff --git a/node_modules/get-package-info/node_modules/strip-bom/license b/node_modules/get-package-info/node_modules/strip-bom/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/strip-bom/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/get-package-info/node_modules/strip-bom/package.json b/node_modules/get-package-info/node_modules/strip-bom/package.json
new file mode 100644
index 0000000..10f8fdd
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/strip-bom/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "strip-bom",
+ "version": "3.0.0",
+ "description": "Strip UTF-8 byte order mark (BOM) from a string",
+ "license": "MIT",
+ "repository": "sindresorhus/strip-bom",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "strip",
+ "bom",
+ "byte",
+ "order",
+ "mark",
+ "unicode",
+ "utf8",
+ "utf-8",
+ "remove",
+ "delete",
+ "trim",
+ "text",
+ "string"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/get-package-info/node_modules/strip-bom/readme.md b/node_modules/get-package-info/node_modules/strip-bom/readme.md
new file mode 100644
index 0000000..812a980
--- /dev/null
+++ b/node_modules/get-package-info/node_modules/strip-bom/readme.md
@@ -0,0 +1,36 @@
+# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom)
+
+> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string
+
+From Wikipedia:
+
+> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.
+
+
+## Install
+
+```
+$ npm install --save strip-bom
+```
+
+
+## Usage
+
+```js
+const stripBom = require('strip-bom');
+
+stripBom('\uFEFFunicorn');
+//=> 'unicorn'
+```
+
+
+## Related
+
+- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module
+- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module
+- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/get-package-info/package.json b/node_modules/get-package-info/package.json
new file mode 100644
index 0000000..8b6e4b7
--- /dev/null
+++ b/node_modules/get-package-info/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "get-package-info",
+ "description": "Gets properties from package.json files in parent directories.",
+ "version": "1.0.0",
+ "license": "MIT",
+ "main": "lib/index.js",
+ "author": "Rahat Ahmed",
+ "repository": "https://github.com/rahatarmanahmed/get-package-info",
+ "scripts": {
+ "lint": "standard",
+ "test": "mocha --compilers js:babel-register,es6:babel-register,es6.js:babel-register test/",
+ "build": "babel -d lib/ src/",
+ "pretest": "npm run lint",
+ "prebuild": "npm run test",
+ "watch": "onchange src/ -- npm run build && echo Done",
+ "dev": "npm run watch",
+ "prepublish": "npm run build"
+ },
+ "devDependencies": {
+ "babel-cli": "^6.4.0",
+ "babel-preset-es2015": "^6.3.13",
+ "babel-register": "^6.4.3",
+ "chai": "^3.4.1",
+ "mocha": "^3.0.0",
+ "onchange": "^3.0.0",
+ "standard": "^8.4.0"
+ },
+ "dependencies": {
+ "bluebird": "^3.1.1",
+ "debug": "^2.2.0",
+ "lodash.get": "^4.0.0",
+ "read-pkg-up": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 4.0"
+ }
+}
diff --git a/node_modules/get-package-info/test/node_modules/we/need/to/go/deeper/package.json b/node_modules/get-package-info/test/node_modules/we/need/to/go/deeper/package.json
new file mode 100644
index 0000000..fb88cde
--- /dev/null
+++ b/node_modules/get-package-info/test/node_modules/we/need/to/go/deeper/package.json
@@ -0,0 +1,4 @@
+{
+ "productName": "Deeper",
+ "name": "deeper"
+}
diff --git a/node_modules/get-package-info/test/node_modules/we/need/to/go/package.json b/node_modules/get-package-info/test/node_modules/we/need/to/go/package.json
new file mode 100644
index 0000000..4607ba0
--- /dev/null
+++ b/node_modules/get-package-info/test/node_modules/we/need/to/go/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "go",
+ "version": "1.2.3",
+ "ignore_this_property": true
+}
diff --git a/node_modules/get-package-info/test/node_modules/we/package.json b/node_modules/get-package-info/test/node_modules/we/package.json
new file mode 100644
index 0000000..37b46fc
--- /dev/null
+++ b/node_modules/get-package-info/test/node_modules/we/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "we",
+ "dependencies": {
+ "some-dependency": "~1.2.3",
+ "some-other-dependency": "~3.2.1"
+ },
+ "devDependencies": {
+ "some-dev-dependency": "~1.2.3",
+ "some-other-dev-dependency": "~3.2.1"
+ }
+}
diff --git a/node_modules/get-package-info/test/test.js b/node_modules/get-package-info/test/test.js
new file mode 100644
index 0000000..265470a
--- /dev/null
+++ b/node_modules/get-package-info/test/test.js
@@ -0,0 +1,114 @@
+/* eslint-env mocha */
+const Promise = require('bluebird')
+const expect = require('chai').expect
+const path = require('path')
+const getPackageInfo = require('../src/index')
+const readFile = Promise.promisify(require('fs').readFile)
+
+// Test to see if given source actually represents the source
+const testSource = (prop, source) => {
+ return readFile(source.src, 'utf-8')
+ .then(JSON.parse)
+ .then((pkg) => expect(pkg).to.deep.equal(source.pkg))
+}
+
+describe('get-package-info', () => {
+ it('should reject promise for non-array non-string props', (done) => {
+ getPackageInfo(
+ {},
+ path.join(__dirname, 'node_modules/we/need/to/go/deeper/')
+ )
+ .catch(() => {
+ done()
+ })
+ })
+
+ it('should return an empty result', () => {
+ return getPackageInfo(
+ [],
+ path.join(__dirname, 'node_modules/we/need/to/go/deeper/')
+ )
+ .then((result) => {
+ expect(result.values).to.deep.equal({})
+ expect(result.source).to.deep.equal({})
+ })
+ })
+
+ it('should return the right properties', () => {
+ return getPackageInfo(
+ [
+ ['productName', 'name'],
+ 'version',
+ 'dependencies.some-dependency',
+ 'devDependencies.some-dev-dependency'
+ ],
+ path.join(__dirname, 'node_modules/we/need/to/go/deeper/')
+ )
+ .then((result) => {
+ expect(result.values).to.deep.equal({
+ productName: 'Deeper',
+ name: 'Deeper',
+ version: '1.2.3',
+ 'dependencies.some-dependency': '~1.2.3',
+ 'devDependencies.some-dev-dependency': '~1.2.3'
+ })
+
+ return Promise.all(Object.keys(result.source).map(
+ (prop) => testSource(prop, result.source[prop])
+ ))
+ })
+ })
+
+ it('should return the right properties to a given callback', (done) => {
+ getPackageInfo(
+ [
+ ['productName', 'name'],
+ 'version',
+ 'dependencies.some-dependency',
+ 'devDependencies.some-dev-dependency'
+ ],
+ path.join(__dirname, 'node_modules/we/need/to/go/deeper/'),
+ (err, result) => {
+ expect(err).to.be.null
+ expect(result.values).to.deep.equal({
+ productName: 'Deeper',
+ name: 'Deeper',
+ version: '1.2.3',
+ 'dependencies.some-dependency': '~1.2.3',
+ 'devDependencies.some-dev-dependency': '~1.2.3'
+ })
+ // Test source prop points to the prop the value came from
+ expect(result.source['productName'].prop).to.equal('productName')
+ expect(result.source['name'].prop).to.equal('productName')
+ expect(result.source['version'].prop).to.equal('version')
+
+ Promise.all(Object.keys(result.source).map(
+ (prop) => testSource(prop, result.source[prop])
+ ))
+ .then(() => done())
+ }
+ )
+ })
+
+ it('should resolve with error message when unable to find all props', () => {
+ return getPackageInfo(
+ [
+ ['productName', 'name'],
+ 'nonexistent',
+ 'version',
+ ['this', 'doesntexist']
+ ],
+ path.join(__dirname, 'node_modules/we/need/to/go/deeper/')
+ )
+ .then(() => {
+ throw new Error('Should not resolve when props are missing')
+ })
+ .catch((err) => {
+ expect(err.missingProps).to.deep.equal(['nonexistent', ['this', 'doesntexist']])
+
+ return Promise.all(Object.keys(err.result.source).map(
+ (prop) => testSource(prop, err.result.source[prop])
+ ))
+ })
+ })
+})
diff --git a/node_modules/get-stdin/index.js b/node_modules/get-stdin/index.js
new file mode 100644
index 0000000..0f1aeb3
--- /dev/null
+++ b/node_modules/get-stdin/index.js
@@ -0,0 +1,49 @@
+'use strict';
+
+module.exports = function (cb) {
+ var stdin = process.stdin;
+ var ret = '';
+
+ if (stdin.isTTY) {
+ setImmediate(cb, '');
+ return;
+ }
+
+ stdin.setEncoding('utf8');
+
+ stdin.on('readable', function () {
+ var chunk;
+
+ while (chunk = stdin.read()) {
+ ret += chunk;
+ }
+ });
+
+ stdin.on('end', function () {
+ cb(ret);
+ });
+};
+
+module.exports.buffer = function (cb) {
+ var stdin = process.stdin;
+ var ret = [];
+ var len = 0;
+
+ if (stdin.isTTY) {
+ setImmediate(cb, new Buffer(''));
+ return;
+ }
+
+ stdin.on('readable', function () {
+ var chunk;
+
+ while (chunk = stdin.read()) {
+ ret.push(chunk);
+ len += chunk.length;
+ }
+ });
+
+ stdin.on('end', function () {
+ cb(Buffer.concat(ret, len));
+ });
+};
diff --git a/node_modules/get-stdin/package.json b/node_modules/get-stdin/package.json
new file mode 100644
index 0000000..9a3e42a
--- /dev/null
+++ b/node_modules/get-stdin/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "get-stdin",
+ "version": "4.0.1",
+ "description": "Easier stdin",
+ "license": "MIT",
+ "repository": "sindresorhus/get-stdin",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "node test.js && node test-buffer.js && echo unicorns | node test-real.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "std",
+ "stdin",
+ "stdio",
+ "concat",
+ "buffer",
+ "stream",
+ "process",
+ "stream"
+ ],
+ "devDependencies": {
+ "ava": "0.0.4",
+ "buffer-equal": "0.0.1"
+ }
+}
diff --git a/node_modules/get-stdin/readme.md b/node_modules/get-stdin/readme.md
new file mode 100644
index 0000000..bc1d32a
--- /dev/null
+++ b/node_modules/get-stdin/readme.md
@@ -0,0 +1,44 @@
+# get-stdin [![Build Status](https://travis-ci.org/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stdin)
+
+> Easier stdin
+
+
+## Install
+
+```sh
+$ npm install --save get-stdin
+```
+
+
+## Usage
+
+```js
+// example.js
+var stdin = require('get-stdin');
+
+stdin(function (data) {
+ console.log(data);
+ //=> unicorns
+});
+```
+
+```sh
+$ echo unicorns | node example.js
+unicorns
+```
+
+
+## API
+
+### stdin(callback)
+
+Get `stdin` as a string.
+
+### stdin.buffer(callback)
+
+Get `stdin` as a buffer.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js
new file mode 100644
index 0000000..2dd7574
--- /dev/null
+++ b/node_modules/get-stream/buffer-stream.js
@@ -0,0 +1,52 @@
+'use strict';
+const {PassThrough: PassThroughStream} = require('stream');
+
+module.exports = options => {
+ options = {...options};
+
+ const {array} = options;
+ let {encoding} = options;
+ const isBuffer = encoding === 'buffer';
+ let objectMode = false;
+
+ if (array) {
+ objectMode = !(encoding || isBuffer);
+ } else {
+ encoding = encoding || 'utf8';
+ }
+
+ if (isBuffer) {
+ encoding = null;
+ }
+
+ const stream = new PassThroughStream({objectMode});
+
+ if (encoding) {
+ stream.setEncoding(encoding);
+ }
+
+ let length = 0;
+ const chunks = [];
+
+ stream.on('data', chunk => {
+ chunks.push(chunk);
+
+ if (objectMode) {
+ length = chunks.length;
+ } else {
+ length += chunk.length;
+ }
+ });
+
+ stream.getBufferedValue = () => {
+ if (array) {
+ return chunks;
+ }
+
+ return isBuffer ? Buffer.concat(chunks, length) : chunks.join('');
+ };
+
+ stream.getBufferedLength = () => length;
+
+ return stream;
+};
diff --git a/node_modules/get-stream/index.d.ts b/node_modules/get-stream/index.d.ts
new file mode 100644
index 0000000..7b98134
--- /dev/null
+++ b/node_modules/get-stream/index.d.ts
@@ -0,0 +1,108 @@
+/// <reference types="node"/>
+import {Stream} from 'stream';
+
+declare class MaxBufferErrorClass extends Error {
+ readonly name: 'MaxBufferError';
+ constructor();
+}
+
+declare namespace getStream {
+ interface Options {
+ /**
+ Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `MaxBufferError` error.
+
+ @default Infinity
+ */
+ readonly maxBuffer?: number;
+ }
+
+ interface OptionsWithEncoding<EncodingType = BufferEncoding> extends Options {
+ /**
+ [Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
+
+ @default 'utf8'
+ */
+ readonly encoding?: EncodingType;
+ }
+
+ type MaxBufferError = MaxBufferErrorClass;
+}
+
+declare const getStream: {
+ /**
+ Get the `stream` as a string.
+
+ @returns A promise that resolves when the end event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
+
+ @example
+ ```
+ import * as fs from 'fs';
+ import getStream = require('get-stream');
+
+ (async () => {
+ const stream = fs.createReadStream('unicorn.txt');
+
+ console.log(await getStream(stream));
+ // ,,))))))));,
+ // __)))))))))))))),
+ // \|/ -\(((((''''((((((((.
+ // -*-==//////(('' . `)))))),
+ // /|\ ))| o ;-. '((((( ,(,
+ // ( `| / ) ;))))' ,_))^;(~
+ // | | | ,))((((_ _____------~~~-. %,;(;(>';'~
+ // o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~
+ // ; ''''```` `: `:::|\,__,%% );`'; ~
+ // | _ ) / `:|`----' `-'
+ // ______/\/~ | / /
+ // /~;;.____/;;' / ___--,-( `;;;/
+ // / // _;______;'------~~~~~ /;;/\ /
+ // // | | / ; \;;,\
+ // (<_ | ; /',/-----' _>
+ // \_| ||_ //~;~~~~~~~~~
+ // `\_| (,~~
+ // \~\
+ // ~~
+ })();
+ ```
+ */
+ (stream: Stream, options?: getStream.OptionsWithEncoding): Promise<string>;
+
+ /**
+ Get the `stream` as a buffer.
+
+ It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
+ */
+ buffer(
+ stream: Stream,
+ options?: getStream.OptionsWithEncoding
+ ): Promise<Buffer>;
+
+ /**
+ Get the `stream` as an array of values.
+
+ It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen:
+
+ - When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes).
+ - When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
+ - When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
+ */
+ array<StreamObjectModeType>(
+ stream: Stream,
+ options?: getStream.Options
+ ): Promise<StreamObjectModeType[]>;
+ array(
+ stream: Stream,
+ options: getStream.OptionsWithEncoding<'buffer'>
+ ): Promise<Buffer[]>;
+ array(
+ stream: Stream,
+ options: getStream.OptionsWithEncoding<BufferEncoding>
+ ): Promise<string[]>;
+
+ MaxBufferError: typeof MaxBufferErrorClass;
+
+ // TODO: Remove this for the next major release
+ default: typeof getStream;
+};
+
+export = getStream;
diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js
new file mode 100644
index 0000000..71f3991
--- /dev/null
+++ b/node_modules/get-stream/index.js
@@ -0,0 +1,60 @@
+'use strict';
+const {constants: BufferConstants} = require('buffer');
+const pump = require('pump');
+const bufferStream = require('./buffer-stream');
+
+class MaxBufferError extends Error {
+ constructor() {
+ super('maxBuffer exceeded');
+ this.name = 'MaxBufferError';
+ }
+}
+
+async function getStream(inputStream, options) {
+ if (!inputStream) {
+ return Promise.reject(new Error('Expected a stream'));
+ }
+
+ options = {
+ maxBuffer: Infinity,
+ ...options
+ };
+
+ const {maxBuffer} = options;
+
+ let stream;
+ await new Promise((resolve, reject) => {
+ const rejectPromise = error => {
+ // Don't retrieve an oversized buffer.
+ if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
+ error.bufferedData = stream.getBufferedValue();
+ }
+
+ reject(error);
+ };
+
+ stream = pump(inputStream, bufferStream(options), error => {
+ if (error) {
+ rejectPromise(error);
+ return;
+ }
+
+ resolve();
+ });
+
+ stream.on('data', () => {
+ if (stream.getBufferedLength() > maxBuffer) {
+ rejectPromise(new MaxBufferError());
+ }
+ });
+ });
+
+ return stream.getBufferedValue();
+}
+
+module.exports = getStream;
+// TODO: Remove this for the next major release
+module.exports.default = getStream;
+module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
+module.exports.array = (stream, options) => getStream(stream, {...options, array: true});
+module.exports.MaxBufferError = MaxBufferError;
diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/get-stream/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/get-stream/package.json b/node_modules/get-stream/package.json
new file mode 100644
index 0000000..e2f1687
--- /dev/null
+++ b/node_modules/get-stream/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "get-stream",
+ "version": "5.2.0",
+ "description": "Get a stream as a string, buffer, or array",
+ "license": "MIT",
+ "repository": "sindresorhus/get-stream",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "buffer-stream.js"
+ ],
+ "keywords": [
+ "get",
+ "stream",
+ "promise",
+ "concat",
+ "string",
+ "text",
+ "buffer",
+ "read",
+ "data",
+ "consume",
+ "readable",
+ "readablestream",
+ "array",
+ "object"
+ ],
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "devDependencies": {
+ "@types/node": "^12.0.7",
+ "ava": "^2.0.0",
+ "into-stream": "^5.0.0",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md
new file mode 100644
index 0000000..7d7565d
--- /dev/null
+++ b/node_modules/get-stream/readme.md
@@ -0,0 +1,124 @@
+# get-stream [![Build Status](https://travis-ci.com/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.com/github/sindresorhus/get-stream)
+
+> Get a stream as a string, buffer, or array
+
+## Install
+
+```
+$ npm install get-stream
+```
+
+## Usage
+
+```js
+const fs = require('fs');
+const getStream = require('get-stream');
+
+(async () => {
+ const stream = fs.createReadStream('unicorn.txt');
+
+ console.log(await getStream(stream));
+ /*
+ ,,))))))));,
+ __)))))))))))))),
+ \|/ -\(((((''''((((((((.
+ -*-==//////(('' . `)))))),
+ /|\ ))| o ;-. '((((( ,(,
+ ( `| / ) ;))))' ,_))^;(~
+ | | | ,))((((_ _____------~~~-. %,;(;(>';'~
+ o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~
+ ; ''''```` `: `:::|\,__,%% );`'; ~
+ | _ ) / `:|`----' `-'
+ ______/\/~ | / /
+ /~;;.____/;;' / ___--,-( `;;;/
+ / // _;______;'------~~~~~ /;;/\ /
+ // | | / ; \;;,\
+ (<_ | ; /',/-----' _>
+ \_| ||_ //~;~~~~~~~~~
+ `\_| (,~~
+ \~\
+ ~~
+ */
+})();
+```
+
+## API
+
+The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
+
+### getStream(stream, options?)
+
+Get the `stream` as a string.
+
+#### options
+
+Type: `object`
+
+##### encoding
+
+Type: `string`\
+Default: `'utf8'`
+
+[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
+
+##### maxBuffer
+
+Type: `number`\
+Default: `Infinity`
+
+Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error.
+
+### getStream.buffer(stream, options?)
+
+Get the `stream` as a buffer.
+
+It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
+
+### getStream.array(stream, options?)
+
+Get the `stream` as an array of values.
+
+It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen:
+
+- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes).
+
+- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
+
+- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
+
+## Errors
+
+If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
+
+```js
+(async () => {
+ try {
+ await getStream(streamThatErrorsAtTheEnd('unicorn'));
+ } catch (error) {
+ console.log(error.bufferedData);
+ //=> 'unicorn'
+ }
+})()
+```
+
+## FAQ
+
+### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)?
+
+This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package.
+
+## Related
+
+- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-get-stream?utm_source=npm-get-stream&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/getpass/.npmignore b/node_modules/getpass/.npmignore
new file mode 100644
index 0000000..a4261fc
--- /dev/null
+++ b/node_modules/getpass/.npmignore
@@ -0,0 +1,8 @@
+.gitmodules
+deps
+docs
+Makefile
+node_modules
+test
+tools
+coverage
diff --git a/node_modules/getpass/.travis.yml b/node_modules/getpass/.travis.yml
new file mode 100644
index 0000000..d8b5833
--- /dev/null
+++ b/node_modules/getpass/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - "5.10"
+ - "4.4"
+ - "4.1"
+ - "0.12"
+ - "0.10"
+before_install:
+ - "make check"
diff --git a/node_modules/getpass/LICENSE b/node_modules/getpass/LICENSE
new file mode 100644
index 0000000..f6d947d
--- /dev/null
+++ b/node_modules/getpass/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/node_modules/getpass/README.md b/node_modules/getpass/README.md
new file mode 100644
index 0000000..6e4a50f
--- /dev/null
+++ b/node_modules/getpass/README.md
@@ -0,0 +1,32 @@
+## getpass
+
+Get a password from the terminal. Sounds simple? Sounds like the `readline`
+module should be able to do it? NOPE.
+
+## Install and use it
+
+```bash
+npm install --save getpass
+```
+
+```javascript
+const mod_getpass = require('getpass');
+```
+
+## API
+
+### `mod_getpass.getPass([options, ]callback)`
+
+Gets a password from the terminal. If available, this uses `/dev/tty` to avoid
+interfering with any data being piped in or out of stdio.
+
+This function prints a prompt (by default `Password:`) and then accepts input
+without echoing.
+
+Parameters:
+
+ * `options`, an Object, with properties:
+ * `prompt`, an optional String
+ * `callback`, a `Func(error, password)`, with arguments:
+ * `error`, either `null` (no error) or an `Error` instance
+ * `password`, a String
diff --git a/node_modules/getpass/lib/index.js b/node_modules/getpass/lib/index.js
new file mode 100644
index 0000000..55a7718
--- /dev/null
+++ b/node_modules/getpass/lib/index.js
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2016, Joyent, Inc. All rights reserved.
+ * Author: Alex Wilson <alex.wilson@joyent.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+*/
+
+module.exports = {
+ getPass: getPass
+};
+
+const mod_tty = require('tty');
+const mod_fs = require('fs');
+const mod_assert = require('assert-plus');
+
+var BACKSPACE = String.fromCharCode(127);
+var CTRLC = '\u0003';
+var CTRLD = '\u0004';
+
+function getPass(opts, cb) {
+ if (typeof (opts) === 'function' && cb === undefined) {
+ cb = opts;
+ opts = {};
+ }
+ mod_assert.object(opts, 'options');
+ mod_assert.func(cb, 'callback');
+
+ mod_assert.optionalString(opts.prompt, 'options.prompt');
+ if (opts.prompt === undefined)
+ opts.prompt = 'Password';
+
+ openTTY(function (err, rfd, wfd, rtty, wtty) {
+ if (err) {
+ cb(err);
+ return;
+ }
+
+ wtty.write(opts.prompt + ':');
+ rtty.resume();
+ rtty.setRawMode(true);
+ rtty.resume();
+ rtty.setEncoding('utf8');
+
+ var pw = '';
+ rtty.on('data', onData);
+
+ function onData(data) {
+ var str = data.toString('utf8');
+ for (var i = 0; i < str.length; ++i) {
+ var ch = str[i];
+ switch (ch) {
+ case '\r':
+ case '\n':
+ case CTRLD:
+ cleanup();
+ cb(null, pw);
+ return;
+ case CTRLC:
+ cleanup();
+ cb(new Error('Aborted'));
+ return;
+ case BACKSPACE:
+ pw = pw.slice(0, pw.length - 1);
+ break;
+ default:
+ pw += ch;
+ break;
+ }
+ }
+ }
+
+ function cleanup() {
+ wtty.write('\r\n');
+ rtty.setRawMode(false);
+ rtty.pause();
+ rtty.removeListener('data', onData);
+ if (wfd !== undefined && wfd !== rfd) {
+ wtty.end();
+ mod_fs.closeSync(wfd);
+ }
+ if (rfd !== undefined) {
+ rtty.end();
+ mod_fs.closeSync(rfd);
+ }
+ }
+ });
+}
+
+function openTTY(cb) {
+ mod_fs.open('/dev/tty', 'r+', function (err, rttyfd) {
+ if ((err && (err.code === 'ENOENT' || err.code === 'EACCES')) ||
+ (process.version.match(/^v0[.][0-8][.]/))) {
+ cb(null, undefined, undefined, process.stdin,
+ process.stdout);
+ return;
+ }
+ var rtty = new mod_tty.ReadStream(rttyfd);
+ mod_fs.open('/dev/tty', 'w+', function (err3, wttyfd) {
+ var wtty = new mod_tty.WriteStream(wttyfd);
+ if (err3) {
+ cb(err3);
+ return;
+ }
+ cb(null, rttyfd, wttyfd, rtty, wtty);
+ });
+ });
+}
diff --git a/node_modules/getpass/package.json b/node_modules/getpass/package.json
new file mode 100644
index 0000000..f1638eb
--- /dev/null
+++ b/node_modules/getpass/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "getpass",
+ "version": "0.1.7",
+ "description": "getpass for node.js",
+ "main": "lib/index.js",
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/arekinath/node-getpass.git"
+ },
+ "scripts": {
+ "test": "tape test/*.test.js"
+ },
+ "author": "Alex Wilson <alex.wilson@joyent.com>",
+ "license": "MIT"
+}
diff --git a/node_modules/glob/LICENSE b/node_modules/glob/LICENSE
new file mode 100644
index 0000000..42ca266
--- /dev/null
+++ b/node_modules/glob/LICENSE
@@ -0,0 +1,21 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+## Glob Logo
+
+Glob's logo created by Tanya Brassie <http://tanyabrassie.com/>, licensed
+under a Creative Commons Attribution-ShareAlike 4.0 International License
+https://creativecommons.org/licenses/by-sa/4.0/
diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md
new file mode 100644
index 0000000..83f0c83
--- /dev/null
+++ b/node_modules/glob/README.md
@@ -0,0 +1,378 @@
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master)
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+![a fun cartoon logo made of glob characters](logo/glob.png)
+
+## Usage
+
+Install with npm
+
+```
+npm i glob
+```
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Glob Primer
+
+"Globs" are the patterns you type when you do stuff like `ls *.js` on
+the command line, or put `build/*` in a `.gitignore` file.
+
+Before parsing the path part patterns, braced sections are expanded
+into a set. Braced sections start with `{` and end with `}`, with any
+number of comma-delimited sections within. Braced sections may contain
+slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
+
+The following characters have special magic meaning when used in a
+path portion:
+
+* `*` Matches 0 or more characters in a single path portion
+* `?` Matches 1 character
+* `[...]` Matches a range of characters, similar to a RegExp range.
+ If the first character of the range is `!` or `^` then it matches
+ any character not in the range.
+* `!(pattern|pattern|pattern)` Matches anything that does not match
+ any of the patterns provided.
+* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
+ patterns provided.
+* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
+ patterns provided.
+* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
+* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
+ provided
+* `**` If a "globstar" is alone in a path portion, then it matches
+ zero or more directories and subdirectories searching for matches.
+ It does not crawl symlinked directories.
+
+### Dots
+
+If a file or directory path portion has a `.` as the first character,
+then it will not match any glob pattern unless that pattern's
+corresponding path part also has a `.` as its first character.
+
+For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
+However the pattern `a/*/c` would not, because `*` does not start with
+a dot character.
+
+You can make glob treat dots as normal characters by setting
+`dot:true` in the options.
+
+### Basename Matching
+
+If you set `matchBase:true` in the options, and the pattern has no
+slashes in it, then it will seek for any file anywhere in the tree
+with a matching basename. For example, `*.js` would match
+`test/simple/basic.js`.
+
+### Empty Sets
+
+If no matching files are found, then an empty array is returned. This
+differs from the shell, where the pattern itself is returned. For
+example:
+
+ $ echo a*s*d*f
+ a*s*d*f
+
+To get the bash-style behavior, set the `nonull:true` in the options.
+
+### See Also:
+
+* `man sh`
+* `man bash` (Search for "Pattern Matching")
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob.hasMagic(pattern, [options])
+
+Returns `true` if there are any special characters in the pattern, and
+`false` otherwise.
+
+Note that the options affect the results. If `noext:true` is set in
+the options object, then `+(a|b)` will not be considered a magic
+pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
+then that is considered magical, unless `nobrace:true` is set in the
+options.
+
+## glob(pattern, [options], cb)
+
+* `pattern` `{String}` Pattern to be matched
+* `options` `{Object}`
+* `cb` `{Function}`
+ * `err` `{Error | null}`
+ * `matches` `{Array<String>}` filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options])
+
+* `pattern` `{String}` Pattern to be matched
+* `options` `{Object}`
+* return: `{Array<String>}` filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instantiating the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` `{String}` pattern to search for
+* `options` `{Object}`
+* `cb` `{Function}` Called when an error occurs, or matches are found
+ * `err` `{Error | null}`
+ * `matches` `{Array<String>}` filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+* `cache` Convenience object. Each field has the following possible
+ values:
+ * `false` - Path does not exist
+ * `true` - Path exists
+ * `'FILE'` - Path exists, and is not a directory
+ * `'DIR'` - Path exists, and is a directory
+ * `[file, entries, ...]` - Path exists, is a directory, and the
+ array value is the results of `fs.readdir`
+* `statCache` Cache of `fs.stat` results, to prevent statting the same
+ path multiple times.
+* `symlinks` A record of which paths are symbolic links, which is
+ relevant in resolving `**` patterns.
+* `realpathCache` An optional object which is passed to `fs.realpath`
+ to minimize unnecessary syscalls. It is stored on the instantiated
+ Glob object, and may be re-used.
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the specific
+ thing that matched. It is not deduplicated or resolved to a realpath.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `pause` Temporarily stop the search
+* `resume` Resume the search
+* `abort` Stop the search forever
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the Glob object, as well.
+
+If you are running many `glob` operations, you can pass a Glob object
+as the `options` argument to a subsequent operation to shortcut some
+`stat` and `readdir` calls. At the very least, you may pass in shared
+`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
+parallel glob operations will be sped up by sharing information about
+the filesystem.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `dot` Include `.dot` files in normal matches and `globstar` matches.
+ Note that an explicit dot in a portion of the pattern will always
+ match dot files.
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence.
+* `silent` When an unusual error is encountered when attempting to
+ read a directory, a warning will be printed to stderr. Set the
+ `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered when attempting to
+ read a directory, the process will just continue on in search of
+ other matches. Set the `strict` option to raise an error in these
+ cases.
+* `cache` See `cache` property above. Pass in a previously generated
+ cache object to save some fs calls.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary
+ to set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `symlinks` A cache of known symbolic links. You may pass in a
+ previously generated `symlinks` object to save `lstat` calls when
+ resolving `**` matches.
+* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set. Set this
+ flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `debug` Set to enable debug logging in minimatch and glob.
+* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
+* `noglobstar` Do not match `**` against multiple filenames. (Ie,
+ treat it as a normal `*` instead.)
+* `noext` Do not match `+(a|b)` "extglob" patterns.
+* `nocase` Perform a case-insensitive match. Note: on
+ case-insensitive filesystems, non-magic patterns will match by
+ default, since `stat` and `readdir` will not raise errors.
+* `matchBase` Perform a basename-only match if the pattern does not
+ contain any slash characters. That is, `*.js` would be treated as
+ equivalent to `**/*.js`, matching all js files in all directories.
+* `nodir` Do not match directories, only files. (Note: to match
+ *only* directories, simply put a `/` at the end of the pattern.)
+* `ignore` Add a pattern or an array of glob patterns to exclude matches.
+ Note: `ignore` patterns are *always* in `dot:true` mode, regardless
+ of any other settings.
+* `follow` Follow symlinked directories when expanding `**` patterns.
+ Note that this can result in a lot of duplicate references in the
+ presence of cyclic links.
+* `realpath` Set to true to call `fs.realpath` on all of the results.
+ In the case of a symlink that cannot be resolved, the full absolute
+ path to the matched entry is returned (though it will usually be a
+ broken symlink)
+* `absolute` Set to true to always receive absolute paths for matched
+ files. Unlike `realpath`, this also affects the values returned in
+ the `match` event.
+* `fs` File-system object with Node's `fs` API. By default, the built-in
+ `fs` module will be used. Set to a volume provided by a library like
+ `memfs` to avoid using the "real" file-system.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.3, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+Note that symlinked directories are not crawled as part of a `**`,
+though their contents may match against subsequent portions of the
+pattern. This prevents infinite loops and duplicates and the like.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+### Comments and Negation
+
+Previously, this module let you mark a pattern as a "comment" if it
+started with a `#` character, or a "negated" pattern if it started
+with a `!` character.
+
+These options were deprecated in version 5, and removed in version 6.
+
+To specify things that should not match, use the `ignore` option.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the cache or statCache objects are reused between glob
+calls.
+
+Users are thus advised not to use a glob result as a guarantee of
+filesystem state in the face of rapid changes. For the vast majority
+of operations, this is never a problem.
+
+## Glob Logo
+Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo).
+
+The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
+
+## Contributing
+
+Any change to behavior (including bugfixes) must come with a test.
+
+Patches that fail tests or reduce performance will be rejected.
+
+```
+# to run tests
+npm test
+
+# to re-generate test fixtures
+npm run test-regen
+
+# to benchmark against bash/zsh
+npm run bench
+
+# to profile javascript
+npm run prof
+```
+
+![](oh-my-glob.gif)
diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js
new file mode 100644
index 0000000..424c46e
--- /dev/null
+++ b/node_modules/glob/common.js
@@ -0,0 +1,238 @@
+exports.setopts = setopts
+exports.ownProp = ownProp
+exports.makeAbs = makeAbs
+exports.finish = finish
+exports.mark = mark
+exports.isIgnored = isIgnored
+exports.childrenIgnored = childrenIgnored
+
+function ownProp (obj, field) {
+ return Object.prototype.hasOwnProperty.call(obj, field)
+}
+
+var fs = require("fs")
+var path = require("path")
+var minimatch = require("minimatch")
+var isAbsolute = require("path-is-absolute")
+var Minimatch = minimatch.Minimatch
+
+function alphasort (a, b) {
+ return a.localeCompare(b, 'en')
+}
+
+function setupIgnores (self, options) {
+ self.ignore = options.ignore || []
+
+ if (!Array.isArray(self.ignore))
+ self.ignore = [self.ignore]
+
+ if (self.ignore.length) {
+ self.ignore = self.ignore.map(ignoreMap)
+ }
+}
+
+// ignore patterns are always in dot:true mode.
+function ignoreMap (pattern) {
+ var gmatcher = null
+ if (pattern.slice(-3) === '/**') {
+ var gpattern = pattern.replace(/(\/\*\*)+$/, '')
+ gmatcher = new Minimatch(gpattern, { dot: true })
+ }
+
+ return {
+ matcher: new Minimatch(pattern, { dot: true }),
+ gmatcher: gmatcher
+ }
+}
+
+function setopts (self, pattern, options) {
+ if (!options)
+ options = {}
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ self.silent = !!options.silent
+ self.pattern = pattern
+ self.strict = options.strict !== false
+ self.realpath = !!options.realpath
+ self.realpathCache = options.realpathCache || Object.create(null)
+ self.follow = !!options.follow
+ self.dot = !!options.dot
+ self.mark = !!options.mark
+ self.nodir = !!options.nodir
+ if (self.nodir)
+ self.mark = true
+ self.sync = !!options.sync
+ self.nounique = !!options.nounique
+ self.nonull = !!options.nonull
+ self.nosort = !!options.nosort
+ self.nocase = !!options.nocase
+ self.stat = !!options.stat
+ self.noprocess = !!options.noprocess
+ self.absolute = !!options.absolute
+ self.fs = options.fs || fs
+
+ self.maxLength = options.maxLength || Infinity
+ self.cache = options.cache || Object.create(null)
+ self.statCache = options.statCache || Object.create(null)
+ self.symlinks = options.symlinks || Object.create(null)
+
+ setupIgnores(self, options)
+
+ self.changedCwd = false
+ var cwd = process.cwd()
+ if (!ownProp(options, "cwd"))
+ self.cwd = cwd
+ else {
+ self.cwd = path.resolve(options.cwd)
+ self.changedCwd = self.cwd !== cwd
+ }
+
+ self.root = options.root || path.resolve(self.cwd, "/")
+ self.root = path.resolve(self.root)
+ if (process.platform === "win32")
+ self.root = self.root.replace(/\\/g, "/")
+
+ // TODO: is an absolute `cwd` supposed to be resolved against `root`?
+ // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
+ self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
+ if (process.platform === "win32")
+ self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
+ self.nomount = !!options.nomount
+
+ // disable comments and negation in Minimatch.
+ // Note that they are not supported in Glob itself anyway.
+ options.nonegate = true
+ options.nocomment = true
+ // always treat \ in patterns as escapes, not path separators
+ options.allowWindowsEscape = false
+
+ self.minimatch = new Minimatch(pattern, options)
+ self.options = self.minimatch.options
+}
+
+function finish (self) {
+ var nou = self.nounique
+ var all = nou ? [] : Object.create(null)
+
+ for (var i = 0, l = self.matches.length; i < l; i ++) {
+ var matches = self.matches[i]
+ if (!matches || Object.keys(matches).length === 0) {
+ if (self.nonull) {
+ // do like the shell, and spit out the literal glob
+ var literal = self.minimatch.globSet[i]
+ if (nou)
+ all.push(literal)
+ else
+ all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou)
+ all.push.apply(all, m)
+ else
+ m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou)
+ all = Object.keys(all)
+
+ if (!self.nosort)
+ all = all.sort(alphasort)
+
+ // at *some* point we statted all of these
+ if (self.mark) {
+ for (var i = 0; i < all.length; i++) {
+ all[i] = self._mark(all[i])
+ }
+ if (self.nodir) {
+ all = all.filter(function (e) {
+ var notDir = !(/\/$/.test(e))
+ var c = self.cache[e] || self.cache[makeAbs(self, e)]
+ if (notDir && c)
+ notDir = c !== 'DIR' && !Array.isArray(c)
+ return notDir
+ })
+ }
+ }
+
+ if (self.ignore.length)
+ all = all.filter(function(m) {
+ return !isIgnored(self, m)
+ })
+
+ self.found = all
+}
+
+function mark (self, p) {
+ var abs = makeAbs(self, p)
+ var c = self.cache[abs]
+ var m = p
+ if (c) {
+ var isDir = c === 'DIR' || Array.isArray(c)
+ var slash = p.slice(-1) === '/'
+
+ if (isDir && !slash)
+ m += '/'
+ else if (!isDir && slash)
+ m = m.slice(0, -1)
+
+ if (m !== p) {
+ var mabs = makeAbs(self, m)
+ self.statCache[mabs] = self.statCache[abs]
+ self.cache[mabs] = self.cache[abs]
+ }
+ }
+
+ return m
+}
+
+// lotta situps...
+function makeAbs (self, f) {
+ var abs = f
+ if (f.charAt(0) === '/') {
+ abs = path.join(self.root, f)
+ } else if (isAbsolute(f) || f === '') {
+ abs = f
+ } else if (self.changedCwd) {
+ abs = path.resolve(self.cwd, f)
+ } else {
+ abs = path.resolve(f)
+ }
+
+ if (process.platform === 'win32')
+ abs = abs.replace(/\\/g, '/')
+
+ return abs
+}
+
+
+// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
+// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
+function isIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
+
+function childrenIgnored (self, path) {
+ if (!self.ignore.length)
+ return false
+
+ return self.ignore.some(function(item) {
+ return !!(item.gmatcher && item.gmatcher.match(path))
+ })
+}
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js
new file mode 100644
index 0000000..37a4d7e
--- /dev/null
+++ b/node_modules/glob/glob.js
@@ -0,0 +1,790 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern, false)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern, inGlobStar)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+//
+// If inGlobStar and PREFIX is symlink and points to dir
+// set ENTRIES = []
+// else readdir(PREFIX) as ENTRIES
+// If fail, END
+//
+// with ENTRIES
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// // Mark that this entry is a globstar match
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+module.exports = glob
+
+var rp = require('fs.realpath')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var inherits = require('inherits')
+var EE = require('events').EventEmitter
+var path = require('path')
+var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
+var globSync = require('./sync.js')
+var common = require('./common.js')
+var setopts = common.setopts
+var ownProp = common.ownProp
+var inflight = require('inflight')
+var util = require('util')
+var childrenIgnored = common.childrenIgnored
+var isIgnored = common.isIgnored
+
+var once = require('once')
+
+function glob (pattern, options, cb) {
+ if (typeof options === 'function') cb = options, options = {}
+ if (!options) options = {}
+
+ if (options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return globSync(pattern, options)
+ }
+
+ return new Glob(pattern, options, cb)
+}
+
+glob.sync = globSync
+var GlobSync = glob.GlobSync = globSync.GlobSync
+
+// old api surface
+glob.glob = glob
+
+function extend (origin, add) {
+ if (add === null || typeof add !== 'object') {
+ return origin
+ }
+
+ var keys = Object.keys(add)
+ var i = keys.length
+ while (i--) {
+ origin[keys[i]] = add[keys[i]]
+ }
+ return origin
+}
+
+glob.hasMagic = function (pattern, options_) {
+ var options = extend({}, options_)
+ options.noprocess = true
+
+ var g = new Glob(pattern, options)
+ var set = g.minimatch.set
+
+ if (!pattern)
+ return false
+
+ if (set.length > 1)
+ return true
+
+ for (var j = 0; j < set[0].length; j++) {
+ if (typeof set[0][j] !== 'string')
+ return true
+ }
+
+ return false
+}
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = null
+ }
+
+ if (options && options.sync) {
+ if (cb)
+ throw new TypeError('callback provided to sync glob')
+ return new GlobSync(pattern, options)
+ }
+
+ if (!(this instanceof Glob))
+ return new Glob(pattern, options, cb)
+
+ setopts(this, pattern, options)
+ this._didRealPath = false
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {<filename>: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ if (typeof cb === 'function') {
+ cb = once(cb)
+ this.on('error', cb)
+ this.on('end', function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ var self = this
+ this._processing = 0
+
+ this._emitQueue = []
+ this._processQueue = []
+ this.paused = false
+
+ if (this.noprocess)
+ return this
+
+ if (n === 0)
+ return done()
+
+ var sync = true
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false, done)
+ }
+ sync = false
+
+ function done () {
+ --self._processing
+ if (self._processing <= 0) {
+ if (sync) {
+ process.nextTick(function () {
+ self._finish()
+ })
+ } else {
+ self._finish()
+ }
+ }
+ }
+}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+ if (this.aborted)
+ return
+
+ if (this.realpath && !this._didRealpath)
+ return this._realpath()
+
+ common.finish(this)
+ this.emit('end', this.found)
+}
+
+Glob.prototype._realpath = function () {
+ if (this._didRealpath)
+ return
+
+ this._didRealpath = true
+
+ var n = this.matches.length
+ if (n === 0)
+ return this._finish()
+
+ var self = this
+ for (var i = 0; i < this.matches.length; i++)
+ this._realpathSet(i, next)
+
+ function next () {
+ if (--n === 0)
+ self._finish()
+ }
+}
+
+Glob.prototype._realpathSet = function (index, cb) {
+ var matchset = this.matches[index]
+ if (!matchset)
+ return cb()
+
+ var found = Object.keys(matchset)
+ var self = this
+ var n = found.length
+
+ if (n === 0)
+ return cb()
+
+ var set = this.matches[index] = Object.create(null)
+ found.forEach(function (p, i) {
+ // If there's a problem with the stat, then it means that
+ // one or more of the links in the realpath couldn't be
+ // resolved. just return the abs value in that case.
+ p = self._makeAbs(p)
+ rp.realpath(p, self.realpathCache, function (er, real) {
+ if (!er)
+ set[real] = true
+ else if (er.syscall === 'stat')
+ set[p] = true
+ else
+ self.emit('error', er) // srsly wtf right here
+
+ if (--n === 0) {
+ self.matches[index] = set
+ cb()
+ }
+ })
+ })
+}
+
+Glob.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+Glob.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit('abort')
+}
+
+Glob.prototype.pause = function () {
+ if (!this.paused) {
+ this.paused = true
+ this.emit('pause')
+ }
+}
+
+Glob.prototype.resume = function () {
+ if (this.paused) {
+ this.emit('resume')
+ this.paused = false
+ if (this._emitQueue.length) {
+ var eq = this._emitQueue.slice(0)
+ this._emitQueue.length = 0
+ for (var i = 0; i < eq.length; i ++) {
+ var e = eq[i]
+ this._emitMatch(e[0], e[1])
+ }
+ }
+ if (this._processQueue.length) {
+ var pq = this._processQueue.slice(0)
+ this._processQueue.length = 0
+ for (var i = 0; i < pq.length; i ++) {
+ var p = pq[i]
+ this._processing--
+ this._process(p[0], p[1], p[2], p[3])
+ }
+ }
+ }
+}
+
+Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
+ assert(this instanceof Glob)
+ assert(typeof cb === 'function')
+
+ if (this.aborted)
+ return
+
+ this._processing++
+ if (this.paused) {
+ this._processQueue.push([pattern, index, inGlobStar, cb])
+ return
+ }
+
+ //console.error('PROCESS %d', this._processing, pattern)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index, cb)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) ||
+ isAbsolute(pattern.map(function (p) {
+ return typeof p === 'string' ? p : '[*]'
+ }).join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip _processing
+ if (childrenIgnored(this, read))
+ return cb()
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
+}
+
+Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return cb()
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return cb()
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this._emitMatch(index, e)
+ }
+ // This was the last one, and no stats were needed
+ return cb()
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix) {
+ if (prefix !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+ this._process([e].concat(remain), index, inGlobStar, cb)
+ }
+ cb()
+}
+
+Glob.prototype._emitMatch = function (index, e) {
+ if (this.aborted)
+ return
+
+ if (isIgnored(this, e))
+ return
+
+ if (this.paused) {
+ this._emitQueue.push([index, e])
+ return
+ }
+
+ var abs = isAbsolute(e) ? e : this._makeAbs(e)
+
+ if (this.mark)
+ e = this._mark(e)
+
+ if (this.absolute)
+ e = abs
+
+ if (this.matches[index][e])
+ return
+
+ if (this.nodir) {
+ var c = this.cache[abs]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ this.matches[index][e] = true
+
+ var st = this.statCache[abs]
+ if (st)
+ this.emit('stat', e, st)
+
+ this.emit('match', e)
+}
+
+Glob.prototype._readdirInGlobStar = function (abs, cb) {
+ if (this.aborted)
+ return
+
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false, cb)
+
+ var lstatkey = 'lstat\0' + abs
+ var self = this
+ var lstatcb = inflight(lstatkey, lstatcb_)
+
+ if (lstatcb)
+ self.fs.lstat(abs, lstatcb)
+
+ function lstatcb_ (er, lstat) {
+ if (er && er.code === 'ENOENT')
+ return cb()
+
+ var isSym = lstat && lstat.isSymbolicLink()
+ self.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && lstat && !lstat.isDirectory()) {
+ self.cache[abs] = 'FILE'
+ cb()
+ } else
+ self._readdir(abs, false, cb)
+ }
+}
+
+Glob.prototype._readdir = function (abs, inGlobStar, cb) {
+ if (this.aborted)
+ return
+
+ cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
+ if (!cb)
+ return
+
+ //console.error('RD %j %j', +inGlobStar, abs)
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs, cb)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return cb()
+
+ if (Array.isArray(c))
+ return cb(null, c)
+ }
+
+ var self = this
+ self.fs.readdir(abs, readdirCb(this, abs, cb))
+}
+
+function readdirCb (self, abs, cb) {
+ return function (er, entries) {
+ if (er)
+ self._readdirError(abs, er, cb)
+ else
+ self._readdirEntries(abs, entries, cb)
+ }
+}
+
+Glob.prototype._readdirEntries = function (abs, entries, cb) {
+ if (this.aborted)
+ return
+
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+ return cb(null, entries)
+}
+
+Glob.prototype._readdirError = function (f, er, cb) {
+ if (this.aborted)
+ return
+
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ var abs = this._makeAbs(f)
+ this.cache[abs] = 'FILE'
+ if (abs === this.cwdAbs) {
+ var error = new Error(er.code + ' invalid cwd ' + this.cwd)
+ error.path = this.cwd
+ error.code = er.code
+ this.emit('error', error)
+ this.abort()
+ }
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict) {
+ this.emit('error', er)
+ // If the error is handled, then we abort
+ // if not, we threw out of here
+ this.abort()
+ }
+ if (!this.silent)
+ console.error('glob error', er)
+ break
+ }
+
+ return cb()
+}
+
+Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self = this
+ this._readdir(abs, inGlobStar, function (er, entries) {
+ self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
+ })
+}
+
+
+Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+ //console.error('pgs2', prefix, remain[0], entries)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return cb()
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false, cb)
+
+ var isSym = this.symlinks[abs]
+ var len = entries.length
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return cb()
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true, cb)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true, cb)
+ }
+
+ cb()
+}
+
+Glob.prototype._processSimple = function (prefix, index, cb) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var self = this
+ this._stat(prefix, function (er, exists) {
+ self._processSimple2(prefix, index, er, exists, cb)
+ })
+}
+Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
+
+ //console.error('ps2', prefix, exists)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return cb()
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this._emitMatch(index, prefix)
+ cb()
+}
+
+// Returns either 'DIR', 'FILE', or false
+Glob.prototype._stat = function (f, cb) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return cb()
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return cb(null, c)
+
+ if (needDir && c === 'FILE')
+ return cb()
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (stat !== undefined) {
+ if (stat === false)
+ return cb(null, stat)
+ else {
+ var type = stat.isDirectory() ? 'DIR' : 'FILE'
+ if (needDir && type === 'FILE')
+ return cb()
+ else
+ return cb(null, type, stat)
+ }
+ }
+
+ var self = this
+ var statcb = inflight('stat\0' + abs, lstatcb_)
+ if (statcb)
+ self.fs.lstat(abs, statcb)
+
+ function lstatcb_ (er, lstat) {
+ if (lstat && lstat.isSymbolicLink()) {
+ // If it's a symlink, then treat it as the target, unless
+ // the target does not exist, then treat it as a file.
+ return self.fs.stat(abs, function (er, stat) {
+ if (er)
+ self._stat2(f, abs, null, lstat, cb)
+ else
+ self._stat2(f, abs, er, stat, cb)
+ })
+ } else {
+ self._stat2(f, abs, er, lstat, cb)
+ }
+ }
+}
+
+Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
+ this.statCache[abs] = false
+ return cb()
+ }
+
+ var needDir = f.slice(-1) === '/'
+ this.statCache[abs] = stat
+
+ if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
+ return cb(null, false, stat)
+
+ var c = true
+ if (stat)
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c === 'FILE')
+ return cb()
+
+ return cb(null, c, stat)
+}
diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json
new file mode 100644
index 0000000..5940b64
--- /dev/null
+++ b/node_modules/glob/package.json
@@ -0,0 +1,55 @@
+{
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "name": "glob",
+ "description": "a little globber",
+ "version": "7.2.3",
+ "publishConfig": {
+ "tag": "v7-legacy"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "main": "glob.js",
+ "files": [
+ "glob.js",
+ "sync.js",
+ "common.js"
+ ],
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "devDependencies": {
+ "memfs": "^3.2.0",
+ "mkdirp": "0",
+ "rimraf": "^2.2.8",
+ "tap": "^15.0.6",
+ "tick": "0.0.6"
+ },
+ "tap": {
+ "before": "test/00-setup.js",
+ "after": "test/zz-cleanup.js",
+ "jobs": 1
+ },
+ "scripts": {
+ "prepublish": "npm run benchclean",
+ "profclean": "rm -f v8.log profile.txt",
+ "test": "tap",
+ "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
+ "bench": "bash benchmark.sh",
+ "prof": "bash prof.sh && cat profile.txt",
+ "benchclean": "node benchclean.js"
+ },
+ "license": "ISC",
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+}
diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js
new file mode 100644
index 0000000..2c4f480
--- /dev/null
+++ b/node_modules/glob/sync.js
@@ -0,0 +1,486 @@
+module.exports = globSync
+globSync.GlobSync = GlobSync
+
+var rp = require('fs.realpath')
+var minimatch = require('minimatch')
+var Minimatch = minimatch.Minimatch
+var Glob = require('./glob.js').Glob
+var util = require('util')
+var path = require('path')
+var assert = require('assert')
+var isAbsolute = require('path-is-absolute')
+var common = require('./common.js')
+var setopts = common.setopts
+var ownProp = common.ownProp
+var childrenIgnored = common.childrenIgnored
+var isIgnored = common.isIgnored
+
+function globSync (pattern, options) {
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ return new GlobSync(pattern, options).found
+}
+
+function GlobSync (pattern, options) {
+ if (!pattern)
+ throw new Error('must provide pattern')
+
+ if (typeof options === 'function' || arguments.length === 3)
+ throw new TypeError('callback provided to sync glob\n'+
+ 'See: https://github.com/isaacs/node-glob/issues/167')
+
+ if (!(this instanceof GlobSync))
+ return new GlobSync(pattern, options)
+
+ setopts(this, pattern, options)
+
+ if (this.noprocess)
+ return this
+
+ var n = this.minimatch.set.length
+ this.matches = new Array(n)
+ for (var i = 0; i < n; i ++) {
+ this._process(this.minimatch.set[i], i, false)
+ }
+ this._finish()
+}
+
+GlobSync.prototype._finish = function () {
+ assert.ok(this instanceof GlobSync)
+ if (this.realpath) {
+ var self = this
+ this.matches.forEach(function (matchset, index) {
+ var set = self.matches[index] = Object.create(null)
+ for (var p in matchset) {
+ try {
+ p = self._makeAbs(p)
+ var real = rp.realpathSync(p, self.realpathCache)
+ set[real] = true
+ } catch (er) {
+ if (er.syscall === 'stat')
+ set[self._makeAbs(p)] = true
+ else
+ throw er
+ }
+ }
+ })
+ }
+ common.finish(this)
+}
+
+
+GlobSync.prototype._process = function (pattern, index, inGlobStar) {
+ assert.ok(this instanceof GlobSync)
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === 'string') {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // See if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ this._processSimple(pattern.join('/'), index)
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
+ // or 'relative' like '../baz'
+ prefix = pattern.slice(0, n).join('/')
+ break
+ }
+
+ var remain = pattern.slice(n)
+
+ // get the list of entries.
+ var read
+ if (prefix === null)
+ read = '.'
+ else if (isAbsolute(prefix) ||
+ isAbsolute(pattern.map(function (p) {
+ return typeof p === 'string' ? p : '[*]'
+ }).join('/'))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = '/' + prefix
+ read = prefix
+ } else
+ read = prefix
+
+ var abs = this._makeAbs(read)
+
+ //if ignored, skip processing
+ if (childrenIgnored(this, read))
+ return
+
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
+}
+
+
+GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
+ var entries = this._readdir(abs, inGlobStar)
+
+ // if the abs isn't a dir, then nothing can match!
+ if (!entries)
+ return
+
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = remain[0]
+ var negate = !!this.minimatch.negate
+ var rawGlob = pn._glob
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
+
+ var matchedEntries = []
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i]
+ if (e.charAt(0) !== '.' || dotOk) {
+ var m
+ if (negate && !prefix) {
+ m = !e.match(pn)
+ } else {
+ m = e.match(pn)
+ }
+ if (m)
+ matchedEntries.push(e)
+ }
+ }
+
+ var len = matchedEntries.length
+ // If there are no matched entries, then nothing matches.
+ if (len === 0)
+ return
+
+ // if this is the last remaining pattern bit, then no need for
+ // an additional stat *unless* the user has specified mark or
+ // stat explicitly. We know they exist, since readdir returned
+ // them.
+
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ if (prefix) {
+ if (prefix.slice(-1) !== '/')
+ e = prefix + '/' + e
+ else
+ e = prefix + e
+ }
+
+ if (e.charAt(0) === '/' && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+ this._emitMatch(index, e)
+ }
+ // This was the last one, and no stats were needed
+ return
+ }
+
+ // now test all matched entries as stand-ins for that part
+ // of the pattern.
+ remain.shift()
+ for (var i = 0; i < len; i ++) {
+ var e = matchedEntries[i]
+ var newPattern
+ if (prefix)
+ newPattern = [prefix, e]
+ else
+ newPattern = [e]
+ this._process(newPattern.concat(remain), index, inGlobStar)
+ }
+}
+
+
+GlobSync.prototype._emitMatch = function (index, e) {
+ if (isIgnored(this, e))
+ return
+
+ var abs = this._makeAbs(e)
+
+ if (this.mark)
+ e = this._mark(e)
+
+ if (this.absolute) {
+ e = abs
+ }
+
+ if (this.matches[index][e])
+ return
+
+ if (this.nodir) {
+ var c = this.cache[abs]
+ if (c === 'DIR' || Array.isArray(c))
+ return
+ }
+
+ this.matches[index][e] = true
+
+ if (this.stat)
+ this._stat(e)
+}
+
+
+GlobSync.prototype._readdirInGlobStar = function (abs) {
+ // follow all symlinked directories forever
+ // just proceed as if this is a non-globstar situation
+ if (this.follow)
+ return this._readdir(abs, false)
+
+ var entries
+ var lstat
+ var stat
+ try {
+ lstat = this.fs.lstatSync(abs)
+ } catch (er) {
+ if (er.code === 'ENOENT') {
+ // lstat failed, doesn't exist
+ return null
+ }
+ }
+
+ var isSym = lstat && lstat.isSymbolicLink()
+ this.symlinks[abs] = isSym
+
+ // If it's not a symlink or a dir, then it's definitely a regular file.
+ // don't bother doing a readdir in that case.
+ if (!isSym && lstat && !lstat.isDirectory())
+ this.cache[abs] = 'FILE'
+ else
+ entries = this._readdir(abs, false)
+
+ return entries
+}
+
+GlobSync.prototype._readdir = function (abs, inGlobStar) {
+ var entries
+
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs)
+
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+ if (!c || c === 'FILE')
+ return null
+
+ if (Array.isArray(c))
+ return c
+ }
+
+ try {
+ return this._readdirEntries(abs, this.fs.readdirSync(abs))
+ } catch (er) {
+ this._readdirError(abs, er)
+ return null
+ }
+}
+
+GlobSync.prototype._readdirEntries = function (abs, entries) {
+ // if we haven't asked to stat everything, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time.
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i ++) {
+ var e = entries[i]
+ if (abs === '/')
+ e = abs + e
+ else
+ e = abs + '/' + e
+ this.cache[e] = true
+ }
+ }
+
+ this.cache[abs] = entries
+
+ // mark and cache dir-ness
+ return entries
+}
+
+GlobSync.prototype._readdirError = function (f, er) {
+ // handle errors, and cache the information
+ switch (er.code) {
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
+ case 'ENOTDIR': // totally normal. means it *does* exist.
+ var abs = this._makeAbs(f)
+ this.cache[abs] = 'FILE'
+ if (abs === this.cwdAbs) {
+ var error = new Error(er.code + ' invalid cwd ' + this.cwd)
+ error.path = this.cwd
+ error.code = er.code
+ throw error
+ }
+ break
+
+ case 'ENOENT': // not terribly unusual
+ case 'ELOOP':
+ case 'ENAMETOOLONG':
+ case 'UNKNOWN':
+ this.cache[this._makeAbs(f)] = false
+ break
+
+ default: // some unusual error. Treat as failure.
+ this.cache[this._makeAbs(f)] = false
+ if (this.strict)
+ throw er
+ if (!this.silent)
+ console.error('glob error', er)
+ break
+ }
+}
+
+GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
+
+ var entries = this._readdir(abs, inGlobStar)
+
+ // no entries means not a dir, so it can never have matches
+ // foo.txt/** doesn't match foo.txt
+ if (!entries)
+ return
+
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var remainWithoutGlobStar = remain.slice(1)
+ var gspref = prefix ? [ prefix ] : []
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
+
+ // the noGlobStar pattern exits the inGlobStar state
+ this._process(noGlobStar, index, false)
+
+ var len = entries.length
+ var isSym = this.symlinks[abs]
+
+ // If it's a symlink, and we're in a globstar, then stop
+ if (isSym && inGlobStar)
+ return
+
+ for (var i = 0; i < len; i++) {
+ var e = entries[i]
+ if (e.charAt(0) === '.' && !this.dot)
+ continue
+
+ // these two cases enter the inGlobStar state
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
+ this._process(instead, index, true)
+
+ var below = gspref.concat(entries[i], remain)
+ this._process(below, index, true)
+ }
+}
+
+GlobSync.prototype._processSimple = function (prefix, index) {
+ // XXX review this. Shouldn't it be doing the mounting etc
+ // before doing stat? kinda weird?
+ var exists = this._stat(prefix)
+
+ if (!this.matches[index])
+ this.matches[index] = Object.create(null)
+
+ // If it doesn't exist, then just mark the lack of results
+ if (!exists)
+ return
+
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix)
+ if (prefix.charAt(0) === '/') {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ if (trail)
+ prefix += '/'
+ }
+ }
+
+ if (process.platform === 'win32')
+ prefix = prefix.replace(/\\/g, '/')
+
+ // Mark this as a match
+ this._emitMatch(index, prefix)
+}
+
+// Returns either 'DIR', 'FILE', or false
+GlobSync.prototype._stat = function (f) {
+ var abs = this._makeAbs(f)
+ var needDir = f.slice(-1) === '/'
+
+ if (f.length > this.maxLength)
+ return false
+
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs]
+
+ if (Array.isArray(c))
+ c = 'DIR'
+
+ // It exists, but maybe not how we need it
+ if (!needDir || c === 'DIR')
+ return c
+
+ if (needDir && c === 'FILE')
+ return false
+
+ // otherwise we have to stat, because maybe c=true
+ // if we know it exists, but not what it is.
+ }
+
+ var exists
+ var stat = this.statCache[abs]
+ if (!stat) {
+ var lstat
+ try {
+ lstat = this.fs.lstatSync(abs)
+ } catch (er) {
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
+ this.statCache[abs] = false
+ return false
+ }
+ }
+
+ if (lstat && lstat.isSymbolicLink()) {
+ try {
+ stat = this.fs.statSync(abs)
+ } catch (er) {
+ stat = lstat
+ }
+ } else {
+ stat = lstat
+ }
+ }
+
+ this.statCache[abs] = stat
+
+ var c = true
+ if (stat)
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
+
+ this.cache[abs] = this.cache[abs] || c
+
+ if (needDir && c === 'FILE')
+ return false
+
+ return c
+}
+
+GlobSync.prototype._mark = function (p) {
+ return common.mark(this, p)
+}
+
+GlobSync.prototype._makeAbs = function (f) {
+ return common.makeAbs(this, f)
+}
diff --git a/node_modules/global-agent/.flowconfig b/node_modules/global-agent/.flowconfig
new file mode 100644
index 0000000..029d8c2
--- /dev/null
+++ b/node_modules/global-agent/.flowconfig
@@ -0,0 +1,3 @@
+[ignore]
+.*/node_modules/.*/test/.*
+<PROJECT_ROOT>/dist/.*
diff --git a/node_modules/global-agent/LICENSE b/node_modules/global-agent/LICENSE
new file mode 100644
index 0000000..5065086
--- /dev/null
+++ b/node_modules/global-agent/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2019, Gajus Kuizinas (http://gajus.com/)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/global-agent/README.md b/node_modules/global-agent/README.md
new file mode 100644
index 0000000..8a8b525
--- /dev/null
+++ b/node_modules/global-agent/README.md
@@ -0,0 +1,239 @@
+# global-agent
+
+[![GitSpo Mentions](https://gitspo.com/badges/mentions/gajus/global-agent?style=flat-square)](https://gitspo.com/mentions/gajus/global-agent)
+[![Travis build status](http://img.shields.io/travis/gajus/global-agent/master.svg?style=flat-square)](https://travis-ci.org/gajus/global-agent)
+[![Coveralls](https://img.shields.io/coveralls/gajus/global-agent.svg?style=flat-square)](https://coveralls.io/github/gajus/global-agent)
+[![NPM version](http://img.shields.io/npm/v/global-agent.svg?style=flat-square)](https://www.npmjs.org/package/global-agent)
+[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical)
+[![Twitter Follow](https://img.shields.io/twitter/follow/kuizinas.svg?style=social&label=Follow)](https://twitter.com/kuizinas)
+
+Global HTTP/HTTPS proxy configurable using environment variables.
+
+* [Usage](#usage)
+ * [Setup proxy using `global-agent/bootstrap`](#setup-proxy-using-global-agentbootstrap)
+ * [Setup proxy using `bootstrap` routine](#setup-proxy-using-bootstrap-routine)
+ * [Runtime configuration](#runtime-configuration)
+ * [Exclude URLs](#exclude-urls)
+ * [Enable logging](#enable-logging)
+* [API](#api)
+ * [`createGlobalProxyAgent`](#createglobalproxyagent)
+ * [Environment variables](#environment-variables)
+ * [`global.GLOBAL_AGENT`](#globalglobal_agent)
+* [Supported libraries](#supported-libraries)
+* [FAQ](#faq)
+ * [What is the reason `global-agent` overrides explicitly configured HTTP(S) agent?](#what-is-the-reason-global-agent-overrides-explicitly-configured-https-agent)
+ * [What is the reason `global-agent/bootstrap` does not use `HTTP_PROXY`?](#what-is-the-reason-global-agentbootstrap-does-not-use-http_proxy)
+ * [What is the difference from `global-tunnel` and `tunnel`?](#what-is-the-difference-from-global-tunnel-and-tunnel)
+
+## Usage
+
+### Setup proxy using `global-agent/bootstrap`
+
+To configure HTTP proxy:
+
+1. Import `global-agent/bootstrap`.
+1. Export HTTP proxy address as `GLOBAL_AGENT_HTTP_PROXY` environment variable.
+
+Code:
+
+```js
+import 'global-agent/bootstrap';
+
+// or:
+// import {bootstrap} from 'global-agent';
+// bootstrap();
+
+```
+
+Bash:
+
+```bash
+$ export GLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:8080
+
+```
+
+Alternatively, you can preload module using Node.js `--require, -r` configuration, e.g.
+
+```bash
+$ export GLOBAL_AGENT_HTTP_PROXY=http://127.0.0.1:8080
+$ node -r 'global-agent/bootstrap' your-script.js
+
+```
+
+### Setup proxy using `bootstrap` routine
+
+Instead of importing a self-initialising script with side-effects as demonstrated in the [setup proxy using `global-agent/bootstrap`](#setup-proxy-using-global-agentbootstrap) documentation, you can import `bootstrap` routine and explicitly evaluate the bootstrap logic, e.g.
+
+```js
+import {
+ bootstrap
+} from 'global-agent';
+
+bootstrap();
+
+```
+
+This is useful if you need to conditionally bootstrap `global-agent`, e.g.
+
+```js
+import {
+ bootstrap
+} from 'global-agent';
+import globalTunnel from 'global-tunnel-ng';
+
+const MAJOR_NODEJS_VERSION = parseInt(process.version.slice(1).split('.')[0], 10);
+
+if (MAJOR_NODEJS_VERSION >= 10) {
+ // `global-agent` works with Node.js v10 and above.
+ bootstrap();
+} else {
+ // `global-tunnel-ng` works only with Node.js v10 and below.
+ globalTunnel.initialize();
+}
+
+```
+
+### Setup proxy using `createGlobalProxyAgent`
+
+If you do not want to use `global.GLOBAL_AGENT` variable, then you can use `createGlobalProxyAgent` to instantiate a controlled instance of `global-agent`, e.g.
+
+```js
+import {
+ createGlobalProxyAgent
+} from 'global-agent';
+
+const globalProxyAgent = createGlobalProxyAgent();
+
+```
+
+Unlike `bootstrap` routine, `createGlobalProxyAgent` factory does not create `global.GLOBAL_AGENT` variable and does not guard against multiple initializations of `global-agent`. The result object of `createGlobalProxyAgent` is equivalent to `global.GLOBAL_AGENT`.
+
+### Runtime configuration
+
+`global-agent/bootstrap` script copies `process.env.GLOBAL_AGENT_HTTP_PROXY` value to `global.GLOBAL_AGENT.HTTP_PROXY` and continues to use the latter variable.
+
+You can override the `global.GLOBAL_AGENT.HTTP_PROXY` value at runtime to change proxy behaviour, e.g.
+
+```js
+http.get('http://127.0.0.1:8000');
+
+global.GLOBAL_AGENT.HTTP_PROXY = 'http://127.0.0.1:8001';
+
+http.get('http://127.0.0.1:8000');
+
+global.GLOBAL_AGENT.HTTP_PROXY = 'http://127.0.0.1:8002';
+
+```
+
+The first HTTP request is going to use http://127.0.0.1:8001 proxy and the secord request is going to use http://127.0.0.1:8002.
+
+All `global-agent` configuration is available under `global.GLOBAL_AGENT` namespace.
+
+### Exclude URLs
+
+The `GLOBAL_AGENT_NO_PROXY` environment variable specifies a pattern of URLs that should be excluded from proxying. `GLOBAL_AGENT_NO_PROXY` value is a comma-separated list of domain names. Asterisks can be used as wildcards, e.g.
+
+```bash
+export GLOBAL_AGENT_NO_PROXY='*.foo.com,baz.com'
+
+```
+
+says to contact all machines with the 'foo.com' TLD and 'baz.com' domains directly.
+
+### Separate proxy for HTTPS
+
+The environment variable `GLOBAL_AGENT_HTTPS_PROXY` can be set to specify a separate proxy for HTTPS requests. When this variable is not set `GLOBAL_AGENT_HTTP_PROXY` is used for both HTTP and HTTPS requests.
+
+### Enable logging
+
+`global-agent` is using [`roarr`](https://www.npmjs.com/package/roarr) logger to log HTTP requests and response (HTTP status code and headers), e.g.
+
+```json
+{"context":{"program":"global-agent","namespace":"Agent","logLevel":10,"destination":"http://gajus.com","proxy":"http://127.0.0.1:8076"},"message":"proxying request","sequence":1,"time":1556269669663,"version":"1.0.0"}
+{"context":{"program":"global-agent","namespace":"Agent","logLevel":10,"headers":{"content-type":"text/plain","content-length":"2","date":"Fri, 26 Apr 2019 12:07:50 GMT","connection":"close"},"requestId":6,"statusCode":200},"message":"proxying response","sequence":2,"time":1557133856955,"version":"1.0.0"}
+
+```
+
+Export `ROARR_LOG=true` environment variable to enable log printing to stdout.
+
+Use [`roarr-cli`](https://github.com/gajus/roarr-cli) program to pretty-print the logs.
+
+## API
+
+### `createGlobalProxyAgent`
+
+```js
+/**
+ * @property environmentVariableNamespace Defines namespace of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables. (Default: `GLOBAL_AGENT_`)
+ * @property forceGlobalAgent Forces to use `global-agent` HTTP(S) agent even when request was explicitly constructed with another agent. (Default: `true`)
+ * @property socketConnectionTimeout Destroys socket if connection is not established within the timeout. (Default: `60000`)
+ */
+type ProxyAgentConfigurationInputType = {|
+ +environmentVariableNamespace?: string,
+ +forceGlobalAgent?: boolean,
+ +socketConnectionTimeout?: number,
+|};
+
+(configurationInput: ProxyAgentConfigurationInputType) => ProxyAgentConfigurationType;
+
+```
+
+### Environment variables
+
+|Name|Description|Default|
+|---|---|---|
+|`GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE`|Defines namespace of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables.|`GLOBAL_AGENT_`|
+|`GLOBAL_AGENT_FORCE_GLOBAL_AGENT`|Forces to use `global-agent` HTTP(S) agent even when request was explicitly constructed with another agent.|`true`|
+|`GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT`|Destroys socket if connection is not established within the timeout.|`60000`|
+|`${NAMESPACE}_HTTP_PROXY`|Sets the initial proxy controller HTTP_PROXY value.|N/A|
+|`${NAMESPACE}_HTTPS_PROXY`|Sets the initial proxy controller HTTPS_PROXY value.|N/A|
+|`${NAMESPACE}_NO_PROXY`|Sets the initial proxy controller NO_PROXY value.|N/A|
+
+### `global.GLOBAL_AGENT`
+
+`global.GLOBAL_AGENT` is initialized by `bootstrap` routine.
+
+`global.GLOBAL_AGENT` has the following properties:
+
+|Name|Description|Configurable|
+|---|---|---|
+|`HTTP_PROXY`|Yes|Sets HTTP proxy to use.|
+|`HTTPS_PROXY`|Yes|Sets a distinct proxy to use for HTTPS requests.|
+|`NO_PROXY`|Yes|Specifies a pattern of URLs that should be excluded from proxying. See [Exclude URLs](#exclude-urls).|
+
+## Supported libraries
+
+`global-agent` works with all libraries that internally use [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback).
+
+`global-agent` has been tested to work with:
+
+* [`got`](https://www.npmjs.com/package/got)
+* [`axios`](https://www.npmjs.com/package/axios)
+* [`request`](https://www.npmjs.com/package/axios)
+
+## FAQ
+
+### What is the reason `global-agent` overrides explicitly configured HTTP(S) agent?
+
+By default, `global-agent` overrides [`agent` property](https://nodejs.org/api/http.html#http_http_request_options_callback) of any HTTP request, even if `agent` property was explicitly set when constructing a HTTP request. This behaviour allows to intercept requests of libraries that use a custom instance of an agent per default (e.g. Stripe SDK [uses an `http(s).globalAgent` instance pre-configured with `keepAlive: true`](https://github.com/stripe/stripe-node/blob/e542902dd8fbe591fe3c3ce07a7e89d1d60e4cf7/lib/StripeResource.js#L11-L12)).
+
+This behaviour can be disabled with `GLOBAL_AGENT_FORCE_GLOBAL_AGENT=false` environment variable. When disabled, then `global-agent` will only set `agent` property when it is not already defined or if `agent` is an instance of `http(s).globalAgent`.
+
+### What is the reason `global-agent/bootstrap` does not use `HTTP_PROXY`?
+
+Some libraries (e.g. [`request`](https://npmjs.org/package/request)) change their behaviour when `HTTP_PROXY` environment variable is present. Using a namespaced environment variable prevents conflicting library behaviour.
+
+You can override this behaviour by configuring `GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE` variable, e.g.
+
+```bash
+$ export GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE=
+
+```
+
+Now script initialized using `global-agent/bootstrap` will use `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables.
+
+### What is the difference from `global-tunnel` and `tunnel`?
+
+[`global-tunnel`](https://github.com/salesforce/global-tunnel) (including [`global-tunnel-ng`](https://github.com/np-maintain/global-tunnel) and [`tunnel`](https://npmjs.com/package/tunnel)) are designed to support legacy Node.js versions. They use various [workarounds](https://github.com/koichik/node-tunnel/blob/5fb2fb424788597146b7be6729006cad1cf9e9a8/lib/tunnel.js#L134-L144) and rely on [monkey-patching `http.request`, `http.get`, `https.request` and `https.get` methods](https://github.com/np-maintain/global-tunnel/blob/51413dcf0534252b5049ec213105c7063ccc6367/index.js#L302-L338).
+
+In contrast, `global-agent` supports Node.js v10 and above, and does not implements workarounds for the older Node.js versions.
diff --git a/node_modules/global-agent/bootstrap.js b/node_modules/global-agent/bootstrap.js
new file mode 100644
index 0000000..0204420
--- /dev/null
+++ b/node_modules/global-agent/bootstrap.js
@@ -0,0 +1 @@
+require('./dist/index').bootstrap();
diff --git a/node_modules/global-agent/dist/Logger.js b/node_modules/global-agent/dist/Logger.js
new file mode 100644
index 0000000..a72a177
--- /dev/null
+++ b/node_modules/global-agent/dist/Logger.js
@@ -0,0 +1,18 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _roarr = _interopRequireDefault(require("roarr"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const Logger = _roarr.default.child({
+ package: 'global-agent'
+});
+
+var _default = Logger;
+exports.default = _default;
+//# sourceMappingURL=Logger.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/Logger.js.flow b/node_modules/global-agent/dist/Logger.js.flow
new file mode 100644
index 0000000..166f1e4
--- /dev/null
+++ b/node_modules/global-agent/dist/Logger.js.flow
@@ -0,0 +1,10 @@
+// @flow
+
+import Roarr from 'roarr';
+
+const Logger = Roarr
+ .child({
+ package: 'global-agent',
+ });
+
+export default Logger;
diff --git a/node_modules/global-agent/dist/Logger.js.map b/node_modules/global-agent/dist/Logger.js.map
new file mode 100644
index 0000000..e31661f
--- /dev/null
+++ b/node_modules/global-agent/dist/Logger.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/Logger.js"],"names":["Logger","Roarr","child","package"],"mappings":";;;;;;;AAEA;;;;AAEA,MAAMA,MAAM,GAAGC,eACZC,KADY,CACN;AACLC,EAAAA,OAAO,EAAE;AADJ,CADM,CAAf;;eAKeH,M","sourcesContent":["// @flow\n\nimport Roarr from 'roarr';\n\nconst Logger = Roarr\n .child({\n package: 'global-agent',\n });\n\nexport default Logger;\n"],"file":"Logger.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/Agent.js b/node_modules/global-agent/dist/classes/Agent.js
new file mode 100644
index 0000000..ba8cc1a
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/Agent.js
@@ -0,0 +1,174 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _serializeError = require("serialize-error");
+
+var _boolean = require("boolean");
+
+var _Logger = _interopRequireDefault(require("../Logger"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const log = _Logger.default.child({
+ namespace: 'Agent'
+});
+
+let requestId = 0;
+
+class Agent {
+ constructor(isProxyConfigured, mustUrlUseProxy, getUrlProxy, fallbackAgent, socketConnectionTimeout) {
+ this.fallbackAgent = fallbackAgent;
+ this.isProxyConfigured = isProxyConfigured;
+ this.mustUrlUseProxy = mustUrlUseProxy;
+ this.getUrlProxy = getUrlProxy;
+ this.socketConnectionTimeout = socketConnectionTimeout;
+ }
+
+ addRequest(request, configuration) {
+ let requestUrl; // It is possible that addRequest was constructed for a proxied request already, e.g.
+ // "request" package does this when it detects that a proxy should be used
+ // https://github.com/request/request/blob/212570b6971a732b8dd9f3c73354bcdda158a737/request.js#L402
+ // https://gist.github.com/gajus/e2074cd3b747864ffeaabbd530d30218
+
+ if (request.path.startsWith('http://') || request.path.startsWith('https://')) {
+ requestUrl = request.path;
+ } else {
+ requestUrl = this.protocol + '//' + (configuration.hostname || configuration.host) + (configuration.port === 80 || configuration.port === 443 ? '' : ':' + configuration.port) + request.path;
+ }
+
+ if (!this.isProxyConfigured()) {
+ log.trace({
+ destination: requestUrl
+ }, 'not proxying request; GLOBAL_AGENT.HTTP_PROXY is not configured'); // $FlowFixMe It appears that Flow is missing the method description.
+
+ this.fallbackAgent.addRequest(request, configuration);
+ return;
+ }
+
+ if (!this.mustUrlUseProxy(requestUrl)) {
+ log.trace({
+ destination: requestUrl
+ }, 'not proxying request; url matches GLOBAL_AGENT.NO_PROXY'); // $FlowFixMe It appears that Flow is missing the method description.
+
+ this.fallbackAgent.addRequest(request, configuration);
+ return;
+ }
+
+ const currentRequestId = requestId++;
+ const proxy = this.getUrlProxy(requestUrl);
+
+ if (this.protocol === 'http:') {
+ request.path = requestUrl;
+
+ if (proxy.authorization) {
+ request.setHeader('proxy-authorization', 'Basic ' + Buffer.from(proxy.authorization).toString('base64'));
+ }
+ }
+
+ log.trace({
+ destination: requestUrl,
+ proxy: 'http://' + proxy.hostname + ':' + proxy.port,
+ requestId: currentRequestId
+ }, 'proxying request');
+ request.on('error', error => {
+ log.error({
+ error: (0, _serializeError.serializeError)(error)
+ }, 'request error');
+ });
+ request.once('response', response => {
+ log.trace({
+ headers: response.headers,
+ requestId: currentRequestId,
+ statusCode: response.statusCode
+ }, 'proxying response');
+ });
+ request.shouldKeepAlive = false;
+ const connectionConfiguration = {
+ host: configuration.hostname || configuration.host,
+ port: configuration.port || 80,
+ proxy,
+ tls: {}
+ }; // add optional tls options for https requests.
+ // @see https://nodejs.org/docs/latest-v12.x/api/https.html#https_https_request_url_options_callback :
+ // > The following additional options from tls.connect()
+ // > - https://nodejs.org/docs/latest-v12.x/api/tls.html#tls_tls_connect_options_callback -
+ // > are also accepted:
+ // > ca, cert, ciphers, clientCertEngine, crl, dhparam, ecdhCurve, honorCipherOrder,
+ // > key, passphrase, pfx, rejectUnauthorized, secureOptions, secureProtocol, servername, sessionIdContext.
+
+ if (this.protocol === 'https:') {
+ connectionConfiguration.tls = {
+ ca: configuration.ca,
+ cert: configuration.cert,
+ ciphers: configuration.ciphers,
+ clientCertEngine: configuration.clientCertEngine,
+ crl: configuration.crl,
+ dhparam: configuration.dhparam,
+ ecdhCurve: configuration.ecdhCurve,
+ honorCipherOrder: configuration.honorCipherOrder,
+ key: configuration.key,
+ passphrase: configuration.passphrase,
+ pfx: configuration.pfx,
+ rejectUnauthorized: configuration.rejectUnauthorized,
+ secureOptions: configuration.secureOptions,
+ secureProtocol: configuration.secureProtocol,
+ servername: configuration.servername || connectionConfiguration.host,
+ sessionIdContext: configuration.sessionIdContext
+ }; // This is not ideal because there is no way to override this setting using `tls` configuration if `NODE_TLS_REJECT_UNAUTHORIZED=0`.
+ // However, popular HTTP clients (such as https://github.com/sindresorhus/got) come with pre-configured value for `rejectUnauthorized`,
+ // which makes it impossible to override that value globally and respect `rejectUnauthorized` for specific requests only.
+ //
+ // eslint-disable-next-line no-process-env
+
+ if (typeof process.env.NODE_TLS_REJECT_UNAUTHORIZED === 'string' && (0, _boolean.boolean)(process.env.NODE_TLS_REJECT_UNAUTHORIZED) === false) {
+ connectionConfiguration.tls.rejectUnauthorized = false;
+ }
+ } // $FlowFixMe It appears that Flow is missing the method description.
+
+
+ this.createConnection(connectionConfiguration, (error, socket) => {
+ log.trace({
+ target: connectionConfiguration
+ }, 'connecting'); // @see https://github.com/nodejs/node/issues/5757#issuecomment-305969057
+
+ if (socket) {
+ socket.setTimeout(this.socketConnectionTimeout, () => {
+ socket.destroy();
+ });
+ socket.once('connect', () => {
+ log.trace({
+ target: connectionConfiguration
+ }, 'connected');
+ socket.setTimeout(0);
+ });
+ socket.once('secureConnect', () => {
+ log.trace({
+ target: connectionConfiguration
+ }, 'connected (secure)');
+ socket.setTimeout(0);
+ });
+ }
+
+ if (error) {
+ request.emit('error', error);
+ } else {
+ log.debug('created socket');
+ socket.on('error', socketError => {
+ log.error({
+ error: (0, _serializeError.serializeError)(socketError)
+ }, 'socket error');
+ });
+ request.onSocket(socket);
+ }
+ });
+ }
+
+}
+
+var _default = Agent;
+exports.default = _default;
+//# sourceMappingURL=Agent.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/Agent.js.flow b/node_modules/global-agent/dist/classes/Agent.js.flow
new file mode 100644
index 0000000..801dd1f
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/Agent.js.flow
@@ -0,0 +1,212 @@
+// @flow
+
+import {
+ serializeError,
+} from 'serialize-error';
+import {
+ boolean,
+} from 'boolean';
+import Logger from '../Logger';
+import type {
+ AgentType,
+ GetUrlProxyMethodType,
+ IsProxyConfiguredMethodType,
+ MustUrlUseProxyMethodType,
+ ProtocolType,
+} from '../types';
+
+const log = Logger.child({
+ namespace: 'Agent',
+});
+
+let requestId = 0;
+
+class Agent {
+ defaultPort: number;
+
+ protocol: ProtocolType;
+
+ fallbackAgent: AgentType;
+
+ isProxyConfigured: IsProxyConfiguredMethodType;
+
+ mustUrlUseProxy: MustUrlUseProxyMethodType;
+
+ getUrlProxy: GetUrlProxyMethodType;
+
+ socketConnectionTimeout: number;
+
+ constructor (
+ isProxyConfigured: IsProxyConfiguredMethodType,
+ mustUrlUseProxy: MustUrlUseProxyMethodType,
+ getUrlProxy: GetUrlProxyMethodType,
+ fallbackAgent: AgentType,
+ socketConnectionTimeout: number,
+ ) {
+ this.fallbackAgent = fallbackAgent;
+ this.isProxyConfigured = isProxyConfigured;
+ this.mustUrlUseProxy = mustUrlUseProxy;
+ this.getUrlProxy = getUrlProxy;
+ this.socketConnectionTimeout = socketConnectionTimeout;
+ }
+
+ addRequest (request: *, configuration: *) {
+ let requestUrl;
+
+ // It is possible that addRequest was constructed for a proxied request already, e.g.
+ // "request" package does this when it detects that a proxy should be used
+ // https://github.com/request/request/blob/212570b6971a732b8dd9f3c73354bcdda158a737/request.js#L402
+ // https://gist.github.com/gajus/e2074cd3b747864ffeaabbd530d30218
+ if (request.path.startsWith('http://') || request.path.startsWith('https://')) {
+ requestUrl = request.path;
+ } else {
+ requestUrl = this.protocol + '//' + (configuration.hostname || configuration.host) + (configuration.port === 80 || configuration.port === 443 ? '' : ':' + configuration.port) + request.path;
+ }
+
+ if (!this.isProxyConfigured()) {
+ log.trace({
+ destination: requestUrl,
+ }, 'not proxying request; GLOBAL_AGENT.HTTP_PROXY is not configured');
+
+ // $FlowFixMe It appears that Flow is missing the method description.
+ this.fallbackAgent.addRequest(request, configuration);
+
+ return;
+ }
+
+ if (!this.mustUrlUseProxy(requestUrl)) {
+ log.trace({
+ destination: requestUrl,
+ }, 'not proxying request; url matches GLOBAL_AGENT.NO_PROXY');
+
+ // $FlowFixMe It appears that Flow is missing the method description.
+ this.fallbackAgent.addRequest(request, configuration);
+
+ return;
+ }
+
+ const currentRequestId = requestId++;
+
+ const proxy = this.getUrlProxy(requestUrl);
+
+ if (this.protocol === 'http:') {
+ request.path = requestUrl;
+
+ if (proxy.authorization) {
+ request.setHeader('proxy-authorization', 'Basic ' + Buffer.from(proxy.authorization).toString('base64'));
+ }
+ }
+
+ log.trace({
+ destination: requestUrl,
+ proxy: 'http://' + proxy.hostname + ':' + proxy.port,
+ requestId: currentRequestId,
+ }, 'proxying request');
+
+ request.on('error', (error) => {
+ log.error({
+ error: serializeError(error),
+ }, 'request error');
+ });
+
+ request.once('response', (response) => {
+ log.trace({
+ headers: response.headers,
+ requestId: currentRequestId,
+ statusCode: response.statusCode,
+ }, 'proxying response');
+ });
+
+ request.shouldKeepAlive = false;
+
+ const connectionConfiguration = {
+ host: configuration.hostname || configuration.host,
+ port: configuration.port || 80,
+ proxy,
+ tls: {},
+ };
+
+ // add optional tls options for https requests.
+ // @see https://nodejs.org/docs/latest-v12.x/api/https.html#https_https_request_url_options_callback :
+ // > The following additional options from tls.connect()
+ // > - https://nodejs.org/docs/latest-v12.x/api/tls.html#tls_tls_connect_options_callback -
+ // > are also accepted:
+ // > ca, cert, ciphers, clientCertEngine, crl, dhparam, ecdhCurve, honorCipherOrder,
+ // > key, passphrase, pfx, rejectUnauthorized, secureOptions, secureProtocol, servername, sessionIdContext.
+ if (this.protocol === 'https:') {
+ connectionConfiguration.tls = {
+ ca: configuration.ca,
+ cert: configuration.cert,
+ ciphers: configuration.ciphers,
+ clientCertEngine: configuration.clientCertEngine,
+ crl: configuration.crl,
+ dhparam: configuration.dhparam,
+ ecdhCurve: configuration.ecdhCurve,
+ honorCipherOrder: configuration.honorCipherOrder,
+ key: configuration.key,
+ passphrase: configuration.passphrase,
+ pfx: configuration.pfx,
+ rejectUnauthorized: configuration.rejectUnauthorized,
+ secureOptions: configuration.secureOptions,
+ secureProtocol: configuration.secureProtocol,
+ servername: configuration.servername || connectionConfiguration.host,
+ sessionIdContext: configuration.sessionIdContext,
+ };
+
+ // This is not ideal because there is no way to override this setting using `tls` configuration if `NODE_TLS_REJECT_UNAUTHORIZED=0`.
+ // However, popular HTTP clients (such as https://github.com/sindresorhus/got) come with pre-configured value for `rejectUnauthorized`,
+ // which makes it impossible to override that value globally and respect `rejectUnauthorized` for specific requests only.
+ //
+ // eslint-disable-next-line no-process-env
+ if (typeof process.env.NODE_TLS_REJECT_UNAUTHORIZED === 'string' && boolean(process.env.NODE_TLS_REJECT_UNAUTHORIZED) === false) {
+ connectionConfiguration.tls.rejectUnauthorized = false;
+ }
+ }
+
+ // $FlowFixMe It appears that Flow is missing the method description.
+ this.createConnection(connectionConfiguration, (error, socket) => {
+ log.trace({
+ target: connectionConfiguration,
+ }, 'connecting');
+
+ // @see https://github.com/nodejs/node/issues/5757#issuecomment-305969057
+ if (socket) {
+ socket.setTimeout(this.socketConnectionTimeout, () => {
+ socket.destroy();
+ });
+
+ socket.once('connect', () => {
+ log.trace({
+ target: connectionConfiguration,
+ }, 'connected');
+
+ socket.setTimeout(0);
+ });
+
+ socket.once('secureConnect', () => {
+ log.trace({
+ target: connectionConfiguration,
+ }, 'connected (secure)');
+
+ socket.setTimeout(0);
+ });
+ }
+
+ if (error) {
+ request.emit('error', error);
+ } else {
+ log.debug('created socket');
+
+ socket.on('error', (socketError) => {
+ log.error({
+ error: serializeError(socketError),
+ }, 'socket error');
+ });
+
+ request.onSocket(socket);
+ }
+ });
+ }
+}
+
+export default Agent;
diff --git a/node_modules/global-agent/dist/classes/Agent.js.map b/node_modules/global-agent/dist/classes/Agent.js.map
new file mode 100644
index 0000000..af6283e
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/Agent.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/classes/Agent.js"],"names":["log","Logger","child","namespace","requestId","Agent","constructor","isProxyConfigured","mustUrlUseProxy","getUrlProxy","fallbackAgent","socketConnectionTimeout","addRequest","request","configuration","requestUrl","path","startsWith","protocol","hostname","host","port","trace","destination","currentRequestId","proxy","authorization","setHeader","Buffer","from","toString","on","error","once","response","headers","statusCode","shouldKeepAlive","connectionConfiguration","tls","ca","cert","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","passphrase","pfx","rejectUnauthorized","secureOptions","secureProtocol","servername","sessionIdContext","process","env","NODE_TLS_REJECT_UNAUTHORIZED","createConnection","socket","target","setTimeout","destroy","emit","debug","socketError","onSocket"],"mappings":";;;;;;;AAEA;;AAGA;;AAGA;;;;AASA,MAAMA,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;AAIA,IAAIC,SAAS,GAAG,CAAhB;;AAEA,MAAMC,KAAN,CAAY;AAeVC,EAAAA,WAAW,CACTC,iBADS,EAETC,eAFS,EAGTC,WAHS,EAITC,aAJS,EAKTC,uBALS,EAMT;AACA,SAAKD,aAAL,GAAqBA,aAArB;AACA,SAAKH,iBAAL,GAAyBA,iBAAzB;AACA,SAAKC,eAAL,GAAuBA,eAAvB;AACA,SAAKC,WAAL,GAAmBA,WAAnB;AACA,SAAKE,uBAAL,GAA+BA,uBAA/B;AACD;;AAEDC,EAAAA,UAAU,CAAEC,OAAF,EAAcC,aAAd,EAAgC;AACxC,QAAIC,UAAJ,CADwC,CAGxC;AACA;AACA;AACA;;AACA,QAAIF,OAAO,CAACG,IAAR,CAAaC,UAAb,CAAwB,SAAxB,KAAsCJ,OAAO,CAACG,IAAR,CAAaC,UAAb,CAAwB,UAAxB,CAA1C,EAA+E;AAC7EF,MAAAA,UAAU,GAAGF,OAAO,CAACG,IAArB;AACD,KAFD,MAEO;AACLD,MAAAA,UAAU,GAAG,KAAKG,QAAL,GAAgB,IAAhB,IAAwBJ,aAAa,CAACK,QAAd,IAA0BL,aAAa,CAACM,IAAhE,KAAyEN,aAAa,CAACO,IAAd,KAAuB,EAAvB,IAA6BP,aAAa,CAACO,IAAd,KAAuB,GAApD,GAA0D,EAA1D,GAA+D,MAAMP,aAAa,CAACO,IAA5J,IAAoKR,OAAO,CAACG,IAAzL;AACD;;AAED,QAAI,CAAC,KAAKT,iBAAL,EAAL,EAA+B;AAC7BP,MAAAA,GAAG,CAACsB,KAAJ,CAAU;AACRC,QAAAA,WAAW,EAAER;AADL,OAAV,EAEG,iEAFH,EAD6B,CAK7B;;AACA,WAAKL,aAAL,CAAmBE,UAAnB,CAA8BC,OAA9B,EAAuCC,aAAvC;AAEA;AACD;;AAED,QAAI,CAAC,KAAKN,eAAL,CAAqBO,UAArB,CAAL,EAAuC;AACrCf,MAAAA,GAAG,CAACsB,KAAJ,CAAU;AACRC,QAAAA,WAAW,EAAER;AADL,OAAV,EAEG,yDAFH,EADqC,CAKrC;;AACA,WAAKL,aAAL,CAAmBE,UAAnB,CAA8BC,OAA9B,EAAuCC,aAAvC;AAEA;AACD;;AAED,UAAMU,gBAAgB,GAAGpB,SAAS,EAAlC;AAEA,UAAMqB,KAAK,GAAG,KAAKhB,WAAL,CAAiBM,UAAjB,CAAd;;AAEA,QAAI,KAAKG,QAAL,KAAkB,OAAtB,EAA+B;AAC7BL,MAAAA,OAAO,CAACG,IAAR,GAAeD,UAAf;;AAEA,UAAIU,KAAK,CAACC,aAAV,EAAyB;AACvBb,QAAAA,OAAO,CAACc,SAAR,CAAkB,qBAAlB,EAAyC,WAAWC,MAAM,CAACC,IAAP,CAAYJ,KAAK,CAACC,aAAlB,EAAiCI,QAAjC,CAA0C,QAA1C,CAApD;AACD;AACF;;AAED9B,IAAAA,GAAG,CAACsB,KAAJ,CAAU;AACRC,MAAAA,WAAW,EAAER,UADL;AAERU,MAAAA,KAAK,EAAE,YAAYA,KAAK,CAACN,QAAlB,GAA6B,GAA7B,GAAmCM,KAAK,CAACJ,IAFxC;AAGRjB,MAAAA,SAAS,EAAEoB;AAHH,KAAV,EAIG,kBAJH;AAMAX,IAAAA,OAAO,CAACkB,EAAR,CAAW,OAAX,EAAqBC,KAAD,IAAW;AAC7BhC,MAAAA,GAAG,CAACgC,KAAJ,CAAU;AACRA,QAAAA,KAAK,EAAE,oCAAeA,KAAf;AADC,OAAV,EAEG,eAFH;AAGD,KAJD;AAMAnB,IAAAA,OAAO,CAACoB,IAAR,CAAa,UAAb,EAA0BC,QAAD,IAAc;AACrClC,MAAAA,GAAG,CAACsB,KAAJ,CAAU;AACRa,QAAAA,OAAO,EAAED,QAAQ,CAACC,OADV;AAER/B,QAAAA,SAAS,EAAEoB,gBAFH;AAGRY,QAAAA,UAAU,EAAEF,QAAQ,CAACE;AAHb,OAAV,EAIG,mBAJH;AAKD,KAND;AAQAvB,IAAAA,OAAO,CAACwB,eAAR,GAA0B,KAA1B;AAEA,UAAMC,uBAAuB,GAAG;AAC9BlB,MAAAA,IAAI,EAAEN,aAAa,CAACK,QAAd,IAA0BL,aAAa,CAACM,IADhB;AAE9BC,MAAAA,IAAI,EAAEP,aAAa,CAACO,IAAd,IAAsB,EAFE;AAG9BI,MAAAA,KAH8B;AAI9Bc,MAAAA,GAAG,EAAE;AAJyB,KAAhC,CArEwC,CA4ExC;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,QAAI,KAAKrB,QAAL,KAAkB,QAAtB,EAAgC;AAC9BoB,MAAAA,uBAAuB,CAACC,GAAxB,GAA8B;AAC5BC,QAAAA,EAAE,EAAE1B,aAAa,CAAC0B,EADU;AAE5BC,QAAAA,IAAI,EAAE3B,aAAa,CAAC2B,IAFQ;AAG5BC,QAAAA,OAAO,EAAE5B,aAAa,CAAC4B,OAHK;AAI5BC,QAAAA,gBAAgB,EAAE7B,aAAa,CAAC6B,gBAJJ;AAK5BC,QAAAA,GAAG,EAAE9B,aAAa,CAAC8B,GALS;AAM5BC,QAAAA,OAAO,EAAE/B,aAAa,CAAC+B,OANK;AAO5BC,QAAAA,SAAS,EAAEhC,aAAa,CAACgC,SAPG;AAQ5BC,QAAAA,gBAAgB,EAAEjC,aAAa,CAACiC,gBARJ;AAS5BC,QAAAA,GAAG,EAAElC,aAAa,CAACkC,GATS;AAU5BC,QAAAA,UAAU,EAAEnC,aAAa,CAACmC,UAVE;AAW5BC,QAAAA,GAAG,EAAEpC,aAAa,CAACoC,GAXS;AAY5BC,QAAAA,kBAAkB,EAAErC,aAAa,CAACqC,kBAZN;AAa5BC,QAAAA,aAAa,EAAEtC,aAAa,CAACsC,aAbD;AAc5BC,QAAAA,cAAc,EAAEvC,aAAa,CAACuC,cAdF;AAe5BC,QAAAA,UAAU,EAAExC,aAAa,CAACwC,UAAd,IAA4BhB,uBAAuB,CAAClB,IAfpC;AAgB5BmC,QAAAA,gBAAgB,EAAEzC,aAAa,CAACyC;AAhBJ,OAA9B,CAD8B,CAoB9B;AACA;AACA;AACA;AACA;;AACA,UAAI,OAAOC,OAAO,CAACC,GAAR,CAAYC,4BAAnB,KAAoD,QAApD,IAAgE,sBAAQF,OAAO,CAACC,GAAR,CAAYC,4BAApB,MAAsD,KAA1H,EAAiI;AAC/HpB,QAAAA,uBAAuB,CAACC,GAAxB,CAA4BY,kBAA5B,GAAiD,KAAjD;AACD;AACF,KA/GuC,CAiHxC;;;AACA,SAAKQ,gBAAL,CAAsBrB,uBAAtB,EAA+C,CAACN,KAAD,EAAQ4B,MAAR,KAAmB;AAChE5D,MAAAA,GAAG,CAACsB,KAAJ,CAAU;AACRuC,QAAAA,MAAM,EAAEvB;AADA,OAAV,EAEG,YAFH,EADgE,CAKhE;;AACA,UAAIsB,MAAJ,EAAY;AACVA,QAAAA,MAAM,CAACE,UAAP,CAAkB,KAAKnD,uBAAvB,EAAgD,MAAM;AACpDiD,UAAAA,MAAM,CAACG,OAAP;AACD,SAFD;AAIAH,QAAAA,MAAM,CAAC3B,IAAP,CAAY,SAAZ,EAAuB,MAAM;AAC3BjC,UAAAA,GAAG,CAACsB,KAAJ,CAAU;AACRuC,YAAAA,MAAM,EAAEvB;AADA,WAAV,EAEG,WAFH;AAIAsB,UAAAA,MAAM,CAACE,UAAP,CAAkB,CAAlB;AACD,SAND;AAQAF,QAAAA,MAAM,CAAC3B,IAAP,CAAY,eAAZ,EAA6B,MAAM;AACjCjC,UAAAA,GAAG,CAACsB,KAAJ,CAAU;AACRuC,YAAAA,MAAM,EAAEvB;AADA,WAAV,EAEG,oBAFH;AAIAsB,UAAAA,MAAM,CAACE,UAAP,CAAkB,CAAlB;AACD,SAND;AAOD;;AAED,UAAI9B,KAAJ,EAAW;AACTnB,QAAAA,OAAO,CAACmD,IAAR,CAAa,OAAb,EAAsBhC,KAAtB;AACD,OAFD,MAEO;AACLhC,QAAAA,GAAG,CAACiE,KAAJ,CAAU,gBAAV;AAEAL,QAAAA,MAAM,CAAC7B,EAAP,CAAU,OAAV,EAAoBmC,WAAD,IAAiB;AAClClE,UAAAA,GAAG,CAACgC,KAAJ,CAAU;AACRA,YAAAA,KAAK,EAAE,oCAAekC,WAAf;AADC,WAAV,EAEG,cAFH;AAGD,SAJD;AAMArD,QAAAA,OAAO,CAACsD,QAAR,CAAiBP,MAAjB;AACD;AACF,KAzCD;AA0CD;;AAzLS;;eA4LGvD,K","sourcesContent":["// @flow\n\nimport {\n serializeError,\n} from 'serialize-error';\nimport {\n boolean,\n} from 'boolean';\nimport Logger from '../Logger';\nimport type {\n AgentType,\n GetUrlProxyMethodType,\n IsProxyConfiguredMethodType,\n MustUrlUseProxyMethodType,\n ProtocolType,\n} from '../types';\n\nconst log = Logger.child({\n namespace: 'Agent',\n});\n\nlet requestId = 0;\n\nclass Agent {\n defaultPort: number;\n\n protocol: ProtocolType;\n\n fallbackAgent: AgentType;\n\n isProxyConfigured: IsProxyConfiguredMethodType;\n\n mustUrlUseProxy: MustUrlUseProxyMethodType;\n\n getUrlProxy: GetUrlProxyMethodType;\n\n socketConnectionTimeout: number;\n\n constructor (\n isProxyConfigured: IsProxyConfiguredMethodType,\n mustUrlUseProxy: MustUrlUseProxyMethodType,\n getUrlProxy: GetUrlProxyMethodType,\n fallbackAgent: AgentType,\n socketConnectionTimeout: number,\n ) {\n this.fallbackAgent = fallbackAgent;\n this.isProxyConfigured = isProxyConfigured;\n this.mustUrlUseProxy = mustUrlUseProxy;\n this.getUrlProxy = getUrlProxy;\n this.socketConnectionTimeout = socketConnectionTimeout;\n }\n\n addRequest (request: *, configuration: *) {\n let requestUrl;\n\n // It is possible that addRequest was constructed for a proxied request already, e.g.\n // \"request\" package does this when it detects that a proxy should be used\n // https://github.com/request/request/blob/212570b6971a732b8dd9f3c73354bcdda158a737/request.js#L402\n // https://gist.github.com/gajus/e2074cd3b747864ffeaabbd530d30218\n if (request.path.startsWith('http://') || request.path.startsWith('https://')) {\n requestUrl = request.path;\n } else {\n requestUrl = this.protocol + '//' + (configuration.hostname || configuration.host) + (configuration.port === 80 || configuration.port === 443 ? '' : ':' + configuration.port) + request.path;\n }\n\n if (!this.isProxyConfigured()) {\n log.trace({\n destination: requestUrl,\n }, 'not proxying request; GLOBAL_AGENT.HTTP_PROXY is not configured');\n\n // $FlowFixMe It appears that Flow is missing the method description.\n this.fallbackAgent.addRequest(request, configuration);\n\n return;\n }\n\n if (!this.mustUrlUseProxy(requestUrl)) {\n log.trace({\n destination: requestUrl,\n }, 'not proxying request; url matches GLOBAL_AGENT.NO_PROXY');\n\n // $FlowFixMe It appears that Flow is missing the method description.\n this.fallbackAgent.addRequest(request, configuration);\n\n return;\n }\n\n const currentRequestId = requestId++;\n\n const proxy = this.getUrlProxy(requestUrl);\n\n if (this.protocol === 'http:') {\n request.path = requestUrl;\n\n if (proxy.authorization) {\n request.setHeader('proxy-authorization', 'Basic ' + Buffer.from(proxy.authorization).toString('base64'));\n }\n }\n\n log.trace({\n destination: requestUrl,\n proxy: 'http://' + proxy.hostname + ':' + proxy.port,\n requestId: currentRequestId,\n }, 'proxying request');\n\n request.on('error', (error) => {\n log.error({\n error: serializeError(error),\n }, 'request error');\n });\n\n request.once('response', (response) => {\n log.trace({\n headers: response.headers,\n requestId: currentRequestId,\n statusCode: response.statusCode,\n }, 'proxying response');\n });\n\n request.shouldKeepAlive = false;\n\n const connectionConfiguration = {\n host: configuration.hostname || configuration.host,\n port: configuration.port || 80,\n proxy,\n tls: {},\n };\n\n // add optional tls options for https requests.\n // @see https://nodejs.org/docs/latest-v12.x/api/https.html#https_https_request_url_options_callback :\n // > The following additional options from tls.connect()\n // > - https://nodejs.org/docs/latest-v12.x/api/tls.html#tls_tls_connect_options_callback -\n // > are also accepted:\n // > ca, cert, ciphers, clientCertEngine, crl, dhparam, ecdhCurve, honorCipherOrder,\n // > key, passphrase, pfx, rejectUnauthorized, secureOptions, secureProtocol, servername, sessionIdContext.\n if (this.protocol === 'https:') {\n connectionConfiguration.tls = {\n ca: configuration.ca,\n cert: configuration.cert,\n ciphers: configuration.ciphers,\n clientCertEngine: configuration.clientCertEngine,\n crl: configuration.crl,\n dhparam: configuration.dhparam,\n ecdhCurve: configuration.ecdhCurve,\n honorCipherOrder: configuration.honorCipherOrder,\n key: configuration.key,\n passphrase: configuration.passphrase,\n pfx: configuration.pfx,\n rejectUnauthorized: configuration.rejectUnauthorized,\n secureOptions: configuration.secureOptions,\n secureProtocol: configuration.secureProtocol,\n servername: configuration.servername || connectionConfiguration.host,\n sessionIdContext: configuration.sessionIdContext,\n };\n\n // This is not ideal because there is no way to override this setting using `tls` configuration if `NODE_TLS_REJECT_UNAUTHORIZED=0`.\n // However, popular HTTP clients (such as https://github.com/sindresorhus/got) come with pre-configured value for `rejectUnauthorized`,\n // which makes it impossible to override that value globally and respect `rejectUnauthorized` for specific requests only.\n //\n // eslint-disable-next-line no-process-env\n if (typeof process.env.NODE_TLS_REJECT_UNAUTHORIZED === 'string' && boolean(process.env.NODE_TLS_REJECT_UNAUTHORIZED) === false) {\n connectionConfiguration.tls.rejectUnauthorized = false;\n }\n }\n\n // $FlowFixMe It appears that Flow is missing the method description.\n this.createConnection(connectionConfiguration, (error, socket) => {\n log.trace({\n target: connectionConfiguration,\n }, 'connecting');\n\n // @see https://github.com/nodejs/node/issues/5757#issuecomment-305969057\n if (socket) {\n socket.setTimeout(this.socketConnectionTimeout, () => {\n socket.destroy();\n });\n\n socket.once('connect', () => {\n log.trace({\n target: connectionConfiguration,\n }, 'connected');\n\n socket.setTimeout(0);\n });\n\n socket.once('secureConnect', () => {\n log.trace({\n target: connectionConfiguration,\n }, 'connected (secure)');\n\n socket.setTimeout(0);\n });\n }\n\n if (error) {\n request.emit('error', error);\n } else {\n log.debug('created socket');\n\n socket.on('error', (socketError) => {\n log.error({\n error: serializeError(socketError),\n }, 'socket error');\n });\n\n request.onSocket(socket);\n }\n });\n }\n}\n\nexport default Agent;\n"],"file":"Agent.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/HttpProxyAgent.js b/node_modules/global-agent/dist/classes/HttpProxyAgent.js
new file mode 100644
index 0000000..6d1c831
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/HttpProxyAgent.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _net = _interopRequireDefault(require("net"));
+
+var _Agent = _interopRequireDefault(require("./Agent"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+class HttpProxyAgent extends _Agent.default {
+ // @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/169#issuecomment-486980290
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ constructor(...args) {
+ super(...args);
+ this.protocol = 'http:';
+ this.defaultPort = 80;
+ }
+
+ createConnection(configuration, callback) {
+ const socket = _net.default.connect(configuration.proxy.port, configuration.proxy.hostname);
+
+ callback(null, socket);
+ }
+
+}
+
+var _default = HttpProxyAgent;
+exports.default = _default;
+//# sourceMappingURL=HttpProxyAgent.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/HttpProxyAgent.js.flow b/node_modules/global-agent/dist/classes/HttpProxyAgent.js.flow
new file mode 100644
index 0000000..8b9b471
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/HttpProxyAgent.js.flow
@@ -0,0 +1,30 @@
+// @flow
+
+import net from 'net';
+import type {
+ ConnectionCallbackType,
+ ConnectionConfigurationType,
+} from '../types';
+import Agent from './Agent';
+
+class HttpProxyAgent extends Agent {
+ // @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/169#issuecomment-486980290
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ constructor (...args: *) {
+ super(...args);
+
+ this.protocol = 'http:';
+ this.defaultPort = 80;
+ }
+
+ createConnection (configuration: ConnectionConfigurationType, callback: ConnectionCallbackType) {
+ const socket = net.connect(
+ configuration.proxy.port,
+ configuration.proxy.hostname,
+ );
+
+ callback(null, socket);
+ }
+}
+
+export default HttpProxyAgent;
diff --git a/node_modules/global-agent/dist/classes/HttpProxyAgent.js.map b/node_modules/global-agent/dist/classes/HttpProxyAgent.js.map
new file mode 100644
index 0000000..f2586b9
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/HttpProxyAgent.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/classes/HttpProxyAgent.js"],"names":["HttpProxyAgent","Agent","constructor","args","protocol","defaultPort","createConnection","configuration","callback","socket","net","connect","proxy","port","hostname"],"mappings":";;;;;;;AAEA;;AAKA;;;;AAEA,MAAMA,cAAN,SAA6BC,cAA7B,CAAmC;AACjC;AACA;AACAC,EAAAA,WAAW,CAAE,GAAGC,IAAL,EAAc;AACvB,UAAM,GAAGA,IAAT;AAEA,SAAKC,QAAL,GAAgB,OAAhB;AACA,SAAKC,WAAL,GAAmB,EAAnB;AACD;;AAEDC,EAAAA,gBAAgB,CAAEC,aAAF,EAA8CC,QAA9C,EAAgF;AAC9F,UAAMC,MAAM,GAAGC,aAAIC,OAAJ,CACbJ,aAAa,CAACK,KAAd,CAAoBC,IADP,EAEbN,aAAa,CAACK,KAAd,CAAoBE,QAFP,CAAf;;AAKAN,IAAAA,QAAQ,CAAC,IAAD,EAAOC,MAAP,CAAR;AACD;;AAjBgC;;eAoBpBT,c","sourcesContent":["// @flow\n\nimport net from 'net';\nimport type {\n ConnectionCallbackType,\n ConnectionConfigurationType,\n} from '../types';\nimport Agent from './Agent';\n\nclass HttpProxyAgent extends Agent {\n // @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/169#issuecomment-486980290\n // eslint-disable-next-line unicorn/prevent-abbreviations\n constructor (...args: *) {\n super(...args);\n\n this.protocol = 'http:';\n this.defaultPort = 80;\n }\n\n createConnection (configuration: ConnectionConfigurationType, callback: ConnectionCallbackType) {\n const socket = net.connect(\n configuration.proxy.port,\n configuration.proxy.hostname,\n );\n\n callback(null, socket);\n }\n}\n\nexport default HttpProxyAgent;\n"],"file":"HttpProxyAgent.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/HttpsProxyAgent.js b/node_modules/global-agent/dist/classes/HttpsProxyAgent.js
new file mode 100644
index 0000000..1206ffa
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/HttpsProxyAgent.js
@@ -0,0 +1,53 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _net = _interopRequireDefault(require("net"));
+
+var _tls = _interopRequireDefault(require("tls"));
+
+var _Agent = _interopRequireDefault(require("./Agent"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+class HttpsProxyAgent extends _Agent.default {
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ constructor(...args) {
+ super(...args);
+ this.protocol = 'https:';
+ this.defaultPort = 443;
+ }
+
+ createConnection(configuration, callback) {
+ const socket = _net.default.connect(configuration.proxy.port, configuration.proxy.hostname);
+
+ socket.on('error', error => {
+ callback(error);
+ });
+ socket.once('data', () => {
+ const secureSocket = _tls.default.connect({ ...configuration.tls,
+ socket
+ });
+
+ callback(null, secureSocket);
+ });
+ let connectMessage = '';
+ connectMessage += 'CONNECT ' + configuration.host + ':' + configuration.port + ' HTTP/1.1\r\n';
+ connectMessage += 'Host: ' + configuration.host + ':' + configuration.port + '\r\n';
+
+ if (configuration.proxy.authorization) {
+ connectMessage += 'Proxy-Authorization: Basic ' + Buffer.from(configuration.proxy.authorization).toString('base64') + '\r\n';
+ }
+
+ connectMessage += '\r\n';
+ socket.write(connectMessage);
+ }
+
+}
+
+var _default = HttpsProxyAgent;
+exports.default = _default;
+//# sourceMappingURL=HttpsProxyAgent.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/HttpsProxyAgent.js.flow b/node_modules/global-agent/dist/classes/HttpsProxyAgent.js.flow
new file mode 100644
index 0000000..24d724f
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/HttpsProxyAgent.js.flow
@@ -0,0 +1,54 @@
+// @flow
+
+import net from 'net';
+import tls from 'tls';
+import type {
+ ConnectionCallbackType,
+ ConnectionConfigurationType,
+} from '../types';
+import Agent from './Agent';
+
+class HttpsProxyAgent extends Agent {
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ constructor (...args: *) {
+ super(...args);
+
+ this.protocol = 'https:';
+ this.defaultPort = 443;
+ }
+
+ createConnection (configuration: ConnectionConfigurationType, callback: ConnectionCallbackType) {
+ const socket = net.connect(
+ configuration.proxy.port,
+ configuration.proxy.hostname,
+ );
+
+ socket.on('error', (error) => {
+ callback(error);
+ });
+
+ socket.once('data', () => {
+ const secureSocket = tls.connect({
+ ...configuration.tls,
+ socket,
+ });
+
+ callback(null, secureSocket);
+ });
+
+ let connectMessage = '';
+
+ connectMessage += 'CONNECT ' + configuration.host + ':' + configuration.port + ' HTTP/1.1\r\n';
+ connectMessage += 'Host: ' + configuration.host + ':' + configuration.port + '\r\n';
+
+ if (configuration.proxy.authorization) {
+ connectMessage += 'Proxy-Authorization: Basic ' + Buffer.from(configuration.proxy.authorization).toString('base64') + '\r\n';
+ }
+
+ connectMessage += '\r\n';
+
+ socket.write(connectMessage);
+ }
+}
+
+export default HttpsProxyAgent;
diff --git a/node_modules/global-agent/dist/classes/HttpsProxyAgent.js.map b/node_modules/global-agent/dist/classes/HttpsProxyAgent.js.map
new file mode 100644
index 0000000..0bad4a9
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/HttpsProxyAgent.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/classes/HttpsProxyAgent.js"],"names":["HttpsProxyAgent","Agent","constructor","args","protocol","defaultPort","createConnection","configuration","callback","socket","net","connect","proxy","port","hostname","on","error","once","secureSocket","tls","connectMessage","host","authorization","Buffer","from","toString","write"],"mappings":";;;;;;;AAEA;;AACA;;AAKA;;;;AAEA,MAAMA,eAAN,SAA8BC,cAA9B,CAAoC;AAClC;AACAC,EAAAA,WAAW,CAAE,GAAGC,IAAL,EAAc;AACvB,UAAM,GAAGA,IAAT;AAEA,SAAKC,QAAL,GAAgB,QAAhB;AACA,SAAKC,WAAL,GAAmB,GAAnB;AACD;;AAEDC,EAAAA,gBAAgB,CAAEC,aAAF,EAA8CC,QAA9C,EAAgF;AAC9F,UAAMC,MAAM,GAAGC,aAAIC,OAAJ,CACbJ,aAAa,CAACK,KAAd,CAAoBC,IADP,EAEbN,aAAa,CAACK,KAAd,CAAoBE,QAFP,CAAf;;AAKAL,IAAAA,MAAM,CAACM,EAAP,CAAU,OAAV,EAAoBC,KAAD,IAAW;AAC5BR,MAAAA,QAAQ,CAACQ,KAAD,CAAR;AACD,KAFD;AAIAP,IAAAA,MAAM,CAACQ,IAAP,CAAY,MAAZ,EAAoB,MAAM;AACxB,YAAMC,YAAY,GAAGC,aAAIR,OAAJ,CAAY,EAC/B,GAAGJ,aAAa,CAACY,GADc;AAE/BV,QAAAA;AAF+B,OAAZ,CAArB;;AAKAD,MAAAA,QAAQ,CAAC,IAAD,EAAOU,YAAP,CAAR;AACD,KAPD;AASA,QAAIE,cAAc,GAAG,EAArB;AAEAA,IAAAA,cAAc,IAAI,aAAab,aAAa,CAACc,IAA3B,GAAkC,GAAlC,GAAwCd,aAAa,CAACM,IAAtD,GAA6D,eAA/E;AACAO,IAAAA,cAAc,IAAI,WAAWb,aAAa,CAACc,IAAzB,GAAgC,GAAhC,GAAsCd,aAAa,CAACM,IAApD,GAA2D,MAA7E;;AAEA,QAAIN,aAAa,CAACK,KAAd,CAAoBU,aAAxB,EAAuC;AACrCF,MAAAA,cAAc,IAAI,gCAAgCG,MAAM,CAACC,IAAP,CAAYjB,aAAa,CAACK,KAAd,CAAoBU,aAAhC,EAA+CG,QAA/C,CAAwD,QAAxD,CAAhC,GAAoG,MAAtH;AACD;;AAEDL,IAAAA,cAAc,IAAI,MAAlB;AAEAX,IAAAA,MAAM,CAACiB,KAAP,CAAaN,cAAb;AACD;;AAxCiC;;eA2CrBpB,e","sourcesContent":["// @flow\n\nimport net from 'net';\nimport tls from 'tls';\nimport type {\n ConnectionCallbackType,\n ConnectionConfigurationType,\n} from '../types';\nimport Agent from './Agent';\n\nclass HttpsProxyAgent extends Agent {\n // eslint-disable-next-line unicorn/prevent-abbreviations\n constructor (...args: *) {\n super(...args);\n\n this.protocol = 'https:';\n this.defaultPort = 443;\n }\n\n createConnection (configuration: ConnectionConfigurationType, callback: ConnectionCallbackType) {\n const socket = net.connect(\n configuration.proxy.port,\n configuration.proxy.hostname,\n );\n\n socket.on('error', (error) => {\n callback(error);\n });\n\n socket.once('data', () => {\n const secureSocket = tls.connect({\n ...configuration.tls,\n socket,\n });\n\n callback(null, secureSocket);\n });\n\n let connectMessage = '';\n\n connectMessage += 'CONNECT ' + configuration.host + ':' + configuration.port + ' HTTP/1.1\\r\\n';\n connectMessage += 'Host: ' + configuration.host + ':' + configuration.port + '\\r\\n';\n\n if (configuration.proxy.authorization) {\n connectMessage += 'Proxy-Authorization: Basic ' + Buffer.from(configuration.proxy.authorization).toString('base64') + '\\r\\n';\n }\n\n connectMessage += '\\r\\n';\n\n socket.write(connectMessage);\n }\n}\n\nexport default HttpsProxyAgent;\n"],"file":"HttpsProxyAgent.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/index.js b/node_modules/global-agent/dist/classes/index.js
new file mode 100644
index 0000000..b3889d2
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/index.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "Agent", {
+ enumerable: true,
+ get: function () {
+ return _Agent.default;
+ }
+});
+Object.defineProperty(exports, "HttpProxyAgent", {
+ enumerable: true,
+ get: function () {
+ return _HttpProxyAgent.default;
+ }
+});
+Object.defineProperty(exports, "HttpsProxyAgent", {
+ enumerable: true,
+ get: function () {
+ return _HttpsProxyAgent.default;
+ }
+});
+
+var _Agent = _interopRequireDefault(require("./Agent"));
+
+var _HttpProxyAgent = _interopRequireDefault(require("./HttpProxyAgent"));
+
+var _HttpsProxyAgent = _interopRequireDefault(require("./HttpsProxyAgent"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/classes/index.js.flow b/node_modules/global-agent/dist/classes/index.js.flow
new file mode 100644
index 0000000..9e8418a
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/index.js.flow
@@ -0,0 +1,5 @@
+// @flow
+
+export {default as Agent} from './Agent';
+export {default as HttpProxyAgent} from './HttpProxyAgent';
+export {default as HttpsProxyAgent} from './HttpsProxyAgent';
diff --git a/node_modules/global-agent/dist/classes/index.js.map b/node_modules/global-agent/dist/classes/index.js.map
new file mode 100644
index 0000000..59a05bb
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/classes/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AACA;;AACA","sourcesContent":["// @flow\n\nexport {default as Agent} from './Agent';\nexport {default as HttpProxyAgent} from './HttpProxyAgent';\nexport {default as HttpsProxyAgent} from './HttpsProxyAgent';\n"],"file":"index.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/errors.js b/node_modules/global-agent/dist/errors.js
new file mode 100644
index 0000000..578d19e
--- /dev/null
+++ b/node_modules/global-agent/dist/errors.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.UnexpectedStateError = void 0;
+
+var _es6Error = _interopRequireDefault(require("es6-error"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/* eslint-disable fp/no-class, fp/no-this */
+class UnexpectedStateError extends _es6Error.default {
+ constructor(message, code = 'UNEXPECTED_STATE_ERROR') {
+ super(message);
+ this.code = code;
+ }
+
+}
+
+exports.UnexpectedStateError = UnexpectedStateError;
+//# sourceMappingURL=errors.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/errors.js.flow b/node_modules/global-agent/dist/errors.js.flow
new file mode 100644
index 0000000..d93ba6f
--- /dev/null
+++ b/node_modules/global-agent/dist/errors.js.flow
@@ -0,0 +1,15 @@
+// @flow
+
+/* eslint-disable fp/no-class, fp/no-this */
+
+import ExtendableError from 'es6-error';
+
+export class UnexpectedStateError extends ExtendableError {
+ code: string;
+
+ constructor (message: string, code: string = 'UNEXPECTED_STATE_ERROR') {
+ super(message);
+
+ this.code = code;
+ }
+}
diff --git a/node_modules/global-agent/dist/errors.js.map b/node_modules/global-agent/dist/errors.js.map
new file mode 100644
index 0000000..7388bd1
--- /dev/null
+++ b/node_modules/global-agent/dist/errors.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/errors.js"],"names":["UnexpectedStateError","ExtendableError","constructor","message","code"],"mappings":";;;;;;;AAIA;;;;AAFA;AAIO,MAAMA,oBAAN,SAAmCC,iBAAnC,CAAmD;AAGxDC,EAAAA,WAAW,CAAEC,OAAF,EAAmBC,IAAY,GAAG,wBAAlC,EAA4D;AACrE,UAAMD,OAAN;AAEA,SAAKC,IAAL,GAAYA,IAAZ;AACD;;AAPuD","sourcesContent":["// @flow\n\n/* eslint-disable fp/no-class, fp/no-this */\n\nimport ExtendableError from 'es6-error';\n\nexport class UnexpectedStateError extends ExtendableError {\n code: string;\n\n constructor (message: string, code: string = 'UNEXPECTED_STATE_ERROR') {\n super(message);\n\n this.code = code;\n }\n}\n"],"file":"errors.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js b/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js
new file mode 100644
index 0000000..c87b9ed
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js
@@ -0,0 +1,175 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _http = _interopRequireDefault(require("http"));
+
+var _https = _interopRequireDefault(require("https"));
+
+var _boolean = require("boolean");
+
+var _semver = _interopRequireDefault(require("semver"));
+
+var _Logger = _interopRequireDefault(require("../Logger"));
+
+var _classes = require("../classes");
+
+var _errors = require("../errors");
+
+var _utilities = require("../utilities");
+
+var _createProxyController = _interopRequireDefault(require("./createProxyController"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const httpGet = _http.default.get;
+const httpRequest = _http.default.request;
+const httpsGet = _https.default.get;
+const httpsRequest = _https.default.request;
+
+const log = _Logger.default.child({
+ namespace: 'createGlobalProxyAgent'
+});
+
+const defaultConfigurationInput = {
+ environmentVariableNamespace: undefined,
+ forceGlobalAgent: undefined,
+ socketConnectionTimeout: 60000
+};
+
+const omitUndefined = subject => {
+ const keys = Object.keys(subject);
+ const result = {};
+
+ for (const key of keys) {
+ const value = subject[key];
+
+ if (value !== undefined) {
+ result[key] = value;
+ }
+ }
+
+ return result;
+};
+
+const createConfiguration = configurationInput => {
+ // eslint-disable-next-line no-process-env
+ const environment = process.env;
+ const defaultConfiguration = {
+ environmentVariableNamespace: typeof environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE === 'string' ? environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE : 'GLOBAL_AGENT_',
+ forceGlobalAgent: typeof environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT === 'string' ? (0, _boolean.boolean)(environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT) : true,
+ socketConnectionTimeout: typeof environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT === 'string' ? Number.parseInt(environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT, 10) : defaultConfigurationInput.socketConnectionTimeout
+ }; // $FlowFixMe
+
+ return { ...defaultConfiguration,
+ ...omitUndefined(configurationInput)
+ };
+};
+
+const createGlobalProxyAgent = (configurationInput = defaultConfigurationInput) => {
+ const configuration = createConfiguration(configurationInput);
+ const proxyController = (0, _createProxyController.default)(); // eslint-disable-next-line no-process-env
+
+ proxyController.HTTP_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTP_PROXY'] || null; // eslint-disable-next-line no-process-env
+
+ proxyController.HTTPS_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTPS_PROXY'] || null; // eslint-disable-next-line no-process-env
+
+ proxyController.NO_PROXY = process.env[configuration.environmentVariableNamespace + 'NO_PROXY'] || null;
+ log.info({
+ configuration,
+ state: proxyController
+ }, 'global agent has been initialized');
+
+ const mustUrlUseProxy = getProxy => {
+ return url => {
+ if (!getProxy()) {
+ return false;
+ }
+
+ if (!proxyController.NO_PROXY) {
+ return true;
+ }
+
+ return !(0, _utilities.isUrlMatchingNoProxy)(url, proxyController.NO_PROXY);
+ };
+ };
+
+ const getUrlProxy = getProxy => {
+ return () => {
+ const proxy = getProxy();
+
+ if (!proxy) {
+ throw new _errors.UnexpectedStateError('HTTP(S) proxy must be configured.');
+ }
+
+ return (0, _utilities.parseProxyUrl)(proxy);
+ };
+ };
+
+ const getHttpProxy = () => {
+ return proxyController.HTTP_PROXY;
+ };
+
+ const BoundHttpProxyAgent = class extends _classes.HttpProxyAgent {
+ constructor() {
+ super(() => {
+ return getHttpProxy();
+ }, mustUrlUseProxy(getHttpProxy), getUrlProxy(getHttpProxy), _http.default.globalAgent, configuration.socketConnectionTimeout);
+ }
+
+ };
+ const httpAgent = new BoundHttpProxyAgent();
+
+ const getHttpsProxy = () => {
+ return proxyController.HTTPS_PROXY || proxyController.HTTP_PROXY;
+ };
+
+ const BoundHttpsProxyAgent = class extends _classes.HttpsProxyAgent {
+ constructor() {
+ super(() => {
+ return getHttpsProxy();
+ }, mustUrlUseProxy(getHttpsProxy), getUrlProxy(getHttpsProxy), _https.default.globalAgent, configuration.socketConnectionTimeout);
+ }
+
+ };
+ const httpsAgent = new BoundHttpsProxyAgent(); // Overriding globalAgent was added in v11.7.
+ // @see https://nodejs.org/uk/blog/release/v11.7.0/
+
+ if (_semver.default.gte(process.version, 'v11.7.0')) {
+ // @see https://github.com/facebook/flow/issues/7670
+ // $FlowFixMe
+ _http.default.globalAgent = httpAgent; // $FlowFixMe
+
+ _https.default.globalAgent = httpsAgent;
+ } // The reason this logic is used in addition to overriding http(s).globalAgent
+ // is because there is no guarantee that we set http(s).globalAgent variable
+ // before an instance of http(s).Agent has been already constructed by someone,
+ // e.g. Stripe SDK creates instances of http(s).Agent at the top-level.
+ // @see https://github.com/gajus/global-agent/pull/13
+ //
+ // We still want to override http(s).globalAgent when possible to enable logic
+ // in `bindHttpMethod`.
+
+
+ if (_semver.default.gte(process.version, 'v10.0.0')) {
+ // $FlowFixMe
+ _http.default.get = (0, _utilities.bindHttpMethod)(httpGet, httpAgent, configuration.forceGlobalAgent); // $FlowFixMe
+
+ _http.default.request = (0, _utilities.bindHttpMethod)(httpRequest, httpAgent, configuration.forceGlobalAgent); // $FlowFixMe
+
+ _https.default.get = (0, _utilities.bindHttpMethod)(httpsGet, httpsAgent, configuration.forceGlobalAgent); // $FlowFixMe
+
+ _https.default.request = (0, _utilities.bindHttpMethod)(httpsRequest, httpsAgent, configuration.forceGlobalAgent);
+ } else {
+ log.warn('attempt to initialize global-agent in unsupported Node.js version was ignored');
+ }
+
+ return proxyController;
+};
+
+var _default = createGlobalProxyAgent;
+exports.default = _default;
+//# sourceMappingURL=createGlobalProxyAgent.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.flow b/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.flow
new file mode 100644
index 0000000..d515a9d
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.flow
@@ -0,0 +1,197 @@
+// @flow
+
+import http from 'http';
+import https from 'https';
+import {
+ boolean as parseBoolean,
+} from 'boolean';
+import semver from 'semver';
+import Logger from '../Logger';
+import {
+ HttpProxyAgent,
+ HttpsProxyAgent,
+} from '../classes';
+import {
+ UnexpectedStateError,
+} from '../errors';
+import {
+ bindHttpMethod,
+ isUrlMatchingNoProxy,
+ parseProxyUrl,
+} from '../utilities';
+import type {
+ ProxyAgentConfigurationInputType,
+ ProxyAgentConfigurationType,
+} from '../types';
+import createProxyController from './createProxyController';
+
+const httpGet = http.get;
+const httpRequest = http.request;
+const httpsGet = https.get;
+const httpsRequest = https.request;
+
+const log = Logger.child({
+ namespace: 'createGlobalProxyAgent',
+});
+
+const defaultConfigurationInput = {
+ environmentVariableNamespace: undefined,
+ forceGlobalAgent: undefined,
+ socketConnectionTimeout: 60000,
+};
+
+const omitUndefined = (subject) => {
+ const keys = Object.keys(subject);
+
+ const result = {};
+
+ for (const key of keys) {
+ const value = subject[key];
+
+ if (value !== undefined) {
+ result[key] = value;
+ }
+ }
+
+ return result;
+};
+
+const createConfiguration = (configurationInput: ProxyAgentConfigurationInputType): ProxyAgentConfigurationType => {
+ // eslint-disable-next-line no-process-env
+ const environment = process.env;
+
+ const defaultConfiguration = {
+ environmentVariableNamespace: typeof environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE === 'string' ? environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE : 'GLOBAL_AGENT_',
+ forceGlobalAgent: typeof environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT === 'string' ? parseBoolean(environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT) : true,
+ socketConnectionTimeout: typeof environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT === 'string' ? Number.parseInt(environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT, 10) : defaultConfigurationInput.socketConnectionTimeout,
+ };
+
+ // $FlowFixMe
+ return {
+ ...defaultConfiguration,
+ ...omitUndefined(configurationInput),
+ };
+};
+
+export default (configurationInput: ProxyAgentConfigurationInputType = defaultConfigurationInput) => {
+ const configuration = createConfiguration(configurationInput);
+
+ const proxyController = createProxyController();
+
+ // eslint-disable-next-line no-process-env
+ proxyController.HTTP_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTP_PROXY'] || null;
+
+ // eslint-disable-next-line no-process-env
+ proxyController.HTTPS_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTPS_PROXY'] || null;
+
+ // eslint-disable-next-line no-process-env
+ proxyController.NO_PROXY = process.env[configuration.environmentVariableNamespace + 'NO_PROXY'] || null;
+
+ log.info({
+ configuration,
+ state: proxyController,
+ }, 'global agent has been initialized');
+
+ const mustUrlUseProxy = (getProxy) => {
+ return (url) => {
+ if (!getProxy()) {
+ return false;
+ }
+
+ if (!proxyController.NO_PROXY) {
+ return true;
+ }
+
+ return !isUrlMatchingNoProxy(url, proxyController.NO_PROXY);
+ };
+ };
+
+ const getUrlProxy = (getProxy) => {
+ return () => {
+ const proxy = getProxy();
+
+ if (!proxy) {
+ throw new UnexpectedStateError('HTTP(S) proxy must be configured.');
+ }
+
+ return parseProxyUrl(proxy);
+ };
+ };
+
+ const getHttpProxy = () => {
+ return proxyController.HTTP_PROXY;
+ };
+
+ const BoundHttpProxyAgent = class extends HttpProxyAgent {
+ constructor () {
+ super(
+ () => {
+ return getHttpProxy();
+ },
+ mustUrlUseProxy(getHttpProxy),
+ getUrlProxy(getHttpProxy),
+ http.globalAgent,
+ configuration.socketConnectionTimeout,
+ );
+ }
+ };
+
+ const httpAgent = new BoundHttpProxyAgent();
+
+ const getHttpsProxy = () => {
+ return proxyController.HTTPS_PROXY || proxyController.HTTP_PROXY;
+ };
+
+ const BoundHttpsProxyAgent = class extends HttpsProxyAgent {
+ constructor () {
+ super(
+ () => {
+ return getHttpsProxy();
+ },
+ mustUrlUseProxy(getHttpsProxy),
+ getUrlProxy(getHttpsProxy),
+ https.globalAgent,
+ configuration.socketConnectionTimeout,
+ );
+ }
+ };
+
+ const httpsAgent = new BoundHttpsProxyAgent();
+
+ // Overriding globalAgent was added in v11.7.
+ // @see https://nodejs.org/uk/blog/release/v11.7.0/
+ if (semver.gte(process.version, 'v11.7.0')) {
+ // @see https://github.com/facebook/flow/issues/7670
+ // $FlowFixMe
+ http.globalAgent = httpAgent;
+
+ // $FlowFixMe
+ https.globalAgent = httpsAgent;
+ }
+
+ // The reason this logic is used in addition to overriding http(s).globalAgent
+ // is because there is no guarantee that we set http(s).globalAgent variable
+ // before an instance of http(s).Agent has been already constructed by someone,
+ // e.g. Stripe SDK creates instances of http(s).Agent at the top-level.
+ // @see https://github.com/gajus/global-agent/pull/13
+ //
+ // We still want to override http(s).globalAgent when possible to enable logic
+ // in `bindHttpMethod`.
+ if (semver.gte(process.version, 'v10.0.0')) {
+ // $FlowFixMe
+ http.get = bindHttpMethod(httpGet, httpAgent, configuration.forceGlobalAgent);
+
+ // $FlowFixMe
+ http.request = bindHttpMethod(httpRequest, httpAgent, configuration.forceGlobalAgent);
+
+ // $FlowFixMe
+ https.get = bindHttpMethod(httpsGet, httpsAgent, configuration.forceGlobalAgent);
+
+ // $FlowFixMe
+ https.request = bindHttpMethod(httpsRequest, httpsAgent, configuration.forceGlobalAgent);
+ } else {
+ log.warn('attempt to initialize global-agent in unsupported Node.js version was ignored');
+ }
+
+ return proxyController;
+};
diff --git a/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.map b/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.map
new file mode 100644
index 0000000..00b69f9
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/createGlobalProxyAgent.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/createGlobalProxyAgent.js"],"names":["httpGet","http","get","httpRequest","request","httpsGet","https","httpsRequest","log","Logger","child","namespace","defaultConfigurationInput","environmentVariableNamespace","undefined","forceGlobalAgent","socketConnectionTimeout","omitUndefined","subject","keys","Object","result","key","value","createConfiguration","configurationInput","environment","process","env","defaultConfiguration","GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE","GLOBAL_AGENT_FORCE_GLOBAL_AGENT","GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT","Number","parseInt","configuration","proxyController","HTTP_PROXY","HTTPS_PROXY","NO_PROXY","info","state","mustUrlUseProxy","getProxy","url","getUrlProxy","proxy","UnexpectedStateError","getHttpProxy","BoundHttpProxyAgent","HttpProxyAgent","constructor","globalAgent","httpAgent","getHttpsProxy","BoundHttpsProxyAgent","HttpsProxyAgent","httpsAgent","semver","gte","version","warn"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AAIA;;AAGA;;AASA;;;;AAEA,MAAMA,OAAO,GAAGC,cAAKC,GAArB;AACA,MAAMC,WAAW,GAAGF,cAAKG,OAAzB;AACA,MAAMC,QAAQ,GAAGC,eAAMJ,GAAvB;AACA,MAAMK,YAAY,GAAGD,eAAMF,OAA3B;;AAEA,MAAMI,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;AAIA,MAAMC,yBAAyB,GAAG;AAChCC,EAAAA,4BAA4B,EAAEC,SADE;AAEhCC,EAAAA,gBAAgB,EAAED,SAFc;AAGhCE,EAAAA,uBAAuB,EAAE;AAHO,CAAlC;;AAMA,MAAMC,aAAa,GAAIC,OAAD,IAAa;AACjC,QAAMC,IAAI,GAAGC,MAAM,CAACD,IAAP,CAAYD,OAAZ,CAAb;AAEA,QAAMG,MAAM,GAAG,EAAf;;AAEA,OAAK,MAAMC,GAAX,IAAkBH,IAAlB,EAAwB;AACtB,UAAMI,KAAK,GAAGL,OAAO,CAACI,GAAD,CAArB;;AAEA,QAAIC,KAAK,KAAKT,SAAd,EAAyB;AACvBO,MAAAA,MAAM,CAACC,GAAD,CAAN,GAAcC,KAAd;AACD;AACF;;AAED,SAAOF,MAAP;AACD,CAdD;;AAgBA,MAAMG,mBAAmB,GAAIC,kBAAD,IAAuF;AACjH;AACA,QAAMC,WAAW,GAAGC,OAAO,CAACC,GAA5B;AAEA,QAAMC,oBAAoB,GAAG;AAC3BhB,IAAAA,4BAA4B,EAAE,OAAOa,WAAW,CAACI,2CAAnB,KAAmE,QAAnE,GAA8EJ,WAAW,CAACI,2CAA1F,GAAwI,eAD3I;AAE3Bf,IAAAA,gBAAgB,EAAE,OAAOW,WAAW,CAACK,+BAAnB,KAAuD,QAAvD,GAAkE,sBAAaL,WAAW,CAACK,+BAAzB,CAAlE,GAA8H,IAFrH;AAG3Bf,IAAAA,uBAAuB,EAAE,OAAOU,WAAW,CAACM,sCAAnB,KAA8D,QAA9D,GAAyEC,MAAM,CAACC,QAAP,CAAgBR,WAAW,CAACM,sCAA5B,EAAoE,EAApE,CAAzE,GAAmJpB,yBAAyB,CAACI;AAH3K,GAA7B,CAJiH,CAUjH;;AACA,SAAO,EACL,GAAGa,oBADE;AAEL,OAAGZ,aAAa,CAACQ,kBAAD;AAFX,GAAP;AAID,CAfD;;gCAiBgBA,kBAAoD,GAAGb,yB,KAA8B;AACnG,QAAMuB,aAAa,GAAGX,mBAAmB,CAACC,kBAAD,CAAzC;AAEA,QAAMW,eAAe,GAAG,qCAAxB,CAHmG,CAKnG;;AACAA,EAAAA,eAAe,CAACC,UAAhB,GAA6BV,OAAO,CAACC,GAAR,CAAYO,aAAa,CAACtB,4BAAd,GAA6C,YAAzD,KAA0E,IAAvG,CANmG,CAQnG;;AACAuB,EAAAA,eAAe,CAACE,WAAhB,GAA8BX,OAAO,CAACC,GAAR,CAAYO,aAAa,CAACtB,4BAAd,GAA6C,aAAzD,KAA2E,IAAzG,CATmG,CAWnG;;AACAuB,EAAAA,eAAe,CAACG,QAAhB,GAA2BZ,OAAO,CAACC,GAAR,CAAYO,aAAa,CAACtB,4BAAd,GAA6C,UAAzD,KAAwE,IAAnG;AAEAL,EAAAA,GAAG,CAACgC,IAAJ,CAAS;AACPL,IAAAA,aADO;AAEPM,IAAAA,KAAK,EAAEL;AAFA,GAAT,EAGG,mCAHH;;AAKA,QAAMM,eAAe,GAAIC,QAAD,IAAc;AACpC,WAAQC,GAAD,IAAS;AACd,UAAI,CAACD,QAAQ,EAAb,EAAiB;AACf,eAAO,KAAP;AACD;;AAED,UAAI,CAACP,eAAe,CAACG,QAArB,EAA+B;AAC7B,eAAO,IAAP;AACD;;AAED,aAAO,CAAC,qCAAqBK,GAArB,EAA0BR,eAAe,CAACG,QAA1C,CAAR;AACD,KAVD;AAWD,GAZD;;AAcA,QAAMM,WAAW,GAAIF,QAAD,IAAc;AAChC,WAAO,MAAM;AACX,YAAMG,KAAK,GAAGH,QAAQ,EAAtB;;AAEA,UAAI,CAACG,KAAL,EAAY;AACV,cAAM,IAAIC,4BAAJ,CAAyB,mCAAzB,CAAN;AACD;;AAED,aAAO,8BAAcD,KAAd,CAAP;AACD,KARD;AASD,GAVD;;AAYA,QAAME,YAAY,GAAG,MAAM;AACzB,WAAOZ,eAAe,CAACC,UAAvB;AACD,GAFD;;AAIA,QAAMY,mBAAmB,GAAG,cAAcC,uBAAd,CAA6B;AACvDC,IAAAA,WAAW,GAAI;AACb,YACE,MAAM;AACJ,eAAOH,YAAY,EAAnB;AACD,OAHH,EAIEN,eAAe,CAACM,YAAD,CAJjB,EAKEH,WAAW,CAACG,YAAD,CALb,EAME/C,cAAKmD,WANP,EAOEjB,aAAa,CAACnB,uBAPhB;AASD;;AAXsD,GAAzD;AAcA,QAAMqC,SAAS,GAAG,IAAIJ,mBAAJ,EAAlB;;AAEA,QAAMK,aAAa,GAAG,MAAM;AAC1B,WAAOlB,eAAe,CAACE,WAAhB,IAA+BF,eAAe,CAACC,UAAtD;AACD,GAFD;;AAIA,QAAMkB,oBAAoB,GAAG,cAAcC,wBAAd,CAA8B;AACzDL,IAAAA,WAAW,GAAI;AACb,YACE,MAAM;AACJ,eAAOG,aAAa,EAApB;AACD,OAHH,EAIEZ,eAAe,CAACY,aAAD,CAJjB,EAKET,WAAW,CAACS,aAAD,CALb,EAMEhD,eAAM8C,WANR,EAOEjB,aAAa,CAACnB,uBAPhB;AASD;;AAXwD,GAA3D;AAcA,QAAMyC,UAAU,GAAG,IAAIF,oBAAJ,EAAnB,CAnFmG,CAqFnG;AACA;;AACA,MAAIG,gBAAOC,GAAP,CAAWhC,OAAO,CAACiC,OAAnB,EAA4B,SAA5B,CAAJ,EAA4C;AAC1C;AACA;AACA3D,kBAAKmD,WAAL,GAAmBC,SAAnB,CAH0C,CAK1C;;AACA/C,mBAAM8C,WAAN,GAAoBK,UAApB;AACD,GA9FkG,CAgGnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAIC,gBAAOC,GAAP,CAAWhC,OAAO,CAACiC,OAAnB,EAA4B,SAA5B,CAAJ,EAA4C;AAC1C;AACA3D,kBAAKC,GAAL,GAAW,+BAAeF,OAAf,EAAwBqD,SAAxB,EAAmClB,aAAa,CAACpB,gBAAjD,CAAX,CAF0C,CAI1C;;AACAd,kBAAKG,OAAL,GAAe,+BAAeD,WAAf,EAA4BkD,SAA5B,EAAuClB,aAAa,CAACpB,gBAArD,CAAf,CAL0C,CAO1C;;AACAT,mBAAMJ,GAAN,GAAY,+BAAeG,QAAf,EAAyBoD,UAAzB,EAAqCtB,aAAa,CAACpB,gBAAnD,CAAZ,CAR0C,CAU1C;;AACAT,mBAAMF,OAAN,GAAgB,+BAAeG,YAAf,EAA6BkD,UAA7B,EAAyCtB,aAAa,CAACpB,gBAAvD,CAAhB;AACD,GAZD,MAYO;AACLP,IAAAA,GAAG,CAACqD,IAAJ,CAAS,+EAAT;AACD;;AAED,SAAOzB,eAAP;AACD,C","sourcesContent":["// @flow\n\nimport http from 'http';\nimport https from 'https';\nimport {\n boolean as parseBoolean,\n} from 'boolean';\nimport semver from 'semver';\nimport Logger from '../Logger';\nimport {\n HttpProxyAgent,\n HttpsProxyAgent,\n} from '../classes';\nimport {\n UnexpectedStateError,\n} from '../errors';\nimport {\n bindHttpMethod,\n isUrlMatchingNoProxy,\n parseProxyUrl,\n} from '../utilities';\nimport type {\n ProxyAgentConfigurationInputType,\n ProxyAgentConfigurationType,\n} from '../types';\nimport createProxyController from './createProxyController';\n\nconst httpGet = http.get;\nconst httpRequest = http.request;\nconst httpsGet = https.get;\nconst httpsRequest = https.request;\n\nconst log = Logger.child({\n namespace: 'createGlobalProxyAgent',\n});\n\nconst defaultConfigurationInput = {\n environmentVariableNamespace: undefined,\n forceGlobalAgent: undefined,\n socketConnectionTimeout: 60000,\n};\n\nconst omitUndefined = (subject) => {\n const keys = Object.keys(subject);\n\n const result = {};\n\n for (const key of keys) {\n const value = subject[key];\n\n if (value !== undefined) {\n result[key] = value;\n }\n }\n\n return result;\n};\n\nconst createConfiguration = (configurationInput: ProxyAgentConfigurationInputType): ProxyAgentConfigurationType => {\n // eslint-disable-next-line no-process-env\n const environment = process.env;\n\n const defaultConfiguration = {\n environmentVariableNamespace: typeof environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE === 'string' ? environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE : 'GLOBAL_AGENT_',\n forceGlobalAgent: typeof environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT === 'string' ? parseBoolean(environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT) : true,\n socketConnectionTimeout: typeof environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT === 'string' ? Number.parseInt(environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT, 10) : defaultConfigurationInput.socketConnectionTimeout,\n };\n\n // $FlowFixMe\n return {\n ...defaultConfiguration,\n ...omitUndefined(configurationInput),\n };\n};\n\nexport default (configurationInput: ProxyAgentConfigurationInputType = defaultConfigurationInput) => {\n const configuration = createConfiguration(configurationInput);\n\n const proxyController = createProxyController();\n\n // eslint-disable-next-line no-process-env\n proxyController.HTTP_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTP_PROXY'] || null;\n\n // eslint-disable-next-line no-process-env\n proxyController.HTTPS_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTPS_PROXY'] || null;\n\n // eslint-disable-next-line no-process-env\n proxyController.NO_PROXY = process.env[configuration.environmentVariableNamespace + 'NO_PROXY'] || null;\n\n log.info({\n configuration,\n state: proxyController,\n }, 'global agent has been initialized');\n\n const mustUrlUseProxy = (getProxy) => {\n return (url) => {\n if (!getProxy()) {\n return false;\n }\n\n if (!proxyController.NO_PROXY) {\n return true;\n }\n\n return !isUrlMatchingNoProxy(url, proxyController.NO_PROXY);\n };\n };\n\n const getUrlProxy = (getProxy) => {\n return () => {\n const proxy = getProxy();\n\n if (!proxy) {\n throw new UnexpectedStateError('HTTP(S) proxy must be configured.');\n }\n\n return parseProxyUrl(proxy);\n };\n };\n\n const getHttpProxy = () => {\n return proxyController.HTTP_PROXY;\n };\n\n const BoundHttpProxyAgent = class extends HttpProxyAgent {\n constructor () {\n super(\n () => {\n return getHttpProxy();\n },\n mustUrlUseProxy(getHttpProxy),\n getUrlProxy(getHttpProxy),\n http.globalAgent,\n configuration.socketConnectionTimeout,\n );\n }\n };\n\n const httpAgent = new BoundHttpProxyAgent();\n\n const getHttpsProxy = () => {\n return proxyController.HTTPS_PROXY || proxyController.HTTP_PROXY;\n };\n\n const BoundHttpsProxyAgent = class extends HttpsProxyAgent {\n constructor () {\n super(\n () => {\n return getHttpsProxy();\n },\n mustUrlUseProxy(getHttpsProxy),\n getUrlProxy(getHttpsProxy),\n https.globalAgent,\n configuration.socketConnectionTimeout,\n );\n }\n };\n\n const httpsAgent = new BoundHttpsProxyAgent();\n\n // Overriding globalAgent was added in v11.7.\n // @see https://nodejs.org/uk/blog/release/v11.7.0/\n if (semver.gte(process.version, 'v11.7.0')) {\n // @see https://github.com/facebook/flow/issues/7670\n // $FlowFixMe\n http.globalAgent = httpAgent;\n\n // $FlowFixMe\n https.globalAgent = httpsAgent;\n }\n\n // The reason this logic is used in addition to overriding http(s).globalAgent\n // is because there is no guarantee that we set http(s).globalAgent variable\n // before an instance of http(s).Agent has been already constructed by someone,\n // e.g. Stripe SDK creates instances of http(s).Agent at the top-level.\n // @see https://github.com/gajus/global-agent/pull/13\n //\n // We still want to override http(s).globalAgent when possible to enable logic\n // in `bindHttpMethod`.\n if (semver.gte(process.version, 'v10.0.0')) {\n // $FlowFixMe\n http.get = bindHttpMethod(httpGet, httpAgent, configuration.forceGlobalAgent);\n\n // $FlowFixMe\n http.request = bindHttpMethod(httpRequest, httpAgent, configuration.forceGlobalAgent);\n\n // $FlowFixMe\n https.get = bindHttpMethod(httpsGet, httpsAgent, configuration.forceGlobalAgent);\n\n // $FlowFixMe\n https.request = bindHttpMethod(httpsRequest, httpsAgent, configuration.forceGlobalAgent);\n } else {\n log.warn('attempt to initialize global-agent in unsupported Node.js version was ignored');\n }\n\n return proxyController;\n};\n"],"file":"createGlobalProxyAgent.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/factories/createProxyController.js b/node_modules/global-agent/dist/factories/createProxyController.js
new file mode 100644
index 0000000..7746081
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/createProxyController.js
@@ -0,0 +1,45 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _Logger = _interopRequireDefault(require("../Logger"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const log = _Logger.default.child({
+ namespace: 'createProxyController'
+});
+
+const KNOWN_PROPERTY_NAMES = ['HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY'];
+
+const createProxyController = () => {
+ // eslint-disable-next-line fp/no-proxy
+ return new Proxy({
+ HTTP_PROXY: null,
+ HTTPS_PROXY: null,
+ NO_PROXY: null
+ }, {
+ set: (subject, name, value) => {
+ if (!KNOWN_PROPERTY_NAMES.includes(name)) {
+ throw new Error('Cannot set an unmapped property "' + name + '".');
+ }
+
+ subject[name] = value;
+ log.info({
+ change: {
+ name,
+ value
+ },
+ newConfiguration: subject
+ }, 'configuration changed');
+ return true;
+ }
+ });
+};
+
+var _default = createProxyController;
+exports.default = _default;
+//# sourceMappingURL=createProxyController.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/factories/createProxyController.js.flow b/node_modules/global-agent/dist/factories/createProxyController.js.flow
new file mode 100644
index 0000000..5805ec8
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/createProxyController.js.flow
@@ -0,0 +1,46 @@
+// @flow
+
+import Logger from '../Logger';
+
+type ProxyControllerType = {|
+ HTTP_PROXY: string | null,
+ HTTPS_PROXY: string | null,
+ NO_PROXY: string | null,
+|};
+
+const log = Logger.child({
+ namespace: 'createProxyController',
+});
+
+const KNOWN_PROPERTY_NAMES = [
+ 'HTTP_PROXY',
+ 'HTTPS_PROXY',
+ 'NO_PROXY',
+];
+
+export default (): ProxyControllerType => {
+ // eslint-disable-next-line fp/no-proxy
+ return new Proxy({
+ HTTP_PROXY: null,
+ HTTPS_PROXY: null,
+ NO_PROXY: null,
+ }, {
+ set: (subject, name, value) => {
+ if (!KNOWN_PROPERTY_NAMES.includes(name)) {
+ throw new Error('Cannot set an unmapped property "' + name + '".');
+ }
+
+ subject[name] = value;
+
+ log.info({
+ change: {
+ name,
+ value,
+ },
+ newConfiguration: subject,
+ }, 'configuration changed');
+
+ return true;
+ },
+ });
+};
diff --git a/node_modules/global-agent/dist/factories/createProxyController.js.map b/node_modules/global-agent/dist/factories/createProxyController.js.map
new file mode 100644
index 0000000..da7b0e7
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/createProxyController.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/createProxyController.js"],"names":["log","Logger","child","namespace","KNOWN_PROPERTY_NAMES","Proxy","HTTP_PROXY","HTTPS_PROXY","NO_PROXY","set","subject","name","value","includes","Error","info","change","newConfiguration"],"mappings":";;;;;;;AAEA;;;;AAQA,MAAMA,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;AAIA,MAAMC,oBAAoB,GAAG,CAC3B,YAD2B,EAE3B,aAF2B,EAG3B,UAH2B,CAA7B;;oCAM0C;AACxC;AACA,SAAO,IAAIC,KAAJ,CAAU;AACfC,IAAAA,UAAU,EAAE,IADG;AAEfC,IAAAA,WAAW,EAAE,IAFE;AAGfC,IAAAA,QAAQ,EAAE;AAHK,GAAV,EAIJ;AACDC,IAAAA,GAAG,EAAE,CAACC,OAAD,EAAUC,IAAV,EAAgBC,KAAhB,KAA0B;AAC7B,UAAI,CAACR,oBAAoB,CAACS,QAArB,CAA8BF,IAA9B,CAAL,EAA0C;AACxC,cAAM,IAAIG,KAAJ,CAAU,sCAAsCH,IAAtC,GAA6C,IAAvD,CAAN;AACD;;AAEDD,MAAAA,OAAO,CAACC,IAAD,CAAP,GAAgBC,KAAhB;AAEAZ,MAAAA,GAAG,CAACe,IAAJ,CAAS;AACPC,QAAAA,MAAM,EAAE;AACNL,UAAAA,IADM;AAENC,UAAAA;AAFM,SADD;AAKPK,QAAAA,gBAAgB,EAAEP;AALX,OAAT,EAMG,uBANH;AAQA,aAAO,IAAP;AACD;AAjBA,GAJI,CAAP;AAuBD,C","sourcesContent":["// @flow\n\nimport Logger from '../Logger';\n\ntype ProxyControllerType = {|\n HTTP_PROXY: string | null,\n HTTPS_PROXY: string | null,\n NO_PROXY: string | null,\n|};\n\nconst log = Logger.child({\n namespace: 'createProxyController',\n});\n\nconst KNOWN_PROPERTY_NAMES = [\n 'HTTP_PROXY',\n 'HTTPS_PROXY',\n 'NO_PROXY',\n];\n\nexport default (): ProxyControllerType => {\n // eslint-disable-next-line fp/no-proxy\n return new Proxy({\n HTTP_PROXY: null,\n HTTPS_PROXY: null,\n NO_PROXY: null,\n }, {\n set: (subject, name, value) => {\n if (!KNOWN_PROPERTY_NAMES.includes(name)) {\n throw new Error('Cannot set an unmapped property \"' + name + '\".');\n }\n\n subject[name] = value;\n\n log.info({\n change: {\n name,\n value,\n },\n newConfiguration: subject,\n }, 'configuration changed');\n\n return true;\n },\n });\n};\n"],"file":"createProxyController.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/factories/index.js b/node_modules/global-agent/dist/factories/index.js
new file mode 100644
index 0000000..3193022
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/index.js
@@ -0,0 +1,24 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "createGlobalProxyAgent", {
+ enumerable: true,
+ get: function () {
+ return _createGlobalProxyAgent.default;
+ }
+});
+Object.defineProperty(exports, "createProxyController", {
+ enumerable: true,
+ get: function () {
+ return _createProxyController.default;
+ }
+});
+
+var _createGlobalProxyAgent = _interopRequireDefault(require("./createGlobalProxyAgent"));
+
+var _createProxyController = _interopRequireDefault(require("./createProxyController"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/factories/index.js.flow b/node_modules/global-agent/dist/factories/index.js.flow
new file mode 100644
index 0000000..c16eca6
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/index.js.flow
@@ -0,0 +1,4 @@
+// @flow
+
+export {default as createGlobalProxyAgent} from './createGlobalProxyAgent';
+export {default as createProxyController} from './createProxyController';
diff --git a/node_modules/global-agent/dist/factories/index.js.map b/node_modules/global-agent/dist/factories/index.js.map
new file mode 100644
index 0000000..2e61240
--- /dev/null
+++ b/node_modules/global-agent/dist/factories/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;;AACA","sourcesContent":["// @flow\n\nexport {default as createGlobalProxyAgent} from './createGlobalProxyAgent';\nexport {default as createProxyController} from './createProxyController';\n"],"file":"index.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/index.js b/node_modules/global-agent/dist/index.js
new file mode 100644
index 0000000..242a88a
--- /dev/null
+++ b/node_modules/global-agent/dist/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "bootstrap", {
+ enumerable: true,
+ get: function () {
+ return _routines.bootstrap;
+ }
+});
+Object.defineProperty(exports, "createGlobalProxyAgent", {
+ enumerable: true,
+ get: function () {
+ return _factories.createGlobalProxyAgent;
+ }
+});
+
+var _routines = require("./routines");
+
+var _factories = require("./factories");
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/index.js.flow b/node_modules/global-agent/dist/index.js.flow
new file mode 100644
index 0000000..14da1ba
--- /dev/null
+++ b/node_modules/global-agent/dist/index.js.flow
@@ -0,0 +1,4 @@
+// @flow
+
+export {bootstrap} from './routines';
+export {createGlobalProxyAgent} from './factories';
diff --git a/node_modules/global-agent/dist/index.js.map b/node_modules/global-agent/dist/index.js.map
new file mode 100644
index 0000000..42901df
--- /dev/null
+++ b/node_modules/global-agent/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;;AACA","sourcesContent":["// @flow\n\nexport {bootstrap} from './routines';\nexport {createGlobalProxyAgent} from './factories';\n"],"file":"index.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/routines/bootstrap.js b/node_modules/global-agent/dist/routines/bootstrap.js
new file mode 100644
index 0000000..444df53
--- /dev/null
+++ b/node_modules/global-agent/dist/routines/bootstrap.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _Logger = _interopRequireDefault(require("../Logger"));
+
+var _factories = require("../factories");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const log = _Logger.default.child({
+ namespace: 'bootstrap'
+});
+
+const bootstrap = configurationInput => {
+ if (global.GLOBAL_AGENT) {
+ log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');
+ return false;
+ }
+
+ global.GLOBAL_AGENT = (0, _factories.createGlobalProxyAgent)(configurationInput);
+ return true;
+};
+
+var _default = bootstrap;
+exports.default = _default;
+//# sourceMappingURL=bootstrap.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/routines/bootstrap.js.flow b/node_modules/global-agent/dist/routines/bootstrap.js.flow
new file mode 100644
index 0000000..038feb3
--- /dev/null
+++ b/node_modules/global-agent/dist/routines/bootstrap.js.flow
@@ -0,0 +1,25 @@
+// @flow
+
+import Logger from '../Logger';
+import {
+ createGlobalProxyAgent,
+} from '../factories';
+import type {
+ ProxyAgentConfigurationInputType,
+} from '../types';
+
+const log = Logger.child({
+ namespace: 'bootstrap',
+});
+
+export default (configurationInput?: ProxyAgentConfigurationInputType): boolean => {
+ if (global.GLOBAL_AGENT) {
+ log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');
+
+ return false;
+ }
+
+ global.GLOBAL_AGENT = createGlobalProxyAgent(configurationInput);
+
+ return true;
+};
diff --git a/node_modules/global-agent/dist/routines/bootstrap.js.map b/node_modules/global-agent/dist/routines/bootstrap.js.map
new file mode 100644
index 0000000..84bbf79
--- /dev/null
+++ b/node_modules/global-agent/dist/routines/bootstrap.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/routines/bootstrap.js"],"names":["log","Logger","child","namespace","configurationInput","global","GLOBAL_AGENT","warn"],"mappings":";;;;;;;AAEA;;AACA;;;;AAOA,MAAMA,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;kBAIgBC,kB,IAAmE;AACjF,MAAIC,MAAM,CAACC,YAAX,EAAyB;AACvBN,IAAAA,GAAG,CAACO,IAAJ,CAAS,iFAAT;AAEA,WAAO,KAAP;AACD;;AAEDF,EAAAA,MAAM,CAACC,YAAP,GAAsB,uCAAuBF,kBAAvB,CAAtB;AAEA,SAAO,IAAP;AACD,C","sourcesContent":["// @flow\n\nimport Logger from '../Logger';\nimport {\n createGlobalProxyAgent,\n} from '../factories';\nimport type {\n ProxyAgentConfigurationInputType,\n} from '../types';\n\nconst log = Logger.child({\n namespace: 'bootstrap',\n});\n\nexport default (configurationInput?: ProxyAgentConfigurationInputType): boolean => {\n if (global.GLOBAL_AGENT) {\n log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');\n\n return false;\n }\n\n global.GLOBAL_AGENT = createGlobalProxyAgent(configurationInput);\n\n return true;\n};\n"],"file":"bootstrap.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/routines/index.js b/node_modules/global-agent/dist/routines/index.js
new file mode 100644
index 0000000..2ae1be2
--- /dev/null
+++ b/node_modules/global-agent/dist/routines/index.js
@@ -0,0 +1,16 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "bootstrap", {
+ enumerable: true,
+ get: function () {
+ return _bootstrap.default;
+ }
+});
+
+var _bootstrap = _interopRequireDefault(require("./bootstrap"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/routines/index.js.flow b/node_modules/global-agent/dist/routines/index.js.flow
new file mode 100644
index 0000000..e47a8a0
--- /dev/null
+++ b/node_modules/global-agent/dist/routines/index.js.flow
@@ -0,0 +1,3 @@
+// @flow
+
+export {default as bootstrap} from './bootstrap';
diff --git a/node_modules/global-agent/dist/routines/index.js.map b/node_modules/global-agent/dist/routines/index.js.map
new file mode 100644
index 0000000..97295d9
--- /dev/null
+++ b/node_modules/global-agent/dist/routines/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/routines/index.js"],"names":[],"mappings":";;;;;;;;;;;;AAEA","sourcesContent":["// @flow\n\nexport {default as bootstrap} from './bootstrap';\n"],"file":"index.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/types.js b/node_modules/global-agent/dist/types.js
new file mode 100644
index 0000000..fb07a95
--- /dev/null
+++ b/node_modules/global-agent/dist/types.js
@@ -0,0 +1,10 @@
+"use strict";
+
+var _net = require("net");
+
+var _tls = require("tls");
+
+var _http = require("http");
+
+var _https = require("https");
+//# sourceMappingURL=types.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/types.js.flow b/node_modules/global-agent/dist/types.js.flow
new file mode 100644
index 0000000..e2f1a99
--- /dev/null
+++ b/node_modules/global-agent/dist/types.js.flow
@@ -0,0 +1,66 @@
+// @flow
+
+import {
+ Socket,
+} from 'net';
+import {
+ TLSSocket,
+} from 'tls';
+import {
+ Agent as HttpAgent,
+} from 'http';
+import {
+ Agent as HttpsAgent,
+} from 'https';
+
+export type ProxyConfigurationType = {|
+ +authorization: string,
+ +hostname: string,
+ +port: number,
+|};
+
+export type TlsConfigurationType = {|
+ +ca?: string,
+ +cert?: string,
+ +ciphers?: string,
+ +clientCertEngine?: string,
+ +crl?: string,
+ +dhparam?: string,
+ +ecdhCurve?: string,
+ +honorCipherOrder?: boolean,
+ +key?: string,
+ +passphrase?: string,
+ +pfx?: string,
+ +rejectUnauthorized?: boolean,
+ +secureOptions?: number,
+ +secureProtocol?: string,
+ +servername?: string,
+ +sessionIdContext?: string,
+|};
+
+export type ConnectionConfigurationType = {|
+ +host: string,
+ +port: number,
+ +tls?: TlsConfigurationType,
+ +proxy: ProxyConfigurationType,
+|};
+
+export type ConnectionCallbackType = (error: Error | null, socket?: Socket | TLSSocket) => void;
+
+export type AgentType = HttpAgent | HttpsAgent;
+export type IsProxyConfiguredMethodType = () => boolean;
+export type MustUrlUseProxyMethodType = (url: string) => boolean;
+export type GetUrlProxyMethodType = (url: string) => ProxyConfigurationType;
+export type ProtocolType = 'http:' | 'https:';
+
+export type ProxyAgentConfigurationInputType = {|
+ +environmentVariableNamespace?: string,
+ +forceGlobalAgent?: boolean,
+ +socketConnectionTimeout?: number,
+|};
+
+export type ProxyAgentConfigurationType = {|
+ +environmentVariableNamespace: string,
+ +forceGlobalAgent: boolean,
+ +socketConnectionTimeout: number,
+|};
diff --git a/node_modules/global-agent/dist/types.js.map b/node_modules/global-agent/dist/types.js.map
new file mode 100644
index 0000000..46e65bc
--- /dev/null
+++ b/node_modules/global-agent/dist/types.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/types.js"],"names":[],"mappings":";;AAEA;;AAGA;;AAGA;;AAGA","sourcesContent":["// @flow\n\nimport {\n Socket,\n} from 'net';\nimport {\n TLSSocket,\n} from 'tls';\nimport {\n Agent as HttpAgent,\n} from 'http';\nimport {\n Agent as HttpsAgent,\n} from 'https';\n\nexport type ProxyConfigurationType = {|\n +authorization: string,\n +hostname: string,\n +port: number,\n|};\n\nexport type TlsConfigurationType = {|\n +ca?: string,\n +cert?: string,\n +ciphers?: string,\n +clientCertEngine?: string,\n +crl?: string,\n +dhparam?: string,\n +ecdhCurve?: string,\n +honorCipherOrder?: boolean,\n +key?: string,\n +passphrase?: string,\n +pfx?: string,\n +rejectUnauthorized?: boolean,\n +secureOptions?: number,\n +secureProtocol?: string,\n +servername?: string,\n +sessionIdContext?: string,\n|};\n\nexport type ConnectionConfigurationType = {|\n +host: string,\n +port: number,\n +tls?: TlsConfigurationType,\n +proxy: ProxyConfigurationType,\n|};\n\nexport type ConnectionCallbackType = (error: Error | null, socket?: Socket | TLSSocket) => void;\n\nexport type AgentType = HttpAgent | HttpsAgent;\nexport type IsProxyConfiguredMethodType = () => boolean;\nexport type MustUrlUseProxyMethodType = (url: string) => boolean;\nexport type GetUrlProxyMethodType = (url: string) => ProxyConfigurationType;\nexport type ProtocolType = 'http:' | 'https:';\n\nexport type ProxyAgentConfigurationInputType = {|\n +environmentVariableNamespace?: string,\n +forceGlobalAgent?: boolean,\n +socketConnectionTimeout?: number,\n|};\n\nexport type ProxyAgentConfigurationType = {|\n +environmentVariableNamespace: string,\n +forceGlobalAgent: boolean,\n +socketConnectionTimeout: number,\n|};\n"],"file":"types.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/bindHttpMethod.js b/node_modules/global-agent/dist/utilities/bindHttpMethod.js
new file mode 100644
index 0000000..4ce571a
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/bindHttpMethod.js
@@ -0,0 +1,62 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _http = _interopRequireDefault(require("http"));
+
+var _https = _interopRequireDefault(require("https"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// eslint-disable-next-line flowtype/no-weak-types
+const bindHttpMethod = (originalMethod, agent, forceGlobalAgent) => {
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ return (...args) => {
+ let url;
+ let options;
+ let callback;
+
+ if (typeof args[0] === 'string' || args[0] instanceof URL) {
+ url = args[0];
+
+ if (typeof args[1] === 'function') {
+ options = {};
+ callback = args[1];
+ } else {
+ options = { ...args[1]
+ };
+ callback = args[2];
+ }
+ } else {
+ options = { ...args[0]
+ };
+ callback = args[1];
+ }
+
+ if (forceGlobalAgent) {
+ options.agent = agent;
+ } else {
+ if (!options.agent) {
+ options.agent = agent;
+ }
+
+ if (options.agent === _http.default.globalAgent || options.agent === _https.default.globalAgent) {
+ options.agent = agent;
+ }
+ }
+
+ if (url) {
+ // $FlowFixMe
+ return originalMethod(url, options, callback);
+ } else {
+ return originalMethod(options, callback);
+ }
+ };
+};
+
+var _default = bindHttpMethod;
+exports.default = _default;
+//# sourceMappingURL=bindHttpMethod.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/bindHttpMethod.js.flow b/node_modules/global-agent/dist/utilities/bindHttpMethod.js.flow
new file mode 100644
index 0000000..f8859b5
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/bindHttpMethod.js.flow
@@ -0,0 +1,54 @@
+// @flow
+
+import http from 'http';
+import https from 'https';
+
+type AgentType = http.Agent | https.Agent;
+
+// eslint-disable-next-line flowtype/no-weak-types
+export default (originalMethod: Function, agent: AgentType, forceGlobalAgent: boolean) => {
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ return (...args: *) => {
+ let url;
+ let options;
+ let callback;
+
+ if (typeof args[0] === 'string' || args[0] instanceof URL) {
+ url = args[0];
+
+ if (typeof args[1] === 'function') {
+ options = {};
+ callback = args[1];
+ } else {
+ options = {
+ ...args[1],
+ };
+ callback = args[2];
+ }
+ } else {
+ options = {
+ ...args[0],
+ };
+ callback = args[1];
+ }
+
+ if (forceGlobalAgent) {
+ options.agent = agent;
+ } else {
+ if (!options.agent) {
+ options.agent = agent;
+ }
+
+ if (options.agent === http.globalAgent || options.agent === https.globalAgent) {
+ options.agent = agent;
+ }
+ }
+
+ if (url) {
+ // $FlowFixMe
+ return originalMethod(url, options, callback);
+ } else {
+ return originalMethod(options, callback);
+ }
+ };
+};
diff --git a/node_modules/global-agent/dist/utilities/bindHttpMethod.js.map b/node_modules/global-agent/dist/utilities/bindHttpMethod.js.map
new file mode 100644
index 0000000..0d49171
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/bindHttpMethod.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/utilities/bindHttpMethod.js"],"names":["originalMethod","agent","forceGlobalAgent","args","url","options","callback","URL","http","globalAgent","https"],"mappings":";;;;;;;AAEA;;AACA;;;;AAIA;wBACgBA,c,EAA0BC,K,EAAkBC,gB,KAA8B;AACxF;AACA,SAAO,CAAC,GAAGC,IAAJ,KAAgB;AACrB,QAAIC,GAAJ;AACA,QAAIC,OAAJ;AACA,QAAIC,QAAJ;;AAEA,QAAI,OAAOH,IAAI,CAAC,CAAD,CAAX,KAAmB,QAAnB,IAA+BA,IAAI,CAAC,CAAD,CAAJ,YAAmBI,GAAtD,EAA2D;AACzDH,MAAAA,GAAG,GAAGD,IAAI,CAAC,CAAD,CAAV;;AAEA,UAAI,OAAOA,IAAI,CAAC,CAAD,CAAX,KAAmB,UAAvB,EAAmC;AACjCE,QAAAA,OAAO,GAAG,EAAV;AACAC,QAAAA,QAAQ,GAAGH,IAAI,CAAC,CAAD,CAAf;AACD,OAHD,MAGO;AACLE,QAAAA,OAAO,GAAG,EACR,GAAGF,IAAI,CAAC,CAAD;AADC,SAAV;AAGAG,QAAAA,QAAQ,GAAGH,IAAI,CAAC,CAAD,CAAf;AACD;AACF,KAZD,MAYO;AACLE,MAAAA,OAAO,GAAG,EACR,GAAGF,IAAI,CAAC,CAAD;AADC,OAAV;AAGAG,MAAAA,QAAQ,GAAGH,IAAI,CAAC,CAAD,CAAf;AACD;;AAED,QAAID,gBAAJ,EAAsB;AACpBG,MAAAA,OAAO,CAACJ,KAAR,GAAgBA,KAAhB;AACD,KAFD,MAEO;AACL,UAAI,CAACI,OAAO,CAACJ,KAAb,EAAoB;AAClBI,QAAAA,OAAO,CAACJ,KAAR,GAAgBA,KAAhB;AACD;;AAED,UAAII,OAAO,CAACJ,KAAR,KAAkBO,cAAKC,WAAvB,IAAsCJ,OAAO,CAACJ,KAAR,KAAkBS,eAAMD,WAAlE,EAA+E;AAC7EJ,QAAAA,OAAO,CAACJ,KAAR,GAAgBA,KAAhB;AACD;AACF;;AAED,QAAIG,GAAJ,EAAS;AACP;AACA,aAAOJ,cAAc,CAACI,GAAD,EAAMC,OAAN,EAAeC,QAAf,CAArB;AACD,KAHD,MAGO;AACL,aAAON,cAAc,CAACK,OAAD,EAAUC,QAAV,CAArB;AACD;AACF,GA1CD;AA2CD,C","sourcesContent":["// @flow\n\nimport http from 'http';\nimport https from 'https';\n\ntype AgentType = http.Agent | https.Agent;\n\n// eslint-disable-next-line flowtype/no-weak-types\nexport default (originalMethod: Function, agent: AgentType, forceGlobalAgent: boolean) => {\n // eslint-disable-next-line unicorn/prevent-abbreviations\n return (...args: *) => {\n let url;\n let options;\n let callback;\n\n if (typeof args[0] === 'string' || args[0] instanceof URL) {\n url = args[0];\n\n if (typeof args[1] === 'function') {\n options = {};\n callback = args[1];\n } else {\n options = {\n ...args[1],\n };\n callback = args[2];\n }\n } else {\n options = {\n ...args[0],\n };\n callback = args[1];\n }\n\n if (forceGlobalAgent) {\n options.agent = agent;\n } else {\n if (!options.agent) {\n options.agent = agent;\n }\n\n if (options.agent === http.globalAgent || options.agent === https.globalAgent) {\n options.agent = agent;\n }\n }\n\n if (url) {\n // $FlowFixMe\n return originalMethod(url, options, callback);\n } else {\n return originalMethod(options, callback);\n }\n };\n};\n"],"file":"bindHttpMethod.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/index.js b/node_modules/global-agent/dist/utilities/index.js
new file mode 100644
index 0000000..5b9ff43
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/index.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "bindHttpMethod", {
+ enumerable: true,
+ get: function () {
+ return _bindHttpMethod.default;
+ }
+});
+Object.defineProperty(exports, "isUrlMatchingNoProxy", {
+ enumerable: true,
+ get: function () {
+ return _isUrlMatchingNoProxy.default;
+ }
+});
+Object.defineProperty(exports, "parseProxyUrl", {
+ enumerable: true,
+ get: function () {
+ return _parseProxyUrl.default;
+ }
+});
+
+var _bindHttpMethod = _interopRequireDefault(require("./bindHttpMethod"));
+
+var _isUrlMatchingNoProxy = _interopRequireDefault(require("./isUrlMatchingNoProxy"));
+
+var _parseProxyUrl = _interopRequireDefault(require("./parseProxyUrl"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/index.js.flow b/node_modules/global-agent/dist/utilities/index.js.flow
new file mode 100644
index 0000000..3412387
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/index.js.flow
@@ -0,0 +1,5 @@
+// @flow
+
+export {default as bindHttpMethod} from './bindHttpMethod';
+export {default as isUrlMatchingNoProxy} from './isUrlMatchingNoProxy';
+export {default as parseProxyUrl} from './parseProxyUrl';
diff --git a/node_modules/global-agent/dist/utilities/index.js.map b/node_modules/global-agent/dist/utilities/index.js.map
new file mode 100644
index 0000000..6861a5a
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/utilities/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AACA;;AACA","sourcesContent":["// @flow\n\nexport {default as bindHttpMethod} from './bindHttpMethod';\nexport {default as isUrlMatchingNoProxy} from './isUrlMatchingNoProxy';\nexport {default as parseProxyUrl} from './parseProxyUrl';\n"],"file":"index.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js b/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js
new file mode 100644
index 0000000..92a3436
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js
@@ -0,0 +1,43 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _url = require("url");
+
+var _matcher = _interopRequireDefault(require("matcher"));
+
+var _errors = require("../errors");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const isUrlMatchingNoProxy = (subjectUrl, noProxy) => {
+ const subjectUrlTokens = (0, _url.parse)(subjectUrl);
+ const rules = noProxy.split(/[\s,]+/);
+
+ for (const rule of rules) {
+ const ruleMatch = rule.replace(/^(?<leadingDot>\.)/, '*').match(/^(?<hostname>.+?)(?::(?<port>\d+))?$/);
+
+ if (!ruleMatch || !ruleMatch.groups) {
+ throw new _errors.UnexpectedStateError('Invalid NO_PROXY pattern.');
+ }
+
+ if (!ruleMatch.groups.hostname) {
+ throw new _errors.UnexpectedStateError('NO_PROXY entry pattern must include hostname. Use * to match any hostname.');
+ }
+
+ const hostnameIsMatch = _matcher.default.isMatch(subjectUrlTokens.hostname, ruleMatch.groups.hostname);
+
+ if (hostnameIsMatch && (!ruleMatch.groups || !ruleMatch.groups.port || subjectUrlTokens.port && subjectUrlTokens.port === ruleMatch.groups.port)) {
+ return true;
+ }
+ }
+
+ return false;
+};
+
+var _default = isUrlMatchingNoProxy;
+exports.default = _default;
+//# sourceMappingURL=isUrlMatchingNoProxy.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.flow b/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.flow
new file mode 100644
index 0000000..f2de584
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.flow
@@ -0,0 +1,37 @@
+// @flow
+
+import {
+ parse as parseUrl,
+} from 'url';
+import matcher from 'matcher';
+import {
+ UnexpectedStateError,
+} from '../errors';
+
+export default (subjectUrl: string, noProxy: string) => {
+ const subjectUrlTokens = parseUrl(subjectUrl);
+
+ const rules = noProxy.split(/[\s,]+/);
+
+ for (const rule of rules) {
+ const ruleMatch = rule
+ .replace(/^(?<leadingDot>\.)/, '*')
+ .match(/^(?<hostname>.+?)(?::(?<port>\d+))?$/);
+
+ if (!ruleMatch || !ruleMatch.groups) {
+ throw new UnexpectedStateError('Invalid NO_PROXY pattern.');
+ }
+
+ if (!ruleMatch.groups.hostname) {
+ throw new UnexpectedStateError('NO_PROXY entry pattern must include hostname. Use * to match any hostname.');
+ }
+
+ const hostnameIsMatch = matcher.isMatch(subjectUrlTokens.hostname, ruleMatch.groups.hostname);
+
+ if (hostnameIsMatch && (!ruleMatch.groups || !ruleMatch.groups.port || subjectUrlTokens.port && subjectUrlTokens.port === ruleMatch.groups.port)) {
+ return true;
+ }
+ }
+
+ return false;
+};
diff --git a/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.map b/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.map
new file mode 100644
index 0000000..9f60970
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/isUrlMatchingNoProxy.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/utilities/isUrlMatchingNoProxy.js"],"names":["subjectUrl","noProxy","subjectUrlTokens","rules","split","rule","ruleMatch","replace","match","groups","UnexpectedStateError","hostname","hostnameIsMatch","matcher","isMatch","port"],"mappings":";;;;;;;AAEA;;AAGA;;AACA;;;;8BAIgBA,U,EAAoBC,O,KAAoB;AACtD,QAAMC,gBAAgB,GAAG,gBAASF,UAAT,CAAzB;AAEA,QAAMG,KAAK,GAAGF,OAAO,CAACG,KAAR,CAAc,QAAd,CAAd;;AAEA,OAAK,MAAMC,IAAX,IAAmBF,KAAnB,EAA0B;AACxB,UAAMG,SAAS,GAAGD,IAAI,CACnBE,OADe,CACP,oBADO,EACe,GADf,EAEfC,KAFe,CAET,sCAFS,CAAlB;;AAIA,QAAI,CAACF,SAAD,IAAc,CAACA,SAAS,CAACG,MAA7B,EAAqC;AACnC,YAAM,IAAIC,4BAAJ,CAAyB,2BAAzB,CAAN;AACD;;AAED,QAAI,CAACJ,SAAS,CAACG,MAAV,CAAiBE,QAAtB,EAAgC;AAC9B,YAAM,IAAID,4BAAJ,CAAyB,4EAAzB,CAAN;AACD;;AAED,UAAME,eAAe,GAAGC,iBAAQC,OAAR,CAAgBZ,gBAAgB,CAACS,QAAjC,EAA2CL,SAAS,CAACG,MAAV,CAAiBE,QAA5D,CAAxB;;AAEA,QAAIC,eAAe,KAAK,CAACN,SAAS,CAACG,MAAX,IAAqB,CAACH,SAAS,CAACG,MAAV,CAAiBM,IAAvC,IAA+Cb,gBAAgB,CAACa,IAAjB,IAAyBb,gBAAgB,CAACa,IAAjB,KAA0BT,SAAS,CAACG,MAAV,CAAiBM,IAAxH,CAAnB,EAAkJ;AAChJ,aAAO,IAAP;AACD;AACF;;AAED,SAAO,KAAP;AACD,C","sourcesContent":["// @flow\n\nimport {\n parse as parseUrl,\n} from 'url';\nimport matcher from 'matcher';\nimport {\n UnexpectedStateError,\n} from '../errors';\n\nexport default (subjectUrl: string, noProxy: string) => {\n const subjectUrlTokens = parseUrl(subjectUrl);\n\n const rules = noProxy.split(/[\\s,]+/);\n\n for (const rule of rules) {\n const ruleMatch = rule\n .replace(/^(?<leadingDot>\\.)/, '*')\n .match(/^(?<hostname>.+?)(?::(?<port>\\d+))?$/);\n\n if (!ruleMatch || !ruleMatch.groups) {\n throw new UnexpectedStateError('Invalid NO_PROXY pattern.');\n }\n\n if (!ruleMatch.groups.hostname) {\n throw new UnexpectedStateError('NO_PROXY entry pattern must include hostname. Use * to match any hostname.');\n }\n\n const hostnameIsMatch = matcher.isMatch(subjectUrlTokens.hostname, ruleMatch.groups.hostname);\n\n if (hostnameIsMatch && (!ruleMatch.groups || !ruleMatch.groups.port || subjectUrlTokens.port && subjectUrlTokens.port === ruleMatch.groups.port)) {\n return true;\n }\n }\n\n return false;\n};\n"],"file":"isUrlMatchingNoProxy.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/parseProxyUrl.js b/node_modules/global-agent/dist/utilities/parseProxyUrl.js
new file mode 100644
index 0000000..e4f1185
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/parseProxyUrl.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _url = require("url");
+
+var _errors = require("../errors");
+
+const parseProxyUrl = url => {
+ const urlTokens = (0, _url.parse)(url);
+
+ if (urlTokens.query !== null) {
+ throw new _errors.UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.');
+ }
+
+ if (urlTokens.hash !== null) {
+ throw new _errors.UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.');
+ }
+
+ if (urlTokens.protocol !== 'http:') {
+ throw new _errors.UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:".');
+ }
+
+ let port = 80;
+
+ if (urlTokens.port) {
+ port = Number.parseInt(urlTokens.port, 10);
+ }
+
+ return {
+ authorization: urlTokens.auth || null,
+ hostname: urlTokens.hostname,
+ port
+ };
+};
+
+var _default = parseProxyUrl;
+exports.default = _default;
+//# sourceMappingURL=parseProxyUrl.js.map \ No newline at end of file
diff --git a/node_modules/global-agent/dist/utilities/parseProxyUrl.js.flow b/node_modules/global-agent/dist/utilities/parseProxyUrl.js.flow
new file mode 100644
index 0000000..e2e9a6b
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/parseProxyUrl.js.flow
@@ -0,0 +1,36 @@
+// @flow
+
+import {
+ parse as parseUrl,
+} from 'url';
+import {
+ UnexpectedStateError,
+} from '../errors';
+
+export default (url: string) => {
+ const urlTokens = parseUrl(url);
+
+ if (urlTokens.query !== null) {
+ throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.');
+ }
+
+ if (urlTokens.hash !== null) {
+ throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.');
+ }
+
+ if (urlTokens.protocol !== 'http:') {
+ throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:".');
+ }
+
+ let port = 80;
+
+ if (urlTokens.port) {
+ port = Number.parseInt(urlTokens.port, 10);
+ }
+
+ return {
+ authorization: urlTokens.auth || null,
+ hostname: urlTokens.hostname,
+ port,
+ };
+};
diff --git a/node_modules/global-agent/dist/utilities/parseProxyUrl.js.map b/node_modules/global-agent/dist/utilities/parseProxyUrl.js.map
new file mode 100644
index 0000000..4457f10
--- /dev/null
+++ b/node_modules/global-agent/dist/utilities/parseProxyUrl.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/utilities/parseProxyUrl.js"],"names":["url","urlTokens","query","UnexpectedStateError","hash","protocol","port","Number","parseInt","authorization","auth","hostname"],"mappings":";;;;;;;AAEA;;AAGA;;sBAIgBA,G,IAAgB;AAC9B,QAAMC,SAAS,GAAG,gBAASD,GAAT,CAAlB;;AAEA,MAAIC,SAAS,CAACC,KAAV,KAAoB,IAAxB,EAA8B;AAC5B,UAAM,IAAIC,4BAAJ,CAAyB,qFAAzB,CAAN;AACD;;AAED,MAAIF,SAAS,CAACG,IAAV,KAAmB,IAAvB,EAA6B;AAC3B,UAAM,IAAID,4BAAJ,CAAyB,oFAAzB,CAAN;AACD;;AAED,MAAIF,SAAS,CAACI,QAAV,KAAuB,OAA3B,EAAoC;AAClC,UAAM,IAAIF,4BAAJ,CAAyB,0FAAzB,CAAN;AACD;;AAED,MAAIG,IAAI,GAAG,EAAX;;AAEA,MAAIL,SAAS,CAACK,IAAd,EAAoB;AAClBA,IAAAA,IAAI,GAAGC,MAAM,CAACC,QAAP,CAAgBP,SAAS,CAACK,IAA1B,EAAgC,EAAhC,CAAP;AACD;;AAED,SAAO;AACLG,IAAAA,aAAa,EAAER,SAAS,CAACS,IAAV,IAAkB,IAD5B;AAELC,IAAAA,QAAQ,EAAEV,SAAS,CAACU,QAFf;AAGLL,IAAAA;AAHK,GAAP;AAKD,C","sourcesContent":["// @flow\n\nimport {\n parse as parseUrl,\n} from 'url';\nimport {\n UnexpectedStateError,\n} from '../errors';\n\nexport default (url: string) => {\n const urlTokens = parseUrl(url);\n\n if (urlTokens.query !== null) {\n throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.');\n }\n\n if (urlTokens.hash !== null) {\n throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.');\n }\n\n if (urlTokens.protocol !== 'http:') {\n throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be \"http:\".');\n }\n\n let port = 80;\n\n if (urlTokens.port) {\n port = Number.parseInt(urlTokens.port, 10);\n }\n\n return {\n authorization: urlTokens.auth || null,\n hostname: urlTokens.hostname,\n port,\n };\n};\n"],"file":"parseProxyUrl.js"} \ No newline at end of file
diff --git a/node_modules/global-agent/node_modules/.bin/semver b/node_modules/global-agent/node_modules/.bin/semver
new file mode 120000
index 0000000..5aaadf4
--- /dev/null
+++ b/node_modules/global-agent/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver.js \ No newline at end of file
diff --git a/node_modules/global-agent/node_modules/semver/LICENSE b/node_modules/global-agent/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/global-agent/node_modules/semver/README.md b/node_modules/global-agent/node_modules/semver/README.md
new file mode 100644
index 0000000..df54e7a
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/README.md
@@ -0,0 +1,568 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+You can also just load the module for the function that you care about, if
+you'd like to minimize your footprint.
+
+```js
+// load the whole API at once in a single object
+const semver = require('semver')
+
+// or just load the bits you need
+// all of them listed here, just pick and choose what you want
+
+// classes
+const SemVer = require('semver/classes/semver')
+const Comparator = require('semver/classes/comparator')
+const Range = require('semver/classes/range')
+
+// functions for working with versions
+const semverParse = require('semver/functions/parse')
+const semverValid = require('semver/functions/valid')
+const semverClean = require('semver/functions/clean')
+const semverInc = require('semver/functions/inc')
+const semverDiff = require('semver/functions/diff')
+const semverMajor = require('semver/functions/major')
+const semverMinor = require('semver/functions/minor')
+const semverPatch = require('semver/functions/patch')
+const semverPrerelease = require('semver/functions/prerelease')
+const semverCompare = require('semver/functions/compare')
+const semverRcompare = require('semver/functions/rcompare')
+const semverCompareLoose = require('semver/functions/compare-loose')
+const semverCompareBuild = require('semver/functions/compare-build')
+const semverSort = require('semver/functions/sort')
+const semverRsort = require('semver/functions/rsort')
+
+// low-level comparators between versions
+const semverGt = require('semver/functions/gt')
+const semverLt = require('semver/functions/lt')
+const semverEq = require('semver/functions/eq')
+const semverNeq = require('semver/functions/neq')
+const semverGte = require('semver/functions/gte')
+const semverLte = require('semver/functions/lte')
+const semverCmp = require('semver/functions/cmp')
+const semverCoerce = require('semver/functions/coerce')
+
+// working with ranges
+const semverSatisfies = require('semver/functions/satisfies')
+const semverMaxSatisfying = require('semver/ranges/max-satisfying')
+const semverMinSatisfying = require('semver/ranges/min-satisfying')
+const semverToComparators = require('semver/ranges/to-comparators')
+const semverMinVersion = require('semver/ranges/min-version')
+const semverValidRange = require('semver/ranges/valid')
+const semverOutside = require('semver/ranges/outside')
+const semverGtr = require('semver/ranges/gtr')
+const semverLtr = require('semver/ranges/ltr')
+const semverIntersects = require('semver/ranges/intersects')
+const simplifyRange = require('semver/ranges/simplify')
+const rangeSubset = require('semver/ranges/subset')
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless
+ `includePrerelease` is specified, in which case any version at all
+ satisfies)
+* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero element in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0-0`
+* `^0.2.3` := `>=0.2.3 <0.3.0-0`
+* `^0.0.3` := `>=0.0.3 <0.0.4-0`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0-0`
+* `^0.0.x` := `>=0.0.0 <0.1.0-0`
+* `^0.0` := `>=0.0.0 <0.1.0-0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0-0`
+* `^0.x` := `>=0.0.0 <1.0.0-0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
+ are equal. Sorts in ascending order if passed to `Array.sort()`.
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+* `simplifyRange(versions, range)`: Return a "simplified" range that
+ matches the same items in `versions` list as the range specified. Note
+ that it does *not* guarantee that it would match the same versions in all
+ cases, only for the set of versions provided. This is useful when
+ generating ranges by joining together multiple versions with `||`
+ programmatically, to provide the user with something a bit more
+ ergonomic. If the provided range is shorter in string-length than the
+ generated range, then that is returned.
+* `subset(subRange, superRange)`: Return `true` if the `subRange` range is
+ entirely contained by the `superRange` range.
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version, options)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
+
+If the `options.rtl` flag is set, then `coerce` will return the right-most
+coercible tuple that does not share an ending index with a longer coercible
+tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
+`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
+any other overlapping SemVer tuple.
+
+### Clean
+
+* `clean(version)`: Clean a string to be a valid semver if possible
+
+This will return a cleaned and trimmed semver version. If the provided
+version is not valid a null will be returned. This does not work for
+ranges.
+
+ex.
+* `s.clean(' = v 2.1.5foo')`: `null`
+* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean(' = v 2.1.5-foo')`: `null`
+* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean('=v2.1.5')`: `'2.1.5'`
+* `s.clean(' =v2.1.5')`: `2.1.5`
+* `s.clean(' 2.1.5 ')`: `'2.1.5'`
+* `s.clean('~1.0.0')`: `null`
+
+## Exported Modules
+
+<!--
+TODO: Make sure that all of these items are documented (classes aren't,
+eg), and then pull the module name into the documentation for that specific
+thing.
+-->
+
+You may pull in just the part of this semver utility that you need, if you
+are sensitive to packing and tree-shaking concerns. The main
+`require('semver')` export uses getter functions to lazily load the parts
+of the API that are used.
+
+The following modules are available:
+
+* `require('semver')`
+* `require('semver/classes')`
+* `require('semver/classes/comparator')`
+* `require('semver/classes/range')`
+* `require('semver/classes/semver')`
+* `require('semver/functions/clean')`
+* `require('semver/functions/cmp')`
+* `require('semver/functions/coerce')`
+* `require('semver/functions/compare')`
+* `require('semver/functions/compare-build')`
+* `require('semver/functions/compare-loose')`
+* `require('semver/functions/diff')`
+* `require('semver/functions/eq')`
+* `require('semver/functions/gt')`
+* `require('semver/functions/gte')`
+* `require('semver/functions/inc')`
+* `require('semver/functions/lt')`
+* `require('semver/functions/lte')`
+* `require('semver/functions/major')`
+* `require('semver/functions/minor')`
+* `require('semver/functions/neq')`
+* `require('semver/functions/parse')`
+* `require('semver/functions/patch')`
+* `require('semver/functions/prerelease')`
+* `require('semver/functions/rcompare')`
+* `require('semver/functions/rsort')`
+* `require('semver/functions/satisfies')`
+* `require('semver/functions/sort')`
+* `require('semver/functions/valid')`
+* `require('semver/ranges/gtr')`
+* `require('semver/ranges/intersects')`
+* `require('semver/ranges/ltr')`
+* `require('semver/ranges/max-satisfying')`
+* `require('semver/ranges/min-satisfying')`
+* `require('semver/ranges/min-version')`
+* `require('semver/ranges/outside')`
+* `require('semver/ranges/to-comparators')`
+* `require('semver/ranges/valid')`
diff --git a/node_modules/global-agent/node_modules/semver/bin/semver.js b/node_modules/global-agent/node_modules/semver/bin/semver.js
new file mode 100755
index 0000000..8d1b557
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/bin/semver.js
@@ -0,0 +1,183 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+const argv = process.argv.slice(2)
+
+let versions = []
+
+const range = []
+
+let inc = null
+
+const version = require('../package.json').version
+
+let loose = false
+
+let includePrerelease = false
+
+let coerce = false
+
+let rtl = false
+
+let identifier
+
+const semver = require('../')
+
+let reverse = false
+
+let options = {}
+
+const main = () => {
+ if (!argv.length) {
+ return help()
+ }
+ while (argv.length) {
+ let a = argv.shift()
+ const indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ const value = a.slice(indexOfEqualSign + 1)
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(value)
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '--rtl':
+ rtl = true
+ break
+ case '--ltr':
+ rtl = false
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
+
+ versions = versions.map((v) => {
+ return coerce ? (semver.coerce(v, options) || { version: v }).version : v
+ }).filter((v) => {
+ return semver.valid(v)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ if (inc && (versions.length !== 1 || range.length)) {
+ return failInc()
+ }
+
+ for (let i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter((v) => {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ }
+ return success(versions)
+}
+
+const failInc = () => {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+const fail = () => process.exit(1)
+
+const success = () => {
+ const compare = reverse ? 'rcompare' : 'compare'
+ versions.sort((a, b) => {
+ return semver[compare](a, b, options)
+ }).map((v) => {
+ return semver.clean(v, options)
+ }).map((v) => {
+ return inc ? semver.inc(v, inc, options, identifier) : v
+ }).forEach((v, i, _) => {
+ console.log(v)
+ })
+}
+
+const help = () => console.log(
+`SemVer ${version}
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.`)
+
+main()
diff --git a/node_modules/global-agent/node_modules/semver/classes/comparator.js b/node_modules/global-agent/node_modules/semver/classes/comparator.js
new file mode 100644
index 0000000..62cd204
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/classes/comparator.js
@@ -0,0 +1,136 @@
+const ANY = Symbol('SemVer ANY')
+// hoisted class for cyclic dependency
+class Comparator {
+ static get ANY () {
+ return ANY
+ }
+
+ constructor (comp, options) {
+ options = parseOptions(options)
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+ }
+
+ parse (comp) {
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ const m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError(`Invalid comparator: ${comp}`)
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : ''
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+ }
+
+ toString () {
+ return this.value
+ }
+
+ test (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY || version === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+ }
+
+ intersects (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false,
+ }
+ }
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true
+ }
+ return new Range(comp.value, options).test(this.value)
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true
+ }
+ return new Range(this.value, options).test(comp.semver)
+ }
+
+ const sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>')
+ const sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ const sameSemVer = this.semver.version === comp.semver.version
+ const differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=')
+ const oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, options) &&
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ const oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, options) &&
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>')
+
+ return (
+ sameDirectionIncreasing ||
+ sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan ||
+ oppositeDirectionsGreaterThan
+ )
+ }
+}
+
+module.exports = Comparator
+
+const parseOptions = require('../internal/parse-options')
+const { re, t } = require('../internal/re')
+const cmp = require('../functions/cmp')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const Range = require('./range')
diff --git a/node_modules/global-agent/node_modules/semver/classes/index.js b/node_modules/global-agent/node_modules/semver/classes/index.js
new file mode 100644
index 0000000..5e3f5c9
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/classes/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ SemVer: require('./semver.js'),
+ Range: require('./range.js'),
+ Comparator: require('./comparator.js'),
+}
diff --git a/node_modules/global-agent/node_modules/semver/classes/range.js b/node_modules/global-agent/node_modules/semver/classes/range.js
new file mode 100644
index 0000000..7dc24bc
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/classes/range.js
@@ -0,0 +1,519 @@
+// hoisted class for cyclic dependency
+class Range {
+ constructor (range, options) {
+ options = parseOptions(options)
+
+ if (range instanceof Range) {
+ if (
+ range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease
+ ) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ // just put it in the set and return
+ this.raw = range.value
+ this.set = [[range]]
+ this.format()
+ return this
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First, split based on boolean or ||
+ this.raw = range
+ this.set = range
+ .split('||')
+ // map the range to a 2d array of comparators
+ .map(r => this.parseRange(r.trim()))
+ // throw out any comparator lists that are empty
+ // this generally means that it was not a valid range, which is allowed
+ // in loose mode, but will still throw if the WHOLE range is invalid.
+ .filter(c => c.length)
+
+ if (!this.set.length) {
+ throw new TypeError(`Invalid SemVer Range: ${range}`)
+ }
+
+ // if we have any that are not the null set, throw out null sets.
+ if (this.set.length > 1) {
+ // keep the first one, in case they're all null sets
+ const first = this.set[0]
+ this.set = this.set.filter(c => !isNullSet(c[0]))
+ if (this.set.length === 0) {
+ this.set = [first]
+ } else if (this.set.length > 1) {
+ // if we have any that are *, then the range is just *
+ for (const c of this.set) {
+ if (c.length === 1 && isAny(c[0])) {
+ this.set = [c]
+ break
+ }
+ }
+ }
+ }
+
+ this.format()
+ }
+
+ format () {
+ this.range = this.set
+ .map((comps) => {
+ return comps.join(' ').trim()
+ })
+ .join('||')
+ .trim()
+ return this.range
+ }
+
+ toString () {
+ return this.range
+ }
+
+ parseRange (range) {
+ range = range.trim()
+
+ // memoize range parsing for performance.
+ // this is a very hot path, and fully deterministic.
+ const memoOpts = Object.keys(this.options).join(',')
+ const memoKey = `parseRange:${memoOpts}:${range}`
+ const cached = cache.get(memoKey)
+ if (cached) {
+ return cached
+ }
+
+ const loose = this.options.loose
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
+ debug('hyphen replace', range)
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range)
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ')
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ let rangeList = range
+ .split(' ')
+ .map(comp => parseComparator(comp, this.options))
+ .join(' ')
+ .split(/\s+/)
+ // >=0.0.0 is equivalent to *
+ .map(comp => replaceGTE0(comp, this.options))
+
+ if (loose) {
+ // in loose mode, throw out any that are not valid comparators
+ rangeList = rangeList.filter(comp => {
+ debug('loose invalid filter', comp, this.options)
+ return !!comp.match(re[t.COMPARATORLOOSE])
+ })
+ }
+ debug('range list', rangeList)
+
+ // if any comparators are the null set, then replace with JUST null set
+ // if more than one comparator, remove any * comparators
+ // also, don't include the same comparator more than once
+ const rangeMap = new Map()
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
+ for (const comp of comparators) {
+ if (isNullSet(comp)) {
+ return [comp]
+ }
+ rangeMap.set(comp.value, comp)
+ }
+ if (rangeMap.size > 1 && rangeMap.has('')) {
+ rangeMap.delete('')
+ }
+
+ const result = [...rangeMap.values()]
+ cache.set(memoKey, result)
+ return result
+ }
+
+ intersects (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some((thisComparators) => {
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some((rangeComparators) => {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every((thisComparator) => {
+ return rangeComparators.every((rangeComparator) => {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
+ })
+ )
+ })
+ }
+
+ // if ANY of the sets match ALL of its comparators, then pass
+ test (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ for (let i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+ }
+}
+module.exports = Range
+
+const LRU = require('lru-cache')
+const cache = new LRU({ max: 1000 })
+
+const parseOptions = require('../internal/parse-options')
+const Comparator = require('./comparator')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const {
+ re,
+ t,
+ comparatorTrimReplace,
+ tildeTrimReplace,
+ caretTrimReplace,
+} = require('../internal/re')
+
+const isNullSet = c => c.value === '<0.0.0-0'
+const isAny = c => c.value === ''
+
+// take a set of comparators and determine whether there
+// exists a version which can satisfy it
+const isSatisfiable = (comparators, options) => {
+ let result = true
+ const remainingComparators = comparators.slice()
+ let testComparator = remainingComparators.pop()
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every((otherComparator) => {
+ return testComparator.intersects(otherComparator, options)
+ })
+
+ testComparator = remainingComparators.pop()
+ }
+
+ return result
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+const parseComparator = (comp, options) => {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
+const replaceTildes = (comp, options) =>
+ comp.trim().split(/\s+/).map((c) => {
+ return replaceTilde(c, options)
+ }).join(' ')
+
+const replaceTilde = (comp, options) => {
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('tilde', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0-0
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
+ ret = `>=${M}.${m}.${p
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
+// ^1.2.3 --> >=1.2.3 <2.0.0-0
+// ^1.2.0 --> >=1.2.0 <2.0.0-0
+const replaceCarets = (comp, options) =>
+ comp.trim().split(/\s+/).map((c) => {
+ return replaceCaret(c, options)
+ }).join(' ')
+
+const replaceCaret = (comp, options) => {
+ debug('caret', comp, options)
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
+ const z = options.includePrerelease ? '-0' : ''
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('caret', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
+ } else {
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${+M + 1}.0.0-0`
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p
+ } <${+M + 1}.0.0-0`
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+const replaceXRanges = (comp, options) => {
+ debug('replaceXRanges', comp, options)
+ return comp.split(/\s+/).map((c) => {
+ return replaceXRange(c, options)
+ }).join(' ')
+}
+
+const replaceXRange = (comp, options) => {
+ comp = comp.trim()
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ const xM = isX(M)
+ const xm = xM || isX(m)
+ const xp = xm || isX(p)
+ const anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+ pr = options.includePrerelease ? '-0' : ''
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ if (gtlt === '<') {
+ pr = '-0'
+ }
+
+ ret = `${gtlt + M}.${m}.${p}${pr}`
+ } else if (xm) {
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
+ } else if (xp) {
+ ret = `>=${M}.${m}.0${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+const replaceStars = (comp, options) => {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[t.STAR], '')
+}
+
+const replaceGTE0 = (comp, options) => {
+ debug('replaceGTE0', comp, options)
+ return comp.trim()
+ .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
+}
+
+// This function is passed to string.replace(re[t.HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
+const hyphenReplace = incPr => ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) => {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`
+ } else if (isX(fp)) {
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
+ } else if (fpr) {
+ from = `>=${from}`
+ } else {
+ from = `>=${from}${incPr ? '-0' : ''}`
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = `<${+tM + 1}.0.0-0`
+ } else if (isX(tp)) {
+ to = `<${tM}.${+tm + 1}.0-0`
+ } else if (tpr) {
+ to = `<=${tM}.${tm}.${tp}-${tpr}`
+ } else if (incPr) {
+ to = `<${tM}.${tm}.${+tp + 1}-0`
+ } else {
+ to = `<=${to}`
+ }
+
+ return (`${from} ${to}`).trim()
+}
+
+const testSet = (set, version, options) => {
+ for (let i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (let i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === Comparator.ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ const allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
diff --git a/node_modules/global-agent/node_modules/semver/classes/semver.js b/node_modules/global-agent/node_modules/semver/classes/semver.js
new file mode 100644
index 0000000..af62955
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/classes/semver.js
@@ -0,0 +1,287 @@
+const debug = require('../internal/debug')
+const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
+const { re, t } = require('../internal/re')
+
+const parseOptions = require('../internal/parse-options')
+const { compareIdentifiers } = require('../internal/identifiers')
+class SemVer {
+ constructor (version, options) {
+ options = parseOptions(options)
+
+ if (version instanceof SemVer) {
+ if (version.loose === !!options.loose &&
+ version.includePrerelease === !!options.includePrerelease) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError(`Invalid Version: ${version}`)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError(
+ `version is longer than ${MAX_LENGTH} characters`
+ )
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+ // this isn't actually relevant for versions, but keep it so that we
+ // don't run into trouble passing this.options around.
+ this.includePrerelease = !!options.includePrerelease
+
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
+
+ if (!m) {
+ throw new TypeError(`Invalid Version: ${version}`)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map((id) => {
+ if (/^[0-9]+$/.test(id)) {
+ const num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+ }
+
+ format () {
+ this.version = `${this.major}.${this.minor}.${this.patch}`
+ if (this.prerelease.length) {
+ this.version += `-${this.prerelease.join('.')}`
+ }
+ return this.version
+ }
+
+ toString () {
+ return this.version
+ }
+
+ compare (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ if (typeof other === 'string' && other === this.version) {
+ return 0
+ }
+ other = new SemVer(other, this.options)
+ }
+
+ if (other.version === this.version) {
+ return 0
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+ }
+
+ compareMain (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return (
+ compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+ )
+ }
+
+ comparePre (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ let i = 0
+ do {
+ const a = this.prerelease[i]
+ const b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ compareBuild (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ let i = 0
+ do {
+ const a = this.build[i]
+ const b = other.build[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ // preminor will bump the version up to the next minor release, and immediately
+ // down to pre-release. premajor and prepatch work the same way.
+ inc (release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier)
+ this.inc('pre', identifier)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier)
+ }
+ this.inc('pre', identifier)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (
+ this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0
+ ) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0]
+ } else {
+ let i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ this.prerelease.push(0)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0]
+ }
+ } else {
+ this.prerelease = [identifier, 0]
+ }
+ }
+ break
+
+ default:
+ throw new Error(`invalid increment argument: ${release}`)
+ }
+ this.format()
+ this.raw = this.version
+ return this
+ }
+}
+
+module.exports = SemVer
diff --git a/node_modules/global-agent/node_modules/semver/functions/clean.js b/node_modules/global-agent/node_modules/semver/functions/clean.js
new file mode 100644
index 0000000..811fe6b
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/clean.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const clean = (version, options) => {
+ const s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+module.exports = clean
diff --git a/node_modules/global-agent/node_modules/semver/functions/cmp.js b/node_modules/global-agent/node_modules/semver/functions/cmp.js
new file mode 100644
index 0000000..4011909
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/cmp.js
@@ -0,0 +1,52 @@
+const eq = require('./eq')
+const neq = require('./neq')
+const gt = require('./gt')
+const gte = require('./gte')
+const lt = require('./lt')
+const lte = require('./lte')
+
+const cmp = (a, op, b, loose) => {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError(`Invalid operator: ${op}`)
+ }
+}
+module.exports = cmp
diff --git a/node_modules/global-agent/node_modules/semver/functions/coerce.js b/node_modules/global-agent/node_modules/semver/functions/coerce.js
new file mode 100644
index 0000000..2e01452
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/coerce.js
@@ -0,0 +1,52 @@
+const SemVer = require('../classes/semver')
+const parse = require('./parse')
+const { re, t } = require('../internal/re')
+
+const coerce = (version, options) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version === 'number') {
+ version = String(version)
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ options = options || {}
+
+ let match = null
+ if (!options.rtl) {
+ match = version.match(re[t.COERCE])
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ let next
+ while ((next = re[t.COERCERTL].exec(version)) &&
+ (!match || match.index + match[0].length !== version.length)
+ ) {
+ if (!match ||
+ next.index + next[0].length !== match.index + match[0].length) {
+ match = next
+ }
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
+ }
+ // leave it in a clean state
+ re[t.COERCERTL].lastIndex = -1
+ }
+
+ if (match === null) {
+ return null
+ }
+
+ return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
+}
+module.exports = coerce
diff --git a/node_modules/global-agent/node_modules/semver/functions/compare-build.js b/node_modules/global-agent/node_modules/semver/functions/compare-build.js
new file mode 100644
index 0000000..9eb881b
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/compare-build.js
@@ -0,0 +1,7 @@
+const SemVer = require('../classes/semver')
+const compareBuild = (a, b, loose) => {
+ const versionA = new SemVer(a, loose)
+ const versionB = new SemVer(b, loose)
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
+}
+module.exports = compareBuild
diff --git a/node_modules/global-agent/node_modules/semver/functions/compare-loose.js b/node_modules/global-agent/node_modules/semver/functions/compare-loose.js
new file mode 100644
index 0000000..4881fbe
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/compare-loose.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const compareLoose = (a, b) => compare(a, b, true)
+module.exports = compareLoose
diff --git a/node_modules/global-agent/node_modules/semver/functions/compare.js b/node_modules/global-agent/node_modules/semver/functions/compare.js
new file mode 100644
index 0000000..748b7af
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/compare.js
@@ -0,0 +1,5 @@
+const SemVer = require('../classes/semver')
+const compare = (a, b, loose) =>
+ new SemVer(a, loose).compare(new SemVer(b, loose))
+
+module.exports = compare
diff --git a/node_modules/global-agent/node_modules/semver/functions/diff.js b/node_modules/global-agent/node_modules/semver/functions/diff.js
new file mode 100644
index 0000000..87200ef
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/diff.js
@@ -0,0 +1,23 @@
+const parse = require('./parse')
+const eq = require('./eq')
+
+const diff = (version1, version2) => {
+ if (eq(version1, version2)) {
+ return null
+ } else {
+ const v1 = parse(version1)
+ const v2 = parse(version2)
+ const hasPre = v1.prerelease.length || v2.prerelease.length
+ const prefix = hasPre ? 'pre' : ''
+ const defaultResult = hasPre ? 'prerelease' : ''
+ for (const key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return prefix + key
+ }
+ }
+ }
+ return defaultResult // may be undefined
+ }
+}
+module.exports = diff
diff --git a/node_modules/global-agent/node_modules/semver/functions/eq.js b/node_modules/global-agent/node_modules/semver/functions/eq.js
new file mode 100644
index 0000000..271fed9
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/eq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const eq = (a, b, loose) => compare(a, b, loose) === 0
+module.exports = eq
diff --git a/node_modules/global-agent/node_modules/semver/functions/gt.js b/node_modules/global-agent/node_modules/semver/functions/gt.js
new file mode 100644
index 0000000..d9b2156
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/gt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gt = (a, b, loose) => compare(a, b, loose) > 0
+module.exports = gt
diff --git a/node_modules/global-agent/node_modules/semver/functions/gte.js b/node_modules/global-agent/node_modules/semver/functions/gte.js
new file mode 100644
index 0000000..5aeaa63
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/gte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gte = (a, b, loose) => compare(a, b, loose) >= 0
+module.exports = gte
diff --git a/node_modules/global-agent/node_modules/semver/functions/inc.js b/node_modules/global-agent/node_modules/semver/functions/inc.js
new file mode 100644
index 0000000..62d1da2
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/inc.js
@@ -0,0 +1,18 @@
+const SemVer = require('../classes/semver')
+
+const inc = (version, release, options, identifier) => {
+ if (typeof (options) === 'string') {
+ identifier = options
+ options = undefined
+ }
+
+ try {
+ return new SemVer(
+ version instanceof SemVer ? version.version : version,
+ options
+ ).inc(release, identifier).version
+ } catch (er) {
+ return null
+ }
+}
+module.exports = inc
diff --git a/node_modules/global-agent/node_modules/semver/functions/lt.js b/node_modules/global-agent/node_modules/semver/functions/lt.js
new file mode 100644
index 0000000..b440ab7
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/lt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lt = (a, b, loose) => compare(a, b, loose) < 0
+module.exports = lt
diff --git a/node_modules/global-agent/node_modules/semver/functions/lte.js b/node_modules/global-agent/node_modules/semver/functions/lte.js
new file mode 100644
index 0000000..6dcc956
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/lte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lte = (a, b, loose) => compare(a, b, loose) <= 0
+module.exports = lte
diff --git a/node_modules/global-agent/node_modules/semver/functions/major.js b/node_modules/global-agent/node_modules/semver/functions/major.js
new file mode 100644
index 0000000..4283165
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/major.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const major = (a, loose) => new SemVer(a, loose).major
+module.exports = major
diff --git a/node_modules/global-agent/node_modules/semver/functions/minor.js b/node_modules/global-agent/node_modules/semver/functions/minor.js
new file mode 100644
index 0000000..57b3455
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/minor.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const minor = (a, loose) => new SemVer(a, loose).minor
+module.exports = minor
diff --git a/node_modules/global-agent/node_modules/semver/functions/neq.js b/node_modules/global-agent/node_modules/semver/functions/neq.js
new file mode 100644
index 0000000..f944c01
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/neq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const neq = (a, b, loose) => compare(a, b, loose) !== 0
+module.exports = neq
diff --git a/node_modules/global-agent/node_modules/semver/functions/parse.js b/node_modules/global-agent/node_modules/semver/functions/parse.js
new file mode 100644
index 0000000..a66663a
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/parse.js
@@ -0,0 +1,33 @@
+const { MAX_LENGTH } = require('../internal/constants')
+const { re, t } = require('../internal/re')
+const SemVer = require('../classes/semver')
+
+const parseOptions = require('../internal/parse-options')
+const parse = (version, options) => {
+ options = parseOptions(options)
+
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ if (version.length > MAX_LENGTH) {
+ return null
+ }
+
+ const r = options.loose ? re[t.LOOSE] : re[t.FULL]
+ if (!r.test(version)) {
+ return null
+ }
+
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ return null
+ }
+}
+
+module.exports = parse
diff --git a/node_modules/global-agent/node_modules/semver/functions/patch.js b/node_modules/global-agent/node_modules/semver/functions/patch.js
new file mode 100644
index 0000000..63afca2
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/patch.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const patch = (a, loose) => new SemVer(a, loose).patch
+module.exports = patch
diff --git a/node_modules/global-agent/node_modules/semver/functions/prerelease.js b/node_modules/global-agent/node_modules/semver/functions/prerelease.js
new file mode 100644
index 0000000..06aa132
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/prerelease.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const prerelease = (version, options) => {
+ const parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+module.exports = prerelease
diff --git a/node_modules/global-agent/node_modules/semver/functions/rcompare.js b/node_modules/global-agent/node_modules/semver/functions/rcompare.js
new file mode 100644
index 0000000..0ac509e
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/rcompare.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const rcompare = (a, b, loose) => compare(b, a, loose)
+module.exports = rcompare
diff --git a/node_modules/global-agent/node_modules/semver/functions/rsort.js b/node_modules/global-agent/node_modules/semver/functions/rsort.js
new file mode 100644
index 0000000..82404c5
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/rsort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
+module.exports = rsort
diff --git a/node_modules/global-agent/node_modules/semver/functions/satisfies.js b/node_modules/global-agent/node_modules/semver/functions/satisfies.js
new file mode 100644
index 0000000..50af1c1
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/satisfies.js
@@ -0,0 +1,10 @@
+const Range = require('../classes/range')
+const satisfies = (version, range, options) => {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+module.exports = satisfies
diff --git a/node_modules/global-agent/node_modules/semver/functions/sort.js b/node_modules/global-agent/node_modules/semver/functions/sort.js
new file mode 100644
index 0000000..4d10917
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/sort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
+module.exports = sort
diff --git a/node_modules/global-agent/node_modules/semver/functions/valid.js b/node_modules/global-agent/node_modules/semver/functions/valid.js
new file mode 100644
index 0000000..f27bae1
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/functions/valid.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const valid = (version, options) => {
+ const v = parse(version, options)
+ return v ? v.version : null
+}
+module.exports = valid
diff --git a/node_modules/global-agent/node_modules/semver/index.js b/node_modules/global-agent/node_modules/semver/index.js
new file mode 100644
index 0000000..57e2ae6
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/index.js
@@ -0,0 +1,48 @@
+// just pre-load all the stuff that index.js lazily exports
+const internalRe = require('./internal/re')
+module.exports = {
+ re: internalRe.re,
+ src: internalRe.src,
+ tokens: internalRe.t,
+ SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION,
+ SemVer: require('./classes/semver'),
+ compareIdentifiers: require('./internal/identifiers').compareIdentifiers,
+ rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers,
+ parse: require('./functions/parse'),
+ valid: require('./functions/valid'),
+ clean: require('./functions/clean'),
+ inc: require('./functions/inc'),
+ diff: require('./functions/diff'),
+ major: require('./functions/major'),
+ minor: require('./functions/minor'),
+ patch: require('./functions/patch'),
+ prerelease: require('./functions/prerelease'),
+ compare: require('./functions/compare'),
+ rcompare: require('./functions/rcompare'),
+ compareLoose: require('./functions/compare-loose'),
+ compareBuild: require('./functions/compare-build'),
+ sort: require('./functions/sort'),
+ rsort: require('./functions/rsort'),
+ gt: require('./functions/gt'),
+ lt: require('./functions/lt'),
+ eq: require('./functions/eq'),
+ neq: require('./functions/neq'),
+ gte: require('./functions/gte'),
+ lte: require('./functions/lte'),
+ cmp: require('./functions/cmp'),
+ coerce: require('./functions/coerce'),
+ Comparator: require('./classes/comparator'),
+ Range: require('./classes/range'),
+ satisfies: require('./functions/satisfies'),
+ toComparators: require('./ranges/to-comparators'),
+ maxSatisfying: require('./ranges/max-satisfying'),
+ minSatisfying: require('./ranges/min-satisfying'),
+ minVersion: require('./ranges/min-version'),
+ validRange: require('./ranges/valid'),
+ outside: require('./ranges/outside'),
+ gtr: require('./ranges/gtr'),
+ ltr: require('./ranges/ltr'),
+ intersects: require('./ranges/intersects'),
+ simplifyRange: require('./ranges/simplify'),
+ subset: require('./ranges/subset'),
+}
diff --git a/node_modules/global-agent/node_modules/semver/internal/constants.js b/node_modules/global-agent/node_modules/semver/internal/constants.js
new file mode 100644
index 0000000..4f0de59
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/internal/constants.js
@@ -0,0 +1,17 @@
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+const SEMVER_SPEC_VERSION = '2.0.0'
+
+const MAX_LENGTH = 256
+const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+/* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+const MAX_SAFE_COMPONENT_LENGTH = 16
+
+module.exports = {
+ SEMVER_SPEC_VERSION,
+ MAX_LENGTH,
+ MAX_SAFE_INTEGER,
+ MAX_SAFE_COMPONENT_LENGTH,
+}
diff --git a/node_modules/global-agent/node_modules/semver/internal/debug.js b/node_modules/global-agent/node_modules/semver/internal/debug.js
new file mode 100644
index 0000000..1c00e13
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/internal/debug.js
@@ -0,0 +1,9 @@
+const debug = (
+ typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)
+) ? (...args) => console.error('SEMVER', ...args)
+ : () => {}
+
+module.exports = debug
diff --git a/node_modules/global-agent/node_modules/semver/internal/identifiers.js b/node_modules/global-agent/node_modules/semver/internal/identifiers.js
new file mode 100644
index 0000000..e612d0a
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/internal/identifiers.js
@@ -0,0 +1,23 @@
+const numeric = /^[0-9]+$/
+const compareIdentifiers = (a, b) => {
+ const anum = numeric.test(a)
+ const bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
+
+module.exports = {
+ compareIdentifiers,
+ rcompareIdentifiers,
+}
diff --git a/node_modules/global-agent/node_modules/semver/internal/parse-options.js b/node_modules/global-agent/node_modules/semver/internal/parse-options.js
new file mode 100644
index 0000000..bbd9ec7
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/internal/parse-options.js
@@ -0,0 +1,11 @@
+// parse out just the options we care about so we always get a consistent
+// obj with keys in a consistent order.
+const opts = ['includePrerelease', 'loose', 'rtl']
+const parseOptions = options =>
+ !options ? {}
+ : typeof options !== 'object' ? { loose: true }
+ : opts.filter(k => options[k]).reduce((o, k) => {
+ o[k] = true
+ return o
+ }, {})
+module.exports = parseOptions
diff --git a/node_modules/global-agent/node_modules/semver/internal/re.js b/node_modules/global-agent/node_modules/semver/internal/re.js
new file mode 100644
index 0000000..ed88398
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/internal/re.js
@@ -0,0 +1,182 @@
+const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')
+const debug = require('./debug')
+exports = module.exports = {}
+
+// The actual regexps go on exports.re
+const re = exports.re = []
+const src = exports.src = []
+const t = exports.t = {}
+let R = 0
+
+const createToken = (name, value, isGlobal) => {
+ const index = R++
+ debug(name, index, value)
+ t[name] = index
+ src[index] = value
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
+}
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
+createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*')
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})`)
+
+createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
+}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
+
+createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
+}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
+}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
+}${src[t.PRERELEASE]}?${
+ src[t.BUILD]}?`)
+
+createToken('FULL', `^${src[t.FULLPLAIN]}$`)
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
+}${src[t.PRERELEASELOOSE]}?${
+ src[t.BUILD]}?`)
+
+createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
+
+createToken('GTLT', '((?:<|>)?=?)')
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
+createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
+
+createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:${src[t.PRERELEASE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:${src[t.PRERELEASELOOSE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
+createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+createToken('COERCE', `${'(^|[^\\d])' +
+ '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:$|[^\\d])`)
+createToken('COERCERTL', src[t.COERCE], true)
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+createToken('LONETILDE', '(?:~>?)')
+
+createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
+exports.tildeTrimReplace = '$1~'
+
+createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
+createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+createToken('LONECARET', '(?:\\^)')
+
+createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
+exports.caretTrimReplace = '$1^'
+
+createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
+createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
+createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
+}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
+exports.comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAIN]})` +
+ `\\s*$`)
+
+createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s*$`)
+
+// Star ranges basically just allow anything at all.
+createToken('STAR', '(<|>)?=?\\s*\\*')
+// >=0.0.0 is like a star
+createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
+createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
diff --git a/node_modules/global-agent/node_modules/semver/package.json b/node_modules/global-agent/node_modules/semver/package.json
new file mode 100644
index 0000000..7898f59
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "semver",
+ "version": "7.3.7",
+ "description": "The semantic version parser used by npm.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --follow-tags",
+ "lint": "eslint \"**/*.js\"",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run lint -- --fix",
+ "prepublishOnly": "git push origin --follow-tags",
+ "posttest": "npm run lint",
+ "template-oss-apply": "template-oss-apply --force"
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^3.0.1",
+ "@npmcli/template-oss": "3.3.2",
+ "tap": "^16.0.0"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "files": [
+ "bin/",
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "tap": {
+ "check-coverage": true,
+ "coverage-map": "map.js"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "3.3.2",
+ "engines": ">=10",
+ "ciVersions": [
+ "10.0.0",
+ "10.x",
+ "12.x",
+ "14.x",
+ "16.x"
+ ],
+ "distPaths": [
+ "bin/",
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ]
+ }
+}
diff --git a/node_modules/global-agent/node_modules/semver/preload.js b/node_modules/global-agent/node_modules/semver/preload.js
new file mode 100644
index 0000000..947cd4f
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/preload.js
@@ -0,0 +1,2 @@
+// XXX remove in v8 or beyond
+module.exports = require('./index.js')
diff --git a/node_modules/global-agent/node_modules/semver/range.bnf b/node_modules/global-agent/node_modules/semver/range.bnf
new file mode 100644
index 0000000..d4c6ae0
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/global-agent/node_modules/semver/ranges/gtr.js b/node_modules/global-agent/node_modules/semver/ranges/gtr.js
new file mode 100644
index 0000000..db7e355
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/gtr.js
@@ -0,0 +1,4 @@
+// Determine if version is greater than all the versions possible in the range.
+const outside = require('./outside')
+const gtr = (version, range, options) => outside(version, range, '>', options)
+module.exports = gtr
diff --git a/node_modules/global-agent/node_modules/semver/ranges/intersects.js b/node_modules/global-agent/node_modules/semver/ranges/intersects.js
new file mode 100644
index 0000000..3d1a6f3
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/intersects.js
@@ -0,0 +1,7 @@
+const Range = require('../classes/range')
+const intersects = (r1, r2, options) => {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2)
+}
+module.exports = intersects
diff --git a/node_modules/global-agent/node_modules/semver/ranges/ltr.js b/node_modules/global-agent/node_modules/semver/ranges/ltr.js
new file mode 100644
index 0000000..528a885
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/ltr.js
@@ -0,0 +1,4 @@
+const outside = require('./outside')
+// Determine if version is less than all the versions possible in the range
+const ltr = (version, range, options) => outside(version, range, '<', options)
+module.exports = ltr
diff --git a/node_modules/global-agent/node_modules/semver/ranges/max-satisfying.js b/node_modules/global-agent/node_modules/semver/ranges/max-satisfying.js
new file mode 100644
index 0000000..6e3d993
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/max-satisfying.js
@@ -0,0 +1,25 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+
+const maxSatisfying = (versions, range, options) => {
+ let max = null
+ let maxSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+module.exports = maxSatisfying
diff --git a/node_modules/global-agent/node_modules/semver/ranges/min-satisfying.js b/node_modules/global-agent/node_modules/semver/ranges/min-satisfying.js
new file mode 100644
index 0000000..9b60974
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/min-satisfying.js
@@ -0,0 +1,24 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const minSatisfying = (versions, range, options) => {
+ let min = null
+ let minSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+module.exports = minSatisfying
diff --git a/node_modules/global-agent/node_modules/semver/ranges/min-version.js b/node_modules/global-agent/node_modules/semver/ranges/min-version.js
new file mode 100644
index 0000000..350e1f7
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/min-version.js
@@ -0,0 +1,61 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const gt = require('../functions/gt')
+
+const minVersion = (range, loose) => {
+ range = new Range(range, loose)
+
+ let minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let setMin = null
+ comparators.forEach((comparator) => {
+ // Clone to avoid manipulating the comparator's semver object.
+ const compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!setMin || gt(compver, setMin)) {
+ setMin = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected operation: ${comparator.operator}`)
+ }
+ })
+ if (setMin && (!minver || gt(minver, setMin))) {
+ minver = setMin
+ }
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+module.exports = minVersion
diff --git a/node_modules/global-agent/node_modules/semver/ranges/outside.js b/node_modules/global-agent/node_modules/semver/ranges/outside.js
new file mode 100644
index 0000000..ae99b10
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/outside.js
@@ -0,0 +1,80 @@
+const SemVer = require('../classes/semver')
+const Comparator = require('../classes/comparator')
+const { ANY } = Comparator
+const Range = require('../classes/range')
+const satisfies = require('../functions/satisfies')
+const gt = require('../functions/gt')
+const lt = require('../functions/lt')
+const lte = require('../functions/lte')
+const gte = require('../functions/gte')
+
+const outside = (version, range, hilo, options) => {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ let gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisfies the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let high = null
+ let low = null
+
+ comparators.forEach((comparator) => {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+module.exports = outside
diff --git a/node_modules/global-agent/node_modules/semver/ranges/simplify.js b/node_modules/global-agent/node_modules/semver/ranges/simplify.js
new file mode 100644
index 0000000..618d5b6
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/simplify.js
@@ -0,0 +1,47 @@
+// given a set of versions and a range, create a "simplified" range
+// that includes the same versions that the original range does
+// If the original range is shorter than the simplified one, return that.
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+module.exports = (versions, range, options) => {
+ const set = []
+ let first = null
+ let prev = null
+ const v = versions.sort((a, b) => compare(a, b, options))
+ for (const version of v) {
+ const included = satisfies(version, range, options)
+ if (included) {
+ prev = version
+ if (!first) {
+ first = version
+ }
+ } else {
+ if (prev) {
+ set.push([first, prev])
+ }
+ prev = null
+ first = null
+ }
+ }
+ if (first) {
+ set.push([first, null])
+ }
+
+ const ranges = []
+ for (const [min, max] of set) {
+ if (min === max) {
+ ranges.push(min)
+ } else if (!max && min === v[0]) {
+ ranges.push('*')
+ } else if (!max) {
+ ranges.push(`>=${min}`)
+ } else if (min === v[0]) {
+ ranges.push(`<=${max}`)
+ } else {
+ ranges.push(`${min} - ${max}`)
+ }
+ }
+ const simplified = ranges.join(' || ')
+ const original = typeof range.raw === 'string' ? range.raw : String(range)
+ return simplified.length < original.length ? simplified : range
+}
diff --git a/node_modules/global-agent/node_modules/semver/ranges/subset.js b/node_modules/global-agent/node_modules/semver/ranges/subset.js
new file mode 100644
index 0000000..e0dea43
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/subset.js
@@ -0,0 +1,244 @@
+const Range = require('../classes/range.js')
+const Comparator = require('../classes/comparator.js')
+const { ANY } = Comparator
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+
+// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
+// - Every simple range `r1, r2, ...` is a null set, OR
+// - Every simple range `r1, r2, ...` which is not a null set is a subset of
+// some `R1, R2, ...`
+//
+// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
+// - If c is only the ANY comparator
+// - If C is only the ANY comparator, return true
+// - Else if in prerelease mode, return false
+// - else replace c with `[>=0.0.0]`
+// - If C is only the ANY comparator
+// - if in prerelease mode, return true
+// - else replace C with `[>=0.0.0]`
+// - Let EQ be the set of = comparators in c
+// - If EQ is more than one, return true (null set)
+// - Let GT be the highest > or >= comparator in c
+// - Let LT be the lowest < or <= comparator in c
+// - If GT and LT, and GT.semver > LT.semver, return true (null set)
+// - If any C is a = range, and GT or LT are set, return false
+// - If EQ
+// - If GT, and EQ does not satisfy GT, return true (null set)
+// - If LT, and EQ does not satisfy LT, return true (null set)
+// - If EQ satisfies every C, return true
+// - Else return false
+// - If GT
+// - If GT.semver is lower than any > or >= comp in C, return false
+// - If GT is >=, and GT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the GT.semver tuple, return false
+// - If LT
+// - If LT.semver is greater than any < or <= comp in C, return false
+// - If LT is <=, and LT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the LT.semver tuple, return false
+// - Else return true
+
+const subset = (sub, dom, options = {}) => {
+ if (sub === dom) {
+ return true
+ }
+
+ sub = new Range(sub, options)
+ dom = new Range(dom, options)
+ let sawNonNull = false
+
+ OUTER: for (const simpleSub of sub.set) {
+ for (const simpleDom of dom.set) {
+ const isSub = simpleSubset(simpleSub, simpleDom, options)
+ sawNonNull = sawNonNull || isSub !== null
+ if (isSub) {
+ continue OUTER
+ }
+ }
+ // the null set is a subset of everything, but null simple ranges in
+ // a complex range should be ignored. so if we saw a non-null range,
+ // then we know this isn't a subset, but if EVERY simple range was null,
+ // then it is a subset.
+ if (sawNonNull) {
+ return false
+ }
+ }
+ return true
+}
+
+const simpleSubset = (sub, dom, options) => {
+ if (sub === dom) {
+ return true
+ }
+
+ if (sub.length === 1 && sub[0].semver === ANY) {
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ return true
+ } else if (options.includePrerelease) {
+ sub = [new Comparator('>=0.0.0-0')]
+ } else {
+ sub = [new Comparator('>=0.0.0')]
+ }
+ }
+
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ if (options.includePrerelease) {
+ return true
+ } else {
+ dom = [new Comparator('>=0.0.0')]
+ }
+ }
+
+ const eqSet = new Set()
+ let gt, lt
+ for (const c of sub) {
+ if (c.operator === '>' || c.operator === '>=') {
+ gt = higherGT(gt, c, options)
+ } else if (c.operator === '<' || c.operator === '<=') {
+ lt = lowerLT(lt, c, options)
+ } else {
+ eqSet.add(c.semver)
+ }
+ }
+
+ if (eqSet.size > 1) {
+ return null
+ }
+
+ let gtltComp
+ if (gt && lt) {
+ gtltComp = compare(gt.semver, lt.semver, options)
+ if (gtltComp > 0) {
+ return null
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
+ return null
+ }
+ }
+
+ // will iterate one or zero times
+ for (const eq of eqSet) {
+ if (gt && !satisfies(eq, String(gt), options)) {
+ return null
+ }
+
+ if (lt && !satisfies(eq, String(lt), options)) {
+ return null
+ }
+
+ for (const c of dom) {
+ if (!satisfies(eq, String(c), options)) {
+ return false
+ }
+ }
+
+ return true
+ }
+
+ let higher, lower
+ let hasDomLT, hasDomGT
+ // if the subset has a prerelease, we need a comparator in the superset
+ // with the same tuple and a prerelease, or it's not a subset
+ let needDomLTPre = lt &&
+ !options.includePrerelease &&
+ lt.semver.prerelease.length ? lt.semver : false
+ let needDomGTPre = gt &&
+ !options.includePrerelease &&
+ gt.semver.prerelease.length ? gt.semver : false
+ // exception: <1.2.3-0 is the same as <1.2.3
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
+ lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
+ needDomLTPre = false
+ }
+
+ for (const c of dom) {
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
+ if (gt) {
+ if (needDomGTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomGTPre.major &&
+ c.semver.minor === needDomGTPre.minor &&
+ c.semver.patch === needDomGTPre.patch) {
+ needDomGTPre = false
+ }
+ }
+ if (c.operator === '>' || c.operator === '>=') {
+ higher = higherGT(gt, c, options)
+ if (higher === c && higher !== gt) {
+ return false
+ }
+ } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (lt) {
+ if (needDomLTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomLTPre.major &&
+ c.semver.minor === needDomLTPre.minor &&
+ c.semver.patch === needDomLTPre.patch) {
+ needDomLTPre = false
+ }
+ }
+ if (c.operator === '<' || c.operator === '<=') {
+ lower = lowerLT(lt, c, options)
+ if (lower === c && lower !== lt) {
+ return false
+ }
+ } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
+ return false
+ }
+ }
+
+ // if there was a < or >, and nothing in the dom, then must be false
+ // UNLESS it was limited by another range in the other direction.
+ // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
+ return false
+ }
+
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
+ return false
+ }
+
+ // we needed a prerelease range in a specific tuple, but didn't get one
+ // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
+ // because it includes prereleases in the 1.2.3 tuple
+ if (needDomGTPre || needDomLTPre) {
+ return false
+ }
+
+ return true
+}
+
+// >=1.2.3 is lower than >1.2.3
+const higherGT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp > 0 ? a
+ : comp < 0 ? b
+ : b.operator === '>' && a.operator === '>=' ? b
+ : a
+}
+
+// <=1.2.3 is higher than <1.2.3
+const lowerLT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp < 0 ? a
+ : comp > 0 ? b
+ : b.operator === '<' && a.operator === '<=' ? b
+ : a
+}
+
+module.exports = subset
diff --git a/node_modules/global-agent/node_modules/semver/ranges/to-comparators.js b/node_modules/global-agent/node_modules/semver/ranges/to-comparators.js
new file mode 100644
index 0000000..6c8bc7e
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/to-comparators.js
@@ -0,0 +1,8 @@
+const Range = require('../classes/range')
+
+// Mostly just for testing and legacy API reasons
+const toComparators = (range, options) =>
+ new Range(range, options).set
+ .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
+
+module.exports = toComparators
diff --git a/node_modules/global-agent/node_modules/semver/ranges/valid.js b/node_modules/global-agent/node_modules/semver/ranges/valid.js
new file mode 100644
index 0000000..365f356
--- /dev/null
+++ b/node_modules/global-agent/node_modules/semver/ranges/valid.js
@@ -0,0 +1,11 @@
+const Range = require('../classes/range')
+const validRange = (range, options) => {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+module.exports = validRange
diff --git a/node_modules/global-agent/package.json b/node_modules/global-agent/package.json
new file mode 100644
index 0000000..85f31af
--- /dev/null
+++ b/node_modules/global-agent/package.json
@@ -0,0 +1,105 @@
+{
+ "author": {
+ "email": "gajus@gajus.com",
+ "name": "Gajus Kuizinas",
+ "url": "http://gajus.com"
+ },
+ "ava": {
+ "babel": {
+ "compileAsTests": [
+ "test/helpers/**/*"
+ ]
+ },
+ "files": [
+ "test/global-agent/**/*"
+ ],
+ "require": [
+ "@babel/register"
+ ]
+ },
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "es6-error": "^4.1.1",
+ "matcher": "^3.0.0",
+ "roarr": "^2.15.3",
+ "semver": "^7.3.2",
+ "serialize-error": "^7.0.1"
+ },
+ "description": "Global HTTP/HTTPS proxy configurable using environment variables.",
+ "devDependencies": {
+ "@ava/babel": "^1.0.1",
+ "@babel/cli": "^7.10.1",
+ "@babel/core": "^7.10.2",
+ "@babel/node": "^7.10.1",
+ "@babel/plugin-transform-flow-strip-types": "^7.10.1",
+ "@babel/preset-env": "^7.10.2",
+ "@babel/register": "^7.10.1",
+ "anyproxy": "^4.1.2",
+ "ava": "^3.8.2",
+ "axios": "^0.19.2",
+ "babel-plugin-istanbul": "^6.0.0",
+ "babel-plugin-transform-export-default-name": "^2.0.4",
+ "coveralls": "^3.1.0",
+ "eslint": "^7.1.0",
+ "eslint-config-canonical": "^20.0.5",
+ "flow-bin": "^0.125.1",
+ "flow-copy-source": "^2.0.9",
+ "get-port": "^5.1.1",
+ "got": "^11.1.4",
+ "husky": "^4.2.5",
+ "nyc": "^15.1.0",
+ "pem": "^1.14.4",
+ "request": "^2.88.2",
+ "semantic-release": "^17.0.8",
+ "sinon": "^9.0.2"
+ },
+ "engines": {
+ "node": ">=10.0"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "npm run lint && npm run test && npm run build"
+ }
+ },
+ "keywords": [
+ "http",
+ "global",
+ "proxy",
+ "agent"
+ ],
+ "license": "BSD-3-Clause",
+ "main": "./dist/index.js",
+ "name": "global-agent",
+ "nyc": {
+ "all": true,
+ "exclude": [
+ "src/bin",
+ "src/queries/*.js"
+ ],
+ "include": [
+ "src/**/*.js"
+ ],
+ "instrument": false,
+ "reporter": [
+ "html",
+ "text-summary"
+ ],
+ "require": [
+ "@babel/register"
+ ],
+ "silent": true,
+ "sourceMap": false
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/gajus/global-agent"
+ },
+ "scripts": {
+ "build": "rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist",
+ "create-readme": "gitdown ./.README/README.md --output-file ./README.md",
+ "dev": "NODE_ENV=development babel ./src --out-dir ./dist --copy-files --source-maps --watch",
+ "lint": "eslint ./src ./test && flow",
+ "test": "NODE_TLS_REJECT_UNAUTHORIZED=false NODE_ENV=test nyc ava --verbose --serial"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/global-agent/src/Logger.js b/node_modules/global-agent/src/Logger.js
new file mode 100644
index 0000000..166f1e4
--- /dev/null
+++ b/node_modules/global-agent/src/Logger.js
@@ -0,0 +1,10 @@
+// @flow
+
+import Roarr from 'roarr';
+
+const Logger = Roarr
+ .child({
+ package: 'global-agent',
+ });
+
+export default Logger;
diff --git a/node_modules/global-agent/src/classes/Agent.js b/node_modules/global-agent/src/classes/Agent.js
new file mode 100644
index 0000000..801dd1f
--- /dev/null
+++ b/node_modules/global-agent/src/classes/Agent.js
@@ -0,0 +1,212 @@
+// @flow
+
+import {
+ serializeError,
+} from 'serialize-error';
+import {
+ boolean,
+} from 'boolean';
+import Logger from '../Logger';
+import type {
+ AgentType,
+ GetUrlProxyMethodType,
+ IsProxyConfiguredMethodType,
+ MustUrlUseProxyMethodType,
+ ProtocolType,
+} from '../types';
+
+const log = Logger.child({
+ namespace: 'Agent',
+});
+
+let requestId = 0;
+
+class Agent {
+ defaultPort: number;
+
+ protocol: ProtocolType;
+
+ fallbackAgent: AgentType;
+
+ isProxyConfigured: IsProxyConfiguredMethodType;
+
+ mustUrlUseProxy: MustUrlUseProxyMethodType;
+
+ getUrlProxy: GetUrlProxyMethodType;
+
+ socketConnectionTimeout: number;
+
+ constructor (
+ isProxyConfigured: IsProxyConfiguredMethodType,
+ mustUrlUseProxy: MustUrlUseProxyMethodType,
+ getUrlProxy: GetUrlProxyMethodType,
+ fallbackAgent: AgentType,
+ socketConnectionTimeout: number,
+ ) {
+ this.fallbackAgent = fallbackAgent;
+ this.isProxyConfigured = isProxyConfigured;
+ this.mustUrlUseProxy = mustUrlUseProxy;
+ this.getUrlProxy = getUrlProxy;
+ this.socketConnectionTimeout = socketConnectionTimeout;
+ }
+
+ addRequest (request: *, configuration: *) {
+ let requestUrl;
+
+ // It is possible that addRequest was constructed for a proxied request already, e.g.
+ // "request" package does this when it detects that a proxy should be used
+ // https://github.com/request/request/blob/212570b6971a732b8dd9f3c73354bcdda158a737/request.js#L402
+ // https://gist.github.com/gajus/e2074cd3b747864ffeaabbd530d30218
+ if (request.path.startsWith('http://') || request.path.startsWith('https://')) {
+ requestUrl = request.path;
+ } else {
+ requestUrl = this.protocol + '//' + (configuration.hostname || configuration.host) + (configuration.port === 80 || configuration.port === 443 ? '' : ':' + configuration.port) + request.path;
+ }
+
+ if (!this.isProxyConfigured()) {
+ log.trace({
+ destination: requestUrl,
+ }, 'not proxying request; GLOBAL_AGENT.HTTP_PROXY is not configured');
+
+ // $FlowFixMe It appears that Flow is missing the method description.
+ this.fallbackAgent.addRequest(request, configuration);
+
+ return;
+ }
+
+ if (!this.mustUrlUseProxy(requestUrl)) {
+ log.trace({
+ destination: requestUrl,
+ }, 'not proxying request; url matches GLOBAL_AGENT.NO_PROXY');
+
+ // $FlowFixMe It appears that Flow is missing the method description.
+ this.fallbackAgent.addRequest(request, configuration);
+
+ return;
+ }
+
+ const currentRequestId = requestId++;
+
+ const proxy = this.getUrlProxy(requestUrl);
+
+ if (this.protocol === 'http:') {
+ request.path = requestUrl;
+
+ if (proxy.authorization) {
+ request.setHeader('proxy-authorization', 'Basic ' + Buffer.from(proxy.authorization).toString('base64'));
+ }
+ }
+
+ log.trace({
+ destination: requestUrl,
+ proxy: 'http://' + proxy.hostname + ':' + proxy.port,
+ requestId: currentRequestId,
+ }, 'proxying request');
+
+ request.on('error', (error) => {
+ log.error({
+ error: serializeError(error),
+ }, 'request error');
+ });
+
+ request.once('response', (response) => {
+ log.trace({
+ headers: response.headers,
+ requestId: currentRequestId,
+ statusCode: response.statusCode,
+ }, 'proxying response');
+ });
+
+ request.shouldKeepAlive = false;
+
+ const connectionConfiguration = {
+ host: configuration.hostname || configuration.host,
+ port: configuration.port || 80,
+ proxy,
+ tls: {},
+ };
+
+ // add optional tls options for https requests.
+ // @see https://nodejs.org/docs/latest-v12.x/api/https.html#https_https_request_url_options_callback :
+ // > The following additional options from tls.connect()
+ // > - https://nodejs.org/docs/latest-v12.x/api/tls.html#tls_tls_connect_options_callback -
+ // > are also accepted:
+ // > ca, cert, ciphers, clientCertEngine, crl, dhparam, ecdhCurve, honorCipherOrder,
+ // > key, passphrase, pfx, rejectUnauthorized, secureOptions, secureProtocol, servername, sessionIdContext.
+ if (this.protocol === 'https:') {
+ connectionConfiguration.tls = {
+ ca: configuration.ca,
+ cert: configuration.cert,
+ ciphers: configuration.ciphers,
+ clientCertEngine: configuration.clientCertEngine,
+ crl: configuration.crl,
+ dhparam: configuration.dhparam,
+ ecdhCurve: configuration.ecdhCurve,
+ honorCipherOrder: configuration.honorCipherOrder,
+ key: configuration.key,
+ passphrase: configuration.passphrase,
+ pfx: configuration.pfx,
+ rejectUnauthorized: configuration.rejectUnauthorized,
+ secureOptions: configuration.secureOptions,
+ secureProtocol: configuration.secureProtocol,
+ servername: configuration.servername || connectionConfiguration.host,
+ sessionIdContext: configuration.sessionIdContext,
+ };
+
+ // This is not ideal because there is no way to override this setting using `tls` configuration if `NODE_TLS_REJECT_UNAUTHORIZED=0`.
+ // However, popular HTTP clients (such as https://github.com/sindresorhus/got) come with pre-configured value for `rejectUnauthorized`,
+ // which makes it impossible to override that value globally and respect `rejectUnauthorized` for specific requests only.
+ //
+ // eslint-disable-next-line no-process-env
+ if (typeof process.env.NODE_TLS_REJECT_UNAUTHORIZED === 'string' && boolean(process.env.NODE_TLS_REJECT_UNAUTHORIZED) === false) {
+ connectionConfiguration.tls.rejectUnauthorized = false;
+ }
+ }
+
+ // $FlowFixMe It appears that Flow is missing the method description.
+ this.createConnection(connectionConfiguration, (error, socket) => {
+ log.trace({
+ target: connectionConfiguration,
+ }, 'connecting');
+
+ // @see https://github.com/nodejs/node/issues/5757#issuecomment-305969057
+ if (socket) {
+ socket.setTimeout(this.socketConnectionTimeout, () => {
+ socket.destroy();
+ });
+
+ socket.once('connect', () => {
+ log.trace({
+ target: connectionConfiguration,
+ }, 'connected');
+
+ socket.setTimeout(0);
+ });
+
+ socket.once('secureConnect', () => {
+ log.trace({
+ target: connectionConfiguration,
+ }, 'connected (secure)');
+
+ socket.setTimeout(0);
+ });
+ }
+
+ if (error) {
+ request.emit('error', error);
+ } else {
+ log.debug('created socket');
+
+ socket.on('error', (socketError) => {
+ log.error({
+ error: serializeError(socketError),
+ }, 'socket error');
+ });
+
+ request.onSocket(socket);
+ }
+ });
+ }
+}
+
+export default Agent;
diff --git a/node_modules/global-agent/src/classes/HttpProxyAgent.js b/node_modules/global-agent/src/classes/HttpProxyAgent.js
new file mode 100644
index 0000000..8b9b471
--- /dev/null
+++ b/node_modules/global-agent/src/classes/HttpProxyAgent.js
@@ -0,0 +1,30 @@
+// @flow
+
+import net from 'net';
+import type {
+ ConnectionCallbackType,
+ ConnectionConfigurationType,
+} from '../types';
+import Agent from './Agent';
+
+class HttpProxyAgent extends Agent {
+ // @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/169#issuecomment-486980290
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ constructor (...args: *) {
+ super(...args);
+
+ this.protocol = 'http:';
+ this.defaultPort = 80;
+ }
+
+ createConnection (configuration: ConnectionConfigurationType, callback: ConnectionCallbackType) {
+ const socket = net.connect(
+ configuration.proxy.port,
+ configuration.proxy.hostname,
+ );
+
+ callback(null, socket);
+ }
+}
+
+export default HttpProxyAgent;
diff --git a/node_modules/global-agent/src/classes/HttpsProxyAgent.js b/node_modules/global-agent/src/classes/HttpsProxyAgent.js
new file mode 100644
index 0000000..24d724f
--- /dev/null
+++ b/node_modules/global-agent/src/classes/HttpsProxyAgent.js
@@ -0,0 +1,54 @@
+// @flow
+
+import net from 'net';
+import tls from 'tls';
+import type {
+ ConnectionCallbackType,
+ ConnectionConfigurationType,
+} from '../types';
+import Agent from './Agent';
+
+class HttpsProxyAgent extends Agent {
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ constructor (...args: *) {
+ super(...args);
+
+ this.protocol = 'https:';
+ this.defaultPort = 443;
+ }
+
+ createConnection (configuration: ConnectionConfigurationType, callback: ConnectionCallbackType) {
+ const socket = net.connect(
+ configuration.proxy.port,
+ configuration.proxy.hostname,
+ );
+
+ socket.on('error', (error) => {
+ callback(error);
+ });
+
+ socket.once('data', () => {
+ const secureSocket = tls.connect({
+ ...configuration.tls,
+ socket,
+ });
+
+ callback(null, secureSocket);
+ });
+
+ let connectMessage = '';
+
+ connectMessage += 'CONNECT ' + configuration.host + ':' + configuration.port + ' HTTP/1.1\r\n';
+ connectMessage += 'Host: ' + configuration.host + ':' + configuration.port + '\r\n';
+
+ if (configuration.proxy.authorization) {
+ connectMessage += 'Proxy-Authorization: Basic ' + Buffer.from(configuration.proxy.authorization).toString('base64') + '\r\n';
+ }
+
+ connectMessage += '\r\n';
+
+ socket.write(connectMessage);
+ }
+}
+
+export default HttpsProxyAgent;
diff --git a/node_modules/global-agent/src/classes/index.js b/node_modules/global-agent/src/classes/index.js
new file mode 100644
index 0000000..9e8418a
--- /dev/null
+++ b/node_modules/global-agent/src/classes/index.js
@@ -0,0 +1,5 @@
+// @flow
+
+export {default as Agent} from './Agent';
+export {default as HttpProxyAgent} from './HttpProxyAgent';
+export {default as HttpsProxyAgent} from './HttpsProxyAgent';
diff --git a/node_modules/global-agent/src/errors.js b/node_modules/global-agent/src/errors.js
new file mode 100644
index 0000000..d93ba6f
--- /dev/null
+++ b/node_modules/global-agent/src/errors.js
@@ -0,0 +1,15 @@
+// @flow
+
+/* eslint-disable fp/no-class, fp/no-this */
+
+import ExtendableError from 'es6-error';
+
+export class UnexpectedStateError extends ExtendableError {
+ code: string;
+
+ constructor (message: string, code: string = 'UNEXPECTED_STATE_ERROR') {
+ super(message);
+
+ this.code = code;
+ }
+}
diff --git a/node_modules/global-agent/src/factories/createGlobalProxyAgent.js b/node_modules/global-agent/src/factories/createGlobalProxyAgent.js
new file mode 100644
index 0000000..d515a9d
--- /dev/null
+++ b/node_modules/global-agent/src/factories/createGlobalProxyAgent.js
@@ -0,0 +1,197 @@
+// @flow
+
+import http from 'http';
+import https from 'https';
+import {
+ boolean as parseBoolean,
+} from 'boolean';
+import semver from 'semver';
+import Logger from '../Logger';
+import {
+ HttpProxyAgent,
+ HttpsProxyAgent,
+} from '../classes';
+import {
+ UnexpectedStateError,
+} from '../errors';
+import {
+ bindHttpMethod,
+ isUrlMatchingNoProxy,
+ parseProxyUrl,
+} from '../utilities';
+import type {
+ ProxyAgentConfigurationInputType,
+ ProxyAgentConfigurationType,
+} from '../types';
+import createProxyController from './createProxyController';
+
+const httpGet = http.get;
+const httpRequest = http.request;
+const httpsGet = https.get;
+const httpsRequest = https.request;
+
+const log = Logger.child({
+ namespace: 'createGlobalProxyAgent',
+});
+
+const defaultConfigurationInput = {
+ environmentVariableNamespace: undefined,
+ forceGlobalAgent: undefined,
+ socketConnectionTimeout: 60000,
+};
+
+const omitUndefined = (subject) => {
+ const keys = Object.keys(subject);
+
+ const result = {};
+
+ for (const key of keys) {
+ const value = subject[key];
+
+ if (value !== undefined) {
+ result[key] = value;
+ }
+ }
+
+ return result;
+};
+
+const createConfiguration = (configurationInput: ProxyAgentConfigurationInputType): ProxyAgentConfigurationType => {
+ // eslint-disable-next-line no-process-env
+ const environment = process.env;
+
+ const defaultConfiguration = {
+ environmentVariableNamespace: typeof environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE === 'string' ? environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE : 'GLOBAL_AGENT_',
+ forceGlobalAgent: typeof environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT === 'string' ? parseBoolean(environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT) : true,
+ socketConnectionTimeout: typeof environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT === 'string' ? Number.parseInt(environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT, 10) : defaultConfigurationInput.socketConnectionTimeout,
+ };
+
+ // $FlowFixMe
+ return {
+ ...defaultConfiguration,
+ ...omitUndefined(configurationInput),
+ };
+};
+
+export default (configurationInput: ProxyAgentConfigurationInputType = defaultConfigurationInput) => {
+ const configuration = createConfiguration(configurationInput);
+
+ const proxyController = createProxyController();
+
+ // eslint-disable-next-line no-process-env
+ proxyController.HTTP_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTP_PROXY'] || null;
+
+ // eslint-disable-next-line no-process-env
+ proxyController.HTTPS_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTPS_PROXY'] || null;
+
+ // eslint-disable-next-line no-process-env
+ proxyController.NO_PROXY = process.env[configuration.environmentVariableNamespace + 'NO_PROXY'] || null;
+
+ log.info({
+ configuration,
+ state: proxyController,
+ }, 'global agent has been initialized');
+
+ const mustUrlUseProxy = (getProxy) => {
+ return (url) => {
+ if (!getProxy()) {
+ return false;
+ }
+
+ if (!proxyController.NO_PROXY) {
+ return true;
+ }
+
+ return !isUrlMatchingNoProxy(url, proxyController.NO_PROXY);
+ };
+ };
+
+ const getUrlProxy = (getProxy) => {
+ return () => {
+ const proxy = getProxy();
+
+ if (!proxy) {
+ throw new UnexpectedStateError('HTTP(S) proxy must be configured.');
+ }
+
+ return parseProxyUrl(proxy);
+ };
+ };
+
+ const getHttpProxy = () => {
+ return proxyController.HTTP_PROXY;
+ };
+
+ const BoundHttpProxyAgent = class extends HttpProxyAgent {
+ constructor () {
+ super(
+ () => {
+ return getHttpProxy();
+ },
+ mustUrlUseProxy(getHttpProxy),
+ getUrlProxy(getHttpProxy),
+ http.globalAgent,
+ configuration.socketConnectionTimeout,
+ );
+ }
+ };
+
+ const httpAgent = new BoundHttpProxyAgent();
+
+ const getHttpsProxy = () => {
+ return proxyController.HTTPS_PROXY || proxyController.HTTP_PROXY;
+ };
+
+ const BoundHttpsProxyAgent = class extends HttpsProxyAgent {
+ constructor () {
+ super(
+ () => {
+ return getHttpsProxy();
+ },
+ mustUrlUseProxy(getHttpsProxy),
+ getUrlProxy(getHttpsProxy),
+ https.globalAgent,
+ configuration.socketConnectionTimeout,
+ );
+ }
+ };
+
+ const httpsAgent = new BoundHttpsProxyAgent();
+
+ // Overriding globalAgent was added in v11.7.
+ // @see https://nodejs.org/uk/blog/release/v11.7.0/
+ if (semver.gte(process.version, 'v11.7.0')) {
+ // @see https://github.com/facebook/flow/issues/7670
+ // $FlowFixMe
+ http.globalAgent = httpAgent;
+
+ // $FlowFixMe
+ https.globalAgent = httpsAgent;
+ }
+
+ // The reason this logic is used in addition to overriding http(s).globalAgent
+ // is because there is no guarantee that we set http(s).globalAgent variable
+ // before an instance of http(s).Agent has been already constructed by someone,
+ // e.g. Stripe SDK creates instances of http(s).Agent at the top-level.
+ // @see https://github.com/gajus/global-agent/pull/13
+ //
+ // We still want to override http(s).globalAgent when possible to enable logic
+ // in `bindHttpMethod`.
+ if (semver.gte(process.version, 'v10.0.0')) {
+ // $FlowFixMe
+ http.get = bindHttpMethod(httpGet, httpAgent, configuration.forceGlobalAgent);
+
+ // $FlowFixMe
+ http.request = bindHttpMethod(httpRequest, httpAgent, configuration.forceGlobalAgent);
+
+ // $FlowFixMe
+ https.get = bindHttpMethod(httpsGet, httpsAgent, configuration.forceGlobalAgent);
+
+ // $FlowFixMe
+ https.request = bindHttpMethod(httpsRequest, httpsAgent, configuration.forceGlobalAgent);
+ } else {
+ log.warn('attempt to initialize global-agent in unsupported Node.js version was ignored');
+ }
+
+ return proxyController;
+};
diff --git a/node_modules/global-agent/src/factories/createProxyController.js b/node_modules/global-agent/src/factories/createProxyController.js
new file mode 100644
index 0000000..5805ec8
--- /dev/null
+++ b/node_modules/global-agent/src/factories/createProxyController.js
@@ -0,0 +1,46 @@
+// @flow
+
+import Logger from '../Logger';
+
+type ProxyControllerType = {|
+ HTTP_PROXY: string | null,
+ HTTPS_PROXY: string | null,
+ NO_PROXY: string | null,
+|};
+
+const log = Logger.child({
+ namespace: 'createProxyController',
+});
+
+const KNOWN_PROPERTY_NAMES = [
+ 'HTTP_PROXY',
+ 'HTTPS_PROXY',
+ 'NO_PROXY',
+];
+
+export default (): ProxyControllerType => {
+ // eslint-disable-next-line fp/no-proxy
+ return new Proxy({
+ HTTP_PROXY: null,
+ HTTPS_PROXY: null,
+ NO_PROXY: null,
+ }, {
+ set: (subject, name, value) => {
+ if (!KNOWN_PROPERTY_NAMES.includes(name)) {
+ throw new Error('Cannot set an unmapped property "' + name + '".');
+ }
+
+ subject[name] = value;
+
+ log.info({
+ change: {
+ name,
+ value,
+ },
+ newConfiguration: subject,
+ }, 'configuration changed');
+
+ return true;
+ },
+ });
+};
diff --git a/node_modules/global-agent/src/factories/index.js b/node_modules/global-agent/src/factories/index.js
new file mode 100644
index 0000000..c16eca6
--- /dev/null
+++ b/node_modules/global-agent/src/factories/index.js
@@ -0,0 +1,4 @@
+// @flow
+
+export {default as createGlobalProxyAgent} from './createGlobalProxyAgent';
+export {default as createProxyController} from './createProxyController';
diff --git a/node_modules/global-agent/src/index.js b/node_modules/global-agent/src/index.js
new file mode 100644
index 0000000..14da1ba
--- /dev/null
+++ b/node_modules/global-agent/src/index.js
@@ -0,0 +1,4 @@
+// @flow
+
+export {bootstrap} from './routines';
+export {createGlobalProxyAgent} from './factories';
diff --git a/node_modules/global-agent/src/routines/bootstrap.js b/node_modules/global-agent/src/routines/bootstrap.js
new file mode 100644
index 0000000..038feb3
--- /dev/null
+++ b/node_modules/global-agent/src/routines/bootstrap.js
@@ -0,0 +1,25 @@
+// @flow
+
+import Logger from '../Logger';
+import {
+ createGlobalProxyAgent,
+} from '../factories';
+import type {
+ ProxyAgentConfigurationInputType,
+} from '../types';
+
+const log = Logger.child({
+ namespace: 'bootstrap',
+});
+
+export default (configurationInput?: ProxyAgentConfigurationInputType): boolean => {
+ if (global.GLOBAL_AGENT) {
+ log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');
+
+ return false;
+ }
+
+ global.GLOBAL_AGENT = createGlobalProxyAgent(configurationInput);
+
+ return true;
+};
diff --git a/node_modules/global-agent/src/routines/index.js b/node_modules/global-agent/src/routines/index.js
new file mode 100644
index 0000000..e47a8a0
--- /dev/null
+++ b/node_modules/global-agent/src/routines/index.js
@@ -0,0 +1,3 @@
+// @flow
+
+export {default as bootstrap} from './bootstrap';
diff --git a/node_modules/global-agent/src/types.js b/node_modules/global-agent/src/types.js
new file mode 100644
index 0000000..e2f1a99
--- /dev/null
+++ b/node_modules/global-agent/src/types.js
@@ -0,0 +1,66 @@
+// @flow
+
+import {
+ Socket,
+} from 'net';
+import {
+ TLSSocket,
+} from 'tls';
+import {
+ Agent as HttpAgent,
+} from 'http';
+import {
+ Agent as HttpsAgent,
+} from 'https';
+
+export type ProxyConfigurationType = {|
+ +authorization: string,
+ +hostname: string,
+ +port: number,
+|};
+
+export type TlsConfigurationType = {|
+ +ca?: string,
+ +cert?: string,
+ +ciphers?: string,
+ +clientCertEngine?: string,
+ +crl?: string,
+ +dhparam?: string,
+ +ecdhCurve?: string,
+ +honorCipherOrder?: boolean,
+ +key?: string,
+ +passphrase?: string,
+ +pfx?: string,
+ +rejectUnauthorized?: boolean,
+ +secureOptions?: number,
+ +secureProtocol?: string,
+ +servername?: string,
+ +sessionIdContext?: string,
+|};
+
+export type ConnectionConfigurationType = {|
+ +host: string,
+ +port: number,
+ +tls?: TlsConfigurationType,
+ +proxy: ProxyConfigurationType,
+|};
+
+export type ConnectionCallbackType = (error: Error | null, socket?: Socket | TLSSocket) => void;
+
+export type AgentType = HttpAgent | HttpsAgent;
+export type IsProxyConfiguredMethodType = () => boolean;
+export type MustUrlUseProxyMethodType = (url: string) => boolean;
+export type GetUrlProxyMethodType = (url: string) => ProxyConfigurationType;
+export type ProtocolType = 'http:' | 'https:';
+
+export type ProxyAgentConfigurationInputType = {|
+ +environmentVariableNamespace?: string,
+ +forceGlobalAgent?: boolean,
+ +socketConnectionTimeout?: number,
+|};
+
+export type ProxyAgentConfigurationType = {|
+ +environmentVariableNamespace: string,
+ +forceGlobalAgent: boolean,
+ +socketConnectionTimeout: number,
+|};
diff --git a/node_modules/global-agent/src/utilities/bindHttpMethod.js b/node_modules/global-agent/src/utilities/bindHttpMethod.js
new file mode 100644
index 0000000..f8859b5
--- /dev/null
+++ b/node_modules/global-agent/src/utilities/bindHttpMethod.js
@@ -0,0 +1,54 @@
+// @flow
+
+import http from 'http';
+import https from 'https';
+
+type AgentType = http.Agent | https.Agent;
+
+// eslint-disable-next-line flowtype/no-weak-types
+export default (originalMethod: Function, agent: AgentType, forceGlobalAgent: boolean) => {
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ return (...args: *) => {
+ let url;
+ let options;
+ let callback;
+
+ if (typeof args[0] === 'string' || args[0] instanceof URL) {
+ url = args[0];
+
+ if (typeof args[1] === 'function') {
+ options = {};
+ callback = args[1];
+ } else {
+ options = {
+ ...args[1],
+ };
+ callback = args[2];
+ }
+ } else {
+ options = {
+ ...args[0],
+ };
+ callback = args[1];
+ }
+
+ if (forceGlobalAgent) {
+ options.agent = agent;
+ } else {
+ if (!options.agent) {
+ options.agent = agent;
+ }
+
+ if (options.agent === http.globalAgent || options.agent === https.globalAgent) {
+ options.agent = agent;
+ }
+ }
+
+ if (url) {
+ // $FlowFixMe
+ return originalMethod(url, options, callback);
+ } else {
+ return originalMethod(options, callback);
+ }
+ };
+};
diff --git a/node_modules/global-agent/src/utilities/index.js b/node_modules/global-agent/src/utilities/index.js
new file mode 100644
index 0000000..3412387
--- /dev/null
+++ b/node_modules/global-agent/src/utilities/index.js
@@ -0,0 +1,5 @@
+// @flow
+
+export {default as bindHttpMethod} from './bindHttpMethod';
+export {default as isUrlMatchingNoProxy} from './isUrlMatchingNoProxy';
+export {default as parseProxyUrl} from './parseProxyUrl';
diff --git a/node_modules/global-agent/src/utilities/isUrlMatchingNoProxy.js b/node_modules/global-agent/src/utilities/isUrlMatchingNoProxy.js
new file mode 100644
index 0000000..f2de584
--- /dev/null
+++ b/node_modules/global-agent/src/utilities/isUrlMatchingNoProxy.js
@@ -0,0 +1,37 @@
+// @flow
+
+import {
+ parse as parseUrl,
+} from 'url';
+import matcher from 'matcher';
+import {
+ UnexpectedStateError,
+} from '../errors';
+
+export default (subjectUrl: string, noProxy: string) => {
+ const subjectUrlTokens = parseUrl(subjectUrl);
+
+ const rules = noProxy.split(/[\s,]+/);
+
+ for (const rule of rules) {
+ const ruleMatch = rule
+ .replace(/^(?<leadingDot>\.)/, '*')
+ .match(/^(?<hostname>.+?)(?::(?<port>\d+))?$/);
+
+ if (!ruleMatch || !ruleMatch.groups) {
+ throw new UnexpectedStateError('Invalid NO_PROXY pattern.');
+ }
+
+ if (!ruleMatch.groups.hostname) {
+ throw new UnexpectedStateError('NO_PROXY entry pattern must include hostname. Use * to match any hostname.');
+ }
+
+ const hostnameIsMatch = matcher.isMatch(subjectUrlTokens.hostname, ruleMatch.groups.hostname);
+
+ if (hostnameIsMatch && (!ruleMatch.groups || !ruleMatch.groups.port || subjectUrlTokens.port && subjectUrlTokens.port === ruleMatch.groups.port)) {
+ return true;
+ }
+ }
+
+ return false;
+};
diff --git a/node_modules/global-agent/src/utilities/parseProxyUrl.js b/node_modules/global-agent/src/utilities/parseProxyUrl.js
new file mode 100644
index 0000000..e2e9a6b
--- /dev/null
+++ b/node_modules/global-agent/src/utilities/parseProxyUrl.js
@@ -0,0 +1,36 @@
+// @flow
+
+import {
+ parse as parseUrl,
+} from 'url';
+import {
+ UnexpectedStateError,
+} from '../errors';
+
+export default (url: string) => {
+ const urlTokens = parseUrl(url);
+
+ if (urlTokens.query !== null) {
+ throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.');
+ }
+
+ if (urlTokens.hash !== null) {
+ throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.');
+ }
+
+ if (urlTokens.protocol !== 'http:') {
+ throw new UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:".');
+ }
+
+ let port = 80;
+
+ if (urlTokens.port) {
+ port = Number.parseInt(urlTokens.port, 10);
+ }
+
+ return {
+ authorization: urlTokens.auth || null,
+ hostname: urlTokens.hostname,
+ port,
+ };
+};
diff --git a/node_modules/global-tunnel-ng/.editorconfig b/node_modules/global-tunnel-ng/.editorconfig
new file mode 100644
index 0000000..0bf5d83
--- /dev/null
+++ b/node_modules/global-tunnel-ng/.editorconfig
@@ -0,0 +1,10 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false \ No newline at end of file
diff --git a/node_modules/global-tunnel-ng/.eslintignore b/node_modules/global-tunnel-ng/.eslintignore
new file mode 100644
index 0000000..ed9f9cc
--- /dev/null
+++ b/node_modules/global-tunnel-ng/.eslintignore
@@ -0,0 +1 @@
+coverage \ No newline at end of file
diff --git a/node_modules/global-tunnel-ng/.travis.yml b/node_modules/global-tunnel-ng/.travis.yml
new file mode 100644
index 0000000..23bf8c0
--- /dev/null
+++ b/node_modules/global-tunnel-ng/.travis.yml
@@ -0,0 +1,20 @@
+language: node_js
+node_js:
+ - "node"
+ - "10"
+ - "9"
+ - "6"
+
+cache:
+ npm: true
+ directories:
+ - node_modules
+
+sudo: false
+
+os:
+ - linux
+ - osx
+
+matrix:
+ fast_finish: true
diff --git a/node_modules/global-tunnel-ng/LICENSE b/node_modules/global-tunnel-ng/LICENSE
new file mode 100644
index 0000000..9a064f3
--- /dev/null
+++ b/node_modules/global-tunnel-ng/LICENSE
@@ -0,0 +1,12 @@
+Copyright (c) 2013, GoInstant Inc., a salesforce.com company
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/global-tunnel-ng/README.md b/node_modules/global-tunnel-ng/README.md
new file mode 100644
index 0000000..9363824
--- /dev/null
+++ b/node_modules/global-tunnel-ng/README.md
@@ -0,0 +1,242 @@
+[![dependencies Status](https://david-dm.org/np-maintain/global-tunnel/status.svg)](https://david-dm.org/np-maintain/global-tunnel)
+[![devDependencies Status](https://david-dm.org/np-maintain/global-tunnel/dev-status.svg)](https://david-dm.org/np-maintain/global-tunnel?type=dev)
+[![Build Status](https://travis-ci.org/np-maintain/global-tunnel.png)](https://travis-ci.org/np-maintain/global-tunnel) [![Greenkeeper badge](https://badges.greenkeeper.io/np-maintain/global-tunnel.svg)](https://greenkeeper.io/)
+
+# global-tunnel
+
+Configures the [global
+`http`](http://nodejs.org/docs/v0.10.24/api/all.html#all_http_globalagent) and
+[`https`](http://nodejs.org/docs/v0.10.24/api/all.html#all_https_globalagent)
+agents to use an upstream HTTP proxy.
+
+Works transparently to tunnel modules that use node's default [`http.request()`
+method](http://nodejs.org/docs/v0.10.24/api/all.html#all_http_request_options_callback)
+as well as the popular [`request` module](https://npmjs.org/package/request).
+
+# Installation
+
+You can install this package by just executing the following:
+
+ npm install global-tunnel-ng
+
+# Usage
+
+To make all HTTP and HTTPS connections go through an outbound HTTP proxy:
+
+```js
+var globalTunnel = require('global-tunnel-ng');
+
+globalTunnel.initialize({
+ host: '10.0.0.10',
+ port: 8080,
+ proxyAuth: 'userId:password', // optional authentication
+ sockets: 50 // optional pool size for each http and https
+});
+```
+
+This will use the `CONNECT` method for HTTPS requests and absolute-URIs for
+HTTP requests, which is how many network proxies are configured.
+
+Optionally, to tear-down the global agent and restore node's default global
+agents:
+
+```js
+globalTunnel.end();
+```
+
+Any active connections will be allowed to run to completion, but new
+connections will use the default global agents.
+
+# Advanced Usage
+
+## Options
+
+The complete list of options to `globalTunnel.initialize`:
+
+- **host** - the hostname or IP of the HTTP proxy to use
+- **port** - the TCP port to use on that proxy
+- **connect** _(optional)_ controls what protocols use the `CONNECT` method. It
+ has three possible values (strings):
+ - **neither** - don't use `CONNECT`; just use absolute URIs
+ - **https** - _(the default)_ only use `CONNECT` for HTTPS requests
+ - **both** - use `CONNECT` for both HTTP and HTTPS requests
+- **protocol** - the protocol that the proxy speaks, either `http:` or `https:`.
+- **proxyAuth** - _(optional)_ to authenticate `userId:password`
+- **sockets** - _(optional)_ maximum number of TCP sockets to use in each pool.
+ There are two pools: one for HTTP and one for HTTPS. Uses node's default (5)
+ if falsy.
+
+## Variations
+
+Here's a few interesting variations on the basic config.
+
+### Absolute URI Proxies
+
+Another common proxy configuration is one that expects clients to use an
+[absolute URI for the
+Request-URI](https://tools.ietf.org/html/rfc2616#section-5.1.2) for all HTTP
+and HTTPS requests. This is common for networks that use a proxy for security
+scanning and access control.
+
+What does this mean? It means that instead of ...
+
+```http
+GET / HTTP/1.1
+Host: example.com
+```
+
+... your proxy expects ...
+
+```http
+GET https://example.com/ HTTP/1.1
+```
+
+You'll need to specify `connect: 'neither'` if this is the case. If the proxy
+speaks HTTP (i.e. the connection from node --> proxy is not encrypted):
+
+```js
+globalTunnel.initialize({
+ connect: 'neither',
+ host: '10.0.0.10',
+ port: 3128
+});
+```
+
+or, if the proxy speaks HTTPS to your app instead:
+
+```js
+globalTunnel.initialize({
+ connect: 'neither',
+ protocol: 'https:',
+ host: '10.0.0.10',
+ port: 3129
+});
+```
+
+### Always-CONNECT Proxies
+
+If the proxy expects you to use the `CONNECT` method for both HTTP and HTTPS
+requests, you'll need the `connect: 'both'` option.
+
+What does this mean? It means that instead of ...
+
+```http
+GET https://example.com/ HTTP/1.1
+```
+
+... your proxy expects ...
+
+```http
+CONNECT example.com:443 HTTP/1.1
+```
+
+Be sure to set the `protocol:` option based on what protocol the proxy speaks.
+
+```js
+globalTunnel.initialize({
+ connect: 'both',
+ host: '10.0.0.10',
+ port: 3130
+});
+```
+
+### HTTPS configuration
+
+_EXPERIMENTAL_
+
+If tunnelling both protocols, you can use different HTTPS client configurations
+for the two phases of the connection.
+
+```js
+globalTunnel.initialize({
+ connect: 'both',
+ protocol: 'https:'
+ host: '10.0.0.10',
+ port: 3130,
+ proxyHttpsOptions: {
+ // use this config for app -> proxy
+ },
+ originHttpsOptions: {
+ // use this config for proxy -> origin
+ }
+});
+```
+
+## Auto-Config
+
+If `globalTunnel.initialize` doesnt receive a configuration as its first parameter the `http_proxys` and `http_proxy` environment variables will be used.
+
+If these are missing the npm configurations `https-proxy`, `http-proxy`, `proxy` will be used instead.
+
+If no environment variables or npm configurations are found nothing will be done.
+
+## Retrieving proxy URL, parsed config and proxy status
+
+As the module does some extra job determining the proxy (including parsing the environment variables) and does some normalization (like defaulting the protocol to `http:`) it may be useful to retrieve the proxy URL used by the module.
+
+The property `globalTunnel.proxyUrl` is the URL-formatted (including the optional basic auth if provided) proxy config currently in use. It is `null` if the proxy is not currently enabled.
+
+Similarly, the `globalTunnel.proxyConfig` contains the entire parsed and normalized config.
+
+The property `globalTunnel.isProxying` contains the information about whether the global proxy is on or off.
+
+# Compatibility
+
+Any module that doesn't specify [an explicit `agent:` option to
+`http.request`](http://nodejs.org/docs/v0.10.24/api/all.html#all_http_request_options_callback)
+will also work with global-tunnel.
+
+The unit tests for this module verify that the popular [`request`
+module](https://npmjs.org/package/request) works with global-tunnel active.
+
+For untested modules, it's recommended that you load and initialize
+global-tunnel first. This way, any copies of `http.globalAgent` will point to
+the right thing.
+
+# Contributing
+
+If you'd like to contribute to or modify global-tunnel, here's a quick guide
+to get you started.
+
+## Development Dependencies
+
+- [node.js](http://nodejs.org) >= 0.10
+
+## Set-Up
+
+Download via GitHub and install npm dependencies:
+
+```sh
+git clone git@github.com:np-maintain/global-tunnel.git
+cd global-tunnel
+npm install
+```
+
+## Testing
+
+Testing is with the [mocha](https://github.com/visionmedia/mocha) framework.
+Tests are located in the `test/` directory.
+
+To run the tests:
+
+```sh
+npm test
+```
+
+# Support
+
+As this is a hard fork, you may still contact the given contacts below.
+
+Email [GoInstant Support](mailto:support@goinstant.com) or stop by [#goinstant on freenode](irc://irc.freenode.net#goinstant).
+
+For responsible disclosures, email [GoInstant Security](mailto:security@goinstant.com).
+
+To [file a bug](https://github.com/np-maintain/global-tunnel/issues) or
+[propose a patch](https://github.com/np-maintain/global-tunnel/pulls),
+please use github directly.
+
+# Legal
+
+&copy; 2014 GoInstant Inc., a salesforce.com company
+
+Licensed under the BSD 3-clause license.
diff --git a/node_modules/global-tunnel-ng/index.js b/node_modules/global-tunnel-ng/index.js
new file mode 100644
index 0000000..f5e89e1
--- /dev/null
+++ b/node_modules/global-tunnel-ng/index.js
@@ -0,0 +1,348 @@
+/* jshint node:true */
+'use strict';
+/**
+ * @fileOverview
+ * Global proxy settings.
+ */
+var globalTunnel = exports;
+exports.constructor = function() {};
+
+var http = require('http');
+var https = require('https');
+var urlParse = require('url').parse;
+var urlStringify = require('url').format;
+
+var pick = require('lodash/pick');
+var assign = require('lodash/assign');
+var clone = require('lodash/clone');
+var tunnel = require('tunnel');
+var npmConfig = require('npm-conf');
+var encodeUrl = require('encodeurl');
+
+var agents = require('./lib/agents');
+exports.agents = agents;
+
+var ENV_VAR_PROXY_SEARCH_ORDER = [
+ 'https_proxy',
+ 'HTTPS_PROXY',
+ 'http_proxy',
+ 'HTTP_PROXY'
+];
+var NPM_CONFIG_PROXY_SEARCH_ORDER = ['https-proxy', 'http-proxy', 'proxy'];
+
+// Save the original settings for restoration later.
+var ORIGINALS = {
+ http: pick(http, 'globalAgent', ['request', 'get']),
+ https: pick(https, 'globalAgent', ['request', 'get']),
+ env: pick(process.env, ENV_VAR_PROXY_SEARCH_ORDER)
+};
+
+var loggingEnabled =
+ process &&
+ process.env &&
+ process.env.DEBUG &&
+ process.env.DEBUG.toLowerCase().indexOf('global-tunnel') !== -1 &&
+ console &&
+ typeof console.log === 'function';
+
+function log(message) {
+ if (loggingEnabled) {
+ console.log('DEBUG global-tunnel: ' + message);
+ }
+}
+
+function resetGlobals() {
+ assign(http, ORIGINALS.http);
+ assign(https, ORIGINALS.https);
+ var val;
+ for (var key in ORIGINALS.env) {
+ if (Object.prototype.hasOwnProperty.call(ORIGINALS.env, key)) {
+ val = ORIGINALS.env[key];
+ if (val !== null && val !== undefined) {
+ process.env[key] = val;
+ }
+ }
+ }
+}
+
+/**
+ * Parses the de facto `http_proxy` environment.
+ */
+function tryParse(url) {
+ if (!url) {
+ return null;
+ }
+
+ var parsed = urlParse(url);
+
+ return {
+ protocol: parsed.protocol,
+ host: parsed.hostname,
+ port: parseInt(parsed.port, 10),
+ proxyAuth: parsed.auth
+ };
+}
+
+// Stringifies the normalized parsed config
+function stringifyProxy(conf) {
+ return encodeUrl(
+ urlStringify({
+ protocol: conf.protocol,
+ hostname: conf.host,
+ port: conf.port,
+ auth: conf.proxyAuth
+ })
+ );
+}
+
+globalTunnel.isProxying = false;
+globalTunnel.proxyUrl = null;
+globalTunnel.proxyConfig = null;
+
+function findEnvVarProxy() {
+ var i;
+ var key;
+ var val;
+ var result;
+ for (i = 0; i < ENV_VAR_PROXY_SEARCH_ORDER.length; i++) {
+ key = ENV_VAR_PROXY_SEARCH_ORDER[i];
+ val = process.env[key];
+ if (val !== null && val !== undefined) {
+ // Get the first non-empty
+ result = result || val;
+ // Delete all
+ // NB: we do it here to prevent double proxy handling (and for example path change)
+ // by us and the `request` module or other sub-dependencies
+ delete process.env[key];
+ log('Found proxy in environment variable ' + ENV_VAR_PROXY_SEARCH_ORDER[i]);
+ }
+ }
+
+ if (!result) {
+ // __GLOBAL_TUNNEL_DEPENDENCY_NPMCONF__ is a hook to override the npm-conf module
+ var config =
+ (global.__GLOBAL_TUNNEL_DEPENDENCY_NPMCONF__ &&
+ global.__GLOBAL_TUNNEL_DEPENDENCY_NPMCONF__()) ||
+ npmConfig();
+
+ for (i = 0; i < NPM_CONFIG_PROXY_SEARCH_ORDER.length && !val; i++) {
+ val = config.get(NPM_CONFIG_PROXY_SEARCH_ORDER[i]);
+ }
+
+ if (val) {
+ log('Found proxy in npm config ' + NPM_CONFIG_PROXY_SEARCH_ORDER[i]);
+ result = val;
+ }
+ }
+
+ return result;
+}
+
+/**
+ * Overrides the node http/https `globalAgent`s to use the configured proxy.
+ *
+ * If the config is empty, the `http_proxy` environment variable is checked.
+ * If that's not present, the NPM `http-proxy` configuration is checked.
+ * If neither are present no proxying will be enabled.
+ *
+ * @param {object} conf - Options
+ * @param {string} conf.host - Hostname or IP of the HTTP proxy to use
+ * @param {int} conf.port - TCP port of the proxy
+ * @param {string} [conf.protocol='http'] - The protocol of the proxy, 'http' or 'https'
+ * @param {string} [conf.proxyAuth] - Credentials for the proxy in the form userId:password
+ * @param {string} [conf.connect='https'] - Which protocols will use the CONNECT method 'neither', 'https' or 'both'
+ * @param {int} [conf.sockets=5] Maximum number of TCP sockets to use in each pool. There are two different pools for HTTP and HTTPS
+ * @param {object} [conf.httpsOptions] - HTTPS options
+ */
+globalTunnel.initialize = function(conf) {
+ // Don't do anything if already proxying.
+ // To change the settings `.end()` should be called first.
+ if (globalTunnel.isProxying) {
+ log('Already proxying');
+ return;
+ }
+
+ try {
+ // This has an effect of also removing the proxy config
+ // from the global env to prevent other modules (like request) doing
+ // double handling
+ var envVarProxy = findEnvVarProxy();
+
+ if (conf && typeof conf === 'string') {
+ // Passed string - parse it as a URL
+ conf = tryParse(conf);
+ } else if (conf) {
+ // Passed object - take it but clone for future mutations
+ conf = clone(conf);
+ } else if (envVarProxy) {
+ // Nothing passed - parse from the env
+ conf = tryParse(envVarProxy);
+ } else {
+ log('No configuration found, not proxying');
+ // No config - do nothing
+ return;
+ }
+
+ log('Proxy configuration to be used is ' + JSON.stringify(conf, null, 2));
+
+ if (!conf.host) {
+ throw new Error('upstream proxy host is required');
+ }
+ if (!conf.port) {
+ throw new Error('upstream proxy port is required');
+ }
+
+ if (conf.protocol === undefined) {
+ conf.protocol = 'http:'; // Default to proxy speaking http
+ }
+ if (!/:$/.test(conf.protocol)) {
+ conf.protocol += ':';
+ }
+
+ if (!conf.connect) {
+ conf.connect = 'https'; // Just HTTPS by default
+ }
+
+ if (['both', 'neither', 'https'].indexOf(conf.connect) < 0) {
+ throw new Error('valid connect options are "neither", "https", or "both"');
+ }
+
+ var connectHttp = conf.connect === 'both';
+ var connectHttps = conf.connect !== 'neither';
+
+ if (conf.httpsOptions) {
+ conf.innerHttpsOpts = conf.httpsOptions;
+ conf.outerHttpsOpts = conf.innerHttpsOpts;
+ }
+
+ http.globalAgent = globalTunnel._makeAgent(conf, 'http', connectHttp);
+ https.globalAgent = globalTunnel._makeAgent(conf, 'https', connectHttps);
+
+ http.request = globalTunnel._makeHttp('request', http, 'http');
+ https.request = globalTunnel._makeHttp('request', https, 'https');
+ http.get = globalTunnel._makeHttp('get', http, 'http');
+ https.get = globalTunnel._makeHttp('get', https, 'https');
+
+ globalTunnel.isProxying = true;
+ globalTunnel.proxyUrl = stringifyProxy(conf);
+ globalTunnel.proxyConfig = clone(conf);
+ } catch (e) {
+ resetGlobals();
+ throw e;
+ }
+};
+
+var _makeAgent = function(conf, innerProtocol, useCONNECT) {
+ log('Creating proxying agent');
+ var outerProtocol = conf.protocol;
+ innerProtocol += ':';
+
+ var opts = {
+ proxy: pick(conf, 'host', 'port', 'protocol', 'localAddress', 'proxyAuth'),
+ maxSockets: conf.sockets
+ };
+ opts.proxy.innerProtocol = innerProtocol;
+
+ if (useCONNECT) {
+ if (conf.proxyHttpsOptions) {
+ assign(opts.proxy, conf.proxyHttpsOptions);
+ }
+ if (conf.originHttpsOptions) {
+ assign(opts, conf.originHttpsOptions);
+ }
+
+ if (outerProtocol === 'https:') {
+ if (innerProtocol === 'https:') {
+ return tunnel.httpsOverHttps(opts);
+ }
+ return tunnel.httpOverHttps(opts);
+ }
+ if (innerProtocol === 'https:') {
+ return tunnel.httpsOverHttp(opts);
+ }
+ return tunnel.httpOverHttp(opts);
+ }
+ if (conf.originHttpsOptions) {
+ throw new Error('originHttpsOptions must be combined with a tunnel:true option');
+ }
+ if (conf.proxyHttpsOptions) {
+ // NB: not opts.
+ assign(opts, conf.proxyHttpsOptions);
+ }
+
+ if (outerProtocol === 'https:') {
+ return new agents.OuterHttpsAgent(opts);
+ }
+ return new agents.OuterHttpAgent(opts);
+};
+
+/**
+ * Construct an agent based on:
+ * - is the connection to the proxy secure?
+ * - is the connection to the origin secure?
+ * - the address of the proxy
+ */
+globalTunnel._makeAgent = function(conf, innerProtocol, useCONNECT) {
+ var agent = _makeAgent(conf, innerProtocol, useCONNECT);
+ // Set the protocol to match that of the target request type
+ agent.protocol = innerProtocol + ':';
+ return agent;
+};
+
+/**
+ * Override for http/https, makes sure to default the agent
+ * to the global agent. Due to how node implements it in lib/http.js, the
+ * globalAgent we define won't get used (node uses a module-scoped variable,
+ * not the exports field).
+ * @param {string} method 'request' or 'get', http/https methods
+ * @param {string|object} options http/https request url or options
+ * @param {function} [cb]
+ * @private
+ */
+globalTunnel._makeHttp = function(method, httpOrHttps, protocol) {
+ return function(options, callback) {
+ if (typeof options === 'string') {
+ options = urlParse(options);
+ } else {
+ options = clone(options);
+ }
+
+ // Respect the default agent provided by node's lib/https.js
+ if (
+ (options.agent === null || options.agent === undefined) &&
+ typeof options.createConnection !== 'function' &&
+ (options.host || options.hostname)
+ ) {
+ options.agent = options._defaultAgent || httpOrHttps.globalAgent;
+ }
+
+ // Set the default port ourselves to prevent Node doing it based on the proxy agent protocol
+ if (options.protocol === 'https:' || (!options.protocol && protocol === 'https')) {
+ options.port = options.port || 443;
+ }
+ if (options.protocol === 'http:' || (!options.protocol && protocol === 'http')) {
+ options.port = options.port || 80;
+ }
+
+ log(
+ 'Requesting to ' +
+ (options.protocol || protocol) +
+ '//' +
+ (options.host || options.hostname) +
+ ':' +
+ options.port
+ );
+
+ return ORIGINALS[protocol][method].call(httpOrHttps, options, callback);
+ };
+};
+
+/**
+ * Restores global http/https agents.
+ */
+globalTunnel.end = function() {
+ resetGlobals();
+ globalTunnel.isProxying = false;
+ globalTunnel.proxyUrl = null;
+ globalTunnel.proxyConfig = null;
+};
diff --git a/node_modules/global-tunnel-ng/lib/agents.js b/node_modules/global-tunnel-ng/lib/agents.js
new file mode 100644
index 0000000..28bea61
--- /dev/null
+++ b/node_modules/global-tunnel-ng/lib/agents.js
@@ -0,0 +1,52 @@
+/* jshint node:true */
+'use strict';
+
+var util = require('util');
+var http = require('http');
+var HttpAgent = http.Agent;
+var https = require('https');
+var HttpsAgent = https.Agent;
+
+var pick = require('lodash/pick');
+
+/**
+ * Proxy some traffic over HTTP.
+ */
+function OuterHttpAgent(opts) {
+ HttpAgent.call(this, opts);
+ mixinProxying(this, opts.proxy);
+}
+util.inherits(OuterHttpAgent, HttpAgent);
+exports.OuterHttpAgent = OuterHttpAgent;
+
+/**
+ * Proxy some traffic over HTTPS.
+ */
+function OuterHttpsAgent(opts) {
+ HttpsAgent.call(this, opts);
+ mixinProxying(this, opts.proxy);
+}
+util.inherits(OuterHttpsAgent, HttpsAgent);
+exports.OuterHttpsAgent = OuterHttpsAgent;
+
+/**
+ * Override createConnection and addRequest methods on the supplied agent.
+ * http.Agent and https.Agent will set up createConnection in the constructor.
+ */
+function mixinProxying(agent, proxyOpts) {
+ agent.proxy = proxyOpts;
+
+ var orig = pick(agent, 'createConnection', 'addRequest');
+
+ // Make the tcp or tls connection go to the proxy, ignoring the
+ // destination host:port arguments.
+ agent.createConnection = function(port, host, options) {
+ return orig.createConnection.call(this, this.proxy.port, this.proxy.host, options);
+ };
+
+ agent.addRequest = function(req, options) {
+ req.path =
+ this.proxy.innerProtocol + '//' + options.host + ':' + options.port + req.path;
+ return orig.addRequest.call(this, req, options);
+ };
+}
diff --git a/node_modules/global-tunnel-ng/package.json b/node_modules/global-tunnel-ng/package.json
new file mode 100644
index 0000000..edd3dca
--- /dev/null
+++ b/node_modules/global-tunnel-ng/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "global-tunnel-ng",
+ "version": "2.7.1",
+ "description": "Global HTTP & HTTPS tunneling",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/np-maintain/global-tunnel.git"
+ },
+ "engines": {
+ "node": ">=0.10"
+ },
+ "dependencies": {
+ "encodeurl": "^1.0.2",
+ "lodash": "^4.17.10",
+ "npm-conf": "^1.1.3",
+ "tunnel": "^0.0.6"
+ },
+ "devDependencies": {
+ "chai": "^4.1.2",
+ "eslint": "^5.1.0",
+ "eslint-config-prettier": "^3.0.0",
+ "eslint-config-xo": "^0.25.0",
+ "eslint-plugin-prettier": "^3.0.0",
+ "mocha": "^5.2.0",
+ "prettier": "^1.13.7",
+ "request": "^2.83.0",
+ "sinon": "^6.0.1"
+ },
+ "scripts": {
+ "test": "mocha test"
+ },
+ "eslintConfig": {
+ "extends": [
+ "xo",
+ "prettier"
+ ],
+ "env": {
+ "mocha": true,
+ "node": true
+ },
+ "rules": {
+ "prettier/prettier": [
+ "error",
+ {
+ "singleQuote": true,
+ "printWidth": 90
+ }
+ ]
+ },
+ "plugins": [
+ "prettier"
+ ]
+ },
+ "keywords": [
+ "http",
+ "https",
+ "tunnel",
+ "global"
+ ],
+ "author": "GoInstant Inc., a salesforce.com company",
+ "license": "BSD-3-Clause"
+}
diff --git a/node_modules/global-tunnel-ng/test/end-to-end.js b/node_modules/global-tunnel-ng/test/end-to-end.js
new file mode 100644
index 0000000..be91f7d
--- /dev/null
+++ b/node_modules/global-tunnel-ng/test/end-to-end.js
@@ -0,0 +1,71 @@
+// Use this tests for troubleshooting, you'll need a proxy runnig at an endpoint
+// The idea is to make sure the tests pass if the proxy is turned on, that means the requests are resolving
+// And also the tests should fail if the proxy is turned off, that means the requests are actually being proxied
+
+const globalTunnel = require('../index');
+const assert = require('chai').assert;
+const request = require('request');
+const http = require('http');
+const https = require('https');
+
+// You need to have a proxy running at the Proxy URL.
+const proxyUrl = 'http://localhost:8080';
+const resourceUrl = 'www.google.com';
+
+describe.skip('end-to-end tests', () => {
+ beforeEach(() => {
+ globalTunnel.initialize(proxyUrl);
+ });
+
+ const httpResourceUrl = (secure = false) => `http${secure ? 's' : ''}://${resourceUrl}`;
+
+ const testHttp = (httpMethod = 'request') => (secure = false) => () =>
+ new Promise((resolve, reject) => {
+ const request = (secure ? https : http)[httpMethod](
+ httpResourceUrl(secure),
+ response => {
+ assert.isAtLeast(response.statusCode, 200);
+ assert.isBelow(response.statusCode, 300);
+
+ let buffer = Buffer.alloc(0);
+
+ response.on('data', chunk => {
+ buffer = Buffer.concat([buffer, chunk]);
+ });
+ response.on('end', () => {
+ assert.isNotEmpty(buffer.toString());
+ resolve();
+ });
+ }
+ );
+
+ request.on('error', reject);
+
+ if (httpMethod === 'request') {
+ request.end();
+ }
+ });
+
+ const testHttpRequest = testHttp();
+ const testHttpGet = testHttp('get');
+
+ it('proxies http.get', testHttpGet());
+ it('proxies https.get', testHttpGet(true));
+ it('proxies http.request', testHttpRequest());
+ it('proxies https.request', testHttpRequest(true));
+
+ it('proxies request', () =>
+ new Promise((resolve, reject) => {
+ request.get({ url: httpResourceUrl(true) }, err => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve();
+ }
+ });
+ }));
+
+ afterEach(() => {
+ globalTunnel.end();
+ });
+});
diff --git a/node_modules/global-tunnel-ng/test/index.js b/node_modules/global-tunnel-ng/test/index.js
new file mode 100644
index 0000000..dccacfa
--- /dev/null
+++ b/node_modules/global-tunnel-ng/test/index.js
@@ -0,0 +1,535 @@
+'use strict';
+var assert = require('chai').assert;
+var sinon = require('sinon');
+var assign = require('lodash/assign');
+var pick = require('lodash/pick');
+
+// Deliberate: node and 3rd party modules before global-tunnel
+var EventEmitter = require('events').EventEmitter;
+var net = require('net');
+var tls = require('tls');
+var http = require('http');
+var globalHttpAgent = http.globalAgent;
+var https = require('https');
+var globalHttpsAgent = https.globalAgent;
+var request = require('request');
+
+// Deliberate: load after all 3rd party modules
+var globalTunnel = require('../index');
+
+function newFakeAgent() {
+ var fakeAgent = {
+ addRequest: sinon.stub()
+ };
+ return fakeAgent;
+}
+
+// This function replaces 'host' by 'hostname' in the options for http.request()
+// background: http.request() allows to use either 'host' or 'hostname' to be used,
+// both needs to be tested
+function replaceHostByHostname(useHostname, options) {
+ if (useHostname) {
+ options.hostname = options.host;
+ delete options.host;
+ }
+ return options;
+}
+
+var origEnv;
+function saveEnv() {
+ origEnv = process.env.http_proxy;
+ delete process.env.http_proxy;
+}
+function restoreEnv() {
+ if (origEnv !== undefined) {
+ process.env.http_proxy = origEnv; // eslint-disable-line camelcase
+ }
+}
+
+describe('global-proxy', function() {
+ // Save and restore http_proxy environment variable (yes, it's lower-case by
+ // convention).
+ before(saveEnv);
+ after(restoreEnv);
+
+ // Sinon setup & teardown
+ var sandbox;
+ var origHttpCreateConnection;
+
+ before(function() {
+ sandbox = sinon.createSandbox();
+
+ sandbox.stub(globalHttpAgent, 'addRequest');
+ sandbox.stub(globalHttpsAgent, 'addRequest');
+
+ assert.equal(http.Agent.prototype.addRequest, https.Agent.prototype.addRequest);
+ sandbox.spy(http.Agent.prototype, 'addRequest');
+
+ sandbox.stub(net, 'createConnection').callsFake(function() {
+ return new EventEmitter();
+ });
+ sandbox.stub(tls, 'connect').callsFake(function() {
+ return new EventEmitter();
+ });
+
+ // This is needed as at some point Node HTTP aggent implementation started
+ // plucking the createConnection method from the `net` module
+ // instead of doing `net.createConnection`
+ origHttpCreateConnection = http.Agent.prototype.createConnection;
+ http.Agent.prototype.createConnection = net.createConnection;
+ });
+
+ afterEach(function() {
+ sandbox.resetHistory();
+ });
+
+ after(function() {
+ sandbox.restore();
+ http.Agent.prototype.createConnection = origHttpCreateConnection;
+ });
+
+ describe('invalid configs', function() {
+ it('requires a host', function() {
+ var conf = { host: null, port: 1234 };
+ assert.throws(function() {
+ globalTunnel.initialize(conf);
+ }, 'upstream proxy host is required');
+ globalTunnel.end();
+ });
+
+ it('requires a port', function() {
+ var conf = { host: '10.2.3.4', port: 0 };
+ assert.throws(function() {
+ globalTunnel.initialize(conf);
+ }, 'upstream proxy port is required');
+ globalTunnel.end();
+ });
+
+ it('clamps tunnel types', function() {
+ var conf = { host: '10.2.3.4', port: 1234, connect: 'INVALID' };
+ assert.throws(function() {
+ globalTunnel.initialize(conf);
+ }, 'valid connect options are "neither", "https", or "both"');
+ globalTunnel.end();
+ });
+ });
+
+ describe('exposed config', function() {
+ afterEach(function() {
+ globalTunnel.end();
+ });
+
+ it('has the same params as the passed config', function() {
+ var conf = {
+ host: 'proxy.com',
+ port: 1234,
+ proxyAuth: 'user:pwd',
+ protocol: 'https:'
+ };
+ globalTunnel.initialize(conf);
+ assert.deepEqual(
+ conf,
+ pick(globalTunnel.proxyConfig, ['host', 'port', 'proxyAuth', 'protocol'])
+ );
+ });
+
+ it('has the expected defaults', function() {
+ var conf = { host: 'proxy.com', port: 1234, proxyAuth: 'user:pwd' };
+ globalTunnel.initialize(conf);
+ assert.equal(globalTunnel.proxyConfig.protocol, 'http:');
+ });
+ });
+
+ describe('stringified config', function() {
+ afterEach(function() {
+ globalTunnel.end();
+ });
+
+ it('has the same params as the passed config', function() {
+ var conf = {
+ host: 'proxy.com',
+ port: 1234,
+ proxyAuth: 'user:pwd',
+ protocol: 'https'
+ };
+ globalTunnel.initialize(conf);
+ assert.equal(globalTunnel.proxyUrl, 'https://user:pwd@proxy.com:1234');
+ });
+
+ it('encodes url', function() {
+ var conf = {
+ host: 'proxy.com',
+ port: 1234,
+ proxyAuth: 'user:4P@S$W0_r-D',
+ protocol: 'https'
+ };
+ globalTunnel.initialize(conf);
+ assert.equal(globalTunnel.proxyUrl, 'https://user:4P%40S%24W0_r-D@proxy.com:1234');
+ });
+ });
+
+ function proxyEnabledTests(testParams) {
+ function connected(innerProto) {
+ var innerSecure = innerProto === 'https:';
+
+ var called;
+ if (testParams.isHttpsProxy) {
+ called = tls.connect;
+ sinon.assert.notCalled(net.createConnection);
+ } else {
+ called = net.createConnection;
+ sinon.assert.notCalled(tls.connect);
+ }
+
+ sinon.assert.calledOnce(called);
+ if (typeof called.getCall(0).args[0] === 'object') {
+ sinon.assert.calledWith(called, sinon.match.has('port', testParams.port));
+ sinon.assert.calledWith(called, sinon.match.has('host', '10.2.3.4'));
+ } else {
+ sinon.assert.calledWith(called, testParams.port, '10.2.3.4');
+ }
+
+ var isCONNECT =
+ testParams.connect === 'both' || (innerSecure && testParams.connect === 'https');
+ if (isCONNECT) {
+ var expectConnect = 'example.dev:' + (innerSecure ? 443 : 80);
+ var whichAgent = innerSecure ? https.globalAgent : http.globalAgent;
+
+ sinon.assert.calledOnce(whichAgent.request);
+ sinon.assert.calledWith(whichAgent.request, sinon.match.has('method', 'CONNECT'));
+ sinon.assert.calledWith(
+ whichAgent.request,
+ sinon.match.has('path', expectConnect)
+ );
+ } else {
+ sinon.assert.calledOnce(http.Agent.prototype.addRequest);
+ var req = http.Agent.prototype.addRequest.getCall(0).args[0];
+
+ var method = req.method;
+ assert.equal(method, 'GET');
+
+ var path = req.path;
+ if (innerSecure) {
+ assert.match(path, new RegExp('^https://example\\.dev:443/'));
+ } else {
+ assert.match(path, new RegExp('^http://example\\.dev:80/'));
+ }
+ }
+ }
+
+ var localSandbox;
+ beforeEach(function() {
+ localSandbox = sinon.createSandbox();
+ if (testParams.connect === 'both') {
+ localSandbox.spy(http.globalAgent, 'request');
+ }
+ if (testParams.connect !== 'neither') {
+ localSandbox.spy(https.globalAgent, 'request');
+ }
+ });
+ afterEach(function() {
+ localSandbox.restore();
+ });
+
+ it('(got proxying set up)', function() {
+ assert.isTrue(globalTunnel.isProxying);
+ });
+
+ describe('with the request library', function() {
+ it('will proxy http requests', function(done) {
+ assert.isTrue(globalTunnel.isProxying);
+ var dummyCb = sinon.stub();
+ request.get('http://example.dev/', dummyCb);
+ setImmediate(function() {
+ connected('http:');
+ sinon.assert.notCalled(globalHttpAgent.addRequest);
+ sinon.assert.notCalled(globalHttpsAgent.addRequest);
+ done();
+ });
+ });
+
+ it('will proxy https requests', function(done) {
+ assert.isTrue(globalTunnel.isProxying);
+ var dummyCb = sinon.stub();
+ request.get('https://example.dev/', dummyCb);
+ setImmediate(function() {
+ connected('https:');
+ sinon.assert.notCalled(globalHttpAgent.addRequest);
+ sinon.assert.notCalled(globalHttpsAgent.addRequest);
+ done();
+ });
+ });
+ });
+
+ describe('using raw request interface', function() {
+ function rawRequest(useHostname) {
+ var req = http.request(
+ replaceHostByHostname(useHostname, {
+ method: 'GET',
+ path: '/raw-http',
+ host: 'example.dev'
+ }),
+ function() {}
+ );
+ req.end();
+
+ connected('http:');
+ sinon.assert.notCalled(globalHttpAgent.addRequest);
+ sinon.assert.notCalled(globalHttpsAgent.addRequest);
+ }
+ it('will proxy http requests (`host`)', function() {
+ rawRequest(false);
+ });
+ it('will proxy http requests (`hostname`)', function() {
+ rawRequest(true);
+ });
+
+ it('will proxy https requests', function() {
+ var req = https.request(
+ replaceHostByHostname(false, {
+ method: 'GET',
+ path: '/raw-https',
+ host: 'example.dev'
+ }),
+ function() {}
+ );
+ req.end();
+
+ connected('https:');
+ sinon.assert.notCalled(globalHttpAgent.addRequest);
+ sinon.assert.notCalled(globalHttpsAgent.addRequest);
+ });
+
+ it('request respects explicit agent param', function() {
+ var agent = newFakeAgent();
+ var req = http.request(
+ replaceHostByHostname(false, {
+ method: 'GET',
+ path: '/raw-http-w-agent',
+ host: 'example.dev',
+ agent: agent
+ }),
+ function() {}
+ );
+ req.end();
+
+ sinon.assert.notCalled(globalHttpAgent.addRequest);
+ sinon.assert.notCalled(globalHttpsAgent.addRequest);
+ sinon.assert.notCalled(net.createConnection);
+ sinon.assert.notCalled(tls.connect);
+ sinon.assert.calledOnce(agent.addRequest);
+ });
+
+ describe('request with `null` agent and defined `createConnection`', function() {
+ before(function() {
+ sinon.stub(http.ClientRequest.prototype, 'onSocket');
+ });
+ after(function() {
+ http.ClientRequest.prototype.onSocket.restore();
+ });
+
+ function noAgent(useHostname) {
+ var createConnection = sinon.stub();
+ var req = http.request(
+ replaceHostByHostname(useHostname, {
+ method: 'GET',
+ path: '/no-agent',
+ host: 'example.dev',
+ agent: null,
+ createConnection: createConnection
+ }),
+ function() {} // eslint-disable-line max-nested-callbacks
+ );
+ req.end();
+
+ sinon.assert.notCalled(globalHttpAgent.addRequest);
+ sinon.assert.notCalled(globalHttpsAgent.addRequest);
+ sinon.assert.calledOnce(createConnection);
+ }
+ it('uses no agent (`host`)', function() {
+ noAgent(false);
+ });
+ it('uses no agent (`hostname`)', function() {
+ noAgent(true);
+ });
+ });
+ });
+ }
+
+ function enabledBlock(conf, testParams) {
+ before(function() {
+ globalTunnel.initialize(conf);
+ });
+ after(function() {
+ globalTunnel.end();
+ });
+
+ testParams = assign(
+ {
+ port: conf && conf.port,
+ isHttpsProxy: conf && conf.protocol === 'https:',
+ connect: (conf && conf.connect) || 'https'
+ },
+ testParams
+ );
+
+ proxyEnabledTests(testParams);
+ }
+
+ describe('with http proxy in intercept mode', function() {
+ enabledBlock({
+ connect: 'neither',
+ protocol: 'http:',
+ host: '10.2.3.4',
+ port: 3333
+ });
+ });
+
+ describe('with https proxy in intercept mode', function() {
+ enabledBlock({
+ connect: 'neither',
+ protocol: 'https:',
+ host: '10.2.3.4',
+ port: 3334
+ });
+ });
+
+ describe('with http proxy in CONNECT mode', function() {
+ enabledBlock({
+ connect: 'both',
+ protocol: 'http:',
+ host: '10.2.3.4',
+ port: 3335
+ });
+ });
+
+ describe('with https proxy in CONNECT mode', function() {
+ enabledBlock({
+ connect: 'both',
+ protocol: 'https:',
+ host: '10.2.3.4',
+ port: 3336
+ });
+ });
+
+ describe('with http proxy in mixed mode', function() {
+ enabledBlock({
+ protocol: 'http:',
+ host: '10.2.3.4',
+ port: 3337
+ });
+ });
+
+ describe('with https proxy in mixed mode', function() {
+ enabledBlock({
+ protocol: 'https:',
+ host: '10.2.3.4',
+ port: 3338
+ });
+ });
+
+ describe('using env var', function() {
+ after(function() {
+ delete process.env.http_proxy;
+ assert.isUndefined(process.env.http_proxy);
+ });
+
+ describe('for http', function() {
+ before(function() {
+ process.env.http_proxy = 'http://10.2.3.4:1234'; // eslint-disable-line camelcase
+ });
+ enabledBlock(null, { isHttpsProxy: false, connect: 'https', port: 1234 });
+ });
+
+ describe('for https', function() {
+ before(function() {
+ process.env.http_proxy = 'https://10.2.3.4:1235'; // eslint-disable-line camelcase
+ });
+ enabledBlock(null, { isHttpsProxy: true, connect: 'https', port: 1235 });
+ });
+ });
+
+ describe('using npm config', function() {
+ var expectedProxy = { isHttpsProxy: false, connect: 'https', port: 1234 };
+ var npmConfig = { get: function() {} };
+ var npmConfigStub = sinon.stub(npmConfig, 'get');
+
+ function configNpm(key, value) {
+ return function() {
+ global.__GLOBAL_TUNNEL_DEPENDENCY_NPMCONF__ = function() {
+ return npmConfig;
+ };
+
+ npmConfigStub.withArgs(key).returns(value || 'http://10.2.3.4:1234');
+ };
+ }
+
+ after(function() {
+ global.__GLOBAL_TUNNEL_DEPENDENCY_NPMCONF__ = undefined;
+ });
+
+ describe('https-proxy', function() {
+ before(configNpm('https-proxy'));
+ enabledBlock(null, expectedProxy);
+ });
+
+ describe('http-proxy', function() {
+ before(configNpm('http-proxy'));
+ enabledBlock(null, expectedProxy);
+ });
+
+ describe('proxy', function() {
+ before(configNpm('proxy'));
+ enabledBlock(null, expectedProxy);
+ });
+ describe('order', function() {
+ before(function() {
+ configNpm('proxy')();
+ configNpm('https-proxy', 'http://10.2.3.4:12345')();
+ configNpm('http-proxy')();
+ });
+
+ enabledBlock(null, { isHttpsProxy: false, connect: 'https', port: 12345 });
+ });
+
+ describe('also using env var', function() {
+ before(function() {
+ configNpm('proxy')();
+ process.env.http_proxy = 'http://10.2.3.4:1234'; // eslint-disable-line camelcase
+ });
+
+ after(function() {
+ delete process.env.http_proxy;
+ });
+
+ enabledBlock(null, expectedProxy);
+ });
+ });
+
+ // Deliberately after the block above
+ describe('with proxy disabled', function() {
+ it('claims to be disabled', function() {
+ assert.isFalse(globalTunnel.isProxying);
+ });
+
+ it('will NOT proxy http requests', function(done) {
+ var dummyCb = sinon.stub();
+ request.get('http://example.dev/', dummyCb);
+ setImmediate(function() {
+ sinon.assert.calledOnce(globalHttpAgent.addRequest);
+ sinon.assert.notCalled(globalHttpsAgent.addRequest);
+ done();
+ });
+ });
+
+ it('will NOT proxy https requests', function(done) {
+ var dummyCb = sinon.stub();
+ request.get('https://example.dev/', dummyCb);
+ setImmediate(function() {
+ sinon.assert.notCalled(globalHttpAgent.addRequest);
+ sinon.assert.calledOnce(globalHttpsAgent.addRequest);
+ done();
+ });
+ });
+ });
+});
diff --git a/node_modules/globalthis/.eslintrc b/node_modules/globalthis/.eslintrc
new file mode 100644
index 0000000..afbd40a
--- /dev/null
+++ b/node_modules/globalthis/.eslintrc
@@ -0,0 +1,18 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "env": {
+ "browser": true,
+ "node": true,
+ },
+
+ "ignorePatterns": [
+ "dist",
+ ],
+
+ "rules": {
+ "max-statements-per-line": [2, { "max": 2 }]
+ }
+}
diff --git a/node_modules/globalthis/.nycrc b/node_modules/globalthis/.nycrc
new file mode 100644
index 0000000..726d82b
--- /dev/null
+++ b/node_modules/globalthis/.nycrc
@@ -0,0 +1,10 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "dist",
+ "test"
+ ]
+}
diff --git a/node_modules/globalthis/CHANGELOG.md b/node_modules/globalthis/CHANGELOG.md
new file mode 100644
index 0000000..b2962da
--- /dev/null
+++ b/node_modules/globalthis/CHANGELOG.md
@@ -0,0 +1,96 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v1.0.3](https://github.com/es-shims/globalThis/compare/v1.0.2...v1.0.3) - 2022-05-07
+
+### Commits
+
+- [actions] reuse common workflows [`65891e4`](https://github.com/es-shims/globalThis/commit/65891e4d285ae04e216ff01160cff861e0e41a4f)
+- [actions] use `node/install` instead of `node/run`; use `codecov` action [`82f8481`](https://github.com/es-shims/globalThis/commit/82f84815027f666f625e1ccb41f723800a05d016)
+- [meta] use `npmignore` to autogenerate an npmignore file [`53afc39`](https://github.com/es-shims/globalThis/commit/53afc39bfd3eb262c5e6e9dfd25e4f81f3578c1c)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`03169d4`](https://github.com/es-shims/globalThis/commit/03169d4254c9ef177d6537becca5b0b56df50d91)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`4986e3e`](https://github.com/es-shims/globalThis/commit/4986e3e20c5f664601871a0fac68c1efd0a68472)
+- [actions] update codecov uploader [`15c4b06`](https://github.com/es-shims/globalThis/commit/15c4b062b1a9434dbec93604ed31b6893d11d458)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`8b04a74`](https://github.com/es-shims/globalThis/commit/8b04a749d3cb2f825920beb700899f0c13ad2fb8)
+- [Fix] `globalThis` should be writable [`8759985`](https://github.com/es-shims/globalThis/commit/87599852d5f91e2e1f06e424cdefcd443ec98476)
+- [readme] add github actions/codecov badges [`0263f0d`](https://github.com/es-shims/globalThis/commit/0263f0debfa982b928fcd301b11fe3e3193bf33d)
+- [Dev Deps] update `aud`, `eslint`, `tape` [`e88d296`](https://github.com/es-shims/globalThis/commit/e88d296bb026633bdd1be2e1542903a5d0107cd8)
+- [meta] use `prepublishOnly` script for npm 7+ [`c81fde6`](https://github.com/es-shims/globalThis/commit/c81fde6a9e44345e56dada588e16db736809ddd9)
+- [Tests] nycignore `dist` [`bde0c0d`](https://github.com/es-shims/globalThis/commit/bde0c0df46f684316ab414da1487a0cd2efe3eeb)
+- [meta] gitignore coverage output [`79f73f8`](https://github.com/es-shims/globalThis/commit/79f73f8b0c1180567fba473f92c07d71efd4dd0b)
+
+## [v1.0.2](https://github.com/es-shims/globalThis/compare/v1.0.1...v1.0.2) - 2021-02-22
+
+### Commits
+
+- [Tests] migrate tests to Github Actions [`a3f50f7`](https://github.com/es-shims/globalThis/commit/a3f50f77a392c0ffdaca18fb5881743b874d0a6f)
+- [meta] do not publish github action workflow files [`eb5c787`](https://github.com/es-shims/globalThis/commit/eb5c7879317cd7f1fde52228660be8e779c9d4e3)
+- [Tests] add `implementation` est; run `es-shim-api` in postlint; use `tape` runner [`c9dd792`](https://github.com/es-shims/globalThis/commit/c9dd792d492ec9744a5e5d5033e919b94d441bac)
+- [Tests] fix native tests [`6b76dff`](https://github.com/es-shims/globalThis/commit/6b76dff3af3fe9bcd7b24d48c6ba55116169e840)
+- [Tests] run `nyc` on all tests [`0407f79`](https://github.com/es-shims/globalThis/commit/0407f79f64bf9fc30111f3bf4dff7e4205331fb6)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape`, `browserify` [`b8cc020`](https://github.com/es-shims/globalThis/commit/b8cc020e5ecc2d5a5a5b4160aabc60cc42d50c03)
+- [actions] add "Allow Edits" workflow [`e2854df`](https://github.com/es-shims/globalThis/commit/e2854df653667b16ff34a7a0a7b677231dfe2b02)
+- [readme] remove travis badge [`262eb76`](https://github.com/es-shims/globalThis/commit/262eb76e4e0d3f2df354cc6aff1b18f50c7b147f)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`; add `safe-publish-latest` [`3c76883`](https://github.com/es-shims/globalThis/commit/3c7688325f6aa050afe3ed978e423e70974e4d3b)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`7276123`](https://github.com/es-shims/globalThis/commit/727612396262fc22275f44159ec5b39115dc359f)
+- [actions] update workflows [`bcb0f42`](https://github.com/es-shims/globalThis/commit/bcb0f42c319cf19746e03a6667cf25d3e835f46e)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5485851`](https://github.com/es-shims/globalThis/commit/548585148e874d6eb0b0463526a88e8b64e7c5eb)
+- [Dev Deps] update `auto-changelog`, `tape` [`6a01da3`](https://github.com/es-shims/globalThis/commit/6a01da3f321983d1970d793711d31cf8508ef94d)
+- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7a07f4e`](https://github.com/es-shims/globalThis/commit/7a07f4ebc5580933b40bbe67f357632e0f7d5586)
+- [meta] only run the build script in publish [`797e492`](https://github.com/es-shims/globalThis/commit/797e492519ed0bf6270537290e69ca0456790575)
+- [meta] combine duplicate `prepublish` scripts [`92bbef0`](https://github.com/es-shims/globalThis/commit/92bbef0f91f6e91163186f68b5f5f1ffd26c479d)
+- [Dev Deps] update `auto-changelog`; add `aud` [`be6dbec`](https://github.com/es-shims/globalThis/commit/be6dbecefddb40493c5568a2cbe83f74e2e0385f)
+- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfd54f8`](https://github.com/es-shims/globalThis/commit/bfd54f8388758e7dec618dc34956e7075a7c15f0)
+- [Tests] only audit prod deps [`0f64b47`](https://github.com/es-shims/globalThis/commit/0f64b47acfa812affbacbe487fcb0f6c02eccc25)
+
+## [v1.0.1](https://github.com/es-shims/globalThis/compare/v1.0.0...v1.0.1) - 2019-12-15
+
+### Fixed
+
+- [Refactor] only use `global` in node; only check browser globals in browsers [`#2`](https://github.com/es-shims/globalThis/issues/2)
+
+### Commits
+
+- [Tests] use shared travis-ci configs [`edb1cc9`](https://github.com/es-shims/globalThis/commit/edb1cc9d900a40e8c1732264b6e85d4f9760920c)
+- [Tests] remove `jscs` [`1847ac2`](https://github.com/es-shims/globalThis/commit/1847ac2487e2c13cf8bf717211c6a93fe60831f9)
+- [meta] add `auto-changelog` [`933c381`](https://github.com/es-shims/globalThis/commit/933c381083890965ac848d3da21ed9e910cc09cf)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `tape` [`93310bc`](https://github.com/es-shims/globalThis/commit/93310bc01ddacbe23a93b3022daebc9b6f6ae8c3)
+- [actions] add automatic rebasing / merge commit blocking [`231dec5`](https://github.com/es-shims/globalThis/commit/231dec511c42e1509035d176e2451c55de20bfe7)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `covert`, `is`, `tape` [`e50c1f6`](https://github.com/es-shims/globalThis/commit/e50c1f6d2d45c66f53ffda471bbf62c08ed15c9b)
+- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`4abd340`](https://github.com/es-shims/globalThis/commit/4abd3400fc8942963e77515d0cf2fbcac3cb7bc8)
+- [meta] add `funding` field [`2d1f9eb`](https://github.com/es-shims/globalThis/commit/2d1f9eb00b2dea46f6de7d563b31db17f44f1899)
+- [meta] remove unused deps [`5bd6bef`](https://github.com/es-shims/globalThis/commit/5bd6befefbaf0c7e6f70eb3c1919b5c5a271d29d)
+- readme: Fix casing + phrasing [`66379cc`](https://github.com/es-shims/globalThis/commit/66379ccf5008f7676aac5f3dec1ea2fe55e3516c)
+- [Deps] update `define-properties`, `object-keys` [`4585e5a`](https://github.com/es-shims/globalThis/commit/4585e5ab461093ab6c62ce0b22b959925e8f818c)
+- fix issue with Webpack's CaseSensitivePathsPlugin [`842e84e`](https://github.com/es-shims/globalThis/commit/842e84e0096c9eea660c78fd19c9c07799b81537)
+
+## v1.0.0 - 2018-08-10
+
+### Commits
+
+- Dotfiles. [`f01b02d`](https://github.com/es-shims/globalThis/commit/f01b02d315865c812e5b9158f71bb18f3b153def)
+- [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`; improve matrix [`ed1fa5d`](https://github.com/es-shims/globalThis/commit/ed1fa5d473d933b3270410b658183dc1c556a663)
+- Tests [`ab99527`](https://github.com/es-shims/globalThis/commit/ab99527e3c434e89dd40f8cba3b0e2e976156611)
+- [breaking] update property name, rename repo [`be42e3d`](https://github.com/es-shims/globalThis/commit/be42e3dce08b62a78260d487f62fa69b410d7918)
+- package.json [`ca43a36`](https://github.com/es-shims/globalThis/commit/ca43a363e3ce0dbc2d4623169f8cb3d792f8bc84)
+- implementation [`80b5a40`](https://github.com/es-shims/globalThis/commit/80b5a403ef532254b2af46ec3ba5f442a308a57d)
+- read me [`f6df9b3`](https://github.com/es-shims/globalThis/commit/f6df9b3b69977f04e080d1720ba1203c13447884)
+- Rename `System.global` to `global` [`fa8503c`](https://github.com/es-shims/globalThis/commit/fa8503cf94afe84b3729dd5b0e9f73f481fb1fee)
+- Initial commit [`99f1dc3`](https://github.com/es-shims/globalThis/commit/99f1dc328d0b4c52a550037de0139d5452ac01de)
+- [Tests] up to `node` `v6.7`, `v5.12`, `v4.6`; improve test matrix [`712ec0e`](https://github.com/es-shims/globalThis/commit/712ec0e545d1603c4e23f4ff1acb066cc4a3c9ee)
+- [Dev Deps] update `browserify`, `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`73278bd`](https://github.com/es-shims/globalThis/commit/73278bd638d1e762eb7415350a738f5d345896f5)
+- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `browserify`, `eslint`, `for-each`, `is`, `nsp`, `tape` [`75fa992`](https://github.com/es-shims/globalThis/commit/75fa9929be81afec43895c02e33d0b8a78f11d1f)
+- [Dev Deps] update `browserify`, `is`, `tape`, `nsp`, `eslint` [`b223e86`](https://github.com/es-shims/globalThis/commit/b223e86d0868efb1f0c966370ff2f822516d6956)
+- [Tests] fix linting; remove parallelshell [`271b329`](https://github.com/es-shims/globalThis/commit/271b329d174b94c08913060752a2e9f9116fe5b8)
+- [Deps] update `function-bind`, `object-keys` [`002d0c5`](https://github.com/es-shims/globalThis/commit/002d0c5685a83f97e014a8a07134eb621794c649)
+- Only apps should have lockfiles [`960f1d0`](https://github.com/es-shims/globalThis/commit/960f1d00598cbba5427849c863eb10b8de82fb1b)
+- [Tests] on `node` `v10.8` [`37fad9d`](https://github.com/es-shims/globalThis/commit/37fad9db9860c654efe0a32ec187f21730d5fed8)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`df28dfe`](https://github.com/es-shims/globalThis/commit/df28dfe7f0daf3db95a536a6ce64062bd706185d)
+- [New] add `auto` entry point [`86eb2ab`](https://github.com/es-shims/globalThis/commit/86eb2ab4c4dc2babff20ac436cf7fb7f8da7d2f2)
+- [Dev Deps] update `eslint` [`1bdc1aa`](https://github.com/es-shims/globalThis/commit/1bdc1aacfb94dcdc7bb61688c7634c435012e35d)
+- [Deps] update `object-keys` [`72cdbf5`](https://github.com/es-shims/globalThis/commit/72cdbf596b16103ee711d52b2b645b42efc08c51)
+- Update most common usage to invoke the function upon being required [`5026296`](https://github.com/es-shims/globalThis/commit/502629660da2c21cfb0f8ca233e2b9d427c052fe)
diff --git a/node_modules/globalthis/LICENSE b/node_modules/globalthis/LICENSE
new file mode 100644
index 0000000..44f679a
--- /dev/null
+++ b/node_modules/globalthis/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Jordan Harband
+
+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/globalthis/README.md b/node_modules/globalthis/README.md
new file mode 100644
index 0000000..6abffa0
--- /dev/null
+++ b/node_modules/globalthis/README.md
@@ -0,0 +1,70 @@
+# globalThis <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][npm-url]
+
+An ECMAScript spec-compliant polyfill/shim for `globalThis`. Invoke its "shim" method to shim `globalThis` if it is unavailable.
+
+This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec proposal](https://github.com/tc39/proposal-global).
+
+Most common usage:
+```js
+var globalThis = require('globalthis')(); // returns native globalThis if compliant
+ /* or */
+var globalThis = require('globalthis/polyfill')(); // returns native globalThis if compliant
+```
+
+## Example
+
+```js
+var assert = require('assert');
+
+// the below function is not CSP-compliant, but reliably gets the
+// global object in sloppy mode in every engine.
+var getGlobal = Function('return this');
+
+assert.equal(globalThis, getGlobal());
+```
+
+```js
+/* when `globalThis` is not present */
+var shimmedGlobal = require('globalthis').shim();
+ /* or */
+var shimmedGlobal = require('globalthis/shim')();
+
+assert.equal(shimmedGlobal, globalThis);
+assert.equal(shimmedGlobal, getGlobal());
+```
+
+```js
+/* when `globalThis` is present */
+var shimmedGlobal = require('globalthis').shim();
+
+assert.equal(shimmedGlobal, globalThis);
+assert.equal(shimmedGlobal, getGlobal());
+```
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+[npm-url]: https://npmjs.org/package/globalthis
+[npm-version-svg]: https://versionbadg.es/ljharb/globalThis.svg
+[deps-svg]: https://david-dm.org/ljharb/globalThis.svg?theme=shields.io
+[deps-url]: https://david-dm.org/ljharb/globalThis
+[dev-deps-svg]: https://david-dm.org/ljharb/globalThis/dev-status.svg?theme=shields.io
+[dev-deps-url]: https://david-dm.org/ljharb/globalThis#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/globalthis.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/globalthis.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/globalthis.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=globalthis
+[codecov-image]: https://codecov.io/gh/es-shims/globalThis/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/es-shims/globalThis/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/globalThis
+[actions-url]: https://github.com/es-shims/globalThis/actions
diff --git a/node_modules/globalthis/auto.js b/node_modules/globalthis/auto.js
new file mode 100644
index 0000000..8ebf606
--- /dev/null
+++ b/node_modules/globalthis/auto.js
@@ -0,0 +1,3 @@
+'use strict';
+
+require('./shim')();
diff --git a/node_modules/globalthis/implementation.browser.js b/node_modules/globalthis/implementation.browser.js
new file mode 100644
index 0000000..746a274
--- /dev/null
+++ b/node_modules/globalthis/implementation.browser.js
@@ -0,0 +1,11 @@
+/* eslint no-negated-condition: 0, no-new-func: 0 */
+
+'use strict';
+
+if (typeof self !== 'undefined') {
+ module.exports = self;
+} else if (typeof window !== 'undefined') {
+ module.exports = window;
+} else {
+ module.exports = Function('return this')();
+}
diff --git a/node_modules/globalthis/implementation.js b/node_modules/globalthis/implementation.js
new file mode 100644
index 0000000..46b8ceb
--- /dev/null
+++ b/node_modules/globalthis/implementation.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = global;
diff --git a/node_modules/globalthis/index.js b/node_modules/globalthis/index.js
new file mode 100644
index 0000000..7c73cef
--- /dev/null
+++ b/node_modules/globalthis/index.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var defineProperties = require('define-properties');
+
+var implementation = require('./implementation');
+var getPolyfill = require('./polyfill');
+var shim = require('./shim');
+
+var polyfill = getPolyfill();
+
+var getGlobal = function () { return polyfill; };
+
+defineProperties(getGlobal, {
+ getPolyfill: getPolyfill,
+ implementation: implementation,
+ shim: shim
+});
+
+module.exports = getGlobal;
diff --git a/node_modules/globalthis/package.json b/node_modules/globalthis/package.json
new file mode 100644
index 0000000..3750c43
--- /dev/null
+++ b/node_modules/globalthis/package.json
@@ -0,0 +1,97 @@
+{
+ "name": "globalthis",
+ "version": "1.0.3",
+ "author": "Jordan Harband <ljharb@gmail.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "description": "ECMAScript spec-compliant polyfill/shim for `globalThis`",
+ "license": "MIT",
+ "main": "index.js",
+ "browser": {
+ "./implementation": "./implementation.browser.js"
+ },
+ "scripts": {
+ "prepack": "npmignore --auto --commentLines=autogenerated",
+ "prepublishOnly": "safe-publish-latest && npm run build",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "pretest": "npm run lint",
+ "test": "npm run --silent tests-only",
+ "posttest": "aud --production",
+ "tests-only": "nyc tape 'test/**/*.js'",
+ "lint": "eslint --ext=js,mjs .",
+ "postlint": "es-shim-api --bound --property",
+ "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ljharb/System.global.git"
+ },
+ "keywords": [
+ "window",
+ "self",
+ "global",
+ "globalThis",
+ "System.global",
+ "global object",
+ "global this value",
+ "ECMAScript",
+ "es-shim API",
+ "polyfill",
+ "shim"
+ ],
+ "dependencies": {
+ "define-properties": "^1.1.3"
+ },
+ "devDependencies": {
+ "@es-shims/api": "^2.2.3",
+ "@ljharb/eslint-config": "^21.0.0",
+ "aud": "^2.0.0",
+ "auto-changelog": "^2.4.0",
+ "browserify": "^16.5.2",
+ "eslint": "=8.8.0",
+ "for-each": "^0.3.3",
+ "in-publish": "^2.0.1",
+ "is": "^3.3.0",
+ "nyc": "^10.3.2",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.5.3"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "iexplore/6.0..latest",
+ "firefox/3.0..6.0",
+ "firefox/15.0..latest",
+ "firefox/nightly",
+ "chrome/4.0..10.0",
+ "chrome/20.0..latest",
+ "chrome/canary",
+ "opera/10.0..latest",
+ "opera/next",
+ "safari/4.0..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2"
+ ]
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ },
+ "publishConfig": {
+ "ignore": [
+ "browserShim.js",
+ ".github/workflows"
+ ]
+ }
+}
diff --git a/node_modules/globalthis/polyfill.js b/node_modules/globalthis/polyfill.js
new file mode 100644
index 0000000..e2e706b
--- /dev/null
+++ b/node_modules/globalthis/polyfill.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var implementation = require('./implementation');
+
+module.exports = function getPolyfill() {
+ if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) {
+ return implementation;
+ }
+ return global;
+};
diff --git a/node_modules/globalthis/shim.js b/node_modules/globalthis/shim.js
new file mode 100644
index 0000000..7ccf455
--- /dev/null
+++ b/node_modules/globalthis/shim.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var define = require('define-properties');
+var getPolyfill = require('./polyfill');
+
+module.exports = function shimGlobal() {
+ var polyfill = getPolyfill();
+ if (define.supportsDescriptors) {
+ var descriptor = Object.getOwnPropertyDescriptor(polyfill, 'globalThis');
+ if (!descriptor || (descriptor.configurable && (descriptor.enumerable || !descriptor.writable || globalThis !== polyfill))) { // eslint-disable-line max-len
+ Object.defineProperty(polyfill, 'globalThis', {
+ configurable: true,
+ enumerable: false,
+ value: polyfill,
+ writable: true
+ });
+ }
+ } else if (typeof globalThis !== 'object' || globalThis !== polyfill) {
+ polyfill.globalThis = polyfill;
+ }
+ return polyfill;
+};
diff --git a/node_modules/globalthis/test/implementation.js b/node_modules/globalthis/test/implementation.js
new file mode 100644
index 0000000..36f1275
--- /dev/null
+++ b/node_modules/globalthis/test/implementation.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var implementation = require('../implementation');
+var test = require('tape');
+var runTests = require('./tests');
+
+test('implementation', function (t) {
+ runTests(implementation, t);
+
+ t.end();
+});
diff --git a/node_modules/globalthis/test/index.js b/node_modules/globalthis/test/index.js
new file mode 100644
index 0000000..dac0a10
--- /dev/null
+++ b/node_modules/globalthis/test/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var systemGlobal = require('../');
+var test = require('tape');
+var runTests = require('./tests');
+
+test('as a function', function (t) {
+ runTests(systemGlobal(), t);
+
+ t.end();
+});
diff --git a/node_modules/globalthis/test/native.js b/node_modules/globalthis/test/native.js
new file mode 100644
index 0000000..7a085ab
--- /dev/null
+++ b/node_modules/globalthis/test/native.js
@@ -0,0 +1,26 @@
+'use strict';
+
+var test = require('tape');
+var defineProperties = require('define-properties');
+var isEnumerable = Object.prototype.propertyIsEnumerable;
+
+var missing = {};
+var theGlobal = typeof globalThis === 'object' ? globalThis : missing;
+
+var runTests = require('./tests');
+
+test('native', { todo: theGlobal === missing }, function (t) {
+ if (theGlobal !== missing) {
+ t.equal(typeof theGlobal, 'object', 'globalThis is an object');
+ t.equal('globalThis' in theGlobal, true, 'globalThis is in globalThis');
+
+ t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
+ et.equal(false, isEnumerable.call(theGlobal, 'globalThis'), 'globalThis is not enumerable');
+ et.end();
+ });
+
+ runTests(theGlobal, t);
+ }
+
+ t.end();
+});
diff --git a/node_modules/globalthis/test/shimmed.js b/node_modules/globalthis/test/shimmed.js
new file mode 100644
index 0000000..24b3f34
--- /dev/null
+++ b/node_modules/globalthis/test/shimmed.js
@@ -0,0 +1,29 @@
+'use strict';
+
+require('../auto');
+
+var test = require('tape');
+var defineProperties = require('define-properties');
+var isEnumerable = Object.prototype.propertyIsEnumerable;
+
+var runTests = require('./tests');
+
+test('shimmed', function (t) {
+ t.equal(typeof globalThis, 'object', 'globalThis is an object');
+ t.equal('globalThis' in globalThis, true, 'globalThis is in globalThis');
+
+ t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
+ et.equal(false, isEnumerable.call(globalThis, 'globalThis'), 'globalThis.globalThis is not enumerable');
+ et.end();
+ });
+
+ t.test('writability', { skip: !defineProperties.supportsDescriptors }, function (wt) {
+ var desc = Object.getOwnPropertyDescriptor(globalThis, 'globalThis');
+ wt.equal(desc.writable, true, 'globalThis.globalThis is writable');
+ wt.end();
+ });
+
+ runTests(globalThis.globalThis, t);
+
+ t.end();
+});
diff --git a/node_modules/globalthis/test/tests.js b/node_modules/globalthis/test/tests.js
new file mode 100644
index 0000000..2189640
--- /dev/null
+++ b/node_modules/globalthis/test/tests.js
@@ -0,0 +1,36 @@
+/* jscs:disable requireUseStrict */
+/* eslint strict: 0, max-statements: 0 */
+
+module.exports = function (theGlobal, t) {
+ t.equal(typeof theGlobal, 'object', 'is an object');
+
+ t.test('built-in globals', function (st) {
+ st.equal(theGlobal.Math, Math, 'Math is on the global');
+ st.equal(theGlobal.JSON, JSON, 'JSON is on the global');
+ st.equal(theGlobal.String, String, 'String is on the global');
+ st.equal(theGlobal.Array, Array, 'Array is on the global');
+ st.equal(theGlobal.Number, Number, 'Number is on the global');
+ st.equal(theGlobal.Boolean, Boolean, 'Boolean is on the global');
+ st.equal(theGlobal.Object, Object, 'Object is on the global');
+ st.equal(theGlobal.Function, Function, 'Function is on the global');
+ st.equal(theGlobal.Date, Date, 'Date is on the global');
+ st.equal(theGlobal.RegExp, RegExp, 'RegExp is on the global');
+
+ if (typeof Symbol === 'undefined') {
+ st.comment('# SKIP Symbol is not supported');
+ } else {
+ st.equal(theGlobal.Symbol, Symbol, 'Symbol is on the global');
+ }
+ st.end();
+ });
+
+ t.test('custom property', function (st) {
+ var key = 'random_custom_key_' + new Date().getTime();
+ var semaphore = {};
+ /* eslint no-eval: 1 */
+ eval(key + ' = semaphore;');
+ st.equal(theGlobal[key], semaphore, 'global variable ends up on the global object');
+ delete theGlobal[key]; // eslint-disable-line no-param-reassign
+ st.end();
+ });
+};
diff --git a/node_modules/got/dist/source/as-promise/create-rejection.d.ts b/node_modules/got/dist/source/as-promise/create-rejection.d.ts
new file mode 100644
index 0000000..f125a77
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/create-rejection.d.ts
@@ -0,0 +1,2 @@
+import { CancelableRequest, BeforeErrorHook } from './types';
+export default function createRejection(error: Error, ...beforeErrorGroups: Array<BeforeErrorHook[] | undefined>): CancelableRequest<never>;
diff --git a/node_modules/got/dist/source/as-promise/create-rejection.js b/node_modules/got/dist/source/as-promise/create-rejection.js
new file mode 100644
index 0000000..ce62604
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/create-rejection.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const types_1 = require("./types");
+function createRejection(error, ...beforeErrorGroups) {
+ const promise = (async () => {
+ if (error instanceof types_1.RequestError) {
+ try {
+ for (const hooks of beforeErrorGroups) {
+ if (hooks) {
+ for (const hook of hooks) {
+ // eslint-disable-next-line no-await-in-loop
+ error = await hook(error);
+ }
+ }
+ }
+ }
+ catch (error_) {
+ error = error_;
+ }
+ }
+ throw error;
+ })();
+ const returnPromise = () => promise;
+ promise.json = returnPromise;
+ promise.text = returnPromise;
+ promise.buffer = returnPromise;
+ promise.on = returnPromise;
+ return promise;
+}
+exports.default = createRejection;
diff --git a/node_modules/got/dist/source/as-promise/index.d.ts b/node_modules/got/dist/source/as-promise/index.d.ts
new file mode 100644
index 0000000..f06720e
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/index.d.ts
@@ -0,0 +1,3 @@
+import { NormalizedOptions, CancelableRequest } from './types';
+export default function asPromise<T>(normalizedOptions: NormalizedOptions): CancelableRequest<T>;
+export * from './types';
diff --git a/node_modules/got/dist/source/as-promise/index.js b/node_modules/got/dist/source/as-promise/index.js
new file mode 100644
index 0000000..b4026d3
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/index.js
@@ -0,0 +1,175 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const events_1 = require("events");
+const is_1 = require("@sindresorhus/is");
+const PCancelable = require("p-cancelable");
+const types_1 = require("./types");
+const parse_body_1 = require("./parse-body");
+const core_1 = require("../core");
+const proxy_events_1 = require("../core/utils/proxy-events");
+const get_buffer_1 = require("../core/utils/get-buffer");
+const is_response_ok_1 = require("../core/utils/is-response-ok");
+const proxiedRequestEvents = [
+ 'request',
+ 'response',
+ 'redirect',
+ 'uploadProgress',
+ 'downloadProgress'
+];
+function asPromise(normalizedOptions) {
+ let globalRequest;
+ let globalResponse;
+ const emitter = new events_1.EventEmitter();
+ const promise = new PCancelable((resolve, reject, onCancel) => {
+ const makeRequest = (retryCount) => {
+ const request = new core_1.default(undefined, normalizedOptions);
+ request.retryCount = retryCount;
+ request._noPipe = true;
+ onCancel(() => request.destroy());
+ onCancel.shouldReject = false;
+ onCancel(() => reject(new types_1.CancelError(request)));
+ globalRequest = request;
+ request.once('response', async (response) => {
+ var _a;
+ response.retryCount = retryCount;
+ if (response.request.aborted) {
+ // Canceled while downloading - will throw a `CancelError` or `TimeoutError` error
+ return;
+ }
+ // Download body
+ let rawBody;
+ try {
+ rawBody = await get_buffer_1.default(request);
+ response.rawBody = rawBody;
+ }
+ catch (_b) {
+ // The same error is caught below.
+ // See request.once('error')
+ return;
+ }
+ if (request._isAboutToError) {
+ return;
+ }
+ // Parse body
+ const contentEncoding = ((_a = response.headers['content-encoding']) !== null && _a !== void 0 ? _a : '').toLowerCase();
+ const isCompressed = ['gzip', 'deflate', 'br'].includes(contentEncoding);
+ const { options } = request;
+ if (isCompressed && !options.decompress) {
+ response.body = rawBody;
+ }
+ else {
+ try {
+ response.body = parse_body_1.default(response, options.responseType, options.parseJson, options.encoding);
+ }
+ catch (error) {
+ // Fallback to `utf8`
+ response.body = rawBody.toString();
+ if (is_response_ok_1.isResponseOk(response)) {
+ request._beforeError(error);
+ return;
+ }
+ }
+ }
+ try {
+ for (const [index, hook] of options.hooks.afterResponse.entries()) {
+ // @ts-expect-error TS doesn't notice that CancelableRequest is a Promise
+ // eslint-disable-next-line no-await-in-loop
+ response = await hook(response, async (updatedOptions) => {
+ const typedOptions = core_1.default.normalizeArguments(undefined, {
+ ...updatedOptions,
+ retry: {
+ calculateDelay: () => 0
+ },
+ throwHttpErrors: false,
+ resolveBodyOnly: false
+ }, options);
+ // Remove any further hooks for that request, because we'll call them anyway.
+ // The loop continues. We don't want duplicates (asPromise recursion).
+ typedOptions.hooks.afterResponse = typedOptions.hooks.afterResponse.slice(0, index);
+ for (const hook of typedOptions.hooks.beforeRetry) {
+ // eslint-disable-next-line no-await-in-loop
+ await hook(typedOptions);
+ }
+ const promise = asPromise(typedOptions);
+ onCancel(() => {
+ promise.catch(() => { });
+ promise.cancel();
+ });
+ return promise;
+ });
+ }
+ }
+ catch (error) {
+ request._beforeError(new types_1.RequestError(error.message, error, request));
+ return;
+ }
+ globalResponse = response;
+ if (!is_response_ok_1.isResponseOk(response)) {
+ request._beforeError(new types_1.HTTPError(response));
+ return;
+ }
+ resolve(request.options.resolveBodyOnly ? response.body : response);
+ });
+ const onError = (error) => {
+ if (promise.isCanceled) {
+ return;
+ }
+ const { options } = request;
+ if (error instanceof types_1.HTTPError && !options.throwHttpErrors) {
+ const { response } = error;
+ resolve(request.options.resolveBodyOnly ? response.body : response);
+ return;
+ }
+ reject(error);
+ };
+ request.once('error', onError);
+ const previousBody = request.options.body;
+ request.once('retry', (newRetryCount, error) => {
+ var _a, _b;
+ if (previousBody === ((_a = error.request) === null || _a === void 0 ? void 0 : _a.options.body) && is_1.default.nodeStream((_b = error.request) === null || _b === void 0 ? void 0 : _b.options.body)) {
+ onError(error);
+ return;
+ }
+ makeRequest(newRetryCount);
+ });
+ proxy_events_1.default(request, emitter, proxiedRequestEvents);
+ };
+ makeRequest(0);
+ });
+ promise.on = (event, fn) => {
+ emitter.on(event, fn);
+ return promise;
+ };
+ const shortcut = (responseType) => {
+ const newPromise = (async () => {
+ // Wait until downloading has ended
+ await promise;
+ const { options } = globalResponse.request;
+ return parse_body_1.default(globalResponse, responseType, options.parseJson, options.encoding);
+ })();
+ Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise));
+ return newPromise;
+ };
+ promise.json = () => {
+ const { headers } = globalRequest.options;
+ if (!globalRequest.writableFinished && headers.accept === undefined) {
+ headers.accept = 'application/json';
+ }
+ return shortcut('json');
+ };
+ promise.buffer = () => shortcut('buffer');
+ promise.text = () => shortcut('text');
+ return promise;
+}
+exports.default = asPromise;
+__exportStar(require("./types"), exports);
diff --git a/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts b/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts
new file mode 100644
index 0000000..0b1e95f
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts
@@ -0,0 +1,3 @@
+import { NormalizedOptions, Defaults } from './types';
+declare const normalizeArguments: (options: NormalizedOptions, defaults?: Defaults | undefined) => NormalizedOptions;
+export default normalizeArguments;
diff --git a/node_modules/got/dist/source/as-promise/normalize-arguments.js b/node_modules/got/dist/source/as-promise/normalize-arguments.js
new file mode 100644
index 0000000..859feb9
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/normalize-arguments.js
@@ -0,0 +1,78 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const is_1 = require("@sindresorhus/is");
+const normalizeArguments = (options, defaults) => {
+ if (is_1.default.null_(options.encoding)) {
+ throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead');
+ }
+ is_1.assert.any([is_1.default.string, is_1.default.undefined], options.encoding);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.resolveBodyOnly);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.methodRewriting);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.isStream);
+ is_1.assert.any([is_1.default.string, is_1.default.undefined], options.responseType);
+ // `options.responseType`
+ if (options.responseType === undefined) {
+ options.responseType = 'text';
+ }
+ // `options.retry`
+ const { retry } = options;
+ if (defaults) {
+ options.retry = { ...defaults.retry };
+ }
+ else {
+ options.retry = {
+ calculateDelay: retryObject => retryObject.computedValue,
+ limit: 0,
+ methods: [],
+ statusCodes: [],
+ errorCodes: [],
+ maxRetryAfter: undefined
+ };
+ }
+ if (is_1.default.object(retry)) {
+ options.retry = {
+ ...options.retry,
+ ...retry
+ };
+ options.retry.methods = [...new Set(options.retry.methods.map(method => method.toUpperCase()))];
+ options.retry.statusCodes = [...new Set(options.retry.statusCodes)];
+ options.retry.errorCodes = [...new Set(options.retry.errorCodes)];
+ }
+ else if (is_1.default.number(retry)) {
+ options.retry.limit = retry;
+ }
+ if (is_1.default.undefined(options.retry.maxRetryAfter)) {
+ options.retry.maxRetryAfter = Math.min(
+ // TypeScript is not smart enough to handle `.filter(x => is.number(x))`.
+ // eslint-disable-next-line unicorn/no-fn-reference-in-iterator
+ ...[options.timeout.request, options.timeout.connect].filter(is_1.default.number));
+ }
+ // `options.pagination`
+ if (is_1.default.object(options.pagination)) {
+ if (defaults) {
+ options.pagination = {
+ ...defaults.pagination,
+ ...options.pagination
+ };
+ }
+ const { pagination } = options;
+ if (!is_1.default.function_(pagination.transform)) {
+ throw new Error('`options.pagination.transform` must be implemented');
+ }
+ if (!is_1.default.function_(pagination.shouldContinue)) {
+ throw new Error('`options.pagination.shouldContinue` must be implemented');
+ }
+ if (!is_1.default.function_(pagination.filter)) {
+ throw new TypeError('`options.pagination.filter` must be implemented');
+ }
+ if (!is_1.default.function_(pagination.paginate)) {
+ throw new Error('`options.pagination.paginate` must be implemented');
+ }
+ }
+ // JSON mode
+ if (options.responseType === 'json' && options.headers.accept === undefined) {
+ options.headers.accept = 'application/json';
+ }
+ return options;
+};
+exports.default = normalizeArguments;
diff --git a/node_modules/got/dist/source/as-promise/parse-body.d.ts b/node_modules/got/dist/source/as-promise/parse-body.d.ts
new file mode 100644
index 0000000..39d0b41
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/parse-body.d.ts
@@ -0,0 +1,3 @@
+import { ResponseType, Response, ParseJsonFunction } from './types';
+declare const parseBody: (response: Response, responseType: ResponseType, parseJson: ParseJsonFunction, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex" | undefined) => unknown;
+export default parseBody;
diff --git a/node_modules/got/dist/source/as-promise/parse-body.js b/node_modules/got/dist/source/as-promise/parse-body.js
new file mode 100644
index 0000000..cc2b806
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/parse-body.js
@@ -0,0 +1,25 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const types_1 = require("./types");
+const parseBody = (response, responseType, parseJson, encoding) => {
+ const { rawBody } = response;
+ try {
+ if (responseType === 'text') {
+ return rawBody.toString(encoding);
+ }
+ if (responseType === 'json') {
+ return rawBody.length === 0 ? '' : parseJson(rawBody.toString());
+ }
+ if (responseType === 'buffer') {
+ return rawBody;
+ }
+ throw new types_1.ParseError({
+ message: `Unknown body type '${responseType}'`,
+ name: 'Error'
+ }, response);
+ }
+ catch (error) {
+ throw new types_1.ParseError(error, response);
+ }
+};
+exports.default = parseBody;
diff --git a/node_modules/got/dist/source/as-promise/types.d.ts b/node_modules/got/dist/source/as-promise/types.d.ts
new file mode 100644
index 0000000..16bb4cb
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/types.d.ts
@@ -0,0 +1,256 @@
+/// <reference types="node" />
+import PCancelable = require('p-cancelable');
+import Request, { Options, Response, RequestError, RequestEvents } from '../core';
+/**
+All parsing methods supported by Got.
+*/
+export declare type ResponseType = 'json' | 'buffer' | 'text';
+export interface PaginationOptions<T, R> {
+ /**
+ All options accepted by `got.paginate()`.
+ */
+ pagination?: {
+ /**
+ A function that transform [`Response`](#response) into an array of items.
+ This is where you should do the parsing.
+
+ @default response => JSON.parse(response.body)
+ */
+ transform?: (response: Response<R>) => Promise<T[]> | T[];
+ /**
+ Checks whether the item should be emitted or not.
+
+ @default (item, allItems, currentItems) => true
+ */
+ filter?: (item: T, allItems: T[], currentItems: T[]) => boolean;
+ /**
+ The function takes three arguments:
+ - `response` - The current response object.
+ - `allItems` - An array of the emitted items.
+ - `currentItems` - Items from the current response.
+
+ It should return an object representing Got options pointing to the next page.
+ The options are merged automatically with the previous request, therefore the options returned `pagination.paginate(...)` must reflect changes only.
+ If there are no more pages, `false` should be returned.
+
+ @example
+ ```
+ const got = require('got');
+
+ (async () => {
+ const limit = 10;
+
+ const items = got.paginate('https://example.com/items', {
+ searchParams: {
+ limit,
+ offset: 0
+ },
+ pagination: {
+ paginate: (response, allItems, currentItems) => {
+ const previousSearchParams = response.request.options.searchParams;
+ const previousOffset = previousSearchParams.get('offset');
+
+ if (currentItems.length < limit) {
+ return false;
+ }
+
+ return {
+ searchParams: {
+ ...previousSearchParams,
+ offset: Number(previousOffset) + limit,
+ }
+ };
+ }
+ }
+ });
+
+ console.log('Items from all pages:', items);
+ })();
+ ```
+ */
+ paginate?: (response: Response<R>, allItems: T[], currentItems: T[]) => Options | false;
+ /**
+ Checks whether the pagination should continue.
+
+ For example, if you need to stop **before** emitting an entry with some flag, you should use `(item, allItems, currentItems) => !item.flag`.
+ If you want to stop **after** emitting the entry, you should use `(item, allItems, currentItems) => allItems.some(entry => entry.flag)` instead.
+
+ @default (item, allItems, currentItems) => true
+ */
+ shouldContinue?: (item: T, allItems: T[], currentItems: T[]) => boolean;
+ /**
+ The maximum amount of items that should be emitted.
+
+ @default Infinity
+ */
+ countLimit?: number;
+ /**
+ Milliseconds to wait before the next request is triggered.
+
+ @default 0
+ */
+ backoff?: number;
+ /**
+ The maximum amount of request that should be triggered.
+ Retries on failure are not counted towards this limit.
+
+ For example, it can be helpful during development to avoid an infinite number of requests.
+
+ @default 10000
+ */
+ requestLimit?: number;
+ /**
+ Defines how the parameter `allItems` in pagination.paginate, pagination.filter and pagination.shouldContinue is managed.
+ When set to `false`, the parameter `allItems` is always an empty array.
+
+ This option can be helpful to save on memory usage when working with a large dataset.
+ */
+ stackAllItems?: boolean;
+ };
+}
+export declare type AfterResponseHook = (response: Response, retryWithMergedOptions: (options: Options) => CancelableRequest<Response>) => Response | CancelableRequest<Response> | Promise<Response | CancelableRequest<Response>>;
+export declare namespace PromiseOnly {
+ interface Hooks {
+ /**
+ Called with [response object](#response) and a retry function.
+ Calling the retry function will trigger `beforeRetry` hooks.
+
+ Each function should return the response.
+ This is especially useful when you want to refresh an access token.
+
+ __Note__: When using streams, this hook is ignored.
+
+ @example
+ ```
+ const got = require('got');
+
+ const instance = got.extend({
+ hooks: {
+ afterResponse: [
+ (response, retryWithMergedOptions) => {
+ if (response.statusCode === 401) { // Unauthorized
+ const updatedOptions = {
+ headers: {
+ token: getNewToken() // Refresh the access token
+ }
+ };
+
+ // Save for further requests
+ instance.defaults.options = got.mergeOptions(instance.defaults.options, updatedOptions);
+
+ // Make a new retry
+ return retryWithMergedOptions(updatedOptions);
+ }
+
+ // No changes otherwise
+ return response;
+ }
+ ],
+ beforeRetry: [
+ (options, error, retryCount) => {
+ // This will be called on `retryWithMergedOptions(...)`
+ }
+ ]
+ },
+ mutableDefaults: true
+ });
+ ```
+ */
+ afterResponse?: AfterResponseHook[];
+ }
+ interface Options extends PaginationOptions<unknown, unknown> {
+ /**
+ The parsing method.
+
+ The promise also has `.text()`, `.json()` and `.buffer()` methods which return another Got promise for the parsed body.
+
+ It's like setting the options to `{responseType: 'json', resolveBodyOnly: true}` but without affecting the main Got promise.
+
+ __Note__: When using streams, this option is ignored.
+
+ @example
+ ```
+ (async () => {
+ const responsePromise = got(url);
+ const bufferPromise = responsePromise.buffer();
+ const jsonPromise = responsePromise.json();
+
+ const [response, buffer, json] = Promise.all([responsePromise, bufferPromise, jsonPromise]);
+ // `response` is an instance of Got Response
+ // `buffer` is an instance of Buffer
+ // `json` is an object
+ })();
+ ```
+
+ @example
+ ```
+ // This
+ const body = await got(url).json();
+
+ // is semantically the same as this
+ const body = await got(url, {responseType: 'json', resolveBodyOnly: true});
+ ```
+ */
+ responseType?: ResponseType;
+ /**
+ When set to `true` the promise will return the Response body instead of the Response object.
+
+ @default false
+ */
+ resolveBodyOnly?: boolean;
+ /**
+ Returns a `Stream` instead of a `Promise`.
+ This is equivalent to calling `got.stream(url, options?)`.
+
+ @default false
+ */
+ isStream?: boolean;
+ /**
+ [Encoding](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) to be used on `setEncoding` of the response data.
+
+ To get a [`Buffer`](https://nodejs.org/api/buffer.html), you need to set `responseType` to `buffer` instead.
+ Don't set this option to `null`.
+
+ __Note__: This doesn't affect streams! Instead, you need to do `got.stream(...).setEncoding(encoding)`.
+
+ @default 'utf-8'
+ */
+ encoding?: BufferEncoding;
+ }
+ interface NormalizedOptions {
+ responseType: ResponseType;
+ resolveBodyOnly: boolean;
+ isStream: boolean;
+ encoding?: BufferEncoding;
+ pagination?: Required<PaginationOptions<unknown, unknown>['pagination']>;
+ }
+ interface Defaults {
+ responseType: ResponseType;
+ resolveBodyOnly: boolean;
+ isStream: boolean;
+ pagination?: Required<PaginationOptions<unknown, unknown>['pagination']>;
+ }
+ type HookEvent = 'afterResponse';
+}
+/**
+An error to be thrown when server response code is 2xx, and parsing body fails.
+Includes a `response` property.
+*/
+export declare class ParseError extends RequestError {
+ readonly response: Response;
+ constructor(error: Error, response: Response);
+}
+/**
+An error to be thrown when the request is aborted with `.cancel()`.
+*/
+export declare class CancelError extends RequestError {
+ readonly response: Response;
+ constructor(request: Request);
+ get isCanceled(): boolean;
+}
+export interface CancelableRequest<T extends Response | Response['body'] = Response['body']> extends PCancelable<T>, RequestEvents<CancelableRequest<T>> {
+ json: <ReturnType>() => CancelableRequest<ReturnType>;
+ buffer: () => CancelableRequest<Buffer>;
+ text: () => CancelableRequest<string>;
+}
+export * from '../core';
diff --git a/node_modules/got/dist/source/as-promise/types.js b/node_modules/got/dist/source/as-promise/types.js
new file mode 100644
index 0000000..b73110a
--- /dev/null
+++ b/node_modules/got/dist/source/as-promise/types.js
@@ -0,0 +1,42 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CancelError = exports.ParseError = void 0;
+const core_1 = require("../core");
+/**
+An error to be thrown when server response code is 2xx, and parsing body fails.
+Includes a `response` property.
+*/
+class ParseError extends core_1.RequestError {
+ constructor(error, response) {
+ const { options } = response.request;
+ super(`${error.message} in "${options.url.toString()}"`, error, response.request);
+ this.name = 'ParseError';
+ this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_BODY_PARSE_FAILURE' : this.code;
+ }
+}
+exports.ParseError = ParseError;
+/**
+An error to be thrown when the request is aborted with `.cancel()`.
+*/
+class CancelError extends core_1.RequestError {
+ constructor(request) {
+ super('Promise was canceled', {}, request);
+ this.name = 'CancelError';
+ this.code = 'ERR_CANCELED';
+ }
+ get isCanceled() {
+ return true;
+ }
+}
+exports.CancelError = CancelError;
+__exportStar(require("../core"), exports);
diff --git a/node_modules/got/dist/source/core/calculate-retry-delay.d.ts b/node_modules/got/dist/source/core/calculate-retry-delay.d.ts
new file mode 100644
index 0000000..86eca8f
--- /dev/null
+++ b/node_modules/got/dist/source/core/calculate-retry-delay.d.ts
@@ -0,0 +1,5 @@
+import { RetryFunction } from '.';
+declare type Returns<T extends (...args: any) => unknown, V> = (...args: Parameters<T>) => V;
+export declare const retryAfterStatusCodes: ReadonlySet<number>;
+declare const calculateRetryDelay: Returns<RetryFunction, number>;
+export default calculateRetryDelay;
diff --git a/node_modules/got/dist/source/core/calculate-retry-delay.js b/node_modules/got/dist/source/core/calculate-retry-delay.js
new file mode 100644
index 0000000..99f604a
--- /dev/null
+++ b/node_modules/got/dist/source/core/calculate-retry-delay.js
@@ -0,0 +1,29 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.retryAfterStatusCodes = void 0;
+exports.retryAfterStatusCodes = new Set([413, 429, 503]);
+const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter }) => {
+ if (attemptCount > retryOptions.limit) {
+ return 0;
+ }
+ const hasMethod = retryOptions.methods.includes(error.options.method);
+ const hasErrorCode = retryOptions.errorCodes.includes(error.code);
+ const hasStatusCode = error.response && retryOptions.statusCodes.includes(error.response.statusCode);
+ if (!hasMethod || (!hasErrorCode && !hasStatusCode)) {
+ return 0;
+ }
+ if (error.response) {
+ if (retryAfter) {
+ if (retryOptions.maxRetryAfter === undefined || retryAfter > retryOptions.maxRetryAfter) {
+ return 0;
+ }
+ return retryAfter;
+ }
+ if (error.response.statusCode === 413) {
+ return 0;
+ }
+ }
+ const noise = Math.random() * 100;
+ return ((2 ** (attemptCount - 1)) * 1000) + noise;
+};
+exports.default = calculateRetryDelay;
diff --git a/node_modules/got/dist/source/core/index.d.ts b/node_modules/got/dist/source/core/index.d.ts
new file mode 100644
index 0000000..803806e
--- /dev/null
+++ b/node_modules/got/dist/source/core/index.d.ts
@@ -0,0 +1,1124 @@
+/// <reference types="node" />
+import { Duplex, Readable } from 'stream';
+import { URL, URLSearchParams } from 'url';
+import { Socket } from 'net';
+import { SecureContextOptions, DetailedPeerCertificate } from 'tls';
+import http = require('http');
+import { ClientRequest, RequestOptions, ServerResponse, request as httpRequest } from 'http';
+import https = require('https');
+import { Timings, IncomingMessageWithTimings } from '@szmarczak/http-timer';
+import CacheableLookup from 'cacheable-lookup';
+import CacheableRequest = require('cacheable-request');
+import ResponseLike = require('responselike');
+import { Delays, TimeoutError as TimedOutTimeoutError } from './utils/timed-out';
+import { URLOptions } from './utils/options-to-url';
+import { DnsLookupIpVersion } from './utils/dns-ip-version';
+import { PromiseOnly } from '../as-promise/types';
+declare type HttpRequestFunction = typeof httpRequest;
+declare type Error = NodeJS.ErrnoException;
+declare const kRequest: unique symbol;
+declare const kResponse: unique symbol;
+declare const kResponseSize: unique symbol;
+declare const kDownloadedSize: unique symbol;
+declare const kBodySize: unique symbol;
+declare const kUploadedSize: unique symbol;
+declare const kServerResponsesPiped: unique symbol;
+declare const kUnproxyEvents: unique symbol;
+declare const kIsFromCache: unique symbol;
+declare const kCancelTimeouts: unique symbol;
+declare const kStartedReading: unique symbol;
+declare const kStopReading: unique symbol;
+declare const kTriggerRead: unique symbol;
+declare const kBody: unique symbol;
+declare const kJobs: unique symbol;
+declare const kOriginalResponse: unique symbol;
+declare const kRetryTimeout: unique symbol;
+export declare const kIsNormalizedAlready: unique symbol;
+export interface Agents {
+ http?: http.Agent;
+ https?: https.Agent;
+ http2?: unknown;
+}
+export declare const withoutBody: ReadonlySet<string>;
+export interface ToughCookieJar {
+ getCookieString: ((currentUrl: string, options: Record<string, unknown>, cb: (err: Error | null, cookies: string) => void) => void) & ((url: string, callback: (error: Error | null, cookieHeader: string) => void) => void);
+ setCookie: ((cookieOrString: unknown, currentUrl: string, options: Record<string, unknown>, cb: (err: Error | null, cookie: unknown) => void) => void) & ((rawCookie: string, url: string, callback: (error: Error | null, result: unknown) => void) => void);
+}
+export interface PromiseCookieJar {
+ getCookieString: (url: string) => Promise<string>;
+ setCookie: (rawCookie: string, url: string) => Promise<unknown>;
+}
+/**
+All available HTTP request methods provided by Got.
+*/
+export declare type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'TRACE' | 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace';
+declare type Promisable<T> = T | Promise<T>;
+export declare type InitHook = (options: Options) => void;
+export declare type BeforeRequestHook = (options: NormalizedOptions) => Promisable<void | Response | ResponseLike>;
+export declare type BeforeRedirectHook = (options: NormalizedOptions, response: Response) => Promisable<void>;
+export declare type BeforeErrorHook = (error: RequestError) => Promisable<RequestError>;
+export declare type BeforeRetryHook = (options: NormalizedOptions, error?: RequestError, retryCount?: number) => void | Promise<void>;
+interface PlainHooks {
+ /**
+ Called with plain request options, right before their normalization.
+ This is especially useful in conjunction with `got.extend()` when the input needs custom handling.
+
+ __Note #1__: This hook must be synchronous!
+
+ __Note #2__: Errors in this hook will be converted into an instances of `RequestError`.
+
+ __Note #3__: The options object may not have a `url` property.
+ To modify it, use a `beforeRequest` hook instead.
+
+ @default []
+ */
+ init?: InitHook[];
+ /**
+ Called with normalized request options.
+ Got will make no further changes to the request before it is sent.
+ This is especially useful in conjunction with `got.extend()` when you want to create an API client that, for example, uses HMAC-signing.
+
+ @default []
+ */
+ beforeRequest?: BeforeRequestHook[];
+ /**
+ Called with normalized request options and the redirect response.
+ Got will make no further changes to the request.
+ This is especially useful when you want to avoid dead sites.
+
+ @default []
+
+ @example
+ ```
+ const got = require('got');
+
+ got('https://example.com', {
+ hooks: {
+ beforeRedirect: [
+ (options, response) => {
+ if (options.hostname === 'deadSite') {
+ options.hostname = 'fallbackSite';
+ }
+ }
+ ]
+ }
+ });
+ ```
+ */
+ beforeRedirect?: BeforeRedirectHook[];
+ /**
+ Called with an `Error` instance.
+ The error is passed to the hook right before it's thrown.
+ This is especially useful when you want to have more detailed errors.
+
+ __Note__: Errors thrown while normalizing input options are thrown directly and not part of this hook.
+
+ @default []
+
+ @example
+ ```
+ const got = require('got');
+
+ got('https://api.github.com/some-endpoint', {
+ hooks: {
+ beforeError: [
+ error => {
+ const {response} = error;
+ if (response && response.body) {
+ error.name = 'GitHubError';
+ error.message = `${response.body.message} (${response.statusCode})`;
+ }
+
+ return error;
+ }
+ ]
+ }
+ });
+ ```
+ */
+ beforeError?: BeforeErrorHook[];
+ /**
+ Called with normalized request options, the error and the retry count.
+ Got will make no further changes to the request.
+ This is especially useful when some extra work is required before the next try.
+
+ __Note__: When using streams, this hook is ignored.
+ __Note__: When retrying in a `afterResponse` hook, all remaining `beforeRetry` hooks will be called without the `error` and `retryCount` arguments.
+
+ @default []
+
+ @example
+ ```
+ const got = require('got');
+
+ got.post('https://example.com', {
+ hooks: {
+ beforeRetry: [
+ (options, error, retryCount) => {
+ if (error.response.statusCode === 413) { // Payload too large
+ options.body = getNewBody();
+ }
+ }
+ ]
+ }
+ });
+ ```
+ */
+ beforeRetry?: BeforeRetryHook[];
+}
+/**
+All available hook of Got.
+*/
+export interface Hooks extends PromiseOnly.Hooks, PlainHooks {
+}
+declare type PlainHookEvent = 'init' | 'beforeRequest' | 'beforeRedirect' | 'beforeError' | 'beforeRetry';
+/**
+All hook events acceptable by Got.
+*/
+export declare type HookEvent = PromiseOnly.HookEvent | PlainHookEvent;
+export declare const knownHookEvents: HookEvent[];
+declare type AcceptableResponse = IncomingMessageWithTimings | ResponseLike;
+declare type AcceptableRequestResult = AcceptableResponse | ClientRequest | Promise<AcceptableResponse | ClientRequest> | undefined;
+export declare type RequestFunction = (url: URL, options: RequestOptions, callback?: (response: AcceptableResponse) => void) => AcceptableRequestResult;
+export declare type Headers = Record<string, string | string[] | undefined>;
+declare type CheckServerIdentityFunction = (hostname: string, certificate: DetailedPeerCertificate) => Error | void;
+export declare type ParseJsonFunction = (text: string) => unknown;
+export declare type StringifyJsonFunction = (object: unknown) => string;
+export interface RetryObject {
+ attemptCount: number;
+ retryOptions: RequiredRetryOptions;
+ error: TimeoutError | RequestError;
+ computedValue: number;
+ retryAfter?: number;
+}
+export declare type RetryFunction = (retryObject: RetryObject) => number | Promise<number>;
+/**
+An object representing `limit`, `calculateDelay`, `methods`, `statusCodes`, `maxRetryAfter` and `errorCodes` fields for maximum retry count, retry handler, allowed methods, allowed status codes, maximum [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) time and allowed error codes.
+
+Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 1).
+
+The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value.
+The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry).
+
+By default, it retries *only* on the specified methods, status codes, and on these network errors:
+- `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached.
+- `ECONNRESET`: Connection was forcibly closed by a peer.
+- `EADDRINUSE`: Could not bind to any free port.
+- `ECONNREFUSED`: Connection was refused by the server.
+- `EPIPE`: The remote side of the stream being written has been closed.
+- `ENOTFOUND`: Couldn't resolve the hostname to an IP address.
+- `ENETUNREACH`: No internet connection.
+- `EAI_AGAIN`: DNS lookup timed out.
+
+__Note__: If `maxRetryAfter` is set to `undefined`, it will use `options.timeout`.
+__Note__: If [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header is greater than `maxRetryAfter`, it will cancel the request.
+*/
+export interface RequiredRetryOptions {
+ limit: number;
+ methods: Method[];
+ statusCodes: number[];
+ errorCodes: string[];
+ calculateDelay: RetryFunction;
+ maxRetryAfter?: number;
+}
+export interface CacheOptions {
+ shared?: boolean;
+ cacheHeuristic?: number;
+ immutableMinTimeToLive?: number;
+ ignoreCargoCult?: boolean;
+}
+interface PlainOptions extends URLOptions {
+ /**
+ Custom request function.
+ The main purpose of this is to [support HTTP2 using a wrapper](https://github.com/szmarczak/http2-wrapper).
+
+ @default http.request | https.request
+ */
+ request?: RequestFunction;
+ /**
+ An object representing `http`, `https` and `http2` keys for [`http.Agent`](https://nodejs.org/api/http.html#http_class_http_agent), [`https.Agent`](https://nodejs.org/api/https.html#https_class_https_agent) and [`http2wrapper.Agent`](https://github.com/szmarczak/http2-wrapper#new-http2agentoptions) instance.
+ This is necessary because a request to one protocol might redirect to another.
+ In such a scenario, Got will switch over to the right protocol agent for you.
+
+ If a key is not present, it will default to a global agent.
+
+ @example
+ ```
+ const got = require('got');
+ const HttpAgent = require('agentkeepalive');
+ const {HttpsAgent} = HttpAgent;
+
+ got('https://sindresorhus.com', {
+ agent: {
+ http: new HttpAgent(),
+ https: new HttpsAgent()
+ }
+ });
+ ```
+ */
+ agent?: Agents | false;
+ /**
+ Decompress the response automatically.
+ This will set the `accept-encoding` header to `gzip, deflate, br` on Node.js 11.7.0+ or `gzip, deflate` for older Node.js versions, unless you set it yourself.
+
+ Brotli (`br`) support requires Node.js 11.7.0 or later.
+
+ If this is disabled, a compressed response is returned as a `Buffer`.
+ This may be useful if you want to handle decompression yourself or stream the raw compressed data.
+
+ @default true
+ */
+ decompress?: boolean;
+ /**
+ Milliseconds to wait for the server to end the response before aborting the request with `got.TimeoutError` error (a.k.a. `request` property).
+ By default, there's no timeout.
+
+ This also accepts an `object` with the following fields to constrain the duration of each phase of the request lifecycle:
+
+ - `lookup` starts when a socket is assigned and ends when the hostname has been resolved.
+ Does not apply when using a Unix domain socket.
+ - `connect` starts when `lookup` completes (or when the socket is assigned if lookup does not apply to the request) and ends when the socket is connected.
+ - `secureConnect` starts when `connect` completes and ends when the handshaking process completes (HTTPS only).
+ - `socket` starts when the socket is connected. See [request.setTimeout](https://nodejs.org/api/http.html#http_request_settimeout_timeout_callback).
+ - `response` starts when the request has been written to the socket and ends when the response headers are received.
+ - `send` starts when the socket is connected and ends with the request has been written to the socket.
+ - `request` starts when the request is initiated and ends when the response's end event fires.
+ */
+ timeout?: Delays | number;
+ /**
+ When specified, `prefixUrl` will be prepended to `url`.
+ The prefix can be any valid URL, either relative or absolute.
+ A trailing slash `/` is optional - one will be added automatically.
+
+ __Note__: `prefixUrl` will be ignored if the `url` argument is a URL instance.
+
+ __Note__: Leading slashes in `input` are disallowed when using this option to enforce consistency and avoid confusion.
+ For example, when the prefix URL is `https://example.com/foo` and the input is `/bar`, there's ambiguity whether the resulting URL would become `https://example.com/foo/bar` or `https://example.com/bar`.
+ The latter is used by browsers.
+
+ __Tip__: Useful when used with `got.extend()` to create niche-specific Got instances.
+
+ __Tip__: You can change `prefixUrl` using hooks as long as the URL still includes the `prefixUrl`.
+ If the URL doesn't include it anymore, it will throw.
+
+ @example
+ ```
+ const got = require('got');
+
+ (async () => {
+ await got('unicorn', {prefixUrl: 'https://cats.com'});
+ //=> 'https://cats.com/unicorn'
+
+ const instance = got.extend({
+ prefixUrl: 'https://google.com'
+ });
+
+ await instance('unicorn', {
+ hooks: {
+ beforeRequest: [
+ options => {
+ options.prefixUrl = 'https://cats.com';
+ }
+ ]
+ }
+ });
+ //=> 'https://cats.com/unicorn'
+ })();
+ ```
+ */
+ prefixUrl?: string | URL;
+ /**
+ __Note #1__: The `body` option cannot be used with the `json` or `form` option.
+
+ __Note #2__: If you provide this option, `got.stream()` will be read-only.
+
+ __Note #3__: If you provide a payload with the `GET` or `HEAD` method, it will throw a `TypeError` unless the method is `GET` and the `allowGetBody` option is set to `true`.
+
+ __Note #4__: This option is not enumerable and will not be merged with the instance defaults.
+
+ The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / `fs.createReadStream` instance / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`.
+ */
+ body?: string | Buffer | Readable;
+ /**
+ The form body is converted to a query string using [`(new URLSearchParams(object)).toString()`](https://nodejs.org/api/url.html#url_constructor_new_urlsearchparams_obj).
+
+ If the `Content-Type` header is not present, it will be set to `application/x-www-form-urlencoded`.
+
+ __Note #1__: If you provide this option, `got.stream()` will be read-only.
+
+ __Note #2__: This option is not enumerable and will not be merged with the instance defaults.
+ */
+ form?: Record<string, any>;
+ /**
+ JSON body. If the `Content-Type` header is not set, it will be set to `application/json`.
+
+ __Note #1__: If you provide this option, `got.stream()` will be read-only.
+
+ __Note #2__: This option is not enumerable and will not be merged with the instance defaults.
+ */
+ json?: Record<string, any>;
+ /**
+ The URL to request, as a string, a [`https.request` options object](https://nodejs.org/api/https.html#https_https_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url).
+
+ Properties from `options` will override properties in the parsed `url`.
+
+ If no protocol is specified, it will throw a `TypeError`.
+
+ __Note__: The query string is **not** parsed as search params.
+
+ @example
+ ```
+ got('https://example.com/?query=a b'); //=> https://example.com/?query=a%20b
+ got('https://example.com/', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
+
+ // The query string is overridden by `searchParams`
+ got('https://example.com/?query=a b', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
+ ```
+ */
+ url?: string | URL;
+ /**
+ Cookie support. You don't have to care about parsing or how to store them.
+
+ __Note__: If you provide this option, `options.headers.cookie` will be overridden.
+ */
+ cookieJar?: PromiseCookieJar | ToughCookieJar;
+ /**
+ Ignore invalid cookies instead of throwing an error.
+ Only useful when the `cookieJar` option has been set. Not recommended.
+
+ @default false
+ */
+ ignoreInvalidCookies?: boolean;
+ /**
+ Query string that will be added to the request URL.
+ This will override the query string in `url`.
+
+ If you need to pass in an array, you can do it using a `URLSearchParams` instance.
+
+ @example
+ ```
+ const got = require('got');
+
+ const searchParams = new URLSearchParams([['key', 'a'], ['key', 'b']]);
+
+ got('https://example.com', {searchParams});
+
+ console.log(searchParams.toString());
+ //=> 'key=a&key=b'
+ ```
+ */
+ searchParams?: string | Record<string, string | number | boolean | null | undefined> | URLSearchParams;
+ /**
+ An instance of [`CacheableLookup`](https://github.com/szmarczak/cacheable-lookup) used for making DNS lookups.
+ Useful when making lots of requests to different *public* hostnames.
+
+ `CacheableLookup` uses `dns.resolver4(..)` and `dns.resolver6(...)` under the hood and fall backs to `dns.lookup(...)` when the first two fail, which may lead to additional delay.
+
+ __Note__: This should stay disabled when making requests to internal hostnames such as `localhost`, `database.local` etc.
+
+ @default false
+ */
+ dnsCache?: CacheableLookup | boolean;
+ /**
+ User data. In contrast to other options, `context` is not enumerable.
+
+ __Note__: The object is never merged, it's just passed through.
+ Got will not modify the object in any way.
+
+ @example
+ ```
+ const got = require('got');
+
+ const instance = got.extend({
+ hooks: {
+ beforeRequest: [
+ options => {
+ if (!options.context || !options.context.token) {
+ throw new Error('Token required');
+ }
+
+ options.headers.token = options.context.token;
+ }
+ ]
+ }
+ });
+
+ (async () => {
+ const context = {
+ token: 'secret'
+ };
+
+ const response = await instance('https://httpbin.org/headers', {context});
+
+ // Let's see the headers
+ console.log(response.body);
+ })();
+ ```
+ */
+ context?: Record<string, unknown>;
+ /**
+ Hooks allow modifications during the request lifecycle.
+ Hook functions may be async and are run serially.
+ */
+ hooks?: Hooks;
+ /**
+ Defines if redirect responses should be followed automatically.
+
+ Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), Got will automatically request the resource pointed to in the location header via `GET`.
+ This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4).
+
+ @default true
+ */
+ followRedirect?: boolean;
+ /**
+ If exceeded, the request will be aborted and a `MaxRedirectsError` will be thrown.
+
+ @default 10
+ */
+ maxRedirects?: number;
+ /**
+ A cache adapter instance for storing cached response data.
+
+ @default false
+ */
+ cache?: string | CacheableRequest.StorageAdapter | false;
+ /**
+ Determines if a `got.HTTPError` is thrown for unsuccessful responses.
+
+ If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing.
+ This may be useful if you are checking for resource availability and are expecting error responses.
+
+ @default true
+ */
+ throwHttpErrors?: boolean;
+ username?: string;
+ password?: string;
+ /**
+ If set to `true`, Got will additionally accept HTTP2 requests.
+
+ It will choose either HTTP/1.1 or HTTP/2 depending on the ALPN protocol.
+
+ __Note__: Overriding `options.request` will disable HTTP2 support.
+
+ __Note__: This option will default to `true` in the next upcoming major release.
+
+ @default false
+
+ @example
+ ```
+ const got = require('got');
+
+ (async () => {
+ const {headers} = await got('https://nghttp2.org/httpbin/anything', {http2: true});
+ console.log(headers.via);
+ //=> '2 nghttpx'
+ })();
+ ```
+ */
+ http2?: boolean;
+ /**
+ Set this to `true` to allow sending body for the `GET` method.
+ However, the [HTTP/2 specification](https://tools.ietf.org/html/rfc7540#section-8.1.3) says that `An HTTP GET request includes request header fields and no payload body`, therefore when using the HTTP/2 protocol this option will have no effect.
+ This option is only meant to interact with non-compliant servers when you have no other choice.
+
+ __Note__: The [RFC 7321](https://tools.ietf.org/html/rfc7231#section-4.3.1) doesn't specify any particular behavior for the GET method having a payload, therefore __it's considered an [anti-pattern](https://en.wikipedia.org/wiki/Anti-pattern)__.
+
+ @default false
+ */
+ allowGetBody?: boolean;
+ lookup?: CacheableLookup['lookup'];
+ /**
+ Request headers.
+
+ Existing headers will be overwritten. Headers set to `undefined` will be omitted.
+
+ @default {}
+ */
+ headers?: Headers;
+ /**
+ By default, redirects will use [method rewriting](https://tools.ietf.org/html/rfc7231#section-6.4).
+ For example, when sending a POST request and receiving a `302`, it will resend the body to the new location using the same HTTP method (`POST` in this case).
+
+ @default true
+ */
+ methodRewriting?: boolean;
+ /**
+ Indicates which DNS record family to use.
+
+ Values:
+ - `auto`: IPv4 (if present) or IPv6
+ - `ipv4`: Only IPv4
+ - `ipv6`: Only IPv6
+
+ __Note__: If you are using the undocumented option `family`, `dnsLookupIpVersion` will override it.
+
+ @default 'auto'
+ */
+ dnsLookupIpVersion?: DnsLookupIpVersion;
+ /**
+ A function used to parse JSON responses.
+
+ @example
+ ```
+ const got = require('got');
+ const Bourne = require('@hapi/bourne');
+
+ (async () => {
+ const parsed = await got('https://example.com', {
+ parseJson: text => Bourne.parse(text)
+ }).json();
+
+ console.log(parsed);
+ })();
+ ```
+ */
+ parseJson?: ParseJsonFunction;
+ /**
+ A function used to stringify the body of JSON requests.
+
+ @example
+ ```
+ const got = require('got');
+
+ (async () => {
+ await got.post('https://example.com', {
+ stringifyJson: object => JSON.stringify(object, (key, value) => {
+ if (key.startsWith('_')) {
+ return;
+ }
+
+ return value;
+ }),
+ json: {
+ some: 'payload',
+ _ignoreMe: 1234
+ }
+ });
+ })();
+ ```
+
+ @example
+ ```
+ const got = require('got');
+
+ (async () => {
+ await got.post('https://example.com', {
+ stringifyJson: object => JSON.stringify(object, (key, value) => {
+ if (typeof value === 'number') {
+ return value.toString();
+ }
+
+ return value;
+ }),
+ json: {
+ some: 'payload',
+ number: 1
+ }
+ });
+ })();
+ ```
+ */
+ stringifyJson?: StringifyJsonFunction;
+ /**
+ An object representing `limit`, `calculateDelay`, `methods`, `statusCodes`, `maxRetryAfter` and `errorCodes` fields for maximum retry count, retry handler, allowed methods, allowed status codes, maximum [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) time and allowed error codes.
+
+ Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 1).
+
+ The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value.
+ The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry).
+
+ By default, it retries *only* on the specified methods, status codes, and on these network errors:
+
+ - `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached.
+ - `ECONNRESET`: Connection was forcibly closed by a peer.
+ - `EADDRINUSE`: Could not bind to any free port.
+ - `ECONNREFUSED`: Connection was refused by the server.
+ - `EPIPE`: The remote side of the stream being written has been closed.
+ - `ENOTFOUND`: Couldn't resolve the hostname to an IP address.
+ - `ENETUNREACH`: No internet connection.
+ - `EAI_AGAIN`: DNS lookup timed out.
+
+ __Note__: If `maxRetryAfter` is set to `undefined`, it will use `options.timeout`.
+ __Note__: If [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header is greater than `maxRetryAfter`, it will cancel the request.
+ */
+ retry?: Partial<RequiredRetryOptions> | number;
+ /**
+ The IP address used to send the request from.
+ */
+ localAddress?: string;
+ socketPath?: string;
+ /**
+ The HTTP method used to make the request.
+
+ @default 'GET'
+ */
+ method?: Method;
+ createConnection?: (options: http.RequestOptions, oncreate: (error: Error, socket: Socket) => void) => Socket;
+ cacheOptions?: CacheOptions;
+ /**
+ If set to `false`, all invalid SSL certificates will be ignored and no error will be thrown.
+
+ If set to `true`, it will throw an error whenever an invalid SSL certificate is detected.
+
+ We strongly recommend to have this set to `true` for security reasons.
+
+ @default true
+
+ @example
+ ```
+ const got = require('got');
+
+ (async () => {
+ // Correct:
+ await got('https://example.com', {rejectUnauthorized: true});
+
+ // You can disable it when developing an HTTPS app:
+ await got('https://localhost', {rejectUnauthorized: false});
+
+ // Never do this:
+ await got('https://example.com', {rejectUnauthorized: false});
+ })();
+ ```
+ */
+ rejectUnauthorized?: boolean;
+ /**
+ Options for the advanced HTTPS API.
+ */
+ https?: HTTPSOptions;
+}
+export interface Options extends PromiseOnly.Options, PlainOptions {
+}
+export interface HTTPSOptions {
+ rejectUnauthorized?: https.RequestOptions['rejectUnauthorized'];
+ checkServerIdentity?: CheckServerIdentityFunction;
+ /**
+ Override the default Certificate Authorities ([from Mozilla](https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReport)).
+
+ @example
+ ```
+ // Single Certificate Authority
+ got('https://example.com', {
+ https: {
+ certificateAuthority: fs.readFileSync('./my_ca.pem')
+ }
+ });
+ ```
+ */
+ certificateAuthority?: SecureContextOptions['ca'];
+ /**
+ Private keys in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
+
+ [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) allows the option of private keys being encrypted.
+ Encrypted keys will be decrypted with `options.https.passphrase`.
+
+ Multiple keys with different passphrases can be provided as an array of `{pem: <string | Buffer>, passphrase: <string>}`
+ */
+ key?: SecureContextOptions['key'];
+ /**
+ [Certificate chains](https://en.wikipedia.org/wiki/X.509#Certificate_chains_and_cross-certification) in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.
+
+ One cert chain should be provided per private key (`options.https.key`).
+
+ When providing multiple cert chains, they do not have to be in the same order as their private keys in `options.https.key`.
+
+ If the intermediate certificates are not provided, the peer will not be able to validate the certificate, and the handshake will fail.
+ */
+ certificate?: SecureContextOptions['cert'];
+ /**
+ The passphrase to decrypt the `options.https.key` (if different keys have different passphrases refer to `options.https.key` documentation).
+ */
+ passphrase?: SecureContextOptions['passphrase'];
+ pfx?: SecureContextOptions['pfx'];
+}
+interface NormalizedPlainOptions extends PlainOptions {
+ method: Method;
+ url: URL;
+ timeout: Delays;
+ prefixUrl: string;
+ ignoreInvalidCookies: boolean;
+ decompress: boolean;
+ searchParams?: URLSearchParams;
+ cookieJar?: PromiseCookieJar;
+ headers: Headers;
+ context: Record<string, unknown>;
+ hooks: Required<Hooks>;
+ followRedirect: boolean;
+ maxRedirects: number;
+ cache?: string | CacheableRequest.StorageAdapter;
+ throwHttpErrors: boolean;
+ dnsCache?: CacheableLookup;
+ http2: boolean;
+ allowGetBody: boolean;
+ rejectUnauthorized: boolean;
+ lookup?: CacheableLookup['lookup'];
+ methodRewriting: boolean;
+ username: string;
+ password: string;
+ parseJson: ParseJsonFunction;
+ stringifyJson: StringifyJsonFunction;
+ retry: RequiredRetryOptions;
+ cacheOptions: CacheOptions;
+ [kRequest]: HttpRequestFunction;
+ [kIsNormalizedAlready]?: boolean;
+}
+export interface NormalizedOptions extends PromiseOnly.NormalizedOptions, NormalizedPlainOptions {
+}
+interface PlainDefaults {
+ timeout: Delays;
+ prefixUrl: string;
+ method: Method;
+ ignoreInvalidCookies: boolean;
+ decompress: boolean;
+ context: Record<string, unknown>;
+ cookieJar?: PromiseCookieJar | ToughCookieJar;
+ dnsCache?: CacheableLookup;
+ headers: Headers;
+ hooks: Required<Hooks>;
+ followRedirect: boolean;
+ maxRedirects: number;
+ cache?: string | CacheableRequest.StorageAdapter;
+ throwHttpErrors: boolean;
+ http2: boolean;
+ allowGetBody: boolean;
+ https?: HTTPSOptions;
+ methodRewriting: boolean;
+ parseJson: ParseJsonFunction;
+ stringifyJson: StringifyJsonFunction;
+ retry: RequiredRetryOptions;
+ agent?: Agents | false;
+ request?: RequestFunction;
+ searchParams?: URLSearchParams;
+ lookup?: CacheableLookup['lookup'];
+ localAddress?: string;
+ createConnection?: Options['createConnection'];
+ cacheOptions: CacheOptions;
+}
+export interface Defaults extends PromiseOnly.Defaults, PlainDefaults {
+}
+export interface Progress {
+ percent: number;
+ transferred: number;
+ total?: number;
+}
+export interface PlainResponse extends IncomingMessageWithTimings {
+ /**
+ The original request URL.
+ */
+ requestUrl: string;
+ /**
+ The redirect URLs.
+ */
+ redirectUrls: string[];
+ /**
+ - `options` - The Got options that were set on this request.
+
+ __Note__: This is not a [http.ClientRequest](https://nodejs.org/api/http.html#http_class_http_clientrequest).
+ */
+ request: Request;
+ /**
+ The remote IP address.
+
+ This is hopefully a temporary limitation, see [lukechilds/cacheable-request#86](https://github.com/lukechilds/cacheable-request/issues/86).
+
+ __Note__: Not available when the response is cached.
+ */
+ ip?: string;
+ /**
+ Whether the response was retrieved from the cache.
+ */
+ isFromCache: boolean;
+ /**
+ The status code of the response.
+ */
+ statusCode: number;
+ /**
+ The request URL or the final URL after redirects.
+ */
+ url: string;
+ /**
+ The object contains the following properties:
+
+ - `start` - Time when the request started.
+ - `socket` - Time when a socket was assigned to the request.
+ - `lookup` - Time when the DNS lookup finished.
+ - `connect` - Time when the socket successfully connected.
+ - `secureConnect` - Time when the socket securely connected.
+ - `upload` - Time when the request finished uploading.
+ - `response` - Time when the request fired `response` event.
+ - `end` - Time when the response fired `end` event.
+ - `error` - Time when the request fired `error` event.
+ - `abort` - Time when the request fired `abort` event.
+ - `phases`
+ - `wait` - `timings.socket - timings.start`
+ - `dns` - `timings.lookup - timings.socket`
+ - `tcp` - `timings.connect - timings.lookup`
+ - `tls` - `timings.secureConnect - timings.connect`
+ - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
+ - `firstByte` - `timings.response - timings.upload`
+ - `download` - `timings.end - timings.response`
+ - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
+
+ If something has not been measured yet, it will be `undefined`.
+
+ __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
+ */
+ timings: Timings;
+ /**
+ The number of times the request was retried.
+ */
+ retryCount: number;
+ /**
+ The raw result of the request.
+ */
+ rawBody?: Buffer;
+ /**
+ The result of the request.
+ */
+ body?: unknown;
+}
+export interface Response<T = unknown> extends PlainResponse {
+ /**
+ The result of the request.
+ */
+ body: T;
+ /**
+ The raw result of the request.
+ */
+ rawBody: Buffer;
+}
+export interface RequestEvents<T> {
+ /**
+ `request` event to get the request object of the request.
+
+ __Tip__: You can use `request` event to abort requests.
+
+ @example
+ ```
+ got.stream('https://github.com')
+ .on('request', request => setTimeout(() => request.destroy(), 50));
+ ```
+ */
+ on: ((name: 'request', listener: (request: http.ClientRequest) => void) => T)
+ /**
+ The `response` event to get the response object of the final request.
+ */
+ & (<R extends Response>(name: 'response', listener: (response: R) => void) => T)
+ /**
+ The `redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location.
+ */
+ & (<R extends Response, N extends NormalizedOptions>(name: 'redirect', listener: (response: R, nextOptions: N) => void) => T)
+ /**
+ Progress events for uploading (sending a request) and downloading (receiving a response).
+ The `progress` argument is an object like:
+
+ ```js
+ {
+ percent: 0.1,
+ transferred: 1024,
+ total: 10240
+ }
+ ```
+
+ If the `content-length` header is missing, `total` will be `undefined`.
+
+ @example
+ ```js
+ (async () => {
+ const response = await got('https://sindresorhus.com')
+ .on('downloadProgress', progress => {
+ // Report download progress
+ })
+ .on('uploadProgress', progress => {
+ // Report upload progress
+ });
+
+ console.log(response);
+ })();
+ ```
+ */
+ & ((name: 'uploadProgress' | 'downloadProgress', listener: (progress: Progress) => void) => T)
+ /**
+ To enable retrying on a Got stream, it is required to have a `retry` handler attached.
+
+ When this event is emitted, you should reset the stream you were writing to and prepare the body again.
+
+ See `got.options.retry` for more information.
+ */
+ & ((name: 'retry', listener: (retryCount: number, error: RequestError) => void) => T);
+}
+export declare const setNonEnumerableProperties: (sources: Array<Options | Defaults | undefined>, to: Options) => void;
+/**
+An error to be thrown when a request fails.
+Contains a `code` property with error class code, like `ECONNREFUSED`.
+*/
+export declare class RequestError extends Error {
+ code: string;
+ stack: string;
+ readonly options: NormalizedOptions;
+ readonly response?: Response;
+ readonly request?: Request;
+ readonly timings?: Timings;
+ constructor(message: string, error: Partial<Error & {
+ code?: string;
+ }>, self: Request | NormalizedOptions);
+}
+/**
+An error to be thrown when the server redirects you more than ten times.
+Includes a `response` property.
+*/
+export declare class MaxRedirectsError extends RequestError {
+ readonly response: Response;
+ readonly request: Request;
+ readonly timings: Timings;
+ constructor(request: Request);
+}
+/**
+An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304.
+Includes a `response` property.
+*/
+export declare class HTTPError extends RequestError {
+ readonly response: Response;
+ readonly request: Request;
+ readonly timings: Timings;
+ constructor(response: Response);
+}
+/**
+An error to be thrown when a cache method fails.
+For example, if the database goes down or there's a filesystem error.
+*/
+export declare class CacheError extends RequestError {
+ readonly request: Request;
+ constructor(error: Error, request: Request);
+}
+/**
+An error to be thrown when the request body is a stream and an error occurs while reading from that stream.
+*/
+export declare class UploadError extends RequestError {
+ readonly request: Request;
+ constructor(error: Error, request: Request);
+}
+/**
+An error to be thrown when the request is aborted due to a timeout.
+Includes an `event` and `timings` property.
+*/
+export declare class TimeoutError extends RequestError {
+ readonly request: Request;
+ readonly timings: Timings;
+ readonly event: string;
+ constructor(error: TimedOutTimeoutError, timings: Timings, request: Request);
+}
+/**
+An error to be thrown when reading from response stream fails.
+*/
+export declare class ReadError extends RequestError {
+ readonly request: Request;
+ readonly response: Response;
+ readonly timings: Timings;
+ constructor(error: Error, request: Request);
+}
+/**
+An error to be thrown when given an unsupported protocol.
+*/
+export declare class UnsupportedProtocolError extends RequestError {
+ constructor(options: NormalizedOptions);
+}
+export default class Request extends Duplex implements RequestEvents<Request> {
+ ['constructor']: typeof Request;
+ [kUnproxyEvents]: () => void;
+ _cannotHaveBody: boolean;
+ [kDownloadedSize]: number;
+ [kUploadedSize]: number;
+ [kStopReading]: boolean;
+ [kTriggerRead]: boolean;
+ [kBody]: Options['body'];
+ [kJobs]: Array<() => void>;
+ [kRetryTimeout]?: NodeJS.Timeout;
+ [kBodySize]?: number;
+ [kServerResponsesPiped]: Set<ServerResponse>;
+ [kIsFromCache]?: boolean;
+ [kStartedReading]?: boolean;
+ [kCancelTimeouts]?: () => void;
+ [kResponseSize]?: number;
+ [kResponse]?: IncomingMessageWithTimings;
+ [kOriginalResponse]?: IncomingMessageWithTimings;
+ [kRequest]?: ClientRequest;
+ _noPipe?: boolean;
+ _progressCallbacks: Array<() => void>;
+ options: NormalizedOptions;
+ requestUrl: string;
+ requestInitialized: boolean;
+ redirects: string[];
+ retryCount: number;
+ constructor(url: string | URL | undefined, options?: Options, defaults?: Defaults);
+ static normalizeArguments(url?: string | URL, options?: Options, defaults?: Defaults): NormalizedOptions;
+ _lockWrite(): void;
+ _unlockWrite(): void;
+ _finalizeBody(): Promise<void>;
+ _onResponseBase(response: IncomingMessageWithTimings): Promise<void>;
+ _onResponse(response: IncomingMessageWithTimings): Promise<void>;
+ _onRequest(request: ClientRequest): void;
+ _createCacheableRequest(url: URL, options: RequestOptions): Promise<ClientRequest | ResponseLike>;
+ _makeRequest(): Promise<void>;
+ _error(error: RequestError): Promise<void>;
+ _beforeError(error: Error): void;
+ _read(): void;
+ _write(chunk: any, encoding: string | undefined, callback: (error?: Error | null) => void): void;
+ _writeRequest(chunk: any, encoding: BufferEncoding | undefined, callback: (error?: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ get _isAboutToError(): boolean;
+ /**
+ The remote IP address.
+ */
+ get ip(): string | undefined;
+ /**
+ Indicates whether the request has been aborted or not.
+ */
+ get aborted(): boolean;
+ get socket(): Socket | undefined;
+ /**
+ Progress event for downloading (receiving a response).
+ */
+ get downloadProgress(): Progress;
+ /**
+ Progress event for uploading (sending a request).
+ */
+ get uploadProgress(): Progress;
+ /**
+ The object contains the following properties:
+
+ - `start` - Time when the request started.
+ - `socket` - Time when a socket was assigned to the request.
+ - `lookup` - Time when the DNS lookup finished.
+ - `connect` - Time when the socket successfully connected.
+ - `secureConnect` - Time when the socket securely connected.
+ - `upload` - Time when the request finished uploading.
+ - `response` - Time when the request fired `response` event.
+ - `end` - Time when the response fired `end` event.
+ - `error` - Time when the request fired `error` event.
+ - `abort` - Time when the request fired `abort` event.
+ - `phases`
+ - `wait` - `timings.socket - timings.start`
+ - `dns` - `timings.lookup - timings.socket`
+ - `tcp` - `timings.connect - timings.lookup`
+ - `tls` - `timings.secureConnect - timings.connect`
+ - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
+ - `firstByte` - `timings.response - timings.upload`
+ - `download` - `timings.end - timings.response`
+ - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
+
+ If something has not been measured yet, it will be `undefined`.
+
+ __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
+ */
+ get timings(): Timings | undefined;
+ /**
+ Whether the response was retrieved from the cache.
+ */
+ get isFromCache(): boolean | undefined;
+ pipe<T extends NodeJS.WritableStream>(destination: T, options?: {
+ end?: boolean;
+ }): T;
+ unpipe<T extends NodeJS.WritableStream>(destination: T): this;
+}
+export {};
diff --git a/node_modules/got/dist/source/core/index.js b/node_modules/got/dist/source/core/index.js
new file mode 100644
index 0000000..c6cebd5
--- /dev/null
+++ b/node_modules/got/dist/source/core/index.js
@@ -0,0 +1,1505 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.UnsupportedProtocolError = exports.ReadError = exports.TimeoutError = exports.UploadError = exports.CacheError = exports.HTTPError = exports.MaxRedirectsError = exports.RequestError = exports.setNonEnumerableProperties = exports.knownHookEvents = exports.withoutBody = exports.kIsNormalizedAlready = void 0;
+const util_1 = require("util");
+const stream_1 = require("stream");
+const fs_1 = require("fs");
+const url_1 = require("url");
+const http = require("http");
+const http_1 = require("http");
+const https = require("https");
+const http_timer_1 = require("@szmarczak/http-timer");
+const cacheable_lookup_1 = require("cacheable-lookup");
+const CacheableRequest = require("cacheable-request");
+const decompressResponse = require("decompress-response");
+// @ts-expect-error Missing types
+const http2wrapper = require("http2-wrapper");
+const lowercaseKeys = require("lowercase-keys");
+const is_1 = require("@sindresorhus/is");
+const get_body_size_1 = require("./utils/get-body-size");
+const is_form_data_1 = require("./utils/is-form-data");
+const proxy_events_1 = require("./utils/proxy-events");
+const timed_out_1 = require("./utils/timed-out");
+const url_to_options_1 = require("./utils/url-to-options");
+const options_to_url_1 = require("./utils/options-to-url");
+const weakable_map_1 = require("./utils/weakable-map");
+const get_buffer_1 = require("./utils/get-buffer");
+const dns_ip_version_1 = require("./utils/dns-ip-version");
+const is_response_ok_1 = require("./utils/is-response-ok");
+const deprecation_warning_1 = require("../utils/deprecation-warning");
+const normalize_arguments_1 = require("../as-promise/normalize-arguments");
+const calculate_retry_delay_1 = require("./calculate-retry-delay");
+let globalDnsCache;
+const kRequest = Symbol('request');
+const kResponse = Symbol('response');
+const kResponseSize = Symbol('responseSize');
+const kDownloadedSize = Symbol('downloadedSize');
+const kBodySize = Symbol('bodySize');
+const kUploadedSize = Symbol('uploadedSize');
+const kServerResponsesPiped = Symbol('serverResponsesPiped');
+const kUnproxyEvents = Symbol('unproxyEvents');
+const kIsFromCache = Symbol('isFromCache');
+const kCancelTimeouts = Symbol('cancelTimeouts');
+const kStartedReading = Symbol('startedReading');
+const kStopReading = Symbol('stopReading');
+const kTriggerRead = Symbol('triggerRead');
+const kBody = Symbol('body');
+const kJobs = Symbol('jobs');
+const kOriginalResponse = Symbol('originalResponse');
+const kRetryTimeout = Symbol('retryTimeout');
+exports.kIsNormalizedAlready = Symbol('isNormalizedAlready');
+const supportsBrotli = is_1.default.string(process.versions.brotli);
+exports.withoutBody = new Set(['GET', 'HEAD']);
+exports.knownHookEvents = [
+ 'init',
+ 'beforeRequest',
+ 'beforeRedirect',
+ 'beforeError',
+ 'beforeRetry',
+ // Promise-Only
+ 'afterResponse'
+];
+function validateSearchParameters(searchParameters) {
+ // eslint-disable-next-line guard-for-in
+ for (const key in searchParameters) {
+ const value = searchParameters[key];
+ if (!is_1.default.string(value) && !is_1.default.number(value) && !is_1.default.boolean(value) && !is_1.default.null_(value) && !is_1.default.undefined(value)) {
+ throw new TypeError(`The \`searchParams\` value '${String(value)}' must be a string, number, boolean or null`);
+ }
+ }
+}
+function isClientRequest(clientRequest) {
+ return is_1.default.object(clientRequest) && !('statusCode' in clientRequest);
+}
+const cacheableStore = new weakable_map_1.default();
+const waitForOpenFile = async (file) => new Promise((resolve, reject) => {
+ const onError = (error) => {
+ reject(error);
+ };
+ // Node.js 12 has incomplete types
+ if (!file.pending) {
+ resolve();
+ }
+ file.once('error', onError);
+ file.once('ready', () => {
+ file.off('error', onError);
+ resolve();
+ });
+});
+const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]);
+const nonEnumerableProperties = [
+ 'context',
+ 'body',
+ 'json',
+ 'form'
+];
+exports.setNonEnumerableProperties = (sources, to) => {
+ // Non enumerable properties shall not be merged
+ const properties = {};
+ for (const source of sources) {
+ if (!source) {
+ continue;
+ }
+ for (const name of nonEnumerableProperties) {
+ if (!(name in source)) {
+ continue;
+ }
+ properties[name] = {
+ writable: true,
+ configurable: true,
+ enumerable: false,
+ // @ts-expect-error TS doesn't see the check above
+ value: source[name]
+ };
+ }
+ }
+ Object.defineProperties(to, properties);
+};
+/**
+An error to be thrown when a request fails.
+Contains a `code` property with error class code, like `ECONNREFUSED`.
+*/
+class RequestError extends Error {
+ constructor(message, error, self) {
+ var _a, _b;
+ super(message);
+ Error.captureStackTrace(this, this.constructor);
+ this.name = 'RequestError';
+ this.code = (_a = error.code) !== null && _a !== void 0 ? _a : 'ERR_GOT_REQUEST_ERROR';
+ if (self instanceof Request) {
+ Object.defineProperty(this, 'request', {
+ enumerable: false,
+ value: self
+ });
+ Object.defineProperty(this, 'response', {
+ enumerable: false,
+ value: self[kResponse]
+ });
+ Object.defineProperty(this, 'options', {
+ // This fails because of TS 3.7.2 useDefineForClassFields
+ // Ref: https://github.com/microsoft/TypeScript/issues/34972
+ enumerable: false,
+ value: self.options
+ });
+ }
+ else {
+ Object.defineProperty(this, 'options', {
+ // This fails because of TS 3.7.2 useDefineForClassFields
+ // Ref: https://github.com/microsoft/TypeScript/issues/34972
+ enumerable: false,
+ value: self
+ });
+ }
+ this.timings = (_b = this.request) === null || _b === void 0 ? void 0 : _b.timings;
+ // Recover the original stacktrace
+ if (is_1.default.string(error.stack) && is_1.default.string(this.stack)) {
+ const indexOfMessage = this.stack.indexOf(this.message) + this.message.length;
+ const thisStackTrace = this.stack.slice(indexOfMessage).split('\n').reverse();
+ const errorStackTrace = error.stack.slice(error.stack.indexOf(error.message) + error.message.length).split('\n').reverse();
+ // Remove duplicated traces
+ while (errorStackTrace.length !== 0 && errorStackTrace[0] === thisStackTrace[0]) {
+ thisStackTrace.shift();
+ }
+ this.stack = `${this.stack.slice(0, indexOfMessage)}${thisStackTrace.reverse().join('\n')}${errorStackTrace.reverse().join('\n')}`;
+ }
+ }
+}
+exports.RequestError = RequestError;
+/**
+An error to be thrown when the server redirects you more than ten times.
+Includes a `response` property.
+*/
+class MaxRedirectsError extends RequestError {
+ constructor(request) {
+ super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request);
+ this.name = 'MaxRedirectsError';
+ this.code = 'ERR_TOO_MANY_REDIRECTS';
+ }
+}
+exports.MaxRedirectsError = MaxRedirectsError;
+/**
+An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304.
+Includes a `response` property.
+*/
+class HTTPError extends RequestError {
+ constructor(response) {
+ super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request);
+ this.name = 'HTTPError';
+ this.code = 'ERR_NON_2XX_3XX_RESPONSE';
+ }
+}
+exports.HTTPError = HTTPError;
+/**
+An error to be thrown when a cache method fails.
+For example, if the database goes down or there's a filesystem error.
+*/
+class CacheError extends RequestError {
+ constructor(error, request) {
+ super(error.message, error, request);
+ this.name = 'CacheError';
+ this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_CACHE_ACCESS' : this.code;
+ }
+}
+exports.CacheError = CacheError;
+/**
+An error to be thrown when the request body is a stream and an error occurs while reading from that stream.
+*/
+class UploadError extends RequestError {
+ constructor(error, request) {
+ super(error.message, error, request);
+ this.name = 'UploadError';
+ this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_UPLOAD' : this.code;
+ }
+}
+exports.UploadError = UploadError;
+/**
+An error to be thrown when the request is aborted due to a timeout.
+Includes an `event` and `timings` property.
+*/
+class TimeoutError extends RequestError {
+ constructor(error, timings, request) {
+ super(error.message, error, request);
+ this.name = 'TimeoutError';
+ this.event = error.event;
+ this.timings = timings;
+ }
+}
+exports.TimeoutError = TimeoutError;
+/**
+An error to be thrown when reading from response stream fails.
+*/
+class ReadError extends RequestError {
+ constructor(error, request) {
+ super(error.message, error, request);
+ this.name = 'ReadError';
+ this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_READING_RESPONSE_STREAM' : this.code;
+ }
+}
+exports.ReadError = ReadError;
+/**
+An error to be thrown when given an unsupported protocol.
+*/
+class UnsupportedProtocolError extends RequestError {
+ constructor(options) {
+ super(`Unsupported protocol "${options.url.protocol}"`, {}, options);
+ this.name = 'UnsupportedProtocolError';
+ this.code = 'ERR_UNSUPPORTED_PROTOCOL';
+ }
+}
+exports.UnsupportedProtocolError = UnsupportedProtocolError;
+const proxiedRequestEvents = [
+ 'socket',
+ 'connect',
+ 'continue',
+ 'information',
+ 'upgrade',
+ 'timeout'
+];
+class Request extends stream_1.Duplex {
+ constructor(url, options = {}, defaults) {
+ super({
+ // This must be false, to enable throwing after destroy
+ // It is used for retry logic in Promise API
+ autoDestroy: false,
+ // It needs to be zero because we're just proxying the data to another stream
+ highWaterMark: 0
+ });
+ this[kDownloadedSize] = 0;
+ this[kUploadedSize] = 0;
+ this.requestInitialized = false;
+ this[kServerResponsesPiped] = new Set();
+ this.redirects = [];
+ this[kStopReading] = false;
+ this[kTriggerRead] = false;
+ this[kJobs] = [];
+ this.retryCount = 0;
+ // TODO: Remove this when targeting Node.js >= 12
+ this._progressCallbacks = [];
+ const unlockWrite = () => this._unlockWrite();
+ const lockWrite = () => this._lockWrite();
+ this.on('pipe', (source) => {
+ source.prependListener('data', unlockWrite);
+ source.on('data', lockWrite);
+ source.prependListener('end', unlockWrite);
+ source.on('end', lockWrite);
+ });
+ this.on('unpipe', (source) => {
+ source.off('data', unlockWrite);
+ source.off('data', lockWrite);
+ source.off('end', unlockWrite);
+ source.off('end', lockWrite);
+ });
+ this.on('pipe', source => {
+ if (source instanceof http_1.IncomingMessage) {
+ this.options.headers = {
+ ...source.headers,
+ ...this.options.headers
+ };
+ }
+ });
+ const { json, body, form } = options;
+ if (json || body || form) {
+ this._lockWrite();
+ }
+ if (exports.kIsNormalizedAlready in options) {
+ this.options = options;
+ }
+ else {
+ try {
+ // @ts-expect-error Common TypeScript bug saying that `this.constructor` is not accessible
+ this.options = this.constructor.normalizeArguments(url, options, defaults);
+ }
+ catch (error) {
+ // TODO: Move this to `_destroy()`
+ if (is_1.default.nodeStream(options.body)) {
+ options.body.destroy();
+ }
+ this.destroy(error);
+ return;
+ }
+ }
+ (async () => {
+ var _a;
+ try {
+ if (this.options.body instanceof fs_1.ReadStream) {
+ await waitForOpenFile(this.options.body);
+ }
+ const { url: normalizedURL } = this.options;
+ if (!normalizedURL) {
+ throw new TypeError('Missing `url` property');
+ }
+ this.requestUrl = normalizedURL.toString();
+ decodeURI(this.requestUrl);
+ await this._finalizeBody();
+ await this._makeRequest();
+ if (this.destroyed) {
+ (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroy();
+ return;
+ }
+ // Queued writes etc.
+ for (const job of this[kJobs]) {
+ job();
+ }
+ // Prevent memory leak
+ this[kJobs].length = 0;
+ this.requestInitialized = true;
+ }
+ catch (error) {
+ if (error instanceof RequestError) {
+ this._beforeError(error);
+ return;
+ }
+ // This is a workaround for https://github.com/nodejs/node/issues/33335
+ if (!this.destroyed) {
+ this.destroy(error);
+ }
+ }
+ })();
+ }
+ static normalizeArguments(url, options, defaults) {
+ var _a, _b, _c, _d, _e;
+ const rawOptions = options;
+ if (is_1.default.object(url) && !is_1.default.urlInstance(url)) {
+ options = { ...defaults, ...url, ...options };
+ }
+ else {
+ if (url && options && options.url !== undefined) {
+ throw new TypeError('The `url` option is mutually exclusive with the `input` argument');
+ }
+ options = { ...defaults, ...options };
+ if (url !== undefined) {
+ options.url = url;
+ }
+ if (is_1.default.urlInstance(options.url)) {
+ options.url = new url_1.URL(options.url.toString());
+ }
+ }
+ // TODO: Deprecate URL options in Got 12.
+ // Support extend-specific options
+ if (options.cache === false) {
+ options.cache = undefined;
+ }
+ if (options.dnsCache === false) {
+ options.dnsCache = undefined;
+ }
+ // Nice type assertions
+ is_1.assert.any([is_1.default.string, is_1.default.undefined], options.method);
+ is_1.assert.any([is_1.default.object, is_1.default.undefined], options.headers);
+ is_1.assert.any([is_1.default.string, is_1.default.urlInstance, is_1.default.undefined], options.prefixUrl);
+ is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cookieJar);
+ is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.searchParams);
+ is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.cache);
+ is_1.assert.any([is_1.default.object, is_1.default.number, is_1.default.undefined], options.timeout);
+ is_1.assert.any([is_1.default.object, is_1.default.undefined], options.context);
+ is_1.assert.any([is_1.default.object, is_1.default.undefined], options.hooks);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.decompress);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.ignoreInvalidCookies);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.followRedirect);
+ is_1.assert.any([is_1.default.number, is_1.default.undefined], options.maxRedirects);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.throwHttpErrors);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.http2);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.allowGetBody);
+ is_1.assert.any([is_1.default.string, is_1.default.undefined], options.localAddress);
+ is_1.assert.any([dns_ip_version_1.isDnsLookupIpVersion, is_1.default.undefined], options.dnsLookupIpVersion);
+ is_1.assert.any([is_1.default.object, is_1.default.undefined], options.https);
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.rejectUnauthorized);
+ if (options.https) {
+ is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.https.rejectUnauthorized);
+ is_1.assert.any([is_1.default.function_, is_1.default.undefined], options.https.checkServerIdentity);
+ is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificateAuthority);
+ is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.key);
+ is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificate);
+ is_1.assert.any([is_1.default.string, is_1.default.undefined], options.https.passphrase);
+ is_1.assert.any([is_1.default.string, is_1.default.buffer, is_1.default.array, is_1.default.undefined], options.https.pfx);
+ }
+ is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cacheOptions);
+ // `options.method`
+ if (is_1.default.string(options.method)) {
+ options.method = options.method.toUpperCase();
+ }
+ else {
+ options.method = 'GET';
+ }
+ // `options.headers`
+ if (options.headers === (defaults === null || defaults === void 0 ? void 0 : defaults.headers)) {
+ options.headers = { ...options.headers };
+ }
+ else {
+ options.headers = lowercaseKeys({ ...(defaults === null || defaults === void 0 ? void 0 : defaults.headers), ...options.headers });
+ }
+ // Disallow legacy `url.Url`
+ if ('slashes' in options) {
+ throw new TypeError('The legacy `url.Url` has been deprecated. Use `URL` instead.');
+ }
+ // `options.auth`
+ if ('auth' in options) {
+ throw new TypeError('Parameter `auth` is deprecated. Use `username` / `password` instead.');
+ }
+ // `options.searchParams`
+ if ('searchParams' in options) {
+ if (options.searchParams && options.searchParams !== (defaults === null || defaults === void 0 ? void 0 : defaults.searchParams)) {
+ let searchParameters;
+ if (is_1.default.string(options.searchParams) || (options.searchParams instanceof url_1.URLSearchParams)) {
+ searchParameters = new url_1.URLSearchParams(options.searchParams);
+ }
+ else {
+ validateSearchParameters(options.searchParams);
+ searchParameters = new url_1.URLSearchParams();
+ // eslint-disable-next-line guard-for-in
+ for (const key in options.searchParams) {
+ const value = options.searchParams[key];
+ if (value === null) {
+ searchParameters.append(key, '');
+ }
+ else if (value !== undefined) {
+ searchParameters.append(key, value);
+ }
+ }
+ }
+ // `normalizeArguments()` is also used to merge options
+ (_a = defaults === null || defaults === void 0 ? void 0 : defaults.searchParams) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => {
+ // Only use default if one isn't already defined
+ if (!searchParameters.has(key)) {
+ searchParameters.append(key, value);
+ }
+ });
+ options.searchParams = searchParameters;
+ }
+ }
+ // `options.username` & `options.password`
+ options.username = (_b = options.username) !== null && _b !== void 0 ? _b : '';
+ options.password = (_c = options.password) !== null && _c !== void 0 ? _c : '';
+ // `options.prefixUrl` & `options.url`
+ if (is_1.default.undefined(options.prefixUrl)) {
+ options.prefixUrl = (_d = defaults === null || defaults === void 0 ? void 0 : defaults.prefixUrl) !== null && _d !== void 0 ? _d : '';
+ }
+ else {
+ options.prefixUrl = options.prefixUrl.toString();
+ if (options.prefixUrl !== '' && !options.prefixUrl.endsWith('/')) {
+ options.prefixUrl += '/';
+ }
+ }
+ if (is_1.default.string(options.url)) {
+ if (options.url.startsWith('/')) {
+ throw new Error('`input` must not start with a slash when using `prefixUrl`');
+ }
+ options.url = options_to_url_1.default(options.prefixUrl + options.url, options);
+ }
+ else if ((is_1.default.undefined(options.url) && options.prefixUrl !== '') || options.protocol) {
+ options.url = options_to_url_1.default(options.prefixUrl, options);
+ }
+ if (options.url) {
+ if ('port' in options) {
+ delete options.port;
+ }
+ // Make it possible to change `options.prefixUrl`
+ let { prefixUrl } = options;
+ Object.defineProperty(options, 'prefixUrl', {
+ set: (value) => {
+ const url = options.url;
+ if (!url.href.startsWith(value)) {
+ throw new Error(`Cannot change \`prefixUrl\` from ${prefixUrl} to ${value}: ${url.href}`);
+ }
+ options.url = new url_1.URL(value + url.href.slice(prefixUrl.length));
+ prefixUrl = value;
+ },
+ get: () => prefixUrl
+ });
+ // Support UNIX sockets
+ let { protocol } = options.url;
+ if (protocol === 'unix:') {
+ protocol = 'http:';
+ options.url = new url_1.URL(`http://unix${options.url.pathname}${options.url.search}`);
+ }
+ // Set search params
+ if (options.searchParams) {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
+ options.url.search = options.searchParams.toString();
+ }
+ // Protocol check
+ if (protocol !== 'http:' && protocol !== 'https:') {
+ throw new UnsupportedProtocolError(options);
+ }
+ // Update `username`
+ if (options.username === '') {
+ options.username = options.url.username;
+ }
+ else {
+ options.url.username = options.username;
+ }
+ // Update `password`
+ if (options.password === '') {
+ options.password = options.url.password;
+ }
+ else {
+ options.url.password = options.password;
+ }
+ }
+ // `options.cookieJar`
+ const { cookieJar } = options;
+ if (cookieJar) {
+ let { setCookie, getCookieString } = cookieJar;
+ is_1.assert.function_(setCookie);
+ is_1.assert.function_(getCookieString);
+ /* istanbul ignore next: Horrible `tough-cookie` v3 check */
+ if (setCookie.length === 4 && getCookieString.length === 0) {
+ setCookie = util_1.promisify(setCookie.bind(options.cookieJar));
+ getCookieString = util_1.promisify(getCookieString.bind(options.cookieJar));
+ options.cookieJar = {
+ setCookie,
+ getCookieString: getCookieString
+ };
+ }
+ }
+ // `options.cache`
+ const { cache } = options;
+ if (cache) {
+ if (!cacheableStore.has(cache)) {
+ cacheableStore.set(cache, new CacheableRequest(((requestOptions, handler) => {
+ const result = requestOptions[kRequest](requestOptions, handler);
+ // TODO: remove this when `cacheable-request` supports async request functions.
+ if (is_1.default.promise(result)) {
+ // @ts-expect-error
+ // We only need to implement the error handler in order to support HTTP2 caching.
+ // The result will be a promise anyway.
+ result.once = (event, handler) => {
+ if (event === 'error') {
+ result.catch(handler);
+ }
+ else if (event === 'abort') {
+ // The empty catch is needed here in case when
+ // it rejects before it's `await`ed in `_makeRequest`.
+ (async () => {
+ try {
+ const request = (await result);
+ request.once('abort', handler);
+ }
+ catch (_a) { }
+ })();
+ }
+ else {
+ /* istanbul ignore next: safety check */
+ throw new Error(`Unknown HTTP2 promise event: ${event}`);
+ }
+ return result;
+ };
+ }
+ return result;
+ }), cache));
+ }
+ }
+ // `options.cacheOptions`
+ options.cacheOptions = { ...options.cacheOptions };
+ // `options.dnsCache`
+ if (options.dnsCache === true) {
+ if (!globalDnsCache) {
+ globalDnsCache = new cacheable_lookup_1.default();
+ }
+ options.dnsCache = globalDnsCache;
+ }
+ else if (!is_1.default.undefined(options.dnsCache) && !options.dnsCache.lookup) {
+ throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${is_1.default(options.dnsCache)}`);
+ }
+ // `options.timeout`
+ if (is_1.default.number(options.timeout)) {
+ options.timeout = { request: options.timeout };
+ }
+ else if (defaults && options.timeout !== defaults.timeout) {
+ options.timeout = {
+ ...defaults.timeout,
+ ...options.timeout
+ };
+ }
+ else {
+ options.timeout = { ...options.timeout };
+ }
+ // `options.context`
+ if (!options.context) {
+ options.context = {};
+ }
+ // `options.hooks`
+ const areHooksDefault = options.hooks === (defaults === null || defaults === void 0 ? void 0 : defaults.hooks);
+ options.hooks = { ...options.hooks };
+ for (const event of exports.knownHookEvents) {
+ if (event in options.hooks) {
+ if (is_1.default.array(options.hooks[event])) {
+ // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044
+ options.hooks[event] = [...options.hooks[event]];
+ }
+ else {
+ throw new TypeError(`Parameter \`${event}\` must be an Array, got ${is_1.default(options.hooks[event])}`);
+ }
+ }
+ else {
+ options.hooks[event] = [];
+ }
+ }
+ if (defaults && !areHooksDefault) {
+ for (const event of exports.knownHookEvents) {
+ const defaultHooks = defaults.hooks[event];
+ if (defaultHooks.length > 0) {
+ // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044
+ options.hooks[event] = [
+ ...defaults.hooks[event],
+ ...options.hooks[event]
+ ];
+ }
+ }
+ }
+ // DNS options
+ if ('family' in options) {
+ deprecation_warning_1.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"');
+ }
+ // HTTPS options
+ if (defaults === null || defaults === void 0 ? void 0 : defaults.https) {
+ options.https = { ...defaults.https, ...options.https };
+ }
+ if ('rejectUnauthorized' in options) {
+ deprecation_warning_1.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"');
+ }
+ if ('checkServerIdentity' in options) {
+ deprecation_warning_1.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"');
+ }
+ if ('ca' in options) {
+ deprecation_warning_1.default('"options.ca" was never documented, please use "options.https.certificateAuthority"');
+ }
+ if ('key' in options) {
+ deprecation_warning_1.default('"options.key" was never documented, please use "options.https.key"');
+ }
+ if ('cert' in options) {
+ deprecation_warning_1.default('"options.cert" was never documented, please use "options.https.certificate"');
+ }
+ if ('passphrase' in options) {
+ deprecation_warning_1.default('"options.passphrase" was never documented, please use "options.https.passphrase"');
+ }
+ if ('pfx' in options) {
+ deprecation_warning_1.default('"options.pfx" was never documented, please use "options.https.pfx"');
+ }
+ // Other options
+ if ('followRedirects' in options) {
+ throw new TypeError('The `followRedirects` option does not exist. Use `followRedirect` instead.');
+ }
+ if (options.agent) {
+ for (const key in options.agent) {
+ if (key !== 'http' && key !== 'https' && key !== 'http2') {
+ throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${key}\``);
+ }
+ }
+ }
+ options.maxRedirects = (_e = options.maxRedirects) !== null && _e !== void 0 ? _e : 0;
+ // Set non-enumerable properties
+ exports.setNonEnumerableProperties([defaults, rawOptions], options);
+ return normalize_arguments_1.default(options, defaults);
+ }
+ _lockWrite() {
+ const onLockedWrite = () => {
+ throw new TypeError('The payload has been already provided');
+ };
+ this.write = onLockedWrite;
+ this.end = onLockedWrite;
+ }
+ _unlockWrite() {
+ this.write = super.write;
+ this.end = super.end;
+ }
+ async _finalizeBody() {
+ const { options } = this;
+ const { headers } = options;
+ const isForm = !is_1.default.undefined(options.form);
+ const isJSON = !is_1.default.undefined(options.json);
+ const isBody = !is_1.default.undefined(options.body);
+ const hasPayload = isForm || isJSON || isBody;
+ const cannotHaveBody = exports.withoutBody.has(options.method) && !(options.method === 'GET' && options.allowGetBody);
+ this._cannotHaveBody = cannotHaveBody;
+ if (hasPayload) {
+ if (cannotHaveBody) {
+ throw new TypeError(`The \`${options.method}\` method cannot be used with a body`);
+ }
+ if ([isBody, isForm, isJSON].filter(isTrue => isTrue).length > 1) {
+ throw new TypeError('The `body`, `json` and `form` options are mutually exclusive');
+ }
+ if (isBody &&
+ !(options.body instanceof stream_1.Readable) &&
+ !is_1.default.string(options.body) &&
+ !is_1.default.buffer(options.body) &&
+ !is_form_data_1.default(options.body)) {
+ throw new TypeError('The `body` option must be a stream.Readable, string or Buffer');
+ }
+ if (isForm && !is_1.default.object(options.form)) {
+ throw new TypeError('The `form` option must be an Object');
+ }
+ {
+ // Serialize body
+ const noContentType = !is_1.default.string(headers['content-type']);
+ if (isBody) {
+ // Special case for https://github.com/form-data/form-data
+ if (is_form_data_1.default(options.body) && noContentType) {
+ headers['content-type'] = `multipart/form-data; boundary=${options.body.getBoundary()}`;
+ }
+ this[kBody] = options.body;
+ }
+ else if (isForm) {
+ if (noContentType) {
+ headers['content-type'] = 'application/x-www-form-urlencoded';
+ }
+ this[kBody] = (new url_1.URLSearchParams(options.form)).toString();
+ }
+ else {
+ if (noContentType) {
+ headers['content-type'] = 'application/json';
+ }
+ this[kBody] = options.stringifyJson(options.json);
+ }
+ const uploadBodySize = await get_body_size_1.default(this[kBody], options.headers);
+ // See https://tools.ietf.org/html/rfc7230#section-3.3.2
+ // A user agent SHOULD send a Content-Length in a request message when
+ // no Transfer-Encoding is sent and the request method defines a meaning
+ // for an enclosed payload body. For example, a Content-Length header
+ // field is normally sent in a POST request even when the value is 0
+ // (indicating an empty payload body). A user agent SHOULD NOT send a
+ // Content-Length header field when the request message does not contain
+ // a payload body and the method semantics do not anticipate such a
+ // body.
+ if (is_1.default.undefined(headers['content-length']) && is_1.default.undefined(headers['transfer-encoding'])) {
+ if (!cannotHaveBody && !is_1.default.undefined(uploadBodySize)) {
+ headers['content-length'] = String(uploadBodySize);
+ }
+ }
+ }
+ }
+ else if (cannotHaveBody) {
+ this._lockWrite();
+ }
+ else {
+ this._unlockWrite();
+ }
+ this[kBodySize] = Number(headers['content-length']) || undefined;
+ }
+ async _onResponseBase(response) {
+ const { options } = this;
+ const { url } = options;
+ this[kOriginalResponse] = response;
+ if (options.decompress) {
+ response = decompressResponse(response);
+ }
+ const statusCode = response.statusCode;
+ const typedResponse = response;
+ typedResponse.statusMessage = typedResponse.statusMessage ? typedResponse.statusMessage : http.STATUS_CODES[statusCode];
+ typedResponse.url = options.url.toString();
+ typedResponse.requestUrl = this.requestUrl;
+ typedResponse.redirectUrls = this.redirects;
+ typedResponse.request = this;
+ typedResponse.isFromCache = response.fromCache || false;
+ typedResponse.ip = this.ip;
+ typedResponse.retryCount = this.retryCount;
+ this[kIsFromCache] = typedResponse.isFromCache;
+ this[kResponseSize] = Number(response.headers['content-length']) || undefined;
+ this[kResponse] = response;
+ response.once('end', () => {
+ this[kResponseSize] = this[kDownloadedSize];
+ this.emit('downloadProgress', this.downloadProgress);
+ });
+ response.once('error', (error) => {
+ // Force clean-up, because some packages don't do this.
+ // TODO: Fix decompress-response
+ response.destroy();
+ this._beforeError(new ReadError(error, this));
+ });
+ response.once('aborted', () => {
+ this._beforeError(new ReadError({
+ name: 'Error',
+ message: 'The server aborted pending request',
+ code: 'ECONNRESET'
+ }, this));
+ });
+ this.emit('downloadProgress', this.downloadProgress);
+ const rawCookies = response.headers['set-cookie'];
+ if (is_1.default.object(options.cookieJar) && rawCookies) {
+ let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString()));
+ if (options.ignoreInvalidCookies) {
+ promises = promises.map(async (p) => p.catch(() => { }));
+ }
+ try {
+ await Promise.all(promises);
+ }
+ catch (error) {
+ this._beforeError(error);
+ return;
+ }
+ }
+ if (options.followRedirect && response.headers.location && redirectCodes.has(statusCode)) {
+ // We're being redirected, we don't care about the response.
+ // It'd be best to abort the request, but we can't because
+ // we would have to sacrifice the TCP connection. We don't want that.
+ response.resume();
+ if (this[kRequest]) {
+ this[kCancelTimeouts]();
+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
+ delete this[kRequest];
+ this[kUnproxyEvents]();
+ }
+ const shouldBeGet = statusCode === 303 && options.method !== 'GET' && options.method !== 'HEAD';
+ if (shouldBeGet || !options.methodRewriting) {
+ // Server responded with "see other", indicating that the resource exists at another location,
+ // and the client should request it from that location via GET or HEAD.
+ options.method = 'GET';
+ if ('body' in options) {
+ delete options.body;
+ }
+ if ('json' in options) {
+ delete options.json;
+ }
+ if ('form' in options) {
+ delete options.form;
+ }
+ this[kBody] = undefined;
+ delete options.headers['content-length'];
+ }
+ if (this.redirects.length >= options.maxRedirects) {
+ this._beforeError(new MaxRedirectsError(this));
+ return;
+ }
+ try {
+ // Do not remove. See https://github.com/sindresorhus/got/pull/214
+ const redirectBuffer = Buffer.from(response.headers.location, 'binary').toString();
+ // Handles invalid URLs. See https://github.com/sindresorhus/got/issues/604
+ const redirectUrl = new url_1.URL(redirectBuffer, url);
+ const redirectString = redirectUrl.toString();
+ decodeURI(redirectString);
+ // eslint-disable-next-line no-inner-declarations
+ function isUnixSocketURL(url) {
+ return url.protocol === 'unix:' || url.hostname === 'unix';
+ }
+ if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) {
+ this._beforeError(new RequestError('Cannot redirect to UNIX socket', {}, this));
+ return;
+ }
+ // Redirecting to a different site, clear sensitive data.
+ if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) {
+ if ('host' in options.headers) {
+ delete options.headers.host;
+ }
+ if ('cookie' in options.headers) {
+ delete options.headers.cookie;
+ }
+ if ('authorization' in options.headers) {
+ delete options.headers.authorization;
+ }
+ if (options.username || options.password) {
+ options.username = '';
+ options.password = '';
+ }
+ }
+ else {
+ redirectUrl.username = options.username;
+ redirectUrl.password = options.password;
+ }
+ this.redirects.push(redirectString);
+ options.url = redirectUrl;
+ for (const hook of options.hooks.beforeRedirect) {
+ // eslint-disable-next-line no-await-in-loop
+ await hook(options, typedResponse);
+ }
+ this.emit('redirect', typedResponse, options);
+ await this._makeRequest();
+ }
+ catch (error) {
+ this._beforeError(error);
+ return;
+ }
+ return;
+ }
+ if (options.isStream && options.throwHttpErrors && !is_response_ok_1.isResponseOk(typedResponse)) {
+ this._beforeError(new HTTPError(typedResponse));
+ return;
+ }
+ response.on('readable', () => {
+ if (this[kTriggerRead]) {
+ this._read();
+ }
+ });
+ this.on('resume', () => {
+ response.resume();
+ });
+ this.on('pause', () => {
+ response.pause();
+ });
+ response.once('end', () => {
+ this.push(null);
+ });
+ this.emit('response', response);
+ for (const destination of this[kServerResponsesPiped]) {
+ if (destination.headersSent) {
+ continue;
+ }
+ // eslint-disable-next-line guard-for-in
+ for (const key in response.headers) {
+ const isAllowed = options.decompress ? key !== 'content-encoding' : true;
+ const value = response.headers[key];
+ if (isAllowed) {
+ destination.setHeader(key, value);
+ }
+ }
+ destination.statusCode = statusCode;
+ }
+ }
+ async _onResponse(response) {
+ try {
+ await this._onResponseBase(response);
+ }
+ catch (error) {
+ /* istanbul ignore next: better safe than sorry */
+ this._beforeError(error);
+ }
+ }
+ _onRequest(request) {
+ const { options } = this;
+ const { timeout, url } = options;
+ http_timer_1.default(request);
+ this[kCancelTimeouts] = timed_out_1.default(request, timeout, url);
+ const responseEventName = options.cache ? 'cacheableResponse' : 'response';
+ request.once(responseEventName, (response) => {
+ void this._onResponse(response);
+ });
+ request.once('error', (error) => {
+ var _a;
+ // Force clean-up, because some packages (e.g. nock) don't do this.
+ request.destroy();
+ // Node.js <= 12.18.2 mistakenly emits the response `end` first.
+ (_a = request.res) === null || _a === void 0 ? void 0 : _a.removeAllListeners('end');
+ error = error instanceof timed_out_1.TimeoutError ? new TimeoutError(error, this.timings, this) : new RequestError(error.message, error, this);
+ this._beforeError(error);
+ });
+ this[kUnproxyEvents] = proxy_events_1.default(request, this, proxiedRequestEvents);
+ this[kRequest] = request;
+ this.emit('uploadProgress', this.uploadProgress);
+ // Send body
+ const body = this[kBody];
+ const currentRequest = this.redirects.length === 0 ? this : request;
+ if (is_1.default.nodeStream(body)) {
+ body.pipe(currentRequest);
+ body.once('error', (error) => {
+ this._beforeError(new UploadError(error, this));
+ });
+ }
+ else {
+ this._unlockWrite();
+ if (!is_1.default.undefined(body)) {
+ this._writeRequest(body, undefined, () => { });
+ currentRequest.end();
+ this._lockWrite();
+ }
+ else if (this._cannotHaveBody || this._noPipe) {
+ currentRequest.end();
+ this._lockWrite();
+ }
+ }
+ this.emit('request', request);
+ }
+ async _createCacheableRequest(url, options) {
+ return new Promise((resolve, reject) => {
+ // TODO: Remove `utils/url-to-options.ts` when `cacheable-request` is fixed
+ Object.assign(options, url_to_options_1.default(url));
+ // `http-cache-semantics` checks this
+ // TODO: Fix this ignore.
+ // @ts-expect-error
+ delete options.url;
+ let request;
+ // This is ugly
+ const cacheRequest = cacheableStore.get(options.cache)(options, async (response) => {
+ // TODO: Fix `cacheable-response`
+ response._readableState.autoDestroy = false;
+ if (request) {
+ (await request).emit('cacheableResponse', response);
+ }
+ resolve(response);
+ });
+ // Restore options
+ options.url = url;
+ cacheRequest.once('error', reject);
+ cacheRequest.once('request', async (requestOrPromise) => {
+ request = requestOrPromise;
+ resolve(request);
+ });
+ });
+ }
+ async _makeRequest() {
+ var _a, _b, _c, _d, _e;
+ const { options } = this;
+ const { headers } = options;
+ for (const key in headers) {
+ if (is_1.default.undefined(headers[key])) {
+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
+ delete headers[key];
+ }
+ else if (is_1.default.null_(headers[key])) {
+ throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`);
+ }
+ }
+ if (options.decompress && is_1.default.undefined(headers['accept-encoding'])) {
+ headers['accept-encoding'] = supportsBrotli ? 'gzip, deflate, br' : 'gzip, deflate';
+ }
+ // Set cookies
+ if (options.cookieJar) {
+ const cookieString = await options.cookieJar.getCookieString(options.url.toString());
+ if (is_1.default.nonEmptyString(cookieString)) {
+ options.headers.cookie = cookieString;
+ }
+ }
+ for (const hook of options.hooks.beforeRequest) {
+ // eslint-disable-next-line no-await-in-loop
+ const result = await hook(options);
+ if (!is_1.default.undefined(result)) {
+ // @ts-expect-error Skip the type mismatch to support abstract responses
+ options.request = () => result;
+ break;
+ }
+ }
+ if (options.body && this[kBody] !== options.body) {
+ this[kBody] = options.body;
+ }
+ const { agent, request, timeout, url } = options;
+ if (options.dnsCache && !('lookup' in options)) {
+ options.lookup = options.dnsCache.lookup;
+ }
+ // UNIX sockets
+ if (url.hostname === 'unix') {
+ const matches = /(?<socketPath>.+?):(?<path>.+)/.exec(`${url.pathname}${url.search}`);
+ if (matches === null || matches === void 0 ? void 0 : matches.groups) {
+ const { socketPath, path } = matches.groups;
+ Object.assign(options, {
+ socketPath,
+ path,
+ host: ''
+ });
+ }
+ }
+ const isHttps = url.protocol === 'https:';
+ // Fallback function
+ let fallbackFn;
+ if (options.http2) {
+ fallbackFn = http2wrapper.auto;
+ }
+ else {
+ fallbackFn = isHttps ? https.request : http.request;
+ }
+ const realFn = (_a = options.request) !== null && _a !== void 0 ? _a : fallbackFn;
+ // Cache support
+ const fn = options.cache ? this._createCacheableRequest : realFn;
+ // Pass an agent directly when HTTP2 is disabled
+ if (agent && !options.http2) {
+ options.agent = agent[isHttps ? 'https' : 'http'];
+ }
+ // Prepare plain HTTP request options
+ options[kRequest] = realFn;
+ delete options.request;
+ // TODO: Fix this ignore.
+ // @ts-expect-error
+ delete options.timeout;
+ const requestOptions = options;
+ requestOptions.shared = (_b = options.cacheOptions) === null || _b === void 0 ? void 0 : _b.shared;
+ requestOptions.cacheHeuristic = (_c = options.cacheOptions) === null || _c === void 0 ? void 0 : _c.cacheHeuristic;
+ requestOptions.immutableMinTimeToLive = (_d = options.cacheOptions) === null || _d === void 0 ? void 0 : _d.immutableMinTimeToLive;
+ requestOptions.ignoreCargoCult = (_e = options.cacheOptions) === null || _e === void 0 ? void 0 : _e.ignoreCargoCult;
+ // If `dnsLookupIpVersion` is not present do not override `family`
+ if (options.dnsLookupIpVersion !== undefined) {
+ try {
+ requestOptions.family = dns_ip_version_1.dnsLookupIpVersionToFamily(options.dnsLookupIpVersion);
+ }
+ catch (_f) {
+ throw new Error('Invalid `dnsLookupIpVersion` option value');
+ }
+ }
+ // HTTPS options remapping
+ if (options.https) {
+ if ('rejectUnauthorized' in options.https) {
+ requestOptions.rejectUnauthorized = options.https.rejectUnauthorized;
+ }
+ if (options.https.checkServerIdentity) {
+ requestOptions.checkServerIdentity = options.https.checkServerIdentity;
+ }
+ if (options.https.certificateAuthority) {
+ requestOptions.ca = options.https.certificateAuthority;
+ }
+ if (options.https.certificate) {
+ requestOptions.cert = options.https.certificate;
+ }
+ if (options.https.key) {
+ requestOptions.key = options.https.key;
+ }
+ if (options.https.passphrase) {
+ requestOptions.passphrase = options.https.passphrase;
+ }
+ if (options.https.pfx) {
+ requestOptions.pfx = options.https.pfx;
+ }
+ }
+ try {
+ let requestOrResponse = await fn(url, requestOptions);
+ if (is_1.default.undefined(requestOrResponse)) {
+ requestOrResponse = fallbackFn(url, requestOptions);
+ }
+ // Restore options
+ options.request = request;
+ options.timeout = timeout;
+ options.agent = agent;
+ // HTTPS options restore
+ if (options.https) {
+ if ('rejectUnauthorized' in options.https) {
+ delete requestOptions.rejectUnauthorized;
+ }
+ if (options.https.checkServerIdentity) {
+ // @ts-expect-error - This one will be removed when we remove the alias.
+ delete requestOptions.checkServerIdentity;
+ }
+ if (options.https.certificateAuthority) {
+ delete requestOptions.ca;
+ }
+ if (options.https.certificate) {
+ delete requestOptions.cert;
+ }
+ if (options.https.key) {
+ delete requestOptions.key;
+ }
+ if (options.https.passphrase) {
+ delete requestOptions.passphrase;
+ }
+ if (options.https.pfx) {
+ delete requestOptions.pfx;
+ }
+ }
+ if (isClientRequest(requestOrResponse)) {
+ this._onRequest(requestOrResponse);
+ // Emit the response after the stream has been ended
+ }
+ else if (this.writable) {
+ this.once('finish', () => {
+ void this._onResponse(requestOrResponse);
+ });
+ this._unlockWrite();
+ this.end();
+ this._lockWrite();
+ }
+ else {
+ void this._onResponse(requestOrResponse);
+ }
+ }
+ catch (error) {
+ if (error instanceof CacheableRequest.CacheError) {
+ throw new CacheError(error, this);
+ }
+ throw new RequestError(error.message, error, this);
+ }
+ }
+ async _error(error) {
+ try {
+ for (const hook of this.options.hooks.beforeError) {
+ // eslint-disable-next-line no-await-in-loop
+ error = await hook(error);
+ }
+ }
+ catch (error_) {
+ error = new RequestError(error_.message, error_, this);
+ }
+ this.destroy(error);
+ }
+ _beforeError(error) {
+ if (this[kStopReading]) {
+ return;
+ }
+ const { options } = this;
+ const retryCount = this.retryCount + 1;
+ this[kStopReading] = true;
+ if (!(error instanceof RequestError)) {
+ error = new RequestError(error.message, error, this);
+ }
+ const typedError = error;
+ const { response } = typedError;
+ void (async () => {
+ if (response && !response.body) {
+ response.setEncoding(this._readableState.encoding);
+ try {
+ response.rawBody = await get_buffer_1.default(response);
+ response.body = response.rawBody.toString();
+ }
+ catch (_a) { }
+ }
+ if (this.listenerCount('retry') !== 0) {
+ let backoff;
+ try {
+ let retryAfter;
+ if (response && 'retry-after' in response.headers) {
+ retryAfter = Number(response.headers['retry-after']);
+ if (Number.isNaN(retryAfter)) {
+ retryAfter = Date.parse(response.headers['retry-after']) - Date.now();
+ if (retryAfter <= 0) {
+ retryAfter = 1;
+ }
+ }
+ else {
+ retryAfter *= 1000;
+ }
+ }
+ backoff = await options.retry.calculateDelay({
+ attemptCount: retryCount,
+ retryOptions: options.retry,
+ error: typedError,
+ retryAfter,
+ computedValue: calculate_retry_delay_1.default({
+ attemptCount: retryCount,
+ retryOptions: options.retry,
+ error: typedError,
+ retryAfter,
+ computedValue: 0
+ })
+ });
+ }
+ catch (error_) {
+ void this._error(new RequestError(error_.message, error_, this));
+ return;
+ }
+ if (backoff) {
+ const retry = async () => {
+ try {
+ for (const hook of this.options.hooks.beforeRetry) {
+ // eslint-disable-next-line no-await-in-loop
+ await hook(this.options, typedError, retryCount);
+ }
+ }
+ catch (error_) {
+ void this._error(new RequestError(error_.message, error, this));
+ return;
+ }
+ // Something forced us to abort the retry
+ if (this.destroyed) {
+ return;
+ }
+ this.destroy();
+ this.emit('retry', retryCount, error);
+ };
+ this[kRetryTimeout] = setTimeout(retry, backoff);
+ return;
+ }
+ }
+ void this._error(typedError);
+ })();
+ }
+ _read() {
+ this[kTriggerRead] = true;
+ const response = this[kResponse];
+ if (response && !this[kStopReading]) {
+ // We cannot put this in the `if` above
+ // because `.read()` also triggers the `end` event
+ if (response.readableLength) {
+ this[kTriggerRead] = false;
+ }
+ let data;
+ while ((data = response.read()) !== null) {
+ this[kDownloadedSize] += data.length;
+ this[kStartedReading] = true;
+ const progress = this.downloadProgress;
+ if (progress.percent < 1) {
+ this.emit('downloadProgress', progress);
+ }
+ this.push(data);
+ }
+ }
+ }
+ // Node.js 12 has incorrect types, so the encoding must be a string
+ _write(chunk, encoding, callback) {
+ const write = () => {
+ this._writeRequest(chunk, encoding, callback);
+ };
+ if (this.requestInitialized) {
+ write();
+ }
+ else {
+ this[kJobs].push(write);
+ }
+ }
+ _writeRequest(chunk, encoding, callback) {
+ if (this[kRequest].destroyed) {
+ // Probably the `ClientRequest` instance will throw
+ return;
+ }
+ this._progressCallbacks.push(() => {
+ this[kUploadedSize] += Buffer.byteLength(chunk, encoding);
+ const progress = this.uploadProgress;
+ if (progress.percent < 1) {
+ this.emit('uploadProgress', progress);
+ }
+ });
+ // TODO: What happens if it's from cache? Then this[kRequest] won't be defined.
+ this[kRequest].write(chunk, encoding, (error) => {
+ if (!error && this._progressCallbacks.length > 0) {
+ this._progressCallbacks.shift()();
+ }
+ callback(error);
+ });
+ }
+ _final(callback) {
+ const endRequest = () => {
+ // FIX: Node.js 10 calls the write callback AFTER the end callback!
+ while (this._progressCallbacks.length !== 0) {
+ this._progressCallbacks.shift()();
+ }
+ // We need to check if `this[kRequest]` is present,
+ // because it isn't when we use cache.
+ if (!(kRequest in this)) {
+ callback();
+ return;
+ }
+ if (this[kRequest].destroyed) {
+ callback();
+ return;
+ }
+ this[kRequest].end((error) => {
+ if (!error) {
+ this[kBodySize] = this[kUploadedSize];
+ this.emit('uploadProgress', this.uploadProgress);
+ this[kRequest].emit('upload-complete');
+ }
+ callback(error);
+ });
+ };
+ if (this.requestInitialized) {
+ endRequest();
+ }
+ else {
+ this[kJobs].push(endRequest);
+ }
+ }
+ _destroy(error, callback) {
+ var _a;
+ this[kStopReading] = true;
+ // Prevent further retries
+ clearTimeout(this[kRetryTimeout]);
+ if (kRequest in this) {
+ this[kCancelTimeouts]();
+ // TODO: Remove the next `if` when these get fixed:
+ // - https://github.com/nodejs/node/issues/32851
+ if (!((_a = this[kResponse]) === null || _a === void 0 ? void 0 : _a.complete)) {
+ this[kRequest].destroy();
+ }
+ }
+ if (error !== null && !is_1.default.undefined(error) && !(error instanceof RequestError)) {
+ error = new RequestError(error.message, error, this);
+ }
+ callback(error);
+ }
+ get _isAboutToError() {
+ return this[kStopReading];
+ }
+ /**
+ The remote IP address.
+ */
+ get ip() {
+ var _a;
+ return (_a = this.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress;
+ }
+ /**
+ Indicates whether the request has been aborted or not.
+ */
+ get aborted() {
+ var _a, _b, _c;
+ return ((_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroyed) !== null && _b !== void 0 ? _b : this.destroyed) && !((_c = this[kOriginalResponse]) === null || _c === void 0 ? void 0 : _c.complete);
+ }
+ get socket() {
+ var _a, _b;
+ return (_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.socket) !== null && _b !== void 0 ? _b : undefined;
+ }
+ /**
+ Progress event for downloading (receiving a response).
+ */
+ get downloadProgress() {
+ let percent;
+ if (this[kResponseSize]) {
+ percent = this[kDownloadedSize] / this[kResponseSize];
+ }
+ else if (this[kResponseSize] === this[kDownloadedSize]) {
+ percent = 1;
+ }
+ else {
+ percent = 0;
+ }
+ return {
+ percent,
+ transferred: this[kDownloadedSize],
+ total: this[kResponseSize]
+ };
+ }
+ /**
+ Progress event for uploading (sending a request).
+ */
+ get uploadProgress() {
+ let percent;
+ if (this[kBodySize]) {
+ percent = this[kUploadedSize] / this[kBodySize];
+ }
+ else if (this[kBodySize] === this[kUploadedSize]) {
+ percent = 1;
+ }
+ else {
+ percent = 0;
+ }
+ return {
+ percent,
+ transferred: this[kUploadedSize],
+ total: this[kBodySize]
+ };
+ }
+ /**
+ The object contains the following properties:
+
+ - `start` - Time when the request started.
+ - `socket` - Time when a socket was assigned to the request.
+ - `lookup` - Time when the DNS lookup finished.
+ - `connect` - Time when the socket successfully connected.
+ - `secureConnect` - Time when the socket securely connected.
+ - `upload` - Time when the request finished uploading.
+ - `response` - Time when the request fired `response` event.
+ - `end` - Time when the response fired `end` event.
+ - `error` - Time when the request fired `error` event.
+ - `abort` - Time when the request fired `abort` event.
+ - `phases`
+ - `wait` - `timings.socket - timings.start`
+ - `dns` - `timings.lookup - timings.socket`
+ - `tcp` - `timings.connect - timings.lookup`
+ - `tls` - `timings.secureConnect - timings.connect`
+ - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
+ - `firstByte` - `timings.response - timings.upload`
+ - `download` - `timings.end - timings.response`
+ - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
+
+ If something has not been measured yet, it will be `undefined`.
+
+ __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
+ */
+ get timings() {
+ var _a;
+ return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings;
+ }
+ /**
+ Whether the response was retrieved from the cache.
+ */
+ get isFromCache() {
+ return this[kIsFromCache];
+ }
+ pipe(destination, options) {
+ if (this[kStartedReading]) {
+ throw new Error('Failed to pipe. The response has been emitted already.');
+ }
+ if (destination instanceof http_1.ServerResponse) {
+ this[kServerResponsesPiped].add(destination);
+ }
+ return super.pipe(destination, options);
+ }
+ unpipe(destination) {
+ if (destination instanceof http_1.ServerResponse) {
+ this[kServerResponsesPiped].delete(destination);
+ }
+ super.unpipe(destination);
+ return this;
+ }
+}
+exports.default = Request;
diff --git a/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts b/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts
new file mode 100644
index 0000000..ea547cd
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts
@@ -0,0 +1,5 @@
+export declare type DnsLookupIpVersion = 'auto' | 'ipv4' | 'ipv6';
+declare type DnsIpFamily = 0 | 4 | 6;
+export declare const isDnsLookupIpVersion: (value: any) => boolean;
+export declare const dnsLookupIpVersionToFamily: (dnsLookupIpVersion: DnsLookupIpVersion) => DnsIpFamily;
+export {};
diff --git a/node_modules/got/dist/source/core/utils/dns-ip-version.js b/node_modules/got/dist/source/core/utils/dns-ip-version.js
new file mode 100644
index 0000000..6f599c2
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/dns-ip-version.js
@@ -0,0 +1,17 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.dnsLookupIpVersionToFamily = exports.isDnsLookupIpVersion = void 0;
+const conversionTable = {
+ auto: 0,
+ ipv4: 4,
+ ipv6: 6
+};
+exports.isDnsLookupIpVersion = (value) => {
+ return value in conversionTable;
+};
+exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => {
+ if (exports.isDnsLookupIpVersion(dnsLookupIpVersion)) {
+ return conversionTable[dnsLookupIpVersion];
+ }
+ throw new Error('Invalid DNS lookup IP version');
+};
diff --git a/node_modules/got/dist/source/core/utils/get-body-size.d.ts b/node_modules/got/dist/source/core/utils/get-body-size.d.ts
new file mode 100644
index 0000000..9745f69
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/get-body-size.d.ts
@@ -0,0 +1,3 @@
+import { ClientRequestArgs } from 'http';
+declare const _default: (body: unknown, headers: ClientRequestArgs['headers']) => Promise<number | undefined>;
+export default _default;
diff --git a/node_modules/got/dist/source/core/utils/get-body-size.js b/node_modules/got/dist/source/core/utils/get-body-size.js
new file mode 100644
index 0000000..0202342
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/get-body-size.js
@@ -0,0 +1,32 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const fs_1 = require("fs");
+const util_1 = require("util");
+const is_1 = require("@sindresorhus/is");
+const is_form_data_1 = require("./is-form-data");
+const statAsync = util_1.promisify(fs_1.stat);
+exports.default = async (body, headers) => {
+ if (headers && 'content-length' in headers) {
+ return Number(headers['content-length']);
+ }
+ if (!body) {
+ return 0;
+ }
+ if (is_1.default.string(body)) {
+ return Buffer.byteLength(body);
+ }
+ if (is_1.default.buffer(body)) {
+ return body.length;
+ }
+ if (is_form_data_1.default(body)) {
+ return util_1.promisify(body.getLength.bind(body))();
+ }
+ if (body instanceof fs_1.ReadStream) {
+ const { size } = await statAsync(body.path);
+ if (size === 0) {
+ return undefined;
+ }
+ return size;
+ }
+ return undefined;
+};
diff --git a/node_modules/got/dist/source/core/utils/get-buffer.d.ts b/node_modules/got/dist/source/core/utils/get-buffer.d.ts
new file mode 100644
index 0000000..66eaada
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/get-buffer.d.ts
@@ -0,0 +1,4 @@
+/// <reference types="node" />
+import { Readable } from 'stream';
+declare const getBuffer: (stream: Readable) => Promise<Buffer>;
+export default getBuffer;
diff --git a/node_modules/got/dist/source/core/utils/get-buffer.js b/node_modules/got/dist/source/core/utils/get-buffer.js
new file mode 100644
index 0000000..0155f08
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/get-buffer.js
@@ -0,0 +1,16 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+// TODO: Update https://github.com/sindresorhus/get-stream
+const getBuffer = async (stream) => {
+ const chunks = [];
+ let length = 0;
+ for await (const chunk of stream) {
+ chunks.push(chunk);
+ length += Buffer.byteLength(chunk);
+ }
+ if (Buffer.isBuffer(chunks[0])) {
+ return Buffer.concat(chunks, length);
+ }
+ return Buffer.from(chunks.join(''));
+};
+exports.default = getBuffer;
diff --git a/node_modules/got/dist/source/core/utils/is-form-data.d.ts b/node_modules/got/dist/source/core/utils/is-form-data.d.ts
new file mode 100644
index 0000000..02087b5
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/is-form-data.d.ts
@@ -0,0 +1,8 @@
+/// <reference types="node" />
+import { Readable } from 'stream';
+interface FormData extends Readable {
+ getBoundary: () => string;
+ getLength: (callback: (error: Error | null, length: number) => void) => void;
+}
+declare const _default: (body: unknown) => body is FormData;
+export default _default;
diff --git a/node_modules/got/dist/source/core/utils/is-form-data.js b/node_modules/got/dist/source/core/utils/is-form-data.js
new file mode 100644
index 0000000..32c16cc
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/is-form-data.js
@@ -0,0 +1,4 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const is_1 = require("@sindresorhus/is");
+exports.default = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary);
diff --git a/node_modules/got/dist/source/core/utils/is-response-ok.d.ts b/node_modules/got/dist/source/core/utils/is-response-ok.d.ts
new file mode 100644
index 0000000..7e1d49a
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/is-response-ok.d.ts
@@ -0,0 +1,2 @@
+import { Response } from '..';
+export declare const isResponseOk: (response: Response) => boolean;
diff --git a/node_modules/got/dist/source/core/utils/is-response-ok.js b/node_modules/got/dist/source/core/utils/is-response-ok.js
new file mode 100644
index 0000000..84c9331
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/is-response-ok.js
@@ -0,0 +1,8 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isResponseOk = void 0;
+exports.isResponseOk = (response) => {
+ const { statusCode } = response;
+ const limitStatusCode = response.request.options.followRedirect ? 299 : 399;
+ return (statusCode >= 200 && statusCode <= limitStatusCode) || statusCode === 304;
+};
diff --git a/node_modules/got/dist/source/core/utils/options-to-url.d.ts b/node_modules/got/dist/source/core/utils/options-to-url.d.ts
new file mode 100644
index 0000000..c696a83
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/options-to-url.d.ts
@@ -0,0 +1,14 @@
+import { URL } from 'url';
+export interface URLOptions {
+ href?: string;
+ protocol?: string;
+ host?: string;
+ hostname?: string;
+ port?: string | number;
+ pathname?: string;
+ search?: string;
+ searchParams?: unknown;
+ path?: string;
+}
+declare const _default: (origin: string, options: URLOptions) => URL;
+export default _default;
diff --git a/node_modules/got/dist/source/core/utils/options-to-url.js b/node_modules/got/dist/source/core/utils/options-to-url.js
new file mode 100644
index 0000000..65be02f
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/options-to-url.js
@@ -0,0 +1,53 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/* istanbul ignore file: deprecated */
+const url_1 = require("url");
+const keys = [
+ 'protocol',
+ 'host',
+ 'hostname',
+ 'port',
+ 'pathname',
+ 'search'
+];
+exports.default = (origin, options) => {
+ var _a, _b;
+ if (options.path) {
+ if (options.pathname) {
+ throw new TypeError('Parameters `path` and `pathname` are mutually exclusive.');
+ }
+ if (options.search) {
+ throw new TypeError('Parameters `path` and `search` are mutually exclusive.');
+ }
+ if (options.searchParams) {
+ throw new TypeError('Parameters `path` and `searchParams` are mutually exclusive.');
+ }
+ }
+ if (options.search && options.searchParams) {
+ throw new TypeError('Parameters `search` and `searchParams` are mutually exclusive.');
+ }
+ if (!origin) {
+ if (!options.protocol) {
+ throw new TypeError('No URL protocol specified');
+ }
+ origin = `${options.protocol}//${(_b = (_a = options.hostname) !== null && _a !== void 0 ? _a : options.host) !== null && _b !== void 0 ? _b : ''}`;
+ }
+ const url = new url_1.URL(origin);
+ if (options.path) {
+ const searchIndex = options.path.indexOf('?');
+ if (searchIndex === -1) {
+ options.pathname = options.path;
+ }
+ else {
+ options.pathname = options.path.slice(0, searchIndex);
+ options.search = options.path.slice(searchIndex + 1);
+ }
+ delete options.path;
+ }
+ for (const key of keys) {
+ if (options[key]) {
+ url[key] = options[key].toString();
+ }
+ }
+ return url;
+};
diff --git a/node_modules/got/dist/source/core/utils/proxy-events.d.ts b/node_modules/got/dist/source/core/utils/proxy-events.d.ts
new file mode 100644
index 0000000..b244d82
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/proxy-events.d.ts
@@ -0,0 +1,3 @@
+/// <reference types="node" />
+import { EventEmitter } from 'events';
+export default function (from: EventEmitter, to: EventEmitter, events: string[]): () => void;
diff --git a/node_modules/got/dist/source/core/utils/proxy-events.js b/node_modules/got/dist/source/core/utils/proxy-events.js
new file mode 100644
index 0000000..4d47c53
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/proxy-events.js
@@ -0,0 +1,17 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function default_1(from, to, events) {
+ const fns = {};
+ for (const event of events) {
+ fns[event] = (...args) => {
+ to.emit(event, ...args);
+ };
+ from.on(event, fns[event]);
+ }
+ return () => {
+ for (const event of events) {
+ from.off(event, fns[event]);
+ }
+ };
+}
+exports.default = default_1;
diff --git a/node_modules/got/dist/source/core/utils/timed-out.d.ts b/node_modules/got/dist/source/core/utils/timed-out.d.ts
new file mode 100644
index 0000000..5b495d4
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/timed-out.d.ts
@@ -0,0 +1,29 @@
+import { ClientRequest } from 'http';
+declare const reentry: unique symbol;
+interface TimedOutOptions {
+ host?: string;
+ hostname?: string;
+ protocol?: string;
+}
+export interface Delays {
+ lookup?: number;
+ connect?: number;
+ secureConnect?: number;
+ socket?: number;
+ response?: number;
+ send?: number;
+ request?: number;
+}
+export declare type ErrorCode = 'ETIMEDOUT' | 'ECONNRESET' | 'EADDRINUSE' | 'ECONNREFUSED' | 'EPIPE' | 'ENOTFOUND' | 'ENETUNREACH' | 'EAI_AGAIN';
+export declare class TimeoutError extends Error {
+ event: string;
+ code: ErrorCode;
+ constructor(threshold: number, event: string);
+}
+declare const _default: (request: ClientRequest, delays: Delays, options: TimedOutOptions) => () => void;
+export default _default;
+declare module 'http' {
+ interface ClientRequest {
+ [reentry]: boolean;
+ }
+}
diff --git a/node_modules/got/dist/source/core/utils/timed-out.js b/node_modules/got/dist/source/core/utils/timed-out.js
new file mode 100644
index 0000000..8877016
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/timed-out.js
@@ -0,0 +1,121 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TimeoutError = void 0;
+const net = require("net");
+const unhandle_1 = require("./unhandle");
+const reentry = Symbol('reentry');
+const noop = () => { };
+class TimeoutError extends Error {
+ constructor(threshold, event) {
+ super(`Timeout awaiting '${event}' for ${threshold}ms`);
+ this.event = event;
+ this.name = 'TimeoutError';
+ this.code = 'ETIMEDOUT';
+ }
+}
+exports.TimeoutError = TimeoutError;
+exports.default = (request, delays, options) => {
+ if (reentry in request) {
+ return noop;
+ }
+ request[reentry] = true;
+ const cancelers = [];
+ const { once, unhandleAll } = unhandle_1.default();
+ const addTimeout = (delay, callback, event) => {
+ var _a;
+ const timeout = setTimeout(callback, delay, delay, event);
+ (_a = timeout.unref) === null || _a === void 0 ? void 0 : _a.call(timeout);
+ const cancel = () => {
+ clearTimeout(timeout);
+ };
+ cancelers.push(cancel);
+ return cancel;
+ };
+ const { host, hostname } = options;
+ const timeoutHandler = (delay, event) => {
+ request.destroy(new TimeoutError(delay, event));
+ };
+ const cancelTimeouts = () => {
+ for (const cancel of cancelers) {
+ cancel();
+ }
+ unhandleAll();
+ };
+ request.once('error', error => {
+ cancelTimeouts();
+ // Save original behavior
+ /* istanbul ignore next */
+ if (request.listenerCount('error') === 0) {
+ throw error;
+ }
+ });
+ request.once('close', cancelTimeouts);
+ once(request, 'response', (response) => {
+ once(response, 'end', cancelTimeouts);
+ });
+ if (typeof delays.request !== 'undefined') {
+ addTimeout(delays.request, timeoutHandler, 'request');
+ }
+ if (typeof delays.socket !== 'undefined') {
+ const socketTimeoutHandler = () => {
+ timeoutHandler(delays.socket, 'socket');
+ };
+ request.setTimeout(delays.socket, socketTimeoutHandler);
+ // `request.setTimeout(0)` causes a memory leak.
+ // We can just remove the listener and forget about the timer - it's unreffed.
+ // See https://github.com/sindresorhus/got/issues/690
+ cancelers.push(() => {
+ request.removeListener('timeout', socketTimeoutHandler);
+ });
+ }
+ once(request, 'socket', (socket) => {
+ var _a;
+ const { socketPath } = request;
+ /* istanbul ignore next: hard to test */
+ if (socket.connecting) {
+ const hasPath = Boolean(socketPath !== null && socketPath !== void 0 ? socketPath : net.isIP((_a = hostname !== null && hostname !== void 0 ? hostname : host) !== null && _a !== void 0 ? _a : '') !== 0);
+ if (typeof delays.lookup !== 'undefined' && !hasPath && typeof socket.address().address === 'undefined') {
+ const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, 'lookup');
+ once(socket, 'lookup', cancelTimeout);
+ }
+ if (typeof delays.connect !== 'undefined') {
+ const timeConnect = () => addTimeout(delays.connect, timeoutHandler, 'connect');
+ if (hasPath) {
+ once(socket, 'connect', timeConnect());
+ }
+ else {
+ once(socket, 'lookup', (error) => {
+ if (error === null) {
+ once(socket, 'connect', timeConnect());
+ }
+ });
+ }
+ }
+ if (typeof delays.secureConnect !== 'undefined' && options.protocol === 'https:') {
+ once(socket, 'connect', () => {
+ const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, 'secureConnect');
+ once(socket, 'secureConnect', cancelTimeout);
+ });
+ }
+ }
+ if (typeof delays.send !== 'undefined') {
+ const timeRequest = () => addTimeout(delays.send, timeoutHandler, 'send');
+ /* istanbul ignore next: hard to test */
+ if (socket.connecting) {
+ once(socket, 'connect', () => {
+ once(request, 'upload-complete', timeRequest());
+ });
+ }
+ else {
+ once(request, 'upload-complete', timeRequest());
+ }
+ }
+ });
+ if (typeof delays.response !== 'undefined') {
+ once(request, 'upload-complete', () => {
+ const cancelTimeout = addTimeout(delays.response, timeoutHandler, 'response');
+ once(request, 'response', cancelTimeout);
+ });
+ }
+ return cancelTimeouts;
+};
diff --git a/node_modules/got/dist/source/core/utils/unhandle.d.ts b/node_modules/got/dist/source/core/utils/unhandle.d.ts
new file mode 100644
index 0000000..f49b792
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/unhandle.d.ts
@@ -0,0 +1,11 @@
+/// <reference types="node" />
+import { EventEmitter } from 'events';
+declare type Origin = EventEmitter;
+declare type Event = string | symbol;
+declare type Fn = (...args: any[]) => void;
+interface Unhandler {
+ once: (origin: Origin, event: Event, fn: Fn) => void;
+ unhandleAll: () => void;
+}
+declare const _default: () => Unhandler;
+export default _default;
diff --git a/node_modules/got/dist/source/core/utils/unhandle.js b/node_modules/got/dist/source/core/utils/unhandle.js
new file mode 100644
index 0000000..e749697
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/unhandle.js
@@ -0,0 +1,22 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+// When attaching listeners, it's very easy to forget about them.
+// Especially if you do error handling and set timeouts.
+// So instead of checking if it's proper to throw an error on every timeout ever,
+// use this simple tool which will remove all listeners you have attached.
+exports.default = () => {
+ const handlers = [];
+ return {
+ once(origin, event, fn) {
+ origin.once(event, fn);
+ handlers.push({ origin, event, fn });
+ },
+ unhandleAll() {
+ for (const handler of handlers) {
+ const { origin, event, fn } = handler;
+ origin.removeListener(event, fn);
+ }
+ handlers.length = 0;
+ }
+ };
+};
diff --git a/node_modules/got/dist/source/core/utils/url-to-options.d.ts b/node_modules/got/dist/source/core/utils/url-to-options.d.ts
new file mode 100644
index 0000000..c977a0f
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/url-to-options.d.ts
@@ -0,0 +1,15 @@
+import { URL, UrlWithStringQuery } from 'url';
+export interface LegacyUrlOptions {
+ protocol: string;
+ hostname: string;
+ host: string;
+ hash: string | null;
+ search: string | null;
+ pathname: string;
+ href: string;
+ path: string;
+ port?: number;
+ auth?: string;
+}
+declare const _default: (url: URL | UrlWithStringQuery) => LegacyUrlOptions;
+export default _default;
diff --git a/node_modules/got/dist/source/core/utils/url-to-options.js b/node_modules/got/dist/source/core/utils/url-to-options.js
new file mode 100644
index 0000000..19cc487
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/url-to-options.js
@@ -0,0 +1,24 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const is_1 = require("@sindresorhus/is");
+exports.default = (url) => {
+ // Cast to URL
+ url = url;
+ const options = {
+ protocol: url.protocol,
+ hostname: is_1.default.string(url.hostname) && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname,
+ host: url.host,
+ hash: url.hash,
+ search: url.search,
+ pathname: url.pathname,
+ href: url.href,
+ path: `${url.pathname || ''}${url.search || ''}`
+ };
+ if (is_1.default.string(url.port) && url.port.length > 0) {
+ options.port = Number(url.port);
+ }
+ if (url.username || url.password) {
+ options.auth = `${url.username || ''}:${url.password || ''}`;
+ }
+ return options;
+};
diff --git a/node_modules/got/dist/source/core/utils/weakable-map.d.ts b/node_modules/got/dist/source/core/utils/weakable-map.d.ts
new file mode 100644
index 0000000..9e3466c
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/weakable-map.d.ts
@@ -0,0 +1,8 @@
+export default class WeakableMap<K, V> {
+ weakMap: WeakMap<Record<string, unknown>, V>;
+ map: Map<K, V>;
+ constructor();
+ set(key: K, value: V): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+}
diff --git a/node_modules/got/dist/source/core/utils/weakable-map.js b/node_modules/got/dist/source/core/utils/weakable-map.js
new file mode 100644
index 0000000..5c5da7f
--- /dev/null
+++ b/node_modules/got/dist/source/core/utils/weakable-map.js
@@ -0,0 +1,29 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class WeakableMap {
+ constructor() {
+ this.weakMap = new WeakMap();
+ this.map = new Map();
+ }
+ set(key, value) {
+ if (typeof key === 'object') {
+ this.weakMap.set(key, value);
+ }
+ else {
+ this.map.set(key, value);
+ }
+ }
+ get(key) {
+ if (typeof key === 'object') {
+ return this.weakMap.get(key);
+ }
+ return this.map.get(key);
+ }
+ has(key) {
+ if (typeof key === 'object') {
+ return this.weakMap.has(key);
+ }
+ return this.map.has(key);
+ }
+}
+exports.default = WeakableMap;
diff --git a/node_modules/got/dist/source/create.d.ts b/node_modules/got/dist/source/create.d.ts
new file mode 100644
index 0000000..c8fd7ae
--- /dev/null
+++ b/node_modules/got/dist/source/create.d.ts
@@ -0,0 +1,5 @@
+import { Got, HandlerFunction, InstanceDefaults } from './types';
+export declare const defaultHandler: HandlerFunction;
+declare const create: (defaults: InstanceDefaults) => Got;
+export default create;
+export * from './types';
diff --git a/node_modules/got/dist/source/create.js b/node_modules/got/dist/source/create.js
new file mode 100644
index 0000000..bf56db4
--- /dev/null
+++ b/node_modules/got/dist/source/create.js
@@ -0,0 +1,240 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.defaultHandler = void 0;
+const is_1 = require("@sindresorhus/is");
+const as_promise_1 = require("./as-promise");
+const create_rejection_1 = require("./as-promise/create-rejection");
+const core_1 = require("./core");
+const deep_freeze_1 = require("./utils/deep-freeze");
+const errors = {
+ RequestError: as_promise_1.RequestError,
+ CacheError: as_promise_1.CacheError,
+ ReadError: as_promise_1.ReadError,
+ HTTPError: as_promise_1.HTTPError,
+ MaxRedirectsError: as_promise_1.MaxRedirectsError,
+ TimeoutError: as_promise_1.TimeoutError,
+ ParseError: as_promise_1.ParseError,
+ CancelError: as_promise_1.CancelError,
+ UnsupportedProtocolError: as_promise_1.UnsupportedProtocolError,
+ UploadError: as_promise_1.UploadError
+};
+// The `delay` package weighs 10KB (!)
+const delay = async (ms) => new Promise(resolve => {
+ setTimeout(resolve, ms);
+});
+const { normalizeArguments } = core_1.default;
+const mergeOptions = (...sources) => {
+ let mergedOptions;
+ for (const source of sources) {
+ mergedOptions = normalizeArguments(undefined, source, mergedOptions);
+ }
+ return mergedOptions;
+};
+const getPromiseOrStream = (options) => options.isStream ? new core_1.default(undefined, options) : as_promise_1.default(options);
+const isGotInstance = (value) => ('defaults' in value && 'options' in value.defaults);
+const aliases = [
+ 'get',
+ 'post',
+ 'put',
+ 'patch',
+ 'head',
+ 'delete'
+];
+exports.defaultHandler = (options, next) => next(options);
+const callInitHooks = (hooks, options) => {
+ if (hooks) {
+ for (const hook of hooks) {
+ hook(options);
+ }
+ }
+};
+const create = (defaults) => {
+ // Proxy properties from next handlers
+ defaults._rawHandlers = defaults.handlers;
+ defaults.handlers = defaults.handlers.map(fn => ((options, next) => {
+ // This will be assigned by assigning result
+ let root;
+ const result = fn(options, newOptions => {
+ root = next(newOptions);
+ return root;
+ });
+ if (result !== root && !options.isStream && root) {
+ const typedResult = result;
+ const { then: promiseThen, catch: promiseCatch, finally: promiseFianlly } = typedResult;
+ Object.setPrototypeOf(typedResult, Object.getPrototypeOf(root));
+ Object.defineProperties(typedResult, Object.getOwnPropertyDescriptors(root));
+ // These should point to the new promise
+ // eslint-disable-next-line promise/prefer-await-to-then
+ typedResult.then = promiseThen;
+ typedResult.catch = promiseCatch;
+ typedResult.finally = promiseFianlly;
+ }
+ return result;
+ }));
+ // Got interface
+ const got = ((url, options = {}, _defaults) => {
+ var _a, _b;
+ let iteration = 0;
+ const iterateHandlers = (newOptions) => {
+ return defaults.handlers[iteration++](newOptions, iteration === defaults.handlers.length ? getPromiseOrStream : iterateHandlers);
+ };
+ // TODO: Remove this in Got 12.
+ if (is_1.default.plainObject(url)) {
+ const mergedOptions = {
+ ...url,
+ ...options
+ };
+ core_1.setNonEnumerableProperties([url, options], mergedOptions);
+ options = mergedOptions;
+ url = undefined;
+ }
+ try {
+ // Call `init` hooks
+ let initHookError;
+ try {
+ callInitHooks(defaults.options.hooks.init, options);
+ callInitHooks((_a = options.hooks) === null || _a === void 0 ? void 0 : _a.init, options);
+ }
+ catch (error) {
+ initHookError = error;
+ }
+ // Normalize options & call handlers
+ const normalizedOptions = normalizeArguments(url, options, _defaults !== null && _defaults !== void 0 ? _defaults : defaults.options);
+ normalizedOptions[core_1.kIsNormalizedAlready] = true;
+ if (initHookError) {
+ throw new as_promise_1.RequestError(initHookError.message, initHookError, normalizedOptions);
+ }
+ return iterateHandlers(normalizedOptions);
+ }
+ catch (error) {
+ if (options.isStream) {
+ throw error;
+ }
+ else {
+ return create_rejection_1.default(error, defaults.options.hooks.beforeError, (_b = options.hooks) === null || _b === void 0 ? void 0 : _b.beforeError);
+ }
+ }
+ });
+ got.extend = (...instancesOrOptions) => {
+ const optionsArray = [defaults.options];
+ let handlers = [...defaults._rawHandlers];
+ let isMutableDefaults;
+ for (const value of instancesOrOptions) {
+ if (isGotInstance(value)) {
+ optionsArray.push(value.defaults.options);
+ handlers.push(...value.defaults._rawHandlers);
+ isMutableDefaults = value.defaults.mutableDefaults;
+ }
+ else {
+ optionsArray.push(value);
+ if ('handlers' in value) {
+ handlers.push(...value.handlers);
+ }
+ isMutableDefaults = value.mutableDefaults;
+ }
+ }
+ handlers = handlers.filter(handler => handler !== exports.defaultHandler);
+ if (handlers.length === 0) {
+ handlers.push(exports.defaultHandler);
+ }
+ return create({
+ options: mergeOptions(...optionsArray),
+ handlers,
+ mutableDefaults: Boolean(isMutableDefaults)
+ });
+ };
+ // Pagination
+ const paginateEach = (async function* (url, options) {
+ // TODO: Remove this `@ts-expect-error` when upgrading to TypeScript 4.
+ // Error: Argument of type 'Merge<Options, PaginationOptions<T, R>> | undefined' is not assignable to parameter of type 'Options | undefined'.
+ // @ts-expect-error
+ let normalizedOptions = normalizeArguments(url, options, defaults.options);
+ normalizedOptions.resolveBodyOnly = false;
+ const pagination = normalizedOptions.pagination;
+ if (!is_1.default.object(pagination)) {
+ throw new TypeError('`options.pagination` must be implemented');
+ }
+ const all = [];
+ let { countLimit } = pagination;
+ let numberOfRequests = 0;
+ while (numberOfRequests < pagination.requestLimit) {
+ if (numberOfRequests !== 0) {
+ // eslint-disable-next-line no-await-in-loop
+ await delay(pagination.backoff);
+ }
+ // @ts-expect-error FIXME!
+ // TODO: Throw when result is not an instance of Response
+ // eslint-disable-next-line no-await-in-loop
+ const result = (await got(undefined, undefined, normalizedOptions));
+ // eslint-disable-next-line no-await-in-loop
+ const parsed = await pagination.transform(result);
+ const current = [];
+ for (const item of parsed) {
+ if (pagination.filter(item, all, current)) {
+ if (!pagination.shouldContinue(item, all, current)) {
+ return;
+ }
+ yield item;
+ if (pagination.stackAllItems) {
+ all.push(item);
+ }
+ current.push(item);
+ if (--countLimit <= 0) {
+ return;
+ }
+ }
+ }
+ const optionsToMerge = pagination.paginate(result, all, current);
+ if (optionsToMerge === false) {
+ return;
+ }
+ if (optionsToMerge === result.request.options) {
+ normalizedOptions = result.request.options;
+ }
+ else if (optionsToMerge !== undefined) {
+ normalizedOptions = normalizeArguments(undefined, optionsToMerge, normalizedOptions);
+ }
+ numberOfRequests++;
+ }
+ });
+ got.paginate = paginateEach;
+ got.paginate.all = (async (url, options) => {
+ const results = [];
+ for await (const item of paginateEach(url, options)) {
+ results.push(item);
+ }
+ return results;
+ });
+ // For those who like very descriptive names
+ got.paginate.each = paginateEach;
+ // Stream API
+ got.stream = ((url, options) => got(url, { ...options, isStream: true }));
+ // Shortcuts
+ for (const method of aliases) {
+ got[method] = ((url, options) => got(url, { ...options, method }));
+ got.stream[method] = ((url, options) => {
+ return got(url, { ...options, method, isStream: true });
+ });
+ }
+ Object.assign(got, errors);
+ Object.defineProperty(got, 'defaults', {
+ value: defaults.mutableDefaults ? defaults : deep_freeze_1.default(defaults),
+ writable: defaults.mutableDefaults,
+ configurable: defaults.mutableDefaults,
+ enumerable: true
+ });
+ got.mergeOptions = mergeOptions;
+ return got;
+};
+exports.default = create;
+__exportStar(require("./types"), exports);
diff --git a/node_modules/got/dist/source/index.d.ts b/node_modules/got/dist/source/index.d.ts
new file mode 100644
index 0000000..e653895
--- /dev/null
+++ b/node_modules/got/dist/source/index.d.ts
@@ -0,0 +1,4 @@
+declare const got: import("./types").Got;
+export default got;
+export * from './create';
+export * from './as-promise';
diff --git a/node_modules/got/dist/source/index.js b/node_modules/got/dist/source/index.js
new file mode 100644
index 0000000..106b1f2
--- /dev/null
+++ b/node_modules/got/dist/source/index.js
@@ -0,0 +1,132 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const url_1 = require("url");
+const create_1 = require("./create");
+const defaults = {
+ options: {
+ method: 'GET',
+ retry: {
+ limit: 2,
+ methods: [
+ 'GET',
+ 'PUT',
+ 'HEAD',
+ 'DELETE',
+ 'OPTIONS',
+ 'TRACE'
+ ],
+ statusCodes: [
+ 408,
+ 413,
+ 429,
+ 500,
+ 502,
+ 503,
+ 504,
+ 521,
+ 522,
+ 524
+ ],
+ errorCodes: [
+ 'ETIMEDOUT',
+ 'ECONNRESET',
+ 'EADDRINUSE',
+ 'ECONNREFUSED',
+ 'EPIPE',
+ 'ENOTFOUND',
+ 'ENETUNREACH',
+ 'EAI_AGAIN'
+ ],
+ maxRetryAfter: undefined,
+ calculateDelay: ({ computedValue }) => computedValue
+ },
+ timeout: {},
+ headers: {
+ 'user-agent': 'got (https://github.com/sindresorhus/got)'
+ },
+ hooks: {
+ init: [],
+ beforeRequest: [],
+ beforeRedirect: [],
+ beforeRetry: [],
+ beforeError: [],
+ afterResponse: []
+ },
+ cache: undefined,
+ dnsCache: undefined,
+ decompress: true,
+ throwHttpErrors: true,
+ followRedirect: true,
+ isStream: false,
+ responseType: 'text',
+ resolveBodyOnly: false,
+ maxRedirects: 10,
+ prefixUrl: '',
+ methodRewriting: true,
+ ignoreInvalidCookies: false,
+ context: {},
+ // TODO: Set this to `true` when Got 12 gets released
+ http2: false,
+ allowGetBody: false,
+ https: undefined,
+ pagination: {
+ transform: (response) => {
+ if (response.request.options.responseType === 'json') {
+ return response.body;
+ }
+ return JSON.parse(response.body);
+ },
+ paginate: response => {
+ if (!Reflect.has(response.headers, 'link')) {
+ return false;
+ }
+ const items = response.headers.link.split(',');
+ let next;
+ for (const item of items) {
+ const parsed = item.split(';');
+ if (parsed[1].includes('next')) {
+ next = parsed[0].trimStart().trim();
+ next = next.slice(1, -1);
+ break;
+ }
+ }
+ if (next) {
+ const options = {
+ url: new url_1.URL(next)
+ };
+ return options;
+ }
+ return false;
+ },
+ filter: () => true,
+ shouldContinue: () => true,
+ countLimit: Infinity,
+ backoff: 0,
+ requestLimit: 10000,
+ stackAllItems: true
+ },
+ parseJson: (text) => JSON.parse(text),
+ stringifyJson: (object) => JSON.stringify(object),
+ cacheOptions: {}
+ },
+ handlers: [create_1.defaultHandler],
+ mutableDefaults: false
+};
+const got = create_1.default(defaults);
+exports.default = got;
+// For CommonJS default export support
+module.exports = got;
+module.exports.default = got;
+module.exports.__esModule = true; // Workaround for TS issue: https://github.com/sindresorhus/got/pull/1267
+__exportStar(require("./create"), exports);
+__exportStar(require("./as-promise"), exports);
diff --git a/node_modules/got/dist/source/types.d.ts b/node_modules/got/dist/source/types.d.ts
new file mode 100644
index 0000000..6c6b428
--- /dev/null
+++ b/node_modules/got/dist/source/types.d.ts
@@ -0,0 +1,344 @@
+/// <reference types="node" />
+import { URL } from 'url';
+import { CancelError } from 'p-cancelable';
+import { CancelableRequest, Response, Options, NormalizedOptions, Defaults as DefaultOptions, PaginationOptions, ParseError, RequestError, CacheError, ReadError, HTTPError, MaxRedirectsError, TimeoutError, UnsupportedProtocolError, UploadError } from './as-promise';
+import Request from './core';
+declare type Except<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;
+declare type Merge<FirstType, SecondType> = Except<FirstType, Extract<keyof FirstType, keyof SecondType>> & SecondType;
+/**
+Defaults for each Got instance.
+*/
+export interface InstanceDefaults {
+ /**
+ An object containing the default options of Got.
+ */
+ options: DefaultOptions;
+ /**
+ An array of functions. You execute them directly by calling `got()`.
+ They are some sort of "global hooks" - these functions are called first.
+ The last handler (*it's hidden*) is either `asPromise` or `asStream`, depending on the `options.isStream` property.
+
+ @default []
+ */
+ handlers: HandlerFunction[];
+ /**
+ A read-only boolean describing whether the defaults are mutable or not.
+ If set to `true`, you can update headers over time, for example, update an access token when it expires.
+
+ @default false
+ */
+ mutableDefaults: boolean;
+ _rawHandlers?: HandlerFunction[];
+}
+/**
+A Request object returned by calling Got, or any of the Got HTTP alias request functions.
+*/
+export declare type GotReturn = Request | CancelableRequest;
+/**
+A function to handle options and returns a Request object.
+It acts sort of like a "global hook", and will be called before any actual request is made.
+*/
+export declare type HandlerFunction = <T extends GotReturn>(options: NormalizedOptions, next: (options: NormalizedOptions) => T) => T | Promise<T>;
+/**
+The options available for `got.extend()`.
+*/
+export interface ExtendOptions extends Options {
+ /**
+ An array of functions. You execute them directly by calling `got()`.
+ They are some sort of "global hooks" - these functions are called first.
+ The last handler (*it's hidden*) is either `asPromise` or `asStream`, depending on the `options.isStream` property.
+
+ @default []
+ */
+ handlers?: HandlerFunction[];
+ /**
+ A read-only boolean describing whether the defaults are mutable or not.
+ If set to `true`, you can update headers over time, for example, update an access token when it expires.
+
+ @default false
+ */
+ mutableDefaults?: boolean;
+}
+export declare type OptionsOfTextResponseBody = Merge<Options, {
+ isStream?: false;
+ resolveBodyOnly?: false;
+ responseType?: 'text';
+}>;
+export declare type OptionsOfJSONResponseBody = Merge<Options, {
+ isStream?: false;
+ resolveBodyOnly?: false;
+ responseType?: 'json';
+}>;
+export declare type OptionsOfBufferResponseBody = Merge<Options, {
+ isStream?: false;
+ resolveBodyOnly?: false;
+ responseType: 'buffer';
+}>;
+export declare type OptionsOfUnknownResponseBody = Merge<Options, {
+ isStream?: false;
+ resolveBodyOnly?: false;
+}>;
+export declare type StrictOptions = Except<Options, 'isStream' | 'responseType' | 'resolveBodyOnly'>;
+export declare type StreamOptions = Merge<Options, {
+ isStream?: true;
+}>;
+declare type ResponseBodyOnly = {
+ resolveBodyOnly: true;
+};
+export declare type OptionsWithPagination<T = unknown, R = unknown> = Merge<Options, PaginationOptions<T, R>>;
+/**
+An instance of `got.paginate`.
+*/
+export interface GotPaginate {
+ /**
+ Same as `GotPaginate.each`.
+ */
+ <T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>): AsyncIterableIterator<T>;
+ /**
+ Same as `GotPaginate.each`.
+ */
+ <T, R = unknown>(options?: OptionsWithPagination<T, R>): AsyncIterableIterator<T>;
+ /**
+ Returns an async iterator.
+
+ See pagination.options for more pagination options.
+
+ @example
+ ```
+ (async () => {
+ const countLimit = 10;
+
+ const pagination = got.paginate('https://api.github.com/repos/sindresorhus/got/commits', {
+ pagination: {countLimit}
+ });
+
+ console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
+
+ for await (const commitData of pagination) {
+ console.log(commitData.commit.message);
+ }
+ })();
+ ```
+ */
+ each: (<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>) => AsyncIterableIterator<T>) & (<T, R = unknown>(options?: OptionsWithPagination<T, R>) => AsyncIterableIterator<T>);
+ /**
+ Returns a Promise for an array of all results.
+
+ See pagination.options for more pagination options.
+
+ @example
+ ```
+ (async () => {
+ const countLimit = 10;
+
+ const results = await got.paginate.all('https://api.github.com/repos/sindresorhus/got/commits', {
+ pagination: {countLimit}
+ });
+
+ console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
+ console.log(results);
+ })();
+ ```
+ */
+ all: (<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>) => Promise<T[]>) & (<T, R = unknown>(options?: OptionsWithPagination<T, R>) => Promise<T[]>);
+}
+export interface GotRequestFunction {
+ (url: string | URL, options?: OptionsOfTextResponseBody): CancelableRequest<Response<string>>;
+ <T>(url: string | URL, options?: OptionsOfJSONResponseBody): CancelableRequest<Response<T>>;
+ (url: string | URL, options?: OptionsOfBufferResponseBody): CancelableRequest<Response<Buffer>>;
+ (url: string | URL, options?: OptionsOfUnknownResponseBody): CancelableRequest<Response>;
+ (options: OptionsOfTextResponseBody): CancelableRequest<Response<string>>;
+ <T>(options: OptionsOfJSONResponseBody): CancelableRequest<Response<T>>;
+ (options: OptionsOfBufferResponseBody): CancelableRequest<Response<Buffer>>;
+ (options: OptionsOfUnknownResponseBody): CancelableRequest<Response>;
+ (url: string | URL, options?: (Merge<OptionsOfTextResponseBody, ResponseBodyOnly>)): CancelableRequest<string>;
+ <T>(url: string | URL, options?: (Merge<OptionsOfJSONResponseBody, ResponseBodyOnly>)): CancelableRequest<T>;
+ (url: string | URL, options?: (Merge<OptionsOfBufferResponseBody, ResponseBodyOnly>)): CancelableRequest<Buffer>;
+ (options: (Merge<OptionsOfTextResponseBody, ResponseBodyOnly>)): CancelableRequest<string>;
+ <T>(options: (Merge<OptionsOfJSONResponseBody, ResponseBodyOnly>)): CancelableRequest<T>;
+ (options: (Merge<OptionsOfBufferResponseBody, ResponseBodyOnly>)): CancelableRequest<Buffer>;
+ (url: string | URL, options?: Merge<Options, {
+ isStream: true;
+ }>): Request;
+ (options: Merge<Options, {
+ isStream: true;
+ }>): Request;
+ (url: string | URL, options?: Options): CancelableRequest | Request;
+ (options: Options): CancelableRequest | Request;
+}
+/**
+All available HTTP request methods provided by Got.
+*/
+export declare type HTTPAlias = 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete';
+interface GotStreamFunction {
+ (url: string | URL, options?: Merge<Options, {
+ isStream?: true;
+ }>): Request;
+ (options?: Merge<Options, {
+ isStream?: true;
+ }>): Request;
+}
+/**
+An instance of `got.stream()`.
+*/
+export declare type GotStream = GotStreamFunction & Record<HTTPAlias, GotStreamFunction>;
+/**
+An instance of `got`.
+*/
+export interface Got extends Record<HTTPAlias, GotRequestFunction>, GotRequestFunction {
+ /**
+ Sets `options.isStream` to `true`.
+
+ Returns a [duplex stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex) with additional events:
+ - request
+ - response
+ - redirect
+ - uploadProgress
+ - downloadProgress
+ - error
+ */
+ stream: GotStream;
+ /**
+ Returns an async iterator.
+
+ See pagination.options for more pagination options.
+
+ @example
+ ```
+ (async () => {
+ const countLimit = 10;
+
+ const pagination = got.paginate('https://api.github.com/repos/sindresorhus/got/commits', {
+ pagination: {countLimit}
+ });
+
+ console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
+
+ for await (const commitData of pagination) {
+ console.log(commitData.commit.message);
+ }
+ })();
+ ```
+ */
+ paginate: GotPaginate;
+ /**
+ The Got defaults used in that instance.
+ */
+ defaults: InstanceDefaults;
+ /**
+ An error to be thrown when a cache method fails. For example, if the database goes down or there's a filesystem error.
+ Contains a `code` property with `ERR_CACHE_ACCESS` or a more specific failure code.
+ */
+ CacheError: typeof CacheError;
+ /**
+ An error to be thrown when a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`.
+ If there is no specific code supplied, `code` defaults to `ERR_GOT_REQUEST_ERROR`.
+ */
+ RequestError: typeof RequestError;
+ /**
+ An error to be thrown when reading from response stream fails. Contains a `code` property with
+ `ERR_READING_RESPONSE_STREAM` or a more specific failure code.
+ */
+ ReadError: typeof ReadError;
+ /**
+ An error to be thrown when server response code is 2xx, and parsing body fails. Includes a
+ `response` property. Contains a `code` property with `ERR_BODY_PARSE_FAILURE` or a more specific failure code.
+ */
+ ParseError: typeof ParseError;
+ /**
+ An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304.
+ Includes a `response` property. Contains a `code` property with `ERR_NON_2XX_3XX_RESPONSE` or a more specific failure code.
+ */
+ HTTPError: typeof HTTPError;
+ /**
+ An error to be thrown when the server redirects you more than ten times.
+ Includes a `response` property. Contains a `code` property with `ERR_TOO_MANY_REDIRECTS`.
+ */
+ MaxRedirectsError: typeof MaxRedirectsError;
+ /**
+ An error to be thrown when given an unsupported protocol. Contains a `code` property with `ERR_UNSUPPORTED_PROTOCOL`.
+ */
+ UnsupportedProtocolError: typeof UnsupportedProtocolError;
+ /**
+ An error to be thrown when the request is aborted due to a timeout.
+ Includes an `event` and `timings` property. Contains a `code` property with `ETIMEDOUT`.
+ */
+ TimeoutError: typeof TimeoutError;
+ /**
+ An error to be thrown when the request body is a stream and an error occurs while reading from that stream.
+ Contains a `code` property with `ERR_UPLOAD` or a more specific failure code.
+ */
+ UploadError: typeof UploadError;
+ /**
+ An error to be thrown when the request is aborted with `.cancel()`. Contains a `code` property with `ERR_CANCELED`.
+ */
+ CancelError: typeof CancelError;
+ /**
+ Configure a new `got` instance with default `options`.
+ The `options` are merged with the parent instance's `defaults.options` using `got.mergeOptions`.
+ You can access the resolved options with the `.defaults` property on the instance.
+
+ Additionally, `got.extend()` accepts two properties from the `defaults` object: `mutableDefaults` and `handlers`.
+
+ It is also possible to merges many instances into a single one:
+ - options are merged using `got.mergeOptions()` (including hooks),
+ - handlers are stored in an array (you can access them through `instance.defaults.handlers`).
+
+ @example
+ ```js
+ const client = got.extend({
+ prefixUrl: 'https://example.com',
+ headers: {
+ 'x-unicorn': 'rainbow'
+ }
+ });
+
+ client.get('demo');
+
+ // HTTP Request =>
+ // GET /demo HTTP/1.1
+ // Host: example.com
+ // x-unicorn: rainbow
+ ```
+ */
+ extend: (...instancesOrOptions: Array<Got | ExtendOptions>) => Got;
+ /**
+ Merges multiple `got` instances into the parent.
+ */
+ mergeInstances: (parent: Got, ...instances: Got[]) => Got;
+ /**
+ Extends parent options.
+ Avoid using [object spread](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#Spread_in_object_literals) as it doesn't work recursively.
+
+ Options are deeply merged to a new object. The value of each key is determined as follows:
+
+ - If the new property is not defined, the old value is used.
+ - If the new property is explicitly set to `undefined`:
+ - If the parent property is a plain `object`, the parent value is deeply cloned.
+ - Otherwise, `undefined` is used.
+ - If the parent value is an instance of `URLSearchParams`:
+ - If the new value is a `string`, an `object` or an instance of `URLSearchParams`, a new `URLSearchParams` instance is created.
+ The values are merged using [`urlSearchParams.append(key, value)`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/append).
+ The keys defined in the new value override the keys defined in the parent value.
+ - Otherwise, the only available value is `undefined`.
+ - If the new property is a plain `object`:
+ - If the parent property is a plain `object` too, both values are merged recursively into a new `object`.
+ - Otherwise, only the new value is deeply cloned.
+ - If the new property is an `Array`, it overwrites the old one with a deep clone of the new property.
+ - Properties that are not enumerable, such as `context`, `body`, `json`, and `form`, will not be merged.
+ - Otherwise, the new value is assigned to the key.
+
+ **Note:** Only Got options are merged! Custom user options should be defined via [`options.context`](#context).
+
+ @example
+ ```
+ const a = {headers: {cat: 'meow', wolf: ['bark', 'wrrr']}};
+ const b = {headers: {cow: 'moo', wolf: ['auuu']}};
+
+ {...a, ...b} // => {headers: {cow: 'moo', wolf: ['auuu']}}
+ got.mergeOptions(a, b) // => {headers: {cat: 'meow', cow: 'moo', wolf: ['auuu']}}
+ ```
+ */
+ mergeOptions: (...sources: Options[]) => NormalizedOptions;
+}
+export {};
diff --git a/node_modules/got/dist/source/types.js b/node_modules/got/dist/source/types.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/got/dist/source/types.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/got/dist/source/utils/deep-freeze.d.ts b/node_modules/got/dist/source/utils/deep-freeze.d.ts
new file mode 100644
index 0000000..7c33e5c
--- /dev/null
+++ b/node_modules/got/dist/source/utils/deep-freeze.d.ts
@@ -0,0 +1 @@
+export default function deepFreeze<T extends Record<string, any>>(object: T): Readonly<T>;
diff --git a/node_modules/got/dist/source/utils/deep-freeze.js b/node_modules/got/dist/source/utils/deep-freeze.js
new file mode 100644
index 0000000..a696d4e
--- /dev/null
+++ b/node_modules/got/dist/source/utils/deep-freeze.js
@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const is_1 = require("@sindresorhus/is");
+function deepFreeze(object) {
+ for (const value of Object.values(object)) {
+ if (is_1.default.plainObject(value) || is_1.default.array(value)) {
+ deepFreeze(value);
+ }
+ }
+ return Object.freeze(object);
+}
+exports.default = deepFreeze;
diff --git a/node_modules/got/dist/source/utils/deprecation-warning.d.ts b/node_modules/got/dist/source/utils/deprecation-warning.d.ts
new file mode 100644
index 0000000..1a08f96
--- /dev/null
+++ b/node_modules/got/dist/source/utils/deprecation-warning.d.ts
@@ -0,0 +1,2 @@
+declare const _default: (message: string) => void;
+export default _default;
diff --git a/node_modules/got/dist/source/utils/deprecation-warning.js b/node_modules/got/dist/source/utils/deprecation-warning.js
new file mode 100644
index 0000000..3cfb7b2
--- /dev/null
+++ b/node_modules/got/dist/source/utils/deprecation-warning.js
@@ -0,0 +1,13 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const alreadyWarned = new Set();
+exports.default = (message) => {
+ if (alreadyWarned.has(message)) {
+ return;
+ }
+ alreadyWarned.add(message);
+ // @ts-expect-error Missing types.
+ process.emitWarning(`Got: ${message}`, {
+ type: 'DeprecationWarning'
+ });
+};
diff --git a/node_modules/got/license b/node_modules/got/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/got/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/got/package.json b/node_modules/got/package.json
new file mode 100644
index 0000000..83655e2
--- /dev/null
+++ b/node_modules/got/package.json
@@ -0,0 +1,130 @@
+{
+ "name": "got",
+ "version": "11.8.5",
+ "description": "Human-friendly and powerful HTTP request library for Node.js",
+ "license": "MIT",
+ "repository": "sindresorhus/got",
+ "funding": "https://github.com/sindresorhus/got?sponsor=1",
+ "main": "dist/source",
+ "engines": {
+ "node": ">=10.19.0"
+ },
+ "scripts": {
+ "test": "xo && npm run build && nyc --reporter=html --reporter=text ava",
+ "release": "np",
+ "build": "del-cli dist && tsc",
+ "prepare": "npm run build"
+ },
+ "files": [
+ "dist/source"
+ ],
+ "keywords": [
+ "http",
+ "https",
+ "http2",
+ "get",
+ "got",
+ "url",
+ "uri",
+ "request",
+ "simple",
+ "curl",
+ "wget",
+ "fetch",
+ "net",
+ "network",
+ "gzip",
+ "brotli",
+ "requests",
+ "human-friendly",
+ "axios",
+ "superagent",
+ "node-fetch",
+ "ky"
+ ],
+ "dependencies": {
+ "@sindresorhus/is": "^4.0.0",
+ "@szmarczak/http-timer": "^4.0.5",
+ "@types/cacheable-request": "^6.0.1",
+ "@types/responselike": "^1.0.0",
+ "cacheable-lookup": "^5.0.3",
+ "cacheable-request": "^7.0.2",
+ "decompress-response": "^6.0.0",
+ "http2-wrapper": "^1.0.0-beta.5.2",
+ "lowercase-keys": "^2.0.0",
+ "p-cancelable": "^2.0.0",
+ "responselike": "^2.0.0"
+ },
+ "devDependencies": {
+ "@ava/typescript": "^1.1.1",
+ "@sindresorhus/tsconfig": "^0.7.0",
+ "@sinonjs/fake-timers": "^6.0.1",
+ "@types/benchmark": "^1.0.33",
+ "@types/express": "^4.17.7",
+ "@types/node": "^14.14.0",
+ "@types/node-fetch": "^2.5.7",
+ "@types/pem": "^1.9.5",
+ "@types/pify": "^3.0.2",
+ "@types/request": "^2.48.5",
+ "@types/sinon": "^9.0.5",
+ "@types/tough-cookie": "^4.0.0",
+ "ava": "^3.11.1",
+ "axios": "^0.20.0",
+ "benchmark": "^2.1.4",
+ "coveralls": "^3.1.0",
+ "create-test-server": "^3.0.1",
+ "del-cli": "^3.0.1",
+ "delay": "^4.4.0",
+ "express": "^4.17.1",
+ "form-data": "^3.0.0",
+ "get-stream": "^6.0.0",
+ "nock": "^13.0.4",
+ "node-fetch": "^2.6.0",
+ "np": "^6.4.0",
+ "nyc": "^15.1.0",
+ "p-event": "^4.2.0",
+ "pem": "^1.14.4",
+ "pify": "^5.0.0",
+ "sinon": "^9.0.3",
+ "slow-stream": "0.0.4",
+ "tempy": "^1.0.0",
+ "to-readable-stream": "^2.1.0",
+ "tough-cookie": "^4.0.0",
+ "typescript": "4.0.3",
+ "xo": "^0.34.1"
+ },
+ "types": "dist/source",
+ "sideEffects": false,
+ "ava": {
+ "files": [
+ "test/*"
+ ],
+ "timeout": "1m",
+ "typescript": {
+ "rewritePaths": {
+ "test/": "dist/test/"
+ }
+ }
+ },
+ "nyc": {
+ "extension": [
+ ".ts"
+ ],
+ "exclude": [
+ "**/test/**"
+ ]
+ },
+ "xo": {
+ "ignores": [
+ "documentation/examples/*"
+ ],
+ "rules": {
+ "@typescript-eslint/no-empty-function": "off",
+ "node/prefer-global/url": "off",
+ "node/prefer-global/url-search-params": "off",
+ "import/no-anonymous-default-export": "off",
+ "@typescript-eslint/no-implicit-any-catch": "off"
+ }
+ },
+ "runkitExampleFilename": "./documentation/examples/runkit-example.js"
+}
diff --git a/node_modules/got/readme.md b/node_modules/got/readme.md
new file mode 100644
index 0000000..858c536
--- /dev/null
+++ b/node_modules/got/readme.md
@@ -0,0 +1,2477 @@
+<div align="center">
+ <br>
+ <br>
+ <img width="360" src="media/logo.svg" alt="Got">
+ <br>
+ <br>
+ <br>
+ <p align="center">Huge thanks to <a href="https://moxy.studio"><img src="https://sindresorhus.com/assets/thanks/moxy-logo.svg" valign="middle" width="150"></a> for sponsoring Sindre Sorhus!
+ </p>
+ <p align="center"><sup>(they love Got too!)</sup></p>
+ <br>
+ <br>
+</div>
+
+> Human-friendly and powerful HTTP request library for Node.js
+
+[![Build Status: Linux](https://travis-ci.com/sindresorhus/got.svg?branch=master)](https://travis-ci.com/github/sindresorhus/got)
+[![Coverage Status](https://coveralls.io/repos/github/sindresorhus/got/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/got?branch=master)
+[![Downloads](https://img.shields.io/npm/dm/got.svg)](https://npmjs.com/got)
+[![Install size](https://packagephobia.now.sh/badge?p=got)](https://packagephobia.now.sh/result?p=got)
+
+[Moving from Request?](documentation/migration-guides.md) [*(Note that Request is unmaintained)*](https://github.com/request/request/issues/3142)
+
+[See how Got compares to other HTTP libraries](#comparison)
+
+For browser usage, we recommend [Ky](https://github.com/sindresorhus/ky) by the same people.
+
+## Highlights
+
+- [Promise API](#api)
+- [Stream API](#streams)
+- [Pagination API](#pagination)
+- [HTTP2 support](#http2)
+- [Request cancelation](#aborting-the-request)
+- [RFC compliant caching](#cache-adapters)
+- [Follows redirects](#followredirect)
+- [Retries on failure](#retry)
+- [Progress events](#onuploadprogress-progress)
+- [Handles gzip/deflate/brotli](#decompress)
+- [Timeout handling](#timeout)
+- [Errors with metadata](#errors)
+- [JSON mode](#json-mode)
+- [WHATWG URL support](#url)
+- [HTTPS API](#advanced-https-api)
+- [Hooks](#hooks)
+- [Instances with custom defaults](#instances)
+- [Types](#types)
+- [Composable](documentation/advanced-creation.md#merging-instances)
+- [Plugins](documentation/lets-make-a-plugin.md)
+- [Used by 4K+ packages and 1.8M+ repos](https://github.com/sindresorhus/got/network/dependents)
+- [Actively maintained](https://github.com/sindresorhus/got/graphs/contributors)
+- [Trusted by many companies](#widely-used)
+
+## Install
+
+```
+$ npm install got
+```
+
+## Usage
+
+###### Promise
+
+```js
+const got = require('got');
+
+(async () => {
+ try {
+ const response = await got('https://sindresorhus.com');
+ console.log(response.body);
+ //=> '<!doctype html> ...'
+ } catch (error) {
+ console.log(error.response.body);
+ //=> 'Internal server error ...'
+ }
+})();
+```
+
+###### JSON
+
+```js
+const got = require('got');
+
+(async () => {
+ const {body} = await got.post('https://httpbin.org/anything', {
+ json: {
+ hello: 'world'
+ },
+ responseType: 'json'
+ });
+
+ console.log(body.data);
+ //=> {hello: 'world'}
+})();
+```
+
+See [JSON mode](#json-mode) for more details.
+
+###### Streams
+
+```js
+const stream = require('stream');
+const {promisify} = require('util');
+const fs = require('fs');
+const got = require('got');
+
+const pipeline = promisify(stream.pipeline);
+
+(async () => {
+ await pipeline(
+ got.stream('https://sindresorhus.com'),
+ fs.createWriteStream('index.html')
+ );
+
+ // For POST, PUT, PATCH, and DELETE methods, `got.stream` returns a `stream.Writable`.
+ await pipeline(
+ fs.createReadStream('index.html'),
+ got.stream.post('https://sindresorhus.com')
+ );
+})();
+```
+
+**Tip:** `from.pipe(to)` doesn't forward errors. Instead, use [`stream.pipeline(from, ..., to, callback)`](https://nodejs.org/api/stream.html#stream_stream_pipeline_streams_callback).
+
+**Note:** While `got.post('https://example.com')` resolves, `got.stream.post('https://example.com')` will hang indefinitely until a body is provided. If there's no body on purpose, remember to `.end()` the stream or set the [`body`](#body) option to an empty string.
+
+### API
+
+It's a `GET` request by default, but can be changed by using different methods or via [`options.method`](#method).
+
+**By default, Got will retry on failure. To disable this option, set [`options.retry`](#retry) to `0`.**
+
+#### got(url?, options?)
+
+Returns a Promise giving a [Response object](#response) or a [Got Stream](#streams-1) if `options.isStream` is set to true.
+
+##### url
+
+Type: `string | object`
+
+The URL to request, as a string, a [`https.request` options object](https://nodejs.org/api/https.html#https_https_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url).
+
+Properties from `options` will override properties in the parsed `url`.
+
+If no protocol is specified, it will throw a `TypeError`.
+
+**Note:** The query string is **not** parsed as search params. Example:
+
+```js
+got('https://example.com/?query=a b'); //=> https://example.com/?query=a%20b
+got('https://example.com/', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
+
+// The query string is overridden by `searchParams`
+got('https://example.com/?query=a b', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
+```
+
+##### options
+
+Type: `object`
+
+Any of the [`https.request`](https://nodejs.org/api/https.html#https_https_request_options_callback) options.
+
+**Note:** Legacy URL support is disabled. `options.path` is supported only for backwards compatibility. Use `options.pathname` and `options.searchParams` instead. `options.auth` has been replaced with `options.username` & `options.password`.
+
+###### method
+
+Type: `string`\
+Default: `GET`
+
+The HTTP method used to make the request.
+
+###### prefixUrl
+
+Type: `string | URL`
+
+When specified, `prefixUrl` will be prepended to `url`. The prefix can be any valid URL, either relative or absolute.\
+A trailing slash `/` is optional - one will be added automatically.
+
+**Note:** `prefixUrl` will be ignored if the `url` argument is a URL instance.
+
+**Note:** Leading slashes in `input` are disallowed when using this option to enforce consistency and avoid confusion. For example, when the prefix URL is `https://example.com/foo` and the input is `/bar`, there's ambiguity whether the resulting URL would become `https://example.com/foo/bar` or `https://example.com/bar`. The latter is used by browsers.
+
+**Tip:** Useful when used with [`got.extend()`](#custom-endpoints) to create niche-specific Got instances.
+
+**Tip:** You can change `prefixUrl` using hooks as long as the URL still includes the `prefixUrl`. If the URL doesn't include it anymore, it will throw.
+
+```js
+const got = require('got');
+
+(async () => {
+ await got('unicorn', {prefixUrl: 'https://cats.com'});
+ //=> 'https://cats.com/unicorn'
+
+ const instance = got.extend({
+ prefixUrl: 'https://google.com'
+ });
+
+ await instance('unicorn', {
+ hooks: {
+ beforeRequest: [
+ options => {
+ options.prefixUrl = 'https://cats.com';
+ }
+ ]
+ }
+ });
+ //=> 'https://cats.com/unicorn'
+})();
+```
+
+###### headers
+
+Type: `object`\
+Default: `{}`
+
+Request headers.
+
+Existing headers will be overwritten. Headers set to `undefined` will be omitted.
+
+###### isStream
+
+Type: `boolean`\
+Default: `false`
+
+Returns a `Stream` instead of a `Promise`. This is equivalent to calling `got.stream(url, options?)`.
+
+###### body
+
+Type: `string | Buffer | stream.Readable` or [`form-data` instance](https://github.com/form-data/form-data)
+
+**Note #1:** The `body` option cannot be used with the `json` or `form` option.
+
+**Note #2:** If you provide this option, `got.stream()` will be read-only.
+
+**Note #3:** If you provide a payload with the `GET` or `HEAD` method, it will throw a `TypeError` unless the method is `GET` and the `allowGetBody` option is set to `true`.
+
+**Note #4:** This option is not enumerable and will not be merged with the instance defaults.
+
+The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / `fs.createReadStream` instance / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`.
+
+###### json
+
+Type: `object | Array | number | string | boolean | null` *(JSON-serializable values)*
+
+**Note #1:** If you provide this option, `got.stream()` will be read-only.\
+**Note #2:** This option is not enumerable and will not be merged with the instance defaults.
+
+JSON body. If the `Content-Type` header is not set, it will be set to `application/json`.
+
+###### context
+
+Type: `object`
+
+User data. In contrast to other options, `context` is not enumerable.
+
+**Note:** The object is never merged, it's just passed through. Got will not modify the object in any way.
+
+It's very useful for storing auth tokens:
+
+```js
+const got = require('got');
+
+const instance = got.extend({
+ hooks: {
+ beforeRequest: [
+ options => {
+ if (!options.context || !options.context.token) {
+ throw new Error('Token required');
+ }
+
+ options.headers.token = options.context.token;
+ }
+ ]
+ }
+});
+
+(async () => {
+ const context = {
+ token: 'secret'
+ };
+
+ const response = await instance('https://httpbin.org/headers', {context});
+
+ // Let's see the headers
+ console.log(response.body);
+})();
+```
+
+###### responseType
+
+Type: `string`\
+Default: `'text'`
+
+**Note:** When using streams, this option is ignored.
+
+The parsing method. Can be `'text'`, `'json'` or `'buffer'`.
+
+The promise also has `.text()`, `.json()` and `.buffer()` methods which return another Got promise for the parsed body.\
+It's like setting the options to `{responseType: 'json', resolveBodyOnly: true}` but without affecting the main Got promise.
+
+Example:
+
+```js
+(async () => {
+ const responsePromise = got(url);
+ const bufferPromise = responsePromise.buffer();
+ const jsonPromise = responsePromise.json();
+
+ const [response, buffer, json] = await Promise.all([responsePromise, bufferPromise, jsonPromise]);
+ // `response` is an instance of Got Response
+ // `buffer` is an instance of Buffer
+ // `json` is an object
+})();
+```
+
+```js
+// This
+const body = await got(url).json();
+
+// is semantically the same as this
+const body = await got(url, {responseType: 'json', resolveBodyOnly: true});
+```
+
+**Note:** `buffer` will return the raw body buffer. Modifying it will also alter the result of `promise.text()` and `promise.json()`. Before overwritting the buffer, please copy it first via `Buffer.from(buffer)`. See https://github.com/nodejs/node/issues/27080
+
+###### parseJson
+
+Type: `(text: string) => unknown`\
+Default: `(text: string) => JSON.parse(text)`
+
+A function used to parse JSON responses.
+
+<details>
+<summary>Example</summary>
+
+Using [`bourne`](https://github.com/hapijs/bourne) to prevent prototype pollution:
+
+```js
+const got = require('got');
+const Bourne = require('@hapi/bourne');
+
+(async () => {
+ const parsed = await got('https://example.com', {
+ parseJson: text => Bourne.parse(text)
+ }).json();
+
+ console.log(parsed);
+})();
+```
+</details>
+
+###### stringifyJson
+
+Type: `(object: unknown) => string`\
+Default: `(object: unknown) => JSON.stringify(object)`
+
+A function used to stringify the body of JSON requests.
+
+<details>
+<summary>Examples</summary>
+
+Ignore properties starting with `_`:
+
+```js
+const got = require('got');
+
+(async () => {
+ await got.post('https://example.com', {
+ stringifyJson: object => JSON.stringify(object, (key, value) => {
+ if (key.startsWith('_')) {
+ return;
+ }
+
+ return value;
+ }),
+ json: {
+ some: 'payload',
+ _ignoreMe: 1234
+ }
+ });
+})();
+```
+
+All numbers as strings:
+
+```js
+const got = require('got');
+
+(async () => {
+ await got.post('https://example.com', {
+ stringifyJson: object => JSON.stringify(object, (key, value) => {
+ if (typeof value === 'number') {
+ return value.toString();
+ }
+
+ return value;
+ }),
+ json: {
+ some: 'payload',
+ number: 1
+ }
+ });
+})();
+```
+</details>
+
+###### resolveBodyOnly
+
+Type: `boolean`\
+Default: `false`
+
+When set to `true` the promise will return the [Response body](#body-1) instead of the [Response](#response) object.
+
+###### cookieJar
+
+Type: `object` | [`tough.CookieJar` instance](https://github.com/salesforce/tough-cookie#cookiejar)
+
+**Note:** If you provide this option, `options.headers.cookie` will be overridden.
+
+Cookie support. You don't have to care about parsing or how to store them. [Example](#cookies).
+
+###### cookieJar.setCookie
+
+Type: `Function<Promise>`
+
+The function takes two arguments: `rawCookie` (`string`) and `url` (`string`).
+
+###### cookieJar.getCookieString
+
+Type: `Function<Promise>`
+
+The function takes one argument: `url` (`string`).
+
+###### ignoreInvalidCookies
+
+Type: `boolean`\
+Default: `false`
+
+Ignore invalid cookies instead of throwing an error. Only useful when the `cookieJar` option has been set. Not recommended.
+
+###### encoding
+
+Type: `string`\
+Default: `'utf8'`
+
+[Encoding](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) to be used on `setEncoding` of the response data.
+
+To get a [`Buffer`](https://nodejs.org/api/buffer.html), you need to set [`responseType`](#responseType) to `buffer` instead. Don't set this option to `null`.
+
+**Note:** This doesn't affect streams! Instead, you need to do `got.stream(...).setEncoding(encoding)`.
+
+###### form
+
+Type: `object`
+
+**Note #1:** If you provide this option, `got.stream()` will be read-only.\
+**Note #2:** This option is not enumerable and will not be merged with the instance defaults.
+
+The form body is converted to a query string using [`(new URLSearchParams(object)).toString()`](https://nodejs.org/api/url.html#url_constructor_new_urlsearchparams_obj).
+
+If the `Content-Type` header is not present, it will be set to `application/x-www-form-urlencoded`.
+
+###### searchParams
+
+Type: `string | object<string, string | number> | URLSearchParams`
+
+Query string that will be added to the request URL. This will override the query string in `url`.
+
+If you need to pass in an array, you can do it using a `URLSearchParams` instance:
+
+```js
+const got = require('got');
+
+const searchParams = new URLSearchParams([['key', 'a'], ['key', 'b']]);
+
+got('https://example.com', {searchParams});
+
+console.log(searchParams.toString());
+//=> 'key=a&key=b'
+```
+
+There are some exceptions in regards to `URLSearchParams` behavior:
+
+**Note #1:** `null` values are not stringified, an empty string is used instead.
+
+**Note #2:** `undefined` values are not stringified, the entry is skipped instead.
+
+###### timeout
+
+Type: `number | object`
+
+Milliseconds to wait for the server to end the response before aborting the request with [`got.TimeoutError`](#gottimeouterror) error (a.k.a. `request` property). By default, there's no timeout.
+
+This also accepts an `object` with the following fields to constrain the duration of each phase of the request lifecycle:
+
+- `lookup` starts when a socket is assigned and ends when the hostname has been resolved. Does not apply when using a Unix domain socket.
+- `connect` starts when `lookup` completes (or when the socket is assigned if lookup does not apply to the request) and ends when the socket is connected.
+- `secureConnect` starts when `connect` completes and ends when the handshaking process completes (HTTPS only).
+- `socket` starts when the socket is connected. See [request.setTimeout](https://nodejs.org/api/http.html#http_request_settimeout_timeout_callback).
+- `response` starts when the request has been written to the socket and ends when the response headers are received.
+- `send` starts when the socket is connected and ends with the request has been written to the socket.
+- `request` starts when the request is initiated and ends when the response's end event fires.
+
+###### retry
+
+Type: `number | object`\
+Default:
+- limit: `2`
+- calculateDelay: `({attemptCount, retryOptions, error, computedValue}) => computedValue | Promise<computedValue>`
+- methods: `GET` `PUT` `HEAD` `DELETE` `OPTIONS` `TRACE`
+- statusCodes: [`408`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) [`413`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413) [`429`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) [`500`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) [`502`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502) [`503`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503) [`504`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504) [`521`](https://support.cloudflare.com/hc/en-us/articles/115003011431#521error) [`522`](https://support.cloudflare.com/hc/en-us/articles/115003011431#522error) [`524`](https://support.cloudflare.com/hc/en-us/articles/115003011431#524error)
+- maxRetryAfter: `undefined`
+- errorCodes: `ETIMEDOUT` `ECONNRESET` `EADDRINUSE` `ECONNREFUSED` `EPIPE` `ENOTFOUND` `ENETUNREACH` `EAI_AGAIN`
+
+An object representing `limit`, `calculateDelay`, `methods`, `statusCodes`, `maxRetryAfter` and `errorCodes` fields for maximum retry count, retry handler, allowed methods, allowed status codes, maximum [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) time and allowed error codes.
+
+If `maxRetryAfter` is set to `undefined`, it will use `options.timeout`.\
+If [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header is greater than `maxRetryAfter`, it will cancel the request.
+
+Delays between retries counts with function `1000 * Math.pow(2, retry - 1) + Math.random() * 100`, where `retry` is attempt number (starts from 1).
+
+The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value. The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry).
+
+**Note:** The `calculateDelay` function is responsible for the entire cache mechanism, including the `limit` property. To support it, you need to check whether `computedValue` is different than `0`.
+
+By default, it retries *only* on the specified methods, status codes, and on these network errors:
+- `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached.
+- `ECONNRESET`: Connection was forcibly closed by a peer.
+- `EADDRINUSE`: Could not bind to any free port.
+- `ECONNREFUSED`: Connection was refused by the server.
+- `EPIPE`: The remote side of the stream being written has been closed.
+- `ENOTFOUND`: Couldn't resolve the hostname to an IP address.
+- `ENETUNREACH`: No internet connection.
+- `EAI_AGAIN`: DNS lookup timed out.
+
+<a name="retry-stream"></a>
+
+You can retry Got streams too. The implementation looks like this:
+
+```js
+const got = require('got');
+const fs = require('fs');
+
+let writeStream;
+
+const fn = (retryCount = 0) => {
+ const stream = got.stream('https://example.com');
+ stream.retryCount = retryCount;
+
+ if (writeStream) {
+ writeStream.destroy();
+ }
+
+ writeStream = fs.createWriteStream('example.com');
+
+ stream.pipe(writeStream);
+
+ // If you don't attach the listener, it will NOT make a retry.
+ // It automatically checks the listener count so it knows whether to retry or not :)
+ stream.once('retry', fn);
+};
+
+fn();
+```
+
+###### followRedirect
+
+Type: `boolean`\
+Default: `true`
+
+Defines if redirect responses should be followed automatically.
+
+Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), Got will automatically request the resource pointed to in the location header via `GET`. This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4).
+
+###### methodRewriting
+
+Type: `boolean`\
+Default: `true`
+
+By default, redirects will use [method rewriting](https://tools.ietf.org/html/rfc7231#section-6.4). For example, when sending a POST request and receiving a `302`, it will resend the body to the new location using the same HTTP method (`POST` in this case).
+
+###### allowGetBody
+
+Type: `boolean`\
+Default: `false`
+
+**Note:** The [RFC 7321](https://tools.ietf.org/html/rfc7231#section-4.3.1) doesn't specify any particular behavior for the GET method having a payload, therefore **it's considered an [anti-pattern](https://en.wikipedia.org/wiki/Anti-pattern)**.
+
+Set this to `true` to allow sending body for the `GET` method. However, the [HTTP/2 specification](https://tools.ietf.org/html/rfc7540#section-8.1.3) says that `An HTTP GET request includes request header fields and no payload body`, therefore when using the HTTP/2 protocol this option will have no effect. This option is only meant to interact with non-compliant servers when you have no other choice.
+
+###### maxRedirects
+
+Type: `number`\
+Default: `10`
+
+If exceeded, the request will be aborted and a `MaxRedirectsError` will be thrown.
+
+###### decompress
+
+Type: `boolean`\
+Default: `true`
+
+Decompress the response automatically. This will set the `accept-encoding` header to `gzip, deflate, br` on Node.js 11.7.0+ or `gzip, deflate` for older Node.js versions, unless you set it yourself.
+
+Brotli (`br`) support requires Node.js 11.7.0 or later.
+
+If this is disabled, a compressed response is returned as a `Buffer`. This may be useful if you want to handle decompression yourself or stream the raw compressed data.
+
+###### cache
+
+Type: `object | false`\
+Default: `false`
+
+[Cache adapter instance](#cache-adapters) for storing cached response data.
+
+###### cacheOptions
+
+Type: `object | undefined`\
+Default: `{}`
+
+[Cache options](https://github.com/kornelski/http-cache-semantics#constructor-options) used for the specified request.
+
+###### dnsCache
+
+Type: `CacheableLookup | false`\
+Default: `false`
+
+An instance of [`CacheableLookup`](https://github.com/szmarczak/cacheable-lookup) used for making DNS lookups. Useful when making lots of requests to different *public* hostnames.
+
+**Note:** This should stay disabled when making requests to internal hostnames such as `localhost`, `database.local` etc.\
+`CacheableLookup` uses `dns.resolver4(..)` and `dns.resolver6(...)` under the hood and fall backs to `dns.lookup(...)` when the first two fail, which may lead to additional delay.
+
+###### dnsLookupIpVersion
+
+Type: `'auto' | 'ipv4' | 'ipv6'`\
+Default: `'auto'`
+
+Indicates which DNS record family to use.\
+Values:
+ - `auto`: IPv4 (if present) or IPv6
+ - `ipv4`: Only IPv4
+ - `ipv6`: Only IPv6
+
+Note: If you are using the undocumented option `family`, `dnsLookupIpVersion` will override it.
+
+```js
+// `api6.ipify.org` will be resolved as IPv4 and the request will be over IPv4 (the website will respond with your public IPv4)
+await got('https://api6.ipify.org', {
+ dnsLookupIpVersion: 'ipv4'
+});
+
+// `api6.ipify.org` will be resolved as IPv6 and the request will be over IPv6 (the website will respond with your public IPv6)
+await got('https://api6.ipify.org', {
+ dnsLookupIpVersion: 'ipv6'
+});
+```
+
+###### lookup
+
+Type: `Function`\
+Default: [`dns.lookup`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback)
+
+Custom DNS resolution logic.
+
+The function signature is the same as [`dns.lookup`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback).
+
+###### request
+
+Type: `Function`\
+Default: `http.request | https.request` *(Depending on the protocol)*
+
+Custom request function. The main purpose of this is to [support HTTP2 using a wrapper](https://github.com/szmarczak/http2-wrapper).
+
+###### http2
+
+Type: `boolean`\
+Default: `false`
+
+If set to `true`, Got will additionally accept HTTP2 requests.\
+It will choose either HTTP/1.1 or HTTP/2 depending on the ALPN protocol.
+
+**Note:** Overriding `options.request` will disable HTTP2 support.
+
+**Note:** This option will default to `true` in the next upcoming major release.
+
+```js
+const got = require('got');
+
+(async () => {
+ const {headers} = await got('https://nghttp2.org/httpbin/anything', {http2: true});
+ console.log(headers.via);
+ //=> '2 nghttpx'
+})();
+```
+
+###### throwHttpErrors
+
+Type: `boolean`\
+Default: `true`
+
+Determines if a [`got.HTTPError`](#gothttperror) is thrown for unsuccessful responses.
+
+If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing. This may be useful if you are checking for resource availability and are expecting error responses.
+
+###### agent
+
+Type: `object`
+
+An object representing `http`, `https` and `http2` keys for [`http.Agent`](https://nodejs.org/api/http.html#http_class_http_agent), [`https.Agent`](https://nodejs.org/api/https.html#https_class_https_agent) and [`http2wrapper.Agent`](https://github.com/szmarczak/http2-wrapper#new-http2agentoptions) instance. This is necessary because a request to one protocol might redirect to another. In such a scenario, Got will switch over to the right protocol agent for you.
+
+If a key is not present, it will default to a global agent.
+
+```js
+const got = require('got');
+const HttpAgent = require('agentkeepalive');
+const {HttpsAgent} = HttpAgent;
+
+got('https://sindresorhus.com', {
+ agent: {
+ http: new HttpAgent(),
+ https: new HttpsAgent()
+ }
+});
+```
+
+###### hooks
+
+Type: `object<string, Function[]>`
+
+Hooks allow modifications during the request lifecycle. Hook functions may be async and are run serially.
+
+###### hooks.init
+
+Type: `Function[]`\
+Default: `[]`
+
+Called with plain [request options](#options), right before their normalization. This is especially useful in conjunction with [`got.extend()`](#instances) when the input needs custom handling.
+
+See the [Request migration guide](documentation/migration-guides.md#breaking-changes) for an example.
+
+**Note #1:** This hook must be synchronous!\
+**Note #2:** Errors in this hook will be converted into an instances of [`RequestError`](#gotrequesterror).\
+**Note #3:** The options object may not have a `url` property. To modify it, use a `beforeRequest` hook instead.
+
+###### hooks.beforeRequest
+
+Type: `Function[]`\
+Default: `[]`
+
+Called with [normalized](source/core/index.ts) [request options](#options). Got will make no further changes to the request before it is sent. This is especially useful in conjunction with [`got.extend()`](#instances) when you want to create an API client that, for example, uses HMAC-signing.
+
+**Note:** Changing `options.json` or `options.form` has no effect on the request, you should change `options.body` instead. If needed, update the `options.headers` accordingly. Example:
+
+```js
+const got = require('got');
+
+got.post({
+ json: {payload: 'old'},
+ hooks: {
+ beforeRequest: [
+ options => {
+ options.body = JSON.stringify({payload: 'new'});
+ options.headers['content-length'] = options.body.length.toString();
+ }
+ ]
+ }
+});
+```
+
+**Tip:** You can override the `request` function by returning a [`ClientRequest`-like](https://nodejs.org/api/http.html#http_class_http_clientrequest) instance or a [`IncomingMessage`-like](https://nodejs.org/api/http.html#http_class_http_incomingmessage) instance. This is very useful when creating a custom cache mechanism.
+
+###### hooks.beforeRedirect
+
+Type: `Function[]`\
+Default: `[]`
+
+Called with [normalized](source/core/index.ts) [request options](#options) and the redirect [response](#response). Got will make no further changes to the request. This is especially useful when you want to avoid dead sites. Example:
+
+```js
+const got = require('got');
+
+got('https://example.com', {
+ hooks: {
+ beforeRedirect: [
+ (options, response) => {
+ if (options.hostname === 'deadSite') {
+ options.hostname = 'fallbackSite';
+ }
+ }
+ ]
+ }
+});
+```
+
+###### hooks.beforeRetry
+
+Type: `Function[]`\
+Default: `[]`
+
+**Note:** When using streams, this hook is ignored.
+
+Called with [normalized](source/normalize-arguments.ts) [request options](#options), the error and the retry count. Got will make no further changes to the request. This is especially useful when some extra work is required before the next try. Example:
+
+```js
+const got = require('got');
+
+got.post('https://example.com', {
+ hooks: {
+ beforeRetry: [
+ (options, error, retryCount) => {
+ if (error.response.statusCode === 413) { // Payload too large
+ options.body = getNewBody();
+ }
+ }
+ ]
+ }
+});
+```
+
+**Note:** When retrying in a `afterResponse` hook, all remaining `beforeRetry` hooks will be called without the `error` and `retryCount` arguments.
+
+###### hooks.afterResponse
+
+Type: `Function[]`\
+Default: `[]`
+
+**Note:** When using streams, this hook is ignored.
+
+Called with [response object](#response) and a retry function. Calling the retry function will trigger `beforeRetry` hooks.
+
+Each function should return the response. This is especially useful when you want to refresh an access token. Example:
+
+```js
+const got = require('got');
+
+const instance = got.extend({
+ hooks: {
+ afterResponse: [
+ (response, retryWithMergedOptions) => {
+ if (response.statusCode === 401) { // Unauthorized
+ const updatedOptions = {
+ headers: {
+ token: getNewToken() // Refresh the access token
+ }
+ };
+
+ // Save for further requests
+ instance.defaults.options = got.mergeOptions(instance.defaults.options, updatedOptions);
+
+ // Make a new retry
+ return retryWithMergedOptions(updatedOptions);
+ }
+
+ // No changes otherwise
+ return response;
+ }
+ ],
+ beforeRetry: [
+ (options, error, retryCount) => {
+ // This will be called on `retryWithMergedOptions(...)`
+ }
+ ]
+ },
+ mutableDefaults: true
+});
+```
+
+###### hooks.beforeError
+
+Type: `Function[]`\
+Default: `[]`
+
+Called with an `Error` instance. The error is passed to the hook right before it's thrown. This is especially useful when you want to have more detailed errors.
+
+**Note:** Errors thrown while normalizing input options are thrown directly and not part of this hook.
+
+```js
+const got = require('got');
+
+got('https://api.github.com/some-endpoint', {
+ hooks: {
+ beforeError: [
+ error => {
+ const {response} = error;
+ if (response && response.body) {
+ error.name = 'GitHubError';
+ error.message = `${response.body.message} (${response.statusCode})`;
+ }
+
+ return error;
+ }
+ ]
+ }
+});
+```
+
+##### pagination
+
+Type: `object`
+
+**Note:** We're [looking for feedback](https://github.com/sindresorhus/got/issues/1052), any ideas on how to improve the API are welcome.
+
+###### pagination.transform
+
+Type: `Function`\
+Default: `response => JSON.parse(response.body)`
+
+A function that transform [`Response`](#response) into an array of items. This is where you should do the parsing.
+
+###### pagination.paginate
+
+Type: `Function`\
+Default: [`Link` header logic](source/index.ts)
+
+The function takes three arguments:
+- `response` - The current response object.
+- `allItems` - An array of the emitted items.
+- `currentItems` - Items from the current response.
+
+It should return an object representing Got options pointing to the next page. The options are merged automatically with the previous request, therefore the options returned `pagination.paginate(...)` must reflect changes only. If there are no more pages, `false` should be returned.
+
+For example, if you want to stop when the response contains less items than expected, you can use something like this:
+
+```js
+const got = require('got');
+
+(async () => {
+ const limit = 10;
+
+ const items = got.paginate('https://example.com/items', {
+ searchParams: {
+ limit,
+ offset: 0
+ },
+ pagination: {
+ paginate: (response, allItems, currentItems) => {
+ const previousSearchParams = response.request.options.searchParams;
+ const previousOffset = previousSearchParams.get('offset');
+
+ if (currentItems.length < limit) {
+ return false;
+ }
+
+ return {
+ searchParams: {
+ ...previousSearchParams,
+ offset: Number(previousOffset) + limit,
+ }
+ };
+ }
+ }
+ });
+
+ console.log('Items from all pages:', items);
+})();
+```
+
+###### pagination.filter
+
+Type: `Function`\
+Default: `(item, allItems, currentItems) => true`
+
+Checks whether the item should be emitted or not.
+
+###### pagination.shouldContinue
+
+Type: `Function`\
+Default: `(item, allItems, currentItems) => true`
+
+Checks whether the pagination should continue.
+
+For example, if you need to stop **before** emitting an entry with some flag, you should use `(item, allItems, currentItems) => !item.flag`. If you want to stop **after** emitting the entry, you should use `(item, allItems, currentItems) => allItems.some(entry => entry.flag)` instead.
+
+###### pagination.countLimit
+
+Type: `number`\
+Default: `Infinity`
+
+The maximum amount of items that should be emitted.
+
+###### pagination.backoff
+
+Type: `number`\
+Default: `0`
+
+Milliseconds to wait before the next request is triggered.
+
+###### pagination.requestLimit
+
+Type: `number`\
+Default: `10000`
+
+The maximum amount of request that should be triggered. [Retries on failure](#retry) are not counted towards this limit.
+
+For example, it can be helpful during development to avoid an infinite number of requests.
+
+###### pagination.stackAllItems
+
+Type: `boolean`\
+Default: `true`
+
+Defines how the parameter `allItems` in [pagination.paginate](#pagination.paginate), [pagination.filter](#pagination.filter) and [pagination.shouldContinue](#pagination.shouldContinue) is managed. When set to `false`, the parameter `allItems` is always an empty array.
+
+This option can be helpful to save on memory usage when working with a large dataset.
+
+##### localAddress
+
+Type: `string`
+
+The IP address used to send the request from.
+
+### Advanced HTTPS API
+
+Note: If the request is not HTTPS, these options will be ignored.
+
+##### https.certificateAuthority
+
+Type: `string | Buffer | Array<string | Buffer>`
+
+Override the default Certificate Authorities ([from Mozilla](https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReport))
+
+```js
+// Single Certificate Authority
+got('https://example.com', {
+ https: {
+ certificateAuthority: fs.readFileSync('./my_ca.pem')
+ }
+});
+```
+
+##### https.key
+
+Type: `string | Buffer | Array<string | Buffer> | object[]`
+
+Private keys in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.\
+[PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) allows the option of private keys being encrypted. Encrypted keys will be decrypted with `options.https.passphrase`.\
+Multiple keys with different passphrases can be provided as an array of `{pem: <string | Buffer>, passphrase: <string>}`
+
+##### https.certificate
+
+Type: `string | Buffer | (string | Buffer)[]`
+
+[Certificate chains](https://en.wikipedia.org/wiki/X.509#Certificate_chains_and_cross-certification) in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.\
+One cert chain should be provided per private key (`options.https.key`).\
+When providing multiple cert chains, they do not have to be in the same order as their private keys in `options.https.key`.\
+If the intermediate certificates are not provided, the peer will not be able to validate the certificate, and the handshake will fail.
+
+##### https.passphrase
+
+Type: `string`
+
+The passphrase to decrypt the `options.https.key` (if different keys have different passphrases refer to `options.https.key` documentation).
+
+##### https.pfx
+
+Type: `string | Buffer | Array<string | Buffer | object>`
+
+[PFX or PKCS12](https://en.wikipedia.org/wiki/PKCS_12) encoded private key and certificate chain. Using `options.https.pfx` is an alternative to providing `options.https.key` and `options.https.certificate` individually. A PFX is usually encrypted, and if it is, `options.https.passphrase` will be used to decrypt it.
+
+Multiple PFX's can be be provided as an array of unencrypted buffers or an array of objects like:
+
+```ts
+{
+ buffer: string | Buffer,
+ passphrase?: string
+}
+```
+
+This object form can only occur in an array. If the provided buffers are encrypted, `object.passphrase` can be used to decrypt them. If `object.passphrase` is not provided, `options.https.passphrase` will be used for decryption.
+
+##### Examples for `https.key`, `https.certificate`, `https.passphrase`, and `https.pfx`
+
+```js
+// Single key with certificate
+got('https://example.com', {
+ https: {
+ key: fs.readFileSync('./client_key.pem'),
+ certificate: fs.readFileSync('./client_cert.pem')
+ }
+});
+
+// Multiple keys with certificates (out of order)
+got('https://example.com', {
+ https: {
+ key: [
+ fs.readFileSync('./client_key1.pem'),
+ fs.readFileSync('./client_key2.pem')
+ ],
+ certificate: [
+ fs.readFileSync('./client_cert2.pem'),
+ fs.readFileSync('./client_cert1.pem')
+ ]
+ }
+});
+
+// Single key with passphrase
+got('https://example.com', {
+ https: {
+ key: fs.readFileSync('./client_key.pem'),
+ certificate: fs.readFileSync('./client_cert.pem'),
+ passphrase: 'client_key_passphrase'
+ }
+});
+
+// Multiple keys with different passphrases
+got('https://example.com', {
+ https: {
+ key: [
+ {pem: fs.readFileSync('./client_key1.pem'), passphrase: 'passphrase1'},
+ {pem: fs.readFileSync('./client_key2.pem'), passphrase: 'passphrase2'},
+ ],
+ certificate: [
+ fs.readFileSync('./client_cert1.pem'),
+ fs.readFileSync('./client_cert2.pem')
+ ]
+ }
+});
+
+// Single encrypted PFX with passphrase
+got('https://example.com', {
+ https: {
+ pfx: fs.readFileSync('./fake.pfx'),
+ passphrase: 'passphrase'
+ }
+});
+
+// Multiple encrypted PFX's with different passphrases
+got('https://example.com', {
+ https: {
+ pfx: [
+ {
+ buffer: fs.readFileSync('./key1.pfx'),
+ passphrase: 'passphrase1'
+ },
+ {
+ buffer: fs.readFileSync('./key2.pfx'),
+ passphrase: 'passphrase2'
+ }
+ ]
+ }
+});
+
+// Multiple encrypted PFX's with single passphrase
+got('https://example.com', {
+ https: {
+ passphrase: 'passphrase',
+ pfx: [
+ {
+ buffer: fs.readFileSync('./key1.pfx')
+ },
+ {
+ buffer: fs.readFileSync('./key2.pfx')
+ }
+ ]
+ }
+});
+```
+
+##### https.rejectUnauthorized
+
+Type: `boolean`\
+Default: `true`
+
+If set to `false`, all invalid SSL certificates will be ignored and no error will be thrown.\
+If set to `true`, it will throw an error whenever an invalid SSL certificate is detected.
+
+We strongly recommend to have this set to `true` for security reasons.
+
+```js
+const got = require('got');
+
+(async () => {
+ // Correct:
+ await got('https://example.com', {
+ https: {
+ rejectUnauthorized: true
+ }
+ });
+
+ // You can disable it when developing an HTTPS app:
+ await got('https://localhost', {
+ https: {
+ rejectUnauthorized: false
+ }
+ });
+
+ // Never do this:
+ await got('https://example.com', {
+ https: {
+ rejectUnauthorized: false
+ }
+ });
+```
+
+##### https.checkServerIdentity
+
+Type: `Function`\
+Signature: `(hostname: string, certificate: DetailedPeerCertificate) => Error | undefined`\
+Default: `tls.checkServerIdentity` (from the `tls` module)
+
+This function enable a custom check of the certificate.\
+Note: In order to have the function called the certificate must not be `expired`, `self-signed` or with an `untrusted-root`.\
+The function parameters are:
+- `hostname`: The server hostname (used when connecting)
+- `certificate`: The server certificate
+
+The function must return `undefined` if the check succeeded or an `Error` if it failed.
+
+```js
+await got('https://example.com', {
+ https: {
+ checkServerIdentity: (hostname, certificate) => {
+ if (hostname === 'example.com') {
+ return; // Certificate OK
+ }
+
+ return new Error('Invalid Hostname'); // Certificate NOT OK
+ }
+ }
+});
+```
+
+#### Response
+
+The response object will typically be a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage), however, if returned from the cache it will be a [response-like object](https://github.com/lukechilds/responselike) which behaves in the same way.
+
+##### request
+
+Type: `object`
+
+**Note:** This is not a [http.ClientRequest](https://nodejs.org/api/http.html#http_class_http_clientrequest).
+
+- `options` - The Got options that were set on this request.
+
+##### body
+
+Type: `string | object | Buffer` *(Depending on `options.responseType`)*
+
+The result of the request.
+
+##### rawBody
+
+Type: `Buffer`
+
+The raw result of the request.
+
+##### url
+
+Type: `string`
+
+The request URL or the final URL after redirects.
+
+##### ip
+
+Type: `string`
+
+The remote IP address.
+
+**Note:** Not available when the response is cached. This is hopefully a temporary limitation, see [lukechilds/cacheable-request#86](https://github.com/lukechilds/cacheable-request/issues/86).
+
+##### requestUrl
+
+Type: `string`
+
+The original request URL.
+
+##### timings
+
+Type: `object`
+
+The object contains the following properties:
+
+- `start` - Time when the request started.
+- `socket` - Time when a socket was assigned to the request.
+- `lookup` - Time when the DNS lookup finished.
+- `connect` - Time when the socket successfully connected.
+- `secureConnect` - Time when the socket securely connected.
+- `upload` - Time when the request finished uploading.
+- `response` - Time when the request fired `response` event.
+- `end` - Time when the response fired `end` event.
+- `error` - Time when the request fired `error` event.
+- `abort` - Time when the request fired `abort` event.
+- `phases`
+ - `wait` - `timings.socket - timings.start`
+ - `dns` - `timings.lookup - timings.socket`
+ - `tcp` - `timings.connect - timings.lookup`
+ - `tls` - `timings.secureConnect - timings.connect`
+ - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
+ - `firstByte` - `timings.response - timings.upload`
+ - `download` - `timings.end - timings.response`
+ - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
+
+If something has not been measured yet, it will be `undefined`.
+
+**Note:** The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
+
+##### isFromCache
+
+Type: `boolean`
+
+Whether the response was retrieved from the cache.
+
+##### redirectUrls
+
+Type: `string[]`
+
+The redirect URLs.
+
+##### retryCount
+
+Type: `number`
+
+The number of times the request was retried.
+
+#### Streams
+
+**Note:** Progress events, redirect events and request/response events can also be used with promises.
+
+**Note:** To access `response.isFromCache` you need to use `got.stream(url, options).isFromCache`. The value will be undefined until the `response` event.
+
+#### got.stream(url, options?)
+
+Sets `options.isStream` to `true`.
+
+Returns a [duplex stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex) with additional events:
+
+##### .on('request', request)
+
+`request` event to get the request object of the request.
+
+**Tip:** You can use `request` event to abort request:
+
+```js
+got.stream('https://github.com')
+ .on('request', request => setTimeout(() => request.destroy(), 50));
+```
+
+##### .on('response', response)
+
+The `response` event to get the response object of the final request.
+
+##### .on('redirect', response, nextOptions)
+
+The `redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location.
+
+##### .on('uploadProgress', progress)
+##### .uploadProgress
+##### .on('downloadProgress', progress)
+##### .downloadProgress
+
+Progress events for uploading (sending a request) and downloading (receiving a response). The `progress` argument is an object like:
+
+```js
+{
+ percent: 0.1,
+ transferred: 1024,
+ total: 10240
+}
+```
+
+If the `content-length` header is missing, `total` will be `undefined`.
+
+```js
+(async () => {
+ const response = await got('https://sindresorhus.com')
+ .on('downloadProgress', progress => {
+ // Report download progress
+ })
+ .on('uploadProgress', progress => {
+ // Report upload progress
+ });
+
+ console.log(response);
+})();
+```
+
+##### .once('retry', retryCount, error)
+
+To enable retrying on a Got stream, it is required to have a `retry` handler attached.\
+When this event is emitted, you should reset the stream you were writing to and prepare the body again.
+
+See the [`retry`](#retry-stream) option for an example implementation.
+
+##### .ip
+
+Type: `string`
+
+The remote IP address.
+
+##### .aborted
+
+Type: `boolean`
+
+Indicates whether the request has been aborted or not.
+
+##### .timings
+
+The same as `response.timings`.
+
+##### .isFromCache
+
+The same as `response.isFromCache`.
+
+##### .socket
+
+The same as `response.socket`.
+
+##### .on('error', error)
+
+The emitted `error` is an instance of [`RequestError`](#gotrequesterror).
+
+#### Pagination
+
+#### got.paginate(url, options?)
+#### got.paginate.each(url, options?)
+
+Returns an async iterator:
+
+```js
+(async () => {
+ const countLimit = 10;
+
+ const pagination = got.paginate('https://api.github.com/repos/sindresorhus/got/commits', {
+ pagination: {countLimit}
+ });
+
+ console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
+
+ for await (const commitData of pagination) {
+ console.log(commitData.commit.message);
+ }
+})();
+```
+
+See [`options.pagination`](#pagination) for more pagination options.
+
+#### got.paginate.all(url, options?)
+
+Returns a Promise for an array of all results:
+
+```js
+(async () => {
+ const countLimit = 10;
+
+ const results = await got.paginate.all('https://api.github.com/repos/sindresorhus/got/commits', {
+ pagination: {countLimit}
+ });
+
+ console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
+ console.log(results);
+})();
+```
+
+See [`options.pagination`](#pagination) for more pagination options.
+
+#### got.get(url, options?)
+#### got.post(url, options?)
+#### got.put(url, options?)
+#### got.patch(url, options?)
+#### got.head(url, options?)
+#### got.delete(url, options?)
+
+Sets [`options.method`](#method) to the method name and makes a request.
+
+### Instances
+
+#### got.extend(...options)
+
+Configure a new `got` instance with default `options`. The `options` are merged with the parent instance's `defaults.options` using [`got.mergeOptions`](#gotmergeoptionsparentoptions-newoptions). You can access the resolved options with the `.defaults` property on the instance.
+
+```js
+const client = got.extend({
+ prefixUrl: 'https://example.com',
+ headers: {
+ 'x-unicorn': 'rainbow'
+ }
+});
+
+client.get('demo');
+
+/* HTTP Request =>
+ * GET /demo HTTP/1.1
+ * Host: example.com
+ * x-unicorn: rainbow
+ */
+```
+
+```js
+(async () => {
+ const client = got.extend({
+ prefixUrl: 'httpbin.org',
+ headers: {
+ 'x-foo': 'bar'
+ }
+ });
+ const {headers} = await client.get('headers').json();
+ //=> headers['x-foo'] === 'bar'
+
+ const jsonClient = client.extend({
+ responseType: 'json',
+ resolveBodyOnly: true,
+ headers: {
+ 'x-baz': 'qux'
+ }
+ });
+ const {headers: headers2} = await jsonClient.get('headers');
+ //=> headers2['x-foo'] === 'bar'
+ //=> headers2['x-baz'] === 'qux'
+})();
+```
+
+Additionally, `got.extend()` accepts two properties from the `defaults` object: `mutableDefaults` and `handlers`. Example:
+
+```js
+// You can now modify `mutableGot.defaults.options`.
+const mutableGot = got.extend({mutableDefaults: true});
+
+const mergedHandlers = got.extend({
+ handlers: [
+ (options, next) => {
+ delete options.headers.referer;
+
+ return next(options);
+ }
+ ]
+});
+```
+
+**Note:** Handlers can be asynchronous. The recommended approach is:
+
+```js
+const handler = (options, next) => {
+ if (options.isStream) {
+ // It's a Stream
+ return next(options);
+ }
+
+ // It's a Promise
+ return (async () => {
+ try {
+ const response = await next(options);
+ response.yourOwnProperty = true;
+ return response;
+ } catch (error) {
+ // Every error will be replaced by this one.
+ // Before you receive any error here,
+ // it will be passed to the `beforeError` hooks first.
+ // Note: this one won't be passed to `beforeError` hook. It's final.
+ throw new Error('Your very own error.');
+ }
+ })();
+};
+
+const instance = got.extend({handlers: [handler]});
+```
+
+#### got.extend(...options, ...instances, ...)
+
+Merges many instances into a single one:
+- options are merged using [`got.mergeOptions()`](#gotmergeoptionsparentoptions-newoptions) (including hooks),
+- handlers are stored in an array (you can access them through `instance.defaults.handlers`).
+
+```js
+const a = {headers: {cat: 'meow'}};
+const b = got.extend({
+ options: {
+ headers: {
+ cow: 'moo'
+ }
+ }
+});
+
+// The same as `got.extend(a).extend(b)`.
+// Note `a` is options and `b` is an instance.
+got.extend(a, b);
+//=> {headers: {cat: 'meow', cow: 'moo'}}
+```
+
+#### got.mergeOptions(parent, ...sources)
+
+Extends parent options. Avoid using [object spread](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#Spread_in_object_literals) as it doesn't work recursively:
+
+```js
+const a = {headers: {cat: 'meow', wolf: ['bark', 'wrrr']}};
+const b = {headers: {cow: 'moo', wolf: ['auuu']}};
+
+{...a, ...b} // => {headers: {cow: 'moo', wolf: ['auuu']}}
+got.mergeOptions(a, b) // => {headers: {cat: 'meow', cow: 'moo', wolf: ['auuu']}}
+```
+
+**Note:** Only Got options are merged! Custom user options should be defined via [`options.context`](#context).
+
+Options are deeply merged to a new object. The value of each key is determined as follows:
+
+- If the new property is not defined, the old value is used.
+- If the new property is explicitly set to `undefined`:
+ - If the parent property is a plain `object`, the parent value is deeply cloned.
+ - Otherwise, `undefined` is used.
+- If the parent value is an instance of `URLSearchParams`:
+ - If the new value is a `string`, an `object` or an instance of `URLSearchParams`, a new `URLSearchParams` instance is created. The values are merged using [`urlSearchParams.append(key, value)`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/append). The keys defined in the new value override the keys defined in the parent value. Please note that `null` values point to an empty string and `undefined` values will exclude the entry.
+ - Otherwise, the only available value is `undefined`.
+- If the new property is a plain `object`:
+ - If the parent property is a plain `object` too, both values are merged recursively into a new `object`.
+ - Otherwise, only the new value is deeply cloned.
+- If the new property is an `Array`, it overwrites the old one with a deep clone of the new property.
+- Properties that are not enumerable, such as `context`, `body`, `json`, and `form`, will not be merged.
+- Otherwise, the new value is assigned to the key.
+
+```js
+const a = {json: {cat: 'meow'}};
+const b = {json: {cow: 'moo'}};
+
+got.mergeOptions(a, b);
+//=> {json: {cow: 'moo'}}
+```
+
+#### got.defaults
+
+Type: `object`
+
+The Got defaults used in that instance.
+
+##### [options](#options)
+
+##### handlers
+
+Type: `Function[]`\
+Default: `[]`
+
+An array of functions. You execute them directly by calling `got()`. They are some sort of "global hooks" - these functions are called first. The last handler (*it's hidden*) is either [`asPromise`](source/core/as-promise/index.ts) or [`asStream`](source/core/index.ts), depending on the `options.isStream` property.
+
+Each handler takes two arguments:
+
+###### [options](#options)
+
+###### next()
+
+Returns a `Promise` or a `Stream` depending on [`options.isStream`](#isstream).
+
+```js
+const settings = {
+ handlers: [
+ (options, next) => {
+ if (options.isStream) {
+ // It's a Stream, so we can perform stream-specific actions on it
+ return next(options)
+ .on('request', request => {
+ setTimeout(() => {
+ request.abort();
+ }, 50);
+ });
+ }
+
+ // It's a Promise
+ return next(options);
+ }
+ ],
+ options: got.mergeOptions(got.defaults.options, {
+ responseType: 'json'
+ })
+};
+
+const jsonGot = got.extend(settings);
+```
+
+##### mutableDefaults
+
+Type: `boolean`\
+Default: `false`
+
+A read-only boolean describing whether the defaults are mutable or not. If set to `true`, you can [update headers over time](#hooksafterresponse), for example, update an access token when it expires.
+
+## Types
+
+Got exports some handy TypeScript types and interfaces. See the type definition for all the exported types.
+
+### Got
+
+TypeScript will automatically infer types for Got instances, but in case you want to define something like dependencies, you can import the available types directly from Got.
+
+```ts
+import {GotRequestFunction} from 'got';
+
+interface Dependencies {
+ readonly post: GotRequestFunction
+}
+```
+
+### Hooks
+
+When writing hooks, you can refer to their types to keep your interfaces consistent.
+
+```ts
+import {BeforeRequestHook} from 'got';
+
+const addAccessToken = (accessToken: string): BeforeRequestHook => options => {
+ options.path = `${options.path}?access_token=${accessToken}`;
+}
+```
+
+## Errors
+
+Each error contains an `options` property which are the options Got used to create a request - just to make debugging easier.\
+Additionaly, the errors may have `request` (Got Stream) and `response` (Got Response) properties depending on which phase of the request failed.
+
+#### got.RequestError
+
+When a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`. If there is no specific code supplied, `code` defaults to `ERR_GOT_REQUEST_ERROR`. All the errors below inherit this one.
+
+#### got.CacheError
+
+When a cache method fails, for example, if the database goes down or there's a filesystem error. Contains a `code` property with `ERR_CACHE_ACCESS` or a more specific failure code.
+
+#### got.ReadError
+
+When reading from response stream fails. Contains a `code` property with `ERR_READING_RESPONSE_STREAM` or a more specific failure code.
+
+#### got.ParseError
+
+When server response code is 2xx, and parsing body fails. Includes a `response` property. Contains a `code` property with `ERR_BODY_PARSE_FAILURE` or a more specific failure code.
+
+#### got.UploadError
+
+When the request body is a stream and an error occurs while reading from that stream. Contains a `code` property with `ERR_UPLOAD` or a more specific failure code.
+
+#### got.HTTPError
+
+When the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304. Includes a `response` property. Contains a `code` property with `ERR_NON_2XX_3XX_RESPONSE` or a more specific failure code.
+
+
+#### got.MaxRedirectsError
+
+When the server redirects you more than ten times. Includes a `response` property. Contains a `code` property with `ERR_TOO_MANY_REDIRECTS`.
+
+#### got.UnsupportedProtocolError
+
+When given an unsupported protocol. Contains a `code` property with `ERR_UNSUPPORTED_PROTOCOL`.
+
+#### got.TimeoutError
+
+When the request is aborted due to a [timeout](#timeout). Includes an `event` and `timings` property. Contains a `code` property with `ETIMEDOUT`.
+
+#### got.CancelError
+
+When the request is aborted with `.cancel()`. Contains a `code` property with `ERR_CANCELED`.
+
+## Aborting the request
+
+The promise returned by Got has a [`.cancel()`](https://github.com/sindresorhus/p-cancelable) method which when called, aborts the request.
+
+```js
+(async () => {
+ const request = got(url, options);
+
+ // …
+
+ // In another part of the code
+ if (something) {
+ request.cancel();
+ }
+
+ // …
+
+ try {
+ await request;
+ } catch (error) {
+ if (request.isCanceled) { // Or `error instanceof got.CancelError`
+ // Handle cancelation
+ }
+
+ // Handle other errors
+ }
+})();
+```
+
+When using hooks, simply throw an error to abort the request.
+
+```js
+const got = require('got');
+
+(async () => {
+ const request = got(url, {
+ hooks: {
+ beforeRequest: [
+ () => {
+ throw new Error('Oops. Request canceled.');
+ }
+ ]
+ }
+ });
+
+ try {
+ await request;
+ } catch (error) {
+ // …
+ }
+})();
+```
+
+To abort the Got Stream request, just call `stream.destroy()`.
+
+```js
+const got = require('got');
+
+const stream = got.stream(url);
+stream.destroy();
+```
+
+<a name="cache-adapters"></a>
+## Cache
+
+Got implements [RFC 7234](https://httpwg.org/specs/rfc7234.html) compliant HTTP caching which works out of the box in-memory and is easily pluggable with a wide range of storage adapters. Fresh cache entries are served directly from the cache, and stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers. You can read more about the underlying cache behavior in the [`cacheable-request` documentation](https://github.com/lukechilds/cacheable-request). For DNS cache, Got uses [`cacheable-lookup`](https://github.com/szmarczak/cacheable-lookup).
+
+You can use the JavaScript `Map` type as an in-memory cache:
+
+```js
+const got = require('got');
+
+const map = new Map();
+
+(async () => {
+ let response = await got('https://sindresorhus.com', {cache: map});
+ console.log(response.isFromCache);
+ //=> false
+
+ response = await got('https://sindresorhus.com', {cache: map});
+ console.log(response.isFromCache);
+ //=> true
+})();
+```
+
+Got uses [Keyv](https://github.com/lukechilds/keyv) internally to support a wide range of storage adapters. For something more scalable you could use an [official Keyv storage adapter](https://github.com/lukechilds/keyv#official-storage-adapters):
+
+```
+$ npm install @keyv/redis
+```
+
+```js
+const got = require('got');
+const KeyvRedis = require('@keyv/redis');
+
+const redis = new KeyvRedis('redis://user:pass@localhost:6379');
+
+got('https://sindresorhus.com', {cache: redis});
+```
+
+Got supports anything that follows the Map API, so it's easy to write your own storage adapter or use a third-party solution.
+
+For example, the following are all valid storage adapters:
+
+```js
+const storageAdapter = new Map();
+// Or
+const storageAdapter = require('./my-storage-adapter');
+// Or
+const QuickLRU = require('quick-lru');
+const storageAdapter = new QuickLRU({maxSize: 1000});
+
+got('https://sindresorhus.com', {cache: storageAdapter});
+```
+
+View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters.
+
+## Proxies
+
+You can use the [`tunnel`](https://github.com/koichik/node-tunnel) package with the `agent` option to work with proxies:
+
+```js
+const got = require('got');
+const tunnel = require('tunnel');
+
+got('https://sindresorhus.com', {
+ agent: {
+ https: tunnel.httpsOverHttp({
+ proxy: {
+ host: 'localhost'
+ }
+ })
+ }
+});
+```
+
+Otherwise, you can use the [`hpagent`](https://github.com/delvedor/hpagent) package, which keeps the internal sockets alive to be reused.
+
+```js
+const got = require('got');
+const {HttpsProxyAgent} = require('hpagent');
+
+got('https://sindresorhus.com', {
+ agent: {
+ https: new HttpsProxyAgent({
+ keepAlive: true,
+ keepAliveMsecs: 1000,
+ maxSockets: 256,
+ maxFreeSockets: 256,
+ scheduling: 'lifo',
+ proxy: 'https://localhost:8080'
+ })
+ }
+});
+```
+
+Alternatively, use [`global-agent`](https://github.com/gajus/global-agent) to configure a global proxy for all HTTP/HTTPS traffic in your program.
+
+Read the [`http2-wrapper`](https://github.com/szmarczak/http2-wrapper/#proxy-support) docs to learn about proxying for HTTP/2.
+
+## Cookies
+
+You can use the [`tough-cookie`](https://github.com/salesforce/tough-cookie) package:
+
+```js
+const {promisify} = require('util');
+const got = require('got');
+const {CookieJar} = require('tough-cookie');
+
+(async () => {
+ const cookieJar = new CookieJar();
+ const setCookie = promisify(cookieJar.setCookie.bind(cookieJar));
+
+ await setCookie('foo=bar', 'https://example.com');
+ await got('https://example.com', {cookieJar});
+})();
+```
+
+## Form data
+
+You can use the [`form-data`](https://github.com/form-data/form-data) package to create POST request with form data:
+
+```js
+const fs = require('fs');
+const got = require('got');
+const FormData = require('form-data');
+
+const form = new FormData();
+
+form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
+
+got.post('https://example.com', {
+ body: form
+});
+```
+
+## OAuth
+
+You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) package to create a signed OAuth request:
+
+```js
+const got = require('got');
+const crypto = require('crypto');
+const OAuth = require('oauth-1.0a');
+
+const oauth = OAuth({
+ consumer: {
+ key: process.env.CONSUMER_KEY,
+ secret: process.env.CONSUMER_SECRET
+ },
+ signature_method: 'HMAC-SHA1',
+ hash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64')
+});
+
+const token = {
+ key: process.env.ACCESS_TOKEN,
+ secret: process.env.ACCESS_TOKEN_SECRET
+};
+
+const url = 'https://api.twitter.com/1.1/statuses/home_timeline.json';
+
+got(url, {
+ headers: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)),
+ responseType: 'json'
+});
+```
+
+## Unix Domain Sockets
+
+Requests can also be sent via [unix domain sockets](http://serverfault.com/questions/124517/whats-the-difference-between-unix-socket-and-tcp-ip-socket). Use the following URL scheme: `PROTOCOL://unix:SOCKET:PATH`.
+
+- `PROTOCOL` - `http` or `https` *(optional)*
+- `SOCKET` - Absolute path to a unix domain socket, for example: `/var/run/docker.sock`
+- `PATH` - Request path, for example: `/v2/keys`
+
+```js
+const got = require('got');
+
+got('http://unix:/var/run/docker.sock:/containers/json');
+
+// Or without protocol (HTTP by default)
+got('unix:/var/run/docker.sock:/containers/json');
+```
+
+## AWS
+
+Requests to AWS services need to have their headers signed. This can be accomplished by using the [`got4aws`](https://www.npmjs.com/package/got4aws) package. This is an example for querying an ["API Gateway"](https://docs.aws.amazon.com/apigateway/api-reference/signing-requests/) with a signed request.
+
+```js
+const got4aws = require('got4aws');;
+
+const awsClient = got4aws();
+
+const response = await awsClient('https://<api-id>.execute-api.<api-region>.amazonaws.com/<stage>/endpoint/path', {
+ // Request-specific options
+});
+```
+
+## Testing
+
+You can test your requests by using the [`nock`](https://github.com/node-nock/nock) package to mock an endpoint:
+
+```js
+const got = require('got');
+const nock = require('nock');
+
+nock('https://sindresorhus.com')
+ .get('/')
+ .reply(200, 'Hello world!');
+
+(async () => {
+ const response = await got('https://sindresorhus.com');
+ console.log(response.body);
+ //=> 'Hello world!'
+})();
+```
+
+Bear in mind, that by default `nock` mocks only one request. Got will [retry](#retry) on failed requests by default, causing a `No match for request ...` error. The solution is to either disable retrying (set `options.retry` to `0`) or call `.persist()` on the mocked request.
+
+```js
+const got = require('got');
+const nock = require('nock');
+
+const scope = nock('https://sindresorhus.com')
+ .get('/')
+ .reply(500, 'Internal server error')
+ .persist();
+
+(async () => {
+ try {
+ await got('https://sindresorhus.com')
+ } catch (error) {
+ console.log(error.response.body);
+ //=> 'Internal server error'
+
+ console.log(error.response.retryCount);
+ //=> 2
+ }
+
+ scope.persist(false);
+})();
+```
+
+For real integration testing we recommend using [`ava`](https://github.com/avajs/ava) with [`create-test-server`](https://github.com/lukechilds/create-test-server). We're using a macro so we don't have to `server.listen()` and `server.close()` every test. Take a look at one of our tests:
+
+```js
+test('retry function gets iteration count', withServer, async (t, server, got) => {
+ let knocks = 0;
+ server.get('/', (request, response) => {
+ if (knocks++ === 1) {
+ response.end('who`s there?');
+ }
+ });
+
+ await got({
+ retry: {
+ calculateDelay: ({attemptCount}) => {
+ t.true(is.number(attemptCount));
+ return attemptCount < 2 ? 1 : 0;
+ }
+ }
+ });
+});
+```
+
+## Tips
+
+### JSON mode
+
+To pass an object as the body, you need to use the `json` option. It will be stringified using `JSON.stringify`. Example:
+
+```js
+const got = require('got');
+
+(async () => {
+ const {body} = await got.post('https://httpbin.org/anything', {
+ json: {
+ hello: 'world'
+ },
+ responseType: 'json'
+ });
+
+ console.log(body.data);
+ //=> '{"hello":"world"}'
+})();
+```
+
+To receive a JSON body you can either set `responseType` option to `json` or use `promise.json()`. Example:
+
+```js
+const got = require('got');
+
+(async () => {
+ const body = await got.post('https://httpbin.org/anything', {
+ json: {
+ hello: 'world'
+ }
+ }).json();
+
+ console.log(body);
+ //=> {…}
+})();
+```
+
+### User Agent
+
+It's a good idea to set the `'user-agent'` header so the provider can more easily see how their resource is used. By default, it's the URL to this repo. You can omit this header by setting it to `undefined`.
+
+```js
+const got = require('got');
+const pkg = require('./package.json');
+
+got('https://sindresorhus.com', {
+ headers: {
+ 'user-agent': `my-package/${pkg.version} (https://github.com/username/my-package)`
+ }
+});
+
+got('https://sindresorhus.com', {
+ headers: {
+ 'user-agent': undefined
+ }
+});
+```
+
+### 304 Responses
+
+Bear in mind; if you send an `if-modified-since` header and receive a `304 Not Modified` response, the body will be empty. It's your responsibility to cache and retrieve the body contents.
+
+### Custom endpoints
+
+Use `got.extend()` to make it nicer to work with REST APIs. Especially if you use the `prefixUrl` option.
+
+```js
+const got = require('got');
+const pkg = require('./package.json');
+
+const custom = got.extend({
+ prefixUrl: 'example.com',
+ responseType: 'json',
+ headers: {
+ 'user-agent': `my-package/${pkg.version} (https://github.com/username/my-package)`
+ }
+});
+
+// Use `custom` exactly how you use `got`
+(async () => {
+ const list = await custom('v1/users/list');
+})();
+```
+
+## FAQ
+
+### Why yet another HTTP client?
+
+Got was created because the popular [`request`](https://github.com/request/request) package is bloated: [![Install size](https://packagephobia.now.sh/badge?p=request)](https://packagephobia.now.sh/result?p=request)\
+Furthermore, Got is fully written in TypeScript and actively maintained.
+
+### Electron support has been removed
+
+The Electron `net` module is not consistent with the Node.js `http` module. See [#899](https://github.com/sindresorhus/got/issues/899) for more info.
+
+## Comparison
+
+| | `got` | [`request`][r0] | [`node-fetch`][n0] | [`ky`][k0] | [`axios`][a0] | [`superagent`][s0] |
+|-----------------------|:------------------:|:------------------:|:--------------------:|:------------------------:|:------------------:|:----------------------:|
+| HTTP/2 support | :sparkle: | :x: | :x: | :x: | :x: | :heavy_check_mark:\*\* |
+| Browser support | :x: | :x: | :heavy_check_mark:\* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| Promise API | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| Stream API | :heavy_check_mark: | :heavy_check_mark: | Node.js only | :x: | :x: | :heavy_check_mark: |
+| Pagination API | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x: |
+| Request cancelation | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| RFC compliant caching | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x: |
+| Cookies (out-of-box) | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: | :x: |
+| Follows redirects | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| Retries on failure | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: |
+| Progress events | :heavy_check_mark: | :x: | :x: | :heavy_check_mark:\*\*\* | Browser only | :heavy_check_mark: |
+| Handles gzip/deflate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| Advanced timeouts | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x: |
+| Timings | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: | :x: |
+| Errors with metadata | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
+| JSON mode | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| Custom defaults | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
+| Composable | :heavy_check_mark: | :x: | :x: | :x: | :x: | :heavy_check_mark: |
+| Hooks | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
+| Issues open | [![][gio]][g1] | [![][rio]][r1] | [![][nio]][n1] | [![][kio]][k1] | [![][aio]][a1] | [![][sio]][s1] |
+| Issues closed | [![][gic]][g2] | [![][ric]][r2] | [![][nic]][n2] | [![][kic]][k2] | [![][aic]][a2] | [![][sic]][s2] |
+| Downloads | [![][gd]][g3] | [![][rd]][r3] | [![][nd]][n3] | [![][kd]][k3] | [![][ad]][a3] | [![][sd]][s3] |
+| Coverage | [![][gc]][g4] | [![][rc]][r4] | [![][nc]][n4] | [![][kc]][k4] | [![][ac]][a4] | [![][sc]][s4] |
+| Build | [![][gb]][g5] | [![][rb]][r5] | [![][nb]][n5] | [![][kb]][k5] | [![][ab]][a5] | [![][sb]][s5] |
+| Bugs | [![][gbg]][g6] | [![][rbg]][r6] | [![][nbg]][n6] | [![][kbg]][k6] | [![][abg]][a6] | [![][sbg]][s6] |
+| Dependents | [![][gdp]][g7] | [![][rdp]][r7] | [![][ndp]][n7] | [![][kdp]][k7] | [![][adp]][a7] | [![][sdp]][s7] |
+| Install size | [![][gis]][g8] | [![][ris]][r8] | [![][nis]][n8] | [![][kis]][k8] | [![][ais]][a8] | [![][sis]][s8] |
+| GitHub stars | [![][gs]][g9] | [![][rs]][r9] | [![][ns]][n9] | [![][ks]][k9] | [![][as]][a9] | [![][ss]][s9] |
+| TypeScript support | [![][gts]][g10] | [![][rts]][r10] | [![][nts]][n10] | [![][kts]][k10] | [![][ats]][a10] | [![][sts]][s11] |
+| Last commit | [![][glc]][g11] | [![][rlc]][r11] | [![][nlc]][n11] | [![][klc]][k11] | [![][alc]][a11] | [![][slc]][s11] |
+
+\* It's almost API compatible with the browser `fetch` API.\
+\*\* Need to switch the protocol manually. Doesn't accept PUSH streams and doesn't reuse HTTP/2 sessions.\
+\*\*\* Currently, only `DownloadProgress` event is supported, `UploadProgress` event is not supported.\
+:sparkle: Almost-stable feature, but the API may change. Don't hesitate to try it out!\
+:grey_question: Feature in early stage of development. Very experimental.
+
+<!-- GITHUB -->
+[k0]: https://github.com/sindresorhus/ky
+[r0]: https://github.com/request/request
+[n0]: https://github.com/node-fetch/node-fetch
+[a0]: https://github.com/axios/axios
+[s0]: https://github.com/visionmedia/superagent
+
+<!-- ISSUES OPEN -->
+[gio]: https://badgen.net/github/open-issues/sindresorhus/got?label
+[kio]: https://badgen.net/github/open-issues/sindresorhus/ky?label
+[rio]: https://badgen.net/github/open-issues/request/request?label
+[nio]: https://badgen.net/github/open-issues/bitinn/node-fetch?label
+[aio]: https://badgen.net/github/open-issues/axios/axios?label
+[sio]: https://badgen.net/github/open-issues/visionmedia/superagent?label
+
+[g1]: https://github.com/sindresorhus/got/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
+[k1]: https://github.com/sindresorhus/ky/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
+[r1]: https://github.com/request/request/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
+[n1]: https://github.com/bitinn/node-fetch/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
+[a1]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
+[s1]: https://github.com/visionmedia/superagent/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
+
+<!-- ISSUES CLOSED -->
+[gic]: https://badgen.net/github/closed-issues/sindresorhus/got?label
+[kic]: https://badgen.net/github/closed-issues/sindresorhus/ky?label
+[ric]: https://badgen.net/github/closed-issues/request/request?label
+[nic]: https://badgen.net/github/closed-issues/bitinn/node-fetch?label
+[aic]: https://badgen.net/github/closed-issues/axios/axios?label
+[sic]: https://badgen.net/github/closed-issues/visionmedia/superagent?label
+
+[g2]: https://github.com/sindresorhus/got/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
+[k2]: https://github.com/sindresorhus/ky/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
+[r2]: https://github.com/request/request/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
+[n2]: https://github.com/bitinn/node-fetch/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
+[a2]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
+[s2]: https://github.com/visionmedia/superagent/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc
+
+<!-- DOWNLOADS -->
+[gd]: https://badgen.net/npm/dm/got?label
+[kd]: https://badgen.net/npm/dm/ky?label
+[rd]: https://badgen.net/npm/dm/request?label
+[nd]: https://badgen.net/npm/dm/node-fetch?label
+[ad]: https://badgen.net/npm/dm/axios?label
+[sd]: https://badgen.net/npm/dm/superagent?label
+
+[g3]: https://www.npmjs.com/package/got
+[k3]: https://www.npmjs.com/package/ky
+[r3]: https://www.npmjs.com/package/request
+[n3]: https://www.npmjs.com/package/node-fetch
+[a3]: https://www.npmjs.com/package/axios
+[s3]: https://www.npmjs.com/package/superagent
+
+<!-- COVERAGE -->
+[gc]: https://badgen.net/coveralls/c/github/sindresorhus/got?label
+[kc]: https://badgen.net/codecov/c/github/sindresorhus/ky?label
+[rc]: https://badgen.net/coveralls/c/github/request/request?label
+[nc]: https://badgen.net/coveralls/c/github/bitinn/node-fetch?label
+[ac]: https://badgen.net/coveralls/c/github/mzabriskie/axios?label
+[sc]: https://badgen.net/codecov/c/github/visionmedia/superagent?label
+
+[g4]: https://coveralls.io/github/sindresorhus/got
+[k4]: https://codecov.io/gh/sindresorhus/ky
+[r4]: https://coveralls.io/github/request/request
+[n4]: https://coveralls.io/github/bitinn/node-fetch
+[a4]: https://coveralls.io/github/mzabriskie/axios
+[s4]: https://codecov.io/gh/visionmedia/superagent
+
+<!-- BUILD -->
+[gb]: https://badgen.net/travis/sindresorhus/got?label
+[kb]: https://badgen.net/travis/sindresorhus/ky?label
+[rb]: https://badgen.net/travis/request/request?label
+[nb]: https://badgen.net/travis/bitinn/node-fetch?label
+[ab]: https://badgen.net/travis/axios/axios?label
+[sb]: https://badgen.net/travis/visionmedia/superagent?label
+
+[g5]: https://travis-ci.com/github/sindresorhus/got
+[k5]: https://travis-ci.com/github/sindresorhus/ky
+[r5]: https://travis-ci.org/github/request/request
+[n5]: https://travis-ci.org/github/bitinn/node-fetch
+[a5]: https://travis-ci.org/github/axios/axios
+[s5]: https://travis-ci.org/github/visionmedia/superagent
+
+<!-- BUGS -->
+[gbg]: https://badgen.net/github/label-issues/sindresorhus/got/bug/open?label
+[kbg]: https://badgen.net/github/label-issues/sindresorhus/ky/bug/open?label
+[rbg]: https://badgen.net/github/label-issues/request/request/Needs%20investigation/open?label
+[nbg]: https://badgen.net/github/label-issues/bitinn/node-fetch/bug/open?label
+[abg]: https://badgen.net/github/label-issues/axios/axios/type:confirmed%20bug/open?label
+[sbg]: https://badgen.net/github/label-issues/visionmedia/superagent/Bug/open?label
+
+[g6]: https://github.com/sindresorhus/got/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
+[k6]: https://github.com/sindresorhus/ky/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
+[r6]: https://github.com/request/request/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A"Needs+investigation"
+[n6]: https://github.com/bitinn/node-fetch/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug
+[a6]: https://github.com/axios/axios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22type%3Aconfirmed+bug%22
+[s6]: https://github.com/visionmedia/superagent/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3ABug
+
+<!-- DEPENDENTS -->
+[gdp]: https://badgen.net/npm/dependents/got?label
+[kdp]: https://badgen.net/npm/dependents/ky?label
+[rdp]: https://badgen.net/npm/dependents/request?label
+[ndp]: https://badgen.net/npm/dependents/node-fetch?label
+[adp]: https://badgen.net/npm/dependents/axios?label
+[sdp]: https://badgen.net/npm/dependents/superagent?label
+
+[g7]: https://www.npmjs.com/package/got?activeTab=dependents
+[k7]: https://www.npmjs.com/package/ky?activeTab=dependents
+[r7]: https://www.npmjs.com/package/request?activeTab=dependents
+[n7]: https://www.npmjs.com/package/node-fetch?activeTab=dependents
+[a7]: https://www.npmjs.com/package/axios?activeTab=dependents
+[s7]: https://www.npmjs.com/package/visionmedia?activeTab=dependents
+
+<!-- INSTALL SIZE -->
+[gis]: https://badgen.net/packagephobia/install/got?label
+[kis]: https://badgen.net/packagephobia/install/ky?label
+[ris]: https://badgen.net/packagephobia/install/request?label
+[nis]: https://badgen.net/packagephobia/install/node-fetch?label
+[ais]: https://badgen.net/packagephobia/install/axios?label
+[sis]: https://badgen.net/packagephobia/install/superagent?label
+
+[g8]: https://packagephobia.now.sh/result?p=got
+[k8]: https://packagephobia.now.sh/result?p=ky
+[r8]: https://packagephobia.now.sh/result?p=request
+[n8]: https://packagephobia.now.sh/result?p=node-fetch
+[a8]: https://packagephobia.now.sh/result?p=axios
+[s8]: https://packagephobia.now.sh/result?p=superagent
+
+<!-- GITHUB STARS -->
+[gs]: https://badgen.net/github/stars/sindresorhus/got?label
+[ks]: https://badgen.net/github/stars/sindresorhus/ky?label
+[rs]: https://badgen.net/github/stars/request/request?label
+[ns]: https://badgen.net/github/stars/bitinn/node-fetch?label
+[as]: https://badgen.net/github/stars/axios/axios?label
+[ss]: https://badgen.net/github/stars/visionmedia/superagent?label
+
+[g9]: https://github.com/sindresorhus/got
+[k9]: https://github.com/sindresorhus/ky
+[r9]: https://github.com/request/request
+[n9]: https://github.com/node-fetch/node-fetch
+[a9]: https://github.com/axios/axios
+[s9]: https://github.com/visionmedia/superagent
+
+<!-- TYPESCRIPT SUPPORT -->
+[gts]: https://badgen.net/npm/types/got?label
+[kts]: https://badgen.net/npm/types/ky?label
+[rts]: https://badgen.net/npm/types/request?label
+[nts]: https://badgen.net/npm/types/node-fetch?label
+[ats]: https://badgen.net/npm/types/axios?label
+[sts]: https://badgen.net/npm/types/superagent?label
+
+[g10]: https://github.com/sindresorhus/got
+[k10]: https://github.com/sindresorhus/ky
+[r10]: https://github.com/request/request
+[n10]: https://github.com/node-fetch/node-fetch
+[a10]: https://github.com/axios/axios
+[s10]: https://github.com/visionmedia/superagent
+
+<!-- LAST COMMIT -->
+[glc]: https://badgen.net/github/last-commit/sindresorhus/got?label
+[klc]: https://badgen.net/github/last-commit/sindresorhus/ky?label
+[rlc]: https://badgen.net/github/last-commit/request/request?label
+[nlc]: https://badgen.net/github/last-commit/bitinn/node-fetch?label
+[alc]: https://badgen.net/github/last-commit/axios/axios?label
+[slc]: https://badgen.net/github/last-commit/visionmedia/superagent?label
+
+[g11]: https://github.com/sindresorhus/got/commits
+[k11]: https://github.com/sindresorhus/ky/commits
+[r11]: https://github.com/request/request/commits
+[n11]: https://github.com/node-fetch/node-fetch/commits
+[a11]: https://github.com/axios/axios/commits
+[s11]: https://github.com/visionmedia/superagent/commits
+
+[Click here][InstallSizeOfTheDependencies] to see the install size of the Got dependencies.
+
+[InstallSizeOfTheDependencies]: https://packagephobia.com/result?p=@sindresorhus/is@3.0.0,@szmarczak/http-timer@4.0.5,@types/cacheable-request@6.0.1,@types/responselike@1.0.0,cacheable-lookup@5.0.3,cacheable-request@7.0.1,decompress-response@6.0.0,http2-wrapper@1.0.0,lowercase-keys@2.0.0,p-cancelable@2.0.0,responselike@2.0.0
+
+## Related
+
+- [gh-got](https://github.com/sindresorhus/gh-got) - Got convenience wrapper to interact with the GitHub API
+- [gl-got](https://github.com/singapore/gl-got) - Got convenience wrapper to interact with the GitLab API
+- [travis-got](https://github.com/samverschueren/travis-got) - Got convenience wrapper to interact with the Travis API
+- [graphql-got](https://github.com/kevva/graphql-got) - Got convenience wrapper to interact with GraphQL
+- [GotQL](https://github.com/khaosdoctor/gotql) - Got convenience wrapper to interact with GraphQL using JSON-parsed queries instead of strings
+- [got-fetch](https://github.com/alexghr/got-fetch) - Got with a `fetch` interface
+
+## Maintainers
+
+[![Sindre Sorhus](https://github.com/sindresorhus.png?size=100)](https://sindresorhus.com) | [![Szymon Marczak](https://github.com/szmarczak.png?size=100)](https://github.com/szmarczak) | [![Giovanni Minotti](https://github.com/Giotino.png?size=100)](https://github.com/Giotino)
+---|---|---
+[Sindre Sorhus](https://sindresorhus.com) | [Szymon Marczak](https://github.com/szmarczak) | [Giovanni Minotti](https://github.com/Giotino)
+
+###### Former
+
+- [Vsevolod Strukchinsky](https://github.com/floatdrop)
+- [Alexander Tesfamichael](https://github.com/alextes)
+- [Brandon Smith](https://github.com/brandon93s)
+- [Luke Childs](https://github.com/lukechilds)
+
+<a name="widely-used"></a>
+## These amazing companies are using Got
+
+<a href="https://segment.com"><img width="90" valign="middle" src="https://user-images.githubusercontent.com/697676/47693700-ddb62500-dbb7-11e8-8332-716a91010c2d.png"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://antora.org"><img width="100" valign="middle" src="https://user-images.githubusercontent.com/79351/47706840-d874cc80-dbef-11e8-87c6-5f0c60cbf5dc.png"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://getvoip.com"><img width="150" valign="middle" src="https://user-images.githubusercontent.com/10832620/47869404-429e9480-dddd-11e8-8a7a-ca43d7f06020.png"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://github.com/exoframejs/exoframe"><img width="150" valign="middle" src="https://user-images.githubusercontent.com/365944/47791460-11a95b80-dd1a-11e8-9070-e8f2a215e03a.png"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="http://karaokes.moe"><img width="140" valign="middle" src="https://camo.githubusercontent.com/6860e5fa4684c14d8e1aa65df0aba4e6808ea1a9/687474703a2f2f6b6172616f6b65732e6d6f652f6173736574732f696d616765732f696e6465782e706e67"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://github.com/renovatebot/renovate"><img width="150" valign="middle" src="https://camo.githubusercontent.com/206d470ac709b9a702a97b0c08d6f389a086793d/68747470733a2f2f72656e6f76617465626f742e636f6d2f696d616765732f6c6f676f2e737667"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://resist.bot"><img width="150" valign="middle" src="https://user-images.githubusercontent.com/3322287/51992724-28736180-2473-11e9-9764-599cfda4b012.png"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://www.naturalcycles.com"><img width="150" valign="middle" src="https://user-images.githubusercontent.com/170270/92244143-d0a8a200-eec2-11ea-9fc0-1c07f90b2113.png"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://microlink.io"><img width="150" valign="middle" src="https://user-images.githubusercontent.com/36894700/91992974-1cc5dc00-ed35-11ea-9d04-f58b42ce6a5e.png"></a>
+&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://radity.com"><img width="150" valign="middle" src="https://user-images.githubusercontent.com/29518613/91814036-97fb9500-ec44-11ea-8c6c-d198cc23ca29.png"></a>
+
+<br>
+
+> Segment is a happy user of Got! Got powers the main backend API that our app talks to. It's used by our in-house RPC client that we use to communicate with all microservices.
+>
+> — <a href="https://github.com/vadimdemedes">Vadim Demedes</a>
+
+> Antora, a static site generator for creating documentation sites, uses Got to download the UI bundle. In Antora, the UI bundle (aka theme) is maintained as a separate project. That project exports the UI as a zip file we call the UI bundle. The main site generator downloads that UI from a URL using Got and streams it to vinyl-zip to extract the files. Those files go on to be used to create the HTML pages and supporting assets.
+>
+> — <a href="https://github.com/mojavelinux">Dan Allen</a>
+
+> GetVoIP is happily using Got in production. One of the unique capabilities of Got is the ability to handle Unix sockets which enables us to build a full control interfaces for our docker stack.
+>
+> — <a href="https://github.com/danielkalen">Daniel Kalen</a>
+
+> We're using Got inside of Exoframe to handle all the communication between CLI and server. Exoframe is a self-hosted tool that allows simple one-command deployments using Docker.
+>
+> — <a href="https://github.com/yamalight">Tim Ermilov</a>
+
+> Karaoke Mugen uses Got to fetch content updates from its online server.
+>
+> — <a href="https://github.com/AxelTerizaki">Axel Terizaki</a>
+
+> Renovate uses Got, gh-got and gl-got to send millions of queries per day to GitHub, GitLab, npmjs, PyPi, Packagist, Docker Hub, Terraform, CircleCI, and more.
+>
+> — <a href="https://github.com/rarkins">Rhys Arkins</a>
+
+> Resistbot uses Got to communicate from the API frontend where all correspondence ingresses to the officials lookup database in back.
+>
+> — <a href="https://github.com/chris-erickson">Chris Erickson</a>
+
+> Natural Cycles is using Got to communicate with all kinds of 3rd-party REST APIs (over 9000!).
+>
+> — <a href="https://github.com/kirillgroshkov">Kirill Groshkov</a>
+
+> Microlink is a cloud browser as an API service that uses Got widely as the main HTTP client, serving ~22M requests a month, every time a network call needs to be performed.
+>
+> — <a href="https://github.com/Kikobeats">Kiko Beats</a>
+
+> We’re using Got at Radity. Thanks for such an amazing work!
+>
+> — <a href="https://github.com/MirzayevFarid">Mirzayev Farid</a>
+
+## For enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of `got` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-got?utm_source=npm-got&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/node_modules/graceful-fs/LICENSE b/node_modules/graceful-fs/LICENSE
new file mode 100644
index 0000000..9d2c803
--- /dev/null
+++ b/node_modules/graceful-fs/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md
new file mode 100644
index 0000000..5273a50
--- /dev/null
+++ b/node_modules/graceful-fs/README.md
@@ -0,0 +1,133 @@
+# graceful-fs
+
+graceful-fs functions as a drop-in replacement for the fs module,
+making various improvements.
+
+The improvements are meant to normalize behavior across different
+platforms and environments, and to make filesystem access more
+resilient to errors.
+
+## Improvements over [fs module](https://nodejs.org/api/fs.html)
+
+* Queues up `open` and `readdir` calls, and retries them once
+ something closes if there is an EMFILE error from too many file
+ descriptors.
+* fixes `lchmod` for Node versions prior to 0.6.2.
+* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
+* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
+ `lchown` if the user isn't root.
+* makes `lchmod` and `lchown` become noops, if not available.
+* retries reading a file if `read` results in EAGAIN error.
+
+On Windows, it retries renaming a file for up to one second if `EACCESS`
+or `EPERM` error occurs, likely because antivirus software has locked
+the directory.
+
+## USAGE
+
+```javascript
+// use just like fs
+var fs = require('graceful-fs')
+
+// now go and do stuff with it...
+fs.readFileSync('some-file-or-whatever')
+```
+
+## Global Patching
+
+If you want to patch the global fs module (or any other fs-like
+module) you can do this:
+
+```javascript
+// Make sure to read the caveat below.
+var realFs = require('fs')
+var gracefulFs = require('graceful-fs')
+gracefulFs.gracefulify(realFs)
+```
+
+This should only ever be done at the top-level application layer, in
+order to delay on EMFILE errors from any fs-using dependencies. You
+should **not** do this in a library, because it can cause unexpected
+delays in other parts of the program.
+
+## Changes
+
+This module is fairly stable at this point, and used by a lot of
+things. That being said, because it implements a subtle behavior
+change in a core part of the node API, even modest changes can be
+extremely breaking, and the versioning is thus biased towards
+bumping the major when in doubt.
+
+The main change between major versions has been switching between
+providing a fully-patched `fs` module vs monkey-patching the node core
+builtin, and the approach by which a non-monkey-patched `fs` was
+created.
+
+The goal is to trade `EMFILE` errors for slower fs operations. So, if
+you try to open a zillion files, rather than crashing, `open`
+operations will be queued up and wait for something else to `close`.
+
+There are advantages to each approach. Monkey-patching the fs means
+that no `EMFILE` errors can possibly occur anywhere in your
+application, because everything is using the same core `fs` module,
+which is patched. However, it can also obviously cause undesirable
+side-effects, especially if the module is loaded multiple times.
+
+Implementing a separate-but-identical patched `fs` module is more
+surgical (and doesn't run the risk of patching multiple times), but
+also imposes the challenge of keeping in sync with the core module.
+
+The current approach loads the `fs` module, and then creates a
+lookalike object that has all the same methods, except a few that are
+patched. It is safe to use in all versions of Node from 0.8 through
+7.0.
+
+### v4
+
+* Do not monkey-patch the fs module. This module may now be used as a
+ drop-in dep, and users can opt into monkey-patching the fs builtin
+ if their app requires it.
+
+### v3
+
+* Monkey-patch fs, because the eval approach no longer works on recent
+ node.
+* fixed possible type-error throw if rename fails on windows
+* verify that we *never* get EMFILE errors
+* Ignore ENOSYS from chmod/chown
+* clarify that graceful-fs must be used as a drop-in
+
+### v2.1.0
+
+* Use eval rather than monkey-patching fs.
+* readdir: Always sort the results
+* win32: requeue a file if error has an OK status
+
+### v2.0
+
+* A return to monkey patching
+* wrap process.cwd
+
+### v1.1
+
+* wrap readFile
+* Wrap fs.writeFile.
+* readdir protection
+* Don't clobber the fs builtin
+* Handle fs.read EAGAIN errors by trying again
+* Expose the curOpen counter
+* No-op lchown/lchmod if not implemented
+* fs.rename patch only for win32
+* Patch fs.rename to handle AV software on Windows
+* Close #4 Chown should not fail on einval or eperm if non-root
+* Fix isaacs/fstream#1 Only wrap fs one time
+* Fix #3 Start at 1024 max files, then back off on EMFILE
+* lutimes that doens't blow up on Linux
+* A full on-rewrite using a queue instead of just swallowing the EMFILE error
+* Wrap Read/Write streams as well
+
+### 1.0
+
+* Update engines for node 0.6
+* Be lstat-graceful on Windows
+* first
diff --git a/node_modules/graceful-fs/clone.js b/node_modules/graceful-fs/clone.js
new file mode 100644
index 0000000..028356c
--- /dev/null
+++ b/node_modules/graceful-fs/clone.js
@@ -0,0 +1,19 @@
+'use strict'
+
+module.exports = clone
+
+function clone (obj) {
+ if (obj === null || typeof obj !== 'object')
+ return obj
+
+ if (obj instanceof Object)
+ var copy = { __proto__: obj.__proto__ }
+ else
+ var copy = Object.create(null)
+
+ Object.getOwnPropertyNames(obj).forEach(function (key) {
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
+ })
+
+ return copy
+}
diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js
new file mode 100644
index 0000000..de3df47
--- /dev/null
+++ b/node_modules/graceful-fs/graceful-fs.js
@@ -0,0 +1,354 @@
+var fs = require('fs')
+var polyfills = require('./polyfills.js')
+var legacy = require('./legacy-streams.js')
+var clone = require('./clone.js')
+
+var util = require('util')
+
+/* istanbul ignore next - node 0.x polyfill */
+var gracefulQueue
+var previousSymbol
+
+/* istanbul ignore else - node 0.x polyfill */
+if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
+ gracefulQueue = Symbol.for('graceful-fs.queue')
+ // This is used in testing by future versions
+ previousSymbol = Symbol.for('graceful-fs.previous')
+} else {
+ gracefulQueue = '___graceful-fs.queue'
+ previousSymbol = '___graceful-fs.previous'
+}
+
+function noop () {}
+
+function publishQueue(context, queue) {
+ Object.defineProperty(context, gracefulQueue, {
+ get: function() {
+ return queue
+ }
+ })
+}
+
+var debug = noop
+if (util.debuglog)
+ debug = util.debuglog('gfs4')
+else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
+ debug = function() {
+ var m = util.format.apply(util, arguments)
+ m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
+ console.error(m)
+ }
+
+// Once time initialization
+if (!fs[gracefulQueue]) {
+ // This queue can be shared by multiple loaded instances
+ var queue = global[gracefulQueue] || []
+ publishQueue(fs, queue)
+
+ // Patch fs.close/closeSync to shared queue version, because we need
+ // to retry() whenever a close happens *anywhere* in the program.
+ // This is essential when multiple graceful-fs instances are
+ // in play at the same time.
+ fs.close = (function (fs$close) {
+ function close (fd, cb) {
+ return fs$close.call(fs, fd, function (err) {
+ // This function uses the graceful-fs shared queue
+ if (!err) {
+ retry()
+ }
+
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ })
+ }
+
+ Object.defineProperty(close, previousSymbol, {
+ value: fs$close
+ })
+ return close
+ })(fs.close)
+
+ fs.closeSync = (function (fs$closeSync) {
+ function closeSync (fd) {
+ // This function uses the graceful-fs shared queue
+ fs$closeSync.apply(fs, arguments)
+ retry()
+ }
+
+ Object.defineProperty(closeSync, previousSymbol, {
+ value: fs$closeSync
+ })
+ return closeSync
+ })(fs.closeSync)
+
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
+ process.on('exit', function() {
+ debug(fs[gracefulQueue])
+ require('assert').equal(fs[gracefulQueue].length, 0)
+ })
+ }
+}
+
+if (!global[gracefulQueue]) {
+ publishQueue(global, fs[gracefulQueue]);
+}
+
+module.exports = patch(clone(fs))
+if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
+ module.exports = patch(fs)
+ fs.__patched = true;
+}
+
+function patch (fs) {
+ // Everything that references the open() function needs to be in here
+ polyfills(fs)
+ fs.gracefulify = patch
+
+ fs.createReadStream = createReadStream
+ fs.createWriteStream = createWriteStream
+ var fs$readFile = fs.readFile
+ fs.readFile = readFile
+ function readFile (path, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$readFile(path, options, cb)
+
+ function go$readFile (path, options, cb) {
+ return fs$readFile(path, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$readFile, [path, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$writeFile = fs.writeFile
+ fs.writeFile = writeFile
+ function writeFile (path, data, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$writeFile(path, data, options, cb)
+
+ function go$writeFile (path, data, options, cb) {
+ return fs$writeFile(path, data, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$writeFile, [path, data, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$appendFile = fs.appendFile
+ if (fs$appendFile)
+ fs.appendFile = appendFile
+ function appendFile (path, data, options, cb) {
+ if (typeof options === 'function')
+ cb = options, options = null
+
+ return go$appendFile(path, data, options, cb)
+
+ function go$appendFile (path, data, options, cb) {
+ return fs$appendFile(path, data, options, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$appendFile, [path, data, options, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ var fs$readdir = fs.readdir
+ fs.readdir = readdir
+ function readdir (path, options, cb) {
+ var args = [path]
+ if (typeof options !== 'function') {
+ args.push(options)
+ } else {
+ cb = options
+ }
+ args.push(go$readdir$cb)
+
+ return go$readdir(args)
+
+ function go$readdir$cb (err, files) {
+ if (files && files.sort)
+ files.sort()
+
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$readdir, [args]])
+
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ }
+ }
+
+ function go$readdir (args) {
+ return fs$readdir.apply(fs, args)
+ }
+
+ if (process.version.substr(0, 4) === 'v0.8') {
+ var legStreams = legacy(fs)
+ ReadStream = legStreams.ReadStream
+ WriteStream = legStreams.WriteStream
+ }
+
+ var fs$ReadStream = fs.ReadStream
+ if (fs$ReadStream) {
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype)
+ ReadStream.prototype.open = ReadStream$open
+ }
+
+ var fs$WriteStream = fs.WriteStream
+ if (fs$WriteStream) {
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype)
+ WriteStream.prototype.open = WriteStream$open
+ }
+
+ Object.defineProperty(fs, 'ReadStream', {
+ get: function () {
+ return ReadStream
+ },
+ set: function (val) {
+ ReadStream = val
+ },
+ enumerable: true,
+ configurable: true
+ })
+ Object.defineProperty(fs, 'WriteStream', {
+ get: function () {
+ return WriteStream
+ },
+ set: function (val) {
+ WriteStream = val
+ },
+ enumerable: true,
+ configurable: true
+ })
+
+ // legacy names
+ var FileReadStream = ReadStream
+ Object.defineProperty(fs, 'FileReadStream', {
+ get: function () {
+ return FileReadStream
+ },
+ set: function (val) {
+ FileReadStream = val
+ },
+ enumerable: true,
+ configurable: true
+ })
+ var FileWriteStream = WriteStream
+ Object.defineProperty(fs, 'FileWriteStream', {
+ get: function () {
+ return FileWriteStream
+ },
+ set: function (val) {
+ FileWriteStream = val
+ },
+ enumerable: true,
+ configurable: true
+ })
+
+ function ReadStream (path, options) {
+ if (this instanceof ReadStream)
+ return fs$ReadStream.apply(this, arguments), this
+ else
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
+ }
+
+ function ReadStream$open () {
+ var that = this
+ open(that.path, that.flags, that.mode, function (err, fd) {
+ if (err) {
+ if (that.autoClose)
+ that.destroy()
+
+ that.emit('error', err)
+ } else {
+ that.fd = fd
+ that.emit('open', fd)
+ that.read()
+ }
+ })
+ }
+
+ function WriteStream (path, options) {
+ if (this instanceof WriteStream)
+ return fs$WriteStream.apply(this, arguments), this
+ else
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
+ }
+
+ function WriteStream$open () {
+ var that = this
+ open(that.path, that.flags, that.mode, function (err, fd) {
+ if (err) {
+ that.destroy()
+ that.emit('error', err)
+ } else {
+ that.fd = fd
+ that.emit('open', fd)
+ }
+ })
+ }
+
+ function createReadStream (path, options) {
+ return new fs.ReadStream(path, options)
+ }
+
+ function createWriteStream (path, options) {
+ return new fs.WriteStream(path, options)
+ }
+
+ var fs$open = fs.open
+ fs.open = open
+ function open (path, flags, mode, cb) {
+ if (typeof mode === 'function')
+ cb = mode, mode = null
+
+ return go$open(path, flags, mode, cb)
+
+ function go$open (path, flags, mode, cb) {
+ return fs$open(path, flags, mode, function (err, fd) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([go$open, [path, flags, mode, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+ }
+
+ return fs
+}
+
+function enqueue (elem) {
+ debug('ENQUEUE', elem[0].name, elem[1])
+ fs[gracefulQueue].push(elem)
+}
+
+function retry () {
+ var elem = fs[gracefulQueue].shift()
+ if (elem) {
+ debug('RETRY', elem[0].name, elem[1])
+ elem[0].apply(null, elem[1])
+ }
+}
diff --git a/node_modules/graceful-fs/legacy-streams.js b/node_modules/graceful-fs/legacy-streams.js
new file mode 100644
index 0000000..d617b50
--- /dev/null
+++ b/node_modules/graceful-fs/legacy-streams.js
@@ -0,0 +1,118 @@
+var Stream = require('stream').Stream
+
+module.exports = legacy
+
+function legacy (fs) {
+ return {
+ ReadStream: ReadStream,
+ WriteStream: WriteStream
+ }
+
+ function ReadStream (path, options) {
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
+
+ Stream.call(this);
+
+ var self = this;
+
+ this.path = path;
+ this.fd = null;
+ this.readable = true;
+ this.paused = false;
+
+ this.flags = 'r';
+ this.mode = 438; /*=0666*/
+ this.bufferSize = 64 * 1024;
+
+ options = options || {};
+
+ // Mixin options into this
+ var keys = Object.keys(options);
+ for (var index = 0, length = keys.length; index < length; index++) {
+ var key = keys[index];
+ this[key] = options[key];
+ }
+
+ if (this.encoding) this.setEncoding(this.encoding);
+
+ if (this.start !== undefined) {
+ if ('number' !== typeof this.start) {
+ throw TypeError('start must be a Number');
+ }
+ if (this.end === undefined) {
+ this.end = Infinity;
+ } else if ('number' !== typeof this.end) {
+ throw TypeError('end must be a Number');
+ }
+
+ if (this.start > this.end) {
+ throw new Error('start must be <= end');
+ }
+
+ this.pos = this.start;
+ }
+
+ if (this.fd !== null) {
+ process.nextTick(function() {
+ self._read();
+ });
+ return;
+ }
+
+ fs.open(this.path, this.flags, this.mode, function (err, fd) {
+ if (err) {
+ self.emit('error', err);
+ self.readable = false;
+ return;
+ }
+
+ self.fd = fd;
+ self.emit('open', fd);
+ self._read();
+ })
+ }
+
+ function WriteStream (path, options) {
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
+
+ Stream.call(this);
+
+ this.path = path;
+ this.fd = null;
+ this.writable = true;
+
+ this.flags = 'w';
+ this.encoding = 'binary';
+ this.mode = 438; /*=0666*/
+ this.bytesWritten = 0;
+
+ options = options || {};
+
+ // Mixin options into this
+ var keys = Object.keys(options);
+ for (var index = 0, length = keys.length; index < length; index++) {
+ var key = keys[index];
+ this[key] = options[key];
+ }
+
+ if (this.start !== undefined) {
+ if ('number' !== typeof this.start) {
+ throw TypeError('start must be a Number');
+ }
+ if (this.start < 0) {
+ throw new Error('start must be >= zero');
+ }
+
+ this.pos = this.start;
+ }
+
+ this.busy = false;
+ this._queue = [];
+
+ if (this.fd === null) {
+ this._open = fs.open;
+ this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
+ this.flush();
+ }
+ }
+}
diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json
new file mode 100644
index 0000000..0a56eb7
--- /dev/null
+++ b/node_modules/graceful-fs/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "graceful-fs",
+ "description": "A drop-in replacement for fs, making various improvements.",
+ "version": "4.2.4",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/isaacs/node-graceful-fs"
+ },
+ "main": "graceful-fs.js",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --follow-tags",
+ "test": "node test.js | tap -"
+ },
+ "keywords": [
+ "fs",
+ "module",
+ "reading",
+ "retry",
+ "retries",
+ "queue",
+ "error",
+ "errors",
+ "handling",
+ "EMFILE",
+ "EAGAIN",
+ "EINVAL",
+ "EPERM",
+ "EACCESS"
+ ],
+ "license": "ISC",
+ "devDependencies": {
+ "import-fresh": "^2.0.0",
+ "mkdirp": "^0.5.0",
+ "rimraf": "^2.2.8",
+ "tap": "^12.7.0"
+ },
+ "files": [
+ "fs.js",
+ "graceful-fs.js",
+ "legacy-streams.js",
+ "polyfills.js",
+ "clone.js"
+ ],
+ "dependencies": {}
+}
diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js
new file mode 100644
index 0000000..a5808d2
--- /dev/null
+++ b/node_modules/graceful-fs/polyfills.js
@@ -0,0 +1,342 @@
+var constants = require('constants')
+
+var origCwd = process.cwd
+var cwd = null
+
+var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
+
+process.cwd = function() {
+ if (!cwd)
+ cwd = origCwd.call(process)
+ return cwd
+}
+try {
+ process.cwd()
+} catch (er) {}
+
+var chdir = process.chdir
+process.chdir = function(d) {
+ cwd = null
+ chdir.call(process, d)
+}
+
+module.exports = patch
+
+function patch (fs) {
+ // (re-)implement some things that are known busted or missing.
+
+ // lchmod, broken prior to 0.6.2
+ // back-port the fix here.
+ if (constants.hasOwnProperty('O_SYMLINK') &&
+ process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
+ patchLchmod(fs)
+ }
+
+ // lutimes implementation, or no-op
+ if (!fs.lutimes) {
+ patchLutimes(fs)
+ }
+
+ // https://github.com/isaacs/node-graceful-fs/issues/4
+ // Chown should not fail on einval or eperm if non-root.
+ // It should not fail on enosys ever, as this just indicates
+ // that a fs doesn't support the intended operation.
+
+ fs.chown = chownFix(fs.chown)
+ fs.fchown = chownFix(fs.fchown)
+ fs.lchown = chownFix(fs.lchown)
+
+ fs.chmod = chmodFix(fs.chmod)
+ fs.fchmod = chmodFix(fs.fchmod)
+ fs.lchmod = chmodFix(fs.lchmod)
+
+ fs.chownSync = chownFixSync(fs.chownSync)
+ fs.fchownSync = chownFixSync(fs.fchownSync)
+ fs.lchownSync = chownFixSync(fs.lchownSync)
+
+ fs.chmodSync = chmodFixSync(fs.chmodSync)
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync)
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync)
+
+ fs.stat = statFix(fs.stat)
+ fs.fstat = statFix(fs.fstat)
+ fs.lstat = statFix(fs.lstat)
+
+ fs.statSync = statFixSync(fs.statSync)
+ fs.fstatSync = statFixSync(fs.fstatSync)
+ fs.lstatSync = statFixSync(fs.lstatSync)
+
+ // if lchmod/lchown do not exist, then make them no-ops
+ if (!fs.lchmod) {
+ fs.lchmod = function (path, mode, cb) {
+ if (cb) process.nextTick(cb)
+ }
+ fs.lchmodSync = function () {}
+ }
+ if (!fs.lchown) {
+ fs.lchown = function (path, uid, gid, cb) {
+ if (cb) process.nextTick(cb)
+ }
+ fs.lchownSync = function () {}
+ }
+
+ // on Windows, A/V software can lock the directory, causing this
+ // to fail with an EACCES or EPERM if the directory contains newly
+ // created files. Try again on failure, for up to 60 seconds.
+
+ // Set the timeout this long because some Windows Anti-Virus, such as Parity
+ // bit9, may lock files for up to a minute, causing npm package install
+ // failures. Also, take care to yield the scheduler. Windows scheduling gives
+ // CPU to a busy looping process, which can cause the program causing the lock
+ // contention to be starved of CPU by node, so the contention doesn't resolve.
+ if (platform === "win32") {
+ fs.rename = (function (fs$rename) { return function (from, to, cb) {
+ var start = Date.now()
+ var backoff = 0;
+ fs$rename(from, to, function CB (er) {
+ if (er
+ && (er.code === "EACCES" || er.code === "EPERM")
+ && Date.now() - start < 60000) {
+ setTimeout(function() {
+ fs.stat(to, function (stater, st) {
+ if (stater && stater.code === "ENOENT")
+ fs$rename(from, to, CB);
+ else
+ cb(er)
+ })
+ }, backoff)
+ if (backoff < 100)
+ backoff += 10;
+ return;
+ }
+ if (cb) cb(er)
+ })
+ }})(fs.rename)
+ }
+
+ // if read() returns EAGAIN, then just try it again.
+ fs.read = (function (fs$read) {
+ function read (fd, buffer, offset, length, position, callback_) {
+ var callback
+ if (callback_ && typeof callback_ === 'function') {
+ var eagCounter = 0
+ callback = function (er, _, __) {
+ if (er && er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback)
+ }
+ callback_.apply(this, arguments)
+ }
+ }
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback)
+ }
+
+ // This ensures `util.promisify` works as it does for native `fs.read`.
+ read.__proto__ = fs$read
+ return read
+ })(fs.read)
+
+ fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
+ var eagCounter = 0
+ while (true) {
+ try {
+ return fs$readSync.call(fs, fd, buffer, offset, length, position)
+ } catch (er) {
+ if (er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ continue
+ }
+ throw er
+ }
+ }
+ }})(fs.readSync)
+
+ function patchLchmod (fs) {
+ fs.lchmod = function (path, mode, callback) {
+ fs.open( path
+ , constants.O_WRONLY | constants.O_SYMLINK
+ , mode
+ , function (err, fd) {
+ if (err) {
+ if (callback) callback(err)
+ return
+ }
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ fs.fchmod(fd, mode, function (err) {
+ fs.close(fd, function(err2) {
+ if (callback) callback(err || err2)
+ })
+ })
+ })
+ }
+
+ fs.lchmodSync = function (path, mode) {
+ var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
+
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ var threw = true
+ var ret
+ try {
+ ret = fs.fchmodSync(fd, mode)
+ threw = false
+ } finally {
+ if (threw) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ } else {
+ fs.closeSync(fd)
+ }
+ }
+ return ret
+ }
+ }
+
+ function patchLutimes (fs) {
+ if (constants.hasOwnProperty("O_SYMLINK")) {
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
+ if (er) {
+ if (cb) cb(er)
+ return
+ }
+ fs.futimes(fd, at, mt, function (er) {
+ fs.close(fd, function (er2) {
+ if (cb) cb(er || er2)
+ })
+ })
+ })
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ var fd = fs.openSync(path, constants.O_SYMLINK)
+ var ret
+ var threw = true
+ try {
+ ret = fs.futimesSync(fd, at, mt)
+ threw = false
+ } finally {
+ if (threw) {
+ try {
+ fs.closeSync(fd)
+ } catch (er) {}
+ } else {
+ fs.closeSync(fd)
+ }
+ }
+ return ret
+ }
+
+ } else {
+ fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
+ fs.lutimesSync = function () {}
+ }
+ }
+
+ function chmodFix (orig) {
+ if (!orig) return orig
+ return function (target, mode, cb) {
+ return orig.call(fs, target, mode, function (er) {
+ if (chownErOk(er)) er = null
+ if (cb) cb.apply(this, arguments)
+ })
+ }
+ }
+
+ function chmodFixSync (orig) {
+ if (!orig) return orig
+ return function (target, mode) {
+ try {
+ return orig.call(fs, target, mode)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+ }
+
+
+ function chownFix (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid, cb) {
+ return orig.call(fs, target, uid, gid, function (er) {
+ if (chownErOk(er)) er = null
+ if (cb) cb.apply(this, arguments)
+ })
+ }
+ }
+
+ function chownFixSync (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid) {
+ try {
+ return orig.call(fs, target, uid, gid)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+ }
+
+ function statFix (orig) {
+ if (!orig) return orig
+ // Older versions of Node erroneously returned signed integers for
+ // uid + gid.
+ return function (target, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = null
+ }
+ function callback (er, stats) {
+ if (stats) {
+ if (stats.uid < 0) stats.uid += 0x100000000
+ if (stats.gid < 0) stats.gid += 0x100000000
+ }
+ if (cb) cb.apply(this, arguments)
+ }
+ return options ? orig.call(fs, target, options, callback)
+ : orig.call(fs, target, callback)
+ }
+ }
+
+ function statFixSync (orig) {
+ if (!orig) return orig
+ // Older versions of Node erroneously returned signed integers for
+ // uid + gid.
+ return function (target, options) {
+ var stats = options ? orig.call(fs, target, options)
+ : orig.call(fs, target)
+ if (stats.uid < 0) stats.uid += 0x100000000
+ if (stats.gid < 0) stats.gid += 0x100000000
+ return stats;
+ }
+ }
+
+ // ENOSYS means that the fs doesn't support the op. Just ignore
+ // that, because it doesn't matter.
+ //
+ // if there's no getuid, or if getuid() is something other
+ // than 0, and the error is EINVAL or EPERM, then just ignore
+ // it.
+ //
+ // This specific case is a silent failure in cp, install, tar,
+ // and most other unix tools that manage permissions.
+ //
+ // When running as root, or if other types of errors are
+ // encountered, then it's strict.
+ function chownErOk (er) {
+ if (!er)
+ return true
+
+ if (er.code === "ENOSYS")
+ return true
+
+ var nonroot = !process.getuid || process.getuid() !== 0
+ if (nonroot) {
+ if (er.code === "EINVAL" || er.code === "EPERM")
+ return true
+ }
+
+ return false
+ }
+}
diff --git a/node_modules/graceful-readlink/.npmignore b/node_modules/graceful-readlink/.npmignore
new file mode 100644
index 0000000..3ac7d16
--- /dev/null
+++ b/node_modules/graceful-readlink/.npmignore
@@ -0,0 +1,3 @@
+.idea/
+.DS_Store
+node_modules/
diff --git a/node_modules/graceful-readlink/.travis.yml b/node_modules/graceful-readlink/.travis.yml
new file mode 100644
index 0000000..baf9be7
--- /dev/null
+++ b/node_modules/graceful-readlink/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "io.js"
diff --git a/node_modules/graceful-readlink/LICENSE b/node_modules/graceful-readlink/LICENSE
new file mode 100644
index 0000000..d1f842f
--- /dev/null
+++ b/node_modules/graceful-readlink/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Zhiye Li
+
+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/graceful-readlink/README.md b/node_modules/graceful-readlink/README.md
new file mode 100644
index 0000000..fc63b50
--- /dev/null
+++ b/node_modules/graceful-readlink/README.md
@@ -0,0 +1,17 @@
+# graceful-readlink
+[![NPM Version](http://img.shields.io/npm/v/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink)
+[![NPM Downloads](https://img.shields.io/npm/dm/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink)
+
+
+## Usage
+
+```js
+var readlinkSync = require('graceful-readlink').readlinkSync;
+console.log(readlinkSync(f));
+// output
+// the file pointed to when `f` is a symbolic link
+// the `f` itself when `f` is not a symbolic link
+```
+## Licence
+
+MIT License
diff --git a/node_modules/graceful-readlink/index.js b/node_modules/graceful-readlink/index.js
new file mode 100644
index 0000000..7e9fc70
--- /dev/null
+++ b/node_modules/graceful-readlink/index.js
@@ -0,0 +1,12 @@
+var fs = require('fs')
+ , lstat = fs.lstatSync;
+
+exports.readlinkSync = function (p) {
+ if (lstat(p).isSymbolicLink()) {
+ return fs.readlinkSync(p);
+ } else {
+ return p;
+ }
+};
+
+
diff --git a/node_modules/graceful-readlink/package.json b/node_modules/graceful-readlink/package.json
new file mode 100644
index 0000000..ac86c1f
--- /dev/null
+++ b/node_modules/graceful-readlink/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "graceful-readlink",
+ "version": "1.0.1",
+ "description": "graceful fs.readlink",
+ "main": "index.js",
+ "repository": "git://github.com/zhiyelee/graceful-readlink.git",
+ "homepage": "https://github.com/zhiyelee/graceful-readlink",
+ "bugs": "https://github.com/zhiyelee/graceful-readlink/issues",
+ "keywords": [
+ "fs.readlink",
+ "readlink"
+ ],
+ "author": "zhiyelee",
+ "license": "MIT",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ }
+}
diff --git a/node_modules/har-schema/LICENSE b/node_modules/har-schema/LICENSE
new file mode 100644
index 0000000..ca55c91
--- /dev/null
+++ b/node_modules/har-schema/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Ahmad Nassri <ahmad@ahmadnassri.com>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/har-schema/README.md b/node_modules/har-schema/README.md
new file mode 100644
index 0000000..cd0a28e
--- /dev/null
+++ b/node_modules/har-schema/README.md
@@ -0,0 +1,49 @@
+# HAR Schema [![version][npm-version]][npm-url] [![License][npm-license]][license-url]
+
+> JSON Schema for HTTP Archive ([HAR][spec]).
+
+[![Build Status][travis-image]][travis-url]
+[![Downloads][npm-downloads]][npm-url]
+[![Code Climate][codeclimate-quality]][codeclimate-url]
+[![Coverage Status][codeclimate-coverage]][codeclimate-url]
+[![Dependency Status][dependencyci-image]][dependencyci-url]
+[![Dependencies][david-image]][david-url]
+
+## Install
+
+```bash
+npm install --only=production --save har-schema
+```
+
+## Usage
+
+Compatible with any [JSON Schema validation tool][validator].
+
+----
+> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/) &nbsp;&middot;&nbsp;
+> License: [ISC][license-url] &nbsp;&middot;&nbsp;
+> Github: [@ahmadnassri](https://github.com/ahmadnassri) &nbsp;&middot;&nbsp;
+> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
+
+[license-url]: http://choosealicense.com/licenses/isc/
+
+[travis-url]: https://travis-ci.org/ahmadnassri/har-schema
+[travis-image]: https://img.shields.io/travis/ahmadnassri/har-schema.svg?style=flat-square
+
+[npm-url]: https://www.npmjs.com/package/har-schema
+[npm-license]: https://img.shields.io/npm/l/har-schema.svg?style=flat-square
+[npm-version]: https://img.shields.io/npm/v/har-schema.svg?style=flat-square
+[npm-downloads]: https://img.shields.io/npm/dm/har-schema.svg?style=flat-square
+
+[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-schema
+[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-schema.svg?style=flat-square
+[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-schema.svg?style=flat-square
+
+[david-url]: https://david-dm.org/ahmadnassri/har-schema
+[david-image]: https://img.shields.io/david/ahmadnassri/har-schema.svg?style=flat-square
+
+[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-schema
+[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-schema/badge?style=flat-square
+
+[spec]: https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md
+[validator]: https://github.com/ahmadnassri/har-validator
diff --git a/node_modules/har-schema/lib/afterRequest.json b/node_modules/har-schema/lib/afterRequest.json
new file mode 100644
index 0000000..5f52581
--- /dev/null
+++ b/node_modules/har-schema/lib/afterRequest.json
@@ -0,0 +1,30 @@
+{
+ "$id": "afterRequest.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "optional": true,
+ "required": [
+ "lastAccess",
+ "eTag",
+ "hitCount"
+ ],
+ "properties": {
+ "expires": {
+ "type": "string",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
+ },
+ "lastAccess": {
+ "type": "string",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
+ },
+ "eTag": {
+ "type": "string"
+ },
+ "hitCount": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/beforeRequest.json b/node_modules/har-schema/lib/beforeRequest.json
new file mode 100644
index 0000000..c7b5c10
--- /dev/null
+++ b/node_modules/har-schema/lib/beforeRequest.json
@@ -0,0 +1,30 @@
+{
+ "$id": "beforeRequest.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "optional": true,
+ "required": [
+ "lastAccess",
+ "eTag",
+ "hitCount"
+ ],
+ "properties": {
+ "expires": {
+ "type": "string",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
+ },
+ "lastAccess": {
+ "type": "string",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"
+ },
+ "eTag": {
+ "type": "string"
+ },
+ "hitCount": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/browser.json b/node_modules/har-schema/lib/browser.json
new file mode 100644
index 0000000..d6869f7
--- /dev/null
+++ b/node_modules/har-schema/lib/browser.json
@@ -0,0 +1,20 @@
+{
+ "$id": "browser.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "name",
+ "version"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/cache.json b/node_modules/har-schema/lib/cache.json
new file mode 100644
index 0000000..30a7182
--- /dev/null
+++ b/node_modules/har-schema/lib/cache.json
@@ -0,0 +1,21 @@
+{
+ "$id": "cache.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "properties": {
+ "beforeRequest": {
+ "oneOf": [
+ { "type": "null" },
+ { "$ref": "beforeRequest.json#" }
+ ]
+ },
+ "afterRequest": {
+ "oneOf": [
+ { "type": "null" },
+ { "$ref": "afterRequest.json#" }
+ ]
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/content.json b/node_modules/har-schema/lib/content.json
new file mode 100644
index 0000000..43944bf
--- /dev/null
+++ b/node_modules/har-schema/lib/content.json
@@ -0,0 +1,29 @@
+{
+ "$id": "content.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "size",
+ "mimeType"
+ ],
+ "properties": {
+ "size": {
+ "type": "integer"
+ },
+ "compression": {
+ "type": "integer"
+ },
+ "mimeType": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "encoding": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/cookie.json b/node_modules/har-schema/lib/cookie.json
new file mode 100644
index 0000000..661f7f3
--- /dev/null
+++ b/node_modules/har-schema/lib/cookie.json
@@ -0,0 +1,36 @@
+{
+ "$id": "cookie.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ },
+ "domain": {
+ "type": "string"
+ },
+ "expires": {
+ "type": ["string", "null"],
+ "format": "date-time"
+ },
+ "httpOnly": {
+ "type": "boolean"
+ },
+ "secure": {
+ "type": "boolean"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/creator.json b/node_modules/har-schema/lib/creator.json
new file mode 100644
index 0000000..71a75cd
--- /dev/null
+++ b/node_modules/har-schema/lib/creator.json
@@ -0,0 +1,20 @@
+{
+ "$id": "creator.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "name",
+ "version"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/entry.json b/node_modules/har-schema/lib/entry.json
new file mode 100644
index 0000000..18025f4
--- /dev/null
+++ b/node_modules/har-schema/lib/entry.json
@@ -0,0 +1,53 @@
+{
+ "$id": "entry.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "optional": true,
+ "required": [
+ "startedDateTime",
+ "time",
+ "request",
+ "response",
+ "cache",
+ "timings"
+ ],
+ "properties": {
+ "pageref": {
+ "type": "string"
+ },
+ "startedDateTime": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ },
+ "time": {
+ "type": "number",
+ "min": 0
+ },
+ "request": {
+ "$ref": "request.json#"
+ },
+ "response": {
+ "$ref": "response.json#"
+ },
+ "cache": {
+ "$ref": "cache.json#"
+ },
+ "timings": {
+ "$ref": "timings.json#"
+ },
+ "serverIPAddress": {
+ "type": "string",
+ "oneOf": [
+ { "format": "ipv4" },
+ { "format": "ipv6" }
+ ]
+ },
+ "connection": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/har.json b/node_modules/har-schema/lib/har.json
new file mode 100644
index 0000000..d1a1de5
--- /dev/null
+++ b/node_modules/har-schema/lib/har.json
@@ -0,0 +1,13 @@
+{
+ "$id": "har.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "log"
+ ],
+ "properties": {
+ "log": {
+ "$ref": "log.json#"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/header.json b/node_modules/har-schema/lib/header.json
new file mode 100644
index 0000000..103d949
--- /dev/null
+++ b/node_modules/har-schema/lib/header.json
@@ -0,0 +1,20 @@
+{
+ "$id": "header.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/index.js b/node_modules/har-schema/lib/index.js
new file mode 100644
index 0000000..244c08e
--- /dev/null
+++ b/node_modules/har-schema/lib/index.js
@@ -0,0 +1,22 @@
+'use strict'
+
+module.exports = {
+ afterRequest: require('./afterRequest.json'),
+ beforeRequest: require('./beforeRequest.json'),
+ browser: require('./browser.json'),
+ cache: require('./cache.json'),
+ content: require('./content.json'),
+ cookie: require('./cookie.json'),
+ creator: require('./creator.json'),
+ entry: require('./entry.json'),
+ har: require('./har.json'),
+ header: require('./header.json'),
+ log: require('./log.json'),
+ page: require('./page.json'),
+ pageTimings: require('./pageTimings.json'),
+ postData: require('./postData.json'),
+ query: require('./query.json'),
+ request: require('./request.json'),
+ response: require('./response.json'),
+ timings: require('./timings.json')
+}
diff --git a/node_modules/har-schema/lib/log.json b/node_modules/har-schema/lib/log.json
new file mode 100644
index 0000000..c353b40
--- /dev/null
+++ b/node_modules/har-schema/lib/log.json
@@ -0,0 +1,36 @@
+{
+ "$id": "log.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "version",
+ "creator",
+ "entries"
+ ],
+ "properties": {
+ "version": {
+ "type": "string"
+ },
+ "creator": {
+ "$ref": "creator.json#"
+ },
+ "browser": {
+ "$ref": "browser.json#"
+ },
+ "pages": {
+ "type": "array",
+ "items": {
+ "$ref": "page.json#"
+ }
+ },
+ "entries": {
+ "type": "array",
+ "items": {
+ "$ref": "entry.json#"
+ }
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/page.json b/node_modules/har-schema/lib/page.json
new file mode 100644
index 0000000..e24a3ce
--- /dev/null
+++ b/node_modules/har-schema/lib/page.json
@@ -0,0 +1,32 @@
+{
+ "$id": "page.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "optional": true,
+ "required": [
+ "startedDateTime",
+ "id",
+ "title",
+ "pageTimings"
+ ],
+ "properties": {
+ "startedDateTime": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"
+ },
+ "id": {
+ "type": "string",
+ "unique": true
+ },
+ "title": {
+ "type": "string"
+ },
+ "pageTimings": {
+ "$ref": "pageTimings.json#"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/pageTimings.json b/node_modules/har-schema/lib/pageTimings.json
new file mode 100644
index 0000000..130411f
--- /dev/null
+++ b/node_modules/har-schema/lib/pageTimings.json
@@ -0,0 +1,18 @@
+{
+ "$id": "pageTimings.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "properties": {
+ "onContentLoad": {
+ "type": "number",
+ "min": -1
+ },
+ "onLoad": {
+ "type": "number",
+ "min": -1
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/postData.json b/node_modules/har-schema/lib/postData.json
new file mode 100644
index 0000000..3aa6294
--- /dev/null
+++ b/node_modules/har-schema/lib/postData.json
@@ -0,0 +1,43 @@
+{
+ "$id": "postData.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "optional": true,
+ "required": [
+ "mimeType"
+ ],
+ "properties": {
+ "mimeType": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ },
+ "params": {
+ "type": "array",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "fileName": {
+ "type": "string"
+ },
+ "contentType": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/query.json b/node_modules/har-schema/lib/query.json
new file mode 100644
index 0000000..f82d8d8
--- /dev/null
+++ b/node_modules/har-schema/lib/query.json
@@ -0,0 +1,20 @@
+{
+ "$id": "query.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/request.json b/node_modules/har-schema/lib/request.json
new file mode 100644
index 0000000..0e2566d
--- /dev/null
+++ b/node_modules/har-schema/lib/request.json
@@ -0,0 +1,57 @@
+{
+ "$id": "request.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "method",
+ "url",
+ "httpVersion",
+ "cookies",
+ "headers",
+ "queryString",
+ "headersSize",
+ "bodySize"
+ ],
+ "properties": {
+ "method": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string",
+ "format": "uri"
+ },
+ "httpVersion": {
+ "type": "string"
+ },
+ "cookies": {
+ "type": "array",
+ "items": {
+ "$ref": "cookie.json#"
+ }
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "$ref": "header.json#"
+ }
+ },
+ "queryString": {
+ "type": "array",
+ "items": {
+ "$ref": "query.json#"
+ }
+ },
+ "postData": {
+ "$ref": "postData.json#"
+ },
+ "headersSize": {
+ "type": "integer"
+ },
+ "bodySize": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/response.json b/node_modules/har-schema/lib/response.json
new file mode 100644
index 0000000..ec30f80
--- /dev/null
+++ b/node_modules/har-schema/lib/response.json
@@ -0,0 +1,54 @@
+{
+ "$id": "response.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "type": "object",
+ "required": [
+ "status",
+ "statusText",
+ "httpVersion",
+ "cookies",
+ "headers",
+ "content",
+ "redirectURL",
+ "headersSize",
+ "bodySize"
+ ],
+ "properties": {
+ "status": {
+ "type": "integer"
+ },
+ "statusText": {
+ "type": "string"
+ },
+ "httpVersion": {
+ "type": "string"
+ },
+ "cookies": {
+ "type": "array",
+ "items": {
+ "$ref": "cookie.json#"
+ }
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "$ref": "header.json#"
+ }
+ },
+ "content": {
+ "$ref": "content.json#"
+ },
+ "redirectURL": {
+ "type": "string"
+ },
+ "headersSize": {
+ "type": "integer"
+ },
+ "bodySize": {
+ "type": "integer"
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/lib/timings.json b/node_modules/har-schema/lib/timings.json
new file mode 100644
index 0000000..5fe7dc7
--- /dev/null
+++ b/node_modules/har-schema/lib/timings.json
@@ -0,0 +1,42 @@
+{
+ "$id": "timings.json#",
+ "$schema": "http://json-schema.org/draft-06/schema#",
+ "required": [
+ "send",
+ "wait",
+ "receive"
+ ],
+ "properties": {
+ "dns": {
+ "type": "number",
+ "min": -1
+ },
+ "connect": {
+ "type": "number",
+ "min": -1
+ },
+ "blocked": {
+ "type": "number",
+ "min": -1
+ },
+ "send": {
+ "type": "number",
+ "min": -1
+ },
+ "wait": {
+ "type": "number",
+ "min": -1
+ },
+ "receive": {
+ "type": "number",
+ "min": -1
+ },
+ "ssl": {
+ "type": "number",
+ "min": -1
+ },
+ "comment": {
+ "type": "string"
+ }
+ }
+}
diff --git a/node_modules/har-schema/package.json b/node_modules/har-schema/package.json
new file mode 100644
index 0000000..d14650b
--- /dev/null
+++ b/node_modules/har-schema/package.json
@@ -0,0 +1,54 @@
+{
+ "version": "2.0.0",
+ "name": "har-schema",
+ "description": "JSON Schema for HTTP Archive (HAR)",
+ "author": "Ahmad Nassri <ahmad@ahmadnassri.com> (https://www.ahmadnassri.com/)",
+ "contributors": [
+ "Evgeny Poberezkin <e.poberezkin@me.com>"
+ ],
+ "homepage": "https://github.com/ahmadnassri/har-schema",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/ahmadnassri/har-schema.git"
+ },
+ "license": "ISC",
+ "main": "lib/index.js",
+ "keywords": [
+ "har",
+ "http",
+ "archive",
+ "JSON",
+ "schema",
+ "JSON-schema"
+ ],
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "lib"
+ ],
+ "bugs": {
+ "url": "https://github.com/ahmadnassri/har-schema/issues"
+ },
+ "scripts": {
+ "test": "tap test --reporter spec",
+ "pretest": "snazzy && echint",
+ "coverage": "tap test --reporter silent --coverage",
+ "codeclimate": "tap --coverage-report=text-lcov | codeclimate-test-reporter",
+ "semantic-release": "semantic-release pre && npm publish && semantic-release post"
+ },
+ "config": {
+ "commitizen": {
+ "path": "./node_modules/cz-conventional-changelog"
+ }
+ },
+ "devDependencies": {
+ "ajv": "^5.0.0",
+ "codeclimate-test-reporter": "^0.4.0",
+ "cz-conventional-changelog": "^1.2.0",
+ "echint": "^2.1.0",
+ "semantic-release": "^6.3.2",
+ "snazzy": "^5.0.0",
+ "tap": "^8.0.1"
+ }
+} \ No newline at end of file
diff --git a/node_modules/har-validator/LICENSE b/node_modules/har-validator/LICENSE
new file mode 100644
index 0000000..a545266
--- /dev/null
+++ b/node_modules/har-validator/LICENSE
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) 2018 Ahmad Nassri <ahmad@ahmadnassri.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/har-validator/README.md b/node_modules/har-validator/README.md
new file mode 100644
index 0000000..ea944cc
--- /dev/null
+++ b/node_modules/har-validator/README.md
@@ -0,0 +1,43 @@
+# HAR Validator
+
+[![license][license-img]][license-url]
+[![version][npm-img]][npm-url]
+[![super linter][super-linter-img]][super-linter-url]
+[![test][test-img]][test-url]
+[![release][release-img]][release-url]
+
+[license-url]: LICENSE
+[license-img]: https://badgen.net/github/license/ahmadnassri/node-har-validator
+
+[npm-url]: https://www.npmjs.com/package/har-validator
+[npm-img]: https://badgen.net/npm/v/har-validator
+
+[super-linter-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Asuper-linter
+[super-linter-img]: https://github.com/ahmadnassri/node-har-validator/workflows/super-linter/badge.svg
+
+[test-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Atest
+[test-img]: https://github.com/ahmadnassri/node-har-validator/workflows/test/badge.svg
+
+[release-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Arelease
+[release-img]: https://github.com/ahmadnassri/node-har-validator/workflows/release/badge.svg
+
+> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
+
+## Install
+
+```bash
+npm install har-validator
+```
+
+## CLI Usage
+
+Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info.
+
+## API
+
+**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/node-har-validator/releases/tag/v2.0.0) this module defaults to Promise based API.
+_For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided_
+
+- [async API](docs/async.md)
+- [callback API](docs/async.md)
+- [Promise API](docs/promise.md) _(default)_
diff --git a/node_modules/har-validator/lib/async.js b/node_modules/har-validator/lib/async.js
new file mode 100644
index 0000000..90701f2
--- /dev/null
+++ b/node_modules/har-validator/lib/async.js
@@ -0,0 +1,105 @@
+var Ajv = require('ajv')
+var HARError = require('./error')
+var schemas = require('har-schema')
+
+var ajv
+
+function createAjvInstance () {
+ var ajv = new Ajv({
+ allErrors: true
+ })
+ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
+ ajv.addSchema(schemas)
+
+ return ajv
+}
+
+function validate (name, data, next) {
+ data = data || {}
+
+ // validator config
+ ajv = ajv || createAjvInstance()
+
+ var validate = ajv.getSchema(name + '.json')
+
+ var valid = validate(data)
+
+ // callback?
+ if (typeof next === 'function') {
+ return next(!valid ? new HARError(validate.errors) : null, valid)
+ }
+
+ return valid
+}
+
+exports.afterRequest = function (data, next) {
+ return validate('afterRequest', data, next)
+}
+
+exports.beforeRequest = function (data, next) {
+ return validate('beforeRequest', data, next)
+}
+
+exports.browser = function (data, next) {
+ return validate('browser', data, next)
+}
+
+exports.cache = function (data, next) {
+ return validate('cache', data, next)
+}
+
+exports.content = function (data, next) {
+ return validate('content', data, next)
+}
+
+exports.cookie = function (data, next) {
+ return validate('cookie', data, next)
+}
+
+exports.creator = function (data, next) {
+ return validate('creator', data, next)
+}
+
+exports.entry = function (data, next) {
+ return validate('entry', data, next)
+}
+
+exports.har = function (data, next) {
+ return validate('har', data, next)
+}
+
+exports.header = function (data, next) {
+ return validate('header', data, next)
+}
+
+exports.log = function (data, next) {
+ return validate('log', data, next)
+}
+
+exports.page = function (data, next) {
+ return validate('page', data, next)
+}
+
+exports.pageTimings = function (data, next) {
+ return validate('pageTimings', data, next)
+}
+
+exports.postData = function (data, next) {
+ return validate('postData', data, next)
+}
+
+exports.query = function (data, next) {
+ return validate('query', data, next)
+}
+
+exports.request = function (data, next) {
+ return validate('request', data, next)
+}
+
+exports.response = function (data, next) {
+ return validate('response', data, next)
+}
+
+exports.timings = function (data, next) {
+ return validate('timings', data, next)
+}
diff --git a/node_modules/har-validator/lib/error.js b/node_modules/har-validator/lib/error.js
new file mode 100644
index 0000000..f2618dc
--- /dev/null
+++ b/node_modules/har-validator/lib/error.js
@@ -0,0 +1,17 @@
+function HARError (errors) {
+ var message = 'validation failed'
+
+ this.name = 'HARError'
+ this.message = message
+ this.errors = errors
+
+ if (typeof Error.captureStackTrace === 'function') {
+ Error.captureStackTrace(this, this.constructor)
+ } else {
+ this.stack = (new Error(message)).stack
+ }
+}
+
+HARError.prototype = Error.prototype
+
+module.exports = HARError
diff --git a/node_modules/har-validator/lib/promise.js b/node_modules/har-validator/lib/promise.js
new file mode 100644
index 0000000..46f4647
--- /dev/null
+++ b/node_modules/har-validator/lib/promise.js
@@ -0,0 +1,102 @@
+var Ajv = require('ajv')
+var HARError = require('./error')
+var schemas = require('har-schema')
+
+var ajv
+
+function createAjvInstance () {
+ var ajv = new Ajv({
+ allErrors: true
+ })
+ ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
+ ajv.addSchema(schemas)
+
+ return ajv
+}
+
+function validate (name, data) {
+ data = data || {}
+
+ // validator config
+ ajv = ajv || createAjvInstance()
+
+ var validate = ajv.getSchema(name + '.json')
+
+ return new Promise(function (resolve, reject) {
+ var valid = validate(data)
+
+ !valid ? reject(new HARError(validate.errors)) : resolve(data)
+ })
+}
+
+exports.afterRequest = function (data) {
+ return validate('afterRequest', data)
+}
+
+exports.beforeRequest = function (data) {
+ return validate('beforeRequest', data)
+}
+
+exports.browser = function (data) {
+ return validate('browser', data)
+}
+
+exports.cache = function (data) {
+ return validate('cache', data)
+}
+
+exports.content = function (data) {
+ return validate('content', data)
+}
+
+exports.cookie = function (data) {
+ return validate('cookie', data)
+}
+
+exports.creator = function (data) {
+ return validate('creator', data)
+}
+
+exports.entry = function (data) {
+ return validate('entry', data)
+}
+
+exports.har = function (data) {
+ return validate('har', data)
+}
+
+exports.header = function (data) {
+ return validate('header', data)
+}
+
+exports.log = function (data) {
+ return validate('log', data)
+}
+
+exports.page = function (data) {
+ return validate('page', data)
+}
+
+exports.pageTimings = function (data) {
+ return validate('pageTimings', data)
+}
+
+exports.postData = function (data) {
+ return validate('postData', data)
+}
+
+exports.query = function (data) {
+ return validate('query', data)
+}
+
+exports.request = function (data) {
+ return validate('request', data)
+}
+
+exports.response = function (data) {
+ return validate('response', data)
+}
+
+exports.timings = function (data) {
+ return validate('timings', data)
+}
diff --git a/node_modules/har-validator/package.json b/node_modules/har-validator/package.json
new file mode 100644
index 0000000..8d1eed1
--- /dev/null
+++ b/node_modules/har-validator/package.json
@@ -0,0 +1,43 @@
+{
+ "version": "5.1.5",
+ "name": "har-validator",
+ "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
+ "author": "Ahmad Nassri <ahmad@ahmadnassri.com> (https://www.ahmadnassri.com/)",
+ "homepage": "https://github.com/ahmadnassri/node-har-validator",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/ahmadnassri/node-har-validator.git"
+ },
+ "license": "MIT",
+ "main": "lib/promise.js",
+ "keywords": [
+ "har",
+ "cli",
+ "ajv",
+ "http",
+ "archive",
+ "validate",
+ "validator"
+ ],
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "lib"
+ ],
+ "bugs": {
+ "url": "https://github.com/ahmadnassri/node-har-validator/issues"
+ },
+ "scripts": {
+ "lint": "npx run-p lint:*",
+ "test": "tap test --no-coverage",
+ "test:coverage": "tap test --coverage-report=lcov --no-browser"
+ },
+ "devDependencies": {
+ "tap": "^14.10.8"
+ },
+ "dependencies": {
+ "ajv": "^6.12.3",
+ "har-schema": "^2.0.0"
+ }
+}
diff --git a/node_modules/has-property-descriptors/.eslintrc b/node_modules/has-property-descriptors/.eslintrc
new file mode 100644
index 0000000..2fcc002
--- /dev/null
+++ b/node_modules/has-property-descriptors/.eslintrc
@@ -0,0 +1,13 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "func-name-matching": 0,
+ "id-length": 0,
+ "new-cap": [2, {
+ "capIsNewExceptions": ["GetIntrinsic"],
+ }],
+ },
+}
diff --git a/node_modules/has-property-descriptors/.github/FUNDING.yml b/node_modules/has-property-descriptors/.github/FUNDING.yml
new file mode 100644
index 0000000..817aacf
--- /dev/null
+++ b/node_modules/has-property-descriptors/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/has-property-descriptors
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/node_modules/has-property-descriptors/.nycrc b/node_modules/has-property-descriptors/.nycrc
new file mode 100644
index 0000000..bdd626c
--- /dev/null
+++ b/node_modules/has-property-descriptors/.nycrc
@@ -0,0 +1,9 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/node_modules/has-property-descriptors/CHANGELOG.md b/node_modules/has-property-descriptors/CHANGELOG.md
new file mode 100644
index 0000000..ae64b47
--- /dev/null
+++ b/node_modules/has-property-descriptors/CHANGELOG.md
@@ -0,0 +1,16 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## v1.0.0 - 2022-04-14
+
+### Commits
+
+- Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a)
+- Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749)
+- read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767)
+- npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85)
+- Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0)
diff --git a/node_modules/has-property-descriptors/LICENSE b/node_modules/has-property-descriptors/LICENSE
new file mode 100644
index 0000000..2e7b9a3
--- /dev/null
+++ b/node_modules/has-property-descriptors/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Inspect JS
+
+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/has-property-descriptors/README.md b/node_modules/has-property-descriptors/README.md
new file mode 100644
index 0000000..d81fbd9
--- /dev/null
+++ b/node_modules/has-property-descriptors/README.md
@@ -0,0 +1,43 @@
+# has-property-descriptors <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][npm-badge-png]][package-url]
+
+Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
+
+## Example
+
+```js
+var hasPropertyDescriptors = require('has-property-descriptors');
+var assert = require('assert');
+
+assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines
+
+// Arrays can not have their length `[[Defined]]` in some engines
+assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6
+```
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+[package-url]: https://npmjs.org/package/has-property-descriptors
+[npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg
+[deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg
+[deps-url]: https://david-dm.org/inspect-js/has-property-descriptors
+[dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg
+[dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors
+[codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors
+[actions-url]: https://github.com/inspect-js/has-property-descriptors/actions
diff --git a/node_modules/has-property-descriptors/index.js b/node_modules/has-property-descriptors/index.js
new file mode 100644
index 0000000..8e30683
--- /dev/null
+++ b/node_modules/has-property-descriptors/index.js
@@ -0,0 +1,33 @@
+'use strict';
+
+var GetIntrinsic = require('get-intrinsic');
+
+var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
+
+var hasPropertyDescriptors = function hasPropertyDescriptors() {
+ if ($defineProperty) {
+ try {
+ $defineProperty({}, 'a', { value: 1 });
+ return true;
+ } catch (e) {
+ // IE 8 has a broken defineProperty
+ return false;
+ }
+ }
+ return false;
+};
+
+hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
+ // node v0.6 has a bug where array lengths can be Set but not Defined
+ if (!hasPropertyDescriptors()) {
+ return null;
+ }
+ try {
+ return $defineProperty([], 'length', { value: 1 }).length !== 1;
+ } catch (e) {
+ // In Firefox 4-22, defining length on an array throws an exception.
+ return true;
+ }
+};
+
+module.exports = hasPropertyDescriptors;
diff --git a/node_modules/has-property-descriptors/package.json b/node_modules/has-property-descriptors/package.json
new file mode 100644
index 0000000..9404b71
--- /dev/null
+++ b/node_modules/has-property-descriptors/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "has-property-descriptors",
+ "version": "1.0.0",
+ "description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.",
+ "main": "index.js",
+ "exports": {
+ ".": "./index.js",
+ "./package.json": "./package.json"
+ },
+ "sideEffects": false,
+ "scripts": {
+ "prepublishOnly": "safe-publish-latest",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "pretest": "npm run lint",
+ "prelint": "evalmd README.md",
+ "lint": "eslint --ext=js,mjs .",
+ "tests-only": "nyc tape 'test/**/*.js'",
+ "test": "npm run tests-only",
+ "posttest": "aud --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/inspect-js/has-property-descriptors.git"
+ },
+ "keywords": [
+ "property",
+ "descriptors",
+ "has",
+ "environment",
+ "env",
+ "defineProperty",
+ "getOwnPropertyDescriptor"
+ ],
+ "author": "Jordan Harband <ljharb@gmail.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/inspect-js/has-property-descriptors/issues"
+ },
+ "homepage": "https://github.com/inspect-js/has-property-descriptors#readme",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^21.0.0",
+ "aud": "^2.0.0",
+ "auto-changelog": "^2.4.0",
+ "eslint": "=8.8.0",
+ "in-publish": "^2.0.1",
+ "evalmd": "^0.0.19",
+ "nyc": "^10.3.2",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.5.3"
+ },
+ "dependencies": {
+ "get-intrinsic": "^1.1.1"
+ },
+ "testling": {
+ "files": "test/index.js"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ }
+}
diff --git a/node_modules/has-property-descriptors/test/index.js b/node_modules/has-property-descriptors/test/index.js
new file mode 100644
index 0000000..7f02bd3
--- /dev/null
+++ b/node_modules/has-property-descriptors/test/index.js
@@ -0,0 +1,57 @@
+'use strict';
+
+var test = require('tape');
+
+var hasPropertyDescriptors = require('../');
+
+var sentinel = {};
+
+test('hasPropertyDescriptors', function (t) {
+ t.equal(typeof hasPropertyDescriptors, 'function', 'is a function');
+ t.equal(typeof hasPropertyDescriptors.hasArrayLengthDefineBug, 'function', '`hasArrayLengthDefineBug` property is a function');
+
+ var yes = hasPropertyDescriptors();
+ t.test('property descriptors', { skip: !yes }, function (st) {
+ var o = { a: sentinel };
+
+ st.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'a'),
+ {
+ configurable: true,
+ enumerable: true,
+ value: sentinel,
+ writable: true
+ },
+ 'has expected property descriptor'
+ );
+
+ Object.defineProperty(o, 'a', { enumerable: false, writable: false });
+
+ st.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'a'),
+ {
+ configurable: true,
+ enumerable: false,
+ value: sentinel,
+ writable: false
+ },
+ 'has expected property descriptor after [[Define]]'
+ );
+
+ st.end();
+ });
+
+ var arrayBug = hasPropertyDescriptors.hasArrayLengthDefineBug();
+ t.test('defining array lengths', { skip: !yes || arrayBug }, function (st) {
+ var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays
+ st.equal(arr.length, 3, 'array starts with length 3');
+
+ Object.defineProperty(arr, 'length', { value: 5 });
+
+ st.equal(arr.length, 5, 'array ends with length 5');
+
+ st.end();
+ });
+
+ t.end();
+});
diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc
new file mode 100644
index 0000000..2d9a66a
--- /dev/null
+++ b/node_modules/has-symbols/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "max-statements-per-line": [2, { "max": 2 }],
+ "no-magic-numbers": 0,
+ "multiline-comment-style": 0,
+ }
+}
diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml
new file mode 100644
index 0000000..04cf87e
--- /dev/null
+++ b/node_modules/has-symbols/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/has-symbols
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc
new file mode 100644
index 0000000..bdd626c
--- /dev/null
+++ b/node_modules/has-symbols/.nycrc
@@ -0,0 +1,9 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md
new file mode 100644
index 0000000..cd532a2
--- /dev/null
+++ b/node_modules/has-symbols/CHANGELOG.md
@@ -0,0 +1,75 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01
+
+### Commits
+
+- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693)
+- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744)
+- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07)
+- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab)
+- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc)
+- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e)
+- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f)
+- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d)
+- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03)
+
+## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27
+
+### Fixed
+
+- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11)
+
+### Commits
+
+- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3)
+- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4)
+- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae)
+- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a)
+- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839)
+- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d)
+- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0)
+- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b)
+- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da)
+- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc)
+- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1)
+- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76)
+
+## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16
+
+### Commits
+
+- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229)
+- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b)
+- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c)
+- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91)
+- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4)
+- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa)
+- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193)
+- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0)
+- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0)
+
+## v1.0.0 - 2016-09-19
+
+### Commits
+
+- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d)
+- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a)
+- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c)
+- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb)
+- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c)
diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE
new file mode 100644
index 0000000..df31cbf
--- /dev/null
+++ b/node_modules/has-symbols/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Jordan Harband
+
+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/has-symbols/README.md b/node_modules/has-symbols/README.md
new file mode 100644
index 0000000..33905f0
--- /dev/null
+++ b/node_modules/has-symbols/README.md
@@ -0,0 +1,46 @@
+# has-symbols <sup>[![Version Badge][2]][1]</sup>
+
+[![github actions][actions-image]][actions-url]
+[![coverage][codecov-image]][codecov-url]
+[![dependency status][5]][6]
+[![dev dependency status][7]][8]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][11]][1]
+
+Determine if the JS environment has Symbol support. Supports spec, or shams.
+
+## Example
+
+```js
+var hasSymbols = require('has-symbols');
+
+hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable.
+
+var hasSymbolsKinda = require('has-symbols/shams');
+hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec.
+```
+
+## Supported Symbol shams
+ - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols)
+ - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js)
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+[1]: https://npmjs.org/package/has-symbols
+[2]: https://versionbadg.es/inspect-js/has-symbols.svg
+[5]: https://david-dm.org/inspect-js/has-symbols.svg
+[6]: https://david-dm.org/inspect-js/has-symbols
+[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg
+[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies
+[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/has-symbols.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols
+[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols
+[actions-url]: https://github.com/inspect-js/has-symbols/actions
diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js
new file mode 100644
index 0000000..17044fa
--- /dev/null
+++ b/node_modules/has-symbols/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var origSymbol = typeof Symbol !== 'undefined' && Symbol;
+var hasSymbolSham = require('./shams');
+
+module.exports = function hasNativeSymbols() {
+ if (typeof origSymbol !== 'function') { return false; }
+ if (typeof Symbol !== 'function') { return false; }
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
+
+ return hasSymbolSham();
+};
diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json
new file mode 100644
index 0000000..fe7004a
--- /dev/null
+++ b/node_modules/has-symbols/package.json
@@ -0,0 +1,101 @@
+{
+ "name": "has-symbols",
+ "version": "1.0.3",
+ "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.",
+ "main": "index.js",
+ "scripts": {
+ "prepublishOnly": "safe-publish-latest",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "pretest": "npm run --silent lint",
+ "test": "npm run tests-only",
+ "posttest": "aud --production",
+ "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams",
+ "test:stock": "nyc node test",
+ "test:staging": "nyc node --harmony --es-staging test",
+ "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs",
+ "test:shams:corejs": "nyc node test/shams/core-js.js",
+ "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js",
+ "lint": "eslint --ext=js,mjs .",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/inspect-js/has-symbols.git"
+ },
+ "keywords": [
+ "Symbol",
+ "symbols",
+ "typeof",
+ "sham",
+ "polyfill",
+ "native",
+ "core-js",
+ "ES6"
+ ],
+ "author": {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ },
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ }
+ ],
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ljharb/has-symbols/issues"
+ },
+ "homepage": "https://github.com/ljharb/has-symbols#readme",
+ "devDependencies": {
+ "@ljharb/eslint-config": "^20.2.3",
+ "aud": "^2.0.0",
+ "auto-changelog": "^2.4.0",
+ "core-js": "^2.6.12",
+ "eslint": "=8.8.0",
+ "get-own-property-symbols": "^0.9.5",
+ "nyc": "^10.3.2",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.5.2"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "iexplore/6.0..latest",
+ "firefox/3.0..6.0",
+ "firefox/15.0..latest",
+ "firefox/nightly",
+ "chrome/4.0..10.0",
+ "chrome/20.0..latest",
+ "chrome/canary",
+ "opera/10.0..latest",
+ "opera/next",
+ "safari/4.0..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2"
+ ]
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ },
+ "greenkeeper": {
+ "ignore": [
+ "core-js"
+ ]
+ }
+}
diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js
new file mode 100644
index 0000000..1285210
--- /dev/null
+++ b/node_modules/has-symbols/shams.js
@@ -0,0 +1,42 @@
+'use strict';
+
+/* eslint complexity: [2, 18], max-statements: [2, 33] */
+module.exports = function hasSymbols() {
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
+ if (typeof Symbol.iterator === 'symbol') { return true; }
+
+ var obj = {};
+ var sym = Symbol('test');
+ var symObj = Object(sym);
+ if (typeof sym === 'string') { return false; }
+
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
+
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
+ // if (sym instanceof Symbol) { return false; }
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
+ // if (!(symObj instanceof Symbol)) { return false; }
+
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
+
+ var symVal = 42;
+ obj[sym] = symVal;
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
+
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
+
+ var syms = Object.getOwnPropertySymbols(obj);
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
+
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
+
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
+ }
+
+ return true;
+};
diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js
new file mode 100644
index 0000000..352129c
--- /dev/null
+++ b/node_modules/has-symbols/test/index.js
@@ -0,0 +1,22 @@
+'use strict';
+
+var test = require('tape');
+var hasSymbols = require('../');
+var runSymbolTests = require('./tests');
+
+test('interface', function (t) {
+ t.equal(typeof hasSymbols, 'function', 'is a function');
+ t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean');
+ t.end();
+});
+
+test('Symbols are supported', { skip: !hasSymbols() }, function (t) {
+ runSymbolTests(t);
+ t.end();
+});
+
+test('Symbols are not supported', { skip: hasSymbols() }, function (t) {
+ t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined');
+ t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist');
+ t.end();
+});
diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js
new file mode 100644
index 0000000..df5365c
--- /dev/null
+++ b/node_modules/has-symbols/test/shams/core-js.js
@@ -0,0 +1,28 @@
+'use strict';
+
+var test = require('tape');
+
+if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
+ test('has native Symbol support', function (t) {
+ t.equal(typeof Symbol, 'function');
+ t.equal(typeof Symbol(), 'symbol');
+ t.end();
+ });
+ return;
+}
+
+var hasSymbols = require('../../shams');
+
+test('polyfilled Symbols', function (t) {
+ /* eslint-disable global-require */
+ t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
+ require('core-js/fn/symbol');
+ require('core-js/fn/symbol/to-string-tag');
+
+ require('../tests')(t);
+
+ var hasSymbolsAfter = hasSymbols();
+ t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
+ /* eslint-enable global-require */
+ t.end();
+});
diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js
new file mode 100644
index 0000000..9191b24
--- /dev/null
+++ b/node_modules/has-symbols/test/shams/get-own-property-symbols.js
@@ -0,0 +1,28 @@
+'use strict';
+
+var test = require('tape');
+
+if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
+ test('has native Symbol support', function (t) {
+ t.equal(typeof Symbol, 'function');
+ t.equal(typeof Symbol(), 'symbol');
+ t.end();
+ });
+ return;
+}
+
+var hasSymbols = require('../../shams');
+
+test('polyfilled Symbols', function (t) {
+ /* eslint-disable global-require */
+ t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
+
+ require('get-own-property-symbols');
+
+ require('../tests')(t);
+
+ var hasSymbolsAfter = hasSymbols();
+ t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
+ /* eslint-enable global-require */
+ t.end();
+});
diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js
new file mode 100644
index 0000000..89edd12
--- /dev/null
+++ b/node_modules/has-symbols/test/tests.js
@@ -0,0 +1,56 @@
+'use strict';
+
+// eslint-disable-next-line consistent-return
+module.exports = function runSymbolTests(t) {
+ t.equal(typeof Symbol, 'function', 'global Symbol is a function');
+
+ if (typeof Symbol !== 'function') { return false; }
+
+ t.notEqual(Symbol(), Symbol(), 'two symbols are not equal');
+
+ /*
+ t.equal(
+ Symbol.prototype.toString.call(Symbol('foo')),
+ Symbol.prototype.toString.call(Symbol('foo')),
+ 'two symbols with the same description stringify the same'
+ );
+ */
+
+ /*
+ var foo = Symbol('foo');
+
+ t.notEqual(
+ String(foo),
+ String(Symbol('bar')),
+ 'two symbols with different descriptions do not stringify the same'
+ );
+ */
+
+ t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function');
+ // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol');
+
+ t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function');
+
+ var obj = {};
+ var sym = Symbol('test');
+ var symObj = Object(sym);
+ t.notEqual(typeof sym, 'string', 'Symbol is not a string');
+ t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly');
+ t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly');
+
+ var symVal = 42;
+ obj[sym] = symVal;
+ // eslint-disable-next-line no-restricted-syntax
+ for (sym in obj) { t.fail('symbol property key was found in for..in of object'); }
+
+ t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object');
+ t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object');
+ t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object');
+ t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable');
+ t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), {
+ configurable: true,
+ enumerable: true,
+ value: 42,
+ writable: true
+ }, 'property descriptor is correct');
+};
diff --git a/node_modules/has/LICENSE-MIT b/node_modules/has/LICENSE-MIT
new file mode 100644
index 0000000..ae7014d
--- /dev/null
+++ b/node_modules/has/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Thiago de Arruda
+
+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/has/README.md b/node_modules/has/README.md
new file mode 100644
index 0000000..635e3a4
--- /dev/null
+++ b/node_modules/has/README.md
@@ -0,0 +1,18 @@
+# has
+
+> Object.prototype.hasOwnProperty.call shortcut
+
+## Installation
+
+```sh
+npm install --save has
+```
+
+## Usage
+
+```js
+var has = require('has');
+
+has({}, 'hasOwnProperty'); // false
+has(Object.prototype, 'hasOwnProperty'); // true
+```
diff --git a/node_modules/has/package.json b/node_modules/has/package.json
new file mode 100644
index 0000000..7c4592f
--- /dev/null
+++ b/node_modules/has/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "has",
+ "description": "Object.prototype.hasOwnProperty.call shortcut",
+ "version": "1.0.3",
+ "homepage": "https://github.com/tarruda/has",
+ "author": {
+ "name": "Thiago de Arruda",
+ "email": "tpadilha84@gmail.com"
+ },
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/tarruda/has.git"
+ },
+ "bugs": {
+ "url": "https://github.com/tarruda/has/issues"
+ },
+ "license": "MIT",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "./src",
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "eslint": "^4.19.1",
+ "tape": "^4.9.0"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "pretest": "npm run lint",
+ "test": "tape test"
+ }
+}
diff --git a/node_modules/has/src/index.js b/node_modules/has/src/index.js
new file mode 100644
index 0000000..dd92dd9
--- /dev/null
+++ b/node_modules/has/src/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var bind = require('function-bind');
+
+module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js
new file mode 100644
index 0000000..43d480b
--- /dev/null
+++ b/node_modules/has/test/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+var test = require('tape');
+var has = require('../');
+
+test('has', function (t) {
+ t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"');
+ t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"');
+ t.end();
+});
diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md
new file mode 100644
index 0000000..4f86601
--- /dev/null
+++ b/node_modules/hosted-git-info/CHANGELOG.md
@@ -0,0 +1,141 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="2.8.8"></a>
+## [2.8.8](https://github.com/npm/hosted-git-info/compare/v2.8.7...v2.8.8) (2020-02-29)
+
+
+### Bug Fixes
+
+* [#61](https://github.com/npm/hosted-git-info/issues/61) & [#65](https://github.com/npm/hosted-git-info/issues/65) addressing issues w/ url.URL implmentation which regressed node 6 support ([5038b18](https://github.com/npm/hosted-git-info/commit/5038b18)), closes [#66](https://github.com/npm/hosted-git-info/issues/66)
+
+
+
+<a name="2.8.7"></a>
+## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26)
+
+
+### Bug Fixes
+
+* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62)
+* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60)
+
+
+
+<a name="2.8.6"></a>
+## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25)
+
+
+
+<a name="2.8.5"></a>
+## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07)
+
+
+### Bug Fixes
+
+* updated pathmatch for gitlab ([e8325b5](https://github.com/npm/hosted-git-info/commit/e8325b5)), closes [#51](https://github.com/npm/hosted-git-info/issues/51)
+* updated pathmatch for gitlab ([ffe056f](https://github.com/npm/hosted-git-info/commit/ffe056f))
+
+
+
+<a name="2.8.4"></a>
+## [2.8.4](https://github.com/npm/hosted-git-info/compare/v2.8.3...v2.8.4) (2019-08-12)
+
+
+
+<a name="2.8.3"></a>
+## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12)
+
+
+
+<a name="2.8.2"></a>
+## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05)
+
+
+### Bug Fixes
+
+* http protocol use sshurl by default ([3b1d629](https://github.com/npm/hosted-git-info/commit/3b1d629)), closes [#48](https://github.com/npm/hosted-git-info/issues/48)
+
+
+
+<a name="2.8.1"></a>
+## [2.8.1](https://github.com/npm/hosted-git-info/compare/v2.8.0...v2.8.1) (2019-08-05)
+
+
+### Bug Fixes
+
+* ignore noCommittish on tarball url generation ([5d4a8d7](https://github.com/npm/hosted-git-info/commit/5d4a8d7))
+* use gist tarball url that works for anonymous gists ([1692435](https://github.com/npm/hosted-git-info/commit/1692435))
+
+
+
+<a name="2.8.0"></a>
+# [2.8.0](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.0) (2019-08-05)
+
+
+### Bug Fixes
+
+* Allow slashes in gitlab project section ([bbcf7b2](https://github.com/npm/hosted-git-info/commit/bbcf7b2)), closes [#46](https://github.com/npm/hosted-git-info/issues/46) [#43](https://github.com/npm/hosted-git-info/issues/43)
+* **git-host:** disallow URI-encoded slash (%2F) in `path` ([3776fa5](https://github.com/npm/hosted-git-info/commit/3776fa5)), closes [#44](https://github.com/npm/hosted-git-info/issues/44)
+* **gitlab:** Do not URL encode slashes in project name for GitLab https URL ([cbf04f9](https://github.com/npm/hosted-git-info/commit/cbf04f9)), closes [#47](https://github.com/npm/hosted-git-info/issues/47)
+* do not allow invalid gist urls ([d5cf830](https://github.com/npm/hosted-git-info/commit/d5cf830))
+* **cache:** Switch to lru-cache to save ourselves from unlimited memory consumption ([e518222](https://github.com/npm/hosted-git-info/commit/e518222)), closes [#38](https://github.com/npm/hosted-git-info/issues/38)
+
+
+### Features
+
+* give these objects a name ([60abaea](https://github.com/npm/hosted-git-info/commit/60abaea))
+
+
+
+<a name="2.7.1"></a>
+## [2.7.1](https://github.com/npm/hosted-git-info/compare/v2.7.0...v2.7.1) (2018-07-07)
+
+
+### Bug Fixes
+
+* **index:** Guard against non-string types ([5bc580d](https://github.com/npm/hosted-git-info/commit/5bc580d))
+* **parse:** Crash on strings that parse to having no host ([c931482](https://github.com/npm/hosted-git-info/commit/c931482)), closes [#35](https://github.com/npm/hosted-git-info/issues/35)
+
+
+
+<a name="2.7.0"></a>
+# [2.7.0](https://github.com/npm/hosted-git-info/compare/v2.6.1...v2.7.0) (2018-07-06)
+
+
+### Bug Fixes
+
+* **github tarball:** update github tarballtemplate ([6efd582](https://github.com/npm/hosted-git-info/commit/6efd582)), closes [#34](https://github.com/npm/hosted-git-info/issues/34)
+* **gitlab docs:** switched to lowercase anchors for readmes ([701bcd1](https://github.com/npm/hosted-git-info/commit/701bcd1))
+
+
+### Features
+
+* **all:** Support www. prefixes on hostnames ([3349575](https://github.com/npm/hosted-git-info/commit/3349575)), closes [#32](https://github.com/npm/hosted-git-info/issues/32)
+
+
+
+<a name="2.6.1"></a>
+## [2.6.1](https://github.com/npm/hosted-git-info/compare/v2.6.0...v2.6.1) (2018-06-25)
+
+### Bug Fixes
+
+* **Revert:** "compat: remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25))" ([cce5a62](https://github.com/npm/hosted-git-info/commit/cce5a62))
+* **Revert:** "git-host: fix forgotten extend()" ([a815ec9](https://github.com/npm/hosted-git-info/commit/a815ec9))
+
+
+
+<a name="2.6.0"></a>
+# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07)
+
+
+### Bug Fixes
+
+* **compat:** remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25)) ([627ab55](https://github.com/npm/hosted-git-info/commit/627ab55))
+* **git-host:** fix forgotten extend() ([eba1f7b](https://github.com/npm/hosted-git-info/commit/eba1f7b))
+
+
+### Features
+
+* **browse:** fragment support for browse() ([#28](https://github.com/npm/hosted-git-info/issues/28)) ([cd5e5bb](https://github.com/npm/hosted-git-info/commit/cd5e5bb))
diff --git a/node_modules/hosted-git-info/LICENSE b/node_modules/hosted-git-info/LICENSE
new file mode 100644
index 0000000..4505576
--- /dev/null
+++ b/node_modules/hosted-git-info/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/hosted-git-info/README.md b/node_modules/hosted-git-info/README.md
new file mode 100644
index 0000000..7b723f6
--- /dev/null
+++ b/node_modules/hosted-git-info/README.md
@@ -0,0 +1,133 @@
+# hosted-git-info
+
+This will let you identify and transform various git hosts URLs between
+protocols. It also can tell you what the URL is for the raw path for
+particular file for direct access without git.
+
+## Example
+
+```javascript
+var hostedGitInfo = require("hosted-git-info")
+var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts)
+/* info looks like:
+{
+ type: "github",
+ domain: "github.com",
+ user: "npm",
+ project: "hosted-git-info"
+}
+*/
+```
+
+If the URL can't be matched with a git host, `null` will be returned. We
+can match git, ssh and https urls. Additionally, we can match ssh connect
+strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg,
+`github:npm/hosted-git-info`). Github specifically, is detected in the case
+of a third, unprefixed, form: `npm/hosted-git-info`.
+
+If it does match, the returned object has properties of:
+
+* info.type -- The short name of the service
+* info.domain -- The domain for git protocol use
+* info.user -- The name of the user/org on the git host
+* info.project -- The name of the project on the git host
+
+## Version Contract
+
+The major version will be bumped any time…
+
+* The constructor stops accepting URLs that it previously accepted.
+* A method is removed.
+* A method can no longer accept the number and type of arguments it previously accepted.
+* A method can return a different type than it currently returns.
+
+Implications:
+
+* I do not consider the specific format of the urls returned from, say
+ `.https()` to be a part of the contract. The contract is that it will
+ return a string that can be used to fetch the repo via HTTPS. But what
+ that string looks like, specifically, can change.
+* Dropping support for a hosted git provider would constitute a breaking
+ change.
+
+## Usage
+
+### var info = hostedGitInfo.fromUrl(gitSpecifier[, options])
+
+* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one.
+* *options* is an optional object. It can have the following properties:
+ * *noCommittish* — If true then committishes won't be included in generated URLs.
+ * *noGitPlus* — If true then `git+` won't be prefixed on URLs.
+
+## Methods
+
+All of the methods take the same options as the `fromUrl` factory. Options
+provided to a method override those provided to the constructor.
+
+* info.file(path, opts)
+
+Given the path of a file relative to the repository, returns a URL for
+directly fetching it from the githost. If no committish was set then
+`master` will be used as the default.
+
+For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")`
+would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`
+
+* info.shortcut(opts)
+
+eg, `github:npm/hosted-git-info`
+
+* info.browse(path, fragment, opts)
+
+eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`,
+`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`,
+`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts`
+
+* info.bugs(opts)
+
+eg, `https://github.com/npm/hosted-git-info/issues`
+
+* info.docs(opts)
+
+eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`
+
+* info.https(opts)
+
+eg, `git+https://github.com/npm/hosted-git-info.git`
+
+* info.sshurl(opts)
+
+eg, `git+ssh://git@github.com/npm/hosted-git-info.git`
+
+* info.ssh(opts)
+
+eg, `git@github.com:npm/hosted-git-info.git`
+
+* info.path(opts)
+
+eg, `npm/hosted-git-info`
+
+* info.tarball(opts)
+
+eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz`
+
+* info.getDefaultRepresentation()
+
+Returns the default output type. The default output type is based on the
+string you passed in to be parsed
+
+* info.toString(opts)
+
+Uses the getDefaultRepresentation to call one of the other methods to get a URL for
+this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give
+you a normalized version of the URL that still uses the same protocol.
+
+Shortcuts will still be returned as shortcuts, but the special case github
+form of `org/project` will be normalized to `github:org/project`.
+
+SSH connect strings will be normalized into `git+ssh` URLs.
+
+## Supported hosts
+
+Currently this supports Github, Bitbucket and Gitlab. Pull requests for
+additional hosts welcome.
diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js
new file mode 100644
index 0000000..8147e33
--- /dev/null
+++ b/node_modules/hosted-git-info/git-host-info.js
@@ -0,0 +1,79 @@
+'use strict'
+
+var gitHosts = module.exports = {
+ github: {
+ // First two are insecure and generally shouldn't be used any more, but
+ // they are still supported.
+ 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'github.com',
+ 'treepath': 'tree',
+ 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}',
+ 'bugstemplate': 'https://{domain}/{user}/{project}/issues',
+ 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}',
+ 'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}'
+ },
+ bitbucket: {
+ 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'bitbucket.org',
+ 'treepath': 'src',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz'
+ },
+ gitlab: {
+ 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'gitlab.com',
+ 'treepath': 'tree',
+ 'bugstemplate': 'https://{domain}/{user}/{project}/issues',
+ 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}',
+ 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/
+ },
+ gist: {
+ 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ],
+ 'domain': 'gist.github.com',
+ 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/,
+ 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}',
+ 'bugstemplate': 'https://{domain}/{project}',
+ 'gittemplate': 'git://{domain}/{project}.git{#committish}',
+ 'sshtemplate': 'git@{domain}:/{project}.git{#committish}',
+ 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}',
+ 'browsetemplate': 'https://{domain}/{project}{/committish}',
+ 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}',
+ 'docstemplate': 'https://{domain}/{project}{/committish}',
+ 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}',
+ 'shortcuttemplate': '{type}:{project}{#committish}',
+ 'pathtemplate': '{project}{#committish}',
+ 'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}',
+ 'hashformat': function (fragment) {
+ return 'file-' + formatHashFragment(fragment)
+ }
+ }
+}
+
+var gitHostDefaults = {
+ 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}',
+ 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}',
+ 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}',
+ 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}',
+ 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme',
+ 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}',
+ 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}',
+ 'shortcuttemplate': '{type}:{user}/{project}{#committish}',
+ 'pathtemplate': '{user}/{project}{#committish}',
+ 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,
+ 'hashformat': formatHashFragment
+}
+
+Object.keys(gitHosts).forEach(function (name) {
+ Object.keys(gitHostDefaults).forEach(function (key) {
+ if (gitHosts[name][key]) return
+ gitHosts[name][key] = gitHostDefaults[key]
+ })
+ gitHosts[name].protocols_re = RegExp('^(' +
+ gitHosts[name].protocols.map(function (protocol) {
+ return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1')
+ }).join('|') + '):$')
+})
+
+function formatHashFragment (fragment) {
+ return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-')
+}
diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js
new file mode 100644
index 0000000..9616fba
--- /dev/null
+++ b/node_modules/hosted-git-info/git-host.js
@@ -0,0 +1,156 @@
+'use strict'
+var gitHosts = require('./git-host-info.js')
+/* eslint-disable node/no-deprecated-api */
+
+// copy-pasta util._extend from node's source, to avoid pulling
+// the whole util module into peoples' webpack bundles.
+/* istanbul ignore next */
+var extend = Object.assign || function _extend (target, source) {
+ // Don't do anything if source isn't an object
+ if (source === null || typeof source !== 'object') return target
+
+ var keys = Object.keys(source)
+ var i = keys.length
+ while (i--) {
+ target[keys[i]] = source[keys[i]]
+ }
+ return target
+}
+
+module.exports = GitHost
+function GitHost (type, user, auth, project, committish, defaultRepresentation, opts) {
+ var gitHostInfo = this
+ gitHostInfo.type = type
+ Object.keys(gitHosts[type]).forEach(function (key) {
+ gitHostInfo[key] = gitHosts[type][key]
+ })
+ gitHostInfo.user = user
+ gitHostInfo.auth = auth
+ gitHostInfo.project = project
+ gitHostInfo.committish = committish
+ gitHostInfo.default = defaultRepresentation
+ gitHostInfo.opts = opts || {}
+}
+
+GitHost.prototype.hash = function () {
+ return this.committish ? '#' + this.committish : ''
+}
+
+GitHost.prototype._fill = function (template, opts) {
+ if (!template) return
+ var vars = extend({}, opts)
+ vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : ''
+ opts = extend(extend({}, this.opts), opts)
+ var self = this
+ Object.keys(this).forEach(function (key) {
+ if (self[key] != null && vars[key] == null) vars[key] = self[key]
+ })
+ var rawAuth = vars.auth
+ var rawcommittish = vars.committish
+ var rawFragment = vars.fragment
+ var rawPath = vars.path
+ var rawProject = vars.project
+ Object.keys(vars).forEach(function (key) {
+ var value = vars[key]
+ if ((key === 'path' || key === 'project') && typeof value === 'string') {
+ vars[key] = value.split('/').map(function (pathComponent) {
+ return encodeURIComponent(pathComponent)
+ }).join('/')
+ } else {
+ vars[key] = encodeURIComponent(value)
+ }
+ })
+ vars['auth@'] = rawAuth ? rawAuth + '@' : ''
+ vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : ''
+ vars.fragment = vars.fragment ? vars.fragment : ''
+ vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : ''
+ vars['/path'] = vars.path ? '/' + vars.path : ''
+ vars.projectPath = rawProject.split('/').map(encodeURIComponent).join('/')
+ if (opts.noCommittish) {
+ vars['#committish'] = ''
+ vars['/tree/committish'] = ''
+ vars['/committish'] = ''
+ vars.committish = ''
+ } else {
+ vars['#committish'] = rawcommittish ? '#' + rawcommittish : ''
+ vars['/tree/committish'] = vars.committish
+ ? '/' + vars.treepath + '/' + vars.committish
+ : ''
+ vars['/committish'] = vars.committish ? '/' + vars.committish : ''
+ vars.committish = vars.committish || 'master'
+ }
+ var res = template
+ Object.keys(vars).forEach(function (key) {
+ res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key])
+ })
+ if (opts.noGitPlus) {
+ return res.replace(/^git[+]/, '')
+ } else {
+ return res
+ }
+}
+
+GitHost.prototype.ssh = function (opts) {
+ return this._fill(this.sshtemplate, opts)
+}
+
+GitHost.prototype.sshurl = function (opts) {
+ return this._fill(this.sshurltemplate, opts)
+}
+
+GitHost.prototype.browse = function (P, F, opts) {
+ if (typeof P === 'string') {
+ if (typeof F !== 'string') {
+ opts = F
+ F = null
+ }
+ return this._fill(this.browsefiletemplate, extend({
+ fragment: F,
+ path: P
+ }, opts))
+ } else {
+ return this._fill(this.browsetemplate, P)
+ }
+}
+
+GitHost.prototype.docs = function (opts) {
+ return this._fill(this.docstemplate, opts)
+}
+
+GitHost.prototype.bugs = function (opts) {
+ return this._fill(this.bugstemplate, opts)
+}
+
+GitHost.prototype.https = function (opts) {
+ return this._fill(this.httpstemplate, opts)
+}
+
+GitHost.prototype.git = function (opts) {
+ return this._fill(this.gittemplate, opts)
+}
+
+GitHost.prototype.shortcut = function (opts) {
+ return this._fill(this.shortcuttemplate, opts)
+}
+
+GitHost.prototype.path = function (opts) {
+ return this._fill(this.pathtemplate, opts)
+}
+
+GitHost.prototype.tarball = function (opts_) {
+ var opts = extend({}, opts_, { noCommittish: false })
+ return this._fill(this.tarballtemplate, opts)
+}
+
+GitHost.prototype.file = function (P, opts) {
+ return this._fill(this.filetemplate, extend({ path: P }, opts))
+}
+
+GitHost.prototype.getDefaultRepresentation = function () {
+ return this.default
+}
+
+GitHost.prototype.toString = function (opts) {
+ if (this.default && typeof this[this.default] === 'function') return this[this.default](opts)
+ return this.sshurl(opts)
+}
diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js
new file mode 100644
index 0000000..21e53fe
--- /dev/null
+++ b/node_modules/hosted-git-info/index.js
@@ -0,0 +1,148 @@
+'use strict'
+var url = require('url')
+var gitHosts = require('./git-host-info.js')
+var GitHost = module.exports = require('./git-host.js')
+
+var protocolToRepresentationMap = {
+ 'git+ssh:': 'sshurl',
+ 'git+https:': 'https',
+ 'ssh:': 'sshurl',
+ 'git:': 'git'
+}
+
+function protocolToRepresentation (protocol) {
+ return protocolToRepresentationMap[protocol] || protocol.slice(0, -1)
+}
+
+var authProtocols = {
+ 'git:': true,
+ 'https:': true,
+ 'git+https:': true,
+ 'http:': true,
+ 'git+http:': true
+}
+
+var cache = {}
+
+module.exports.fromUrl = function (giturl, opts) {
+ if (typeof giturl !== 'string') return
+ var key = giturl + JSON.stringify(opts || {})
+
+ if (!(key in cache)) {
+ cache[key] = fromUrl(giturl, opts)
+ }
+
+ return cache[key]
+}
+
+function fromUrl (giturl, opts) {
+ if (giturl == null || giturl === '') return
+ var url = fixupUnqualifiedGist(
+ isGitHubShorthand(giturl) ? 'github:' + giturl : giturl
+ )
+ var parsed = parseGitUrl(url)
+ var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)'))
+ var matches = Object.keys(gitHosts).map(function (gitHostName) {
+ try {
+ var gitHostInfo = gitHosts[gitHostName]
+ var auth = null
+ if (parsed.auth && authProtocols[parsed.protocol]) {
+ auth = parsed.auth
+ }
+ var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
+ var user = null
+ var project = null
+ var defaultRepresentation = null
+ if (shortcutMatch && shortcutMatch[1] === gitHostName) {
+ user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2])
+ project = decodeURIComponent(shortcutMatch[3])
+ defaultRepresentation = 'shortcut'
+ } else {
+ if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return
+ if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
+ if (!parsed.path) return
+ var pathmatch = gitHostInfo.pathmatch
+ var matched = parsed.path.match(pathmatch)
+ if (!matched) return
+ /* istanbul ignore else */
+ if (matched[1] !== null && matched[1] !== undefined) {
+ user = decodeURIComponent(matched[1].replace(/^:/, ''))
+ }
+ project = decodeURIComponent(matched[2])
+ defaultRepresentation = protocolToRepresentation(parsed.protocol)
+ }
+ return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts)
+ } catch (ex) {
+ /* istanbul ignore else */
+ if (ex instanceof URIError) {
+ } else throw ex
+ }
+ }).filter(function (gitHostInfo) { return gitHostInfo })
+ if (matches.length !== 1) return
+ return matches[0]
+}
+
+function isGitHubShorthand (arg) {
+ // Note: This does not fully test the git ref format.
+ // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
+ //
+ // The only way to do this properly would be to shell out to
+ // git-check-ref-format, and as this is a fast sync function,
+ // we don't want to do that. Just let git fail if it turns
+ // out that the commit-ish is invalid.
+ // GH usernames cannot start with . or -
+ return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg)
+}
+
+function fixupUnqualifiedGist (giturl) {
+ // necessary for round-tripping gists
+ var parsed = url.parse(giturl)
+ if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) {
+ return parsed.protocol + '/' + parsed.host
+ } else {
+ return giturl
+ }
+}
+
+function parseGitUrl (giturl) {
+ var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
+ if (!matched) {
+ var legacy = url.parse(giturl)
+ // If we don't have url.URL, then sorry, this is just not fixable.
+ // This affects Node <= 6.12.
+ if (legacy.auth && typeof url.URL === 'function') {
+ // git urls can be in the form of scp-style/ssh-connect strings, like
+ // git+ssh://user@host.com:some/path, which the legacy url parser
+ // supports, but WhatWG url.URL class does not. However, the legacy
+ // parser de-urlencodes the username and password, so something like
+ // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes
+ // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong.
+ // Pull off just the auth and host, so we dont' get the confusing
+ // scp-style URL, then pass that to the WhatWG parser to get the
+ // auth properly escaped.
+ var authmatch = giturl.match(/[^@]+@[^:/]+/)
+ /* istanbul ignore else - this should be impossible */
+ if (authmatch) {
+ var whatwg = new url.URL(authmatch[0])
+ legacy.auth = whatwg.username || ''
+ if (whatwg.password) legacy.auth += ':' + whatwg.password
+ }
+ }
+ return legacy
+ }
+ return {
+ protocol: 'git+ssh:',
+ slashes: true,
+ auth: matched[1],
+ host: matched[2],
+ port: null,
+ hostname: matched[2],
+ hash: matched[4],
+ search: null,
+ query: null,
+ pathname: '/' + matched[3],
+ path: '/' + matched[3],
+ href: 'git+ssh://' + matched[1] + '@' + matched[2] +
+ '/' + matched[3] + (matched[4] || '')
+ }
+}
diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json
new file mode 100644
index 0000000..e47c096
--- /dev/null
+++ b/node_modules/hosted-git-info/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "hosted-git-info",
+ "version": "2.8.8",
+ "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/hosted-git-info.git"
+ },
+ "keywords": [
+ "git",
+ "github",
+ "bitbucket",
+ "gitlab"
+ ],
+ "author": "Rebecca Turner <me@re-becca.org> (http://re-becca.org)",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/npm/hosted-git-info/issues"
+ },
+ "homepage": "https://github.com/npm/hosted-git-info",
+ "scripts": {
+ "prerelease": "npm t",
+ "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags",
+ "posttest": "standard",
+ "release": "standard-version -s",
+ "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js",
+ "test": "tap -J --coverage=90 --no-esm test/*.js"
+ },
+ "devDependencies": {
+ "standard": "^11.0.1",
+ "standard-version": "^4.4.0",
+ "tap": "^12.7.0"
+ },
+ "files": [
+ "index.js",
+ "git-host.js",
+ "git-host-info.js"
+ ]
+}
diff --git a/node_modules/http-cache-semantics/LICENSE b/node_modules/http-cache-semantics/LICENSE
new file mode 100644
index 0000000..493d2ea
--- /dev/null
+++ b/node_modules/http-cache-semantics/LICENSE
@@ -0,0 +1,9 @@
+Copyright 2016-2018 Kornel Lesiński
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/http-cache-semantics/README.md b/node_modules/http-cache-semantics/README.md
new file mode 100644
index 0000000..685aa55
--- /dev/null
+++ b/node_modules/http-cache-semantics/README.md
@@ -0,0 +1,203 @@
+# Can I cache this? [![Build Status](https://travis-ci.org/kornelski/http-cache-semantics.svg?branch=master)](https://travis-ci.org/kornelski/http-cache-semantics)
+
+`CachePolicy` tells when responses can be reused from a cache, taking into account [HTTP RFC 7234](http://httpwg.org/specs/rfc7234.html) rules for user agents and shared caches.
+It also implements [RFC 5861](https://tools.ietf.org/html/rfc5861), implementing `stale-if-error` and `stale-while-revalidate`.
+It's aware of many tricky details such as the `Vary` header, proxy revalidation, and authenticated responses.
+
+## Usage
+
+Cacheability of an HTTP response depends on how it was requested, so both `request` and `response` are required to create the policy.
+
+```js
+const policy = new CachePolicy(request, response, options);
+
+if (!policy.storable()) {
+ // throw the response away, it's not usable at all
+ return;
+}
+
+// Cache the data AND the policy object in your cache
+// (this is pseudocode, roll your own cache (lru-cache package works))
+letsPretendThisIsSomeCache.set(
+ request.url,
+ { policy, response },
+ policy.timeToLive()
+);
+```
+
+```js
+// And later, when you receive a new request:
+const { policy, response } = letsPretendThisIsSomeCache.get(newRequest.url);
+
+// It's not enough that it exists in the cache, it has to match the new request, too:
+if (policy && policy.satisfiesWithoutRevalidation(newRequest)) {
+ // OK, the previous response can be used to respond to the `newRequest`.
+ // Response headers have to be updated, e.g. to add Age and remove uncacheable headers.
+ response.headers = policy.responseHeaders();
+ return response;
+}
+```
+
+It may be surprising, but it's not enough for an HTTP response to be [fresh](#yo-fresh) to satisfy a request. It may need to match request headers specified in `Vary`. Even a matching fresh response may still not be usable if the new request restricted cacheability, etc.
+
+The key method is `satisfiesWithoutRevalidation(newRequest)`, which checks whether the `newRequest` is compatible with the original request and whether all caching conditions are met.
+
+### Constructor options
+
+Request and response must have a `headers` property with all header names in lower case. `url`, `status` and `method` are optional (defaults are any URL, status `200`, and `GET` method).
+
+```js
+const request = {
+ url: '/',
+ method: 'GET',
+ headers: {
+ accept: '*/*',
+ },
+};
+
+const response = {
+ status: 200,
+ headers: {
+ 'cache-control': 'public, max-age=7234',
+ },
+};
+
+const options = {
+ shared: true,
+ cacheHeuristic: 0.1,
+ immutableMinTimeToLive: 24 * 3600 * 1000, // 24h
+ ignoreCargoCult: false,
+};
+```
+
+If `options.shared` is `true` (default), then the response is evaluated from a perspective of a shared cache (i.e. `private` is not cacheable and `s-maxage` is respected). If `options.shared` is `false`, then the response is evaluated from a perspective of a single-user cache (i.e. `private` is cacheable and `s-maxage` is ignored). `shared: true` is recommended for HTTP clients.
+
+`options.cacheHeuristic` is a fraction of response's age that is used as a fallback cache duration. The default is 0.1 (10%), e.g. if a file hasn't been modified for 100 days, it'll be cached for 100\*0.1 = 10 days.
+
+`options.immutableMinTimeToLive` is a number of milliseconds to assume as the default time to cache responses with `Cache-Control: immutable`. Note that [per RFC](http://httpwg.org/http-extensions/immutable.html) these can become stale, so `max-age` still overrides the default.
+
+If `options.ignoreCargoCult` is true, common anti-cache directives will be completely ignored if the non-standard `pre-check` and `post-check` directives are present. These two useless directives are most commonly found in bad StackOverflow answers and PHP's "session limiter" defaults.
+
+### `storable()`
+
+Returns `true` if the response can be stored in a cache. If it's `false` then you MUST NOT store either the request or the response.
+
+### `satisfiesWithoutRevalidation(newRequest)`
+
+This is the most important method. Use this method to check whether the cached response is still fresh in the context of the new request.
+
+If it returns `true`, then the given `request` matches the original response this cache policy has been created with, and the response can be reused without contacting the server. Note that the old response can't be returned without being updated, see `responseHeaders()`.
+
+If it returns `false`, then the response may not be matching at all (e.g. it's for a different URL or method), or may require to be refreshed first (see `revalidationHeaders()`).
+
+### `responseHeaders()`
+
+Returns updated, filtered set of response headers to return to clients receiving the cached response. This function is necessary, because proxies MUST always remove hop-by-hop headers (such as `TE` and `Connection`) and update response's `Age` to avoid doubling cache time.
+
+```js
+cachedResponse.headers = cachePolicy.responseHeaders(cachedResponse);
+```
+
+### `timeToLive()`
+
+Returns approximate time in _milliseconds_ until the response becomes stale (i.e. not fresh).
+
+After that time (when `timeToLive() <= 0`) the response might not be usable without revalidation. However, there are exceptions, e.g. a client can explicitly allow stale responses, so always check with `satisfiesWithoutRevalidation()`.
+`stale-if-error` and `stale-while-revalidate` extend the time to live of the cache, that can still be used if stale.
+
+### `toObject()`/`fromObject(json)`
+
+Chances are you'll want to store the `CachePolicy` object along with the cached response. `obj = policy.toObject()` gives a plain JSON-serializable object. `policy = CachePolicy.fromObject(obj)` creates an instance from it.
+
+### Refreshing stale cache (revalidation)
+
+When a cached response has expired, it can be made fresh again by making a request to the origin server. The server may respond with status 304 (Not Modified) without sending the response body again, saving bandwidth.
+
+The following methods help perform the update efficiently and correctly.
+
+#### `revalidationHeaders(newRequest)`
+
+Returns updated, filtered set of request headers to send to the origin server to check if the cached response can be reused. These headers allow the origin server to return status 304 indicating the response is still fresh. All headers unrelated to caching are passed through as-is.
+
+Use this method when updating cache from the origin server.
+
+```js
+updateRequest.headers = cachePolicy.revalidationHeaders(updateRequest);
+```
+
+#### `revalidatedPolicy(revalidationRequest, revalidationResponse)`
+
+Use this method to update the cache after receiving a new response from the origin server. It returns an object with two keys:
+
+- `policy` — A new `CachePolicy` with HTTP headers updated from `revalidationResponse`. You can always replace the old cached `CachePolicy` with the new one.
+- `modified` — Boolean indicating whether the response body has changed.
+ - If `false`, then a valid 304 Not Modified response has been received, and you can reuse the old cached response body. This is also affected by `stale-if-error`.
+ - If `true`, you should use new response's body (if present), or make another request to the origin server without any conditional headers (i.e. don't use `revalidationHeaders()` this time) to get the new resource.
+
+```js
+// When serving requests from cache:
+const { oldPolicy, oldResponse } = letsPretendThisIsSomeCache.get(
+ newRequest.url
+);
+
+if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) {
+ // Change the request to ask the origin server if the cached response can be used
+ newRequest.headers = oldPolicy.revalidationHeaders(newRequest);
+
+ // Send request to the origin server. The server may respond with status 304
+ const newResponse = await makeRequest(newRequest);
+
+ // Create updated policy and combined response from the old and new data
+ const { policy, modified } = oldPolicy.revalidatedPolicy(
+ newRequest,
+ newResponse
+ );
+ const response = modified ? newResponse : oldResponse;
+
+ // Update the cache with the newer/fresher response
+ letsPretendThisIsSomeCache.set(
+ newRequest.url,
+ { policy, response },
+ policy.timeToLive()
+ );
+
+ // And proceed returning cached response as usual
+ response.headers = policy.responseHeaders();
+ return response;
+}
+```
+
+# Yo, FRESH
+
+![satisfiesWithoutRevalidation](fresh.jpg)
+
+## Used by
+
+- [ImageOptim API](https://imageoptim.com/api), [make-fetch-happen](https://github.com/zkat/make-fetch-happen), [cacheable-request](https://www.npmjs.com/package/cacheable-request) ([got](https://www.npmjs.com/package/got)), [npm/registry-fetch](https://github.com/npm/registry-fetch), [etc.](https://github.com/kornelski/http-cache-semantics/network/dependents)
+
+## Implemented
+
+- `Cache-Control` response header with all the quirks.
+- `Expires` with check for bad clocks.
+- `Pragma` response header.
+- `Age` response header.
+- `Vary` response header.
+- Default cacheability of statuses and methods.
+- Requests for stale data.
+- Filtering of hop-by-hop headers.
+- Basic revalidation request
+- `stale-if-error`
+
+## Unimplemented
+
+- Merging of range requests, `If-Range` (but correctly supports them as non-cacheable)
+- Revalidation of multiple representations
+
+### Trusting server `Date`
+
+Per the RFC, the cache should take into account the time between server-supplied `Date` and the time it received the response. The RFC-mandated behavior creates two problems:
+
+ * Servers with incorrectly set timezone may add several hours to cache age (or more, if the clock is completely wrong).
+ * Even reasonably correct clocks may be off by a couple of seconds, breaking `max-age=1` trick (which is useful for reverse proxies on high-traffic servers).
+
+Previous versions of this library had an option to ignore the server date if it was "too inaccurate". To support the `max-age=1` trick the library also has to ignore dates that pretty accurate. There's no point of having an option to trust dates that are only a bit inaccurate, so this library won't trust any server dates. `max-age` will be interpreted from the time the response has been received, not from when it has been sent. This will affect only [RFC 1149 networks](https://tools.ietf.org/html/rfc1149).
diff --git a/node_modules/http-cache-semantics/index.js b/node_modules/http-cache-semantics/index.js
new file mode 100644
index 0000000..4f6c2f3
--- /dev/null
+++ b/node_modules/http-cache-semantics/index.js
@@ -0,0 +1,673 @@
+'use strict';
+// rfc7231 6.1
+const statusCodeCacheableByDefault = new Set([
+ 200,
+ 203,
+ 204,
+ 206,
+ 300,
+ 301,
+ 404,
+ 405,
+ 410,
+ 414,
+ 501,
+]);
+
+// This implementation does not understand partial responses (206)
+const understoodStatuses = new Set([
+ 200,
+ 203,
+ 204,
+ 300,
+ 301,
+ 302,
+ 303,
+ 307,
+ 308,
+ 404,
+ 405,
+ 410,
+ 414,
+ 501,
+]);
+
+const errorStatusCodes = new Set([
+ 500,
+ 502,
+ 503,
+ 504,
+]);
+
+const hopByHopHeaders = {
+ date: true, // included, because we add Age update Date
+ connection: true,
+ 'keep-alive': true,
+ 'proxy-authenticate': true,
+ 'proxy-authorization': true,
+ te: true,
+ trailer: true,
+ 'transfer-encoding': true,
+ upgrade: true,
+};
+
+const excludedFromRevalidationUpdate = {
+ // Since the old body is reused, it doesn't make sense to change properties of the body
+ 'content-length': true,
+ 'content-encoding': true,
+ 'transfer-encoding': true,
+ 'content-range': true,
+};
+
+function toNumberOrZero(s) {
+ const n = parseInt(s, 10);
+ return isFinite(n) ? n : 0;
+}
+
+// RFC 5861
+function isErrorResponse(response) {
+ // consider undefined response as faulty
+ if(!response) {
+ return true
+ }
+ return errorStatusCodes.has(response.status);
+}
+
+function parseCacheControl(header) {
+ const cc = {};
+ if (!header) return cc;
+
+ // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives),
+ // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale
+ const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing
+ for (const part of parts) {
+ const [k, v] = part.split(/\s*=\s*/, 2);
+ cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting
+ }
+
+ return cc;
+}
+
+function formatCacheControl(cc) {
+ let parts = [];
+ for (const k in cc) {
+ const v = cc[k];
+ parts.push(v === true ? k : k + '=' + v);
+ }
+ if (!parts.length) {
+ return undefined;
+ }
+ return parts.join(', ');
+}
+
+module.exports = class CachePolicy {
+ constructor(
+ req,
+ res,
+ {
+ shared,
+ cacheHeuristic,
+ immutableMinTimeToLive,
+ ignoreCargoCult,
+ _fromObject,
+ } = {}
+ ) {
+ if (_fromObject) {
+ this._fromObject(_fromObject);
+ return;
+ }
+
+ if (!res || !res.headers) {
+ throw Error('Response headers missing');
+ }
+ this._assertRequestHasHeaders(req);
+
+ this._responseTime = this.now();
+ this._isShared = shared !== false;
+ this._cacheHeuristic =
+ undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE
+ this._immutableMinTtl =
+ undefined !== immutableMinTimeToLive
+ ? immutableMinTimeToLive
+ : 24 * 3600 * 1000;
+
+ this._status = 'status' in res ? res.status : 200;
+ this._resHeaders = res.headers;
+ this._rescc = parseCacheControl(res.headers['cache-control']);
+ this._method = 'method' in req ? req.method : 'GET';
+ this._url = req.url;
+ this._host = req.headers.host;
+ this._noAuthorization = !req.headers.authorization;
+ this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used
+ this._reqcc = parseCacheControl(req.headers['cache-control']);
+
+ // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching,
+ // so there's no point stricly adhering to the blindly copy&pasted directives.
+ if (
+ ignoreCargoCult &&
+ 'pre-check' in this._rescc &&
+ 'post-check' in this._rescc
+ ) {
+ delete this._rescc['pre-check'];
+ delete this._rescc['post-check'];
+ delete this._rescc['no-cache'];
+ delete this._rescc['no-store'];
+ delete this._rescc['must-revalidate'];
+ this._resHeaders = Object.assign({}, this._resHeaders, {
+ 'cache-control': formatCacheControl(this._rescc),
+ });
+ delete this._resHeaders.expires;
+ delete this._resHeaders.pragma;
+ }
+
+ // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive
+ // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1).
+ if (
+ res.headers['cache-control'] == null &&
+ /no-cache/.test(res.headers.pragma)
+ ) {
+ this._rescc['no-cache'] = true;
+ }
+ }
+
+ now() {
+ return Date.now();
+ }
+
+ storable() {
+ // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it.
+ return !!(
+ !this._reqcc['no-store'] &&
+ // A cache MUST NOT store a response to any request, unless:
+ // The request method is understood by the cache and defined as being cacheable, and
+ ('GET' === this._method ||
+ 'HEAD' === this._method ||
+ ('POST' === this._method && this._hasExplicitExpiration())) &&
+ // the response status code is understood by the cache, and
+ understoodStatuses.has(this._status) &&
+ // the "no-store" cache directive does not appear in request or response header fields, and
+ !this._rescc['no-store'] &&
+ // the "private" response directive does not appear in the response, if the cache is shared, and
+ (!this._isShared || !this._rescc.private) &&
+ // the Authorization header field does not appear in the request, if the cache is shared,
+ (!this._isShared ||
+ this._noAuthorization ||
+ this._allowsStoringAuthenticated()) &&
+ // the response either:
+ // contains an Expires header field, or
+ (this._resHeaders.expires ||
+ // contains a max-age response directive, or
+ // contains a s-maxage response directive and the cache is shared, or
+ // contains a public response directive.
+ this._rescc['max-age'] ||
+ (this._isShared && this._rescc['s-maxage']) ||
+ this._rescc.public ||
+ // has a status code that is defined as cacheable by default
+ statusCodeCacheableByDefault.has(this._status))
+ );
+ }
+
+ _hasExplicitExpiration() {
+ // 4.2.1 Calculating Freshness Lifetime
+ return (
+ (this._isShared && this._rescc['s-maxage']) ||
+ this._rescc['max-age'] ||
+ this._resHeaders.expires
+ );
+ }
+
+ _assertRequestHasHeaders(req) {
+ if (!req || !req.headers) {
+ throw Error('Request headers missing');
+ }
+ }
+
+ satisfiesWithoutRevalidation(req) {
+ this._assertRequestHasHeaders(req);
+
+ // When presented with a request, a cache MUST NOT reuse a stored response, unless:
+ // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive,
+ // unless the stored response is successfully validated (Section 4.3), and
+ const requestCC = parseCacheControl(req.headers['cache-control']);
+ if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) {
+ return false;
+ }
+
+ if (requestCC['max-age'] && this.age() > requestCC['max-age']) {
+ return false;
+ }
+
+ if (
+ requestCC['min-fresh'] &&
+ this.timeToLive() < 1000 * requestCC['min-fresh']
+ ) {
+ return false;
+ }
+
+ // the stored response is either:
+ // fresh, or allowed to be served stale
+ if (this.stale()) {
+ const allowsStale =
+ requestCC['max-stale'] &&
+ !this._rescc['must-revalidate'] &&
+ (true === requestCC['max-stale'] ||
+ requestCC['max-stale'] > this.age() - this.maxAge());
+ if (!allowsStale) {
+ return false;
+ }
+ }
+
+ return this._requestMatches(req, false);
+ }
+
+ _requestMatches(req, allowHeadMethod) {
+ // The presented effective request URI and that of the stored response match, and
+ return (
+ (!this._url || this._url === req.url) &&
+ this._host === req.headers.host &&
+ // the request method associated with the stored response allows it to be used for the presented request, and
+ (!req.method ||
+ this._method === req.method ||
+ (allowHeadMethod && 'HEAD' === req.method)) &&
+ // selecting header fields nominated by the stored response (if any) match those presented, and
+ this._varyMatches(req)
+ );
+ }
+
+ _allowsStoringAuthenticated() {
+ // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage.
+ return (
+ this._rescc['must-revalidate'] ||
+ this._rescc.public ||
+ this._rescc['s-maxage']
+ );
+ }
+
+ _varyMatches(req) {
+ if (!this._resHeaders.vary) {
+ return true;
+ }
+
+ // A Vary header field-value of "*" always fails to match
+ if (this._resHeaders.vary === '*') {
+ return false;
+ }
+
+ const fields = this._resHeaders.vary
+ .trim()
+ .toLowerCase()
+ .split(/\s*,\s*/);
+ for (const name of fields) {
+ if (req.headers[name] !== this._reqHeaders[name]) return false;
+ }
+ return true;
+ }
+
+ _copyWithoutHopByHopHeaders(inHeaders) {
+ const headers = {};
+ for (const name in inHeaders) {
+ if (hopByHopHeaders[name]) continue;
+ headers[name] = inHeaders[name];
+ }
+ // 9.1. Connection
+ if (inHeaders.connection) {
+ const tokens = inHeaders.connection.trim().split(/\s*,\s*/);
+ for (const name of tokens) {
+ delete headers[name];
+ }
+ }
+ if (headers.warning) {
+ const warnings = headers.warning.split(/,/).filter(warning => {
+ return !/^\s*1[0-9][0-9]/.test(warning);
+ });
+ if (!warnings.length) {
+ delete headers.warning;
+ } else {
+ headers.warning = warnings.join(',').trim();
+ }
+ }
+ return headers;
+ }
+
+ responseHeaders() {
+ const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
+ const age = this.age();
+
+ // A cache SHOULD generate 113 warning if it heuristically chose a freshness
+ // lifetime greater than 24 hours and the response's age is greater than 24 hours.
+ if (
+ age > 3600 * 24 &&
+ !this._hasExplicitExpiration() &&
+ this.maxAge() > 3600 * 24
+ ) {
+ headers.warning =
+ (headers.warning ? `${headers.warning}, ` : '') +
+ '113 - "rfc7234 5.5.4"';
+ }
+ headers.age = `${Math.round(age)}`;
+ headers.date = new Date(this.now()).toUTCString();
+ return headers;
+ }
+
+ /**
+ * Value of the Date response header or current time if Date was invalid
+ * @return timestamp
+ */
+ date() {
+ const serverDate = Date.parse(this._resHeaders.date);
+ if (isFinite(serverDate)) {
+ return serverDate;
+ }
+ return this._responseTime;
+ }
+
+ /**
+ * Value of the Age header, in seconds, updated for the current time.
+ * May be fractional.
+ *
+ * @return Number
+ */
+ age() {
+ let age = this._ageValue();
+
+ const residentTime = (this.now() - this._responseTime) / 1000;
+ return age + residentTime;
+ }
+
+ _ageValue() {
+ return toNumberOrZero(this._resHeaders.age);
+ }
+
+ /**
+ * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
+ *
+ * For an up-to-date value, see `timeToLive()`.
+ *
+ * @return Number
+ */
+ maxAge() {
+ if (!this.storable() || this._rescc['no-cache']) {
+ return 0;
+ }
+
+ // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default
+ // so this implementation requires explicit opt-in via public header
+ if (
+ this._isShared &&
+ (this._resHeaders['set-cookie'] &&
+ !this._rescc.public &&
+ !this._rescc.immutable)
+ ) {
+ return 0;
+ }
+
+ if (this._resHeaders.vary === '*') {
+ return 0;
+ }
+
+ if (this._isShared) {
+ if (this._rescc['proxy-revalidate']) {
+ return 0;
+ }
+ // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.
+ if (this._rescc['s-maxage']) {
+ return toNumberOrZero(this._rescc['s-maxage']);
+ }
+ }
+
+ // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.
+ if (this._rescc['max-age']) {
+ return toNumberOrZero(this._rescc['max-age']);
+ }
+
+ const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;
+
+ const serverDate = this.date();
+ if (this._resHeaders.expires) {
+ const expires = Date.parse(this._resHeaders.expires);
+ // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired").
+ if (Number.isNaN(expires) || expires < serverDate) {
+ return 0;
+ }
+ return Math.max(defaultMinTtl, (expires - serverDate) / 1000);
+ }
+
+ if (this._resHeaders['last-modified']) {
+ const lastModified = Date.parse(this._resHeaders['last-modified']);
+ if (isFinite(lastModified) && serverDate > lastModified) {
+ return Math.max(
+ defaultMinTtl,
+ ((serverDate - lastModified) / 1000) * this._cacheHeuristic
+ );
+ }
+ }
+
+ return defaultMinTtl;
+ }
+
+ timeToLive() {
+ const age = this.maxAge() - this.age();
+ const staleIfErrorAge = age + toNumberOrZero(this._rescc['stale-if-error']);
+ const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc['stale-while-revalidate']);
+ return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1000;
+ }
+
+ stale() {
+ return this.maxAge() <= this.age();
+ }
+
+ _useStaleIfError() {
+ return this.maxAge() + toNumberOrZero(this._rescc['stale-if-error']) > this.age();
+ }
+
+ useStaleWhileRevalidate() {
+ return this.maxAge() + toNumberOrZero(this._rescc['stale-while-revalidate']) > this.age();
+ }
+
+ static fromObject(obj) {
+ return new this(undefined, undefined, { _fromObject: obj });
+ }
+
+ _fromObject(obj) {
+ if (this._responseTime) throw Error('Reinitialized');
+ if (!obj || obj.v !== 1) throw Error('Invalid serialization');
+
+ this._responseTime = obj.t;
+ this._isShared = obj.sh;
+ this._cacheHeuristic = obj.ch;
+ this._immutableMinTtl =
+ obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000;
+ this._status = obj.st;
+ this._resHeaders = obj.resh;
+ this._rescc = obj.rescc;
+ this._method = obj.m;
+ this._url = obj.u;
+ this._host = obj.h;
+ this._noAuthorization = obj.a;
+ this._reqHeaders = obj.reqh;
+ this._reqcc = obj.reqcc;
+ }
+
+ toObject() {
+ return {
+ v: 1,
+ t: this._responseTime,
+ sh: this._isShared,
+ ch: this._cacheHeuristic,
+ imm: this._immutableMinTtl,
+ st: this._status,
+ resh: this._resHeaders,
+ rescc: this._rescc,
+ m: this._method,
+ u: this._url,
+ h: this._host,
+ a: this._noAuthorization,
+ reqh: this._reqHeaders,
+ reqcc: this._reqcc,
+ };
+ }
+
+ /**
+ * Headers for sending to the origin server to revalidate stale response.
+ * Allows server to return 304 to allow reuse of the previous response.
+ *
+ * Hop by hop headers are always stripped.
+ * Revalidation headers may be added or removed, depending on request.
+ */
+ revalidationHeaders(incomingReq) {
+ this._assertRequestHasHeaders(incomingReq);
+ const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
+
+ // This implementation does not understand range requests
+ delete headers['if-range'];
+
+ if (!this._requestMatches(incomingReq, true) || !this.storable()) {
+ // revalidation allowed via HEAD
+ // not for the same resource, or wasn't allowed to be cached anyway
+ delete headers['if-none-match'];
+ delete headers['if-modified-since'];
+ return headers;
+ }
+
+ /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */
+ if (this._resHeaders.etag) {
+ headers['if-none-match'] = headers['if-none-match']
+ ? `${headers['if-none-match']}, ${this._resHeaders.etag}`
+ : this._resHeaders.etag;
+ }
+
+ // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request.
+ const forbidsWeakValidators =
+ headers['accept-ranges'] ||
+ headers['if-match'] ||
+ headers['if-unmodified-since'] ||
+ (this._method && this._method != 'GET');
+
+ /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server.
+ Note: This implementation does not understand partial responses (206) */
+ if (forbidsWeakValidators) {
+ delete headers['if-modified-since'];
+
+ if (headers['if-none-match']) {
+ const etags = headers['if-none-match']
+ .split(/,/)
+ .filter(etag => {
+ return !/^\s*W\//.test(etag);
+ });
+ if (!etags.length) {
+ delete headers['if-none-match'];
+ } else {
+ headers['if-none-match'] = etags.join(',').trim();
+ }
+ }
+ } else if (
+ this._resHeaders['last-modified'] &&
+ !headers['if-modified-since']
+ ) {
+ headers['if-modified-since'] = this._resHeaders['last-modified'];
+ }
+
+ return headers;
+ }
+
+ /**
+ * Creates new CachePolicy with information combined from the previews response,
+ * and the new revalidation response.
+ *
+ * Returns {policy, modified} where modified is a boolean indicating
+ * whether the response body has been modified, and old cached body can't be used.
+ *
+ * @return {Object} {policy: CachePolicy, modified: Boolean}
+ */
+ revalidatedPolicy(request, response) {
+ this._assertRequestHasHeaders(request);
+ if(this._useStaleIfError() && isErrorResponse(response)) { // I consider the revalidation request unsuccessful
+ return {
+ modified: false,
+ matches: false,
+ policy: this,
+ };
+ }
+ if (!response || !response.headers) {
+ throw Error('Response headers missing');
+ }
+
+ // These aren't going to be supported exactly, since one CachePolicy object
+ // doesn't know about all the other cached objects.
+ let matches = false;
+ if (response.status !== undefined && response.status != 304) {
+ matches = false;
+ } else if (
+ response.headers.etag &&
+ !/^\s*W\//.test(response.headers.etag)
+ ) {
+ // "All of the stored responses with the same strong validator are selected.
+ // If none of the stored responses contain the same strong validator,
+ // then the cache MUST NOT use the new response to update any stored responses."
+ matches =
+ this._resHeaders.etag &&
+ this._resHeaders.etag.replace(/^\s*W\//, '') ===
+ response.headers.etag;
+ } else if (this._resHeaders.etag && response.headers.etag) {
+ // "If the new response contains a weak validator and that validator corresponds
+ // to one of the cache's stored responses,
+ // then the most recent of those matching stored responses is selected for update."
+ matches =
+ this._resHeaders.etag.replace(/^\s*W\//, '') ===
+ response.headers.etag.replace(/^\s*W\//, '');
+ } else if (this._resHeaders['last-modified']) {
+ matches =
+ this._resHeaders['last-modified'] ===
+ response.headers['last-modified'];
+ } else {
+ // If the new response does not include any form of validator (such as in the case where
+ // a client generates an If-Modified-Since request from a source other than the Last-Modified
+ // response header field), and there is only one stored response, and that stored response also
+ // lacks a validator, then that stored response is selected for update.
+ if (
+ !this._resHeaders.etag &&
+ !this._resHeaders['last-modified'] &&
+ !response.headers.etag &&
+ !response.headers['last-modified']
+ ) {
+ matches = true;
+ }
+ }
+
+ if (!matches) {
+ return {
+ policy: new this.constructor(request, response),
+ // Client receiving 304 without body, even if it's invalid/mismatched has no option
+ // but to reuse a cached body. We don't have a good way to tell clients to do
+ // error recovery in such case.
+ modified: response.status != 304,
+ matches: false,
+ };
+ }
+
+ // use other header fields provided in the 304 (Not Modified) response to replace all instances
+ // of the corresponding header fields in the stored response.
+ const headers = {};
+ for (const k in this._resHeaders) {
+ headers[k] =
+ k in response.headers && !excludedFromRevalidationUpdate[k]
+ ? response.headers[k]
+ : this._resHeaders[k];
+ }
+
+ const newResponse = Object.assign({}, response, {
+ status: this._status,
+ method: this._method,
+ headers,
+ });
+ return {
+ policy: new this.constructor(request, newResponse, {
+ shared: this._isShared,
+ cacheHeuristic: this._cacheHeuristic,
+ immutableMinTimeToLive: this._immutableMinTtl,
+ }),
+ modified: false,
+ matches: true,
+ };
+ }
+};
diff --git a/node_modules/http-cache-semantics/package.json b/node_modules/http-cache-semantics/package.json
new file mode 100644
index 0000000..897798d
--- /dev/null
+++ b/node_modules/http-cache-semantics/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "http-cache-semantics",
+ "version": "4.1.0",
+ "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies",
+ "repository": "https://github.com/kornelski/http-cache-semantics.git",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "author": "Kornel Lesiński <kornel@geekhood.net> (https://kornel.ski/)",
+ "license": "BSD-2-Clause",
+ "devDependencies": {
+ "eslint": "^5.13.0",
+ "eslint-plugin-prettier": "^3.0.1",
+ "husky": "^0.14.3",
+ "lint-staged": "^8.1.3",
+ "mocha": "^5.1.0",
+ "prettier": "^1.14.3",
+ "prettier-eslint-cli": "^4.7.1"
+ }
+}
diff --git a/node_modules/http-signature/.dir-locals.el b/node_modules/http-signature/.dir-locals.el
new file mode 100644
index 0000000..3bc9235
--- /dev/null
+++ b/node_modules/http-signature/.dir-locals.el
@@ -0,0 +1,6 @@
+((nil . ((indent-tabs-mode . nil)
+ (tab-width . 8)
+ (fill-column . 80)))
+ (js-mode . ((js-indent-level . 2)
+ (indent-tabs-mode . nil)
+ ))) \ No newline at end of file
diff --git a/node_modules/http-signature/.npmignore b/node_modules/http-signature/.npmignore
new file mode 100644
index 0000000..c143fb3
--- /dev/null
+++ b/node_modules/http-signature/.npmignore
@@ -0,0 +1,7 @@
+.gitmodules
+deps
+docs
+Makefile
+node_modules
+test
+tools \ No newline at end of file
diff --git a/node_modules/http-signature/CHANGES.md b/node_modules/http-signature/CHANGES.md
new file mode 100644
index 0000000..6f69444
--- /dev/null
+++ b/node_modules/http-signature/CHANGES.md
@@ -0,0 +1,46 @@
+# node-http-signature changelog
+
+## 1.1.1
+
+- Version of dependency `assert-plus` updated: old version was missing
+ some license information
+- Corrected examples in `http_signing.md`, added auto-tests to
+ automatically validate these examples
+
+## 1.1.0
+
+- Bump version of `sshpk` dependency, remove peerDependency on it since
+ it now supports exchanging objects between multiple versions of itself
+ where possible
+
+## 1.0.2
+
+- Bump min version of `jsprim` dependency, to include fixes for using
+ http-signature with `browserify`
+
+## 1.0.1
+
+- Bump minimum version of `sshpk` dependency, to include fixes for
+ whitespace tolerance in key parsing.
+
+## 1.0.0
+
+- First semver release.
+- #36: Ensure verifySignature does not leak useful timing information
+- #42: Bring the library up to the latest version of the spec (including the
+ request-target changes)
+- Support for ECDSA keys and signatures.
+- Now uses `sshpk` for key parsing, validation and conversion.
+- Fixes for #21, #47, #39 and compatibility with node 0.8
+
+## 0.11.0
+
+- Split up HMAC and Signature verification to avoid vulnerabilities where a
+ key intended for use with one can be validated against the other method
+ instead.
+
+## 0.10.2
+
+- Updated versions of most dependencies.
+- Utility functions exported for PEM => SSH-RSA conversion.
+- Improvements to tests and examples.
diff --git a/node_modules/http-signature/LICENSE b/node_modules/http-signature/LICENSE
new file mode 100644
index 0000000..f6d947d
--- /dev/null
+++ b/node_modules/http-signature/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/node_modules/http-signature/README.md b/node_modules/http-signature/README.md
new file mode 100644
index 0000000..de487d3
--- /dev/null
+++ b/node_modules/http-signature/README.md
@@ -0,0 +1,79 @@
+# node-http-signature
+
+node-http-signature is a node.js library that has client and server components
+for Joyent's [HTTP Signature Scheme](http_signing.md).
+
+## Usage
+
+Note the example below signs a request with the same key/cert used to start an
+HTTP server. This is almost certainly not what you actually want, but is just
+used to illustrate the API calls; you will need to provide your own key
+management in addition to this library.
+
+### Client
+
+```js
+var fs = require('fs');
+var https = require('https');
+var httpSignature = require('http-signature');
+
+var key = fs.readFileSync('./key.pem', 'ascii');
+
+var options = {
+ host: 'localhost',
+ port: 8443,
+ path: '/',
+ method: 'GET',
+ headers: {}
+};
+
+// Adds a 'Date' header in, signs it, and adds the
+// 'Authorization' header in.
+var req = https.request(options, function(res) {
+ console.log(res.statusCode);
+});
+
+
+httpSignature.sign(req, {
+ key: key,
+ keyId: './cert.pem'
+});
+
+req.end();
+```
+
+### Server
+
+```js
+var fs = require('fs');
+var https = require('https');
+var httpSignature = require('http-signature');
+
+var options = {
+ key: fs.readFileSync('./key.pem'),
+ cert: fs.readFileSync('./cert.pem')
+};
+
+https.createServer(options, function (req, res) {
+ var rc = 200;
+ var parsed = httpSignature.parseRequest(req);
+ var pub = fs.readFileSync(parsed.keyId, 'ascii');
+ if (!httpSignature.verifySignature(parsed, pub))
+ rc = 401;
+
+ res.writeHead(rc);
+ res.end();
+}).listen(8443);
+```
+
+## Installation
+
+ npm install http-signature
+
+## License
+
+MIT.
+
+## Bugs
+
+See <https://github.com/joyent/node-http-signature/issues>.
diff --git a/node_modules/http-signature/http_signing.md b/node_modules/http-signature/http_signing.md
new file mode 100644
index 0000000..4f24d28
--- /dev/null
+++ b/node_modules/http-signature/http_signing.md
@@ -0,0 +1,363 @@
+# Abstract
+
+This document describes a way to add origin authentication, message integrity,
+and replay resistance to HTTP REST requests. It is intended to be used over
+the HTTPS protocol.
+
+# Copyright Notice
+
+Copyright (c) 2011 Joyent, Inc. and the persons identified as document authors.
+All rights reserved.
+
+Code Components extracted from this document must include MIT License text.
+
+# Introduction
+
+This protocol is intended to provide a standard way for clients to sign HTTP
+requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication
+mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely
+employed on the Internet today. However, it is common place that the burdens of
+PKI prevent web service operators from deploying that methodology, and so many
+fall back to Basic authentication, which has poor security characteristics.
+
+Additionally, OAuth provides a fully-specified alternative for authorization
+of web service requests, but is not (always) ideal for machine to machine
+communication, as the key acquisition steps (generally) imply a fixed
+infrastructure that may not make sense to a service provider (e.g., symmetric
+keys).
+
+Several web service providers have invented their own schemes for signing
+HTTP requests, but to date, none have been placed in the public domain as a
+standard. This document serves that purpose. There are no techniques in this
+proposal that are novel beyond previous art, however, this aims to be a simple
+mechanism for signing these requests.
+
+# Signature Authentication Scheme
+
+The "signature" authentication scheme is based on the model that the client must
+authenticate itself with a digital signature produced by either a private
+asymmetric key (e.g., RSA) or a shared symmetric key (e.g., HMAC). The scheme
+is parameterized enough such that it is not bound to any particular key type or
+signing algorithm. However, it does explicitly assume that clients can send an
+HTTP `Date` header.
+
+## Authorization Header
+
+The client is expected to send an Authorization header (as defined in RFC 2617)
+with the following parameterization:
+
+ credentials := "Signature" params
+ params := 1#(keyId | algorithm | [headers] | [ext] | signature)
+ digitalSignature := plain-string
+
+ keyId := "keyId" "=" <"> plain-string <">
+ algorithm := "algorithm" "=" <"> plain-string <">
+ headers := "headers" "=" <"> 1#headers-value <">
+ ext := "ext" "=" <"> plain-string <">
+ signature := "signature" "=" <"> plain-string <">
+
+ headers-value := plain-string
+ plain-string = 1*( %x20-21 / %x23-5B / %x5D-7E )
+
+### Signature Parameters
+
+#### keyId
+
+REQUIRED. The `keyId` field is an opaque string that the server can use to look
+up the component they need to validate the signature. It could be an SSH key
+fingerprint, an LDAP DN, etc. Management of keys and assignment of `keyId` is
+out of scope for this document.
+
+#### algorithm
+
+REQUIRED. The `algorithm` parameter is used if the client and server agree on a
+non-standard digital signature algorithm. The full list of supported signature
+mechanisms is listed below.
+
+#### headers
+
+OPTIONAL. The `headers` parameter is used to specify the list of HTTP headers
+used to sign the request. If specified, it should be a quoted list of HTTP
+header names, separated by a single space character. By default, only one
+HTTP header is signed, which is the `Date` header. Note that the list MUST be
+specified in the order the values are concatenated together during signing. To
+include the HTTP request line in the signature calculation, use the special
+`request-line` value. While this is overloading the definition of `headers` in
+HTTP linguism, the request-line is defined in RFC 2616, and as the outlier from
+headers in useful signature calculation, it is deemed simpler to simply use
+`request-line` than to add a separate parameter for it.
+
+#### extensions
+
+OPTIONAL. The `extensions` parameter is used to include additional information
+which is covered by the request. The content and format of the string is out of
+scope for this document, and expected to be specified by implementors.
+
+#### signature
+
+REQUIRED. The `signature` parameter is a `Base64` encoded digital signature
+generated by the client. The client uses the `algorithm` and `headers` request
+parameters to form a canonicalized `signing string`. This `signing string` is
+then signed with the key associated with `keyId` and the algorithm
+corresponding to `algorithm`. The `signature` parameter is then set to the
+`Base64` encoding of the signature.
+
+### Signing String Composition
+
+In order to generate the string that is signed with a key, the client MUST take
+the values of each HTTP header specified by `headers` in the order they appear.
+
+1. If the header name is not `request-line` then append the lowercased header
+ name followed with an ASCII colon `:` and an ASCII space ` `.
+2. If the header name is `request-line` then append the HTTP request line,
+ otherwise append the header value.
+3. If value is not the last value then append an ASCII newline `\n`. The string
+ MUST NOT include a trailing ASCII newline.
+
+# Example Requests
+
+All requests refer to the following request (body omitted):
+
+ POST /foo HTTP/1.1
+ Host: example.org
+ Date: Tue, 07 Jun 2014 20:51:35 GMT
+ Content-Type: application/json
+ Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
+ Content-Length: 18
+
+The "rsa-key-1" keyId refers to a private key known to the client and a public
+key known to the server. The "hmac-key-1" keyId refers to key known to the
+client and server.
+
+## Default parameterization
+
+The authorization header and signature would be generated as:
+
+ Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",signature="Base64(RSA-SHA256(signing string))"
+
+The client would compose the signing string as:
+
+ date: Tue, 07 Jun 2014 20:51:35 GMT
+
+## Header List
+
+The authorization header and signature would be generated as:
+
+ Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="(request-target) date content-type digest",signature="Base64(RSA-SHA256(signing string))"
+
+The client would compose the signing string as (`+ "\n"` inserted for
+readability):
+
+ (request-target) post /foo + "\n"
+ date: Tue, 07 Jun 2011 20:51:35 GMT + "\n"
+ content-type: application/json + "\n"
+ digest: SHA-256=Base64(SHA256(Body))
+
+## Algorithm
+
+The authorization header and signature would be generated as:
+
+ Authorization: Signature keyId="hmac-key-1",algorithm="hmac-sha1",signature="Base64(HMAC-SHA1(signing string))"
+
+The client would compose the signing string as:
+
+ date: Tue, 07 Jun 2011 20:51:35 GMT
+
+# Signing Algorithms
+
+Currently supported algorithm names are:
+
+* rsa-sha1
+* rsa-sha256
+* rsa-sha512
+* dsa-sha1
+* hmac-sha1
+* hmac-sha256
+* hmac-sha512
+
+# Security Considerations
+
+## Default Parameters
+
+Note the default parameterization of the `Signature` scheme is only safe if all
+requests are carried over a secure transport (i.e., TLS). Sending the default
+scheme over a non-secure transport will leave the request vulnerable to
+spoofing, tampering, replay/repudiation, and integrity violations (if using the
+STRIDE threat-modeling methodology).
+
+## Insecure Transports
+
+If sending the request over plain HTTP, service providers SHOULD require clients
+to sign ALL HTTP headers, and the `request-line`. Additionally, service
+providers SHOULD require `Content-MD5` calculations to be performed to ensure
+against any tampering from clients.
+
+## Nonces
+
+Nonces are out of scope for this document simply because many service providers
+fail to implement them correctly, or do not adopt security specifications
+because of the infrastructure complexity. Given the `header` parameterization,
+a service provider is fully enabled to add nonce semantics into this scheme by
+using something like an `x-request-nonce` header, and ensuring it is signed
+with the `Date` header.
+
+## Clock Skew
+
+As the default scheme is to sign the `Date` header, service providers SHOULD
+protect against logged replay attacks by enforcing a clock skew. The server
+SHOULD be synchronized with NTP, and the recommendation in this specification
+is to allow 300s of clock skew (in either direction).
+
+## Required Headers to Sign
+
+It is out of scope for this document to dictate what headers a service provider
+will want to enforce, but service providers SHOULD at minimum include the
+`Date` header.
+
+# References
+
+## Normative References
+
+* [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1
+* [RFC2617] HTTP Authentication: Basic and Digest Access Authentication
+* [RFC5246] The Transport Layer Security (TLS) Protocol Version 1.2
+
+## Informative References
+
+ Name: Mark Cavage (editor)
+ Company: Joyent, Inc.
+ Email: mark.cavage@joyent.com
+ URI: http://www.joyent.com
+
+# Appendix A - Test Values
+
+The following test data uses the RSA (1024b) keys, which we will refer
+to as `keyId=Test` in the following samples:
+
+ -----BEGIN PUBLIC KEY-----
+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3
+ 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6
+ Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw
+ oYi+1hqp1fIekaxsyQIDAQAB
+ -----END PUBLIC KEY-----
+
+ -----BEGIN RSA PRIVATE KEY-----
+ MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF
+ NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F
+ UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB
+ AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA
+ QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK
+ kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg
+ f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u
+ 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc
+ mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7
+ kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA
+ gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW
+ G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI
+ 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA==
+ -----END RSA PRIVATE KEY-----
+
+And all examples use this request:
+
+<!-- httpreq -->
+
+ POST /foo?param=value&pet=dog HTTP/1.1
+ Host: example.com
+ Date: Thu, 05 Jan 2014 21:31:40 GMT
+ Content-Type: application/json
+ Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
+ Content-Length: 18
+
+ {"hello": "world"}
+
+<!-- /httpreq -->
+
+### Default
+
+The string to sign would be:
+
+<!-- sign {"name": "Default", "options": {"keyId":"Test", "algorithm": "rsa-sha256"}} -->
+<!-- signstring -->
+
+ date: Thu, 05 Jan 2014 21:31:40 GMT
+
+<!-- /signstring -->
+
+The Authorization header would be:
+
+<!-- authz -->
+
+ Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="date",signature="jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9HpFQlG7N4YcJPteKTu4MWCLyk+gIr0wDgqtLWf9NLpMAMimdfsH7FSWGfbMFSrsVTHNTk0rK3usrfFnti1dxsM4jl0kYJCKTGI/UWkqiaxwNiKqGcdlEDrTcUhhsFsOIo8VhddmZTZ8w="
+
+<!-- /authz -->
+
+### All Headers
+
+Parameterized to include all headers, the string to sign would be (`+ "\n"`
+inserted for readability):
+
+<!-- sign {"name": "All Headers", "options": {"keyId":"Test", "algorithm": "rsa-sha256", "headers": ["(request-target)", "host", "date", "content-type", "digest", "content-length"]}} -->
+<!-- signstring -->
+
+ (request-target): post /foo?param=value&pet=dog
+ host: example.com
+ date: Thu, 05 Jan 2014 21:31:40 GMT
+ content-type: application/json
+ digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
+ content-length: 18
+
+<!-- /signstring -->
+
+The Authorization header would be:
+
+<!-- authz -->
+
+ Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="(request-target) host date content-type digest content-length",signature="Ef7MlxLXoBovhil3AlyjtBwAL9g4TN3tibLj7uuNB3CROat/9KaeQ4hW2NiJ+pZ6HQEOx9vYZAyi+7cmIkmJszJCut5kQLAwuX+Ms/mUFvpKlSo9StS2bMXDBNjOh4Auj774GFj4gwjS+3NhFeoqyr/MuN6HsEnkvn6zdgfE2i0="
+
+<!-- /authz -->
+
+## Generating and verifying signatures using `openssl`
+
+The `openssl` commandline tool can be used to generate or verify the signatures listed above.
+
+Compose the signing string as usual, and pipe it into the the `openssl dgst` command, then into `openssl enc -base64`, as follows:
+
+ $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
+ openssl dgst -binary -sign /path/to/private.pem -sha256 | \
+ openssl enc -base64
+ jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9Hp...
+ $
+
+The `-sha256` option is necessary to produce an `rsa-sha256` signature. You can select other hash algorithms such as `sha1` by changing this argument.
+
+To verify a signature, first save the signature data, Base64-decoded, into a file, then use `openssl dgst` again with the `-verify` option:
+
+ $ echo 'jKyvPcxB4JbmYY4mByy...' | openssl enc -A -d -base64 > signature
+ $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
+ openssl dgst -sha256 -verify /path/to/public.pem -signature ./signature
+ Verified OK
+ $
+
+## Generating and verifying signatures using `sshpk-sign`
+
+You can also generate and check signatures using the `sshpk-sign` tool which is
+included with the `sshpk` package in `npm`.
+
+Compose the signing string as above, and pipe it into `sshpk-sign` as follows:
+
+ $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
+ sshpk-sign -i /path/to/private.pem
+ jKyvPcxB4JbmYY4mByyBY7cZfNl4OW9Hp...
+ $
+
+This will produce an `rsa-sha256` signature by default, as you can see using
+the `-v` option:
+
+ sshpk-sign: using rsa-sha256 with a 1024 bit key
+
+You can also use `sshpk-verify` in a similar manner:
+
+ $ printf 'date: Thu, 05 Jan 2014 21:31:40 GMT' | \
+ sshpk-verify -i ./public.pem -s 'jKyvPcxB4JbmYY...'
+ OK
+ $
diff --git a/node_modules/http-signature/lib/index.js b/node_modules/http-signature/lib/index.js
new file mode 100644
index 0000000..54d4603
--- /dev/null
+++ b/node_modules/http-signature/lib/index.js
@@ -0,0 +1,29 @@
+// Copyright 2015 Joyent, Inc.
+
+var parser = require('./parser');
+var signer = require('./signer');
+var verify = require('./verify');
+var utils = require('./utils');
+
+
+
+///--- API
+
+module.exports = {
+
+ parse: parser.parseRequest,
+ parseRequest: parser.parseRequest,
+
+ sign: signer.signRequest,
+ signRequest: signer.signRequest,
+ createSigner: signer.createSigner,
+ isSigner: signer.isSigner,
+
+ sshKeyToPEM: utils.sshKeyToPEM,
+ sshKeyFingerprint: utils.fingerprint,
+ pemToRsaSSHKey: utils.pemToRsaSSHKey,
+
+ verify: verify.verifySignature,
+ verifySignature: verify.verifySignature,
+ verifyHMAC: verify.verifyHMAC
+};
diff --git a/node_modules/http-signature/lib/parser.js b/node_modules/http-signature/lib/parser.js
new file mode 100644
index 0000000..5994a7e
--- /dev/null
+++ b/node_modules/http-signature/lib/parser.js
@@ -0,0 +1,315 @@
+// Copyright 2012 Joyent, Inc. All rights reserved.
+
+var assert = require('assert-plus');
+var util = require('util');
+var utils = require('./utils');
+
+
+
+///--- Globals
+
+var HASH_ALGOS = utils.HASH_ALGOS;
+var PK_ALGOS = utils.PK_ALGOS;
+var HttpSignatureError = utils.HttpSignatureError;
+var InvalidAlgorithmError = utils.InvalidAlgorithmError;
+var validateAlgorithm = utils.validateAlgorithm;
+
+var State = {
+ New: 0,
+ Params: 1
+};
+
+var ParamsState = {
+ Name: 0,
+ Quote: 1,
+ Value: 2,
+ Comma: 3
+};
+
+
+///--- Specific Errors
+
+
+function ExpiredRequestError(message) {
+ HttpSignatureError.call(this, message, ExpiredRequestError);
+}
+util.inherits(ExpiredRequestError, HttpSignatureError);
+
+
+function InvalidHeaderError(message) {
+ HttpSignatureError.call(this, message, InvalidHeaderError);
+}
+util.inherits(InvalidHeaderError, HttpSignatureError);
+
+
+function InvalidParamsError(message) {
+ HttpSignatureError.call(this, message, InvalidParamsError);
+}
+util.inherits(InvalidParamsError, HttpSignatureError);
+
+
+function MissingHeaderError(message) {
+ HttpSignatureError.call(this, message, MissingHeaderError);
+}
+util.inherits(MissingHeaderError, HttpSignatureError);
+
+function StrictParsingError(message) {
+ HttpSignatureError.call(this, message, StrictParsingError);
+}
+util.inherits(StrictParsingError, HttpSignatureError);
+
+///--- Exported API
+
+module.exports = {
+
+ /**
+ * Parses the 'Authorization' header out of an http.ServerRequest object.
+ *
+ * Note that this API will fully validate the Authorization header, and throw
+ * on any error. It will not however check the signature, or the keyId format
+ * as those are specific to your environment. You can use the options object
+ * to pass in extra constraints.
+ *
+ * As a response object you can expect this:
+ *
+ * {
+ * "scheme": "Signature",
+ * "params": {
+ * "keyId": "foo",
+ * "algorithm": "rsa-sha256",
+ * "headers": [
+ * "date" or "x-date",
+ * "digest"
+ * ],
+ * "signature": "base64"
+ * },
+ * "signingString": "ready to be passed to crypto.verify()"
+ * }
+ *
+ * @param {Object} request an http.ServerRequest.
+ * @param {Object} options an optional options object with:
+ * - clockSkew: allowed clock skew in seconds (default 300).
+ * - headers: required header names (def: date or x-date)
+ * - algorithms: algorithms to support (default: all).
+ * - strict: should enforce latest spec parsing
+ * (default: false).
+ * @return {Object} parsed out object (see above).
+ * @throws {TypeError} on invalid input.
+ * @throws {InvalidHeaderError} on an invalid Authorization header error.
+ * @throws {InvalidParamsError} if the params in the scheme are invalid.
+ * @throws {MissingHeaderError} if the params indicate a header not present,
+ * either in the request headers from the params,
+ * or not in the params from a required header
+ * in options.
+ * @throws {StrictParsingError} if old attributes are used in strict parsing
+ * mode.
+ * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew.
+ */
+ parseRequest: function parseRequest(request, options) {
+ assert.object(request, 'request');
+ assert.object(request.headers, 'request.headers');
+ if (options === undefined) {
+ options = {};
+ }
+ if (options.headers === undefined) {
+ options.headers = [request.headers['x-date'] ? 'x-date' : 'date'];
+ }
+ assert.object(options, 'options');
+ assert.arrayOfString(options.headers, 'options.headers');
+ assert.optionalFinite(options.clockSkew, 'options.clockSkew');
+
+ var authzHeaderName = options.authorizationHeaderName || 'authorization';
+
+ if (!request.headers[authzHeaderName]) {
+ throw new MissingHeaderError('no ' + authzHeaderName + ' header ' +
+ 'present in the request');
+ }
+
+ options.clockSkew = options.clockSkew || 300;
+
+
+ var i = 0;
+ var state = State.New;
+ var substate = ParamsState.Name;
+ var tmpName = '';
+ var tmpValue = '';
+
+ var parsed = {
+ scheme: '',
+ params: {},
+ signingString: ''
+ };
+
+ var authz = request.headers[authzHeaderName];
+ for (i = 0; i < authz.length; i++) {
+ var c = authz.charAt(i);
+
+ switch (Number(state)) {
+
+ case State.New:
+ if (c !== ' ') parsed.scheme += c;
+ else state = State.Params;
+ break;
+
+ case State.Params:
+ switch (Number(substate)) {
+
+ case ParamsState.Name:
+ var code = c.charCodeAt(0);
+ // restricted name of A-Z / a-z
+ if ((code >= 0x41 && code <= 0x5a) || // A-Z
+ (code >= 0x61 && code <= 0x7a)) { // a-z
+ tmpName += c;
+ } else if (c === '=') {
+ if (tmpName.length === 0)
+ throw new InvalidHeaderError('bad param format');
+ substate = ParamsState.Quote;
+ } else {
+ throw new InvalidHeaderError('bad param format');
+ }
+ break;
+
+ case ParamsState.Quote:
+ if (c === '"') {
+ tmpValue = '';
+ substate = ParamsState.Value;
+ } else {
+ throw new InvalidHeaderError('bad param format');
+ }
+ break;
+
+ case ParamsState.Value:
+ if (c === '"') {
+ parsed.params[tmpName] = tmpValue;
+ substate = ParamsState.Comma;
+ } else {
+ tmpValue += c;
+ }
+ break;
+
+ case ParamsState.Comma:
+ if (c === ',') {
+ tmpName = '';
+ substate = ParamsState.Name;
+ } else {
+ throw new InvalidHeaderError('bad param format');
+ }
+ break;
+
+ default:
+ throw new Error('Invalid substate');
+ }
+ break;
+
+ default:
+ throw new Error('Invalid substate');
+ }
+
+ }
+
+ if (!parsed.params.headers || parsed.params.headers === '') {
+ if (request.headers['x-date']) {
+ parsed.params.headers = ['x-date'];
+ } else {
+ parsed.params.headers = ['date'];
+ }
+ } else {
+ parsed.params.headers = parsed.params.headers.split(' ');
+ }
+
+ // Minimally validate the parsed object
+ if (!parsed.scheme || parsed.scheme !== 'Signature')
+ throw new InvalidHeaderError('scheme was not "Signature"');
+
+ if (!parsed.params.keyId)
+ throw new InvalidHeaderError('keyId was not specified');
+
+ if (!parsed.params.algorithm)
+ throw new InvalidHeaderError('algorithm was not specified');
+
+ if (!parsed.params.signature)
+ throw new InvalidHeaderError('signature was not specified');
+
+ // Check the algorithm against the official list
+ parsed.params.algorithm = parsed.params.algorithm.toLowerCase();
+ try {
+ validateAlgorithm(parsed.params.algorithm);
+ } catch (e) {
+ if (e instanceof InvalidAlgorithmError)
+ throw (new InvalidParamsError(parsed.params.algorithm + ' is not ' +
+ 'supported'));
+ else
+ throw (e);
+ }
+
+ // Build the signingString
+ for (i = 0; i < parsed.params.headers.length; i++) {
+ var h = parsed.params.headers[i].toLowerCase();
+ parsed.params.headers[i] = h;
+
+ if (h === 'request-line') {
+ if (!options.strict) {
+ /*
+ * We allow headers from the older spec drafts if strict parsing isn't
+ * specified in options.
+ */
+ parsed.signingString +=
+ request.method + ' ' + request.url + ' HTTP/' + request.httpVersion;
+ } else {
+ /* Strict parsing doesn't allow older draft headers. */
+ throw (new StrictParsingError('request-line is not a valid header ' +
+ 'with strict parsing enabled.'));
+ }
+ } else if (h === '(request-target)') {
+ parsed.signingString +=
+ '(request-target): ' + request.method.toLowerCase() + ' ' +
+ request.url;
+ } else {
+ var value = request.headers[h];
+ if (value === undefined)
+ throw new MissingHeaderError(h + ' was not in the request');
+ parsed.signingString += h + ': ' + value;
+ }
+
+ if ((i + 1) < parsed.params.headers.length)
+ parsed.signingString += '\n';
+ }
+
+ // Check against the constraints
+ var date;
+ if (request.headers.date || request.headers['x-date']) {
+ if (request.headers['x-date']) {
+ date = new Date(request.headers['x-date']);
+ } else {
+ date = new Date(request.headers.date);
+ }
+ var now = new Date();
+ var skew = Math.abs(now.getTime() - date.getTime());
+
+ if (skew > options.clockSkew * 1000) {
+ throw new ExpiredRequestError('clock skew of ' +
+ (skew / 1000) +
+ 's was greater than ' +
+ options.clockSkew + 's');
+ }
+ }
+
+ options.headers.forEach(function (hdr) {
+ // Remember that we already checked any headers in the params
+ // were in the request, so if this passes we're good.
+ if (parsed.params.headers.indexOf(hdr.toLowerCase()) < 0)
+ throw new MissingHeaderError(hdr + ' was not a signed header');
+ });
+
+ if (options.algorithms) {
+ if (options.algorithms.indexOf(parsed.params.algorithm) === -1)
+ throw new InvalidParamsError(parsed.params.algorithm +
+ ' is not a supported algorithm');
+ }
+
+ parsed.algorithm = parsed.params.algorithm.toUpperCase();
+ parsed.keyId = parsed.params.keyId;
+ return parsed;
+ }
+
+};
diff --git a/node_modules/http-signature/lib/signer.js b/node_modules/http-signature/lib/signer.js
new file mode 100644
index 0000000..deb5878
--- /dev/null
+++ b/node_modules/http-signature/lib/signer.js
@@ -0,0 +1,401 @@
+// Copyright 2012 Joyent, Inc. All rights reserved.
+
+var assert = require('assert-plus');
+var crypto = require('crypto');
+var http = require('http');
+var util = require('util');
+var sshpk = require('sshpk');
+var jsprim = require('jsprim');
+var utils = require('./utils');
+
+var sprintf = require('util').format;
+
+var HASH_ALGOS = utils.HASH_ALGOS;
+var PK_ALGOS = utils.PK_ALGOS;
+var InvalidAlgorithmError = utils.InvalidAlgorithmError;
+var HttpSignatureError = utils.HttpSignatureError;
+var validateAlgorithm = utils.validateAlgorithm;
+
+///--- Globals
+
+var AUTHZ_FMT =
+ 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';
+
+///--- Specific Errors
+
+function MissingHeaderError(message) {
+ HttpSignatureError.call(this, message, MissingHeaderError);
+}
+util.inherits(MissingHeaderError, HttpSignatureError);
+
+function StrictParsingError(message) {
+ HttpSignatureError.call(this, message, StrictParsingError);
+}
+util.inherits(StrictParsingError, HttpSignatureError);
+
+/* See createSigner() */
+function RequestSigner(options) {
+ assert.object(options, 'options');
+
+ var alg = [];
+ if (options.algorithm !== undefined) {
+ assert.string(options.algorithm, 'options.algorithm');
+ alg = validateAlgorithm(options.algorithm);
+ }
+ this.rs_alg = alg;
+
+ /*
+ * RequestSigners come in two varieties: ones with an rs_signFunc, and ones
+ * with an rs_signer.
+ *
+ * rs_signFunc-based RequestSigners have to build up their entire signing
+ * string within the rs_lines array and give it to rs_signFunc as a single
+ * concat'd blob. rs_signer-based RequestSigners can add a line at a time to
+ * their signing state by using rs_signer.update(), thus only needing to
+ * buffer the hash function state and one line at a time.
+ */
+ if (options.sign !== undefined) {
+ assert.func(options.sign, 'options.sign');
+ this.rs_signFunc = options.sign;
+
+ } else if (alg[0] === 'hmac' && options.key !== undefined) {
+ assert.string(options.keyId, 'options.keyId');
+ this.rs_keyId = options.keyId;
+
+ if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))
+ throw (new TypeError('options.key for HMAC must be a string or Buffer'));
+
+ /*
+ * Make an rs_signer for HMACs, not a rs_signFunc -- HMACs digest their
+ * data in chunks rather than requiring it all to be given in one go
+ * at the end, so they are more similar to signers than signFuncs.
+ */
+ this.rs_signer = crypto.createHmac(alg[1].toUpperCase(), options.key);
+ this.rs_signer.sign = function () {
+ var digest = this.digest('base64');
+ return ({
+ hashAlgorithm: alg[1],
+ toString: function () { return (digest); }
+ });
+ };
+
+ } else if (options.key !== undefined) {
+ var key = options.key;
+ if (typeof (key) === 'string' || Buffer.isBuffer(key))
+ key = sshpk.parsePrivateKey(key);
+
+ assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),
+ 'options.key must be a sshpk.PrivateKey');
+ this.rs_key = key;
+
+ assert.string(options.keyId, 'options.keyId');
+ this.rs_keyId = options.keyId;
+
+ if (!PK_ALGOS[key.type]) {
+ throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +
+ 'keys are not supported'));
+ }
+
+ if (alg[0] !== undefined && key.type !== alg[0]) {
+ throw (new InvalidAlgorithmError('options.key must be a ' +
+ alg[0].toUpperCase() + ' key, was given a ' +
+ key.type.toUpperCase() + ' key instead'));
+ }
+
+ this.rs_signer = key.createSign(alg[1]);
+
+ } else {
+ throw (new TypeError('options.sign (func) or options.key is required'));
+ }
+
+ this.rs_headers = [];
+ this.rs_lines = [];
+}
+
+/**
+ * Adds a header to be signed, with its value, into this signer.
+ *
+ * @param {String} header
+ * @param {String} value
+ * @return {String} value written
+ */
+RequestSigner.prototype.writeHeader = function (header, value) {
+ assert.string(header, 'header');
+ header = header.toLowerCase();
+ assert.string(value, 'value');
+
+ this.rs_headers.push(header);
+
+ if (this.rs_signFunc) {
+ this.rs_lines.push(header + ': ' + value);
+
+ } else {
+ var line = header + ': ' + value;
+ if (this.rs_headers.length > 0)
+ line = '\n' + line;
+ this.rs_signer.update(line);
+ }
+
+ return (value);
+};
+
+/**
+ * Adds a default Date header, returning its value.
+ *
+ * @return {String}
+ */
+RequestSigner.prototype.writeDateHeader = function () {
+ return (this.writeHeader('date', jsprim.rfc1123(new Date())));
+};
+
+/**
+ * Adds the request target line to be signed.
+ *
+ * @param {String} method, HTTP method (e.g. 'get', 'post', 'put')
+ * @param {String} path
+ */
+RequestSigner.prototype.writeTarget = function (method, path) {
+ assert.string(method, 'method');
+ assert.string(path, 'path');
+ method = method.toLowerCase();
+ this.writeHeader('(request-target)', method + ' ' + path);
+};
+
+/**
+ * Calculate the value for the Authorization header on this request
+ * asynchronously.
+ *
+ * @param {Func} callback (err, authz)
+ */
+RequestSigner.prototype.sign = function (cb) {
+ assert.func(cb, 'callback');
+
+ if (this.rs_headers.length < 1)
+ throw (new Error('At least one header must be signed'));
+
+ var alg, authz;
+ if (this.rs_signFunc) {
+ var data = this.rs_lines.join('\n');
+ var self = this;
+ this.rs_signFunc(data, function (err, sig) {
+ if (err) {
+ cb(err);
+ return;
+ }
+ try {
+ assert.object(sig, 'signature');
+ assert.string(sig.keyId, 'signature.keyId');
+ assert.string(sig.algorithm, 'signature.algorithm');
+ assert.string(sig.signature, 'signature.signature');
+ alg = validateAlgorithm(sig.algorithm);
+
+ authz = sprintf(AUTHZ_FMT,
+ sig.keyId,
+ sig.algorithm,
+ self.rs_headers.join(' '),
+ sig.signature);
+ } catch (e) {
+ cb(e);
+ return;
+ }
+ cb(null, authz);
+ });
+
+ } else {
+ try {
+ var sigObj = this.rs_signer.sign();
+ } catch (e) {
+ cb(e);
+ return;
+ }
+ alg = (this.rs_alg[0] || this.rs_key.type) + '-' + sigObj.hashAlgorithm;
+ var signature = sigObj.toString();
+ authz = sprintf(AUTHZ_FMT,
+ this.rs_keyId,
+ alg,
+ this.rs_headers.join(' '),
+ signature);
+ cb(null, authz);
+ }
+};
+
+///--- Exported API
+
+module.exports = {
+ /**
+ * Identifies whether a given object is a request signer or not.
+ *
+ * @param {Object} object, the object to identify
+ * @returns {Boolean}
+ */
+ isSigner: function (obj) {
+ if (typeof (obj) === 'object' && obj instanceof RequestSigner)
+ return (true);
+ return (false);
+ },
+
+ /**
+ * Creates a request signer, used to asynchronously build a signature
+ * for a request (does not have to be an http.ClientRequest).
+ *
+ * @param {Object} options, either:
+ * - {String} keyId
+ * - {String|Buffer} key
+ * - {String} algorithm (optional, required for HMAC)
+ * or:
+ * - {Func} sign (data, cb)
+ * @return {RequestSigner}
+ */
+ createSigner: function createSigner(options) {
+ return (new RequestSigner(options));
+ },
+
+ /**
+ * Adds an 'Authorization' header to an http.ClientRequest object.
+ *
+ * Note that this API will add a Date header if it's not already set. Any
+ * other headers in the options.headers array MUST be present, or this
+ * will throw.
+ *
+ * You shouldn't need to check the return type; it's just there if you want
+ * to be pedantic.
+ *
+ * The optional flag indicates whether parsing should use strict enforcement
+ * of the version draft-cavage-http-signatures-04 of the spec or beyond.
+ * The default is to be loose and support
+ * older versions for compatibility.
+ *
+ * @param {Object} request an instance of http.ClientRequest.
+ * @param {Object} options signing parameters object:
+ * - {String} keyId required.
+ * - {String} key required (either a PEM or HMAC key).
+ * - {Array} headers optional; defaults to ['date'].
+ * - {String} algorithm optional (unless key is HMAC);
+ * default is the same as the sshpk default
+ * signing algorithm for the type of key given
+ * - {String} httpVersion optional; defaults to '1.1'.
+ * - {Boolean} strict optional; defaults to 'false'.
+ * @return {Boolean} true if Authorization (and optionally Date) were added.
+ * @throws {TypeError} on bad parameter types (input).
+ * @throws {InvalidAlgorithmError} if algorithm was bad or incompatible with
+ * the given key.
+ * @throws {sshpk.KeyParseError} if key was bad.
+ * @throws {MissingHeaderError} if a header to be signed was specified but
+ * was not present.
+ */
+ signRequest: function signRequest(request, options) {
+ assert.object(request, 'request');
+ assert.object(options, 'options');
+ assert.optionalString(options.algorithm, 'options.algorithm');
+ assert.string(options.keyId, 'options.keyId');
+ assert.optionalArrayOfString(options.headers, 'options.headers');
+ assert.optionalString(options.httpVersion, 'options.httpVersion');
+
+ if (!request.getHeader('Date'))
+ request.setHeader('Date', jsprim.rfc1123(new Date()));
+ if (!options.headers)
+ options.headers = ['date'];
+ if (!options.httpVersion)
+ options.httpVersion = '1.1';
+
+ var alg = [];
+ if (options.algorithm) {
+ options.algorithm = options.algorithm.toLowerCase();
+ alg = validateAlgorithm(options.algorithm);
+ }
+
+ var i;
+ var stringToSign = '';
+ for (i = 0; i < options.headers.length; i++) {
+ if (typeof (options.headers[i]) !== 'string')
+ throw new TypeError('options.headers must be an array of Strings');
+
+ var h = options.headers[i].toLowerCase();
+
+ if (h === 'request-line') {
+ if (!options.strict) {
+ /**
+ * We allow headers from the older spec drafts if strict parsing isn't
+ * specified in options.
+ */
+ stringToSign +=
+ request.method + ' ' + request.path + ' HTTP/' +
+ options.httpVersion;
+ } else {
+ /* Strict parsing doesn't allow older draft headers. */
+ throw (new StrictParsingError('request-line is not a valid header ' +
+ 'with strict parsing enabled.'));
+ }
+ } else if (h === '(request-target)') {
+ stringToSign +=
+ '(request-target): ' + request.method.toLowerCase() + ' ' +
+ request.path;
+ } else {
+ var value = request.getHeader(h);
+ if (value === undefined || value === '') {
+ throw new MissingHeaderError(h + ' was not in the request');
+ }
+ stringToSign += h + ': ' + value;
+ }
+
+ if ((i + 1) < options.headers.length)
+ stringToSign += '\n';
+ }
+
+ /* This is just for unit tests. */
+ if (request.hasOwnProperty('_stringToSign')) {
+ request._stringToSign = stringToSign;
+ }
+
+ var signature;
+ if (alg[0] === 'hmac') {
+ if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))
+ throw (new TypeError('options.key must be a string or Buffer'));
+
+ var hmac = crypto.createHmac(alg[1].toUpperCase(), options.key);
+ hmac.update(stringToSign);
+ signature = hmac.digest('base64');
+
+ } else {
+ var key = options.key;
+ if (typeof (key) === 'string' || Buffer.isBuffer(key))
+ key = sshpk.parsePrivateKey(options.key);
+
+ assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),
+ 'options.key must be a sshpk.PrivateKey');
+
+ if (!PK_ALGOS[key.type]) {
+ throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +
+ 'keys are not supported'));
+ }
+
+ if (alg[0] !== undefined && key.type !== alg[0]) {
+ throw (new InvalidAlgorithmError('options.key must be a ' +
+ alg[0].toUpperCase() + ' key, was given a ' +
+ key.type.toUpperCase() + ' key instead'));
+ }
+
+ var signer = key.createSign(alg[1]);
+ signer.update(stringToSign);
+ var sigObj = signer.sign();
+ if (!HASH_ALGOS[sigObj.hashAlgorithm]) {
+ throw (new InvalidAlgorithmError(sigObj.hashAlgorithm.toUpperCase() +
+ ' is not a supported hash algorithm'));
+ }
+ options.algorithm = key.type + '-' + sigObj.hashAlgorithm;
+ signature = sigObj.toString();
+ assert.notStrictEqual(signature, '', 'empty signature produced');
+ }
+
+ var authzHeaderName = options.authorizationHeaderName || 'Authorization';
+
+ request.setHeader(authzHeaderName, sprintf(AUTHZ_FMT,
+ options.keyId,
+ options.algorithm,
+ options.headers.join(' '),
+ signature));
+
+ return true;
+ }
+
+};
diff --git a/node_modules/http-signature/lib/utils.js b/node_modules/http-signature/lib/utils.js
new file mode 100644
index 0000000..bbf2aa8
--- /dev/null
+++ b/node_modules/http-signature/lib/utils.js
@@ -0,0 +1,112 @@
+// Copyright 2012 Joyent, Inc. All rights reserved.
+
+var assert = require('assert-plus');
+var sshpk = require('sshpk');
+var util = require('util');
+
+var HASH_ALGOS = {
+ 'sha1': true,
+ 'sha256': true,
+ 'sha512': true
+};
+
+var PK_ALGOS = {
+ 'rsa': true,
+ 'dsa': true,
+ 'ecdsa': true
+};
+
+function HttpSignatureError(message, caller) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, caller || HttpSignatureError);
+
+ this.message = message;
+ this.name = caller.name;
+}
+util.inherits(HttpSignatureError, Error);
+
+function InvalidAlgorithmError(message) {
+ HttpSignatureError.call(this, message, InvalidAlgorithmError);
+}
+util.inherits(InvalidAlgorithmError, HttpSignatureError);
+
+function validateAlgorithm(algorithm) {
+ var alg = algorithm.toLowerCase().split('-');
+
+ if (alg.length !== 2) {
+ throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' +
+ 'valid algorithm'));
+ }
+
+ if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) {
+ throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' +
+ 'are not supported'));
+ }
+
+ if (!HASH_ALGOS[alg[1]]) {
+ throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' +
+ 'supported hash algorithm'));
+ }
+
+ return (alg);
+}
+
+///--- API
+
+module.exports = {
+
+ HASH_ALGOS: HASH_ALGOS,
+ PK_ALGOS: PK_ALGOS,
+
+ HttpSignatureError: HttpSignatureError,
+ InvalidAlgorithmError: InvalidAlgorithmError,
+
+ validateAlgorithm: validateAlgorithm,
+
+ /**
+ * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file.
+ *
+ * The intent of this module is to interoperate with OpenSSL only,
+ * specifically the node crypto module's `verify` method.
+ *
+ * @param {String} key an OpenSSH public key.
+ * @return {String} PEM encoded form of the RSA public key.
+ * @throws {TypeError} on bad input.
+ * @throws {Error} on invalid ssh key formatted data.
+ */
+ sshKeyToPEM: function sshKeyToPEM(key) {
+ assert.string(key, 'ssh_key');
+
+ var k = sshpk.parseKey(key, 'ssh');
+ return (k.toString('pem'));
+ },
+
+
+ /**
+ * Generates an OpenSSH fingerprint from an ssh public key.
+ *
+ * @param {String} key an OpenSSH public key.
+ * @return {String} key fingerprint.
+ * @throws {TypeError} on bad input.
+ * @throws {Error} if what you passed doesn't look like an ssh public key.
+ */
+ fingerprint: function fingerprint(key) {
+ assert.string(key, 'ssh_key');
+
+ var k = sshpk.parseKey(key, 'ssh');
+ return (k.fingerprint('md5').toString('hex'));
+ },
+
+ /**
+ * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa)
+ *
+ * The reverse of the above function.
+ */
+ pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) {
+ assert.equal('string', typeof (pem), 'typeof pem');
+
+ var k = sshpk.parseKey(pem, 'pem');
+ k.comment = comment;
+ return (k.toString('ssh'));
+ }
+};
diff --git a/node_modules/http-signature/lib/verify.js b/node_modules/http-signature/lib/verify.js
new file mode 100644
index 0000000..b053fd6
--- /dev/null
+++ b/node_modules/http-signature/lib/verify.js
@@ -0,0 +1,88 @@
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert-plus');
+var crypto = require('crypto');
+var sshpk = require('sshpk');
+var utils = require('./utils');
+
+var HASH_ALGOS = utils.HASH_ALGOS;
+var PK_ALGOS = utils.PK_ALGOS;
+var InvalidAlgorithmError = utils.InvalidAlgorithmError;
+var HttpSignatureError = utils.HttpSignatureError;
+var validateAlgorithm = utils.validateAlgorithm;
+
+///--- Exported API
+
+module.exports = {
+ /**
+ * Verify RSA/DSA signature against public key. You are expected to pass in
+ * an object that was returned from `parse()`.
+ *
+ * @param {Object} parsedSignature the object you got from `parse`.
+ * @param {String} pubkey RSA/DSA private key PEM.
+ * @return {Boolean} true if valid, false otherwise.
+ * @throws {TypeError} if you pass in bad arguments.
+ * @throws {InvalidAlgorithmError}
+ */
+ verifySignature: function verifySignature(parsedSignature, pubkey) {
+ assert.object(parsedSignature, 'parsedSignature');
+ if (typeof (pubkey) === 'string' || Buffer.isBuffer(pubkey))
+ pubkey = sshpk.parseKey(pubkey);
+ assert.ok(sshpk.Key.isKey(pubkey, [1, 1]), 'pubkey must be a sshpk.Key');
+
+ var alg = validateAlgorithm(parsedSignature.algorithm);
+ if (alg[0] === 'hmac' || alg[0] !== pubkey.type)
+ return (false);
+
+ var v = pubkey.createVerify(alg[1]);
+ v.update(parsedSignature.signingString);
+ return (v.verify(parsedSignature.params.signature, 'base64'));
+ },
+
+ /**
+ * Verify HMAC against shared secret. You are expected to pass in an object
+ * that was returned from `parse()`.
+ *
+ * @param {Object} parsedSignature the object you got from `parse`.
+ * @param {String} secret HMAC shared secret.
+ * @return {Boolean} true if valid, false otherwise.
+ * @throws {TypeError} if you pass in bad arguments.
+ * @throws {InvalidAlgorithmError}
+ */
+ verifyHMAC: function verifyHMAC(parsedSignature, secret) {
+ assert.object(parsedSignature, 'parsedHMAC');
+ assert.string(secret, 'secret');
+
+ var alg = validateAlgorithm(parsedSignature.algorithm);
+ if (alg[0] !== 'hmac')
+ return (false);
+
+ var hashAlg = alg[1].toUpperCase();
+
+ var hmac = crypto.createHmac(hashAlg, secret);
+ hmac.update(parsedSignature.signingString);
+
+ /*
+ * Now double-hash to avoid leaking timing information - there's
+ * no easy constant-time compare in JS, so we use this approach
+ * instead. See for more info:
+ * https://www.isecpartners.com/blog/2011/february/double-hmac-
+ * verification.aspx
+ */
+ var h1 = crypto.createHmac(hashAlg, secret);
+ h1.update(hmac.digest());
+ h1 = h1.digest();
+ var h2 = crypto.createHmac(hashAlg, secret);
+ h2.update(new Buffer(parsedSignature.params.signature, 'base64'));
+ h2 = h2.digest();
+
+ /* Node 0.8 returns strings from .digest(). */
+ if (typeof (h1) === 'string')
+ return (h1 === h2);
+ /* And node 0.10 lacks the .equals() method on Buffers. */
+ if (Buffer.isBuffer(h1) && !h1.equals)
+ return (h1.toString('binary') === h2.toString('binary'));
+
+ return (h1.equals(h2));
+ }
+};
diff --git a/node_modules/http-signature/package.json b/node_modules/http-signature/package.json
new file mode 100644
index 0000000..df07d53
--- /dev/null
+++ b/node_modules/http-signature/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "http-signature",
+ "description": "Reference implementation of Joyent's HTTP Signature scheme.",
+ "version": "1.2.0",
+ "license": "MIT",
+ "author": "Joyent, Inc",
+ "contributors": [
+ "Mark Cavage <mcavage@gmail.com>",
+ "David I. Lehn <dil@lehn.org>",
+ "Patrick Mooney <patrick.f.mooney@gmail.com>"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/joyent/node-http-signature.git"
+ },
+ "homepage": "https://github.com/joyent/node-http-signature/",
+ "bugs": "https://github.com/joyent/node-http-signature/issues",
+ "keywords": [
+ "https",
+ "request"
+ ],
+ "engines": {
+ "node": ">=0.8",
+ "npm": ">=1.3.7"
+ },
+ "main": "lib/index.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {
+ "assert-plus": "^1.0.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
+ },
+ "devDependencies": {
+ "tap": "0.4.2",
+ "uuid": "^2.0.2"
+ }
+}
diff --git a/node_modules/http2-wrapper/LICENSE b/node_modules/http2-wrapper/LICENSE
new file mode 100644
index 0000000..15ad2e8
--- /dev/null
+++ b/node_modules/http2-wrapper/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Szymon Marczak
+
+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/http2-wrapper/README.md b/node_modules/http2-wrapper/README.md
new file mode 100644
index 0000000..09b5f48
--- /dev/null
+++ b/node_modules/http2-wrapper/README.md
@@ -0,0 +1,470 @@
+# http2-wrapper
+> HTTP/2 client, just with the familiar `https` API
+
+[![Node CI](https://github.com/szmarczak/http2-wrapper/workflows/Node%20CI/badge.svg)](https://github.com/szmarczak/http2-wrapper/actions)
+[![codecov](https://codecov.io/gh/szmarczak/http2-wrapper/branch/master/graph/badge.svg)](https://codecov.io/gh/szmarczak/http2-wrapper)
+[![npm](https://img.shields.io/npm/dm/http2-wrapper.svg)](https://www.npmjs.com/package/http2-wrapper)
+[![install size](https://packagephobia.now.sh/badge?p=http2-wrapper)](https://packagephobia.now.sh/result?p=http2-wrapper)
+
+This package was created to support HTTP/2 without the need to rewrite your code.<br>
+I recommend adapting to the [`http2`](https://nodejs.org/api/http2.html) module if possible - it's much simpler to use and has many cool features!
+
+**Tip**: `http2-wrapper` is very useful when you rely on other modules that use the HTTP/1 API and you want to support HTTP/2.
+
+**Pro Tip**: While the native `http2` doesn't have agents yet, you can use `http2-wrapper` Agents and still operate on the native HTTP/2 streams.
+
+## Installation
+
+> `$ npm install http2-wrapper`<br>
+> `$ yarn add http2-wrapper`
+
+## Usage
+```js
+const http2 = require('http2-wrapper');
+
+const options = {
+ hostname: 'nghttp2.org',
+ protocol: 'https:',
+ path: '/httpbin/post',
+ method: 'POST',
+ headers: {
+ 'content-length': 6
+ }
+};
+
+const request = http2.request(options, response => {
+ console.log('statusCode:', response.statusCode);
+ console.log('headers:', response.headers);
+
+ const body = [];
+ response.on('data', chunk => {
+ body.push(chunk);
+ });
+ response.on('end', () => {
+ console.log('body:', Buffer.concat(body).toString());
+ });
+});
+
+request.on('error', console.error);
+
+request.write('123');
+request.end('456');
+
+// statusCode: 200
+// headers: [Object: null prototype] {
+// ':status': 200,
+// date: 'Fri, 27 Sep 2019 19:45:46 GMT',
+// 'content-type': 'application/json',
+// 'access-control-allow-origin': '*',
+// 'access-control-allow-credentials': 'true',
+// 'content-length': '239',
+// 'x-backend-header-rtt': '0.002516',
+// 'strict-transport-security': 'max-age=31536000',
+// server: 'nghttpx',
+// via: '1.1 nghttpx',
+// 'alt-svc': 'h3-23=":4433"; ma=3600',
+// 'x-frame-options': 'SAMEORIGIN',
+// 'x-xss-protection': '1; mode=block',
+// 'x-content-type-options': 'nosniff'
+// }
+// body: {
+// "args": {},
+// "data": "123456",
+// "files": {},
+// "form": {},
+// "headers": {
+// "Content-Length": "6",
+// "Host": "nghttp2.org"
+// },
+// "json": 123456,
+// "origin": "xxx.xxx.xxx.xxx",
+// "url": "https://nghttp2.org/httpbin/post"
+// }
+```
+
+## API
+
+**Note:** The `session` option was renamed to `tlsSession` for better readability.
+
+### http2.auto(url, options, callback)
+
+Performs [ALPN](https://nodejs.org/api/tls.html#tls_alpn_and_sni) negotiation.
+Returns a Promise giving proper `ClientRequest` instance (depending on the ALPN).
+
+**Note**: The `agent` option represents an object with `http`, `https` and `http2` properties.
+
+```js
+const http2 = require('http2-wrapper');
+
+const options = {
+ hostname: 'httpbin.org',
+ protocol: 'http:', // Note the `http:` protocol here
+ path: '/post',
+ method: 'POST',
+ headers: {
+ 'content-length': 6
+ }
+};
+
+(async () => {
+ try {
+ const request = await http2.auto(options, response => {
+ console.log('statusCode:', response.statusCode);
+ console.log('headers:', response.headers);
+
+ const body = [];
+ response.on('data', chunk => body.push(chunk));
+ response.on('end', () => {
+ console.log('body:', Buffer.concat(body).toString());
+ });
+ });
+
+ request.on('error', console.error);
+
+ request.write('123');
+ request.end('456');
+ } catch (error) {
+ console.error(error);
+ }
+})();
+
+// statusCode: 200
+// headers: { connection: 'close',
+// server: 'gunicorn/19.9.0',
+// date: 'Sat, 15 Dec 2018 18:19:32 GMT',
+// 'content-type': 'application/json',
+// 'content-length': '259',
+// 'access-control-allow-origin': '*',
+// 'access-control-allow-credentials': 'true',
+// via: '1.1 vegur' }
+// body: {
+// "args": {},
+// "data": "123456",
+// "files": {},
+// "form": {},
+// "headers": {
+// "Connection": "close",
+// "Content-Length": "6",
+// "Host": "httpbin.org"
+// },
+// "json": 123456,
+// "origin": "xxx.xxx.xxx.xxx",
+// "url": "http://httpbin.org/post"
+// }
+```
+
+### http2.auto.protocolCache
+
+An instance of [`quick-lru`](https://github.com/sindresorhus/quick-lru) used for ALPN cache.
+
+There is a maximum of 100 entries. You can modify the limit through `protocolCache.maxSize` - note that the change will be visible globally.
+
+### http2.request(url, options, callback)
+
+Same as [`https.request`](https://nodejs.org/api/https.html#https_https_request_options_callback).
+
+##### options.h2session
+
+Type: `Http2Session`<br>
+
+The session used to make the actual request. If none provided, it will use `options.agent`.
+
+### http2.get(url, options, callback)
+
+Same as [`https.get`](https://nodejs.org/api/https.html#https_https_get_options_callback).
+
+### new http2.ClientRequest(url, options, callback)
+
+Same as [`https.ClientRequest`](https://nodejs.org/api/https.html#https_class_https_clientrequest).
+
+### new http2.IncomingMessage(socket)
+
+Same as [`https.IncomingMessage`](https://nodejs.org/api/https.html#https_class_https_incomingmessage).
+
+### new http2.Agent(options)
+
+**Note:** this is **not** compatible with the classic `http.Agent`.
+
+Usage example:
+
+```js
+const http2 = require('http2-wrapper');
+
+class MyAgent extends http2.Agent {
+ createConnection(origin, options) {
+ console.log(`Connecting to ${http2.Agent.normalizeOrigin(origin)}`);
+ return http2.Agent.connect(origin, options);
+ }
+}
+
+http2.get({
+ hostname: 'google.com',
+ agent: new MyAgent()
+}, res => {
+ res.on('data', chunk => console.log(`Received chunk of ${chunk.length} bytes`));
+});
+```
+
+#### options
+
+Each option is assigned to each `Agent` instance and can be changed later.
+
+##### timeout
+
+Type: `number`<br>
+Default: `60000`
+
+If there's no activity after `timeout` milliseconds, the session will be closed.
+
+##### maxSessions
+
+Type: `number`<br>
+Default: `Infinity`
+
+The maximum amount of sessions in total.
+
+##### maxFreeSessions
+
+Type: `number`<br>
+Default: `10`
+
+The maximum amount of free sessions in total. This only applies to sessions with no pending requests.
+
+**Note:** It is possible that the amount will be exceeded when sessions have at least 1 pending request.
+
+##### maxCachedTlsSessions
+
+Type: `number`<br>
+Default: `100`
+
+The maximum amount of cached TLS sessions.
+
+#### Agent.normalizeOrigin(url)
+
+Returns a string representing the origin of the URL.
+
+#### agent.settings
+
+Type: `object`<br>
+Default: `{enablePush: false}`
+
+[Settings](https://nodejs.org/api/http2.html#http2_settings_object) used by the current agent instance.
+
+#### agent.normalizeOptions([options](https://github.com/szmarczak/http2-wrapper/blob/master/source/agent.js))
+
+Returns a string representing normalized options.
+
+```js
+Agent.normalizeOptions({servername: 'example.com'});
+// => ':example.com'
+```
+
+#### agent.getSession(origin, options)
+
+##### [origin](https://nodejs.org/api/http2.html#http2_http2_connect_authority_options_listener)
+
+Type: `string` `URL` `object`
+
+An origin used to create new session.
+
+##### [options](https://nodejs.org/api/http2.html#http2_http2_connect_authority_options_listener)
+
+Type: `object`
+
+The options used to create new session.
+
+Returns a Promise giving free `Http2Session`. If no free sessions are found, a new one is created.
+
+#### agent.getSession([origin](#origin), [options](options-1), listener)
+
+##### listener
+
+Type: `object`
+
+```
+{
+ reject: error => void,
+ resolve: session => void
+}
+```
+
+If the `listener` argument is present, the Promise will resolve immediately. It will use the `resolve` function to pass the session.
+
+#### agent.request([origin](#origin), [options](#options-1), [headers](https://nodejs.org/api/http2.html#http2_headers_object), [streamOptions](https://nodejs.org/api/http2.html#http2_clienthttp2session_request_headers_options))
+
+Returns a Promise giving `Http2Stream`.
+
+#### agent.createConnection([origin](#origin), [options](#options-1))
+
+Returns a new `TLSSocket`. It defaults to `Agent.connect(origin, options)`.
+
+#### agent.closeFreeSessions()
+
+Makes an attempt to close free sessions. Only sessions with 0 concurrent streams will be closed.
+
+#### agent.destroy(reason)
+
+Destroys **all** sessions.
+
+#### Event: 'session'
+
+```js
+agent.on('session', session => {
+ // A new session has been created by the Agent.
+});
+```
+
+## Proxy support
+
+An example of a full-featured proxy server can be found [here](examples/proxy/server.js). It supports **mirroring, custom authorities and the CONNECT protocol**.
+
+### Mirroring
+
+To mirror another server we need to use only [`http2-proxy`](https://github.com/nxtedition/node-http2-proxy). We don't need the CONNECT protocol or custom authorities.
+
+To see the result, just navigate to the server's address.
+
+### HTTP/1 over HTTP/2
+
+Since we don't care about mirroring, the server needs to support the CONNECT protocol in this case.
+
+The client looks like this:
+
+```js
+const https = require('https');
+const http2 = require('http2');
+
+const session = http2.connect('https://localhost:8000', {
+ // For demo purposes only!
+ rejectUnauthorized: false
+});
+
+session.ref();
+
+https.request('https://httpbin.org/anything', {
+ createConnection: options => {
+ return session.request({
+ ':method': 'CONNECT',
+ ':authority': `${options.host}:${options.port}`
+ });
+ }
+}, response => {
+ console.log('statusCode:', response.statusCode);
+ console.log('headers:', response.headers);
+
+ const body = [];
+ response.on('data', chunk => {
+ body.push(chunk);
+ });
+ response.on('end', () => {
+ console.log('body:', Buffer.concat(body).toString());
+
+ session.unref();
+ });
+}).end();
+```
+
+### HTTP/2 over HTTP/2
+
+It's a tricky one! We cannot create an HTTP/2 session on top of an HTTP/2 stream. But... we can still specify the `:authority` header, no need to use the CONNECT protocol here.
+
+The client looks like this:
+
+```js
+const http2 = require('../../source');
+const {Agent} = http2;
+
+class ProxyAgent extends Agent {
+ constructor(url, options) {
+ super(options);
+
+ this.origin = url;
+ }
+
+ request(origin, sessionOptions, headers, streamOptions) {
+ return super.request(this.origin, sessionOptions, {
+ ...headers,
+ ':authority': (new URL(origin)).host
+ }, streamOptions);
+ }
+}
+
+const request = http2.request({
+ hostname: 'httpbin.org',
+ protocol: 'https:',
+ path: '/anything',
+ agent: new ProxyAgent('https://localhost:8000'),
+ // For demo purposes only!
+ rejectUnauthorized: false
+}, response => {
+ console.log('statusCode:', response.statusCode);
+ console.log('headers:', response.headers);
+
+ const body = [];
+ response.on('data', chunk => {
+ body.push(chunk);
+ });
+ response.on('end', () => {
+ console.log('body:', Buffer.concat(body).toString());
+ });
+});
+
+request.on('error', console.error);
+
+request.end();
+```
+
+## Notes
+
+ - If you're interested in [WebSockets over HTTP/2](https://tools.ietf.org/html/rfc8441), then [check out this discussion](https://github.com/websockets/ws/issues/1458).
+ - [HTTP/2 sockets cannot be malformed](https://github.com/nodejs/node/blob/cc8250fab86486632fdeb63892be735d7628cd13/lib/internal/http2/core.js#L725), therefore modifying the socket will have no effect.
+ - You can make [a custom Agent](examples/push-stream/index.js) to support push streams.
+
+## Benchmarks
+
+CPU: Intel i7-7700k (governor: performance)<br>
+Server: H2O v2.2.5 [`h2o.conf`](h2o.conf)<br>
+Node: v14.5.0
+Linux: 5.6.18-156.current
+
+`auto` means `http2wrapper.auto`.
+
+```
+http2-wrapper x 12,181 ops/sec ±3.39% (75 runs sampled)
+http2-wrapper - preconfigured session x 13,140 ops/sec ±2.51% (79 runs sampled)
+http2-wrapper - auto x 11,412 ops/sec ±2.55% (78 runs sampled)
+http2 x 16,050 ops/sec ±1.39% (86 runs sampled)
+https - auto - keepalive x 12,288 ops/sec ±2.69% (79 runs sampled)
+https - keepalive x 12,155 ops/sec ±3.32% (78 runs sampled)
+https x 1,604 ops/sec ±2.03% (77 runs sampled)
+http x 6,041 ops/sec ±3.82% (76 runs sampled)
+Fastest is http2
+```
+
+`http2-wrapper`:
+- 32% **less** performant than `http2`
+- as performant as `https - keepalive`
+- 100% **more** performant than `http`
+
+`http2-wrapper - preconfigured session`:
+- 22% **less** performant than `http2`
+- 8% **more** performant than `https - keepalive`
+- 118% **more** performant than `http`
+
+`http2-wrapper - auto`:
+- 41% **less** performant than `http2`
+- 8% **less** performant than `https - keepalive`
+- 89% **more** performant than `http`
+
+`https - auto - keepalive`:
+- 31% **less** performant than `http2`
+- as performant as `https - keepalive`
+- 103% **more** performant than `http`
+
+## Related
+
+ - [`got`](https://github.com/sindresorhus/got) - Simplified HTTP requests
+
+## License
+
+MIT
diff --git a/node_modules/http2-wrapper/package.json b/node_modules/http2-wrapper/package.json
new file mode 100644
index 0000000..d47894f
--- /dev/null
+++ b/node_modules/http2-wrapper/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "http2-wrapper",
+ "version": "1.0.3",
+ "description": "HTTP2 client, just with the familiar `https` API",
+ "main": "source",
+ "engines": {
+ "node": ">=10.19.0"
+ },
+ "scripts": {
+ "test": "xo && nyc --reporter=lcovonly --reporter=text --reporter=html ava"
+ },
+ "files": [
+ "source"
+ ],
+ "keywords": [
+ "http2",
+ "https",
+ "http",
+ "request"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/szmarczak/http2-wrapper.git"
+ },
+ "author": "Szymon Marczak",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/szmarczak/http2-wrapper/issues"
+ },
+ "homepage": "https://github.com/szmarczak/http2-wrapper#readme",
+ "dependencies": {
+ "quick-lru": "^5.1.1",
+ "resolve-alpn": "^1.0.0"
+ },
+ "devDependencies": {
+ "@sindresorhus/is": "^3.0.0",
+ "ava": "^3.10.1",
+ "benchmark": "^2.1.4",
+ "get-stream": "^5.1.0",
+ "got": "^11.5.0",
+ "http2-proxy": "^5.0.51",
+ "lolex": "^6.0.0",
+ "many-keys-map": "^1.0.2",
+ "nyc": "^15.1.0",
+ "p-event": "^4.2.0",
+ "tempy": "^0.5.0",
+ "to-readable-stream": "^2.1.0",
+ "tsd": "^0.13.1",
+ "xo": "^0.32.1"
+ },
+ "ava": {
+ "timeout": "2m"
+ }
+}
diff --git a/node_modules/http2-wrapper/source/agent.js b/node_modules/http2-wrapper/source/agent.js
new file mode 100644
index 0000000..b2b1cff
--- /dev/null
+++ b/node_modules/http2-wrapper/source/agent.js
@@ -0,0 +1,670 @@
+'use strict';
+const EventEmitter = require('events');
+const tls = require('tls');
+const http2 = require('http2');
+const QuickLRU = require('quick-lru');
+
+const kCurrentStreamsCount = Symbol('currentStreamsCount');
+const kRequest = Symbol('request');
+const kOriginSet = Symbol('cachedOriginSet');
+const kGracefullyClosing = Symbol('gracefullyClosing');
+
+const nameKeys = [
+ // `http2.connect()` options
+ 'maxDeflateDynamicTableSize',
+ 'maxSessionMemory',
+ 'maxHeaderListPairs',
+ 'maxOutstandingPings',
+ 'maxReservedRemoteStreams',
+ 'maxSendHeaderBlockLength',
+ 'paddingStrategy',
+
+ // `tls.connect()` options
+ 'localAddress',
+ 'path',
+ 'rejectUnauthorized',
+ 'minDHSize',
+
+ // `tls.createSecureContext()` options
+ 'ca',
+ 'cert',
+ 'clientCertEngine',
+ 'ciphers',
+ 'key',
+ 'pfx',
+ 'servername',
+ 'minVersion',
+ 'maxVersion',
+ 'secureProtocol',
+ 'crl',
+ 'honorCipherOrder',
+ 'ecdhCurve',
+ 'dhparam',
+ 'secureOptions',
+ 'sessionIdContext'
+];
+
+const getSortedIndex = (array, value, compare) => {
+ let low = 0;
+ let high = array.length;
+
+ while (low < high) {
+ const mid = (low + high) >>> 1;
+
+ /* istanbul ignore next */
+ if (compare(array[mid], value)) {
+ // This never gets called because we use descending sort. Better to have this anyway.
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+
+ return low;
+};
+
+const compareSessions = (a, b) => {
+ return a.remoteSettings.maxConcurrentStreams > b.remoteSettings.maxConcurrentStreams;
+};
+
+// See https://tools.ietf.org/html/rfc8336
+const closeCoveredSessions = (where, session) => {
+ // Clients SHOULD NOT emit new requests on any connection whose Origin
+ // Set is a proper subset of another connection's Origin Set, and they
+ // SHOULD close it once all outstanding requests are satisfied.
+ for (const coveredSession of where) {
+ if (
+ // The set is a proper subset when its length is less than the other set.
+ coveredSession[kOriginSet].length < session[kOriginSet].length &&
+
+ // And the other set includes all elements of the subset.
+ coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) &&
+
+ // Makes sure that the session can handle all requests from the covered session.
+ coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams
+ ) {
+ // This allows pending requests to finish and prevents making new requests.
+ gracefullyClose(coveredSession);
+ }
+ }
+};
+
+// This is basically inverted `closeCoveredSessions(...)`.
+const closeSessionIfCovered = (where, coveredSession) => {
+ for (const session of where) {
+ if (
+ coveredSession[kOriginSet].length < session[kOriginSet].length &&
+ coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) &&
+ coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams
+ ) {
+ gracefullyClose(coveredSession);
+ }
+ }
+};
+
+const getSessions = ({agent, isFree}) => {
+ const result = {};
+
+ // eslint-disable-next-line guard-for-in
+ for (const normalizedOptions in agent.sessions) {
+ const sessions = agent.sessions[normalizedOptions];
+
+ const filtered = sessions.filter(session => {
+ const result = session[Agent.kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams;
+
+ return isFree ? result : !result;
+ });
+
+ if (filtered.length !== 0) {
+ result[normalizedOptions] = filtered;
+ }
+ }
+
+ return result;
+};
+
+const gracefullyClose = session => {
+ session[kGracefullyClosing] = true;
+
+ if (session[kCurrentStreamsCount] === 0) {
+ session.close();
+ }
+};
+
+class Agent extends EventEmitter {
+ constructor({timeout = 60000, maxSessions = Infinity, maxFreeSessions = 10, maxCachedTlsSessions = 100} = {}) {
+ super();
+
+ // A session is considered busy when its current streams count
+ // is equal to or greater than the `maxConcurrentStreams` value.
+
+ // A session is considered free when its current streams count
+ // is less than the `maxConcurrentStreams` value.
+
+ // SESSIONS[NORMALIZED_OPTIONS] = [];
+ this.sessions = {};
+
+ // The queue for creating new sessions. It looks like this:
+ // QUEUE[NORMALIZED_OPTIONS][NORMALIZED_ORIGIN] = ENTRY_FUNCTION
+ //
+ // The entry function has `listeners`, `completed` and `destroyed` properties.
+ // `listeners` is an array of objects containing `resolve` and `reject` functions.
+ // `completed` is a boolean. It's set to true after ENTRY_FUNCTION is executed.
+ // `destroyed` is a boolean. If it's set to true, the session will be destroyed if hasn't connected yet.
+ this.queue = {};
+
+ // Each session will use this timeout value.
+ this.timeout = timeout;
+
+ // Max sessions in total
+ this.maxSessions = maxSessions;
+
+ // Max free sessions in total
+ // TODO: decreasing `maxFreeSessions` should close some sessions
+ this.maxFreeSessions = maxFreeSessions;
+
+ this._freeSessionsCount = 0;
+ this._sessionsCount = 0;
+
+ // We don't support push streams by default.
+ this.settings = {
+ enablePush: false
+ };
+
+ // Reusing TLS sessions increases performance.
+ this.tlsSessionCache = new QuickLRU({maxSize: maxCachedTlsSessions});
+ }
+
+ static normalizeOrigin(url, servername) {
+ if (typeof url === 'string') {
+ url = new URL(url);
+ }
+
+ if (servername && url.hostname !== servername) {
+ url.hostname = servername;
+ }
+
+ return url.origin;
+ }
+
+ normalizeOptions(options) {
+ let normalized = '';
+
+ if (options) {
+ for (const key of nameKeys) {
+ if (options[key]) {
+ normalized += `:${options[key]}`;
+ }
+ }
+ }
+
+ return normalized;
+ }
+
+ _tryToCreateNewSession(normalizedOptions, normalizedOrigin) {
+ if (!(normalizedOptions in this.queue) || !(normalizedOrigin in this.queue[normalizedOptions])) {
+ return;
+ }
+
+ const item = this.queue[normalizedOptions][normalizedOrigin];
+
+ // The entry function can be run only once.
+ // BUG: The session may be never created when:
+ // - the first condition is false AND
+ // - this function is never called with the same arguments in the future.
+ if (this._sessionsCount < this.maxSessions && !item.completed) {
+ item.completed = true;
+
+ item();
+ }
+ }
+
+ getSession(origin, options, listeners) {
+ return new Promise((resolve, reject) => {
+ if (Array.isArray(listeners)) {
+ listeners = [...listeners];
+
+ // Resolve the current promise ASAP, we're just moving the listeners.
+ // They will be executed at a different time.
+ resolve();
+ } else {
+ listeners = [{resolve, reject}];
+ }
+
+ const normalizedOptions = this.normalizeOptions(options);
+ const normalizedOrigin = Agent.normalizeOrigin(origin, options && options.servername);
+
+ if (normalizedOrigin === undefined) {
+ for (const {reject} of listeners) {
+ reject(new TypeError('The `origin` argument needs to be a string or an URL object'));
+ }
+
+ return;
+ }
+
+ if (normalizedOptions in this.sessions) {
+ const sessions = this.sessions[normalizedOptions];
+
+ let maxConcurrentStreams = -1;
+ let currentStreamsCount = -1;
+ let optimalSession;
+
+ // We could just do this.sessions[normalizedOptions].find(...) but that isn't optimal.
+ // Additionally, we are looking for session which has biggest current pending streams count.
+ for (const session of sessions) {
+ const sessionMaxConcurrentStreams = session.remoteSettings.maxConcurrentStreams;
+
+ if (sessionMaxConcurrentStreams < maxConcurrentStreams) {
+ break;
+ }
+
+ if (session[kOriginSet].includes(normalizedOrigin)) {
+ const sessionCurrentStreamsCount = session[kCurrentStreamsCount];
+
+ if (
+ sessionCurrentStreamsCount >= sessionMaxConcurrentStreams ||
+ session[kGracefullyClosing] ||
+ // Unfortunately the `close` event isn't called immediately,
+ // so `session.destroyed` is `true`, but `session.closed` is `false`.
+ session.destroyed
+ ) {
+ continue;
+ }
+
+ // We only need set this once.
+ if (!optimalSession) {
+ maxConcurrentStreams = sessionMaxConcurrentStreams;
+ }
+
+ // We're looking for the session which has biggest current pending stream count,
+ // in order to minimalize the amount of active sessions.
+ if (sessionCurrentStreamsCount > currentStreamsCount) {
+ optimalSession = session;
+ currentStreamsCount = sessionCurrentStreamsCount;
+ }
+ }
+ }
+
+ if (optimalSession) {
+ /* istanbul ignore next: safety check */
+ if (listeners.length !== 1) {
+ for (const {reject} of listeners) {
+ const error = new Error(
+ `Expected the length of listeners to be 1, got ${listeners.length}.\n` +
+ 'Please report this to https://github.com/szmarczak/http2-wrapper/'
+ );
+
+ reject(error);
+ }
+
+ return;
+ }
+
+ listeners[0].resolve(optimalSession);
+ return;
+ }
+ }
+
+ if (normalizedOptions in this.queue) {
+ if (normalizedOrigin in this.queue[normalizedOptions]) {
+ // There's already an item in the queue, just attach ourselves to it.
+ this.queue[normalizedOptions][normalizedOrigin].listeners.push(...listeners);
+
+ // This shouldn't be executed here.
+ // See the comment inside _tryToCreateNewSession.
+ this._tryToCreateNewSession(normalizedOptions, normalizedOrigin);
+ return;
+ }
+ } else {
+ this.queue[normalizedOptions] = {};
+ }
+
+ // The entry must be removed from the queue IMMEDIATELY when:
+ // 1. the session connects successfully,
+ // 2. an error occurs.
+ const removeFromQueue = () => {
+ // Our entry can be replaced. We cannot remove the new one.
+ if (normalizedOptions in this.queue && this.queue[normalizedOptions][normalizedOrigin] === entry) {
+ delete this.queue[normalizedOptions][normalizedOrigin];
+
+ if (Object.keys(this.queue[normalizedOptions]).length === 0) {
+ delete this.queue[normalizedOptions];
+ }
+ }
+ };
+
+ // The main logic is here
+ const entry = () => {
+ const name = `${normalizedOrigin}:${normalizedOptions}`;
+ let receivedSettings = false;
+
+ try {
+ const session = http2.connect(origin, {
+ createConnection: this.createConnection,
+ settings: this.settings,
+ session: this.tlsSessionCache.get(name),
+ ...options
+ });
+ session[kCurrentStreamsCount] = 0;
+ session[kGracefullyClosing] = false;
+
+ const isFree = () => session[kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams;
+ let wasFree = true;
+
+ session.socket.once('session', tlsSession => {
+ this.tlsSessionCache.set(name, tlsSession);
+ });
+
+ session.once('error', error => {
+ // Listeners are empty when the session successfully connected.
+ for (const {reject} of listeners) {
+ reject(error);
+ }
+
+ // The connection got broken, purge the cache.
+ this.tlsSessionCache.delete(name);
+ });
+
+ session.setTimeout(this.timeout, () => {
+ // Terminates all streams owned by this session.
+ // TODO: Maybe the streams should have a "Session timed out" error?
+ session.destroy();
+ });
+
+ session.once('close', () => {
+ if (receivedSettings) {
+ // 1. If it wasn't free then no need to decrease because
+ // it has been decreased already in session.request().
+ // 2. `stream.once('close')` won't increment the count
+ // because the session is already closed.
+ if (wasFree) {
+ this._freeSessionsCount--;
+ }
+
+ this._sessionsCount--;
+
+ // This cannot be moved to the stream logic,
+ // because there may be a session that hadn't made a single request.
+ const where = this.sessions[normalizedOptions];
+ where.splice(where.indexOf(session), 1);
+
+ if (where.length === 0) {
+ delete this.sessions[normalizedOptions];
+ }
+ } else {
+ // Broken connection
+ const error = new Error('Session closed without receiving a SETTINGS frame');
+ error.code = 'HTTP2WRAPPER_NOSETTINGS';
+
+ for (const {reject} of listeners) {
+ reject(error);
+ }
+
+ removeFromQueue();
+ }
+
+ // There may be another session awaiting.
+ this._tryToCreateNewSession(normalizedOptions, normalizedOrigin);
+ });
+
+ // Iterates over the queue and processes listeners.
+ const processListeners = () => {
+ if (!(normalizedOptions in this.queue) || !isFree()) {
+ return;
+ }
+
+ for (const origin of session[kOriginSet]) {
+ if (origin in this.queue[normalizedOptions]) {
+ const {listeners} = this.queue[normalizedOptions][origin];
+
+ // Prevents session overloading.
+ while (listeners.length !== 0 && isFree()) {
+ // We assume `resolve(...)` calls `request(...)` *directly*,
+ // otherwise the session will get overloaded.
+ listeners.shift().resolve(session);
+ }
+
+ const where = this.queue[normalizedOptions];
+ if (where[origin].listeners.length === 0) {
+ delete where[origin];
+
+ if (Object.keys(where).length === 0) {
+ delete this.queue[normalizedOptions];
+ break;
+ }
+ }
+
+ // We're no longer free, no point in continuing.
+ if (!isFree()) {
+ break;
+ }
+ }
+ }
+ };
+
+ // The Origin Set cannot shrink. No need to check if it suddenly became covered by another one.
+ session.on('origin', () => {
+ session[kOriginSet] = session.originSet;
+
+ if (!isFree()) {
+ // The session is full.
+ return;
+ }
+
+ processListeners();
+
+ // Close covered sessions (if possible).
+ closeCoveredSessions(this.sessions[normalizedOptions], session);
+ });
+
+ session.once('remoteSettings', () => {
+ // Fix Node.js bug preventing the process from exiting
+ session.ref();
+ session.unref();
+
+ this._sessionsCount++;
+
+ // The Agent could have been destroyed already.
+ if (entry.destroyed) {
+ const error = new Error('Agent has been destroyed');
+
+ for (const listener of listeners) {
+ listener.reject(error);
+ }
+
+ session.destroy();
+ return;
+ }
+
+ session[kOriginSet] = session.originSet;
+
+ {
+ const where = this.sessions;
+
+ if (normalizedOptions in where) {
+ const sessions = where[normalizedOptions];
+ sessions.splice(getSortedIndex(sessions, session, compareSessions), 0, session);
+ } else {
+ where[normalizedOptions] = [session];
+ }
+ }
+
+ this._freeSessionsCount += 1;
+ receivedSettings = true;
+
+ this.emit('session', session);
+
+ processListeners();
+ removeFromQueue();
+
+ // TODO: Close last recently used (or least used?) session
+ if (session[kCurrentStreamsCount] === 0 && this._freeSessionsCount > this.maxFreeSessions) {
+ session.close();
+ }
+
+ // Check if we haven't managed to execute all listeners.
+ if (listeners.length !== 0) {
+ // Request for a new session with predefined listeners.
+ this.getSession(normalizedOrigin, options, listeners);
+ listeners.length = 0;
+ }
+
+ // `session.remoteSettings.maxConcurrentStreams` might get increased
+ session.on('remoteSettings', () => {
+ processListeners();
+
+ // In case the Origin Set changes
+ closeCoveredSessions(this.sessions[normalizedOptions], session);
+ });
+ });
+
+ // Shim `session.request()` in order to catch all streams
+ session[kRequest] = session.request;
+ session.request = (headers, streamOptions) => {
+ if (session[kGracefullyClosing]) {
+ throw new Error('The session is gracefully closing. No new streams are allowed.');
+ }
+
+ const stream = session[kRequest](headers, streamOptions);
+
+ // The process won't exit until the session is closed or all requests are gone.
+ session.ref();
+
+ ++session[kCurrentStreamsCount];
+
+ if (session[kCurrentStreamsCount] === session.remoteSettings.maxConcurrentStreams) {
+ this._freeSessionsCount--;
+ }
+
+ stream.once('close', () => {
+ wasFree = isFree();
+
+ --session[kCurrentStreamsCount];
+
+ if (!session.destroyed && !session.closed) {
+ closeSessionIfCovered(this.sessions[normalizedOptions], session);
+
+ if (isFree() && !session.closed) {
+ if (!wasFree) {
+ this._freeSessionsCount++;
+
+ wasFree = true;
+ }
+
+ const isEmpty = session[kCurrentStreamsCount] === 0;
+
+ if (isEmpty) {
+ session.unref();
+ }
+
+ if (
+ isEmpty &&
+ (
+ this._freeSessionsCount > this.maxFreeSessions ||
+ session[kGracefullyClosing]
+ )
+ ) {
+ session.close();
+ } else {
+ closeCoveredSessions(this.sessions[normalizedOptions], session);
+ processListeners();
+ }
+ }
+ }
+ });
+
+ return stream;
+ };
+ } catch (error) {
+ for (const listener of listeners) {
+ listener.reject(error);
+ }
+
+ removeFromQueue();
+ }
+ };
+
+ entry.listeners = listeners;
+ entry.completed = false;
+ entry.destroyed = false;
+
+ this.queue[normalizedOptions][normalizedOrigin] = entry;
+ this._tryToCreateNewSession(normalizedOptions, normalizedOrigin);
+ });
+ }
+
+ request(origin, options, headers, streamOptions) {
+ return new Promise((resolve, reject) => {
+ this.getSession(origin, options, [{
+ reject,
+ resolve: session => {
+ try {
+ resolve(session.request(headers, streamOptions));
+ } catch (error) {
+ reject(error);
+ }
+ }
+ }]);
+ });
+ }
+
+ createConnection(origin, options) {
+ return Agent.connect(origin, options);
+ }
+
+ static connect(origin, options) {
+ options.ALPNProtocols = ['h2'];
+
+ const port = origin.port || 443;
+ const host = origin.hostname || origin.host;
+
+ if (typeof options.servername === 'undefined') {
+ options.servername = host;
+ }
+
+ return tls.connect(port, host, options);
+ }
+
+ closeFreeSessions() {
+ for (const sessions of Object.values(this.sessions)) {
+ for (const session of sessions) {
+ if (session[kCurrentStreamsCount] === 0) {
+ session.close();
+ }
+ }
+ }
+ }
+
+ destroy(reason) {
+ for (const sessions of Object.values(this.sessions)) {
+ for (const session of sessions) {
+ session.destroy(reason);
+ }
+ }
+
+ for (const entriesOfAuthority of Object.values(this.queue)) {
+ for (const entry of Object.values(entriesOfAuthority)) {
+ entry.destroyed = true;
+ }
+ }
+
+ // New requests should NOT attach to destroyed sessions
+ this.queue = {};
+ }
+
+ get freeSessions() {
+ return getSessions({agent: this, isFree: true});
+ }
+
+ get busySessions() {
+ return getSessions({agent: this, isFree: false});
+ }
+}
+
+Agent.kCurrentStreamsCount = kCurrentStreamsCount;
+Agent.kGracefullyClosing = kGracefullyClosing;
+
+module.exports = {
+ Agent,
+ globalAgent: new Agent()
+};
diff --git a/node_modules/http2-wrapper/source/auto.js b/node_modules/http2-wrapper/source/auto.js
new file mode 100644
index 0000000..af4e9ba
--- /dev/null
+++ b/node_modules/http2-wrapper/source/auto.js
@@ -0,0 +1,149 @@
+'use strict';
+const http = require('http');
+const https = require('https');
+const resolveALPN = require('resolve-alpn');
+const QuickLRU = require('quick-lru');
+const Http2ClientRequest = require('./client-request');
+const calculateServerName = require('./utils/calculate-server-name');
+const urlToOptions = require('./utils/url-to-options');
+
+const cache = new QuickLRU({maxSize: 100});
+const queue = new Map();
+
+const installSocket = (agent, socket, options) => {
+ socket._httpMessage = {shouldKeepAlive: true};
+
+ const onFree = () => {
+ agent.emit('free', socket, options);
+ };
+
+ socket.on('free', onFree);
+
+ const onClose = () => {
+ agent.removeSocket(socket, options);
+ };
+
+ socket.on('close', onClose);
+
+ const onRemove = () => {
+ agent.removeSocket(socket, options);
+ socket.off('close', onClose);
+ socket.off('free', onFree);
+ socket.off('agentRemove', onRemove);
+ };
+
+ socket.on('agentRemove', onRemove);
+
+ agent.emit('free', socket, options);
+};
+
+const resolveProtocol = async options => {
+ const name = `${options.host}:${options.port}:${options.ALPNProtocols.sort()}`;
+
+ if (!cache.has(name)) {
+ if (queue.has(name)) {
+ const result = await queue.get(name);
+ return result.alpnProtocol;
+ }
+
+ const {path, agent} = options;
+ options.path = options.socketPath;
+
+ const resultPromise = resolveALPN(options);
+ queue.set(name, resultPromise);
+
+ try {
+ const {socket, alpnProtocol} = await resultPromise;
+ cache.set(name, alpnProtocol);
+
+ options.path = path;
+
+ if (alpnProtocol === 'h2') {
+ // https://github.com/nodejs/node/issues/33343
+ socket.destroy();
+ } else {
+ const {globalAgent} = https;
+ const defaultCreateConnection = https.Agent.prototype.createConnection;
+
+ if (agent) {
+ if (agent.createConnection === defaultCreateConnection) {
+ installSocket(agent, socket, options);
+ } else {
+ socket.destroy();
+ }
+ } else if (globalAgent.createConnection === defaultCreateConnection) {
+ installSocket(globalAgent, socket, options);
+ } else {
+ socket.destroy();
+ }
+ }
+
+ queue.delete(name);
+
+ return alpnProtocol;
+ } catch (error) {
+ queue.delete(name);
+
+ throw error;
+ }
+ }
+
+ return cache.get(name);
+};
+
+module.exports = async (input, options, callback) => {
+ if (typeof input === 'string' || input instanceof URL) {
+ input = urlToOptions(new URL(input));
+ }
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = undefined;
+ }
+
+ options = {
+ ALPNProtocols: ['h2', 'http/1.1'],
+ ...input,
+ ...options,
+ resolveSocket: true
+ };
+
+ if (!Array.isArray(options.ALPNProtocols) || options.ALPNProtocols.length === 0) {
+ throw new Error('The `ALPNProtocols` option must be an Array with at least one entry');
+ }
+
+ options.protocol = options.protocol || 'https:';
+ const isHttps = options.protocol === 'https:';
+
+ options.host = options.hostname || options.host || 'localhost';
+ options.session = options.tlsSession;
+ options.servername = options.servername || calculateServerName(options);
+ options.port = options.port || (isHttps ? 443 : 80);
+ options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent;
+
+ const agents = options.agent;
+
+ if (agents) {
+ if (agents.addRequest) {
+ throw new Error('The `options.agent` object can contain only `http`, `https` or `http2` properties');
+ }
+
+ options.agent = agents[isHttps ? 'https' : 'http'];
+ }
+
+ if (isHttps) {
+ const protocol = await resolveProtocol(options);
+
+ if (protocol === 'h2') {
+ if (agents) {
+ options.agent = agents.http2;
+ }
+
+ return new Http2ClientRequest(options, callback);
+ }
+ }
+
+ return http.request(options, callback);
+};
+
+module.exports.protocolCache = cache;
diff --git a/node_modules/http2-wrapper/source/client-request.js b/node_modules/http2-wrapper/source/client-request.js
new file mode 100644
index 0000000..b712967
--- /dev/null
+++ b/node_modules/http2-wrapper/source/client-request.js
@@ -0,0 +1,445 @@
+'use strict';
+const http2 = require('http2');
+const {Writable} = require('stream');
+const {Agent, globalAgent} = require('./agent');
+const IncomingMessage = require('./incoming-message');
+const urlToOptions = require('./utils/url-to-options');
+const proxyEvents = require('./utils/proxy-events');
+const isRequestPseudoHeader = require('./utils/is-request-pseudo-header');
+const {
+ ERR_INVALID_ARG_TYPE,
+ ERR_INVALID_PROTOCOL,
+ ERR_HTTP_HEADERS_SENT,
+ ERR_INVALID_HTTP_TOKEN,
+ ERR_HTTP_INVALID_HEADER_VALUE,
+ ERR_INVALID_CHAR
+} = require('./utils/errors');
+
+const {
+ HTTP2_HEADER_STATUS,
+ HTTP2_HEADER_METHOD,
+ HTTP2_HEADER_PATH,
+ HTTP2_METHOD_CONNECT
+} = http2.constants;
+
+const kHeaders = Symbol('headers');
+const kOrigin = Symbol('origin');
+const kSession = Symbol('session');
+const kOptions = Symbol('options');
+const kFlushedHeaders = Symbol('flushedHeaders');
+const kJobs = Symbol('jobs');
+
+const isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/;
+const isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/;
+
+class ClientRequest extends Writable {
+ constructor(input, options, callback) {
+ super({
+ autoDestroy: false
+ });
+
+ const hasInput = typeof input === 'string' || input instanceof URL;
+ if (hasInput) {
+ input = urlToOptions(input instanceof URL ? input : new URL(input));
+ }
+
+ if (typeof options === 'function' || options === undefined) {
+ // (options, callback)
+ callback = options;
+ options = hasInput ? input : {...input};
+ } else {
+ // (input, options, callback)
+ options = {...input, ...options};
+ }
+
+ if (options.h2session) {
+ this[kSession] = options.h2session;
+ } else if (options.agent === false) {
+ this.agent = new Agent({maxFreeSessions: 0});
+ } else if (typeof options.agent === 'undefined' || options.agent === null) {
+ if (typeof options.createConnection === 'function') {
+ // This is a workaround - we don't have to create the session on our own.
+ this.agent = new Agent({maxFreeSessions: 0});
+ this.agent.createConnection = options.createConnection;
+ } else {
+ this.agent = globalAgent;
+ }
+ } else if (typeof options.agent.request === 'function') {
+ this.agent = options.agent;
+ } else {
+ throw new ERR_INVALID_ARG_TYPE('options.agent', ['Agent-like Object', 'undefined', 'false'], options.agent);
+ }
+
+ if (options.protocol && options.protocol !== 'https:') {
+ throw new ERR_INVALID_PROTOCOL(options.protocol, 'https:');
+ }
+
+ const port = options.port || options.defaultPort || (this.agent && this.agent.defaultPort) || 443;
+ const host = options.hostname || options.host || 'localhost';
+
+ // Don't enforce the origin via options. It may be changed in an Agent.
+ delete options.hostname;
+ delete options.host;
+ delete options.port;
+
+ const {timeout} = options;
+ options.timeout = undefined;
+
+ this[kHeaders] = Object.create(null);
+ this[kJobs] = [];
+
+ this.socket = null;
+ this.connection = null;
+
+ this.method = options.method || 'GET';
+ this.path = options.path;
+
+ this.res = null;
+ this.aborted = false;
+ this.reusedSocket = false;
+
+ if (options.headers) {
+ for (const [header, value] of Object.entries(options.headers)) {
+ this.setHeader(header, value);
+ }
+ }
+
+ if (options.auth && !('authorization' in this[kHeaders])) {
+ this[kHeaders].authorization = 'Basic ' + Buffer.from(options.auth).toString('base64');
+ }
+
+ options.session = options.tlsSession;
+ options.path = options.socketPath;
+
+ this[kOptions] = options;
+
+ // Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field.
+ if (port === 443) {
+ this[kOrigin] = `https://${host}`;
+
+ if (!(':authority' in this[kHeaders])) {
+ this[kHeaders][':authority'] = host;
+ }
+ } else {
+ this[kOrigin] = `https://${host}:${port}`;
+
+ if (!(':authority' in this[kHeaders])) {
+ this[kHeaders][':authority'] = `${host}:${port}`;
+ }
+ }
+
+ if (timeout) {
+ this.setTimeout(timeout);
+ }
+
+ if (callback) {
+ this.once('response', callback);
+ }
+
+ this[kFlushedHeaders] = false;
+ }
+
+ get method() {
+ return this[kHeaders][HTTP2_HEADER_METHOD];
+ }
+
+ set method(value) {
+ if (value) {
+ this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase();
+ }
+ }
+
+ get path() {
+ return this[kHeaders][HTTP2_HEADER_PATH];
+ }
+
+ set path(value) {
+ if (value) {
+ this[kHeaders][HTTP2_HEADER_PATH] = value;
+ }
+ }
+
+ get _mustNotHaveABody() {
+ return this.method === 'GET' || this.method === 'HEAD' || this.method === 'DELETE';
+ }
+
+ _write(chunk, encoding, callback) {
+ // https://github.com/nodejs/node/blob/654df09ae0c5e17d1b52a900a545f0664d8c7627/lib/internal/http2/util.js#L148-L156
+ if (this._mustNotHaveABody) {
+ callback(new Error('The GET, HEAD and DELETE methods must NOT have a body'));
+ /* istanbul ignore next: Node.js 12 throws directly */
+ return;
+ }
+
+ this.flushHeaders();
+
+ const callWrite = () => this._request.write(chunk, encoding, callback);
+ if (this._request) {
+ callWrite();
+ } else {
+ this[kJobs].push(callWrite);
+ }
+ }
+
+ _final(callback) {
+ if (this.destroyed) {
+ return;
+ }
+
+ this.flushHeaders();
+
+ const callEnd = () => {
+ // For GET, HEAD and DELETE
+ if (this._mustNotHaveABody) {
+ callback();
+ return;
+ }
+
+ this._request.end(callback);
+ };
+
+ if (this._request) {
+ callEnd();
+ } else {
+ this[kJobs].push(callEnd);
+ }
+ }
+
+ abort() {
+ if (this.res && this.res.complete) {
+ return;
+ }
+
+ if (!this.aborted) {
+ process.nextTick(() => this.emit('abort'));
+ }
+
+ this.aborted = true;
+
+ this.destroy();
+ }
+
+ _destroy(error, callback) {
+ if (this.res) {
+ this.res._dump();
+ }
+
+ if (this._request) {
+ this._request.destroy();
+ }
+
+ callback(error);
+ }
+
+ async flushHeaders() {
+ if (this[kFlushedHeaders] || this.destroyed) {
+ return;
+ }
+
+ this[kFlushedHeaders] = true;
+
+ const isConnectMethod = this.method === HTTP2_METHOD_CONNECT;
+
+ // The real magic is here
+ const onStream = stream => {
+ this._request = stream;
+
+ if (this.destroyed) {
+ stream.destroy();
+ return;
+ }
+
+ // Forwards `timeout`, `continue`, `close` and `error` events to this instance.
+ if (!isConnectMethod) {
+ proxyEvents(stream, this, ['timeout', 'continue', 'close', 'error']);
+ }
+
+ // Wait for the `finish` event. We don't want to emit the `response` event
+ // before `request.end()` is called.
+ const waitForEnd = fn => {
+ return (...args) => {
+ if (!this.writable && !this.destroyed) {
+ fn(...args);
+ } else {
+ this.once('finish', () => {
+ fn(...args);
+ });
+ }
+ };
+ };
+
+ // This event tells we are ready to listen for the data.
+ stream.once('response', waitForEnd((headers, flags, rawHeaders) => {
+ // If we were to emit raw request stream, it would be as fast as the native approach.
+ // Note that wrapping the raw stream in a Proxy instance won't improve the performance (already tested it).
+ const response = new IncomingMessage(this.socket, stream.readableHighWaterMark);
+ this.res = response;
+
+ response.req = this;
+ response.statusCode = headers[HTTP2_HEADER_STATUS];
+ response.headers = headers;
+ response.rawHeaders = rawHeaders;
+
+ response.once('end', () => {
+ if (this.aborted) {
+ response.aborted = true;
+ response.emit('aborted');
+ } else {
+ response.complete = true;
+
+ // Has no effect, just be consistent with the Node.js behavior
+ response.socket = null;
+ response.connection = null;
+ }
+ });
+
+ if (isConnectMethod) {
+ response.upgrade = true;
+
+ // The HTTP1 API says the socket is detached here,
+ // but we can't do that so we pass the original HTTP2 request.
+ if (this.emit('connect', response, stream, Buffer.alloc(0))) {
+ this.emit('close');
+ } else {
+ // No listeners attached, destroy the original request.
+ stream.destroy();
+ }
+ } else {
+ // Forwards data
+ stream.on('data', chunk => {
+ if (!response._dumped && !response.push(chunk)) {
+ stream.pause();
+ }
+ });
+
+ stream.once('end', () => {
+ response.push(null);
+ });
+
+ if (!this.emit('response', response)) {
+ // No listeners attached, dump the response.
+ response._dump();
+ }
+ }
+ }));
+
+ // Emits `information` event
+ stream.once('headers', waitForEnd(
+ headers => this.emit('information', {statusCode: headers[HTTP2_HEADER_STATUS]})
+ ));
+
+ stream.once('trailers', waitForEnd((trailers, flags, rawTrailers) => {
+ const {res} = this;
+
+ // Assigns trailers to the response object.
+ res.trailers = trailers;
+ res.rawTrailers = rawTrailers;
+ }));
+
+ const {socket} = stream.session;
+ this.socket = socket;
+ this.connection = socket;
+
+ for (const job of this[kJobs]) {
+ job();
+ }
+
+ this.emit('socket', this.socket);
+ };
+
+ // Makes a HTTP2 request
+ if (this[kSession]) {
+ try {
+ onStream(this[kSession].request(this[kHeaders]));
+ } catch (error) {
+ this.emit('error', error);
+ }
+ } else {
+ this.reusedSocket = true;
+
+ try {
+ onStream(await this.agent.request(this[kOrigin], this[kOptions], this[kHeaders]));
+ } catch (error) {
+ this.emit('error', error);
+ }
+ }
+ }
+
+ getHeader(name) {
+ if (typeof name !== 'string') {
+ throw new ERR_INVALID_ARG_TYPE('name', 'string', name);
+ }
+
+ return this[kHeaders][name.toLowerCase()];
+ }
+
+ get headersSent() {
+ return this[kFlushedHeaders];
+ }
+
+ removeHeader(name) {
+ if (typeof name !== 'string') {
+ throw new ERR_INVALID_ARG_TYPE('name', 'string', name);
+ }
+
+ if (this.headersSent) {
+ throw new ERR_HTTP_HEADERS_SENT('remove');
+ }
+
+ delete this[kHeaders][name.toLowerCase()];
+ }
+
+ setHeader(name, value) {
+ if (this.headersSent) {
+ throw new ERR_HTTP_HEADERS_SENT('set');
+ }
+
+ if (typeof name !== 'string' || (!isValidHttpToken.test(name) && !isRequestPseudoHeader(name))) {
+ throw new ERR_INVALID_HTTP_TOKEN('Header name', name);
+ }
+
+ if (typeof value === 'undefined') {
+ throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name);
+ }
+
+ if (isInvalidHeaderValue.test(value)) {
+ throw new ERR_INVALID_CHAR('header content', name);
+ }
+
+ this[kHeaders][name.toLowerCase()] = value;
+ }
+
+ setNoDelay() {
+ // HTTP2 sockets cannot be malformed, do nothing.
+ }
+
+ setSocketKeepAlive() {
+ // HTTP2 sockets cannot be malformed, do nothing.
+ }
+
+ setTimeout(ms, callback) {
+ const applyTimeout = () => this._request.setTimeout(ms, callback);
+
+ if (this._request) {
+ applyTimeout();
+ } else {
+ this[kJobs].push(applyTimeout);
+ }
+
+ return this;
+ }
+
+ get maxHeadersCount() {
+ if (!this.destroyed && this._request) {
+ return this._request.session.localSettings.maxHeaderListSize;
+ }
+
+ return undefined;
+ }
+
+ set maxHeadersCount(_value) {
+ // Updating HTTP2 settings would affect all requests, do nothing.
+ }
+}
+
+module.exports = ClientRequest;
diff --git a/node_modules/http2-wrapper/source/incoming-message.js b/node_modules/http2-wrapper/source/incoming-message.js
new file mode 100644
index 0000000..7d5c0d3
--- /dev/null
+++ b/node_modules/http2-wrapper/source/incoming-message.js
@@ -0,0 +1,58 @@
+'use strict';
+const {Readable} = require('stream');
+
+class IncomingMessage extends Readable {
+ constructor(socket, highWaterMark) {
+ super({
+ highWaterMark,
+ autoDestroy: false
+ });
+
+ this.statusCode = null;
+ this.statusMessage = '';
+ this.httpVersion = '2.0';
+ this.httpVersionMajor = 2;
+ this.httpVersionMinor = 0;
+ this.headers = {};
+ this.trailers = {};
+ this.req = null;
+
+ this.aborted = false;
+ this.complete = false;
+ this.upgrade = null;
+
+ this.rawHeaders = [];
+ this.rawTrailers = [];
+
+ this.socket = socket;
+ this.connection = socket;
+
+ this._dumped = false;
+ }
+
+ _destroy(error) {
+ this.req._request.destroy(error);
+ }
+
+ setTimeout(ms, callback) {
+ this.req.setTimeout(ms, callback);
+ return this;
+ }
+
+ _dump() {
+ if (!this._dumped) {
+ this._dumped = true;
+
+ this.removeAllListeners('data');
+ this.resume();
+ }
+ }
+
+ _read() {
+ if (this.req) {
+ this.req._request.resume();
+ }
+ }
+}
+
+module.exports = IncomingMessage;
diff --git a/node_modules/http2-wrapper/source/index.js b/node_modules/http2-wrapper/source/index.js
new file mode 100644
index 0000000..fb83349
--- /dev/null
+++ b/node_modules/http2-wrapper/source/index.js
@@ -0,0 +1,28 @@
+'use strict';
+const http2 = require('http2');
+const agent = require('./agent');
+const ClientRequest = require('./client-request');
+const IncomingMessage = require('./incoming-message');
+const auto = require('./auto');
+
+const request = (url, options, callback) => {
+ return new ClientRequest(url, options, callback);
+};
+
+const get = (url, options, callback) => {
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ const req = new ClientRequest(url, options, callback);
+ req.end();
+
+ return req;
+};
+
+module.exports = {
+ ...http2,
+ ClientRequest,
+ IncomingMessage,
+ ...agent,
+ request,
+ get,
+ auto
+};
diff --git a/node_modules/http2-wrapper/source/utils/calculate-server-name.js b/node_modules/http2-wrapper/source/utils/calculate-server-name.js
new file mode 100644
index 0000000..b05c099
--- /dev/null
+++ b/node_modules/http2-wrapper/source/utils/calculate-server-name.js
@@ -0,0 +1,27 @@
+'use strict';
+const net = require('net');
+/* istanbul ignore file: https://github.com/nodejs/node/blob/v13.0.1/lib/_http_agent.js */
+
+module.exports = options => {
+ let servername = options.host;
+ const hostHeader = options.headers && options.headers.host;
+
+ if (hostHeader) {
+ if (hostHeader.startsWith('[')) {
+ const index = hostHeader.indexOf(']');
+ if (index === -1) {
+ servername = hostHeader;
+ } else {
+ servername = hostHeader.slice(1, -1);
+ }
+ } else {
+ servername = hostHeader.split(':', 1)[0];
+ }
+ }
+
+ if (net.isIP(servername)) {
+ return '';
+ }
+
+ return servername;
+};
diff --git a/node_modules/http2-wrapper/source/utils/errors.js b/node_modules/http2-wrapper/source/utils/errors.js
new file mode 100644
index 0000000..5018283
--- /dev/null
+++ b/node_modules/http2-wrapper/source/utils/errors.js
@@ -0,0 +1,45 @@
+'use strict';
+/* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */
+
+const makeError = (Base, key, getMessage) => {
+ module.exports[key] = class NodeError extends Base {
+ constructor(...args) {
+ super(typeof getMessage === 'string' ? getMessage : getMessage(args));
+ this.name = `${super.name} [${key}]`;
+ this.code = key;
+ }
+ };
+};
+
+makeError(TypeError, 'ERR_INVALID_ARG_TYPE', args => {
+ const type = args[0].includes('.') ? 'property' : 'argument';
+
+ let valid = args[1];
+ const isManyTypes = Array.isArray(valid);
+
+ if (isManyTypes) {
+ valid = `${valid.slice(0, -1).join(', ')} or ${valid.slice(-1)}`;
+ }
+
+ return `The "${args[0]}" ${type} must be ${isManyTypes ? 'one of' : 'of'} type ${valid}. Received ${typeof args[2]}`;
+});
+
+makeError(TypeError, 'ERR_INVALID_PROTOCOL', args => {
+ return `Protocol "${args[0]}" not supported. Expected "${args[1]}"`;
+});
+
+makeError(Error, 'ERR_HTTP_HEADERS_SENT', args => {
+ return `Cannot ${args[0]} headers after they are sent to the client`;
+});
+
+makeError(TypeError, 'ERR_INVALID_HTTP_TOKEN', args => {
+ return `${args[0]} must be a valid HTTP token [${args[1]}]`;
+});
+
+makeError(TypeError, 'ERR_HTTP_INVALID_HEADER_VALUE', args => {
+ return `Invalid value "${args[0]} for header "${args[1]}"`;
+});
+
+makeError(TypeError, 'ERR_INVALID_CHAR', args => {
+ return `Invalid character in ${args[0]} [${args[1]}]`;
+});
diff --git a/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js b/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js
new file mode 100644
index 0000000..bed31cd
--- /dev/null
+++ b/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js
@@ -0,0 +1,13 @@
+'use strict';
+
+module.exports = header => {
+ switch (header) {
+ case ':method':
+ case ':scheme':
+ case ':authority':
+ case ':path':
+ return true;
+ default:
+ return false;
+ }
+};
diff --git a/node_modules/http2-wrapper/source/utils/proxy-events.js b/node_modules/http2-wrapper/source/utils/proxy-events.js
new file mode 100644
index 0000000..35e2ae0
--- /dev/null
+++ b/node_modules/http2-wrapper/source/utils/proxy-events.js
@@ -0,0 +1,7 @@
+'use strict';
+
+module.exports = (from, to, events) => {
+ for (const event of events) {
+ from.on(event, (...args) => to.emit(event, ...args));
+ }
+};
diff --git a/node_modules/http2-wrapper/source/utils/url-to-options.js b/node_modules/http2-wrapper/source/utils/url-to-options.js
new file mode 100644
index 0000000..36d1580
--- /dev/null
+++ b/node_modules/http2-wrapper/source/utils/url-to-options.js
@@ -0,0 +1,25 @@
+'use strict';
+/* istanbul ignore file: https://github.com/nodejs/node/blob/a91293d4d9ab403046ab5eb022332e4e3d249bd3/lib/internal/url.js#L1257 */
+
+module.exports = url => {
+ const options = {
+ protocol: url.protocol,
+ hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname,
+ host: url.host,
+ hash: url.hash,
+ search: url.search,
+ pathname: url.pathname,
+ href: url.href,
+ path: `${url.pathname || ''}${url.search || ''}`
+ };
+
+ if (typeof url.port === 'string' && url.port.length !== 0) {
+ options.port = Number(url.port);
+ }
+
+ if (url.username || url.password) {
+ options.auth = `${url.username || ''}:${url.password || ''}`;
+ }
+
+ return options;
+};
diff --git a/node_modules/indent-string/index.js b/node_modules/indent-string/index.js
new file mode 100644
index 0000000..4a21687
--- /dev/null
+++ b/node_modules/indent-string/index.js
@@ -0,0 +1,20 @@
+'use strict';
+var repeating = require('repeating');
+
+module.exports = function (str, indent, count) {
+ if (typeof str !== 'string' || typeof indent !== 'string') {
+ throw new TypeError('`string` and `indent` should be strings');
+ }
+
+ if (count != null && typeof count !== 'number') {
+ throw new TypeError('`count` should be a number');
+ }
+
+ if (count === 0) {
+ return str;
+ }
+
+ indent = count > 1 ? repeating(indent, count) : indent;
+
+ return str.replace(/^(?!\s*$)/mg, indent);
+};
diff --git a/node_modules/indent-string/license b/node_modules/indent-string/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/indent-string/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/indent-string/package.json b/node_modules/indent-string/package.json
new file mode 100644
index 0000000..0e7d28c
--- /dev/null
+++ b/node_modules/indent-string/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "indent-string",
+ "version": "2.1.0",
+ "description": "Indent each line in a string",
+ "license": "MIT",
+ "repository": "sindresorhus/indent-string",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "indent",
+ "string",
+ "str",
+ "pad",
+ "align",
+ "line",
+ "text"
+ ],
+ "dependencies": {
+ "repeating": "^2.0.0"
+ },
+ "devDependencies": {
+ "mocha": "*"
+ }
+}
diff --git a/node_modules/indent-string/readme.md b/node_modules/indent-string/readme.md
new file mode 100644
index 0000000..89f14ac
--- /dev/null
+++ b/node_modules/indent-string/readme.md
@@ -0,0 +1,58 @@
+# indent-string [![Build Status](https://travis-ci.org/sindresorhus/indent-string.svg?branch=master)](https://travis-ci.org/sindresorhus/indent-string)
+
+> Indent each line in a string
+
+
+## Install
+
+```
+$ npm install --save indent-string
+```
+
+
+## Usage
+
+```js
+var indentString = require('indent-string');
+
+indentString('Unicorns\nRainbows', '♥', 4);
+//=> ♥♥♥♥Unicorns
+//=> ♥♥♥♥Rainbows
+```
+
+
+## API
+
+### indentString(string, indent, count)
+
+#### string
+
+**Required**
+Type: `string`
+
+The string you want to indent.
+
+#### indent
+
+**Required**
+Type: `string`
+
+The string to use for the indent.
+
+#### count
+
+Type: `number`
+Default: `1`
+
+How many times you want `indent` repeated.
+
+
+## Related
+
+- [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module
+- [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/inflight/LICENSE b/node_modules/inflight/LICENSE
new file mode 100644
index 0000000..05eeeb8
--- /dev/null
+++ b/node_modules/inflight/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/inflight/README.md b/node_modules/inflight/README.md
new file mode 100644
index 0000000..6dc8929
--- /dev/null
+++ b/node_modules/inflight/README.md
@@ -0,0 +1,37 @@
+# inflight
+
+Add callbacks to requests in flight to avoid async duplication
+
+## USAGE
+
+```javascript
+var inflight = require('inflight')
+
+// some request that does some stuff
+function req(key, callback) {
+ // key is any random string. like a url or filename or whatever.
+ //
+ // will return either a falsey value, indicating that the
+ // request for this key is already in flight, or a new callback
+ // which when called will call all callbacks passed to inflightk
+ // with the same key
+ callback = inflight(key, callback)
+
+ // If we got a falsey value back, then there's already a req going
+ if (!callback) return
+
+ // this is where you'd fetch the url or whatever
+ // callback is also once()-ified, so it can safely be assigned
+ // to multiple events etc. First call wins.
+ setTimeout(function() {
+ callback(null, key)
+ }, 100)
+}
+
+// only assigns a single setTimeout
+// when it dings, all cbs get called
+req('foo', cb1)
+req('foo', cb2)
+req('foo', cb3)
+req('foo', cb4)
+```
diff --git a/node_modules/inflight/inflight.js b/node_modules/inflight/inflight.js
new file mode 100644
index 0000000..48202b3
--- /dev/null
+++ b/node_modules/inflight/inflight.js
@@ -0,0 +1,54 @@
+var wrappy = require('wrappy')
+var reqs = Object.create(null)
+var once = require('once')
+
+module.exports = wrappy(inflight)
+
+function inflight (key, cb) {
+ if (reqs[key]) {
+ reqs[key].push(cb)
+ return null
+ } else {
+ reqs[key] = [cb]
+ return makeres(key)
+ }
+}
+
+function makeres (key) {
+ return once(function RES () {
+ var cbs = reqs[key]
+ var len = cbs.length
+ var args = slice(arguments)
+
+ // XXX It's somewhat ambiguous whether a new callback added in this
+ // pass should be queued for later execution if something in the
+ // list of callbacks throws, or if it should just be discarded.
+ // However, it's such an edge case that it hardly matters, and either
+ // choice is likely as surprising as the other.
+ // As it happens, we do go ahead and schedule it for later execution.
+ try {
+ for (var i = 0; i < len; i++) {
+ cbs[i].apply(null, args)
+ }
+ } finally {
+ if (cbs.length > len) {
+ // added more in the interim.
+ // de-zalgo, just in case, but don't call again.
+ cbs.splice(0, len)
+ process.nextTick(function () {
+ RES.apply(null, args)
+ })
+ } else {
+ delete reqs[key]
+ }
+ }
+ })
+}
+
+function slice (args) {
+ var length = args.length
+ var array = []
+
+ for (var i = 0; i < length; i++) array[i] = args[i]
+ return array
+}
diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json
new file mode 100644
index 0000000..6084d35
--- /dev/null
+++ b/node_modules/inflight/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "inflight",
+ "version": "1.0.6",
+ "description": "Add callbacks to requests in flight to avoid async duplication",
+ "main": "inflight.js",
+ "files": [
+ "inflight.js"
+ ],
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ },
+ "devDependencies": {
+ "tap": "^7.1.2"
+ },
+ "scripts": {
+ "test": "tap test.js --100"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/inflight.git"
+ },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "bugs": {
+ "url": "https://github.com/isaacs/inflight/issues"
+ },
+ "homepage": "https://github.com/isaacs/inflight",
+ "license": "ISC"
+}
diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..f71f2d9
--- /dev/null
+++ b/node_modules/inherits/inherits.js
@@ -0,0 +1,9 @@
+try {
+ var util = require('util');
+ /* istanbul ignore next */
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ /* istanbul ignore next */
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..86bbb3d
--- /dev/null
+++ b/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,27 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ if (superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ })
+ }
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ if (superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+ }
+}
diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json
new file mode 100644
index 0000000..37b4366
--- /dev/null
+++ b/node_modules/inherits/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.4",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": "git://github.com/isaacs/inherits",
+ "license": "ISC",
+ "scripts": {
+ "test": "tap"
+ },
+ "devDependencies": {
+ "tap": "^14.2.4"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ]
+}
diff --git a/node_modules/ini/LICENSE b/node_modules/ini/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/ini/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/ini/README.md b/node_modules/ini/README.md
new file mode 100644
index 0000000..33df258
--- /dev/null
+++ b/node_modules/ini/README.md
@@ -0,0 +1,102 @@
+An ini format parser and serializer for node.
+
+Sections are treated as nested objects. Items before the first
+heading are saved on the object directly.
+
+## Usage
+
+Consider an ini-file `config.ini` that looks like this:
+
+ ; this comment is being ignored
+ scope = global
+
+ [database]
+ user = dbuser
+ password = dbpassword
+ database = use_this_database
+
+ [paths.default]
+ datadir = /var/lib/data
+ array[] = first value
+ array[] = second value
+ array[] = third value
+
+You can read, manipulate and write the ini-file like so:
+
+ var fs = require('fs')
+ , ini = require('ini')
+
+ var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))
+
+ config.scope = 'local'
+ config.database.database = 'use_another_database'
+ config.paths.default.tmpdir = '/tmp'
+ delete config.paths.default.datadir
+ config.paths.default.array.push('fourth value')
+
+ fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' }))
+
+This will result in a file called `config_modified.ini` being written
+to the filesystem with the following content:
+
+ [section]
+ scope=local
+ [section.database]
+ user=dbuser
+ password=dbpassword
+ database=use_another_database
+ [section.paths.default]
+ tmpdir=/tmp
+ array[]=first value
+ array[]=second value
+ array[]=third value
+ array[]=fourth value
+
+
+## API
+
+### decode(inistring)
+
+Decode the ini-style formatted `inistring` into a nested object.
+
+### parse(inistring)
+
+Alias for `decode(inistring)`
+
+### encode(object, [options])
+
+Encode the object `object` into an ini-style formatted string. If the
+optional parameter `section` is given, then all top-level properties
+of the object are put into this section and the `section`-string is
+prepended to all sub-sections, see the usage example above.
+
+The `options` object may contain the following:
+
+* `section` A string which will be the first `section` in the encoded
+ ini data. Defaults to none.
+* `whitespace` Boolean to specify whether to put whitespace around the
+ `=` character. By default, whitespace is omitted, to be friendly to
+ some persnickety old parsers that don't tolerate it well. But some
+ find that it's more human-readable and pretty with the whitespace.
+
+For backwards compatibility reasons, if a `string` options is passed
+in, then it is assumed to be the `section` value.
+
+### stringify(object, [options])
+
+Alias for `encode(object, [options])`
+
+### safe(val)
+
+Escapes the string `val` such that it is safe to be used as a key or
+value in an ini-file. Basically escapes quotes. For example
+
+ ini.safe('"unsafe string"')
+
+would result in
+
+ "\"unsafe string\""
+
+### unsafe(val)
+
+Unescapes the string `val`
diff --git a/node_modules/ini/ini.js b/node_modules/ini/ini.js
new file mode 100644
index 0000000..b576f08
--- /dev/null
+++ b/node_modules/ini/ini.js
@@ -0,0 +1,206 @@
+exports.parse = exports.decode = decode
+
+exports.stringify = exports.encode = encode
+
+exports.safe = safe
+exports.unsafe = unsafe
+
+var eol = typeof process !== 'undefined' &&
+ process.platform === 'win32' ? '\r\n' : '\n'
+
+function encode (obj, opt) {
+ var children = []
+ var out = ''
+
+ if (typeof opt === 'string') {
+ opt = {
+ section: opt,
+ whitespace: false,
+ }
+ } else {
+ opt = opt || {}
+ opt.whitespace = opt.whitespace === true
+ }
+
+ var separator = opt.whitespace ? ' = ' : '='
+
+ Object.keys(obj).forEach(function (k, _, __) {
+ var val = obj[k]
+ if (val && Array.isArray(val)) {
+ val.forEach(function (item) {
+ out += safe(k + '[]') + separator + safe(item) + '\n'
+ })
+ } else if (val && typeof val === 'object')
+ children.push(k)
+ else
+ out += safe(k) + separator + safe(val) + eol
+ })
+
+ if (opt.section && out.length)
+ out = '[' + safe(opt.section) + ']' + eol + out
+
+ children.forEach(function (k, _, __) {
+ var nk = dotSplit(k).join('\\.')
+ var section = (opt.section ? opt.section + '.' : '') + nk
+ var child = encode(obj[k], {
+ section: section,
+ whitespace: opt.whitespace,
+ })
+ if (out.length && child.length)
+ out += eol
+
+ out += child
+ })
+
+ return out
+}
+
+function dotSplit (str) {
+ return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
+ .replace(/\\\./g, '\u0001')
+ .split(/\./).map(function (part) {
+ return part.replace(/\1/g, '\\.')
+ .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
+ })
+}
+
+function decode (str) {
+ var out = {}
+ var p = out
+ var section = null
+ // section |key = value
+ var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i
+ var lines = str.split(/[\r\n]+/g)
+
+ lines.forEach(function (line, _, __) {
+ if (!line || line.match(/^\s*[;#]/))
+ return
+ var match = line.match(re)
+ if (!match)
+ return
+ if (match[1] !== undefined) {
+ section = unsafe(match[1])
+ if (section === '__proto__') {
+ // not allowed
+ // keep parsing the section, but don't attach it.
+ p = {}
+ return
+ }
+ p = out[section] = out[section] || {}
+ return
+ }
+ var key = unsafe(match[2])
+ if (key === '__proto__')
+ return
+ var value = match[3] ? unsafe(match[4]) : true
+ switch (value) {
+ case 'true':
+ case 'false':
+ case 'null': value = JSON.parse(value)
+ }
+
+ // Convert keys with '[]' suffix to an array
+ if (key.length > 2 && key.slice(-2) === '[]') {
+ key = key.substring(0, key.length - 2)
+ if (key === '__proto__')
+ return
+ if (!p[key])
+ p[key] = []
+ else if (!Array.isArray(p[key]))
+ p[key] = [p[key]]
+ }
+
+ // safeguard against resetting a previously defined
+ // array by accidentally forgetting the brackets
+ if (Array.isArray(p[key]))
+ p[key].push(value)
+ else
+ p[key] = value
+ })
+
+ // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
+ // use a filter to return the keys that have to be deleted.
+ Object.keys(out).filter(function (k, _, __) {
+ if (!out[k] ||
+ typeof out[k] !== 'object' ||
+ Array.isArray(out[k]))
+ return false
+
+ // see if the parent section is also an object.
+ // if so, add it to that, and mark this one for deletion
+ var parts = dotSplit(k)
+ var p = out
+ var l = parts.pop()
+ var nl = l.replace(/\\\./g, '.')
+ parts.forEach(function (part, _, __) {
+ if (part === '__proto__')
+ return
+ if (!p[part] || typeof p[part] !== 'object')
+ p[part] = {}
+ p = p[part]
+ })
+ if (p === out && nl === l)
+ return false
+
+ p[nl] = out[k]
+ return true
+ }).forEach(function (del, _, __) {
+ delete out[del]
+ })
+
+ return out
+}
+
+function isQuoted (val) {
+ return (val.charAt(0) === '"' && val.slice(-1) === '"') ||
+ (val.charAt(0) === "'" && val.slice(-1) === "'")
+}
+
+function safe (val) {
+ return (typeof val !== 'string' ||
+ val.match(/[=\r\n]/) ||
+ val.match(/^\[/) ||
+ (val.length > 1 &&
+ isQuoted(val)) ||
+ val !== val.trim())
+ ? JSON.stringify(val)
+ : val.replace(/;/g, '\\;').replace(/#/g, '\\#')
+}
+
+function unsafe (val, doUnesc) {
+ val = (val || '').trim()
+ if (isQuoted(val)) {
+ // remove the single quotes before calling JSON.parse
+ if (val.charAt(0) === "'")
+ val = val.substr(1, val.length - 2)
+
+ try {
+ val = JSON.parse(val)
+ } catch (_) {}
+ } else {
+ // walk the val to find the first not-escaped ; character
+ var esc = false
+ var unesc = ''
+ for (var i = 0, l = val.length; i < l; i++) {
+ var c = val.charAt(i)
+ if (esc) {
+ if ('\\;#'.indexOf(c) !== -1)
+ unesc += c
+ else
+ unesc += '\\' + c
+
+ esc = false
+ } else if (';#'.indexOf(c) !== -1)
+ break
+ else if (c === '\\')
+ esc = true
+ else
+ unesc += c
+ }
+ if (esc)
+ unesc += '\\'
+
+ return unesc.trim()
+ }
+ return val
+}
diff --git a/node_modules/ini/package.json b/node_modules/ini/package.json
new file mode 100644
index 0000000..c830a35
--- /dev/null
+++ b/node_modules/ini/package.json
@@ -0,0 +1,33 @@
+{
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "name": "ini",
+ "description": "An ini encoder/decoder for node",
+ "version": "1.3.8",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/ini.git"
+ },
+ "main": "ini.js",
+ "scripts": {
+ "eslint": "eslint",
+ "lint": "npm run eslint -- ini.js test/*.js",
+ "lintfix": "npm run lint -- --fix",
+ "test": "tap",
+ "posttest": "npm run lint",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags"
+ },
+ "devDependencies": {
+ "eslint": "^7.9.0",
+ "eslint-plugin-import": "^2.22.0",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^4.2.1",
+ "eslint-plugin-standard": "^4.0.1",
+ "tap": "14"
+ },
+ "license": "ISC",
+ "files": [
+ "ini.js"
+ ]
+}
diff --git a/node_modules/is-arrayish/.editorconfig b/node_modules/is-arrayish/.editorconfig
new file mode 100644
index 0000000..4c017f8
--- /dev/null
+++ b/node_modules/is-arrayish/.editorconfig
@@ -0,0 +1,18 @@
+root = true
+
+[*]
+indent_style = tab
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.coffee]
+indent_style = space
+
+[{package.json,*.yml}]
+indent_style = space
+indent_size = 2
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/node_modules/is-arrayish/.istanbul.yml b/node_modules/is-arrayish/.istanbul.yml
new file mode 100644
index 0000000..19fbec3
--- /dev/null
+++ b/node_modules/is-arrayish/.istanbul.yml
@@ -0,0 +1,4 @@
+instrumentation:
+ excludes:
+ - test.js
+ - test/**/*
diff --git a/node_modules/is-arrayish/.npmignore b/node_modules/is-arrayish/.npmignore
new file mode 100644
index 0000000..8d5eacb
--- /dev/null
+++ b/node_modules/is-arrayish/.npmignore
@@ -0,0 +1,5 @@
+/coverage/
+/test.js
+/test/
+*.sw[a-p]
+/node_modules/
diff --git a/node_modules/is-arrayish/.travis.yml b/node_modules/is-arrayish/.travis.yml
new file mode 100644
index 0000000..5a04243
--- /dev/null
+++ b/node_modules/is-arrayish/.travis.yml
@@ -0,0 +1,17 @@
+language: node_js
+
+script:
+ - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register
+ - cat coverage/lcov.info | node_modules/.bin/coveralls
+node_js:
+ - "0.10"
+ - "0.11"
+ - "0.12"
+ - "iojs"
+os:
+ - linux
+ - osx
+
+notifications:
+ slack:
+ secure: oOt8QGzdrPDsTMcyahtIq5Q+0U1iwfgJgFCxBLsomQ0bpIMn+y5m4viJydA2UinHPGc944HS3LMZS9iKQyv+DjTgbhUyNXqeVjtxCwRe37f5rKQlXVvdfmjHk2kln4H8DcK3r5Qd/+2hd9BeMsp2GImTrkRSud1CZQlhhe5IgZOboSoWpGVMMy1iazWT06tAtiB2LRVhmsdUaFZDWAhGZ+UAvCPf+mnBOAylIj+U0GDrofhfTi25RK0gddG2f/p2M1HCu49O6wECGWkt2hVei233DkNJyLLLJVcvmhf+aXkV5TjMyaoxh/HdcV4DrA7KvYuWmWWKsINa9hlwAsdd/FYmJ6PjRkKWas2JoQ1C+qOzDxyQvn3CaUZFKD99pdsq0rBBZujqXQKZZ/hWb/CE74BI6fKmqQkiEPaD/7uADj04FEg6HVBZaMCyauOaK5b3VC97twbALZ1qVxYV6mU+zSEvnUbpnjjvRO0fSl9ZHA+rzkW73kX3GmHY0wAozEZbSy7QLuZlQ2QtHmBLr+APaGMdL1sFF9qFfzqKy0WDbSE0WS6hpAEJpTsjYmeBrnI8UmK3m++iEgyQPvZoH9LhUT+ek7XIfHZMe04BmC6wuO24/RfpmR6bQK9VMarFCYlBiWxg/z30vkP0KTpUi3o/cqFm7/Noxc0i2LVqM3E0Sy4=
diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/is-arrayish/LICENSE
new file mode 100644
index 0000000..0a5f461
--- /dev/null
+++ b/node_modules/is-arrayish/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 JD Ballard
+
+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/is-arrayish/README.md b/node_modules/is-arrayish/README.md
new file mode 100644
index 0000000..7d36072
--- /dev/null
+++ b/node_modules/is-arrayish/README.md
@@ -0,0 +1,16 @@
+# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish)
+> Determines if an object can be used like an Array
+
+## Example
+```javascript
+var isArrayish = require('is-arrayish');
+
+isArrayish([]); // true
+isArrayish({__proto__: []}); // true
+isArrayish({}); // false
+isArrayish({length:10}); // false
+```
+
+## License
+Licensed under the [MIT License](http://opensource.org/licenses/MIT).
+You can find a copy of it in [LICENSE](LICENSE).
diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js
new file mode 100644
index 0000000..5b97186
--- /dev/null
+++ b/node_modules/is-arrayish/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = function isArrayish(obj) {
+ if (!obj) {
+ return false;
+ }
+
+ return obj instanceof Array || Array.isArray(obj) ||
+ (obj.length >= 0 && obj.splice instanceof Function);
+};
diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json
new file mode 100644
index 0000000..8b2d1c3
--- /dev/null
+++ b/node_modules/is-arrayish/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "is-arrayish",
+ "description": "Determines if an object can be used as an array",
+ "version": "0.2.1",
+ "author": "Qix (http://github.com/qix-)",
+ "keywords": [
+ "is",
+ "array",
+ "duck",
+ "type",
+ "arrayish",
+ "similar",
+ "proto",
+ "prototype",
+ "type"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "pretest": "xo",
+ "test": "mocha --compilers coffee:coffee-script/register"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/qix-/node-is-arrayish.git"
+ },
+ "devDependencies": {
+ "coffee-script": "^1.9.3",
+ "coveralls": "^2.11.2",
+ "istanbul": "^0.3.17",
+ "mocha": "^2.2.5",
+ "should": "^7.0.1",
+ "xo": "^0.6.1"
+ }
+}
diff --git a/node_modules/is-core-module/.eslintignore b/node_modules/is-core-module/.eslintignore
new file mode 100644
index 0000000..404abb2
--- /dev/null
+++ b/node_modules/is-core-module/.eslintignore
@@ -0,0 +1 @@
+coverage/
diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc
new file mode 100644
index 0000000..9c7d516
--- /dev/null
+++ b/node_modules/is-core-module/.eslintrc
@@ -0,0 +1,18 @@
+{
+ "extends": "@ljharb",
+ "root": true,
+ "rules": {
+ "func-style": 1,
+ "operator-linebreak": [2, "before"],
+ },
+ "overrides": [
+ {
+ "files": "test/**",
+ "rules": {
+ "global-require": 0,
+ "max-lines-per-function": 0,
+ "no-negated-condition": 0,
+ },
+ },
+ ],
+}
diff --git a/node_modules/is-core-module/.github/FUNDING.yml b/node_modules/is-core-module/.github/FUNDING.yml
new file mode 100644
index 0000000..422ce9b
--- /dev/null
+++ b/node_modules/is-core-module/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [ljharb]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: npm/is-core-module
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/node_modules/is-core-module/.github/workflows/node-4+.yml b/node_modules/is-core-module/.github/workflows/node-4+.yml
new file mode 100644
index 0000000..ba174e1
--- /dev/null
+++ b/node_modules/is-core-module/.github/workflows/node-4+.yml
@@ -0,0 +1,54 @@
+name: 'Tests: node.js'
+
+on: [pull_request, push]
+
+jobs:
+ matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ latest: ${{ steps.set-matrix.outputs.requireds }}
+ minors: ${{ steps.set-matrix.outputs.optionals }}
+ steps:
+ - uses: ljharb/actions/node/matrix@main
+ id: set-matrix
+ with:
+ preset: '>=4'
+
+ latest:
+ needs: [matrix]
+ name: 'latest minors'
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run tests-only'
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ minors:
+ needs: [matrix, latest]
+ name: 'non-latest minors'
+ continue-on-error: true
+ if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+
+ node:
+ name: 'node 4+'
+ needs: [latest, minors]
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo tests completed'
diff --git a/node_modules/is-core-module/.github/workflows/node-iojs.yml b/node_modules/is-core-module/.github/workflows/node-iojs.yml
new file mode 100644
index 0000000..f707c3c
--- /dev/null
+++ b/node_modules/is-core-module/.github/workflows/node-iojs.yml
@@ -0,0 +1,58 @@
+name: 'Tests: node.js (io.js)'
+
+on: [pull_request, push]
+
+jobs:
+ matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ latest: ${{ steps.set-matrix.outputs.requireds }}
+ minors: ${{ steps.set-matrix.outputs.optionals }}
+ steps:
+ - uses: ljharb/actions/node/matrix@main
+ id: set-matrix
+ with:
+ preset: 'iojs'
+
+ latest:
+ needs: [matrix]
+ name: 'latest minors'
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run tests-only'
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ skip-ls-check: true
+
+ minors:
+ needs: [matrix, latest]
+ name: 'non-latest minors'
+ continue-on-error: true
+ if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run tests-only'
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ skip-ls-check: true
+
+ node:
+ name: 'io.js'
+ needs: [latest, minors]
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo tests completed'
diff --git a/node_modules/is-core-module/.github/workflows/node-pretest.yml b/node_modules/is-core-module/.github/workflows/node-pretest.yml
new file mode 100644
index 0000000..3921e0a
--- /dev/null
+++ b/node_modules/is-core-module/.github/workflows/node-pretest.yml
@@ -0,0 +1,26 @@
+name: 'Tests: pretest/posttest'
+
+on: [pull_request, push]
+
+jobs:
+ pretest:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run pretest'
+ with:
+ node-version: 'lts/*'
+ command: 'pretest'
+
+ posttest:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run posttest'
+ with:
+ node-version: 'lts/*'
+ command: 'posttest'
diff --git a/node_modules/is-core-module/.github/workflows/node-zero.yml b/node_modules/is-core-module/.github/workflows/node-zero.yml
new file mode 100644
index 0000000..d044c60
--- /dev/null
+++ b/node_modules/is-core-module/.github/workflows/node-zero.yml
@@ -0,0 +1,58 @@
+name: 'Tests: node.js (0.x)'
+
+on: [pull_request, push]
+
+jobs:
+ matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ stable: ${{ steps.set-matrix.outputs.requireds }}
+ unstable: ${{ steps.set-matrix.outputs.optionals }}
+ steps:
+ - uses: ljharb/actions/node/matrix@main
+ id: set-matrix
+ with:
+ preset: '0.x'
+
+ stable:
+ needs: [matrix]
+ name: 'stable minors'
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.stable) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
+ skip-ls-check: true
+
+ unstable:
+ needs: [matrix, stable]
+ name: 'unstable minors'
+ continue-on-error: true
+ if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.unstable) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
+ skip-ls-check: true
+
+ node:
+ name: 'node 0.x'
+ needs: [stable, unstable]
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo tests completed'
diff --git a/node_modules/is-core-module/.github/workflows/rebase.yml b/node_modules/is-core-module/.github/workflows/rebase.yml
new file mode 100644
index 0000000..0c2ad39
--- /dev/null
+++ b/node_modules/is-core-module/.github/workflows/rebase.yml
@@ -0,0 +1,15 @@
+name: Automatic Rebase
+
+on: [pull_request_target]
+
+jobs:
+ _:
+ name: "Automatic Rebase"
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - uses: ljharb/rebase@master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/node_modules/is-core-module/.github/workflows/require-allow-edits.yml b/node_modules/is-core-module/.github/workflows/require-allow-edits.yml
new file mode 100644
index 0000000..aac42d3
--- /dev/null
+++ b/node_modules/is-core-module/.github/workflows/require-allow-edits.yml
@@ -0,0 +1,14 @@
+name: Require “Allow Edits”
+
+on: [pull_request_target]
+
+jobs:
+ _:
+ name: "Require “Allow Edits”"
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: ljharb/require-allow-edits@main
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/node_modules/is-core-module/.nycrc b/node_modules/is-core-module/.nycrc
new file mode 100644
index 0000000..1826526
--- /dev/null
+++ b/node_modules/is-core-module/.nycrc
@@ -0,0 +1,13 @@
+{
+ "all": true,
+ "check-coverage": false,
+ "reporter": ["text-summary", "text", "html", "json"],
+ "lines": 86,
+ "statements": 85.93,
+ "functions": 82.43,
+ "branches": 76.06,
+ "exclude": [
+ "coverage",
+ "test"
+ ]
+}
diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md
new file mode 100644
index 0000000..4cdb33d
--- /dev/null
+++ b/node_modules/is-core-module/CHANGELOG.md
@@ -0,0 +1,58 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v2.2.0](https://github.com/inspect-js/is-core-module/compare/v2.1.0...v2.2.0) - 2020-11-26
+
+### Commits
+
+- [Tests] migrate tests to Github Actions [`c919f57`](https://github.com/inspect-js/is-core-module/commit/c919f573c0a92d10a0acad0b650b5aecb033d426)
+- [patch] `core.json`: %s/ /\t/g [`db3f685`](https://github.com/inspect-js/is-core-module/commit/db3f68581f53e73cc09cd675955eb1bdd6a5a39b)
+- [Tests] run `nyc` on all tests [`b2f925f`](https://github.com/inspect-js/is-core-module/commit/b2f925f8866f210ef441f39fcc8cc42692ab89b1)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`; add `safe-publish-latest` [`89f02a2`](https://github.com/inspect-js/is-core-module/commit/89f02a2b4162246dea303a6ee31bb9a550b05c72)
+- [New] add `path/posix`, `path/win32`, `util/types` [`77f94f1`](https://github.com/inspect-js/is-core-module/commit/77f94f1e90ffd7c0be2a3f1aa8574ebf7fd981b3)
+
+## [v2.1.0](https://github.com/inspect-js/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04
+
+### Commits
+
+- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/inspect-js/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4)
+- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/inspect-js/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec)
+
+## [v2.0.0](https://github.com/inspect-js/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29
+
+### Commits
+
+- v2 implementation [`865aeb5`](https://github.com/inspect-js/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd)
+- Only apps should have lockfiles [`5a5e660`](https://github.com/inspect-js/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b)
+- Initial commit for v2 [`5a51524`](https://github.com/inspect-js/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348)
+- Tests [`116eae4`](https://github.com/inspect-js/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496)
+- [meta] add `auto-changelog` [`c24388b`](https://github.com/inspect-js/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63)
+- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/inspect-js/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a)
+- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/inspect-js/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697)
+- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/inspect-js/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9)
+- [meta] create FUNDING.yml [`1aabebc`](https://github.com/inspect-js/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6)
+- [Fix] `domain`: domain landed sometime &gt; v0.7.7 and &lt;= v0.7.12 [`2df7d37`](https://github.com/inspect-js/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655)
+- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/inspect-js/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65)
+
+## [v1.0.2](https://github.com/inspect-js/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28
+
+### Commits
+
+- simpler [`66fe90f`](https://github.com/inspect-js/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2)
+
+## [v1.0.1](https://github.com/inspect-js/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28
+
+### Commits
+
+- remove stupid [`f21f906`](https://github.com/inspect-js/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac)
+- update readme [`1eff0ec`](https://github.com/inspect-js/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027)
+
+## v1.0.0 - 2014-09-28
+
+### Commits
+
+- init [`48e5e76`](https://github.com/inspect-js/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96)
diff --git a/node_modules/is-core-module/LICENSE b/node_modules/is-core-module/LICENSE
new file mode 100644
index 0000000..2e50287
--- /dev/null
+++ b/node_modules/is-core-module/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Dave Justice
+
+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. \ No newline at end of file
diff --git a/node_modules/is-core-module/README.md b/node_modules/is-core-module/README.md
new file mode 100644
index 0000000..479d6d2
--- /dev/null
+++ b/node_modules/is-core-module/README.md
@@ -0,0 +1,37 @@
+# is-core-module <sup>[![Version Badge][2]][1]</sup>
+
+[![Build Status][3]][4]
+[![dependency status][5]][6]
+[![dev dependency status][7]][8]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][11]][1]
+
+Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version.
+
+## Example
+
+```js
+var isCore = require('is-core-module');
+var assert = require('assert');
+assert(isCore('fs'));
+assert(!isCore('butts'));
+```
+
+## Tests
+Clone the repo, `npm install`, and run `npm test`
+
+[1]: https://npmjs.org/package/is-core-module
+[2]: https://versionbadg.es/inspect-js/is-core-module.svg
+[3]: https://travis-ci.com/inspect-js/is-core-module.svg
+[4]: https://travis-ci.com/inspect-js/is-core-module
+[5]: https://david-dm.org/inspect-js/is-core-module.svg
+[6]: https://david-dm.org/inspect-js/is-core-module
+[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg
+[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies
+[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/is-core-module.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module
diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json
new file mode 100644
index 0000000..0238b61
--- /dev/null
+++ b/node_modules/is-core-module/core.json
@@ -0,0 +1,83 @@
+{
+ "assert": true,
+ "assert/strict": ">= 15",
+ "async_hooks": ">= 8",
+ "buffer_ieee754": "< 0.9.7",
+ "buffer": true,
+ "child_process": true,
+ "cluster": true,
+ "console": true,
+ "constants": true,
+ "crypto": true,
+ "_debug_agent": ">= 1 && < 8",
+ "_debugger": "< 8",
+ "dgram": true,
+ "diagnostics_channel": ">= 15.1",
+ "dns": true,
+ "dns/promises": ">= 15",
+ "domain": ">= 0.7.12",
+ "events": true,
+ "freelist": "< 6",
+ "fs": true,
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
+ "_http_agent": ">= 0.11.1",
+ "_http_client": ">= 0.11.1",
+ "_http_common": ">= 0.11.1",
+ "_http_incoming": ">= 0.11.1",
+ "_http_outgoing": ">= 0.11.1",
+ "_http_server": ">= 0.11.1",
+ "http": true,
+ "http2": ">= 8.8",
+ "https": true,
+ "inspector": ">= 8.0.0",
+ "_linklist": "< 8",
+ "module": true,
+ "net": true,
+ "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
+ "os": true,
+ "path": true,
+ "path/posix": ">= 15.3",
+ "path/win32": ">= 15.3",
+ "perf_hooks": ">= 8.5",
+ "process": ">= 1",
+ "punycode": true,
+ "querystring": true,
+ "readline": true,
+ "repl": true,
+ "smalloc": ">= 0.11.5 && < 3",
+ "_stream_duplex": ">= 0.9.4",
+ "_stream_transform": ">= 0.9.4",
+ "_stream_wrap": ">= 1.4.1",
+ "_stream_passthrough": ">= 0.9.4",
+ "_stream_readable": ">= 0.9.4",
+ "_stream_writable": ">= 0.9.4",
+ "stream": true,
+ "stream/promises": ">= 15",
+ "string_decoder": true,
+ "sys": [">= 0.6 && < 0.7", ">= 0.8"],
+ "timers": true,
+ "timers/promises": ">= 15",
+ "_tls_common": ">= 0.11.13",
+ "_tls_legacy": ">= 0.11.3 && < 10",
+ "_tls_wrap": ">= 0.11.3",
+ "tls": true,
+ "trace_events": ">= 10",
+ "tty": true,
+ "url": true,
+ "util": true,
+ "util/types": ">= 15.3",
+ "v8/tools/arguments": ">= 10 && < 12",
+ "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8": ">= 1",
+ "vm": true,
+ "wasi": ">= 13.4 && < 13.5",
+ "worker_threads": ">= 11.7",
+ "zlib": true
+}
diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js
new file mode 100644
index 0000000..f5a69cf
--- /dev/null
+++ b/node_modules/is-core-module/index.js
@@ -0,0 +1,69 @@
+'use strict';
+
+var has = require('has');
+
+function specifierIncluded(current, specifier) {
+ var nodeParts = current.split('.');
+ var parts = specifier.split(' ');
+ var op = parts.length > 1 ? parts[0] : '=';
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
+
+ for (var i = 0; i < 3; ++i) {
+ var cur = parseInt(nodeParts[i] || 0, 10);
+ var ver = parseInt(versionParts[i] || 0, 10);
+ if (cur === ver) {
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
+ }
+ if (op === '<') {
+ return cur < ver;
+ }
+ if (op === '>=') {
+ return cur >= ver;
+ }
+ return false;
+ }
+ return op === '>=';
+}
+
+function matchesRange(current, range) {
+ var specifiers = range.split(/ ?&& ?/);
+ if (specifiers.length === 0) {
+ return false;
+ }
+ for (var i = 0; i < specifiers.length; ++i) {
+ if (!specifierIncluded(current, specifiers[i])) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function versionIncluded(nodeVersion, specifierValue) {
+ if (typeof specifierValue === 'boolean') {
+ return specifierValue;
+ }
+
+ var current = typeof nodeVersion === 'undefined'
+ ? process.versions && process.versions.node && process.versions.node
+ : nodeVersion;
+
+ if (typeof current !== 'string') {
+ throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');
+ }
+
+ if (specifierValue && typeof specifierValue === 'object') {
+ for (var i = 0; i < specifierValue.length; ++i) {
+ if (matchesRange(current, specifierValue[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return matchesRange(current, specifierValue);
+}
+
+var data = require('./core.json');
+
+module.exports = function isCore(x, nodeVersion) {
+ return has(data, x) && versionIncluded(nodeVersion, data[x]);
+};
diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json
new file mode 100644
index 0000000..21341cc
--- /dev/null
+++ b/node_modules/is-core-module/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "is-core-module",
+ "version": "2.2.0",
+ "description": "Is this specifier a node.js core module?",
+ "main": "index.js",
+ "exports": {
+ ".": [
+ {
+ "default": "./index.js"
+ },
+ "./index.js"
+ ],
+ "./package.json": "./package.json"
+ },
+ "scripts": {
+ "prepublish": "safe-publish-latest",
+ "lint": "eslint .",
+ "pretest": "npm run lint",
+ "tests-only": "tape 'test/**/*.js'",
+ "test": "nyc npm run tests-only",
+ "posttest": "aud --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/inspect-js/is-core-module.git"
+ },
+ "keywords": [
+ "core",
+ "modules",
+ "module",
+ "npm",
+ "node",
+ "dependencies"
+ ],
+ "author": "Jordan Harband <ljharb@gmail.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/inspect-js/is-core-module/issues"
+ },
+ "homepage": "https://github.com/inspect-js/is-core-module",
+ "dependencies": {
+ "has": "^1.0.3"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^17.3.0",
+ "aud": "^1.1.3",
+ "auto-changelog": "^2.2.1",
+ "eslint": "^7.14.0",
+ "nyc": "^10.3.2",
+ "safe-publish-latest": "^1.1.4",
+ "tape": "^5.0.1"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ }
+}
diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js
new file mode 100644
index 0000000..99659bc
--- /dev/null
+++ b/node_modules/is-core-module/test/index.js
@@ -0,0 +1,83 @@
+'use strict';
+
+var test = require('tape');
+var keys = require('object-keys');
+var isCore = require('../');
+var data = require('../core.json');
+
+test('core modules', function (t) {
+ t.test('isCore()', function (st) {
+ st.ok(isCore('fs'));
+ st.ok(isCore('net'));
+ st.ok(isCore('http'));
+
+ st.ok(!isCore('seq'));
+ st.ok(!isCore('../'));
+
+ st.ok(!isCore('toString'));
+
+ st.end();
+ });
+
+ t.test('core list', function (st) {
+ var cores = keys(data);
+ st.plan(cores.length);
+
+ for (var i = 0; i < cores.length; ++i) {
+ var mod = cores[i];
+ var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func
+ if (isCore(mod)) {
+ st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw');
+ } else {
+ st['throws'](requireFunc, mod + ' not supported; requiring throws');
+ }
+ }
+
+ st.end();
+ });
+
+ t.test('core via repl module', { skip: !data.repl }, function (st) {
+ var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle
+ if (!libs) {
+ st.skip('module.builtinModules does not exist');
+ } else {
+ for (var i = 0; i < libs.length; ++i) {
+ var mod = libs[i];
+ st.ok(data[mod], mod + ' is a core module');
+ st.doesNotThrow(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ 'requiring ' + mod + ' does not throw'
+ );
+ }
+ }
+ st.end();
+ });
+
+ t.test('core via builtinModules list', { skip: !data.module }, function (st) {
+ var libs = require('module').builtinModules;
+ if (!libs) {
+ st.skip('module.builtinModules does not exist');
+ } else {
+ var excludeList = [
+ '_debug_agent',
+ 'v8/tools/tickprocessor-driver',
+ 'v8/tools/SourceMap',
+ 'v8/tools/tickprocessor',
+ 'v8/tools/profile'
+ ];
+ for (var i = 0; i < libs.length; ++i) {
+ var mod = libs[i];
+ if (excludeList.indexOf(mod) === -1) {
+ st.ok(data[mod], mod + ' is a core module');
+ st.doesNotThrow(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ 'requiring ' + mod + ' does not throw'
+ );
+ }
+ }
+ }
+ st.end();
+ });
+
+ t.end();
+});
diff --git a/node_modules/is-docker/cli.js b/node_modules/is-docker/cli.js
new file mode 100755
index 0000000..58f2861
--- /dev/null
+++ b/node_modules/is-docker/cli.js
@@ -0,0 +1,5 @@
+#!/usr/bin/env node
+'use strict';
+const isDocker = require('.');
+
+process.exitCode = isDocker() ? 0 : 2;
diff --git a/node_modules/is-docker/index.d.ts b/node_modules/is-docker/index.d.ts
new file mode 100644
index 0000000..c801881
--- /dev/null
+++ b/node_modules/is-docker/index.d.ts
@@ -0,0 +1,15 @@
+/**
+Check if the process is running inside a Docker container.
+
+@example
+```
+import isDocker = require('is-docker');
+
+if (isDocker()) {
+ console.log('Running inside a Docker container');
+}
+```
+*/
+declare function isDocker(): boolean;
+
+export = isDocker;
diff --git a/node_modules/is-docker/index.js b/node_modules/is-docker/index.js
new file mode 100644
index 0000000..cbb7b6f
--- /dev/null
+++ b/node_modules/is-docker/index.js
@@ -0,0 +1,29 @@
+'use strict';
+const fs = require('fs');
+
+let isDocker;
+
+function hasDockerEnv() {
+ try {
+ fs.statSync('/.dockerenv');
+ return true;
+ } catch (_) {
+ return false;
+ }
+}
+
+function hasDockerCGroup() {
+ try {
+ return fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
+ } catch (_) {
+ return false;
+ }
+}
+
+module.exports = () => {
+ if (isDocker === undefined) {
+ isDocker = hasDockerEnv() || hasDockerCGroup();
+ }
+
+ return isDocker;
+};
diff --git a/node_modules/is-docker/license b/node_modules/is-docker/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/is-docker/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/is-docker/package.json b/node_modules/is-docker/package.json
new file mode 100644
index 0000000..ae28225
--- /dev/null
+++ b/node_modules/is-docker/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "is-docker",
+ "version": "2.2.1",
+ "description": "Check if the process is running inside a Docker container",
+ "license": "MIT",
+ "repository": "sindresorhus/is-docker",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "bin": "cli.js",
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "cli.js"
+ ],
+ "keywords": [
+ "detect",
+ "docker",
+ "dockerized",
+ "container",
+ "inside",
+ "is",
+ "env",
+ "environment",
+ "process"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "sinon": "^7.3.2",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/is-docker/readme.md b/node_modules/is-docker/readme.md
new file mode 100644
index 0000000..f09b254
--- /dev/null
+++ b/node_modules/is-docker/readme.md
@@ -0,0 +1,27 @@
+# is-docker
+
+> Check if the process is running inside a Docker container
+
+## Install
+
+```
+$ npm install is-docker
+```
+
+## Usage
+
+```js
+const isDocker = require('is-docker');
+
+if (isDocker()) {
+ console.log('Running inside a Docker container');
+}
+```
+
+## CLI
+
+```
+$ is-docker
+```
+
+Exits with code 0 if inside a Docker container and 2 if not.
diff --git a/node_modules/is-finite/index.js b/node_modules/is-finite/index.js
new file mode 100644
index 0000000..421dd39
--- /dev/null
+++ b/node_modules/is-finite/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+module.exports = Number.isFinite || function (value) {
+ return !(typeof value !== 'number' || value !== value || value === Infinity || value === -Infinity);
+};
diff --git a/node_modules/is-finite/license b/node_modules/is-finite/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/is-finite/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/is-finite/package.json b/node_modules/is-finite/package.json
new file mode 100644
index 0000000..efe20f3
--- /dev/null
+++ b/node_modules/is-finite/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "is-finite",
+ "version": "1.1.0",
+ "description": "ES2015 Number.isFinite() ponyfill",
+ "license": "MIT",
+ "repository": "sindresorhus/is-finite",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "es2015",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "number",
+ "finite",
+ "is"
+ ],
+ "devDependencies": {
+ "ava": "^3.2.0"
+ }
+}
diff --git a/node_modules/is-finite/readme.md b/node_modules/is-finite/readme.md
new file mode 100644
index 0000000..c5ca7ef
--- /dev/null
+++ b/node_modules/is-finite/readme.md
@@ -0,0 +1,33 @@
+# is-finite [![Build Status](https://travis-ci.org/sindresorhus/is-finite.svg?branch=master)](https://travis-ci.org/sindresorhus/is-finite)
+
+> ES2015 [`Number.isFinite()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite) [ponyfill](https://ponyfill.com)
+
+## Install
+
+```
+$ npm install is-finite
+```
+
+## Usage
+
+```js
+var numIsFinite = require('is-finite');
+
+numIsFinite(4);
+//=> true
+
+numIsFinite(Infinity);
+//=> false
+```
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-is-finite?utm_source=npm-is-finite&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/is-fullwidth-code-point/index.js b/node_modules/is-fullwidth-code-point/index.js
new file mode 100644
index 0000000..a7d3e38
--- /dev/null
+++ b/node_modules/is-fullwidth-code-point/index.js
@@ -0,0 +1,46 @@
+'use strict';
+var numberIsNan = require('number-is-nan');
+
+module.exports = function (x) {
+ if (numberIsNan(x)) {
+ return false;
+ }
+
+ // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
+
+ // code points are derived from:
+ // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
+ if (x >= 0x1100 && (
+ x <= 0x115f || // Hangul Jamo
+ 0x2329 === x || // LEFT-POINTING ANGLE BRACKET
+ 0x232a === x || // RIGHT-POINTING ANGLE BRACKET
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
+ (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
+ // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
+ 0x3250 <= x && x <= 0x4dbf ||
+ // CJK Unified Ideographs .. Yi Radicals
+ 0x4e00 <= x && x <= 0xa4c6 ||
+ // Hangul Jamo Extended-A
+ 0xa960 <= x && x <= 0xa97c ||
+ // Hangul Syllables
+ 0xac00 <= x && x <= 0xd7a3 ||
+ // CJK Compatibility Ideographs
+ 0xf900 <= x && x <= 0xfaff ||
+ // Vertical Forms
+ 0xfe10 <= x && x <= 0xfe19 ||
+ // CJK Compatibility Forms .. Small Form Variants
+ 0xfe30 <= x && x <= 0xfe6b ||
+ // Halfwidth and Fullwidth Forms
+ 0xff01 <= x && x <= 0xff60 ||
+ 0xffe0 <= x && x <= 0xffe6 ||
+ // Kana Supplement
+ 0x1b000 <= x && x <= 0x1b001 ||
+ // Enclosed Ideographic Supplement
+ 0x1f200 <= x && x <= 0x1f251 ||
+ // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
+ 0x20000 <= x && x <= 0x3fffd)) {
+ return true;
+ }
+
+ return false;
+}
diff --git a/node_modules/is-fullwidth-code-point/license b/node_modules/is-fullwidth-code-point/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/is-fullwidth-code-point/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/is-fullwidth-code-point/package.json b/node_modules/is-fullwidth-code-point/package.json
new file mode 100644
index 0000000..b678d40
--- /dev/null
+++ b/node_modules/is-fullwidth-code-point/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "is-fullwidth-code-point",
+ "version": "1.0.0",
+ "description": "Check if the character represented by a given Unicode code point is fullwidth",
+ "license": "MIT",
+ "repository": "sindresorhus/is-fullwidth-code-point",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "fullwidth",
+ "full-width",
+ "full",
+ "width",
+ "unicode",
+ "character",
+ "char",
+ "string",
+ "str",
+ "codepoint",
+ "code",
+ "point",
+ "is",
+ "detect",
+ "check"
+ ],
+ "dependencies": {
+ "number-is-nan": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "0.0.4",
+ "code-point-at": "^1.0.0"
+ }
+}
diff --git a/node_modules/is-fullwidth-code-point/readme.md b/node_modules/is-fullwidth-code-point/readme.md
new file mode 100644
index 0000000..4936464
--- /dev/null
+++ b/node_modules/is-fullwidth-code-point/readme.md
@@ -0,0 +1,39 @@
+# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
+
+> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
+
+
+## Install
+
+```
+$ npm install --save is-fullwidth-code-point
+```
+
+
+## Usage
+
+```js
+var isFullwidthCodePoint = require('is-fullwidth-code-point');
+
+isFullwidthCodePoint('谢'.codePointAt());
+//=> true
+
+isFullwidthCodePoint('a'.codePointAt());
+//=> false
+```
+
+
+## API
+
+### isFullwidthCodePoint(input)
+
+#### input
+
+Type: `number`
+
+[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/is-typedarray/LICENSE.md b/node_modules/is-typedarray/LICENSE.md
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/node_modules/is-typedarray/LICENSE.md
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+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/is-typedarray/README.md b/node_modules/is-typedarray/README.md
new file mode 100644
index 0000000..2752863
--- /dev/null
+++ b/node_modules/is-typedarray/README.md
@@ -0,0 +1,16 @@
+# is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Detect whether or not an object is a
+[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays).
+
+## Usage
+
+[![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/)
+
+### isTypedArray(array)
+
+Returns `true` when array is a Typed Array, and `false` when it is not.
+
+## License
+
+MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details.
diff --git a/node_modules/is-typedarray/index.js b/node_modules/is-typedarray/index.js
new file mode 100644
index 0000000..5859603
--- /dev/null
+++ b/node_modules/is-typedarray/index.js
@@ -0,0 +1,41 @@
+module.exports = isTypedArray
+isTypedArray.strict = isStrictTypedArray
+isTypedArray.loose = isLooseTypedArray
+
+var toString = Object.prototype.toString
+var names = {
+ '[object Int8Array]': true
+ , '[object Int16Array]': true
+ , '[object Int32Array]': true
+ , '[object Uint8Array]': true
+ , '[object Uint8ClampedArray]': true
+ , '[object Uint16Array]': true
+ , '[object Uint32Array]': true
+ , '[object Float32Array]': true
+ , '[object Float64Array]': true
+}
+
+function isTypedArray(arr) {
+ return (
+ isStrictTypedArray(arr)
+ || isLooseTypedArray(arr)
+ )
+}
+
+function isStrictTypedArray(arr) {
+ return (
+ arr instanceof Int8Array
+ || arr instanceof Int16Array
+ || arr instanceof Int32Array
+ || arr instanceof Uint8Array
+ || arr instanceof Uint8ClampedArray
+ || arr instanceof Uint16Array
+ || arr instanceof Uint32Array
+ || arr instanceof Float32Array
+ || arr instanceof Float64Array
+ )
+}
+
+function isLooseTypedArray(arr) {
+ return names[toString.call(arr)]
+}
diff --git a/node_modules/is-typedarray/package.json b/node_modules/is-typedarray/package.json
new file mode 100644
index 0000000..37f7ae3
--- /dev/null
+++ b/node_modules/is-typedarray/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "is-typedarray",
+ "version": "1.0.0",
+ "description": "Detect whether or not an object is a Typed Array",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test"
+ },
+ "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
+ "license": "MIT",
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "^2.13.1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hughsk/is-typedarray.git"
+ },
+ "keywords": [
+ "typed",
+ "array",
+ "detect",
+ "is",
+ "util"
+ ],
+ "bugs": {
+ "url": "https://github.com/hughsk/is-typedarray/issues"
+ },
+ "homepage": "https://github.com/hughsk/is-typedarray"
+}
diff --git a/node_modules/is-typedarray/test.js b/node_modules/is-typedarray/test.js
new file mode 100644
index 0000000..b0c176f
--- /dev/null
+++ b/node_modules/is-typedarray/test.js
@@ -0,0 +1,34 @@
+var test = require('tape')
+var ista = require('./')
+
+test('strict', function(t) {
+ t.ok(ista.strict(new Int8Array), 'Int8Array')
+ t.ok(ista.strict(new Int16Array), 'Int16Array')
+ t.ok(ista.strict(new Int32Array), 'Int32Array')
+ t.ok(ista.strict(new Uint8Array), 'Uint8Array')
+ t.ok(ista.strict(new Uint16Array), 'Uint16Array')
+ t.ok(ista.strict(new Uint32Array), 'Uint32Array')
+ t.ok(ista.strict(new Float32Array), 'Float32Array')
+ t.ok(ista.strict(new Float64Array), 'Float64Array')
+
+ t.ok(!ista.strict(new Array), 'Array')
+ t.ok(!ista.strict([]), '[]')
+
+ t.end()
+})
+
+test('loose', function(t) {
+ t.ok(ista.loose(new Int8Array), 'Int8Array')
+ t.ok(ista.loose(new Int16Array), 'Int16Array')
+ t.ok(ista.loose(new Int32Array), 'Int32Array')
+ t.ok(ista.loose(new Uint8Array), 'Uint8Array')
+ t.ok(ista.loose(new Uint16Array), 'Uint16Array')
+ t.ok(ista.loose(new Uint32Array), 'Uint32Array')
+ t.ok(ista.loose(new Float32Array), 'Float32Array')
+ t.ok(ista.loose(new Float64Array), 'Float64Array')
+
+ t.ok(!ista.loose(new Array), 'Array')
+ t.ok(!ista.loose([]), '[]')
+
+ t.end()
+})
diff --git a/node_modules/is-utf8/LICENSE b/node_modules/is-utf8/LICENSE
new file mode 100644
index 0000000..2c8d4b9
--- /dev/null
+++ b/node_modules/is-utf8/LICENSE
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (C) 2014 Wei Fanzhe
+
+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/is-utf8/README.md b/node_modules/is-utf8/README.md
new file mode 100644
index 0000000..b62ddde
--- /dev/null
+++ b/node_modules/is-utf8/README.md
@@ -0,0 +1,16 @@
+#utf8 detector
+
+Detect if a Buffer is utf8 encoded.
+It need The minimum amount of bytes is 4.
+
+
+```javascript
+ var fs = require('fs');
+ var isUtf8 = require('is-utf8');
+ var ansi = fs.readFileSync('ansi.txt');
+ var utf8 = fs.readFileSync('utf8.txt');
+
+ console.log('ansi.txt is utf8: '+isUtf8(ansi)); //false
+ console.log('utf8.txt is utf8: '+isUtf8(utf8)); //true
+```
+
diff --git a/node_modules/is-utf8/is-utf8.js b/node_modules/is-utf8/is-utf8.js
new file mode 100644
index 0000000..8a5f15d
--- /dev/null
+++ b/node_modules/is-utf8/is-utf8.js
@@ -0,0 +1,76 @@
+
+exports = module.exports = function(bytes)
+{
+ var i = 0;
+ while(i < bytes.length)
+ {
+ if( (// ASCII
+ bytes[i] == 0x09 ||
+ bytes[i] == 0x0A ||
+ bytes[i] == 0x0D ||
+ (0x20 <= bytes[i] && bytes[i] <= 0x7E)
+ )
+ ) {
+ i += 1;
+ continue;
+ }
+
+ if( (// non-overlong 2-byte
+ (0xC2 <= bytes[i] && bytes[i] <= 0xDF) &&
+ (0x80 <= bytes[i+1] && bytes[i+1] <= 0xBF)
+ )
+ ) {
+ i += 2;
+ continue;
+ }
+
+ if( (// excluding overlongs
+ bytes[i] == 0xE0 &&
+ (0xA0 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) &&
+ (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF)
+ ) ||
+ (// straight 3-byte
+ ((0xE1 <= bytes[i] && bytes[i] <= 0xEC) ||
+ bytes[i] == 0xEE ||
+ bytes[i] == 0xEF) &&
+ (0x80 <= bytes[i + 1] && bytes[i+1] <= 0xBF) &&
+ (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF)
+ ) ||
+ (// excluding surrogates
+ bytes[i] == 0xED &&
+ (0x80 <= bytes[i+1] && bytes[i+1] <= 0x9F) &&
+ (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF)
+ )
+ ) {
+ i += 3;
+ continue;
+ }
+
+ if( (// planes 1-3
+ bytes[i] == 0xF0 &&
+ (0x90 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) &&
+ (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) &&
+ (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF)
+ ) ||
+ (// planes 4-15
+ (0xF1 <= bytes[i] && bytes[i] <= 0xF3) &&
+ (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) &&
+ (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) &&
+ (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF)
+ ) ||
+ (// plane 16
+ bytes[i] == 0xF4 &&
+ (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x8F) &&
+ (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) &&
+ (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF)
+ )
+ ) {
+ i += 4;
+ continue;
+ }
+
+ return false;
+ }
+
+ return true;
+}
diff --git a/node_modules/is-utf8/package.json b/node_modules/is-utf8/package.json
new file mode 100644
index 0000000..dab1234
--- /dev/null
+++ b/node_modules/is-utf8/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "is-utf8",
+ "version": "0.2.1",
+ "description": "Detect if a buffer is utf8 encoded.",
+ "main": "is-utf8.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": "https://github.com/wayfind/is-utf8.git",
+ "keywords": [
+ "utf8",
+ "charset"
+ ],
+ "files": [
+ "is-utf8.js"
+ ],
+ "author": "wayfind",
+ "license": "MIT"
+}
diff --git a/node_modules/is-wsl/index.d.ts b/node_modules/is-wsl/index.d.ts
new file mode 100644
index 0000000..d54e4ba
--- /dev/null
+++ b/node_modules/is-wsl/index.d.ts
@@ -0,0 +1,15 @@
+/**
+Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows).
+
+@example
+```
+import isWsl = require('is-wsl');
+
+// When running inside Windows Subsystem for Linux
+console.log(isWsl);
+//=> true
+```
+*/
+declare const isWsl: boolean;
+
+export = isWsl;
diff --git a/node_modules/is-wsl/index.js b/node_modules/is-wsl/index.js
new file mode 100644
index 0000000..eb6313f
--- /dev/null
+++ b/node_modules/is-wsl/index.js
@@ -0,0 +1,31 @@
+'use strict';
+const os = require('os');
+const fs = require('fs');
+const isDocker = require('is-docker');
+
+const isWsl = () => {
+ if (process.platform !== 'linux') {
+ return false;
+ }
+
+ if (os.release().toLowerCase().includes('microsoft')) {
+ if (isDocker()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ try {
+ return fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') ?
+ !isDocker() : false;
+ } catch (_) {
+ return false;
+ }
+};
+
+if (process.env.__IS_WSL_TEST__) {
+ module.exports = isWsl;
+} else {
+ module.exports = isWsl();
+}
diff --git a/node_modules/is-wsl/license b/node_modules/is-wsl/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/is-wsl/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/is-wsl/package.json b/node_modules/is-wsl/package.json
new file mode 100644
index 0000000..2fa7f75
--- /dev/null
+++ b/node_modules/is-wsl/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "is-wsl",
+ "version": "2.2.0",
+ "description": "Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)",
+ "license": "MIT",
+ "repository": "sindresorhus/is-wsl",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "check",
+ "wsl",
+ "windows",
+ "subsystem",
+ "linux",
+ "detect",
+ "bash",
+ "process",
+ "console",
+ "terminal",
+ "is"
+ ],
+ "dependencies": {
+ "is-docker": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "clear-module": "^3.2.0",
+ "proxyquire": "^2.1.0",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/is-wsl/readme.md b/node_modules/is-wsl/readme.md
new file mode 100644
index 0000000..5fe44fe
--- /dev/null
+++ b/node_modules/is-wsl/readme.md
@@ -0,0 +1,36 @@
+# is-wsl [![Build Status](https://travis-ci.org/sindresorhus/is-wsl.svg?branch=master)](https://travis-ci.org/sindresorhus/is-wsl)
+
+> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows)
+
+Can be useful if you need to work around unimplemented or buggy features in WSL. Supports both WSL 1 and WSL 2.
+
+
+## Install
+
+```
+$ npm install is-wsl
+```
+
+
+## Usage
+
+```js
+const isWsl = require('is-wsl');
+
+// When running inside Windows Subsystem for Linux
+console.log(isWsl);
+//=> true
+```
+
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-is-wsl?utm_source=npm-is-wsl&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/isarray/README.md b/node_modules/isarray/README.md
new file mode 100644
index 0000000..052a62b
--- /dev/null
+++ b/node_modules/isarray/README.md
@@ -0,0 +1,54 @@
+
+# isarray
+
+`Array#isArray` for older browsers.
+
+## Usage
+
+```js
+var isArray = require('isarray');
+
+console.log(isArray([])); // => true
+console.log(isArray({})); // => false
+```
+
+## Installation
+
+With [npm](http://npmjs.org) do
+
+```bash
+$ npm install isarray
+```
+
+Then bundle for the browser with
+[browserify](https://github.com/substack/browserify).
+
+With [component](http://component.io) do
+
+```bash
+$ component install juliangruber/isarray
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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/isarray/build/build.js b/node_modules/isarray/build/build.js
new file mode 100644
index 0000000..ec58596
--- /dev/null
+++ b/node_modules/isarray/build/build.js
@@ -0,0 +1,209 @@
+
+/**
+ * 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.exports) {
+ module.exports = {};
+ module.client = module.component = true;
+ module.call(this, module.exports, require.relative(resolved), module);
+ }
+
+ 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 index = path + '/index.js';
+
+ 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(index)) {
+ return require.aliases[index];
+ }
+};
+
+/**
+ * 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("isarray/index.js", function(exports, require, module){
+module.exports = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]';
+};
+
+});
+require.alias("isarray/index.js", "isarray/index.js");
+
diff --git a/node_modules/isarray/component.json b/node_modules/isarray/component.json
new file mode 100644
index 0000000..9e31b68
--- /dev/null
+++ b/node_modules/isarray/component.json
@@ -0,0 +1,19 @@
+{
+ "name" : "isarray",
+ "description" : "Array#isArray for older browsers",
+ "version" : "0.0.1",
+ "repository" : "juliangruber/isarray",
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main" : "index.js",
+ "scripts" : [
+ "index.js"
+ ],
+ "dependencies" : {},
+ "keywords": ["browser","isarray","array"],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/isarray/index.js b/node_modules/isarray/index.js
new file mode 100644
index 0000000..5f5ad45
--- /dev/null
+++ b/node_modules/isarray/index.js
@@ -0,0 +1,3 @@
+module.exports = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]';
+};
diff --git a/node_modules/isarray/package.json b/node_modules/isarray/package.json
new file mode 100644
index 0000000..5a1e9c1
--- /dev/null
+++ b/node_modules/isarray/package.json
@@ -0,0 +1,25 @@
+{
+ "name" : "isarray",
+ "description" : "Array#isArray for older browsers",
+ "version" : "0.0.1",
+ "repository" : {
+ "type" : "git",
+ "url" : "git://github.com/juliangruber/isarray.git"
+ },
+ "homepage": "https://github.com/juliangruber/isarray",
+ "main" : "index.js",
+ "scripts" : {
+ "test" : "tap test/*.js"
+ },
+ "dependencies" : {},
+ "devDependencies" : {
+ "tap" : "*"
+ },
+ "keywords": ["browser","isarray","array"],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/isbinaryfile/LICENSE.txt b/node_modules/isbinaryfile/LICENSE.txt
new file mode 100644
index 0000000..4226d72
--- /dev/null
+++ b/node_modules/isbinaryfile/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2017 Garen J. Torikian
+
+MIT License
+
+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/isbinaryfile/README.md b/node_modules/isbinaryfile/README.md
new file mode 100644
index 0000000..1f3aad9
--- /dev/null
+++ b/node_modules/isbinaryfile/README.md
@@ -0,0 +1,78 @@
+# isBinaryFile
+
+Detects if a file is binary in Node.js. Similar to [Perl's `-B` switch](http://stackoverflow.com/questions/899206/how-does-perl-know-a-file-is-binary), in that:
+- it reads the first few thousand bytes of a file
+- checks for a `null` byte; if it's found, it's binary
+- flags non-ASCII characters. After a certain number of "weird" characters, the file is flagged as binary
+
+Much of the logic is pretty much ported from [ag](https://github.com/ggreer/the_silver_searcher).
+
+Note: if the file doesn't exist, is a directory, or is empty, the function returns `false`.
+
+## Installation
+
+```
+npm install isbinaryfile
+```
+
+## Usage
+
+### isBinaryFile(filepath, callback)
+
+* `filepath`, a `string` indicating the path to the file.
+* `callback`, a `function` for the callback. It has two arguments:
+ - `err`, the typical Node.js error argument
+ - `result`, a `boolean` of `true` or `false`, depending on if the file is binary
+
+
+### isBinaryFile(bytes, size, callback)
+
+* `bytes`, a `Buffer` of the file's contents.
+* `size`, an optional `number` indicating the file size.
+* `callback`, a `function` for the callback. It has two arguments:
+ - `err`, the typical Node.js error argument
+ - `result`, a `boolean` of `true` or `false`, depending on if the file is binary
+
+
+### isBinaryFile.sync(filepath)
+
+* `filepath`, a `string` indicating the path to the file.
+
+
+### isBinaryFile.sync(bytes, size)
+
+* `bytes`, a `Buffer` of the file's contents.
+* `size`, an `number` indicating the file size.
+
+
+Returns a `boolean` of `true` or `false`, depending on if the file is binary.
+
+### Examples
+
+```javascript
+var isBinaryFile = require("isbinaryfile");
+
+fs.readFile("some_file", function(err, data) {
+ fs.lstat("some_file", function(err, stat) {
+ isBinaryFile(data, stat.size, function (err, result) {
+ if (!err) {
+ if (result) {
+ console.log("It is!")
+ }
+ else {
+ console.log("No.")
+ }
+ }
+ });
+ });
+});
+
+isBinaryFile.sync("some_file"); // true or false
+var bytes = fs.readFileSync(("some_file"));
+var size = fs.lstatSync(("some_file").size;
+isBinaryFile.sync(bytes, size); // true or false
+```
+
+## Testing
+
+Run `npm install` to install `mocha`, then run `npm test`.
diff --git a/node_modules/isbinaryfile/index.js b/node_modules/isbinaryfile/index.js
new file mode 100644
index 0000000..7c3f06a
--- /dev/null
+++ b/node_modules/isbinaryfile/index.js
@@ -0,0 +1,129 @@
+var fs = require('fs');
+var path = require('path');
+var alloc = require('buffer-alloc');
+var MAX_BYTES = 512;
+
+module.exports = function(bytes, size, cb) {
+ // Only two args
+ if (cb === undefined) {
+ var file = bytes;
+ cb = size;
+
+ fs.stat(file, function(err, stat) {
+ if (err || !stat.isFile()) return cb(err, false);
+
+ fs.open(file, 'r', function(r_err, descriptor){
+ if (r_err) return cb(r_err);
+ bytes = alloc(MAX_BYTES);
+ // Read the file with no encoding for raw buffer access.
+ fs.read(descriptor, bytes, 0, bytes.length, 0, function(err, size, bytes){
+ fs.close(descriptor, function(c_err){
+ if (c_err) return cb(c_err, false);
+ return cb(null, isBinaryCheck(bytes, size));
+ });
+ });
+ });
+ });
+ }
+ else
+ return cb(null, isBinaryCheck(bytes, size));
+};
+
+function isBinaryCheck(bytes, size) {
+ if (size === 0)
+ return false;
+
+ var suspicious_bytes = 0;
+ var total_bytes = Math.min(size, MAX_BYTES);
+
+ // UTF-8 BOM
+ if (size >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) {
+ return false;
+ }
+
+ // UTF-32 BOM
+ if (size >= 4 && bytes[0] === 0x00 && bytes[1] === 0x00 && bytes[2] == 0xFE && bytes[3] == 0xFF) {
+ return false;
+ }
+
+ // UTF-32 LE BOM
+ if (size >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] === 0x00 && bytes[3] === 0x00) {
+ return false;
+ }
+
+ // GB BOM
+ if (size >= 4 && bytes[0] == 0x84 && bytes[1] == 0x31 && bytes[2] == 0x95 && bytes[3] == 0x33) {
+ return false;
+ }
+
+ if (total_bytes >= 5 && bytes.slice(0, 5) == "%PDF-") {
+ /* PDF. This is binary. */
+ return true;
+ }
+
+ // UTF-16 BE BOM
+ if (size >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) {
+ return false;
+ }
+
+ // UTF-16 LE BOM
+ if (size >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) {
+ return false;
+ }
+
+ for (var i = 0; i < total_bytes; i++) {
+ if (bytes[i] === 0) { // NULL byte--it's binary!
+ return true;
+ }
+ else if ((bytes[i] < 7 || bytes[i] > 14) && (bytes[i] < 32 || bytes[i] > 127)) {
+ // UTF-8 detection
+ if (bytes[i] > 193 && bytes[i] < 224 && i + 1 < total_bytes) {
+ i++;
+ if (bytes[i] > 127 && bytes[i] < 192) {
+ continue;
+ }
+ }
+ else if (bytes[i] > 223 && bytes[i] < 240 && i + 2 < total_bytes) {
+ i++;
+ if (bytes[i] > 127 && bytes[i] < 192 && bytes[i + 1] > 127 && bytes[i + 1] < 192) {
+ i++;
+ continue;
+ }
+ }
+ suspicious_bytes++;
+ // Read at least 32 bytes before making a decision
+ if (i > 32 && (suspicious_bytes * 100) / total_bytes > 10) {
+ return true;
+ }
+ }
+ }
+
+ if ((suspicious_bytes * 100) / total_bytes > 10) {
+ return true;
+ }
+
+ return false;
+}
+
+module.exports.sync = function(bytes, size) {
+ // Only one arg
+ if (size === undefined) {
+ var file = bytes;
+ try {
+ if(!fs.statSync(file).isFile()) return false;
+ } catch (err) {
+ // otherwise continue on
+ }
+ var descriptor = fs.openSync(file, 'r');
+ try {
+ // Read the file with no encoding for raw buffer access.
+ bytes = alloc(MAX_BYTES);
+ size = fs.readSync(descriptor, bytes, 0, bytes.length, 0);
+ } finally {
+ fs.closeSync(descriptor);
+ }
+ return isBinaryCheck(bytes, size);
+ }
+ else
+ return isBinaryCheck(bytes, size);
+}
diff --git a/node_modules/isbinaryfile/package.json b/node_modules/isbinaryfile/package.json
new file mode 100644
index 0000000..97d9a10
--- /dev/null
+++ b/node_modules/isbinaryfile/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "isbinaryfile",
+ "description": "Detects if a file is binary in Node.js. Similar to Perl's -B.",
+ "version": "3.0.3",
+ "dependencies": {
+ "buffer-alloc": "^1.2.0"
+ },
+ "devDependencies": {
+ "mocha": "^2.2.4",
+ "grunt": "~0.4.1",
+ "grunt-release": "~0.6.0",
+ "grunt-exec": "0.4.3",
+ "grunt-cli": "~0.1.13"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "license": "MIT",
+ "main": "./index.js",
+ "maintainers": [
+ {
+ "name": "Garen J. Torikian",
+ "email": "gjtorikian@gmail.com"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/gjtorikian/isBinaryFile"
+ },
+ "scripts": {
+ "test": "mocha"
+ }
+}
diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore
new file mode 100644
index 0000000..c1cb757
--- /dev/null
+++ b/node_modules/isexe/.npmignore
@@ -0,0 +1,2 @@
+.nyc_output/
+coverage/
diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/isexe/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md
new file mode 100644
index 0000000..35769e8
--- /dev/null
+++ b/node_modules/isexe/README.md
@@ -0,0 +1,51 @@
+# isexe
+
+Minimal module to check if a file is executable, and a normal file.
+
+Uses `fs.stat` and tests against the `PATHEXT` environment variable on
+Windows.
+
+## USAGE
+
+```javascript
+var isexe = require('isexe')
+isexe('some-file-name', function (err, isExe) {
+ if (err) {
+ console.error('probably file does not exist or something', err)
+ } else if (isExe) {
+ console.error('this thing can be run')
+ } else {
+ console.error('cannot be run')
+ }
+})
+
+// same thing but synchronous, throws errors
+var isExe = isexe.sync('some-file-name')
+
+// treat errors as just "not executable"
+isexe('maybe-missing-file', { ignoreErrors: true }, callback)
+var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
+```
+
+## API
+
+### `isexe(path, [options], [callback])`
+
+Check if the path is executable. If no callback provided, and a
+global `Promise` object is available, then a Promise will be returned.
+
+Will raise whatever errors may be raised by `fs.stat`, unless
+`options.ignoreErrors` is set to true.
+
+### `isexe.sync(path, [options])`
+
+Same as `isexe` but returns the value and throws any errors raised.
+
+### Options
+
+* `ignoreErrors` Treat all errors as "no, this is not executable", but
+ don't raise them.
+* `uid` Number to use as the user id
+* `gid` Number to use as the group id
+* `pathExt` List of path extensions to use instead of `PATHEXT`
+ environment variable on Windows.
diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js
new file mode 100644
index 0000000..553fb32
--- /dev/null
+++ b/node_modules/isexe/index.js
@@ -0,0 +1,57 @@
+var fs = require('fs')
+var core
+if (process.platform === 'win32' || global.TESTING_WINDOWS) {
+ core = require('./windows.js')
+} else {
+ core = require('./mode.js')
+}
+
+module.exports = isexe
+isexe.sync = sync
+
+function isexe (path, options, cb) {
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ if (!cb) {
+ if (typeof Promise !== 'function') {
+ throw new TypeError('callback not provided')
+ }
+
+ return new Promise(function (resolve, reject) {
+ isexe(path, options || {}, function (er, is) {
+ if (er) {
+ reject(er)
+ } else {
+ resolve(is)
+ }
+ })
+ })
+ }
+
+ core(path, options || {}, function (er, is) {
+ // ignore EACCES because that just means we aren't allowed to run it
+ if (er) {
+ if (er.code === 'EACCES' || options && options.ignoreErrors) {
+ er = null
+ is = false
+ }
+ }
+ cb(er, is)
+ })
+}
+
+function sync (path, options) {
+ // my kingdom for a filtered catch
+ try {
+ return core.sync(path, options || {})
+ } catch (er) {
+ if (options && options.ignoreErrors || er.code === 'EACCES') {
+ return false
+ } else {
+ throw er
+ }
+ }
+}
diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js
new file mode 100644
index 0000000..1995ea4
--- /dev/null
+++ b/node_modules/isexe/mode.js
@@ -0,0 +1,41 @@
+module.exports = isexe
+isexe.sync = sync
+
+var fs = require('fs')
+
+function isexe (path, options, cb) {
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, options))
+ })
+}
+
+function sync (path, options) {
+ return checkStat(fs.statSync(path), options)
+}
+
+function checkStat (stat, options) {
+ return stat.isFile() && checkMode(stat, options)
+}
+
+function checkMode (stat, options) {
+ var mod = stat.mode
+ var uid = stat.uid
+ var gid = stat.gid
+
+ var myUid = options.uid !== undefined ?
+ options.uid : process.getuid && process.getuid()
+ var myGid = options.gid !== undefined ?
+ options.gid : process.getgid && process.getgid()
+
+ var u = parseInt('100', 8)
+ var g = parseInt('010', 8)
+ var o = parseInt('001', 8)
+ var ug = u | g
+
+ var ret = (mod & o) ||
+ (mod & g) && gid === myGid ||
+ (mod & u) && uid === myUid ||
+ (mod & ug) && myUid === 0
+
+ return ret
+}
diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json
new file mode 100644
index 0000000..e452689
--- /dev/null
+++ b/node_modules/isexe/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "isexe",
+ "version": "2.0.0",
+ "description": "Minimal module to check if a file is executable.",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "devDependencies": {
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.5.0",
+ "tap": "^10.3.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js --100",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
+ },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/isexe.git"
+ },
+ "keywords": [],
+ "bugs": {
+ "url": "https://github.com/isaacs/isexe/issues"
+ },
+ "homepage": "https://github.com/isaacs/isexe#readme"
+}
diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js
new file mode 100644
index 0000000..d926df6
--- /dev/null
+++ b/node_modules/isexe/test/basic.js
@@ -0,0 +1,221 @@
+var t = require('tap')
+var fs = require('fs')
+var path = require('path')
+var fixture = path.resolve(__dirname, 'fixtures')
+var meow = fixture + '/meow.cat'
+var mine = fixture + '/mine.cat'
+var ours = fixture + '/ours.cat'
+var fail = fixture + '/fail.false'
+var noent = fixture + '/enoent.exe'
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+
+var isWindows = process.platform === 'win32'
+var hasAccess = typeof fs.access === 'function'
+var winSkip = isWindows && 'windows'
+var accessSkip = !hasAccess && 'no fs.access function'
+var hasPromise = typeof Promise === 'function'
+var promiseSkip = !hasPromise && 'no global Promise'
+
+function reset () {
+ delete require.cache[require.resolve('../')]
+ return require('../')
+}
+
+t.test('setup fixtures', function (t) {
+ rimraf.sync(fixture)
+ mkdirp.sync(fixture)
+ fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n')
+ fs.chmodSync(meow, parseInt('0755', 8))
+ fs.writeFileSync(fail, '#!/usr/bin/env false\n')
+ fs.chmodSync(fail, parseInt('0644', 8))
+ fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n')
+ fs.chmodSync(mine, parseInt('0744', 8))
+ fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n')
+ fs.chmodSync(ours, parseInt('0754', 8))
+ t.end()
+})
+
+t.test('promise', { skip: promiseSkip }, function (t) {
+ var isexe = reset()
+ t.test('meow async', function (t) {
+ isexe(meow).then(function (is) {
+ t.ok(is)
+ t.end()
+ })
+ })
+ t.test('fail async', function (t) {
+ isexe(fail).then(function (is) {
+ t.notOk(is)
+ t.end()
+ })
+ })
+ t.test('noent async', function (t) {
+ isexe(noent).catch(function (er) {
+ t.ok(er)
+ t.end()
+ })
+ })
+ t.test('noent ignore async', function (t) {
+ isexe(noent, { ignoreErrors: true }).then(function (is) {
+ t.notOk(is)
+ t.end()
+ })
+ })
+ t.end()
+})
+
+t.test('no promise', function (t) {
+ global.Promise = null
+ var isexe = reset()
+ t.throws('try to meow a promise', function () {
+ isexe(meow)
+ })
+ t.end()
+})
+
+t.test('access', { skip: accessSkip || winSkip }, function (t) {
+ runTest(t)
+})
+
+t.test('mode', { skip: winSkip }, function (t) {
+ delete fs.access
+ delete fs.accessSync
+ var isexe = reset()
+ t.ok(isexe.sync(ours, { uid: 0, gid: 0 }))
+ t.ok(isexe.sync(mine, { uid: 0, gid: 0 }))
+ runTest(t)
+})
+
+t.test('windows', function (t) {
+ global.TESTING_WINDOWS = true
+ var pathExt = '.EXE;.CAT;.CMD;.COM'
+ t.test('pathExt option', function (t) {
+ runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' })
+ })
+ t.test('pathExt env', function (t) {
+ process.env.PATHEXT = pathExt
+ runTest(t)
+ })
+ t.test('no pathExt', function (t) {
+ // with a pathExt of '', any filename is fine.
+ // so the "fail" one would still pass.
+ runTest(t, { pathExt: '', skipFail: true })
+ })
+ t.test('pathext with empty entry', function (t) {
+ // with a pathExt of '', any filename is fine.
+ // so the "fail" one would still pass.
+ runTest(t, { pathExt: ';' + pathExt, skipFail: true })
+ })
+ t.end()
+})
+
+t.test('cleanup', function (t) {
+ rimraf.sync(fixture)
+ t.end()
+})
+
+function runTest (t, options) {
+ var isexe = reset()
+
+ var optionsIgnore = Object.create(options || {})
+ optionsIgnore.ignoreErrors = true
+
+ if (!options || !options.skipFail) {
+ t.notOk(isexe.sync(fail, options))
+ }
+ t.notOk(isexe.sync(noent, optionsIgnore))
+ if (!options) {
+ t.ok(isexe.sync(meow))
+ } else {
+ t.ok(isexe.sync(meow, options))
+ }
+
+ t.ok(isexe.sync(mine, options))
+ t.ok(isexe.sync(ours, options))
+ t.throws(function () {
+ isexe.sync(noent, options)
+ })
+
+ t.test('meow async', function (t) {
+ if (!options) {
+ isexe(meow, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.ok(is)
+ t.end()
+ })
+ } else {
+ isexe(meow, options, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.ok(is)
+ t.end()
+ })
+ }
+ })
+
+ t.test('mine async', function (t) {
+ isexe(mine, options, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.ok(is)
+ t.end()
+ })
+ })
+
+ t.test('ours async', function (t) {
+ isexe(ours, options, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.ok(is)
+ t.end()
+ })
+ })
+
+ if (!options || !options.skipFail) {
+ t.test('fail async', function (t) {
+ isexe(fail, options, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.notOk(is)
+ t.end()
+ })
+ })
+ }
+
+ t.test('noent async', function (t) {
+ isexe(noent, options, function (er, is) {
+ t.ok(er)
+ t.notOk(is)
+ t.end()
+ })
+ })
+
+ t.test('noent ignore async', function (t) {
+ isexe(noent, optionsIgnore, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.notOk(is)
+ t.end()
+ })
+ })
+
+ t.test('directory is not executable', function (t) {
+ isexe(__dirname, options, function (er, is) {
+ if (er) {
+ throw er
+ }
+ t.notOk(is)
+ t.end()
+ })
+ })
+
+ t.end()
+}
diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js
new file mode 100644
index 0000000..3499673
--- /dev/null
+++ b/node_modules/isexe/windows.js
@@ -0,0 +1,42 @@
+module.exports = isexe
+isexe.sync = sync
+
+var fs = require('fs')
+
+function checkPathExt (path, options) {
+ var pathext = options.pathExt !== undefined ?
+ options.pathExt : process.env.PATHEXT
+
+ if (!pathext) {
+ return true
+ }
+
+ pathext = pathext.split(';')
+ if (pathext.indexOf('') !== -1) {
+ return true
+ }
+ for (var i = 0; i < pathext.length; i++) {
+ var p = pathext[i].toLowerCase()
+ if (p && path.substr(-p.length).toLowerCase() === p) {
+ return true
+ }
+ }
+ return false
+}
+
+function checkStat (stat, path, options) {
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
+ return false
+ }
+ return checkPathExt(path, options)
+}
+
+function isexe (path, options, cb) {
+ fs.stat(path, function (er, stat) {
+ cb(er, er ? false : checkStat(stat, path, options))
+ })
+}
+
+function sync (path, options) {
+ return checkStat(fs.statSync(path), path, options)
+}
diff --git a/node_modules/isstream/.jshintrc b/node_modules/isstream/.jshintrc
new file mode 100644
index 0000000..c8ef3ca
--- /dev/null
+++ b/node_modules/isstream/.jshintrc
@@ -0,0 +1,59 @@
+{
+ "predef": [ ]
+ , "bitwise": false
+ , "camelcase": false
+ , "curly": false
+ , "eqeqeq": false
+ , "forin": false
+ , "immed": false
+ , "latedef": false
+ , "noarg": true
+ , "noempty": true
+ , "nonew": true
+ , "plusplus": false
+ , "quotmark": true
+ , "regexp": false
+ , "undef": true
+ , "unused": true
+ , "strict": false
+ , "trailing": true
+ , "maxlen": 120
+ , "asi": true
+ , "boss": true
+ , "debug": true
+ , "eqnull": true
+ , "esnext": true
+ , "evil": true
+ , "expr": true
+ , "funcscope": false
+ , "globalstrict": false
+ , "iterator": false
+ , "lastsemic": true
+ , "laxbreak": true
+ , "laxcomma": true
+ , "loopfunc": true
+ , "multistr": false
+ , "onecase": false
+ , "proto": false
+ , "regexdash": false
+ , "scripturl": true
+ , "smarttabs": false
+ , "shadow": false
+ , "sub": true
+ , "supernew": false
+ , "validthis": true
+ , "browser": true
+ , "couch": false
+ , "devel": false
+ , "dojo": false
+ , "mootools": false
+ , "node": true
+ , "nonstandard": true
+ , "prototypejs": false
+ , "rhino": false
+ , "worker": true
+ , "wsh": false
+ , "nomen": false
+ , "onevar": false
+ , "passfail": false
+} \ No newline at end of file
diff --git a/node_modules/isstream/.npmignore b/node_modules/isstream/.npmignore
new file mode 100644
index 0000000..aa1ec1e
--- /dev/null
+++ b/node_modules/isstream/.npmignore
@@ -0,0 +1 @@
+*.tgz
diff --git a/node_modules/isstream/.travis.yml b/node_modules/isstream/.travis.yml
new file mode 100644
index 0000000..1fec2ab
--- /dev/null
+++ b/node_modules/isstream/.travis.yml
@@ -0,0 +1,12 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
+branches:
+ only:
+ - master
+notifications:
+ email:
+ - rod@vagg.org
+script: npm test
diff --git a/node_modules/isstream/LICENSE.md b/node_modules/isstream/LICENSE.md
new file mode 100644
index 0000000..43f7153
--- /dev/null
+++ b/node_modules/isstream/LICENSE.md
@@ -0,0 +1,11 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2015 Rod Vagg
+---------------------------
+
+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/isstream/README.md b/node_modules/isstream/README.md
new file mode 100644
index 0000000..06770e8
--- /dev/null
+++ b/node_modules/isstream/README.md
@@ -0,0 +1,66 @@
+# isStream
+
+[![Build Status](https://secure.travis-ci.org/rvagg/isstream.png)](http://travis-ci.org/rvagg/isstream)
+
+**Test if an object is a `Stream`**
+
+[![NPM](https://nodei.co/npm/isstream.svg)](https://nodei.co/npm/isstream/)
+
+The missing `Stream.isStream(obj)`: determine if an object is standard Node.js `Stream`. Works for Node-core `Stream` objects (for 0.8, 0.10, 0.11, and in theory, older and newer versions) and all versions of **[readable-stream](https://github.com/isaacs/readable-stream)**.
+
+## Usage:
+
+```js
+var isStream = require('isstream')
+var Stream = require('stream')
+
+isStream(new Stream()) // true
+
+isStream({}) // false
+
+isStream(new Stream.Readable()) // true
+isStream(new Stream.Writable()) // true
+isStream(new Stream.Duplex()) // true
+isStream(new Stream.Transform()) // true
+isStream(new Stream.PassThrough()) // true
+```
+
+## But wait! There's more!
+
+You can also test for `isReadable(obj)`, `isWritable(obj)` and `isDuplex(obj)` to test for implementations of Streams2 (and Streams3) base classes.
+
+```js
+var isReadable = require('isstream').isReadable
+var isWritable = require('isstream').isWritable
+var isDuplex = require('isstream').isDuplex
+var Stream = require('stream')
+
+isReadable(new Stream()) // false
+isWritable(new Stream()) // false
+isDuplex(new Stream()) // false
+
+isReadable(new Stream.Readable()) // true
+isReadable(new Stream.Writable()) // false
+isReadable(new Stream.Duplex()) // true
+isReadable(new Stream.Transform()) // true
+isReadable(new Stream.PassThrough()) // true
+
+isWritable(new Stream.Readable()) // false
+isWritable(new Stream.Writable()) // true
+isWritable(new Stream.Duplex()) // true
+isWritable(new Stream.Transform()) // true
+isWritable(new Stream.PassThrough()) // true
+
+isDuplex(new Stream.Readable()) // false
+isDuplex(new Stream.Writable()) // false
+isDuplex(new Stream.Duplex()) // true
+isDuplex(new Stream.Transform()) // true
+isDuplex(new Stream.PassThrough()) // true
+```
+
+*Reminder: when implementing your own streams, please [use **readable-stream** rather than core streams](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).*
+
+
+## License
+
+**isStream** is Copyright (c) 2015 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/node_modules/isstream/isstream.js b/node_modules/isstream/isstream.js
new file mode 100644
index 0000000..a1d104a
--- /dev/null
+++ b/node_modules/isstream/isstream.js
@@ -0,0 +1,27 @@
+var stream = require('stream')
+
+
+function isStream (obj) {
+ return obj instanceof stream.Stream
+}
+
+
+function isReadable (obj) {
+ return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object'
+}
+
+
+function isWritable (obj) {
+ return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object'
+}
+
+
+function isDuplex (obj) {
+ return isReadable(obj) && isWritable(obj)
+}
+
+
+module.exports = isStream
+module.exports.isReadable = isReadable
+module.exports.isWritable = isWritable
+module.exports.isDuplex = isDuplex
diff --git a/node_modules/isstream/package.json b/node_modules/isstream/package.json
new file mode 100644
index 0000000..9ee8bf8
--- /dev/null
+++ b/node_modules/isstream/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "isstream",
+ "version": "0.1.2",
+ "description": "Determine if an object is a Stream",
+ "main": "isstream.js",
+ "scripts": {
+ "test": "tar --xform 's/^package/readable-stream-1.0/' -zxf readable-stream-1.0.*.tgz && tar --xform 's/^package/readable-stream-1.1/' -zxf readable-stream-1.1.*.tgz && node test.js; rm -rf readable-stream-1.?/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rvagg/isstream.git"
+ },
+ "keywords": [
+ "stream",
+ "type",
+ "streams",
+ "readable-stream",
+ "hippo"
+ ],
+ "devDependencies": {
+ "tape": "~2.12.3",
+ "core-util-is": "~1.0.0",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x",
+ "inherits": "~2.0.1"
+ },
+ "author": "Rod Vagg <rod@vagg.org>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/rvagg/isstream/issues"
+ },
+ "homepage": "https://github.com/rvagg/isstream"
+}
diff --git a/node_modules/isstream/test.js b/node_modules/isstream/test.js
new file mode 100644
index 0000000..8c950c5
--- /dev/null
+++ b/node_modules/isstream/test.js
@@ -0,0 +1,168 @@
+var tape = require('tape')
+ , EE = require('events').EventEmitter
+ , util = require('util')
+
+
+ , isStream = require('./')
+ , isReadable = require('./').isReadable
+ , isWritable = require('./').isWritable
+ , isDuplex = require('./').isDuplex
+
+ , CoreStreams = require('stream')
+ , ReadableStream10 = require('./readable-stream-1.0/')
+ , ReadableStream11 = require('./readable-stream-1.1/')
+
+
+function test (pass, type, stream) {
+ tape('isStream(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isStream(stream), type)
+ })
+}
+
+
+function testReadable (pass, type, stream) {
+ tape('isReadable(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isReadable(stream), type)
+ })
+}
+
+
+function testWritable (pass, type, stream) {
+ tape('isWritable(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isWritable(stream), type)
+ })
+}
+
+
+function testDuplex (pass, type, stream) {
+ tape('isDuplex(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isDuplex(stream), type)
+ })
+}
+
+
+[ undefined, null, '', true, false, 0, 1, 1.0, 'string', {}, function foo () {} ].forEach(function (o) {
+ test(false, 'non-stream / primitive: ' + (JSON.stringify(o) || (o && o.toString()) || o), o)
+})
+
+
+test(false, 'fake stream obj', { pipe: function () {} })
+
+
+;(function () {
+
+ // looks like a stream!
+
+ function Stream () {
+ EE.call(this)
+ }
+ util.inherits(Stream, EE)
+ Stream.prototype.pipe = function () {}
+ Stream.Stream = Stream
+
+ test(false, 'fake stream "new Stream()"', new Stream())
+
+}())
+
+
+test(true, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+test(true, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+test(true, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+test(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+test(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+test(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+test(true, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+test(true, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+test(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+test(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+test(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+test(true, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+test(true, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+test(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+test(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+test(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+testReadable(false, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+testReadable(true, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+testReadable(false, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+testReadable(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+testReadable(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+testReadable(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+testReadable(true, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+testReadable(false, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+testReadable(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+testReadable(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+testReadable(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+testReadable(true, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+testReadable(false, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+testReadable(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+testReadable(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+testReadable(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+testWritable(false, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+testWritable(false, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+testWritable(true, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+testWritable(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+testWritable(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+testWritable(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+testWritable(false, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+testWritable(true, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+testWritable(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+testWritable(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+testWritable(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+testWritable(false, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+testWritable(true, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+testWritable(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+testWritable(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+testWritable(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+testDuplex(false, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+testDuplex(false, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+testDuplex(false, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+testDuplex(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+testDuplex(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+testDuplex(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+testDuplex(false, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+testDuplex(false, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+testDuplex(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+testDuplex(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+testDuplex(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+testDuplex(false, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+testDuplex(false, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+testDuplex(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+testDuplex(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+testDuplex(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+;[ CoreStreams, ReadableStream10, ReadableStream11 ].forEach(function (p) {
+ [ 'Stream', 'Readable', 'Writable', 'Duplex', 'Transform', 'PassThrough' ].forEach(function (k) {
+ if (!p[k])
+ return
+
+ function SubStream () {
+ p[k].call(this)
+ }
+ util.inherits(SubStream, p[k])
+
+ test(true, 'Stream subclass: ' + p.name + '.' + k, new SubStream())
+
+ })
+})
+
+
+
diff --git a/node_modules/jsbn/.npmignore b/node_modules/jsbn/.npmignore
new file mode 100644
index 0000000..28f1ba7
--- /dev/null
+++ b/node_modules/jsbn/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+.DS_Store \ No newline at end of file
diff --git a/node_modules/jsbn/LICENSE b/node_modules/jsbn/LICENSE
new file mode 100644
index 0000000..2a6457e
--- /dev/null
+++ b/node_modules/jsbn/LICENSE
@@ -0,0 +1,40 @@
+Licensing
+---------
+
+This software is covered under the following copyright:
+
+/*
+ * Copyright (c) 2003-2005 Tom Wu
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
+ * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * In addition, the following condition applies:
+ *
+ * All redistributions must retain an intact copy of this copyright notice
+ * and disclaimer.
+ */
+
+Address all questions regarding this license to:
+
+ Tom Wu
+ tjw@cs.Stanford.EDU \ No newline at end of file
diff --git a/node_modules/jsbn/README.md b/node_modules/jsbn/README.md
new file mode 100644
index 0000000..7aac67f
--- /dev/null
+++ b/node_modules/jsbn/README.md
@@ -0,0 +1,175 @@
+# jsbn: javascript big number
+
+[Tom Wu's Original Website](http://www-cs-students.stanford.edu/~tjw/jsbn/)
+
+I felt compelled to put this on github and publish to npm. I haven't tested every other big integer library out there, but the few that I have tested in comparison to this one have not even come close in performance. I am aware of the `bi` module on npm, however it has been modified and I wanted to publish the original without modifications. This is jsbn and jsbn2 from Tom Wu's original website above, with the modular pattern applied to prevent global leaks and to allow for use with node.js on the server side.
+
+## usage
+
+ var BigInteger = require('jsbn');
+
+ var a = new BigInteger('91823918239182398123');
+ alert(a.bitLength()); // 67
+
+
+## API
+
+### bi.toString()
+
+returns the base-10 number as a string
+
+### bi.negate()
+
+returns a new BigInteger equal to the negation of `bi`
+
+### bi.abs
+
+returns new BI of absolute value
+
+### bi.compareTo
+
+
+
+### bi.bitLength
+
+
+
+### bi.mod
+
+
+
+### bi.modPowInt
+
+
+
+### bi.clone
+
+
+
+### bi.intValue
+
+
+
+### bi.byteValue
+
+
+
+### bi.shortValue
+
+
+
+### bi.signum
+
+
+
+### bi.toByteArray
+
+
+
+### bi.equals
+
+
+
+### bi.min
+
+
+
+### bi.max
+
+
+
+### bi.and
+
+
+
+### bi.or
+
+
+
+### bi.xor
+
+
+
+### bi.andNot
+
+
+
+### bi.not
+
+
+
+### bi.shiftLeft
+
+
+
+### bi.shiftRight
+
+
+
+### bi.getLowestSetBit
+
+
+
+### bi.bitCount
+
+
+
+### bi.testBit
+
+
+
+### bi.setBit
+
+
+
+### bi.clearBit
+
+
+
+### bi.flipBit
+
+
+
+### bi.add
+
+
+
+### bi.subtract
+
+
+
+### bi.multiply
+
+
+
+### bi.divide
+
+
+
+### bi.remainder
+
+
+
+### bi.divideAndRemainder
+
+
+
+### bi.modPow
+
+
+
+### bi.modInverse
+
+
+
+### bi.pow
+
+
+
+### bi.gcd
+
+
+
+### bi.isProbablePrime
+
+
diff --git a/node_modules/jsbn/example.html b/node_modules/jsbn/example.html
new file mode 100644
index 0000000..7c26a56
--- /dev/null
+++ b/node_modules/jsbn/example.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title></title>
+ </head>
+ <body>
+
+
+ <script src="index.js"></script>
+ </body>
+</html> \ No newline at end of file
diff --git a/node_modules/jsbn/example.js b/node_modules/jsbn/example.js
new file mode 100644
index 0000000..664c1b4
--- /dev/null
+++ b/node_modules/jsbn/example.js
@@ -0,0 +1,3 @@
+var BigInteger = require('./');
+var a = new BigInteger('91823918239182398123');
+console.log(a.bitLength()); \ No newline at end of file
diff --git a/node_modules/jsbn/index.js b/node_modules/jsbn/index.js
new file mode 100644
index 0000000..973226d
--- /dev/null
+++ b/node_modules/jsbn/index.js
@@ -0,0 +1,1357 @@
+(function(){
+
+ // Copyright (c) 2005 Tom Wu
+ // All Rights Reserved.
+ // See "LICENSE" for details.
+
+ // Basic JavaScript BN library - subset useful for RSA encryption.
+
+ // Bits per digit
+ var dbits;
+
+ // JavaScript engine analysis
+ var canary = 0xdeadbeefcafe;
+ var j_lm = ((canary&0xffffff)==0xefcafe);
+
+ // (public) Constructor
+ function BigInteger(a,b,c) {
+ if(a != null)
+ if("number" == typeof a) this.fromNumber(a,b,c);
+ else if(b == null && "string" != typeof a) this.fromString(a,256);
+ else this.fromString(a,b);
+ }
+
+ // return new, unset BigInteger
+ function nbi() { return new BigInteger(null); }
+
+ // am: Compute w_j += (x*this_i), propagate carries,
+ // c is initial carry, returns final carry.
+ // c < 3*dvalue, x < 2*dvalue, this_i < dvalue
+ // We need to select the fastest one that works in this environment.
+
+ // am1: use a single mult and divide to get the high bits,
+ // max digit bits should be 26 because
+ // max internal value = 2*dvalue^2-2*dvalue (< 2^53)
+ function am1(i,x,w,j,c,n) {
+ while(--n >= 0) {
+ var v = x*this[i++]+w[j]+c;
+ c = Math.floor(v/0x4000000);
+ w[j++] = v&0x3ffffff;
+ }
+ return c;
+ }
+ // am2 avoids a big mult-and-extract completely.
+ // Max digit bits should be <= 30 because we do bitwise ops
+ // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
+ function am2(i,x,w,j,c,n) {
+ var xl = x&0x7fff, xh = x>>15;
+ while(--n >= 0) {
+ var l = this[i]&0x7fff;
+ var h = this[i++]>>15;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);
+ c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
+ w[j++] = l&0x3fffffff;
+ }
+ return c;
+ }
+ // Alternately, set max digit bits to 28 since some
+ // browsers slow down when dealing with 32-bit numbers.
+ function am3(i,x,w,j,c,n) {
+ var xl = x&0x3fff, xh = x>>14;
+ while(--n >= 0) {
+ var l = this[i]&0x3fff;
+ var h = this[i++]>>14;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x3fff)<<14)+w[j]+c;
+ c = (l>>28)+(m>>14)+xh*h;
+ w[j++] = l&0xfffffff;
+ }
+ return c;
+ }
+ var inBrowser = typeof navigator !== "undefined";
+ if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) {
+ BigInteger.prototype.am = am2;
+ dbits = 30;
+ }
+ else if(inBrowser && j_lm && (navigator.appName != "Netscape")) {
+ BigInteger.prototype.am = am1;
+ dbits = 26;
+ }
+ else { // Mozilla/Netscape seems to prefer am3
+ BigInteger.prototype.am = am3;
+ dbits = 28;
+ }
+
+ BigInteger.prototype.DB = dbits;
+ BigInteger.prototype.DM = ((1<<dbits)-1);
+ BigInteger.prototype.DV = (1<<dbits);
+
+ var BI_FP = 52;
+ BigInteger.prototype.FV = Math.pow(2,BI_FP);
+ BigInteger.prototype.F1 = BI_FP-dbits;
+ BigInteger.prototype.F2 = 2*dbits-BI_FP;
+
+ // Digit conversions
+ var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
+ var BI_RC = new Array();
+ var rr,vv;
+ rr = "0".charCodeAt(0);
+ for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
+ rr = "a".charCodeAt(0);
+ for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
+ rr = "A".charCodeAt(0);
+ for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
+
+ function int2char(n) { return BI_RM.charAt(n); }
+ function intAt(s,i) {
+ var c = BI_RC[s.charCodeAt(i)];
+ return (c==null)?-1:c;
+ }
+
+ // (protected) copy this to r
+ function bnpCopyTo(r) {
+ for(var i = this.t-1; i >= 0; --i) r[i] = this[i];
+ r.t = this.t;
+ r.s = this.s;
+ }
+
+ // (protected) set from integer value x, -DV <= x < DV
+ function bnpFromInt(x) {
+ this.t = 1;
+ this.s = (x<0)?-1:0;
+ if(x > 0) this[0] = x;
+ else if(x < -1) this[0] = x+this.DV;
+ else this.t = 0;
+ }
+
+ // return bigint initialized to value
+ function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
+
+ // (protected) set from string and radix
+ function bnpFromString(s,b) {
+ var k;
+ if(b == 16) k = 4;
+ else if(b == 8) k = 3;
+ else if(b == 256) k = 8; // byte array
+ else if(b == 2) k = 1;
+ else if(b == 32) k = 5;
+ else if(b == 4) k = 2;
+ else { this.fromRadix(s,b); return; }
+ this.t = 0;
+ this.s = 0;
+ var i = s.length, mi = false, sh = 0;
+ while(--i >= 0) {
+ var x = (k==8)?s[i]&0xff:intAt(s,i);
+ if(x < 0) {
+ if(s.charAt(i) == "-") mi = true;
+ continue;
+ }
+ mi = false;
+ if(sh == 0)
+ this[this.t++] = x;
+ else if(sh+k > this.DB) {
+ this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<<sh;
+ this[this.t++] = (x>>(this.DB-sh));
+ }
+ else
+ this[this.t-1] |= x<<sh;
+ sh += k;
+ if(sh >= this.DB) sh -= this.DB;
+ }
+ if(k == 8 && (s[0]&0x80) != 0) {
+ this.s = -1;
+ if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)<<sh;
+ }
+ this.clamp();
+ if(mi) BigInteger.ZERO.subTo(this,this);
+ }
+
+ // (protected) clamp off excess high words
+ function bnpClamp() {
+ var c = this.s&this.DM;
+ while(this.t > 0 && this[this.t-1] == c) --this.t;
+ }
+
+ // (public) return string representation in given radix
+ function bnToString(b) {
+ if(this.s < 0) return "-"+this.negate().toString(b);
+ var k;
+ if(b == 16) k = 4;
+ else if(b == 8) k = 3;
+ else if(b == 2) k = 1;
+ else if(b == 32) k = 5;
+ else if(b == 4) k = 2;
+ else return this.toRadix(b);
+ var km = (1<<k)-1, d, m = false, r = "", i = this.t;
+ var p = this.DB-(i*this.DB)%k;
+ if(i-- > 0) {
+ if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }
+ while(i >= 0) {
+ if(p < k) {
+ d = (this[i]&((1<<p)-1))<<(k-p);
+ d |= this[--i]>>(p+=this.DB-k);
+ }
+ else {
+ d = (this[i]>>(p-=k))&km;
+ if(p <= 0) { p += this.DB; --i; }
+ }
+ if(d > 0) m = true;
+ if(m) r += int2char(d);
+ }
+ }
+ return m?r:"0";
+ }
+
+ // (public) -this
+ function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
+
+ // (public) |this|
+ function bnAbs() { return (this.s<0)?this.negate():this; }
+
+ // (public) return + if this > a, - if this < a, 0 if equal
+ function bnCompareTo(a) {
+ var r = this.s-a.s;
+ if(r != 0) return r;
+ var i = this.t;
+ r = i-a.t;
+ if(r != 0) return (this.s<0)?-r:r;
+ while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;
+ return 0;
+ }
+
+ // returns bit length of the integer x
+ function nbits(x) {
+ var r = 1, t;
+ if((t=x>>>16) != 0) { x = t; r += 16; }
+ if((t=x>>8) != 0) { x = t; r += 8; }
+ if((t=x>>4) != 0) { x = t; r += 4; }
+ if((t=x>>2) != 0) { x = t; r += 2; }
+ if((t=x>>1) != 0) { x = t; r += 1; }
+ return r;
+ }
+
+ // (public) return the number of bits in "this"
+ function bnBitLength() {
+ if(this.t <= 0) return 0;
+ return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));
+ }
+
+ // (protected) r = this << n*DB
+ function bnpDLShiftTo(n,r) {
+ var i;
+ for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];
+ for(i = n-1; i >= 0; --i) r[i] = 0;
+ r.t = this.t+n;
+ r.s = this.s;
+ }
+
+ // (protected) r = this >> n*DB
+ function bnpDRShiftTo(n,r) {
+ for(var i = n; i < this.t; ++i) r[i-n] = this[i];
+ r.t = Math.max(this.t-n,0);
+ r.s = this.s;
+ }
+
+ // (protected) r = this << n
+ function bnpLShiftTo(n,r) {
+ var bs = n%this.DB;
+ var cbs = this.DB-bs;
+ var bm = (1<<cbs)-1;
+ var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;
+ for(i = this.t-1; i >= 0; --i) {
+ r[i+ds+1] = (this[i]>>cbs)|c;
+ c = (this[i]&bm)<<bs;
+ }
+ for(i = ds-1; i >= 0; --i) r[i] = 0;
+ r[ds] = c;
+ r.t = this.t+ds+1;
+ r.s = this.s;
+ r.clamp();
+ }
+
+ // (protected) r = this >> n
+ function bnpRShiftTo(n,r) {
+ r.s = this.s;
+ var ds = Math.floor(n/this.DB);
+ if(ds >= this.t) { r.t = 0; return; }
+ var bs = n%this.DB;
+ var cbs = this.DB-bs;
+ var bm = (1<<bs)-1;
+ r[0] = this[ds]>>bs;
+ for(var i = ds+1; i < this.t; ++i) {
+ r[i-ds-1] |= (this[i]&bm)<<cbs;
+ r[i-ds] = this[i]>>bs;
+ }
+ if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;
+ r.t = this.t-ds;
+ r.clamp();
+ }
+
+ // (protected) r = this - a
+ function bnpSubTo(a,r) {
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
+ while(i < m) {
+ c += this[i]-a[i];
+ r[i++] = c&this.DM;
+ c >>= this.DB;
+ }
+ if(a.t < this.t) {
+ c -= a.s;
+ while(i < this.t) {
+ c += this[i];
+ r[i++] = c&this.DM;
+ c >>= this.DB;
+ }
+ c += this.s;
+ }
+ else {
+ c += this.s;
+ while(i < a.t) {
+ c -= a[i];
+ r[i++] = c&this.DM;
+ c >>= this.DB;
+ }
+ c -= a.s;
+ }
+ r.s = (c<0)?-1:0;
+ if(c < -1) r[i++] = this.DV+c;
+ else if(c > 0) r[i++] = c;
+ r.t = i;
+ r.clamp();
+ }
+
+ // (protected) r = this * a, r != this,a (HAC 14.12)
+ // "this" should be the larger one if appropriate.
+ function bnpMultiplyTo(a,r) {
+ var x = this.abs(), y = a.abs();
+ var i = x.t;
+ r.t = i+y.t;
+ while(--i >= 0) r[i] = 0;
+ for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);
+ r.s = 0;
+ r.clamp();
+ if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
+ }
+
+ // (protected) r = this^2, r != this (HAC 14.16)
+ function bnpSquareTo(r) {
+ var x = this.abs();
+ var i = r.t = 2*x.t;
+ while(--i >= 0) r[i] = 0;
+ for(i = 0; i < x.t-1; ++i) {
+ var c = x.am(i,x[i],r,2*i,0,1);
+ if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {
+ r[i+x.t] -= x.DV;
+ r[i+x.t+1] = 1;
+ }
+ }
+ if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);
+ r.s = 0;
+ r.clamp();
+ }
+
+ // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
+ // r != q, this != m. q or r may be null.
+ function bnpDivRemTo(m,q,r) {
+ var pm = m.abs();
+ if(pm.t <= 0) return;
+ var pt = this.abs();
+ if(pt.t < pm.t) {
+ if(q != null) q.fromInt(0);
+ if(r != null) this.copyTo(r);
+ return;
+ }
+ if(r == null) r = nbi();
+ var y = nbi(), ts = this.s, ms = m.s;
+ var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus
+ if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
+ else { pm.copyTo(y); pt.copyTo(r); }
+ var ys = y.t;
+ var y0 = y[ys-1];
+ if(y0 == 0) return;
+ var yt = y0*(1<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);
+ var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;
+ var i = r.t, j = i-ys, t = (q==null)?nbi():q;
+ y.dlShiftTo(j,t);
+ if(r.compareTo(t) >= 0) {
+ r[r.t++] = 1;
+ r.subTo(t,r);
+ }
+ BigInteger.ONE.dlShiftTo(ys,t);
+ t.subTo(y,y); // "negative" y so we can replace sub with am later
+ while(y.t < ys) y[y.t++] = 0;
+ while(--j >= 0) {
+ // Estimate quotient digit
+ var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);
+ if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
+ y.dlShiftTo(j,t);
+ r.subTo(t,r);
+ while(r[i] < --qd) r.subTo(t,r);
+ }
+ }
+ if(q != null) {
+ r.drShiftTo(ys,q);
+ if(ts != ms) BigInteger.ZERO.subTo(q,q);
+ }
+ r.t = ys;
+ r.clamp();
+ if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
+ if(ts < 0) BigInteger.ZERO.subTo(r,r);
+ }
+
+ // (public) this mod a
+ function bnMod(a) {
+ var r = nbi();
+ this.abs().divRemTo(a,null,r);
+ if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
+ return r;
+ }
+
+ // Modular reduction using "classic" algorithm
+ function Classic(m) { this.m = m; }
+ function cConvert(x) {
+ if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
+ else return x;
+ }
+ function cRevert(x) { return x; }
+ function cReduce(x) { x.divRemTo(this.m,null,x); }
+ function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+ function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+ Classic.prototype.convert = cConvert;
+ Classic.prototype.revert = cRevert;
+ Classic.prototype.reduce = cReduce;
+ Classic.prototype.mulTo = cMulTo;
+ Classic.prototype.sqrTo = cSqrTo;
+
+ // (protected) return "-1/this % 2^DB"; useful for Mont. reduction
+ // justification:
+ // xy == 1 (mod m)
+ // xy = 1+km
+ // xy(2-xy) = (1+km)(1-km)
+ // x[y(2-xy)] = 1-k^2m^2
+ // x[y(2-xy)] == 1 (mod m^2)
+ // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
+ // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
+ // JS multiply "overflows" differently from C/C++, so care is needed here.
+ function bnpInvDigit() {
+ if(this.t < 1) return 0;
+ var x = this[0];
+ if((x&1) == 0) return 0;
+ var y = x&3; // y == 1/x mod 2^2
+ y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
+ y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
+ y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
+ // last step - calculate inverse mod DV directly;
+ // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
+ y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits
+ // we really want the negative inverse, and -DV < y < DV
+ return (y>0)?this.DV-y:-y;
+ }
+
+ // Montgomery reduction
+ function Montgomery(m) {
+ this.m = m;
+ this.mp = m.invDigit();
+ this.mpl = this.mp&0x7fff;
+ this.mph = this.mp>>15;
+ this.um = (1<<(m.DB-15))-1;
+ this.mt2 = 2*m.t;
+ }
+
+ // xR mod m
+ function montConvert(x) {
+ var r = nbi();
+ x.abs().dlShiftTo(this.m.t,r);
+ r.divRemTo(this.m,null,r);
+ if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
+ return r;
+ }
+
+ // x/R mod m
+ function montRevert(x) {
+ var r = nbi();
+ x.copyTo(r);
+ this.reduce(r);
+ return r;
+ }
+
+ // x = x/R mod m (HAC 14.32)
+ function montReduce(x) {
+ while(x.t <= this.mt2) // pad x so am has enough room later
+ x[x.t++] = 0;
+ for(var i = 0; i < this.m.t; ++i) {
+ // faster way of calculating u0 = x[i]*mp mod DV
+ var j = x[i]&0x7fff;
+ var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;
+ // use am to combine the multiply-shift-add into one call
+ j = i+this.m.t;
+ x[j] += this.m.am(0,u0,x,i,0,this.m.t);
+ // propagate carry
+ while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }
+ }
+ x.clamp();
+ x.drShiftTo(this.m.t,x);
+ if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
+ }
+
+ // r = "x^2/R mod m"; x != r
+ function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+ // r = "xy/R mod m"; x,y != r
+ function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+
+ Montgomery.prototype.convert = montConvert;
+ Montgomery.prototype.revert = montRevert;
+ Montgomery.prototype.reduce = montReduce;
+ Montgomery.prototype.mulTo = montMulTo;
+ Montgomery.prototype.sqrTo = montSqrTo;
+
+ // (protected) true iff this is even
+ function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }
+
+ // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
+ function bnpExp(e,z) {
+ if(e > 0xffffffff || e < 1) return BigInteger.ONE;
+ var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
+ g.copyTo(r);
+ while(--i >= 0) {
+ z.sqrTo(r,r2);
+ if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
+ else { var t = r; r = r2; r2 = t; }
+ }
+ return z.revert(r);
+ }
+
+ // (public) this^e % m, 0 <= e < 2^32
+ function bnModPowInt(e,m) {
+ var z;
+ if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
+ return this.exp(e,z);
+ }
+
+ // protected
+ BigInteger.prototype.copyTo = bnpCopyTo;
+ BigInteger.prototype.fromInt = bnpFromInt;
+ BigInteger.prototype.fromString = bnpFromString;
+ BigInteger.prototype.clamp = bnpClamp;
+ BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
+ BigInteger.prototype.drShiftTo = bnpDRShiftTo;
+ BigInteger.prototype.lShiftTo = bnpLShiftTo;
+ BigInteger.prototype.rShiftTo = bnpRShiftTo;
+ BigInteger.prototype.subTo = bnpSubTo;
+ BigInteger.prototype.multiplyTo = bnpMultiplyTo;
+ BigInteger.prototype.squareTo = bnpSquareTo;
+ BigInteger.prototype.divRemTo = bnpDivRemTo;
+ BigInteger.prototype.invDigit = bnpInvDigit;
+ BigInteger.prototype.isEven = bnpIsEven;
+ BigInteger.prototype.exp = bnpExp;
+
+ // public
+ BigInteger.prototype.toString = bnToString;
+ BigInteger.prototype.negate = bnNegate;
+ BigInteger.prototype.abs = bnAbs;
+ BigInteger.prototype.compareTo = bnCompareTo;
+ BigInteger.prototype.bitLength = bnBitLength;
+ BigInteger.prototype.mod = bnMod;
+ BigInteger.prototype.modPowInt = bnModPowInt;
+
+ // "constants"
+ BigInteger.ZERO = nbv(0);
+ BigInteger.ONE = nbv(1);
+
+ // Copyright (c) 2005-2009 Tom Wu
+ // All Rights Reserved.
+ // See "LICENSE" for details.
+
+ // Extended JavaScript BN functions, required for RSA private ops.
+
+ // Version 1.1: new BigInteger("0", 10) returns "proper" zero
+ // Version 1.2: square() API, isProbablePrime fix
+
+ // (public)
+ function bnClone() { var r = nbi(); this.copyTo(r); return r; }
+
+ // (public) return value as integer
+ function bnIntValue() {
+ if(this.s < 0) {
+ if(this.t == 1) return this[0]-this.DV;
+ else if(this.t == 0) return -1;
+ }
+ else if(this.t == 1) return this[0];
+ else if(this.t == 0) return 0;
+ // assumes 16 < DB < 32
+ return ((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0];
+ }
+
+ // (public) return value as byte
+ function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>24; }
+
+ // (public) return value as short (assumes DB>=16)
+ function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }
+
+ // (protected) return x s.t. r^x < DV
+ function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }
+
+ // (public) 0 if this == 0, 1 if this > 0
+ function bnSigNum() {
+ if(this.s < 0) return -1;
+ else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;
+ else return 1;
+ }
+
+ // (protected) convert to radix string
+ function bnpToRadix(b) {
+ if(b == null) b = 10;
+ if(this.signum() == 0 || b < 2 || b > 36) return "0";
+ var cs = this.chunkSize(b);
+ var a = Math.pow(b,cs);
+ var d = nbv(a), y = nbi(), z = nbi(), r = "";
+ this.divRemTo(d,y,z);
+ while(y.signum() > 0) {
+ r = (a+z.intValue()).toString(b).substr(1) + r;
+ y.divRemTo(d,y,z);
+ }
+ return z.intValue().toString(b) + r;
+ }
+
+ // (protected) convert from radix string
+ function bnpFromRadix(s,b) {
+ this.fromInt(0);
+ if(b == null) b = 10;
+ var cs = this.chunkSize(b);
+ var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
+ for(var i = 0; i < s.length; ++i) {
+ var x = intAt(s,i);
+ if(x < 0) {
+ if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
+ continue;
+ }
+ w = b*w+x;
+ if(++j >= cs) {
+ this.dMultiply(d);
+ this.dAddOffset(w,0);
+ j = 0;
+ w = 0;
+ }
+ }
+ if(j > 0) {
+ this.dMultiply(Math.pow(b,j));
+ this.dAddOffset(w,0);
+ }
+ if(mi) BigInteger.ZERO.subTo(this,this);
+ }
+
+ // (protected) alternate constructor
+ function bnpFromNumber(a,b,c) {
+ if("number" == typeof b) {
+ // new BigInteger(int,int,RNG)
+ if(a < 2) this.fromInt(1);
+ else {
+ this.fromNumber(a,c);
+ if(!this.testBit(a-1)) // force MSB set
+ this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
+ if(this.isEven()) this.dAddOffset(1,0); // force odd
+ while(!this.isProbablePrime(b)) {
+ this.dAddOffset(2,0);
+ if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
+ }
+ }
+ }
+ else {
+ // new BigInteger(int,RNG)
+ var x = new Array(), t = a&7;
+ x.length = (a>>3)+1;
+ b.nextBytes(x);
+ if(t > 0) x[0] &= ((1<<t)-1); else x[0] = 0;
+ this.fromString(x,256);
+ }
+ }
+
+ // (public) convert to bigendian byte array
+ function bnToByteArray() {
+ var i = this.t, r = new Array();
+ r[0] = this.s;
+ var p = this.DB-(i*this.DB)%8, d, k = 0;
+ if(i-- > 0) {
+ if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)
+ r[k++] = d|(this.s<<(this.DB-p));
+ while(i >= 0) {
+ if(p < 8) {
+ d = (this[i]&((1<<p)-1))<<(8-p);
+ d |= this[--i]>>(p+=this.DB-8);
+ }
+ else {
+ d = (this[i]>>(p-=8))&0xff;
+ if(p <= 0) { p += this.DB; --i; }
+ }
+ if((d&0x80) != 0) d |= -256;
+ if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;
+ if(k > 0 || d != this.s) r[k++] = d;
+ }
+ }
+ return r;
+ }
+
+ function bnEquals(a) { return(this.compareTo(a)==0); }
+ function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
+ function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
+
+ // (protected) r = this op a (bitwise)
+ function bnpBitwiseTo(a,op,r) {
+ var i, f, m = Math.min(a.t,this.t);
+ for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);
+ if(a.t < this.t) {
+ f = a.s&this.DM;
+ for(i = m; i < this.t; ++i) r[i] = op(this[i],f);
+ r.t = this.t;
+ }
+ else {
+ f = this.s&this.DM;
+ for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);
+ r.t = a.t;
+ }
+ r.s = op(this.s,a.s);
+ r.clamp();
+ }
+
+ // (public) this & a
+ function op_and(x,y) { return x&y; }
+ function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
+
+ // (public) this | a
+ function op_or(x,y) { return x|y; }
+ function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
+
+ // (public) this ^ a
+ function op_xor(x,y) { return x^y; }
+ function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
+
+ // (public) this & ~a
+ function op_andnot(x,y) { return x&~y; }
+ function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }
+
+ // (public) ~this
+ function bnNot() {
+ var r = nbi();
+ for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];
+ r.t = this.t;
+ r.s = ~this.s;
+ return r;
+ }
+
+ // (public) this << n
+ function bnShiftLeft(n) {
+ var r = nbi();
+ if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
+ return r;
+ }
+
+ // (public) this >> n
+ function bnShiftRight(n) {
+ var r = nbi();
+ if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
+ return r;
+ }
+
+ // return index of lowest 1-bit in x, x < 2^31
+ function lbit(x) {
+ if(x == 0) return -1;
+ var r = 0;
+ if((x&0xffff) == 0) { x >>= 16; r += 16; }
+ if((x&0xff) == 0) { x >>= 8; r += 8; }
+ if((x&0xf) == 0) { x >>= 4; r += 4; }
+ if((x&3) == 0) { x >>= 2; r += 2; }
+ if((x&1) == 0) ++r;
+ return r;
+ }
+
+ // (public) returns index of lowest 1-bit (or -1 if none)
+ function bnGetLowestSetBit() {
+ for(var i = 0; i < this.t; ++i)
+ if(this[i] != 0) return i*this.DB+lbit(this[i]);
+ if(this.s < 0) return this.t*this.DB;
+ return -1;
+ }
+
+ // return number of 1 bits in x
+ function cbit(x) {
+ var r = 0;
+ while(x != 0) { x &= x-1; ++r; }
+ return r;
+ }
+
+ // (public) return number of set bits
+ function bnBitCount() {
+ var r = 0, x = this.s&this.DM;
+ for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);
+ return r;
+ }
+
+ // (public) true iff nth bit is set
+ function bnTestBit(n) {
+ var j = Math.floor(n/this.DB);
+ if(j >= this.t) return(this.s!=0);
+ return((this[j]&(1<<(n%this.DB)))!=0);
+ }
+
+ // (protected) this op (1<<n)
+ function bnpChangeBit(n,op) {
+ var r = BigInteger.ONE.shiftLeft(n);
+ this.bitwiseTo(r,op,r);
+ return r;
+ }
+
+ // (public) this | (1<<n)
+ function bnSetBit(n) { return this.changeBit(n,op_or); }
+
+ // (public) this & ~(1<<n)
+ function bnClearBit(n) { return this.changeBit(n,op_andnot); }
+
+ // (public) this ^ (1<<n)
+ function bnFlipBit(n) { return this.changeBit(n,op_xor); }
+
+ // (protected) r = this + a
+ function bnpAddTo(a,r) {
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
+ while(i < m) {
+ c += this[i]+a[i];
+ r[i++] = c&this.DM;
+ c >>= this.DB;
+ }
+ if(a.t < this.t) {
+ c += a.s;
+ while(i < this.t) {
+ c += this[i];
+ r[i++] = c&this.DM;
+ c >>= this.DB;
+ }
+ c += this.s;
+ }
+ else {
+ c += this.s;
+ while(i < a.t) {
+ c += a[i];
+ r[i++] = c&this.DM;
+ c >>= this.DB;
+ }
+ c += a.s;
+ }
+ r.s = (c<0)?-1:0;
+ if(c > 0) r[i++] = c;
+ else if(c < -1) r[i++] = this.DV+c;
+ r.t = i;
+ r.clamp();
+ }
+
+ // (public) this + a
+ function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
+
+ // (public) this - a
+ function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
+
+ // (public) this * a
+ function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
+
+ // (public) this^2
+ function bnSquare() { var r = nbi(); this.squareTo(r); return r; }
+
+ // (public) this / a
+ function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
+
+ // (public) this % a
+ function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }
+
+ // (public) [this/a,this%a]
+ function bnDivideAndRemainder(a) {
+ var q = nbi(), r = nbi();
+ this.divRemTo(a,q,r);
+ return new Array(q,r);
+ }
+
+ // (protected) this *= n, this >= 0, 1 < n < DV
+ function bnpDMultiply(n) {
+ this[this.t] = this.am(0,n-1,this,0,0,this.t);
+ ++this.t;
+ this.clamp();
+ }
+
+ // (protected) this += n << w words, this >= 0
+ function bnpDAddOffset(n,w) {
+ if(n == 0) return;
+ while(this.t <= w) this[this.t++] = 0;
+ this[w] += n;
+ while(this[w] >= this.DV) {
+ this[w] -= this.DV;
+ if(++w >= this.t) this[this.t++] = 0;
+ ++this[w];
+ }
+ }
+
+ // A "null" reducer
+ function NullExp() {}
+ function nNop(x) { return x; }
+ function nMulTo(x,y,r) { x.multiplyTo(y,r); }
+ function nSqrTo(x,r) { x.squareTo(r); }
+
+ NullExp.prototype.convert = nNop;
+ NullExp.prototype.revert = nNop;
+ NullExp.prototype.mulTo = nMulTo;
+ NullExp.prototype.sqrTo = nSqrTo;
+
+ // (public) this^e
+ function bnPow(e) { return this.exp(e,new NullExp()); }
+
+ // (protected) r = lower n words of "this * a", a.t <= n
+ // "this" should be the larger one if appropriate.
+ function bnpMultiplyLowerTo(a,n,r) {
+ var i = Math.min(this.t+a.t,n);
+ r.s = 0; // assumes a,this >= 0
+ r.t = i;
+ while(i > 0) r[--i] = 0;
+ var j;
+ for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);
+ for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);
+ r.clamp();
+ }
+
+ // (protected) r = "this * a" without lower n words, n > 0
+ // "this" should be the larger one if appropriate.
+ function bnpMultiplyUpperTo(a,n,r) {
+ --n;
+ var i = r.t = this.t+a.t-n;
+ r.s = 0; // assumes a,this >= 0
+ while(--i >= 0) r[i] = 0;
+ for(i = Math.max(n-this.t,0); i < a.t; ++i)
+ r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);
+ r.clamp();
+ r.drShiftTo(1,r);
+ }
+
+ // Barrett modular reduction
+ function Barrett(m) {
+ // setup Barrett
+ this.r2 = nbi();
+ this.q3 = nbi();
+ BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
+ this.mu = this.r2.divide(m);
+ this.m = m;
+ }
+
+ function barrettConvert(x) {
+ if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);
+ else if(x.compareTo(this.m) < 0) return x;
+ else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }
+ }
+
+ function barrettRevert(x) { return x; }
+
+ // x = x mod m (HAC 14.42)
+ function barrettReduce(x) {
+ x.drShiftTo(this.m.t-1,this.r2);
+ if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
+ this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
+ this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
+ while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
+ x.subTo(this.r2,x);
+ while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
+ }
+
+ // r = x^2 mod m; x != r
+ function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+ // r = x*y mod m; x,y != r
+ function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+
+ Barrett.prototype.convert = barrettConvert;
+ Barrett.prototype.revert = barrettRevert;
+ Barrett.prototype.reduce = barrettReduce;
+ Barrett.prototype.mulTo = barrettMulTo;
+ Barrett.prototype.sqrTo = barrettSqrTo;
+
+ // (public) this^e % m (HAC 14.85)
+ function bnModPow(e,m) {
+ var i = e.bitLength(), k, r = nbv(1), z;
+ if(i <= 0) return r;
+ else if(i < 18) k = 1;
+ else if(i < 48) k = 3;
+ else if(i < 144) k = 4;
+ else if(i < 768) k = 5;
+ else k = 6;
+ if(i < 8)
+ z = new Classic(m);
+ else if(m.isEven())
+ z = new Barrett(m);
+ else
+ z = new Montgomery(m);
+
+ // precomputation
+ var g = new Array(), n = 3, k1 = k-1, km = (1<<k)-1;
+ g[1] = z.convert(this);
+ if(k > 1) {
+ var g2 = nbi();
+ z.sqrTo(g[1],g2);
+ while(n <= km) {
+ g[n] = nbi();
+ z.mulTo(g2,g[n-2],g[n]);
+ n += 2;
+ }
+ }
+
+ var j = e.t-1, w, is1 = true, r2 = nbi(), t;
+ i = nbits(e[j])-1;
+ while(j >= 0) {
+ if(i >= k1) w = (e[j]>>(i-k1))&km;
+ else {
+ w = (e[j]&((1<<(i+1))-1))<<(k1-i);
+ if(j > 0) w |= e[j-1]>>(this.DB+i-k1);
+ }
+
+ n = k;
+ while((w&1) == 0) { w >>= 1; --n; }
+ if((i -= n) < 0) { i += this.DB; --j; }
+ if(is1) { // ret == 1, don't bother squaring or multiplying it
+ g[w].copyTo(r);
+ is1 = false;
+ }
+ else {
+ while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }
+ if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }
+ z.mulTo(r2,g[w],r);
+ }
+
+ while(j >= 0 && (e[j]&(1<<i)) == 0) {
+ z.sqrTo(r,r2); t = r; r = r2; r2 = t;
+ if(--i < 0) { i = this.DB-1; --j; }
+ }
+ }
+ return z.revert(r);
+ }
+
+ // (public) gcd(this,a) (HAC 14.54)
+ function bnGCD(a) {
+ var x = (this.s<0)?this.negate():this.clone();
+ var y = (a.s<0)?a.negate():a.clone();
+ if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
+ var i = x.getLowestSetBit(), g = y.getLowestSetBit();
+ if(g < 0) return x;
+ if(i < g) g = i;
+ if(g > 0) {
+ x.rShiftTo(g,x);
+ y.rShiftTo(g,y);
+ }
+ while(x.signum() > 0) {
+ if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);
+ if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);
+ if(x.compareTo(y) >= 0) {
+ x.subTo(y,x);
+ x.rShiftTo(1,x);
+ }
+ else {
+ y.subTo(x,y);
+ y.rShiftTo(1,y);
+ }
+ }
+ if(g > 0) y.lShiftTo(g,y);
+ return y;
+ }
+
+ // (protected) this % n, n < 2^26
+ function bnpModInt(n) {
+ if(n <= 0) return 0;
+ var d = this.DV%n, r = (this.s<0)?n-1:0;
+ if(this.t > 0)
+ if(d == 0) r = this[0]%n;
+ else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;
+ return r;
+ }
+
+ // (public) 1/this % m (HAC 14.61)
+ function bnModInverse(m) {
+ var ac = m.isEven();
+ if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
+ var u = m.clone(), v = this.clone();
+ var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
+ while(u.signum() != 0) {
+ while(u.isEven()) {
+ u.rShiftTo(1,u);
+ if(ac) {
+ if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }
+ a.rShiftTo(1,a);
+ }
+ else if(!b.isEven()) b.subTo(m,b);
+ b.rShiftTo(1,b);
+ }
+ while(v.isEven()) {
+ v.rShiftTo(1,v);
+ if(ac) {
+ if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }
+ c.rShiftTo(1,c);
+ }
+ else if(!d.isEven()) d.subTo(m,d);
+ d.rShiftTo(1,d);
+ }
+ if(u.compareTo(v) >= 0) {
+ u.subTo(v,u);
+ if(ac) a.subTo(c,a);
+ b.subTo(d,b);
+ }
+ else {
+ v.subTo(u,v);
+ if(ac) c.subTo(a,c);
+ d.subTo(b,d);
+ }
+ }
+ if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
+ if(d.compareTo(m) >= 0) return d.subtract(m);
+ if(d.signum() < 0) d.addTo(m,d); else return d;
+ if(d.signum() < 0) return d.add(m); else return d;
+ }
+
+ var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];
+ var lplim = (1<<26)/lowprimes[lowprimes.length-1];
+
+ // (public) test primality with certainty >= 1-.5^t
+ function bnIsProbablePrime(t) {
+ var i, x = this.abs();
+ if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {
+ for(i = 0; i < lowprimes.length; ++i)
+ if(x[0] == lowprimes[i]) return true;
+ return false;
+ }
+ if(x.isEven()) return false;
+ i = 1;
+ while(i < lowprimes.length) {
+ var m = lowprimes[i], j = i+1;
+ while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];
+ m = x.modInt(m);
+ while(i < j) if(m%lowprimes[i++] == 0) return false;
+ }
+ return x.millerRabin(t);
+ }
+
+ // (protected) true if probably prime (HAC 4.24, Miller-Rabin)
+ function bnpMillerRabin(t) {
+ var n1 = this.subtract(BigInteger.ONE);
+ var k = n1.getLowestSetBit();
+ if(k <= 0) return false;
+ var r = n1.shiftRight(k);
+ t = (t+1)>>1;
+ if(t > lowprimes.length) t = lowprimes.length;
+ var a = nbi();
+ for(var i = 0; i < t; ++i) {
+ //Pick bases at random, instead of starting at 2
+ a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);
+ var y = a.modPow(r,this);
+ if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
+ var j = 1;
+ while(j++ < k && y.compareTo(n1) != 0) {
+ y = y.modPowInt(2,this);
+ if(y.compareTo(BigInteger.ONE) == 0) return false;
+ }
+ if(y.compareTo(n1) != 0) return false;
+ }
+ }
+ return true;
+ }
+
+ // protected
+ BigInteger.prototype.chunkSize = bnpChunkSize;
+ BigInteger.prototype.toRadix = bnpToRadix;
+ BigInteger.prototype.fromRadix = bnpFromRadix;
+ BigInteger.prototype.fromNumber = bnpFromNumber;
+ BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
+ BigInteger.prototype.changeBit = bnpChangeBit;
+ BigInteger.prototype.addTo = bnpAddTo;
+ BigInteger.prototype.dMultiply = bnpDMultiply;
+ BigInteger.prototype.dAddOffset = bnpDAddOffset;
+ BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
+ BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
+ BigInteger.prototype.modInt = bnpModInt;
+ BigInteger.prototype.millerRabin = bnpMillerRabin;
+
+ // public
+ BigInteger.prototype.clone = bnClone;
+ BigInteger.prototype.intValue = bnIntValue;
+ BigInteger.prototype.byteValue = bnByteValue;
+ BigInteger.prototype.shortValue = bnShortValue;
+ BigInteger.prototype.signum = bnSigNum;
+ BigInteger.prototype.toByteArray = bnToByteArray;
+ BigInteger.prototype.equals = bnEquals;
+ BigInteger.prototype.min = bnMin;
+ BigInteger.prototype.max = bnMax;
+ BigInteger.prototype.and = bnAnd;
+ BigInteger.prototype.or = bnOr;
+ BigInteger.prototype.xor = bnXor;
+ BigInteger.prototype.andNot = bnAndNot;
+ BigInteger.prototype.not = bnNot;
+ BigInteger.prototype.shiftLeft = bnShiftLeft;
+ BigInteger.prototype.shiftRight = bnShiftRight;
+ BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
+ BigInteger.prototype.bitCount = bnBitCount;
+ BigInteger.prototype.testBit = bnTestBit;
+ BigInteger.prototype.setBit = bnSetBit;
+ BigInteger.prototype.clearBit = bnClearBit;
+ BigInteger.prototype.flipBit = bnFlipBit;
+ BigInteger.prototype.add = bnAdd;
+ BigInteger.prototype.subtract = bnSubtract;
+ BigInteger.prototype.multiply = bnMultiply;
+ BigInteger.prototype.divide = bnDivide;
+ BigInteger.prototype.remainder = bnRemainder;
+ BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
+ BigInteger.prototype.modPow = bnModPow;
+ BigInteger.prototype.modInverse = bnModInverse;
+ BigInteger.prototype.pow = bnPow;
+ BigInteger.prototype.gcd = bnGCD;
+ BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
+
+ // JSBN-specific extension
+ BigInteger.prototype.square = bnSquare;
+
+ // Expose the Barrett function
+ BigInteger.prototype.Barrett = Barrett
+
+ // BigInteger interfaces not implemented in jsbn:
+
+ // BigInteger(int signum, byte[] magnitude)
+ // double doubleValue()
+ // float floatValue()
+ // int hashCode()
+ // long longValue()
+ // static BigInteger valueOf(long val)
+
+ // Random number generator - requires a PRNG backend, e.g. prng4.js
+
+ // For best results, put code like
+ // <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>
+ // in your main HTML document.
+
+ var rng_state;
+ var rng_pool;
+ var rng_pptr;
+
+ // Mix in a 32-bit integer into the pool
+ function rng_seed_int(x) {
+ rng_pool[rng_pptr++] ^= x & 255;
+ rng_pool[rng_pptr++] ^= (x >> 8) & 255;
+ rng_pool[rng_pptr++] ^= (x >> 16) & 255;
+ rng_pool[rng_pptr++] ^= (x >> 24) & 255;
+ if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
+ }
+
+ // Mix in the current time (w/milliseconds) into the pool
+ function rng_seed_time() {
+ rng_seed_int(new Date().getTime());
+ }
+
+ // Initialize the pool with junk if needed.
+ if(rng_pool == null) {
+ rng_pool = new Array();
+ rng_pptr = 0;
+ var t;
+ if(typeof window !== "undefined" && window.crypto) {
+ if (window.crypto.getRandomValues) {
+ // Use webcrypto if available
+ var ua = new Uint8Array(32);
+ window.crypto.getRandomValues(ua);
+ for(t = 0; t < 32; ++t)
+ rng_pool[rng_pptr++] = ua[t];
+ }
+ else if(navigator.appName == "Netscape" && navigator.appVersion < "5") {
+ // Extract entropy (256 bits) from NS4 RNG if available
+ var z = window.crypto.random(32);
+ for(t = 0; t < z.length; ++t)
+ rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;
+ }
+ }
+ while(rng_pptr < rng_psize) { // extract some randomness from Math.random()
+ t = Math.floor(65536 * Math.random());
+ rng_pool[rng_pptr++] = t >>> 8;
+ rng_pool[rng_pptr++] = t & 255;
+ }
+ rng_pptr = 0;
+ rng_seed_time();
+ //rng_seed_int(window.screenX);
+ //rng_seed_int(window.screenY);
+ }
+
+ function rng_get_byte() {
+ if(rng_state == null) {
+ rng_seed_time();
+ rng_state = prng_newstate();
+ rng_state.init(rng_pool);
+ for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
+ rng_pool[rng_pptr] = 0;
+ rng_pptr = 0;
+ //rng_pool = null;
+ }
+ // TODO: allow reseeding after first request
+ return rng_state.next();
+ }
+
+ function rng_get_bytes(ba) {
+ var i;
+ for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();
+ }
+
+ function SecureRandom() {}
+
+ SecureRandom.prototype.nextBytes = rng_get_bytes;
+
+ // prng4.js - uses Arcfour as a PRNG
+
+ function Arcfour() {
+ this.i = 0;
+ this.j = 0;
+ this.S = new Array();
+ }
+
+ // Initialize arcfour context from key, an array of ints, each from [0..255]
+ function ARC4init(key) {
+ var i, j, t;
+ for(i = 0; i < 256; ++i)
+ this.S[i] = i;
+ j = 0;
+ for(i = 0; i < 256; ++i) {
+ j = (j + this.S[i] + key[i % key.length]) & 255;
+ t = this.S[i];
+ this.S[i] = this.S[j];
+ this.S[j] = t;
+ }
+ this.i = 0;
+ this.j = 0;
+ }
+
+ function ARC4next() {
+ var t;
+ this.i = (this.i + 1) & 255;
+ this.j = (this.j + this.S[this.i]) & 255;
+ t = this.S[this.i];
+ this.S[this.i] = this.S[this.j];
+ this.S[this.j] = t;
+ return this.S[(t + this.S[this.i]) & 255];
+ }
+
+ Arcfour.prototype.init = ARC4init;
+ Arcfour.prototype.next = ARC4next;
+
+ // Plug in your RNG constructor here
+ function prng_newstate() {
+ return new Arcfour();
+ }
+
+ // Pool size must be a multiple of 4 and greater than 32.
+ // An array of bytes the size of the pool will be passed to init()
+ var rng_psize = 256;
+
+ BigInteger.SecureRandom = SecureRandom;
+ BigInteger.BigInteger = BigInteger;
+ if (typeof exports !== 'undefined') {
+ exports = module.exports = BigInteger;
+ } else {
+ this.BigInteger = BigInteger;
+ this.SecureRandom = SecureRandom;
+ }
+
+}).call(this);
diff --git a/node_modules/jsbn/package.json b/node_modules/jsbn/package.json
new file mode 100644
index 0000000..7220c19
--- /dev/null
+++ b/node_modules/jsbn/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "jsbn",
+ "version": "0.1.1",
+ "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/andyperlitch/jsbn.git"
+ },
+ "keywords": [
+ "biginteger",
+ "bignumber",
+ "big",
+ "integer"
+ ],
+ "author": "Tom Wu",
+ "license": "MIT"
+}
diff --git a/node_modules/json-buffer/.travis.yml b/node_modules/json-buffer/.travis.yml
new file mode 100644
index 0000000..244b7e8
--- /dev/null
+++ b/node_modules/json-buffer/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - '0.10'
diff --git a/node_modules/json-buffer/LICENSE b/node_modules/json-buffer/LICENSE
new file mode 100644
index 0000000..b799ec0
--- /dev/null
+++ b/node_modules/json-buffer/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Dominic Tarr
+
+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/json-buffer/README.md b/node_modules/json-buffer/README.md
new file mode 100644
index 0000000..4773d63
--- /dev/null
+++ b/node_modules/json-buffer/README.md
@@ -0,0 +1,24 @@
+# json-buffer
+
+JSON functions that can convert buffers!
+
+[![build status](https://secure.travis-ci.org/dominictarr/json-buffer.png)](http://travis-ci.org/dominictarr/json-buffer)
+
+[![testling badge](https://ci.testling.com/dominictarr/json-buffer.png)](https://ci.testling.com/dominictarr/json-buffer)
+
+JSON mangles buffers by converting to an array...
+which isn't helpful. json-buffers converts to base64 instead,
+and deconverts base64 to a buffer.
+
+``` js
+var JSONB = require('json-buffer')
+var Buffer = require('buffer').Buffer
+
+var str = JSONB.stringify(Buffer.from('hello there!'))
+
+console.log(JSONB.parse(str)) //GET a BUFFER back
+```
+
+## License
+
+MIT
diff --git a/node_modules/json-buffer/index.js b/node_modules/json-buffer/index.js
new file mode 100644
index 0000000..16f012e
--- /dev/null
+++ b/node_modules/json-buffer/index.js
@@ -0,0 +1,58 @@
+//TODO: handle reviver/dehydrate function like normal
+//and handle indentation, like normal.
+//if anyone needs this... please send pull request.
+
+exports.stringify = function stringify (o) {
+ if('undefined' == typeof o) return o
+
+ if(o && Buffer.isBuffer(o))
+ return JSON.stringify(':base64:' + o.toString('base64'))
+
+ if(o && o.toJSON)
+ o = o.toJSON()
+
+ if(o && 'object' === typeof o) {
+ var s = ''
+ var array = Array.isArray(o)
+ s = array ? '[' : '{'
+ var first = true
+
+ for(var k in o) {
+ var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k])
+ if(Object.hasOwnProperty.call(o, k) && !ignore) {
+ if(!first)
+ s += ','
+ first = false
+ if (array) {
+ if(o[k] == undefined)
+ s += 'null'
+ else
+ s += stringify(o[k])
+ } else if (o[k] !== void(0)) {
+ s += stringify(k) + ':' + stringify(o[k])
+ }
+ }
+ }
+
+ s += array ? ']' : '}'
+
+ return s
+ } else if ('string' === typeof o) {
+ return JSON.stringify(/^:/.test(o) ? ':' + o : o)
+ } else if ('undefined' === typeof o) {
+ return 'null';
+ } else
+ return JSON.stringify(o)
+}
+
+exports.parse = function (s) {
+ return JSON.parse(s, function (key, value) {
+ if('string' === typeof value) {
+ if(/^:base64:/.test(value))
+ return Buffer.from(value.substring(8), 'base64')
+ else
+ return /^:/.test(value) ? value.substring(1) : value
+ }
+ return value
+ })
+}
diff --git a/node_modules/json-buffer/package.json b/node_modules/json-buffer/package.json
new file mode 100644
index 0000000..346747f
--- /dev/null
+++ b/node_modules/json-buffer/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "json-buffer",
+ "description": "JSON parse & stringify that supports binary via bops & base64",
+ "version": "3.0.1",
+ "homepage": "https://github.com/dominictarr/json-buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/dominictarr/json-buffer.git"
+ },
+ "devDependencies": {
+ "tape": "^4.6.3"
+ },
+ "scripts": {
+ "test": "set -e; for t in test/*.js; do node $t; done"
+ },
+ "author": "Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)",
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/json-buffer/test/index.js b/node_modules/json-buffer/test/index.js
new file mode 100644
index 0000000..94e8372
--- /dev/null
+++ b/node_modules/json-buffer/test/index.js
@@ -0,0 +1,63 @@
+
+var test = require('tape')
+var _JSON = require('../')
+
+function clone (o) {
+ return JSON.parse(JSON.stringify(o))
+}
+
+var examples = {
+ simple: { foo: [], bar: {}, baz: Buffer.from('some binary data') },
+ just_buffer: Buffer.from('JUST A BUFFER'),
+ all_types: {
+ string:'hello',
+ number: 3145,
+ null: null,
+ object: {},
+ array: [],
+ boolean: true,
+ boolean2: false
+ },
+ foo: Buffer.from('foo'),
+ foo2: Buffer.from('foo2'),
+ escape: {
+ buffer: Buffer.from('x'),
+ string: _JSON.stringify(Buffer.from('x'))
+ },
+ escape2: {
+ buffer: Buffer.from('x'),
+ string: ':base64:'+ Buffer.from('x').toString('base64')
+ },
+ undefined: {
+ empty: undefined, test: true
+ },
+ undefined2: {
+ first: 1, empty: undefined, test: true
+ },
+ undefinedArray: {
+ array: [undefined, 1, 'two']
+ },
+ fn: {
+ fn: function () {}
+ },
+ undefined: undefined
+}
+
+for(k in examples)
+(function (value, k) {
+ test(k, function (t) {
+ var s = _JSON.stringify(value)
+ console.log('parse', s)
+ if(JSON.stringify(value) !== undefined) {
+ console.log(s)
+ var _value = _JSON.parse(s)
+ t.deepEqual(clone(_value), clone(value))
+ }
+ else
+ t.equal(s, undefined)
+ t.end()
+ })
+})(examples[k], k)
+
+
+
diff --git a/node_modules/json-schema-traverse/.eslintrc.yml b/node_modules/json-schema-traverse/.eslintrc.yml
new file mode 100644
index 0000000..ab1762d
--- /dev/null
+++ b/node_modules/json-schema-traverse/.eslintrc.yml
@@ -0,0 +1,27 @@
+extends: eslint:recommended
+env:
+ node: true
+ browser: true
+rules:
+ block-scoped-var: 2
+ complexity: [2, 13]
+ curly: [2, multi-or-nest, consistent]
+ dot-location: [2, property]
+ dot-notation: 2
+ indent: [2, 2, SwitchCase: 1]
+ linebreak-style: [2, unix]
+ new-cap: 2
+ no-console: [2, allow: [warn, error]]
+ no-else-return: 2
+ no-eq-null: 2
+ no-fallthrough: 2
+ no-invalid-this: 2
+ no-return-assign: 2
+ no-shadow: 1
+ no-trailing-spaces: 2
+ no-use-before-define: [2, nofunc]
+ quotes: [2, single, avoid-escape]
+ semi: [2, always]
+ strict: [2, global]
+ valid-jsdoc: [2, requireReturn: false]
+ no-control-regex: 0
diff --git a/node_modules/json-schema-traverse/.travis.yml b/node_modules/json-schema-traverse/.travis.yml
new file mode 100644
index 0000000..7ddce74
--- /dev/null
+++ b/node_modules/json-schema-traverse/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "4"
+ - "6"
+ - "7"
+ - "8"
+after_script:
+ - coveralls < coverage/lcov.info
diff --git a/node_modules/json-schema-traverse/LICENSE b/node_modules/json-schema-traverse/LICENSE
new file mode 100644
index 0000000..7f15435
--- /dev/null
+++ b/node_modules/json-schema-traverse/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Evgeny Poberezkin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/json-schema-traverse/README.md b/node_modules/json-schema-traverse/README.md
new file mode 100644
index 0000000..d5ccaf4
--- /dev/null
+++ b/node_modules/json-schema-traverse/README.md
@@ -0,0 +1,83 @@
+# json-schema-traverse
+Traverse JSON Schema passing each schema object to callback
+
+[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse)
+[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse)
+[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)
+
+
+## Install
+
+```
+npm install json-schema-traverse
+```
+
+
+## Usage
+
+```javascript
+const traverse = require('json-schema-traverse');
+const schema = {
+ properties: {
+ foo: {type: 'string'},
+ bar: {type: 'integer'}
+ }
+};
+
+traverse(schema, {cb});
+// cb is called 3 times with:
+// 1. root schema
+// 2. {type: 'string'}
+// 3. {type: 'integer'}
+
+// Or:
+
+traverse(schema, {cb: {pre, post}});
+// pre is called 3 times with:
+// 1. root schema
+// 2. {type: 'string'}
+// 3. {type: 'integer'}
+//
+// post is called 3 times with:
+// 1. {type: 'string'}
+// 2. {type: 'integer'}
+// 3. root schema
+
+```
+
+Callback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed.
+
+Callback is passed these parameters:
+
+- _schema_: the current schema object
+- _JSON pointer_: from the root schema to the current schema object
+- _root schema_: the schema passed to `traverse` object
+- _parent JSON pointer_: from the root schema to the parent schema object (see below)
+- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)
+- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema
+- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`
+
+
+## Traverse objects in all unknown keywords
+
+```javascript
+const traverse = require('json-schema-traverse');
+const schema = {
+ mySchema: {
+ minimum: 1,
+ maximum: 2
+ }
+};
+
+traverse(schema, {allKeys: true, cb});
+// cb is called 2 times with:
+// 1. root schema
+// 2. mySchema
+```
+
+Without option `allKeys: true` callback will be called only with root schema.
+
+
+## License
+
+[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)
diff --git a/node_modules/json-schema-traverse/index.js b/node_modules/json-schema-traverse/index.js
new file mode 100644
index 0000000..d4a18df
--- /dev/null
+++ b/node_modules/json-schema-traverse/index.js
@@ -0,0 +1,89 @@
+'use strict';
+
+var traverse = module.exports = function (schema, opts, cb) {
+ // Legacy support for v0.3.1 and earlier.
+ if (typeof opts == 'function') {
+ cb = opts;
+ opts = {};
+ }
+
+ cb = opts.cb || cb;
+ var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};
+ var post = cb.post || function() {};
+
+ _traverse(opts, pre, post, schema, '', schema);
+};
+
+
+traverse.keywords = {
+ additionalItems: true,
+ items: true,
+ contains: true,
+ additionalProperties: true,
+ propertyNames: true,
+ not: true
+};
+
+traverse.arrayKeywords = {
+ items: true,
+ allOf: true,
+ anyOf: true,
+ oneOf: true
+};
+
+traverse.propsKeywords = {
+ definitions: true,
+ properties: true,
+ patternProperties: true,
+ dependencies: true
+};
+
+traverse.skipKeywords = {
+ default: true,
+ enum: true,
+ const: true,
+ required: true,
+ maximum: true,
+ minimum: true,
+ exclusiveMaximum: true,
+ exclusiveMinimum: true,
+ multipleOf: true,
+ maxLength: true,
+ minLength: true,
+ pattern: true,
+ format: true,
+ maxItems: true,
+ minItems: true,
+ uniqueItems: true,
+ maxProperties: true,
+ minProperties: true
+};
+
+
+function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
+ if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
+ pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
+ for (var key in schema) {
+ var sch = schema[key];
+ if (Array.isArray(sch)) {
+ if (key in traverse.arrayKeywords) {
+ for (var i=0; i<sch.length; i++)
+ _traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
+ }
+ } else if (key in traverse.propsKeywords) {
+ if (sch && typeof sch == 'object') {
+ for (var prop in sch)
+ _traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
+ }
+ } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
+ _traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
+ }
+ }
+ post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
+ }
+}
+
+
+function escapeJsonPtr(str) {
+ return str.replace(/~/g, '~0').replace(/\//g, '~1');
+}
diff --git a/node_modules/json-schema-traverse/package.json b/node_modules/json-schema-traverse/package.json
new file mode 100644
index 0000000..1566063
--- /dev/null
+++ b/node_modules/json-schema-traverse/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "json-schema-traverse",
+ "version": "0.4.1",
+ "description": "Traverse JSON Schema passing each schema object to callback",
+ "main": "index.js",
+ "scripts": {
+ "eslint": "eslint index.js spec",
+ "test-spec": "mocha spec -R spec",
+ "test": "npm run eslint && nyc npm run test-spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/epoberezkin/json-schema-traverse.git"
+ },
+ "keywords": [
+ "JSON-Schema",
+ "traverse",
+ "iterate"
+ ],
+ "author": "Evgeny Poberezkin",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/epoberezkin/json-schema-traverse/issues"
+ },
+ "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme",
+ "devDependencies": {
+ "coveralls": "^2.13.1",
+ "eslint": "^3.19.0",
+ "mocha": "^3.4.2",
+ "nyc": "^11.0.2",
+ "pre-commit": "^1.2.2"
+ },
+ "nyc": {
+ "exclude": [
+ "**/spec/**",
+ "node_modules"
+ ],
+ "reporter": [
+ "lcov",
+ "text-summary"
+ ]
+ }
+}
diff --git a/node_modules/json-schema-traverse/spec/.eslintrc.yml b/node_modules/json-schema-traverse/spec/.eslintrc.yml
new file mode 100644
index 0000000..3344da7
--- /dev/null
+++ b/node_modules/json-schema-traverse/spec/.eslintrc.yml
@@ -0,0 +1,6 @@
+parserOptions:
+ ecmaVersion: 6
+globals:
+ beforeEach: false
+ describe: false
+ it: false
diff --git a/node_modules/json-schema-traverse/spec/fixtures/schema.js b/node_modules/json-schema-traverse/spec/fixtures/schema.js
new file mode 100644
index 0000000..c51430c
--- /dev/null
+++ b/node_modules/json-schema-traverse/spec/fixtures/schema.js
@@ -0,0 +1,125 @@
+'use strict';
+
+var schema = {
+ additionalItems: subschema('additionalItems'),
+ items: subschema('items'),
+ contains: subschema('contains'),
+ additionalProperties: subschema('additionalProperties'),
+ propertyNames: subschema('propertyNames'),
+ not: subschema('not'),
+ allOf: [
+ subschema('allOf_0'),
+ subschema('allOf_1'),
+ {
+ items: [
+ subschema('items_0'),
+ subschema('items_1'),
+ ]
+ }
+ ],
+ anyOf: [
+ subschema('anyOf_0'),
+ subschema('anyOf_1'),
+ ],
+ oneOf: [
+ subschema('oneOf_0'),
+ subschema('oneOf_1'),
+ ],
+ definitions: {
+ foo: subschema('definitions_foo'),
+ bar: subschema('definitions_bar'),
+ },
+ properties: {
+ foo: subschema('properties_foo'),
+ bar: subschema('properties_bar'),
+ },
+ patternProperties: {
+ foo: subschema('patternProperties_foo'),
+ bar: subschema('patternProperties_bar'),
+ },
+ dependencies: {
+ foo: subschema('dependencies_foo'),
+ bar: subschema('dependencies_bar'),
+ },
+ required: ['foo', 'bar']
+};
+
+
+function subschema(keyword) {
+ var sch = {
+ properties: {},
+ additionalProperties: false,
+ additionalItems: false,
+ anyOf: [
+ {format: 'email'},
+ {format: 'hostname'}
+ ]
+ };
+ sch.properties['foo_' + keyword] = {title: 'foo'};
+ sch.properties['bar_' + keyword] = {title: 'bar'};
+ return sch;
+}
+
+
+module.exports = {
+ schema: schema,
+
+ // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
+ expectedCalls: [[schema, '', schema, undefined, undefined, undefined, undefined]]
+ .concat(expectedCalls('additionalItems'))
+ .concat(expectedCalls('items'))
+ .concat(expectedCalls('contains'))
+ .concat(expectedCalls('additionalProperties'))
+ .concat(expectedCalls('propertyNames'))
+ .concat(expectedCalls('not'))
+ .concat(expectedCallsChild('allOf', 0))
+ .concat(expectedCallsChild('allOf', 1))
+ .concat([
+ [schema.allOf[2], '/allOf/2', schema, '', 'allOf', schema, 2],
+ [schema.allOf[2].items[0], '/allOf/2/items/0', schema, '/allOf/2', 'items', schema.allOf[2], 0],
+ [schema.allOf[2].items[0].properties.foo_items_0, '/allOf/2/items/0/properties/foo_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'foo_items_0'],
+ [schema.allOf[2].items[0].properties.bar_items_0, '/allOf/2/items/0/properties/bar_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'bar_items_0'],
+ [schema.allOf[2].items[0].anyOf[0], '/allOf/2/items/0/anyOf/0', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 0],
+ [schema.allOf[2].items[0].anyOf[1], '/allOf/2/items/0/anyOf/1', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 1],
+
+ [schema.allOf[2].items[1], '/allOf/2/items/1', schema, '/allOf/2', 'items', schema.allOf[2], 1],
+ [schema.allOf[2].items[1].properties.foo_items_1, '/allOf/2/items/1/properties/foo_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'foo_items_1'],
+ [schema.allOf[2].items[1].properties.bar_items_1, '/allOf/2/items/1/properties/bar_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'bar_items_1'],
+ [schema.allOf[2].items[1].anyOf[0], '/allOf/2/items/1/anyOf/0', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 0],
+ [schema.allOf[2].items[1].anyOf[1], '/allOf/2/items/1/anyOf/1', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 1]
+ ])
+ .concat(expectedCallsChild('anyOf', 0))
+ .concat(expectedCallsChild('anyOf', 1))
+ .concat(expectedCallsChild('oneOf', 0))
+ .concat(expectedCallsChild('oneOf', 1))
+ .concat(expectedCallsChild('definitions', 'foo'))
+ .concat(expectedCallsChild('definitions', 'bar'))
+ .concat(expectedCallsChild('properties', 'foo'))
+ .concat(expectedCallsChild('properties', 'bar'))
+ .concat(expectedCallsChild('patternProperties', 'foo'))
+ .concat(expectedCallsChild('patternProperties', 'bar'))
+ .concat(expectedCallsChild('dependencies', 'foo'))
+ .concat(expectedCallsChild('dependencies', 'bar'))
+};
+
+
+function expectedCalls(keyword) {
+ return [
+ [schema[keyword], `/${keyword}`, schema, '', keyword, schema, undefined],
+ [schema[keyword].properties[`foo_${keyword}`], `/${keyword}/properties/foo_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `foo_${keyword}`],
+ [schema[keyword].properties[`bar_${keyword}`], `/${keyword}/properties/bar_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `bar_${keyword}`],
+ [schema[keyword].anyOf[0], `/${keyword}/anyOf/0`, schema, `/${keyword}`, 'anyOf', schema[keyword], 0],
+ [schema[keyword].anyOf[1], `/${keyword}/anyOf/1`, schema, `/${keyword}`, 'anyOf', schema[keyword], 1]
+ ];
+}
+
+
+function expectedCallsChild(keyword, i) {
+ return [
+ [schema[keyword][i], `/${keyword}/${i}`, schema, '', keyword, schema, i],
+ [schema[keyword][i].properties[`foo_${keyword}_${i}`], `/${keyword}/${i}/properties/foo_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `foo_${keyword}_${i}`],
+ [schema[keyword][i].properties[`bar_${keyword}_${i}`], `/${keyword}/${i}/properties/bar_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `bar_${keyword}_${i}`],
+ [schema[keyword][i].anyOf[0], `/${keyword}/${i}/anyOf/0`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 0],
+ [schema[keyword][i].anyOf[1], `/${keyword}/${i}/anyOf/1`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 1]
+ ];
+}
diff --git a/node_modules/json-schema-traverse/spec/index.spec.js b/node_modules/json-schema-traverse/spec/index.spec.js
new file mode 100644
index 0000000..c76b64f
--- /dev/null
+++ b/node_modules/json-schema-traverse/spec/index.spec.js
@@ -0,0 +1,171 @@
+'use strict';
+
+var traverse = require('../index');
+var assert = require('assert');
+
+describe('json-schema-traverse', function() {
+ var calls;
+
+ beforeEach(function() {
+ calls = [];
+ });
+
+ it('should traverse all keywords containing schemas recursively', function() {
+ var schema = require('./fixtures/schema').schema;
+ var expectedCalls = require('./fixtures/schema').expectedCalls;
+
+ traverse(schema, {cb: callback});
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+
+ describe('Legacy v0.3.1 API', function() {
+ it('should traverse all keywords containing schemas recursively', function() {
+ var schema = require('./fixtures/schema').schema;
+ var expectedCalls = require('./fixtures/schema').expectedCalls;
+
+ traverse(schema, callback);
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+
+ it('should work when an options object is provided', function() {
+ // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
+ var schema = require('./fixtures/schema').schema;
+ var expectedCalls = require('./fixtures/schema').expectedCalls;
+
+ traverse(schema, {}, callback);
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+ });
+
+
+ describe('allKeys option', function() {
+ var schema = {
+ someObject: {
+ minimum: 1,
+ maximum: 2
+ }
+ };
+
+ it('should traverse objects with allKeys: true option', function() {
+ // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
+ var expectedCalls = [
+ [schema, '', schema, undefined, undefined, undefined, undefined],
+ [schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined]
+ ];
+
+ traverse(schema, {allKeys: true, cb: callback});
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+
+
+ it('should NOT traverse objects with allKeys: false option', function() {
+ // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
+ var expectedCalls = [
+ [schema, '', schema, undefined, undefined, undefined, undefined]
+ ];
+
+ traverse(schema, {allKeys: false, cb: callback});
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+
+
+ it('should NOT traverse objects without allKeys option', function() {
+ // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
+ var expectedCalls = [
+ [schema, '', schema, undefined, undefined, undefined, undefined]
+ ];
+
+ traverse(schema, {cb: callback});
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+
+
+ it('should NOT travers objects in standard keywords which value is not a schema', function() {
+ var schema2 = {
+ const: {foo: 'bar'},
+ enum: ['a', 'b'],
+ required: ['foo'],
+ another: {
+
+ },
+ patternProperties: {}, // will not traverse - no properties
+ dependencies: true, // will not traverse - invalid
+ properties: {
+ smaller: {
+ type: 'number'
+ },
+ larger: {
+ type: 'number',
+ minimum: {$data: '1/smaller'}
+ }
+ }
+ };
+
+ // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
+ var expectedCalls = [
+ [schema2, '', schema2, undefined, undefined, undefined, undefined],
+ [schema2.another, '/another', schema2, '', 'another', schema2, undefined],
+ [schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'],
+ [schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'],
+ ];
+
+ traverse(schema2, {allKeys: true, cb: callback});
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+ });
+
+ describe('pre and post', function() {
+ var schema = {
+ type: 'object',
+ properties: {
+ name: {type: 'string'},
+ age: {type: 'number'}
+ }
+ };
+
+ it('should traverse schema in pre-order', function() {
+ traverse(schema, {cb: {pre}});
+ var expectedCalls = [
+ ['pre', schema, '', schema, undefined, undefined, undefined, undefined],
+ ['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
+ ['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
+ ];
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+
+ it('should traverse schema in post-order', function() {
+ traverse(schema, {cb: {post}});
+ var expectedCalls = [
+ ['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
+ ['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
+ ['post', schema, '', schema, undefined, undefined, undefined, undefined],
+ ];
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+
+ it('should traverse schema in pre- and post-order at the same time', function() {
+ traverse(schema, {cb: {pre, post}});
+ var expectedCalls = [
+ ['pre', schema, '', schema, undefined, undefined, undefined, undefined],
+ ['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
+ ['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
+ ['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
+ ['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
+ ['post', schema, '', schema, undefined, undefined, undefined, undefined],
+ ];
+ assert.deepStrictEqual(calls, expectedCalls);
+ });
+ });
+
+ function callback() {
+ calls.push(Array.prototype.slice.call(arguments));
+ }
+
+ function pre() {
+ calls.push(['pre'].concat(Array.prototype.slice.call(arguments)));
+ }
+
+ function post() {
+ calls.push(['post'].concat(Array.prototype.slice.call(arguments)));
+ }
+});
diff --git a/node_modules/json-schema/README.md b/node_modules/json-schema/README.md
new file mode 100644
index 0000000..ccc591b
--- /dev/null
+++ b/node_modules/json-schema/README.md
@@ -0,0 +1,5 @@
+JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator).
+
+Code is licensed under the AFL or BSD license as part of the Persevere
+project which is administered under the Dojo foundation,
+and all contributions require a Dojo CLA. \ No newline at end of file
diff --git a/node_modules/json-schema/draft-00/hyper-schema b/node_modules/json-schema/draft-00/hyper-schema
new file mode 100644
index 0000000..12fe26b
--- /dev/null
+++ b/node_modules/json-schema/draft-00/hyper-schema
@@ -0,0 +1,68 @@
+{
+ "$schema" : "http://json-schema.org/draft-00/hyper-schema#",
+ "id" : "http://json-schema.org/draft-00/hyper-schema#",
+
+ "properties" : {
+ "links" : {
+ "type" : "array",
+ "items" : {"$ref" : "http://json-schema.org/draft-00/links#"},
+ "optional" : true
+ },
+
+ "fragmentResolution" : {
+ "type" : "string",
+ "optional" : true,
+ "default" : "dot-delimited"
+ },
+
+ "root" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "readonly" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "pathStart" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "uri"
+ },
+
+ "mediaType" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "media-type"
+ },
+
+ "alternate" : {
+ "type" : "array",
+ "items" : {"$ref" : "#"},
+ "optional" : true
+ }
+ },
+
+ "links" : [
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ },
+
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ }
+ ],
+
+ "fragmentResolution" : "dot-delimited",
+ "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-00/json-ref b/node_modules/json-schema/draft-00/json-ref
new file mode 100644
index 0000000..0c825bc
--- /dev/null
+++ b/node_modules/json-schema/draft-00/json-ref
@@ -0,0 +1,26 @@
+{
+ "$schema" : "http://json-schema.org/draft-00/hyper-schema#",
+ "id" : "http://json-schema.org/draft-00/json-ref#",
+
+ "items" : {"$ref" : "#"},
+ "additionalProperties" : {"$ref" : "#"},
+
+ "links" : [
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ },
+
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ }
+ ],
+
+ "fragmentResolution" : "dot-delimited"
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-00/links b/node_modules/json-schema/draft-00/links
new file mode 100644
index 0000000..c9b5517
--- /dev/null
+++ b/node_modules/json-schema/draft-00/links
@@ -0,0 +1,33 @@
+{
+ "$schema" : "http://json-schema.org/draft-00/hyper-schema#",
+ "id" : "http://json-schema.org/draft-00/links#",
+ "type" : "object",
+
+ "properties" : {
+ "href" : {
+ "type" : "string"
+ },
+
+ "rel" : {
+ "type" : "string"
+ },
+
+ "method" : {
+ "type" : "string",
+ "default" : "GET",
+ "optional" : true
+ },
+
+ "enctype" : {
+ "type" : "string",
+ "requires" : "method",
+ "optional" : true
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"},
+ "optional" : true
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-00/schema b/node_modules/json-schema/draft-00/schema
new file mode 100644
index 0000000..a3a2144
--- /dev/null
+++ b/node_modules/json-schema/draft-00/schema
@@ -0,0 +1,155 @@
+{
+ "$schema" : "http://json-schema.org/draft-00/hyper-schema#",
+ "id" : "http://json-schema.org/draft-00/schema#",
+ "type" : "object",
+
+ "properties" : {
+ "type" : {
+ "type" : ["string", "array"],
+ "items" : {
+ "type" : ["string", {"$ref" : "#"}]
+ },
+ "optional" : true,
+ "default" : "any"
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ },
+
+ "items" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ },
+
+ "optional" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "additionalProperties" : {
+ "type" : [{"$ref" : "#"}, "boolean"],
+ "optional" : true,
+ "default" : {}
+ },
+
+ "requires" : {
+ "type" : ["string", {"$ref" : "#"}],
+ "optional" : true
+ },
+
+ "minimum" : {
+ "type" : "number",
+ "optional" : true
+ },
+
+ "maximum" : {
+ "type" : "number",
+ "optional" : true
+ },
+
+ "minimumCanEqual" : {
+ "type" : "boolean",
+ "optional" : true,
+ "requires" : "minimum",
+ "default" : true
+ },
+
+ "maximumCanEqual" : {
+ "type" : "boolean",
+ "optional" : true,
+ "requires" : "maximum",
+ "default" : true
+ },
+
+ "minItems" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxItems" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0
+ },
+
+ "pattern" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "regex"
+ },
+
+ "minLength" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxLength" : {
+ "type" : "integer",
+ "optional" : true
+ },
+
+ "enum" : {
+ "type" : "array",
+ "optional" : true,
+ "minItems" : 1
+ },
+
+ "title" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "description" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "format" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "contentEncoding" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "default" : {
+ "type" : "any",
+ "optional" : true
+ },
+
+ "maxDecimal" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0
+ },
+
+ "disallow" : {
+ "type" : ["string", "array"],
+ "items" : {"type" : "string"},
+ "optional" : true
+ },
+
+ "extends" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ }
+ },
+
+ "optional" : true,
+ "default" : {}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-01/hyper-schema b/node_modules/json-schema/draft-01/hyper-schema
new file mode 100644
index 0000000..66e835b
--- /dev/null
+++ b/node_modules/json-schema/draft-01/hyper-schema
@@ -0,0 +1,68 @@
+{
+ "$schema" : "http://json-schema.org/draft-01/hyper-schema#",
+ "id" : "http://json-schema.org/draft-01/hyper-schema#",
+
+ "properties" : {
+ "links" : {
+ "type" : "array",
+ "items" : {"$ref" : "http://json-schema.org/draft-01/links#"},
+ "optional" : true
+ },
+
+ "fragmentResolution" : {
+ "type" : "string",
+ "optional" : true,
+ "default" : "dot-delimited"
+ },
+
+ "root" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "readonly" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "pathStart" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "uri"
+ },
+
+ "mediaType" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "media-type"
+ },
+
+ "alternate" : {
+ "type" : "array",
+ "items" : {"$ref" : "#"},
+ "optional" : true
+ }
+ },
+
+ "links" : [
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ },
+
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ }
+ ],
+
+ "fragmentResolution" : "dot-delimited",
+ "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-01/json-ref b/node_modules/json-schema/draft-01/json-ref
new file mode 100644
index 0000000..f2ad55b
--- /dev/null
+++ b/node_modules/json-schema/draft-01/json-ref
@@ -0,0 +1,26 @@
+{
+ "$schema" : "http://json-schema.org/draft-01/hyper-schema#",
+ "id" : "http://json-schema.org/draft-01/json-ref#",
+
+ "items" : {"$ref" : "#"},
+ "additionalProperties" : {"$ref" : "#"},
+
+ "links" : [
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ },
+
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ }
+ ],
+
+ "fragmentResolution" : "dot-delimited"
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-01/links b/node_modules/json-schema/draft-01/links
new file mode 100644
index 0000000..cb183c4
--- /dev/null
+++ b/node_modules/json-schema/draft-01/links
@@ -0,0 +1,33 @@
+{
+ "$schema" : "http://json-schema.org/draft-01/hyper-schema#",
+ "id" : "http://json-schema.org/draft-01/links#",
+ "type" : "object",
+
+ "properties" : {
+ "href" : {
+ "type" : "string"
+ },
+
+ "rel" : {
+ "type" : "string"
+ },
+
+ "method" : {
+ "type" : "string",
+ "default" : "GET",
+ "optional" : true
+ },
+
+ "enctype" : {
+ "type" : "string",
+ "requires" : "method",
+ "optional" : true
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"},
+ "optional" : true
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-01/schema b/node_modules/json-schema/draft-01/schema
new file mode 100644
index 0000000..e6b6aea
--- /dev/null
+++ b/node_modules/json-schema/draft-01/schema
@@ -0,0 +1,155 @@
+{
+ "$schema" : "http://json-schema.org/draft-01/hyper-schema#",
+ "id" : "http://json-schema.org/draft-01/schema#",
+ "type" : "object",
+
+ "properties" : {
+ "type" : {
+ "type" : ["string", "array"],
+ "items" : {
+ "type" : ["string", {"$ref" : "#"}]
+ },
+ "optional" : true,
+ "default" : "any"
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ },
+
+ "items" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ },
+
+ "optional" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "additionalProperties" : {
+ "type" : [{"$ref" : "#"}, "boolean"],
+ "optional" : true,
+ "default" : {}
+ },
+
+ "requires" : {
+ "type" : ["string", {"$ref" : "#"}],
+ "optional" : true
+ },
+
+ "minimum" : {
+ "type" : "number",
+ "optional" : true
+ },
+
+ "maximum" : {
+ "type" : "number",
+ "optional" : true
+ },
+
+ "minimumCanEqual" : {
+ "type" : "boolean",
+ "optional" : true,
+ "requires" : "minimum",
+ "default" : true
+ },
+
+ "maximumCanEqual" : {
+ "type" : "boolean",
+ "optional" : true,
+ "requires" : "maximum",
+ "default" : true
+ },
+
+ "minItems" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxItems" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0
+ },
+
+ "pattern" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "regex"
+ },
+
+ "minLength" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxLength" : {
+ "type" : "integer",
+ "optional" : true
+ },
+
+ "enum" : {
+ "type" : "array",
+ "optional" : true,
+ "minItems" : 1
+ },
+
+ "title" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "description" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "format" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "contentEncoding" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "default" : {
+ "type" : "any",
+ "optional" : true
+ },
+
+ "maxDecimal" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0
+ },
+
+ "disallow" : {
+ "type" : ["string", "array"],
+ "items" : {"type" : "string"},
+ "optional" : true
+ },
+
+ "extends" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ }
+ },
+
+ "optional" : true,
+ "default" : {}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-02/hyper-schema b/node_modules/json-schema/draft-02/hyper-schema
new file mode 100644
index 0000000..2d2bc68
--- /dev/null
+++ b/node_modules/json-schema/draft-02/hyper-schema
@@ -0,0 +1,68 @@
+{
+ "$schema" : "http://json-schema.org/draft-02/hyper-schema#",
+ "id" : "http://json-schema.org/draft-02/hyper-schema#",
+
+ "properties" : {
+ "links" : {
+ "type" : "array",
+ "items" : {"$ref" : "http://json-schema.org/draft-02/links#"},
+ "optional" : true
+ },
+
+ "fragmentResolution" : {
+ "type" : "string",
+ "optional" : true,
+ "default" : "slash-delimited"
+ },
+
+ "root" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "readonly" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "pathStart" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "uri"
+ },
+
+ "mediaType" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "media-type"
+ },
+
+ "alternate" : {
+ "type" : "array",
+ "items" : {"$ref" : "#"},
+ "optional" : true
+ }
+ },
+
+ "links" : [
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ },
+
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ }
+ ],
+
+ "fragmentResolution" : "slash-delimited",
+ "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-02/json-ref b/node_modules/json-schema/draft-02/json-ref
new file mode 100644
index 0000000..2b23fcd
--- /dev/null
+++ b/node_modules/json-schema/draft-02/json-ref
@@ -0,0 +1,26 @@
+{
+ "$schema" : "http://json-schema.org/draft-02/hyper-schema#",
+ "id" : "http://json-schema.org/draft-02/json-ref#",
+
+ "items" : {"$ref" : "#"},
+ "additionalProperties" : {"$ref" : "#"},
+
+ "links" : [
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ },
+
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ }
+ ],
+
+ "fragmentResolution" : "dot-delimited"
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-02/links b/node_modules/json-schema/draft-02/links
new file mode 100644
index 0000000..ab971b7
--- /dev/null
+++ b/node_modules/json-schema/draft-02/links
@@ -0,0 +1,35 @@
+{
+ "$schema" : "http://json-schema.org/draft-02/hyper-schema#",
+ "id" : "http://json-schema.org/draft-02/links#",
+ "type" : "object",
+
+ "properties" : {
+ "href" : {
+ "type" : "string"
+ },
+
+ "rel" : {
+ "type" : "string"
+ },
+
+ "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"},
+
+ "method" : {
+ "type" : "string",
+ "default" : "GET",
+ "optional" : true
+ },
+
+ "enctype" : {
+ "type" : "string",
+ "requires" : "method",
+ "optional" : true
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"},
+ "optional" : true
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-02/schema b/node_modules/json-schema/draft-02/schema
new file mode 100644
index 0000000..cc2b669
--- /dev/null
+++ b/node_modules/json-schema/draft-02/schema
@@ -0,0 +1,166 @@
+{
+ "$schema" : "http://json-schema.org/draft-02/hyper-schema#",
+ "id" : "http://json-schema.org/draft-02/schema#",
+ "type" : "object",
+
+ "properties" : {
+ "type" : {
+ "type" : ["string", "array"],
+ "items" : {
+ "type" : ["string", {"$ref" : "#"}]
+ },
+ "optional" : true,
+ "uniqueItems" : true,
+ "default" : "any"
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ },
+
+ "items" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ },
+
+ "optional" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "additionalProperties" : {
+ "type" : [{"$ref" : "#"}, "boolean"],
+ "optional" : true,
+ "default" : {}
+ },
+
+ "requires" : {
+ "type" : ["string", {"$ref" : "#"}],
+ "optional" : true
+ },
+
+ "minimum" : {
+ "type" : "number",
+ "optional" : true
+ },
+
+ "maximum" : {
+ "type" : "number",
+ "optional" : true
+ },
+
+ "minimumCanEqual" : {
+ "type" : "boolean",
+ "optional" : true,
+ "requires" : "minimum",
+ "default" : true
+ },
+
+ "maximumCanEqual" : {
+ "type" : "boolean",
+ "optional" : true,
+ "requires" : "maximum",
+ "default" : true
+ },
+
+ "minItems" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxItems" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0
+ },
+
+ "uniqueItems" : {
+ "type" : "boolean",
+ "optional" : true,
+ "default" : false
+ },
+
+ "pattern" : {
+ "type" : "string",
+ "optional" : true,
+ "format" : "regex"
+ },
+
+ "minLength" : {
+ "type" : "integer",
+ "optional" : true,
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxLength" : {
+ "type" : "integer",
+ "optional" : true
+ },
+
+ "enum" : {
+ "type" : "array",
+ "optional" : true,
+ "minItems" : 1,
+ "uniqueItems" : true
+ },
+
+ "title" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "description" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "format" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "contentEncoding" : {
+ "type" : "string",
+ "optional" : true
+ },
+
+ "default" : {
+ "type" : "any",
+ "optional" : true
+ },
+
+ "divisibleBy" : {
+ "type" : "number",
+ "minimum" : 0,
+ "minimumCanEqual" : false,
+ "optional" : true,
+ "default" : 1
+ },
+
+ "disallow" : {
+ "type" : ["string", "array"],
+ "items" : {"type" : "string"},
+ "optional" : true,
+ "uniqueItems" : true
+ },
+
+ "extends" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "optional" : true,
+ "default" : {}
+ }
+ },
+
+ "optional" : true,
+ "default" : {}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-03/examples/address b/node_modules/json-schema/draft-03/examples/address
new file mode 100644
index 0000000..401f20f
--- /dev/null
+++ b/node_modules/json-schema/draft-03/examples/address
@@ -0,0 +1,20 @@
+{
+ "description" : "An Address following the convention of http://microformats.org/wiki/hcard",
+ "type" : "object",
+ "properties" : {
+ "post-office-box" : { "type" : "string" },
+ "extended-address" : { "type" : "string" },
+ "street-address" : { "type":"string" },
+ "locality" : { "type" : "string", "required" : true },
+ "region" : { "type" : "string", "required" : true },
+ "postal-code" : { "type" : "string" },
+ "country-name" : { "type" : "string", "required" : true }
+ },
+ "dependencies" : {
+ "post-office-box" : "street-address",
+ "extended-address" : "street-address",
+ "street-address" : "region",
+ "locality" : "region",
+ "region" : "country-name"
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-03/examples/calendar b/node_modules/json-schema/draft-03/examples/calendar
new file mode 100644
index 0000000..0ec47c2
--- /dev/null
+++ b/node_modules/json-schema/draft-03/examples/calendar
@@ -0,0 +1,53 @@
+{
+ "description" : "A representation of an event",
+ "type" : "object",
+ "properties" : {
+ "dtstart" : {
+ "format" : "date-time",
+ "type" : "string",
+ "description" : "Event starting time",
+ "required":true
+ },
+ "summary" : {
+ "type":"string",
+ "required":true
+ },
+ "location" : {
+ "type" : "string"
+ },
+ "url" : {
+ "type" : "string",
+ "format" : "url"
+ },
+ "dtend" : {
+ "format" : "date-time",
+ "type" : "string",
+ "description" : "Event ending time"
+ },
+ "duration" : {
+ "format" : "date",
+ "type" : "string",
+ "description" : "Event duration"
+ },
+ "rdate" : {
+ "format" : "date-time",
+ "type" : "string",
+ "description" : "Recurrence date"
+ },
+ "rrule" : {
+ "type" : "string",
+ "description" : "Recurrence rule"
+ },
+ "category" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "geo" : { "$ref" : "http://json-schema.org/draft-03/geo" }
+ }
+}
+
+
+
+
diff --git a/node_modules/json-schema/draft-03/examples/card b/node_modules/json-schema/draft-03/examples/card
new file mode 100644
index 0000000..a5667ff
--- /dev/null
+++ b/node_modules/json-schema/draft-03/examples/card
@@ -0,0 +1,105 @@
+{
+ "description":"A representation of a person, company, organization, or place",
+ "type":"object",
+ "properties":{
+ "fn":{
+ "description":"Formatted Name",
+ "type":"string"
+ },
+ "familyName":{
+ "type":"string",
+ "required":true
+ },
+ "givenName":{
+ "type":"string",
+ "required":true
+ },
+ "additionalName":{
+ "type":"array",
+ "items":{
+ "type":"string"
+ }
+ },
+ "honorificPrefix":{
+ "type":"array",
+ "items":{
+ "type":"string"
+ }
+ },
+ "honorificSuffix":{
+ "type":"array",
+ "items":{
+ "type":"string"
+ }
+ },
+ "nickname":{
+ "type":"string"
+ },
+ "url":{
+ "type":"string",
+ "format":"url"
+ },
+ "email":{
+ "type":"object",
+ "properties":{
+ "type":{
+ "type":"string"
+ },
+ "value":{
+ "type":"string",
+ "format":"email"
+ }
+ }
+ },
+ "tel":{
+ "type":"object",
+ "properties":{
+ "type":{
+ "type":"string"
+ },
+ "value":{
+ "type":"string",
+ "format":"phone"
+ }
+ }
+ },
+ "adr":{"$ref" : "http://json-schema.org/address"},
+ "geo":{"$ref" : "http://json-schema.org/geo"},
+ "tz":{
+ "type":"string"
+ },
+ "photo":{
+ "format":"image",
+ "type":"string"
+ },
+ "logo":{
+ "format":"image",
+ "type":"string"
+ },
+ "sound":{
+ "format":"attachment",
+ "type":"string"
+ },
+ "bday":{
+ "type":"string",
+ "format":"date"
+ },
+ "title":{
+ "type":"string"
+ },
+ "role":{
+ "type":"string"
+ },
+ "org":{
+ "type":"object",
+ "properties":{
+ "organizationName":{
+ "type":"string"
+ },
+ "organizationUnit":{
+ "type":"string"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-03/examples/geo b/node_modules/json-schema/draft-03/examples/geo
new file mode 100644
index 0000000..4357a90
--- /dev/null
+++ b/node_modules/json-schema/draft-03/examples/geo
@@ -0,0 +1,8 @@
+{
+ "description" : "A geographical coordinate",
+ "type" : "object",
+ "properties" : {
+ "latitude" : { "type" : "number" },
+ "longitude" : { "type" : "number" }
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-03/examples/interfaces b/node_modules/json-schema/draft-03/examples/interfaces
new file mode 100644
index 0000000..b8532f2
--- /dev/null
+++ b/node_modules/json-schema/draft-03/examples/interfaces
@@ -0,0 +1,23 @@
+{
+ "extends":"http://json-schema.org/hyper-schema",
+ "description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax",
+ "properties":{
+ "methods":{
+ "type":"object",
+ "description":"This defines the set of methods available to the class instances",
+ "additionalProperties":{
+ "type":"object",
+ "description":"The definition of the method",
+ "properties":{
+ "parameters":{
+ "type":"array",
+ "description":"The set of parameters that should be passed to the method when it is called",
+ "items":{"$ref":"#"},
+ "required": true
+ },
+ "returns":{"$ref":"#"}
+ }
+ }
+ }
+ }
+}
diff --git a/node_modules/json-schema/draft-03/hyper-schema b/node_modules/json-schema/draft-03/hyper-schema
new file mode 100644
index 0000000..38ca2e1
--- /dev/null
+++ b/node_modules/json-schema/draft-03/hyper-schema
@@ -0,0 +1,60 @@
+{
+ "$schema" : "http://json-schema.org/draft-03/hyper-schema#",
+ "extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"},
+ "id" : "http://json-schema.org/draft-03/hyper-schema#",
+
+ "properties" : {
+ "links" : {
+ "type" : "array",
+ "items" : {"$ref" : "http://json-schema.org/draft-03/links#"}
+ },
+
+ "fragmentResolution" : {
+ "type" : "string",
+ "default" : "slash-delimited"
+ },
+
+ "root" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "readonly" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "contentEncoding" : {
+ "type" : "string"
+ },
+
+ "pathStart" : {
+ "type" : "string",
+ "format" : "uri"
+ },
+
+ "mediaType" : {
+ "type" : "string",
+ "format" : "media-type"
+ }
+ },
+
+ "links" : [
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ },
+
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ }
+ ],
+
+ "fragmentResolution" : "slash-delimited"
+}
diff --git a/node_modules/json-schema/draft-03/json-ref b/node_modules/json-schema/draft-03/json-ref
new file mode 100644
index 0000000..66e08f2
--- /dev/null
+++ b/node_modules/json-schema/draft-03/json-ref
@@ -0,0 +1,26 @@
+{
+ "$schema" : "http://json-schema.org/draft-03/hyper-schema#",
+ "id" : "http://json-schema.org/draft-03/json-ref#",
+
+ "additionalItems" : {"$ref" : "#"},
+ "additionalProperties" : {"$ref" : "#"},
+
+ "links" : [
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ },
+
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ }
+ ],
+
+ "fragmentResolution" : "dot-delimited"
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-03/links b/node_modules/json-schema/draft-03/links
new file mode 100644
index 0000000..9fa63f9
--- /dev/null
+++ b/node_modules/json-schema/draft-03/links
@@ -0,0 +1,35 @@
+{
+ "$schema" : "http://json-schema.org/draft-03/hyper-schema#",
+ "id" : "http://json-schema.org/draft-03/links#",
+ "type" : "object",
+
+ "properties" : {
+ "href" : {
+ "type" : "string",
+ "required" : true,
+ "format" : "link-description-object-template"
+ },
+
+ "rel" : {
+ "type" : "string",
+ "required" : true
+ },
+
+ "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"},
+
+ "method" : {
+ "type" : "string",
+ "default" : "GET"
+ },
+
+ "enctype" : {
+ "type" : "string",
+ "requires" : "method"
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-03/schema b/node_modules/json-schema/draft-03/schema
new file mode 100644
index 0000000..29d9469
--- /dev/null
+++ b/node_modules/json-schema/draft-03/schema
@@ -0,0 +1,174 @@
+{
+ "$schema" : "http://json-schema.org/draft-03/schema#",
+ "id" : "http://json-schema.org/draft-03/schema#",
+ "type" : "object",
+
+ "properties" : {
+ "type" : {
+ "type" : ["string", "array"],
+ "items" : {
+ "type" : ["string", {"$ref" : "#"}]
+ },
+ "uniqueItems" : true,
+ "default" : "any"
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "patternProperties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "additionalProperties" : {
+ "type" : [{"$ref" : "#"}, "boolean"],
+ "default" : {}
+ },
+
+ "items" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "additionalItems" : {
+ "type" : [{"$ref" : "#"}, "boolean"],
+ "default" : {}
+ },
+
+ "required" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "dependencies" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : ["string", "array", {"$ref" : "#"}],
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "default" : {}
+ },
+
+ "minimum" : {
+ "type" : "number"
+ },
+
+ "maximum" : {
+ "type" : "number"
+ },
+
+ "exclusiveMinimum" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "exclusiveMaximum" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "minItems" : {
+ "type" : "integer",
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxItems" : {
+ "type" : "integer",
+ "minimum" : 0
+ },
+
+ "uniqueItems" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "pattern" : {
+ "type" : "string",
+ "format" : "regex"
+ },
+
+ "minLength" : {
+ "type" : "integer",
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxLength" : {
+ "type" : "integer"
+ },
+
+ "enum" : {
+ "type" : "array",
+ "minItems" : 1,
+ "uniqueItems" : true
+ },
+
+ "default" : {
+ "type" : "any"
+ },
+
+ "title" : {
+ "type" : "string"
+ },
+
+ "description" : {
+ "type" : "string"
+ },
+
+ "format" : {
+ "type" : "string"
+ },
+
+ "divisibleBy" : {
+ "type" : "number",
+ "minimum" : 0,
+ "exclusiveMinimum" : true,
+ "default" : 1
+ },
+
+ "disallow" : {
+ "type" : ["string", "array"],
+ "items" : {
+ "type" : ["string", {"$ref" : "#"}]
+ },
+ "uniqueItems" : true
+ },
+
+ "extends" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "id" : {
+ "type" : "string",
+ "format" : "uri"
+ },
+
+ "$ref" : {
+ "type" : "string",
+ "format" : "uri"
+ },
+
+ "$schema" : {
+ "type" : "string",
+ "format" : "uri"
+ }
+ },
+
+ "dependencies" : {
+ "exclusiveMinimum" : "minimum",
+ "exclusiveMaximum" : "maximum"
+ },
+
+ "default" : {}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-04/hyper-schema b/node_modules/json-schema/draft-04/hyper-schema
new file mode 100644
index 0000000..63fb34d
--- /dev/null
+++ b/node_modules/json-schema/draft-04/hyper-schema
@@ -0,0 +1,60 @@
+{
+ "$schema" : "http://json-schema.org/draft-04/hyper-schema#",
+ "extends" : {"$ref" : "http://json-schema.org/draft-04/schema#"},
+ "id" : "http://json-schema.org/draft-04/hyper-schema#",
+
+ "properties" : {
+ "links" : {
+ "type" : "array",
+ "items" : {"$ref" : "http://json-schema.org/draft-04/links#"}
+ },
+
+ "fragmentResolution" : {
+ "type" : "string",
+ "default" : "json-pointer"
+ },
+
+ "root" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "readonly" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "contentEncoding" : {
+ "type" : "string"
+ },
+
+ "pathStart" : {
+ "type" : "string",
+ "format" : "uri"
+ },
+
+ "mediaType" : {
+ "type" : "string",
+ "format" : "media-type"
+ }
+ },
+
+ "links" : [
+ {
+ "href" : "{id}",
+ "rel" : "self"
+ },
+
+ {
+ "href" : "{$ref}",
+ "rel" : "full"
+ },
+
+ {
+ "href" : "{$schema}",
+ "rel" : "describedby"
+ }
+ ],
+
+ "fragmentResolution" : "json-pointer"
+}
diff --git a/node_modules/json-schema/draft-04/links b/node_modules/json-schema/draft-04/links
new file mode 100644
index 0000000..6c06d29
--- /dev/null
+++ b/node_modules/json-schema/draft-04/links
@@ -0,0 +1,41 @@
+{
+ "$schema" : "http://json-schema.org/draft-04/hyper-schema#",
+ "id" : "http://json-schema.org/draft-04/links#",
+ "type" : "object",
+
+ "properties" : {
+ "rel" : {
+ "type" : "string"
+ },
+
+ "href" : {
+ "type" : "string"
+ },
+
+ "template" : {
+ "type" : "string"
+ },
+
+ "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"},
+
+ "method" : {
+ "type" : "string",
+ "default" : "GET"
+ },
+
+ "enctype" : {
+ "type" : "string"
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}
+ }
+ },
+
+ "required" : ["rel", "href"],
+
+ "dependencies" : {
+ "enctype" : "method"
+ }
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-04/schema b/node_modules/json-schema/draft-04/schema
new file mode 100644
index 0000000..4231b16
--- /dev/null
+++ b/node_modules/json-schema/draft-04/schema
@@ -0,0 +1,189 @@
+{
+ "$schema" : "http://json-schema.org/draft-04/schema#",
+ "id" : "http://json-schema.org/draft-04/schema#",
+ "type" : "object",
+
+ "properties" : {
+ "type" : {
+ "type" : [
+ {
+ "id" : "#simple-type",
+ "type" : "string",
+ "enum" : ["object", "array", "string", "number", "boolean", "null", "any"]
+ },
+ "array"
+ ],
+ "items" : {
+ "type" : [
+ {"$ref" : "#simple-type"},
+ {"$ref" : "#"}
+ ]
+ },
+ "uniqueItems" : true,
+ "default" : "any"
+ },
+
+ "disallow" : {
+ "type" : ["string", "array"],
+ "items" : {
+ "type" : ["string", {"$ref" : "#"}]
+ },
+ "uniqueItems" : true
+ },
+
+ "extends" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "enum" : {
+ "type" : "array",
+ "minItems" : 1,
+ "uniqueItems" : true
+ },
+
+ "minimum" : {
+ "type" : "number"
+ },
+
+ "maximum" : {
+ "type" : "number"
+ },
+
+ "exclusiveMinimum" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "exclusiveMaximum" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "divisibleBy" : {
+ "type" : "number",
+ "minimum" : 0,
+ "exclusiveMinimum" : true,
+ "default" : 1
+ },
+
+ "minLength" : {
+ "type" : "integer",
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxLength" : {
+ "type" : "integer"
+ },
+
+ "pattern" : {
+ "type" : "string"
+ },
+
+ "items" : {
+ "type" : [{"$ref" : "#"}, "array"],
+ "items" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "additionalItems" : {
+ "type" : [{"$ref" : "#"}, "boolean"],
+ "default" : {}
+ },
+
+ "minItems" : {
+ "type" : "integer",
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxItems" : {
+ "type" : "integer",
+ "minimum" : 0
+ },
+
+ "uniqueItems" : {
+ "type" : "boolean",
+ "default" : false
+ },
+
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "patternProperties" : {
+ "type" : "object",
+ "additionalProperties" : {"$ref" : "#"},
+ "default" : {}
+ },
+
+ "additionalProperties" : {
+ "type" : [{"$ref" : "#"}, "boolean"],
+ "default" : {}
+ },
+
+ "minProperties" : {
+ "type" : "integer",
+ "minimum" : 0,
+ "default" : 0
+ },
+
+ "maxProperties" : {
+ "type" : "integer",
+ "minimum" : 0
+ },
+
+ "required" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+
+ "dependencies" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : ["string", "array", {"$ref" : "#"}],
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "default" : {}
+ },
+
+ "id" : {
+ "type" : "string"
+ },
+
+ "$ref" : {
+ "type" : "string"
+ },
+
+ "$schema" : {
+ "type" : "string"
+ },
+
+ "title" : {
+ "type" : "string"
+ },
+
+ "description" : {
+ "type" : "string"
+ },
+
+ "default" : {
+ "type" : "any"
+ }
+ },
+
+ "dependencies" : {
+ "exclusiveMinimum" : "minimum",
+ "exclusiveMaximum" : "maximum"
+ },
+
+ "default" : {}
+} \ No newline at end of file
diff --git a/node_modules/json-schema/draft-zyp-json-schema-03.xml b/node_modules/json-schema/draft-zyp-json-schema-03.xml
new file mode 100644
index 0000000..cf60620
--- /dev/null
+++ b/node_modules/json-schema/draft-zyp-json-schema-03.xml
@@ -0,0 +1,1120 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
+<!ENTITY rfc4627 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml">
+<!ENTITY rfc3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
+<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
+<!ENTITY rfc4287 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4287.xml">
+<!ENTITY rfc2616 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
+<!ENTITY rfc3339 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3339.xml">
+<!ENTITY rfc2045 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2045.xml">
+<!ENTITY rfc5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
+<!ENTITY rfc2396 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2396.xml">
+<!ENTITY iddiscovery SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hammer-discovery.xml">
+<!ENTITY uritemplate SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.gregorio-uritemplate.xml">
+<!ENTITY linkheader SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.nottingham-http-link-header.xml">
+<!ENTITY html401 SYSTEM "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-html401-19991224.xml">
+<!ENTITY css21 SYSTEM "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.CR-CSS21-20070719.xml">
+]>
+<?rfc toc="yes"?>
+<?rfc symrefs="yes"?>
+<?rfc compact="yes"?>
+<?rfc subcompact="no"?>
+<?rfc strict="no"?>
+<?rfc rfcedstyle="yes"?>
+<rfc category="info" docName="draft-zyp-json-schema-03" ipr="trust200902">
+ <front>
+ <title abbrev="JSON Schema Media Type">A JSON Media Type for Describing the Structure and Meaning of JSON Documents</title>
+
+ <author fullname="Kris Zyp" initials="K" role="editor" surname="Zyp">
+ <organization>SitePen (USA)</organization>
+ <address>
+ <postal>
+ <street>530 Lytton Avenue</street>
+ <city>Palo Alto, CA 94301</city>
+ <country>USA</country>
+ </postal>
+ <phone>+1 650 968 8787</phone>
+ <email>kris@sitepen.com</email>
+ </address>
+ </author>
+
+ <author fullname="Gary Court" initials="G" surname="Court">
+ <address>
+ <postal>
+ <street></street>
+ <city>Calgary, AB</city>
+ <country>Canada</country>
+ </postal>
+ <email>gary.court@gmail.com</email>
+ </address>
+ </author>
+
+ <date year="2011" />
+ <workgroup>Internet Engineering Task Force</workgroup>
+ <keyword>JSON</keyword>
+ <keyword>Schema</keyword>
+ <keyword>JavaScript</keyword>
+ <keyword>Object</keyword>
+ <keyword>Notation</keyword>
+ <keyword>Hyper Schema</keyword>
+ <keyword>Hypermedia</keyword>
+
+ <abstract>
+ <t>
+ JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
+ a JSON based format for defining
+ the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
+ </t>
+ </abstract>
+ </front>
+
+ <middle>
+ <section title="Introduction">
+ <t>
+ JSON (JavaScript Object Notation) Schema is a JSON media type for defining
+ the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
+ </t>
+ </section>
+
+ <section title="Conventions">
+ <t>
+ <!-- The text in this section has been copied from the official boilerplate,
+ and should not be modified.-->
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
+ "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
+ interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
+ </t>
+ </section>
+
+ <!-- ********************************************* -->
+
+ <section title="Overview">
+ <t>
+ JSON Schema defines the media type "application/schema+json" for
+ describing the structure of other
+ JSON documents. JSON Schema is JSON-based and includes facilities
+ for describing the structure of JSON documents in terms of
+ allowable values, descriptions, and interpreting relations with other resources.
+ </t>
+ <t>
+ JSON Schema format is organized into several separate definitions. The first
+ definition is the core schema specification. This definition is primary
+ concerned with describing a JSON structure and specifying valid elements
+ in the structure. The second definition is the Hyper Schema specification
+ which is intended define elements in a structure that can be interpreted as
+ hyperlinks.
+ Hyper Schema builds on JSON Schema to describe the hyperlink structure of
+ other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate
+ JSON documents based on their schemas.
+ </t>
+ <t>
+ Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on
+ property values, as well as define the meaning of the property values
+ for the purpose of describing a resource and determining hyperlinks
+ within the representation.
+ </t>
+ <figure>
+ <preamble>An example JSON Schema that describes products might look like:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "title": "Product",
+ "properties": {
+ "id": {
+ "type": "number",
+ "description": "Product identifier",
+ "required": true
+ },
+ "name": {
+ "description": "Name of the product",
+ "type": "string",
+ "required": true
+ },
+ "price": {
+ "required": true,
+ "type": "number",
+ "minimum": 0,
+ "required": true
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "links": [{
+ "rel": "full",
+ "href": "{id}"
+ }, {
+ "rel": "comments",
+ "href": "comments/?id={id}"
+ }]
+}
+]]>
+ </artwork>
+ <postamble>
+ This schema defines the properties of the instance JSON documents,
+ the required properties (id, name, and price), as well as an optional
+ property (tags). This also defines the link relations of the instance
+ JSON documents.
+ </postamble>
+ </figure>
+
+ <section title="Terminology">
+ <t>
+ For this specification, <spanx style="strong">schema</spanx> will be used to denote a JSON Schema
+ definition, and an <spanx style="strong">instance</spanx> refers to a JSON value that the schema
+ will be describing and validating.
+ </t>
+ </section>
+
+ <section title="Design Considerations">
+ <t>
+ The JSON Schema media type does not attempt to dictate the structure of JSON
+ representations that contain data, but rather provides a separate format
+ for flexibly communicating how a JSON representation should be
+ interpreted and validated, such that user agents can properly understand
+ acceptable structures and extrapolate hyperlink information
+ with the JSON document. It is acknowledged that JSON documents come
+ in a variety of structures, and JSON is unique in that the structure
+ of stored data structures often prescribes a non-ambiguous definite
+ JSON representation. Attempting to force a specific structure is generally
+ not viable, and therefore JSON Schema allows for a great flexibility
+ in the structure of the JSON data that it describes.
+ </t>
+ <t>
+ This specification is protocol agnostic.
+ The underlying protocol (such as HTTP) should sufficiently define the
+ semantics of the client-server interface, the retrieval of resource
+ representations linked to by JSON representations, and modification of
+ those resources. The goal of this
+ format is to sufficiently describe JSON structures such that one can
+ utilize existing information available in existing JSON
+ representations from a large variety of services that leverage a representational state transfer
+ architecture using existing protocols.
+ </t>
+ </section>
+ </section>
+
+ <section title="Schema/Instance Association">
+ <t>
+ JSON Schema instances are correlated to their schema by the "describedby"
+ relation, where the schema is defined to be the target of the relation.
+ Instance representations may be of the "application/json" media type or
+ any other subtype. Consequently, dictating how an instance
+ representation should specify the relation to the schema is beyond the normative scope
+ of this document (since this document specifically defines the JSON
+ Schema media type, and no other), but it is recommended that instances
+ specify their schema so that user agents can interpret the instance
+ representation and messages may retain the self-descriptive
+ characteristic, avoiding the need for out-of-band information about
+ instance data. Two approaches are recommended for declaring the
+ relation to the schema that describes the meaning of a JSON instance's (or collection
+ of instances) structure. A MIME type parameter named
+ "profile" or a relation of "describedby" (which could be defined by a Link header) may be used:
+
+ <figure>
+ <artwork>
+<![CDATA[
+Content-Type: application/my-media-type+json;
+ profile=http://json.com/my-hyper-schema
+]]>
+ </artwork>
+ </figure>
+
+ or if the content is being transferred by a protocol (such as HTTP) that
+ provides headers, a Link header can be used:
+
+ <figure>
+ <artwork>
+<![CDATA[
+Link: <http://json.com/my-hyper-schema>; rel="describedby"
+]]>
+ </artwork>
+ </figure>
+
+ Instances MAY specify multiple schemas, to indicate all the schemas that
+ are applicable to the data, and the data SHOULD be valid by all the schemas.
+ The instance data MAY have multiple schemas
+ that it is defined by (the instance data SHOULD be valid for those schemas).
+ Or if the document is a collection of instances, the collection MAY contain
+ instances from different schemas. When collections contain heterogeneous
+ instances, the "pathStart" attribute MAY be specified in the
+ schema to disambiguate which schema should be applied for each item in the
+ collection. However, ultimately, the mechanism for referencing a schema is up to the
+ media type of the instance documents (if they choose to specify that schemas
+ can be referenced).
+ </t>
+
+ <section title="Self-Descriptive Schema">
+ <t>
+ JSON Schemas can themselves be described using JSON Schemas.
+ A self-describing JSON Schema for the core JSON Schema can
+ be found at <eref target="http://json-schema.org/schema">http://json-schema.org/schema</eref> for the latest version or
+ <eref target="http://json-schema.org/draft-03/schema">http://json-schema.org/draft-03/schema</eref> for the draft-03 version. The hyper schema
+ self-description can be found at <eref target="http://json-schema.org/hyper-schema">http://json-schema.org/hyper-schema</eref>
+ or <eref target="http://json-schema.org/draft-03/hyper-schema">http://json-schema.org/draft-03/hyper-schema</eref>. All schemas
+ used within a protocol with media type definitions
+ SHOULD include a MIME parameter that refers to the self-descriptive
+ hyper schema or another schema that extends this hyper schema:
+
+ <figure>
+ <artwork>
+<![CDATA[
+Content-Type: application/json;
+ profile=http://json-schema.org/draft-03/hyper-schema
+]]>
+ </artwork>
+ </figure>
+ </t>
+ </section>
+ </section>
+
+ <section title="Core Schema Definition">
+ <t>
+ A JSON Schema is a JSON Object that defines various attributes
+ (including usage and valid values) of a JSON value. JSON
+ Schema has recursive capabilities; there are a number of elements
+ in the structure that allow for nested JSON Schemas.
+ </t>
+
+ <figure>
+ <preamble>An example JSON Schema definition could look like:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "description": "A person",
+ "type": "object",
+
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "age": {
+ "type": "integer",
+ "maximum": 125
+ }
+ }
+}
+]]>
+ </artwork>
+ </figure>
+
+ <t>
+ A JSON Schema object may have any of the following properties, called schema
+ attributes (all attributes are optional):
+ </t>
+
+ <section title="type">
+ <t>
+ This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
+ This attribute can take one of two forms:
+
+ <list style="hanging">
+ <t hangText="Simple Types">
+ A string indicating a primitive or simple type. The following are acceptable string values:
+
+ <list style="hanging">
+ <t hangText="string">Value MUST be a string.</t>
+ <t hangText="number">Value MUST be a number, floating point numbers are allowed. </t>
+ <t hangText="integer">Value MUST be an integer, no floating point numbers are allowed. This is a subset of the number type.</t>
+ <t hangText="boolean">Value MUST be a boolean. </t>
+ <t hangText="object">Value MUST be an object.</t>
+ <t hangText="array">Value MUST be an array.</t>
+ <t hangText="null">Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own).</t>
+ <t hangText="any">Value MAY be of any type including null.</t>
+ </list>
+
+ If the property is not defined or is not in this list, then any type of value is acceptable.
+ Other type values MAY be used for custom purposes, but minimal validators of the specification
+ implementation can allow any instance value on unknown type values.
+ </t>
+
+ <t hangText="Union Types">
+ An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema.
+ The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array.
+ </t>
+ </list>
+ </t>
+
+ <figure>
+ <preamble>For example, a schema that defines if an instance can be a string or a number would be:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "type": ["string", "number"]
+}
+]]></artwork>
+ </figure>
+ </section>
+
+ <section title="properties" anchor="properties">
+ <t>This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order.</t>
+ </section>
+
+ <section title="patternProperties">
+ <t>This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.</t>
+ </section>
+
+ <section title="additionalProperties" anchor="additionalProperties">
+ <t>This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.</t>
+ </section>
+
+ <section title="items">
+ <t>This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array.</t>
+ <t>When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.</t>
+ <t>When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the <xref target="additionalItems">"additionalItems"</xref> attribute using the same rules as <xref target="additionalProperties">"additionalProperties"</xref> for objects.</t>
+ </section>
+
+ <section title="additionalItems" anchor="additionalItems">
+ <t>This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items.</t>
+ </section>
+
+ <section title="required">
+ <t>This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional.</t>
+ </section>
+
+ <section title="dependencies">
+ <t>This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value").</t>
+ <t>
+ The dependency value can take one of two forms:
+
+ <list style="hanging">
+ <t hangText="Simple Dependency">
+ If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value.
+ If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array.
+ </t>
+ <t hangText="Schema Dependency">
+ If the dependency value is a schema, then the instance object MUST be valid against the schema.
+ </t>
+ </list>
+ </t>
+ </section>
+
+ <section title="minimum">
+ <t>This attribute defines the minimum value of the instance property when the type of the instance value is a number.</t>
+ </section>
+
+ <section title="maximum">
+ <t>This attribute defines the maximum value of the instance property when the type of the instance value is a number.</t>
+ </section>
+
+ <section title="exclusiveMinimum">
+ <t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.</t>
+ </section>
+
+ <section title="exclusiveMaximum">
+ <t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.</t>
+ </section>
+
+ <section title="minItems">
+ <t>This attribute defines the minimum number of values in an array when the array is the instance value.</t>
+ </section>
+
+ <section title="maxItems">
+ <t>This attribute defines the maximum number of values in an array when the array is the instance value.</t>
+ </section>
+
+ <section title="uniqueItems" anchor="uniqueItems">
+ <t>This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).</t>
+ <t>
+ Two instance are consider equal if they are both of the same type and:
+
+ <list>
+ <t>are null; or</t>
+ <t>are booleans/numbers/strings and have the same value; or</t>
+ <t>are arrays, contains the same number of items, and each item in the array is equal to the corresponding item in the other array; or</t>
+ <t>are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object.</t>
+ </list>
+ </t>
+ </section>
+
+ <section title="pattern">
+ <t>When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5</t>
+ </section>
+
+ <section title="minLength">
+ <t>When the instance value is a string, this defines the minimum length of the string.</t>
+ </section>
+
+ <section title="maxLength">
+ <t>When the instance value is a string, this defines the maximum length of the string.</t>
+ </section>
+
+ <section title="enum">
+ <t>This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in <xref target="uniqueItems">"uniqueItems"</xref>.</t>
+ </section>
+
+ <section title="default">
+ <t>This attribute defines the default value of the instance when the instance is undefined.</t>
+ </section>
+
+ <section title="title">
+ <t>This attribute is a string that provides a short description of the instance property.</t>
+ </section>
+
+ <section title="description">
+ <t>This attribute is a string that provides a full description of the of purpose the instance property.</t>
+ </section>
+
+ <section title="format">
+ <t>This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format.</t>
+
+ <t>
+ The following formats are predefined:
+
+ <list style="hanging">
+ <t hangText="date-time">This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp.</t>
+ <t hangText="date">This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part.</t>
+ <t hangText="time">This SHOULD be a time in the format of hh:mm:ss. It is recommended that you use the "date-time" format instead of "time" unless you need to transfer only the time part.</t>
+ <t hangText="utc-millisec">This SHOULD be the difference, measured in milliseconds, between the specified time and midnight, 00:00 of January 1, 1970 UTC. The value SHOULD be a number (integer or float).</t>
+ <t hangText="regex">A regular expression, following the regular expression specification from ECMA 262/Perl 5.</t>
+ <t hangText="color">This is a CSS color (like "#FF0000" or "red"), based on <xref target="W3C.CR-CSS21-20070719">CSS 2.1</xref>.</t>
+ <t hangText="style">This is a CSS style definition (like "color: red; background-color:#FFF"), based on <xref target="W3C.CR-CSS21-20070719">CSS 2.1</xref>.</t>
+ <t hangText="phone">This SHOULD be a phone number (format MAY follow E.123).</t>
+ <t hangText="uri">This value SHOULD be a URI.</t>
+ <t hangText="email">This SHOULD be an email address.</t>
+ <t hangText="ip-address">This SHOULD be an ip version 4 address.</t>
+ <t hangText="ipv6">This SHOULD be an ip version 6 address.</t>
+ <t hangText="host-name">This SHOULD be a host-name.</t>
+ </list>
+ </t>
+
+ <t>Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format.</t>
+ </section>
+
+ <section title="divisibleBy">
+ <t>This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.</t>
+ </section>
+
+ <section title="disallow">
+ <t>This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.</t>
+ </section>
+
+ <section title="extends">
+ <t>The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.</t>
+ <t>
+ Conceptually, the behavior of extends can be seen as validating an
+ instance against all constraints in the extending schema as well as
+ the extended schema(s). More optimized implementations that merge
+ schemas are possible, but are not required. Some examples of using "extends":
+
+ <figure>
+ <artwork>
+<![CDATA[
+{
+ "description": "An adult",
+ "properties": {
+ "age": {
+ "minimum": 21
+ }
+ },
+ "extends": {"$ref": "person"}
+}
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <artwork>
+<![CDATA[
+{
+ "description": "Extended schema",
+ "properties": {
+ "deprecated": {
+ "type": "boolean"
+ }
+ },
+ "extends": {"$ref": "http://json-schema.org/draft-03/schema"}
+}
+]]>
+ </artwork>
+ </figure>
+ </t>
+ </section>
+
+ <section title="id">
+ <t>
+ This attribute defines the current URI of this schema (this attribute is
+ effectively a "self" link). This URI MAY be relative or absolute. If
+ the URI is relative it is resolved against the current URI of the parent
+ schema it is contained in. If this schema is not contained in any
+ parent schema, the current URI of the parent schema is held to be the
+ URI under which this schema was addressed. If id is missing, the current URI of a schema is
+ defined to be that of the parent schema. The current URI of the schema
+ is also used to construct relative references such as for $ref.
+ </t>
+ </section>
+
+ <section title="$ref">
+ <t>
+ This attribute defines a URI of a schema that contains the full representation of this schema.
+ When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
+ This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
+ </t>
+ </section>
+
+ <section title="$schema">
+ <t>
+ This attribute defines a URI of a JSON Schema that is the schema of the current schema.
+ When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving <xref target="hyper-schema">Hyper Schema</xref><xref target="links">links</xref>.
+ </t>
+
+ <t>
+ A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
+ Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
+ </t>
+ </section>
+ </section>
+
+ <section title="Hyper Schema" anchor="hyper-schema">
+ <t>
+ The following attributes are specified in addition to those
+ attributes that already provided by the core schema with the specific
+ purpose of informing user agents of relations between resources based
+ on JSON data. Just as with JSON
+ schema attributes, all the attributes in hyper schemas are optional.
+ Therefore, an empty object is a valid (non-informative) schema, and
+ essentially describes plain JSON (no constraints on the structures).
+ Addition of attributes provides additive information for user agents.
+ </t>
+
+ <section title="links" anchor="links">
+ <t>
+ The value of the links property MUST be an array, where each item
+ in the array is a link description object which describes the link
+ relations of the instances.
+ </t>
+
+ <section title="Link Description Object">
+ <t>
+ A link description object is used to describe link relations. In
+ the context of a schema, it defines the link relations of the
+ instances of the schema, and can be parameterized by the instance
+ values. The link description format can be used on its own in
+ regular (non-schema documents), and use of this format can
+ be declared by referencing the normative link description
+ schema as the the schema for the data structure that uses the
+ links. The URI of the normative link description schema is:
+ <eref target="http://json-schema.org/links">http://json-schema.org/links</eref> (latest version) or
+ <eref target="http://json-schema.org/draft-03/links">http://json-schema.org/draft-03/links</eref> (draft-03 version).
+ </t>
+
+ <section title="href">
+ <t>
+ The value of the "href" link description property
+ indicates the target URI of the related resource. The value
+ of the instance property SHOULD be resolved as a URI-Reference per <xref target="RFC3986">RFC 3986</xref>
+ and MAY be a relative URI. The base URI to be used for relative resolution
+ SHOULD be the URI used to retrieve the instance object (not the schema)
+ when used within a schema. Also, when links are used within a schema, the URI
+ SHOULD be parametrized by the property values of the instance
+ object, if property values exist for the corresponding variables
+ in the template (otherwise they MAY be provided from alternate sources, like user input).
+ </t>
+
+ <t>
+ Instance property values SHOULD be substituted into the URIs where
+ matching braces ('{', '}') are found surrounding zero or more characters,
+ creating an expanded URI. Instance property value substitutions are resolved
+ by using the text between the braces to denote the property name
+ from the instance to get the value to substitute.
+
+ <figure>
+ <preamble>For example, if an href value is defined:</preamble>
+ <artwork>
+<![CDATA[
+http://somesite.com/{id}
+]]>
+ </artwork>
+ <postamble>Then it would be resolved by replace the value of the "id" property value from the instance object.</postamble>
+ </figure>
+
+ <figure>
+ <preamble>If the value of the "id" property was "45", the expanded URI would be:</preamble>
+ <artwork>
+<![CDATA[
+http://somesite.com/45
+]]>
+ </artwork>
+ </figure>
+
+ If matching braces are found with the string "@" (no quotes) between the braces, then the
+ actual instance value SHOULD be used to replace the braces, rather than a property value.
+ This should only be used in situations where the instance is a scalar (string,
+ boolean, or number), and not for objects or arrays.
+ </t>
+ </section>
+
+ <section title="rel">
+ <t>
+ The value of the "rel" property indicates the name of the
+ relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation.
+ </t>
+
+ <t>
+ Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see <xref target="RFC4287">RFC 4287</xref>). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations:
+
+ <list style="hanging">
+ <t hangText="self">
+ If the relation value is "self", when this property is encountered in
+ the instance object, the object represents a resource and the instance object is
+ treated as a full representation of the target resource identified by
+ the specified URI.
+ </t>
+
+ <t hangText="full">
+ This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation.
+ </t>
+
+ <t hangText="describedby">
+ This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.
+ </t>
+
+ <t hangText="root">
+ This relation indicates that the target of the link
+ SHOULD be treated as the root or the body of the representation for the
+ purposes of user agent interaction or fragment resolution. All other
+ properties of the instance objects can be regarded as meta-data
+ descriptions for the data.
+ </t>
+ </list>
+ </t>
+
+ <t>
+ The following relations are applicable for schemas (the schema as the "from" resource in the relation):
+
+ <list style="hanging">
+ <t hangText="instances">This indicates the target resource that represents collection of instances of a schema.</t>
+ <t hangText="create">This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST).</t>
+ </list>
+ </t>
+
+ <t>
+ <figure>
+ <preamble>For example, if a schema is defined:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "links": [{
+ "rel": "self",
+ "href": "{id}"
+ }, {
+ "rel": "up",
+ "href": "{upId}"
+ }, {
+ "rel": "children",
+ "href": "?upId={id}"
+ }]
+}
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <preamble>And if a collection of instance resource's JSON representation was retrieved:</preamble>
+ <artwork>
+<![CDATA[
+GET /Resource/
+
+[{
+ "id": "thing",
+ "upId": "parent"
+}, {
+ "id": "thing2",
+ "upId": "parent"
+}]
+]]>
+ </artwork>
+ </figure>
+
+ This would indicate that for the first item in the collection, its own
+ (self) URI would resolve to "/Resource/thing" and the first item's "up"
+ relation SHOULD be resolved to the resource at "/Resource/parent".
+ The "children" collection would be located at "/Resource/?upId=thing".
+ </t>
+ </section>
+
+ <section title="targetSchema">
+ <t>This property value is a schema that defines the expected structure of the JSON representation of the target of the link.</t>
+ </section>
+
+ <section title="Submission Link Properties">
+ <t>
+ The following properties also apply to link definition objects, and
+ provide functionality analogous to HTML forms, in providing a
+ means for submitting extra (often user supplied) information to send to a server.
+ </t>
+
+ <section title="method">
+ <t>
+ This attribute defines which method can be used to access the target resource.
+ In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
+ such as "PUT" and "DELETE" have semantics that are clearly implied by
+ accessed resources, and do not need to be defined here).
+ This defaults to "GET".
+ </t>
+ </section>
+
+ <section title="enctype">
+ <t>
+ If present, this property indicates a query media type format that the server
+ supports for querying or posting to the collection of instances at the target
+ resource. The query can be
+ suffixed to the target URI to query the collection with
+ property-based constraints on the resources that SHOULD be returned from
+ the server or used to post data to the resource (depending on the method).
+
+ <figure>
+ <preamble>For example, with the following schema:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "links": [{
+ "enctype": "application/x-www-form-urlencoded",
+ "method": "GET",
+ "href": "/Product/",
+ "properties": {
+ "name": {
+ "description": "name of the product"
+ }
+ }
+ }]
+}
+]]>
+ </artwork>
+ <postamble>This indicates that the client can query the server for instances that have a specific name.</postamble>
+ </figure>
+
+ <figure>
+ <preamble>For example:</preamble>
+ <artwork>
+<![CDATA[
+/Product/?name=Slinky
+]]>
+ </artwork>
+ </figure>
+
+ If no enctype or method is specified, only the single URI specified by
+ the href property is defined. If the method is POST, "application/json" is
+ the default media type.
+ </t>
+ </section>
+
+ <section title="schema">
+ <t>
+ This attribute contains a schema which defines the acceptable structure of the submitted
+ request (for a GET request, this schema would define the properties for the query string
+ and for a POST request, this would define the body).
+ </t>
+ </section>
+ </section>
+ </section>
+ </section>
+
+ <section title="fragmentResolution">
+ <t>
+ This property indicates the fragment resolution protocol to use for
+ resolving fragment identifiers in URIs within the instance
+ representations. This applies to the instance object URIs and all
+ children of the instance object's URIs. The default fragment resolution
+ protocol is "slash-delimited", which is defined below. Other fragment
+ resolution protocols MAY be used, but are not defined in this document.
+ </t>
+
+ <t>
+ The fragment identifier is based on <xref target="RFC2396">RFC 2396, Sec 5</xref>, and defines the
+ mechanism for resolving references to entities within a document.
+ </t>
+
+ <section title="slash-delimited fragment resolution">
+ <t>
+ With the slash-delimited fragment resolution protocol, the fragment
+ identifier is interpreted as a series of property reference tokens that start with and
+ are delimited by the "/" character (\x2F). Each property reference token
+ is a series of unreserved or escaped URI characters. Each property
+ reference token SHOULD be interpreted, starting from the beginning of
+ the fragment identifier, as a path reference in the target JSON
+ structure. The final target value of the fragment can be determined by
+ starting with the root of the JSON structure from the representation of
+ the resource identified by the pre-fragment URI. If the target is a JSON
+ object, then the new target is the value of the property with the name
+ identified by the next property reference token in the fragment. If the
+ target is a JSON array, then the target is determined by finding the
+ item in array the array with the index defined by the next property
+ reference token (which MUST be a number). The target is successively
+ updated for each property reference token, until the entire fragment has
+ been traversed.
+ </t>
+
+ <t>
+ Property names SHOULD be URI-encoded. In particular, any "/" in a
+ property name MUST be encoded to avoid being interpreted as a property
+ delimiter.
+ </t>
+
+ <t>
+ <figure>
+ <preamble>For example, for the following JSON representation:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "foo": {
+ "anArray": [{
+ "prop": 44
+ }],
+ "another prop": {
+ "baz": "A string"
+ }
+ }
+}
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <preamble>The following fragment identifiers would be resolved:</preamble>
+ <artwork>
+<![CDATA[
+fragment identifier resolution
+------------------- ----------
+# self, the root of the resource itself
+#/foo the object referred to by the foo property
+#/foo/another%20prop the object referred to by the "another prop"
+ property of the object referred to by the
+ "foo" property
+#/foo/another%20prop/baz the string referred to by the value of "baz"
+ property of the "another prop" property of
+ the object referred to by the "foo" property
+#/foo/anArray/0 the first object in the "anArray" array
+]]>
+ </artwork>
+ </figure>
+ </t>
+ </section>
+
+ <section title="dot-delimited fragment resolution">
+ <t>
+ The dot-delimited fragment resolution protocol is the same as
+ slash-delimited fragment resolution protocol except that the "." character
+ (\x2E) is used as the delimiter between property names (instead of "/") and
+ the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment
+ identifiers for referencing the value of the foo propery.
+ </t>
+ </section>
+ </section>
+
+ <section title="readonly">
+ <t>This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.</t>
+ </section>
+
+ <section title="contentEncoding">
+ <t>If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. <xref target="RFC2045">RFC 2045, Sec 6.1</xref> lists the possible values for this property.</t>
+ </section>
+
+ <section title="pathStart">
+ <t>
+ This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
+ The value of the "pathStart" attribute MUST be resolved as per <xref target="RFC3986">RFC 3986, Sec 5</xref>,
+ and is relative to the instance's URI.
+ </t>
+
+ <t>
+ When multiple schemas have been referenced for an instance, the user agent
+ can determine if this schema is applicable for a particular instance by
+ determining if the URI of the instance begins with the the value of the "pathStart"
+ attribute. If the URI of the instance does not start with this URI,
+ or if another schema specifies a starting URI that is longer and also matches the
+ instance, this schema SHOULD NOT be applied to the instance. Any schema
+ that does not have a pathStart attribute SHOULD be considered applicable
+ to all the instances for which it is referenced.
+ </t>
+ </section>
+
+ <section title="mediaType">
+ <t>This attribute defines the media type of the instance representations that this schema is defining.</t>
+ </section>
+ </section>
+
+ <section title="Security Considerations">
+ <t>
+ This specification is a sub-type of the JSON format, and
+ consequently the security considerations are generally the same as <xref target="RFC4627">RFC 4627</xref>.
+ However, an additional issue is that when link relation of "self"
+ is used to denote a full representation of an object, the user agent
+ SHOULD NOT consider the representation to be the authoritative representation
+ of the resource denoted by the target URI if the target URI is not
+ equivalent to or a sub-path of the the URI used to request the resource
+ representation which contains the target URI with the "self" link.
+
+ <figure>
+ <preamble>For example, if a hyper schema was defined:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "links": [{
+ "rel": "self",
+ "href": "{id}"
+ }]
+}
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <preamble>And a resource was requested from somesite.com:</preamble>
+ <artwork>
+<![CDATA[
+GET /foo/
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <preamble>With a response of:</preamble>
+ <artwork>
+<![CDATA[
+Content-Type: application/json; profile=/schema-for-this-data
+
+[{
+ "id": "bar",
+ "name": "This representation can be safely treated \
+ as authoritative "
+}, {
+ "id": "/baz",
+ "name": "This representation should not be treated as \
+ authoritative the user agent should make request the resource\
+ from '/baz' to ensure it has the authoritative representation"
+}, {
+ "id": "http://othersite.com/something",
+ "name": "This representation\
+ should also not be treated as authoritative and the target\
+ resource representation should be retrieved for the\
+ authoritative representation"
+}]
+]]>
+ </artwork>
+ </figure>
+ </t>
+ </section>
+
+ <section title="IANA Considerations">
+ <t>The proposed MIME media type for JSON Schema is "application/schema+json".</t>
+ <t>Type name: application</t>
+ <t>Subtype name: schema+json</t>
+ <t>Required parameters: profile</t>
+ <t>
+ The value of the profile parameter SHOULD be a URI (relative or absolute) that
+ refers to the schema used to define the structure of this structure (the
+ meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema,
+ but it is allowable to use other schemas that extend the hyper schema's meta-
+ schema.
+ </t>
+ <t>Optional parameters: pretty</t>
+ <t>The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read.</t>
+
+ <section title="Registry of Link Relations">
+ <t>
+ This registry is maintained by IANA per <xref target="RFC4287">RFC 4287</xref> and this specification adds
+ four values: "full", "create", "instances", "root". New
+ assignments are subject to IESG Approval, as outlined in <xref target="RFC5226">RFC 5226</xref>.
+ Requests should be made by email to IANA, which will then forward the
+ request to the IESG, requesting approval.
+ </t>
+ </section>
+ </section>
+ </middle>
+
+ <back>
+ <!-- References Section -->
+ <references title="Normative References">
+ &rfc2045;
+ &rfc2119;
+ &rfc2396;
+ &rfc3339;
+ &rfc3986;
+ &rfc4287;
+ </references>
+ <references title="Informative References">
+ &rfc2616;
+ &rfc4627;
+ &rfc5226;
+ &iddiscovery;
+ &uritemplate;
+ &linkheader;
+ &html401;
+ &css21;
+ </references>
+
+ <section title="Change Log">
+ <t>
+ <list style="hanging">
+ <t hangText="draft-03">
+ <list style="symbols">
+ <t>Added example and verbiage to "extends" attribute.</t>
+ <t>Defined slash-delimited to use a leading slash.</t>
+ <t>Made "root" a relation instead of an attribute.</t>
+ <t>Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types).</t>
+ <t>Added more explanation of nullability.</t>
+ <t>Removed "alternate" attribute.</t>
+ <t>Upper cased many normative usages of must, may, and should.</t>
+ <t>Replaced the link submission "properties" attribute to "schema" attribute.</t>
+ <t>Replaced "optional" attribute with "required" attribute.</t>
+ <t>Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute.</t>
+ <t>Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute.</t>
+ <t>Replaced "requires" attribute with "dependencies" attribute.</t>
+ <t>Moved "contentEncoding" attribute to hyper schema.</t>
+ <t>Added "additionalItems" attribute.</t>
+ <t>Added "id" attribute.</t>
+ <t>Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template.</t>
+ <t>Added "patternProperties" attribute.</t>
+ <t>Schema URIs are now namespace versioned.</t>
+ <t>Added "$ref" and "$schema" attributes.</t>
+ </list>
+ </t>
+
+ <t hangText="draft-02">
+ <list style="symbols">
+ <t>Replaced "maxDecimal" attribute with "divisibleBy" attribute.</t>
+ <t>Added slash-delimited fragment resolution protocol and made it the default.</t>
+ <t>Added language about using links outside of schemas by referencing its normative URI.</t>
+ <t>Added "uniqueItems" attribute.</t>
+ <t>Added "targetSchema" attribute to link description object.</t>
+ </list>
+ </t>
+
+ <t hangText="draft-01">
+ <list style="symbols">
+ <t>Fixed category and updates from template.</t>
+ </list>
+ </t>
+
+ <t hangText="draft-00">
+ <list style="symbols">
+ <t>Initial draft.</t>
+ </list>
+ </t>
+ </list>
+ </t>
+ </section>
+
+ <section title="Open Issues">
+ <t>
+ <list>
+ <t>Should we give a preference to MIME headers over Link headers (or only use one)?</t>
+ <t>Should "root" be a MIME parameter?</t>
+ <t>Should "format" be renamed to "mediaType" or "contentType" to reflect the usage MIME media types that are allowed?</t>
+ <t>How should dates be handled?</t>
+ </list>
+ </t>
+ </section>
+ </back>
+</rfc>
diff --git a/node_modules/json-schema/draft-zyp-json-schema-04.xml b/node_modules/json-schema/draft-zyp-json-schema-04.xml
new file mode 100644
index 0000000..8ede6bf
--- /dev/null
+++ b/node_modules/json-schema/draft-zyp-json-schema-04.xml
@@ -0,0 +1,1072 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
+<!ENTITY rfc4627 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml">
+<!ENTITY rfc3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
+<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
+<!ENTITY rfc4287 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4287.xml">
+<!ENTITY rfc2616 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
+<!ENTITY rfc3339 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3339.xml">
+<!ENTITY rfc2045 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2045.xml">
+<!ENTITY rfc5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
+<!ENTITY iddiscovery SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hammer-discovery.xml">
+<!ENTITY uritemplate SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.gregorio-uritemplate.xml">
+<!ENTITY linkheader SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.nottingham-http-link-header.xml">
+<!ENTITY html401 SYSTEM "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-html401-19991224.xml">
+<!ENTITY css21 SYSTEM "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.CR-CSS21-20070719.xml">
+]>
+<?rfc toc="yes"?>
+<?rfc symrefs="yes"?>
+<?rfc compact="yes"?>
+<?rfc subcompact="no"?>
+<?rfc strict="no"?>
+<?rfc rfcedstyle="yes"?>
+<rfc category="info" docName="draft-zyp-json-schema-04" ipr="trust200902">
+ <front>
+ <title abbrev="JSON Schema Media Type">A JSON Media Type for Describing the Structure and Meaning of JSON Documents</title>
+
+ <author fullname="Kris Zyp" initials="K" role="editor" surname="Zyp">
+ <organization>SitePen (USA)</organization>
+ <address>
+ <postal>
+ <street>530 Lytton Avenue</street>
+ <city>Palo Alto, CA 94301</city>
+ <country>USA</country>
+ </postal>
+ <phone>+1 650 968 8787</phone>
+ <email>kris@sitepen.com</email>
+ </address>
+ </author>
+
+ <author fullname="Gary Court" initials="G" surname="Court">
+ <address>
+ <postal>
+ <street></street>
+ <city>Calgary, AB</city>
+ <country>Canada</country>
+ </postal>
+ <email>gary.court@gmail.com</email>
+ </address>
+ </author>
+
+ <date year="2011" />
+ <workgroup>Internet Engineering Task Force</workgroup>
+ <keyword>JSON</keyword>
+ <keyword>Schema</keyword>
+ <keyword>JavaScript</keyword>
+ <keyword>Object</keyword>
+ <keyword>Notation</keyword>
+ <keyword>Hyper Schema</keyword>
+ <keyword>Hypermedia</keyword>
+
+ <abstract>
+ <t>
+ JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
+ a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
+ </t>
+ </abstract>
+ </front>
+
+ <middle>
+ <section title="Introduction">
+ <t>
+ JSON (JavaScript Object Notation) Schema is a JSON media type for defining
+ the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
+ </t>
+ </section>
+
+ <section title="Conventions and Terminology">
+ <t>
+ <!-- The text in this section has been copied from the official boilerplate,
+ and should not be modified.-->
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
+ "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
+ interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
+ </t>
+
+ <t>
+ The terms "JSON", "JSON text", "JSON value", "member", "element", "object",
+ "array", "number", "string", "boolean", "true", "false", and "null" in this
+ document are to be interpreted as defined in <xref target="RFC4627">RFC 4627</xref>.
+ </t>
+
+ <t>
+ This specification also uses the following defined terms:
+
+ <list style="hanging">
+ <t hangText="schema">A JSON Schema object.</t>
+ <t hangText="instance">Equivalent to "JSON value" as defined in <xref target="RFC4627">RFC 4627</xref>.</t>
+ <t hangText="property">Equivalent to "member" as defined in <xref target="RFC4627">RFC 4627</xref>.</t>
+ <t hangText="item">Equivalent to "element" as defined in <xref target="RFC4627">RFC 4627</xref>.</t>
+ <t hangText="attribute">A property of a JSON Schema object.</t>
+ </list>
+ </t>
+ </section>
+
+ <section title="Overview">
+ <t>
+ JSON Schema defines the media type "application/schema+json" for
+ describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities
+ for describing the structure of JSON in terms of
+ allowable values, descriptions, and interpreting relations with other resources.
+ </t>
+ <t>
+ This document is organized into several separate definitions. The first
+ definition is the core schema specification. This definition is primary
+ concerned with describing a JSON structure and specifying valid elements
+ in the structure. The second definition is the Hyper Schema specification
+ which is intended to define elements in a structure that can be interpreted as
+ hyperlinks.
+ Hyper Schema builds on JSON Schema to describe the hyperlink structure of
+ JSON values. This allows user agents to be able to successfully navigate
+ documents containing JSON based on their schemas.
+ </t>
+ <t>
+ Cumulatively JSON Schema acts as meta-JSON that can be used to define the
+ required type and constraints on JSON values, as well as define the meaning
+ of the JSON values for the purpose of describing a resource and determining
+ hyperlinks within the representation.
+ </t>
+ <figure>
+ <preamble>An example JSON Schema that describes products might look like:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "title": "Product",
+ "properties": {
+ "id": {
+ "title": "Product Identifier",
+ "type": "number"
+ },
+ "name": {
+ "title": "Product Name",
+ "type": "string"
+ },
+ "price": {
+ "type": "number",
+ "minimum": 0
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required" : ["id", "name", "price"],
+ "links": [{
+ "rel": "full",
+ "href": "{id}"
+ }, {
+ "rel": "comments",
+ "href": "comments/?id={id}"
+ }]
+}
+]]>
+ </artwork>
+ <postamble>
+ This schema defines the properties of the instance,
+ the required properties (id, name, and price), as well as an optional
+ property (tags). This also defines the link relations of the instance.
+ </postamble>
+ </figure>
+
+ <section title="Design Considerations">
+ <t>
+ The JSON Schema media type does not attempt to dictate the structure of JSON
+ values that contain data, but rather provides a separate format
+ for flexibly communicating how a JSON value should be
+ interpreted and validated, such that user agents can properly understand
+ acceptable structures and extrapolate hyperlink information
+ from the JSON. It is acknowledged that JSON values come
+ in a variety of structures, and JSON is unique in that the structure
+ of stored data structures often prescribes a non-ambiguous definite
+ JSON representation. Attempting to force a specific structure is generally
+ not viable, and therefore JSON Schema allows for a great flexibility
+ in the structure of the JSON data that it describes.
+ </t>
+ <t>
+ This specification is protocol agnostic.
+ The underlying protocol (such as HTTP) should sufficiently define the
+ semantics of the client-server interface, the retrieval of resource
+ representations linked to by JSON representations, and modification of
+ those resources. The goal of this
+ format is to sufficiently describe JSON structures such that one can
+ utilize existing information available in existing JSON
+ representations from a large variety of services that leverage a representational state transfer
+ architecture using existing protocols.
+ </t>
+ </section>
+ </section>
+
+ <section title="Schema/Instance Association">
+ <t>
+ JSON values are correlated to their schema by the "describedby"
+ relation, where the schema is the target of the relation.
+ JSON values MUST be of the "application/json" media type or
+ any other subtype. Consequently, dictating how a JSON value should
+ specify the relation to the schema is beyond the normative scope
+ of this document since this document specifically defines the JSON
+ Schema media type, and no other. It is RECOMMNENDED that JSON values
+ specify their schema so that user agents can interpret the instance
+ and retain the self-descriptive characteristics. This avoides the need for out-of-band information about
+ instance data. Two approaches are recommended for declaring the
+ relation to the schema that describes the meaning of a JSON instance's (or collection
+ of instances) structure. A MIME type parameter named
+ "profile" or a relation of "describedby" (which could be specified by a Link header) may be used:
+
+ <figure>
+ <artwork>
+<![CDATA[
+Content-Type: application/my-media-type+json;
+ profile=http://example.com/my-hyper-schema
+]]>
+ </artwork>
+ </figure>
+
+ or if the content is being transferred by a protocol (such as HTTP) that
+ provides headers, a Link header can be used:
+
+ <figure>
+ <artwork>
+<![CDATA[
+Link: <http://example.com/my-hyper-schema>; rel="describedby"
+]]>
+ </artwork>
+ </figure>
+
+ Instances MAY specify multiple schemas, to indicate all the schemas that
+ are applicable to the data, and the data SHOULD be valid by all the schemas.
+ The instance data MAY have multiple schemas
+ that it is described by (the instance data SHOULD be valid for those schemas).
+ Or if the document is a collection of instances, the collection MAY contain
+ instances from different schemas. The mechanism for referencing a schema is
+ determined by the media type of the instance (if it provides a method for
+ referencing schemas).
+ </t>
+
+ <section title="Self-Descriptive Schema">
+ <t>
+ JSON Schemas can themselves be described using JSON Schemas.
+ A self-describing JSON Schema for the core JSON Schema can
+ be found at <eref target="http://json-schema.org/schema">http://json-schema.org/schema</eref> for the latest version or
+ <eref target="http://json-schema.org/draft-04/schema">http://json-schema.org/draft-04/schema</eref> for the draft-04 version. The hyper schema
+ self-description can be found at <eref target="http://json-schema.org/hyper-schema">http://json-schema.org/hyper-schema</eref>
+ or <eref target="http://json-schema.org/draft-04/hyper-schema">http://json-schema.org/draft-04/hyper-schema</eref>. All schemas
+ used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive
+ hyper schema or another schema that extends this hyper schema:
+
+ <figure>
+ <artwork>
+<![CDATA[
+Content-Type: application/json;
+ profile=http://json-schema.org/draft-04/hyper-schema
+]]>
+ </artwork>
+ </figure>
+ </t>
+ </section>
+ </section>
+
+ <section title="Core Schema Definition">
+ <t>
+ A JSON Schema is a JSON object that defines various attributes
+ (including usage and valid values) of a JSON value. JSON
+ Schema has recursive capabilities; there are a number of elements
+ in the structure that allow for nested JSON Schemas.
+ </t>
+
+ <figure>
+ <preamble>An example JSON Schema could look like:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "description": "A person",
+ "type": "object",
+
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "age": {
+ "type": "number",
+ "divisibleBy": 1,
+ "minimum": 0,
+ "maximum": 125
+ }
+ }
+}
+]]>
+ </artwork>
+ </figure>
+
+ <t>
+ A JSON Schema object MAY have any of the following optional properties:
+ </t>
+
+ <!-- TODO: Break attributes up into type sections -->
+ <!-- TODO: Add examples for (almost) every attribute -->
+
+ <section title="type" anchor="type">
+ <t>
+ This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
+ This attribute can take one of two forms:
+
+ <list style="hanging">
+ <t hangText="Simple Types">
+ A string indicating a primitive or simple type. The string MUST be one of the following values:
+
+ <list style="hanging">
+ <t hangText="object">Instance MUST be an object.</t>
+ <t hangText="array">Instance MUST be an array.</t>
+ <t hangText="string">Instance MUST be a string.</t>
+ <t hangText="number">Instance MUST be a number, including floating point numbers.</t>
+ <t hangText="boolean">Instance MUST be the JSON literal "true" or "false".</t>
+ <t hangText="null">Instance MUST be the JSON literal "null". Note that without this type, null values are not allowed.</t>
+ <t hangText="any">Instance MAY be of any type, including null.</t>
+ </list>
+ </t>
+
+ <t hangText="Union Types">
+ An array of one or more simple or schema types.
+ The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array.
+ </t>
+ </list>
+
+ If this attribute is not specified, then all value types are accepted.
+ </t>
+
+ <figure>
+ <preamble>For example, a schema that defines if an instance can be a string or a number would be:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "type": ["string", "number"]
+}
+]]></artwork>
+ </figure>
+ </section>
+
+ <section title="properties" anchor="properties">
+ <t>
+ This attribute is an object with properties that specify the schemas for the properties of the instance object.
+ In this attribute's object, each property value MUST be a schema.
+ When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute.
+ Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success.
+ </t>
+ </section>
+
+ <section title="patternProperties" anchor="patternProperties">
+ <t>
+ This attribute is an object that defines the schema for a set of property names of an object instance.
+ The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema.
+ If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.
+ </t>
+ </section>
+
+ <section title="additionalProperties" anchor="additionalProperties">
+ <t>This attribute specifies how any instance property that is not explicitly defined by either the <xref target="properties">"properties"</xref> or <xref target="patternProperties">"patternProperties"</xref> attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean.</t>
+ <t>If a schema is provided, then all additional properties MUST be valid according to the schema.</t>
+ <t>If false is provided, then no additional properties are allowed.</t>
+ <t>The default value is an empty schema, which allows any value for additional properties.</t>
+ </section>
+
+ <section title="items" anchor="items">
+ <t>This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas.</t>
+ <t>When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.</t>
+ <t>When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the <xref target="additionalItems">"additionalItems"</xref> attribute the same way as <xref target="additionalProperties">"additionalProperties"</xref> for objects is.</t>
+ </section>
+
+ <section title="additionalItems" anchor="additionalItems">
+ <t>This attribute specifies how any item in the array instance that is not explicitly defined by <xref target="items">"items"</xref> (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean.</t>
+ <t>If a schema is provided:
+ <list>
+ <t>If the <xref target="items">"items"</xref> attribute is unspecified, then all items in the array instance must be valid against this schema.</t>
+ <t>If the <xref target="items">"items"</xref> attribute is a schema, then this attribute is ignored.</t>
+ <t>If the <xref target="items">"items"</xref> attribute is an array (during tuple typing), then any additional items MUST be valid against this schema.</t>
+ </list>
+ </t>
+ <t>If false is provided, then any additional items in the array are not allowed.</t>
+ <t>The default value is an empty schema, which allows any value for additional items.</t>
+ </section>
+
+ <section title="required" anchor="required">
+ <t>This attribute is an array of strings that defines all the property names that must exist on the object instance.</t>
+ </section>
+
+ <section title="dependencies" anchor="dependencies">
+ <t>This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value").</t>
+ <t>
+ The dependency value can take one of two forms:
+
+ <list style="hanging">
+ <t hangText="Simple Dependency">
+ If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value.
+ If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array.
+ </t>
+ <t hangText="Schema Dependency">
+ If the dependency value is a schema, then the instance object MUST be valid against the schema.
+ </t>
+ </list>
+ </t>
+ </section>
+
+ <section title="minimum" anchor="minimum">
+ <t>This attribute defines the minimum value of the instance property when the type of the instance value is a number.</t>
+ </section>
+
+ <section title="maximum" anchor="maximum">
+ <t>This attribute defines the maximum value of the instance property when the type of the instance value is a number.</t>
+ </section>
+
+ <section title="exclusiveMinimum" anchor="exclusiveMinimum">
+ <t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.</t>
+ </section>
+
+ <section title="exclusiveMaximum" anchor="exclusiveMaximum">
+ <t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.</t>
+ </section>
+
+ <section title="minItems" anchor="minItems">
+ <t>This attribute defines the minimum number of values in an array when the array is the instance value.</t>
+ </section>
+
+ <section title="maxItems" anchor="maxItems">
+ <t>This attribute defines the maximum number of values in an array when the array is the instance value.</t>
+ </section>
+
+ <section title="minProperties" anchor="minProperties">
+ <t>This attribute defines the minimum number of properties required on an object instance.</t>
+ </section>
+
+ <section title="maxProperties" anchor="maxProperties">
+ <t>This attribute defines the maximum number of properties the object instance can have.</t>
+ </section>
+
+ <section title="uniqueItems" anchor="uniqueItems">
+ <t>This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).</t>
+ <t>
+ Two instance are consider equal if they are both of the same type and:
+
+ <list>
+ <t>are null; or</t>
+ <t>are booleans/numbers/strings and have the same value; or</t>
+ <t>are arrays, contains the same number of items, and each item in the array is equal to the item at the corresponding index in the other array; or</t>
+ <t>are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object.</t>
+ </list>
+ </t>
+ </section>
+
+ <section title="pattern" anchor="pattern">
+ <t>When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5</t>
+ </section>
+
+ <section title="minLength" anchor="minLength">
+ <t>When the instance value is a string, this defines the minimum length of the string.</t>
+ </section>
+
+ <section title="maxLength" anchor="maxLength">
+ <t>When the instance value is a string, this defines the maximum length of the string.</t>
+ </section>
+
+ <section title="enum" anchor="enum">
+ <t>This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in <xref target="uniqueItems">"uniqueItems"</xref>.</t>
+ </section>
+
+ <section title="default" anchor="default">
+ <t>This attribute defines the default value of the instance when the instance is undefined.</t>
+ </section>
+
+ <section title="title" anchor="title">
+ <t>This attribute is a string that provides a short description of the instance property.</t>
+ </section>
+
+ <section title="description" anchor="description">
+ <t>This attribute is a string that provides a full description of the of purpose the instance property.</t>
+ </section>
+
+ <section title="divisibleBy" anchor="divisibleBy">
+ <t>This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.</t>
+ </section>
+
+ <section title="disallow" anchor="disallow">
+ <t>This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.</t>
+ </section>
+
+ <section title="extends" anchor="extends">
+ <t>The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.</t>
+ <t>
+ Conceptually, the behavior of extends can be seen as validating an
+ instance against all constraints in the extending schema as well as
+ the extended schema(s). More optimized implementations that merge
+ schemas are possible, but are not required. Some examples of using "extends":
+
+ <figure>
+ <artwork>
+<![CDATA[
+{
+ "description": "An adult",
+ "properties": {
+ "age": {
+ "minimum": 21
+ }
+ },
+ "extends": {"$ref": "person"}
+}
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <artwork>
+<![CDATA[
+{
+ "description": "Extended schema",
+ "properties": {
+ "deprecated": {
+ "type": "boolean"
+ }
+ },
+ "extends": {"$ref": "http://json-schema.org/draft-04/schema"}
+}
+]]>
+ </artwork>
+ </figure>
+ </t>
+ </section>
+
+ <section title="id" anchor="id">
+ <t>
+ This attribute defines the current URI of this schema (this attribute is
+ effectively a "self" link). This URI MAY be relative or absolute. If
+ the URI is relative it is resolved against the current URI of the parent
+ schema it is contained in. If this schema is not contained in any
+ parent schema, the current URI of the parent schema is held to be the
+ URI under which this schema was addressed. If id is missing, the current URI of a schema is
+ defined to be that of the parent schema. The current URI of the schema
+ is also used to construct relative references such as for $ref.
+ </t>
+ </section>
+
+ <section title="$ref" anchor="ref">
+ <t>
+ This attribute defines a URI of a schema that contains the full representation of this schema.
+ When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
+ This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
+ </t>
+ </section>
+
+ <section title="$schema" anchor="schema">
+ <t>
+ This attribute defines a URI of a JSON Schema that is the schema of the current schema.
+ When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving <xref target="hyper-schema">Hyper Schema</xref><xref target="links">links</xref>.
+ </t>
+
+ <t>
+ A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
+ Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
+ </t>
+ </section>
+ </section>
+
+ <section title="Hyper Schema" anchor="hyper-schema">
+ <t>
+ The following attributes are specified in addition to those
+ attributes that already provided by the core schema with the specific
+ purpose of informing user agents of relations between resources based
+ on JSON data. Just as with JSON
+ schema attributes, all the attributes in hyper schemas are optional.
+ Therefore, an empty object is a valid (non-informative) schema, and
+ essentially describes plain JSON (no constraints on the structures).
+ Addition of attributes provides additive information for user agents.
+ </t>
+
+ <section title="links" anchor="links">
+ <t>
+ The value of the links property MUST be an array, where each item
+ in the array is a link description object which describes the link
+ relations of the instances.
+ </t>
+
+ <!-- TODO: Needs more clarification and examples -->
+
+ <section title="Link Description Object">
+ <t>
+ A link description object is used to describe link relations. In
+ the context of a schema, it defines the link relations of the
+ instances of the schema, and can be parameterized by the instance
+ values. The link description format can be used without JSON Schema,
+ and use of this format can
+ be declared by referencing the normative link description
+ schema as the the schema for the data structure that uses the
+ links. The URI of the normative link description schema is:
+ <eref target="http://json-schema.org/links">http://json-schema.org/links</eref> (latest version) or
+ <eref target="http://json-schema.org/draft-04/links">http://json-schema.org/draft-04/links</eref> (draft-04 version).
+ </t>
+
+ <section title="href" anchor="href">
+ <t>
+ The value of the "href" link description property
+ indicates the target URI of the related resource. The value
+ of the instance property SHOULD be resolved as a URI-Reference per <xref target="RFC3986">RFC 3986</xref>
+ and MAY be a relative URI. The base URI to be used for relative resolution
+ SHOULD be the URI used to retrieve the instance object (not the schema)
+ when used within a schema. Also, when links are used within a schema, the URI
+ SHOULD be parametrized by the property values of the instance
+ object, if property values exist for the corresponding variables
+ in the template (otherwise they MAY be provided from alternate sources, like user input).
+ </t>
+
+ <t>
+ Instance property values SHOULD be substituted into the URIs where
+ matching braces ('{', '}') are found surrounding zero or more characters,
+ creating an expanded URI. Instance property value substitutions are resolved
+ by using the text between the braces to denote the property name
+ from the instance to get the value to substitute.
+
+ <figure>
+ <preamble>For example, if an href value is defined:</preamble>
+ <artwork>
+<![CDATA[
+http://somesite.com/{id}
+]]>
+ </artwork>
+ <postamble>Then it would be resolved by replace the value of the "id" property value from the instance object.</postamble>
+ </figure>
+
+ <figure>
+ <preamble>If the value of the "id" property was "45", the expanded URI would be:</preamble>
+ <artwork>
+<![CDATA[
+http://somesite.com/45
+]]>
+ </artwork>
+ </figure>
+
+ If matching braces are found with the string "@" (no quotes) between the braces, then the
+ actual instance value SHOULD be used to replace the braces, rather than a property value.
+ This should only be used in situations where the instance is a scalar (string,
+ boolean, or number), and not for objects or arrays.
+ </t>
+ </section>
+
+ <section title="rel">
+ <t>
+ The value of the "rel" property indicates the name of the
+ relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation.
+ </t>
+
+ <t>
+ Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see <xref target="RFC4287">RFC 4287</xref>). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations:
+
+ <list style="hanging">
+ <t hangText="self">
+ If the relation value is "self", when this property is encountered in
+ the instance object, the object represents a resource and the instance object is
+ treated as a full representation of the target resource identified by
+ the specified URI.
+ </t>
+
+ <t hangText="full">
+ This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation.
+ </t>
+
+ <t hangText="describedby">
+ This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.
+ </t>
+
+ <t hangText="root">
+ This relation indicates that the target of the link
+ SHOULD be treated as the root or the body of the representation for the
+ purposes of user agent interaction or fragment resolution. All other
+ properties of the instance objects can be regarded as meta-data
+ descriptions for the data.
+ </t>
+ </list>
+ </t>
+
+ <t>
+ The following relations are applicable for schemas (the schema as the "from" resource in the relation):
+
+ <list style="hanging">
+ <t hangText="instances">This indicates the target resource that represents collection of instances of a schema.</t>
+ <t hangText="create">This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST).</t>
+ </list>
+ </t>
+
+ <t>
+ <figure>
+ <preamble>For example, if a schema is defined:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "links": [{
+ "rel": "self",
+ "href": "{id}"
+ }, {
+ "rel": "up",
+ "href": "{upId}"
+ }, {
+ "rel": "children",
+ "href": "?upId={id}"
+ }]
+}
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <preamble>And if a collection of instance resource's JSON representation was retrieved:</preamble>
+ <artwork>
+<![CDATA[
+GET /Resource/
+
+[{
+ "id": "thing",
+ "upId": "parent"
+}, {
+ "id": "thing2",
+ "upId": "parent"
+}]
+]]>
+ </artwork>
+ </figure>
+
+ This would indicate that for the first item in the collection, its own
+ (self) URI would resolve to "/Resource/thing" and the first item's "up"
+ relation SHOULD be resolved to the resource at "/Resource/parent".
+ The "children" collection would be located at "/Resource/?upId=thing".
+ </t>
+ </section>
+
+ <section title="template">
+ <t>This property value is a string that defines the templating language used in the <xref target="href">"href"</xref> attribute. If no templating language is defined, then the default <xref target="href">Link Description Object templating langauge</xref> is used.</t>
+ </section>
+
+ <section title="targetSchema">
+ <t>This property value is a schema that defines the expected structure of the JSON representation of the target of the link.</t>
+ </section>
+
+ <section title="Submission Link Properties">
+ <t>
+ The following properties also apply to link definition objects, and
+ provide functionality analogous to HTML forms, in providing a
+ means for submitting extra (often user supplied) information to send to a server.
+ </t>
+
+ <section title="method">
+ <t>
+ This attribute defines which method can be used to access the target resource.
+ In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
+ such as "PUT" and "DELETE" have semantics that are clearly implied by
+ accessed resources, and do not need to be defined here).
+ This defaults to "GET".
+ </t>
+ </section>
+
+ <section title="enctype">
+ <t>
+ If present, this property indicates a query media type format that the server
+ supports for querying or posting to the collection of instances at the target
+ resource. The query can be
+ suffixed to the target URI to query the collection with
+ property-based constraints on the resources that SHOULD be returned from
+ the server or used to post data to the resource (depending on the method).
+
+ <figure>
+ <preamble>For example, with the following schema:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "links": [{
+ "enctype": "application/x-www-form-urlencoded",
+ "method": "GET",
+ "href": "/Product/",
+ "properties": {
+ "name": {
+ "description": "name of the product"
+ }
+ }
+ }]
+}
+]]>
+ </artwork>
+ <postamble>This indicates that the client can query the server for instances that have a specific name.</postamble>
+ </figure>
+
+ <figure>
+ <preamble>For example:</preamble>
+ <artwork>
+<![CDATA[
+/Product/?name=Slinky
+]]>
+ </artwork>
+ </figure>
+
+ If no enctype or method is specified, only the single URI specified by
+ the href property is defined. If the method is POST, "application/json" is
+ the default media type.
+ </t>
+ </section>
+
+ <section title="schema">
+ <t>
+ This attribute contains a schema which defines the acceptable structure of the submitted
+ request (for a GET request, this schema would define the properties for the query string
+ and for a POST request, this would define the body).
+ </t>
+ </section>
+ </section>
+ </section>
+ </section>
+
+ <section title="fragmentResolution">
+ <t>
+ This property indicates the fragment resolution protocol to use for
+ resolving fragment identifiers in URIs within the instance
+ representations. This applies to the instance object URIs and all
+ children of the instance object's URIs. The default fragment resolution
+ protocol is "json-pointer", which is defined below. Other fragment
+ resolution protocols MAY be used, but are not defined in this document.
+ </t>
+
+ <t>
+ The fragment identifier is based on <xref target="RFC3986">RFC 3986, Sec 5</xref>, and defines the
+ mechanism for resolving references to entities within a document.
+ </t>
+
+ <section title="json-pointer fragment resolution">
+ <t>The "json-pointer" fragment resolution protocol uses a <xref target="json-pointer">JSON Pointer</xref> to resolve fragment identifiers in URIs within instance representations.</t>
+ </section>
+ </section>
+
+ <!-- TODO: Remove this? -->
+
+ <section title="readonly">
+ <t>This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.</t>
+ </section>
+
+ <section title="contentEncoding">
+ <t>If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. <xref target="RFC2045">RFC 2045, Sec 6.1</xref> lists the possible values for this property.</t>
+ </section>
+
+ <section title="pathStart">
+ <t>
+ This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
+ The value of the "pathStart" attribute MUST be resolved as per <xref target="RFC3986">RFC 3986, Sec 5</xref>,
+ and is relative to the instance's URI.
+ </t>
+
+ <t>
+ When multiple schemas have been referenced for an instance, the user agent
+ can determine if this schema is applicable for a particular instance by
+ determining if the URI of the instance begins with the the value of the "pathStart"
+ attribute. If the URI of the instance does not start with this URI,
+ or if another schema specifies a starting URI that is longer and also matches the
+ instance, this schema SHOULD NOT be applied to the instance. Any schema
+ that does not have a pathStart attribute SHOULD be considered applicable
+ to all the instances for which it is referenced.
+ </t>
+ </section>
+
+ <section title="mediaType">
+ <t>This attribute defines the media type of the instance representations that this schema is defining.</t>
+ </section>
+ </section>
+
+ <section title="Security Considerations">
+ <t>
+ This specification is a sub-type of the JSON format, and
+ consequently the security considerations are generally the same as <xref target="RFC4627">RFC 4627</xref>.
+ However, an additional issue is that when link relation of "self"
+ is used to denote a full representation of an object, the user agent
+ SHOULD NOT consider the representation to be the authoritative representation
+ of the resource denoted by the target URI if the target URI is not
+ equivalent to or a sub-path of the the URI used to request the resource
+ representation which contains the target URI with the "self" link.
+
+ <figure>
+ <preamble>For example, if a hyper schema was defined:</preamble>
+ <artwork>
+<![CDATA[
+{
+ "links": [{
+ "rel": "self",
+ "href": "{id}"
+ }]
+}
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <preamble>And a resource was requested from somesite.com:</preamble>
+ <artwork>
+<![CDATA[
+GET /foo/
+]]>
+ </artwork>
+ </figure>
+
+ <figure>
+ <preamble>With a response of:</preamble>
+ <artwork>
+<![CDATA[
+Content-Type: application/json; profile=/schema-for-this-data
+
+[{
+ "id": "bar",
+ "name": "This representation can be safely treated \
+ as authoritative "
+}, {
+ "id": "/baz",
+ "name": "This representation should not be treated as \
+ authoritative the user agent should make request the resource\
+ from '/baz' to ensure it has the authoritative representation"
+}, {
+ "id": "http://othersite.com/something",
+ "name": "This representation\
+ should also not be treated as authoritative and the target\
+ resource representation should be retrieved for the\
+ authoritative representation"
+}]
+]]>
+ </artwork>
+ </figure>
+ </t>
+ </section>
+
+ <section title="IANA Considerations">
+ <t>The proposed MIME media type for JSON Schema is "application/schema+json".</t>
+ <t>Type name: application</t>
+ <t>Subtype name: schema+json</t>
+ <t>Required parameters: profile</t>
+ <t>
+ The value of the profile parameter SHOULD be a URI (relative or absolute) that
+ refers to the schema used to define the structure of this structure (the
+ meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema,
+ but it is allowable to use other schemas that extend the hyper schema's meta-
+ schema.
+ </t>
+ <t>Optional parameters: pretty</t>
+ <t>The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read.</t>
+
+ <section title="Registry of Link Relations">
+ <t>
+ This registry is maintained by IANA per <xref target="RFC4287">RFC 4287</xref> and this specification adds
+ four values: "full", "create", "instances", "root". New
+ assignments are subject to IESG Approval, as outlined in <xref target="RFC5226">RFC 5226</xref>.
+ Requests should be made by email to IANA, which will then forward the
+ request to the IESG, requesting approval.
+ </t>
+ </section>
+ </section>
+ </middle>
+
+ <back>
+ <!-- References Section -->
+ <references title="Normative References">
+ &rfc2045;
+ &rfc2119;
+ &rfc3339;
+ &rfc3986;
+ &rfc4287;
+ <reference anchor="json-pointer" target="http://tools.ietf.org/html/draft-pbryan-zyp-json-pointer-02">
+ <front>
+ <title>JSON Pointer</title>
+ <author initials="P." surname="Bryan">
+ <organization>ForgeRock US, Inc.</organization>
+ </author>
+ <author initials="K." surname="Zyp">
+ <organization>SitePen (USA)</organization>
+ </author>
+ <date year="2011" month="October" />
+ </front>
+ </reference>
+ </references>
+ <references title="Informative References">
+ &rfc2616;
+ &rfc4627;
+ &rfc5226;
+ &iddiscovery;
+ &uritemplate;
+ &linkheader;
+ &html401;
+ &css21;
+ </references>
+
+ <section title="Change Log">
+ <t>
+ <list style="hanging">
+ <t hangText="draft-04">
+ <list style="symbols">
+ <t>Changed "required" attribute to an array of strings.</t>
+ <t>Removed "format" attribute.</t>
+ <t>Added "minProperties" and "maxProperties" attributes.</t>
+ <t>Replaced "slash-delimited" fragment resolution with "json-pointer".</t>
+ <t>Added "template" LDO attribute.</t>
+ <t>Removed irrelevant "Open Issues" section.</t>
+ <t>Merged Conventions and Terminology sections.</t>
+ <t>Defined terms used in specification.</t>
+ <t>Removed "integer" type in favor of {"type":"number", "divisibleBy":1}.</t>
+ <t>Restricted "type" to only the core JSON types.</t>
+ <t>Improved wording of many sections.</t>
+ </list>
+ </t>
+
+ <t hangText="draft-03">
+ <list style="symbols">
+ <t>Added example and verbiage to "extends" attribute.</t>
+ <t>Defined slash-delimited to use a leading slash.</t>
+ <t>Made "root" a relation instead of an attribute.</t>
+ <t>Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types).</t>
+ <t>Added more explanation of nullability.</t>
+ <t>Removed "alternate" attribute.</t>
+ <t>Upper cased many normative usages of must, may, and should.</t>
+ <t>Replaced the link submission "properties" attribute to "schema" attribute.</t>
+ <t>Replaced "optional" attribute with "required" attribute.</t>
+ <t>Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute.</t>
+ <t>Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute.</t>
+ <t>Replaced "requires" attribute with "dependencies" attribute.</t>
+ <t>Moved "contentEncoding" attribute to hyper schema.</t>
+ <t>Added "additionalItems" attribute.</t>
+ <t>Added "id" attribute.</t>
+ <t>Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template.</t>
+ <t>Added "patternProperties" attribute.</t>
+ <t>Schema URIs are now namespace versioned.</t>
+ <t>Added "$ref" and "$schema" attributes.</t>
+ </list>
+ </t>
+
+ <t hangText="draft-02">
+ <list style="symbols">
+ <t>Replaced "maxDecimal" attribute with "divisibleBy" attribute.</t>
+ <t>Added slash-delimited fragment resolution protocol and made it the default.</t>
+ <t>Added language about using links outside of schemas by referencing its normative URI.</t>
+ <t>Added "uniqueItems" attribute.</t>
+ <t>Added "targetSchema" attribute to link description object.</t>
+ </list>
+ </t>
+
+ <t hangText="draft-01">
+ <list style="symbols">
+ <t>Fixed category and updates from template.</t>
+ </list>
+ </t>
+
+ <t hangText="draft-00">
+ <list style="symbols">
+ <t>Initial draft.</t>
+ </list>
+ </t>
+ </list>
+ </t>
+ </section>
+ </back>
+</rfc>
diff --git a/node_modules/json-schema/lib/links.js b/node_modules/json-schema/lib/links.js
new file mode 100644
index 0000000..8a87f02
--- /dev/null
+++ b/node_modules/json-schema/lib/links.js
@@ -0,0 +1,66 @@
+/**
+ * JSON Schema link handler
+ * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
+ * Licensed under the MIT (MIT-LICENSE.txt) license.
+ */
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define([], function () {
+ return factory();
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals
+ root.jsonSchemaLinks = factory();
+ }
+}(this, function () {// setup primitive classes to be JSON Schema types
+var exports = {};
+exports.cacheLinks = true;
+exports.getLink = function(relation, instance, schema){
+ // gets the URI of the link for the given relation based on the instance and schema
+ // for example:
+ // getLink(
+ // "brother",
+ // {"brother_id":33},
+ // {links:[{rel:"brother", href:"Brother/{brother_id}"}]}) ->
+ // "Brother/33"
+ var links = schema.__linkTemplates;
+ if(!links){
+ links = {};
+ var schemaLinks = schema.links;
+ if(schemaLinks && schemaLinks instanceof Array){
+ schemaLinks.forEach(function(link){
+ /* // TODO: allow for multiple same-name relations
+ if(links[link.rel]){
+ if(!(links[link.rel] instanceof Array)){
+ links[link.rel] = [links[link.rel]];
+ }
+ }*/
+ links[link.rel] = link.href;
+ });
+ }
+ if(exports.cacheLinks){
+ schema.__linkTemplates = links;
+ }
+ }
+ var linkTemplate = links[relation];
+ return linkTemplate && exports.substitute(linkTemplate, instance);
+};
+
+exports.substitute = function(linkTemplate, instance){
+ return linkTemplate.replace(/\{([^\}]*)\}/g, function(t, property){
+ var value = instance[decodeURIComponent(property)];
+ if(value instanceof Array){
+ // the value is an array, it should produce a URI like /Table/(4,5,8) and store.get() should handle that as an array of values
+ return '(' + value.join(',') + ')';
+ }
+ return value;
+ });
+};
+return exports;
+})); \ No newline at end of file
diff --git a/node_modules/json-schema/lib/validate.js b/node_modules/json-schema/lib/validate.js
new file mode 100644
index 0000000..e4dc151
--- /dev/null
+++ b/node_modules/json-schema/lib/validate.js
@@ -0,0 +1,273 @@
+/**
+ * JSONSchema Validator - Validates JavaScript objects using JSON Schemas
+ * (http://www.json.com/json-schema-proposal/)
+ *
+ * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
+ * Licensed under the MIT (MIT-LICENSE.txt) license.
+To use the validator call the validate function with an instance object and an optional schema object.
+If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
+that schema will be used to validate and the schema parameter is not necessary (if both exist,
+both validations will occur).
+The validate method will return an array of validation errors. If there are no errors, then an
+empty list will be returned. A validation error will have two properties:
+"property" which indicates which property had the error
+"message" which indicates what the error was
+ */
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define([], function () {
+ return factory();
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ // Browser globals
+ root.jsonSchema = factory();
+ }
+}(this, function () {// setup primitive classes to be JSON Schema types
+var exports = validate
+exports.Integer = {type:"integer"};
+var primitiveConstructors = {
+ String: String,
+ Boolean: Boolean,
+ Number: Number,
+ Object: Object,
+ Array: Array,
+ Date: Date
+}
+exports.validate = validate;
+function validate(/*Any*/instance,/*Object*/schema) {
+ // Summary:
+ // To use the validator call JSONSchema.validate with an instance object and an optional schema object.
+ // If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
+ // that schema will be used to validate and the schema parameter is not necessary (if both exist,
+ // both validations will occur).
+ // The validate method will return an object with two properties:
+ // valid: A boolean indicating if the instance is valid by the schema
+ // errors: An array of validation errors. If there are no errors, then an
+ // empty list will be returned. A validation error will have two properties:
+ // property: which indicates which property had the error
+ // message: which indicates what the error was
+ //
+ return validate(instance, schema, {changing: false});//, coerce: false, existingOnly: false});
+ };
+exports.checkPropertyChange = function(/*Any*/value,/*Object*/schema, /*String*/property) {
+ // Summary:
+ // The checkPropertyChange method will check to see if an value can legally be in property with the given schema
+ // This is slightly different than the validate method in that it will fail if the schema is readonly and it will
+ // not check for self-validation, it is assumed that the passed in value is already internally valid.
+ // The checkPropertyChange method will return the same object type as validate, see JSONSchema.validate for
+ // information.
+ //
+ return validate(value, schema, {changing: property || "property"});
+ };
+var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*Object*/options) {
+
+ if (!options) options = {};
+ var _changing = options.changing;
+
+ function getType(schema){
+ return schema.type || (primitiveConstructors[schema.name] == schema && schema.name.toLowerCase());
+ }
+ var errors = [];
+ // validate a value against a property definition
+ function checkProp(value, schema, path,i){
+
+ var l;
+ path += path ? typeof i == 'number' ? '[' + i + ']' : typeof i == 'undefined' ? '' : '.' + i : i;
+ function addError(message){
+ errors.push({property:path,message:message});
+ }
+
+ if((typeof schema != 'object' || schema instanceof Array) && (path || typeof schema != 'function') && !(schema && getType(schema))){
+ if(typeof schema == 'function'){
+ if(!(value instanceof schema)){
+ addError("is not an instance of the class/constructor " + schema.name);
+ }
+ }else if(schema){
+ addError("Invalid schema/property definition " + schema);
+ }
+ return null;
+ }
+ if(_changing && schema.readonly){
+ addError("is a readonly field, it can not be changed");
+ }
+ if(schema['extends']){ // if it extends another schema, it must pass that schema as well
+ checkProp(value,schema['extends'],path,i);
+ }
+ // validate a value against a type definition
+ function checkType(type,value){
+ if(type){
+ if(typeof type == 'string' && type != 'any' &&
+ (type == 'null' ? value !== null : typeof value != type) &&
+ !(value instanceof Array && type == 'array') &&
+ !(value instanceof Date && type == 'date') &&
+ !(type == 'integer' && value%1===0)){
+ return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}];
+ }
+ if(type instanceof Array){
+ var unionErrors=[];
+ for(var j = 0; j < type.length; j++){ // a union type
+ if(!(unionErrors=checkType(type[j],value)).length){
+ break;
+ }
+ }
+ if(unionErrors.length){
+ return unionErrors;
+ }
+ }else if(typeof type == 'object'){
+ var priorErrors = errors;
+ errors = [];
+ checkProp(value,type,path);
+ var theseErrors = errors;
+ errors = priorErrors;
+ return theseErrors;
+ }
+ }
+ return [];
+ }
+ if(value === undefined){
+ if(schema.required){
+ addError("is missing and it is required");
+ }
+ }else{
+ errors = errors.concat(checkType(getType(schema),value));
+ if(schema.disallow && !checkType(schema.disallow,value).length){
+ addError(" disallowed value was matched");
+ }
+ if(value !== null){
+ if(value instanceof Array){
+ if(schema.items){
+ var itemsIsArray = schema.items instanceof Array;
+ var propDef = schema.items;
+ for (i = 0, l = value.length; i < l; i += 1) {
+ if (itemsIsArray)
+ propDef = schema.items[i];
+ if (options.coerce)
+ value[i] = options.coerce(value[i], propDef);
+ errors.concat(checkProp(value[i],propDef,path,i));
+ }
+ }
+ if(schema.minItems && value.length < schema.minItems){
+ addError("There must be a minimum of " + schema.minItems + " in the array");
+ }
+ if(schema.maxItems && value.length > schema.maxItems){
+ addError("There must be a maximum of " + schema.maxItems + " in the array");
+ }
+ }else if(schema.properties || schema.additionalProperties){
+ errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties));
+ }
+ if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){
+ addError("does not match the regex pattern " + schema.pattern);
+ }
+ if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){
+ addError("may only be " + schema.maxLength + " characters long");
+ }
+ if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){
+ addError("must be at least " + schema.minLength + " characters long");
+ }
+ if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum &&
+ schema.minimum > value){
+ addError("must have a minimum value of " + schema.minimum);
+ }
+ if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum &&
+ schema.maximum < value){
+ addError("must have a maximum value of " + schema.maximum);
+ }
+ if(schema['enum']){
+ var enumer = schema['enum'];
+ l = enumer.length;
+ var found;
+ for(var j = 0; j < l; j++){
+ if(enumer[j]===value){
+ found=1;
+ break;
+ }
+ }
+ if(!found){
+ addError("does not have a value in the enumeration " + enumer.join(", "));
+ }
+ }
+ if(typeof schema.maxDecimal == 'number' &&
+ (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){
+ addError("may only have " + schema.maxDecimal + " digits of decimal places");
+ }
+ }
+ }
+ return null;
+ }
+ // validate an object against a schema
+ function checkObj(instance,objTypeDef,path,additionalProp){
+
+ if(typeof objTypeDef =='object'){
+ if(typeof instance != 'object' || instance instanceof Array){
+ errors.push({property:path,message:"an object is required"});
+ }
+
+ for(var i in objTypeDef){
+ if(objTypeDef.hasOwnProperty(i)){
+ var value = instance[i];
+ // skip _not_ specified properties
+ if (value === undefined && options.existingOnly) continue;
+ var propDef = objTypeDef[i];
+ // set default
+ if(value === undefined && propDef["default"]){
+ value = instance[i] = propDef["default"];
+ }
+ if(options.coerce && i in instance){
+ value = instance[i] = options.coerce(value, propDef);
+ }
+ checkProp(value,propDef,path,i);
+ }
+ }
+ }
+ for(i in instance){
+ if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){
+ if (options.filter) {
+ delete instance[i];
+ continue;
+ } else {
+ errors.push({property:path,message:(typeof value) + "The property " + i +
+ " is not defined in the schema and the schema does not allow additional properties"});
+ }
+ }
+ var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires;
+ if(requires && !(requires in instance)){
+ errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"});
+ }
+ value = instance[i];
+ if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){
+ if(options.coerce){
+ value = instance[i] = options.coerce(value, additionalProp);
+ }
+ checkProp(value,additionalProp,path,i);
+ }
+ if(!_changing && value && value.$schema){
+ errors = errors.concat(checkProp(value,value.$schema,path,i));
+ }
+ }
+ return errors;
+ }
+ if(schema){
+ checkProp(instance,schema,'',_changing || '');
+ }
+ if(!_changing && instance && instance.$schema){
+ checkProp(instance,instance.$schema,'','');
+ }
+ return {valid:!errors.length,errors:errors};
+};
+exports.mustBeValid = function(result){
+ // summary:
+ // This checks to ensure that the result is valid and will throw an appropriate error message if it is not
+ // result: the result returned from checkPropertyChange or validate
+ if(!result.valid){
+ throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n"));
+ }
+}
+
+return exports;
+}));
diff --git a/node_modules/json-schema/package.json b/node_modules/json-schema/package.json
new file mode 100644
index 0000000..b9b7bac
--- /dev/null
+++ b/node_modules/json-schema/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "json-schema",
+ "version": "0.2.3",
+ "author": "Kris Zyp",
+ "description": "JSON Schema validation and specifications",
+ "maintainers":[
+ {"name": "Kris Zyp", "email": "kriszyp@gmail.com"}],
+ "keywords": [
+ "json",
+ "schema"
+ ],
+ "licenses": [
+ {
+ "type": "AFLv2.1",
+ "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43"
+ },
+ {
+ "type": "BSD",
+ "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13"
+ }
+ ],
+ "repository": {
+ "type":"git",
+ "url":"http://github.com/kriszyp/json-schema"
+ },
+ "directories": { "lib": "./lib" },
+ "main": "./lib/validate.js",
+ "devDependencies": { "vows": "*" },
+ "scripts": { "test": "echo TESTS DISABLED vows --spec test/*.js" }
+}
+
diff --git a/node_modules/json-schema/test/tests.js b/node_modules/json-schema/test/tests.js
new file mode 100644
index 0000000..2938aea
--- /dev/null
+++ b/node_modules/json-schema/test/tests.js
@@ -0,0 +1,95 @@
+var assert = require('assert');
+var vows = require('vows');
+var path = require('path');
+var fs = require('fs');
+
+var validate = require('../lib/validate').validate;
+
+
+var revision = 'draft-03';
+var schemaRoot = path.join(__dirname, '..', revision);
+var schemaNames = ['schema', 'hyper-schema', 'links', 'json-ref' ];
+var schemas = {};
+
+schemaNames.forEach(function(name) {
+ var file = path.join(schemaRoot, name);
+ schemas[name] = loadSchema(file);
+});
+
+schemaNames.forEach(function(name) {
+ var s, n = name+'-nsd', f = path.join(schemaRoot, name);
+ schemas[n] = loadSchema(f);
+ s = schemas[n];
+ delete s['$schema'];
+});
+
+function loadSchema(path) {
+ var data = fs.readFileSync(path, 'utf-8');
+ var schema = JSON.parse(data);
+ return schema;
+}
+
+function resultIsValid() {
+ return function(result) {
+ assert.isObject(result);
+ //assert.isBoolean(result.valid);
+ assert.equal(typeof(result.valid), 'boolean');
+ assert.isArray(result.errors);
+ for (var i = 0; i < result.errors.length; i++) {
+ assert.notEqual(result.errors[i], null, 'errors['+i+'] is null');
+ }
+ }
+}
+
+function assertValidates(doc, schema) {
+ var context = {};
+
+ context[': validate('+doc+', '+schema+')'] = {
+ topic: validate(schemas[doc], schemas[schema]),
+ 'returns valid result': resultIsValid(),
+ 'with valid=true': function(result) { assert.equal(result.valid, true); },
+ 'and no errors': function(result) {
+ // XXX work-around for bug in vows: [null] chokes it
+ if (result.errors[0] == null) assert.fail('(errors contains null)');
+ assert.length(result.errors, 0);
+ }
+ };
+
+ return context;
+}
+
+function assertSelfValidates(doc) {
+ var context = {};
+
+ context[': validate('+doc+')'] = {
+ topic: validate(schemas[doc]),
+ 'returns valid result': resultIsValid(),
+ 'with valid=true': function(result) { assert.equal(result.valid, true); },
+ 'and no errors': function(result) { assert.length(result.errors, 0); }
+ };
+
+ return context;
+}
+
+var suite = vows.describe('JSON Schema').addBatch({
+ 'Core-NSD self-validates': assertSelfValidates('schema-nsd'),
+ 'Core-NSD/Core-NSD': assertValidates('schema-nsd', 'schema-nsd'),
+ 'Core-NSD/Core': assertValidates('schema-nsd', 'schema'),
+
+ 'Core self-validates': assertSelfValidates('schema'),
+ 'Core/Core': assertValidates('schema', 'schema'),
+
+ 'Hyper-NSD self-validates': assertSelfValidates('hyper-schema-nsd'),
+ 'Hyper self-validates': assertSelfValidates('hyper-schema'),
+ 'Hyper/Hyper': assertValidates('hyper-schema', 'hyper-schema'),
+ 'Hyper/Core': assertValidates('hyper-schema', 'schema'),
+
+ 'Links-NSD self-validates': assertSelfValidates('links-nsd'),
+ 'Links self-validates': assertSelfValidates('links'),
+ 'Links/Hyper': assertValidates('links', 'hyper-schema'),
+ 'Links/Core': assertValidates('links', 'schema'),
+
+ 'Json-Ref self-validates': assertSelfValidates('json-ref'),
+ 'Json-Ref/Hyper': assertValidates('json-ref', 'hyper-schema'),
+ 'Json-Ref/Core': assertValidates('json-ref', 'schema')
+}).export(module);
diff --git a/node_modules/json-stringify-safe/.npmignore b/node_modules/json-stringify-safe/.npmignore
new file mode 100644
index 0000000..17d6b36
--- /dev/null
+++ b/node_modules/json-stringify-safe/.npmignore
@@ -0,0 +1 @@
+/*.tgz
diff --git a/node_modules/json-stringify-safe/CHANGELOG.md b/node_modules/json-stringify-safe/CHANGELOG.md
new file mode 100644
index 0000000..42bcb60
--- /dev/null
+++ b/node_modules/json-stringify-safe/CHANGELOG.md
@@ -0,0 +1,14 @@
+## Unreleased
+- Fixes stringify to only take ancestors into account when checking
+ circularity.
+ It previously assumed every visited object was circular which led to [false
+ positives][issue9].
+ Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago.
+- Fixes calling the `replacer` function in the proper context (`thisArg`).
+- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`).
+- Speeds serializing by a factor of
+ Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching
+ only the ancestors for a circular references speeds up things considerably.
+
+[must]: https://github.com/moll/js-must
+[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9
diff --git a/node_modules/json-stringify-safe/LICENSE b/node_modules/json-stringify-safe/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/json-stringify-safe/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/json-stringify-safe/Makefile b/node_modules/json-stringify-safe/Makefile
new file mode 100644
index 0000000..36088c7
--- /dev/null
+++ b/node_modules/json-stringify-safe/Makefile
@@ -0,0 +1,35 @@
+NODE_OPTS =
+TEST_OPTS =
+
+love:
+ @echo "Feel like makin' love."
+
+test:
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS)
+
+spec:
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS)
+
+autotest:
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS)
+
+autospec:
+ @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS)
+
+pack:
+ @file=$$(npm pack); echo "$$file"; tar tf "$$file"
+
+publish:
+ npm publish
+
+tag:
+ git tag "v$$(node -e 'console.log(require("./package").version)')"
+
+clean:
+ rm -f *.tgz
+ npm prune --production
+
+.PHONY: love
+.PHONY: test spec autotest autospec
+.PHONY: pack publish tag
+.PHONY: clean
diff --git a/node_modules/json-stringify-safe/README.md b/node_modules/json-stringify-safe/README.md
new file mode 100644
index 0000000..a11f302
--- /dev/null
+++ b/node_modules/json-stringify-safe/README.md
@@ -0,0 +1,52 @@
+# json-stringify-safe
+
+Like JSON.stringify, but doesn't throw on circular references.
+
+## Usage
+
+Takes the same arguments as `JSON.stringify`.
+
+```javascript
+var stringify = require('json-stringify-safe');
+var circularObj = {};
+circularObj.circularRef = circularObj;
+circularObj.list = [ circularObj, circularObj ];
+console.log(stringify(circularObj, null, 2));
+```
+
+Output:
+
+```json
+{
+ "circularRef": "[Circular]",
+ "list": [
+ "[Circular]",
+ "[Circular]"
+ ]
+}
+```
+
+## Details
+
+```
+stringify(obj, serializer, indent, decycler)
+```
+
+The first three arguments are the same as to JSON.stringify. The last
+is an argument that's only used when the object has been seen already.
+
+The default `decycler` function returns the string `'[Circular]'`.
+If, for example, you pass in `function(k,v){}` (return nothing) then it
+will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,
+then cyclical objects will always be represented as `{"foo":"bar"}` in
+the result.
+
+```
+stringify.getSerialize(serializer, decycler)
+```
+
+Returns a serializer that can be used elsewhere. This is the actual
+function that's passed to JSON.stringify.
+
+**Note** that the function returned from `getSerialize` is stateful for now, so
+do **not** use it more than once.
diff --git a/node_modules/json-stringify-safe/package.json b/node_modules/json-stringify-safe/package.json
new file mode 100644
index 0000000..8e17b12
--- /dev/null
+++ b/node_modules/json-stringify-safe/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "json-stringify-safe",
+ "version": "5.0.1",
+ "description": "Like JSON.stringify, but doesn't blow up on circular refs.",
+ "keywords": [
+ "json",
+ "stringify",
+ "circular",
+ "safe"
+ ],
+ "homepage": "https://github.com/isaacs/json-stringify-safe",
+ "bugs": "https://github.com/isaacs/json-stringify-safe/issues",
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
+ "contributors": [
+ "Andri Möll <andri@dot.ee> (http://themoll.com)"
+ ],
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/json-stringify-safe"
+ },
+ "main": "stringify.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "devDependencies": {
+ "mocha": ">= 2.1.0 < 3",
+ "must": ">= 0.12 < 0.13",
+ "sinon": ">= 1.12.2 < 2"
+ }
+}
diff --git a/node_modules/json-stringify-safe/stringify.js b/node_modules/json-stringify-safe/stringify.js
new file mode 100644
index 0000000..124a452
--- /dev/null
+++ b/node_modules/json-stringify-safe/stringify.js
@@ -0,0 +1,27 @@
+exports = module.exports = stringify
+exports.getSerialize = serializer
+
+function stringify(obj, replacer, spaces, cycleReplacer) {
+ return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
+}
+
+function serializer(replacer, cycleReplacer) {
+ var stack = [], keys = []
+
+ if (cycleReplacer == null) cycleReplacer = function(key, value) {
+ if (stack[0] === value) return "[Circular ~]"
+ return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
+ }
+
+ return function(key, value) {
+ if (stack.length > 0) {
+ var thisPos = stack.indexOf(this)
+ ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
+ ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
+ if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
+ }
+ else stack.push(value)
+
+ return replacer == null ? value : replacer.call(this, key, value)
+ }
+}
diff --git a/node_modules/json-stringify-safe/test/mocha.opts b/node_modules/json-stringify-safe/test/mocha.opts
new file mode 100644
index 0000000..2544e58
--- /dev/null
+++ b/node_modules/json-stringify-safe/test/mocha.opts
@@ -0,0 +1,2 @@
+--recursive
+--require must
diff --git a/node_modules/json-stringify-safe/test/stringify_test.js b/node_modules/json-stringify-safe/test/stringify_test.js
new file mode 100644
index 0000000..5b32583
--- /dev/null
+++ b/node_modules/json-stringify-safe/test/stringify_test.js
@@ -0,0 +1,246 @@
+var Sinon = require("sinon")
+var stringify = require("..")
+function jsonify(obj) { return JSON.stringify(obj, null, 2) }
+
+describe("Stringify", function() {
+ it("must stringify circular objects", function() {
+ var obj = {name: "Alice"}
+ obj.self = obj
+ var json = stringify(obj, null, 2)
+ json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
+ })
+
+ it("must stringify circular objects with intermediaries", function() {
+ var obj = {name: "Alice"}
+ obj.identity = {self: obj}
+ var json = stringify(obj, null, 2)
+ json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}}))
+ })
+
+ it("must stringify circular objects deeper", function() {
+ var obj = {name: "Alice", child: {name: "Bob"}}
+ obj.child.self = obj.child
+
+ stringify(obj, null, 2).must.eql(jsonify({
+ name: "Alice",
+ child: {name: "Bob", self: "[Circular ~.child]"}
+ }))
+ })
+
+ it("must stringify circular objects deeper with intermediaries", function() {
+ var obj = {name: "Alice", child: {name: "Bob"}}
+ obj.child.identity = {self: obj.child}
+
+ stringify(obj, null, 2).must.eql(jsonify({
+ name: "Alice",
+ child: {name: "Bob", identity: {self: "[Circular ~.child]"}}
+ }))
+ })
+
+ it("must stringify circular objects in an array", function() {
+ var obj = {name: "Alice"}
+ obj.self = [obj, obj]
+
+ stringify(obj, null, 2).must.eql(jsonify({
+ name: "Alice", self: ["[Circular ~]", "[Circular ~]"]
+ }))
+ })
+
+ it("must stringify circular objects deeper in an array", function() {
+ var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]}
+ obj.children[0].self = obj.children[0]
+ obj.children[1].self = obj.children[1]
+
+ stringify(obj, null, 2).must.eql(jsonify({
+ name: "Alice",
+ children: [
+ {name: "Bob", self: "[Circular ~.children.0]"},
+ {name: "Eve", self: "[Circular ~.children.1]"}
+ ]
+ }))
+ })
+
+ it("must stringify circular arrays", function() {
+ var obj = []
+ obj.push(obj)
+ obj.push(obj)
+ var json = stringify(obj, null, 2)
+ json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"]))
+ })
+
+ it("must stringify circular arrays with intermediaries", function() {
+ var obj = []
+ obj.push({name: "Alice", self: obj})
+ obj.push({name: "Bob", self: obj})
+
+ stringify(obj, null, 2).must.eql(jsonify([
+ {name: "Alice", self: "[Circular ~]"},
+ {name: "Bob", self: "[Circular ~]"}
+ ]))
+ })
+
+ it("must stringify repeated objects in objects", function() {
+ var obj = {}
+ var alice = {name: "Alice"}
+ obj.alice1 = alice
+ obj.alice2 = alice
+
+ stringify(obj, null, 2).must.eql(jsonify({
+ alice1: {name: "Alice"},
+ alice2: {name: "Alice"}
+ }))
+ })
+
+ it("must stringify repeated objects in arrays", function() {
+ var alice = {name: "Alice"}
+ var obj = [alice, alice]
+ var json = stringify(obj, null, 2)
+ json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}]))
+ })
+
+ it("must call given decycler and use its output", function() {
+ var obj = {}
+ obj.a = obj
+ obj.b = obj
+
+ var decycle = Sinon.spy(function() { return decycle.callCount })
+ var json = stringify(obj, null, 2, decycle)
+ json.must.eql(jsonify({a: 1, b: 2}, null, 2))
+
+ decycle.callCount.must.equal(2)
+ decycle.thisValues[0].must.equal(obj)
+ decycle.args[0][0].must.equal("a")
+ decycle.args[0][1].must.equal(obj)
+ decycle.thisValues[1].must.equal(obj)
+ decycle.args[1][0].must.equal("b")
+ decycle.args[1][1].must.equal(obj)
+ })
+
+ it("must call replacer and use its output", function() {
+ var obj = {name: "Alice", child: {name: "Bob"}}
+
+ var replacer = Sinon.spy(bangString)
+ var json = stringify(obj, replacer, 2)
+ json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}}))
+
+ replacer.callCount.must.equal(4)
+ replacer.args[0][0].must.equal("")
+ replacer.args[0][1].must.equal(obj)
+ replacer.thisValues[1].must.equal(obj)
+ replacer.args[1][0].must.equal("name")
+ replacer.args[1][1].must.equal("Alice")
+ replacer.thisValues[2].must.equal(obj)
+ replacer.args[2][0].must.equal("child")
+ replacer.args[2][1].must.equal(obj.child)
+ replacer.thisValues[3].must.equal(obj.child)
+ replacer.args[3][0].must.equal("name")
+ replacer.args[3][1].must.equal("Bob")
+ })
+
+ it("must call replacer after describing circular references", function() {
+ var obj = {name: "Alice"}
+ obj.self = obj
+
+ var replacer = Sinon.spy(bangString)
+ var json = stringify(obj, replacer, 2)
+ json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"}))
+
+ replacer.callCount.must.equal(3)
+ replacer.args[0][0].must.equal("")
+ replacer.args[0][1].must.equal(obj)
+ replacer.thisValues[1].must.equal(obj)
+ replacer.args[1][0].must.equal("name")
+ replacer.args[1][1].must.equal("Alice")
+ replacer.thisValues[2].must.equal(obj)
+ replacer.args[2][0].must.equal("self")
+ replacer.args[2][1].must.equal("[Circular ~]")
+ })
+
+ it("must call given decycler and use its output for nested objects",
+ function() {
+ var obj = {}
+ obj.a = obj
+ obj.b = {self: obj}
+
+ var decycle = Sinon.spy(function() { return decycle.callCount })
+ var json = stringify(obj, null, 2, decycle)
+ json.must.eql(jsonify({a: 1, b: {self: 2}}))
+
+ decycle.callCount.must.equal(2)
+ decycle.args[0][0].must.equal("a")
+ decycle.args[0][1].must.equal(obj)
+ decycle.args[1][0].must.equal("self")
+ decycle.args[1][1].must.equal(obj)
+ })
+
+ it("must use decycler's output when it returned null", function() {
+ var obj = {a: "b"}
+ obj.self = obj
+ obj.selves = [obj, obj]
+
+ function decycle() { return null }
+ stringify(obj, null, 2, decycle).must.eql(jsonify({
+ a: "b",
+ self: null,
+ selves: [null, null]
+ }))
+ })
+
+ it("must use decycler's output when it returned undefined", function() {
+ var obj = {a: "b"}
+ obj.self = obj
+ obj.selves = [obj, obj]
+
+ function decycle() {}
+ stringify(obj, null, 2, decycle).must.eql(jsonify({
+ a: "b",
+ selves: [null, null]
+ }))
+ })
+
+ it("must throw given a decycler that returns a cycle", function() {
+ var obj = {}
+ obj.self = obj
+ var err
+ function identity(key, value) { return value }
+ try { stringify(obj, null, 2, identity) } catch (ex) { err = ex }
+ err.must.be.an.instanceof(TypeError)
+ })
+
+ describe(".getSerialize", function() {
+ it("must stringify circular objects", function() {
+ var obj = {a: "b"}
+ obj.circularRef = obj
+ obj.list = [obj, obj]
+
+ var json = JSON.stringify(obj, stringify.getSerialize(), 2)
+ json.must.eql(jsonify({
+ "a": "b",
+ "circularRef": "[Circular ~]",
+ "list": ["[Circular ~]", "[Circular ~]"]
+ }))
+ })
+
+ // This is the behavior as of Mar 3, 2015.
+ // The serializer function keeps state inside the returned function and
+ // so far I'm not sure how to not do that. JSON.stringify's replacer is not
+ // called _after_ serialization.
+ xit("must return a function that could be called twice", function() {
+ var obj = {name: "Alice"}
+ obj.self = obj
+
+ var json
+ var serializer = stringify.getSerialize()
+
+ json = JSON.stringify(obj, serializer, 2)
+ json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
+
+ json = JSON.stringify(obj, serializer, 2)
+ json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"}))
+ })
+ })
+})
+
+function bangString(key, value) {
+ return typeof value == "string" ? value + "!" : value
+}
diff --git a/node_modules/jsonfile/CHANGELOG.md b/node_modules/jsonfile/CHANGELOG.md
new file mode 100644
index 0000000..7718857
--- /dev/null
+++ b/node_modules/jsonfile/CHANGELOG.md
@@ -0,0 +1,145 @@
+4.0.0 / 2017-07-12
+------------------
+
+- **BREAKING:** Remove global `spaces` option.
+- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js.
+- Remove undocumented `passParsingErrors` option.
+- Added `EOL` override option to `writeFile` when using `spaces`. [#89]
+
+3.0.1 / 2017-07-05
+------------------
+
+- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written.
+
+3.0.0 / 2017-04-25
+------------------
+
+- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false`
+
+2.4.0 / 2016-09-15
+------------------
+### Changed
+- added optional support for `graceful-fs` [#62]
+
+2.3.1 / 2016-05-13
+------------------
+- fix to support BOM. [#45][#45]
+
+2.3.0 / 2016-04-16
+------------------
+- add `throws` to `readFile()`. See [#39][#39]
+- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs)
+
+2.2.3 / 2015-10-14
+------------------
+- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34
+
+2.2.2 / 2015-09-16
+------------------
+- split out tests into separate files
+- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33
+
+2.2.1 / 2015-06-25
+------------------
+- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28
+
+2.2.0 / 2015-06-25
+------------------
+- added `options.spaces` to `writeFile()` and `writeFileSync()`
+
+2.1.2 / 2015-06-22
+------------------
+- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25
+
+2.1.1 / 2015-06-19
+------------------
+- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24
+
+2.1.0 / 2015-06-19
+------------------
+- cleanup: JavaScript Standard Style, rename files, dropped terst for assert
+- methods now support JSON revivers/replacers
+
+2.0.1 / 2015-05-24
+------------------
+- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21
+
+2.0.0 / 2014-07-28
+------------------
+* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14)
+* added `options.throws` to `readFileSync()`
+* dropped support for Node v0.8
+
+1.2.0 / 2014-06-29
+------------------
+* removed semicolons
+* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but
+changes it according to docs. [#12][#12]
+
+1.1.1 / 2013-11-11
+------------------
+* fixed catching of callback bug (ffissore / #5)
+
+1.1.0 / 2013-10-11
+------------------
+* added `options` param to methods, (seanodell / #4)
+
+1.0.1 / 2013-09-05
+------------------
+* removed `homepage` field from package.json to remove NPM warning
+
+1.0.0 / 2013-06-28
+------------------
+* added `.npmignore`, #1
+* changed spacing default from `4` to `2` to follow Node conventions
+
+0.0.1 / 2012-09-10
+------------------
+* Initial release.
+
+[#89]: https://github.com/jprichardson/node-jsonfile/pull/89
+[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails"
+[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file"
+[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file"
+[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch"
+[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working"
+[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value"
+[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)"
+[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature"
+[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file"
+[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file."
+[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file."
+[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename"
+[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()"
+[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?"
+[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string"
+[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?"
+[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?"
+[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken "
+[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality"
+[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra"
+[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods"
+[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error"
+[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync"
+[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated"
+[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute"
+[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity"
+[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method"
+[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods"
+[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem"
+[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null"
+[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`"
+[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF"
+[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline"
+[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options"
+[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync"
+[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile"
+[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example."
+[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me."
+[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message"
+[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible"
+[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite."
+[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync"
+[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2"
+[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted."
+[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file"
diff --git a/node_modules/jsonfile/LICENSE b/node_modules/jsonfile/LICENSE
new file mode 100644
index 0000000..cb7e807
--- /dev/null
+++ b/node_modules/jsonfile/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2012-2015, JP Richardson <jprichardson@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/jsonfile/README.md b/node_modules/jsonfile/README.md
new file mode 100644
index 0000000..721685c
--- /dev/null
+++ b/node_modules/jsonfile/README.md
@@ -0,0 +1,168 @@
+Node.js - jsonfile
+================
+
+Easily read/write JSON files.
+
+[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile)
+[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
+
+<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
+
+Why?
+----
+
+Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
+
+
+
+Installation
+------------
+
+ npm install --save jsonfile
+
+
+
+API
+---
+
+### readFile(filename, [options], callback)
+
+`options` (`object`, default `undefined`): Pass in any `fs.readFile` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+ - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
+ If `false`, returns `null` for the object.
+
+
+```js
+var jsonfile = require('jsonfile')
+var file = '/tmp/data.json'
+jsonfile.readFile(file, function(err, obj) {
+ console.dir(obj)
+})
+```
+
+
+### readFileSync(filename, [options])
+
+`options` (`object`, default `undefined`): Pass in any `fs.readFileSync` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
+
+```js
+var jsonfile = require('jsonfile')
+var file = '/tmp/data.json'
+
+console.dir(jsonfile.readFileSync(file))
+```
+
+
+### writeFile(filename, obj, [options], callback)
+
+`options`: Pass in any `fs.writeFile` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string.
+
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/data.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFile(file, obj, function (err) {
+ console.error(err)
+})
+```
+
+**formatting with spaces:**
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/data.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFile(file, obj, {spaces: 2}, function(err) {
+ console.error(err)
+})
+```
+
+**overriding EOL:**
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/data.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFile(file, obj, {spaces: 2, EOL: '\r\n'}, function(err) {
+ console.error(err)
+})
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFile` option `{flag: 'a'}` to achieve this.
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/mayAlreadyExistedData.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFile(file, obj, {flag: 'a'}, function (err) {
+ console.error(err)
+})
+```
+
+### writeFileSync(filename, obj, [options])
+
+`options`: Pass in any `fs.writeFileSync` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string.
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/data.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFileSync(file, obj)
+```
+
+**formatting with spaces:**
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/data.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFileSync(file, obj, {spaces: 2})
+```
+
+**overriding EOL:**
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/data.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFileSync(file, obj, {spaces: 2, EOL: '\r\n'})
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFileSync` option `{flag: 'a'}` to achieve this.
+
+```js
+var jsonfile = require('jsonfile')
+
+var file = '/tmp/mayAlreadyExistedData.json'
+var obj = {name: 'JP'}
+
+jsonfile.writeFileSync(file, obj, {flag: 'a'})
+```
+
+License
+-------
+
+(MIT License)
+
+Copyright 2012-2016, JP Richardson <jprichardson@gmail.com>
diff --git a/node_modules/jsonfile/index.js b/node_modules/jsonfile/index.js
new file mode 100644
index 0000000..d1e5827
--- /dev/null
+++ b/node_modules/jsonfile/index.js
@@ -0,0 +1,134 @@
+var _fs
+try {
+ _fs = require('graceful-fs')
+} catch (_) {
+ _fs = require('fs')
+}
+
+function readFile (file, options, callback) {
+ if (callback == null) {
+ callback = options
+ options = {}
+ }
+
+ if (typeof options === 'string') {
+ options = {encoding: options}
+ }
+
+ options = options || {}
+ var fs = options.fs || _fs
+
+ var shouldThrow = true
+ if ('throws' in options) {
+ shouldThrow = options.throws
+ }
+
+ fs.readFile(file, options, function (err, data) {
+ if (err) return callback(err)
+
+ data = stripBom(data)
+
+ var obj
+ try {
+ obj = JSON.parse(data, options ? options.reviver : null)
+ } catch (err2) {
+ if (shouldThrow) {
+ err2.message = file + ': ' + err2.message
+ return callback(err2)
+ } else {
+ return callback(null, null)
+ }
+ }
+
+ callback(null, obj)
+ })
+}
+
+function readFileSync (file, options) {
+ options = options || {}
+ if (typeof options === 'string') {
+ options = {encoding: options}
+ }
+
+ var fs = options.fs || _fs
+
+ var shouldThrow = true
+ if ('throws' in options) {
+ shouldThrow = options.throws
+ }
+
+ try {
+ var content = fs.readFileSync(file, options)
+ content = stripBom(content)
+ return JSON.parse(content, options.reviver)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = file + ': ' + err.message
+ throw err
+ } else {
+ return null
+ }
+ }
+}
+
+function stringify (obj, options) {
+ var spaces
+ var EOL = '\n'
+ if (typeof options === 'object' && options !== null) {
+ if (options.spaces) {
+ spaces = options.spaces
+ }
+ if (options.EOL) {
+ EOL = options.EOL
+ }
+ }
+
+ var str = JSON.stringify(obj, options ? options.replacer : null, spaces)
+
+ return str.replace(/\n/g, EOL) + EOL
+}
+
+function writeFile (file, obj, options, callback) {
+ if (callback == null) {
+ callback = options
+ options = {}
+ }
+ options = options || {}
+ var fs = options.fs || _fs
+
+ var str = ''
+ try {
+ str = stringify(obj, options)
+ } catch (err) {
+ // Need to return whether a callback was passed or not
+ if (callback) callback(err, null)
+ return
+ }
+
+ fs.writeFile(file, str, options, callback)
+}
+
+function writeFileSync (file, obj, options) {
+ options = options || {}
+ var fs = options.fs || _fs
+
+ var str = stringify(obj, options)
+ // not sure if fs.writeFileSync returns anything, but just in case
+ return fs.writeFileSync(file, str, options)
+}
+
+function stripBom (content) {
+ // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
+ if (Buffer.isBuffer(content)) content = content.toString('utf8')
+ content = content.replace(/^\uFEFF/, '')
+ return content
+}
+
+var jsonfile = {
+ readFile: readFile,
+ readFileSync: readFileSync,
+ writeFile: writeFile,
+ writeFileSync: writeFileSync
+}
+
+module.exports = jsonfile
diff --git a/node_modules/jsonfile/package.json b/node_modules/jsonfile/package.json
new file mode 100644
index 0000000..29e783f
--- /dev/null
+++ b/node_modules/jsonfile/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "jsonfile",
+ "version": "4.0.0",
+ "description": "Easily read/write JSON files.",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:jprichardson/node-jsonfile.git"
+ },
+ "keywords": [
+ "read",
+ "write",
+ "file",
+ "json",
+ "fs",
+ "fs-extra"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {},
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ },
+ "devDependencies": {
+ "mocha": "2.x",
+ "rimraf": "^2.4.0",
+ "standard": "^10.0.3"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "lint": "standard",
+ "test": "npm run lint && npm run unit",
+ "unit": "mocha"
+ }
+}
diff --git a/node_modules/jsprim/CHANGES.md b/node_modules/jsprim/CHANGES.md
new file mode 100644
index 0000000..c52d39d
--- /dev/null
+++ b/node_modules/jsprim/CHANGES.md
@@ -0,0 +1,49 @@
+# Changelog
+
+## not yet released
+
+None yet.
+
+## v1.4.1 (2017-08-02)
+
+* #21 Update verror dep
+* #22 Update extsprintf dependency
+* #23 update contribution guidelines
+
+## v1.4.0 (2017-03-13)
+
+* #7 Add parseInteger() function for safer number parsing
+
+## v1.3.1 (2016-09-12)
+
+* #13 Incompatible with webpack
+
+## v1.3.0 (2016-06-22)
+
+* #14 add safer version of hasOwnProperty()
+* #15 forEachKey() should ignore inherited properties
+
+## v1.2.2 (2015-10-15)
+
+* #11 NPM package shouldn't include any code that does `require('JSV')`
+* #12 jsl.node.conf missing definition for "module"
+
+## v1.2.1 (2015-10-14)
+
+* #8 odd date parsing behaviour
+
+## v1.2.0 (2015-10-13)
+
+* #9 want function for returning RFC1123 dates
+
+## v1.1.0 (2015-09-02)
+
+* #6 a new suite of hrtime manipulation routines: `hrtimeAdd()`,
+ `hrtimeAccum()`, `hrtimeNanosec()`, `hrtimeMicrosec()` and
+ `hrtimeMillisec()`.
+
+## v1.0.0 (2015-09-01)
+
+First tracked release. Includes everything in previous releases, plus:
+
+* #4 want function for merging objects
diff --git a/node_modules/jsprim/CONTRIBUTING.md b/node_modules/jsprim/CONTRIBUTING.md
new file mode 100644
index 0000000..750cef8
--- /dev/null
+++ b/node_modules/jsprim/CONTRIBUTING.md
@@ -0,0 +1,19 @@
+# Contributing
+
+This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new
+changes. Anyone can submit changes. To get started, see the [cr.joyent.us user
+guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md).
+This repo does not use GitHub pull requests.
+
+See the [Joyent Engineering
+Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general
+best practices expected in this repository.
+
+Contributions should be "make prepush" clean. The "prepush" target runs the
+"check" target, which requires these separate tools:
+
+* https://github.com/davepacheco/jsstyle
+* https://github.com/davepacheco/javascriptlint
+
+If you're changing something non-trivial or user-facing, you may want to submit
+an issue first.
diff --git a/node_modules/jsprim/LICENSE b/node_modules/jsprim/LICENSE
new file mode 100644
index 0000000..cbc0bb3
--- /dev/null
+++ b/node_modules/jsprim/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012, Joyent, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE
diff --git a/node_modules/jsprim/README.md b/node_modules/jsprim/README.md
new file mode 100644
index 0000000..b3f28a4
--- /dev/null
+++ b/node_modules/jsprim/README.md
@@ -0,0 +1,287 @@
+# jsprim: utilities for primitive JavaScript types
+
+This module provides miscellaneous facilities for working with strings,
+numbers, dates, and objects and arrays of these basic types.
+
+
+### deepCopy(obj)
+
+Creates a deep copy of a primitive type, object, or array of primitive types.
+
+
+### deepEqual(obj1, obj2)
+
+Returns whether two objects are equal.
+
+
+### isEmpty(obj)
+
+Returns true if the given object has no properties and false otherwise. This
+is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)).
+
+### hasKey(obj, key)
+
+Returns true if the given object has an enumerable, non-inherited property
+called `key`. [For information on enumerability and ownership of properties, see
+the MDN
+documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties)
+
+### forEachKey(obj, callback)
+
+Like Array.forEach, but iterates enumerable, owned properties of an object
+rather than elements of an array. Equivalent to:
+
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ callback(key, obj[key]);
+ }
+ }
+
+
+### flattenObject(obj, depth)
+
+Flattens an object up to a given level of nesting, returning an array of arrays
+of length "depth + 1", where the first "depth" elements correspond to flattened
+columns and the last element contains the remaining object . For example:
+
+ flattenObject({
+ 'I': {
+ 'A': {
+ 'i': {
+ 'datum1': [ 1, 2 ],
+ 'datum2': [ 3, 4 ]
+ },
+ 'ii': {
+ 'datum1': [ 3, 4 ]
+ }
+ },
+ 'B': {
+ 'i': {
+ 'datum1': [ 5, 6 ]
+ },
+ 'ii': {
+ 'datum1': [ 7, 8 ],
+ 'datum2': [ 3, 4 ],
+ },
+ 'iii': {
+ }
+ }
+ },
+ 'II': {
+ 'A': {
+ 'i': {
+ 'datum1': [ 1, 2 ],
+ 'datum2': [ 3, 4 ]
+ }
+ }
+ }
+ }, 3)
+
+becomes:
+
+ [
+ [ 'I', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ],
+ [ 'I', 'A', 'ii', { 'datum1': [ 3, 4 ] } ],
+ [ 'I', 'B', 'i', { 'datum1': [ 5, 6 ] } ],
+ [ 'I', 'B', 'ii', { 'datum1': [ 7, 8 ], 'datum2': [ 3, 4 ] } ],
+ [ 'I', 'B', 'iii', {} ],
+ [ 'II', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ]
+ ]
+
+This function is strict: "depth" must be a non-negative integer and "obj" must
+be a non-null object with at least "depth" levels of nesting under all keys.
+
+
+### flattenIter(obj, depth, func)
+
+This is similar to `flattenObject` except that instead of returning an array,
+this function invokes `func(entry)` for each `entry` in the array that
+`flattenObject` would return. `flattenIter(obj, depth, func)` is logically
+equivalent to `flattenObject(obj, depth).forEach(func)`. Importantly, this
+version never constructs the full array. Its memory usage is O(depth) rather
+than O(n) (where `n` is the number of flattened elements).
+
+There's another difference between `flattenObject` and `flattenIter` that's
+related to the special case where `depth === 0`. In this case, `flattenObject`
+omits the array wrapping `obj` (which is regrettable).
+
+
+### pluck(obj, key)
+
+Fetch nested property "key" from object "obj", traversing objects as needed.
+For example, `pluck(obj, "foo.bar.baz")` is roughly equivalent to
+`obj.foo.bar.baz`, except that:
+
+1. If traversal fails, the resulting value is undefined, and no error is
+ thrown. For example, `pluck({}, "foo.bar")` is just undefined.
+2. If "obj" has property "key" directly (without traversing), the
+ corresponding property is returned. For example,
+ `pluck({ 'foo.bar': 1 }, 'foo.bar')` is 1, not undefined. This is also
+ true recursively, so `pluck({ 'a': { 'foo.bar': 1 } }, 'a.foo.bar')` is
+ also 1, not undefined.
+
+
+### randElt(array)
+
+Returns an element from "array" selected uniformly at random. If "array" is
+empty, throws an Error.
+
+
+### startsWith(str, prefix)
+
+Returns true if the given string starts with the given prefix and false
+otherwise.
+
+
+### endsWith(str, suffix)
+
+Returns true if the given string ends with the given suffix and false
+otherwise.
+
+
+### parseInteger(str, options)
+
+Parses the contents of `str` (a string) as an integer. On success, the integer
+value is returned (as a number). On failure, an error is **returned** describing
+why parsing failed.
+
+By default, leading and trailing whitespace characters are not allowed, nor are
+trailing characters that are not part of the numeric representation. This
+behaviour can be toggled by using the options below. The empty string (`''`) is
+not considered valid input. If the return value cannot be precisely represented
+as a number (i.e., is smaller than `Number.MIN_SAFE_INTEGER` or larger than
+`Number.MAX_SAFE_INTEGER`), an error is returned. Additionally, the string
+`'-0'` will be parsed as the integer `0`, instead of as the IEEE floating point
+value `-0`.
+
+This function accepts both upper and lowercase characters for digits, similar to
+`parseInt()`, `Number()`, and [strtol(3C)](https://illumos.org/man/3C/strtol).
+
+The following may be specified in `options`:
+
+Option | Type | Default | Meaning
+------------------ | ------- | ------- | ---------------------------
+base | number | 10 | numeric base (radix) to use, in the range 2 to 36
+allowSign | boolean | true | whether to interpret any leading `+` (positive) and `-` (negative) characters
+allowImprecise | boolean | false | whether to accept values that may have lost precision (past `MAX_SAFE_INTEGER` or below `MIN_SAFE_INTEGER`)
+allowPrefix | boolean | false | whether to interpret the prefixes `0b` (base 2), `0o` (base 8), `0t` (base 10), or `0x` (base 16)
+allowTrailing | boolean | false | whether to ignore trailing characters
+trimWhitespace | boolean | false | whether to trim any leading or trailing whitespace/line terminators
+leadingZeroIsOctal | boolean | false | whether a leading zero indicates octal
+
+Note that if `base` is unspecified, and `allowPrefix` or `leadingZeroIsOctal`
+are, then the leading characters can change the default base from 10. If `base`
+is explicitly specified and `allowPrefix` is true, then the prefix will only be
+accepted if it matches the specified base. `base` and `leadingZeroIsOctal`
+cannot be used together.
+
+**Context:** It's tricky to parse integers with JavaScript's built-in facilities
+for several reasons:
+
+- `parseInt()` and `Number()` by default allow the base to be specified in the
+ input string by a prefix (e.g., `0x` for hex).
+- `parseInt()` allows trailing nonnumeric characters.
+- `Number(str)` returns 0 when `str` is the empty string (`''`).
+- Both functions return incorrect values when the input string represents a
+ valid integer outside the range of integers that can be represented precisely.
+ Specifically, `parseInt('9007199254740993')` returns 9007199254740992.
+- Both functions always accept `-` and `+` signs before the digit.
+- Some older JavaScript engines always interpret a leading 0 as indicating
+ octal, which can be surprising when parsing input from users who expect a
+ leading zero to be insignificant.
+
+While each of these may be desirable in some contexts, there are also times when
+none of them are wanted. `parseInteger()` grants greater control over what
+input's permissible.
+
+### iso8601(date)
+
+Converts a Date object to an ISO8601 date string of the form
+"YYYY-MM-DDTHH:MM:SS.sssZ". This format is not customizable.
+
+
+### parseDateTime(str)
+
+Parses a date expressed as a string, as either a number of milliseconds since
+the epoch or any string format that Date accepts, giving preference to the
+former where these two sets overlap (e.g., strings containing small numbers).
+
+
+### hrtimeDiff(timeA, timeB)
+
+Given two hrtime readings (as from Node's `process.hrtime()`), where timeA is
+later than timeB, compute the difference and return that as an hrtime. It is
+illegal to invoke this for a pair of times where timeB is newer than timeA.
+
+### hrtimeAdd(timeA, timeB)
+
+Add two hrtime intervals (as from Node's `process.hrtime()`), returning a new
+hrtime interval array. This function does not modify either input argument.
+
+
+### hrtimeAccum(timeA, timeB)
+
+Add two hrtime intervals (as from Node's `process.hrtime()`), storing the
+result in `timeA`. This function overwrites (and returns) the first argument
+passed in.
+
+
+### hrtimeNanosec(timeA), hrtimeMicrosec(timeA), hrtimeMillisec(timeA)
+
+This suite of functions converts a hrtime interval (as from Node's
+`process.hrtime()`) into a scalar number of nanoseconds, microseconds or
+milliseconds. Results are truncated, as with `Math.floor()`.
+
+
+### validateJsonObject(schema, object)
+
+Uses JSON validation (via JSV) to validate the given object against the given
+schema. On success, returns null. On failure, *returns* (does not throw) a
+useful Error object.
+
+
+### extraProperties(object, allowed)
+
+Check an object for unexpected properties. Accepts the object to check, and an
+array of allowed property name strings. If extra properties are detected, an
+array of extra property names is returned. If no properties other than those
+in the allowed list are present on the object, the returned array will be of
+zero length.
+
+### mergeObjects(provided, overrides, defaults)
+
+Merge properties from objects "provided", "overrides", and "defaults". The
+intended use case is for functions that accept named arguments in an "args"
+object, but want to provide some default values and override other values. In
+that case, "provided" is what the caller specified, "overrides" are what the
+function wants to override, and "defaults" contains default values.
+
+The function starts with the values in "defaults", overrides them with the
+values in "provided", and then overrides those with the values in "overrides".
+For convenience, any of these objects may be falsey, in which case they will be
+ignored. The input objects are never modified, but properties in the returned
+object are not deep-copied.
+
+For example:
+
+ mergeObjects(undefined, { 'objectMode': true }, { 'highWaterMark': 0 })
+
+returns:
+
+ { 'objectMode': true, 'highWaterMark': 0 }
+
+For another example:
+
+ mergeObjects(
+ { 'highWaterMark': 16, 'objectMode': 7 }, /* from caller */
+ { 'objectMode': true }, /* overrides */
+ { 'highWaterMark': 0 }); /* default */
+
+returns:
+
+ { 'objectMode': true, 'highWaterMark': 16 }
+
+
+# Contributing
+
+See separate [contribution guidelines](CONTRIBUTING.md).
diff --git a/node_modules/jsprim/lib/jsprim.js b/node_modules/jsprim/lib/jsprim.js
new file mode 100644
index 0000000..f7d0d81
--- /dev/null
+++ b/node_modules/jsprim/lib/jsprim.js
@@ -0,0 +1,735 @@
+/*
+ * lib/jsprim.js: utilities for primitive JavaScript types
+ */
+
+var mod_assert = require('assert-plus');
+var mod_util = require('util');
+
+var mod_extsprintf = require('extsprintf');
+var mod_verror = require('verror');
+var mod_jsonschema = require('json-schema');
+
+/*
+ * Public interface
+ */
+exports.deepCopy = deepCopy;
+exports.deepEqual = deepEqual;
+exports.isEmpty = isEmpty;
+exports.hasKey = hasKey;
+exports.forEachKey = forEachKey;
+exports.pluck = pluck;
+exports.flattenObject = flattenObject;
+exports.flattenIter = flattenIter;
+exports.validateJsonObject = validateJsonObjectJS;
+exports.validateJsonObjectJS = validateJsonObjectJS;
+exports.randElt = randElt;
+exports.extraProperties = extraProperties;
+exports.mergeObjects = mergeObjects;
+
+exports.startsWith = startsWith;
+exports.endsWith = endsWith;
+
+exports.parseInteger = parseInteger;
+
+exports.iso8601 = iso8601;
+exports.rfc1123 = rfc1123;
+exports.parseDateTime = parseDateTime;
+
+exports.hrtimediff = hrtimeDiff;
+exports.hrtimeDiff = hrtimeDiff;
+exports.hrtimeAccum = hrtimeAccum;
+exports.hrtimeAdd = hrtimeAdd;
+exports.hrtimeNanosec = hrtimeNanosec;
+exports.hrtimeMicrosec = hrtimeMicrosec;
+exports.hrtimeMillisec = hrtimeMillisec;
+
+
+/*
+ * Deep copy an acyclic *basic* Javascript object. This only handles basic
+ * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects
+ * containing these. This does *not* handle instances of other classes.
+ */
+function deepCopy(obj)
+{
+ var ret, key;
+ var marker = '__deepCopy';
+
+ if (obj && obj[marker])
+ throw (new Error('attempted deep copy of cyclic object'));
+
+ if (obj && obj.constructor == Object) {
+ ret = {};
+ obj[marker] = true;
+
+ for (key in obj) {
+ if (key == marker)
+ continue;
+
+ ret[key] = deepCopy(obj[key]);
+ }
+
+ delete (obj[marker]);
+ return (ret);
+ }
+
+ if (obj && obj.constructor == Array) {
+ ret = [];
+ obj[marker] = true;
+
+ for (key = 0; key < obj.length; key++)
+ ret.push(deepCopy(obj[key]));
+
+ delete (obj[marker]);
+ return (ret);
+ }
+
+ /*
+ * It must be a primitive type -- just return it.
+ */
+ return (obj);
+}
+
+function deepEqual(obj1, obj2)
+{
+ if (typeof (obj1) != typeof (obj2))
+ return (false);
+
+ if (obj1 === null || obj2 === null || typeof (obj1) != 'object')
+ return (obj1 === obj2);
+
+ if (obj1.constructor != obj2.constructor)
+ return (false);
+
+ var k;
+ for (k in obj1) {
+ if (!obj2.hasOwnProperty(k))
+ return (false);
+
+ if (!deepEqual(obj1[k], obj2[k]))
+ return (false);
+ }
+
+ for (k in obj2) {
+ if (!obj1.hasOwnProperty(k))
+ return (false);
+ }
+
+ return (true);
+}
+
+function isEmpty(obj)
+{
+ var key;
+ for (key in obj)
+ return (false);
+ return (true);
+}
+
+function hasKey(obj, key)
+{
+ mod_assert.equal(typeof (key), 'string');
+ return (Object.prototype.hasOwnProperty.call(obj, key));
+}
+
+function forEachKey(obj, callback)
+{
+ for (var key in obj) {
+ if (hasKey(obj, key)) {
+ callback(key, obj[key]);
+ }
+ }
+}
+
+function pluck(obj, key)
+{
+ mod_assert.equal(typeof (key), 'string');
+ return (pluckv(obj, key));
+}
+
+function pluckv(obj, key)
+{
+ if (obj === null || typeof (obj) !== 'object')
+ return (undefined);
+
+ if (obj.hasOwnProperty(key))
+ return (obj[key]);
+
+ var i = key.indexOf('.');
+ if (i == -1)
+ return (undefined);
+
+ var key1 = key.substr(0, i);
+ if (!obj.hasOwnProperty(key1))
+ return (undefined);
+
+ return (pluckv(obj[key1], key.substr(i + 1)));
+}
+
+/*
+ * Invoke callback(row) for each entry in the array that would be returned by
+ * flattenObject(data, depth). This is just like flattenObject(data,
+ * depth).forEach(callback), except that the intermediate array is never
+ * created.
+ */
+function flattenIter(data, depth, callback)
+{
+ doFlattenIter(data, depth, [], callback);
+}
+
+function doFlattenIter(data, depth, accum, callback)
+{
+ var each;
+ var key;
+
+ if (depth === 0) {
+ each = accum.slice(0);
+ each.push(data);
+ callback(each);
+ return;
+ }
+
+ mod_assert.ok(data !== null);
+ mod_assert.equal(typeof (data), 'object');
+ mod_assert.equal(typeof (depth), 'number');
+ mod_assert.ok(depth >= 0);
+
+ for (key in data) {
+ each = accum.slice(0);
+ each.push(key);
+ doFlattenIter(data[key], depth - 1, each, callback);
+ }
+}
+
+function flattenObject(data, depth)
+{
+ if (depth === 0)
+ return ([ data ]);
+
+ mod_assert.ok(data !== null);
+ mod_assert.equal(typeof (data), 'object');
+ mod_assert.equal(typeof (depth), 'number');
+ mod_assert.ok(depth >= 0);
+
+ var rv = [];
+ var key;
+
+ for (key in data) {
+ flattenObject(data[key], depth - 1).forEach(function (p) {
+ rv.push([ key ].concat(p));
+ });
+ }
+
+ return (rv);
+}
+
+function startsWith(str, prefix)
+{
+ return (str.substr(0, prefix.length) == prefix);
+}
+
+function endsWith(str, suffix)
+{
+ return (str.substr(
+ str.length - suffix.length, suffix.length) == suffix);
+}
+
+function iso8601(d)
+{
+ if (typeof (d) == 'number')
+ d = new Date(d);
+ mod_assert.ok(d.constructor === Date);
+ return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ',
+ d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(),
+ d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(),
+ d.getUTCMilliseconds()));
+}
+
+var RFC1123_MONTHS = [
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
+var RFC1123_DAYS = [
+ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
+
+function rfc1123(date) {
+ return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT',
+ RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(),
+ RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(),
+ date.getUTCHours(), date.getUTCMinutes(),
+ date.getUTCSeconds()));
+}
+
+/*
+ * Parses a date expressed as a string, as either a number of milliseconds since
+ * the epoch or any string format that Date accepts, giving preference to the
+ * former where these two sets overlap (e.g., small numbers).
+ */
+function parseDateTime(str)
+{
+ /*
+ * This is irritatingly implicit, but significantly more concise than
+ * alternatives. The "+str" will convert a string containing only a
+ * number directly to a Number, or NaN for other strings. Thus, if the
+ * conversion succeeds, we use it (this is the milliseconds-since-epoch
+ * case). Otherwise, we pass the string directly to the Date
+ * constructor to parse.
+ */
+ var numeric = +str;
+ if (!isNaN(numeric)) {
+ return (new Date(numeric));
+ } else {
+ return (new Date(str));
+ }
+}
+
+
+/*
+ * Number.*_SAFE_INTEGER isn't present before node v0.12, so we hardcode
+ * the ES6 definitions here, while allowing for them to someday be higher.
+ */
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;
+
+
+/*
+ * Default options for parseInteger().
+ */
+var PI_DEFAULTS = {
+ base: 10,
+ allowSign: true,
+ allowPrefix: false,
+ allowTrailing: false,
+ allowImprecise: false,
+ trimWhitespace: false,
+ leadingZeroIsOctal: false
+};
+
+var CP_0 = 0x30;
+var CP_9 = 0x39;
+
+var CP_A = 0x41;
+var CP_B = 0x42;
+var CP_O = 0x4f;
+var CP_T = 0x54;
+var CP_X = 0x58;
+var CP_Z = 0x5a;
+
+var CP_a = 0x61;
+var CP_b = 0x62;
+var CP_o = 0x6f;
+var CP_t = 0x74;
+var CP_x = 0x78;
+var CP_z = 0x7a;
+
+var PI_CONV_DEC = 0x30;
+var PI_CONV_UC = 0x37;
+var PI_CONV_LC = 0x57;
+
+
+/*
+ * A stricter version of parseInt() that provides options for changing what
+ * is an acceptable string (for example, disallowing trailing characters).
+ */
+function parseInteger(str, uopts)
+{
+ mod_assert.string(str, 'str');
+ mod_assert.optionalObject(uopts, 'options');
+
+ var baseOverride = false;
+ var options = PI_DEFAULTS;
+
+ if (uopts) {
+ baseOverride = hasKey(uopts, 'base');
+ options = mergeObjects(options, uopts);
+ mod_assert.number(options.base, 'options.base');
+ mod_assert.ok(options.base >= 2, 'options.base >= 2');
+ mod_assert.ok(options.base <= 36, 'options.base <= 36');
+ mod_assert.bool(options.allowSign, 'options.allowSign');
+ mod_assert.bool(options.allowPrefix, 'options.allowPrefix');
+ mod_assert.bool(options.allowTrailing,
+ 'options.allowTrailing');
+ mod_assert.bool(options.allowImprecise,
+ 'options.allowImprecise');
+ mod_assert.bool(options.trimWhitespace,
+ 'options.trimWhitespace');
+ mod_assert.bool(options.leadingZeroIsOctal,
+ 'options.leadingZeroIsOctal');
+
+ if (options.leadingZeroIsOctal) {
+ mod_assert.ok(!baseOverride,
+ '"base" and "leadingZeroIsOctal" are ' +
+ 'mutually exclusive');
+ }
+ }
+
+ var c;
+ var pbase = -1;
+ var base = options.base;
+ var start;
+ var mult = 1;
+ var value = 0;
+ var idx = 0;
+ var len = str.length;
+
+ /* Trim any whitespace on the left side. */
+ if (options.trimWhitespace) {
+ while (idx < len && isSpace(str.charCodeAt(idx))) {
+ ++idx;
+ }
+ }
+
+ /* Check the number for a leading sign. */
+ if (options.allowSign) {
+ if (str[idx] === '-') {
+ idx += 1;
+ mult = -1;
+ } else if (str[idx] === '+') {
+ idx += 1;
+ }
+ }
+
+ /* Parse the base-indicating prefix if there is one. */
+ if (str[idx] === '0') {
+ if (options.allowPrefix) {
+ pbase = prefixToBase(str.charCodeAt(idx + 1));
+ if (pbase !== -1 && (!baseOverride || pbase === base)) {
+ base = pbase;
+ idx += 2;
+ }
+ }
+
+ if (pbase === -1 && options.leadingZeroIsOctal) {
+ base = 8;
+ }
+ }
+
+ /* Parse the actual digits. */
+ for (start = idx; idx < len; ++idx) {
+ c = translateDigit(str.charCodeAt(idx));
+ if (c !== -1 && c < base) {
+ value *= base;
+ value += c;
+ } else {
+ break;
+ }
+ }
+
+ /* If we didn't parse any digits, we have an invalid number. */
+ if (start === idx) {
+ return (new Error('invalid number: ' + JSON.stringify(str)));
+ }
+
+ /* Trim any whitespace on the right side. */
+ if (options.trimWhitespace) {
+ while (idx < len && isSpace(str.charCodeAt(idx))) {
+ ++idx;
+ }
+ }
+
+ /* Check for trailing characters. */
+ if (idx < len && !options.allowTrailing) {
+ return (new Error('trailing characters after number: ' +
+ JSON.stringify(str.slice(idx))));
+ }
+
+ /* If our value is 0, we return now, to avoid returning -0. */
+ if (value === 0) {
+ return (0);
+ }
+
+ /* Calculate our final value. */
+ var result = value * mult;
+
+ /*
+ * If the string represents a value that cannot be precisely represented
+ * by JavaScript, then we want to check that:
+ *
+ * - We never increased the value past MAX_SAFE_INTEGER
+ * - We don't make the result negative and below MIN_SAFE_INTEGER
+ *
+ * Because we only ever increment the value during parsing, there's no
+ * chance of moving past MAX_SAFE_INTEGER and then dropping below it
+ * again, losing precision in the process. This means that we only need
+ * to do our checks here, at the end.
+ */
+ if (!options.allowImprecise &&
+ (value > MAX_SAFE_INTEGER || result < MIN_SAFE_INTEGER)) {
+ return (new Error('number is outside of the supported range: ' +
+ JSON.stringify(str.slice(start, idx))));
+ }
+
+ return (result);
+}
+
+
+/*
+ * Interpret a character code as a base-36 digit.
+ */
+function translateDigit(d)
+{
+ if (d >= CP_0 && d <= CP_9) {
+ /* '0' to '9' -> 0 to 9 */
+ return (d - PI_CONV_DEC);
+ } else if (d >= CP_A && d <= CP_Z) {
+ /* 'A' - 'Z' -> 10 to 35 */
+ return (d - PI_CONV_UC);
+ } else if (d >= CP_a && d <= CP_z) {
+ /* 'a' - 'z' -> 10 to 35 */
+ return (d - PI_CONV_LC);
+ } else {
+ /* Invalid character code */
+ return (-1);
+ }
+}
+
+
+/*
+ * Test if a value matches the ECMAScript definition of trimmable whitespace.
+ */
+function isSpace(c)
+{
+ return (c === 0x20) ||
+ (c >= 0x0009 && c <= 0x000d) ||
+ (c === 0x00a0) ||
+ (c === 0x1680) ||
+ (c === 0x180e) ||
+ (c >= 0x2000 && c <= 0x200a) ||
+ (c === 0x2028) ||
+ (c === 0x2029) ||
+ (c === 0x202f) ||
+ (c === 0x205f) ||
+ (c === 0x3000) ||
+ (c === 0xfeff);
+}
+
+
+/*
+ * Determine which base a character indicates (e.g., 'x' indicates hex).
+ */
+function prefixToBase(c)
+{
+ if (c === CP_b || c === CP_B) {
+ /* 0b/0B (binary) */
+ return (2);
+ } else if (c === CP_o || c === CP_O) {
+ /* 0o/0O (octal) */
+ return (8);
+ } else if (c === CP_t || c === CP_T) {
+ /* 0t/0T (decimal) */
+ return (10);
+ } else if (c === CP_x || c === CP_X) {
+ /* 0x/0X (hexadecimal) */
+ return (16);
+ } else {
+ /* Not a meaningful character */
+ return (-1);
+ }
+}
+
+
+function validateJsonObjectJS(schema, input)
+{
+ var report = mod_jsonschema.validate(input, schema);
+
+ if (report.errors.length === 0)
+ return (null);
+
+ /* Currently, we only do anything useful with the first error. */
+ var error = report.errors[0];
+
+ /* The failed property is given by a URI with an irrelevant prefix. */
+ var propname = error['property'];
+ var reason = error['message'].toLowerCase();
+ var i, j;
+
+ /*
+ * There's at least one case where the property error message is
+ * confusing at best. We work around this here.
+ */
+ if ((i = reason.indexOf('the property ')) != -1 &&
+ (j = reason.indexOf(' is not defined in the schema and the ' +
+ 'schema does not allow additional properties')) != -1) {
+ i += 'the property '.length;
+ if (propname === '')
+ propname = reason.substr(i, j - i);
+ else
+ propname = propname + '.' + reason.substr(i, j - i);
+
+ reason = 'unsupported property';
+ }
+
+ var rv = new mod_verror.VError('property "%s": %s', propname, reason);
+ rv.jsv_details = error;
+ return (rv);
+}
+
+function randElt(arr)
+{
+ mod_assert.ok(Array.isArray(arr) && arr.length > 0,
+ 'randElt argument must be a non-empty array');
+
+ return (arr[Math.floor(Math.random() * arr.length)]);
+}
+
+function assertHrtime(a)
+{
+ mod_assert.ok(a[0] >= 0 && a[1] >= 0,
+ 'negative numbers not allowed in hrtimes');
+ mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow');
+}
+
+/*
+ * Compute the time elapsed between hrtime readings A and B, where A is later
+ * than B. hrtime readings come from Node's process.hrtime(). There is no
+ * defined way to represent negative deltas, so it's illegal to diff B from A
+ * where the time denoted by B is later than the time denoted by A. If this
+ * becomes valuable, we can define a representation and extend the
+ * implementation to support it.
+ */
+function hrtimeDiff(a, b)
+{
+ assertHrtime(a);
+ assertHrtime(b);
+ mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]),
+ 'negative differences not allowed');
+
+ var rv = [ a[0] - b[0], 0 ];
+
+ if (a[1] >= b[1]) {
+ rv[1] = a[1] - b[1];
+ } else {
+ rv[0]--;
+ rv[1] = 1e9 - (b[1] - a[1]);
+ }
+
+ return (rv);
+}
+
+/*
+ * Convert a hrtime reading from the array format returned by Node's
+ * process.hrtime() into a scalar number of nanoseconds.
+ */
+function hrtimeNanosec(a)
+{
+ assertHrtime(a);
+
+ return (Math.floor(a[0] * 1e9 + a[1]));
+}
+
+/*
+ * Convert a hrtime reading from the array format returned by Node's
+ * process.hrtime() into a scalar number of microseconds.
+ */
+function hrtimeMicrosec(a)
+{
+ assertHrtime(a);
+
+ return (Math.floor(a[0] * 1e6 + a[1] / 1e3));
+}
+
+/*
+ * Convert a hrtime reading from the array format returned by Node's
+ * process.hrtime() into a scalar number of milliseconds.
+ */
+function hrtimeMillisec(a)
+{
+ assertHrtime(a);
+
+ return (Math.floor(a[0] * 1e3 + a[1] / 1e6));
+}
+
+/*
+ * Add two hrtime readings A and B, overwriting A with the result of the
+ * addition. This function is useful for accumulating several hrtime intervals
+ * into a counter. Returns A.
+ */
+function hrtimeAccum(a, b)
+{
+ assertHrtime(a);
+ assertHrtime(b);
+
+ /*
+ * Accumulate the nanosecond component.
+ */
+ a[1] += b[1];
+ if (a[1] >= 1e9) {
+ /*
+ * The nanosecond component overflowed, so carry to the seconds
+ * field.
+ */
+ a[0]++;
+ a[1] -= 1e9;
+ }
+
+ /*
+ * Accumulate the seconds component.
+ */
+ a[0] += b[0];
+
+ return (a);
+}
+
+/*
+ * Add two hrtime readings A and B, returning the result as a new hrtime array.
+ * Does not modify either input argument.
+ */
+function hrtimeAdd(a, b)
+{
+ assertHrtime(a);
+
+ var rv = [ a[0], a[1] ];
+
+ return (hrtimeAccum(rv, b));
+}
+
+
+/*
+ * Check an object for unexpected properties. Accepts the object to check, and
+ * an array of allowed property names (strings). Returns an array of key names
+ * that were found on the object, but did not appear in the list of allowed
+ * properties. If no properties were found, the returned array will be of
+ * zero length.
+ */
+function extraProperties(obj, allowed)
+{
+ mod_assert.ok(typeof (obj) === 'object' && obj !== null,
+ 'obj argument must be a non-null object');
+ mod_assert.ok(Array.isArray(allowed),
+ 'allowed argument must be an array of strings');
+ for (var i = 0; i < allowed.length; i++) {
+ mod_assert.ok(typeof (allowed[i]) === 'string',
+ 'allowed argument must be an array of strings');
+ }
+
+ return (Object.keys(obj).filter(function (key) {
+ return (allowed.indexOf(key) === -1);
+ }));
+}
+
+/*
+ * Given three sets of properties "provided" (may be undefined), "overrides"
+ * (required), and "defaults" (may be undefined), construct an object containing
+ * the union of these sets with "overrides" overriding "provided", and
+ * "provided" overriding "defaults". None of the input objects are modified.
+ */
+function mergeObjects(provided, overrides, defaults)
+{
+ var rv, k;
+
+ rv = {};
+ if (defaults) {
+ for (k in defaults)
+ rv[k] = defaults[k];
+ }
+
+ if (provided) {
+ for (k in provided)
+ rv[k] = provided[k];
+ }
+
+ if (overrides) {
+ for (k in overrides)
+ rv[k] = overrides[k];
+ }
+
+ return (rv);
+}
diff --git a/node_modules/jsprim/package.json b/node_modules/jsprim/package.json
new file mode 100644
index 0000000..25345ee
--- /dev/null
+++ b/node_modules/jsprim/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "jsprim",
+ "version": "1.4.1",
+ "description": "utilities for primitive JavaScript types",
+ "main": "./lib/jsprim.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/joyent/node-jsprim.git"
+ },
+ "dependencies": {
+ "assert-plus": "1.0.0",
+ "extsprintf": "1.3.0",
+ "json-schema": "0.2.3",
+ "verror": "1.10.0"
+ },
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/junk/index.d.ts b/node_modules/junk/index.d.ts
new file mode 100644
index 0000000..46dbded
--- /dev/null
+++ b/node_modules/junk/index.d.ts
@@ -0,0 +1,40 @@
+declare const junk: {
+ /**
+ Returns `true` if `filename` matches a junk file.
+ */
+ is(filename: string): boolean;
+
+ /**
+ Returns `true` if `filename` doesn't match a junk file.
+
+ @example
+ ```
+ import {promisify} from 'util';
+ import * as fs from 'fs';
+ import junk = require('junk');
+
+ const pReaddir = promisify(fs.readdir);
+
+ (async () => {
+ const files = await pReaddir('some/path');
+
+ console.log(files);
+ //=> ['.DS_Store', 'test.jpg']
+
+ console.log(files.filter(junk.not));
+ //=> ['test.jpg']
+ })();
+ ```
+ */
+ not(filename: string): boolean;
+
+ /**
+ Regex used for matching junk files.
+ */
+ readonly regex: RegExp;
+
+ // TODO: Remove this for the next major release
+ default: typeof junk;
+};
+
+export = junk;
diff --git a/node_modules/junk/index.js b/node_modules/junk/index.js
new file mode 100644
index 0000000..76efefa
--- /dev/null
+++ b/node_modules/junk/index.js
@@ -0,0 +1,39 @@
+'use strict';
+
+const blacklist = [
+ // # All
+ '^npm-debug\\.log$', // Error log for npm
+ '^\\..*\\.swp$', // Swap file for vim state
+
+ // # macOS
+ '^\\.DS_Store$', // Stores custom folder attributes
+ '^\\.AppleDouble$', // Stores additional file resources
+ '^\\.LSOverride$', // Contains the absolute path to the app to be used
+ '^Icon\\r$', // Custom Finder icon: http://superuser.com/questions/298785/icon-file-on-os-x-desktop
+ '^\\._.*', // Thumbnail
+ '^\\.Spotlight-V100(?:$|\\/)', // Directory that might appear on external disk
+ '\\.Trashes', // File that might appear on external disk
+ '^__MACOSX$', // Resource fork
+
+ // # Linux
+ '~$', // Backup file
+
+ // # Windows
+ '^Thumbs\\.db$', // Image file cache
+ '^ehthumbs\\.db$', // Folder config file
+ '^Desktop\\.ini$', // Stores custom folder attributes
+ '@eaDir$' // Synology Diskstation "hidden" folder where the server stores thumbnails
+];
+
+exports.re = () => {
+ throw new Error('`junk.re` was renamed to `junk.regex`');
+};
+
+exports.regex = new RegExp(blacklist.join('|'));
+
+exports.is = filename => exports.regex.test(filename);
+
+exports.not = filename => !exports.is(filename);
+
+// TODO: Remove this for the next major release
+exports.default = module.exports;
diff --git a/node_modules/junk/license b/node_modules/junk/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/junk/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/junk/package.json b/node_modules/junk/package.json
new file mode 100644
index 0000000..2c940f7
--- /dev/null
+++ b/node_modules/junk/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "junk",
+ "version": "3.1.0",
+ "description": "Filter out system junk files like .DS_Store and Thumbs.db",
+ "license": "MIT",
+ "repository": "sindresorhus/junk",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "junk",
+ "trash",
+ "garbage",
+ "files",
+ "os",
+ "ignore",
+ "exclude",
+ "filter",
+ "temp",
+ "tmp",
+ "system",
+ "clean",
+ "cleanup"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/junk/readme.md b/node_modules/junk/readme.md
new file mode 100644
index 0000000..74c23ca
--- /dev/null
+++ b/node_modules/junk/readme.md
@@ -0,0 +1,51 @@
+# junk [![Build Status](https://travis-ci.org/sindresorhus/junk.svg?branch=master)](https://travis-ci.org/sindresorhus/junk)
+
+> Filter out [system junk files](test.js) like `.DS_Store` and `Thumbs.db`
+
+
+## Install
+
+```
+$ npm install junk
+```
+
+
+## Usage
+
+```js
+const {promisify} = require('util');
+const fs = require('fs');
+const junk = require('junk');
+
+const pReaddir = promisify(fs.readdir);
+
+(async () => {
+ const files = await pReaddir('some/path');
+
+ console.log(files);
+ //=> ['.DS_Store', 'test.jpg']
+
+ console.log(files.filter(junk.not));
+ //=> ['test.jpg']
+})();
+```
+
+
+## API
+
+### junk.is(filename)
+
+Returns `true` if `filename` matches a junk file.
+
+### junk.not(filename)
+
+Returns `true` if `filename` doesn't match a junk file.
+
+### junk.regex
+
+Regex used for matching junk files.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/keyv/README.md b/node_modules/keyv/README.md
new file mode 100644
index 0000000..7c8d437
--- /dev/null
+++ b/node_modules/keyv/README.md
@@ -0,0 +1,405 @@
+<h1 align="center">
+ <img width="250" src="https://jaredwray.com/images/keyv.svg" alt="keyv">
+ <br>
+ <br>
+</h1>
+
+> Simple key-value storage with support for multiple backends
+
+[![build](https://github.com/jaredwray/keyv/actions/workflows/tests.yaml/badge.svg)](https://github.com/jaredwray/keyv/actions/workflows/tests.yaml)
+[![codecov](https://codecov.io/gh/jaredwray/keyv/branch/main/graph/badge.svg?token=bRzR3RyOXZ)](https://codecov.io/gh/jaredwray/keyv)
+[![npm](https://img.shields.io/npm/dm/keyv.svg)](https://www.npmjs.com/package/keyv)
+[![npm](https://img.shields.io/npm/v/keyv.svg)](https://www.npmjs.com/package/keyv)
+
+Keyv provides a consistent interface for key-value storage across multiple backends via storage adapters. It supports TTL based expiry, making it suitable as a cache or a persistent key-value store.
+
+## Features
+
+There are a few existing modules similar to Keyv, however Keyv is different because it:
+
+- Isn't bloated
+- Has a simple Promise based API
+- Suitable as a TTL based cache or persistent key-value store
+- [Easily embeddable](#add-cache-support-to-your-module) inside another module
+- Works with any storage that implements the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) API
+- Handles all JSON types plus `Buffer`
+- Supports namespaces
+- Wide range of [**efficient, well tested**](#official-storage-adapters) storage adapters
+- Connection errors are passed through (db failures won't kill your app)
+- Supports the current active LTS version of Node.js or higher
+
+## Usage
+
+Install Keyv.
+
+```
+npm install --save keyv
+```
+
+By default everything is stored in memory, you can optionally also install a storage adapter.
+
+```
+npm install --save @keyv/redis
+npm install --save @keyv/mongo
+npm install --save @keyv/sqlite
+npm install --save @keyv/postgres
+npm install --save @keyv/mysql
+npm install --save @keyv/etcd
+```
+
+Create a new Keyv instance, passing your connection string if applicable. Keyv will automatically load the correct storage adapter.
+
+```js
+const Keyv = require('keyv');
+
+// One of the following
+const keyv = new Keyv();
+const keyv = new Keyv('redis://user:pass@localhost:6379');
+const keyv = new Keyv('mongodb://user:pass@localhost:27017/dbname');
+const keyv = new Keyv('sqlite://path/to/database.sqlite');
+const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname');
+const keyv = new Keyv('mysql://user:pass@localhost:3306/dbname');
+const keyv = new Keyv('etcd://localhost:2379');
+
+// Handle DB connection errors
+keyv.on('error', err => console.log('Connection Error', err));
+
+await keyv.set('foo', 'expires in 1 second', 1000); // true
+await keyv.set('foo', 'never expires'); // true
+await keyv.get('foo'); // 'never expires'
+await keyv.delete('foo'); // true
+await keyv.clear(); // undefined
+```
+
+### Namespaces
+
+You can namespace your Keyv instance to avoid key collisions and allow you to clear only a certain namespace while using the same database.
+
+```js
+const users = new Keyv('redis://user:pass@localhost:6379', { namespace: 'users' });
+const cache = new Keyv('redis://user:pass@localhost:6379', { namespace: 'cache' });
+
+await users.set('foo', 'users'); // true
+await cache.set('foo', 'cache'); // true
+await users.get('foo'); // 'users'
+await cache.get('foo'); // 'cache'
+await users.clear(); // undefined
+await users.get('foo'); // undefined
+await cache.get('foo'); // 'cache'
+```
+
+### Custom Serializers
+
+Keyv uses [`json-buffer`](https://github.com/dominictarr/json-buffer) for data serialization to ensure consistency across different backends.
+
+You can optionally provide your own serialization functions to support extra data types or to serialize to something other than JSON.
+
+```js
+const keyv = new Keyv({ serialize: JSON.stringify, deserialize: JSON.parse });
+```
+
+**Warning:** Using custom serializers means you lose any guarantee of data consistency. You should do extensive testing with your serialisation functions and chosen storage engine.
+
+## Official Storage Adapters
+
+The official storage adapters are covered by [over 150 integration tests](https://github.com/jaredwray/keyv/actions/workflows/tests.yaml) to guarantee consistent behaviour. They are lightweight, efficient wrappers over the DB clients making use of indexes and native TTLs where available.
+
+Database | Adapter | Native TTL
+---|---|---
+Redis | [@keyv/redis](https://github.com/jaredwray/keyv/tree/master/packages/redis) | Yes
+MongoDB | [@keyv/mongo](https://github.com/jaredwray/keyv/tree/master/packages/mongo) | Yes
+SQLite | [@keyv/sqlite](https://github.com/jaredwray/keyv/tree/master/packages/sqlite) | No
+PostgreSQL | [@keyv/postgres](https://github.com/jaredwray/keyv/tree/master/packages/postgres) | No
+MySQL | [@keyv/mysql](https://github.com/jaredwray/keyv/tree/master/packages/mysql) | No
+Etcd | [@keyv/etcd](https://github.com/jaredwray/keyv/tree/master/packages/etcd) | Yes
+Memcache | [@keyv/memcache](https://github.com/jaredwray/keyv/tree/master/packages/memcache) | Yes
+
+## Third-party Storage Adapters
+
+You can also use third-party storage adapters or build your own. Keyv will wrap these storage adapters in TTL functionality and handle complex types internally.
+
+```js
+const Keyv = require('keyv');
+const myAdapter = require('./my-storage-adapter');
+
+const keyv = new Keyv({ store: myAdapter });
+```
+
+Any store that follows the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) api will work.
+
+```js
+new Keyv({ store: new Map() });
+```
+
+For example, [`quick-lru`](https://github.com/sindresorhus/quick-lru) is a completely unrelated module that implements the Map API.
+
+```js
+const Keyv = require('keyv');
+const QuickLRU = require('quick-lru');
+
+const lru = new QuickLRU({ maxSize: 1000 });
+const keyv = new Keyv({ store: lru });
+```
+
+The following are third-party storage adapters compatible with Keyv:
+
+- [quick-lru](https://github.com/sindresorhus/quick-lru) - Simple "Least Recently Used" (LRU) cache
+- [keyv-file](https://github.com/zaaack/keyv-file) - File system storage adapter for Keyv
+- [keyv-dynamodb](https://www.npmjs.com/package/keyv-dynamodb) - DynamoDB storage adapter for Keyv
+- [keyv-lru](https://www.npmjs.com/package/keyv-lru) - LRU storage adapter for Keyv
+- [keyv-null](https://www.npmjs.com/package/keyv-null) - Null storage adapter for Keyv
+- [keyv-firestore ](https://github.com/goto-bus-stop/keyv-firestore) – Firebase Cloud Firestore adapter for Keyv
+- [keyv-mssql](https://github.com/pmorgan3/keyv-mssql) - Microsoft Sql Server adapter for Keyv
+- [keyv-azuretable](https://github.com/howlowck/keyv-azuretable) - Azure Table Storage/API adapter for Keyv
+
+## Add Cache Support to your Module
+
+Keyv is designed to be easily embedded into other modules to add cache support. The recommended pattern is to expose a `cache` option in your modules options which is passed through to Keyv. Caching will work in memory by default and users have the option to also install a Keyv storage adapter and pass in a connection string, or any other storage that implements the `Map` API.
+
+You should also set a namespace for your module so you can safely call `.clear()` without clearing unrelated app data.
+
+Inside your module:
+
+```js
+class AwesomeModule {
+ constructor(opts) {
+ this.cache = new Keyv({
+ uri: typeof opts.cache === 'string' && opts.cache,
+ store: typeof opts.cache !== 'string' && opts.cache,
+ namespace: 'awesome-module'
+ });
+ }
+}
+```
+
+Now it can be consumed like this:
+
+```js
+const AwesomeModule = require('awesome-module');
+
+// Caches stuff in memory by default
+const awesomeModule = new AwesomeModule();
+
+// After npm install --save keyv-redis
+const awesomeModule = new AwesomeModule({ cache: 'redis://localhost' });
+
+// Some third-party module that implements the Map API
+const awesomeModule = new AwesomeModule({ cache: some3rdPartyStore });
+```
+
+## Compression
+
+Keyv supports `gzip` and `brotli` compression. To enable compression, pass the `compress` option to the constructor.
+
+```js
+const KeyvGzip = require('@keyv/compress-gzip');
+const Keyv = require('keyv');
+
+const keyvGzip = new KeyvGzip();;
+const keyv = new Keyv({ compression: KeyvGzip });
+```
+
+You can also pass a custom compression function to the `compression` option. Following the pattern of the official compression adapters.
+
+## API
+
+### new Keyv([uri], [options])
+
+Returns a new Keyv instance.
+
+The Keyv instance is also an `EventEmitter` that will emit an `'error'` event if the storage adapter connection fails.
+
+### uri
+
+Type: `String`<br>
+Default: `undefined`
+
+The connection string URI.
+
+Merged into the options object as options.uri.
+
+### options
+
+Type: `Object`
+
+The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
+
+#### options.namespace
+
+Type: `String`<br>
+Default: `'keyv'`
+
+Namespace for the current instance.
+
+#### options.ttl
+
+Type: `Number`<br>
+Default: `undefined`
+
+Default TTL. Can be overridden by specififying a TTL on `.set()`.
+
+#### options.compression
+
+Type: `@keyv/compress-<compression_package_name>`<br>
+Default: `undefined`
+
+Compression package to use. See [Compression](#compression) for more details.
+
+#### options.serialize
+
+Type: `Function`<br>
+Default: `JSONB.stringify`
+
+A custom serialization function.
+
+#### options.deserialize
+
+Type: `Function`<br>
+Default: `JSONB.parse`
+
+A custom deserialization function.
+
+#### options.store
+
+Type: `Storage adapter instance`<br>
+Default: `new Map()`
+
+The storage adapter instance to be used by Keyv.
+
+#### options.adapter
+
+Type: `String`<br>
+Default: `undefined`
+
+Specify an adapter to use. e.g `'redis'` or `'mongodb'`.
+
+### Instance
+
+Keys must always be strings. Values can be of any type.
+
+#### .set(key, value, [ttl])
+
+Set a value.
+
+By default keys are persistent. You can set an expiry TTL in milliseconds.
+
+Returns a promise which resolves to `true`.
+
+#### .get(key, [options])
+
+Returns a promise which resolves to the retrieved value.
+
+##### options.raw
+
+Type: `Boolean`<br>
+Default: `false`
+
+If set to true the raw DB object Keyv stores internally will be returned instead of just the value.
+
+This contains the TTL timestamp.
+
+#### .delete(key)
+
+Deletes an entry.
+
+Returns a promise which resolves to `true` if the key existed, `false` if not.
+
+#### .clear()
+
+Delete all entries in the current namespace.
+
+Returns a promise which is resolved when the entries have been cleared.
+
+#### .iterator()
+
+Iterate over all entries of the current namespace.
+
+Returns a iterable that can be iterated by for-of loops. For example:
+
+```js
+// please note that the "await" keyword should be used here
+for await (const [key, value] of this.keyv.iterator()) {
+ console.log(key, value);
+};
+```
+
+# How to Contribute
+
+In this section of the documentation we will cover:
+
+1) How to set up this repository locally
+2) How to get started with running commands
+3) How to contribute changes using Pull Requests
+
+## Dependencies
+
+This package requires the following dependencies to run:
+
+1) [Yarn V1](https://yarnpkg.com/getting-started/install)
+3) [Docker](https://docs.docker.com/get-docker/)
+
+## Setting up your workspace
+
+To contribute to this repository, start by setting up this project locally:
+
+1) Fork this repository into your Git account
+2) Clone the forked repository to your local directory using `git clone`
+3) Install any of the above missing dependencies
+
+## Launching the project
+
+Once the project is installed locally, you are ready to start up its services:
+
+1) Ensure that your Docker service is running.
+2) From the root directory of your project, run the `yarn` command in the command prompt to install yarn.
+3) Run the `yarn bootstrap` command to install any necessary dependencies.
+4) Run `yarn test:services:start` to start up this project's Docker container. The container will launch all services within your workspace.
+
+## Available Commands
+
+Once the project is running, you can execute a variety of commands. The root workspace and each subpackage contain a `package.json` file with a `scripts` field listing all the commands that can be executed from that directory. This project also supports native `yarn`, and `docker` commands.
+
+Here, we'll cover the primary commands that can be executed from the root directory. Unless otherwise noted, these commands can also be executed from a subpackage. If executed from a subpackage, they will only affect that subpackage, rather than the entire workspace.
+
+### `yarn`
+
+The `yarn` command installs yarn in the workspace.
+
+### `yarn bootstrap`
+
+The `yarn bootstrap` command installs all dependencies in the workspace.
+
+### `yarn test:services:start`
+
+The `yarn test:services:start` command starts up the project's Docker container, launching all services in the workspace. This command must be executed from the root directory.
+
+### `yarn test:services:stop`
+
+The `yarn test:services:stop` command brings down the project's Docker container, halting all services. This command must be executed from the root directory.
+
+### `yarn test`
+
+The `yarn test` command runs all tests in the workspace.
+
+### `yarn clean`
+
+The `yarn clean` command removes yarn and all dependencies installed by yarn. After executing this command, you must repeat the steps in *Setting up your workspace* to rebuild your workspace.
+
+## Contributing Changes
+
+Now that you've set up your workspace, you're ready to contribute changes to the `keyv` repository.
+
+1) Make any changes that you would like to contribute in your local workspace.
+2) After making these changes, ensure that the project's tests still pass by executing the `yarn test` command in the root directory.
+3) Commit your changes and push them to your forked repository.
+4) Navigate to the original `keyv` repository and go the *Pull Requests* tab.
+5) Click the *New pull request* button, and open a pull request for the branch in your repository that contains your changes.
+6) Once your pull request is created, ensure that all checks have passed and that your branch has no conflicts with the base branch. If there are any issues, resolve these changes in your local repository, and then commit and push them to git.
+7) Similarly, respond to any reviewer comments or requests for changes by making edits to your local repository and pushing them to Git.
+8) Once the pull request has been reviewed, those with write access to the branch will be able to merge your changes into the `keyv` repository.
+
+If you need more information on the steps to create a pull request, you can find a detailed walkthrough in the [Github documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)
+
+## License
+
+MIT © Jared Wray
diff --git a/node_modules/keyv/package.json b/node_modules/keyv/package.json
new file mode 100644
index 0000000..1c664ee
--- /dev/null
+++ b/node_modules/keyv/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "keyv",
+ "version": "4.5.0",
+ "description": "Simple key-value storage with support for multiple backends",
+ "main": "src/index.js",
+ "scripts": {
+ "test": "xo && nyc ava --serial",
+ "coverage": "nyc report --reporter=text-lcov > coverage.lcov",
+ "clean": "rm -rf node_modules && rm -rf .nyc_output && rm -rf coverage.lcov && rm -rf ./test/testdb.sqlite"
+ },
+ "xo": {
+ "rules": {
+ "unicorn/prefer-module": 0,
+ "unicorn/prefer-node-protocol": 0
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jaredwray/keyv.git"
+ },
+ "keywords": [
+ "key",
+ "value",
+ "store",
+ "cache",
+ "ttl"
+ ],
+ "author": "Jared Wray <me@jaredwray.com> (http://jaredwray.com)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jaredwray/keyv/issues"
+ },
+ "homepage": "https://github.com/jaredwray/keyv",
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ },
+ "devDependencies": {
+ "@keyv/test-suite": "*",
+ "ava": "^4.3.0",
+ "eslint": "^8.19.0",
+ "eslint-plugin-promise": "^6.0.0",
+ "nyc": "^15.1.0",
+ "pify": "5.0.0",
+ "this": "^1.1.0",
+ "timekeeper": "^2.2.0",
+ "tsd": "^0.22.0",
+ "typescript": "^4.7.4",
+ "xo": "^0.51.0"
+ },
+ "tsd": {
+ "directory": "test"
+ },
+ "types": "./src/index.d.ts",
+ "files": [
+ "src"
+ ]
+}
diff --git a/node_modules/keyv/src/index.d.ts b/node_modules/keyv/src/index.d.ts
new file mode 100644
index 0000000..e7e683d
--- /dev/null
+++ b/node_modules/keyv/src/index.d.ts
@@ -0,0 +1,109 @@
+import {EventEmitter} from 'events';
+
+type WithRequiredProperties<T, K extends keyof T> = T & Required<Pick<T, K>>;
+
+declare class Keyv<Value = any, Options extends Record<string, any> = Record<string, unknown>> extends EventEmitter {
+ /**
+ * `this.opts` is an object containing at least the properties listed
+ * below. However, `Keyv.Options` allows arbitrary properties as well.
+ * These properties can be specified as the second type parameter to `Keyv`.
+ */
+ opts: WithRequiredProperties<
+ Keyv.Options<Value>,
+ 'deserialize' | 'namespace' | 'serialize' | 'store' | 'uri'
+ > &
+ Options;
+
+ /**
+ * @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
+ */
+ constructor(options?: Keyv.Options<Value> & Options);
+ /**
+ * @param uri The connection string URI.
+ *
+ * Merged into the options object as options.uri.
+ * @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
+ */
+ constructor(uri?: string, options?: Keyv.Options<Value> & Options);
+
+ /** Returns the value. */
+ get<Raw extends boolean = false>(key: string, options?: {raw?: Raw}):
+ Promise<(Raw extends false
+ ? Value
+ : Keyv.DeserializedData<Value>) | undefined>;
+
+ /** Returns an array of values. Uses `store.getMany` if it exists, otherwise uses parallel calls to `store.get`. */
+ get<Raw extends boolean = false>(
+ key: string[],
+ options?: {raw?: Raw}
+ ): Promise<
+ Array<(Raw extends false ? Value : Keyv.DeserializedData<Value>) | undefined>
+ >;
+
+ /**
+ * Set a value.
+ *
+ * By default keys are persistent. You can set an expiry TTL in milliseconds.
+ */
+ set(key: string, value: Value, ttl?: number): Promise<true>;
+ /**
+ * Deletes an entry.
+ *
+ * Returns `true` if the key existed, `false` if not.
+ */
+ delete(key: string | string[]): Promise<boolean>;
+ /** Delete all entries in the current namespace. */
+ clear(): Promise<void>;
+ /** Check if key exists in current namespace. */
+ has(key: string): Promise<boolean>;
+ /** Iterator */
+ iterator(namespace?: string): AsyncGenerator<any, void, any>;
+ /**
+ * Closes the connection.
+ *
+ * Returns `undefined` when the connection closes.
+ */
+ disconnect(): Promise<void>;
+}
+
+declare namespace Keyv {
+ interface Options<Value> {
+ [key: string]: any;
+
+ /** Namespace for the current instance. */
+ namespace?: string | undefined;
+ /** A custom serialization function. */
+ serialize?: ((data: DeserializedData<Value>) => string) | undefined;
+ /** A custom deserialization function. */
+ deserialize?: ((data: string) => DeserializedData<Value> | undefined) | undefined;
+ /** The connection string URI. */
+ uri?: string | undefined;
+ /** The storage adapter instance to be used by Keyv. */
+ store?: Store<string | undefined> | undefined;
+ /** Default TTL. Can be overridden by specififying a TTL on `.set()`. */
+ ttl?: number | undefined;
+ /** Specify an adapter to use. e.g `'redis'` or `'mongodb'`. */
+ adapter?: 'redis' | 'mongodb' | 'mongo' | 'sqlite' | 'postgresql' | 'postgres' | 'mysql' | undefined;
+ /** Enable compression option **/
+ compress?: Record<string, unknown> | undefined;
+ }
+
+ interface DeserializedData<Value> {
+ value: Value; expires: number | undefined;
+ }
+
+ type StoredData<Value> = DeserializedData<Value> | string | undefined;
+
+ interface Store<Value> {
+ get(key: string): Value | Promise<Value | undefined> | undefined;
+ set(key: string, value: Value, ttl?: number): any;
+ delete(key: string): boolean | Promise<boolean>;
+ clear(): void | Promise<void>;
+ has?(key: string): boolean | Promise<boolean>;
+ getMany?(
+ keys: string[]
+ ): Array<StoredData<Value>> | Promise<Array<StoredData<Value>>> | undefined;
+ }
+}
+
+export = Keyv;
diff --git a/node_modules/keyv/src/index.js b/node_modules/keyv/src/index.js
new file mode 100644
index 0000000..00c7316
--- /dev/null
+++ b/node_modules/keyv/src/index.js
@@ -0,0 +1,265 @@
+'use strict';
+
+const EventEmitter = require('events');
+const JSONB = require('json-buffer');
+
+const loadStore = options => {
+ const adapters = {
+ redis: '@keyv/redis',
+ rediss: '@keyv/redis',
+ mongodb: '@keyv/mongo',
+ mongo: '@keyv/mongo',
+ sqlite: '@keyv/sqlite',
+ postgresql: '@keyv/postgres',
+ postgres: '@keyv/postgres',
+ mysql: '@keyv/mysql',
+ etcd: '@keyv/etcd',
+ offline: '@keyv/offline',
+ tiered: '@keyv/tiered',
+ };
+ if (options.adapter || options.uri) {
+ const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0];
+ return new (require(adapters[adapter]))(options);
+ }
+
+ return new Map();
+};
+
+const iterableAdapters = [
+ 'sqlite',
+ 'postgres',
+ 'mysql',
+ 'mongo',
+ 'redis',
+ 'tiered',
+];
+
+class Keyv extends EventEmitter {
+ constructor(uri, {emitErrors = true, ...options} = {}) {
+ super();
+ this.opts = {
+ namespace: 'keyv',
+ serialize: JSONB.stringify,
+ deserialize: JSONB.parse,
+ ...((typeof uri === 'string') ? {uri} : uri),
+ ...options,
+ };
+
+ if (!this.opts.store) {
+ const adapterOptions = {...this.opts};
+ this.opts.store = loadStore(adapterOptions);
+ }
+
+ if (this.opts.compression) {
+ const compression = this.opts.compression;
+ const {serialize, deserialize} = compression.opts;
+ this.opts.serialize = serialize;
+ this.opts.deserialize = deserialize;
+ }
+
+ if (typeof this.opts.store.on === 'function' && emitErrors) {
+ this.opts.store.on('error', error => this.emit('error', error));
+ }
+
+ this.opts.store.namespace = this.opts.namespace;
+
+ const generateIterator = iterator => async function * () {
+ for await (const [key, raw] of typeof iterator === 'function'
+ ? iterator(this.opts.store.namespace)
+ : iterator) {
+ const data = this.opts.deserialize(raw);
+ if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) {
+ continue;
+ }
+
+ if (typeof data.expires === 'number' && Date.now() > data.expires) {
+ this.delete(key);
+ continue;
+ }
+
+ yield [this._getKeyUnprefix(key), data.value];
+ }
+ };
+
+ // Attach iterators
+ if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) {
+ this.iterator = generateIterator(this.opts.store);
+ } else if (typeof this.opts.store.iterator === 'function' && this.opts.store.opts
+ && this._checkIterableAdaptar()) {
+ this.iterator = generateIterator(this.opts.store.iterator.bind(this.opts.store));
+ }
+ }
+
+ _checkIterableAdaptar() {
+ return iterableAdapters.includes(this.opts.store.opts.dialect)
+ || iterableAdapters.findIndex(element => this.opts.store.opts.url.includes(element)) >= 0;
+ }
+
+ _getKeyPrefix(key) {
+ return `${this.opts.namespace}:${key}`;
+ }
+
+ _getKeyPrefixArray(keys) {
+ return keys.map(key => `${this.opts.namespace}:${key}`);
+ }
+
+ _getKeyUnprefix(key) {
+ return key
+ .split(':')
+ .splice(1)
+ .join(':');
+ }
+
+ get(key, options) {
+ const {store} = this.opts;
+ const isArray = Array.isArray(key);
+ const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key);
+ if (isArray && store.getMany === undefined) {
+ const promises = [];
+ for (const key of keyPrefixed) {
+ promises.push(Promise.resolve()
+ .then(() => store.get(key))
+ .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : data)
+ .then(data => {
+ if (data === undefined || data === null) {
+ return undefined;
+ }
+
+ if (typeof data.expires === 'number' && Date.now() > data.expires) {
+ return this.delete(key).then(() => undefined);
+ }
+
+ return (options && options.raw) ? data : data.value;
+ }),
+ );
+ }
+
+ return Promise.allSettled(promises)
+ .then(values => {
+ const data = [];
+ for (const value of values) {
+ data.push(value.value);
+ }
+
+ return data;
+ });
+ }
+
+ return Promise.resolve()
+ .then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed))
+ .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : data)
+ .then(data => {
+ if (data === undefined || data === null) {
+ return undefined;
+ }
+
+ if (isArray) {
+ const result = [];
+
+ for (let row of data) {
+ if ((typeof row === 'string')) {
+ row = this.opts.deserialize(row);
+ }
+
+ if (row === undefined || row === null) {
+ result.push(undefined);
+ continue;
+ }
+
+ if (typeof row.expires === 'number' && Date.now() > row.expires) {
+ this.delete(key).then(() => undefined);
+ result.push(undefined);
+ } else {
+ result.push((options && options.raw) ? row : row.value);
+ }
+ }
+
+ return result;
+ }
+
+ if (typeof data.expires === 'number' && Date.now() > data.expires) {
+ return this.delete(key).then(() => undefined);
+ }
+
+ return (options && options.raw) ? data : data.value;
+ });
+ }
+
+ set(key, value, ttl) {
+ const keyPrefixed = this._getKeyPrefix(key);
+ if (typeof ttl === 'undefined') {
+ ttl = this.opts.ttl;
+ }
+
+ if (ttl === 0) {
+ ttl = undefined;
+ }
+
+ const {store} = this.opts;
+
+ return Promise.resolve()
+ .then(() => {
+ const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null;
+ if (typeof value === 'symbol') {
+ this.emit('error', 'symbol cannot be serialized');
+ }
+
+ value = {value, expires};
+ return this.opts.serialize(value);
+ })
+ .then(value => store.set(keyPrefixed, value, ttl))
+ .then(() => true);
+ }
+
+ delete(key) {
+ const {store} = this.opts;
+ if (Array.isArray(key)) {
+ const keyPrefixed = this._getKeyPrefixArray(key);
+ if (store.deleteMany === undefined) {
+ const promises = [];
+ for (const key of keyPrefixed) {
+ promises.push(store.delete(key));
+ }
+
+ return Promise.allSettled(promises)
+ .then(values => values.every(x => x.value === true));
+ }
+
+ return Promise.resolve()
+ .then(() => store.deleteMany(keyPrefixed));
+ }
+
+ const keyPrefixed = this._getKeyPrefix(key);
+ return Promise.resolve()
+ .then(() => store.delete(keyPrefixed));
+ }
+
+ clear() {
+ const {store} = this.opts;
+ return Promise.resolve()
+ .then(() => store.clear());
+ }
+
+ has(key) {
+ const keyPrefixed = this._getKeyPrefix(key);
+ const {store} = this.opts;
+ return Promise.resolve()
+ .then(async () => {
+ if (typeof store.has === 'function') {
+ return store.has(keyPrefixed);
+ }
+
+ const value = await store.get(keyPrefixed);
+ return value !== undefined;
+ });
+ }
+
+ disconnect() {
+ const {store} = this.opts;
+ if (typeof store.disconnect === 'function') {
+ return store.disconnect();
+ }
+ }
+}
+
+module.exports = Keyv;
diff --git a/node_modules/load-json-file/index.js b/node_modules/load-json-file/index.js
new file mode 100644
index 0000000..96d4d9f
--- /dev/null
+++ b/node_modules/load-json-file/index.js
@@ -0,0 +1,21 @@
+'use strict';
+var path = require('path');
+var fs = require('graceful-fs');
+var stripBom = require('strip-bom');
+var parseJson = require('parse-json');
+var Promise = require('pinkie-promise');
+var pify = require('pify');
+
+function parse(x, fp) {
+ return parseJson(stripBom(x), path.relative(process.cwd(), fp));
+}
+
+module.exports = function (fp) {
+ return pify(fs.readFile, Promise)(fp, 'utf8').then(function (data) {
+ return parse(data, fp);
+ });
+};
+
+module.exports.sync = function (fp) {
+ return parse(fs.readFileSync(fp, 'utf8'), fp);
+};
diff --git a/node_modules/load-json-file/license b/node_modules/load-json-file/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/load-json-file/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/load-json-file/package.json b/node_modules/load-json-file/package.json
new file mode 100644
index 0000000..b44c8a1
--- /dev/null
+++ b/node_modules/load-json-file/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "load-json-file",
+ "version": "1.1.0",
+ "description": "Read and parse a JSON file",
+ "license": "MIT",
+ "repository": "sindresorhus/load-json-file",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "json",
+ "read",
+ "parse",
+ "file",
+ "fs",
+ "graceful",
+ "load"
+ ],
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "strip-bom": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "ignores": [
+ "test.js"
+ ]
+ }
+}
diff --git a/node_modules/load-json-file/readme.md b/node_modules/load-json-file/readme.md
new file mode 100644
index 0000000..fa982b5
--- /dev/null
+++ b/node_modules/load-json-file/readme.md
@@ -0,0 +1,45 @@
+# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file)
+
+> Read and parse a JSON file
+
+[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json).
+
+
+## Install
+
+```
+$ npm install --save load-json-file
+```
+
+
+## Usage
+
+```js
+const loadJsonFile = require('load-json-file');
+
+loadJsonFile('foo.json').then(json => {
+ console.log(json);
+ //=> {foo: true}
+});
+```
+
+
+## API
+
+### loadJsonFile(filepath)
+
+Returns a promise that resolves to the parsed JSON.
+
+### loadJsonFile.sync(filepath)
+
+Returns the parsed JSON.
+
+
+## Related
+
+- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/locate-path/index.js b/node_modules/locate-path/index.js
new file mode 100644
index 0000000..32b108d
--- /dev/null
+++ b/node_modules/locate-path/index.js
@@ -0,0 +1,24 @@
+'use strict';
+const path = require('path');
+const pathExists = require('path-exists');
+const pLocate = require('p-locate');
+
+module.exports = (iterable, opts) => {
+ opts = Object.assign({
+ cwd: process.cwd()
+ }, opts);
+
+ return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts);
+};
+
+module.exports.sync = (iterable, opts) => {
+ opts = Object.assign({
+ cwd: process.cwd()
+ }, opts);
+
+ for (const el of iterable) {
+ if (pathExists.sync(path.resolve(opts.cwd, el))) {
+ return el;
+ }
+ }
+};
diff --git a/node_modules/locate-path/license b/node_modules/locate-path/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/locate-path/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/locate-path/package.json b/node_modules/locate-path/package.json
new file mode 100644
index 0000000..17bcd7f
--- /dev/null
+++ b/node_modules/locate-path/package.json
@@ -0,0 +1,47 @@
+{
+ "name": "locate-path",
+ "version": "2.0.0",
+ "description": "Get the first path that exists on disk of multiple paths",
+ "license": "MIT",
+ "repository": "sindresorhus/locate-path",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "locate",
+ "path",
+ "paths",
+ "file",
+ "files",
+ "exists",
+ "find",
+ "finder",
+ "search",
+ "searcher",
+ "array",
+ "iterable",
+ "iterator"
+ ],
+ "dependencies": {
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/locate-path/readme.md b/node_modules/locate-path/readme.md
new file mode 100644
index 0000000..f7b337b
--- /dev/null
+++ b/node_modules/locate-path/readme.md
@@ -0,0 +1,99 @@
+# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path)
+
+> Get the first path that exists on disk of multiple paths
+
+
+## Install
+
+```
+$ npm install --save locate-path
+```
+
+
+## Usage
+
+Here we find the first file that exists on disk, in array order.
+
+```js
+const locatePath = require('locate-path');
+
+const files = [
+ 'unicorn.png',
+ 'rainbow.png', // only this one actually exists on disk
+ 'pony.png'
+];
+
+locatePath(files).then(foundPath => {
+ console.log(foundPath);
+ //=> 'rainbow'
+});
+```
+
+
+## API
+
+### locatePath(input, [options])
+
+Returns a `Promise` for the first path that exists or `undefined` if none exists.
+
+#### input
+
+Type: `Iterable<string>`
+
+Paths to check.
+
+#### options
+
+Type: `Object`
+
+##### concurrency
+
+Type: `number`<br>
+Default: `Infinity`<br>
+Minimum: `1`
+
+Number of concurrently pending promises.
+
+##### preserveOrder
+
+Type: `boolean`<br>
+Default: `true`
+
+Preserve `input` order when searching.
+
+Disable this to improve performance if you don't care about the order.
+
+##### cwd
+
+Type: `string`<br>
+Default: `process.cwd()`
+
+Current working directory.
+
+### locatePath.sync(input, [options])
+
+Returns the first path that exists or `undefined` if none exists.
+
+#### input
+
+Type: `Iterable<string>`
+
+Paths to check.
+
+#### options
+
+Type: `Object`
+
+##### cwd
+
+Same as above.
+
+
+## Related
+
+- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/lodash.get/LICENSE b/node_modules/lodash.get/LICENSE
new file mode 100644
index 0000000..e0c69d5
--- /dev/null
+++ b/node_modules/lodash.get/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+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.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/node_modules/lodash.get/README.md b/node_modules/lodash.get/README.md
new file mode 100644
index 0000000..9079614
--- /dev/null
+++ b/node_modules/lodash.get/README.md
@@ -0,0 +1,18 @@
+# lodash.get v4.4.2
+
+The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.get
+```
+
+In Node.js:
+```js
+var get = require('lodash.get');
+```
+
+See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details.
diff --git a/node_modules/lodash.get/index.js b/node_modules/lodash.get/index.js
new file mode 100644
index 0000000..0eaadec
--- /dev/null
+++ b/node_modules/lodash.get/index.js
@@ -0,0 +1,931 @@
+/**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ reLeadingDot = /^\./,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/** 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')();
+
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
+}
+
+/**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+}
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
+
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** 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 objectToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/** Built-in value references. */
+var Symbol = root.Symbol,
+ splice = arrayProto.splice;
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map'),
+ nativeCreate = getNative(Object, 'create');
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+}
+
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+}
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+}
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
+
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
+
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+}
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+}
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+}
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
+
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+}
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+}
+
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
+
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+}
+
+/**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+}
+
+/**
+ * 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 (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast property path array.
+ */
+function castPath(value) {
+ return isArray(value) ? value : stringToPath(value);
+}
+
+/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+}
+
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
+
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+}
+
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = memoize(function(string) {
+ string = toString(string);
+
+ var result = [];
+ if (reLeadingDot.test(string)) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+});
+
+/**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+}
+
+// Assign cache to `_.memoize`.
+memoize.Cache = MapCache;
+
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
+
+/**
+ * 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;
+
+/**
+ * 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) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
+/**
+ * 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 && (type == 'object' || type == 'function');
+}
+
+/**
+ * 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 && typeof value == 'object';
+}
+
+/**
+ * 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) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * 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 process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
+
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+}
+
+module.exports = get;
diff --git a/node_modules/lodash.get/package.json b/node_modules/lodash.get/package.json
new file mode 100644
index 0000000..3dd8e77
--- /dev/null
+++ b/node_modules/lodash.get/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash.get",
+ "version": "4.4.2",
+ "description": "The lodash method `_.get` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": "lodash-modularized, get",
+ "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
+ "contributors": [
+ "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
+ "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
+ "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
+ ],
+ "repository": "lodash/lodash",
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
+}
diff --git a/node_modules/lodash/LICENSE b/node_modules/lodash/LICENSE
new file mode 100644
index 0000000..77c42f1
--- /dev/null
+++ b/node_modules/lodash/LICENSE
@@ -0,0 +1,47 @@
+Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+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.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md
new file mode 100644
index 0000000..3ab1a05
--- /dev/null
+++ b/node_modules/lodash/README.md
@@ -0,0 +1,39 @@
+# lodash v4.17.21
+
+The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
+
+## Installation
+
+Using npm:
+```shell
+$ npm i -g npm
+$ npm i --save lodash
+```
+
+In Node.js:
+```js
+// Load the full build.
+var _ = require('lodash');
+// Load the core build.
+var _ = require('lodash/core');
+// Load the FP build for immutable auto-curried iteratee-first data-last methods.
+var fp = require('lodash/fp');
+
+// Load method categories.
+var array = require('lodash/array');
+var object = require('lodash/fp/object');
+
+// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
+var at = require('lodash/at');
+var curryN = require('lodash/fp/curryN');
+```
+
+See the [package source](https://github.com/lodash/lodash/tree/4.17.21-npm) for more details.
+
+**Note:**<br>
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
+
+## Support
+
+Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.<br>
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
diff --git a/node_modules/lodash/_DataView.js b/node_modules/lodash/_DataView.js
new file mode 100644
index 0000000..ac2d57c
--- /dev/null
+++ b/node_modules/lodash/_DataView.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var DataView = getNative(root, 'DataView');
+
+module.exports = DataView;
diff --git a/node_modules/lodash/_Hash.js b/node_modules/lodash/_Hash.js
new file mode 100644
index 0000000..b504fe3
--- /dev/null
+++ b/node_modules/lodash/_Hash.js
@@ -0,0 +1,32 @@
+var hashClear = require('./_hashClear'),
+ hashDelete = require('./_hashDelete'),
+ hashGet = require('./_hashGet'),
+ hashHas = require('./_hashHas'),
+ hashSet = require('./_hashSet');
+
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
+
+module.exports = Hash;
diff --git a/node_modules/lodash/_LazyWrapper.js b/node_modules/lodash/_LazyWrapper.js
new file mode 100644
index 0000000..81786c7
--- /dev/null
+++ b/node_modules/lodash/_LazyWrapper.js
@@ -0,0 +1,28 @@
+var baseCreate = require('./_baseCreate'),
+ baseLodash = require('./_baseLodash');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+}
+
+// Ensure `LazyWrapper` is an instance of `baseLodash`.
+LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+LazyWrapper.prototype.constructor = LazyWrapper;
+
+module.exports = LazyWrapper;
diff --git a/node_modules/lodash/_ListCache.js b/node_modules/lodash/_ListCache.js
new file mode 100644
index 0000000..26895c3
--- /dev/null
+++ b/node_modules/lodash/_ListCache.js
@@ -0,0 +1,32 @@
+var listCacheClear = require('./_listCacheClear'),
+ listCacheDelete = require('./_listCacheDelete'),
+ listCacheGet = require('./_listCacheGet'),
+ listCacheHas = require('./_listCacheHas'),
+ listCacheSet = require('./_listCacheSet');
+
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
+
+module.exports = ListCache;
diff --git a/node_modules/lodash/_LodashWrapper.js b/node_modules/lodash/_LodashWrapper.js
new file mode 100644
index 0000000..c1e4d9d
--- /dev/null
+++ b/node_modules/lodash/_LodashWrapper.js
@@ -0,0 +1,22 @@
+var baseCreate = require('./_baseCreate'),
+ baseLodash = require('./_baseLodash');
+
+/**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+}
+
+LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+LodashWrapper.prototype.constructor = LodashWrapper;
+
+module.exports = LodashWrapper;
diff --git a/node_modules/lodash/_Map.js b/node_modules/lodash/_Map.js
new file mode 100644
index 0000000..b73f29a
--- /dev/null
+++ b/node_modules/lodash/_Map.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map');
+
+module.exports = Map;
diff --git a/node_modules/lodash/_MapCache.js b/node_modules/lodash/_MapCache.js
new file mode 100644
index 0000000..4a4eea7
--- /dev/null
+++ b/node_modules/lodash/_MapCache.js
@@ -0,0 +1,32 @@
+var mapCacheClear = require('./_mapCacheClear'),
+ mapCacheDelete = require('./_mapCacheDelete'),
+ mapCacheGet = require('./_mapCacheGet'),
+ mapCacheHas = require('./_mapCacheHas'),
+ mapCacheSet = require('./_mapCacheSet');
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
+
+module.exports = MapCache;
diff --git a/node_modules/lodash/_Promise.js b/node_modules/lodash/_Promise.js
new file mode 100644
index 0000000..247b9e1
--- /dev/null
+++ b/node_modules/lodash/_Promise.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Promise = getNative(root, 'Promise');
+
+module.exports = Promise;
diff --git a/node_modules/lodash/_Set.js b/node_modules/lodash/_Set.js
new file mode 100644
index 0000000..b3c8dcb
--- /dev/null
+++ b/node_modules/lodash/_Set.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var Set = getNative(root, 'Set');
+
+module.exports = Set;
diff --git a/node_modules/lodash/_SetCache.js b/node_modules/lodash/_SetCache.js
new file mode 100644
index 0000000..6468b06
--- /dev/null
+++ b/node_modules/lodash/_SetCache.js
@@ -0,0 +1,27 @@
+var MapCache = require('./_MapCache'),
+ setCacheAdd = require('./_setCacheAdd'),
+ setCacheHas = require('./_setCacheHas');
+
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+SetCache.prototype.has = setCacheHas;
+
+module.exports = SetCache;
diff --git a/node_modules/lodash/_Stack.js b/node_modules/lodash/_Stack.js
new file mode 100644
index 0000000..80b2cf1
--- /dev/null
+++ b/node_modules/lodash/_Stack.js
@@ -0,0 +1,27 @@
+var ListCache = require('./_ListCache'),
+ stackClear = require('./_stackClear'),
+ stackDelete = require('./_stackDelete'),
+ stackGet = require('./_stackGet'),
+ stackHas = require('./_stackHas'),
+ stackSet = require('./_stackSet');
+
+/**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+}
+
+// Add methods to `Stack`.
+Stack.prototype.clear = stackClear;
+Stack.prototype['delete'] = stackDelete;
+Stack.prototype.get = stackGet;
+Stack.prototype.has = stackHas;
+Stack.prototype.set = stackSet;
+
+module.exports = Stack;
diff --git a/node_modules/lodash/_Symbol.js b/node_modules/lodash/_Symbol.js
new file mode 100644
index 0000000..a013f7c
--- /dev/null
+++ b/node_modules/lodash/_Symbol.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+module.exports = Symbol;
diff --git a/node_modules/lodash/_Uint8Array.js b/node_modules/lodash/_Uint8Array.js
new file mode 100644
index 0000000..2fb30e1
--- /dev/null
+++ b/node_modules/lodash/_Uint8Array.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Built-in value references. */
+var Uint8Array = root.Uint8Array;
+
+module.exports = Uint8Array;
diff --git a/node_modules/lodash/_WeakMap.js b/node_modules/lodash/_WeakMap.js
new file mode 100644
index 0000000..567f86c
--- /dev/null
+++ b/node_modules/lodash/_WeakMap.js
@@ -0,0 +1,7 @@
+var getNative = require('./_getNative'),
+ root = require('./_root');
+
+/* Built-in method references that are verified to be native. */
+var WeakMap = getNative(root, 'WeakMap');
+
+module.exports = WeakMap;
diff --git a/node_modules/lodash/_apply.js b/node_modules/lodash/_apply.js
new file mode 100644
index 0000000..36436dd
--- /dev/null
+++ b/node_modules/lodash/_apply.js
@@ -0,0 +1,21 @@
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+}
+
+module.exports = apply;
diff --git a/node_modules/lodash/_arrayAggregator.js b/node_modules/lodash/_arrayAggregator.js
new file mode 100644
index 0000000..d96c3ca
--- /dev/null
+++ b/node_modules/lodash/_arrayAggregator.js
@@ -0,0 +1,22 @@
+/**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayAggregator;
diff --git a/node_modules/lodash/_arrayEach.js b/node_modules/lodash/_arrayEach.js
new file mode 100644
index 0000000..2c5f579
--- /dev/null
+++ b/node_modules/lodash/_arrayEach.js
@@ -0,0 +1,22 @@
+/**
+ * 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;
+}
+
+module.exports = arrayEach;
diff --git a/node_modules/lodash/_arrayEachRight.js b/node_modules/lodash/_arrayEachRight.js
new file mode 100644
index 0000000..976ca5c
--- /dev/null
+++ b/node_modules/lodash/_arrayEachRight.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.forEachRight` 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 arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+module.exports = arrayEachRight;
diff --git a/node_modules/lodash/_arrayEvery.js b/node_modules/lodash/_arrayEvery.js
new file mode 100644
index 0000000..e26a918
--- /dev/null
+++ b/node_modules/lodash/_arrayEvery.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = arrayEvery;
diff --git a/node_modules/lodash/_arrayFilter.js b/node_modules/lodash/_arrayFilter.js
new file mode 100644
index 0000000..75ea254
--- /dev/null
+++ b/node_modules/lodash/_arrayFilter.js
@@ -0,0 +1,25 @@
+/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = arrayFilter;
diff --git a/node_modules/lodash/_arrayIncludes.js b/node_modules/lodash/_arrayIncludes.js
new file mode 100644
index 0000000..3737a6d
--- /dev/null
+++ b/node_modules/lodash/_arrayIncludes.js
@@ -0,0 +1,17 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+}
+
+module.exports = arrayIncludes;
diff --git a/node_modules/lodash/_arrayIncludesWith.js b/node_modules/lodash/_arrayIncludesWith.js
new file mode 100644
index 0000000..235fd97
--- /dev/null
+++ b/node_modules/lodash/_arrayIncludesWith.js
@@ -0,0 +1,22 @@
+/**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+}
+
+module.exports = arrayIncludesWith;
diff --git a/node_modules/lodash/_arrayLikeKeys.js b/node_modules/lodash/_arrayLikeKeys.js
new file mode 100644
index 0000000..b2ec9ce
--- /dev/null
+++ b/node_modules/lodash/_arrayLikeKeys.js
@@ -0,0 +1,49 @@
+var baseTimes = require('./_baseTimes'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isIndex = require('./_isIndex'),
+ isTypedArray = require('./isTypedArray');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.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.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;
+}
+
+module.exports = arrayLikeKeys;
diff --git a/node_modules/lodash/_arrayMap.js b/node_modules/lodash/_arrayMap.js
new file mode 100644
index 0000000..22b2246
--- /dev/null
+++ b/node_modules/lodash/_arrayMap.js
@@ -0,0 +1,21 @@
+/**
+ * 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;
+}
+
+module.exports = arrayMap;
diff --git a/node_modules/lodash/_arrayPush.js b/node_modules/lodash/_arrayPush.js
new file mode 100644
index 0000000..7d742b3
--- /dev/null
+++ b/node_modules/lodash/_arrayPush.js
@@ -0,0 +1,20 @@
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
+
+module.exports = arrayPush;
diff --git a/node_modules/lodash/_arrayReduce.js b/node_modules/lodash/_arrayReduce.js
new file mode 100644
index 0000000..de8b79b
--- /dev/null
+++ b/node_modules/lodash/_arrayReduce.js
@@ -0,0 +1,26 @@
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayReduce;
diff --git a/node_modules/lodash/_arrayReduceRight.js b/node_modules/lodash/_arrayReduceRight.js
new file mode 100644
index 0000000..22d8976
--- /dev/null
+++ b/node_modules/lodash/_arrayReduceRight.js
@@ -0,0 +1,24 @@
+/**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+}
+
+module.exports = arrayReduceRight;
diff --git a/node_modules/lodash/_arraySample.js b/node_modules/lodash/_arraySample.js
new file mode 100644
index 0000000..fcab010
--- /dev/null
+++ b/node_modules/lodash/_arraySample.js
@@ -0,0 +1,15 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+}
+
+module.exports = arraySample;
diff --git a/node_modules/lodash/_arraySampleSize.js b/node_modules/lodash/_arraySampleSize.js
new file mode 100644
index 0000000..8c7e364
--- /dev/null
+++ b/node_modules/lodash/_arraySampleSize.js
@@ -0,0 +1,17 @@
+var baseClamp = require('./_baseClamp'),
+ copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+}
+
+module.exports = arraySampleSize;
diff --git a/node_modules/lodash/_arrayShuffle.js b/node_modules/lodash/_arrayShuffle.js
new file mode 100644
index 0000000..46313a3
--- /dev/null
+++ b/node_modules/lodash/_arrayShuffle.js
@@ -0,0 +1,15 @@
+var copyArray = require('./_copyArray'),
+ shuffleSelf = require('./_shuffleSelf');
+
+/**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+}
+
+module.exports = arrayShuffle;
diff --git a/node_modules/lodash/_arraySome.js b/node_modules/lodash/_arraySome.js
new file mode 100644
index 0000000..6fd02fd
--- /dev/null
+++ b/node_modules/lodash/_arraySome.js
@@ -0,0 +1,23 @@
+/**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+module.exports = arraySome;
diff --git a/node_modules/lodash/_asciiSize.js b/node_modules/lodash/_asciiSize.js
new file mode 100644
index 0000000..11d29c3
--- /dev/null
+++ b/node_modules/lodash/_asciiSize.js
@@ -0,0 +1,12 @@
+var baseProperty = require('./_baseProperty');
+
+/**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+var asciiSize = baseProperty('length');
+
+module.exports = asciiSize;
diff --git a/node_modules/lodash/_asciiToArray.js b/node_modules/lodash/_asciiToArray.js
new file mode 100644
index 0000000..8e3dd5b
--- /dev/null
+++ b/node_modules/lodash/_asciiToArray.js
@@ -0,0 +1,12 @@
+/**
+ * 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('');
+}
+
+module.exports = asciiToArray;
diff --git a/node_modules/lodash/_asciiWords.js b/node_modules/lodash/_asciiWords.js
new file mode 100644
index 0000000..d765f0f
--- /dev/null
+++ b/node_modules/lodash/_asciiWords.js
@@ -0,0 +1,15 @@
+/** Used to match words composed of alphanumeric characters. */
+var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+/**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+}
+
+module.exports = asciiWords;
diff --git a/node_modules/lodash/_assignMergeValue.js b/node_modules/lodash/_assignMergeValue.js
new file mode 100644
index 0000000..cb1185e
--- /dev/null
+++ b/node_modules/lodash/_assignMergeValue.js
@@ -0,0 +1,20 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
+
+/**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+}
+
+module.exports = assignMergeValue;
diff --git a/node_modules/lodash/_assignValue.js b/node_modules/lodash/_assignValue.js
new file mode 100644
index 0000000..4083957
--- /dev/null
+++ b/node_modules/lodash/_assignValue.js
@@ -0,0 +1,28 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ eq = require('./eq');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+}
+
+module.exports = assignValue;
diff --git a/node_modules/lodash/_assocIndexOf.js b/node_modules/lodash/_assocIndexOf.js
new file mode 100644
index 0000000..5b77a2b
--- /dev/null
+++ b/node_modules/lodash/_assocIndexOf.js
@@ -0,0 +1,21 @@
+var eq = require('./eq');
+
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+}
+
+module.exports = assocIndexOf;
diff --git a/node_modules/lodash/_baseAggregator.js b/node_modules/lodash/_baseAggregator.js
new file mode 100644
index 0000000..4bc9e91
--- /dev/null
+++ b/node_modules/lodash/_baseAggregator.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+}
+
+module.exports = baseAggregator;
diff --git a/node_modules/lodash/_baseAssign.js b/node_modules/lodash/_baseAssign.js
new file mode 100644
index 0000000..e5c4a1a
--- /dev/null
+++ b/node_modules/lodash/_baseAssign.js
@@ -0,0 +1,17 @@
+var copyObject = require('./_copyObject'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+}
+
+module.exports = baseAssign;
diff --git a/node_modules/lodash/_baseAssignIn.js b/node_modules/lodash/_baseAssignIn.js
new file mode 100644
index 0000000..6624f90
--- /dev/null
+++ b/node_modules/lodash/_baseAssignIn.js
@@ -0,0 +1,17 @@
+var copyObject = require('./_copyObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+}
+
+module.exports = baseAssignIn;
diff --git a/node_modules/lodash/_baseAssignValue.js b/node_modules/lodash/_baseAssignValue.js
new file mode 100644
index 0000000..d6f66ef
--- /dev/null
+++ b/node_modules/lodash/_baseAssignValue.js
@@ -0,0 +1,25 @@
+var defineProperty = require('./_defineProperty');
+
+/**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+}
+
+module.exports = baseAssignValue;
diff --git a/node_modules/lodash/_baseAt.js b/node_modules/lodash/_baseAt.js
new file mode 100644
index 0000000..90e4237
--- /dev/null
+++ b/node_modules/lodash/_baseAt.js
@@ -0,0 +1,23 @@
+var get = require('./get');
+
+/**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+}
+
+module.exports = baseAt;
diff --git a/node_modules/lodash/_baseClamp.js b/node_modules/lodash/_baseClamp.js
new file mode 100644
index 0000000..a1c5692
--- /dev/null
+++ b/node_modules/lodash/_baseClamp.js
@@ -0,0 +1,22 @@
+/**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+}
+
+module.exports = baseClamp;
diff --git a/node_modules/lodash/_baseClone.js b/node_modules/lodash/_baseClone.js
new file mode 100644
index 0000000..69f8705
--- /dev/null
+++ b/node_modules/lodash/_baseClone.js
@@ -0,0 +1,166 @@
+var Stack = require('./_Stack'),
+ arrayEach = require('./_arrayEach'),
+ assignValue = require('./_assignValue'),
+ baseAssign = require('./_baseAssign'),
+ baseAssignIn = require('./_baseAssignIn'),
+ cloneBuffer = require('./_cloneBuffer'),
+ copyArray = require('./_copyArray'),
+ copySymbols = require('./_copySymbols'),
+ copySymbolsIn = require('./_copySymbolsIn'),
+ getAllKeys = require('./_getAllKeys'),
+ getAllKeysIn = require('./_getAllKeysIn'),
+ getTag = require('./_getTag'),
+ initCloneArray = require('./_initCloneArray'),
+ initCloneByTag = require('./_initCloneByTag'),
+ initCloneObject = require('./_initCloneObject'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isMap = require('./isMap'),
+ isObject = require('./isObject'),
+ isSet = require('./isSet'),
+ keys = require('./keys'),
+ keysIn = require('./keysIn');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values supported by `_.clone`. */
+var cloneableTags = {};
+cloneableTags[argsTag] = cloneableTags[arrayTag] =
+cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+cloneableTags[boolTag] = cloneableTags[dateTag] =
+cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+cloneableTags[int32Tag] = cloneableTags[mapTag] =
+cloneableTags[numberTag] = cloneableTags[objectTag] =
+cloneableTags[regexpTag] = cloneableTags[setTag] =
+cloneableTags[stringTag] = cloneableTags[symbolTag] =
+cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+cloneableTags[errorTag] = cloneableTags[funcTag] =
+cloneableTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ } else if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+}
+
+module.exports = baseClone;
diff --git a/node_modules/lodash/_baseConforms.js b/node_modules/lodash/_baseConforms.js
new file mode 100644
index 0000000..947e20d
--- /dev/null
+++ b/node_modules/lodash/_baseConforms.js
@@ -0,0 +1,18 @@
+var baseConformsTo = require('./_baseConformsTo'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+}
+
+module.exports = baseConforms;
diff --git a/node_modules/lodash/_baseConformsTo.js b/node_modules/lodash/_baseConformsTo.js
new file mode 100644
index 0000000..e449cb8
--- /dev/null
+++ b/node_modules/lodash/_baseConformsTo.js
@@ -0,0 +1,27 @@
+/**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = baseConformsTo;
diff --git a/node_modules/lodash/_baseCreate.js b/node_modules/lodash/_baseCreate.js
new file mode 100644
index 0000000..ffa6a52
--- /dev/null
+++ b/node_modules/lodash/_baseCreate.js
@@ -0,0 +1,30 @@
+var isObject = require('./isObject');
+
+/** Built-in value references. */
+var objectCreate = Object.create;
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+}());
+
+module.exports = baseCreate;
diff --git a/node_modules/lodash/_baseDelay.js b/node_modules/lodash/_baseDelay.js
new file mode 100644
index 0000000..1486d69
--- /dev/null
+++ b/node_modules/lodash/_baseDelay.js
@@ -0,0 +1,21 @@
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+}
+
+module.exports = baseDelay;
diff --git a/node_modules/lodash/_baseDifference.js b/node_modules/lodash/_baseDifference.js
new file mode 100644
index 0000000..343ac19
--- /dev/null
+++ b/node_modules/lodash/_baseDifference.js
@@ -0,0 +1,67 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ arrayMap = require('./_arrayMap'),
+ baseUnary = require('./_baseUnary'),
+ cacheHas = require('./_cacheHas');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseDifference;
diff --git a/node_modules/lodash/_baseEach.js b/node_modules/lodash/_baseEach.js
new file mode 100644
index 0000000..512c067
--- /dev/null
+++ b/node_modules/lodash/_baseEach.js
@@ -0,0 +1,14 @@
+var baseForOwn = require('./_baseForOwn'),
+ createBaseEach = require('./_createBaseEach');
+
+/**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEach = createBaseEach(baseForOwn);
+
+module.exports = baseEach;
diff --git a/node_modules/lodash/_baseEachRight.js b/node_modules/lodash/_baseEachRight.js
new file mode 100644
index 0000000..0a8feec
--- /dev/null
+++ b/node_modules/lodash/_baseEachRight.js
@@ -0,0 +1,14 @@
+var baseForOwnRight = require('./_baseForOwnRight'),
+ createBaseEach = require('./_createBaseEach');
+
+/**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+module.exports = baseEachRight;
diff --git a/node_modules/lodash/_baseEvery.js b/node_modules/lodash/_baseEvery.js
new file mode 100644
index 0000000..fa52f7b
--- /dev/null
+++ b/node_modules/lodash/_baseEvery.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+}
+
+module.exports = baseEvery;
diff --git a/node_modules/lodash/_baseExtremum.js b/node_modules/lodash/_baseExtremum.js
new file mode 100644
index 0000000..9d6aa77
--- /dev/null
+++ b/node_modules/lodash/_baseExtremum.js
@@ -0,0 +1,32 @@
+var isSymbol = require('./isSymbol');
+
+/**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseExtremum;
diff --git a/node_modules/lodash/_baseFill.js b/node_modules/lodash/_baseFill.js
new file mode 100644
index 0000000..46ef9c7
--- /dev/null
+++ b/node_modules/lodash/_baseFill.js
@@ -0,0 +1,32 @@
+var toInteger = require('./toInteger'),
+ toLength = require('./toLength');
+
+/**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+}
+
+module.exports = baseFill;
diff --git a/node_modules/lodash/_baseFilter.js b/node_modules/lodash/_baseFilter.js
new file mode 100644
index 0000000..4678477
--- /dev/null
+++ b/node_modules/lodash/_baseFilter.js
@@ -0,0 +1,21 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+}
+
+module.exports = baseFilter;
diff --git a/node_modules/lodash/_baseFindIndex.js b/node_modules/lodash/_baseFindIndex.js
new file mode 100644
index 0000000..e3f5d8a
--- /dev/null
+++ b/node_modules/lodash/_baseFindIndex.js
@@ -0,0 +1,24 @@
+/**
+ * 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;
+}
+
+module.exports = baseFindIndex;
diff --git a/node_modules/lodash/_baseFindKey.js b/node_modules/lodash/_baseFindKey.js
new file mode 100644
index 0000000..2e430f3
--- /dev/null
+++ b/node_modules/lodash/_baseFindKey.js
@@ -0,0 +1,23 @@
+/**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+}
+
+module.exports = baseFindKey;
diff --git a/node_modules/lodash/_baseFlatten.js b/node_modules/lodash/_baseFlatten.js
new file mode 100644
index 0000000..4b1e009
--- /dev/null
+++ b/node_modules/lodash/_baseFlatten.js
@@ -0,0 +1,38 @@
+var arrayPush = require('./_arrayPush'),
+ isFlattenable = require('./_isFlattenable');
+
+/**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseFlatten;
diff --git a/node_modules/lodash/_baseFor.js b/node_modules/lodash/_baseFor.js
new file mode 100644
index 0000000..d946590
--- /dev/null
+++ b/node_modules/lodash/_baseFor.js
@@ -0,0 +1,16 @@
+var createBaseFor = require('./_createBaseFor');
+
+/**
+ * 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();
+
+module.exports = baseFor;
diff --git a/node_modules/lodash/_baseForOwn.js b/node_modules/lodash/_baseForOwn.js
new file mode 100644
index 0000000..503d523
--- /dev/null
+++ b/node_modules/lodash/_baseForOwn.js
@@ -0,0 +1,16 @@
+var baseFor = require('./_baseFor'),
+ keys = require('./keys');
+
+/**
+ * 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);
+}
+
+module.exports = baseForOwn;
diff --git a/node_modules/lodash/_baseForOwnRight.js b/node_modules/lodash/_baseForOwnRight.js
new file mode 100644
index 0000000..a4b10e6
--- /dev/null
+++ b/node_modules/lodash/_baseForOwnRight.js
@@ -0,0 +1,16 @@
+var baseForRight = require('./_baseForRight'),
+ keys = require('./keys');
+
+/**
+ * The base implementation of `_.forOwnRight` 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 baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+}
+
+module.exports = baseForOwnRight;
diff --git a/node_modules/lodash/_baseForRight.js b/node_modules/lodash/_baseForRight.js
new file mode 100644
index 0000000..32842cd
--- /dev/null
+++ b/node_modules/lodash/_baseForRight.js
@@ -0,0 +1,15 @@
+var createBaseFor = require('./_createBaseFor');
+
+/**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @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 baseForRight = createBaseFor(true);
+
+module.exports = baseForRight;
diff --git a/node_modules/lodash/_baseFunctions.js b/node_modules/lodash/_baseFunctions.js
new file mode 100644
index 0000000..d23bc9b
--- /dev/null
+++ b/node_modules/lodash/_baseFunctions.js
@@ -0,0 +1,19 @@
+var arrayFilter = require('./_arrayFilter'),
+ isFunction = require('./isFunction');
+
+/**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+}
+
+module.exports = baseFunctions;
diff --git a/node_modules/lodash/_baseGet.js b/node_modules/lodash/_baseGet.js
new file mode 100644
index 0000000..a194913
--- /dev/null
+++ b/node_modules/lodash/_baseGet.js
@@ -0,0 +1,24 @@
+var castPath = require('./_castPath'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+module.exports = baseGet;
diff --git a/node_modules/lodash/_baseGetAllKeys.js b/node_modules/lodash/_baseGetAllKeys.js
new file mode 100644
index 0000000..8ad204e
--- /dev/null
+++ b/node_modules/lodash/_baseGetAllKeys.js
@@ -0,0 +1,20 @@
+var arrayPush = require('./_arrayPush'),
+ isArray = require('./isArray');
+
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+}
+
+module.exports = baseGetAllKeys;
diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js
new file mode 100644
index 0000000..b927ccc
--- /dev/null
+++ b/node_modules/lodash/_baseGetTag.js
@@ -0,0 +1,28 @@
+var Symbol = require('./_Symbol'),
+ getRawTag = require('./_getRawTag'),
+ objectToString = require('./_objectToString');
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.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);
+}
+
+module.exports = baseGetTag;
diff --git a/node_modules/lodash/_baseGt.js b/node_modules/lodash/_baseGt.js
new file mode 100644
index 0000000..502d273
--- /dev/null
+++ b/node_modules/lodash/_baseGt.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+function baseGt(value, other) {
+ return value > other;
+}
+
+module.exports = baseGt;
diff --git a/node_modules/lodash/_baseHas.js b/node_modules/lodash/_baseHas.js
new file mode 100644
index 0000000..1b73032
--- /dev/null
+++ b/node_modules/lodash/_baseHas.js
@@ -0,0 +1,19 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+}
+
+module.exports = baseHas;
diff --git a/node_modules/lodash/_baseHasIn.js b/node_modules/lodash/_baseHasIn.js
new file mode 100644
index 0000000..2e0d042
--- /dev/null
+++ b/node_modules/lodash/_baseHasIn.js
@@ -0,0 +1,13 @@
+/**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+}
+
+module.exports = baseHasIn;
diff --git a/node_modules/lodash/_baseInRange.js b/node_modules/lodash/_baseInRange.js
new file mode 100644
index 0000000..ec95666
--- /dev/null
+++ b/node_modules/lodash/_baseInRange.js
@@ -0,0 +1,18 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+}
+
+module.exports = baseInRange;
diff --git a/node_modules/lodash/_baseIndexOf.js b/node_modules/lodash/_baseIndexOf.js
new file mode 100644
index 0000000..167e706
--- /dev/null
+++ b/node_modules/lodash/_baseIndexOf.js
@@ -0,0 +1,20 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIsNaN = require('./_baseIsNaN'),
+ strictIndexOf = require('./_strictIndexOf');
+
+/**
+ * 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);
+}
+
+module.exports = baseIndexOf;
diff --git a/node_modules/lodash/_baseIndexOfWith.js b/node_modules/lodash/_baseIndexOfWith.js
new file mode 100644
index 0000000..f815fe0
--- /dev/null
+++ b/node_modules/lodash/_baseIndexOfWith.js
@@ -0,0 +1,23 @@
+/**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = baseIndexOfWith;
diff --git a/node_modules/lodash/_baseIntersection.js b/node_modules/lodash/_baseIntersection.js
new file mode 100644
index 0000000..c1d250c
--- /dev/null
+++ b/node_modules/lodash/_baseIntersection.js
@@ -0,0 +1,74 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ arrayMap = require('./_arrayMap'),
+ baseUnary = require('./_baseUnary'),
+ cacheHas = require('./_cacheHas');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseIntersection;
diff --git a/node_modules/lodash/_baseInverter.js b/node_modules/lodash/_baseInverter.js
new file mode 100644
index 0000000..fbc337f
--- /dev/null
+++ b/node_modules/lodash/_baseInverter.js
@@ -0,0 +1,21 @@
+var baseForOwn = require('./_baseForOwn');
+
+/**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+}
+
+module.exports = baseInverter;
diff --git a/node_modules/lodash/_baseInvoke.js b/node_modules/lodash/_baseInvoke.js
new file mode 100644
index 0000000..49bcf3c
--- /dev/null
+++ b/node_modules/lodash/_baseInvoke.js
@@ -0,0 +1,24 @@
+var apply = require('./_apply'),
+ castPath = require('./_castPath'),
+ last = require('./last'),
+ parent = require('./_parent'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+}
+
+module.exports = baseInvoke;
diff --git a/node_modules/lodash/_baseIsArguments.js b/node_modules/lodash/_baseIsArguments.js
new file mode 100644
index 0000000..b3562cc
--- /dev/null
+++ b/node_modules/lodash/_baseIsArguments.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `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;
+}
+
+module.exports = baseIsArguments;
diff --git a/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/lodash/_baseIsArrayBuffer.js
new file mode 100644
index 0000000..a2c4f30
--- /dev/null
+++ b/node_modules/lodash/_baseIsArrayBuffer.js
@@ -0,0 +1,17 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+var arrayBufferTag = '[object ArrayBuffer]';
+
+/**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+}
+
+module.exports = baseIsArrayBuffer;
diff --git a/node_modules/lodash/_baseIsDate.js b/node_modules/lodash/_baseIsDate.js
new file mode 100644
index 0000000..ba67c78
--- /dev/null
+++ b/node_modules/lodash/_baseIsDate.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var dateTag = '[object Date]';
+
+/**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+}
+
+module.exports = baseIsDate;
diff --git a/node_modules/lodash/_baseIsEqual.js b/node_modules/lodash/_baseIsEqual.js
new file mode 100644
index 0000000..00a68a4
--- /dev/null
+++ b/node_modules/lodash/_baseIsEqual.js
@@ -0,0 +1,28 @@
+var baseIsEqualDeep = require('./_baseIsEqualDeep'),
+ isObjectLike = require('./isObjectLike');
+
+/**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+}
+
+module.exports = baseIsEqual;
diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js
new file mode 100644
index 0000000..e3cfd6a
--- /dev/null
+++ b/node_modules/lodash/_baseIsEqualDeep.js
@@ -0,0 +1,83 @@
+var Stack = require('./_Stack'),
+ equalArrays = require('./_equalArrays'),
+ equalByTag = require('./_equalByTag'),
+ equalObjects = require('./_equalObjects'),
+ getTag = require('./_getTag'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isTypedArray = require('./isTypedArray');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+}
+
+module.exports = baseIsEqualDeep;
diff --git a/node_modules/lodash/_baseIsMap.js b/node_modules/lodash/_baseIsMap.js
new file mode 100644
index 0000000..02a4021
--- /dev/null
+++ b/node_modules/lodash/_baseIsMap.js
@@ -0,0 +1,18 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]';
+
+/**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+}
+
+module.exports = baseIsMap;
diff --git a/node_modules/lodash/_baseIsMatch.js b/node_modules/lodash/_baseIsMatch.js
new file mode 100644
index 0000000..72494be
--- /dev/null
+++ b/node_modules/lodash/_baseIsMatch.js
@@ -0,0 +1,62 @@
+var Stack = require('./_Stack'),
+ baseIsEqual = require('./_baseIsEqual');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+module.exports = baseIsMatch;
diff --git a/node_modules/lodash/_baseIsNaN.js b/node_modules/lodash/_baseIsNaN.js
new file mode 100644
index 0000000..316f1eb
--- /dev/null
+++ b/node_modules/lodash/_baseIsNaN.js
@@ -0,0 +1,12 @@
+/**
+ * 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;
+}
+
+module.exports = baseIsNaN;
diff --git a/node_modules/lodash/_baseIsNative.js b/node_modules/lodash/_baseIsNative.js
new file mode 100644
index 0000000..8702330
--- /dev/null
+++ b/node_modules/lodash/_baseIsNative.js
@@ -0,0 +1,47 @@
+var isFunction = require('./isFunction'),
+ isMasked = require('./_isMasked'),
+ isObject = require('./isObject'),
+ toSource = require('./_toSource');
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+}
+
+module.exports = baseIsNative;
diff --git a/node_modules/lodash/_baseIsRegExp.js b/node_modules/lodash/_baseIsRegExp.js
new file mode 100644
index 0000000..6cd7c1a
--- /dev/null
+++ b/node_modules/lodash/_baseIsRegExp.js
@@ -0,0 +1,18 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var regexpTag = '[object RegExp]';
+
+/**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+}
+
+module.exports = baseIsRegExp;
diff --git a/node_modules/lodash/_baseIsSet.js b/node_modules/lodash/_baseIsSet.js
new file mode 100644
index 0000000..6dee367
--- /dev/null
+++ b/node_modules/lodash/_baseIsSet.js
@@ -0,0 +1,18 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var setTag = '[object Set]';
+
+/**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+}
+
+module.exports = baseIsSet;
diff --git a/node_modules/lodash/_baseIsTypedArray.js b/node_modules/lodash/_baseIsTypedArray.js
new file mode 100644
index 0000000..1edb32f
--- /dev/null
+++ b/node_modules/lodash/_baseIsTypedArray.js
@@ -0,0 +1,60 @@
+var baseGetTag = require('./_baseGetTag'),
+ isLength = require('./isLength'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ 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] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+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)];
+}
+
+module.exports = baseIsTypedArray;
diff --git a/node_modules/lodash/_baseIteratee.js b/node_modules/lodash/_baseIteratee.js
new file mode 100644
index 0000000..995c257
--- /dev/null
+++ b/node_modules/lodash/_baseIteratee.js
@@ -0,0 +1,31 @@
+var baseMatches = require('./_baseMatches'),
+ baseMatchesProperty = require('./_baseMatchesProperty'),
+ identity = require('./identity'),
+ isArray = require('./isArray'),
+ property = require('./property');
+
+/**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+}
+
+module.exports = baseIteratee;
diff --git a/node_modules/lodash/_baseKeys.js b/node_modules/lodash/_baseKeys.js
new file mode 100644
index 0000000..45e9e6f
--- /dev/null
+++ b/node_modules/lodash/_baseKeys.js
@@ -0,0 +1,30 @@
+var isPrototype = require('./_isPrototype'),
+ nativeKeys = require('./_nativeKeys');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.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.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = baseKeys;
diff --git a/node_modules/lodash/_baseKeysIn.js b/node_modules/lodash/_baseKeysIn.js
new file mode 100644
index 0000000..ea8a0a1
--- /dev/null
+++ b/node_modules/lodash/_baseKeysIn.js
@@ -0,0 +1,33 @@
+var isObject = require('./isObject'),
+ isPrototype = require('./_isPrototype'),
+ nativeKeysIn = require('./_nativeKeysIn');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * The base implementation of `_.keysIn` 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 baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = baseKeysIn;
diff --git a/node_modules/lodash/_baseLodash.js b/node_modules/lodash/_baseLodash.js
new file mode 100644
index 0000000..f76c790
--- /dev/null
+++ b/node_modules/lodash/_baseLodash.js
@@ -0,0 +1,10 @@
+/**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+function baseLodash() {
+ // No operation performed.
+}
+
+module.exports = baseLodash;
diff --git a/node_modules/lodash/_baseLt.js b/node_modules/lodash/_baseLt.js
new file mode 100644
index 0000000..8674d29
--- /dev/null
+++ b/node_modules/lodash/_baseLt.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+function baseLt(value, other) {
+ return value < other;
+}
+
+module.exports = baseLt;
diff --git a/node_modules/lodash/_baseMap.js b/node_modules/lodash/_baseMap.js
new file mode 100644
index 0000000..0bf5cea
--- /dev/null
+++ b/node_modules/lodash/_baseMap.js
@@ -0,0 +1,22 @@
+var baseEach = require('./_baseEach'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+}
+
+module.exports = baseMap;
diff --git a/node_modules/lodash/_baseMatches.js b/node_modules/lodash/_baseMatches.js
new file mode 100644
index 0000000..e56582a
--- /dev/null
+++ b/node_modules/lodash/_baseMatches.js
@@ -0,0 +1,22 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData'),
+ matchesStrictComparable = require('./_matchesStrictComparable');
+
+/**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+}
+
+module.exports = baseMatches;
diff --git a/node_modules/lodash/_baseMatchesProperty.js b/node_modules/lodash/_baseMatchesProperty.js
new file mode 100644
index 0000000..24afd89
--- /dev/null
+++ b/node_modules/lodash/_baseMatchesProperty.js
@@ -0,0 +1,33 @@
+var baseIsEqual = require('./_baseIsEqual'),
+ get = require('./get'),
+ hasIn = require('./hasIn'),
+ isKey = require('./_isKey'),
+ isStrictComparable = require('./_isStrictComparable'),
+ matchesStrictComparable = require('./_matchesStrictComparable'),
+ toKey = require('./_toKey');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+}
+
+module.exports = baseMatchesProperty;
diff --git a/node_modules/lodash/_baseMean.js b/node_modules/lodash/_baseMean.js
new file mode 100644
index 0000000..fa9e00a
--- /dev/null
+++ b/node_modules/lodash/_baseMean.js
@@ -0,0 +1,20 @@
+var baseSum = require('./_baseSum');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+}
+
+module.exports = baseMean;
diff --git a/node_modules/lodash/_baseMerge.js b/node_modules/lodash/_baseMerge.js
new file mode 100644
index 0000000..c98b5eb
--- /dev/null
+++ b/node_modules/lodash/_baseMerge.js
@@ -0,0 +1,42 @@
+var Stack = require('./_Stack'),
+ assignMergeValue = require('./_assignMergeValue'),
+ baseFor = require('./_baseFor'),
+ baseMergeDeep = require('./_baseMergeDeep'),
+ isObject = require('./isObject'),
+ keysIn = require('./keysIn'),
+ safeGet = require('./_safeGet');
+
+/**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ stack || (stack = new Stack);
+ if (isObject(srcValue)) {
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+}
+
+module.exports = baseMerge;
diff --git a/node_modules/lodash/_baseMergeDeep.js b/node_modules/lodash/_baseMergeDeep.js
new file mode 100644
index 0000000..4679e8d
--- /dev/null
+++ b/node_modules/lodash/_baseMergeDeep.js
@@ -0,0 +1,94 @@
+var assignMergeValue = require('./_assignMergeValue'),
+ cloneBuffer = require('./_cloneBuffer'),
+ cloneTypedArray = require('./_cloneTypedArray'),
+ copyArray = require('./_copyArray'),
+ initCloneObject = require('./_initCloneObject'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ isBuffer = require('./isBuffer'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ isPlainObject = require('./isPlainObject'),
+ isTypedArray = require('./isTypedArray'),
+ safeGet = require('./_safeGet'),
+ toPlainObject = require('./toPlainObject');
+
+/**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || isFunction(objValue)) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+}
+
+module.exports = baseMergeDeep;
diff --git a/node_modules/lodash/_baseNth.js b/node_modules/lodash/_baseNth.js
new file mode 100644
index 0000000..0403c2a
--- /dev/null
+++ b/node_modules/lodash/_baseNth.js
@@ -0,0 +1,20 @@
+var isIndex = require('./_isIndex');
+
+/**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+}
+
+module.exports = baseNth;
diff --git a/node_modules/lodash/_baseOrderBy.js b/node_modules/lodash/_baseOrderBy.js
new file mode 100644
index 0000000..775a017
--- /dev/null
+++ b/node_modules/lodash/_baseOrderBy.js
@@ -0,0 +1,49 @@
+var arrayMap = require('./_arrayMap'),
+ baseGet = require('./_baseGet'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ baseSortBy = require('./_baseSortBy'),
+ baseUnary = require('./_baseUnary'),
+ compareMultiple = require('./_compareMultiple'),
+ identity = require('./identity'),
+ isArray = require('./isArray');
+
+/**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+function baseOrderBy(collection, iteratees, orders) {
+ if (iteratees.length) {
+ iteratees = arrayMap(iteratees, function(iteratee) {
+ if (isArray(iteratee)) {
+ return function(value) {
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ }
+ }
+ return iteratee;
+ });
+ } else {
+ iteratees = [identity];
+ }
+
+ var index = -1;
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+}
+
+module.exports = baseOrderBy;
diff --git a/node_modules/lodash/_basePick.js b/node_modules/lodash/_basePick.js
new file mode 100644
index 0000000..09b458a
--- /dev/null
+++ b/node_modules/lodash/_basePick.js
@@ -0,0 +1,19 @@
+var basePickBy = require('./_basePickBy'),
+ hasIn = require('./hasIn');
+
+/**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+function basePick(object, paths) {
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+}
+
+module.exports = basePick;
diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js
new file mode 100644
index 0000000..85be68c
--- /dev/null
+++ b/node_modules/lodash/_basePickBy.js
@@ -0,0 +1,30 @@
+var baseGet = require('./_baseGet'),
+ baseSet = require('./_baseSet'),
+ castPath = require('./_castPath');
+
+/**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+}
+
+module.exports = basePickBy;
diff --git a/node_modules/lodash/_baseProperty.js b/node_modules/lodash/_baseProperty.js
new file mode 100644
index 0000000..496281e
--- /dev/null
+++ b/node_modules/lodash/_baseProperty.js
@@ -0,0 +1,14 @@
+/**
+ * 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];
+ };
+}
+
+module.exports = baseProperty;
diff --git a/node_modules/lodash/_basePropertyDeep.js b/node_modules/lodash/_basePropertyDeep.js
new file mode 100644
index 0000000..1e5aae5
--- /dev/null
+++ b/node_modules/lodash/_basePropertyDeep.js
@@ -0,0 +1,16 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+}
+
+module.exports = basePropertyDeep;
diff --git a/node_modules/lodash/_basePropertyOf.js b/node_modules/lodash/_basePropertyOf.js
new file mode 100644
index 0000000..4617399
--- /dev/null
+++ b/node_modules/lodash/_basePropertyOf.js
@@ -0,0 +1,14 @@
+/**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+module.exports = basePropertyOf;
diff --git a/node_modules/lodash/_basePullAll.js b/node_modules/lodash/_basePullAll.js
new file mode 100644
index 0000000..305720e
--- /dev/null
+++ b/node_modules/lodash/_basePullAll.js
@@ -0,0 +1,51 @@
+var arrayMap = require('./_arrayMap'),
+ baseIndexOf = require('./_baseIndexOf'),
+ baseIndexOfWith = require('./_baseIndexOfWith'),
+ baseUnary = require('./_baseUnary'),
+ copyArray = require('./_copyArray');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+}
+
+module.exports = basePullAll;
diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js
new file mode 100644
index 0000000..c3e9e71
--- /dev/null
+++ b/node_modules/lodash/_basePullAt.js
@@ -0,0 +1,37 @@
+var baseUnset = require('./_baseUnset'),
+ isIndex = require('./_isIndex');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+}
+
+module.exports = basePullAt;
diff --git a/node_modules/lodash/_baseRandom.js b/node_modules/lodash/_baseRandom.js
new file mode 100644
index 0000000..94f76a7
--- /dev/null
+++ b/node_modules/lodash/_baseRandom.js
@@ -0,0 +1,18 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeRandom = Math.random;
+
+/**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+}
+
+module.exports = baseRandom;
diff --git a/node_modules/lodash/_baseRange.js b/node_modules/lodash/_baseRange.js
new file mode 100644
index 0000000..0fb8e41
--- /dev/null
+++ b/node_modules/lodash/_baseRange.js
@@ -0,0 +1,28 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ 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;
+}
+
+module.exports = baseRange;
diff --git a/node_modules/lodash/_baseReduce.js b/node_modules/lodash/_baseReduce.js
new file mode 100644
index 0000000..5a1f8b5
--- /dev/null
+++ b/node_modules/lodash/_baseReduce.js
@@ -0,0 +1,23 @@
+/**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+}
+
+module.exports = baseReduce;
diff --git a/node_modules/lodash/_baseRepeat.js b/node_modules/lodash/_baseRepeat.js
new file mode 100644
index 0000000..ee44c31
--- /dev/null
+++ b/node_modules/lodash/_baseRepeat.js
@@ -0,0 +1,35 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor;
+
+/**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+}
+
+module.exports = baseRepeat;
diff --git a/node_modules/lodash/_baseRest.js b/node_modules/lodash/_baseRest.js
new file mode 100644
index 0000000..d0dc4bd
--- /dev/null
+++ b/node_modules/lodash/_baseRest.js
@@ -0,0 +1,17 @@
+var identity = require('./identity'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
+
+/**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+}
+
+module.exports = baseRest;
diff --git a/node_modules/lodash/_baseSample.js b/node_modules/lodash/_baseSample.js
new file mode 100644
index 0000000..58582b9
--- /dev/null
+++ b/node_modules/lodash/_baseSample.js
@@ -0,0 +1,15 @@
+var arraySample = require('./_arraySample'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+function baseSample(collection) {
+ return arraySample(values(collection));
+}
+
+module.exports = baseSample;
diff --git a/node_modules/lodash/_baseSampleSize.js b/node_modules/lodash/_baseSampleSize.js
new file mode 100644
index 0000000..5c90ec5
--- /dev/null
+++ b/node_modules/lodash/_baseSampleSize.js
@@ -0,0 +1,18 @@
+var baseClamp = require('./_baseClamp'),
+ shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+}
+
+module.exports = baseSampleSize;
diff --git a/node_modules/lodash/_baseSet.js b/node_modules/lodash/_baseSet.js
new file mode 100644
index 0000000..99f4fbf
--- /dev/null
+++ b/node_modules/lodash/_baseSet.js
@@ -0,0 +1,51 @@
+var assignValue = require('./_assignValue'),
+ castPath = require('./_castPath'),
+ isIndex = require('./_isIndex'),
+ isObject = require('./isObject'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ return object;
+ }
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+}
+
+module.exports = baseSet;
diff --git a/node_modules/lodash/_baseSetData.js b/node_modules/lodash/_baseSetData.js
new file mode 100644
index 0000000..c409947
--- /dev/null
+++ b/node_modules/lodash/_baseSetData.js
@@ -0,0 +1,17 @@
+var identity = require('./identity'),
+ metaMap = require('./_metaMap');
+
+/**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+};
+
+module.exports = baseSetData;
diff --git a/node_modules/lodash/_baseSetToString.js b/node_modules/lodash/_baseSetToString.js
new file mode 100644
index 0000000..89eaca3
--- /dev/null
+++ b/node_modules/lodash/_baseSetToString.js
@@ -0,0 +1,22 @@
+var constant = require('./constant'),
+ defineProperty = require('./_defineProperty'),
+ identity = require('./identity');
+
+/**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+};
+
+module.exports = baseSetToString;
diff --git a/node_modules/lodash/_baseShuffle.js b/node_modules/lodash/_baseShuffle.js
new file mode 100644
index 0000000..023077a
--- /dev/null
+++ b/node_modules/lodash/_baseShuffle.js
@@ -0,0 +1,15 @@
+var shuffleSelf = require('./_shuffleSelf'),
+ values = require('./values');
+
+/**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+}
+
+module.exports = baseShuffle;
diff --git a/node_modules/lodash/_baseSlice.js b/node_modules/lodash/_baseSlice.js
new file mode 100644
index 0000000..786f6c9
--- /dev/null
+++ b/node_modules/lodash/_baseSlice.js
@@ -0,0 +1,31 @@
+/**
+ * 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;
+}
+
+module.exports = baseSlice;
diff --git a/node_modules/lodash/_baseSome.js b/node_modules/lodash/_baseSome.js
new file mode 100644
index 0000000..58f3f44
--- /dev/null
+++ b/node_modules/lodash/_baseSome.js
@@ -0,0 +1,22 @@
+var baseEach = require('./_baseEach');
+
+/**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+}
+
+module.exports = baseSome;
diff --git a/node_modules/lodash/_baseSortBy.js b/node_modules/lodash/_baseSortBy.js
new file mode 100644
index 0000000..a25c92e
--- /dev/null
+++ b/node_modules/lodash/_baseSortBy.js
@@ -0,0 +1,21 @@
+/**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+}
+
+module.exports = baseSortBy;
diff --git a/node_modules/lodash/_baseSortedIndex.js b/node_modules/lodash/_baseSortedIndex.js
new file mode 100644
index 0000000..638c366
--- /dev/null
+++ b/node_modules/lodash/_baseSortedIndex.js
@@ -0,0 +1,42 @@
+var baseSortedIndexBy = require('./_baseSortedIndexBy'),
+ identity = require('./identity'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+/**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+}
+
+module.exports = baseSortedIndex;
diff --git a/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/lodash/_baseSortedIndexBy.js
new file mode 100644
index 0000000..c247b37
--- /dev/null
+++ b/node_modules/lodash/_baseSortedIndexBy.js
@@ -0,0 +1,67 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeMin = Math.min;
+
+/**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ var low = 0,
+ high = array == null ? 0 : array.length;
+ if (high === 0) {
+ return 0;
+ }
+
+ value = iteratee(value);
+ var valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+}
+
+module.exports = baseSortedIndexBy;
diff --git a/node_modules/lodash/_baseSortedUniq.js b/node_modules/lodash/_baseSortedUniq.js
new file mode 100644
index 0000000..802159a
--- /dev/null
+++ b/node_modules/lodash/_baseSortedUniq.js
@@ -0,0 +1,30 @@
+var eq = require('./eq');
+
+/**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+}
+
+module.exports = baseSortedUniq;
diff --git a/node_modules/lodash/_baseSum.js b/node_modules/lodash/_baseSum.js
new file mode 100644
index 0000000..a9e84c1
--- /dev/null
+++ b/node_modules/lodash/_baseSum.js
@@ -0,0 +1,24 @@
+/**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+}
+
+module.exports = baseSum;
diff --git a/node_modules/lodash/_baseTimes.js b/node_modules/lodash/_baseTimes.js
new file mode 100644
index 0000000..0603fc3
--- /dev/null
+++ b/node_modules/lodash/_baseTimes.js
@@ -0,0 +1,20 @@
+/**
+ * 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;
+}
+
+module.exports = baseTimes;
diff --git a/node_modules/lodash/_baseToNumber.js b/node_modules/lodash/_baseToNumber.js
new file mode 100644
index 0000000..04859f3
--- /dev/null
+++ b/node_modules/lodash/_baseToNumber.js
@@ -0,0 +1,24 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+}
+
+module.exports = baseToNumber;
diff --git a/node_modules/lodash/_baseToPairs.js b/node_modules/lodash/_baseToPairs.js
new file mode 100644
index 0000000..bff1991
--- /dev/null
+++ b/node_modules/lodash/_baseToPairs.js
@@ -0,0 +1,18 @@
+var arrayMap = require('./_arrayMap');
+
+/**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+}
+
+module.exports = baseToPairs;
diff --git a/node_modules/lodash/_baseToString.js b/node_modules/lodash/_baseToString.js
new file mode 100644
index 0000000..ada6ad2
--- /dev/null
+++ b/node_modules/lodash/_baseToString.js
@@ -0,0 +1,37 @@
+var Symbol = require('./_Symbol'),
+ arrayMap = require('./_arrayMap'),
+ isArray = require('./isArray'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ 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;
+}
+
+module.exports = baseToString;
diff --git a/node_modules/lodash/_baseTrim.js b/node_modules/lodash/_baseTrim.js
new file mode 100644
index 0000000..3e2797d
--- /dev/null
+++ b/node_modules/lodash/_baseTrim.js
@@ -0,0 +1,19 @@
+var trimmedEndIndex = require('./_trimmedEndIndex');
+
+/** Used to match leading whitespace. */
+var reTrimStart = /^\s+/;
+
+/**
+ * The base implementation of `_.trim`.
+ *
+ * @private
+ * @param {string} string The string to trim.
+ * @returns {string} Returns the trimmed string.
+ */
+function baseTrim(string) {
+ return string
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
+ : string;
+}
+
+module.exports = baseTrim;
diff --git a/node_modules/lodash/_baseUnary.js b/node_modules/lodash/_baseUnary.js
new file mode 100644
index 0000000..98639e9
--- /dev/null
+++ b/node_modules/lodash/_baseUnary.js
@@ -0,0 +1,14 @@
+/**
+ * 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);
+ };
+}
+
+module.exports = baseUnary;
diff --git a/node_modules/lodash/_baseUniq.js b/node_modules/lodash/_baseUniq.js
new file mode 100644
index 0000000..aea459d
--- /dev/null
+++ b/node_modules/lodash/_baseUniq.js
@@ -0,0 +1,72 @@
+var SetCache = require('./_SetCache'),
+ arrayIncludes = require('./_arrayIncludes'),
+ arrayIncludesWith = require('./_arrayIncludesWith'),
+ cacheHas = require('./_cacheHas'),
+ createSet = require('./_createSet'),
+ setToArray = require('./_setToArray');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
+
+module.exports = baseUniq;
diff --git a/node_modules/lodash/_baseUnset.js b/node_modules/lodash/_baseUnset.js
new file mode 100644
index 0000000..eefc6e3
--- /dev/null
+++ b/node_modules/lodash/_baseUnset.js
@@ -0,0 +1,20 @@
+var castPath = require('./_castPath'),
+ last = require('./last'),
+ parent = require('./_parent'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+}
+
+module.exports = baseUnset;
diff --git a/node_modules/lodash/_baseUpdate.js b/node_modules/lodash/_baseUpdate.js
new file mode 100644
index 0000000..92a6237
--- /dev/null
+++ b/node_modules/lodash/_baseUpdate.js
@@ -0,0 +1,18 @@
+var baseGet = require('./_baseGet'),
+ baseSet = require('./_baseSet');
+
+/**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+}
+
+module.exports = baseUpdate;
diff --git a/node_modules/lodash/_baseValues.js b/node_modules/lodash/_baseValues.js
new file mode 100644
index 0000000..b95faad
--- /dev/null
+++ b/node_modules/lodash/_baseValues.js
@@ -0,0 +1,19 @@
+var arrayMap = require('./_arrayMap');
+
+/**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+}
+
+module.exports = baseValues;
diff --git a/node_modules/lodash/_baseWhile.js b/node_modules/lodash/_baseWhile.js
new file mode 100644
index 0000000..07eac61
--- /dev/null
+++ b/node_modules/lodash/_baseWhile.js
@@ -0,0 +1,26 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+}
+
+module.exports = baseWhile;
diff --git a/node_modules/lodash/_baseWrapperValue.js b/node_modules/lodash/_baseWrapperValue.js
new file mode 100644
index 0000000..443e0df
--- /dev/null
+++ b/node_modules/lodash/_baseWrapperValue.js
@@ -0,0 +1,25 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ arrayPush = require('./_arrayPush'),
+ arrayReduce = require('./_arrayReduce');
+
+/**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+}
+
+module.exports = baseWrapperValue;
diff --git a/node_modules/lodash/_baseXor.js b/node_modules/lodash/_baseXor.js
new file mode 100644
index 0000000..8e69338
--- /dev/null
+++ b/node_modules/lodash/_baseXor.js
@@ -0,0 +1,36 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseUniq = require('./_baseUniq');
+
+/**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+}
+
+module.exports = baseXor;
diff --git a/node_modules/lodash/_baseZipObject.js b/node_modules/lodash/_baseZipObject.js
new file mode 100644
index 0000000..401f85b
--- /dev/null
+++ b/node_modules/lodash/_baseZipObject.js
@@ -0,0 +1,23 @@
+/**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+}
+
+module.exports = baseZipObject;
diff --git a/node_modules/lodash/_cacheHas.js b/node_modules/lodash/_cacheHas.js
new file mode 100644
index 0000000..2dec892
--- /dev/null
+++ b/node_modules/lodash/_cacheHas.js
@@ -0,0 +1,13 @@
+/**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
+
+module.exports = cacheHas;
diff --git a/node_modules/lodash/_castArrayLikeObject.js b/node_modules/lodash/_castArrayLikeObject.js
new file mode 100644
index 0000000..92c75fa
--- /dev/null
+++ b/node_modules/lodash/_castArrayLikeObject.js
@@ -0,0 +1,14 @@
+var isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+}
+
+module.exports = castArrayLikeObject;
diff --git a/node_modules/lodash/_castFunction.js b/node_modules/lodash/_castFunction.js
new file mode 100644
index 0000000..98c91ae
--- /dev/null
+++ b/node_modules/lodash/_castFunction.js
@@ -0,0 +1,14 @@
+var identity = require('./identity');
+
+/**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+}
+
+module.exports = castFunction;
diff --git a/node_modules/lodash/_castPath.js b/node_modules/lodash/_castPath.js
new file mode 100644
index 0000000..017e4c1
--- /dev/null
+++ b/node_modules/lodash/_castPath.js
@@ -0,0 +1,21 @@
+var isArray = require('./isArray'),
+ isKey = require('./_isKey'),
+ stringToPath = require('./_stringToPath'),
+ toString = require('./toString');
+
+/**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+}
+
+module.exports = castPath;
diff --git a/node_modules/lodash/_castRest.js b/node_modules/lodash/_castRest.js
new file mode 100644
index 0000000..213c66f
--- /dev/null
+++ b/node_modules/lodash/_castRest.js
@@ -0,0 +1,14 @@
+var baseRest = require('./_baseRest');
+
+/**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+var castRest = baseRest;
+
+module.exports = castRest;
diff --git a/node_modules/lodash/_castSlice.js b/node_modules/lodash/_castSlice.js
new file mode 100644
index 0000000..071faeb
--- /dev/null
+++ b/node_modules/lodash/_castSlice.js
@@ -0,0 +1,18 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * 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);
+}
+
+module.exports = castSlice;
diff --git a/node_modules/lodash/_charsEndIndex.js b/node_modules/lodash/_charsEndIndex.js
new file mode 100644
index 0000000..07908ff
--- /dev/null
+++ b/node_modules/lodash/_charsEndIndex.js
@@ -0,0 +1,19 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * 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;
+}
+
+module.exports = charsEndIndex;
diff --git a/node_modules/lodash/_charsStartIndex.js b/node_modules/lodash/_charsStartIndex.js
new file mode 100644
index 0000000..b17afd2
--- /dev/null
+++ b/node_modules/lodash/_charsStartIndex.js
@@ -0,0 +1,20 @@
+var baseIndexOf = require('./_baseIndexOf');
+
+/**
+ * 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;
+}
+
+module.exports = charsStartIndex;
diff --git a/node_modules/lodash/_cloneArrayBuffer.js b/node_modules/lodash/_cloneArrayBuffer.js
new file mode 100644
index 0000000..c3d8f6e
--- /dev/null
+++ b/node_modules/lodash/_cloneArrayBuffer.js
@@ -0,0 +1,16 @@
+var Uint8Array = require('./_Uint8Array');
+
+/**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+}
+
+module.exports = cloneArrayBuffer;
diff --git a/node_modules/lodash/_cloneBuffer.js b/node_modules/lodash/_cloneBuffer.js
new file mode 100644
index 0000000..27c4810
--- /dev/null
+++ b/node_modules/lodash/_cloneBuffer.js
@@ -0,0 +1,35 @@
+var root = require('./_root');
+
+/** 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,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
+
+/**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+}
+
+module.exports = cloneBuffer;
diff --git a/node_modules/lodash/_cloneDataView.js b/node_modules/lodash/_cloneDataView.js
new file mode 100644
index 0000000..9c9b7b0
--- /dev/null
+++ b/node_modules/lodash/_cloneDataView.js
@@ -0,0 +1,16 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer');
+
+/**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+}
+
+module.exports = cloneDataView;
diff --git a/node_modules/lodash/_cloneRegExp.js b/node_modules/lodash/_cloneRegExp.js
new file mode 100644
index 0000000..64a30df
--- /dev/null
+++ b/node_modules/lodash/_cloneRegExp.js
@@ -0,0 +1,17 @@
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+}
+
+module.exports = cloneRegExp;
diff --git a/node_modules/lodash/_cloneSymbol.js b/node_modules/lodash/_cloneSymbol.js
new file mode 100644
index 0000000..bede39f
--- /dev/null
+++ b/node_modules/lodash/_cloneSymbol.js
@@ -0,0 +1,18 @@
+var Symbol = require('./_Symbol');
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+}
+
+module.exports = cloneSymbol;
diff --git a/node_modules/lodash/_cloneTypedArray.js b/node_modules/lodash/_cloneTypedArray.js
new file mode 100644
index 0000000..7aad84d
--- /dev/null
+++ b/node_modules/lodash/_cloneTypedArray.js
@@ -0,0 +1,16 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer');
+
+/**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+}
+
+module.exports = cloneTypedArray;
diff --git a/node_modules/lodash/_compareAscending.js b/node_modules/lodash/_compareAscending.js
new file mode 100644
index 0000000..8dc2791
--- /dev/null
+++ b/node_modules/lodash/_compareAscending.js
@@ -0,0 +1,41 @@
+var isSymbol = require('./isSymbol');
+
+/**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+}
+
+module.exports = compareAscending;
diff --git a/node_modules/lodash/_compareMultiple.js b/node_modules/lodash/_compareMultiple.js
new file mode 100644
index 0000000..ad61f0f
--- /dev/null
+++ b/node_modules/lodash/_compareMultiple.js
@@ -0,0 +1,44 @@
+var compareAscending = require('./_compareAscending');
+
+/**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+}
+
+module.exports = compareMultiple;
diff --git a/node_modules/lodash/_composeArgs.js b/node_modules/lodash/_composeArgs.js
new file mode 100644
index 0000000..1ce40f4
--- /dev/null
+++ b/node_modules/lodash/_composeArgs.js
@@ -0,0 +1,39 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+}
+
+module.exports = composeArgs;
diff --git a/node_modules/lodash/_composeArgsRight.js b/node_modules/lodash/_composeArgsRight.js
new file mode 100644
index 0000000..8dc588d
--- /dev/null
+++ b/node_modules/lodash/_composeArgsRight.js
@@ -0,0 +1,41 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+}
+
+module.exports = composeArgsRight;
diff --git a/node_modules/lodash/_copyArray.js b/node_modules/lodash/_copyArray.js
new file mode 100644
index 0000000..cd94d5d
--- /dev/null
+++ b/node_modules/lodash/_copyArray.js
@@ -0,0 +1,20 @@
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+}
+
+module.exports = copyArray;
diff --git a/node_modules/lodash/_copyObject.js b/node_modules/lodash/_copyObject.js
new file mode 100644
index 0000000..2f2a5c2
--- /dev/null
+++ b/node_modules/lodash/_copyObject.js
@@ -0,0 +1,40 @@
+var assignValue = require('./_assignValue'),
+ baseAssignValue = require('./_baseAssignValue');
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+}
+
+module.exports = copyObject;
diff --git a/node_modules/lodash/_copySymbols.js b/node_modules/lodash/_copySymbols.js
new file mode 100644
index 0000000..c35944a
--- /dev/null
+++ b/node_modules/lodash/_copySymbols.js
@@ -0,0 +1,16 @@
+var copyObject = require('./_copyObject'),
+ getSymbols = require('./_getSymbols');
+
+/**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+}
+
+module.exports = copySymbols;
diff --git a/node_modules/lodash/_copySymbolsIn.js b/node_modules/lodash/_copySymbolsIn.js
new file mode 100644
index 0000000..fdf20a7
--- /dev/null
+++ b/node_modules/lodash/_copySymbolsIn.js
@@ -0,0 +1,16 @@
+var copyObject = require('./_copyObject'),
+ getSymbolsIn = require('./_getSymbolsIn');
+
+/**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+}
+
+module.exports = copySymbolsIn;
diff --git a/node_modules/lodash/_coreJsData.js b/node_modules/lodash/_coreJsData.js
new file mode 100644
index 0000000..f8e5b4e
--- /dev/null
+++ b/node_modules/lodash/_coreJsData.js
@@ -0,0 +1,6 @@
+var root = require('./_root');
+
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
+
+module.exports = coreJsData;
diff --git a/node_modules/lodash/_countHolders.js b/node_modules/lodash/_countHolders.js
new file mode 100644
index 0000000..718fcda
--- /dev/null
+++ b/node_modules/lodash/_countHolders.js
@@ -0,0 +1,21 @@
+/**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+}
+
+module.exports = countHolders;
diff --git a/node_modules/lodash/_createAggregator.js b/node_modules/lodash/_createAggregator.js
new file mode 100644
index 0000000..0be42c4
--- /dev/null
+++ b/node_modules/lodash/_createAggregator.js
@@ -0,0 +1,23 @@
+var arrayAggregator = require('./_arrayAggregator'),
+ baseAggregator = require('./_baseAggregator'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray');
+
+/**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
+ };
+}
+
+module.exports = createAggregator;
diff --git a/node_modules/lodash/_createAssigner.js b/node_modules/lodash/_createAssigner.js
new file mode 100644
index 0000000..1f904c5
--- /dev/null
+++ b/node_modules/lodash/_createAssigner.js
@@ -0,0 +1,37 @@
+var baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+}
+
+module.exports = createAssigner;
diff --git a/node_modules/lodash/_createBaseEach.js b/node_modules/lodash/_createBaseEach.js
new file mode 100644
index 0000000..d24fdd1
--- /dev/null
+++ b/node_modules/lodash/_createBaseEach.js
@@ -0,0 +1,32 @@
+var isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+}
+
+module.exports = createBaseEach;
diff --git a/node_modules/lodash/_createBaseFor.js b/node_modules/lodash/_createBaseFor.js
new file mode 100644
index 0000000..94cbf29
--- /dev/null
+++ b/node_modules/lodash/_createBaseFor.js
@@ -0,0 +1,25 @@
+/**
+ * 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;
+ };
+}
+
+module.exports = createBaseFor;
diff --git a/node_modules/lodash/_createBind.js b/node_modules/lodash/_createBind.js
new file mode 100644
index 0000000..07cb99f
--- /dev/null
+++ b/node_modules/lodash/_createBind.js
@@ -0,0 +1,28 @@
+var createCtor = require('./_createCtor'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+}
+
+module.exports = createBind;
diff --git a/node_modules/lodash/_createCaseFirst.js b/node_modules/lodash/_createCaseFirst.js
new file mode 100644
index 0000000..fe8ea48
--- /dev/null
+++ b/node_modules/lodash/_createCaseFirst.js
@@ -0,0 +1,33 @@
+var castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+}
+
+module.exports = createCaseFirst;
diff --git a/node_modules/lodash/_createCompounder.js b/node_modules/lodash/_createCompounder.js
new file mode 100644
index 0000000..8d4cee2
--- /dev/null
+++ b/node_modules/lodash/_createCompounder.js
@@ -0,0 +1,24 @@
+var arrayReduce = require('./_arrayReduce'),
+ deburr = require('./deburr'),
+ words = require('./words');
+
+/** Used to compose unicode capture groups. */
+var rsApos = "['\u2019]";
+
+/** Used to match apostrophes. */
+var reApos = RegExp(rsApos, 'g');
+
+/**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+}
+
+module.exports = createCompounder;
diff --git a/node_modules/lodash/_createCtor.js b/node_modules/lodash/_createCtor.js
new file mode 100644
index 0000000..9047aa5
--- /dev/null
+++ b/node_modules/lodash/_createCtor.js
@@ -0,0 +1,37 @@
+var baseCreate = require('./_baseCreate'),
+ isObject = require('./isObject');
+
+/**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+}
+
+module.exports = createCtor;
diff --git a/node_modules/lodash/_createCurry.js b/node_modules/lodash/_createCurry.js
new file mode 100644
index 0000000..f06c2cd
--- /dev/null
+++ b/node_modules/lodash/_createCurry.js
@@ -0,0 +1,46 @@
+var apply = require('./_apply'),
+ createCtor = require('./_createCtor'),
+ createHybrid = require('./_createHybrid'),
+ createRecurry = require('./_createRecurry'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders'),
+ root = require('./_root');
+
+/**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+}
+
+module.exports = createCurry;
diff --git a/node_modules/lodash/_createFind.js b/node_modules/lodash/_createFind.js
new file mode 100644
index 0000000..8859ff8
--- /dev/null
+++ b/node_modules/lodash/_createFind.js
@@ -0,0 +1,25 @@
+var baseIteratee = require('./_baseIteratee'),
+ isArrayLike = require('./isArrayLike'),
+ keys = require('./keys');
+
+/**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = baseIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+}
+
+module.exports = createFind;
diff --git a/node_modules/lodash/_createFlow.js b/node_modules/lodash/_createFlow.js
new file mode 100644
index 0000000..baaddbf
--- /dev/null
+++ b/node_modules/lodash/_createFlow.js
@@ -0,0 +1,78 @@
+var LodashWrapper = require('./_LodashWrapper'),
+ flatRest = require('./_flatRest'),
+ getData = require('./_getData'),
+ getFuncName = require('./_getFuncName'),
+ isArray = require('./isArray'),
+ isLaziable = require('./_isLaziable');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_FLAG = 8,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256;
+
+/**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value)) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+}
+
+module.exports = createFlow;
diff --git a/node_modules/lodash/_createHybrid.js b/node_modules/lodash/_createHybrid.js
new file mode 100644
index 0000000..b671bd1
--- /dev/null
+++ b/node_modules/lodash/_createHybrid.js
@@ -0,0 +1,92 @@
+var composeArgs = require('./_composeArgs'),
+ composeArgsRight = require('./_composeArgsRight'),
+ countHolders = require('./_countHolders'),
+ createCtor = require('./_createCtor'),
+ createRecurry = require('./_createRecurry'),
+ getHolder = require('./_getHolder'),
+ reorder = require('./_reorder'),
+ replaceHolders = require('./_replaceHolders'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_ARY_FLAG = 128,
+ WRAP_FLIP_FLAG = 512;
+
+/**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+}
+
+module.exports = createHybrid;
diff --git a/node_modules/lodash/_createInverter.js b/node_modules/lodash/_createInverter.js
new file mode 100644
index 0000000..6c0c562
--- /dev/null
+++ b/node_modules/lodash/_createInverter.js
@@ -0,0 +1,17 @@
+var baseInverter = require('./_baseInverter');
+
+/**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+}
+
+module.exports = createInverter;
diff --git a/node_modules/lodash/_createMathOperation.js b/node_modules/lodash/_createMathOperation.js
new file mode 100644
index 0000000..f1e238a
--- /dev/null
+++ b/node_modules/lodash/_createMathOperation.js
@@ -0,0 +1,38 @@
+var baseToNumber = require('./_baseToNumber'),
+ baseToString = require('./_baseToString');
+
+/**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+}
+
+module.exports = createMathOperation;
diff --git a/node_modules/lodash/_createOver.js b/node_modules/lodash/_createOver.js
new file mode 100644
index 0000000..3b94551
--- /dev/null
+++ b/node_modules/lodash/_createOver.js
@@ -0,0 +1,27 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUnary = require('./_baseUnary'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+}
+
+module.exports = createOver;
diff --git a/node_modules/lodash/_createPadding.js b/node_modules/lodash/_createPadding.js
new file mode 100644
index 0000000..2124612
--- /dev/null
+++ b/node_modules/lodash/_createPadding.js
@@ -0,0 +1,33 @@
+var baseRepeat = require('./_baseRepeat'),
+ baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ stringSize = require('./_stringSize'),
+ stringToArray = require('./_stringToArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil;
+
+/**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+}
+
+module.exports = createPadding;
diff --git a/node_modules/lodash/_createPartial.js b/node_modules/lodash/_createPartial.js
new file mode 100644
index 0000000..e16c248
--- /dev/null
+++ b/node_modules/lodash/_createPartial.js
@@ -0,0 +1,43 @@
+var apply = require('./_apply'),
+ createCtor = require('./_createCtor'),
+ root = require('./_root');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1;
+
+/**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+}
+
+module.exports = createPartial;
diff --git a/node_modules/lodash/_createRange.js b/node_modules/lodash/_createRange.js
new file mode 100644
index 0000000..9f52c77
--- /dev/null
+++ b/node_modules/lodash/_createRange.js
@@ -0,0 +1,30 @@
+var baseRange = require('./_baseRange'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toFinite = require('./toFinite');
+
+/**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+}
+
+module.exports = createRange;
diff --git a/node_modules/lodash/_createRecurry.js b/node_modules/lodash/_createRecurry.js
new file mode 100644
index 0000000..eb29fb2
--- /dev/null
+++ b/node_modules/lodash/_createRecurry.js
@@ -0,0 +1,56 @@
+var isLaziable = require('./_isLaziable'),
+ setData = require('./_setData'),
+ setWrapToString = require('./_setWrapToString');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+}
+
+module.exports = createRecurry;
diff --git a/node_modules/lodash/_createRelationalOperation.js b/node_modules/lodash/_createRelationalOperation.js
new file mode 100644
index 0000000..a17c6b5
--- /dev/null
+++ b/node_modules/lodash/_createRelationalOperation.js
@@ -0,0 +1,20 @@
+var toNumber = require('./toNumber');
+
+/**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+}
+
+module.exports = createRelationalOperation;
diff --git a/node_modules/lodash/_createRound.js b/node_modules/lodash/_createRound.js
new file mode 100644
index 0000000..88be5df
--- /dev/null
+++ b/node_modules/lodash/_createRound.js
@@ -0,0 +1,35 @@
+var root = require('./_root'),
+ toInteger = require('./toInteger'),
+ toNumber = require('./toNumber'),
+ toString = require('./toString');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsFinite = root.isFinite,
+ nativeMin = Math.min;
+
+/**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
+ if (precision && nativeIsFinite(number)) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+}
+
+module.exports = createRound;
diff --git a/node_modules/lodash/_createSet.js b/node_modules/lodash/_createSet.js
new file mode 100644
index 0000000..0f644ee
--- /dev/null
+++ b/node_modules/lodash/_createSet.js
@@ -0,0 +1,19 @@
+var Set = require('./_Set'),
+ noop = require('./noop'),
+ setToArray = require('./_setToArray');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+};
+
+module.exports = createSet;
diff --git a/node_modules/lodash/_createToPairs.js b/node_modules/lodash/_createToPairs.js
new file mode 100644
index 0000000..568417a
--- /dev/null
+++ b/node_modules/lodash/_createToPairs.js
@@ -0,0 +1,30 @@
+var baseToPairs = require('./_baseToPairs'),
+ getTag = require('./_getTag'),
+ mapToArray = require('./_mapToArray'),
+ setToPairs = require('./_setToPairs');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+}
+
+module.exports = createToPairs;
diff --git a/node_modules/lodash/_createWrap.js b/node_modules/lodash/_createWrap.js
new file mode 100644
index 0000000..33f0633
--- /dev/null
+++ b/node_modules/lodash/_createWrap.js
@@ -0,0 +1,106 @@
+var baseSetData = require('./_baseSetData'),
+ createBind = require('./_createBind'),
+ createCurry = require('./_createCurry'),
+ createHybrid = require('./_createHybrid'),
+ createPartial = require('./_createPartial'),
+ getData = require('./_getData'),
+ mergeData = require('./_mergeData'),
+ setData = require('./_setData'),
+ setWrapToString = require('./_setWrapToString'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] === undefined
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+}
+
+module.exports = createWrap;
diff --git a/node_modules/lodash/_customDefaultsAssignIn.js b/node_modules/lodash/_customDefaultsAssignIn.js
new file mode 100644
index 0000000..1f49e6f
--- /dev/null
+++ b/node_modules/lodash/_customDefaultsAssignIn.js
@@ -0,0 +1,29 @@
+var eq = require('./eq');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+}
+
+module.exports = customDefaultsAssignIn;
diff --git a/node_modules/lodash/_customDefaultsMerge.js b/node_modules/lodash/_customDefaultsMerge.js
new file mode 100644
index 0000000..4cab317
--- /dev/null
+++ b/node_modules/lodash/_customDefaultsMerge.js
@@ -0,0 +1,28 @@
+var baseMerge = require('./_baseMerge'),
+ isObject = require('./isObject');
+
+/**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+ * objects into destination objects that are passed thru.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+}
+
+module.exports = customDefaultsMerge;
diff --git a/node_modules/lodash/_customOmitClone.js b/node_modules/lodash/_customOmitClone.js
new file mode 100644
index 0000000..968db2e
--- /dev/null
+++ b/node_modules/lodash/_customOmitClone.js
@@ -0,0 +1,16 @@
+var isPlainObject = require('./isPlainObject');
+
+/**
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+ * objects.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {string} key The key of the property to inspect.
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+ */
+function customOmitClone(value) {
+ return isPlainObject(value) ? undefined : value;
+}
+
+module.exports = customOmitClone;
diff --git a/node_modules/lodash/_deburrLetter.js b/node_modules/lodash/_deburrLetter.js
new file mode 100644
index 0000000..3e531ed
--- /dev/null
+++ b/node_modules/lodash/_deburrLetter.js
@@ -0,0 +1,71 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map Latin Unicode letters to basic Latin letters. */
+var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+};
+
+/**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+var deburrLetter = basePropertyOf(deburredLetters);
+
+module.exports = deburrLetter;
diff --git a/node_modules/lodash/_defineProperty.js b/node_modules/lodash/_defineProperty.js
new file mode 100644
index 0000000..b6116d9
--- /dev/null
+++ b/node_modules/lodash/_defineProperty.js
@@ -0,0 +1,11 @@
+var getNative = require('./_getNative');
+
+var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+}());
+
+module.exports = defineProperty;
diff --git a/node_modules/lodash/_equalArrays.js b/node_modules/lodash/_equalArrays.js
new file mode 100644
index 0000000..824228c
--- /dev/null
+++ b/node_modules/lodash/_equalArrays.js
@@ -0,0 +1,84 @@
+var SetCache = require('./_SetCache'),
+ arraySome = require('./_arraySome'),
+ cacheHas = require('./_cacheHas');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalArrays;
diff --git a/node_modules/lodash/_equalByTag.js b/node_modules/lodash/_equalByTag.js
new file mode 100644
index 0000000..71919e8
--- /dev/null
+++ b/node_modules/lodash/_equalByTag.js
@@ -0,0 +1,112 @@
+var Symbol = require('./_Symbol'),
+ Uint8Array = require('./_Uint8Array'),
+ eq = require('./eq'),
+ equalArrays = require('./_equalArrays'),
+ mapToArray = require('./_mapToArray'),
+ setToArray = require('./_setToArray');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+}
+
+module.exports = equalByTag;
diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js
new file mode 100644
index 0000000..cdaacd2
--- /dev/null
+++ b/node_modules/lodash/_equalObjects.js
@@ -0,0 +1,90 @@
+var getAllKeys = require('./_getAllKeys');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalObjects;
diff --git a/node_modules/lodash/_escapeHtmlChar.js b/node_modules/lodash/_escapeHtmlChar.js
new file mode 100644
index 0000000..7ca68ee
--- /dev/null
+++ b/node_modules/lodash/_escapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map characters to HTML entities. */
+var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+};
+
+/**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+module.exports = escapeHtmlChar;
diff --git a/node_modules/lodash/_escapeStringChar.js b/node_modules/lodash/_escapeStringChar.js
new file mode 100644
index 0000000..44eca96
--- /dev/null
+++ b/node_modules/lodash/_escapeStringChar.js
@@ -0,0 +1,22 @@
+/** Used to escape characters for inclusion in compiled string literals. */
+var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+};
+
+/**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+}
+
+module.exports = escapeStringChar;
diff --git a/node_modules/lodash/_flatRest.js b/node_modules/lodash/_flatRest.js
new file mode 100644
index 0000000..94ab6cc
--- /dev/null
+++ b/node_modules/lodash/_flatRest.js
@@ -0,0 +1,16 @@
+var flatten = require('./flatten'),
+ overRest = require('./_overRest'),
+ setToString = require('./_setToString');
+
+/**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+}
+
+module.exports = flatRest;
diff --git a/node_modules/lodash/_freeGlobal.js b/node_modules/lodash/_freeGlobal.js
new file mode 100644
index 0000000..bbec998
--- /dev/null
+++ b/node_modules/lodash/_freeGlobal.js
@@ -0,0 +1,4 @@
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+module.exports = freeGlobal;
diff --git a/node_modules/lodash/_getAllKeys.js b/node_modules/lodash/_getAllKeys.js
new file mode 100644
index 0000000..a9ce699
--- /dev/null
+++ b/node_modules/lodash/_getAllKeys.js
@@ -0,0 +1,16 @@
+var baseGetAllKeys = require('./_baseGetAllKeys'),
+ getSymbols = require('./_getSymbols'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+}
+
+module.exports = getAllKeys;
diff --git a/node_modules/lodash/_getAllKeysIn.js b/node_modules/lodash/_getAllKeysIn.js
new file mode 100644
index 0000000..1b46678
--- /dev/null
+++ b/node_modules/lodash/_getAllKeysIn.js
@@ -0,0 +1,17 @@
+var baseGetAllKeys = require('./_baseGetAllKeys'),
+ getSymbolsIn = require('./_getSymbolsIn'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+}
+
+module.exports = getAllKeysIn;
diff --git a/node_modules/lodash/_getData.js b/node_modules/lodash/_getData.js
new file mode 100644
index 0000000..a1fe7b7
--- /dev/null
+++ b/node_modules/lodash/_getData.js
@@ -0,0 +1,15 @@
+var metaMap = require('./_metaMap'),
+ noop = require('./noop');
+
+/**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+};
+
+module.exports = getData;
diff --git a/node_modules/lodash/_getFuncName.js b/node_modules/lodash/_getFuncName.js
new file mode 100644
index 0000000..21e15b3
--- /dev/null
+++ b/node_modules/lodash/_getFuncName.js
@@ -0,0 +1,31 @@
+var realNames = require('./_realNames');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+}
+
+module.exports = getFuncName;
diff --git a/node_modules/lodash/_getHolder.js b/node_modules/lodash/_getHolder.js
new file mode 100644
index 0000000..65e94b5
--- /dev/null
+++ b/node_modules/lodash/_getHolder.js
@@ -0,0 +1,13 @@
+/**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+function getHolder(func) {
+ var object = func;
+ return object.placeholder;
+}
+
+module.exports = getHolder;
diff --git a/node_modules/lodash/_getMapData.js b/node_modules/lodash/_getMapData.js
new file mode 100644
index 0000000..17f6303
--- /dev/null
+++ b/node_modules/lodash/_getMapData.js
@@ -0,0 +1,18 @@
+var isKeyable = require('./_isKeyable');
+
+/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
+
+module.exports = getMapData;
diff --git a/node_modules/lodash/_getMatchData.js b/node_modules/lodash/_getMatchData.js
new file mode 100644
index 0000000..2cc70f9
--- /dev/null
+++ b/node_modules/lodash/_getMatchData.js
@@ -0,0 +1,24 @@
+var isStrictComparable = require('./_isStrictComparable'),
+ keys = require('./keys');
+
+/**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+}
+
+module.exports = getMatchData;
diff --git a/node_modules/lodash/_getNative.js b/node_modules/lodash/_getNative.js
new file mode 100644
index 0000000..97a622b
--- /dev/null
+++ b/node_modules/lodash/_getNative.js
@@ -0,0 +1,17 @@
+var baseIsNative = require('./_baseIsNative'),
+ getValue = require('./_getValue');
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
+
+module.exports = getNative;
diff --git a/node_modules/lodash/_getPrototype.js b/node_modules/lodash/_getPrototype.js
new file mode 100644
index 0000000..e808612
--- /dev/null
+++ b/node_modules/lodash/_getPrototype.js
@@ -0,0 +1,6 @@
+var overArg = require('./_overArg');
+
+/** Built-in value references. */
+var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+module.exports = getPrototype;
diff --git a/node_modules/lodash/_getRawTag.js b/node_modules/lodash/_getRawTag.js
new file mode 100644
index 0000000..49a95c9
--- /dev/null
+++ b/node_modules/lodash/_getRawTag.js
@@ -0,0 +1,46 @@
+var Symbol = require('./_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 = Symbol ? Symbol.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),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+}
+
+module.exports = getRawTag;
diff --git a/node_modules/lodash/_getSymbols.js b/node_modules/lodash/_getSymbols.js
new file mode 100644
index 0000000..7d6eafe
--- /dev/null
+++ b/node_modules/lodash/_getSymbols.js
@@ -0,0 +1,30 @@
+var arrayFilter = require('./_arrayFilter'),
+ stubArray = require('./stubArray');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+};
+
+module.exports = getSymbols;
diff --git a/node_modules/lodash/_getSymbolsIn.js b/node_modules/lodash/_getSymbolsIn.js
new file mode 100644
index 0000000..cec0855
--- /dev/null
+++ b/node_modules/lodash/_getSymbolsIn.js
@@ -0,0 +1,25 @@
+var arrayPush = require('./_arrayPush'),
+ getPrototype = require('./_getPrototype'),
+ getSymbols = require('./_getSymbols'),
+ stubArray = require('./stubArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+};
+
+module.exports = getSymbolsIn;
diff --git a/node_modules/lodash/_getTag.js b/node_modules/lodash/_getTag.js
new file mode 100644
index 0000000..deaf89d
--- /dev/null
+++ b/node_modules/lodash/_getTag.js
@@ -0,0 +1,58 @@
+var DataView = require('./_DataView'),
+ Map = require('./_Map'),
+ Promise = require('./_Promise'),
+ Set = require('./_Set'),
+ WeakMap = require('./_WeakMap'),
+ baseGetTag = require('./_baseGetTag'),
+ toSource = require('./_toSource');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
+
+var dataViewTag = '[object DataView]';
+
+/** Used to detect maps, sets, and weakmaps. */
+var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+var getTag = baseGetTag;
+
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+}
+
+module.exports = getTag;
diff --git a/node_modules/lodash/_getValue.js b/node_modules/lodash/_getValue.js
new file mode 100644
index 0000000..5f7d773
--- /dev/null
+++ b/node_modules/lodash/_getValue.js
@@ -0,0 +1,13 @@
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
+}
+
+module.exports = getValue;
diff --git a/node_modules/lodash/_getView.js b/node_modules/lodash/_getView.js
new file mode 100644
index 0000000..df1e5d4
--- /dev/null
+++ b/node_modules/lodash/_getView.js
@@ -0,0 +1,33 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+}
+
+module.exports = getView;
diff --git a/node_modules/lodash/_getWrapDetails.js b/node_modules/lodash/_getWrapDetails.js
new file mode 100644
index 0000000..3bcc6e4
--- /dev/null
+++ b/node_modules/lodash/_getWrapDetails.js
@@ -0,0 +1,17 @@
+/** Used to match wrap detail comments. */
+var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+/**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+}
+
+module.exports = getWrapDetails;
diff --git a/node_modules/lodash/_hasPath.js b/node_modules/lodash/_hasPath.js
new file mode 100644
index 0000000..93dbde1
--- /dev/null
+++ b/node_modules/lodash/_hasPath.js
@@ -0,0 +1,39 @@
+var castPath = require('./_castPath'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isIndex = require('./_isIndex'),
+ isLength = require('./isLength'),
+ toKey = require('./_toKey');
+
+/**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+}
+
+module.exports = hasPath;
diff --git a/node_modules/lodash/_hasUnicode.js b/node_modules/lodash/_hasUnicode.js
new file mode 100644
index 0000000..cb6ca15
--- /dev/null
+++ b/node_modules/lodash/_hasUnicode.js
@@ -0,0 +1,26 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ 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);
+}
+
+module.exports = hasUnicode;
diff --git a/node_modules/lodash/_hasUnicodeWord.js b/node_modules/lodash/_hasUnicodeWord.js
new file mode 100644
index 0000000..95d52c4
--- /dev/null
+++ b/node_modules/lodash/_hasUnicodeWord.js
@@ -0,0 +1,15 @@
+/** Used to detect strings that need a more robust regexp to match words. */
+var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+/**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+}
+
+module.exports = hasUnicodeWord;
diff --git a/node_modules/lodash/_hashClear.js b/node_modules/lodash/_hashClear.js
new file mode 100644
index 0000000..5d4b70c
--- /dev/null
+++ b/node_modules/lodash/_hashClear.js
@@ -0,0 +1,15 @@
+var nativeCreate = require('./_nativeCreate');
+
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+}
+
+module.exports = hashClear;
diff --git a/node_modules/lodash/_hashDelete.js b/node_modules/lodash/_hashDelete.js
new file mode 100644
index 0000000..ea9dabf
--- /dev/null
+++ b/node_modules/lodash/_hashDelete.js
@@ -0,0 +1,17 @@
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+module.exports = hashDelete;
diff --git a/node_modules/lodash/_hashGet.js b/node_modules/lodash/_hashGet.js
new file mode 100644
index 0000000..1fc2f34
--- /dev/null
+++ b/node_modules/lodash/_hashGet.js
@@ -0,0 +1,30 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
+
+module.exports = hashGet;
diff --git a/node_modules/lodash/_hashHas.js b/node_modules/lodash/_hashHas.js
new file mode 100644
index 0000000..281a551
--- /dev/null
+++ b/node_modules/lodash/_hashHas.js
@@ -0,0 +1,23 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+}
+
+module.exports = hashHas;
diff --git a/node_modules/lodash/_hashSet.js b/node_modules/lodash/_hashSet.js
new file mode 100644
index 0000000..e105528
--- /dev/null
+++ b/node_modules/lodash/_hashSet.js
@@ -0,0 +1,23 @@
+var nativeCreate = require('./_nativeCreate');
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
+
+module.exports = hashSet;
diff --git a/node_modules/lodash/_initCloneArray.js b/node_modules/lodash/_initCloneArray.js
new file mode 100644
index 0000000..078c15a
--- /dev/null
+++ b/node_modules/lodash/_initCloneArray.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+}
+
+module.exports = initCloneArray;
diff --git a/node_modules/lodash/_initCloneByTag.js b/node_modules/lodash/_initCloneByTag.js
new file mode 100644
index 0000000..f69a008
--- /dev/null
+++ b/node_modules/lodash/_initCloneByTag.js
@@ -0,0 +1,77 @@
+var cloneArrayBuffer = require('./_cloneArrayBuffer'),
+ cloneDataView = require('./_cloneDataView'),
+ cloneRegExp = require('./_cloneRegExp'),
+ cloneSymbol = require('./_cloneSymbol'),
+ cloneTypedArray = require('./_cloneTypedArray');
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return new Ctor;
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return new Ctor;
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+}
+
+module.exports = initCloneByTag;
diff --git a/node_modules/lodash/_initCloneObject.js b/node_modules/lodash/_initCloneObject.js
new file mode 100644
index 0000000..5a13e64
--- /dev/null
+++ b/node_modules/lodash/_initCloneObject.js
@@ -0,0 +1,18 @@
+var baseCreate = require('./_baseCreate'),
+ getPrototype = require('./_getPrototype'),
+ isPrototype = require('./_isPrototype');
+
+/**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+}
+
+module.exports = initCloneObject;
diff --git a/node_modules/lodash/_insertWrapDetails.js b/node_modules/lodash/_insertWrapDetails.js
new file mode 100644
index 0000000..e790808
--- /dev/null
+++ b/node_modules/lodash/_insertWrapDetails.js
@@ -0,0 +1,23 @@
+/** Used to match wrap detail comments. */
+var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
+
+/**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+}
+
+module.exports = insertWrapDetails;
diff --git a/node_modules/lodash/_isFlattenable.js b/node_modules/lodash/_isFlattenable.js
new file mode 100644
index 0000000..4cc2c24
--- /dev/null
+++ b/node_modules/lodash/_isFlattenable.js
@@ -0,0 +1,20 @@
+var Symbol = require('./_Symbol'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray');
+
+/** Built-in value references. */
+var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
+
+/**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+}
+
+module.exports = isFlattenable;
diff --git a/node_modules/lodash/_isIndex.js b/node_modules/lodash/_isIndex.js
new file mode 100644
index 0000000..061cd39
--- /dev/null
+++ b/node_modules/lodash/_isIndex.js
@@ -0,0 +1,25 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 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 : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+module.exports = isIndex;
diff --git a/node_modules/lodash/_isIterateeCall.js b/node_modules/lodash/_isIterateeCall.js
new file mode 100644
index 0000000..a0bb5a9
--- /dev/null
+++ b/node_modules/lodash/_isIterateeCall.js
@@ -0,0 +1,30 @@
+var eq = require('./eq'),
+ isArrayLike = require('./isArrayLike'),
+ isIndex = require('./_isIndex'),
+ isObject = require('./isObject');
+
+/**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+}
+
+module.exports = isIterateeCall;
diff --git a/node_modules/lodash/_isKey.js b/node_modules/lodash/_isKey.js
new file mode 100644
index 0000000..ff08b06
--- /dev/null
+++ b/node_modules/lodash/_isKey.js
@@ -0,0 +1,29 @@
+var isArray = require('./isArray'),
+ isSymbol = require('./isSymbol');
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+}
+
+module.exports = isKey;
diff --git a/node_modules/lodash/_isKeyable.js b/node_modules/lodash/_isKeyable.js
new file mode 100644
index 0000000..39f1828
--- /dev/null
+++ b/node_modules/lodash/_isKeyable.js
@@ -0,0 +1,15 @@
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
+
+module.exports = isKeyable;
diff --git a/node_modules/lodash/_isLaziable.js b/node_modules/lodash/_isLaziable.js
new file mode 100644
index 0000000..a57c4f2
--- /dev/null
+++ b/node_modules/lodash/_isLaziable.js
@@ -0,0 +1,28 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ getData = require('./_getData'),
+ getFuncName = require('./_getFuncName'),
+ lodash = require('./wrapperLodash');
+
+/**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+}
+
+module.exports = isLaziable;
diff --git a/node_modules/lodash/_isMaskable.js b/node_modules/lodash/_isMaskable.js
new file mode 100644
index 0000000..eb98d09
--- /dev/null
+++ b/node_modules/lodash/_isMaskable.js
@@ -0,0 +1,14 @@
+var coreJsData = require('./_coreJsData'),
+ isFunction = require('./isFunction'),
+ stubFalse = require('./stubFalse');
+
+/**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+var isMaskable = coreJsData ? isFunction : stubFalse;
+
+module.exports = isMaskable;
diff --git a/node_modules/lodash/_isMasked.js b/node_modules/lodash/_isMasked.js
new file mode 100644
index 0000000..4b0f21b
--- /dev/null
+++ b/node_modules/lodash/_isMasked.js
@@ -0,0 +1,20 @@
+var coreJsData = require('./_coreJsData');
+
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
+
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+}
+
+module.exports = isMasked;
diff --git a/node_modules/lodash/_isPrototype.js b/node_modules/lodash/_isPrototype.js
new file mode 100644
index 0000000..0f29498
--- /dev/null
+++ b/node_modules/lodash/_isPrototype.js
@@ -0,0 +1,18 @@
+/** Used for built-in method references. */
+var objectProto = 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;
+
+ return value === proto;
+}
+
+module.exports = isPrototype;
diff --git a/node_modules/lodash/_isStrictComparable.js b/node_modules/lodash/_isStrictComparable.js
new file mode 100644
index 0000000..b59f40b
--- /dev/null
+++ b/node_modules/lodash/_isStrictComparable.js
@@ -0,0 +1,15 @@
+var isObject = require('./isObject');
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !isObject(value);
+}
+
+module.exports = isStrictComparable;
diff --git a/node_modules/lodash/_iteratorToArray.js b/node_modules/lodash/_iteratorToArray.js
new file mode 100644
index 0000000..4768566
--- /dev/null
+++ b/node_modules/lodash/_iteratorToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+}
+
+module.exports = iteratorToArray;
diff --git a/node_modules/lodash/_lazyClone.js b/node_modules/lodash/_lazyClone.js
new file mode 100644
index 0000000..d8a51f8
--- /dev/null
+++ b/node_modules/lodash/_lazyClone.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ copyArray = require('./_copyArray');
+
+/**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+}
+
+module.exports = lazyClone;
diff --git a/node_modules/lodash/_lazyReverse.js b/node_modules/lodash/_lazyReverse.js
new file mode 100644
index 0000000..c5b5219
--- /dev/null
+++ b/node_modules/lodash/_lazyReverse.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper');
+
+/**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+}
+
+module.exports = lazyReverse;
diff --git a/node_modules/lodash/_lazyValue.js b/node_modules/lodash/_lazyValue.js
new file mode 100644
index 0000000..371ca8d
--- /dev/null
+++ b/node_modules/lodash/_lazyValue.js
@@ -0,0 +1,69 @@
+var baseWrapperValue = require('./_baseWrapperValue'),
+ getView = require('./_getView'),
+ isArray = require('./isArray');
+
+/** Used to indicate the type of lazy iteratees. */
+var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+}
+
+module.exports = lazyValue;
diff --git a/node_modules/lodash/_listCacheClear.js b/node_modules/lodash/_listCacheClear.js
new file mode 100644
index 0000000..acbe39a
--- /dev/null
+++ b/node_modules/lodash/_listCacheClear.js
@@ -0,0 +1,13 @@
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+}
+
+module.exports = listCacheClear;
diff --git a/node_modules/lodash/_listCacheDelete.js b/node_modules/lodash/_listCacheDelete.js
new file mode 100644
index 0000000..b1384ad
--- /dev/null
+++ b/node_modules/lodash/_listCacheDelete.js
@@ -0,0 +1,35 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+}
+
+module.exports = listCacheDelete;
diff --git a/node_modules/lodash/_listCacheGet.js b/node_modules/lodash/_listCacheGet.js
new file mode 100644
index 0000000..f8192fc
--- /dev/null
+++ b/node_modules/lodash/_listCacheGet.js
@@ -0,0 +1,19 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+}
+
+module.exports = listCacheGet;
diff --git a/node_modules/lodash/_listCacheHas.js b/node_modules/lodash/_listCacheHas.js
new file mode 100644
index 0000000..2adf671
--- /dev/null
+++ b/node_modules/lodash/_listCacheHas.js
@@ -0,0 +1,16 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
+
+module.exports = listCacheHas;
diff --git a/node_modules/lodash/_listCacheSet.js b/node_modules/lodash/_listCacheSet.js
new file mode 100644
index 0000000..5855c95
--- /dev/null
+++ b/node_modules/lodash/_listCacheSet.js
@@ -0,0 +1,26 @@
+var assocIndexOf = require('./_assocIndexOf');
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
+
+module.exports = listCacheSet;
diff --git a/node_modules/lodash/_mapCacheClear.js b/node_modules/lodash/_mapCacheClear.js
new file mode 100644
index 0000000..bc9ca20
--- /dev/null
+++ b/node_modules/lodash/_mapCacheClear.js
@@ -0,0 +1,21 @@
+var Hash = require('./_Hash'),
+ ListCache = require('./_ListCache'),
+ Map = require('./_Map');
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
+
+module.exports = mapCacheClear;
diff --git a/node_modules/lodash/_mapCacheDelete.js b/node_modules/lodash/_mapCacheDelete.js
new file mode 100644
index 0000000..946ca3c
--- /dev/null
+++ b/node_modules/lodash/_mapCacheDelete.js
@@ -0,0 +1,18 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+module.exports = mapCacheDelete;
diff --git a/node_modules/lodash/_mapCacheGet.js b/node_modules/lodash/_mapCacheGet.js
new file mode 100644
index 0000000..f29f55c
--- /dev/null
+++ b/node_modules/lodash/_mapCacheGet.js
@@ -0,0 +1,16 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
+
+module.exports = mapCacheGet;
diff --git a/node_modules/lodash/_mapCacheHas.js b/node_modules/lodash/_mapCacheHas.js
new file mode 100644
index 0000000..a1214c0
--- /dev/null
+++ b/node_modules/lodash/_mapCacheHas.js
@@ -0,0 +1,16 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
+
+module.exports = mapCacheHas;
diff --git a/node_modules/lodash/_mapCacheSet.js b/node_modules/lodash/_mapCacheSet.js
new file mode 100644
index 0000000..7346849
--- /dev/null
+++ b/node_modules/lodash/_mapCacheSet.js
@@ -0,0 +1,22 @@
+var getMapData = require('./_getMapData');
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+}
+
+module.exports = mapCacheSet;
diff --git a/node_modules/lodash/_mapToArray.js b/node_modules/lodash/_mapToArray.js
new file mode 100644
index 0000000..fe3dd53
--- /dev/null
+++ b/node_modules/lodash/_mapToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+}
+
+module.exports = mapToArray;
diff --git a/node_modules/lodash/_matchesStrictComparable.js b/node_modules/lodash/_matchesStrictComparable.js
new file mode 100644
index 0000000..f608af9
--- /dev/null
+++ b/node_modules/lodash/_matchesStrictComparable.js
@@ -0,0 +1,20 @@
+/**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+}
+
+module.exports = matchesStrictComparable;
diff --git a/node_modules/lodash/_memoizeCapped.js b/node_modules/lodash/_memoizeCapped.js
new file mode 100644
index 0000000..7f71c8f
--- /dev/null
+++ b/node_modules/lodash/_memoizeCapped.js
@@ -0,0 +1,26 @@
+var memoize = require('./memoize');
+
+/** Used as the maximum memoize cache size. */
+var MAX_MEMOIZE_SIZE = 500;
+
+/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+}
+
+module.exports = memoizeCapped;
diff --git a/node_modules/lodash/_mergeData.js b/node_modules/lodash/_mergeData.js
new file mode 100644
index 0000000..cb570f9
--- /dev/null
+++ b/node_modules/lodash/_mergeData.js
@@ -0,0 +1,90 @@
+var composeArgs = require('./_composeArgs'),
+ composeArgsRight = require('./_composeArgsRight'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+}
+
+module.exports = mergeData;
diff --git a/node_modules/lodash/_metaMap.js b/node_modules/lodash/_metaMap.js
new file mode 100644
index 0000000..0157a0b
--- /dev/null
+++ b/node_modules/lodash/_metaMap.js
@@ -0,0 +1,6 @@
+var WeakMap = require('./_WeakMap');
+
+/** Used to store function metadata. */
+var metaMap = WeakMap && new WeakMap;
+
+module.exports = metaMap;
diff --git a/node_modules/lodash/_nativeCreate.js b/node_modules/lodash/_nativeCreate.js
new file mode 100644
index 0000000..c7aede8
--- /dev/null
+++ b/node_modules/lodash/_nativeCreate.js
@@ -0,0 +1,6 @@
+var getNative = require('./_getNative');
+
+/* Built-in method references that are verified to be native. */
+var nativeCreate = getNative(Object, 'create');
+
+module.exports = nativeCreate;
diff --git a/node_modules/lodash/_nativeKeys.js b/node_modules/lodash/_nativeKeys.js
new file mode 100644
index 0000000..479a104
--- /dev/null
+++ b/node_modules/lodash/_nativeKeys.js
@@ -0,0 +1,6 @@
+var overArg = require('./_overArg');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object);
+
+module.exports = nativeKeys;
diff --git a/node_modules/lodash/_nativeKeysIn.js b/node_modules/lodash/_nativeKeysIn.js
new file mode 100644
index 0000000..00ee505
--- /dev/null
+++ b/node_modules/lodash/_nativeKeysIn.js
@@ -0,0 +1,20 @@
+/**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = nativeKeysIn;
diff --git a/node_modules/lodash/_nodeUtil.js b/node_modules/lodash/_nodeUtil.js
new file mode 100644
index 0000000..983d78f
--- /dev/null
+++ b/node_modules/lodash/_nodeUtil.js
@@ -0,0 +1,30 @@
+var freeGlobal = require('./_freeGlobal');
+
+/** 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;
+
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports && freeGlobal.process;
+
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+ try {
+ // Use `util.types` for Node.js 10+.
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+ if (types) {
+ return types;
+ }
+
+ // Legacy `process.binding('util')` for Node.js < 10.
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+}());
+
+module.exports = nodeUtil;
diff --git a/node_modules/lodash/_objectToString.js b/node_modules/lodash/_objectToString.js
new file mode 100644
index 0000000..c614ec0
--- /dev/null
+++ b/node_modules/lodash/_objectToString.js
@@ -0,0 +1,22 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.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.call(value);
+}
+
+module.exports = objectToString;
diff --git a/node_modules/lodash/_overArg.js b/node_modules/lodash/_overArg.js
new file mode 100644
index 0000000..651c5c5
--- /dev/null
+++ b/node_modules/lodash/_overArg.js
@@ -0,0 +1,15 @@
+/**
+ * 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));
+ };
+}
+
+module.exports = overArg;
diff --git a/node_modules/lodash/_overRest.js b/node_modules/lodash/_overRest.js
new file mode 100644
index 0000000..c7cdef3
--- /dev/null
+++ b/node_modules/lodash/_overRest.js
@@ -0,0 +1,36 @@
+var apply = require('./_apply');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+}
+
+module.exports = overRest;
diff --git a/node_modules/lodash/_parent.js b/node_modules/lodash/_parent.js
new file mode 100644
index 0000000..f174328
--- /dev/null
+++ b/node_modules/lodash/_parent.js
@@ -0,0 +1,16 @@
+var baseGet = require('./_baseGet'),
+ baseSlice = require('./_baseSlice');
+
+/**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+}
+
+module.exports = parent;
diff --git a/node_modules/lodash/_reEscape.js b/node_modules/lodash/_reEscape.js
new file mode 100644
index 0000000..7f47eda
--- /dev/null
+++ b/node_modules/lodash/_reEscape.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reEscape = /<%-([\s\S]+?)%>/g;
+
+module.exports = reEscape;
diff --git a/node_modules/lodash/_reEvaluate.js b/node_modules/lodash/_reEvaluate.js
new file mode 100644
index 0000000..6adfc31
--- /dev/null
+++ b/node_modules/lodash/_reEvaluate.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reEvaluate = /<%([\s\S]+?)%>/g;
+
+module.exports = reEvaluate;
diff --git a/node_modules/lodash/_reInterpolate.js b/node_modules/lodash/_reInterpolate.js
new file mode 100644
index 0000000..d02ff0b
--- /dev/null
+++ b/node_modules/lodash/_reInterpolate.js
@@ -0,0 +1,4 @@
+/** Used to match template delimiters. */
+var reInterpolate = /<%=([\s\S]+?)%>/g;
+
+module.exports = reInterpolate;
diff --git a/node_modules/lodash/_realNames.js b/node_modules/lodash/_realNames.js
new file mode 100644
index 0000000..aa0d529
--- /dev/null
+++ b/node_modules/lodash/_realNames.js
@@ -0,0 +1,4 @@
+/** Used to lookup unminified function names. */
+var realNames = {};
+
+module.exports = realNames;
diff --git a/node_modules/lodash/_reorder.js b/node_modules/lodash/_reorder.js
new file mode 100644
index 0000000..a3502b0
--- /dev/null
+++ b/node_modules/lodash/_reorder.js
@@ -0,0 +1,29 @@
+var copyArray = require('./_copyArray'),
+ isIndex = require('./_isIndex');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+}
+
+module.exports = reorder;
diff --git a/node_modules/lodash/_replaceHolders.js b/node_modules/lodash/_replaceHolders.js
new file mode 100644
index 0000000..74360ec
--- /dev/null
+++ b/node_modules/lodash/_replaceHolders.js
@@ -0,0 +1,29 @@
+/** Used as the internal argument placeholder. */
+var PLACEHOLDER = '__lodash_placeholder__';
+
+/**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+}
+
+module.exports = replaceHolders;
diff --git a/node_modules/lodash/_root.js b/node_modules/lodash/_root.js
new file mode 100644
index 0000000..d2852be
--- /dev/null
+++ b/node_modules/lodash/_root.js
@@ -0,0 +1,9 @@
+var freeGlobal = require('./_freeGlobal');
+
+/** 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')();
+
+module.exports = root;
diff --git a/node_modules/lodash/_safeGet.js b/node_modules/lodash/_safeGet.js
new file mode 100644
index 0000000..b070897
--- /dev/null
+++ b/node_modules/lodash/_safeGet.js
@@ -0,0 +1,21 @@
+/**
+ * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function safeGet(object, key) {
+ if (key === 'constructor' && typeof object[key] === 'function') {
+ return;
+ }
+
+ if (key == '__proto__') {
+ return;
+ }
+
+ return object[key];
+}
+
+module.exports = safeGet;
diff --git a/node_modules/lodash/_setCacheAdd.js b/node_modules/lodash/_setCacheAdd.js
new file mode 100644
index 0000000..1081a74
--- /dev/null
+++ b/node_modules/lodash/_setCacheAdd.js
@@ -0,0 +1,19 @@
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
+
+module.exports = setCacheAdd;
diff --git a/node_modules/lodash/_setCacheHas.js b/node_modules/lodash/_setCacheHas.js
new file mode 100644
index 0000000..9a49255
--- /dev/null
+++ b/node_modules/lodash/_setCacheHas.js
@@ -0,0 +1,14 @@
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
+
+module.exports = setCacheHas;
diff --git a/node_modules/lodash/_setData.js b/node_modules/lodash/_setData.js
new file mode 100644
index 0000000..e5cf3eb
--- /dev/null
+++ b/node_modules/lodash/_setData.js
@@ -0,0 +1,20 @@
+var baseSetData = require('./_baseSetData'),
+ shortOut = require('./_shortOut');
+
+/**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+var setData = shortOut(baseSetData);
+
+module.exports = setData;
diff --git a/node_modules/lodash/_setToArray.js b/node_modules/lodash/_setToArray.js
new file mode 100644
index 0000000..b87f074
--- /dev/null
+++ b/node_modules/lodash/_setToArray.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+
+module.exports = setToArray;
diff --git a/node_modules/lodash/_setToPairs.js b/node_modules/lodash/_setToPairs.js
new file mode 100644
index 0000000..36ad37a
--- /dev/null
+++ b/node_modules/lodash/_setToPairs.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+}
+
+module.exports = setToPairs;
diff --git a/node_modules/lodash/_setToString.js b/node_modules/lodash/_setToString.js
new file mode 100644
index 0000000..6ca8419
--- /dev/null
+++ b/node_modules/lodash/_setToString.js
@@ -0,0 +1,14 @@
+var baseSetToString = require('./_baseSetToString'),
+ shortOut = require('./_shortOut');
+
+/**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = shortOut(baseSetToString);
+
+module.exports = setToString;
diff --git a/node_modules/lodash/_setWrapToString.js b/node_modules/lodash/_setWrapToString.js
new file mode 100644
index 0000000..decdc44
--- /dev/null
+++ b/node_modules/lodash/_setWrapToString.js
@@ -0,0 +1,21 @@
+var getWrapDetails = require('./_getWrapDetails'),
+ insertWrapDetails = require('./_insertWrapDetails'),
+ setToString = require('./_setToString'),
+ updateWrapDetails = require('./_updateWrapDetails');
+
+/**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+}
+
+module.exports = setWrapToString;
diff --git a/node_modules/lodash/_shortOut.js b/node_modules/lodash/_shortOut.js
new file mode 100644
index 0000000..3300a07
--- /dev/null
+++ b/node_modules/lodash/_shortOut.js
@@ -0,0 +1,37 @@
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeNow = Date.now;
+
+/**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+}
+
+module.exports = shortOut;
diff --git a/node_modules/lodash/_shuffleSelf.js b/node_modules/lodash/_shuffleSelf.js
new file mode 100644
index 0000000..8bcc4f5
--- /dev/null
+++ b/node_modules/lodash/_shuffleSelf.js
@@ -0,0 +1,28 @@
+var baseRandom = require('./_baseRandom');
+
+/**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+}
+
+module.exports = shuffleSelf;
diff --git a/node_modules/lodash/_stackClear.js b/node_modules/lodash/_stackClear.js
new file mode 100644
index 0000000..ce8e5a9
--- /dev/null
+++ b/node_modules/lodash/_stackClear.js
@@ -0,0 +1,15 @@
+var ListCache = require('./_ListCache');
+
+/**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+}
+
+module.exports = stackClear;
diff --git a/node_modules/lodash/_stackDelete.js b/node_modules/lodash/_stackDelete.js
new file mode 100644
index 0000000..ff9887a
--- /dev/null
+++ b/node_modules/lodash/_stackDelete.js
@@ -0,0 +1,18 @@
+/**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+}
+
+module.exports = stackDelete;
diff --git a/node_modules/lodash/_stackGet.js b/node_modules/lodash/_stackGet.js
new file mode 100644
index 0000000..1cdf004
--- /dev/null
+++ b/node_modules/lodash/_stackGet.js
@@ -0,0 +1,14 @@
+/**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function stackGet(key) {
+ return this.__data__.get(key);
+}
+
+module.exports = stackGet;
diff --git a/node_modules/lodash/_stackHas.js b/node_modules/lodash/_stackHas.js
new file mode 100644
index 0000000..16a3ad1
--- /dev/null
+++ b/node_modules/lodash/_stackHas.js
@@ -0,0 +1,14 @@
+/**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function stackHas(key) {
+ return this.__data__.has(key);
+}
+
+module.exports = stackHas;
diff --git a/node_modules/lodash/_stackSet.js b/node_modules/lodash/_stackSet.js
new file mode 100644
index 0000000..b790ac5
--- /dev/null
+++ b/node_modules/lodash/_stackSet.js
@@ -0,0 +1,34 @@
+var ListCache = require('./_ListCache'),
+ Map = require('./_Map'),
+ MapCache = require('./_MapCache');
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+}
+
+module.exports = stackSet;
diff --git a/node_modules/lodash/_strictIndexOf.js b/node_modules/lodash/_strictIndexOf.js
new file mode 100644
index 0000000..0486a49
--- /dev/null
+++ b/node_modules/lodash/_strictIndexOf.js
@@ -0,0 +1,23 @@
+/**
+ * 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;
+}
+
+module.exports = strictIndexOf;
diff --git a/node_modules/lodash/_strictLastIndexOf.js b/node_modules/lodash/_strictLastIndexOf.js
new file mode 100644
index 0000000..d7310dc
--- /dev/null
+++ b/node_modules/lodash/_strictLastIndexOf.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.lastIndexOf` 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 strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+}
+
+module.exports = strictLastIndexOf;
diff --git a/node_modules/lodash/_stringSize.js b/node_modules/lodash/_stringSize.js
new file mode 100644
index 0000000..17ef462
--- /dev/null
+++ b/node_modules/lodash/_stringSize.js
@@ -0,0 +1,18 @@
+var asciiSize = require('./_asciiSize'),
+ hasUnicode = require('./_hasUnicode'),
+ unicodeSize = require('./_unicodeSize');
+
+/**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+}
+
+module.exports = stringSize;
diff --git a/node_modules/lodash/_stringToArray.js b/node_modules/lodash/_stringToArray.js
new file mode 100644
index 0000000..d161158
--- /dev/null
+++ b/node_modules/lodash/_stringToArray.js
@@ -0,0 +1,18 @@
+var asciiToArray = require('./_asciiToArray'),
+ hasUnicode = require('./_hasUnicode'),
+ unicodeToArray = require('./_unicodeToArray');
+
+/**
+ * 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);
+}
+
+module.exports = stringToArray;
diff --git a/node_modules/lodash/_stringToPath.js b/node_modules/lodash/_stringToPath.js
new file mode 100644
index 0000000..8f39f8a
--- /dev/null
+++ b/node_modules/lodash/_stringToPath.js
@@ -0,0 +1,27 @@
+var memoizeCapped = require('./_memoizeCapped');
+
+/** Used to match property names within property paths. */
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+});
+
+module.exports = stringToPath;
diff --git a/node_modules/lodash/_toKey.js b/node_modules/lodash/_toKey.js
new file mode 100644
index 0000000..c6d645c
--- /dev/null
+++ b/node_modules/lodash/_toKey.js
@@ -0,0 +1,21 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = toKey;
diff --git a/node_modules/lodash/_toSource.js b/node_modules/lodash/_toSource.js
new file mode 100644
index 0000000..a020b38
--- /dev/null
+++ b/node_modules/lodash/_toSource.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var funcProto = Function.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+module.exports = toSource;
diff --git a/node_modules/lodash/_trimmedEndIndex.js b/node_modules/lodash/_trimmedEndIndex.js
new file mode 100644
index 0000000..139439a
--- /dev/null
+++ b/node_modules/lodash/_trimmedEndIndex.js
@@ -0,0 +1,19 @@
+/** Used to match a single whitespace character. */
+var reWhitespace = /\s/;
+
+/**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the last non-whitespace character.
+ */
+function trimmedEndIndex(string) {
+ var index = string.length;
+
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
+ return index;
+}
+
+module.exports = trimmedEndIndex;
diff --git a/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/lodash/_unescapeHtmlChar.js
new file mode 100644
index 0000000..a71fecb
--- /dev/null
+++ b/node_modules/lodash/_unescapeHtmlChar.js
@@ -0,0 +1,21 @@
+var basePropertyOf = require('./_basePropertyOf');
+
+/** Used to map HTML entities to characters. */
+var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+};
+
+/**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+module.exports = unescapeHtmlChar;
diff --git a/node_modules/lodash/_unicodeSize.js b/node_modules/lodash/_unicodeSize.js
new file mode 100644
index 0000000..68137ec
--- /dev/null
+++ b/node_modules/lodash/_unicodeSize.js
@@ -0,0 +1,44 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ 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');
+
+/**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+}
+
+module.exports = unicodeSize;
diff --git a/node_modules/lodash/_unicodeToArray.js b/node_modules/lodash/_unicodeToArray.js
new file mode 100644
index 0000000..2a725c0
--- /dev/null
+++ b/node_modules/lodash/_unicodeToArray.js
@@ -0,0 +1,40 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsVarRange = '\\ufe0e\\ufe0f';
+
+/** Used to compose unicode capture groups. */
+var rsAstral = '[' + rsAstralRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ 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) || [];
+}
+
+module.exports = unicodeToArray;
diff --git a/node_modules/lodash/_unicodeWords.js b/node_modules/lodash/_unicodeWords.js
new file mode 100644
index 0000000..e72e6e0
--- /dev/null
+++ b/node_modules/lodash/_unicodeWords.js
@@ -0,0 +1,69 @@
+/** Used to compose unicode character classes. */
+var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+/** Used to compose unicode capture groups. */
+var rsApos = "['\u2019]",
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+/** Used to compose unicode regexes. */
+var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
+
+/** Used to match complex or compound words. */
+var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+].join('|'), 'g');
+
+/**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+}
+
+module.exports = unicodeWords;
diff --git a/node_modules/lodash/_updateWrapDetails.js b/node_modules/lodash/_updateWrapDetails.js
new file mode 100644
index 0000000..8759fbd
--- /dev/null
+++ b/node_modules/lodash/_updateWrapDetails.js
@@ -0,0 +1,46 @@
+var arrayEach = require('./_arrayEach'),
+ arrayIncludes = require('./_arrayIncludes');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+/** Used to associate wrap methods with their bit flags. */
+var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+];
+
+/**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+}
+
+module.exports = updateWrapDetails;
diff --git a/node_modules/lodash/_wrapperClone.js b/node_modules/lodash/_wrapperClone.js
new file mode 100644
index 0000000..7bb58a2
--- /dev/null
+++ b/node_modules/lodash/_wrapperClone.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ copyArray = require('./_copyArray');
+
+/**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+}
+
+module.exports = wrapperClone;
diff --git a/node_modules/lodash/add.js b/node_modules/lodash/add.js
new file mode 100644
index 0000000..f069515
--- /dev/null
+++ b/node_modules/lodash/add.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+}, 0);
+
+module.exports = add;
diff --git a/node_modules/lodash/after.js b/node_modules/lodash/after.js
new file mode 100644
index 0000000..3900c97
--- /dev/null
+++ b/node_modules/lodash/after.js
@@ -0,0 +1,42 @@
+var toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+}
+
+module.exports = after;
diff --git a/node_modules/lodash/array.js b/node_modules/lodash/array.js
new file mode 100644
index 0000000..af688d3
--- /dev/null
+++ b/node_modules/lodash/array.js
@@ -0,0 +1,67 @@
+module.exports = {
+ 'chunk': require('./chunk'),
+ 'compact': require('./compact'),
+ 'concat': require('./concat'),
+ 'difference': require('./difference'),
+ 'differenceBy': require('./differenceBy'),
+ 'differenceWith': require('./differenceWith'),
+ 'drop': require('./drop'),
+ 'dropRight': require('./dropRight'),
+ 'dropRightWhile': require('./dropRightWhile'),
+ 'dropWhile': require('./dropWhile'),
+ 'fill': require('./fill'),
+ 'findIndex': require('./findIndex'),
+ 'findLastIndex': require('./findLastIndex'),
+ 'first': require('./first'),
+ 'flatten': require('./flatten'),
+ 'flattenDeep': require('./flattenDeep'),
+ 'flattenDepth': require('./flattenDepth'),
+ 'fromPairs': require('./fromPairs'),
+ 'head': require('./head'),
+ 'indexOf': require('./indexOf'),
+ 'initial': require('./initial'),
+ 'intersection': require('./intersection'),
+ 'intersectionBy': require('./intersectionBy'),
+ 'intersectionWith': require('./intersectionWith'),
+ 'join': require('./join'),
+ 'last': require('./last'),
+ 'lastIndexOf': require('./lastIndexOf'),
+ 'nth': require('./nth'),
+ 'pull': require('./pull'),
+ 'pullAll': require('./pullAll'),
+ 'pullAllBy': require('./pullAllBy'),
+ 'pullAllWith': require('./pullAllWith'),
+ 'pullAt': require('./pullAt'),
+ 'remove': require('./remove'),
+ 'reverse': require('./reverse'),
+ 'slice': require('./slice'),
+ 'sortedIndex': require('./sortedIndex'),
+ 'sortedIndexBy': require('./sortedIndexBy'),
+ 'sortedIndexOf': require('./sortedIndexOf'),
+ 'sortedLastIndex': require('./sortedLastIndex'),
+ 'sortedLastIndexBy': require('./sortedLastIndexBy'),
+ 'sortedLastIndexOf': require('./sortedLastIndexOf'),
+ 'sortedUniq': require('./sortedUniq'),
+ 'sortedUniqBy': require('./sortedUniqBy'),
+ 'tail': require('./tail'),
+ 'take': require('./take'),
+ 'takeRight': require('./takeRight'),
+ 'takeRightWhile': require('./takeRightWhile'),
+ 'takeWhile': require('./takeWhile'),
+ 'union': require('./union'),
+ 'unionBy': require('./unionBy'),
+ 'unionWith': require('./unionWith'),
+ 'uniq': require('./uniq'),
+ 'uniqBy': require('./uniqBy'),
+ 'uniqWith': require('./uniqWith'),
+ 'unzip': require('./unzip'),
+ 'unzipWith': require('./unzipWith'),
+ 'without': require('./without'),
+ 'xor': require('./xor'),
+ 'xorBy': require('./xorBy'),
+ 'xorWith': require('./xorWith'),
+ 'zip': require('./zip'),
+ 'zipObject': require('./zipObject'),
+ 'zipObjectDeep': require('./zipObjectDeep'),
+ 'zipWith': require('./zipWith')
+};
diff --git a/node_modules/lodash/ary.js b/node_modules/lodash/ary.js
new file mode 100644
index 0000000..70c87d0
--- /dev/null
+++ b/node_modules/lodash/ary.js
@@ -0,0 +1,29 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_ARY_FLAG = 128;
+
+/**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+}
+
+module.exports = ary;
diff --git a/node_modules/lodash/assign.js b/node_modules/lodash/assign.js
new file mode 100644
index 0000000..909db26
--- /dev/null
+++ b/node_modules/lodash/assign.js
@@ -0,0 +1,58 @@
+var assignValue = require('./_assignValue'),
+ copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ isArrayLike = require('./isArrayLike'),
+ isPrototype = require('./_isPrototype'),
+ keys = require('./keys');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+});
+
+module.exports = assign;
diff --git a/node_modules/lodash/assignIn.js b/node_modules/lodash/assignIn.js
new file mode 100644
index 0000000..e663473
--- /dev/null
+++ b/node_modules/lodash/assignIn.js
@@ -0,0 +1,40 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+});
+
+module.exports = assignIn;
diff --git a/node_modules/lodash/assignInWith.js b/node_modules/lodash/assignInWith.js
new file mode 100644
index 0000000..68fcc0b
--- /dev/null
+++ b/node_modules/lodash/assignInWith.js
@@ -0,0 +1,38 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+});
+
+module.exports = assignInWith;
diff --git a/node_modules/lodash/assignWith.js b/node_modules/lodash/assignWith.js
new file mode 100644
index 0000000..7dc6c76
--- /dev/null
+++ b/node_modules/lodash/assignWith.js
@@ -0,0 +1,37 @@
+var copyObject = require('./_copyObject'),
+ createAssigner = require('./_createAssigner'),
+ keys = require('./keys');
+
+/**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+});
+
+module.exports = assignWith;
diff --git a/node_modules/lodash/at.js b/node_modules/lodash/at.js
new file mode 100644
index 0000000..781ee9e
--- /dev/null
+++ b/node_modules/lodash/at.js
@@ -0,0 +1,23 @@
+var baseAt = require('./_baseAt'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+var at = flatRest(baseAt);
+
+module.exports = at;
diff --git a/node_modules/lodash/attempt.js b/node_modules/lodash/attempt.js
new file mode 100644
index 0000000..624d015
--- /dev/null
+++ b/node_modules/lodash/attempt.js
@@ -0,0 +1,35 @@
+var apply = require('./_apply'),
+ baseRest = require('./_baseRest'),
+ isError = require('./isError');
+
+/**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+var attempt = baseRest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+});
+
+module.exports = attempt;
diff --git a/node_modules/lodash/before.js b/node_modules/lodash/before.js
new file mode 100644
index 0000000..a3e0a16
--- /dev/null
+++ b/node_modules/lodash/before.js
@@ -0,0 +1,40 @@
+var toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+}
+
+module.exports = before;
diff --git a/node_modules/lodash/bind.js b/node_modules/lodash/bind.js
new file mode 100644
index 0000000..b1076e9
--- /dev/null
+++ b/node_modules/lodash/bind.js
@@ -0,0 +1,57 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+});
+
+// Assign default placeholders.
+bind.placeholder = {};
+
+module.exports = bind;
diff --git a/node_modules/lodash/bindAll.js b/node_modules/lodash/bindAll.js
new file mode 100644
index 0000000..a35706d
--- /dev/null
+++ b/node_modules/lodash/bindAll.js
@@ -0,0 +1,41 @@
+var arrayEach = require('./_arrayEach'),
+ baseAssignValue = require('./_baseAssignValue'),
+ bind = require('./bind'),
+ flatRest = require('./_flatRest'),
+ toKey = require('./_toKey');
+
+/**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'click': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, ['click']);
+ * jQuery(element).on('click', view.click);
+ * // => Logs 'clicked docs' when clicked.
+ */
+var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+});
+
+module.exports = bindAll;
diff --git a/node_modules/lodash/bindKey.js b/node_modules/lodash/bindKey.js
new file mode 100644
index 0000000..f7fd64c
--- /dev/null
+++ b/node_modules/lodash/bindKey.js
@@ -0,0 +1,68 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+});
+
+// Assign default placeholders.
+bindKey.placeholder = {};
+
+module.exports = bindKey;
diff --git a/node_modules/lodash/camelCase.js b/node_modules/lodash/camelCase.js
new file mode 100644
index 0000000..d7390de
--- /dev/null
+++ b/node_modules/lodash/camelCase.js
@@ -0,0 +1,29 @@
+var capitalize = require('./capitalize'),
+ createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+});
+
+module.exports = camelCase;
diff --git a/node_modules/lodash/capitalize.js b/node_modules/lodash/capitalize.js
new file mode 100644
index 0000000..3e1600e
--- /dev/null
+++ b/node_modules/lodash/capitalize.js
@@ -0,0 +1,23 @@
+var toString = require('./toString'),
+ upperFirst = require('./upperFirst');
+
+/**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+}
+
+module.exports = capitalize;
diff --git a/node_modules/lodash/castArray.js b/node_modules/lodash/castArray.js
new file mode 100644
index 0000000..e470bdb
--- /dev/null
+++ b/node_modules/lodash/castArray.js
@@ -0,0 +1,44 @@
+var isArray = require('./isArray');
+
+/**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+}
+
+module.exports = castArray;
diff --git a/node_modules/lodash/ceil.js b/node_modules/lodash/ceil.js
new file mode 100644
index 0000000..56c8722
--- /dev/null
+++ b/node_modules/lodash/ceil.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+var ceil = createRound('ceil');
+
+module.exports = ceil;
diff --git a/node_modules/lodash/chain.js b/node_modules/lodash/chain.js
new file mode 100644
index 0000000..f6cd647
--- /dev/null
+++ b/node_modules/lodash/chain.js
@@ -0,0 +1,38 @@
+var lodash = require('./wrapperLodash');
+
+/**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+}
+
+module.exports = chain;
diff --git a/node_modules/lodash/chunk.js b/node_modules/lodash/chunk.js
new file mode 100644
index 0000000..5b562fe
--- /dev/null
+++ b/node_modules/lodash/chunk.js
@@ -0,0 +1,50 @@
+var baseSlice = require('./_baseSlice'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeMax = Math.max;
+
+/**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+}
+
+module.exports = chunk;
diff --git a/node_modules/lodash/clamp.js b/node_modules/lodash/clamp.js
new file mode 100644
index 0000000..91a72c9
--- /dev/null
+++ b/node_modules/lodash/clamp.js
@@ -0,0 +1,39 @@
+var baseClamp = require('./_baseClamp'),
+ toNumber = require('./toNumber');
+
+/**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+}
+
+module.exports = clamp;
diff --git a/node_modules/lodash/clone.js b/node_modules/lodash/clone.js
new file mode 100644
index 0000000..dd439d6
--- /dev/null
+++ b/node_modules/lodash/clone.js
@@ -0,0 +1,36 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = clone;
diff --git a/node_modules/lodash/cloneDeep.js b/node_modules/lodash/cloneDeep.js
new file mode 100644
index 0000000..4425fbe
--- /dev/null
+++ b/node_modules/lodash/cloneDeep.js
@@ -0,0 +1,29 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+}
+
+module.exports = cloneDeep;
diff --git a/node_modules/lodash/cloneDeepWith.js b/node_modules/lodash/cloneDeepWith.js
new file mode 100644
index 0000000..fd9c6c0
--- /dev/null
+++ b/node_modules/lodash/cloneDeepWith.js
@@ -0,0 +1,40 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+}
+
+module.exports = cloneDeepWith;
diff --git a/node_modules/lodash/cloneWith.js b/node_modules/lodash/cloneWith.js
new file mode 100644
index 0000000..d2f4e75
--- /dev/null
+++ b/node_modules/lodash/cloneWith.js
@@ -0,0 +1,42 @@
+var baseClone = require('./_baseClone');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+}
+
+module.exports = cloneWith;
diff --git a/node_modules/lodash/collection.js b/node_modules/lodash/collection.js
new file mode 100644
index 0000000..77fe837
--- /dev/null
+++ b/node_modules/lodash/collection.js
@@ -0,0 +1,30 @@
+module.exports = {
+ 'countBy': require('./countBy'),
+ 'each': require('./each'),
+ 'eachRight': require('./eachRight'),
+ 'every': require('./every'),
+ 'filter': require('./filter'),
+ 'find': require('./find'),
+ 'findLast': require('./findLast'),
+ 'flatMap': require('./flatMap'),
+ 'flatMapDeep': require('./flatMapDeep'),
+ 'flatMapDepth': require('./flatMapDepth'),
+ 'forEach': require('./forEach'),
+ 'forEachRight': require('./forEachRight'),
+ 'groupBy': require('./groupBy'),
+ 'includes': require('./includes'),
+ 'invokeMap': require('./invokeMap'),
+ 'keyBy': require('./keyBy'),
+ 'map': require('./map'),
+ 'orderBy': require('./orderBy'),
+ 'partition': require('./partition'),
+ 'reduce': require('./reduce'),
+ 'reduceRight': require('./reduceRight'),
+ 'reject': require('./reject'),
+ 'sample': require('./sample'),
+ 'sampleSize': require('./sampleSize'),
+ 'shuffle': require('./shuffle'),
+ 'size': require('./size'),
+ 'some': require('./some'),
+ 'sortBy': require('./sortBy')
+};
diff --git a/node_modules/lodash/commit.js b/node_modules/lodash/commit.js
new file mode 100644
index 0000000..fe4db71
--- /dev/null
+++ b/node_modules/lodash/commit.js
@@ -0,0 +1,33 @@
+var LodashWrapper = require('./_LodashWrapper');
+
+/**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+}
+
+module.exports = wrapperCommit;
diff --git a/node_modules/lodash/compact.js b/node_modules/lodash/compact.js
new file mode 100644
index 0000000..031fab4
--- /dev/null
+++ b/node_modules/lodash/compact.js
@@ -0,0 +1,31 @@
+/**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = compact;
diff --git a/node_modules/lodash/concat.js b/node_modules/lodash/concat.js
new file mode 100644
index 0000000..1da48a4
--- /dev/null
+++ b/node_modules/lodash/concat.js
@@ -0,0 +1,43 @@
+var arrayPush = require('./_arrayPush'),
+ baseFlatten = require('./_baseFlatten'),
+ copyArray = require('./_copyArray'),
+ isArray = require('./isArray');
+
+/**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+}
+
+module.exports = concat;
diff --git a/node_modules/lodash/cond.js b/node_modules/lodash/cond.js
new file mode 100644
index 0000000..6455598
--- /dev/null
+++ b/node_modules/lodash/cond.js
@@ -0,0 +1,60 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new composite function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.stubTrue, _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+function cond(pairs) {
+ var length = pairs == null ? 0 : pairs.length,
+ toIteratee = baseIteratee;
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return baseRest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+}
+
+module.exports = cond;
diff --git a/node_modules/lodash/conforms.js b/node_modules/lodash/conforms.js
new file mode 100644
index 0000000..5501a94
--- /dev/null
+++ b/node_modules/lodash/conforms.js
@@ -0,0 +1,35 @@
+var baseClone = require('./_baseClone'),
+ baseConforms = require('./_baseConforms');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.conformsTo` with
+ * `source` partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 2, 'b': 1 },
+ * { 'a': 1, 'b': 2 }
+ * ];
+ *
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+ * // => [{ 'a': 1, 'b': 2 }]
+ */
+function conforms(source) {
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = conforms;
diff --git a/node_modules/lodash/conformsTo.js b/node_modules/lodash/conformsTo.js
new file mode 100644
index 0000000..b8a93eb
--- /dev/null
+++ b/node_modules/lodash/conformsTo.js
@@ -0,0 +1,32 @@
+var baseConformsTo = require('./_baseConformsTo'),
+ keys = require('./keys');
+
+/**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+}
+
+module.exports = conformsTo;
diff --git a/node_modules/lodash/constant.js b/node_modules/lodash/constant.js
new file mode 100644
index 0000000..655ece3
--- /dev/null
+++ b/node_modules/lodash/constant.js
@@ -0,0 +1,26 @@
+/**
+ * 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(value) {
+ return function() {
+ return value;
+ };
+}
+
+module.exports = constant;
diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js
new file mode 100644
index 0000000..be1d567
--- /dev/null
+++ b/node_modules/lodash/core.js
@@ -0,0 +1,3877 @@
+/**
+ * @license
+ * Lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.21';
+
+ /** Error message constants. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_PARTIAL_FLAG = 32;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ stringTag = '[object String]';
+
+ /** Used to match HTML entities and HTML characters. */
+ var reUnescapedHtml = /[&<>"']/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** 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')();
+
+ /** 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;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ array.push.apply(array, values);
+ return array;
+ }
+
+ /**
+ * 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 `_.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];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return baseMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * 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));
+ };
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Built-in value references. */
+ var objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeIsFinite = root.isFinite,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ return value instanceof LodashWrapper
+ ? value
+ : new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ }
+
+ LodashWrapper.prototype = baseCreate(lodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ object[key] = value;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !false)
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * 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 `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return baseFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * 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) {
+ return objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ var baseIsArguments = noop;
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : baseGetTag(object),
+ othTag = othIsArr ? arrayTag : baseGetTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ stack || (stack = []);
+ var objStack = find(stack, function(entry) {
+ return entry[0] == object;
+ });
+ var othStack = find(stack, function(entry) {
+ return entry[0] == other;
+ });
+ if (objStack && othStack) {
+ return objStack[1] == other;
+ }
+ stack.push([object, other]);
+ stack.push([other, object]);
+ if (isSameTag && !objIsObj) {
+ var result = (objIsArr)
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ stack.pop();
+ return result;
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(func) {
+ if (typeof func == 'function') {
+ return func;
+ }
+ if (func == null) {
+ return identity;
+ }
+ return (typeof func == 'object' ? baseMatches : baseProperty)(func);
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var props = nativeKeys(source);
+ return function(object) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length];
+ if (!(key in object &&
+ baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG)
+ )) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return reduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
+ }
+ return result;
+ }, {});
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source) {
+ return baseSlice(source, 0, source.length);
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ return reduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = false;
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = false;
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * 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;
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = baseIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return fn.apply(isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined;
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ var compared;
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!baseSome(other, function(othValue, othIndex) {
+ if (!indexOf(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ var compared;
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value);
+ }
+
+ /**
+ * 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 : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * 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.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = identity;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ return baseFilter(array, Boolean);
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else {
+ fromIndex = 0;
+ }
+ var index = (fromIndex || 0) - 1,
+ isReflexive = value === value;
+
+ while (++index < length) {
+ var other = array[index];
+ if ((isReflexive ? other === value : other !== other)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @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 slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ start = start == null ? 0 : +start;
+ end = end === undefined ? length : +end;
+ return length ? baseSlice(array, start, end) : [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseEvery(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+ function filter(collection, predicate) {
+ return baseFilter(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ return baseEach(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ return baseMap(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ collection = isArrayLike(collection) ? collection : nativeKeys(collection);
+ return collection.length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseSome(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+ function sortBy(collection, iteratee) {
+ var index = 0;
+ iteratee = baseIteratee(iteratee);
+
+ return baseMap(baseMap(collection, function(value, key, collection) {
+ return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) };
+ }).sort(function(object, other) {
+ return compareAscending(object.criteria, other.criteria) || (object.index - other.index);
+ }), baseProperty('value'));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials);
+ });
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ if (!isObject(value)) {
+ return value;
+ }
+ return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * 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.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;
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = baseIsDate;
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (isArrayLike(value) &&
+ (isArray(value) || isString(value) ||
+ isFunction(value.splice) || isArguments(value))) {
+ return !value.length;
+ }
+ return !nativeKeys(value).length;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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 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');
+ }
+
+ /**
+ * 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';
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = baseIsRegExp;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!isArrayLike(value)) {
+ return values(value);
+ }
+ return value.length ? copyArray(value) : [];
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ var toInteger = Number;
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ var toNumber = Number;
+
+ /**
+ * 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) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ copyObject(source, nativeKeys(source), object);
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, nativeKeysIn(source), object);
+ });
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : assign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+ });
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasOwnProperty.call(object, path);
+ }
+
+ /**
+ * 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']
+ */
+ var keys = nativeKeys;
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @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;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ var keysIn = nativeKeysIn;
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ var value = object == null ? undefined : object[path];
+ if (value === undefined) {
+ value = defaultValue;
+ }
+ return isFunction(value) ? value.call(object) : value;
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ var iteratee = baseIteratee;
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(assign({}, source));
+ }
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ baseEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.assignIn = assignIn;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.chain = chain;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.create = create;
+ lodash.defaults = defaults;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.filter = filter;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.iteratee = iteratee;
+ lodash.keys = keys;
+ lodash.map = map;
+ lodash.matches = matches;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.once = once;
+ lodash.pick = pick;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.tap = tap;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.values = values;
+
+ // Add aliases.
+ lodash.extend = assignIn;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.clone = clone;
+ lodash.escape = escape;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.forEach = forEach;
+ lodash.has = has;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.indexOf = indexOf;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isBoolean = isBoolean;
+ lodash.isDate = isDate;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isNaN = isNaN;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isString = isString;
+ lodash.isUndefined = isUndefined;
+ lodash.last = last;
+ lodash.max = max;
+ lodash.min = min;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.reduce = reduce;
+ lodash.result = result;
+ lodash.size = size;
+ lodash.some = some;
+ lodash.uniqueId = uniqueId;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Add `Array` methods to `lodash.prototype`.
+ baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ /*--------------------------------------------------------------------------*/
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = lodash;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return lodash;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = lodash)._ = lodash;
+ // Export for CommonJS support.
+ freeExports._ = lodash;
+ }
+ else {
+ // Export to the global object.
+ root._ = lodash;
+ }
+}.call(this));
diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js
new file mode 100644
index 0000000..e425e4d
--- /dev/null
+++ b/node_modules/lodash/core.min.js
@@ -0,0 +1,29 @@
+/**
+ * @license
+ * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ */
+;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
+return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===Z?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=R),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,Dn);
+}function h(n,t){return l(t,function(t){return U(n[t])})}function v(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){
+return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,
+r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=M(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(I(n,void 0,X),n+"");
+}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return C(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r){var e=!r;r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=Z;if(c===Z&&(c=n[i]),e)r[i]=c;else{var f=r,a=f[i];pn.call(f,i)&&J(a,c)&&(c!==Z||i in f)||(f[i]=c);
+}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:Z,o=3<n.length&&typeof o=="function"?(u--,o):Z;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");
+var u=F(n);return e}function T(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;var c=o.get(n),f=o.get(t);if(c&&f)return c==t&&f==n;for(var c=-1,f=true,a=2&r?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){f=false;break}if(a){if(!E(t,function(n,t){if(!P(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function B(n,t,r,e,u,o){var i=1&r,c=Dn(n),f=c.length,a=Dn(t).length;if(f!=a&&!i)return false;for(a=f;a--;){var l=c[a];if(!(i?l in t:pn.call(t,l)))return false;
+}var p=o.get(n),l=o.get(t);if(p&&l)return p==t&&l==n;for(p=true;++a<f;){var l=c[a],s=n[l],h=t[l];if(void 0!==Z||s!==h&&!u(s,h,r,e,o)){p=false;break}i||(i="constructor"==l)}return p&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(p=false)),p}function R(t){return Nn(t)||n(t)}function D(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function I(n,t,r){return t=jn(t===Z?n.length-1:t,0),
+function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function q(n){return n&&n.length?n[0]:Z}function P(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function z(n,t){return mn(n,g(t))}function C(n,t,r){return e(n,g(t),r,3>arguments.length,mn);
+}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;
+return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);
+return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
+return function(t){return null==n?Z:n[t]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
+var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=X,An=function(n){return function(t,r,e){var u=Object(t);if(!M(t)){var o=g(r);t=Dn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:Z}}(function(n,t,r){var e=null==n?0:n.length;
+if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,D(t),n)}),Rn=O(function(n,t){n=Object(n);var r,e=-1,u=t.length,o=2<u?t[2]:Z;if(r=o){r=t[0];var i=t[1];if(V(o)){var c=typeof i;if("number"==c){if(c=M(o))var c=o.length,f=typeof i,c=null==c?9007199254740991:c,c=!!c&&("number"==f||"symbol"!=f&&en.test(i))&&-1<i&&0==i%1&&i<c;
+}else c="string"==c&&i in o;r=!!c&&J(o[i],r)}else r=false}for(r&&(u=1);++e<u;)for(o=t[e],r=In(o),i=-1,c=r.length;++i<c;){var f=r[i],a=n[f];(a===Z||J(a,ln[f])&&!pn.call(n,f))&&(n[f]=o[f])}return n}),Dn=_n,In=D,$n=function(n){return xn(I(n,Z,$),n+"")}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=G,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];
+return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Rn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){return(null==n?0:n.length)?p(n,nn):[]},o.iteratee=g,o.keys=Dn,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Y,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){
+return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===Z?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==Z,o=null===r,i=r===r,c=e!==Z,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){
+return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n);
+},o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){
+var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){
+var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.21",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n);
+})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file
diff --git a/node_modules/lodash/countBy.js b/node_modules/lodash/countBy.js
new file mode 100644
index 0000000..0e88abc
--- /dev/null
+++ b/node_modules/lodash/countBy.js
@@ -0,0 +1,40 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+});
+
+module.exports = countBy;
diff --git a/node_modules/lodash/create.js b/node_modules/lodash/create.js
new file mode 100644
index 0000000..919edb8
--- /dev/null
+++ b/node_modules/lodash/create.js
@@ -0,0 +1,43 @@
+var baseAssign = require('./_baseAssign'),
+ baseCreate = require('./_baseCreate');
+
+/**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+}
+
+module.exports = create;
diff --git a/node_modules/lodash/curry.js b/node_modules/lodash/curry.js
new file mode 100644
index 0000000..918db1a
--- /dev/null
+++ b/node_modules/lodash/curry.js
@@ -0,0 +1,57 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_FLAG = 8;
+
+/**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+}
+
+// Assign default placeholders.
+curry.placeholder = {};
+
+module.exports = curry;
diff --git a/node_modules/lodash/curryRight.js b/node_modules/lodash/curryRight.js
new file mode 100644
index 0000000..c85b6f3
--- /dev/null
+++ b/node_modules/lodash/curryRight.js
@@ -0,0 +1,54 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_CURRY_RIGHT_FLAG = 16;
+
+/**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+}
+
+// Assign default placeholders.
+curryRight.placeholder = {};
+
+module.exports = curryRight;
diff --git a/node_modules/lodash/date.js b/node_modules/lodash/date.js
new file mode 100644
index 0000000..cbf5b41
--- /dev/null
+++ b/node_modules/lodash/date.js
@@ -0,0 +1,3 @@
+module.exports = {
+ 'now': require('./now')
+};
diff --git a/node_modules/lodash/debounce.js b/node_modules/lodash/debounce.js
new file mode 100644
index 0000000..8f751d5
--- /dev/null
+++ b/node_modules/lodash/debounce.js
@@ -0,0 +1,191 @@
+var isObject = require('./isObject'),
+ now = require('./now'),
+ toNumber = require('./toNumber');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ timeWaiting = wait - timeSinceLastCall;
+
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+}
+
+module.exports = debounce;
diff --git a/node_modules/lodash/deburr.js b/node_modules/lodash/deburr.js
new file mode 100644
index 0000000..f85e314
--- /dev/null
+++ b/node_modules/lodash/deburr.js
@@ -0,0 +1,45 @@
+var deburrLetter = require('./_deburrLetter'),
+ toString = require('./toString');
+
+/** Used to match Latin Unicode letters (excluding mathematical operators). */
+var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+/** Used to compose unicode character classes. */
+var rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
+
+/** Used to compose unicode capture groups. */
+var rsCombo = '[' + rsComboRange + ']';
+
+/**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+var reComboMark = RegExp(rsCombo, 'g');
+
+/**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+}
+
+module.exports = deburr;
diff --git a/node_modules/lodash/defaultTo.js b/node_modules/lodash/defaultTo.js
new file mode 100644
index 0000000..5b33359
--- /dev/null
+++ b/node_modules/lodash/defaultTo.js
@@ -0,0 +1,25 @@
+/**
+ * Checks `value` to determine whether a default value should be returned in
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+ * or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Util
+ * @param {*} value The value to check.
+ * @param {*} defaultValue The default value.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * _.defaultTo(1, 10);
+ * // => 1
+ *
+ * _.defaultTo(undefined, 10);
+ * // => 10
+ */
+function defaultTo(value, defaultValue) {
+ return (value == null || value !== value) ? defaultValue : value;
+}
+
+module.exports = defaultTo;
diff --git a/node_modules/lodash/defaults.js b/node_modules/lodash/defaults.js
new file mode 100644
index 0000000..c74df04
--- /dev/null
+++ b/node_modules/lodash/defaults.js
@@ -0,0 +1,64 @@
+var baseRest = require('./_baseRest'),
+ eq = require('./eq'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keysIn = require('./keysIn');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+});
+
+module.exports = defaults;
diff --git a/node_modules/lodash/defaultsDeep.js b/node_modules/lodash/defaultsDeep.js
new file mode 100644
index 0000000..9b5fa3e
--- /dev/null
+++ b/node_modules/lodash/defaultsDeep.js
@@ -0,0 +1,30 @@
+var apply = require('./_apply'),
+ baseRest = require('./_baseRest'),
+ customDefaultsMerge = require('./_customDefaultsMerge'),
+ mergeWith = require('./mergeWith');
+
+/**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, customDefaultsMerge);
+ return apply(mergeWith, undefined, args);
+});
+
+module.exports = defaultsDeep;
diff --git a/node_modules/lodash/defer.js b/node_modules/lodash/defer.js
new file mode 100644
index 0000000..f6d6c6f
--- /dev/null
+++ b/node_modules/lodash/defer.js
@@ -0,0 +1,26 @@
+var baseDelay = require('./_baseDelay'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+});
+
+module.exports = defer;
diff --git a/node_modules/lodash/delay.js b/node_modules/lodash/delay.js
new file mode 100644
index 0000000..bd55479
--- /dev/null
+++ b/node_modules/lodash/delay.js
@@ -0,0 +1,28 @@
+var baseDelay = require('./_baseDelay'),
+ baseRest = require('./_baseRest'),
+ toNumber = require('./toNumber');
+
+/**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+});
+
+module.exports = delay;
diff --git a/node_modules/lodash/difference.js b/node_modules/lodash/difference.js
new file mode 100644
index 0000000..fa28bb3
--- /dev/null
+++ b/node_modules/lodash/difference.js
@@ -0,0 +1,33 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+});
+
+module.exports = difference;
diff --git a/node_modules/lodash/differenceBy.js b/node_modules/lodash/differenceBy.js
new file mode 100644
index 0000000..2cd63e7
--- /dev/null
+++ b/node_modules/lodash/differenceBy.js
@@ -0,0 +1,44 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))
+ : [];
+});
+
+module.exports = differenceBy;
diff --git a/node_modules/lodash/differenceWith.js b/node_modules/lodash/differenceWith.js
new file mode 100644
index 0000000..c0233f4
--- /dev/null
+++ b/node_modules/lodash/differenceWith.js
@@ -0,0 +1,40 @@
+var baseDifference = require('./_baseDifference'),
+ baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+});
+
+module.exports = differenceWith;
diff --git a/node_modules/lodash/divide.js b/node_modules/lodash/divide.js
new file mode 100644
index 0000000..8cae0cd
--- /dev/null
+++ b/node_modules/lodash/divide.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+}, 1);
+
+module.exports = divide;
diff --git a/node_modules/lodash/drop.js b/node_modules/lodash/drop.js
new file mode 100644
index 0000000..d5c3cba
--- /dev/null
+++ b/node_modules/lodash/drop.js
@@ -0,0 +1,38 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+}
+
+module.exports = drop;
diff --git a/node_modules/lodash/dropRight.js b/node_modules/lodash/dropRight.js
new file mode 100644
index 0000000..441fe99
--- /dev/null
+++ b/node_modules/lodash/dropRight.js
@@ -0,0 +1,39 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = dropRight;
diff --git a/node_modules/lodash/dropRightWhile.js b/node_modules/lodash/dropRightWhile.js
new file mode 100644
index 0000000..9ad36a0
--- /dev/null
+++ b/node_modules/lodash/dropRightWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), true, true)
+ : [];
+}
+
+module.exports = dropRightWhile;
diff --git a/node_modules/lodash/dropWhile.js b/node_modules/lodash/dropWhile.js
new file mode 100644
index 0000000..903ef56
--- /dev/null
+++ b/node_modules/lodash/dropWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), true)
+ : [];
+}
+
+module.exports = dropWhile;
diff --git a/node_modules/lodash/each.js b/node_modules/lodash/each.js
new file mode 100644
index 0000000..8800f42
--- /dev/null
+++ b/node_modules/lodash/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/node_modules/lodash/eachRight.js b/node_modules/lodash/eachRight.js
new file mode 100644
index 0000000..3252b2a
--- /dev/null
+++ b/node_modules/lodash/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/node_modules/lodash/endsWith.js b/node_modules/lodash/endsWith.js
new file mode 100644
index 0000000..76fc866
--- /dev/null
+++ b/node_modules/lodash/endsWith.js
@@ -0,0 +1,43 @@
+var baseClamp = require('./_baseClamp'),
+ baseToString = require('./_baseToString'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+}
+
+module.exports = endsWith;
diff --git a/node_modules/lodash/entries.js b/node_modules/lodash/entries.js
new file mode 100644
index 0000000..7a88df2
--- /dev/null
+++ b/node_modules/lodash/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/node_modules/lodash/entriesIn.js b/node_modules/lodash/entriesIn.js
new file mode 100644
index 0000000..f6c6331
--- /dev/null
+++ b/node_modules/lodash/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/node_modules/lodash/eq.js b/node_modules/lodash/eq.js
new file mode 100644
index 0000000..a940688
--- /dev/null
+++ b/node_modules/lodash/eq.js
@@ -0,0 +1,37 @@
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
+
+module.exports = eq;
diff --git a/node_modules/lodash/escape.js b/node_modules/lodash/escape.js
new file mode 100644
index 0000000..9247e00
--- /dev/null
+++ b/node_modules/lodash/escape.js
@@ -0,0 +1,43 @@
+var escapeHtmlChar = require('./_escapeHtmlChar'),
+ toString = require('./toString');
+
+/** Used to match HTML entities and HTML characters. */
+var reUnescapedHtml = /[&<>"']/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+/**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+}
+
+module.exports = escape;
diff --git a/node_modules/lodash/escapeRegExp.js b/node_modules/lodash/escapeRegExp.js
new file mode 100644
index 0000000..0a58c69
--- /dev/null
+++ b/node_modules/lodash/escapeRegExp.js
@@ -0,0 +1,32 @@
+var toString = require('./toString');
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+/**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+}
+
+module.exports = escapeRegExp;
diff --git a/node_modules/lodash/every.js b/node_modules/lodash/every.js
new file mode 100644
index 0000000..25080da
--- /dev/null
+++ b/node_modules/lodash/every.js
@@ -0,0 +1,56 @@
+var arrayEvery = require('./_arrayEvery'),
+ baseEvery = require('./_baseEvery'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = every;
diff --git a/node_modules/lodash/extend.js b/node_modules/lodash/extend.js
new file mode 100644
index 0000000..e00166c
--- /dev/null
+++ b/node_modules/lodash/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/node_modules/lodash/extendWith.js b/node_modules/lodash/extendWith.js
new file mode 100644
index 0000000..dbdcb3b
--- /dev/null
+++ b/node_modules/lodash/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/node_modules/lodash/fill.js b/node_modules/lodash/fill.js
new file mode 100644
index 0000000..ae13aa1
--- /dev/null
+++ b/node_modules/lodash/fill.js
@@ -0,0 +1,45 @@
+var baseFill = require('./_baseFill'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+}
+
+module.exports = fill;
diff --git a/node_modules/lodash/filter.js b/node_modules/lodash/filter.js
new file mode 100644
index 0000000..89e0c8c
--- /dev/null
+++ b/node_modules/lodash/filter.js
@@ -0,0 +1,52 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray');
+
+/**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = filter;
diff --git a/node_modules/lodash/find.js b/node_modules/lodash/find.js
new file mode 100644
index 0000000..de732cc
--- /dev/null
+++ b/node_modules/lodash/find.js
@@ -0,0 +1,42 @@
+var createFind = require('./_createFind'),
+ findIndex = require('./findIndex');
+
+/**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+var find = createFind(findIndex);
+
+module.exports = find;
diff --git a/node_modules/lodash/findIndex.js b/node_modules/lodash/findIndex.js
new file mode 100644
index 0000000..4689069
--- /dev/null
+++ b/node_modules/lodash/findIndex.js
@@ -0,0 +1,55 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIteratee = require('./_baseIteratee'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+}
+
+module.exports = findIndex;
diff --git a/node_modules/lodash/findKey.js b/node_modules/lodash/findKey.js
new file mode 100644
index 0000000..cac0248
--- /dev/null
+++ b/node_modules/lodash/findKey.js
@@ -0,0 +1,44 @@
+var baseFindKey = require('./_baseFindKey'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+function findKey(object, predicate) {
+ return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);
+}
+
+module.exports = findKey;
diff --git a/node_modules/lodash/findLast.js b/node_modules/lodash/findLast.js
new file mode 100644
index 0000000..70b4271
--- /dev/null
+++ b/node_modules/lodash/findLast.js
@@ -0,0 +1,25 @@
+var createFind = require('./_createFind'),
+ findLastIndex = require('./findLastIndex');
+
+/**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+var findLast = createFind(findLastIndex);
+
+module.exports = findLast;
diff --git a/node_modules/lodash/findLastIndex.js b/node_modules/lodash/findLastIndex.js
new file mode 100644
index 0000000..7da3431
--- /dev/null
+++ b/node_modules/lodash/findLastIndex.js
@@ -0,0 +1,59 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIteratee = require('./_baseIteratee'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
+}
+
+module.exports = findLastIndex;
diff --git a/node_modules/lodash/findLastKey.js b/node_modules/lodash/findLastKey.js
new file mode 100644
index 0000000..66fb9fb
--- /dev/null
+++ b/node_modules/lodash/findLastKey.js
@@ -0,0 +1,44 @@
+var baseFindKey = require('./_baseFindKey'),
+ baseForOwnRight = require('./_baseForOwnRight'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+function findLastKey(object, predicate) {
+ return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);
+}
+
+module.exports = findLastKey;
diff --git a/node_modules/lodash/first.js b/node_modules/lodash/first.js
new file mode 100644
index 0000000..53f4ad1
--- /dev/null
+++ b/node_modules/lodash/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/node_modules/lodash/flake.lock b/node_modules/lodash/flake.lock
new file mode 100644
index 0000000..dd03252
--- /dev/null
+++ b/node_modules/lodash/flake.lock
@@ -0,0 +1,40 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1613582597,
+ "narHash": "sha256-6LvipIvFuhyorHpUqK3HjySC5Y6gshXHFBhU9EJ4DoM=",
+ "path": "/nix/store/srvplqq673sqd9vyfhyc5w1p88y1gfm4-source",
+ "rev": "6b1057b452c55bb3b463f0d7055bc4ec3fd1f381",
+ "type": "path"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "type": "indirect"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs",
+ "utils": "utils"
+ }
+ },
+ "utils": {
+ "locked": {
+ "lastModified": 1610051610,
+ "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/node_modules/lodash/flake.nix b/node_modules/lodash/flake.nix
new file mode 100644
index 0000000..15a451c
--- /dev/null
+++ b/node_modules/lodash/flake.nix
@@ -0,0 +1,20 @@
+{
+ inputs = {
+ utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, utils }:
+ utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = nixpkgs.legacyPackages."${system}";
+ in rec {
+ devShell = pkgs.mkShell {
+ nativeBuildInputs = with pkgs; [
+ yarn
+ nodejs-14_x
+ nodePackages.typescript-language-server
+ nodePackages.eslint
+ ];
+ };
+ });
+}
diff --git a/node_modules/lodash/flatMap.js b/node_modules/lodash/flatMap.js
new file mode 100644
index 0000000..e668506
--- /dev/null
+++ b/node_modules/lodash/flatMap.js
@@ -0,0 +1,29 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map');
+
+/**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+}
+
+module.exports = flatMap;
diff --git a/node_modules/lodash/flatMapDeep.js b/node_modules/lodash/flatMapDeep.js
new file mode 100644
index 0000000..4653d60
--- /dev/null
+++ b/node_modules/lodash/flatMapDeep.js
@@ -0,0 +1,31 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+}
+
+module.exports = flatMapDeep;
diff --git a/node_modules/lodash/flatMapDepth.js b/node_modules/lodash/flatMapDepth.js
new file mode 100644
index 0000000..6d72005
--- /dev/null
+++ b/node_modules/lodash/flatMapDepth.js
@@ -0,0 +1,31 @@
+var baseFlatten = require('./_baseFlatten'),
+ map = require('./map'),
+ toInteger = require('./toInteger');
+
+/**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+}
+
+module.exports = flatMapDepth;
diff --git a/node_modules/lodash/flatten.js b/node_modules/lodash/flatten.js
new file mode 100644
index 0000000..3f09f7f
--- /dev/null
+++ b/node_modules/lodash/flatten.js
@@ -0,0 +1,22 @@
+var baseFlatten = require('./_baseFlatten');
+
+/**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+}
+
+module.exports = flatten;
diff --git a/node_modules/lodash/flattenDeep.js b/node_modules/lodash/flattenDeep.js
new file mode 100644
index 0000000..8ad585c
--- /dev/null
+++ b/node_modules/lodash/flattenDeep.js
@@ -0,0 +1,25 @@
+var baseFlatten = require('./_baseFlatten');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+}
+
+module.exports = flattenDeep;
diff --git a/node_modules/lodash/flattenDepth.js b/node_modules/lodash/flattenDepth.js
new file mode 100644
index 0000000..441fdcc
--- /dev/null
+++ b/node_modules/lodash/flattenDepth.js
@@ -0,0 +1,33 @@
+var baseFlatten = require('./_baseFlatten'),
+ toInteger = require('./toInteger');
+
+/**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+}
+
+module.exports = flattenDepth;
diff --git a/node_modules/lodash/flip.js b/node_modules/lodash/flip.js
new file mode 100644
index 0000000..c28dd78
--- /dev/null
+++ b/node_modules/lodash/flip.js
@@ -0,0 +1,28 @@
+var createWrap = require('./_createWrap');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_FLIP_FLAG = 512;
+
+/**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+}
+
+module.exports = flip;
diff --git a/node_modules/lodash/floor.js b/node_modules/lodash/floor.js
new file mode 100644
index 0000000..ab6dfa2
--- /dev/null
+++ b/node_modules/lodash/floor.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+var floor = createRound('floor');
+
+module.exports = floor;
diff --git a/node_modules/lodash/flow.js b/node_modules/lodash/flow.js
new file mode 100644
index 0000000..74b6b62
--- /dev/null
+++ b/node_modules/lodash/flow.js
@@ -0,0 +1,27 @@
+var createFlow = require('./_createFlow');
+
+/**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow([_.add, square]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flow = createFlow();
+
+module.exports = flow;
diff --git a/node_modules/lodash/flowRight.js b/node_modules/lodash/flowRight.js
new file mode 100644
index 0000000..1146141
--- /dev/null
+++ b/node_modules/lodash/flowRight.js
@@ -0,0 +1,26 @@
+var createFlow = require('./_createFlow');
+
+/**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight([square, _.add]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flowRight = createFlow(true);
+
+module.exports = flowRight;
diff --git a/node_modules/lodash/forEach.js b/node_modules/lodash/forEach.js
new file mode 100644
index 0000000..c64eaa7
--- /dev/null
+++ b/node_modules/lodash/forEach.js
@@ -0,0 +1,41 @@
+var arrayEach = require('./_arrayEach'),
+ baseEach = require('./_baseEach'),
+ castFunction = require('./_castFunction'),
+ isArray = require('./isArray');
+
+/**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, castFunction(iteratee));
+}
+
+module.exports = forEach;
diff --git a/node_modules/lodash/forEachRight.js b/node_modules/lodash/forEachRight.js
new file mode 100644
index 0000000..7390eba
--- /dev/null
+++ b/node_modules/lodash/forEachRight.js
@@ -0,0 +1,31 @@
+var arrayEachRight = require('./_arrayEachRight'),
+ baseEachRight = require('./_baseEachRight'),
+ castFunction = require('./_castFunction'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, castFunction(iteratee));
+}
+
+module.exports = forEachRight;
diff --git a/node_modules/lodash/forIn.js b/node_modules/lodash/forIn.js
new file mode 100644
index 0000000..583a596
--- /dev/null
+++ b/node_modules/lodash/forIn.js
@@ -0,0 +1,39 @@
+var baseFor = require('./_baseFor'),
+ castFunction = require('./_castFunction'),
+ keysIn = require('./keysIn');
+
+/**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, castFunction(iteratee), keysIn);
+}
+
+module.exports = forIn;
diff --git a/node_modules/lodash/forInRight.js b/node_modules/lodash/forInRight.js
new file mode 100644
index 0000000..4aedf58
--- /dev/null
+++ b/node_modules/lodash/forInRight.js
@@ -0,0 +1,37 @@
+var baseForRight = require('./_baseForRight'),
+ castFunction = require('./_castFunction'),
+ keysIn = require('./keysIn');
+
+/**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, castFunction(iteratee), keysIn);
+}
+
+module.exports = forInRight;
diff --git a/node_modules/lodash/forOwn.js b/node_modules/lodash/forOwn.js
new file mode 100644
index 0000000..94eed84
--- /dev/null
+++ b/node_modules/lodash/forOwn.js
@@ -0,0 +1,36 @@
+var baseForOwn = require('./_baseForOwn'),
+ castFunction = require('./_castFunction');
+
+/**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+function forOwn(object, iteratee) {
+ return object && baseForOwn(object, castFunction(iteratee));
+}
+
+module.exports = forOwn;
diff --git a/node_modules/lodash/forOwnRight.js b/node_modules/lodash/forOwnRight.js
new file mode 100644
index 0000000..86f338f
--- /dev/null
+++ b/node_modules/lodash/forOwnRight.js
@@ -0,0 +1,34 @@
+var baseForOwnRight = require('./_baseForOwnRight'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, castFunction(iteratee));
+}
+
+module.exports = forOwnRight;
diff --git a/node_modules/lodash/fp.js b/node_modules/lodash/fp.js
new file mode 100644
index 0000000..e372dbb
--- /dev/null
+++ b/node_modules/lodash/fp.js
@@ -0,0 +1,2 @@
+var _ = require('./lodash.min').runInContext();
+module.exports = require('./fp/_baseConvert')(_, _);
diff --git a/node_modules/lodash/fp/F.js b/node_modules/lodash/fp/F.js
new file mode 100644
index 0000000..a05a63a
--- /dev/null
+++ b/node_modules/lodash/fp/F.js
@@ -0,0 +1 @@
+module.exports = require('./stubFalse');
diff --git a/node_modules/lodash/fp/T.js b/node_modules/lodash/fp/T.js
new file mode 100644
index 0000000..e2ba8ea
--- /dev/null
+++ b/node_modules/lodash/fp/T.js
@@ -0,0 +1 @@
+module.exports = require('./stubTrue');
diff --git a/node_modules/lodash/fp/__.js b/node_modules/lodash/fp/__.js
new file mode 100644
index 0000000..4af98de
--- /dev/null
+++ b/node_modules/lodash/fp/__.js
@@ -0,0 +1 @@
+module.exports = require('./placeholder');
diff --git a/node_modules/lodash/fp/_baseConvert.js b/node_modules/lodash/fp/_baseConvert.js
new file mode 100644
index 0000000..9baf8e1
--- /dev/null
+++ b/node_modules/lodash/fp/_baseConvert.js
@@ -0,0 +1,569 @@
+var mapping = require('./_mapping'),
+ fallbackHolder = require('./placeholder');
+
+/** Built-in value reference. */
+var push = Array.prototype.push;
+
+/**
+ * Creates a function, with an arity of `n`, that invokes `func` with the
+ * arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} n The arity of the new function.
+ * @returns {Function} Returns the new function.
+ */
+function baseArity(func, n) {
+ return n == 2
+ ? function(a, b) { return func.apply(undefined, arguments); }
+ : function(a) { return func.apply(undefined, arguments); };
+}
+
+/**
+ * Creates a function that invokes `func`, with up to `n` arguments, ignoring
+ * any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+function baseAry(func, n) {
+ return n == 2
+ ? function(a, b) { return func(a, b); }
+ : function(a) { return func(a); };
+}
+
+/**
+ * Creates a clone of `array`.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the cloned array.
+ */
+function cloneArray(array) {
+ var length = array ? array.length : 0,
+ result = Array(length);
+
+ while (length--) {
+ result[length] = array[length];
+ }
+ return result;
+}
+
+/**
+ * Creates a function that clones a given object using the assignment `func`.
+ *
+ * @private
+ * @param {Function} func The assignment function.
+ * @returns {Function} Returns the new cloner function.
+ */
+function createCloner(func) {
+ return function(object) {
+ return func({}, object);
+ };
+}
+
+/**
+ * A specialized version of `_.spread` which flattens the spread array into
+ * the arguments of the invoked `func`.
+ *
+ * @private
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} start The start position of the spread.
+ * @returns {Function} Returns the new function.
+ */
+function flatSpread(func, start) {
+ return function() {
+ var length = arguments.length,
+ lastIndex = length - 1,
+ args = Array(length);
+
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var array = args[start],
+ otherArgs = args.slice(0, start);
+
+ if (array) {
+ push.apply(otherArgs, array);
+ }
+ if (start != lastIndex) {
+ push.apply(otherArgs, args.slice(start + 1));
+ }
+ return func.apply(this, otherArgs);
+ };
+}
+
+/**
+ * Creates a function that wraps `func` and uses `cloner` to clone the first
+ * argument it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} cloner The function to clone arguments.
+ * @returns {Function} Returns the new immutable function.
+ */
+function wrapImmutable(func, cloner) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return;
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var result = args[0] = cloner.apply(undefined, args);
+ func.apply(undefined, args);
+ return result;
+ };
+}
+
+/**
+ * The base implementation of `convert` which accepts a `util` object of methods
+ * required to perform conversions.
+ *
+ * @param {Object} util The util object.
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
+ * @param {boolean} [options.curry=true] Specify currying.
+ * @param {boolean} [options.fixed=true] Specify fixed arity.
+ * @param {boolean} [options.immutable=true] Specify immutable operations.
+ * @param {boolean} [options.rearg=true] Specify rearranging arguments.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function baseConvert(util, name, func, options) {
+ var isLib = typeof name == 'function',
+ isObj = name === Object(name);
+
+ if (isObj) {
+ options = func;
+ func = name;
+ name = undefined;
+ }
+ if (func == null) {
+ throw new TypeError;
+ }
+ options || (options = {});
+
+ var config = {
+ 'cap': 'cap' in options ? options.cap : true,
+ 'curry': 'curry' in options ? options.curry : true,
+ 'fixed': 'fixed' in options ? options.fixed : true,
+ 'immutable': 'immutable' in options ? options.immutable : true,
+ 'rearg': 'rearg' in options ? options.rearg : true
+ };
+
+ var defaultHolder = isLib ? func : fallbackHolder,
+ forceCurry = ('curry' in options) && options.curry,
+ forceFixed = ('fixed' in options) && options.fixed,
+ forceRearg = ('rearg' in options) && options.rearg,
+ pristine = isLib ? func.runInContext() : undefined;
+
+ var helpers = isLib ? func : {
+ 'ary': util.ary,
+ 'assign': util.assign,
+ 'clone': util.clone,
+ 'curry': util.curry,
+ 'forEach': util.forEach,
+ 'isArray': util.isArray,
+ 'isError': util.isError,
+ 'isFunction': util.isFunction,
+ 'isWeakMap': util.isWeakMap,
+ 'iteratee': util.iteratee,
+ 'keys': util.keys,
+ 'rearg': util.rearg,
+ 'toInteger': util.toInteger,
+ 'toPath': util.toPath
+ };
+
+ var ary = helpers.ary,
+ assign = helpers.assign,
+ clone = helpers.clone,
+ curry = helpers.curry,
+ each = helpers.forEach,
+ isArray = helpers.isArray,
+ isError = helpers.isError,
+ isFunction = helpers.isFunction,
+ isWeakMap = helpers.isWeakMap,
+ keys = helpers.keys,
+ rearg = helpers.rearg,
+ toInteger = helpers.toInteger,
+ toPath = helpers.toPath;
+
+ var aryMethodKeys = keys(mapping.aryMethod);
+
+ var wrappers = {
+ 'castArray': function(castArray) {
+ return function() {
+ var value = arguments[0];
+ return isArray(value)
+ ? castArray(cloneArray(value))
+ : castArray.apply(undefined, arguments);
+ };
+ },
+ 'iteratee': function(iteratee) {
+ return function() {
+ var func = arguments[0],
+ arity = arguments[1],
+ result = iteratee(func, arity),
+ length = result.length;
+
+ if (config.cap && typeof arity == 'number') {
+ arity = arity > 2 ? (arity - 2) : 1;
+ return (length && length <= arity) ? result : baseAry(result, arity);
+ }
+ return result;
+ };
+ },
+ 'mixin': function(mixin) {
+ return function(source) {
+ var func = this;
+ if (!isFunction(func)) {
+ return mixin(func, Object(source));
+ }
+ var pairs = [];
+ each(keys(source), function(key) {
+ if (isFunction(source[key])) {
+ pairs.push([key, func.prototype[key]]);
+ }
+ });
+
+ mixin(func, Object(source));
+
+ each(pairs, function(pair) {
+ var value = pair[1];
+ if (isFunction(value)) {
+ func.prototype[pair[0]] = value;
+ } else {
+ delete func.prototype[pair[0]];
+ }
+ });
+ return func;
+ };
+ },
+ 'nthArg': function(nthArg) {
+ return function(n) {
+ var arity = n < 0 ? 1 : (toInteger(n) + 1);
+ return curry(nthArg(n), arity);
+ };
+ },
+ 'rearg': function(rearg) {
+ return function(func, indexes) {
+ var arity = indexes ? indexes.length : 0;
+ return curry(rearg(func, indexes), arity);
+ };
+ },
+ 'runInContext': function(runInContext) {
+ return function(context) {
+ return baseConvert(util, runInContext(context), options);
+ };
+ }
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Casts `func` to a function with an arity capped iteratee if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCap(name, func) {
+ if (config.cap) {
+ var indexes = mapping.iterateeRearg[name];
+ if (indexes) {
+ return iterateeRearg(func, indexes);
+ }
+ var n = !isLib && mapping.iterateeAry[name];
+ if (n) {
+ return iterateeAry(func, n);
+ }
+ }
+ return func;
+ }
+
+ /**
+ * Casts `func` to a curried function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCurry(name, func, n) {
+ return (forceCurry || (config.curry && n > 1))
+ ? curry(func, n)
+ : func;
+ }
+
+ /**
+ * Casts `func` to a fixed arity function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the cast function.
+ */
+ function castFixed(name, func, n) {
+ if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
+ var data = mapping.methodSpread[name],
+ start = data && data.start;
+
+ return start === undefined ? ary(func, n) : flatSpread(func, start);
+ }
+ return func;
+ }
+
+ /**
+ * Casts `func` to an rearged function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castRearg(name, func, n) {
+ return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
+ ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
+ : func;
+ }
+
+ /**
+ * Creates a clone of `object` by `path`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {Array|string} path The path to clone by.
+ * @returns {Object} Returns the cloned object.
+ */
+ function cloneByPath(object, path) {
+ path = toPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ result = clone(Object(object)),
+ nested = result;
+
+ while (nested != null && ++index < length) {
+ var key = path[index],
+ value = nested[key];
+
+ if (value != null &&
+ !(isFunction(value) || isError(value) || isWeakMap(value))) {
+ nested[key] = clone(index == lastIndex ? value : Object(value));
+ }
+ nested = nested[key];
+ }
+ return result;
+ }
+
+ /**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+ function convertLib(options) {
+ return _.runInContext.convert(options)(undefined);
+ }
+
+ /**
+ * Create a converter function for `func` of `name`.
+ *
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @returns {Function} Returns the new converter function.
+ */
+ function createConverter(name, func) {
+ var realName = mapping.aliasToReal[name] || name,
+ methodName = mapping.remap[realName] || realName,
+ oldOptions = options;
+
+ return function(options) {
+ var newUtil = isLib ? pristine : helpers,
+ newFunc = isLib ? pristine[methodName] : func,
+ newOptions = assign(assign({}, oldOptions), options);
+
+ return baseConvert(newUtil, realName, newFunc, newOptions);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
+ * arguments, ignoring any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap iteratee arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeAry(func, n) {
+ return overArg(func, function(func) {
+ return typeof func == 'function' ? baseAry(func, n) : func;
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee with arguments
+ * arranged according to the specified `indexes` where the argument value at
+ * the first index is provided as the first argument, the argument value at
+ * the second index is provided as the second argument, and so on.
+ *
+ * @private
+ * @param {Function} func The function to rearrange iteratee arguments for.
+ * @param {number[]} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeRearg(func, indexes) {
+ return overArg(func, function(func) {
+ var n = indexes.length;
+ return baseArity(rearg(baseAry(func, n), indexes), n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `func` with its first 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() {
+ var length = arguments.length;
+ if (!length) {
+ return func();
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var index = config.rearg ? 0 : (length - 1);
+ args[index] = transform(args[index]);
+ return func.apply(undefined, args);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and applys the conversions
+ * rules by `name`.
+ *
+ * @private
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} func The function to wrap.
+ * @returns {Function} Returns the converted function.
+ */
+ function wrap(name, func, placeholder) {
+ var result,
+ realName = mapping.aliasToReal[name] || name,
+ wrapped = func,
+ wrapper = wrappers[realName];
+
+ if (wrapper) {
+ wrapped = wrapper(func);
+ }
+ else if (config.immutable) {
+ if (mapping.mutate.array[realName]) {
+ wrapped = wrapImmutable(func, cloneArray);
+ }
+ else if (mapping.mutate.object[realName]) {
+ wrapped = wrapImmutable(func, createCloner(func));
+ }
+ else if (mapping.mutate.set[realName]) {
+ wrapped = wrapImmutable(func, cloneByPath);
+ }
+ }
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(otherName) {
+ if (realName == otherName) {
+ var data = mapping.methodSpread[realName],
+ afterRearg = data && data.afterRearg;
+
+ result = afterRearg
+ ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
+ : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
+
+ result = castCap(realName, result);
+ result = castCurry(realName, result, aryKey);
+ return false;
+ }
+ });
+ return !result;
+ });
+
+ result || (result = wrapped);
+ if (result == func) {
+ result = forceCurry ? curry(result, 1) : function() {
+ return func.apply(this, arguments);
+ };
+ }
+ result.convert = createConverter(realName, func);
+ result.placeholder = func.placeholder = placeholder;
+
+ return result;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ if (!isObj) {
+ return wrap(name, func, defaultHolder);
+ }
+ var _ = func;
+
+ // Convert methods by ary cap.
+ var pairs = [];
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(key) {
+ var func = _[mapping.remap[key] || key];
+ if (func) {
+ pairs.push([key, wrap(key, func, _)]);
+ }
+ });
+ });
+
+ // Convert remaining methods.
+ each(keys(_), function(key) {
+ var func = _[key];
+ if (typeof func == 'function') {
+ var length = pairs.length;
+ while (length--) {
+ if (pairs[length][0] == key) {
+ return;
+ }
+ }
+ func.convert = createConverter(key, func);
+ pairs.push([key, func]);
+ }
+ });
+
+ // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
+ each(pairs, function(pair) {
+ _[pair[0]] = pair[1];
+ });
+
+ _.convert = convertLib;
+ _.placeholder = _;
+
+ // Assign aliases.
+ each(keys(_), function(key) {
+ each(mapping.realToAlias[key] || [], function(alias) {
+ _[alias] = _[key];
+ });
+ });
+
+ return _;
+}
+
+module.exports = baseConvert;
diff --git a/node_modules/lodash/fp/_convertBrowser.js b/node_modules/lodash/fp/_convertBrowser.js
new file mode 100644
index 0000000..bde030d
--- /dev/null
+++ b/node_modules/lodash/fp/_convertBrowser.js
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert');
+
+/**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Function} lodash The lodash function to convert.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+function browserConvert(lodash, options) {
+ return baseConvert(lodash, lodash, options);
+}
+
+if (typeof _ == 'function' && typeof _.runInContext == 'function') {
+ _ = browserConvert(_.runInContext());
+}
+module.exports = browserConvert;
diff --git a/node_modules/lodash/fp/_falseOptions.js b/node_modules/lodash/fp/_falseOptions.js
new file mode 100644
index 0000000..773235e
--- /dev/null
+++ b/node_modules/lodash/fp/_falseOptions.js
@@ -0,0 +1,7 @@
+module.exports = {
+ 'cap': false,
+ 'curry': false,
+ 'fixed': false,
+ 'immutable': false,
+ 'rearg': false
+};
diff --git a/node_modules/lodash/fp/_mapping.js b/node_modules/lodash/fp/_mapping.js
new file mode 100644
index 0000000..a642ec0
--- /dev/null
+++ b/node_modules/lodash/fp/_mapping.js
@@ -0,0 +1,358 @@
+/** Used to map aliases to their real names. */
+exports.aliasToReal = {
+
+ // Lodash aliases.
+ 'each': 'forEach',
+ 'eachRight': 'forEachRight',
+ 'entries': 'toPairs',
+ 'entriesIn': 'toPairsIn',
+ 'extend': 'assignIn',
+ 'extendAll': 'assignInAll',
+ 'extendAllWith': 'assignInAllWith',
+ 'extendWith': 'assignInWith',
+ 'first': 'head',
+
+ // Methods that are curried variants of others.
+ 'conforms': 'conformsTo',
+ 'matches': 'isMatch',
+ 'property': 'get',
+
+ // Ramda aliases.
+ '__': 'placeholder',
+ 'F': 'stubFalse',
+ 'T': 'stubTrue',
+ 'all': 'every',
+ 'allPass': 'overEvery',
+ 'always': 'constant',
+ 'any': 'some',
+ 'anyPass': 'overSome',
+ 'apply': 'spread',
+ 'assoc': 'set',
+ 'assocPath': 'set',
+ 'complement': 'negate',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'dissoc': 'unset',
+ 'dissocPath': 'unset',
+ 'dropLast': 'dropRight',
+ 'dropLastWhile': 'dropRightWhile',
+ 'equals': 'isEqual',
+ 'identical': 'eq',
+ 'indexBy': 'keyBy',
+ 'init': 'initial',
+ 'invertObj': 'invert',
+ 'juxt': 'over',
+ 'omitAll': 'omit',
+ 'nAry': 'ary',
+ 'path': 'get',
+ 'pathEq': 'matchesProperty',
+ 'pathOr': 'getOr',
+ 'paths': 'at',
+ 'pickAll': 'pick',
+ 'pipe': 'flow',
+ 'pluck': 'map',
+ 'prop': 'get',
+ 'propEq': 'matchesProperty',
+ 'propOr': 'getOr',
+ 'props': 'at',
+ 'symmetricDifference': 'xor',
+ 'symmetricDifferenceBy': 'xorBy',
+ 'symmetricDifferenceWith': 'xorWith',
+ 'takeLast': 'takeRight',
+ 'takeLastWhile': 'takeRightWhile',
+ 'unapply': 'rest',
+ 'unnest': 'flatten',
+ 'useWith': 'overArgs',
+ 'where': 'conformsTo',
+ 'whereEq': 'isMatch',
+ 'zipObj': 'zipObject'
+};
+
+/** Used to map ary to method names. */
+exports.aryMethod = {
+ '1': [
+ 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
+ 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
+ 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
+ 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
+ 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
+ 'uniqueId', 'words', 'zipAll'
+ ],
+ '2': [
+ 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
+ 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
+ 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
+ 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
+ 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
+ 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
+ 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
+ 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
+ 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
+ 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
+ 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
+ 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
+ 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
+ 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
+ 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
+ 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
+ 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
+ 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
+ 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
+ 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
+ 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
+ 'zipObjectDeep'
+ ],
+ '3': [
+ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
+ 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
+ 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
+ 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
+ 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
+ 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
+ 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
+ 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
+ 'xorWith', 'zipWith'
+ ],
+ '4': [
+ 'fill', 'setWith', 'updateWith'
+ ]
+};
+
+/** Used to map ary to rearg configs. */
+exports.aryRearg = {
+ '2': [1, 0],
+ '3': [2, 0, 1],
+ '4': [3, 2, 0, 1]
+};
+
+/** Used to map method names to their iteratee ary. */
+exports.iterateeAry = {
+ 'dropRightWhile': 1,
+ 'dropWhile': 1,
+ 'every': 1,
+ 'filter': 1,
+ 'find': 1,
+ 'findFrom': 1,
+ 'findIndex': 1,
+ 'findIndexFrom': 1,
+ 'findKey': 1,
+ 'findLast': 1,
+ 'findLastFrom': 1,
+ 'findLastIndex': 1,
+ 'findLastIndexFrom': 1,
+ 'findLastKey': 1,
+ 'flatMap': 1,
+ 'flatMapDeep': 1,
+ 'flatMapDepth': 1,
+ 'forEach': 1,
+ 'forEachRight': 1,
+ 'forIn': 1,
+ 'forInRight': 1,
+ 'forOwn': 1,
+ 'forOwnRight': 1,
+ 'map': 1,
+ 'mapKeys': 1,
+ 'mapValues': 1,
+ 'partition': 1,
+ 'reduce': 2,
+ 'reduceRight': 2,
+ 'reject': 1,
+ 'remove': 1,
+ 'some': 1,
+ 'takeRightWhile': 1,
+ 'takeWhile': 1,
+ 'times': 1,
+ 'transform': 2
+};
+
+/** Used to map method names to iteratee rearg configs. */
+exports.iterateeRearg = {
+ 'mapKeys': [1],
+ 'reduceRight': [1, 0]
+};
+
+/** Used to map method names to rearg configs. */
+exports.methodRearg = {
+ 'assignInAllWith': [1, 0],
+ 'assignInWith': [1, 2, 0],
+ 'assignAllWith': [1, 0],
+ 'assignWith': [1, 2, 0],
+ 'differenceBy': [1, 2, 0],
+ 'differenceWith': [1, 2, 0],
+ 'getOr': [2, 1, 0],
+ 'intersectionBy': [1, 2, 0],
+ 'intersectionWith': [1, 2, 0],
+ 'isEqualWith': [1, 2, 0],
+ 'isMatchWith': [2, 1, 0],
+ 'mergeAllWith': [1, 0],
+ 'mergeWith': [1, 2, 0],
+ 'padChars': [2, 1, 0],
+ 'padCharsEnd': [2, 1, 0],
+ 'padCharsStart': [2, 1, 0],
+ 'pullAllBy': [2, 1, 0],
+ 'pullAllWith': [2, 1, 0],
+ 'rangeStep': [1, 2, 0],
+ 'rangeStepRight': [1, 2, 0],
+ 'setWith': [3, 1, 2, 0],
+ 'sortedIndexBy': [2, 1, 0],
+ 'sortedLastIndexBy': [2, 1, 0],
+ 'unionBy': [1, 2, 0],
+ 'unionWith': [1, 2, 0],
+ 'updateWith': [3, 1, 2, 0],
+ 'xorBy': [1, 2, 0],
+ 'xorWith': [1, 2, 0],
+ 'zipWith': [1, 2, 0]
+};
+
+/** Used to map method names to spread configs. */
+exports.methodSpread = {
+ 'assignAll': { 'start': 0 },
+ 'assignAllWith': { 'start': 0 },
+ 'assignInAll': { 'start': 0 },
+ 'assignInAllWith': { 'start': 0 },
+ 'defaultsAll': { 'start': 0 },
+ 'defaultsDeepAll': { 'start': 0 },
+ 'invokeArgs': { 'start': 2 },
+ 'invokeArgsMap': { 'start': 2 },
+ 'mergeAll': { 'start': 0 },
+ 'mergeAllWith': { 'start': 0 },
+ 'partial': { 'start': 1 },
+ 'partialRight': { 'start': 1 },
+ 'without': { 'start': 1 },
+ 'zipAll': { 'start': 0 }
+};
+
+/** Used to identify methods which mutate arrays or objects. */
+exports.mutate = {
+ 'array': {
+ 'fill': true,
+ 'pull': true,
+ 'pullAll': true,
+ 'pullAllBy': true,
+ 'pullAllWith': true,
+ 'pullAt': true,
+ 'remove': true,
+ 'reverse': true
+ },
+ 'object': {
+ 'assign': true,
+ 'assignAll': true,
+ 'assignAllWith': true,
+ 'assignIn': true,
+ 'assignInAll': true,
+ 'assignInAllWith': true,
+ 'assignInWith': true,
+ 'assignWith': true,
+ 'defaults': true,
+ 'defaultsAll': true,
+ 'defaultsDeep': true,
+ 'defaultsDeepAll': true,
+ 'merge': true,
+ 'mergeAll': true,
+ 'mergeAllWith': true,
+ 'mergeWith': true,
+ },
+ 'set': {
+ 'set': true,
+ 'setWith': true,
+ 'unset': true,
+ 'update': true,
+ 'updateWith': true
+ }
+};
+
+/** Used to map real names to their aliases. */
+exports.realToAlias = (function() {
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ object = exports.aliasToReal,
+ result = {};
+
+ for (var key in object) {
+ var value = object[key];
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ return result;
+}());
+
+/** Used to map method names to other names. */
+exports.remap = {
+ 'assignAll': 'assign',
+ 'assignAllWith': 'assignWith',
+ 'assignInAll': 'assignIn',
+ 'assignInAllWith': 'assignInWith',
+ 'curryN': 'curry',
+ 'curryRightN': 'curryRight',
+ 'defaultsAll': 'defaults',
+ 'defaultsDeepAll': 'defaultsDeep',
+ 'findFrom': 'find',
+ 'findIndexFrom': 'findIndex',
+ 'findLastFrom': 'findLast',
+ 'findLastIndexFrom': 'findLastIndex',
+ 'getOr': 'get',
+ 'includesFrom': 'includes',
+ 'indexOfFrom': 'indexOf',
+ 'invokeArgs': 'invoke',
+ 'invokeArgsMap': 'invokeMap',
+ 'lastIndexOfFrom': 'lastIndexOf',
+ 'mergeAll': 'merge',
+ 'mergeAllWith': 'mergeWith',
+ 'padChars': 'pad',
+ 'padCharsEnd': 'padEnd',
+ 'padCharsStart': 'padStart',
+ 'propertyOf': 'get',
+ 'rangeStep': 'range',
+ 'rangeStepRight': 'rangeRight',
+ 'restFrom': 'rest',
+ 'spreadFrom': 'spread',
+ 'trimChars': 'trim',
+ 'trimCharsEnd': 'trimEnd',
+ 'trimCharsStart': 'trimStart',
+ 'zipAll': 'zip'
+};
+
+/** Used to track methods that skip fixing their arity. */
+exports.skipFixed = {
+ 'castArray': true,
+ 'flow': true,
+ 'flowRight': true,
+ 'iteratee': true,
+ 'mixin': true,
+ 'rearg': true,
+ 'runInContext': true
+};
+
+/** Used to track methods that skip rearranging arguments. */
+exports.skipRearg = {
+ 'add': true,
+ 'assign': true,
+ 'assignIn': true,
+ 'bind': true,
+ 'bindKey': true,
+ 'concat': true,
+ 'difference': true,
+ 'divide': true,
+ 'eq': true,
+ 'gt': true,
+ 'gte': true,
+ 'isEqual': true,
+ 'lt': true,
+ 'lte': true,
+ 'matchesProperty': true,
+ 'merge': true,
+ 'multiply': true,
+ 'overArgs': true,
+ 'partial': true,
+ 'partialRight': true,
+ 'propertyOf': true,
+ 'random': true,
+ 'range': true,
+ 'rangeRight': true,
+ 'subtract': true,
+ 'zip': true,
+ 'zipObject': true,
+ 'zipObjectDeep': true
+};
diff --git a/node_modules/lodash/fp/_util.js b/node_modules/lodash/fp/_util.js
new file mode 100644
index 0000000..1dbf36f
--- /dev/null
+++ b/node_modules/lodash/fp/_util.js
@@ -0,0 +1,16 @@
+module.exports = {
+ 'ary': require('../ary'),
+ 'assign': require('../_baseAssign'),
+ 'clone': require('../clone'),
+ 'curry': require('../curry'),
+ 'forEach': require('../_arrayEach'),
+ 'isArray': require('../isArray'),
+ 'isError': require('../isError'),
+ 'isFunction': require('../isFunction'),
+ 'isWeakMap': require('../isWeakMap'),
+ 'iteratee': require('../iteratee'),
+ 'keys': require('../_baseKeys'),
+ 'rearg': require('../rearg'),
+ 'toInteger': require('../toInteger'),
+ 'toPath': require('../toPath')
+};
diff --git a/node_modules/lodash/fp/add.js b/node_modules/lodash/fp/add.js
new file mode 100644
index 0000000..816eeec
--- /dev/null
+++ b/node_modules/lodash/fp/add.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('add', require('../add'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/after.js b/node_modules/lodash/fp/after.js
new file mode 100644
index 0000000..21a0167
--- /dev/null
+++ b/node_modules/lodash/fp/after.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('after', require('../after'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/all.js b/node_modules/lodash/fp/all.js
new file mode 100644
index 0000000..d0839f7
--- /dev/null
+++ b/node_modules/lodash/fp/all.js
@@ -0,0 +1 @@
+module.exports = require('./every');
diff --git a/node_modules/lodash/fp/allPass.js b/node_modules/lodash/fp/allPass.js
new file mode 100644
index 0000000..79b73ef
--- /dev/null
+++ b/node_modules/lodash/fp/allPass.js
@@ -0,0 +1 @@
+module.exports = require('./overEvery');
diff --git a/node_modules/lodash/fp/always.js b/node_modules/lodash/fp/always.js
new file mode 100644
index 0000000..9887703
--- /dev/null
+++ b/node_modules/lodash/fp/always.js
@@ -0,0 +1 @@
+module.exports = require('./constant');
diff --git a/node_modules/lodash/fp/any.js b/node_modules/lodash/fp/any.js
new file mode 100644
index 0000000..900ac25
--- /dev/null
+++ b/node_modules/lodash/fp/any.js
@@ -0,0 +1 @@
+module.exports = require('./some');
diff --git a/node_modules/lodash/fp/anyPass.js b/node_modules/lodash/fp/anyPass.js
new file mode 100644
index 0000000..2774ab3
--- /dev/null
+++ b/node_modules/lodash/fp/anyPass.js
@@ -0,0 +1 @@
+module.exports = require('./overSome');
diff --git a/node_modules/lodash/fp/apply.js b/node_modules/lodash/fp/apply.js
new file mode 100644
index 0000000..2b75712
--- /dev/null
+++ b/node_modules/lodash/fp/apply.js
@@ -0,0 +1 @@
+module.exports = require('./spread');
diff --git a/node_modules/lodash/fp/array.js b/node_modules/lodash/fp/array.js
new file mode 100644
index 0000000..fe939c2
--- /dev/null
+++ b/node_modules/lodash/fp/array.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../array'));
diff --git a/node_modules/lodash/fp/ary.js b/node_modules/lodash/fp/ary.js
new file mode 100644
index 0000000..8edf187
--- /dev/null
+++ b/node_modules/lodash/fp/ary.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('ary', require('../ary'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assign.js b/node_modules/lodash/fp/assign.js
new file mode 100644
index 0000000..23f47af
--- /dev/null
+++ b/node_modules/lodash/fp/assign.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assign', require('../assign'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignAll.js b/node_modules/lodash/fp/assignAll.js
new file mode 100644
index 0000000..b1d36c7
--- /dev/null
+++ b/node_modules/lodash/fp/assignAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignAll', require('../assign'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignAllWith.js b/node_modules/lodash/fp/assignAllWith.js
new file mode 100644
index 0000000..21e836e
--- /dev/null
+++ b/node_modules/lodash/fp/assignAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignAllWith', require('../assignWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignIn.js b/node_modules/lodash/fp/assignIn.js
new file mode 100644
index 0000000..6e7c65f
--- /dev/null
+++ b/node_modules/lodash/fp/assignIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignIn', require('../assignIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignInAll.js b/node_modules/lodash/fp/assignInAll.js
new file mode 100644
index 0000000..7ba75db
--- /dev/null
+++ b/node_modules/lodash/fp/assignInAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInAll', require('../assignIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignInAllWith.js b/node_modules/lodash/fp/assignInAllWith.js
new file mode 100644
index 0000000..e766903
--- /dev/null
+++ b/node_modules/lodash/fp/assignInAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInAllWith', require('../assignInWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignInWith.js b/node_modules/lodash/fp/assignInWith.js
new file mode 100644
index 0000000..acb5923
--- /dev/null
+++ b/node_modules/lodash/fp/assignInWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignInWith', require('../assignInWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assignWith.js b/node_modules/lodash/fp/assignWith.js
new file mode 100644
index 0000000..eb92521
--- /dev/null
+++ b/node_modules/lodash/fp/assignWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('assignWith', require('../assignWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/assoc.js b/node_modules/lodash/fp/assoc.js
new file mode 100644
index 0000000..7648820
--- /dev/null
+++ b/node_modules/lodash/fp/assoc.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/node_modules/lodash/fp/assocPath.js b/node_modules/lodash/fp/assocPath.js
new file mode 100644
index 0000000..7648820
--- /dev/null
+++ b/node_modules/lodash/fp/assocPath.js
@@ -0,0 +1 @@
+module.exports = require('./set');
diff --git a/node_modules/lodash/fp/at.js b/node_modules/lodash/fp/at.js
new file mode 100644
index 0000000..cc39d25
--- /dev/null
+++ b/node_modules/lodash/fp/at.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('at', require('../at'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/attempt.js b/node_modules/lodash/fp/attempt.js
new file mode 100644
index 0000000..26ca42e
--- /dev/null
+++ b/node_modules/lodash/fp/attempt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('attempt', require('../attempt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/before.js b/node_modules/lodash/fp/before.js
new file mode 100644
index 0000000..7a2de65
--- /dev/null
+++ b/node_modules/lodash/fp/before.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('before', require('../before'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/bind.js b/node_modules/lodash/fp/bind.js
new file mode 100644
index 0000000..5cbe4f3
--- /dev/null
+++ b/node_modules/lodash/fp/bind.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bind', require('../bind'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/bindAll.js b/node_modules/lodash/fp/bindAll.js
new file mode 100644
index 0000000..6b4a4a0
--- /dev/null
+++ b/node_modules/lodash/fp/bindAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bindAll', require('../bindAll'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/bindKey.js b/node_modules/lodash/fp/bindKey.js
new file mode 100644
index 0000000..6a46c6b
--- /dev/null
+++ b/node_modules/lodash/fp/bindKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('bindKey', require('../bindKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/camelCase.js b/node_modules/lodash/fp/camelCase.js
new file mode 100644
index 0000000..87b77b4
--- /dev/null
+++ b/node_modules/lodash/fp/camelCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('camelCase', require('../camelCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/capitalize.js b/node_modules/lodash/fp/capitalize.js
new file mode 100644
index 0000000..cac74e1
--- /dev/null
+++ b/node_modules/lodash/fp/capitalize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('capitalize', require('../capitalize'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/castArray.js b/node_modules/lodash/fp/castArray.js
new file mode 100644
index 0000000..8681c09
--- /dev/null
+++ b/node_modules/lodash/fp/castArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('castArray', require('../castArray'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/ceil.js b/node_modules/lodash/fp/ceil.js
new file mode 100644
index 0000000..f416b72
--- /dev/null
+++ b/node_modules/lodash/fp/ceil.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('ceil', require('../ceil'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/chain.js b/node_modules/lodash/fp/chain.js
new file mode 100644
index 0000000..604fe39
--- /dev/null
+++ b/node_modules/lodash/fp/chain.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('chain', require('../chain'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/chunk.js b/node_modules/lodash/fp/chunk.js
new file mode 100644
index 0000000..871ab08
--- /dev/null
+++ b/node_modules/lodash/fp/chunk.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('chunk', require('../chunk'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/clamp.js b/node_modules/lodash/fp/clamp.js
new file mode 100644
index 0000000..3b06c01
--- /dev/null
+++ b/node_modules/lodash/fp/clamp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('clamp', require('../clamp'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/clone.js b/node_modules/lodash/fp/clone.js
new file mode 100644
index 0000000..cadb59c
--- /dev/null
+++ b/node_modules/lodash/fp/clone.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('clone', require('../clone'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cloneDeep.js b/node_modules/lodash/fp/cloneDeep.js
new file mode 100644
index 0000000..a6107aa
--- /dev/null
+++ b/node_modules/lodash/fp/cloneDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cloneDeepWith.js b/node_modules/lodash/fp/cloneDeepWith.js
new file mode 100644
index 0000000..6f01e44
--- /dev/null
+++ b/node_modules/lodash/fp/cloneDeepWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneDeepWith', require('../cloneDeepWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cloneWith.js b/node_modules/lodash/fp/cloneWith.js
new file mode 100644
index 0000000..aa88578
--- /dev/null
+++ b/node_modules/lodash/fp/cloneWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cloneWith', require('../cloneWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/collection.js b/node_modules/lodash/fp/collection.js
new file mode 100644
index 0000000..fc8b328
--- /dev/null
+++ b/node_modules/lodash/fp/collection.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../collection'));
diff --git a/node_modules/lodash/fp/commit.js b/node_modules/lodash/fp/commit.js
new file mode 100644
index 0000000..130a894
--- /dev/null
+++ b/node_modules/lodash/fp/commit.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('commit', require('../commit'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/compact.js b/node_modules/lodash/fp/compact.js
new file mode 100644
index 0000000..ce8f7a1
--- /dev/null
+++ b/node_modules/lodash/fp/compact.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('compact', require('../compact'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/complement.js b/node_modules/lodash/fp/complement.js
new file mode 100644
index 0000000..93eb462
--- /dev/null
+++ b/node_modules/lodash/fp/complement.js
@@ -0,0 +1 @@
+module.exports = require('./negate');
diff --git a/node_modules/lodash/fp/compose.js b/node_modules/lodash/fp/compose.js
new file mode 100644
index 0000000..1954e94
--- /dev/null
+++ b/node_modules/lodash/fp/compose.js
@@ -0,0 +1 @@
+module.exports = require('./flowRight');
diff --git a/node_modules/lodash/fp/concat.js b/node_modules/lodash/fp/concat.js
new file mode 100644
index 0000000..e59346a
--- /dev/null
+++ b/node_modules/lodash/fp/concat.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('concat', require('../concat'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/cond.js b/node_modules/lodash/fp/cond.js
new file mode 100644
index 0000000..6a0120e
--- /dev/null
+++ b/node_modules/lodash/fp/cond.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('cond', require('../cond'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/conforms.js b/node_modules/lodash/fp/conforms.js
new file mode 100644
index 0000000..3247f64
--- /dev/null
+++ b/node_modules/lodash/fp/conforms.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/node_modules/lodash/fp/conformsTo.js b/node_modules/lodash/fp/conformsTo.js
new file mode 100644
index 0000000..aa7f41e
--- /dev/null
+++ b/node_modules/lodash/fp/conformsTo.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('conformsTo', require('../conformsTo'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/constant.js b/node_modules/lodash/fp/constant.js
new file mode 100644
index 0000000..9e406fc
--- /dev/null
+++ b/node_modules/lodash/fp/constant.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('constant', require('../constant'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/contains.js b/node_modules/lodash/fp/contains.js
new file mode 100644
index 0000000..594722a
--- /dev/null
+++ b/node_modules/lodash/fp/contains.js
@@ -0,0 +1 @@
+module.exports = require('./includes');
diff --git a/node_modules/lodash/fp/convert.js b/node_modules/lodash/fp/convert.js
new file mode 100644
index 0000000..4795dc4
--- /dev/null
+++ b/node_modules/lodash/fp/convert.js
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert'),
+ util = require('./_util');
+
+/**
+ * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied. If `name` is an object its methods
+ * will be converted.
+ *
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} [func] The function to wrap.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function convert(name, func, options) {
+ return baseConvert(util, name, func, options);
+}
+
+module.exports = convert;
diff --git a/node_modules/lodash/fp/countBy.js b/node_modules/lodash/fp/countBy.js
new file mode 100644
index 0000000..dfa4643
--- /dev/null
+++ b/node_modules/lodash/fp/countBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('countBy', require('../countBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/create.js b/node_modules/lodash/fp/create.js
new file mode 100644
index 0000000..752025f
--- /dev/null
+++ b/node_modules/lodash/fp/create.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('create', require('../create'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curry.js b/node_modules/lodash/fp/curry.js
new file mode 100644
index 0000000..b0b4168
--- /dev/null
+++ b/node_modules/lodash/fp/curry.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curry', require('../curry'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curryN.js b/node_modules/lodash/fp/curryN.js
new file mode 100644
index 0000000..2ae7d00
--- /dev/null
+++ b/node_modules/lodash/fp/curryN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryN', require('../curry'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curryRight.js b/node_modules/lodash/fp/curryRight.js
new file mode 100644
index 0000000..cb619eb
--- /dev/null
+++ b/node_modules/lodash/fp/curryRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryRight', require('../curryRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/curryRightN.js b/node_modules/lodash/fp/curryRightN.js
new file mode 100644
index 0000000..2495afc
--- /dev/null
+++ b/node_modules/lodash/fp/curryRightN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('curryRightN', require('../curryRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/date.js b/node_modules/lodash/fp/date.js
new file mode 100644
index 0000000..82cb952
--- /dev/null
+++ b/node_modules/lodash/fp/date.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../date'));
diff --git a/node_modules/lodash/fp/debounce.js b/node_modules/lodash/fp/debounce.js
new file mode 100644
index 0000000..2612229
--- /dev/null
+++ b/node_modules/lodash/fp/debounce.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('debounce', require('../debounce'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/deburr.js b/node_modules/lodash/fp/deburr.js
new file mode 100644
index 0000000..96463ab
--- /dev/null
+++ b/node_modules/lodash/fp/deburr.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('deburr', require('../deburr'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultTo.js b/node_modules/lodash/fp/defaultTo.js
new file mode 100644
index 0000000..d6b52a4
--- /dev/null
+++ b/node_modules/lodash/fp/defaultTo.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultTo', require('../defaultTo'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaults.js b/node_modules/lodash/fp/defaults.js
new file mode 100644
index 0000000..e1a8e6e
--- /dev/null
+++ b/node_modules/lodash/fp/defaults.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaults', require('../defaults'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultsAll.js b/node_modules/lodash/fp/defaultsAll.js
new file mode 100644
index 0000000..238fcc3
--- /dev/null
+++ b/node_modules/lodash/fp/defaultsAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsAll', require('../defaults'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultsDeep.js b/node_modules/lodash/fp/defaultsDeep.js
new file mode 100644
index 0000000..1f172ff
--- /dev/null
+++ b/node_modules/lodash/fp/defaultsDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsDeep', require('../defaultsDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/lodash/fp/defaultsDeepAll.js
new file mode 100644
index 0000000..6835f2f
--- /dev/null
+++ b/node_modules/lodash/fp/defaultsDeepAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defaultsDeepAll', require('../defaultsDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/defer.js b/node_modules/lodash/fp/defer.js
new file mode 100644
index 0000000..ec7990f
--- /dev/null
+++ b/node_modules/lodash/fp/defer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('defer', require('../defer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/delay.js b/node_modules/lodash/fp/delay.js
new file mode 100644
index 0000000..556dbd5
--- /dev/null
+++ b/node_modules/lodash/fp/delay.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('delay', require('../delay'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/difference.js b/node_modules/lodash/fp/difference.js
new file mode 100644
index 0000000..2d03765
--- /dev/null
+++ b/node_modules/lodash/fp/difference.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('difference', require('../difference'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/differenceBy.js b/node_modules/lodash/fp/differenceBy.js
new file mode 100644
index 0000000..2f91491
--- /dev/null
+++ b/node_modules/lodash/fp/differenceBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('differenceBy', require('../differenceBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/differenceWith.js b/node_modules/lodash/fp/differenceWith.js
new file mode 100644
index 0000000..bcf5ad2
--- /dev/null
+++ b/node_modules/lodash/fp/differenceWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('differenceWith', require('../differenceWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dissoc.js b/node_modules/lodash/fp/dissoc.js
new file mode 100644
index 0000000..7ec7be1
--- /dev/null
+++ b/node_modules/lodash/fp/dissoc.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/node_modules/lodash/fp/dissocPath.js b/node_modules/lodash/fp/dissocPath.js
new file mode 100644
index 0000000..7ec7be1
--- /dev/null
+++ b/node_modules/lodash/fp/dissocPath.js
@@ -0,0 +1 @@
+module.exports = require('./unset');
diff --git a/node_modules/lodash/fp/divide.js b/node_modules/lodash/fp/divide.js
new file mode 100644
index 0000000..82048c5
--- /dev/null
+++ b/node_modules/lodash/fp/divide.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('divide', require('../divide'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/drop.js b/node_modules/lodash/fp/drop.js
new file mode 100644
index 0000000..2fa9b4f
--- /dev/null
+++ b/node_modules/lodash/fp/drop.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('drop', require('../drop'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dropLast.js b/node_modules/lodash/fp/dropLast.js
new file mode 100644
index 0000000..174e525
--- /dev/null
+++ b/node_modules/lodash/fp/dropLast.js
@@ -0,0 +1 @@
+module.exports = require('./dropRight');
diff --git a/node_modules/lodash/fp/dropLastWhile.js b/node_modules/lodash/fp/dropLastWhile.js
new file mode 100644
index 0000000..be2a9d2
--- /dev/null
+++ b/node_modules/lodash/fp/dropLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./dropRightWhile');
diff --git a/node_modules/lodash/fp/dropRight.js b/node_modules/lodash/fp/dropRight.js
new file mode 100644
index 0000000..e98881f
--- /dev/null
+++ b/node_modules/lodash/fp/dropRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropRight', require('../dropRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dropRightWhile.js b/node_modules/lodash/fp/dropRightWhile.js
new file mode 100644
index 0000000..cacaa70
--- /dev/null
+++ b/node_modules/lodash/fp/dropRightWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropRightWhile', require('../dropRightWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/dropWhile.js b/node_modules/lodash/fp/dropWhile.js
new file mode 100644
index 0000000..285f864
--- /dev/null
+++ b/node_modules/lodash/fp/dropWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('dropWhile', require('../dropWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/each.js b/node_modules/lodash/fp/each.js
new file mode 100644
index 0000000..8800f42
--- /dev/null
+++ b/node_modules/lodash/fp/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/node_modules/lodash/fp/eachRight.js b/node_modules/lodash/fp/eachRight.js
new file mode 100644
index 0000000..3252b2a
--- /dev/null
+++ b/node_modules/lodash/fp/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/node_modules/lodash/fp/endsWith.js b/node_modules/lodash/fp/endsWith.js
new file mode 100644
index 0000000..17dc2a4
--- /dev/null
+++ b/node_modules/lodash/fp/endsWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('endsWith', require('../endsWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/entries.js b/node_modules/lodash/fp/entries.js
new file mode 100644
index 0000000..7a88df2
--- /dev/null
+++ b/node_modules/lodash/fp/entries.js
@@ -0,0 +1 @@
+module.exports = require('./toPairs');
diff --git a/node_modules/lodash/fp/entriesIn.js b/node_modules/lodash/fp/entriesIn.js
new file mode 100644
index 0000000..f6c6331
--- /dev/null
+++ b/node_modules/lodash/fp/entriesIn.js
@@ -0,0 +1 @@
+module.exports = require('./toPairsIn');
diff --git a/node_modules/lodash/fp/eq.js b/node_modules/lodash/fp/eq.js
new file mode 100644
index 0000000..9a3d21b
--- /dev/null
+++ b/node_modules/lodash/fp/eq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('eq', require('../eq'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/equals.js b/node_modules/lodash/fp/equals.js
new file mode 100644
index 0000000..e6a5ce0
--- /dev/null
+++ b/node_modules/lodash/fp/equals.js
@@ -0,0 +1 @@
+module.exports = require('./isEqual');
diff --git a/node_modules/lodash/fp/escape.js b/node_modules/lodash/fp/escape.js
new file mode 100644
index 0000000..52c1fbb
--- /dev/null
+++ b/node_modules/lodash/fp/escape.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('escape', require('../escape'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/escapeRegExp.js b/node_modules/lodash/fp/escapeRegExp.js
new file mode 100644
index 0000000..369b2ef
--- /dev/null
+++ b/node_modules/lodash/fp/escapeRegExp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/every.js b/node_modules/lodash/fp/every.js
new file mode 100644
index 0000000..95c2776
--- /dev/null
+++ b/node_modules/lodash/fp/every.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('every', require('../every'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/extend.js b/node_modules/lodash/fp/extend.js
new file mode 100644
index 0000000..e00166c
--- /dev/null
+++ b/node_modules/lodash/fp/extend.js
@@ -0,0 +1 @@
+module.exports = require('./assignIn');
diff --git a/node_modules/lodash/fp/extendAll.js b/node_modules/lodash/fp/extendAll.js
new file mode 100644
index 0000000..cc55b64
--- /dev/null
+++ b/node_modules/lodash/fp/extendAll.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAll');
diff --git a/node_modules/lodash/fp/extendAllWith.js b/node_modules/lodash/fp/extendAllWith.js
new file mode 100644
index 0000000..6679d20
--- /dev/null
+++ b/node_modules/lodash/fp/extendAllWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInAllWith');
diff --git a/node_modules/lodash/fp/extendWith.js b/node_modules/lodash/fp/extendWith.js
new file mode 100644
index 0000000..dbdcb3b
--- /dev/null
+++ b/node_modules/lodash/fp/extendWith.js
@@ -0,0 +1 @@
+module.exports = require('./assignInWith');
diff --git a/node_modules/lodash/fp/fill.js b/node_modules/lodash/fp/fill.js
new file mode 100644
index 0000000..b2d47e8
--- /dev/null
+++ b/node_modules/lodash/fp/fill.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('fill', require('../fill'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/filter.js b/node_modules/lodash/fp/filter.js
new file mode 100644
index 0000000..796d501
--- /dev/null
+++ b/node_modules/lodash/fp/filter.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('filter', require('../filter'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/find.js b/node_modules/lodash/fp/find.js
new file mode 100644
index 0000000..f805d33
--- /dev/null
+++ b/node_modules/lodash/fp/find.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('find', require('../find'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findFrom.js b/node_modules/lodash/fp/findFrom.js
new file mode 100644
index 0000000..da8275e
--- /dev/null
+++ b/node_modules/lodash/fp/findFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findFrom', require('../find'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findIndex.js b/node_modules/lodash/fp/findIndex.js
new file mode 100644
index 0000000..8c15fd1
--- /dev/null
+++ b/node_modules/lodash/fp/findIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findIndex', require('../findIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findIndexFrom.js b/node_modules/lodash/fp/findIndexFrom.js
new file mode 100644
index 0000000..32e98cb
--- /dev/null
+++ b/node_modules/lodash/fp/findIndexFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findIndexFrom', require('../findIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findKey.js b/node_modules/lodash/fp/findKey.js
new file mode 100644
index 0000000..475bcfa
--- /dev/null
+++ b/node_modules/lodash/fp/findKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findKey', require('../findKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLast.js b/node_modules/lodash/fp/findLast.js
new file mode 100644
index 0000000..093fe94
--- /dev/null
+++ b/node_modules/lodash/fp/findLast.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLast', require('../findLast'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastFrom.js b/node_modules/lodash/fp/findLastFrom.js
new file mode 100644
index 0000000..76c38fb
--- /dev/null
+++ b/node_modules/lodash/fp/findLastFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastFrom', require('../findLast'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastIndex.js b/node_modules/lodash/fp/findLastIndex.js
new file mode 100644
index 0000000..36986df
--- /dev/null
+++ b/node_modules/lodash/fp/findLastIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastIndex', require('../findLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/lodash/fp/findLastIndexFrom.js
new file mode 100644
index 0000000..34c8176
--- /dev/null
+++ b/node_modules/lodash/fp/findLastIndexFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastIndexFrom', require('../findLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/findLastKey.js b/node_modules/lodash/fp/findLastKey.js
new file mode 100644
index 0000000..5f81b60
--- /dev/null
+++ b/node_modules/lodash/fp/findLastKey.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('findLastKey', require('../findLastKey'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/first.js b/node_modules/lodash/fp/first.js
new file mode 100644
index 0000000..53f4ad1
--- /dev/null
+++ b/node_modules/lodash/fp/first.js
@@ -0,0 +1 @@
+module.exports = require('./head');
diff --git a/node_modules/lodash/fp/flatMap.js b/node_modules/lodash/fp/flatMap.js
new file mode 100644
index 0000000..d01dc4d
--- /dev/null
+++ b/node_modules/lodash/fp/flatMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMap', require('../flatMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flatMapDeep.js b/node_modules/lodash/fp/flatMapDeep.js
new file mode 100644
index 0000000..569c42e
--- /dev/null
+++ b/node_modules/lodash/fp/flatMapDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMapDeep', require('../flatMapDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flatMapDepth.js b/node_modules/lodash/fp/flatMapDepth.js
new file mode 100644
index 0000000..6eb68fd
--- /dev/null
+++ b/node_modules/lodash/fp/flatMapDepth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatMapDepth', require('../flatMapDepth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flatten.js b/node_modules/lodash/fp/flatten.js
new file mode 100644
index 0000000..30425d8
--- /dev/null
+++ b/node_modules/lodash/fp/flatten.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flatten', require('../flatten'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flattenDeep.js b/node_modules/lodash/fp/flattenDeep.js
new file mode 100644
index 0000000..aed5db2
--- /dev/null
+++ b/node_modules/lodash/fp/flattenDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flattenDepth.js b/node_modules/lodash/fp/flattenDepth.js
new file mode 100644
index 0000000..ad65e37
--- /dev/null
+++ b/node_modules/lodash/fp/flattenDepth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flattenDepth', require('../flattenDepth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flip.js b/node_modules/lodash/fp/flip.js
new file mode 100644
index 0000000..0547e7b
--- /dev/null
+++ b/node_modules/lodash/fp/flip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flip', require('../flip'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/floor.js b/node_modules/lodash/fp/floor.js
new file mode 100644
index 0000000..a6cf335
--- /dev/null
+++ b/node_modules/lodash/fp/floor.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('floor', require('../floor'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flow.js b/node_modules/lodash/fp/flow.js
new file mode 100644
index 0000000..cd83677
--- /dev/null
+++ b/node_modules/lodash/fp/flow.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flow', require('../flow'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/flowRight.js b/node_modules/lodash/fp/flowRight.js
new file mode 100644
index 0000000..972a5b9
--- /dev/null
+++ b/node_modules/lodash/fp/flowRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('flowRight', require('../flowRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forEach.js b/node_modules/lodash/fp/forEach.js
new file mode 100644
index 0000000..2f49452
--- /dev/null
+++ b/node_modules/lodash/fp/forEach.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forEach', require('../forEach'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forEachRight.js b/node_modules/lodash/fp/forEachRight.js
new file mode 100644
index 0000000..3ff9733
--- /dev/null
+++ b/node_modules/lodash/fp/forEachRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forEachRight', require('../forEachRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forIn.js b/node_modules/lodash/fp/forIn.js
new file mode 100644
index 0000000..9341749
--- /dev/null
+++ b/node_modules/lodash/fp/forIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forIn', require('../forIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forInRight.js b/node_modules/lodash/fp/forInRight.js
new file mode 100644
index 0000000..cecf8bb
--- /dev/null
+++ b/node_modules/lodash/fp/forInRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forInRight', require('../forInRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forOwn.js b/node_modules/lodash/fp/forOwn.js
new file mode 100644
index 0000000..246449e
--- /dev/null
+++ b/node_modules/lodash/fp/forOwn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forOwn', require('../forOwn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/forOwnRight.js b/node_modules/lodash/fp/forOwnRight.js
new file mode 100644
index 0000000..c5e826e
--- /dev/null
+++ b/node_modules/lodash/fp/forOwnRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('forOwnRight', require('../forOwnRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/fromPairs.js b/node_modules/lodash/fp/fromPairs.js
new file mode 100644
index 0000000..f8cc596
--- /dev/null
+++ b/node_modules/lodash/fp/fromPairs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('fromPairs', require('../fromPairs'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/function.js b/node_modules/lodash/fp/function.js
new file mode 100644
index 0000000..dfe69b1
--- /dev/null
+++ b/node_modules/lodash/fp/function.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../function'));
diff --git a/node_modules/lodash/fp/functions.js b/node_modules/lodash/fp/functions.js
new file mode 100644
index 0000000..09d1bb1
--- /dev/null
+++ b/node_modules/lodash/fp/functions.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('functions', require('../functions'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/functionsIn.js b/node_modules/lodash/fp/functionsIn.js
new file mode 100644
index 0000000..2cfeb83
--- /dev/null
+++ b/node_modules/lodash/fp/functionsIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/get.js b/node_modules/lodash/fp/get.js
new file mode 100644
index 0000000..6d3a328
--- /dev/null
+++ b/node_modules/lodash/fp/get.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('get', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/getOr.js b/node_modules/lodash/fp/getOr.js
new file mode 100644
index 0000000..7dbf771
--- /dev/null
+++ b/node_modules/lodash/fp/getOr.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('getOr', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/groupBy.js b/node_modules/lodash/fp/groupBy.js
new file mode 100644
index 0000000..fc0bc78
--- /dev/null
+++ b/node_modules/lodash/fp/groupBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('groupBy', require('../groupBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/gt.js b/node_modules/lodash/fp/gt.js
new file mode 100644
index 0000000..9e57c80
--- /dev/null
+++ b/node_modules/lodash/fp/gt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('gt', require('../gt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/gte.js b/node_modules/lodash/fp/gte.js
new file mode 100644
index 0000000..4584786
--- /dev/null
+++ b/node_modules/lodash/fp/gte.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('gte', require('../gte'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/has.js b/node_modules/lodash/fp/has.js
new file mode 100644
index 0000000..b901298
--- /dev/null
+++ b/node_modules/lodash/fp/has.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('has', require('../has'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/hasIn.js b/node_modules/lodash/fp/hasIn.js
new file mode 100644
index 0000000..b3c3d1a
--- /dev/null
+++ b/node_modules/lodash/fp/hasIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('hasIn', require('../hasIn'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/head.js b/node_modules/lodash/fp/head.js
new file mode 100644
index 0000000..2694f0a
--- /dev/null
+++ b/node_modules/lodash/fp/head.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('head', require('../head'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/identical.js b/node_modules/lodash/fp/identical.js
new file mode 100644
index 0000000..85563f4
--- /dev/null
+++ b/node_modules/lodash/fp/identical.js
@@ -0,0 +1 @@
+module.exports = require('./eq');
diff --git a/node_modules/lodash/fp/identity.js b/node_modules/lodash/fp/identity.js
new file mode 100644
index 0000000..096415a
--- /dev/null
+++ b/node_modules/lodash/fp/identity.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('identity', require('../identity'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/inRange.js b/node_modules/lodash/fp/inRange.js
new file mode 100644
index 0000000..202d940
--- /dev/null
+++ b/node_modules/lodash/fp/inRange.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('inRange', require('../inRange'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/includes.js b/node_modules/lodash/fp/includes.js
new file mode 100644
index 0000000..1146780
--- /dev/null
+++ b/node_modules/lodash/fp/includes.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('includes', require('../includes'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/includesFrom.js b/node_modules/lodash/fp/includesFrom.js
new file mode 100644
index 0000000..683afdb
--- /dev/null
+++ b/node_modules/lodash/fp/includesFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('includesFrom', require('../includes'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/indexBy.js b/node_modules/lodash/fp/indexBy.js
new file mode 100644
index 0000000..7e64bc0
--- /dev/null
+++ b/node_modules/lodash/fp/indexBy.js
@@ -0,0 +1 @@
+module.exports = require('./keyBy');
diff --git a/node_modules/lodash/fp/indexOf.js b/node_modules/lodash/fp/indexOf.js
new file mode 100644
index 0000000..524658e
--- /dev/null
+++ b/node_modules/lodash/fp/indexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('indexOf', require('../indexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/indexOfFrom.js b/node_modules/lodash/fp/indexOfFrom.js
new file mode 100644
index 0000000..d99c822
--- /dev/null
+++ b/node_modules/lodash/fp/indexOfFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('indexOfFrom', require('../indexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/init.js b/node_modules/lodash/fp/init.js
new file mode 100644
index 0000000..2f88d8b
--- /dev/null
+++ b/node_modules/lodash/fp/init.js
@@ -0,0 +1 @@
+module.exports = require('./initial');
diff --git a/node_modules/lodash/fp/initial.js b/node_modules/lodash/fp/initial.js
new file mode 100644
index 0000000..b732ba0
--- /dev/null
+++ b/node_modules/lodash/fp/initial.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('initial', require('../initial'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/intersection.js b/node_modules/lodash/fp/intersection.js
new file mode 100644
index 0000000..52936d5
--- /dev/null
+++ b/node_modules/lodash/fp/intersection.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersection', require('../intersection'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/intersectionBy.js b/node_modules/lodash/fp/intersectionBy.js
new file mode 100644
index 0000000..72629f2
--- /dev/null
+++ b/node_modules/lodash/fp/intersectionBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersectionBy', require('../intersectionBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/intersectionWith.js b/node_modules/lodash/fp/intersectionWith.js
new file mode 100644
index 0000000..e064f40
--- /dev/null
+++ b/node_modules/lodash/fp/intersectionWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('intersectionWith', require('../intersectionWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invert.js b/node_modules/lodash/fp/invert.js
new file mode 100644
index 0000000..2d5d1f0
--- /dev/null
+++ b/node_modules/lodash/fp/invert.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invert', require('../invert'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invertBy.js b/node_modules/lodash/fp/invertBy.js
new file mode 100644
index 0000000..63ca97e
--- /dev/null
+++ b/node_modules/lodash/fp/invertBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invertBy', require('../invertBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invertObj.js b/node_modules/lodash/fp/invertObj.js
new file mode 100644
index 0000000..f1d842e
--- /dev/null
+++ b/node_modules/lodash/fp/invertObj.js
@@ -0,0 +1 @@
+module.exports = require('./invert');
diff --git a/node_modules/lodash/fp/invoke.js b/node_modules/lodash/fp/invoke.js
new file mode 100644
index 0000000..fcf17f0
--- /dev/null
+++ b/node_modules/lodash/fp/invoke.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invoke', require('../invoke'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invokeArgs.js b/node_modules/lodash/fp/invokeArgs.js
new file mode 100644
index 0000000..d3f2953
--- /dev/null
+++ b/node_modules/lodash/fp/invokeArgs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeArgs', require('../invoke'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invokeArgsMap.js b/node_modules/lodash/fp/invokeArgsMap.js
new file mode 100644
index 0000000..eaa9f84
--- /dev/null
+++ b/node_modules/lodash/fp/invokeArgsMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeArgsMap', require('../invokeMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/invokeMap.js b/node_modules/lodash/fp/invokeMap.js
new file mode 100644
index 0000000..6515fd7
--- /dev/null
+++ b/node_modules/lodash/fp/invokeMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('invokeMap', require('../invokeMap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArguments.js b/node_modules/lodash/fp/isArguments.js
new file mode 100644
index 0000000..1d93c9e
--- /dev/null
+++ b/node_modules/lodash/fp/isArguments.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArguments', require('../isArguments'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArray.js b/node_modules/lodash/fp/isArray.js
new file mode 100644
index 0000000..ba7ade8
--- /dev/null
+++ b/node_modules/lodash/fp/isArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArray', require('../isArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArrayBuffer.js b/node_modules/lodash/fp/isArrayBuffer.js
new file mode 100644
index 0000000..5088513
--- /dev/null
+++ b/node_modules/lodash/fp/isArrayBuffer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArrayLike.js b/node_modules/lodash/fp/isArrayLike.js
new file mode 100644
index 0000000..8f1856b
--- /dev/null
+++ b/node_modules/lodash/fp/isArrayLike.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isArrayLikeObject.js b/node_modules/lodash/fp/isArrayLikeObject.js
new file mode 100644
index 0000000..2108498
--- /dev/null
+++ b/node_modules/lodash/fp/isArrayLikeObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isBoolean.js b/node_modules/lodash/fp/isBoolean.js
new file mode 100644
index 0000000..9339f75
--- /dev/null
+++ b/node_modules/lodash/fp/isBoolean.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isBuffer.js b/node_modules/lodash/fp/isBuffer.js
new file mode 100644
index 0000000..e60b123
--- /dev/null
+++ b/node_modules/lodash/fp/isBuffer.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isDate.js b/node_modules/lodash/fp/isDate.js
new file mode 100644
index 0000000..dc41d08
--- /dev/null
+++ b/node_modules/lodash/fp/isDate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isDate', require('../isDate'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isElement.js b/node_modules/lodash/fp/isElement.js
new file mode 100644
index 0000000..18ee039
--- /dev/null
+++ b/node_modules/lodash/fp/isElement.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isElement', require('../isElement'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isEmpty.js b/node_modules/lodash/fp/isEmpty.js
new file mode 100644
index 0000000..0f4ae84
--- /dev/null
+++ b/node_modules/lodash/fp/isEmpty.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isEqual.js b/node_modules/lodash/fp/isEqual.js
new file mode 100644
index 0000000..4138386
--- /dev/null
+++ b/node_modules/lodash/fp/isEqual.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEqual', require('../isEqual'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isEqualWith.js b/node_modules/lodash/fp/isEqualWith.js
new file mode 100644
index 0000000..029ff5c
--- /dev/null
+++ b/node_modules/lodash/fp/isEqualWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isEqualWith', require('../isEqualWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isError.js b/node_modules/lodash/fp/isError.js
new file mode 100644
index 0000000..3dfd81c
--- /dev/null
+++ b/node_modules/lodash/fp/isError.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isError', require('../isError'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isFinite.js b/node_modules/lodash/fp/isFinite.js
new file mode 100644
index 0000000..0b647b8
--- /dev/null
+++ b/node_modules/lodash/fp/isFinite.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isFinite', require('../isFinite'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isFunction.js b/node_modules/lodash/fp/isFunction.js
new file mode 100644
index 0000000..ff8e5c4
--- /dev/null
+++ b/node_modules/lodash/fp/isFunction.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isFunction', require('../isFunction'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isInteger.js b/node_modules/lodash/fp/isInteger.js
new file mode 100644
index 0000000..67af4ff
--- /dev/null
+++ b/node_modules/lodash/fp/isInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isInteger', require('../isInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isLength.js b/node_modules/lodash/fp/isLength.js
new file mode 100644
index 0000000..fc101c5
--- /dev/null
+++ b/node_modules/lodash/fp/isLength.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isLength', require('../isLength'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isMap.js b/node_modules/lodash/fp/isMap.js
new file mode 100644
index 0000000..a209aa6
--- /dev/null
+++ b/node_modules/lodash/fp/isMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMap', require('../isMap'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isMatch.js b/node_modules/lodash/fp/isMatch.js
new file mode 100644
index 0000000..6264ca1
--- /dev/null
+++ b/node_modules/lodash/fp/isMatch.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMatch', require('../isMatch'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isMatchWith.js b/node_modules/lodash/fp/isMatchWith.js
new file mode 100644
index 0000000..d95f319
--- /dev/null
+++ b/node_modules/lodash/fp/isMatchWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isMatchWith', require('../isMatchWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNaN.js b/node_modules/lodash/fp/isNaN.js
new file mode 100644
index 0000000..66a978f
--- /dev/null
+++ b/node_modules/lodash/fp/isNaN.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNaN', require('../isNaN'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNative.js b/node_modules/lodash/fp/isNative.js
new file mode 100644
index 0000000..3d775ba
--- /dev/null
+++ b/node_modules/lodash/fp/isNative.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNative', require('../isNative'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNil.js b/node_modules/lodash/fp/isNil.js
new file mode 100644
index 0000000..5952c02
--- /dev/null
+++ b/node_modules/lodash/fp/isNil.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNil', require('../isNil'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNull.js b/node_modules/lodash/fp/isNull.js
new file mode 100644
index 0000000..f201a35
--- /dev/null
+++ b/node_modules/lodash/fp/isNull.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNull', require('../isNull'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isNumber.js b/node_modules/lodash/fp/isNumber.js
new file mode 100644
index 0000000..a2b5fa0
--- /dev/null
+++ b/node_modules/lodash/fp/isNumber.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isNumber', require('../isNumber'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isObject.js b/node_modules/lodash/fp/isObject.js
new file mode 100644
index 0000000..231ace0
--- /dev/null
+++ b/node_modules/lodash/fp/isObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isObject', require('../isObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isObjectLike.js b/node_modules/lodash/fp/isObjectLike.js
new file mode 100644
index 0000000..f16082e
--- /dev/null
+++ b/node_modules/lodash/fp/isObjectLike.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isPlainObject.js b/node_modules/lodash/fp/isPlainObject.js
new file mode 100644
index 0000000..b5bea90
--- /dev/null
+++ b/node_modules/lodash/fp/isPlainObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isRegExp.js b/node_modules/lodash/fp/isRegExp.js
new file mode 100644
index 0000000..12a1a3d
--- /dev/null
+++ b/node_modules/lodash/fp/isRegExp.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isSafeInteger.js b/node_modules/lodash/fp/isSafeInteger.js
new file mode 100644
index 0000000..7230f55
--- /dev/null
+++ b/node_modules/lodash/fp/isSafeInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isSet.js b/node_modules/lodash/fp/isSet.js
new file mode 100644
index 0000000..35c01f6
--- /dev/null
+++ b/node_modules/lodash/fp/isSet.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSet', require('../isSet'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isString.js b/node_modules/lodash/fp/isString.js
new file mode 100644
index 0000000..1fd0679
--- /dev/null
+++ b/node_modules/lodash/fp/isString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isString', require('../isString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isSymbol.js b/node_modules/lodash/fp/isSymbol.js
new file mode 100644
index 0000000..3867695
--- /dev/null
+++ b/node_modules/lodash/fp/isSymbol.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isTypedArray.js b/node_modules/lodash/fp/isTypedArray.js
new file mode 100644
index 0000000..8567953
--- /dev/null
+++ b/node_modules/lodash/fp/isTypedArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isUndefined.js b/node_modules/lodash/fp/isUndefined.js
new file mode 100644
index 0000000..ddbca31
--- /dev/null
+++ b/node_modules/lodash/fp/isUndefined.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isWeakMap.js b/node_modules/lodash/fp/isWeakMap.js
new file mode 100644
index 0000000..ef60c61
--- /dev/null
+++ b/node_modules/lodash/fp/isWeakMap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/isWeakSet.js b/node_modules/lodash/fp/isWeakSet.js
new file mode 100644
index 0000000..c99bfaa
--- /dev/null
+++ b/node_modules/lodash/fp/isWeakSet.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/iteratee.js b/node_modules/lodash/fp/iteratee.js
new file mode 100644
index 0000000..9f0f717
--- /dev/null
+++ b/node_modules/lodash/fp/iteratee.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('iteratee', require('../iteratee'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/join.js b/node_modules/lodash/fp/join.js
new file mode 100644
index 0000000..a220e00
--- /dev/null
+++ b/node_modules/lodash/fp/join.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('join', require('../join'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/juxt.js b/node_modules/lodash/fp/juxt.js
new file mode 100644
index 0000000..f71e04e
--- /dev/null
+++ b/node_modules/lodash/fp/juxt.js
@@ -0,0 +1 @@
+module.exports = require('./over');
diff --git a/node_modules/lodash/fp/kebabCase.js b/node_modules/lodash/fp/kebabCase.js
new file mode 100644
index 0000000..60737f1
--- /dev/null
+++ b/node_modules/lodash/fp/kebabCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/keyBy.js b/node_modules/lodash/fp/keyBy.js
new file mode 100644
index 0000000..9a6a85d
--- /dev/null
+++ b/node_modules/lodash/fp/keyBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keyBy', require('../keyBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/keys.js b/node_modules/lodash/fp/keys.js
new file mode 100644
index 0000000..e12bb07
--- /dev/null
+++ b/node_modules/lodash/fp/keys.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keys', require('../keys'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/keysIn.js b/node_modules/lodash/fp/keysIn.js
new file mode 100644
index 0000000..f3eb36a
--- /dev/null
+++ b/node_modules/lodash/fp/keysIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('keysIn', require('../keysIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lang.js b/node_modules/lodash/fp/lang.js
new file mode 100644
index 0000000..08cc9c1
--- /dev/null
+++ b/node_modules/lodash/fp/lang.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../lang'));
diff --git a/node_modules/lodash/fp/last.js b/node_modules/lodash/fp/last.js
new file mode 100644
index 0000000..0f71699
--- /dev/null
+++ b/node_modules/lodash/fp/last.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('last', require('../last'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lastIndexOf.js b/node_modules/lodash/fp/lastIndexOf.js
new file mode 100644
index 0000000..ddf39c3
--- /dev/null
+++ b/node_modules/lodash/fp/lastIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lastIndexOf', require('../lastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/lodash/fp/lastIndexOfFrom.js
new file mode 100644
index 0000000..1ff6a0b
--- /dev/null
+++ b/node_modules/lodash/fp/lastIndexOfFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lastIndexOfFrom', require('../lastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lowerCase.js b/node_modules/lodash/fp/lowerCase.js
new file mode 100644
index 0000000..ea64bc1
--- /dev/null
+++ b/node_modules/lodash/fp/lowerCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lowerFirst.js b/node_modules/lodash/fp/lowerFirst.js
new file mode 100644
index 0000000..539720a
--- /dev/null
+++ b/node_modules/lodash/fp/lowerFirst.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lt.js b/node_modules/lodash/fp/lt.js
new file mode 100644
index 0000000..a31d21e
--- /dev/null
+++ b/node_modules/lodash/fp/lt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lt', require('../lt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/lte.js b/node_modules/lodash/fp/lte.js
new file mode 100644
index 0000000..d795d10
--- /dev/null
+++ b/node_modules/lodash/fp/lte.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('lte', require('../lte'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/map.js b/node_modules/lodash/fp/map.js
new file mode 100644
index 0000000..cf98794
--- /dev/null
+++ b/node_modules/lodash/fp/map.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('map', require('../map'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mapKeys.js b/node_modules/lodash/fp/mapKeys.js
new file mode 100644
index 0000000..1684587
--- /dev/null
+++ b/node_modules/lodash/fp/mapKeys.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mapKeys', require('../mapKeys'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mapValues.js b/node_modules/lodash/fp/mapValues.js
new file mode 100644
index 0000000..4004972
--- /dev/null
+++ b/node_modules/lodash/fp/mapValues.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mapValues', require('../mapValues'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/matches.js b/node_modules/lodash/fp/matches.js
new file mode 100644
index 0000000..29d1e1e
--- /dev/null
+++ b/node_modules/lodash/fp/matches.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/node_modules/lodash/fp/matchesProperty.js b/node_modules/lodash/fp/matchesProperty.js
new file mode 100644
index 0000000..4575bd2
--- /dev/null
+++ b/node_modules/lodash/fp/matchesProperty.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('matchesProperty', require('../matchesProperty'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/math.js b/node_modules/lodash/fp/math.js
new file mode 100644
index 0000000..e8f50f7
--- /dev/null
+++ b/node_modules/lodash/fp/math.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../math'));
diff --git a/node_modules/lodash/fp/max.js b/node_modules/lodash/fp/max.js
new file mode 100644
index 0000000..a66acac
--- /dev/null
+++ b/node_modules/lodash/fp/max.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('max', require('../max'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/maxBy.js b/node_modules/lodash/fp/maxBy.js
new file mode 100644
index 0000000..d083fd6
--- /dev/null
+++ b/node_modules/lodash/fp/maxBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('maxBy', require('../maxBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mean.js b/node_modules/lodash/fp/mean.js
new file mode 100644
index 0000000..3117246
--- /dev/null
+++ b/node_modules/lodash/fp/mean.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mean', require('../mean'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/meanBy.js b/node_modules/lodash/fp/meanBy.js
new file mode 100644
index 0000000..556f25e
--- /dev/null
+++ b/node_modules/lodash/fp/meanBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('meanBy', require('../meanBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/memoize.js b/node_modules/lodash/fp/memoize.js
new file mode 100644
index 0000000..638eec6
--- /dev/null
+++ b/node_modules/lodash/fp/memoize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('memoize', require('../memoize'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/merge.js b/node_modules/lodash/fp/merge.js
new file mode 100644
index 0000000..ac66add
--- /dev/null
+++ b/node_modules/lodash/fp/merge.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('merge', require('../merge'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mergeAll.js b/node_modules/lodash/fp/mergeAll.js
new file mode 100644
index 0000000..a3674d6
--- /dev/null
+++ b/node_modules/lodash/fp/mergeAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeAll', require('../merge'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mergeAllWith.js b/node_modules/lodash/fp/mergeAllWith.js
new file mode 100644
index 0000000..4bd4206
--- /dev/null
+++ b/node_modules/lodash/fp/mergeAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeAllWith', require('../mergeWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mergeWith.js b/node_modules/lodash/fp/mergeWith.js
new file mode 100644
index 0000000..00d44d5
--- /dev/null
+++ b/node_modules/lodash/fp/mergeWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mergeWith', require('../mergeWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/method.js b/node_modules/lodash/fp/method.js
new file mode 100644
index 0000000..f4060c6
--- /dev/null
+++ b/node_modules/lodash/fp/method.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('method', require('../method'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/methodOf.js b/node_modules/lodash/fp/methodOf.js
new file mode 100644
index 0000000..6139905
--- /dev/null
+++ b/node_modules/lodash/fp/methodOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('methodOf', require('../methodOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/min.js b/node_modules/lodash/fp/min.js
new file mode 100644
index 0000000..d12c6b4
--- /dev/null
+++ b/node_modules/lodash/fp/min.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('min', require('../min'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/minBy.js b/node_modules/lodash/fp/minBy.js
new file mode 100644
index 0000000..fdb9e24
--- /dev/null
+++ b/node_modules/lodash/fp/minBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('minBy', require('../minBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/mixin.js b/node_modules/lodash/fp/mixin.js
new file mode 100644
index 0000000..332e6fb
--- /dev/null
+++ b/node_modules/lodash/fp/mixin.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('mixin', require('../mixin'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/multiply.js b/node_modules/lodash/fp/multiply.js
new file mode 100644
index 0000000..4dcf0b0
--- /dev/null
+++ b/node_modules/lodash/fp/multiply.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('multiply', require('../multiply'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/nAry.js b/node_modules/lodash/fp/nAry.js
new file mode 100644
index 0000000..f262a76
--- /dev/null
+++ b/node_modules/lodash/fp/nAry.js
@@ -0,0 +1 @@
+module.exports = require('./ary');
diff --git a/node_modules/lodash/fp/negate.js b/node_modules/lodash/fp/negate.js
new file mode 100644
index 0000000..8b6dc7c
--- /dev/null
+++ b/node_modules/lodash/fp/negate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('negate', require('../negate'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/next.js b/node_modules/lodash/fp/next.js
new file mode 100644
index 0000000..140155e
--- /dev/null
+++ b/node_modules/lodash/fp/next.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('next', require('../next'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/noop.js b/node_modules/lodash/fp/noop.js
new file mode 100644
index 0000000..b9e32cc
--- /dev/null
+++ b/node_modules/lodash/fp/noop.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('noop', require('../noop'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/now.js b/node_modules/lodash/fp/now.js
new file mode 100644
index 0000000..6de2068
--- /dev/null
+++ b/node_modules/lodash/fp/now.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('now', require('../now'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/nth.js b/node_modules/lodash/fp/nth.js
new file mode 100644
index 0000000..da4fda7
--- /dev/null
+++ b/node_modules/lodash/fp/nth.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('nth', require('../nth'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/nthArg.js b/node_modules/lodash/fp/nthArg.js
new file mode 100644
index 0000000..fce3165
--- /dev/null
+++ b/node_modules/lodash/fp/nthArg.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('nthArg', require('../nthArg'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/number.js b/node_modules/lodash/fp/number.js
new file mode 100644
index 0000000..5c10b88
--- /dev/null
+++ b/node_modules/lodash/fp/number.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../number'));
diff --git a/node_modules/lodash/fp/object.js b/node_modules/lodash/fp/object.js
new file mode 100644
index 0000000..ae39a13
--- /dev/null
+++ b/node_modules/lodash/fp/object.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../object'));
diff --git a/node_modules/lodash/fp/omit.js b/node_modules/lodash/fp/omit.js
new file mode 100644
index 0000000..fd68529
--- /dev/null
+++ b/node_modules/lodash/fp/omit.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('omit', require('../omit'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/omitAll.js b/node_modules/lodash/fp/omitAll.js
new file mode 100644
index 0000000..144cf4b
--- /dev/null
+++ b/node_modules/lodash/fp/omitAll.js
@@ -0,0 +1 @@
+module.exports = require('./omit');
diff --git a/node_modules/lodash/fp/omitBy.js b/node_modules/lodash/fp/omitBy.js
new file mode 100644
index 0000000..90df738
--- /dev/null
+++ b/node_modules/lodash/fp/omitBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('omitBy', require('../omitBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/once.js b/node_modules/lodash/fp/once.js
new file mode 100644
index 0000000..f8f0a5c
--- /dev/null
+++ b/node_modules/lodash/fp/once.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('once', require('../once'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/orderBy.js b/node_modules/lodash/fp/orderBy.js
new file mode 100644
index 0000000..848e210
--- /dev/null
+++ b/node_modules/lodash/fp/orderBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('orderBy', require('../orderBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/over.js b/node_modules/lodash/fp/over.js
new file mode 100644
index 0000000..01eba7b
--- /dev/null
+++ b/node_modules/lodash/fp/over.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('over', require('../over'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/overArgs.js b/node_modules/lodash/fp/overArgs.js
new file mode 100644
index 0000000..738556f
--- /dev/null
+++ b/node_modules/lodash/fp/overArgs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overArgs', require('../overArgs'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/overEvery.js b/node_modules/lodash/fp/overEvery.js
new file mode 100644
index 0000000..9f5a032
--- /dev/null
+++ b/node_modules/lodash/fp/overEvery.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overEvery', require('../overEvery'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/overSome.js b/node_modules/lodash/fp/overSome.js
new file mode 100644
index 0000000..15939d5
--- /dev/null
+++ b/node_modules/lodash/fp/overSome.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('overSome', require('../overSome'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pad.js b/node_modules/lodash/fp/pad.js
new file mode 100644
index 0000000..f1dea4a
--- /dev/null
+++ b/node_modules/lodash/fp/pad.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pad', require('../pad'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padChars.js b/node_modules/lodash/fp/padChars.js
new file mode 100644
index 0000000..d6e0804
--- /dev/null
+++ b/node_modules/lodash/fp/padChars.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padChars', require('../pad'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padCharsEnd.js b/node_modules/lodash/fp/padCharsEnd.js
new file mode 100644
index 0000000..d4ab79a
--- /dev/null
+++ b/node_modules/lodash/fp/padCharsEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padCharsEnd', require('../padEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padCharsStart.js b/node_modules/lodash/fp/padCharsStart.js
new file mode 100644
index 0000000..a08a300
--- /dev/null
+++ b/node_modules/lodash/fp/padCharsStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padCharsStart', require('../padStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padEnd.js b/node_modules/lodash/fp/padEnd.js
new file mode 100644
index 0000000..a8522ec
--- /dev/null
+++ b/node_modules/lodash/fp/padEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padEnd', require('../padEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/padStart.js b/node_modules/lodash/fp/padStart.js
new file mode 100644
index 0000000..f4ca79d
--- /dev/null
+++ b/node_modules/lodash/fp/padStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('padStart', require('../padStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/parseInt.js b/node_modules/lodash/fp/parseInt.js
new file mode 100644
index 0000000..27314cc
--- /dev/null
+++ b/node_modules/lodash/fp/parseInt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('parseInt', require('../parseInt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/partial.js b/node_modules/lodash/fp/partial.js
new file mode 100644
index 0000000..5d46015
--- /dev/null
+++ b/node_modules/lodash/fp/partial.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partial', require('../partial'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/partialRight.js b/node_modules/lodash/fp/partialRight.js
new file mode 100644
index 0000000..7f05fed
--- /dev/null
+++ b/node_modules/lodash/fp/partialRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partialRight', require('../partialRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/partition.js b/node_modules/lodash/fp/partition.js
new file mode 100644
index 0000000..2ebcacc
--- /dev/null
+++ b/node_modules/lodash/fp/partition.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('partition', require('../partition'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/path.js b/node_modules/lodash/fp/path.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/node_modules/lodash/fp/path.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/node_modules/lodash/fp/pathEq.js b/node_modules/lodash/fp/pathEq.js
new file mode 100644
index 0000000..36c027a
--- /dev/null
+++ b/node_modules/lodash/fp/pathEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/node_modules/lodash/fp/pathOr.js b/node_modules/lodash/fp/pathOr.js
new file mode 100644
index 0000000..4ab5820
--- /dev/null
+++ b/node_modules/lodash/fp/pathOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/node_modules/lodash/fp/paths.js b/node_modules/lodash/fp/paths.js
new file mode 100644
index 0000000..1eb7950
--- /dev/null
+++ b/node_modules/lodash/fp/paths.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/node_modules/lodash/fp/pick.js b/node_modules/lodash/fp/pick.js
new file mode 100644
index 0000000..197393d
--- /dev/null
+++ b/node_modules/lodash/fp/pick.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pick', require('../pick'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pickAll.js b/node_modules/lodash/fp/pickAll.js
new file mode 100644
index 0000000..a8ecd46
--- /dev/null
+++ b/node_modules/lodash/fp/pickAll.js
@@ -0,0 +1 @@
+module.exports = require('./pick');
diff --git a/node_modules/lodash/fp/pickBy.js b/node_modules/lodash/fp/pickBy.js
new file mode 100644
index 0000000..d832d16
--- /dev/null
+++ b/node_modules/lodash/fp/pickBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pickBy', require('../pickBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pipe.js b/node_modules/lodash/fp/pipe.js
new file mode 100644
index 0000000..b2e1e2c
--- /dev/null
+++ b/node_modules/lodash/fp/pipe.js
@@ -0,0 +1 @@
+module.exports = require('./flow');
diff --git a/node_modules/lodash/fp/placeholder.js b/node_modules/lodash/fp/placeholder.js
new file mode 100644
index 0000000..1ce1739
--- /dev/null
+++ b/node_modules/lodash/fp/placeholder.js
@@ -0,0 +1,6 @@
+/**
+ * The default argument placeholder value for methods.
+ *
+ * @type {Object}
+ */
+module.exports = {};
diff --git a/node_modules/lodash/fp/plant.js b/node_modules/lodash/fp/plant.js
new file mode 100644
index 0000000..eca8f32
--- /dev/null
+++ b/node_modules/lodash/fp/plant.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('plant', require('../plant'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pluck.js b/node_modules/lodash/fp/pluck.js
new file mode 100644
index 0000000..0d1e1ab
--- /dev/null
+++ b/node_modules/lodash/fp/pluck.js
@@ -0,0 +1 @@
+module.exports = require('./map');
diff --git a/node_modules/lodash/fp/prop.js b/node_modules/lodash/fp/prop.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/node_modules/lodash/fp/prop.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/node_modules/lodash/fp/propEq.js b/node_modules/lodash/fp/propEq.js
new file mode 100644
index 0000000..36c027a
--- /dev/null
+++ b/node_modules/lodash/fp/propEq.js
@@ -0,0 +1 @@
+module.exports = require('./matchesProperty');
diff --git a/node_modules/lodash/fp/propOr.js b/node_modules/lodash/fp/propOr.js
new file mode 100644
index 0000000..4ab5820
--- /dev/null
+++ b/node_modules/lodash/fp/propOr.js
@@ -0,0 +1 @@
+module.exports = require('./getOr');
diff --git a/node_modules/lodash/fp/property.js b/node_modules/lodash/fp/property.js
new file mode 100644
index 0000000..b29cfb2
--- /dev/null
+++ b/node_modules/lodash/fp/property.js
@@ -0,0 +1 @@
+module.exports = require('./get');
diff --git a/node_modules/lodash/fp/propertyOf.js b/node_modules/lodash/fp/propertyOf.js
new file mode 100644
index 0000000..f6273ee
--- /dev/null
+++ b/node_modules/lodash/fp/propertyOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('propertyOf', require('../get'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/props.js b/node_modules/lodash/fp/props.js
new file mode 100644
index 0000000..1eb7950
--- /dev/null
+++ b/node_modules/lodash/fp/props.js
@@ -0,0 +1 @@
+module.exports = require('./at');
diff --git a/node_modules/lodash/fp/pull.js b/node_modules/lodash/fp/pull.js
new file mode 100644
index 0000000..8d7084f
--- /dev/null
+++ b/node_modules/lodash/fp/pull.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pull', require('../pull'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAll.js b/node_modules/lodash/fp/pullAll.js
new file mode 100644
index 0000000..98d5c9a
--- /dev/null
+++ b/node_modules/lodash/fp/pullAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAll', require('../pullAll'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAllBy.js b/node_modules/lodash/fp/pullAllBy.js
new file mode 100644
index 0000000..876bc3b
--- /dev/null
+++ b/node_modules/lodash/fp/pullAllBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAllBy', require('../pullAllBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAllWith.js b/node_modules/lodash/fp/pullAllWith.js
new file mode 100644
index 0000000..f71ba4d
--- /dev/null
+++ b/node_modules/lodash/fp/pullAllWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAllWith', require('../pullAllWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/pullAt.js b/node_modules/lodash/fp/pullAt.js
new file mode 100644
index 0000000..e8b3bb6
--- /dev/null
+++ b/node_modules/lodash/fp/pullAt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('pullAt', require('../pullAt'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/random.js b/node_modules/lodash/fp/random.js
new file mode 100644
index 0000000..99d852e
--- /dev/null
+++ b/node_modules/lodash/fp/random.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('random', require('../random'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/range.js b/node_modules/lodash/fp/range.js
new file mode 100644
index 0000000..a6bb591
--- /dev/null
+++ b/node_modules/lodash/fp/range.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('range', require('../range'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rangeRight.js b/node_modules/lodash/fp/rangeRight.js
new file mode 100644
index 0000000..fdb712f
--- /dev/null
+++ b/node_modules/lodash/fp/rangeRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeRight', require('../rangeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rangeStep.js b/node_modules/lodash/fp/rangeStep.js
new file mode 100644
index 0000000..d72dfc2
--- /dev/null
+++ b/node_modules/lodash/fp/rangeStep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStep', require('../range'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rangeStepRight.js b/node_modules/lodash/fp/rangeStepRight.js
new file mode 100644
index 0000000..8b2a67b
--- /dev/null
+++ b/node_modules/lodash/fp/rangeStepRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rangeStepRight', require('../rangeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rearg.js b/node_modules/lodash/fp/rearg.js
new file mode 100644
index 0000000..678e02a
--- /dev/null
+++ b/node_modules/lodash/fp/rearg.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rearg', require('../rearg'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reduce.js b/node_modules/lodash/fp/reduce.js
new file mode 100644
index 0000000..4cef0a0
--- /dev/null
+++ b/node_modules/lodash/fp/reduce.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reduce', require('../reduce'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reduceRight.js b/node_modules/lodash/fp/reduceRight.js
new file mode 100644
index 0000000..caf5bb5
--- /dev/null
+++ b/node_modules/lodash/fp/reduceRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reduceRight', require('../reduceRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reject.js b/node_modules/lodash/fp/reject.js
new file mode 100644
index 0000000..c163273
--- /dev/null
+++ b/node_modules/lodash/fp/reject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reject', require('../reject'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/remove.js b/node_modules/lodash/fp/remove.js
new file mode 100644
index 0000000..e9d1327
--- /dev/null
+++ b/node_modules/lodash/fp/remove.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('remove', require('../remove'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/repeat.js b/node_modules/lodash/fp/repeat.js
new file mode 100644
index 0000000..08470f2
--- /dev/null
+++ b/node_modules/lodash/fp/repeat.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('repeat', require('../repeat'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/replace.js b/node_modules/lodash/fp/replace.js
new file mode 100644
index 0000000..2227db6
--- /dev/null
+++ b/node_modules/lodash/fp/replace.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('replace', require('../replace'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/rest.js b/node_modules/lodash/fp/rest.js
new file mode 100644
index 0000000..c1f3d64
--- /dev/null
+++ b/node_modules/lodash/fp/rest.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('rest', require('../rest'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/restFrom.js b/node_modules/lodash/fp/restFrom.js
new file mode 100644
index 0000000..714e42b
--- /dev/null
+++ b/node_modules/lodash/fp/restFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('restFrom', require('../rest'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/result.js b/node_modules/lodash/fp/result.js
new file mode 100644
index 0000000..f86ce07
--- /dev/null
+++ b/node_modules/lodash/fp/result.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('result', require('../result'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/reverse.js b/node_modules/lodash/fp/reverse.js
new file mode 100644
index 0000000..07c9f5e
--- /dev/null
+++ b/node_modules/lodash/fp/reverse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('reverse', require('../reverse'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/round.js b/node_modules/lodash/fp/round.js
new file mode 100644
index 0000000..4c0e5c8
--- /dev/null
+++ b/node_modules/lodash/fp/round.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('round', require('../round'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sample.js b/node_modules/lodash/fp/sample.js
new file mode 100644
index 0000000..6bea125
--- /dev/null
+++ b/node_modules/lodash/fp/sample.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sample', require('../sample'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sampleSize.js b/node_modules/lodash/fp/sampleSize.js
new file mode 100644
index 0000000..359ed6f
--- /dev/null
+++ b/node_modules/lodash/fp/sampleSize.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sampleSize', require('../sampleSize'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/seq.js b/node_modules/lodash/fp/seq.js
new file mode 100644
index 0000000..d8f42b0
--- /dev/null
+++ b/node_modules/lodash/fp/seq.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../seq'));
diff --git a/node_modules/lodash/fp/set.js b/node_modules/lodash/fp/set.js
new file mode 100644
index 0000000..0b56a56
--- /dev/null
+++ b/node_modules/lodash/fp/set.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('set', require('../set'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/setWith.js b/node_modules/lodash/fp/setWith.js
new file mode 100644
index 0000000..0b58495
--- /dev/null
+++ b/node_modules/lodash/fp/setWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('setWith', require('../setWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/shuffle.js b/node_modules/lodash/fp/shuffle.js
new file mode 100644
index 0000000..aa3a1ca
--- /dev/null
+++ b/node_modules/lodash/fp/shuffle.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('shuffle', require('../shuffle'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/size.js b/node_modules/lodash/fp/size.js
new file mode 100644
index 0000000..7490136
--- /dev/null
+++ b/node_modules/lodash/fp/size.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('size', require('../size'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/slice.js b/node_modules/lodash/fp/slice.js
new file mode 100644
index 0000000..15945d3
--- /dev/null
+++ b/node_modules/lodash/fp/slice.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('slice', require('../slice'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/snakeCase.js b/node_modules/lodash/fp/snakeCase.js
new file mode 100644
index 0000000..a0ff780
--- /dev/null
+++ b/node_modules/lodash/fp/snakeCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/some.js b/node_modules/lodash/fp/some.js
new file mode 100644
index 0000000..a4fa2d0
--- /dev/null
+++ b/node_modules/lodash/fp/some.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('some', require('../some'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortBy.js b/node_modules/lodash/fp/sortBy.js
new file mode 100644
index 0000000..e0790ad
--- /dev/null
+++ b/node_modules/lodash/fp/sortBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortBy', require('../sortBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedIndex.js b/node_modules/lodash/fp/sortedIndex.js
new file mode 100644
index 0000000..364a054
--- /dev/null
+++ b/node_modules/lodash/fp/sortedIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndex', require('../sortedIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedIndexBy.js b/node_modules/lodash/fp/sortedIndexBy.js
new file mode 100644
index 0000000..9593dbd
--- /dev/null
+++ b/node_modules/lodash/fp/sortedIndexBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndexBy', require('../sortedIndexBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedIndexOf.js b/node_modules/lodash/fp/sortedIndexOf.js
new file mode 100644
index 0000000..c9084ca
--- /dev/null
+++ b/node_modules/lodash/fp/sortedIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedIndexOf', require('../sortedIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedLastIndex.js b/node_modules/lodash/fp/sortedLastIndex.js
new file mode 100644
index 0000000..47fe241
--- /dev/null
+++ b/node_modules/lodash/fp/sortedLastIndex.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndex', require('../sortedLastIndex'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedLastIndexBy.js b/node_modules/lodash/fp/sortedLastIndexBy.js
new file mode 100644
index 0000000..0f9a347
--- /dev/null
+++ b/node_modules/lodash/fp/sortedLastIndexBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndexBy', require('../sortedLastIndexBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedLastIndexOf.js b/node_modules/lodash/fp/sortedLastIndexOf.js
new file mode 100644
index 0000000..0d4d932
--- /dev/null
+++ b/node_modules/lodash/fp/sortedLastIndexOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedLastIndexOf', require('../sortedLastIndexOf'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedUniq.js b/node_modules/lodash/fp/sortedUniq.js
new file mode 100644
index 0000000..882d283
--- /dev/null
+++ b/node_modules/lodash/fp/sortedUniq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sortedUniqBy.js b/node_modules/lodash/fp/sortedUniqBy.js
new file mode 100644
index 0000000..033db91
--- /dev/null
+++ b/node_modules/lodash/fp/sortedUniqBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sortedUniqBy', require('../sortedUniqBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/split.js b/node_modules/lodash/fp/split.js
new file mode 100644
index 0000000..14de1a7
--- /dev/null
+++ b/node_modules/lodash/fp/split.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('split', require('../split'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/spread.js b/node_modules/lodash/fp/spread.js
new file mode 100644
index 0000000..2d11b70
--- /dev/null
+++ b/node_modules/lodash/fp/spread.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('spread', require('../spread'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/spreadFrom.js b/node_modules/lodash/fp/spreadFrom.js
new file mode 100644
index 0000000..0b630df
--- /dev/null
+++ b/node_modules/lodash/fp/spreadFrom.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('spreadFrom', require('../spread'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/startCase.js b/node_modules/lodash/fp/startCase.js
new file mode 100644
index 0000000..ada98c9
--- /dev/null
+++ b/node_modules/lodash/fp/startCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('startCase', require('../startCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/startsWith.js b/node_modules/lodash/fp/startsWith.js
new file mode 100644
index 0000000..985e2f2
--- /dev/null
+++ b/node_modules/lodash/fp/startsWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('startsWith', require('../startsWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/string.js b/node_modules/lodash/fp/string.js
new file mode 100644
index 0000000..773b037
--- /dev/null
+++ b/node_modules/lodash/fp/string.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../string'));
diff --git a/node_modules/lodash/fp/stubArray.js b/node_modules/lodash/fp/stubArray.js
new file mode 100644
index 0000000..cd604cb
--- /dev/null
+++ b/node_modules/lodash/fp/stubArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubArray', require('../stubArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubFalse.js b/node_modules/lodash/fp/stubFalse.js
new file mode 100644
index 0000000..3296664
--- /dev/null
+++ b/node_modules/lodash/fp/stubFalse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubObject.js b/node_modules/lodash/fp/stubObject.js
new file mode 100644
index 0000000..c6c8ec4
--- /dev/null
+++ b/node_modules/lodash/fp/stubObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubObject', require('../stubObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubString.js b/node_modules/lodash/fp/stubString.js
new file mode 100644
index 0000000..701051e
--- /dev/null
+++ b/node_modules/lodash/fp/stubString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubString', require('../stubString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/stubTrue.js b/node_modules/lodash/fp/stubTrue.js
new file mode 100644
index 0000000..9249082
--- /dev/null
+++ b/node_modules/lodash/fp/stubTrue.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/subtract.js b/node_modules/lodash/fp/subtract.js
new file mode 100644
index 0000000..d32b16d
--- /dev/null
+++ b/node_modules/lodash/fp/subtract.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('subtract', require('../subtract'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sum.js b/node_modules/lodash/fp/sum.js
new file mode 100644
index 0000000..5cce12b
--- /dev/null
+++ b/node_modules/lodash/fp/sum.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sum', require('../sum'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/sumBy.js b/node_modules/lodash/fp/sumBy.js
new file mode 100644
index 0000000..c882656
--- /dev/null
+++ b/node_modules/lodash/fp/sumBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('sumBy', require('../sumBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/symmetricDifference.js b/node_modules/lodash/fp/symmetricDifference.js
new file mode 100644
index 0000000..78c16ad
--- /dev/null
+++ b/node_modules/lodash/fp/symmetricDifference.js
@@ -0,0 +1 @@
+module.exports = require('./xor');
diff --git a/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/lodash/fp/symmetricDifferenceBy.js
new file mode 100644
index 0000000..298fc7f
--- /dev/null
+++ b/node_modules/lodash/fp/symmetricDifferenceBy.js
@@ -0,0 +1 @@
+module.exports = require('./xorBy');
diff --git a/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/lodash/fp/symmetricDifferenceWith.js
new file mode 100644
index 0000000..70bc6fa
--- /dev/null
+++ b/node_modules/lodash/fp/symmetricDifferenceWith.js
@@ -0,0 +1 @@
+module.exports = require('./xorWith');
diff --git a/node_modules/lodash/fp/tail.js b/node_modules/lodash/fp/tail.js
new file mode 100644
index 0000000..f122f0a
--- /dev/null
+++ b/node_modules/lodash/fp/tail.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('tail', require('../tail'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/take.js b/node_modules/lodash/fp/take.js
new file mode 100644
index 0000000..9af98a7
--- /dev/null
+++ b/node_modules/lodash/fp/take.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('take', require('../take'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/takeLast.js b/node_modules/lodash/fp/takeLast.js
new file mode 100644
index 0000000..e98c84a
--- /dev/null
+++ b/node_modules/lodash/fp/takeLast.js
@@ -0,0 +1 @@
+module.exports = require('./takeRight');
diff --git a/node_modules/lodash/fp/takeLastWhile.js b/node_modules/lodash/fp/takeLastWhile.js
new file mode 100644
index 0000000..5367968
--- /dev/null
+++ b/node_modules/lodash/fp/takeLastWhile.js
@@ -0,0 +1 @@
+module.exports = require('./takeRightWhile');
diff --git a/node_modules/lodash/fp/takeRight.js b/node_modules/lodash/fp/takeRight.js
new file mode 100644
index 0000000..b82950a
--- /dev/null
+++ b/node_modules/lodash/fp/takeRight.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeRight', require('../takeRight'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/takeRightWhile.js b/node_modules/lodash/fp/takeRightWhile.js
new file mode 100644
index 0000000..8ffb0a2
--- /dev/null
+++ b/node_modules/lodash/fp/takeRightWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeRightWhile', require('../takeRightWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/takeWhile.js b/node_modules/lodash/fp/takeWhile.js
new file mode 100644
index 0000000..2813664
--- /dev/null
+++ b/node_modules/lodash/fp/takeWhile.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('takeWhile', require('../takeWhile'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/tap.js b/node_modules/lodash/fp/tap.js
new file mode 100644
index 0000000..d33ad6e
--- /dev/null
+++ b/node_modules/lodash/fp/tap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('tap', require('../tap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/template.js b/node_modules/lodash/fp/template.js
new file mode 100644
index 0000000..74857e1
--- /dev/null
+++ b/node_modules/lodash/fp/template.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('template', require('../template'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/templateSettings.js b/node_modules/lodash/fp/templateSettings.js
new file mode 100644
index 0000000..7bcc0a8
--- /dev/null
+++ b/node_modules/lodash/fp/templateSettings.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/throttle.js b/node_modules/lodash/fp/throttle.js
new file mode 100644
index 0000000..77fff14
--- /dev/null
+++ b/node_modules/lodash/fp/throttle.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('throttle', require('../throttle'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/thru.js b/node_modules/lodash/fp/thru.js
new file mode 100644
index 0000000..d42b3b1
--- /dev/null
+++ b/node_modules/lodash/fp/thru.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('thru', require('../thru'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/times.js b/node_modules/lodash/fp/times.js
new file mode 100644
index 0000000..0dab06d
--- /dev/null
+++ b/node_modules/lodash/fp/times.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('times', require('../times'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toArray.js b/node_modules/lodash/fp/toArray.js
new file mode 100644
index 0000000..f0c360a
--- /dev/null
+++ b/node_modules/lodash/fp/toArray.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toArray', require('../toArray'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toFinite.js b/node_modules/lodash/fp/toFinite.js
new file mode 100644
index 0000000..3a47687
--- /dev/null
+++ b/node_modules/lodash/fp/toFinite.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toFinite', require('../toFinite'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toInteger.js b/node_modules/lodash/fp/toInteger.js
new file mode 100644
index 0000000..e0af6a7
--- /dev/null
+++ b/node_modules/lodash/fp/toInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toInteger', require('../toInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toIterator.js b/node_modules/lodash/fp/toIterator.js
new file mode 100644
index 0000000..65e6baa
--- /dev/null
+++ b/node_modules/lodash/fp/toIterator.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toIterator', require('../toIterator'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toJSON.js b/node_modules/lodash/fp/toJSON.js
new file mode 100644
index 0000000..2d718d0
--- /dev/null
+++ b/node_modules/lodash/fp/toJSON.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toJSON', require('../toJSON'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toLength.js b/node_modules/lodash/fp/toLength.js
new file mode 100644
index 0000000..b97cdd9
--- /dev/null
+++ b/node_modules/lodash/fp/toLength.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toLength', require('../toLength'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toLower.js b/node_modules/lodash/fp/toLower.js
new file mode 100644
index 0000000..616ef36
--- /dev/null
+++ b/node_modules/lodash/fp/toLower.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toLower', require('../toLower'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toNumber.js b/node_modules/lodash/fp/toNumber.js
new file mode 100644
index 0000000..d0c6f4d
--- /dev/null
+++ b/node_modules/lodash/fp/toNumber.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toNumber', require('../toNumber'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPairs.js b/node_modules/lodash/fp/toPairs.js
new file mode 100644
index 0000000..af78378
--- /dev/null
+++ b/node_modules/lodash/fp/toPairs.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPairs', require('../toPairs'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPairsIn.js b/node_modules/lodash/fp/toPairsIn.js
new file mode 100644
index 0000000..66504ab
--- /dev/null
+++ b/node_modules/lodash/fp/toPairsIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPath.js b/node_modules/lodash/fp/toPath.js
new file mode 100644
index 0000000..b4d5e50
--- /dev/null
+++ b/node_modules/lodash/fp/toPath.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPath', require('../toPath'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toPlainObject.js b/node_modules/lodash/fp/toPlainObject.js
new file mode 100644
index 0000000..278bb86
--- /dev/null
+++ b/node_modules/lodash/fp/toPlainObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toSafeInteger.js b/node_modules/lodash/fp/toSafeInteger.js
new file mode 100644
index 0000000..367a26f
--- /dev/null
+++ b/node_modules/lodash/fp/toSafeInteger.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toString.js b/node_modules/lodash/fp/toString.js
new file mode 100644
index 0000000..cec4f8e
--- /dev/null
+++ b/node_modules/lodash/fp/toString.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toString', require('../toString'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/toUpper.js b/node_modules/lodash/fp/toUpper.js
new file mode 100644
index 0000000..54f9a56
--- /dev/null
+++ b/node_modules/lodash/fp/toUpper.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('toUpper', require('../toUpper'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/transform.js b/node_modules/lodash/fp/transform.js
new file mode 100644
index 0000000..759d088
--- /dev/null
+++ b/node_modules/lodash/fp/transform.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('transform', require('../transform'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trim.js b/node_modules/lodash/fp/trim.js
new file mode 100644
index 0000000..e6319a7
--- /dev/null
+++ b/node_modules/lodash/fp/trim.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trim', require('../trim'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimChars.js b/node_modules/lodash/fp/trimChars.js
new file mode 100644
index 0000000..c9294de
--- /dev/null
+++ b/node_modules/lodash/fp/trimChars.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimChars', require('../trim'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimCharsEnd.js b/node_modules/lodash/fp/trimCharsEnd.js
new file mode 100644
index 0000000..284bc2f
--- /dev/null
+++ b/node_modules/lodash/fp/trimCharsEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimCharsEnd', require('../trimEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimCharsStart.js b/node_modules/lodash/fp/trimCharsStart.js
new file mode 100644
index 0000000..ff0ee65
--- /dev/null
+++ b/node_modules/lodash/fp/trimCharsStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimCharsStart', require('../trimStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimEnd.js b/node_modules/lodash/fp/trimEnd.js
new file mode 100644
index 0000000..7190880
--- /dev/null
+++ b/node_modules/lodash/fp/trimEnd.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimEnd', require('../trimEnd'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/trimStart.js b/node_modules/lodash/fp/trimStart.js
new file mode 100644
index 0000000..fda902c
--- /dev/null
+++ b/node_modules/lodash/fp/trimStart.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('trimStart', require('../trimStart'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/truncate.js b/node_modules/lodash/fp/truncate.js
new file mode 100644
index 0000000..d265c1d
--- /dev/null
+++ b/node_modules/lodash/fp/truncate.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('truncate', require('../truncate'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unapply.js b/node_modules/lodash/fp/unapply.js
new file mode 100644
index 0000000..c5dfe77
--- /dev/null
+++ b/node_modules/lodash/fp/unapply.js
@@ -0,0 +1 @@
+module.exports = require('./rest');
diff --git a/node_modules/lodash/fp/unary.js b/node_modules/lodash/fp/unary.js
new file mode 100644
index 0000000..286c945
--- /dev/null
+++ b/node_modules/lodash/fp/unary.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unary', require('../unary'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unescape.js b/node_modules/lodash/fp/unescape.js
new file mode 100644
index 0000000..fddcb46
--- /dev/null
+++ b/node_modules/lodash/fp/unescape.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unescape', require('../unescape'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/union.js b/node_modules/lodash/fp/union.js
new file mode 100644
index 0000000..ef8228d
--- /dev/null
+++ b/node_modules/lodash/fp/union.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('union', require('../union'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unionBy.js b/node_modules/lodash/fp/unionBy.js
new file mode 100644
index 0000000..603687a
--- /dev/null
+++ b/node_modules/lodash/fp/unionBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unionBy', require('../unionBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unionWith.js b/node_modules/lodash/fp/unionWith.js
new file mode 100644
index 0000000..65bb3a7
--- /dev/null
+++ b/node_modules/lodash/fp/unionWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unionWith', require('../unionWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniq.js b/node_modules/lodash/fp/uniq.js
new file mode 100644
index 0000000..bc18524
--- /dev/null
+++ b/node_modules/lodash/fp/uniq.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniq', require('../uniq'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniqBy.js b/node_modules/lodash/fp/uniqBy.js
new file mode 100644
index 0000000..634c6a8
--- /dev/null
+++ b/node_modules/lodash/fp/uniqBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqBy', require('../uniqBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniqWith.js b/node_modules/lodash/fp/uniqWith.js
new file mode 100644
index 0000000..0ec601a
--- /dev/null
+++ b/node_modules/lodash/fp/uniqWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqWith', require('../uniqWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/uniqueId.js b/node_modules/lodash/fp/uniqueId.js
new file mode 100644
index 0000000..aa8fc2f
--- /dev/null
+++ b/node_modules/lodash/fp/uniqueId.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('uniqueId', require('../uniqueId'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unnest.js b/node_modules/lodash/fp/unnest.js
new file mode 100644
index 0000000..5d34060
--- /dev/null
+++ b/node_modules/lodash/fp/unnest.js
@@ -0,0 +1 @@
+module.exports = require('./flatten');
diff --git a/node_modules/lodash/fp/unset.js b/node_modules/lodash/fp/unset.js
new file mode 100644
index 0000000..ea203a0
--- /dev/null
+++ b/node_modules/lodash/fp/unset.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unset', require('../unset'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unzip.js b/node_modules/lodash/fp/unzip.js
new file mode 100644
index 0000000..cc364b3
--- /dev/null
+++ b/node_modules/lodash/fp/unzip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unzip', require('../unzip'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/unzipWith.js b/node_modules/lodash/fp/unzipWith.js
new file mode 100644
index 0000000..182eaa1
--- /dev/null
+++ b/node_modules/lodash/fp/unzipWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('unzipWith', require('../unzipWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/update.js b/node_modules/lodash/fp/update.js
new file mode 100644
index 0000000..b8ce2cc
--- /dev/null
+++ b/node_modules/lodash/fp/update.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('update', require('../update'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/updateWith.js b/node_modules/lodash/fp/updateWith.js
new file mode 100644
index 0000000..d5e8282
--- /dev/null
+++ b/node_modules/lodash/fp/updateWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('updateWith', require('../updateWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/upperCase.js b/node_modules/lodash/fp/upperCase.js
new file mode 100644
index 0000000..c886f20
--- /dev/null
+++ b/node_modules/lodash/fp/upperCase.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('upperCase', require('../upperCase'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/upperFirst.js b/node_modules/lodash/fp/upperFirst.js
new file mode 100644
index 0000000..d8c04df
--- /dev/null
+++ b/node_modules/lodash/fp/upperFirst.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/useWith.js b/node_modules/lodash/fp/useWith.js
new file mode 100644
index 0000000..d8b3df5
--- /dev/null
+++ b/node_modules/lodash/fp/useWith.js
@@ -0,0 +1 @@
+module.exports = require('./overArgs');
diff --git a/node_modules/lodash/fp/util.js b/node_modules/lodash/fp/util.js
new file mode 100644
index 0000000..18c00ba
--- /dev/null
+++ b/node_modules/lodash/fp/util.js
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../util'));
diff --git a/node_modules/lodash/fp/value.js b/node_modules/lodash/fp/value.js
new file mode 100644
index 0000000..555eec7
--- /dev/null
+++ b/node_modules/lodash/fp/value.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('value', require('../value'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/valueOf.js b/node_modules/lodash/fp/valueOf.js
new file mode 100644
index 0000000..f968807
--- /dev/null
+++ b/node_modules/lodash/fp/valueOf.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('valueOf', require('../valueOf'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/values.js b/node_modules/lodash/fp/values.js
new file mode 100644
index 0000000..2dfc561
--- /dev/null
+++ b/node_modules/lodash/fp/values.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('values', require('../values'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/valuesIn.js b/node_modules/lodash/fp/valuesIn.js
new file mode 100644
index 0000000..a1b2bb8
--- /dev/null
+++ b/node_modules/lodash/fp/valuesIn.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/where.js b/node_modules/lodash/fp/where.js
new file mode 100644
index 0000000..3247f64
--- /dev/null
+++ b/node_modules/lodash/fp/where.js
@@ -0,0 +1 @@
+module.exports = require('./conformsTo');
diff --git a/node_modules/lodash/fp/whereEq.js b/node_modules/lodash/fp/whereEq.js
new file mode 100644
index 0000000..29d1e1e
--- /dev/null
+++ b/node_modules/lodash/fp/whereEq.js
@@ -0,0 +1 @@
+module.exports = require('./isMatch');
diff --git a/node_modules/lodash/fp/without.js b/node_modules/lodash/fp/without.js
new file mode 100644
index 0000000..bad9e12
--- /dev/null
+++ b/node_modules/lodash/fp/without.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('without', require('../without'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/words.js b/node_modules/lodash/fp/words.js
new file mode 100644
index 0000000..4a90141
--- /dev/null
+++ b/node_modules/lodash/fp/words.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('words', require('../words'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrap.js b/node_modules/lodash/fp/wrap.js
new file mode 100644
index 0000000..e93bd8a
--- /dev/null
+++ b/node_modules/lodash/fp/wrap.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrap', require('../wrap'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperAt.js b/node_modules/lodash/fp/wrapperAt.js
new file mode 100644
index 0000000..8f0a310
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperAt.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperChain.js b/node_modules/lodash/fp/wrapperChain.js
new file mode 100644
index 0000000..2a48ea2
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperChain.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperLodash.js b/node_modules/lodash/fp/wrapperLodash.js
new file mode 100644
index 0000000..a7162d0
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperLodash.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperReverse.js b/node_modules/lodash/fp/wrapperReverse.js
new file mode 100644
index 0000000..e1481aa
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperReverse.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/wrapperValue.js b/node_modules/lodash/fp/wrapperValue.js
new file mode 100644
index 0000000..8eb9112
--- /dev/null
+++ b/node_modules/lodash/fp/wrapperValue.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/xor.js b/node_modules/lodash/fp/xor.js
new file mode 100644
index 0000000..29e2819
--- /dev/null
+++ b/node_modules/lodash/fp/xor.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xor', require('../xor'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/xorBy.js b/node_modules/lodash/fp/xorBy.js
new file mode 100644
index 0000000..b355686
--- /dev/null
+++ b/node_modules/lodash/fp/xorBy.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xorBy', require('../xorBy'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/xorWith.js b/node_modules/lodash/fp/xorWith.js
new file mode 100644
index 0000000..8e05739
--- /dev/null
+++ b/node_modules/lodash/fp/xorWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('xorWith', require('../xorWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zip.js b/node_modules/lodash/fp/zip.js
new file mode 100644
index 0000000..69e147a
--- /dev/null
+++ b/node_modules/lodash/fp/zip.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zip', require('../zip'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipAll.js b/node_modules/lodash/fp/zipAll.js
new file mode 100644
index 0000000..efa8ccb
--- /dev/null
+++ b/node_modules/lodash/fp/zipAll.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipAll', require('../zip'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipObj.js b/node_modules/lodash/fp/zipObj.js
new file mode 100644
index 0000000..f4a3453
--- /dev/null
+++ b/node_modules/lodash/fp/zipObj.js
@@ -0,0 +1 @@
+module.exports = require('./zipObject');
diff --git a/node_modules/lodash/fp/zipObject.js b/node_modules/lodash/fp/zipObject.js
new file mode 100644
index 0000000..462dbb6
--- /dev/null
+++ b/node_modules/lodash/fp/zipObject.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipObject', require('../zipObject'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipObjectDeep.js b/node_modules/lodash/fp/zipObjectDeep.js
new file mode 100644
index 0000000..53a5d33
--- /dev/null
+++ b/node_modules/lodash/fp/zipObjectDeep.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipObjectDeep', require('../zipObjectDeep'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fp/zipWith.js b/node_modules/lodash/fp/zipWith.js
new file mode 100644
index 0000000..c5cf9e2
--- /dev/null
+++ b/node_modules/lodash/fp/zipWith.js
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('zipWith', require('../zipWith'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/node_modules/lodash/fromPairs.js b/node_modules/lodash/fromPairs.js
new file mode 100644
index 0000000..ee7940d
--- /dev/null
+++ b/node_modules/lodash/fromPairs.js
@@ -0,0 +1,28 @@
+/**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+}
+
+module.exports = fromPairs;
diff --git a/node_modules/lodash/function.js b/node_modules/lodash/function.js
new file mode 100644
index 0000000..b0fc6d9
--- /dev/null
+++ b/node_modules/lodash/function.js
@@ -0,0 +1,25 @@
+module.exports = {
+ 'after': require('./after'),
+ 'ary': require('./ary'),
+ 'before': require('./before'),
+ 'bind': require('./bind'),
+ 'bindKey': require('./bindKey'),
+ 'curry': require('./curry'),
+ 'curryRight': require('./curryRight'),
+ 'debounce': require('./debounce'),
+ 'defer': require('./defer'),
+ 'delay': require('./delay'),
+ 'flip': require('./flip'),
+ 'memoize': require('./memoize'),
+ 'negate': require('./negate'),
+ 'once': require('./once'),
+ 'overArgs': require('./overArgs'),
+ 'partial': require('./partial'),
+ 'partialRight': require('./partialRight'),
+ 'rearg': require('./rearg'),
+ 'rest': require('./rest'),
+ 'spread': require('./spread'),
+ 'throttle': require('./throttle'),
+ 'unary': require('./unary'),
+ 'wrap': require('./wrap')
+};
diff --git a/node_modules/lodash/functions.js b/node_modules/lodash/functions.js
new file mode 100644
index 0000000..9722928
--- /dev/null
+++ b/node_modules/lodash/functions.js
@@ -0,0 +1,31 @@
+var baseFunctions = require('./_baseFunctions'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+}
+
+module.exports = functions;
diff --git a/node_modules/lodash/functionsIn.js b/node_modules/lodash/functionsIn.js
new file mode 100644
index 0000000..f00345d
--- /dev/null
+++ b/node_modules/lodash/functionsIn.js
@@ -0,0 +1,31 @@
+var baseFunctions = require('./_baseFunctions'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+}
+
+module.exports = functionsIn;
diff --git a/node_modules/lodash/get.js b/node_modules/lodash/get.js
new file mode 100644
index 0000000..8805ff9
--- /dev/null
+++ b/node_modules/lodash/get.js
@@ -0,0 +1,33 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+}
+
+module.exports = get;
diff --git a/node_modules/lodash/groupBy.js b/node_modules/lodash/groupBy.js
new file mode 100644
index 0000000..babf4f6
--- /dev/null
+++ b/node_modules/lodash/groupBy.js
@@ -0,0 +1,41 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+});
+
+module.exports = groupBy;
diff --git a/node_modules/lodash/gt.js b/node_modules/lodash/gt.js
new file mode 100644
index 0000000..3a66282
--- /dev/null
+++ b/node_modules/lodash/gt.js
@@ -0,0 +1,29 @@
+var baseGt = require('./_baseGt'),
+ createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+var gt = createRelationalOperation(baseGt);
+
+module.exports = gt;
diff --git a/node_modules/lodash/gte.js b/node_modules/lodash/gte.js
new file mode 100644
index 0000000..4180a68
--- /dev/null
+++ b/node_modules/lodash/gte.js
@@ -0,0 +1,30 @@
+var createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+});
+
+module.exports = gte;
diff --git a/node_modules/lodash/has.js b/node_modules/lodash/has.js
new file mode 100644
index 0000000..34df55e
--- /dev/null
+++ b/node_modules/lodash/has.js
@@ -0,0 +1,35 @@
+var baseHas = require('./_baseHas'),
+ hasPath = require('./_hasPath');
+
+/**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+}
+
+module.exports = has;
diff --git a/node_modules/lodash/hasIn.js b/node_modules/lodash/hasIn.js
new file mode 100644
index 0000000..06a3686
--- /dev/null
+++ b/node_modules/lodash/hasIn.js
@@ -0,0 +1,34 @@
+var baseHasIn = require('./_baseHasIn'),
+ hasPath = require('./_hasPath');
+
+/**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+}
+
+module.exports = hasIn;
diff --git a/node_modules/lodash/head.js b/node_modules/lodash/head.js
new file mode 100644
index 0000000..dee9d1f
--- /dev/null
+++ b/node_modules/lodash/head.js
@@ -0,0 +1,23 @@
+/**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+}
+
+module.exports = head;
diff --git a/node_modules/lodash/identity.js b/node_modules/lodash/identity.js
new file mode 100644
index 0000000..2d5d963
--- /dev/null
+++ b/node_modules/lodash/identity.js
@@ -0,0 +1,21 @@
+/**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+module.exports = identity;
diff --git a/node_modules/lodash/inRange.js b/node_modules/lodash/inRange.js
new file mode 100644
index 0000000..f20728d
--- /dev/null
+++ b/node_modules/lodash/inRange.js
@@ -0,0 +1,55 @@
+var baseInRange = require('./_baseInRange'),
+ toFinite = require('./toFinite'),
+ toNumber = require('./toNumber');
+
+/**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+}
+
+module.exports = inRange;
diff --git a/node_modules/lodash/includes.js b/node_modules/lodash/includes.js
new file mode 100644
index 0000000..ae0deed
--- /dev/null
+++ b/node_modules/lodash/includes.js
@@ -0,0 +1,53 @@
+var baseIndexOf = require('./_baseIndexOf'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ toInteger = require('./toInteger'),
+ values = require('./values');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+}
+
+module.exports = includes;
diff --git a/node_modules/lodash/index.js b/node_modules/lodash/index.js
new file mode 100644
index 0000000..5d063e2
--- /dev/null
+++ b/node_modules/lodash/index.js
@@ -0,0 +1 @@
+module.exports = require('./lodash'); \ No newline at end of file
diff --git a/node_modules/lodash/indexOf.js b/node_modules/lodash/indexOf.js
new file mode 100644
index 0000000..3c644af
--- /dev/null
+++ b/node_modules/lodash/indexOf.js
@@ -0,0 +1,42 @@
+var baseIndexOf = require('./_baseIndexOf'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+}
+
+module.exports = indexOf;
diff --git a/node_modules/lodash/initial.js b/node_modules/lodash/initial.js
new file mode 100644
index 0000000..f47fc50
--- /dev/null
+++ b/node_modules/lodash/initial.js
@@ -0,0 +1,22 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+}
+
+module.exports = initial;
diff --git a/node_modules/lodash/intersection.js b/node_modules/lodash/intersection.js
new file mode 100644
index 0000000..a94c135
--- /dev/null
+++ b/node_modules/lodash/intersection.js
@@ -0,0 +1,30 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject');
+
+/**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+});
+
+module.exports = intersection;
diff --git a/node_modules/lodash/intersectionBy.js b/node_modules/lodash/intersectionBy.js
new file mode 100644
index 0000000..31461aa
--- /dev/null
+++ b/node_modules/lodash/intersectionBy.js
@@ -0,0 +1,45 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, baseIteratee(iteratee, 2))
+ : [];
+});
+
+module.exports = intersectionBy;
diff --git a/node_modules/lodash/intersectionWith.js b/node_modules/lodash/intersectionWith.js
new file mode 100644
index 0000000..63cabfa
--- /dev/null
+++ b/node_modules/lodash/intersectionWith.js
@@ -0,0 +1,41 @@
+var arrayMap = require('./_arrayMap'),
+ baseIntersection = require('./_baseIntersection'),
+ baseRest = require('./_baseRest'),
+ castArrayLikeObject = require('./_castArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+});
+
+module.exports = intersectionWith;
diff --git a/node_modules/lodash/invert.js b/node_modules/lodash/invert.js
new file mode 100644
index 0000000..8c47950
--- /dev/null
+++ b/node_modules/lodash/invert.js
@@ -0,0 +1,42 @@
+var constant = require('./constant'),
+ createInverter = require('./_createInverter'),
+ identity = require('./identity');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+var invert = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ result[value] = key;
+}, constant(identity));
+
+module.exports = invert;
diff --git a/node_modules/lodash/invertBy.js b/node_modules/lodash/invertBy.js
new file mode 100644
index 0000000..3f4f7e5
--- /dev/null
+++ b/node_modules/lodash/invertBy.js
@@ -0,0 +1,56 @@
+var baseIteratee = require('./_baseIteratee'),
+ createInverter = require('./_createInverter');
+
+/** 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;
+
+/**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+var invertBy = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+}, baseIteratee);
+
+module.exports = invertBy;
diff --git a/node_modules/lodash/invoke.js b/node_modules/lodash/invoke.js
new file mode 100644
index 0000000..97d51eb
--- /dev/null
+++ b/node_modules/lodash/invoke.js
@@ -0,0 +1,24 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+var invoke = baseRest(baseInvoke);
+
+module.exports = invoke;
diff --git a/node_modules/lodash/invokeMap.js b/node_modules/lodash/invokeMap.js
new file mode 100644
index 0000000..8da5126
--- /dev/null
+++ b/node_modules/lodash/invokeMap.js
@@ -0,0 +1,41 @@
+var apply = require('./_apply'),
+ baseEach = require('./_baseEach'),
+ baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+});
+
+module.exports = invokeMap;
diff --git a/node_modules/lodash/isArguments.js b/node_modules/lodash/isArguments.js
new file mode 100644
index 0000000..8b9ed66
--- /dev/null
+++ b/node_modules/lodash/isArguments.js
@@ -0,0 +1,36 @@
+var baseIsArguments = require('./_baseIsArguments'),
+ isObjectLike = require('./isObjectLike');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.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.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
+
+module.exports = isArguments;
diff --git a/node_modules/lodash/isArray.js b/node_modules/lodash/isArray.js
new file mode 100644
index 0000000..88ab55f
--- /dev/null
+++ b/node_modules/lodash/isArray.js
@@ -0,0 +1,26 @@
+/**
+ * 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;
+
+module.exports = isArray;
diff --git a/node_modules/lodash/isArrayBuffer.js b/node_modules/lodash/isArrayBuffer.js
new file mode 100644
index 0000000..12904a6
--- /dev/null
+++ b/node_modules/lodash/isArrayBuffer.js
@@ -0,0 +1,27 @@
+var baseIsArrayBuffer = require('./_baseIsArrayBuffer'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer;
+
+/**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+module.exports = isArrayBuffer;
diff --git a/node_modules/lodash/isArrayLike.js b/node_modules/lodash/isArrayLike.js
new file mode 100644
index 0000000..0f96680
--- /dev/null
+++ b/node_modules/lodash/isArrayLike.js
@@ -0,0 +1,33 @@
+var isFunction = require('./isFunction'),
+ isLength = require('./isLength');
+
+/**
+ * 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);
+}
+
+module.exports = isArrayLike;
diff --git a/node_modules/lodash/isArrayLikeObject.js b/node_modules/lodash/isArrayLikeObject.js
new file mode 100644
index 0000000..6c4812a
--- /dev/null
+++ b/node_modules/lodash/isArrayLikeObject.js
@@ -0,0 +1,33 @@
+var isArrayLike = require('./isArrayLike'),
+ isObjectLike = require('./isObjectLike');
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
+
+module.exports = isArrayLikeObject;
diff --git a/node_modules/lodash/isBoolean.js b/node_modules/lodash/isBoolean.js
new file mode 100644
index 0000000..a43ed4b
--- /dev/null
+++ b/node_modules/lodash/isBoolean.js
@@ -0,0 +1,29 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]';
+
+/**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+}
+
+module.exports = isBoolean;
diff --git a/node_modules/lodash/isBuffer.js b/node_modules/lodash/isBuffer.js
new file mode 100644
index 0000000..c103cc7
--- /dev/null
+++ b/node_modules/lodash/isBuffer.js
@@ -0,0 +1,38 @@
+var root = require('./_root'),
+ stubFalse = require('./stubFalse');
+
+/** 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;
+
+module.exports = isBuffer;
diff --git a/node_modules/lodash/isDate.js b/node_modules/lodash/isDate.js
new file mode 100644
index 0000000..7f0209f
--- /dev/null
+++ b/node_modules/lodash/isDate.js
@@ -0,0 +1,27 @@
+var baseIsDate = require('./_baseIsDate'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsDate = nodeUtil && nodeUtil.isDate;
+
+/**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+module.exports = isDate;
diff --git a/node_modules/lodash/isElement.js b/node_modules/lodash/isElement.js
new file mode 100644
index 0000000..76ae29c
--- /dev/null
+++ b/node_modules/lodash/isElement.js
@@ -0,0 +1,25 @@
+var isObjectLike = require('./isObjectLike'),
+ isPlainObject = require('./isPlainObject');
+
+/**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+}
+
+module.exports = isElement;
diff --git a/node_modules/lodash/isEmpty.js b/node_modules/lodash/isEmpty.js
new file mode 100644
index 0000000..3597294
--- /dev/null
+++ b/node_modules/lodash/isEmpty.js
@@ -0,0 +1,77 @@
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
+ isArguments = require('./isArguments'),
+ isArray = require('./isArray'),
+ isArrayLike = require('./isArrayLike'),
+ isBuffer = require('./isBuffer'),
+ isPrototype = require('./_isPrototype'),
+ isTypedArray = require('./isTypedArray');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+module.exports = isEmpty;
diff --git a/node_modules/lodash/isEqual.js b/node_modules/lodash/isEqual.js
new file mode 100644
index 0000000..5e23e76
--- /dev/null
+++ b/node_modules/lodash/isEqual.js
@@ -0,0 +1,35 @@
+var baseIsEqual = require('./_baseIsEqual');
+
+/**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+function isEqual(value, other) {
+ return baseIsEqual(value, other);
+}
+
+module.exports = isEqual;
diff --git a/node_modules/lodash/isEqualWith.js b/node_modules/lodash/isEqualWith.js
new file mode 100644
index 0000000..21bdc7f
--- /dev/null
+++ b/node_modules/lodash/isEqualWith.js
@@ -0,0 +1,41 @@
+var baseIsEqual = require('./_baseIsEqual');
+
+/**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+}
+
+module.exports = isEqualWith;
diff --git a/node_modules/lodash/isError.js b/node_modules/lodash/isError.js
new file mode 100644
index 0000000..b4f41e0
--- /dev/null
+++ b/node_modules/lodash/isError.js
@@ -0,0 +1,36 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike'),
+ isPlainObject = require('./isPlainObject');
+
+/** `Object#toString` result references. */
+var domExcTag = '[object DOMException]',
+ errorTag = '[object Error]';
+
+/**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+}
+
+module.exports = isError;
diff --git a/node_modules/lodash/isFinite.js b/node_modules/lodash/isFinite.js
new file mode 100644
index 0000000..601842b
--- /dev/null
+++ b/node_modules/lodash/isFinite.js
@@ -0,0 +1,36 @@
+var root = require('./_root');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsFinite = root.isFinite;
+
+/**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+}
+
+module.exports = isFinite;
diff --git a/node_modules/lodash/isFunction.js b/node_modules/lodash/isFunction.js
new file mode 100644
index 0000000..907a8cd
--- /dev/null
+++ b/node_modules/lodash/isFunction.js
@@ -0,0 +1,37 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObject = require('./isObject');
+
+/** `Object#toString` result references. */
+var asyncTag = '[object AsyncFunction]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ 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;
+}
+
+module.exports = isFunction;
diff --git a/node_modules/lodash/isInteger.js b/node_modules/lodash/isInteger.js
new file mode 100644
index 0000000..66aa87d
--- /dev/null
+++ b/node_modules/lodash/isInteger.js
@@ -0,0 +1,33 @@
+var toInteger = require('./toInteger');
+
+/**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+}
+
+module.exports = isInteger;
diff --git a/node_modules/lodash/isLength.js b/node_modules/lodash/isLength.js
new file mode 100644
index 0000000..3a95caa
--- /dev/null
+++ b/node_modules/lodash/isLength.js
@@ -0,0 +1,35 @@
+/** 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;
+}
+
+module.exports = isLength;
diff --git a/node_modules/lodash/isMap.js b/node_modules/lodash/isMap.js
new file mode 100644
index 0000000..44f8517
--- /dev/null
+++ b/node_modules/lodash/isMap.js
@@ -0,0 +1,27 @@
+var baseIsMap = require('./_baseIsMap'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsMap = nodeUtil && nodeUtil.isMap;
+
+/**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+module.exports = isMap;
diff --git a/node_modules/lodash/isMatch.js b/node_modules/lodash/isMatch.js
new file mode 100644
index 0000000..9773a18
--- /dev/null
+++ b/node_modules/lodash/isMatch.js
@@ -0,0 +1,36 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData');
+
+/**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+}
+
+module.exports = isMatch;
diff --git a/node_modules/lodash/isMatchWith.js b/node_modules/lodash/isMatchWith.js
new file mode 100644
index 0000000..187b6a6
--- /dev/null
+++ b/node_modules/lodash/isMatchWith.js
@@ -0,0 +1,41 @@
+var baseIsMatch = require('./_baseIsMatch'),
+ getMatchData = require('./_getMatchData');
+
+/**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+}
+
+module.exports = isMatchWith;
diff --git a/node_modules/lodash/isNaN.js b/node_modules/lodash/isNaN.js
new file mode 100644
index 0000000..7d0d783
--- /dev/null
+++ b/node_modules/lodash/isNaN.js
@@ -0,0 +1,38 @@
+var isNumber = require('./isNumber');
+
+/**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+}
+
+module.exports = isNaN;
diff --git a/node_modules/lodash/isNative.js b/node_modules/lodash/isNative.js
new file mode 100644
index 0000000..f0cb8d5
--- /dev/null
+++ b/node_modules/lodash/isNative.js
@@ -0,0 +1,40 @@
+var baseIsNative = require('./_baseIsNative'),
+ isMaskable = require('./_isMaskable');
+
+/** Error message constants. */
+var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';
+
+/**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+}
+
+module.exports = isNative;
diff --git a/node_modules/lodash/isNil.js b/node_modules/lodash/isNil.js
new file mode 100644
index 0000000..79f0505
--- /dev/null
+++ b/node_modules/lodash/isNil.js
@@ -0,0 +1,25 @@
+/**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+function isNil(value) {
+ return value == null;
+}
+
+module.exports = isNil;
diff --git a/node_modules/lodash/isNull.js b/node_modules/lodash/isNull.js
new file mode 100644
index 0000000..c0a374d
--- /dev/null
+++ b/node_modules/lodash/isNull.js
@@ -0,0 +1,22 @@
+/**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+function isNull(value) {
+ return value === null;
+}
+
+module.exports = isNull;
diff --git a/node_modules/lodash/isNumber.js b/node_modules/lodash/isNumber.js
new file mode 100644
index 0000000..cd34ee4
--- /dev/null
+++ b/node_modules/lodash/isNumber.js
@@ -0,0 +1,38 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var numberTag = '[object Number]';
+
+/**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+}
+
+module.exports = isNumber;
diff --git a/node_modules/lodash/isObject.js b/node_modules/lodash/isObject.js
new file mode 100644
index 0000000..1dc8939
--- /dev/null
+++ b/node_modules/lodash/isObject.js
@@ -0,0 +1,31 @@
+/**
+ * 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');
+}
+
+module.exports = isObject;
diff --git a/node_modules/lodash/isObjectLike.js b/node_modules/lodash/isObjectLike.js
new file mode 100644
index 0000000..301716b
--- /dev/null
+++ b/node_modules/lodash/isObjectLike.js
@@ -0,0 +1,29 @@
+/**
+ * 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';
+}
+
+module.exports = isObjectLike;
diff --git a/node_modules/lodash/isPlainObject.js b/node_modules/lodash/isPlainObject.js
new file mode 100644
index 0000000..2387373
--- /dev/null
+++ b/node_modules/lodash/isPlainObject.js
@@ -0,0 +1,62 @@
+var baseGetTag = require('./_baseGetTag'),
+ getPrototype = require('./_getPrototype'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+}
+
+module.exports = isPlainObject;
diff --git a/node_modules/lodash/isRegExp.js b/node_modules/lodash/isRegExp.js
new file mode 100644
index 0000000..76c9b6e
--- /dev/null
+++ b/node_modules/lodash/isRegExp.js
@@ -0,0 +1,27 @@
+var baseIsRegExp = require('./_baseIsRegExp'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
+
+/**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+module.exports = isRegExp;
diff --git a/node_modules/lodash/isSafeInteger.js b/node_modules/lodash/isSafeInteger.js
new file mode 100644
index 0000000..2a48526
--- /dev/null
+++ b/node_modules/lodash/isSafeInteger.js
@@ -0,0 +1,37 @@
+var isInteger = require('./isInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+}
+
+module.exports = isSafeInteger;
diff --git a/node_modules/lodash/isSet.js b/node_modules/lodash/isSet.js
new file mode 100644
index 0000000..ab88bdf
--- /dev/null
+++ b/node_modules/lodash/isSet.js
@@ -0,0 +1,27 @@
+var baseIsSet = require('./_baseIsSet'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* Node.js helper references. */
+var nodeIsSet = nodeUtil && nodeUtil.isSet;
+
+/**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+module.exports = isSet;
diff --git a/node_modules/lodash/isString.js b/node_modules/lodash/isString.js
new file mode 100644
index 0000000..627eb9c
--- /dev/null
+++ b/node_modules/lodash/isString.js
@@ -0,0 +1,30 @@
+var baseGetTag = require('./_baseGetTag'),
+ isArray = require('./isArray'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+}
+
+module.exports = isString;
diff --git a/node_modules/lodash/isSymbol.js b/node_modules/lodash/isSymbol.js
new file mode 100644
index 0000000..dfb60b9
--- /dev/null
+++ b/node_modules/lodash/isSymbol.js
@@ -0,0 +1,29 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `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);
+}
+
+module.exports = isSymbol;
diff --git a/node_modules/lodash/isTypedArray.js b/node_modules/lodash/isTypedArray.js
new file mode 100644
index 0000000..da3f8dd
--- /dev/null
+++ b/node_modules/lodash/isTypedArray.js
@@ -0,0 +1,27 @@
+var baseIsTypedArray = require('./_baseIsTypedArray'),
+ baseUnary = require('./_baseUnary'),
+ nodeUtil = require('./_nodeUtil');
+
+/* 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;
+
+module.exports = isTypedArray;
diff --git a/node_modules/lodash/isUndefined.js b/node_modules/lodash/isUndefined.js
new file mode 100644
index 0000000..377d121
--- /dev/null
+++ b/node_modules/lodash/isUndefined.js
@@ -0,0 +1,22 @@
+/**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+function isUndefined(value) {
+ return value === undefined;
+}
+
+module.exports = isUndefined;
diff --git a/node_modules/lodash/isWeakMap.js b/node_modules/lodash/isWeakMap.js
new file mode 100644
index 0000000..8d36f66
--- /dev/null
+++ b/node_modules/lodash/isWeakMap.js
@@ -0,0 +1,28 @@
+var getTag = require('./_getTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var weakMapTag = '[object WeakMap]';
+
+/**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+}
+
+module.exports = isWeakMap;
diff --git a/node_modules/lodash/isWeakSet.js b/node_modules/lodash/isWeakSet.js
new file mode 100644
index 0000000..e628b26
--- /dev/null
+++ b/node_modules/lodash/isWeakSet.js
@@ -0,0 +1,28 @@
+var baseGetTag = require('./_baseGetTag'),
+ isObjectLike = require('./isObjectLike');
+
+/** `Object#toString` result references. */
+var weakSetTag = '[object WeakSet]';
+
+/**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+}
+
+module.exports = isWeakSet;
diff --git a/node_modules/lodash/iteratee.js b/node_modules/lodash/iteratee.js
new file mode 100644
index 0000000..61b73a8
--- /dev/null
+++ b/node_modules/lodash/iteratee.js
@@ -0,0 +1,53 @@
+var baseClone = require('./_baseClone'),
+ baseIteratee = require('./_baseIteratee');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+}
+
+module.exports = iteratee;
diff --git a/node_modules/lodash/join.js b/node_modules/lodash/join.js
new file mode 100644
index 0000000..45de079
--- /dev/null
+++ b/node_modules/lodash/join.js
@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeJoin = arrayProto.join;
+
+/**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+}
+
+module.exports = join;
diff --git a/node_modules/lodash/kebabCase.js b/node_modules/lodash/kebabCase.js
new file mode 100644
index 0000000..8a52be6
--- /dev/null
+++ b/node_modules/lodash/kebabCase.js
@@ -0,0 +1,28 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+});
+
+module.exports = kebabCase;
diff --git a/node_modules/lodash/keyBy.js b/node_modules/lodash/keyBy.js
new file mode 100644
index 0000000..acc007a
--- /dev/null
+++ b/node_modules/lodash/keyBy.js
@@ -0,0 +1,36 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ createAggregator = require('./_createAggregator');
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+});
+
+module.exports = keyBy;
diff --git a/node_modules/lodash/keys.js b/node_modules/lodash/keys.js
new file mode 100644
index 0000000..d143c71
--- /dev/null
+++ b/node_modules/lodash/keys.js
@@ -0,0 +1,37 @@
+var arrayLikeKeys = require('./_arrayLikeKeys'),
+ baseKeys = require('./_baseKeys'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * 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);
+}
+
+module.exports = keys;
diff --git a/node_modules/lodash/keysIn.js b/node_modules/lodash/keysIn.js
new file mode 100644
index 0000000..a62308f
--- /dev/null
+++ b/node_modules/lodash/keysIn.js
@@ -0,0 +1,32 @@
+var arrayLikeKeys = require('./_arrayLikeKeys'),
+ baseKeysIn = require('./_baseKeysIn'),
+ isArrayLike = require('./isArrayLike');
+
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @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;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+}
+
+module.exports = keysIn;
diff --git a/node_modules/lodash/lang.js b/node_modules/lodash/lang.js
new file mode 100644
index 0000000..a396216
--- /dev/null
+++ b/node_modules/lodash/lang.js
@@ -0,0 +1,58 @@
+module.exports = {
+ 'castArray': require('./castArray'),
+ 'clone': require('./clone'),
+ 'cloneDeep': require('./cloneDeep'),
+ 'cloneDeepWith': require('./cloneDeepWith'),
+ 'cloneWith': require('./cloneWith'),
+ 'conformsTo': require('./conformsTo'),
+ 'eq': require('./eq'),
+ 'gt': require('./gt'),
+ 'gte': require('./gte'),
+ 'isArguments': require('./isArguments'),
+ 'isArray': require('./isArray'),
+ 'isArrayBuffer': require('./isArrayBuffer'),
+ 'isArrayLike': require('./isArrayLike'),
+ 'isArrayLikeObject': require('./isArrayLikeObject'),
+ 'isBoolean': require('./isBoolean'),
+ 'isBuffer': require('./isBuffer'),
+ 'isDate': require('./isDate'),
+ 'isElement': require('./isElement'),
+ 'isEmpty': require('./isEmpty'),
+ 'isEqual': require('./isEqual'),
+ 'isEqualWith': require('./isEqualWith'),
+ 'isError': require('./isError'),
+ 'isFinite': require('./isFinite'),
+ 'isFunction': require('./isFunction'),
+ 'isInteger': require('./isInteger'),
+ 'isLength': require('./isLength'),
+ 'isMap': require('./isMap'),
+ 'isMatch': require('./isMatch'),
+ 'isMatchWith': require('./isMatchWith'),
+ 'isNaN': require('./isNaN'),
+ 'isNative': require('./isNative'),
+ 'isNil': require('./isNil'),
+ 'isNull': require('./isNull'),
+ 'isNumber': require('./isNumber'),
+ 'isObject': require('./isObject'),
+ 'isObjectLike': require('./isObjectLike'),
+ 'isPlainObject': require('./isPlainObject'),
+ 'isRegExp': require('./isRegExp'),
+ 'isSafeInteger': require('./isSafeInteger'),
+ 'isSet': require('./isSet'),
+ 'isString': require('./isString'),
+ 'isSymbol': require('./isSymbol'),
+ 'isTypedArray': require('./isTypedArray'),
+ 'isUndefined': require('./isUndefined'),
+ 'isWeakMap': require('./isWeakMap'),
+ 'isWeakSet': require('./isWeakSet'),
+ 'lt': require('./lt'),
+ 'lte': require('./lte'),
+ 'toArray': require('./toArray'),
+ 'toFinite': require('./toFinite'),
+ 'toInteger': require('./toInteger'),
+ 'toLength': require('./toLength'),
+ 'toNumber': require('./toNumber'),
+ 'toPlainObject': require('./toPlainObject'),
+ 'toSafeInteger': require('./toSafeInteger'),
+ 'toString': require('./toString')
+};
diff --git a/node_modules/lodash/last.js b/node_modules/lodash/last.js
new file mode 100644
index 0000000..cad1eaf
--- /dev/null
+++ b/node_modules/lodash/last.js
@@ -0,0 +1,20 @@
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+}
+
+module.exports = last;
diff --git a/node_modules/lodash/lastIndexOf.js b/node_modules/lodash/lastIndexOf.js
new file mode 100644
index 0000000..dabfb61
--- /dev/null
+++ b/node_modules/lodash/lastIndexOf.js
@@ -0,0 +1,46 @@
+var baseFindIndex = require('./_baseFindIndex'),
+ baseIsNaN = require('./_baseIsNaN'),
+ strictLastIndexOf = require('./_strictLastIndexOf'),
+ toInteger = require('./toInteger');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+}
+
+module.exports = lastIndexOf;
diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js
new file mode 100644
index 0000000..4131e93
--- /dev/null
+++ b/node_modules/lodash/lodash.js
@@ -0,0 +1,17209 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.21';
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Error message constants. */
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
+ FUNC_ERROR_TEXT = 'Expected a function',
+ INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as the maximum memoize cache size. */
+ var MAX_MEMOIZE_SIZE = 500;
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /** Used to associate wrap methods with their bit flags. */
+ var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+ ];
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ domExcTag = '[object DOMException]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ nullTag = '[object Null]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reUnescapedHtml = /[&<>"']/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+ /** Used to match leading whitespace. */
+ var reTrimStart = /^\s+/;
+
+ /** Used to match a single whitespace character. */
+ var reWhitespace = /\s/;
+
+ /** Used to match wrap detail comments. */
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+ /** Used to match words composed of alphanumeric characters. */
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+ /**
+ * Used to validate the `validate` option in `_.template` variable.
+ *
+ * Forbids characters which could potentially change the meaning of the function argument definition:
+ * - "()," (modification of function parameters)
+ * - "=" (default value)
+ * - "[]{}" (destructuring of function parameters)
+ * - "/" (beginning of a comment)
+ * - whitespace
+ */
+ var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['\u2019]",
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+ /** Used to compose unicode regexes. */
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, 'g');
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+ /** Used to match complex or compound words. */
+ var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
+
+ /** 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 + ']');
+
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** 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] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map Latin Unicode letters to basic Latin letters. */
+ var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat,
+ freeParseInt = parseInt;
+
+ /** 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')();
+
+ /** 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;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ // Use `util.types` for Node.js 10+.
+ var types = freeModule && freeModule.require && freeModule.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 nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` 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 arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ var asciiSize = baseProperty('length');
+
+ /**
+ * 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('');
+ }
+
+ /**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+ }
+
+ /**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * 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 `_.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);
+ }
+
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ 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;
+ }
+
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+ }
+
+ /**
+ * 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];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+
+ /**
+ * The base implementation of `_.trim`.
+ *
+ * @private
+ * @param {string} string The string to trim.
+ * @returns {string} Returns the trimmed string.
+ */
+ function baseTrim(string) {
+ return string
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
+ : string;
+ }
+
+ /**
+ * 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);
+ };
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ var deburrLetter = basePropertyOf(deburredLetters);
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+ function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * 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));
+ };
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+ function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * A specialized version of `_.lastIndexOf` 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 strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+ }
+
+ /**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+ function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the last non-whitespace character.
+ */
+ function trimmedEndIndex(string) {
+ var index = string.length;
+
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+ /**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+ }
+
+ /**
+ * 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) || [];
+ }
+
+ /**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Util
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // Create a suped-up `defer` in Node.js.
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ var runInContext = (function runInContext(context) {
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
+
+ /** Built-in constructor references. */
+ var Array = context.Array,
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = context['__core-js_shared__'];
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? context.Buffer : undefined,
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice,
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
+ symIterator = Symbol ? Symbol.iterator : undefined,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+ var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+ }());
+
+ /** Mocked built-ins. */
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = Date.now,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReverse = arrayProto.reverse;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+ }
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': lodash
+ }
+ };
+
+ // Ensure wrappers are instances of `baseLodash`.
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+
+ /**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * 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.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;
+ }
+
+ /**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+ function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+ function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+ function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ } else if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+ }
+
+ /**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+ function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * 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();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @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 baseForRight = createBaseFor(true);
+
+ /**
+ * 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 `_.forOwnRight` 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 baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+ function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+ }
+
+ /**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+ function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+ function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+ }
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+ function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+ function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+ }
+
+ /**
+ * 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 `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * 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.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.keysIn` 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 baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ stack || (stack = new Stack);
+ if (isObject(srcValue)) {
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || isFunction(objValue)) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+ function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+ }
+
+ /**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseOrderBy(collection, iteratees, orders) {
+ if (iteratees.length) {
+ iteratees = arrayMap(iteratees, function(iteratee) {
+ if (isArray(iteratee)) {
+ return function(value) {
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ }
+ }
+ return iteratee;
+ });
+ } else {
+ iteratees = [identity];
+ }
+
+ var index = -1;
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, paths) {
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+ function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+ }
+
+ /**
+ * 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 base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+ function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+ function baseSample(collection) {
+ return arraySample(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ return object;
+ }
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+ };
+
+ /**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ var low = 0,
+ high = array == null ? 0 : array.length;
+ if (high === 0) {
+ return 0;
+ }
+
+ value = iteratee(value);
+ var valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+ function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+ }
+
+ /**
+ * 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 `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+ function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+ }
+
+ /**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+ }
+
+ /**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+ function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+ }
+
+ /**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+ function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+ function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+ }
+
+ /**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+ function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+ }
+
+ /**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ var castRest = baseRest;
+
+ /**
+ * 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);
+ }
+
+ /**
+ * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
+ *
+ * @private
+ * @param {number|Object} id The timer id or timeout object of the timer to clear.
+ */
+ var clearTimeout = ctxClearTimeout || function(id) {
+ return root.clearTimeout(id);
+ };
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+ }
+
+ /**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
+ };
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * 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;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+ function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+ }
+
+ /**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = getIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value)) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+ function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+ }
+
+ /**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+ function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+ function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+ }
+
+ /**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+ function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+ function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+ }
+
+ /**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+ function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+ }
+
+ /**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
+ if (precision && nativeIsFinite(number)) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+ function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+ }
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] === undefined
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+ }
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+ * objects into destination objects that are passed thru.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+ * objects.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {string} key The key of the property to inspect.
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+ */
+ function customOmitClone(value) {
+ return isPlainObject(value) ? undefined : value;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+ function getHolder(func) {
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
+ }
+
+ /**
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
+ * If arguments are provided, the chosen function is invoked with them and
+ * its result is returned.
+ *
+ * @private
+ * @param {*} [value] The value to convert to an iteratee.
+ * @param {number} [arity] The arity of the created iteratee.
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getIteratee() {
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : 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),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+ };
+
+ /**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+ function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return new Ctor;
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return new Ctor;
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+ function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+ }
+
+ /**
+ * 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 : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+ var isMaskable = coreJsData ? isFunction : stubFalse;
+
+ /**
+ * 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;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+ function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * 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.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+ function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function safeGet(object, key) {
+ if (key === 'constructor' && typeof object[key] === 'function') {
+ return;
+ }
+
+ if (key == '__proto__') {
+ return;
+ }
+
+ return object[key];
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = shortOut(baseSetData);
+
+ /**
+ * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ var setTimeout = ctxSetTimeout || function(func, wait) {
+ return root.setTimeout(func, wait);
+ };
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = shortOut(baseSetToString);
+
+ /**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+ function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+ }
+
+ /**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+ function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+ }
+
+ /**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+ function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+ }
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+ function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+ var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+ var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+ function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
+ }
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+ function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+ }
+
+ /**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+ }
+
+ /**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+ var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+ var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+ var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+ function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+ }
+
+ /**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+ function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+ }
+
+ /**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ var pull = baseRest(pullAll);
+
+ /**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+ function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, getIteratee(iteratee, 2))
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+ function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+ var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @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 slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+ function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+ function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+ function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+ function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+ }
+
+ /**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+ function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
+ }
+
+ /**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+ function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+ function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+ function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, getIteratee(iteratee, 2))
+ : [];
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+ function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+ function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+ var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+ function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+ }
+
+ /**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+ var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+ var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+ });
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+ var zip = baseRest(unzip);
+
+ /**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+ }
+
+ /**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+ function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+ var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+ var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+ });
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+ function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+ }
+
+ /**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+ function wrapperToIterator() {
+ return this;
+ }
+
+ /**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+ function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ var findLast = createFind(findLastIndex);
+
+ /**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+ function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+ function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+ }
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+ var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+ }
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+ function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(getIteratee(predicate, 3)));
+ }
+
+ /**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+ function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+ }
+
+ /**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+ function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+ var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+ var now = ctxNow || function() {
+ return root.Date.now();
+ };
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+ }
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+ function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ timeWaiting = wait - timeSinceLastCall;
+
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+ function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Expose `MapCache`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+ var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+ });
+
+ /**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+ var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+ }
+
+ /**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+ function unary(func) {
+ return ary(func, 1);
+ }
+
+ /**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+ function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+ function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+ function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+ function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+ function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ var gt = createRelationalOperation(baseGt);
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+ });
+
+ /**
+ * 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.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;
+
+ /**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+ /**
+ * 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);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * 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;
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+ /**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+ function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+ function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+ function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+ }
+
+ /**
+ * 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 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');
+ }
+
+ /**
+ * 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';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+ /**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+ function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+ }
+
+ /**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+ function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+ function isNil(value) {
+ return value == null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+ /**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+ function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * 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;
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+ function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+ function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ var lt = createRelationalOperation(baseLt);
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+ });
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+ }
+
+ /**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+ function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+ }
+
+ /**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is 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 convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+ function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = baseTrim(value);
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+ function toSafeInteger(value) {
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
+ }
+
+ /**
+ * 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);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
+
+ /**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+ var at = flatRest(baseAt);
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+ });
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+ var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, customDefaultsMerge);
+ return apply(mergeWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ function findKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
+ }
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ function findLastKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
+ }
+
+ /**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+ function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+ function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forOwn(object, iteratee) {
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+ function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+ function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+ }
+
+ /**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+ function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+ var invert = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ result[value] = key;
+ }, constant(identity));
+
+ /**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+ var invertBy = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }, getIteratee);
+
+ /**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+ var invoke = baseRest(baseInvoke);
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @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;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+ }
+
+ /**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+ var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+ });
+
+ /**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+ function omitBy(object, predicate) {
+ return pickBy(object, negate(getIteratee(predicate)));
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = getIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ /**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+ }
+
+ /**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+ var toPairs = createToPairs(keys);
+
+ /**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+ var toPairsIn = createToPairs(keysIn);
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = getIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+ function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+ }
+
+ /**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+ function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+ }
+
+ /**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+ function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+ }
+
+ /**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+ function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+ }
+
+ /**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
+
+ /**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+ }
+
+ /**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+ function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+ }
+
+ /**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+ var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+ var lowerFirst = createCaseFirst('toLowerCase');
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+ }
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+ function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+ function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+ }
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+ }
+
+ /**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+ function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+ }
+
+ /**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+ function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+ }
+
+ /**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = toString(string);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+ function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = lodash.templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ // The sourceURL gets injected into the source that's eval-ed, so be careful
+ // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
+ // and escape the comment, thus injecting code that gets evaled.
+ var sourceURL = '//# sourceURL=' +
+ (hasOwnProperty.call(options, 'sourceURL')
+ ? (options.sourceURL + '').replace(/\s/g, ' ')
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = hasOwnProperty.call(options, 'variable') && options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Throw an error if a forbidden character was found in `variable`, to prevent
+ // potential command injection attacks.
+ else if (reForbiddenIdentifierChars.test(variable)) {
+ throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
+ }
+
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+ function toLower(value) {
+ return toString(value).toLowerCase();
+ }
+
+ /**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+ function toUpper(value) {
+ return toString(value).toUpperCase();
+ }
+
+ /**
+ * 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 baseTrim(string);
+ }
+ 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('');
+ }
+
+ /**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.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
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+ function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.slice(0, trimmedEndIndex(string) + 1);
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+ }
+
+ /**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.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
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+ function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+ }
+
+ /**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+ function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+
+ /**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+ var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
+
+ /**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+ var upperFirst = createCaseFirst('toUpperCase');
+
+ /**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+ function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+ var attempt = baseRest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+ });
+
+ /**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'click': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, ['click']);
+ * jQuery(element).on('click', view.click);
+ * // => Logs 'clicked docs' when clicked.
+ */
+ var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+ });
+
+ /**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new composite function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.stubTrue, _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+ function cond(pairs) {
+ var length = pairs == null ? 0 : pairs.length,
+ toIteratee = getIteratee();
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return baseRest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+ }
+
+ /**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.conformsTo` with
+ * `source` partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 2, 'b': 1 },
+ * { 'a': 1, 'b': 2 }
+ * ];
+ *
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+ * // => [{ 'a': 1, 'b': 2 }]
+ */
+ function conforms(source) {
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * 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(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ /**
+ * Checks `value` to determine whether a default value should be returned in
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+ * or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Util
+ * @param {*} value The value to check.
+ * @param {*} defaultValue The default value.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * _.defaultTo(1, 10);
+ * // => 1
+ *
+ * _.defaultTo(undefined, 10);
+ * // => 10
+ */
+ function defaultTo(value, defaultValue) {
+ return (value == null || value !== value) ? defaultValue : value;
+ }
+
+ /**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow([_.add, square]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flow = createFlow();
+
+ /**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight([square, _.add]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flowRight = createFlow(true);
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+ var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+ function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+ var over = createOver(arrayMap);
+
+ /**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overEvery = createOver(arrayEvery);
+
+ /**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ *
+ * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
+ * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
+ */
+ var overSome = createOver(arraySome);
+
+ /**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
+
+ /**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+ function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+ }
+
+ /**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+ var range = createRange();
+
+ /**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+ var rangeRight = createRange(true);
+
+ /**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+ function stubArray() {
+ return [];
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+ function stubObject() {
+ return {};
+ }
+
+ /**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+ function stubString() {
+ return '';
+ }
+
+ /**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+ function stubTrue() {
+ return true;
+ }
+
+ /**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+ function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+ var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+ }, 0);
+
+ /**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+ var ceil = createRound('ceil');
+
+ /**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+ var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+ }, 1);
+
+ /**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+ var floor = createRound('floor');
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+ function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+ function mean(array) {
+ return baseMean(array, identity);
+ }
+
+ /**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+ function meanBy(array, iteratee) {
+ return baseMean(array, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+ function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
+ : undefined;
+ }
+
+ /**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+ }, 1);
+
+ /**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+ var round = createRound('round');
+
+ /**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+ var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+ }, 0);
+
+ /**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+ function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+ }
+
+ /**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+ function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, getIteratee(iteratee, 2))
+ : 0;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
+
+ // Add aliases.
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.conformsTo = conformsTo;
+ lodash.deburr = deburr;
+ lodash.defaultTo = defaultTo;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.stubArray = stubArray;
+ lodash.stubFalse = stubFalse;
+ lodash.stubObject = stubObject;
+ lodash.stubString = stubString;
+ lodash.stubTrue = stubTrue;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toFinite = toFinite;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Assign default placeholders.
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+ var result = (this.__filtered__ && !index)
+ ? new LazyWrapper(this)
+ : this.clone();
+
+ if (result.__filtered__) {
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ } else {
+ result.__views__.push({
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee) {
+ var result = this.clone();
+ result.__iteratees__.push({
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.find = function(predicate) {
+ return this.filter(predicate).head();
+ };
+
+ LazyWrapper.prototype.findLast = function(predicate) {
+ return this.reverse().find(predicate);
+ };
+
+ LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
+ }
+ return this.map(function(value) {
+ return baseInvoke(value, path, args);
+ });
+ });
+
+ LazyWrapper.prototype.reject = function(predicate) {
+ return this.filter(negate(getIteratee(predicate)));
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = toInteger(start);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
+ return this.reverse().takeWhile(predicate).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(MAX_ARRAY_LENGTH);
+ };
+
+ // Add `LazyWrapper` methods to `lodash.prototype`.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var value = this.__wrapped__,
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ var interceptor = function(value) {
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
+ isLazy = useLazy = false;
+ }
+ var chainAll = this.__chain__,
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
+
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(result, chainAll);
+ }
+ if (isUnwrapped && onlyLazy) {
+ return func.apply(this, args);
+ }
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
+
+ // Add `Array` methods to `lodash.prototype`.
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Map minified method names to their real names.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = lodashFunc.name + '';
+ if (!hasOwnProperty.call(realNames, key)) {
+ realNames[key] = [];
+ }
+ realNames[key].push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined
+ }];
+
+ // Add methods to `LazyWrapper`.
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ // Add lazy aliases.
+ lodash.prototype.first = lodash.prototype.head;
+
+ if (symIterator) {
+ lodash.prototype[symIterator] = wrapperToIterator;
+ }
+ return lodash;
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ // Export lodash.
+ var _ = runInContext();
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = _;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return _;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = _)._ = _;
+ // Export for CommonJS support.
+ freeExports._ = _;
+ }
+ else {
+ // Export to the global object.
+ root._ = _;
+ }
+}.call(this));
diff --git a/node_modules/lodash/lodash.min.js b/node_modules/lodash/lodash.min.js
new file mode 100644
index 0000000..4219da7
--- /dev/null
+++ b/node_modules/lodash/lodash.min.js
@@ -0,0 +1,140 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
+return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
+return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match($t)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){
+for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Cn}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i);
+}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Lt,""):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;
+return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==cn||(n[r]=cn,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size);
+return n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ct.test(n.charAt(t)););return t}function J(n){for(var t=Mr.lastIndex=0;Mr.test(n);)++t;return t}function Y(n){return n.match(Mr)||[];
+}function Q(n){return n.match(Fr)||[]}var X,nn="4.17.21",tn=200,rn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",en="Expected a function",un="Invalid `variable` option passed into `_.template`",on="__lodash_hash_undefined__",fn=500,cn="__lodash_placeholder__",an=1,ln=2,sn=4,hn=1,pn=2,_n=1,vn=2,gn=4,yn=8,dn=16,bn=32,wn=64,mn=128,xn=256,jn=512,An=30,kn="...",On=800,In=16,Rn=1,zn=2,En=3,Sn=1/0,Wn=9007199254740991,Ln=1.7976931348623157e308,Cn=NaN,Un=4294967295,Bn=Un-1,Tn=Un>>>1,$n=[["ary",mn],["bind",_n],["bindKey",vn],["curry",yn],["curryRight",dn],["flip",jn],["partial",bn],["partialRight",wn],["rearg",xn]],Dn="[object Arguments]",Mn="[object Array]",Fn="[object AsyncFunction]",Nn="[object Boolean]",Pn="[object Date]",qn="[object DOMException]",Zn="[object Error]",Kn="[object Function]",Vn="[object GeneratorFunction]",Gn="[object Map]",Hn="[object Number]",Jn="[object Null]",Yn="[object Object]",Qn="[object Promise]",Xn="[object Proxy]",nt="[object RegExp]",tt="[object Set]",rt="[object String]",et="[object Symbol]",ut="[object Undefined]",it="[object WeakMap]",ot="[object WeakSet]",ft="[object ArrayBuffer]",ct="[object DataView]",at="[object Float32Array]",lt="[object Float64Array]",st="[object Int8Array]",ht="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",dt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zr=-1,Kr={};
+Kr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
+"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
+"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
+"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
+"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
+"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Hr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){
+try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
+this.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1,
+n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==zn)g=w;else if(!w){if(b==Rn)continue n;break n}}_[h++]=g}return _}function Xt(n){
+var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function nr(){this.__data__=is?is(null):{},this.size=0}function tr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function rr(n){var t=this.__data__;if(is){var r=t[n];return r===on?X:r}return bl.call(t,n)?t[n]:X}function er(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ur(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?on:t,this}function ir(n){
+var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function or(){this.__data__=[],this.size=0}function fr(n){var t=this.__data__,r=Wr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,!0)}function cr(n){var t=this.__data__,r=Wr(t,n);return r<0?X:t[r][1]}function ar(n){return Wr(this.__data__,n)>-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
+var e=n[t];this.set(e[0],e[1])}}function hr(){this.size=0,this.__data__={hash:new Xt,map:new(ts||ir),string:new Xt}}function pr(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function _r(n){return xi(this,n).get(n)}function vr(n){return xi(this,n).has(n)}function gr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function yr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new sr;++t<r;)this.add(n[t])}function dr(n){return this.__data__.set(n,on),this}function br(n){
+return this.__data__.has(n)}function wr(n){this.size=(this.__data__=new ir(n)).size}function mr(){this.__data__=new ir,this.size=0}function xr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function jr(n){return this.__data__.get(n)}function Ar(n){return this.__data__.has(n)}function kr(n,t){var r=this.__data__;if(r instanceof ir){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new sr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){
+var r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Oh(n),o=r||e||u||i,f=o?O(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ci(a,c))||f.push(a);return f}function Ir(n){var t=n.length;return t?n[tu(0,t-1)]:X}function Rr(n,t){return Xi(Tu(n),Mr(t,0,n.length))}function zr(n){return Xi(Tu(n))}function Er(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Br(n,t,r)}function Sr(n,t,r){var e=n[t];
+bl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Br(n,t,r)}function Wr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Lr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Cr(n,t){return n&&$u(t,Pc(t),n)}function Ur(n,t){return n&&$u(t,qc(t),n)}function Br(n,t,r){"__proto__"==t&&Tl?Tl(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Mr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r),
+t!==X&&(n=n>=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){
+f.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if("function"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
+if(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=!0;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r),
+e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])];
+return r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?ut:Jn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new yr(a&&p):X}p=n[0];
+var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Oe(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Ie(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Dn}function ze(n){return cc(n)&&we(n)==ft}function Ee(n){return cc(n)&&we(n)==Pn}function Se(n,t,r,e,u){
+return n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Mn:zs(n),a=f?Mn:zs(t);c=c==Dn?Yn:c,a=a==Dn?Yn:a;var l=c==Yn,s=a==Yn,h=c==a;if(h&&mh(n)){if(!mh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new wr),o||Oh(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&hn)){var p=l&&bl.call(n,"__wrapped__"),_=s&&bl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new wr),u(v,g,r,e,i)}}return!!h&&(i||(i=new wr),vi(n,t,r,e,u,i));
+}function Le(n){return cc(n)&&zs(n)==Gn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return!1}else{var s=new wr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,hn|pn,e,s):h))return!1}}return!0}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Zt).test(to(n))}function Be(n){return cc(n)&&we(n)==nt}function Te(n){return cc(n)&&zs(n)==tt;
+}function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return"function"==typeof n?n:null==n?La:"object"==typeof n?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)("constructor"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){
+e[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,hn|pn)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new wr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+"",n,t,u):X;f===X&&(f=i),Er(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Er(n,r,a),X;var l=i?i(f,c,r+"",n,t,o):X,s=l===X;
+if(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Oh(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=!1,l=Iu(c,!0)):_?(s=!1,l=Wu(c,!0)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Er(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{criteria:c(t,function(t){
+return t(n)}),index:++e,value:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){
+var u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n);
+for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Sr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){
+var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Tn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Bn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
+var o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return"number"==typeof n?n:bc(n)?Cn:+n}function vu(n){if("string"==typeof n)return n;if(bh(n))return c(n,vu)+"";if(bc(n))return vs?vs.call(n):"";var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
+t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){return t=ku(t,n),n=Gi(n,t),null==n||delete n[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}function wu(n,t){var r=n;return r instanceof Ct&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[];
+for(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o}function ju(n){return Jf(n)?n:[]}function Au(n){return"function"==typeof n?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n))}function Ou(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r);
+return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t);
+if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;
+}function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Br(r,f,c):Sr(r,f,c)}return r}function Du(n,t){return $u(n,Is(n),t)}function Mu(n,t){return $u(n,Rs(n),t);
+}function Fu(n,r){return function(e,u){var i=bh(e)?t:Lr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&"function"==typeof i?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function qu(n){return function(t,r,e){
+for(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&_n,i=Gu(n);return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Ou(r,1).join(""):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace($r,"")),n,"")}}function Gu(n){return function(){var t=arguments;switch(t.length){
+case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a);
+return o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],!0)}for(e=o?e:r;++e<r;){
+i=t[e];var f=bi(i),c="wrapper"==f?Os(i):X;o=c&&$i(c[0])&&c[1]==(mn|yn|bn|xn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)),
+y-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&mn,h=t&_n,p=t&vn,_=t&(yn|dn),v=t&jn,g=p?X:Gu(n);return l}function Xu(n,t){return function(r,e){return Oe(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;"string"==typeof r||"string"==typeof e?(r=vu(r),
+e=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?" ":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));return T(t)?Ou(G(e),0,n).join(""):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
+return n(h,o?e:this,s)}var o=r&_n,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&"number"!=typeof e&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ic(t),r=Ic(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&yn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?bn:wn,t&=~(l?wn:bn),t&gn||(t&=~(_n|vn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e,
+Yi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Ic(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+"e").split("e");return e=(Ec(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Gn?M(t):r==tt?q(t):I(t,n(t))}}function ai(n,t,r,e,u,i,o,f){var c=t&vn;if(!c&&"function"!=typeof n)throw new pl(en);var a=e?e.length:0;if(a||(t&=~(bn|wn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&wn){var l=e,s=u;
+e=u=X}var h=c?X:Os(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(yn|dn)&&(t&=~(yn|dn)),t&&t!=_n)_=t==yn||t==dn?Hu(n,t,f):t!=bn&&t!=(_n|bn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t)}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){
+var o=r&hn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case ct:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;
+n=n.buffer,t=t.buffer;case ft:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Nn:case Pn:case Hn:return Gf(+n,+t);case Zn:return n.name==t.name&&n.message==t.message;case nt:case rt:return n==t+"";case Gn:var f=M;case tt:var c=e&hn;if(f||(f=P),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=pn,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case et:if(_s)return _s.call(n)==_s.call(t)}return!1}function vi(n,t,r,e,u,i){var o=r&hn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return!1;
+for(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===X?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),
+i.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+"")}function yi(n){return de(n,Pc,Is)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+"",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wi(n){return(bl.call(Z,"placeholder")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r["string"==typeof t?"string":"hash"]:r.map;
+}function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=!0}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),u}function Oi(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Hl(t,n+o);break;case"takeRight":n=Gl(n,t-o)}}return{start:n,end:t}}function Ii(n){var t=n.match(Bt);
+return t?t[1].split(Tt):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&bl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return"function"!=typeof n.constructor||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ft:return Ru(n);
+case Nn:case Pn:return new e(+n);case ct:return zu(n,r);case at:case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:return Wu(n,r);case Gn:return new e;case Hn:case rt:return new e(n);case nt:return Eu(n);case tt:return new e;case et:return Su(n)}}function Wi(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n;
+return t=null==t?Wn:t,!!t&&("number"==r||"symbol"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return!1;var e=typeof t;return!!("number"==e?Hf(r)&&Ci(t,r.length):"string"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!bc(n))||(zt.test(n)||!Rt.test(n)||null!=t&&n in ll(t))}function Ti(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function $i(n){
+var t=bi(n),r=Z[t];if("function"!=typeof r||!(t in Ct.prototype))return!1;if(n===r)return!0;var e=Os(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){var t=Cf(n,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(_n|vn|mn),o=e==mn&&r==yn||e==mn&&r==xn&&n[7].length<=t[8]||e==(mn|xn)&&t[7].length<=t[8]&&r==yn;
+if(!i&&!o)return n;e&_n&&(n[2]=t[2],u|=r&_n?0:gn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],cn):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],cn):t[6]),f=t[7],f&&(n[7]=f),e&mn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i];
+i=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Yi(n,t,r){var e=t+"";return Ls(n,Wi(e,ro(Ii(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=In-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0;
+return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if("string"==typeof n||bc(n))return n;var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function ro(n,t){return r($n,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ct)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);
+return t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1));
+}function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),!0,!0):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),!0):[]}function so(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);
+return u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,!0)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Sn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){
+var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?"":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,!0)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Oo(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n;
+}function Io(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){
+return su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,!0)}function Bo(n,t,r){return hu(n,t,mi(r,2),!0)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,!0)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[]}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){
+return n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),!1,!0):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}function Vo(n,t){return t="function"==typeof t?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
+if(Jf(n))return t=Gl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Sr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function nf(n,t){return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value()));
+var n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo);
+}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)),
+dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),
+(bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if("function"!=typeof t)throw new pl(en);
+return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_;
+}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new pl(en);return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
+s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||sr),r}function Uf(n){if("function"!=typeof n)throw new pl(en);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
+return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if("function"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if("function"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
+Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t="function"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t="function"==typeof t?t:X,Fr(n,an|sn,t)}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n);
+}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r="function"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e;
+}function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||"string"==typeof n.message&&"string"==typeof n.name&&!gc(n)}function ec(n){return"number"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return"number"==typeof n&&n==kc(n)}function oc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&"object"==typeof n}function ac(n,t){
+return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r="function"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return"number"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;var r=bl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){
+return ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return"string"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return"symbol"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){
+var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if("number"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t);
+}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je);
+}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])];
+i===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e="function"==typeof e?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Oh(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e="function"==typeof e?e:X,
+null==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Ic(r),r=r===r?r:0),t!==X&&(t=Ic(t),t=t===t?t:0),Mr(Ic(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Ic(n),Ae(n,t,r)}function oa(n,t,r){if(r&&"boolean"!=typeof r&&Ui(n,t,r)&&(t=r=X),r===X&&("boolean"==typeof t?(r=t,t=X):"boolean"==typeof n&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){
+var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t);
+var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Lt,""),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&"number"!=typeof r&&Ui(n,t,r)&&(t=r=X),
+(r=r===X?Un:r>>>0)?(n=Ec(n),n&&("string"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s="__p += '",h=sl((t.escape||Ht).source+"|"+l.source+"|"+(l===It?Ft:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+(bl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zr+"]")+"\n";
+n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=bl.call(t,"variable")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(dt,""):s).replace(bt,"$1").replace(wt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
+var v=Xh(function(){return cl(f,p+"return "+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,"");
+if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join("")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index;
+c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){
+return Nr(Fr(n,an))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De("function"==typeof n?n:Fr(n,an))}function Ua(n){return qe(Fr(n,an))}function Ba(n,t){return Ze(n,Fr(t,an))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&"chain"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;
+if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return!1}function Za(){return{}}function Ka(){return"";
+}function Va(){return!0}function Ga(n,t){if(n=kc(n),n<1||n>Wn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X;
+}function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,qr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x["__core-js_shared__"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl("^"+dl.call(bl).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ol=ie?x.Buffer:X,Il=x.Symbol,Rl=x.Uint8Array,zl=Ol?Ol.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Il?Il.isConcatSpreadable:X,Ul=Il?Il.iterator:X,Bl=Il?Il.toStringTag:X,Tl=function(){
+try{var n=Ai(ll,"defineProperty");return n({},"",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Ol?Ol.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,"DataView"),ts=Ai(x,"Map"),rs=Ai(x,"Promise"),es=Ai(x,"Set"),us=Ai(x,"WeakMap"),is=Ai(ll,"create"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Il?Il.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){
+function n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:kt,evaluate:Ot,interpolate:It,variable:"",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ct.prototype=gs(J.prototype),Ct.prototype.constructor=Ct,Xt.prototype.clear=nr,Xt.prototype.delete=tr,Xt.prototype.get=rr,Xt.prototype.has=er,Xt.prototype.set=ur,ir.prototype.clear=or,ir.prototype.delete=fr,
+ir.prototype.get=cr,ir.prototype.has=ar,ir.prototype.set=lr,sr.prototype.clear=hr,sr.prototype.delete=pr,sr.prototype.get=_r,sr.prototype.has=vr,sr.prototype.set=gr,yr.prototype.add=yr.prototype.push=dr,yr.prototype.has=br,wr.prototype.clear=mr,wr.prototype.delete=xr,wr.prototype.get=jr,wr.prototype.has=Ar,wr.prototype.set=kr;var ys=Pu(ue),ds=Pu(oe,!0),bs=qu(),ws=qu(!0),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,"toString",{configurable:!0,enumerable:!1,value:Sa(t),
+writable:!0})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Sn?function(n){return new es(n)}:Da,Os=os?function(n){return os.get(n)}:Da,Is=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Is(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=ct||ts&&zs(new ts)!=Gn||rs&&zs(rs.resolve())!=Qn||es&&zs(new es)!=tt||us&&zs(new us)!=it)&&(zs=function(n){var t=we(n),r=t==Yn?n.constructor:X,e=r?to(r):"";
+if(e)switch(e){case cs:return ct;case as:return Gn;case ls:return Qn;case ss:return tt;case hs:return it}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Et,function(n,r,e,u){t.push(e?u.replace(Mt,"$1"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,!0)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),mi(r,2)):[]}),Ts=uu(function(n,t){
+var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t="function"==typeof t?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Oo),Ns=gi(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){
+return gu(ee(n,1,Jf,!0))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,!0),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,gu(ee(n,1,Jf,!0),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r="function"==typeof r?(n.pop(),
+r):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i="function"==typeof r,o=Hf(t)?il(t.length):[];
+return ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn;
+}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,bn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,xn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){
+return n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e);
+}),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Ie),Dh=Nu(function(n,t,r){
+Ke(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){
+return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){
+return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh,
+Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc,
+Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf,
+Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea,
+Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po,
+Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh,
+Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka,
+Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc,
+Z.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ct.prototype[n]=function(r){
+r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?"Right":"")}),e},Ct.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
+var r="take"+(t?"Right":"");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return"function"==typeof n?new Ct(this):this.map(function(r){
+return Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
+u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
+var t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:"wrapper",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs,
+Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this); \ No newline at end of file
diff --git a/node_modules/lodash/lowerCase.js b/node_modules/lodash/lowerCase.js
new file mode 100644
index 0000000..66c1f49
--- /dev/null
+++ b/node_modules/lodash/lowerCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+});
+
+module.exports = lowerCase;
diff --git a/node_modules/lodash/lowerFirst.js b/node_modules/lodash/lowerFirst.js
new file mode 100644
index 0000000..c08f082
--- /dev/null
+++ b/node_modules/lodash/lowerFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+var lowerFirst = createCaseFirst('toLowerCase');
+
+module.exports = lowerFirst;
diff --git a/node_modules/lodash/lt.js b/node_modules/lodash/lt.js
new file mode 100644
index 0000000..813866e
--- /dev/null
+++ b/node_modules/lodash/lt.js
@@ -0,0 +1,29 @@
+var baseLt = require('./_baseLt'),
+ createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+var lt = createRelationalOperation(baseLt);
+
+module.exports = lt;
diff --git a/node_modules/lodash/lte.js b/node_modules/lodash/lte.js
new file mode 100644
index 0000000..382f661
--- /dev/null
+++ b/node_modules/lodash/lte.js
@@ -0,0 +1,30 @@
+var createRelationalOperation = require('./_createRelationalOperation');
+
+/**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+});
+
+module.exports = lte;
diff --git a/node_modules/lodash/map.js b/node_modules/lodash/map.js
new file mode 100644
index 0000000..22efee7
--- /dev/null
+++ b/node_modules/lodash/map.js
@@ -0,0 +1,53 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ isArray = require('./isArray');
+
+/**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, baseIteratee(iteratee, 3));
+}
+
+module.exports = map;
diff --git a/node_modules/lodash/mapKeys.js b/node_modules/lodash/mapKeys.js
new file mode 100644
index 0000000..3b68797
--- /dev/null
+++ b/node_modules/lodash/mapKeys.js
@@ -0,0 +1,36 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = baseIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+}
+
+module.exports = mapKeys;
diff --git a/node_modules/lodash/mapValues.js b/node_modules/lodash/mapValues.js
new file mode 100644
index 0000000..4ec0825
--- /dev/null
+++ b/node_modules/lodash/mapValues.js
@@ -0,0 +1,43 @@
+var baseAssignValue = require('./_baseAssignValue'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = baseIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+}
+
+module.exports = mapValues;
diff --git a/node_modules/lodash/matches.js b/node_modules/lodash/matches.js
new file mode 100644
index 0000000..e10b351
--- /dev/null
+++ b/node_modules/lodash/matches.js
@@ -0,0 +1,46 @@
+var baseClone = require('./_baseClone'),
+ baseMatches = require('./_baseMatches');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = matches;
diff --git a/node_modules/lodash/matchesProperty.js b/node_modules/lodash/matchesProperty.js
new file mode 100644
index 0000000..e6f1a88
--- /dev/null
+++ b/node_modules/lodash/matchesProperty.js
@@ -0,0 +1,44 @@
+var baseClone = require('./_baseClone'),
+ baseMatchesProperty = require('./_baseMatchesProperty');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+}
+
+module.exports = matchesProperty;
diff --git a/node_modules/lodash/math.js b/node_modules/lodash/math.js
new file mode 100644
index 0000000..5966887
--- /dev/null
+++ b/node_modules/lodash/math.js
@@ -0,0 +1,17 @@
+module.exports = {
+ 'add': require('./add'),
+ 'ceil': require('./ceil'),
+ 'divide': require('./divide'),
+ 'floor': require('./floor'),
+ 'max': require('./max'),
+ 'maxBy': require('./maxBy'),
+ 'mean': require('./mean'),
+ 'meanBy': require('./meanBy'),
+ 'min': require('./min'),
+ 'minBy': require('./minBy'),
+ 'multiply': require('./multiply'),
+ 'round': require('./round'),
+ 'subtract': require('./subtract'),
+ 'sum': require('./sum'),
+ 'sumBy': require('./sumBy')
+};
diff --git a/node_modules/lodash/max.js b/node_modules/lodash/max.js
new file mode 100644
index 0000000..142ad8c
--- /dev/null
+++ b/node_modules/lodash/max.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ identity = require('./identity');
+
+/**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+}
+
+module.exports = max;
diff --git a/node_modules/lodash/maxBy.js b/node_modules/lodash/maxBy.js
new file mode 100644
index 0000000..2eba9c0
--- /dev/null
+++ b/node_modules/lodash/maxBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseGt = require('./_baseGt'),
+ baseIteratee = require('./_baseIteratee');
+
+/**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)
+ : undefined;
+}
+
+module.exports = maxBy;
diff --git a/node_modules/lodash/mean.js b/node_modules/lodash/mean.js
new file mode 100644
index 0000000..e3ffff6
--- /dev/null
+++ b/node_modules/lodash/mean.js
@@ -0,0 +1,22 @@
+var baseMean = require('./_baseMean'),
+ identity = require('./identity');
+
+/**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+function mean(array) {
+ return baseMean(array, identity);
+}
+
+module.exports = mean;
diff --git a/node_modules/lodash/meanBy.js b/node_modules/lodash/meanBy.js
new file mode 100644
index 0000000..b031671
--- /dev/null
+++ b/node_modules/lodash/meanBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseMean = require('./_baseMean');
+
+/**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+function meanBy(array, iteratee) {
+ return baseMean(array, baseIteratee(iteratee, 2));
+}
+
+module.exports = meanBy;
diff --git a/node_modules/lodash/memoize.js b/node_modules/lodash/memoize.js
new file mode 100644
index 0000000..d6035af
--- /dev/null
+++ b/node_modules/lodash/memoize.js
@@ -0,0 +1,73 @@
+var MapCache = require('./_MapCache');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+}
+
+// Expose `MapCache`.
+memoize.Cache = MapCache;
+
+module.exports = memoize;
diff --git a/node_modules/lodash/merge.js b/node_modules/lodash/merge.js
new file mode 100644
index 0000000..4bbc3a1
--- /dev/null
+++ b/node_modules/lodash/merge.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+});
+
+module.exports = merge;
diff --git a/node_modules/lodash/mergeWith.js b/node_modules/lodash/mergeWith.js
new file mode 100644
index 0000000..1b43a2c
--- /dev/null
+++ b/node_modules/lodash/mergeWith.js
@@ -0,0 +1,39 @@
+var baseMerge = require('./_baseMerge'),
+ createAssigner = require('./_createAssigner');
+
+/**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+});
+
+module.exports = mergeWith;
diff --git a/node_modules/lodash/method.js b/node_modules/lodash/method.js
new file mode 100644
index 0000000..23ec32d
--- /dev/null
+++ b/node_modules/lodash/method.js
@@ -0,0 +1,34 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = method;
diff --git a/node_modules/lodash/methodOf.js b/node_modules/lodash/methodOf.js
new file mode 100644
index 0000000..df59b57
--- /dev/null
+++ b/node_modules/lodash/methodOf.js
@@ -0,0 +1,33 @@
+var baseInvoke = require('./_baseInvoke'),
+ baseRest = require('./_baseRest');
+
+/**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+});
+
+module.exports = methodOf;
diff --git a/node_modules/lodash/min.js b/node_modules/lodash/min.js
new file mode 100644
index 0000000..428f571
--- /dev/null
+++ b/node_modules/lodash/min.js
@@ -0,0 +1,29 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseLt = require('./_baseLt'),
+ identity = require('./identity');
+
+/**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+}
+
+module.exports = min;
diff --git a/node_modules/lodash/minBy.js b/node_modules/lodash/minBy.js
new file mode 100644
index 0000000..b2697e4
--- /dev/null
+++ b/node_modules/lodash/minBy.js
@@ -0,0 +1,34 @@
+var baseExtremum = require('./_baseExtremum'),
+ baseIteratee = require('./_baseIteratee'),
+ baseLt = require('./_baseLt');
+
+/**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)
+ : undefined;
+}
+
+module.exports = minBy;
diff --git a/node_modules/lodash/mixin.js b/node_modules/lodash/mixin.js
new file mode 100644
index 0000000..6dc9674
--- /dev/null
+++ b/node_modules/lodash/mixin.js
@@ -0,0 +1,74 @@
+var arrayEach = require('./_arrayEach'),
+ arrayPush = require('./_arrayPush'),
+ baseFunctions = require('./_baseFunctions'),
+ copyArray = require('./_copyArray'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ keys = require('./keys');
+
+/**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+}
+
+module.exports = mixin;
diff --git a/node_modules/lodash/multiply.js b/node_modules/lodash/multiply.js
new file mode 100644
index 0000000..d7876e1
--- /dev/null
+++ b/node_modules/lodash/multiply.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+}, 1);
+
+module.exports = multiply;
diff --git a/node_modules/lodash/negate.js b/node_modules/lodash/negate.js
new file mode 100644
index 0000000..5a65cd1
--- /dev/null
+++ b/node_modules/lodash/negate.js
@@ -0,0 +1,40 @@
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+}
+
+module.exports = negate;
diff --git a/node_modules/lodash/next.js b/node_modules/lodash/next.js
new file mode 100644
index 0000000..55f949c
--- /dev/null
+++ b/node_modules/lodash/next.js
@@ -0,0 +1,35 @@
+var toArray = require('./toArray');
+
+/**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+}
+
+module.exports = wrapperNext;
diff --git a/node_modules/lodash/noop.js b/node_modules/lodash/noop.js
new file mode 100644
index 0000000..3c0862e
--- /dev/null
+++ b/node_modules/lodash/noop.js
@@ -0,0 +1,17 @@
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+ // No operation performed.
+}
+
+module.exports = noop;
diff --git a/node_modules/lodash/now.js b/node_modules/lodash/now.js
new file mode 100644
index 0000000..44a0562
--- /dev/null
+++ b/node_modules/lodash/now.js
@@ -0,0 +1,23 @@
+var root = require('./_root');
+
+/**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+var now = function() {
+ return root.Date.now();
+};
+
+module.exports = now;
diff --git a/node_modules/lodash/nth.js b/node_modules/lodash/nth.js
new file mode 100644
index 0000000..8a344de
--- /dev/null
+++ b/node_modules/lodash/nth.js
@@ -0,0 +1,29 @@
+var baseNth = require('./_baseNth'),
+ toInteger = require('./toInteger');
+
+/**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+}
+
+module.exports = nth;
diff --git a/node_modules/lodash/nthArg.js b/node_modules/lodash/nthArg.js
new file mode 100644
index 0000000..09406dd
--- /dev/null
+++ b/node_modules/lodash/nthArg.js
@@ -0,0 +1,32 @@
+var baseNth = require('./_baseNth'),
+ baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+}
+
+module.exports = nthArg;
diff --git a/node_modules/lodash/number.js b/node_modules/lodash/number.js
new file mode 100644
index 0000000..c3b0100
--- /dev/null
+++ b/node_modules/lodash/number.js
@@ -0,0 +1,5 @@
+module.exports = {
+ 'clamp': require('./clamp'),
+ 'inRange': require('./inRange'),
+ 'random': require('./random')
+};
diff --git a/node_modules/lodash/object.js b/node_modules/lodash/object.js
new file mode 100644
index 0000000..f046b05
--- /dev/null
+++ b/node_modules/lodash/object.js
@@ -0,0 +1,49 @@
+module.exports = {
+ 'assign': require('./assign'),
+ 'assignIn': require('./assignIn'),
+ 'assignInWith': require('./assignInWith'),
+ 'assignWith': require('./assignWith'),
+ 'at': require('./at'),
+ 'create': require('./create'),
+ 'defaults': require('./defaults'),
+ 'defaultsDeep': require('./defaultsDeep'),
+ 'entries': require('./entries'),
+ 'entriesIn': require('./entriesIn'),
+ 'extend': require('./extend'),
+ 'extendWith': require('./extendWith'),
+ 'findKey': require('./findKey'),
+ 'findLastKey': require('./findLastKey'),
+ 'forIn': require('./forIn'),
+ 'forInRight': require('./forInRight'),
+ 'forOwn': require('./forOwn'),
+ 'forOwnRight': require('./forOwnRight'),
+ 'functions': require('./functions'),
+ 'functionsIn': require('./functionsIn'),
+ 'get': require('./get'),
+ 'has': require('./has'),
+ 'hasIn': require('./hasIn'),
+ 'invert': require('./invert'),
+ 'invertBy': require('./invertBy'),
+ 'invoke': require('./invoke'),
+ 'keys': require('./keys'),
+ 'keysIn': require('./keysIn'),
+ 'mapKeys': require('./mapKeys'),
+ 'mapValues': require('./mapValues'),
+ 'merge': require('./merge'),
+ 'mergeWith': require('./mergeWith'),
+ 'omit': require('./omit'),
+ 'omitBy': require('./omitBy'),
+ 'pick': require('./pick'),
+ 'pickBy': require('./pickBy'),
+ 'result': require('./result'),
+ 'set': require('./set'),
+ 'setWith': require('./setWith'),
+ 'toPairs': require('./toPairs'),
+ 'toPairsIn': require('./toPairsIn'),
+ 'transform': require('./transform'),
+ 'unset': require('./unset'),
+ 'update': require('./update'),
+ 'updateWith': require('./updateWith'),
+ 'values': require('./values'),
+ 'valuesIn': require('./valuesIn')
+};
diff --git a/node_modules/lodash/omit.js b/node_modules/lodash/omit.js
new file mode 100644
index 0000000..97f5f54
--- /dev/null
+++ b/node_modules/lodash/omit.js
@@ -0,0 +1,57 @@
+var arrayMap = require('./_arrayMap'),
+ baseClone = require('./_baseClone'),
+ baseUnset = require('./_baseUnset'),
+ castPath = require('./_castPath'),
+ copyObject = require('./_copyObject'),
+ customOmitClone = require('./_customOmitClone'),
+ flatRest = require('./_flatRest'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+});
+
+module.exports = omit;
diff --git a/node_modules/lodash/omitBy.js b/node_modules/lodash/omitBy.js
new file mode 100644
index 0000000..a064036
--- /dev/null
+++ b/node_modules/lodash/omitBy.js
@@ -0,0 +1,29 @@
+var baseIteratee = require('./_baseIteratee'),
+ negate = require('./negate'),
+ pickBy = require('./pickBy');
+
+/**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+function omitBy(object, predicate) {
+ return pickBy(object, negate(baseIteratee(predicate)));
+}
+
+module.exports = omitBy;
diff --git a/node_modules/lodash/once.js b/node_modules/lodash/once.js
new file mode 100644
index 0000000..0706fc3
--- /dev/null
+++ b/node_modules/lodash/once.js
@@ -0,0 +1,25 @@
+var before = require('./before');
+
+/**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+function once(func) {
+ return before(2, func);
+}
+
+module.exports = once;
diff --git a/node_modules/lodash/orderBy.js b/node_modules/lodash/orderBy.js
new file mode 100644
index 0000000..7195c8c
--- /dev/null
+++ b/node_modules/lodash/orderBy.js
@@ -0,0 +1,47 @@
+var baseOrderBy = require('./_baseOrderBy'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+}
+
+module.exports = orderBy;
diff --git a/node_modules/lodash/over.js b/node_modules/lodash/over.js
new file mode 100644
index 0000000..bea2f91
--- /dev/null
+++ b/node_modules/lodash/over.js
@@ -0,0 +1,24 @@
+var arrayMap = require('./_arrayMap'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+var over = createOver(arrayMap);
+
+module.exports = over;
diff --git a/node_modules/lodash/overArgs.js b/node_modules/lodash/overArgs.js
new file mode 100644
index 0000000..f0067db
--- /dev/null
+++ b/node_modules/lodash/overArgs.js
@@ -0,0 +1,61 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUnary = require('./_baseUnary'),
+ castRest = require('./_castRest'),
+ isArray = require('./isArray');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(baseIteratee))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+});
+
+module.exports = overArgs;
diff --git a/node_modules/lodash/overEvery.js b/node_modules/lodash/overEvery.js
new file mode 100644
index 0000000..fb19d13
--- /dev/null
+++ b/node_modules/lodash/overEvery.js
@@ -0,0 +1,34 @@
+var arrayEvery = require('./_arrayEvery'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+var overEvery = createOver(arrayEvery);
+
+module.exports = overEvery;
diff --git a/node_modules/lodash/overSome.js b/node_modules/lodash/overSome.js
new file mode 100644
index 0000000..414ab66
--- /dev/null
+++ b/node_modules/lodash/overSome.js
@@ -0,0 +1,37 @@
+var arraySome = require('./_arraySome'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ *
+ * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
+ * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
+ */
+var overSome = createOver(arraySome);
+
+module.exports = overSome;
diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json
new file mode 100644
index 0000000..b35fd95
--- /dev/null
+++ b/node_modules/lodash/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash",
+ "version": "4.17.21",
+ "description": "Lodash modular utilities.",
+ "keywords": "modules, stdlib, util",
+ "homepage": "https://lodash.com/",
+ "repository": "lodash/lodash",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "main": "lodash.js",
+ "author": "John-David Dalton <john.david.dalton@gmail.com>",
+ "contributors": [
+ "John-David Dalton <john.david.dalton@gmail.com>",
+ "Mathias Bynens <mathias@qiwi.be>"
+ ],
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }
+}
diff --git a/node_modules/lodash/pad.js b/node_modules/lodash/pad.js
new file mode 100644
index 0000000..77e1f1c
--- /dev/null
+++ b/node_modules/lodash/pad.js
@@ -0,0 +1,49 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor;
+
+/**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+}
+
+module.exports = pad;
diff --git a/node_modules/lodash/padEnd.js b/node_modules/lodash/padEnd.js
new file mode 100644
index 0000000..224eb80
--- /dev/null
+++ b/node_modules/lodash/padEnd.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+}
+
+module.exports = padEnd;
diff --git a/node_modules/lodash/padStart.js b/node_modules/lodash/padStart.js
new file mode 100644
index 0000000..f991866
--- /dev/null
+++ b/node_modules/lodash/padStart.js
@@ -0,0 +1,39 @@
+var createPadding = require('./_createPadding'),
+ stringSize = require('./_stringSize'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+}
+
+module.exports = padStart;
diff --git a/node_modules/lodash/parseInt.js b/node_modules/lodash/parseInt.js
new file mode 100644
index 0000000..b89ac63
--- /dev/null
+++ b/node_modules/lodash/parseInt.js
@@ -0,0 +1,43 @@
+var root = require('./_root'),
+ toString = require('./toString');
+
+/** Used to match leading whitespace. */
+var reTrimStart = /^\s+/;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeParseInt = root.parseInt;
+
+/**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+}
+
+module.exports = parseInt;
diff --git a/node_modules/lodash/partial.js b/node_modules/lodash/partial.js
new file mode 100644
index 0000000..05fe8d3
--- /dev/null
+++ b/node_modules/lodash/partial.js
@@ -0,0 +1,50 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+});
+
+// Assign default placeholders.
+partial.placeholder = {};
+
+module.exports = partial;
diff --git a/node_modules/lodash/partialRight.js b/node_modules/lodash/partialRight.js
new file mode 100644
index 0000000..eee031f
--- /dev/null
+++ b/node_modules/lodash/partialRight.js
@@ -0,0 +1,49 @@
+var baseRest = require('./_baseRest'),
+ createWrap = require('./_createWrap'),
+ getHolder = require('./_getHolder'),
+ replaceHolders = require('./_replaceHolders');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+});
+
+// Assign default placeholders.
+partialRight.placeholder = {};
+
+module.exports = partialRight;
diff --git a/node_modules/lodash/partition.js b/node_modules/lodash/partition.js
new file mode 100644
index 0000000..6b814a9
--- /dev/null
+++ b/node_modules/lodash/partition.js
@@ -0,0 +1,43 @@
+var createAggregator = require('./_createAggregator');
+
+/**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+}, function() { return [[], []]; });
+
+module.exports = partition;
diff --git a/node_modules/lodash/pick.js b/node_modules/lodash/pick.js
new file mode 100644
index 0000000..3160199
--- /dev/null
+++ b/node_modules/lodash/pick.js
@@ -0,0 +1,25 @@
+var basePick = require('./_basePick'),
+ flatRest = require('./_flatRest');
+
+/**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+});
+
+module.exports = pick;
diff --git a/node_modules/lodash/pickBy.js b/node_modules/lodash/pickBy.js
new file mode 100644
index 0000000..ae7c271
--- /dev/null
+++ b/node_modules/lodash/pickBy.js
@@ -0,0 +1,37 @@
+var arrayMap = require('./_arrayMap'),
+ baseIteratee = require('./_baseIteratee'),
+ basePickBy = require('./_basePickBy'),
+ getAllKeysIn = require('./_getAllKeysIn');
+
+/**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = baseIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+}
+
+module.exports = pickBy;
diff --git a/node_modules/lodash/plant.js b/node_modules/lodash/plant.js
new file mode 100644
index 0000000..23776f3
--- /dev/null
+++ b/node_modules/lodash/plant.js
@@ -0,0 +1,48 @@
+var baseLodash = require('./_baseLodash'),
+ wrapperClone = require('./_wrapperClone');
+
+/**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+}
+
+module.exports = wrapperPlant;
diff --git a/node_modules/lodash/property.js b/node_modules/lodash/property.js
new file mode 100644
index 0000000..ca8202f
--- /dev/null
+++ b/node_modules/lodash/property.js
@@ -0,0 +1,32 @@
+var baseProperty = require('./_baseProperty'),
+ basePropertyDeep = require('./_basePropertyDeep'),
+ isKey = require('./_isKey'),
+ toKey = require('./_toKey');
+
+/**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+}
+
+module.exports = property;
diff --git a/node_modules/lodash/propertyOf.js b/node_modules/lodash/propertyOf.js
new file mode 100644
index 0000000..384044d
--- /dev/null
+++ b/node_modules/lodash/propertyOf.js
@@ -0,0 +1,30 @@
+var baseGet = require('./_baseGet');
+
+/**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+}
+
+module.exports = propertyOf;
diff --git a/node_modules/lodash/pull.js b/node_modules/lodash/pull.js
new file mode 100644
index 0000000..a2efcb5
--- /dev/null
+++ b/node_modules/lodash/pull.js
@@ -0,0 +1,29 @@
+var baseRest = require('./_baseRest'),
+ pullAll = require('./pullAll');
+
+/**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+var pull = baseRest(pullAll);
+
+module.exports = pull;
diff --git a/node_modules/lodash/pullAll.js b/node_modules/lodash/pullAll.js
new file mode 100644
index 0000000..f4605c2
--- /dev/null
+++ b/node_modules/lodash/pullAll.js
@@ -0,0 +1,29 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+}
+
+module.exports = pullAll;
diff --git a/node_modules/lodash/pullAllBy.js b/node_modules/lodash/pullAllBy.js
new file mode 100644
index 0000000..74025e8
--- /dev/null
+++ b/node_modules/lodash/pullAllBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, baseIteratee(iteratee, 2))
+ : array;
+}
+
+module.exports = pullAllBy;
diff --git a/node_modules/lodash/pullAllWith.js b/node_modules/lodash/pullAllWith.js
new file mode 100644
index 0000000..1d2fd9f
--- /dev/null
+++ b/node_modules/lodash/pullAllWith.js
@@ -0,0 +1,32 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+}
+
+module.exports = pullAllWith;
diff --git a/node_modules/lodash/pullAt.js b/node_modules/lodash/pullAt.js
new file mode 100644
index 0000000..6ed84e0
--- /dev/null
+++ b/node_modules/lodash/pullAt.js
@@ -0,0 +1,43 @@
+var arrayMap = require('./_arrayMap'),
+ baseAt = require('./_baseAt'),
+ basePullAt = require('./_basePullAt'),
+ compareAscending = require('./_compareAscending'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex');
+
+/**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+});
+
+module.exports = pullAt;
diff --git a/node_modules/lodash/random.js b/node_modules/lodash/random.js
new file mode 100644
index 0000000..8067711
--- /dev/null
+++ b/node_modules/lodash/random.js
@@ -0,0 +1,82 @@
+var baseRandom = require('./_baseRandom'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toFinite = require('./toFinite');
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseFloat = parseFloat;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min,
+ nativeRandom = Math.random;
+
+/**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+}
+
+module.exports = random;
diff --git a/node_modules/lodash/range.js b/node_modules/lodash/range.js
new file mode 100644
index 0000000..fa63b09
--- /dev/null
+++ b/node_modules/lodash/range.js
@@ -0,0 +1,46 @@
+var createRange = require('./_createRange');
+
+/**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+var range = createRange();
+
+module.exports = range;
diff --git a/node_modules/lodash/rangeRight.js b/node_modules/lodash/rangeRight.js
new file mode 100644
index 0000000..271fafc
--- /dev/null
+++ b/node_modules/lodash/rangeRight.js
@@ -0,0 +1,41 @@
+var createRange = require('./_createRange');
+
+/**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+var rangeRight = createRange(true);
+
+module.exports = rangeRight;
diff --git a/node_modules/lodash/rearg.js b/node_modules/lodash/rearg.js
new file mode 100644
index 0000000..a3e1970
--- /dev/null
+++ b/node_modules/lodash/rearg.js
@@ -0,0 +1,33 @@
+var createWrap = require('./_createWrap'),
+ flatRest = require('./_flatRest');
+
+/** Used to compose bitmasks for function metadata. */
+var WRAP_REARG_FLAG = 256;
+
+/**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+});
+
+module.exports = rearg;
diff --git a/node_modules/lodash/reduce.js b/node_modules/lodash/reduce.js
new file mode 100644
index 0000000..5a1df4d
--- /dev/null
+++ b/node_modules/lodash/reduce.js
@@ -0,0 +1,51 @@
+var arrayReduce = require('./_arrayReduce'),
+ baseEach = require('./_baseEach'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+}
+
+module.exports = reduce;
diff --git a/node_modules/lodash/reduceRight.js b/node_modules/lodash/reduceRight.js
new file mode 100644
index 0000000..e06a7cb
--- /dev/null
+++ b/node_modules/lodash/reduceRight.js
@@ -0,0 +1,36 @@
+var arrayReduceRight = require('./_arrayReduceRight'),
+ baseEachRight = require('./_baseEachRight'),
+ baseIteratee = require('./_baseIteratee'),
+ baseReduce = require('./_baseReduce'),
+ isArray = require('./isArray');
+
+/**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+}
+
+module.exports = reduceRight;
diff --git a/node_modules/lodash/reject.js b/node_modules/lodash/reject.js
new file mode 100644
index 0000000..a13e554
--- /dev/null
+++ b/node_modules/lodash/reject.js
@@ -0,0 +1,46 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray'),
+ negate = require('./negate');
+
+/**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(baseIteratee(predicate, 3)));
+}
+
+module.exports = reject;
diff --git a/node_modules/lodash/release.md b/node_modules/lodash/release.md
new file mode 100644
index 0000000..465d8ff
--- /dev/null
+++ b/node_modules/lodash/release.md
@@ -0,0 +1,48 @@
+npm run build
+npm run doc
+npm i
+git clone --depth=10 --branch=master git@github.com:lodash-archive/lodash-cli.git ./node_modules/lodash-cli
+mkdir -p ./node_modules/lodash-cli/node_modules/lodash; cd $_; cp ../../../../lodash.js ./lodash.js; cp ../../../../package.json ./package.json
+cd ../../; npm i --production; cd ../../
+node ./node_modules/lodash-cli/bin/lodash core exports=node -o ./npm-package/core.js
+node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./npm-package
+cp lodash.js npm-package/lodash.js
+cp dist/lodash.min.js npm-package/lodash.min.js
+cp LICENSE npm-package/LICENSE
+
+1. Clone two repos
+Bump lodash version in package.json, readme, package=locak, lodash.js
+npm run build
+npm run doc
+
+2. update mappings in ldoash-cli
+3. copy ldoash into lodash-cli node modules and package json.
+
+node ./node_modules/lodash-cli/bin/lodash core exports=node -o ./npm-package/core.js
+node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./npm-package
+
+
+
+1. Clone the two repositories:
+```sh
+$ git clone https://github.com/lodash/lodash.git
+$ git clone https://github.com/bnjmnt4n/lodash-cli.git
+```
+2. Update lodash-cli to accomdate changes in lodash source. This can typically involve adding new function dependency mappings in lib/mappings.js. Sometimes, additional changes might be needed for more involved functions.
+3. In the lodash repository, update references to the lodash version in README.md, lodash.js, package.jsona nd package-lock.json
+4. Run:
+```sh
+npm run build
+npm run doc
+node ../lodash-cli/bin/lodash core -o ./dist/lodash.core.js
+```
+5. Add a commit and tag the release
+mkdir ../lodash-temp
+cp lodash.js dist/lodash.min.js dist/lodash.core.js dist/lodash.core.min.js ../lodash-temp/
+node ../lodash-cli/bin/lodash modularize exports=node -o .
+cp ../lodash-temp/lodash.core.js core.js
+cp ../lodash-temp/lodash.core.min.js core.min.js
+cp ../lodash-temp/lodash.js lodash.js
+cp ../lodash-temp/lodash.min.js lodash.min.js
+
+❯ node ../lodash-cli/bin/lodash modularize exports=es -o .
diff --git a/node_modules/lodash/remove.js b/node_modules/lodash/remove.js
new file mode 100644
index 0000000..87b1898
--- /dev/null
+++ b/node_modules/lodash/remove.js
@@ -0,0 +1,53 @@
+var baseIteratee = require('./_baseIteratee'),
+ basePullAt = require('./_basePullAt');
+
+/**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = baseIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+}
+
+module.exports = remove;
diff --git a/node_modules/lodash/repeat.js b/node_modules/lodash/repeat.js
new file mode 100644
index 0000000..f4d8c69
--- /dev/null
+++ b/node_modules/lodash/repeat.js
@@ -0,0 +1,37 @@
+var baseRepeat = require('./_baseRepeat'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+}
+
+module.exports = repeat;
diff --git a/node_modules/lodash/replace.js b/node_modules/lodash/replace.js
new file mode 100644
index 0000000..6e26ecd
--- /dev/null
+++ b/node_modules/lodash/replace.js
@@ -0,0 +1,29 @@
+var toString = require('./toString');
+
+/**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+}
+
+module.exports = replace;
diff --git a/node_modules/lodash/rest.js b/node_modules/lodash/rest.js
new file mode 100644
index 0000000..eaaad00
--- /dev/null
+++ b/node_modules/lodash/rest.js
@@ -0,0 +1,40 @@
+var baseRest = require('./_baseRest'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+}
+
+module.exports = rest;
diff --git a/node_modules/lodash/result.js b/node_modules/lodash/result.js
new file mode 100644
index 0000000..eae1250
--- /dev/null
+++ b/node_modules/lodash/result.js
@@ -0,0 +1,56 @@
+var castPath = require('./_castPath'),
+ isFunction = require('./isFunction'),
+ toKey = require('./_toKey');
+
+/**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+}
+
+module.exports = result;
diff --git a/node_modules/lodash/reverse.js b/node_modules/lodash/reverse.js
new file mode 100644
index 0000000..21764af
--- /dev/null
+++ b/node_modules/lodash/reverse.js
@@ -0,0 +1,34 @@
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeReverse = arrayProto.reverse;
+
+/**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+}
+
+module.exports = reverse;
diff --git a/node_modules/lodash/round.js b/node_modules/lodash/round.js
new file mode 100644
index 0000000..fccc831
--- /dev/null
+++ b/node_modules/lodash/round.js
@@ -0,0 +1,26 @@
+var createRound = require('./_createRound');
+
+/**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+var round = createRound('round');
+
+module.exports = round;
diff --git a/node_modules/lodash/sample.js b/node_modules/lodash/sample.js
new file mode 100644
index 0000000..39c3560
--- /dev/null
+++ b/node_modules/lodash/sample.js
@@ -0,0 +1,24 @@
+var arraySample = require('./_arraySample'),
+ baseSample = require('./_baseSample'),
+ isArray = require('./isArray');
+
+/**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+}
+
+module.exports = sample;
diff --git a/node_modules/lodash/sampleSize.js b/node_modules/lodash/sampleSize.js
new file mode 100644
index 0000000..a303686
--- /dev/null
+++ b/node_modules/lodash/sampleSize.js
@@ -0,0 +1,37 @@
+var arraySampleSize = require('./_arraySampleSize'),
+ baseSampleSize = require('./_baseSampleSize'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+}
+
+module.exports = sampleSize;
diff --git a/node_modules/lodash/seq.js b/node_modules/lodash/seq.js
new file mode 100644
index 0000000..1570c2d
--- /dev/null
+++ b/node_modules/lodash/seq.js
@@ -0,0 +1,16 @@
+module.exports = {
+ 'at': require('./wrapperAt'),
+ 'chain': require('./chain'),
+ 'commit': require('./commit'),
+ 'lodash': require('./wrapperLodash'),
+ 'next': require('./next'),
+ 'plant': require('./plant'),
+ 'reverse': require('./wrapperReverse'),
+ 'tap': require('./tap'),
+ 'thru': require('./thru'),
+ 'toIterator': require('./toIterator'),
+ 'toJSON': require('./toJSON'),
+ 'value': require('./wrapperValue'),
+ 'valueOf': require('./valueOf'),
+ 'wrapperChain': require('./wrapperChain')
+};
diff --git a/node_modules/lodash/set.js b/node_modules/lodash/set.js
new file mode 100644
index 0000000..d663002
--- /dev/null
+++ b/node_modules/lodash/set.js
@@ -0,0 +1,35 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+}
+
+module.exports = set;
diff --git a/node_modules/lodash/setWith.js b/node_modules/lodash/setWith.js
new file mode 100644
index 0000000..fb3e0f6
--- /dev/null
+++ b/node_modules/lodash/setWith.js
@@ -0,0 +1,32 @@
+var baseSet = require('./_baseSet');
+
+/**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+}
+
+module.exports = setWith;
diff --git a/node_modules/lodash/shuffle.js b/node_modules/lodash/shuffle.js
new file mode 100644
index 0000000..2b72da7
--- /dev/null
+++ b/node_modules/lodash/shuffle.js
@@ -0,0 +1,25 @@
+var arrayShuffle = require('./_arrayShuffle'),
+ baseShuffle = require('./_baseShuffle'),
+ isArray = require('./isArray');
+
+/**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+}
+
+module.exports = shuffle;
diff --git a/node_modules/lodash/size.js b/node_modules/lodash/size.js
new file mode 100644
index 0000000..3561fc1
--- /dev/null
+++ b/node_modules/lodash/size.js
@@ -0,0 +1,46 @@
+var baseKeys = require('./_baseKeys'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ stringSize = require('./_stringSize');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+}
+
+module.exports = size;
diff --git a/node_modules/lodash/slice.js b/node_modules/lodash/slice.js
new file mode 100644
index 0000000..f732442
--- /dev/null
+++ b/node_modules/lodash/slice.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ isIterateeCall = require('./_isIterateeCall'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @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 slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+}
+
+module.exports = slice;
diff --git a/node_modules/lodash/snakeCase.js b/node_modules/lodash/snakeCase.js
new file mode 100644
index 0000000..27f2a76
--- /dev/null
+++ b/node_modules/lodash/snakeCase.js
@@ -0,0 +1,28 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+});
+
+module.exports = snakeCase;
diff --git a/node_modules/lodash/some.js b/node_modules/lodash/some.js
new file mode 100644
index 0000000..9c1d08c
--- /dev/null
+++ b/node_modules/lodash/some.js
@@ -0,0 +1,51 @@
+var arraySome = require('./_arraySome'),
+ baseIteratee = require('./_baseIteratee'),
+ baseSome = require('./_baseSome'),
+ isArray = require('./isArray'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = some;
diff --git a/node_modules/lodash/sortBy.js b/node_modules/lodash/sortBy.js
new file mode 100644
index 0000000..d756aba
--- /dev/null
+++ b/node_modules/lodash/sortBy.js
@@ -0,0 +1,48 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseOrderBy = require('./_baseOrderBy'),
+ baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+});
+
+module.exports = sortBy;
diff --git a/node_modules/lodash/sortedIndex.js b/node_modules/lodash/sortedIndex.js
new file mode 100644
index 0000000..e763473
--- /dev/null
+++ b/node_modules/lodash/sortedIndex.js
@@ -0,0 +1,24 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+}
+
+module.exports = sortedIndex;
diff --git a/node_modules/lodash/sortedIndexBy.js b/node_modules/lodash/sortedIndexBy.js
new file mode 100644
index 0000000..945f23c
--- /dev/null
+++ b/node_modules/lodash/sortedIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));
+}
+
+module.exports = sortedIndexBy;
diff --git a/node_modules/lodash/sortedIndexOf.js b/node_modules/lodash/sortedIndexOf.js
new file mode 100644
index 0000000..e2d3b7a
--- /dev/null
+++ b/node_modules/lodash/sortedIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = sortedIndexOf;
diff --git a/node_modules/lodash/sortedLastIndex.js b/node_modules/lodash/sortedLastIndex.js
new file mode 100644
index 0000000..9380cb9
--- /dev/null
+++ b/node_modules/lodash/sortedLastIndex.js
@@ -0,0 +1,25 @@
+var baseSortedIndex = require('./_baseSortedIndex');
+
+/**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+}
+
+module.exports = sortedLastIndex;
diff --git a/node_modules/lodash/sortedLastIndexBy.js b/node_modules/lodash/sortedLastIndexBy.js
new file mode 100644
index 0000000..9225eeb
--- /dev/null
+++ b/node_modules/lodash/sortedLastIndexBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedIndexBy = require('./_baseSortedIndexBy');
+
+/**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true);
+}
+
+module.exports = sortedLastIndexBy;
diff --git a/node_modules/lodash/sortedLastIndexOf.js b/node_modules/lodash/sortedLastIndexOf.js
new file mode 100644
index 0000000..18bc4c5
--- /dev/null
+++ b/node_modules/lodash/sortedLastIndexOf.js
@@ -0,0 +1,31 @@
+var baseSortedIndex = require('./_baseSortedIndex'),
+ eq = require('./eq');
+
+/**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = sortedLastIndexOf;
diff --git a/node_modules/lodash/sortedUniq.js b/node_modules/lodash/sortedUniq.js
new file mode 100644
index 0000000..866db31
--- /dev/null
+++ b/node_modules/lodash/sortedUniq.js
@@ -0,0 +1,24 @@
+var baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+}
+
+module.exports = sortedUniq;
diff --git a/node_modules/lodash/sortedUniqBy.js b/node_modules/lodash/sortedUniqBy.js
new file mode 100644
index 0000000..4f05ebe
--- /dev/null
+++ b/node_modules/lodash/sortedUniqBy.js
@@ -0,0 +1,26 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSortedUniq = require('./_baseSortedUniq');
+
+/**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, baseIteratee(iteratee, 2))
+ : [];
+}
+
+module.exports = sortedUniqBy;
diff --git a/node_modules/lodash/split.js b/node_modules/lodash/split.js
new file mode 100644
index 0000000..956b48a
--- /dev/null
+++ b/node_modules/lodash/split.js
@@ -0,0 +1,52 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isIterateeCall = require('./_isIterateeCall'),
+ isRegExp = require('./isRegExp'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+}
+
+module.exports = split;
diff --git a/node_modules/lodash/spread.js b/node_modules/lodash/spread.js
new file mode 100644
index 0000000..60a08e2
--- /dev/null
+++ b/node_modules/lodash/spread.js
@@ -0,0 +1,63 @@
+var apply = require('./_apply'),
+ arrayPush = require('./_arrayPush'),
+ baseRest = require('./_baseRest'),
+ castSlice = require('./_castSlice'),
+ toInteger = require('./toInteger');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+}
+
+module.exports = spread;
diff --git a/node_modules/lodash/startCase.js b/node_modules/lodash/startCase.js
new file mode 100644
index 0000000..a48f21c
--- /dev/null
+++ b/node_modules/lodash/startCase.js
@@ -0,0 +1,29 @@
+var createCompounder = require('./_createCompounder'),
+ upperFirst = require('./upperFirst');
+
+/**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+});
+
+module.exports = startCase;
diff --git a/node_modules/lodash/startsWith.js b/node_modules/lodash/startsWith.js
new file mode 100644
index 0000000..956c098
--- /dev/null
+++ b/node_modules/lodash/startsWith.js
@@ -0,0 +1,39 @@
+var baseClamp = require('./_baseClamp'),
+ baseToString = require('./_baseToString'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+function startsWith(string, target, position) {
+ string = toString(string);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+}
+
+module.exports = startsWith;
diff --git a/node_modules/lodash/string.js b/node_modules/lodash/string.js
new file mode 100644
index 0000000..2c829c1
--- /dev/null
+++ b/node_modules/lodash/string.js
@@ -0,0 +1,33 @@
+module.exports = {
+ 'camelCase': require('./camelCase'),
+ 'capitalize': require('./capitalize'),
+ 'deburr': require('./deburr'),
+ 'endsWith': require('./endsWith'),
+ 'escape': require('./escape'),
+ 'escapeRegExp': require('./escapeRegExp'),
+ 'kebabCase': require('./kebabCase'),
+ 'lowerCase': require('./lowerCase'),
+ 'lowerFirst': require('./lowerFirst'),
+ 'pad': require('./pad'),
+ 'padEnd': require('./padEnd'),
+ 'padStart': require('./padStart'),
+ 'parseInt': require('./parseInt'),
+ 'repeat': require('./repeat'),
+ 'replace': require('./replace'),
+ 'snakeCase': require('./snakeCase'),
+ 'split': require('./split'),
+ 'startCase': require('./startCase'),
+ 'startsWith': require('./startsWith'),
+ 'template': require('./template'),
+ 'templateSettings': require('./templateSettings'),
+ 'toLower': require('./toLower'),
+ 'toUpper': require('./toUpper'),
+ 'trim': require('./trim'),
+ 'trimEnd': require('./trimEnd'),
+ 'trimStart': require('./trimStart'),
+ 'truncate': require('./truncate'),
+ 'unescape': require('./unescape'),
+ 'upperCase': require('./upperCase'),
+ 'upperFirst': require('./upperFirst'),
+ 'words': require('./words')
+};
diff --git a/node_modules/lodash/stubArray.js b/node_modules/lodash/stubArray.js
new file mode 100644
index 0000000..f460c15
--- /dev/null
+++ b/node_modules/lodash/stubArray.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
+
+module.exports = stubArray;
diff --git a/node_modules/lodash/stubFalse.js b/node_modules/lodash/stubFalse.js
new file mode 100644
index 0000000..9b346fc
--- /dev/null
+++ b/node_modules/lodash/stubFalse.js
@@ -0,0 +1,18 @@
+/**
+ * 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;
+}
+
+module.exports = stubFalse;
diff --git a/node_modules/lodash/stubObject.js b/node_modules/lodash/stubObject.js
new file mode 100644
index 0000000..1d190a1
--- /dev/null
+++ b/node_modules/lodash/stubObject.js
@@ -0,0 +1,23 @@
+/**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+function stubObject() {
+ return {};
+}
+
+module.exports = stubObject;
diff --git a/node_modules/lodash/stubString.js b/node_modules/lodash/stubString.js
new file mode 100644
index 0000000..2db0bed
--- /dev/null
+++ b/node_modules/lodash/stubString.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+function stubString() {
+ return '';
+}
+
+module.exports = stubString;
diff --git a/node_modules/lodash/stubTrue.js b/node_modules/lodash/stubTrue.js
new file mode 100644
index 0000000..af3cc9e
--- /dev/null
+++ b/node_modules/lodash/stubTrue.js
@@ -0,0 +1,18 @@
+/**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+function stubTrue() {
+ return true;
+}
+
+module.exports = stubTrue;
diff --git a/node_modules/lodash/subtract.js b/node_modules/lodash/subtract.js
new file mode 100644
index 0000000..6720778
--- /dev/null
+++ b/node_modules/lodash/subtract.js
@@ -0,0 +1,22 @@
+var createMathOperation = require('./_createMathOperation');
+
+/**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+}, 0);
+
+module.exports = subtract;
diff --git a/node_modules/lodash/sum.js b/node_modules/lodash/sum.js
new file mode 100644
index 0000000..3b07ee4
--- /dev/null
+++ b/node_modules/lodash/sum.js
@@ -0,0 +1,24 @@
+var baseSum = require('./_baseSum'),
+ identity = require('./identity');
+
+/**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+}
+
+module.exports = sum;
diff --git a/node_modules/lodash/sumBy.js b/node_modules/lodash/sumBy.js
new file mode 100644
index 0000000..00e36d0
--- /dev/null
+++ b/node_modules/lodash/sumBy.js
@@ -0,0 +1,33 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseSum = require('./_baseSum');
+
+/**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, baseIteratee(iteratee, 2))
+ : 0;
+}
+
+module.exports = sumBy;
diff --git a/node_modules/lodash/tail.js b/node_modules/lodash/tail.js
new file mode 100644
index 0000000..001c22d
--- /dev/null
+++ b/node_modules/lodash/tail.js
@@ -0,0 +1,22 @@
+var baseSlice = require('./_baseSlice');
+
+/**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+}
+
+module.exports = tail;
diff --git a/node_modules/lodash/take.js b/node_modules/lodash/take.js
new file mode 100644
index 0000000..b7da712
--- /dev/null
+++ b/node_modules/lodash/take.js
@@ -0,0 +1,37 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = take;
diff --git a/node_modules/lodash/takeRight.js b/node_modules/lodash/takeRight.js
new file mode 100644
index 0000000..6c37506
--- /dev/null
+++ b/node_modules/lodash/takeRight.js
@@ -0,0 +1,39 @@
+var baseSlice = require('./_baseSlice'),
+ toInteger = require('./toInteger');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+}
+
+module.exports = takeRight;
diff --git a/node_modules/lodash/takeRightWhile.js b/node_modules/lodash/takeRightWhile.js
new file mode 100644
index 0000000..94ab783
--- /dev/null
+++ b/node_modules/lodash/takeRightWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3), false, true)
+ : [];
+}
+
+module.exports = takeRightWhile;
diff --git a/node_modules/lodash/takeWhile.js b/node_modules/lodash/takeWhile.js
new file mode 100644
index 0000000..e88f591
--- /dev/null
+++ b/node_modules/lodash/takeWhile.js
@@ -0,0 +1,45 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseWhile = require('./_baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, baseIteratee(predicate, 3))
+ : [];
+}
+
+module.exports = takeWhile;
diff --git a/node_modules/lodash/tap.js b/node_modules/lodash/tap.js
new file mode 100644
index 0000000..d007285
--- /dev/null
+++ b/node_modules/lodash/tap.js
@@ -0,0 +1,29 @@
+/**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+}
+
+module.exports = tap;
diff --git a/node_modules/lodash/template.js b/node_modules/lodash/template.js
new file mode 100644
index 0000000..5c6d6f4
--- /dev/null
+++ b/node_modules/lodash/template.js
@@ -0,0 +1,272 @@
+var assignInWith = require('./assignInWith'),
+ attempt = require('./attempt'),
+ baseValues = require('./_baseValues'),
+ customDefaultsAssignIn = require('./_customDefaultsAssignIn'),
+ escapeStringChar = require('./_escapeStringChar'),
+ isError = require('./isError'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keys = require('./keys'),
+ reInterpolate = require('./_reInterpolate'),
+ templateSettings = require('./templateSettings'),
+ toString = require('./toString');
+
+/** Error message constants. */
+var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
+
+/** Used to match empty string literals in compiled template source. */
+var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+/**
+ * Used to validate the `validate` option in `_.template` variable.
+ *
+ * Forbids characters which could potentially change the meaning of the function argument definition:
+ * - "()," (modification of function parameters)
+ * - "=" (default value)
+ * - "[]{}" (destructuring of function parameters)
+ * - "/" (beginning of a comment)
+ * - whitespace
+ */
+var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
+
+/**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+/** Used to ensure capturing order of template delimiters. */
+var reNoMatch = /($^)/;
+
+/** Used to match unescaped characters in compiled string literals. */
+var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = templateSettings.imports._.templateSettings || templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ // The sourceURL gets injected into the source that's eval-ed, so be careful
+ // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
+ // and escape the comment, thus injecting code that gets evaled.
+ var sourceURL = hasOwnProperty.call(options, 'sourceURL')
+ ? ('//# sourceURL=' +
+ (options.sourceURL + '').replace(/\s/g, ' ') +
+ '\n')
+ : '';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = hasOwnProperty.call(options, 'variable') && options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Throw an error if a forbidden character was found in `variable`, to prevent
+ // potential command injection attacks.
+ else if (reForbiddenIdentifierChars.test(variable)) {
+ throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
+ }
+
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+}
+
+module.exports = template;
diff --git a/node_modules/lodash/templateSettings.js b/node_modules/lodash/templateSettings.js
new file mode 100644
index 0000000..5aa5924
--- /dev/null
+++ b/node_modules/lodash/templateSettings.js
@@ -0,0 +1,67 @@
+var escape = require('./escape'),
+ reEscape = require('./_reEscape'),
+ reEvaluate = require('./_reEvaluate'),
+ reInterpolate = require('./_reInterpolate');
+
+/**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+var templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': { 'escape': escape }
+ }
+};
+
+module.exports = templateSettings;
diff --git a/node_modules/lodash/throttle.js b/node_modules/lodash/throttle.js
new file mode 100644
index 0000000..e2bb806
--- /dev/null
+++ b/node_modules/lodash/throttle.js
@@ -0,0 +1,69 @@
+var debounce = require('./debounce'),
+ isObject = require('./isObject');
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+}
+
+module.exports = throttle;
diff --git a/node_modules/lodash/thru.js b/node_modules/lodash/thru.js
new file mode 100644
index 0000000..91e132e
--- /dev/null
+++ b/node_modules/lodash/thru.js
@@ -0,0 +1,28 @@
+/**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+function thru(value, interceptor) {
+ return interceptor(value);
+}
+
+module.exports = thru;
diff --git a/node_modules/lodash/times.js b/node_modules/lodash/times.js
new file mode 100644
index 0000000..266c90c
--- /dev/null
+++ b/node_modules/lodash/times.js
@@ -0,0 +1,51 @@
+var baseTimes = require('./_baseTimes'),
+ castFunction = require('./_castFunction'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = castFunction(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+}
+
+module.exports = times;
diff --git a/node_modules/lodash/toArray.js b/node_modules/lodash/toArray.js
new file mode 100644
index 0000000..9809584
--- /dev/null
+++ b/node_modules/lodash/toArray.js
@@ -0,0 +1,58 @@
+var Symbol = require('./_Symbol'),
+ copyArray = require('./_copyArray'),
+ getTag = require('./_getTag'),
+ isArrayLike = require('./isArrayLike'),
+ isString = require('./isString'),
+ iteratorToArray = require('./_iteratorToArray'),
+ mapToArray = require('./_mapToArray'),
+ setToArray = require('./_setToArray'),
+ stringToArray = require('./_stringToArray'),
+ values = require('./values');
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ setTag = '[object Set]';
+
+/** Built-in value references. */
+var symIterator = Symbol ? Symbol.iterator : undefined;
+
+/**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+}
+
+module.exports = toArray;
diff --git a/node_modules/lodash/toFinite.js b/node_modules/lodash/toFinite.js
new file mode 100644
index 0000000..3b5bba6
--- /dev/null
+++ b/node_modules/lodash/toFinite.js
@@ -0,0 +1,42 @@
+var toNumber = require('./toNumber');
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308;
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+module.exports = toFinite;
diff --git a/node_modules/lodash/toInteger.js b/node_modules/lodash/toInteger.js
new file mode 100644
index 0000000..c6aadf8
--- /dev/null
+++ b/node_modules/lodash/toInteger.js
@@ -0,0 +1,36 @@
+var toFinite = require('./toFinite');
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+}
+
+module.exports = toInteger;
diff --git a/node_modules/lodash/toIterator.js b/node_modules/lodash/toIterator.js
new file mode 100644
index 0000000..beeed5d
--- /dev/null
+++ b/node_modules/lodash/toIterator.js
@@ -0,0 +1,23 @@
+/**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+function wrapperToIterator() {
+ return this;
+}
+
+module.exports = wrapperToIterator;
diff --git a/node_modules/lodash/toJSON.js b/node_modules/lodash/toJSON.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/node_modules/lodash/toJSON.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/node_modules/lodash/toLength.js b/node_modules/lodash/toLength.js
new file mode 100644
index 0000000..be8f2a7
--- /dev/null
+++ b/node_modules/lodash/toLength.js
@@ -0,0 +1,38 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295;
+
+/**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is 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 convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+}
+
+module.exports = toLength;
diff --git a/node_modules/lodash/toLower.js b/node_modules/lodash/toLower.js
new file mode 100644
index 0000000..b4b7858
--- /dev/null
+++ b/node_modules/lodash/toLower.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+function toLower(value) {
+ return toString(value).toLowerCase();
+}
+
+module.exports = toLower;
diff --git a/node_modules/lodash/toNumber.js b/node_modules/lodash/toNumber.js
new file mode 100644
index 0000000..cf46f10
--- /dev/null
+++ b/node_modules/lodash/toNumber.js
@@ -0,0 +1,64 @@
+var baseTrim = require('./_baseTrim'),
+ isObject = require('./isObject'),
+ isSymbol = require('./isSymbol');
+
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
+
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
+
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
+
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = baseTrim(value);
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
+
+module.exports = toNumber;
diff --git a/node_modules/lodash/toPairs.js b/node_modules/lodash/toPairs.js
new file mode 100644
index 0000000..c4f52ae
--- /dev/null
+++ b/node_modules/lodash/toPairs.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+var toPairs = createToPairs(keys);
+
+module.exports = toPairs;
diff --git a/node_modules/lodash/toPairsIn.js b/node_modules/lodash/toPairsIn.js
new file mode 100644
index 0000000..32c562c
--- /dev/null
+++ b/node_modules/lodash/toPairsIn.js
@@ -0,0 +1,30 @@
+var createToPairs = require('./_createToPairs'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+var toPairsIn = createToPairs(keysIn);
+
+module.exports = toPairsIn;
diff --git a/node_modules/lodash/toPath.js b/node_modules/lodash/toPath.js
new file mode 100644
index 0000000..d3e96ee
--- /dev/null
+++ b/node_modules/lodash/toPath.js
@@ -0,0 +1,33 @@
+var arrayMap = require('./_arrayMap'),
+ copyArray = require('./_copyArray'),
+ isArray = require('./isArray'),
+ isSymbol = require('./isSymbol'),
+ stringToPath = require('./_stringToPath'),
+ toKey = require('./_toKey'),
+ toString = require('./toString');
+
+/**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+}
+
+module.exports = toPath;
diff --git a/node_modules/lodash/toPlainObject.js b/node_modules/lodash/toPlainObject.js
new file mode 100644
index 0000000..5de79b8
--- /dev/null
+++ b/node_modules/lodash/toPlainObject.js
@@ -0,0 +1,32 @@
+var copyObject = require('./_copyObject'),
+ keysIn = require('./keysIn');
+
+/**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+}
+
+module.exports = toPlainObject;
diff --git a/node_modules/lodash/toSafeInteger.js b/node_modules/lodash/toSafeInteger.js
new file mode 100644
index 0000000..f564623
--- /dev/null
+++ b/node_modules/lodash/toSafeInteger.js
@@ -0,0 +1,37 @@
+var baseClamp = require('./_baseClamp'),
+ toInteger = require('./toInteger');
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+function toSafeInteger(value) {
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
+}
+
+module.exports = toSafeInteger;
diff --git a/node_modules/lodash/toString.js b/node_modules/lodash/toString.js
new file mode 100644
index 0000000..daaf681
--- /dev/null
+++ b/node_modules/lodash/toString.js
@@ -0,0 +1,28 @@
+var baseToString = require('./_baseToString');
+
+/**
+ * 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);
+}
+
+module.exports = toString;
diff --git a/node_modules/lodash/toUpper.js b/node_modules/lodash/toUpper.js
new file mode 100644
index 0000000..b3648e8
--- /dev/null
+++ b/node_modules/lodash/toUpper.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+function toUpper(value) {
+ return toString(value).toUpperCase();
+}
+
+module.exports = toUpper;
diff --git a/node_modules/lodash/transform.js b/node_modules/lodash/transform.js
new file mode 100644
index 0000000..d755a15
--- /dev/null
+++ b/node_modules/lodash/transform.js
@@ -0,0 +1,65 @@
+var arrayEach = require('./_arrayEach'),
+ baseCreate = require('./_baseCreate'),
+ baseForOwn = require('./_baseForOwn'),
+ baseIteratee = require('./_baseIteratee'),
+ getPrototype = require('./_getPrototype'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isFunction = require('./isFunction'),
+ isObject = require('./isObject'),
+ isTypedArray = require('./isTypedArray');
+
+/**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = baseIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+}
+
+module.exports = transform;
diff --git a/node_modules/lodash/trim.js b/node_modules/lodash/trim.js
new file mode 100644
index 0000000..13a6ad7
--- /dev/null
+++ b/node_modules/lodash/trim.js
@@ -0,0 +1,47 @@
+var baseToString = require('./_baseToString'),
+ baseTrim = require('./_baseTrim'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/**
+ * 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 baseTrim(string);
+ }
+ 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('');
+}
+
+module.exports = trim;
diff --git a/node_modules/lodash/trimEnd.js b/node_modules/lodash/trimEnd.js
new file mode 100644
index 0000000..8dcd493
--- /dev/null
+++ b/node_modules/lodash/trimEnd.js
@@ -0,0 +1,41 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsEndIndex = require('./_charsEndIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString'),
+ trimmedEndIndex = require('./_trimmedEndIndex');
+
+/**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.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
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.slice(0, trimmedEndIndex(string) + 1);
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+}
+
+module.exports = trimEnd;
diff --git a/node_modules/lodash/trimStart.js b/node_modules/lodash/trimStart.js
new file mode 100644
index 0000000..6cba766
--- /dev/null
+++ b/node_modules/lodash/trimStart.js
@@ -0,0 +1,43 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ charsStartIndex = require('./_charsStartIndex'),
+ stringToArray = require('./_stringToArray'),
+ toString = require('./toString');
+
+/** Used to match leading whitespace. */
+var reTrimStart = /^\s+/;
+
+/**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.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
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+}
+
+module.exports = trimStart;
diff --git a/node_modules/lodash/truncate.js b/node_modules/lodash/truncate.js
new file mode 100644
index 0000000..21fcdfe
--- /dev/null
+++ b/node_modules/lodash/truncate.js
@@ -0,0 +1,111 @@
+var baseToString = require('./_baseToString'),
+ castSlice = require('./_castSlice'),
+ hasUnicode = require('./_hasUnicode'),
+ isObject = require('./isObject'),
+ isRegExp = require('./isRegExp'),
+ stringSize = require('./_stringSize'),
+ stringToArray = require('./_stringToArray'),
+ toInteger = require('./toInteger'),
+ toString = require('./toString');
+
+/** Used as default options for `_.truncate`. */
+var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+}
+
+module.exports = truncate;
diff --git a/node_modules/lodash/unary.js b/node_modules/lodash/unary.js
new file mode 100644
index 0000000..76f48f6
--- /dev/null
+++ b/node_modules/lodash/unary.js
@@ -0,0 +1,22 @@
+var ary = require('./ary');
+
+/**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+function unary(func) {
+ return ary(func, 1);
+}
+
+module.exports = unary;
diff --git a/node_modules/lodash/unescape.js b/node_modules/lodash/unescape.js
new file mode 100644
index 0000000..3b6efd5
--- /dev/null
+++ b/node_modules/lodash/unescape.js
@@ -0,0 +1,34 @@
+var toString = require('./toString'),
+ unescapeHtmlChar = require('./_unescapeHtmlChar');
+
+/** Used to match HTML entities and HTML characters. */
+var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source);
+
+/**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+}
+
+module.exports = unescape;
diff --git a/node_modules/lodash/union.js b/node_modules/lodash/union.js
new file mode 100644
index 0000000..e676dfe
--- /dev/null
+++ b/node_modules/lodash/union.js
@@ -0,0 +1,26 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+});
+
+module.exports = union;
diff --git a/node_modules/lodash/unionBy.js b/node_modules/lodash/unionBy.js
new file mode 100644
index 0000000..6ae8ccd
--- /dev/null
+++ b/node_modules/lodash/unionBy.js
@@ -0,0 +1,39 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2));
+});
+
+module.exports = unionBy;
diff --git a/node_modules/lodash/unionWith.js b/node_modules/lodash/unionWith.js
new file mode 100644
index 0000000..78736b2
--- /dev/null
+++ b/node_modules/lodash/unionWith.js
@@ -0,0 +1,34 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseRest = require('./_baseRest'),
+ baseUniq = require('./_baseUniq'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+});
+
+module.exports = unionWith;
diff --git a/node_modules/lodash/uniq.js b/node_modules/lodash/uniq.js
new file mode 100644
index 0000000..157d1cd
--- /dev/null
+++ b/node_modules/lodash/uniq.js
@@ -0,0 +1,25 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+}
+
+module.exports = uniq;
diff --git a/node_modules/lodash/uniqBy.js b/node_modules/lodash/uniqBy.js
new file mode 100644
index 0000000..53402a9
--- /dev/null
+++ b/node_modules/lodash/uniqBy.js
@@ -0,0 +1,31 @@
+var baseIteratee = require('./_baseIteratee'),
+ baseUniq = require('./_baseUniq');
+
+/**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
+}
+
+module.exports = uniqBy;
diff --git a/node_modules/lodash/uniqWith.js b/node_modules/lodash/uniqWith.js
new file mode 100644
index 0000000..18d72aa
--- /dev/null
+++ b/node_modules/lodash/uniqWith.js
@@ -0,0 +1,28 @@
+var baseUniq = require('./_baseUniq');
+
+/**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+}
+
+module.exports = uniqWith;
diff --git a/node_modules/lodash/uniqueId.js b/node_modules/lodash/uniqueId.js
new file mode 100644
index 0000000..ffa8c03
--- /dev/null
+++ b/node_modules/lodash/uniqueId.js
@@ -0,0 +1,28 @@
+var toString = require('./toString');
+
+/** Used to generate unique IDs. */
+var idCounter = 0;
+
+/**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+}
+
+module.exports = uniqueId;
diff --git a/node_modules/lodash/unset.js b/node_modules/lodash/unset.js
new file mode 100644
index 0000000..723c3d4
--- /dev/null
+++ b/node_modules/lodash/unset.js
@@ -0,0 +1,34 @@
+var baseUnset = require('./_baseUnset');
+
+/**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+}
+
+module.exports = unset;
diff --git a/node_modules/lodash/unzip.js b/node_modules/lodash/unzip.js
new file mode 100644
index 0000000..fce0ec7
--- /dev/null
+++ b/node_modules/lodash/unzip.js
@@ -0,0 +1,45 @@
+var arrayFilter = require('./_arrayFilter'),
+ arrayMap = require('./_arrayMap'),
+ baseProperty = require('./_baseProperty'),
+ baseTimes = require('./_baseTimes'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+}
+
+module.exports = unzip;
diff --git a/node_modules/lodash/unzipWith.js b/node_modules/lodash/unzipWith.js
new file mode 100644
index 0000000..926c899
--- /dev/null
+++ b/node_modules/lodash/unzipWith.js
@@ -0,0 +1,39 @@
+var apply = require('./_apply'),
+ arrayMap = require('./_arrayMap'),
+ unzip = require('./unzip');
+
+/**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+}
+
+module.exports = unzipWith;
diff --git a/node_modules/lodash/update.js b/node_modules/lodash/update.js
new file mode 100644
index 0000000..b90098e
--- /dev/null
+++ b/node_modules/lodash/update.js
@@ -0,0 +1,35 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+}
+
+module.exports = update;
diff --git a/node_modules/lodash/updateWith.js b/node_modules/lodash/updateWith.js
new file mode 100644
index 0000000..a2f4a2c
--- /dev/null
+++ b/node_modules/lodash/updateWith.js
@@ -0,0 +1,33 @@
+var baseUpdate = require('./_baseUpdate'),
+ castFunction = require('./_castFunction');
+
+/**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+}
+
+module.exports = updateWith;
diff --git a/node_modules/lodash/upperCase.js b/node_modules/lodash/upperCase.js
new file mode 100644
index 0000000..efbb8b0
--- /dev/null
+++ b/node_modules/lodash/upperCase.js
@@ -0,0 +1,27 @@
+var createCompounder = require('./_createCompounder');
+
+/**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+});
+
+module.exports = upperCase;
diff --git a/node_modules/lodash/upperFirst.js b/node_modules/lodash/upperFirst.js
new file mode 100644
index 0000000..1dd64e1
--- /dev/null
+++ b/node_modules/lodash/upperFirst.js
@@ -0,0 +1,22 @@
+var createCaseFirst = require('./_createCaseFirst');
+
+/**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+var upperFirst = createCaseFirst('toUpperCase');
+
+module.exports = upperFirst;
diff --git a/node_modules/lodash/util.js b/node_modules/lodash/util.js
new file mode 100644
index 0000000..d244dc2
--- /dev/null
+++ b/node_modules/lodash/util.js
@@ -0,0 +1,34 @@
+module.exports = {
+ 'attempt': require('./attempt'),
+ 'bindAll': require('./bindAll'),
+ 'cond': require('./cond'),
+ 'conforms': require('./conforms'),
+ 'constant': require('./constant'),
+ 'defaultTo': require('./defaultTo'),
+ 'flow': require('./flow'),
+ 'flowRight': require('./flowRight'),
+ 'identity': require('./identity'),
+ 'iteratee': require('./iteratee'),
+ 'matches': require('./matches'),
+ 'matchesProperty': require('./matchesProperty'),
+ 'method': require('./method'),
+ 'methodOf': require('./methodOf'),
+ 'mixin': require('./mixin'),
+ 'noop': require('./noop'),
+ 'nthArg': require('./nthArg'),
+ 'over': require('./over'),
+ 'overEvery': require('./overEvery'),
+ 'overSome': require('./overSome'),
+ 'property': require('./property'),
+ 'propertyOf': require('./propertyOf'),
+ 'range': require('./range'),
+ 'rangeRight': require('./rangeRight'),
+ 'stubArray': require('./stubArray'),
+ 'stubFalse': require('./stubFalse'),
+ 'stubObject': require('./stubObject'),
+ 'stubString': require('./stubString'),
+ 'stubTrue': require('./stubTrue'),
+ 'times': require('./times'),
+ 'toPath': require('./toPath'),
+ 'uniqueId': require('./uniqueId')
+};
diff --git a/node_modules/lodash/value.js b/node_modules/lodash/value.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/node_modules/lodash/value.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/node_modules/lodash/valueOf.js b/node_modules/lodash/valueOf.js
new file mode 100644
index 0000000..5e751a2
--- /dev/null
+++ b/node_modules/lodash/valueOf.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/node_modules/lodash/values.js b/node_modules/lodash/values.js
new file mode 100644
index 0000000..b069654
--- /dev/null
+++ b/node_modules/lodash/values.js
@@ -0,0 +1,34 @@
+var baseValues = require('./_baseValues'),
+ keys = require('./keys');
+
+/**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+}
+
+module.exports = values;
diff --git a/node_modules/lodash/valuesIn.js b/node_modules/lodash/valuesIn.js
new file mode 100644
index 0000000..6296094
--- /dev/null
+++ b/node_modules/lodash/valuesIn.js
@@ -0,0 +1,32 @@
+var baseValues = require('./_baseValues'),
+ keysIn = require('./keysIn');
+
+/**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+}
+
+module.exports = valuesIn;
diff --git a/node_modules/lodash/without.js b/node_modules/lodash/without.js
new file mode 100644
index 0000000..3a28e8a
--- /dev/null
+++ b/node_modules/lodash/without.js
@@ -0,0 +1,31 @@
+var baseDifference = require('./_baseDifference'),
+ baseRest = require('./_baseRest'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+});
+
+module.exports = without;
diff --git a/node_modules/lodash/words.js b/node_modules/lodash/words.js
new file mode 100644
index 0000000..6d7cdd1
--- /dev/null
+++ b/node_modules/lodash/words.js
@@ -0,0 +1,35 @@
+var asciiWords = require('./_asciiWords'),
+ hasUnicodeWord = require('./_hasUnicodeWord'),
+ toString = require('./toString'),
+ unicodeWords = require('./_unicodeWords');
+
+/**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+}
+
+module.exports = words;
diff --git a/node_modules/lodash/wrap.js b/node_modules/lodash/wrap.js
new file mode 100644
index 0000000..cad3c50
--- /dev/null
+++ b/node_modules/lodash/wrap.js
@@ -0,0 +1,30 @@
+var castFunction = require('./_castFunction'),
+ partial = require('./partial');
+
+/**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+}
+
+module.exports = wrap;
diff --git a/node_modules/lodash/wrapperAt.js b/node_modules/lodash/wrapperAt.js
new file mode 100644
index 0000000..6f6a1d0
--- /dev/null
+++ b/node_modules/lodash/wrapperAt.js
@@ -0,0 +1,48 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseAt = require('./_baseAt'),
+ flatRest = require('./_flatRest'),
+ isIndex = require('./_isIndex'),
+ thru = require('./thru');
+
+/**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+});
+
+module.exports = wrapperAt;
diff --git a/node_modules/lodash/wrapperChain.js b/node_modules/lodash/wrapperChain.js
new file mode 100644
index 0000000..bda2ce6
--- /dev/null
+++ b/node_modules/lodash/wrapperChain.js
@@ -0,0 +1,34 @@
+var chain = require('./chain');
+
+/**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+function wrapperChain() {
+ return chain(this);
+}
+
+module.exports = wrapperChain;
diff --git a/node_modules/lodash/wrapperLodash.js b/node_modules/lodash/wrapperLodash.js
new file mode 100644
index 0000000..bd6e8ad
--- /dev/null
+++ b/node_modules/lodash/wrapperLodash.js
@@ -0,0 +1,147 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ baseLodash = require('./_baseLodash'),
+ isArray = require('./isArray'),
+ isObjectLike = require('./isObjectLike'),
+ wrapperClone = require('./_wrapperClone');
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+}
+
+// Ensure wrappers are instances of `baseLodash`.
+lodash.prototype = baseLodash.prototype;
+lodash.prototype.constructor = lodash;
+
+module.exports = lodash;
diff --git a/node_modules/lodash/wrapperReverse.js b/node_modules/lodash/wrapperReverse.js
new file mode 100644
index 0000000..e93112a
--- /dev/null
+++ b/node_modules/lodash/wrapperReverse.js
@@ -0,0 +1,44 @@
+var LazyWrapper = require('./_LazyWrapper'),
+ LodashWrapper = require('./_LodashWrapper'),
+ reverse = require('./reverse'),
+ thru = require('./thru');
+
+/**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+}
+
+module.exports = wrapperReverse;
diff --git a/node_modules/lodash/wrapperValue.js b/node_modules/lodash/wrapperValue.js
new file mode 100644
index 0000000..f56c2da
--- /dev/null
+++ b/node_modules/lodash/wrapperValue.js
@@ -0,0 +1,21 @@
+var baseWrapperValue = require('./_baseWrapperValue');
+
+/**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+}
+
+module.exports = wrapperValue;
diff --git a/node_modules/lodash/xor.js b/node_modules/lodash/xor.js
new file mode 100644
index 0000000..d4d2860
--- /dev/null
+++ b/node_modules/lodash/xor.js
@@ -0,0 +1,28 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject');
+
+/**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+});
+
+module.exports = xor;
diff --git a/node_modules/lodash/xorBy.js b/node_modules/lodash/xorBy.js
new file mode 100644
index 0000000..e047895
--- /dev/null
+++ b/node_modules/lodash/xorBy.js
@@ -0,0 +1,39 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), baseIteratee(iteratee, 2));
+});
+
+module.exports = xorBy;
diff --git a/node_modules/lodash/xorWith.js b/node_modules/lodash/xorWith.js
new file mode 100644
index 0000000..e3a8ac6
--- /dev/null
+++ b/node_modules/lodash/xorWith.js
@@ -0,0 +1,34 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseRest = require('./_baseRest'),
+ baseXor = require('./_baseXor'),
+ isArrayLikeObject = require('./isArrayLikeObject'),
+ last = require('./last');
+
+/**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+});
+
+module.exports = xorWith;
diff --git a/node_modules/lodash/zip.js b/node_modules/lodash/zip.js
new file mode 100644
index 0000000..c800ab3
--- /dev/null
+++ b/node_modules/lodash/zip.js
@@ -0,0 +1,22 @@
+var baseRest = require('./_baseRest'),
+ unzip = require('./unzip');
+
+/**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+var zip = baseRest(unzip);
+
+module.exports = zip;
diff --git a/node_modules/lodash/zipObject.js b/node_modules/lodash/zipObject.js
new file mode 100644
index 0000000..23fdf14
--- /dev/null
+++ b/node_modules/lodash/zipObject.js
@@ -0,0 +1,24 @@
+var assignValue = require('./_assignValue'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+}
+
+module.exports = zipObject;
diff --git a/node_modules/lodash/zipObjectDeep.js b/node_modules/lodash/zipObjectDeep.js
new file mode 100644
index 0000000..7c858f8
--- /dev/null
+++ b/node_modules/lodash/zipObjectDeep.js
@@ -0,0 +1,23 @@
+var baseSet = require('./_baseSet'),
+ baseZipObject = require('./_baseZipObject');
+
+/**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+}
+
+module.exports = zipObjectDeep;
diff --git a/node_modules/lodash/zipWith.js b/node_modules/lodash/zipWith.js
new file mode 100644
index 0000000..d7a1f91
--- /dev/null
+++ b/node_modules/lodash/zipWith.js
@@ -0,0 +1,32 @@
+var baseRest = require('./_baseRest'),
+ unzipWith = require('./unzipWith');
+
+/**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+});
+
+module.exports = zipWith;
diff --git a/node_modules/loud-rejection/api.js b/node_modules/loud-rejection/api.js
new file mode 100644
index 0000000..f6cd6a1
--- /dev/null
+++ b/node_modules/loud-rejection/api.js
@@ -0,0 +1,11 @@
+'use strict';
+var util = require('util');
+var currentlyUnhandled = require('currently-unhandled');
+
+// WARNING: This undocumented API is subject to change.
+
+module.exports = util.deprecate(function (process) {
+ return {
+ currentlyUnhandled: currentlyUnhandled(process)
+ };
+}, 'loudRejection/api is deprecated. Use the currently-unhandled module instead.');
diff --git a/node_modules/loud-rejection/index.js b/node_modules/loud-rejection/index.js
new file mode 100644
index 0000000..319b945
--- /dev/null
+++ b/node_modules/loud-rejection/index.js
@@ -0,0 +1,36 @@
+'use strict';
+var util = require('util');
+var onExit = require('signal-exit');
+var currentlyUnhandled = require('currently-unhandled');
+
+var installed = false;
+
+module.exports = function (log) {
+ if (installed) {
+ return;
+ }
+
+ installed = true;
+
+ log = log || console.error;
+
+ var listUnhandled = currentlyUnhandled();
+
+ onExit(function () {
+ var unhandledRejections = listUnhandled();
+
+ if (unhandledRejections.length > 0) {
+ unhandledRejections.forEach(function (x) {
+ var err = x.reason;
+
+ if (!(err instanceof Error)) {
+ err = new Error('Promise rejected with value: ' + util.inspect(err));
+ }
+
+ log(err.stack);
+ });
+
+ process.exitCode = 1;
+ }
+ });
+};
diff --git a/node_modules/loud-rejection/license b/node_modules/loud-rejection/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/loud-rejection/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/loud-rejection/package.json b/node_modules/loud-rejection/package.json
new file mode 100644
index 0000000..da5adaf
--- /dev/null
+++ b/node_modules/loud-rejection/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "loud-rejection",
+ "version": "1.6.0",
+ "description": "Make unhandled promise rejections fail loudly instead of the default silent fail",
+ "license": "MIT",
+ "repository": "sindresorhus/loud-rejection",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && nyc ava",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "files": [
+ "index.js",
+ "register.js",
+ "api.js"
+ ],
+ "keywords": [
+ "promise",
+ "promises",
+ "unhandled",
+ "uncaught",
+ "rejection",
+ "loud",
+ "fail",
+ "catch",
+ "throw",
+ "handler",
+ "exit",
+ "debug",
+ "debugging",
+ "verbose"
+ ],
+ "dependencies": {
+ "currently-unhandled": "^0.4.1",
+ "signal-exit": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "bluebird": "^3.0.5",
+ "coveralls": "^2.11.4",
+ "delay": "^1.0.0",
+ "execa": "^0.4.0",
+ "get-stream": "^2.0.0",
+ "nyc": "^6.2.1",
+ "xo": "*"
+ },
+ "nyc": {
+ "exclude": [
+ "fixture.js"
+ ]
+ }
+}
diff --git a/node_modules/loud-rejection/readme.md b/node_modules/loud-rejection/readme.md
new file mode 100644
index 0000000..a973261
--- /dev/null
+++ b/node_modules/loud-rejection/readme.md
@@ -0,0 +1,68 @@
+# loud-rejection [![Build Status](https://travis-ci.org/sindresorhus/loud-rejection.svg?branch=master)](https://travis-ci.org/sindresorhus/loud-rejection) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/loud-rejection/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/loud-rejection?branch=master)
+
+> Make unhandled promise rejections fail loudly instead of the default [silent fail](https://gist.github.com/benjamingr/0237932cee84712951a2)
+
+By default, promises fail silently if you don't attach a `.catch()` handler to them.
+
+Use this in top-level things like tests, CLI tools, apps, etc, **but not in reusable modules.**<br>
+Not needed in the browser as unhandled promises are shown in the console.
+
+
+## Install
+
+```
+$ npm install --save loud-rejection
+```
+
+
+## Usage
+
+```js
+const loudRejection = require('loud-rejection');
+const promiseFn = require('promise-fn');
+
+// Install the unhandledRejection listeners
+loudRejection();
+
+promiseFn();
+```
+
+Without this module it's more verbose and you might even miss some that will fail silently:
+
+```js
+const promiseFn = require('promise-fn');
+
+function error(err) {
+ console.error(err.stack);
+ process.exit(1);
+}
+
+promiseFn().catch(error);
+```
+
+### Register script
+
+Alternatively to the above, you may simply require `loud-rejection/register` and the unhandledRejection listener will be automagically installed for you.
+
+This is handy for ES2015 imports:
+
+```js
+import 'loud-rejection/register';
+```
+
+
+## API
+
+### loudRejection([log])
+
+#### log
+
+Type: `Function`<br>
+Default: `console.error`
+
+Custom logging function to print the rejected promise. Receives the error stack.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/loud-rejection/register.js b/node_modules/loud-rejection/register.js
new file mode 100644
index 0000000..2934812
--- /dev/null
+++ b/node_modules/loud-rejection/register.js
@@ -0,0 +1,2 @@
+'use strict';
+require('./')();
diff --git a/node_modules/lowercase-keys/index.d.ts b/node_modules/lowercase-keys/index.d.ts
new file mode 100644
index 0000000..dc90a75
--- /dev/null
+++ b/node_modules/lowercase-keys/index.d.ts
@@ -0,0 +1,16 @@
+/**
+Lowercase the keys of an object.
+
+@returns A new object with the keys lowercased.
+
+@example
+```
+import lowercaseKeys = require('lowercase-keys');
+
+lowercaseKeys({FOO: true, bAr: false});
+//=> {foo: true, bar: false}
+```
+*/
+declare function lowercaseKeys<T extends unknown>(object: {[key: string]: T}): {[key: string]: T};
+
+export = lowercaseKeys;
diff --git a/node_modules/lowercase-keys/index.js b/node_modules/lowercase-keys/index.js
new file mode 100644
index 0000000..357fb8f
--- /dev/null
+++ b/node_modules/lowercase-keys/index.js
@@ -0,0 +1,10 @@
+'use strict';
+module.exports = object => {
+ const result = {};
+
+ for (const [key, value] of Object.entries(object)) {
+ result[key.toLowerCase()] = value;
+ }
+
+ return result;
+};
diff --git a/node_modules/lowercase-keys/license b/node_modules/lowercase-keys/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/lowercase-keys/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/lowercase-keys/package.json b/node_modules/lowercase-keys/package.json
new file mode 100644
index 0000000..c11d813
--- /dev/null
+++ b/node_modules/lowercase-keys/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "lowercase-keys",
+ "version": "2.0.0",
+ "description": "Lowercase the keys of an object",
+ "license": "MIT",
+ "repository": "sindresorhus/lowercase-keys",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "object",
+ "assign",
+ "extend",
+ "properties",
+ "lowercase",
+ "lower-case",
+ "case",
+ "keys",
+ "key"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/lowercase-keys/readme.md b/node_modules/lowercase-keys/readme.md
new file mode 100644
index 0000000..b1ed061
--- /dev/null
+++ b/node_modules/lowercase-keys/readme.md
@@ -0,0 +1,32 @@
+# lowercase-keys [![Build Status](https://travis-ci.org/sindresorhus/lowercase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/lowercase-keys)
+
+> Lowercase the keys of an object
+
+
+## Install
+
+```
+$ npm install lowercase-keys
+```
+
+
+## Usage
+
+```js
+const lowercaseKeys = require('lowercase-keys');
+
+lowercaseKeys({FOO: true, bAr: false});
+//=> {foo: true, bar: false}
+```
+
+
+## API
+
+### lowercaseKeys(object)
+
+Returns a new object with the keys lowercased.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/lru-cache/LICENSE b/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/lru-cache/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/lru-cache/README.md b/node_modules/lru-cache/README.md
new file mode 100644
index 0000000..435dfeb
--- /dev/null
+++ b/node_modules/lru-cache/README.md
@@ -0,0 +1,166 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache)
+
+## Installation:
+
+```javascript
+npm install lru-cache --save
+```
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n, key) { return n * 2 + key.length }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = new LRU(options)
+ , otherCache = new LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+// non-string keys ARE fully supported
+// but note that it must be THE SAME object, not
+// just a JSON-equivalent object.
+var someObject = { a: 1 }
+cache.set(someObject, 'a value')
+// Object keys are not toString()-ed
+cache.set('[object Object]', 'a different value')
+assert.equal(cache.get(someObject), 'a value')
+// A similar object with same keys/values won't work,
+// because it's a different object identity
+assert.equal(cache.get({ a: 1 }), undefined)
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`. Setting it to a non-number or negative number will
+ throw a `TypeError`. Setting it to 0 makes it be `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+ Setting this to a negative value will make everything seem old!
+ Setting it to a non-number will throw a `TypeError`.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n, key){return n.length}`. The default is
+ `function(){return 1}`, which is fine if you want to store `max`
+ like-sized things. The item is passed as the first argument, and
+ the key is passed as the second argumnet.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+* `noDisposeOnSet` By default, if you set a `dispose()` method, then
+ it'll be called whenever a `set()` operation overwrites an existing
+ key. If you set this option, `dispose()` will only be called when a
+ key falls out of the cache, not when it is overwritten.
+* `updateAgeOnGet` When using time-expiring entries with `maxAge`,
+ setting this to `true` will make each item's effective time update
+ to the current time whenever it is retrieved from cache, causing it
+ to not expire. (It can still fall out of cache based on recency of
+ use, of course.)
+
+## API
+
+* `set(key, value, maxAge)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think. `maxAge` is optional and overrides the
+ cache `maxAge` option if provided.
+
+ If the key is not found, `get()` will return `undefined`.
+
+ The key and val can be any value.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `rforEach(function(value,key,cache), [thisp])`
+
+ The same as `cache.forEach(...)` but items are iterated over in
+ reverse order. (ie, less recently used items are iterated over
+ first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
+
+* `length`
+
+ Return total length of objects in cache taking into account
+ `length` options function.
+
+* `itemCount`
+
+ Return total quantity of objects currently in cache. Note, that
+ `stale` (see options) items are returned as part of this item
+ count.
+
+* `dump()`
+
+ Return an array of the cache entries ready for serialization and usage
+ with 'destinationCache.load(arr)`.
+
+* `load(cacheEntriesArray)`
+
+ Loads another cache entries array, obtained with `sourceCache.dump()`,
+ into the cache. The destination cache is reset before loading new entries
+
+* `prune()`
+
+ Manually iterates over the entire cache proactively pruning old entries
diff --git a/node_modules/lru-cache/index.js b/node_modules/lru-cache/index.js
new file mode 100644
index 0000000..573b6b8
--- /dev/null
+++ b/node_modules/lru-cache/index.js
@@ -0,0 +1,334 @@
+'use strict'
+
+// A linked list to keep track of recently-used-ness
+const Yallist = require('yallist')
+
+const MAX = Symbol('max')
+const LENGTH = Symbol('length')
+const LENGTH_CALCULATOR = Symbol('lengthCalculator')
+const ALLOW_STALE = Symbol('allowStale')
+const MAX_AGE = Symbol('maxAge')
+const DISPOSE = Symbol('dispose')
+const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
+const LRU_LIST = Symbol('lruList')
+const CACHE = Symbol('cache')
+const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
+
+const naiveLength = () => 1
+
+// lruList is a yallist where the head is the youngest
+// item, and the tail is the oldest. the list contains the Hit
+// objects as the entries.
+// Each Hit object has a reference to its Yallist.Node. This
+// never changes.
+//
+// cache is a Map (or PseudoMap) that matches the keys to
+// the Yallist.Node object.
+class LRUCache {
+ constructor (options) {
+ if (typeof options === 'number')
+ options = { max: options }
+
+ if (!options)
+ options = {}
+
+ if (options.max && (typeof options.max !== 'number' || options.max < 0))
+ throw new TypeError('max must be a non-negative number')
+ // Kind of weird to have a default max of Infinity, but oh well.
+ const max = this[MAX] = options.max || Infinity
+
+ const lc = options.length || naiveLength
+ this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
+ this[ALLOW_STALE] = options.stale || false
+ if (options.maxAge && typeof options.maxAge !== 'number')
+ throw new TypeError('maxAge must be a number')
+ this[MAX_AGE] = options.maxAge || 0
+ this[DISPOSE] = options.dispose
+ this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
+ this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
+ this.reset()
+ }
+
+ // resize the cache when the max changes.
+ set max (mL) {
+ if (typeof mL !== 'number' || mL < 0)
+ throw new TypeError('max must be a non-negative number')
+
+ this[MAX] = mL || Infinity
+ trim(this)
+ }
+ get max () {
+ return this[MAX]
+ }
+
+ set allowStale (allowStale) {
+ this[ALLOW_STALE] = !!allowStale
+ }
+ get allowStale () {
+ return this[ALLOW_STALE]
+ }
+
+ set maxAge (mA) {
+ if (typeof mA !== 'number')
+ throw new TypeError('maxAge must be a non-negative number')
+
+ this[MAX_AGE] = mA
+ trim(this)
+ }
+ get maxAge () {
+ return this[MAX_AGE]
+ }
+
+ // resize the cache when the lengthCalculator changes.
+ set lengthCalculator (lC) {
+ if (typeof lC !== 'function')
+ lC = naiveLength
+
+ if (lC !== this[LENGTH_CALCULATOR]) {
+ this[LENGTH_CALCULATOR] = lC
+ this[LENGTH] = 0
+ this[LRU_LIST].forEach(hit => {
+ hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
+ this[LENGTH] += hit.length
+ })
+ }
+ trim(this)
+ }
+ get lengthCalculator () { return this[LENGTH_CALCULATOR] }
+
+ get length () { return this[LENGTH] }
+ get itemCount () { return this[LRU_LIST].length }
+
+ rforEach (fn, thisp) {
+ thisp = thisp || this
+ for (let walker = this[LRU_LIST].tail; walker !== null;) {
+ const prev = walker.prev
+ forEachStep(this, fn, walker, thisp)
+ walker = prev
+ }
+ }
+
+ forEach (fn, thisp) {
+ thisp = thisp || this
+ for (let walker = this[LRU_LIST].head; walker !== null;) {
+ const next = walker.next
+ forEachStep(this, fn, walker, thisp)
+ walker = next
+ }
+ }
+
+ keys () {
+ return this[LRU_LIST].toArray().map(k => k.key)
+ }
+
+ values () {
+ return this[LRU_LIST].toArray().map(k => k.value)
+ }
+
+ reset () {
+ if (this[DISPOSE] &&
+ this[LRU_LIST] &&
+ this[LRU_LIST].length) {
+ this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
+ }
+
+ this[CACHE] = new Map() // hash of items by key
+ this[LRU_LIST] = new Yallist() // list of items in order of use recency
+ this[LENGTH] = 0 // length of items in the list
+ }
+
+ dump () {
+ return this[LRU_LIST].map(hit =>
+ isStale(this, hit) ? false : {
+ k: hit.key,
+ v: hit.value,
+ e: hit.now + (hit.maxAge || 0)
+ }).toArray().filter(h => h)
+ }
+
+ dumpLru () {
+ return this[LRU_LIST]
+ }
+
+ set (key, value, maxAge) {
+ maxAge = maxAge || this[MAX_AGE]
+
+ if (maxAge && typeof maxAge !== 'number')
+ throw new TypeError('maxAge must be a number')
+
+ const now = maxAge ? Date.now() : 0
+ const len = this[LENGTH_CALCULATOR](value, key)
+
+ if (this[CACHE].has(key)) {
+ if (len > this[MAX]) {
+ del(this, this[CACHE].get(key))
+ return false
+ }
+
+ const node = this[CACHE].get(key)
+ const item = node.value
+
+ // dispose of the old one before overwriting
+ // split out into 2 ifs for better coverage tracking
+ if (this[DISPOSE]) {
+ if (!this[NO_DISPOSE_ON_SET])
+ this[DISPOSE](key, item.value)
+ }
+
+ item.now = now
+ item.maxAge = maxAge
+ item.value = value
+ this[LENGTH] += len - item.length
+ item.length = len
+ this.get(key)
+ trim(this)
+ return true
+ }
+
+ const hit = new Entry(key, value, len, now, maxAge)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > this[MAX]) {
+ if (this[DISPOSE])
+ this[DISPOSE](key, value)
+
+ return false
+ }
+
+ this[LENGTH] += hit.length
+ this[LRU_LIST].unshift(hit)
+ this[CACHE].set(key, this[LRU_LIST].head)
+ trim(this)
+ return true
+ }
+
+ has (key) {
+ if (!this[CACHE].has(key)) return false
+ const hit = this[CACHE].get(key).value
+ return !isStale(this, hit)
+ }
+
+ get (key) {
+ return get(this, key, true)
+ }
+
+ peek (key) {
+ return get(this, key, false)
+ }
+
+ pop () {
+ const node = this[LRU_LIST].tail
+ if (!node)
+ return null
+
+ del(this, node)
+ return node.value
+ }
+
+ del (key) {
+ del(this, this[CACHE].get(key))
+ }
+
+ load (arr) {
+ // reset the cache
+ this.reset()
+
+ const now = Date.now()
+ // A previous serialized cache has the most recent items first
+ for (let l = arr.length - 1; l >= 0; l--) {
+ const hit = arr[l]
+ const expiresAt = hit.e || 0
+ if (expiresAt === 0)
+ // the item was created without expiration in a non aged cache
+ this.set(hit.k, hit.v)
+ else {
+ const maxAge = expiresAt - now
+ // dont add already expired items
+ if (maxAge > 0) {
+ this.set(hit.k, hit.v, maxAge)
+ }
+ }
+ }
+ }
+
+ prune () {
+ this[CACHE].forEach((value, key) => get(this, key, false))
+ }
+}
+
+const get = (self, key, doUse) => {
+ const node = self[CACHE].get(key)
+ if (node) {
+ const hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE])
+ return undefined
+ } else {
+ if (doUse) {
+ if (self[UPDATE_AGE_ON_GET])
+ node.value.now = Date.now()
+ self[LRU_LIST].unshiftNode(node)
+ }
+ }
+ return hit.value
+ }
+}
+
+const isStale = (self, hit) => {
+ if (!hit || (!hit.maxAge && !self[MAX_AGE]))
+ return false
+
+ const diff = Date.now() - hit.now
+ return hit.maxAge ? diff > hit.maxAge
+ : self[MAX_AGE] && (diff > self[MAX_AGE])
+}
+
+const trim = self => {
+ if (self[LENGTH] > self[MAX]) {
+ for (let walker = self[LRU_LIST].tail;
+ self[LENGTH] > self[MAX] && walker !== null;) {
+ // We know that we're about to delete this one, and also
+ // what the next least recently used key will be, so just
+ // go ahead and set it now.
+ const prev = walker.prev
+ del(self, walker)
+ walker = prev
+ }
+ }
+}
+
+const del = (self, node) => {
+ if (node) {
+ const hit = node.value
+ if (self[DISPOSE])
+ self[DISPOSE](hit.key, hit.value)
+
+ self[LENGTH] -= hit.length
+ self[CACHE].delete(hit.key)
+ self[LRU_LIST].removeNode(node)
+ }
+}
+
+class Entry {
+ constructor (key, value, length, now, maxAge) {
+ this.key = key
+ this.value = value
+ this.length = length
+ this.now = now
+ this.maxAge = maxAge || 0
+ }
+}
+
+const forEachStep = (self, fn, node, thisp) => {
+ let hit = node.value
+ if (isStale(self, hit)) {
+ del(self, node)
+ if (!self[ALLOW_STALE])
+ hit = undefined
+ }
+ if (hit)
+ fn.call(thisp, hit.value, hit.key, self)
+}
+
+module.exports = LRUCache
diff --git a/node_modules/lru-cache/package.json b/node_modules/lru-cache/package.json
new file mode 100644
index 0000000..43b7502
--- /dev/null
+++ b/node_modules/lru-cache/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "lru-cache",
+ "description": "A cache object that deletes the least-recently-used items.",
+ "version": "6.0.0",
+ "author": "Isaac Z. Schlueter <i@izs.me>",
+ "keywords": [
+ "mru",
+ "lru",
+ "cache"
+ ],
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags"
+ },
+ "main": "index.js",
+ "repository": "git://github.com/isaacs/node-lru-cache.git",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "tap": "^14.10.7"
+ },
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+}
diff --git a/node_modules/map-obj/index.js b/node_modules/map-obj/index.js
new file mode 100644
index 0000000..8b7b4d6
--- /dev/null
+++ b/node_modules/map-obj/index.js
@@ -0,0 +1,13 @@
+'use strict';
+module.exports = function (obj, cb) {
+ var ret = {};
+ var keys = Object.keys(obj);
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var res = cb(key, obj[key], obj);
+ ret[res[0]] = res[1];
+ }
+
+ return ret;
+};
diff --git a/node_modules/map-obj/license b/node_modules/map-obj/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/map-obj/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/map-obj/package.json b/node_modules/map-obj/package.json
new file mode 100644
index 0000000..d178305
--- /dev/null
+++ b/node_modules/map-obj/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "map-obj",
+ "version": "1.0.1",
+ "description": "Map object keys and values into a new object",
+ "license": "MIT",
+ "repository": "sindresorhus/map-obj",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "map",
+ "obj",
+ "object",
+ "key",
+ "keys",
+ "value",
+ "values",
+ "val",
+ "iterate",
+ "iterator"
+ ],
+ "devDependencies": {
+ "ava": "0.0.4"
+ }
+}
diff --git a/node_modules/map-obj/readme.md b/node_modules/map-obj/readme.md
new file mode 100644
index 0000000..fee03d9
--- /dev/null
+++ b/node_modules/map-obj/readme.md
@@ -0,0 +1,29 @@
+# map-obj [![Build Status](https://travis-ci.org/sindresorhus/map-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/map-obj)
+
+> Map object keys and values into a new object
+
+
+## Install
+
+```
+$ npm install --save map-obj
+```
+
+
+## Usage
+
+```js
+var mapObj = require('map-obj');
+
+var newObject = mapObj({foo: 'bar'}, function (key, value, object) {
+ // first element is the new key and second is the new value
+ // here we reverse the order
+ return [value, key];
+});
+//=> {bar: 'foo'}
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/matcher/index.d.ts b/node_modules/matcher/index.d.ts
new file mode 100644
index 0000000..3405f51
--- /dev/null
+++ b/node_modules/matcher/index.d.ts
@@ -0,0 +1,85 @@
+declare namespace matcher {
+ interface Options {
+ /**
+ Treat uppercase and lowercase characters as being the same.
+
+ Ensure you use this correctly. For example, files and directories should be matched case-insensitively, while most often, object keys should be matched case-sensitively.
+
+ @default false
+ */
+ readonly caseSensitive?: boolean;
+ }
+}
+
+declare const matcher: {
+ /**
+ Simple [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matching.
+
+ It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
+
+ @param inputs - Strings to match.
+ @param patterns - Use `*` to match zero or more characters. A pattern starting with `!` will be negated.
+ @returns The `inputs` filtered based on the `patterns`.
+
+ @example
+ ```
+ import matcher = require('matcher');
+
+ matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']);
+ //=> ['moo']
+
+ matcher(['foo', 'bar', 'moo'], ['!*oo']);
+ //=> ['bar']
+ ```
+ */
+ (inputs: readonly string[], patterns: readonly string[], options?: matcher.Options): string[];
+
+ /**
+ It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
+
+ @param input - String or array of strings to match.
+ @param pattern - String or array of string patterns. Use `*` to match zero or more characters. A pattern starting with `!` will be negated.
+ @returns Whether any given `input` matches every given `pattern`.
+
+ @example
+ ```
+ import matcher = require('matcher');
+
+ matcher.isMatch('unicorn', 'uni*');
+ //=> true
+
+ matcher.isMatch('unicorn', '*corn');
+ //=> true
+
+ matcher.isMatch('unicorn', 'un*rn');
+ //=> true
+
+ matcher.isMatch('rainbow', '!unicorn');
+ //=> true
+
+ matcher.isMatch('foo bar baz', 'foo b* b*');
+ //=> true
+
+ matcher.isMatch('unicorn', 'uni\\*');
+ //=> false
+
+ matcher.isMatch('UNICORN', 'UNI*', {caseSensitive: true});
+ //=> true
+
+ matcher.isMatch('UNICORN', 'unicorn', {caseSensitive: true});
+ //=> false
+
+ matcher.isMatch(['foo', 'bar'], 'f*');
+ //=> true
+
+ matcher.isMatch(['foo', 'bar'], ['a*', 'b*']);
+ //=> true
+
+ matcher.isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true});
+ //=> false
+ ```
+ */
+ isMatch: (input: string | readonly string[], pattern: string | readonly string[], options?: matcher.Options) => boolean;
+};
+
+export = matcher;
diff --git a/node_modules/matcher/index.js b/node_modules/matcher/index.js
new file mode 100644
index 0000000..bab0afc
--- /dev/null
+++ b/node_modules/matcher/index.js
@@ -0,0 +1,77 @@
+'use strict';
+const escapeStringRegexp = require('escape-string-regexp');
+
+const regexpCache = new Map();
+
+function makeRegexp(pattern, options) {
+ options = {
+ caseSensitive: false,
+ ...options
+ };
+
+ const cacheKey = pattern + JSON.stringify(options);
+
+ if (regexpCache.has(cacheKey)) {
+ return regexpCache.get(cacheKey);
+ }
+
+ const negated = pattern[0] === '!';
+
+ if (negated) {
+ pattern = pattern.slice(1);
+ }
+
+ pattern = escapeStringRegexp(pattern).replace(/\\\*/g, '[\\s\\S]*');
+
+ const regexp = new RegExp(`^${pattern}$`, options.caseSensitive ? '' : 'i');
+ regexp.negated = negated;
+ regexpCache.set(cacheKey, regexp);
+
+ return regexp;
+}
+
+module.exports = (inputs, patterns, options) => {
+ if (!(Array.isArray(inputs) && Array.isArray(patterns))) {
+ throw new TypeError(`Expected two arrays, got ${typeof inputs} ${typeof patterns}`);
+ }
+
+ if (patterns.length === 0) {
+ return inputs;
+ }
+
+ const isFirstPatternNegated = patterns[0][0] === '!';
+
+ patterns = patterns.map(pattern => makeRegexp(pattern, options));
+
+ const result = [];
+
+ for (const input of inputs) {
+ // If first pattern is negated we include everything to match user expectation.
+ let matches = isFirstPatternNegated;
+
+ for (const pattern of patterns) {
+ if (pattern.test(input)) {
+ matches = !pattern.negated;
+ }
+ }
+
+ if (matches) {
+ result.push(input);
+ }
+ }
+
+ return result;
+};
+
+module.exports.isMatch = (input, pattern, options) => {
+ const inputArray = Array.isArray(input) ? input : [input];
+ const patternArray = Array.isArray(pattern) ? pattern : [pattern];
+
+ return inputArray.some(input => {
+ return patternArray.every(pattern => {
+ const regexp = makeRegexp(pattern, options);
+ const matches = regexp.test(input);
+ return regexp.negated ? !matches : matches;
+ });
+ });
+};
diff --git a/node_modules/matcher/license b/node_modules/matcher/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/matcher/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/matcher/package.json b/node_modules/matcher/package.json
new file mode 100644
index 0000000..fe9c386
--- /dev/null
+++ b/node_modules/matcher/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "matcher",
+ "version": "3.0.0",
+ "description": "Simple wildcard matching",
+ "license": "MIT",
+ "repository": "sindresorhus/matcher",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd",
+ "bench": "matcha bench.js"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "matcher",
+ "matching",
+ "match",
+ "regex",
+ "regexp",
+ "regular",
+ "expression",
+ "wildcard",
+ "pattern",
+ "string",
+ "filter",
+ "glob",
+ "globber",
+ "globbing",
+ "minimatch"
+ ],
+ "dependencies": {
+ "escape-string-regexp": "^4.0.0"
+ },
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "matcha": "^0.7.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.30.0"
+ },
+ "xo": {
+ "rules": {
+ "@typescript-eslint/member-ordering": "off"
+ }
+ }
+}
diff --git a/node_modules/matcher/readme.md b/node_modules/matcher/readme.md
new file mode 100644
index 0000000..962070a
--- /dev/null
+++ b/node_modules/matcher/readme.md
@@ -0,0 +1,120 @@
+# matcher [![Build Status](https://travis-ci.com/sindresorhus/matcher.svg?branch=master)](https://travis-ci.com/sindresorhus/matcher)
+
+> Simple [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matching
+
+Useful when you want to accept loose string input and regexes/globs are too convoluted.
+
+## Install
+
+```
+$ npm install matcher
+```
+
+## Usage
+
+```js
+const matcher = require('matcher');
+
+matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']);
+//=> ['moo']
+
+matcher(['foo', 'bar', 'moo'], ['!*oo']);
+//=> ['bar']
+
+matcher.isMatch('unicorn', 'uni*');
+//=> true
+
+matcher.isMatch('unicorn', '*corn');
+//=> true
+
+matcher.isMatch('unicorn', 'un*rn');
+//=> true
+
+matcher.isMatch('rainbow', '!unicorn');
+//=> true
+
+matcher.isMatch('foo bar baz', 'foo b* b*');
+//=> true
+
+matcher.isMatch('unicorn', 'uni\\*');
+//=> false
+
+matcher.isMatch('UNICORN', 'UNI*', {caseSensitive: true});
+//=> true
+
+matcher.isMatch('UNICORN', 'unicorn', {caseSensitive: true});
+//=> false
+
+matcher.isMatch(['foo', 'bar'], 'f*');
+//=> true
+
+matcher.isMatch(['foo', 'bar'], ['a*', 'b*']);
+//=> true
+
+matcher.isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true});
+//=> false
+```
+
+## API
+
+It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
+
+### matcher(inputs, patterns, options?)
+
+Accepts an array of `input`'s and `pattern`'s.
+
+Returns an array of `inputs` filtered based on the `patterns`.
+
+### matcher.isMatch(input, pattern, options?)
+
+Accepts either a string or array of strings for both `input` and `pattern`.
+
+Returns a `boolean` of whether any given `input` matches every given `pattern`.
+
+#### input
+
+Type: `string | string[]`
+
+String or array of strings to match.
+
+#### options
+
+Type: `object`
+
+##### caseSensitive
+
+Type: `boolean`\
+Default: `false`
+
+Treat uppercase and lowercase characters as being the same.
+
+Ensure you use this correctly. For example, files and directories should be matched case-insensitively, while most often, object keys should be matched case-sensitively.
+
+#### pattern
+
+Type: `string | string[]`
+
+Use `*` to match zero or more characters. A pattern starting with `!` will be negated.
+
+## Benchmark
+
+```
+$ npm run bench
+```
+
+## Related
+
+- [matcher-cli](https://github.com/sindresorhus/matcher-cli) - CLI for this module
+- [multimatch](https://github.com/sindresorhus/multimatch) - Extends `minimatch.match()` with support for multiple patterns
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-matcher?utm_source=npm-matcher&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/meow/index.js b/node_modules/meow/index.js
new file mode 100644
index 0000000..d7ab879
--- /dev/null
+++ b/node_modules/meow/index.js
@@ -0,0 +1,82 @@
+'use strict';
+var path = require('path');
+var minimist = require('minimist');
+var objectAssign = require('object-assign');
+var camelcaseKeys = require('camelcase-keys');
+var decamelize = require('decamelize');
+var mapObj = require('map-obj');
+var trimNewlines = require('trim-newlines');
+var redent = require('redent');
+var readPkgUp = require('read-pkg-up');
+var loudRejection = require('loud-rejection');
+var normalizePackageData = require('normalize-package-data');
+
+// get the uncached parent
+delete require.cache[__filename];
+var parentDir = path.dirname(module.parent.filename);
+
+module.exports = function (opts, minimistOpts) {
+ loudRejection();
+
+ if (Array.isArray(opts) || typeof opts === 'string') {
+ opts = {help: opts};
+ }
+
+ opts = objectAssign({
+ pkg: readPkgUp.sync({
+ cwd: parentDir,
+ normalize: false
+ }).pkg,
+ argv: process.argv.slice(2)
+ }, opts);
+
+ minimistOpts = objectAssign({}, minimistOpts);
+
+ minimistOpts.default = mapObj(minimistOpts.default || {}, function (key, value) {
+ return [decamelize(key, '-'), value];
+ });
+
+ if (Array.isArray(opts.help)) {
+ opts.help = opts.help.join('\n');
+ }
+
+ var pkg = typeof opts.pkg === 'string' ? require(path.join(parentDir, opts.pkg)) : opts.pkg;
+ var argv = minimist(opts.argv, minimistOpts);
+ var help = redent(trimNewlines(opts.help || ''), 2);
+
+ normalizePackageData(pkg);
+
+ process.title = pkg.bin ? Object.keys(pkg.bin)[0] : pkg.name;
+
+ var description = opts.description;
+ if (!description && description !== false) {
+ description = pkg.description;
+ }
+
+ help = (description ? '\n ' + description + '\n' : '') + (help ? '\n' + help : '\n');
+
+ var showHelp = function (code) {
+ console.log(help);
+ process.exit(code || 0);
+ };
+
+ if (argv.version && opts.version !== false) {
+ console.log(typeof opts.version === 'string' ? opts.version : pkg.version);
+ process.exit();
+ }
+
+ if (argv.help && opts.help !== false) {
+ showHelp();
+ }
+
+ var _ = argv._;
+ delete argv._;
+
+ return {
+ input: _,
+ flags: camelcaseKeys(argv),
+ pkg: pkg,
+ help: help,
+ showHelp: showHelp
+ };
+};
diff --git a/node_modules/meow/license b/node_modules/meow/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/meow/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/meow/package.json b/node_modules/meow/package.json
new file mode 100644
index 0000000..2750de4
--- /dev/null
+++ b/node_modules/meow/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "meow",
+ "version": "3.7.0",
+ "description": "CLI app helper",
+ "license": "MIT",
+ "repository": "sindresorhus/meow",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "cli",
+ "bin",
+ "util",
+ "utility",
+ "helper",
+ "argv",
+ "command",
+ "line",
+ "meow",
+ "cat",
+ "kitten",
+ "parser",
+ "option",
+ "flags",
+ "input",
+ "cmd",
+ "console"
+ ],
+ "dependencies": {
+ "camelcase-keys": "^2.0.0",
+ "decamelize": "^1.1.2",
+ "loud-rejection": "^1.0.0",
+ "map-obj": "^1.0.1",
+ "minimist": "^1.1.3",
+ "normalize-package-data": "^2.3.4",
+ "object-assign": "^4.0.1",
+ "read-pkg-up": "^1.0.1",
+ "redent": "^1.0.0",
+ "trim-newlines": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "execa": "^0.1.1",
+ "indent-string": "^2.1.0",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/meow/readme.md b/node_modules/meow/readme.md
new file mode 100644
index 0000000..253380d
--- /dev/null
+++ b/node_modules/meow/readme.md
@@ -0,0 +1,159 @@
+# meow [![Build Status](https://travis-ci.org/sindresorhus/meow.svg?branch=master)](https://travis-ci.org/sindresorhus/meow)
+
+> CLI app helper
+
+![](meow.gif)
+
+
+## Features
+
+- Parses arguments using [minimist](https://github.com/substack/minimist)
+- Converts flags to [camelCase](https://github.com/sindresorhus/camelcase)
+- Outputs version when `--version`
+- Outputs description and supplied help text when `--help`
+- Makes unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail
+- Sets the process title to the binary name defined in package.json
+
+
+## Install
+
+```
+$ npm install --save meow
+```
+
+
+## Usage
+
+```
+$ ./foo-app.js unicorns --rainbow-cake
+```
+
+```js
+#!/usr/bin/env node
+'use strict';
+const meow = require('meow');
+const foo = require('./');
+
+const cli = meow(`
+ Usage
+ $ foo <input>
+
+ Options
+ -r, --rainbow Include a rainbow
+
+ Examples
+ $ foo unicorns --rainbow
+ 🌈 unicorns 🌈
+`, {
+ alias: {
+ r: 'rainbow'
+ }
+});
+/*
+{
+ input: ['unicorns'],
+ flags: {rainbow: true},
+ ...
+}
+*/
+
+foo(cli.input[0], cli.flags);
+```
+
+
+## API
+
+### meow(options, [minimistOptions])
+
+Returns an object with:
+
+- `input` *(array)* - Non-flag arguments
+- `flags` *(object)* - Flags converted to camelCase
+- `pkg` *(object)* - The `package.json` object
+- `help` *(object)* - The help text used with `--help`
+- `showHelp([code=0])` *(function)* - Show the help text and exit with `code`
+
+#### options
+
+Type: `object`, `array`, `string`
+
+Can either be a string/array that is the `help` or an options object.
+
+##### description
+
+Type: `string`, `boolean`
+Default: The package.json `"description"` property
+
+A description to show above the help text.
+
+Set it to `false` to disable it altogether.
+
+##### help
+
+Type: `string`, `boolean`
+
+The help text you want shown.
+
+The input is reindented and starting/ending newlines are trimmed which means you can use a [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/template_strings) without having to care about using the correct amount of indent.
+
+<del>If it's an array each item will be a line.</del>
+*(Still supported, but you should use a template literal instead.)*
+
+The description will be shown above your help text automatically.
+
+Set it to `false` to disable it altogether.
+
+##### version
+
+Type: `string`, `boolean`
+Default: The package.json `"version"` property
+
+Set a custom version output.
+
+Set it to `false` to disable it altogether.
+
+##### pkg
+
+Type: `string`, `object`
+Default: Closest package.json upwards
+
+Relative path to package.json or as an object.
+
+##### argv
+
+Type: `array`
+Default: `process.argv.slice(2)`
+
+Custom arguments object.
+
+#### minimistOptions
+
+Type: `object`
+Default: `{}`
+
+Minimist [options](https://github.com/substack/minimist#var-argv--parseargsargs-opts).
+
+Keys passed to the minimist `default` option are [decamelized](https://github.com/sindresorhus/decamelize), so you can for example pass in `fooBar: 'baz'` and have it be the default for the `--foo-bar` flag.
+
+
+## Promises
+
+Meow will make unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail. Meaning you don't have to manually `.catch()` promises used in your CLI.
+
+
+## Tips
+
+See [`chalk`](https://github.com/chalk/chalk) if you want to colorize the terminal output.
+
+See [`get-stdin`](https://github.com/sindresorhus/get-stdin) if you want to accept input from stdin.
+
+See [`update-notifier`](https://github.com/yeoman/update-notifier) if you want update notifications.
+
+See [`configstore`](https://github.com/yeoman/configstore) if you need to persist some data.
+
+[More useful CLI utilities.](https://github.com/sindresorhus/awesome-nodejs#command-line-utilities)
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md
new file mode 100644
index 0000000..56d792f
--- /dev/null
+++ b/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,458 @@
+1.45.0 / 2020-09-22
+===================
+
+ * Add `application/ubjson` with extension `.ubj`
+ * Add `image/avif` with extension `.avif`
+ * Add `image/ktx2` with extension `.ktx2`
+ * Add extension `.dbf` to `application/vnd.dbf`
+ * Add extension `.rar` to `application/vnd.rar`
+ * Add extension `.td` to `application/urc-targetdesc+xml`
+ * Add new upstream MIME types
+ * Fix extension of `application/vnd.apple.keynote` to be `.key`
+
+1.44.0 / 2020-04-22
+===================
+
+ * Add charsets from IANA
+ * Add extension `.cjs` to `application/node`
+ * Add new upstream MIME types
+
+1.43.0 / 2020-01-05
+===================
+
+ * Add `application/x-keepass2` with extension `.kdbx`
+ * Add extension `.mxmf` to `audio/mobile-xmf`
+ * Add extensions from IANA for `application/*+xml` types
+ * Add new upstream MIME types
+
+1.42.0 / 2019-09-25
+===================
+
+ * Add `image/vnd.ms-dds` with extension `.dds`
+ * Add new upstream MIME types
+ * Remove compressible from `multipart/mixed`
+
+1.41.0 / 2019-08-30
+===================
+
+ * Add new upstream MIME types
+ * Add `application/toml` with extension `.toml`
+ * Mark `font/ttf` as compressible
+
+1.40.0 / 2019-04-20
+===================
+
+ * Add extensions from IANA for `model/*` types
+ * Add `text/mdx` with extension `.mdx`
+
+1.39.0 / 2019-04-04
+===================
+
+ * Add extensions `.siv` and `.sieve` to `application/sieve`
+ * Add new upstream MIME types
+
+1.38.0 / 2019-02-04
+===================
+
+ * Add extension `.nq` to `application/n-quads`
+ * Add extension `.nt` to `application/n-triples`
+ * Add new upstream MIME types
+ * Mark `text/less` as compressible
+
+1.37.0 / 2018-10-19
+===================
+
+ * Add extensions to HEIC image types
+ * Add new upstream MIME types
+
+1.36.0 / 2018-08-20
+===================
+
+ * Add Apple file extensions from IANA
+ * Add extensions from IANA for `image/*` types
+ * Add new upstream MIME types
+
+1.35.0 / 2018-07-15
+===================
+
+ * Add extension `.owl` to `application/rdf+xml`
+ * Add new upstream MIME types
+ - Removes extension `.woff` from `application/font-woff`
+
+1.34.0 / 2018-06-03
+===================
+
+ * Add extension `.csl` to `application/vnd.citationstyles.style+xml`
+ * Add extension `.es` to `application/ecmascript`
+ * Add new upstream MIME types
+ * Add `UTF-8` as default charset for `text/turtle`
+ * Mark all XML-derived types as compressible
+
+1.33.0 / 2018-02-15
+===================
+
+ * Add extensions from IANA for `message/*` types
+ * Add new upstream MIME types
+ * Fix some incorrect OOXML types
+ * Remove `application/font-woff2`
+
+1.32.0 / 2017-11-29
+===================
+
+ * Add new upstream MIME types
+ * Update `text/hjson` to registered `application/hjson`
+ * Add `text/shex` with extension `.shex`
+
+1.31.0 / 2017-10-25
+===================
+
+ * Add `application/raml+yaml` with extension `.raml`
+ * Add `application/wasm` with extension `.wasm`
+ * Add new `font` type from IANA
+ * Add new upstream font extensions
+ * Add new upstream MIME types
+ * Add extensions for JPEG-2000 images
+
+1.30.0 / 2017-08-27
+===================
+
+ * Add `application/vnd.ms-outlook`
+ * Add `application/x-arj`
+ * Add extension `.mjs` to `application/javascript`
+ * Add glTF types and extensions
+ * Add new upstream MIME types
+ * Add `text/x-org`
+ * Add VirtualBox MIME types
+ * Fix `source` records for `video/*` types that are IANA
+ * Update `font/opentype` to registered `font/otf`
+
+1.29.0 / 2017-07-10
+===================
+
+ * Add `application/fido.trusted-apps+json`
+ * Add extension `.wadl` to `application/vnd.sun.wadl+xml`
+ * Add new upstream MIME types
+ * Add `UTF-8` as default charset for `text/css`
+
+1.28.0 / 2017-05-14
+===================
+
+ * Add new upstream MIME types
+ * Add extension `.gz` to `application/gzip`
+ * Update extensions `.md` and `.markdown` to be `text/markdown`
+
+1.27.0 / 2017-03-16
+===================
+
+ * Add new upstream MIME types
+ * Add `image/apng` with extension `.apng`
+
+1.26.0 / 2017-01-14
+===================
+
+ * Add new upstream MIME types
+ * Add extension `.geojson` to `application/geo+json`
+
+1.25.0 / 2016-11-11
+===================
+
+ * Add new upstream MIME types
+
+1.24.0 / 2016-09-18
+===================
+
+ * Add `audio/mp3`
+ * Add new upstream MIME types
+
+1.23.0 / 2016-05-01
+===================
+
+ * Add new upstream MIME types
+ * Add extension `.3gpp` to `audio/3gpp`
+
+1.22.0 / 2016-02-15
+===================
+
+ * Add `text/slim`
+ * Add extension `.rng` to `application/xml`
+ * Add new upstream MIME types
+ * Fix extension of `application/dash+xml` to be `.mpd`
+ * Update primary extension to `.m4a` for `audio/mp4`
+
+1.21.0 / 2016-01-06
+===================
+
+ * Add Google document types
+ * Add new upstream MIME types
+
+1.20.0 / 2015-11-10
+===================
+
+ * Add `text/x-suse-ymp`
+ * Add new upstream MIME types
+
+1.19.0 / 2015-09-17
+===================
+
+ * Add `application/vnd.apple.pkpass`
+ * Add new upstream MIME types
+
+1.18.0 / 2015-09-03
+===================
+
+ * Add new upstream MIME types
+
+1.17.0 / 2015-08-13
+===================
+
+ * Add `application/x-msdos-program`
+ * Add `audio/g711-0`
+ * Add `image/vnd.mozilla.apng`
+ * Add extension `.exe` to `application/x-msdos-program`
+
+1.16.0 / 2015-07-29
+===================
+
+ * Add `application/vnd.uri-map`
+
+1.15.0 / 2015-07-13
+===================
+
+ * Add `application/x-httpd-php`
+
+1.14.0 / 2015-06-25
+===================
+
+ * Add `application/scim+json`
+ * Add `application/vnd.3gpp.ussd+xml`
+ * Add `application/vnd.biopax.rdf+xml`
+ * Add `text/x-processing`
+
+1.13.0 / 2015-06-07
+===================
+
+ * Add nginx as a source
+ * Add `application/x-cocoa`
+ * Add `application/x-java-archive-diff`
+ * Add `application/x-makeself`
+ * Add `application/x-perl`
+ * Add `application/x-pilot`
+ * Add `application/x-redhat-package-manager`
+ * Add `application/x-sea`
+ * Add `audio/x-m4a`
+ * Add `audio/x-realaudio`
+ * Add `image/x-jng`
+ * Add `text/mathml`
+
+1.12.0 / 2015-06-05
+===================
+
+ * Add `application/bdoc`
+ * Add `application/vnd.hyperdrive+json`
+ * Add `application/x-bdoc`
+ * Add extension `.rtf` to `text/rtf`
+
+1.11.0 / 2015-05-31
+===================
+
+ * Add `audio/wav`
+ * Add `audio/wave`
+ * Add extension `.litcoffee` to `text/coffeescript`
+ * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data`
+ * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install`
+
+1.10.0 / 2015-05-19
+===================
+
+ * Add `application/vnd.balsamiq.bmpr`
+ * Add `application/vnd.microsoft.portable-executable`
+ * Add `application/x-ns-proxy-autoconfig`
+
+1.9.1 / 2015-04-19
+==================
+
+ * Remove `.json` extension from `application/manifest+json`
+ - This is causing bugs downstream
+
+1.9.0 / 2015-04-19
+==================
+
+ * Add `application/manifest+json`
+ * Add `application/vnd.micro+json`
+ * Add `image/vnd.zbrush.pcx`
+ * Add `image/x-ms-bmp`
+
+1.8.0 / 2015-03-13
+==================
+
+ * Add `application/vnd.citationstyles.style+xml`
+ * Add `application/vnd.fastcopy-disk-image`
+ * Add `application/vnd.gov.sk.xmldatacontainer+xml`
+ * Add extension `.jsonld` to `application/ld+json`
+
+1.7.0 / 2015-02-08
+==================
+
+ * Add `application/vnd.gerber`
+ * Add `application/vnd.msa-disk-image`
+
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/node_modules/mime-db/LICENSE b/node_modules/mime-db/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++ b/node_modules/mime-db/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md
new file mode 100644
index 0000000..f1e6391
--- /dev/null
+++ b/node_modules/mime-db/README.md
@@ -0,0 +1,102 @@
+# mime-db
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-image]][node-url]
+[![Build Status][travis-image]][travis-url]
+[![Coverage Status][coveralls-image]][coveralls-url]
+
+This is a database of all mime types.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
+It aggregates data from the following sources:
+
+- http://www.iana.org/assignments/media-types/media-types.xhtml
+- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
+
+## Installation
+
+```bash
+npm install mime-db
+```
+
+### Database Download
+
+If you're crazy enough to use this in the browser, you can just grab the
+JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to
+replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags)
+as the JSON format may change in the future.
+
+```
+https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json
+```
+
+## Usage
+
+<!-- eslint-disable no-unused-vars -->
+
+```js
+var db = require('mime-db')
+
+// grab data on .js files
+var data = db['application/javascript']
+```
+
+## Data Structure
+
+The JSON file is a map lookup for lowercased mime types.
+Each mime type has the following properties:
+
+- `.source` - where the mime type is defined.
+ If not set, it's probably a custom media type.
+ - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
+ - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
+ - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
+- `.extensions[]` - known extensions associated with this mime type.
+- `.compressible` - whether a file of this type can be gzipped.
+- `.charset` - the default charset associated with this type, if any.
+
+If unknown, every property could be `undefined`.
+
+## Contributing
+
+To edit the database, only make PRs against `src/custom-types.json` or
+`src/custom-suffix.json`.
+
+The `src/custom-types.json` file is a JSON object with the MIME type as the
+keys and the values being an object with the following keys:
+
+- `compressible` - leave out if you don't know, otherwise `true`/`false` to
+ indicate whether the data represented by the type is typically compressible.
+- `extensions` - include an array of file extensions that are associated with
+ the type.
+- `notes` - human-readable notes about the type, typically what the type is.
+- `sources` - include an array of URLs of where the MIME type and the associated
+ extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source);
+ links to type aggregating sites and Wikipedia are _not acceptable_.
+
+To update the build, run `npm run build`.
+
+### Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
+If that is not possible / feasible, they can be added directly here as a
+"custom" type. To do this, it is required to have a primary source that
+definitively lists the media type. If an extension is going to be listed as
+associateed with this media type, the source must definitively link the
+media type and extension as well.
+
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
+[node-image]: https://badgen.net/npm/node/mime-db
+[node-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/mime-db
+[npm-url]: https://npmjs.org/package/mime-db
+[npm-version-image]: https://badgen.net/npm/v/mime-db
+[travis-image]: https://badgen.net/travis/jshttp/mime-db/master
+[travis-url]: https://travis-ci.org/jshttp/mime-db
diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json
new file mode 100644
index 0000000..05cfa68
--- /dev/null
+++ b/node_modules/mime-db/db.json
@@ -0,0 +1,8242 @@
+{
+ "application/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "application/3gpdash-qoe-report+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/3gpp-ims+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/a2l": {
+ "source": "iana"
+ },
+ "application/activemessage": {
+ "source": "iana"
+ },
+ "application/activity+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-costmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-directory+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcost+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointcostparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointprop+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-endpointpropparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-error+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-networkmapfilter+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-updatestreamcontrol+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/alto-updatestreamparams+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/aml": {
+ "source": "iana"
+ },
+ "application/andrew-inset": {
+ "source": "iana",
+ "extensions": ["ez"]
+ },
+ "application/applefile": {
+ "source": "iana"
+ },
+ "application/applixware": {
+ "source": "apache",
+ "extensions": ["aw"]
+ },
+ "application/atf": {
+ "source": "iana"
+ },
+ "application/atfx": {
+ "source": "iana"
+ },
+ "application/atom+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atom"]
+ },
+ "application/atomcat+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atomcat"]
+ },
+ "application/atomdeleted+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atomdeleted"]
+ },
+ "application/atomicmail": {
+ "source": "iana"
+ },
+ "application/atomsvc+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["atomsvc"]
+ },
+ "application/atsc-dwd+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dwd"]
+ },
+ "application/atsc-dynamic-event-message": {
+ "source": "iana"
+ },
+ "application/atsc-held+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["held"]
+ },
+ "application/atsc-rdt+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/atsc-rsat+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rsat"]
+ },
+ "application/atxml": {
+ "source": "iana"
+ },
+ "application/auth-policy+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/bacnet-xdd+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/batch-smtp": {
+ "source": "iana"
+ },
+ "application/bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/beep+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/calendar+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/calendar+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xcs"]
+ },
+ "application/call-completion": {
+ "source": "iana"
+ },
+ "application/cals-1840": {
+ "source": "iana"
+ },
+ "application/captive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cbor": {
+ "source": "iana"
+ },
+ "application/cbor-seq": {
+ "source": "iana"
+ },
+ "application/cccex": {
+ "source": "iana"
+ },
+ "application/ccmp+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/ccxml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ccxml"]
+ },
+ "application/cdfx+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["cdfx"]
+ },
+ "application/cdmi-capability": {
+ "source": "iana",
+ "extensions": ["cdmia"]
+ },
+ "application/cdmi-container": {
+ "source": "iana",
+ "extensions": ["cdmic"]
+ },
+ "application/cdmi-domain": {
+ "source": "iana",
+ "extensions": ["cdmid"]
+ },
+ "application/cdmi-object": {
+ "source": "iana",
+ "extensions": ["cdmio"]
+ },
+ "application/cdmi-queue": {
+ "source": "iana",
+ "extensions": ["cdmiq"]
+ },
+ "application/cdni": {
+ "source": "iana"
+ },
+ "application/cea": {
+ "source": "iana"
+ },
+ "application/cea-2018+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cellml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cfw": {
+ "source": "iana"
+ },
+ "application/clue+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/clue_info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cms": {
+ "source": "iana"
+ },
+ "application/cnrp+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/coap-group+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/coap-payload": {
+ "source": "iana"
+ },
+ "application/commonground": {
+ "source": "iana"
+ },
+ "application/conference-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cose": {
+ "source": "iana"
+ },
+ "application/cose-key": {
+ "source": "iana"
+ },
+ "application/cose-key-set": {
+ "source": "iana"
+ },
+ "application/cpl+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/csrattrs": {
+ "source": "iana"
+ },
+ "application/csta+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cstadata+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/csvm+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/cu-seeme": {
+ "source": "apache",
+ "extensions": ["cu"]
+ },
+ "application/cwt": {
+ "source": "iana"
+ },
+ "application/cybercash": {
+ "source": "iana"
+ },
+ "application/dart": {
+ "compressible": true
+ },
+ "application/dash+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mpd"]
+ },
+ "application/dashdelta": {
+ "source": "iana"
+ },
+ "application/davmount+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["davmount"]
+ },
+ "application/dca-rft": {
+ "source": "iana"
+ },
+ "application/dcd": {
+ "source": "iana"
+ },
+ "application/dec-dx": {
+ "source": "iana"
+ },
+ "application/dialog-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dicom": {
+ "source": "iana"
+ },
+ "application/dicom+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dicom+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dii": {
+ "source": "iana"
+ },
+ "application/dit": {
+ "source": "iana"
+ },
+ "application/dns": {
+ "source": "iana"
+ },
+ "application/dns+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dns-message": {
+ "source": "iana"
+ },
+ "application/docbook+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["dbk"]
+ },
+ "application/dots+cbor": {
+ "source": "iana"
+ },
+ "application/dskpp+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/dssc+der": {
+ "source": "iana",
+ "extensions": ["dssc"]
+ },
+ "application/dssc+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xdssc"]
+ },
+ "application/dvcs": {
+ "source": "iana"
+ },
+ "application/ecmascript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ecma","es"]
+ },
+ "application/edi-consent": {
+ "source": "iana"
+ },
+ "application/edi-x12": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/edifact": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/efi": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.cap+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/emergencycalldata.comment+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/emergencycalldata.control+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/emergencycalldata.deviceinfo+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/emergencycalldata.ecall.msd": {
+ "source": "iana"
+ },
+ "application/emergencycalldata.providerinfo+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/emergencycalldata.serviceinfo+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/emergencycalldata.subscriberinfo+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/emergencycalldata.veds+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/emma+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["emma"]
+ },
+ "application/emotionml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["emotionml"]
+ },
+ "application/encaprtp": {
+ "source": "iana"
+ },
+ "application/epp+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/epub+zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["epub"]
+ },
+ "application/eshop": {
+ "source": "iana"
+ },
+ "application/exi": {
+ "source": "iana",
+ "extensions": ["exi"]
+ },
+ "application/expect-ct-report+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/fastinfoset": {
+ "source": "iana"
+ },
+ "application/fastsoap": {
+ "source": "iana"
+ },
+ "application/fdt+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["fdt"]
+ },
+ "application/fhir+json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/fhir+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/fido.trusted-apps+json": {
+ "compressible": true
+ },
+ "application/fits": {
+ "source": "iana"
+ },
+ "application/flexfec": {
+ "source": "iana"
+ },
+ "application/font-sfnt": {
+ "source": "iana"
+ },
+ "application/font-tdpfr": {
+ "source": "iana",
+ "extensions": ["pfr"]
+ },
+ "application/font-woff": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/framework-attributes+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/geo+json": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["geojson"]
+ },
+ "application/geo+json-seq": {
+ "source": "iana"
+ },
+ "application/geopackage+sqlite3": {
+ "source": "iana"
+ },
+ "application/geoxacml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/gltf-buffer": {
+ "source": "iana"
+ },
+ "application/gml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["gml"]
+ },
+ "application/gpx+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["gpx"]
+ },
+ "application/gxf": {
+ "source": "apache",
+ "extensions": ["gxf"]
+ },
+ "application/gzip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gz"]
+ },
+ "application/h224": {
+ "source": "iana"
+ },
+ "application/held+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/hjson": {
+ "extensions": ["hjson"]
+ },
+ "application/http": {
+ "source": "iana"
+ },
+ "application/hyperstudio": {
+ "source": "iana",
+ "extensions": ["stk"]
+ },
+ "application/ibe-key-request+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/ibe-pkg-reply+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/ibe-pp-data": {
+ "source": "iana"
+ },
+ "application/iges": {
+ "source": "iana"
+ },
+ "application/im-iscomposing+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/index": {
+ "source": "iana"
+ },
+ "application/index.cmd": {
+ "source": "iana"
+ },
+ "application/index.obj": {
+ "source": "iana"
+ },
+ "application/index.response": {
+ "source": "iana"
+ },
+ "application/index.vnd": {
+ "source": "iana"
+ },
+ "application/inkml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ink","inkml"]
+ },
+ "application/iotp": {
+ "source": "iana"
+ },
+ "application/ipfix": {
+ "source": "iana",
+ "extensions": ["ipfix"]
+ },
+ "application/ipp": {
+ "source": "iana"
+ },
+ "application/isup": {
+ "source": "iana"
+ },
+ "application/its+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["its"]
+ },
+ "application/java-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jar","war","ear"]
+ },
+ "application/java-serialized-object": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["ser"]
+ },
+ "application/java-vm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["class"]
+ },
+ "application/javascript": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["js","mjs"]
+ },
+ "application/jf2feed+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jrd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["json","map"]
+ },
+ "application/json-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
+ "application/jsonml+json": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["jsonml"]
+ },
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
+ "application/kpml-request+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/kpml-response+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/ld+json": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["jsonld"]
+ },
+ "application/lgr+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["lgr"]
+ },
+ "application/link-format": {
+ "source": "iana"
+ },
+ "application/load-control+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/lost+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["lostxml"]
+ },
+ "application/lostsync+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/lpf+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/lxf": {
+ "source": "iana"
+ },
+ "application/mac-binhex40": {
+ "source": "iana",
+ "extensions": ["hqx"]
+ },
+ "application/mac-compactpro": {
+ "source": "apache",
+ "extensions": ["cpt"]
+ },
+ "application/macwriteii": {
+ "source": "iana"
+ },
+ "application/mads+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mads"]
+ },
+ "application/manifest+json": {
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["webmanifest"]
+ },
+ "application/marc": {
+ "source": "iana",
+ "extensions": ["mrc"]
+ },
+ "application/marcxml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mrcx"]
+ },
+ "application/mathematica": {
+ "source": "iana",
+ "extensions": ["ma","nb","mb"]
+ },
+ "application/mathml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mathml"]
+ },
+ "application/mathml-content+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mathml-presentation+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-associated-procedure-description+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-deregister+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-envelope+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-msk+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-msk-response+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-protection-description+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-reception-report+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-register+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-register-response+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-schedule+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbms-user-service-description+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mbox": {
+ "source": "iana",
+ "extensions": ["mbox"]
+ },
+ "application/media-policy-dataset+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/media_control+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/mediaservercontrol+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mscml"]
+ },
+ "application/merge-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/metalink+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["metalink"]
+ },
+ "application/metalink4+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["meta4"]
+ },
+ "application/mets+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mets"]
+ },
+ "application/mf4": {
+ "source": "iana"
+ },
+ "application/mikey": {
+ "source": "iana"
+ },
+ "application/mipc": {
+ "source": "iana"
+ },
+ "application/mmt-aei+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["maei"]
+ },
+ "application/mmt-usd+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["musd"]
+ },
+ "application/mods+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mods"]
+ },
+ "application/moss-keys": {
+ "source": "iana"
+ },
+ "application/moss-signature": {
+ "source": "iana"
+ },
+ "application/mosskey-data": {
+ "source": "iana"
+ },
+ "application/mosskey-request": {
+ "source": "iana"
+ },
+ "application/mp21": {
+ "source": "iana",
+ "extensions": ["m21","mp21"]
+ },
+ "application/mp4": {
+ "source": "iana",
+ "extensions": ["mp4s","m4p"]
+ },
+ "application/mpeg4-generic": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod": {
+ "source": "iana"
+ },
+ "application/mpeg4-iod-xmt": {
+ "source": "iana"
+ },
+ "application/mrb-consumer+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xdf"]
+ },
+ "application/mrb-publish+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xdf"]
+ },
+ "application/msc-ivr+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/msc-mixer+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/msword": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["doc","dot"]
+ },
+ "application/mud+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/multipart-core": {
+ "source": "iana"
+ },
+ "application/mxf": {
+ "source": "iana",
+ "extensions": ["mxf"]
+ },
+ "application/n-quads": {
+ "source": "iana",
+ "extensions": ["nq"]
+ },
+ "application/n-triples": {
+ "source": "iana",
+ "extensions": ["nt"]
+ },
+ "application/nasdata": {
+ "source": "iana"
+ },
+ "application/news-checkgroups": {
+ "source": "iana",
+ "charset": "US-ASCII"
+ },
+ "application/news-groupinfo": {
+ "source": "iana",
+ "charset": "US-ASCII"
+ },
+ "application/news-transmission": {
+ "source": "iana"
+ },
+ "application/nlsml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/node": {
+ "source": "iana",
+ "extensions": ["cjs"]
+ },
+ "application/nss": {
+ "source": "iana"
+ },
+ "application/ocsp-request": {
+ "source": "iana"
+ },
+ "application/ocsp-response": {
+ "source": "iana"
+ },
+ "application/octet-stream": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]
+ },
+ "application/oda": {
+ "source": "iana",
+ "extensions": ["oda"]
+ },
+ "application/odm+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/odx": {
+ "source": "iana"
+ },
+ "application/oebps-package+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["opf"]
+ },
+ "application/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogx"]
+ },
+ "application/omdoc+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["omdoc"]
+ },
+ "application/onenote": {
+ "source": "apache",
+ "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
+ },
+ "application/opc-nodeset+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/oscore": {
+ "source": "iana"
+ },
+ "application/oxps": {
+ "source": "iana",
+ "extensions": ["oxps"]
+ },
+ "application/p2p-overlay+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["relo"]
+ },
+ "application/parityfec": {
+ "source": "iana"
+ },
+ "application/passport": {
+ "source": "iana"
+ },
+ "application/patch-ops-error+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xer"]
+ },
+ "application/pdf": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pdf"]
+ },
+ "application/pdx": {
+ "source": "iana"
+ },
+ "application/pem-certificate-chain": {
+ "source": "iana"
+ },
+ "application/pgp-encrypted": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pgp"]
+ },
+ "application/pgp-keys": {
+ "source": "iana"
+ },
+ "application/pgp-signature": {
+ "source": "iana",
+ "extensions": ["asc","sig"]
+ },
+ "application/pics-rules": {
+ "source": "apache",
+ "extensions": ["prf"]
+ },
+ "application/pidf+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/pidf-diff+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/pkcs10": {
+ "source": "iana",
+ "extensions": ["p10"]
+ },
+ "application/pkcs12": {
+ "source": "iana"
+ },
+ "application/pkcs7-mime": {
+ "source": "iana",
+ "extensions": ["p7m","p7c"]
+ },
+ "application/pkcs7-signature": {
+ "source": "iana",
+ "extensions": ["p7s"]
+ },
+ "application/pkcs8": {
+ "source": "iana",
+ "extensions": ["p8"]
+ },
+ "application/pkcs8-encrypted": {
+ "source": "iana"
+ },
+ "application/pkix-attr-cert": {
+ "source": "iana",
+ "extensions": ["ac"]
+ },
+ "application/pkix-cert": {
+ "source": "iana",
+ "extensions": ["cer"]
+ },
+ "application/pkix-crl": {
+ "source": "iana",
+ "extensions": ["crl"]
+ },
+ "application/pkix-pkipath": {
+ "source": "iana",
+ "extensions": ["pkipath"]
+ },
+ "application/pkixcmp": {
+ "source": "iana",
+ "extensions": ["pki"]
+ },
+ "application/pls+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["pls"]
+ },
+ "application/poc-settings+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/postscript": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ai","eps","ps"]
+ },
+ "application/ppsp-tracker+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/problem+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/provenance+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["provx"]
+ },
+ "application/prs.alvestrand.titrax-sheet": {
+ "source": "iana"
+ },
+ "application/prs.cww": {
+ "source": "iana",
+ "extensions": ["cww"]
+ },
+ "application/prs.hpub+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/prs.nprend": {
+ "source": "iana"
+ },
+ "application/prs.plucker": {
+ "source": "iana"
+ },
+ "application/prs.rdf-xml-crypt": {
+ "source": "iana"
+ },
+ "application/prs.xsf+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/pskc+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["pskcxml"]
+ },
+ "application/pvd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/qsig": {
+ "source": "iana"
+ },
+ "application/raml+yaml": {
+ "compressible": true,
+ "extensions": ["raml"]
+ },
+ "application/raptorfec": {
+ "source": "iana"
+ },
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rdf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rdf","owl"]
+ },
+ "application/reginfo+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rif"]
+ },
+ "application/relax-ng-compact-syntax": {
+ "source": "iana",
+ "extensions": ["rnc"]
+ },
+ "application/remote-printing": {
+ "source": "iana"
+ },
+ "application/reputon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/resource-lists+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rl"]
+ },
+ "application/resource-lists-diff+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rld"]
+ },
+ "application/rfc+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/riscos": {
+ "source": "iana"
+ },
+ "application/rlmi+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/rls-services+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rs"]
+ },
+ "application/route-apd+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rapd"]
+ },
+ "application/route-s-tsid+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["sls"]
+ },
+ "application/route-usd+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rusd"]
+ },
+ "application/rpki-ghostbusters": {
+ "source": "iana",
+ "extensions": ["gbr"]
+ },
+ "application/rpki-manifest": {
+ "source": "iana",
+ "extensions": ["mft"]
+ },
+ "application/rpki-publication": {
+ "source": "iana"
+ },
+ "application/rpki-roa": {
+ "source": "iana",
+ "extensions": ["roa"]
+ },
+ "application/rpki-updown": {
+ "source": "iana"
+ },
+ "application/rsd+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rsd"]
+ },
+ "application/rss+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["rss"]
+ },
+ "application/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "application/rtploopback": {
+ "source": "iana"
+ },
+ "application/rtx": {
+ "source": "iana"
+ },
+ "application/samlassertion+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/samlmetadata+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sarif+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sbe": {
+ "source": "iana"
+ },
+ "application/sbml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["sbml"]
+ },
+ "application/scaip+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/scim+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/scvp-cv-request": {
+ "source": "iana",
+ "extensions": ["scq"]
+ },
+ "application/scvp-cv-response": {
+ "source": "iana",
+ "extensions": ["scs"]
+ },
+ "application/scvp-vp-request": {
+ "source": "iana",
+ "extensions": ["spq"]
+ },
+ "application/scvp-vp-response": {
+ "source": "iana",
+ "extensions": ["spp"]
+ },
+ "application/sdp": {
+ "source": "iana",
+ "extensions": ["sdp"]
+ },
+ "application/secevent+jwt": {
+ "source": "iana"
+ },
+ "application/senml+cbor": {
+ "source": "iana"
+ },
+ "application/senml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/senml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["senmlx"]
+ },
+ "application/senml-etch+cbor": {
+ "source": "iana"
+ },
+ "application/senml-etch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/senml-exi": {
+ "source": "iana"
+ },
+ "application/sensml+cbor": {
+ "source": "iana"
+ },
+ "application/sensml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sensml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["sensmlx"]
+ },
+ "application/sensml-exi": {
+ "source": "iana"
+ },
+ "application/sep+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sep-exi": {
+ "source": "iana"
+ },
+ "application/session-info": {
+ "source": "iana"
+ },
+ "application/set-payment": {
+ "source": "iana"
+ },
+ "application/set-payment-initiation": {
+ "source": "iana",
+ "extensions": ["setpay"]
+ },
+ "application/set-registration": {
+ "source": "iana"
+ },
+ "application/set-registration-initiation": {
+ "source": "iana",
+ "extensions": ["setreg"]
+ },
+ "application/sgml": {
+ "source": "iana"
+ },
+ "application/sgml-open-catalog": {
+ "source": "iana"
+ },
+ "application/shf+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["shf"]
+ },
+ "application/sieve": {
+ "source": "iana",
+ "extensions": ["siv","sieve"]
+ },
+ "application/simple-filter+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/simple-message-summary": {
+ "source": "iana"
+ },
+ "application/simplesymbolcontainer": {
+ "source": "iana"
+ },
+ "application/sipc": {
+ "source": "iana"
+ },
+ "application/slate": {
+ "source": "iana"
+ },
+ "application/smil": {
+ "source": "iana"
+ },
+ "application/smil+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["smi","smil"]
+ },
+ "application/smpte336m": {
+ "source": "iana"
+ },
+ "application/soap+fastinfoset": {
+ "source": "iana"
+ },
+ "application/soap+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sparql-query": {
+ "source": "iana",
+ "extensions": ["rq"]
+ },
+ "application/sparql-results+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["srx"]
+ },
+ "application/spirits-event+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/sql": {
+ "source": "iana"
+ },
+ "application/srgs": {
+ "source": "iana",
+ "extensions": ["gram"]
+ },
+ "application/srgs+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["grxml"]
+ },
+ "application/sru+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["sru"]
+ },
+ "application/ssdl+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ssdl"]
+ },
+ "application/ssml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ssml"]
+ },
+ "application/stix+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/swid+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["swidtag"]
+ },
+ "application/tamp-apex-update": {
+ "source": "iana"
+ },
+ "application/tamp-apex-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-community-update": {
+ "source": "iana"
+ },
+ "application/tamp-community-update-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-error": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust": {
+ "source": "iana"
+ },
+ "application/tamp-sequence-adjust-confirm": {
+ "source": "iana"
+ },
+ "application/tamp-status-query": {
+ "source": "iana"
+ },
+ "application/tamp-status-response": {
+ "source": "iana"
+ },
+ "application/tamp-update": {
+ "source": "iana"
+ },
+ "application/tamp-update-confirm": {
+ "source": "iana"
+ },
+ "application/tar": {
+ "compressible": true
+ },
+ "application/taxii+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/td+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/tei+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tei","teicorpus"]
+ },
+ "application/tetra_isi": {
+ "source": "iana"
+ },
+ "application/thraud+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tfi"]
+ },
+ "application/timestamp-query": {
+ "source": "iana"
+ },
+ "application/timestamp-reply": {
+ "source": "iana"
+ },
+ "application/timestamped-data": {
+ "source": "iana",
+ "extensions": ["tsd"]
+ },
+ "application/tlsrpt+gzip": {
+ "source": "iana"
+ },
+ "application/tlsrpt+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/tnauthlist": {
+ "source": "iana"
+ },
+ "application/toml": {
+ "compressible": true,
+ "extensions": ["toml"]
+ },
+ "application/trickle-ice-sdpfrag": {
+ "source": "iana"
+ },
+ "application/trig": {
+ "source": "iana"
+ },
+ "application/ttml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ttml"]
+ },
+ "application/tve-trigger": {
+ "source": "iana"
+ },
+ "application/tzif": {
+ "source": "iana"
+ },
+ "application/tzif-leap": {
+ "source": "iana"
+ },
+ "application/ubjson": {
+ "compressible": false,
+ "extensions": ["ubj"]
+ },
+ "application/ulpfec": {
+ "source": "iana"
+ },
+ "application/urc-grpsheet+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/urc-ressheet+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rsheet"]
+ },
+ "application/urc-targetdesc+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["td"]
+ },
+ "application/urc-uisocketdesc+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vcard+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vemmi": {
+ "source": "iana"
+ },
+ "application/vividence.scriptfile": {
+ "source": "apache"
+ },
+ "application/vnd.1000minds.decision-model+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["1km"]
+ },
+ "application/vnd.3gpp-prose+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp-prose-pc3ch+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp-v2x-local-service-information": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.access-transfer-events+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.bsf+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.gmop+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mc-signalling-ear": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.mcdata-affiliation-command+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcdata-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcdata-payload": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.mcdata-service-config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcdata-signalling": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.mcdata-ue-config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcdata-user-profile+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-affiliation-command+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-floor-request+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-location-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-mbms-usage-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-service-config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-signed+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-ue-config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-ue-init-config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcptt-user-profile+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-affiliation-command+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-affiliation-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-location-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-service-config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-transmission-request+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-ue-config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mcvideo-user-profile+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.mid-call+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.pic-bw-large": {
+ "source": "iana",
+ "extensions": ["plb"]
+ },
+ "application/vnd.3gpp.pic-bw-small": {
+ "source": "iana",
+ "extensions": ["psb"]
+ },
+ "application/vnd.3gpp.pic-bw-var": {
+ "source": "iana",
+ "extensions": ["pvb"]
+ },
+ "application/vnd.3gpp.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp.sms+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.srvcc-ext+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.srvcc-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.state-and-event-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp.ussd+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp2.bcmcsinfo+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.3gpp2.sms": {
+ "source": "iana"
+ },
+ "application/vnd.3gpp2.tcap": {
+ "source": "iana",
+ "extensions": ["tcap"]
+ },
+ "application/vnd.3lightssoftware.imagescal": {
+ "source": "iana"
+ },
+ "application/vnd.3m.post-it-notes": {
+ "source": "iana",
+ "extensions": ["pwn"]
+ },
+ "application/vnd.accpac.simply.aso": {
+ "source": "iana",
+ "extensions": ["aso"]
+ },
+ "application/vnd.accpac.simply.imp": {
+ "source": "iana",
+ "extensions": ["imp"]
+ },
+ "application/vnd.acucobol": {
+ "source": "iana",
+ "extensions": ["acu"]
+ },
+ "application/vnd.acucorp": {
+ "source": "iana",
+ "extensions": ["atc","acutc"]
+ },
+ "application/vnd.adobe.air-application-installer-package+zip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["air"]
+ },
+ "application/vnd.adobe.flash.movie": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.formscentral.fcdt": {
+ "source": "iana",
+ "extensions": ["fcdt"]
+ },
+ "application/vnd.adobe.fxp": {
+ "source": "iana",
+ "extensions": ["fxp","fxpl"]
+ },
+ "application/vnd.adobe.partial-upload": {
+ "source": "iana"
+ },
+ "application/vnd.adobe.xdp+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xdp"]
+ },
+ "application/vnd.adobe.xfdf": {
+ "source": "iana",
+ "extensions": ["xfdf"]
+ },
+ "application/vnd.aether.imp": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.afplinedata-pagedef": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.foca-charset": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.foca-codedfont": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.foca-codepage": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.modca": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.modca-formdef": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.modca-mediummap": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.modca-objectcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.modca-overlay": {
+ "source": "iana"
+ },
+ "application/vnd.afpc.modca-pagesegment": {
+ "source": "iana"
+ },
+ "application/vnd.ah-barcode": {
+ "source": "iana"
+ },
+ "application/vnd.ahead.space": {
+ "source": "iana",
+ "extensions": ["ahead"]
+ },
+ "application/vnd.airzip.filesecure.azf": {
+ "source": "iana",
+ "extensions": ["azf"]
+ },
+ "application/vnd.airzip.filesecure.azs": {
+ "source": "iana",
+ "extensions": ["azs"]
+ },
+ "application/vnd.amadeus+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.amazon.ebook": {
+ "source": "apache",
+ "extensions": ["azw"]
+ },
+ "application/vnd.amazon.mobi8-ebook": {
+ "source": "iana"
+ },
+ "application/vnd.americandynamics.acc": {
+ "source": "iana",
+ "extensions": ["acc"]
+ },
+ "application/vnd.amiga.ami": {
+ "source": "iana",
+ "extensions": ["ami"]
+ },
+ "application/vnd.amundsen.maze+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.android.ota": {
+ "source": "iana"
+ },
+ "application/vnd.android.package-archive": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["apk"]
+ },
+ "application/vnd.anki": {
+ "source": "iana"
+ },
+ "application/vnd.anser-web-certificate-issue-initiation": {
+ "source": "iana",
+ "extensions": ["cii"]
+ },
+ "application/vnd.anser-web-funds-transfer-initiation": {
+ "source": "apache",
+ "extensions": ["fti"]
+ },
+ "application/vnd.antix.game-component": {
+ "source": "iana",
+ "extensions": ["atx"]
+ },
+ "application/vnd.apache.thrift.binary": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.compact": {
+ "source": "iana"
+ },
+ "application/vnd.apache.thrift.json": {
+ "source": "iana"
+ },
+ "application/vnd.api+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.aplextor.warrp+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apothekende.reservation+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.apple.installer+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mpkg"]
+ },
+ "application/vnd.apple.keynote": {
+ "source": "iana",
+ "extensions": ["key"]
+ },
+ "application/vnd.apple.mpegurl": {
+ "source": "iana",
+ "extensions": ["m3u8"]
+ },
+ "application/vnd.apple.numbers": {
+ "source": "iana",
+ "extensions": ["numbers"]
+ },
+ "application/vnd.apple.pages": {
+ "source": "iana",
+ "extensions": ["pages"]
+ },
+ "application/vnd.apple.pkpass": {
+ "compressible": false,
+ "extensions": ["pkpass"]
+ },
+ "application/vnd.arastra.swi": {
+ "source": "iana"
+ },
+ "application/vnd.aristanetworks.swi": {
+ "source": "iana",
+ "extensions": ["swi"]
+ },
+ "application/vnd.artisan+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.artsquare": {
+ "source": "iana"
+ },
+ "application/vnd.astraea-software.iota": {
+ "source": "iana",
+ "extensions": ["iota"]
+ },
+ "application/vnd.audiograph": {
+ "source": "iana",
+ "extensions": ["aep"]
+ },
+ "application/vnd.autopackage": {
+ "source": "iana"
+ },
+ "application/vnd.avalon+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.avistar+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.balsamiq.bmml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["bmml"]
+ },
+ "application/vnd.balsamiq.bmpr": {
+ "source": "iana"
+ },
+ "application/vnd.banana-accounting": {
+ "source": "iana"
+ },
+ "application/vnd.bbf.usp.error": {
+ "source": "iana"
+ },
+ "application/vnd.bbf.usp.msg": {
+ "source": "iana"
+ },
+ "application/vnd.bbf.usp.msg+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.bekitzur-stech+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.bint.med-content": {
+ "source": "iana"
+ },
+ "application/vnd.biopax.rdf+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.blink-idb-value-wrapper": {
+ "source": "iana"
+ },
+ "application/vnd.blueice.multipass": {
+ "source": "iana",
+ "extensions": ["mpm"]
+ },
+ "application/vnd.bluetooth.ep.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bluetooth.le.oob": {
+ "source": "iana"
+ },
+ "application/vnd.bmi": {
+ "source": "iana",
+ "extensions": ["bmi"]
+ },
+ "application/vnd.bpf": {
+ "source": "iana"
+ },
+ "application/vnd.bpf3": {
+ "source": "iana"
+ },
+ "application/vnd.businessobjects": {
+ "source": "iana",
+ "extensions": ["rep"]
+ },
+ "application/vnd.byu.uapi+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cab-jscript": {
+ "source": "iana"
+ },
+ "application/vnd.canon-cpdl": {
+ "source": "iana"
+ },
+ "application/vnd.canon-lips": {
+ "source": "iana"
+ },
+ "application/vnd.capasystems-pg+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cendio.thinlinc.clientconf": {
+ "source": "iana"
+ },
+ "application/vnd.century-systems.tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.chemdraw+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["cdxml"]
+ },
+ "application/vnd.chess-pgn": {
+ "source": "iana"
+ },
+ "application/vnd.chipnuts.karaoke-mmd": {
+ "source": "iana",
+ "extensions": ["mmd"]
+ },
+ "application/vnd.ciedi": {
+ "source": "iana"
+ },
+ "application/vnd.cinderella": {
+ "source": "iana",
+ "extensions": ["cdy"]
+ },
+ "application/vnd.cirpack.isdn-ext": {
+ "source": "iana"
+ },
+ "application/vnd.citationstyles.style+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csl"]
+ },
+ "application/vnd.claymore": {
+ "source": "iana",
+ "extensions": ["cla"]
+ },
+ "application/vnd.cloanto.rp9": {
+ "source": "iana",
+ "extensions": ["rp9"]
+ },
+ "application/vnd.clonk.c4group": {
+ "source": "iana",
+ "extensions": ["c4g","c4d","c4f","c4p","c4u"]
+ },
+ "application/vnd.cluetrust.cartomobile-config": {
+ "source": "iana",
+ "extensions": ["c11amc"]
+ },
+ "application/vnd.cluetrust.cartomobile-config-pkg": {
+ "source": "iana",
+ "extensions": ["c11amz"]
+ },
+ "application/vnd.coffeescript": {
+ "source": "iana"
+ },
+ "application/vnd.collabio.xodocuments.document": {
+ "source": "iana"
+ },
+ "application/vnd.collabio.xodocuments.document-template": {
+ "source": "iana"
+ },
+ "application/vnd.collabio.xodocuments.presentation": {
+ "source": "iana"
+ },
+ "application/vnd.collabio.xodocuments.presentation-template": {
+ "source": "iana"
+ },
+ "application/vnd.collabio.xodocuments.spreadsheet": {
+ "source": "iana"
+ },
+ "application/vnd.collabio.xodocuments.spreadsheet-template": {
+ "source": "iana"
+ },
+ "application/vnd.collection+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.doc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.collection.next+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.comicbook+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.comicbook-rar": {
+ "source": "iana"
+ },
+ "application/vnd.commerce-battelle": {
+ "source": "iana"
+ },
+ "application/vnd.commonspace": {
+ "source": "iana",
+ "extensions": ["csp"]
+ },
+ "application/vnd.contact.cmsg": {
+ "source": "iana",
+ "extensions": ["cdbcmsg"]
+ },
+ "application/vnd.coreos.ignition+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cosmocaller": {
+ "source": "iana",
+ "extensions": ["cmc"]
+ },
+ "application/vnd.crick.clicker": {
+ "source": "iana",
+ "extensions": ["clkx"]
+ },
+ "application/vnd.crick.clicker.keyboard": {
+ "source": "iana",
+ "extensions": ["clkk"]
+ },
+ "application/vnd.crick.clicker.palette": {
+ "source": "iana",
+ "extensions": ["clkp"]
+ },
+ "application/vnd.crick.clicker.template": {
+ "source": "iana",
+ "extensions": ["clkt"]
+ },
+ "application/vnd.crick.clicker.wordbank": {
+ "source": "iana",
+ "extensions": ["clkw"]
+ },
+ "application/vnd.criticaltools.wbs+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["wbs"]
+ },
+ "application/vnd.cryptii.pipe+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.crypto-shade-file": {
+ "source": "iana"
+ },
+ "application/vnd.ctc-posml": {
+ "source": "iana",
+ "extensions": ["pml"]
+ },
+ "application/vnd.ctct.ws+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cups-pdf": {
+ "source": "iana"
+ },
+ "application/vnd.cups-postscript": {
+ "source": "iana"
+ },
+ "application/vnd.cups-ppd": {
+ "source": "iana",
+ "extensions": ["ppd"]
+ },
+ "application/vnd.cups-raster": {
+ "source": "iana"
+ },
+ "application/vnd.cups-raw": {
+ "source": "iana"
+ },
+ "application/vnd.curl": {
+ "source": "iana"
+ },
+ "application/vnd.curl.car": {
+ "source": "apache",
+ "extensions": ["car"]
+ },
+ "application/vnd.curl.pcurl": {
+ "source": "apache",
+ "extensions": ["pcurl"]
+ },
+ "application/vnd.cyan.dean.root+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.cybank": {
+ "source": "iana"
+ },
+ "application/vnd.d2l.coursepackage1p0+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.d3m-dataset": {
+ "source": "iana"
+ },
+ "application/vnd.d3m-problem": {
+ "source": "iana"
+ },
+ "application/vnd.dart": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dart"]
+ },
+ "application/vnd.data-vision.rdz": {
+ "source": "iana",
+ "extensions": ["rdz"]
+ },
+ "application/vnd.datapackage+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dataresource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dbf": {
+ "source": "iana",
+ "extensions": ["dbf"]
+ },
+ "application/vnd.debian.binary-package": {
+ "source": "iana"
+ },
+ "application/vnd.dece.data": {
+ "source": "iana",
+ "extensions": ["uvf","uvvf","uvd","uvvd"]
+ },
+ "application/vnd.dece.ttml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uvt","uvvt"]
+ },
+ "application/vnd.dece.unspecified": {
+ "source": "iana",
+ "extensions": ["uvx","uvvx"]
+ },
+ "application/vnd.dece.zip": {
+ "source": "iana",
+ "extensions": ["uvz","uvvz"]
+ },
+ "application/vnd.denovo.fcselayout-link": {
+ "source": "iana",
+ "extensions": ["fe_launch"]
+ },
+ "application/vnd.desmume.movie": {
+ "source": "iana"
+ },
+ "application/vnd.dir-bi.plate-dl-nosuffix": {
+ "source": "iana"
+ },
+ "application/vnd.dm.delegation+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dna": {
+ "source": "iana",
+ "extensions": ["dna"]
+ },
+ "application/vnd.document+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dolby.mlp": {
+ "source": "apache",
+ "extensions": ["mlp"]
+ },
+ "application/vnd.dolby.mobile.1": {
+ "source": "iana"
+ },
+ "application/vnd.dolby.mobile.2": {
+ "source": "iana"
+ },
+ "application/vnd.doremir.scorecloud-binary-document": {
+ "source": "iana"
+ },
+ "application/vnd.dpgraph": {
+ "source": "iana",
+ "extensions": ["dpg"]
+ },
+ "application/vnd.dreamfactory": {
+ "source": "iana",
+ "extensions": ["dfac"]
+ },
+ "application/vnd.drive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ds-keypoint": {
+ "source": "apache",
+ "extensions": ["kpxx"]
+ },
+ "application/vnd.dtg.local": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.flash": {
+ "source": "iana"
+ },
+ "application/vnd.dtg.local.html": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ait": {
+ "source": "iana",
+ "extensions": ["ait"]
+ },
+ "application/vnd.dvb.dvbisl+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.dvbj": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.esgcontainer": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcdftnotifaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgaccess2": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcesgpdd": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.ipdcroaming": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-base": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.iptv.alfec-enhancement": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.notif-aggregate-root+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.notif-container+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.notif-generic+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.notif-ia-msglist+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.notif-ia-registration-request+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.notif-ia-registration-response+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.notif-init+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.dvb.pfr": {
+ "source": "iana"
+ },
+ "application/vnd.dvb.service": {
+ "source": "iana",
+ "extensions": ["svc"]
+ },
+ "application/vnd.dxr": {
+ "source": "iana"
+ },
+ "application/vnd.dynageo": {
+ "source": "iana",
+ "extensions": ["geo"]
+ },
+ "application/vnd.dzr": {
+ "source": "iana"
+ },
+ "application/vnd.easykaraoke.cdgdownload": {
+ "source": "iana"
+ },
+ "application/vnd.ecdis-update": {
+ "source": "iana"
+ },
+ "application/vnd.ecip.rlp": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.chart": {
+ "source": "iana",
+ "extensions": ["mag"]
+ },
+ "application/vnd.ecowin.filerequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.fileupdate": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.series": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesrequest": {
+ "source": "iana"
+ },
+ "application/vnd.ecowin.seriesupdate": {
+ "source": "iana"
+ },
+ "application/vnd.efi.img": {
+ "source": "iana"
+ },
+ "application/vnd.efi.iso": {
+ "source": "iana"
+ },
+ "application/vnd.emclient.accessrequest+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.enliven": {
+ "source": "iana",
+ "extensions": ["nml"]
+ },
+ "application/vnd.enphase.envoy": {
+ "source": "iana"
+ },
+ "application/vnd.eprints.data+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.epson.esf": {
+ "source": "iana",
+ "extensions": ["esf"]
+ },
+ "application/vnd.epson.msf": {
+ "source": "iana",
+ "extensions": ["msf"]
+ },
+ "application/vnd.epson.quickanime": {
+ "source": "iana",
+ "extensions": ["qam"]
+ },
+ "application/vnd.epson.salt": {
+ "source": "iana",
+ "extensions": ["slt"]
+ },
+ "application/vnd.epson.ssf": {
+ "source": "iana",
+ "extensions": ["ssf"]
+ },
+ "application/vnd.ericsson.quickcall": {
+ "source": "iana"
+ },
+ "application/vnd.espass-espass+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.eszigno3+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["es3","et3"]
+ },
+ "application/vnd.etsi.aoc+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.asic-e+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.etsi.asic-s+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.etsi.cug+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvcommand+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvdiscovery+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvprofile+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvsad-bc+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvsad-cod+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvsad-npvr+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvservice+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvsync+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.iptvueprofile+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.mcid+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.mheg5": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.overload-control-policy-dataset+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.pstn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.sci+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.simservs+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.timestamp-token": {
+ "source": "iana"
+ },
+ "application/vnd.etsi.tsl+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.etsi.tsl.der": {
+ "source": "iana"
+ },
+ "application/vnd.eudora.data": {
+ "source": "iana"
+ },
+ "application/vnd.evolv.ecig.profile": {
+ "source": "iana"
+ },
+ "application/vnd.evolv.ecig.settings": {
+ "source": "iana"
+ },
+ "application/vnd.evolv.ecig.theme": {
+ "source": "iana"
+ },
+ "application/vnd.exstream-empower+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.exstream-package": {
+ "source": "iana"
+ },
+ "application/vnd.ezpix-album": {
+ "source": "iana",
+ "extensions": ["ez2"]
+ },
+ "application/vnd.ezpix-package": {
+ "source": "iana",
+ "extensions": ["ez3"]
+ },
+ "application/vnd.f-secure.mobile": {
+ "source": "iana"
+ },
+ "application/vnd.fastcopy-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.fdf": {
+ "source": "iana",
+ "extensions": ["fdf"]
+ },
+ "application/vnd.fdsn.mseed": {
+ "source": "iana",
+ "extensions": ["mseed"]
+ },
+ "application/vnd.fdsn.seed": {
+ "source": "iana",
+ "extensions": ["seed","dataless"]
+ },
+ "application/vnd.ffsns": {
+ "source": "iana"
+ },
+ "application/vnd.ficlab.flb+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.filmit.zfc": {
+ "source": "iana"
+ },
+ "application/vnd.fints": {
+ "source": "iana"
+ },
+ "application/vnd.firemonkeys.cloudcell": {
+ "source": "iana"
+ },
+ "application/vnd.flographit": {
+ "source": "iana",
+ "extensions": ["gph"]
+ },
+ "application/vnd.fluxtime.clip": {
+ "source": "iana",
+ "extensions": ["ftc"]
+ },
+ "application/vnd.font-fontforge-sfd": {
+ "source": "iana"
+ },
+ "application/vnd.framemaker": {
+ "source": "iana",
+ "extensions": ["fm","frame","maker","book"]
+ },
+ "application/vnd.frogans.fnc": {
+ "source": "iana",
+ "extensions": ["fnc"]
+ },
+ "application/vnd.frogans.ltf": {
+ "source": "iana",
+ "extensions": ["ltf"]
+ },
+ "application/vnd.fsc.weblaunch": {
+ "source": "iana",
+ "extensions": ["fsc"]
+ },
+ "application/vnd.fujitsu.oasys": {
+ "source": "iana",
+ "extensions": ["oas"]
+ },
+ "application/vnd.fujitsu.oasys2": {
+ "source": "iana",
+ "extensions": ["oa2"]
+ },
+ "application/vnd.fujitsu.oasys3": {
+ "source": "iana",
+ "extensions": ["oa3"]
+ },
+ "application/vnd.fujitsu.oasysgp": {
+ "source": "iana",
+ "extensions": ["fg5"]
+ },
+ "application/vnd.fujitsu.oasysprs": {
+ "source": "iana",
+ "extensions": ["bh2"]
+ },
+ "application/vnd.fujixerox.art-ex": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.art4": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.ddd": {
+ "source": "iana",
+ "extensions": ["ddd"]
+ },
+ "application/vnd.fujixerox.docuworks": {
+ "source": "iana",
+ "extensions": ["xdw"]
+ },
+ "application/vnd.fujixerox.docuworks.binder": {
+ "source": "iana",
+ "extensions": ["xbd"]
+ },
+ "application/vnd.fujixerox.docuworks.container": {
+ "source": "iana"
+ },
+ "application/vnd.fujixerox.hbpl": {
+ "source": "iana"
+ },
+ "application/vnd.fut-misnet": {
+ "source": "iana"
+ },
+ "application/vnd.futoin+cbor": {
+ "source": "iana"
+ },
+ "application/vnd.futoin+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.fuzzysheet": {
+ "source": "iana",
+ "extensions": ["fzs"]
+ },
+ "application/vnd.genomatix.tuxedo": {
+ "source": "iana",
+ "extensions": ["txd"]
+ },
+ "application/vnd.gentics.grd+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geo+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geocube+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.geogebra.file": {
+ "source": "iana",
+ "extensions": ["ggb"]
+ },
+ "application/vnd.geogebra.tool": {
+ "source": "iana",
+ "extensions": ["ggt"]
+ },
+ "application/vnd.geometry-explorer": {
+ "source": "iana",
+ "extensions": ["gex","gre"]
+ },
+ "application/vnd.geonext": {
+ "source": "iana",
+ "extensions": ["gxt"]
+ },
+ "application/vnd.geoplan": {
+ "source": "iana",
+ "extensions": ["g2w"]
+ },
+ "application/vnd.geospace": {
+ "source": "iana",
+ "extensions": ["g3w"]
+ },
+ "application/vnd.gerber": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt": {
+ "source": "iana"
+ },
+ "application/vnd.globalplatform.card-content-mgt-response": {
+ "source": "iana"
+ },
+ "application/vnd.gmx": {
+ "source": "iana",
+ "extensions": ["gmx"]
+ },
+ "application/vnd.google-apps.document": {
+ "compressible": false,
+ "extensions": ["gdoc"]
+ },
+ "application/vnd.google-apps.presentation": {
+ "compressible": false,
+ "extensions": ["gslides"]
+ },
+ "application/vnd.google-apps.spreadsheet": {
+ "compressible": false,
+ "extensions": ["gsheet"]
+ },
+ "application/vnd.google-earth.kml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["kml"]
+ },
+ "application/vnd.google-earth.kmz": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["kmz"]
+ },
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.gov.sk.e-form+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.gov.sk.xmldatacontainer+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.grafeq": {
+ "source": "iana",
+ "extensions": ["gqf","gqs"]
+ },
+ "application/vnd.gridmp": {
+ "source": "iana"
+ },
+ "application/vnd.groove-account": {
+ "source": "iana",
+ "extensions": ["gac"]
+ },
+ "application/vnd.groove-help": {
+ "source": "iana",
+ "extensions": ["ghf"]
+ },
+ "application/vnd.groove-identity-message": {
+ "source": "iana",
+ "extensions": ["gim"]
+ },
+ "application/vnd.groove-injector": {
+ "source": "iana",
+ "extensions": ["grv"]
+ },
+ "application/vnd.groove-tool-message": {
+ "source": "iana",
+ "extensions": ["gtm"]
+ },
+ "application/vnd.groove-tool-template": {
+ "source": "iana",
+ "extensions": ["tpl"]
+ },
+ "application/vnd.groove-vcard": {
+ "source": "iana",
+ "extensions": ["vcg"]
+ },
+ "application/vnd.hal+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hal+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["hal"]
+ },
+ "application/vnd.handheld-entertainment+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["zmm"]
+ },
+ "application/vnd.hbci": {
+ "source": "iana",
+ "extensions": ["hbci"]
+ },
+ "application/vnd.hc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hcl-bireports": {
+ "source": "iana"
+ },
+ "application/vnd.hdt": {
+ "source": "iana"
+ },
+ "application/vnd.heroku+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hhe.lesson-player": {
+ "source": "iana",
+ "extensions": ["les"]
+ },
+ "application/vnd.hp-hpgl": {
+ "source": "iana",
+ "extensions": ["hpgl"]
+ },
+ "application/vnd.hp-hpid": {
+ "source": "iana",
+ "extensions": ["hpid"]
+ },
+ "application/vnd.hp-hps": {
+ "source": "iana",
+ "extensions": ["hps"]
+ },
+ "application/vnd.hp-jlyt": {
+ "source": "iana",
+ "extensions": ["jlt"]
+ },
+ "application/vnd.hp-pcl": {
+ "source": "iana",
+ "extensions": ["pcl"]
+ },
+ "application/vnd.hp-pclxl": {
+ "source": "iana",
+ "extensions": ["pclxl"]
+ },
+ "application/vnd.httphone": {
+ "source": "iana"
+ },
+ "application/vnd.hydrostatix.sof-data": {
+ "source": "iana",
+ "extensions": ["sfd-hdstx"]
+ },
+ "application/vnd.hyper+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hyper-item+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hyperdrive+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.hzn-3d-crossword": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.afplinedata": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.electronic-media": {
+ "source": "iana"
+ },
+ "application/vnd.ibm.minipay": {
+ "source": "iana",
+ "extensions": ["mpy"]
+ },
+ "application/vnd.ibm.modcap": {
+ "source": "iana",
+ "extensions": ["afp","listafp","list3820"]
+ },
+ "application/vnd.ibm.rights-management": {
+ "source": "iana",
+ "extensions": ["irm"]
+ },
+ "application/vnd.ibm.secure-container": {
+ "source": "iana",
+ "extensions": ["sc"]
+ },
+ "application/vnd.iccprofile": {
+ "source": "iana",
+ "extensions": ["icc","icm"]
+ },
+ "application/vnd.ieee.1905": {
+ "source": "iana"
+ },
+ "application/vnd.igloader": {
+ "source": "iana",
+ "extensions": ["igl"]
+ },
+ "application/vnd.imagemeter.folder+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.imagemeter.image+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.immervision-ivp": {
+ "source": "iana",
+ "extensions": ["ivp"]
+ },
+ "application/vnd.immervision-ivu": {
+ "source": "iana",
+ "extensions": ["ivu"]
+ },
+ "application/vnd.ims.imsccv1p1": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
+ "application/vnd.ims.lis.v2.result+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolproxy.id+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ims.lti.v2.toolsettings.simple+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informedcontrol.rms+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.informix-visionary": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project": {
+ "source": "iana"
+ },
+ "application/vnd.infotech.project+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.innopath.wamp.notification": {
+ "source": "iana"
+ },
+ "application/vnd.insors.igm": {
+ "source": "iana",
+ "extensions": ["igm"]
+ },
+ "application/vnd.intercon.formnet": {
+ "source": "iana",
+ "extensions": ["xpw","xpx"]
+ },
+ "application/vnd.intergeo": {
+ "source": "iana",
+ "extensions": ["i2g"]
+ },
+ "application/vnd.intertrust.digibox": {
+ "source": "iana"
+ },
+ "application/vnd.intertrust.nncp": {
+ "source": "iana"
+ },
+ "application/vnd.intu.qbo": {
+ "source": "iana",
+ "extensions": ["qbo"]
+ },
+ "application/vnd.intu.qfx": {
+ "source": "iana",
+ "extensions": ["qfx"]
+ },
+ "application/vnd.iptc.g2.catalogitem+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.iptc.g2.conceptitem+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.iptc.g2.knowledgeitem+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.iptc.g2.newsitem+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.iptc.g2.newsmessage+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.iptc.g2.packageitem+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.iptc.g2.planningitem+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ipunplugged.rcprofile": {
+ "source": "iana",
+ "extensions": ["rcprofile"]
+ },
+ "application/vnd.irepository.package+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["irp"]
+ },
+ "application/vnd.is-xpr": {
+ "source": "iana",
+ "extensions": ["xpr"]
+ },
+ "application/vnd.isac.fcs": {
+ "source": "iana",
+ "extensions": ["fcs"]
+ },
+ "application/vnd.iso11783-10+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.jam": {
+ "source": "iana",
+ "extensions": ["jam"]
+ },
+ "application/vnd.japannet-directory-service": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-jpnstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-payment-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-registration-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-setstore-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification": {
+ "source": "iana"
+ },
+ "application/vnd.japannet-verification-wakeup": {
+ "source": "iana"
+ },
+ "application/vnd.jcp.javame.midlet-rms": {
+ "source": "iana",
+ "extensions": ["rms"]
+ },
+ "application/vnd.jisp": {
+ "source": "iana",
+ "extensions": ["jisp"]
+ },
+ "application/vnd.joost.joda-archive": {
+ "source": "iana",
+ "extensions": ["joda"]
+ },
+ "application/vnd.jsk.isdn-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.kahootz": {
+ "source": "iana",
+ "extensions": ["ktz","ktr"]
+ },
+ "application/vnd.kde.karbon": {
+ "source": "iana",
+ "extensions": ["karbon"]
+ },
+ "application/vnd.kde.kchart": {
+ "source": "iana",
+ "extensions": ["chrt"]
+ },
+ "application/vnd.kde.kformula": {
+ "source": "iana",
+ "extensions": ["kfo"]
+ },
+ "application/vnd.kde.kivio": {
+ "source": "iana",
+ "extensions": ["flw"]
+ },
+ "application/vnd.kde.kontour": {
+ "source": "iana",
+ "extensions": ["kon"]
+ },
+ "application/vnd.kde.kpresenter": {
+ "source": "iana",
+ "extensions": ["kpr","kpt"]
+ },
+ "application/vnd.kde.kspread": {
+ "source": "iana",
+ "extensions": ["ksp"]
+ },
+ "application/vnd.kde.kword": {
+ "source": "iana",
+ "extensions": ["kwd","kwt"]
+ },
+ "application/vnd.kenameaapp": {
+ "source": "iana",
+ "extensions": ["htke"]
+ },
+ "application/vnd.kidspiration": {
+ "source": "iana",
+ "extensions": ["kia"]
+ },
+ "application/vnd.kinar": {
+ "source": "iana",
+ "extensions": ["kne","knp"]
+ },
+ "application/vnd.koan": {
+ "source": "iana",
+ "extensions": ["skp","skd","skt","skm"]
+ },
+ "application/vnd.kodak-descriptor": {
+ "source": "iana",
+ "extensions": ["sse"]
+ },
+ "application/vnd.las": {
+ "source": "iana"
+ },
+ "application/vnd.las.las+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.las.las+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["lasxml"]
+ },
+ "application/vnd.laszip": {
+ "source": "iana"
+ },
+ "application/vnd.leap+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.liberty-request+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.llamagraphics.life-balance.desktop": {
+ "source": "iana",
+ "extensions": ["lbd"]
+ },
+ "application/vnd.llamagraphics.life-balance.exchange+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["lbe"]
+ },
+ "application/vnd.logipipe.circuit+zip": {
+ "source": "iana",
+ "compressible": false
+ },
+ "application/vnd.loom": {
+ "source": "iana"
+ },
+ "application/vnd.lotus-1-2-3": {
+ "source": "iana",
+ "extensions": ["123"]
+ },
+ "application/vnd.lotus-approach": {
+ "source": "iana",
+ "extensions": ["apr"]
+ },
+ "application/vnd.lotus-freelance": {
+ "source": "iana",
+ "extensions": ["pre"]
+ },
+ "application/vnd.lotus-notes": {
+ "source": "iana",
+ "extensions": ["nsf"]
+ },
+ "application/vnd.lotus-organizer": {
+ "source": "iana",
+ "extensions": ["org"]
+ },
+ "application/vnd.lotus-screencam": {
+ "source": "iana",
+ "extensions": ["scm"]
+ },
+ "application/vnd.lotus-wordpro": {
+ "source": "iana",
+ "extensions": ["lwp"]
+ },
+ "application/vnd.macports.portpkg": {
+ "source": "iana",
+ "extensions": ["portpkg"]
+ },
+ "application/vnd.mapbox-vector-tile": {
+ "source": "iana"
+ },
+ "application/vnd.marlin.drm.actiontoken+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.marlin.drm.conftoken+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.marlin.drm.license+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.marlin.drm.mdcf": {
+ "source": "iana"
+ },
+ "application/vnd.mason+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.maxmind.maxmind-db": {
+ "source": "iana"
+ },
+ "application/vnd.mcd": {
+ "source": "iana",
+ "extensions": ["mcd"]
+ },
+ "application/vnd.medcalcdata": {
+ "source": "iana",
+ "extensions": ["mc1"]
+ },
+ "application/vnd.mediastation.cdkey": {
+ "source": "iana",
+ "extensions": ["cdkey"]
+ },
+ "application/vnd.meridian-slingshot": {
+ "source": "iana"
+ },
+ "application/vnd.mfer": {
+ "source": "iana",
+ "extensions": ["mwf"]
+ },
+ "application/vnd.mfmp": {
+ "source": "iana",
+ "extensions": ["mfm"]
+ },
+ "application/vnd.micro+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.micrografx.flo": {
+ "source": "iana",
+ "extensions": ["flo"]
+ },
+ "application/vnd.micrografx.igx": {
+ "source": "iana",
+ "extensions": ["igx"]
+ },
+ "application/vnd.microsoft.portable-executable": {
+ "source": "iana"
+ },
+ "application/vnd.microsoft.windows.thumbnail-cache": {
+ "source": "iana"
+ },
+ "application/vnd.miele+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.mif": {
+ "source": "iana",
+ "extensions": ["mif"]
+ },
+ "application/vnd.minisoft-hp3000-save": {
+ "source": "iana"
+ },
+ "application/vnd.mitsubishi.misty-guard.trustweb": {
+ "source": "iana"
+ },
+ "application/vnd.mobius.daf": {
+ "source": "iana",
+ "extensions": ["daf"]
+ },
+ "application/vnd.mobius.dis": {
+ "source": "iana",
+ "extensions": ["dis"]
+ },
+ "application/vnd.mobius.mbk": {
+ "source": "iana",
+ "extensions": ["mbk"]
+ },
+ "application/vnd.mobius.mqy": {
+ "source": "iana",
+ "extensions": ["mqy"]
+ },
+ "application/vnd.mobius.msl": {
+ "source": "iana",
+ "extensions": ["msl"]
+ },
+ "application/vnd.mobius.plc": {
+ "source": "iana",
+ "extensions": ["plc"]
+ },
+ "application/vnd.mobius.txf": {
+ "source": "iana",
+ "extensions": ["txf"]
+ },
+ "application/vnd.mophun.application": {
+ "source": "iana",
+ "extensions": ["mpn"]
+ },
+ "application/vnd.mophun.certificate": {
+ "source": "iana",
+ "extensions": ["mpc"]
+ },
+ "application/vnd.motorola.flexsuite": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.adsi": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.fis": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.gotap": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.kmr": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.ttc": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.flexsuite.wem": {
+ "source": "iana"
+ },
+ "application/vnd.motorola.iprm": {
+ "source": "iana"
+ },
+ "application/vnd.mozilla.xul+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xul"]
+ },
+ "application/vnd.ms-3mfdocument": {
+ "source": "iana"
+ },
+ "application/vnd.ms-artgalry": {
+ "source": "iana",
+ "extensions": ["cil"]
+ },
+ "application/vnd.ms-asf": {
+ "source": "iana"
+ },
+ "application/vnd.ms-cab-compressed": {
+ "source": "iana",
+ "extensions": ["cab"]
+ },
+ "application/vnd.ms-color.iccprofile": {
+ "source": "apache"
+ },
+ "application/vnd.ms-excel": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xls","xlm","xla","xlc","xlt","xlw"]
+ },
+ "application/vnd.ms-excel.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlam"]
+ },
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsb"]
+ },
+ "application/vnd.ms-excel.sheet.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xlsm"]
+ },
+ "application/vnd.ms-excel.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["xltm"]
+ },
+ "application/vnd.ms-fontobject": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eot"]
+ },
+ "application/vnd.ms-htmlhelp": {
+ "source": "iana",
+ "extensions": ["chm"]
+ },
+ "application/vnd.ms-ims": {
+ "source": "iana",
+ "extensions": ["ims"]
+ },
+ "application/vnd.ms-lrm": {
+ "source": "iana",
+ "extensions": ["lrm"]
+ },
+ "application/vnd.ms-office.activex+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ms-officetheme": {
+ "source": "iana",
+ "extensions": ["thmx"]
+ },
+ "application/vnd.ms-opentype": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-outlook": {
+ "compressible": false,
+ "extensions": ["msg"]
+ },
+ "application/vnd.ms-package.obfuscated-opentype": {
+ "source": "apache"
+ },
+ "application/vnd.ms-pki.seccat": {
+ "source": "apache",
+ "extensions": ["cat"]
+ },
+ "application/vnd.ms-pki.stl": {
+ "source": "apache",
+ "extensions": ["stl"]
+ },
+ "application/vnd.ms-playready.initiator+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ms-powerpoint": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ppt","pps","pot"]
+ },
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppam"]
+ },
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["pptm"]
+ },
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["sldm"]
+ },
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["ppsm"]
+ },
+ "application/vnd.ms-powerpoint.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["potm"]
+ },
+ "application/vnd.ms-printdevicecapabilities+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ms-printing.printticket+xml": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/vnd.ms-printschematicket+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.ms-project": {
+ "source": "iana",
+ "extensions": ["mpp","mpt"]
+ },
+ "application/vnd.ms-tnef": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.nwprinting.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.printerpairing": {
+ "source": "iana"
+ },
+ "application/vnd.ms-windows.wsd.oob": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.lic-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-chlg-req": {
+ "source": "iana"
+ },
+ "application/vnd.ms-wmdrm.meter-resp": {
+ "source": "iana"
+ },
+ "application/vnd.ms-word.document.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["docm"]
+ },
+ "application/vnd.ms-word.template.macroenabled.12": {
+ "source": "iana",
+ "extensions": ["dotm"]
+ },
+ "application/vnd.ms-works": {
+ "source": "iana",
+ "extensions": ["wps","wks","wcm","wdb"]
+ },
+ "application/vnd.ms-wpl": {
+ "source": "iana",
+ "extensions": ["wpl"]
+ },
+ "application/vnd.ms-xpsdocument": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xps"]
+ },
+ "application/vnd.msa-disk-image": {
+ "source": "iana"
+ },
+ "application/vnd.mseq": {
+ "source": "iana",
+ "extensions": ["mseq"]
+ },
+ "application/vnd.msign": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator": {
+ "source": "iana"
+ },
+ "application/vnd.multiad.creator.cif": {
+ "source": "iana"
+ },
+ "application/vnd.music-niff": {
+ "source": "iana"
+ },
+ "application/vnd.musician": {
+ "source": "iana",
+ "extensions": ["mus"]
+ },
+ "application/vnd.muvee.style": {
+ "source": "iana",
+ "extensions": ["msty"]
+ },
+ "application/vnd.mynfc": {
+ "source": "iana",
+ "extensions": ["taglet"]
+ },
+ "application/vnd.ncd.control": {
+ "source": "iana"
+ },
+ "application/vnd.ncd.reference": {
+ "source": "iana"
+ },
+ "application/vnd.nearst.inv+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nervana": {
+ "source": "iana"
+ },
+ "application/vnd.netfpx": {
+ "source": "iana"
+ },
+ "application/vnd.neurolanguage.nlu": {
+ "source": "iana",
+ "extensions": ["nlu"]
+ },
+ "application/vnd.nimn": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.nitro.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nintendo.snes.rom": {
+ "source": "iana"
+ },
+ "application/vnd.nitf": {
+ "source": "iana",
+ "extensions": ["ntf","nitf"]
+ },
+ "application/vnd.noblenet-directory": {
+ "source": "iana",
+ "extensions": ["nnd"]
+ },
+ "application/vnd.noblenet-sealer": {
+ "source": "iana",
+ "extensions": ["nns"]
+ },
+ "application/vnd.noblenet-web": {
+ "source": "iana",
+ "extensions": ["nnw"]
+ },
+ "application/vnd.nokia.catalogs": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.conml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nokia.iptv.config+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nokia.isds-radio-presets": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.landmark+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nokia.landmarkcollection+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nokia.n-gage.ac+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ac"]
+ },
+ "application/vnd.nokia.n-gage.data": {
+ "source": "iana",
+ "extensions": ["ngdat"]
+ },
+ "application/vnd.nokia.n-gage.symbian.install": {
+ "source": "iana",
+ "extensions": ["n-gage"]
+ },
+ "application/vnd.nokia.ncd": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.nokia.pcd+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.nokia.radio-preset": {
+ "source": "iana",
+ "extensions": ["rpst"]
+ },
+ "application/vnd.nokia.radio-presets": {
+ "source": "iana",
+ "extensions": ["rpss"]
+ },
+ "application/vnd.novadigm.edm": {
+ "source": "iana",
+ "extensions": ["edm"]
+ },
+ "application/vnd.novadigm.edx": {
+ "source": "iana",
+ "extensions": ["edx"]
+ },
+ "application/vnd.novadigm.ext": {
+ "source": "iana",
+ "extensions": ["ext"]
+ },
+ "application/vnd.ntt-local.content-share": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.file-transfer": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.ogw_remote-access": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_remote": {
+ "source": "iana"
+ },
+ "application/vnd.ntt-local.sip-ta_tcp_stream": {
+ "source": "iana"
+ },
+ "application/vnd.oasis.opendocument.chart": {
+ "source": "iana",
+ "extensions": ["odc"]
+ },
+ "application/vnd.oasis.opendocument.chart-template": {
+ "source": "iana",
+ "extensions": ["otc"]
+ },
+ "application/vnd.oasis.opendocument.database": {
+ "source": "iana",
+ "extensions": ["odb"]
+ },
+ "application/vnd.oasis.opendocument.formula": {
+ "source": "iana",
+ "extensions": ["odf"]
+ },
+ "application/vnd.oasis.opendocument.formula-template": {
+ "source": "iana",
+ "extensions": ["odft"]
+ },
+ "application/vnd.oasis.opendocument.graphics": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odg"]
+ },
+ "application/vnd.oasis.opendocument.graphics-template": {
+ "source": "iana",
+ "extensions": ["otg"]
+ },
+ "application/vnd.oasis.opendocument.image": {
+ "source": "iana",
+ "extensions": ["odi"]
+ },
+ "application/vnd.oasis.opendocument.image-template": {
+ "source": "iana",
+ "extensions": ["oti"]
+ },
+ "application/vnd.oasis.opendocument.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odp"]
+ },
+ "application/vnd.oasis.opendocument.presentation-template": {
+ "source": "iana",
+ "extensions": ["otp"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ods"]
+ },
+ "application/vnd.oasis.opendocument.spreadsheet-template": {
+ "source": "iana",
+ "extensions": ["ots"]
+ },
+ "application/vnd.oasis.opendocument.text": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["odt"]
+ },
+ "application/vnd.oasis.opendocument.text-master": {
+ "source": "iana",
+ "extensions": ["odm"]
+ },
+ "application/vnd.oasis.opendocument.text-template": {
+ "source": "iana",
+ "extensions": ["ott"]
+ },
+ "application/vnd.oasis.opendocument.text-web": {
+ "source": "iana",
+ "extensions": ["oth"]
+ },
+ "application/vnd.obn": {
+ "source": "iana"
+ },
+ "application/vnd.ocf+cbor": {
+ "source": "iana"
+ },
+ "application/vnd.oci.image.manifest.v1+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oftn.l10n+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessdownload+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.contentaccessstreaming+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.cspg-hexbinary": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.dae.svg+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.dae.xhtml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.mippvcontrolmessage+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.pae.gem": {
+ "source": "iana"
+ },
+ "application/vnd.oipf.spdiscovery+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.spdlist+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.ueprofile+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oipf.userprofile+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.olpc-sugar": {
+ "source": "iana",
+ "extensions": ["xo"]
+ },
+ "application/vnd.oma-scws-config": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-request": {
+ "source": "iana"
+ },
+ "application/vnd.oma-scws-http-response": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.bcast.drm-trigger+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.bcast.imd+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.bcast.ltkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.notification+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.bcast.provisioningtrigger": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgboot": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.sgdd+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.bcast.sgdu": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.simple-symbol-container": {
+ "source": "iana"
+ },
+ "application/vnd.oma.bcast.smartcard-trigger+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.bcast.sprov+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.bcast.stkm": {
+ "source": "iana"
+ },
+ "application/vnd.oma.cab-address-book+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.cab-feature-handler+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.cab-pcc+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.cab-subs-invite+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.cab-user-prefs+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.dcd": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dcdc": {
+ "source": "iana"
+ },
+ "application/vnd.oma.dd2+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dd2"]
+ },
+ "application/vnd.oma.drm.risd+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.group-usage-list+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.lwm2m+cbor": {
+ "source": "iana"
+ },
+ "application/vnd.oma.lwm2m+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.lwm2m+tlv": {
+ "source": "iana"
+ },
+ "application/vnd.oma.pal+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.poc.detailed-progress-report+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.poc.final-report+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.poc.groups+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.poc.invocation-descriptor+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.poc.optimized-progress-report+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.push": {
+ "source": "iana"
+ },
+ "application/vnd.oma.scidm.messages+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oma.xcap-directory+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.omads-email+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/vnd.omads-file+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/vnd.omads-folder+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/vnd.omaloc-supl-init": {
+ "source": "iana"
+ },
+ "application/vnd.onepager": {
+ "source": "iana"
+ },
+ "application/vnd.onepagertamp": {
+ "source": "iana"
+ },
+ "application/vnd.onepagertamx": {
+ "source": "iana"
+ },
+ "application/vnd.onepagertat": {
+ "source": "iana"
+ },
+ "application/vnd.onepagertatp": {
+ "source": "iana"
+ },
+ "application/vnd.onepagertatx": {
+ "source": "iana"
+ },
+ "application/vnd.openblox.game+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["obgx"]
+ },
+ "application/vnd.openblox.game-binary": {
+ "source": "iana"
+ },
+ "application/vnd.openeye.oeb": {
+ "source": "iana"
+ },
+ "application/vnd.openofficeorg.extension": {
+ "source": "apache",
+ "extensions": ["oxt"]
+ },
+ "application/vnd.openstreetmap.data+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["osm"]
+ },
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.drawing+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["pptx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": {
+ "source": "iana",
+ "extensions": ["sldx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
+ "source": "iana",
+ "extensions": ["ppsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template": {
+ "source": "iana",
+ "extensions": ["potx"]
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["xlsx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
+ "source": "iana",
+ "extensions": ["xltx"]
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.theme+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.vmldrawing": {
+ "source": "iana"
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["docx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
+ "source": "iana",
+ "extensions": ["dotx"]
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-package.core-properties+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.openxmlformats-package.relationships+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.orange.indata": {
+ "source": "iana"
+ },
+ "application/vnd.osa.netdeploy": {
+ "source": "iana"
+ },
+ "application/vnd.osgeo.mapguide.package": {
+ "source": "iana",
+ "extensions": ["mgp"]
+ },
+ "application/vnd.osgi.bundle": {
+ "source": "iana"
+ },
+ "application/vnd.osgi.dp": {
+ "source": "iana",
+ "extensions": ["dp"]
+ },
+ "application/vnd.osgi.subsystem": {
+ "source": "iana",
+ "extensions": ["esa"]
+ },
+ "application/vnd.otps.ct-kip+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.oxli.countgraph": {
+ "source": "iana"
+ },
+ "application/vnd.pagerduty+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.palm": {
+ "source": "iana",
+ "extensions": ["pdb","pqa","oprc"]
+ },
+ "application/vnd.panoply": {
+ "source": "iana"
+ },
+ "application/vnd.paos.xml": {
+ "source": "iana"
+ },
+ "application/vnd.patentdive": {
+ "source": "iana"
+ },
+ "application/vnd.patientecommsdoc": {
+ "source": "iana"
+ },
+ "application/vnd.pawaafile": {
+ "source": "iana",
+ "extensions": ["paw"]
+ },
+ "application/vnd.pcos": {
+ "source": "iana"
+ },
+ "application/vnd.pg.format": {
+ "source": "iana",
+ "extensions": ["str"]
+ },
+ "application/vnd.pg.osasli": {
+ "source": "iana",
+ "extensions": ["ei6"]
+ },
+ "application/vnd.piaccess.application-licence": {
+ "source": "iana"
+ },
+ "application/vnd.picsel": {
+ "source": "iana",
+ "extensions": ["efif"]
+ },
+ "application/vnd.pmi.widget": {
+ "source": "iana",
+ "extensions": ["wg"]
+ },
+ "application/vnd.poc.group-advertisement+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.pocketlearn": {
+ "source": "iana",
+ "extensions": ["plf"]
+ },
+ "application/vnd.powerbuilder6": {
+ "source": "iana",
+ "extensions": ["pbd"]
+ },
+ "application/vnd.powerbuilder6-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder7-s": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75": {
+ "source": "iana"
+ },
+ "application/vnd.powerbuilder75-s": {
+ "source": "iana"
+ },
+ "application/vnd.preminet": {
+ "source": "iana"
+ },
+ "application/vnd.previewsystems.box": {
+ "source": "iana",
+ "extensions": ["box"]
+ },
+ "application/vnd.proteus.magazine": {
+ "source": "iana",
+ "extensions": ["mgz"]
+ },
+ "application/vnd.psfs": {
+ "source": "iana"
+ },
+ "application/vnd.publishare-delta-tree": {
+ "source": "iana",
+ "extensions": ["qps"]
+ },
+ "application/vnd.pvi.ptid1": {
+ "source": "iana",
+ "extensions": ["ptid"]
+ },
+ "application/vnd.pwg-multiplexed": {
+ "source": "iana"
+ },
+ "application/vnd.pwg-xhtml-print+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.qualcomm.brew-app-res": {
+ "source": "iana"
+ },
+ "application/vnd.quarantainenet": {
+ "source": "iana"
+ },
+ "application/vnd.quark.quarkxpress": {
+ "source": "iana",
+ "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"]
+ },
+ "application/vnd.quobject-quoxdocument": {
+ "source": "iana"
+ },
+ "application/vnd.radisys.moml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-audit+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-audit-conf+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-audit-conn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-audit-dialog+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-audit-stream+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-conf+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-dialog+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-dialog-base+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-dialog-fax-detect+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-dialog-group+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-dialog-speech+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.radisys.msml-dialog-transform+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.rainstor.data": {
+ "source": "iana"
+ },
+ "application/vnd.rapid": {
+ "source": "iana"
+ },
+ "application/vnd.rar": {
+ "source": "iana",
+ "extensions": ["rar"]
+ },
+ "application/vnd.realvnc.bed": {
+ "source": "iana",
+ "extensions": ["bed"]
+ },
+ "application/vnd.recordare.musicxml": {
+ "source": "iana",
+ "extensions": ["mxl"]
+ },
+ "application/vnd.recordare.musicxml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["musicxml"]
+ },
+ "application/vnd.renlearn.rlprint": {
+ "source": "iana"
+ },
+ "application/vnd.restful+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.rig.cryptonote": {
+ "source": "iana",
+ "extensions": ["cryptonote"]
+ },
+ "application/vnd.rim.cod": {
+ "source": "apache",
+ "extensions": ["cod"]
+ },
+ "application/vnd.rn-realmedia": {
+ "source": "apache",
+ "extensions": ["rm"]
+ },
+ "application/vnd.rn-realmedia-vbr": {
+ "source": "apache",
+ "extensions": ["rmvb"]
+ },
+ "application/vnd.route66.link66+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["link66"]
+ },
+ "application/vnd.rs-274x": {
+ "source": "iana"
+ },
+ "application/vnd.ruckus.download": {
+ "source": "iana"
+ },
+ "application/vnd.s3sms": {
+ "source": "iana"
+ },
+ "application/vnd.sailingtracker.track": {
+ "source": "iana",
+ "extensions": ["st"]
+ },
+ "application/vnd.sar": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.cid": {
+ "source": "iana"
+ },
+ "application/vnd.sbm.mid2": {
+ "source": "iana"
+ },
+ "application/vnd.scribus": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.3df": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.csf": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.doc": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.eml": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.mht": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.net": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.ppt": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.tiff": {
+ "source": "iana"
+ },
+ "application/vnd.sealed.xls": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.html": {
+ "source": "iana"
+ },
+ "application/vnd.sealedmedia.softseal.pdf": {
+ "source": "iana"
+ },
+ "application/vnd.seemail": {
+ "source": "iana",
+ "extensions": ["see"]
+ },
+ "application/vnd.sema": {
+ "source": "iana",
+ "extensions": ["sema"]
+ },
+ "application/vnd.semd": {
+ "source": "iana",
+ "extensions": ["semd"]
+ },
+ "application/vnd.semf": {
+ "source": "iana",
+ "extensions": ["semf"]
+ },
+ "application/vnd.shade-save-file": {
+ "source": "iana"
+ },
+ "application/vnd.shana.informed.formdata": {
+ "source": "iana",
+ "extensions": ["ifm"]
+ },
+ "application/vnd.shana.informed.formtemplate": {
+ "source": "iana",
+ "extensions": ["itp"]
+ },
+ "application/vnd.shana.informed.interchange": {
+ "source": "iana",
+ "extensions": ["iif"]
+ },
+ "application/vnd.shana.informed.package": {
+ "source": "iana",
+ "extensions": ["ipk"]
+ },
+ "application/vnd.shootproof+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.shopkick+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.shp": {
+ "source": "iana"
+ },
+ "application/vnd.shx": {
+ "source": "iana"
+ },
+ "application/vnd.sigrok.session": {
+ "source": "iana"
+ },
+ "application/vnd.simtech-mindmapper": {
+ "source": "iana",
+ "extensions": ["twd","twds"]
+ },
+ "application/vnd.siren+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.smaf": {
+ "source": "iana",
+ "extensions": ["mmf"]
+ },
+ "application/vnd.smart.notebook": {
+ "source": "iana"
+ },
+ "application/vnd.smart.teacher": {
+ "source": "iana",
+ "extensions": ["teacher"]
+ },
+ "application/vnd.snesdev-page-table": {
+ "source": "iana"
+ },
+ "application/vnd.software602.filler.form+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["fo"]
+ },
+ "application/vnd.software602.filler.form-xml-zip": {
+ "source": "iana"
+ },
+ "application/vnd.solent.sdkm+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["sdkm","sdkd"]
+ },
+ "application/vnd.spotfire.dxp": {
+ "source": "iana",
+ "extensions": ["dxp"]
+ },
+ "application/vnd.spotfire.sfs": {
+ "source": "iana",
+ "extensions": ["sfs"]
+ },
+ "application/vnd.sqlite3": {
+ "source": "iana"
+ },
+ "application/vnd.sss-cod": {
+ "source": "iana"
+ },
+ "application/vnd.sss-dtf": {
+ "source": "iana"
+ },
+ "application/vnd.sss-ntf": {
+ "source": "iana"
+ },
+ "application/vnd.stardivision.calc": {
+ "source": "apache",
+ "extensions": ["sdc"]
+ },
+ "application/vnd.stardivision.draw": {
+ "source": "apache",
+ "extensions": ["sda"]
+ },
+ "application/vnd.stardivision.impress": {
+ "source": "apache",
+ "extensions": ["sdd"]
+ },
+ "application/vnd.stardivision.math": {
+ "source": "apache",
+ "extensions": ["smf"]
+ },
+ "application/vnd.stardivision.writer": {
+ "source": "apache",
+ "extensions": ["sdw","vor"]
+ },
+ "application/vnd.stardivision.writer-global": {
+ "source": "apache",
+ "extensions": ["sgl"]
+ },
+ "application/vnd.stepmania.package": {
+ "source": "iana",
+ "extensions": ["smzip"]
+ },
+ "application/vnd.stepmania.stepchart": {
+ "source": "iana",
+ "extensions": ["sm"]
+ },
+ "application/vnd.street-stream": {
+ "source": "iana"
+ },
+ "application/vnd.sun.wadl+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["wadl"]
+ },
+ "application/vnd.sun.xml.calc": {
+ "source": "apache",
+ "extensions": ["sxc"]
+ },
+ "application/vnd.sun.xml.calc.template": {
+ "source": "apache",
+ "extensions": ["stc"]
+ },
+ "application/vnd.sun.xml.draw": {
+ "source": "apache",
+ "extensions": ["sxd"]
+ },
+ "application/vnd.sun.xml.draw.template": {
+ "source": "apache",
+ "extensions": ["std"]
+ },
+ "application/vnd.sun.xml.impress": {
+ "source": "apache",
+ "extensions": ["sxi"]
+ },
+ "application/vnd.sun.xml.impress.template": {
+ "source": "apache",
+ "extensions": ["sti"]
+ },
+ "application/vnd.sun.xml.math": {
+ "source": "apache",
+ "extensions": ["sxm"]
+ },
+ "application/vnd.sun.xml.writer": {
+ "source": "apache",
+ "extensions": ["sxw"]
+ },
+ "application/vnd.sun.xml.writer.global": {
+ "source": "apache",
+ "extensions": ["sxg"]
+ },
+ "application/vnd.sun.xml.writer.template": {
+ "source": "apache",
+ "extensions": ["stw"]
+ },
+ "application/vnd.sus-calendar": {
+ "source": "iana",
+ "extensions": ["sus","susp"]
+ },
+ "application/vnd.svd": {
+ "source": "iana",
+ "extensions": ["svd"]
+ },
+ "application/vnd.swiftview-ics": {
+ "source": "iana"
+ },
+ "application/vnd.sycle+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.symbian.install": {
+ "source": "apache",
+ "extensions": ["sis","sisx"]
+ },
+ "application/vnd.syncml+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["xsm"]
+ },
+ "application/vnd.syncml.dm+wbxml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "extensions": ["bdm"]
+ },
+ "application/vnd.syncml.dm+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["xdm"]
+ },
+ "application/vnd.syncml.dm.notification": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmddf+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["ddf"]
+ },
+ "application/vnd.syncml.dmtnds+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.syncml.dmtnds+xml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true
+ },
+ "application/vnd.syncml.ds.notification": {
+ "source": "iana"
+ },
+ "application/vnd.tableschema+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.tao.intent-module-archive": {
+ "source": "iana",
+ "extensions": ["tao"]
+ },
+ "application/vnd.tcpdump.pcap": {
+ "source": "iana",
+ "extensions": ["pcap","cap","dmp"]
+ },
+ "application/vnd.think-cell.ppttc+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.tmd.mediaflex.api+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.tml": {
+ "source": "iana"
+ },
+ "application/vnd.tmobile-livetv": {
+ "source": "iana",
+ "extensions": ["tmo"]
+ },
+ "application/vnd.tri.onesource": {
+ "source": "iana"
+ },
+ "application/vnd.trid.tpt": {
+ "source": "iana",
+ "extensions": ["tpt"]
+ },
+ "application/vnd.triscape.mxs": {
+ "source": "iana",
+ "extensions": ["mxs"]
+ },
+ "application/vnd.trueapp": {
+ "source": "iana",
+ "extensions": ["tra"]
+ },
+ "application/vnd.truedoc": {
+ "source": "iana"
+ },
+ "application/vnd.ubisoft.webplayer": {
+ "source": "iana"
+ },
+ "application/vnd.ufdl": {
+ "source": "iana",
+ "extensions": ["ufd","ufdl"]
+ },
+ "application/vnd.uiq.theme": {
+ "source": "iana",
+ "extensions": ["utz"]
+ },
+ "application/vnd.umajin": {
+ "source": "iana",
+ "extensions": ["umj"]
+ },
+ "application/vnd.unity": {
+ "source": "iana",
+ "extensions": ["unityweb"]
+ },
+ "application/vnd.uoml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uoml"]
+ },
+ "application/vnd.uplanet.alert": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.alert-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.bearer-choice-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.cacheop-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.channel-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.list-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.listcmd-wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.uplanet.signal": {
+ "source": "iana"
+ },
+ "application/vnd.uri-map": {
+ "source": "iana"
+ },
+ "application/vnd.valve.source.material": {
+ "source": "iana"
+ },
+ "application/vnd.vcx": {
+ "source": "iana",
+ "extensions": ["vcx"]
+ },
+ "application/vnd.vd-study": {
+ "source": "iana"
+ },
+ "application/vnd.vectorworks": {
+ "source": "iana"
+ },
+ "application/vnd.vel+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.verimatrix.vcas": {
+ "source": "iana"
+ },
+ "application/vnd.veryant.thin": {
+ "source": "iana"
+ },
+ "application/vnd.ves.encrypted": {
+ "source": "iana"
+ },
+ "application/vnd.vidsoft.vidconference": {
+ "source": "iana"
+ },
+ "application/vnd.visio": {
+ "source": "iana",
+ "extensions": ["vsd","vst","vss","vsw"]
+ },
+ "application/vnd.visionary": {
+ "source": "iana",
+ "extensions": ["vis"]
+ },
+ "application/vnd.vividence.scriptfile": {
+ "source": "iana"
+ },
+ "application/vnd.vsf": {
+ "source": "iana",
+ "extensions": ["vsf"]
+ },
+ "application/vnd.wap.sic": {
+ "source": "iana"
+ },
+ "application/vnd.wap.slc": {
+ "source": "iana"
+ },
+ "application/vnd.wap.wbxml": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "extensions": ["wbxml"]
+ },
+ "application/vnd.wap.wmlc": {
+ "source": "iana",
+ "extensions": ["wmlc"]
+ },
+ "application/vnd.wap.wmlscriptc": {
+ "source": "iana",
+ "extensions": ["wmlsc"]
+ },
+ "application/vnd.webturbo": {
+ "source": "iana",
+ "extensions": ["wtb"]
+ },
+ "application/vnd.wfa.p2p": {
+ "source": "iana"
+ },
+ "application/vnd.wfa.wsc": {
+ "source": "iana"
+ },
+ "application/vnd.windows.devicepairing": {
+ "source": "iana"
+ },
+ "application/vnd.wmc": {
+ "source": "iana"
+ },
+ "application/vnd.wmf.bootstrap": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.mathematica.package": {
+ "source": "iana"
+ },
+ "application/vnd.wolfram.player": {
+ "source": "iana",
+ "extensions": ["nbp"]
+ },
+ "application/vnd.wordperfect": {
+ "source": "iana",
+ "extensions": ["wpd"]
+ },
+ "application/vnd.wqd": {
+ "source": "iana",
+ "extensions": ["wqd"]
+ },
+ "application/vnd.wrq-hp3000-labelled": {
+ "source": "iana"
+ },
+ "application/vnd.wt.stf": {
+ "source": "iana",
+ "extensions": ["stf"]
+ },
+ "application/vnd.wv.csp+wbxml": {
+ "source": "iana"
+ },
+ "application/vnd.wv.csp+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.wv.ssp+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xacml+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xara": {
+ "source": "iana",
+ "extensions": ["xar"]
+ },
+ "application/vnd.xfdl": {
+ "source": "iana",
+ "extensions": ["xfdl"]
+ },
+ "application/vnd.xfdl.webform": {
+ "source": "iana"
+ },
+ "application/vnd.xmi+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vnd.xmpie.cpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.dpkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.plan": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.ppkg": {
+ "source": "iana"
+ },
+ "application/vnd.xmpie.xlim": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.hv-dic": {
+ "source": "iana",
+ "extensions": ["hvd"]
+ },
+ "application/vnd.yamaha.hv-script": {
+ "source": "iana",
+ "extensions": ["hvs"]
+ },
+ "application/vnd.yamaha.hv-voice": {
+ "source": "iana",
+ "extensions": ["hvp"]
+ },
+ "application/vnd.yamaha.openscoreformat": {
+ "source": "iana",
+ "extensions": ["osf"]
+ },
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["osfpvg"]
+ },
+ "application/vnd.yamaha.remote-setup": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.smaf-audio": {
+ "source": "iana",
+ "extensions": ["saf"]
+ },
+ "application/vnd.yamaha.smaf-phrase": {
+ "source": "iana",
+ "extensions": ["spf"]
+ },
+ "application/vnd.yamaha.through-ngn": {
+ "source": "iana"
+ },
+ "application/vnd.yamaha.tunnel-udpencap": {
+ "source": "iana"
+ },
+ "application/vnd.yaoweme": {
+ "source": "iana"
+ },
+ "application/vnd.yellowriver-custom-menu": {
+ "source": "iana",
+ "extensions": ["cmp"]
+ },
+ "application/vnd.youtube.yt": {
+ "source": "iana"
+ },
+ "application/vnd.zul": {
+ "source": "iana",
+ "extensions": ["zir","zirz"]
+ },
+ "application/vnd.zzazz.deck+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["zaz"]
+ },
+ "application/voicexml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vxml"]
+ },
+ "application/voucher-cms+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/vq-rtcpxr": {
+ "source": "iana"
+ },
+ "application/wasm": {
+ "compressible": true,
+ "extensions": ["wasm"]
+ },
+ "application/watcherinfo+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/webpush-options+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/whoispp-query": {
+ "source": "iana"
+ },
+ "application/whoispp-response": {
+ "source": "iana"
+ },
+ "application/widget": {
+ "source": "iana",
+ "extensions": ["wgt"]
+ },
+ "application/winhlp": {
+ "source": "apache",
+ "extensions": ["hlp"]
+ },
+ "application/wita": {
+ "source": "iana"
+ },
+ "application/wordperfect5.1": {
+ "source": "iana"
+ },
+ "application/wsdl+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["wsdl"]
+ },
+ "application/wspolicy+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["wspolicy"]
+ },
+ "application/x-7z-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["7z"]
+ },
+ "application/x-abiword": {
+ "source": "apache",
+ "extensions": ["abw"]
+ },
+ "application/x-ace-compressed": {
+ "source": "apache",
+ "extensions": ["ace"]
+ },
+ "application/x-amf": {
+ "source": "apache"
+ },
+ "application/x-apple-diskimage": {
+ "source": "apache",
+ "extensions": ["dmg"]
+ },
+ "application/x-arj": {
+ "compressible": false,
+ "extensions": ["arj"]
+ },
+ "application/x-authorware-bin": {
+ "source": "apache",
+ "extensions": ["aab","x32","u32","vox"]
+ },
+ "application/x-authorware-map": {
+ "source": "apache",
+ "extensions": ["aam"]
+ },
+ "application/x-authorware-seg": {
+ "source": "apache",
+ "extensions": ["aas"]
+ },
+ "application/x-bcpio": {
+ "source": "apache",
+ "extensions": ["bcpio"]
+ },
+ "application/x-bdoc": {
+ "compressible": false,
+ "extensions": ["bdoc"]
+ },
+ "application/x-bittorrent": {
+ "source": "apache",
+ "extensions": ["torrent"]
+ },
+ "application/x-blorb": {
+ "source": "apache",
+ "extensions": ["blb","blorb"]
+ },
+ "application/x-bzip": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz"]
+ },
+ "application/x-bzip2": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["bz2","boz"]
+ },
+ "application/x-cbr": {
+ "source": "apache",
+ "extensions": ["cbr","cba","cbt","cbz","cb7"]
+ },
+ "application/x-cdlink": {
+ "source": "apache",
+ "extensions": ["vcd"]
+ },
+ "application/x-cfs-compressed": {
+ "source": "apache",
+ "extensions": ["cfs"]
+ },
+ "application/x-chat": {
+ "source": "apache",
+ "extensions": ["chat"]
+ },
+ "application/x-chess-pgn": {
+ "source": "apache",
+ "extensions": ["pgn"]
+ },
+ "application/x-chrome-extension": {
+ "extensions": ["crx"]
+ },
+ "application/x-cocoa": {
+ "source": "nginx",
+ "extensions": ["cco"]
+ },
+ "application/x-compress": {
+ "source": "apache"
+ },
+ "application/x-conference": {
+ "source": "apache",
+ "extensions": ["nsc"]
+ },
+ "application/x-cpio": {
+ "source": "apache",
+ "extensions": ["cpio"]
+ },
+ "application/x-csh": {
+ "source": "apache",
+ "extensions": ["csh"]
+ },
+ "application/x-deb": {
+ "compressible": false
+ },
+ "application/x-debian-package": {
+ "source": "apache",
+ "extensions": ["deb","udeb"]
+ },
+ "application/x-dgc-compressed": {
+ "source": "apache",
+ "extensions": ["dgc"]
+ },
+ "application/x-director": {
+ "source": "apache",
+ "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]
+ },
+ "application/x-doom": {
+ "source": "apache",
+ "extensions": ["wad"]
+ },
+ "application/x-dtbncx+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ncx"]
+ },
+ "application/x-dtbook+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["dtb"]
+ },
+ "application/x-dtbresource+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["res"]
+ },
+ "application/x-dvi": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["dvi"]
+ },
+ "application/x-envoy": {
+ "source": "apache",
+ "extensions": ["evy"]
+ },
+ "application/x-eva": {
+ "source": "apache",
+ "extensions": ["eva"]
+ },
+ "application/x-font-bdf": {
+ "source": "apache",
+ "extensions": ["bdf"]
+ },
+ "application/x-font-dos": {
+ "source": "apache"
+ },
+ "application/x-font-framemaker": {
+ "source": "apache"
+ },
+ "application/x-font-ghostscript": {
+ "source": "apache",
+ "extensions": ["gsf"]
+ },
+ "application/x-font-libgrx": {
+ "source": "apache"
+ },
+ "application/x-font-linux-psf": {
+ "source": "apache",
+ "extensions": ["psf"]
+ },
+ "application/x-font-pcf": {
+ "source": "apache",
+ "extensions": ["pcf"]
+ },
+ "application/x-font-snf": {
+ "source": "apache",
+ "extensions": ["snf"]
+ },
+ "application/x-font-speedo": {
+ "source": "apache"
+ },
+ "application/x-font-sunos-news": {
+ "source": "apache"
+ },
+ "application/x-font-type1": {
+ "source": "apache",
+ "extensions": ["pfa","pfb","pfm","afm"]
+ },
+ "application/x-font-vfont": {
+ "source": "apache"
+ },
+ "application/x-freearc": {
+ "source": "apache",
+ "extensions": ["arc"]
+ },
+ "application/x-futuresplash": {
+ "source": "apache",
+ "extensions": ["spl"]
+ },
+ "application/x-gca-compressed": {
+ "source": "apache",
+ "extensions": ["gca"]
+ },
+ "application/x-glulx": {
+ "source": "apache",
+ "extensions": ["ulx"]
+ },
+ "application/x-gnumeric": {
+ "source": "apache",
+ "extensions": ["gnumeric"]
+ },
+ "application/x-gramps-xml": {
+ "source": "apache",
+ "extensions": ["gramps"]
+ },
+ "application/x-gtar": {
+ "source": "apache",
+ "extensions": ["gtar"]
+ },
+ "application/x-gzip": {
+ "source": "apache"
+ },
+ "application/x-hdf": {
+ "source": "apache",
+ "extensions": ["hdf"]
+ },
+ "application/x-httpd-php": {
+ "compressible": true,
+ "extensions": ["php"]
+ },
+ "application/x-install-instructions": {
+ "source": "apache",
+ "extensions": ["install"]
+ },
+ "application/x-iso9660-image": {
+ "source": "apache",
+ "extensions": ["iso"]
+ },
+ "application/x-java-archive-diff": {
+ "source": "nginx",
+ "extensions": ["jardiff"]
+ },
+ "application/x-java-jnlp-file": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["jnlp"]
+ },
+ "application/x-javascript": {
+ "compressible": true
+ },
+ "application/x-keepass2": {
+ "extensions": ["kdbx"]
+ },
+ "application/x-latex": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["latex"]
+ },
+ "application/x-lua-bytecode": {
+ "extensions": ["luac"]
+ },
+ "application/x-lzh-compressed": {
+ "source": "apache",
+ "extensions": ["lzh","lha"]
+ },
+ "application/x-makeself": {
+ "source": "nginx",
+ "extensions": ["run"]
+ },
+ "application/x-mie": {
+ "source": "apache",
+ "extensions": ["mie"]
+ },
+ "application/x-mobipocket-ebook": {
+ "source": "apache",
+ "extensions": ["prc","mobi"]
+ },
+ "application/x-mpegurl": {
+ "compressible": false
+ },
+ "application/x-ms-application": {
+ "source": "apache",
+ "extensions": ["application"]
+ },
+ "application/x-ms-shortcut": {
+ "source": "apache",
+ "extensions": ["lnk"]
+ },
+ "application/x-ms-wmd": {
+ "source": "apache",
+ "extensions": ["wmd"]
+ },
+ "application/x-ms-wmz": {
+ "source": "apache",
+ "extensions": ["wmz"]
+ },
+ "application/x-ms-xbap": {
+ "source": "apache",
+ "extensions": ["xbap"]
+ },
+ "application/x-msaccess": {
+ "source": "apache",
+ "extensions": ["mdb"]
+ },
+ "application/x-msbinder": {
+ "source": "apache",
+ "extensions": ["obd"]
+ },
+ "application/x-mscardfile": {
+ "source": "apache",
+ "extensions": ["crd"]
+ },
+ "application/x-msclip": {
+ "source": "apache",
+ "extensions": ["clp"]
+ },
+ "application/x-msdos-program": {
+ "extensions": ["exe"]
+ },
+ "application/x-msdownload": {
+ "source": "apache",
+ "extensions": ["exe","dll","com","bat","msi"]
+ },
+ "application/x-msmediaview": {
+ "source": "apache",
+ "extensions": ["mvb","m13","m14"]
+ },
+ "application/x-msmetafile": {
+ "source": "apache",
+ "extensions": ["wmf","wmz","emf","emz"]
+ },
+ "application/x-msmoney": {
+ "source": "apache",
+ "extensions": ["mny"]
+ },
+ "application/x-mspublisher": {
+ "source": "apache",
+ "extensions": ["pub"]
+ },
+ "application/x-msschedule": {
+ "source": "apache",
+ "extensions": ["scd"]
+ },
+ "application/x-msterminal": {
+ "source": "apache",
+ "extensions": ["trm"]
+ },
+ "application/x-mswrite": {
+ "source": "apache",
+ "extensions": ["wri"]
+ },
+ "application/x-netcdf": {
+ "source": "apache",
+ "extensions": ["nc","cdf"]
+ },
+ "application/x-ns-proxy-autoconfig": {
+ "compressible": true,
+ "extensions": ["pac"]
+ },
+ "application/x-nzb": {
+ "source": "apache",
+ "extensions": ["nzb"]
+ },
+ "application/x-perl": {
+ "source": "nginx",
+ "extensions": ["pl","pm"]
+ },
+ "application/x-pilot": {
+ "source": "nginx",
+ "extensions": ["prc","pdb"]
+ },
+ "application/x-pkcs12": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["p12","pfx"]
+ },
+ "application/x-pkcs7-certificates": {
+ "source": "apache",
+ "extensions": ["p7b","spc"]
+ },
+ "application/x-pkcs7-certreqresp": {
+ "source": "apache",
+ "extensions": ["p7r"]
+ },
+ "application/x-pki-message": {
+ "source": "iana"
+ },
+ "application/x-rar-compressed": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["rar"]
+ },
+ "application/x-redhat-package-manager": {
+ "source": "nginx",
+ "extensions": ["rpm"]
+ },
+ "application/x-research-info-systems": {
+ "source": "apache",
+ "extensions": ["ris"]
+ },
+ "application/x-sea": {
+ "source": "nginx",
+ "extensions": ["sea"]
+ },
+ "application/x-sh": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["sh"]
+ },
+ "application/x-shar": {
+ "source": "apache",
+ "extensions": ["shar"]
+ },
+ "application/x-shockwave-flash": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["swf"]
+ },
+ "application/x-silverlight-app": {
+ "source": "apache",
+ "extensions": ["xap"]
+ },
+ "application/x-sql": {
+ "source": "apache",
+ "extensions": ["sql"]
+ },
+ "application/x-stuffit": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["sit"]
+ },
+ "application/x-stuffitx": {
+ "source": "apache",
+ "extensions": ["sitx"]
+ },
+ "application/x-subrip": {
+ "source": "apache",
+ "extensions": ["srt"]
+ },
+ "application/x-sv4cpio": {
+ "source": "apache",
+ "extensions": ["sv4cpio"]
+ },
+ "application/x-sv4crc": {
+ "source": "apache",
+ "extensions": ["sv4crc"]
+ },
+ "application/x-t3vm-image": {
+ "source": "apache",
+ "extensions": ["t3"]
+ },
+ "application/x-tads": {
+ "source": "apache",
+ "extensions": ["gam"]
+ },
+ "application/x-tar": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["tar"]
+ },
+ "application/x-tcl": {
+ "source": "apache",
+ "extensions": ["tcl","tk"]
+ },
+ "application/x-tex": {
+ "source": "apache",
+ "extensions": ["tex"]
+ },
+ "application/x-tex-tfm": {
+ "source": "apache",
+ "extensions": ["tfm"]
+ },
+ "application/x-texinfo": {
+ "source": "apache",
+ "extensions": ["texinfo","texi"]
+ },
+ "application/x-tgif": {
+ "source": "apache",
+ "extensions": ["obj"]
+ },
+ "application/x-ustar": {
+ "source": "apache",
+ "extensions": ["ustar"]
+ },
+ "application/x-virtualbox-hdd": {
+ "compressible": true,
+ "extensions": ["hdd"]
+ },
+ "application/x-virtualbox-ova": {
+ "compressible": true,
+ "extensions": ["ova"]
+ },
+ "application/x-virtualbox-ovf": {
+ "compressible": true,
+ "extensions": ["ovf"]
+ },
+ "application/x-virtualbox-vbox": {
+ "compressible": true,
+ "extensions": ["vbox"]
+ },
+ "application/x-virtualbox-vbox-extpack": {
+ "compressible": false,
+ "extensions": ["vbox-extpack"]
+ },
+ "application/x-virtualbox-vdi": {
+ "compressible": true,
+ "extensions": ["vdi"]
+ },
+ "application/x-virtualbox-vhd": {
+ "compressible": true,
+ "extensions": ["vhd"]
+ },
+ "application/x-virtualbox-vmdk": {
+ "compressible": true,
+ "extensions": ["vmdk"]
+ },
+ "application/x-wais-source": {
+ "source": "apache",
+ "extensions": ["src"]
+ },
+ "application/x-web-app-manifest+json": {
+ "compressible": true,
+ "extensions": ["webapp"]
+ },
+ "application/x-www-form-urlencoded": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/x-x509-ca-cert": {
+ "source": "iana",
+ "extensions": ["der","crt","pem"]
+ },
+ "application/x-x509-ca-ra-cert": {
+ "source": "iana"
+ },
+ "application/x-x509-next-ca-cert": {
+ "source": "iana"
+ },
+ "application/x-xfig": {
+ "source": "apache",
+ "extensions": ["fig"]
+ },
+ "application/x-xliff+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["xlf"]
+ },
+ "application/x-xpinstall": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["xpi"]
+ },
+ "application/x-xz": {
+ "source": "apache",
+ "extensions": ["xz"]
+ },
+ "application/x-zmachine": {
+ "source": "apache",
+ "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"]
+ },
+ "application/x400-bp": {
+ "source": "iana"
+ },
+ "application/xacml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/xaml+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["xaml"]
+ },
+ "application/xcap-att+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xav"]
+ },
+ "application/xcap-caps+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xca"]
+ },
+ "application/xcap-diff+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xdf"]
+ },
+ "application/xcap-el+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xel"]
+ },
+ "application/xcap-error+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xer"]
+ },
+ "application/xcap-ns+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xns"]
+ },
+ "application/xcon-conference-info+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/xcon-conference-info-diff+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/xenc+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xenc"]
+ },
+ "application/xhtml+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xhtml","xht"]
+ },
+ "application/xhtml-voice+xml": {
+ "source": "apache",
+ "compressible": true
+ },
+ "application/xliff+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xlf"]
+ },
+ "application/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml","xsl","xsd","rng"]
+ },
+ "application/xml-dtd": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dtd"]
+ },
+ "application/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "application/xml-patch+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/xmpp+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/xop+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xop"]
+ },
+ "application/xproc+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["xpl"]
+ },
+ "application/xslt+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xsl","xslt"]
+ },
+ "application/xspf+xml": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["xspf"]
+ },
+ "application/xv+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["mxml","xhvml","xvml","xvm"]
+ },
+ "application/yang": {
+ "source": "iana",
+ "extensions": ["yang"]
+ },
+ "application/yang-data+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yang-data+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yang-patch+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yang-patch+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/yin+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["yin"]
+ },
+ "application/zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["zip"]
+ },
+ "application/zlib": {
+ "source": "iana"
+ },
+ "application/zstd": {
+ "source": "iana"
+ },
+ "audio/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "audio/32kadpcm": {
+ "source": "iana"
+ },
+ "audio/3gpp": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["3gpp"]
+ },
+ "audio/3gpp2": {
+ "source": "iana"
+ },
+ "audio/aac": {
+ "source": "iana"
+ },
+ "audio/ac3": {
+ "source": "iana"
+ },
+ "audio/adpcm": {
+ "source": "apache",
+ "extensions": ["adp"]
+ },
+ "audio/amr": {
+ "source": "iana"
+ },
+ "audio/amr-wb": {
+ "source": "iana"
+ },
+ "audio/amr-wb+": {
+ "source": "iana"
+ },
+ "audio/aptx": {
+ "source": "iana"
+ },
+ "audio/asc": {
+ "source": "iana"
+ },
+ "audio/atrac-advanced-lossless": {
+ "source": "iana"
+ },
+ "audio/atrac-x": {
+ "source": "iana"
+ },
+ "audio/atrac3": {
+ "source": "iana"
+ },
+ "audio/basic": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["au","snd"]
+ },
+ "audio/bv16": {
+ "source": "iana"
+ },
+ "audio/bv32": {
+ "source": "iana"
+ },
+ "audio/clearmode": {
+ "source": "iana"
+ },
+ "audio/cn": {
+ "source": "iana"
+ },
+ "audio/dat12": {
+ "source": "iana"
+ },
+ "audio/dls": {
+ "source": "iana"
+ },
+ "audio/dsr-es201108": {
+ "source": "iana"
+ },
+ "audio/dsr-es202050": {
+ "source": "iana"
+ },
+ "audio/dsr-es202211": {
+ "source": "iana"
+ },
+ "audio/dsr-es202212": {
+ "source": "iana"
+ },
+ "audio/dv": {
+ "source": "iana"
+ },
+ "audio/dvi4": {
+ "source": "iana"
+ },
+ "audio/eac3": {
+ "source": "iana"
+ },
+ "audio/encaprtp": {
+ "source": "iana"
+ },
+ "audio/evrc": {
+ "source": "iana"
+ },
+ "audio/evrc-qcp": {
+ "source": "iana"
+ },
+ "audio/evrc0": {
+ "source": "iana"
+ },
+ "audio/evrc1": {
+ "source": "iana"
+ },
+ "audio/evrcb": {
+ "source": "iana"
+ },
+ "audio/evrcb0": {
+ "source": "iana"
+ },
+ "audio/evrcb1": {
+ "source": "iana"
+ },
+ "audio/evrcnw": {
+ "source": "iana"
+ },
+ "audio/evrcnw0": {
+ "source": "iana"
+ },
+ "audio/evrcnw1": {
+ "source": "iana"
+ },
+ "audio/evrcwb": {
+ "source": "iana"
+ },
+ "audio/evrcwb0": {
+ "source": "iana"
+ },
+ "audio/evrcwb1": {
+ "source": "iana"
+ },
+ "audio/evs": {
+ "source": "iana"
+ },
+ "audio/flexfec": {
+ "source": "iana"
+ },
+ "audio/fwdred": {
+ "source": "iana"
+ },
+ "audio/g711-0": {
+ "source": "iana"
+ },
+ "audio/g719": {
+ "source": "iana"
+ },
+ "audio/g722": {
+ "source": "iana"
+ },
+ "audio/g7221": {
+ "source": "iana"
+ },
+ "audio/g723": {
+ "source": "iana"
+ },
+ "audio/g726-16": {
+ "source": "iana"
+ },
+ "audio/g726-24": {
+ "source": "iana"
+ },
+ "audio/g726-32": {
+ "source": "iana"
+ },
+ "audio/g726-40": {
+ "source": "iana"
+ },
+ "audio/g728": {
+ "source": "iana"
+ },
+ "audio/g729": {
+ "source": "iana"
+ },
+ "audio/g7291": {
+ "source": "iana"
+ },
+ "audio/g729d": {
+ "source": "iana"
+ },
+ "audio/g729e": {
+ "source": "iana"
+ },
+ "audio/gsm": {
+ "source": "iana"
+ },
+ "audio/gsm-efr": {
+ "source": "iana"
+ },
+ "audio/gsm-hr-08": {
+ "source": "iana"
+ },
+ "audio/ilbc": {
+ "source": "iana"
+ },
+ "audio/ip-mr_v2.5": {
+ "source": "iana"
+ },
+ "audio/isac": {
+ "source": "apache"
+ },
+ "audio/l16": {
+ "source": "iana"
+ },
+ "audio/l20": {
+ "source": "iana"
+ },
+ "audio/l24": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/l8": {
+ "source": "iana"
+ },
+ "audio/lpc": {
+ "source": "iana"
+ },
+ "audio/melp": {
+ "source": "iana"
+ },
+ "audio/melp1200": {
+ "source": "iana"
+ },
+ "audio/melp2400": {
+ "source": "iana"
+ },
+ "audio/melp600": {
+ "source": "iana"
+ },
+ "audio/mhas": {
+ "source": "iana"
+ },
+ "audio/midi": {
+ "source": "apache",
+ "extensions": ["mid","midi","kar","rmi"]
+ },
+ "audio/mobile-xmf": {
+ "source": "iana",
+ "extensions": ["mxmf"]
+ },
+ "audio/mp3": {
+ "compressible": false,
+ "extensions": ["mp3"]
+ },
+ "audio/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["m4a","mp4a"]
+ },
+ "audio/mp4a-latm": {
+ "source": "iana"
+ },
+ "audio/mpa": {
+ "source": "iana"
+ },
+ "audio/mpa-robust": {
+ "source": "iana"
+ },
+ "audio/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"]
+ },
+ "audio/mpeg4-generic": {
+ "source": "iana"
+ },
+ "audio/musepack": {
+ "source": "apache"
+ },
+ "audio/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["oga","ogg","spx"]
+ },
+ "audio/opus": {
+ "source": "iana"
+ },
+ "audio/parityfec": {
+ "source": "iana"
+ },
+ "audio/pcma": {
+ "source": "iana"
+ },
+ "audio/pcma-wb": {
+ "source": "iana"
+ },
+ "audio/pcmu": {
+ "source": "iana"
+ },
+ "audio/pcmu-wb": {
+ "source": "iana"
+ },
+ "audio/prs.sid": {
+ "source": "iana"
+ },
+ "audio/qcelp": {
+ "source": "iana"
+ },
+ "audio/raptorfec": {
+ "source": "iana"
+ },
+ "audio/red": {
+ "source": "iana"
+ },
+ "audio/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "audio/rtp-midi": {
+ "source": "iana"
+ },
+ "audio/rtploopback": {
+ "source": "iana"
+ },
+ "audio/rtx": {
+ "source": "iana"
+ },
+ "audio/s3m": {
+ "source": "apache",
+ "extensions": ["s3m"]
+ },
+ "audio/silk": {
+ "source": "apache",
+ "extensions": ["sil"]
+ },
+ "audio/smv": {
+ "source": "iana"
+ },
+ "audio/smv-qcp": {
+ "source": "iana"
+ },
+ "audio/smv0": {
+ "source": "iana"
+ },
+ "audio/sofa": {
+ "source": "iana"
+ },
+ "audio/sp-midi": {
+ "source": "iana"
+ },
+ "audio/speex": {
+ "source": "iana"
+ },
+ "audio/t140c": {
+ "source": "iana"
+ },
+ "audio/t38": {
+ "source": "iana"
+ },
+ "audio/telephone-event": {
+ "source": "iana"
+ },
+ "audio/tetra_acelp": {
+ "source": "iana"
+ },
+ "audio/tetra_acelp_bb": {
+ "source": "iana"
+ },
+ "audio/tone": {
+ "source": "iana"
+ },
+ "audio/tsvcis": {
+ "source": "iana"
+ },
+ "audio/uemclip": {
+ "source": "iana"
+ },
+ "audio/ulpfec": {
+ "source": "iana"
+ },
+ "audio/usac": {
+ "source": "iana"
+ },
+ "audio/vdvi": {
+ "source": "iana"
+ },
+ "audio/vmr-wb": {
+ "source": "iana"
+ },
+ "audio/vnd.3gpp.iufp": {
+ "source": "iana"
+ },
+ "audio/vnd.4sb": {
+ "source": "iana"
+ },
+ "audio/vnd.audiokoz": {
+ "source": "iana"
+ },
+ "audio/vnd.celp": {
+ "source": "iana"
+ },
+ "audio/vnd.cisco.nse": {
+ "source": "iana"
+ },
+ "audio/vnd.cmles.radio-events": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.anp1": {
+ "source": "iana"
+ },
+ "audio/vnd.cns.inf1": {
+ "source": "iana"
+ },
+ "audio/vnd.dece.audio": {
+ "source": "iana",
+ "extensions": ["uva","uvva"]
+ },
+ "audio/vnd.digital-winds": {
+ "source": "iana",
+ "extensions": ["eol"]
+ },
+ "audio/vnd.dlna.adts": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.heaac.2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mlp": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.mps": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2x": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pl2z": {
+ "source": "iana"
+ },
+ "audio/vnd.dolby.pulse.1": {
+ "source": "iana"
+ },
+ "audio/vnd.dra": {
+ "source": "iana",
+ "extensions": ["dra"]
+ },
+ "audio/vnd.dts": {
+ "source": "iana",
+ "extensions": ["dts"]
+ },
+ "audio/vnd.dts.hd": {
+ "source": "iana",
+ "extensions": ["dtshd"]
+ },
+ "audio/vnd.dts.uhd": {
+ "source": "iana"
+ },
+ "audio/vnd.dvb.file": {
+ "source": "iana"
+ },
+ "audio/vnd.everad.plj": {
+ "source": "iana"
+ },
+ "audio/vnd.hns.audio": {
+ "source": "iana"
+ },
+ "audio/vnd.lucent.voice": {
+ "source": "iana",
+ "extensions": ["lvp"]
+ },
+ "audio/vnd.ms-playready.media.pya": {
+ "source": "iana",
+ "extensions": ["pya"]
+ },
+ "audio/vnd.nokia.mobile-xmf": {
+ "source": "iana"
+ },
+ "audio/vnd.nortel.vbk": {
+ "source": "iana"
+ },
+ "audio/vnd.nuera.ecelp4800": {
+ "source": "iana",
+ "extensions": ["ecelp4800"]
+ },
+ "audio/vnd.nuera.ecelp7470": {
+ "source": "iana",
+ "extensions": ["ecelp7470"]
+ },
+ "audio/vnd.nuera.ecelp9600": {
+ "source": "iana",
+ "extensions": ["ecelp9600"]
+ },
+ "audio/vnd.octel.sbc": {
+ "source": "iana"
+ },
+ "audio/vnd.presonus.multitrack": {
+ "source": "iana"
+ },
+ "audio/vnd.qcelp": {
+ "source": "iana"
+ },
+ "audio/vnd.rhetorex.32kadpcm": {
+ "source": "iana"
+ },
+ "audio/vnd.rip": {
+ "source": "iana",
+ "extensions": ["rip"]
+ },
+ "audio/vnd.rn-realaudio": {
+ "compressible": false
+ },
+ "audio/vnd.sealedmedia.softseal.mpeg": {
+ "source": "iana"
+ },
+ "audio/vnd.vmx.cvsd": {
+ "source": "iana"
+ },
+ "audio/vnd.wave": {
+ "compressible": false
+ },
+ "audio/vorbis": {
+ "source": "iana",
+ "compressible": false
+ },
+ "audio/vorbis-config": {
+ "source": "iana"
+ },
+ "audio/wav": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/wave": {
+ "compressible": false,
+ "extensions": ["wav"]
+ },
+ "audio/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["weba"]
+ },
+ "audio/x-aac": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["aac"]
+ },
+ "audio/x-aiff": {
+ "source": "apache",
+ "extensions": ["aif","aiff","aifc"]
+ },
+ "audio/x-caf": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["caf"]
+ },
+ "audio/x-flac": {
+ "source": "apache",
+ "extensions": ["flac"]
+ },
+ "audio/x-m4a": {
+ "source": "nginx",
+ "extensions": ["m4a"]
+ },
+ "audio/x-matroska": {
+ "source": "apache",
+ "extensions": ["mka"]
+ },
+ "audio/x-mpegurl": {
+ "source": "apache",
+ "extensions": ["m3u"]
+ },
+ "audio/x-ms-wax": {
+ "source": "apache",
+ "extensions": ["wax"]
+ },
+ "audio/x-ms-wma": {
+ "source": "apache",
+ "extensions": ["wma"]
+ },
+ "audio/x-pn-realaudio": {
+ "source": "apache",
+ "extensions": ["ram","ra"]
+ },
+ "audio/x-pn-realaudio-plugin": {
+ "source": "apache",
+ "extensions": ["rmp"]
+ },
+ "audio/x-realaudio": {
+ "source": "nginx",
+ "extensions": ["ra"]
+ },
+ "audio/x-tta": {
+ "source": "apache"
+ },
+ "audio/x-wav": {
+ "source": "apache",
+ "extensions": ["wav"]
+ },
+ "audio/xm": {
+ "source": "apache",
+ "extensions": ["xm"]
+ },
+ "chemical/x-cdx": {
+ "source": "apache",
+ "extensions": ["cdx"]
+ },
+ "chemical/x-cif": {
+ "source": "apache",
+ "extensions": ["cif"]
+ },
+ "chemical/x-cmdf": {
+ "source": "apache",
+ "extensions": ["cmdf"]
+ },
+ "chemical/x-cml": {
+ "source": "apache",
+ "extensions": ["cml"]
+ },
+ "chemical/x-csml": {
+ "source": "apache",
+ "extensions": ["csml"]
+ },
+ "chemical/x-pdb": {
+ "source": "apache"
+ },
+ "chemical/x-xyz": {
+ "source": "apache",
+ "extensions": ["xyz"]
+ },
+ "font/collection": {
+ "source": "iana",
+ "extensions": ["ttc"]
+ },
+ "font/otf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["otf"]
+ },
+ "font/sfnt": {
+ "source": "iana"
+ },
+ "font/ttf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["ttf"]
+ },
+ "font/woff": {
+ "source": "iana",
+ "extensions": ["woff"]
+ },
+ "font/woff2": {
+ "source": "iana",
+ "extensions": ["woff2"]
+ },
+ "image/aces": {
+ "source": "iana",
+ "extensions": ["exr"]
+ },
+ "image/apng": {
+ "compressible": false,
+ "extensions": ["apng"]
+ },
+ "image/avci": {
+ "source": "iana"
+ },
+ "image/avcs": {
+ "source": "iana"
+ },
+ "image/avif": {
+ "compressible": false,
+ "extensions": ["avif"]
+ },
+ "image/bmp": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/cgm": {
+ "source": "iana",
+ "extensions": ["cgm"]
+ },
+ "image/dicom-rle": {
+ "source": "iana",
+ "extensions": ["drle"]
+ },
+ "image/emf": {
+ "source": "iana",
+ "extensions": ["emf"]
+ },
+ "image/fits": {
+ "source": "iana",
+ "extensions": ["fits"]
+ },
+ "image/g3fax": {
+ "source": "iana",
+ "extensions": ["g3"]
+ },
+ "image/gif": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["gif"]
+ },
+ "image/heic": {
+ "source": "iana",
+ "extensions": ["heic"]
+ },
+ "image/heic-sequence": {
+ "source": "iana",
+ "extensions": ["heics"]
+ },
+ "image/heif": {
+ "source": "iana",
+ "extensions": ["heif"]
+ },
+ "image/heif-sequence": {
+ "source": "iana",
+ "extensions": ["heifs"]
+ },
+ "image/hej2k": {
+ "source": "iana",
+ "extensions": ["hej2"]
+ },
+ "image/hsj2": {
+ "source": "iana",
+ "extensions": ["hsj2"]
+ },
+ "image/ief": {
+ "source": "iana",
+ "extensions": ["ief"]
+ },
+ "image/jls": {
+ "source": "iana",
+ "extensions": ["jls"]
+ },
+ "image/jp2": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jp2","jpg2"]
+ },
+ "image/jpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpeg","jpg","jpe"]
+ },
+ "image/jph": {
+ "source": "iana",
+ "extensions": ["jph"]
+ },
+ "image/jphc": {
+ "source": "iana",
+ "extensions": ["jhc"]
+ },
+ "image/jpm": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpm"]
+ },
+ "image/jpx": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["jpx","jpf"]
+ },
+ "image/jxr": {
+ "source": "iana",
+ "extensions": ["jxr"]
+ },
+ "image/jxra": {
+ "source": "iana",
+ "extensions": ["jxra"]
+ },
+ "image/jxrs": {
+ "source": "iana",
+ "extensions": ["jxrs"]
+ },
+ "image/jxs": {
+ "source": "iana",
+ "extensions": ["jxs"]
+ },
+ "image/jxsc": {
+ "source": "iana",
+ "extensions": ["jxsc"]
+ },
+ "image/jxsi": {
+ "source": "iana",
+ "extensions": ["jxsi"]
+ },
+ "image/jxss": {
+ "source": "iana",
+ "extensions": ["jxss"]
+ },
+ "image/ktx": {
+ "source": "iana",
+ "extensions": ["ktx"]
+ },
+ "image/ktx2": {
+ "source": "iana",
+ "extensions": ["ktx2"]
+ },
+ "image/naplps": {
+ "source": "iana"
+ },
+ "image/pjpeg": {
+ "compressible": false
+ },
+ "image/png": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["png"]
+ },
+ "image/prs.btif": {
+ "source": "iana",
+ "extensions": ["btif"]
+ },
+ "image/prs.pti": {
+ "source": "iana",
+ "extensions": ["pti"]
+ },
+ "image/pwg-raster": {
+ "source": "iana"
+ },
+ "image/sgi": {
+ "source": "apache",
+ "extensions": ["sgi"]
+ },
+ "image/svg+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["svg","svgz"]
+ },
+ "image/t38": {
+ "source": "iana",
+ "extensions": ["t38"]
+ },
+ "image/tiff": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["tif","tiff"]
+ },
+ "image/tiff-fx": {
+ "source": "iana",
+ "extensions": ["tfx"]
+ },
+ "image/vnd.adobe.photoshop": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["psd"]
+ },
+ "image/vnd.airzip.accelerator.azv": {
+ "source": "iana",
+ "extensions": ["azv"]
+ },
+ "image/vnd.cns.inf2": {
+ "source": "iana"
+ },
+ "image/vnd.dece.graphic": {
+ "source": "iana",
+ "extensions": ["uvi","uvvi","uvg","uvvg"]
+ },
+ "image/vnd.djvu": {
+ "source": "iana",
+ "extensions": ["djvu","djv"]
+ },
+ "image/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "image/vnd.dwg": {
+ "source": "iana",
+ "extensions": ["dwg"]
+ },
+ "image/vnd.dxf": {
+ "source": "iana",
+ "extensions": ["dxf"]
+ },
+ "image/vnd.fastbidsheet": {
+ "source": "iana",
+ "extensions": ["fbs"]
+ },
+ "image/vnd.fpx": {
+ "source": "iana",
+ "extensions": ["fpx"]
+ },
+ "image/vnd.fst": {
+ "source": "iana",
+ "extensions": ["fst"]
+ },
+ "image/vnd.fujixerox.edmics-mmr": {
+ "source": "iana",
+ "extensions": ["mmr"]
+ },
+ "image/vnd.fujixerox.edmics-rlc": {
+ "source": "iana",
+ "extensions": ["rlc"]
+ },
+ "image/vnd.globalgraphics.pgb": {
+ "source": "iana"
+ },
+ "image/vnd.microsoft.icon": {
+ "source": "iana",
+ "extensions": ["ico"]
+ },
+ "image/vnd.mix": {
+ "source": "iana"
+ },
+ "image/vnd.mozilla.apng": {
+ "source": "iana"
+ },
+ "image/vnd.ms-dds": {
+ "extensions": ["dds"]
+ },
+ "image/vnd.ms-modi": {
+ "source": "iana",
+ "extensions": ["mdi"]
+ },
+ "image/vnd.ms-photo": {
+ "source": "apache",
+ "extensions": ["wdp"]
+ },
+ "image/vnd.net-fpx": {
+ "source": "iana",
+ "extensions": ["npx"]
+ },
+ "image/vnd.pco.b16": {
+ "source": "iana",
+ "extensions": ["b16"]
+ },
+ "image/vnd.radiance": {
+ "source": "iana"
+ },
+ "image/vnd.sealed.png": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.gif": {
+ "source": "iana"
+ },
+ "image/vnd.sealedmedia.softseal.jpg": {
+ "source": "iana"
+ },
+ "image/vnd.svf": {
+ "source": "iana"
+ },
+ "image/vnd.tencent.tap": {
+ "source": "iana",
+ "extensions": ["tap"]
+ },
+ "image/vnd.valve.source.texture": {
+ "source": "iana",
+ "extensions": ["vtf"]
+ },
+ "image/vnd.wap.wbmp": {
+ "source": "iana",
+ "extensions": ["wbmp"]
+ },
+ "image/vnd.xiff": {
+ "source": "iana",
+ "extensions": ["xif"]
+ },
+ "image/vnd.zbrush.pcx": {
+ "source": "iana",
+ "extensions": ["pcx"]
+ },
+ "image/webp": {
+ "source": "apache",
+ "extensions": ["webp"]
+ },
+ "image/wmf": {
+ "source": "iana",
+ "extensions": ["wmf"]
+ },
+ "image/x-3ds": {
+ "source": "apache",
+ "extensions": ["3ds"]
+ },
+ "image/x-cmu-raster": {
+ "source": "apache",
+ "extensions": ["ras"]
+ },
+ "image/x-cmx": {
+ "source": "apache",
+ "extensions": ["cmx"]
+ },
+ "image/x-freehand": {
+ "source": "apache",
+ "extensions": ["fh","fhc","fh4","fh5","fh7"]
+ },
+ "image/x-icon": {
+ "source": "apache",
+ "compressible": true,
+ "extensions": ["ico"]
+ },
+ "image/x-jng": {
+ "source": "nginx",
+ "extensions": ["jng"]
+ },
+ "image/x-mrsid-image": {
+ "source": "apache",
+ "extensions": ["sid"]
+ },
+ "image/x-ms-bmp": {
+ "source": "nginx",
+ "compressible": true,
+ "extensions": ["bmp"]
+ },
+ "image/x-pcx": {
+ "source": "apache",
+ "extensions": ["pcx"]
+ },
+ "image/x-pict": {
+ "source": "apache",
+ "extensions": ["pic","pct"]
+ },
+ "image/x-portable-anymap": {
+ "source": "apache",
+ "extensions": ["pnm"]
+ },
+ "image/x-portable-bitmap": {
+ "source": "apache",
+ "extensions": ["pbm"]
+ },
+ "image/x-portable-graymap": {
+ "source": "apache",
+ "extensions": ["pgm"]
+ },
+ "image/x-portable-pixmap": {
+ "source": "apache",
+ "extensions": ["ppm"]
+ },
+ "image/x-rgb": {
+ "source": "apache",
+ "extensions": ["rgb"]
+ },
+ "image/x-tga": {
+ "source": "apache",
+ "extensions": ["tga"]
+ },
+ "image/x-xbitmap": {
+ "source": "apache",
+ "extensions": ["xbm"]
+ },
+ "image/x-xcf": {
+ "compressible": false
+ },
+ "image/x-xpixmap": {
+ "source": "apache",
+ "extensions": ["xpm"]
+ },
+ "image/x-xwindowdump": {
+ "source": "apache",
+ "extensions": ["xwd"]
+ },
+ "message/cpim": {
+ "source": "iana"
+ },
+ "message/delivery-status": {
+ "source": "iana"
+ },
+ "message/disposition-notification": {
+ "source": "iana",
+ "extensions": [
+ "disposition-notification"
+ ]
+ },
+ "message/external-body": {
+ "source": "iana"
+ },
+ "message/feedback-report": {
+ "source": "iana"
+ },
+ "message/global": {
+ "source": "iana",
+ "extensions": ["u8msg"]
+ },
+ "message/global-delivery-status": {
+ "source": "iana",
+ "extensions": ["u8dsn"]
+ },
+ "message/global-disposition-notification": {
+ "source": "iana",
+ "extensions": ["u8mdn"]
+ },
+ "message/global-headers": {
+ "source": "iana",
+ "extensions": ["u8hdr"]
+ },
+ "message/http": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/imdn+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "message/news": {
+ "source": "iana"
+ },
+ "message/partial": {
+ "source": "iana",
+ "compressible": false
+ },
+ "message/rfc822": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["eml","mime"]
+ },
+ "message/s-http": {
+ "source": "iana"
+ },
+ "message/sip": {
+ "source": "iana"
+ },
+ "message/sipfrag": {
+ "source": "iana"
+ },
+ "message/tracking-status": {
+ "source": "iana"
+ },
+ "message/vnd.si.simp": {
+ "source": "iana"
+ },
+ "message/vnd.wfa.wsc": {
+ "source": "iana",
+ "extensions": ["wsc"]
+ },
+ "model/3mf": {
+ "source": "iana",
+ "extensions": ["3mf"]
+ },
+ "model/e57": {
+ "source": "iana"
+ },
+ "model/gltf+json": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["gltf"]
+ },
+ "model/gltf-binary": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["glb"]
+ },
+ "model/iges": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["igs","iges"]
+ },
+ "model/mesh": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["msh","mesh","silo"]
+ },
+ "model/mtl": {
+ "source": "iana",
+ "extensions": ["mtl"]
+ },
+ "model/obj": {
+ "source": "iana",
+ "extensions": ["obj"]
+ },
+ "model/stl": {
+ "source": "iana",
+ "extensions": ["stl"]
+ },
+ "model/vnd.collada+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["dae"]
+ },
+ "model/vnd.dwf": {
+ "source": "iana",
+ "extensions": ["dwf"]
+ },
+ "model/vnd.flatland.3dml": {
+ "source": "iana"
+ },
+ "model/vnd.gdl": {
+ "source": "iana",
+ "extensions": ["gdl"]
+ },
+ "model/vnd.gs-gdl": {
+ "source": "apache"
+ },
+ "model/vnd.gs.gdl": {
+ "source": "iana"
+ },
+ "model/vnd.gtw": {
+ "source": "iana",
+ "extensions": ["gtw"]
+ },
+ "model/vnd.moml+xml": {
+ "source": "iana",
+ "compressible": true
+ },
+ "model/vnd.mts": {
+ "source": "iana",
+ "extensions": ["mts"]
+ },
+ "model/vnd.opengex": {
+ "source": "iana",
+ "extensions": ["ogex"]
+ },
+ "model/vnd.parasolid.transmit.binary": {
+ "source": "iana",
+ "extensions": ["x_b"]
+ },
+ "model/vnd.parasolid.transmit.text": {
+ "source": "iana",
+ "extensions": ["x_t"]
+ },
+ "model/vnd.rosette.annotated-data-model": {
+ "source": "iana"
+ },
+ "model/vnd.usdz+zip": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["usdz"]
+ },
+ "model/vnd.valve.source.compiled-map": {
+ "source": "iana",
+ "extensions": ["bsp"]
+ },
+ "model/vnd.vtu": {
+ "source": "iana",
+ "extensions": ["vtu"]
+ },
+ "model/vrml": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["wrl","vrml"]
+ },
+ "model/x3d+binary": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3db","x3dbz"]
+ },
+ "model/x3d+fastinfoset": {
+ "source": "iana",
+ "extensions": ["x3db"]
+ },
+ "model/x3d+vrml": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["x3dv","x3dvz"]
+ },
+ "model/x3d+xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["x3d","x3dz"]
+ },
+ "model/x3d-vrml": {
+ "source": "iana",
+ "extensions": ["x3dv"]
+ },
+ "multipart/alternative": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/appledouble": {
+ "source": "iana"
+ },
+ "multipart/byteranges": {
+ "source": "iana"
+ },
+ "multipart/digest": {
+ "source": "iana"
+ },
+ "multipart/encrypted": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/form-data": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/header-set": {
+ "source": "iana"
+ },
+ "multipart/mixed": {
+ "source": "iana"
+ },
+ "multipart/multilingual": {
+ "source": "iana"
+ },
+ "multipart/parallel": {
+ "source": "iana"
+ },
+ "multipart/related": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/report": {
+ "source": "iana"
+ },
+ "multipart/signed": {
+ "source": "iana",
+ "compressible": false
+ },
+ "multipart/vnd.bint.med-plus": {
+ "source": "iana"
+ },
+ "multipart/voice-message": {
+ "source": "iana"
+ },
+ "multipart/x-mixed-replace": {
+ "source": "iana"
+ },
+ "text/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "text/cache-manifest": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["appcache","manifest"]
+ },
+ "text/calendar": {
+ "source": "iana",
+ "extensions": ["ics","ifb"]
+ },
+ "text/calender": {
+ "compressible": true
+ },
+ "text/cmd": {
+ "compressible": true
+ },
+ "text/coffeescript": {
+ "extensions": ["coffee","litcoffee"]
+ },
+ "text/css": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["css"]
+ },
+ "text/csv": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["csv"]
+ },
+ "text/csv-schema": {
+ "source": "iana"
+ },
+ "text/directory": {
+ "source": "iana"
+ },
+ "text/dns": {
+ "source": "iana"
+ },
+ "text/ecmascript": {
+ "source": "iana"
+ },
+ "text/encaprtp": {
+ "source": "iana"
+ },
+ "text/enriched": {
+ "source": "iana"
+ },
+ "text/flexfec": {
+ "source": "iana"
+ },
+ "text/fwdred": {
+ "source": "iana"
+ },
+ "text/gff3": {
+ "source": "iana"
+ },
+ "text/grammar-ref-list": {
+ "source": "iana"
+ },
+ "text/html": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["html","htm","shtml"]
+ },
+ "text/jade": {
+ "extensions": ["jade"]
+ },
+ "text/javascript": {
+ "source": "iana",
+ "compressible": true
+ },
+ "text/jcr-cnd": {
+ "source": "iana"
+ },
+ "text/jsx": {
+ "compressible": true,
+ "extensions": ["jsx"]
+ },
+ "text/less": {
+ "compressible": true,
+ "extensions": ["less"]
+ },
+ "text/markdown": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["markdown","md"]
+ },
+ "text/mathml": {
+ "source": "nginx",
+ "extensions": ["mml"]
+ },
+ "text/mdx": {
+ "compressible": true,
+ "extensions": ["mdx"]
+ },
+ "text/mizar": {
+ "source": "iana"
+ },
+ "text/n3": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["n3"]
+ },
+ "text/parameters": {
+ "source": "iana",
+ "charset": "UTF-8"
+ },
+ "text/parityfec": {
+ "source": "iana"
+ },
+ "text/plain": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["txt","text","conf","def","list","log","in","ini"]
+ },
+ "text/provenance-notation": {
+ "source": "iana",
+ "charset": "UTF-8"
+ },
+ "text/prs.fallenstein.rst": {
+ "source": "iana"
+ },
+ "text/prs.lines.tag": {
+ "source": "iana",
+ "extensions": ["dsc"]
+ },
+ "text/prs.prop.logic": {
+ "source": "iana"
+ },
+ "text/raptorfec": {
+ "source": "iana"
+ },
+ "text/red": {
+ "source": "iana"
+ },
+ "text/rfc822-headers": {
+ "source": "iana"
+ },
+ "text/richtext": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtx"]
+ },
+ "text/rtf": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["rtf"]
+ },
+ "text/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "text/rtploopback": {
+ "source": "iana"
+ },
+ "text/rtx": {
+ "source": "iana"
+ },
+ "text/sgml": {
+ "source": "iana",
+ "extensions": ["sgml","sgm"]
+ },
+ "text/shaclc": {
+ "source": "iana"
+ },
+ "text/shex": {
+ "extensions": ["shex"]
+ },
+ "text/slim": {
+ "extensions": ["slim","slm"]
+ },
+ "text/spdx": {
+ "source": "iana",
+ "extensions": ["spdx"]
+ },
+ "text/strings": {
+ "source": "iana"
+ },
+ "text/stylus": {
+ "extensions": ["stylus","styl"]
+ },
+ "text/t140": {
+ "source": "iana"
+ },
+ "text/tab-separated-values": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["tsv"]
+ },
+ "text/troff": {
+ "source": "iana",
+ "extensions": ["t","tr","roff","man","me","ms"]
+ },
+ "text/turtle": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "extensions": ["ttl"]
+ },
+ "text/ulpfec": {
+ "source": "iana"
+ },
+ "text/uri-list": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["uri","uris","urls"]
+ },
+ "text/vcard": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["vcard"]
+ },
+ "text/vnd.a": {
+ "source": "iana"
+ },
+ "text/vnd.abc": {
+ "source": "iana"
+ },
+ "text/vnd.ascii-art": {
+ "source": "iana"
+ },
+ "text/vnd.curl": {
+ "source": "iana",
+ "extensions": ["curl"]
+ },
+ "text/vnd.curl.dcurl": {
+ "source": "apache",
+ "extensions": ["dcurl"]
+ },
+ "text/vnd.curl.mcurl": {
+ "source": "apache",
+ "extensions": ["mcurl"]
+ },
+ "text/vnd.curl.scurl": {
+ "source": "apache",
+ "extensions": ["scurl"]
+ },
+ "text/vnd.debian.copyright": {
+ "source": "iana",
+ "charset": "UTF-8"
+ },
+ "text/vnd.dmclientscript": {
+ "source": "iana"
+ },
+ "text/vnd.dvb.subtitle": {
+ "source": "iana",
+ "extensions": ["sub"]
+ },
+ "text/vnd.esmertec.theme-descriptor": {
+ "source": "iana",
+ "charset": "UTF-8"
+ },
+ "text/vnd.ficlab.flt": {
+ "source": "iana"
+ },
+ "text/vnd.fly": {
+ "source": "iana",
+ "extensions": ["fly"]
+ },
+ "text/vnd.fmi.flexstor": {
+ "source": "iana",
+ "extensions": ["flx"]
+ },
+ "text/vnd.gml": {
+ "source": "iana"
+ },
+ "text/vnd.graphviz": {
+ "source": "iana",
+ "extensions": ["gv"]
+ },
+ "text/vnd.hans": {
+ "source": "iana"
+ },
+ "text/vnd.hgl": {
+ "source": "iana"
+ },
+ "text/vnd.in3d.3dml": {
+ "source": "iana",
+ "extensions": ["3dml"]
+ },
+ "text/vnd.in3d.spot": {
+ "source": "iana",
+ "extensions": ["spot"]
+ },
+ "text/vnd.iptc.newsml": {
+ "source": "iana"
+ },
+ "text/vnd.iptc.nitf": {
+ "source": "iana"
+ },
+ "text/vnd.latex-z": {
+ "source": "iana"
+ },
+ "text/vnd.motorola.reflex": {
+ "source": "iana"
+ },
+ "text/vnd.ms-mediapackage": {
+ "source": "iana"
+ },
+ "text/vnd.net2phone.commcenter.command": {
+ "source": "iana"
+ },
+ "text/vnd.radisys.msml-basic-layout": {
+ "source": "iana"
+ },
+ "text/vnd.senx.warpscript": {
+ "source": "iana"
+ },
+ "text/vnd.si.uricatalogue": {
+ "source": "iana"
+ },
+ "text/vnd.sosi": {
+ "source": "iana"
+ },
+ "text/vnd.sun.j2me.app-descriptor": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "extensions": ["jad"]
+ },
+ "text/vnd.trolltech.linguist": {
+ "source": "iana",
+ "charset": "UTF-8"
+ },
+ "text/vnd.wap.si": {
+ "source": "iana"
+ },
+ "text/vnd.wap.sl": {
+ "source": "iana"
+ },
+ "text/vnd.wap.wml": {
+ "source": "iana",
+ "extensions": ["wml"]
+ },
+ "text/vnd.wap.wmlscript": {
+ "source": "iana",
+ "extensions": ["wmls"]
+ },
+ "text/vtt": {
+ "source": "iana",
+ "charset": "UTF-8",
+ "compressible": true,
+ "extensions": ["vtt"]
+ },
+ "text/x-asm": {
+ "source": "apache",
+ "extensions": ["s","asm"]
+ },
+ "text/x-c": {
+ "source": "apache",
+ "extensions": ["c","cc","cxx","cpp","h","hh","dic"]
+ },
+ "text/x-component": {
+ "source": "nginx",
+ "extensions": ["htc"]
+ },
+ "text/x-fortran": {
+ "source": "apache",
+ "extensions": ["f","for","f77","f90"]
+ },
+ "text/x-gwt-rpc": {
+ "compressible": true
+ },
+ "text/x-handlebars-template": {
+ "extensions": ["hbs"]
+ },
+ "text/x-java-source": {
+ "source": "apache",
+ "extensions": ["java"]
+ },
+ "text/x-jquery-tmpl": {
+ "compressible": true
+ },
+ "text/x-lua": {
+ "extensions": ["lua"]
+ },
+ "text/x-markdown": {
+ "compressible": true,
+ "extensions": ["mkd"]
+ },
+ "text/x-nfo": {
+ "source": "apache",
+ "extensions": ["nfo"]
+ },
+ "text/x-opml": {
+ "source": "apache",
+ "extensions": ["opml"]
+ },
+ "text/x-org": {
+ "compressible": true,
+ "extensions": ["org"]
+ },
+ "text/x-pascal": {
+ "source": "apache",
+ "extensions": ["p","pas"]
+ },
+ "text/x-processing": {
+ "compressible": true,
+ "extensions": ["pde"]
+ },
+ "text/x-sass": {
+ "extensions": ["sass"]
+ },
+ "text/x-scss": {
+ "extensions": ["scss"]
+ },
+ "text/x-setext": {
+ "source": "apache",
+ "extensions": ["etx"]
+ },
+ "text/x-sfv": {
+ "source": "apache",
+ "extensions": ["sfv"]
+ },
+ "text/x-suse-ymp": {
+ "compressible": true,
+ "extensions": ["ymp"]
+ },
+ "text/x-uuencode": {
+ "source": "apache",
+ "extensions": ["uu"]
+ },
+ "text/x-vcalendar": {
+ "source": "apache",
+ "extensions": ["vcs"]
+ },
+ "text/x-vcard": {
+ "source": "apache",
+ "extensions": ["vcf"]
+ },
+ "text/xml": {
+ "source": "iana",
+ "compressible": true,
+ "extensions": ["xml"]
+ },
+ "text/xml-external-parsed-entity": {
+ "source": "iana"
+ },
+ "text/yaml": {
+ "extensions": ["yaml","yml"]
+ },
+ "video/1d-interleaved-parityfec": {
+ "source": "iana"
+ },
+ "video/3gpp": {
+ "source": "iana",
+ "extensions": ["3gp","3gpp"]
+ },
+ "video/3gpp-tt": {
+ "source": "iana"
+ },
+ "video/3gpp2": {
+ "source": "iana",
+ "extensions": ["3g2"]
+ },
+ "video/bmpeg": {
+ "source": "iana"
+ },
+ "video/bt656": {
+ "source": "iana"
+ },
+ "video/celb": {
+ "source": "iana"
+ },
+ "video/dv": {
+ "source": "iana"
+ },
+ "video/encaprtp": {
+ "source": "iana"
+ },
+ "video/flexfec": {
+ "source": "iana"
+ },
+ "video/h261": {
+ "source": "iana",
+ "extensions": ["h261"]
+ },
+ "video/h263": {
+ "source": "iana",
+ "extensions": ["h263"]
+ },
+ "video/h263-1998": {
+ "source": "iana"
+ },
+ "video/h263-2000": {
+ "source": "iana"
+ },
+ "video/h264": {
+ "source": "iana",
+ "extensions": ["h264"]
+ },
+ "video/h264-rcdo": {
+ "source": "iana"
+ },
+ "video/h264-svc": {
+ "source": "iana"
+ },
+ "video/h265": {
+ "source": "iana"
+ },
+ "video/iso.segment": {
+ "source": "iana"
+ },
+ "video/jpeg": {
+ "source": "iana",
+ "extensions": ["jpgv"]
+ },
+ "video/jpeg2000": {
+ "source": "iana"
+ },
+ "video/jpm": {
+ "source": "apache",
+ "extensions": ["jpm","jpgm"]
+ },
+ "video/mj2": {
+ "source": "iana",
+ "extensions": ["mj2","mjp2"]
+ },
+ "video/mp1s": {
+ "source": "iana"
+ },
+ "video/mp2p": {
+ "source": "iana"
+ },
+ "video/mp2t": {
+ "source": "iana",
+ "extensions": ["ts"]
+ },
+ "video/mp4": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mp4","mp4v","mpg4"]
+ },
+ "video/mp4v-es": {
+ "source": "iana"
+ },
+ "video/mpeg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["mpeg","mpg","mpe","m1v","m2v"]
+ },
+ "video/mpeg4-generic": {
+ "source": "iana"
+ },
+ "video/mpv": {
+ "source": "iana"
+ },
+ "video/nv": {
+ "source": "iana"
+ },
+ "video/ogg": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["ogv"]
+ },
+ "video/parityfec": {
+ "source": "iana"
+ },
+ "video/pointer": {
+ "source": "iana"
+ },
+ "video/quicktime": {
+ "source": "iana",
+ "compressible": false,
+ "extensions": ["qt","mov"]
+ },
+ "video/raptorfec": {
+ "source": "iana"
+ },
+ "video/raw": {
+ "source": "iana"
+ },
+ "video/rtp-enc-aescm128": {
+ "source": "iana"
+ },
+ "video/rtploopback": {
+ "source": "iana"
+ },
+ "video/rtx": {
+ "source": "iana"
+ },
+ "video/smpte291": {
+ "source": "iana"
+ },
+ "video/smpte292m": {
+ "source": "iana"
+ },
+ "video/ulpfec": {
+ "source": "iana"
+ },
+ "video/vc1": {
+ "source": "iana"
+ },
+ "video/vc2": {
+ "source": "iana"
+ },
+ "video/vnd.cctv": {
+ "source": "iana"
+ },
+ "video/vnd.dece.hd": {
+ "source": "iana",
+ "extensions": ["uvh","uvvh"]
+ },
+ "video/vnd.dece.mobile": {
+ "source": "iana",
+ "extensions": ["uvm","uvvm"]
+ },
+ "video/vnd.dece.mp4": {
+ "source": "iana"
+ },
+ "video/vnd.dece.pd": {
+ "source": "iana",
+ "extensions": ["uvp","uvvp"]
+ },
+ "video/vnd.dece.sd": {
+ "source": "iana",
+ "extensions": ["uvs","uvvs"]
+ },
+ "video/vnd.dece.video": {
+ "source": "iana",
+ "extensions": ["uvv","uvvv"]
+ },
+ "video/vnd.directv.mpeg": {
+ "source": "iana"
+ },
+ "video/vnd.directv.mpeg-tts": {
+ "source": "iana"
+ },
+ "video/vnd.dlna.mpeg-tts": {
+ "source": "iana"
+ },
+ "video/vnd.dvb.file": {
+ "source": "iana",
+ "extensions": ["dvb"]
+ },
+ "video/vnd.fvt": {
+ "source": "iana",
+ "extensions": ["fvt"]
+ },
+ "video/vnd.hns.video": {
+ "source": "iana"
+ },
+ "video/vnd.iptvforum.1dparityfec-1010": {
+ "source": "iana"
+ },
+ "video/vnd.iptvforum.1dparityfec-2005": {
+ "source": "iana"
+ },
+ "video/vnd.iptvforum.2dparityfec-1010": {
+ "source": "iana"
+ },
+ "video/vnd.iptvforum.2dparityfec-2005": {
+ "source": "iana"
+ },
+ "video/vnd.iptvforum.ttsavc": {
+ "source": "iana"
+ },
+ "video/vnd.iptvforum.ttsmpeg2": {
+ "source": "iana"
+ },
+ "video/vnd.motorola.video": {
+ "source": "iana"
+ },
+ "video/vnd.motorola.videop": {
+ "source": "iana"
+ },
+ "video/vnd.mpegurl": {
+ "source": "iana",
+ "extensions": ["mxu","m4u"]
+ },
+ "video/vnd.ms-playready.media.pyv": {
+ "source": "iana",
+ "extensions": ["pyv"]
+ },
+ "video/vnd.nokia.interleaved-multimedia": {
+ "source": "iana"
+ },
+ "video/vnd.nokia.mp4vr": {
+ "source": "iana"
+ },
+ "video/vnd.nokia.videovoip": {
+ "source": "iana"
+ },
+ "video/vnd.objectvideo": {
+ "source": "iana"
+ },
+ "video/vnd.radgamettools.bink": {
+ "source": "iana"
+ },
+ "video/vnd.radgamettools.smacker": {
+ "source": "iana"
+ },
+ "video/vnd.sealed.mpeg1": {
+ "source": "iana"
+ },
+ "video/vnd.sealed.mpeg4": {
+ "source": "iana"
+ },
+ "video/vnd.sealed.swf": {
+ "source": "iana"
+ },
+ "video/vnd.sealedmedia.softseal.mov": {
+ "source": "iana"
+ },
+ "video/vnd.uvvu.mp4": {
+ "source": "iana",
+ "extensions": ["uvu","uvvu"]
+ },
+ "video/vnd.vivo": {
+ "source": "iana",
+ "extensions": ["viv"]
+ },
+ "video/vnd.youtube.yt": {
+ "source": "iana"
+ },
+ "video/vp8": {
+ "source": "iana"
+ },
+ "video/webm": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["webm"]
+ },
+ "video/x-f4v": {
+ "source": "apache",
+ "extensions": ["f4v"]
+ },
+ "video/x-fli": {
+ "source": "apache",
+ "extensions": ["fli"]
+ },
+ "video/x-flv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["flv"]
+ },
+ "video/x-m4v": {
+ "source": "apache",
+ "extensions": ["m4v"]
+ },
+ "video/x-matroska": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["mkv","mk3d","mks"]
+ },
+ "video/x-mng": {
+ "source": "apache",
+ "extensions": ["mng"]
+ },
+ "video/x-ms-asf": {
+ "source": "apache",
+ "extensions": ["asf","asx"]
+ },
+ "video/x-ms-vob": {
+ "source": "apache",
+ "extensions": ["vob"]
+ },
+ "video/x-ms-wm": {
+ "source": "apache",
+ "extensions": ["wm"]
+ },
+ "video/x-ms-wmv": {
+ "source": "apache",
+ "compressible": false,
+ "extensions": ["wmv"]
+ },
+ "video/x-ms-wmx": {
+ "source": "apache",
+ "extensions": ["wmx"]
+ },
+ "video/x-ms-wvx": {
+ "source": "apache",
+ "extensions": ["wvx"]
+ },
+ "video/x-msvideo": {
+ "source": "apache",
+ "extensions": ["avi"]
+ },
+ "video/x-sgi-movie": {
+ "source": "apache",
+ "extensions": ["movie"]
+ },
+ "video/x-smv": {
+ "source": "apache",
+ "extensions": ["smv"]
+ },
+ "x-conference/x-cooltalk": {
+ "source": "apache",
+ "extensions": ["ice"]
+ },
+ "x-shader/x-fragment": {
+ "compressible": true
+ },
+ "x-shader/x-vertex": {
+ "compressible": true
+ }
+}
diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js
new file mode 100644
index 0000000..551031f
--- /dev/null
+++ b/node_modules/mime-db/index.js
@@ -0,0 +1,11 @@
+/*!
+ * mime-db
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ */
+
+module.exports = require('./db.json')
diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json
new file mode 100644
index 0000000..243b45f
--- /dev/null
+++ b/node_modules/mime-db/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "mime-db",
+ "description": "Media Type Database",
+ "version": "1.45.0",
+ "contributors": [
+ "Douglas Christopher Wilson <doug@somethingdoug.com>",
+ "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
+ "Robert Kieffer <robert@broofa.com> (http://github.com/broofa)"
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
+ "repository": "jshttp/mime-db",
+ "devDependencies": {
+ "bluebird": "3.7.2",
+ "co": "4.6.0",
+ "cogent": "1.0.1",
+ "csv-parse": "4.12.0",
+ "eslint": "7.9.0",
+ "eslint-config-standard": "14.1.1",
+ "eslint-plugin-import": "2.22.0",
+ "eslint-plugin-markdown": "1.0.2",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-plugin-promise": "4.2.1",
+ "eslint-plugin-standard": "4.0.1",
+ "gnode": "0.1.2",
+ "mocha": "8.1.3",
+ "nyc": "15.1.0",
+ "raw-body": "2.4.1",
+ "stream-to-array": "2.3.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "README.md",
+ "db.json",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "build": "node scripts/build",
+ "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx",
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "nyc --reporter=html --reporter=text npm test",
+ "test-travis": "nyc --reporter=text npm test",
+ "update": "npm run fetch && npm run build",
+ "version": "node scripts/version-history.js && git add HISTORY.md"
+ }
+}
diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md
new file mode 100644
index 0000000..af65fdb
--- /dev/null
+++ b/node_modules/mime-types/HISTORY.md
@@ -0,0 +1,346 @@
+2.1.28 / 2021-01-01
+===================
+
+ * deps: mime-db@1.45.0
+ - Add `application/ubjson` with extension `.ubj`
+ - Add `image/avif` with extension `.avif`
+ - Add `image/ktx2` with extension `.ktx2`
+ - Add extension `.dbf` to `application/vnd.dbf`
+ - Add extension `.rar` to `application/vnd.rar`
+ - Add extension `.td` to `application/urc-targetdesc+xml`
+ - Add new upstream MIME types
+ - Fix extension of `application/vnd.apple.keynote` to be `.key`
+
+2.1.27 / 2020-04-23
+===================
+
+ * deps: mime-db@1.44.0
+ - Add charsets from IANA
+ - Add extension `.cjs` to `application/node`
+ - Add new upstream MIME types
+
+2.1.26 / 2020-01-05
+===================
+
+ * deps: mime-db@1.43.0
+ - Add `application/x-keepass2` with extension `.kdbx`
+ - Add extension `.mxmf` to `audio/mobile-xmf`
+ - Add extensions from IANA for `application/*+xml` types
+ - Add new upstream MIME types
+
+2.1.25 / 2019-11-12
+===================
+
+ * deps: mime-db@1.42.0
+ - Add new upstream MIME types
+ - Add `application/toml` with extension `.toml`
+ - Add `image/vnd.ms-dds` with extension `.dds`
+
+2.1.24 / 2019-04-20
+===================
+
+ * deps: mime-db@1.40.0
+ - Add extensions from IANA for `model/*` types
+ - Add `text/mdx` with extension `.mdx`
+
+2.1.23 / 2019-04-17
+===================
+
+ * deps: mime-db@~1.39.0
+ - Add extensions `.siv` and `.sieve` to `application/sieve`
+ - Add new upstream MIME types
+
+2.1.22 / 2019-02-14
+===================
+
+ * deps: mime-db@~1.38.0
+ - Add extension `.nq` to `application/n-quads`
+ - Add extension `.nt` to `application/n-triples`
+ - Add new upstream MIME types
+ - Mark `text/less` as compressible
+
+2.1.21 / 2018-10-19
+===================
+
+ * deps: mime-db@~1.37.0
+ - Add extensions to HEIC image types
+ - Add new upstream MIME types
+
+2.1.20 / 2018-08-26
+===================
+
+ * deps: mime-db@~1.36.0
+ - Add Apple file extensions from IANA
+ - Add extensions from IANA for `image/*` types
+ - Add new upstream MIME types
+
+2.1.19 / 2018-07-17
+===================
+
+ * deps: mime-db@~1.35.0
+ - Add extension `.csl` to `application/vnd.citationstyles.style+xml`
+ - Add extension `.es` to `application/ecmascript`
+ - Add extension `.owl` to `application/rdf+xml`
+ - Add new upstream MIME types
+ - Add UTF-8 as default charset for `text/turtle`
+
+2.1.18 / 2018-02-16
+===================
+
+ * deps: mime-db@~1.33.0
+ - Add `application/raml+yaml` with extension `.raml`
+ - Add `application/wasm` with extension `.wasm`
+ - Add `text/shex` with extension `.shex`
+ - Add extensions for JPEG-2000 images
+ - Add extensions from IANA for `message/*` types
+ - Add new upstream MIME types
+ - Update font MIME types
+ - Update `text/hjson` to registered `application/hjson`
+
+2.1.17 / 2017-09-01
+===================
+
+ * deps: mime-db@~1.30.0
+ - Add `application/vnd.ms-outlook`
+ - Add `application/x-arj`
+ - Add extension `.mjs` to `application/javascript`
+ - Add glTF types and extensions
+ - Add new upstream MIME types
+ - Add `text/x-org`
+ - Add VirtualBox MIME types
+ - Fix `source` records for `video/*` types that are IANA
+ - Update `font/opentype` to registered `font/otf`
+
+2.1.16 / 2017-07-24
+===================
+
+ * deps: mime-db@~1.29.0
+ - Add `application/fido.trusted-apps+json`
+ - Add extension `.wadl` to `application/vnd.sun.wadl+xml`
+ - Add extension `.gz` to `application/gzip`
+ - Add new upstream MIME types
+ - Update extensions `.md` and `.markdown` to be `text/markdown`
+
+2.1.15 / 2017-03-23
+===================
+
+ * deps: mime-db@~1.27.0
+ - Add new mime types
+ - Add `image/apng`
+
+2.1.14 / 2017-01-14
+===================
+
+ * deps: mime-db@~1.26.0
+ - Add new mime types
+
+2.1.13 / 2016-11-18
+===================
+
+ * deps: mime-db@~1.25.0
+ - Add new mime types
+
+2.1.12 / 2016-09-18
+===================
+
+ * deps: mime-db@~1.24.0
+ - Add new mime types
+ - Add `audio/mp3`
+
+2.1.11 / 2016-05-01
+===================
+
+ * deps: mime-db@~1.23.0
+ - Add new mime types
+
+2.1.10 / 2016-02-15
+===================
+
+ * deps: mime-db@~1.22.0
+ - Add new mime types
+ - Fix extension of `application/dash+xml`
+ - Update primary extension for `audio/mp4`
+
+2.1.9 / 2016-01-06
+==================
+
+ * deps: mime-db@~1.21.0
+ - Add new mime types
+
+2.1.8 / 2015-11-30
+==================
+
+ * deps: mime-db@~1.20.0
+ - Add new mime types
+
+2.1.7 / 2015-09-20
+==================
+
+ * deps: mime-db@~1.19.0
+ - Add new mime types
+
+2.1.6 / 2015-09-03
+==================
+
+ * deps: mime-db@~1.18.0
+ - Add new mime types
+
+2.1.5 / 2015-08-20
+==================
+
+ * deps: mime-db@~1.17.0
+ - Add new mime types
+
+2.1.4 / 2015-07-30
+==================
+
+ * deps: mime-db@~1.16.0
+ - Add new mime types
+
+2.1.3 / 2015-07-13
+==================
+
+ * deps: mime-db@~1.15.0
+ - Add new mime types
+
+2.1.2 / 2015-06-25
+==================
+
+ * deps: mime-db@~1.14.0
+ - Add new mime types
+
+2.1.1 / 2015-06-08
+==================
+
+ * perf: fix deopt during mapping
+
+2.1.0 / 2015-06-07
+==================
+
+ * Fix incorrectly treating extension-less file name as extension
+ - i.e. `'path/to/json'` will no longer return `application/json`
+ * Fix `.charset(type)` to accept parameters
+ * Fix `.charset(type)` to match case-insensitive
+ * Improve generation of extension to MIME mapping
+ * Refactor internals for readability and no argument reassignment
+ * Prefer `application/*` MIME types from the same source
+ * Prefer any type over `application/octet-stream`
+ * deps: mime-db@~1.13.0
+ - Add nginx as a source
+ - Add new mime types
+
+2.0.14 / 2015-06-06
+===================
+
+ * deps: mime-db@~1.12.0
+ - Add new mime types
+
+2.0.13 / 2015-05-31
+===================
+
+ * deps: mime-db@~1.11.0
+ - Add new mime types
+
+2.0.12 / 2015-05-19
+===================
+
+ * deps: mime-db@~1.10.0
+ - Add new mime types
+
+2.0.11 / 2015-05-05
+===================
+
+ * deps: mime-db@~1.9.1
+ - Add new mime types
+
+2.0.10 / 2015-03-13
+===================
+
+ * deps: mime-db@~1.8.0
+ - Add new mime types
+
+2.0.9 / 2015-02-09
+==================
+
+ * deps: mime-db@~1.7.0
+ - Add new mime types
+ - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+ * deps: mime-db@~1.3.0
+ - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+ * deps: mime-db@~1.2.0
+ - Add new mime types
+
+2.0.2 / 2014-09-28
+==================
+
+ * deps: mime-db@~1.1.0
+ - Add new mime types
+ - Add additional compressible
+ - Update charsets
+
+2.0.1 / 2014-09-07
+==================
+
+ * Support Node.js 0.6
+
+2.0.0 / 2014-09-02
+==================
+
+ * Use `mime-db`
+ * Remove `.define()`
+
+1.0.2 / 2014-08-04
+==================
+
+ * Set charset=utf-8 for `text/javascript`
+
+1.0.1 / 2014-06-24
+==================
+
+ * Add `text/jsx` type
+
+1.0.0 / 2014-05-12
+==================
+
+ * Return `false` for unknown types
+ * Set charset=utf-8 for `application/json`
+
+0.1.0 / 2014-05-02
+==================
+
+ * Initial release
diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE
new file mode 100644
index 0000000..0616607
--- /dev/null
+++ b/node_modules/mime-types/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md
new file mode 100644
index 0000000..e8bf8eb
--- /dev/null
+++ b/node_modules/mime-types/README.md
@@ -0,0 +1,123 @@
+# mime-types
+
+[![NPM Version][npm-version-image]][npm-url]
+[![NPM Downloads][npm-downloads-image]][npm-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][ci-image]][ci-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+The ultimate javascript content-type utility.
+
+Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except:
+
+- __No fallbacks.__ Instead of naively returning the first available type,
+ `mime-types` simply returns `false`, so do
+ `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
+- No `.define()` functionality
+- Bug fixes for `.lookup(path)`
+
+Otherwise, the API is compatible with `mime` 1.x.
+
+## Install
+
+This is a [Node.js](https://nodejs.org/en/) module available through the
+[npm registry](https://www.npmjs.com/). Installation is done using the
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
+
+```sh
+$ npm install mime-types
+```
+
+## Adding Types
+
+All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db),
+so open a PR there if you'd like to add mime types.
+
+## API
+
+<!-- eslint-disable no-unused-vars -->
+
+```js
+var mime = require('mime-types')
+```
+
+All functions return `false` if input is invalid or not found.
+
+### mime.lookup(path)
+
+Lookup the content-type associated with a file.
+
+<!-- eslint-disable no-undef -->
+
+```js
+mime.lookup('json') // 'application/json'
+mime.lookup('.md') // 'text/markdown'
+mime.lookup('file.html') // 'text/html'
+mime.lookup('folder/file.js') // 'application/javascript'
+mime.lookup('folder/.htaccess') // false
+
+mime.lookup('cats') // false
+```
+
+### mime.contentType(type)
+
+Create a full content-type header given a content-type or extension.
+When given an extension, `mime.lookup` is used to get the matching
+content-type, otherwise the given content-type is used. Then if the
+content-type does not already have a `charset` parameter, `mime.charset`
+is used to get the default charset and add to the returned content-type.
+
+<!-- eslint-disable no-undef -->
+
+```js
+mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
+mime.contentType('file.json') // 'application/json; charset=utf-8'
+mime.contentType('text/html') // 'text/html; charset=utf-8'
+mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1'
+
+// from a full path
+mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
+```
+
+### mime.extension(type)
+
+Get the default extension for a content-type.
+
+<!-- eslint-disable no-undef -->
+
+```js
+mime.extension('application/octet-stream') // 'bin'
+```
+
+### mime.charset(type)
+
+Lookup the implied default charset of a content-type.
+
+<!-- eslint-disable no-undef -->
+
+```js
+mime.charset('text/markdown') // 'UTF-8'
+```
+
+### var type = mime.types[extension]
+
+A map of content-types by extension.
+
+### [extensions...] = mime.extensions[type]
+
+A map of extensions by content-type.
+
+## License
+
+[MIT](LICENSE)
+
+[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci
+[ci-url]: https://github.com/jshttp/mime-types/actions?query=workflow%3Aci
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master
+[node-version-image]: https://badgen.net/npm/node/mime-types
+[node-version-url]: https://nodejs.org/en/download
+[npm-downloads-image]: https://badgen.net/npm/dm/mime-types
+[npm-url]: https://npmjs.org/package/mime-types
+[npm-version-image]: https://badgen.net/npm/v/mime-types
diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js
new file mode 100644
index 0000000..b9f34d5
--- /dev/null
+++ b/node_modules/mime-types/index.js
@@ -0,0 +1,188 @@
+/*!
+ * mime-types
+ * Copyright(c) 2014 Jonathan Ong
+ * Copyright(c) 2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var db = require('mime-db')
+var extname = require('path').extname
+
+/**
+ * Module variables.
+ * @private
+ */
+
+var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
+var TEXT_TYPE_REGEXP = /^text\//i
+
+/**
+ * Module exports.
+ * @public
+ */
+
+exports.charset = charset
+exports.charsets = { lookup: charset }
+exports.contentType = contentType
+exports.extension = extension
+exports.extensions = Object.create(null)
+exports.lookup = lookup
+exports.types = Object.create(null)
+
+// Populate the extensions/types maps
+populateMaps(exports.extensions, exports.types)
+
+/**
+ * Get the default charset for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function charset (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = EXTRACT_TYPE_REGEXP.exec(type)
+ var mime = match && db[match[1].toLowerCase()]
+
+ if (mime && mime.charset) {
+ return mime.charset
+ }
+
+ // default text/* to utf-8
+ if (match && TEXT_TYPE_REGEXP.test(match[1])) {
+ return 'UTF-8'
+ }
+
+ return false
+}
+
+/**
+ * Create a full Content-Type header given a MIME type or extension.
+ *
+ * @param {string} str
+ * @return {boolean|string}
+ */
+
+function contentType (str) {
+ // TODO: should this even be in this module?
+ if (!str || typeof str !== 'string') {
+ return false
+ }
+
+ var mime = str.indexOf('/') === -1
+ ? exports.lookup(str)
+ : str
+
+ if (!mime) {
+ return false
+ }
+
+ // TODO: use content-type or other module
+ if (mime.indexOf('charset') === -1) {
+ var charset = exports.charset(mime)
+ if (charset) mime += '; charset=' + charset.toLowerCase()
+ }
+
+ return mime
+}
+
+/**
+ * Get the default extension for a MIME type.
+ *
+ * @param {string} type
+ * @return {boolean|string}
+ */
+
+function extension (type) {
+ if (!type || typeof type !== 'string') {
+ return false
+ }
+
+ // TODO: use media-typer
+ var match = EXTRACT_TYPE_REGEXP.exec(type)
+
+ // get extensions
+ var exts = match && exports.extensions[match[1].toLowerCase()]
+
+ if (!exts || !exts.length) {
+ return false
+ }
+
+ return exts[0]
+}
+
+/**
+ * Lookup the MIME type for a file path/extension.
+ *
+ * @param {string} path
+ * @return {boolean|string}
+ */
+
+function lookup (path) {
+ if (!path || typeof path !== 'string') {
+ return false
+ }
+
+ // get the extension ("ext" or ".ext" or full path)
+ var extension = extname('x.' + path)
+ .toLowerCase()
+ .substr(1)
+
+ if (!extension) {
+ return false
+ }
+
+ return exports.types[extension] || false
+}
+
+/**
+ * Populate the extensions and types maps.
+ * @private
+ */
+
+function populateMaps (extensions, types) {
+ // source preference (least -> most)
+ var preference = ['nginx', 'apache', undefined, 'iana']
+
+ Object.keys(db).forEach(function forEachMimeType (type) {
+ var mime = db[type]
+ var exts = mime.extensions
+
+ if (!exts || !exts.length) {
+ return
+ }
+
+ // mime -> extensions
+ extensions[type] = exts
+
+ // extension -> mime
+ for (var i = 0; i < exts.length; i++) {
+ var extension = exts[i]
+
+ if (types[extension]) {
+ var from = preference.indexOf(db[types[extension]].source)
+ var to = preference.indexOf(mime.source)
+
+ if (types[extension] !== 'application/octet-stream' &&
+ (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {
+ // skip the remapping
+ continue
+ }
+ }
+
+ // set the extension -> mime
+ types[extension] = type
+ }
+ })
+}
diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json
new file mode 100644
index 0000000..26fa6f6
--- /dev/null
+++ b/node_modules/mime-types/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "mime-types",
+ "description": "The ultimate javascript content-type utility.",
+ "version": "2.1.28",
+ "contributors": [
+ "Douglas Christopher Wilson <doug@somethingdoug.com>",
+ "Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)",
+ "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
+ ],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
+ "repository": "jshttp/mime-types",
+ "dependencies": {
+ "mime-db": "1.45.0"
+ },
+ "devDependencies": {
+ "eslint": "7.17.0",
+ "eslint-config-standard": "14.1.1",
+ "eslint-plugin-import": "2.22.1",
+ "eslint-plugin-markdown": "1.0.2",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-plugin-promise": "4.2.1",
+ "eslint-plugin-standard": "4.1.0",
+ "mocha": "8.2.1",
+ "nyc": "15.1.0"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "lint": "eslint --plugin markdown --ext js,md .",
+ "test": "mocha --reporter spec test/test.js",
+ "test-ci": "nyc --reporter=lcov --reporter=text npm test",
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
+ }
+}
diff --git a/node_modules/mimic-response/index.js b/node_modules/mimic-response/index.js
new file mode 100644
index 0000000..d5e33be
--- /dev/null
+++ b/node_modules/mimic-response/index.js
@@ -0,0 +1,32 @@
+'use strict';
+
+// We define these manually to ensure they're always copied
+// even if they would move up the prototype chain
+// https://nodejs.org/api/http.html#http_class_http_incomingmessage
+const knownProps = [
+ 'destroy',
+ 'setTimeout',
+ 'socket',
+ 'headers',
+ 'trailers',
+ 'rawHeaders',
+ 'statusCode',
+ 'httpVersion',
+ 'httpVersionMinor',
+ 'httpVersionMajor',
+ 'rawTrailers',
+ 'statusMessage'
+];
+
+module.exports = (fromStream, toStream) => {
+ const fromProps = new Set(Object.keys(fromStream).concat(knownProps));
+
+ for (const prop of fromProps) {
+ // Don't overwrite existing properties
+ if (prop in toStream) {
+ continue;
+ }
+
+ toStream[prop] = typeof fromStream[prop] === 'function' ? fromStream[prop].bind(fromStream) : fromStream[prop];
+ }
+};
diff --git a/node_modules/mimic-response/license b/node_modules/mimic-response/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/mimic-response/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/mimic-response/package.json b/node_modules/mimic-response/package.json
new file mode 100644
index 0000000..689cb61
--- /dev/null
+++ b/node_modules/mimic-response/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "mimic-response",
+ "version": "1.0.1",
+ "description": "Mimic a Node.js HTTP response stream",
+ "license": "MIT",
+ "repository": "sindresorhus/mimic-response",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "mimic",
+ "response",
+ "stream",
+ "http",
+ "https",
+ "request",
+ "get",
+ "core"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "create-test-server": "^0.1.0",
+ "pify": "^3.0.0",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/mimic-response/readme.md b/node_modules/mimic-response/readme.md
new file mode 100644
index 0000000..e07ec66
--- /dev/null
+++ b/node_modules/mimic-response/readme.md
@@ -0,0 +1,54 @@
+# mimic-response [![Build Status](https://travis-ci.org/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-response)
+
+> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
+
+
+## Install
+
+```
+$ npm install mimic-response
+```
+
+
+## Usage
+
+```js
+const stream = require('stream');
+const mimicResponse = require('mimic-response');
+
+const responseStream = getHttpResponseStream();
+const myStream = new stream.PassThrough();
+
+mimicResponse(responseStream, myStream);
+
+console.log(myStream.statusCode);
+//=> 200
+```
+
+
+## API
+
+### mimicResponse(from, to)
+
+#### from
+
+Type: `Stream`
+
+[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
+
+#### to
+
+Type: `Stream`
+
+Any stream.
+
+
+## Related
+
+- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one
+- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/minimatch/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md
new file mode 100644
index 0000000..33ede1d
--- /dev/null
+++ b/node_modules/minimatch/README.md
@@ -0,0 +1,230 @@
+# minimatch
+
+A minimal matching utility.
+
+[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+## Minimatch Class
+
+Create a minimatch object by instantiating the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself if this option is set. When not set, an empty list
+is returned if there are no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
+
+### partial
+
+Compare a partial path to a pattern. As long as the parts of the path that
+are present are not contradicted by the pattern, it will be treated as a
+match. This is useful in applications where you're walking through a
+folder structure, and don't yet have the full path, but want to ensure that
+you do not walk down paths that can never be a match.
+
+For example,
+
+```js
+minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
+minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
+minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
+```
+
+### allowWindowsEscape
+
+Windows path separator `\` is by default converted to `/`, which
+prohibits the usage of `\` as a escape character. This flag skips that
+behavior and allows using the escape character.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js
new file mode 100644
index 0000000..fda45ad
--- /dev/null
+++ b/node_modules/minimatch/minimatch.js
@@ -0,0 +1,947 @@
+module.exports = minimatch
+minimatch.Minimatch = Minimatch
+
+var path = (function () { try { return require('path') } catch (e) {}}()) || {
+ sep: '/'
+}
+minimatch.sep = path.sep
+
+var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+var expand = require('brace-expansion')
+
+var plTypes = {
+ '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
+ '?': { open: '(?:', close: ')?' },
+ '+': { open: '(?:', close: ')+' },
+ '*': { open: '(?:', close: ')*' },
+ '@': { open: '(?:', close: ')' }
+}
+
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
+
+// * => any number of characters
+var star = qmark + '*?'
+
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ b = b || {}
+ var t = {}
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || typeof def !== 'object' || !Object.keys(def).length) {
+ return minimatch
+ }
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+ m.Minimatch.defaults = function defaults (options) {
+ return orig.defaults(ext(def, options)).Minimatch
+ }
+
+ m.filter = function filter (pattern, options) {
+ return orig.filter(pattern, ext(def, options))
+ }
+
+ m.defaults = function defaults (options) {
+ return orig.defaults(ext(def, options))
+ }
+
+ m.makeRe = function makeRe (pattern, options) {
+ return orig.makeRe(pattern, ext(def, options))
+ }
+
+ m.braceExpand = function braceExpand (pattern, options) {
+ return orig.braceExpand(pattern, ext(def, options))
+ }
+
+ m.match = function (list, pattern, options) {
+ return orig.match(list, pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ return minimatch.defaults(def).Minimatch
+}
+
+function minimatch (p, pattern, options) {
+ assertValidPattern(pattern)
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
+ }
+
+ assertValidPattern(pattern)
+
+ if (!options) options = {}
+
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (!options.allowWindowsEscape && path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
+ }
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+ this.partial = !!options.partial
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.debug = function () {}
+
+Minimatch.prototype.make = make
+function make () {
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
+
+ if (options.nonegate) return
+
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ assertValidPattern(pattern)
+
+ // Thanks to Yeting Li <https://github.com/yetingli> for
+ // improving this regexp to avoid a ReDOS vulnerability.
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
+}
+
+var MAX_PATTERN_LENGTH = 1024 * 64
+var assertValidPattern = function (pattern) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('invalid pattern')
+ }
+
+ if (pattern.length > MAX_PATTERN_LENGTH) {
+ throw new TypeError('pattern is too long')
+ }
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ assertValidPattern(pattern)
+
+ var options = this.options
+
+ // shortcuts
+ if (pattern === '**') {
+ if (!options.noglobstar)
+ return GLOBSTAR
+ else
+ pattern = '*'
+ }
+ if (pattern === '') return ''
+
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ switch (c) {
+ /* istanbul ignore next */
+ case '/': {
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+ }
+
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
+
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
+
+ patternListStack.push({
+ type: stateChar,
+ start: i - 1,
+ reStart: re.length,
+ open: plTypes[stateChar].open,
+ close: plTypes[stateChar].close
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ var pl = patternListStack.pop()
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:<pattern>)<type>
+ re += pl.close
+ if (pl.type === '!') {
+ negativeLists.push(pl)
+ }
+ pl.reEnd = re.length
+ continue
+
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += '|'
+ continue
+
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + pl.open.length)
+ this.debug('setting tail', re, pl)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
+
+ this.debug('tail=%j\n %s', tail, tail, pl, re)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '[': case '.': case '(': addPatternStart = true
+ }
+
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
+ }
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
+
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ try {
+ var regExp = new RegExp('^' + re + '$', flags)
+ } catch (er) /* istanbul ignore next - should be impossible */ {
+ // If it was an invalid regular expression, then it can't match
+ // anything. This trick looks for a character after the end of
+ // the string, which is of course impossible, except in multi-line
+ // mode, but it's not a /m regex.
+ return new RegExp('$.')
+ }
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) /* istanbul ignore next - should be impossible */ {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = function match (f, partial) {
+ if (typeof partial === 'undefined') partial = this.partial
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
+
+ this.debug('matchOne', file.length, pattern.length)
+
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ /* istanbul ignore if */
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
+
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ /* istanbul ignore if */
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ hit = f === p
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else /* istanbul ignore else */ if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ return (fi === fl - 1) && (file[fi] === '')
+ }
+
+ // should be unreachable.
+ /* istanbul ignore next */
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json
new file mode 100644
index 0000000..566efdf
--- /dev/null
+++ b/node_modules/minimatch/package.json
@@ -0,0 +1,33 @@
+{
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "3.1.2",
+ "publishConfig": {
+ "tag": "v3-legacy"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "main": "minimatch.js",
+ "scripts": {
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "devDependencies": {
+ "tap": "^15.1.6"
+ },
+ "license": "ISC",
+ "files": [
+ "minimatch.js"
+ ]
+}
diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml
new file mode 100644
index 0000000..74c57bf
--- /dev/null
+++ b/node_modules/minimist/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+ - "iojs"
+before_install:
+ - npm install -g npm@~1.4.6
diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/node_modules/minimist/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+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/minimist/example/parse.js b/node_modules/minimist/example/parse.js
new file mode 100644
index 0000000..f7c8d49
--- /dev/null
+++ b/node_modules/minimist/example/parse.js
@@ -0,0 +1,2 @@
+var argv = require('../')(process.argv.slice(2));
+console.log(argv);
diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js
new file mode 100644
index 0000000..d2afe5e
--- /dev/null
+++ b/node_modules/minimist/index.js
@@ -0,0 +1,245 @@
+module.exports = function (args, opts) {
+ if (!opts) opts = {};
+
+ var flags = { bools : {}, strings : {}, unknownFn: null };
+
+ if (typeof opts['unknown'] === 'function') {
+ flags.unknownFn = opts['unknown'];
+ }
+
+ if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
+ flags.allBools = true;
+ } else {
+ [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ });
+ }
+
+ var aliases = {};
+ Object.keys(opts.alias || {}).forEach(function (key) {
+ aliases[key] = [].concat(opts.alias[key]);
+ aliases[key].forEach(function (x) {
+ aliases[x] = [key].concat(aliases[key].filter(function (y) {
+ return x !== y;
+ }));
+ });
+ });
+
+ [].concat(opts.string).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ if (aliases[key]) {
+ flags.strings[aliases[key]] = true;
+ }
+ });
+
+ var defaults = opts['default'] || {};
+
+ var argv = { _ : [] };
+ Object.keys(flags.bools).forEach(function (key) {
+ setArg(key, defaults[key] === undefined ? false : defaults[key]);
+ });
+
+ var notFlags = [];
+
+ if (args.indexOf('--') !== -1) {
+ notFlags = args.slice(args.indexOf('--')+1);
+ args = args.slice(0, args.indexOf('--'));
+ }
+
+ function argDefined(key, arg) {
+ return (flags.allBools && /^--[^=]+$/.test(arg)) ||
+ flags.strings[key] || flags.bools[key] || aliases[key];
+ }
+
+ function setArg (key, val, arg) {
+ if (arg && flags.unknownFn && !argDefined(key, arg)) {
+ if (flags.unknownFn(arg) === false) return;
+ }
+
+ var value = !flags.strings[key] && isNumber(val)
+ ? Number(val) : val
+ ;
+ setKey(argv, key.split('.'), value);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), value);
+ });
+ }
+
+ function setKey (obj, keys, value) {
+ var o = obj;
+ for (var i = 0; i < keys.length-1; i++) {
+ var key = keys[i];
+ if (key === '__proto__') return;
+ if (o[key] === undefined) o[key] = {};
+ if (o[key] === Object.prototype || o[key] === Number.prototype
+ || o[key] === String.prototype) o[key] = {};
+ if (o[key] === Array.prototype) o[key] = [];
+ o = o[key];
+ }
+
+ var key = keys[keys.length - 1];
+ if (key === '__proto__') return;
+ if (o === Object.prototype || o === Number.prototype
+ || o === String.prototype) o = {};
+ if (o === Array.prototype) o = [];
+ if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
+ o[key] = value;
+ }
+ else if (Array.isArray(o[key])) {
+ o[key].push(value);
+ }
+ else {
+ o[key] = [ o[key], value ];
+ }
+ }
+
+ function aliasIsBoolean(key) {
+ return aliases[key].some(function (x) {
+ return flags.bools[x];
+ });
+ }
+
+ for (var i = 0; i < args.length; i++) {
+ var arg = args[i];
+
+ if (/^--.+=/.test(arg)) {
+ // Using [\s\S] instead of . because js doesn't support the
+ // 'dotall' regex modifier. See:
+ // http://stackoverflow.com/a/1068308/13216
+ var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
+ var key = m[1];
+ var value = m[2];
+ if (flags.bools[key]) {
+ value = value !== 'false';
+ }
+ setArg(key, value, arg);
+ }
+ else if (/^--no-.+/.test(arg)) {
+ var key = arg.match(/^--no-(.+)/)[1];
+ setArg(key, false, arg);
+ }
+ else if (/^--.+/.test(arg)) {
+ var key = arg.match(/^--(.+)/)[1];
+ var next = args[i + 1];
+ if (next !== undefined && !/^-/.test(next)
+ && !flags.bools[key]
+ && !flags.allBools
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, next, arg);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next === 'true', arg);
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true, arg);
+ }
+ }
+ else if (/^-[^-]+/.test(arg)) {
+ var letters = arg.slice(1,-1).split('');
+
+ var broken = false;
+ for (var j = 0; j < letters.length; j++) {
+ var next = arg.slice(j+2);
+
+ if (next === '-') {
+ setArg(letters[j], next, arg)
+ continue;
+ }
+
+ if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
+ setArg(letters[j], next.split('=')[1], arg);
+ broken = true;
+ break;
+ }
+
+ if (/[A-Za-z]/.test(letters[j])
+ && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+ setArg(letters[j], next, arg);
+ broken = true;
+ break;
+ }
+
+ if (letters[j+1] && letters[j+1].match(/\W/)) {
+ setArg(letters[j], arg.slice(j+2), arg);
+ broken = true;
+ break;
+ }
+ else {
+ setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
+ }
+ }
+
+ var key = arg.slice(-1)[0];
+ if (!broken && key !== '-') {
+ if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
+ && !flags.bools[key]
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, args[i+1], arg);
+ i++;
+ }
+ else if (args[i+1] && /^(true|false)$/.test(args[i+1])) {
+ setArg(key, args[i+1] === 'true', arg);
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true, arg);
+ }
+ }
+ }
+ else {
+ if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
+ argv._.push(
+ flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+ );
+ }
+ if (opts.stopEarly) {
+ argv._.push.apply(argv._, args.slice(i + 1));
+ break;
+ }
+ }
+ }
+
+ Object.keys(defaults).forEach(function (key) {
+ if (!hasKey(argv, key.split('.'))) {
+ setKey(argv, key.split('.'), defaults[key]);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), defaults[key]);
+ });
+ }
+ });
+
+ if (opts['--']) {
+ argv['--'] = new Array();
+ notFlags.forEach(function(key) {
+ argv['--'].push(key);
+ });
+ }
+ else {
+ notFlags.forEach(function(key) {
+ argv._.push(key);
+ });
+ }
+
+ return argv;
+};
+
+function hasKey (obj, keys) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ o = (o[key] || {});
+ });
+
+ var key = keys[keys.length - 1];
+ return key in o;
+}
+
+function isNumber (x) {
+ if (typeof x === 'number') return true;
+ if (/^0x[0-9a-f]+$/i.test(x)) return true;
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
+
diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json
new file mode 100644
index 0000000..c091d41
--- /dev/null
+++ b/node_modules/minimist/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "minimist",
+ "version": "1.2.5",
+ "description": "parse argument options",
+ "main": "index.js",
+ "devDependencies": {
+ "covert": "^1.0.0",
+ "tap": "~0.4.0",
+ "tape": "^3.5.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js",
+ "coverage": "covert test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "ff/5",
+ "firefox/latest",
+ "chrome/10",
+ "chrome/latest",
+ "safari/5.1",
+ "safari/latest",
+ "opera/12"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/minimist.git"
+ },
+ "homepage": "https://github.com/substack/minimist",
+ "keywords": [
+ "argv",
+ "getopt",
+ "parser",
+ "optimist"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown
new file mode 100644
index 0000000..5fd97ab
--- /dev/null
+++ b/node_modules/minimist/readme.markdown
@@ -0,0 +1,95 @@
+# minimist
+
+parse argument options
+
+This module is the guts of optimist's argument parser without all the
+fanciful decoration.
+
+# example
+
+``` js
+var argv = require('minimist')(process.argv.slice(2));
+console.log(argv);
+```
+
+```
+$ node example/parse.js -a beep -b boop
+{ _: [], a: 'beep', b: 'boop' }
+```
+
+```
+$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
+{ _: [ 'foo', 'bar', 'baz' ],
+ x: 3,
+ y: 4,
+ n: 5,
+ a: true,
+ b: true,
+ c: true,
+ beep: 'boop' }
+```
+
+# security
+
+Previous versions had a prototype pollution bug that could cause privilege
+escalation in some circumstances when handling untrusted user input.
+
+Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764
+
+# methods
+
+``` js
+var parseArgs = require('minimist')
+```
+
+## var argv = parseArgs(args, opts={})
+
+Return an argument object `argv` populated with the array arguments from `args`.
+
+`argv._` contains all the arguments that didn't have an option associated with
+them.
+
+Numeric-looking arguments will be returned as numbers unless `opts.string` or
+`opts.boolean` is set for that argument name.
+
+Any arguments after `'--'` will not be parsed and will end up in `argv._`.
+
+options can be:
+
+* `opts.string` - a string or array of strings argument names to always treat as
+strings
+* `opts.boolean` - a boolean, string or array of strings to always treat as
+booleans. if `true` will treat all double hyphenated arguments without equal signs
+as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
+* `opts.alias` - an object mapping string names to strings or arrays of string
+argument names to use as aliases
+* `opts.default` - an object mapping string argument names to default values
+* `opts.stopEarly` - when true, populate `argv._` with everything after the
+first non-option
+* `opts['--']` - when true, populate `argv._` with everything before the `--`
+and `argv['--']` with everything after the `--`. Here's an example:
+
+ ```
+ > require('./')('one two three -- four five --six'.split(' '), { '--': true })
+ { _: [ 'one', 'two', 'three' ],
+ '--': [ 'four', 'five', '--six' ] }
+ ```
+
+ Note that with `opts['--']` set, parsing for arguments still stops after the
+ `--`.
+
+* `opts.unknown` - a function which is invoked with a command line parameter not
+defined in the `opts` configuration object. If the function returns `false`, the
+unknown option is not added to `argv`.
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install minimist
+```
+
+# license
+
+MIT
diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js
new file mode 100644
index 0000000..ac83548
--- /dev/null
+++ b/node_modules/minimist/test/all_bool.js
@@ -0,0 +1,32 @@
+var parse = require('../');
+var test = require('tape');
+
+test('flag boolean true (default all --args to boolean)', function (t) {
+ var argv = parse(['moo', '--honk', 'cow'], {
+ boolean: true
+ });
+
+ t.deepEqual(argv, {
+ honk: true,
+ _: ['moo', 'cow']
+ });
+
+ t.deepEqual(typeof argv.honk, 'boolean');
+ t.end();
+});
+
+test('flag boolean true only affects double hyphen arguments without equals signs', function (t) {
+ var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], {
+ boolean: true
+ });
+
+ t.deepEqual(argv, {
+ honk: true,
+ tacos: 'good',
+ p: 55,
+ _: ['moo', 'cow']
+ });
+
+ t.deepEqual(typeof argv.honk, 'boolean');
+ t.end();
+});
diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js
new file mode 100644
index 0000000..5f7dbde
--- /dev/null
+++ b/node_modules/minimist/test/bool.js
@@ -0,0 +1,178 @@
+var parse = require('../');
+var test = require('tape');
+
+test('flag boolean default false', function (t) {
+ var argv = parse(['moo'], {
+ boolean: ['t', 'verbose'],
+ default: { verbose: false, t: false }
+ });
+
+ t.deepEqual(argv, {
+ verbose: false,
+ t: false,
+ _: ['moo']
+ });
+
+ t.deepEqual(typeof argv.verbose, 'boolean');
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+
+});
+
+test('boolean groups', function (t) {
+ var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
+ boolean: ['x','y','z']
+ });
+
+ t.deepEqual(argv, {
+ x : true,
+ y : false,
+ z : true,
+ _ : [ 'one', 'two', 'three' ]
+ });
+
+ t.deepEqual(typeof argv.x, 'boolean');
+ t.deepEqual(typeof argv.y, 'boolean');
+ t.deepEqual(typeof argv.z, 'boolean');
+ t.end();
+});
+test('boolean and alias with chainable api', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ herp: { alias: 'h', boolean: true }
+ };
+ var aliasedArgv = parse(aliased, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var propertyArgv = parse(regular, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias with options hash', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ alias: { 'h': 'herp' },
+ boolean: 'herp'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias array with options hash', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var alt = [ '--harp', 'derp' ];
+ var opts = {
+ alias: { 'h': ['herp', 'harp'] },
+ boolean: 'h'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var altPropertyArgv = parse(alt, opts);
+ var expected = {
+ harp: true,
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.same(altPropertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias using explicit true', function (t) {
+ var aliased = [ '-h', 'true' ];
+ var regular = [ '--herp', 'true' ];
+ var opts = {
+ alias: { h: 'herp' },
+ boolean: 'h'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+// regression, see https://github.com/substack/node-optimist/issues/71
+test('boolean and --x=true', function(t) {
+ var parsed = parse(['--boool', '--other=true'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'true');
+
+ parsed = parse(['--boool', '--other=false'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'false');
+ t.end();
+});
+
+test('boolean --boool=true', function (t) {
+ var parsed = parse(['--boool=true'], {
+ default: {
+ boool: false
+ },
+ boolean: ['boool']
+ });
+
+ t.same(parsed.boool, true);
+ t.end();
+});
+
+test('boolean --boool=false', function (t) {
+ var parsed = parse(['--boool=false'], {
+ default: {
+ boool: true
+ },
+ boolean: ['boool']
+ });
+
+ t.same(parsed.boool, false);
+ t.end();
+});
+
+test('boolean using something similar to true', function (t) {
+ var opts = { boolean: 'h' };
+ var result = parse(['-h', 'true.txt'], opts);
+ var expected = {
+ h: true,
+ '_': ['true.txt']
+ };
+
+ t.same(result, expected);
+ t.end();
+}); \ No newline at end of file
diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js
new file mode 100644
index 0000000..5a4fa5b
--- /dev/null
+++ b/node_modules/minimist/test/dash.js
@@ -0,0 +1,31 @@
+var parse = require('../');
+var test = require('tape');
+
+test('-', function (t) {
+ t.plan(5);
+ t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
+ t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
+ t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
+ t.deepEqual(
+ parse([ '-b', '-' ], { boolean: 'b' }),
+ { b: true, _: [ '-' ] }
+ );
+ t.deepEqual(
+ parse([ '-s', '-' ], { string: 's' }),
+ { s: '-', _: [] }
+ );
+});
+
+test('-a -- b', function (t) {
+ t.plan(3);
+ t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+ t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+ t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+});
+
+test('move arguments after the -- into their own `--` array', function(t) {
+ t.plan(1);
+ t.deepEqual(
+ parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }),
+ { name: 'John', _: [ 'before' ], '--': [ 'after' ] });
+});
diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js
new file mode 100644
index 0000000..780a311
--- /dev/null
+++ b/node_modules/minimist/test/default_bool.js
@@ -0,0 +1,35 @@
+var test = require('tape');
+var parse = require('../');
+
+test('boolean default true', function (t) {
+ var argv = parse([], {
+ boolean: 'sometrue',
+ default: { sometrue: true }
+ });
+ t.equal(argv.sometrue, true);
+ t.end();
+});
+
+test('boolean default false', function (t) {
+ var argv = parse([], {
+ boolean: 'somefalse',
+ default: { somefalse: false }
+ });
+ t.equal(argv.somefalse, false);
+ t.end();
+});
+
+test('boolean default to null', function (t) {
+ var argv = parse([], {
+ boolean: 'maybe',
+ default: { maybe: null }
+ });
+ t.equal(argv.maybe, null);
+ var argv = parse(['--maybe'], {
+ boolean: 'maybe',
+ default: { maybe: null }
+ });
+ t.equal(argv.maybe, true);
+ t.end();
+
+})
diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js
new file mode 100644
index 0000000..d8b3e85
--- /dev/null
+++ b/node_modules/minimist/test/dotted.js
@@ -0,0 +1,22 @@
+var parse = require('../');
+var test = require('tape');
+
+test('dotted alias', function (t) {
+ var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+ t.equal(argv.a.b, 22);
+ t.equal(argv.aa.bb, 22);
+ t.end();
+});
+
+test('dotted default', function (t) {
+ var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+ t.equal(argv.a.b, 11);
+ t.equal(argv.aa.bb, 11);
+ t.end();
+});
+
+test('dotted default with no alias', function (t) {
+ var argv = parse('', {default: {'a.b': 11}});
+ t.equal(argv.a.b, 11);
+ t.end();
+});
diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js
new file mode 100644
index 0000000..f813b30
--- /dev/null
+++ b/node_modules/minimist/test/kv_short.js
@@ -0,0 +1,16 @@
+var parse = require('../');
+var test = require('tape');
+
+test('short -k=v' , function (t) {
+ t.plan(1);
+
+ var argv = parse([ '-b=123' ]);
+ t.deepEqual(argv, { b: 123, _: [] });
+});
+
+test('multi short -k=v' , function (t) {
+ t.plan(1);
+
+ var argv = parse([ '-a=whatever', '-b=robots' ]);
+ t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
+});
diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js
new file mode 100644
index 0000000..5d3a1e0
--- /dev/null
+++ b/node_modules/minimist/test/long.js
@@ -0,0 +1,31 @@
+var test = require('tape');
+var parse = require('../');
+
+test('long opts', function (t) {
+ t.deepEqual(
+ parse([ '--bool' ]),
+ { bool : true, _ : [] },
+ 'long boolean'
+ );
+ t.deepEqual(
+ parse([ '--pow', 'xixxle' ]),
+ { pow : 'xixxle', _ : [] },
+ 'long capture sp'
+ );
+ t.deepEqual(
+ parse([ '--pow=xixxle' ]),
+ { pow : 'xixxle', _ : [] },
+ 'long capture eq'
+ );
+ t.deepEqual(
+ parse([ '--host', 'localhost', '--port', '555' ]),
+ { host : 'localhost', port : 555, _ : [] },
+ 'long captures sp'
+ );
+ t.deepEqual(
+ parse([ '--host=localhost', '--port=555' ]),
+ { host : 'localhost', port : 555, _ : [] },
+ 'long captures eq'
+ );
+ t.end();
+});
diff --git a/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js
new file mode 100644
index 0000000..2cc77f4
--- /dev/null
+++ b/node_modules/minimist/test/num.js
@@ -0,0 +1,36 @@
+var parse = require('../');
+var test = require('tape');
+
+test('nums', function (t) {
+ var argv = parse([
+ '-x', '1234',
+ '-y', '5.67',
+ '-z', '1e7',
+ '-w', '10f',
+ '--hex', '0xdeadbeef',
+ '789'
+ ]);
+ t.deepEqual(argv, {
+ x : 1234,
+ y : 5.67,
+ z : 1e7,
+ w : '10f',
+ hex : 0xdeadbeef,
+ _ : [ 789 ]
+ });
+ t.deepEqual(typeof argv.x, 'number');
+ t.deepEqual(typeof argv.y, 'number');
+ t.deepEqual(typeof argv.z, 'number');
+ t.deepEqual(typeof argv.w, 'string');
+ t.deepEqual(typeof argv.hex, 'number');
+ t.deepEqual(typeof argv._[0], 'number');
+ t.end();
+});
+
+test('already a number', function (t) {
+ var argv = parse([ '-x', 1234, 789 ]);
+ t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
+ t.deepEqual(typeof argv.x, 'number');
+ t.deepEqual(typeof argv._[0], 'number');
+ t.end();
+});
diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js
new file mode 100644
index 0000000..7b4a2a1
--- /dev/null
+++ b/node_modules/minimist/test/parse.js
@@ -0,0 +1,197 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse args', function (t) {
+ t.deepEqual(
+ parse([ '--no-moo' ]),
+ { moo : false, _ : [] },
+ 'no'
+ );
+ t.deepEqual(
+ parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
+ { v : ['a','b','c'], _ : [] },
+ 'multi'
+ );
+ t.end();
+});
+
+test('comprehensive', function (t) {
+ t.deepEqual(
+ parse([
+ '--name=meowmers', 'bare', '-cats', 'woo',
+ '-h', 'awesome', '--multi=quux',
+ '--key', 'value',
+ '-b', '--bool', '--no-meep', '--multi=baz',
+ '--', '--not-a-flag', 'eek'
+ ]),
+ {
+ c : true,
+ a : true,
+ t : true,
+ s : 'woo',
+ h : 'awesome',
+ b : true,
+ bool : true,
+ key : 'value',
+ multi : [ 'quux', 'baz' ],
+ meep : false,
+ name : 'meowmers',
+ _ : [ 'bare', '--not-a-flag', 'eek' ]
+ }
+ );
+ t.end();
+});
+
+test('flag boolean', function (t) {
+ var argv = parse([ '-t', 'moo' ], { boolean: 't' });
+ t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+});
+
+test('flag boolean value', function (t) {
+ var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
+ boolean: [ 't', 'verbose' ],
+ default: { verbose: true }
+ });
+
+ t.deepEqual(argv, {
+ verbose: false,
+ t: true,
+ _: ['moo']
+ });
+
+ t.deepEqual(typeof argv.verbose, 'boolean');
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+});
+
+test('newlines in params' , function (t) {
+ var args = parse([ '-s', "X\nX" ])
+ t.deepEqual(args, { _ : [], s : "X\nX" });
+
+ // reproduce in bash:
+ // VALUE="new
+ // line"
+ // node program.js --s="$VALUE"
+ args = parse([ "--s=X\nX" ])
+ t.deepEqual(args, { _ : [], s : "X\nX" });
+ t.end();
+});
+
+test('strings' , function (t) {
+ var s = parse([ '-s', '0001234' ], { string: 's' }).s;
+ t.equal(s, '0001234');
+ t.equal(typeof s, 'string');
+
+ var x = parse([ '-x', '56' ], { string: 'x' }).x;
+ t.equal(x, '56');
+ t.equal(typeof x, 'string');
+ t.end();
+});
+
+test('stringArgs', function (t) {
+ var s = parse([ ' ', ' ' ], { string: '_' })._;
+ t.same(s.length, 2);
+ t.same(typeof s[0], 'string');
+ t.same(s[0], ' ');
+ t.same(typeof s[1], 'string');
+ t.same(s[1], ' ');
+ t.end();
+});
+
+test('empty strings', function(t) {
+ var s = parse([ '-s' ], { string: 's' }).s;
+ t.equal(s, '');
+ t.equal(typeof s, 'string');
+
+ var str = parse([ '--str' ], { string: 'str' }).str;
+ t.equal(str, '');
+ t.equal(typeof str, 'string');
+
+ var letters = parse([ '-art' ], {
+ string: [ 'a', 't' ]
+ });
+
+ t.equal(letters.a, '');
+ t.equal(letters.r, true);
+ t.equal(letters.t, '');
+
+ t.end();
+});
+
+
+test('string and alias', function(t) {
+ var x = parse([ '--str', '000123' ], {
+ string: 's',
+ alias: { s: 'str' }
+ });
+
+ t.equal(x.str, '000123');
+ t.equal(typeof x.str, 'string');
+ t.equal(x.s, '000123');
+ t.equal(typeof x.s, 'string');
+
+ var y = parse([ '-s', '000123' ], {
+ string: 'str',
+ alias: { str: 's' }
+ });
+
+ t.equal(y.str, '000123');
+ t.equal(typeof y.str, 'string');
+ t.equal(y.s, '000123');
+ t.equal(typeof y.s, 'string');
+ t.end();
+});
+
+test('slashBreak', function (t) {
+ t.same(
+ parse([ '-I/foo/bar/baz' ]),
+ { I : '/foo/bar/baz', _ : [] }
+ );
+ t.same(
+ parse([ '-xyz/foo/bar/baz' ]),
+ { x : true, y : true, z : '/foo/bar/baz', _ : [] }
+ );
+ t.end();
+});
+
+test('alias', function (t) {
+ var argv = parse([ '-f', '11', '--zoom', '55' ], {
+ alias: { z: 'zoom' }
+ });
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('multiAlias', function (t) {
+ var argv = parse([ '-f', '11', '--zoom', '55' ], {
+ alias: { z: [ 'zm', 'zoom' ] }
+ });
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.z, argv.zm);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('nested dotted objects', function (t) {
+ var argv = parse([
+ '--foo.bar', '3', '--foo.baz', '4',
+ '--foo.quux.quibble', '5', '--foo.quux.o_O',
+ '--beep.boop'
+ ]);
+
+ t.same(argv.foo, {
+ bar : 3,
+ baz : 4,
+ quux : {
+ quibble : 5,
+ o_O : true
+ }
+ });
+ t.same(argv.beep, { boop : true });
+ t.end();
+});
diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js
new file mode 100644
index 0000000..ab620dc
--- /dev/null
+++ b/node_modules/minimist/test/parse_modified.js
@@ -0,0 +1,9 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse with modifier functions' , function (t) {
+ t.plan(1);
+
+ var argv = parse([ '-b', '123' ], { boolean: 'b' });
+ t.deepEqual(argv, { b: true, _: [123] });
+});
diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js
new file mode 100644
index 0000000..8649107
--- /dev/null
+++ b/node_modules/minimist/test/proto.js
@@ -0,0 +1,44 @@
+var parse = require('../');
+var test = require('tape');
+
+test('proto pollution', function (t) {
+ var argv = parse(['--__proto__.x','123']);
+ t.equal({}.x, undefined);
+ t.equal(argv.__proto__.x, undefined);
+ t.equal(argv.x, undefined);
+ t.end();
+});
+
+test('proto pollution (array)', function (t) {
+ var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']);
+ t.equal({}.z, undefined);
+ t.deepEqual(argv.x, [4,5]);
+ t.equal(argv.x.z, undefined);
+ t.equal(argv.x.__proto__.z, undefined);
+ t.end();
+});
+
+test('proto pollution (number)', function (t) {
+ var argv = parse(['--x','5','--x.__proto__.z','100']);
+ t.equal({}.z, undefined);
+ t.equal((4).z, undefined);
+ t.equal(argv.x, 5);
+ t.equal(argv.x.z, undefined);
+ t.end();
+});
+
+test('proto pollution (string)', function (t) {
+ var argv = parse(['--x','abc','--x.__proto__.z','def']);
+ t.equal({}.z, undefined);
+ t.equal('...'.z, undefined);
+ t.equal(argv.x, 'abc');
+ t.equal(argv.x.z, undefined);
+ t.end();
+});
+
+test('proto pollution (constructor)', function (t) {
+ var argv = parse(['--constructor.prototype.y','123']);
+ t.equal({}.y, undefined);
+ t.equal(argv.y, undefined);
+ t.end();
+});
diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js
new file mode 100644
index 0000000..d513a1c
--- /dev/null
+++ b/node_modules/minimist/test/short.js
@@ -0,0 +1,67 @@
+var parse = require('../');
+var test = require('tape');
+
+test('numeric short args', function (t) {
+ t.plan(2);
+ t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
+ t.deepEqual(
+ parse([ '-123', '456' ]),
+ { 1: true, 2: true, 3: 456, _: [] }
+ );
+});
+
+test('short', function (t) {
+ t.deepEqual(
+ parse([ '-b' ]),
+ { b : true, _ : [] },
+ 'short boolean'
+ );
+ t.deepEqual(
+ parse([ 'foo', 'bar', 'baz' ]),
+ { _ : [ 'foo', 'bar', 'baz' ] },
+ 'bare'
+ );
+ t.deepEqual(
+ parse([ '-cats' ]),
+ { c : true, a : true, t : true, s : true, _ : [] },
+ 'group'
+ );
+ t.deepEqual(
+ parse([ '-cats', 'meow' ]),
+ { c : true, a : true, t : true, s : 'meow', _ : [] },
+ 'short group next'
+ );
+ t.deepEqual(
+ parse([ '-h', 'localhost' ]),
+ { h : 'localhost', _ : [] },
+ 'short capture'
+ );
+ t.deepEqual(
+ parse([ '-h', 'localhost', '-p', '555' ]),
+ { h : 'localhost', p : 555, _ : [] },
+ 'short captures'
+ );
+ t.end();
+});
+
+test('mixed short bool and capture', function (t) {
+ t.same(
+ parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ]
+ }
+ );
+ t.end();
+});
+
+test('short and long', function (t) {
+ t.deepEqual(
+ parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ]
+ }
+ );
+ t.end();
+});
diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js
new file mode 100644
index 0000000..bdf9fbc
--- /dev/null
+++ b/node_modules/minimist/test/stop_early.js
@@ -0,0 +1,15 @@
+var parse = require('../');
+var test = require('tape');
+
+test('stops parsing on the first non-option when stopEarly is set', function (t) {
+ var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], {
+ stopEarly: true
+ });
+
+ t.deepEqual(argv, {
+ aaa: 'bbb',
+ _: ['ccc', '--ddd']
+ });
+
+ t.end();
+});
diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js
new file mode 100644
index 0000000..462a36b
--- /dev/null
+++ b/node_modules/minimist/test/unknown.js
@@ -0,0 +1,102 @@
+var parse = require('../');
+var test = require('tape');
+
+test('boolean and alias is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '-h', 'true', '--derp', 'true' ];
+ var regular = [ '--herp', 'true', '-d', 'true' ];
+ var opts = {
+ alias: { h: 'herp' },
+ boolean: 'h',
+ unknown: unknownFn
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+
+ t.same(unknown, ['--derp', '-d']);
+ t.end();
+});
+
+test('flag boolean true any double hyphen argument is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
+ boolean: true,
+ unknown: unknownFn
+ });
+ t.same(unknown, ['--tacos=good', 'cow', '-p']);
+ t.same(argv, {
+ honk: true,
+ _: []
+ });
+ t.end();
+});
+
+test('string and alias is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '-h', 'hello', '--derp', 'goodbye' ];
+ var regular = [ '--herp', 'hello', '-d', 'moon' ];
+ var opts = {
+ alias: { h: 'herp' },
+ string: 'h',
+ unknown: unknownFn
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+
+ t.same(unknown, ['--derp', '-d']);
+ t.end();
+});
+
+test('default and alias is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '-h', 'hello' ];
+ var regular = [ '--herp', 'hello' ];
+ var opts = {
+ default: { 'h': 'bar' },
+ alias: { 'h': 'herp' },
+ unknown: unknownFn
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+
+ t.same(unknown, []);
+ t.end();
+ unknownFn(); // exercise fn for 100% coverage
+});
+
+test('value following -- is not unknown', function (t) {
+ var unknown = [];
+ function unknownFn(arg) {
+ unknown.push(arg);
+ return false;
+ }
+ var aliased = [ '--bad', '--', 'good', 'arg' ];
+ var opts = {
+ '--': true,
+ unknown: unknownFn
+ };
+ var argv = parse(aliased, opts);
+
+ t.same(unknown, ['--bad']);
+ t.same(argv, {
+ '--': ['good', 'arg'],
+ '_': []
+ })
+ t.end();
+});
diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js
new file mode 100644
index 0000000..8a52a58
--- /dev/null
+++ b/node_modules/minimist/test/whitespace.js
@@ -0,0 +1,8 @@
+var parse = require('../');
+var test = require('tape');
+
+test('whitespace should be whitespace' , function (t) {
+ t.plan(1);
+ var x = parse([ '-x', '\t' ]).x;
+ t.equal(x, '\t');
+});
diff --git a/node_modules/mkdirp/LICENSE b/node_modules/mkdirp/LICENSE
new file mode 100644
index 0000000..432d1ae
--- /dev/null
+++ b/node_modules/mkdirp/LICENSE
@@ -0,0 +1,21 @@
+Copyright 2010 James Halliday (mail@substack.net)
+
+This project is free software released under the MIT/X11 license:
+
+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/mkdirp/bin/cmd.js b/node_modules/mkdirp/bin/cmd.js
new file mode 100755
index 0000000..d95de15
--- /dev/null
+++ b/node_modules/mkdirp/bin/cmd.js
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+
+var mkdirp = require('../');
+var minimist = require('minimist');
+var fs = require('fs');
+
+var argv = minimist(process.argv.slice(2), {
+ alias: { m: 'mode', h: 'help' },
+ string: [ 'mode' ]
+});
+if (argv.help) {
+ fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
+ return;
+}
+
+var paths = argv._.slice();
+var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
+
+(function next () {
+ if (paths.length === 0) return;
+ var p = paths.shift();
+
+ if (mode === undefined) mkdirp(p, cb)
+ else mkdirp(p, mode, cb)
+
+ function cb (err) {
+ if (err) {
+ console.error(err.message);
+ process.exit(1);
+ }
+ else next();
+ }
+})();
diff --git a/node_modules/mkdirp/bin/usage.txt b/node_modules/mkdirp/bin/usage.txt
new file mode 100644
index 0000000..f952aa2
--- /dev/null
+++ b/node_modules/mkdirp/bin/usage.txt
@@ -0,0 +1,12 @@
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories that
+ don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m, --mode If a directory needs to be created, set the mode as an octal
+ permission string.
+
diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js
new file mode 100644
index 0000000..468d7cd
--- /dev/null
+++ b/node_modules/mkdirp/index.js
@@ -0,0 +1,99 @@
+var path = require('path');
+var fs = require('fs');
+var _0777 = parseInt('0777', 8);
+
+module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+
+function mkdirP (p, opts, f, made) {
+ if (typeof opts === 'function') {
+ f = opts;
+ opts = {};
+ }
+ else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777
+ }
+ if (!made) made = null;
+
+ var cb = f || function () {};
+ p = path.resolve(p);
+
+ xfs.mkdir(p, mode, function (er) {
+ if (!er) {
+ made = made || p;
+ return cb(null, made);
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ if (path.dirname(p) === p) return cb(er);
+ mkdirP(path.dirname(p), opts, function (er, made) {
+ if (er) cb(er, made);
+ else mkdirP(p, opts, cb, made);
+ });
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, function (er2, stat) {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) cb(er, made)
+ else cb(null, made);
+ });
+ break;
+ }
+ });
+}
+
+mkdirP.sync = function sync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777
+ }
+ if (!made) made = null;
+
+ p = path.resolve(p);
+
+ try {
+ xfs.mkdirSync(p, mode);
+ made = made || p;
+ }
+ catch (err0) {
+ switch (err0.code) {
+ case 'ENOENT' :
+ made = sync(path.dirname(p), opts, made);
+ sync(p, opts, made);
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ var stat;
+ try {
+ stat = xfs.statSync(p);
+ }
+ catch (err1) {
+ throw err0;
+ }
+ if (!stat.isDirectory()) throw err0;
+ break;
+ }
+ }
+
+ return made;
+};
diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json
new file mode 100644
index 0000000..67e8640
--- /dev/null
+++ b/node_modules/mkdirp/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "mkdirp",
+ "description": "Recursively mkdir, like `mkdir -p`",
+ "version": "0.5.5",
+ "publishConfig": {
+ "tag": "legacy"
+ },
+ "author": "James Halliday <mail@substack.net> (http://substack.net)",
+ "main": "index.js",
+ "keywords": [
+ "mkdir",
+ "directory"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/substack/node-mkdirp.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {
+ "minimist": "^1.2.5"
+ },
+ "devDependencies": {
+ "mock-fs": "^3.7.0",
+ "tap": "^5.4.2"
+ },
+ "bin": "bin/cmd.js",
+ "license": "MIT",
+ "files": [
+ "bin",
+ "index.js"
+ ]
+}
diff --git a/node_modules/mkdirp/readme.markdown b/node_modules/mkdirp/readme.markdown
new file mode 100644
index 0000000..fc314bf
--- /dev/null
+++ b/node_modules/mkdirp/readme.markdown
@@ -0,0 +1,100 @@
+# mkdirp
+
+Like `mkdir -p`, but in node.js!
+
+[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
+
+# example
+
+## pow.js
+
+```js
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});
+```
+
+Output
+
+```
+pow!
+```
+
+And now /tmp/foo/bar/baz exists, huzzah!
+
+# methods
+
+```js
+var mkdirp = require('mkdirp');
+```
+
+## mkdirp(dir, opts, cb)
+
+Create a new directory and any necessary subdirectories at `dir` with octal
+permission string `opts.mode`. If `opts` is a non-object, it will be treated as
+the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777`.
+
+`cb(err, made)` fires with the error or the first directory `made`
+that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
+`opts.fs.stat(path, cb)`.
+
+## mkdirp.sync(dir, opts)
+
+Synchronously create a new directory and any necessary subdirectories at `dir`
+with octal permission string `opts.mode`. If `opts` is a non-object, it will be
+treated as the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777`.
+
+Returns the first directory that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
+`opts.fs.statSync(path)`.
+
+# usage
+
+This package also ships with a `mkdirp` command.
+
+```
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories that
+ don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m, --mode If a directory needs to be created, set the mode as an octal
+ permission string.
+
+```
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install mkdirp
+```
+
+to get the library, or
+
+```
+npm install -g mkdirp
+```
+
+to get the command.
+
+# license
+
+MIT
diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js
new file mode 100644
index 0000000..ea734fb
--- /dev/null
+++ b/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function (val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md
new file mode 100644
index 0000000..fa5d39b
--- /dev/null
+++ b/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 Vercel, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json
new file mode 100644
index 0000000..4997189
--- /dev/null
+++ b/node_modules/ms/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "ms",
+ "version": "2.1.3",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "vercel/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.18.2",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1",
+ "prettier": "2.0.5"
+ }
+}
diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md
new file mode 100644
index 0000000..0fc1abb
--- /dev/null
+++ b/node_modules/ms/readme.md
@@ -0,0 +1,59 @@
+# ms
+
+![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/normalize-package-data/AUTHORS b/node_modules/normalize-package-data/AUTHORS
new file mode 100644
index 0000000..66282ba
--- /dev/null
+++ b/node_modules/normalize-package-data/AUTHORS
@@ -0,0 +1,4 @@
+# Names sorted by how much code was originally theirs.
+Isaac Z. Schlueter <i@izs.me>
+Meryn Stol <merynstol@gmail.com>
+Robert Kowalski <rok@kowalski.gd>
diff --git a/node_modules/normalize-package-data/LICENSE b/node_modules/normalize-package-data/LICENSE
new file mode 100644
index 0000000..6ed662c
--- /dev/null
+++ b/node_modules/normalize-package-data/LICENSE
@@ -0,0 +1,30 @@
+This package contains code originally written by Isaac Z. Schlueter.
+Used with permission.
+
+Copyright (c) Meryn Stol ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md
new file mode 100644
index 0000000..d2bd7bc
--- /dev/null
+++ b/node_modules/normalize-package-data/README.md
@@ -0,0 +1,106 @@
+# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data)
+
+normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.
+
+normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.
+
+## Installation
+
+```
+npm install normalize-package-data
+```
+
+## Usage
+
+Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.
+
+```javascript
+normalizeData = require('normalize-package-data')
+packageData = require("./package.json")
+normalizeData(packageData)
+// packageData is now normalized
+```
+
+#### Strict mode
+
+You may activate strict validation by passing true as the second argument.
+
+```javascript
+normalizeData = require('normalize-package-data')
+packageData = require("./package.json")
+normalizeData(packageData, true)
+// packageData is now normalized
+```
+
+If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.
+
+#### Warnings
+
+Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.
+
+```javascript
+normalizeData = require('normalize-package-data')
+packageData = require("./package.json")
+warnFn = function(msg) { console.error(msg) }
+normalizeData(packageData, warnFn)
+// packageData is now normalized. Any number of warnings may have been logged.
+```
+
+You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.
+
+When `private` field is set to `true`, warnings will be suppressed.
+
+### Potential exceptions
+
+If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.
+
+## What normalization (currently) entails
+
+* The value of `name` field gets trimmed (unless in strict mode).
+* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).
+* If `name` and/or `version` fields are missing, they are set to empty strings.
+* If `files` field is not an array, it will be removed.
+* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.
+* If `man` field is a string, it will become an array with the original string as its sole member.
+* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`.
+* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.
+* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.
+* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.
+* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.
+* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved.
+* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL.
+* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.
+* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`.
+* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git
+* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.
+* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
+* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
+* If `homepage` field is not a string, it will be removed.
+* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.
+* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
+
+### Rules for name field
+
+If `name` field is given, the value of the name field must be a string. The string may not:
+
+* start with a period.
+* contain the following characters: `/@\s+%`
+* contain any characters that would need to be encoded for use in urls.
+* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).
+
+### Rules for version field
+
+If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).
+
+### Rules for license field
+
+The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license).
+
+## Credits
+
+This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.
+
+## License
+
+normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT).
+Copyright (c) 2013 Meryn Stol
diff --git a/node_modules/normalize-package-data/lib/extract_description.js b/node_modules/normalize-package-data/lib/extract_description.js
new file mode 100644
index 0000000..83f10aa
--- /dev/null
+++ b/node_modules/normalize-package-data/lib/extract_description.js
@@ -0,0 +1,14 @@
+module.exports = extractDescription
+
+// Extracts description from contents of a readme file in markdown format
+function extractDescription (d) {
+ if (!d) return;
+ if (d === "ERROR: No README data found!") return;
+ // the first block of text before the first heading
+ // that isn't the first line heading
+ d = d.trim().split('\n')
+ for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++);
+ var l = d.length
+ for (var e = s + 1; e < l && d[e].trim(); e ++);
+ return d.slice(s, e).join(' ').trim()
+}
diff --git a/node_modules/normalize-package-data/lib/fixer.js b/node_modules/normalize-package-data/lib/fixer.js
new file mode 100644
index 0000000..27682e9
--- /dev/null
+++ b/node_modules/normalize-package-data/lib/fixer.js
@@ -0,0 +1,418 @@
+var semver = require("semver")
+var validateLicense = require('validate-npm-package-license');
+var hostedGitInfo = require("hosted-git-info")
+var isBuiltinModule = require("resolve").isCore
+var depTypes = ["dependencies","devDependencies","optionalDependencies"]
+var extractDescription = require("./extract_description")
+var url = require("url")
+var typos = require("./typos.json")
+
+var fixer = module.exports = {
+ // default warning function
+ warn: function() {},
+
+ fixRepositoryField: function(data) {
+ if (data.repositories) {
+ this.warn("repositories");
+ data.repository = data.repositories[0]
+ }
+ if (!data.repository) return this.warn("missingRepository")
+ if (typeof data.repository === "string") {
+ data.repository = {
+ type: "git",
+ url: data.repository
+ }
+ }
+ var r = data.repository.url || ""
+ if (r) {
+ var hosted = hostedGitInfo.fromUrl(r)
+ if (hosted) {
+ r = data.repository.url
+ = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString()
+ }
+ }
+
+ if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) {
+ this.warn("brokenGitUrl", r)
+ }
+ }
+
+, fixTypos: function(data) {
+ Object.keys(typos.topLevel).forEach(function (d) {
+ if (data.hasOwnProperty(d)) {
+ this.warn("typo", d, typos.topLevel[d])
+ }
+ }, this)
+ }
+
+, fixScriptsField: function(data) {
+ if (!data.scripts) return
+ if (typeof data.scripts !== "object") {
+ this.warn("nonObjectScripts")
+ delete data.scripts
+ return
+ }
+ Object.keys(data.scripts).forEach(function (k) {
+ if (typeof data.scripts[k] !== "string") {
+ this.warn("nonStringScript")
+ delete data.scripts[k]
+ } else if (typos.script[k] && !data.scripts[typos.script[k]]) {
+ this.warn("typo", k, typos.script[k], "scripts")
+ }
+ }, this)
+ }
+
+, fixFilesField: function(data) {
+ var files = data.files
+ if (files && !Array.isArray(files)) {
+ this.warn("nonArrayFiles")
+ delete data.files
+ } else if (data.files) {
+ data.files = data.files.filter(function(file) {
+ if (!file || typeof file !== "string") {
+ this.warn("invalidFilename", file)
+ return false
+ } else {
+ return true
+ }
+ }, this)
+ }
+ }
+
+, fixBinField: function(data) {
+ if (!data.bin) return;
+ if (typeof data.bin === "string") {
+ var b = {}
+ var match
+ if (match = data.name.match(/^@[^/]+[/](.*)$/)) {
+ b[match[1]] = data.bin
+ } else {
+ b[data.name] = data.bin
+ }
+ data.bin = b
+ }
+ }
+
+, fixManField: function(data) {
+ if (!data.man) return;
+ if (typeof data.man === "string") {
+ data.man = [ data.man ]
+ }
+ }
+, fixBundleDependenciesField: function(data) {
+ var bdd = "bundledDependencies"
+ var bd = "bundleDependencies"
+ if (data[bdd] && !data[bd]) {
+ data[bd] = data[bdd]
+ delete data[bdd]
+ }
+ if (data[bd] && !Array.isArray(data[bd])) {
+ this.warn("nonArrayBundleDependencies")
+ delete data[bd]
+ } else if (data[bd]) {
+ data[bd] = data[bd].filter(function(bd) {
+ if (!bd || typeof bd !== 'string') {
+ this.warn("nonStringBundleDependency", bd)
+ return false
+ } else {
+ if (!data.dependencies) {
+ data.dependencies = {}
+ }
+ if (!data.dependencies.hasOwnProperty(bd)) {
+ this.warn("nonDependencyBundleDependency", bd)
+ data.dependencies[bd] = "*"
+ }
+ return true
+ }
+ }, this)
+ }
+ }
+
+, fixDependencies: function(data, strict) {
+ var loose = !strict
+ objectifyDeps(data, this.warn)
+ addOptionalDepsToDeps(data, this.warn)
+ this.fixBundleDependenciesField(data)
+
+ ;['dependencies','devDependencies'].forEach(function(deps) {
+ if (!(deps in data)) return
+ if (!data[deps] || typeof data[deps] !== "object") {
+ this.warn("nonObjectDependencies", deps)
+ delete data[deps]
+ return
+ }
+ Object.keys(data[deps]).forEach(function (d) {
+ var r = data[deps][d]
+ if (typeof r !== 'string') {
+ this.warn("nonStringDependency", d, JSON.stringify(r))
+ delete data[deps][d]
+ }
+ var hosted = hostedGitInfo.fromUrl(data[deps][d])
+ if (hosted) data[deps][d] = hosted.toString()
+ }, this)
+ }, this)
+ }
+
+, fixModulesField: function (data) {
+ if (data.modules) {
+ this.warn("deprecatedModules")
+ delete data.modules
+ }
+ }
+
+, fixKeywordsField: function (data) {
+ if (typeof data.keywords === "string") {
+ data.keywords = data.keywords.split(/,\s+/)
+ }
+ if (data.keywords && !Array.isArray(data.keywords)) {
+ delete data.keywords
+ this.warn("nonArrayKeywords")
+ } else if (data.keywords) {
+ data.keywords = data.keywords.filter(function(kw) {
+ if (typeof kw !== "string" || !kw) {
+ this.warn("nonStringKeyword");
+ return false
+ } else {
+ return true
+ }
+ }, this)
+ }
+ }
+
+, fixVersionField: function(data, strict) {
+ // allow "loose" semver 1.0 versions in non-strict mode
+ // enforce strict semver 2.0 compliance in strict mode
+ var loose = !strict
+ if (!data.version) {
+ data.version = ""
+ return true
+ }
+ if (!semver.valid(data.version, loose)) {
+ throw new Error('Invalid version: "'+ data.version + '"')
+ }
+ data.version = semver.clean(data.version, loose)
+ return true
+ }
+
+, fixPeople: function(data) {
+ modifyPeople(data, unParsePerson)
+ modifyPeople(data, parsePerson)
+ }
+
+, fixNameField: function(data, options) {
+ if (typeof options === "boolean") options = {strict: options}
+ else if (typeof options === "undefined") options = {}
+ var strict = options.strict
+ if (!data.name && !strict) {
+ data.name = ""
+ return
+ }
+ if (typeof data.name !== "string") {
+ throw new Error("name field must be a string.")
+ }
+ if (!strict)
+ data.name = data.name.trim()
+ ensureValidName(data.name, strict, options.allowLegacyCase)
+ if (isBuiltinModule(data.name))
+ this.warn("conflictingName", data.name)
+ }
+
+
+, fixDescriptionField: function (data) {
+ if (data.description && typeof data.description !== 'string') {
+ this.warn("nonStringDescription")
+ delete data.description
+ }
+ if (data.readme && !data.description)
+ data.description = extractDescription(data.readme)
+ if(data.description === undefined) delete data.description;
+ if (!data.description) this.warn("missingDescription")
+ }
+
+, fixReadmeField: function (data) {
+ if (!data.readme) {
+ this.warn("missingReadme")
+ data.readme = "ERROR: No README data found!"
+ }
+ }
+
+, fixBugsField: function(data) {
+ if (!data.bugs && data.repository && data.repository.url) {
+ var hosted = hostedGitInfo.fromUrl(data.repository.url)
+ if(hosted && hosted.bugs()) {
+ data.bugs = {url: hosted.bugs()}
+ }
+ }
+ else if(data.bugs) {
+ var emailRe = /^.+@.*\..+$/
+ if(typeof data.bugs == "string") {
+ if(emailRe.test(data.bugs))
+ data.bugs = {email:data.bugs}
+ else if(url.parse(data.bugs).protocol)
+ data.bugs = {url: data.bugs}
+ else
+ this.warn("nonEmailUrlBugsString")
+ }
+ else {
+ bugsTypos(data.bugs, this.warn)
+ var oldBugs = data.bugs
+ data.bugs = {}
+ if(oldBugs.url) {
+ if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol)
+ data.bugs.url = oldBugs.url
+ else
+ this.warn("nonUrlBugsUrlField")
+ }
+ if(oldBugs.email) {
+ if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email))
+ data.bugs.email = oldBugs.email
+ else
+ this.warn("nonEmailBugsEmailField")
+ }
+ }
+ if(!data.bugs.email && !data.bugs.url) {
+ delete data.bugs
+ this.warn("emptyNormalizedBugs")
+ }
+ }
+ }
+
+, fixHomepageField: function(data) {
+ if (!data.homepage && data.repository && data.repository.url) {
+ var hosted = hostedGitInfo.fromUrl(data.repository.url)
+ if (hosted && hosted.docs()) data.homepage = hosted.docs()
+ }
+ if (!data.homepage) return
+
+ if(typeof data.homepage !== "string") {
+ this.warn("nonUrlHomepage")
+ return delete data.homepage
+ }
+ if(!url.parse(data.homepage).protocol) {
+ data.homepage = "http://" + data.homepage
+ }
+ }
+
+, fixLicenseField: function(data) {
+ if (!data.license) {
+ return this.warn("missingLicense")
+ } else{
+ if (
+ typeof(data.license) !== 'string' ||
+ data.license.length < 1 ||
+ data.license.trim() === ''
+ ) {
+ this.warn("invalidLicense")
+ } else {
+ if (!validateLicense(data.license).validForNewPackages)
+ this.warn("invalidLicense")
+ }
+ }
+ }
+}
+
+function isValidScopedPackageName(spec) {
+ if (spec.charAt(0) !== '@') return false
+
+ var rest = spec.slice(1).split('/')
+ if (rest.length !== 2) return false
+
+ return rest[0] && rest[1] &&
+ rest[0] === encodeURIComponent(rest[0]) &&
+ rest[1] === encodeURIComponent(rest[1])
+}
+
+function isCorrectlyEncodedName(spec) {
+ return !spec.match(/[\/@\s\+%:]/) &&
+ spec === encodeURIComponent(spec)
+}
+
+function ensureValidName (name, strict, allowLegacyCase) {
+ if (name.charAt(0) === "." ||
+ !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) ||
+ (strict && (!allowLegacyCase) && name !== name.toLowerCase()) ||
+ name.toLowerCase() === "node_modules" ||
+ name.toLowerCase() === "favicon.ico") {
+ throw new Error("Invalid name: " + JSON.stringify(name))
+ }
+}
+
+function modifyPeople (data, fn) {
+ if (data.author) data.author = fn(data.author)
+ ;["maintainers", "contributors"].forEach(function (set) {
+ if (!Array.isArray(data[set])) return;
+ data[set] = data[set].map(fn)
+ })
+ return data
+}
+
+function unParsePerson (person) {
+ if (typeof person === "string") return person
+ var name = person.name || ""
+ var u = person.url || person.web
+ var url = u ? (" ("+u+")") : ""
+ var e = person.email || person.mail
+ var email = e ? (" <"+e+">") : ""
+ return name+email+url
+}
+
+function parsePerson (person) {
+ if (typeof person !== "string") return person
+ var name = person.match(/^([^\(<]+)/)
+ var url = person.match(/\(([^\)]+)\)/)
+ var email = person.match(/<([^>]+)>/)
+ var obj = {}
+ if (name && name[0].trim()) obj.name = name[0].trim()
+ if (email) obj.email = email[1];
+ if (url) obj.url = url[1];
+ return obj
+}
+
+function addOptionalDepsToDeps (data, warn) {
+ var o = data.optionalDependencies
+ if (!o) return;
+ var d = data.dependencies || {}
+ Object.keys(o).forEach(function (k) {
+ d[k] = o[k]
+ })
+ data.dependencies = d
+}
+
+function depObjectify (deps, type, warn) {
+ if (!deps) return {}
+ if (typeof deps === "string") {
+ deps = deps.trim().split(/[\n\r\s\t ,]+/)
+ }
+ if (!Array.isArray(deps)) return deps
+ warn("deprecatedArrayDependencies", type)
+ var o = {}
+ deps.filter(function (d) {
+ return typeof d === "string"
+ }).forEach(function(d) {
+ d = d.trim().split(/(:?[@\s><=])/)
+ var dn = d.shift()
+ var dv = d.join("")
+ dv = dv.trim()
+ dv = dv.replace(/^@/, "")
+ o[dn] = dv
+ })
+ return o
+}
+
+function objectifyDeps (data, warn) {
+ depTypes.forEach(function (type) {
+ if (!data[type]) return;
+ data[type] = depObjectify(data[type], type, warn)
+ })
+}
+
+function bugsTypos(bugs, warn) {
+ if (!bugs) return
+ Object.keys(bugs).forEach(function (k) {
+ if (typos.bugs[k]) {
+ warn("typo", k, typos.bugs[k], "bugs")
+ bugs[typos.bugs[k]] = bugs[k]
+ delete bugs[k]
+ }
+ })
+}
diff --git a/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/normalize-package-data/lib/make_warning.js
new file mode 100644
index 0000000..4ac74ad
--- /dev/null
+++ b/node_modules/normalize-package-data/lib/make_warning.js
@@ -0,0 +1,23 @@
+var util = require("util")
+var messages = require("./warning_messages.json")
+
+module.exports = function() {
+ var args = Array.prototype.slice.call(arguments, 0)
+ var warningName = args.shift()
+ if (warningName == "typo") {
+ return makeTypoWarning.apply(null,args)
+ }
+ else {
+ var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"
+ args.unshift(msgTemplate)
+ return util.format.apply(null, args)
+ }
+}
+
+function makeTypoWarning (providedName, probableName, field) {
+ if (field) {
+ providedName = field + "['" + providedName + "']"
+ probableName = field + "['" + probableName + "']"
+ }
+ return util.format(messages.typo, providedName, probableName)
+}
diff --git a/node_modules/normalize-package-data/lib/normalize.js b/node_modules/normalize-package-data/lib/normalize.js
new file mode 100644
index 0000000..bd1bfef
--- /dev/null
+++ b/node_modules/normalize-package-data/lib/normalize.js
@@ -0,0 +1,39 @@
+module.exports = normalize
+
+var fixer = require("./fixer")
+normalize.fixer = fixer
+
+var makeWarning = require("./make_warning")
+
+var fieldsToFix = ['name','version','description','repository','modules','scripts'
+ ,'files','bin','man','bugs','keywords','readme','homepage','license']
+var otherThingsToFix = ['dependencies','people', 'typos']
+
+var thingsToFix = fieldsToFix.map(function(fieldName) {
+ return ucFirst(fieldName) + "Field"
+})
+// two ways to do this in CoffeeScript on only one line, sub-70 chars:
+// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field"
+// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix)
+thingsToFix = thingsToFix.concat(otherThingsToFix)
+
+function normalize (data, warn, strict) {
+ if(warn === true) warn = null, strict = true
+ if(!strict) strict = false
+ if(!warn || data.private) warn = function(msg) { /* noop */ }
+
+ if (data.scripts &&
+ data.scripts.install === "node-gyp rebuild" &&
+ !data.scripts.preinstall) {
+ data.gypfile = true
+ }
+ fixer.warn = function() { warn(makeWarning.apply(null, arguments)) }
+ thingsToFix.forEach(function(thingName) {
+ fixer["fix" + ucFirst(thingName)](data, strict)
+ })
+ data._id = data.name + "@" + data.version
+}
+
+function ucFirst (string) {
+ return string.charAt(0).toUpperCase() + string.slice(1);
+}
diff --git a/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/normalize-package-data/lib/safe_format.js
new file mode 100644
index 0000000..b07f100
--- /dev/null
+++ b/node_modules/normalize-package-data/lib/safe_format.js
@@ -0,0 +1,9 @@
+var util = require('util')
+
+module.exports = function() {
+ var args = Array.prototype.slice.call(arguments, 0)
+ args.forEach(function(arg) {
+ if (!arg) throw new TypeError('Bad arguments.')
+ })
+ return util.format.apply(null, arguments)
+}
diff --git a/node_modules/normalize-package-data/lib/typos.json b/node_modules/normalize-package-data/lib/typos.json
new file mode 100644
index 0000000..7f9dd28
--- /dev/null
+++ b/node_modules/normalize-package-data/lib/typos.json
@@ -0,0 +1,25 @@
+{
+ "topLevel": {
+ "dependancies": "dependencies"
+ ,"dependecies": "dependencies"
+ ,"depdenencies": "dependencies"
+ ,"devEependencies": "devDependencies"
+ ,"depends": "dependencies"
+ ,"dev-dependencies": "devDependencies"
+ ,"devDependences": "devDependencies"
+ ,"devDepenencies": "devDependencies"
+ ,"devdependencies": "devDependencies"
+ ,"repostitory": "repository"
+ ,"repo": "repository"
+ ,"prefereGlobal": "preferGlobal"
+ ,"hompage": "homepage"
+ ,"hampage": "homepage"
+ ,"autohr": "author"
+ ,"autor": "author"
+ ,"contributers": "contributors"
+ ,"publicationConfig": "publishConfig"
+ ,"script": "scripts"
+ },
+ "bugs": { "web": "url", "name": "url" },
+ "script": { "server": "start", "tests": "test" }
+}
diff --git a/node_modules/normalize-package-data/lib/warning_messages.json b/node_modules/normalize-package-data/lib/warning_messages.json
new file mode 100644
index 0000000..4890f50
--- /dev/null
+++ b/node_modules/normalize-package-data/lib/warning_messages.json
@@ -0,0 +1,30 @@
+{
+ "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field"
+ ,"missingRepository": "No repository field."
+ ,"brokenGitUrl": "Probably broken git url: %s"
+ ,"nonObjectScripts": "scripts must be an object"
+ ,"nonStringScript": "script values must be string commands"
+ ,"nonArrayFiles": "Invalid 'files' member"
+ ,"invalidFilename": "Invalid filename in 'files' list: %s"
+ ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names"
+ ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s"
+ ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s"
+ ,"nonObjectDependencies": "%s field must be an object"
+ ,"nonStringDependency": "Invalid dependency: %s %s"
+ ,"deprecatedArrayDependencies": "specifying %s as array is deprecated"
+ ,"deprecatedModules": "modules field is deprecated"
+ ,"nonArrayKeywords": "keywords should be an array of strings"
+ ,"nonStringKeyword": "keywords should be an array of strings"
+ ,"conflictingName": "%s is also the name of a node core module."
+ ,"nonStringDescription": "'description' field should be a string"
+ ,"missingDescription": "No description"
+ ,"missingReadme": "No README data"
+ ,"missingLicense": "No license field."
+ ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}"
+ ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted."
+ ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted."
+ ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted."
+ ,"nonUrlHomepage": "homepage field must be a string url. Deleted."
+ ,"invalidLicense": "license should be a valid SPDX license expression"
+ ,"typo": "%s should probably be %s."
+}
diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json
new file mode 100644
index 0000000..dea34bb
--- /dev/null
+++ b/node_modules/normalize-package-data/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "normalize-package-data",
+ "version": "2.5.0",
+ "author": "Meryn Stol <merynstol@gmail.com>",
+ "description": "Normalizes data that can be found in package.json files.",
+ "license": "BSD-2-Clause",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/npm/normalize-package-data.git"
+ },
+ "main": "lib/normalize.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ },
+ "devDependencies": {
+ "async": "^2.6.1",
+ "tap": "^12.4.0",
+ "underscore": "^1.8.3"
+ },
+ "files": [
+ "lib/*.js",
+ "lib/*.json",
+ "AUTHORS"
+ ]
+}
diff --git a/node_modules/normalize-url/index.d.ts b/node_modules/normalize-url/index.d.ts
new file mode 100644
index 0000000..ca40f8f
--- /dev/null
+++ b/node_modules/normalize-url/index.d.ts
@@ -0,0 +1,267 @@
+declare namespace normalizeUrl {
+ interface Options {
+ /**
+ @default 'http:'
+ */
+ readonly defaultProtocol?: string;
+
+ /**
+ Prepends `defaultProtocol` to the URL if it's protocol-relative.
+
+ @default true
+
+ @example
+ ```
+ normalizeUrl('//sindresorhus.com:80/');
+ //=> 'http://sindresorhus.com'
+
+ normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});
+ //=> '//sindresorhus.com'
+ ```
+ */
+ readonly normalizeProtocol?: boolean;
+
+ /**
+ Normalizes `https:` URLs to `http:`.
+
+ @default false
+
+ @example
+ ```
+ normalizeUrl('https://sindresorhus.com:80/');
+ //=> 'https://sindresorhus.com'
+
+ normalizeUrl('https://sindresorhus.com:80/', {forceHttp: true});
+ //=> 'http://sindresorhus.com'
+ ```
+ */
+ readonly forceHttp?: boolean;
+
+ /**
+ Normalizes `http:` URLs to `https:`.
+
+ This option can't be used with the `forceHttp` option at the same time.
+
+ @default false
+
+ @example
+ ```
+ normalizeUrl('https://sindresorhus.com:80/');
+ //=> 'https://sindresorhus.com'
+
+ normalizeUrl('http://sindresorhus.com:80/', {forceHttps: true});
+ //=> 'https://sindresorhus.com'
+ ```
+ */
+ readonly forceHttps?: boolean;
+
+ /**
+ Strip the [authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) part of a URL.
+
+ @default true
+
+ @example
+ ```
+ normalizeUrl('user:password@sindresorhus.com');
+ //=> 'https://sindresorhus.com'
+
+ normalizeUrl('user:password@sindresorhus.com', {stripAuthentication: false});
+ //=> 'https://user:password@sindresorhus.com'
+ ```
+ */
+ readonly stripAuthentication?: boolean;
+
+ /**
+ Removes hash from the URL.
+
+ @default false
+
+ @example
+ ```
+ normalizeUrl('sindresorhus.com/about.html#contact');
+ //=> 'http://sindresorhus.com/about.html#contact'
+
+ normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
+ //=> 'http://sindresorhus.com/about.html'
+ ```
+ */
+ readonly stripHash?: boolean;
+
+ /**
+ Removes HTTP(S) protocol from an URL `http://sindresorhus.com` → `sindresorhus.com`.
+
+ @default false
+
+ @example
+ ```
+ normalizeUrl('https://sindresorhus.com');
+ //=> 'https://sindresorhus.com'
+
+ normalizeUrl('sindresorhus.com', {stripProtocol: true});
+ //=> 'sindresorhus.com'
+ ```
+ */
+ readonly stripProtocol?: boolean;
+
+ /**
+ Strip the [text fragment](https://web.dev/text-fragments/) part of the URL
+
+ __Note:__ The text fragment will always be removed if the `stripHash` option is set to `true`, as the hash contains the text fragment.
+
+ @default true
+
+ @example
+ ```
+ normalizeUrl('http://sindresorhus.com/about.html#:~:text=hello');
+ //=> 'http://sindresorhus.com/about.html#'
+
+ normalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello');
+ //=> 'http://sindresorhus.com/about.html#section'
+
+ normalizeUrl('http://sindresorhus.com/about.html#:~:text=hello', {stripTextFragment: false});
+ //=> 'http://sindresorhus.com/about.html#:~:text=hello'
+
+ normalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello', {stripTextFragment: false});
+ //=> 'http://sindresorhus.com/about.html#section:~:text=hello'
+ ```
+ */
+ readonly stripTextFragment?: boolean;
+
+ /**
+ Removes `www.` from the URL.
+
+ @default true
+
+ @example
+ ```
+ normalizeUrl('http://www.sindresorhus.com');
+ //=> 'http://sindresorhus.com'
+
+ normalizeUrl('http://www.sindresorhus.com', {stripWWW: false});
+ //=> 'http://www.sindresorhus.com'
+ ```
+ */
+ readonly stripWWW?: boolean;
+
+ /**
+ Removes query parameters that matches any of the provided strings or regexes.
+
+ @default [/^utm_\w+/i]
+
+ @example
+ ```
+ normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
+ removeQueryParameters: ['ref']
+ });
+ //=> 'http://sindresorhus.com/?foo=bar'
+ ```
+
+ If a boolean is provided, `true` will remove all the query parameters.
+
+ ```
+ normalizeUrl('www.sindresorhus.com?foo=bar', {
+ removeQueryParameters: true
+ });
+ //=> 'http://sindresorhus.com'
+ ```
+
+ `false` will not remove any query parameter.
+
+ ```
+ normalizeUrl('www.sindresorhus.com?foo=bar&utm_medium=test&ref=test_ref', {
+ removeQueryParameters: false
+ });
+ //=> 'http://www.sindresorhus.com/?foo=bar&ref=test_ref&utm_medium=test'
+ ```
+ */
+ readonly removeQueryParameters?: ReadonlyArray<RegExp | string> | boolean;
+
+ /**
+ Removes trailing slash.
+
+ __Note__: Trailing slash is always removed if the URL doesn't have a pathname unless the `removeSingleSlash` option is set to `false`.
+
+ @default true
+
+ @example
+ ```
+ normalizeUrl('http://sindresorhus.com/redirect/');
+ //=> 'http://sindresorhus.com/redirect'
+
+ normalizeUrl('http://sindresorhus.com/redirect/', {removeTrailingSlash: false});
+ //=> 'http://sindresorhus.com/redirect/'
+
+ normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});
+ //=> 'http://sindresorhus.com'
+ ```
+ */
+ readonly removeTrailingSlash?: boolean;
+
+ /**
+ Remove a sole `/` pathname in the output. This option is independant of `removeTrailingSlash`.
+
+ @default true
+
+ @example
+ ```
+ normalizeUrl('https://sindresorhus.com/');
+ //=> 'https://sindresorhus.com'
+
+ normalizeUrl('https://sindresorhus.com/', {removeSingleSlash: false});
+ //=> 'https://sindresorhus.com/'
+ ```
+ */
+ readonly removeSingleSlash?: boolean;
+
+ /**
+ Removes the default directory index file from path that matches any of the provided strings or regexes.
+ When `true`, the regex `/^index\.[a-z]+$/` is used.
+
+ @default false
+
+ @example
+ ```
+ normalizeUrl('www.sindresorhus.com/foo/default.php', {
+ removeDirectoryIndex: [/^default\.[a-z]+$/]
+ });
+ //=> 'http://sindresorhus.com/foo'
+ ```
+ */
+ readonly removeDirectoryIndex?: ReadonlyArray<RegExp | string>;
+
+ /**
+ Sorts the query parameters alphabetically by key.
+
+ @default true
+
+ @example
+ ```
+ normalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', {
+ sortQueryParameters: false
+ });
+ //=> 'http://sindresorhus.com/?b=two&a=one&c=three'
+ ```
+ */
+ readonly sortQueryParameters?: boolean;
+ }
+}
+
+/**
+[Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL.
+
+@param url - URL to normalize, including [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs).
+
+@example
+```
+import normalizeUrl = require('normalize-url');
+
+normalizeUrl('sindresorhus.com');
+//=> 'http://sindresorhus.com'
+
+normalizeUrl('//www.sindresorhus.com:80/../baz?b=bar&a=foo');
+//=> 'http://sindresorhus.com/baz?a=foo&b=bar'
+```
+*/
+declare function normalizeUrl(url: string, options?: normalizeUrl.Options): string;
+
+export = normalizeUrl;
diff --git a/node_modules/normalize-url/index.js b/node_modules/normalize-url/index.js
new file mode 100644
index 0000000..c9340ab
--- /dev/null
+++ b/node_modules/normalize-url/index.js
@@ -0,0 +1,216 @@
+'use strict';
+
+// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
+const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain';
+const DATA_URL_DEFAULT_CHARSET = 'us-ascii';
+
+const testParameter = (name, filters) => {
+ return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name);
+};
+
+const normalizeDataURL = (urlString, {stripHash}) => {
+ const match = /^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(urlString);
+
+ if (!match) {
+ throw new Error(`Invalid URL: ${urlString}`);
+ }
+
+ let {type, data, hash} = match.groups;
+ const mediaType = type.split(';');
+ hash = stripHash ? '' : hash;
+
+ let isBase64 = false;
+ if (mediaType[mediaType.length - 1] === 'base64') {
+ mediaType.pop();
+ isBase64 = true;
+ }
+
+ // Lowercase MIME type
+ const mimeType = (mediaType.shift() || '').toLowerCase();
+ const attributes = mediaType
+ .map(attribute => {
+ let [key, value = ''] = attribute.split('=').map(string => string.trim());
+
+ // Lowercase `charset`
+ if (key === 'charset') {
+ value = value.toLowerCase();
+
+ if (value === DATA_URL_DEFAULT_CHARSET) {
+ return '';
+ }
+ }
+
+ return `${key}${value ? `=${value}` : ''}`;
+ })
+ .filter(Boolean);
+
+ const normalizedMediaType = [
+ ...attributes
+ ];
+
+ if (isBase64) {
+ normalizedMediaType.push('base64');
+ }
+
+ if (normalizedMediaType.length !== 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) {
+ normalizedMediaType.unshift(mimeType);
+ }
+
+ return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`;
+};
+
+const normalizeUrl = (urlString, options) => {
+ options = {
+ defaultProtocol: 'http:',
+ normalizeProtocol: true,
+ forceHttp: false,
+ forceHttps: false,
+ stripAuthentication: true,
+ stripHash: false,
+ stripTextFragment: true,
+ stripWWW: true,
+ removeQueryParameters: [/^utm_\w+/i],
+ removeTrailingSlash: true,
+ removeSingleSlash: true,
+ removeDirectoryIndex: false,
+ sortQueryParameters: true,
+ ...options
+ };
+
+ urlString = urlString.trim();
+
+ // Data URL
+ if (/^data:/i.test(urlString)) {
+ return normalizeDataURL(urlString, options);
+ }
+
+ if (/^view-source:/i.test(urlString)) {
+ throw new Error('`view-source:` is not supported as it is a non-standard protocol');
+ }
+
+ const hasRelativeProtocol = urlString.startsWith('//');
+ const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString);
+
+ // Prepend protocol
+ if (!isRelativeUrl) {
+ urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol);
+ }
+
+ const urlObj = new URL(urlString);
+
+ if (options.forceHttp && options.forceHttps) {
+ throw new Error('The `forceHttp` and `forceHttps` options cannot be used together');
+ }
+
+ if (options.forceHttp && urlObj.protocol === 'https:') {
+ urlObj.protocol = 'http:';
+ }
+
+ if (options.forceHttps && urlObj.protocol === 'http:') {
+ urlObj.protocol = 'https:';
+ }
+
+ // Remove auth
+ if (options.stripAuthentication) {
+ urlObj.username = '';
+ urlObj.password = '';
+ }
+
+ // Remove hash
+ if (options.stripHash) {
+ urlObj.hash = '';
+ } else if (options.stripTextFragment) {
+ urlObj.hash = urlObj.hash.replace(/#?:~:text.*?$/i, '');
+ }
+
+ // Remove duplicate slashes if not preceded by a protocol
+ if (urlObj.pathname) {
+ urlObj.pathname = urlObj.pathname.replace(/(?<!\b(?:[a-z][a-z\d+\-.]{1,50}:))\/{2,}/g, '/');
+ }
+
+ // Decode URI octets
+ if (urlObj.pathname) {
+ try {
+ urlObj.pathname = decodeURI(urlObj.pathname);
+ } catch (_) {}
+ }
+
+ // Remove directory index
+ if (options.removeDirectoryIndex === true) {
+ options.removeDirectoryIndex = [/^index\.[a-z]+$/];
+ }
+
+ if (Array.isArray(options.removeDirectoryIndex) && options.removeDirectoryIndex.length > 0) {
+ let pathComponents = urlObj.pathname.split('/');
+ const lastComponent = pathComponents[pathComponents.length - 1];
+
+ if (testParameter(lastComponent, options.removeDirectoryIndex)) {
+ pathComponents = pathComponents.slice(0, pathComponents.length - 1);
+ urlObj.pathname = pathComponents.slice(1).join('/') + '/';
+ }
+ }
+
+ if (urlObj.hostname) {
+ // Remove trailing dot
+ urlObj.hostname = urlObj.hostname.replace(/\.$/, '');
+
+ // Remove `www.`
+ if (options.stripWWW && /^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(urlObj.hostname)) {
+ // Each label should be max 63 at length (min: 1).
+ // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names
+ // Each TLD should be up to 63 characters long (min: 2).
+ // It is technically possible to have a single character TLD, but none currently exist.
+ urlObj.hostname = urlObj.hostname.replace(/^www\./, '');
+ }
+ }
+
+ // Remove query unwanted parameters
+ if (Array.isArray(options.removeQueryParameters)) {
+ for (const key of [...urlObj.searchParams.keys()]) {
+ if (testParameter(key, options.removeQueryParameters)) {
+ urlObj.searchParams.delete(key);
+ }
+ }
+ }
+
+ if (options.removeQueryParameters === true) {
+ urlObj.search = '';
+ }
+
+ // Sort query parameters
+ if (options.sortQueryParameters) {
+ urlObj.searchParams.sort();
+ }
+
+ if (options.removeTrailingSlash) {
+ urlObj.pathname = urlObj.pathname.replace(/\/$/, '');
+ }
+
+ const oldUrlString = urlString;
+
+ // Take advantage of many of the Node `url` normalizations
+ urlString = urlObj.toString();
+
+ if (!options.removeSingleSlash && urlObj.pathname === '/' && !oldUrlString.endsWith('/') && urlObj.hash === '') {
+ urlString = urlString.replace(/\/$/, '');
+ }
+
+ // Remove ending `/` unless removeSingleSlash is false
+ if ((options.removeTrailingSlash || urlObj.pathname === '/') && urlObj.hash === '' && options.removeSingleSlash) {
+ urlString = urlString.replace(/\/$/, '');
+ }
+
+ // Restore relative protocol, if applicable
+ if (hasRelativeProtocol && !options.normalizeProtocol) {
+ urlString = urlString.replace(/^http:\/\//, '//');
+ }
+
+ // Remove http/https
+ if (options.stripProtocol) {
+ urlString = urlString.replace(/^(?:https?:)?\/\//, '');
+ }
+
+ return urlString;
+};
+
+module.exports = normalizeUrl;
diff --git a/node_modules/normalize-url/license b/node_modules/normalize-url/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/normalize-url/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/normalize-url/package.json b/node_modules/normalize-url/package.json
new file mode 100644
index 0000000..2670e4a
--- /dev/null
+++ b/node_modules/normalize-url/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "normalize-url",
+ "version": "6.1.0",
+ "description": "Normalize a URL",
+ "license": "MIT",
+ "repository": "sindresorhus/normalize-url",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && nyc ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "normalize",
+ "url",
+ "uri",
+ "address",
+ "string",
+ "normalization",
+ "normalisation",
+ "query",
+ "querystring",
+ "simplify",
+ "strip",
+ "trim",
+ "canonical"
+ ],
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "nyc": "^15.0.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.25.3"
+ },
+ "nyc": {
+ "reporter": [
+ "text",
+ "lcov"
+ ]
+ }
+}
diff --git a/node_modules/normalize-url/readme.md b/node_modules/normalize-url/readme.md
new file mode 100644
index 0000000..4b29b29
--- /dev/null
+++ b/node_modules/normalize-url/readme.md
@@ -0,0 +1,286 @@
+# normalize-url [![Coverage Status](https://codecov.io/gh/sindresorhus/normalize-url/branch/main/graph/badge.svg)](https://codecov.io/gh/sindresorhus/normalize-url)
+
+> [Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL
+
+Useful when you need to display, store, deduplicate, sort, compare, etc, URLs.
+
+## Install
+
+```
+$ npm install normalize-url
+```
+
+*If you need to use this in the browser, use version 4: `npm i normalize-url@4`*
+
+## Usage
+
+```js
+const normalizeUrl = require('normalize-url');
+
+normalizeUrl('sindresorhus.com');
+//=> 'http://sindresorhus.com'
+
+normalizeUrl('//www.sindresorhus.com:80/../baz?b=bar&a=foo');
+//=> 'http://sindresorhus.com/baz?a=foo&b=bar'
+```
+
+## API
+
+### normalizeUrl(url, options?)
+
+#### url
+
+Type: `string`
+
+URL to normalize, including [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs).
+
+#### options
+
+Type: `object`
+
+##### defaultProtocol
+
+Type: `string`\
+Default: `http:`
+
+##### normalizeProtocol
+
+Type: `boolean`\
+Default: `true`
+
+Prepend `defaultProtocol` to the URL if it's protocol-relative.
+
+```js
+normalizeUrl('//sindresorhus.com:80/');
+//=> 'http://sindresorhus.com'
+
+normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});
+//=> '//sindresorhus.com'
+```
+
+##### forceHttp
+
+Type: `boolean`\
+Default: `false`
+
+Normalize `https:` to `http:`.
+
+```js
+normalizeUrl('https://sindresorhus.com:80/');
+//=> 'https://sindresorhus.com'
+
+normalizeUrl('https://sindresorhus.com:80/', {forceHttp: true});
+//=> 'http://sindresorhus.com'
+```
+
+##### forceHttps
+
+Type: `boolean`\
+Default: `false`
+
+Normalize `http:` to `https:`.
+
+```js
+normalizeUrl('https://sindresorhus.com:80/');
+//=> 'https://sindresorhus.com'
+
+normalizeUrl('http://sindresorhus.com:80/', {forceHttps: true});
+//=> 'https://sindresorhus.com'
+```
+
+This option can't be used with the `forceHttp` option at the same time.
+
+##### stripAuthentication
+
+Type: `boolean`\
+Default: `true`
+
+Strip the [authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) part of the URL.
+
+```js
+normalizeUrl('user:password@sindresorhus.com');
+//=> 'https://sindresorhus.com'
+
+normalizeUrl('user:password@sindresorhus.com', {stripAuthentication: false});
+//=> 'https://user:password@sindresorhus.com'
+```
+
+##### stripHash
+
+Type: `boolean`\
+Default: `false`
+
+Strip the hash part of the URL.
+
+```js
+normalizeUrl('sindresorhus.com/about.html#contact');
+//=> 'http://sindresorhus.com/about.html#contact'
+
+normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
+//=> 'http://sindresorhus.com/about.html'
+```
+
+##### stripProtocol
+
+Type: `boolean`\
+Default: `false`
+
+Remove HTTP(S) protocol from the URL: `http://sindresorhus.com` → `sindresorhus.com`.
+
+```js
+normalizeUrl('https://sindresorhus.com');
+//=> 'https://sindresorhus.com'
+
+normalizeUrl('https://sindresorhus.com', {stripProtocol: true});
+//=> 'sindresorhus.com'
+```
+
+##### stripTextFragment
+
+Type: `boolean`\
+Default: `true`
+
+Strip the [text fragment](https://web.dev/text-fragments/) part of the URL.
+
+**Note:** The text fragment will always be removed if the `stripHash` option is set to `true`, as the hash contains the text fragment.
+
+```js
+normalizeUrl('http://sindresorhus.com/about.html#:~:text=hello');
+//=> 'http://sindresorhus.com/about.html#'
+
+normalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello');
+//=> 'http://sindresorhus.com/about.html#section'
+
+normalizeUrl('http://sindresorhus.com/about.html#:~:text=hello', {stripTextFragment: false});
+//=> 'http://sindresorhus.com/about.html#:~:text=hello'
+
+normalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello', {stripTextFragment: false});
+//=> 'http://sindresorhus.com/about.html#section:~:text=hello'
+```
+
+##### stripWWW
+
+Type: `boolean`\
+Default: `true`
+
+Remove `www.` from the URL.
+
+```js
+normalizeUrl('http://www.sindresorhus.com');
+//=> 'http://sindresorhus.com'
+
+normalizeUrl('http://www.sindresorhus.com', {stripWWW: false});
+//=> 'http://www.sindresorhus.com'
+```
+
+##### removeQueryParameters
+
+Type: `Array<RegExp | string> | boolean`\
+Default: `[/^utm_\w+/i]`
+
+Remove query parameters that matches any of the provided strings or regexes.
+
+```js
+normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
+ removeQueryParameters: ['ref']
+});
+//=> 'http://sindresorhus.com/?foo=bar'
+```
+
+If a boolean is provided, `true` will remove all the query parameters.
+
+```js
+normalizeUrl('www.sindresorhus.com?foo=bar', {
+ removeQueryParameters: true
+});
+//=> 'http://sindresorhus.com'
+```
+
+`false` will not remove any query parameter.
+
+```js
+normalizeUrl('www.sindresorhus.com?foo=bar&utm_medium=test&ref=test_ref', {
+ removeQueryParameters: false
+});
+//=> 'http://www.sindresorhus.com/?foo=bar&ref=test_ref&utm_medium=test'
+```
+
+##### removeTrailingSlash
+
+Type: `boolean`\
+Default: `true`
+
+Remove trailing slash.
+
+**Note:** Trailing slash is always removed if the URL doesn't have a pathname unless the `removeSingleSlash` option is set to `false`.
+
+```js
+normalizeUrl('http://sindresorhus.com/redirect/');
+//=> 'http://sindresorhus.com/redirect'
+
+normalizeUrl('http://sindresorhus.com/redirect/', {removeTrailingSlash: false});
+//=> 'http://sindresorhus.com/redirect/'
+
+normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});
+//=> 'http://sindresorhus.com'
+```
+
+##### removeSingleSlash
+
+Type: `boolean`\
+Default: `true`
+
+Remove a sole `/` pathname in the output. This option is independant of `removeTrailingSlash`.
+
+```js
+normalizeUrl('https://sindresorhus.com/');
+//=> 'https://sindresorhus.com'
+
+normalizeUrl('https://sindresorhus.com/', {removeSingleSlash: false});
+//=> 'https://sindresorhus.com/'
+```
+
+
+##### removeDirectoryIndex
+
+Type: `boolean | Array<RegExp | string>`\
+Default: `false`
+
+Removes the default directory index file from path that matches any of the provided strings or regexes. When `true`, the regex `/^index\.[a-z]+$/` is used.
+
+```js
+normalizeUrl('www.sindresorhus.com/foo/default.php', {
+ removeDirectoryIndex: [/^default\.[a-z]+$/]
+});
+//=> 'http://sindresorhus.com/foo'
+```
+
+##### sortQueryParameters
+
+Type: `boolean`\
+Default: `true`
+
+Sorts the query parameters alphabetically by key.
+
+```js
+normalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', {
+ sortQueryParameters: false
+});
+//=> 'http://sindresorhus.com/?b=two&a=one&c=three'
+```
+
+## Related
+
+- [compare-urls](https://github.com/sindresorhus/compare-urls) - Compare URLs by first normalizing them
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-normalize-url?utm_source=npm-normalize-url&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/npm-conf/index.js b/node_modules/npm-conf/index.js
new file mode 100644
index 0000000..ee735e1
--- /dev/null
+++ b/node_modules/npm-conf/index.js
@@ -0,0 +1,43 @@
+'use strict';
+const path = require('path');
+const Conf = require('./lib/conf');
+const defaults = require('./lib/defaults');
+
+// https://github.com/npm/npm/blob/latest/lib/config/core.js#L101-L200
+module.exports = opts => {
+ const conf = new Conf(Object.assign({}, defaults.defaults));
+
+ conf.add(Object.assign({}, opts), 'cli');
+ conf.addEnv();
+ conf.loadPrefix();
+
+ const projectConf = path.resolve(conf.localPrefix, '.npmrc');
+ const userConf = conf.get('userconfig');
+
+ if (!conf.get('global') && projectConf !== userConf) {
+ conf.addFile(projectConf, 'project');
+ } else {
+ conf.add({}, 'project');
+ }
+
+ conf.addFile(conf.get('userconfig'), 'user');
+
+ if (conf.get('prefix')) {
+ const etc = path.resolve(conf.get('prefix'), 'etc');
+ conf.root.globalconfig = path.resolve(etc, 'npmrc');
+ conf.root.globalignorefile = path.resolve(etc, 'npmignore');
+ }
+
+ conf.addFile(conf.get('globalconfig'), 'global');
+ conf.loadUser();
+
+ const caFile = conf.get('cafile');
+
+ if (caFile) {
+ conf.loadCAFile(caFile);
+ }
+
+ return conf;
+};
+
+module.exports.defaults = Object.assign({}, defaults.defaults);
diff --git a/node_modules/npm-conf/lib/conf.js b/node_modules/npm-conf/lib/conf.js
new file mode 100644
index 0000000..b2a8f0a
--- /dev/null
+++ b/node_modules/npm-conf/lib/conf.js
@@ -0,0 +1,174 @@
+'use strict';
+const fs = require('fs');
+const path = require('path');
+const ConfigChain = require('config-chain').ConfigChain;
+const util = require('./util');
+
+class Conf extends ConfigChain {
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L208-L222
+ constructor(base) {
+ super(base);
+ this.root = base;
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L332-L342
+ add(data, marker) {
+ try {
+ for (const x of Object.keys(data)) {
+ data[x] = util.parseField(data[x], x);
+ }
+ } catch (err) {
+ throw err;
+ }
+
+ return super.add(data, marker);
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L312-L325
+ addFile(file, name) {
+ name = name || file;
+
+ const marker = {__source__: name};
+
+ this.sources[name] = {path: file, type: 'ini'};
+ this.push(marker);
+ this._await();
+
+ try {
+ const contents = fs.readFileSync(file, 'utf8');
+ this.addString(contents, file, 'ini', marker);
+ } catch (err) {
+ this.add({}, marker);
+ }
+
+ return this;
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/core.js#L344-L360
+ addEnv(env) {
+ env = env || process.env;
+
+ const conf = {};
+
+ Object.keys(env)
+ .filter(x => /^npm_config_/i.test(x))
+ .forEach(x => {
+ if (!env[x]) {
+ return;
+ }
+
+ const p = x.toLowerCase()
+ .replace(/^npm_config_/, '')
+ .replace(/(?!^)_/g, '-');
+
+ conf[p] = env[x];
+ });
+
+ return super.addEnv('', conf, 'env');
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/load-prefix.js
+ loadPrefix() {
+ const cli = this.list[0];
+
+ Object.defineProperty(this, 'prefix', {
+ enumerable: true,
+ set: prefix => {
+ const g = this.get('global');
+ this[g ? 'globalPrefix' : 'localPrefix'] = prefix;
+ },
+ get: () => {
+ const g = this.get('global');
+ return g ? this.globalPrefix : this.localPrefix;
+ }
+ });
+
+ Object.defineProperty(this, 'globalPrefix', {
+ enumerable: true,
+ set: prefix => {
+ this.set('prefix', prefix);
+ },
+ get: () => {
+ return path.resolve(this.get('prefix'));
+ }
+ });
+
+ let p;
+
+ Object.defineProperty(this, 'localPrefix', {
+ enumerable: true,
+ set: prefix => {
+ p = prefix;
+ },
+ get: () => {
+ return p;
+ }
+ });
+
+ if (Object.prototype.hasOwnProperty.call(cli, 'prefix')) {
+ p = path.resolve(cli.prefix);
+ } else {
+ try {
+ const prefix = util.findPrefix(process.cwd());
+ p = prefix;
+ } catch (err) {
+ throw err;
+ }
+ }
+
+ return p;
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/load-cafile.js
+ loadCAFile(file) {
+ if (!file) {
+ return;
+ }
+
+ try {
+ const contents = fs.readFileSync(file, 'utf8');
+ const delim = '-----END CERTIFICATE-----';
+ const output = contents
+ .split(delim)
+ .filter(x => Boolean(x.trim()))
+ .map(x => x.trimLeft() + delim);
+
+ this.set('ca', output);
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return;
+ }
+
+ throw err;
+ }
+ }
+
+ // https://github.com/npm/npm/blob/latest/lib/config/set-user.js
+ loadUser() {
+ const defConf = this.root;
+
+ if (this.get('global')) {
+ return;
+ }
+
+ if (process.env.SUDO_UID) {
+ defConf.user = Number(process.env.SUDO_UID);
+ return;
+ }
+
+ const prefix = path.resolve(this.get('prefix'));
+
+ try {
+ const stats = fs.statSync(prefix);
+ defConf.user = stats.uid;
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return;
+ }
+
+ throw err;
+ }
+ }
+}
+
+module.exports = Conf;
diff --git a/node_modules/npm-conf/lib/defaults.js b/node_modules/npm-conf/lib/defaults.js
new file mode 100644
index 0000000..6c0db4a
--- /dev/null
+++ b/node_modules/npm-conf/lib/defaults.js
@@ -0,0 +1,169 @@
+
+ // Generated with `lib/make.js`
+ 'use strict';
+ const os = require('os');
+ const path = require('path');
+
+ const temp = os.tmpdir();
+ const uidOrPid = process.getuid ? process.getuid() : process.pid;
+ const hasUnicode = () => true;
+ const isWindows = process.platform === 'win32';
+
+ const osenv = {
+ editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? 'notepad.exe' : 'vi'),
+ shell: () => isWindows ? (process.env.COMSPEC || 'cmd.exe') : (process.env.SHELL || '/bin/bash')
+ };
+
+ const umask = {
+ fromString: () => process.umask()
+ };
+
+ let home = os.homedir();
+
+ if (home) {
+ process.env.HOME = home;
+ } else {
+ home = path.resolve(temp, 'npm-' + uidOrPid);
+ }
+
+ const cacheExtra = process.platform === 'win32' ? 'npm-cache' : '.npm';
+ const cacheRoot = process.platform === 'win32' ? process.env.APPDATA : home;
+ const cache = path.resolve(cacheRoot, cacheExtra);
+
+ let defaults;
+ let globalPrefix;
+
+ Object.defineProperty(exports, 'defaults', {
+ get: function () {
+ if (defaults) return defaults;
+
+ if (process.env.PREFIX) {
+ globalPrefix = process.env.PREFIX;
+ } else if (process.platform === 'win32') {
+ // c:\node\node.exe --> prefix=c:\node\
+ globalPrefix = path.dirname(process.execPath);
+ } else {
+ // /usr/local/bin/node --> prefix=/usr/local
+ globalPrefix = path.dirname(path.dirname(process.execPath)); // destdir only is respected on Unix
+
+ if (process.env.DESTDIR) {
+ globalPrefix = path.join(process.env.DESTDIR, globalPrefix);
+ }
+ }
+
+ defaults = {
+ access: null,
+ 'allow-same-version': false,
+ 'always-auth': false,
+ also: null,
+ 'auth-type': 'legacy',
+ 'bin-links': true,
+ browser: null,
+ ca: null,
+ cafile: null,
+ cache: cache,
+ 'cache-lock-stale': 60000,
+ 'cache-lock-retries': 10,
+ 'cache-lock-wait': 10000,
+ 'cache-max': Infinity,
+ 'cache-min': 10,
+ cert: null,
+ color: true,
+ depth: Infinity,
+ description: true,
+ dev: false,
+ 'dry-run': false,
+ editor: osenv.editor(),
+ 'engine-strict': false,
+ force: false,
+ 'fetch-retries': 2,
+ 'fetch-retry-factor': 10,
+ 'fetch-retry-mintimeout': 10000,
+ 'fetch-retry-maxtimeout': 60000,
+ git: 'git',
+ 'git-tag-version': true,
+ global: false,
+ globalconfig: path.resolve(globalPrefix, 'etc', 'npmrc'),
+ 'global-style': false,
+ group: process.platform === 'win32' ? 0 : process.env.SUDO_GID || process.getgid && process.getgid(),
+ 'ham-it-up': false,
+ heading: 'npm',
+ 'if-present': false,
+ 'ignore-prepublish': false,
+ 'ignore-scripts': false,
+ 'init-module': path.resolve(home, '.npm-init.js'),
+ 'init-author-name': '',
+ 'init-author-email': '',
+ 'init-author-url': '',
+ 'init-version': '1.0.0',
+ 'init-license': 'ISC',
+ json: false,
+ key: null,
+ 'legacy-bundling': false,
+ link: false,
+ 'local-address': undefined,
+ loglevel: 'notice',
+ logstream: process.stderr,
+ 'logs-max': 10,
+ long: false,
+ maxsockets: 50,
+ message: '%s',
+ 'metrics-registry': null,
+ 'node-version': process.version,
+ 'offline': false,
+ 'onload-script': false,
+ only: null,
+ optional: true,
+ 'package-lock': true,
+ parseable: false,
+ 'prefer-offline': false,
+ 'prefer-online': false,
+ prefix: globalPrefix,
+ production: process.env.NODE_ENV === 'production',
+ 'progress': !process.env.TRAVIS && !process.env.CI,
+ 'proprietary-attribs': true,
+ proxy: null,
+ 'https-proxy': null,
+ 'user-agent': 'npm/{npm-version} ' + 'node/{node-version} ' + '{platform} ' + '{arch}',
+ 'rebuild-bundle': true,
+ registry: 'https://registry.npmjs.org/',
+ rollback: true,
+ save: true,
+ 'save-bundle': false,
+ 'save-dev': false,
+ 'save-exact': false,
+ 'save-optional': false,
+ 'save-prefix': '^',
+ 'save-prod': false,
+ scope: '',
+ 'script-shell': null,
+ 'scripts-prepend-node-path': 'warn-only',
+ searchopts: '',
+ searchexclude: null,
+ searchlimit: 20,
+ searchstaleness: 15 * 60,
+ 'send-metrics': false,
+ shell: osenv.shell(),
+ shrinkwrap: true,
+ 'sign-git-tag': false,
+ 'sso-poll-frequency': 500,
+ 'sso-type': 'oauth',
+ 'strict-ssl': true,
+ tag: 'latest',
+ 'tag-version-prefix': 'v',
+ timing: false,
+ tmp: temp,
+ unicode: hasUnicode(),
+ 'unsafe-perm': process.platform === 'win32' || process.platform === 'cygwin' || !(process.getuid && process.setuid && process.getgid && process.setgid) || process.getuid() !== 0,
+ usage: false,
+ user: process.platform === 'win32' ? 0 : 'nobody',
+ userconfig: path.resolve(home, '.npmrc'),
+ umask: process.umask ? process.umask() : umask.fromString('022'),
+ version: false,
+ versions: false,
+ viewer: process.platform === 'win32' ? 'browser' : 'man',
+ _exit: true
+ };
+ return defaults;
+ }
+})
diff --git a/node_modules/npm-conf/lib/make.js b/node_modules/npm-conf/lib/make.js
new file mode 100644
index 0000000..fb79d6c
--- /dev/null
+++ b/node_modules/npm-conf/lib/make.js
@@ -0,0 +1,91 @@
+'use strict';
+const fs = require('fs');
+const path = require('path');
+const babylon = require('babylon');
+const generate = require('babel-generator').default;
+const traverse = require('babel-traverse').default;
+
+const defaultsTemplate = body => `
+ // Generated with \`lib/make.js\`
+ 'use strict';
+ const os = require('os');
+ const path = require('path');
+
+ const temp = os.tmpdir();
+ const uidOrPid = process.getuid ? process.getuid() : process.pid;
+ const hasUnicode = () => true;
+ const isWindows = process.platform === 'win32';
+
+ const osenv = {
+ editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? 'notepad.exe' : 'vi'),
+ shell: () => isWindows ? (process.env.COMSPEC || 'cmd.exe') : (process.env.SHELL || '/bin/bash')
+ };
+
+ const umask = {
+ fromString: () => process.umask()
+ };
+
+ let home = os.homedir();
+
+ if (home) {
+ process.env.HOME = home;
+ } else {
+ home = path.resolve(temp, 'npm-' + uidOrPid);
+ }
+
+ const cacheExtra = process.platform === 'win32' ? 'npm-cache' : '.npm';
+ const cacheRoot = process.platform === 'win32' ? process.env.APPDATA : home;
+ const cache = path.resolve(cacheRoot, cacheExtra);
+
+ let defaults;
+ let globalPrefix;
+
+ ${body}
+`;
+
+const typesTemplate = body => `
+ // Generated with \`lib/make.js\`
+ 'use strict';
+ const path = require('path');
+ const Stream = require('stream').Stream;
+ const url = require('url');
+
+ const Umask = () => {};
+ const getLocalAddresses = () => [];
+ const semver = () => {};
+
+ ${body}
+`;
+
+const defaults = require.resolve('npm/lib/config/defaults');
+const ast = babylon.parse(fs.readFileSync(defaults, 'utf8'));
+
+const isDefaults = node =>
+ node.callee.type === 'MemberExpression' &&
+ node.callee.object.name === 'Object' &&
+ node.callee.property.name === 'defineProperty' &&
+ node.arguments.some(x => x.name === 'exports');
+
+const isTypes = node =>
+ node.type === 'MemberExpression' &&
+ node.object.name === 'exports' &&
+ node.property.name === 'types';
+
+let defs;
+let types;
+
+traverse(ast, {
+ CallExpression(path) {
+ if (isDefaults(path.node)) {
+ defs = path.node;
+ }
+ },
+ AssignmentExpression(path) {
+ if (path.node.left && isTypes(path.node.left)) {
+ types = path.node;
+ }
+ }
+});
+
+fs.writeFileSync(path.join(__dirname, 'defaults.js'), defaultsTemplate(generate(defs, {}, ast).code));
+fs.writeFileSync(path.join(__dirname, 'types.js'), typesTemplate(generate(types, {}, ast).code));
diff --git a/node_modules/npm-conf/lib/types.js b/node_modules/npm-conf/lib/types.js
new file mode 100644
index 0000000..ae82bc5
--- /dev/null
+++ b/node_modules/npm-conf/lib/types.js
@@ -0,0 +1,127 @@
+
+ // Generated with `lib/make.js`
+ 'use strict';
+ const path = require('path');
+ const Stream = require('stream').Stream;
+ const url = require('url');
+
+ const Umask = () => {};
+ const getLocalAddresses = () => [];
+ const semver = () => {};
+
+ exports.types = {
+ access: [null, 'restricted', 'public'],
+ 'allow-same-version': Boolean,
+ 'always-auth': Boolean,
+ also: [null, 'dev', 'development'],
+ 'auth-type': ['legacy', 'sso', 'saml', 'oauth'],
+ 'bin-links': Boolean,
+ browser: [null, String],
+ ca: [null, String, Array],
+ cafile: path,
+ cache: path,
+ 'cache-lock-stale': Number,
+ 'cache-lock-retries': Number,
+ 'cache-lock-wait': Number,
+ 'cache-max': Number,
+ 'cache-min': Number,
+ cert: [null, String],
+ color: ['always', Boolean],
+ depth: Number,
+ description: Boolean,
+ dev: Boolean,
+ 'dry-run': Boolean,
+ editor: String,
+ 'engine-strict': Boolean,
+ force: Boolean,
+ 'fetch-retries': Number,
+ 'fetch-retry-factor': Number,
+ 'fetch-retry-mintimeout': Number,
+ 'fetch-retry-maxtimeout': Number,
+ git: String,
+ 'git-tag-version': Boolean,
+ global: Boolean,
+ globalconfig: path,
+ 'global-style': Boolean,
+ group: [Number, String],
+ 'https-proxy': [null, url],
+ 'user-agent': String,
+ 'ham-it-up': Boolean,
+ 'heading': String,
+ 'if-present': Boolean,
+ 'ignore-prepublish': Boolean,
+ 'ignore-scripts': Boolean,
+ 'init-module': path,
+ 'init-author-name': String,
+ 'init-author-email': String,
+ 'init-author-url': ['', url],
+ 'init-license': String,
+ 'init-version': semver,
+ json: Boolean,
+ key: [null, String],
+ 'legacy-bundling': Boolean,
+ link: Boolean,
+ // local-address must be listed as an IP for a local network interface
+ // must be IPv4 due to node bug
+ 'local-address': getLocalAddresses(),
+ loglevel: ['silent', 'error', 'warn', 'notice', 'http', 'timing', 'info', 'verbose', 'silly'],
+ logstream: Stream,
+ 'logs-max': Number,
+ long: Boolean,
+ maxsockets: Number,
+ message: String,
+ 'metrics-registry': [null, String],
+ 'node-version': [null, semver],
+ offline: Boolean,
+ 'onload-script': [null, String],
+ only: [null, 'dev', 'development', 'prod', 'production'],
+ optional: Boolean,
+ 'package-lock': Boolean,
+ parseable: Boolean,
+ 'prefer-offline': Boolean,
+ 'prefer-online': Boolean,
+ prefix: path,
+ production: Boolean,
+ progress: Boolean,
+ 'proprietary-attribs': Boolean,
+ proxy: [null, false, url],
+ // allow proxy to be disabled explicitly
+ 'rebuild-bundle': Boolean,
+ registry: [null, url],
+ rollback: Boolean,
+ save: Boolean,
+ 'save-bundle': Boolean,
+ 'save-dev': Boolean,
+ 'save-exact': Boolean,
+ 'save-optional': Boolean,
+ 'save-prefix': String,
+ 'save-prod': Boolean,
+ scope: String,
+ 'script-shell': [null, String],
+ 'scripts-prepend-node-path': [false, true, 'auto', 'warn-only'],
+ searchopts: String,
+ searchexclude: [null, String],
+ searchlimit: Number,
+ searchstaleness: Number,
+ 'send-metrics': Boolean,
+ shell: String,
+ shrinkwrap: Boolean,
+ 'sign-git-tag': Boolean,
+ 'sso-poll-frequency': Number,
+ 'sso-type': [null, 'oauth', 'saml'],
+ 'strict-ssl': Boolean,
+ tag: String,
+ timing: Boolean,
+ tmp: path,
+ unicode: Boolean,
+ 'unsafe-perm': Boolean,
+ usage: Boolean,
+ user: [Number, String],
+ userconfig: path,
+ umask: Umask,
+ version: Boolean,
+ 'tag-version-prefix': String,
+ versions: Boolean,
+ viewer: String,
+ _exit: Boolean
+}
diff --git a/node_modules/npm-conf/lib/util.js b/node_modules/npm-conf/lib/util.js
new file mode 100644
index 0000000..5cde7bc
--- /dev/null
+++ b/node_modules/npm-conf/lib/util.js
@@ -0,0 +1,147 @@
+'use strict';
+const fs = require('fs');
+const path = require('path');
+const types = require('./types');
+
+// https://github.com/npm/npm/blob/latest/lib/config/core.js#L409-L423
+const envReplace = str => {
+ if (typeof str !== 'string' || !str) {
+ return str;
+ }
+
+ // Replace any ${ENV} values with the appropriate environment
+ const regex = /(\\*)\$\{([^}]+)\}/g;
+
+ return str.replace(regex, (orig, esc, name) => {
+ esc = esc.length > 0 && esc.length % 2;
+
+ if (esc) {
+ return orig;
+ }
+
+ if (process.env[name] === undefined) {
+ throw new Error(`Failed to replace env in config: ${orig}`);
+ }
+
+ return process.env[name];
+ });
+};
+
+// https://github.com/npm/npm/blob/latest/lib/config/core.js#L362-L407
+const parseField = (field, key) => {
+ if (typeof field !== 'string') {
+ return field;
+ }
+
+ const typeList = [].concat(types[key]);
+ const isPath = typeList.indexOf(path) !== -1;
+ const isBool = typeList.indexOf(Boolean) !== -1;
+ const isString = typeList.indexOf(String) !== -1;
+ const isNumber = typeList.indexOf(Number) !== -1;
+
+ field = `${field}`.trim();
+
+ if (/^".*"$/.test(field)) {
+ try {
+ field = JSON.parse(field);
+ } catch (err) {
+ throw new Error(`Failed parsing JSON config key ${key}: ${field}`);
+ }
+ }
+
+ if (isBool && !isString && field === '') {
+ return true;
+ }
+
+ switch (field) { // eslint-disable-line default-case
+ case 'true': {
+ return true;
+ }
+
+ case 'false': {
+ return false;
+ }
+
+ case 'null': {
+ return null;
+ }
+
+ case 'undefined': {
+ return undefined;
+ }
+ }
+
+ field = envReplace(field);
+
+ if (isPath) {
+ const regex = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//;
+
+ if (regex.test(field) && process.env.HOME) {
+ field = path.resolve(process.env.HOME, field.substr(2));
+ }
+
+ field = path.resolve(field);
+ }
+
+ if (isNumber && !field.isNan()) {
+ field = Number(field);
+ }
+
+ return field;
+};
+
+// https://github.com/npm/npm/blob/latest/lib/config/find-prefix.js
+const findPrefix = name => {
+ name = path.resolve(name);
+
+ let walkedUp = false;
+
+ while (path.basename(name) === 'node_modules') {
+ name = path.dirname(name);
+ walkedUp = true;
+ }
+
+ if (walkedUp) {
+ return name;
+ }
+
+ const find = (name, original) => {
+ const regex = /^[a-zA-Z]:(\\|\/)?$/;
+
+ if (name === '/' || (process.platform === 'win32' && regex.test(name))) {
+ return original;
+ }
+
+ try {
+ const files = fs.readdirSync(name);
+
+ if (files.indexOf('node_modules') !== -1 || files.indexOf('package.json') !== -1) {
+ return name;
+ }
+
+ const dirname = path.dirname(name);
+
+ if (dirname === name) {
+ return original;
+ }
+
+ return find(dirname, original);
+ } catch (err) {
+ if (name === original) {
+ if (err.code === 'ENOENT') {
+ return original;
+ }
+
+ throw err;
+ }
+
+ return original;
+ }
+ };
+
+ return find(name, name);
+};
+
+exports.envReplace = envReplace;
+exports.findPrefix = findPrefix;
+exports.parseField = parseField;
diff --git a/node_modules/npm-conf/license b/node_modules/npm-conf/license
new file mode 100644
index 0000000..db6bc32
--- /dev/null
+++ b/node_modules/npm-conf/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
+
+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/npm-conf/node_modules/pify/index.js b/node_modules/npm-conf/node_modules/pify/index.js
new file mode 100644
index 0000000..1dee43a
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/index.js
@@ -0,0 +1,84 @@
+'use strict';
+
+const processFn = (fn, opts) => function () {
+ const P = opts.promiseModule;
+ const args = new Array(arguments.length);
+
+ for (let i = 0; i < arguments.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ return new P((resolve, reject) => {
+ if (opts.errorFirst) {
+ args.push(function (err, result) {
+ if (opts.multiArgs) {
+ const results = new Array(arguments.length - 1);
+
+ for (let i = 1; i < arguments.length; i++) {
+ results[i - 1] = arguments[i];
+ }
+
+ if (err) {
+ results.unshift(err);
+ reject(results);
+ } else {
+ resolve(results);
+ }
+ } else if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ });
+ } else {
+ args.push(function (result) {
+ if (opts.multiArgs) {
+ const results = new Array(arguments.length - 1);
+
+ for (let i = 0; i < arguments.length; i++) {
+ results[i] = arguments[i];
+ }
+
+ resolve(results);
+ } else {
+ resolve(result);
+ }
+ });
+ }
+
+ fn.apply(this, args);
+ });
+};
+
+module.exports = (obj, opts) => {
+ opts = Object.assign({
+ exclude: [/.+(Sync|Stream)$/],
+ errorFirst: true,
+ promiseModule: Promise
+ }, opts);
+
+ const filter = key => {
+ const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
+ return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
+ };
+
+ let ret;
+ if (typeof obj === 'function') {
+ ret = function () {
+ if (opts.excludeMain) {
+ return obj.apply(this, arguments);
+ }
+
+ return processFn(obj, opts).apply(this, arguments);
+ };
+ } else {
+ ret = Object.create(Object.getPrototypeOf(obj));
+ }
+
+ for (const key in obj) { // eslint-disable-line guard-for-in
+ const x = obj[key];
+ ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x;
+ }
+
+ return ret;
+};
diff --git a/node_modules/npm-conf/node_modules/pify/license b/node_modules/npm-conf/node_modules/pify/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm-conf/node_modules/pify/package.json b/node_modules/npm-conf/node_modules/pify/package.json
new file mode 100644
index 0000000..468d857
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "pify",
+ "version": "3.0.0",
+ "description": "Promisify a callback-style function",
+ "license": "MIT",
+ "repository": "sindresorhus/pify",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava && npm run optimization-test",
+ "optimization-test": "node --allow-natives-syntax optimization-test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "promises",
+ "promisify",
+ "all",
+ "denodify",
+ "denodeify",
+ "callback",
+ "cb",
+ "node",
+ "then",
+ "thenify",
+ "convert",
+ "transform",
+ "wrap",
+ "wrapper",
+ "bind",
+ "to",
+ "async",
+ "await",
+ "es2015",
+ "bluebird"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "pinkie-promise": "^2.0.0",
+ "v8-natives": "^1.0.0",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/npm-conf/node_modules/pify/readme.md b/node_modules/npm-conf/node_modules/pify/readme.md
new file mode 100644
index 0000000..376ca4e
--- /dev/null
+++ b/node_modules/npm-conf/node_modules/pify/readme.md
@@ -0,0 +1,131 @@
+# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
+
+> Promisify a callback-style function
+
+
+## Install
+
+```
+$ npm install --save pify
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const pify = require('pify');
+
+// Promisify a single function
+pify(fs.readFile)('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+
+// Promisify all methods in a module
+pify(fs).readFile('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+```
+
+
+## API
+
+### pify(input, [options])
+
+Returns a `Promise` wrapped version of the supplied function or module.
+
+#### input
+
+Type: `Function` `Object`
+
+Callback-style function or module whose methods you want to promisify.
+
+#### options
+
+##### multiArgs
+
+Type: `boolean`<br>
+Default: `false`
+
+By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error.
+
+```js
+const request = require('request');
+const pify = require('pify');
+
+pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
+ const [httpResponse, body] = result;
+});
+```
+
+##### include
+
+Type: `string[]` `RegExp[]`
+
+Methods in a module to promisify. Remaining methods will be left untouched.
+
+##### exclude
+
+Type: `string[]` `RegExp[]`<br>
+Default: `[/.+(Sync|Stream)$/]`
+
+Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
+
+##### excludeMain
+
+Type: `boolean`<br>
+Default: `false`
+
+If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module.
+
+```js
+const pify = require('pify');
+
+function fn() {
+ return true;
+}
+
+fn.method = (data, callback) => {
+ setImmediate(() => {
+ callback(null, data);
+ });
+};
+
+// Promisify methods but not `fn()`
+const promiseFn = pify(fn, {excludeMain: true});
+
+if (promiseFn()) {
+ promiseFn.method('hi').then(data => {
+ console.log(data);
+ });
+}
+```
+
+##### errorFirst
+
+Type: `boolean`<br>
+Default: `true`
+
+Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc.
+
+##### promiseModule
+
+Type: `Function`
+
+Custom promise module to use instead of the native one.
+
+Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
+
+
+## Related
+
+- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted
+- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/npm-conf/package.json b/node_modules/npm-conf/package.json
new file mode 100644
index 0000000..ac93509
--- /dev/null
+++ b/node_modules/npm-conf/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "npm-conf",
+ "version": "1.1.3",
+ "description": "Get the npm config",
+ "license": "MIT",
+ "repository": "kevva/npm-conf",
+ "author": {
+ "name": "Kevin Martensson",
+ "email": "kevinmartensson@gmail.com",
+ "url": "github.com/kevva"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "prepublish": "node lib/make.js",
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js",
+ "lib"
+ ],
+ "keywords": [
+ "conf",
+ "config",
+ "global",
+ "npm",
+ "path",
+ "prefix",
+ "rc"
+ ],
+ "dependencies": {
+ "config-chain": "^1.1.11",
+ "pify": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "babel-generator": "^6.24.1",
+ "babel-traverse": "^6.24.1",
+ "babylon": "^6.17.1",
+ "npm": "^5.0.4",
+ "xo": "*"
+ },
+ "xo": {
+ "ignores": [
+ "lib/defaults.js",
+ "lib/types.js"
+ ]
+ }
+}
diff --git a/node_modules/npm-conf/readme.md b/node_modules/npm-conf/readme.md
new file mode 100644
index 0000000..d346d3e
--- /dev/null
+++ b/node_modules/npm-conf/readme.md
@@ -0,0 +1,47 @@
+# npm-conf [![Build Status](https://travis-ci.org/kevva/npm-conf.svg?branch=master)](https://travis-ci.org/kevva/npm-conf)
+
+> Get the npm config
+
+
+## Install
+
+```
+$ npm install npm-conf
+```
+
+
+## Usage
+
+```js
+const npmConf = require('npm-conf');
+
+const conf = npmConf();
+
+conf.get('prefix')
+//=> //=> /Users/unicorn/.npm-packages
+
+conf.get('registry')
+//=> https://registry.npmjs.org/
+```
+
+To get a list of all available `npm` config options:
+
+```bash
+$ npm config list --long
+```
+
+
+## API
+
+### npmConf()
+
+Returns the `npm` config.
+
+### npmConf.defaults
+
+Returns the default `npm` config.
+
+
+## License
+
+MIT © [Kevin Mårtensson](https://github.com/kevva)
diff --git a/node_modules/nugget/.npmignore b/node_modules/nugget/.npmignore
new file mode 100644
index 0000000..91dfed8
--- /dev/null
+++ b/node_modules/nugget/.npmignore
@@ -0,0 +1,2 @@
+.DS_Store
+node_modules \ No newline at end of file
diff --git a/node_modules/nugget/.travis.yml b/node_modules/nugget/.travis.yml
new file mode 100644
index 0000000..244b7e8
--- /dev/null
+++ b/node_modules/nugget/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - '0.10'
diff --git a/node_modules/nugget/bin.js b/node_modules/nugget/bin.js
new file mode 100755
index 0000000..3f9c1c2
--- /dev/null
+++ b/node_modules/nugget/bin.js
@@ -0,0 +1,32 @@
+#!/usr/bin/env node
+
+var fs = require('fs')
+var path = require('path')
+var nugget = require('./')
+var args = require('minimist')(process.argv.slice(2))
+
+var urls = args._
+if (urls.length === 0) {
+ console.log(fs.readFileSync(path.join(__dirname, 'usage.txt')).toString())
+ process.exit(1)
+}
+
+var opts = {
+ target: args.o || args.O || args.out,
+ dir: args.d || args.dir,
+ resume: args.c || args.continue,
+ force: args.f || args.force,
+ sockets: args.s || args.sockets,
+ quiet: args.q || args.quiet,
+ frequency: args.frequency ? +args.frequency : null,
+ proxy: args.proxy ? args.proxy : null,
+ strictSSL: args['strict-ssl']
+}
+
+nugget(urls, opts, function (err) {
+ if (err) {
+ console.error('Error:', err)
+ process.exit(1)
+ }
+ process.exit(0)
+})
diff --git a/node_modules/nugget/collaborators.md b/node_modules/nugget/collaborators.md
new file mode 100644
index 0000000..860d41f
--- /dev/null
+++ b/node_modules/nugget/collaborators.md
@@ -0,0 +1,9 @@
+## Collaborators
+
+nugget is only possible due to the excellent work of the following collaborators:
+
+<table><tbody><tr><th align="left">maxogden</th><td><a href="https://github.com/maxogden">GitHub/maxogden</a></td></tr>
+<tr><th align="left">grncdr</th><td><a href="https://github.com/grncdr">GitHub/grncdr</a></td></tr>
+<tr><th align="left">mafintosh</th><td><a href="https://github.com/mafintosh">GitHub/mafintosh</a></td></tr>
+<tr><th align="left">jlord</th><td><a href="https://github.com/jlord">GitHub/jlord</a></td></tr>
+</tbody></table>
diff --git a/node_modules/nugget/index.js b/node_modules/nugget/index.js
new file mode 100644
index 0000000..b36918b
--- /dev/null
+++ b/node_modules/nugget/index.js
@@ -0,0 +1,203 @@
+var request = require('request')
+var fs = require('fs')
+var path = require('path')
+var log = require('single-line-log').stdout
+var progress = require('progress-stream')
+var prettyBytes = require('pretty-bytes')
+var throttle = require('throttleit')
+var EventEmitter = require('events').EventEmitter
+var debug = require('debug')('nugget')
+
+function noop () {}
+
+module.exports = function (urls, opts, cb) {
+ if (!Array.isArray(urls)) urls = [urls]
+ if (urls.length === 1) opts.singleTarget = true
+
+ var defaultProps = {}
+
+ if (opts.sockets) {
+ var sockets = +opts.sockets
+ defaultProps.pool = {maxSockets: sockets}
+ }
+
+ if (opts.proxy) {
+ defaultProps.proxy = opts.proxy
+ }
+
+ if (opts.strictSSL !== null) {
+ defaultProps.strictSSL = opts.strictSSL
+ }
+
+ if (Object.keys(defaultProps).length > 0) {
+ request = request.defaults(defaultProps)
+ }
+
+ var downloads = []
+ var errors = []
+ var pending = 0
+ var truncated = urls.length * 2 >= (process.stdout.rows - 15)
+
+ urls.forEach(function (url) {
+ debug('start dl', url)
+ pending++
+ var dl = startDownload(url, opts, function done (err) {
+ debug('done dl', url, pending)
+ if (err) {
+ debug('error dl', url, err)
+ errors.push(err)
+ dl.error = err.message
+ }
+ if (truncated) {
+ var i = downloads.indexOf(dl)
+ downloads.splice(i, 1)
+ downloads.push(dl)
+ }
+ if (--pending === 0) {
+ render()
+ cb(errors.length ? errors : undefined)
+ }
+ })
+
+ downloads.push(dl)
+
+ dl.on('start', function (progressStream) {
+ throttledRender()
+ })
+
+ dl.on('progress', function (data) {
+ debug('progress', url, data.percentage)
+
+ dl.speed = data.speed
+ if (dl.percentage === 100) render()
+ else throttledRender()
+ })
+ })
+
+ var _log = opts.quiet ? noop : log
+ render()
+ var throttledRender = throttle(render, opts.frequency || 250)
+
+ if (opts.singleTarget) return downloads[0]
+ else return downloads
+
+ function render () {
+ var height = process.stdout.rows
+ var rendered = 0
+ var output = ''
+ var totalSpeed = 0
+ downloads.forEach(function (dl) {
+ if (2 * rendered >= height - 15) return
+ rendered++
+ if (dl.error) {
+ output += 'Downloading ' + path.basename(dl.target) + '\n'
+ output += 'Error: ' + dl.error + '\n'
+ return
+ }
+ var pct = dl.percentage
+ var speed = dl.speed
+ var total = dl.fileSize
+ totalSpeed += speed
+ var bar = Array(Math.floor(45 * pct / 100)).join('=') + '>'
+ while (bar.length < 45) bar += ' '
+ output += 'Downloading ' + path.basename(dl.target) + '\n' +
+ '[' + bar + '] ' + pct.toFixed(1) + '%'
+ if (total) output += ' of ' + prettyBytes(total)
+ output += ' (' + prettyBytes(speed) + '/s)\n'
+ })
+ if (rendered < downloads.length) output += '\n... and ' + (downloads.length - rendered) + ' more\n'
+ if (downloads.length > 1) output += '\nCombined Speed: ' + prettyBytes(totalSpeed) + '/s\n'
+ _log(output)
+ }
+
+ function startDownload (url, opts, cb) {
+ var targetName = path.basename(url).split('?')[0]
+ if (opts.singleTarget && opts.target) targetName = opts.target
+ var target = path.resolve(opts.dir || process.cwd(), targetName)
+ if (opts.resume) {
+ resume(url, opts, cb)
+ } else {
+ download(url, opts, cb)
+ }
+
+ var progressEmitter = new EventEmitter()
+ progressEmitter.target = target
+ progressEmitter.speed = 0
+ progressEmitter.percentage = 0
+
+ return progressEmitter
+
+ function resume (url, opts, cb) {
+ fs.stat(target, function (err, stats) {
+ if (err && err.code === 'ENOENT') {
+ return download(url, opts, cb)
+ }
+ if (err) {
+ return cb(err)
+ }
+ var offset = stats.size
+ var req = request.get(url)
+
+ req.on('error', cb)
+ req.on('response', function (resp) {
+ resp.destroy()
+
+ var length = parseInt(resp.headers['content-length'], 10)
+
+ // file is already downloaded.
+ if (length === offset) return cb()
+
+ if (!isNaN(length) && length > offset && /bytes/.test(resp.headers['accept-ranges'])) {
+ opts.range = [offset, length]
+ }
+
+ download(url, opts, cb)
+ })
+ })
+ }
+
+ function download (url, opts, cb) {
+ var headers = opts.headers || {}
+ if (opts.range) {
+ headers.Range = 'bytes=' + opts.range[0] + '-' + opts.range[1]
+ }
+ var read = request(url, { headers: headers })
+
+ read.on('error', cb)
+ read.on('response', function (resp) {
+ debug('response', url, resp.statusCode)
+ if (resp.statusCode > 299 && !opts.force) return cb(new Error('GET ' + url + ' returned ' + resp.statusCode))
+ var write = fs.createWriteStream(target, {flags: opts.resume ? 'a' : 'w'})
+ write.on('error', cb)
+ write.on('finish', cb)
+
+ var fullLen
+ var contentLen = Number(resp.headers['content-length'])
+ var range = resp.headers['content-range']
+ if (range) {
+ fullLen = Number(range.split('/')[1])
+ } else {
+ fullLen = contentLen
+ }
+
+ progressEmitter.fileSize = fullLen
+ if (range) {
+ var downloaded = fullLen - contentLen
+ }
+ var progressStream = progress({ length: fullLen, transferred: downloaded }, onprogress)
+ progressEmitter.emit('start', progressStream)
+
+ resp
+ .pipe(progressStream)
+ .pipe(write)
+ })
+
+ function onprogress (p) {
+ var pct = p.percentage
+ progressEmitter.progress = p
+ progressEmitter.percentage = pct
+ progressEmitter.emit('progress', p)
+ }
+ }
+ }
+}
diff --git a/node_modules/nugget/multiple.png b/node_modules/nugget/multiple.png
new file mode 100644
index 0000000..67b7fca
--- /dev/null
+++ b/node_modules/nugget/multiple.png
Binary files differ
diff --git a/node_modules/nugget/node_modules/debug/.coveralls.yml b/node_modules/nugget/node_modules/debug/.coveralls.yml
new file mode 100644
index 0000000..20a7068
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/node_modules/nugget/node_modules/debug/.eslintrc b/node_modules/nugget/node_modules/debug/.eslintrc
new file mode 100644
index 0000000..8a37ae2
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "rules": {
+ "no-console": 0,
+ "no-empty": [1, { "allowEmptyCatch": true }]
+ },
+ "extends": "eslint:recommended"
+}
diff --git a/node_modules/nugget/node_modules/debug/.npmignore b/node_modules/nugget/node_modules/debug/.npmignore
new file mode 100644
index 0000000..5f60eec
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/.npmignore
@@ -0,0 +1,9 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
+coverage
+bower.json
diff --git a/node_modules/nugget/node_modules/debug/.travis.yml b/node_modules/nugget/node_modules/debug/.travis.yml
new file mode 100644
index 0000000..6c6090c
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/.travis.yml
@@ -0,0 +1,14 @@
+
+language: node_js
+node_js:
+ - "6"
+ - "5"
+ - "4"
+
+install:
+ - make node_modules
+
+script:
+ - make lint
+ - make test
+ - make coveralls
diff --git a/node_modules/nugget/node_modules/debug/CHANGELOG.md b/node_modules/nugget/node_modules/debug/CHANGELOG.md
new file mode 100644
index 0000000..eadaa18
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,362 @@
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/nugget/node_modules/debug/LICENSE b/node_modules/nugget/node_modules/debug/LICENSE
new file mode 100644
index 0000000..658c933
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/nugget/node_modules/debug/Makefile b/node_modules/nugget/node_modules/debug/Makefile
new file mode 100644
index 0000000..584da8b
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/Makefile
@@ -0,0 +1,50 @@
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+.FORCE:
+
+install: node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+lint: .FORCE
+ eslint browser.js debug.js index.js node.js
+
+test-node: .FORCE
+ istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+
+test-browser: .FORCE
+ mkdir -p dist
+
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+ karma start --single-run
+ rimraf dist
+
+test: .FORCE
+ concurrently \
+ "make test-node" \
+ "make test-browser"
+
+coveralls:
+ cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+.PHONY: all install clean distclean
diff --git a/node_modules/nugget/node_modules/debug/README.md b/node_modules/nugget/node_modules/debug/README.md
new file mode 100644
index 0000000..f67be6b
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/README.md
@@ -0,0 +1,312 @@
+# debug
+[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+
+
+A tiny node.js debugging utility modelled after node core's debugging technique.
+
+**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+ Note that PowerShell uses different syntax to set environment variables.
+
+ ```cmd
+ $env:DEBUG = "*,-not_this"
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Environment Variables
+
+ When running through Node.js, you can set a few environment variables that will
+ change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+ __Note:__ The environment variables beginning with `DEBUG_` end up being
+ converted into an Options object that gets used with `%o`/`%O` formatters.
+ See the Node.js documentation for
+ [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+ for the complete list.
+
+## Formatters
+
+
+ Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+### Custom formatters
+
+ You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+## Browser support
+ You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+ or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+ if you don't want to build it yourself.
+
+ Debug's enable state is currently persisted by `localStorage`.
+ Consider the situation shown below where you have `worker:a` and `worker:b`,
+ and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/nugget/node_modules/debug/component.json b/node_modules/nugget/node_modules/debug/component.json
new file mode 100644
index 0000000..9de2641
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.6.9",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "src/browser.js",
+ "scripts": [
+ "src/browser.js",
+ "src/debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/node_modules/nugget/node_modules/debug/karma.conf.js b/node_modules/nugget/node_modules/debug/karma.conf.js
new file mode 100644
index 0000000..103a82d
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/karma.conf.js
@@ -0,0 +1,70 @@
+// Karma configuration
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
+
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'dist/debug.js',
+ 'test/*spec.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ 'src/node.js'
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['progress'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}
diff --git a/node_modules/nugget/node_modules/debug/node.js b/node_modules/nugget/node_modules/debug/node.js
new file mode 100644
index 0000000..7fc36fe
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/node_modules/nugget/node_modules/debug/package.json b/node_modules/nugget/node_modules/debug/package.json
new file mode 100644
index 0000000..dc787ba
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "debug",
+ "version": "2.6.9",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ }
+}
diff --git a/node_modules/nugget/node_modules/debug/src/browser.js b/node_modules/nugget/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..7106924
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/src/browser.js
@@ -0,0 +1,185 @@
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return;
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit')
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/node_modules/nugget/node_modules/debug/src/debug.js b/node_modules/nugget/node_modules/debug/src/debug.js
new file mode 100644
index 0000000..6a5e3fc
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/src/debug.js
@@ -0,0 +1,202 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
+
+ var self = debug;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ return debug;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ exports.names = [];
+ exports.skips = [];
+
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/node_modules/nugget/node_modules/debug/src/index.js b/node_modules/nugget/node_modules/debug/src/index.js
new file mode 100644
index 0000000..e12cf4d
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process !== 'undefined' && process.type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/nugget/node_modules/debug/src/inspector-log.js b/node_modules/nugget/node_modules/debug/src/inspector-log.js
new file mode 100644
index 0000000..60ea6c0
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/src/inspector-log.js
@@ -0,0 +1,15 @@
+module.exports = inspectorLog;
+
+// black hole
+const nullStream = new (require('stream').Writable)();
+nullStream._write = () => {};
+
+/**
+ * Outputs a `console.log()` to the Node.js Inspector console *only*.
+ */
+function inspectorLog() {
+ const stdout = console._stdout;
+ console._stdout = nullStream;
+ console.log.apply(console, arguments);
+ console._stdout = stdout;
+}
diff --git a/node_modules/nugget/node_modules/debug/src/node.js b/node_modules/nugget/node_modules/debug/src/node.js
new file mode 100644
index 0000000..b15109c
--- /dev/null
+++ b/node_modules/nugget/node_modules/debug/src/node.js
@@ -0,0 +1,248 @@
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // camel-case
+ var prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+ // coerce string value into JS value
+ var val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === 'null') val = null;
+ else val = Number(val);
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+
+if (1 !== fd && 2 !== fd) {
+ util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
+}
+
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var name = this.namespace;
+ var useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ */
+
+function log() {
+ return stream.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+ debug.inspectOpts = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/node_modules/nugget/node_modules/ms/index.js b/node_modules/nugget/node_modules/ms/index.js
new file mode 100644
index 0000000..6a522b1
--- /dev/null
+++ b/node_modules/nugget/node_modules/ms/index.js
@@ -0,0 +1,152 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) {
+ return;
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name;
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/node_modules/nugget/node_modules/ms/license.md b/node_modules/nugget/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/nugget/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/nugget/node_modules/ms/package.json b/node_modules/nugget/node_modules/ms/package.json
new file mode 100644
index 0000000..6a31c81
--- /dev/null
+++ b/node_modules/nugget/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.0.0",
+ "description": "Tiny milisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "expect.js": "0.3.1",
+ "husky": "0.13.3",
+ "lint-staged": "3.4.1",
+ "mocha": "3.4.1"
+ }
+}
diff --git a/node_modules/nugget/node_modules/ms/readme.md b/node_modules/nugget/node_modules/ms/readme.md
new file mode 100644
index 0000000..84a9974
--- /dev/null
+++ b/node_modules/nugget/node_modules/ms/readme.md
@@ -0,0 +1,51 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+```
+
+### Convert from milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time format written-out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+
+## Caught a bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/nugget/package.json b/node_modules/nugget/package.json
new file mode 100644
index 0000000..6cf98b9
--- /dev/null
+++ b/node_modules/nugget/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "nugget",
+ "version": "2.0.1",
+ "description": "minimalist wget clone written in node. HTTP GETs a file and saves it to the current working directory",
+ "main": "index.js",
+ "bin": {
+ "nugget": "bin.js"
+ },
+ "scripts": {
+ "test": "standard && tape test/*.js"
+ },
+ "author": "max ogden",
+ "license": "BSD",
+ "dependencies": {
+ "debug": "^2.1.3",
+ "minimist": "^1.1.0",
+ "pretty-bytes": "^1.0.2",
+ "progress-stream": "^1.1.0",
+ "request": "^2.45.0",
+ "single-line-log": "^1.1.2",
+ "throttleit": "0.0.2"
+ },
+ "devDependencies": {
+ "standard": "^6.0.5",
+ "tape": "^3.0.1",
+ "tape-spawn": "^1.4.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/maxogden/nugget.git"
+ },
+ "bugs": {
+ "url": "https://github.com/maxogden/nugget/issues"
+ },
+ "homepage": "https://github.com/maxogden/nugget"
+}
diff --git a/node_modules/nugget/readme.md b/node_modules/nugget/readme.md
new file mode 100644
index 0000000..439975b
--- /dev/null
+++ b/node_modules/nugget/readme.md
@@ -0,0 +1,58 @@
+# nugget
+
+Minimalist command line downloader written in node, inspired by wget. HTTP GETs a file and streams it into a file in the current working directory. Specializes at downloading many files in parallel.
+
+[![NPM](https://nodei.co/npm/nugget.png?global=true)](https://nodei.co/npm/nugget/)
+![dat](http://img.shields.io/badge/Development%20sponsored%20by-dat-green.svg?style=flat)
+[![Travis](http://img.shields.io/travis/maxogden/nugget.svg?style=flat)](https://travis-ci.org/maxogden/nugget)
+
+## installation
+
+```
+npm install nugget -g
+```
+
+## usage
+
+```
+Usage: nugget <urls> [options]
+ -o output filename
+ -d output parent directory
+ -c resume aborted download
+ -f ignore response codes > 299
+ -s concurrent socket limit (default infinity)
+ -q disable logging
+```
+
+### examples
+
+```
+nugget http://foo.com/bar.jpg
+# downloads bar.jpg and stores it in the current directory
+```
+
+or
+
+```
+nugget http://foo.com/bar.jpg -O baz.jpg
+# saves it as baz.jpg. you can also do lowercase -o
+```
+
+if you get a statusCode of 300 or greater nugget will stop. you can force it to stream the response into a file anyway by doing `nugget http://404link.com/file.html -f` or `--force` works too
+
+you can also download multiple files, just pass multiple urls:
+
+![download multiple](multiple.png)
+
+## options
+
+The following options are recognized by nugget:
+
+ * `-s|--sockets` - default Infinity. specify the number of http sockets to use at once (this controls concurrency)
+ * `-o|-O|--out` - specify the filename to write to. this only works if you are downloading a single file
+ * `-d|--dir` - save files in a directory other than the current one.
+ * `-c|--continue` - resume downloads if a partially complete target file already exists. If the target file exists and is the same size as the remote file, nothing will be done.
+ * `-f|--force` - force the server response to be saved to the target file, even if it's a non-successful status code.
+ * `-q|--quiet` - disable logging
+ * `--no-strict-ssl` - disable strict ssl
+ * `--proxy` - specify a proxy to use
diff --git a/node_modules/nugget/test/cli.js b/node_modules/nugget/test/cli.js
new file mode 100644
index 0000000..7d7313f
--- /dev/null
+++ b/node_modules/nugget/test/cli.js
@@ -0,0 +1,11 @@
+var fs = require('fs')
+var path = require('path')
+var spawn = require('tape-spawn')
+var test = require('tape')
+
+test('usage', function (t) {
+ var child = spawn(t, path.join(__dirname, '..', 'bin.js'))
+ child.stdout.match(fs.readFileSync(path.join(__dirname, '..', 'usage.txt')).toString() + '\n')
+ child.stderr.empty()
+ child.end()
+})
diff --git a/node_modules/nugget/test/resume.html b/node_modules/nugget/test/resume.html
new file mode 100644
index 0000000..b6fc4c6
--- /dev/null
+++ b/node_modules/nugget/test/resume.html
@@ -0,0 +1 @@
+hello \ No newline at end of file
diff --git a/node_modules/nugget/test/resume.js b/node_modules/nugget/test/resume.js
new file mode 100644
index 0000000..291ce0e
--- /dev/null
+++ b/node_modules/nugget/test/resume.js
@@ -0,0 +1,41 @@
+var fs = require('fs')
+var http = require('http')
+var nugget = require('../')
+var path = require('path')
+var test = require('tape')
+
+var data = new Buffer('hello everybody I am the data')
+
+var testServer = http.createServer(function (req, res) {
+ if (!req.headers['range']) {
+ res.setHeader('content-length', data.length)
+ res.setHeader('accept-ranges', 'bytes')
+ res.end(data)
+ } else {
+ var range = req.headers['range'].split('=').pop().split('-').map(function (s) {
+ return parseInt(s, 10)
+ })
+ res.setHeader('content-length', range[1] - range[0])
+ res.setHeader('content-range', range[0] + '-' + range[1] + '/' + data.length)
+ res.end(data.slice(range[0], range[1]))
+ }
+})
+
+var target = path.join(__dirname, 'foobar.html')
+if (fs.existsSync(target)) fs.unlinkSync(target)
+
+fs.writeFileSync(target, data.slice(0, 10))
+
+testServer.listen(0, function () {
+ var port = this.address().port
+ test('fetches rest of file', function (t) {
+ nugget('http://localhost:' + port + '/foobar.html', {dir: __dirname, resume: true, quiet: true}, function (err) {
+ if (err) t.ifErr(err)
+ t.ok(fs.existsSync(target), 'downloaded file')
+ t.equal(fs.statSync(target).size, data.length, 'file is complete')
+ if (fs.existsSync(target)) fs.unlinkSync(target)
+ t.end()
+ testServer.close()
+ })
+ })
+})
diff --git a/node_modules/nugget/test/test.js b/node_modules/nugget/test/test.js
new file mode 100644
index 0000000..62ccb25
--- /dev/null
+++ b/node_modules/nugget/test/test.js
@@ -0,0 +1,38 @@
+var fs = require('fs')
+var http = require('http')
+var nugget = require('../')
+var path = require('path')
+var test = require('tape')
+
+var testServer = http.createServer(function (req, res) {
+ res.end('hello')
+})
+
+var target = path.join(__dirname, 'resume.html')
+if (fs.existsSync(target)) fs.unlinkSync(target)
+
+testServer.listen(0, function () {
+ var port = this.address().port
+ test('fetches file', function (t) {
+ nugget('http://localhost:' + port + '/resume.html', {dir: __dirname, quiet: true}, function (err) {
+ if (err) t.ifErr(err)
+ t.ok(fs.existsSync(target), 'downloaded file')
+ if (fs.existsSync(target)) fs.unlinkSync(target)
+ t.end()
+ })
+ })
+
+ test('has progress events', function (t) {
+ var gotProgress = false
+ var dl = nugget('http://localhost:' + port + '/resume.html', {dir: __dirname, quiet: true}, function (err) {
+ t.notOk(err, 'no error')
+ t.ok(gotProgress, 'got progress event')
+ t.end()
+ testServer.close()
+ })
+ dl.once('progress', function (data) {
+ t.ok(data.hasOwnProperty('percentage'), 'has percentage')
+ gotProgress = true
+ })
+ })
+})
diff --git a/node_modules/nugget/usage.txt b/node_modules/nugget/usage.txt
new file mode 100644
index 0000000..90e2110
--- /dev/null
+++ b/node_modules/nugget/usage.txt
@@ -0,0 +1,8 @@
+Usage: nugget <urls> [options]
+ -o output filename
+ -d output parent directory
+ -c resume aborted download
+ -f ignore response codes > 299
+ -s concurrent socket limit (default infinity)
+ -q disable logging
+ --stdin download all urls written to stdin (newline delimited) \ No newline at end of file
diff --git a/node_modules/number-is-nan/index.js b/node_modules/number-is-nan/index.js
new file mode 100644
index 0000000..79be4b9
--- /dev/null
+++ b/node_modules/number-is-nan/index.js
@@ -0,0 +1,4 @@
+'use strict';
+module.exports = Number.isNaN || function (x) {
+ return x !== x;
+};
diff --git a/node_modules/number-is-nan/license b/node_modules/number-is-nan/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/number-is-nan/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/number-is-nan/package.json b/node_modules/number-is-nan/package.json
new file mode 100644
index 0000000..d2f51d4
--- /dev/null
+++ b/node_modules/number-is-nan/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "number-is-nan",
+ "version": "1.0.1",
+ "description": "ES2015 Number.isNaN() ponyfill",
+ "license": "MIT",
+ "repository": "sindresorhus/number-is-nan",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "es2015",
+ "ecmascript",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "number",
+ "is",
+ "nan",
+ "not"
+ ],
+ "devDependencies": {
+ "ava": "*"
+ }
+}
diff --git a/node_modules/number-is-nan/readme.md b/node_modules/number-is-nan/readme.md
new file mode 100644
index 0000000..2463508
--- /dev/null
+++ b/node_modules/number-is-nan/readme.md
@@ -0,0 +1,28 @@
+# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan)
+
+> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com)
+
+
+## Install
+
+```
+$ npm install --save number-is-nan
+```
+
+
+## Usage
+
+```js
+var numberIsNan = require('number-is-nan');
+
+numberIsNan(NaN);
+//=> true
+
+numberIsNan('unicorn');
+//=> false
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/oauth-sign/LICENSE b/node_modules/oauth-sign/LICENSE
new file mode 100644
index 0000000..a4a9aee
--- /dev/null
+++ b/node_modules/oauth-sign/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/oauth-sign/README.md b/node_modules/oauth-sign/README.md
new file mode 100644
index 0000000..549cbba
--- /dev/null
+++ b/node_modules/oauth-sign/README.md
@@ -0,0 +1,11 @@
+oauth-sign
+==========
+
+OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.
+
+## Supported Method Signatures
+
+- HMAC-SHA1
+- HMAC-SHA256
+- RSA-SHA1
+- PLAINTEXT \ No newline at end of file
diff --git a/node_modules/oauth-sign/index.js b/node_modules/oauth-sign/index.js
new file mode 100644
index 0000000..6482f77
--- /dev/null
+++ b/node_modules/oauth-sign/index.js
@@ -0,0 +1,146 @@
+var crypto = require('crypto')
+
+function sha (key, body, algorithm) {
+ return crypto.createHmac(algorithm, key).update(body).digest('base64')
+}
+
+function rsa (key, body) {
+ return crypto.createSign('RSA-SHA1').update(body).sign(key, 'base64')
+}
+
+function rfc3986 (str) {
+ return encodeURIComponent(str)
+ .replace(/!/g,'%21')
+ .replace(/\*/g,'%2A')
+ .replace(/\(/g,'%28')
+ .replace(/\)/g,'%29')
+ .replace(/'/g,'%27')
+}
+
+// Maps object to bi-dimensional array
+// Converts { foo: 'A', bar: [ 'b', 'B' ]} to
+// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ]
+function map (obj) {
+ var key, val, arr = []
+ for (key in obj) {
+ val = obj[key]
+ if (Array.isArray(val))
+ for (var i = 0; i < val.length; i++)
+ arr.push([key, val[i]])
+ else if (typeof val === 'object')
+ for (var prop in val)
+ arr.push([key + '[' + prop + ']', val[prop]])
+ else
+ arr.push([key, val])
+ }
+ return arr
+}
+
+// Compare function for sort
+function compare (a, b) {
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+function generateBase (httpMethod, base_uri, params) {
+ // adapted from https://dev.twitter.com/docs/auth/oauth and
+ // https://dev.twitter.com/docs/auth/creating-signature
+
+ // Parameter normalization
+ // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2
+ var normalized = map(params)
+ // 1. First, the name and value of each parameter are encoded
+ .map(function (p) {
+ return [ rfc3986(p[0]), rfc3986(p[1] || '') ]
+ })
+ // 2. The parameters are sorted by name, using ascending byte value
+ // ordering. If two or more parameters share the same name, they
+ // are sorted by their value.
+ .sort(function (a, b) {
+ return compare(a[0], b[0]) || compare(a[1], b[1])
+ })
+ // 3. The name of each parameter is concatenated to its corresponding
+ // value using an "=" character (ASCII code 61) as a separator, even
+ // if the value is empty.
+ .map(function (p) { return p.join('=') })
+ // 4. The sorted name/value pairs are concatenated together into a
+ // single string by using an "&" character (ASCII code 38) as
+ // separator.
+ .join('&')
+
+ var base = [
+ rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'),
+ rfc3986(base_uri),
+ rfc3986(normalized)
+ ].join('&')
+
+ return base
+}
+
+function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) {
+ var base = generateBase(httpMethod, base_uri, params)
+ var key = [
+ consumer_secret || '',
+ token_secret || ''
+ ].map(rfc3986).join('&')
+
+ return sha(key, base, 'sha1')
+}
+
+function hmacsign256 (httpMethod, base_uri, params, consumer_secret, token_secret) {
+ var base = generateBase(httpMethod, base_uri, params)
+ var key = [
+ consumer_secret || '',
+ token_secret || ''
+ ].map(rfc3986).join('&')
+
+ return sha(key, base, 'sha256')
+}
+
+function rsasign (httpMethod, base_uri, params, private_key, token_secret) {
+ var base = generateBase(httpMethod, base_uri, params)
+ var key = private_key || ''
+
+ return rsa(key, base)
+}
+
+function plaintext (consumer_secret, token_secret) {
+ var key = [
+ consumer_secret || '',
+ token_secret || ''
+ ].map(rfc3986).join('&')
+
+ return key
+}
+
+function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) {
+ var method
+ var skipArgs = 1
+
+ switch (signMethod) {
+ case 'RSA-SHA1':
+ method = rsasign
+ break
+ case 'HMAC-SHA1':
+ method = hmacsign
+ break
+ case 'HMAC-SHA256':
+ method = hmacsign256
+ break
+ case 'PLAINTEXT':
+ method = plaintext
+ skipArgs = 4
+ break
+ default:
+ throw new Error('Signature method not supported: ' + signMethod)
+ }
+
+ return method.apply(null, [].slice.call(arguments, skipArgs))
+}
+
+exports.hmacsign = hmacsign
+exports.hmacsign256 = hmacsign256
+exports.rsasign = rsasign
+exports.plaintext = plaintext
+exports.sign = sign
+exports.rfc3986 = rfc3986
+exports.generateBase = generateBase \ No newline at end of file
diff --git a/node_modules/oauth-sign/package.json b/node_modules/oauth-sign/package.json
new file mode 100644
index 0000000..036d2b0
--- /dev/null
+++ b/node_modules/oauth-sign/package.json
@@ -0,0 +1,23 @@
+{
+ "author": "Mikeal Rogers <mikeal.rogers@gmail.com> (http://www.futurealoof.com)",
+ "name": "oauth-sign",
+ "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.",
+ "version": "0.9.0",
+ "license": "Apache-2.0",
+ "repository": {
+ "url": "https://github.com/mikeal/oauth-sign"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js"
+ ],
+ "dependencies": {},
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "scripts": {
+ "test": "node test.js"
+ }
+}
diff --git a/node_modules/object-assign/index.js b/node_modules/object-assign/index.js
new file mode 100644
index 0000000..0930cf8
--- /dev/null
+++ b/node_modules/object-assign/index.js
@@ -0,0 +1,90 @@
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+'use strict';
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
diff --git a/node_modules/object-assign/license b/node_modules/object-assign/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/object-assign/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json
new file mode 100644
index 0000000..503eb1e
--- /dev/null
+++ b/node_modules/object-assign/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "object-assign",
+ "version": "4.1.1",
+ "description": "ES2015 `Object.assign()` ponyfill",
+ "license": "MIT",
+ "repository": "sindresorhus/object-assign",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava",
+ "bench": "matcha bench.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "object",
+ "assign",
+ "extend",
+ "properties",
+ "es2015",
+ "ecmascript",
+ "harmony",
+ "ponyfill",
+ "prollyfill",
+ "polyfill",
+ "shim",
+ "browser"
+ ],
+ "devDependencies": {
+ "ava": "^0.16.0",
+ "lodash": "^4.16.4",
+ "matcha": "^0.7.0",
+ "xo": "^0.16.0"
+ }
+}
diff --git a/node_modules/object-assign/readme.md b/node_modules/object-assign/readme.md
new file mode 100644
index 0000000..1be09d3
--- /dev/null
+++ b/node_modules/object-assign/readme.md
@@ -0,0 +1,61 @@
+# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
+
+> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
+
+
+## Use the built-in
+
+Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
+support `Object.assign()` :tada:. If you target only those environments, then by all
+means, use `Object.assign()` instead of this package.
+
+
+## Install
+
+```
+$ npm install --save object-assign
+```
+
+
+## Usage
+
+```js
+const objectAssign = require('object-assign');
+
+objectAssign({foo: 0}, {bar: 1});
+//=> {foo: 0, bar: 1}
+
+// multiple sources
+objectAssign({foo: 0}, {bar: 1}, {baz: 2});
+//=> {foo: 0, bar: 1, baz: 2}
+
+// overwrites equal keys
+objectAssign({foo: 0}, {foo: 1}, {foo: 2});
+//=> {foo: 2}
+
+// ignores null and undefined sources
+objectAssign({foo: 0}, null, {bar: 1}, undefined);
+//=> {foo: 0, bar: 1}
+```
+
+
+## API
+
+### objectAssign(target, [source, ...])
+
+Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
+
+
+## Resources
+
+- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
+
+
+## Related
+
+- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/object-keys/.npmignore b/node_modules/object-keys/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/object-keys/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/object-keys/.travis.yml b/node_modules/object-keys/.travis.yml
new file mode 100644
index 0000000..60d00ce
--- /dev/null
+++ b/node_modules/object-keys/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.8"
+ - "0.6"
diff --git a/node_modules/object-keys/README.md b/node_modules/object-keys/README.md
new file mode 100644
index 0000000..ab32d0a
--- /dev/null
+++ b/node_modules/object-keys/README.md
@@ -0,0 +1,39 @@
+#object-keys <sup>[![Version Badge][2]][1]</sup>
+
+[![Build Status][3]][4] [![dependency status][5]][6]
+
+[![browser support][7]][8]
+
+An Object.keys shim. Uses Object.keys if available.
+
+## Example
+
+```js
+var keys = require('object-keys');
+var assert = require('assert');
+var obj = {
+ a: true,
+ b: true,
+ c: true
+};
+
+assert.equal(keys(obj), ['a', 'b', 'c']);
+```
+
+## Source
+Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).
+
+## Tests
+Simply clone the repo, `npm install`, and run `npm test`
+
+[1]: https://npmjs.org/package/object-keys
+[2]: http://vb.teelaun.ch/ljharb/object-keys.svg
+[3]: https://travis-ci.org/ljharb/object-keys.png
+[4]: https://travis-ci.org/ljharb/object-keys
+[5]: https://david-dm.org/ljharb/object-keys.png
+[6]: https://david-dm.org/ljharb/object-keys
+[7]: https://ci.testling.com/ljharb/object-keys.png
+[8]: https://ci.testling.com/ljharb/object-keys
+[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589
+[10]: https://github.com/bestiejs/lodash
+
diff --git a/node_modules/object-keys/foreach.js b/node_modules/object-keys/foreach.js
new file mode 100644
index 0000000..db32d45
--- /dev/null
+++ b/node_modules/object-keys/foreach.js
@@ -0,0 +1,40 @@
+var hasOwn = Object.prototype.hasOwnProperty;
+var toString = Object.prototype.toString;
+
+var isFunction = function (fn) {
+ var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]';
+ if (!isFunc && typeof window !== 'undefined') {
+ isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt;
+ }
+ return isFunc;
+};
+
+module.exports = function forEach(obj, fn) {
+ if (!isFunction(fn)) {
+ throw new TypeError('iterator must be a function');
+ }
+ var i, k,
+ isString = typeof obj === 'string',
+ l = obj.length,
+ context = arguments.length > 2 ? arguments[2] : null;
+ if (l === +l) {
+ for (i = 0; i < l; i++) {
+ if (context === null) {
+ fn(isString ? obj.charAt(i) : obj[i], i, obj);
+ } else {
+ fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj);
+ }
+ }
+ } else {
+ for (k in obj) {
+ if (hasOwn.call(obj, k)) {
+ if (context === null) {
+ fn(obj[k], k, obj);
+ } else {
+ fn.call(context, obj[k], k, obj);
+ }
+ }
+ }
+ }
+};
+
diff --git a/node_modules/object-keys/index.js b/node_modules/object-keys/index.js
new file mode 100644
index 0000000..f5b24b6
--- /dev/null
+++ b/node_modules/object-keys/index.js
@@ -0,0 +1,2 @@
+module.exports = Object.keys || require('./shim');
+
diff --git a/node_modules/object-keys/isArguments.js b/node_modules/object-keys/isArguments.js
new file mode 100644
index 0000000..74a0989
--- /dev/null
+++ b/node_modules/object-keys/isArguments.js
@@ -0,0 +1,16 @@
+var toString = Object.prototype.toString;
+
+module.exports = function isArguments(value) {
+ var str = toString.call(value);
+ var isArguments = str === '[object Arguments]';
+ if (!isArguments) {
+ isArguments = str !== '[object Array]'
+ && value !== null
+ && typeof value === 'object'
+ && typeof value.length === 'number'
+ && value.length >= 0
+ && toString.call(value.callee) === '[object Function]';
+ }
+ return isArguments;
+};
+
diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json
new file mode 100644
index 0000000..da429a1
--- /dev/null
+++ b/node_modules/object-keys/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "object-keys",
+ "version": "0.4.0",
+ "author": "Jordan Harband",
+ "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim",
+ "license": "MIT",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test/index.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ljharb/object-keys.git"
+ },
+ "keywords": [
+ "Object.keys",
+ "keys",
+ "ES5",
+ "shim"
+ ],
+ "dependencies": {
+ },
+ "devDependencies": {
+ "foreach": "~2.0.3",
+ "is": "~0.2.6",
+ "tape": "~1.0.4",
+ "indexof": "~0.0.1"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "iexplore/6.0..latest",
+ "firefox/3.0..6.0",
+ "firefox/15.0..latest",
+ "firefox/nightly",
+ "chrome/4.0..10.0",
+ "chrome/20.0..latest",
+ "chrome/canary",
+ "opera/10.0..latest",
+ "opera/next",
+ "safari/4.0..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2"
+ ]
+ }
+}
+
diff --git a/node_modules/object-keys/shim.js b/node_modules/object-keys/shim.js
new file mode 100644
index 0000000..b88421b
--- /dev/null
+++ b/node_modules/object-keys/shim.js
@@ -0,0 +1,62 @@
+(function () {
+ "use strict";
+
+ // modified from https://github.com/kriskowal/es5-shim
+ var has = Object.prototype.hasOwnProperty,
+ toString = Object.prototype.toString,
+ forEach = require('./foreach'),
+ isArgs = require('./isArguments'),
+ hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
+ hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ keysShim;
+
+ keysShim = function keys(object) {
+ var isObject = object !== null && typeof object === 'object',
+ isFunction = toString.call(object) === '[object Function]',
+ isArguments = isArgs(object),
+ theKeys = [];
+
+ if (!isObject && !isFunction && !isArguments) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ if (isArguments) {
+ forEach(object, function (value) {
+ theKeys.push(value);
+ });
+ } else {
+ var name,
+ skipProto = hasProtoEnumBug && isFunction;
+
+ for (name in object) {
+ if (!(skipProto && name === 'prototype') && has.call(object, name)) {
+ theKeys.push(name);
+ }
+ }
+ }
+
+ if (hasDontEnumBug) {
+ var ctor = object.constructor,
+ skipConstructor = ctor && ctor.prototype === object;
+
+ forEach(dontEnums, function (dontEnum) {
+ if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) {
+ theKeys.push(dontEnum);
+ }
+ });
+ }
+ return theKeys;
+ };
+
+ module.exports = keysShim;
+}());
+
diff --git a/node_modules/object-keys/test/foreach.js b/node_modules/object-keys/test/foreach.js
new file mode 100644
index 0000000..f29f065
--- /dev/null
+++ b/node_modules/object-keys/test/foreach.js
@@ -0,0 +1,156 @@
+var test = require('tape');
+var forEach = require('../foreach.js');
+
+test('second argument: iterator', function (t) {
+ var arr = [];
+ t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function');
+ t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function');
+ t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function');
+ t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function');
+ t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function');
+ t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function');
+ t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function');
+ t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function');
+ t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function');
+ t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function');
+ if (typeof window !== 'undefined') {
+ t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function');
+ }
+ t.end();
+});
+
+test('array', function (t) {
+ var arr = [1, 2, 3];
+
+ t.test('iterates over every item', function (st) {
+ var index = 0;
+ forEach(arr, function () { index += 1; });
+ st.equal(index, arr.length, 'iterates ' + arr.length + ' times');
+ st.end();
+ });
+
+ t.test('first iterator argument', function (st) {
+ var index = 0;
+ st.plan(arr.length);
+ forEach(arr, function (item) {
+ st.equal(arr[index], item, 'item ' + index + ' is passed as first argument');
+ index += 1;
+ });
+ st.end();
+ });
+
+ t.test('second iterator argument', function (st) {
+ var counter = 0;
+ st.plan(arr.length);
+ forEach(arr, function (item, index) {
+ st.equal(counter, index, 'index ' + index + ' is passed as second argument');
+ counter += 1;
+ });
+ st.end();
+ });
+
+ t.test('third iterator argument', function (st) {
+ st.plan(arr.length);
+ forEach(arr, function (item, index, array) {
+ st.deepEqual(arr, array, 'array is passed as third argument');
+ });
+ st.end();
+ });
+
+ t.test('context argument', function (st) {
+ var context = {};
+ st.plan(arr.length);
+ forEach(arr, function () {
+ st.equal(this, context, '"this" is the passed context');
+ }, context);
+ st.end();
+ });
+
+ t.end();
+});
+
+test('object', function (t) {
+ var obj = {
+ a: 1,
+ b: 2,
+ c: 3
+ };
+ var keys = ['a', 'b', 'c'];
+
+ var F = function () {
+ this.a = 1;
+ this.b = 2;
+ };
+ F.prototype.c = 3;
+ var fKeys = ['a', 'b'];
+
+ t.test('iterates over every object literal key', function (st) {
+ var counter = 0;
+ forEach(obj, function () { counter += 1; });
+ st.equal(counter, keys.length, 'iterated ' + counter + ' times');
+ st.end();
+ });
+
+ t.test('iterates only over own keys', function (st) {
+ var counter = 0;
+ forEach(new F(), function () { counter += 1; });
+ st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times');
+ st.end();
+ });
+
+ t.test('first iterator argument', function (st) {
+ var index = 0;
+ st.plan(keys.length);
+ forEach(obj, function (item) {
+ st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument');
+ index += 1;
+ });
+ st.end();
+ });
+
+ t.test('second iterator argument', function (st) {
+ var counter = 0;
+ st.plan(keys.length);
+ forEach(obj, function (item, key) {
+ st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument');
+ counter += 1;
+ });
+ st.end();
+ });
+
+ t.test('third iterator argument', function (st) {
+ st.plan(keys.length);
+ forEach(obj, function (item, key, object) {
+ st.deepEqual(obj, object, 'object is passed as third argument');
+ });
+ st.end();
+ });
+
+ t.test('context argument', function (st) {
+ var context = {};
+ st.plan(1);
+ forEach({foo: 'bar'}, function () {
+ st.equal(this, context, '"this" is the passed context');
+ }, context);
+ st.end();
+ });
+
+ t.end();
+});
+
+
+test('string', function (t) {
+ var str = 'str';
+ t.test('second iterator argument', function (st) {
+ var counter = 0;
+ st.plan(str.length * 2 + 1);
+ forEach(str, function (item, index) {
+ st.equal(counter, index, 'index ' + index + ' is passed as second argument');
+ st.equal(str.charAt(index), item);
+ counter += 1;
+ });
+ st.equal(counter, str.length, 'iterates ' + str.length + ' times');
+ });
+ t.end();
+});
+
diff --git a/node_modules/object-keys/test/index.js b/node_modules/object-keys/test/index.js
new file mode 100644
index 0000000..8b77b1f
--- /dev/null
+++ b/node_modules/object-keys/test/index.js
@@ -0,0 +1,6 @@
+
+require('./foreach');
+require('./isArguments');
+
+require('./shim');
+
diff --git a/node_modules/object-keys/test/isArguments.js b/node_modules/object-keys/test/isArguments.js
new file mode 100644
index 0000000..62a07c2
--- /dev/null
+++ b/node_modules/object-keys/test/isArguments.js
@@ -0,0 +1,10 @@
+var test = require('tape');
+var isArguments = require('../isArguments');
+
+test('is.arguments', function (t) {
+ t.notOk(isArguments([]), 'array is not arguments');
+ (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }());
+ (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }());
+ t.end();
+});
+
diff --git a/node_modules/object-keys/test/shim.js b/node_modules/object-keys/test/shim.js
new file mode 100644
index 0000000..9d93271
--- /dev/null
+++ b/node_modules/object-keys/test/shim.js
@@ -0,0 +1,134 @@
+var test = require('tape');
+var shimmedKeys = require('../index.js');
+var is = require('is');
+var keys = require('../shim.js');
+var forEach = require('foreach');
+var indexOf = require('indexof');
+
+var obj = {
+ "str": "boz",
+ "obj": {},
+ "arr": [],
+ "bool": true,
+ "num": 42,
+ "aNull": null,
+ "undef": undefined
+};
+var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef'];
+
+test('exports a function', function (t) {
+ if (Object.keys) {
+ t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported');
+ } else {
+ t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported');
+ }
+ t.end();
+});
+
+test('working with actual shim', function (t) {
+ t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys');
+ t.end();
+});
+
+test('works with an object literal', function (t) {
+ var theKeys = keys(obj);
+ t.equal(is.array(theKeys), true, 'returns an array');
+ t.deepEqual(theKeys, objKeys, 'Object has expected keys');
+ t.end();
+});
+
+test('works with an array', function (t) {
+ var arr = [1, 2, 3];
+ var theKeys = keys(arr);
+ t.equal(is.array(theKeys), true, 'returns an array');
+ t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys');
+ t.end();
+});
+
+test('works with a function', function (t) {
+ var foo = function () {};
+ foo.a = true;
+
+ t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error');
+ t.deepEqual(keys(foo), ['a'], 'returns expected keys');
+ t.end();
+});
+
+test('returns names which are own properties', function (t) {
+ forEach(keys(obj), function (name) {
+ t.equal(obj.hasOwnProperty(name), true, name + ' should be returned');
+ });
+ t.end();
+});
+
+test('returns names which are enumerable', function (t) {
+ var k, loopedValues = [];
+ for (k in obj) {
+ loopedValues.push(k);
+ }
+ forEach(keys(obj), function (name) {
+ t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable');
+ });
+ t.end();
+});
+
+test('throws an error for a non-object', function (t) {
+ t.throws(
+ function () { return keys(42); },
+ new TypeError('Object.keys called on a non-object'),
+ 'throws on a non-object'
+ );
+ t.end();
+});
+
+test('works with an object instance', function (t) {
+ var Prototype = function () {};
+ Prototype.prototype.foo = true;
+ var obj = new Prototype();
+ obj.bar = true;
+ var theKeys = keys(obj);
+ t.equal(is.array(theKeys), true, 'returns an array');
+ t.deepEqual(theKeys, ['bar'], 'Instance has expected keys');
+ t.end();
+});
+
+test('works in iOS 5 mobile Safari', function (t) {
+ var Foo = function () {};
+ Foo.a = function () {};
+
+ // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a']
+ t.deepEqual(keys(Foo), ['a'], 'has expected keys');
+ t.end();
+});
+
+test('works in environments with the dontEnum bug (IE < 9)', function (t) {
+ var Foo = function () {};
+ Foo.prototype.a = function () {};
+
+ // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a']
+ t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys');
+ t.end();
+});
+
+test('shadowed properties', function (t) {
+ var shadowedProps = [
+ 'dummyControlProp', /* just to be sure */
+ 'constructor',
+ 'hasOwnProperty',
+ 'isPrototypeOf',
+ 'propertyIsEnumerable',
+ 'toLocaleString',
+ 'toString',
+ 'valueOf'
+ ];
+ shadowedProps.sort();
+ var shadowedObject = {};
+ forEach(shadowedProps, function (value, index) {
+ shadowedObject[value] = index;
+ });
+ var shadowedObjectKeys = keys(shadowedObject);
+ shadowedObjectKeys.sort();
+ t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals');
+ t.end();
+});
+
diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/once/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/once/README.md b/node_modules/once/README.md
new file mode 100644
index 0000000..1f1ffca
--- /dev/null
+++ b/node_modules/once/README.md
@@ -0,0 +1,79 @@
+# once
+
+Only call a function once.
+
+## usage
+
+```javascript
+var once = require('once')
+
+function load (file, cb) {
+ cb = once(cb)
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Or add to the Function.prototype in a responsible way:
+
+```javascript
+// only has to be done once
+require('once').proto()
+
+function load (file, cb) {
+ cb = cb.once()
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Ironically, the prototype feature makes this module twice as
+complicated as necessary.
+
+To check whether you function has been called, use `fn.called`. Once the
+function is called for the first time the return value of the original
+function is saved in `fn.value` and subsequent calls will continue to
+return this value.
+
+```javascript
+var once = require('once')
+
+function load (cb) {
+ cb = once(cb)
+ var stream = createStream()
+ stream.once('data', cb)
+ stream.once('end', function () {
+ if (!cb.called) cb(new Error('not found'))
+ })
+}
+```
+
+## `once.strict(func)`
+
+Throw an error if the function is called twice.
+
+Some functions are expected to be called only once. Using `once` for them would
+potentially hide logical errors.
+
+In the example below, the `greet` function has to call the callback only once:
+
+```javascript
+function greet (name, cb) {
+ // return is missing from the if statement
+ // when no name is passed, the callback is called twice
+ if (!name) cb('Hello anonymous')
+ cb('Hello ' + name)
+}
+
+function log (msg) {
+ console.log(msg)
+}
+
+// this will print 'Hello anonymous' but the logical error will be missed
+greet(null, once(msg))
+
+// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
+greet(null, once.strict(msg))
+```
diff --git a/node_modules/once/once.js b/node_modules/once/once.js
new file mode 100644
index 0000000..2354067
--- /dev/null
+++ b/node_modules/once/once.js
@@ -0,0 +1,42 @@
+var wrappy = require('wrappy')
+module.exports = wrappy(once)
+module.exports.strict = wrappy(onceStrict)
+
+once.proto = once(function () {
+ Object.defineProperty(Function.prototype, 'once', {
+ value: function () {
+ return once(this)
+ },
+ configurable: true
+ })
+
+ Object.defineProperty(Function.prototype, 'onceStrict', {
+ value: function () {
+ return onceStrict(this)
+ },
+ configurable: true
+ })
+})
+
+function once (fn) {
+ var f = function () {
+ if (f.called) return f.value
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ f.called = false
+ return f
+}
+
+function onceStrict (fn) {
+ var f = function () {
+ if (f.called)
+ throw new Error(f.onceError)
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ var name = fn.name || 'Function wrapped with `once`'
+ f.onceError = name + " shouldn't be called more than once"
+ f.called = false
+ return f
+}
diff --git a/node_modules/once/package.json b/node_modules/once/package.json
new file mode 100644
index 0000000..16815b2
--- /dev/null
+++ b/node_modules/once/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "once",
+ "version": "1.4.0",
+ "description": "Run a function exactly one time",
+ "main": "once.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {
+ "wrappy": "1"
+ },
+ "devDependencies": {
+ "tap": "^7.0.1"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "files": [
+ "once.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/once"
+ },
+ "keywords": [
+ "once",
+ "function",
+ "one",
+ "single"
+ ],
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "ISC"
+}
diff --git a/node_modules/p-cancelable/index.d.ts b/node_modules/p-cancelable/index.d.ts
new file mode 100644
index 0000000..8e0c9ef
--- /dev/null
+++ b/node_modules/p-cancelable/index.d.ts
@@ -0,0 +1,176 @@
+declare class CancelErrorClass extends Error {
+ readonly name: 'CancelError';
+ readonly isCanceled: true;
+
+ constructor(reason?: string);
+}
+
+declare namespace PCancelable {
+ /**
+ Accepts a function that is called when the promise is canceled.
+
+ You're not required to call this function. You can call this function multiple times to add multiple cancel handlers.
+ */
+ interface OnCancelFunction {
+ (cancelHandler: () => void): void;
+ shouldReject: boolean;
+ }
+
+ type CancelError = CancelErrorClass;
+}
+
+declare class PCancelable<ValueType> extends Promise<ValueType> {
+ /**
+ Convenience method to make your promise-returning or async function cancelable.
+
+ @param fn - A promise-returning function. The function you specify will have `onCancel` appended to its parameters.
+
+ @example
+ ```
+ import PCancelable = require('p-cancelable');
+
+ const fn = PCancelable.fn((input, onCancel) => {
+ const job = new Job();
+
+ onCancel(() => {
+ job.cleanup();
+ });
+
+ return job.start(); //=> Promise
+ });
+
+ const cancelablePromise = fn('input'); //=> PCancelable
+
+ // …
+
+ cancelablePromise.cancel();
+ ```
+ */
+ static fn<ReturnType>(
+ userFn: (onCancel: PCancelable.OnCancelFunction) => PromiseLike<ReturnType>
+ ): () => PCancelable<ReturnType>;
+ static fn<Agument1Type, ReturnType>(
+ userFn: (
+ argument1: Agument1Type,
+ onCancel: PCancelable.OnCancelFunction
+ ) => PromiseLike<ReturnType>
+ ): (argument1: Agument1Type) => PCancelable<ReturnType>;
+ static fn<Agument1Type, Agument2Type, ReturnType>(
+ userFn: (
+ argument1: Agument1Type,
+ argument2: Agument2Type,
+ onCancel: PCancelable.OnCancelFunction
+ ) => PromiseLike<ReturnType>
+ ): (
+ argument1: Agument1Type,
+ argument2: Agument2Type
+ ) => PCancelable<ReturnType>;
+ static fn<Agument1Type, Agument2Type, Agument3Type, ReturnType>(
+ userFn: (
+ argument1: Agument1Type,
+ argument2: Agument2Type,
+ argument3: Agument3Type,
+ onCancel: PCancelable.OnCancelFunction
+ ) => PromiseLike<ReturnType>
+ ): (
+ argument1: Agument1Type,
+ argument2: Agument2Type,
+ argument3: Agument3Type
+ ) => PCancelable<ReturnType>;
+ static fn<Agument1Type, Agument2Type, Agument3Type, Agument4Type, ReturnType>(
+ userFn: (
+ argument1: Agument1Type,
+ argument2: Agument2Type,
+ argument3: Agument3Type,
+ argument4: Agument4Type,
+ onCancel: PCancelable.OnCancelFunction
+ ) => PromiseLike<ReturnType>
+ ): (
+ argument1: Agument1Type,
+ argument2: Agument2Type,
+ argument3: Agument3Type,
+ argument4: Agument4Type
+ ) => PCancelable<ReturnType>;
+ static fn<
+ Agument1Type,
+ Agument2Type,
+ Agument3Type,
+ Agument4Type,
+ Agument5Type,
+ ReturnType
+ >(
+ userFn: (
+ argument1: Agument1Type,
+ argument2: Agument2Type,
+ argument3: Agument3Type,
+ argument4: Agument4Type,
+ argument5: Agument5Type,
+ onCancel: PCancelable.OnCancelFunction
+ ) => PromiseLike<ReturnType>
+ ): (
+ argument1: Agument1Type,
+ argument2: Agument2Type,
+ argument3: Agument3Type,
+ argument4: Agument4Type,
+ argument5: Agument5Type
+ ) => PCancelable<ReturnType>;
+ static fn<ReturnType>(
+ userFn: (...arguments: unknown[]) => PromiseLike<ReturnType>
+ ): (...arguments: unknown[]) => PCancelable<ReturnType>;
+
+ /**
+ Create a promise that can be canceled.
+
+ Can be constructed in the same was as a [`Promise` constructor](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), but with an appended `onCancel` parameter in `executor`. `PCancelable` is a subclass of `Promise`.
+
+ Cancelling will reject the promise with `CancelError`. To avoid that, set `onCancel.shouldReject` to `false`.
+
+ @example
+ ```
+ import PCancelable = require('p-cancelable');
+
+ const cancelablePromise = new PCancelable((resolve, reject, onCancel) => {
+ const job = new Job();
+
+ onCancel.shouldReject = false;
+ onCancel(() => {
+ job.stop();
+ });
+
+ job.on('finish', resolve);
+ });
+
+ cancelablePromise.cancel(); // Doesn't throw an error
+ ```
+ */
+ constructor(
+ executor: (
+ resolve: (value?: ValueType | PromiseLike<ValueType>) => void,
+ reject: (reason?: unknown) => void,
+ onCancel: PCancelable.OnCancelFunction
+ ) => void
+ );
+
+ /**
+ Whether the promise is canceled.
+ */
+ readonly isCanceled: boolean;
+
+ /**
+ Cancel the promise and optionally provide a reason.
+
+ The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing.
+
+ @param reason - The cancellation reason to reject the promise with.
+ */
+ cancel: (reason?: string) => void;
+
+ /**
+ Rejection reason when `.cancel()` is called.
+
+ It includes a `.isCanceled` property for convenience.
+ */
+ static CancelError: typeof CancelErrorClass;
+}
+
+export = PCancelable;
diff --git a/node_modules/p-cancelable/index.js b/node_modules/p-cancelable/index.js
new file mode 100644
index 0000000..186adce
--- /dev/null
+++ b/node_modules/p-cancelable/index.js
@@ -0,0 +1,111 @@
+'use strict';
+
+class CancelError extends Error {
+ constructor(reason) {
+ super(reason || 'Promise was canceled');
+ this.name = 'CancelError';
+ }
+
+ get isCanceled() {
+ return true;
+ }
+}
+
+class PCancelable {
+ static fn(userFn) {
+ return (...arguments_) => {
+ return new PCancelable((resolve, reject, onCancel) => {
+ arguments_.push(onCancel);
+ // eslint-disable-next-line promise/prefer-await-to-then
+ userFn(...arguments_).then(resolve, reject);
+ });
+ };
+ }
+
+ constructor(executor) {
+ this._cancelHandlers = [];
+ this._isPending = true;
+ this._isCanceled = false;
+ this._rejectOnCancel = true;
+
+ this._promise = new Promise((resolve, reject) => {
+ this._reject = reject;
+
+ const onResolve = value => {
+ if (!this._isCanceled || !onCancel.shouldReject) {
+ this._isPending = false;
+ resolve(value);
+ }
+ };
+
+ const onReject = error => {
+ this._isPending = false;
+ reject(error);
+ };
+
+ const onCancel = handler => {
+ if (!this._isPending) {
+ throw new Error('The `onCancel` handler was attached after the promise settled.');
+ }
+
+ this._cancelHandlers.push(handler);
+ };
+
+ Object.defineProperties(onCancel, {
+ shouldReject: {
+ get: () => this._rejectOnCancel,
+ set: boolean => {
+ this._rejectOnCancel = boolean;
+ }
+ }
+ });
+
+ return executor(onResolve, onReject, onCancel);
+ });
+ }
+
+ then(onFulfilled, onRejected) {
+ // eslint-disable-next-line promise/prefer-await-to-then
+ return this._promise.then(onFulfilled, onRejected);
+ }
+
+ catch(onRejected) {
+ return this._promise.catch(onRejected);
+ }
+
+ finally(onFinally) {
+ return this._promise.finally(onFinally);
+ }
+
+ cancel(reason) {
+ if (!this._isPending || this._isCanceled) {
+ return;
+ }
+
+ this._isCanceled = true;
+
+ if (this._cancelHandlers.length > 0) {
+ try {
+ for (const handler of this._cancelHandlers) {
+ handler();
+ }
+ } catch (error) {
+ this._reject(error);
+ return;
+ }
+ }
+
+ if (this._rejectOnCancel) {
+ this._reject(new CancelError(reason));
+ }
+ }
+
+ get isCanceled() {
+ return this._isCanceled;
+ }
+}
+
+Object.setPrototypeOf(PCancelable.prototype, Promise.prototype);
+
+module.exports = PCancelable;
+module.exports.CancelError = CancelError;
diff --git a/node_modules/p-cancelable/license b/node_modules/p-cancelable/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/p-cancelable/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/p-cancelable/package.json b/node_modules/p-cancelable/package.json
new file mode 100644
index 0000000..aa6a006
--- /dev/null
+++ b/node_modules/p-cancelable/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "p-cancelable",
+ "version": "2.1.1",
+ "description": "Create a promise that can be canceled",
+ "license": "MIT",
+ "repository": "sindresorhus/p-cancelable",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "promise",
+ "cancelable",
+ "cancel",
+ "canceled",
+ "canceling",
+ "cancellable",
+ "cancellation",
+ "abort",
+ "abortable",
+ "aborting",
+ "cleanup",
+ "task",
+ "token",
+ "async",
+ "function",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "delay": "^4.1.0",
+ "promise.prototype.finally": "^3.1.0",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/p-cancelable/readme.md b/node_modules/p-cancelable/readme.md
new file mode 100644
index 0000000..0690cfa
--- /dev/null
+++ b/node_modules/p-cancelable/readme.md
@@ -0,0 +1,153 @@
+# p-cancelable
+
+> Create a promise that can be canceled
+
+Useful for animation, loading resources, long-running async computations, async iteration, etc.
+
+*If you target [Node.js 15](https://medium.com/@nodejs/node-js-v15-0-0-is-here-deb00750f278) or later, this package is [less useful](https://github.com/sindresorhus/p-cancelable/issues/27) and you should probably use [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) instead.*
+
+## Install
+
+```
+$ npm install p-cancelable
+```
+
+## Usage
+
+```js
+const PCancelable = require('p-cancelable');
+
+const cancelablePromise = new PCancelable((resolve, reject, onCancel) => {
+ const worker = new SomeLongRunningOperation();
+
+ onCancel(() => {
+ worker.close();
+ });
+
+ worker.on('finish', resolve);
+ worker.on('error', reject);
+});
+
+(async () => {
+ try {
+ console.log('Operation finished successfully:', await cancelablePromise);
+ } catch (error) {
+ if (cancelablePromise.isCanceled) {
+ // Handle the cancelation here
+ console.log('Operation was canceled');
+ return;
+ }
+
+ throw error;
+ }
+})();
+
+// Cancel the operation after 10 seconds
+setTimeout(() => {
+ cancelablePromise.cancel('Unicorn has changed its color');
+}, 10000);
+```
+
+## API
+
+### new PCancelable(executor)
+
+Same as the [`Promise` constructor](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), but with an appended `onCancel` parameter in `executor`.<br>
+Cancelling will reject the promise with `PCancelable.CancelError`. To avoid that, set `onCancel.shouldReject` to `false`.
+
+```js
+const PCancelable = require('p-cancelable');
+
+const cancelablePromise = new PCancelable((resolve, reject, onCancel) => {
+ const job = new Job();
+
+ onCancel.shouldReject = false;
+ onCancel(() => {
+ job.stop();
+ });
+
+ job.on('finish', resolve);
+});
+
+cancelablePromise.cancel(); // Doesn't throw an error
+```
+
+`PCancelable` is a subclass of `Promise`.
+
+#### onCanceled(fn)
+
+Type: `Function`
+
+Accepts a function that is called when the promise is canceled.
+
+You're not required to call this function. You can call this function multiple times to add multiple cancel handlers.
+
+### PCancelable#cancel(reason?)
+
+Type: `Function`
+
+Cancel the promise and optionally provide a reason.
+
+The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing.
+
+### PCancelable#isCanceled
+
+Type: `boolean`
+
+Whether the promise is canceled.
+
+### PCancelable.CancelError
+
+Type: `Error`
+
+Rejection reason when `.cancel()` is called.
+
+It includes a `.isCanceled` property for convenience.
+
+### PCancelable.fn(fn)
+
+Convenience method to make your promise-returning or async function cancelable.
+
+The function you specify will have `onCancel` appended to its parameters.
+
+```js
+const PCancelable = require('p-cancelable');
+
+const fn = PCancelable.fn((input, onCancel) => {
+ const job = new Job();
+
+ onCancel(() => {
+ job.cleanup();
+ });
+
+ return job.start(); //=> Promise
+});
+
+const cancelablePromise = fn('input'); //=> PCancelable
+
+// …
+
+cancelablePromise.cancel();
+```
+
+## FAQ
+
+### Cancelable vs. Cancellable
+
+[In American English, the verb cancel is usually inflected canceled and canceling—with one l.](http://grammarist.com/spelling/cancel/)<br>Both a [browser API](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable) and the [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises) use this spelling.
+
+### What about the official [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises)?
+
+~~It's still an early draft and I don't really like its current direction. It complicates everything and will require deep changes in the ecosystem to adapt to it. And the way you have to use cancel tokens is verbose and convoluted. I much prefer the more pragmatic and less invasive approach in this module.~~ The proposal was withdrawn.
+
+## p-cancelable for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of p-cancelable and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-p-cancelable?utm_source=npm-p-cancelable&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## Related
+
+- [p-progress](https://github.com/sindresorhus/p-progress) - Create a promise that reports progress
+- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise that defers execution until `.then()` or `.catch()` is called
+- [More…](https://github.com/sindresorhus/promise-fun)
diff --git a/node_modules/p-limit/index.js b/node_modules/p-limit/index.js
new file mode 100644
index 0000000..873f0e7
--- /dev/null
+++ b/node_modules/p-limit/index.js
@@ -0,0 +1,42 @@
+'use strict';
+const pTry = require('p-try');
+
+module.exports = concurrency => {
+ if (concurrency < 1) {
+ throw new TypeError('Expected `concurrency` to be a number from 1 and up');
+ }
+
+ const queue = [];
+ let activeCount = 0;
+
+ const next = () => {
+ activeCount--;
+
+ if (queue.length > 0) {
+ queue.shift()();
+ }
+ };
+
+ return fn => new Promise((resolve, reject) => {
+ const run = () => {
+ activeCount++;
+
+ pTry(fn).then(
+ val => {
+ resolve(val);
+ next();
+ },
+ err => {
+ reject(err);
+ next();
+ }
+ );
+ };
+
+ if (activeCount < concurrency) {
+ run();
+ } else {
+ queue.push(run);
+ }
+ });
+};
diff --git a/node_modules/p-limit/license b/node_modules/p-limit/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/p-limit/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/p-limit/package.json b/node_modules/p-limit/package.json
new file mode 100644
index 0000000..4079517
--- /dev/null
+++ b/node_modules/p-limit/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "p-limit",
+ "version": "1.3.0",
+ "description": "Run multiple promise-returning & async functions with limited concurrency",
+ "license": "MIT",
+ "repository": "sindresorhus/p-limit",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "limit",
+ "limited",
+ "concurrency",
+ "throttle",
+ "throat",
+ "rate",
+ "batch",
+ "ratelimit",
+ "task",
+ "queue",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "dependencies": {
+ "p-try": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "delay": "^2.0.0",
+ "in-range": "^1.0.0",
+ "random-int": "^1.0.0",
+ "time-span": "^2.0.0",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/p-limit/readme.md b/node_modules/p-limit/readme.md
new file mode 100644
index 0000000..9012992
--- /dev/null
+++ b/node_modules/p-limit/readme.md
@@ -0,0 +1,69 @@
+# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit)
+
+> Run multiple promise-returning & async functions with limited concurrency
+
+
+## Install
+
+```
+$ npm install p-limit
+```
+
+
+## Usage
+
+```js
+const pLimit = require('p-limit');
+
+const limit = pLimit(1);
+
+const input = [
+ limit(() => fetchSomething('foo')),
+ limit(() => fetchSomething('bar')),
+ limit(() => doSomething())
+];
+
+(async () => {
+ // Only one promise is run at once
+ const result = await Promise.all(input);
+ console.log(result);
+})();
+```
+
+
+## API
+
+### pLimit(concurrency)
+
+Returns a `limit` function.
+
+#### concurrency
+
+Type: `number`<br>
+Minimum: `1`
+
+Concurrency limit.
+
+### limit(fn)
+
+Returns the promise returned by calling `fn`.
+
+#### fn
+
+Type: `Function`
+
+Promise-returning/async function.
+
+
+## Related
+
+- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control
+- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions
+- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions
+- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/p-locate/index.js b/node_modules/p-locate/index.js
new file mode 100644
index 0000000..7461d66
--- /dev/null
+++ b/node_modules/p-locate/index.js
@@ -0,0 +1,31 @@
+'use strict';
+const pLimit = require('p-limit');
+
+class EndError extends Error {
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+}
+
+// the input can also be a promise, so we `Promise.all()` them both
+const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0])));
+
+module.exports = (iterable, tester, opts) => {
+ opts = Object.assign({
+ concurrency: Infinity,
+ preserveOrder: true
+ }, opts);
+
+ const limit = pLimit(opts.concurrency);
+
+ // start all the promises concurrently with optional limit
+ const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]);
+
+ // check the promises either serially or concurrently
+ const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity);
+
+ return Promise.all(items.map(el => checkLimit(() => finder(el))))
+ .then(() => {})
+ .catch(err => err instanceof EndError ? err.value : Promise.reject(err));
+};
diff --git a/node_modules/p-locate/license b/node_modules/p-locate/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/p-locate/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/p-locate/package.json b/node_modules/p-locate/package.json
new file mode 100644
index 0000000..767002b
--- /dev/null
+++ b/node_modules/p-locate/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "p-locate",
+ "version": "2.0.0",
+ "description": "Get the first fulfilled promise that satisfies the provided testing function",
+ "license": "MIT",
+ "repository": "sindresorhus/p-locate",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "locate",
+ "find",
+ "finder",
+ "search",
+ "searcher",
+ "test",
+ "array",
+ "collection",
+ "iterable",
+ "iterator",
+ "race",
+ "fulfilled",
+ "fastest",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "dependencies": {
+ "p-limit": "^1.1.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "delay": "^1.3.1",
+ "in-range": "^1.0.0",
+ "time-span": "^1.0.0",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/p-locate/readme.md b/node_modules/p-locate/readme.md
new file mode 100644
index 0000000..68b96a4
--- /dev/null
+++ b/node_modules/p-locate/readme.md
@@ -0,0 +1,86 @@
+# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate)
+
+> Get the first fulfilled promise that satisfies the provided testing function
+
+Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+
+
+## Install
+
+```
+$ npm install --save p-locate
+```
+
+
+## Usage
+
+Here we find the first file that exists on disk, in array order.
+
+```js
+const pathExists = require('path-exists');
+const pLocate = require('p-locate');
+
+const files = [
+ 'unicorn.png',
+ 'rainbow.png', // only this one actually exists on disk
+ 'pony.png'
+];
+
+pLocate(files, file => pathExists(file)).then(foundPath => {
+ console.log(foundPath);
+ //=> 'rainbow'
+});
+```
+
+*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.*
+
+
+## API
+
+### pLocate(input, tester, [options])
+
+Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`.
+
+#### input
+
+Type: `Iterable<Promise|any>`
+
+#### tester(element)
+
+Type: `Function`
+
+Expected to return a `Promise<boolean>` or boolean.
+
+#### options
+
+Type: `Object`
+
+##### concurrency
+
+Type: `number`<br>
+Default: `Infinity`<br>
+Minimum: `1`
+
+Number of concurrently pending promises returned by `tester`.
+
+##### preserveOrder
+
+Type: `boolean`<br>
+Default: `true`
+
+Preserve `input` order when searching.
+
+Disable this to improve performance if you don't care about the order.
+
+
+## Related
+
+- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
+- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
+- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/p-try/index.js b/node_modules/p-try/index.js
new file mode 100644
index 0000000..efa2f74
--- /dev/null
+++ b/node_modules/p-try/index.js
@@ -0,0 +1,4 @@
+'use strict';
+module.exports = cb => new Promise(resolve => {
+ resolve(cb());
+});
diff --git a/node_modules/p-try/license b/node_modules/p-try/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/p-try/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/p-try/package.json b/node_modules/p-try/package.json
new file mode 100644
index 0000000..ba2513a
--- /dev/null
+++ b/node_modules/p-try/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "p-try",
+ "version": "1.0.0",
+ "description": "`Promise#try()` ponyfill - Starts a promise chain",
+ "license": "MIT",
+ "repository": "sindresorhus/p-try",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "try",
+ "resolve",
+ "function",
+ "catch",
+ "async",
+ "await",
+ "promises",
+ "settled",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "bluebird"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/p-try/readme.md b/node_modules/p-try/readme.md
new file mode 100644
index 0000000..8e5fddd
--- /dev/null
+++ b/node_modules/p-try/readme.md
@@ -0,0 +1,38 @@
+# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try)
+
+> [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain
+
+[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/)
+
+
+## Install
+
+```
+$ npm install --save p-try
+```
+
+
+## Usage
+
+```js
+const pTry = require('p-try');
+
+pTry(() => {
+ return synchronousFunctionThatMightThrow();
+}).then(value => {
+ console.log(value);
+}).catch(error => {
+ console.error(error);
+});
+```
+
+
+## Related
+
+- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/parse-author/LICENSE b/node_modules/parse-author/LICENSE
new file mode 100644
index 0000000..d734237
--- /dev/null
+++ b/node_modules/parse-author/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2017, Jon Schlinkert
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/parse-author/README.md b/node_modules/parse-author/README.md
new file mode 100644
index 0000000..53b1b3e
--- /dev/null
+++ b/node_modules/parse-author/README.md
@@ -0,0 +1,115 @@
+# parse-author [![NPM version](https://img.shields.io/npm/v/parse-author.svg?style=flat)](https://www.npmjs.com/package/parse-author) [![NPM monthly downloads](https://img.shields.io/npm/dm/parse-author.svg?style=flat)](https://npmjs.org/package/parse-author) [![NPM total downloads](https://img.shields.io/npm/dt/parse-author.svg?style=flat)](https://npmjs.org/package/parse-author) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/parse-author.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/parse-author)
+
+> Parse a string into an object with `name`, `email` and `url` properties following npm conventions. Useful for the `authors` property in package.json or for parsing an AUTHORS file into an array of authors objects.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save parse-author
+```
+
+## Usage
+
+```js
+var parse = require('parse-author');
+```
+
+## Supported formats
+
+Works with a flexible range of formats, any of the properties can be used or missing:
+
+```
+Name
+Name <email> (url)
+Name <email>(url)
+Name<email> (url)
+Name<email>(url)
+Name (url) <email>
+Name (url)<email>
+Name(url) <email>
+Name(url)<email>
+Name (url)
+Name(url)
+Name <email>
+Name<email>
+<email> (url)
+<email>(url)
+(url) <email>
+(url)<email>
+<email>
+(url)
+```
+
+## Examples
+
+```js
+var author = parse('Jon Schlinkert <jon.schlinkert@sellside.com> (https://github.com/jonschlinkert)');
+console.log(author);
+//=> {name: 'Jon Schlinkert', email: 'jon.schlinkert@sellside.com', url: 'https://github.com/jonschlinkert'}
+
+console.log(parse('Jon Schlinkert (https://github.com/jonschlinkert)'));
+//=> {name: 'Jon Schlinkert', url: 'https://github.com/jonschlinkert'}
+
+console.log(parse('Jon Schlinkert <jon.schlinkert@sellside.com>'));
+//=> {name: 'Jon Schlinkert', email: 'jon.schlinkert@sellside.com'}
+
+console.log(parse(''));
+//=> {}
+```
+
+## About
+
+### Related projects
+
+* [author-regex](https://www.npmjs.com/package/author-regex): Regular expression for parsing an `author` string into an object following npm conventions. | [homepage](https://github.com/jonschlinkert/author-regex "Regular expression for parsing an `author` string into an object following npm conventions.")
+* [parse-authors](https://www.npmjs.com/package/parse-authors): Parse a string into an array of objects with `name`, `email` and `url` properties following… [more](https://github.com/jonschlinkert/parse-authors) | [homepage](https://github.com/jonschlinkert/parse-authors "Parse a string into an array of objects with `name`, `email` and `url` properties following npm conventions. Useful for the `authors` property in package.json or for parsing an AUTHORS file into an array of authors objects.")
+* [stringify-author](https://www.npmjs.com/package/stringify-author): Stringify an authors object to `name <email> (url)`. | [homepage](https://github.com/jonschlinkert/stringify-author "Stringify an authors object to `name <email> (url)`.")
+* [stringify-authors](https://www.npmjs.com/package/stringify-authors): Converts an author object or array of author objects into an array of strings. Useful… [more](https://github.com/jonschlinkert/stringify-authors) | [homepage](https://github.com/jonschlinkert/stringify-authors "Converts an author object or array of author objects into an array of strings. Useful for adding authors, maintainers or contributors to documentation, package.json or a readme.")
+
+### Contributing
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 14 | [slang800](https://github.com/slang800) |
+| 12 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 1 | [MitMaro](https://github.com/MitMaro) |
+
+### Building docs
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+### Running tests
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+### Author
+
+**Jon Schlinkert**
+
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+
+### License
+
+Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 08, 2017._ \ No newline at end of file
diff --git a/node_modules/parse-author/index.js b/node_modules/parse-author/index.js
new file mode 100644
index 0000000..09afa48
--- /dev/null
+++ b/node_modules/parse-author/index.js
@@ -0,0 +1,43 @@
+/*!
+ * parse-author <https://github.com/jonschlinkert/parse-author>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+
+'use strict';
+
+var regex = require('author-regex');
+
+module.exports = function(str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('expected author to be a string');
+ }
+
+ if (!str || !/\w/.test(str)) {
+ return {};
+ }
+
+ var match = [].concat.apply([], regex().exec(str));
+ var author = {};
+
+ if (match[1]) {
+ author.name = match[1];
+ }
+
+ for (var i = 2; i < match.length; i++) {
+ var val = match[i];
+
+ if (i % 2 === 0 && val && match[i + 1]) {
+ if (val.charAt(0) === '<') {
+ author.email = match[i + 1];
+ i++;
+
+ } else if (val.charAt(0) === '(') {
+ author.url = match[i + 1];
+ i++;
+ }
+ }
+ }
+ return author;
+};
diff --git a/node_modules/parse-author/package.json b/node_modules/parse-author/package.json
new file mode 100644
index 0000000..975e073
--- /dev/null
+++ b/node_modules/parse-author/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "parse-author",
+ "description": "Parse an author, contributor, maintainer or other 'person' string into an object with name, email and url properties following npm conventions.",
+ "version": "2.0.0",
+ "homepage": "https://github.com/jonschlinkert/parse-author",
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "contributors": [
+ "Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)",
+ "Sean Lang <slang800@gmail.com> (http://slang.cx)",
+ "Tim Oram <mitmaro@gmail.com> (http://www.mitmaro.ca)"
+ ],
+ "repository": "jonschlinkert/parse-author",
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/parse-author/issues"
+ },
+ "license": "MIT",
+ "files": [
+ "index.js"
+ ],
+ "main": "index.js",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "dependencies": {
+ "author-regex": "^1.0.0"
+ },
+ "devDependencies": {
+ "mocha": "^3.2.0"
+ },
+ "keywords": [
+ "author",
+ "authors",
+ "contributor",
+ "exec",
+ "expression",
+ "extract",
+ "maintainer",
+ "maintainers",
+ "match",
+ "package",
+ "parse",
+ "person",
+ "pkg",
+ "re",
+ "regex",
+ "regexp",
+ "regular",
+ "somebody"
+ ],
+ "verb": {
+ "run": true,
+ "toc": false,
+ "layout": "default",
+ "tasks": [
+ "readme"
+ ],
+ "plugins": [
+ "gulp-format-md"
+ ],
+ "related": {
+ "list": [
+ "author-regex",
+ "parse-authors",
+ "stringify-author",
+ "stringify-authors"
+ ]
+ },
+ "reflinks": [
+ "verb"
+ ],
+ "lint": {
+ "reflinks": true
+ }
+ }
+}
diff --git a/node_modules/parse-json/index.js b/node_modules/parse-json/index.js
new file mode 100644
index 0000000..04add8a
--- /dev/null
+++ b/node_modules/parse-json/index.js
@@ -0,0 +1,35 @@
+'use strict';
+var errorEx = require('error-ex');
+var fallback = require('./vendor/parse');
+
+var JSONError = errorEx('JSONError', {
+ fileName: errorEx.append('in %s')
+});
+
+module.exports = function (x, reviver, filename) {
+ if (typeof reviver === 'string') {
+ filename = reviver;
+ reviver = null;
+ }
+
+ try {
+ try {
+ return JSON.parse(x, reviver);
+ } catch (err) {
+ fallback.parse(x, {
+ mode: 'json',
+ reviver: reviver
+ });
+
+ throw err;
+ }
+ } catch (err) {
+ var jsonErr = new JSONError(err);
+
+ if (filename) {
+ jsonErr.fileName = filename;
+ }
+
+ throw jsonErr;
+ }
+};
diff --git a/node_modules/parse-json/license b/node_modules/parse-json/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/parse-json/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/parse-json/package.json b/node_modules/parse-json/package.json
new file mode 100644
index 0000000..93e3c41
--- /dev/null
+++ b/node_modules/parse-json/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "parse-json",
+ "version": "2.2.0",
+ "description": "Parse JSON with more helpful errors",
+ "license": "MIT",
+ "repository": "sindresorhus/parse-json",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && node test.js"
+ },
+ "files": [
+ "index.js",
+ "vendor"
+ ],
+ "keywords": [
+ "parse",
+ "json",
+ "graceful",
+ "error",
+ "message",
+ "humanize",
+ "friendly",
+ "helpful",
+ "string",
+ "str"
+ ],
+ "dependencies": {
+ "error-ex": "^1.2.0"
+ },
+ "devDependencies": {
+ "ava": "0.0.4",
+ "xo": "*"
+ },
+ "xo": {
+ "ignores": [
+ "vendor/**"
+ ]
+ }
+}
diff --git a/node_modules/parse-json/readme.md b/node_modules/parse-json/readme.md
new file mode 100644
index 0000000..ca96e60
--- /dev/null
+++ b/node_modules/parse-json/readme.md
@@ -0,0 +1,83 @@
+# parse-json [![Build Status](https://travis-ci.org/sindresorhus/parse-json.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-json)
+
+> Parse JSON with more helpful errors
+
+
+## Install
+
+```
+$ npm install --save parse-json
+```
+
+
+## Usage
+
+```js
+var parseJson = require('parse-json');
+var json = '{\n\t"foo": true,\n}';
+
+
+JSON.parse(json);
+/*
+undefined:3
+}
+^
+SyntaxError: Unexpected token }
+*/
+
+
+parseJson(json);
+/*
+JSONError: Trailing comma in object at 3:1
+}
+^
+*/
+
+
+parseJson(json, 'foo.json');
+/*
+JSONError: Trailing comma in object at 3:1 in foo.json
+}
+^
+*/
+
+
+// you can also add the filename at a later point
+try {
+ parseJson(json);
+} catch (err) {
+ err.fileName = 'foo.json';
+ throw err;
+}
+/*
+JSONError: Trailing comma in object at 3:1 in foo.json
+}
+^
+*/
+```
+
+## API
+
+### parseJson(input, [reviver], [filename])
+
+#### input
+
+Type: `string`
+
+#### reviver
+
+Type: `function`
+
+Prescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter
+) for more.
+
+#### filename
+
+Type: `string`
+
+Filename displayed in the error message.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/parse-json/vendor/parse.js b/node_modules/parse-json/vendor/parse.js
new file mode 100644
index 0000000..5f9fe99
--- /dev/null
+++ b/node_modules/parse-json/vendor/parse.js
@@ -0,0 +1,752 @@
+/*
+ * Author: Alex Kocharin <alex@kocharin.ru>
+ * GIT: https://github.com/rlidwka/jju
+ * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/
+ */
+
+// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
+
+var Uni = require('./unicode')
+
+function isHexDigit(x) {
+ return (x >= '0' && x <= '9')
+ || (x >= 'A' && x <= 'F')
+ || (x >= 'a' && x <= 'f')
+}
+
+function isOctDigit(x) {
+ return x >= '0' && x <= '7'
+}
+
+function isDecDigit(x) {
+ return x >= '0' && x <= '9'
+}
+
+var unescapeMap = {
+ '\'': '\'',
+ '"' : '"',
+ '\\': '\\',
+ 'b' : '\b',
+ 'f' : '\f',
+ 'n' : '\n',
+ 'r' : '\r',
+ 't' : '\t',
+ 'v' : '\v',
+ '/' : '/',
+}
+
+function formatError(input, msg, position, lineno, column, json5) {
+ var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1)
+ , tmppos = position - column - 1
+ , srcline = ''
+ , underline = ''
+
+ var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON
+
+ // output no more than 70 characters before the wrong ones
+ if (tmppos < position - 70) {
+ tmppos = position - 70
+ }
+
+ while (1) {
+ var chr = input[++tmppos]
+
+ if (isLineTerminator(chr) || tmppos === input.length) {
+ if (position >= tmppos) {
+ // ending line error, so show it after the last char
+ underline += '^'
+ }
+ break
+ }
+ srcline += chr
+
+ if (position === tmppos) {
+ underline += '^'
+ } else if (position > tmppos) {
+ underline += input[tmppos] === '\t' ? '\t' : ' '
+ }
+
+ // output no more than 78 characters on the string
+ if (srcline.length > 78) break
+ }
+
+ return result + '\n' + srcline + '\n' + underline
+}
+
+function parse(input, options) {
+ // parse as a standard JSON mode
+ var json5 = !(options.mode === 'json' || options.legacy)
+ var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON
+ var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON
+
+ var length = input.length
+ , lineno = 0
+ , linestart = 0
+ , position = 0
+ , stack = []
+
+ var tokenStart = function() {}
+ var tokenEnd = function(v) {return v}
+
+ /* tokenize({
+ raw: '...',
+ type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline',
+ value: 'number'|'string'|'whatever',
+ path: [...],
+ })
+ */
+ if (options._tokenize) {
+ ;(function() {
+ var start = null
+ tokenStart = function() {
+ if (start !== null) throw Error('internal error, token overlap')
+ start = position
+ }
+
+ tokenEnd = function(v, type) {
+ if (start != position) {
+ var hash = {
+ raw: input.substr(start, position-start),
+ type: type,
+ stack: stack.slice(0),
+ }
+ if (v !== undefined) hash.value = v
+ options._tokenize.call(null, hash)
+ }
+ start = null
+ return v
+ }
+ })()
+ }
+
+ function fail(msg) {
+ var column = position - linestart
+
+ if (!msg) {
+ if (position < length) {
+ var token = '\'' +
+ JSON
+ .stringify(input[position])
+ .replace(/^"|"$/g, '')
+ .replace(/'/g, "\\'")
+ .replace(/\\"/g, '"')
+ + '\''
+
+ if (!msg) msg = 'Unexpected token ' + token
+ } else {
+ if (!msg) msg = 'Unexpected end of input'
+ }
+ }
+
+ var error = SyntaxError(formatError(input, msg, position, lineno, column, json5))
+ error.row = lineno + 1
+ error.column = column + 1
+ throw error
+ }
+
+ function newline(chr) {
+ // account for <cr><lf>
+ if (chr === '\r' && input[position] === '\n') position++
+ linestart = position
+ lineno++
+ }
+
+ function parseGeneric() {
+ var result
+
+ while (position < length) {
+ tokenStart()
+ var chr = input[position++]
+
+ if (chr === '"' || (chr === '\'' && json5)) {
+ return tokenEnd(parseString(chr), 'literal')
+
+ } else if (chr === '{') {
+ tokenEnd(undefined, 'separator')
+ return parseObject()
+
+ } else if (chr === '[') {
+ tokenEnd(undefined, 'separator')
+ return parseArray()
+
+ } else if (chr === '-'
+ || chr === '.'
+ || isDecDigit(chr)
+ // + number Infinity NaN
+ || (json5 && (chr === '+' || chr === 'I' || chr === 'N'))
+ ) {
+ return tokenEnd(parseNumber(), 'literal')
+
+ } else if (chr === 'n') {
+ parseKeyword('null')
+ return tokenEnd(null, 'literal')
+
+ } else if (chr === 't') {
+ parseKeyword('true')
+ return tokenEnd(true, 'literal')
+
+ } else if (chr === 'f') {
+ parseKeyword('false')
+ return tokenEnd(false, 'literal')
+
+ } else {
+ position--
+ return tokenEnd(undefined)
+ }
+ }
+ }
+
+ function parseKey() {
+ var result
+
+ while (position < length) {
+ tokenStart()
+ var chr = input[position++]
+
+ if (chr === '"' || (chr === '\'' && json5)) {
+ return tokenEnd(parseString(chr), 'key')
+
+ } else if (chr === '{') {
+ tokenEnd(undefined, 'separator')
+ return parseObject()
+
+ } else if (chr === '[') {
+ tokenEnd(undefined, 'separator')
+ return parseArray()
+
+ } else if (chr === '.'
+ || isDecDigit(chr)
+ ) {
+ return tokenEnd(parseNumber(true), 'key')
+
+ } else if (json5
+ && Uni.isIdentifierStart(chr) || (chr === '\\' && input[position] === 'u')) {
+ // unicode char or a unicode sequence
+ var rollback = position - 1
+ var result = parseIdentifier()
+
+ if (result === undefined) {
+ position = rollback
+ return tokenEnd(undefined)
+ } else {
+ return tokenEnd(result, 'key')
+ }
+
+ } else {
+ position--
+ return tokenEnd(undefined)
+ }
+ }
+ }
+
+ function skipWhiteSpace() {
+ tokenStart()
+ while (position < length) {
+ var chr = input[position++]
+
+ if (isLineTerminator(chr)) {
+ position--
+ tokenEnd(undefined, 'whitespace')
+ tokenStart()
+ position++
+ newline(chr)
+ tokenEnd(undefined, 'newline')
+ tokenStart()
+
+ } else if (isWhiteSpace(chr)) {
+ // nothing
+
+ } else if (chr === '/'
+ && json5
+ && (input[position] === '/' || input[position] === '*')
+ ) {
+ position--
+ tokenEnd(undefined, 'whitespace')
+ tokenStart()
+ position++
+ skipComment(input[position++] === '*')
+ tokenEnd(undefined, 'comment')
+ tokenStart()
+
+ } else {
+ position--
+ break
+ }
+ }
+ return tokenEnd(undefined, 'whitespace')
+ }
+
+ function skipComment(multi) {
+ while (position < length) {
+ var chr = input[position++]
+
+ if (isLineTerminator(chr)) {
+ // LineTerminator is an end of singleline comment
+ if (!multi) {
+ // let parent function deal with newline
+ position--
+ return
+ }
+
+ newline(chr)
+
+ } else if (chr === '*' && multi) {
+ // end of multiline comment
+ if (input[position] === '/') {
+ position++
+ return
+ }
+
+ } else {
+ // nothing
+ }
+ }
+
+ if (multi) {
+ fail('Unclosed multiline comment')
+ }
+ }
+
+ function parseKeyword(keyword) {
+ // keyword[0] is not checked because it should've checked earlier
+ var _pos = position
+ var len = keyword.length
+ for (var i=1; i<len; i++) {
+ if (position >= length || keyword[i] != input[position]) {
+ position = _pos-1
+ fail()
+ }
+ position++
+ }
+ }
+
+ function parseObject() {
+ var result = options.null_prototype ? Object.create(null) : {}
+ , empty_object = {}
+ , is_non_empty = false
+
+ while (position < length) {
+ skipWhiteSpace()
+ var item1 = parseKey()
+ skipWhiteSpace()
+ tokenStart()
+ var chr = input[position++]
+ tokenEnd(undefined, 'separator')
+
+ if (chr === '}' && item1 === undefined) {
+ if (!json5 && is_non_empty) {
+ position--
+ fail('Trailing comma in object')
+ }
+ return result
+
+ } else if (chr === ':' && item1 !== undefined) {
+ skipWhiteSpace()
+ stack.push(item1)
+ var item2 = parseGeneric()
+ stack.pop()
+
+ if (item2 === undefined) fail('No value found for key ' + item1)
+ if (typeof(item1) !== 'string') {
+ if (!json5 || typeof(item1) !== 'number') {
+ fail('Wrong key type: ' + item1)
+ }
+ }
+
+ if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') {
+ if (options.reserved_keys === 'throw') {
+ fail('Reserved key: ' + item1)
+ } else {
+ // silently ignore it
+ }
+ } else {
+ if (typeof(options.reviver) === 'function') {
+ item2 = options.reviver.call(null, item1, item2)
+ }
+
+ if (item2 !== undefined) {
+ is_non_empty = true
+ Object.defineProperty(result, item1, {
+ value: item2,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+ })
+ }
+ }
+
+ skipWhiteSpace()
+
+ tokenStart()
+ var chr = input[position++]
+ tokenEnd(undefined, 'separator')
+
+ if (chr === ',') {
+ continue
+
+ } else if (chr === '}') {
+ return result
+
+ } else {
+ fail()
+ }
+
+ } else {
+ position--
+ fail()
+ }
+ }
+
+ fail()
+ }
+
+ function parseArray() {
+ var result = []
+
+ while (position < length) {
+ skipWhiteSpace()
+ stack.push(result.length)
+ var item = parseGeneric()
+ stack.pop()
+ skipWhiteSpace()
+ tokenStart()
+ var chr = input[position++]
+ tokenEnd(undefined, 'separator')
+
+ if (item !== undefined) {
+ if (typeof(options.reviver) === 'function') {
+ item = options.reviver.call(null, String(result.length), item)
+ }
+ if (item === undefined) {
+ result.length++
+ item = true // hack for check below, not included into result
+ } else {
+ result.push(item)
+ }
+ }
+
+ if (chr === ',') {
+ if (item === undefined) {
+ fail('Elisions are not supported')
+ }
+
+ } else if (chr === ']') {
+ if (!json5 && item === undefined && result.length) {
+ position--
+ fail('Trailing comma in array')
+ }
+ return result
+
+ } else {
+ position--
+ fail()
+ }
+ }
+ }
+
+ function parseNumber() {
+ // rewind because we don't know first char
+ position--
+
+ var start = position
+ , chr = input[position++]
+ , t
+
+ var to_num = function(is_octal) {
+ var str = input.substr(start, position - start)
+
+ if (is_octal) {
+ var result = parseInt(str.replace(/^0o?/, ''), 8)
+ } else {
+ var result = Number(str)
+ }
+
+ if (Number.isNaN(result)) {
+ position--
+ fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"')
+ } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) {
+ // additional restrictions imposed by json
+ position--
+ fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"')
+ } else {
+ return result
+ }
+ }
+
+ // ex: -5982475.249875e+29384
+ // ^ skipping this
+ if (chr === '-' || (chr === '+' && json5)) chr = input[position++]
+
+ if (chr === 'N' && json5) {
+ parseKeyword('NaN')
+ return NaN
+ }
+
+ if (chr === 'I' && json5) {
+ parseKeyword('Infinity')
+
+ // returning +inf or -inf
+ return to_num()
+ }
+
+ if (chr >= '1' && chr <= '9') {
+ // ex: -5982475.249875e+29384
+ // ^^^ skipping these
+ while (position < length && isDecDigit(input[position])) position++
+ chr = input[position++]
+ }
+
+ // special case for leading zero: 0.123456
+ if (chr === '0') {
+ chr = input[position++]
+
+ // new syntax, "0o777" old syntax, "0777"
+ var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr)
+ var is_hex = chr === 'x' || chr === 'X'
+
+ if (json5 && (is_octal || is_hex)) {
+ while (position < length
+ && (is_hex ? isHexDigit : isOctDigit)( input[position] )
+ ) position++
+
+ var sign = 1
+ if (input[start] === '-') {
+ sign = -1
+ start++
+ } else if (input[start] === '+') {
+ start++
+ }
+
+ return sign * to_num(is_octal)
+ }
+ }
+
+ if (chr === '.') {
+ // ex: -5982475.249875e+29384
+ // ^^^ skipping these
+ while (position < length && isDecDigit(input[position])) position++
+ chr = input[position++]
+ }
+
+ if (chr === 'e' || chr === 'E') {
+ chr = input[position++]
+ if (chr === '-' || chr === '+') position++
+ // ex: -5982475.249875e+29384
+ // ^^^ skipping these
+ while (position < length && isDecDigit(input[position])) position++
+ chr = input[position++]
+ }
+
+ // we have char in the buffer, so count for it
+ position--
+ return to_num()
+ }
+
+ function parseIdentifier() {
+ // rewind because we don't know first char
+ position--
+
+ var result = ''
+
+ while (position < length) {
+ var chr = input[position++]
+
+ if (chr === '\\'
+ && input[position] === 'u'
+ && isHexDigit(input[position+1])
+ && isHexDigit(input[position+2])
+ && isHexDigit(input[position+3])
+ && isHexDigit(input[position+4])
+ ) {
+ // UnicodeEscapeSequence
+ chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16))
+ position += 5
+ }
+
+ if (result.length) {
+ // identifier started
+ if (Uni.isIdentifierPart(chr)) {
+ result += chr
+ } else {
+ position--
+ return result
+ }
+
+ } else {
+ if (Uni.isIdentifierStart(chr)) {
+ result += chr
+ } else {
+ return undefined
+ }
+ }
+ }
+
+ fail()
+ }
+
+ function parseString(endChar) {
+ // 7.8.4 of ES262 spec
+ var result = ''
+
+ while (position < length) {
+ var chr = input[position++]
+
+ if (chr === endChar) {
+ return result
+
+ } else if (chr === '\\') {
+ if (position >= length) fail()
+ chr = input[position++]
+
+ if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != "'"))) {
+ result += unescapeMap[chr]
+
+ } else if (json5 && isLineTerminator(chr)) {
+ // line continuation
+ newline(chr)
+
+ } else if (chr === 'u' || (chr === 'x' && json5)) {
+ // unicode/character escape sequence
+ var off = chr === 'u' ? 4 : 2
+
+ // validation for \uXXXX
+ for (var i=0; i<off; i++) {
+ if (position >= length) fail()
+ if (!isHexDigit(input[position])) fail('Bad escape sequence')
+ position++
+ }
+
+ result += String.fromCharCode(parseInt(input.substr(position-off, off), 16))
+ } else if (json5 && isOctDigit(chr)) {
+ if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) {
+ // three-digit octal
+ var digits = 3
+ } else if (isOctDigit(input[position])) {
+ // two-digit octal
+ var digits = 2
+ } else {
+ var digits = 1
+ }
+ position += digits - 1
+ result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8))
+ /*if (!isOctDigit(input[position])) {
+ // \0 is allowed still
+ result += '\0'
+ } else {
+ fail('Octal literals are not supported')
+ }*/
+
+ } else if (json5) {
+ // \X -> x
+ result += chr
+
+ } else {
+ position--
+ fail()
+ }
+
+ } else if (isLineTerminator(chr)) {
+ fail()
+
+ } else {
+ if (!json5 && chr.charCodeAt(0) < 32) {
+ position--
+ fail('Unexpected control character')
+ }
+
+ // SourceCharacter but not one of " or \ or LineTerminator
+ result += chr
+ }
+ }
+
+ fail()
+ }
+
+ skipWhiteSpace()
+ var return_value = parseGeneric()
+ if (return_value !== undefined || position < length) {
+ skipWhiteSpace()
+
+ if (position >= length) {
+ if (typeof(options.reviver) === 'function') {
+ return_value = options.reviver.call(null, '', return_value)
+ }
+ return return_value
+ } else {
+ fail()
+ }
+
+ } else {
+ if (position) {
+ fail('No data, only a whitespace')
+ } else {
+ fail('No data, empty input')
+ }
+ }
+}
+
+/*
+ * parse(text, options)
+ * or
+ * parse(text, reviver)
+ *
+ * where:
+ * text - string
+ * options - object
+ * reviver - function
+ */
+module.exports.parse = function parseJSON(input, options) {
+ // support legacy functions
+ if (typeof(options) === 'function') {
+ options = {
+ reviver: options
+ }
+ }
+
+ if (input === undefined) {
+ // parse(stringify(x)) should be equal x
+ // with JSON functions it is not 'cause of undefined
+ // so we're fixing it
+ return undefined
+ }
+
+ // JSON.parse compat
+ if (typeof(input) !== 'string') input = String(input)
+ if (options == null) options = {}
+ if (options.reserved_keys == null) options.reserved_keys = 'ignore'
+
+ if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') {
+ if (options.null_prototype == null) {
+ options.null_prototype = true
+ }
+ }
+
+ try {
+ return parse(input, options)
+ } catch(err) {
+ // jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack
+ //
+ // this catch is used to skip all those internal calls
+ if (err instanceof SyntaxError && err.row != null && err.column != null) {
+ var old_err = err
+ err = SyntaxError(old_err.message)
+ err.column = old_err.column
+ err.row = old_err.row
+ }
+ throw err
+ }
+}
+
+module.exports.tokenize = function tokenizeJSON(input, options) {
+ if (options == null) options = {}
+
+ options._tokenize = function(smth) {
+ if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack)
+ tokens.push(smth)
+ }
+
+ var tokens = []
+ tokens.data = module.exports.parse(input, options)
+ return tokens
+}
+
diff --git a/node_modules/parse-json/vendor/unicode.js b/node_modules/parse-json/vendor/unicode.js
new file mode 100644
index 0000000..1a29143
--- /dev/null
+++ b/node_modules/parse-json/vendor/unicode.js
@@ -0,0 +1,71 @@
+
+// This is autogenerated with esprima tools, see:
+// https://github.com/ariya/esprima/blob/master/esprima.js
+//
+// PS: oh God, I hate Unicode
+
+// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart:
+
+var Uni = module.exports
+
+module.exports.isWhiteSpace = function isWhiteSpace(x) {
+ // section 7.2, table 2
+ return x === '\u0020'
+ || x === '\u00A0'
+ || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one
+ || (x >= '\u0009' && x <= '\u000D') // 9 A B C D
+
+ // + whitespace characters from unicode, category Zs
+ || x === '\u1680'
+ || x === '\u180E'
+ || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A
+ || x === '\u2028'
+ || x === '\u2029'
+ || x === '\u202F'
+ || x === '\u205F'
+ || x === '\u3000'
+}
+
+module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) {
+ return x === '\u0020'
+ || x === '\u0009'
+ || x === '\u000A'
+ || x === '\u000D'
+}
+
+module.exports.isLineTerminator = function isLineTerminator(x) {
+ // ok, here is the part when JSON is wrong
+ // section 7.3, table 3
+ return x === '\u000A'
+ || x === '\u000D'
+ || x === '\u2028'
+ || x === '\u2029'
+}
+
+module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) {
+ return x === '\u000A'
+ || x === '\u000D'
+}
+
+module.exports.isIdentifierStart = function isIdentifierStart(x) {
+ return x === '$'
+ || x === '_'
+ || (x >= 'A' && x <= 'Z')
+ || (x >= 'a' && x <= 'z')
+ || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x))
+}
+
+module.exports.isIdentifierPart = function isIdentifierPart(x) {
+ return x === '$'
+ || x === '_'
+ || (x >= 'A' && x <= 'Z')
+ || (x >= 'a' && x <= 'z')
+ || (x >= '0' && x <= '9') // <-- addition to Start
+ || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x))
+}
+
+module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
+
+// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart:
+
+module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
diff --git a/node_modules/path-exists/index.js b/node_modules/path-exists/index.js
new file mode 100644
index 0000000..16ae60a
--- /dev/null
+++ b/node_modules/path-exists/index.js
@@ -0,0 +1,17 @@
+'use strict';
+const fs = require('fs');
+
+module.exports = fp => new Promise(resolve => {
+ fs.access(fp, err => {
+ resolve(!err);
+ });
+});
+
+module.exports.sync = fp => {
+ try {
+ fs.accessSync(fp);
+ return true;
+ } catch (err) {
+ return false;
+ }
+};
diff --git a/node_modules/path-exists/license b/node_modules/path-exists/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/path-exists/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/path-exists/package.json b/node_modules/path-exists/package.json
new file mode 100644
index 0000000..efd5626
--- /dev/null
+++ b/node_modules/path-exists/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "path-exists",
+ "version": "3.0.0",
+ "description": "Check if a path exists",
+ "license": "MIT",
+ "repository": "sindresorhus/path-exists",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "exists",
+ "exist",
+ "file",
+ "filepath",
+ "fs",
+ "filesystem",
+ "file-system",
+ "access",
+ "stat"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/path-exists/readme.md b/node_modules/path-exists/readme.md
new file mode 100644
index 0000000..1b65fa7
--- /dev/null
+++ b/node_modules/path-exists/readme.md
@@ -0,0 +1,50 @@
+# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists)
+
+> Check if a path exists
+
+Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
+
+Never use this before handling a file though:
+
+> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.
+
+
+## Install
+
+```
+$ npm install --save path-exists
+```
+
+
+## Usage
+
+```js
+// foo.js
+const pathExists = require('path-exists');
+
+pathExists('foo.js').then(exists => {
+ console.log(exists);
+ //=> true
+});
+```
+
+
+## API
+
+### pathExists(path)
+
+Returns a promise for a boolean of whether the path exists.
+
+### pathExists.sync(path)
+
+Returns a boolean of whether the path exists.
+
+
+## Related
+
+- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js
new file mode 100644
index 0000000..22aa6c3
--- /dev/null
+++ b/node_modules/path-is-absolute/index.js
@@ -0,0 +1,20 @@
+'use strict';
+
+function posix(path) {
+ return path.charAt(0) === '/';
+}
+
+function win32(path) {
+ // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
+ var result = splitDeviceRe.exec(path);
+ var device = result[1] || '';
+ var isUnc = Boolean(device && device.charAt(1) !== ':');
+
+ // UNC paths are always absolute
+ return Boolean(result[2] || isUnc);
+}
+
+module.exports = process.platform === 'win32' ? win32 : posix;
+module.exports.posix = posix;
+module.exports.win32 = win32;
diff --git a/node_modules/path-is-absolute/license b/node_modules/path-is-absolute/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/path-is-absolute/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json
new file mode 100644
index 0000000..91196d5
--- /dev/null
+++ b/node_modules/path-is-absolute/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "path-is-absolute",
+ "version": "1.0.1",
+ "description": "Node.js 0.12 path.isAbsolute() ponyfill",
+ "license": "MIT",
+ "repository": "sindresorhus/path-is-absolute",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "paths",
+ "file",
+ "dir",
+ "absolute",
+ "isabsolute",
+ "is-absolute",
+ "built-in",
+ "util",
+ "utils",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "is",
+ "detect",
+ "check"
+ ],
+ "devDependencies": {
+ "xo": "^0.16.0"
+ }
+}
diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md
new file mode 100644
index 0000000..8dbdf5f
--- /dev/null
+++ b/node_modules/path-is-absolute/readme.md
@@ -0,0 +1,59 @@
+# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
+
+> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)
+
+
+## Install
+
+```
+$ npm install --save path-is-absolute
+```
+
+
+## Usage
+
+```js
+const pathIsAbsolute = require('path-is-absolute');
+
+// Running on Linux
+pathIsAbsolute('/home/foo');
+//=> true
+pathIsAbsolute('C:/Users/foo');
+//=> false
+
+// Running on Windows
+pathIsAbsolute('C:/Users/foo');
+//=> true
+pathIsAbsolute('/home/foo');
+//=> false
+
+// Running on any OS
+pathIsAbsolute.posix('/home/foo');
+//=> true
+pathIsAbsolute.posix('C:/Users/foo');
+//=> false
+pathIsAbsolute.win32('C:/Users/foo');
+//=> true
+pathIsAbsolute.win32('/home/foo');
+//=> false
+```
+
+
+## API
+
+See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).
+
+### pathIsAbsolute(path)
+
+### pathIsAbsolute.posix(path)
+
+POSIX specific version.
+
+### pathIsAbsolute.win32(path)
+
+Windows specific version.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/path-key/index.d.ts b/node_modules/path-key/index.d.ts
new file mode 100644
index 0000000..7c575d1
--- /dev/null
+++ b/node_modules/path-key/index.d.ts
@@ -0,0 +1,40 @@
+/// <reference types="node" />
+
+declare namespace pathKey {
+ interface Options {
+ /**
+ Use a custom environment variables object. Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env).
+ */
+ readonly env?: {[key: string]: string | undefined};
+
+ /**
+ Get the PATH key for a specific platform. Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform).
+ */
+ readonly platform?: NodeJS.Platform;
+ }
+}
+
+declare const pathKey: {
+ /**
+ Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform.
+
+ @example
+ ```
+ import pathKey = require('path-key');
+
+ const key = pathKey();
+ //=> 'PATH'
+
+ const PATH = process.env[key];
+ //=> '/usr/local/bin:/usr/bin:/bin'
+ ```
+ */
+ (options?: pathKey.Options): string;
+
+ // TODO: Remove this for the next major release, refactor the whole definition to:
+ // declare function pathKey(options?: pathKey.Options): string;
+ // export = pathKey;
+ default: typeof pathKey;
+};
+
+export = pathKey;
diff --git a/node_modules/path-key/index.js b/node_modules/path-key/index.js
new file mode 100644
index 0000000..0cf6415
--- /dev/null
+++ b/node_modules/path-key/index.js
@@ -0,0 +1,16 @@
+'use strict';
+
+const pathKey = (options = {}) => {
+ const environment = options.env || process.env;
+ const platform = options.platform || process.platform;
+
+ if (platform !== 'win32') {
+ return 'PATH';
+ }
+
+ return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';
+};
+
+module.exports = pathKey;
+// TODO: Remove this for the next major release
+module.exports.default = pathKey;
diff --git a/node_modules/path-key/license b/node_modules/path-key/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/path-key/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/path-key/package.json b/node_modules/path-key/package.json
new file mode 100644
index 0000000..c8cbd38
--- /dev/null
+++ b/node_modules/path-key/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "path-key",
+ "version": "3.1.1",
+ "description": "Get the PATH environment variable key cross-platform",
+ "license": "MIT",
+ "repository": "sindresorhus/path-key",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "path",
+ "key",
+ "environment",
+ "env",
+ "variable",
+ "var",
+ "get",
+ "cross-platform",
+ "windows"
+ ],
+ "devDependencies": {
+ "@types/node": "^11.13.0",
+ "ava": "^1.4.1",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/path-key/readme.md b/node_modules/path-key/readme.md
new file mode 100644
index 0000000..a9052d7
--- /dev/null
+++ b/node_modules/path-key/readme.md
@@ -0,0 +1,61 @@
+# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)
+
+> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform
+
+It's usually `PATH`, but on Windows it can be any casing like `Path`...
+
+
+## Install
+
+```
+$ npm install path-key
+```
+
+
+## Usage
+
+```js
+const pathKey = require('path-key');
+
+const key = pathKey();
+//=> 'PATH'
+
+const PATH = process.env[key];
+//=> '/usr/local/bin:/usr/bin:/bin'
+```
+
+
+## API
+
+### pathKey(options?)
+
+#### options
+
+Type: `object`
+
+##### env
+
+Type: `object`<br>
+Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env)
+
+Use a custom environment variables object.
+
+#### platform
+
+Type: `string`<br>
+Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
+
+Get the PATH key for a specific platform.
+
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-path-key?utm_source=npm-path-key&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/path-parse/.travis.yml b/node_modules/path-parse/.travis.yml
new file mode 100644
index 0000000..dae31da
--- /dev/null
+++ b/node_modules/path-parse/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - "0.12"
+ - "0.11"
+ - "0.10"
+ - "0.10.12"
+ - "0.8"
+ - "0.6"
+ - "iojs"
diff --git a/node_modules/path-parse/LICENSE b/node_modules/path-parse/LICENSE
new file mode 100644
index 0000000..810f3db
--- /dev/null
+++ b/node_modules/path-parse/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Javier Blanco
+
+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/path-parse/README.md b/node_modules/path-parse/README.md
new file mode 100644
index 0000000..05097f8
--- /dev/null
+++ b/node_modules/path-parse/README.md
@@ -0,0 +1,42 @@
+# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse)
+
+> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com).
+
+## Install
+
+```
+$ npm install --save path-parse
+```
+
+## Usage
+
+```js
+var pathParse = require('path-parse');
+
+pathParse('/home/user/dir/file.txt');
+//=> {
+// root : "/",
+// dir : "/home/user/dir",
+// base : "file.txt",
+// ext : ".txt",
+// name : "file"
+// }
+```
+
+## API
+
+See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs.
+
+### pathParse(path)
+
+### pathParse.posix(path)
+
+The Posix specific version.
+
+### pathParse.win32(path)
+
+The Windows specific version.
+
+## License
+
+MIT © [Javier Blanco](http://jbgutierrez.info)
diff --git a/node_modules/path-parse/index.js b/node_modules/path-parse/index.js
new file mode 100644
index 0000000..3b7601f
--- /dev/null
+++ b/node_modules/path-parse/index.js
@@ -0,0 +1,93 @@
+'use strict';
+
+var isWindows = process.platform === 'win32';
+
+// Regex to split a windows path into three parts: [*, device, slash,
+// tail] windows-only
+var splitDeviceRe =
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
+
+// Regex to split the tail part of the above into [*, dir, basename, ext]
+var splitTailRe =
+ /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
+
+var win32 = {};
+
+// Function to split a filename into [root, dir, basename, ext]
+function win32SplitPath(filename) {
+ // Separate device+slash from tail
+ var result = splitDeviceRe.exec(filename),
+ device = (result[1] || '') + (result[2] || ''),
+ tail = result[3] || '';
+ // Split the tail into dir, basename and extension
+ var result2 = splitTailRe.exec(tail),
+ dir = result2[1],
+ basename = result2[2],
+ ext = result2[3];
+ return [device, dir, basename, ext];
+}
+
+win32.parse = function(pathString) {
+ if (typeof pathString !== 'string') {
+ throw new TypeError(
+ "Parameter 'pathString' must be a string, not " + typeof pathString
+ );
+ }
+ var allParts = win32SplitPath(pathString);
+ if (!allParts || allParts.length !== 4) {
+ throw new TypeError("Invalid path '" + pathString + "'");
+ }
+ return {
+ root: allParts[0],
+ dir: allParts[0] + allParts[1].slice(0, -1),
+ base: allParts[2],
+ ext: allParts[3],
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
+ };
+};
+
+
+
+// Split a filename into [root, dir, basename, ext], unix version
+// 'root' is just a slash, or nothing.
+var splitPathRe =
+ /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
+var posix = {};
+
+
+function posixSplitPath(filename) {
+ return splitPathRe.exec(filename).slice(1);
+}
+
+
+posix.parse = function(pathString) {
+ if (typeof pathString !== 'string') {
+ throw new TypeError(
+ "Parameter 'pathString' must be a string, not " + typeof pathString
+ );
+ }
+ var allParts = posixSplitPath(pathString);
+ if (!allParts || allParts.length !== 4) {
+ throw new TypeError("Invalid path '" + pathString + "'");
+ }
+ allParts[1] = allParts[1] || '';
+ allParts[2] = allParts[2] || '';
+ allParts[3] = allParts[3] || '';
+
+ return {
+ root: allParts[0],
+ dir: allParts[0] + allParts[1].slice(0, -1),
+ base: allParts[2],
+ ext: allParts[3],
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
+ };
+};
+
+
+if (isWindows)
+ module.exports = win32.parse;
+else /* posix */
+ module.exports = posix.parse;
+
+module.exports.posix = posix.parse;
+module.exports.win32 = win32.parse;
diff --git a/node_modules/path-parse/package.json b/node_modules/path-parse/package.json
new file mode 100644
index 0000000..21332bb
--- /dev/null
+++ b/node_modules/path-parse/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "path-parse",
+ "version": "1.0.6",
+ "description": "Node.js path.parse() ponyfill",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jbgutierrez/path-parse.git"
+ },
+ "keywords": [
+ "path",
+ "paths",
+ "file",
+ "dir",
+ "parse",
+ "built-in",
+ "util",
+ "utils",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim"
+ ],
+ "author": "Javier Blanco <http://jbgutierrez.info>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jbgutierrez/path-parse/issues"
+ },
+ "homepage": "https://github.com/jbgutierrez/path-parse#readme"
+}
diff --git a/node_modules/path-parse/test.js b/node_modules/path-parse/test.js
new file mode 100644
index 0000000..0b30c12
--- /dev/null
+++ b/node_modules/path-parse/test.js
@@ -0,0 +1,77 @@
+var assert = require('assert');
+var pathParse = require('./index');
+
+var winParseTests = [
+ [{ root: 'C:\\', dir: 'C:\\path\\dir', base: 'index.html', ext: '.html', name: 'index' }, 'C:\\path\\dir\\index.html'],
+ [{ root: 'C:\\', dir: 'C:\\another_path\\DIR\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'C:\\another_path\\DIR\\1\\2\\33\\index'],
+ [{ root: '', dir: 'another_path\\DIR with spaces\\1\\2\\33', base: 'index', ext: '', name: 'index' }, 'another_path\\DIR with spaces\\1\\2\\33\\index'],
+ [{ root: '\\', dir: '\\foo', base: 'C:', ext: '', name: 'C:' }, '\\foo\\C:'],
+ [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'],
+ [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, '.\\file'],
+
+ // unc
+ [{ root: '\\\\server\\share\\', dir: '\\\\server\\share\\', base: 'file_path', ext: '', name: 'file_path' }, '\\\\server\\share\\file_path'],
+ [{ root: '\\\\server two\\shared folder\\', dir: '\\\\server two\\shared folder\\', base: 'file path.zip', ext: '.zip', name: 'file path' }, '\\\\server two\\shared folder\\file path.zip'],
+ [{ root: '\\\\teela\\admin$\\', dir: '\\\\teela\\admin$\\', base: 'system32', ext: '', name: 'system32' }, '\\\\teela\\admin$\\system32'],
+ [{ root: '\\\\?\\UNC\\', dir: '\\\\?\\UNC\\server', base: 'share', ext: '', name: 'share' }, '\\\\?\\UNC\\server\\share']
+];
+
+var winSpecialCaseFormatTests = [
+ [{dir: 'some\\dir'}, 'some\\dir\\'],
+ [{base: 'index.html'}, 'index.html'],
+ [{}, '']
+];
+
+var unixParseTests = [
+ [{ root: '/', dir: '/home/user/dir', base: 'file.txt', ext: '.txt', name: 'file' }, '/home/user/dir/file.txt'],
+ [{ root: '/', dir: '/home/user/a dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a dir/another File.zip'],
+ [{ root: '/', dir: '/home/user/a dir/', base: 'another&File.', ext: '.', name: 'another&File' }, '/home/user/a dir//another&File.'],
+ [{ root: '/', dir: '/home/user/a$$$dir/', base: 'another File.zip', ext: '.zip', name: 'another File' }, '/home/user/a$$$dir//another File.zip'],
+ [{ root: '', dir: 'user/dir', base: 'another File.zip', ext: '.zip', name: 'another File' }, 'user/dir/another File.zip'],
+ [{ root: '', dir: '', base: 'file', ext: '', name: 'file' }, 'file'],
+ [{ root: '', dir: '', base: '.\\file', ext: '', name: '.\\file' }, '.\\file'],
+ [{ root: '', dir: '.', base: 'file', ext: '', name: 'file' }, './file'],
+ [{ root: '', dir: '', base: 'C:\\foo', ext: '', name: 'C:\\foo' }, 'C:\\foo']
+];
+
+var unixSpecialCaseFormatTests = [
+ [{dir: 'some/dir'}, 'some/dir/'],
+ [{base: 'index.html'}, 'index.html'],
+ [{}, '']
+];
+
+var errors = [
+ {input: null, message: /Parameter 'pathString' must be a string, not/},
+ {input: {}, message: /Parameter 'pathString' must be a string, not object/},
+ {input: true, message: /Parameter 'pathString' must be a string, not boolean/},
+ {input: 1, message: /Parameter 'pathString' must be a string, not number/},
+ {input: undefined, message: /Parameter 'pathString' must be a string, not undefined/},
+];
+
+checkParseFormat(pathParse.win32, winParseTests);
+checkParseFormat(pathParse.posix, unixParseTests);
+checkErrors(pathParse.win32);
+checkErrors(pathParse.posix);
+
+function checkErrors(parse) {
+ errors.forEach(function(errorCase) {
+ try {
+ parse(errorCase.input);
+ } catch(err) {
+ assert.ok(err instanceof TypeError);
+ assert.ok(
+ errorCase.message.test(err.message),
+ 'expected ' + errorCase.message + ' to match ' + err.message
+ );
+ return;
+ }
+
+ assert.fail('should have thrown');
+ });
+}
+
+function checkParseFormat(parse, testCases) {
+ testCases.forEach(function(testCase) {
+ assert.deepEqual(parse(testCase[1]), testCase[0]);
+ });
+}
diff --git a/node_modules/path-type/index.js b/node_modules/path-type/index.js
new file mode 100644
index 0000000..207a1d1
--- /dev/null
+++ b/node_modules/path-type/index.js
@@ -0,0 +1,29 @@
+'use strict';
+var fs = require('graceful-fs');
+var Promise = require('pinkie-promise');
+var pify = require('pify');
+
+function type(fn, fn2, fp) {
+ if (typeof fp !== 'string') {
+ return Promise.reject(new TypeError('Expected a string'));
+ }
+
+ return pify(fs[fn], Promise)(fp).then(function (stats) {
+ return stats[fn2]();
+ });
+}
+
+function typeSync(fn, fn2, fp) {
+ if (typeof fp !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return fs[fn](fp)[fn2]();
+}
+
+exports.file = type.bind(null, 'stat', 'isFile');
+exports.dir = type.bind(null, 'stat', 'isDirectory');
+exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink');
+exports.fileSync = typeSync.bind(null, 'statSync', 'isFile');
+exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory');
+exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
diff --git a/node_modules/path-type/license b/node_modules/path-type/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/path-type/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/path-type/package.json b/node_modules/path-type/package.json
new file mode 100644
index 0000000..6e54f69
--- /dev/null
+++ b/node_modules/path-type/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "path-type",
+ "version": "1.1.0",
+ "description": "Check if a path is a file, directory, or symlink",
+ "license": "MIT",
+ "repository": "sindresorhus/path-type",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "fs",
+ "type",
+ "is",
+ "check",
+ "directory",
+ "dir",
+ "file",
+ "filepath",
+ "symlink",
+ "symbolic",
+ "link",
+ "stat",
+ "stats",
+ "filesystem"
+ ],
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "xo": {
+ "ignores": [
+ "test.js"
+ ]
+ }
+}
diff --git a/node_modules/path-type/readme.md b/node_modules/path-type/readme.md
new file mode 100644
index 0000000..eac12d6
--- /dev/null
+++ b/node_modules/path-type/readme.md
@@ -0,0 +1,42 @@
+# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type)
+
+> Check if a path is a file, directory, or symlink
+
+
+## Install
+
+```
+$ npm install --save path-type
+```
+
+
+## Usage
+
+```js
+var pathType = require('path-type');
+
+pathType.file('package.json').then(function (isFile) {
+ console.log(isFile);
+ //=> true
+})
+```
+
+
+## API
+
+### .file(path)
+### .dir(path)
+### .symlink(path)
+
+Returns a promise that resolves to a boolean of whether the path is the checked type.
+
+### .fileSync(path)
+### .dirSync(path)
+### .symlinkSync(path)
+
+Returns a boolean of whether the path is the checked type.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/pend/LICENSE b/node_modules/pend/LICENSE
new file mode 100644
index 0000000..0bbb53e
--- /dev/null
+++ b/node_modules/pend/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (Expat)
+
+Copyright (c) 2014 Andrew Kelley
+
+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/pend/README.md b/node_modules/pend/README.md
new file mode 100644
index 0000000..bb40a07
--- /dev/null
+++ b/node_modules/pend/README.md
@@ -0,0 +1,41 @@
+# Pend
+
+Dead-simple optimistic async helper.
+
+## Usage
+
+```js
+var Pend = require('pend');
+var pend = new Pend();
+pend.max = 10; // defaults to Infinity
+setTimeout(pend.hold(), 1000); // pend.wait will have to wait for this hold to finish
+pend.go(function(cb) {
+ console.log("this function is immediately executed");
+ setTimeout(function() {
+ console.log("calling cb 1");
+ cb();
+ }, 500);
+});
+pend.go(function(cb) {
+ console.log("this function is also immediately executed");
+ setTimeout(function() {
+ console.log("calling cb 2");
+ cb();
+ }, 1000);
+});
+pend.wait(function(err) {
+ console.log("this is excuted when the first 2 have returned.");
+ console.log("err is a possible error in the standard callback style.");
+});
+```
+
+Output:
+
+```
+this function is immediately executed
+this function is also immediately executed
+calling cb 1
+calling cb 2
+this is excuted when the first 2 have returned.
+err is a possible error in the standard callback style.
+```
diff --git a/node_modules/pend/index.js b/node_modules/pend/index.js
new file mode 100644
index 0000000..3bf485e
--- /dev/null
+++ b/node_modules/pend/index.js
@@ -0,0 +1,55 @@
+module.exports = Pend;
+
+function Pend() {
+ this.pending = 0;
+ this.max = Infinity;
+ this.listeners = [];
+ this.waiting = [];
+ this.error = null;
+}
+
+Pend.prototype.go = function(fn) {
+ if (this.pending < this.max) {
+ pendGo(this, fn);
+ } else {
+ this.waiting.push(fn);
+ }
+};
+
+Pend.prototype.wait = function(cb) {
+ if (this.pending === 0) {
+ cb(this.error);
+ } else {
+ this.listeners.push(cb);
+ }
+};
+
+Pend.prototype.hold = function() {
+ return pendHold(this);
+};
+
+function pendHold(self) {
+ self.pending += 1;
+ var called = false;
+ return onCb;
+ function onCb(err) {
+ if (called) throw new Error("callback called twice");
+ called = true;
+ self.error = self.error || err;
+ self.pending -= 1;
+ if (self.waiting.length > 0 && self.pending < self.max) {
+ pendGo(self, self.waiting.shift());
+ } else if (self.pending === 0) {
+ var listeners = self.listeners;
+ self.listeners = [];
+ listeners.forEach(cbListener);
+ }
+ }
+ function cbListener(listener) {
+ listener(self.error);
+ }
+}
+
+function pendGo(self, fn) {
+ fn(pendHold(self));
+}
diff --git a/node_modules/pend/package.json b/node_modules/pend/package.json
new file mode 100644
index 0000000..8181f8b
--- /dev/null
+++ b/node_modules/pend/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "pend",
+ "version": "1.2.0",
+ "description": "dead-simple optimistic async helper",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "author": "Andrew Kelley <superjoe30@gmail.com>",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/andrewrk/node-pend.git"
+ },
+ "bugs": {
+ "url": "https://github.com/andrewrk/node-pend/issues"
+ }
+}
diff --git a/node_modules/pend/test.js b/node_modules/pend/test.js
new file mode 100644
index 0000000..75c0f2a
--- /dev/null
+++ b/node_modules/pend/test.js
@@ -0,0 +1,137 @@
+var assert = require('assert');
+var Pend = require('./');
+
+var tests = [
+ {
+ name: "basic",
+ fn: testBasic,
+ },
+ {
+ name: "max",
+ fn: testWithMax,
+ },
+ {
+ name: "callback twice",
+ fn: testCallbackTwice,
+ },
+ {
+ name: "calling wait twice",
+ fn: testCallingWaitTwice,
+ },
+ {
+ name: "hold()",
+ fn: testHoldFn,
+ },
+];
+var testCount = tests.length;
+
+doOneTest();
+
+function doOneTest() {
+ var test = tests.shift();
+ if (!test) {
+ console.log(testCount + " tests passed.");
+ return;
+ }
+ process.stdout.write(test.name + "...");
+ test.fn(function() {
+ process.stdout.write("OK\n");
+ doOneTest();
+ });
+}
+
+function testBasic(cb) {
+ var pend = new Pend();
+ var results = [];
+ pend.go(function(cb) {
+ results.push(1);
+ setTimeout(function() {
+ results.push(3);
+ cb();
+ }, 500);
+ });
+ pend.go(function(cb) {
+ results.push(2);
+ setTimeout(function() {
+ results.push(4);
+ cb();
+ }, 1000);
+ });
+ pend.wait(function(err) {
+ assert.deepEqual(results, [1,2,3,4]);
+ cb();
+ });
+ assert.deepEqual(results, [1, 2]);
+}
+
+function testWithMax(cb) {
+ var pend = new Pend();
+ var results = [];
+ pend.max = 2;
+ pend.go(function(cb) {
+ results.push('a');
+ setTimeout(function() {
+ results.push(1);
+ cb();
+ }, 500);
+ });
+ pend.go(function(cb) {
+ results.push('b');
+ setTimeout(function() {
+ results.push(1);
+ cb();
+ }, 500);
+ });
+ pend.go(function(cb) {
+ results.push('c');
+ setTimeout(function() {
+ results.push(2);
+ cb();
+ }, 100);
+ });
+ pend.wait(function(err) {
+ assert.deepEqual(results, ['a', 'b', 1, 'c', 1, 2]);
+ cb();
+ });
+ assert.deepEqual(results, ['a', 'b']);
+}
+
+function testCallbackTwice(cb) {
+ var pend = new Pend();
+ pend.go(function(cb) {
+ setTimeout(cb, 100);
+ });
+ pend.go(function(cb) {
+ cb();
+ assert.throws(cb, /callback called twice/);
+ });
+ pend.wait(cb);
+}
+
+function testCallingWaitTwice(cb) {
+ var pend = new Pend();
+ pend.go(function(cb) {
+ setTimeout(cb, 100);
+ });
+ pend.wait(function() {
+ pend.go(function(cb) {
+ setTimeout(cb, 50);
+ });
+ pend.go(function(cb) {
+ setTimeout(cb, 10);
+ });
+ pend.go(function(cb) {
+ setTimeout(cb, 20);
+ });
+ pend.wait(cb);
+ });
+}
+
+function testHoldFn(cb) {
+ var pend = new Pend();
+ setTimeout(pend.hold(), 100);
+ pend.go(function(cb) {
+ cb();
+ });
+ pend.wait(cb);
+}
diff --git a/node_modules/performance-now/.npmignore b/node_modules/performance-now/.npmignore
new file mode 100644
index 0000000..496ee2c
--- /dev/null
+++ b/node_modules/performance-now/.npmignore
@@ -0,0 +1 @@
+.DS_Store \ No newline at end of file
diff --git a/node_modules/performance-now/.tm_properties b/node_modules/performance-now/.tm_properties
new file mode 100644
index 0000000..4b8eb3f
--- /dev/null
+++ b/node_modules/performance-now/.tm_properties
@@ -0,0 +1,7 @@
+excludeDirectories = "{.git,node_modules}"
+excludeInFolderSearch = "{excludeDirectories,lib}"
+
+includeFiles = "{.gitignore,.npmignore,.travis.yml}"
+
+[ attr.untitled ]
+fileType = 'source.coffee' \ No newline at end of file
diff --git a/node_modules/performance-now/.travis.yml b/node_modules/performance-now/.travis.yml
new file mode 100644
index 0000000..1543c19
--- /dev/null
+++ b/node_modules/performance-now/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "node"
+ - "6"
+ - "4"
+ - "0.12"
diff --git a/node_modules/performance-now/README.md b/node_modules/performance-now/README.md
new file mode 100644
index 0000000..28080f8
--- /dev/null
+++ b/node_modules/performance-now/README.md
@@ -0,0 +1,30 @@
+# performance-now [![Build Status](https://travis-ci.org/braveg1rl/performance-now.png?branch=master)](https://travis-ci.org/braveg1rl/performance-now) [![Dependency Status](https://david-dm.org/braveg1rl/performance-now.png)](https://david-dm.org/braveg1rl/performance-now)
+
+Implements a function similar to `performance.now` (based on `process.hrtime`).
+
+Modern browsers have a `window.performance` object with - among others - a `now` method which gives time in milliseconds, but with sub-millisecond precision. This module offers the same function based on the Node.js native `process.hrtime` function.
+
+Using `process.hrtime` means that the reported time will be monotonically increasing, and not subject to clock-drift.
+
+According to the [High Resolution Time specification](http://www.w3.org/TR/hr-time/), the number of milliseconds reported by `performance.now` should be relative to the value of `performance.timing.navigationStart`.
+
+In the current version of the module (2.0) the reported time is relative to the time the current Node process has started (inferred from `process.uptime()`).
+
+Version 1.0 reported a different time. The reported time was relative to the time the module was loaded (i.e. the time it was first `require`d). If you need this functionality, version 1.0 is still available on NPM.
+
+## Example usage
+
+```javascript
+var now = require("performance-now")
+var start = now()
+var end = now()
+console.log(start.toFixed(3)) // the number of milliseconds the current node process is running
+console.log((start-end).toFixed(3)) // ~ 0.002 on my system
+```
+
+Running the now function two times right after each other yields a time difference of a few microseconds. Given this overhead, I think it's best to assume that the precision of intervals computed with this method is not higher than 10 microseconds, if you don't know the exact overhead on your own system.
+
+## License
+
+performance-now is released under the [MIT License](http://opensource.org/licenses/MIT).
+Copyright (c) 2017 Braveg1rl
diff --git a/node_modules/performance-now/lib/performance-now.js b/node_modules/performance-now/lib/performance-now.js
new file mode 100644
index 0000000..37f569d
--- /dev/null
+++ b/node_modules/performance-now/lib/performance-now.js
@@ -0,0 +1,36 @@
+// Generated by CoffeeScript 1.12.2
+(function() {
+ var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
+
+ if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
+ module.exports = function() {
+ return performance.now();
+ };
+ } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
+ module.exports = function() {
+ return (getNanoSeconds() - nodeLoadTime) / 1e6;
+ };
+ hrtime = process.hrtime;
+ getNanoSeconds = function() {
+ var hr;
+ hr = hrtime();
+ return hr[0] * 1e9 + hr[1];
+ };
+ moduleLoadTime = getNanoSeconds();
+ upTime = process.uptime() * 1e9;
+ nodeLoadTime = moduleLoadTime - upTime;
+ } else if (Date.now) {
+ module.exports = function() {
+ return Date.now() - loadTime;
+ };
+ loadTime = Date.now();
+ } else {
+ module.exports = function() {
+ return new Date().getTime() - loadTime;
+ };
+ loadTime = new Date().getTime();
+ }
+
+}).call(this);
+
+//# sourceMappingURL=performance-now.js.map
diff --git a/node_modules/performance-now/lib/performance-now.js.map b/node_modules/performance-now/lib/performance-now.js.map
new file mode 100644
index 0000000..bef8362
--- /dev/null
+++ b/node_modules/performance-now/lib/performance-now.js.map
@@ -0,0 +1,10 @@
+{
+ "version": 3,
+ "file": "performance-now.js",
+ "sourceRoot": "..",
+ "sources": [
+ "src/performance-now.coffee"
+ ],
+ "names": [],
+ "mappings": ";AAAA;AAAA,MAAA;;EAAA,IAAG,4DAAA,IAAiB,WAAW,CAAC,GAAhC;IACE,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,WAAW,CAAC,GAAZ,CAAA;IAAH,EADnB;GAAA,MAEK,IAAG,oDAAA,IAAa,OAAO,CAAC,MAAxB;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,CAAC,cAAA,CAAA,CAAA,GAAmB,YAApB,CAAA,GAAoC;IAAvC;IACjB,MAAA,GAAS,OAAO,CAAC;IACjB,cAAA,GAAiB,SAAA;AACf,UAAA;MAAA,EAAA,GAAK,MAAA,CAAA;aACL,EAAG,CAAA,CAAA,CAAH,GAAQ,GAAR,GAAc,EAAG,CAAA,CAAA;IAFF;IAGjB,cAAA,GAAiB,cAAA,CAAA;IACjB,MAAA,GAAS,OAAO,CAAC,MAAR,CAAA,CAAA,GAAmB;IAC5B,YAAA,GAAe,cAAA,GAAiB,OAR7B;GAAA,MASA,IAAG,IAAI,CAAC,GAAR;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,IAAI,CAAC,GAAL,CAAA,CAAA,GAAa;IAAhB;IACjB,QAAA,GAAW,IAAI,CAAC,GAAL,CAAA,EAFR;GAAA,MAAA;IAIH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAO,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,CAAJ,GAAuB;IAA1B;IACjB,QAAA,GAAe,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,EALZ;;AAXL"
+} \ No newline at end of file
diff --git a/node_modules/performance-now/license.txt b/node_modules/performance-now/license.txt
new file mode 100644
index 0000000..0bf51b4
--- /dev/null
+++ b/node_modules/performance-now/license.txt
@@ -0,0 +1,7 @@
+Copyright (c) 2013 Braveg1rl
+
+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. \ No newline at end of file
diff --git a/node_modules/performance-now/package.json b/node_modules/performance-now/package.json
new file mode 100644
index 0000000..962bfc8
--- /dev/null
+++ b/node_modules/performance-now/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "performance-now",
+ "description": "Implements performance.now (based on process.hrtime).",
+ "keywords": [],
+ "version": "2.1.0",
+ "author": "Braveg1rl <braveg1rl@outlook.com>",
+ "license": "MIT",
+ "homepage": "https://github.com/braveg1rl/performance-now",
+ "bugs": "https://github.com/braveg1rl/performance-now/issues",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/braveg1rl/performance-now.git"
+ },
+ "private": false,
+ "dependencies": {},
+ "devDependencies": {
+ "bluebird": "^3.4.7",
+ "call-delayed": "^1.0.0",
+ "chai": "^3.5.0",
+ "chai-increasing": "^1.2.0",
+ "coffee-script": "~1.12.2",
+ "mocha": "~3.2.0",
+ "pre-commit": "^1.2.2"
+ },
+ "optionalDependencies": {},
+ "main": "lib/performance-now.js",
+ "scripts": {
+ "build": "mkdir -p lib && rm -rf lib/* && node_modules/.bin/coffee --compile -m --output lib/ src/",
+ "prepublish": "npm test",
+ "pretest": "npm run build",
+ "test": "node_modules/.bin/mocha",
+ "watch": "node_modules/.bin/coffee --watch --compile --output lib/ src/"
+ },
+ "typings": "src/index.d.ts"
+}
diff --git a/node_modules/performance-now/src/index.d.ts b/node_modules/performance-now/src/index.d.ts
new file mode 100644
index 0000000..68dca8e
--- /dev/null
+++ b/node_modules/performance-now/src/index.d.ts
@@ -0,0 +1,8 @@
+// This file describes the package to typescript.
+
+/**
+ * Returns the number of milliseconds since the page was loaded (if browser)
+ * or the node process was started.
+ */
+declare function now(): number;
+export = now;
diff --git a/node_modules/performance-now/src/performance-now.coffee b/node_modules/performance-now/src/performance-now.coffee
new file mode 100644
index 0000000..a8e075a
--- /dev/null
+++ b/node_modules/performance-now/src/performance-now.coffee
@@ -0,0 +1,17 @@
+if performance? and performance.now
+ module.exports = -> performance.now()
+else if process? and process.hrtime
+ module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6
+ hrtime = process.hrtime
+ getNanoSeconds = ->
+ hr = hrtime()
+ hr[0] * 1e9 + hr[1]
+ moduleLoadTime = getNanoSeconds()
+ upTime = process.uptime() * 1e9
+ nodeLoadTime = moduleLoadTime - upTime
+else if Date.now
+ module.exports = -> Date.now() - loadTime
+ loadTime = Date.now()
+else
+ module.exports = -> new Date().getTime() - loadTime
+ loadTime = new Date().getTime()
diff --git a/node_modules/performance-now/test/mocha.opts b/node_modules/performance-now/test/mocha.opts
new file mode 100644
index 0000000..55d8492
--- /dev/null
+++ b/node_modules/performance-now/test/mocha.opts
@@ -0,0 +1,3 @@
+--require coffee-script/register
+--compilers coffee:coffee-script/register
+--reporter spec \ No newline at end of file
diff --git a/node_modules/performance-now/test/performance-now.coffee b/node_modules/performance-now/test/performance-now.coffee
new file mode 100644
index 0000000..c99e95c
--- /dev/null
+++ b/node_modules/performance-now/test/performance-now.coffee
@@ -0,0 +1,43 @@
+chai = require "chai"
+chai.use(require "chai-increasing")
+{assert,expect} = chai
+Bluebird = require "bluebird"
+
+now = require "../"
+
+getUptime = -> process.uptime() * 1e3
+
+describe "now", ->
+ it "reported time differs at most 1ms from a freshly reported uptime", ->
+ assert.isAtMost Math.abs(now()-getUptime()), 1
+
+ it "two subsequent calls return an increasing number", ->
+ assert.isBelow now(), now()
+
+ it "has less than 10 microseconds overhead", ->
+ assert.isBelow Math.abs(now() - now()), 0.010
+
+ it "can be called 1 million times in under 1 second (averaging under 1 microsecond per call)", ->
+ @timeout 1000
+ now() for [0...1e6]
+ undefined
+
+ it "for 10,000 numbers, number n is never bigger than number n-1", ->
+ stamps = (now() for [1...10000])
+ expect(stamps).to.be.increasing
+
+ it "shows that at least 0.2 ms has passed after a timeout of 1 ms", ->
+ earlier = now()
+ Bluebird.resolve().delay(1).then -> assert.isAbove (now()-earlier), 0.2
+
+ it "shows that at most 3 ms has passed after a timeout of 1 ms", ->
+ earlier = now()
+ Bluebird.resolve().delay(1).then -> assert.isBelow (now()-earlier), 3
+
+ it "shows that at least 190ms ms has passed after a timeout of 200ms", ->
+ earlier = now()
+ Bluebird.resolve().delay(200).then -> assert.isAbove (now()-earlier), 190
+
+ it "shows that at most 220 ms has passed after a timeout of 200ms", ->
+ earlier = now()
+ Bluebird.resolve().delay(200).then -> assert.isBelow (now()-earlier), 220
diff --git a/node_modules/performance-now/test/scripts.coffee b/node_modules/performance-now/test/scripts.coffee
new file mode 100644
index 0000000..16312f1
--- /dev/null
+++ b/node_modules/performance-now/test/scripts.coffee
@@ -0,0 +1,27 @@
+Bluebird = require "bluebird"
+exec = require("child_process").execSync
+{assert} = require "chai"
+
+describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", ->
+ result = exec("./test/scripts/initial-value.coffee").toString().trim()
+ it "printed #{result}", ->
+ it "printed a value above 100", -> assert.isAbove result, 100
+ it "printed a value below 350", -> assert.isBelow result, 350
+
+describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", ->
+ result = exec("./test/scripts/delayed-require.coffee").toString().trim()
+ it "printed #{result}", ->
+ it "printed a value above 350", -> assert.isAbove result, 350
+ it "printed a value below 600", -> assert.isBelow result, 600
+
+describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", ->
+ result = exec("./test/scripts/delayed-call.coffee").toString().trim()
+ it "printed #{result}", ->
+ it "printed a value above 350", -> assert.isAbove result, 350
+ it "printed a value below 600", -> assert.isBelow result, 600
+
+describe "scripts/difference.coffee", ->
+ result = exec("./test/scripts/difference.coffee").toString().trim()
+ it "printed #{result}", ->
+ it "printed a value above 0.005", -> assert.isAbove result, 0.005
+ it "printed a value below 0.07", -> assert.isBelow result, 0.07
diff --git a/node_modules/performance-now/test/scripts/delayed-call.coffee b/node_modules/performance-now/test/scripts/delayed-call.coffee
new file mode 100755
index 0000000..0c3bab5
--- /dev/null
+++ b/node_modules/performance-now/test/scripts/delayed-call.coffee
@@ -0,0 +1,11 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+###
+Expected output is a number above 350 and below 600.
+The time reported is relative to the time the node.js process was started
+this is approximately at `(Date.now() process.uptime() * 1000)`
+###
+
+delay = require "call-delayed"
+now = require "../../lib/performance-now"
+delay 250, -> console.log now().toFixed 3
diff --git a/node_modules/performance-now/test/scripts/delayed-require.coffee b/node_modules/performance-now/test/scripts/delayed-require.coffee
new file mode 100755
index 0000000..3ddee95
--- /dev/null
+++ b/node_modules/performance-now/test/scripts/delayed-require.coffee
@@ -0,0 +1,12 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+###
+Expected output is a number above 350 and below 600.
+The time reported is relative to the time the node.js process was started
+this is approximately at `(Date.now() process.uptime() * 1000)`
+###
+
+delay = require "call-delayed"
+delay 250, ->
+ now = require "../../lib/performance-now"
+ console.log now().toFixed 3
diff --git a/node_modules/performance-now/test/scripts/difference.coffee b/node_modules/performance-now/test/scripts/difference.coffee
new file mode 100755
index 0000000..0b5edf6
--- /dev/null
+++ b/node_modules/performance-now/test/scripts/difference.coffee
@@ -0,0 +1,6 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+# Expected output is above 0.005 and below 0.07.
+
+now = require('../../lib/performance-now')
+console.log -(now() - now()).toFixed 3
diff --git a/node_modules/performance-now/test/scripts/initial-value.coffee b/node_modules/performance-now/test/scripts/initial-value.coffee
new file mode 100755
index 0000000..19ef4e0
--- /dev/null
+++ b/node_modules/performance-now/test/scripts/initial-value.coffee
@@ -0,0 +1,10 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+###
+Expected output is a number above 100 and below 350.
+The time reported is relative to the time the node.js process was started
+this is approximately at `(Date.now() process.uptime() * 1000)`
+###
+
+now = require '../../lib/performance-now'
+console.log now().toFixed 3
diff --git a/node_modules/pify/index.js b/node_modules/pify/index.js
new file mode 100644
index 0000000..7c720eb
--- /dev/null
+++ b/node_modules/pify/index.js
@@ -0,0 +1,68 @@
+'use strict';
+
+var processFn = function (fn, P, opts) {
+ return function () {
+ var that = this;
+ var args = new Array(arguments.length);
+
+ for (var i = 0; i < arguments.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ return new P(function (resolve, reject) {
+ args.push(function (err, result) {
+ if (err) {
+ reject(err);
+ } else if (opts.multiArgs) {
+ var results = new Array(arguments.length - 1);
+
+ for (var i = 1; i < arguments.length; i++) {
+ results[i - 1] = arguments[i];
+ }
+
+ resolve(results);
+ } else {
+ resolve(result);
+ }
+ });
+
+ fn.apply(that, args);
+ });
+ };
+};
+
+var pify = module.exports = function (obj, P, opts) {
+ if (typeof P !== 'function') {
+ opts = P;
+ P = Promise;
+ }
+
+ opts = opts || {};
+ opts.exclude = opts.exclude || [/.+Sync$/];
+
+ var filter = function (key) {
+ var match = function (pattern) {
+ return typeof pattern === 'string' ? key === pattern : pattern.test(key);
+ };
+
+ return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
+ };
+
+ var ret = typeof obj === 'function' ? function () {
+ if (opts.excludeMain) {
+ return obj.apply(this, arguments);
+ }
+
+ return processFn(obj, P, opts).apply(this, arguments);
+ } : {};
+
+ return Object.keys(obj).reduce(function (ret, key) {
+ var x = obj[key];
+
+ ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
+
+ return ret;
+ }, ret);
+};
+
+pify.all = pify;
diff --git a/node_modules/pify/license b/node_modules/pify/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/pify/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json
new file mode 100644
index 0000000..311d198
--- /dev/null
+++ b/node_modules/pify/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "pify",
+ "version": "2.3.0",
+ "description": "Promisify a callback-style function",
+ "license": "MIT",
+ "repository": "sindresorhus/pify",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava && npm run optimization-test",
+ "optimization-test": "node --allow-natives-syntax optimization-test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "promises",
+ "promisify",
+ "denodify",
+ "denodeify",
+ "callback",
+ "cb",
+ "node",
+ "then",
+ "thenify",
+ "convert",
+ "transform",
+ "wrap",
+ "wrapper",
+ "bind",
+ "to",
+ "async",
+ "es2015"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "pinkie-promise": "^1.0.0",
+ "v8-natives": "0.0.2",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/pify/readme.md b/node_modules/pify/readme.md
new file mode 100644
index 0000000..c79ca8b
--- /dev/null
+++ b/node_modules/pify/readme.md
@@ -0,0 +1,119 @@
+# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
+
+> Promisify a callback-style function
+
+
+## Install
+
+```
+$ npm install --save pify
+```
+
+
+## Usage
+
+```js
+const fs = require('fs');
+const pify = require('pify');
+
+// promisify a single function
+
+pify(fs.readFile)('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+
+// or promisify all methods in a module
+
+pify(fs).readFile('package.json', 'utf8').then(data => {
+ console.log(JSON.parse(data).name);
+ //=> 'pify'
+});
+```
+
+
+## API
+
+### pify(input, [promiseModule], [options])
+
+Returns a promise wrapped version of the supplied function or module.
+
+#### input
+
+Type: `function`, `object`
+
+Callback-style function or module whose methods you want to promisify.
+
+#### promiseModule
+
+Type: `function`
+
+Custom promise module to use instead of the native one.
+
+Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
+
+#### options
+
+##### multiArgs
+
+Type: `boolean`
+Default: `false`
+
+By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument.
+
+```js
+const request = require('request');
+const pify = require('pify');
+
+pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
+ const [httpResponse, body] = result;
+});
+```
+
+##### include
+
+Type: `array` of (`string`|`regex`)
+
+Methods in a module to promisify. Remaining methods will be left untouched.
+
+##### exclude
+
+Type: `array` of (`string`|`regex`)
+Default: `[/.+Sync$/]`
+
+Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
+
+##### excludeMain
+
+Type: `boolean`
+Default: `false`
+
+By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module.
+
+```js
+const pify = require('pify');
+
+function fn() {
+ return true;
+}
+
+fn.method = (data, callback) => {
+ setImmediate(() => {
+ callback(data, null);
+ });
+};
+
+// promisify methods but not fn()
+const promiseFn = pify(fn, {excludeMain: true});
+
+if (promiseFn()) {
+ promiseFn.method('hi').then(data => {
+ console.log(data);
+ });
+}
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/pinkie-promise/index.js b/node_modules/pinkie-promise/index.js
new file mode 100644
index 0000000..777377a
--- /dev/null
+++ b/node_modules/pinkie-promise/index.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = typeof Promise === 'function' ? Promise : require('pinkie');
diff --git a/node_modules/pinkie-promise/license b/node_modules/pinkie-promise/license
new file mode 100644
index 0000000..1aeb74f
--- /dev/null
+++ b/node_modules/pinkie-promise/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
+
+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/pinkie-promise/package.json b/node_modules/pinkie-promise/package.json
new file mode 100644
index 0000000..3515f8f
--- /dev/null
+++ b/node_modules/pinkie-promise/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "pinkie-promise",
+ "version": "2.0.1",
+ "description": "ES2015 Promise ponyfill",
+ "license": "MIT",
+ "repository": "floatdrop/pinkie-promise",
+ "author": {
+ "name": "Vsevolod Strukchinsky",
+ "email": "floatdrop@gmail.com",
+ "url": "github.com/floatdrop"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "promises",
+ "es2015",
+ "es6",
+ "polyfill",
+ "ponyfill"
+ ],
+ "dependencies": {
+ "pinkie": "^2.0.0"
+ },
+ "devDependencies": {
+ "mocha": "*"
+ }
+}
diff --git a/node_modules/pinkie-promise/readme.md b/node_modules/pinkie-promise/readme.md
new file mode 100644
index 0000000..78477f4
--- /dev/null
+++ b/node_modules/pinkie-promise/readme.md
@@ -0,0 +1,28 @@
+# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise)
+
+> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill
+
+Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill.
+
+## Install
+
+```
+$ npm install --save pinkie-promise
+```
+
+## Usage
+
+```js
+var Promise = require('pinkie-promise');
+
+new Promise(function (resolve) { resolve('unicorns'); });
+//=> Promise { 'unicorns' }
+```
+
+## Related
+
+- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function
+
+## License
+
+MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/node_modules/pinkie/index.js b/node_modules/pinkie/index.js
new file mode 100644
index 0000000..14ce1bf
--- /dev/null
+++ b/node_modules/pinkie/index.js
@@ -0,0 +1,292 @@
+'use strict';
+
+var PENDING = 'pending';
+var SETTLED = 'settled';
+var FULFILLED = 'fulfilled';
+var REJECTED = 'rejected';
+var NOOP = function () {};
+var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';
+
+var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;
+var asyncQueue = [];
+var asyncTimer;
+
+function asyncFlush() {
+ // run promise callbacks
+ for (var i = 0; i < asyncQueue.length; i++) {
+ asyncQueue[i][0](asyncQueue[i][1]);
+ }
+
+ // reset async asyncQueue
+ asyncQueue = [];
+ asyncTimer = false;
+}
+
+function asyncCall(callback, arg) {
+ asyncQueue.push([callback, arg]);
+
+ if (!asyncTimer) {
+ asyncTimer = true;
+ asyncSetTimer(asyncFlush, 0);
+ }
+}
+
+function invokeResolver(resolver, promise) {
+ function resolvePromise(value) {
+ resolve(promise, value);
+ }
+
+ function rejectPromise(reason) {
+ reject(promise, reason);
+ }
+
+ try {
+ resolver(resolvePromise, rejectPromise);
+ } catch (e) {
+ rejectPromise(e);
+ }
+}
+
+function invokeCallback(subscriber) {
+ var owner = subscriber.owner;
+ var settled = owner._state;
+ var value = owner._data;
+ var callback = subscriber[settled];
+ var promise = subscriber.then;
+
+ if (typeof callback === 'function') {
+ settled = FULFILLED;
+ try {
+ value = callback(value);
+ } catch (e) {
+ reject(promise, e);
+ }
+ }
+
+ if (!handleThenable(promise, value)) {
+ if (settled === FULFILLED) {
+ resolve(promise, value);
+ }
+
+ if (settled === REJECTED) {
+ reject(promise, value);
+ }
+ }
+}
+
+function handleThenable(promise, value) {
+ var resolved;
+
+ try {
+ if (promise === value) {
+ throw new TypeError('A promises callback cannot return that same promise.');
+ }
+
+ if (value && (typeof value === 'function' || typeof value === 'object')) {
+ // then should be retrieved only once
+ var then = value.then;
+
+ if (typeof then === 'function') {
+ then.call(value, function (val) {
+ if (!resolved) {
+ resolved = true;
+
+ if (value === val) {
+ fulfill(promise, val);
+ } else {
+ resolve(promise, val);
+ }
+ }
+ }, function (reason) {
+ if (!resolved) {
+ resolved = true;
+
+ reject(promise, reason);
+ }
+ });
+
+ return true;
+ }
+ }
+ } catch (e) {
+ if (!resolved) {
+ reject(promise, e);
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+function resolve(promise, value) {
+ if (promise === value || !handleThenable(promise, value)) {
+ fulfill(promise, value);
+ }
+}
+
+function fulfill(promise, value) {
+ if (promise._state === PENDING) {
+ promise._state = SETTLED;
+ promise._data = value;
+
+ asyncCall(publishFulfillment, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state === PENDING) {
+ promise._state = SETTLED;
+ promise._data = reason;
+
+ asyncCall(publishRejection, promise);
+ }
+}
+
+function publish(promise) {
+ promise._then = promise._then.forEach(invokeCallback);
+}
+
+function publishFulfillment(promise) {
+ promise._state = FULFILLED;
+ publish(promise);
+}
+
+function publishRejection(promise) {
+ promise._state = REJECTED;
+ publish(promise);
+ if (!promise._handled && isNode) {
+ global.process.emit('unhandledRejection', promise._data, promise);
+ }
+}
+
+function notifyRejectionHandled(promise) {
+ global.process.emit('rejectionHandled', promise);
+}
+
+/**
+ * @class
+ */
+function Promise(resolver) {
+ if (typeof resolver !== 'function') {
+ throw new TypeError('Promise resolver ' + resolver + ' is not a function');
+ }
+
+ if (this instanceof Promise === false) {
+ throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
+ }
+
+ this._then = [];
+
+ invokeResolver(resolver, this);
+}
+
+Promise.prototype = {
+ constructor: Promise,
+
+ _state: PENDING,
+ _then: null,
+ _data: undefined,
+ _handled: false,
+
+ then: function (onFulfillment, onRejection) {
+ var subscriber = {
+ owner: this,
+ then: new this.constructor(NOOP),
+ fulfilled: onFulfillment,
+ rejected: onRejection
+ };
+
+ if ((onRejection || onFulfillment) && !this._handled) {
+ this._handled = true;
+ if (this._state === REJECTED && isNode) {
+ asyncCall(notifyRejectionHandled, this);
+ }
+ }
+
+ if (this._state === FULFILLED || this._state === REJECTED) {
+ // already resolved, call callback async
+ asyncCall(invokeCallback, subscriber);
+ } else {
+ // subscribe
+ this._then.push(subscriber);
+ }
+
+ return subscriber.then;
+ },
+
+ catch: function (onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+Promise.all = function (promises) {
+ if (!Array.isArray(promises)) {
+ throw new TypeError('You must pass an array to Promise.all().');
+ }
+
+ return new Promise(function (resolve, reject) {
+ var results = [];
+ var remaining = 0;
+
+ function resolver(index) {
+ remaining++;
+ return function (value) {
+ results[index] = value;
+ if (!--remaining) {
+ resolve(results);
+ }
+ };
+ }
+
+ for (var i = 0, promise; i < promises.length; i++) {
+ promise = promises[i];
+
+ if (promise && typeof promise.then === 'function') {
+ promise.then(resolver(i), reject);
+ } else {
+ results[i] = promise;
+ }
+ }
+
+ if (!remaining) {
+ resolve(results);
+ }
+ });
+};
+
+Promise.race = function (promises) {
+ if (!Array.isArray(promises)) {
+ throw new TypeError('You must pass an array to Promise.race().');
+ }
+
+ return new Promise(function (resolve, reject) {
+ for (var i = 0, promise; i < promises.length; i++) {
+ promise = promises[i];
+
+ if (promise && typeof promise.then === 'function') {
+ promise.then(resolve, reject);
+ } else {
+ resolve(promise);
+ }
+ }
+ });
+};
+
+Promise.resolve = function (value) {
+ if (value && typeof value === 'object' && value.constructor === Promise) {
+ return value;
+ }
+
+ return new Promise(function (resolve) {
+ resolve(value);
+ });
+};
+
+Promise.reject = function (reason) {
+ return new Promise(function (resolve, reject) {
+ reject(reason);
+ });
+};
+
+module.exports = Promise;
diff --git a/node_modules/pinkie/license b/node_modules/pinkie/license
new file mode 100644
index 0000000..1aeb74f
--- /dev/null
+++ b/node_modules/pinkie/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
+
+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/pinkie/package.json b/node_modules/pinkie/package.json
new file mode 100644
index 0000000..cb9057b
--- /dev/null
+++ b/node_modules/pinkie/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "pinkie",
+ "version": "2.0.4",
+ "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation",
+ "license": "MIT",
+ "repository": "floatdrop/pinkie",
+ "author": {
+ "name": "Vsevolod Strukchinsky",
+ "email": "floatdrop@gmail.com",
+ "url": "github.com/floatdrop"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && nyc mocha",
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "promise",
+ "promises",
+ "es2015",
+ "es6"
+ ],
+ "devDependencies": {
+ "core-assert": "^0.1.1",
+ "coveralls": "^2.11.4",
+ "mocha": "*",
+ "nyc": "^3.2.2",
+ "promises-aplus-tests": "*",
+ "xo": "^0.10.1"
+ }
+}
diff --git a/node_modules/pinkie/readme.md b/node_modules/pinkie/readme.md
new file mode 100644
index 0000000..1565f95
--- /dev/null
+++ b/node_modules/pinkie/readme.md
@@ -0,0 +1,83 @@
+<h1 align="center">
+ <br>
+ <img width="256" src="media/logo.png" alt="pinkie">
+ <br>
+ <br>
+</h1>
+
+> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation
+
+[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master)
+
+There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality.
+
+This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though).
+
+
+## Install
+
+```
+$ npm install --save pinkie
+```
+
+
+## Usage
+
+```js
+var fs = require('fs');
+var Promise = require('pinkie');
+
+new Promise(function (resolve, reject) {
+ fs.readFile('foo.json', 'utf8', function (err, data) {
+ if (err) {
+ reject(err);
+ return;
+ }
+
+ resolve(data);
+ });
+});
+//=> Promise
+```
+
+
+### API
+
+`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot:
+
+#### new Promise(executor)
+
+Returns new instance of `Promise`.
+
+##### executor
+
+*Required*
+Type: `function`
+
+Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it.
+
+#### pinkie.all(promises)
+
+Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved.
+
+#### pinkie.race(promises)
+
+Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise.
+
+#### pinkie.reject(reason)
+
+Returns a Promise object that is rejected with the given `reason`.
+
+#### pinkie.resolve(value)
+
+Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`.
+
+
+## Related
+
+- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module
+
+
+## License
+
+MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
diff --git a/node_modules/plist/.github/workflows/ci.yml b/node_modules/plist/.github/workflows/ci.yml
new file mode 100644
index 0000000..f85c725
--- /dev/null
+++ b/node_modules/plist/.github/workflows/ci.yml
@@ -0,0 +1,24 @@
+name: ci
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [ '14', '16', '18' ]
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+
+ - run: npm install
+ - run: npm test
diff --git a/node_modules/plist/.jshintrc b/node_modules/plist/.jshintrc
new file mode 100644
index 0000000..3f42622
--- /dev/null
+++ b/node_modules/plist/.jshintrc
@@ -0,0 +1,4 @@
+{
+ "laxbreak": true,
+ "laxcomma": true
+}
diff --git a/node_modules/plist/.travis.yml b/node_modules/plist/.travis.yml
new file mode 100644
index 0000000..3121bc6
--- /dev/null
+++ b/node_modules/plist/.travis.yml
@@ -0,0 +1,22 @@
+dist: xenial
+os: linux
+language: node_js
+node_js:
+- '6'
+- '7'
+- '8'
+- '9'
+
+env:
+ global:
+ - secure: R4tCAipsC0KdBPin8+rWedqptn0RXksLM20yZ0w8En0hhaglWCiIxA5uKt/6njXp9Q8FEKkVOyWF+yjq74jB6+KUu0dSK30pbmaAHhlXsL5kTWmY9vd7rxwcn1Hdf1sW15NqRX4hvWuIC32cA7vDr+58VPyum+A+yvPJICvgIlw=
+ - secure: sfEwCcmUrfFPIRPV8UwdJymRZ8YY20fuJiAlWfOUQSOccNGWB4RbUsD+iyc9XW5qB1kdOqxVkvZ0sKrYo3Uc4k8mhar7+yhP04hfNj4CWAigG3rtTugbar9kSQjwi/yEaTrb4kdP8HRYs5yjrEX/CGwjm3iHGOSyUw5du0PQfbk=
+
+jobs:
+ include:
+ - node_js: '8'
+ env: BROWSER_NAME=chrome BROWSER_VERSION=latest
+ - node_js: '8'
+ env: BROWSER_NAME=firefox BROWSER_VERSION=latest
+ - node_js: '8'
+ env: BROWSER_NAME=ie BROWSER_VERSION=11
diff --git a/node_modules/plist/History.md b/node_modules/plist/History.md
new file mode 100644
index 0000000..de03447
--- /dev/null
+++ b/node_modules/plist/History.md
@@ -0,0 +1,191 @@
+3.0.5 / 2022-03-23
+==================
+* [[`96e2303d05`]](https://github.com/TooTallNate/plist.js/commit/96e2303d059e6be0c9e0c4773226d14b4758de52) Prototype Pollution using .parse() #114 (mario-canva)
+* update browserify from 16 to 17
+
+
+3.0.4 / 2021-08-27
+==================
+* inline xmldom@0.6.0 to eliminate security warning false positive (Mike Reinstein)
+
+
+3.0.3 / 2021-08-04
+==================
+* update xmldom to 0.6.0 to patch critical vulnerability (Mike Reinstein)
+* remove flaky saucelabs teseting badge (Mike Reinstein)
+
+
+3.0.2 / 2021-03-25
+==================
+* update xmldom to 0.5.0 to patch critical vulnerability (Mike Reinstein)
+* update saucelab credentials to point at mreinstein's saucelabs account (Mike Reinstein)
+* remove a bunch of test versions from the matrix because they weren't working in zuul + sauce (Mike Reinstein)
+
+
+3.0.1 / 2018-03-21
+==================
+* avoid using Buffer constructor nodejs/node#19079
+
+
+3.0.0 / 2018-03-18
+==================
+* [[`cb0d8f1bc6`]](https://github.com/TooTallNate/plist.js/commit/cb0d8f1bc60dee423f8fc2cfcac427452dfaddb0) update Makefile, rebuild dist/ (Mike Reinstein)
+* [[`9dfeffe73f`]](https://github.com/TooTallNate/plist.js/commit/9dfeffe73fdb447ac5a87ee364a1472975f12adf) remove unsupported browser versions from travis (Mike Reinstein)
+* [[`c962bfe1ea`]](https://github.com/TooTallNate/plist.js/commit/c962bfe1ea04dd87966250253d33738bceecab61) update module deps, remove support for node < 6 (Mike Reinstein)
+
+
+2.1.0 / 2017-05-04
+==================
+
+* [[`e4f06669bb`]](https://github.com/TooTallNate/plist.js/commit/e4f06669bb51d2e65654df7c39aab52bc3bf4e8a) - update license (extend copyright term) (Mike Reinstein)
+* [[`edc6e41035`]](https://github.com/TooTallNate/plist.js/commit/edc6e4103546b1d7518a577e7c202c305a8abec0) - update module deps (Mike Reinstein)
+* [[`85d11c48ef`](https://github.com/TooTallNate/plist.js/commit/85d11c48eff02312cbdd67f46fd8e74b0d372ca1)] - Harden test-cases and implementation to align with other implementations (Björn Brauer)
+* [[`7619537eaa`]](https://github.com/TooTallNate/plist.js/commit/7619537eaa9e3e5a80829e759c004d2e017a07d2) review feedback: early returns and constants for nodeTypes (Björn Brauer)
+
+
+2.0.1 / 2016-08-16
+==================
+
+* [[`de136c8388`](https://github.com/TooTallNate/plist/commit/de136c8388)] - bad npm release… (Nathan Rajlich)
+
+
+2.0.0 / 2016-08-16
+==================
+
+* [[`90deef5d43`](https://github.com/TooTallNate/plist/commit/90deef5d43)] - remove deprecated functions (Nathan Rajlich)
+* [[`d475cd8ce9`](https://github.com/TooTallNate/plist/commit/d475cd8ce9)] - Added travis ci support for node 6 (Amila Welihinda)
+* [[`04c8ee7646`](https://github.com/TooTallNate/plist/commit/04c8ee7646)] - update dependencies (Mitchell Hentges)
+* [[`97c02b3f05`](https://github.com/TooTallNate/plist/commit/97c02b3f05)] - **travis**: add `sudo: false` and test more node versions (Nathan Rajlich)
+* [[`54c821ec29`](https://github.com/TooTallNate/plist/commit/54c821ec29)] - #71 - fixed and added test (Andrew Goldis)
+* [[`4afb7c5079`](https://github.com/TooTallNate/plist/commit/4afb7c5079)] - fix `Cannot read property 'nodeValue' of undefined exception` that is thrown when a `<key></key>` construct appears in plist (Chris Kinsman)
+* [[`f360d7d685`](https://github.com/TooTallNate/plist/commit/f360d7d685)] - #66 - fixed empty keys and added tests (Andrew Goldis)
+* [[`421c7f26e9`](https://github.com/TooTallNate/plist/commit/421c7f26e9)] - #66 - fixed empty key (Andrew Goldis)
+* [[`a88aa4dca7`](https://github.com/TooTallNate/plist/commit/a88aa4dca7)] - add verbose examples (mrzmyr)
+
+
+1.2.0 / 2015-11-10
+==================
+
+ * package: update "browserify" to v12.0.1
+ * package: update "zuul" to v3.7.2
+ * package: update "xmlbuilder" to v4.0.0
+ * package: update "util-deprecate" to v1.0.2
+ * package: update "mocha" to v2.3.3
+ * package: update "base64-js" to v0.0.8
+ * build: omit undefined values
+ * travis: add node 4.0 and 4.1 to test matrix
+
+
+1.1.0 / 2014-08-27
+==================
+
+ * package: update "browserify" to v5.10.1
+ * package: update "zuul" to v1.10.2
+ * README: add "Sauce Test Status" build badge
+ * travis: use new "plistjs" sauce credentials
+ * travis: set up zuul saucelabs automated testing
+
+
+1.0.1 / 2014-06-25
+==================
+
+ * add .zuul.yml file for browser testing
+ * remove Testling stuff
+ * build: fix global variable `val` leak
+ * package: use --check-leaks when running mocha tests
+ * README: update examples to use preferred API
+ * package: add "browser" keyword
+
+
+1.0.0 / 2014-05-20
+==================
+
+ * package: remove "android-browser"
+ * test: add <dict> build() test
+ * test: re-add the empty string build() test
+ * test: remove "fixtures" and legacy "tests" dir
+ * test: add some more build() tests
+ * test: add a parse() CDATA test
+ * test: starting on build() tests
+ * test: more parse() tests
+ * package: attempt to fix "android-browser" testling
+ * parse: better <data> with newline handling
+ * README: add Testling badge
+ * test: add <data> node tests
+ * test: add a <date> parse() test
+ * travis: don't test node v0.6 or v0.8
+ * test: some more parse() tests
+ * test: add simple <string> parsing test
+ * build: add support for an optional "opts" object
+ * package: test mobile devices
+ * test: use multiline to inline the XML
+ * package: beautify
+ * package: fix "mocha" harness
+ * package: more testling browsers
+ * build: add the "version=1.0" attribute
+ * beginnings of "mocha" tests
+ * build: more JSDocs
+ * tests: add test that ensures that empty string conversion works
+ * build: update "xmlbuilder" to v2.2.1
+ * parse: ignore comment and cdata nodes
+ * tests: make the "Newlines" test actually contain a newline
+ * parse: lint
+ * test travis
+ * README: add Travis CI badge
+ * add .travis.yml file
+ * build: updated DTD to reflect name change
+ * parse: return falsey values in an Array plist
+ * build: fix encoding a typed array in the browser
+ * build: add support for Typed Arrays and ArrayBuffers
+ * build: more lint
+ * build: slight cleanup and optimizations
+ * build: use .txt() for the "date" value
+ * parse: always return a Buffer for <data> nodes
+ * build: don't interpret Strings as base64
+ * dist: commit prebuilt plist*.js files
+ * parse: fix typo in deprecate message
+ * parse: fix parse() return value
+ * parse: add jsdoc comments for the deprecated APIs
+ * parse: add `parse()` function
+ * node, parse: use `util-deprecate` module
+ * re-implemented parseFile to be asynchronous
+ * node: fix jsdoc comment
+ * Makefile: fix "node" require stubbing
+ * examples: add "browser" example
+ * package: tweak "main"
+ * package: remove "engines" field
+ * Makefile: fix --exclude command for browserify
+ * package: update "description"
+ * lib: more styling
+ * Makefile: add -build.js and -parse.js dist files
+ * lib: separate out the parse and build logic into their own files
+ * Makefile: add makefile with browserify build rules
+ * package: add "browserify" as a dev dependency
+ * plist: tabs to spaces (again)
+ * add a .jshintrc file
+ * LICENSE: update
+ * node-webkit support
+ * Ignore tests/ in .npmignore file
+ * Remove duplicate devDependencies key
+ * Remove trailing whitespace
+ * adding recent contributors. Bumping npm package number (patch release)
+ * Fixed node.js string handling
+ * bumping version number
+ * Fixed global variable plist leak
+ * patch release 0.4.1
+ * removed temporary debug output file
+ * flipping the cases for writing data and string elements in build(). removed the 125 length check. Added validation of base64 encoding for data fields when parsing. added unit tests.
+ * fixed syntax errors in README examples (issue #20)
+ * added Sync versions of calls. added deprecation warnings for old method calls. updated documentation. If the resulting object from parseStringSync is an array with 1 element, return just the element. If a plist string or file doesnt have a <plist> tag as the document root element, fail noisily (issue #15)
+ * incrementing package version
+ * added cross platform base64 encode/decode for data elements (issue #17.) Comments and hygiene.
+ * refactored the code to use a DOM parser instead of SAX. closes issues #5 and #16
+ * rolling up package version
+ * updated base64 detection regexp. updated README. hygiene.
+ * refactored the build function. Fixes issue #14
+ * refactored tests. Modified tests from issue #9. thanks @sylvinus
+ * upgrade xmlbuilder package version. this is why .end() was needed in last commit; breaking change to xmlbuilder lib. :/
+ * bug fix in build function, forgot to call .end() Refactored tests to use nodeunit
+ * Implemented support for real, identity tests
+ * Refactored base64 detection - still sloppy, fixed date building. Passing tests OK.
+ * Implemented basic plist builder that turns an existing JS object into plist XML. date, real and data types still need to be implemented.
diff --git a/node_modules/plist/LICENSE b/node_modules/plist/LICENSE
new file mode 100644
index 0000000..92e3423
--- /dev/null
+++ b/node_modules/plist/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2010-2017 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/plist/Makefile b/node_modules/plist/Makefile
new file mode 100644
index 0000000..7a918b5
--- /dev/null
+++ b/node_modules/plist/Makefile
@@ -0,0 +1,75 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= node
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+MOCHA ?= $(NODE) $(BIN)/mocha
+ZUUL ?= $(NODE) $(BIN)/zuul
+
+REPORTER ?= spec
+
+all: dist/plist.js dist/plist-build.js dist/plist-parse.js
+
+install: node_modules
+
+clean:
+ @rm -rf node_modules dist
+
+dist:
+ @mkdir -p $@
+
+dist/plist-build.js: node_modules lib/build.js dist
+ @$(BROWSERIFY) \
+ --standalone plist \
+ lib/build.js > $@
+
+dist/plist-parse.js: node_modules lib/parse.js dist
+ @$(BROWSERIFY) \
+ --standalone plist \
+ lib/parse.js > $@
+
+dist/plist.js: node_modules lib/*.js dist
+ @$(BROWSERIFY) \
+ --standalone plist \
+ index.js > $@
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+test:
+ @if [ "x$(BROWSER_NAME)" = "x" ]; then \
+ $(MAKE) test-node; \
+ else \
+ $(MAKE) test-zuul; \
+ fi
+
+test-node:
+ @$(MOCHA) \
+ --reporter $(REPORTER) \
+ test/*.js
+
+test-zuul:
+ @if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \
+ $(ZUUL) \
+ --ui mocha-bdd \
+ --browser-name $(BROWSER_NAME) \
+ --browser-version $(BROWSER_VERSION) \
+ test/*.js; \
+ else \
+ $(ZUUL) \
+ --ui mocha-bdd \
+ --browser-name $(BROWSER_NAME) \
+ --browser-version $(BROWSER_VERSION) \
+ --browser-platform "$(BROWSER_PLATFORM)" \
+ test/*.js; \
+ fi
+
+.PHONY: all install clean test test-node test-zuul
diff --git a/node_modules/plist/README.md b/node_modules/plist/README.md
new file mode 100644
index 0000000..bb6fcf9
--- /dev/null
+++ b/node_modules/plist/README.md
@@ -0,0 +1,146 @@
+plist.js
+========
+### Apple's Property list parser/builder for Node.js and browsers
+
+[![ci](https://github.com/TooTallNate/plist.js/actions/workflows/ci.yml/badge.svg)](https://github.com/TooTallNate/plist.js/actions/workflows/ci.yml)
+
+Provides facilities for reading and writing Plist (property list) files.
+These are often used in programming OS X and iOS applications, as well
+as the iTunes configuration XML file.
+
+Plist files represent stored programming "object"s. They are very similar
+to JSON. A valid Plist file is representable as a native JavaScript Object
+and vice-versa.
+
+
+## Usage
+
+### Node.js
+
+Install using `npm`:
+
+``` bash
+$ npm install --save plist
+```
+
+Then `require()` the _plist_ module in your file:
+
+``` js
+var plist = require('plist');
+
+// now use the `parse()` and `build()` functions
+var val = plist.parse('<plist><string>Hello World!</string></plist>');
+console.log(val); // "Hello World!"
+```
+
+
+### Browser
+
+Include the `dist/plist.js` in a `<script>` tag in your HTML file:
+
+``` html
+<script src="plist.js"></script>
+<script>
+ // now use the `parse()` and `build()` functions
+ var val = plist.parse('<plist><string>Hello World!</string></plist>');
+ console.log(val); // "Hello World!"
+</script>
+```
+
+
+## API
+
+### Parsing
+
+Parsing a plist from filename:
+
+``` javascript
+var fs = require('fs');
+var plist = require('plist');
+
+var obj = plist.parse(fs.readFileSync('myPlist.plist', 'utf8'));
+console.log(JSON.stringify(obj));
+```
+
+Parsing a plist from string payload:
+
+``` javascript
+var plist = require('plist');
+
+var xml =
+ '<?xml version="1.0" encoding="UTF-8"?>' +
+ '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' +
+ '<plist version="1.0">' +
+ '<key>metadata</key>' +
+ '<dict>' +
+ '<key>bundle-identifier</key>' +
+ '<string>com.company.app</string>' +
+ '<key>bundle-version</key>' +
+ '<string>0.1.1</string>' +
+ '<key>kind</key>' +
+ '<string>software</string>' +
+ '<key>title</key>' +
+ '<string>AppName</string>' +
+ '</dict>' +
+ '</plist>';
+
+console.log(plist.parse(xml));
+
+// [
+// "metadata",
+// {
+// "bundle-identifier": "com.company.app",
+// "bundle-version": "0.1.1",
+// "kind": "software",
+// "title": "AppName"
+// }
+// ]
+```
+
+### Building
+
+Given an existing JavaScript Object, you can turn it into an XML document
+that complies with the plist DTD:
+
+``` javascript
+var plist = require('plist');
+
+var json = [
+ "metadata",
+ {
+ "bundle-identifier": "com.company.app",
+ "bundle-version": "0.1.1",
+ "kind": "software",
+ "title": "AppName"
+ }
+];
+
+console.log(plist.build(json));
+
+// <?xml version="1.0" encoding="UTF-8"?>
+// <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+// <plist version="1.0">
+// <key>metadata</key>
+// <dict>
+// <key>bundle-identifier</key>
+// <string>com.company.app</string>
+// <key>bundle-version</key>
+// <string>0.1.1</string>
+// <key>kind</key>
+// <string>software</string>
+// <key>title</key>
+// <string>AppName</string>
+// </dict>
+// </plist>
+```
+
+## Cross Platform Testing Credits
+
+Much thanks to Sauce Labs for providing free resources that enable cross-browser testing on this project!
+
+[![Testing Powered By SauceLabs](https://opensource.saucelabs.com/images/opensauce/powered-by-saucelabs-badge-red.png?sanitize=true "Testing Powered By SauceLabs")](https://saucelabs.com)
+
+
+## License
+
+[(The MIT License)](LICENSE)
diff --git a/node_modules/plist/dist/plist-build.js b/node_modules/plist/dist/plist-build.js
new file mode 100644
index 0000000..cf0a12c
--- /dev/null
+++ b/node_modules/plist/dist/plist-build.js
@@ -0,0 +1,5345 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
+(function (Buffer){(function (){
+/**
+ * Module dependencies.
+ */
+
+var base64 = require('base64-js');
+var xmlbuilder = require('xmlbuilder');
+
+/**
+ * Module exports.
+ */
+
+exports.build = build;
+
+/**
+ * Accepts a `Date` instance and returns an ISO date string.
+ *
+ * @param {Date} d - Date instance to serialize
+ * @returns {String} ISO date string representation of `d`
+ * @api private
+ */
+
+function ISODateString(d){
+ function pad(n){
+ return n < 10 ? '0' + n : n;
+ }
+ return d.getUTCFullYear()+'-'
+ + pad(d.getUTCMonth()+1)+'-'
+ + pad(d.getUTCDate())+'T'
+ + pad(d.getUTCHours())+':'
+ + pad(d.getUTCMinutes())+':'
+ + pad(d.getUTCSeconds())+'Z';
+}
+
+/**
+ * Returns the internal "type" of `obj` via the
+ * `Object.prototype.toString()` trick.
+ *
+ * @param {Mixed} obj - any value
+ * @returns {String} the internal "type" name
+ * @api private
+ */
+
+var toString = Object.prototype.toString;
+function type (obj) {
+ var m = toString.call(obj).match(/\[object (.*)\]/);
+ return m ? m[1] : m;
+}
+
+/**
+ * Generate an XML plist string from the input object `obj`.
+ *
+ * @param {Object} obj - the object to convert
+ * @param {Object} [opts] - optional options object
+ * @returns {String} converted plist XML string
+ * @api public
+ */
+
+function build (obj, opts) {
+ var XMLHDR = {
+ version: '1.0',
+ encoding: 'UTF-8'
+ };
+
+ var XMLDTD = {
+ pubid: '-//Apple//DTD PLIST 1.0//EN',
+ sysid: 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'
+ };
+
+ var doc = xmlbuilder.create('plist');
+
+ doc.dec(XMLHDR.version, XMLHDR.encoding, XMLHDR.standalone);
+ doc.dtd(XMLDTD.pubid, XMLDTD.sysid);
+ doc.att('version', '1.0');
+
+ walk_obj(obj, doc);
+
+ if (!opts) opts = {};
+ // default `pretty` to `true`
+ opts.pretty = opts.pretty !== false;
+ return doc.end(opts);
+}
+
+/**
+ * depth first, recursive traversal of a javascript object. when complete,
+ * next_child contains a reference to the build XML object.
+ *
+ * @api private
+ */
+
+function walk_obj(next, next_child) {
+ var tag_type, i, prop;
+ var name = type(next);
+
+ if ('Undefined' == name) {
+ return;
+ } else if (Array.isArray(next)) {
+ next_child = next_child.ele('array');
+ for (i = 0; i < next.length; i++) {
+ walk_obj(next[i], next_child);
+ }
+
+ } else if (Buffer.isBuffer(next)) {
+ next_child.ele('data').raw(next.toString('base64'));
+
+ } else if ('Object' == name) {
+ next_child = next_child.ele('dict');
+ for (prop in next) {
+ if (next.hasOwnProperty(prop)) {
+ next_child.ele('key').txt(prop);
+ walk_obj(next[prop], next_child);
+ }
+ }
+
+ } else if ('Number' == name) {
+ // detect if this is an integer or real
+ // TODO: add an ability to force one way or another via a "cast"
+ tag_type = (next % 1 === 0) ? 'integer' : 'real';
+ next_child.ele(tag_type).txt(next.toString());
+
+ } else if ('Date' == name) {
+ next_child.ele('date').txt(ISODateString(new Date(next)));
+
+ } else if ('Boolean' == name) {
+ next_child.ele(next ? 'true' : 'false');
+
+ } else if ('String' == name) {
+ next_child.ele('string').txt(next);
+
+ } else if ('ArrayBuffer' == name) {
+ next_child.ele('data').raw(base64.fromByteArray(next));
+
+ } else if (next && next.buffer && 'ArrayBuffer' == type(next.buffer)) {
+ // a typed array
+ next_child.ele('data').raw(base64.fromByteArray(new Uint8Array(next.buffer), next_child));
+
+ } else if ('Null' === name) {
+ next_child.ele('null').txt('');
+
+ }
+}
+
+}).call(this)}).call(this,{"isBuffer":require("../node_modules/is-buffer/index.js")})
+},{"../node_modules/is-buffer/index.js":3,"base64-js":2,"xmlbuilder":36}],2:[function(require,module,exports){
+'use strict'
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+ var len = b64.length
+
+ if (len % 4 > 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('')
+}
+
+},{}],3:[function(require,module,exports){
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+
+// The _isBuffer check is for Safari 5-7 support, because it's missing
+// Object.prototype.constructor. Remove this eventually
+module.exports = function (obj) {
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
+}
+
+function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+}
+
+// For Node v0.10 support. Remove this eventually.
+function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+}
+
+},{}],4:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Disconnected: 1,
+ Preceding: 2,
+ Following: 4,
+ Contains: 8,
+ ContainedBy: 16,
+ ImplementationSpecific: 32
+ };
+
+}).call(this);
+
+},{}],5:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Element: 1,
+ Attribute: 2,
+ Text: 3,
+ CData: 4,
+ EntityReference: 5,
+ EntityDeclaration: 6,
+ ProcessingInstruction: 7,
+ Comment: 8,
+ Document: 9,
+ DocType: 10,
+ DocumentFragment: 11,
+ NotationDeclaration: 12,
+ // Numeric codes up to 200 are reserved to W3C for possible future use.
+ // Following are types internal to this library:
+ Declaration: 201,
+ Raw: 202,
+ AttributeDeclaration: 203,
+ ElementDeclaration: 204,
+ Dummy: 205
+ };
+
+}).call(this);
+
+},{}],6:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Copies all enumerable own properties from `sources` to `target`
+ var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ assign = function(target, ...sources) {
+ var i, key, len, source;
+ if (isFunction(Object.assign)) {
+ Object.assign.apply(null, arguments);
+ } else {
+ for (i = 0, len = sources.length; i < len; i++) {
+ source = sources[i];
+ if (source != null) {
+ for (key in source) {
+ if (!hasProp.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+ }
+ }
+ return target;
+ };
+
+ // Determines if `val` is a Function object
+ isFunction = function(val) {
+ return !!val && Object.prototype.toString.call(val) === '[object Function]';
+ };
+
+ // Determines if `val` is an Object
+ isObject = function(val) {
+ var ref;
+ return !!val && ((ref = typeof val) === 'function' || ref === 'object');
+ };
+
+ // Determines if `val` is an Array
+ isArray = function(val) {
+ if (isFunction(Array.isArray)) {
+ return Array.isArray(val);
+ } else {
+ return Object.prototype.toString.call(val) === '[object Array]';
+ }
+ };
+
+ // Determines if `val` is an empty Array or an Object with no own properties
+ isEmpty = function(val) {
+ var key;
+ if (isArray(val)) {
+ return !val.length;
+ } else {
+ for (key in val) {
+ if (!hasProp.call(val, key)) continue;
+ return false;
+ }
+ return true;
+ }
+ };
+
+ // Determines if `val` is a plain Object
+ isPlainObject = function(val) {
+ var ctor, proto;
+ return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
+ };
+
+ // Gets the primitive value of an object
+ getValue = function(obj) {
+ if (isFunction(obj.valueOf)) {
+ return obj.valueOf();
+ } else {
+ return obj;
+ }
+ };
+
+ module.exports.assign = assign;
+
+ module.exports.isFunction = isFunction;
+
+ module.exports.isObject = isObject;
+
+ module.exports.isArray = isArray;
+
+ module.exports.isEmpty = isEmpty;
+
+ module.exports.isPlainObject = isPlainObject;
+
+ module.exports.getValue = getValue;
+
+}).call(this);
+
+},{}],7:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ None: 0,
+ OpenTag: 1,
+ InsideTag: 2,
+ CloseTag: 3
+ };
+
+}).call(this);
+
+},{}],8:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLNode;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents an attribute
+ module.exports = XMLAttribute = (function() {
+ class XMLAttribute {
+ // Initializes a new instance of `XMLAttribute`
+
+ // `parent` the parent node
+ // `name` attribute target
+ // `value` attribute value
+ constructor(parent, name, value) {
+ this.parent = parent;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.value = this.stringify.attValue(value);
+ this.type = NodeType.Attribute;
+ // DOM level 3
+ this.isId = false;
+ this.schemaTypeInfo = null;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ name = name || this.name;
+ if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else {
+ return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ isEqualNode(node) {
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.value !== this.value) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLAttribute.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'specified', {
+ get: function() {
+ return true;
+ }
+ });
+
+ return XMLAttribute;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLNode":27}],9:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCData, XMLCharacterData;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a CDATA node
+ module.exports = XMLCData = class XMLCData extends XMLCharacterData {
+ // Initializes a new instance of `XMLCData`
+
+ // `text` CDATA text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing CDATA text. " + this.debugInfo());
+ }
+ this.name = "#cdata-section";
+ this.type = NodeType.CData;
+ this.value = this.stringify.cdata(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLCharacterData":10}],10:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLCharacterData, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a character data node
+ module.exports = XMLCharacterData = (function() {
+ class XMLCharacterData extends XMLNode {
+ // Initializes a new instance of `XMLCharacterData`
+
+ constructor(parent) {
+ super(parent);
+ this.value = '';
+ }
+
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // DOM level 1 functions to be implemented later
+ substringData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendData(arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ insertData(offset, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ deleteData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ replaceData(offset, count, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.data !== this.data) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLCharacterData.prototype, 'data', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ Object.defineProperty(XMLCharacterData.prototype, 'length', {
+ get: function() {
+ return this.value.length;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLCharacterData.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ return XMLCharacterData;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./XMLNode":27}],11:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLComment;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a comment node
+ module.exports = XMLComment = class XMLComment extends XMLCharacterData {
+ // Initializes a new instance of `XMLComment`
+
+ // `text` comment text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing comment text. " + this.debugInfo());
+ }
+ this.name = "#comment";
+ this.type = NodeType.Comment;
+ this.value = this.stringify.comment(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.comment(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLCharacterData":10}],12:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;
+
+ XMLDOMErrorHandler = require('./XMLDOMErrorHandler');
+
+ XMLDOMStringList = require('./XMLDOMStringList');
+
+ // Implements the DOMConfiguration interface
+ module.exports = XMLDOMConfiguration = (function() {
+ class XMLDOMConfiguration {
+ constructor() {
+ var clonedSelf;
+ this.defaultParams = {
+ "canonical-form": false,
+ "cdata-sections": false,
+ "comments": false,
+ "datatype-normalization": false,
+ "element-content-whitespace": true,
+ "entities": true,
+ "error-handler": new XMLDOMErrorHandler(),
+ "infoset": true,
+ "validate-if-schema": false,
+ "namespaces": true,
+ "namespace-declarations": true,
+ "normalize-characters": false,
+ "schema-location": '',
+ "schema-type": '',
+ "split-cdata-sections": true,
+ "validate": false,
+ "well-formed": true
+ };
+ this.params = clonedSelf = Object.create(this.defaultParams);
+ }
+
+ // Gets the value of a parameter.
+
+ // `name` name of the parameter
+ getParameter(name) {
+ if (this.params.hasOwnProperty(name)) {
+ return this.params[name];
+ } else {
+ return null;
+ }
+ }
+
+ // Checks if setting a parameter to a specific value is supported.
+
+ // `name` name of the parameter
+ // `value` parameter value
+ canSetParameter(name, value) {
+ return true;
+ }
+
+ // Sets the value of a parameter.
+
+ // `name` name of the parameter
+ // `value` new value or null if the user wishes to unset the parameter
+ setParameter(name, value) {
+ if (value != null) {
+ return this.params[name] = value;
+ } else {
+ return delete this.params[name];
+ }
+ }
+
+ };
+
+ // Returns the list of parameter names
+ Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {
+ get: function() {
+ return new XMLDOMStringList(Object.keys(this.defaultParams));
+ }
+ });
+
+ return XMLDOMConfiguration;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./XMLDOMErrorHandler":13,"./XMLDOMStringList":15}],13:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents the error handler for DOM operations
+ var XMLDOMErrorHandler;
+
+ module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {
+ // Initializes a new instance of `XMLDOMErrorHandler`
+
+ constructor() {}
+
+ // Called on the error handler when an error occurs.
+
+ // `error` the error message as a string
+ handleError(error) {
+ throw new Error(error);
+ }
+
+ };
+
+}).call(this);
+
+},{}],14:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Implements the DOMImplementation interface
+ var XMLDOMImplementation;
+
+ module.exports = XMLDOMImplementation = class XMLDOMImplementation {
+ // Tests if the DOM implementation implements a specific feature.
+
+ // `feature` package name of the feature to test. In Level 1, the
+ // legal values are "HTML" and "XML" (case-insensitive).
+ // `version` version number of the package name to test.
+ // In Level 1, this is the string "1.0". If the version is
+ // not specified, supporting any version of the feature will
+ // cause the method to return true.
+ hasFeature(feature, version) {
+ return true;
+ }
+
+ // Creates a new document type declaration.
+
+ // `qualifiedName` qualified name of the document type to be created
+ // `publicId` public identifier of the external subset
+ // `systemId` system identifier of the external subset
+ createDocumentType(qualifiedName, publicId, systemId) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new document.
+
+ // `namespaceURI` namespace URI of the document element to create
+ // `qualifiedName` the qualified name of the document to be created
+ // `doctype` the type of document to be created or null
+ createDocument(namespaceURI, qualifiedName, doctype) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new HTML document.
+
+ // `title` document title
+ createHTMLDocument(title) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Returns a specialized object which implements the specialized APIs
+ // of the specified feature and version.
+
+ // `feature` name of the feature requested.
+ // `version` version number of the feature to test
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+}).call(this);
+
+},{}],15:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of string entries
+ var XMLDOMStringList;
+
+ module.exports = XMLDOMStringList = (function() {
+ class XMLDOMStringList {
+ // Initializes a new instance of `XMLDOMStringList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `arr` the array of string values
+ constructor(arr) {
+ this.arr = arr || [];
+ }
+
+ // Returns the indexth item in the collection.
+
+ // `index` index into the collection
+ item(index) {
+ return this.arr[index] || null;
+ }
+
+ // Test if a string is part of this DOMStringList.
+
+ // `str` the string to look for
+ contains(str) {
+ return this.arr.indexOf(str) !== -1;
+ }
+
+ };
+
+ // Returns the number of strings in the list.
+ Object.defineProperty(XMLDOMStringList.prototype, 'length', {
+ get: function() {
+ return this.arr.length;
+ }
+ });
+
+ return XMLDOMStringList;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],16:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute list
+ module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {
+ // Initializes a new instance of `XMLDTDAttList`
+
+ // `parent` the parent `XMLDocType` element
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,
+ // #FIXED or #DEFAULT)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ super(parent);
+ if (elementName == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (attributeName == null) {
+ throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName));
+ }
+ if (!attributeType) {
+ throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName));
+ }
+ if (!defaultValueType) {
+ throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName));
+ }
+ if (defaultValueType.indexOf('#') !== 0) {
+ defaultValueType = '#' + defaultValueType;
+ }
+ if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {
+ throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {
+ throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ this.elementName = this.stringify.name(elementName);
+ this.type = NodeType.AttributeDeclaration;
+ this.attributeName = this.stringify.name(attributeName);
+ this.attributeType = this.stringify.dtdAttType(attributeType);
+ if (defaultValue) {
+ this.defaultValue = this.stringify.dtdAttDefault(defaultValue);
+ }
+ this.defaultValueType = defaultValueType;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLNode":27}],17:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDElement, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute
+ module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {
+ // Initializes a new instance of `XMLDTDElement`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (!value) {
+ value = '(#PCDATA)';
+ }
+ if (Array.isArray(value)) {
+ value = '(' + value.join(',') + ')';
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.ElementDeclaration;
+ this.value = this.stringify.dtdElementValue(value);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLNode":27}],18:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDEntity, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an entity declaration in the DTD
+ module.exports = XMLDTDEntity = (function() {
+ class XMLDTDEntity extends XMLNode {
+ // Initializes a new instance of `XMLDTDEntity`
+
+ // `parent` the parent `XMLDocType` element
+ // `pe` whether this is a parameter entity or a general entity
+ // defaults to `false` (general entity)
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ constructor(parent, pe, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD entity name. " + this.debugInfo(name));
+ }
+ if (value == null) {
+ throw new Error("Missing DTD entity value. " + this.debugInfo(name));
+ }
+ this.pe = !!pe;
+ this.name = this.stringify.name(name);
+ this.type = NodeType.EntityDeclaration;
+ if (!isObject(value)) {
+ this.value = this.stringify.dtdEntityValue(value);
+ this.internal = true;
+ } else {
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ if (value.pubID && !value.sysID) {
+ throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
+ }
+ this.internal = false;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ if (value.nData != null) {
+ this.nData = this.stringify.dtdNData(value.nData);
+ }
+ if (this.pe && this.nData) {
+ throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
+ }
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {
+ get: function() {
+ return this.nData || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDTDEntity;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./XMLNode":27}],19:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDNotation, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a NOTATION entry in the DTD
+ module.exports = XMLDTDNotation = (function() {
+ class XMLDTDNotation extends XMLNode {
+ // Initializes a new instance of `XMLDTDNotation`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD notation name. " + this.debugInfo(name));
+ }
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.NotationDeclaration;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ return XMLDTDNotation;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLNode":27}],20:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDeclaration, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents the XML declaration
+ module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {
+ // Initializes a new instance of `XMLDeclaration`
+
+ // `parent` the document object
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ constructor(parent, version, encoding, standalone) {
+ super(parent);
+ // arguments may also be passed as an object
+ if (isObject(version)) {
+ ({version, encoding, standalone} = version);
+ }
+ if (!version) {
+ version = '1.0';
+ }
+ this.type = NodeType.Declaration;
+ this.version = this.stringify.xmlVersion(version);
+ if (encoding != null) {
+ this.encoding = this.stringify.xmlEncoding(encoding);
+ }
+ if (standalone != null) {
+ this.standalone = this.stringify.xmlStandalone(standalone);
+ }
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.declaration(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./XMLNode":27}],21:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents doctype declaration
+ module.exports = XMLDocType = (function() {
+ class XMLDocType extends XMLNode {
+ // Initializes a new instance of `XMLDocType`
+
+ // `parent` the document object
+
+ // `pubID` public identifier of the external subset
+ // `sysID` system identifier of the external subset
+ constructor(parent, pubID, sysID) {
+ var child, i, len, ref;
+ super(parent);
+ this.type = NodeType.DocType;
+ // set DTD name to the name of the root node
+ if (parent.children) {
+ ref = parent.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.Element) {
+ this.name = child.name;
+ break;
+ }
+ }
+ }
+ this.documentObject = parent;
+ // arguments may also be passed as an object
+ if (isObject(pubID)) {
+ ({pubID, sysID} = pubID);
+ }
+ if (sysID == null) {
+ [sysID, pubID] = [pubID, sysID];
+ }
+ if (pubID != null) {
+ this.pubID = this.stringify.dtdPubID(pubID);
+ }
+ if (sysID != null) {
+ this.sysID = this.stringify.dtdSysID(sysID);
+ }
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ element(name, value) {
+ var child;
+ child = new XMLDTDElement(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var child;
+ child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, false, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, true, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var child;
+ child = new XMLDTDNotation(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.docType(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ ele(name, value) {
+ return this.element(name, value);
+ }
+
+ att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ }
+
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ up() {
+ return this.root() || this.documentObject;
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.name !== this.name) {
+ return false;
+ }
+ if (node.publicId !== this.publicId) {
+ return false;
+ }
+ if (node.systemId !== this.systemId) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocType.prototype, 'entities', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if ((child.type === NodeType.EntityDeclaration) && !child.pe) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'notations', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.NotationDeclaration) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ // DOM level 2
+ Object.defineProperty(XMLDocType.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'internalSubset', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLDocType;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./XMLDTDAttList":16,"./XMLDTDElement":17,"./XMLDTDEntity":18,"./XMLDTDNotation":19,"./XMLNamedNodeMap":26,"./XMLNode":27}],22:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;
+
+ ({isPlainObject} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDOMConfiguration = require('./XMLDOMConfiguration');
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ // Represents an XML builder
+ module.exports = XMLDocument = (function() {
+ class XMLDocument extends XMLNode {
+ // Initializes a new instance of `XMLDocument`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ constructor(options) {
+ super(null);
+ this.name = "#document";
+ this.type = NodeType.Document;
+ this.documentURI = null;
+ this.domConfig = new XMLDOMConfiguration();
+ options || (options = {});
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.stringify = new XMLStringifier(options);
+ }
+
+ // Ends the document and passes it to the given XML writer
+
+ // `writer` is either an XML writer or a plain object to pass to the
+ // constructor of the default XML writer. The default writer is assigned when
+ // creating the XML document. Following flags are recognized by the
+ // built-in XMLStringWriter:
+ // `writer.pretty` pretty prints the result
+ // `writer.indent` indentation for pretty print
+ // `writer.offset` how many indentations to add to every line for pretty print
+ // `writer.newline` newline sequence for pretty print
+ end(writer) {
+ var writerOptions;
+ writerOptions = {};
+ if (!writer) {
+ writer = this.options.writer;
+ } else if (isPlainObject(writer)) {
+ writerOptions = writer;
+ writer = this.options.writer;
+ }
+ return writer.document(this, writer.filterOptions(writerOptions));
+ }
+
+ // Converts the XML document to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.document(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ createElement(tagName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createDocumentFragment() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTextNode(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createComment(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createCDATASection(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createProcessingInstruction(target, data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttribute(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEntityReference(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2 functions to be implemented later
+ importNode(importedNode, deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createElementNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttributeNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementById(elementId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ adoptNode(source) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalizeDocument() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ renameNode(node, namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 4 functions to be implemented later
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEvent(eventInterface) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createRange() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createNodeIterator(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTreeWalker(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocument.prototype, 'implementation', {
+ value: new XMLDOMImplementation()
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'doctype', {
+ get: function() {
+ var child, i, len, ref;
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.DocType) {
+ return child;
+ }
+ }
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'documentElement', {
+ get: function() {
+ return this.rootObject || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {
+ get: function() {
+ return false;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].encoding;
+ } else {
+ return null;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].standalone === 'yes';
+ } else {
+ return false;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].version;
+ } else {
+ return "1.0";
+ }
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLDocument.prototype, 'URL', {
+ get: function() {
+ return this.documentURI;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'origin', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'compatMode', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'characterSet', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'contentType', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDocument;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./XMLDOMConfiguration":12,"./XMLDOMImplementation":14,"./XMLNode":27,"./XMLStringWriter":32,"./XMLStringifier":33}],23:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLElement = require('./XMLElement');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ WriterState = require('./WriterState');
+
+ // Represents an XML builder
+ module.exports = XMLDocumentCB = class XMLDocumentCB {
+ // Initializes a new instance of `XMLDocumentCB`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its first
+ // argument, and the current indentation level as its second argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ constructor(options, onData, onEnd) {
+ var writerOptions;
+ this.name = "?xml";
+ this.type = NodeType.Document;
+ options || (options = {});
+ writerOptions = {};
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ } else if (isPlainObject(options.writer)) {
+ writerOptions = options.writer;
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.writer = options.writer;
+ this.writerOptions = this.writer.filterOptions(writerOptions);
+ this.stringify = new XMLStringifier(options);
+ this.onDataCallback = onData || function() {};
+ this.onEndCallback = onEnd || function() {};
+ this.currentNode = null;
+ this.currentLevel = -1;
+ this.openTags = {};
+ this.documentStarted = false;
+ this.documentCompleted = false;
+ this.root = null;
+ }
+
+ // Creates a child element node from the given XMLNode
+
+ // `node` the child node
+ createChildNode(node) {
+ var att, attName, attributes, child, i, len, ref, ref1;
+ switch (node.type) {
+ case NodeType.CData:
+ this.cdata(node.value);
+ break;
+ case NodeType.Comment:
+ this.comment(node.value);
+ break;
+ case NodeType.Element:
+ attributes = {};
+ ref = node.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ attributes[attName] = att.value;
+ }
+ this.node(node.name, attributes);
+ break;
+ case NodeType.Dummy:
+ this.dummy();
+ break;
+ case NodeType.Raw:
+ this.raw(node.value);
+ break;
+ case NodeType.Text:
+ this.text(node.value);
+ break;
+ case NodeType.ProcessingInstruction:
+ this.instruction(node.target, node.value);
+ break;
+ default:
+ throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name);
+ }
+ ref1 = node.children;
+ // write child nodes recursively
+ for (i = 0, len = ref1.length; i < len; i++) {
+ child = ref1[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ return this;
+ }
+
+ // Creates a dummy node
+
+ dummy() {
+ // no-op, just return this
+ return this;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ if (name == null) {
+ throw new Error("Missing node name.");
+ }
+ if (this.root && this.currentLevel === -1) {
+ throw new Error("Document can only have one root node. " + this.debugInfo(name));
+ }
+ this.openCurrent();
+ name = getValue(name);
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ this.currentNode = new XMLElement(this, name, attributes);
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ if (text != null) {
+ this.text(text);
+ }
+ return this;
+ }
+
+ // Creates a child element node or an element type declaration when called
+ // inside the DTD
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var child, i, len, oldValidationFlag, ref, root;
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ this.dtdElement(...arguments);
+ } else {
+ if (Array.isArray(name) || isObject(name) || isFunction(name)) {
+ oldValidationFlag = this.options.noValidation;
+ this.options.noValidation = true;
+ root = new XMLDocument(this.options).element('TEMP_ROOT');
+ root.element(name);
+ this.options.noValidation = oldValidationFlag;
+ ref = root.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ } else {
+ this.node(name, attributes, text);
+ }
+ }
+ return this;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (!this.currentNode || this.currentNode.children) {
+ throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name));
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLText(this, value);
+ this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLCData(this, value);
+ this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLComment(this, value);
+ this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLRaw(this, value);
+ this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var i, insTarget, insValue, len, node;
+ this.openCurrent();
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (i = 0, len = target.length; i < len; i++) {
+ insTarget = target[i];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ node = new XMLProcessingInstruction(this, target, value);
+ this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ }
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var node;
+ this.openCurrent();
+ if (this.documentStarted) {
+ throw new Error("declaration() must be the first node.");
+ }
+ node = new XMLDeclaration(this, version, encoding, standalone);
+ this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates the document type declaration
+
+ // `root` the name of the root node
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ doctype(root, pubID, sysID) {
+ this.openCurrent();
+ if (root == null) {
+ throw new Error("Missing root node name.");
+ }
+ if (this.root) {
+ throw new Error("dtd() must come before the root node.");
+ }
+ this.currentNode = new XMLDocType(this, pubID, sysID);
+ this.currentNode.rootNodeName = root;
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ return this;
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ dtdElement(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDElement(this, name, value);
+ this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, false, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, true, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDNotation(this, name, value);
+ this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.currentLevel < 0) {
+ throw new Error("The document node has no parent.");
+ }
+ if (this.currentNode) {
+ if (this.currentNode.children) {
+ this.closeNode(this.currentNode);
+ } else {
+ this.openNode(this.currentNode);
+ }
+ this.currentNode = null;
+ } else {
+ this.closeNode(this.openTags[this.currentLevel]);
+ }
+ delete this.openTags[this.currentLevel];
+ this.currentLevel--;
+ return this;
+ }
+
+ // Ends the document
+ end() {
+ while (this.currentLevel >= 0) {
+ this.up();
+ }
+ return this.onEnd();
+ }
+
+ // Opens the current parent node
+ openCurrent() {
+ if (this.currentNode) {
+ this.currentNode.children = true;
+ return this.openNode(this.currentNode);
+ }
+ }
+
+ // Writes the opening tag of the current node or the entire node if it has
+ // no child nodes
+ openNode(node) {
+ var att, chunk, name, ref;
+ if (!node.isOpen) {
+ if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {
+ this.root = node;
+ }
+ chunk = '';
+ if (node.type === NodeType.Element) {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);
+ }
+ chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType
+ } else {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<!DOCTYPE ' + node.rootNodeName;
+
+ // external identifier
+ if (node.pubID && node.sysID) {
+ chunk += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ chunk += ' SYSTEM "' + node.sysID + '"';
+ }
+
+ // internal subset
+ if (node.children) {
+ chunk += ' [';
+ this.writerOptions.state = WriterState.InsideTag;
+ } else {
+ this.writerOptions.state = WriterState.CloseTag;
+ chunk += '>';
+ }
+ chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.onData(chunk, this.currentLevel);
+ return node.isOpen = true;
+ }
+ }
+
+ // Writes the closing tag of the current node
+ closeNode(node) {
+ var chunk;
+ if (!node.isClosed) {
+ chunk = '';
+ this.writerOptions.state = WriterState.CloseTag;
+ if (node.type === NodeType.Element) {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '</' + node.name + '>' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType
+ } else {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.writerOptions.state = WriterState.None;
+ this.onData(chunk, this.currentLevel);
+ return node.isClosed = true;
+ }
+ }
+
+ // Called when a new chunk of XML is output
+
+ // `chunk` a string containing the XML chunk
+ // `level` current indentation level
+ onData(chunk, level) {
+ this.documentStarted = true;
+ return this.onDataCallback(chunk, level + 1);
+ }
+
+ // Called when the XML document is completed
+ onEnd() {
+ this.documentCompleted = true;
+ return this.onEndCallback();
+ }
+
+ // Returns debug string
+ debugInfo(name) {
+ if (name == null) {
+ return "";
+ } else {
+ return "node: <" + name + ">";
+ }
+ }
+
+ // Node aliases
+ ele() {
+ return this.element(...arguments);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ dtd(root, pubID, sysID) {
+ return this.doctype(root, pubID, sysID);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ // Attribute aliases
+ att() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ a() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ // DTD aliases
+ // att() and ele() are defined above
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./WriterState":7,"./XMLAttribute":8,"./XMLCData":9,"./XMLComment":11,"./XMLDTDAttList":16,"./XMLDTDElement":17,"./XMLDTDEntity":18,"./XMLDTDNotation":19,"./XMLDeclaration":20,"./XMLDocType":21,"./XMLDocument":22,"./XMLElement":25,"./XMLProcessingInstruction":29,"./XMLRaw":30,"./XMLStringWriter":32,"./XMLStringifier":33,"./XMLText":34}],24:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDummy, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a raw node
+ module.exports = XMLDummy = class XMLDummy extends XMLNode {
+ // Initializes a new instance of `XMLDummy`
+
+ // `XMLDummy` is a special node representing a node with
+ // a null value. Dummy nodes are created while recursively
+ // building the XML tree. Simply skipping null values doesn't
+ // work because that would break the recursive chain.
+ constructor(parent) {
+ super(parent);
+ this.type = NodeType.Dummy;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return '';
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLNode":27}],25:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, getValue} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents an element of the XML document
+ module.exports = XMLElement = (function() {
+ class XMLElement extends XMLNode {
+ // Initializes a new instance of `XMLElement`
+
+ // `parent` the parent node
+ // `name` element name
+ // `attributes` an object containing name/value pairs of attributes
+ constructor(parent, name, attributes) {
+ var child, j, len, ref;
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing element name. " + this.debugInfo());
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.Element;
+ this.attribs = {};
+ this.schemaTypeInfo = null;
+ if (attributes != null) {
+ this.attribute(attributes);
+ }
+ // set properties if this is the root node
+ if (parent.type === NodeType.Document) {
+ this.isRoot = true;
+ this.documentObject = parent;
+ parent.rootObject = this;
+ // set dtd name
+ if (parent.children) {
+ ref = parent.children;
+ for (j = 0, len = ref.length; j < len; j++) {
+ child = ref[j];
+ if (child.type === NodeType.DocType) {
+ child.name = this.name;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ var att, attName, clonedSelf, ref;
+ clonedSelf = Object.create(this);
+ // remove document element
+ if (clonedSelf.isRoot) {
+ clonedSelf.documentObject = null;
+ }
+ // clone attributes
+ clonedSelf.attribs = {};
+ ref = this.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ clonedSelf.attribs[attName] = att.clone();
+ }
+ // clone child nodes
+ clonedSelf.children = [];
+ this.children.forEach(function(child) {
+ var clonedChild;
+ clonedChild = child.clone();
+ clonedChild.parent = clonedSelf;
+ return clonedSelf.children.push(clonedChild);
+ });
+ return clonedSelf;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ var attName, j, len;
+ // Also defined in DOM level 1
+ // removeAttribute(name) removes an attribute by name.
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo());
+ }
+ name = getValue(name);
+ if (Array.isArray(name)) { // expand if array
+ for (j = 0, len = name.length; j < len; j++) {
+ attName = name[j];
+ delete this.attribs[attName];
+ }
+ } else {
+ delete this.attribs[name];
+ }
+ return this;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ // `options.allowEmpty` do not self close empty element tags
+ toString(options) {
+ return this.options.writer.element(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // DOM Level 1
+ getAttribute(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].value;
+ } else {
+ return null;
+ }
+ }
+
+ setAttribute(name, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNode(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name];
+ } else {
+ return null;
+ }
+ }
+
+ setAttributeNode(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNode(oldAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 2
+ getAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNS(namespaceURI, qualifiedName, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNodeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNodeNS(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasAttribute(name) {
+ return this.attribs.hasOwnProperty(name);
+ }
+
+ hasAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 3
+ setIdAttribute(name, isId) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].isId;
+ } else {
+ return isId;
+ }
+ }
+
+ setIdAttributeNS(namespaceURI, localName, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setIdAttributeNode(idAttr, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 4
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref;
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.attribs.length !== this.attribs.length) {
+ return false;
+ }
+ for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {
+ if (!this.attribs[i].isEqualNode(node.attribs[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLElement.prototype, 'tagName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLElement.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'id', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'className', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'classList', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'attributes', {
+ get: function() {
+ if (!this.attributeMap || !this.attributeMap.nodes) {
+ this.attributeMap = new XMLNamedNodeMap(this.attribs);
+ }
+ return this.attributeMap;
+ }
+ });
+
+ return XMLElement;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./XMLAttribute":8,"./XMLNamedNodeMap":26,"./XMLNode":27}],26:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a map of nodes accessed by a string key
+ var XMLNamedNodeMap;
+
+ module.exports = XMLNamedNodeMap = (function() {
+ class XMLNamedNodeMap {
+ // Initializes a new instance of `XMLNamedNodeMap`
+ // This is just a wrapper around an ordinary
+ // JS object.
+
+ // `nodes` the object containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given object. The calling function should check
+ // whether the wrapped object is null and supply a new object
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ getNamedItem(name) {
+ return this.nodes[name];
+ }
+
+ setNamedItem(node) {
+ var oldNode;
+ oldNode = this.nodes[node.nodeName];
+ this.nodes[node.nodeName] = node;
+ return oldNode || null;
+ }
+
+ removeNamedItem(name) {
+ var oldNode;
+ oldNode = this.nodes[name];
+ delete this.nodes[name];
+ return oldNode || null;
+ }
+
+ item(index) {
+ return this.nodes[Object.keys(this.nodes)[index]] || null;
+ }
+
+ // DOM level 2 functions to be implemented later
+ getNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ setNamedItemNS(node) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ removeNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+
+ // DOM level 1
+ Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {
+ get: function() {
+ return Object.keys(this.nodes).length || 0;
+ }
+ });
+
+ return XMLNamedNodeMap;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],27:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,
+ hasProp = {}.hasOwnProperty,
+ splice = [].splice;
+
+ ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));
+
+ XMLElement = null;
+
+ XMLCData = null;
+
+ XMLComment = null;
+
+ XMLDeclaration = null;
+
+ XMLDocType = null;
+
+ XMLRaw = null;
+
+ XMLText = null;
+
+ XMLProcessingInstruction = null;
+
+ XMLDummy = null;
+
+ NodeType = null;
+
+ XMLNodeList = null;
+
+ XMLNamedNodeMap = null;
+
+ DocumentPosition = null;
+
+ // Represents a generic XMl element
+ module.exports = XMLNode = (function() {
+ class XMLNode {
+ // Initializes a new instance of `XMLNode`
+
+ // `parent` the parent node
+ constructor(parent1) {
+ this.parent = parent1;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ this.value = null;
+ this.children = [];
+ this.baseURI = null;
+ // first execution, load dependencies that are otherwise
+ // circular (so we can't load them at the top)
+ if (!XMLElement) {
+ XMLElement = require('./XMLElement');
+ XMLCData = require('./XMLCData');
+ XMLComment = require('./XMLComment');
+ XMLDeclaration = require('./XMLDeclaration');
+ XMLDocType = require('./XMLDocType');
+ XMLRaw = require('./XMLRaw');
+ XMLText = require('./XMLText');
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+ XMLDummy = require('./XMLDummy');
+ NodeType = require('./NodeType');
+ XMLNodeList = require('./XMLNodeList');
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+ DocumentPosition = require('./DocumentPosition');
+ }
+ }
+
+
+ // Sets the parent node of this node and its children recursively
+
+ // `parent` the parent node
+ setParent(parent) {
+ var child, j, len, ref1, results;
+ this.parent = parent;
+ if (parent) {
+ this.options = parent.options;
+ this.stringify = parent.stringify;
+ }
+ ref1 = this.children;
+ results = [];
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ results.push(child.setParent(this));
+ }
+ return results;
+ }
+
+ // Creates a child element node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var childNode, item, j, k, key, lastChild, len, len1, val;
+ lastChild = null;
+ if (attributes === null && (text == null)) {
+ [attributes, text] = [{}, null];
+ }
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ // expand if array
+ if (Array.isArray(name)) {
+ for (j = 0, len = name.length; j < len; j++) {
+ item = name[j];
+ lastChild = this.element(item);
+ }
+ // evaluate if function
+ } else if (isFunction(name)) {
+ lastChild = this.element(name.apply());
+ // expand if object
+ } else if (isObject(name)) {
+ for (key in name) {
+ if (!hasProp.call(name, key)) continue;
+ val = name[key];
+ if (isFunction(val)) {
+ // evaluate if function
+ val = val.apply();
+ }
+ // assign attributes
+ if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
+ lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
+ // skip empty arrays
+ } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
+ lastChild = this.dummy();
+ // empty objects produce one node
+ } else if (isObject(val) && isEmpty(val)) {
+ lastChild = this.element(key);
+ // skip null and undefined nodes
+ } else if (!this.options.keepNullNodes && (val == null)) {
+ lastChild = this.dummy();
+
+ // expand list by creating child nodes
+ } else if (!this.options.separateArrayItems && Array.isArray(val)) {
+ for (k = 0, len1 = val.length; k < len1; k++) {
+ item = val[k];
+ childNode = {};
+ childNode[key] = item;
+ lastChild = this.element(childNode);
+ }
+
+ // expand child nodes under parent
+ } else if (isObject(val)) {
+ // if the key is #text expand child nodes under this node to support mixed content
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.element(val);
+ } else {
+ lastChild = this.element(key);
+ lastChild.element(val);
+ }
+ } else {
+
+ // text node
+ lastChild = this.element(key, val);
+ }
+ }
+ // skip null nodes
+ } else if (!this.options.keepNullNodes && text === null) {
+ lastChild = this.dummy();
+ } else {
+ // text node
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.text(text);
+ // cdata node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
+ lastChild = this.cdata(text);
+ // comment node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
+ lastChild = this.comment(text);
+ // raw text node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
+ lastChild = this.raw(text);
+ // processing instruction
+ } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
+ lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
+ } else {
+ // element node
+ lastChild = this.node(name, attributes, text);
+ }
+ }
+ if (lastChild == null) {
+ throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
+ }
+ return lastChild;
+ }
+
+ // Creates a child element node before the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertBefore(name, attributes, text) {
+ var child, i, newChild, refChild, removed;
+ // DOM level 1
+ // insertBefore(newChild, refChild) inserts the child node newChild before refChild
+ if (name != null ? name.type : void 0) {
+ newChild = name;
+ refChild = attributes;
+ newChild.setParent(this);
+ if (refChild) {
+ // temporarily remove children starting *with* refChild
+ i = children.indexOf(refChild);
+ removed = children.splice(i);
+
+ // add the new child
+ children.push(newChild);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(children, removed);
+ } else {
+ children.push(newChild);
+ }
+ return newChild;
+ } else {
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+ }
+
+ // Creates a child element node after the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertAfter(name, attributes, text) {
+ var child, i, removed;
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+
+ // Deletes a child element node
+
+ remove() {
+ var i, ref1;
+ if (this.isRoot) {
+ throw new Error("Cannot remove the root element. " + this.debugInfo());
+ }
+ i = this.parent.children.indexOf(this);
+ splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;
+ return this.parent;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ var child;
+ if (name != null) {
+ name = getValue(name);
+ }
+ attributes || (attributes = {});
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ child = new XMLElement(this, name, attributes);
+ if (text != null) {
+ child.text(text);
+ }
+ this.children.push(child);
+ return child;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var child;
+ if (isObject(value)) {
+ this.element(value);
+ }
+ child = new XMLText(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var child;
+ child = new XMLCData(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var child;
+ child = new XMLComment(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node before the current node
+
+ // `value` comment text
+ commentBefore(value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a comment node after the current node
+
+ // `value` comment text
+ commentAfter(value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var child;
+ child = new XMLRaw(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Adds a dummy node
+ dummy() {
+ var child;
+ child = new XMLDummy(this);
+ // Normally when a new node is created it is added to the child node collection.
+ // However, dummy nodes are never added to the XML tree. They are created while
+ // converting JS objects to XML nodes in order not to break the recursive function
+ // chain. They can be thought of as invisible nodes. They can be traversed through
+ // by using prev(), next(), up(), etc. functions but they do not exists in the tree.
+
+ // @children.push child
+ return child;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var insTarget, insValue, instruction, j, len;
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (j = 0, len = target.length; j < len; j++) {
+ insTarget = target[j];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ instruction = new XMLProcessingInstruction(this, target, value);
+ this.children.push(instruction);
+ }
+ return this;
+ }
+
+ // Creates a processing instruction node before the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionBefore(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a processing instruction node after the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionAfter(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var doc, xmldec;
+ doc = this.document();
+ xmldec = new XMLDeclaration(doc, version, encoding, standalone);
+ // Replace XML declaration if exists, otherwise insert at top
+ if (doc.children.length === 0) {
+ doc.children.unshift(xmldec);
+ } else if (doc.children[0].type === NodeType.Declaration) {
+ doc.children[0] = xmldec;
+ } else {
+ doc.children.unshift(xmldec);
+ }
+ return doc.root() || doc;
+ }
+
+ // Creates the document type declaration
+
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ dtd(pubID, sysID) {
+ var child, doc, doctype, i, j, k, len, len1, ref1, ref2;
+ doc = this.document();
+ doctype = new XMLDocType(doc, pubID, sysID);
+ ref1 = doc.children;
+ // Replace DTD if exists
+ for (i = j = 0, len = ref1.length; j < len; i = ++j) {
+ child = ref1[i];
+ if (child.type === NodeType.DocType) {
+ doc.children[i] = doctype;
+ return doctype;
+ }
+ }
+ ref2 = doc.children;
+ // insert before root node if the root node exists
+ for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {
+ child = ref2[i];
+ if (child.isRoot) {
+ doc.children.splice(i, 0, doctype);
+ return doctype;
+ }
+ }
+ // otherwise append to end
+ doc.children.push(doctype);
+ return doctype;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.isRoot) {
+ throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
+ }
+ return this.parent;
+ }
+
+ // Gets the root node
+ root() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node.rootObject;
+ } else if (node.isRoot) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Gets the node representing the XML document
+ document() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Ends the document and converts string
+ end(options) {
+ return this.document().end(options);
+ }
+
+ // Gets the previous node
+ prev() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i < 1) {
+ throw new Error("Already at the first node. " + this.debugInfo());
+ }
+ return this.parent.children[i - 1];
+ }
+
+ // Gets the next node
+ next() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i === -1 || i === this.parent.children.length - 1) {
+ throw new Error("Already at the last node. " + this.debugInfo());
+ }
+ return this.parent.children[i + 1];
+ }
+
+ // Imports cloned root from another XML document
+
+ // `doc` the XML document to insert nodes from
+ importDocument(doc) {
+ var child, clonedRoot, j, len, ref1;
+ clonedRoot = doc.root().clone();
+ clonedRoot.parent = this;
+ clonedRoot.isRoot = false;
+ this.children.push(clonedRoot);
+ // set properties if imported element becomes the root node
+ if (this.type === NodeType.Document) {
+ clonedRoot.isRoot = true;
+ clonedRoot.documentObject = this;
+ this.rootObject = clonedRoot;
+ // set dtd name
+ if (this.children) {
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.type === NodeType.DocType) {
+ child.name = clonedRoot.name;
+ break;
+ }
+ }
+ }
+ }
+ return this;
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ var ref1, ref2;
+ name = name || this.name;
+ if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {
+ return "";
+ } else if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {
+ return "node: <" + name + ">";
+ } else {
+ return "node: <" + name + ">, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ // Aliases
+ ele(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ doc() {
+ return this.document();
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ u() {
+ return this.up();
+ }
+
+ // can be deprecated in a future release
+ importXMLBuilder(doc) {
+ return this.importDocument(doc);
+ }
+
+ // Adds or modifies an attribute.
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ // DOM level 1 functions to be implemented later
+ replaceChild(newChild, oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeChild(oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendChild(newChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasChildNodes() {
+ return this.children.length !== 0;
+ }
+
+ cloneNode(deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalize() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2
+ isSupported(feature, version) {
+ return true;
+ }
+
+ hasAttributes() {
+ return this.attribs.length !== 0;
+ }
+
+ // DOM level 3 functions to be implemented later
+ compareDocumentPosition(other) {
+ var ref, res;
+ ref = this;
+ if (ref === other) {
+ return 0;
+ } else if (this.document() !== other.document()) {
+ res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
+ if (Math.random() < 0.5) {
+ res |= DocumentPosition.Preceding;
+ } else {
+ res |= DocumentPosition.Following;
+ }
+ return res;
+ } else if (ref.isAncestor(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Preceding;
+ } else if (ref.isDescendant(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Following;
+ } else if (ref.isPreceding(other)) {
+ return DocumentPosition.Preceding;
+ } else {
+ return DocumentPosition.Following;
+ }
+ }
+
+ isSameNode(other) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupPrefix(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isDefaultNamespace(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupNamespaceURI(prefix) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref1;
+ if (node.nodeType !== this.nodeType) {
+ return false;
+ }
+ if (node.children.length !== this.children.length) {
+ return false;
+ }
+ for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {
+ if (!this.children[i].isEqualNode(node.children[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setUserData(key, data, handler) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getUserData(key) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // Returns true if other is an inclusive descendant of node,
+ // and false otherwise.
+ contains(other) {
+ if (!other) {
+ return false;
+ }
+ return other === this || this.isDescendant(other);
+ }
+
+ // An object A is called a descendant of an object B, if either A is
+ // a child of B or A is a child of an object C that is a descendant of B.
+ isDescendant(node) {
+ var child, isDescendantChild, j, len, ref1;
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (node === child) {
+ return true;
+ }
+ isDescendantChild = child.isDescendant(node);
+ if (isDescendantChild) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // An object A is called an ancestor of an object B if and only if
+ // B is a descendant of A.
+ isAncestor(node) {
+ return node.isDescendant(this);
+ }
+
+ // An object A is preceding an object B if A and B are in the
+ // same tree and A comes before B in tree order.
+ isPreceding(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos < thisPos;
+ }
+ }
+
+ // An object A is folllowing an object B if A and B are in the
+ // same tree and A comes after B in tree order.
+ isFollowing(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos > thisPos;
+ }
+ }
+
+ // Returns the preorder position of the given node in the tree, or -1
+ // if the node is not in the tree.
+ treePosition(node) {
+ var found, pos;
+ pos = 0;
+ found = false;
+ this.foreachTreeNode(this.document(), function(childNode) {
+ pos++;
+ if (!found && childNode === node) {
+ return found = true;
+ }
+ });
+ if (found) {
+ return pos;
+ } else {
+ return -1;
+ }
+ }
+
+
+ // Depth-first preorder traversal through the XML tree
+ foreachTreeNode(node, func) {
+ var child, j, len, ref1, res;
+ node || (node = this.document());
+ ref1 = node.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (res = func(child)) {
+ return res;
+ } else {
+ res = this.foreachTreeNode(child, func);
+ if (res) {
+ return res;
+ }
+ }
+ }
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNode.prototype, 'nodeName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeValue', {
+ get: function() {
+ return this.value;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'parentNode', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'childNodes', {
+ get: function() {
+ if (!this.childNodeList || !this.childNodeList.nodes) {
+ this.childNodeList = new XMLNodeList(this.children);
+ }
+ return this.childNodeList;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'firstChild', {
+ get: function() {
+ return this.children[0] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'lastChild', {
+ get: function() {
+ return this.children[this.children.length - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'previousSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nextSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i + 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
+ get: function() {
+ return this.document() || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLNode.prototype, 'textContent', {
+ get: function() {
+ var child, j, len, ref1, str;
+ if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
+ str = '';
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.textContent) {
+ str += child.textContent;
+ }
+ }
+ return str;
+ } else {
+ return null;
+ }
+ },
+ set: function(value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLNode;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./DocumentPosition":4,"./NodeType":5,"./Utility":6,"./XMLCData":9,"./XMLComment":11,"./XMLDeclaration":20,"./XMLDocType":21,"./XMLDummy":24,"./XMLElement":25,"./XMLNamedNodeMap":26,"./XMLNodeList":28,"./XMLProcessingInstruction":29,"./XMLRaw":30,"./XMLText":34}],28:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of nodes
+ var XMLNodeList;
+
+ module.exports = XMLNodeList = (function() {
+ class XMLNodeList {
+ // Initializes a new instance of `XMLNodeList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `nodes` the array containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given array. The calling function should check
+ // whether the wrapped array is null and supply a new array
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ item(index) {
+ return this.nodes[index] || null;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNodeList.prototype, 'length', {
+ get: function() {
+ return this.nodes.length || 0;
+ }
+ });
+
+ return XMLNodeList;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],29:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLProcessingInstruction;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a processing instruction
+ module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {
+ // Initializes a new instance of `XMLProcessingInstruction`
+
+ // `parent` the parent node
+ // `target` instruction target
+ // `value` instruction value
+ constructor(parent, target, value) {
+ super(parent);
+ if (target == null) {
+ throw new Error("Missing instruction target. " + this.debugInfo());
+ }
+ this.type = NodeType.ProcessingInstruction;
+ this.target = this.stringify.insTarget(target);
+ this.name = this.target;
+ if (value) {
+ this.value = this.stringify.insValue(value);
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.target !== this.target) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLCharacterData":10}],30:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLNode, XMLRaw;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a raw node
+ module.exports = XMLRaw = class XMLRaw extends XMLNode {
+ // Initializes a new instance of `XMLRaw`
+
+ // `text` raw text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing raw text. " + this.debugInfo());
+ }
+ this.type = NodeType.Raw;
+ this.value = this.stringify.raw(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.raw(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLNode":27}],31:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,
+ hasProp = {}.hasOwnProperty;
+
+ NodeType = require('./NodeType');
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ WriterState = require('./WriterState');
+
+ // Prints XML nodes to a stream
+ module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStreamWriter`
+
+ // `stream` output stream
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(stream, options) {
+ super(options);
+ this.stream = stream;
+ }
+
+ endline(node, options, level) {
+ if (node.isLastRootNode && options.state === WriterState.CloseTag) {
+ return '';
+ } else {
+ return super.endline(node, options, level);
+ }
+ }
+
+ document(doc, options) {
+ var child, i, j, k, len1, len2, ref, ref1, results;
+ ref = doc.children;
+ // set a flag so that we don't insert a newline after the last root level node
+ for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {
+ child = ref[i];
+ child.isLastRootNode = i === doc.children.length - 1;
+ }
+ options = this.filterOptions(options);
+ ref1 = doc.children;
+ results = [];
+ for (k = 0, len2 = ref1.length; k < len2; k++) {
+ child = ref1[k];
+ results.push(this.writeChildNode(child, options, 0));
+ }
+ return results;
+ }
+
+ cdata(node, options, level) {
+ return this.stream.write(super.cdata(node, options, level));
+ }
+
+ comment(node, options, level) {
+ return this.stream.write(super.comment(node, options, level));
+ }
+
+ declaration(node, options, level) {
+ return this.stream.write(super.declaration(node, options, level));
+ }
+
+ docType(node, options, level) {
+ var child, j, len1, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ this.stream.write(this.indent(node, options, level));
+ this.stream.write('<!DOCTYPE ' + node.root().name);
+ // external identifier
+ if (node.pubID && node.sysID) {
+ this.stream.write(' PUBLIC "' + node.pubID + '" "' + node.sysID + '"');
+ } else if (node.sysID) {
+ this.stream.write(' SYSTEM "' + node.sysID + '"');
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ this.stream.write(' [');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (j = 0, len1 = ref.length; j < len1; j++) {
+ child = ref[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ this.stream.write(']');
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '>');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;
+ level || (level = 0);
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ this.stream.write(r);
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ this.stream.write('>');
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '/>');
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ this.stream.write('>');
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ this.stream.write('>' + this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref2 = node.children;
+ // inner tags
+ for (j = 0, len1 = ref2.length; j < len1; j++) {
+ child = ref2[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(this.indent(node, options, level) + '</' + node.name + '>');
+ }
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ processingInstruction(node, options, level) {
+ return this.stream.write(super.processingInstruction(node, options, level));
+ }
+
+ raw(node, options, level) {
+ return this.stream.write(super.raw(node, options, level));
+ }
+
+ text(node, options, level) {
+ return this.stream.write(super.text(node, options, level));
+ }
+
+ dtdAttList(node, options, level) {
+ return this.stream.write(super.dtdAttList(node, options, level));
+ }
+
+ dtdElement(node, options, level) {
+ return this.stream.write(super.dtdElement(node, options, level));
+ }
+
+ dtdEntity(node, options, level) {
+ return this.stream.write(super.dtdEntity(node, options, level));
+ }
+
+ dtdNotation(node, options, level) {
+ return this.stream.write(super.dtdNotation(node, options, level));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./WriterState":7,"./XMLWriterBase":35}],32:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLStringWriter, XMLWriterBase;
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ // Prints XML nodes as plain text
+ module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStringWriter`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ super(options);
+ }
+
+ document(doc, options) {
+ var child, i, len, r, ref;
+ options = this.filterOptions(options);
+ r = '';
+ ref = doc.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, 0);
+ }
+ // remove trailing newline
+ if (options.pretty && r.slice(-options.newline.length) === options.newline) {
+ r = r.slice(0, -options.newline.length);
+ }
+ return r;
+ }
+
+ };
+
+}).call(this);
+
+},{"./XMLWriterBase":35}],33:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Converts values to strings
+ var XMLStringifier,
+ hasProp = {}.hasOwnProperty;
+
+ module.exports = XMLStringifier = (function() {
+ class XMLStringifier {
+ // Initializes a new instance of `XMLStringifier`
+
+ // `options.version` The version number string of the XML spec to validate against, e.g. 1.0
+ // `options.noDoubleEncoding` whether existing html entities are encoded: true or false
+ // `options.stringify` a set of functions to use for converting values to strings
+ // `options.noValidation` whether values will be validated and escaped or returned as is
+ // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation
+ constructor(options) {
+ var key, ref, value;
+ // Checks whether the given string contains legal characters
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalChar = this.assertLegalChar.bind(this);
+ // Checks whether the given string contains legal characters for a name
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalName = this.assertLegalName.bind(this);
+ options || (options = {});
+ this.options = options;
+ if (!this.options.version) {
+ this.options.version = '1.0';
+ }
+ ref = options.stringify || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this[key] = value;
+ }
+ }
+
+ // Defaults
+ name(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalName('' + val || '');
+ }
+
+ text(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.textEscape('' + val || ''));
+ }
+
+ cdata(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ val = val.replace(']]>', ']]]]><![CDATA[>');
+ return this.assertLegalChar(val);
+ }
+
+ comment(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/--/)) {
+ throw new Error("Comment text cannot contain double-hypen: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ raw(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return '' + val || '';
+ }
+
+ attValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.attEscape(val = '' + val || ''));
+ }
+
+ insTarget(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ insValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/\?>/)) {
+ throw new Error("Invalid processing instruction value: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlVersion(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/1\.[0-9]+/)) {
+ throw new Error("Invalid version number: " + val);
+ }
+ return val;
+ }
+
+ xmlEncoding(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
+ throw new Error("Invalid encoding: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlStandalone(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ if (val) {
+ return "yes";
+ } else {
+ return "no";
+ }
+ }
+
+ dtdPubID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdSysID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdElementValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttType(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttDefault(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdEntityValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdNData(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ assertLegalChar(str) {
+ var regex, res;
+ if (this.options.noValidation) {
+ return str;
+ }
+ if (this.options.version === '1.0') {
+ // Valid characters from https://www.w3.org/TR/xml/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_10_InvalidChars = regenerate()
+ // .addRange(0x0000, 0x0008)
+ // .add(0x000B, 0x000C)
+ // .addRange(0x000E, 0x001F)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ } else if (this.options.version === '1.1') {
+ // Valid characters from https://www.w3.org/TR/xml11/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_11_InvalidChars = regenerate()
+ // .add(0x0000)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ }
+ return str;
+ }
+
+ assertLegalName(str) {
+ var regex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ str = this.assertLegalChar(str);
+ regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
+ if (!str.match(regex)) {
+ throw new Error(`Invalid character in name: ${str}`);
+ }
+ return str;
+ }
+
+ // Escapes special characters in text
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ textEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\r/g, '&#xD;');
+ }
+
+ // Escapes special characters in attribute values
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ attEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/\t/g, '&#x9;').replace(/\n/g, '&#xA;').replace(/\r/g, '&#xD;');
+ }
+
+ };
+
+ // strings to match while converting from JS objects
+ XMLStringifier.prototype.convertAttKey = '@';
+
+ XMLStringifier.prototype.convertPIKey = '?';
+
+ XMLStringifier.prototype.convertTextKey = '#text';
+
+ XMLStringifier.prototype.convertCDataKey = '#cdata';
+
+ XMLStringifier.prototype.convertCommentKey = '#comment';
+
+ XMLStringifier.prototype.convertRawKey = '#raw';
+
+ return XMLStringifier;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],34:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLText;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a text node
+ module.exports = XMLText = (function() {
+ class XMLText extends XMLCharacterData {
+ // Initializes a new instance of `XMLText`
+
+ // `text` element text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing element text. " + this.debugInfo());
+ }
+ this.name = "#text";
+ this.type = NodeType.Text;
+ this.value = this.stringify.text(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.text(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ splitText(offset) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ replaceWholeText(content) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 3
+ Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLText.prototype, 'wholeText', {
+ get: function() {
+ var next, prev, str;
+ str = '';
+ prev = this.previousSibling;
+ while (prev) {
+ str = prev.data + str;
+ prev = prev.previousSibling;
+ }
+ str += this.data;
+ next = this.nextSibling;
+ while (next) {
+ str = str + next.data;
+ next = next.nextSibling;
+ }
+ return str;
+ }
+ });
+
+ return XMLText;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":5,"./XMLCharacterData":10}],35:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
+ hasProp = {}.hasOwnProperty;
+
+ ({assign} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLElement = require('./XMLElement');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDummy = require('./XMLDummy');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ WriterState = require('./WriterState');
+
+ // Base class for XML writers
+ module.exports = XMLWriterBase = class XMLWriterBase {
+ // Initializes a new instance of `XMLWriterBase`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.width` maximum column width
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ var key, ref, value;
+ options || (options = {});
+ this.options = options;
+ ref = options.writer || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this["_" + key] = this[key];
+ this[key] = value;
+ }
+ }
+
+ // Filters writer options and provides defaults
+
+ // `options` writer options
+ filterOptions(options) {
+ var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
+ options || (options = {});
+ options = assign({}, this.options, options);
+ filteredOptions = {
+ writer: this
+ };
+ filteredOptions.pretty = options.pretty || false;
+ filteredOptions.allowEmpty = options.allowEmpty || false;
+ filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';
+ filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
+ filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
+ filteredOptions.width = (ref3 = options.width) != null ? ref3 : 0;
+ filteredOptions.dontPrettyTextNodes = (ref4 = (ref5 = options.dontPrettyTextNodes) != null ? ref5 : options.dontprettytextnodes) != null ? ref4 : 0;
+ filteredOptions.spaceBeforeSlash = (ref6 = (ref7 = options.spaceBeforeSlash) != null ? ref7 : options.spacebeforeslash) != null ? ref6 : '';
+ if (filteredOptions.spaceBeforeSlash === true) {
+ filteredOptions.spaceBeforeSlash = ' ';
+ }
+ filteredOptions.suppressPrettyCount = 0;
+ filteredOptions.user = {};
+ filteredOptions.state = WriterState.None;
+ return filteredOptions;
+ }
+
+ // Returns the indentation string for the current level
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ indent(node, options, level) {
+ var indentLevel;
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else if (options.pretty) {
+ indentLevel = (level || 0) + options.offset + 1;
+ if (indentLevel > 0) {
+ return new Array(indentLevel).join(options.indent);
+ }
+ }
+ return '';
+ }
+
+ // Returns the newline string
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ endline(node, options, level) {
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else {
+ return options.newline;
+ }
+ }
+
+ attribute(att, options, level) {
+ var r;
+ this.openAttribute(att, options, level);
+ if (options.pretty && options.width > 0) {
+ r = att.name + '="' + att.value + '"';
+ } else {
+ r = ' ' + att.name + '="' + att.value + '"';
+ }
+ this.closeAttribute(att, options, level);
+ return r;
+ }
+
+ cdata(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<![CDATA[';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ']]>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ comment(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!-- ';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ' -->' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ declaration(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?xml';
+ options.state = WriterState.InsideTag;
+ r += ' version="' + node.version + '"';
+ if (node.encoding != null) {
+ r += ' encoding="' + node.encoding + '"';
+ }
+ if (node.standalone != null) {
+ r += ' standalone="' + node.standalone + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ docType(node, options, level) {
+ var child, i, len1, r, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ r += '<!DOCTYPE ' + node.root().name;
+ // external identifier
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ r += ' [';
+ r += this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (i = 0, len1 = ref.length; i < len1; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ r += ']';
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;
+ level || (level = 0);
+ prettySuppressed = false;
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ r += '>';
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ r += '>';
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ r += this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ // if ANY are a text node, then suppress pretty now
+ if (options.dontPrettyTextNodes) {
+ ref2 = node.children;
+ for (i = 0, len1 = ref2.length; i < len1; i++) {
+ child = ref2[i];
+ if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) {
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ break;
+ }
+ }
+ }
+ // close the opening tag, after dealing with newline
+ r += '>' + this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref3 = node.children;
+ // inner tags
+ for (j = 0, len2 = ref3.length; j < len2; j++) {
+ child = ref3[j];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += this.indent(node, options, level) + '</' + node.name + '>';
+ if (prettySuppressed) {
+ options.suppressPrettyCount--;
+ }
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ }
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ writeChildNode(node, options, level) {
+ switch (node.type) {
+ case NodeType.CData:
+ return this.cdata(node, options, level);
+ case NodeType.Comment:
+ return this.comment(node, options, level);
+ case NodeType.Element:
+ return this.element(node, options, level);
+ case NodeType.Raw:
+ return this.raw(node, options, level);
+ case NodeType.Text:
+ return this.text(node, options, level);
+ case NodeType.ProcessingInstruction:
+ return this.processingInstruction(node, options, level);
+ case NodeType.Dummy:
+ return '';
+ case NodeType.Declaration:
+ return this.declaration(node, options, level);
+ case NodeType.DocType:
+ return this.docType(node, options, level);
+ case NodeType.AttributeDeclaration:
+ return this.dtdAttList(node, options, level);
+ case NodeType.ElementDeclaration:
+ return this.dtdElement(node, options, level);
+ case NodeType.EntityDeclaration:
+ return this.dtdEntity(node, options, level);
+ case NodeType.NotationDeclaration:
+ return this.dtdNotation(node, options, level);
+ default:
+ throw new Error("Unknown XML node type: " + node.constructor.name);
+ }
+ }
+
+ processingInstruction(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?';
+ options.state = WriterState.InsideTag;
+ r += node.target;
+ if (node.value) {
+ r += ' ' + node.value;
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ raw(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ text(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdAttList(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ATTLIST';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.elementName + ' ' + node.attributeName + ' ' + node.attributeType;
+ if (node.defaultValueType !== '#DEFAULT') {
+ r += ' ' + node.defaultValueType;
+ }
+ if (node.defaultValue) {
+ r += ' "' + node.defaultValue + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdElement(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ELEMENT';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name + ' ' + node.value;
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdEntity(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ENTITY';
+ options.state = WriterState.InsideTag;
+ if (node.pe) {
+ r += ' %';
+ }
+ r += ' ' + node.name;
+ if (node.value) {
+ r += ' "' + node.value + '"';
+ } else {
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ if (node.nData) {
+ r += ' NDATA ' + node.nData;
+ }
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdNotation(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!NOTATION';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name;
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.pubID) {
+ r += ' PUBLIC "' + node.pubID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ openNode(node, options, level) {}
+
+ closeNode(node, options, level) {}
+
+ openAttribute(att, options, level) {}
+
+ closeAttribute(att, options, level) {}
+
+ };
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./WriterState":7,"./XMLCData":9,"./XMLComment":11,"./XMLDTDAttList":16,"./XMLDTDElement":17,"./XMLDTDEntity":18,"./XMLDTDNotation":19,"./XMLDeclaration":20,"./XMLDocType":21,"./XMLDummy":24,"./XMLElement":25,"./XMLProcessingInstruction":29,"./XMLRaw":30,"./XMLText":34}],36:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;
+
+ ({assign, isFunction} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLDocumentCB = require('./XMLDocumentCB');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ XMLStreamWriter = require('./XMLStreamWriter');
+
+ NodeType = require('./NodeType');
+
+ WriterState = require('./WriterState');
+
+ // Creates a new document and returns the root node for
+ // chain-building the document tree
+
+ // `name` name of the root element
+
+ // `xmldec.version` A version number string, e.g. 1.0
+ // `xmldec.encoding` Encoding declaration, e.g. UTF-8
+ // `xmldec.standalone` standalone document declaration: true or false
+
+ // `doctype.pubID` public identifier of the external subset
+ // `doctype.sysID` system identifier of the external subset
+
+ // `options.headless` whether XML declaration and doctype will be included:
+ // true or false
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ module.exports.create = function(name, xmldec, doctype, options) {
+ var doc, root;
+ if (name == null) {
+ throw new Error("Root element needs a name.");
+ }
+ options = assign({}, xmldec, doctype, options);
+ // create the document node
+ doc = new XMLDocument(options);
+ // add the root node
+ root = doc.element(name);
+ // prolog
+ if (!options.headless) {
+ doc.declaration(options);
+ if ((options.pubID != null) || (options.sysID != null)) {
+ doc.dtd(options);
+ }
+ }
+ return root;
+ };
+
+ // Creates a new document and returns the document node for
+ // chain-building the document tree
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its single
+ // argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ module.exports.begin = function(options, onData, onEnd) {
+ if (isFunction(options)) {
+ [onData, onEnd] = [options, onData];
+ options = {};
+ }
+ if (onData) {
+ return new XMLDocumentCB(options, onData, onEnd);
+ } else {
+ return new XMLDocument(options);
+ }
+ };
+
+ module.exports.stringWriter = function(options) {
+ return new XMLStringWriter(options);
+ };
+
+ module.exports.streamWriter = function(stream, options) {
+ return new XMLStreamWriter(stream, options);
+ };
+
+ module.exports.implementation = new XMLDOMImplementation();
+
+ module.exports.nodeType = NodeType;
+
+ module.exports.writerState = WriterState;
+
+}).call(this);
+
+},{"./NodeType":5,"./Utility":6,"./WriterState":7,"./XMLDOMImplementation":14,"./XMLDocument":22,"./XMLDocumentCB":23,"./XMLStreamWriter":31,"./XMLStringWriter":32}]},{},[1])(1)
+});
diff --git a/node_modules/plist/dist/plist-parse.js b/node_modules/plist/dist/plist-parse.js
new file mode 100644
index 0000000..97f550f
--- /dev/null
+++ b/node_modules/plist/dist/plist-parse.js
@@ -0,0 +1,4682 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
+(function (Buffer){(function (){
+/**
+ * Module dependencies.
+ */
+
+var DOMParser = require('./xmldom/dom-parser').DOMParser;
+
+/**
+ * Module exports.
+ */
+
+exports.parse = parse;
+
+var TEXT_NODE = 3;
+var CDATA_NODE = 4;
+var COMMENT_NODE = 8;
+
+
+/**
+ * We ignore raw text (usually whitespace), <!-- xml comments -->,
+ * and raw CDATA nodes.
+ *
+ * @param {Element} node
+ * @returns {Boolean}
+ * @api private
+ */
+
+function shouldIgnoreNode (node) {
+ return node.nodeType === TEXT_NODE
+ || node.nodeType === COMMENT_NODE
+ || node.nodeType === CDATA_NODE;
+}
+
+/**
+ * Check if the node is empty. Some plist file has such node:
+ * <key />
+ * this node shoud be ignored.
+ *
+ * @see https://github.com/TooTallNate/plist.js/issues/66
+ * @param {Element} node
+ * @returns {Boolean}
+ * @api private
+ */
+function isEmptyNode(node){
+ if(!node.childNodes || node.childNodes.length === 0) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function invariant(test, message) {
+ if (!test) {
+ throw new Error(message);
+ }
+}
+
+/**
+ * Parses a Plist XML string. Returns an Object.
+ *
+ * @param {String} xml - the XML String to decode
+ * @returns {Mixed} the decoded value from the Plist XML
+ * @api public
+ */
+
+function parse (xml) {
+ var doc = new DOMParser().parseFromString(xml);
+ invariant(
+ doc.documentElement.nodeName === 'plist',
+ 'malformed document. First element should be <plist>'
+ );
+ var plist = parsePlistXML(doc.documentElement);
+
+ // the root <plist> node gets interpreted as an Array,
+ // so pull out the inner data first
+ if (plist.length == 1) plist = plist[0];
+
+ return plist;
+}
+
+/**
+ * Convert an XML based plist document into a JSON representation.
+ *
+ * @param {Object} xml_node - current XML node in the plist
+ * @returns {Mixed} built up JSON object
+ * @api private
+ */
+
+function parsePlistXML (node) {
+ var i, new_obj, key, val, new_arr, res, counter, type;
+
+ if (!node)
+ return null;
+
+ if (node.nodeName === 'plist') {
+ new_arr = [];
+ if (isEmptyNode(node)) {
+ return new_arr;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (!shouldIgnoreNode(node.childNodes[i])) {
+ new_arr.push( parsePlistXML(node.childNodes[i]));
+ }
+ }
+ return new_arr;
+ } else if (node.nodeName === 'dict') {
+ new_obj = {};
+ key = null;
+ counter = 0;
+ if (isEmptyNode(node)) {
+ return new_obj;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (shouldIgnoreNode(node.childNodes[i])) continue;
+ if (counter % 2 === 0) {
+ invariant(
+ node.childNodes[i].nodeName === 'key',
+ 'Missing key while parsing <dict/>.'
+ );
+ key = parsePlistXML(node.childNodes[i]);
+ } else {
+ invariant(
+ node.childNodes[i].nodeName !== 'key',
+ 'Unexpected key "'
+ + parsePlistXML(node.childNodes[i])
+ + '" while parsing <dict/>.'
+ );
+ new_obj[key] = parsePlistXML(node.childNodes[i]);
+ }
+ counter += 1;
+ }
+ if (counter % 2 === 1) {
+ new_obj[key] = '';
+ }
+
+ return new_obj;
+
+ } else if (node.nodeName === 'array') {
+ new_arr = [];
+ if (isEmptyNode(node)) {
+ return new_arr;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (!shouldIgnoreNode(node.childNodes[i])) {
+ res = parsePlistXML(node.childNodes[i]);
+ if (null != res) new_arr.push(res);
+ }
+ }
+ return new_arr;
+
+ } else if (node.nodeName === '#text') {
+ // TODO: what should we do with text types? (CDATA sections)
+
+ } else if (node.nodeName === 'key') {
+ if (isEmptyNode(node)) {
+ return '';
+ }
+
+ invariant(
+ node.childNodes[0].nodeValue !== '__proto__',
+ '__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912'
+ );
+
+ return node.childNodes[0].nodeValue;
+ } else if (node.nodeName === 'string') {
+ res = '';
+ if (isEmptyNode(node)) {
+ return res;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ var type = node.childNodes[i].nodeType;
+ if (type === TEXT_NODE || type === CDATA_NODE) {
+ res += node.childNodes[i].nodeValue;
+ }
+ }
+ return res;
+
+ } else if (node.nodeName === 'integer') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as integer.'
+ );
+ return parseInt(node.childNodes[0].nodeValue, 10);
+
+ } else if (node.nodeName === 'real') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as real.'
+ );
+ res = '';
+ for (i=0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === TEXT_NODE) {
+ res += node.childNodes[i].nodeValue;
+ }
+ }
+ return parseFloat(res);
+
+ } else if (node.nodeName === 'data') {
+ res = '';
+ if (isEmptyNode(node)) {
+ return Buffer.from(res, 'base64');
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === TEXT_NODE) {
+ res += node.childNodes[i].nodeValue.replace(/\s+/g, '');
+ }
+ }
+ return Buffer.from(res, 'base64');
+
+ } else if (node.nodeName === 'date') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as Date.'
+ )
+ return new Date(node.childNodes[0].nodeValue);
+
+ } else if (node.nodeName === 'null') {
+ return null;
+
+ } else if (node.nodeName === 'true') {
+ return true;
+
+ } else if (node.nodeName === 'false') {
+ return false;
+ } else {
+ throw new Error('Invalid PLIST tag ' + node.nodeName);
+ }
+}
+
+}).call(this)}).call(this,require("buffer").Buffer)
+},{"./xmldom/dom-parser":2,"buffer":7}],2:[function(require,module,exports){
+function DOMParser(options){
+ this.options = options ||{locator:{}};
+}
+
+DOMParser.prototype.parseFromString = function(source,mimeType){
+ var options = this.options;
+ var sax = new XMLReader();
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
+ var errorHandler = options.errorHandler;
+ var locator = options.locator;
+ var defaultNSMap = options.xmlns||{};
+ var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;
+ var entityMap = isHTML?htmlEntity.entityMap:{'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"};
+ if(locator){
+ domBuilder.setDocumentLocator(locator)
+ }
+
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
+ sax.domBuilder = options.domBuilder || domBuilder;
+ if(isHTML){
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
+ }
+ defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';
+ if(source && typeof source === 'string'){
+ sax.parse(source,defaultNSMap,entityMap);
+ }else{
+ sax.errorHandler.error("invalid doc source");
+ }
+ return domBuilder.doc;
+}
+function buildErrorHandler(errorImpl,domBuilder,locator){
+ if(!errorImpl){
+ if(domBuilder instanceof DOMHandler){
+ return domBuilder;
+ }
+ errorImpl = domBuilder ;
+ }
+ var errorHandler = {}
+ var isCallback = errorImpl instanceof Function;
+ locator = locator||{}
+ function build(key){
+ var fn = errorImpl[key];
+ if(!fn && isCallback){
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
+ }
+ errorHandler[key] = fn && function(msg){
+ fn('[xmldom '+key+']\t'+msg+_locator(locator));
+ }||function(){};
+ }
+ build('warning');
+ build('error');
+ build('fatalError');
+ return errorHandler;
+}
+
+//console.log('#\n\n\n\n\n\n\n####')
+/**
+ * +ContentHandler+ErrorHandler
+ * +LexicalHandler+EntityResolver2
+ * -DeclHandler-DTDHandler
+ *
+ * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
+ * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
+ */
+function DOMHandler() {
+ this.cdata = false;
+}
+function position(locator,node){
+ node.lineNumber = locator.lineNumber;
+ node.columnNumber = locator.columnNumber;
+}
+/**
+ * @see org.xml.sax.ContentHandler#startDocument
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
+ */
+DOMHandler.prototype = {
+ startDocument : function() {
+ this.doc = new DOMImplementation().createDocument(null, null, null);
+ if (this.locator) {
+ this.doc.documentURI = this.locator.systemId;
+ }
+ },
+ startElement:function(namespaceURI, localName, qName, attrs) {
+ var doc = this.doc;
+ var el = doc.createElementNS(namespaceURI, qName||localName);
+ var len = attrs.length;
+ appendElement(this, el);
+ this.currentElement = el;
+
+ this.locator && position(this.locator,el)
+ for (var i = 0 ; i < len; i++) {
+ var namespaceURI = attrs.getURI(i);
+ var value = attrs.getValue(i);
+ var qName = attrs.getQName(i);
+ var attr = doc.createAttributeNS(namespaceURI, qName);
+ this.locator &&position(attrs.getLocator(i),attr);
+ attr.value = attr.nodeValue = value;
+ el.setAttributeNode(attr)
+ }
+ },
+ endElement:function(namespaceURI, localName, qName) {
+ var current = this.currentElement
+ var tagName = current.tagName;
+ this.currentElement = current.parentNode;
+ },
+ startPrefixMapping:function(prefix, uri) {
+ },
+ endPrefixMapping:function(prefix) {
+ },
+ processingInstruction:function(target, data) {
+ var ins = this.doc.createProcessingInstruction(target, data);
+ this.locator && position(this.locator,ins)
+ appendElement(this, ins);
+ },
+ ignorableWhitespace:function(ch, start, length) {
+ },
+ characters:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ //console.log(chars)
+ if(chars){
+ if (this.cdata) {
+ var charNode = this.doc.createCDATASection(chars);
+ } else {
+ var charNode = this.doc.createTextNode(chars);
+ }
+ if(this.currentElement){
+ this.currentElement.appendChild(charNode);
+ }else if(/^\s*$/.test(chars)){
+ this.doc.appendChild(charNode);
+ //process xml
+ }
+ this.locator && position(this.locator,charNode)
+ }
+ },
+ skippedEntity:function(name) {
+ },
+ endDocument:function() {
+ this.doc.normalize();
+ },
+ setDocumentLocator:function (locator) {
+ if(this.locator = locator){// && !('lineNumber' in locator)){
+ locator.lineNumber = 0;
+ }
+ },
+ //LexicalHandler
+ comment:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ var comm = this.doc.createComment(chars);
+ this.locator && position(this.locator,comm)
+ appendElement(this, comm);
+ },
+
+ startCDATA:function() {
+ //used in characters() methods
+ this.cdata = true;
+ },
+ endCDATA:function() {
+ this.cdata = false;
+ },
+
+ startDTD:function(name, publicId, systemId) {
+ var impl = this.doc.implementation;
+ if (impl && impl.createDocumentType) {
+ var dt = impl.createDocumentType(name, publicId, systemId);
+ this.locator && position(this.locator,dt)
+ appendElement(this, dt);
+ }
+ },
+ /**
+ * @see org.xml.sax.ErrorHandler
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
+ */
+ warning:function(error) {
+ console.warn('[xmldom warning]\t'+error,_locator(this.locator));
+ },
+ error:function(error) {
+ console.error('[xmldom error]\t'+error,_locator(this.locator));
+ },
+ fatalError:function(error) {
+ throw new ParseError(error, this.locator);
+ }
+}
+function _locator(l){
+ if(l){
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
+ }
+}
+function _toString(chars,start,length){
+ if(typeof chars == 'string'){
+ return chars.substr(start,length)
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
+ if(chars.length >= start+length || start){
+ return new java.lang.String(chars,start,length)+'';
+ }
+ return chars;
+ }
+}
+
+/*
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html
+ * used method of org.xml.sax.ext.LexicalHandler:
+ * #comment(chars, start, length)
+ * #startCDATA()
+ * #endCDATA()
+ * #startDTD(name, publicId, systemId)
+ *
+ *
+ * IGNORED method of org.xml.sax.ext.LexicalHandler:
+ * #endDTD()
+ * #startEntity(name)
+ * #endEntity(name)
+ *
+ *
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html
+ * IGNORED method of org.xml.sax.ext.DeclHandler
+ * #attributeDecl(eName, aName, type, mode, value)
+ * #elementDecl(name, model)
+ * #externalEntityDecl(name, publicId, systemId)
+ * #internalEntityDecl(name, value)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html
+ * IGNORED method of org.xml.sax.EntityResolver2
+ * #resolveEntity(String name,String publicId,String baseURI,String systemId)
+ * #resolveEntity(publicId, systemId)
+ * #getExternalSubset(name, baseURI)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html
+ * IGNORED method of org.xml.sax.DTDHandler
+ * #notationDecl(name, publicId, systemId) {};
+ * #unparsedEntityDecl(name, publicId, systemId, notationName) {};
+ */
+"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
+ DOMHandler.prototype[key] = function(){return null}
+})
+
+/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */
+function appendElement (hander,node) {
+ if (!hander.currentElement) {
+ hander.doc.appendChild(node);
+ } else {
+ hander.currentElement.appendChild(node);
+ }
+}//appendChild and setAttributeNS are preformance key
+
+//if(typeof require == 'function'){
+var htmlEntity = require('./entities');
+var sax = require('./sax');
+var XMLReader = sax.XMLReader;
+var ParseError = sax.ParseError;
+var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
+exports.XMLSerializer = require('./dom').XMLSerializer ;
+exports.DOMParser = DOMParser;
+exports.__DOMHandler = DOMHandler;
+//}
+
+},{"./dom":3,"./entities":4,"./sax":5}],3:[function(require,module,exports){
+function copy(src,dest){
+ for(var p in src){
+ dest[p] = src[p];
+ }
+}
+/**
+^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
+^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));?
+ */
+function _extends(Class,Super){
+ var pt = Class.prototype;
+ if(!(pt instanceof Super)){
+ function t(){};
+ t.prototype = Super.prototype;
+ t = new t();
+ copy(pt,t);
+ Class.prototype = pt = t;
+ }
+ if(pt.constructor != Class){
+ if(typeof Class != 'function'){
+ console.error("unknow Class:"+Class)
+ }
+ pt.constructor = Class
+ }
+}
+var htmlns = 'http://www.w3.org/1999/xhtml' ;
+// Node Types
+var NodeType = {}
+var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
+var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
+var TEXT_NODE = NodeType.TEXT_NODE = 3;
+var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
+var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
+var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
+var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
+var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
+var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
+var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
+var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
+var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
+
+// ExceptionCode
+var ExceptionCode = {}
+var ExceptionMessage = {};
+var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
+var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
+var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
+var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
+var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
+var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
+var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
+var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
+var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
+var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
+//level2
+var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
+var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
+var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
+var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
+var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
+
+/**
+ * DOM Level 2
+ * Object DOMException
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
+ */
+function DOMException(code, message) {
+ if(message instanceof Error){
+ var error = message;
+ }else{
+ error = this;
+ Error.call(this, ExceptionMessage[code]);
+ this.message = ExceptionMessage[code];
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
+ }
+ error.code = code;
+ if(message) this.message = this.message + ": " + message;
+ return error;
+};
+DOMException.prototype = Error.prototype;
+copy(ExceptionCode,DOMException)
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177
+ * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.
+ * The items in the NodeList are accessible via an integral index, starting from 0.
+ */
+function NodeList() {
+};
+NodeList.prototype = {
+ /**
+ * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
+ * @standard level1
+ */
+ length:0,
+ /**
+ * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
+ * @standard level1
+ * @param index unsigned long
+ * Index into the collection.
+ * @return Node
+ * The node at the indexth position in the NodeList, or null if that is not a valid index.
+ */
+ item: function(index) {
+ return this[index] || null;
+ },
+ toString:function(isHTML,nodeFilter){
+ for(var buf = [], i = 0;i<this.length;i++){
+ serializeToString(this[i],buf,isHTML,nodeFilter);
+ }
+ return buf.join('');
+ }
+};
+function LiveNodeList(node,refresh){
+ this._node = node;
+ this._refresh = refresh
+ _updateLiveList(this);
+}
+function _updateLiveList(list){
+ var inc = list._node._inc || list._node.ownerDocument._inc;
+ if(list._inc != inc){
+ var ls = list._refresh(list._node);
+ //console.log(ls.length)
+ __set__(list,'length',ls.length);
+ copy(ls,list);
+ list._inc = inc;
+ }
+}
+LiveNodeList.prototype.item = function(i){
+ _updateLiveList(this);
+ return this[i];
+}
+
+_extends(LiveNodeList,NodeList);
+/**
+ *
+ * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.
+ * NamedNodeMap objects in the DOM are live.
+ * used for attributes or DocumentType entities
+ */
+function NamedNodeMap() {
+};
+
+function _findNodeIndex(list,node){
+ var i = list.length;
+ while(i--){
+ if(list[i] === node){return i}
+ }
+}
+
+function _addNamedNode(el,list,newAttr,oldAttr){
+ if(oldAttr){
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
+ }else{
+ list[list.length++] = newAttr;
+ }
+ if(el){
+ newAttr.ownerElement = el;
+ var doc = el.ownerDocument;
+ if(doc){
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
+ _onAddAttribute(doc,el,newAttr);
+ }
+ }
+}
+function _removeNamedNode(el,list,attr){
+ //console.log('remove attr:'+attr)
+ var i = _findNodeIndex(list,attr);
+ if(i>=0){
+ var lastIndex = list.length-1
+ while(i<lastIndex){
+ list[i] = list[++i]
+ }
+ list.length = lastIndex;
+ if(el){
+ var doc = el.ownerDocument;
+ if(doc){
+ _onRemoveAttribute(doc,el,attr);
+ attr.ownerElement = null;
+ }
+ }
+ }else{
+ throw DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))
+ }
+}
+NamedNodeMap.prototype = {
+ length:0,
+ item:NodeList.prototype.item,
+ getNamedItem: function(key) {
+// if(key.indexOf(':')>0 || key == 'xmlns'){
+// return null;
+// }
+ //console.log()
+ var i = this.length;
+ while(i--){
+ var attr = this[i];
+ //console.log(attr.nodeName,key)
+ if(attr.nodeName == key){
+ return attr;
+ }
+ }
+ },
+ setNamedItem: function(attr) {
+ var el = attr.ownerElement;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ var oldAttr = this.getNamedItem(attr.nodeName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ /* returns Node */
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
+ var el = attr.ownerElement, oldAttr;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+
+ /* returns Node */
+ removeNamedItem: function(key) {
+ var attr = this.getNamedItem(key);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+
+
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
+
+ //for level2
+ removeNamedItemNS:function(namespaceURI,localName){
+ var attr = this.getNamedItemNS(namespaceURI,localName);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+ },
+ getNamedItemNS: function(namespaceURI, localName) {
+ var i = this.length;
+ while(i--){
+ var node = this[i];
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
+ return node;
+ }
+ }
+ return null;
+ }
+};
+/**
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490
+ */
+function DOMImplementation(/* Object */ features) {
+ this._features = {};
+ if (features) {
+ for (var feature in features) {
+ this._features = features[feature];
+ }
+ }
+};
+
+DOMImplementation.prototype = {
+ hasFeature: function(/* string */ feature, /* string */ version) {
+ var versions = this._features[feature.toLowerCase()];
+ if (versions && (!version || version in versions)) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ // Introduced in DOM Level 2:
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
+ var doc = new Document();
+ doc.implementation = this;
+ doc.childNodes = new NodeList();
+ doc.doctype = doctype;
+ if(doctype){
+ doc.appendChild(doctype);
+ }
+ if(qualifiedName){
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
+ doc.appendChild(root);
+ }
+ return doc;
+ },
+ // Introduced in DOM Level 2:
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
+ var node = new DocumentType();
+ node.name = qualifiedName;
+ node.nodeName = qualifiedName;
+ node.publicId = publicId;
+ node.systemId = systemId;
+ // Introduced in DOM Level 2:
+ //readonly attribute DOMString internalSubset;
+
+ //TODO:..
+ // readonly attribute NamedNodeMap entities;
+ // readonly attribute NamedNodeMap notations;
+ return node;
+ }
+};
+
+
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
+ */
+
+function Node() {
+};
+
+Node.prototype = {
+ firstChild : null,
+ lastChild : null,
+ previousSibling : null,
+ nextSibling : null,
+ attributes : null,
+ parentNode : null,
+ childNodes : null,
+ ownerDocument : null,
+ nodeValue : null,
+ namespaceURI : null,
+ prefix : null,
+ localName : null,
+ // Modified in DOM Level 2:
+ insertBefore:function(newChild, refChild){//raises
+ return _insertBefore(this,newChild,refChild);
+ },
+ replaceChild:function(newChild, oldChild){//raises
+ this.insertBefore(newChild,oldChild);
+ if(oldChild){
+ this.removeChild(oldChild);
+ }
+ },
+ removeChild:function(oldChild){
+ return _removeChild(this,oldChild);
+ },
+ appendChild:function(newChild){
+ return this.insertBefore(newChild,null);
+ },
+ hasChildNodes:function(){
+ return this.firstChild != null;
+ },
+ cloneNode:function(deep){
+ return cloneNode(this.ownerDocument||this,this,deep);
+ },
+ // Modified in DOM Level 2:
+ normalize:function(){
+ var child = this.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
+ this.removeChild(next);
+ child.appendData(next.data);
+ }else{
+ child.normalize();
+ child = next;
+ }
+ }
+ },
+ // Introduced in DOM Level 2:
+ isSupported:function(feature, version){
+ return this.ownerDocument.implementation.hasFeature(feature,version);
+ },
+ // Introduced in DOM Level 2:
+ hasAttributes:function(){
+ return this.attributes.length>0;
+ },
+ lookupPrefix:function(namespaceURI){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ for(var n in map){
+ if(map[n] == namespaceURI){
+ return n;
+ }
+ }
+ }
+ el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ lookupNamespaceURI:function(prefix){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ if(prefix in map){
+ return map[prefix] ;
+ }
+ }
+ el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ isDefaultNamespace:function(namespaceURI){
+ var prefix = this.lookupPrefix(namespaceURI);
+ return prefix == null;
+ }
+};
+
+
+function _xmlEncoder(c){
+ return c == '<' && '&lt;' ||
+ c == '>' && '&gt;' ||
+ c == '&' && '&amp;' ||
+ c == '"' && '&quot;' ||
+ '&#'+c.charCodeAt()+';'
+}
+
+
+copy(NodeType,Node);
+copy(NodeType,Node.prototype);
+
+/**
+ * @param callback return true for continue,false for break
+ * @return boolean true: break visit;
+ */
+function _visitNode(node,callback){
+ if(callback(node)){
+ return true;
+ }
+ if(node = node.firstChild){
+ do{
+ if(_visitNode(node,callback)){return true}
+ }while(node=node.nextSibling)
+ }
+}
+
+
+
+function Document(){
+}
+function _onAddAttribute(doc,el,newAttr){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
+ }
+}
+function _onRemoveAttribute(doc,el,newAttr,remove){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ delete el._nsMap[newAttr.prefix?newAttr.localName:'']
+ }
+}
+function _onUpdateChild(doc,el,newChild){
+ if(doc && doc._inc){
+ doc._inc++;
+ //update childNodes
+ var cs = el.childNodes;
+ if(newChild){
+ cs[cs.length++] = newChild;
+ }else{
+ //console.log(1)
+ var child = el.firstChild;
+ var i = 0;
+ while(child){
+ cs[i++] = child;
+ child =child.nextSibling;
+ }
+ cs.length = i;
+ }
+ }
+}
+
+/**
+ * attributes;
+ * children;
+ *
+ * writeable properties:
+ * nodeValue,Attr:value,CharacterData:data
+ * prefix
+ */
+function _removeChild(parentNode,child){
+ var previous = child.previousSibling;
+ var next = child.nextSibling;
+ if(previous){
+ previous.nextSibling = next;
+ }else{
+ parentNode.firstChild = next
+ }
+ if(next){
+ next.previousSibling = previous;
+ }else{
+ parentNode.lastChild = previous;
+ }
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
+ return child;
+}
+/**
+ * preformance key(refChild == null)
+ */
+function _insertBefore(parentNode,newChild,nextChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ cp.removeChild(newChild);//remove and update
+ }
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ var newFirst = newChild.firstChild;
+ if (newFirst == null) {
+ return newChild;
+ }
+ var newLast = newChild.lastChild;
+ }else{
+ newFirst = newLast = newChild;
+ }
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
+
+ newFirst.previousSibling = pre;
+ newLast.nextSibling = nextChild;
+
+
+ if(pre){
+ pre.nextSibling = newFirst;
+ }else{
+ parentNode.firstChild = newFirst;
+ }
+ if(nextChild == null){
+ parentNode.lastChild = newLast;
+ }else{
+ nextChild.previousSibling = newLast;
+ }
+ do{
+ newFirst.parentNode = parentNode;
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
+ //console.log(parentNode.lastChild.nextSibling == null)
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
+ newChild.firstChild = newChild.lastChild = null;
+ }
+ return newChild;
+}
+function _appendSingleChild(parentNode,newChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ var pre = parentNode.lastChild;
+ cp.removeChild(newChild);//remove and update
+ var pre = parentNode.lastChild;
+ }
+ var pre = parentNode.lastChild;
+ newChild.parentNode = parentNode;
+ newChild.previousSibling = pre;
+ newChild.nextSibling = null;
+ if(pre){
+ pre.nextSibling = newChild;
+ }else{
+ parentNode.firstChild = newChild;
+ }
+ parentNode.lastChild = newChild;
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
+ return newChild;
+ //console.log("__aa",parentNode.lastChild.nextSibling == null)
+}
+Document.prototype = {
+ //implementation : null,
+ nodeName : '#document',
+ nodeType : DOCUMENT_NODE,
+ doctype : null,
+ documentElement : null,
+ _inc : 1,
+
+ insertBefore : function(newChild, refChild){//raises
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
+ var child = newChild.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ this.insertBefore(child,refChild);
+ child = next;
+ }
+ return newChild;
+ }
+ if(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){
+ this.documentElement = newChild;
+ }
+
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
+ },
+ removeChild : function(oldChild){
+ if(this.documentElement == oldChild){
+ this.documentElement = null;
+ }
+ return _removeChild(this,oldChild);
+ },
+ // Introduced in DOM Level 2:
+ importNode : function(importedNode,deep){
+ return importNode(this,importedNode,deep);
+ },
+ // Introduced in DOM Level 2:
+ getElementById : function(id){
+ var rtv = null;
+ _visitNode(this.documentElement,function(node){
+ if(node.nodeType == ELEMENT_NODE){
+ if(node.getAttribute('id') == id){
+ rtv = node;
+ return true;
+ }
+ }
+ })
+ return rtv;
+ },
+
+ getElementsByClassName: function(className) {
+ var pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
+ return new LiveNodeList(this, function(base) {
+ var ls = [];
+ _visitNode(base.documentElement, function(node) {
+ if(node !== base && node.nodeType == ELEMENT_NODE) {
+ if(pattern.test(node.getAttribute('class'))) {
+ ls.push(node);
+ }
+ }
+ });
+ return ls;
+ });
+ },
+
+ //document factory method:
+ createElement : function(tagName){
+ var node = new Element();
+ node.ownerDocument = this;
+ node.nodeName = tagName;
+ node.tagName = tagName;
+ node.childNodes = new NodeList();
+ var attrs = node.attributes = new NamedNodeMap();
+ attrs._ownerElement = node;
+ return node;
+ },
+ createDocumentFragment : function(){
+ var node = new DocumentFragment();
+ node.ownerDocument = this;
+ node.childNodes = new NodeList();
+ return node;
+ },
+ createTextNode : function(data){
+ var node = new Text();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createComment : function(data){
+ var node = new Comment();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createCDATASection : function(data){
+ var node = new CDATASection();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createProcessingInstruction : function(target,data){
+ var node = new ProcessingInstruction();
+ node.ownerDocument = this;
+ node.tagName = node.target = target;
+ node.nodeValue= node.data = data;
+ return node;
+ },
+ createAttribute : function(name){
+ var node = new Attr();
+ node.ownerDocument = this;
+ node.name = name;
+ node.nodeName = name;
+ node.localName = name;
+ node.specified = true;
+ return node;
+ },
+ createEntityReference : function(name){
+ var node = new EntityReference();
+ node.ownerDocument = this;
+ node.nodeName = name;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createElementNS : function(namespaceURI,qualifiedName){
+ var node = new Element();
+ var pl = qualifiedName.split(':');
+ var attrs = node.attributes = new NamedNodeMap();
+ node.childNodes = new NodeList();
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.tagName = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ attrs._ownerElement = node;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createAttributeNS : function(namespaceURI,qualifiedName){
+ var node = new Attr();
+ var pl = qualifiedName.split(':');
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.name = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ node.specified = true;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ return node;
+ }
+};
+_extends(Document,Node);
+
+
+function Element() {
+ this._nsMap = {};
+};
+Element.prototype = {
+ nodeType : ELEMENT_NODE,
+ hasAttribute : function(name){
+ return this.getAttributeNode(name)!=null;
+ },
+ getAttribute : function(name){
+ var attr = this.getAttributeNode(name);
+ return attr && attr.value || '';
+ },
+ getAttributeNode : function(name){
+ return this.attributes.getNamedItem(name);
+ },
+ setAttribute : function(name, value){
+ var attr = this.ownerDocument.createAttribute(name);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ removeAttribute : function(name){
+ var attr = this.getAttributeNode(name)
+ attr && this.removeAttributeNode(attr);
+ },
+
+ //four real opeartion method
+ appendChild:function(newChild){
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ return this.insertBefore(newChild,null);
+ }else{
+ return _appendSingleChild(this,newChild);
+ }
+ },
+ setAttributeNode : function(newAttr){
+ return this.attributes.setNamedItem(newAttr);
+ },
+ setAttributeNodeNS : function(newAttr){
+ return this.attributes.setNamedItemNS(newAttr);
+ },
+ removeAttributeNode : function(oldAttr){
+ //console.log(this == oldAttr.ownerElement)
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
+ },
+ //get real attribute name,and remove it by removeAttributeNode
+ removeAttributeNS : function(namespaceURI, localName){
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
+ old && this.removeAttributeNode(old);
+ },
+
+ hasAttributeNS : function(namespaceURI, localName){
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
+ },
+ getAttributeNS : function(namespaceURI, localName){
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
+ return attr && attr.value || '';
+ },
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ getAttributeNodeNS : function(namespaceURI, localName){
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
+ },
+
+ getElementsByTagName : function(tagName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ },
+ getElementsByTagNameNS : function(namespaceURI, localName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+
+ });
+ }
+};
+Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
+Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
+
+
+_extends(Element,Node);
+function Attr() {
+};
+Attr.prototype.nodeType = ATTRIBUTE_NODE;
+_extends(Attr,Node);
+
+
+function CharacterData() {
+};
+CharacterData.prototype = {
+ data : '',
+ substringData : function(offset, count) {
+ return this.data.substring(offset, offset+count);
+ },
+ appendData: function(text) {
+ text = this.data+text;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ },
+ insertData: function(offset,text) {
+ this.replaceData(offset,0,text);
+
+ },
+ appendChild:function(newChild){
+ throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])
+ },
+ deleteData: function(offset, count) {
+ this.replaceData(offset,count,"");
+ },
+ replaceData: function(offset, count, text) {
+ var start = this.data.substring(0,offset);
+ var end = this.data.substring(offset+count);
+ text = start + text + end;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ }
+}
+_extends(CharacterData,Node);
+function Text() {
+};
+Text.prototype = {
+ nodeName : "#text",
+ nodeType : TEXT_NODE,
+ splitText : function(offset) {
+ var text = this.data;
+ var newText = text.substring(offset);
+ text = text.substring(0, offset);
+ this.data = this.nodeValue = text;
+ this.length = text.length;
+ var newNode = this.ownerDocument.createTextNode(newText);
+ if(this.parentNode){
+ this.parentNode.insertBefore(newNode, this.nextSibling);
+ }
+ return newNode;
+ }
+}
+_extends(Text,CharacterData);
+function Comment() {
+};
+Comment.prototype = {
+ nodeName : "#comment",
+ nodeType : COMMENT_NODE
+}
+_extends(Comment,CharacterData);
+
+function CDATASection() {
+};
+CDATASection.prototype = {
+ nodeName : "#cdata-section",
+ nodeType : CDATA_SECTION_NODE
+}
+_extends(CDATASection,CharacterData);
+
+
+function DocumentType() {
+};
+DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
+_extends(DocumentType,Node);
+
+function Notation() {
+};
+Notation.prototype.nodeType = NOTATION_NODE;
+_extends(Notation,Node);
+
+function Entity() {
+};
+Entity.prototype.nodeType = ENTITY_NODE;
+_extends(Entity,Node);
+
+function EntityReference() {
+};
+EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
+_extends(EntityReference,Node);
+
+function DocumentFragment() {
+};
+DocumentFragment.prototype.nodeName = "#document-fragment";
+DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
+_extends(DocumentFragment,Node);
+
+
+function ProcessingInstruction() {
+}
+ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
+_extends(ProcessingInstruction,Node);
+function XMLSerializer(){}
+XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){
+ return nodeSerializeToString.call(node,isHtml,nodeFilter);
+}
+Node.prototype.toString = nodeSerializeToString;
+function nodeSerializeToString(isHtml,nodeFilter){
+ var buf = [];
+ var refNode = this.nodeType == 9 && this.documentElement || this;
+ var prefix = refNode.prefix;
+ var uri = refNode.namespaceURI;
+
+ if(uri && prefix == null){
+ //console.log(prefix)
+ var prefix = refNode.lookupPrefix(uri);
+ if(prefix == null){
+ //isHTML = true;
+ var visibleNamespaces=[
+ {namespace:uri,prefix:null}
+ //{namespace:uri,prefix:''}
+ ]
+ }
+ }
+ serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
+ //console.log('###',this.nodeType,uri,prefix,buf.join(''))
+ return buf.join('');
+}
+function needNamespaceDefine(node,isHTML, visibleNamespaces) {
+ var prefix = node.prefix||'';
+ var uri = node.namespaceURI;
+ if (!prefix && !uri){
+ return false;
+ }
+ if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace"
+ || uri == 'http://www.w3.org/2000/xmlns/'){
+ return false;
+ }
+
+ var i = visibleNamespaces.length
+ //console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces)
+ while (i--) {
+ var ns = visibleNamespaces[i];
+ // get namespace prefix
+ //console.log(node.nodeType,node.tagName,ns.prefix,prefix)
+ if (ns.prefix == prefix){
+ return ns.namespace != uri;
+ }
+ }
+ //console.log(isHTML,uri,prefix=='')
+ //if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){
+ // return false;
+ //}
+ //node.flag = '11111'
+ //console.error(3,true,node.flag,node.prefix,node.namespaceURI)
+ return true;
+}
+function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
+ if(nodeFilter){
+ node = nodeFilter(node);
+ if(node){
+ if(typeof node == 'string'){
+ buf.push(node);
+ return;
+ }
+ }else{
+ return;
+ }
+ //buf.sort.apply(attrs, attributeSorter);
+ }
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ if (!visibleNamespaces) visibleNamespaces = [];
+ var startVisibleNamespaces = visibleNamespaces.length;
+ var attrs = node.attributes;
+ var len = attrs.length;
+ var child = node.firstChild;
+ var nodeName = node.tagName;
+
+ isHTML = (htmlns === node.namespaceURI) ||isHTML
+ buf.push('<',nodeName);
+
+
+
+ for(var i=0;i<len;i++){
+ // add namespaces for attributes
+ var attr = attrs.item(i);
+ if (attr.prefix == 'xmlns') {
+ visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });
+ }else if(attr.nodeName == 'xmlns'){
+ visibleNamespaces.push({ prefix: '', namespace: attr.value });
+ }
+ }
+ for(var i=0;i<len;i++){
+ var attr = attrs.item(i);
+ if (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {
+ var prefix = attr.prefix||'';
+ var uri = attr.namespaceURI;
+ var ns = prefix ? ' xmlns:' + prefix : " xmlns";
+ buf.push(ns, '="' , uri , '"');
+ visibleNamespaces.push({ prefix: prefix, namespace:uri });
+ }
+ serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
+ }
+ // add namespace for current node
+ if (needNamespaceDefine(node,isHTML, visibleNamespaces)) {
+ var prefix = node.prefix||'';
+ var uri = node.namespaceURI;
+ if (uri) {
+ // Avoid empty namespace value like xmlns:ds=""
+ // Empty namespace URL will we produce an invalid XML document
+ var ns = prefix ? ' xmlns:' + prefix : " xmlns";
+ buf.push(ns, '="' , uri , '"');
+ visibleNamespaces.push({ prefix: prefix, namespace:uri });
+ }
+ }
+
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){
+ buf.push('>');
+ //if is cdata child node
+ if(isHTML && /^script$/i.test(nodeName)){
+ while(child){
+ if(child.data){
+ buf.push(child.data);
+ }else{
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ }
+ child = child.nextSibling;
+ }
+ }else
+ {
+ while(child){
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ child = child.nextSibling;
+ }
+ }
+ buf.push('</',nodeName,'>');
+ }else{
+ buf.push('/>');
+ }
+ // remove added visible namespaces
+ //visibleNamespaces.length = startVisibleNamespaces;
+ return;
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var child = node.firstChild;
+ while(child){
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ child = child.nextSibling;
+ }
+ return;
+ case ATTRIBUTE_NODE:
+ /**
+ * Well-formedness constraint: No < in Attribute Values
+ * The replacement text of any entity referred to directly or indirectly in an attribute value must not contain a <.
+ * @see https://www.w3.org/TR/xml/#CleanAttrVals
+ * @see https://www.w3.org/TR/xml/#NT-AttValue
+ */
+ return buf.push(' ', node.name, '="', node.value.replace(/[<&"]/g,_xmlEncoder), '"');
+ case TEXT_NODE:
+ /**
+ * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
+ * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
+ * If they are needed elsewhere, they must be escaped using either numeric character references or the strings
+ * `&amp;` and `&lt;` respectively.
+ * The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility,
+ * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,
+ * when that string is not marking the end of a CDATA section.
+ *
+ * In the content of elements, character data is any string of characters
+ * which does not contain the start-delimiter of any markup
+ * and does not include the CDATA-section-close delimiter, `]]>`.
+ *
+ * @see https://www.w3.org/TR/xml/#NT-CharData
+ */
+ return buf.push(node.data
+ .replace(/[<&]/g,_xmlEncoder)
+ .replace(/]]>/g, ']]&gt;')
+ );
+ case CDATA_SECTION_NODE:
+ return buf.push( '<![CDATA[',node.data,']]>');
+ case COMMENT_NODE:
+ return buf.push( "<!--",node.data,"-->");
+ case DOCUMENT_TYPE_NODE:
+ var pubid = node.publicId;
+ var sysid = node.systemId;
+ buf.push('<!DOCTYPE ',node.name);
+ if(pubid){
+ buf.push(' PUBLIC ', pubid);
+ if (sysid && sysid!='.') {
+ buf.push(' ', sysid);
+ }
+ buf.push('>');
+ }else if(sysid && sysid!='.'){
+ buf.push(' SYSTEM ', sysid, '>');
+ }else{
+ var sub = node.internalSubset;
+ if(sub){
+ buf.push(" [",sub,"]");
+ }
+ buf.push(">");
+ }
+ return;
+ case PROCESSING_INSTRUCTION_NODE:
+ return buf.push( "<?",node.target," ",node.data,"?>");
+ case ENTITY_REFERENCE_NODE:
+ return buf.push( '&',node.nodeName,';');
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ default:
+ buf.push('??',node.nodeName);
+ }
+}
+function importNode(doc,node,deep){
+ var node2;
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ node2 = node.cloneNode(false);
+ node2.ownerDocument = doc;
+ //var attrs = node2.attributes;
+ //var len = attrs.length;
+ //for(var i=0;i<len;i++){
+ //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
+ //}
+ case DOCUMENT_FRAGMENT_NODE:
+ break;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ break;
+ //case ENTITY_REFERENCE_NODE:
+ //case PROCESSING_INSTRUCTION_NODE:
+ ////case TEXT_NODE:
+ //case CDATA_SECTION_NODE:
+ //case COMMENT_NODE:
+ // deep = false;
+ // break;
+ //case DOCUMENT_NODE:
+ //case DOCUMENT_TYPE_NODE:
+ //cannot be imported.
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ //can not hit in level3
+ //default:throw e;
+ }
+ if(!node2){
+ node2 = node.cloneNode(false);//false
+ }
+ node2.ownerDocument = doc;
+ node2.parentNode = null;
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(importNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+//
+//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
+// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
+function cloneNode(doc,node,deep){
+ var node2 = new node.constructor();
+ for(var n in node){
+ var v = node[n];
+ if(typeof v != 'object' ){
+ if(v != node2[n]){
+ node2[n] = v;
+ }
+ }
+ }
+ if(node.childNodes){
+ node2.childNodes = new NodeList();
+ }
+ node2.ownerDocument = doc;
+ switch (node2.nodeType) {
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var attrs2 = node2.attributes = new NamedNodeMap();
+ var len = attrs.length
+ attrs2._ownerElement = node2;
+ for(var i=0;i<len;i++){
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
+ }
+ break;;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ }
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(cloneNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+
+function __set__(object,key,value){
+ object[key] = value
+}
+//do dynamic
+try{
+ if(Object.defineProperty){
+ Object.defineProperty(LiveNodeList.prototype,'length',{
+ get:function(){
+ _updateLiveList(this);
+ return this.$$length;
+ }
+ });
+ Object.defineProperty(Node.prototype,'textContent',{
+ get:function(){
+ return getTextContent(this);
+ },
+ set:function(data){
+ switch(this.nodeType){
+ case ELEMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ while(this.firstChild){
+ this.removeChild(this.firstChild);
+ }
+ if(data || String(data)){
+ this.appendChild(this.ownerDocument.createTextNode(data));
+ }
+ break;
+ default:
+ //TODO:
+ this.data = data;
+ this.value = data;
+ this.nodeValue = data;
+ }
+ }
+ })
+
+ function getTextContent(node){
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var buf = [];
+ node = node.firstChild;
+ while(node){
+ if(node.nodeType!==7 && node.nodeType !==8){
+ buf.push(getTextContent(node));
+ }
+ node = node.nextSibling;
+ }
+ return buf.join('');
+ default:
+ return node.nodeValue;
+ }
+ }
+ __set__ = function(object,key,value){
+ //console.log(value)
+ object['$$'+key] = value
+ }
+ }
+}catch(e){//ie8
+}
+
+//if(typeof require == 'function'){
+ exports.Node = Node;
+ exports.DOMException = DOMException;
+ exports.DOMImplementation = DOMImplementation;
+ exports.XMLSerializer = XMLSerializer;
+//}
+
+},{}],4:[function(require,module,exports){
+exports.entityMap = {
+ lt: '<',
+ gt: '>',
+ amp: '&',
+ quot: '"',
+ apos: "'",
+ Agrave: "À",
+ Aacute: "Á",
+ Acirc: "Â",
+ Atilde: "Ã",
+ Auml: "Ä",
+ Aring: "Å",
+ AElig: "Æ",
+ Ccedil: "Ç",
+ Egrave: "È",
+ Eacute: "É",
+ Ecirc: "Ê",
+ Euml: "Ë",
+ Igrave: "Ì",
+ Iacute: "Í",
+ Icirc: "Î",
+ Iuml: "Ï",
+ ETH: "Ð",
+ Ntilde: "Ñ",
+ Ograve: "Ò",
+ Oacute: "Ó",
+ Ocirc: "Ô",
+ Otilde: "Õ",
+ Ouml: "Ö",
+ Oslash: "Ø",
+ Ugrave: "Ù",
+ Uacute: "Ú",
+ Ucirc: "Û",
+ Uuml: "Ü",
+ Yacute: "Ý",
+ THORN: "Þ",
+ szlig: "ß",
+ agrave: "à",
+ aacute: "á",
+ acirc: "â",
+ atilde: "ã",
+ auml: "ä",
+ aring: "å",
+ aelig: "æ",
+ ccedil: "ç",
+ egrave: "è",
+ eacute: "é",
+ ecirc: "ê",
+ euml: "ë",
+ igrave: "ì",
+ iacute: "í",
+ icirc: "î",
+ iuml: "ï",
+ eth: "ð",
+ ntilde: "ñ",
+ ograve: "ò",
+ oacute: "ó",
+ ocirc: "ô",
+ otilde: "õ",
+ ouml: "ö",
+ oslash: "ø",
+ ugrave: "ù",
+ uacute: "ú",
+ ucirc: "û",
+ uuml: "ü",
+ yacute: "ý",
+ thorn: "þ",
+ yuml: "ÿ",
+ nbsp: "\u00a0",
+ iexcl: "¡",
+ cent: "¢",
+ pound: "£",
+ curren: "¤",
+ yen: "¥",
+ brvbar: "¦",
+ sect: "§",
+ uml: "¨",
+ copy: "©",
+ ordf: "ª",
+ laquo: "«",
+ not: "¬",
+ shy: "­­",
+ reg: "®",
+ macr: "¯",
+ deg: "°",
+ plusmn: "±",
+ sup2: "²",
+ sup3: "³",
+ acute: "´",
+ micro: "µ",
+ para: "¶",
+ middot: "·",
+ cedil: "¸",
+ sup1: "¹",
+ ordm: "º",
+ raquo: "»",
+ frac14: "¼",
+ frac12: "½",
+ frac34: "¾",
+ iquest: "¿",
+ times: "×",
+ divide: "÷",
+ forall: "∀",
+ part: "∂",
+ exist: "∃",
+ empty: "∅",
+ nabla: "∇",
+ isin: "∈",
+ notin: "∉",
+ ni: "∋",
+ prod: "∏",
+ sum: "∑",
+ minus: "−",
+ lowast: "∗",
+ radic: "√",
+ prop: "∝",
+ infin: "∞",
+ ang: "∠",
+ and: "∧",
+ or: "∨",
+ cap: "∩",
+ cup: "∪",
+ 'int': "∫",
+ there4: "∴",
+ sim: "∼",
+ cong: "≅",
+ asymp: "≈",
+ ne: "≠",
+ equiv: "≡",
+ le: "≤",
+ ge: "≥",
+ sub: "⊂",
+ sup: "⊃",
+ nsub: "⊄",
+ sube: "⊆",
+ supe: "⊇",
+ oplus: "⊕",
+ otimes: "⊗",
+ perp: "⊥",
+ sdot: "⋅",
+ Alpha: "Α",
+ Beta: "Β",
+ Gamma: "Γ",
+ Delta: "Δ",
+ Epsilon: "Ε",
+ Zeta: "Ζ",
+ Eta: "Η",
+ Theta: "Θ",
+ Iota: "Ι",
+ Kappa: "Κ",
+ Lambda: "Λ",
+ Mu: "Μ",
+ Nu: "Ν",
+ Xi: "Ξ",
+ Omicron: "Ο",
+ Pi: "Π",
+ Rho: "Ρ",
+ Sigma: "Σ",
+ Tau: "Τ",
+ Upsilon: "Υ",
+ Phi: "Φ",
+ Chi: "Χ",
+ Psi: "Ψ",
+ Omega: "Ω",
+ alpha: "α",
+ beta: "β",
+ gamma: "γ",
+ delta: "δ",
+ epsilon: "ε",
+ zeta: "ζ",
+ eta: "η",
+ theta: "θ",
+ iota: "ι",
+ kappa: "κ",
+ lambda: "λ",
+ mu: "μ",
+ nu: "ν",
+ xi: "ξ",
+ omicron: "ο",
+ pi: "π",
+ rho: "ρ",
+ sigmaf: "ς",
+ sigma: "σ",
+ tau: "τ",
+ upsilon: "υ",
+ phi: "φ",
+ chi: "χ",
+ psi: "ψ",
+ omega: "ω",
+ thetasym: "ϑ",
+ upsih: "ϒ",
+ piv: "ϖ",
+ OElig: "Œ",
+ oelig: "œ",
+ Scaron: "Š",
+ scaron: "š",
+ Yuml: "Ÿ",
+ fnof: "ƒ",
+ circ: "ˆ",
+ tilde: "˜",
+ ensp: " ",
+ emsp: " ",
+ thinsp: " ",
+ zwnj: "‌",
+ zwj: "‍",
+ lrm: "‎",
+ rlm: "‏",
+ ndash: "–",
+ mdash: "—",
+ lsquo: "‘",
+ rsquo: "’",
+ sbquo: "‚",
+ ldquo: "“",
+ rdquo: "”",
+ bdquo: "„",
+ dagger: "†",
+ Dagger: "‡",
+ bull: "•",
+ hellip: "…",
+ permil: "‰",
+ prime: "′",
+ Prime: "″",
+ lsaquo: "‹",
+ rsaquo: "›",
+ oline: "‾",
+ euro: "€",
+ trade: "™",
+ larr: "←",
+ uarr: "↑",
+ rarr: "→",
+ darr: "↓",
+ harr: "↔",
+ crarr: "↵",
+ lceil: "⌈",
+ rceil: "⌉",
+ lfloor: "⌊",
+ rfloor: "⌋",
+ loz: "◊",
+ spades: "♠",
+ clubs: "♣",
+ hearts: "♥",
+ diams: "♦"
+};
+
+},{}],5:[function(require,module,exports){
+//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
+//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
+//[5] Name ::= NameStartChar (NameChar)*
+var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
+var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
+var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
+//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
+//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
+
+//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
+//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
+var S_TAG = 0;//tag name offerring
+var S_ATTR = 1;//attr name offerring
+var S_ATTR_SPACE=2;//attr name end and space offer
+var S_EQ = 3;//=space?
+var S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)
+var S_ATTR_END = 5;//attr value end and no space(quot end)
+var S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)
+var S_TAG_CLOSE = 7;//closed el<el />
+
+/**
+ * Creates an error that will not be caught by XMLReader aka the SAX parser.
+ *
+ * @param {string} message
+ * @param {any?} locator Optional, can provide details about the location in the source
+ * @constructor
+ */
+function ParseError(message, locator) {
+ this.message = message
+ this.locator = locator
+ if(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);
+}
+ParseError.prototype = new Error();
+ParseError.prototype.name = ParseError.name
+
+function XMLReader(){
+
+}
+
+XMLReader.prototype = {
+ parse:function(source,defaultNSMap,entityMap){
+ var domBuilder = this.domBuilder;
+ domBuilder.startDocument();
+ _copy(defaultNSMap ,defaultNSMap = {})
+ parse(source,defaultNSMap,entityMap,
+ domBuilder,this.errorHandler);
+ domBuilder.endDocument();
+ }
+}
+function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
+ function fixedFromCharCode(code) {
+ // String.prototype.fromCharCode does not supports
+ // > 2 bytes unicode chars directly
+ if (code > 0xffff) {
+ code -= 0x10000;
+ var surrogate1 = 0xd800 + (code >> 10)
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
+
+ return String.fromCharCode(surrogate1, surrogate2);
+ } else {
+ return String.fromCharCode(code);
+ }
+ }
+ function entityReplacer(a){
+ var k = a.slice(1,-1);
+ if(k in entityMap){
+ return entityMap[k];
+ }else if(k.charAt(0) === '#'){
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
+ }else{
+ errorHandler.error('entity not found:'+a);
+ return a;
+ }
+ }
+ function appendText(end){//has some bugs
+ if(end>start){
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
+ locator&&position(start);
+ domBuilder.characters(xt,0,end-start);
+ start = end
+ }
+ }
+ function position(p,m){
+ while(p>=lineEnd && (m = linePattern.exec(source))){
+ lineStart = m.index;
+ lineEnd = lineStart + m[0].length;
+ locator.lineNumber++;
+ //console.log('line++:',locator,startPos,endPos)
+ }
+ locator.columnNumber = p-lineStart+1;
+ }
+ var lineStart = 0;
+ var lineEnd = 0;
+ var linePattern = /.*(?:\r\n?|\n)|.*$/g
+ var locator = domBuilder.locator;
+
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
+ var closeMap = {};
+ var start = 0;
+ while(true){
+ try{
+ var tagStart = source.indexOf('<',start);
+ if(tagStart<0){
+ if(!source.substr(start).match(/^\s*$/)){
+ var doc = domBuilder.doc;
+ var text = doc.createTextNode(source.substr(start));
+ doc.appendChild(text);
+ domBuilder.currentElement = text;
+ }
+ return;
+ }
+ if(tagStart>start){
+ appendText(tagStart);
+ }
+ switch(source.charAt(tagStart+1)){
+ case '/':
+ var end = source.indexOf('>',tagStart+3);
+ var tagName = source.substring(tagStart+2,end);
+ var config = parseStack.pop();
+ if(end<0){
+
+ tagName = source.substring(tagStart+2).replace(/[\s<].*/,'');
+ errorHandler.error("end tag name: "+tagName+' is not complete:'+config.tagName);
+ end = tagStart+1+tagName.length;
+ }else if(tagName.match(/\s</)){
+ tagName = tagName.replace(/[\s<].*/,'');
+ errorHandler.error("end tag name: "+tagName+' maybe not complete');
+ end = tagStart+1+tagName.length;
+ }
+ var localNSMap = config.localNSMap;
+ var endMatch = config.tagName == tagName;
+ var endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()
+ if(endIgnoreCaseMach){
+ domBuilder.endElement(config.uri,config.localName,tagName);
+ if(localNSMap){
+ for(var prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix) ;
+ }
+ }
+ if(!endMatch){
+ errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); // No known test case
+ }
+ }else{
+ parseStack.push(config)
+ }
+
+ end++;
+ break;
+ // end elment
+ case '?':// <?...?>
+ locator&&position(tagStart);
+ end = parseInstruction(source,tagStart,domBuilder);
+ break;
+ case '!':// <!doctype,<![CDATA,<!--
+ locator&&position(tagStart);
+ end = parseDCC(source,tagStart,domBuilder,errorHandler);
+ break;
+ default:
+ locator&&position(tagStart);
+ var el = new ElementAttributes();
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ //elStartEnd
+ var end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);
+ var len = el.length;
+
+
+ if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
+ el.closed = true;
+ if(!entityMap.nbsp){
+ errorHandler.warning('unclosed xml attribute');
+ }
+ }
+ if(locator && len){
+ var locator2 = copyLocator(locator,{});
+ //try{//attribute position fixed
+ for(var i = 0;i<len;i++){
+ var a = el[i];
+ position(a.offset);
+ a.locator = copyLocator(locator,{});
+ }
+ domBuilder.locator = locator2
+ if(appendElement(el,domBuilder,currentNSMap)){
+ parseStack.push(el)
+ }
+ domBuilder.locator = locator;
+ }else{
+ if(appendElement(el,domBuilder,currentNSMap)){
+ parseStack.push(el)
+ }
+ }
+
+
+
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
+ }else{
+ end++;
+ }
+ }
+ }catch(e){
+ if (e instanceof ParseError) {
+ throw e;
+ }
+ errorHandler.error('element parse error: '+e)
+ end = -1;
+ }
+ if(end>start){
+ start = end;
+ }else{
+ //TODO: 这里有可能sax回退,有位置错误风险
+ appendText(Math.max(tagStart,start)+1);
+ }
+ }
+}
+function copyLocator(f,t){
+ t.lineNumber = f.lineNumber;
+ t.columnNumber = f.columnNumber;
+ return t;
+}
+
+/**
+ * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);
+ * @return end of the elementStartPart(end of elementEndPart for selfClosed el)
+ */
+function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){
+
+ /**
+ * @param {string} qname
+ * @param {string} value
+ * @param {number} startIndex
+ */
+ function addAttribute(qname, value, startIndex) {
+ if (qname in el.attributeNames) errorHandler.fatalError('Attribute ' + qname + ' redefined')
+ el.addValue(qname, value, startIndex)
+ }
+ var attrName;
+ var value;
+ var p = ++start;
+ var s = S_TAG;//status
+ while(true){
+ var c = source.charAt(p);
+ switch(c){
+ case '=':
+ if(s === S_ATTR){//attrName
+ attrName = source.slice(start,p);
+ s = S_EQ;
+ }else if(s === S_ATTR_SPACE){
+ s = S_EQ;
+ }else{
+ //fatalError: equal must after attrName or space after attrName
+ throw new Error('attribute equal must after attrName'); // No known test case
+ }
+ break;
+ case '\'':
+ case '"':
+ if(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE
+ ){//equal
+ if(s === S_ATTR){
+ errorHandler.warning('attribute value must after "="')
+ attrName = source.slice(start,p)
+ }
+ start = p+1;
+ p = source.indexOf(c,start)
+ if(p>0){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ addAttribute(attrName, value, start-1);
+ s = S_ATTR_END;
+ }else{
+ //fatalError: no end quot match
+ throw new Error('attribute value no end \''+c+'\' match');
+ }
+ }else if(s == S_ATTR_NOQUOT_VALUE){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ //console.log(attrName,value,start,p)
+ addAttribute(attrName, value, start);
+ //console.dir(el)
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
+ start = p+1;
+ s = S_ATTR_END
+ }else{
+ //fatalError: no equal before
+ throw new Error('attribute value must after "="'); // No known test case
+ }
+ break;
+ case '/':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_ATTR_END:
+ case S_TAG_SPACE:
+ case S_TAG_CLOSE:
+ s =S_TAG_CLOSE;
+ el.closed = true;
+ case S_ATTR_NOQUOT_VALUE:
+ case S_ATTR:
+ case S_ATTR_SPACE:
+ break;
+ //case S_EQ:
+ default:
+ throw new Error("attribute invalid close char('/')") // No known test case
+ }
+ break;
+ case ''://end document
+ errorHandler.error('unexpected end of input');
+ if(s == S_TAG){
+ el.setTagName(source.slice(start,p));
+ }
+ return p;
+ case '>':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_ATTR_END:
+ case S_TAG_SPACE:
+ case S_TAG_CLOSE:
+ break;//normal
+ case S_ATTR_NOQUOT_VALUE://Compatible state
+ case S_ATTR:
+ value = source.slice(start,p);
+ if(value.slice(-1) === '/'){
+ el.closed = true;
+ value = value.slice(0,-1)
+ }
+ case S_ATTR_SPACE:
+ if(s === S_ATTR_SPACE){
+ value = attrName;
+ }
+ if(s == S_ATTR_NOQUOT_VALUE){
+ errorHandler.warning('attribute "'+value+'" missed quot(")!');
+ addAttribute(attrName, value.replace(/&#?\w+;/g,entityReplacer), start)
+ }else{
+ if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
+ }
+ addAttribute(value, value, start)
+ }
+ break;
+ case S_EQ:
+ throw new Error('attribute value missed!!');
+ }
+// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName))
+ return p;
+ /*xml space '\x20' | #x9 | #xD | #xA; */
+ case '\u0080':
+ c = ' ';
+ default:
+ if(c<= ' '){//space
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));//tagName
+ s = S_TAG_SPACE;
+ break;
+ case S_ATTR:
+ attrName = source.slice(start,p)
+ s = S_ATTR_SPACE;
+ break;
+ case S_ATTR_NOQUOT_VALUE:
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ addAttribute(attrName, value, start)
+ case S_ATTR_END:
+ s = S_TAG_SPACE;
+ break;
+ //case S_TAG_SPACE:
+ //case S_EQ:
+ //case S_ATTR_SPACE:
+ // void();break;
+ //case S_TAG_CLOSE:
+ //ignore warning
+ }
+ }else{//not space
+//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
+//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
+ switch(s){
+ //case S_TAG:void();break;
+ //case S_ATTR:void();break;
+ //case S_ATTR_NOQUOT_VALUE:void();break;
+ case S_ATTR_SPACE:
+ var tagName = el.tagName;
+ if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!')
+ }
+ addAttribute(attrName, attrName, start);
+ start = p;
+ s = S_ATTR;
+ break;
+ case S_ATTR_END:
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
+ case S_TAG_SPACE:
+ s = S_ATTR;
+ start = p;
+ break;
+ case S_EQ:
+ s = S_ATTR_NOQUOT_VALUE;
+ start = p;
+ break;
+ case S_TAG_CLOSE:
+ throw new Error("elements closed character '/' and '>' must be connected to");
+ }
+ }
+ }//end outer switch
+ //console.log('p++',p)
+ p++;
+ }
+}
+/**
+ * @return true if has new namespace define
+ */
+function appendElement(el,domBuilder,currentNSMap){
+ var tagName = el.tagName;
+ var localNSMap = null;
+ //var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ var i = el.length;
+ while(i--){
+ var a = el[i];
+ var qName = a.qName;
+ var value = a.value;
+ var nsp = qName.indexOf(':');
+ if(nsp>0){
+ var prefix = a.prefix = qName.slice(0,nsp);
+ var localName = qName.slice(nsp+1);
+ var nsPrefix = prefix === 'xmlns' && localName
+ }else{
+ localName = qName;
+ prefix = null
+ nsPrefix = qName === 'xmlns' && ''
+ }
+ //can not set prefix,because prefix !== ''
+ a.localName = localName ;
+ //prefix == null for no ns prefix attribute
+ if(nsPrefix !== false){//hack!!
+ if(localNSMap == null){
+ localNSMap = {}
+ //console.log(currentNSMap,0)
+ _copy(currentNSMap,currentNSMap={})
+ //console.log(currentNSMap,1)
+ }
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
+ a.uri = 'http://www.w3.org/2000/xmlns/'
+ domBuilder.startPrefixMapping(nsPrefix, value)
+ }
+ }
+ var i = el.length;
+ while(i--){
+ a = el[i];
+ var prefix = a.prefix;
+ if(prefix){//no prefix attribute has no namespace
+ if(prefix === 'xml'){
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
+ }if(prefix !== 'xmlns'){
+ a.uri = currentNSMap[prefix || '']
+
+ //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}
+ }
+ }
+ }
+ var nsp = tagName.indexOf(':');
+ if(nsp>0){
+ prefix = el.prefix = tagName.slice(0,nsp);
+ localName = el.localName = tagName.slice(nsp+1);
+ }else{
+ prefix = null;//important!!
+ localName = el.localName = tagName;
+ }
+ //no prefix element has default namespace
+ var ns = el.uri = currentNSMap[prefix || ''];
+ domBuilder.startElement(ns,localName,tagName,el);
+ //endPrefixMapping and startPrefixMapping have not any help for dom builder
+ //localNSMap = null
+ if(el.closed){
+ domBuilder.endElement(ns,localName,tagName);
+ if(localNSMap){
+ for(prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix)
+ }
+ }
+ }else{
+ el.currentNSMap = currentNSMap;
+ el.localNSMap = localNSMap;
+ //parseStack.push(el);
+ return true;
+ }
+}
+function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
+ if(/^(?:script|textarea)$/i.test(tagName)){
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
+ var text = source.substring(elStartEnd+1,elEndStart);
+ if(/[&<]/.test(text)){
+ if(/^script$/i.test(tagName)){
+ //if(!/\]\]>/.test(text)){
+ //lexHandler.startCDATA();
+ domBuilder.characters(text,0,text.length);
+ //lexHandler.endCDATA();
+ return elEndStart;
+ //}
+ }//}else{//text area
+ text = text.replace(/&#?\w+;/g,entityReplacer);
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+ //}
+
+ }
+ }
+ return elStartEnd+1;
+}
+function fixSelfClosed(source,elStartEnd,tagName,closeMap){
+ //if(tagName in closeMap){
+ var pos = closeMap[tagName];
+ if(pos == null){
+ //console.log(tagName)
+ pos = source.lastIndexOf('</'+tagName+'>')
+ if(pos<elStartEnd){//忘记闭合
+ pos = source.lastIndexOf('</'+tagName)
+ }
+ closeMap[tagName] =pos
+ }
+ return pos<elStartEnd;
+ //}
+}
+function _copy(source,target){
+ for(var n in source){target[n] = source[n]}
+}
+function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
+ var next= source.charAt(start+2)
+ switch(next){
+ case '-':
+ if(source.charAt(start + 3) === '-'){
+ var end = source.indexOf('-->',start+4);
+ //append comment source.substring(4,end)//<!--
+ if(end>start){
+ domBuilder.comment(source,start+4,end-start-4);
+ return end+3;
+ }else{
+ errorHandler.error("Unclosed comment");
+ return -1;
+ }
+ }else{
+ //error
+ return -1;
+ }
+ default:
+ if(source.substr(start+3,6) == 'CDATA['){
+ var end = source.indexOf(']]>',start+9);
+ domBuilder.startCDATA();
+ domBuilder.characters(source,start+9,end-start-9);
+ domBuilder.endCDATA()
+ return end+3;
+ }
+ //<!DOCTYPE
+ //startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
+ var matchs = split(source,start);
+ var len = matchs.length;
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
+ var name = matchs[1][0];
+ var pubid = false;
+ var sysid = false;
+ if(len>3){
+ if(/^public$/i.test(matchs[2][0])){
+ pubid = matchs[3][0];
+ sysid = len>4 && matchs[4][0];
+ }else if(/^system$/i.test(matchs[2][0])){
+ sysid = matchs[3][0];
+ }
+ }
+ var lastMatch = matchs[len-1]
+ domBuilder.startDTD(name, pubid, sysid);
+ domBuilder.endDTD();
+
+ return lastMatch.index+lastMatch[0].length
+ }
+ }
+ return -1;
+}
+
+
+
+function parseInstruction(source,start,domBuilder){
+ var end = source.indexOf('?>',start);
+ if(end){
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
+ if(match){
+ var len = match[0].length;
+ domBuilder.processingInstruction(match[1], match[2]) ;
+ return end+2;
+ }else{//error
+ return -1;
+ }
+ }
+ return -1;
+}
+
+function ElementAttributes(){
+ this.attributeNames = {}
+}
+ElementAttributes.prototype = {
+ setTagName:function(tagName){
+ if(!tagNamePattern.test(tagName)){
+ throw new Error('invalid tagName:'+tagName)
+ }
+ this.tagName = tagName
+ },
+ addValue:function(qName, value, offset) {
+ if(!tagNamePattern.test(qName)){
+ throw new Error('invalid attribute:'+qName)
+ }
+ this.attributeNames[qName] = this.length;
+ this[this.length++] = {qName:qName,value:value,offset:offset}
+ },
+ length:0,
+ getLocalName:function(i){return this[i].localName},
+ getLocator:function(i){return this[i].locator},
+ getQName:function(i){return this[i].qName},
+ getURI:function(i){return this[i].uri},
+ getValue:function(i){return this[i].value}
+// ,getIndex:function(uri, localName)){
+// if(localName){
+//
+// }else{
+// var qName = uri
+// }
+// },
+// getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},
+// getType:function(uri,localName){}
+// getType:function(i){},
+}
+
+
+
+function split(source,start){
+ var match;
+ var buf = [];
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
+ reg.lastIndex = start;
+ reg.exec(source);//skip <
+ while(match = reg.exec(source)){
+ buf.push(match);
+ if(match[1])return buf;
+ }
+}
+
+exports.XMLReader = XMLReader;
+exports.ParseError = ParseError;
+
+},{}],6:[function(require,module,exports){
+'use strict'
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+ var len = b64.length
+
+ if (len % 4 > 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('')
+}
+
+},{}],7:[function(require,module,exports){
+(function (Buffer){(function (){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+/* eslint-disable no-proto */
+
+'use strict'
+
+var base64 = require('base64-js')
+var ieee754 = require('ieee754')
+
+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)
+ arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }
+ 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)
+ buf.__proto__ = 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)
+}
+
+// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
+if (typeof Symbol !== 'undefined' && Symbol.species != null &&
+ Buffer[Symbol.species] === Buffer) {
+ Object.defineProperty(Buffer, Symbol.species, {
+ value: null,
+ configurable: true,
+ enumerable: false,
+ writable: false
+ })
+}
+
+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 fromArrayLike(value)
+ }
+
+ if (value == null) {
+ throw 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 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
+Buffer.prototype.__proto__ = Uint8Array.prototype
+Buffer.__proto__ = 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 interpretted 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 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
+ buf.__proto__ = 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)) {
+ buf = Buffer.from(buf)
+ }
+ if (!Buffer.isBuffer(buf)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+ 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 coersion 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 '<Buffer ' + str + '>'
+}
+
+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 latin1Write (buf, string, offset, length) {
+ return asciiWrite(buf, string, 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':
+ return asciiWrite(this, string, offset, length)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Write(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 += toHex(buf[i])
+ }
+ return out
+}
+
+function utf16leSlice (buf, start, end) {
+ var bytes = buf.slice(start, end)
+ var res = ''
+ for (var i = 0; i < bytes.length; 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
+ newBuf.__proto__ = 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 = 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 = 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 = function readUInt8 (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+}
+
+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 = function readUInt16BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+}
+
+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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 if (this === target && start < targetStart && targetStart < end) {
+ // descending copy from end
+ for (var i = len - 1; i >= 0; --i) {
+ target[i + targetStart] = this[i + start]
+ }
+ } 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
+ }
+
+ // 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 toHex (n) {
+ if (n < 16) return '0' + n.toString(16)
+ return n.toString(16)
+}
+
+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
+}
+
+}).call(this)}).call(this,require("buffer").Buffer)
+},{"base64-js":6,"buffer":7,"ieee754":8}],8:[function(require,module,exports){
+/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = ((value * c) - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
+
+},{}]},{},[1])(1)
+});
diff --git a/node_modules/plist/dist/plist.js b/node_modules/plist/dist/plist.js
new file mode 100644
index 0000000..44a6678
--- /dev/null
+++ b/node_modules/plist/dist/plist.js
@@ -0,0 +1,9888 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
+/**
+ * Parser functions.
+ */
+
+var parserFunctions = require('./lib/parse');
+Object.keys(parserFunctions).forEach(function (k) { exports[k] = parserFunctions[k]; });
+
+/**
+ * Builder functions.
+ */
+
+var builderFunctions = require('./lib/build');
+Object.keys(builderFunctions).forEach(function (k) { exports[k] = builderFunctions[k]; });
+
+},{"./lib/build":2,"./lib/parse":3}],2:[function(require,module,exports){
+(function (Buffer){(function (){
+/**
+ * Module dependencies.
+ */
+
+var base64 = require('base64-js');
+var xmlbuilder = require('xmlbuilder');
+
+/**
+ * Module exports.
+ */
+
+exports.build = build;
+
+/**
+ * Accepts a `Date` instance and returns an ISO date string.
+ *
+ * @param {Date} d - Date instance to serialize
+ * @returns {String} ISO date string representation of `d`
+ * @api private
+ */
+
+function ISODateString(d){
+ function pad(n){
+ return n < 10 ? '0' + n : n;
+ }
+ return d.getUTCFullYear()+'-'
+ + pad(d.getUTCMonth()+1)+'-'
+ + pad(d.getUTCDate())+'T'
+ + pad(d.getUTCHours())+':'
+ + pad(d.getUTCMinutes())+':'
+ + pad(d.getUTCSeconds())+'Z';
+}
+
+/**
+ * Returns the internal "type" of `obj` via the
+ * `Object.prototype.toString()` trick.
+ *
+ * @param {Mixed} obj - any value
+ * @returns {String} the internal "type" name
+ * @api private
+ */
+
+var toString = Object.prototype.toString;
+function type (obj) {
+ var m = toString.call(obj).match(/\[object (.*)\]/);
+ return m ? m[1] : m;
+}
+
+/**
+ * Generate an XML plist string from the input object `obj`.
+ *
+ * @param {Object} obj - the object to convert
+ * @param {Object} [opts] - optional options object
+ * @returns {String} converted plist XML string
+ * @api public
+ */
+
+function build (obj, opts) {
+ var XMLHDR = {
+ version: '1.0',
+ encoding: 'UTF-8'
+ };
+
+ var XMLDTD = {
+ pubid: '-//Apple//DTD PLIST 1.0//EN',
+ sysid: 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'
+ };
+
+ var doc = xmlbuilder.create('plist');
+
+ doc.dec(XMLHDR.version, XMLHDR.encoding, XMLHDR.standalone);
+ doc.dtd(XMLDTD.pubid, XMLDTD.sysid);
+ doc.att('version', '1.0');
+
+ walk_obj(obj, doc);
+
+ if (!opts) opts = {};
+ // default `pretty` to `true`
+ opts.pretty = opts.pretty !== false;
+ return doc.end(opts);
+}
+
+/**
+ * depth first, recursive traversal of a javascript object. when complete,
+ * next_child contains a reference to the build XML object.
+ *
+ * @api private
+ */
+
+function walk_obj(next, next_child) {
+ var tag_type, i, prop;
+ var name = type(next);
+
+ if ('Undefined' == name) {
+ return;
+ } else if (Array.isArray(next)) {
+ next_child = next_child.ele('array');
+ for (i = 0; i < next.length; i++) {
+ walk_obj(next[i], next_child);
+ }
+
+ } else if (Buffer.isBuffer(next)) {
+ next_child.ele('data').raw(next.toString('base64'));
+
+ } else if ('Object' == name) {
+ next_child = next_child.ele('dict');
+ for (prop in next) {
+ if (next.hasOwnProperty(prop)) {
+ next_child.ele('key').txt(prop);
+ walk_obj(next[prop], next_child);
+ }
+ }
+
+ } else if ('Number' == name) {
+ // detect if this is an integer or real
+ // TODO: add an ability to force one way or another via a "cast"
+ tag_type = (next % 1 === 0) ? 'integer' : 'real';
+ next_child.ele(tag_type).txt(next.toString());
+
+ } else if ('Date' == name) {
+ next_child.ele('date').txt(ISODateString(new Date(next)));
+
+ } else if ('Boolean' == name) {
+ next_child.ele(next ? 'true' : 'false');
+
+ } else if ('String' == name) {
+ next_child.ele('string').txt(next);
+
+ } else if ('ArrayBuffer' == name) {
+ next_child.ele('data').raw(base64.fromByteArray(next));
+
+ } else if (next && next.buffer && 'ArrayBuffer' == type(next.buffer)) {
+ // a typed array
+ next_child.ele('data').raw(base64.fromByteArray(new Uint8Array(next.buffer), next_child));
+
+ } else if ('Null' === name) {
+ next_child.ele('null').txt('');
+
+ }
+}
+
+}).call(this)}).call(this,{"isBuffer":require("../node_modules/is-buffer/index.js")})
+},{"../node_modules/is-buffer/index.js":11,"base64-js":8,"xmlbuilder":44}],3:[function(require,module,exports){
+(function (Buffer){(function (){
+/**
+ * Module dependencies.
+ */
+
+var DOMParser = require('./xmldom/dom-parser').DOMParser;
+
+/**
+ * Module exports.
+ */
+
+exports.parse = parse;
+
+var TEXT_NODE = 3;
+var CDATA_NODE = 4;
+var COMMENT_NODE = 8;
+
+
+/**
+ * We ignore raw text (usually whitespace), <!-- xml comments -->,
+ * and raw CDATA nodes.
+ *
+ * @param {Element} node
+ * @returns {Boolean}
+ * @api private
+ */
+
+function shouldIgnoreNode (node) {
+ return node.nodeType === TEXT_NODE
+ || node.nodeType === COMMENT_NODE
+ || node.nodeType === CDATA_NODE;
+}
+
+/**
+ * Check if the node is empty. Some plist file has such node:
+ * <key />
+ * this node shoud be ignored.
+ *
+ * @see https://github.com/TooTallNate/plist.js/issues/66
+ * @param {Element} node
+ * @returns {Boolean}
+ * @api private
+ */
+function isEmptyNode(node){
+ if(!node.childNodes || node.childNodes.length === 0) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function invariant(test, message) {
+ if (!test) {
+ throw new Error(message);
+ }
+}
+
+/**
+ * Parses a Plist XML string. Returns an Object.
+ *
+ * @param {String} xml - the XML String to decode
+ * @returns {Mixed} the decoded value from the Plist XML
+ * @api public
+ */
+
+function parse (xml) {
+ var doc = new DOMParser().parseFromString(xml);
+ invariant(
+ doc.documentElement.nodeName === 'plist',
+ 'malformed document. First element should be <plist>'
+ );
+ var plist = parsePlistXML(doc.documentElement);
+
+ // the root <plist> node gets interpreted as an Array,
+ // so pull out the inner data first
+ if (plist.length == 1) plist = plist[0];
+
+ return plist;
+}
+
+/**
+ * Convert an XML based plist document into a JSON representation.
+ *
+ * @param {Object} xml_node - current XML node in the plist
+ * @returns {Mixed} built up JSON object
+ * @api private
+ */
+
+function parsePlistXML (node) {
+ var i, new_obj, key, val, new_arr, res, counter, type;
+
+ if (!node)
+ return null;
+
+ if (node.nodeName === 'plist') {
+ new_arr = [];
+ if (isEmptyNode(node)) {
+ return new_arr;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (!shouldIgnoreNode(node.childNodes[i])) {
+ new_arr.push( parsePlistXML(node.childNodes[i]));
+ }
+ }
+ return new_arr;
+ } else if (node.nodeName === 'dict') {
+ new_obj = {};
+ key = null;
+ counter = 0;
+ if (isEmptyNode(node)) {
+ return new_obj;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (shouldIgnoreNode(node.childNodes[i])) continue;
+ if (counter % 2 === 0) {
+ invariant(
+ node.childNodes[i].nodeName === 'key',
+ 'Missing key while parsing <dict/>.'
+ );
+ key = parsePlistXML(node.childNodes[i]);
+ } else {
+ invariant(
+ node.childNodes[i].nodeName !== 'key',
+ 'Unexpected key "'
+ + parsePlistXML(node.childNodes[i])
+ + '" while parsing <dict/>.'
+ );
+ new_obj[key] = parsePlistXML(node.childNodes[i]);
+ }
+ counter += 1;
+ }
+ if (counter % 2 === 1) {
+ new_obj[key] = '';
+ }
+
+ return new_obj;
+
+ } else if (node.nodeName === 'array') {
+ new_arr = [];
+ if (isEmptyNode(node)) {
+ return new_arr;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (!shouldIgnoreNode(node.childNodes[i])) {
+ res = parsePlistXML(node.childNodes[i]);
+ if (null != res) new_arr.push(res);
+ }
+ }
+ return new_arr;
+
+ } else if (node.nodeName === '#text') {
+ // TODO: what should we do with text types? (CDATA sections)
+
+ } else if (node.nodeName === 'key') {
+ if (isEmptyNode(node)) {
+ return '';
+ }
+
+ invariant(
+ node.childNodes[0].nodeValue !== '__proto__',
+ '__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912'
+ );
+
+ return node.childNodes[0].nodeValue;
+ } else if (node.nodeName === 'string') {
+ res = '';
+ if (isEmptyNode(node)) {
+ return res;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ var type = node.childNodes[i].nodeType;
+ if (type === TEXT_NODE || type === CDATA_NODE) {
+ res += node.childNodes[i].nodeValue;
+ }
+ }
+ return res;
+
+ } else if (node.nodeName === 'integer') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as integer.'
+ );
+ return parseInt(node.childNodes[0].nodeValue, 10);
+
+ } else if (node.nodeName === 'real') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as real.'
+ );
+ res = '';
+ for (i=0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === TEXT_NODE) {
+ res += node.childNodes[i].nodeValue;
+ }
+ }
+ return parseFloat(res);
+
+ } else if (node.nodeName === 'data') {
+ res = '';
+ if (isEmptyNode(node)) {
+ return Buffer.from(res, 'base64');
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === TEXT_NODE) {
+ res += node.childNodes[i].nodeValue.replace(/\s+/g, '');
+ }
+ }
+ return Buffer.from(res, 'base64');
+
+ } else if (node.nodeName === 'date') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as Date.'
+ )
+ return new Date(node.childNodes[0].nodeValue);
+
+ } else if (node.nodeName === 'null') {
+ return null;
+
+ } else if (node.nodeName === 'true') {
+ return true;
+
+ } else if (node.nodeName === 'false') {
+ return false;
+ } else {
+ throw new Error('Invalid PLIST tag ' + node.nodeName);
+ }
+}
+
+}).call(this)}).call(this,require("buffer").Buffer)
+},{"./xmldom/dom-parser":4,"buffer":9}],4:[function(require,module,exports){
+function DOMParser(options){
+ this.options = options ||{locator:{}};
+}
+
+DOMParser.prototype.parseFromString = function(source,mimeType){
+ var options = this.options;
+ var sax = new XMLReader();
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
+ var errorHandler = options.errorHandler;
+ var locator = options.locator;
+ var defaultNSMap = options.xmlns||{};
+ var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;
+ var entityMap = isHTML?htmlEntity.entityMap:{'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"};
+ if(locator){
+ domBuilder.setDocumentLocator(locator)
+ }
+
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
+ sax.domBuilder = options.domBuilder || domBuilder;
+ if(isHTML){
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
+ }
+ defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';
+ if(source && typeof source === 'string'){
+ sax.parse(source,defaultNSMap,entityMap);
+ }else{
+ sax.errorHandler.error("invalid doc source");
+ }
+ return domBuilder.doc;
+}
+function buildErrorHandler(errorImpl,domBuilder,locator){
+ if(!errorImpl){
+ if(domBuilder instanceof DOMHandler){
+ return domBuilder;
+ }
+ errorImpl = domBuilder ;
+ }
+ var errorHandler = {}
+ var isCallback = errorImpl instanceof Function;
+ locator = locator||{}
+ function build(key){
+ var fn = errorImpl[key];
+ if(!fn && isCallback){
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
+ }
+ errorHandler[key] = fn && function(msg){
+ fn('[xmldom '+key+']\t'+msg+_locator(locator));
+ }||function(){};
+ }
+ build('warning');
+ build('error');
+ build('fatalError');
+ return errorHandler;
+}
+
+//console.log('#\n\n\n\n\n\n\n####')
+/**
+ * +ContentHandler+ErrorHandler
+ * +LexicalHandler+EntityResolver2
+ * -DeclHandler-DTDHandler
+ *
+ * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
+ * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
+ */
+function DOMHandler() {
+ this.cdata = false;
+}
+function position(locator,node){
+ node.lineNumber = locator.lineNumber;
+ node.columnNumber = locator.columnNumber;
+}
+/**
+ * @see org.xml.sax.ContentHandler#startDocument
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
+ */
+DOMHandler.prototype = {
+ startDocument : function() {
+ this.doc = new DOMImplementation().createDocument(null, null, null);
+ if (this.locator) {
+ this.doc.documentURI = this.locator.systemId;
+ }
+ },
+ startElement:function(namespaceURI, localName, qName, attrs) {
+ var doc = this.doc;
+ var el = doc.createElementNS(namespaceURI, qName||localName);
+ var len = attrs.length;
+ appendElement(this, el);
+ this.currentElement = el;
+
+ this.locator && position(this.locator,el)
+ for (var i = 0 ; i < len; i++) {
+ var namespaceURI = attrs.getURI(i);
+ var value = attrs.getValue(i);
+ var qName = attrs.getQName(i);
+ var attr = doc.createAttributeNS(namespaceURI, qName);
+ this.locator &&position(attrs.getLocator(i),attr);
+ attr.value = attr.nodeValue = value;
+ el.setAttributeNode(attr)
+ }
+ },
+ endElement:function(namespaceURI, localName, qName) {
+ var current = this.currentElement
+ var tagName = current.tagName;
+ this.currentElement = current.parentNode;
+ },
+ startPrefixMapping:function(prefix, uri) {
+ },
+ endPrefixMapping:function(prefix) {
+ },
+ processingInstruction:function(target, data) {
+ var ins = this.doc.createProcessingInstruction(target, data);
+ this.locator && position(this.locator,ins)
+ appendElement(this, ins);
+ },
+ ignorableWhitespace:function(ch, start, length) {
+ },
+ characters:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ //console.log(chars)
+ if(chars){
+ if (this.cdata) {
+ var charNode = this.doc.createCDATASection(chars);
+ } else {
+ var charNode = this.doc.createTextNode(chars);
+ }
+ if(this.currentElement){
+ this.currentElement.appendChild(charNode);
+ }else if(/^\s*$/.test(chars)){
+ this.doc.appendChild(charNode);
+ //process xml
+ }
+ this.locator && position(this.locator,charNode)
+ }
+ },
+ skippedEntity:function(name) {
+ },
+ endDocument:function() {
+ this.doc.normalize();
+ },
+ setDocumentLocator:function (locator) {
+ if(this.locator = locator){// && !('lineNumber' in locator)){
+ locator.lineNumber = 0;
+ }
+ },
+ //LexicalHandler
+ comment:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ var comm = this.doc.createComment(chars);
+ this.locator && position(this.locator,comm)
+ appendElement(this, comm);
+ },
+
+ startCDATA:function() {
+ //used in characters() methods
+ this.cdata = true;
+ },
+ endCDATA:function() {
+ this.cdata = false;
+ },
+
+ startDTD:function(name, publicId, systemId) {
+ var impl = this.doc.implementation;
+ if (impl && impl.createDocumentType) {
+ var dt = impl.createDocumentType(name, publicId, systemId);
+ this.locator && position(this.locator,dt)
+ appendElement(this, dt);
+ }
+ },
+ /**
+ * @see org.xml.sax.ErrorHandler
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
+ */
+ warning:function(error) {
+ console.warn('[xmldom warning]\t'+error,_locator(this.locator));
+ },
+ error:function(error) {
+ console.error('[xmldom error]\t'+error,_locator(this.locator));
+ },
+ fatalError:function(error) {
+ throw new ParseError(error, this.locator);
+ }
+}
+function _locator(l){
+ if(l){
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
+ }
+}
+function _toString(chars,start,length){
+ if(typeof chars == 'string'){
+ return chars.substr(start,length)
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
+ if(chars.length >= start+length || start){
+ return new java.lang.String(chars,start,length)+'';
+ }
+ return chars;
+ }
+}
+
+/*
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html
+ * used method of org.xml.sax.ext.LexicalHandler:
+ * #comment(chars, start, length)
+ * #startCDATA()
+ * #endCDATA()
+ * #startDTD(name, publicId, systemId)
+ *
+ *
+ * IGNORED method of org.xml.sax.ext.LexicalHandler:
+ * #endDTD()
+ * #startEntity(name)
+ * #endEntity(name)
+ *
+ *
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html
+ * IGNORED method of org.xml.sax.ext.DeclHandler
+ * #attributeDecl(eName, aName, type, mode, value)
+ * #elementDecl(name, model)
+ * #externalEntityDecl(name, publicId, systemId)
+ * #internalEntityDecl(name, value)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html
+ * IGNORED method of org.xml.sax.EntityResolver2
+ * #resolveEntity(String name,String publicId,String baseURI,String systemId)
+ * #resolveEntity(publicId, systemId)
+ * #getExternalSubset(name, baseURI)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html
+ * IGNORED method of org.xml.sax.DTDHandler
+ * #notationDecl(name, publicId, systemId) {};
+ * #unparsedEntityDecl(name, publicId, systemId, notationName) {};
+ */
+"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
+ DOMHandler.prototype[key] = function(){return null}
+})
+
+/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */
+function appendElement (hander,node) {
+ if (!hander.currentElement) {
+ hander.doc.appendChild(node);
+ } else {
+ hander.currentElement.appendChild(node);
+ }
+}//appendChild and setAttributeNS are preformance key
+
+//if(typeof require == 'function'){
+var htmlEntity = require('./entities');
+var sax = require('./sax');
+var XMLReader = sax.XMLReader;
+var ParseError = sax.ParseError;
+var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
+exports.XMLSerializer = require('./dom').XMLSerializer ;
+exports.DOMParser = DOMParser;
+exports.__DOMHandler = DOMHandler;
+//}
+
+},{"./dom":5,"./entities":6,"./sax":7}],5:[function(require,module,exports){
+function copy(src,dest){
+ for(var p in src){
+ dest[p] = src[p];
+ }
+}
+/**
+^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
+^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));?
+ */
+function _extends(Class,Super){
+ var pt = Class.prototype;
+ if(!(pt instanceof Super)){
+ function t(){};
+ t.prototype = Super.prototype;
+ t = new t();
+ copy(pt,t);
+ Class.prototype = pt = t;
+ }
+ if(pt.constructor != Class){
+ if(typeof Class != 'function'){
+ console.error("unknow Class:"+Class)
+ }
+ pt.constructor = Class
+ }
+}
+var htmlns = 'http://www.w3.org/1999/xhtml' ;
+// Node Types
+var NodeType = {}
+var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
+var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
+var TEXT_NODE = NodeType.TEXT_NODE = 3;
+var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
+var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
+var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
+var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
+var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
+var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
+var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
+var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
+var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
+
+// ExceptionCode
+var ExceptionCode = {}
+var ExceptionMessage = {};
+var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
+var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
+var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
+var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
+var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
+var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
+var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
+var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
+var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
+var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
+//level2
+var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
+var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
+var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
+var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
+var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
+
+/**
+ * DOM Level 2
+ * Object DOMException
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
+ */
+function DOMException(code, message) {
+ if(message instanceof Error){
+ var error = message;
+ }else{
+ error = this;
+ Error.call(this, ExceptionMessage[code]);
+ this.message = ExceptionMessage[code];
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
+ }
+ error.code = code;
+ if(message) this.message = this.message + ": " + message;
+ return error;
+};
+DOMException.prototype = Error.prototype;
+copy(ExceptionCode,DOMException)
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177
+ * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.
+ * The items in the NodeList are accessible via an integral index, starting from 0.
+ */
+function NodeList() {
+};
+NodeList.prototype = {
+ /**
+ * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
+ * @standard level1
+ */
+ length:0,
+ /**
+ * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
+ * @standard level1
+ * @param index unsigned long
+ * Index into the collection.
+ * @return Node
+ * The node at the indexth position in the NodeList, or null if that is not a valid index.
+ */
+ item: function(index) {
+ return this[index] || null;
+ },
+ toString:function(isHTML,nodeFilter){
+ for(var buf = [], i = 0;i<this.length;i++){
+ serializeToString(this[i],buf,isHTML,nodeFilter);
+ }
+ return buf.join('');
+ }
+};
+function LiveNodeList(node,refresh){
+ this._node = node;
+ this._refresh = refresh
+ _updateLiveList(this);
+}
+function _updateLiveList(list){
+ var inc = list._node._inc || list._node.ownerDocument._inc;
+ if(list._inc != inc){
+ var ls = list._refresh(list._node);
+ //console.log(ls.length)
+ __set__(list,'length',ls.length);
+ copy(ls,list);
+ list._inc = inc;
+ }
+}
+LiveNodeList.prototype.item = function(i){
+ _updateLiveList(this);
+ return this[i];
+}
+
+_extends(LiveNodeList,NodeList);
+/**
+ *
+ * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.
+ * NamedNodeMap objects in the DOM are live.
+ * used for attributes or DocumentType entities
+ */
+function NamedNodeMap() {
+};
+
+function _findNodeIndex(list,node){
+ var i = list.length;
+ while(i--){
+ if(list[i] === node){return i}
+ }
+}
+
+function _addNamedNode(el,list,newAttr,oldAttr){
+ if(oldAttr){
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
+ }else{
+ list[list.length++] = newAttr;
+ }
+ if(el){
+ newAttr.ownerElement = el;
+ var doc = el.ownerDocument;
+ if(doc){
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
+ _onAddAttribute(doc,el,newAttr);
+ }
+ }
+}
+function _removeNamedNode(el,list,attr){
+ //console.log('remove attr:'+attr)
+ var i = _findNodeIndex(list,attr);
+ if(i>=0){
+ var lastIndex = list.length-1
+ while(i<lastIndex){
+ list[i] = list[++i]
+ }
+ list.length = lastIndex;
+ if(el){
+ var doc = el.ownerDocument;
+ if(doc){
+ _onRemoveAttribute(doc,el,attr);
+ attr.ownerElement = null;
+ }
+ }
+ }else{
+ throw DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))
+ }
+}
+NamedNodeMap.prototype = {
+ length:0,
+ item:NodeList.prototype.item,
+ getNamedItem: function(key) {
+// if(key.indexOf(':')>0 || key == 'xmlns'){
+// return null;
+// }
+ //console.log()
+ var i = this.length;
+ while(i--){
+ var attr = this[i];
+ //console.log(attr.nodeName,key)
+ if(attr.nodeName == key){
+ return attr;
+ }
+ }
+ },
+ setNamedItem: function(attr) {
+ var el = attr.ownerElement;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ var oldAttr = this.getNamedItem(attr.nodeName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ /* returns Node */
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
+ var el = attr.ownerElement, oldAttr;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+
+ /* returns Node */
+ removeNamedItem: function(key) {
+ var attr = this.getNamedItem(key);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+
+
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
+
+ //for level2
+ removeNamedItemNS:function(namespaceURI,localName){
+ var attr = this.getNamedItemNS(namespaceURI,localName);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+ },
+ getNamedItemNS: function(namespaceURI, localName) {
+ var i = this.length;
+ while(i--){
+ var node = this[i];
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
+ return node;
+ }
+ }
+ return null;
+ }
+};
+/**
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490
+ */
+function DOMImplementation(/* Object */ features) {
+ this._features = {};
+ if (features) {
+ for (var feature in features) {
+ this._features = features[feature];
+ }
+ }
+};
+
+DOMImplementation.prototype = {
+ hasFeature: function(/* string */ feature, /* string */ version) {
+ var versions = this._features[feature.toLowerCase()];
+ if (versions && (!version || version in versions)) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ // Introduced in DOM Level 2:
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
+ var doc = new Document();
+ doc.implementation = this;
+ doc.childNodes = new NodeList();
+ doc.doctype = doctype;
+ if(doctype){
+ doc.appendChild(doctype);
+ }
+ if(qualifiedName){
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
+ doc.appendChild(root);
+ }
+ return doc;
+ },
+ // Introduced in DOM Level 2:
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
+ var node = new DocumentType();
+ node.name = qualifiedName;
+ node.nodeName = qualifiedName;
+ node.publicId = publicId;
+ node.systemId = systemId;
+ // Introduced in DOM Level 2:
+ //readonly attribute DOMString internalSubset;
+
+ //TODO:..
+ // readonly attribute NamedNodeMap entities;
+ // readonly attribute NamedNodeMap notations;
+ return node;
+ }
+};
+
+
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
+ */
+
+function Node() {
+};
+
+Node.prototype = {
+ firstChild : null,
+ lastChild : null,
+ previousSibling : null,
+ nextSibling : null,
+ attributes : null,
+ parentNode : null,
+ childNodes : null,
+ ownerDocument : null,
+ nodeValue : null,
+ namespaceURI : null,
+ prefix : null,
+ localName : null,
+ // Modified in DOM Level 2:
+ insertBefore:function(newChild, refChild){//raises
+ return _insertBefore(this,newChild,refChild);
+ },
+ replaceChild:function(newChild, oldChild){//raises
+ this.insertBefore(newChild,oldChild);
+ if(oldChild){
+ this.removeChild(oldChild);
+ }
+ },
+ removeChild:function(oldChild){
+ return _removeChild(this,oldChild);
+ },
+ appendChild:function(newChild){
+ return this.insertBefore(newChild,null);
+ },
+ hasChildNodes:function(){
+ return this.firstChild != null;
+ },
+ cloneNode:function(deep){
+ return cloneNode(this.ownerDocument||this,this,deep);
+ },
+ // Modified in DOM Level 2:
+ normalize:function(){
+ var child = this.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
+ this.removeChild(next);
+ child.appendData(next.data);
+ }else{
+ child.normalize();
+ child = next;
+ }
+ }
+ },
+ // Introduced in DOM Level 2:
+ isSupported:function(feature, version){
+ return this.ownerDocument.implementation.hasFeature(feature,version);
+ },
+ // Introduced in DOM Level 2:
+ hasAttributes:function(){
+ return this.attributes.length>0;
+ },
+ lookupPrefix:function(namespaceURI){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ for(var n in map){
+ if(map[n] == namespaceURI){
+ return n;
+ }
+ }
+ }
+ el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ lookupNamespaceURI:function(prefix){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ if(prefix in map){
+ return map[prefix] ;
+ }
+ }
+ el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ isDefaultNamespace:function(namespaceURI){
+ var prefix = this.lookupPrefix(namespaceURI);
+ return prefix == null;
+ }
+};
+
+
+function _xmlEncoder(c){
+ return c == '<' && '&lt;' ||
+ c == '>' && '&gt;' ||
+ c == '&' && '&amp;' ||
+ c == '"' && '&quot;' ||
+ '&#'+c.charCodeAt()+';'
+}
+
+
+copy(NodeType,Node);
+copy(NodeType,Node.prototype);
+
+/**
+ * @param callback return true for continue,false for break
+ * @return boolean true: break visit;
+ */
+function _visitNode(node,callback){
+ if(callback(node)){
+ return true;
+ }
+ if(node = node.firstChild){
+ do{
+ if(_visitNode(node,callback)){return true}
+ }while(node=node.nextSibling)
+ }
+}
+
+
+
+function Document(){
+}
+function _onAddAttribute(doc,el,newAttr){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
+ }
+}
+function _onRemoveAttribute(doc,el,newAttr,remove){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ delete el._nsMap[newAttr.prefix?newAttr.localName:'']
+ }
+}
+function _onUpdateChild(doc,el,newChild){
+ if(doc && doc._inc){
+ doc._inc++;
+ //update childNodes
+ var cs = el.childNodes;
+ if(newChild){
+ cs[cs.length++] = newChild;
+ }else{
+ //console.log(1)
+ var child = el.firstChild;
+ var i = 0;
+ while(child){
+ cs[i++] = child;
+ child =child.nextSibling;
+ }
+ cs.length = i;
+ }
+ }
+}
+
+/**
+ * attributes;
+ * children;
+ *
+ * writeable properties:
+ * nodeValue,Attr:value,CharacterData:data
+ * prefix
+ */
+function _removeChild(parentNode,child){
+ var previous = child.previousSibling;
+ var next = child.nextSibling;
+ if(previous){
+ previous.nextSibling = next;
+ }else{
+ parentNode.firstChild = next
+ }
+ if(next){
+ next.previousSibling = previous;
+ }else{
+ parentNode.lastChild = previous;
+ }
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
+ return child;
+}
+/**
+ * preformance key(refChild == null)
+ */
+function _insertBefore(parentNode,newChild,nextChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ cp.removeChild(newChild);//remove and update
+ }
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ var newFirst = newChild.firstChild;
+ if (newFirst == null) {
+ return newChild;
+ }
+ var newLast = newChild.lastChild;
+ }else{
+ newFirst = newLast = newChild;
+ }
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
+
+ newFirst.previousSibling = pre;
+ newLast.nextSibling = nextChild;
+
+
+ if(pre){
+ pre.nextSibling = newFirst;
+ }else{
+ parentNode.firstChild = newFirst;
+ }
+ if(nextChild == null){
+ parentNode.lastChild = newLast;
+ }else{
+ nextChild.previousSibling = newLast;
+ }
+ do{
+ newFirst.parentNode = parentNode;
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
+ //console.log(parentNode.lastChild.nextSibling == null)
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
+ newChild.firstChild = newChild.lastChild = null;
+ }
+ return newChild;
+}
+function _appendSingleChild(parentNode,newChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ var pre = parentNode.lastChild;
+ cp.removeChild(newChild);//remove and update
+ var pre = parentNode.lastChild;
+ }
+ var pre = parentNode.lastChild;
+ newChild.parentNode = parentNode;
+ newChild.previousSibling = pre;
+ newChild.nextSibling = null;
+ if(pre){
+ pre.nextSibling = newChild;
+ }else{
+ parentNode.firstChild = newChild;
+ }
+ parentNode.lastChild = newChild;
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
+ return newChild;
+ //console.log("__aa",parentNode.lastChild.nextSibling == null)
+}
+Document.prototype = {
+ //implementation : null,
+ nodeName : '#document',
+ nodeType : DOCUMENT_NODE,
+ doctype : null,
+ documentElement : null,
+ _inc : 1,
+
+ insertBefore : function(newChild, refChild){//raises
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
+ var child = newChild.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ this.insertBefore(child,refChild);
+ child = next;
+ }
+ return newChild;
+ }
+ if(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){
+ this.documentElement = newChild;
+ }
+
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
+ },
+ removeChild : function(oldChild){
+ if(this.documentElement == oldChild){
+ this.documentElement = null;
+ }
+ return _removeChild(this,oldChild);
+ },
+ // Introduced in DOM Level 2:
+ importNode : function(importedNode,deep){
+ return importNode(this,importedNode,deep);
+ },
+ // Introduced in DOM Level 2:
+ getElementById : function(id){
+ var rtv = null;
+ _visitNode(this.documentElement,function(node){
+ if(node.nodeType == ELEMENT_NODE){
+ if(node.getAttribute('id') == id){
+ rtv = node;
+ return true;
+ }
+ }
+ })
+ return rtv;
+ },
+
+ getElementsByClassName: function(className) {
+ var pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
+ return new LiveNodeList(this, function(base) {
+ var ls = [];
+ _visitNode(base.documentElement, function(node) {
+ if(node !== base && node.nodeType == ELEMENT_NODE) {
+ if(pattern.test(node.getAttribute('class'))) {
+ ls.push(node);
+ }
+ }
+ });
+ return ls;
+ });
+ },
+
+ //document factory method:
+ createElement : function(tagName){
+ var node = new Element();
+ node.ownerDocument = this;
+ node.nodeName = tagName;
+ node.tagName = tagName;
+ node.childNodes = new NodeList();
+ var attrs = node.attributes = new NamedNodeMap();
+ attrs._ownerElement = node;
+ return node;
+ },
+ createDocumentFragment : function(){
+ var node = new DocumentFragment();
+ node.ownerDocument = this;
+ node.childNodes = new NodeList();
+ return node;
+ },
+ createTextNode : function(data){
+ var node = new Text();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createComment : function(data){
+ var node = new Comment();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createCDATASection : function(data){
+ var node = new CDATASection();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createProcessingInstruction : function(target,data){
+ var node = new ProcessingInstruction();
+ node.ownerDocument = this;
+ node.tagName = node.target = target;
+ node.nodeValue= node.data = data;
+ return node;
+ },
+ createAttribute : function(name){
+ var node = new Attr();
+ node.ownerDocument = this;
+ node.name = name;
+ node.nodeName = name;
+ node.localName = name;
+ node.specified = true;
+ return node;
+ },
+ createEntityReference : function(name){
+ var node = new EntityReference();
+ node.ownerDocument = this;
+ node.nodeName = name;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createElementNS : function(namespaceURI,qualifiedName){
+ var node = new Element();
+ var pl = qualifiedName.split(':');
+ var attrs = node.attributes = new NamedNodeMap();
+ node.childNodes = new NodeList();
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.tagName = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ attrs._ownerElement = node;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createAttributeNS : function(namespaceURI,qualifiedName){
+ var node = new Attr();
+ var pl = qualifiedName.split(':');
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.name = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ node.specified = true;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ return node;
+ }
+};
+_extends(Document,Node);
+
+
+function Element() {
+ this._nsMap = {};
+};
+Element.prototype = {
+ nodeType : ELEMENT_NODE,
+ hasAttribute : function(name){
+ return this.getAttributeNode(name)!=null;
+ },
+ getAttribute : function(name){
+ var attr = this.getAttributeNode(name);
+ return attr && attr.value || '';
+ },
+ getAttributeNode : function(name){
+ return this.attributes.getNamedItem(name);
+ },
+ setAttribute : function(name, value){
+ var attr = this.ownerDocument.createAttribute(name);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ removeAttribute : function(name){
+ var attr = this.getAttributeNode(name)
+ attr && this.removeAttributeNode(attr);
+ },
+
+ //four real opeartion method
+ appendChild:function(newChild){
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ return this.insertBefore(newChild,null);
+ }else{
+ return _appendSingleChild(this,newChild);
+ }
+ },
+ setAttributeNode : function(newAttr){
+ return this.attributes.setNamedItem(newAttr);
+ },
+ setAttributeNodeNS : function(newAttr){
+ return this.attributes.setNamedItemNS(newAttr);
+ },
+ removeAttributeNode : function(oldAttr){
+ //console.log(this == oldAttr.ownerElement)
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
+ },
+ //get real attribute name,and remove it by removeAttributeNode
+ removeAttributeNS : function(namespaceURI, localName){
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
+ old && this.removeAttributeNode(old);
+ },
+
+ hasAttributeNS : function(namespaceURI, localName){
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
+ },
+ getAttributeNS : function(namespaceURI, localName){
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
+ return attr && attr.value || '';
+ },
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ getAttributeNodeNS : function(namespaceURI, localName){
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
+ },
+
+ getElementsByTagName : function(tagName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ },
+ getElementsByTagNameNS : function(namespaceURI, localName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+
+ });
+ }
+};
+Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
+Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
+
+
+_extends(Element,Node);
+function Attr() {
+};
+Attr.prototype.nodeType = ATTRIBUTE_NODE;
+_extends(Attr,Node);
+
+
+function CharacterData() {
+};
+CharacterData.prototype = {
+ data : '',
+ substringData : function(offset, count) {
+ return this.data.substring(offset, offset+count);
+ },
+ appendData: function(text) {
+ text = this.data+text;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ },
+ insertData: function(offset,text) {
+ this.replaceData(offset,0,text);
+
+ },
+ appendChild:function(newChild){
+ throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])
+ },
+ deleteData: function(offset, count) {
+ this.replaceData(offset,count,"");
+ },
+ replaceData: function(offset, count, text) {
+ var start = this.data.substring(0,offset);
+ var end = this.data.substring(offset+count);
+ text = start + text + end;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ }
+}
+_extends(CharacterData,Node);
+function Text() {
+};
+Text.prototype = {
+ nodeName : "#text",
+ nodeType : TEXT_NODE,
+ splitText : function(offset) {
+ var text = this.data;
+ var newText = text.substring(offset);
+ text = text.substring(0, offset);
+ this.data = this.nodeValue = text;
+ this.length = text.length;
+ var newNode = this.ownerDocument.createTextNode(newText);
+ if(this.parentNode){
+ this.parentNode.insertBefore(newNode, this.nextSibling);
+ }
+ return newNode;
+ }
+}
+_extends(Text,CharacterData);
+function Comment() {
+};
+Comment.prototype = {
+ nodeName : "#comment",
+ nodeType : COMMENT_NODE
+}
+_extends(Comment,CharacterData);
+
+function CDATASection() {
+};
+CDATASection.prototype = {
+ nodeName : "#cdata-section",
+ nodeType : CDATA_SECTION_NODE
+}
+_extends(CDATASection,CharacterData);
+
+
+function DocumentType() {
+};
+DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
+_extends(DocumentType,Node);
+
+function Notation() {
+};
+Notation.prototype.nodeType = NOTATION_NODE;
+_extends(Notation,Node);
+
+function Entity() {
+};
+Entity.prototype.nodeType = ENTITY_NODE;
+_extends(Entity,Node);
+
+function EntityReference() {
+};
+EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
+_extends(EntityReference,Node);
+
+function DocumentFragment() {
+};
+DocumentFragment.prototype.nodeName = "#document-fragment";
+DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
+_extends(DocumentFragment,Node);
+
+
+function ProcessingInstruction() {
+}
+ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
+_extends(ProcessingInstruction,Node);
+function XMLSerializer(){}
+XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){
+ return nodeSerializeToString.call(node,isHtml,nodeFilter);
+}
+Node.prototype.toString = nodeSerializeToString;
+function nodeSerializeToString(isHtml,nodeFilter){
+ var buf = [];
+ var refNode = this.nodeType == 9 && this.documentElement || this;
+ var prefix = refNode.prefix;
+ var uri = refNode.namespaceURI;
+
+ if(uri && prefix == null){
+ //console.log(prefix)
+ var prefix = refNode.lookupPrefix(uri);
+ if(prefix == null){
+ //isHTML = true;
+ var visibleNamespaces=[
+ {namespace:uri,prefix:null}
+ //{namespace:uri,prefix:''}
+ ]
+ }
+ }
+ serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
+ //console.log('###',this.nodeType,uri,prefix,buf.join(''))
+ return buf.join('');
+}
+function needNamespaceDefine(node,isHTML, visibleNamespaces) {
+ var prefix = node.prefix||'';
+ var uri = node.namespaceURI;
+ if (!prefix && !uri){
+ return false;
+ }
+ if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace"
+ || uri == 'http://www.w3.org/2000/xmlns/'){
+ return false;
+ }
+
+ var i = visibleNamespaces.length
+ //console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces)
+ while (i--) {
+ var ns = visibleNamespaces[i];
+ // get namespace prefix
+ //console.log(node.nodeType,node.tagName,ns.prefix,prefix)
+ if (ns.prefix == prefix){
+ return ns.namespace != uri;
+ }
+ }
+ //console.log(isHTML,uri,prefix=='')
+ //if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){
+ // return false;
+ //}
+ //node.flag = '11111'
+ //console.error(3,true,node.flag,node.prefix,node.namespaceURI)
+ return true;
+}
+function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
+ if(nodeFilter){
+ node = nodeFilter(node);
+ if(node){
+ if(typeof node == 'string'){
+ buf.push(node);
+ return;
+ }
+ }else{
+ return;
+ }
+ //buf.sort.apply(attrs, attributeSorter);
+ }
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ if (!visibleNamespaces) visibleNamespaces = [];
+ var startVisibleNamespaces = visibleNamespaces.length;
+ var attrs = node.attributes;
+ var len = attrs.length;
+ var child = node.firstChild;
+ var nodeName = node.tagName;
+
+ isHTML = (htmlns === node.namespaceURI) ||isHTML
+ buf.push('<',nodeName);
+
+
+
+ for(var i=0;i<len;i++){
+ // add namespaces for attributes
+ var attr = attrs.item(i);
+ if (attr.prefix == 'xmlns') {
+ visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });
+ }else if(attr.nodeName == 'xmlns'){
+ visibleNamespaces.push({ prefix: '', namespace: attr.value });
+ }
+ }
+ for(var i=0;i<len;i++){
+ var attr = attrs.item(i);
+ if (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {
+ var prefix = attr.prefix||'';
+ var uri = attr.namespaceURI;
+ var ns = prefix ? ' xmlns:' + prefix : " xmlns";
+ buf.push(ns, '="' , uri , '"');
+ visibleNamespaces.push({ prefix: prefix, namespace:uri });
+ }
+ serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
+ }
+ // add namespace for current node
+ if (needNamespaceDefine(node,isHTML, visibleNamespaces)) {
+ var prefix = node.prefix||'';
+ var uri = node.namespaceURI;
+ if (uri) {
+ // Avoid empty namespace value like xmlns:ds=""
+ // Empty namespace URL will we produce an invalid XML document
+ var ns = prefix ? ' xmlns:' + prefix : " xmlns";
+ buf.push(ns, '="' , uri , '"');
+ visibleNamespaces.push({ prefix: prefix, namespace:uri });
+ }
+ }
+
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){
+ buf.push('>');
+ //if is cdata child node
+ if(isHTML && /^script$/i.test(nodeName)){
+ while(child){
+ if(child.data){
+ buf.push(child.data);
+ }else{
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ }
+ child = child.nextSibling;
+ }
+ }else
+ {
+ while(child){
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ child = child.nextSibling;
+ }
+ }
+ buf.push('</',nodeName,'>');
+ }else{
+ buf.push('/>');
+ }
+ // remove added visible namespaces
+ //visibleNamespaces.length = startVisibleNamespaces;
+ return;
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var child = node.firstChild;
+ while(child){
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ child = child.nextSibling;
+ }
+ return;
+ case ATTRIBUTE_NODE:
+ /**
+ * Well-formedness constraint: No < in Attribute Values
+ * The replacement text of any entity referred to directly or indirectly in an attribute value must not contain a <.
+ * @see https://www.w3.org/TR/xml/#CleanAttrVals
+ * @see https://www.w3.org/TR/xml/#NT-AttValue
+ */
+ return buf.push(' ', node.name, '="', node.value.replace(/[<&"]/g,_xmlEncoder), '"');
+ case TEXT_NODE:
+ /**
+ * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
+ * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
+ * If they are needed elsewhere, they must be escaped using either numeric character references or the strings
+ * `&amp;` and `&lt;` respectively.
+ * The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility,
+ * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,
+ * when that string is not marking the end of a CDATA section.
+ *
+ * In the content of elements, character data is any string of characters
+ * which does not contain the start-delimiter of any markup
+ * and does not include the CDATA-section-close delimiter, `]]>`.
+ *
+ * @see https://www.w3.org/TR/xml/#NT-CharData
+ */
+ return buf.push(node.data
+ .replace(/[<&]/g,_xmlEncoder)
+ .replace(/]]>/g, ']]&gt;')
+ );
+ case CDATA_SECTION_NODE:
+ return buf.push( '<![CDATA[',node.data,']]>');
+ case COMMENT_NODE:
+ return buf.push( "<!--",node.data,"-->");
+ case DOCUMENT_TYPE_NODE:
+ var pubid = node.publicId;
+ var sysid = node.systemId;
+ buf.push('<!DOCTYPE ',node.name);
+ if(pubid){
+ buf.push(' PUBLIC ', pubid);
+ if (sysid && sysid!='.') {
+ buf.push(' ', sysid);
+ }
+ buf.push('>');
+ }else if(sysid && sysid!='.'){
+ buf.push(' SYSTEM ', sysid, '>');
+ }else{
+ var sub = node.internalSubset;
+ if(sub){
+ buf.push(" [",sub,"]");
+ }
+ buf.push(">");
+ }
+ return;
+ case PROCESSING_INSTRUCTION_NODE:
+ return buf.push( "<?",node.target," ",node.data,"?>");
+ case ENTITY_REFERENCE_NODE:
+ return buf.push( '&',node.nodeName,';');
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ default:
+ buf.push('??',node.nodeName);
+ }
+}
+function importNode(doc,node,deep){
+ var node2;
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ node2 = node.cloneNode(false);
+ node2.ownerDocument = doc;
+ //var attrs = node2.attributes;
+ //var len = attrs.length;
+ //for(var i=0;i<len;i++){
+ //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
+ //}
+ case DOCUMENT_FRAGMENT_NODE:
+ break;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ break;
+ //case ENTITY_REFERENCE_NODE:
+ //case PROCESSING_INSTRUCTION_NODE:
+ ////case TEXT_NODE:
+ //case CDATA_SECTION_NODE:
+ //case COMMENT_NODE:
+ // deep = false;
+ // break;
+ //case DOCUMENT_NODE:
+ //case DOCUMENT_TYPE_NODE:
+ //cannot be imported.
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ //can not hit in level3
+ //default:throw e;
+ }
+ if(!node2){
+ node2 = node.cloneNode(false);//false
+ }
+ node2.ownerDocument = doc;
+ node2.parentNode = null;
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(importNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+//
+//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
+// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
+function cloneNode(doc,node,deep){
+ var node2 = new node.constructor();
+ for(var n in node){
+ var v = node[n];
+ if(typeof v != 'object' ){
+ if(v != node2[n]){
+ node2[n] = v;
+ }
+ }
+ }
+ if(node.childNodes){
+ node2.childNodes = new NodeList();
+ }
+ node2.ownerDocument = doc;
+ switch (node2.nodeType) {
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var attrs2 = node2.attributes = new NamedNodeMap();
+ var len = attrs.length
+ attrs2._ownerElement = node2;
+ for(var i=0;i<len;i++){
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
+ }
+ break;;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ }
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(cloneNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+
+function __set__(object,key,value){
+ object[key] = value
+}
+//do dynamic
+try{
+ if(Object.defineProperty){
+ Object.defineProperty(LiveNodeList.prototype,'length',{
+ get:function(){
+ _updateLiveList(this);
+ return this.$$length;
+ }
+ });
+ Object.defineProperty(Node.prototype,'textContent',{
+ get:function(){
+ return getTextContent(this);
+ },
+ set:function(data){
+ switch(this.nodeType){
+ case ELEMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ while(this.firstChild){
+ this.removeChild(this.firstChild);
+ }
+ if(data || String(data)){
+ this.appendChild(this.ownerDocument.createTextNode(data));
+ }
+ break;
+ default:
+ //TODO:
+ this.data = data;
+ this.value = data;
+ this.nodeValue = data;
+ }
+ }
+ })
+
+ function getTextContent(node){
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var buf = [];
+ node = node.firstChild;
+ while(node){
+ if(node.nodeType!==7 && node.nodeType !==8){
+ buf.push(getTextContent(node));
+ }
+ node = node.nextSibling;
+ }
+ return buf.join('');
+ default:
+ return node.nodeValue;
+ }
+ }
+ __set__ = function(object,key,value){
+ //console.log(value)
+ object['$$'+key] = value
+ }
+ }
+}catch(e){//ie8
+}
+
+//if(typeof require == 'function'){
+ exports.Node = Node;
+ exports.DOMException = DOMException;
+ exports.DOMImplementation = DOMImplementation;
+ exports.XMLSerializer = XMLSerializer;
+//}
+
+},{}],6:[function(require,module,exports){
+exports.entityMap = {
+ lt: '<',
+ gt: '>',
+ amp: '&',
+ quot: '"',
+ apos: "'",
+ Agrave: "À",
+ Aacute: "Á",
+ Acirc: "Â",
+ Atilde: "Ã",
+ Auml: "Ä",
+ Aring: "Å",
+ AElig: "Æ",
+ Ccedil: "Ç",
+ Egrave: "È",
+ Eacute: "É",
+ Ecirc: "Ê",
+ Euml: "Ë",
+ Igrave: "Ì",
+ Iacute: "Í",
+ Icirc: "Î",
+ Iuml: "Ï",
+ ETH: "Ð",
+ Ntilde: "Ñ",
+ Ograve: "Ò",
+ Oacute: "Ó",
+ Ocirc: "Ô",
+ Otilde: "Õ",
+ Ouml: "Ö",
+ Oslash: "Ø",
+ Ugrave: "Ù",
+ Uacute: "Ú",
+ Ucirc: "Û",
+ Uuml: "Ü",
+ Yacute: "Ý",
+ THORN: "Þ",
+ szlig: "ß",
+ agrave: "à",
+ aacute: "á",
+ acirc: "â",
+ atilde: "ã",
+ auml: "ä",
+ aring: "å",
+ aelig: "æ",
+ ccedil: "ç",
+ egrave: "è",
+ eacute: "é",
+ ecirc: "ê",
+ euml: "ë",
+ igrave: "ì",
+ iacute: "í",
+ icirc: "î",
+ iuml: "ï",
+ eth: "ð",
+ ntilde: "ñ",
+ ograve: "ò",
+ oacute: "ó",
+ ocirc: "ô",
+ otilde: "õ",
+ ouml: "ö",
+ oslash: "ø",
+ ugrave: "ù",
+ uacute: "ú",
+ ucirc: "û",
+ uuml: "ü",
+ yacute: "ý",
+ thorn: "þ",
+ yuml: "ÿ",
+ nbsp: "\u00a0",
+ iexcl: "¡",
+ cent: "¢",
+ pound: "£",
+ curren: "¤",
+ yen: "¥",
+ brvbar: "¦",
+ sect: "§",
+ uml: "¨",
+ copy: "©",
+ ordf: "ª",
+ laquo: "«",
+ not: "¬",
+ shy: "­­",
+ reg: "®",
+ macr: "¯",
+ deg: "°",
+ plusmn: "±",
+ sup2: "²",
+ sup3: "³",
+ acute: "´",
+ micro: "µ",
+ para: "¶",
+ middot: "·",
+ cedil: "¸",
+ sup1: "¹",
+ ordm: "º",
+ raquo: "»",
+ frac14: "¼",
+ frac12: "½",
+ frac34: "¾",
+ iquest: "¿",
+ times: "×",
+ divide: "÷",
+ forall: "∀",
+ part: "∂",
+ exist: "∃",
+ empty: "∅",
+ nabla: "∇",
+ isin: "∈",
+ notin: "∉",
+ ni: "∋",
+ prod: "∏",
+ sum: "∑",
+ minus: "−",
+ lowast: "∗",
+ radic: "√",
+ prop: "∝",
+ infin: "∞",
+ ang: "∠",
+ and: "∧",
+ or: "∨",
+ cap: "∩",
+ cup: "∪",
+ 'int': "∫",
+ there4: "∴",
+ sim: "∼",
+ cong: "≅",
+ asymp: "≈",
+ ne: "≠",
+ equiv: "≡",
+ le: "≤",
+ ge: "≥",
+ sub: "⊂",
+ sup: "⊃",
+ nsub: "⊄",
+ sube: "⊆",
+ supe: "⊇",
+ oplus: "⊕",
+ otimes: "⊗",
+ perp: "⊥",
+ sdot: "⋅",
+ Alpha: "Α",
+ Beta: "Β",
+ Gamma: "Γ",
+ Delta: "Δ",
+ Epsilon: "Ε",
+ Zeta: "Ζ",
+ Eta: "Η",
+ Theta: "Θ",
+ Iota: "Ι",
+ Kappa: "Κ",
+ Lambda: "Λ",
+ Mu: "Μ",
+ Nu: "Ν",
+ Xi: "Ξ",
+ Omicron: "Ο",
+ Pi: "Π",
+ Rho: "Ρ",
+ Sigma: "Σ",
+ Tau: "Τ",
+ Upsilon: "Υ",
+ Phi: "Φ",
+ Chi: "Χ",
+ Psi: "Ψ",
+ Omega: "Ω",
+ alpha: "α",
+ beta: "β",
+ gamma: "γ",
+ delta: "δ",
+ epsilon: "ε",
+ zeta: "ζ",
+ eta: "η",
+ theta: "θ",
+ iota: "ι",
+ kappa: "κ",
+ lambda: "λ",
+ mu: "μ",
+ nu: "ν",
+ xi: "ξ",
+ omicron: "ο",
+ pi: "π",
+ rho: "ρ",
+ sigmaf: "ς",
+ sigma: "σ",
+ tau: "τ",
+ upsilon: "υ",
+ phi: "φ",
+ chi: "χ",
+ psi: "ψ",
+ omega: "ω",
+ thetasym: "ϑ",
+ upsih: "ϒ",
+ piv: "ϖ",
+ OElig: "Œ",
+ oelig: "œ",
+ Scaron: "Š",
+ scaron: "š",
+ Yuml: "Ÿ",
+ fnof: "ƒ",
+ circ: "ˆ",
+ tilde: "˜",
+ ensp: " ",
+ emsp: " ",
+ thinsp: " ",
+ zwnj: "‌",
+ zwj: "‍",
+ lrm: "‎",
+ rlm: "‏",
+ ndash: "–",
+ mdash: "—",
+ lsquo: "‘",
+ rsquo: "’",
+ sbquo: "‚",
+ ldquo: "“",
+ rdquo: "”",
+ bdquo: "„",
+ dagger: "†",
+ Dagger: "‡",
+ bull: "•",
+ hellip: "…",
+ permil: "‰",
+ prime: "′",
+ Prime: "″",
+ lsaquo: "‹",
+ rsaquo: "›",
+ oline: "‾",
+ euro: "€",
+ trade: "™",
+ larr: "←",
+ uarr: "↑",
+ rarr: "→",
+ darr: "↓",
+ harr: "↔",
+ crarr: "↵",
+ lceil: "⌈",
+ rceil: "⌉",
+ lfloor: "⌊",
+ rfloor: "⌋",
+ loz: "◊",
+ spades: "♠",
+ clubs: "♣",
+ hearts: "♥",
+ diams: "♦"
+};
+
+},{}],7:[function(require,module,exports){
+//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
+//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
+//[5] Name ::= NameStartChar (NameChar)*
+var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
+var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
+var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
+//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
+//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
+
+//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
+//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
+var S_TAG = 0;//tag name offerring
+var S_ATTR = 1;//attr name offerring
+var S_ATTR_SPACE=2;//attr name end and space offer
+var S_EQ = 3;//=space?
+var S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)
+var S_ATTR_END = 5;//attr value end and no space(quot end)
+var S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)
+var S_TAG_CLOSE = 7;//closed el<el />
+
+/**
+ * Creates an error that will not be caught by XMLReader aka the SAX parser.
+ *
+ * @param {string} message
+ * @param {any?} locator Optional, can provide details about the location in the source
+ * @constructor
+ */
+function ParseError(message, locator) {
+ this.message = message
+ this.locator = locator
+ if(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);
+}
+ParseError.prototype = new Error();
+ParseError.prototype.name = ParseError.name
+
+function XMLReader(){
+
+}
+
+XMLReader.prototype = {
+ parse:function(source,defaultNSMap,entityMap){
+ var domBuilder = this.domBuilder;
+ domBuilder.startDocument();
+ _copy(defaultNSMap ,defaultNSMap = {})
+ parse(source,defaultNSMap,entityMap,
+ domBuilder,this.errorHandler);
+ domBuilder.endDocument();
+ }
+}
+function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
+ function fixedFromCharCode(code) {
+ // String.prototype.fromCharCode does not supports
+ // > 2 bytes unicode chars directly
+ if (code > 0xffff) {
+ code -= 0x10000;
+ var surrogate1 = 0xd800 + (code >> 10)
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
+
+ return String.fromCharCode(surrogate1, surrogate2);
+ } else {
+ return String.fromCharCode(code);
+ }
+ }
+ function entityReplacer(a){
+ var k = a.slice(1,-1);
+ if(k in entityMap){
+ return entityMap[k];
+ }else if(k.charAt(0) === '#'){
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
+ }else{
+ errorHandler.error('entity not found:'+a);
+ return a;
+ }
+ }
+ function appendText(end){//has some bugs
+ if(end>start){
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
+ locator&&position(start);
+ domBuilder.characters(xt,0,end-start);
+ start = end
+ }
+ }
+ function position(p,m){
+ while(p>=lineEnd && (m = linePattern.exec(source))){
+ lineStart = m.index;
+ lineEnd = lineStart + m[0].length;
+ locator.lineNumber++;
+ //console.log('line++:',locator,startPos,endPos)
+ }
+ locator.columnNumber = p-lineStart+1;
+ }
+ var lineStart = 0;
+ var lineEnd = 0;
+ var linePattern = /.*(?:\r\n?|\n)|.*$/g
+ var locator = domBuilder.locator;
+
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
+ var closeMap = {};
+ var start = 0;
+ while(true){
+ try{
+ var tagStart = source.indexOf('<',start);
+ if(tagStart<0){
+ if(!source.substr(start).match(/^\s*$/)){
+ var doc = domBuilder.doc;
+ var text = doc.createTextNode(source.substr(start));
+ doc.appendChild(text);
+ domBuilder.currentElement = text;
+ }
+ return;
+ }
+ if(tagStart>start){
+ appendText(tagStart);
+ }
+ switch(source.charAt(tagStart+1)){
+ case '/':
+ var end = source.indexOf('>',tagStart+3);
+ var tagName = source.substring(tagStart+2,end);
+ var config = parseStack.pop();
+ if(end<0){
+
+ tagName = source.substring(tagStart+2).replace(/[\s<].*/,'');
+ errorHandler.error("end tag name: "+tagName+' is not complete:'+config.tagName);
+ end = tagStart+1+tagName.length;
+ }else if(tagName.match(/\s</)){
+ tagName = tagName.replace(/[\s<].*/,'');
+ errorHandler.error("end tag name: "+tagName+' maybe not complete');
+ end = tagStart+1+tagName.length;
+ }
+ var localNSMap = config.localNSMap;
+ var endMatch = config.tagName == tagName;
+ var endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()
+ if(endIgnoreCaseMach){
+ domBuilder.endElement(config.uri,config.localName,tagName);
+ if(localNSMap){
+ for(var prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix) ;
+ }
+ }
+ if(!endMatch){
+ errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); // No known test case
+ }
+ }else{
+ parseStack.push(config)
+ }
+
+ end++;
+ break;
+ // end elment
+ case '?':// <?...?>
+ locator&&position(tagStart);
+ end = parseInstruction(source,tagStart,domBuilder);
+ break;
+ case '!':// <!doctype,<![CDATA,<!--
+ locator&&position(tagStart);
+ end = parseDCC(source,tagStart,domBuilder,errorHandler);
+ break;
+ default:
+ locator&&position(tagStart);
+ var el = new ElementAttributes();
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ //elStartEnd
+ var end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);
+ var len = el.length;
+
+
+ if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
+ el.closed = true;
+ if(!entityMap.nbsp){
+ errorHandler.warning('unclosed xml attribute');
+ }
+ }
+ if(locator && len){
+ var locator2 = copyLocator(locator,{});
+ //try{//attribute position fixed
+ for(var i = 0;i<len;i++){
+ var a = el[i];
+ position(a.offset);
+ a.locator = copyLocator(locator,{});
+ }
+ domBuilder.locator = locator2
+ if(appendElement(el,domBuilder,currentNSMap)){
+ parseStack.push(el)
+ }
+ domBuilder.locator = locator;
+ }else{
+ if(appendElement(el,domBuilder,currentNSMap)){
+ parseStack.push(el)
+ }
+ }
+
+
+
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
+ }else{
+ end++;
+ }
+ }
+ }catch(e){
+ if (e instanceof ParseError) {
+ throw e;
+ }
+ errorHandler.error('element parse error: '+e)
+ end = -1;
+ }
+ if(end>start){
+ start = end;
+ }else{
+ //TODO: 这里有可能sax回退,有位置错误风险
+ appendText(Math.max(tagStart,start)+1);
+ }
+ }
+}
+function copyLocator(f,t){
+ t.lineNumber = f.lineNumber;
+ t.columnNumber = f.columnNumber;
+ return t;
+}
+
+/**
+ * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);
+ * @return end of the elementStartPart(end of elementEndPart for selfClosed el)
+ */
+function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){
+
+ /**
+ * @param {string} qname
+ * @param {string} value
+ * @param {number} startIndex
+ */
+ function addAttribute(qname, value, startIndex) {
+ if (qname in el.attributeNames) errorHandler.fatalError('Attribute ' + qname + ' redefined')
+ el.addValue(qname, value, startIndex)
+ }
+ var attrName;
+ var value;
+ var p = ++start;
+ var s = S_TAG;//status
+ while(true){
+ var c = source.charAt(p);
+ switch(c){
+ case '=':
+ if(s === S_ATTR){//attrName
+ attrName = source.slice(start,p);
+ s = S_EQ;
+ }else if(s === S_ATTR_SPACE){
+ s = S_EQ;
+ }else{
+ //fatalError: equal must after attrName or space after attrName
+ throw new Error('attribute equal must after attrName'); // No known test case
+ }
+ break;
+ case '\'':
+ case '"':
+ if(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE
+ ){//equal
+ if(s === S_ATTR){
+ errorHandler.warning('attribute value must after "="')
+ attrName = source.slice(start,p)
+ }
+ start = p+1;
+ p = source.indexOf(c,start)
+ if(p>0){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ addAttribute(attrName, value, start-1);
+ s = S_ATTR_END;
+ }else{
+ //fatalError: no end quot match
+ throw new Error('attribute value no end \''+c+'\' match');
+ }
+ }else if(s == S_ATTR_NOQUOT_VALUE){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ //console.log(attrName,value,start,p)
+ addAttribute(attrName, value, start);
+ //console.dir(el)
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
+ start = p+1;
+ s = S_ATTR_END
+ }else{
+ //fatalError: no equal before
+ throw new Error('attribute value must after "="'); // No known test case
+ }
+ break;
+ case '/':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_ATTR_END:
+ case S_TAG_SPACE:
+ case S_TAG_CLOSE:
+ s =S_TAG_CLOSE;
+ el.closed = true;
+ case S_ATTR_NOQUOT_VALUE:
+ case S_ATTR:
+ case S_ATTR_SPACE:
+ break;
+ //case S_EQ:
+ default:
+ throw new Error("attribute invalid close char('/')") // No known test case
+ }
+ break;
+ case ''://end document
+ errorHandler.error('unexpected end of input');
+ if(s == S_TAG){
+ el.setTagName(source.slice(start,p));
+ }
+ return p;
+ case '>':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_ATTR_END:
+ case S_TAG_SPACE:
+ case S_TAG_CLOSE:
+ break;//normal
+ case S_ATTR_NOQUOT_VALUE://Compatible state
+ case S_ATTR:
+ value = source.slice(start,p);
+ if(value.slice(-1) === '/'){
+ el.closed = true;
+ value = value.slice(0,-1)
+ }
+ case S_ATTR_SPACE:
+ if(s === S_ATTR_SPACE){
+ value = attrName;
+ }
+ if(s == S_ATTR_NOQUOT_VALUE){
+ errorHandler.warning('attribute "'+value+'" missed quot(")!');
+ addAttribute(attrName, value.replace(/&#?\w+;/g,entityReplacer), start)
+ }else{
+ if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
+ }
+ addAttribute(value, value, start)
+ }
+ break;
+ case S_EQ:
+ throw new Error('attribute value missed!!');
+ }
+// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName))
+ return p;
+ /*xml space '\x20' | #x9 | #xD | #xA; */
+ case '\u0080':
+ c = ' ';
+ default:
+ if(c<= ' '){//space
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));//tagName
+ s = S_TAG_SPACE;
+ break;
+ case S_ATTR:
+ attrName = source.slice(start,p)
+ s = S_ATTR_SPACE;
+ break;
+ case S_ATTR_NOQUOT_VALUE:
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ addAttribute(attrName, value, start)
+ case S_ATTR_END:
+ s = S_TAG_SPACE;
+ break;
+ //case S_TAG_SPACE:
+ //case S_EQ:
+ //case S_ATTR_SPACE:
+ // void();break;
+ //case S_TAG_CLOSE:
+ //ignore warning
+ }
+ }else{//not space
+//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
+//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
+ switch(s){
+ //case S_TAG:void();break;
+ //case S_ATTR:void();break;
+ //case S_ATTR_NOQUOT_VALUE:void();break;
+ case S_ATTR_SPACE:
+ var tagName = el.tagName;
+ if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!')
+ }
+ addAttribute(attrName, attrName, start);
+ start = p;
+ s = S_ATTR;
+ break;
+ case S_ATTR_END:
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
+ case S_TAG_SPACE:
+ s = S_ATTR;
+ start = p;
+ break;
+ case S_EQ:
+ s = S_ATTR_NOQUOT_VALUE;
+ start = p;
+ break;
+ case S_TAG_CLOSE:
+ throw new Error("elements closed character '/' and '>' must be connected to");
+ }
+ }
+ }//end outer switch
+ //console.log('p++',p)
+ p++;
+ }
+}
+/**
+ * @return true if has new namespace define
+ */
+function appendElement(el,domBuilder,currentNSMap){
+ var tagName = el.tagName;
+ var localNSMap = null;
+ //var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ var i = el.length;
+ while(i--){
+ var a = el[i];
+ var qName = a.qName;
+ var value = a.value;
+ var nsp = qName.indexOf(':');
+ if(nsp>0){
+ var prefix = a.prefix = qName.slice(0,nsp);
+ var localName = qName.slice(nsp+1);
+ var nsPrefix = prefix === 'xmlns' && localName
+ }else{
+ localName = qName;
+ prefix = null
+ nsPrefix = qName === 'xmlns' && ''
+ }
+ //can not set prefix,because prefix !== ''
+ a.localName = localName ;
+ //prefix == null for no ns prefix attribute
+ if(nsPrefix !== false){//hack!!
+ if(localNSMap == null){
+ localNSMap = {}
+ //console.log(currentNSMap,0)
+ _copy(currentNSMap,currentNSMap={})
+ //console.log(currentNSMap,1)
+ }
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
+ a.uri = 'http://www.w3.org/2000/xmlns/'
+ domBuilder.startPrefixMapping(nsPrefix, value)
+ }
+ }
+ var i = el.length;
+ while(i--){
+ a = el[i];
+ var prefix = a.prefix;
+ if(prefix){//no prefix attribute has no namespace
+ if(prefix === 'xml'){
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
+ }if(prefix !== 'xmlns'){
+ a.uri = currentNSMap[prefix || '']
+
+ //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}
+ }
+ }
+ }
+ var nsp = tagName.indexOf(':');
+ if(nsp>0){
+ prefix = el.prefix = tagName.slice(0,nsp);
+ localName = el.localName = tagName.slice(nsp+1);
+ }else{
+ prefix = null;//important!!
+ localName = el.localName = tagName;
+ }
+ //no prefix element has default namespace
+ var ns = el.uri = currentNSMap[prefix || ''];
+ domBuilder.startElement(ns,localName,tagName,el);
+ //endPrefixMapping and startPrefixMapping have not any help for dom builder
+ //localNSMap = null
+ if(el.closed){
+ domBuilder.endElement(ns,localName,tagName);
+ if(localNSMap){
+ for(prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix)
+ }
+ }
+ }else{
+ el.currentNSMap = currentNSMap;
+ el.localNSMap = localNSMap;
+ //parseStack.push(el);
+ return true;
+ }
+}
+function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
+ if(/^(?:script|textarea)$/i.test(tagName)){
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
+ var text = source.substring(elStartEnd+1,elEndStart);
+ if(/[&<]/.test(text)){
+ if(/^script$/i.test(tagName)){
+ //if(!/\]\]>/.test(text)){
+ //lexHandler.startCDATA();
+ domBuilder.characters(text,0,text.length);
+ //lexHandler.endCDATA();
+ return elEndStart;
+ //}
+ }//}else{//text area
+ text = text.replace(/&#?\w+;/g,entityReplacer);
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+ //}
+
+ }
+ }
+ return elStartEnd+1;
+}
+function fixSelfClosed(source,elStartEnd,tagName,closeMap){
+ //if(tagName in closeMap){
+ var pos = closeMap[tagName];
+ if(pos == null){
+ //console.log(tagName)
+ pos = source.lastIndexOf('</'+tagName+'>')
+ if(pos<elStartEnd){//忘记闭合
+ pos = source.lastIndexOf('</'+tagName)
+ }
+ closeMap[tagName] =pos
+ }
+ return pos<elStartEnd;
+ //}
+}
+function _copy(source,target){
+ for(var n in source){target[n] = source[n]}
+}
+function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
+ var next= source.charAt(start+2)
+ switch(next){
+ case '-':
+ if(source.charAt(start + 3) === '-'){
+ var end = source.indexOf('-->',start+4);
+ //append comment source.substring(4,end)//<!--
+ if(end>start){
+ domBuilder.comment(source,start+4,end-start-4);
+ return end+3;
+ }else{
+ errorHandler.error("Unclosed comment");
+ return -1;
+ }
+ }else{
+ //error
+ return -1;
+ }
+ default:
+ if(source.substr(start+3,6) == 'CDATA['){
+ var end = source.indexOf(']]>',start+9);
+ domBuilder.startCDATA();
+ domBuilder.characters(source,start+9,end-start-9);
+ domBuilder.endCDATA()
+ return end+3;
+ }
+ //<!DOCTYPE
+ //startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
+ var matchs = split(source,start);
+ var len = matchs.length;
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
+ var name = matchs[1][0];
+ var pubid = false;
+ var sysid = false;
+ if(len>3){
+ if(/^public$/i.test(matchs[2][0])){
+ pubid = matchs[3][0];
+ sysid = len>4 && matchs[4][0];
+ }else if(/^system$/i.test(matchs[2][0])){
+ sysid = matchs[3][0];
+ }
+ }
+ var lastMatch = matchs[len-1]
+ domBuilder.startDTD(name, pubid, sysid);
+ domBuilder.endDTD();
+
+ return lastMatch.index+lastMatch[0].length
+ }
+ }
+ return -1;
+}
+
+
+
+function parseInstruction(source,start,domBuilder){
+ var end = source.indexOf('?>',start);
+ if(end){
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
+ if(match){
+ var len = match[0].length;
+ domBuilder.processingInstruction(match[1], match[2]) ;
+ return end+2;
+ }else{//error
+ return -1;
+ }
+ }
+ return -1;
+}
+
+function ElementAttributes(){
+ this.attributeNames = {}
+}
+ElementAttributes.prototype = {
+ setTagName:function(tagName){
+ if(!tagNamePattern.test(tagName)){
+ throw new Error('invalid tagName:'+tagName)
+ }
+ this.tagName = tagName
+ },
+ addValue:function(qName, value, offset) {
+ if(!tagNamePattern.test(qName)){
+ throw new Error('invalid attribute:'+qName)
+ }
+ this.attributeNames[qName] = this.length;
+ this[this.length++] = {qName:qName,value:value,offset:offset}
+ },
+ length:0,
+ getLocalName:function(i){return this[i].localName},
+ getLocator:function(i){return this[i].locator},
+ getQName:function(i){return this[i].qName},
+ getURI:function(i){return this[i].uri},
+ getValue:function(i){return this[i].value}
+// ,getIndex:function(uri, localName)){
+// if(localName){
+//
+// }else{
+// var qName = uri
+// }
+// },
+// getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},
+// getType:function(uri,localName){}
+// getType:function(i){},
+}
+
+
+
+function split(source,start){
+ var match;
+ var buf = [];
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
+ reg.lastIndex = start;
+ reg.exec(source);//skip <
+ while(match = reg.exec(source)){
+ buf.push(match);
+ if(match[1])return buf;
+ }
+}
+
+exports.XMLReader = XMLReader;
+exports.ParseError = ParseError;
+
+},{}],8:[function(require,module,exports){
+'use strict'
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+ var len = b64.length
+
+ if (len % 4 > 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('')
+}
+
+},{}],9:[function(require,module,exports){
+(function (Buffer){(function (){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+/* eslint-disable no-proto */
+
+'use strict'
+
+var base64 = require('base64-js')
+var ieee754 = require('ieee754')
+
+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)
+ arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }
+ 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)
+ buf.__proto__ = 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)
+}
+
+// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
+if (typeof Symbol !== 'undefined' && Symbol.species != null &&
+ Buffer[Symbol.species] === Buffer) {
+ Object.defineProperty(Buffer, Symbol.species, {
+ value: null,
+ configurable: true,
+ enumerable: false,
+ writable: false
+ })
+}
+
+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 fromArrayLike(value)
+ }
+
+ if (value == null) {
+ throw 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 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
+Buffer.prototype.__proto__ = Uint8Array.prototype
+Buffer.__proto__ = 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 interpretted 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 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
+ buf.__proto__ = 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)) {
+ buf = Buffer.from(buf)
+ }
+ if (!Buffer.isBuffer(buf)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+ 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 coersion 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 '<Buffer ' + str + '>'
+}
+
+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 latin1Write (buf, string, offset, length) {
+ return asciiWrite(buf, string, 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':
+ return asciiWrite(this, string, offset, length)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Write(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 += toHex(buf[i])
+ }
+ return out
+}
+
+function utf16leSlice (buf, start, end) {
+ var bytes = buf.slice(start, end)
+ var res = ''
+ for (var i = 0; i < bytes.length; 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
+ newBuf.__proto__ = 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 = 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 = 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 = function readUInt8 (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+}
+
+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 = function readUInt16BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+}
+
+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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 if (this === target && start < targetStart && targetStart < end) {
+ // descending copy from end
+ for (var i = len - 1; i >= 0; --i) {
+ target[i + targetStart] = this[i + start]
+ }
+ } 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
+ }
+
+ // 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 toHex (n) {
+ if (n < 16) return '0' + n.toString(16)
+ return n.toString(16)
+}
+
+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
+}
+
+}).call(this)}).call(this,require("buffer").Buffer)
+},{"base64-js":8,"buffer":9,"ieee754":10}],10:[function(require,module,exports){
+/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = ((value * c) - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
+
+},{}],11:[function(require,module,exports){
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+
+// The _isBuffer check is for Safari 5-7 support, because it's missing
+// Object.prototype.constructor. Remove this eventually
+module.exports = function (obj) {
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
+}
+
+function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+}
+
+// For Node v0.10 support. Remove this eventually.
+function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+}
+
+},{}],12:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Disconnected: 1,
+ Preceding: 2,
+ Following: 4,
+ Contains: 8,
+ ContainedBy: 16,
+ ImplementationSpecific: 32
+ };
+
+}).call(this);
+
+},{}],13:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Element: 1,
+ Attribute: 2,
+ Text: 3,
+ CData: 4,
+ EntityReference: 5,
+ EntityDeclaration: 6,
+ ProcessingInstruction: 7,
+ Comment: 8,
+ Document: 9,
+ DocType: 10,
+ DocumentFragment: 11,
+ NotationDeclaration: 12,
+ // Numeric codes up to 200 are reserved to W3C for possible future use.
+ // Following are types internal to this library:
+ Declaration: 201,
+ Raw: 202,
+ AttributeDeclaration: 203,
+ ElementDeclaration: 204,
+ Dummy: 205
+ };
+
+}).call(this);
+
+},{}],14:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Copies all enumerable own properties from `sources` to `target`
+ var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ assign = function(target, ...sources) {
+ var i, key, len, source;
+ if (isFunction(Object.assign)) {
+ Object.assign.apply(null, arguments);
+ } else {
+ for (i = 0, len = sources.length; i < len; i++) {
+ source = sources[i];
+ if (source != null) {
+ for (key in source) {
+ if (!hasProp.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+ }
+ }
+ return target;
+ };
+
+ // Determines if `val` is a Function object
+ isFunction = function(val) {
+ return !!val && Object.prototype.toString.call(val) === '[object Function]';
+ };
+
+ // Determines if `val` is an Object
+ isObject = function(val) {
+ var ref;
+ return !!val && ((ref = typeof val) === 'function' || ref === 'object');
+ };
+
+ // Determines if `val` is an Array
+ isArray = function(val) {
+ if (isFunction(Array.isArray)) {
+ return Array.isArray(val);
+ } else {
+ return Object.prototype.toString.call(val) === '[object Array]';
+ }
+ };
+
+ // Determines if `val` is an empty Array or an Object with no own properties
+ isEmpty = function(val) {
+ var key;
+ if (isArray(val)) {
+ return !val.length;
+ } else {
+ for (key in val) {
+ if (!hasProp.call(val, key)) continue;
+ return false;
+ }
+ return true;
+ }
+ };
+
+ // Determines if `val` is a plain Object
+ isPlainObject = function(val) {
+ var ctor, proto;
+ return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
+ };
+
+ // Gets the primitive value of an object
+ getValue = function(obj) {
+ if (isFunction(obj.valueOf)) {
+ return obj.valueOf();
+ } else {
+ return obj;
+ }
+ };
+
+ module.exports.assign = assign;
+
+ module.exports.isFunction = isFunction;
+
+ module.exports.isObject = isObject;
+
+ module.exports.isArray = isArray;
+
+ module.exports.isEmpty = isEmpty;
+
+ module.exports.isPlainObject = isPlainObject;
+
+ module.exports.getValue = getValue;
+
+}).call(this);
+
+},{}],15:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ None: 0,
+ OpenTag: 1,
+ InsideTag: 2,
+ CloseTag: 3
+ };
+
+}).call(this);
+
+},{}],16:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLNode;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents an attribute
+ module.exports = XMLAttribute = (function() {
+ class XMLAttribute {
+ // Initializes a new instance of `XMLAttribute`
+
+ // `parent` the parent node
+ // `name` attribute target
+ // `value` attribute value
+ constructor(parent, name, value) {
+ this.parent = parent;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.value = this.stringify.attValue(value);
+ this.type = NodeType.Attribute;
+ // DOM level 3
+ this.isId = false;
+ this.schemaTypeInfo = null;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ name = name || this.name;
+ if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else {
+ return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ isEqualNode(node) {
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.value !== this.value) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLAttribute.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'specified', {
+ get: function() {
+ return true;
+ }
+ });
+
+ return XMLAttribute;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLNode":35}],17:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCData, XMLCharacterData;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a CDATA node
+ module.exports = XMLCData = class XMLCData extends XMLCharacterData {
+ // Initializes a new instance of `XMLCData`
+
+ // `text` CDATA text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing CDATA text. " + this.debugInfo());
+ }
+ this.name = "#cdata-section";
+ this.type = NodeType.CData;
+ this.value = this.stringify.cdata(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLCharacterData":18}],18:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLCharacterData, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a character data node
+ module.exports = XMLCharacterData = (function() {
+ class XMLCharacterData extends XMLNode {
+ // Initializes a new instance of `XMLCharacterData`
+
+ constructor(parent) {
+ super(parent);
+ this.value = '';
+ }
+
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // DOM level 1 functions to be implemented later
+ substringData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendData(arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ insertData(offset, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ deleteData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ replaceData(offset, count, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.data !== this.data) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLCharacterData.prototype, 'data', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ Object.defineProperty(XMLCharacterData.prototype, 'length', {
+ get: function() {
+ return this.value.length;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLCharacterData.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ return XMLCharacterData;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./XMLNode":35}],19:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLComment;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a comment node
+ module.exports = XMLComment = class XMLComment extends XMLCharacterData {
+ // Initializes a new instance of `XMLComment`
+
+ // `text` comment text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing comment text. " + this.debugInfo());
+ }
+ this.name = "#comment";
+ this.type = NodeType.Comment;
+ this.value = this.stringify.comment(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.comment(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLCharacterData":18}],20:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;
+
+ XMLDOMErrorHandler = require('./XMLDOMErrorHandler');
+
+ XMLDOMStringList = require('./XMLDOMStringList');
+
+ // Implements the DOMConfiguration interface
+ module.exports = XMLDOMConfiguration = (function() {
+ class XMLDOMConfiguration {
+ constructor() {
+ var clonedSelf;
+ this.defaultParams = {
+ "canonical-form": false,
+ "cdata-sections": false,
+ "comments": false,
+ "datatype-normalization": false,
+ "element-content-whitespace": true,
+ "entities": true,
+ "error-handler": new XMLDOMErrorHandler(),
+ "infoset": true,
+ "validate-if-schema": false,
+ "namespaces": true,
+ "namespace-declarations": true,
+ "normalize-characters": false,
+ "schema-location": '',
+ "schema-type": '',
+ "split-cdata-sections": true,
+ "validate": false,
+ "well-formed": true
+ };
+ this.params = clonedSelf = Object.create(this.defaultParams);
+ }
+
+ // Gets the value of a parameter.
+
+ // `name` name of the parameter
+ getParameter(name) {
+ if (this.params.hasOwnProperty(name)) {
+ return this.params[name];
+ } else {
+ return null;
+ }
+ }
+
+ // Checks if setting a parameter to a specific value is supported.
+
+ // `name` name of the parameter
+ // `value` parameter value
+ canSetParameter(name, value) {
+ return true;
+ }
+
+ // Sets the value of a parameter.
+
+ // `name` name of the parameter
+ // `value` new value or null if the user wishes to unset the parameter
+ setParameter(name, value) {
+ if (value != null) {
+ return this.params[name] = value;
+ } else {
+ return delete this.params[name];
+ }
+ }
+
+ };
+
+ // Returns the list of parameter names
+ Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {
+ get: function() {
+ return new XMLDOMStringList(Object.keys(this.defaultParams));
+ }
+ });
+
+ return XMLDOMConfiguration;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./XMLDOMErrorHandler":21,"./XMLDOMStringList":23}],21:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents the error handler for DOM operations
+ var XMLDOMErrorHandler;
+
+ module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {
+ // Initializes a new instance of `XMLDOMErrorHandler`
+
+ constructor() {}
+
+ // Called on the error handler when an error occurs.
+
+ // `error` the error message as a string
+ handleError(error) {
+ throw new Error(error);
+ }
+
+ };
+
+}).call(this);
+
+},{}],22:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Implements the DOMImplementation interface
+ var XMLDOMImplementation;
+
+ module.exports = XMLDOMImplementation = class XMLDOMImplementation {
+ // Tests if the DOM implementation implements a specific feature.
+
+ // `feature` package name of the feature to test. In Level 1, the
+ // legal values are "HTML" and "XML" (case-insensitive).
+ // `version` version number of the package name to test.
+ // In Level 1, this is the string "1.0". If the version is
+ // not specified, supporting any version of the feature will
+ // cause the method to return true.
+ hasFeature(feature, version) {
+ return true;
+ }
+
+ // Creates a new document type declaration.
+
+ // `qualifiedName` qualified name of the document type to be created
+ // `publicId` public identifier of the external subset
+ // `systemId` system identifier of the external subset
+ createDocumentType(qualifiedName, publicId, systemId) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new document.
+
+ // `namespaceURI` namespace URI of the document element to create
+ // `qualifiedName` the qualified name of the document to be created
+ // `doctype` the type of document to be created or null
+ createDocument(namespaceURI, qualifiedName, doctype) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new HTML document.
+
+ // `title` document title
+ createHTMLDocument(title) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Returns a specialized object which implements the specialized APIs
+ // of the specified feature and version.
+
+ // `feature` name of the feature requested.
+ // `version` version number of the feature to test
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+}).call(this);
+
+},{}],23:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of string entries
+ var XMLDOMStringList;
+
+ module.exports = XMLDOMStringList = (function() {
+ class XMLDOMStringList {
+ // Initializes a new instance of `XMLDOMStringList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `arr` the array of string values
+ constructor(arr) {
+ this.arr = arr || [];
+ }
+
+ // Returns the indexth item in the collection.
+
+ // `index` index into the collection
+ item(index) {
+ return this.arr[index] || null;
+ }
+
+ // Test if a string is part of this DOMStringList.
+
+ // `str` the string to look for
+ contains(str) {
+ return this.arr.indexOf(str) !== -1;
+ }
+
+ };
+
+ // Returns the number of strings in the list.
+ Object.defineProperty(XMLDOMStringList.prototype, 'length', {
+ get: function() {
+ return this.arr.length;
+ }
+ });
+
+ return XMLDOMStringList;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],24:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute list
+ module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {
+ // Initializes a new instance of `XMLDTDAttList`
+
+ // `parent` the parent `XMLDocType` element
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,
+ // #FIXED or #DEFAULT)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ super(parent);
+ if (elementName == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (attributeName == null) {
+ throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName));
+ }
+ if (!attributeType) {
+ throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName));
+ }
+ if (!defaultValueType) {
+ throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName));
+ }
+ if (defaultValueType.indexOf('#') !== 0) {
+ defaultValueType = '#' + defaultValueType;
+ }
+ if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {
+ throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {
+ throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ this.elementName = this.stringify.name(elementName);
+ this.type = NodeType.AttributeDeclaration;
+ this.attributeName = this.stringify.name(attributeName);
+ this.attributeType = this.stringify.dtdAttType(attributeType);
+ if (defaultValue) {
+ this.defaultValue = this.stringify.dtdAttDefault(defaultValue);
+ }
+ this.defaultValueType = defaultValueType;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLNode":35}],25:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDElement, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute
+ module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {
+ // Initializes a new instance of `XMLDTDElement`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (!value) {
+ value = '(#PCDATA)';
+ }
+ if (Array.isArray(value)) {
+ value = '(' + value.join(',') + ')';
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.ElementDeclaration;
+ this.value = this.stringify.dtdElementValue(value);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLNode":35}],26:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDEntity, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an entity declaration in the DTD
+ module.exports = XMLDTDEntity = (function() {
+ class XMLDTDEntity extends XMLNode {
+ // Initializes a new instance of `XMLDTDEntity`
+
+ // `parent` the parent `XMLDocType` element
+ // `pe` whether this is a parameter entity or a general entity
+ // defaults to `false` (general entity)
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ constructor(parent, pe, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD entity name. " + this.debugInfo(name));
+ }
+ if (value == null) {
+ throw new Error("Missing DTD entity value. " + this.debugInfo(name));
+ }
+ this.pe = !!pe;
+ this.name = this.stringify.name(name);
+ this.type = NodeType.EntityDeclaration;
+ if (!isObject(value)) {
+ this.value = this.stringify.dtdEntityValue(value);
+ this.internal = true;
+ } else {
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ if (value.pubID && !value.sysID) {
+ throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
+ }
+ this.internal = false;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ if (value.nData != null) {
+ this.nData = this.stringify.dtdNData(value.nData);
+ }
+ if (this.pe && this.nData) {
+ throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
+ }
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {
+ get: function() {
+ return this.nData || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDTDEntity;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./XMLNode":35}],27:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDNotation, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a NOTATION entry in the DTD
+ module.exports = XMLDTDNotation = (function() {
+ class XMLDTDNotation extends XMLNode {
+ // Initializes a new instance of `XMLDTDNotation`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD notation name. " + this.debugInfo(name));
+ }
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.NotationDeclaration;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ return XMLDTDNotation;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLNode":35}],28:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDeclaration, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents the XML declaration
+ module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {
+ // Initializes a new instance of `XMLDeclaration`
+
+ // `parent` the document object
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ constructor(parent, version, encoding, standalone) {
+ super(parent);
+ // arguments may also be passed as an object
+ if (isObject(version)) {
+ ({version, encoding, standalone} = version);
+ }
+ if (!version) {
+ version = '1.0';
+ }
+ this.type = NodeType.Declaration;
+ this.version = this.stringify.xmlVersion(version);
+ if (encoding != null) {
+ this.encoding = this.stringify.xmlEncoding(encoding);
+ }
+ if (standalone != null) {
+ this.standalone = this.stringify.xmlStandalone(standalone);
+ }
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.declaration(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./XMLNode":35}],29:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents doctype declaration
+ module.exports = XMLDocType = (function() {
+ class XMLDocType extends XMLNode {
+ // Initializes a new instance of `XMLDocType`
+
+ // `parent` the document object
+
+ // `pubID` public identifier of the external subset
+ // `sysID` system identifier of the external subset
+ constructor(parent, pubID, sysID) {
+ var child, i, len, ref;
+ super(parent);
+ this.type = NodeType.DocType;
+ // set DTD name to the name of the root node
+ if (parent.children) {
+ ref = parent.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.Element) {
+ this.name = child.name;
+ break;
+ }
+ }
+ }
+ this.documentObject = parent;
+ // arguments may also be passed as an object
+ if (isObject(pubID)) {
+ ({pubID, sysID} = pubID);
+ }
+ if (sysID == null) {
+ [sysID, pubID] = [pubID, sysID];
+ }
+ if (pubID != null) {
+ this.pubID = this.stringify.dtdPubID(pubID);
+ }
+ if (sysID != null) {
+ this.sysID = this.stringify.dtdSysID(sysID);
+ }
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ element(name, value) {
+ var child;
+ child = new XMLDTDElement(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var child;
+ child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, false, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, true, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var child;
+ child = new XMLDTDNotation(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.docType(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ ele(name, value) {
+ return this.element(name, value);
+ }
+
+ att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ }
+
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ up() {
+ return this.root() || this.documentObject;
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.name !== this.name) {
+ return false;
+ }
+ if (node.publicId !== this.publicId) {
+ return false;
+ }
+ if (node.systemId !== this.systemId) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocType.prototype, 'entities', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if ((child.type === NodeType.EntityDeclaration) && !child.pe) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'notations', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.NotationDeclaration) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ // DOM level 2
+ Object.defineProperty(XMLDocType.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'internalSubset', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLDocType;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./XMLDTDAttList":24,"./XMLDTDElement":25,"./XMLDTDEntity":26,"./XMLDTDNotation":27,"./XMLNamedNodeMap":34,"./XMLNode":35}],30:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;
+
+ ({isPlainObject} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDOMConfiguration = require('./XMLDOMConfiguration');
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ // Represents an XML builder
+ module.exports = XMLDocument = (function() {
+ class XMLDocument extends XMLNode {
+ // Initializes a new instance of `XMLDocument`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ constructor(options) {
+ super(null);
+ this.name = "#document";
+ this.type = NodeType.Document;
+ this.documentURI = null;
+ this.domConfig = new XMLDOMConfiguration();
+ options || (options = {});
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.stringify = new XMLStringifier(options);
+ }
+
+ // Ends the document and passes it to the given XML writer
+
+ // `writer` is either an XML writer or a plain object to pass to the
+ // constructor of the default XML writer. The default writer is assigned when
+ // creating the XML document. Following flags are recognized by the
+ // built-in XMLStringWriter:
+ // `writer.pretty` pretty prints the result
+ // `writer.indent` indentation for pretty print
+ // `writer.offset` how many indentations to add to every line for pretty print
+ // `writer.newline` newline sequence for pretty print
+ end(writer) {
+ var writerOptions;
+ writerOptions = {};
+ if (!writer) {
+ writer = this.options.writer;
+ } else if (isPlainObject(writer)) {
+ writerOptions = writer;
+ writer = this.options.writer;
+ }
+ return writer.document(this, writer.filterOptions(writerOptions));
+ }
+
+ // Converts the XML document to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.document(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ createElement(tagName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createDocumentFragment() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTextNode(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createComment(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createCDATASection(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createProcessingInstruction(target, data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttribute(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEntityReference(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2 functions to be implemented later
+ importNode(importedNode, deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createElementNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttributeNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementById(elementId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ adoptNode(source) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalizeDocument() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ renameNode(node, namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 4 functions to be implemented later
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEvent(eventInterface) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createRange() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createNodeIterator(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTreeWalker(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocument.prototype, 'implementation', {
+ value: new XMLDOMImplementation()
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'doctype', {
+ get: function() {
+ var child, i, len, ref;
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.DocType) {
+ return child;
+ }
+ }
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'documentElement', {
+ get: function() {
+ return this.rootObject || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {
+ get: function() {
+ return false;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].encoding;
+ } else {
+ return null;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].standalone === 'yes';
+ } else {
+ return false;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].version;
+ } else {
+ return "1.0";
+ }
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLDocument.prototype, 'URL', {
+ get: function() {
+ return this.documentURI;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'origin', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'compatMode', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'characterSet', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'contentType', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDocument;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./XMLDOMConfiguration":20,"./XMLDOMImplementation":22,"./XMLNode":35,"./XMLStringWriter":40,"./XMLStringifier":41}],31:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLElement = require('./XMLElement');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ WriterState = require('./WriterState');
+
+ // Represents an XML builder
+ module.exports = XMLDocumentCB = class XMLDocumentCB {
+ // Initializes a new instance of `XMLDocumentCB`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its first
+ // argument, and the current indentation level as its second argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ constructor(options, onData, onEnd) {
+ var writerOptions;
+ this.name = "?xml";
+ this.type = NodeType.Document;
+ options || (options = {});
+ writerOptions = {};
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ } else if (isPlainObject(options.writer)) {
+ writerOptions = options.writer;
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.writer = options.writer;
+ this.writerOptions = this.writer.filterOptions(writerOptions);
+ this.stringify = new XMLStringifier(options);
+ this.onDataCallback = onData || function() {};
+ this.onEndCallback = onEnd || function() {};
+ this.currentNode = null;
+ this.currentLevel = -1;
+ this.openTags = {};
+ this.documentStarted = false;
+ this.documentCompleted = false;
+ this.root = null;
+ }
+
+ // Creates a child element node from the given XMLNode
+
+ // `node` the child node
+ createChildNode(node) {
+ var att, attName, attributes, child, i, len, ref, ref1;
+ switch (node.type) {
+ case NodeType.CData:
+ this.cdata(node.value);
+ break;
+ case NodeType.Comment:
+ this.comment(node.value);
+ break;
+ case NodeType.Element:
+ attributes = {};
+ ref = node.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ attributes[attName] = att.value;
+ }
+ this.node(node.name, attributes);
+ break;
+ case NodeType.Dummy:
+ this.dummy();
+ break;
+ case NodeType.Raw:
+ this.raw(node.value);
+ break;
+ case NodeType.Text:
+ this.text(node.value);
+ break;
+ case NodeType.ProcessingInstruction:
+ this.instruction(node.target, node.value);
+ break;
+ default:
+ throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name);
+ }
+ ref1 = node.children;
+ // write child nodes recursively
+ for (i = 0, len = ref1.length; i < len; i++) {
+ child = ref1[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ return this;
+ }
+
+ // Creates a dummy node
+
+ dummy() {
+ // no-op, just return this
+ return this;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ if (name == null) {
+ throw new Error("Missing node name.");
+ }
+ if (this.root && this.currentLevel === -1) {
+ throw new Error("Document can only have one root node. " + this.debugInfo(name));
+ }
+ this.openCurrent();
+ name = getValue(name);
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ this.currentNode = new XMLElement(this, name, attributes);
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ if (text != null) {
+ this.text(text);
+ }
+ return this;
+ }
+
+ // Creates a child element node or an element type declaration when called
+ // inside the DTD
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var child, i, len, oldValidationFlag, ref, root;
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ this.dtdElement(...arguments);
+ } else {
+ if (Array.isArray(name) || isObject(name) || isFunction(name)) {
+ oldValidationFlag = this.options.noValidation;
+ this.options.noValidation = true;
+ root = new XMLDocument(this.options).element('TEMP_ROOT');
+ root.element(name);
+ this.options.noValidation = oldValidationFlag;
+ ref = root.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ } else {
+ this.node(name, attributes, text);
+ }
+ }
+ return this;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (!this.currentNode || this.currentNode.children) {
+ throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name));
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLText(this, value);
+ this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLCData(this, value);
+ this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLComment(this, value);
+ this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLRaw(this, value);
+ this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var i, insTarget, insValue, len, node;
+ this.openCurrent();
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (i = 0, len = target.length; i < len; i++) {
+ insTarget = target[i];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ node = new XMLProcessingInstruction(this, target, value);
+ this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ }
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var node;
+ this.openCurrent();
+ if (this.documentStarted) {
+ throw new Error("declaration() must be the first node.");
+ }
+ node = new XMLDeclaration(this, version, encoding, standalone);
+ this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates the document type declaration
+
+ // `root` the name of the root node
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ doctype(root, pubID, sysID) {
+ this.openCurrent();
+ if (root == null) {
+ throw new Error("Missing root node name.");
+ }
+ if (this.root) {
+ throw new Error("dtd() must come before the root node.");
+ }
+ this.currentNode = new XMLDocType(this, pubID, sysID);
+ this.currentNode.rootNodeName = root;
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ return this;
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ dtdElement(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDElement(this, name, value);
+ this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, false, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, true, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDNotation(this, name, value);
+ this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.currentLevel < 0) {
+ throw new Error("The document node has no parent.");
+ }
+ if (this.currentNode) {
+ if (this.currentNode.children) {
+ this.closeNode(this.currentNode);
+ } else {
+ this.openNode(this.currentNode);
+ }
+ this.currentNode = null;
+ } else {
+ this.closeNode(this.openTags[this.currentLevel]);
+ }
+ delete this.openTags[this.currentLevel];
+ this.currentLevel--;
+ return this;
+ }
+
+ // Ends the document
+ end() {
+ while (this.currentLevel >= 0) {
+ this.up();
+ }
+ return this.onEnd();
+ }
+
+ // Opens the current parent node
+ openCurrent() {
+ if (this.currentNode) {
+ this.currentNode.children = true;
+ return this.openNode(this.currentNode);
+ }
+ }
+
+ // Writes the opening tag of the current node or the entire node if it has
+ // no child nodes
+ openNode(node) {
+ var att, chunk, name, ref;
+ if (!node.isOpen) {
+ if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {
+ this.root = node;
+ }
+ chunk = '';
+ if (node.type === NodeType.Element) {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);
+ }
+ chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType
+ } else {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<!DOCTYPE ' + node.rootNodeName;
+
+ // external identifier
+ if (node.pubID && node.sysID) {
+ chunk += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ chunk += ' SYSTEM "' + node.sysID + '"';
+ }
+
+ // internal subset
+ if (node.children) {
+ chunk += ' [';
+ this.writerOptions.state = WriterState.InsideTag;
+ } else {
+ this.writerOptions.state = WriterState.CloseTag;
+ chunk += '>';
+ }
+ chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.onData(chunk, this.currentLevel);
+ return node.isOpen = true;
+ }
+ }
+
+ // Writes the closing tag of the current node
+ closeNode(node) {
+ var chunk;
+ if (!node.isClosed) {
+ chunk = '';
+ this.writerOptions.state = WriterState.CloseTag;
+ if (node.type === NodeType.Element) {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '</' + node.name + '>' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType
+ } else {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.writerOptions.state = WriterState.None;
+ this.onData(chunk, this.currentLevel);
+ return node.isClosed = true;
+ }
+ }
+
+ // Called when a new chunk of XML is output
+
+ // `chunk` a string containing the XML chunk
+ // `level` current indentation level
+ onData(chunk, level) {
+ this.documentStarted = true;
+ return this.onDataCallback(chunk, level + 1);
+ }
+
+ // Called when the XML document is completed
+ onEnd() {
+ this.documentCompleted = true;
+ return this.onEndCallback();
+ }
+
+ // Returns debug string
+ debugInfo(name) {
+ if (name == null) {
+ return "";
+ } else {
+ return "node: <" + name + ">";
+ }
+ }
+
+ // Node aliases
+ ele() {
+ return this.element(...arguments);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ dtd(root, pubID, sysID) {
+ return this.doctype(root, pubID, sysID);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ // Attribute aliases
+ att() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ a() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ // DTD aliases
+ // att() and ele() are defined above
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./WriterState":15,"./XMLAttribute":16,"./XMLCData":17,"./XMLComment":19,"./XMLDTDAttList":24,"./XMLDTDElement":25,"./XMLDTDEntity":26,"./XMLDTDNotation":27,"./XMLDeclaration":28,"./XMLDocType":29,"./XMLDocument":30,"./XMLElement":33,"./XMLProcessingInstruction":37,"./XMLRaw":38,"./XMLStringWriter":40,"./XMLStringifier":41,"./XMLText":42}],32:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDummy, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a raw node
+ module.exports = XMLDummy = class XMLDummy extends XMLNode {
+ // Initializes a new instance of `XMLDummy`
+
+ // `XMLDummy` is a special node representing a node with
+ // a null value. Dummy nodes are created while recursively
+ // building the XML tree. Simply skipping null values doesn't
+ // work because that would break the recursive chain.
+ constructor(parent) {
+ super(parent);
+ this.type = NodeType.Dummy;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return '';
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLNode":35}],33:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, getValue} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents an element of the XML document
+ module.exports = XMLElement = (function() {
+ class XMLElement extends XMLNode {
+ // Initializes a new instance of `XMLElement`
+
+ // `parent` the parent node
+ // `name` element name
+ // `attributes` an object containing name/value pairs of attributes
+ constructor(parent, name, attributes) {
+ var child, j, len, ref;
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing element name. " + this.debugInfo());
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.Element;
+ this.attribs = {};
+ this.schemaTypeInfo = null;
+ if (attributes != null) {
+ this.attribute(attributes);
+ }
+ // set properties if this is the root node
+ if (parent.type === NodeType.Document) {
+ this.isRoot = true;
+ this.documentObject = parent;
+ parent.rootObject = this;
+ // set dtd name
+ if (parent.children) {
+ ref = parent.children;
+ for (j = 0, len = ref.length; j < len; j++) {
+ child = ref[j];
+ if (child.type === NodeType.DocType) {
+ child.name = this.name;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ var att, attName, clonedSelf, ref;
+ clonedSelf = Object.create(this);
+ // remove document element
+ if (clonedSelf.isRoot) {
+ clonedSelf.documentObject = null;
+ }
+ // clone attributes
+ clonedSelf.attribs = {};
+ ref = this.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ clonedSelf.attribs[attName] = att.clone();
+ }
+ // clone child nodes
+ clonedSelf.children = [];
+ this.children.forEach(function(child) {
+ var clonedChild;
+ clonedChild = child.clone();
+ clonedChild.parent = clonedSelf;
+ return clonedSelf.children.push(clonedChild);
+ });
+ return clonedSelf;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ var attName, j, len;
+ // Also defined in DOM level 1
+ // removeAttribute(name) removes an attribute by name.
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo());
+ }
+ name = getValue(name);
+ if (Array.isArray(name)) { // expand if array
+ for (j = 0, len = name.length; j < len; j++) {
+ attName = name[j];
+ delete this.attribs[attName];
+ }
+ } else {
+ delete this.attribs[name];
+ }
+ return this;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ // `options.allowEmpty` do not self close empty element tags
+ toString(options) {
+ return this.options.writer.element(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // DOM Level 1
+ getAttribute(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].value;
+ } else {
+ return null;
+ }
+ }
+
+ setAttribute(name, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNode(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name];
+ } else {
+ return null;
+ }
+ }
+
+ setAttributeNode(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNode(oldAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 2
+ getAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNS(namespaceURI, qualifiedName, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNodeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNodeNS(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasAttribute(name) {
+ return this.attribs.hasOwnProperty(name);
+ }
+
+ hasAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 3
+ setIdAttribute(name, isId) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].isId;
+ } else {
+ return isId;
+ }
+ }
+
+ setIdAttributeNS(namespaceURI, localName, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setIdAttributeNode(idAttr, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 4
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref;
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.attribs.length !== this.attribs.length) {
+ return false;
+ }
+ for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {
+ if (!this.attribs[i].isEqualNode(node.attribs[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLElement.prototype, 'tagName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLElement.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'id', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'className', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'classList', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'attributes', {
+ get: function() {
+ if (!this.attributeMap || !this.attributeMap.nodes) {
+ this.attributeMap = new XMLNamedNodeMap(this.attribs);
+ }
+ return this.attributeMap;
+ }
+ });
+
+ return XMLElement;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./XMLAttribute":16,"./XMLNamedNodeMap":34,"./XMLNode":35}],34:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a map of nodes accessed by a string key
+ var XMLNamedNodeMap;
+
+ module.exports = XMLNamedNodeMap = (function() {
+ class XMLNamedNodeMap {
+ // Initializes a new instance of `XMLNamedNodeMap`
+ // This is just a wrapper around an ordinary
+ // JS object.
+
+ // `nodes` the object containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given object. The calling function should check
+ // whether the wrapped object is null and supply a new object
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ getNamedItem(name) {
+ return this.nodes[name];
+ }
+
+ setNamedItem(node) {
+ var oldNode;
+ oldNode = this.nodes[node.nodeName];
+ this.nodes[node.nodeName] = node;
+ return oldNode || null;
+ }
+
+ removeNamedItem(name) {
+ var oldNode;
+ oldNode = this.nodes[name];
+ delete this.nodes[name];
+ return oldNode || null;
+ }
+
+ item(index) {
+ return this.nodes[Object.keys(this.nodes)[index]] || null;
+ }
+
+ // DOM level 2 functions to be implemented later
+ getNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ setNamedItemNS(node) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ removeNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+
+ // DOM level 1
+ Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {
+ get: function() {
+ return Object.keys(this.nodes).length || 0;
+ }
+ });
+
+ return XMLNamedNodeMap;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],35:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,
+ hasProp = {}.hasOwnProperty,
+ splice = [].splice;
+
+ ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));
+
+ XMLElement = null;
+
+ XMLCData = null;
+
+ XMLComment = null;
+
+ XMLDeclaration = null;
+
+ XMLDocType = null;
+
+ XMLRaw = null;
+
+ XMLText = null;
+
+ XMLProcessingInstruction = null;
+
+ XMLDummy = null;
+
+ NodeType = null;
+
+ XMLNodeList = null;
+
+ XMLNamedNodeMap = null;
+
+ DocumentPosition = null;
+
+ // Represents a generic XMl element
+ module.exports = XMLNode = (function() {
+ class XMLNode {
+ // Initializes a new instance of `XMLNode`
+
+ // `parent` the parent node
+ constructor(parent1) {
+ this.parent = parent1;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ this.value = null;
+ this.children = [];
+ this.baseURI = null;
+ // first execution, load dependencies that are otherwise
+ // circular (so we can't load them at the top)
+ if (!XMLElement) {
+ XMLElement = require('./XMLElement');
+ XMLCData = require('./XMLCData');
+ XMLComment = require('./XMLComment');
+ XMLDeclaration = require('./XMLDeclaration');
+ XMLDocType = require('./XMLDocType');
+ XMLRaw = require('./XMLRaw');
+ XMLText = require('./XMLText');
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+ XMLDummy = require('./XMLDummy');
+ NodeType = require('./NodeType');
+ XMLNodeList = require('./XMLNodeList');
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+ DocumentPosition = require('./DocumentPosition');
+ }
+ }
+
+
+ // Sets the parent node of this node and its children recursively
+
+ // `parent` the parent node
+ setParent(parent) {
+ var child, j, len, ref1, results;
+ this.parent = parent;
+ if (parent) {
+ this.options = parent.options;
+ this.stringify = parent.stringify;
+ }
+ ref1 = this.children;
+ results = [];
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ results.push(child.setParent(this));
+ }
+ return results;
+ }
+
+ // Creates a child element node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var childNode, item, j, k, key, lastChild, len, len1, val;
+ lastChild = null;
+ if (attributes === null && (text == null)) {
+ [attributes, text] = [{}, null];
+ }
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ // expand if array
+ if (Array.isArray(name)) {
+ for (j = 0, len = name.length; j < len; j++) {
+ item = name[j];
+ lastChild = this.element(item);
+ }
+ // evaluate if function
+ } else if (isFunction(name)) {
+ lastChild = this.element(name.apply());
+ // expand if object
+ } else if (isObject(name)) {
+ for (key in name) {
+ if (!hasProp.call(name, key)) continue;
+ val = name[key];
+ if (isFunction(val)) {
+ // evaluate if function
+ val = val.apply();
+ }
+ // assign attributes
+ if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
+ lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
+ // skip empty arrays
+ } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
+ lastChild = this.dummy();
+ // empty objects produce one node
+ } else if (isObject(val) && isEmpty(val)) {
+ lastChild = this.element(key);
+ // skip null and undefined nodes
+ } else if (!this.options.keepNullNodes && (val == null)) {
+ lastChild = this.dummy();
+
+ // expand list by creating child nodes
+ } else if (!this.options.separateArrayItems && Array.isArray(val)) {
+ for (k = 0, len1 = val.length; k < len1; k++) {
+ item = val[k];
+ childNode = {};
+ childNode[key] = item;
+ lastChild = this.element(childNode);
+ }
+
+ // expand child nodes under parent
+ } else if (isObject(val)) {
+ // if the key is #text expand child nodes under this node to support mixed content
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.element(val);
+ } else {
+ lastChild = this.element(key);
+ lastChild.element(val);
+ }
+ } else {
+
+ // text node
+ lastChild = this.element(key, val);
+ }
+ }
+ // skip null nodes
+ } else if (!this.options.keepNullNodes && text === null) {
+ lastChild = this.dummy();
+ } else {
+ // text node
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.text(text);
+ // cdata node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
+ lastChild = this.cdata(text);
+ // comment node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
+ lastChild = this.comment(text);
+ // raw text node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
+ lastChild = this.raw(text);
+ // processing instruction
+ } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
+ lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
+ } else {
+ // element node
+ lastChild = this.node(name, attributes, text);
+ }
+ }
+ if (lastChild == null) {
+ throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
+ }
+ return lastChild;
+ }
+
+ // Creates a child element node before the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertBefore(name, attributes, text) {
+ var child, i, newChild, refChild, removed;
+ // DOM level 1
+ // insertBefore(newChild, refChild) inserts the child node newChild before refChild
+ if (name != null ? name.type : void 0) {
+ newChild = name;
+ refChild = attributes;
+ newChild.setParent(this);
+ if (refChild) {
+ // temporarily remove children starting *with* refChild
+ i = children.indexOf(refChild);
+ removed = children.splice(i);
+
+ // add the new child
+ children.push(newChild);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(children, removed);
+ } else {
+ children.push(newChild);
+ }
+ return newChild;
+ } else {
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+ }
+
+ // Creates a child element node after the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertAfter(name, attributes, text) {
+ var child, i, removed;
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+
+ // Deletes a child element node
+
+ remove() {
+ var i, ref1;
+ if (this.isRoot) {
+ throw new Error("Cannot remove the root element. " + this.debugInfo());
+ }
+ i = this.parent.children.indexOf(this);
+ splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;
+ return this.parent;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ var child;
+ if (name != null) {
+ name = getValue(name);
+ }
+ attributes || (attributes = {});
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ child = new XMLElement(this, name, attributes);
+ if (text != null) {
+ child.text(text);
+ }
+ this.children.push(child);
+ return child;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var child;
+ if (isObject(value)) {
+ this.element(value);
+ }
+ child = new XMLText(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var child;
+ child = new XMLCData(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var child;
+ child = new XMLComment(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node before the current node
+
+ // `value` comment text
+ commentBefore(value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a comment node after the current node
+
+ // `value` comment text
+ commentAfter(value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var child;
+ child = new XMLRaw(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Adds a dummy node
+ dummy() {
+ var child;
+ child = new XMLDummy(this);
+ // Normally when a new node is created it is added to the child node collection.
+ // However, dummy nodes are never added to the XML tree. They are created while
+ // converting JS objects to XML nodes in order not to break the recursive function
+ // chain. They can be thought of as invisible nodes. They can be traversed through
+ // by using prev(), next(), up(), etc. functions but they do not exists in the tree.
+
+ // @children.push child
+ return child;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var insTarget, insValue, instruction, j, len;
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (j = 0, len = target.length; j < len; j++) {
+ insTarget = target[j];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ instruction = new XMLProcessingInstruction(this, target, value);
+ this.children.push(instruction);
+ }
+ return this;
+ }
+
+ // Creates a processing instruction node before the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionBefore(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a processing instruction node after the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionAfter(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var doc, xmldec;
+ doc = this.document();
+ xmldec = new XMLDeclaration(doc, version, encoding, standalone);
+ // Replace XML declaration if exists, otherwise insert at top
+ if (doc.children.length === 0) {
+ doc.children.unshift(xmldec);
+ } else if (doc.children[0].type === NodeType.Declaration) {
+ doc.children[0] = xmldec;
+ } else {
+ doc.children.unshift(xmldec);
+ }
+ return doc.root() || doc;
+ }
+
+ // Creates the document type declaration
+
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ dtd(pubID, sysID) {
+ var child, doc, doctype, i, j, k, len, len1, ref1, ref2;
+ doc = this.document();
+ doctype = new XMLDocType(doc, pubID, sysID);
+ ref1 = doc.children;
+ // Replace DTD if exists
+ for (i = j = 0, len = ref1.length; j < len; i = ++j) {
+ child = ref1[i];
+ if (child.type === NodeType.DocType) {
+ doc.children[i] = doctype;
+ return doctype;
+ }
+ }
+ ref2 = doc.children;
+ // insert before root node if the root node exists
+ for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {
+ child = ref2[i];
+ if (child.isRoot) {
+ doc.children.splice(i, 0, doctype);
+ return doctype;
+ }
+ }
+ // otherwise append to end
+ doc.children.push(doctype);
+ return doctype;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.isRoot) {
+ throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
+ }
+ return this.parent;
+ }
+
+ // Gets the root node
+ root() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node.rootObject;
+ } else if (node.isRoot) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Gets the node representing the XML document
+ document() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Ends the document and converts string
+ end(options) {
+ return this.document().end(options);
+ }
+
+ // Gets the previous node
+ prev() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i < 1) {
+ throw new Error("Already at the first node. " + this.debugInfo());
+ }
+ return this.parent.children[i - 1];
+ }
+
+ // Gets the next node
+ next() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i === -1 || i === this.parent.children.length - 1) {
+ throw new Error("Already at the last node. " + this.debugInfo());
+ }
+ return this.parent.children[i + 1];
+ }
+
+ // Imports cloned root from another XML document
+
+ // `doc` the XML document to insert nodes from
+ importDocument(doc) {
+ var child, clonedRoot, j, len, ref1;
+ clonedRoot = doc.root().clone();
+ clonedRoot.parent = this;
+ clonedRoot.isRoot = false;
+ this.children.push(clonedRoot);
+ // set properties if imported element becomes the root node
+ if (this.type === NodeType.Document) {
+ clonedRoot.isRoot = true;
+ clonedRoot.documentObject = this;
+ this.rootObject = clonedRoot;
+ // set dtd name
+ if (this.children) {
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.type === NodeType.DocType) {
+ child.name = clonedRoot.name;
+ break;
+ }
+ }
+ }
+ }
+ return this;
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ var ref1, ref2;
+ name = name || this.name;
+ if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {
+ return "";
+ } else if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {
+ return "node: <" + name + ">";
+ } else {
+ return "node: <" + name + ">, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ // Aliases
+ ele(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ doc() {
+ return this.document();
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ u() {
+ return this.up();
+ }
+
+ // can be deprecated in a future release
+ importXMLBuilder(doc) {
+ return this.importDocument(doc);
+ }
+
+ // Adds or modifies an attribute.
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ // DOM level 1 functions to be implemented later
+ replaceChild(newChild, oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeChild(oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendChild(newChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasChildNodes() {
+ return this.children.length !== 0;
+ }
+
+ cloneNode(deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalize() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2
+ isSupported(feature, version) {
+ return true;
+ }
+
+ hasAttributes() {
+ return this.attribs.length !== 0;
+ }
+
+ // DOM level 3 functions to be implemented later
+ compareDocumentPosition(other) {
+ var ref, res;
+ ref = this;
+ if (ref === other) {
+ return 0;
+ } else if (this.document() !== other.document()) {
+ res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
+ if (Math.random() < 0.5) {
+ res |= DocumentPosition.Preceding;
+ } else {
+ res |= DocumentPosition.Following;
+ }
+ return res;
+ } else if (ref.isAncestor(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Preceding;
+ } else if (ref.isDescendant(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Following;
+ } else if (ref.isPreceding(other)) {
+ return DocumentPosition.Preceding;
+ } else {
+ return DocumentPosition.Following;
+ }
+ }
+
+ isSameNode(other) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupPrefix(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isDefaultNamespace(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupNamespaceURI(prefix) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref1;
+ if (node.nodeType !== this.nodeType) {
+ return false;
+ }
+ if (node.children.length !== this.children.length) {
+ return false;
+ }
+ for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {
+ if (!this.children[i].isEqualNode(node.children[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setUserData(key, data, handler) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getUserData(key) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // Returns true if other is an inclusive descendant of node,
+ // and false otherwise.
+ contains(other) {
+ if (!other) {
+ return false;
+ }
+ return other === this || this.isDescendant(other);
+ }
+
+ // An object A is called a descendant of an object B, if either A is
+ // a child of B or A is a child of an object C that is a descendant of B.
+ isDescendant(node) {
+ var child, isDescendantChild, j, len, ref1;
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (node === child) {
+ return true;
+ }
+ isDescendantChild = child.isDescendant(node);
+ if (isDescendantChild) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // An object A is called an ancestor of an object B if and only if
+ // B is a descendant of A.
+ isAncestor(node) {
+ return node.isDescendant(this);
+ }
+
+ // An object A is preceding an object B if A and B are in the
+ // same tree and A comes before B in tree order.
+ isPreceding(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos < thisPos;
+ }
+ }
+
+ // An object A is folllowing an object B if A and B are in the
+ // same tree and A comes after B in tree order.
+ isFollowing(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos > thisPos;
+ }
+ }
+
+ // Returns the preorder position of the given node in the tree, or -1
+ // if the node is not in the tree.
+ treePosition(node) {
+ var found, pos;
+ pos = 0;
+ found = false;
+ this.foreachTreeNode(this.document(), function(childNode) {
+ pos++;
+ if (!found && childNode === node) {
+ return found = true;
+ }
+ });
+ if (found) {
+ return pos;
+ } else {
+ return -1;
+ }
+ }
+
+
+ // Depth-first preorder traversal through the XML tree
+ foreachTreeNode(node, func) {
+ var child, j, len, ref1, res;
+ node || (node = this.document());
+ ref1 = node.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (res = func(child)) {
+ return res;
+ } else {
+ res = this.foreachTreeNode(child, func);
+ if (res) {
+ return res;
+ }
+ }
+ }
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNode.prototype, 'nodeName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeValue', {
+ get: function() {
+ return this.value;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'parentNode', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'childNodes', {
+ get: function() {
+ if (!this.childNodeList || !this.childNodeList.nodes) {
+ this.childNodeList = new XMLNodeList(this.children);
+ }
+ return this.childNodeList;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'firstChild', {
+ get: function() {
+ return this.children[0] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'lastChild', {
+ get: function() {
+ return this.children[this.children.length - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'previousSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nextSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i + 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
+ get: function() {
+ return this.document() || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLNode.prototype, 'textContent', {
+ get: function() {
+ var child, j, len, ref1, str;
+ if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
+ str = '';
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.textContent) {
+ str += child.textContent;
+ }
+ }
+ return str;
+ } else {
+ return null;
+ }
+ },
+ set: function(value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLNode;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./DocumentPosition":12,"./NodeType":13,"./Utility":14,"./XMLCData":17,"./XMLComment":19,"./XMLDeclaration":28,"./XMLDocType":29,"./XMLDummy":32,"./XMLElement":33,"./XMLNamedNodeMap":34,"./XMLNodeList":36,"./XMLProcessingInstruction":37,"./XMLRaw":38,"./XMLText":42}],36:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of nodes
+ var XMLNodeList;
+
+ module.exports = XMLNodeList = (function() {
+ class XMLNodeList {
+ // Initializes a new instance of `XMLNodeList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `nodes` the array containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given array. The calling function should check
+ // whether the wrapped array is null and supply a new array
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ item(index) {
+ return this.nodes[index] || null;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNodeList.prototype, 'length', {
+ get: function() {
+ return this.nodes.length || 0;
+ }
+ });
+
+ return XMLNodeList;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],37:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLProcessingInstruction;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a processing instruction
+ module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {
+ // Initializes a new instance of `XMLProcessingInstruction`
+
+ // `parent` the parent node
+ // `target` instruction target
+ // `value` instruction value
+ constructor(parent, target, value) {
+ super(parent);
+ if (target == null) {
+ throw new Error("Missing instruction target. " + this.debugInfo());
+ }
+ this.type = NodeType.ProcessingInstruction;
+ this.target = this.stringify.insTarget(target);
+ this.name = this.target;
+ if (value) {
+ this.value = this.stringify.insValue(value);
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.target !== this.target) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLCharacterData":18}],38:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLNode, XMLRaw;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a raw node
+ module.exports = XMLRaw = class XMLRaw extends XMLNode {
+ // Initializes a new instance of `XMLRaw`
+
+ // `text` raw text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing raw text. " + this.debugInfo());
+ }
+ this.type = NodeType.Raw;
+ this.value = this.stringify.raw(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.raw(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLNode":35}],39:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,
+ hasProp = {}.hasOwnProperty;
+
+ NodeType = require('./NodeType');
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ WriterState = require('./WriterState');
+
+ // Prints XML nodes to a stream
+ module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStreamWriter`
+
+ // `stream` output stream
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(stream, options) {
+ super(options);
+ this.stream = stream;
+ }
+
+ endline(node, options, level) {
+ if (node.isLastRootNode && options.state === WriterState.CloseTag) {
+ return '';
+ } else {
+ return super.endline(node, options, level);
+ }
+ }
+
+ document(doc, options) {
+ var child, i, j, k, len1, len2, ref, ref1, results;
+ ref = doc.children;
+ // set a flag so that we don't insert a newline after the last root level node
+ for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {
+ child = ref[i];
+ child.isLastRootNode = i === doc.children.length - 1;
+ }
+ options = this.filterOptions(options);
+ ref1 = doc.children;
+ results = [];
+ for (k = 0, len2 = ref1.length; k < len2; k++) {
+ child = ref1[k];
+ results.push(this.writeChildNode(child, options, 0));
+ }
+ return results;
+ }
+
+ cdata(node, options, level) {
+ return this.stream.write(super.cdata(node, options, level));
+ }
+
+ comment(node, options, level) {
+ return this.stream.write(super.comment(node, options, level));
+ }
+
+ declaration(node, options, level) {
+ return this.stream.write(super.declaration(node, options, level));
+ }
+
+ docType(node, options, level) {
+ var child, j, len1, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ this.stream.write(this.indent(node, options, level));
+ this.stream.write('<!DOCTYPE ' + node.root().name);
+ // external identifier
+ if (node.pubID && node.sysID) {
+ this.stream.write(' PUBLIC "' + node.pubID + '" "' + node.sysID + '"');
+ } else if (node.sysID) {
+ this.stream.write(' SYSTEM "' + node.sysID + '"');
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ this.stream.write(' [');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (j = 0, len1 = ref.length; j < len1; j++) {
+ child = ref[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ this.stream.write(']');
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '>');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;
+ level || (level = 0);
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ this.stream.write(r);
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ this.stream.write('>');
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '/>');
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ this.stream.write('>');
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ this.stream.write('>' + this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref2 = node.children;
+ // inner tags
+ for (j = 0, len1 = ref2.length; j < len1; j++) {
+ child = ref2[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(this.indent(node, options, level) + '</' + node.name + '>');
+ }
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ processingInstruction(node, options, level) {
+ return this.stream.write(super.processingInstruction(node, options, level));
+ }
+
+ raw(node, options, level) {
+ return this.stream.write(super.raw(node, options, level));
+ }
+
+ text(node, options, level) {
+ return this.stream.write(super.text(node, options, level));
+ }
+
+ dtdAttList(node, options, level) {
+ return this.stream.write(super.dtdAttList(node, options, level));
+ }
+
+ dtdElement(node, options, level) {
+ return this.stream.write(super.dtdElement(node, options, level));
+ }
+
+ dtdEntity(node, options, level) {
+ return this.stream.write(super.dtdEntity(node, options, level));
+ }
+
+ dtdNotation(node, options, level) {
+ return this.stream.write(super.dtdNotation(node, options, level));
+ }
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./WriterState":15,"./XMLWriterBase":43}],40:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLStringWriter, XMLWriterBase;
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ // Prints XML nodes as plain text
+ module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStringWriter`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ super(options);
+ }
+
+ document(doc, options) {
+ var child, i, len, r, ref;
+ options = this.filterOptions(options);
+ r = '';
+ ref = doc.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, 0);
+ }
+ // remove trailing newline
+ if (options.pretty && r.slice(-options.newline.length) === options.newline) {
+ r = r.slice(0, -options.newline.length);
+ }
+ return r;
+ }
+
+ };
+
+}).call(this);
+
+},{"./XMLWriterBase":43}],41:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Converts values to strings
+ var XMLStringifier,
+ hasProp = {}.hasOwnProperty;
+
+ module.exports = XMLStringifier = (function() {
+ class XMLStringifier {
+ // Initializes a new instance of `XMLStringifier`
+
+ // `options.version` The version number string of the XML spec to validate against, e.g. 1.0
+ // `options.noDoubleEncoding` whether existing html entities are encoded: true or false
+ // `options.stringify` a set of functions to use for converting values to strings
+ // `options.noValidation` whether values will be validated and escaped or returned as is
+ // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation
+ constructor(options) {
+ var key, ref, value;
+ // Checks whether the given string contains legal characters
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalChar = this.assertLegalChar.bind(this);
+ // Checks whether the given string contains legal characters for a name
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalName = this.assertLegalName.bind(this);
+ options || (options = {});
+ this.options = options;
+ if (!this.options.version) {
+ this.options.version = '1.0';
+ }
+ ref = options.stringify || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this[key] = value;
+ }
+ }
+
+ // Defaults
+ name(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalName('' + val || '');
+ }
+
+ text(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.textEscape('' + val || ''));
+ }
+
+ cdata(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ val = val.replace(']]>', ']]]]><![CDATA[>');
+ return this.assertLegalChar(val);
+ }
+
+ comment(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/--/)) {
+ throw new Error("Comment text cannot contain double-hypen: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ raw(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return '' + val || '';
+ }
+
+ attValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.attEscape(val = '' + val || ''));
+ }
+
+ insTarget(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ insValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/\?>/)) {
+ throw new Error("Invalid processing instruction value: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlVersion(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/1\.[0-9]+/)) {
+ throw new Error("Invalid version number: " + val);
+ }
+ return val;
+ }
+
+ xmlEncoding(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
+ throw new Error("Invalid encoding: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlStandalone(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ if (val) {
+ return "yes";
+ } else {
+ return "no";
+ }
+ }
+
+ dtdPubID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdSysID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdElementValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttType(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttDefault(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdEntityValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdNData(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ assertLegalChar(str) {
+ var regex, res;
+ if (this.options.noValidation) {
+ return str;
+ }
+ if (this.options.version === '1.0') {
+ // Valid characters from https://www.w3.org/TR/xml/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_10_InvalidChars = regenerate()
+ // .addRange(0x0000, 0x0008)
+ // .add(0x000B, 0x000C)
+ // .addRange(0x000E, 0x001F)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ } else if (this.options.version === '1.1') {
+ // Valid characters from https://www.w3.org/TR/xml11/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_11_InvalidChars = regenerate()
+ // .add(0x0000)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ }
+ return str;
+ }
+
+ assertLegalName(str) {
+ var regex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ str = this.assertLegalChar(str);
+ regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
+ if (!str.match(regex)) {
+ throw new Error(`Invalid character in name: ${str}`);
+ }
+ return str;
+ }
+
+ // Escapes special characters in text
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ textEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\r/g, '&#xD;');
+ }
+
+ // Escapes special characters in attribute values
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ attEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/\t/g, '&#x9;').replace(/\n/g, '&#xA;').replace(/\r/g, '&#xD;');
+ }
+
+ };
+
+ // strings to match while converting from JS objects
+ XMLStringifier.prototype.convertAttKey = '@';
+
+ XMLStringifier.prototype.convertPIKey = '?';
+
+ XMLStringifier.prototype.convertTextKey = '#text';
+
+ XMLStringifier.prototype.convertCDataKey = '#cdata';
+
+ XMLStringifier.prototype.convertCommentKey = '#comment';
+
+ XMLStringifier.prototype.convertRawKey = '#raw';
+
+ return XMLStringifier;
+
+ }).call(this);
+
+}).call(this);
+
+},{}],42:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLText;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a text node
+ module.exports = XMLText = (function() {
+ class XMLText extends XMLCharacterData {
+ // Initializes a new instance of `XMLText`
+
+ // `text` element text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing element text. " + this.debugInfo());
+ }
+ this.name = "#text";
+ this.type = NodeType.Text;
+ this.value = this.stringify.text(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.text(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ splitText(offset) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ replaceWholeText(content) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 3
+ Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLText.prototype, 'wholeText', {
+ get: function() {
+ var next, prev, str;
+ str = '';
+ prev = this.previousSibling;
+ while (prev) {
+ str = prev.data + str;
+ prev = prev.previousSibling;
+ }
+ str += this.data;
+ next = this.nextSibling;
+ while (next) {
+ str = str + next.data;
+ next = next.nextSibling;
+ }
+ return str;
+ }
+ });
+
+ return XMLText;
+
+ }).call(this);
+
+}).call(this);
+
+},{"./NodeType":13,"./XMLCharacterData":18}],43:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
+ hasProp = {}.hasOwnProperty;
+
+ ({assign} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLElement = require('./XMLElement');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDummy = require('./XMLDummy');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ WriterState = require('./WriterState');
+
+ // Base class for XML writers
+ module.exports = XMLWriterBase = class XMLWriterBase {
+ // Initializes a new instance of `XMLWriterBase`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.width` maximum column width
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ var key, ref, value;
+ options || (options = {});
+ this.options = options;
+ ref = options.writer || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this["_" + key] = this[key];
+ this[key] = value;
+ }
+ }
+
+ // Filters writer options and provides defaults
+
+ // `options` writer options
+ filterOptions(options) {
+ var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
+ options || (options = {});
+ options = assign({}, this.options, options);
+ filteredOptions = {
+ writer: this
+ };
+ filteredOptions.pretty = options.pretty || false;
+ filteredOptions.allowEmpty = options.allowEmpty || false;
+ filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';
+ filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
+ filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
+ filteredOptions.width = (ref3 = options.width) != null ? ref3 : 0;
+ filteredOptions.dontPrettyTextNodes = (ref4 = (ref5 = options.dontPrettyTextNodes) != null ? ref5 : options.dontprettytextnodes) != null ? ref4 : 0;
+ filteredOptions.spaceBeforeSlash = (ref6 = (ref7 = options.spaceBeforeSlash) != null ? ref7 : options.spacebeforeslash) != null ? ref6 : '';
+ if (filteredOptions.spaceBeforeSlash === true) {
+ filteredOptions.spaceBeforeSlash = ' ';
+ }
+ filteredOptions.suppressPrettyCount = 0;
+ filteredOptions.user = {};
+ filteredOptions.state = WriterState.None;
+ return filteredOptions;
+ }
+
+ // Returns the indentation string for the current level
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ indent(node, options, level) {
+ var indentLevel;
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else if (options.pretty) {
+ indentLevel = (level || 0) + options.offset + 1;
+ if (indentLevel > 0) {
+ return new Array(indentLevel).join(options.indent);
+ }
+ }
+ return '';
+ }
+
+ // Returns the newline string
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ endline(node, options, level) {
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else {
+ return options.newline;
+ }
+ }
+
+ attribute(att, options, level) {
+ var r;
+ this.openAttribute(att, options, level);
+ if (options.pretty && options.width > 0) {
+ r = att.name + '="' + att.value + '"';
+ } else {
+ r = ' ' + att.name + '="' + att.value + '"';
+ }
+ this.closeAttribute(att, options, level);
+ return r;
+ }
+
+ cdata(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<![CDATA[';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ']]>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ comment(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!-- ';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ' -->' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ declaration(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?xml';
+ options.state = WriterState.InsideTag;
+ r += ' version="' + node.version + '"';
+ if (node.encoding != null) {
+ r += ' encoding="' + node.encoding + '"';
+ }
+ if (node.standalone != null) {
+ r += ' standalone="' + node.standalone + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ docType(node, options, level) {
+ var child, i, len1, r, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ r += '<!DOCTYPE ' + node.root().name;
+ // external identifier
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ r += ' [';
+ r += this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (i = 0, len1 = ref.length; i < len1; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ r += ']';
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;
+ level || (level = 0);
+ prettySuppressed = false;
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ r += '>';
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ r += '>';
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ r += this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ // if ANY are a text node, then suppress pretty now
+ if (options.dontPrettyTextNodes) {
+ ref2 = node.children;
+ for (i = 0, len1 = ref2.length; i < len1; i++) {
+ child = ref2[i];
+ if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) {
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ break;
+ }
+ }
+ }
+ // close the opening tag, after dealing with newline
+ r += '>' + this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref3 = node.children;
+ // inner tags
+ for (j = 0, len2 = ref3.length; j < len2; j++) {
+ child = ref3[j];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += this.indent(node, options, level) + '</' + node.name + '>';
+ if (prettySuppressed) {
+ options.suppressPrettyCount--;
+ }
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ }
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ writeChildNode(node, options, level) {
+ switch (node.type) {
+ case NodeType.CData:
+ return this.cdata(node, options, level);
+ case NodeType.Comment:
+ return this.comment(node, options, level);
+ case NodeType.Element:
+ return this.element(node, options, level);
+ case NodeType.Raw:
+ return this.raw(node, options, level);
+ case NodeType.Text:
+ return this.text(node, options, level);
+ case NodeType.ProcessingInstruction:
+ return this.processingInstruction(node, options, level);
+ case NodeType.Dummy:
+ return '';
+ case NodeType.Declaration:
+ return this.declaration(node, options, level);
+ case NodeType.DocType:
+ return this.docType(node, options, level);
+ case NodeType.AttributeDeclaration:
+ return this.dtdAttList(node, options, level);
+ case NodeType.ElementDeclaration:
+ return this.dtdElement(node, options, level);
+ case NodeType.EntityDeclaration:
+ return this.dtdEntity(node, options, level);
+ case NodeType.NotationDeclaration:
+ return this.dtdNotation(node, options, level);
+ default:
+ throw new Error("Unknown XML node type: " + node.constructor.name);
+ }
+ }
+
+ processingInstruction(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?';
+ options.state = WriterState.InsideTag;
+ r += node.target;
+ if (node.value) {
+ r += ' ' + node.value;
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ raw(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ text(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdAttList(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ATTLIST';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.elementName + ' ' + node.attributeName + ' ' + node.attributeType;
+ if (node.defaultValueType !== '#DEFAULT') {
+ r += ' ' + node.defaultValueType;
+ }
+ if (node.defaultValue) {
+ r += ' "' + node.defaultValue + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdElement(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ELEMENT';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name + ' ' + node.value;
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdEntity(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ENTITY';
+ options.state = WriterState.InsideTag;
+ if (node.pe) {
+ r += ' %';
+ }
+ r += ' ' + node.name;
+ if (node.value) {
+ r += ' "' + node.value + '"';
+ } else {
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ if (node.nData) {
+ r += ' NDATA ' + node.nData;
+ }
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdNotation(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!NOTATION';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name;
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.pubID) {
+ r += ' PUBLIC "' + node.pubID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ openNode(node, options, level) {}
+
+ closeNode(node, options, level) {}
+
+ openAttribute(att, options, level) {}
+
+ closeAttribute(att, options, level) {}
+
+ };
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./WriterState":15,"./XMLCData":17,"./XMLComment":19,"./XMLDTDAttList":24,"./XMLDTDElement":25,"./XMLDTDEntity":26,"./XMLDTDNotation":27,"./XMLDeclaration":28,"./XMLDocType":29,"./XMLDummy":32,"./XMLElement":33,"./XMLProcessingInstruction":37,"./XMLRaw":38,"./XMLText":42}],44:[function(require,module,exports){
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;
+
+ ({assign, isFunction} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLDocumentCB = require('./XMLDocumentCB');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ XMLStreamWriter = require('./XMLStreamWriter');
+
+ NodeType = require('./NodeType');
+
+ WriterState = require('./WriterState');
+
+ // Creates a new document and returns the root node for
+ // chain-building the document tree
+
+ // `name` name of the root element
+
+ // `xmldec.version` A version number string, e.g. 1.0
+ // `xmldec.encoding` Encoding declaration, e.g. UTF-8
+ // `xmldec.standalone` standalone document declaration: true or false
+
+ // `doctype.pubID` public identifier of the external subset
+ // `doctype.sysID` system identifier of the external subset
+
+ // `options.headless` whether XML declaration and doctype will be included:
+ // true or false
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ module.exports.create = function(name, xmldec, doctype, options) {
+ var doc, root;
+ if (name == null) {
+ throw new Error("Root element needs a name.");
+ }
+ options = assign({}, xmldec, doctype, options);
+ // create the document node
+ doc = new XMLDocument(options);
+ // add the root node
+ root = doc.element(name);
+ // prolog
+ if (!options.headless) {
+ doc.declaration(options);
+ if ((options.pubID != null) || (options.sysID != null)) {
+ doc.dtd(options);
+ }
+ }
+ return root;
+ };
+
+ // Creates a new document and returns the document node for
+ // chain-building the document tree
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its single
+ // argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ module.exports.begin = function(options, onData, onEnd) {
+ if (isFunction(options)) {
+ [onData, onEnd] = [options, onData];
+ options = {};
+ }
+ if (onData) {
+ return new XMLDocumentCB(options, onData, onEnd);
+ } else {
+ return new XMLDocument(options);
+ }
+ };
+
+ module.exports.stringWriter = function(options) {
+ return new XMLStringWriter(options);
+ };
+
+ module.exports.streamWriter = function(stream, options) {
+ return new XMLStreamWriter(stream, options);
+ };
+
+ module.exports.implementation = new XMLDOMImplementation();
+
+ module.exports.nodeType = NodeType;
+
+ module.exports.writerState = WriterState;
+
+}).call(this);
+
+},{"./NodeType":13,"./Utility":14,"./WriterState":15,"./XMLDOMImplementation":22,"./XMLDocument":30,"./XMLDocumentCB":31,"./XMLStreamWriter":39,"./XMLStringWriter":40}]},{},[1])(1)
+});
diff --git a/node_modules/plist/examples/browser/index.html b/node_modules/plist/examples/browser/index.html
new file mode 100644
index 0000000..8ce7d92
--- /dev/null
+++ b/node_modules/plist/examples/browser/index.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>plist.js browser example</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ </head>
+ <body>
+ <script src="../../dist/plist.js"></script>
+ <script>
+ // TODO: add <input type=file> drag and drop example
+ console.log(plist);
+ </script>
+ </body>
+</html>
diff --git a/node_modules/plist/index.js b/node_modules/plist/index.js
new file mode 100644
index 0000000..d7385ae
--- /dev/null
+++ b/node_modules/plist/index.js
@@ -0,0 +1,13 @@
+/**
+ * Parser functions.
+ */
+
+var parserFunctions = require('./lib/parse');
+Object.keys(parserFunctions).forEach(function (k) { exports[k] = parserFunctions[k]; });
+
+/**
+ * Builder functions.
+ */
+
+var builderFunctions = require('./lib/build');
+Object.keys(builderFunctions).forEach(function (k) { exports[k] = builderFunctions[k]; });
diff --git a/node_modules/plist/lib/build.js b/node_modules/plist/lib/build.js
new file mode 100644
index 0000000..abc829d
--- /dev/null
+++ b/node_modules/plist/lib/build.js
@@ -0,0 +1,140 @@
+/**
+ * Module dependencies.
+ */
+
+var base64 = require('base64-js');
+var xmlbuilder = require('xmlbuilder');
+
+/**
+ * Module exports.
+ */
+
+exports.build = build;
+
+/**
+ * Accepts a `Date` instance and returns an ISO date string.
+ *
+ * @param {Date} d - Date instance to serialize
+ * @returns {String} ISO date string representation of `d`
+ * @api private
+ */
+
+function ISODateString(d){
+ function pad(n){
+ return n < 10 ? '0' + n : n;
+ }
+ return d.getUTCFullYear()+'-'
+ + pad(d.getUTCMonth()+1)+'-'
+ + pad(d.getUTCDate())+'T'
+ + pad(d.getUTCHours())+':'
+ + pad(d.getUTCMinutes())+':'
+ + pad(d.getUTCSeconds())+'Z';
+}
+
+/**
+ * Returns the internal "type" of `obj` via the
+ * `Object.prototype.toString()` trick.
+ *
+ * @param {Mixed} obj - any value
+ * @returns {String} the internal "type" name
+ * @api private
+ */
+
+var toString = Object.prototype.toString;
+function type (obj) {
+ var m = toString.call(obj).match(/\[object (.*)\]/);
+ return m ? m[1] : m;
+}
+
+/**
+ * Generate an XML plist string from the input object `obj`.
+ *
+ * @param {Object} obj - the object to convert
+ * @param {Object} [opts] - optional options object
+ * @returns {String} converted plist XML string
+ * @api public
+ */
+
+function build (obj, opts) {
+ var XMLHDR = {
+ version: '1.0',
+ encoding: 'UTF-8'
+ };
+
+ var XMLDTD = {
+ pubid: '-//Apple//DTD PLIST 1.0//EN',
+ sysid: 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'
+ };
+
+ var doc = xmlbuilder.create('plist');
+
+ doc.dec(XMLHDR.version, XMLHDR.encoding, XMLHDR.standalone);
+ doc.dtd(XMLDTD.pubid, XMLDTD.sysid);
+ doc.att('version', '1.0');
+
+ walk_obj(obj, doc);
+
+ if (!opts) opts = {};
+ // default `pretty` to `true`
+ opts.pretty = opts.pretty !== false;
+ return doc.end(opts);
+}
+
+/**
+ * depth first, recursive traversal of a javascript object. when complete,
+ * next_child contains a reference to the build XML object.
+ *
+ * @api private
+ */
+
+function walk_obj(next, next_child) {
+ var tag_type, i, prop;
+ var name = type(next);
+
+ if ('Undefined' == name) {
+ return;
+ } else if (Array.isArray(next)) {
+ next_child = next_child.ele('array');
+ for (i = 0; i < next.length; i++) {
+ walk_obj(next[i], next_child);
+ }
+
+ } else if (Buffer.isBuffer(next)) {
+ next_child.ele('data').raw(next.toString('base64'));
+
+ } else if ('Object' == name) {
+ next_child = next_child.ele('dict');
+ for (prop in next) {
+ if (next.hasOwnProperty(prop)) {
+ next_child.ele('key').txt(prop);
+ walk_obj(next[prop], next_child);
+ }
+ }
+
+ } else if ('Number' == name) {
+ // detect if this is an integer or real
+ // TODO: add an ability to force one way or another via a "cast"
+ tag_type = (next % 1 === 0) ? 'integer' : 'real';
+ next_child.ele(tag_type).txt(next.toString());
+
+ } else if ('Date' == name) {
+ next_child.ele('date').txt(ISODateString(new Date(next)));
+
+ } else if ('Boolean' == name) {
+ next_child.ele(next ? 'true' : 'false');
+
+ } else if ('String' == name) {
+ next_child.ele('string').txt(next);
+
+ } else if ('ArrayBuffer' == name) {
+ next_child.ele('data').raw(base64.fromByteArray(next));
+
+ } else if (next && next.buffer && 'ArrayBuffer' == type(next.buffer)) {
+ // a typed array
+ next_child.ele('data').raw(base64.fromByteArray(new Uint8Array(next.buffer), next_child));
+
+ } else if ('Null' === name) {
+ next_child.ele('null').txt('');
+
+ }
+}
diff --git a/node_modules/plist/lib/parse.js b/node_modules/plist/lib/parse.js
new file mode 100644
index 0000000..9274336
--- /dev/null
+++ b/node_modules/plist/lib/parse.js
@@ -0,0 +1,227 @@
+/**
+ * Module dependencies.
+ */
+
+var DOMParser = require('./xmldom/dom-parser').DOMParser;
+
+/**
+ * Module exports.
+ */
+
+exports.parse = parse;
+
+var TEXT_NODE = 3;
+var CDATA_NODE = 4;
+var COMMENT_NODE = 8;
+
+
+/**
+ * We ignore raw text (usually whitespace), <!-- xml comments -->,
+ * and raw CDATA nodes.
+ *
+ * @param {Element} node
+ * @returns {Boolean}
+ * @api private
+ */
+
+function shouldIgnoreNode (node) {
+ return node.nodeType === TEXT_NODE
+ || node.nodeType === COMMENT_NODE
+ || node.nodeType === CDATA_NODE;
+}
+
+/**
+ * Check if the node is empty. Some plist file has such node:
+ * <key />
+ * this node shoud be ignored.
+ *
+ * @see https://github.com/TooTallNate/plist.js/issues/66
+ * @param {Element} node
+ * @returns {Boolean}
+ * @api private
+ */
+function isEmptyNode(node){
+ if(!node.childNodes || node.childNodes.length === 0) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function invariant(test, message) {
+ if (!test) {
+ throw new Error(message);
+ }
+}
+
+/**
+ * Parses a Plist XML string. Returns an Object.
+ *
+ * @param {String} xml - the XML String to decode
+ * @returns {Mixed} the decoded value from the Plist XML
+ * @api public
+ */
+
+function parse (xml) {
+ var doc = new DOMParser().parseFromString(xml);
+ invariant(
+ doc.documentElement.nodeName === 'plist',
+ 'malformed document. First element should be <plist>'
+ );
+ var plist = parsePlistXML(doc.documentElement);
+
+ // the root <plist> node gets interpreted as an Array,
+ // so pull out the inner data first
+ if (plist.length == 1) plist = plist[0];
+
+ return plist;
+}
+
+/**
+ * Convert an XML based plist document into a JSON representation.
+ *
+ * @param {Object} xml_node - current XML node in the plist
+ * @returns {Mixed} built up JSON object
+ * @api private
+ */
+
+function parsePlistXML (node) {
+ var i, new_obj, key, val, new_arr, res, counter, type;
+
+ if (!node)
+ return null;
+
+ if (node.nodeName === 'plist') {
+ new_arr = [];
+ if (isEmptyNode(node)) {
+ return new_arr;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (!shouldIgnoreNode(node.childNodes[i])) {
+ new_arr.push( parsePlistXML(node.childNodes[i]));
+ }
+ }
+ return new_arr;
+ } else if (node.nodeName === 'dict') {
+ new_obj = {};
+ key = null;
+ counter = 0;
+ if (isEmptyNode(node)) {
+ return new_obj;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (shouldIgnoreNode(node.childNodes[i])) continue;
+ if (counter % 2 === 0) {
+ invariant(
+ node.childNodes[i].nodeName === 'key',
+ 'Missing key while parsing <dict/>.'
+ );
+ key = parsePlistXML(node.childNodes[i]);
+ } else {
+ invariant(
+ node.childNodes[i].nodeName !== 'key',
+ 'Unexpected key "'
+ + parsePlistXML(node.childNodes[i])
+ + '" while parsing <dict/>.'
+ );
+ new_obj[key] = parsePlistXML(node.childNodes[i]);
+ }
+ counter += 1;
+ }
+ if (counter % 2 === 1) {
+ new_obj[key] = '';
+ }
+
+ return new_obj;
+
+ } else if (node.nodeName === 'array') {
+ new_arr = [];
+ if (isEmptyNode(node)) {
+ return new_arr;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (!shouldIgnoreNode(node.childNodes[i])) {
+ res = parsePlistXML(node.childNodes[i]);
+ if (null != res) new_arr.push(res);
+ }
+ }
+ return new_arr;
+
+ } else if (node.nodeName === '#text') {
+ // TODO: what should we do with text types? (CDATA sections)
+
+ } else if (node.nodeName === 'key') {
+ if (isEmptyNode(node)) {
+ return '';
+ }
+
+ invariant(
+ node.childNodes[0].nodeValue !== '__proto__',
+ '__proto__ keys can lead to prototype pollution. More details on CVE-2022-22912'
+ );
+
+ return node.childNodes[0].nodeValue;
+ } else if (node.nodeName === 'string') {
+ res = '';
+ if (isEmptyNode(node)) {
+ return res;
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ var type = node.childNodes[i].nodeType;
+ if (type === TEXT_NODE || type === CDATA_NODE) {
+ res += node.childNodes[i].nodeValue;
+ }
+ }
+ return res;
+
+ } else if (node.nodeName === 'integer') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as integer.'
+ );
+ return parseInt(node.childNodes[0].nodeValue, 10);
+
+ } else if (node.nodeName === 'real') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as real.'
+ );
+ res = '';
+ for (i=0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === TEXT_NODE) {
+ res += node.childNodes[i].nodeValue;
+ }
+ }
+ return parseFloat(res);
+
+ } else if (node.nodeName === 'data') {
+ res = '';
+ if (isEmptyNode(node)) {
+ return Buffer.from(res, 'base64');
+ }
+ for (i=0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === TEXT_NODE) {
+ res += node.childNodes[i].nodeValue.replace(/\s+/g, '');
+ }
+ }
+ return Buffer.from(res, 'base64');
+
+ } else if (node.nodeName === 'date') {
+ invariant(
+ !isEmptyNode(node),
+ 'Cannot parse "" as Date.'
+ )
+ return new Date(node.childNodes[0].nodeValue);
+
+ } else if (node.nodeName === 'null') {
+ return null;
+
+ } else if (node.nodeName === 'true') {
+ return true;
+
+ } else if (node.nodeName === 'false') {
+ return false;
+ } else {
+ throw new Error('Invalid PLIST tag ' + node.nodeName);
+ }
+}
diff --git a/node_modules/plist/lib/xmldom/dom-parser.js b/node_modules/plist/lib/xmldom/dom-parser.js
new file mode 100644
index 0000000..2ad090d
--- /dev/null
+++ b/node_modules/plist/lib/xmldom/dom-parser.js
@@ -0,0 +1,253 @@
+function DOMParser(options){
+ this.options = options ||{locator:{}};
+}
+
+DOMParser.prototype.parseFromString = function(source,mimeType){
+ var options = this.options;
+ var sax = new XMLReader();
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
+ var errorHandler = options.errorHandler;
+ var locator = options.locator;
+ var defaultNSMap = options.xmlns||{};
+ var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;
+ var entityMap = isHTML?htmlEntity.entityMap:{'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"};
+ if(locator){
+ domBuilder.setDocumentLocator(locator)
+ }
+
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
+ sax.domBuilder = options.domBuilder || domBuilder;
+ if(isHTML){
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
+ }
+ defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';
+ if(source && typeof source === 'string'){
+ sax.parse(source,defaultNSMap,entityMap);
+ }else{
+ sax.errorHandler.error("invalid doc source");
+ }
+ return domBuilder.doc;
+}
+function buildErrorHandler(errorImpl,domBuilder,locator){
+ if(!errorImpl){
+ if(domBuilder instanceof DOMHandler){
+ return domBuilder;
+ }
+ errorImpl = domBuilder ;
+ }
+ var errorHandler = {}
+ var isCallback = errorImpl instanceof Function;
+ locator = locator||{}
+ function build(key){
+ var fn = errorImpl[key];
+ if(!fn && isCallback){
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
+ }
+ errorHandler[key] = fn && function(msg){
+ fn('[xmldom '+key+']\t'+msg+_locator(locator));
+ }||function(){};
+ }
+ build('warning');
+ build('error');
+ build('fatalError');
+ return errorHandler;
+}
+
+//console.log('#\n\n\n\n\n\n\n####')
+/**
+ * +ContentHandler+ErrorHandler
+ * +LexicalHandler+EntityResolver2
+ * -DeclHandler-DTDHandler
+ *
+ * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
+ * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
+ */
+function DOMHandler() {
+ this.cdata = false;
+}
+function position(locator,node){
+ node.lineNumber = locator.lineNumber;
+ node.columnNumber = locator.columnNumber;
+}
+/**
+ * @see org.xml.sax.ContentHandler#startDocument
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
+ */
+DOMHandler.prototype = {
+ startDocument : function() {
+ this.doc = new DOMImplementation().createDocument(null, null, null);
+ if (this.locator) {
+ this.doc.documentURI = this.locator.systemId;
+ }
+ },
+ startElement:function(namespaceURI, localName, qName, attrs) {
+ var doc = this.doc;
+ var el = doc.createElementNS(namespaceURI, qName||localName);
+ var len = attrs.length;
+ appendElement(this, el);
+ this.currentElement = el;
+
+ this.locator && position(this.locator,el)
+ for (var i = 0 ; i < len; i++) {
+ var namespaceURI = attrs.getURI(i);
+ var value = attrs.getValue(i);
+ var qName = attrs.getQName(i);
+ var attr = doc.createAttributeNS(namespaceURI, qName);
+ this.locator &&position(attrs.getLocator(i),attr);
+ attr.value = attr.nodeValue = value;
+ el.setAttributeNode(attr)
+ }
+ },
+ endElement:function(namespaceURI, localName, qName) {
+ var current = this.currentElement
+ var tagName = current.tagName;
+ this.currentElement = current.parentNode;
+ },
+ startPrefixMapping:function(prefix, uri) {
+ },
+ endPrefixMapping:function(prefix) {
+ },
+ processingInstruction:function(target, data) {
+ var ins = this.doc.createProcessingInstruction(target, data);
+ this.locator && position(this.locator,ins)
+ appendElement(this, ins);
+ },
+ ignorableWhitespace:function(ch, start, length) {
+ },
+ characters:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ //console.log(chars)
+ if(chars){
+ if (this.cdata) {
+ var charNode = this.doc.createCDATASection(chars);
+ } else {
+ var charNode = this.doc.createTextNode(chars);
+ }
+ if(this.currentElement){
+ this.currentElement.appendChild(charNode);
+ }else if(/^\s*$/.test(chars)){
+ this.doc.appendChild(charNode);
+ //process xml
+ }
+ this.locator && position(this.locator,charNode)
+ }
+ },
+ skippedEntity:function(name) {
+ },
+ endDocument:function() {
+ this.doc.normalize();
+ },
+ setDocumentLocator:function (locator) {
+ if(this.locator = locator){// && !('lineNumber' in locator)){
+ locator.lineNumber = 0;
+ }
+ },
+ //LexicalHandler
+ comment:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ var comm = this.doc.createComment(chars);
+ this.locator && position(this.locator,comm)
+ appendElement(this, comm);
+ },
+
+ startCDATA:function() {
+ //used in characters() methods
+ this.cdata = true;
+ },
+ endCDATA:function() {
+ this.cdata = false;
+ },
+
+ startDTD:function(name, publicId, systemId) {
+ var impl = this.doc.implementation;
+ if (impl && impl.createDocumentType) {
+ var dt = impl.createDocumentType(name, publicId, systemId);
+ this.locator && position(this.locator,dt)
+ appendElement(this, dt);
+ }
+ },
+ /**
+ * @see org.xml.sax.ErrorHandler
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
+ */
+ warning:function(error) {
+ console.warn('[xmldom warning]\t'+error,_locator(this.locator));
+ },
+ error:function(error) {
+ console.error('[xmldom error]\t'+error,_locator(this.locator));
+ },
+ fatalError:function(error) {
+ throw new ParseError(error, this.locator);
+ }
+}
+function _locator(l){
+ if(l){
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
+ }
+}
+function _toString(chars,start,length){
+ if(typeof chars == 'string'){
+ return chars.substr(start,length)
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
+ if(chars.length >= start+length || start){
+ return new java.lang.String(chars,start,length)+'';
+ }
+ return chars;
+ }
+}
+
+/*
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html
+ * used method of org.xml.sax.ext.LexicalHandler:
+ * #comment(chars, start, length)
+ * #startCDATA()
+ * #endCDATA()
+ * #startDTD(name, publicId, systemId)
+ *
+ *
+ * IGNORED method of org.xml.sax.ext.LexicalHandler:
+ * #endDTD()
+ * #startEntity(name)
+ * #endEntity(name)
+ *
+ *
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html
+ * IGNORED method of org.xml.sax.ext.DeclHandler
+ * #attributeDecl(eName, aName, type, mode, value)
+ * #elementDecl(name, model)
+ * #externalEntityDecl(name, publicId, systemId)
+ * #internalEntityDecl(name, value)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html
+ * IGNORED method of org.xml.sax.EntityResolver2
+ * #resolveEntity(String name,String publicId,String baseURI,String systemId)
+ * #resolveEntity(publicId, systemId)
+ * #getExternalSubset(name, baseURI)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html
+ * IGNORED method of org.xml.sax.DTDHandler
+ * #notationDecl(name, publicId, systemId) {};
+ * #unparsedEntityDecl(name, publicId, systemId, notationName) {};
+ */
+"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
+ DOMHandler.prototype[key] = function(){return null}
+})
+
+/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */
+function appendElement (hander,node) {
+ if (!hander.currentElement) {
+ hander.doc.appendChild(node);
+ } else {
+ hander.currentElement.appendChild(node);
+ }
+}//appendChild and setAttributeNS are preformance key
+
+//if(typeof require == 'function'){
+var htmlEntity = require('./entities');
+var sax = require('./sax');
+var XMLReader = sax.XMLReader;
+var ParseError = sax.ParseError;
+var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
+exports.XMLSerializer = require('./dom').XMLSerializer ;
+exports.DOMParser = DOMParser;
+exports.__DOMHandler = DOMHandler;
+//}
diff --git a/node_modules/plist/lib/xmldom/dom.js b/node_modules/plist/lib/xmldom/dom.js
new file mode 100644
index 0000000..12288c8
--- /dev/null
+++ b/node_modules/plist/lib/xmldom/dom.js
@@ -0,0 +1,1283 @@
+function copy(src,dest){
+ for(var p in src){
+ dest[p] = src[p];
+ }
+}
+/**
+^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
+^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));?
+ */
+function _extends(Class,Super){
+ var pt = Class.prototype;
+ if(!(pt instanceof Super)){
+ function t(){};
+ t.prototype = Super.prototype;
+ t = new t();
+ copy(pt,t);
+ Class.prototype = pt = t;
+ }
+ if(pt.constructor != Class){
+ if(typeof Class != 'function'){
+ console.error("unknow Class:"+Class)
+ }
+ pt.constructor = Class
+ }
+}
+var htmlns = 'http://www.w3.org/1999/xhtml' ;
+// Node Types
+var NodeType = {}
+var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
+var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
+var TEXT_NODE = NodeType.TEXT_NODE = 3;
+var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
+var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
+var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
+var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
+var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
+var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
+var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
+var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
+var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
+
+// ExceptionCode
+var ExceptionCode = {}
+var ExceptionMessage = {};
+var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
+var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
+var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
+var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
+var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
+var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
+var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
+var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
+var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
+var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
+//level2
+var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
+var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
+var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
+var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
+var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
+
+/**
+ * DOM Level 2
+ * Object DOMException
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
+ */
+function DOMException(code, message) {
+ if(message instanceof Error){
+ var error = message;
+ }else{
+ error = this;
+ Error.call(this, ExceptionMessage[code]);
+ this.message = ExceptionMessage[code];
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
+ }
+ error.code = code;
+ if(message) this.message = this.message + ": " + message;
+ return error;
+};
+DOMException.prototype = Error.prototype;
+copy(ExceptionCode,DOMException)
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177
+ * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.
+ * The items in the NodeList are accessible via an integral index, starting from 0.
+ */
+function NodeList() {
+};
+NodeList.prototype = {
+ /**
+ * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
+ * @standard level1
+ */
+ length:0,
+ /**
+ * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
+ * @standard level1
+ * @param index unsigned long
+ * Index into the collection.
+ * @return Node
+ * The node at the indexth position in the NodeList, or null if that is not a valid index.
+ */
+ item: function(index) {
+ return this[index] || null;
+ },
+ toString:function(isHTML,nodeFilter){
+ for(var buf = [], i = 0;i<this.length;i++){
+ serializeToString(this[i],buf,isHTML,nodeFilter);
+ }
+ return buf.join('');
+ }
+};
+function LiveNodeList(node,refresh){
+ this._node = node;
+ this._refresh = refresh
+ _updateLiveList(this);
+}
+function _updateLiveList(list){
+ var inc = list._node._inc || list._node.ownerDocument._inc;
+ if(list._inc != inc){
+ var ls = list._refresh(list._node);
+ //console.log(ls.length)
+ __set__(list,'length',ls.length);
+ copy(ls,list);
+ list._inc = inc;
+ }
+}
+LiveNodeList.prototype.item = function(i){
+ _updateLiveList(this);
+ return this[i];
+}
+
+_extends(LiveNodeList,NodeList);
+/**
+ *
+ * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.
+ * NamedNodeMap objects in the DOM are live.
+ * used for attributes or DocumentType entities
+ */
+function NamedNodeMap() {
+};
+
+function _findNodeIndex(list,node){
+ var i = list.length;
+ while(i--){
+ if(list[i] === node){return i}
+ }
+}
+
+function _addNamedNode(el,list,newAttr,oldAttr){
+ if(oldAttr){
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
+ }else{
+ list[list.length++] = newAttr;
+ }
+ if(el){
+ newAttr.ownerElement = el;
+ var doc = el.ownerDocument;
+ if(doc){
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
+ _onAddAttribute(doc,el,newAttr);
+ }
+ }
+}
+function _removeNamedNode(el,list,attr){
+ //console.log('remove attr:'+attr)
+ var i = _findNodeIndex(list,attr);
+ if(i>=0){
+ var lastIndex = list.length-1
+ while(i<lastIndex){
+ list[i] = list[++i]
+ }
+ list.length = lastIndex;
+ if(el){
+ var doc = el.ownerDocument;
+ if(doc){
+ _onRemoveAttribute(doc,el,attr);
+ attr.ownerElement = null;
+ }
+ }
+ }else{
+ throw DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))
+ }
+}
+NamedNodeMap.prototype = {
+ length:0,
+ item:NodeList.prototype.item,
+ getNamedItem: function(key) {
+// if(key.indexOf(':')>0 || key == 'xmlns'){
+// return null;
+// }
+ //console.log()
+ var i = this.length;
+ while(i--){
+ var attr = this[i];
+ //console.log(attr.nodeName,key)
+ if(attr.nodeName == key){
+ return attr;
+ }
+ }
+ },
+ setNamedItem: function(attr) {
+ var el = attr.ownerElement;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ var oldAttr = this.getNamedItem(attr.nodeName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ /* returns Node */
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
+ var el = attr.ownerElement, oldAttr;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+
+ /* returns Node */
+ removeNamedItem: function(key) {
+ var attr = this.getNamedItem(key);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+
+
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
+
+ //for level2
+ removeNamedItemNS:function(namespaceURI,localName){
+ var attr = this.getNamedItemNS(namespaceURI,localName);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+ },
+ getNamedItemNS: function(namespaceURI, localName) {
+ var i = this.length;
+ while(i--){
+ var node = this[i];
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
+ return node;
+ }
+ }
+ return null;
+ }
+};
+/**
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490
+ */
+function DOMImplementation(/* Object */ features) {
+ this._features = {};
+ if (features) {
+ for (var feature in features) {
+ this._features = features[feature];
+ }
+ }
+};
+
+DOMImplementation.prototype = {
+ hasFeature: function(/* string */ feature, /* string */ version) {
+ var versions = this._features[feature.toLowerCase()];
+ if (versions && (!version || version in versions)) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ // Introduced in DOM Level 2:
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
+ var doc = new Document();
+ doc.implementation = this;
+ doc.childNodes = new NodeList();
+ doc.doctype = doctype;
+ if(doctype){
+ doc.appendChild(doctype);
+ }
+ if(qualifiedName){
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
+ doc.appendChild(root);
+ }
+ return doc;
+ },
+ // Introduced in DOM Level 2:
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
+ var node = new DocumentType();
+ node.name = qualifiedName;
+ node.nodeName = qualifiedName;
+ node.publicId = publicId;
+ node.systemId = systemId;
+ // Introduced in DOM Level 2:
+ //readonly attribute DOMString internalSubset;
+
+ //TODO:..
+ // readonly attribute NamedNodeMap entities;
+ // readonly attribute NamedNodeMap notations;
+ return node;
+ }
+};
+
+
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
+ */
+
+function Node() {
+};
+
+Node.prototype = {
+ firstChild : null,
+ lastChild : null,
+ previousSibling : null,
+ nextSibling : null,
+ attributes : null,
+ parentNode : null,
+ childNodes : null,
+ ownerDocument : null,
+ nodeValue : null,
+ namespaceURI : null,
+ prefix : null,
+ localName : null,
+ // Modified in DOM Level 2:
+ insertBefore:function(newChild, refChild){//raises
+ return _insertBefore(this,newChild,refChild);
+ },
+ replaceChild:function(newChild, oldChild){//raises
+ this.insertBefore(newChild,oldChild);
+ if(oldChild){
+ this.removeChild(oldChild);
+ }
+ },
+ removeChild:function(oldChild){
+ return _removeChild(this,oldChild);
+ },
+ appendChild:function(newChild){
+ return this.insertBefore(newChild,null);
+ },
+ hasChildNodes:function(){
+ return this.firstChild != null;
+ },
+ cloneNode:function(deep){
+ return cloneNode(this.ownerDocument||this,this,deep);
+ },
+ // Modified in DOM Level 2:
+ normalize:function(){
+ var child = this.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
+ this.removeChild(next);
+ child.appendData(next.data);
+ }else{
+ child.normalize();
+ child = next;
+ }
+ }
+ },
+ // Introduced in DOM Level 2:
+ isSupported:function(feature, version){
+ return this.ownerDocument.implementation.hasFeature(feature,version);
+ },
+ // Introduced in DOM Level 2:
+ hasAttributes:function(){
+ return this.attributes.length>0;
+ },
+ lookupPrefix:function(namespaceURI){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ for(var n in map){
+ if(map[n] == namespaceURI){
+ return n;
+ }
+ }
+ }
+ el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ lookupNamespaceURI:function(prefix){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ if(prefix in map){
+ return map[prefix] ;
+ }
+ }
+ el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ isDefaultNamespace:function(namespaceURI){
+ var prefix = this.lookupPrefix(namespaceURI);
+ return prefix == null;
+ }
+};
+
+
+function _xmlEncoder(c){
+ return c == '<' && '&lt;' ||
+ c == '>' && '&gt;' ||
+ c == '&' && '&amp;' ||
+ c == '"' && '&quot;' ||
+ '&#'+c.charCodeAt()+';'
+}
+
+
+copy(NodeType,Node);
+copy(NodeType,Node.prototype);
+
+/**
+ * @param callback return true for continue,false for break
+ * @return boolean true: break visit;
+ */
+function _visitNode(node,callback){
+ if(callback(node)){
+ return true;
+ }
+ if(node = node.firstChild){
+ do{
+ if(_visitNode(node,callback)){return true}
+ }while(node=node.nextSibling)
+ }
+}
+
+
+
+function Document(){
+}
+function _onAddAttribute(doc,el,newAttr){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
+ }
+}
+function _onRemoveAttribute(doc,el,newAttr,remove){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ delete el._nsMap[newAttr.prefix?newAttr.localName:'']
+ }
+}
+function _onUpdateChild(doc,el,newChild){
+ if(doc && doc._inc){
+ doc._inc++;
+ //update childNodes
+ var cs = el.childNodes;
+ if(newChild){
+ cs[cs.length++] = newChild;
+ }else{
+ //console.log(1)
+ var child = el.firstChild;
+ var i = 0;
+ while(child){
+ cs[i++] = child;
+ child =child.nextSibling;
+ }
+ cs.length = i;
+ }
+ }
+}
+
+/**
+ * attributes;
+ * children;
+ *
+ * writeable properties:
+ * nodeValue,Attr:value,CharacterData:data
+ * prefix
+ */
+function _removeChild(parentNode,child){
+ var previous = child.previousSibling;
+ var next = child.nextSibling;
+ if(previous){
+ previous.nextSibling = next;
+ }else{
+ parentNode.firstChild = next
+ }
+ if(next){
+ next.previousSibling = previous;
+ }else{
+ parentNode.lastChild = previous;
+ }
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
+ return child;
+}
+/**
+ * preformance key(refChild == null)
+ */
+function _insertBefore(parentNode,newChild,nextChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ cp.removeChild(newChild);//remove and update
+ }
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ var newFirst = newChild.firstChild;
+ if (newFirst == null) {
+ return newChild;
+ }
+ var newLast = newChild.lastChild;
+ }else{
+ newFirst = newLast = newChild;
+ }
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
+
+ newFirst.previousSibling = pre;
+ newLast.nextSibling = nextChild;
+
+
+ if(pre){
+ pre.nextSibling = newFirst;
+ }else{
+ parentNode.firstChild = newFirst;
+ }
+ if(nextChild == null){
+ parentNode.lastChild = newLast;
+ }else{
+ nextChild.previousSibling = newLast;
+ }
+ do{
+ newFirst.parentNode = parentNode;
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
+ //console.log(parentNode.lastChild.nextSibling == null)
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
+ newChild.firstChild = newChild.lastChild = null;
+ }
+ return newChild;
+}
+function _appendSingleChild(parentNode,newChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ var pre = parentNode.lastChild;
+ cp.removeChild(newChild);//remove and update
+ var pre = parentNode.lastChild;
+ }
+ var pre = parentNode.lastChild;
+ newChild.parentNode = parentNode;
+ newChild.previousSibling = pre;
+ newChild.nextSibling = null;
+ if(pre){
+ pre.nextSibling = newChild;
+ }else{
+ parentNode.firstChild = newChild;
+ }
+ parentNode.lastChild = newChild;
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
+ return newChild;
+ //console.log("__aa",parentNode.lastChild.nextSibling == null)
+}
+Document.prototype = {
+ //implementation : null,
+ nodeName : '#document',
+ nodeType : DOCUMENT_NODE,
+ doctype : null,
+ documentElement : null,
+ _inc : 1,
+
+ insertBefore : function(newChild, refChild){//raises
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
+ var child = newChild.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ this.insertBefore(child,refChild);
+ child = next;
+ }
+ return newChild;
+ }
+ if(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){
+ this.documentElement = newChild;
+ }
+
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
+ },
+ removeChild : function(oldChild){
+ if(this.documentElement == oldChild){
+ this.documentElement = null;
+ }
+ return _removeChild(this,oldChild);
+ },
+ // Introduced in DOM Level 2:
+ importNode : function(importedNode,deep){
+ return importNode(this,importedNode,deep);
+ },
+ // Introduced in DOM Level 2:
+ getElementById : function(id){
+ var rtv = null;
+ _visitNode(this.documentElement,function(node){
+ if(node.nodeType == ELEMENT_NODE){
+ if(node.getAttribute('id') == id){
+ rtv = node;
+ return true;
+ }
+ }
+ })
+ return rtv;
+ },
+
+ getElementsByClassName: function(className) {
+ var pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
+ return new LiveNodeList(this, function(base) {
+ var ls = [];
+ _visitNode(base.documentElement, function(node) {
+ if(node !== base && node.nodeType == ELEMENT_NODE) {
+ if(pattern.test(node.getAttribute('class'))) {
+ ls.push(node);
+ }
+ }
+ });
+ return ls;
+ });
+ },
+
+ //document factory method:
+ createElement : function(tagName){
+ var node = new Element();
+ node.ownerDocument = this;
+ node.nodeName = tagName;
+ node.tagName = tagName;
+ node.childNodes = new NodeList();
+ var attrs = node.attributes = new NamedNodeMap();
+ attrs._ownerElement = node;
+ return node;
+ },
+ createDocumentFragment : function(){
+ var node = new DocumentFragment();
+ node.ownerDocument = this;
+ node.childNodes = new NodeList();
+ return node;
+ },
+ createTextNode : function(data){
+ var node = new Text();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createComment : function(data){
+ var node = new Comment();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createCDATASection : function(data){
+ var node = new CDATASection();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createProcessingInstruction : function(target,data){
+ var node = new ProcessingInstruction();
+ node.ownerDocument = this;
+ node.tagName = node.target = target;
+ node.nodeValue= node.data = data;
+ return node;
+ },
+ createAttribute : function(name){
+ var node = new Attr();
+ node.ownerDocument = this;
+ node.name = name;
+ node.nodeName = name;
+ node.localName = name;
+ node.specified = true;
+ return node;
+ },
+ createEntityReference : function(name){
+ var node = new EntityReference();
+ node.ownerDocument = this;
+ node.nodeName = name;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createElementNS : function(namespaceURI,qualifiedName){
+ var node = new Element();
+ var pl = qualifiedName.split(':');
+ var attrs = node.attributes = new NamedNodeMap();
+ node.childNodes = new NodeList();
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.tagName = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ attrs._ownerElement = node;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createAttributeNS : function(namespaceURI,qualifiedName){
+ var node = new Attr();
+ var pl = qualifiedName.split(':');
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.name = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ node.specified = true;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ return node;
+ }
+};
+_extends(Document,Node);
+
+
+function Element() {
+ this._nsMap = {};
+};
+Element.prototype = {
+ nodeType : ELEMENT_NODE,
+ hasAttribute : function(name){
+ return this.getAttributeNode(name)!=null;
+ },
+ getAttribute : function(name){
+ var attr = this.getAttributeNode(name);
+ return attr && attr.value || '';
+ },
+ getAttributeNode : function(name){
+ return this.attributes.getNamedItem(name);
+ },
+ setAttribute : function(name, value){
+ var attr = this.ownerDocument.createAttribute(name);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ removeAttribute : function(name){
+ var attr = this.getAttributeNode(name)
+ attr && this.removeAttributeNode(attr);
+ },
+
+ //four real opeartion method
+ appendChild:function(newChild){
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ return this.insertBefore(newChild,null);
+ }else{
+ return _appendSingleChild(this,newChild);
+ }
+ },
+ setAttributeNode : function(newAttr){
+ return this.attributes.setNamedItem(newAttr);
+ },
+ setAttributeNodeNS : function(newAttr){
+ return this.attributes.setNamedItemNS(newAttr);
+ },
+ removeAttributeNode : function(oldAttr){
+ //console.log(this == oldAttr.ownerElement)
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
+ },
+ //get real attribute name,and remove it by removeAttributeNode
+ removeAttributeNS : function(namespaceURI, localName){
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
+ old && this.removeAttributeNode(old);
+ },
+
+ hasAttributeNS : function(namespaceURI, localName){
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
+ },
+ getAttributeNS : function(namespaceURI, localName){
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
+ return attr && attr.value || '';
+ },
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ getAttributeNodeNS : function(namespaceURI, localName){
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
+ },
+
+ getElementsByTagName : function(tagName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ },
+ getElementsByTagNameNS : function(namespaceURI, localName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+
+ });
+ }
+};
+Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
+Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
+
+
+_extends(Element,Node);
+function Attr() {
+};
+Attr.prototype.nodeType = ATTRIBUTE_NODE;
+_extends(Attr,Node);
+
+
+function CharacterData() {
+};
+CharacterData.prototype = {
+ data : '',
+ substringData : function(offset, count) {
+ return this.data.substring(offset, offset+count);
+ },
+ appendData: function(text) {
+ text = this.data+text;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ },
+ insertData: function(offset,text) {
+ this.replaceData(offset,0,text);
+
+ },
+ appendChild:function(newChild){
+ throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])
+ },
+ deleteData: function(offset, count) {
+ this.replaceData(offset,count,"");
+ },
+ replaceData: function(offset, count, text) {
+ var start = this.data.substring(0,offset);
+ var end = this.data.substring(offset+count);
+ text = start + text + end;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ }
+}
+_extends(CharacterData,Node);
+function Text() {
+};
+Text.prototype = {
+ nodeName : "#text",
+ nodeType : TEXT_NODE,
+ splitText : function(offset) {
+ var text = this.data;
+ var newText = text.substring(offset);
+ text = text.substring(0, offset);
+ this.data = this.nodeValue = text;
+ this.length = text.length;
+ var newNode = this.ownerDocument.createTextNode(newText);
+ if(this.parentNode){
+ this.parentNode.insertBefore(newNode, this.nextSibling);
+ }
+ return newNode;
+ }
+}
+_extends(Text,CharacterData);
+function Comment() {
+};
+Comment.prototype = {
+ nodeName : "#comment",
+ nodeType : COMMENT_NODE
+}
+_extends(Comment,CharacterData);
+
+function CDATASection() {
+};
+CDATASection.prototype = {
+ nodeName : "#cdata-section",
+ nodeType : CDATA_SECTION_NODE
+}
+_extends(CDATASection,CharacterData);
+
+
+function DocumentType() {
+};
+DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
+_extends(DocumentType,Node);
+
+function Notation() {
+};
+Notation.prototype.nodeType = NOTATION_NODE;
+_extends(Notation,Node);
+
+function Entity() {
+};
+Entity.prototype.nodeType = ENTITY_NODE;
+_extends(Entity,Node);
+
+function EntityReference() {
+};
+EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
+_extends(EntityReference,Node);
+
+function DocumentFragment() {
+};
+DocumentFragment.prototype.nodeName = "#document-fragment";
+DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
+_extends(DocumentFragment,Node);
+
+
+function ProcessingInstruction() {
+}
+ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
+_extends(ProcessingInstruction,Node);
+function XMLSerializer(){}
+XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){
+ return nodeSerializeToString.call(node,isHtml,nodeFilter);
+}
+Node.prototype.toString = nodeSerializeToString;
+function nodeSerializeToString(isHtml,nodeFilter){
+ var buf = [];
+ var refNode = this.nodeType == 9 && this.documentElement || this;
+ var prefix = refNode.prefix;
+ var uri = refNode.namespaceURI;
+
+ if(uri && prefix == null){
+ //console.log(prefix)
+ var prefix = refNode.lookupPrefix(uri);
+ if(prefix == null){
+ //isHTML = true;
+ var visibleNamespaces=[
+ {namespace:uri,prefix:null}
+ //{namespace:uri,prefix:''}
+ ]
+ }
+ }
+ serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
+ //console.log('###',this.nodeType,uri,prefix,buf.join(''))
+ return buf.join('');
+}
+function needNamespaceDefine(node,isHTML, visibleNamespaces) {
+ var prefix = node.prefix||'';
+ var uri = node.namespaceURI;
+ if (!prefix && !uri){
+ return false;
+ }
+ if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace"
+ || uri == 'http://www.w3.org/2000/xmlns/'){
+ return false;
+ }
+
+ var i = visibleNamespaces.length
+ //console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces)
+ while (i--) {
+ var ns = visibleNamespaces[i];
+ // get namespace prefix
+ //console.log(node.nodeType,node.tagName,ns.prefix,prefix)
+ if (ns.prefix == prefix){
+ return ns.namespace != uri;
+ }
+ }
+ //console.log(isHTML,uri,prefix=='')
+ //if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){
+ // return false;
+ //}
+ //node.flag = '11111'
+ //console.error(3,true,node.flag,node.prefix,node.namespaceURI)
+ return true;
+}
+function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
+ if(nodeFilter){
+ node = nodeFilter(node);
+ if(node){
+ if(typeof node == 'string'){
+ buf.push(node);
+ return;
+ }
+ }else{
+ return;
+ }
+ //buf.sort.apply(attrs, attributeSorter);
+ }
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ if (!visibleNamespaces) visibleNamespaces = [];
+ var startVisibleNamespaces = visibleNamespaces.length;
+ var attrs = node.attributes;
+ var len = attrs.length;
+ var child = node.firstChild;
+ var nodeName = node.tagName;
+
+ isHTML = (htmlns === node.namespaceURI) ||isHTML
+ buf.push('<',nodeName);
+
+
+
+ for(var i=0;i<len;i++){
+ // add namespaces for attributes
+ var attr = attrs.item(i);
+ if (attr.prefix == 'xmlns') {
+ visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });
+ }else if(attr.nodeName == 'xmlns'){
+ visibleNamespaces.push({ prefix: '', namespace: attr.value });
+ }
+ }
+ for(var i=0;i<len;i++){
+ var attr = attrs.item(i);
+ if (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {
+ var prefix = attr.prefix||'';
+ var uri = attr.namespaceURI;
+ var ns = prefix ? ' xmlns:' + prefix : " xmlns";
+ buf.push(ns, '="' , uri , '"');
+ visibleNamespaces.push({ prefix: prefix, namespace:uri });
+ }
+ serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
+ }
+ // add namespace for current node
+ if (needNamespaceDefine(node,isHTML, visibleNamespaces)) {
+ var prefix = node.prefix||'';
+ var uri = node.namespaceURI;
+ if (uri) {
+ // Avoid empty namespace value like xmlns:ds=""
+ // Empty namespace URL will we produce an invalid XML document
+ var ns = prefix ? ' xmlns:' + prefix : " xmlns";
+ buf.push(ns, '="' , uri , '"');
+ visibleNamespaces.push({ prefix: prefix, namespace:uri });
+ }
+ }
+
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){
+ buf.push('>');
+ //if is cdata child node
+ if(isHTML && /^script$/i.test(nodeName)){
+ while(child){
+ if(child.data){
+ buf.push(child.data);
+ }else{
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ }
+ child = child.nextSibling;
+ }
+ }else
+ {
+ while(child){
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ child = child.nextSibling;
+ }
+ }
+ buf.push('</',nodeName,'>');
+ }else{
+ buf.push('/>');
+ }
+ // remove added visible namespaces
+ //visibleNamespaces.length = startVisibleNamespaces;
+ return;
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var child = node.firstChild;
+ while(child){
+ serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);
+ child = child.nextSibling;
+ }
+ return;
+ case ATTRIBUTE_NODE:
+ /**
+ * Well-formedness constraint: No < in Attribute Values
+ * The replacement text of any entity referred to directly or indirectly in an attribute value must not contain a <.
+ * @see https://www.w3.org/TR/xml/#CleanAttrVals
+ * @see https://www.w3.org/TR/xml/#NT-AttValue
+ */
+ return buf.push(' ', node.name, '="', node.value.replace(/[<&"]/g,_xmlEncoder), '"');
+ case TEXT_NODE:
+ /**
+ * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
+ * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
+ * If they are needed elsewhere, they must be escaped using either numeric character references or the strings
+ * `&amp;` and `&lt;` respectively.
+ * The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility,
+ * be escaped using either `&gt;` or a character reference when it appears in the string `]]>` in content,
+ * when that string is not marking the end of a CDATA section.
+ *
+ * In the content of elements, character data is any string of characters
+ * which does not contain the start-delimiter of any markup
+ * and does not include the CDATA-section-close delimiter, `]]>`.
+ *
+ * @see https://www.w3.org/TR/xml/#NT-CharData
+ */
+ return buf.push(node.data
+ .replace(/[<&]/g,_xmlEncoder)
+ .replace(/]]>/g, ']]&gt;')
+ );
+ case CDATA_SECTION_NODE:
+ return buf.push( '<![CDATA[',node.data,']]>');
+ case COMMENT_NODE:
+ return buf.push( "<!--",node.data,"-->");
+ case DOCUMENT_TYPE_NODE:
+ var pubid = node.publicId;
+ var sysid = node.systemId;
+ buf.push('<!DOCTYPE ',node.name);
+ if(pubid){
+ buf.push(' PUBLIC ', pubid);
+ if (sysid && sysid!='.') {
+ buf.push(' ', sysid);
+ }
+ buf.push('>');
+ }else if(sysid && sysid!='.'){
+ buf.push(' SYSTEM ', sysid, '>');
+ }else{
+ var sub = node.internalSubset;
+ if(sub){
+ buf.push(" [",sub,"]");
+ }
+ buf.push(">");
+ }
+ return;
+ case PROCESSING_INSTRUCTION_NODE:
+ return buf.push( "<?",node.target," ",node.data,"?>");
+ case ENTITY_REFERENCE_NODE:
+ return buf.push( '&',node.nodeName,';');
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ default:
+ buf.push('??',node.nodeName);
+ }
+}
+function importNode(doc,node,deep){
+ var node2;
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ node2 = node.cloneNode(false);
+ node2.ownerDocument = doc;
+ //var attrs = node2.attributes;
+ //var len = attrs.length;
+ //for(var i=0;i<len;i++){
+ //node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
+ //}
+ case DOCUMENT_FRAGMENT_NODE:
+ break;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ break;
+ //case ENTITY_REFERENCE_NODE:
+ //case PROCESSING_INSTRUCTION_NODE:
+ ////case TEXT_NODE:
+ //case CDATA_SECTION_NODE:
+ //case COMMENT_NODE:
+ // deep = false;
+ // break;
+ //case DOCUMENT_NODE:
+ //case DOCUMENT_TYPE_NODE:
+ //cannot be imported.
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ //can not hit in level3
+ //default:throw e;
+ }
+ if(!node2){
+ node2 = node.cloneNode(false);//false
+ }
+ node2.ownerDocument = doc;
+ node2.parentNode = null;
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(importNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+//
+//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
+// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
+function cloneNode(doc,node,deep){
+ var node2 = new node.constructor();
+ for(var n in node){
+ var v = node[n];
+ if(typeof v != 'object' ){
+ if(v != node2[n]){
+ node2[n] = v;
+ }
+ }
+ }
+ if(node.childNodes){
+ node2.childNodes = new NodeList();
+ }
+ node2.ownerDocument = doc;
+ switch (node2.nodeType) {
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var attrs2 = node2.attributes = new NamedNodeMap();
+ var len = attrs.length
+ attrs2._ownerElement = node2;
+ for(var i=0;i<len;i++){
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
+ }
+ break;;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ }
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(cloneNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+
+function __set__(object,key,value){
+ object[key] = value
+}
+//do dynamic
+try{
+ if(Object.defineProperty){
+ Object.defineProperty(LiveNodeList.prototype,'length',{
+ get:function(){
+ _updateLiveList(this);
+ return this.$$length;
+ }
+ });
+ Object.defineProperty(Node.prototype,'textContent',{
+ get:function(){
+ return getTextContent(this);
+ },
+ set:function(data){
+ switch(this.nodeType){
+ case ELEMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ while(this.firstChild){
+ this.removeChild(this.firstChild);
+ }
+ if(data || String(data)){
+ this.appendChild(this.ownerDocument.createTextNode(data));
+ }
+ break;
+ default:
+ //TODO:
+ this.data = data;
+ this.value = data;
+ this.nodeValue = data;
+ }
+ }
+ })
+
+ function getTextContent(node){
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var buf = [];
+ node = node.firstChild;
+ while(node){
+ if(node.nodeType!==7 && node.nodeType !==8){
+ buf.push(getTextContent(node));
+ }
+ node = node.nextSibling;
+ }
+ return buf.join('');
+ default:
+ return node.nodeValue;
+ }
+ }
+ __set__ = function(object,key,value){
+ //console.log(value)
+ object['$$'+key] = value
+ }
+ }
+}catch(e){//ie8
+}
+
+//if(typeof require == 'function'){
+ exports.Node = Node;
+ exports.DOMException = DOMException;
+ exports.DOMImplementation = DOMImplementation;
+ exports.XMLSerializer = XMLSerializer;
+//}
diff --git a/node_modules/plist/lib/xmldom/entities.js b/node_modules/plist/lib/xmldom/entities.js
new file mode 100644
index 0000000..aef4238
--- /dev/null
+++ b/node_modules/plist/lib/xmldom/entities.js
@@ -0,0 +1,243 @@
+exports.entityMap = {
+ lt: '<',
+ gt: '>',
+ amp: '&',
+ quot: '"',
+ apos: "'",
+ Agrave: "À",
+ Aacute: "Á",
+ Acirc: "Â",
+ Atilde: "Ã",
+ Auml: "Ä",
+ Aring: "Å",
+ AElig: "Æ",
+ Ccedil: "Ç",
+ Egrave: "È",
+ Eacute: "É",
+ Ecirc: "Ê",
+ Euml: "Ë",
+ Igrave: "Ì",
+ Iacute: "Í",
+ Icirc: "Î",
+ Iuml: "Ï",
+ ETH: "Ð",
+ Ntilde: "Ñ",
+ Ograve: "Ò",
+ Oacute: "Ó",
+ Ocirc: "Ô",
+ Otilde: "Õ",
+ Ouml: "Ö",
+ Oslash: "Ø",
+ Ugrave: "Ù",
+ Uacute: "Ú",
+ Ucirc: "Û",
+ Uuml: "Ü",
+ Yacute: "Ý",
+ THORN: "Þ",
+ szlig: "ß",
+ agrave: "à",
+ aacute: "á",
+ acirc: "â",
+ atilde: "ã",
+ auml: "ä",
+ aring: "å",
+ aelig: "æ",
+ ccedil: "ç",
+ egrave: "è",
+ eacute: "é",
+ ecirc: "ê",
+ euml: "ë",
+ igrave: "ì",
+ iacute: "í",
+ icirc: "î",
+ iuml: "ï",
+ eth: "ð",
+ ntilde: "ñ",
+ ograve: "ò",
+ oacute: "ó",
+ ocirc: "ô",
+ otilde: "õ",
+ ouml: "ö",
+ oslash: "ø",
+ ugrave: "ù",
+ uacute: "ú",
+ ucirc: "û",
+ uuml: "ü",
+ yacute: "ý",
+ thorn: "þ",
+ yuml: "ÿ",
+ nbsp: "\u00a0",
+ iexcl: "¡",
+ cent: "¢",
+ pound: "£",
+ curren: "¤",
+ yen: "¥",
+ brvbar: "¦",
+ sect: "§",
+ uml: "¨",
+ copy: "©",
+ ordf: "ª",
+ laquo: "«",
+ not: "¬",
+ shy: "­­",
+ reg: "®",
+ macr: "¯",
+ deg: "°",
+ plusmn: "±",
+ sup2: "²",
+ sup3: "³",
+ acute: "´",
+ micro: "µ",
+ para: "¶",
+ middot: "·",
+ cedil: "¸",
+ sup1: "¹",
+ ordm: "º",
+ raquo: "»",
+ frac14: "¼",
+ frac12: "½",
+ frac34: "¾",
+ iquest: "¿",
+ times: "×",
+ divide: "÷",
+ forall: "∀",
+ part: "∂",
+ exist: "∃",
+ empty: "∅",
+ nabla: "∇",
+ isin: "∈",
+ notin: "∉",
+ ni: "∋",
+ prod: "∏",
+ sum: "∑",
+ minus: "−",
+ lowast: "∗",
+ radic: "√",
+ prop: "∝",
+ infin: "∞",
+ ang: "∠",
+ and: "∧",
+ or: "∨",
+ cap: "∩",
+ cup: "∪",
+ 'int': "∫",
+ there4: "∴",
+ sim: "∼",
+ cong: "≅",
+ asymp: "≈",
+ ne: "≠",
+ equiv: "≡",
+ le: "≤",
+ ge: "≥",
+ sub: "⊂",
+ sup: "⊃",
+ nsub: "⊄",
+ sube: "⊆",
+ supe: "⊇",
+ oplus: "⊕",
+ otimes: "⊗",
+ perp: "⊥",
+ sdot: "⋅",
+ Alpha: "Α",
+ Beta: "Β",
+ Gamma: "Γ",
+ Delta: "Δ",
+ Epsilon: "Ε",
+ Zeta: "Ζ",
+ Eta: "Η",
+ Theta: "Θ",
+ Iota: "Ι",
+ Kappa: "Κ",
+ Lambda: "Λ",
+ Mu: "Μ",
+ Nu: "Ν",
+ Xi: "Ξ",
+ Omicron: "Ο",
+ Pi: "Π",
+ Rho: "Ρ",
+ Sigma: "Σ",
+ Tau: "Τ",
+ Upsilon: "Υ",
+ Phi: "Φ",
+ Chi: "Χ",
+ Psi: "Ψ",
+ Omega: "Ω",
+ alpha: "α",
+ beta: "β",
+ gamma: "γ",
+ delta: "δ",
+ epsilon: "ε",
+ zeta: "ζ",
+ eta: "η",
+ theta: "θ",
+ iota: "ι",
+ kappa: "κ",
+ lambda: "λ",
+ mu: "μ",
+ nu: "ν",
+ xi: "ξ",
+ omicron: "ο",
+ pi: "π",
+ rho: "ρ",
+ sigmaf: "ς",
+ sigma: "σ",
+ tau: "τ",
+ upsilon: "υ",
+ phi: "φ",
+ chi: "χ",
+ psi: "ψ",
+ omega: "ω",
+ thetasym: "ϑ",
+ upsih: "ϒ",
+ piv: "ϖ",
+ OElig: "Œ",
+ oelig: "œ",
+ Scaron: "Š",
+ scaron: "š",
+ Yuml: "Ÿ",
+ fnof: "ƒ",
+ circ: "ˆ",
+ tilde: "˜",
+ ensp: " ",
+ emsp: " ",
+ thinsp: " ",
+ zwnj: "‌",
+ zwj: "‍",
+ lrm: "‎",
+ rlm: "‏",
+ ndash: "–",
+ mdash: "—",
+ lsquo: "‘",
+ rsquo: "’",
+ sbquo: "‚",
+ ldquo: "“",
+ rdquo: "”",
+ bdquo: "„",
+ dagger: "†",
+ Dagger: "‡",
+ bull: "•",
+ hellip: "…",
+ permil: "‰",
+ prime: "′",
+ Prime: "″",
+ lsaquo: "‹",
+ rsaquo: "›",
+ oline: "‾",
+ euro: "€",
+ trade: "™",
+ larr: "←",
+ uarr: "↑",
+ rarr: "→",
+ darr: "↓",
+ harr: "↔",
+ crarr: "↵",
+ lceil: "⌈",
+ rceil: "⌉",
+ lfloor: "⌊",
+ rfloor: "⌋",
+ loz: "◊",
+ spades: "♠",
+ clubs: "♣",
+ hearts: "♥",
+ diams: "♦"
+};
diff --git a/node_modules/plist/lib/xmldom/sax.js b/node_modules/plist/lib/xmldom/sax.js
new file mode 100644
index 0000000..ad9f184
--- /dev/null
+++ b/node_modules/plist/lib/xmldom/sax.js
@@ -0,0 +1,642 @@
+//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
+//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
+//[5] Name ::= NameStartChar (NameChar)*
+var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
+var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
+var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
+//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
+//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
+
+//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
+//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
+var S_TAG = 0;//tag name offerring
+var S_ATTR = 1;//attr name offerring
+var S_ATTR_SPACE=2;//attr name end and space offer
+var S_EQ = 3;//=space?
+var S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)
+var S_ATTR_END = 5;//attr value end and no space(quot end)
+var S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)
+var S_TAG_CLOSE = 7;//closed el<el />
+
+/**
+ * Creates an error that will not be caught by XMLReader aka the SAX parser.
+ *
+ * @param {string} message
+ * @param {any?} locator Optional, can provide details about the location in the source
+ * @constructor
+ */
+function ParseError(message, locator) {
+ this.message = message
+ this.locator = locator
+ if(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);
+}
+ParseError.prototype = new Error();
+ParseError.prototype.name = ParseError.name
+
+function XMLReader(){
+
+}
+
+XMLReader.prototype = {
+ parse:function(source,defaultNSMap,entityMap){
+ var domBuilder = this.domBuilder;
+ domBuilder.startDocument();
+ _copy(defaultNSMap ,defaultNSMap = {})
+ parse(source,defaultNSMap,entityMap,
+ domBuilder,this.errorHandler);
+ domBuilder.endDocument();
+ }
+}
+function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
+ function fixedFromCharCode(code) {
+ // String.prototype.fromCharCode does not supports
+ // > 2 bytes unicode chars directly
+ if (code > 0xffff) {
+ code -= 0x10000;
+ var surrogate1 = 0xd800 + (code >> 10)
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
+
+ return String.fromCharCode(surrogate1, surrogate2);
+ } else {
+ return String.fromCharCode(code);
+ }
+ }
+ function entityReplacer(a){
+ var k = a.slice(1,-1);
+ if(k in entityMap){
+ return entityMap[k];
+ }else if(k.charAt(0) === '#'){
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
+ }else{
+ errorHandler.error('entity not found:'+a);
+ return a;
+ }
+ }
+ function appendText(end){//has some bugs
+ if(end>start){
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
+ locator&&position(start);
+ domBuilder.characters(xt,0,end-start);
+ start = end
+ }
+ }
+ function position(p,m){
+ while(p>=lineEnd && (m = linePattern.exec(source))){
+ lineStart = m.index;
+ lineEnd = lineStart + m[0].length;
+ locator.lineNumber++;
+ //console.log('line++:',locator,startPos,endPos)
+ }
+ locator.columnNumber = p-lineStart+1;
+ }
+ var lineStart = 0;
+ var lineEnd = 0;
+ var linePattern = /.*(?:\r\n?|\n)|.*$/g
+ var locator = domBuilder.locator;
+
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
+ var closeMap = {};
+ var start = 0;
+ while(true){
+ try{
+ var tagStart = source.indexOf('<',start);
+ if(tagStart<0){
+ if(!source.substr(start).match(/^\s*$/)){
+ var doc = domBuilder.doc;
+ var text = doc.createTextNode(source.substr(start));
+ doc.appendChild(text);
+ domBuilder.currentElement = text;
+ }
+ return;
+ }
+ if(tagStart>start){
+ appendText(tagStart);
+ }
+ switch(source.charAt(tagStart+1)){
+ case '/':
+ var end = source.indexOf('>',tagStart+3);
+ var tagName = source.substring(tagStart+2,end);
+ var config = parseStack.pop();
+ if(end<0){
+
+ tagName = source.substring(tagStart+2).replace(/[\s<].*/,'');
+ errorHandler.error("end tag name: "+tagName+' is not complete:'+config.tagName);
+ end = tagStart+1+tagName.length;
+ }else if(tagName.match(/\s</)){
+ tagName = tagName.replace(/[\s<].*/,'');
+ errorHandler.error("end tag name: "+tagName+' maybe not complete');
+ end = tagStart+1+tagName.length;
+ }
+ var localNSMap = config.localNSMap;
+ var endMatch = config.tagName == tagName;
+ var endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()
+ if(endIgnoreCaseMach){
+ domBuilder.endElement(config.uri,config.localName,tagName);
+ if(localNSMap){
+ for(var prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix) ;
+ }
+ }
+ if(!endMatch){
+ errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); // No known test case
+ }
+ }else{
+ parseStack.push(config)
+ }
+
+ end++;
+ break;
+ // end elment
+ case '?':// <?...?>
+ locator&&position(tagStart);
+ end = parseInstruction(source,tagStart,domBuilder);
+ break;
+ case '!':// <!doctype,<![CDATA,<!--
+ locator&&position(tagStart);
+ end = parseDCC(source,tagStart,domBuilder,errorHandler);
+ break;
+ default:
+ locator&&position(tagStart);
+ var el = new ElementAttributes();
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ //elStartEnd
+ var end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);
+ var len = el.length;
+
+
+ if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
+ el.closed = true;
+ if(!entityMap.nbsp){
+ errorHandler.warning('unclosed xml attribute');
+ }
+ }
+ if(locator && len){
+ var locator2 = copyLocator(locator,{});
+ //try{//attribute position fixed
+ for(var i = 0;i<len;i++){
+ var a = el[i];
+ position(a.offset);
+ a.locator = copyLocator(locator,{});
+ }
+ domBuilder.locator = locator2
+ if(appendElement(el,domBuilder,currentNSMap)){
+ parseStack.push(el)
+ }
+ domBuilder.locator = locator;
+ }else{
+ if(appendElement(el,domBuilder,currentNSMap)){
+ parseStack.push(el)
+ }
+ }
+
+
+
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
+ }else{
+ end++;
+ }
+ }
+ }catch(e){
+ if (e instanceof ParseError) {
+ throw e;
+ }
+ errorHandler.error('element parse error: '+e)
+ end = -1;
+ }
+ if(end>start){
+ start = end;
+ }else{
+ //TODO: 这里有可能sax回退,有位置错误风险
+ appendText(Math.max(tagStart,start)+1);
+ }
+ }
+}
+function copyLocator(f,t){
+ t.lineNumber = f.lineNumber;
+ t.columnNumber = f.columnNumber;
+ return t;
+}
+
+/**
+ * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);
+ * @return end of the elementStartPart(end of elementEndPart for selfClosed el)
+ */
+function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){
+
+ /**
+ * @param {string} qname
+ * @param {string} value
+ * @param {number} startIndex
+ */
+ function addAttribute(qname, value, startIndex) {
+ if (qname in el.attributeNames) errorHandler.fatalError('Attribute ' + qname + ' redefined')
+ el.addValue(qname, value, startIndex)
+ }
+ var attrName;
+ var value;
+ var p = ++start;
+ var s = S_TAG;//status
+ while(true){
+ var c = source.charAt(p);
+ switch(c){
+ case '=':
+ if(s === S_ATTR){//attrName
+ attrName = source.slice(start,p);
+ s = S_EQ;
+ }else if(s === S_ATTR_SPACE){
+ s = S_EQ;
+ }else{
+ //fatalError: equal must after attrName or space after attrName
+ throw new Error('attribute equal must after attrName'); // No known test case
+ }
+ break;
+ case '\'':
+ case '"':
+ if(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE
+ ){//equal
+ if(s === S_ATTR){
+ errorHandler.warning('attribute value must after "="')
+ attrName = source.slice(start,p)
+ }
+ start = p+1;
+ p = source.indexOf(c,start)
+ if(p>0){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ addAttribute(attrName, value, start-1);
+ s = S_ATTR_END;
+ }else{
+ //fatalError: no end quot match
+ throw new Error('attribute value no end \''+c+'\' match');
+ }
+ }else if(s == S_ATTR_NOQUOT_VALUE){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ //console.log(attrName,value,start,p)
+ addAttribute(attrName, value, start);
+ //console.dir(el)
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
+ start = p+1;
+ s = S_ATTR_END
+ }else{
+ //fatalError: no equal before
+ throw new Error('attribute value must after "="'); // No known test case
+ }
+ break;
+ case '/':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_ATTR_END:
+ case S_TAG_SPACE:
+ case S_TAG_CLOSE:
+ s =S_TAG_CLOSE;
+ el.closed = true;
+ case S_ATTR_NOQUOT_VALUE:
+ case S_ATTR:
+ case S_ATTR_SPACE:
+ break;
+ //case S_EQ:
+ default:
+ throw new Error("attribute invalid close char('/')") // No known test case
+ }
+ break;
+ case ''://end document
+ errorHandler.error('unexpected end of input');
+ if(s == S_TAG){
+ el.setTagName(source.slice(start,p));
+ }
+ return p;
+ case '>':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_ATTR_END:
+ case S_TAG_SPACE:
+ case S_TAG_CLOSE:
+ break;//normal
+ case S_ATTR_NOQUOT_VALUE://Compatible state
+ case S_ATTR:
+ value = source.slice(start,p);
+ if(value.slice(-1) === '/'){
+ el.closed = true;
+ value = value.slice(0,-1)
+ }
+ case S_ATTR_SPACE:
+ if(s === S_ATTR_SPACE){
+ value = attrName;
+ }
+ if(s == S_ATTR_NOQUOT_VALUE){
+ errorHandler.warning('attribute "'+value+'" missed quot(")!');
+ addAttribute(attrName, value.replace(/&#?\w+;/g,entityReplacer), start)
+ }else{
+ if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
+ }
+ addAttribute(value, value, start)
+ }
+ break;
+ case S_EQ:
+ throw new Error('attribute value missed!!');
+ }
+// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName))
+ return p;
+ /*xml space '\x20' | #x9 | #xD | #xA; */
+ case '\u0080':
+ c = ' ';
+ default:
+ if(c<= ' '){//space
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));//tagName
+ s = S_TAG_SPACE;
+ break;
+ case S_ATTR:
+ attrName = source.slice(start,p)
+ s = S_ATTR_SPACE;
+ break;
+ case S_ATTR_NOQUOT_VALUE:
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ addAttribute(attrName, value, start)
+ case S_ATTR_END:
+ s = S_TAG_SPACE;
+ break;
+ //case S_TAG_SPACE:
+ //case S_EQ:
+ //case S_ATTR_SPACE:
+ // void();break;
+ //case S_TAG_CLOSE:
+ //ignore warning
+ }
+ }else{//not space
+//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
+//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
+ switch(s){
+ //case S_TAG:void();break;
+ //case S_ATTR:void();break;
+ //case S_ATTR_NOQUOT_VALUE:void();break;
+ case S_ATTR_SPACE:
+ var tagName = el.tagName;
+ if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!')
+ }
+ addAttribute(attrName, attrName, start);
+ start = p;
+ s = S_ATTR;
+ break;
+ case S_ATTR_END:
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
+ case S_TAG_SPACE:
+ s = S_ATTR;
+ start = p;
+ break;
+ case S_EQ:
+ s = S_ATTR_NOQUOT_VALUE;
+ start = p;
+ break;
+ case S_TAG_CLOSE:
+ throw new Error("elements closed character '/' and '>' must be connected to");
+ }
+ }
+ }//end outer switch
+ //console.log('p++',p)
+ p++;
+ }
+}
+/**
+ * @return true if has new namespace define
+ */
+function appendElement(el,domBuilder,currentNSMap){
+ var tagName = el.tagName;
+ var localNSMap = null;
+ //var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ var i = el.length;
+ while(i--){
+ var a = el[i];
+ var qName = a.qName;
+ var value = a.value;
+ var nsp = qName.indexOf(':');
+ if(nsp>0){
+ var prefix = a.prefix = qName.slice(0,nsp);
+ var localName = qName.slice(nsp+1);
+ var nsPrefix = prefix === 'xmlns' && localName
+ }else{
+ localName = qName;
+ prefix = null
+ nsPrefix = qName === 'xmlns' && ''
+ }
+ //can not set prefix,because prefix !== ''
+ a.localName = localName ;
+ //prefix == null for no ns prefix attribute
+ if(nsPrefix !== false){//hack!!
+ if(localNSMap == null){
+ localNSMap = {}
+ //console.log(currentNSMap,0)
+ _copy(currentNSMap,currentNSMap={})
+ //console.log(currentNSMap,1)
+ }
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
+ a.uri = 'http://www.w3.org/2000/xmlns/'
+ domBuilder.startPrefixMapping(nsPrefix, value)
+ }
+ }
+ var i = el.length;
+ while(i--){
+ a = el[i];
+ var prefix = a.prefix;
+ if(prefix){//no prefix attribute has no namespace
+ if(prefix === 'xml'){
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
+ }if(prefix !== 'xmlns'){
+ a.uri = currentNSMap[prefix || '']
+
+ //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}
+ }
+ }
+ }
+ var nsp = tagName.indexOf(':');
+ if(nsp>0){
+ prefix = el.prefix = tagName.slice(0,nsp);
+ localName = el.localName = tagName.slice(nsp+1);
+ }else{
+ prefix = null;//important!!
+ localName = el.localName = tagName;
+ }
+ //no prefix element has default namespace
+ var ns = el.uri = currentNSMap[prefix || ''];
+ domBuilder.startElement(ns,localName,tagName,el);
+ //endPrefixMapping and startPrefixMapping have not any help for dom builder
+ //localNSMap = null
+ if(el.closed){
+ domBuilder.endElement(ns,localName,tagName);
+ if(localNSMap){
+ for(prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix)
+ }
+ }
+ }else{
+ el.currentNSMap = currentNSMap;
+ el.localNSMap = localNSMap;
+ //parseStack.push(el);
+ return true;
+ }
+}
+function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
+ if(/^(?:script|textarea)$/i.test(tagName)){
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
+ var text = source.substring(elStartEnd+1,elEndStart);
+ if(/[&<]/.test(text)){
+ if(/^script$/i.test(tagName)){
+ //if(!/\]\]>/.test(text)){
+ //lexHandler.startCDATA();
+ domBuilder.characters(text,0,text.length);
+ //lexHandler.endCDATA();
+ return elEndStart;
+ //}
+ }//}else{//text area
+ text = text.replace(/&#?\w+;/g,entityReplacer);
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+ //}
+
+ }
+ }
+ return elStartEnd+1;
+}
+function fixSelfClosed(source,elStartEnd,tagName,closeMap){
+ //if(tagName in closeMap){
+ var pos = closeMap[tagName];
+ if(pos == null){
+ //console.log(tagName)
+ pos = source.lastIndexOf('</'+tagName+'>')
+ if(pos<elStartEnd){//忘记闭合
+ pos = source.lastIndexOf('</'+tagName)
+ }
+ closeMap[tagName] =pos
+ }
+ return pos<elStartEnd;
+ //}
+}
+function _copy(source,target){
+ for(var n in source){target[n] = source[n]}
+}
+function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
+ var next= source.charAt(start+2)
+ switch(next){
+ case '-':
+ if(source.charAt(start + 3) === '-'){
+ var end = source.indexOf('-->',start+4);
+ //append comment source.substring(4,end)//<!--
+ if(end>start){
+ domBuilder.comment(source,start+4,end-start-4);
+ return end+3;
+ }else{
+ errorHandler.error("Unclosed comment");
+ return -1;
+ }
+ }else{
+ //error
+ return -1;
+ }
+ default:
+ if(source.substr(start+3,6) == 'CDATA['){
+ var end = source.indexOf(']]>',start+9);
+ domBuilder.startCDATA();
+ domBuilder.characters(source,start+9,end-start-9);
+ domBuilder.endCDATA()
+ return end+3;
+ }
+ //<!DOCTYPE
+ //startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
+ var matchs = split(source,start);
+ var len = matchs.length;
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
+ var name = matchs[1][0];
+ var pubid = false;
+ var sysid = false;
+ if(len>3){
+ if(/^public$/i.test(matchs[2][0])){
+ pubid = matchs[3][0];
+ sysid = len>4 && matchs[4][0];
+ }else if(/^system$/i.test(matchs[2][0])){
+ sysid = matchs[3][0];
+ }
+ }
+ var lastMatch = matchs[len-1]
+ domBuilder.startDTD(name, pubid, sysid);
+ domBuilder.endDTD();
+
+ return lastMatch.index+lastMatch[0].length
+ }
+ }
+ return -1;
+}
+
+
+
+function parseInstruction(source,start,domBuilder){
+ var end = source.indexOf('?>',start);
+ if(end){
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
+ if(match){
+ var len = match[0].length;
+ domBuilder.processingInstruction(match[1], match[2]) ;
+ return end+2;
+ }else{//error
+ return -1;
+ }
+ }
+ return -1;
+}
+
+function ElementAttributes(){
+ this.attributeNames = {}
+}
+ElementAttributes.prototype = {
+ setTagName:function(tagName){
+ if(!tagNamePattern.test(tagName)){
+ throw new Error('invalid tagName:'+tagName)
+ }
+ this.tagName = tagName
+ },
+ addValue:function(qName, value, offset) {
+ if(!tagNamePattern.test(qName)){
+ throw new Error('invalid attribute:'+qName)
+ }
+ this.attributeNames[qName] = this.length;
+ this[this.length++] = {qName:qName,value:value,offset:offset}
+ },
+ length:0,
+ getLocalName:function(i){return this[i].localName},
+ getLocator:function(i){return this[i].locator},
+ getQName:function(i){return this[i].qName},
+ getURI:function(i){return this[i].uri},
+ getValue:function(i){return this[i].value}
+// ,getIndex:function(uri, localName)){
+// if(localName){
+//
+// }else{
+// var qName = uri
+// }
+// },
+// getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},
+// getType:function(uri,localName){}
+// getType:function(i){},
+}
+
+
+
+function split(source,start){
+ var match;
+ var buf = [];
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
+ reg.lastIndex = start;
+ reg.exec(source);//skip <
+ while(match = reg.exec(source)){
+ buf.push(match);
+ if(match[1])return buf;
+ }
+}
+
+exports.XMLReader = XMLReader;
+exports.ParseError = ParseError;
diff --git a/node_modules/plist/package.json b/node_modules/plist/package.json
new file mode 100644
index 0000000..774610b
--- /dev/null
+++ b/node_modules/plist/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "plist",
+ "description": "Apple's property list parser/builder for Node.js and browsers",
+ "version": "3.0.6",
+ "author": "Nathan Rajlich <nathan@tootallnate.net>",
+ "contributors": [
+ "Hans Huebner <hans.huebner@gmail.com>",
+ "Pierre Metrailler",
+ "Mike Reinstein <reinstein.mike@gmail.com>",
+ "Vladimir Tsvang",
+ "Mathieu D'Amours"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-plist.git"
+ },
+ "license": "MIT",
+ "keywords": [
+ "apple",
+ "browser",
+ "mac",
+ "plist",
+ "parser",
+ "xml"
+ ],
+ "main": "index.js",
+ "dependencies": {
+ "base64-js": "^1.5.1",
+ "xmlbuilder": "^15.1.1"
+ },
+ "devDependencies": {
+ "browserify": "^17.0.0",
+ "mocha": "^9.2.2",
+ "multiline": "^2.0.0",
+ "zuul": "3.12.0"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+}
diff --git a/node_modules/pretty-bytes/cli.js b/node_modules/pretty-bytes/cli.js
new file mode 100755
index 0000000..7ad15cd
--- /dev/null
+++ b/node_modules/pretty-bytes/cli.js
@@ -0,0 +1,32 @@
+#!/usr/bin/env node
+'use strict';
+var getStdin = require('get-stdin');
+var meow = require('meow');
+var prettyBytes = require('./pretty-bytes');
+
+var cli = meow({
+ help: [
+ 'Usage',
+ ' $ pretty-bytes <number>',
+ ' $ echo <number> | pretty-bytes',
+ '',
+ 'Example',
+ ' $ pretty-bytes 1337',
+ ' 1.34 kB'
+ ].join('\n')
+});
+
+function init(data) {
+ console.log(prettyBytes(Number(data)));
+}
+
+if (process.stdin.isTTY) {
+ if (!cli.input[0]) {
+ console.error('Number required');
+ process.exit(1);
+ }
+
+ init(cli.input[0]);
+} else {
+ getStdin(init);
+}
diff --git a/node_modules/pretty-bytes/license b/node_modules/pretty-bytes/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/pretty-bytes/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/pretty-bytes/package.json b/node_modules/pretty-bytes/package.json
new file mode 100644
index 0000000..a75958d
--- /dev/null
+++ b/node_modules/pretty-bytes/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "pretty-bytes",
+ "version": "1.0.4",
+ "description": "Convert bytes to a human readable string: 1337 → 1.34 kB",
+ "license": "MIT",
+ "repository": "sindresorhus/pretty-bytes",
+ "main": "pretty-bytes.js",
+ "bin": {
+ "pretty-bytes": "cli.js"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "pretty-bytes.js",
+ "cli.js"
+ ],
+ "keywords": [
+ "cli",
+ "bin",
+ "browser",
+ "pretty",
+ "bytes",
+ "byte",
+ "filesize",
+ "size",
+ "file",
+ "human",
+ "humanized",
+ "readable",
+ "si",
+ "data"
+ ],
+ "dependencies": {
+ "get-stdin": "^4.0.1",
+ "meow": "^3.1.0"
+ },
+ "devDependencies": {
+ "mocha": "*"
+ }
+}
diff --git a/node_modules/pretty-bytes/pretty-bytes.js b/node_modules/pretty-bytes/pretty-bytes.js
new file mode 100644
index 0000000..626c18a
--- /dev/null
+++ b/node_modules/pretty-bytes/pretty-bytes.js
@@ -0,0 +1,46 @@
+/*!
+ pretty-bytes
+ Convert bytes to a human readable string: 1337 → 1.34 kB
+ https://github.com/sindresorhus/pretty-bytes
+ by Sindre Sorhus
+ MIT License
+*/
+(function () {
+ 'use strict';
+
+ // Number.isNaN() polyfill
+ var isNaN = function (val) {
+ return val !== val;
+ };
+
+ var prettyBytes = function (num) {
+ if (typeof num !== 'number' || isNaN(num)) {
+ throw new TypeError('Expected a number');
+ }
+
+ var exponent;
+ var unit;
+ var neg = num < 0;
+ var units = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
+
+ if (neg) {
+ num = -num;
+ }
+
+ if (num < 1) {
+ return (neg ? '-' : '') + num + ' B';
+ }
+
+ exponent = Math.min(Math.floor(Math.log(num) / Math.log(1000)), units.length - 1);
+ num = (num / Math.pow(1000, exponent)).toFixed(2) * 1;
+ unit = units[exponent];
+
+ return (neg ? '-' : '') + num + ' ' + unit;
+ };
+
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = prettyBytes;
+ } else {
+ self.prettyBytes = prettyBytes;
+ }
+})();
diff --git a/node_modules/pretty-bytes/readme.md b/node_modules/pretty-bytes/readme.md
new file mode 100644
index 0000000..bb94861
--- /dev/null
+++ b/node_modules/pretty-bytes/readme.md
@@ -0,0 +1,60 @@
+# pretty-bytes [![Build Status](https://travis-ci.org/sindresorhus/pretty-bytes.svg?branch=master)](https://travis-ci.org/sindresorhus/pretty-bytes)
+
+> Convert bytes to a human readable string: `1337` → `1.34 kB`
+
+Useful for displaying file sizes for humans.
+
+-
+
+*Note that it uses base-10 (eg. kilobyte).
+[Read about the difference between kilobyte and kibibyte.](http://pacoup.com/2009/05/26/kb-kb-kib-whats-up-with-that/)*
+
+
+## Install
+
+```
+$ npm install --save pretty-bytes
+```
+
+```
+$ bower install --save pretty-bytes
+```
+
+```
+$ component install sindresorhus/pretty-bytes
+```
+
+
+## Usage
+
+```js
+prettyBytes(1337);
+//=> '1.34 kB'
+
+prettyBytes(100);
+//=> '100 B'
+```
+
+
+## CLI
+
+```
+$ npm install --global pretty-bytes
+```
+
+```
+$ pretty-bytes --help
+
+ Usage
+ $ pretty-bytes <number>
+ $ echo <number> | pretty-bytes
+
+ Example
+ $ pretty-bytes 1337
+ 1.34 kB
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js
new file mode 100644
index 0000000..3eecf11
--- /dev/null
+++ b/node_modules/process-nextick-args/index.js
@@ -0,0 +1,45 @@
+'use strict';
+
+if (typeof process === 'undefined' ||
+ !process.version ||
+ process.version.indexOf('v0.') === 0 ||
+ process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
+ module.exports = { nextTick: nextTick };
+} else {
+ module.exports = process
+}
+
+function nextTick(fn, arg1, arg2, arg3) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('"callback" argument must be a function');
+ }
+ var len = arguments.length;
+ var args, i;
+ switch (len) {
+ case 0:
+ case 1:
+ return process.nextTick(fn);
+ case 2:
+ return process.nextTick(function afterTickOne() {
+ fn.call(null, arg1);
+ });
+ case 3:
+ return process.nextTick(function afterTickTwo() {
+ fn.call(null, arg1, arg2);
+ });
+ case 4:
+ return process.nextTick(function afterTickThree() {
+ fn.call(null, arg1, arg2, arg3);
+ });
+ default:
+ args = new Array(len - 1);
+ i = 0;
+ while (i < args.length) {
+ args[i++] = arguments[i];
+ }
+ return process.nextTick(function afterTick() {
+ fn.apply(null, args);
+ });
+ }
+}
+
diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md
new file mode 100644
index 0000000..c67e353
--- /dev/null
+++ b/node_modules/process-nextick-args/license.md
@@ -0,0 +1,19 @@
+# Copyright (c) 2015 Calvin Metcalf
+
+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/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json
new file mode 100644
index 0000000..6070b72
--- /dev/null
+++ b/node_modules/process-nextick-args/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "process-nextick-args",
+ "version": "2.0.1",
+ "description": "process.nextTick but always with args",
+ "main": "index.js",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/calvinmetcalf/process-nextick-args.git"
+ },
+ "author": "",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
+ },
+ "homepage": "https://github.com/calvinmetcalf/process-nextick-args",
+ "devDependencies": {
+ "tap": "~0.2.6"
+ }
+}
diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md
new file mode 100644
index 0000000..ecb432c
--- /dev/null
+++ b/node_modules/process-nextick-args/readme.md
@@ -0,0 +1,18 @@
+process-nextick-args
+=====
+
+[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args)
+
+```bash
+npm install --save process-nextick-args
+```
+
+Always be able to pass arguments to process.nextTick, no matter the platform
+
+```js
+var pna = require('process-nextick-args');
+
+pna.nextTick(function (a, b, c) {
+ console.log(a, b, c);
+}, 'step', 3, 'profit');
+```
diff --git a/node_modules/progress-stream/.npmignore b/node_modules/progress-stream/.npmignore
new file mode 100644
index 0000000..fd4f2b0
--- /dev/null
+++ b/node_modules/progress-stream/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+.DS_Store
diff --git a/node_modules/progress-stream/LICENSE b/node_modules/progress-stream/LICENSE
new file mode 100644
index 0000000..1207b39
--- /dev/null
+++ b/node_modules/progress-stream/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) Tobias Baunbæk <freeall@gmail.com>
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/progress-stream/README.md b/node_modules/progress-stream/README.md
new file mode 100644
index 0000000..85ca574
--- /dev/null
+++ b/node_modules/progress-stream/README.md
@@ -0,0 +1,163 @@
+# progress-stream
+
+Read the progress of a stream. Supports speed and eta.
+
+Gets the lengths of the stream automatically if you're using the request or http module. You can also pass the length on initiation. Progress-stream will also check to see if the stream already have a length property.
+
+ npm install progress-stream
+
+## Usage
+
+This example copies a large file, and prints out the percentage, speed and remaining every 100ms.
+
+```js
+var progress = require('progress-stream');
+var fs = require('fs');
+
+var stat = fs.statSync(filename);
+var str = progress({
+ length: stat.size,
+ time: 100
+});
+
+str.on('progress', function(progress) {
+ console.log(progress);
+
+ /*
+ {
+ percentage: 9.05,
+ transferred: 949624,
+ length: 10485760,
+ remaining: 9536136,
+ eta: 42,
+ runtime: 3,
+ delta: 295396,
+ speed: 949624
+ }
+ */
+});
+
+fs.createReadStream(filename)
+ .pipe(str)
+ .pipe(fs.createWriteStream(output));
+```
+
+## Methods
+
+### progress([options], [onprogress])
+
+You can instantiate in two ways:
+
+``` js
+var str = progress({time:100});
+str.on('progress', function(progress) { ... });
+```
+
+or inline the progress listener
+
+``` js
+var str = progress({time:100}, function(progress) { ... });
+```
+
+## Properties
+
+### .progress
+
+You can get the progress from the progress property.
+
+``` js
+var str = progress({time:100});
+
+console.log(str.progress);
+
+/*
+{
+ percentage: 9.05,
+ transferred: 949624,
+ length: 10485760,
+ remaining: 9536136,
+ eta: 10,
+ runtime: 0,
+ delta: 295396,
+ speed: 949624
+}
+*/
+```
+
+## Events
+
+### on('progress', function(progress) { ... })
+
+``` js
+var str = progress({time:100});
+str.on('progress', function(progress) { ... });
+```
+
+## Options
+
+### time(integer)
+
+Sets how often progress events is emitted. If omitted then defaults to emit every time a chunk is received.
+
+### speed(integer)
+
+Sets how long the speedometer needs to calculate the speed. Defaults to 5 sec.
+
+### length(integer)
+
+If you already know the length of the stream, then you can set it. Defaults to 0.
+
+### drain(boolean)
+
+In case you don't want to include a readstream after progress-stream, set to true to drain automatically. Defaults to false.
+
+### transferred(integer)
+
+If you want to set how much data have previous been downloaded. Useful for a resumed download.
+
+## Examples
+
+### Using the request module
+
+This example uses request to download a 100 MB file, and writes out the percentage every second.
+
+You can also find an example in `test/request.js`.
+
+``` js
+var progress = require('progress-stream');
+var req = require('request');
+var fs = require('fs');
+
+var str = progress({
+ time: 1000
+});
+
+str.on('progress', function(progress) {
+ console.log(Math.round(progress.percentage)+'%');
+});
+
+req('http://cachefly.cachefly.net/100mb.test', { headers: { 'user-agent': 'test' }})
+ .pipe(str)
+ .pipe(fs.createWriteStream('test.data'));
+```
+
+### Using the http module
+
+In `test/http.js` it's shown how to do it with the http module.
+
+
+## Methods
+
+
+### `setLength(newLength)`
+
+Sometimes, you don't know how big a stream is right away (e.g. multipart file uploads). You might find out after a few chunks have already passed through the stream, seconds or even minutes later. In this case, you can use the `setLength` method to recalculate the relevant tracked progress data.
+
+```js
+var str = progress({});
+someFickleStreamInstance.pipe(str).pipe(fs.createWriteStream('test.data'));
+
+someFickleStreamInstance.on('conviction', function nowIKnowMyLength (actualLength) {
+ str.setLength(actualLength);
+});
+```
diff --git a/node_modules/progress-stream/index.js b/node_modules/progress-stream/index.js
new file mode 100644
index 0000000..5036935
--- /dev/null
+++ b/node_modules/progress-stream/index.js
@@ -0,0 +1,98 @@
+var through = require('through2');
+var speedometer = require('speedometer');
+
+module.exports = function(options, onprogress) {
+ if (typeof options === 'function') return module.exports(null, options);
+ options = options || {};
+
+ var length = options.length || 0;
+ var time = options.time || 0;
+ var drain = options.drain || false;
+ var transferred = options.transferred || 0;
+ var nextUpdate = Date.now()+time;
+ var delta = 0;
+ var speed = speedometer(options.speed || 5000);
+ var startTime = Date.now();
+
+ var update = {
+ percentage: 0,
+ transferred: transferred,
+ length: length,
+ remaining: length,
+ eta: 0,
+ runtime: 0
+ };
+
+ var emit = function(ended) {
+ update.delta = delta;
+ update.percentage = ended ? 100 : (length ? transferred/length*100 : 0);
+ update.speed = speed(delta);
+ update.eta = Math.round(update.remaining / update.speed);
+ update.runtime = parseInt((Date.now() - startTime)/1000);
+ nextUpdate = Date.now()+time;
+
+ delta = 0;
+
+ tr.emit('progress', update);
+ };
+ var write = function(chunk, enc, callback) {
+ var len = options.objectMode ? 1 : chunk.length;
+ transferred += len;
+ delta += len;
+ update.transferred = transferred;
+ update.remaining = length >= transferred ? length - transferred : 0;
+
+ if (Date.now() >= nextUpdate) emit(false);
+ callback(null, chunk);
+ };
+ var end = function(callback) {
+ emit(true);
+ callback();
+ };
+
+ var tr = through(options.objectMode ? {objectMode:true, highWaterMark:16} : {}, write, end);
+ var onlength = function(newLength) {
+ length = newLength;
+ update.length = length;
+ update.remaining = length - update.transferred;
+ tr.emit('length', length);
+ };
+
+ // Expose `onlength()` handler as `setLength()` to support custom use cases where length
+ // is not known until after a few chunks have already been pumped, or is
+ // calculated on the fly.
+ tr.setLength = onlength;
+
+ tr.on('pipe', function(stream) {
+ if (typeof length === 'number') return;
+ // Support http module
+ if (stream.readable && !stream.writable && stream.headers) {
+ return onlength(parseInt(stream.headers['content-length'] || 0));
+ }
+
+ // Support streams with a length property
+ if (typeof stream.length === 'number') {
+ return onlength(stream.length);
+ }
+
+ // Support request module
+ stream.on('response', function(res) {
+ if (!res || !res.headers) return;
+ if (res.headers['content-encoding'] === 'gzip') return;
+ if (res.headers['content-length']) {
+ return onlength(parseInt(res.headers['content-length']));
+ }
+ });
+ });
+
+ if (drain) tr.resume();
+ if (onprogress) tr.on('progress', onprogress);
+
+ tr.progress = function() {
+ update.speed = speed(0);
+ update.eta = Math.round(update.remaining / update.speed);
+
+ return update;
+ };
+ return tr;
+};
diff --git a/node_modules/progress-stream/package.json b/node_modules/progress-stream/package.json
new file mode 100644
index 0000000..6f85889
--- /dev/null
+++ b/node_modules/progress-stream/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "progress-stream",
+ "version": "1.2.0",
+ "description": "Read the progress of a stream",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:freeall/progress-stream.git"
+ },
+ "keywords": [
+ "stream",
+ "progress",
+ "percentage",
+ "percent",
+ "download",
+ "upload",
+ "file",
+ "streaming",
+ "request",
+ "http"
+ ],
+ "main": "index.js",
+ "dependencies": {
+ "through2": "~0.2.3",
+ "speedometer": "~0.1.2"
+ },
+ "devDependencies": {
+ "request": "~2.29.0",
+ "single-line-log": "~1.0.0",
+ "numeral": "~1.5.2"
+ },
+ "scripts": {
+ "test": "node test/http.js && node test/request.js"
+ },
+ "author": "freeall <freeall@gmail.com>",
+ "license": "BSD-2-Clause"
+}
diff --git a/node_modules/progress-stream/test/http.js b/node_modules/progress-stream/test/http.js
new file mode 100644
index 0000000..48f3024
--- /dev/null
+++ b/node_modules/progress-stream/test/http.js
@@ -0,0 +1,30 @@
+var progress = require('../index');
+var http = require('http');
+var fs = require('fs');
+var log = require('single-line-log').stdout;
+var numeral = require('numeral');
+
+var str = progress({
+ drain: true,
+ time: 100,
+ speed: 20
+});
+str.on('progress', function(progress) {
+ log('Running: '+numeral(progress.runtime).format('00:00:00')+' ('+numeral(progress.transferred).format('0 b')+')\n'+
+ 'Left: '+numeral(progress.eta).format('00:00:00')+' ('+numeral(progress.remaining).format('0 b')+')\n'+
+ numeral(progress.speed).format('0.00b')+'/s '+Math.round(progress.percentage)+'%');
+});
+
+var options = {
+ method: 'GET',
+ host: 'cachefly.cachefly.net',
+ path: '/10mb.test',
+ headers: {
+ 'user-agent': 'testy test'
+ }
+};
+http.request(options, function(response) {
+ response.pipe(str);
+}).end();
+
+console.log('progress-stream using http module - downloading 10 MB file');
diff --git a/node_modules/progress-stream/test/request.js b/node_modules/progress-stream/test/request.js
new file mode 100644
index 0000000..c5d676b
--- /dev/null
+++ b/node_modules/progress-stream/test/request.js
@@ -0,0 +1,20 @@
+var progress = require('../index');
+var req = require('request');
+var fs = require('fs');
+var log = require('single-line-log').stdout;
+var numeral = require('numeral');
+
+var str = progress({
+ drain: true,
+ time: 100
+}, function(progress) {
+ log('Running: '+numeral(progress.runtime).format('00:00:00')+' ('+numeral(progress.transferred).format('0 b')+')\n'+
+ 'Left: '+numeral(progress.eta).format('00:00:00')+' ('+numeral(progress.remaining).format('0 b')+')\n'+
+ numeral(progress.speed).format('0.00b')+'/s '+Math.round(progress.percentage)+'%');
+});
+
+req('http://cachefly.cachefly.net/10mb.test', {
+ headers: { 'user-agent': 'test' }
+}).pipe(str);
+
+console.log('progress-stream using request module - downloading 10 MB file');
diff --git a/node_modules/progress/CHANGELOG.md b/node_modules/progress/CHANGELOG.md
new file mode 100644
index 0000000..d9be0aa
--- /dev/null
+++ b/node_modules/progress/CHANGELOG.md
@@ -0,0 +1,115 @@
+
+2.0.0 / 2017-04-04
+==================
+
+ * Fix: check before using stream.clearLine to prevent crash in Docker
+ * Fix: fixed output multiline on windows cmd
+ * Fix: Bug with array length when window is too small
+ * Fix: Don't clear whole line every time; instead, clear everything after end of line
+ * Fix: Use `this.stream` instead of `console.log` when terminating a progress bar to ensure that, if a writable stream is provided, it uses that rather than process.stdout
+ * Fix: Bug causing potentially stale tokens on render
+ * Feature: configurable cursor
+ * Feature: feature to interrupt the bar and display a message
+ * Feature: Add rate reporting to progress bar
+ * Improvement: Add head option to specify head character
+ * Improvement: Rename tickTokens to tokens
+ * Improvement: Change default throttle time to 16ms
+ * Improvement: Rename renderDelay to renderThrottle
+ * Improvement: Add delay between render updates
+ * Docs: Add example and documentation for custom token usage
+ * Docs: Add head option to readme
+ * Docs: Updated README example for public use
+ * Docs: Add renderThrottle option to code documentation
+
+1.1.7 / 2014-06-30
+==================
+
+ * fixed a bug that occurs when a progress bar attempts to draw itself
+ on a console with very few columns
+
+1.1.6 / 2014-06-16
+==================
+
+ * now prevents progress bar from exceeding TTY width by limiting its width to
+ the with of the TTY
+
+1.1.5 / 2014-03-25
+==================
+
+ * updated documentation and various other repo maintenance
+ * updated makefile to run examples with `make`
+ * removed dependency on readline module
+
+1.1.4 / 2014-03-14
+==================
+
+ * now supports streams, for example output progress bar to stderr, while piping
+ stdout
+ * increases performance and flicker by remembering the last drawn progress bar
+
+1.1.3 / 2013-12-31
+==================
+
+ * fixes a bug where bar would bug when initializing
+ * allows to pass updated tokens when ticking or updating the bar
+ * fixes a bug where the bar would throw if skipping to far
+
+1.1.2 / 2013-10-17
+==================
+
+ * lets you pass an `fmt` and a `total` instead of an options object
+
+1.1.0 / 2013-09-18
+==================
+
+ * eta and elapsed tokens default to 0.0 instead of ?.?
+ * better JSDocs
+ * added back and forth example
+ * added method to update the progress bar to a specific percentage
+ * added an option to hide the bar on completion
+
+1.0.1 / 2013-08-07
+==================
+
+ * on os x readline now works, reverting the terminal hack
+
+1.0.0 / 2013-06-18
+==================
+
+ * remove .version
+ * merge pull request #15 from davglass/readline-osx
+ * on OSX revert back to terminal hack to avoid a readline bug
+
+0.1.0 / 2012-09-19
+==================
+
+ * fixed logic bug that caused bar to jump one extra space at the end [davglass]
+ * working with readline impl, even on Windows [davglass]
+ * using readline instead of the \r hack [davglass]
+
+0.0.5 / 2012-08-07
+==================
+
+ * add ability to tick by zero chunks - tick(0)
+ * fix ETA. Closes #4 [lwille]
+
+0.0.4 / 2011-11-14
+==================
+
+ * allow more recent versions of node
+
+0.0.3 / 2011-04-20
+==================
+
+ * changed; erase the line when complete
+
+0.0.2 / 2011-04-20
+==================
+
+ * added custom tokens support
+ * fixed; clear line before writing
+
+0.0.1 / 2010-01-03
+==================
+
+ * initial release
diff --git a/node_modules/progress/LICENSE b/node_modules/progress/LICENSE
new file mode 100644
index 0000000..4608b39
--- /dev/null
+++ b/node_modules/progress/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2017 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/progress/Makefile b/node_modules/progress/Makefile
new file mode 100644
index 0000000..f933be1
--- /dev/null
+++ b/node_modules/progress/Makefile
@@ -0,0 +1,8 @@
+
+EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE))
+
+.PHONY: test
+test: $(EXAMPLES)
+
+.PHONY: $(EXAMPLES)
+$(EXAMPLES): ; node $@ && echo
diff --git a/node_modules/progress/Readme.md b/node_modules/progress/Readme.md
new file mode 100644
index 0000000..6d4271a
--- /dev/null
+++ b/node_modules/progress/Readme.md
@@ -0,0 +1,146 @@
+Flexible ascii progress bar.
+
+## Installation
+
+```bash
+$ npm install progress
+```
+
+## Usage
+
+First we create a `ProgressBar`, giving it a format string
+as well as the `total`, telling the progress bar when it will
+be considered complete. After that all we need to do is `tick()` appropriately.
+
+```javascript
+var ProgressBar = require('progress');
+
+var bar = new ProgressBar(':bar', { total: 10 });
+var timer = setInterval(function () {
+ bar.tick();
+ if (bar.complete) {
+ console.log('\ncomplete\n');
+ clearInterval(timer);
+ }
+}, 100);
+```
+
+### Options
+
+These are keys in the options object you can pass to the progress bar along with
+`total` as seen in the example above.
+
+- `curr` current completed index
+- `total` total number of ticks to complete
+- `width` the displayed width of the progress bar defaulting to total
+- `stream` the output stream defaulting to stderr
+- `head` head character defaulting to complete character
+- `complete` completion character defaulting to "="
+- `incomplete` incomplete character defaulting to "-"
+- `renderThrottle` minimum time between updates in milliseconds defaulting to 16
+- `clear` option to clear the bar on completion defaulting to false
+- `callback` optional function to call when the progress bar completes
+
+### Tokens
+
+These are tokens you can use in the format of your progress bar.
+
+- `:bar` the progress bar itself
+- `:current` current tick number
+- `:total` total ticks
+- `:elapsed` time elapsed in seconds
+- `:percent` completion percentage
+- `:eta` estimated completion time in seconds
+- `:rate` rate of ticks per second
+
+### Custom Tokens
+
+You can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls.
+
+```javascript
+var bar = new ProgressBar(':current: :token1 :token2', { total: 3 })
+bar.tick({
+ 'token1': "Hello",
+ 'token2': "World!\n"
+})
+bar.tick(2, {
+ 'token1': "Goodbye",
+ 'token2': "World!"
+})
+```
+The above example would result in the output below.
+
+```
+1: Hello World!
+3: Goodbye World!
+```
+
+## Examples
+
+### Download
+
+In our download example each tick has a variable influence, so we pass the chunk
+length which adjusts the progress bar appropriately relative to the total
+length.
+
+```javascript
+var ProgressBar = require('progress');
+var https = require('https');
+
+var req = https.request({
+ host: 'download.github.com',
+ port: 443,
+ path: '/visionmedia-node-jscoverage-0d4608a.zip'
+});
+
+req.on('response', function(res){
+ var len = parseInt(res.headers['content-length'], 10);
+
+ console.log();
+ var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', {
+ complete: '=',
+ incomplete: ' ',
+ width: 20,
+ total: len
+ });
+
+ res.on('data', function (chunk) {
+ bar.tick(chunk.length);
+ });
+
+ res.on('end', function () {
+ console.log('\n');
+ });
+});
+
+req.end();
+```
+
+The above example result in a progress bar like the one below.
+
+```
+downloading [===== ] 39/bps 29% 3.7s
+```
+
+### Interrupt
+
+To display a message during progress bar execution, use `interrupt()`
+```javascript
+var ProgressBar = require('progress');
+
+var bar = new ProgressBar(':bar :current/:total', { total: 10 });
+var timer = setInterval(function () {
+ bar.tick();
+ if (bar.complete) {
+ clearInterval(timer);
+ } else if (bar.curr === 5) {
+ bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total);
+ }
+}, 1000);
+```
+
+You can see more examples in the `examples` folder.
+
+## License
+
+MIT
diff --git a/node_modules/progress/index.js b/node_modules/progress/index.js
new file mode 100644
index 0000000..4449dd3
--- /dev/null
+++ b/node_modules/progress/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/node-progress');
diff --git a/node_modules/progress/lib/node-progress.js b/node_modules/progress/lib/node-progress.js
new file mode 100644
index 0000000..8eb0740
--- /dev/null
+++ b/node_modules/progress/lib/node-progress.js
@@ -0,0 +1,236 @@
+/*!
+ * node-progress
+ * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Expose `ProgressBar`.
+ */
+
+exports = module.exports = ProgressBar;
+
+/**
+ * Initialize a `ProgressBar` with the given `fmt` string and `options` or
+ * `total`.
+ *
+ * Options:
+ *
+ * - `curr` current completed index
+ * - `total` total number of ticks to complete
+ * - `width` the displayed width of the progress bar defaulting to total
+ * - `stream` the output stream defaulting to stderr
+ * - `head` head character defaulting to complete character
+ * - `complete` completion character defaulting to "="
+ * - `incomplete` incomplete character defaulting to "-"
+ * - `renderThrottle` minimum time between updates in milliseconds defaulting to 16
+ * - `callback` optional function to call when the progress bar completes
+ * - `clear` will clear the progress bar upon termination
+ *
+ * Tokens:
+ *
+ * - `:bar` the progress bar itself
+ * - `:current` current tick number
+ * - `:total` total ticks
+ * - `:elapsed` time elapsed in seconds
+ * - `:percent` completion percentage
+ * - `:eta` eta in seconds
+ * - `:rate` rate of ticks per second
+ *
+ * @param {string} fmt
+ * @param {object|number} options or total
+ * @api public
+ */
+
+function ProgressBar(fmt, options) {
+ this.stream = options.stream || process.stderr;
+
+ if (typeof(options) == 'number') {
+ var total = options;
+ options = {};
+ options.total = total;
+ } else {
+ options = options || {};
+ if ('string' != typeof fmt) throw new Error('format required');
+ if ('number' != typeof options.total) throw new Error('total required');
+ }
+
+ this.fmt = fmt;
+ this.curr = options.curr || 0;
+ this.total = options.total;
+ this.width = options.width || this.total;
+ this.clear = options.clear
+ this.chars = {
+ complete : options.complete || '=',
+ incomplete : options.incomplete || '-',
+ head : options.head || (options.complete || '=')
+ };
+ this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0;
+ this.lastRender = -Infinity;
+ this.callback = options.callback || function () {};
+ this.tokens = {};
+ this.lastDraw = '';
+}
+
+/**
+ * "tick" the progress bar with optional `len` and optional `tokens`.
+ *
+ * @param {number|object} len or tokens
+ * @param {object} tokens
+ * @api public
+ */
+
+ProgressBar.prototype.tick = function(len, tokens){
+ if (len !== 0)
+ len = len || 1;
+
+ // swap tokens
+ if ('object' == typeof len) tokens = len, len = 1;
+ if (tokens) this.tokens = tokens;
+
+ // start time for eta
+ if (0 == this.curr) this.start = new Date;
+
+ this.curr += len
+
+ // try to render
+ this.render();
+
+ // progress complete
+ if (this.curr >= this.total) {
+ this.render(undefined, true);
+ this.complete = true;
+ this.terminate();
+ this.callback(this);
+ return;
+ }
+};
+
+/**
+ * Method to render the progress bar with optional `tokens` to place in the
+ * progress bar's `fmt` field.
+ *
+ * @param {object} tokens
+ * @api public
+ */
+
+ProgressBar.prototype.render = function (tokens, force) {
+ force = force !== undefined ? force : false;
+ if (tokens) this.tokens = tokens;
+
+ if (!this.stream.isTTY) return;
+
+ var now = Date.now();
+ var delta = now - this.lastRender;
+ if (!force && (delta < this.renderThrottle)) {
+ return;
+ } else {
+ this.lastRender = now;
+ }
+
+ var ratio = this.curr / this.total;
+ ratio = Math.min(Math.max(ratio, 0), 1);
+
+ var percent = Math.floor(ratio * 100);
+ var incomplete, complete, completeLength;
+ var elapsed = new Date - this.start;
+ var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1);
+ var rate = this.curr / (elapsed / 1000);
+
+ /* populate the bar template with percentages and timestamps */
+ var str = this.fmt
+ .replace(':current', this.curr)
+ .replace(':total', this.total)
+ .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1))
+ .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000)
+ .toFixed(1))
+ .replace(':percent', percent.toFixed(0) + '%')
+ .replace(':rate', Math.round(rate));
+
+ /* compute the available space (non-zero) for the bar */
+ var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length);
+ if(availableSpace && process.platform === 'win32'){
+ availableSpace = availableSpace - 1;
+ }
+
+ var width = Math.min(this.width, availableSpace);
+
+ /* TODO: the following assumes the user has one ':bar' token */
+ completeLength = Math.round(width * ratio);
+ complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete);
+ incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete);
+
+ /* add head to the complete string */
+ if(completeLength > 0)
+ complete = complete.slice(0, -1) + this.chars.head;
+
+ /* fill in the actual progress bar */
+ str = str.replace(':bar', complete + incomplete);
+
+ /* replace the extra tokens */
+ if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]);
+
+ if (this.lastDraw !== str) {
+ this.stream.cursorTo(0);
+ this.stream.write(str);
+ this.stream.clearLine(1);
+ this.lastDraw = str;
+ }
+};
+
+/**
+ * "update" the progress bar to represent an exact percentage.
+ * The ratio (between 0 and 1) specified will be multiplied by `total` and
+ * floored, representing the closest available "tick." For example, if a
+ * progress bar has a length of 3 and `update(0.5)` is called, the progress
+ * will be set to 1.
+ *
+ * A ratio of 0.5 will attempt to set the progress to halfway.
+ *
+ * @param {number} ratio The ratio (between 0 and 1 inclusive) to set the
+ * overall completion to.
+ * @api public
+ */
+
+ProgressBar.prototype.update = function (ratio, tokens) {
+ var goal = Math.floor(ratio * this.total);
+ var delta = goal - this.curr;
+
+ this.tick(delta, tokens);
+};
+
+/**
+ * "interrupt" the progress bar and write a message above it.
+ * @param {string} message The message to write.
+ * @api public
+ */
+
+ProgressBar.prototype.interrupt = function (message) {
+ // clear the current line
+ this.stream.clearLine();
+ // move the cursor to the start of the line
+ this.stream.cursorTo(0);
+ // write the message text
+ this.stream.write(message);
+ // terminate the line after writing the message
+ this.stream.write('\n');
+ // re-display the progress bar with its lastDraw
+ this.stream.write(this.lastDraw);
+};
+
+/**
+ * Terminates a progress bar.
+ *
+ * @api public
+ */
+
+ProgressBar.prototype.terminate = function () {
+ if (this.clear) {
+ if (this.stream.clearLine) {
+ this.stream.clearLine();
+ this.stream.cursorTo(0);
+ }
+ } else {
+ this.stream.write('\n');
+ }
+};
diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json
new file mode 100644
index 0000000..bb81fa0
--- /dev/null
+++ b/node_modules/progress/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "progress",
+ "version": "2.0.3",
+ "description": "Flexible ascii progress bar",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/node-progress"
+ },
+ "keywords": [
+ "cli",
+ "progress"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Christoffer Hallas <christoffer.hallas@gmail.com>",
+ "Jordan Scales <scalesjordan@gmail.com>",
+ "Andrew Rhyne <rhyneandrew@gmail.com>",
+ "Marco Brack <PapstDonB@Googlemail.com>"
+ ],
+ "dependencies": {},
+ "main": "./index.js",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/proto-list/LICENSE b/node_modules/proto-list/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/proto-list/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/proto-list/README.md b/node_modules/proto-list/README.md
new file mode 100644
index 0000000..43cfa35
--- /dev/null
+++ b/node_modules/proto-list/README.md
@@ -0,0 +1,3 @@
+A list of objects, bound by their prototype chain.
+
+Used in npm's config stuff.
diff --git a/node_modules/proto-list/package.json b/node_modules/proto-list/package.json
new file mode 100644
index 0000000..c65b406
--- /dev/null
+++ b/node_modules/proto-list/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "proto-list",
+ "version": "1.2.4",
+ "description": "A utility for managing a prototype chain",
+ "main": "./proto-list.js",
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/isaacs/proto-list"
+ },
+ "license": "ISC",
+ "devDependencies": {
+ "tap": "0"
+ }
+}
diff --git a/node_modules/proto-list/proto-list.js b/node_modules/proto-list/proto-list.js
new file mode 100644
index 0000000..b55c25c
--- /dev/null
+++ b/node_modules/proto-list/proto-list.js
@@ -0,0 +1,88 @@
+
+module.exports = ProtoList
+
+function setProto(obj, proto) {
+ if (typeof Object.setPrototypeOf === "function")
+ return Object.setPrototypeOf(obj, proto)
+ else
+ obj.__proto__ = proto
+}
+
+function ProtoList () {
+ this.list = []
+ var root = null
+ Object.defineProperty(this, 'root', {
+ get: function () { return root },
+ set: function (r) {
+ root = r
+ if (this.list.length) {
+ setProto(this.list[this.list.length - 1], r)
+ }
+ },
+ enumerable: true,
+ configurable: true
+ })
+}
+
+ProtoList.prototype =
+ { get length () { return this.list.length }
+ , get keys () {
+ var k = []
+ for (var i in this.list[0]) k.push(i)
+ return k
+ }
+ , get snapshot () {
+ var o = {}
+ this.keys.forEach(function (k) { o[k] = this.get(k) }, this)
+ return o
+ }
+ , get store () {
+ return this.list[0]
+ }
+ , push : function (obj) {
+ if (typeof obj !== "object") obj = {valueOf:obj}
+ if (this.list.length >= 1) {
+ setProto(this.list[this.list.length - 1], obj)
+ }
+ setProto(obj, this.root)
+ return this.list.push(obj)
+ }
+ , pop : function () {
+ if (this.list.length >= 2) {
+ setProto(this.list[this.list.length - 2], this.root)
+ }
+ return this.list.pop()
+ }
+ , unshift : function (obj) {
+ setProto(obj, this.list[0] || this.root)
+ return this.list.unshift(obj)
+ }
+ , shift : function () {
+ if (this.list.length === 1) {
+ setProto(this.list[0], this.root)
+ }
+ return this.list.shift()
+ }
+ , get : function (key) {
+ return this.list[0][key]
+ }
+ , set : function (key, val, save) {
+ if (!this.length) this.push({})
+ if (save && this.list[0].hasOwnProperty(key)) this.push({})
+ return this.list[0][key] = val
+ }
+ , forEach : function (fn, thisp) {
+ for (var key in this.list[0]) fn.call(thisp, key, this.list[0][key])
+ }
+ , slice : function () {
+ return this.list.slice.apply(this.list, arguments)
+ }
+ , splice : function () {
+ // handle injections
+ var ret = this.list.splice.apply(this.list, arguments)
+ for (var i = 0, l = this.list.length; i < l; i++) {
+ setProto(this.list[i], this.list[i + 1] || this.root)
+ }
+ return ret
+ }
+ }
diff --git a/node_modules/proto-list/test/basic.js b/node_modules/proto-list/test/basic.js
new file mode 100644
index 0000000..5cd66be
--- /dev/null
+++ b/node_modules/proto-list/test/basic.js
@@ -0,0 +1,61 @@
+var tap = require("tap")
+ , test = tap.test
+ , ProtoList = require("../proto-list.js")
+
+tap.plan(1)
+
+tap.test("protoList tests", function (t) {
+ var p = new ProtoList
+ p.push({foo:"bar"})
+ p.push({})
+ p.set("foo", "baz")
+ t.equal(p.get("foo"), "baz")
+
+ var p = new ProtoList
+ p.push({foo:"bar"})
+ p.set("foo", "baz")
+ t.equal(p.get("foo"), "baz")
+ t.equal(p.length, 1)
+ p.pop()
+ t.equal(p.length, 0)
+ p.set("foo", "asdf")
+ t.equal(p.length, 1)
+ t.equal(p.get("foo"), "asdf")
+ p.push({bar:"baz"})
+ t.equal(p.length, 2)
+ t.equal(p.get("foo"), "asdf")
+ p.shift()
+ t.equal(p.length, 1)
+ t.equal(p.get("foo"), undefined)
+
+
+ p.unshift({foo:"blo", bar:"rab"})
+ p.unshift({foo:"boo"})
+ t.equal(p.length, 3)
+ t.equal(p.get("foo"), "boo")
+ t.equal(p.get("bar"), "rab")
+
+ var ret = p.splice(1, 1, {bar:"bar"})
+ t.same(ret, [{foo:"blo", bar:"rab"}])
+ t.equal(p.get("bar"), "bar")
+
+ // should not inherit default object properties
+ t.equal(p.get('hasOwnProperty'), undefined)
+
+ // unless we give it those.
+ p.root = {}
+ t.equal(p.get('hasOwnProperty'), {}.hasOwnProperty)
+
+ p.root = {default:'monkey'}
+ t.equal(p.get('default'), 'monkey')
+
+ p.push({red:'blue'})
+ p.push({red:'blue'})
+ p.push({red:'blue'})
+ while (p.length) {
+ t.equal(p.get('default'), 'monkey')
+ p.shift()
+ }
+
+ t.end()
+})
diff --git a/node_modules/psl/LICENSE b/node_modules/psl/LICENSE
new file mode 100644
index 0000000..78d792e
--- /dev/null
+++ b/node_modules/psl/LICENSE
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Lupo Montero lupomontero@gmail.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/psl/README.md b/node_modules/psl/README.md
new file mode 100644
index 0000000..e876c3d
--- /dev/null
+++ b/node_modules/psl/README.md
@@ -0,0 +1,215 @@
+# psl (Public Suffix List)
+
+[![NPM](https://nodei.co/npm/psl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/psl/)
+
+[![Greenkeeper badge](https://badges.greenkeeper.io/lupomontero/psl.svg)](https://greenkeeper.io/)
+[![Build Status](https://travis-ci.org/lupomontero/psl.svg?branch=master)](https://travis-ci.org/lupomontero/psl)
+[![devDependency Status](https://david-dm.org/lupomontero/psl/dev-status.png)](https://david-dm.org/lupomontero/psl#info=devDependencies)
+
+`psl` is a `JavaScript` domain name parser based on the
+[Public Suffix List](https://publicsuffix.org/).
+
+This implementation is tested against the
+[test data hosted by Mozilla](http://mxr.mozilla.org/mozilla-central/source/netwerk/test/unit/data/test_psl.txt?raw=1)
+and kindly provided by [Comodo](https://www.comodo.com/).
+
+Cross browser testing provided by
+[<img alt="BrowserStack" width="160" src="./browserstack-logo.svg" />](https://www.browserstack.com/)
+
+## What is the Public Suffix List?
+
+The Public Suffix List is a cross-vendor initiative to provide an accurate list
+of domain name suffixes.
+
+The Public Suffix List is an initiative of the Mozilla Project, but is
+maintained as a community resource. It is available for use in any software,
+but was originally created to meet the needs of browser manufacturers.
+
+A "public suffix" is one under which Internet users can directly register names.
+Some examples of public suffixes are ".com", ".co.uk" and "pvt.k12.wy.us". The
+Public Suffix List is a list of all known public suffixes.
+
+Source: http://publicsuffix.org
+
+
+## Installation
+
+### Node.js
+
+```sh
+npm install --save psl
+```
+
+### Browser
+
+Download [psl.min.js](https://raw.githubusercontent.com/lupomontero/psl/master/dist/psl.min.js)
+and include it in a script tag.
+
+```html
+<script src="psl.min.js"></script>
+```
+
+This script is browserified and wrapped in a [umd](https://github.com/umdjs/umd)
+wrapper so you should be able to use it standalone or together with a module
+loader.
+
+## API
+
+### `psl.parse(domain)`
+
+Parse domain based on Public Suffix List. Returns an `Object` with the following
+properties:
+
+* `tld`: Top level domain (this is the _public suffix_).
+* `sld`: Second level domain (the first private part of the domain name).
+* `domain`: The domain name is the `sld` + `tld`.
+* `subdomain`: Optional parts left of the domain.
+
+#### Example:
+
+```js
+var psl = require('psl');
+
+// Parse domain without subdomain
+var parsed = psl.parse('google.com');
+console.log(parsed.tld); // 'com'
+console.log(parsed.sld); // 'google'
+console.log(parsed.domain); // 'google.com'
+console.log(parsed.subdomain); // null
+
+// Parse domain with subdomain
+var parsed = psl.parse('www.google.com');
+console.log(parsed.tld); // 'com'
+console.log(parsed.sld); // 'google'
+console.log(parsed.domain); // 'google.com'
+console.log(parsed.subdomain); // 'www'
+
+// Parse domain with nested subdomains
+var parsed = psl.parse('a.b.c.d.foo.com');
+console.log(parsed.tld); // 'com'
+console.log(parsed.sld); // 'foo'
+console.log(parsed.domain); // 'foo.com'
+console.log(parsed.subdomain); // 'a.b.c.d'
+```
+
+### `psl.get(domain)`
+
+Get domain name, `sld` + `tld`. Returns `null` if not valid.
+
+#### Example:
+
+```js
+var psl = require('psl');
+
+// null input.
+psl.get(null); // null
+
+// Mixed case.
+psl.get('COM'); // null
+psl.get('example.COM'); // 'example.com'
+psl.get('WwW.example.COM'); // 'example.com'
+
+// Unlisted TLD.
+psl.get('example'); // null
+psl.get('example.example'); // 'example.example'
+psl.get('b.example.example'); // 'example.example'
+psl.get('a.b.example.example'); // 'example.example'
+
+// TLD with only 1 rule.
+psl.get('biz'); // null
+psl.get('domain.biz'); // 'domain.biz'
+psl.get('b.domain.biz'); // 'domain.biz'
+psl.get('a.b.domain.biz'); // 'domain.biz'
+
+// TLD with some 2-level rules.
+psl.get('uk.com'); // null);
+psl.get('example.uk.com'); // 'example.uk.com');
+psl.get('b.example.uk.com'); // 'example.uk.com');
+
+// More complex TLD.
+psl.get('c.kobe.jp'); // null
+psl.get('b.c.kobe.jp'); // 'b.c.kobe.jp'
+psl.get('a.b.c.kobe.jp'); // 'b.c.kobe.jp'
+psl.get('city.kobe.jp'); // 'city.kobe.jp'
+psl.get('www.city.kobe.jp'); // 'city.kobe.jp'
+
+// IDN labels.
+psl.get('食狮.com.cn'); // '食狮.com.cn'
+psl.get('食狮.公司.cn'); // '食狮.公司.cn'
+psl.get('www.食狮.公司.cn'); // '食狮.公司.cn'
+
+// Same as above, but punycoded.
+psl.get('xn--85x722f.com.cn'); // 'xn--85x722f.com.cn'
+psl.get('xn--85x722f.xn--55qx5d.cn'); // 'xn--85x722f.xn--55qx5d.cn'
+psl.get('www.xn--85x722f.xn--55qx5d.cn'); // 'xn--85x722f.xn--55qx5d.cn'
+```
+
+### `psl.isValid(domain)`
+
+Check whether a domain has a valid Public Suffix. Returns a `Boolean` indicating
+whether the domain has a valid Public Suffix.
+
+#### Example
+
+```js
+var psl = require('psl');
+
+psl.isValid('google.com'); // true
+psl.isValid('www.google.com'); // true
+psl.isValid('x.yz'); // false
+```
+
+
+## Testing and Building
+
+Test are written using [`mocha`](https://mochajs.org/) and can be
+run in two different environments: `node` and `phantomjs`.
+
+```sh
+# This will run `eslint`, `mocha` and `karma`.
+npm test
+
+# Individual test environments
+# Run tests in node only.
+./node_modules/.bin/mocha test
+# Run tests in phantomjs only.
+./node_modules/.bin/karma start ./karma.conf.js --single-run
+
+# Build data (parse raw list) and create dist files
+npm run build
+```
+
+Feel free to fork if you see possible improvements!
+
+
+## Acknowledgements
+
+* Mozilla Foundation's [Public Suffix List](https://publicsuffix.org/)
+* Thanks to Rob Stradling of [Comodo](https://www.comodo.com/) for providing
+ test data.
+* Inspired by [weppos/publicsuffix-ruby](https://github.com/weppos/publicsuffix-ruby)
+
+
+## License
+
+The MIT License (MIT)
+
+Copyright (c) 2017 Lupo Montero <lupomontero@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/psl/browserstack-logo.svg b/node_modules/psl/browserstack-logo.svg
new file mode 100644
index 0000000..195f64d
--- /dev/null
+++ b/node_modules/psl/browserstack-logo.svg
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 490.1 105.6" style="enable-background:new 0 0 490.1 105.6;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill:#F4B960;}
+ .st1{fill:#E66F32;}
+ .st2{fill:#E43C41;}
+ .st3{fill:#BDD041;}
+ .st4{fill:#6DB54C;}
+ .st5{fill:#AEDAE6;}
+ .st6{fill:#56B8DE;}
+ .st7{fill:#00B1D5;}
+ .st8{fill:url(#SVGID_1_);}
+ .st9{fill:#221F1F;}
+ .st10{fill:#FFFFFF;}
+ .st11{fill:#000111;}
+</style>
+<title>Browserstack-logo-white</title>
+<circle class="st0" cx="52.8" cy="52.8" r="52.8"/>
+<circle class="st1" cx="47.5" cy="47.5" r="47.5"/>
+<circle class="st2" cx="53.8" cy="41.1" r="41.1"/>
+<circle class="st3" cx="57.1" cy="44.4" r="37.8"/>
+<circle class="st4" cx="54.3" cy="47.2" r="35.1"/>
+<circle class="st5" cx="48.8" cy="41.7" r="29.5"/>
+<circle class="st6" cx="53.6" cy="36.8" r="24.7"/>
+<circle class="st7" cx="56.6" cy="39.9" r="21.7"/>
+<radialGradient id="SVGID_1_" cx="53.45" cy="63.02" r="18.57" gradientTransform="matrix(1 0 0 -1 0 106)" gradientUnits="userSpaceOnUse">
+ <stop offset="0" style="stop-color:#797979"/>
+ <stop offset="1" style="stop-color:#4C4C4C"/>
+</radialGradient>
+<circle class="st8" cx="53.5" cy="43" r="18.6"/>
+<circle class="st9" cx="53.5" cy="43" r="18.6"/>
+<ellipse transform="matrix(0.4094 -0.9123 0.9123 0.4094 2.8913 76.9251)" class="st10" cx="60.9" cy="36.2" rx="5.7" ry="3.7"/>
+<path class="st11" d="M122.5,32.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h16.6c9.5,0,13.9,4.4,13.9,11c0.2,3.7-1.8,7.2-5.2,8.8v0.1
+ c3.7,1.5,6.1,5.2,6,9.3c0,8.2-5.6,12.2-15.4,12.2h-16c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1L122.5,32.6L122.5,32.6z M139.6,49.1
+ c3.9,0,6.4-2.2,6.4-5.4s-2.4-5.5-6.4-5.5h-8.9c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.2c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0
+ H139.6L139.6,49.1z M130.6,66.9h9.3c4.3,0,6.8-2.3,6.8-5.8s-2.4-5.7-6.7-5.7h-9.3c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.7
+ C130.3,66.8,130.4,66.9,130.6,66.9C130.6,66.9,130.6,66.9,130.6,66.9L130.6,66.9z"/>
+<path class="st11" d="M159.9,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V44.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6
+ c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v2.5h0.1c1.5-2.2,4.2-3.8,8.2-3.8c2.4,0,4.8,0.8,6.6,2.4c0.3,0.3,0.4,0.5,0.1,0.8l-3.5,4.1
+ c-0.2,0.3-0.6,0.4-0.9,0.2c0,0,0,0-0.1,0c-1.4-0.9-3-1.4-4.7-1.4c-4.1,0-6,2.7-6,7.4v15.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0
+ H159.9L159.9,73.3z"/>
+<path class="st11" d="M182.9,65.8c-0.8-2.3-1.1-4.8-1.1-7.2c-0.1-2.5,0.3-4.9,1.1-7.2c1.8-5.1,6.6-8.1,13.1-8.1s11.2,3,13,8.1
+ c0.8,2.3,1.1,4.8,1.1,7.2c0.1,2.5-0.3,4.9-1.1,7.2c-1.8,5.1-6.6,8.1-13,8.1S184.7,71,182.9,65.8z M201.9,64c0.5-1.7,0.8-3.6,0.7-5.4
+ c0.1-1.8-0.1-3.7-0.7-5.4c-0.9-2.5-3.3-4-5.9-3.8c-2.6-0.2-5.1,1.4-6,3.8c-0.5,1.8-0.8,3.6-0.7,5.4c-0.1,1.8,0.1,3.7,0.7,5.4
+ c0.9,2.5,3.4,4,6,3.8C198.6,68,201,66.5,201.9,64L201.9,64z"/>
+<path class="st11" d="M241.9,73.3c-0.4,0-0.7-0.3-0.8-0.6L235,53.9h-0.1l-6.2,18.7c-0.1,0.4-0.4,0.6-0.8,0.6h-5.4
+ c-0.4,0-0.7-0.3-0.8-0.6l-10-28.1c-0.1-0.2,0-0.5,0.2-0.6c0.1,0,0.2-0.1,0.3,0h6.3c0.4,0,0.8,0.2,0.9,0.6l6.1,19.3h0.1l6-19.3
+ c0.1-0.4,0.5-0.6,0.9-0.6h4.7c0.4,0,0.7,0.2,0.9,0.6l6.4,19.3h0.1l5.8-19.3c0.1-0.4,0.5-0.7,0.9-0.6h6.3c0.2-0.1,0.5,0.1,0.5,0.3
+ c0,0.1,0,0.2,0,0.3l-10,28.1c-0.1,0.4-0.4,0.6-0.8,0.6L241.9,73.3L241.9,73.3z"/>
+<path class="st11" d="M259.3,69.3c-0.2-0.2-0.3-0.6-0.1-0.8c0,0,0,0,0.1-0.1l3.7-3.6c0.3-0.2,0.7-0.2,0.9,0c2.6,2.1,5.9,3.3,9.3,3.3
+ c3.9,0,5.9-1.5,5.9-3.5c0-1.8-1.1-2.9-5.2-3.2l-3.4-0.3c-6.4-0.6-9.7-3.6-9.7-8.6c0-5.7,4.4-9.2,12.3-9.2c4.2-0.1,8.4,1.2,11.9,3.6
+ c0.3,0.2,0.3,0.5,0.2,0.8c0,0,0,0,0,0.1l-3.2,3.6c-0.2,0.3-0.6,0.3-0.9,0.1c-2.5-1.5-5.4-2.4-8.3-2.4c-3.1,0-4.8,1.3-4.8,3
+ s1.1,2.7,5.2,3.1l3.4,0.3c6.6,0.6,9.8,3.8,9.8,8.6c0,5.8-4.6,9.9-13.3,9.9C268,74,263.2,72.4,259.3,69.3z"/>
+<path class="st11" d="M291.2,65.8c-0.8-2.3-1.2-4.7-1.1-7.2c-0.1-2.5,0.3-4.9,1-7.2c1.8-5.1,6.6-8.1,12.9-8.1c6.5,0,11.2,3.1,13,8.1
+ c0.7,2.1,1,4.1,1,8.8c0,0.3-0.3,0.6-0.6,0.6c0,0-0.1,0-0.1,0h-19.5c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1c0,0.8,0.2,1.5,0.5,2.2
+ c1,2.9,3.5,4.4,7.1,4.4c2.7,0.1,5.4-0.9,7.4-2.8c0.2-0.3,0.7-0.4,1-0.1c0,0,0,0,0,0l3.9,3.2c0.2,0.1,0.3,0.5,0.2,0.7
+ c0,0.1-0.1,0.1-0.1,0.1c-2.7,2.9-7.2,5-13,5C297.8,73.9,293,70.9,291.2,65.8z M310.4,52.8c-0.9-2.4-3.2-3.8-6.2-3.8
+ s-5.4,1.4-6.2,3.8c-0.3,0.8-0.4,1.6-0.4,2.5c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0h12.4c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1
+ C310.8,54.5,310.6,53.6,310.4,52.8L310.4,52.8z"/>
+<path class="st11" d="M323.6,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V44.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6
+ c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v2.5h0.1c1.5-2.2,4.2-3.8,8.2-3.8c2.4,0,4.8,0.8,6.6,2.4c0.3,0.3,0.4,0.5,0.1,0.8l-3.5,4.1
+ c-0.2,0.3-0.6,0.4-0.9,0.2c0,0,0,0-0.1,0c-1.4-0.9-3-1.4-4.7-1.4c-4.1,0-6,2.7-6,7.4v15.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0
+ H323.6L323.6,73.3z"/>
+<path class="st11" d="M346.5,68.5c-0.3-0.2-0.4-0.6-0.2-0.9c0,0,0,0,0,0l4.1-4.4c0.2-0.3,0.6-0.3,0.9-0.1c0,0,0,0,0,0
+ c3.5,2.7,7.7,4.2,12.1,4.4c5.3,0,8.4-2.5,8.4-6c0-3-2-4.9-8.1-5.7l-2.4-0.3c-8.6-1.1-13.5-4.9-13.5-11.8c0-7.5,5.9-12.4,15.1-12.4
+ c5.1-0.1,10.1,1.4,14.5,4.2c0.3,0.1,0.4,0.4,0.2,0.7c0,0.1-0.1,0.1-0.1,0.2l-3.1,4.5c-0.2,0.3-0.6,0.4-0.9,0.2
+ c-3.2-2.1-6.9-3.2-10.7-3.2c-4.5,0-7,2.3-7,5.5c0,2.9,2.2,4.8,8.2,5.6l2.4,0.3c8.6,1.1,13.3,4.9,13.3,12c0,7.3-5.7,12.8-16.8,12.8
+ C356.3,73.9,350,71.5,346.5,68.5z"/>
+<path class="st11" d="M393.3,73.8c-6.4,0-8.8-2.9-8.8-8.6V49.8c0-0.2-0.1-0.3-0.3-0.4c0,0,0,0-0.1,0H382c-0.3,0-0.6-0.2-0.7-0.5
+ c0,0,0,0,0-0.1v-4.1c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h2.1c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1v-8c0-0.3,0.3-0.6,0.6-0.6
+ c0,0,0,0,0.1,0h6c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v8c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0h4.2c0.3,0,0.6,0.2,0.7,0.5
+ c0,0,0,0,0,0.1v4.1c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0h-4.2c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1V65c0,2.1,0.9,2.7,3,2.7h1.6
+ c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v4.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0L393.3,73.8L393.3,73.8z"/>
+<path class="st11" d="M421.2,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1v-2.1h0c-1.5,2-4.5,3.4-8.9,3.4c-5.8,0-10.6-2.8-10.6-8.9
+ c0-6.4,4.9-9.3,12.7-9.3h6.4c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1v-1.4c0-3.3-1.7-4.9-7-4.9c-2.6-0.1-5.1,0.6-7.2,2
+ c-0.3,0.2-0.7,0.2-0.9-0.1c0,0,0,0,0-0.1l-2.4-4c-0.2-0.2-0.1-0.6,0.1-0.8c0,0,0,0,0,0c2.6-1.7,6-2.9,11.2-2.9
+ c9.6,0,13.2,3,13.2,10.2v19.1c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0H421.2L421.2,73.3z M420.4,63.4v-2.2c0-0.2-0.1-0.3-0.3-0.4
+ c0,0,0,0-0.1,0h-5.2c-4.7,0-6.8,1.2-6.8,3.9c0,2.4,1.9,3.6,5.5,3.6C417.9,68.4,420.4,66.8,420.4,63.4L420.4,63.4z"/>
+<path class="st11" d="M433.1,65.8c-0.7-2.3-1.1-4.8-1-7.2c-0.1-2.4,0.3-4.9,1-7.2c1.8-5.2,6.7-8.1,13.1-8.1c4.2-0.2,8.2,1.5,11,4.6
+ c0.2,0.2,0.2,0.6,0,0.8c0,0,0,0-0.1,0.1l-4.1,3.3c-0.3,0.2-0.7,0.2-0.9-0.1c0,0,0,0,0-0.1c-1.5-1.7-3.6-2.6-5.9-2.5
+ c-2.8,0-5,1.3-5.9,3.8c-0.5,1.8-0.8,3.6-0.7,5.4c-0.1,1.8,0.1,3.7,0.7,5.5c0.9,2.5,3.1,3.8,5.9,3.8c2.2,0.1,4.4-0.9,5.9-2.6
+ c0.2-0.3,0.6-0.3,0.9-0.1c0,0,0,0,0,0l4.1,3.3c0.3,0.2,0.3,0.5,0.1,0.8c0,0,0,0-0.1,0.1c-2.9,3-6.9,4.6-11,4.5
+ C439.8,73.9,435,71.1,433.1,65.8z"/>
+<path class="st11" d="M482.8,73.3c-0.4,0-0.8-0.2-1-0.6l-8-12.3l-4.3,4.6v7.7c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0h-6
+ c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V32.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v23.8
+ l10.8-11.8c0.3-0.4,0.8-0.6,1.2-0.6h6.7c0.2,0,0.4,0.1,0.4,0.3c0,0.1,0,0.3-0.1,0.3l-10.1,10.7L490,72.7c0.1,0.2,0.1,0.4,0,0.5
+ c-0.1,0.1-0.2,0.1-0.3,0.1H482.8L482.8,73.3z"/>
+</svg>
diff --git a/node_modules/psl/data/rules.json b/node_modules/psl/data/rules.json
new file mode 100644
index 0000000..e19abdc
--- /dev/null
+++ b/node_modules/psl/data/rules.json
@@ -0,0 +1,8834 @@
+[
+"ac",
+"com.ac",
+"edu.ac",
+"gov.ac",
+"net.ac",
+"mil.ac",
+"org.ac",
+"ad",
+"nom.ad",
+"ae",
+"co.ae",
+"net.ae",
+"org.ae",
+"sch.ae",
+"ac.ae",
+"gov.ae",
+"mil.ae",
+"aero",
+"accident-investigation.aero",
+"accident-prevention.aero",
+"aerobatic.aero",
+"aeroclub.aero",
+"aerodrome.aero",
+"agents.aero",
+"aircraft.aero",
+"airline.aero",
+"airport.aero",
+"air-surveillance.aero",
+"airtraffic.aero",
+"air-traffic-control.aero",
+"ambulance.aero",
+"amusement.aero",
+"association.aero",
+"author.aero",
+"ballooning.aero",
+"broker.aero",
+"caa.aero",
+"cargo.aero",
+"catering.aero",
+"certification.aero",
+"championship.aero",
+"charter.aero",
+"civilaviation.aero",
+"club.aero",
+"conference.aero",
+"consultant.aero",
+"consulting.aero",
+"control.aero",
+"council.aero",
+"crew.aero",
+"design.aero",
+"dgca.aero",
+"educator.aero",
+"emergency.aero",
+"engine.aero",
+"engineer.aero",
+"entertainment.aero",
+"equipment.aero",
+"exchange.aero",
+"express.aero",
+"federation.aero",
+"flight.aero",
+"freight.aero",
+"fuel.aero",
+"gliding.aero",
+"government.aero",
+"groundhandling.aero",
+"group.aero",
+"hanggliding.aero",
+"homebuilt.aero",
+"insurance.aero",
+"journal.aero",
+"journalist.aero",
+"leasing.aero",
+"logistics.aero",
+"magazine.aero",
+"maintenance.aero",
+"media.aero",
+"microlight.aero",
+"modelling.aero",
+"navigation.aero",
+"parachuting.aero",
+"paragliding.aero",
+"passenger-association.aero",
+"pilot.aero",
+"press.aero",
+"production.aero",
+"recreation.aero",
+"repbody.aero",
+"res.aero",
+"research.aero",
+"rotorcraft.aero",
+"safety.aero",
+"scientist.aero",
+"services.aero",
+"show.aero",
+"skydiving.aero",
+"software.aero",
+"student.aero",
+"trader.aero",
+"trading.aero",
+"trainer.aero",
+"union.aero",
+"workinggroup.aero",
+"works.aero",
+"af",
+"gov.af",
+"com.af",
+"org.af",
+"net.af",
+"edu.af",
+"ag",
+"com.ag",
+"org.ag",
+"net.ag",
+"co.ag",
+"nom.ag",
+"ai",
+"off.ai",
+"com.ai",
+"net.ai",
+"org.ai",
+"al",
+"com.al",
+"edu.al",
+"gov.al",
+"mil.al",
+"net.al",
+"org.al",
+"am",
+"co.am",
+"com.am",
+"commune.am",
+"net.am",
+"org.am",
+"ao",
+"ed.ao",
+"gv.ao",
+"og.ao",
+"co.ao",
+"pb.ao",
+"it.ao",
+"aq",
+"ar",
+"com.ar",
+"edu.ar",
+"gob.ar",
+"gov.ar",
+"int.ar",
+"mil.ar",
+"musica.ar",
+"net.ar",
+"org.ar",
+"tur.ar",
+"arpa",
+"e164.arpa",
+"in-addr.arpa",
+"ip6.arpa",
+"iris.arpa",
+"uri.arpa",
+"urn.arpa",
+"as",
+"gov.as",
+"asia",
+"at",
+"ac.at",
+"co.at",
+"gv.at",
+"or.at",
+"au",
+"com.au",
+"net.au",
+"org.au",
+"edu.au",
+"gov.au",
+"asn.au",
+"id.au",
+"info.au",
+"conf.au",
+"oz.au",
+"act.au",
+"nsw.au",
+"nt.au",
+"qld.au",
+"sa.au",
+"tas.au",
+"vic.au",
+"wa.au",
+"act.edu.au",
+"catholic.edu.au",
+"nsw.edu.au",
+"nt.edu.au",
+"qld.edu.au",
+"sa.edu.au",
+"tas.edu.au",
+"vic.edu.au",
+"wa.edu.au",
+"qld.gov.au",
+"sa.gov.au",
+"tas.gov.au",
+"vic.gov.au",
+"wa.gov.au",
+"education.tas.edu.au",
+"schools.nsw.edu.au",
+"aw",
+"com.aw",
+"ax",
+"az",
+"com.az",
+"net.az",
+"int.az",
+"gov.az",
+"org.az",
+"edu.az",
+"info.az",
+"pp.az",
+"mil.az",
+"name.az",
+"pro.az",
+"biz.az",
+"ba",
+"com.ba",
+"edu.ba",
+"gov.ba",
+"mil.ba",
+"net.ba",
+"org.ba",
+"bb",
+"biz.bb",
+"co.bb",
+"com.bb",
+"edu.bb",
+"gov.bb",
+"info.bb",
+"net.bb",
+"org.bb",
+"store.bb",
+"tv.bb",
+"*.bd",
+"be",
+"ac.be",
+"bf",
+"gov.bf",
+"bg",
+"a.bg",
+"b.bg",
+"c.bg",
+"d.bg",
+"e.bg",
+"f.bg",
+"g.bg",
+"h.bg",
+"i.bg",
+"j.bg",
+"k.bg",
+"l.bg",
+"m.bg",
+"n.bg",
+"o.bg",
+"p.bg",
+"q.bg",
+"r.bg",
+"s.bg",
+"t.bg",
+"u.bg",
+"v.bg",
+"w.bg",
+"x.bg",
+"y.bg",
+"z.bg",
+"0.bg",
+"1.bg",
+"2.bg",
+"3.bg",
+"4.bg",
+"5.bg",
+"6.bg",
+"7.bg",
+"8.bg",
+"9.bg",
+"bh",
+"com.bh",
+"edu.bh",
+"net.bh",
+"org.bh",
+"gov.bh",
+"bi",
+"co.bi",
+"com.bi",
+"edu.bi",
+"or.bi",
+"org.bi",
+"biz",
+"bj",
+"asso.bj",
+"barreau.bj",
+"gouv.bj",
+"bm",
+"com.bm",
+"edu.bm",
+"gov.bm",
+"net.bm",
+"org.bm",
+"bn",
+"com.bn",
+"edu.bn",
+"gov.bn",
+"net.bn",
+"org.bn",
+"bo",
+"com.bo",
+"edu.bo",
+"gob.bo",
+"int.bo",
+"org.bo",
+"net.bo",
+"mil.bo",
+"tv.bo",
+"web.bo",
+"academia.bo",
+"agro.bo",
+"arte.bo",
+"blog.bo",
+"bolivia.bo",
+"ciencia.bo",
+"cooperativa.bo",
+"democracia.bo",
+"deporte.bo",
+"ecologia.bo",
+"economia.bo",
+"empresa.bo",
+"indigena.bo",
+"industria.bo",
+"info.bo",
+"medicina.bo",
+"movimiento.bo",
+"musica.bo",
+"natural.bo",
+"nombre.bo",
+"noticias.bo",
+"patria.bo",
+"politica.bo",
+"profesional.bo",
+"plurinacional.bo",
+"pueblo.bo",
+"revista.bo",
+"salud.bo",
+"tecnologia.bo",
+"tksat.bo",
+"transporte.bo",
+"wiki.bo",
+"br",
+"9guacu.br",
+"abc.br",
+"adm.br",
+"adv.br",
+"agr.br",
+"aju.br",
+"am.br",
+"anani.br",
+"aparecida.br",
+"arq.br",
+"art.br",
+"ato.br",
+"b.br",
+"barueri.br",
+"belem.br",
+"bhz.br",
+"bio.br",
+"blog.br",
+"bmd.br",
+"boavista.br",
+"bsb.br",
+"campinagrande.br",
+"campinas.br",
+"caxias.br",
+"cim.br",
+"cng.br",
+"cnt.br",
+"com.br",
+"contagem.br",
+"coop.br",
+"cri.br",
+"cuiaba.br",
+"curitiba.br",
+"def.br",
+"ecn.br",
+"eco.br",
+"edu.br",
+"emp.br",
+"eng.br",
+"esp.br",
+"etc.br",
+"eti.br",
+"far.br",
+"feira.br",
+"flog.br",
+"floripa.br",
+"fm.br",
+"fnd.br",
+"fortal.br",
+"fot.br",
+"foz.br",
+"fst.br",
+"g12.br",
+"ggf.br",
+"goiania.br",
+"gov.br",
+"ac.gov.br",
+"al.gov.br",
+"am.gov.br",
+"ap.gov.br",
+"ba.gov.br",
+"ce.gov.br",
+"df.gov.br",
+"es.gov.br",
+"go.gov.br",
+"ma.gov.br",
+"mg.gov.br",
+"ms.gov.br",
+"mt.gov.br",
+"pa.gov.br",
+"pb.gov.br",
+"pe.gov.br",
+"pi.gov.br",
+"pr.gov.br",
+"rj.gov.br",
+"rn.gov.br",
+"ro.gov.br",
+"rr.gov.br",
+"rs.gov.br",
+"sc.gov.br",
+"se.gov.br",
+"sp.gov.br",
+"to.gov.br",
+"gru.br",
+"imb.br",
+"ind.br",
+"inf.br",
+"jab.br",
+"jampa.br",
+"jdf.br",
+"joinville.br",
+"jor.br",
+"jus.br",
+"leg.br",
+"lel.br",
+"londrina.br",
+"macapa.br",
+"maceio.br",
+"manaus.br",
+"maringa.br",
+"mat.br",
+"med.br",
+"mil.br",
+"morena.br",
+"mp.br",
+"mus.br",
+"natal.br",
+"net.br",
+"niteroi.br",
+"*.nom.br",
+"not.br",
+"ntr.br",
+"odo.br",
+"ong.br",
+"org.br",
+"osasco.br",
+"palmas.br",
+"poa.br",
+"ppg.br",
+"pro.br",
+"psc.br",
+"psi.br",
+"pvh.br",
+"qsl.br",
+"radio.br",
+"rec.br",
+"recife.br",
+"ribeirao.br",
+"rio.br",
+"riobranco.br",
+"riopreto.br",
+"salvador.br",
+"sampa.br",
+"santamaria.br",
+"santoandre.br",
+"saobernardo.br",
+"saogonca.br",
+"sjc.br",
+"slg.br",
+"slz.br",
+"sorocaba.br",
+"srv.br",
+"taxi.br",
+"tc.br",
+"teo.br",
+"the.br",
+"tmp.br",
+"trd.br",
+"tur.br",
+"tv.br",
+"udi.br",
+"vet.br",
+"vix.br",
+"vlog.br",
+"wiki.br",
+"zlg.br",
+"bs",
+"com.bs",
+"net.bs",
+"org.bs",
+"edu.bs",
+"gov.bs",
+"bt",
+"com.bt",
+"edu.bt",
+"gov.bt",
+"net.bt",
+"org.bt",
+"bv",
+"bw",
+"co.bw",
+"org.bw",
+"by",
+"gov.by",
+"mil.by",
+"com.by",
+"of.by",
+"bz",
+"com.bz",
+"net.bz",
+"org.bz",
+"edu.bz",
+"gov.bz",
+"ca",
+"ab.ca",
+"bc.ca",
+"mb.ca",
+"nb.ca",
+"nf.ca",
+"nl.ca",
+"ns.ca",
+"nt.ca",
+"nu.ca",
+"on.ca",
+"pe.ca",
+"qc.ca",
+"sk.ca",
+"yk.ca",
+"gc.ca",
+"cat",
+"cc",
+"cd",
+"gov.cd",
+"cf",
+"cg",
+"ch",
+"ci",
+"org.ci",
+"or.ci",
+"com.ci",
+"co.ci",
+"edu.ci",
+"ed.ci",
+"ac.ci",
+"net.ci",
+"go.ci",
+"asso.ci",
+"aéroport.ci",
+"int.ci",
+"presse.ci",
+"md.ci",
+"gouv.ci",
+"*.ck",
+"!www.ck",
+"cl",
+"aprendemas.cl",
+"co.cl",
+"gob.cl",
+"gov.cl",
+"mil.cl",
+"cm",
+"co.cm",
+"com.cm",
+"gov.cm",
+"net.cm",
+"cn",
+"ac.cn",
+"com.cn",
+"edu.cn",
+"gov.cn",
+"net.cn",
+"org.cn",
+"mil.cn",
+"公司.cn",
+"网络.cn",
+"網絡.cn",
+"ah.cn",
+"bj.cn",
+"cq.cn",
+"fj.cn",
+"gd.cn",
+"gs.cn",
+"gz.cn",
+"gx.cn",
+"ha.cn",
+"hb.cn",
+"he.cn",
+"hi.cn",
+"hl.cn",
+"hn.cn",
+"jl.cn",
+"js.cn",
+"jx.cn",
+"ln.cn",
+"nm.cn",
+"nx.cn",
+"qh.cn",
+"sc.cn",
+"sd.cn",
+"sh.cn",
+"sn.cn",
+"sx.cn",
+"tj.cn",
+"xj.cn",
+"xz.cn",
+"yn.cn",
+"zj.cn",
+"hk.cn",
+"mo.cn",
+"tw.cn",
+"co",
+"arts.co",
+"com.co",
+"edu.co",
+"firm.co",
+"gov.co",
+"info.co",
+"int.co",
+"mil.co",
+"net.co",
+"nom.co",
+"org.co",
+"rec.co",
+"web.co",
+"com",
+"coop",
+"cr",
+"ac.cr",
+"co.cr",
+"ed.cr",
+"fi.cr",
+"go.cr",
+"or.cr",
+"sa.cr",
+"cu",
+"com.cu",
+"edu.cu",
+"org.cu",
+"net.cu",
+"gov.cu",
+"inf.cu",
+"cv",
+"cw",
+"com.cw",
+"edu.cw",
+"net.cw",
+"org.cw",
+"cx",
+"gov.cx",
+"cy",
+"ac.cy",
+"biz.cy",
+"com.cy",
+"ekloges.cy",
+"gov.cy",
+"ltd.cy",
+"name.cy",
+"net.cy",
+"org.cy",
+"parliament.cy",
+"press.cy",
+"pro.cy",
+"tm.cy",
+"cz",
+"de",
+"dj",
+"dk",
+"dm",
+"com.dm",
+"net.dm",
+"org.dm",
+"edu.dm",
+"gov.dm",
+"do",
+"art.do",
+"com.do",
+"edu.do",
+"gob.do",
+"gov.do",
+"mil.do",
+"net.do",
+"org.do",
+"sld.do",
+"web.do",
+"dz",
+"com.dz",
+"org.dz",
+"net.dz",
+"gov.dz",
+"edu.dz",
+"asso.dz",
+"pol.dz",
+"art.dz",
+"ec",
+"com.ec",
+"info.ec",
+"net.ec",
+"fin.ec",
+"k12.ec",
+"med.ec",
+"pro.ec",
+"org.ec",
+"edu.ec",
+"gov.ec",
+"gob.ec",
+"mil.ec",
+"edu",
+"ee",
+"edu.ee",
+"gov.ee",
+"riik.ee",
+"lib.ee",
+"med.ee",
+"com.ee",
+"pri.ee",
+"aip.ee",
+"org.ee",
+"fie.ee",
+"eg",
+"com.eg",
+"edu.eg",
+"eun.eg",
+"gov.eg",
+"mil.eg",
+"name.eg",
+"net.eg",
+"org.eg",
+"sci.eg",
+"*.er",
+"es",
+"com.es",
+"nom.es",
+"org.es",
+"gob.es",
+"edu.es",
+"et",
+"com.et",
+"gov.et",
+"org.et",
+"edu.et",
+"biz.et",
+"name.et",
+"info.et",
+"net.et",
+"eu",
+"fi",
+"aland.fi",
+"fj",
+"ac.fj",
+"biz.fj",
+"com.fj",
+"gov.fj",
+"info.fj",
+"mil.fj",
+"name.fj",
+"net.fj",
+"org.fj",
+"pro.fj",
+"*.fk",
+"fm",
+"fo",
+"fr",
+"asso.fr",
+"com.fr",
+"gouv.fr",
+"nom.fr",
+"prd.fr",
+"tm.fr",
+"aeroport.fr",
+"avocat.fr",
+"avoues.fr",
+"cci.fr",
+"chambagri.fr",
+"chirurgiens-dentistes.fr",
+"experts-comptables.fr",
+"geometre-expert.fr",
+"greta.fr",
+"huissier-justice.fr",
+"medecin.fr",
+"notaires.fr",
+"pharmacien.fr",
+"port.fr",
+"veterinaire.fr",
+"ga",
+"gb",
+"gd",
+"ge",
+"com.ge",
+"edu.ge",
+"gov.ge",
+"org.ge",
+"mil.ge",
+"net.ge",
+"pvt.ge",
+"gf",
+"gg",
+"co.gg",
+"net.gg",
+"org.gg",
+"gh",
+"com.gh",
+"edu.gh",
+"gov.gh",
+"org.gh",
+"mil.gh",
+"gi",
+"com.gi",
+"ltd.gi",
+"gov.gi",
+"mod.gi",
+"edu.gi",
+"org.gi",
+"gl",
+"co.gl",
+"com.gl",
+"edu.gl",
+"net.gl",
+"org.gl",
+"gm",
+"gn",
+"ac.gn",
+"com.gn",
+"edu.gn",
+"gov.gn",
+"org.gn",
+"net.gn",
+"gov",
+"gp",
+"com.gp",
+"net.gp",
+"mobi.gp",
+"edu.gp",
+"org.gp",
+"asso.gp",
+"gq",
+"gr",
+"com.gr",
+"edu.gr",
+"net.gr",
+"org.gr",
+"gov.gr",
+"gs",
+"gt",
+"com.gt",
+"edu.gt",
+"gob.gt",
+"ind.gt",
+"mil.gt",
+"net.gt",
+"org.gt",
+"gu",
+"com.gu",
+"edu.gu",
+"gov.gu",
+"guam.gu",
+"info.gu",
+"net.gu",
+"org.gu",
+"web.gu",
+"gw",
+"gy",
+"co.gy",
+"com.gy",
+"edu.gy",
+"gov.gy",
+"net.gy",
+"org.gy",
+"hk",
+"com.hk",
+"edu.hk",
+"gov.hk",
+"idv.hk",
+"net.hk",
+"org.hk",
+"公司.hk",
+"教育.hk",
+"敎育.hk",
+"政府.hk",
+"個人.hk",
+"个人.hk",
+"箇人.hk",
+"網络.hk",
+"网络.hk",
+"组織.hk",
+"網絡.hk",
+"网絡.hk",
+"组织.hk",
+"組織.hk",
+"組织.hk",
+"hm",
+"hn",
+"com.hn",
+"edu.hn",
+"org.hn",
+"net.hn",
+"mil.hn",
+"gob.hn",
+"hr",
+"iz.hr",
+"from.hr",
+"name.hr",
+"com.hr",
+"ht",
+"com.ht",
+"shop.ht",
+"firm.ht",
+"info.ht",
+"adult.ht",
+"net.ht",
+"pro.ht",
+"org.ht",
+"med.ht",
+"art.ht",
+"coop.ht",
+"pol.ht",
+"asso.ht",
+"edu.ht",
+"rel.ht",
+"gouv.ht",
+"perso.ht",
+"hu",
+"co.hu",
+"info.hu",
+"org.hu",
+"priv.hu",
+"sport.hu",
+"tm.hu",
+"2000.hu",
+"agrar.hu",
+"bolt.hu",
+"casino.hu",
+"city.hu",
+"erotica.hu",
+"erotika.hu",
+"film.hu",
+"forum.hu",
+"games.hu",
+"hotel.hu",
+"ingatlan.hu",
+"jogasz.hu",
+"konyvelo.hu",
+"lakas.hu",
+"media.hu",
+"news.hu",
+"reklam.hu",
+"sex.hu",
+"shop.hu",
+"suli.hu",
+"szex.hu",
+"tozsde.hu",
+"utazas.hu",
+"video.hu",
+"id",
+"ac.id",
+"biz.id",
+"co.id",
+"desa.id",
+"go.id",
+"mil.id",
+"my.id",
+"net.id",
+"or.id",
+"ponpes.id",
+"sch.id",
+"web.id",
+"ie",
+"gov.ie",
+"il",
+"ac.il",
+"co.il",
+"gov.il",
+"idf.il",
+"k12.il",
+"muni.il",
+"net.il",
+"org.il",
+"im",
+"ac.im",
+"co.im",
+"com.im",
+"ltd.co.im",
+"net.im",
+"org.im",
+"plc.co.im",
+"tt.im",
+"tv.im",
+"in",
+"co.in",
+"firm.in",
+"net.in",
+"org.in",
+"gen.in",
+"ind.in",
+"nic.in",
+"ac.in",
+"edu.in",
+"res.in",
+"gov.in",
+"mil.in",
+"info",
+"int",
+"eu.int",
+"io",
+"com.io",
+"iq",
+"gov.iq",
+"edu.iq",
+"mil.iq",
+"com.iq",
+"org.iq",
+"net.iq",
+"ir",
+"ac.ir",
+"co.ir",
+"gov.ir",
+"id.ir",
+"net.ir",
+"org.ir",
+"sch.ir",
+"ایران.ir",
+"ايران.ir",
+"is",
+"net.is",
+"com.is",
+"edu.is",
+"gov.is",
+"org.is",
+"int.is",
+"it",
+"gov.it",
+"edu.it",
+"abr.it",
+"abruzzo.it",
+"aosta-valley.it",
+"aostavalley.it",
+"bas.it",
+"basilicata.it",
+"cal.it",
+"calabria.it",
+"cam.it",
+"campania.it",
+"emilia-romagna.it",
+"emiliaromagna.it",
+"emr.it",
+"friuli-v-giulia.it",
+"friuli-ve-giulia.it",
+"friuli-vegiulia.it",
+"friuli-venezia-giulia.it",
+"friuli-veneziagiulia.it",
+"friuli-vgiulia.it",
+"friuliv-giulia.it",
+"friulive-giulia.it",
+"friulivegiulia.it",
+"friulivenezia-giulia.it",
+"friuliveneziagiulia.it",
+"friulivgiulia.it",
+"fvg.it",
+"laz.it",
+"lazio.it",
+"lig.it",
+"liguria.it",
+"lom.it",
+"lombardia.it",
+"lombardy.it",
+"lucania.it",
+"mar.it",
+"marche.it",
+"mol.it",
+"molise.it",
+"piedmont.it",
+"piemonte.it",
+"pmn.it",
+"pug.it",
+"puglia.it",
+"sar.it",
+"sardegna.it",
+"sardinia.it",
+"sic.it",
+"sicilia.it",
+"sicily.it",
+"taa.it",
+"tos.it",
+"toscana.it",
+"trentin-sud-tirol.it",
+"trentin-süd-tirol.it",
+"trentin-sudtirol.it",
+"trentin-südtirol.it",
+"trentin-sued-tirol.it",
+"trentin-suedtirol.it",
+"trentino-a-adige.it",
+"trentino-aadige.it",
+"trentino-alto-adige.it",
+"trentino-altoadige.it",
+"trentino-s-tirol.it",
+"trentino-stirol.it",
+"trentino-sud-tirol.it",
+"trentino-süd-tirol.it",
+"trentino-sudtirol.it",
+"trentino-südtirol.it",
+"trentino-sued-tirol.it",
+"trentino-suedtirol.it",
+"trentino.it",
+"trentinoa-adige.it",
+"trentinoaadige.it",
+"trentinoalto-adige.it",
+"trentinoaltoadige.it",
+"trentinos-tirol.it",
+"trentinostirol.it",
+"trentinosud-tirol.it",
+"trentinosüd-tirol.it",
+"trentinosudtirol.it",
+"trentinosüdtirol.it",
+"trentinosued-tirol.it",
+"trentinosuedtirol.it",
+"trentinsud-tirol.it",
+"trentinsüd-tirol.it",
+"trentinsudtirol.it",
+"trentinsüdtirol.it",
+"trentinsued-tirol.it",
+"trentinsuedtirol.it",
+"tuscany.it",
+"umb.it",
+"umbria.it",
+"val-d-aosta.it",
+"val-daosta.it",
+"vald-aosta.it",
+"valdaosta.it",
+"valle-aosta.it",
+"valle-d-aosta.it",
+"valle-daosta.it",
+"valleaosta.it",
+"valled-aosta.it",
+"valledaosta.it",
+"vallee-aoste.it",
+"vallée-aoste.it",
+"vallee-d-aoste.it",
+"vallée-d-aoste.it",
+"valleeaoste.it",
+"valléeaoste.it",
+"valleedaoste.it",
+"valléedaoste.it",
+"vao.it",
+"vda.it",
+"ven.it",
+"veneto.it",
+"ag.it",
+"agrigento.it",
+"al.it",
+"alessandria.it",
+"alto-adige.it",
+"altoadige.it",
+"an.it",
+"ancona.it",
+"andria-barletta-trani.it",
+"andria-trani-barletta.it",
+"andriabarlettatrani.it",
+"andriatranibarletta.it",
+"ao.it",
+"aosta.it",
+"aoste.it",
+"ap.it",
+"aq.it",
+"aquila.it",
+"ar.it",
+"arezzo.it",
+"ascoli-piceno.it",
+"ascolipiceno.it",
+"asti.it",
+"at.it",
+"av.it",
+"avellino.it",
+"ba.it",
+"balsan-sudtirol.it",
+"balsan-südtirol.it",
+"balsan-suedtirol.it",
+"balsan.it",
+"bari.it",
+"barletta-trani-andria.it",
+"barlettatraniandria.it",
+"belluno.it",
+"benevento.it",
+"bergamo.it",
+"bg.it",
+"bi.it",
+"biella.it",
+"bl.it",
+"bn.it",
+"bo.it",
+"bologna.it",
+"bolzano-altoadige.it",
+"bolzano.it",
+"bozen-sudtirol.it",
+"bozen-südtirol.it",
+"bozen-suedtirol.it",
+"bozen.it",
+"br.it",
+"brescia.it",
+"brindisi.it",
+"bs.it",
+"bt.it",
+"bulsan-sudtirol.it",
+"bulsan-südtirol.it",
+"bulsan-suedtirol.it",
+"bulsan.it",
+"bz.it",
+"ca.it",
+"cagliari.it",
+"caltanissetta.it",
+"campidano-medio.it",
+"campidanomedio.it",
+"campobasso.it",
+"carbonia-iglesias.it",
+"carboniaiglesias.it",
+"carrara-massa.it",
+"carraramassa.it",
+"caserta.it",
+"catania.it",
+"catanzaro.it",
+"cb.it",
+"ce.it",
+"cesena-forli.it",
+"cesena-forlì.it",
+"cesenaforli.it",
+"cesenaforlì.it",
+"ch.it",
+"chieti.it",
+"ci.it",
+"cl.it",
+"cn.it",
+"co.it",
+"como.it",
+"cosenza.it",
+"cr.it",
+"cremona.it",
+"crotone.it",
+"cs.it",
+"ct.it",
+"cuneo.it",
+"cz.it",
+"dell-ogliastra.it",
+"dellogliastra.it",
+"en.it",
+"enna.it",
+"fc.it",
+"fe.it",
+"fermo.it",
+"ferrara.it",
+"fg.it",
+"fi.it",
+"firenze.it",
+"florence.it",
+"fm.it",
+"foggia.it",
+"forli-cesena.it",
+"forlì-cesena.it",
+"forlicesena.it",
+"forlìcesena.it",
+"fr.it",
+"frosinone.it",
+"ge.it",
+"genoa.it",
+"genova.it",
+"go.it",
+"gorizia.it",
+"gr.it",
+"grosseto.it",
+"iglesias-carbonia.it",
+"iglesiascarbonia.it",
+"im.it",
+"imperia.it",
+"is.it",
+"isernia.it",
+"kr.it",
+"la-spezia.it",
+"laquila.it",
+"laspezia.it",
+"latina.it",
+"lc.it",
+"le.it",
+"lecce.it",
+"lecco.it",
+"li.it",
+"livorno.it",
+"lo.it",
+"lodi.it",
+"lt.it",
+"lu.it",
+"lucca.it",
+"macerata.it",
+"mantova.it",
+"massa-carrara.it",
+"massacarrara.it",
+"matera.it",
+"mb.it",
+"mc.it",
+"me.it",
+"medio-campidano.it",
+"mediocampidano.it",
+"messina.it",
+"mi.it",
+"milan.it",
+"milano.it",
+"mn.it",
+"mo.it",
+"modena.it",
+"monza-brianza.it",
+"monza-e-della-brianza.it",
+"monza.it",
+"monzabrianza.it",
+"monzaebrianza.it",
+"monzaedellabrianza.it",
+"ms.it",
+"mt.it",
+"na.it",
+"naples.it",
+"napoli.it",
+"no.it",
+"novara.it",
+"nu.it",
+"nuoro.it",
+"og.it",
+"ogliastra.it",
+"olbia-tempio.it",
+"olbiatempio.it",
+"or.it",
+"oristano.it",
+"ot.it",
+"pa.it",
+"padova.it",
+"padua.it",
+"palermo.it",
+"parma.it",
+"pavia.it",
+"pc.it",
+"pd.it",
+"pe.it",
+"perugia.it",
+"pesaro-urbino.it",
+"pesarourbino.it",
+"pescara.it",
+"pg.it",
+"pi.it",
+"piacenza.it",
+"pisa.it",
+"pistoia.it",
+"pn.it",
+"po.it",
+"pordenone.it",
+"potenza.it",
+"pr.it",
+"prato.it",
+"pt.it",
+"pu.it",
+"pv.it",
+"pz.it",
+"ra.it",
+"ragusa.it",
+"ravenna.it",
+"rc.it",
+"re.it",
+"reggio-calabria.it",
+"reggio-emilia.it",
+"reggiocalabria.it",
+"reggioemilia.it",
+"rg.it",
+"ri.it",
+"rieti.it",
+"rimini.it",
+"rm.it",
+"rn.it",
+"ro.it",
+"roma.it",
+"rome.it",
+"rovigo.it",
+"sa.it",
+"salerno.it",
+"sassari.it",
+"savona.it",
+"si.it",
+"siena.it",
+"siracusa.it",
+"so.it",
+"sondrio.it",
+"sp.it",
+"sr.it",
+"ss.it",
+"suedtirol.it",
+"südtirol.it",
+"sv.it",
+"ta.it",
+"taranto.it",
+"te.it",
+"tempio-olbia.it",
+"tempioolbia.it",
+"teramo.it",
+"terni.it",
+"tn.it",
+"to.it",
+"torino.it",
+"tp.it",
+"tr.it",
+"trani-andria-barletta.it",
+"trani-barletta-andria.it",
+"traniandriabarletta.it",
+"tranibarlettaandria.it",
+"trapani.it",
+"trento.it",
+"treviso.it",
+"trieste.it",
+"ts.it",
+"turin.it",
+"tv.it",
+"ud.it",
+"udine.it",
+"urbino-pesaro.it",
+"urbinopesaro.it",
+"va.it",
+"varese.it",
+"vb.it",
+"vc.it",
+"ve.it",
+"venezia.it",
+"venice.it",
+"verbania.it",
+"vercelli.it",
+"verona.it",
+"vi.it",
+"vibo-valentia.it",
+"vibovalentia.it",
+"vicenza.it",
+"viterbo.it",
+"vr.it",
+"vs.it",
+"vt.it",
+"vv.it",
+"je",
+"co.je",
+"net.je",
+"org.je",
+"*.jm",
+"jo",
+"com.jo",
+"org.jo",
+"net.jo",
+"edu.jo",
+"sch.jo",
+"gov.jo",
+"mil.jo",
+"name.jo",
+"jobs",
+"jp",
+"ac.jp",
+"ad.jp",
+"co.jp",
+"ed.jp",
+"go.jp",
+"gr.jp",
+"lg.jp",
+"ne.jp",
+"or.jp",
+"aichi.jp",
+"akita.jp",
+"aomori.jp",
+"chiba.jp",
+"ehime.jp",
+"fukui.jp",
+"fukuoka.jp",
+"fukushima.jp",
+"gifu.jp",
+"gunma.jp",
+"hiroshima.jp",
+"hokkaido.jp",
+"hyogo.jp",
+"ibaraki.jp",
+"ishikawa.jp",
+"iwate.jp",
+"kagawa.jp",
+"kagoshima.jp",
+"kanagawa.jp",
+"kochi.jp",
+"kumamoto.jp",
+"kyoto.jp",
+"mie.jp",
+"miyagi.jp",
+"miyazaki.jp",
+"nagano.jp",
+"nagasaki.jp",
+"nara.jp",
+"niigata.jp",
+"oita.jp",
+"okayama.jp",
+"okinawa.jp",
+"osaka.jp",
+"saga.jp",
+"saitama.jp",
+"shiga.jp",
+"shimane.jp",
+"shizuoka.jp",
+"tochigi.jp",
+"tokushima.jp",
+"tokyo.jp",
+"tottori.jp",
+"toyama.jp",
+"wakayama.jp",
+"yamagata.jp",
+"yamaguchi.jp",
+"yamanashi.jp",
+"栃木.jp",
+"愛知.jp",
+"愛媛.jp",
+"兵庫.jp",
+"熊本.jp",
+"茨城.jp",
+"北海道.jp",
+"千葉.jp",
+"和歌山.jp",
+"長崎.jp",
+"長野.jp",
+"新潟.jp",
+"青森.jp",
+"静岡.jp",
+"東京.jp",
+"石川.jp",
+"埼玉.jp",
+"三重.jp",
+"京都.jp",
+"佐賀.jp",
+"大分.jp",
+"大阪.jp",
+"奈良.jp",
+"宮城.jp",
+"宮崎.jp",
+"富山.jp",
+"山口.jp",
+"山形.jp",
+"山梨.jp",
+"岩手.jp",
+"岐阜.jp",
+"岡山.jp",
+"島根.jp",
+"広島.jp",
+"徳島.jp",
+"沖縄.jp",
+"滋賀.jp",
+"神奈川.jp",
+"福井.jp",
+"福岡.jp",
+"福島.jp",
+"秋田.jp",
+"群馬.jp",
+"香川.jp",
+"高知.jp",
+"鳥取.jp",
+"鹿児島.jp",
+"*.kawasaki.jp",
+"*.kitakyushu.jp",
+"*.kobe.jp",
+"*.nagoya.jp",
+"*.sapporo.jp",
+"*.sendai.jp",
+"*.yokohama.jp",
+"!city.kawasaki.jp",
+"!city.kitakyushu.jp",
+"!city.kobe.jp",
+"!city.nagoya.jp",
+"!city.sapporo.jp",
+"!city.sendai.jp",
+"!city.yokohama.jp",
+"aisai.aichi.jp",
+"ama.aichi.jp",
+"anjo.aichi.jp",
+"asuke.aichi.jp",
+"chiryu.aichi.jp",
+"chita.aichi.jp",
+"fuso.aichi.jp",
+"gamagori.aichi.jp",
+"handa.aichi.jp",
+"hazu.aichi.jp",
+"hekinan.aichi.jp",
+"higashiura.aichi.jp",
+"ichinomiya.aichi.jp",
+"inazawa.aichi.jp",
+"inuyama.aichi.jp",
+"isshiki.aichi.jp",
+"iwakura.aichi.jp",
+"kanie.aichi.jp",
+"kariya.aichi.jp",
+"kasugai.aichi.jp",
+"kira.aichi.jp",
+"kiyosu.aichi.jp",
+"komaki.aichi.jp",
+"konan.aichi.jp",
+"kota.aichi.jp",
+"mihama.aichi.jp",
+"miyoshi.aichi.jp",
+"nishio.aichi.jp",
+"nisshin.aichi.jp",
+"obu.aichi.jp",
+"oguchi.aichi.jp",
+"oharu.aichi.jp",
+"okazaki.aichi.jp",
+"owariasahi.aichi.jp",
+"seto.aichi.jp",
+"shikatsu.aichi.jp",
+"shinshiro.aichi.jp",
+"shitara.aichi.jp",
+"tahara.aichi.jp",
+"takahama.aichi.jp",
+"tobishima.aichi.jp",
+"toei.aichi.jp",
+"togo.aichi.jp",
+"tokai.aichi.jp",
+"tokoname.aichi.jp",
+"toyoake.aichi.jp",
+"toyohashi.aichi.jp",
+"toyokawa.aichi.jp",
+"toyone.aichi.jp",
+"toyota.aichi.jp",
+"tsushima.aichi.jp",
+"yatomi.aichi.jp",
+"akita.akita.jp",
+"daisen.akita.jp",
+"fujisato.akita.jp",
+"gojome.akita.jp",
+"hachirogata.akita.jp",
+"happou.akita.jp",
+"higashinaruse.akita.jp",
+"honjo.akita.jp",
+"honjyo.akita.jp",
+"ikawa.akita.jp",
+"kamikoani.akita.jp",
+"kamioka.akita.jp",
+"katagami.akita.jp",
+"kazuno.akita.jp",
+"kitaakita.akita.jp",
+"kosaka.akita.jp",
+"kyowa.akita.jp",
+"misato.akita.jp",
+"mitane.akita.jp",
+"moriyoshi.akita.jp",
+"nikaho.akita.jp",
+"noshiro.akita.jp",
+"odate.akita.jp",
+"oga.akita.jp",
+"ogata.akita.jp",
+"semboku.akita.jp",
+"yokote.akita.jp",
+"yurihonjo.akita.jp",
+"aomori.aomori.jp",
+"gonohe.aomori.jp",
+"hachinohe.aomori.jp",
+"hashikami.aomori.jp",
+"hiranai.aomori.jp",
+"hirosaki.aomori.jp",
+"itayanagi.aomori.jp",
+"kuroishi.aomori.jp",
+"misawa.aomori.jp",
+"mutsu.aomori.jp",
+"nakadomari.aomori.jp",
+"noheji.aomori.jp",
+"oirase.aomori.jp",
+"owani.aomori.jp",
+"rokunohe.aomori.jp",
+"sannohe.aomori.jp",
+"shichinohe.aomori.jp",
+"shingo.aomori.jp",
+"takko.aomori.jp",
+"towada.aomori.jp",
+"tsugaru.aomori.jp",
+"tsuruta.aomori.jp",
+"abiko.chiba.jp",
+"asahi.chiba.jp",
+"chonan.chiba.jp",
+"chosei.chiba.jp",
+"choshi.chiba.jp",
+"chuo.chiba.jp",
+"funabashi.chiba.jp",
+"futtsu.chiba.jp",
+"hanamigawa.chiba.jp",
+"ichihara.chiba.jp",
+"ichikawa.chiba.jp",
+"ichinomiya.chiba.jp",
+"inzai.chiba.jp",
+"isumi.chiba.jp",
+"kamagaya.chiba.jp",
+"kamogawa.chiba.jp",
+"kashiwa.chiba.jp",
+"katori.chiba.jp",
+"katsuura.chiba.jp",
+"kimitsu.chiba.jp",
+"kisarazu.chiba.jp",
+"kozaki.chiba.jp",
+"kujukuri.chiba.jp",
+"kyonan.chiba.jp",
+"matsudo.chiba.jp",
+"midori.chiba.jp",
+"mihama.chiba.jp",
+"minamiboso.chiba.jp",
+"mobara.chiba.jp",
+"mutsuzawa.chiba.jp",
+"nagara.chiba.jp",
+"nagareyama.chiba.jp",
+"narashino.chiba.jp",
+"narita.chiba.jp",
+"noda.chiba.jp",
+"oamishirasato.chiba.jp",
+"omigawa.chiba.jp",
+"onjuku.chiba.jp",
+"otaki.chiba.jp",
+"sakae.chiba.jp",
+"sakura.chiba.jp",
+"shimofusa.chiba.jp",
+"shirako.chiba.jp",
+"shiroi.chiba.jp",
+"shisui.chiba.jp",
+"sodegaura.chiba.jp",
+"sosa.chiba.jp",
+"tako.chiba.jp",
+"tateyama.chiba.jp",
+"togane.chiba.jp",
+"tohnosho.chiba.jp",
+"tomisato.chiba.jp",
+"urayasu.chiba.jp",
+"yachimata.chiba.jp",
+"yachiyo.chiba.jp",
+"yokaichiba.chiba.jp",
+"yokoshibahikari.chiba.jp",
+"yotsukaido.chiba.jp",
+"ainan.ehime.jp",
+"honai.ehime.jp",
+"ikata.ehime.jp",
+"imabari.ehime.jp",
+"iyo.ehime.jp",
+"kamijima.ehime.jp",
+"kihoku.ehime.jp",
+"kumakogen.ehime.jp",
+"masaki.ehime.jp",
+"matsuno.ehime.jp",
+"matsuyama.ehime.jp",
+"namikata.ehime.jp",
+"niihama.ehime.jp",
+"ozu.ehime.jp",
+"saijo.ehime.jp",
+"seiyo.ehime.jp",
+"shikokuchuo.ehime.jp",
+"tobe.ehime.jp",
+"toon.ehime.jp",
+"uchiko.ehime.jp",
+"uwajima.ehime.jp",
+"yawatahama.ehime.jp",
+"echizen.fukui.jp",
+"eiheiji.fukui.jp",
+"fukui.fukui.jp",
+"ikeda.fukui.jp",
+"katsuyama.fukui.jp",
+"mihama.fukui.jp",
+"minamiechizen.fukui.jp",
+"obama.fukui.jp",
+"ohi.fukui.jp",
+"ono.fukui.jp",
+"sabae.fukui.jp",
+"sakai.fukui.jp",
+"takahama.fukui.jp",
+"tsuruga.fukui.jp",
+"wakasa.fukui.jp",
+"ashiya.fukuoka.jp",
+"buzen.fukuoka.jp",
+"chikugo.fukuoka.jp",
+"chikuho.fukuoka.jp",
+"chikujo.fukuoka.jp",
+"chikushino.fukuoka.jp",
+"chikuzen.fukuoka.jp",
+"chuo.fukuoka.jp",
+"dazaifu.fukuoka.jp",
+"fukuchi.fukuoka.jp",
+"hakata.fukuoka.jp",
+"higashi.fukuoka.jp",
+"hirokawa.fukuoka.jp",
+"hisayama.fukuoka.jp",
+"iizuka.fukuoka.jp",
+"inatsuki.fukuoka.jp",
+"kaho.fukuoka.jp",
+"kasuga.fukuoka.jp",
+"kasuya.fukuoka.jp",
+"kawara.fukuoka.jp",
+"keisen.fukuoka.jp",
+"koga.fukuoka.jp",
+"kurate.fukuoka.jp",
+"kurogi.fukuoka.jp",
+"kurume.fukuoka.jp",
+"minami.fukuoka.jp",
+"miyako.fukuoka.jp",
+"miyama.fukuoka.jp",
+"miyawaka.fukuoka.jp",
+"mizumaki.fukuoka.jp",
+"munakata.fukuoka.jp",
+"nakagawa.fukuoka.jp",
+"nakama.fukuoka.jp",
+"nishi.fukuoka.jp",
+"nogata.fukuoka.jp",
+"ogori.fukuoka.jp",
+"okagaki.fukuoka.jp",
+"okawa.fukuoka.jp",
+"oki.fukuoka.jp",
+"omuta.fukuoka.jp",
+"onga.fukuoka.jp",
+"onojo.fukuoka.jp",
+"oto.fukuoka.jp",
+"saigawa.fukuoka.jp",
+"sasaguri.fukuoka.jp",
+"shingu.fukuoka.jp",
+"shinyoshitomi.fukuoka.jp",
+"shonai.fukuoka.jp",
+"soeda.fukuoka.jp",
+"sue.fukuoka.jp",
+"tachiarai.fukuoka.jp",
+"tagawa.fukuoka.jp",
+"takata.fukuoka.jp",
+"toho.fukuoka.jp",
+"toyotsu.fukuoka.jp",
+"tsuiki.fukuoka.jp",
+"ukiha.fukuoka.jp",
+"umi.fukuoka.jp",
+"usui.fukuoka.jp",
+"yamada.fukuoka.jp",
+"yame.fukuoka.jp",
+"yanagawa.fukuoka.jp",
+"yukuhashi.fukuoka.jp",
+"aizubange.fukushima.jp",
+"aizumisato.fukushima.jp",
+"aizuwakamatsu.fukushima.jp",
+"asakawa.fukushima.jp",
+"bandai.fukushima.jp",
+"date.fukushima.jp",
+"fukushima.fukushima.jp",
+"furudono.fukushima.jp",
+"futaba.fukushima.jp",
+"hanawa.fukushima.jp",
+"higashi.fukushima.jp",
+"hirata.fukushima.jp",
+"hirono.fukushima.jp",
+"iitate.fukushima.jp",
+"inawashiro.fukushima.jp",
+"ishikawa.fukushima.jp",
+"iwaki.fukushima.jp",
+"izumizaki.fukushima.jp",
+"kagamiishi.fukushima.jp",
+"kaneyama.fukushima.jp",
+"kawamata.fukushima.jp",
+"kitakata.fukushima.jp",
+"kitashiobara.fukushima.jp",
+"koori.fukushima.jp",
+"koriyama.fukushima.jp",
+"kunimi.fukushima.jp",
+"miharu.fukushima.jp",
+"mishima.fukushima.jp",
+"namie.fukushima.jp",
+"nango.fukushima.jp",
+"nishiaizu.fukushima.jp",
+"nishigo.fukushima.jp",
+"okuma.fukushima.jp",
+"omotego.fukushima.jp",
+"ono.fukushima.jp",
+"otama.fukushima.jp",
+"samegawa.fukushima.jp",
+"shimogo.fukushima.jp",
+"shirakawa.fukushima.jp",
+"showa.fukushima.jp",
+"soma.fukushima.jp",
+"sukagawa.fukushima.jp",
+"taishin.fukushima.jp",
+"tamakawa.fukushima.jp",
+"tanagura.fukushima.jp",
+"tenei.fukushima.jp",
+"yabuki.fukushima.jp",
+"yamato.fukushima.jp",
+"yamatsuri.fukushima.jp",
+"yanaizu.fukushima.jp",
+"yugawa.fukushima.jp",
+"anpachi.gifu.jp",
+"ena.gifu.jp",
+"gifu.gifu.jp",
+"ginan.gifu.jp",
+"godo.gifu.jp",
+"gujo.gifu.jp",
+"hashima.gifu.jp",
+"hichiso.gifu.jp",
+"hida.gifu.jp",
+"higashishirakawa.gifu.jp",
+"ibigawa.gifu.jp",
+"ikeda.gifu.jp",
+"kakamigahara.gifu.jp",
+"kani.gifu.jp",
+"kasahara.gifu.jp",
+"kasamatsu.gifu.jp",
+"kawaue.gifu.jp",
+"kitagata.gifu.jp",
+"mino.gifu.jp",
+"minokamo.gifu.jp",
+"mitake.gifu.jp",
+"mizunami.gifu.jp",
+"motosu.gifu.jp",
+"nakatsugawa.gifu.jp",
+"ogaki.gifu.jp",
+"sakahogi.gifu.jp",
+"seki.gifu.jp",
+"sekigahara.gifu.jp",
+"shirakawa.gifu.jp",
+"tajimi.gifu.jp",
+"takayama.gifu.jp",
+"tarui.gifu.jp",
+"toki.gifu.jp",
+"tomika.gifu.jp",
+"wanouchi.gifu.jp",
+"yamagata.gifu.jp",
+"yaotsu.gifu.jp",
+"yoro.gifu.jp",
+"annaka.gunma.jp",
+"chiyoda.gunma.jp",
+"fujioka.gunma.jp",
+"higashiagatsuma.gunma.jp",
+"isesaki.gunma.jp",
+"itakura.gunma.jp",
+"kanna.gunma.jp",
+"kanra.gunma.jp",
+"katashina.gunma.jp",
+"kawaba.gunma.jp",
+"kiryu.gunma.jp",
+"kusatsu.gunma.jp",
+"maebashi.gunma.jp",
+"meiwa.gunma.jp",
+"midori.gunma.jp",
+"minakami.gunma.jp",
+"naganohara.gunma.jp",
+"nakanojo.gunma.jp",
+"nanmoku.gunma.jp",
+"numata.gunma.jp",
+"oizumi.gunma.jp",
+"ora.gunma.jp",
+"ota.gunma.jp",
+"shibukawa.gunma.jp",
+"shimonita.gunma.jp",
+"shinto.gunma.jp",
+"showa.gunma.jp",
+"takasaki.gunma.jp",
+"takayama.gunma.jp",
+"tamamura.gunma.jp",
+"tatebayashi.gunma.jp",
+"tomioka.gunma.jp",
+"tsukiyono.gunma.jp",
+"tsumagoi.gunma.jp",
+"ueno.gunma.jp",
+"yoshioka.gunma.jp",
+"asaminami.hiroshima.jp",
+"daiwa.hiroshima.jp",
+"etajima.hiroshima.jp",
+"fuchu.hiroshima.jp",
+"fukuyama.hiroshima.jp",
+"hatsukaichi.hiroshima.jp",
+"higashihiroshima.hiroshima.jp",
+"hongo.hiroshima.jp",
+"jinsekikogen.hiroshima.jp",
+"kaita.hiroshima.jp",
+"kui.hiroshima.jp",
+"kumano.hiroshima.jp",
+"kure.hiroshima.jp",
+"mihara.hiroshima.jp",
+"miyoshi.hiroshima.jp",
+"naka.hiroshima.jp",
+"onomichi.hiroshima.jp",
+"osakikamijima.hiroshima.jp",
+"otake.hiroshima.jp",
+"saka.hiroshima.jp",
+"sera.hiroshima.jp",
+"seranishi.hiroshima.jp",
+"shinichi.hiroshima.jp",
+"shobara.hiroshima.jp",
+"takehara.hiroshima.jp",
+"abashiri.hokkaido.jp",
+"abira.hokkaido.jp",
+"aibetsu.hokkaido.jp",
+"akabira.hokkaido.jp",
+"akkeshi.hokkaido.jp",
+"asahikawa.hokkaido.jp",
+"ashibetsu.hokkaido.jp",
+"ashoro.hokkaido.jp",
+"assabu.hokkaido.jp",
+"atsuma.hokkaido.jp",
+"bibai.hokkaido.jp",
+"biei.hokkaido.jp",
+"bifuka.hokkaido.jp",
+"bihoro.hokkaido.jp",
+"biratori.hokkaido.jp",
+"chippubetsu.hokkaido.jp",
+"chitose.hokkaido.jp",
+"date.hokkaido.jp",
+"ebetsu.hokkaido.jp",
+"embetsu.hokkaido.jp",
+"eniwa.hokkaido.jp",
+"erimo.hokkaido.jp",
+"esan.hokkaido.jp",
+"esashi.hokkaido.jp",
+"fukagawa.hokkaido.jp",
+"fukushima.hokkaido.jp",
+"furano.hokkaido.jp",
+"furubira.hokkaido.jp",
+"haboro.hokkaido.jp",
+"hakodate.hokkaido.jp",
+"hamatonbetsu.hokkaido.jp",
+"hidaka.hokkaido.jp",
+"higashikagura.hokkaido.jp",
+"higashikawa.hokkaido.jp",
+"hiroo.hokkaido.jp",
+"hokuryu.hokkaido.jp",
+"hokuto.hokkaido.jp",
+"honbetsu.hokkaido.jp",
+"horokanai.hokkaido.jp",
+"horonobe.hokkaido.jp",
+"ikeda.hokkaido.jp",
+"imakane.hokkaido.jp",
+"ishikari.hokkaido.jp",
+"iwamizawa.hokkaido.jp",
+"iwanai.hokkaido.jp",
+"kamifurano.hokkaido.jp",
+"kamikawa.hokkaido.jp",
+"kamishihoro.hokkaido.jp",
+"kamisunagawa.hokkaido.jp",
+"kamoenai.hokkaido.jp",
+"kayabe.hokkaido.jp",
+"kembuchi.hokkaido.jp",
+"kikonai.hokkaido.jp",
+"kimobetsu.hokkaido.jp",
+"kitahiroshima.hokkaido.jp",
+"kitami.hokkaido.jp",
+"kiyosato.hokkaido.jp",
+"koshimizu.hokkaido.jp",
+"kunneppu.hokkaido.jp",
+"kuriyama.hokkaido.jp",
+"kuromatsunai.hokkaido.jp",
+"kushiro.hokkaido.jp",
+"kutchan.hokkaido.jp",
+"kyowa.hokkaido.jp",
+"mashike.hokkaido.jp",
+"matsumae.hokkaido.jp",
+"mikasa.hokkaido.jp",
+"minamifurano.hokkaido.jp",
+"mombetsu.hokkaido.jp",
+"moseushi.hokkaido.jp",
+"mukawa.hokkaido.jp",
+"muroran.hokkaido.jp",
+"naie.hokkaido.jp",
+"nakagawa.hokkaido.jp",
+"nakasatsunai.hokkaido.jp",
+"nakatombetsu.hokkaido.jp",
+"nanae.hokkaido.jp",
+"nanporo.hokkaido.jp",
+"nayoro.hokkaido.jp",
+"nemuro.hokkaido.jp",
+"niikappu.hokkaido.jp",
+"niki.hokkaido.jp",
+"nishiokoppe.hokkaido.jp",
+"noboribetsu.hokkaido.jp",
+"numata.hokkaido.jp",
+"obihiro.hokkaido.jp",
+"obira.hokkaido.jp",
+"oketo.hokkaido.jp",
+"okoppe.hokkaido.jp",
+"otaru.hokkaido.jp",
+"otobe.hokkaido.jp",
+"otofuke.hokkaido.jp",
+"otoineppu.hokkaido.jp",
+"oumu.hokkaido.jp",
+"ozora.hokkaido.jp",
+"pippu.hokkaido.jp",
+"rankoshi.hokkaido.jp",
+"rebun.hokkaido.jp",
+"rikubetsu.hokkaido.jp",
+"rishiri.hokkaido.jp",
+"rishirifuji.hokkaido.jp",
+"saroma.hokkaido.jp",
+"sarufutsu.hokkaido.jp",
+"shakotan.hokkaido.jp",
+"shari.hokkaido.jp",
+"shibecha.hokkaido.jp",
+"shibetsu.hokkaido.jp",
+"shikabe.hokkaido.jp",
+"shikaoi.hokkaido.jp",
+"shimamaki.hokkaido.jp",
+"shimizu.hokkaido.jp",
+"shimokawa.hokkaido.jp",
+"shinshinotsu.hokkaido.jp",
+"shintoku.hokkaido.jp",
+"shiranuka.hokkaido.jp",
+"shiraoi.hokkaido.jp",
+"shiriuchi.hokkaido.jp",
+"sobetsu.hokkaido.jp",
+"sunagawa.hokkaido.jp",
+"taiki.hokkaido.jp",
+"takasu.hokkaido.jp",
+"takikawa.hokkaido.jp",
+"takinoue.hokkaido.jp",
+"teshikaga.hokkaido.jp",
+"tobetsu.hokkaido.jp",
+"tohma.hokkaido.jp",
+"tomakomai.hokkaido.jp",
+"tomari.hokkaido.jp",
+"toya.hokkaido.jp",
+"toyako.hokkaido.jp",
+"toyotomi.hokkaido.jp",
+"toyoura.hokkaido.jp",
+"tsubetsu.hokkaido.jp",
+"tsukigata.hokkaido.jp",
+"urakawa.hokkaido.jp",
+"urausu.hokkaido.jp",
+"uryu.hokkaido.jp",
+"utashinai.hokkaido.jp",
+"wakkanai.hokkaido.jp",
+"wassamu.hokkaido.jp",
+"yakumo.hokkaido.jp",
+"yoichi.hokkaido.jp",
+"aioi.hyogo.jp",
+"akashi.hyogo.jp",
+"ako.hyogo.jp",
+"amagasaki.hyogo.jp",
+"aogaki.hyogo.jp",
+"asago.hyogo.jp",
+"ashiya.hyogo.jp",
+"awaji.hyogo.jp",
+"fukusaki.hyogo.jp",
+"goshiki.hyogo.jp",
+"harima.hyogo.jp",
+"himeji.hyogo.jp",
+"ichikawa.hyogo.jp",
+"inagawa.hyogo.jp",
+"itami.hyogo.jp",
+"kakogawa.hyogo.jp",
+"kamigori.hyogo.jp",
+"kamikawa.hyogo.jp",
+"kasai.hyogo.jp",
+"kasuga.hyogo.jp",
+"kawanishi.hyogo.jp",
+"miki.hyogo.jp",
+"minamiawaji.hyogo.jp",
+"nishinomiya.hyogo.jp",
+"nishiwaki.hyogo.jp",
+"ono.hyogo.jp",
+"sanda.hyogo.jp",
+"sannan.hyogo.jp",
+"sasayama.hyogo.jp",
+"sayo.hyogo.jp",
+"shingu.hyogo.jp",
+"shinonsen.hyogo.jp",
+"shiso.hyogo.jp",
+"sumoto.hyogo.jp",
+"taishi.hyogo.jp",
+"taka.hyogo.jp",
+"takarazuka.hyogo.jp",
+"takasago.hyogo.jp",
+"takino.hyogo.jp",
+"tamba.hyogo.jp",
+"tatsuno.hyogo.jp",
+"toyooka.hyogo.jp",
+"yabu.hyogo.jp",
+"yashiro.hyogo.jp",
+"yoka.hyogo.jp",
+"yokawa.hyogo.jp",
+"ami.ibaraki.jp",
+"asahi.ibaraki.jp",
+"bando.ibaraki.jp",
+"chikusei.ibaraki.jp",
+"daigo.ibaraki.jp",
+"fujishiro.ibaraki.jp",
+"hitachi.ibaraki.jp",
+"hitachinaka.ibaraki.jp",
+"hitachiomiya.ibaraki.jp",
+"hitachiota.ibaraki.jp",
+"ibaraki.ibaraki.jp",
+"ina.ibaraki.jp",
+"inashiki.ibaraki.jp",
+"itako.ibaraki.jp",
+"iwama.ibaraki.jp",
+"joso.ibaraki.jp",
+"kamisu.ibaraki.jp",
+"kasama.ibaraki.jp",
+"kashima.ibaraki.jp",
+"kasumigaura.ibaraki.jp",
+"koga.ibaraki.jp",
+"miho.ibaraki.jp",
+"mito.ibaraki.jp",
+"moriya.ibaraki.jp",
+"naka.ibaraki.jp",
+"namegata.ibaraki.jp",
+"oarai.ibaraki.jp",
+"ogawa.ibaraki.jp",
+"omitama.ibaraki.jp",
+"ryugasaki.ibaraki.jp",
+"sakai.ibaraki.jp",
+"sakuragawa.ibaraki.jp",
+"shimodate.ibaraki.jp",
+"shimotsuma.ibaraki.jp",
+"shirosato.ibaraki.jp",
+"sowa.ibaraki.jp",
+"suifu.ibaraki.jp",
+"takahagi.ibaraki.jp",
+"tamatsukuri.ibaraki.jp",
+"tokai.ibaraki.jp",
+"tomobe.ibaraki.jp",
+"tone.ibaraki.jp",
+"toride.ibaraki.jp",
+"tsuchiura.ibaraki.jp",
+"tsukuba.ibaraki.jp",
+"uchihara.ibaraki.jp",
+"ushiku.ibaraki.jp",
+"yachiyo.ibaraki.jp",
+"yamagata.ibaraki.jp",
+"yawara.ibaraki.jp",
+"yuki.ibaraki.jp",
+"anamizu.ishikawa.jp",
+"hakui.ishikawa.jp",
+"hakusan.ishikawa.jp",
+"kaga.ishikawa.jp",
+"kahoku.ishikawa.jp",
+"kanazawa.ishikawa.jp",
+"kawakita.ishikawa.jp",
+"komatsu.ishikawa.jp",
+"nakanoto.ishikawa.jp",
+"nanao.ishikawa.jp",
+"nomi.ishikawa.jp",
+"nonoichi.ishikawa.jp",
+"noto.ishikawa.jp",
+"shika.ishikawa.jp",
+"suzu.ishikawa.jp",
+"tsubata.ishikawa.jp",
+"tsurugi.ishikawa.jp",
+"uchinada.ishikawa.jp",
+"wajima.ishikawa.jp",
+"fudai.iwate.jp",
+"fujisawa.iwate.jp",
+"hanamaki.iwate.jp",
+"hiraizumi.iwate.jp",
+"hirono.iwate.jp",
+"ichinohe.iwate.jp",
+"ichinoseki.iwate.jp",
+"iwaizumi.iwate.jp",
+"iwate.iwate.jp",
+"joboji.iwate.jp",
+"kamaishi.iwate.jp",
+"kanegasaki.iwate.jp",
+"karumai.iwate.jp",
+"kawai.iwate.jp",
+"kitakami.iwate.jp",
+"kuji.iwate.jp",
+"kunohe.iwate.jp",
+"kuzumaki.iwate.jp",
+"miyako.iwate.jp",
+"mizusawa.iwate.jp",
+"morioka.iwate.jp",
+"ninohe.iwate.jp",
+"noda.iwate.jp",
+"ofunato.iwate.jp",
+"oshu.iwate.jp",
+"otsuchi.iwate.jp",
+"rikuzentakata.iwate.jp",
+"shiwa.iwate.jp",
+"shizukuishi.iwate.jp",
+"sumita.iwate.jp",
+"tanohata.iwate.jp",
+"tono.iwate.jp",
+"yahaba.iwate.jp",
+"yamada.iwate.jp",
+"ayagawa.kagawa.jp",
+"higashikagawa.kagawa.jp",
+"kanonji.kagawa.jp",
+"kotohira.kagawa.jp",
+"manno.kagawa.jp",
+"marugame.kagawa.jp",
+"mitoyo.kagawa.jp",
+"naoshima.kagawa.jp",
+"sanuki.kagawa.jp",
+"tadotsu.kagawa.jp",
+"takamatsu.kagawa.jp",
+"tonosho.kagawa.jp",
+"uchinomi.kagawa.jp",
+"utazu.kagawa.jp",
+"zentsuji.kagawa.jp",
+"akune.kagoshima.jp",
+"amami.kagoshima.jp",
+"hioki.kagoshima.jp",
+"isa.kagoshima.jp",
+"isen.kagoshima.jp",
+"izumi.kagoshima.jp",
+"kagoshima.kagoshima.jp",
+"kanoya.kagoshima.jp",
+"kawanabe.kagoshima.jp",
+"kinko.kagoshima.jp",
+"kouyama.kagoshima.jp",
+"makurazaki.kagoshima.jp",
+"matsumoto.kagoshima.jp",
+"minamitane.kagoshima.jp",
+"nakatane.kagoshima.jp",
+"nishinoomote.kagoshima.jp",
+"satsumasendai.kagoshima.jp",
+"soo.kagoshima.jp",
+"tarumizu.kagoshima.jp",
+"yusui.kagoshima.jp",
+"aikawa.kanagawa.jp",
+"atsugi.kanagawa.jp",
+"ayase.kanagawa.jp",
+"chigasaki.kanagawa.jp",
+"ebina.kanagawa.jp",
+"fujisawa.kanagawa.jp",
+"hadano.kanagawa.jp",
+"hakone.kanagawa.jp",
+"hiratsuka.kanagawa.jp",
+"isehara.kanagawa.jp",
+"kaisei.kanagawa.jp",
+"kamakura.kanagawa.jp",
+"kiyokawa.kanagawa.jp",
+"matsuda.kanagawa.jp",
+"minamiashigara.kanagawa.jp",
+"miura.kanagawa.jp",
+"nakai.kanagawa.jp",
+"ninomiya.kanagawa.jp",
+"odawara.kanagawa.jp",
+"oi.kanagawa.jp",
+"oiso.kanagawa.jp",
+"sagamihara.kanagawa.jp",
+"samukawa.kanagawa.jp",
+"tsukui.kanagawa.jp",
+"yamakita.kanagawa.jp",
+"yamato.kanagawa.jp",
+"yokosuka.kanagawa.jp",
+"yugawara.kanagawa.jp",
+"zama.kanagawa.jp",
+"zushi.kanagawa.jp",
+"aki.kochi.jp",
+"geisei.kochi.jp",
+"hidaka.kochi.jp",
+"higashitsuno.kochi.jp",
+"ino.kochi.jp",
+"kagami.kochi.jp",
+"kami.kochi.jp",
+"kitagawa.kochi.jp",
+"kochi.kochi.jp",
+"mihara.kochi.jp",
+"motoyama.kochi.jp",
+"muroto.kochi.jp",
+"nahari.kochi.jp",
+"nakamura.kochi.jp",
+"nankoku.kochi.jp",
+"nishitosa.kochi.jp",
+"niyodogawa.kochi.jp",
+"ochi.kochi.jp",
+"okawa.kochi.jp",
+"otoyo.kochi.jp",
+"otsuki.kochi.jp",
+"sakawa.kochi.jp",
+"sukumo.kochi.jp",
+"susaki.kochi.jp",
+"tosa.kochi.jp",
+"tosashimizu.kochi.jp",
+"toyo.kochi.jp",
+"tsuno.kochi.jp",
+"umaji.kochi.jp",
+"yasuda.kochi.jp",
+"yusuhara.kochi.jp",
+"amakusa.kumamoto.jp",
+"arao.kumamoto.jp",
+"aso.kumamoto.jp",
+"choyo.kumamoto.jp",
+"gyokuto.kumamoto.jp",
+"kamiamakusa.kumamoto.jp",
+"kikuchi.kumamoto.jp",
+"kumamoto.kumamoto.jp",
+"mashiki.kumamoto.jp",
+"mifune.kumamoto.jp",
+"minamata.kumamoto.jp",
+"minamioguni.kumamoto.jp",
+"nagasu.kumamoto.jp",
+"nishihara.kumamoto.jp",
+"oguni.kumamoto.jp",
+"ozu.kumamoto.jp",
+"sumoto.kumamoto.jp",
+"takamori.kumamoto.jp",
+"uki.kumamoto.jp",
+"uto.kumamoto.jp",
+"yamaga.kumamoto.jp",
+"yamato.kumamoto.jp",
+"yatsushiro.kumamoto.jp",
+"ayabe.kyoto.jp",
+"fukuchiyama.kyoto.jp",
+"higashiyama.kyoto.jp",
+"ide.kyoto.jp",
+"ine.kyoto.jp",
+"joyo.kyoto.jp",
+"kameoka.kyoto.jp",
+"kamo.kyoto.jp",
+"kita.kyoto.jp",
+"kizu.kyoto.jp",
+"kumiyama.kyoto.jp",
+"kyotamba.kyoto.jp",
+"kyotanabe.kyoto.jp",
+"kyotango.kyoto.jp",
+"maizuru.kyoto.jp",
+"minami.kyoto.jp",
+"minamiyamashiro.kyoto.jp",
+"miyazu.kyoto.jp",
+"muko.kyoto.jp",
+"nagaokakyo.kyoto.jp",
+"nakagyo.kyoto.jp",
+"nantan.kyoto.jp",
+"oyamazaki.kyoto.jp",
+"sakyo.kyoto.jp",
+"seika.kyoto.jp",
+"tanabe.kyoto.jp",
+"uji.kyoto.jp",
+"ujitawara.kyoto.jp",
+"wazuka.kyoto.jp",
+"yamashina.kyoto.jp",
+"yawata.kyoto.jp",
+"asahi.mie.jp",
+"inabe.mie.jp",
+"ise.mie.jp",
+"kameyama.mie.jp",
+"kawagoe.mie.jp",
+"kiho.mie.jp",
+"kisosaki.mie.jp",
+"kiwa.mie.jp",
+"komono.mie.jp",
+"kumano.mie.jp",
+"kuwana.mie.jp",
+"matsusaka.mie.jp",
+"meiwa.mie.jp",
+"mihama.mie.jp",
+"minamiise.mie.jp",
+"misugi.mie.jp",
+"miyama.mie.jp",
+"nabari.mie.jp",
+"shima.mie.jp",
+"suzuka.mie.jp",
+"tado.mie.jp",
+"taiki.mie.jp",
+"taki.mie.jp",
+"tamaki.mie.jp",
+"toba.mie.jp",
+"tsu.mie.jp",
+"udono.mie.jp",
+"ureshino.mie.jp",
+"watarai.mie.jp",
+"yokkaichi.mie.jp",
+"furukawa.miyagi.jp",
+"higashimatsushima.miyagi.jp",
+"ishinomaki.miyagi.jp",
+"iwanuma.miyagi.jp",
+"kakuda.miyagi.jp",
+"kami.miyagi.jp",
+"kawasaki.miyagi.jp",
+"marumori.miyagi.jp",
+"matsushima.miyagi.jp",
+"minamisanriku.miyagi.jp",
+"misato.miyagi.jp",
+"murata.miyagi.jp",
+"natori.miyagi.jp",
+"ogawara.miyagi.jp",
+"ohira.miyagi.jp",
+"onagawa.miyagi.jp",
+"osaki.miyagi.jp",
+"rifu.miyagi.jp",
+"semine.miyagi.jp",
+"shibata.miyagi.jp",
+"shichikashuku.miyagi.jp",
+"shikama.miyagi.jp",
+"shiogama.miyagi.jp",
+"shiroishi.miyagi.jp",
+"tagajo.miyagi.jp",
+"taiwa.miyagi.jp",
+"tome.miyagi.jp",
+"tomiya.miyagi.jp",
+"wakuya.miyagi.jp",
+"watari.miyagi.jp",
+"yamamoto.miyagi.jp",
+"zao.miyagi.jp",
+"aya.miyazaki.jp",
+"ebino.miyazaki.jp",
+"gokase.miyazaki.jp",
+"hyuga.miyazaki.jp",
+"kadogawa.miyazaki.jp",
+"kawaminami.miyazaki.jp",
+"kijo.miyazaki.jp",
+"kitagawa.miyazaki.jp",
+"kitakata.miyazaki.jp",
+"kitaura.miyazaki.jp",
+"kobayashi.miyazaki.jp",
+"kunitomi.miyazaki.jp",
+"kushima.miyazaki.jp",
+"mimata.miyazaki.jp",
+"miyakonojo.miyazaki.jp",
+"miyazaki.miyazaki.jp",
+"morotsuka.miyazaki.jp",
+"nichinan.miyazaki.jp",
+"nishimera.miyazaki.jp",
+"nobeoka.miyazaki.jp",
+"saito.miyazaki.jp",
+"shiiba.miyazaki.jp",
+"shintomi.miyazaki.jp",
+"takaharu.miyazaki.jp",
+"takanabe.miyazaki.jp",
+"takazaki.miyazaki.jp",
+"tsuno.miyazaki.jp",
+"achi.nagano.jp",
+"agematsu.nagano.jp",
+"anan.nagano.jp",
+"aoki.nagano.jp",
+"asahi.nagano.jp",
+"azumino.nagano.jp",
+"chikuhoku.nagano.jp",
+"chikuma.nagano.jp",
+"chino.nagano.jp",
+"fujimi.nagano.jp",
+"hakuba.nagano.jp",
+"hara.nagano.jp",
+"hiraya.nagano.jp",
+"iida.nagano.jp",
+"iijima.nagano.jp",
+"iiyama.nagano.jp",
+"iizuna.nagano.jp",
+"ikeda.nagano.jp",
+"ikusaka.nagano.jp",
+"ina.nagano.jp",
+"karuizawa.nagano.jp",
+"kawakami.nagano.jp",
+"kiso.nagano.jp",
+"kisofukushima.nagano.jp",
+"kitaaiki.nagano.jp",
+"komagane.nagano.jp",
+"komoro.nagano.jp",
+"matsukawa.nagano.jp",
+"matsumoto.nagano.jp",
+"miasa.nagano.jp",
+"minamiaiki.nagano.jp",
+"minamimaki.nagano.jp",
+"minamiminowa.nagano.jp",
+"minowa.nagano.jp",
+"miyada.nagano.jp",
+"miyota.nagano.jp",
+"mochizuki.nagano.jp",
+"nagano.nagano.jp",
+"nagawa.nagano.jp",
+"nagiso.nagano.jp",
+"nakagawa.nagano.jp",
+"nakano.nagano.jp",
+"nozawaonsen.nagano.jp",
+"obuse.nagano.jp",
+"ogawa.nagano.jp",
+"okaya.nagano.jp",
+"omachi.nagano.jp",
+"omi.nagano.jp",
+"ookuwa.nagano.jp",
+"ooshika.nagano.jp",
+"otaki.nagano.jp",
+"otari.nagano.jp",
+"sakae.nagano.jp",
+"sakaki.nagano.jp",
+"saku.nagano.jp",
+"sakuho.nagano.jp",
+"shimosuwa.nagano.jp",
+"shinanomachi.nagano.jp",
+"shiojiri.nagano.jp",
+"suwa.nagano.jp",
+"suzaka.nagano.jp",
+"takagi.nagano.jp",
+"takamori.nagano.jp",
+"takayama.nagano.jp",
+"tateshina.nagano.jp",
+"tatsuno.nagano.jp",
+"togakushi.nagano.jp",
+"togura.nagano.jp",
+"tomi.nagano.jp",
+"ueda.nagano.jp",
+"wada.nagano.jp",
+"yamagata.nagano.jp",
+"yamanouchi.nagano.jp",
+"yasaka.nagano.jp",
+"yasuoka.nagano.jp",
+"chijiwa.nagasaki.jp",
+"futsu.nagasaki.jp",
+"goto.nagasaki.jp",
+"hasami.nagasaki.jp",
+"hirado.nagasaki.jp",
+"iki.nagasaki.jp",
+"isahaya.nagasaki.jp",
+"kawatana.nagasaki.jp",
+"kuchinotsu.nagasaki.jp",
+"matsuura.nagasaki.jp",
+"nagasaki.nagasaki.jp",
+"obama.nagasaki.jp",
+"omura.nagasaki.jp",
+"oseto.nagasaki.jp",
+"saikai.nagasaki.jp",
+"sasebo.nagasaki.jp",
+"seihi.nagasaki.jp",
+"shimabara.nagasaki.jp",
+"shinkamigoto.nagasaki.jp",
+"togitsu.nagasaki.jp",
+"tsushima.nagasaki.jp",
+"unzen.nagasaki.jp",
+"ando.nara.jp",
+"gose.nara.jp",
+"heguri.nara.jp",
+"higashiyoshino.nara.jp",
+"ikaruga.nara.jp",
+"ikoma.nara.jp",
+"kamikitayama.nara.jp",
+"kanmaki.nara.jp",
+"kashiba.nara.jp",
+"kashihara.nara.jp",
+"katsuragi.nara.jp",
+"kawai.nara.jp",
+"kawakami.nara.jp",
+"kawanishi.nara.jp",
+"koryo.nara.jp",
+"kurotaki.nara.jp",
+"mitsue.nara.jp",
+"miyake.nara.jp",
+"nara.nara.jp",
+"nosegawa.nara.jp",
+"oji.nara.jp",
+"ouda.nara.jp",
+"oyodo.nara.jp",
+"sakurai.nara.jp",
+"sango.nara.jp",
+"shimoichi.nara.jp",
+"shimokitayama.nara.jp",
+"shinjo.nara.jp",
+"soni.nara.jp",
+"takatori.nara.jp",
+"tawaramoto.nara.jp",
+"tenkawa.nara.jp",
+"tenri.nara.jp",
+"uda.nara.jp",
+"yamatokoriyama.nara.jp",
+"yamatotakada.nara.jp",
+"yamazoe.nara.jp",
+"yoshino.nara.jp",
+"aga.niigata.jp",
+"agano.niigata.jp",
+"gosen.niigata.jp",
+"itoigawa.niigata.jp",
+"izumozaki.niigata.jp",
+"joetsu.niigata.jp",
+"kamo.niigata.jp",
+"kariwa.niigata.jp",
+"kashiwazaki.niigata.jp",
+"minamiuonuma.niigata.jp",
+"mitsuke.niigata.jp",
+"muika.niigata.jp",
+"murakami.niigata.jp",
+"myoko.niigata.jp",
+"nagaoka.niigata.jp",
+"niigata.niigata.jp",
+"ojiya.niigata.jp",
+"omi.niigata.jp",
+"sado.niigata.jp",
+"sanjo.niigata.jp",
+"seiro.niigata.jp",
+"seirou.niigata.jp",
+"sekikawa.niigata.jp",
+"shibata.niigata.jp",
+"tagami.niigata.jp",
+"tainai.niigata.jp",
+"tochio.niigata.jp",
+"tokamachi.niigata.jp",
+"tsubame.niigata.jp",
+"tsunan.niigata.jp",
+"uonuma.niigata.jp",
+"yahiko.niigata.jp",
+"yoita.niigata.jp",
+"yuzawa.niigata.jp",
+"beppu.oita.jp",
+"bungoono.oita.jp",
+"bungotakada.oita.jp",
+"hasama.oita.jp",
+"hiji.oita.jp",
+"himeshima.oita.jp",
+"hita.oita.jp",
+"kamitsue.oita.jp",
+"kokonoe.oita.jp",
+"kuju.oita.jp",
+"kunisaki.oita.jp",
+"kusu.oita.jp",
+"oita.oita.jp",
+"saiki.oita.jp",
+"taketa.oita.jp",
+"tsukumi.oita.jp",
+"usa.oita.jp",
+"usuki.oita.jp",
+"yufu.oita.jp",
+"akaiwa.okayama.jp",
+"asakuchi.okayama.jp",
+"bizen.okayama.jp",
+"hayashima.okayama.jp",
+"ibara.okayama.jp",
+"kagamino.okayama.jp",
+"kasaoka.okayama.jp",
+"kibichuo.okayama.jp",
+"kumenan.okayama.jp",
+"kurashiki.okayama.jp",
+"maniwa.okayama.jp",
+"misaki.okayama.jp",
+"nagi.okayama.jp",
+"niimi.okayama.jp",
+"nishiawakura.okayama.jp",
+"okayama.okayama.jp",
+"satosho.okayama.jp",
+"setouchi.okayama.jp",
+"shinjo.okayama.jp",
+"shoo.okayama.jp",
+"soja.okayama.jp",
+"takahashi.okayama.jp",
+"tamano.okayama.jp",
+"tsuyama.okayama.jp",
+"wake.okayama.jp",
+"yakage.okayama.jp",
+"aguni.okinawa.jp",
+"ginowan.okinawa.jp",
+"ginoza.okinawa.jp",
+"gushikami.okinawa.jp",
+"haebaru.okinawa.jp",
+"higashi.okinawa.jp",
+"hirara.okinawa.jp",
+"iheya.okinawa.jp",
+"ishigaki.okinawa.jp",
+"ishikawa.okinawa.jp",
+"itoman.okinawa.jp",
+"izena.okinawa.jp",
+"kadena.okinawa.jp",
+"kin.okinawa.jp",
+"kitadaito.okinawa.jp",
+"kitanakagusuku.okinawa.jp",
+"kumejima.okinawa.jp",
+"kunigami.okinawa.jp",
+"minamidaito.okinawa.jp",
+"motobu.okinawa.jp",
+"nago.okinawa.jp",
+"naha.okinawa.jp",
+"nakagusuku.okinawa.jp",
+"nakijin.okinawa.jp",
+"nanjo.okinawa.jp",
+"nishihara.okinawa.jp",
+"ogimi.okinawa.jp",
+"okinawa.okinawa.jp",
+"onna.okinawa.jp",
+"shimoji.okinawa.jp",
+"taketomi.okinawa.jp",
+"tarama.okinawa.jp",
+"tokashiki.okinawa.jp",
+"tomigusuku.okinawa.jp",
+"tonaki.okinawa.jp",
+"urasoe.okinawa.jp",
+"uruma.okinawa.jp",
+"yaese.okinawa.jp",
+"yomitan.okinawa.jp",
+"yonabaru.okinawa.jp",
+"yonaguni.okinawa.jp",
+"zamami.okinawa.jp",
+"abeno.osaka.jp",
+"chihayaakasaka.osaka.jp",
+"chuo.osaka.jp",
+"daito.osaka.jp",
+"fujiidera.osaka.jp",
+"habikino.osaka.jp",
+"hannan.osaka.jp",
+"higashiosaka.osaka.jp",
+"higashisumiyoshi.osaka.jp",
+"higashiyodogawa.osaka.jp",
+"hirakata.osaka.jp",
+"ibaraki.osaka.jp",
+"ikeda.osaka.jp",
+"izumi.osaka.jp",
+"izumiotsu.osaka.jp",
+"izumisano.osaka.jp",
+"kadoma.osaka.jp",
+"kaizuka.osaka.jp",
+"kanan.osaka.jp",
+"kashiwara.osaka.jp",
+"katano.osaka.jp",
+"kawachinagano.osaka.jp",
+"kishiwada.osaka.jp",
+"kita.osaka.jp",
+"kumatori.osaka.jp",
+"matsubara.osaka.jp",
+"minato.osaka.jp",
+"minoh.osaka.jp",
+"misaki.osaka.jp",
+"moriguchi.osaka.jp",
+"neyagawa.osaka.jp",
+"nishi.osaka.jp",
+"nose.osaka.jp",
+"osakasayama.osaka.jp",
+"sakai.osaka.jp",
+"sayama.osaka.jp",
+"sennan.osaka.jp",
+"settsu.osaka.jp",
+"shijonawate.osaka.jp",
+"shimamoto.osaka.jp",
+"suita.osaka.jp",
+"tadaoka.osaka.jp",
+"taishi.osaka.jp",
+"tajiri.osaka.jp",
+"takaishi.osaka.jp",
+"takatsuki.osaka.jp",
+"tondabayashi.osaka.jp",
+"toyonaka.osaka.jp",
+"toyono.osaka.jp",
+"yao.osaka.jp",
+"ariake.saga.jp",
+"arita.saga.jp",
+"fukudomi.saga.jp",
+"genkai.saga.jp",
+"hamatama.saga.jp",
+"hizen.saga.jp",
+"imari.saga.jp",
+"kamimine.saga.jp",
+"kanzaki.saga.jp",
+"karatsu.saga.jp",
+"kashima.saga.jp",
+"kitagata.saga.jp",
+"kitahata.saga.jp",
+"kiyama.saga.jp",
+"kouhoku.saga.jp",
+"kyuragi.saga.jp",
+"nishiarita.saga.jp",
+"ogi.saga.jp",
+"omachi.saga.jp",
+"ouchi.saga.jp",
+"saga.saga.jp",
+"shiroishi.saga.jp",
+"taku.saga.jp",
+"tara.saga.jp",
+"tosu.saga.jp",
+"yoshinogari.saga.jp",
+"arakawa.saitama.jp",
+"asaka.saitama.jp",
+"chichibu.saitama.jp",
+"fujimi.saitama.jp",
+"fujimino.saitama.jp",
+"fukaya.saitama.jp",
+"hanno.saitama.jp",
+"hanyu.saitama.jp",
+"hasuda.saitama.jp",
+"hatogaya.saitama.jp",
+"hatoyama.saitama.jp",
+"hidaka.saitama.jp",
+"higashichichibu.saitama.jp",
+"higashimatsuyama.saitama.jp",
+"honjo.saitama.jp",
+"ina.saitama.jp",
+"iruma.saitama.jp",
+"iwatsuki.saitama.jp",
+"kamiizumi.saitama.jp",
+"kamikawa.saitama.jp",
+"kamisato.saitama.jp",
+"kasukabe.saitama.jp",
+"kawagoe.saitama.jp",
+"kawaguchi.saitama.jp",
+"kawajima.saitama.jp",
+"kazo.saitama.jp",
+"kitamoto.saitama.jp",
+"koshigaya.saitama.jp",
+"kounosu.saitama.jp",
+"kuki.saitama.jp",
+"kumagaya.saitama.jp",
+"matsubushi.saitama.jp",
+"minano.saitama.jp",
+"misato.saitama.jp",
+"miyashiro.saitama.jp",
+"miyoshi.saitama.jp",
+"moroyama.saitama.jp",
+"nagatoro.saitama.jp",
+"namegawa.saitama.jp",
+"niiza.saitama.jp",
+"ogano.saitama.jp",
+"ogawa.saitama.jp",
+"ogose.saitama.jp",
+"okegawa.saitama.jp",
+"omiya.saitama.jp",
+"otaki.saitama.jp",
+"ranzan.saitama.jp",
+"ryokami.saitama.jp",
+"saitama.saitama.jp",
+"sakado.saitama.jp",
+"satte.saitama.jp",
+"sayama.saitama.jp",
+"shiki.saitama.jp",
+"shiraoka.saitama.jp",
+"soka.saitama.jp",
+"sugito.saitama.jp",
+"toda.saitama.jp",
+"tokigawa.saitama.jp",
+"tokorozawa.saitama.jp",
+"tsurugashima.saitama.jp",
+"urawa.saitama.jp",
+"warabi.saitama.jp",
+"yashio.saitama.jp",
+"yokoze.saitama.jp",
+"yono.saitama.jp",
+"yorii.saitama.jp",
+"yoshida.saitama.jp",
+"yoshikawa.saitama.jp",
+"yoshimi.saitama.jp",
+"aisho.shiga.jp",
+"gamo.shiga.jp",
+"higashiomi.shiga.jp",
+"hikone.shiga.jp",
+"koka.shiga.jp",
+"konan.shiga.jp",
+"kosei.shiga.jp",
+"koto.shiga.jp",
+"kusatsu.shiga.jp",
+"maibara.shiga.jp",
+"moriyama.shiga.jp",
+"nagahama.shiga.jp",
+"nishiazai.shiga.jp",
+"notogawa.shiga.jp",
+"omihachiman.shiga.jp",
+"otsu.shiga.jp",
+"ritto.shiga.jp",
+"ryuoh.shiga.jp",
+"takashima.shiga.jp",
+"takatsuki.shiga.jp",
+"torahime.shiga.jp",
+"toyosato.shiga.jp",
+"yasu.shiga.jp",
+"akagi.shimane.jp",
+"ama.shimane.jp",
+"gotsu.shimane.jp",
+"hamada.shimane.jp",
+"higashiizumo.shimane.jp",
+"hikawa.shimane.jp",
+"hikimi.shimane.jp",
+"izumo.shimane.jp",
+"kakinoki.shimane.jp",
+"masuda.shimane.jp",
+"matsue.shimane.jp",
+"misato.shimane.jp",
+"nishinoshima.shimane.jp",
+"ohda.shimane.jp",
+"okinoshima.shimane.jp",
+"okuizumo.shimane.jp",
+"shimane.shimane.jp",
+"tamayu.shimane.jp",
+"tsuwano.shimane.jp",
+"unnan.shimane.jp",
+"yakumo.shimane.jp",
+"yasugi.shimane.jp",
+"yatsuka.shimane.jp",
+"arai.shizuoka.jp",
+"atami.shizuoka.jp",
+"fuji.shizuoka.jp",
+"fujieda.shizuoka.jp",
+"fujikawa.shizuoka.jp",
+"fujinomiya.shizuoka.jp",
+"fukuroi.shizuoka.jp",
+"gotemba.shizuoka.jp",
+"haibara.shizuoka.jp",
+"hamamatsu.shizuoka.jp",
+"higashiizu.shizuoka.jp",
+"ito.shizuoka.jp",
+"iwata.shizuoka.jp",
+"izu.shizuoka.jp",
+"izunokuni.shizuoka.jp",
+"kakegawa.shizuoka.jp",
+"kannami.shizuoka.jp",
+"kawanehon.shizuoka.jp",
+"kawazu.shizuoka.jp",
+"kikugawa.shizuoka.jp",
+"kosai.shizuoka.jp",
+"makinohara.shizuoka.jp",
+"matsuzaki.shizuoka.jp",
+"minamiizu.shizuoka.jp",
+"mishima.shizuoka.jp",
+"morimachi.shizuoka.jp",
+"nishiizu.shizuoka.jp",
+"numazu.shizuoka.jp",
+"omaezaki.shizuoka.jp",
+"shimada.shizuoka.jp",
+"shimizu.shizuoka.jp",
+"shimoda.shizuoka.jp",
+"shizuoka.shizuoka.jp",
+"susono.shizuoka.jp",
+"yaizu.shizuoka.jp",
+"yoshida.shizuoka.jp",
+"ashikaga.tochigi.jp",
+"bato.tochigi.jp",
+"haga.tochigi.jp",
+"ichikai.tochigi.jp",
+"iwafune.tochigi.jp",
+"kaminokawa.tochigi.jp",
+"kanuma.tochigi.jp",
+"karasuyama.tochigi.jp",
+"kuroiso.tochigi.jp",
+"mashiko.tochigi.jp",
+"mibu.tochigi.jp",
+"moka.tochigi.jp",
+"motegi.tochigi.jp",
+"nasu.tochigi.jp",
+"nasushiobara.tochigi.jp",
+"nikko.tochigi.jp",
+"nishikata.tochigi.jp",
+"nogi.tochigi.jp",
+"ohira.tochigi.jp",
+"ohtawara.tochigi.jp",
+"oyama.tochigi.jp",
+"sakura.tochigi.jp",
+"sano.tochigi.jp",
+"shimotsuke.tochigi.jp",
+"shioya.tochigi.jp",
+"takanezawa.tochigi.jp",
+"tochigi.tochigi.jp",
+"tsuga.tochigi.jp",
+"ujiie.tochigi.jp",
+"utsunomiya.tochigi.jp",
+"yaita.tochigi.jp",
+"aizumi.tokushima.jp",
+"anan.tokushima.jp",
+"ichiba.tokushima.jp",
+"itano.tokushima.jp",
+"kainan.tokushima.jp",
+"komatsushima.tokushima.jp",
+"matsushige.tokushima.jp",
+"mima.tokushima.jp",
+"minami.tokushima.jp",
+"miyoshi.tokushima.jp",
+"mugi.tokushima.jp",
+"nakagawa.tokushima.jp",
+"naruto.tokushima.jp",
+"sanagochi.tokushima.jp",
+"shishikui.tokushima.jp",
+"tokushima.tokushima.jp",
+"wajiki.tokushima.jp",
+"adachi.tokyo.jp",
+"akiruno.tokyo.jp",
+"akishima.tokyo.jp",
+"aogashima.tokyo.jp",
+"arakawa.tokyo.jp",
+"bunkyo.tokyo.jp",
+"chiyoda.tokyo.jp",
+"chofu.tokyo.jp",
+"chuo.tokyo.jp",
+"edogawa.tokyo.jp",
+"fuchu.tokyo.jp",
+"fussa.tokyo.jp",
+"hachijo.tokyo.jp",
+"hachioji.tokyo.jp",
+"hamura.tokyo.jp",
+"higashikurume.tokyo.jp",
+"higashimurayama.tokyo.jp",
+"higashiyamato.tokyo.jp",
+"hino.tokyo.jp",
+"hinode.tokyo.jp",
+"hinohara.tokyo.jp",
+"inagi.tokyo.jp",
+"itabashi.tokyo.jp",
+"katsushika.tokyo.jp",
+"kita.tokyo.jp",
+"kiyose.tokyo.jp",
+"kodaira.tokyo.jp",
+"koganei.tokyo.jp",
+"kokubunji.tokyo.jp",
+"komae.tokyo.jp",
+"koto.tokyo.jp",
+"kouzushima.tokyo.jp",
+"kunitachi.tokyo.jp",
+"machida.tokyo.jp",
+"meguro.tokyo.jp",
+"minato.tokyo.jp",
+"mitaka.tokyo.jp",
+"mizuho.tokyo.jp",
+"musashimurayama.tokyo.jp",
+"musashino.tokyo.jp",
+"nakano.tokyo.jp",
+"nerima.tokyo.jp",
+"ogasawara.tokyo.jp",
+"okutama.tokyo.jp",
+"ome.tokyo.jp",
+"oshima.tokyo.jp",
+"ota.tokyo.jp",
+"setagaya.tokyo.jp",
+"shibuya.tokyo.jp",
+"shinagawa.tokyo.jp",
+"shinjuku.tokyo.jp",
+"suginami.tokyo.jp",
+"sumida.tokyo.jp",
+"tachikawa.tokyo.jp",
+"taito.tokyo.jp",
+"tama.tokyo.jp",
+"toshima.tokyo.jp",
+"chizu.tottori.jp",
+"hino.tottori.jp",
+"kawahara.tottori.jp",
+"koge.tottori.jp",
+"kotoura.tottori.jp",
+"misasa.tottori.jp",
+"nanbu.tottori.jp",
+"nichinan.tottori.jp",
+"sakaiminato.tottori.jp",
+"tottori.tottori.jp",
+"wakasa.tottori.jp",
+"yazu.tottori.jp",
+"yonago.tottori.jp",
+"asahi.toyama.jp",
+"fuchu.toyama.jp",
+"fukumitsu.toyama.jp",
+"funahashi.toyama.jp",
+"himi.toyama.jp",
+"imizu.toyama.jp",
+"inami.toyama.jp",
+"johana.toyama.jp",
+"kamiichi.toyama.jp",
+"kurobe.toyama.jp",
+"nakaniikawa.toyama.jp",
+"namerikawa.toyama.jp",
+"nanto.toyama.jp",
+"nyuzen.toyama.jp",
+"oyabe.toyama.jp",
+"taira.toyama.jp",
+"takaoka.toyama.jp",
+"tateyama.toyama.jp",
+"toga.toyama.jp",
+"tonami.toyama.jp",
+"toyama.toyama.jp",
+"unazuki.toyama.jp",
+"uozu.toyama.jp",
+"yamada.toyama.jp",
+"arida.wakayama.jp",
+"aridagawa.wakayama.jp",
+"gobo.wakayama.jp",
+"hashimoto.wakayama.jp",
+"hidaka.wakayama.jp",
+"hirogawa.wakayama.jp",
+"inami.wakayama.jp",
+"iwade.wakayama.jp",
+"kainan.wakayama.jp",
+"kamitonda.wakayama.jp",
+"katsuragi.wakayama.jp",
+"kimino.wakayama.jp",
+"kinokawa.wakayama.jp",
+"kitayama.wakayama.jp",
+"koya.wakayama.jp",
+"koza.wakayama.jp",
+"kozagawa.wakayama.jp",
+"kudoyama.wakayama.jp",
+"kushimoto.wakayama.jp",
+"mihama.wakayama.jp",
+"misato.wakayama.jp",
+"nachikatsuura.wakayama.jp",
+"shingu.wakayama.jp",
+"shirahama.wakayama.jp",
+"taiji.wakayama.jp",
+"tanabe.wakayama.jp",
+"wakayama.wakayama.jp",
+"yuasa.wakayama.jp",
+"yura.wakayama.jp",
+"asahi.yamagata.jp",
+"funagata.yamagata.jp",
+"higashine.yamagata.jp",
+"iide.yamagata.jp",
+"kahoku.yamagata.jp",
+"kaminoyama.yamagata.jp",
+"kaneyama.yamagata.jp",
+"kawanishi.yamagata.jp",
+"mamurogawa.yamagata.jp",
+"mikawa.yamagata.jp",
+"murayama.yamagata.jp",
+"nagai.yamagata.jp",
+"nakayama.yamagata.jp",
+"nanyo.yamagata.jp",
+"nishikawa.yamagata.jp",
+"obanazawa.yamagata.jp",
+"oe.yamagata.jp",
+"oguni.yamagata.jp",
+"ohkura.yamagata.jp",
+"oishida.yamagata.jp",
+"sagae.yamagata.jp",
+"sakata.yamagata.jp",
+"sakegawa.yamagata.jp",
+"shinjo.yamagata.jp",
+"shirataka.yamagata.jp",
+"shonai.yamagata.jp",
+"takahata.yamagata.jp",
+"tendo.yamagata.jp",
+"tozawa.yamagata.jp",
+"tsuruoka.yamagata.jp",
+"yamagata.yamagata.jp",
+"yamanobe.yamagata.jp",
+"yonezawa.yamagata.jp",
+"yuza.yamagata.jp",
+"abu.yamaguchi.jp",
+"hagi.yamaguchi.jp",
+"hikari.yamaguchi.jp",
+"hofu.yamaguchi.jp",
+"iwakuni.yamaguchi.jp",
+"kudamatsu.yamaguchi.jp",
+"mitou.yamaguchi.jp",
+"nagato.yamaguchi.jp",
+"oshima.yamaguchi.jp",
+"shimonoseki.yamaguchi.jp",
+"shunan.yamaguchi.jp",
+"tabuse.yamaguchi.jp",
+"tokuyama.yamaguchi.jp",
+"toyota.yamaguchi.jp",
+"ube.yamaguchi.jp",
+"yuu.yamaguchi.jp",
+"chuo.yamanashi.jp",
+"doshi.yamanashi.jp",
+"fuefuki.yamanashi.jp",
+"fujikawa.yamanashi.jp",
+"fujikawaguchiko.yamanashi.jp",
+"fujiyoshida.yamanashi.jp",
+"hayakawa.yamanashi.jp",
+"hokuto.yamanashi.jp",
+"ichikawamisato.yamanashi.jp",
+"kai.yamanashi.jp",
+"kofu.yamanashi.jp",
+"koshu.yamanashi.jp",
+"kosuge.yamanashi.jp",
+"minami-alps.yamanashi.jp",
+"minobu.yamanashi.jp",
+"nakamichi.yamanashi.jp",
+"nanbu.yamanashi.jp",
+"narusawa.yamanashi.jp",
+"nirasaki.yamanashi.jp",
+"nishikatsura.yamanashi.jp",
+"oshino.yamanashi.jp",
+"otsuki.yamanashi.jp",
+"showa.yamanashi.jp",
+"tabayama.yamanashi.jp",
+"tsuru.yamanashi.jp",
+"uenohara.yamanashi.jp",
+"yamanakako.yamanashi.jp",
+"yamanashi.yamanashi.jp",
+"ke",
+"ac.ke",
+"co.ke",
+"go.ke",
+"info.ke",
+"me.ke",
+"mobi.ke",
+"ne.ke",
+"or.ke",
+"sc.ke",
+"kg",
+"org.kg",
+"net.kg",
+"com.kg",
+"edu.kg",
+"gov.kg",
+"mil.kg",
+"*.kh",
+"ki",
+"edu.ki",
+"biz.ki",
+"net.ki",
+"org.ki",
+"gov.ki",
+"info.ki",
+"com.ki",
+"km",
+"org.km",
+"nom.km",
+"gov.km",
+"prd.km",
+"tm.km",
+"edu.km",
+"mil.km",
+"ass.km",
+"com.km",
+"coop.km",
+"asso.km",
+"presse.km",
+"medecin.km",
+"notaires.km",
+"pharmaciens.km",
+"veterinaire.km",
+"gouv.km",
+"kn",
+"net.kn",
+"org.kn",
+"edu.kn",
+"gov.kn",
+"kp",
+"com.kp",
+"edu.kp",
+"gov.kp",
+"org.kp",
+"rep.kp",
+"tra.kp",
+"kr",
+"ac.kr",
+"co.kr",
+"es.kr",
+"go.kr",
+"hs.kr",
+"kg.kr",
+"mil.kr",
+"ms.kr",
+"ne.kr",
+"or.kr",
+"pe.kr",
+"re.kr",
+"sc.kr",
+"busan.kr",
+"chungbuk.kr",
+"chungnam.kr",
+"daegu.kr",
+"daejeon.kr",
+"gangwon.kr",
+"gwangju.kr",
+"gyeongbuk.kr",
+"gyeonggi.kr",
+"gyeongnam.kr",
+"incheon.kr",
+"jeju.kr",
+"jeonbuk.kr",
+"jeonnam.kr",
+"seoul.kr",
+"ulsan.kr",
+"kw",
+"com.kw",
+"edu.kw",
+"emb.kw",
+"gov.kw",
+"ind.kw",
+"net.kw",
+"org.kw",
+"ky",
+"edu.ky",
+"gov.ky",
+"com.ky",
+"org.ky",
+"net.ky",
+"kz",
+"org.kz",
+"edu.kz",
+"net.kz",
+"gov.kz",
+"mil.kz",
+"com.kz",
+"la",
+"int.la",
+"net.la",
+"info.la",
+"edu.la",
+"gov.la",
+"per.la",
+"com.la",
+"org.la",
+"lb",
+"com.lb",
+"edu.lb",
+"gov.lb",
+"net.lb",
+"org.lb",
+"lc",
+"com.lc",
+"net.lc",
+"co.lc",
+"org.lc",
+"edu.lc",
+"gov.lc",
+"li",
+"lk",
+"gov.lk",
+"sch.lk",
+"net.lk",
+"int.lk",
+"com.lk",
+"org.lk",
+"edu.lk",
+"ngo.lk",
+"soc.lk",
+"web.lk",
+"ltd.lk",
+"assn.lk",
+"grp.lk",
+"hotel.lk",
+"ac.lk",
+"lr",
+"com.lr",
+"edu.lr",
+"gov.lr",
+"org.lr",
+"net.lr",
+"ls",
+"ac.ls",
+"biz.ls",
+"co.ls",
+"edu.ls",
+"gov.ls",
+"info.ls",
+"net.ls",
+"org.ls",
+"sc.ls",
+"lt",
+"gov.lt",
+"lu",
+"lv",
+"com.lv",
+"edu.lv",
+"gov.lv",
+"org.lv",
+"mil.lv",
+"id.lv",
+"net.lv",
+"asn.lv",
+"conf.lv",
+"ly",
+"com.ly",
+"net.ly",
+"gov.ly",
+"plc.ly",
+"edu.ly",
+"sch.ly",
+"med.ly",
+"org.ly",
+"id.ly",
+"ma",
+"co.ma",
+"net.ma",
+"gov.ma",
+"org.ma",
+"ac.ma",
+"press.ma",
+"mc",
+"tm.mc",
+"asso.mc",
+"md",
+"me",
+"co.me",
+"net.me",
+"org.me",
+"edu.me",
+"ac.me",
+"gov.me",
+"its.me",
+"priv.me",
+"mg",
+"org.mg",
+"nom.mg",
+"gov.mg",
+"prd.mg",
+"tm.mg",
+"edu.mg",
+"mil.mg",
+"com.mg",
+"co.mg",
+"mh",
+"mil",
+"mk",
+"com.mk",
+"org.mk",
+"net.mk",
+"edu.mk",
+"gov.mk",
+"inf.mk",
+"name.mk",
+"ml",
+"com.ml",
+"edu.ml",
+"gouv.ml",
+"gov.ml",
+"net.ml",
+"org.ml",
+"presse.ml",
+"*.mm",
+"mn",
+"gov.mn",
+"edu.mn",
+"org.mn",
+"mo",
+"com.mo",
+"net.mo",
+"org.mo",
+"edu.mo",
+"gov.mo",
+"mobi",
+"mp",
+"mq",
+"mr",
+"gov.mr",
+"ms",
+"com.ms",
+"edu.ms",
+"gov.ms",
+"net.ms",
+"org.ms",
+"mt",
+"com.mt",
+"edu.mt",
+"net.mt",
+"org.mt",
+"mu",
+"com.mu",
+"net.mu",
+"org.mu",
+"gov.mu",
+"ac.mu",
+"co.mu",
+"or.mu",
+"museum",
+"academy.museum",
+"agriculture.museum",
+"air.museum",
+"airguard.museum",
+"alabama.museum",
+"alaska.museum",
+"amber.museum",
+"ambulance.museum",
+"american.museum",
+"americana.museum",
+"americanantiques.museum",
+"americanart.museum",
+"amsterdam.museum",
+"and.museum",
+"annefrank.museum",
+"anthro.museum",
+"anthropology.museum",
+"antiques.museum",
+"aquarium.museum",
+"arboretum.museum",
+"archaeological.museum",
+"archaeology.museum",
+"architecture.museum",
+"art.museum",
+"artanddesign.museum",
+"artcenter.museum",
+"artdeco.museum",
+"arteducation.museum",
+"artgallery.museum",
+"arts.museum",
+"artsandcrafts.museum",
+"asmatart.museum",
+"assassination.museum",
+"assisi.museum",
+"association.museum",
+"astronomy.museum",
+"atlanta.museum",
+"austin.museum",
+"australia.museum",
+"automotive.museum",
+"aviation.museum",
+"axis.museum",
+"badajoz.museum",
+"baghdad.museum",
+"bahn.museum",
+"bale.museum",
+"baltimore.museum",
+"barcelona.museum",
+"baseball.museum",
+"basel.museum",
+"baths.museum",
+"bauern.museum",
+"beauxarts.museum",
+"beeldengeluid.museum",
+"bellevue.museum",
+"bergbau.museum",
+"berkeley.museum",
+"berlin.museum",
+"bern.museum",
+"bible.museum",
+"bilbao.museum",
+"bill.museum",
+"birdart.museum",
+"birthplace.museum",
+"bonn.museum",
+"boston.museum",
+"botanical.museum",
+"botanicalgarden.museum",
+"botanicgarden.museum",
+"botany.museum",
+"brandywinevalley.museum",
+"brasil.museum",
+"bristol.museum",
+"british.museum",
+"britishcolumbia.museum",
+"broadcast.museum",
+"brunel.museum",
+"brussel.museum",
+"brussels.museum",
+"bruxelles.museum",
+"building.museum",
+"burghof.museum",
+"bus.museum",
+"bushey.museum",
+"cadaques.museum",
+"california.museum",
+"cambridge.museum",
+"can.museum",
+"canada.museum",
+"capebreton.museum",
+"carrier.museum",
+"cartoonart.museum",
+"casadelamoneda.museum",
+"castle.museum",
+"castres.museum",
+"celtic.museum",
+"center.museum",
+"chattanooga.museum",
+"cheltenham.museum",
+"chesapeakebay.museum",
+"chicago.museum",
+"children.museum",
+"childrens.museum",
+"childrensgarden.museum",
+"chiropractic.museum",
+"chocolate.museum",
+"christiansburg.museum",
+"cincinnati.museum",
+"cinema.museum",
+"circus.museum",
+"civilisation.museum",
+"civilization.museum",
+"civilwar.museum",
+"clinton.museum",
+"clock.museum",
+"coal.museum",
+"coastaldefence.museum",
+"cody.museum",
+"coldwar.museum",
+"collection.museum",
+"colonialwilliamsburg.museum",
+"coloradoplateau.museum",
+"columbia.museum",
+"columbus.museum",
+"communication.museum",
+"communications.museum",
+"community.museum",
+"computer.museum",
+"computerhistory.museum",
+"comunicações.museum",
+"contemporary.museum",
+"contemporaryart.museum",
+"convent.museum",
+"copenhagen.museum",
+"corporation.museum",
+"correios-e-telecomunicações.museum",
+"corvette.museum",
+"costume.museum",
+"countryestate.museum",
+"county.museum",
+"crafts.museum",
+"cranbrook.museum",
+"creation.museum",
+"cultural.museum",
+"culturalcenter.museum",
+"culture.museum",
+"cyber.museum",
+"cymru.museum",
+"dali.museum",
+"dallas.museum",
+"database.museum",
+"ddr.museum",
+"decorativearts.museum",
+"delaware.museum",
+"delmenhorst.museum",
+"denmark.museum",
+"depot.museum",
+"design.museum",
+"detroit.museum",
+"dinosaur.museum",
+"discovery.museum",
+"dolls.museum",
+"donostia.museum",
+"durham.museum",
+"eastafrica.museum",
+"eastcoast.museum",
+"education.museum",
+"educational.museum",
+"egyptian.museum",
+"eisenbahn.museum",
+"elburg.museum",
+"elvendrell.museum",
+"embroidery.museum",
+"encyclopedic.museum",
+"england.museum",
+"entomology.museum",
+"environment.museum",
+"environmentalconservation.museum",
+"epilepsy.museum",
+"essex.museum",
+"estate.museum",
+"ethnology.museum",
+"exeter.museum",
+"exhibition.museum",
+"family.museum",
+"farm.museum",
+"farmequipment.museum",
+"farmers.museum",
+"farmstead.museum",
+"field.museum",
+"figueres.museum",
+"filatelia.museum",
+"film.museum",
+"fineart.museum",
+"finearts.museum",
+"finland.museum",
+"flanders.museum",
+"florida.museum",
+"force.museum",
+"fortmissoula.museum",
+"fortworth.museum",
+"foundation.museum",
+"francaise.museum",
+"frankfurt.museum",
+"franziskaner.museum",
+"freemasonry.museum",
+"freiburg.museum",
+"fribourg.museum",
+"frog.museum",
+"fundacio.museum",
+"furniture.museum",
+"gallery.museum",
+"garden.museum",
+"gateway.museum",
+"geelvinck.museum",
+"gemological.museum",
+"geology.museum",
+"georgia.museum",
+"giessen.museum",
+"glas.museum",
+"glass.museum",
+"gorge.museum",
+"grandrapids.museum",
+"graz.museum",
+"guernsey.museum",
+"halloffame.museum",
+"hamburg.museum",
+"handson.museum",
+"harvestcelebration.museum",
+"hawaii.museum",
+"health.museum",
+"heimatunduhren.museum",
+"hellas.museum",
+"helsinki.museum",
+"hembygdsforbund.museum",
+"heritage.museum",
+"histoire.museum",
+"historical.museum",
+"historicalsociety.museum",
+"historichouses.museum",
+"historisch.museum",
+"historisches.museum",
+"history.museum",
+"historyofscience.museum",
+"horology.museum",
+"house.museum",
+"humanities.museum",
+"illustration.museum",
+"imageandsound.museum",
+"indian.museum",
+"indiana.museum",
+"indianapolis.museum",
+"indianmarket.museum",
+"intelligence.museum",
+"interactive.museum",
+"iraq.museum",
+"iron.museum",
+"isleofman.museum",
+"jamison.museum",
+"jefferson.museum",
+"jerusalem.museum",
+"jewelry.museum",
+"jewish.museum",
+"jewishart.museum",
+"jfk.museum",
+"journalism.museum",
+"judaica.museum",
+"judygarland.museum",
+"juedisches.museum",
+"juif.museum",
+"karate.museum",
+"karikatur.museum",
+"kids.museum",
+"koebenhavn.museum",
+"koeln.museum",
+"kunst.museum",
+"kunstsammlung.museum",
+"kunstunddesign.museum",
+"labor.museum",
+"labour.museum",
+"lajolla.museum",
+"lancashire.museum",
+"landes.museum",
+"lans.museum",
+"läns.museum",
+"larsson.museum",
+"lewismiller.museum",
+"lincoln.museum",
+"linz.museum",
+"living.museum",
+"livinghistory.museum",
+"localhistory.museum",
+"london.museum",
+"losangeles.museum",
+"louvre.museum",
+"loyalist.museum",
+"lucerne.museum",
+"luxembourg.museum",
+"luzern.museum",
+"mad.museum",
+"madrid.museum",
+"mallorca.museum",
+"manchester.museum",
+"mansion.museum",
+"mansions.museum",
+"manx.museum",
+"marburg.museum",
+"maritime.museum",
+"maritimo.museum",
+"maryland.museum",
+"marylhurst.museum",
+"media.museum",
+"medical.museum",
+"medizinhistorisches.museum",
+"meeres.museum",
+"memorial.museum",
+"mesaverde.museum",
+"michigan.museum",
+"midatlantic.museum",
+"military.museum",
+"mill.museum",
+"miners.museum",
+"mining.museum",
+"minnesota.museum",
+"missile.museum",
+"missoula.museum",
+"modern.museum",
+"moma.museum",
+"money.museum",
+"monmouth.museum",
+"monticello.museum",
+"montreal.museum",
+"moscow.museum",
+"motorcycle.museum",
+"muenchen.museum",
+"muenster.museum",
+"mulhouse.museum",
+"muncie.museum",
+"museet.museum",
+"museumcenter.museum",
+"museumvereniging.museum",
+"music.museum",
+"national.museum",
+"nationalfirearms.museum",
+"nationalheritage.museum",
+"nativeamerican.museum",
+"naturalhistory.museum",
+"naturalhistorymuseum.museum",
+"naturalsciences.museum",
+"nature.museum",
+"naturhistorisches.museum",
+"natuurwetenschappen.museum",
+"naumburg.museum",
+"naval.museum",
+"nebraska.museum",
+"neues.museum",
+"newhampshire.museum",
+"newjersey.museum",
+"newmexico.museum",
+"newport.museum",
+"newspaper.museum",
+"newyork.museum",
+"niepce.museum",
+"norfolk.museum",
+"north.museum",
+"nrw.museum",
+"nyc.museum",
+"nyny.museum",
+"oceanographic.museum",
+"oceanographique.museum",
+"omaha.museum",
+"online.museum",
+"ontario.museum",
+"openair.museum",
+"oregon.museum",
+"oregontrail.museum",
+"otago.museum",
+"oxford.museum",
+"pacific.museum",
+"paderborn.museum",
+"palace.museum",
+"paleo.museum",
+"palmsprings.museum",
+"panama.museum",
+"paris.museum",
+"pasadena.museum",
+"pharmacy.museum",
+"philadelphia.museum",
+"philadelphiaarea.museum",
+"philately.museum",
+"phoenix.museum",
+"photography.museum",
+"pilots.museum",
+"pittsburgh.museum",
+"planetarium.museum",
+"plantation.museum",
+"plants.museum",
+"plaza.museum",
+"portal.museum",
+"portland.museum",
+"portlligat.museum",
+"posts-and-telecommunications.museum",
+"preservation.museum",
+"presidio.museum",
+"press.museum",
+"project.museum",
+"public.museum",
+"pubol.museum",
+"quebec.museum",
+"railroad.museum",
+"railway.museum",
+"research.museum",
+"resistance.museum",
+"riodejaneiro.museum",
+"rochester.museum",
+"rockart.museum",
+"roma.museum",
+"russia.museum",
+"saintlouis.museum",
+"salem.museum",
+"salvadordali.museum",
+"salzburg.museum",
+"sandiego.museum",
+"sanfrancisco.museum",
+"santabarbara.museum",
+"santacruz.museum",
+"santafe.museum",
+"saskatchewan.museum",
+"satx.museum",
+"savannahga.museum",
+"schlesisches.museum",
+"schoenbrunn.museum",
+"schokoladen.museum",
+"school.museum",
+"schweiz.museum",
+"science.museum",
+"scienceandhistory.museum",
+"scienceandindustry.museum",
+"sciencecenter.museum",
+"sciencecenters.museum",
+"science-fiction.museum",
+"sciencehistory.museum",
+"sciences.museum",
+"sciencesnaturelles.museum",
+"scotland.museum",
+"seaport.museum",
+"settlement.museum",
+"settlers.museum",
+"shell.museum",
+"sherbrooke.museum",
+"sibenik.museum",
+"silk.museum",
+"ski.museum",
+"skole.museum",
+"society.museum",
+"sologne.museum",
+"soundandvision.museum",
+"southcarolina.museum",
+"southwest.museum",
+"space.museum",
+"spy.museum",
+"square.museum",
+"stadt.museum",
+"stalbans.museum",
+"starnberg.museum",
+"state.museum",
+"stateofdelaware.museum",
+"station.museum",
+"steam.museum",
+"steiermark.museum",
+"stjohn.museum",
+"stockholm.museum",
+"stpetersburg.museum",
+"stuttgart.museum",
+"suisse.museum",
+"surgeonshall.museum",
+"surrey.museum",
+"svizzera.museum",
+"sweden.museum",
+"sydney.museum",
+"tank.museum",
+"tcm.museum",
+"technology.museum",
+"telekommunikation.museum",
+"television.museum",
+"texas.museum",
+"textile.museum",
+"theater.museum",
+"time.museum",
+"timekeeping.museum",
+"topology.museum",
+"torino.museum",
+"touch.museum",
+"town.museum",
+"transport.museum",
+"tree.museum",
+"trolley.museum",
+"trust.museum",
+"trustee.museum",
+"uhren.museum",
+"ulm.museum",
+"undersea.museum",
+"university.museum",
+"usa.museum",
+"usantiques.museum",
+"usarts.museum",
+"uscountryestate.museum",
+"usculture.museum",
+"usdecorativearts.museum",
+"usgarden.museum",
+"ushistory.museum",
+"ushuaia.museum",
+"uslivinghistory.museum",
+"utah.museum",
+"uvic.museum",
+"valley.museum",
+"vantaa.museum",
+"versailles.museum",
+"viking.museum",
+"village.museum",
+"virginia.museum",
+"virtual.museum",
+"virtuel.museum",
+"vlaanderen.museum",
+"volkenkunde.museum",
+"wales.museum",
+"wallonie.museum",
+"war.museum",
+"washingtondc.museum",
+"watchandclock.museum",
+"watch-and-clock.museum",
+"western.museum",
+"westfalen.museum",
+"whaling.museum",
+"wildlife.museum",
+"williamsburg.museum",
+"windmill.museum",
+"workshop.museum",
+"york.museum",
+"yorkshire.museum",
+"yosemite.museum",
+"youth.museum",
+"zoological.museum",
+"zoology.museum",
+"ירושלים.museum",
+"иком.museum",
+"mv",
+"aero.mv",
+"biz.mv",
+"com.mv",
+"coop.mv",
+"edu.mv",
+"gov.mv",
+"info.mv",
+"int.mv",
+"mil.mv",
+"museum.mv",
+"name.mv",
+"net.mv",
+"org.mv",
+"pro.mv",
+"mw",
+"ac.mw",
+"biz.mw",
+"co.mw",
+"com.mw",
+"coop.mw",
+"edu.mw",
+"gov.mw",
+"int.mw",
+"museum.mw",
+"net.mw",
+"org.mw",
+"mx",
+"com.mx",
+"org.mx",
+"gob.mx",
+"edu.mx",
+"net.mx",
+"my",
+"com.my",
+"net.my",
+"org.my",
+"gov.my",
+"edu.my",
+"mil.my",
+"name.my",
+"mz",
+"ac.mz",
+"adv.mz",
+"co.mz",
+"edu.mz",
+"gov.mz",
+"mil.mz",
+"net.mz",
+"org.mz",
+"na",
+"info.na",
+"pro.na",
+"name.na",
+"school.na",
+"or.na",
+"dr.na",
+"us.na",
+"mx.na",
+"ca.na",
+"in.na",
+"cc.na",
+"tv.na",
+"ws.na",
+"mobi.na",
+"co.na",
+"com.na",
+"org.na",
+"name",
+"nc",
+"asso.nc",
+"nom.nc",
+"ne",
+"net",
+"nf",
+"com.nf",
+"net.nf",
+"per.nf",
+"rec.nf",
+"web.nf",
+"arts.nf",
+"firm.nf",
+"info.nf",
+"other.nf",
+"store.nf",
+"ng",
+"com.ng",
+"edu.ng",
+"gov.ng",
+"i.ng",
+"mil.ng",
+"mobi.ng",
+"name.ng",
+"net.ng",
+"org.ng",
+"sch.ng",
+"ni",
+"ac.ni",
+"biz.ni",
+"co.ni",
+"com.ni",
+"edu.ni",
+"gob.ni",
+"in.ni",
+"info.ni",
+"int.ni",
+"mil.ni",
+"net.ni",
+"nom.ni",
+"org.ni",
+"web.ni",
+"nl",
+"no",
+"fhs.no",
+"vgs.no",
+"fylkesbibl.no",
+"folkebibl.no",
+"museum.no",
+"idrett.no",
+"priv.no",
+"mil.no",
+"stat.no",
+"dep.no",
+"kommune.no",
+"herad.no",
+"aa.no",
+"ah.no",
+"bu.no",
+"fm.no",
+"hl.no",
+"hm.no",
+"jan-mayen.no",
+"mr.no",
+"nl.no",
+"nt.no",
+"of.no",
+"ol.no",
+"oslo.no",
+"rl.no",
+"sf.no",
+"st.no",
+"svalbard.no",
+"tm.no",
+"tr.no",
+"va.no",
+"vf.no",
+"gs.aa.no",
+"gs.ah.no",
+"gs.bu.no",
+"gs.fm.no",
+"gs.hl.no",
+"gs.hm.no",
+"gs.jan-mayen.no",
+"gs.mr.no",
+"gs.nl.no",
+"gs.nt.no",
+"gs.of.no",
+"gs.ol.no",
+"gs.oslo.no",
+"gs.rl.no",
+"gs.sf.no",
+"gs.st.no",
+"gs.svalbard.no",
+"gs.tm.no",
+"gs.tr.no",
+"gs.va.no",
+"gs.vf.no",
+"akrehamn.no",
+"åkrehamn.no",
+"algard.no",
+"ålgård.no",
+"arna.no",
+"brumunddal.no",
+"bryne.no",
+"bronnoysund.no",
+"brønnøysund.no",
+"drobak.no",
+"drøbak.no",
+"egersund.no",
+"fetsund.no",
+"floro.no",
+"florø.no",
+"fredrikstad.no",
+"hokksund.no",
+"honefoss.no",
+"hønefoss.no",
+"jessheim.no",
+"jorpeland.no",
+"jørpeland.no",
+"kirkenes.no",
+"kopervik.no",
+"krokstadelva.no",
+"langevag.no",
+"langevåg.no",
+"leirvik.no",
+"mjondalen.no",
+"mjøndalen.no",
+"mo-i-rana.no",
+"mosjoen.no",
+"mosjøen.no",
+"nesoddtangen.no",
+"orkanger.no",
+"osoyro.no",
+"osøyro.no",
+"raholt.no",
+"råholt.no",
+"sandnessjoen.no",
+"sandnessjøen.no",
+"skedsmokorset.no",
+"slattum.no",
+"spjelkavik.no",
+"stathelle.no",
+"stavern.no",
+"stjordalshalsen.no",
+"stjørdalshalsen.no",
+"tananger.no",
+"tranby.no",
+"vossevangen.no",
+"afjord.no",
+"åfjord.no",
+"agdenes.no",
+"al.no",
+"ål.no",
+"alesund.no",
+"ålesund.no",
+"alstahaug.no",
+"alta.no",
+"áltá.no",
+"alaheadju.no",
+"álaheadju.no",
+"alvdal.no",
+"amli.no",
+"åmli.no",
+"amot.no",
+"åmot.no",
+"andebu.no",
+"andoy.no",
+"andøy.no",
+"andasuolo.no",
+"ardal.no",
+"årdal.no",
+"aremark.no",
+"arendal.no",
+"ås.no",
+"aseral.no",
+"åseral.no",
+"asker.no",
+"askim.no",
+"askvoll.no",
+"askoy.no",
+"askøy.no",
+"asnes.no",
+"åsnes.no",
+"audnedaln.no",
+"aukra.no",
+"aure.no",
+"aurland.no",
+"aurskog-holand.no",
+"aurskog-høland.no",
+"austevoll.no",
+"austrheim.no",
+"averoy.no",
+"averøy.no",
+"balestrand.no",
+"ballangen.no",
+"balat.no",
+"bálát.no",
+"balsfjord.no",
+"bahccavuotna.no",
+"báhccavuotna.no",
+"bamble.no",
+"bardu.no",
+"beardu.no",
+"beiarn.no",
+"bajddar.no",
+"bájddar.no",
+"baidar.no",
+"báidár.no",
+"berg.no",
+"bergen.no",
+"berlevag.no",
+"berlevåg.no",
+"bearalvahki.no",
+"bearalváhki.no",
+"bindal.no",
+"birkenes.no",
+"bjarkoy.no",
+"bjarkøy.no",
+"bjerkreim.no",
+"bjugn.no",
+"bodo.no",
+"bodø.no",
+"badaddja.no",
+"bådåddjå.no",
+"budejju.no",
+"bokn.no",
+"bremanger.no",
+"bronnoy.no",
+"brønnøy.no",
+"bygland.no",
+"bykle.no",
+"barum.no",
+"bærum.no",
+"bo.telemark.no",
+"bø.telemark.no",
+"bo.nordland.no",
+"bø.nordland.no",
+"bievat.no",
+"bievát.no",
+"bomlo.no",
+"bømlo.no",
+"batsfjord.no",
+"båtsfjord.no",
+"bahcavuotna.no",
+"báhcavuotna.no",
+"dovre.no",
+"drammen.no",
+"drangedal.no",
+"dyroy.no",
+"dyrøy.no",
+"donna.no",
+"dønna.no",
+"eid.no",
+"eidfjord.no",
+"eidsberg.no",
+"eidskog.no",
+"eidsvoll.no",
+"eigersund.no",
+"elverum.no",
+"enebakk.no",
+"engerdal.no",
+"etne.no",
+"etnedal.no",
+"evenes.no",
+"evenassi.no",
+"evenášši.no",
+"evje-og-hornnes.no",
+"farsund.no",
+"fauske.no",
+"fuossko.no",
+"fuoisku.no",
+"fedje.no",
+"fet.no",
+"finnoy.no",
+"finnøy.no",
+"fitjar.no",
+"fjaler.no",
+"fjell.no",
+"flakstad.no",
+"flatanger.no",
+"flekkefjord.no",
+"flesberg.no",
+"flora.no",
+"fla.no",
+"flå.no",
+"folldal.no",
+"forsand.no",
+"fosnes.no",
+"frei.no",
+"frogn.no",
+"froland.no",
+"frosta.no",
+"frana.no",
+"fræna.no",
+"froya.no",
+"frøya.no",
+"fusa.no",
+"fyresdal.no",
+"forde.no",
+"førde.no",
+"gamvik.no",
+"gangaviika.no",
+"gáŋgaviika.no",
+"gaular.no",
+"gausdal.no",
+"gildeskal.no",
+"gildeskål.no",
+"giske.no",
+"gjemnes.no",
+"gjerdrum.no",
+"gjerstad.no",
+"gjesdal.no",
+"gjovik.no",
+"gjøvik.no",
+"gloppen.no",
+"gol.no",
+"gran.no",
+"grane.no",
+"granvin.no",
+"gratangen.no",
+"grimstad.no",
+"grong.no",
+"kraanghke.no",
+"kråanghke.no",
+"grue.no",
+"gulen.no",
+"hadsel.no",
+"halden.no",
+"halsa.no",
+"hamar.no",
+"hamaroy.no",
+"habmer.no",
+"hábmer.no",
+"hapmir.no",
+"hápmir.no",
+"hammerfest.no",
+"hammarfeasta.no",
+"hámmárfeasta.no",
+"haram.no",
+"hareid.no",
+"harstad.no",
+"hasvik.no",
+"aknoluokta.no",
+"ákŋoluokta.no",
+"hattfjelldal.no",
+"aarborte.no",
+"haugesund.no",
+"hemne.no",
+"hemnes.no",
+"hemsedal.no",
+"heroy.more-og-romsdal.no",
+"herøy.møre-og-romsdal.no",
+"heroy.nordland.no",
+"herøy.nordland.no",
+"hitra.no",
+"hjartdal.no",
+"hjelmeland.no",
+"hobol.no",
+"hobøl.no",
+"hof.no",
+"hol.no",
+"hole.no",
+"holmestrand.no",
+"holtalen.no",
+"holtålen.no",
+"hornindal.no",
+"horten.no",
+"hurdal.no",
+"hurum.no",
+"hvaler.no",
+"hyllestad.no",
+"hagebostad.no",
+"hægebostad.no",
+"hoyanger.no",
+"høyanger.no",
+"hoylandet.no",
+"høylandet.no",
+"ha.no",
+"hå.no",
+"ibestad.no",
+"inderoy.no",
+"inderøy.no",
+"iveland.no",
+"jevnaker.no",
+"jondal.no",
+"jolster.no",
+"jølster.no",
+"karasjok.no",
+"karasjohka.no",
+"kárášjohka.no",
+"karlsoy.no",
+"galsa.no",
+"gálsá.no",
+"karmoy.no",
+"karmøy.no",
+"kautokeino.no",
+"guovdageaidnu.no",
+"klepp.no",
+"klabu.no",
+"klæbu.no",
+"kongsberg.no",
+"kongsvinger.no",
+"kragero.no",
+"kragerø.no",
+"kristiansand.no",
+"kristiansund.no",
+"krodsherad.no",
+"krødsherad.no",
+"kvalsund.no",
+"rahkkeravju.no",
+"ráhkkerávju.no",
+"kvam.no",
+"kvinesdal.no",
+"kvinnherad.no",
+"kviteseid.no",
+"kvitsoy.no",
+"kvitsøy.no",
+"kvafjord.no",
+"kvæfjord.no",
+"giehtavuoatna.no",
+"kvanangen.no",
+"kvænangen.no",
+"navuotna.no",
+"návuotna.no",
+"kafjord.no",
+"kåfjord.no",
+"gaivuotna.no",
+"gáivuotna.no",
+"larvik.no",
+"lavangen.no",
+"lavagis.no",
+"loabat.no",
+"loabát.no",
+"lebesby.no",
+"davvesiida.no",
+"leikanger.no",
+"leirfjord.no",
+"leka.no",
+"leksvik.no",
+"lenvik.no",
+"leangaviika.no",
+"leaŋgaviika.no",
+"lesja.no",
+"levanger.no",
+"lier.no",
+"lierne.no",
+"lillehammer.no",
+"lillesand.no",
+"lindesnes.no",
+"lindas.no",
+"lindås.no",
+"lom.no",
+"loppa.no",
+"lahppi.no",
+"láhppi.no",
+"lund.no",
+"lunner.no",
+"luroy.no",
+"lurøy.no",
+"luster.no",
+"lyngdal.no",
+"lyngen.no",
+"ivgu.no",
+"lardal.no",
+"lerdal.no",
+"lærdal.no",
+"lodingen.no",
+"lødingen.no",
+"lorenskog.no",
+"lørenskog.no",
+"loten.no",
+"løten.no",
+"malvik.no",
+"masoy.no",
+"måsøy.no",
+"muosat.no",
+"muosát.no",
+"mandal.no",
+"marker.no",
+"marnardal.no",
+"masfjorden.no",
+"meland.no",
+"meldal.no",
+"melhus.no",
+"meloy.no",
+"meløy.no",
+"meraker.no",
+"meråker.no",
+"moareke.no",
+"moåreke.no",
+"midsund.no",
+"midtre-gauldal.no",
+"modalen.no",
+"modum.no",
+"molde.no",
+"moskenes.no",
+"moss.no",
+"mosvik.no",
+"malselv.no",
+"målselv.no",
+"malatvuopmi.no",
+"málatvuopmi.no",
+"namdalseid.no",
+"aejrie.no",
+"namsos.no",
+"namsskogan.no",
+"naamesjevuemie.no",
+"nååmesjevuemie.no",
+"laakesvuemie.no",
+"nannestad.no",
+"narvik.no",
+"narviika.no",
+"naustdal.no",
+"nedre-eiker.no",
+"nes.akershus.no",
+"nes.buskerud.no",
+"nesna.no",
+"nesodden.no",
+"nesseby.no",
+"unjarga.no",
+"unjárga.no",
+"nesset.no",
+"nissedal.no",
+"nittedal.no",
+"nord-aurdal.no",
+"nord-fron.no",
+"nord-odal.no",
+"norddal.no",
+"nordkapp.no",
+"davvenjarga.no",
+"davvenjárga.no",
+"nordre-land.no",
+"nordreisa.no",
+"raisa.no",
+"ráisa.no",
+"nore-og-uvdal.no",
+"notodden.no",
+"naroy.no",
+"nærøy.no",
+"notteroy.no",
+"nøtterøy.no",
+"odda.no",
+"oksnes.no",
+"øksnes.no",
+"oppdal.no",
+"oppegard.no",
+"oppegård.no",
+"orkdal.no",
+"orland.no",
+"ørland.no",
+"orskog.no",
+"ørskog.no",
+"orsta.no",
+"ørsta.no",
+"os.hedmark.no",
+"os.hordaland.no",
+"osen.no",
+"osteroy.no",
+"osterøy.no",
+"ostre-toten.no",
+"østre-toten.no",
+"overhalla.no",
+"ovre-eiker.no",
+"øvre-eiker.no",
+"oyer.no",
+"øyer.no",
+"oygarden.no",
+"øygarden.no",
+"oystre-slidre.no",
+"øystre-slidre.no",
+"porsanger.no",
+"porsangu.no",
+"porsáŋgu.no",
+"porsgrunn.no",
+"radoy.no",
+"radøy.no",
+"rakkestad.no",
+"rana.no",
+"ruovat.no",
+"randaberg.no",
+"rauma.no",
+"rendalen.no",
+"rennebu.no",
+"rennesoy.no",
+"rennesøy.no",
+"rindal.no",
+"ringebu.no",
+"ringerike.no",
+"ringsaker.no",
+"rissa.no",
+"risor.no",
+"risør.no",
+"roan.no",
+"rollag.no",
+"rygge.no",
+"ralingen.no",
+"rælingen.no",
+"rodoy.no",
+"rødøy.no",
+"romskog.no",
+"rømskog.no",
+"roros.no",
+"røros.no",
+"rost.no",
+"røst.no",
+"royken.no",
+"røyken.no",
+"royrvik.no",
+"røyrvik.no",
+"rade.no",
+"råde.no",
+"salangen.no",
+"siellak.no",
+"saltdal.no",
+"salat.no",
+"sálát.no",
+"sálat.no",
+"samnanger.no",
+"sande.more-og-romsdal.no",
+"sande.møre-og-romsdal.no",
+"sande.vestfold.no",
+"sandefjord.no",
+"sandnes.no",
+"sandoy.no",
+"sandøy.no",
+"sarpsborg.no",
+"sauda.no",
+"sauherad.no",
+"sel.no",
+"selbu.no",
+"selje.no",
+"seljord.no",
+"sigdal.no",
+"siljan.no",
+"sirdal.no",
+"skaun.no",
+"skedsmo.no",
+"ski.no",
+"skien.no",
+"skiptvet.no",
+"skjervoy.no",
+"skjervøy.no",
+"skierva.no",
+"skiervá.no",
+"skjak.no",
+"skjåk.no",
+"skodje.no",
+"skanland.no",
+"skånland.no",
+"skanit.no",
+"skánit.no",
+"smola.no",
+"smøla.no",
+"snillfjord.no",
+"snasa.no",
+"snåsa.no",
+"snoasa.no",
+"snaase.no",
+"snåase.no",
+"sogndal.no",
+"sokndal.no",
+"sola.no",
+"solund.no",
+"songdalen.no",
+"sortland.no",
+"spydeberg.no",
+"stange.no",
+"stavanger.no",
+"steigen.no",
+"steinkjer.no",
+"stjordal.no",
+"stjørdal.no",
+"stokke.no",
+"stor-elvdal.no",
+"stord.no",
+"stordal.no",
+"storfjord.no",
+"omasvuotna.no",
+"strand.no",
+"stranda.no",
+"stryn.no",
+"sula.no",
+"suldal.no",
+"sund.no",
+"sunndal.no",
+"surnadal.no",
+"sveio.no",
+"svelvik.no",
+"sykkylven.no",
+"sogne.no",
+"søgne.no",
+"somna.no",
+"sømna.no",
+"sondre-land.no",
+"søndre-land.no",
+"sor-aurdal.no",
+"sør-aurdal.no",
+"sor-fron.no",
+"sør-fron.no",
+"sor-odal.no",
+"sør-odal.no",
+"sor-varanger.no",
+"sør-varanger.no",
+"matta-varjjat.no",
+"mátta-várjjat.no",
+"sorfold.no",
+"sørfold.no",
+"sorreisa.no",
+"sørreisa.no",
+"sorum.no",
+"sørum.no",
+"tana.no",
+"deatnu.no",
+"time.no",
+"tingvoll.no",
+"tinn.no",
+"tjeldsund.no",
+"dielddanuorri.no",
+"tjome.no",
+"tjøme.no",
+"tokke.no",
+"tolga.no",
+"torsken.no",
+"tranoy.no",
+"tranøy.no",
+"tromso.no",
+"tromsø.no",
+"tromsa.no",
+"romsa.no",
+"trondheim.no",
+"troandin.no",
+"trysil.no",
+"trana.no",
+"træna.no",
+"trogstad.no",
+"trøgstad.no",
+"tvedestrand.no",
+"tydal.no",
+"tynset.no",
+"tysfjord.no",
+"divtasvuodna.no",
+"divttasvuotna.no",
+"tysnes.no",
+"tysvar.no",
+"tysvær.no",
+"tonsberg.no",
+"tønsberg.no",
+"ullensaker.no",
+"ullensvang.no",
+"ulvik.no",
+"utsira.no",
+"vadso.no",
+"vadsø.no",
+"cahcesuolo.no",
+"čáhcesuolo.no",
+"vaksdal.no",
+"valle.no",
+"vang.no",
+"vanylven.no",
+"vardo.no",
+"vardø.no",
+"varggat.no",
+"várggát.no",
+"vefsn.no",
+"vaapste.no",
+"vega.no",
+"vegarshei.no",
+"vegårshei.no",
+"vennesla.no",
+"verdal.no",
+"verran.no",
+"vestby.no",
+"vestnes.no",
+"vestre-slidre.no",
+"vestre-toten.no",
+"vestvagoy.no",
+"vestvågøy.no",
+"vevelstad.no",
+"vik.no",
+"vikna.no",
+"vindafjord.no",
+"volda.no",
+"voss.no",
+"varoy.no",
+"værøy.no",
+"vagan.no",
+"vågan.no",
+"voagat.no",
+"vagsoy.no",
+"vågsøy.no",
+"vaga.no",
+"vågå.no",
+"valer.ostfold.no",
+"våler.østfold.no",
+"valer.hedmark.no",
+"våler.hedmark.no",
+"*.np",
+"nr",
+"biz.nr",
+"info.nr",
+"gov.nr",
+"edu.nr",
+"org.nr",
+"net.nr",
+"com.nr",
+"nu",
+"nz",
+"ac.nz",
+"co.nz",
+"cri.nz",
+"geek.nz",
+"gen.nz",
+"govt.nz",
+"health.nz",
+"iwi.nz",
+"kiwi.nz",
+"maori.nz",
+"mil.nz",
+"māori.nz",
+"net.nz",
+"org.nz",
+"parliament.nz",
+"school.nz",
+"om",
+"co.om",
+"com.om",
+"edu.om",
+"gov.om",
+"med.om",
+"museum.om",
+"net.om",
+"org.om",
+"pro.om",
+"onion",
+"org",
+"pa",
+"ac.pa",
+"gob.pa",
+"com.pa",
+"org.pa",
+"sld.pa",
+"edu.pa",
+"net.pa",
+"ing.pa",
+"abo.pa",
+"med.pa",
+"nom.pa",
+"pe",
+"edu.pe",
+"gob.pe",
+"nom.pe",
+"mil.pe",
+"org.pe",
+"com.pe",
+"net.pe",
+"pf",
+"com.pf",
+"org.pf",
+"edu.pf",
+"*.pg",
+"ph",
+"com.ph",
+"net.ph",
+"org.ph",
+"gov.ph",
+"edu.ph",
+"ngo.ph",
+"mil.ph",
+"i.ph",
+"pk",
+"com.pk",
+"net.pk",
+"edu.pk",
+"org.pk",
+"fam.pk",
+"biz.pk",
+"web.pk",
+"gov.pk",
+"gob.pk",
+"gok.pk",
+"gon.pk",
+"gop.pk",
+"gos.pk",
+"info.pk",
+"pl",
+"com.pl",
+"net.pl",
+"org.pl",
+"aid.pl",
+"agro.pl",
+"atm.pl",
+"auto.pl",
+"biz.pl",
+"edu.pl",
+"gmina.pl",
+"gsm.pl",
+"info.pl",
+"mail.pl",
+"miasta.pl",
+"media.pl",
+"mil.pl",
+"nieruchomosci.pl",
+"nom.pl",
+"pc.pl",
+"powiat.pl",
+"priv.pl",
+"realestate.pl",
+"rel.pl",
+"sex.pl",
+"shop.pl",
+"sklep.pl",
+"sos.pl",
+"szkola.pl",
+"targi.pl",
+"tm.pl",
+"tourism.pl",
+"travel.pl",
+"turystyka.pl",
+"gov.pl",
+"ap.gov.pl",
+"ic.gov.pl",
+"is.gov.pl",
+"us.gov.pl",
+"kmpsp.gov.pl",
+"kppsp.gov.pl",
+"kwpsp.gov.pl",
+"psp.gov.pl",
+"wskr.gov.pl",
+"kwp.gov.pl",
+"mw.gov.pl",
+"ug.gov.pl",
+"um.gov.pl",
+"umig.gov.pl",
+"ugim.gov.pl",
+"upow.gov.pl",
+"uw.gov.pl",
+"starostwo.gov.pl",
+"pa.gov.pl",
+"po.gov.pl",
+"psse.gov.pl",
+"pup.gov.pl",
+"rzgw.gov.pl",
+"sa.gov.pl",
+"so.gov.pl",
+"sr.gov.pl",
+"wsa.gov.pl",
+"sko.gov.pl",
+"uzs.gov.pl",
+"wiih.gov.pl",
+"winb.gov.pl",
+"pinb.gov.pl",
+"wios.gov.pl",
+"witd.gov.pl",
+"wzmiuw.gov.pl",
+"piw.gov.pl",
+"wiw.gov.pl",
+"griw.gov.pl",
+"wif.gov.pl",
+"oum.gov.pl",
+"sdn.gov.pl",
+"zp.gov.pl",
+"uppo.gov.pl",
+"mup.gov.pl",
+"wuoz.gov.pl",
+"konsulat.gov.pl",
+"oirm.gov.pl",
+"augustow.pl",
+"babia-gora.pl",
+"bedzin.pl",
+"beskidy.pl",
+"bialowieza.pl",
+"bialystok.pl",
+"bielawa.pl",
+"bieszczady.pl",
+"boleslawiec.pl",
+"bydgoszcz.pl",
+"bytom.pl",
+"cieszyn.pl",
+"czeladz.pl",
+"czest.pl",
+"dlugoleka.pl",
+"elblag.pl",
+"elk.pl",
+"glogow.pl",
+"gniezno.pl",
+"gorlice.pl",
+"grajewo.pl",
+"ilawa.pl",
+"jaworzno.pl",
+"jelenia-gora.pl",
+"jgora.pl",
+"kalisz.pl",
+"kazimierz-dolny.pl",
+"karpacz.pl",
+"kartuzy.pl",
+"kaszuby.pl",
+"katowice.pl",
+"kepno.pl",
+"ketrzyn.pl",
+"klodzko.pl",
+"kobierzyce.pl",
+"kolobrzeg.pl",
+"konin.pl",
+"konskowola.pl",
+"kutno.pl",
+"lapy.pl",
+"lebork.pl",
+"legnica.pl",
+"lezajsk.pl",
+"limanowa.pl",
+"lomza.pl",
+"lowicz.pl",
+"lubin.pl",
+"lukow.pl",
+"malbork.pl",
+"malopolska.pl",
+"mazowsze.pl",
+"mazury.pl",
+"mielec.pl",
+"mielno.pl",
+"mragowo.pl",
+"naklo.pl",
+"nowaruda.pl",
+"nysa.pl",
+"olawa.pl",
+"olecko.pl",
+"olkusz.pl",
+"olsztyn.pl",
+"opoczno.pl",
+"opole.pl",
+"ostroda.pl",
+"ostroleka.pl",
+"ostrowiec.pl",
+"ostrowwlkp.pl",
+"pila.pl",
+"pisz.pl",
+"podhale.pl",
+"podlasie.pl",
+"polkowice.pl",
+"pomorze.pl",
+"pomorskie.pl",
+"prochowice.pl",
+"pruszkow.pl",
+"przeworsk.pl",
+"pulawy.pl",
+"radom.pl",
+"rawa-maz.pl",
+"rybnik.pl",
+"rzeszow.pl",
+"sanok.pl",
+"sejny.pl",
+"slask.pl",
+"slupsk.pl",
+"sosnowiec.pl",
+"stalowa-wola.pl",
+"skoczow.pl",
+"starachowice.pl",
+"stargard.pl",
+"suwalki.pl",
+"swidnica.pl",
+"swiebodzin.pl",
+"swinoujscie.pl",
+"szczecin.pl",
+"szczytno.pl",
+"tarnobrzeg.pl",
+"tgory.pl",
+"turek.pl",
+"tychy.pl",
+"ustka.pl",
+"walbrzych.pl",
+"warmia.pl",
+"warszawa.pl",
+"waw.pl",
+"wegrow.pl",
+"wielun.pl",
+"wlocl.pl",
+"wloclawek.pl",
+"wodzislaw.pl",
+"wolomin.pl",
+"wroclaw.pl",
+"zachpomor.pl",
+"zagan.pl",
+"zarow.pl",
+"zgora.pl",
+"zgorzelec.pl",
+"pm",
+"pn",
+"gov.pn",
+"co.pn",
+"org.pn",
+"edu.pn",
+"net.pn",
+"post",
+"pr",
+"com.pr",
+"net.pr",
+"org.pr",
+"gov.pr",
+"edu.pr",
+"isla.pr",
+"pro.pr",
+"biz.pr",
+"info.pr",
+"name.pr",
+"est.pr",
+"prof.pr",
+"ac.pr",
+"pro",
+"aaa.pro",
+"aca.pro",
+"acct.pro",
+"avocat.pro",
+"bar.pro",
+"cpa.pro",
+"eng.pro",
+"jur.pro",
+"law.pro",
+"med.pro",
+"recht.pro",
+"ps",
+"edu.ps",
+"gov.ps",
+"sec.ps",
+"plo.ps",
+"com.ps",
+"org.ps",
+"net.ps",
+"pt",
+"net.pt",
+"gov.pt",
+"org.pt",
+"edu.pt",
+"int.pt",
+"publ.pt",
+"com.pt",
+"nome.pt",
+"pw",
+"co.pw",
+"ne.pw",
+"or.pw",
+"ed.pw",
+"go.pw",
+"belau.pw",
+"py",
+"com.py",
+"coop.py",
+"edu.py",
+"gov.py",
+"mil.py",
+"net.py",
+"org.py",
+"qa",
+"com.qa",
+"edu.qa",
+"gov.qa",
+"mil.qa",
+"name.qa",
+"net.qa",
+"org.qa",
+"sch.qa",
+"re",
+"asso.re",
+"com.re",
+"nom.re",
+"ro",
+"arts.ro",
+"com.ro",
+"firm.ro",
+"info.ro",
+"nom.ro",
+"nt.ro",
+"org.ro",
+"rec.ro",
+"store.ro",
+"tm.ro",
+"www.ro",
+"rs",
+"ac.rs",
+"co.rs",
+"edu.rs",
+"gov.rs",
+"in.rs",
+"org.rs",
+"ru",
+"rw",
+"ac.rw",
+"co.rw",
+"coop.rw",
+"gov.rw",
+"mil.rw",
+"net.rw",
+"org.rw",
+"sa",
+"com.sa",
+"net.sa",
+"org.sa",
+"gov.sa",
+"med.sa",
+"pub.sa",
+"edu.sa",
+"sch.sa",
+"sb",
+"com.sb",
+"edu.sb",
+"gov.sb",
+"net.sb",
+"org.sb",
+"sc",
+"com.sc",
+"gov.sc",
+"net.sc",
+"org.sc",
+"edu.sc",
+"sd",
+"com.sd",
+"net.sd",
+"org.sd",
+"edu.sd",
+"med.sd",
+"tv.sd",
+"gov.sd",
+"info.sd",
+"se",
+"a.se",
+"ac.se",
+"b.se",
+"bd.se",
+"brand.se",
+"c.se",
+"d.se",
+"e.se",
+"f.se",
+"fh.se",
+"fhsk.se",
+"fhv.se",
+"g.se",
+"h.se",
+"i.se",
+"k.se",
+"komforb.se",
+"kommunalforbund.se",
+"komvux.se",
+"l.se",
+"lanbib.se",
+"m.se",
+"n.se",
+"naturbruksgymn.se",
+"o.se",
+"org.se",
+"p.se",
+"parti.se",
+"pp.se",
+"press.se",
+"r.se",
+"s.se",
+"t.se",
+"tm.se",
+"u.se",
+"w.se",
+"x.se",
+"y.se",
+"z.se",
+"sg",
+"com.sg",
+"net.sg",
+"org.sg",
+"gov.sg",
+"edu.sg",
+"per.sg",
+"sh",
+"com.sh",
+"net.sh",
+"gov.sh",
+"org.sh",
+"mil.sh",
+"si",
+"sj",
+"sk",
+"sl",
+"com.sl",
+"net.sl",
+"edu.sl",
+"gov.sl",
+"org.sl",
+"sm",
+"sn",
+"art.sn",
+"com.sn",
+"edu.sn",
+"gouv.sn",
+"org.sn",
+"perso.sn",
+"univ.sn",
+"so",
+"com.so",
+"edu.so",
+"gov.so",
+"me.so",
+"net.so",
+"org.so",
+"sr",
+"ss",
+"biz.ss",
+"com.ss",
+"edu.ss",
+"gov.ss",
+"net.ss",
+"org.ss",
+"st",
+"co.st",
+"com.st",
+"consulado.st",
+"edu.st",
+"embaixada.st",
+"gov.st",
+"mil.st",
+"net.st",
+"org.st",
+"principe.st",
+"saotome.st",
+"store.st",
+"su",
+"sv",
+"com.sv",
+"edu.sv",
+"gob.sv",
+"org.sv",
+"red.sv",
+"sx",
+"gov.sx",
+"sy",
+"edu.sy",
+"gov.sy",
+"net.sy",
+"mil.sy",
+"com.sy",
+"org.sy",
+"sz",
+"co.sz",
+"ac.sz",
+"org.sz",
+"tc",
+"td",
+"tel",
+"tf",
+"tg",
+"th",
+"ac.th",
+"co.th",
+"go.th",
+"in.th",
+"mi.th",
+"net.th",
+"or.th",
+"tj",
+"ac.tj",
+"biz.tj",
+"co.tj",
+"com.tj",
+"edu.tj",
+"go.tj",
+"gov.tj",
+"int.tj",
+"mil.tj",
+"name.tj",
+"net.tj",
+"nic.tj",
+"org.tj",
+"test.tj",
+"web.tj",
+"tk",
+"tl",
+"gov.tl",
+"tm",
+"com.tm",
+"co.tm",
+"org.tm",
+"net.tm",
+"nom.tm",
+"gov.tm",
+"mil.tm",
+"edu.tm",
+"tn",
+"com.tn",
+"ens.tn",
+"fin.tn",
+"gov.tn",
+"ind.tn",
+"intl.tn",
+"nat.tn",
+"net.tn",
+"org.tn",
+"info.tn",
+"perso.tn",
+"tourism.tn",
+"edunet.tn",
+"rnrt.tn",
+"rns.tn",
+"rnu.tn",
+"mincom.tn",
+"agrinet.tn",
+"defense.tn",
+"turen.tn",
+"to",
+"com.to",
+"gov.to",
+"net.to",
+"org.to",
+"edu.to",
+"mil.to",
+"tr",
+"av.tr",
+"bbs.tr",
+"bel.tr",
+"biz.tr",
+"com.tr",
+"dr.tr",
+"edu.tr",
+"gen.tr",
+"gov.tr",
+"info.tr",
+"mil.tr",
+"k12.tr",
+"kep.tr",
+"name.tr",
+"net.tr",
+"org.tr",
+"pol.tr",
+"tel.tr",
+"tsk.tr",
+"tv.tr",
+"web.tr",
+"nc.tr",
+"gov.nc.tr",
+"tt",
+"co.tt",
+"com.tt",
+"org.tt",
+"net.tt",
+"biz.tt",
+"info.tt",
+"pro.tt",
+"int.tt",
+"coop.tt",
+"jobs.tt",
+"mobi.tt",
+"travel.tt",
+"museum.tt",
+"aero.tt",
+"name.tt",
+"gov.tt",
+"edu.tt",
+"tv",
+"tw",
+"edu.tw",
+"gov.tw",
+"mil.tw",
+"com.tw",
+"net.tw",
+"org.tw",
+"idv.tw",
+"game.tw",
+"ebiz.tw",
+"club.tw",
+"網路.tw",
+"組織.tw",
+"商業.tw",
+"tz",
+"ac.tz",
+"co.tz",
+"go.tz",
+"hotel.tz",
+"info.tz",
+"me.tz",
+"mil.tz",
+"mobi.tz",
+"ne.tz",
+"or.tz",
+"sc.tz",
+"tv.tz",
+"ua",
+"com.ua",
+"edu.ua",
+"gov.ua",
+"in.ua",
+"net.ua",
+"org.ua",
+"cherkassy.ua",
+"cherkasy.ua",
+"chernigov.ua",
+"chernihiv.ua",
+"chernivtsi.ua",
+"chernovtsy.ua",
+"ck.ua",
+"cn.ua",
+"cr.ua",
+"crimea.ua",
+"cv.ua",
+"dn.ua",
+"dnepropetrovsk.ua",
+"dnipropetrovsk.ua",
+"dominic.ua",
+"donetsk.ua",
+"dp.ua",
+"if.ua",
+"ivano-frankivsk.ua",
+"kh.ua",
+"kharkiv.ua",
+"kharkov.ua",
+"kherson.ua",
+"khmelnitskiy.ua",
+"khmelnytskyi.ua",
+"kiev.ua",
+"kirovograd.ua",
+"km.ua",
+"kr.ua",
+"krym.ua",
+"ks.ua",
+"kv.ua",
+"kyiv.ua",
+"lg.ua",
+"lt.ua",
+"lugansk.ua",
+"lutsk.ua",
+"lv.ua",
+"lviv.ua",
+"mk.ua",
+"mykolaiv.ua",
+"nikolaev.ua",
+"od.ua",
+"odesa.ua",
+"odessa.ua",
+"pl.ua",
+"poltava.ua",
+"rivne.ua",
+"rovno.ua",
+"rv.ua",
+"sb.ua",
+"sebastopol.ua",
+"sevastopol.ua",
+"sm.ua",
+"sumy.ua",
+"te.ua",
+"ternopil.ua",
+"uz.ua",
+"uzhgorod.ua",
+"vinnica.ua",
+"vinnytsia.ua",
+"vn.ua",
+"volyn.ua",
+"yalta.ua",
+"zaporizhzhe.ua",
+"zaporizhzhia.ua",
+"zhitomir.ua",
+"zhytomyr.ua",
+"zp.ua",
+"zt.ua",
+"ug",
+"co.ug",
+"or.ug",
+"ac.ug",
+"sc.ug",
+"go.ug",
+"ne.ug",
+"com.ug",
+"org.ug",
+"uk",
+"ac.uk",
+"co.uk",
+"gov.uk",
+"ltd.uk",
+"me.uk",
+"net.uk",
+"nhs.uk",
+"org.uk",
+"plc.uk",
+"police.uk",
+"*.sch.uk",
+"us",
+"dni.us",
+"fed.us",
+"isa.us",
+"kids.us",
+"nsn.us",
+"ak.us",
+"al.us",
+"ar.us",
+"as.us",
+"az.us",
+"ca.us",
+"co.us",
+"ct.us",
+"dc.us",
+"de.us",
+"fl.us",
+"ga.us",
+"gu.us",
+"hi.us",
+"ia.us",
+"id.us",
+"il.us",
+"in.us",
+"ks.us",
+"ky.us",
+"la.us",
+"ma.us",
+"md.us",
+"me.us",
+"mi.us",
+"mn.us",
+"mo.us",
+"ms.us",
+"mt.us",
+"nc.us",
+"nd.us",
+"ne.us",
+"nh.us",
+"nj.us",
+"nm.us",
+"nv.us",
+"ny.us",
+"oh.us",
+"ok.us",
+"or.us",
+"pa.us",
+"pr.us",
+"ri.us",
+"sc.us",
+"sd.us",
+"tn.us",
+"tx.us",
+"ut.us",
+"vi.us",
+"vt.us",
+"va.us",
+"wa.us",
+"wi.us",
+"wv.us",
+"wy.us",
+"k12.ak.us",
+"k12.al.us",
+"k12.ar.us",
+"k12.as.us",
+"k12.az.us",
+"k12.ca.us",
+"k12.co.us",
+"k12.ct.us",
+"k12.dc.us",
+"k12.de.us",
+"k12.fl.us",
+"k12.ga.us",
+"k12.gu.us",
+"k12.ia.us",
+"k12.id.us",
+"k12.il.us",
+"k12.in.us",
+"k12.ks.us",
+"k12.ky.us",
+"k12.la.us",
+"k12.ma.us",
+"k12.md.us",
+"k12.me.us",
+"k12.mi.us",
+"k12.mn.us",
+"k12.mo.us",
+"k12.ms.us",
+"k12.mt.us",
+"k12.nc.us",
+"k12.ne.us",
+"k12.nh.us",
+"k12.nj.us",
+"k12.nm.us",
+"k12.nv.us",
+"k12.ny.us",
+"k12.oh.us",
+"k12.ok.us",
+"k12.or.us",
+"k12.pa.us",
+"k12.pr.us",
+"k12.ri.us",
+"k12.sc.us",
+"k12.tn.us",
+"k12.tx.us",
+"k12.ut.us",
+"k12.vi.us",
+"k12.vt.us",
+"k12.va.us",
+"k12.wa.us",
+"k12.wi.us",
+"k12.wy.us",
+"cc.ak.us",
+"cc.al.us",
+"cc.ar.us",
+"cc.as.us",
+"cc.az.us",
+"cc.ca.us",
+"cc.co.us",
+"cc.ct.us",
+"cc.dc.us",
+"cc.de.us",
+"cc.fl.us",
+"cc.ga.us",
+"cc.gu.us",
+"cc.hi.us",
+"cc.ia.us",
+"cc.id.us",
+"cc.il.us",
+"cc.in.us",
+"cc.ks.us",
+"cc.ky.us",
+"cc.la.us",
+"cc.ma.us",
+"cc.md.us",
+"cc.me.us",
+"cc.mi.us",
+"cc.mn.us",
+"cc.mo.us",
+"cc.ms.us",
+"cc.mt.us",
+"cc.nc.us",
+"cc.nd.us",
+"cc.ne.us",
+"cc.nh.us",
+"cc.nj.us",
+"cc.nm.us",
+"cc.nv.us",
+"cc.ny.us",
+"cc.oh.us",
+"cc.ok.us",
+"cc.or.us",
+"cc.pa.us",
+"cc.pr.us",
+"cc.ri.us",
+"cc.sc.us",
+"cc.sd.us",
+"cc.tn.us",
+"cc.tx.us",
+"cc.ut.us",
+"cc.vi.us",
+"cc.vt.us",
+"cc.va.us",
+"cc.wa.us",
+"cc.wi.us",
+"cc.wv.us",
+"cc.wy.us",
+"lib.ak.us",
+"lib.al.us",
+"lib.ar.us",
+"lib.as.us",
+"lib.az.us",
+"lib.ca.us",
+"lib.co.us",
+"lib.ct.us",
+"lib.dc.us",
+"lib.fl.us",
+"lib.ga.us",
+"lib.gu.us",
+"lib.hi.us",
+"lib.ia.us",
+"lib.id.us",
+"lib.il.us",
+"lib.in.us",
+"lib.ks.us",
+"lib.ky.us",
+"lib.la.us",
+"lib.ma.us",
+"lib.md.us",
+"lib.me.us",
+"lib.mi.us",
+"lib.mn.us",
+"lib.mo.us",
+"lib.ms.us",
+"lib.mt.us",
+"lib.nc.us",
+"lib.nd.us",
+"lib.ne.us",
+"lib.nh.us",
+"lib.nj.us",
+"lib.nm.us",
+"lib.nv.us",
+"lib.ny.us",
+"lib.oh.us",
+"lib.ok.us",
+"lib.or.us",
+"lib.pa.us",
+"lib.pr.us",
+"lib.ri.us",
+"lib.sc.us",
+"lib.sd.us",
+"lib.tn.us",
+"lib.tx.us",
+"lib.ut.us",
+"lib.vi.us",
+"lib.vt.us",
+"lib.va.us",
+"lib.wa.us",
+"lib.wi.us",
+"lib.wy.us",
+"pvt.k12.ma.us",
+"chtr.k12.ma.us",
+"paroch.k12.ma.us",
+"ann-arbor.mi.us",
+"cog.mi.us",
+"dst.mi.us",
+"eaton.mi.us",
+"gen.mi.us",
+"mus.mi.us",
+"tec.mi.us",
+"washtenaw.mi.us",
+"uy",
+"com.uy",
+"edu.uy",
+"gub.uy",
+"mil.uy",
+"net.uy",
+"org.uy",
+"uz",
+"co.uz",
+"com.uz",
+"net.uz",
+"org.uz",
+"va",
+"vc",
+"com.vc",
+"net.vc",
+"org.vc",
+"gov.vc",
+"mil.vc",
+"edu.vc",
+"ve",
+"arts.ve",
+"co.ve",
+"com.ve",
+"e12.ve",
+"edu.ve",
+"firm.ve",
+"gob.ve",
+"gov.ve",
+"info.ve",
+"int.ve",
+"mil.ve",
+"net.ve",
+"org.ve",
+"rec.ve",
+"store.ve",
+"tec.ve",
+"web.ve",
+"vg",
+"vi",
+"co.vi",
+"com.vi",
+"k12.vi",
+"net.vi",
+"org.vi",
+"vn",
+"com.vn",
+"net.vn",
+"org.vn",
+"edu.vn",
+"gov.vn",
+"int.vn",
+"ac.vn",
+"biz.vn",
+"info.vn",
+"name.vn",
+"pro.vn",
+"health.vn",
+"vu",
+"com.vu",
+"edu.vu",
+"net.vu",
+"org.vu",
+"wf",
+"ws",
+"com.ws",
+"net.ws",
+"org.ws",
+"gov.ws",
+"edu.ws",
+"yt",
+"امارات",
+"հայ",
+"বাংলা",
+"бг",
+"бел",
+"中国",
+"中國",
+"الجزائر",
+"مصر",
+"ею",
+"ευ",
+"موريتانيا",
+"გე",
+"ελ",
+"香港",
+"公司.香港",
+"教育.香港",
+"政府.香港",
+"個人.香港",
+"網絡.香港",
+"組織.香港",
+"ಭಾರತ",
+"ଭାରତ",
+"ভাৰত",
+"भारतम्",
+"भारोत",
+"ڀارت",
+"ഭാരതം",
+"भारत",
+"بارت",
+"بھارت",
+"భారత్",
+"ભારત",
+"ਭਾਰਤ",
+"ভারত",
+"இந்தியா",
+"ایران",
+"ايران",
+"عراق",
+"الاردن",
+"한국",
+"қаз",
+"ලංකා",
+"இலங்கை",
+"المغرب",
+"мкд",
+"мон",
+"澳門",
+"澳门",
+"مليسيا",
+"عمان",
+"پاکستان",
+"پاكستان",
+"فلسطين",
+"срб",
+"пр.срб",
+"орг.срб",
+"обр.срб",
+"од.срб",
+"упр.срб",
+"ак.срб",
+"рф",
+"قطر",
+"السعودية",
+"السعودیة",
+"السعودیۃ",
+"السعوديه",
+"سودان",
+"新加坡",
+"சிங்கப்பூர்",
+"سورية",
+"سوريا",
+"ไทย",
+"ศึกษา.ไทย",
+"ธุรกิจ.ไทย",
+"รัฐบาล.ไทย",
+"ทหาร.ไทย",
+"เน็ต.ไทย",
+"องค์กร.ไทย",
+"تونس",
+"台灣",
+"台湾",
+"臺灣",
+"укр",
+"اليمن",
+"xxx",
+"*.ye",
+"ac.za",
+"agric.za",
+"alt.za",
+"co.za",
+"edu.za",
+"gov.za",
+"grondar.za",
+"law.za",
+"mil.za",
+"net.za",
+"ngo.za",
+"nic.za",
+"nis.za",
+"nom.za",
+"org.za",
+"school.za",
+"tm.za",
+"web.za",
+"zm",
+"ac.zm",
+"biz.zm",
+"co.zm",
+"com.zm",
+"edu.zm",
+"gov.zm",
+"info.zm",
+"mil.zm",
+"net.zm",
+"org.zm",
+"sch.zm",
+"zw",
+"ac.zw",
+"co.zw",
+"gov.zw",
+"mil.zw",
+"org.zw",
+"aaa",
+"aarp",
+"abarth",
+"abb",
+"abbott",
+"abbvie",
+"abc",
+"able",
+"abogado",
+"abudhabi",
+"academy",
+"accenture",
+"accountant",
+"accountants",
+"aco",
+"actor",
+"adac",
+"ads",
+"adult",
+"aeg",
+"aetna",
+"afamilycompany",
+"afl",
+"africa",
+"agakhan",
+"agency",
+"aig",
+"aigo",
+"airbus",
+"airforce",
+"airtel",
+"akdn",
+"alfaromeo",
+"alibaba",
+"alipay",
+"allfinanz",
+"allstate",
+"ally",
+"alsace",
+"alstom",
+"amazon",
+"americanexpress",
+"americanfamily",
+"amex",
+"amfam",
+"amica",
+"amsterdam",
+"analytics",
+"android",
+"anquan",
+"anz",
+"aol",
+"apartments",
+"app",
+"apple",
+"aquarelle",
+"arab",
+"aramco",
+"archi",
+"army",
+"art",
+"arte",
+"asda",
+"associates",
+"athleta",
+"attorney",
+"auction",
+"audi",
+"audible",
+"audio",
+"auspost",
+"author",
+"auto",
+"autos",
+"avianca",
+"aws",
+"axa",
+"azure",
+"baby",
+"baidu",
+"banamex",
+"bananarepublic",
+"band",
+"bank",
+"bar",
+"barcelona",
+"barclaycard",
+"barclays",
+"barefoot",
+"bargains",
+"baseball",
+"basketball",
+"bauhaus",
+"bayern",
+"bbc",
+"bbt",
+"bbva",
+"bcg",
+"bcn",
+"beats",
+"beauty",
+"beer",
+"bentley",
+"berlin",
+"best",
+"bestbuy",
+"bet",
+"bharti",
+"bible",
+"bid",
+"bike",
+"bing",
+"bingo",
+"bio",
+"black",
+"blackfriday",
+"blockbuster",
+"blog",
+"bloomberg",
+"blue",
+"bms",
+"bmw",
+"bnpparibas",
+"boats",
+"boehringer",
+"bofa",
+"bom",
+"bond",
+"boo",
+"book",
+"booking",
+"bosch",
+"bostik",
+"boston",
+"bot",
+"boutique",
+"box",
+"bradesco",
+"bridgestone",
+"broadway",
+"broker",
+"brother",
+"brussels",
+"budapest",
+"bugatti",
+"build",
+"builders",
+"business",
+"buy",
+"buzz",
+"bzh",
+"cab",
+"cafe",
+"cal",
+"call",
+"calvinklein",
+"cam",
+"camera",
+"camp",
+"cancerresearch",
+"canon",
+"capetown",
+"capital",
+"capitalone",
+"car",
+"caravan",
+"cards",
+"care",
+"career",
+"careers",
+"cars",
+"casa",
+"case",
+"caseih",
+"cash",
+"casino",
+"catering",
+"catholic",
+"cba",
+"cbn",
+"cbre",
+"cbs",
+"ceb",
+"center",
+"ceo",
+"cern",
+"cfa",
+"cfd",
+"chanel",
+"channel",
+"charity",
+"chase",
+"chat",
+"cheap",
+"chintai",
+"christmas",
+"chrome",
+"church",
+"cipriani",
+"circle",
+"cisco",
+"citadel",
+"citi",
+"citic",
+"city",
+"cityeats",
+"claims",
+"cleaning",
+"click",
+"clinic",
+"clinique",
+"clothing",
+"cloud",
+"club",
+"clubmed",
+"coach",
+"codes",
+"coffee",
+"college",
+"cologne",
+"comcast",
+"commbank",
+"community",
+"company",
+"compare",
+"computer",
+"comsec",
+"condos",
+"construction",
+"consulting",
+"contact",
+"contractors",
+"cooking",
+"cookingchannel",
+"cool",
+"corsica",
+"country",
+"coupon",
+"coupons",
+"courses",
+"cpa",
+"credit",
+"creditcard",
+"creditunion",
+"cricket",
+"crown",
+"crs",
+"cruise",
+"cruises",
+"csc",
+"cuisinella",
+"cymru",
+"cyou",
+"dabur",
+"dad",
+"dance",
+"data",
+"date",
+"dating",
+"datsun",
+"day",
+"dclk",
+"dds",
+"deal",
+"dealer",
+"deals",
+"degree",
+"delivery",
+"dell",
+"deloitte",
+"delta",
+"democrat",
+"dental",
+"dentist",
+"desi",
+"design",
+"dev",
+"dhl",
+"diamonds",
+"diet",
+"digital",
+"direct",
+"directory",
+"discount",
+"discover",
+"dish",
+"diy",
+"dnp",
+"docs",
+"doctor",
+"dog",
+"domains",
+"dot",
+"download",
+"drive",
+"dtv",
+"dubai",
+"duck",
+"dunlop",
+"dupont",
+"durban",
+"dvag",
+"dvr",
+"earth",
+"eat",
+"eco",
+"edeka",
+"education",
+"email",
+"emerck",
+"energy",
+"engineer",
+"engineering",
+"enterprises",
+"epson",
+"equipment",
+"ericsson",
+"erni",
+"esq",
+"estate",
+"esurance",
+"etisalat",
+"eurovision",
+"eus",
+"events",
+"exchange",
+"expert",
+"exposed",
+"express",
+"extraspace",
+"fage",
+"fail",
+"fairwinds",
+"faith",
+"family",
+"fan",
+"fans",
+"farm",
+"farmers",
+"fashion",
+"fast",
+"fedex",
+"feedback",
+"ferrari",
+"ferrero",
+"fiat",
+"fidelity",
+"fido",
+"film",
+"final",
+"finance",
+"financial",
+"fire",
+"firestone",
+"firmdale",
+"fish",
+"fishing",
+"fit",
+"fitness",
+"flickr",
+"flights",
+"flir",
+"florist",
+"flowers",
+"fly",
+"foo",
+"food",
+"foodnetwork",
+"football",
+"ford",
+"forex",
+"forsale",
+"forum",
+"foundation",
+"fox",
+"free",
+"fresenius",
+"frl",
+"frogans",
+"frontdoor",
+"frontier",
+"ftr",
+"fujitsu",
+"fujixerox",
+"fun",
+"fund",
+"furniture",
+"futbol",
+"fyi",
+"gal",
+"gallery",
+"gallo",
+"gallup",
+"game",
+"games",
+"gap",
+"garden",
+"gay",
+"gbiz",
+"gdn",
+"gea",
+"gent",
+"genting",
+"george",
+"ggee",
+"gift",
+"gifts",
+"gives",
+"giving",
+"glade",
+"glass",
+"gle",
+"global",
+"globo",
+"gmail",
+"gmbh",
+"gmo",
+"gmx",
+"godaddy",
+"gold",
+"goldpoint",
+"golf",
+"goo",
+"goodyear",
+"goog",
+"google",
+"gop",
+"got",
+"grainger",
+"graphics",
+"gratis",
+"green",
+"gripe",
+"grocery",
+"group",
+"guardian",
+"gucci",
+"guge",
+"guide",
+"guitars",
+"guru",
+"hair",
+"hamburg",
+"hangout",
+"haus",
+"hbo",
+"hdfc",
+"hdfcbank",
+"health",
+"healthcare",
+"help",
+"helsinki",
+"here",
+"hermes",
+"hgtv",
+"hiphop",
+"hisamitsu",
+"hitachi",
+"hiv",
+"hkt",
+"hockey",
+"holdings",
+"holiday",
+"homedepot",
+"homegoods",
+"homes",
+"homesense",
+"honda",
+"horse",
+"hospital",
+"host",
+"hosting",
+"hot",
+"hoteles",
+"hotels",
+"hotmail",
+"house",
+"how",
+"hsbc",
+"hughes",
+"hyatt",
+"hyundai",
+"ibm",
+"icbc",
+"ice",
+"icu",
+"ieee",
+"ifm",
+"ikano",
+"imamat",
+"imdb",
+"immo",
+"immobilien",
+"inc",
+"industries",
+"infiniti",
+"ing",
+"ink",
+"institute",
+"insurance",
+"insure",
+"intel",
+"international",
+"intuit",
+"investments",
+"ipiranga",
+"irish",
+"ismaili",
+"ist",
+"istanbul",
+"itau",
+"itv",
+"iveco",
+"jaguar",
+"java",
+"jcb",
+"jcp",
+"jeep",
+"jetzt",
+"jewelry",
+"jio",
+"jll",
+"jmp",
+"jnj",
+"joburg",
+"jot",
+"joy",
+"jpmorgan",
+"jprs",
+"juegos",
+"juniper",
+"kaufen",
+"kddi",
+"kerryhotels",
+"kerrylogistics",
+"kerryproperties",
+"kfh",
+"kia",
+"kim",
+"kinder",
+"kindle",
+"kitchen",
+"kiwi",
+"koeln",
+"komatsu",
+"kosher",
+"kpmg",
+"kpn",
+"krd",
+"kred",
+"kuokgroup",
+"kyoto",
+"lacaixa",
+"lamborghini",
+"lamer",
+"lancaster",
+"lancia",
+"land",
+"landrover",
+"lanxess",
+"lasalle",
+"lat",
+"latino",
+"latrobe",
+"law",
+"lawyer",
+"lds",
+"lease",
+"leclerc",
+"lefrak",
+"legal",
+"lego",
+"lexus",
+"lgbt",
+"lidl",
+"life",
+"lifeinsurance",
+"lifestyle",
+"lighting",
+"like",
+"lilly",
+"limited",
+"limo",
+"lincoln",
+"linde",
+"link",
+"lipsy",
+"live",
+"living",
+"lixil",
+"llc",
+"llp",
+"loan",
+"loans",
+"locker",
+"locus",
+"loft",
+"lol",
+"london",
+"lotte",
+"lotto",
+"love",
+"lpl",
+"lplfinancial",
+"ltd",
+"ltda",
+"lundbeck",
+"lupin",
+"luxe",
+"luxury",
+"macys",
+"madrid",
+"maif",
+"maison",
+"makeup",
+"man",
+"management",
+"mango",
+"map",
+"market",
+"marketing",
+"markets",
+"marriott",
+"marshalls",
+"maserati",
+"mattel",
+"mba",
+"mckinsey",
+"med",
+"media",
+"meet",
+"melbourne",
+"meme",
+"memorial",
+"men",
+"menu",
+"merckmsd",
+"metlife",
+"miami",
+"microsoft",
+"mini",
+"mint",
+"mit",
+"mitsubishi",
+"mlb",
+"mls",
+"mma",
+"mobile",
+"moda",
+"moe",
+"moi",
+"mom",
+"monash",
+"money",
+"monster",
+"mormon",
+"mortgage",
+"moscow",
+"moto",
+"motorcycles",
+"mov",
+"movie",
+"msd",
+"mtn",
+"mtr",
+"mutual",
+"nab",
+"nadex",
+"nagoya",
+"nationwide",
+"natura",
+"navy",
+"nba",
+"nec",
+"netbank",
+"netflix",
+"network",
+"neustar",
+"new",
+"newholland",
+"news",
+"next",
+"nextdirect",
+"nexus",
+"nfl",
+"ngo",
+"nhk",
+"nico",
+"nike",
+"nikon",
+"ninja",
+"nissan",
+"nissay",
+"nokia",
+"northwesternmutual",
+"norton",
+"now",
+"nowruz",
+"nowtv",
+"nra",
+"nrw",
+"ntt",
+"nyc",
+"obi",
+"observer",
+"off",
+"office",
+"okinawa",
+"olayan",
+"olayangroup",
+"oldnavy",
+"ollo",
+"omega",
+"one",
+"ong",
+"onl",
+"online",
+"onyourside",
+"ooo",
+"open",
+"oracle",
+"orange",
+"organic",
+"origins",
+"osaka",
+"otsuka",
+"ott",
+"ovh",
+"page",
+"panasonic",
+"paris",
+"pars",
+"partners",
+"parts",
+"party",
+"passagens",
+"pay",
+"pccw",
+"pet",
+"pfizer",
+"pharmacy",
+"phd",
+"philips",
+"phone",
+"photo",
+"photography",
+"photos",
+"physio",
+"pics",
+"pictet",
+"pictures",
+"pid",
+"pin",
+"ping",
+"pink",
+"pioneer",
+"pizza",
+"place",
+"play",
+"playstation",
+"plumbing",
+"plus",
+"pnc",
+"pohl",
+"poker",
+"politie",
+"porn",
+"pramerica",
+"praxi",
+"press",
+"prime",
+"prod",
+"productions",
+"prof",
+"progressive",
+"promo",
+"properties",
+"property",
+"protection",
+"pru",
+"prudential",
+"pub",
+"pwc",
+"qpon",
+"quebec",
+"quest",
+"qvc",
+"racing",
+"radio",
+"raid",
+"read",
+"realestate",
+"realtor",
+"realty",
+"recipes",
+"red",
+"redstone",
+"redumbrella",
+"rehab",
+"reise",
+"reisen",
+"reit",
+"reliance",
+"ren",
+"rent",
+"rentals",
+"repair",
+"report",
+"republican",
+"rest",
+"restaurant",
+"review",
+"reviews",
+"rexroth",
+"rich",
+"richardli",
+"ricoh",
+"rightathome",
+"ril",
+"rio",
+"rip",
+"rmit",
+"rocher",
+"rocks",
+"rodeo",
+"rogers",
+"room",
+"rsvp",
+"rugby",
+"ruhr",
+"run",
+"rwe",
+"ryukyu",
+"saarland",
+"safe",
+"safety",
+"sakura",
+"sale",
+"salon",
+"samsclub",
+"samsung",
+"sandvik",
+"sandvikcoromant",
+"sanofi",
+"sap",
+"sarl",
+"sas",
+"save",
+"saxo",
+"sbi",
+"sbs",
+"sca",
+"scb",
+"schaeffler",
+"schmidt",
+"scholarships",
+"school",
+"schule",
+"schwarz",
+"science",
+"scjohnson",
+"scor",
+"scot",
+"search",
+"seat",
+"secure",
+"security",
+"seek",
+"select",
+"sener",
+"services",
+"ses",
+"seven",
+"sew",
+"sex",
+"sexy",
+"sfr",
+"shangrila",
+"sharp",
+"shaw",
+"shell",
+"shia",
+"shiksha",
+"shoes",
+"shop",
+"shopping",
+"shouji",
+"show",
+"showtime",
+"shriram",
+"silk",
+"sina",
+"singles",
+"site",
+"ski",
+"skin",
+"sky",
+"skype",
+"sling",
+"smart",
+"smile",
+"sncf",
+"soccer",
+"social",
+"softbank",
+"software",
+"sohu",
+"solar",
+"solutions",
+"song",
+"sony",
+"soy",
+"spa",
+"space",
+"sport",
+"spot",
+"spreadbetting",
+"srl",
+"stada",
+"staples",
+"star",
+"statebank",
+"statefarm",
+"stc",
+"stcgroup",
+"stockholm",
+"storage",
+"store",
+"stream",
+"studio",
+"study",
+"style",
+"sucks",
+"supplies",
+"supply",
+"support",
+"surf",
+"surgery",
+"suzuki",
+"swatch",
+"swiftcover",
+"swiss",
+"sydney",
+"symantec",
+"systems",
+"tab",
+"taipei",
+"talk",
+"taobao",
+"target",
+"tatamotors",
+"tatar",
+"tattoo",
+"tax",
+"taxi",
+"tci",
+"tdk",
+"team",
+"tech",
+"technology",
+"temasek",
+"tennis",
+"teva",
+"thd",
+"theater",
+"theatre",
+"tiaa",
+"tickets",
+"tienda",
+"tiffany",
+"tips",
+"tires",
+"tirol",
+"tjmaxx",
+"tjx",
+"tkmaxx",
+"tmall",
+"today",
+"tokyo",
+"tools",
+"top",
+"toray",
+"toshiba",
+"total",
+"tours",
+"town",
+"toyota",
+"toys",
+"trade",
+"trading",
+"training",
+"travel",
+"travelchannel",
+"travelers",
+"travelersinsurance",
+"trust",
+"trv",
+"tube",
+"tui",
+"tunes",
+"tushu",
+"tvs",
+"ubank",
+"ubs",
+"unicom",
+"university",
+"uno",
+"uol",
+"ups",
+"vacations",
+"vana",
+"vanguard",
+"vegas",
+"ventures",
+"verisign",
+"versicherung",
+"vet",
+"viajes",
+"video",
+"vig",
+"viking",
+"villas",
+"vin",
+"vip",
+"virgin",
+"visa",
+"vision",
+"viva",
+"vivo",
+"vlaanderen",
+"vodka",
+"volkswagen",
+"volvo",
+"vote",
+"voting",
+"voto",
+"voyage",
+"vuelos",
+"wales",
+"walmart",
+"walter",
+"wang",
+"wanggou",
+"watch",
+"watches",
+"weather",
+"weatherchannel",
+"webcam",
+"weber",
+"website",
+"wed",
+"wedding",
+"weibo",
+"weir",
+"whoswho",
+"wien",
+"wiki",
+"williamhill",
+"win",
+"windows",
+"wine",
+"winners",
+"wme",
+"wolterskluwer",
+"woodside",
+"work",
+"works",
+"world",
+"wow",
+"wtc",
+"wtf",
+"xbox",
+"xerox",
+"xfinity",
+"xihuan",
+"xin",
+"कॉम",
+"セール",
+"佛山",
+"慈善",
+"集团",
+"在线",
+"大众汽车",
+"点看",
+"คอม",
+"八卦",
+"موقع",
+"公益",
+"公司",
+"香格里拉",
+"网站",
+"移动",
+"我爱你",
+"москва",
+"католик",
+"онлайн",
+"сайт",
+"联通",
+"קום",
+"时尚",
+"微博",
+"淡马锡",
+"ファッション",
+"орг",
+"नेट",
+"ストア",
+"アマゾン",
+"삼성",
+"商标",
+"商店",
+"商城",
+"дети",
+"ポイント",
+"新闻",
+"工行",
+"家電",
+"كوم",
+"中文网",
+"中信",
+"娱乐",
+"谷歌",
+"電訊盈科",
+"购物",
+"クラウド",
+"通販",
+"网店",
+"संगठन",
+"餐厅",
+"网络",
+"ком",
+"亚马逊",
+"诺基亚",
+"食品",
+"飞利浦",
+"手表",
+"手机",
+"ارامكو",
+"العليان",
+"اتصالات",
+"بازار",
+"ابوظبي",
+"كاثوليك",
+"همراه",
+"닷컴",
+"政府",
+"شبكة",
+"بيتك",
+"عرب",
+"机构",
+"组织机构",
+"健康",
+"招聘",
+"рус",
+"珠宝",
+"大拿",
+"みんな",
+"グーグル",
+"世界",
+"書籍",
+"网址",
+"닷넷",
+"コム",
+"天主教",
+"游戏",
+"vermögensberater",
+"vermögensberatung",
+"企业",
+"信息",
+"嘉里大酒店",
+"嘉里",
+"广东",
+"政务",
+"xyz",
+"yachts",
+"yahoo",
+"yamaxun",
+"yandex",
+"yodobashi",
+"yoga",
+"yokohama",
+"you",
+"youtube",
+"yun",
+"zappos",
+"zara",
+"zero",
+"zip",
+"zone",
+"zuerich",
+"cc.ua",
+"inf.ua",
+"ltd.ua",
+"adobeaemcloud.com",
+"adobeaemcloud.net",
+"*.dev.adobeaemcloud.com",
+"beep.pl",
+"barsy.ca",
+"*.compute.estate",
+"*.alces.network",
+"altervista.org",
+"alwaysdata.net",
+"cloudfront.net",
+"*.compute.amazonaws.com",
+"*.compute-1.amazonaws.com",
+"*.compute.amazonaws.com.cn",
+"us-east-1.amazonaws.com",
+"cn-north-1.eb.amazonaws.com.cn",
+"cn-northwest-1.eb.amazonaws.com.cn",
+"elasticbeanstalk.com",
+"ap-northeast-1.elasticbeanstalk.com",
+"ap-northeast-2.elasticbeanstalk.com",
+"ap-northeast-3.elasticbeanstalk.com",
+"ap-south-1.elasticbeanstalk.com",
+"ap-southeast-1.elasticbeanstalk.com",
+"ap-southeast-2.elasticbeanstalk.com",
+"ca-central-1.elasticbeanstalk.com",
+"eu-central-1.elasticbeanstalk.com",
+"eu-west-1.elasticbeanstalk.com",
+"eu-west-2.elasticbeanstalk.com",
+"eu-west-3.elasticbeanstalk.com",
+"sa-east-1.elasticbeanstalk.com",
+"us-east-1.elasticbeanstalk.com",
+"us-east-2.elasticbeanstalk.com",
+"us-gov-west-1.elasticbeanstalk.com",
+"us-west-1.elasticbeanstalk.com",
+"us-west-2.elasticbeanstalk.com",
+"*.elb.amazonaws.com",
+"*.elb.amazonaws.com.cn",
+"s3.amazonaws.com",
+"s3-ap-northeast-1.amazonaws.com",
+"s3-ap-northeast-2.amazonaws.com",
+"s3-ap-south-1.amazonaws.com",
+"s3-ap-southeast-1.amazonaws.com",
+"s3-ap-southeast-2.amazonaws.com",
+"s3-ca-central-1.amazonaws.com",
+"s3-eu-central-1.amazonaws.com",
+"s3-eu-west-1.amazonaws.com",
+"s3-eu-west-2.amazonaws.com",
+"s3-eu-west-3.amazonaws.com",
+"s3-external-1.amazonaws.com",
+"s3-fips-us-gov-west-1.amazonaws.com",
+"s3-sa-east-1.amazonaws.com",
+"s3-us-gov-west-1.amazonaws.com",
+"s3-us-east-2.amazonaws.com",
+"s3-us-west-1.amazonaws.com",
+"s3-us-west-2.amazonaws.com",
+"s3.ap-northeast-2.amazonaws.com",
+"s3.ap-south-1.amazonaws.com",
+"s3.cn-north-1.amazonaws.com.cn",
+"s3.ca-central-1.amazonaws.com",
+"s3.eu-central-1.amazonaws.com",
+"s3.eu-west-2.amazonaws.com",
+"s3.eu-west-3.amazonaws.com",
+"s3.us-east-2.amazonaws.com",
+"s3.dualstack.ap-northeast-1.amazonaws.com",
+"s3.dualstack.ap-northeast-2.amazonaws.com",
+"s3.dualstack.ap-south-1.amazonaws.com",
+"s3.dualstack.ap-southeast-1.amazonaws.com",
+"s3.dualstack.ap-southeast-2.amazonaws.com",
+"s3.dualstack.ca-central-1.amazonaws.com",
+"s3.dualstack.eu-central-1.amazonaws.com",
+"s3.dualstack.eu-west-1.amazonaws.com",
+"s3.dualstack.eu-west-2.amazonaws.com",
+"s3.dualstack.eu-west-3.amazonaws.com",
+"s3.dualstack.sa-east-1.amazonaws.com",
+"s3.dualstack.us-east-1.amazonaws.com",
+"s3.dualstack.us-east-2.amazonaws.com",
+"s3-website-us-east-1.amazonaws.com",
+"s3-website-us-west-1.amazonaws.com",
+"s3-website-us-west-2.amazonaws.com",
+"s3-website-ap-northeast-1.amazonaws.com",
+"s3-website-ap-southeast-1.amazonaws.com",
+"s3-website-ap-southeast-2.amazonaws.com",
+"s3-website-eu-west-1.amazonaws.com",
+"s3-website-sa-east-1.amazonaws.com",
+"s3-website.ap-northeast-2.amazonaws.com",
+"s3-website.ap-south-1.amazonaws.com",
+"s3-website.ca-central-1.amazonaws.com",
+"s3-website.eu-central-1.amazonaws.com",
+"s3-website.eu-west-2.amazonaws.com",
+"s3-website.eu-west-3.amazonaws.com",
+"s3-website.us-east-2.amazonaws.com",
+"amsw.nl",
+"t3l3p0rt.net",
+"tele.amune.org",
+"apigee.io",
+"on-aptible.com",
+"user.aseinet.ne.jp",
+"gv.vc",
+"d.gv.vc",
+"user.party.eus",
+"pimienta.org",
+"poivron.org",
+"potager.org",
+"sweetpepper.org",
+"myasustor.com",
+"myfritz.net",
+"*.awdev.ca",
+"*.advisor.ws",
+"b-data.io",
+"backplaneapp.io",
+"balena-devices.com",
+"app.banzaicloud.io",
+"betainabox.com",
+"bnr.la",
+"blackbaudcdn.net",
+"boomla.net",
+"boxfuse.io",
+"square7.ch",
+"bplaced.com",
+"bplaced.de",
+"square7.de",
+"bplaced.net",
+"square7.net",
+"browsersafetymark.io",
+"uk0.bigv.io",
+"dh.bytemark.co.uk",
+"vm.bytemark.co.uk",
+"mycd.eu",
+"carrd.co",
+"crd.co",
+"uwu.ai",
+"ae.org",
+"ar.com",
+"br.com",
+"cn.com",
+"com.de",
+"com.se",
+"de.com",
+"eu.com",
+"gb.com",
+"gb.net",
+"hu.com",
+"hu.net",
+"jp.net",
+"jpn.com",
+"kr.com",
+"mex.com",
+"no.com",
+"qc.com",
+"ru.com",
+"sa.com",
+"se.net",
+"uk.com",
+"uk.net",
+"us.com",
+"uy.com",
+"za.bz",
+"za.com",
+"africa.com",
+"gr.com",
+"in.net",
+"us.org",
+"co.com",
+"c.la",
+"certmgr.org",
+"xenapponazure.com",
+"discourse.group",
+"discourse.team",
+"virtueeldomein.nl",
+"cleverapps.io",
+"*.lcl.dev",
+"*.stg.dev",
+"c66.me",
+"cloud66.ws",
+"cloud66.zone",
+"jdevcloud.com",
+"wpdevcloud.com",
+"cloudaccess.host",
+"freesite.host",
+"cloudaccess.net",
+"cloudcontrolled.com",
+"cloudcontrolapp.com",
+"cloudera.site",
+"trycloudflare.com",
+"workers.dev",
+"wnext.app",
+"co.ca",
+"*.otap.co",
+"co.cz",
+"c.cdn77.org",
+"cdn77-ssl.net",
+"r.cdn77.net",
+"rsc.cdn77.org",
+"ssl.origin.cdn77-secure.org",
+"cloudns.asia",
+"cloudns.biz",
+"cloudns.club",
+"cloudns.cc",
+"cloudns.eu",
+"cloudns.in",
+"cloudns.info",
+"cloudns.org",
+"cloudns.pro",
+"cloudns.pw",
+"cloudns.us",
+"cloudeity.net",
+"cnpy.gdn",
+"co.nl",
+"co.no",
+"webhosting.be",
+"hosting-cluster.nl",
+"ac.ru",
+"edu.ru",
+"gov.ru",
+"int.ru",
+"mil.ru",
+"test.ru",
+"dyn.cosidns.de",
+"dynamisches-dns.de",
+"dnsupdater.de",
+"internet-dns.de",
+"l-o-g-i-n.de",
+"dynamic-dns.info",
+"feste-ip.net",
+"knx-server.net",
+"static-access.net",
+"realm.cz",
+"*.cryptonomic.net",
+"cupcake.is",
+"*.customer-oci.com",
+"*.oci.customer-oci.com",
+"*.ocp.customer-oci.com",
+"*.ocs.customer-oci.com",
+"cyon.link",
+"cyon.site",
+"daplie.me",
+"localhost.daplie.me",
+"dattolocal.com",
+"dattorelay.com",
+"dattoweb.com",
+"mydatto.com",
+"dattolocal.net",
+"mydatto.net",
+"biz.dk",
+"co.dk",
+"firm.dk",
+"reg.dk",
+"store.dk",
+"*.dapps.earth",
+"*.bzz.dapps.earth",
+"builtwithdark.com",
+"edgestack.me",
+"debian.net",
+"dedyn.io",
+"dnshome.de",
+"online.th",
+"shop.th",
+"drayddns.com",
+"dreamhosters.com",
+"mydrobo.com",
+"drud.io",
+"drud.us",
+"duckdns.org",
+"dy.fi",
+"tunk.org",
+"dyndns-at-home.com",
+"dyndns-at-work.com",
+"dyndns-blog.com",
+"dyndns-free.com",
+"dyndns-home.com",
+"dyndns-ip.com",
+"dyndns-mail.com",
+"dyndns-office.com",
+"dyndns-pics.com",
+"dyndns-remote.com",
+"dyndns-server.com",
+"dyndns-web.com",
+"dyndns-wiki.com",
+"dyndns-work.com",
+"dyndns.biz",
+"dyndns.info",
+"dyndns.org",
+"dyndns.tv",
+"at-band-camp.net",
+"ath.cx",
+"barrel-of-knowledge.info",
+"barrell-of-knowledge.info",
+"better-than.tv",
+"blogdns.com",
+"blogdns.net",
+"blogdns.org",
+"blogsite.org",
+"boldlygoingnowhere.org",
+"broke-it.net",
+"buyshouses.net",
+"cechire.com",
+"dnsalias.com",
+"dnsalias.net",
+"dnsalias.org",
+"dnsdojo.com",
+"dnsdojo.net",
+"dnsdojo.org",
+"does-it.net",
+"doesntexist.com",
+"doesntexist.org",
+"dontexist.com",
+"dontexist.net",
+"dontexist.org",
+"doomdns.com",
+"doomdns.org",
+"dvrdns.org",
+"dyn-o-saur.com",
+"dynalias.com",
+"dynalias.net",
+"dynalias.org",
+"dynathome.net",
+"dyndns.ws",
+"endofinternet.net",
+"endofinternet.org",
+"endoftheinternet.org",
+"est-a-la-maison.com",
+"est-a-la-masion.com",
+"est-le-patron.com",
+"est-mon-blogueur.com",
+"for-better.biz",
+"for-more.biz",
+"for-our.info",
+"for-some.biz",
+"for-the.biz",
+"forgot.her.name",
+"forgot.his.name",
+"from-ak.com",
+"from-al.com",
+"from-ar.com",
+"from-az.net",
+"from-ca.com",
+"from-co.net",
+"from-ct.com",
+"from-dc.com",
+"from-de.com",
+"from-fl.com",
+"from-ga.com",
+"from-hi.com",
+"from-ia.com",
+"from-id.com",
+"from-il.com",
+"from-in.com",
+"from-ks.com",
+"from-ky.com",
+"from-la.net",
+"from-ma.com",
+"from-md.com",
+"from-me.org",
+"from-mi.com",
+"from-mn.com",
+"from-mo.com",
+"from-ms.com",
+"from-mt.com",
+"from-nc.com",
+"from-nd.com",
+"from-ne.com",
+"from-nh.com",
+"from-nj.com",
+"from-nm.com",
+"from-nv.com",
+"from-ny.net",
+"from-oh.com",
+"from-ok.com",
+"from-or.com",
+"from-pa.com",
+"from-pr.com",
+"from-ri.com",
+"from-sc.com",
+"from-sd.com",
+"from-tn.com",
+"from-tx.com",
+"from-ut.com",
+"from-va.com",
+"from-vt.com",
+"from-wa.com",
+"from-wi.com",
+"from-wv.com",
+"from-wy.com",
+"ftpaccess.cc",
+"fuettertdasnetz.de",
+"game-host.org",
+"game-server.cc",
+"getmyip.com",
+"gets-it.net",
+"go.dyndns.org",
+"gotdns.com",
+"gotdns.org",
+"groks-the.info",
+"groks-this.info",
+"ham-radio-op.net",
+"here-for-more.info",
+"hobby-site.com",
+"hobby-site.org",
+"home.dyndns.org",
+"homedns.org",
+"homeftp.net",
+"homeftp.org",
+"homeip.net",
+"homelinux.com",
+"homelinux.net",
+"homelinux.org",
+"homeunix.com",
+"homeunix.net",
+"homeunix.org",
+"iamallama.com",
+"in-the-band.net",
+"is-a-anarchist.com",
+"is-a-blogger.com",
+"is-a-bookkeeper.com",
+"is-a-bruinsfan.org",
+"is-a-bulls-fan.com",
+"is-a-candidate.org",
+"is-a-caterer.com",
+"is-a-celticsfan.org",
+"is-a-chef.com",
+"is-a-chef.net",
+"is-a-chef.org",
+"is-a-conservative.com",
+"is-a-cpa.com",
+"is-a-cubicle-slave.com",
+"is-a-democrat.com",
+"is-a-designer.com",
+"is-a-doctor.com",
+"is-a-financialadvisor.com",
+"is-a-geek.com",
+"is-a-geek.net",
+"is-a-geek.org",
+"is-a-green.com",
+"is-a-guru.com",
+"is-a-hard-worker.com",
+"is-a-hunter.com",
+"is-a-knight.org",
+"is-a-landscaper.com",
+"is-a-lawyer.com",
+"is-a-liberal.com",
+"is-a-libertarian.com",
+"is-a-linux-user.org",
+"is-a-llama.com",
+"is-a-musician.com",
+"is-a-nascarfan.com",
+"is-a-nurse.com",
+"is-a-painter.com",
+"is-a-patsfan.org",
+"is-a-personaltrainer.com",
+"is-a-photographer.com",
+"is-a-player.com",
+"is-a-republican.com",
+"is-a-rockstar.com",
+"is-a-socialist.com",
+"is-a-soxfan.org",
+"is-a-student.com",
+"is-a-teacher.com",
+"is-a-techie.com",
+"is-a-therapist.com",
+"is-an-accountant.com",
+"is-an-actor.com",
+"is-an-actress.com",
+"is-an-anarchist.com",
+"is-an-artist.com",
+"is-an-engineer.com",
+"is-an-entertainer.com",
+"is-by.us",
+"is-certified.com",
+"is-found.org",
+"is-gone.com",
+"is-into-anime.com",
+"is-into-cars.com",
+"is-into-cartoons.com",
+"is-into-games.com",
+"is-leet.com",
+"is-lost.org",
+"is-not-certified.com",
+"is-saved.org",
+"is-slick.com",
+"is-uberleet.com",
+"is-very-bad.org",
+"is-very-evil.org",
+"is-very-good.org",
+"is-very-nice.org",
+"is-very-sweet.org",
+"is-with-theband.com",
+"isa-geek.com",
+"isa-geek.net",
+"isa-geek.org",
+"isa-hockeynut.com",
+"issmarterthanyou.com",
+"isteingeek.de",
+"istmein.de",
+"kicks-ass.net",
+"kicks-ass.org",
+"knowsitall.info",
+"land-4-sale.us",
+"lebtimnetz.de",
+"leitungsen.de",
+"likes-pie.com",
+"likescandy.com",
+"merseine.nu",
+"mine.nu",
+"misconfused.org",
+"mypets.ws",
+"myphotos.cc",
+"neat-url.com",
+"office-on-the.net",
+"on-the-web.tv",
+"podzone.net",
+"podzone.org",
+"readmyblog.org",
+"saves-the-whales.com",
+"scrapper-site.net",
+"scrapping.cc",
+"selfip.biz",
+"selfip.com",
+"selfip.info",
+"selfip.net",
+"selfip.org",
+"sells-for-less.com",
+"sells-for-u.com",
+"sells-it.net",
+"sellsyourhome.org",
+"servebbs.com",
+"servebbs.net",
+"servebbs.org",
+"serveftp.net",
+"serveftp.org",
+"servegame.org",
+"shacknet.nu",
+"simple-url.com",
+"space-to-rent.com",
+"stuff-4-sale.org",
+"stuff-4-sale.us",
+"teaches-yoga.com",
+"thruhere.net",
+"traeumtgerade.de",
+"webhop.biz",
+"webhop.info",
+"webhop.net",
+"webhop.org",
+"worse-than.tv",
+"writesthisblog.com",
+"ddnss.de",
+"dyn.ddnss.de",
+"dyndns.ddnss.de",
+"dyndns1.de",
+"dyn-ip24.de",
+"home-webserver.de",
+"dyn.home-webserver.de",
+"myhome-server.de",
+"ddnss.org",
+"definima.net",
+"definima.io",
+"bci.dnstrace.pro",
+"ddnsfree.com",
+"ddnsgeek.com",
+"giize.com",
+"gleeze.com",
+"kozow.com",
+"loseyourip.com",
+"ooguy.com",
+"theworkpc.com",
+"casacam.net",
+"dynu.net",
+"accesscam.org",
+"camdvr.org",
+"freeddns.org",
+"mywire.org",
+"webredirect.org",
+"myddns.rocks",
+"blogsite.xyz",
+"dynv6.net",
+"e4.cz",
+"en-root.fr",
+"mytuleap.com",
+"onred.one",
+"staging.onred.one",
+"enonic.io",
+"customer.enonic.io",
+"eu.org",
+"al.eu.org",
+"asso.eu.org",
+"at.eu.org",
+"au.eu.org",
+"be.eu.org",
+"bg.eu.org",
+"ca.eu.org",
+"cd.eu.org",
+"ch.eu.org",
+"cn.eu.org",
+"cy.eu.org",
+"cz.eu.org",
+"de.eu.org",
+"dk.eu.org",
+"edu.eu.org",
+"ee.eu.org",
+"es.eu.org",
+"fi.eu.org",
+"fr.eu.org",
+"gr.eu.org",
+"hr.eu.org",
+"hu.eu.org",
+"ie.eu.org",
+"il.eu.org",
+"in.eu.org",
+"int.eu.org",
+"is.eu.org",
+"it.eu.org",
+"jp.eu.org",
+"kr.eu.org",
+"lt.eu.org",
+"lu.eu.org",
+"lv.eu.org",
+"mc.eu.org",
+"me.eu.org",
+"mk.eu.org",
+"mt.eu.org",
+"my.eu.org",
+"net.eu.org",
+"ng.eu.org",
+"nl.eu.org",
+"no.eu.org",
+"nz.eu.org",
+"paris.eu.org",
+"pl.eu.org",
+"pt.eu.org",
+"q-a.eu.org",
+"ro.eu.org",
+"ru.eu.org",
+"se.eu.org",
+"si.eu.org",
+"sk.eu.org",
+"tr.eu.org",
+"uk.eu.org",
+"us.eu.org",
+"eu-1.evennode.com",
+"eu-2.evennode.com",
+"eu-3.evennode.com",
+"eu-4.evennode.com",
+"us-1.evennode.com",
+"us-2.evennode.com",
+"us-3.evennode.com",
+"us-4.evennode.com",
+"twmail.cc",
+"twmail.net",
+"twmail.org",
+"mymailer.com.tw",
+"url.tw",
+"apps.fbsbx.com",
+"ru.net",
+"adygeya.ru",
+"bashkiria.ru",
+"bir.ru",
+"cbg.ru",
+"com.ru",
+"dagestan.ru",
+"grozny.ru",
+"kalmykia.ru",
+"kustanai.ru",
+"marine.ru",
+"mordovia.ru",
+"msk.ru",
+"mytis.ru",
+"nalchik.ru",
+"nov.ru",
+"pyatigorsk.ru",
+"spb.ru",
+"vladikavkaz.ru",
+"vladimir.ru",
+"abkhazia.su",
+"adygeya.su",
+"aktyubinsk.su",
+"arkhangelsk.su",
+"armenia.su",
+"ashgabad.su",
+"azerbaijan.su",
+"balashov.su",
+"bashkiria.su",
+"bryansk.su",
+"bukhara.su",
+"chimkent.su",
+"dagestan.su",
+"east-kazakhstan.su",
+"exnet.su",
+"georgia.su",
+"grozny.su",
+"ivanovo.su",
+"jambyl.su",
+"kalmykia.su",
+"kaluga.su",
+"karacol.su",
+"karaganda.su",
+"karelia.su",
+"khakassia.su",
+"krasnodar.su",
+"kurgan.su",
+"kustanai.su",
+"lenug.su",
+"mangyshlak.su",
+"mordovia.su",
+"msk.su",
+"murmansk.su",
+"nalchik.su",
+"navoi.su",
+"north-kazakhstan.su",
+"nov.su",
+"obninsk.su",
+"penza.su",
+"pokrovsk.su",
+"sochi.su",
+"spb.su",
+"tashkent.su",
+"termez.su",
+"togliatti.su",
+"troitsk.su",
+"tselinograd.su",
+"tula.su",
+"tuva.su",
+"vladikavkaz.su",
+"vladimir.su",
+"vologda.su",
+"channelsdvr.net",
+"u.channelsdvr.net",
+"fastly-terrarium.com",
+"fastlylb.net",
+"map.fastlylb.net",
+"freetls.fastly.net",
+"map.fastly.net",
+"a.prod.fastly.net",
+"global.prod.fastly.net",
+"a.ssl.fastly.net",
+"b.ssl.fastly.net",
+"global.ssl.fastly.net",
+"fastpanel.direct",
+"fastvps-server.com",
+"fhapp.xyz",
+"fedorainfracloud.org",
+"fedorapeople.org",
+"cloud.fedoraproject.org",
+"app.os.fedoraproject.org",
+"app.os.stg.fedoraproject.org",
+"mydobiss.com",
+"filegear.me",
+"filegear-au.me",
+"filegear-de.me",
+"filegear-gb.me",
+"filegear-ie.me",
+"filegear-jp.me",
+"filegear-sg.me",
+"firebaseapp.com",
+"flynnhub.com",
+"flynnhosting.net",
+"0e.vc",
+"freebox-os.com",
+"freeboxos.com",
+"fbx-os.fr",
+"fbxos.fr",
+"freebox-os.fr",
+"freeboxos.fr",
+"freedesktop.org",
+"*.futurecms.at",
+"*.ex.futurecms.at",
+"*.in.futurecms.at",
+"futurehosting.at",
+"futuremailing.at",
+"*.ex.ortsinfo.at",
+"*.kunden.ortsinfo.at",
+"*.statics.cloud",
+"service.gov.uk",
+"gehirn.ne.jp",
+"usercontent.jp",
+"gentapps.com",
+"lab.ms",
+"github.io",
+"githubusercontent.com",
+"gitlab.io",
+"glitch.me",
+"lolipop.io",
+"cloudapps.digital",
+"london.cloudapps.digital",
+"homeoffice.gov.uk",
+"ro.im",
+"shop.ro",
+"goip.de",
+"run.app",
+"a.run.app",
+"web.app",
+"*.0emm.com",
+"appspot.com",
+"*.r.appspot.com",
+"blogspot.ae",
+"blogspot.al",
+"blogspot.am",
+"blogspot.ba",
+"blogspot.be",
+"blogspot.bg",
+"blogspot.bj",
+"blogspot.ca",
+"blogspot.cf",
+"blogspot.ch",
+"blogspot.cl",
+"blogspot.co.at",
+"blogspot.co.id",
+"blogspot.co.il",
+"blogspot.co.ke",
+"blogspot.co.nz",
+"blogspot.co.uk",
+"blogspot.co.za",
+"blogspot.com",
+"blogspot.com.ar",
+"blogspot.com.au",
+"blogspot.com.br",
+"blogspot.com.by",
+"blogspot.com.co",
+"blogspot.com.cy",
+"blogspot.com.ee",
+"blogspot.com.eg",
+"blogspot.com.es",
+"blogspot.com.mt",
+"blogspot.com.ng",
+"blogspot.com.tr",
+"blogspot.com.uy",
+"blogspot.cv",
+"blogspot.cz",
+"blogspot.de",
+"blogspot.dk",
+"blogspot.fi",
+"blogspot.fr",
+"blogspot.gr",
+"blogspot.hk",
+"blogspot.hr",
+"blogspot.hu",
+"blogspot.ie",
+"blogspot.in",
+"blogspot.is",
+"blogspot.it",
+"blogspot.jp",
+"blogspot.kr",
+"blogspot.li",
+"blogspot.lt",
+"blogspot.lu",
+"blogspot.md",
+"blogspot.mk",
+"blogspot.mr",
+"blogspot.mx",
+"blogspot.my",
+"blogspot.nl",
+"blogspot.no",
+"blogspot.pe",
+"blogspot.pt",
+"blogspot.qa",
+"blogspot.re",
+"blogspot.ro",
+"blogspot.rs",
+"blogspot.ru",
+"blogspot.se",
+"blogspot.sg",
+"blogspot.si",
+"blogspot.sk",
+"blogspot.sn",
+"blogspot.td",
+"blogspot.tw",
+"blogspot.ug",
+"blogspot.vn",
+"cloudfunctions.net",
+"cloud.goog",
+"codespot.com",
+"googleapis.com",
+"googlecode.com",
+"pagespeedmobilizer.com",
+"publishproxy.com",
+"withgoogle.com",
+"withyoutube.com",
+"awsmppl.com",
+"fin.ci",
+"free.hr",
+"caa.li",
+"ua.rs",
+"conf.se",
+"hs.zone",
+"hs.run",
+"hashbang.sh",
+"hasura.app",
+"hasura-app.io",
+"hepforge.org",
+"herokuapp.com",
+"herokussl.com",
+"myravendb.com",
+"ravendb.community",
+"ravendb.me",
+"development.run",
+"ravendb.run",
+"bpl.biz",
+"orx.biz",
+"ng.city",
+"biz.gl",
+"ng.ink",
+"col.ng",
+"firm.ng",
+"gen.ng",
+"ltd.ng",
+"ngo.ng",
+"ng.school",
+"sch.so",
+"häkkinen.fi",
+"*.moonscale.io",
+"moonscale.net",
+"iki.fi",
+"dyn-berlin.de",
+"in-berlin.de",
+"in-brb.de",
+"in-butter.de",
+"in-dsl.de",
+"in-dsl.net",
+"in-dsl.org",
+"in-vpn.de",
+"in-vpn.net",
+"in-vpn.org",
+"biz.at",
+"info.at",
+"info.cx",
+"ac.leg.br",
+"al.leg.br",
+"am.leg.br",
+"ap.leg.br",
+"ba.leg.br",
+"ce.leg.br",
+"df.leg.br",
+"es.leg.br",
+"go.leg.br",
+"ma.leg.br",
+"mg.leg.br",
+"ms.leg.br",
+"mt.leg.br",
+"pa.leg.br",
+"pb.leg.br",
+"pe.leg.br",
+"pi.leg.br",
+"pr.leg.br",
+"rj.leg.br",
+"rn.leg.br",
+"ro.leg.br",
+"rr.leg.br",
+"rs.leg.br",
+"sc.leg.br",
+"se.leg.br",
+"sp.leg.br",
+"to.leg.br",
+"pixolino.com",
+"ipifony.net",
+"mein-iserv.de",
+"test-iserv.de",
+"iserv.dev",
+"iobb.net",
+"myjino.ru",
+"*.hosting.myjino.ru",
+"*.landing.myjino.ru",
+"*.spectrum.myjino.ru",
+"*.vps.myjino.ru",
+"*.triton.zone",
+"*.cns.joyent.com",
+"js.org",
+"kaas.gg",
+"khplay.nl",
+"keymachine.de",
+"kinghost.net",
+"uni5.net",
+"knightpoint.systems",
+"oya.to",
+"co.krd",
+"edu.krd",
+"git-repos.de",
+"lcube-server.de",
+"svn-repos.de",
+"leadpages.co",
+"lpages.co",
+"lpusercontent.com",
+"lelux.site",
+"co.business",
+"co.education",
+"co.events",
+"co.financial",
+"co.network",
+"co.place",
+"co.technology",
+"app.lmpm.com",
+"linkitools.space",
+"linkyard.cloud",
+"linkyard-cloud.ch",
+"members.linode.com",
+"nodebalancer.linode.com",
+"we.bs",
+"loginline.app",
+"loginline.dev",
+"loginline.io",
+"loginline.services",
+"loginline.site",
+"krasnik.pl",
+"leczna.pl",
+"lubartow.pl",
+"lublin.pl",
+"poniatowa.pl",
+"swidnik.pl",
+"uklugs.org",
+"glug.org.uk",
+"lug.org.uk",
+"lugs.org.uk",
+"barsy.bg",
+"barsy.co.uk",
+"barsyonline.co.uk",
+"barsycenter.com",
+"barsyonline.com",
+"barsy.club",
+"barsy.de",
+"barsy.eu",
+"barsy.in",
+"barsy.info",
+"barsy.io",
+"barsy.me",
+"barsy.menu",
+"barsy.mobi",
+"barsy.net",
+"barsy.online",
+"barsy.org",
+"barsy.pro",
+"barsy.pub",
+"barsy.shop",
+"barsy.site",
+"barsy.support",
+"barsy.uk",
+"*.magentosite.cloud",
+"mayfirst.info",
+"mayfirst.org",
+"hb.cldmail.ru",
+"miniserver.com",
+"memset.net",
+"cloud.metacentrum.cz",
+"custom.metacentrum.cz",
+"flt.cloud.muni.cz",
+"usr.cloud.muni.cz",
+"meteorapp.com",
+"eu.meteorapp.com",
+"co.pl",
+"azurecontainer.io",
+"azurewebsites.net",
+"azure-mobile.net",
+"cloudapp.net",
+"mozilla-iot.org",
+"bmoattachments.org",
+"net.ru",
+"org.ru",
+"pp.ru",
+"ui.nabu.casa",
+"pony.club",
+"of.fashion",
+"on.fashion",
+"of.football",
+"in.london",
+"of.london",
+"for.men",
+"and.mom",
+"for.mom",
+"for.one",
+"for.sale",
+"of.work",
+"to.work",
+"nctu.me",
+"bitballoon.com",
+"netlify.com",
+"4u.com",
+"ngrok.io",
+"nh-serv.co.uk",
+"nfshost.com",
+"dnsking.ch",
+"mypi.co",
+"n4t.co",
+"001www.com",
+"ddnslive.com",
+"myiphost.com",
+"forumz.info",
+"16-b.it",
+"32-b.it",
+"64-b.it",
+"soundcast.me",
+"tcp4.me",
+"dnsup.net",
+"hicam.net",
+"now-dns.net",
+"ownip.net",
+"vpndns.net",
+"dynserv.org",
+"now-dns.org",
+"x443.pw",
+"now-dns.top",
+"ntdll.top",
+"freeddns.us",
+"crafting.xyz",
+"zapto.xyz",
+"nsupdate.info",
+"nerdpol.ovh",
+"blogsyte.com",
+"brasilia.me",
+"cable-modem.org",
+"ciscofreak.com",
+"collegefan.org",
+"couchpotatofries.org",
+"damnserver.com",
+"ddns.me",
+"ditchyourip.com",
+"dnsfor.me",
+"dnsiskinky.com",
+"dvrcam.info",
+"dynns.com",
+"eating-organic.net",
+"fantasyleague.cc",
+"geekgalaxy.com",
+"golffan.us",
+"health-carereform.com",
+"homesecuritymac.com",
+"homesecuritypc.com",
+"hopto.me",
+"ilovecollege.info",
+"loginto.me",
+"mlbfan.org",
+"mmafan.biz",
+"myactivedirectory.com",
+"mydissent.net",
+"myeffect.net",
+"mymediapc.net",
+"mypsx.net",
+"mysecuritycamera.com",
+"mysecuritycamera.net",
+"mysecuritycamera.org",
+"net-freaks.com",
+"nflfan.org",
+"nhlfan.net",
+"no-ip.ca",
+"no-ip.co.uk",
+"no-ip.net",
+"noip.us",
+"onthewifi.com",
+"pgafan.net",
+"point2this.com",
+"pointto.us",
+"privatizehealthinsurance.net",
+"quicksytes.com",
+"read-books.org",
+"securitytactics.com",
+"serveexchange.com",
+"servehumour.com",
+"servep2p.com",
+"servesarcasm.com",
+"stufftoread.com",
+"ufcfan.org",
+"unusualperson.com",
+"workisboring.com",
+"3utilities.com",
+"bounceme.net",
+"ddns.net",
+"ddnsking.com",
+"gotdns.ch",
+"hopto.org",
+"myftp.biz",
+"myftp.org",
+"myvnc.com",
+"no-ip.biz",
+"no-ip.info",
+"no-ip.org",
+"noip.me",
+"redirectme.net",
+"servebeer.com",
+"serveblog.net",
+"servecounterstrike.com",
+"serveftp.com",
+"servegame.com",
+"servehalflife.com",
+"servehttp.com",
+"serveirc.com",
+"serveminecraft.net",
+"servemp3.com",
+"servepics.com",
+"servequake.com",
+"sytes.net",
+"webhop.me",
+"zapto.org",
+"stage.nodeart.io",
+"nodum.co",
+"nodum.io",
+"pcloud.host",
+"nyc.mn",
+"nom.ae",
+"nom.af",
+"nom.ai",
+"nom.al",
+"nym.by",
+"nom.bz",
+"nym.bz",
+"nom.cl",
+"nym.ec",
+"nom.gd",
+"nom.ge",
+"nom.gl",
+"nym.gr",
+"nom.gt",
+"nym.gy",
+"nym.hk",
+"nom.hn",
+"nym.ie",
+"nom.im",
+"nom.ke",
+"nym.kz",
+"nym.la",
+"nym.lc",
+"nom.li",
+"nym.li",
+"nym.lt",
+"nym.lu",
+"nom.lv",
+"nym.me",
+"nom.mk",
+"nym.mn",
+"nym.mx",
+"nom.nu",
+"nym.nz",
+"nym.pe",
+"nym.pt",
+"nom.pw",
+"nom.qa",
+"nym.ro",
+"nom.rs",
+"nom.si",
+"nym.sk",
+"nom.st",
+"nym.su",
+"nym.sx",
+"nom.tj",
+"nym.tw",
+"nom.ug",
+"nom.uy",
+"nom.vc",
+"nom.vg",
+"static.observableusercontent.com",
+"cya.gg",
+"cloudycluster.net",
+"nid.io",
+"opencraft.hosting",
+"operaunite.com",
+"skygearapp.com",
+"outsystemscloud.com",
+"ownprovider.com",
+"own.pm",
+"ox.rs",
+"oy.lc",
+"pgfog.com",
+"pagefrontapp.com",
+"art.pl",
+"gliwice.pl",
+"krakow.pl",
+"poznan.pl",
+"wroc.pl",
+"zakopane.pl",
+"pantheonsite.io",
+"gotpantheon.com",
+"mypep.link",
+"perspecta.cloud",
+"on-web.fr",
+"*.platform.sh",
+"*.platformsh.site",
+"dyn53.io",
+"co.bn",
+"xen.prgmr.com",
+"priv.at",
+"prvcy.page",
+"*.dweb.link",
+"protonet.io",
+"chirurgiens-dentistes-en-france.fr",
+"byen.site",
+"pubtls.org",
+"qualifioapp.com",
+"qbuser.com",
+"instantcloud.cn",
+"ras.ru",
+"qa2.com",
+"qcx.io",
+"*.sys.qcx.io",
+"dev-myqnapcloud.com",
+"alpha-myqnapcloud.com",
+"myqnapcloud.com",
+"*.quipelements.com",
+"vapor.cloud",
+"vaporcloud.io",
+"rackmaze.com",
+"rackmaze.net",
+"*.on-k3s.io",
+"*.on-rancher.cloud",
+"*.on-rio.io",
+"readthedocs.io",
+"rhcloud.com",
+"app.render.com",
+"onrender.com",
+"repl.co",
+"repl.run",
+"resindevice.io",
+"devices.resinstaging.io",
+"hzc.io",
+"wellbeingzone.eu",
+"ptplus.fit",
+"wellbeingzone.co.uk",
+"git-pages.rit.edu",
+"sandcats.io",
+"logoip.de",
+"logoip.com",
+"schokokeks.net",
+"gov.scot",
+"scrysec.com",
+"firewall-gateway.com",
+"firewall-gateway.de",
+"my-gateway.de",
+"my-router.de",
+"spdns.de",
+"spdns.eu",
+"firewall-gateway.net",
+"my-firewall.org",
+"myfirewall.org",
+"spdns.org",
+"senseering.net",
+"biz.ua",
+"co.ua",
+"pp.ua",
+"shiftedit.io",
+"myshopblocks.com",
+"shopitsite.com",
+"mo-siemens.io",
+"1kapp.com",
+"appchizi.com",
+"applinzi.com",
+"sinaapp.com",
+"vipsinaapp.com",
+"siteleaf.net",
+"bounty-full.com",
+"alpha.bounty-full.com",
+"beta.bounty-full.com",
+"stackhero-network.com",
+"static.land",
+"dev.static.land",
+"sites.static.land",
+"apps.lair.io",
+"*.stolos.io",
+"spacekit.io",
+"customer.speedpartner.de",
+"api.stdlib.com",
+"storj.farm",
+"utwente.io",
+"soc.srcf.net",
+"user.srcf.net",
+"temp-dns.com",
+"applicationcloud.io",
+"scapp.io",
+"*.s5y.io",
+"*.sensiosite.cloud",
+"syncloud.it",
+"diskstation.me",
+"dscloud.biz",
+"dscloud.me",
+"dscloud.mobi",
+"dsmynas.com",
+"dsmynas.net",
+"dsmynas.org",
+"familyds.com",
+"familyds.net",
+"familyds.org",
+"i234.me",
+"myds.me",
+"synology.me",
+"vpnplus.to",
+"direct.quickconnect.to",
+"taifun-dns.de",
+"gda.pl",
+"gdansk.pl",
+"gdynia.pl",
+"med.pl",
+"sopot.pl",
+"edugit.org",
+"telebit.app",
+"telebit.io",
+"*.telebit.xyz",
+"gwiddle.co.uk",
+"thingdustdata.com",
+"cust.dev.thingdust.io",
+"cust.disrec.thingdust.io",
+"cust.prod.thingdust.io",
+"cust.testing.thingdust.io",
+"arvo.network",
+"azimuth.network",
+"bloxcms.com",
+"townnews-staging.com",
+"12hp.at",
+"2ix.at",
+"4lima.at",
+"lima-city.at",
+"12hp.ch",
+"2ix.ch",
+"4lima.ch",
+"lima-city.ch",
+"trafficplex.cloud",
+"de.cool",
+"12hp.de",
+"2ix.de",
+"4lima.de",
+"lima-city.de",
+"1337.pictures",
+"clan.rip",
+"lima-city.rocks",
+"webspace.rocks",
+"lima.zone",
+"*.transurl.be",
+"*.transurl.eu",
+"*.transurl.nl",
+"tuxfamily.org",
+"dd-dns.de",
+"diskstation.eu",
+"diskstation.org",
+"dray-dns.de",
+"draydns.de",
+"dyn-vpn.de",
+"dynvpn.de",
+"mein-vigor.de",
+"my-vigor.de",
+"my-wan.de",
+"syno-ds.de",
+"synology-diskstation.de",
+"synology-ds.de",
+"uber.space",
+"*.uberspace.de",
+"hk.com",
+"hk.org",
+"ltd.hk",
+"inc.hk",
+"virtualuser.de",
+"virtual-user.de",
+"urown.cloud",
+"dnsupdate.info",
+"lib.de.us",
+"2038.io",
+"router.management",
+"v-info.info",
+"voorloper.cloud",
+"v.ua",
+"wafflecell.com",
+"*.webhare.dev",
+"wedeploy.io",
+"wedeploy.me",
+"wedeploy.sh",
+"remotewd.com",
+"wmflabs.org",
+"myforum.community",
+"community-pro.de",
+"diskussionsbereich.de",
+"community-pro.net",
+"meinforum.net",
+"half.host",
+"xnbay.com",
+"u2.xnbay.com",
+"u2-local.xnbay.com",
+"cistron.nl",
+"demon.nl",
+"xs4all.space",
+"yandexcloud.net",
+"storage.yandexcloud.net",
+"website.yandexcloud.net",
+"official.academy",
+"yolasite.com",
+"ybo.faith",
+"yombo.me",
+"homelink.one",
+"ybo.party",
+"ybo.review",
+"ybo.science",
+"ybo.trade",
+"nohost.me",
+"noho.st",
+"za.net",
+"za.org",
+"now.sh",
+"bss.design",
+"basicserver.io",
+"virtualserver.io",
+"enterprisecloud.nu"
+] \ No newline at end of file
diff --git a/node_modules/psl/dist/psl.js b/node_modules/psl/dist/psl.js
new file mode 100644
index 0000000..f4b9b89
--- /dev/null
+++ b/node_modules/psl/dist/psl.js
@@ -0,0 +1,9645 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.psl = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
+module.exports=[
+"ac",
+"com.ac",
+"edu.ac",
+"gov.ac",
+"net.ac",
+"mil.ac",
+"org.ac",
+"ad",
+"nom.ad",
+"ae",
+"co.ae",
+"net.ae",
+"org.ae",
+"sch.ae",
+"ac.ae",
+"gov.ae",
+"mil.ae",
+"aero",
+"accident-investigation.aero",
+"accident-prevention.aero",
+"aerobatic.aero",
+"aeroclub.aero",
+"aerodrome.aero",
+"agents.aero",
+"aircraft.aero",
+"airline.aero",
+"airport.aero",
+"air-surveillance.aero",
+"airtraffic.aero",
+"air-traffic-control.aero",
+"ambulance.aero",
+"amusement.aero",
+"association.aero",
+"author.aero",
+"ballooning.aero",
+"broker.aero",
+"caa.aero",
+"cargo.aero",
+"catering.aero",
+"certification.aero",
+"championship.aero",
+"charter.aero",
+"civilaviation.aero",
+"club.aero",
+"conference.aero",
+"consultant.aero",
+"consulting.aero",
+"control.aero",
+"council.aero",
+"crew.aero",
+"design.aero",
+"dgca.aero",
+"educator.aero",
+"emergency.aero",
+"engine.aero",
+"engineer.aero",
+"entertainment.aero",
+"equipment.aero",
+"exchange.aero",
+"express.aero",
+"federation.aero",
+"flight.aero",
+"freight.aero",
+"fuel.aero",
+"gliding.aero",
+"government.aero",
+"groundhandling.aero",
+"group.aero",
+"hanggliding.aero",
+"homebuilt.aero",
+"insurance.aero",
+"journal.aero",
+"journalist.aero",
+"leasing.aero",
+"logistics.aero",
+"magazine.aero",
+"maintenance.aero",
+"media.aero",
+"microlight.aero",
+"modelling.aero",
+"navigation.aero",
+"parachuting.aero",
+"paragliding.aero",
+"passenger-association.aero",
+"pilot.aero",
+"press.aero",
+"production.aero",
+"recreation.aero",
+"repbody.aero",
+"res.aero",
+"research.aero",
+"rotorcraft.aero",
+"safety.aero",
+"scientist.aero",
+"services.aero",
+"show.aero",
+"skydiving.aero",
+"software.aero",
+"student.aero",
+"trader.aero",
+"trading.aero",
+"trainer.aero",
+"union.aero",
+"workinggroup.aero",
+"works.aero",
+"af",
+"gov.af",
+"com.af",
+"org.af",
+"net.af",
+"edu.af",
+"ag",
+"com.ag",
+"org.ag",
+"net.ag",
+"co.ag",
+"nom.ag",
+"ai",
+"off.ai",
+"com.ai",
+"net.ai",
+"org.ai",
+"al",
+"com.al",
+"edu.al",
+"gov.al",
+"mil.al",
+"net.al",
+"org.al",
+"am",
+"co.am",
+"com.am",
+"commune.am",
+"net.am",
+"org.am",
+"ao",
+"ed.ao",
+"gv.ao",
+"og.ao",
+"co.ao",
+"pb.ao",
+"it.ao",
+"aq",
+"ar",
+"com.ar",
+"edu.ar",
+"gob.ar",
+"gov.ar",
+"int.ar",
+"mil.ar",
+"musica.ar",
+"net.ar",
+"org.ar",
+"tur.ar",
+"arpa",
+"e164.arpa",
+"in-addr.arpa",
+"ip6.arpa",
+"iris.arpa",
+"uri.arpa",
+"urn.arpa",
+"as",
+"gov.as",
+"asia",
+"at",
+"ac.at",
+"co.at",
+"gv.at",
+"or.at",
+"au",
+"com.au",
+"net.au",
+"org.au",
+"edu.au",
+"gov.au",
+"asn.au",
+"id.au",
+"info.au",
+"conf.au",
+"oz.au",
+"act.au",
+"nsw.au",
+"nt.au",
+"qld.au",
+"sa.au",
+"tas.au",
+"vic.au",
+"wa.au",
+"act.edu.au",
+"catholic.edu.au",
+"nsw.edu.au",
+"nt.edu.au",
+"qld.edu.au",
+"sa.edu.au",
+"tas.edu.au",
+"vic.edu.au",
+"wa.edu.au",
+"qld.gov.au",
+"sa.gov.au",
+"tas.gov.au",
+"vic.gov.au",
+"wa.gov.au",
+"education.tas.edu.au",
+"schools.nsw.edu.au",
+"aw",
+"com.aw",
+"ax",
+"az",
+"com.az",
+"net.az",
+"int.az",
+"gov.az",
+"org.az",
+"edu.az",
+"info.az",
+"pp.az",
+"mil.az",
+"name.az",
+"pro.az",
+"biz.az",
+"ba",
+"com.ba",
+"edu.ba",
+"gov.ba",
+"mil.ba",
+"net.ba",
+"org.ba",
+"bb",
+"biz.bb",
+"co.bb",
+"com.bb",
+"edu.bb",
+"gov.bb",
+"info.bb",
+"net.bb",
+"org.bb",
+"store.bb",
+"tv.bb",
+"*.bd",
+"be",
+"ac.be",
+"bf",
+"gov.bf",
+"bg",
+"a.bg",
+"b.bg",
+"c.bg",
+"d.bg",
+"e.bg",
+"f.bg",
+"g.bg",
+"h.bg",
+"i.bg",
+"j.bg",
+"k.bg",
+"l.bg",
+"m.bg",
+"n.bg",
+"o.bg",
+"p.bg",
+"q.bg",
+"r.bg",
+"s.bg",
+"t.bg",
+"u.bg",
+"v.bg",
+"w.bg",
+"x.bg",
+"y.bg",
+"z.bg",
+"0.bg",
+"1.bg",
+"2.bg",
+"3.bg",
+"4.bg",
+"5.bg",
+"6.bg",
+"7.bg",
+"8.bg",
+"9.bg",
+"bh",
+"com.bh",
+"edu.bh",
+"net.bh",
+"org.bh",
+"gov.bh",
+"bi",
+"co.bi",
+"com.bi",
+"edu.bi",
+"or.bi",
+"org.bi",
+"biz",
+"bj",
+"asso.bj",
+"barreau.bj",
+"gouv.bj",
+"bm",
+"com.bm",
+"edu.bm",
+"gov.bm",
+"net.bm",
+"org.bm",
+"bn",
+"com.bn",
+"edu.bn",
+"gov.bn",
+"net.bn",
+"org.bn",
+"bo",
+"com.bo",
+"edu.bo",
+"gob.bo",
+"int.bo",
+"org.bo",
+"net.bo",
+"mil.bo",
+"tv.bo",
+"web.bo",
+"academia.bo",
+"agro.bo",
+"arte.bo",
+"blog.bo",
+"bolivia.bo",
+"ciencia.bo",
+"cooperativa.bo",
+"democracia.bo",
+"deporte.bo",
+"ecologia.bo",
+"economia.bo",
+"empresa.bo",
+"indigena.bo",
+"industria.bo",
+"info.bo",
+"medicina.bo",
+"movimiento.bo",
+"musica.bo",
+"natural.bo",
+"nombre.bo",
+"noticias.bo",
+"patria.bo",
+"politica.bo",
+"profesional.bo",
+"plurinacional.bo",
+"pueblo.bo",
+"revista.bo",
+"salud.bo",
+"tecnologia.bo",
+"tksat.bo",
+"transporte.bo",
+"wiki.bo",
+"br",
+"9guacu.br",
+"abc.br",
+"adm.br",
+"adv.br",
+"agr.br",
+"aju.br",
+"am.br",
+"anani.br",
+"aparecida.br",
+"arq.br",
+"art.br",
+"ato.br",
+"b.br",
+"barueri.br",
+"belem.br",
+"bhz.br",
+"bio.br",
+"blog.br",
+"bmd.br",
+"boavista.br",
+"bsb.br",
+"campinagrande.br",
+"campinas.br",
+"caxias.br",
+"cim.br",
+"cng.br",
+"cnt.br",
+"com.br",
+"contagem.br",
+"coop.br",
+"cri.br",
+"cuiaba.br",
+"curitiba.br",
+"def.br",
+"ecn.br",
+"eco.br",
+"edu.br",
+"emp.br",
+"eng.br",
+"esp.br",
+"etc.br",
+"eti.br",
+"far.br",
+"feira.br",
+"flog.br",
+"floripa.br",
+"fm.br",
+"fnd.br",
+"fortal.br",
+"fot.br",
+"foz.br",
+"fst.br",
+"g12.br",
+"ggf.br",
+"goiania.br",
+"gov.br",
+"ac.gov.br",
+"al.gov.br",
+"am.gov.br",
+"ap.gov.br",
+"ba.gov.br",
+"ce.gov.br",
+"df.gov.br",
+"es.gov.br",
+"go.gov.br",
+"ma.gov.br",
+"mg.gov.br",
+"ms.gov.br",
+"mt.gov.br",
+"pa.gov.br",
+"pb.gov.br",
+"pe.gov.br",
+"pi.gov.br",
+"pr.gov.br",
+"rj.gov.br",
+"rn.gov.br",
+"ro.gov.br",
+"rr.gov.br",
+"rs.gov.br",
+"sc.gov.br",
+"se.gov.br",
+"sp.gov.br",
+"to.gov.br",
+"gru.br",
+"imb.br",
+"ind.br",
+"inf.br",
+"jab.br",
+"jampa.br",
+"jdf.br",
+"joinville.br",
+"jor.br",
+"jus.br",
+"leg.br",
+"lel.br",
+"londrina.br",
+"macapa.br",
+"maceio.br",
+"manaus.br",
+"maringa.br",
+"mat.br",
+"med.br",
+"mil.br",
+"morena.br",
+"mp.br",
+"mus.br",
+"natal.br",
+"net.br",
+"niteroi.br",
+"*.nom.br",
+"not.br",
+"ntr.br",
+"odo.br",
+"ong.br",
+"org.br",
+"osasco.br",
+"palmas.br",
+"poa.br",
+"ppg.br",
+"pro.br",
+"psc.br",
+"psi.br",
+"pvh.br",
+"qsl.br",
+"radio.br",
+"rec.br",
+"recife.br",
+"ribeirao.br",
+"rio.br",
+"riobranco.br",
+"riopreto.br",
+"salvador.br",
+"sampa.br",
+"santamaria.br",
+"santoandre.br",
+"saobernardo.br",
+"saogonca.br",
+"sjc.br",
+"slg.br",
+"slz.br",
+"sorocaba.br",
+"srv.br",
+"taxi.br",
+"tc.br",
+"teo.br",
+"the.br",
+"tmp.br",
+"trd.br",
+"tur.br",
+"tv.br",
+"udi.br",
+"vet.br",
+"vix.br",
+"vlog.br",
+"wiki.br",
+"zlg.br",
+"bs",
+"com.bs",
+"net.bs",
+"org.bs",
+"edu.bs",
+"gov.bs",
+"bt",
+"com.bt",
+"edu.bt",
+"gov.bt",
+"net.bt",
+"org.bt",
+"bv",
+"bw",
+"co.bw",
+"org.bw",
+"by",
+"gov.by",
+"mil.by",
+"com.by",
+"of.by",
+"bz",
+"com.bz",
+"net.bz",
+"org.bz",
+"edu.bz",
+"gov.bz",
+"ca",
+"ab.ca",
+"bc.ca",
+"mb.ca",
+"nb.ca",
+"nf.ca",
+"nl.ca",
+"ns.ca",
+"nt.ca",
+"nu.ca",
+"on.ca",
+"pe.ca",
+"qc.ca",
+"sk.ca",
+"yk.ca",
+"gc.ca",
+"cat",
+"cc",
+"cd",
+"gov.cd",
+"cf",
+"cg",
+"ch",
+"ci",
+"org.ci",
+"or.ci",
+"com.ci",
+"co.ci",
+"edu.ci",
+"ed.ci",
+"ac.ci",
+"net.ci",
+"go.ci",
+"asso.ci",
+"aéroport.ci",
+"int.ci",
+"presse.ci",
+"md.ci",
+"gouv.ci",
+"*.ck",
+"!www.ck",
+"cl",
+"aprendemas.cl",
+"co.cl",
+"gob.cl",
+"gov.cl",
+"mil.cl",
+"cm",
+"co.cm",
+"com.cm",
+"gov.cm",
+"net.cm",
+"cn",
+"ac.cn",
+"com.cn",
+"edu.cn",
+"gov.cn",
+"net.cn",
+"org.cn",
+"mil.cn",
+"公司.cn",
+"网络.cn",
+"網絡.cn",
+"ah.cn",
+"bj.cn",
+"cq.cn",
+"fj.cn",
+"gd.cn",
+"gs.cn",
+"gz.cn",
+"gx.cn",
+"ha.cn",
+"hb.cn",
+"he.cn",
+"hi.cn",
+"hl.cn",
+"hn.cn",
+"jl.cn",
+"js.cn",
+"jx.cn",
+"ln.cn",
+"nm.cn",
+"nx.cn",
+"qh.cn",
+"sc.cn",
+"sd.cn",
+"sh.cn",
+"sn.cn",
+"sx.cn",
+"tj.cn",
+"xj.cn",
+"xz.cn",
+"yn.cn",
+"zj.cn",
+"hk.cn",
+"mo.cn",
+"tw.cn",
+"co",
+"arts.co",
+"com.co",
+"edu.co",
+"firm.co",
+"gov.co",
+"info.co",
+"int.co",
+"mil.co",
+"net.co",
+"nom.co",
+"org.co",
+"rec.co",
+"web.co",
+"com",
+"coop",
+"cr",
+"ac.cr",
+"co.cr",
+"ed.cr",
+"fi.cr",
+"go.cr",
+"or.cr",
+"sa.cr",
+"cu",
+"com.cu",
+"edu.cu",
+"org.cu",
+"net.cu",
+"gov.cu",
+"inf.cu",
+"cv",
+"cw",
+"com.cw",
+"edu.cw",
+"net.cw",
+"org.cw",
+"cx",
+"gov.cx",
+"cy",
+"ac.cy",
+"biz.cy",
+"com.cy",
+"ekloges.cy",
+"gov.cy",
+"ltd.cy",
+"name.cy",
+"net.cy",
+"org.cy",
+"parliament.cy",
+"press.cy",
+"pro.cy",
+"tm.cy",
+"cz",
+"de",
+"dj",
+"dk",
+"dm",
+"com.dm",
+"net.dm",
+"org.dm",
+"edu.dm",
+"gov.dm",
+"do",
+"art.do",
+"com.do",
+"edu.do",
+"gob.do",
+"gov.do",
+"mil.do",
+"net.do",
+"org.do",
+"sld.do",
+"web.do",
+"dz",
+"com.dz",
+"org.dz",
+"net.dz",
+"gov.dz",
+"edu.dz",
+"asso.dz",
+"pol.dz",
+"art.dz",
+"ec",
+"com.ec",
+"info.ec",
+"net.ec",
+"fin.ec",
+"k12.ec",
+"med.ec",
+"pro.ec",
+"org.ec",
+"edu.ec",
+"gov.ec",
+"gob.ec",
+"mil.ec",
+"edu",
+"ee",
+"edu.ee",
+"gov.ee",
+"riik.ee",
+"lib.ee",
+"med.ee",
+"com.ee",
+"pri.ee",
+"aip.ee",
+"org.ee",
+"fie.ee",
+"eg",
+"com.eg",
+"edu.eg",
+"eun.eg",
+"gov.eg",
+"mil.eg",
+"name.eg",
+"net.eg",
+"org.eg",
+"sci.eg",
+"*.er",
+"es",
+"com.es",
+"nom.es",
+"org.es",
+"gob.es",
+"edu.es",
+"et",
+"com.et",
+"gov.et",
+"org.et",
+"edu.et",
+"biz.et",
+"name.et",
+"info.et",
+"net.et",
+"eu",
+"fi",
+"aland.fi",
+"fj",
+"ac.fj",
+"biz.fj",
+"com.fj",
+"gov.fj",
+"info.fj",
+"mil.fj",
+"name.fj",
+"net.fj",
+"org.fj",
+"pro.fj",
+"*.fk",
+"fm",
+"fo",
+"fr",
+"asso.fr",
+"com.fr",
+"gouv.fr",
+"nom.fr",
+"prd.fr",
+"tm.fr",
+"aeroport.fr",
+"avocat.fr",
+"avoues.fr",
+"cci.fr",
+"chambagri.fr",
+"chirurgiens-dentistes.fr",
+"experts-comptables.fr",
+"geometre-expert.fr",
+"greta.fr",
+"huissier-justice.fr",
+"medecin.fr",
+"notaires.fr",
+"pharmacien.fr",
+"port.fr",
+"veterinaire.fr",
+"ga",
+"gb",
+"gd",
+"ge",
+"com.ge",
+"edu.ge",
+"gov.ge",
+"org.ge",
+"mil.ge",
+"net.ge",
+"pvt.ge",
+"gf",
+"gg",
+"co.gg",
+"net.gg",
+"org.gg",
+"gh",
+"com.gh",
+"edu.gh",
+"gov.gh",
+"org.gh",
+"mil.gh",
+"gi",
+"com.gi",
+"ltd.gi",
+"gov.gi",
+"mod.gi",
+"edu.gi",
+"org.gi",
+"gl",
+"co.gl",
+"com.gl",
+"edu.gl",
+"net.gl",
+"org.gl",
+"gm",
+"gn",
+"ac.gn",
+"com.gn",
+"edu.gn",
+"gov.gn",
+"org.gn",
+"net.gn",
+"gov",
+"gp",
+"com.gp",
+"net.gp",
+"mobi.gp",
+"edu.gp",
+"org.gp",
+"asso.gp",
+"gq",
+"gr",
+"com.gr",
+"edu.gr",
+"net.gr",
+"org.gr",
+"gov.gr",
+"gs",
+"gt",
+"com.gt",
+"edu.gt",
+"gob.gt",
+"ind.gt",
+"mil.gt",
+"net.gt",
+"org.gt",
+"gu",
+"com.gu",
+"edu.gu",
+"gov.gu",
+"guam.gu",
+"info.gu",
+"net.gu",
+"org.gu",
+"web.gu",
+"gw",
+"gy",
+"co.gy",
+"com.gy",
+"edu.gy",
+"gov.gy",
+"net.gy",
+"org.gy",
+"hk",
+"com.hk",
+"edu.hk",
+"gov.hk",
+"idv.hk",
+"net.hk",
+"org.hk",
+"公司.hk",
+"教育.hk",
+"敎育.hk",
+"政府.hk",
+"個人.hk",
+"个人.hk",
+"箇人.hk",
+"網络.hk",
+"网络.hk",
+"组織.hk",
+"網絡.hk",
+"网絡.hk",
+"组织.hk",
+"組織.hk",
+"組织.hk",
+"hm",
+"hn",
+"com.hn",
+"edu.hn",
+"org.hn",
+"net.hn",
+"mil.hn",
+"gob.hn",
+"hr",
+"iz.hr",
+"from.hr",
+"name.hr",
+"com.hr",
+"ht",
+"com.ht",
+"shop.ht",
+"firm.ht",
+"info.ht",
+"adult.ht",
+"net.ht",
+"pro.ht",
+"org.ht",
+"med.ht",
+"art.ht",
+"coop.ht",
+"pol.ht",
+"asso.ht",
+"edu.ht",
+"rel.ht",
+"gouv.ht",
+"perso.ht",
+"hu",
+"co.hu",
+"info.hu",
+"org.hu",
+"priv.hu",
+"sport.hu",
+"tm.hu",
+"2000.hu",
+"agrar.hu",
+"bolt.hu",
+"casino.hu",
+"city.hu",
+"erotica.hu",
+"erotika.hu",
+"film.hu",
+"forum.hu",
+"games.hu",
+"hotel.hu",
+"ingatlan.hu",
+"jogasz.hu",
+"konyvelo.hu",
+"lakas.hu",
+"media.hu",
+"news.hu",
+"reklam.hu",
+"sex.hu",
+"shop.hu",
+"suli.hu",
+"szex.hu",
+"tozsde.hu",
+"utazas.hu",
+"video.hu",
+"id",
+"ac.id",
+"biz.id",
+"co.id",
+"desa.id",
+"go.id",
+"mil.id",
+"my.id",
+"net.id",
+"or.id",
+"ponpes.id",
+"sch.id",
+"web.id",
+"ie",
+"gov.ie",
+"il",
+"ac.il",
+"co.il",
+"gov.il",
+"idf.il",
+"k12.il",
+"muni.il",
+"net.il",
+"org.il",
+"im",
+"ac.im",
+"co.im",
+"com.im",
+"ltd.co.im",
+"net.im",
+"org.im",
+"plc.co.im",
+"tt.im",
+"tv.im",
+"in",
+"co.in",
+"firm.in",
+"net.in",
+"org.in",
+"gen.in",
+"ind.in",
+"nic.in",
+"ac.in",
+"edu.in",
+"res.in",
+"gov.in",
+"mil.in",
+"info",
+"int",
+"eu.int",
+"io",
+"com.io",
+"iq",
+"gov.iq",
+"edu.iq",
+"mil.iq",
+"com.iq",
+"org.iq",
+"net.iq",
+"ir",
+"ac.ir",
+"co.ir",
+"gov.ir",
+"id.ir",
+"net.ir",
+"org.ir",
+"sch.ir",
+"ایران.ir",
+"ايران.ir",
+"is",
+"net.is",
+"com.is",
+"edu.is",
+"gov.is",
+"org.is",
+"int.is",
+"it",
+"gov.it",
+"edu.it",
+"abr.it",
+"abruzzo.it",
+"aosta-valley.it",
+"aostavalley.it",
+"bas.it",
+"basilicata.it",
+"cal.it",
+"calabria.it",
+"cam.it",
+"campania.it",
+"emilia-romagna.it",
+"emiliaromagna.it",
+"emr.it",
+"friuli-v-giulia.it",
+"friuli-ve-giulia.it",
+"friuli-vegiulia.it",
+"friuli-venezia-giulia.it",
+"friuli-veneziagiulia.it",
+"friuli-vgiulia.it",
+"friuliv-giulia.it",
+"friulive-giulia.it",
+"friulivegiulia.it",
+"friulivenezia-giulia.it",
+"friuliveneziagiulia.it",
+"friulivgiulia.it",
+"fvg.it",
+"laz.it",
+"lazio.it",
+"lig.it",
+"liguria.it",
+"lom.it",
+"lombardia.it",
+"lombardy.it",
+"lucania.it",
+"mar.it",
+"marche.it",
+"mol.it",
+"molise.it",
+"piedmont.it",
+"piemonte.it",
+"pmn.it",
+"pug.it",
+"puglia.it",
+"sar.it",
+"sardegna.it",
+"sardinia.it",
+"sic.it",
+"sicilia.it",
+"sicily.it",
+"taa.it",
+"tos.it",
+"toscana.it",
+"trentin-sud-tirol.it",
+"trentin-süd-tirol.it",
+"trentin-sudtirol.it",
+"trentin-südtirol.it",
+"trentin-sued-tirol.it",
+"trentin-suedtirol.it",
+"trentino-a-adige.it",
+"trentino-aadige.it",
+"trentino-alto-adige.it",
+"trentino-altoadige.it",
+"trentino-s-tirol.it",
+"trentino-stirol.it",
+"trentino-sud-tirol.it",
+"trentino-süd-tirol.it",
+"trentino-sudtirol.it",
+"trentino-südtirol.it",
+"trentino-sued-tirol.it",
+"trentino-suedtirol.it",
+"trentino.it",
+"trentinoa-adige.it",
+"trentinoaadige.it",
+"trentinoalto-adige.it",
+"trentinoaltoadige.it",
+"trentinos-tirol.it",
+"trentinostirol.it",
+"trentinosud-tirol.it",
+"trentinosüd-tirol.it",
+"trentinosudtirol.it",
+"trentinosüdtirol.it",
+"trentinosued-tirol.it",
+"trentinosuedtirol.it",
+"trentinsud-tirol.it",
+"trentinsüd-tirol.it",
+"trentinsudtirol.it",
+"trentinsüdtirol.it",
+"trentinsued-tirol.it",
+"trentinsuedtirol.it",
+"tuscany.it",
+"umb.it",
+"umbria.it",
+"val-d-aosta.it",
+"val-daosta.it",
+"vald-aosta.it",
+"valdaosta.it",
+"valle-aosta.it",
+"valle-d-aosta.it",
+"valle-daosta.it",
+"valleaosta.it",
+"valled-aosta.it",
+"valledaosta.it",
+"vallee-aoste.it",
+"vallée-aoste.it",
+"vallee-d-aoste.it",
+"vallée-d-aoste.it",
+"valleeaoste.it",
+"valléeaoste.it",
+"valleedaoste.it",
+"valléedaoste.it",
+"vao.it",
+"vda.it",
+"ven.it",
+"veneto.it",
+"ag.it",
+"agrigento.it",
+"al.it",
+"alessandria.it",
+"alto-adige.it",
+"altoadige.it",
+"an.it",
+"ancona.it",
+"andria-barletta-trani.it",
+"andria-trani-barletta.it",
+"andriabarlettatrani.it",
+"andriatranibarletta.it",
+"ao.it",
+"aosta.it",
+"aoste.it",
+"ap.it",
+"aq.it",
+"aquila.it",
+"ar.it",
+"arezzo.it",
+"ascoli-piceno.it",
+"ascolipiceno.it",
+"asti.it",
+"at.it",
+"av.it",
+"avellino.it",
+"ba.it",
+"balsan-sudtirol.it",
+"balsan-südtirol.it",
+"balsan-suedtirol.it",
+"balsan.it",
+"bari.it",
+"barletta-trani-andria.it",
+"barlettatraniandria.it",
+"belluno.it",
+"benevento.it",
+"bergamo.it",
+"bg.it",
+"bi.it",
+"biella.it",
+"bl.it",
+"bn.it",
+"bo.it",
+"bologna.it",
+"bolzano-altoadige.it",
+"bolzano.it",
+"bozen-sudtirol.it",
+"bozen-südtirol.it",
+"bozen-suedtirol.it",
+"bozen.it",
+"br.it",
+"brescia.it",
+"brindisi.it",
+"bs.it",
+"bt.it",
+"bulsan-sudtirol.it",
+"bulsan-südtirol.it",
+"bulsan-suedtirol.it",
+"bulsan.it",
+"bz.it",
+"ca.it",
+"cagliari.it",
+"caltanissetta.it",
+"campidano-medio.it",
+"campidanomedio.it",
+"campobasso.it",
+"carbonia-iglesias.it",
+"carboniaiglesias.it",
+"carrara-massa.it",
+"carraramassa.it",
+"caserta.it",
+"catania.it",
+"catanzaro.it",
+"cb.it",
+"ce.it",
+"cesena-forli.it",
+"cesena-forlì.it",
+"cesenaforli.it",
+"cesenaforlì.it",
+"ch.it",
+"chieti.it",
+"ci.it",
+"cl.it",
+"cn.it",
+"co.it",
+"como.it",
+"cosenza.it",
+"cr.it",
+"cremona.it",
+"crotone.it",
+"cs.it",
+"ct.it",
+"cuneo.it",
+"cz.it",
+"dell-ogliastra.it",
+"dellogliastra.it",
+"en.it",
+"enna.it",
+"fc.it",
+"fe.it",
+"fermo.it",
+"ferrara.it",
+"fg.it",
+"fi.it",
+"firenze.it",
+"florence.it",
+"fm.it",
+"foggia.it",
+"forli-cesena.it",
+"forlì-cesena.it",
+"forlicesena.it",
+"forlìcesena.it",
+"fr.it",
+"frosinone.it",
+"ge.it",
+"genoa.it",
+"genova.it",
+"go.it",
+"gorizia.it",
+"gr.it",
+"grosseto.it",
+"iglesias-carbonia.it",
+"iglesiascarbonia.it",
+"im.it",
+"imperia.it",
+"is.it",
+"isernia.it",
+"kr.it",
+"la-spezia.it",
+"laquila.it",
+"laspezia.it",
+"latina.it",
+"lc.it",
+"le.it",
+"lecce.it",
+"lecco.it",
+"li.it",
+"livorno.it",
+"lo.it",
+"lodi.it",
+"lt.it",
+"lu.it",
+"lucca.it",
+"macerata.it",
+"mantova.it",
+"massa-carrara.it",
+"massacarrara.it",
+"matera.it",
+"mb.it",
+"mc.it",
+"me.it",
+"medio-campidano.it",
+"mediocampidano.it",
+"messina.it",
+"mi.it",
+"milan.it",
+"milano.it",
+"mn.it",
+"mo.it",
+"modena.it",
+"monza-brianza.it",
+"monza-e-della-brianza.it",
+"monza.it",
+"monzabrianza.it",
+"monzaebrianza.it",
+"monzaedellabrianza.it",
+"ms.it",
+"mt.it",
+"na.it",
+"naples.it",
+"napoli.it",
+"no.it",
+"novara.it",
+"nu.it",
+"nuoro.it",
+"og.it",
+"ogliastra.it",
+"olbia-tempio.it",
+"olbiatempio.it",
+"or.it",
+"oristano.it",
+"ot.it",
+"pa.it",
+"padova.it",
+"padua.it",
+"palermo.it",
+"parma.it",
+"pavia.it",
+"pc.it",
+"pd.it",
+"pe.it",
+"perugia.it",
+"pesaro-urbino.it",
+"pesarourbino.it",
+"pescara.it",
+"pg.it",
+"pi.it",
+"piacenza.it",
+"pisa.it",
+"pistoia.it",
+"pn.it",
+"po.it",
+"pordenone.it",
+"potenza.it",
+"pr.it",
+"prato.it",
+"pt.it",
+"pu.it",
+"pv.it",
+"pz.it",
+"ra.it",
+"ragusa.it",
+"ravenna.it",
+"rc.it",
+"re.it",
+"reggio-calabria.it",
+"reggio-emilia.it",
+"reggiocalabria.it",
+"reggioemilia.it",
+"rg.it",
+"ri.it",
+"rieti.it",
+"rimini.it",
+"rm.it",
+"rn.it",
+"ro.it",
+"roma.it",
+"rome.it",
+"rovigo.it",
+"sa.it",
+"salerno.it",
+"sassari.it",
+"savona.it",
+"si.it",
+"siena.it",
+"siracusa.it",
+"so.it",
+"sondrio.it",
+"sp.it",
+"sr.it",
+"ss.it",
+"suedtirol.it",
+"südtirol.it",
+"sv.it",
+"ta.it",
+"taranto.it",
+"te.it",
+"tempio-olbia.it",
+"tempioolbia.it",
+"teramo.it",
+"terni.it",
+"tn.it",
+"to.it",
+"torino.it",
+"tp.it",
+"tr.it",
+"trani-andria-barletta.it",
+"trani-barletta-andria.it",
+"traniandriabarletta.it",
+"tranibarlettaandria.it",
+"trapani.it",
+"trento.it",
+"treviso.it",
+"trieste.it",
+"ts.it",
+"turin.it",
+"tv.it",
+"ud.it",
+"udine.it",
+"urbino-pesaro.it",
+"urbinopesaro.it",
+"va.it",
+"varese.it",
+"vb.it",
+"vc.it",
+"ve.it",
+"venezia.it",
+"venice.it",
+"verbania.it",
+"vercelli.it",
+"verona.it",
+"vi.it",
+"vibo-valentia.it",
+"vibovalentia.it",
+"vicenza.it",
+"viterbo.it",
+"vr.it",
+"vs.it",
+"vt.it",
+"vv.it",
+"je",
+"co.je",
+"net.je",
+"org.je",
+"*.jm",
+"jo",
+"com.jo",
+"org.jo",
+"net.jo",
+"edu.jo",
+"sch.jo",
+"gov.jo",
+"mil.jo",
+"name.jo",
+"jobs",
+"jp",
+"ac.jp",
+"ad.jp",
+"co.jp",
+"ed.jp",
+"go.jp",
+"gr.jp",
+"lg.jp",
+"ne.jp",
+"or.jp",
+"aichi.jp",
+"akita.jp",
+"aomori.jp",
+"chiba.jp",
+"ehime.jp",
+"fukui.jp",
+"fukuoka.jp",
+"fukushima.jp",
+"gifu.jp",
+"gunma.jp",
+"hiroshima.jp",
+"hokkaido.jp",
+"hyogo.jp",
+"ibaraki.jp",
+"ishikawa.jp",
+"iwate.jp",
+"kagawa.jp",
+"kagoshima.jp",
+"kanagawa.jp",
+"kochi.jp",
+"kumamoto.jp",
+"kyoto.jp",
+"mie.jp",
+"miyagi.jp",
+"miyazaki.jp",
+"nagano.jp",
+"nagasaki.jp",
+"nara.jp",
+"niigata.jp",
+"oita.jp",
+"okayama.jp",
+"okinawa.jp",
+"osaka.jp",
+"saga.jp",
+"saitama.jp",
+"shiga.jp",
+"shimane.jp",
+"shizuoka.jp",
+"tochigi.jp",
+"tokushima.jp",
+"tokyo.jp",
+"tottori.jp",
+"toyama.jp",
+"wakayama.jp",
+"yamagata.jp",
+"yamaguchi.jp",
+"yamanashi.jp",
+"栃木.jp",
+"愛知.jp",
+"愛媛.jp",
+"兵庫.jp",
+"熊本.jp",
+"茨城.jp",
+"北海道.jp",
+"千葉.jp",
+"和歌山.jp",
+"長崎.jp",
+"長野.jp",
+"新潟.jp",
+"青森.jp",
+"静岡.jp",
+"東京.jp",
+"石川.jp",
+"埼玉.jp",
+"三重.jp",
+"京都.jp",
+"佐賀.jp",
+"大分.jp",
+"大阪.jp",
+"奈良.jp",
+"宮城.jp",
+"宮崎.jp",
+"富山.jp",
+"山口.jp",
+"山形.jp",
+"山梨.jp",
+"岩手.jp",
+"岐阜.jp",
+"岡山.jp",
+"島根.jp",
+"広島.jp",
+"徳島.jp",
+"沖縄.jp",
+"滋賀.jp",
+"神奈川.jp",
+"福井.jp",
+"福岡.jp",
+"福島.jp",
+"秋田.jp",
+"群馬.jp",
+"香川.jp",
+"高知.jp",
+"鳥取.jp",
+"鹿児島.jp",
+"*.kawasaki.jp",
+"*.kitakyushu.jp",
+"*.kobe.jp",
+"*.nagoya.jp",
+"*.sapporo.jp",
+"*.sendai.jp",
+"*.yokohama.jp",
+"!city.kawasaki.jp",
+"!city.kitakyushu.jp",
+"!city.kobe.jp",
+"!city.nagoya.jp",
+"!city.sapporo.jp",
+"!city.sendai.jp",
+"!city.yokohama.jp",
+"aisai.aichi.jp",
+"ama.aichi.jp",
+"anjo.aichi.jp",
+"asuke.aichi.jp",
+"chiryu.aichi.jp",
+"chita.aichi.jp",
+"fuso.aichi.jp",
+"gamagori.aichi.jp",
+"handa.aichi.jp",
+"hazu.aichi.jp",
+"hekinan.aichi.jp",
+"higashiura.aichi.jp",
+"ichinomiya.aichi.jp",
+"inazawa.aichi.jp",
+"inuyama.aichi.jp",
+"isshiki.aichi.jp",
+"iwakura.aichi.jp",
+"kanie.aichi.jp",
+"kariya.aichi.jp",
+"kasugai.aichi.jp",
+"kira.aichi.jp",
+"kiyosu.aichi.jp",
+"komaki.aichi.jp",
+"konan.aichi.jp",
+"kota.aichi.jp",
+"mihama.aichi.jp",
+"miyoshi.aichi.jp",
+"nishio.aichi.jp",
+"nisshin.aichi.jp",
+"obu.aichi.jp",
+"oguchi.aichi.jp",
+"oharu.aichi.jp",
+"okazaki.aichi.jp",
+"owariasahi.aichi.jp",
+"seto.aichi.jp",
+"shikatsu.aichi.jp",
+"shinshiro.aichi.jp",
+"shitara.aichi.jp",
+"tahara.aichi.jp",
+"takahama.aichi.jp",
+"tobishima.aichi.jp",
+"toei.aichi.jp",
+"togo.aichi.jp",
+"tokai.aichi.jp",
+"tokoname.aichi.jp",
+"toyoake.aichi.jp",
+"toyohashi.aichi.jp",
+"toyokawa.aichi.jp",
+"toyone.aichi.jp",
+"toyota.aichi.jp",
+"tsushima.aichi.jp",
+"yatomi.aichi.jp",
+"akita.akita.jp",
+"daisen.akita.jp",
+"fujisato.akita.jp",
+"gojome.akita.jp",
+"hachirogata.akita.jp",
+"happou.akita.jp",
+"higashinaruse.akita.jp",
+"honjo.akita.jp",
+"honjyo.akita.jp",
+"ikawa.akita.jp",
+"kamikoani.akita.jp",
+"kamioka.akita.jp",
+"katagami.akita.jp",
+"kazuno.akita.jp",
+"kitaakita.akita.jp",
+"kosaka.akita.jp",
+"kyowa.akita.jp",
+"misato.akita.jp",
+"mitane.akita.jp",
+"moriyoshi.akita.jp",
+"nikaho.akita.jp",
+"noshiro.akita.jp",
+"odate.akita.jp",
+"oga.akita.jp",
+"ogata.akita.jp",
+"semboku.akita.jp",
+"yokote.akita.jp",
+"yurihonjo.akita.jp",
+"aomori.aomori.jp",
+"gonohe.aomori.jp",
+"hachinohe.aomori.jp",
+"hashikami.aomori.jp",
+"hiranai.aomori.jp",
+"hirosaki.aomori.jp",
+"itayanagi.aomori.jp",
+"kuroishi.aomori.jp",
+"misawa.aomori.jp",
+"mutsu.aomori.jp",
+"nakadomari.aomori.jp",
+"noheji.aomori.jp",
+"oirase.aomori.jp",
+"owani.aomori.jp",
+"rokunohe.aomori.jp",
+"sannohe.aomori.jp",
+"shichinohe.aomori.jp",
+"shingo.aomori.jp",
+"takko.aomori.jp",
+"towada.aomori.jp",
+"tsugaru.aomori.jp",
+"tsuruta.aomori.jp",
+"abiko.chiba.jp",
+"asahi.chiba.jp",
+"chonan.chiba.jp",
+"chosei.chiba.jp",
+"choshi.chiba.jp",
+"chuo.chiba.jp",
+"funabashi.chiba.jp",
+"futtsu.chiba.jp",
+"hanamigawa.chiba.jp",
+"ichihara.chiba.jp",
+"ichikawa.chiba.jp",
+"ichinomiya.chiba.jp",
+"inzai.chiba.jp",
+"isumi.chiba.jp",
+"kamagaya.chiba.jp",
+"kamogawa.chiba.jp",
+"kashiwa.chiba.jp",
+"katori.chiba.jp",
+"katsuura.chiba.jp",
+"kimitsu.chiba.jp",
+"kisarazu.chiba.jp",
+"kozaki.chiba.jp",
+"kujukuri.chiba.jp",
+"kyonan.chiba.jp",
+"matsudo.chiba.jp",
+"midori.chiba.jp",
+"mihama.chiba.jp",
+"minamiboso.chiba.jp",
+"mobara.chiba.jp",
+"mutsuzawa.chiba.jp",
+"nagara.chiba.jp",
+"nagareyama.chiba.jp",
+"narashino.chiba.jp",
+"narita.chiba.jp",
+"noda.chiba.jp",
+"oamishirasato.chiba.jp",
+"omigawa.chiba.jp",
+"onjuku.chiba.jp",
+"otaki.chiba.jp",
+"sakae.chiba.jp",
+"sakura.chiba.jp",
+"shimofusa.chiba.jp",
+"shirako.chiba.jp",
+"shiroi.chiba.jp",
+"shisui.chiba.jp",
+"sodegaura.chiba.jp",
+"sosa.chiba.jp",
+"tako.chiba.jp",
+"tateyama.chiba.jp",
+"togane.chiba.jp",
+"tohnosho.chiba.jp",
+"tomisato.chiba.jp",
+"urayasu.chiba.jp",
+"yachimata.chiba.jp",
+"yachiyo.chiba.jp",
+"yokaichiba.chiba.jp",
+"yokoshibahikari.chiba.jp",
+"yotsukaido.chiba.jp",
+"ainan.ehime.jp",
+"honai.ehime.jp",
+"ikata.ehime.jp",
+"imabari.ehime.jp",
+"iyo.ehime.jp",
+"kamijima.ehime.jp",
+"kihoku.ehime.jp",
+"kumakogen.ehime.jp",
+"masaki.ehime.jp",
+"matsuno.ehime.jp",
+"matsuyama.ehime.jp",
+"namikata.ehime.jp",
+"niihama.ehime.jp",
+"ozu.ehime.jp",
+"saijo.ehime.jp",
+"seiyo.ehime.jp",
+"shikokuchuo.ehime.jp",
+"tobe.ehime.jp",
+"toon.ehime.jp",
+"uchiko.ehime.jp",
+"uwajima.ehime.jp",
+"yawatahama.ehime.jp",
+"echizen.fukui.jp",
+"eiheiji.fukui.jp",
+"fukui.fukui.jp",
+"ikeda.fukui.jp",
+"katsuyama.fukui.jp",
+"mihama.fukui.jp",
+"minamiechizen.fukui.jp",
+"obama.fukui.jp",
+"ohi.fukui.jp",
+"ono.fukui.jp",
+"sabae.fukui.jp",
+"sakai.fukui.jp",
+"takahama.fukui.jp",
+"tsuruga.fukui.jp",
+"wakasa.fukui.jp",
+"ashiya.fukuoka.jp",
+"buzen.fukuoka.jp",
+"chikugo.fukuoka.jp",
+"chikuho.fukuoka.jp",
+"chikujo.fukuoka.jp",
+"chikushino.fukuoka.jp",
+"chikuzen.fukuoka.jp",
+"chuo.fukuoka.jp",
+"dazaifu.fukuoka.jp",
+"fukuchi.fukuoka.jp",
+"hakata.fukuoka.jp",
+"higashi.fukuoka.jp",
+"hirokawa.fukuoka.jp",
+"hisayama.fukuoka.jp",
+"iizuka.fukuoka.jp",
+"inatsuki.fukuoka.jp",
+"kaho.fukuoka.jp",
+"kasuga.fukuoka.jp",
+"kasuya.fukuoka.jp",
+"kawara.fukuoka.jp",
+"keisen.fukuoka.jp",
+"koga.fukuoka.jp",
+"kurate.fukuoka.jp",
+"kurogi.fukuoka.jp",
+"kurume.fukuoka.jp",
+"minami.fukuoka.jp",
+"miyako.fukuoka.jp",
+"miyama.fukuoka.jp",
+"miyawaka.fukuoka.jp",
+"mizumaki.fukuoka.jp",
+"munakata.fukuoka.jp",
+"nakagawa.fukuoka.jp",
+"nakama.fukuoka.jp",
+"nishi.fukuoka.jp",
+"nogata.fukuoka.jp",
+"ogori.fukuoka.jp",
+"okagaki.fukuoka.jp",
+"okawa.fukuoka.jp",
+"oki.fukuoka.jp",
+"omuta.fukuoka.jp",
+"onga.fukuoka.jp",
+"onojo.fukuoka.jp",
+"oto.fukuoka.jp",
+"saigawa.fukuoka.jp",
+"sasaguri.fukuoka.jp",
+"shingu.fukuoka.jp",
+"shinyoshitomi.fukuoka.jp",
+"shonai.fukuoka.jp",
+"soeda.fukuoka.jp",
+"sue.fukuoka.jp",
+"tachiarai.fukuoka.jp",
+"tagawa.fukuoka.jp",
+"takata.fukuoka.jp",
+"toho.fukuoka.jp",
+"toyotsu.fukuoka.jp",
+"tsuiki.fukuoka.jp",
+"ukiha.fukuoka.jp",
+"umi.fukuoka.jp",
+"usui.fukuoka.jp",
+"yamada.fukuoka.jp",
+"yame.fukuoka.jp",
+"yanagawa.fukuoka.jp",
+"yukuhashi.fukuoka.jp",
+"aizubange.fukushima.jp",
+"aizumisato.fukushima.jp",
+"aizuwakamatsu.fukushima.jp",
+"asakawa.fukushima.jp",
+"bandai.fukushima.jp",
+"date.fukushima.jp",
+"fukushima.fukushima.jp",
+"furudono.fukushima.jp",
+"futaba.fukushima.jp",
+"hanawa.fukushima.jp",
+"higashi.fukushima.jp",
+"hirata.fukushima.jp",
+"hirono.fukushima.jp",
+"iitate.fukushima.jp",
+"inawashiro.fukushima.jp",
+"ishikawa.fukushima.jp",
+"iwaki.fukushima.jp",
+"izumizaki.fukushima.jp",
+"kagamiishi.fukushima.jp",
+"kaneyama.fukushima.jp",
+"kawamata.fukushima.jp",
+"kitakata.fukushima.jp",
+"kitashiobara.fukushima.jp",
+"koori.fukushima.jp",
+"koriyama.fukushima.jp",
+"kunimi.fukushima.jp",
+"miharu.fukushima.jp",
+"mishima.fukushima.jp",
+"namie.fukushima.jp",
+"nango.fukushima.jp",
+"nishiaizu.fukushima.jp",
+"nishigo.fukushima.jp",
+"okuma.fukushima.jp",
+"omotego.fukushima.jp",
+"ono.fukushima.jp",
+"otama.fukushima.jp",
+"samegawa.fukushima.jp",
+"shimogo.fukushima.jp",
+"shirakawa.fukushima.jp",
+"showa.fukushima.jp",
+"soma.fukushima.jp",
+"sukagawa.fukushima.jp",
+"taishin.fukushima.jp",
+"tamakawa.fukushima.jp",
+"tanagura.fukushima.jp",
+"tenei.fukushima.jp",
+"yabuki.fukushima.jp",
+"yamato.fukushima.jp",
+"yamatsuri.fukushima.jp",
+"yanaizu.fukushima.jp",
+"yugawa.fukushima.jp",
+"anpachi.gifu.jp",
+"ena.gifu.jp",
+"gifu.gifu.jp",
+"ginan.gifu.jp",
+"godo.gifu.jp",
+"gujo.gifu.jp",
+"hashima.gifu.jp",
+"hichiso.gifu.jp",
+"hida.gifu.jp",
+"higashishirakawa.gifu.jp",
+"ibigawa.gifu.jp",
+"ikeda.gifu.jp",
+"kakamigahara.gifu.jp",
+"kani.gifu.jp",
+"kasahara.gifu.jp",
+"kasamatsu.gifu.jp",
+"kawaue.gifu.jp",
+"kitagata.gifu.jp",
+"mino.gifu.jp",
+"minokamo.gifu.jp",
+"mitake.gifu.jp",
+"mizunami.gifu.jp",
+"motosu.gifu.jp",
+"nakatsugawa.gifu.jp",
+"ogaki.gifu.jp",
+"sakahogi.gifu.jp",
+"seki.gifu.jp",
+"sekigahara.gifu.jp",
+"shirakawa.gifu.jp",
+"tajimi.gifu.jp",
+"takayama.gifu.jp",
+"tarui.gifu.jp",
+"toki.gifu.jp",
+"tomika.gifu.jp",
+"wanouchi.gifu.jp",
+"yamagata.gifu.jp",
+"yaotsu.gifu.jp",
+"yoro.gifu.jp",
+"annaka.gunma.jp",
+"chiyoda.gunma.jp",
+"fujioka.gunma.jp",
+"higashiagatsuma.gunma.jp",
+"isesaki.gunma.jp",
+"itakura.gunma.jp",
+"kanna.gunma.jp",
+"kanra.gunma.jp",
+"katashina.gunma.jp",
+"kawaba.gunma.jp",
+"kiryu.gunma.jp",
+"kusatsu.gunma.jp",
+"maebashi.gunma.jp",
+"meiwa.gunma.jp",
+"midori.gunma.jp",
+"minakami.gunma.jp",
+"naganohara.gunma.jp",
+"nakanojo.gunma.jp",
+"nanmoku.gunma.jp",
+"numata.gunma.jp",
+"oizumi.gunma.jp",
+"ora.gunma.jp",
+"ota.gunma.jp",
+"shibukawa.gunma.jp",
+"shimonita.gunma.jp",
+"shinto.gunma.jp",
+"showa.gunma.jp",
+"takasaki.gunma.jp",
+"takayama.gunma.jp",
+"tamamura.gunma.jp",
+"tatebayashi.gunma.jp",
+"tomioka.gunma.jp",
+"tsukiyono.gunma.jp",
+"tsumagoi.gunma.jp",
+"ueno.gunma.jp",
+"yoshioka.gunma.jp",
+"asaminami.hiroshima.jp",
+"daiwa.hiroshima.jp",
+"etajima.hiroshima.jp",
+"fuchu.hiroshima.jp",
+"fukuyama.hiroshima.jp",
+"hatsukaichi.hiroshima.jp",
+"higashihiroshima.hiroshima.jp",
+"hongo.hiroshima.jp",
+"jinsekikogen.hiroshima.jp",
+"kaita.hiroshima.jp",
+"kui.hiroshima.jp",
+"kumano.hiroshima.jp",
+"kure.hiroshima.jp",
+"mihara.hiroshima.jp",
+"miyoshi.hiroshima.jp",
+"naka.hiroshima.jp",
+"onomichi.hiroshima.jp",
+"osakikamijima.hiroshima.jp",
+"otake.hiroshima.jp",
+"saka.hiroshima.jp",
+"sera.hiroshima.jp",
+"seranishi.hiroshima.jp",
+"shinichi.hiroshima.jp",
+"shobara.hiroshima.jp",
+"takehara.hiroshima.jp",
+"abashiri.hokkaido.jp",
+"abira.hokkaido.jp",
+"aibetsu.hokkaido.jp",
+"akabira.hokkaido.jp",
+"akkeshi.hokkaido.jp",
+"asahikawa.hokkaido.jp",
+"ashibetsu.hokkaido.jp",
+"ashoro.hokkaido.jp",
+"assabu.hokkaido.jp",
+"atsuma.hokkaido.jp",
+"bibai.hokkaido.jp",
+"biei.hokkaido.jp",
+"bifuka.hokkaido.jp",
+"bihoro.hokkaido.jp",
+"biratori.hokkaido.jp",
+"chippubetsu.hokkaido.jp",
+"chitose.hokkaido.jp",
+"date.hokkaido.jp",
+"ebetsu.hokkaido.jp",
+"embetsu.hokkaido.jp",
+"eniwa.hokkaido.jp",
+"erimo.hokkaido.jp",
+"esan.hokkaido.jp",
+"esashi.hokkaido.jp",
+"fukagawa.hokkaido.jp",
+"fukushima.hokkaido.jp",
+"furano.hokkaido.jp",
+"furubira.hokkaido.jp",
+"haboro.hokkaido.jp",
+"hakodate.hokkaido.jp",
+"hamatonbetsu.hokkaido.jp",
+"hidaka.hokkaido.jp",
+"higashikagura.hokkaido.jp",
+"higashikawa.hokkaido.jp",
+"hiroo.hokkaido.jp",
+"hokuryu.hokkaido.jp",
+"hokuto.hokkaido.jp",
+"honbetsu.hokkaido.jp",
+"horokanai.hokkaido.jp",
+"horonobe.hokkaido.jp",
+"ikeda.hokkaido.jp",
+"imakane.hokkaido.jp",
+"ishikari.hokkaido.jp",
+"iwamizawa.hokkaido.jp",
+"iwanai.hokkaido.jp",
+"kamifurano.hokkaido.jp",
+"kamikawa.hokkaido.jp",
+"kamishihoro.hokkaido.jp",
+"kamisunagawa.hokkaido.jp",
+"kamoenai.hokkaido.jp",
+"kayabe.hokkaido.jp",
+"kembuchi.hokkaido.jp",
+"kikonai.hokkaido.jp",
+"kimobetsu.hokkaido.jp",
+"kitahiroshima.hokkaido.jp",
+"kitami.hokkaido.jp",
+"kiyosato.hokkaido.jp",
+"koshimizu.hokkaido.jp",
+"kunneppu.hokkaido.jp",
+"kuriyama.hokkaido.jp",
+"kuromatsunai.hokkaido.jp",
+"kushiro.hokkaido.jp",
+"kutchan.hokkaido.jp",
+"kyowa.hokkaido.jp",
+"mashike.hokkaido.jp",
+"matsumae.hokkaido.jp",
+"mikasa.hokkaido.jp",
+"minamifurano.hokkaido.jp",
+"mombetsu.hokkaido.jp",
+"moseushi.hokkaido.jp",
+"mukawa.hokkaido.jp",
+"muroran.hokkaido.jp",
+"naie.hokkaido.jp",
+"nakagawa.hokkaido.jp",
+"nakasatsunai.hokkaido.jp",
+"nakatombetsu.hokkaido.jp",
+"nanae.hokkaido.jp",
+"nanporo.hokkaido.jp",
+"nayoro.hokkaido.jp",
+"nemuro.hokkaido.jp",
+"niikappu.hokkaido.jp",
+"niki.hokkaido.jp",
+"nishiokoppe.hokkaido.jp",
+"noboribetsu.hokkaido.jp",
+"numata.hokkaido.jp",
+"obihiro.hokkaido.jp",
+"obira.hokkaido.jp",
+"oketo.hokkaido.jp",
+"okoppe.hokkaido.jp",
+"otaru.hokkaido.jp",
+"otobe.hokkaido.jp",
+"otofuke.hokkaido.jp",
+"otoineppu.hokkaido.jp",
+"oumu.hokkaido.jp",
+"ozora.hokkaido.jp",
+"pippu.hokkaido.jp",
+"rankoshi.hokkaido.jp",
+"rebun.hokkaido.jp",
+"rikubetsu.hokkaido.jp",
+"rishiri.hokkaido.jp",
+"rishirifuji.hokkaido.jp",
+"saroma.hokkaido.jp",
+"sarufutsu.hokkaido.jp",
+"shakotan.hokkaido.jp",
+"shari.hokkaido.jp",
+"shibecha.hokkaido.jp",
+"shibetsu.hokkaido.jp",
+"shikabe.hokkaido.jp",
+"shikaoi.hokkaido.jp",
+"shimamaki.hokkaido.jp",
+"shimizu.hokkaido.jp",
+"shimokawa.hokkaido.jp",
+"shinshinotsu.hokkaido.jp",
+"shintoku.hokkaido.jp",
+"shiranuka.hokkaido.jp",
+"shiraoi.hokkaido.jp",
+"shiriuchi.hokkaido.jp",
+"sobetsu.hokkaido.jp",
+"sunagawa.hokkaido.jp",
+"taiki.hokkaido.jp",
+"takasu.hokkaido.jp",
+"takikawa.hokkaido.jp",
+"takinoue.hokkaido.jp",
+"teshikaga.hokkaido.jp",
+"tobetsu.hokkaido.jp",
+"tohma.hokkaido.jp",
+"tomakomai.hokkaido.jp",
+"tomari.hokkaido.jp",
+"toya.hokkaido.jp",
+"toyako.hokkaido.jp",
+"toyotomi.hokkaido.jp",
+"toyoura.hokkaido.jp",
+"tsubetsu.hokkaido.jp",
+"tsukigata.hokkaido.jp",
+"urakawa.hokkaido.jp",
+"urausu.hokkaido.jp",
+"uryu.hokkaido.jp",
+"utashinai.hokkaido.jp",
+"wakkanai.hokkaido.jp",
+"wassamu.hokkaido.jp",
+"yakumo.hokkaido.jp",
+"yoichi.hokkaido.jp",
+"aioi.hyogo.jp",
+"akashi.hyogo.jp",
+"ako.hyogo.jp",
+"amagasaki.hyogo.jp",
+"aogaki.hyogo.jp",
+"asago.hyogo.jp",
+"ashiya.hyogo.jp",
+"awaji.hyogo.jp",
+"fukusaki.hyogo.jp",
+"goshiki.hyogo.jp",
+"harima.hyogo.jp",
+"himeji.hyogo.jp",
+"ichikawa.hyogo.jp",
+"inagawa.hyogo.jp",
+"itami.hyogo.jp",
+"kakogawa.hyogo.jp",
+"kamigori.hyogo.jp",
+"kamikawa.hyogo.jp",
+"kasai.hyogo.jp",
+"kasuga.hyogo.jp",
+"kawanishi.hyogo.jp",
+"miki.hyogo.jp",
+"minamiawaji.hyogo.jp",
+"nishinomiya.hyogo.jp",
+"nishiwaki.hyogo.jp",
+"ono.hyogo.jp",
+"sanda.hyogo.jp",
+"sannan.hyogo.jp",
+"sasayama.hyogo.jp",
+"sayo.hyogo.jp",
+"shingu.hyogo.jp",
+"shinonsen.hyogo.jp",
+"shiso.hyogo.jp",
+"sumoto.hyogo.jp",
+"taishi.hyogo.jp",
+"taka.hyogo.jp",
+"takarazuka.hyogo.jp",
+"takasago.hyogo.jp",
+"takino.hyogo.jp",
+"tamba.hyogo.jp",
+"tatsuno.hyogo.jp",
+"toyooka.hyogo.jp",
+"yabu.hyogo.jp",
+"yashiro.hyogo.jp",
+"yoka.hyogo.jp",
+"yokawa.hyogo.jp",
+"ami.ibaraki.jp",
+"asahi.ibaraki.jp",
+"bando.ibaraki.jp",
+"chikusei.ibaraki.jp",
+"daigo.ibaraki.jp",
+"fujishiro.ibaraki.jp",
+"hitachi.ibaraki.jp",
+"hitachinaka.ibaraki.jp",
+"hitachiomiya.ibaraki.jp",
+"hitachiota.ibaraki.jp",
+"ibaraki.ibaraki.jp",
+"ina.ibaraki.jp",
+"inashiki.ibaraki.jp",
+"itako.ibaraki.jp",
+"iwama.ibaraki.jp",
+"joso.ibaraki.jp",
+"kamisu.ibaraki.jp",
+"kasama.ibaraki.jp",
+"kashima.ibaraki.jp",
+"kasumigaura.ibaraki.jp",
+"koga.ibaraki.jp",
+"miho.ibaraki.jp",
+"mito.ibaraki.jp",
+"moriya.ibaraki.jp",
+"naka.ibaraki.jp",
+"namegata.ibaraki.jp",
+"oarai.ibaraki.jp",
+"ogawa.ibaraki.jp",
+"omitama.ibaraki.jp",
+"ryugasaki.ibaraki.jp",
+"sakai.ibaraki.jp",
+"sakuragawa.ibaraki.jp",
+"shimodate.ibaraki.jp",
+"shimotsuma.ibaraki.jp",
+"shirosato.ibaraki.jp",
+"sowa.ibaraki.jp",
+"suifu.ibaraki.jp",
+"takahagi.ibaraki.jp",
+"tamatsukuri.ibaraki.jp",
+"tokai.ibaraki.jp",
+"tomobe.ibaraki.jp",
+"tone.ibaraki.jp",
+"toride.ibaraki.jp",
+"tsuchiura.ibaraki.jp",
+"tsukuba.ibaraki.jp",
+"uchihara.ibaraki.jp",
+"ushiku.ibaraki.jp",
+"yachiyo.ibaraki.jp",
+"yamagata.ibaraki.jp",
+"yawara.ibaraki.jp",
+"yuki.ibaraki.jp",
+"anamizu.ishikawa.jp",
+"hakui.ishikawa.jp",
+"hakusan.ishikawa.jp",
+"kaga.ishikawa.jp",
+"kahoku.ishikawa.jp",
+"kanazawa.ishikawa.jp",
+"kawakita.ishikawa.jp",
+"komatsu.ishikawa.jp",
+"nakanoto.ishikawa.jp",
+"nanao.ishikawa.jp",
+"nomi.ishikawa.jp",
+"nonoichi.ishikawa.jp",
+"noto.ishikawa.jp",
+"shika.ishikawa.jp",
+"suzu.ishikawa.jp",
+"tsubata.ishikawa.jp",
+"tsurugi.ishikawa.jp",
+"uchinada.ishikawa.jp",
+"wajima.ishikawa.jp",
+"fudai.iwate.jp",
+"fujisawa.iwate.jp",
+"hanamaki.iwate.jp",
+"hiraizumi.iwate.jp",
+"hirono.iwate.jp",
+"ichinohe.iwate.jp",
+"ichinoseki.iwate.jp",
+"iwaizumi.iwate.jp",
+"iwate.iwate.jp",
+"joboji.iwate.jp",
+"kamaishi.iwate.jp",
+"kanegasaki.iwate.jp",
+"karumai.iwate.jp",
+"kawai.iwate.jp",
+"kitakami.iwate.jp",
+"kuji.iwate.jp",
+"kunohe.iwate.jp",
+"kuzumaki.iwate.jp",
+"miyako.iwate.jp",
+"mizusawa.iwate.jp",
+"morioka.iwate.jp",
+"ninohe.iwate.jp",
+"noda.iwate.jp",
+"ofunato.iwate.jp",
+"oshu.iwate.jp",
+"otsuchi.iwate.jp",
+"rikuzentakata.iwate.jp",
+"shiwa.iwate.jp",
+"shizukuishi.iwate.jp",
+"sumita.iwate.jp",
+"tanohata.iwate.jp",
+"tono.iwate.jp",
+"yahaba.iwate.jp",
+"yamada.iwate.jp",
+"ayagawa.kagawa.jp",
+"higashikagawa.kagawa.jp",
+"kanonji.kagawa.jp",
+"kotohira.kagawa.jp",
+"manno.kagawa.jp",
+"marugame.kagawa.jp",
+"mitoyo.kagawa.jp",
+"naoshima.kagawa.jp",
+"sanuki.kagawa.jp",
+"tadotsu.kagawa.jp",
+"takamatsu.kagawa.jp",
+"tonosho.kagawa.jp",
+"uchinomi.kagawa.jp",
+"utazu.kagawa.jp",
+"zentsuji.kagawa.jp",
+"akune.kagoshima.jp",
+"amami.kagoshima.jp",
+"hioki.kagoshima.jp",
+"isa.kagoshima.jp",
+"isen.kagoshima.jp",
+"izumi.kagoshima.jp",
+"kagoshima.kagoshima.jp",
+"kanoya.kagoshima.jp",
+"kawanabe.kagoshima.jp",
+"kinko.kagoshima.jp",
+"kouyama.kagoshima.jp",
+"makurazaki.kagoshima.jp",
+"matsumoto.kagoshima.jp",
+"minamitane.kagoshima.jp",
+"nakatane.kagoshima.jp",
+"nishinoomote.kagoshima.jp",
+"satsumasendai.kagoshima.jp",
+"soo.kagoshima.jp",
+"tarumizu.kagoshima.jp",
+"yusui.kagoshima.jp",
+"aikawa.kanagawa.jp",
+"atsugi.kanagawa.jp",
+"ayase.kanagawa.jp",
+"chigasaki.kanagawa.jp",
+"ebina.kanagawa.jp",
+"fujisawa.kanagawa.jp",
+"hadano.kanagawa.jp",
+"hakone.kanagawa.jp",
+"hiratsuka.kanagawa.jp",
+"isehara.kanagawa.jp",
+"kaisei.kanagawa.jp",
+"kamakura.kanagawa.jp",
+"kiyokawa.kanagawa.jp",
+"matsuda.kanagawa.jp",
+"minamiashigara.kanagawa.jp",
+"miura.kanagawa.jp",
+"nakai.kanagawa.jp",
+"ninomiya.kanagawa.jp",
+"odawara.kanagawa.jp",
+"oi.kanagawa.jp",
+"oiso.kanagawa.jp",
+"sagamihara.kanagawa.jp",
+"samukawa.kanagawa.jp",
+"tsukui.kanagawa.jp",
+"yamakita.kanagawa.jp",
+"yamato.kanagawa.jp",
+"yokosuka.kanagawa.jp",
+"yugawara.kanagawa.jp",
+"zama.kanagawa.jp",
+"zushi.kanagawa.jp",
+"aki.kochi.jp",
+"geisei.kochi.jp",
+"hidaka.kochi.jp",
+"higashitsuno.kochi.jp",
+"ino.kochi.jp",
+"kagami.kochi.jp",
+"kami.kochi.jp",
+"kitagawa.kochi.jp",
+"kochi.kochi.jp",
+"mihara.kochi.jp",
+"motoyama.kochi.jp",
+"muroto.kochi.jp",
+"nahari.kochi.jp",
+"nakamura.kochi.jp",
+"nankoku.kochi.jp",
+"nishitosa.kochi.jp",
+"niyodogawa.kochi.jp",
+"ochi.kochi.jp",
+"okawa.kochi.jp",
+"otoyo.kochi.jp",
+"otsuki.kochi.jp",
+"sakawa.kochi.jp",
+"sukumo.kochi.jp",
+"susaki.kochi.jp",
+"tosa.kochi.jp",
+"tosashimizu.kochi.jp",
+"toyo.kochi.jp",
+"tsuno.kochi.jp",
+"umaji.kochi.jp",
+"yasuda.kochi.jp",
+"yusuhara.kochi.jp",
+"amakusa.kumamoto.jp",
+"arao.kumamoto.jp",
+"aso.kumamoto.jp",
+"choyo.kumamoto.jp",
+"gyokuto.kumamoto.jp",
+"kamiamakusa.kumamoto.jp",
+"kikuchi.kumamoto.jp",
+"kumamoto.kumamoto.jp",
+"mashiki.kumamoto.jp",
+"mifune.kumamoto.jp",
+"minamata.kumamoto.jp",
+"minamioguni.kumamoto.jp",
+"nagasu.kumamoto.jp",
+"nishihara.kumamoto.jp",
+"oguni.kumamoto.jp",
+"ozu.kumamoto.jp",
+"sumoto.kumamoto.jp",
+"takamori.kumamoto.jp",
+"uki.kumamoto.jp",
+"uto.kumamoto.jp",
+"yamaga.kumamoto.jp",
+"yamato.kumamoto.jp",
+"yatsushiro.kumamoto.jp",
+"ayabe.kyoto.jp",
+"fukuchiyama.kyoto.jp",
+"higashiyama.kyoto.jp",
+"ide.kyoto.jp",
+"ine.kyoto.jp",
+"joyo.kyoto.jp",
+"kameoka.kyoto.jp",
+"kamo.kyoto.jp",
+"kita.kyoto.jp",
+"kizu.kyoto.jp",
+"kumiyama.kyoto.jp",
+"kyotamba.kyoto.jp",
+"kyotanabe.kyoto.jp",
+"kyotango.kyoto.jp",
+"maizuru.kyoto.jp",
+"minami.kyoto.jp",
+"minamiyamashiro.kyoto.jp",
+"miyazu.kyoto.jp",
+"muko.kyoto.jp",
+"nagaokakyo.kyoto.jp",
+"nakagyo.kyoto.jp",
+"nantan.kyoto.jp",
+"oyamazaki.kyoto.jp",
+"sakyo.kyoto.jp",
+"seika.kyoto.jp",
+"tanabe.kyoto.jp",
+"uji.kyoto.jp",
+"ujitawara.kyoto.jp",
+"wazuka.kyoto.jp",
+"yamashina.kyoto.jp",
+"yawata.kyoto.jp",
+"asahi.mie.jp",
+"inabe.mie.jp",
+"ise.mie.jp",
+"kameyama.mie.jp",
+"kawagoe.mie.jp",
+"kiho.mie.jp",
+"kisosaki.mie.jp",
+"kiwa.mie.jp",
+"komono.mie.jp",
+"kumano.mie.jp",
+"kuwana.mie.jp",
+"matsusaka.mie.jp",
+"meiwa.mie.jp",
+"mihama.mie.jp",
+"minamiise.mie.jp",
+"misugi.mie.jp",
+"miyama.mie.jp",
+"nabari.mie.jp",
+"shima.mie.jp",
+"suzuka.mie.jp",
+"tado.mie.jp",
+"taiki.mie.jp",
+"taki.mie.jp",
+"tamaki.mie.jp",
+"toba.mie.jp",
+"tsu.mie.jp",
+"udono.mie.jp",
+"ureshino.mie.jp",
+"watarai.mie.jp",
+"yokkaichi.mie.jp",
+"furukawa.miyagi.jp",
+"higashimatsushima.miyagi.jp",
+"ishinomaki.miyagi.jp",
+"iwanuma.miyagi.jp",
+"kakuda.miyagi.jp",
+"kami.miyagi.jp",
+"kawasaki.miyagi.jp",
+"marumori.miyagi.jp",
+"matsushima.miyagi.jp",
+"minamisanriku.miyagi.jp",
+"misato.miyagi.jp",
+"murata.miyagi.jp",
+"natori.miyagi.jp",
+"ogawara.miyagi.jp",
+"ohira.miyagi.jp",
+"onagawa.miyagi.jp",
+"osaki.miyagi.jp",
+"rifu.miyagi.jp",
+"semine.miyagi.jp",
+"shibata.miyagi.jp",
+"shichikashuku.miyagi.jp",
+"shikama.miyagi.jp",
+"shiogama.miyagi.jp",
+"shiroishi.miyagi.jp",
+"tagajo.miyagi.jp",
+"taiwa.miyagi.jp",
+"tome.miyagi.jp",
+"tomiya.miyagi.jp",
+"wakuya.miyagi.jp",
+"watari.miyagi.jp",
+"yamamoto.miyagi.jp",
+"zao.miyagi.jp",
+"aya.miyazaki.jp",
+"ebino.miyazaki.jp",
+"gokase.miyazaki.jp",
+"hyuga.miyazaki.jp",
+"kadogawa.miyazaki.jp",
+"kawaminami.miyazaki.jp",
+"kijo.miyazaki.jp",
+"kitagawa.miyazaki.jp",
+"kitakata.miyazaki.jp",
+"kitaura.miyazaki.jp",
+"kobayashi.miyazaki.jp",
+"kunitomi.miyazaki.jp",
+"kushima.miyazaki.jp",
+"mimata.miyazaki.jp",
+"miyakonojo.miyazaki.jp",
+"miyazaki.miyazaki.jp",
+"morotsuka.miyazaki.jp",
+"nichinan.miyazaki.jp",
+"nishimera.miyazaki.jp",
+"nobeoka.miyazaki.jp",
+"saito.miyazaki.jp",
+"shiiba.miyazaki.jp",
+"shintomi.miyazaki.jp",
+"takaharu.miyazaki.jp",
+"takanabe.miyazaki.jp",
+"takazaki.miyazaki.jp",
+"tsuno.miyazaki.jp",
+"achi.nagano.jp",
+"agematsu.nagano.jp",
+"anan.nagano.jp",
+"aoki.nagano.jp",
+"asahi.nagano.jp",
+"azumino.nagano.jp",
+"chikuhoku.nagano.jp",
+"chikuma.nagano.jp",
+"chino.nagano.jp",
+"fujimi.nagano.jp",
+"hakuba.nagano.jp",
+"hara.nagano.jp",
+"hiraya.nagano.jp",
+"iida.nagano.jp",
+"iijima.nagano.jp",
+"iiyama.nagano.jp",
+"iizuna.nagano.jp",
+"ikeda.nagano.jp",
+"ikusaka.nagano.jp",
+"ina.nagano.jp",
+"karuizawa.nagano.jp",
+"kawakami.nagano.jp",
+"kiso.nagano.jp",
+"kisofukushima.nagano.jp",
+"kitaaiki.nagano.jp",
+"komagane.nagano.jp",
+"komoro.nagano.jp",
+"matsukawa.nagano.jp",
+"matsumoto.nagano.jp",
+"miasa.nagano.jp",
+"minamiaiki.nagano.jp",
+"minamimaki.nagano.jp",
+"minamiminowa.nagano.jp",
+"minowa.nagano.jp",
+"miyada.nagano.jp",
+"miyota.nagano.jp",
+"mochizuki.nagano.jp",
+"nagano.nagano.jp",
+"nagawa.nagano.jp",
+"nagiso.nagano.jp",
+"nakagawa.nagano.jp",
+"nakano.nagano.jp",
+"nozawaonsen.nagano.jp",
+"obuse.nagano.jp",
+"ogawa.nagano.jp",
+"okaya.nagano.jp",
+"omachi.nagano.jp",
+"omi.nagano.jp",
+"ookuwa.nagano.jp",
+"ooshika.nagano.jp",
+"otaki.nagano.jp",
+"otari.nagano.jp",
+"sakae.nagano.jp",
+"sakaki.nagano.jp",
+"saku.nagano.jp",
+"sakuho.nagano.jp",
+"shimosuwa.nagano.jp",
+"shinanomachi.nagano.jp",
+"shiojiri.nagano.jp",
+"suwa.nagano.jp",
+"suzaka.nagano.jp",
+"takagi.nagano.jp",
+"takamori.nagano.jp",
+"takayama.nagano.jp",
+"tateshina.nagano.jp",
+"tatsuno.nagano.jp",
+"togakushi.nagano.jp",
+"togura.nagano.jp",
+"tomi.nagano.jp",
+"ueda.nagano.jp",
+"wada.nagano.jp",
+"yamagata.nagano.jp",
+"yamanouchi.nagano.jp",
+"yasaka.nagano.jp",
+"yasuoka.nagano.jp",
+"chijiwa.nagasaki.jp",
+"futsu.nagasaki.jp",
+"goto.nagasaki.jp",
+"hasami.nagasaki.jp",
+"hirado.nagasaki.jp",
+"iki.nagasaki.jp",
+"isahaya.nagasaki.jp",
+"kawatana.nagasaki.jp",
+"kuchinotsu.nagasaki.jp",
+"matsuura.nagasaki.jp",
+"nagasaki.nagasaki.jp",
+"obama.nagasaki.jp",
+"omura.nagasaki.jp",
+"oseto.nagasaki.jp",
+"saikai.nagasaki.jp",
+"sasebo.nagasaki.jp",
+"seihi.nagasaki.jp",
+"shimabara.nagasaki.jp",
+"shinkamigoto.nagasaki.jp",
+"togitsu.nagasaki.jp",
+"tsushima.nagasaki.jp",
+"unzen.nagasaki.jp",
+"ando.nara.jp",
+"gose.nara.jp",
+"heguri.nara.jp",
+"higashiyoshino.nara.jp",
+"ikaruga.nara.jp",
+"ikoma.nara.jp",
+"kamikitayama.nara.jp",
+"kanmaki.nara.jp",
+"kashiba.nara.jp",
+"kashihara.nara.jp",
+"katsuragi.nara.jp",
+"kawai.nara.jp",
+"kawakami.nara.jp",
+"kawanishi.nara.jp",
+"koryo.nara.jp",
+"kurotaki.nara.jp",
+"mitsue.nara.jp",
+"miyake.nara.jp",
+"nara.nara.jp",
+"nosegawa.nara.jp",
+"oji.nara.jp",
+"ouda.nara.jp",
+"oyodo.nara.jp",
+"sakurai.nara.jp",
+"sango.nara.jp",
+"shimoichi.nara.jp",
+"shimokitayama.nara.jp",
+"shinjo.nara.jp",
+"soni.nara.jp",
+"takatori.nara.jp",
+"tawaramoto.nara.jp",
+"tenkawa.nara.jp",
+"tenri.nara.jp",
+"uda.nara.jp",
+"yamatokoriyama.nara.jp",
+"yamatotakada.nara.jp",
+"yamazoe.nara.jp",
+"yoshino.nara.jp",
+"aga.niigata.jp",
+"agano.niigata.jp",
+"gosen.niigata.jp",
+"itoigawa.niigata.jp",
+"izumozaki.niigata.jp",
+"joetsu.niigata.jp",
+"kamo.niigata.jp",
+"kariwa.niigata.jp",
+"kashiwazaki.niigata.jp",
+"minamiuonuma.niigata.jp",
+"mitsuke.niigata.jp",
+"muika.niigata.jp",
+"murakami.niigata.jp",
+"myoko.niigata.jp",
+"nagaoka.niigata.jp",
+"niigata.niigata.jp",
+"ojiya.niigata.jp",
+"omi.niigata.jp",
+"sado.niigata.jp",
+"sanjo.niigata.jp",
+"seiro.niigata.jp",
+"seirou.niigata.jp",
+"sekikawa.niigata.jp",
+"shibata.niigata.jp",
+"tagami.niigata.jp",
+"tainai.niigata.jp",
+"tochio.niigata.jp",
+"tokamachi.niigata.jp",
+"tsubame.niigata.jp",
+"tsunan.niigata.jp",
+"uonuma.niigata.jp",
+"yahiko.niigata.jp",
+"yoita.niigata.jp",
+"yuzawa.niigata.jp",
+"beppu.oita.jp",
+"bungoono.oita.jp",
+"bungotakada.oita.jp",
+"hasama.oita.jp",
+"hiji.oita.jp",
+"himeshima.oita.jp",
+"hita.oita.jp",
+"kamitsue.oita.jp",
+"kokonoe.oita.jp",
+"kuju.oita.jp",
+"kunisaki.oita.jp",
+"kusu.oita.jp",
+"oita.oita.jp",
+"saiki.oita.jp",
+"taketa.oita.jp",
+"tsukumi.oita.jp",
+"usa.oita.jp",
+"usuki.oita.jp",
+"yufu.oita.jp",
+"akaiwa.okayama.jp",
+"asakuchi.okayama.jp",
+"bizen.okayama.jp",
+"hayashima.okayama.jp",
+"ibara.okayama.jp",
+"kagamino.okayama.jp",
+"kasaoka.okayama.jp",
+"kibichuo.okayama.jp",
+"kumenan.okayama.jp",
+"kurashiki.okayama.jp",
+"maniwa.okayama.jp",
+"misaki.okayama.jp",
+"nagi.okayama.jp",
+"niimi.okayama.jp",
+"nishiawakura.okayama.jp",
+"okayama.okayama.jp",
+"satosho.okayama.jp",
+"setouchi.okayama.jp",
+"shinjo.okayama.jp",
+"shoo.okayama.jp",
+"soja.okayama.jp",
+"takahashi.okayama.jp",
+"tamano.okayama.jp",
+"tsuyama.okayama.jp",
+"wake.okayama.jp",
+"yakage.okayama.jp",
+"aguni.okinawa.jp",
+"ginowan.okinawa.jp",
+"ginoza.okinawa.jp",
+"gushikami.okinawa.jp",
+"haebaru.okinawa.jp",
+"higashi.okinawa.jp",
+"hirara.okinawa.jp",
+"iheya.okinawa.jp",
+"ishigaki.okinawa.jp",
+"ishikawa.okinawa.jp",
+"itoman.okinawa.jp",
+"izena.okinawa.jp",
+"kadena.okinawa.jp",
+"kin.okinawa.jp",
+"kitadaito.okinawa.jp",
+"kitanakagusuku.okinawa.jp",
+"kumejima.okinawa.jp",
+"kunigami.okinawa.jp",
+"minamidaito.okinawa.jp",
+"motobu.okinawa.jp",
+"nago.okinawa.jp",
+"naha.okinawa.jp",
+"nakagusuku.okinawa.jp",
+"nakijin.okinawa.jp",
+"nanjo.okinawa.jp",
+"nishihara.okinawa.jp",
+"ogimi.okinawa.jp",
+"okinawa.okinawa.jp",
+"onna.okinawa.jp",
+"shimoji.okinawa.jp",
+"taketomi.okinawa.jp",
+"tarama.okinawa.jp",
+"tokashiki.okinawa.jp",
+"tomigusuku.okinawa.jp",
+"tonaki.okinawa.jp",
+"urasoe.okinawa.jp",
+"uruma.okinawa.jp",
+"yaese.okinawa.jp",
+"yomitan.okinawa.jp",
+"yonabaru.okinawa.jp",
+"yonaguni.okinawa.jp",
+"zamami.okinawa.jp",
+"abeno.osaka.jp",
+"chihayaakasaka.osaka.jp",
+"chuo.osaka.jp",
+"daito.osaka.jp",
+"fujiidera.osaka.jp",
+"habikino.osaka.jp",
+"hannan.osaka.jp",
+"higashiosaka.osaka.jp",
+"higashisumiyoshi.osaka.jp",
+"higashiyodogawa.osaka.jp",
+"hirakata.osaka.jp",
+"ibaraki.osaka.jp",
+"ikeda.osaka.jp",
+"izumi.osaka.jp",
+"izumiotsu.osaka.jp",
+"izumisano.osaka.jp",
+"kadoma.osaka.jp",
+"kaizuka.osaka.jp",
+"kanan.osaka.jp",
+"kashiwara.osaka.jp",
+"katano.osaka.jp",
+"kawachinagano.osaka.jp",
+"kishiwada.osaka.jp",
+"kita.osaka.jp",
+"kumatori.osaka.jp",
+"matsubara.osaka.jp",
+"minato.osaka.jp",
+"minoh.osaka.jp",
+"misaki.osaka.jp",
+"moriguchi.osaka.jp",
+"neyagawa.osaka.jp",
+"nishi.osaka.jp",
+"nose.osaka.jp",
+"osakasayama.osaka.jp",
+"sakai.osaka.jp",
+"sayama.osaka.jp",
+"sennan.osaka.jp",
+"settsu.osaka.jp",
+"shijonawate.osaka.jp",
+"shimamoto.osaka.jp",
+"suita.osaka.jp",
+"tadaoka.osaka.jp",
+"taishi.osaka.jp",
+"tajiri.osaka.jp",
+"takaishi.osaka.jp",
+"takatsuki.osaka.jp",
+"tondabayashi.osaka.jp",
+"toyonaka.osaka.jp",
+"toyono.osaka.jp",
+"yao.osaka.jp",
+"ariake.saga.jp",
+"arita.saga.jp",
+"fukudomi.saga.jp",
+"genkai.saga.jp",
+"hamatama.saga.jp",
+"hizen.saga.jp",
+"imari.saga.jp",
+"kamimine.saga.jp",
+"kanzaki.saga.jp",
+"karatsu.saga.jp",
+"kashima.saga.jp",
+"kitagata.saga.jp",
+"kitahata.saga.jp",
+"kiyama.saga.jp",
+"kouhoku.saga.jp",
+"kyuragi.saga.jp",
+"nishiarita.saga.jp",
+"ogi.saga.jp",
+"omachi.saga.jp",
+"ouchi.saga.jp",
+"saga.saga.jp",
+"shiroishi.saga.jp",
+"taku.saga.jp",
+"tara.saga.jp",
+"tosu.saga.jp",
+"yoshinogari.saga.jp",
+"arakawa.saitama.jp",
+"asaka.saitama.jp",
+"chichibu.saitama.jp",
+"fujimi.saitama.jp",
+"fujimino.saitama.jp",
+"fukaya.saitama.jp",
+"hanno.saitama.jp",
+"hanyu.saitama.jp",
+"hasuda.saitama.jp",
+"hatogaya.saitama.jp",
+"hatoyama.saitama.jp",
+"hidaka.saitama.jp",
+"higashichichibu.saitama.jp",
+"higashimatsuyama.saitama.jp",
+"honjo.saitama.jp",
+"ina.saitama.jp",
+"iruma.saitama.jp",
+"iwatsuki.saitama.jp",
+"kamiizumi.saitama.jp",
+"kamikawa.saitama.jp",
+"kamisato.saitama.jp",
+"kasukabe.saitama.jp",
+"kawagoe.saitama.jp",
+"kawaguchi.saitama.jp",
+"kawajima.saitama.jp",
+"kazo.saitama.jp",
+"kitamoto.saitama.jp",
+"koshigaya.saitama.jp",
+"kounosu.saitama.jp",
+"kuki.saitama.jp",
+"kumagaya.saitama.jp",
+"matsubushi.saitama.jp",
+"minano.saitama.jp",
+"misato.saitama.jp",
+"miyashiro.saitama.jp",
+"miyoshi.saitama.jp",
+"moroyama.saitama.jp",
+"nagatoro.saitama.jp",
+"namegawa.saitama.jp",
+"niiza.saitama.jp",
+"ogano.saitama.jp",
+"ogawa.saitama.jp",
+"ogose.saitama.jp",
+"okegawa.saitama.jp",
+"omiya.saitama.jp",
+"otaki.saitama.jp",
+"ranzan.saitama.jp",
+"ryokami.saitama.jp",
+"saitama.saitama.jp",
+"sakado.saitama.jp",
+"satte.saitama.jp",
+"sayama.saitama.jp",
+"shiki.saitama.jp",
+"shiraoka.saitama.jp",
+"soka.saitama.jp",
+"sugito.saitama.jp",
+"toda.saitama.jp",
+"tokigawa.saitama.jp",
+"tokorozawa.saitama.jp",
+"tsurugashima.saitama.jp",
+"urawa.saitama.jp",
+"warabi.saitama.jp",
+"yashio.saitama.jp",
+"yokoze.saitama.jp",
+"yono.saitama.jp",
+"yorii.saitama.jp",
+"yoshida.saitama.jp",
+"yoshikawa.saitama.jp",
+"yoshimi.saitama.jp",
+"aisho.shiga.jp",
+"gamo.shiga.jp",
+"higashiomi.shiga.jp",
+"hikone.shiga.jp",
+"koka.shiga.jp",
+"konan.shiga.jp",
+"kosei.shiga.jp",
+"koto.shiga.jp",
+"kusatsu.shiga.jp",
+"maibara.shiga.jp",
+"moriyama.shiga.jp",
+"nagahama.shiga.jp",
+"nishiazai.shiga.jp",
+"notogawa.shiga.jp",
+"omihachiman.shiga.jp",
+"otsu.shiga.jp",
+"ritto.shiga.jp",
+"ryuoh.shiga.jp",
+"takashima.shiga.jp",
+"takatsuki.shiga.jp",
+"torahime.shiga.jp",
+"toyosato.shiga.jp",
+"yasu.shiga.jp",
+"akagi.shimane.jp",
+"ama.shimane.jp",
+"gotsu.shimane.jp",
+"hamada.shimane.jp",
+"higashiizumo.shimane.jp",
+"hikawa.shimane.jp",
+"hikimi.shimane.jp",
+"izumo.shimane.jp",
+"kakinoki.shimane.jp",
+"masuda.shimane.jp",
+"matsue.shimane.jp",
+"misato.shimane.jp",
+"nishinoshima.shimane.jp",
+"ohda.shimane.jp",
+"okinoshima.shimane.jp",
+"okuizumo.shimane.jp",
+"shimane.shimane.jp",
+"tamayu.shimane.jp",
+"tsuwano.shimane.jp",
+"unnan.shimane.jp",
+"yakumo.shimane.jp",
+"yasugi.shimane.jp",
+"yatsuka.shimane.jp",
+"arai.shizuoka.jp",
+"atami.shizuoka.jp",
+"fuji.shizuoka.jp",
+"fujieda.shizuoka.jp",
+"fujikawa.shizuoka.jp",
+"fujinomiya.shizuoka.jp",
+"fukuroi.shizuoka.jp",
+"gotemba.shizuoka.jp",
+"haibara.shizuoka.jp",
+"hamamatsu.shizuoka.jp",
+"higashiizu.shizuoka.jp",
+"ito.shizuoka.jp",
+"iwata.shizuoka.jp",
+"izu.shizuoka.jp",
+"izunokuni.shizuoka.jp",
+"kakegawa.shizuoka.jp",
+"kannami.shizuoka.jp",
+"kawanehon.shizuoka.jp",
+"kawazu.shizuoka.jp",
+"kikugawa.shizuoka.jp",
+"kosai.shizuoka.jp",
+"makinohara.shizuoka.jp",
+"matsuzaki.shizuoka.jp",
+"minamiizu.shizuoka.jp",
+"mishima.shizuoka.jp",
+"morimachi.shizuoka.jp",
+"nishiizu.shizuoka.jp",
+"numazu.shizuoka.jp",
+"omaezaki.shizuoka.jp",
+"shimada.shizuoka.jp",
+"shimizu.shizuoka.jp",
+"shimoda.shizuoka.jp",
+"shizuoka.shizuoka.jp",
+"susono.shizuoka.jp",
+"yaizu.shizuoka.jp",
+"yoshida.shizuoka.jp",
+"ashikaga.tochigi.jp",
+"bato.tochigi.jp",
+"haga.tochigi.jp",
+"ichikai.tochigi.jp",
+"iwafune.tochigi.jp",
+"kaminokawa.tochigi.jp",
+"kanuma.tochigi.jp",
+"karasuyama.tochigi.jp",
+"kuroiso.tochigi.jp",
+"mashiko.tochigi.jp",
+"mibu.tochigi.jp",
+"moka.tochigi.jp",
+"motegi.tochigi.jp",
+"nasu.tochigi.jp",
+"nasushiobara.tochigi.jp",
+"nikko.tochigi.jp",
+"nishikata.tochigi.jp",
+"nogi.tochigi.jp",
+"ohira.tochigi.jp",
+"ohtawara.tochigi.jp",
+"oyama.tochigi.jp",
+"sakura.tochigi.jp",
+"sano.tochigi.jp",
+"shimotsuke.tochigi.jp",
+"shioya.tochigi.jp",
+"takanezawa.tochigi.jp",
+"tochigi.tochigi.jp",
+"tsuga.tochigi.jp",
+"ujiie.tochigi.jp",
+"utsunomiya.tochigi.jp",
+"yaita.tochigi.jp",
+"aizumi.tokushima.jp",
+"anan.tokushima.jp",
+"ichiba.tokushima.jp",
+"itano.tokushima.jp",
+"kainan.tokushima.jp",
+"komatsushima.tokushima.jp",
+"matsushige.tokushima.jp",
+"mima.tokushima.jp",
+"minami.tokushima.jp",
+"miyoshi.tokushima.jp",
+"mugi.tokushima.jp",
+"nakagawa.tokushima.jp",
+"naruto.tokushima.jp",
+"sanagochi.tokushima.jp",
+"shishikui.tokushima.jp",
+"tokushima.tokushima.jp",
+"wajiki.tokushima.jp",
+"adachi.tokyo.jp",
+"akiruno.tokyo.jp",
+"akishima.tokyo.jp",
+"aogashima.tokyo.jp",
+"arakawa.tokyo.jp",
+"bunkyo.tokyo.jp",
+"chiyoda.tokyo.jp",
+"chofu.tokyo.jp",
+"chuo.tokyo.jp",
+"edogawa.tokyo.jp",
+"fuchu.tokyo.jp",
+"fussa.tokyo.jp",
+"hachijo.tokyo.jp",
+"hachioji.tokyo.jp",
+"hamura.tokyo.jp",
+"higashikurume.tokyo.jp",
+"higashimurayama.tokyo.jp",
+"higashiyamato.tokyo.jp",
+"hino.tokyo.jp",
+"hinode.tokyo.jp",
+"hinohara.tokyo.jp",
+"inagi.tokyo.jp",
+"itabashi.tokyo.jp",
+"katsushika.tokyo.jp",
+"kita.tokyo.jp",
+"kiyose.tokyo.jp",
+"kodaira.tokyo.jp",
+"koganei.tokyo.jp",
+"kokubunji.tokyo.jp",
+"komae.tokyo.jp",
+"koto.tokyo.jp",
+"kouzushima.tokyo.jp",
+"kunitachi.tokyo.jp",
+"machida.tokyo.jp",
+"meguro.tokyo.jp",
+"minato.tokyo.jp",
+"mitaka.tokyo.jp",
+"mizuho.tokyo.jp",
+"musashimurayama.tokyo.jp",
+"musashino.tokyo.jp",
+"nakano.tokyo.jp",
+"nerima.tokyo.jp",
+"ogasawara.tokyo.jp",
+"okutama.tokyo.jp",
+"ome.tokyo.jp",
+"oshima.tokyo.jp",
+"ota.tokyo.jp",
+"setagaya.tokyo.jp",
+"shibuya.tokyo.jp",
+"shinagawa.tokyo.jp",
+"shinjuku.tokyo.jp",
+"suginami.tokyo.jp",
+"sumida.tokyo.jp",
+"tachikawa.tokyo.jp",
+"taito.tokyo.jp",
+"tama.tokyo.jp",
+"toshima.tokyo.jp",
+"chizu.tottori.jp",
+"hino.tottori.jp",
+"kawahara.tottori.jp",
+"koge.tottori.jp",
+"kotoura.tottori.jp",
+"misasa.tottori.jp",
+"nanbu.tottori.jp",
+"nichinan.tottori.jp",
+"sakaiminato.tottori.jp",
+"tottori.tottori.jp",
+"wakasa.tottori.jp",
+"yazu.tottori.jp",
+"yonago.tottori.jp",
+"asahi.toyama.jp",
+"fuchu.toyama.jp",
+"fukumitsu.toyama.jp",
+"funahashi.toyama.jp",
+"himi.toyama.jp",
+"imizu.toyama.jp",
+"inami.toyama.jp",
+"johana.toyama.jp",
+"kamiichi.toyama.jp",
+"kurobe.toyama.jp",
+"nakaniikawa.toyama.jp",
+"namerikawa.toyama.jp",
+"nanto.toyama.jp",
+"nyuzen.toyama.jp",
+"oyabe.toyama.jp",
+"taira.toyama.jp",
+"takaoka.toyama.jp",
+"tateyama.toyama.jp",
+"toga.toyama.jp",
+"tonami.toyama.jp",
+"toyama.toyama.jp",
+"unazuki.toyama.jp",
+"uozu.toyama.jp",
+"yamada.toyama.jp",
+"arida.wakayama.jp",
+"aridagawa.wakayama.jp",
+"gobo.wakayama.jp",
+"hashimoto.wakayama.jp",
+"hidaka.wakayama.jp",
+"hirogawa.wakayama.jp",
+"inami.wakayama.jp",
+"iwade.wakayama.jp",
+"kainan.wakayama.jp",
+"kamitonda.wakayama.jp",
+"katsuragi.wakayama.jp",
+"kimino.wakayama.jp",
+"kinokawa.wakayama.jp",
+"kitayama.wakayama.jp",
+"koya.wakayama.jp",
+"koza.wakayama.jp",
+"kozagawa.wakayama.jp",
+"kudoyama.wakayama.jp",
+"kushimoto.wakayama.jp",
+"mihama.wakayama.jp",
+"misato.wakayama.jp",
+"nachikatsuura.wakayama.jp",
+"shingu.wakayama.jp",
+"shirahama.wakayama.jp",
+"taiji.wakayama.jp",
+"tanabe.wakayama.jp",
+"wakayama.wakayama.jp",
+"yuasa.wakayama.jp",
+"yura.wakayama.jp",
+"asahi.yamagata.jp",
+"funagata.yamagata.jp",
+"higashine.yamagata.jp",
+"iide.yamagata.jp",
+"kahoku.yamagata.jp",
+"kaminoyama.yamagata.jp",
+"kaneyama.yamagata.jp",
+"kawanishi.yamagata.jp",
+"mamurogawa.yamagata.jp",
+"mikawa.yamagata.jp",
+"murayama.yamagata.jp",
+"nagai.yamagata.jp",
+"nakayama.yamagata.jp",
+"nanyo.yamagata.jp",
+"nishikawa.yamagata.jp",
+"obanazawa.yamagata.jp",
+"oe.yamagata.jp",
+"oguni.yamagata.jp",
+"ohkura.yamagata.jp",
+"oishida.yamagata.jp",
+"sagae.yamagata.jp",
+"sakata.yamagata.jp",
+"sakegawa.yamagata.jp",
+"shinjo.yamagata.jp",
+"shirataka.yamagata.jp",
+"shonai.yamagata.jp",
+"takahata.yamagata.jp",
+"tendo.yamagata.jp",
+"tozawa.yamagata.jp",
+"tsuruoka.yamagata.jp",
+"yamagata.yamagata.jp",
+"yamanobe.yamagata.jp",
+"yonezawa.yamagata.jp",
+"yuza.yamagata.jp",
+"abu.yamaguchi.jp",
+"hagi.yamaguchi.jp",
+"hikari.yamaguchi.jp",
+"hofu.yamaguchi.jp",
+"iwakuni.yamaguchi.jp",
+"kudamatsu.yamaguchi.jp",
+"mitou.yamaguchi.jp",
+"nagato.yamaguchi.jp",
+"oshima.yamaguchi.jp",
+"shimonoseki.yamaguchi.jp",
+"shunan.yamaguchi.jp",
+"tabuse.yamaguchi.jp",
+"tokuyama.yamaguchi.jp",
+"toyota.yamaguchi.jp",
+"ube.yamaguchi.jp",
+"yuu.yamaguchi.jp",
+"chuo.yamanashi.jp",
+"doshi.yamanashi.jp",
+"fuefuki.yamanashi.jp",
+"fujikawa.yamanashi.jp",
+"fujikawaguchiko.yamanashi.jp",
+"fujiyoshida.yamanashi.jp",
+"hayakawa.yamanashi.jp",
+"hokuto.yamanashi.jp",
+"ichikawamisato.yamanashi.jp",
+"kai.yamanashi.jp",
+"kofu.yamanashi.jp",
+"koshu.yamanashi.jp",
+"kosuge.yamanashi.jp",
+"minami-alps.yamanashi.jp",
+"minobu.yamanashi.jp",
+"nakamichi.yamanashi.jp",
+"nanbu.yamanashi.jp",
+"narusawa.yamanashi.jp",
+"nirasaki.yamanashi.jp",
+"nishikatsura.yamanashi.jp",
+"oshino.yamanashi.jp",
+"otsuki.yamanashi.jp",
+"showa.yamanashi.jp",
+"tabayama.yamanashi.jp",
+"tsuru.yamanashi.jp",
+"uenohara.yamanashi.jp",
+"yamanakako.yamanashi.jp",
+"yamanashi.yamanashi.jp",
+"ke",
+"ac.ke",
+"co.ke",
+"go.ke",
+"info.ke",
+"me.ke",
+"mobi.ke",
+"ne.ke",
+"or.ke",
+"sc.ke",
+"kg",
+"org.kg",
+"net.kg",
+"com.kg",
+"edu.kg",
+"gov.kg",
+"mil.kg",
+"*.kh",
+"ki",
+"edu.ki",
+"biz.ki",
+"net.ki",
+"org.ki",
+"gov.ki",
+"info.ki",
+"com.ki",
+"km",
+"org.km",
+"nom.km",
+"gov.km",
+"prd.km",
+"tm.km",
+"edu.km",
+"mil.km",
+"ass.km",
+"com.km",
+"coop.km",
+"asso.km",
+"presse.km",
+"medecin.km",
+"notaires.km",
+"pharmaciens.km",
+"veterinaire.km",
+"gouv.km",
+"kn",
+"net.kn",
+"org.kn",
+"edu.kn",
+"gov.kn",
+"kp",
+"com.kp",
+"edu.kp",
+"gov.kp",
+"org.kp",
+"rep.kp",
+"tra.kp",
+"kr",
+"ac.kr",
+"co.kr",
+"es.kr",
+"go.kr",
+"hs.kr",
+"kg.kr",
+"mil.kr",
+"ms.kr",
+"ne.kr",
+"or.kr",
+"pe.kr",
+"re.kr",
+"sc.kr",
+"busan.kr",
+"chungbuk.kr",
+"chungnam.kr",
+"daegu.kr",
+"daejeon.kr",
+"gangwon.kr",
+"gwangju.kr",
+"gyeongbuk.kr",
+"gyeonggi.kr",
+"gyeongnam.kr",
+"incheon.kr",
+"jeju.kr",
+"jeonbuk.kr",
+"jeonnam.kr",
+"seoul.kr",
+"ulsan.kr",
+"kw",
+"com.kw",
+"edu.kw",
+"emb.kw",
+"gov.kw",
+"ind.kw",
+"net.kw",
+"org.kw",
+"ky",
+"edu.ky",
+"gov.ky",
+"com.ky",
+"org.ky",
+"net.ky",
+"kz",
+"org.kz",
+"edu.kz",
+"net.kz",
+"gov.kz",
+"mil.kz",
+"com.kz",
+"la",
+"int.la",
+"net.la",
+"info.la",
+"edu.la",
+"gov.la",
+"per.la",
+"com.la",
+"org.la",
+"lb",
+"com.lb",
+"edu.lb",
+"gov.lb",
+"net.lb",
+"org.lb",
+"lc",
+"com.lc",
+"net.lc",
+"co.lc",
+"org.lc",
+"edu.lc",
+"gov.lc",
+"li",
+"lk",
+"gov.lk",
+"sch.lk",
+"net.lk",
+"int.lk",
+"com.lk",
+"org.lk",
+"edu.lk",
+"ngo.lk",
+"soc.lk",
+"web.lk",
+"ltd.lk",
+"assn.lk",
+"grp.lk",
+"hotel.lk",
+"ac.lk",
+"lr",
+"com.lr",
+"edu.lr",
+"gov.lr",
+"org.lr",
+"net.lr",
+"ls",
+"ac.ls",
+"biz.ls",
+"co.ls",
+"edu.ls",
+"gov.ls",
+"info.ls",
+"net.ls",
+"org.ls",
+"sc.ls",
+"lt",
+"gov.lt",
+"lu",
+"lv",
+"com.lv",
+"edu.lv",
+"gov.lv",
+"org.lv",
+"mil.lv",
+"id.lv",
+"net.lv",
+"asn.lv",
+"conf.lv",
+"ly",
+"com.ly",
+"net.ly",
+"gov.ly",
+"plc.ly",
+"edu.ly",
+"sch.ly",
+"med.ly",
+"org.ly",
+"id.ly",
+"ma",
+"co.ma",
+"net.ma",
+"gov.ma",
+"org.ma",
+"ac.ma",
+"press.ma",
+"mc",
+"tm.mc",
+"asso.mc",
+"md",
+"me",
+"co.me",
+"net.me",
+"org.me",
+"edu.me",
+"ac.me",
+"gov.me",
+"its.me",
+"priv.me",
+"mg",
+"org.mg",
+"nom.mg",
+"gov.mg",
+"prd.mg",
+"tm.mg",
+"edu.mg",
+"mil.mg",
+"com.mg",
+"co.mg",
+"mh",
+"mil",
+"mk",
+"com.mk",
+"org.mk",
+"net.mk",
+"edu.mk",
+"gov.mk",
+"inf.mk",
+"name.mk",
+"ml",
+"com.ml",
+"edu.ml",
+"gouv.ml",
+"gov.ml",
+"net.ml",
+"org.ml",
+"presse.ml",
+"*.mm",
+"mn",
+"gov.mn",
+"edu.mn",
+"org.mn",
+"mo",
+"com.mo",
+"net.mo",
+"org.mo",
+"edu.mo",
+"gov.mo",
+"mobi",
+"mp",
+"mq",
+"mr",
+"gov.mr",
+"ms",
+"com.ms",
+"edu.ms",
+"gov.ms",
+"net.ms",
+"org.ms",
+"mt",
+"com.mt",
+"edu.mt",
+"net.mt",
+"org.mt",
+"mu",
+"com.mu",
+"net.mu",
+"org.mu",
+"gov.mu",
+"ac.mu",
+"co.mu",
+"or.mu",
+"museum",
+"academy.museum",
+"agriculture.museum",
+"air.museum",
+"airguard.museum",
+"alabama.museum",
+"alaska.museum",
+"amber.museum",
+"ambulance.museum",
+"american.museum",
+"americana.museum",
+"americanantiques.museum",
+"americanart.museum",
+"amsterdam.museum",
+"and.museum",
+"annefrank.museum",
+"anthro.museum",
+"anthropology.museum",
+"antiques.museum",
+"aquarium.museum",
+"arboretum.museum",
+"archaeological.museum",
+"archaeology.museum",
+"architecture.museum",
+"art.museum",
+"artanddesign.museum",
+"artcenter.museum",
+"artdeco.museum",
+"arteducation.museum",
+"artgallery.museum",
+"arts.museum",
+"artsandcrafts.museum",
+"asmatart.museum",
+"assassination.museum",
+"assisi.museum",
+"association.museum",
+"astronomy.museum",
+"atlanta.museum",
+"austin.museum",
+"australia.museum",
+"automotive.museum",
+"aviation.museum",
+"axis.museum",
+"badajoz.museum",
+"baghdad.museum",
+"bahn.museum",
+"bale.museum",
+"baltimore.museum",
+"barcelona.museum",
+"baseball.museum",
+"basel.museum",
+"baths.museum",
+"bauern.museum",
+"beauxarts.museum",
+"beeldengeluid.museum",
+"bellevue.museum",
+"bergbau.museum",
+"berkeley.museum",
+"berlin.museum",
+"bern.museum",
+"bible.museum",
+"bilbao.museum",
+"bill.museum",
+"birdart.museum",
+"birthplace.museum",
+"bonn.museum",
+"boston.museum",
+"botanical.museum",
+"botanicalgarden.museum",
+"botanicgarden.museum",
+"botany.museum",
+"brandywinevalley.museum",
+"brasil.museum",
+"bristol.museum",
+"british.museum",
+"britishcolumbia.museum",
+"broadcast.museum",
+"brunel.museum",
+"brussel.museum",
+"brussels.museum",
+"bruxelles.museum",
+"building.museum",
+"burghof.museum",
+"bus.museum",
+"bushey.museum",
+"cadaques.museum",
+"california.museum",
+"cambridge.museum",
+"can.museum",
+"canada.museum",
+"capebreton.museum",
+"carrier.museum",
+"cartoonart.museum",
+"casadelamoneda.museum",
+"castle.museum",
+"castres.museum",
+"celtic.museum",
+"center.museum",
+"chattanooga.museum",
+"cheltenham.museum",
+"chesapeakebay.museum",
+"chicago.museum",
+"children.museum",
+"childrens.museum",
+"childrensgarden.museum",
+"chiropractic.museum",
+"chocolate.museum",
+"christiansburg.museum",
+"cincinnati.museum",
+"cinema.museum",
+"circus.museum",
+"civilisation.museum",
+"civilization.museum",
+"civilwar.museum",
+"clinton.museum",
+"clock.museum",
+"coal.museum",
+"coastaldefence.museum",
+"cody.museum",
+"coldwar.museum",
+"collection.museum",
+"colonialwilliamsburg.museum",
+"coloradoplateau.museum",
+"columbia.museum",
+"columbus.museum",
+"communication.museum",
+"communications.museum",
+"community.museum",
+"computer.museum",
+"computerhistory.museum",
+"comunicações.museum",
+"contemporary.museum",
+"contemporaryart.museum",
+"convent.museum",
+"copenhagen.museum",
+"corporation.museum",
+"correios-e-telecomunicações.museum",
+"corvette.museum",
+"costume.museum",
+"countryestate.museum",
+"county.museum",
+"crafts.museum",
+"cranbrook.museum",
+"creation.museum",
+"cultural.museum",
+"culturalcenter.museum",
+"culture.museum",
+"cyber.museum",
+"cymru.museum",
+"dali.museum",
+"dallas.museum",
+"database.museum",
+"ddr.museum",
+"decorativearts.museum",
+"delaware.museum",
+"delmenhorst.museum",
+"denmark.museum",
+"depot.museum",
+"design.museum",
+"detroit.museum",
+"dinosaur.museum",
+"discovery.museum",
+"dolls.museum",
+"donostia.museum",
+"durham.museum",
+"eastafrica.museum",
+"eastcoast.museum",
+"education.museum",
+"educational.museum",
+"egyptian.museum",
+"eisenbahn.museum",
+"elburg.museum",
+"elvendrell.museum",
+"embroidery.museum",
+"encyclopedic.museum",
+"england.museum",
+"entomology.museum",
+"environment.museum",
+"environmentalconservation.museum",
+"epilepsy.museum",
+"essex.museum",
+"estate.museum",
+"ethnology.museum",
+"exeter.museum",
+"exhibition.museum",
+"family.museum",
+"farm.museum",
+"farmequipment.museum",
+"farmers.museum",
+"farmstead.museum",
+"field.museum",
+"figueres.museum",
+"filatelia.museum",
+"film.museum",
+"fineart.museum",
+"finearts.museum",
+"finland.museum",
+"flanders.museum",
+"florida.museum",
+"force.museum",
+"fortmissoula.museum",
+"fortworth.museum",
+"foundation.museum",
+"francaise.museum",
+"frankfurt.museum",
+"franziskaner.museum",
+"freemasonry.museum",
+"freiburg.museum",
+"fribourg.museum",
+"frog.museum",
+"fundacio.museum",
+"furniture.museum",
+"gallery.museum",
+"garden.museum",
+"gateway.museum",
+"geelvinck.museum",
+"gemological.museum",
+"geology.museum",
+"georgia.museum",
+"giessen.museum",
+"glas.museum",
+"glass.museum",
+"gorge.museum",
+"grandrapids.museum",
+"graz.museum",
+"guernsey.museum",
+"halloffame.museum",
+"hamburg.museum",
+"handson.museum",
+"harvestcelebration.museum",
+"hawaii.museum",
+"health.museum",
+"heimatunduhren.museum",
+"hellas.museum",
+"helsinki.museum",
+"hembygdsforbund.museum",
+"heritage.museum",
+"histoire.museum",
+"historical.museum",
+"historicalsociety.museum",
+"historichouses.museum",
+"historisch.museum",
+"historisches.museum",
+"history.museum",
+"historyofscience.museum",
+"horology.museum",
+"house.museum",
+"humanities.museum",
+"illustration.museum",
+"imageandsound.museum",
+"indian.museum",
+"indiana.museum",
+"indianapolis.museum",
+"indianmarket.museum",
+"intelligence.museum",
+"interactive.museum",
+"iraq.museum",
+"iron.museum",
+"isleofman.museum",
+"jamison.museum",
+"jefferson.museum",
+"jerusalem.museum",
+"jewelry.museum",
+"jewish.museum",
+"jewishart.museum",
+"jfk.museum",
+"journalism.museum",
+"judaica.museum",
+"judygarland.museum",
+"juedisches.museum",
+"juif.museum",
+"karate.museum",
+"karikatur.museum",
+"kids.museum",
+"koebenhavn.museum",
+"koeln.museum",
+"kunst.museum",
+"kunstsammlung.museum",
+"kunstunddesign.museum",
+"labor.museum",
+"labour.museum",
+"lajolla.museum",
+"lancashire.museum",
+"landes.museum",
+"lans.museum",
+"läns.museum",
+"larsson.museum",
+"lewismiller.museum",
+"lincoln.museum",
+"linz.museum",
+"living.museum",
+"livinghistory.museum",
+"localhistory.museum",
+"london.museum",
+"losangeles.museum",
+"louvre.museum",
+"loyalist.museum",
+"lucerne.museum",
+"luxembourg.museum",
+"luzern.museum",
+"mad.museum",
+"madrid.museum",
+"mallorca.museum",
+"manchester.museum",
+"mansion.museum",
+"mansions.museum",
+"manx.museum",
+"marburg.museum",
+"maritime.museum",
+"maritimo.museum",
+"maryland.museum",
+"marylhurst.museum",
+"media.museum",
+"medical.museum",
+"medizinhistorisches.museum",
+"meeres.museum",
+"memorial.museum",
+"mesaverde.museum",
+"michigan.museum",
+"midatlantic.museum",
+"military.museum",
+"mill.museum",
+"miners.museum",
+"mining.museum",
+"minnesota.museum",
+"missile.museum",
+"missoula.museum",
+"modern.museum",
+"moma.museum",
+"money.museum",
+"monmouth.museum",
+"monticello.museum",
+"montreal.museum",
+"moscow.museum",
+"motorcycle.museum",
+"muenchen.museum",
+"muenster.museum",
+"mulhouse.museum",
+"muncie.museum",
+"museet.museum",
+"museumcenter.museum",
+"museumvereniging.museum",
+"music.museum",
+"national.museum",
+"nationalfirearms.museum",
+"nationalheritage.museum",
+"nativeamerican.museum",
+"naturalhistory.museum",
+"naturalhistorymuseum.museum",
+"naturalsciences.museum",
+"nature.museum",
+"naturhistorisches.museum",
+"natuurwetenschappen.museum",
+"naumburg.museum",
+"naval.museum",
+"nebraska.museum",
+"neues.museum",
+"newhampshire.museum",
+"newjersey.museum",
+"newmexico.museum",
+"newport.museum",
+"newspaper.museum",
+"newyork.museum",
+"niepce.museum",
+"norfolk.museum",
+"north.museum",
+"nrw.museum",
+"nyc.museum",
+"nyny.museum",
+"oceanographic.museum",
+"oceanographique.museum",
+"omaha.museum",
+"online.museum",
+"ontario.museum",
+"openair.museum",
+"oregon.museum",
+"oregontrail.museum",
+"otago.museum",
+"oxford.museum",
+"pacific.museum",
+"paderborn.museum",
+"palace.museum",
+"paleo.museum",
+"palmsprings.museum",
+"panama.museum",
+"paris.museum",
+"pasadena.museum",
+"pharmacy.museum",
+"philadelphia.museum",
+"philadelphiaarea.museum",
+"philately.museum",
+"phoenix.museum",
+"photography.museum",
+"pilots.museum",
+"pittsburgh.museum",
+"planetarium.museum",
+"plantation.museum",
+"plants.museum",
+"plaza.museum",
+"portal.museum",
+"portland.museum",
+"portlligat.museum",
+"posts-and-telecommunications.museum",
+"preservation.museum",
+"presidio.museum",
+"press.museum",
+"project.museum",
+"public.museum",
+"pubol.museum",
+"quebec.museum",
+"railroad.museum",
+"railway.museum",
+"research.museum",
+"resistance.museum",
+"riodejaneiro.museum",
+"rochester.museum",
+"rockart.museum",
+"roma.museum",
+"russia.museum",
+"saintlouis.museum",
+"salem.museum",
+"salvadordali.museum",
+"salzburg.museum",
+"sandiego.museum",
+"sanfrancisco.museum",
+"santabarbara.museum",
+"santacruz.museum",
+"santafe.museum",
+"saskatchewan.museum",
+"satx.museum",
+"savannahga.museum",
+"schlesisches.museum",
+"schoenbrunn.museum",
+"schokoladen.museum",
+"school.museum",
+"schweiz.museum",
+"science.museum",
+"scienceandhistory.museum",
+"scienceandindustry.museum",
+"sciencecenter.museum",
+"sciencecenters.museum",
+"science-fiction.museum",
+"sciencehistory.museum",
+"sciences.museum",
+"sciencesnaturelles.museum",
+"scotland.museum",
+"seaport.museum",
+"settlement.museum",
+"settlers.museum",
+"shell.museum",
+"sherbrooke.museum",
+"sibenik.museum",
+"silk.museum",
+"ski.museum",
+"skole.museum",
+"society.museum",
+"sologne.museum",
+"soundandvision.museum",
+"southcarolina.museum",
+"southwest.museum",
+"space.museum",
+"spy.museum",
+"square.museum",
+"stadt.museum",
+"stalbans.museum",
+"starnberg.museum",
+"state.museum",
+"stateofdelaware.museum",
+"station.museum",
+"steam.museum",
+"steiermark.museum",
+"stjohn.museum",
+"stockholm.museum",
+"stpetersburg.museum",
+"stuttgart.museum",
+"suisse.museum",
+"surgeonshall.museum",
+"surrey.museum",
+"svizzera.museum",
+"sweden.museum",
+"sydney.museum",
+"tank.museum",
+"tcm.museum",
+"technology.museum",
+"telekommunikation.museum",
+"television.museum",
+"texas.museum",
+"textile.museum",
+"theater.museum",
+"time.museum",
+"timekeeping.museum",
+"topology.museum",
+"torino.museum",
+"touch.museum",
+"town.museum",
+"transport.museum",
+"tree.museum",
+"trolley.museum",
+"trust.museum",
+"trustee.museum",
+"uhren.museum",
+"ulm.museum",
+"undersea.museum",
+"university.museum",
+"usa.museum",
+"usantiques.museum",
+"usarts.museum",
+"uscountryestate.museum",
+"usculture.museum",
+"usdecorativearts.museum",
+"usgarden.museum",
+"ushistory.museum",
+"ushuaia.museum",
+"uslivinghistory.museum",
+"utah.museum",
+"uvic.museum",
+"valley.museum",
+"vantaa.museum",
+"versailles.museum",
+"viking.museum",
+"village.museum",
+"virginia.museum",
+"virtual.museum",
+"virtuel.museum",
+"vlaanderen.museum",
+"volkenkunde.museum",
+"wales.museum",
+"wallonie.museum",
+"war.museum",
+"washingtondc.museum",
+"watchandclock.museum",
+"watch-and-clock.museum",
+"western.museum",
+"westfalen.museum",
+"whaling.museum",
+"wildlife.museum",
+"williamsburg.museum",
+"windmill.museum",
+"workshop.museum",
+"york.museum",
+"yorkshire.museum",
+"yosemite.museum",
+"youth.museum",
+"zoological.museum",
+"zoology.museum",
+"ירושלים.museum",
+"иком.museum",
+"mv",
+"aero.mv",
+"biz.mv",
+"com.mv",
+"coop.mv",
+"edu.mv",
+"gov.mv",
+"info.mv",
+"int.mv",
+"mil.mv",
+"museum.mv",
+"name.mv",
+"net.mv",
+"org.mv",
+"pro.mv",
+"mw",
+"ac.mw",
+"biz.mw",
+"co.mw",
+"com.mw",
+"coop.mw",
+"edu.mw",
+"gov.mw",
+"int.mw",
+"museum.mw",
+"net.mw",
+"org.mw",
+"mx",
+"com.mx",
+"org.mx",
+"gob.mx",
+"edu.mx",
+"net.mx",
+"my",
+"com.my",
+"net.my",
+"org.my",
+"gov.my",
+"edu.my",
+"mil.my",
+"name.my",
+"mz",
+"ac.mz",
+"adv.mz",
+"co.mz",
+"edu.mz",
+"gov.mz",
+"mil.mz",
+"net.mz",
+"org.mz",
+"na",
+"info.na",
+"pro.na",
+"name.na",
+"school.na",
+"or.na",
+"dr.na",
+"us.na",
+"mx.na",
+"ca.na",
+"in.na",
+"cc.na",
+"tv.na",
+"ws.na",
+"mobi.na",
+"co.na",
+"com.na",
+"org.na",
+"name",
+"nc",
+"asso.nc",
+"nom.nc",
+"ne",
+"net",
+"nf",
+"com.nf",
+"net.nf",
+"per.nf",
+"rec.nf",
+"web.nf",
+"arts.nf",
+"firm.nf",
+"info.nf",
+"other.nf",
+"store.nf",
+"ng",
+"com.ng",
+"edu.ng",
+"gov.ng",
+"i.ng",
+"mil.ng",
+"mobi.ng",
+"name.ng",
+"net.ng",
+"org.ng",
+"sch.ng",
+"ni",
+"ac.ni",
+"biz.ni",
+"co.ni",
+"com.ni",
+"edu.ni",
+"gob.ni",
+"in.ni",
+"info.ni",
+"int.ni",
+"mil.ni",
+"net.ni",
+"nom.ni",
+"org.ni",
+"web.ni",
+"nl",
+"no",
+"fhs.no",
+"vgs.no",
+"fylkesbibl.no",
+"folkebibl.no",
+"museum.no",
+"idrett.no",
+"priv.no",
+"mil.no",
+"stat.no",
+"dep.no",
+"kommune.no",
+"herad.no",
+"aa.no",
+"ah.no",
+"bu.no",
+"fm.no",
+"hl.no",
+"hm.no",
+"jan-mayen.no",
+"mr.no",
+"nl.no",
+"nt.no",
+"of.no",
+"ol.no",
+"oslo.no",
+"rl.no",
+"sf.no",
+"st.no",
+"svalbard.no",
+"tm.no",
+"tr.no",
+"va.no",
+"vf.no",
+"gs.aa.no",
+"gs.ah.no",
+"gs.bu.no",
+"gs.fm.no",
+"gs.hl.no",
+"gs.hm.no",
+"gs.jan-mayen.no",
+"gs.mr.no",
+"gs.nl.no",
+"gs.nt.no",
+"gs.of.no",
+"gs.ol.no",
+"gs.oslo.no",
+"gs.rl.no",
+"gs.sf.no",
+"gs.st.no",
+"gs.svalbard.no",
+"gs.tm.no",
+"gs.tr.no",
+"gs.va.no",
+"gs.vf.no",
+"akrehamn.no",
+"åkrehamn.no",
+"algard.no",
+"ålgård.no",
+"arna.no",
+"brumunddal.no",
+"bryne.no",
+"bronnoysund.no",
+"brønnøysund.no",
+"drobak.no",
+"drøbak.no",
+"egersund.no",
+"fetsund.no",
+"floro.no",
+"florø.no",
+"fredrikstad.no",
+"hokksund.no",
+"honefoss.no",
+"hønefoss.no",
+"jessheim.no",
+"jorpeland.no",
+"jørpeland.no",
+"kirkenes.no",
+"kopervik.no",
+"krokstadelva.no",
+"langevag.no",
+"langevåg.no",
+"leirvik.no",
+"mjondalen.no",
+"mjøndalen.no",
+"mo-i-rana.no",
+"mosjoen.no",
+"mosjøen.no",
+"nesoddtangen.no",
+"orkanger.no",
+"osoyro.no",
+"osøyro.no",
+"raholt.no",
+"råholt.no",
+"sandnessjoen.no",
+"sandnessjøen.no",
+"skedsmokorset.no",
+"slattum.no",
+"spjelkavik.no",
+"stathelle.no",
+"stavern.no",
+"stjordalshalsen.no",
+"stjørdalshalsen.no",
+"tananger.no",
+"tranby.no",
+"vossevangen.no",
+"afjord.no",
+"åfjord.no",
+"agdenes.no",
+"al.no",
+"ål.no",
+"alesund.no",
+"ålesund.no",
+"alstahaug.no",
+"alta.no",
+"áltá.no",
+"alaheadju.no",
+"álaheadju.no",
+"alvdal.no",
+"amli.no",
+"åmli.no",
+"amot.no",
+"åmot.no",
+"andebu.no",
+"andoy.no",
+"andøy.no",
+"andasuolo.no",
+"ardal.no",
+"årdal.no",
+"aremark.no",
+"arendal.no",
+"ås.no",
+"aseral.no",
+"åseral.no",
+"asker.no",
+"askim.no",
+"askvoll.no",
+"askoy.no",
+"askøy.no",
+"asnes.no",
+"åsnes.no",
+"audnedaln.no",
+"aukra.no",
+"aure.no",
+"aurland.no",
+"aurskog-holand.no",
+"aurskog-høland.no",
+"austevoll.no",
+"austrheim.no",
+"averoy.no",
+"averøy.no",
+"balestrand.no",
+"ballangen.no",
+"balat.no",
+"bálát.no",
+"balsfjord.no",
+"bahccavuotna.no",
+"báhccavuotna.no",
+"bamble.no",
+"bardu.no",
+"beardu.no",
+"beiarn.no",
+"bajddar.no",
+"bájddar.no",
+"baidar.no",
+"báidár.no",
+"berg.no",
+"bergen.no",
+"berlevag.no",
+"berlevåg.no",
+"bearalvahki.no",
+"bearalváhki.no",
+"bindal.no",
+"birkenes.no",
+"bjarkoy.no",
+"bjarkøy.no",
+"bjerkreim.no",
+"bjugn.no",
+"bodo.no",
+"bodø.no",
+"badaddja.no",
+"bådåddjå.no",
+"budejju.no",
+"bokn.no",
+"bremanger.no",
+"bronnoy.no",
+"brønnøy.no",
+"bygland.no",
+"bykle.no",
+"barum.no",
+"bærum.no",
+"bo.telemark.no",
+"bø.telemark.no",
+"bo.nordland.no",
+"bø.nordland.no",
+"bievat.no",
+"bievát.no",
+"bomlo.no",
+"bømlo.no",
+"batsfjord.no",
+"båtsfjord.no",
+"bahcavuotna.no",
+"báhcavuotna.no",
+"dovre.no",
+"drammen.no",
+"drangedal.no",
+"dyroy.no",
+"dyrøy.no",
+"donna.no",
+"dønna.no",
+"eid.no",
+"eidfjord.no",
+"eidsberg.no",
+"eidskog.no",
+"eidsvoll.no",
+"eigersund.no",
+"elverum.no",
+"enebakk.no",
+"engerdal.no",
+"etne.no",
+"etnedal.no",
+"evenes.no",
+"evenassi.no",
+"evenášši.no",
+"evje-og-hornnes.no",
+"farsund.no",
+"fauske.no",
+"fuossko.no",
+"fuoisku.no",
+"fedje.no",
+"fet.no",
+"finnoy.no",
+"finnøy.no",
+"fitjar.no",
+"fjaler.no",
+"fjell.no",
+"flakstad.no",
+"flatanger.no",
+"flekkefjord.no",
+"flesberg.no",
+"flora.no",
+"fla.no",
+"flå.no",
+"folldal.no",
+"forsand.no",
+"fosnes.no",
+"frei.no",
+"frogn.no",
+"froland.no",
+"frosta.no",
+"frana.no",
+"fræna.no",
+"froya.no",
+"frøya.no",
+"fusa.no",
+"fyresdal.no",
+"forde.no",
+"førde.no",
+"gamvik.no",
+"gangaviika.no",
+"gáŋgaviika.no",
+"gaular.no",
+"gausdal.no",
+"gildeskal.no",
+"gildeskål.no",
+"giske.no",
+"gjemnes.no",
+"gjerdrum.no",
+"gjerstad.no",
+"gjesdal.no",
+"gjovik.no",
+"gjøvik.no",
+"gloppen.no",
+"gol.no",
+"gran.no",
+"grane.no",
+"granvin.no",
+"gratangen.no",
+"grimstad.no",
+"grong.no",
+"kraanghke.no",
+"kråanghke.no",
+"grue.no",
+"gulen.no",
+"hadsel.no",
+"halden.no",
+"halsa.no",
+"hamar.no",
+"hamaroy.no",
+"habmer.no",
+"hábmer.no",
+"hapmir.no",
+"hápmir.no",
+"hammerfest.no",
+"hammarfeasta.no",
+"hámmárfeasta.no",
+"haram.no",
+"hareid.no",
+"harstad.no",
+"hasvik.no",
+"aknoluokta.no",
+"ákŋoluokta.no",
+"hattfjelldal.no",
+"aarborte.no",
+"haugesund.no",
+"hemne.no",
+"hemnes.no",
+"hemsedal.no",
+"heroy.more-og-romsdal.no",
+"herøy.møre-og-romsdal.no",
+"heroy.nordland.no",
+"herøy.nordland.no",
+"hitra.no",
+"hjartdal.no",
+"hjelmeland.no",
+"hobol.no",
+"hobøl.no",
+"hof.no",
+"hol.no",
+"hole.no",
+"holmestrand.no",
+"holtalen.no",
+"holtålen.no",
+"hornindal.no",
+"horten.no",
+"hurdal.no",
+"hurum.no",
+"hvaler.no",
+"hyllestad.no",
+"hagebostad.no",
+"hægebostad.no",
+"hoyanger.no",
+"høyanger.no",
+"hoylandet.no",
+"høylandet.no",
+"ha.no",
+"hå.no",
+"ibestad.no",
+"inderoy.no",
+"inderøy.no",
+"iveland.no",
+"jevnaker.no",
+"jondal.no",
+"jolster.no",
+"jølster.no",
+"karasjok.no",
+"karasjohka.no",
+"kárášjohka.no",
+"karlsoy.no",
+"galsa.no",
+"gálsá.no",
+"karmoy.no",
+"karmøy.no",
+"kautokeino.no",
+"guovdageaidnu.no",
+"klepp.no",
+"klabu.no",
+"klæbu.no",
+"kongsberg.no",
+"kongsvinger.no",
+"kragero.no",
+"kragerø.no",
+"kristiansand.no",
+"kristiansund.no",
+"krodsherad.no",
+"krødsherad.no",
+"kvalsund.no",
+"rahkkeravju.no",
+"ráhkkerávju.no",
+"kvam.no",
+"kvinesdal.no",
+"kvinnherad.no",
+"kviteseid.no",
+"kvitsoy.no",
+"kvitsøy.no",
+"kvafjord.no",
+"kvæfjord.no",
+"giehtavuoatna.no",
+"kvanangen.no",
+"kvænangen.no",
+"navuotna.no",
+"návuotna.no",
+"kafjord.no",
+"kåfjord.no",
+"gaivuotna.no",
+"gáivuotna.no",
+"larvik.no",
+"lavangen.no",
+"lavagis.no",
+"loabat.no",
+"loabát.no",
+"lebesby.no",
+"davvesiida.no",
+"leikanger.no",
+"leirfjord.no",
+"leka.no",
+"leksvik.no",
+"lenvik.no",
+"leangaviika.no",
+"leaŋgaviika.no",
+"lesja.no",
+"levanger.no",
+"lier.no",
+"lierne.no",
+"lillehammer.no",
+"lillesand.no",
+"lindesnes.no",
+"lindas.no",
+"lindås.no",
+"lom.no",
+"loppa.no",
+"lahppi.no",
+"láhppi.no",
+"lund.no",
+"lunner.no",
+"luroy.no",
+"lurøy.no",
+"luster.no",
+"lyngdal.no",
+"lyngen.no",
+"ivgu.no",
+"lardal.no",
+"lerdal.no",
+"lærdal.no",
+"lodingen.no",
+"lødingen.no",
+"lorenskog.no",
+"lørenskog.no",
+"loten.no",
+"løten.no",
+"malvik.no",
+"masoy.no",
+"måsøy.no",
+"muosat.no",
+"muosát.no",
+"mandal.no",
+"marker.no",
+"marnardal.no",
+"masfjorden.no",
+"meland.no",
+"meldal.no",
+"melhus.no",
+"meloy.no",
+"meløy.no",
+"meraker.no",
+"meråker.no",
+"moareke.no",
+"moåreke.no",
+"midsund.no",
+"midtre-gauldal.no",
+"modalen.no",
+"modum.no",
+"molde.no",
+"moskenes.no",
+"moss.no",
+"mosvik.no",
+"malselv.no",
+"målselv.no",
+"malatvuopmi.no",
+"málatvuopmi.no",
+"namdalseid.no",
+"aejrie.no",
+"namsos.no",
+"namsskogan.no",
+"naamesjevuemie.no",
+"nååmesjevuemie.no",
+"laakesvuemie.no",
+"nannestad.no",
+"narvik.no",
+"narviika.no",
+"naustdal.no",
+"nedre-eiker.no",
+"nes.akershus.no",
+"nes.buskerud.no",
+"nesna.no",
+"nesodden.no",
+"nesseby.no",
+"unjarga.no",
+"unjárga.no",
+"nesset.no",
+"nissedal.no",
+"nittedal.no",
+"nord-aurdal.no",
+"nord-fron.no",
+"nord-odal.no",
+"norddal.no",
+"nordkapp.no",
+"davvenjarga.no",
+"davvenjárga.no",
+"nordre-land.no",
+"nordreisa.no",
+"raisa.no",
+"ráisa.no",
+"nore-og-uvdal.no",
+"notodden.no",
+"naroy.no",
+"nærøy.no",
+"notteroy.no",
+"nøtterøy.no",
+"odda.no",
+"oksnes.no",
+"øksnes.no",
+"oppdal.no",
+"oppegard.no",
+"oppegård.no",
+"orkdal.no",
+"orland.no",
+"ørland.no",
+"orskog.no",
+"ørskog.no",
+"orsta.no",
+"ørsta.no",
+"os.hedmark.no",
+"os.hordaland.no",
+"osen.no",
+"osteroy.no",
+"osterøy.no",
+"ostre-toten.no",
+"østre-toten.no",
+"overhalla.no",
+"ovre-eiker.no",
+"øvre-eiker.no",
+"oyer.no",
+"øyer.no",
+"oygarden.no",
+"øygarden.no",
+"oystre-slidre.no",
+"øystre-slidre.no",
+"porsanger.no",
+"porsangu.no",
+"porsáŋgu.no",
+"porsgrunn.no",
+"radoy.no",
+"radøy.no",
+"rakkestad.no",
+"rana.no",
+"ruovat.no",
+"randaberg.no",
+"rauma.no",
+"rendalen.no",
+"rennebu.no",
+"rennesoy.no",
+"rennesøy.no",
+"rindal.no",
+"ringebu.no",
+"ringerike.no",
+"ringsaker.no",
+"rissa.no",
+"risor.no",
+"risør.no",
+"roan.no",
+"rollag.no",
+"rygge.no",
+"ralingen.no",
+"rælingen.no",
+"rodoy.no",
+"rødøy.no",
+"romskog.no",
+"rømskog.no",
+"roros.no",
+"røros.no",
+"rost.no",
+"røst.no",
+"royken.no",
+"røyken.no",
+"royrvik.no",
+"røyrvik.no",
+"rade.no",
+"råde.no",
+"salangen.no",
+"siellak.no",
+"saltdal.no",
+"salat.no",
+"sálát.no",
+"sálat.no",
+"samnanger.no",
+"sande.more-og-romsdal.no",
+"sande.møre-og-romsdal.no",
+"sande.vestfold.no",
+"sandefjord.no",
+"sandnes.no",
+"sandoy.no",
+"sandøy.no",
+"sarpsborg.no",
+"sauda.no",
+"sauherad.no",
+"sel.no",
+"selbu.no",
+"selje.no",
+"seljord.no",
+"sigdal.no",
+"siljan.no",
+"sirdal.no",
+"skaun.no",
+"skedsmo.no",
+"ski.no",
+"skien.no",
+"skiptvet.no",
+"skjervoy.no",
+"skjervøy.no",
+"skierva.no",
+"skiervá.no",
+"skjak.no",
+"skjåk.no",
+"skodje.no",
+"skanland.no",
+"skånland.no",
+"skanit.no",
+"skánit.no",
+"smola.no",
+"smøla.no",
+"snillfjord.no",
+"snasa.no",
+"snåsa.no",
+"snoasa.no",
+"snaase.no",
+"snåase.no",
+"sogndal.no",
+"sokndal.no",
+"sola.no",
+"solund.no",
+"songdalen.no",
+"sortland.no",
+"spydeberg.no",
+"stange.no",
+"stavanger.no",
+"steigen.no",
+"steinkjer.no",
+"stjordal.no",
+"stjørdal.no",
+"stokke.no",
+"stor-elvdal.no",
+"stord.no",
+"stordal.no",
+"storfjord.no",
+"omasvuotna.no",
+"strand.no",
+"stranda.no",
+"stryn.no",
+"sula.no",
+"suldal.no",
+"sund.no",
+"sunndal.no",
+"surnadal.no",
+"sveio.no",
+"svelvik.no",
+"sykkylven.no",
+"sogne.no",
+"søgne.no",
+"somna.no",
+"sømna.no",
+"sondre-land.no",
+"søndre-land.no",
+"sor-aurdal.no",
+"sør-aurdal.no",
+"sor-fron.no",
+"sør-fron.no",
+"sor-odal.no",
+"sør-odal.no",
+"sor-varanger.no",
+"sør-varanger.no",
+"matta-varjjat.no",
+"mátta-várjjat.no",
+"sorfold.no",
+"sørfold.no",
+"sorreisa.no",
+"sørreisa.no",
+"sorum.no",
+"sørum.no",
+"tana.no",
+"deatnu.no",
+"time.no",
+"tingvoll.no",
+"tinn.no",
+"tjeldsund.no",
+"dielddanuorri.no",
+"tjome.no",
+"tjøme.no",
+"tokke.no",
+"tolga.no",
+"torsken.no",
+"tranoy.no",
+"tranøy.no",
+"tromso.no",
+"tromsø.no",
+"tromsa.no",
+"romsa.no",
+"trondheim.no",
+"troandin.no",
+"trysil.no",
+"trana.no",
+"træna.no",
+"trogstad.no",
+"trøgstad.no",
+"tvedestrand.no",
+"tydal.no",
+"tynset.no",
+"tysfjord.no",
+"divtasvuodna.no",
+"divttasvuotna.no",
+"tysnes.no",
+"tysvar.no",
+"tysvær.no",
+"tonsberg.no",
+"tønsberg.no",
+"ullensaker.no",
+"ullensvang.no",
+"ulvik.no",
+"utsira.no",
+"vadso.no",
+"vadsø.no",
+"cahcesuolo.no",
+"čáhcesuolo.no",
+"vaksdal.no",
+"valle.no",
+"vang.no",
+"vanylven.no",
+"vardo.no",
+"vardø.no",
+"varggat.no",
+"várggát.no",
+"vefsn.no",
+"vaapste.no",
+"vega.no",
+"vegarshei.no",
+"vegårshei.no",
+"vennesla.no",
+"verdal.no",
+"verran.no",
+"vestby.no",
+"vestnes.no",
+"vestre-slidre.no",
+"vestre-toten.no",
+"vestvagoy.no",
+"vestvågøy.no",
+"vevelstad.no",
+"vik.no",
+"vikna.no",
+"vindafjord.no",
+"volda.no",
+"voss.no",
+"varoy.no",
+"værøy.no",
+"vagan.no",
+"vågan.no",
+"voagat.no",
+"vagsoy.no",
+"vågsøy.no",
+"vaga.no",
+"vågå.no",
+"valer.ostfold.no",
+"våler.østfold.no",
+"valer.hedmark.no",
+"våler.hedmark.no",
+"*.np",
+"nr",
+"biz.nr",
+"info.nr",
+"gov.nr",
+"edu.nr",
+"org.nr",
+"net.nr",
+"com.nr",
+"nu",
+"nz",
+"ac.nz",
+"co.nz",
+"cri.nz",
+"geek.nz",
+"gen.nz",
+"govt.nz",
+"health.nz",
+"iwi.nz",
+"kiwi.nz",
+"maori.nz",
+"mil.nz",
+"māori.nz",
+"net.nz",
+"org.nz",
+"parliament.nz",
+"school.nz",
+"om",
+"co.om",
+"com.om",
+"edu.om",
+"gov.om",
+"med.om",
+"museum.om",
+"net.om",
+"org.om",
+"pro.om",
+"onion",
+"org",
+"pa",
+"ac.pa",
+"gob.pa",
+"com.pa",
+"org.pa",
+"sld.pa",
+"edu.pa",
+"net.pa",
+"ing.pa",
+"abo.pa",
+"med.pa",
+"nom.pa",
+"pe",
+"edu.pe",
+"gob.pe",
+"nom.pe",
+"mil.pe",
+"org.pe",
+"com.pe",
+"net.pe",
+"pf",
+"com.pf",
+"org.pf",
+"edu.pf",
+"*.pg",
+"ph",
+"com.ph",
+"net.ph",
+"org.ph",
+"gov.ph",
+"edu.ph",
+"ngo.ph",
+"mil.ph",
+"i.ph",
+"pk",
+"com.pk",
+"net.pk",
+"edu.pk",
+"org.pk",
+"fam.pk",
+"biz.pk",
+"web.pk",
+"gov.pk",
+"gob.pk",
+"gok.pk",
+"gon.pk",
+"gop.pk",
+"gos.pk",
+"info.pk",
+"pl",
+"com.pl",
+"net.pl",
+"org.pl",
+"aid.pl",
+"agro.pl",
+"atm.pl",
+"auto.pl",
+"biz.pl",
+"edu.pl",
+"gmina.pl",
+"gsm.pl",
+"info.pl",
+"mail.pl",
+"miasta.pl",
+"media.pl",
+"mil.pl",
+"nieruchomosci.pl",
+"nom.pl",
+"pc.pl",
+"powiat.pl",
+"priv.pl",
+"realestate.pl",
+"rel.pl",
+"sex.pl",
+"shop.pl",
+"sklep.pl",
+"sos.pl",
+"szkola.pl",
+"targi.pl",
+"tm.pl",
+"tourism.pl",
+"travel.pl",
+"turystyka.pl",
+"gov.pl",
+"ap.gov.pl",
+"ic.gov.pl",
+"is.gov.pl",
+"us.gov.pl",
+"kmpsp.gov.pl",
+"kppsp.gov.pl",
+"kwpsp.gov.pl",
+"psp.gov.pl",
+"wskr.gov.pl",
+"kwp.gov.pl",
+"mw.gov.pl",
+"ug.gov.pl",
+"um.gov.pl",
+"umig.gov.pl",
+"ugim.gov.pl",
+"upow.gov.pl",
+"uw.gov.pl",
+"starostwo.gov.pl",
+"pa.gov.pl",
+"po.gov.pl",
+"psse.gov.pl",
+"pup.gov.pl",
+"rzgw.gov.pl",
+"sa.gov.pl",
+"so.gov.pl",
+"sr.gov.pl",
+"wsa.gov.pl",
+"sko.gov.pl",
+"uzs.gov.pl",
+"wiih.gov.pl",
+"winb.gov.pl",
+"pinb.gov.pl",
+"wios.gov.pl",
+"witd.gov.pl",
+"wzmiuw.gov.pl",
+"piw.gov.pl",
+"wiw.gov.pl",
+"griw.gov.pl",
+"wif.gov.pl",
+"oum.gov.pl",
+"sdn.gov.pl",
+"zp.gov.pl",
+"uppo.gov.pl",
+"mup.gov.pl",
+"wuoz.gov.pl",
+"konsulat.gov.pl",
+"oirm.gov.pl",
+"augustow.pl",
+"babia-gora.pl",
+"bedzin.pl",
+"beskidy.pl",
+"bialowieza.pl",
+"bialystok.pl",
+"bielawa.pl",
+"bieszczady.pl",
+"boleslawiec.pl",
+"bydgoszcz.pl",
+"bytom.pl",
+"cieszyn.pl",
+"czeladz.pl",
+"czest.pl",
+"dlugoleka.pl",
+"elblag.pl",
+"elk.pl",
+"glogow.pl",
+"gniezno.pl",
+"gorlice.pl",
+"grajewo.pl",
+"ilawa.pl",
+"jaworzno.pl",
+"jelenia-gora.pl",
+"jgora.pl",
+"kalisz.pl",
+"kazimierz-dolny.pl",
+"karpacz.pl",
+"kartuzy.pl",
+"kaszuby.pl",
+"katowice.pl",
+"kepno.pl",
+"ketrzyn.pl",
+"klodzko.pl",
+"kobierzyce.pl",
+"kolobrzeg.pl",
+"konin.pl",
+"konskowola.pl",
+"kutno.pl",
+"lapy.pl",
+"lebork.pl",
+"legnica.pl",
+"lezajsk.pl",
+"limanowa.pl",
+"lomza.pl",
+"lowicz.pl",
+"lubin.pl",
+"lukow.pl",
+"malbork.pl",
+"malopolska.pl",
+"mazowsze.pl",
+"mazury.pl",
+"mielec.pl",
+"mielno.pl",
+"mragowo.pl",
+"naklo.pl",
+"nowaruda.pl",
+"nysa.pl",
+"olawa.pl",
+"olecko.pl",
+"olkusz.pl",
+"olsztyn.pl",
+"opoczno.pl",
+"opole.pl",
+"ostroda.pl",
+"ostroleka.pl",
+"ostrowiec.pl",
+"ostrowwlkp.pl",
+"pila.pl",
+"pisz.pl",
+"podhale.pl",
+"podlasie.pl",
+"polkowice.pl",
+"pomorze.pl",
+"pomorskie.pl",
+"prochowice.pl",
+"pruszkow.pl",
+"przeworsk.pl",
+"pulawy.pl",
+"radom.pl",
+"rawa-maz.pl",
+"rybnik.pl",
+"rzeszow.pl",
+"sanok.pl",
+"sejny.pl",
+"slask.pl",
+"slupsk.pl",
+"sosnowiec.pl",
+"stalowa-wola.pl",
+"skoczow.pl",
+"starachowice.pl",
+"stargard.pl",
+"suwalki.pl",
+"swidnica.pl",
+"swiebodzin.pl",
+"swinoujscie.pl",
+"szczecin.pl",
+"szczytno.pl",
+"tarnobrzeg.pl",
+"tgory.pl",
+"turek.pl",
+"tychy.pl",
+"ustka.pl",
+"walbrzych.pl",
+"warmia.pl",
+"warszawa.pl",
+"waw.pl",
+"wegrow.pl",
+"wielun.pl",
+"wlocl.pl",
+"wloclawek.pl",
+"wodzislaw.pl",
+"wolomin.pl",
+"wroclaw.pl",
+"zachpomor.pl",
+"zagan.pl",
+"zarow.pl",
+"zgora.pl",
+"zgorzelec.pl",
+"pm",
+"pn",
+"gov.pn",
+"co.pn",
+"org.pn",
+"edu.pn",
+"net.pn",
+"post",
+"pr",
+"com.pr",
+"net.pr",
+"org.pr",
+"gov.pr",
+"edu.pr",
+"isla.pr",
+"pro.pr",
+"biz.pr",
+"info.pr",
+"name.pr",
+"est.pr",
+"prof.pr",
+"ac.pr",
+"pro",
+"aaa.pro",
+"aca.pro",
+"acct.pro",
+"avocat.pro",
+"bar.pro",
+"cpa.pro",
+"eng.pro",
+"jur.pro",
+"law.pro",
+"med.pro",
+"recht.pro",
+"ps",
+"edu.ps",
+"gov.ps",
+"sec.ps",
+"plo.ps",
+"com.ps",
+"org.ps",
+"net.ps",
+"pt",
+"net.pt",
+"gov.pt",
+"org.pt",
+"edu.pt",
+"int.pt",
+"publ.pt",
+"com.pt",
+"nome.pt",
+"pw",
+"co.pw",
+"ne.pw",
+"or.pw",
+"ed.pw",
+"go.pw",
+"belau.pw",
+"py",
+"com.py",
+"coop.py",
+"edu.py",
+"gov.py",
+"mil.py",
+"net.py",
+"org.py",
+"qa",
+"com.qa",
+"edu.qa",
+"gov.qa",
+"mil.qa",
+"name.qa",
+"net.qa",
+"org.qa",
+"sch.qa",
+"re",
+"asso.re",
+"com.re",
+"nom.re",
+"ro",
+"arts.ro",
+"com.ro",
+"firm.ro",
+"info.ro",
+"nom.ro",
+"nt.ro",
+"org.ro",
+"rec.ro",
+"store.ro",
+"tm.ro",
+"www.ro",
+"rs",
+"ac.rs",
+"co.rs",
+"edu.rs",
+"gov.rs",
+"in.rs",
+"org.rs",
+"ru",
+"rw",
+"ac.rw",
+"co.rw",
+"coop.rw",
+"gov.rw",
+"mil.rw",
+"net.rw",
+"org.rw",
+"sa",
+"com.sa",
+"net.sa",
+"org.sa",
+"gov.sa",
+"med.sa",
+"pub.sa",
+"edu.sa",
+"sch.sa",
+"sb",
+"com.sb",
+"edu.sb",
+"gov.sb",
+"net.sb",
+"org.sb",
+"sc",
+"com.sc",
+"gov.sc",
+"net.sc",
+"org.sc",
+"edu.sc",
+"sd",
+"com.sd",
+"net.sd",
+"org.sd",
+"edu.sd",
+"med.sd",
+"tv.sd",
+"gov.sd",
+"info.sd",
+"se",
+"a.se",
+"ac.se",
+"b.se",
+"bd.se",
+"brand.se",
+"c.se",
+"d.se",
+"e.se",
+"f.se",
+"fh.se",
+"fhsk.se",
+"fhv.se",
+"g.se",
+"h.se",
+"i.se",
+"k.se",
+"komforb.se",
+"kommunalforbund.se",
+"komvux.se",
+"l.se",
+"lanbib.se",
+"m.se",
+"n.se",
+"naturbruksgymn.se",
+"o.se",
+"org.se",
+"p.se",
+"parti.se",
+"pp.se",
+"press.se",
+"r.se",
+"s.se",
+"t.se",
+"tm.se",
+"u.se",
+"w.se",
+"x.se",
+"y.se",
+"z.se",
+"sg",
+"com.sg",
+"net.sg",
+"org.sg",
+"gov.sg",
+"edu.sg",
+"per.sg",
+"sh",
+"com.sh",
+"net.sh",
+"gov.sh",
+"org.sh",
+"mil.sh",
+"si",
+"sj",
+"sk",
+"sl",
+"com.sl",
+"net.sl",
+"edu.sl",
+"gov.sl",
+"org.sl",
+"sm",
+"sn",
+"art.sn",
+"com.sn",
+"edu.sn",
+"gouv.sn",
+"org.sn",
+"perso.sn",
+"univ.sn",
+"so",
+"com.so",
+"edu.so",
+"gov.so",
+"me.so",
+"net.so",
+"org.so",
+"sr",
+"ss",
+"biz.ss",
+"com.ss",
+"edu.ss",
+"gov.ss",
+"net.ss",
+"org.ss",
+"st",
+"co.st",
+"com.st",
+"consulado.st",
+"edu.st",
+"embaixada.st",
+"gov.st",
+"mil.st",
+"net.st",
+"org.st",
+"principe.st",
+"saotome.st",
+"store.st",
+"su",
+"sv",
+"com.sv",
+"edu.sv",
+"gob.sv",
+"org.sv",
+"red.sv",
+"sx",
+"gov.sx",
+"sy",
+"edu.sy",
+"gov.sy",
+"net.sy",
+"mil.sy",
+"com.sy",
+"org.sy",
+"sz",
+"co.sz",
+"ac.sz",
+"org.sz",
+"tc",
+"td",
+"tel",
+"tf",
+"tg",
+"th",
+"ac.th",
+"co.th",
+"go.th",
+"in.th",
+"mi.th",
+"net.th",
+"or.th",
+"tj",
+"ac.tj",
+"biz.tj",
+"co.tj",
+"com.tj",
+"edu.tj",
+"go.tj",
+"gov.tj",
+"int.tj",
+"mil.tj",
+"name.tj",
+"net.tj",
+"nic.tj",
+"org.tj",
+"test.tj",
+"web.tj",
+"tk",
+"tl",
+"gov.tl",
+"tm",
+"com.tm",
+"co.tm",
+"org.tm",
+"net.tm",
+"nom.tm",
+"gov.tm",
+"mil.tm",
+"edu.tm",
+"tn",
+"com.tn",
+"ens.tn",
+"fin.tn",
+"gov.tn",
+"ind.tn",
+"intl.tn",
+"nat.tn",
+"net.tn",
+"org.tn",
+"info.tn",
+"perso.tn",
+"tourism.tn",
+"edunet.tn",
+"rnrt.tn",
+"rns.tn",
+"rnu.tn",
+"mincom.tn",
+"agrinet.tn",
+"defense.tn",
+"turen.tn",
+"to",
+"com.to",
+"gov.to",
+"net.to",
+"org.to",
+"edu.to",
+"mil.to",
+"tr",
+"av.tr",
+"bbs.tr",
+"bel.tr",
+"biz.tr",
+"com.tr",
+"dr.tr",
+"edu.tr",
+"gen.tr",
+"gov.tr",
+"info.tr",
+"mil.tr",
+"k12.tr",
+"kep.tr",
+"name.tr",
+"net.tr",
+"org.tr",
+"pol.tr",
+"tel.tr",
+"tsk.tr",
+"tv.tr",
+"web.tr",
+"nc.tr",
+"gov.nc.tr",
+"tt",
+"co.tt",
+"com.tt",
+"org.tt",
+"net.tt",
+"biz.tt",
+"info.tt",
+"pro.tt",
+"int.tt",
+"coop.tt",
+"jobs.tt",
+"mobi.tt",
+"travel.tt",
+"museum.tt",
+"aero.tt",
+"name.tt",
+"gov.tt",
+"edu.tt",
+"tv",
+"tw",
+"edu.tw",
+"gov.tw",
+"mil.tw",
+"com.tw",
+"net.tw",
+"org.tw",
+"idv.tw",
+"game.tw",
+"ebiz.tw",
+"club.tw",
+"網路.tw",
+"組織.tw",
+"商業.tw",
+"tz",
+"ac.tz",
+"co.tz",
+"go.tz",
+"hotel.tz",
+"info.tz",
+"me.tz",
+"mil.tz",
+"mobi.tz",
+"ne.tz",
+"or.tz",
+"sc.tz",
+"tv.tz",
+"ua",
+"com.ua",
+"edu.ua",
+"gov.ua",
+"in.ua",
+"net.ua",
+"org.ua",
+"cherkassy.ua",
+"cherkasy.ua",
+"chernigov.ua",
+"chernihiv.ua",
+"chernivtsi.ua",
+"chernovtsy.ua",
+"ck.ua",
+"cn.ua",
+"cr.ua",
+"crimea.ua",
+"cv.ua",
+"dn.ua",
+"dnepropetrovsk.ua",
+"dnipropetrovsk.ua",
+"dominic.ua",
+"donetsk.ua",
+"dp.ua",
+"if.ua",
+"ivano-frankivsk.ua",
+"kh.ua",
+"kharkiv.ua",
+"kharkov.ua",
+"kherson.ua",
+"khmelnitskiy.ua",
+"khmelnytskyi.ua",
+"kiev.ua",
+"kirovograd.ua",
+"km.ua",
+"kr.ua",
+"krym.ua",
+"ks.ua",
+"kv.ua",
+"kyiv.ua",
+"lg.ua",
+"lt.ua",
+"lugansk.ua",
+"lutsk.ua",
+"lv.ua",
+"lviv.ua",
+"mk.ua",
+"mykolaiv.ua",
+"nikolaev.ua",
+"od.ua",
+"odesa.ua",
+"odessa.ua",
+"pl.ua",
+"poltava.ua",
+"rivne.ua",
+"rovno.ua",
+"rv.ua",
+"sb.ua",
+"sebastopol.ua",
+"sevastopol.ua",
+"sm.ua",
+"sumy.ua",
+"te.ua",
+"ternopil.ua",
+"uz.ua",
+"uzhgorod.ua",
+"vinnica.ua",
+"vinnytsia.ua",
+"vn.ua",
+"volyn.ua",
+"yalta.ua",
+"zaporizhzhe.ua",
+"zaporizhzhia.ua",
+"zhitomir.ua",
+"zhytomyr.ua",
+"zp.ua",
+"zt.ua",
+"ug",
+"co.ug",
+"or.ug",
+"ac.ug",
+"sc.ug",
+"go.ug",
+"ne.ug",
+"com.ug",
+"org.ug",
+"uk",
+"ac.uk",
+"co.uk",
+"gov.uk",
+"ltd.uk",
+"me.uk",
+"net.uk",
+"nhs.uk",
+"org.uk",
+"plc.uk",
+"police.uk",
+"*.sch.uk",
+"us",
+"dni.us",
+"fed.us",
+"isa.us",
+"kids.us",
+"nsn.us",
+"ak.us",
+"al.us",
+"ar.us",
+"as.us",
+"az.us",
+"ca.us",
+"co.us",
+"ct.us",
+"dc.us",
+"de.us",
+"fl.us",
+"ga.us",
+"gu.us",
+"hi.us",
+"ia.us",
+"id.us",
+"il.us",
+"in.us",
+"ks.us",
+"ky.us",
+"la.us",
+"ma.us",
+"md.us",
+"me.us",
+"mi.us",
+"mn.us",
+"mo.us",
+"ms.us",
+"mt.us",
+"nc.us",
+"nd.us",
+"ne.us",
+"nh.us",
+"nj.us",
+"nm.us",
+"nv.us",
+"ny.us",
+"oh.us",
+"ok.us",
+"or.us",
+"pa.us",
+"pr.us",
+"ri.us",
+"sc.us",
+"sd.us",
+"tn.us",
+"tx.us",
+"ut.us",
+"vi.us",
+"vt.us",
+"va.us",
+"wa.us",
+"wi.us",
+"wv.us",
+"wy.us",
+"k12.ak.us",
+"k12.al.us",
+"k12.ar.us",
+"k12.as.us",
+"k12.az.us",
+"k12.ca.us",
+"k12.co.us",
+"k12.ct.us",
+"k12.dc.us",
+"k12.de.us",
+"k12.fl.us",
+"k12.ga.us",
+"k12.gu.us",
+"k12.ia.us",
+"k12.id.us",
+"k12.il.us",
+"k12.in.us",
+"k12.ks.us",
+"k12.ky.us",
+"k12.la.us",
+"k12.ma.us",
+"k12.md.us",
+"k12.me.us",
+"k12.mi.us",
+"k12.mn.us",
+"k12.mo.us",
+"k12.ms.us",
+"k12.mt.us",
+"k12.nc.us",
+"k12.ne.us",
+"k12.nh.us",
+"k12.nj.us",
+"k12.nm.us",
+"k12.nv.us",
+"k12.ny.us",
+"k12.oh.us",
+"k12.ok.us",
+"k12.or.us",
+"k12.pa.us",
+"k12.pr.us",
+"k12.ri.us",
+"k12.sc.us",
+"k12.tn.us",
+"k12.tx.us",
+"k12.ut.us",
+"k12.vi.us",
+"k12.vt.us",
+"k12.va.us",
+"k12.wa.us",
+"k12.wi.us",
+"k12.wy.us",
+"cc.ak.us",
+"cc.al.us",
+"cc.ar.us",
+"cc.as.us",
+"cc.az.us",
+"cc.ca.us",
+"cc.co.us",
+"cc.ct.us",
+"cc.dc.us",
+"cc.de.us",
+"cc.fl.us",
+"cc.ga.us",
+"cc.gu.us",
+"cc.hi.us",
+"cc.ia.us",
+"cc.id.us",
+"cc.il.us",
+"cc.in.us",
+"cc.ks.us",
+"cc.ky.us",
+"cc.la.us",
+"cc.ma.us",
+"cc.md.us",
+"cc.me.us",
+"cc.mi.us",
+"cc.mn.us",
+"cc.mo.us",
+"cc.ms.us",
+"cc.mt.us",
+"cc.nc.us",
+"cc.nd.us",
+"cc.ne.us",
+"cc.nh.us",
+"cc.nj.us",
+"cc.nm.us",
+"cc.nv.us",
+"cc.ny.us",
+"cc.oh.us",
+"cc.ok.us",
+"cc.or.us",
+"cc.pa.us",
+"cc.pr.us",
+"cc.ri.us",
+"cc.sc.us",
+"cc.sd.us",
+"cc.tn.us",
+"cc.tx.us",
+"cc.ut.us",
+"cc.vi.us",
+"cc.vt.us",
+"cc.va.us",
+"cc.wa.us",
+"cc.wi.us",
+"cc.wv.us",
+"cc.wy.us",
+"lib.ak.us",
+"lib.al.us",
+"lib.ar.us",
+"lib.as.us",
+"lib.az.us",
+"lib.ca.us",
+"lib.co.us",
+"lib.ct.us",
+"lib.dc.us",
+"lib.fl.us",
+"lib.ga.us",
+"lib.gu.us",
+"lib.hi.us",
+"lib.ia.us",
+"lib.id.us",
+"lib.il.us",
+"lib.in.us",
+"lib.ks.us",
+"lib.ky.us",
+"lib.la.us",
+"lib.ma.us",
+"lib.md.us",
+"lib.me.us",
+"lib.mi.us",
+"lib.mn.us",
+"lib.mo.us",
+"lib.ms.us",
+"lib.mt.us",
+"lib.nc.us",
+"lib.nd.us",
+"lib.ne.us",
+"lib.nh.us",
+"lib.nj.us",
+"lib.nm.us",
+"lib.nv.us",
+"lib.ny.us",
+"lib.oh.us",
+"lib.ok.us",
+"lib.or.us",
+"lib.pa.us",
+"lib.pr.us",
+"lib.ri.us",
+"lib.sc.us",
+"lib.sd.us",
+"lib.tn.us",
+"lib.tx.us",
+"lib.ut.us",
+"lib.vi.us",
+"lib.vt.us",
+"lib.va.us",
+"lib.wa.us",
+"lib.wi.us",
+"lib.wy.us",
+"pvt.k12.ma.us",
+"chtr.k12.ma.us",
+"paroch.k12.ma.us",
+"ann-arbor.mi.us",
+"cog.mi.us",
+"dst.mi.us",
+"eaton.mi.us",
+"gen.mi.us",
+"mus.mi.us",
+"tec.mi.us",
+"washtenaw.mi.us",
+"uy",
+"com.uy",
+"edu.uy",
+"gub.uy",
+"mil.uy",
+"net.uy",
+"org.uy",
+"uz",
+"co.uz",
+"com.uz",
+"net.uz",
+"org.uz",
+"va",
+"vc",
+"com.vc",
+"net.vc",
+"org.vc",
+"gov.vc",
+"mil.vc",
+"edu.vc",
+"ve",
+"arts.ve",
+"co.ve",
+"com.ve",
+"e12.ve",
+"edu.ve",
+"firm.ve",
+"gob.ve",
+"gov.ve",
+"info.ve",
+"int.ve",
+"mil.ve",
+"net.ve",
+"org.ve",
+"rec.ve",
+"store.ve",
+"tec.ve",
+"web.ve",
+"vg",
+"vi",
+"co.vi",
+"com.vi",
+"k12.vi",
+"net.vi",
+"org.vi",
+"vn",
+"com.vn",
+"net.vn",
+"org.vn",
+"edu.vn",
+"gov.vn",
+"int.vn",
+"ac.vn",
+"biz.vn",
+"info.vn",
+"name.vn",
+"pro.vn",
+"health.vn",
+"vu",
+"com.vu",
+"edu.vu",
+"net.vu",
+"org.vu",
+"wf",
+"ws",
+"com.ws",
+"net.ws",
+"org.ws",
+"gov.ws",
+"edu.ws",
+"yt",
+"امارات",
+"հայ",
+"বাংলা",
+"бг",
+"бел",
+"中国",
+"中國",
+"الجزائر",
+"مصر",
+"ею",
+"ευ",
+"موريتانيا",
+"გე",
+"ελ",
+"香港",
+"公司.香港",
+"教育.香港",
+"政府.香港",
+"個人.香港",
+"網絡.香港",
+"組織.香港",
+"ಭಾರತ",
+"ଭାରତ",
+"ভাৰত",
+"भारतम्",
+"भारोत",
+"ڀارت",
+"ഭാരതം",
+"भारत",
+"بارت",
+"بھارت",
+"భారత్",
+"ભારત",
+"ਭਾਰਤ",
+"ভারত",
+"இந்தியா",
+"ایران",
+"ايران",
+"عراق",
+"الاردن",
+"한국",
+"қаз",
+"ලංකා",
+"இலங்கை",
+"المغرب",
+"мкд",
+"мон",
+"澳門",
+"澳门",
+"مليسيا",
+"عمان",
+"پاکستان",
+"پاكستان",
+"فلسطين",
+"срб",
+"пр.срб",
+"орг.срб",
+"обр.срб",
+"од.срб",
+"упр.срб",
+"ак.срб",
+"рф",
+"قطر",
+"السعودية",
+"السعودیة",
+"السعودیۃ",
+"السعوديه",
+"سودان",
+"新加坡",
+"சிங்கப்பூர்",
+"سورية",
+"سوريا",
+"ไทย",
+"ศึกษา.ไทย",
+"ธุรกิจ.ไทย",
+"รัฐบาล.ไทย",
+"ทหาร.ไทย",
+"เน็ต.ไทย",
+"องค์กร.ไทย",
+"تونس",
+"台灣",
+"台湾",
+"臺灣",
+"укр",
+"اليمن",
+"xxx",
+"*.ye",
+"ac.za",
+"agric.za",
+"alt.za",
+"co.za",
+"edu.za",
+"gov.za",
+"grondar.za",
+"law.za",
+"mil.za",
+"net.za",
+"ngo.za",
+"nic.za",
+"nis.za",
+"nom.za",
+"org.za",
+"school.za",
+"tm.za",
+"web.za",
+"zm",
+"ac.zm",
+"biz.zm",
+"co.zm",
+"com.zm",
+"edu.zm",
+"gov.zm",
+"info.zm",
+"mil.zm",
+"net.zm",
+"org.zm",
+"sch.zm",
+"zw",
+"ac.zw",
+"co.zw",
+"gov.zw",
+"mil.zw",
+"org.zw",
+"aaa",
+"aarp",
+"abarth",
+"abb",
+"abbott",
+"abbvie",
+"abc",
+"able",
+"abogado",
+"abudhabi",
+"academy",
+"accenture",
+"accountant",
+"accountants",
+"aco",
+"actor",
+"adac",
+"ads",
+"adult",
+"aeg",
+"aetna",
+"afamilycompany",
+"afl",
+"africa",
+"agakhan",
+"agency",
+"aig",
+"aigo",
+"airbus",
+"airforce",
+"airtel",
+"akdn",
+"alfaromeo",
+"alibaba",
+"alipay",
+"allfinanz",
+"allstate",
+"ally",
+"alsace",
+"alstom",
+"amazon",
+"americanexpress",
+"americanfamily",
+"amex",
+"amfam",
+"amica",
+"amsterdam",
+"analytics",
+"android",
+"anquan",
+"anz",
+"aol",
+"apartments",
+"app",
+"apple",
+"aquarelle",
+"arab",
+"aramco",
+"archi",
+"army",
+"art",
+"arte",
+"asda",
+"associates",
+"athleta",
+"attorney",
+"auction",
+"audi",
+"audible",
+"audio",
+"auspost",
+"author",
+"auto",
+"autos",
+"avianca",
+"aws",
+"axa",
+"azure",
+"baby",
+"baidu",
+"banamex",
+"bananarepublic",
+"band",
+"bank",
+"bar",
+"barcelona",
+"barclaycard",
+"barclays",
+"barefoot",
+"bargains",
+"baseball",
+"basketball",
+"bauhaus",
+"bayern",
+"bbc",
+"bbt",
+"bbva",
+"bcg",
+"bcn",
+"beats",
+"beauty",
+"beer",
+"bentley",
+"berlin",
+"best",
+"bestbuy",
+"bet",
+"bharti",
+"bible",
+"bid",
+"bike",
+"bing",
+"bingo",
+"bio",
+"black",
+"blackfriday",
+"blockbuster",
+"blog",
+"bloomberg",
+"blue",
+"bms",
+"bmw",
+"bnpparibas",
+"boats",
+"boehringer",
+"bofa",
+"bom",
+"bond",
+"boo",
+"book",
+"booking",
+"bosch",
+"bostik",
+"boston",
+"bot",
+"boutique",
+"box",
+"bradesco",
+"bridgestone",
+"broadway",
+"broker",
+"brother",
+"brussels",
+"budapest",
+"bugatti",
+"build",
+"builders",
+"business",
+"buy",
+"buzz",
+"bzh",
+"cab",
+"cafe",
+"cal",
+"call",
+"calvinklein",
+"cam",
+"camera",
+"camp",
+"cancerresearch",
+"canon",
+"capetown",
+"capital",
+"capitalone",
+"car",
+"caravan",
+"cards",
+"care",
+"career",
+"careers",
+"cars",
+"casa",
+"case",
+"caseih",
+"cash",
+"casino",
+"catering",
+"catholic",
+"cba",
+"cbn",
+"cbre",
+"cbs",
+"ceb",
+"center",
+"ceo",
+"cern",
+"cfa",
+"cfd",
+"chanel",
+"channel",
+"charity",
+"chase",
+"chat",
+"cheap",
+"chintai",
+"christmas",
+"chrome",
+"church",
+"cipriani",
+"circle",
+"cisco",
+"citadel",
+"citi",
+"citic",
+"city",
+"cityeats",
+"claims",
+"cleaning",
+"click",
+"clinic",
+"clinique",
+"clothing",
+"cloud",
+"club",
+"clubmed",
+"coach",
+"codes",
+"coffee",
+"college",
+"cologne",
+"comcast",
+"commbank",
+"community",
+"company",
+"compare",
+"computer",
+"comsec",
+"condos",
+"construction",
+"consulting",
+"contact",
+"contractors",
+"cooking",
+"cookingchannel",
+"cool",
+"corsica",
+"country",
+"coupon",
+"coupons",
+"courses",
+"cpa",
+"credit",
+"creditcard",
+"creditunion",
+"cricket",
+"crown",
+"crs",
+"cruise",
+"cruises",
+"csc",
+"cuisinella",
+"cymru",
+"cyou",
+"dabur",
+"dad",
+"dance",
+"data",
+"date",
+"dating",
+"datsun",
+"day",
+"dclk",
+"dds",
+"deal",
+"dealer",
+"deals",
+"degree",
+"delivery",
+"dell",
+"deloitte",
+"delta",
+"democrat",
+"dental",
+"dentist",
+"desi",
+"design",
+"dev",
+"dhl",
+"diamonds",
+"diet",
+"digital",
+"direct",
+"directory",
+"discount",
+"discover",
+"dish",
+"diy",
+"dnp",
+"docs",
+"doctor",
+"dog",
+"domains",
+"dot",
+"download",
+"drive",
+"dtv",
+"dubai",
+"duck",
+"dunlop",
+"dupont",
+"durban",
+"dvag",
+"dvr",
+"earth",
+"eat",
+"eco",
+"edeka",
+"education",
+"email",
+"emerck",
+"energy",
+"engineer",
+"engineering",
+"enterprises",
+"epson",
+"equipment",
+"ericsson",
+"erni",
+"esq",
+"estate",
+"esurance",
+"etisalat",
+"eurovision",
+"eus",
+"events",
+"exchange",
+"expert",
+"exposed",
+"express",
+"extraspace",
+"fage",
+"fail",
+"fairwinds",
+"faith",
+"family",
+"fan",
+"fans",
+"farm",
+"farmers",
+"fashion",
+"fast",
+"fedex",
+"feedback",
+"ferrari",
+"ferrero",
+"fiat",
+"fidelity",
+"fido",
+"film",
+"final",
+"finance",
+"financial",
+"fire",
+"firestone",
+"firmdale",
+"fish",
+"fishing",
+"fit",
+"fitness",
+"flickr",
+"flights",
+"flir",
+"florist",
+"flowers",
+"fly",
+"foo",
+"food",
+"foodnetwork",
+"football",
+"ford",
+"forex",
+"forsale",
+"forum",
+"foundation",
+"fox",
+"free",
+"fresenius",
+"frl",
+"frogans",
+"frontdoor",
+"frontier",
+"ftr",
+"fujitsu",
+"fujixerox",
+"fun",
+"fund",
+"furniture",
+"futbol",
+"fyi",
+"gal",
+"gallery",
+"gallo",
+"gallup",
+"game",
+"games",
+"gap",
+"garden",
+"gay",
+"gbiz",
+"gdn",
+"gea",
+"gent",
+"genting",
+"george",
+"ggee",
+"gift",
+"gifts",
+"gives",
+"giving",
+"glade",
+"glass",
+"gle",
+"global",
+"globo",
+"gmail",
+"gmbh",
+"gmo",
+"gmx",
+"godaddy",
+"gold",
+"goldpoint",
+"golf",
+"goo",
+"goodyear",
+"goog",
+"google",
+"gop",
+"got",
+"grainger",
+"graphics",
+"gratis",
+"green",
+"gripe",
+"grocery",
+"group",
+"guardian",
+"gucci",
+"guge",
+"guide",
+"guitars",
+"guru",
+"hair",
+"hamburg",
+"hangout",
+"haus",
+"hbo",
+"hdfc",
+"hdfcbank",
+"health",
+"healthcare",
+"help",
+"helsinki",
+"here",
+"hermes",
+"hgtv",
+"hiphop",
+"hisamitsu",
+"hitachi",
+"hiv",
+"hkt",
+"hockey",
+"holdings",
+"holiday",
+"homedepot",
+"homegoods",
+"homes",
+"homesense",
+"honda",
+"horse",
+"hospital",
+"host",
+"hosting",
+"hot",
+"hoteles",
+"hotels",
+"hotmail",
+"house",
+"how",
+"hsbc",
+"hughes",
+"hyatt",
+"hyundai",
+"ibm",
+"icbc",
+"ice",
+"icu",
+"ieee",
+"ifm",
+"ikano",
+"imamat",
+"imdb",
+"immo",
+"immobilien",
+"inc",
+"industries",
+"infiniti",
+"ing",
+"ink",
+"institute",
+"insurance",
+"insure",
+"intel",
+"international",
+"intuit",
+"investments",
+"ipiranga",
+"irish",
+"ismaili",
+"ist",
+"istanbul",
+"itau",
+"itv",
+"iveco",
+"jaguar",
+"java",
+"jcb",
+"jcp",
+"jeep",
+"jetzt",
+"jewelry",
+"jio",
+"jll",
+"jmp",
+"jnj",
+"joburg",
+"jot",
+"joy",
+"jpmorgan",
+"jprs",
+"juegos",
+"juniper",
+"kaufen",
+"kddi",
+"kerryhotels",
+"kerrylogistics",
+"kerryproperties",
+"kfh",
+"kia",
+"kim",
+"kinder",
+"kindle",
+"kitchen",
+"kiwi",
+"koeln",
+"komatsu",
+"kosher",
+"kpmg",
+"kpn",
+"krd",
+"kred",
+"kuokgroup",
+"kyoto",
+"lacaixa",
+"lamborghini",
+"lamer",
+"lancaster",
+"lancia",
+"land",
+"landrover",
+"lanxess",
+"lasalle",
+"lat",
+"latino",
+"latrobe",
+"law",
+"lawyer",
+"lds",
+"lease",
+"leclerc",
+"lefrak",
+"legal",
+"lego",
+"lexus",
+"lgbt",
+"lidl",
+"life",
+"lifeinsurance",
+"lifestyle",
+"lighting",
+"like",
+"lilly",
+"limited",
+"limo",
+"lincoln",
+"linde",
+"link",
+"lipsy",
+"live",
+"living",
+"lixil",
+"llc",
+"llp",
+"loan",
+"loans",
+"locker",
+"locus",
+"loft",
+"lol",
+"london",
+"lotte",
+"lotto",
+"love",
+"lpl",
+"lplfinancial",
+"ltd",
+"ltda",
+"lundbeck",
+"lupin",
+"luxe",
+"luxury",
+"macys",
+"madrid",
+"maif",
+"maison",
+"makeup",
+"man",
+"management",
+"mango",
+"map",
+"market",
+"marketing",
+"markets",
+"marriott",
+"marshalls",
+"maserati",
+"mattel",
+"mba",
+"mckinsey",
+"med",
+"media",
+"meet",
+"melbourne",
+"meme",
+"memorial",
+"men",
+"menu",
+"merckmsd",
+"metlife",
+"miami",
+"microsoft",
+"mini",
+"mint",
+"mit",
+"mitsubishi",
+"mlb",
+"mls",
+"mma",
+"mobile",
+"moda",
+"moe",
+"moi",
+"mom",
+"monash",
+"money",
+"monster",
+"mormon",
+"mortgage",
+"moscow",
+"moto",
+"motorcycles",
+"mov",
+"movie",
+"msd",
+"mtn",
+"mtr",
+"mutual",
+"nab",
+"nadex",
+"nagoya",
+"nationwide",
+"natura",
+"navy",
+"nba",
+"nec",
+"netbank",
+"netflix",
+"network",
+"neustar",
+"new",
+"newholland",
+"news",
+"next",
+"nextdirect",
+"nexus",
+"nfl",
+"ngo",
+"nhk",
+"nico",
+"nike",
+"nikon",
+"ninja",
+"nissan",
+"nissay",
+"nokia",
+"northwesternmutual",
+"norton",
+"now",
+"nowruz",
+"nowtv",
+"nra",
+"nrw",
+"ntt",
+"nyc",
+"obi",
+"observer",
+"off",
+"office",
+"okinawa",
+"olayan",
+"olayangroup",
+"oldnavy",
+"ollo",
+"omega",
+"one",
+"ong",
+"onl",
+"online",
+"onyourside",
+"ooo",
+"open",
+"oracle",
+"orange",
+"organic",
+"origins",
+"osaka",
+"otsuka",
+"ott",
+"ovh",
+"page",
+"panasonic",
+"paris",
+"pars",
+"partners",
+"parts",
+"party",
+"passagens",
+"pay",
+"pccw",
+"pet",
+"pfizer",
+"pharmacy",
+"phd",
+"philips",
+"phone",
+"photo",
+"photography",
+"photos",
+"physio",
+"pics",
+"pictet",
+"pictures",
+"pid",
+"pin",
+"ping",
+"pink",
+"pioneer",
+"pizza",
+"place",
+"play",
+"playstation",
+"plumbing",
+"plus",
+"pnc",
+"pohl",
+"poker",
+"politie",
+"porn",
+"pramerica",
+"praxi",
+"press",
+"prime",
+"prod",
+"productions",
+"prof",
+"progressive",
+"promo",
+"properties",
+"property",
+"protection",
+"pru",
+"prudential",
+"pub",
+"pwc",
+"qpon",
+"quebec",
+"quest",
+"qvc",
+"racing",
+"radio",
+"raid",
+"read",
+"realestate",
+"realtor",
+"realty",
+"recipes",
+"red",
+"redstone",
+"redumbrella",
+"rehab",
+"reise",
+"reisen",
+"reit",
+"reliance",
+"ren",
+"rent",
+"rentals",
+"repair",
+"report",
+"republican",
+"rest",
+"restaurant",
+"review",
+"reviews",
+"rexroth",
+"rich",
+"richardli",
+"ricoh",
+"rightathome",
+"ril",
+"rio",
+"rip",
+"rmit",
+"rocher",
+"rocks",
+"rodeo",
+"rogers",
+"room",
+"rsvp",
+"rugby",
+"ruhr",
+"run",
+"rwe",
+"ryukyu",
+"saarland",
+"safe",
+"safety",
+"sakura",
+"sale",
+"salon",
+"samsclub",
+"samsung",
+"sandvik",
+"sandvikcoromant",
+"sanofi",
+"sap",
+"sarl",
+"sas",
+"save",
+"saxo",
+"sbi",
+"sbs",
+"sca",
+"scb",
+"schaeffler",
+"schmidt",
+"scholarships",
+"school",
+"schule",
+"schwarz",
+"science",
+"scjohnson",
+"scor",
+"scot",
+"search",
+"seat",
+"secure",
+"security",
+"seek",
+"select",
+"sener",
+"services",
+"ses",
+"seven",
+"sew",
+"sex",
+"sexy",
+"sfr",
+"shangrila",
+"sharp",
+"shaw",
+"shell",
+"shia",
+"shiksha",
+"shoes",
+"shop",
+"shopping",
+"shouji",
+"show",
+"showtime",
+"shriram",
+"silk",
+"sina",
+"singles",
+"site",
+"ski",
+"skin",
+"sky",
+"skype",
+"sling",
+"smart",
+"smile",
+"sncf",
+"soccer",
+"social",
+"softbank",
+"software",
+"sohu",
+"solar",
+"solutions",
+"song",
+"sony",
+"soy",
+"spa",
+"space",
+"sport",
+"spot",
+"spreadbetting",
+"srl",
+"stada",
+"staples",
+"star",
+"statebank",
+"statefarm",
+"stc",
+"stcgroup",
+"stockholm",
+"storage",
+"store",
+"stream",
+"studio",
+"study",
+"style",
+"sucks",
+"supplies",
+"supply",
+"support",
+"surf",
+"surgery",
+"suzuki",
+"swatch",
+"swiftcover",
+"swiss",
+"sydney",
+"symantec",
+"systems",
+"tab",
+"taipei",
+"talk",
+"taobao",
+"target",
+"tatamotors",
+"tatar",
+"tattoo",
+"tax",
+"taxi",
+"tci",
+"tdk",
+"team",
+"tech",
+"technology",
+"temasek",
+"tennis",
+"teva",
+"thd",
+"theater",
+"theatre",
+"tiaa",
+"tickets",
+"tienda",
+"tiffany",
+"tips",
+"tires",
+"tirol",
+"tjmaxx",
+"tjx",
+"tkmaxx",
+"tmall",
+"today",
+"tokyo",
+"tools",
+"top",
+"toray",
+"toshiba",
+"total",
+"tours",
+"town",
+"toyota",
+"toys",
+"trade",
+"trading",
+"training",
+"travel",
+"travelchannel",
+"travelers",
+"travelersinsurance",
+"trust",
+"trv",
+"tube",
+"tui",
+"tunes",
+"tushu",
+"tvs",
+"ubank",
+"ubs",
+"unicom",
+"university",
+"uno",
+"uol",
+"ups",
+"vacations",
+"vana",
+"vanguard",
+"vegas",
+"ventures",
+"verisign",
+"versicherung",
+"vet",
+"viajes",
+"video",
+"vig",
+"viking",
+"villas",
+"vin",
+"vip",
+"virgin",
+"visa",
+"vision",
+"viva",
+"vivo",
+"vlaanderen",
+"vodka",
+"volkswagen",
+"volvo",
+"vote",
+"voting",
+"voto",
+"voyage",
+"vuelos",
+"wales",
+"walmart",
+"walter",
+"wang",
+"wanggou",
+"watch",
+"watches",
+"weather",
+"weatherchannel",
+"webcam",
+"weber",
+"website",
+"wed",
+"wedding",
+"weibo",
+"weir",
+"whoswho",
+"wien",
+"wiki",
+"williamhill",
+"win",
+"windows",
+"wine",
+"winners",
+"wme",
+"wolterskluwer",
+"woodside",
+"work",
+"works",
+"world",
+"wow",
+"wtc",
+"wtf",
+"xbox",
+"xerox",
+"xfinity",
+"xihuan",
+"xin",
+"कॉम",
+"セール",
+"佛山",
+"慈善",
+"集团",
+"在线",
+"大众汽车",
+"点看",
+"คอม",
+"八卦",
+"موقع",
+"公益",
+"公司",
+"香格里拉",
+"网站",
+"移动",
+"我爱你",
+"москва",
+"католик",
+"онлайн",
+"сайт",
+"联通",
+"קום",
+"时尚",
+"微博",
+"淡马锡",
+"ファッション",
+"орг",
+"नेट",
+"ストア",
+"アマゾン",
+"삼성",
+"商标",
+"商店",
+"商城",
+"дети",
+"ポイント",
+"新闻",
+"工行",
+"家電",
+"كوم",
+"中文网",
+"中信",
+"娱乐",
+"谷歌",
+"電訊盈科",
+"购物",
+"クラウド",
+"通販",
+"网店",
+"संगठन",
+"餐厅",
+"网络",
+"ком",
+"亚马逊",
+"诺基亚",
+"食品",
+"飞利浦",
+"手表",
+"手机",
+"ارامكو",
+"العليان",
+"اتصالات",
+"بازار",
+"ابوظبي",
+"كاثوليك",
+"همراه",
+"닷컴",
+"政府",
+"شبكة",
+"بيتك",
+"عرب",
+"机构",
+"组织机构",
+"健康",
+"招聘",
+"рус",
+"珠宝",
+"大拿",
+"みんな",
+"グーグル",
+"世界",
+"書籍",
+"网址",
+"닷넷",
+"コム",
+"天主教",
+"游戏",
+"vermögensberater",
+"vermögensberatung",
+"企业",
+"信息",
+"嘉里大酒店",
+"嘉里",
+"广东",
+"政务",
+"xyz",
+"yachts",
+"yahoo",
+"yamaxun",
+"yandex",
+"yodobashi",
+"yoga",
+"yokohama",
+"you",
+"youtube",
+"yun",
+"zappos",
+"zara",
+"zero",
+"zip",
+"zone",
+"zuerich",
+"cc.ua",
+"inf.ua",
+"ltd.ua",
+"adobeaemcloud.com",
+"adobeaemcloud.net",
+"*.dev.adobeaemcloud.com",
+"beep.pl",
+"barsy.ca",
+"*.compute.estate",
+"*.alces.network",
+"altervista.org",
+"alwaysdata.net",
+"cloudfront.net",
+"*.compute.amazonaws.com",
+"*.compute-1.amazonaws.com",
+"*.compute.amazonaws.com.cn",
+"us-east-1.amazonaws.com",
+"cn-north-1.eb.amazonaws.com.cn",
+"cn-northwest-1.eb.amazonaws.com.cn",
+"elasticbeanstalk.com",
+"ap-northeast-1.elasticbeanstalk.com",
+"ap-northeast-2.elasticbeanstalk.com",
+"ap-northeast-3.elasticbeanstalk.com",
+"ap-south-1.elasticbeanstalk.com",
+"ap-southeast-1.elasticbeanstalk.com",
+"ap-southeast-2.elasticbeanstalk.com",
+"ca-central-1.elasticbeanstalk.com",
+"eu-central-1.elasticbeanstalk.com",
+"eu-west-1.elasticbeanstalk.com",
+"eu-west-2.elasticbeanstalk.com",
+"eu-west-3.elasticbeanstalk.com",
+"sa-east-1.elasticbeanstalk.com",
+"us-east-1.elasticbeanstalk.com",
+"us-east-2.elasticbeanstalk.com",
+"us-gov-west-1.elasticbeanstalk.com",
+"us-west-1.elasticbeanstalk.com",
+"us-west-2.elasticbeanstalk.com",
+"*.elb.amazonaws.com",
+"*.elb.amazonaws.com.cn",
+"s3.amazonaws.com",
+"s3-ap-northeast-1.amazonaws.com",
+"s3-ap-northeast-2.amazonaws.com",
+"s3-ap-south-1.amazonaws.com",
+"s3-ap-southeast-1.amazonaws.com",
+"s3-ap-southeast-2.amazonaws.com",
+"s3-ca-central-1.amazonaws.com",
+"s3-eu-central-1.amazonaws.com",
+"s3-eu-west-1.amazonaws.com",
+"s3-eu-west-2.amazonaws.com",
+"s3-eu-west-3.amazonaws.com",
+"s3-external-1.amazonaws.com",
+"s3-fips-us-gov-west-1.amazonaws.com",
+"s3-sa-east-1.amazonaws.com",
+"s3-us-gov-west-1.amazonaws.com",
+"s3-us-east-2.amazonaws.com",
+"s3-us-west-1.amazonaws.com",
+"s3-us-west-2.amazonaws.com",
+"s3.ap-northeast-2.amazonaws.com",
+"s3.ap-south-1.amazonaws.com",
+"s3.cn-north-1.amazonaws.com.cn",
+"s3.ca-central-1.amazonaws.com",
+"s3.eu-central-1.amazonaws.com",
+"s3.eu-west-2.amazonaws.com",
+"s3.eu-west-3.amazonaws.com",
+"s3.us-east-2.amazonaws.com",
+"s3.dualstack.ap-northeast-1.amazonaws.com",
+"s3.dualstack.ap-northeast-2.amazonaws.com",
+"s3.dualstack.ap-south-1.amazonaws.com",
+"s3.dualstack.ap-southeast-1.amazonaws.com",
+"s3.dualstack.ap-southeast-2.amazonaws.com",
+"s3.dualstack.ca-central-1.amazonaws.com",
+"s3.dualstack.eu-central-1.amazonaws.com",
+"s3.dualstack.eu-west-1.amazonaws.com",
+"s3.dualstack.eu-west-2.amazonaws.com",
+"s3.dualstack.eu-west-3.amazonaws.com",
+"s3.dualstack.sa-east-1.amazonaws.com",
+"s3.dualstack.us-east-1.amazonaws.com",
+"s3.dualstack.us-east-2.amazonaws.com",
+"s3-website-us-east-1.amazonaws.com",
+"s3-website-us-west-1.amazonaws.com",
+"s3-website-us-west-2.amazonaws.com",
+"s3-website-ap-northeast-1.amazonaws.com",
+"s3-website-ap-southeast-1.amazonaws.com",
+"s3-website-ap-southeast-2.amazonaws.com",
+"s3-website-eu-west-1.amazonaws.com",
+"s3-website-sa-east-1.amazonaws.com",
+"s3-website.ap-northeast-2.amazonaws.com",
+"s3-website.ap-south-1.amazonaws.com",
+"s3-website.ca-central-1.amazonaws.com",
+"s3-website.eu-central-1.amazonaws.com",
+"s3-website.eu-west-2.amazonaws.com",
+"s3-website.eu-west-3.amazonaws.com",
+"s3-website.us-east-2.amazonaws.com",
+"amsw.nl",
+"t3l3p0rt.net",
+"tele.amune.org",
+"apigee.io",
+"on-aptible.com",
+"user.aseinet.ne.jp",
+"gv.vc",
+"d.gv.vc",
+"user.party.eus",
+"pimienta.org",
+"poivron.org",
+"potager.org",
+"sweetpepper.org",
+"myasustor.com",
+"myfritz.net",
+"*.awdev.ca",
+"*.advisor.ws",
+"b-data.io",
+"backplaneapp.io",
+"balena-devices.com",
+"app.banzaicloud.io",
+"betainabox.com",
+"bnr.la",
+"blackbaudcdn.net",
+"boomla.net",
+"boxfuse.io",
+"square7.ch",
+"bplaced.com",
+"bplaced.de",
+"square7.de",
+"bplaced.net",
+"square7.net",
+"browsersafetymark.io",
+"uk0.bigv.io",
+"dh.bytemark.co.uk",
+"vm.bytemark.co.uk",
+"mycd.eu",
+"carrd.co",
+"crd.co",
+"uwu.ai",
+"ae.org",
+"ar.com",
+"br.com",
+"cn.com",
+"com.de",
+"com.se",
+"de.com",
+"eu.com",
+"gb.com",
+"gb.net",
+"hu.com",
+"hu.net",
+"jp.net",
+"jpn.com",
+"kr.com",
+"mex.com",
+"no.com",
+"qc.com",
+"ru.com",
+"sa.com",
+"se.net",
+"uk.com",
+"uk.net",
+"us.com",
+"uy.com",
+"za.bz",
+"za.com",
+"africa.com",
+"gr.com",
+"in.net",
+"us.org",
+"co.com",
+"c.la",
+"certmgr.org",
+"xenapponazure.com",
+"discourse.group",
+"discourse.team",
+"virtueeldomein.nl",
+"cleverapps.io",
+"*.lcl.dev",
+"*.stg.dev",
+"c66.me",
+"cloud66.ws",
+"cloud66.zone",
+"jdevcloud.com",
+"wpdevcloud.com",
+"cloudaccess.host",
+"freesite.host",
+"cloudaccess.net",
+"cloudcontrolled.com",
+"cloudcontrolapp.com",
+"cloudera.site",
+"trycloudflare.com",
+"workers.dev",
+"wnext.app",
+"co.ca",
+"*.otap.co",
+"co.cz",
+"c.cdn77.org",
+"cdn77-ssl.net",
+"r.cdn77.net",
+"rsc.cdn77.org",
+"ssl.origin.cdn77-secure.org",
+"cloudns.asia",
+"cloudns.biz",
+"cloudns.club",
+"cloudns.cc",
+"cloudns.eu",
+"cloudns.in",
+"cloudns.info",
+"cloudns.org",
+"cloudns.pro",
+"cloudns.pw",
+"cloudns.us",
+"cloudeity.net",
+"cnpy.gdn",
+"co.nl",
+"co.no",
+"webhosting.be",
+"hosting-cluster.nl",
+"ac.ru",
+"edu.ru",
+"gov.ru",
+"int.ru",
+"mil.ru",
+"test.ru",
+"dyn.cosidns.de",
+"dynamisches-dns.de",
+"dnsupdater.de",
+"internet-dns.de",
+"l-o-g-i-n.de",
+"dynamic-dns.info",
+"feste-ip.net",
+"knx-server.net",
+"static-access.net",
+"realm.cz",
+"*.cryptonomic.net",
+"cupcake.is",
+"*.customer-oci.com",
+"*.oci.customer-oci.com",
+"*.ocp.customer-oci.com",
+"*.ocs.customer-oci.com",
+"cyon.link",
+"cyon.site",
+"daplie.me",
+"localhost.daplie.me",
+"dattolocal.com",
+"dattorelay.com",
+"dattoweb.com",
+"mydatto.com",
+"dattolocal.net",
+"mydatto.net",
+"biz.dk",
+"co.dk",
+"firm.dk",
+"reg.dk",
+"store.dk",
+"*.dapps.earth",
+"*.bzz.dapps.earth",
+"builtwithdark.com",
+"edgestack.me",
+"debian.net",
+"dedyn.io",
+"dnshome.de",
+"online.th",
+"shop.th",
+"drayddns.com",
+"dreamhosters.com",
+"mydrobo.com",
+"drud.io",
+"drud.us",
+"duckdns.org",
+"dy.fi",
+"tunk.org",
+"dyndns-at-home.com",
+"dyndns-at-work.com",
+"dyndns-blog.com",
+"dyndns-free.com",
+"dyndns-home.com",
+"dyndns-ip.com",
+"dyndns-mail.com",
+"dyndns-office.com",
+"dyndns-pics.com",
+"dyndns-remote.com",
+"dyndns-server.com",
+"dyndns-web.com",
+"dyndns-wiki.com",
+"dyndns-work.com",
+"dyndns.biz",
+"dyndns.info",
+"dyndns.org",
+"dyndns.tv",
+"at-band-camp.net",
+"ath.cx",
+"barrel-of-knowledge.info",
+"barrell-of-knowledge.info",
+"better-than.tv",
+"blogdns.com",
+"blogdns.net",
+"blogdns.org",
+"blogsite.org",
+"boldlygoingnowhere.org",
+"broke-it.net",
+"buyshouses.net",
+"cechire.com",
+"dnsalias.com",
+"dnsalias.net",
+"dnsalias.org",
+"dnsdojo.com",
+"dnsdojo.net",
+"dnsdojo.org",
+"does-it.net",
+"doesntexist.com",
+"doesntexist.org",
+"dontexist.com",
+"dontexist.net",
+"dontexist.org",
+"doomdns.com",
+"doomdns.org",
+"dvrdns.org",
+"dyn-o-saur.com",
+"dynalias.com",
+"dynalias.net",
+"dynalias.org",
+"dynathome.net",
+"dyndns.ws",
+"endofinternet.net",
+"endofinternet.org",
+"endoftheinternet.org",
+"est-a-la-maison.com",
+"est-a-la-masion.com",
+"est-le-patron.com",
+"est-mon-blogueur.com",
+"for-better.biz",
+"for-more.biz",
+"for-our.info",
+"for-some.biz",
+"for-the.biz",
+"forgot.her.name",
+"forgot.his.name",
+"from-ak.com",
+"from-al.com",
+"from-ar.com",
+"from-az.net",
+"from-ca.com",
+"from-co.net",
+"from-ct.com",
+"from-dc.com",
+"from-de.com",
+"from-fl.com",
+"from-ga.com",
+"from-hi.com",
+"from-ia.com",
+"from-id.com",
+"from-il.com",
+"from-in.com",
+"from-ks.com",
+"from-ky.com",
+"from-la.net",
+"from-ma.com",
+"from-md.com",
+"from-me.org",
+"from-mi.com",
+"from-mn.com",
+"from-mo.com",
+"from-ms.com",
+"from-mt.com",
+"from-nc.com",
+"from-nd.com",
+"from-ne.com",
+"from-nh.com",
+"from-nj.com",
+"from-nm.com",
+"from-nv.com",
+"from-ny.net",
+"from-oh.com",
+"from-ok.com",
+"from-or.com",
+"from-pa.com",
+"from-pr.com",
+"from-ri.com",
+"from-sc.com",
+"from-sd.com",
+"from-tn.com",
+"from-tx.com",
+"from-ut.com",
+"from-va.com",
+"from-vt.com",
+"from-wa.com",
+"from-wi.com",
+"from-wv.com",
+"from-wy.com",
+"ftpaccess.cc",
+"fuettertdasnetz.de",
+"game-host.org",
+"game-server.cc",
+"getmyip.com",
+"gets-it.net",
+"go.dyndns.org",
+"gotdns.com",
+"gotdns.org",
+"groks-the.info",
+"groks-this.info",
+"ham-radio-op.net",
+"here-for-more.info",
+"hobby-site.com",
+"hobby-site.org",
+"home.dyndns.org",
+"homedns.org",
+"homeftp.net",
+"homeftp.org",
+"homeip.net",
+"homelinux.com",
+"homelinux.net",
+"homelinux.org",
+"homeunix.com",
+"homeunix.net",
+"homeunix.org",
+"iamallama.com",
+"in-the-band.net",
+"is-a-anarchist.com",
+"is-a-blogger.com",
+"is-a-bookkeeper.com",
+"is-a-bruinsfan.org",
+"is-a-bulls-fan.com",
+"is-a-candidate.org",
+"is-a-caterer.com",
+"is-a-celticsfan.org",
+"is-a-chef.com",
+"is-a-chef.net",
+"is-a-chef.org",
+"is-a-conservative.com",
+"is-a-cpa.com",
+"is-a-cubicle-slave.com",
+"is-a-democrat.com",
+"is-a-designer.com",
+"is-a-doctor.com",
+"is-a-financialadvisor.com",
+"is-a-geek.com",
+"is-a-geek.net",
+"is-a-geek.org",
+"is-a-green.com",
+"is-a-guru.com",
+"is-a-hard-worker.com",
+"is-a-hunter.com",
+"is-a-knight.org",
+"is-a-landscaper.com",
+"is-a-lawyer.com",
+"is-a-liberal.com",
+"is-a-libertarian.com",
+"is-a-linux-user.org",
+"is-a-llama.com",
+"is-a-musician.com",
+"is-a-nascarfan.com",
+"is-a-nurse.com",
+"is-a-painter.com",
+"is-a-patsfan.org",
+"is-a-personaltrainer.com",
+"is-a-photographer.com",
+"is-a-player.com",
+"is-a-republican.com",
+"is-a-rockstar.com",
+"is-a-socialist.com",
+"is-a-soxfan.org",
+"is-a-student.com",
+"is-a-teacher.com",
+"is-a-techie.com",
+"is-a-therapist.com",
+"is-an-accountant.com",
+"is-an-actor.com",
+"is-an-actress.com",
+"is-an-anarchist.com",
+"is-an-artist.com",
+"is-an-engineer.com",
+"is-an-entertainer.com",
+"is-by.us",
+"is-certified.com",
+"is-found.org",
+"is-gone.com",
+"is-into-anime.com",
+"is-into-cars.com",
+"is-into-cartoons.com",
+"is-into-games.com",
+"is-leet.com",
+"is-lost.org",
+"is-not-certified.com",
+"is-saved.org",
+"is-slick.com",
+"is-uberleet.com",
+"is-very-bad.org",
+"is-very-evil.org",
+"is-very-good.org",
+"is-very-nice.org",
+"is-very-sweet.org",
+"is-with-theband.com",
+"isa-geek.com",
+"isa-geek.net",
+"isa-geek.org",
+"isa-hockeynut.com",
+"issmarterthanyou.com",
+"isteingeek.de",
+"istmein.de",
+"kicks-ass.net",
+"kicks-ass.org",
+"knowsitall.info",
+"land-4-sale.us",
+"lebtimnetz.de",
+"leitungsen.de",
+"likes-pie.com",
+"likescandy.com",
+"merseine.nu",
+"mine.nu",
+"misconfused.org",
+"mypets.ws",
+"myphotos.cc",
+"neat-url.com",
+"office-on-the.net",
+"on-the-web.tv",
+"podzone.net",
+"podzone.org",
+"readmyblog.org",
+"saves-the-whales.com",
+"scrapper-site.net",
+"scrapping.cc",
+"selfip.biz",
+"selfip.com",
+"selfip.info",
+"selfip.net",
+"selfip.org",
+"sells-for-less.com",
+"sells-for-u.com",
+"sells-it.net",
+"sellsyourhome.org",
+"servebbs.com",
+"servebbs.net",
+"servebbs.org",
+"serveftp.net",
+"serveftp.org",
+"servegame.org",
+"shacknet.nu",
+"simple-url.com",
+"space-to-rent.com",
+"stuff-4-sale.org",
+"stuff-4-sale.us",
+"teaches-yoga.com",
+"thruhere.net",
+"traeumtgerade.de",
+"webhop.biz",
+"webhop.info",
+"webhop.net",
+"webhop.org",
+"worse-than.tv",
+"writesthisblog.com",
+"ddnss.de",
+"dyn.ddnss.de",
+"dyndns.ddnss.de",
+"dyndns1.de",
+"dyn-ip24.de",
+"home-webserver.de",
+"dyn.home-webserver.de",
+"myhome-server.de",
+"ddnss.org",
+"definima.net",
+"definima.io",
+"bci.dnstrace.pro",
+"ddnsfree.com",
+"ddnsgeek.com",
+"giize.com",
+"gleeze.com",
+"kozow.com",
+"loseyourip.com",
+"ooguy.com",
+"theworkpc.com",
+"casacam.net",
+"dynu.net",
+"accesscam.org",
+"camdvr.org",
+"freeddns.org",
+"mywire.org",
+"webredirect.org",
+"myddns.rocks",
+"blogsite.xyz",
+"dynv6.net",
+"e4.cz",
+"en-root.fr",
+"mytuleap.com",
+"onred.one",
+"staging.onred.one",
+"enonic.io",
+"customer.enonic.io",
+"eu.org",
+"al.eu.org",
+"asso.eu.org",
+"at.eu.org",
+"au.eu.org",
+"be.eu.org",
+"bg.eu.org",
+"ca.eu.org",
+"cd.eu.org",
+"ch.eu.org",
+"cn.eu.org",
+"cy.eu.org",
+"cz.eu.org",
+"de.eu.org",
+"dk.eu.org",
+"edu.eu.org",
+"ee.eu.org",
+"es.eu.org",
+"fi.eu.org",
+"fr.eu.org",
+"gr.eu.org",
+"hr.eu.org",
+"hu.eu.org",
+"ie.eu.org",
+"il.eu.org",
+"in.eu.org",
+"int.eu.org",
+"is.eu.org",
+"it.eu.org",
+"jp.eu.org",
+"kr.eu.org",
+"lt.eu.org",
+"lu.eu.org",
+"lv.eu.org",
+"mc.eu.org",
+"me.eu.org",
+"mk.eu.org",
+"mt.eu.org",
+"my.eu.org",
+"net.eu.org",
+"ng.eu.org",
+"nl.eu.org",
+"no.eu.org",
+"nz.eu.org",
+"paris.eu.org",
+"pl.eu.org",
+"pt.eu.org",
+"q-a.eu.org",
+"ro.eu.org",
+"ru.eu.org",
+"se.eu.org",
+"si.eu.org",
+"sk.eu.org",
+"tr.eu.org",
+"uk.eu.org",
+"us.eu.org",
+"eu-1.evennode.com",
+"eu-2.evennode.com",
+"eu-3.evennode.com",
+"eu-4.evennode.com",
+"us-1.evennode.com",
+"us-2.evennode.com",
+"us-3.evennode.com",
+"us-4.evennode.com",
+"twmail.cc",
+"twmail.net",
+"twmail.org",
+"mymailer.com.tw",
+"url.tw",
+"apps.fbsbx.com",
+"ru.net",
+"adygeya.ru",
+"bashkiria.ru",
+"bir.ru",
+"cbg.ru",
+"com.ru",
+"dagestan.ru",
+"grozny.ru",
+"kalmykia.ru",
+"kustanai.ru",
+"marine.ru",
+"mordovia.ru",
+"msk.ru",
+"mytis.ru",
+"nalchik.ru",
+"nov.ru",
+"pyatigorsk.ru",
+"spb.ru",
+"vladikavkaz.ru",
+"vladimir.ru",
+"abkhazia.su",
+"adygeya.su",
+"aktyubinsk.su",
+"arkhangelsk.su",
+"armenia.su",
+"ashgabad.su",
+"azerbaijan.su",
+"balashov.su",
+"bashkiria.su",
+"bryansk.su",
+"bukhara.su",
+"chimkent.su",
+"dagestan.su",
+"east-kazakhstan.su",
+"exnet.su",
+"georgia.su",
+"grozny.su",
+"ivanovo.su",
+"jambyl.su",
+"kalmykia.su",
+"kaluga.su",
+"karacol.su",
+"karaganda.su",
+"karelia.su",
+"khakassia.su",
+"krasnodar.su",
+"kurgan.su",
+"kustanai.su",
+"lenug.su",
+"mangyshlak.su",
+"mordovia.su",
+"msk.su",
+"murmansk.su",
+"nalchik.su",
+"navoi.su",
+"north-kazakhstan.su",
+"nov.su",
+"obninsk.su",
+"penza.su",
+"pokrovsk.su",
+"sochi.su",
+"spb.su",
+"tashkent.su",
+"termez.su",
+"togliatti.su",
+"troitsk.su",
+"tselinograd.su",
+"tula.su",
+"tuva.su",
+"vladikavkaz.su",
+"vladimir.su",
+"vologda.su",
+"channelsdvr.net",
+"u.channelsdvr.net",
+"fastly-terrarium.com",
+"fastlylb.net",
+"map.fastlylb.net",
+"freetls.fastly.net",
+"map.fastly.net",
+"a.prod.fastly.net",
+"global.prod.fastly.net",
+"a.ssl.fastly.net",
+"b.ssl.fastly.net",
+"global.ssl.fastly.net",
+"fastpanel.direct",
+"fastvps-server.com",
+"fhapp.xyz",
+"fedorainfracloud.org",
+"fedorapeople.org",
+"cloud.fedoraproject.org",
+"app.os.fedoraproject.org",
+"app.os.stg.fedoraproject.org",
+"mydobiss.com",
+"filegear.me",
+"filegear-au.me",
+"filegear-de.me",
+"filegear-gb.me",
+"filegear-ie.me",
+"filegear-jp.me",
+"filegear-sg.me",
+"firebaseapp.com",
+"flynnhub.com",
+"flynnhosting.net",
+"0e.vc",
+"freebox-os.com",
+"freeboxos.com",
+"fbx-os.fr",
+"fbxos.fr",
+"freebox-os.fr",
+"freeboxos.fr",
+"freedesktop.org",
+"*.futurecms.at",
+"*.ex.futurecms.at",
+"*.in.futurecms.at",
+"futurehosting.at",
+"futuremailing.at",
+"*.ex.ortsinfo.at",
+"*.kunden.ortsinfo.at",
+"*.statics.cloud",
+"service.gov.uk",
+"gehirn.ne.jp",
+"usercontent.jp",
+"gentapps.com",
+"lab.ms",
+"github.io",
+"githubusercontent.com",
+"gitlab.io",
+"glitch.me",
+"lolipop.io",
+"cloudapps.digital",
+"london.cloudapps.digital",
+"homeoffice.gov.uk",
+"ro.im",
+"shop.ro",
+"goip.de",
+"run.app",
+"a.run.app",
+"web.app",
+"*.0emm.com",
+"appspot.com",
+"*.r.appspot.com",
+"blogspot.ae",
+"blogspot.al",
+"blogspot.am",
+"blogspot.ba",
+"blogspot.be",
+"blogspot.bg",
+"blogspot.bj",
+"blogspot.ca",
+"blogspot.cf",
+"blogspot.ch",
+"blogspot.cl",
+"blogspot.co.at",
+"blogspot.co.id",
+"blogspot.co.il",
+"blogspot.co.ke",
+"blogspot.co.nz",
+"blogspot.co.uk",
+"blogspot.co.za",
+"blogspot.com",
+"blogspot.com.ar",
+"blogspot.com.au",
+"blogspot.com.br",
+"blogspot.com.by",
+"blogspot.com.co",
+"blogspot.com.cy",
+"blogspot.com.ee",
+"blogspot.com.eg",
+"blogspot.com.es",
+"blogspot.com.mt",
+"blogspot.com.ng",
+"blogspot.com.tr",
+"blogspot.com.uy",
+"blogspot.cv",
+"blogspot.cz",
+"blogspot.de",
+"blogspot.dk",
+"blogspot.fi",
+"blogspot.fr",
+"blogspot.gr",
+"blogspot.hk",
+"blogspot.hr",
+"blogspot.hu",
+"blogspot.ie",
+"blogspot.in",
+"blogspot.is",
+"blogspot.it",
+"blogspot.jp",
+"blogspot.kr",
+"blogspot.li",
+"blogspot.lt",
+"blogspot.lu",
+"blogspot.md",
+"blogspot.mk",
+"blogspot.mr",
+"blogspot.mx",
+"blogspot.my",
+"blogspot.nl",
+"blogspot.no",
+"blogspot.pe",
+"blogspot.pt",
+"blogspot.qa",
+"blogspot.re",
+"blogspot.ro",
+"blogspot.rs",
+"blogspot.ru",
+"blogspot.se",
+"blogspot.sg",
+"blogspot.si",
+"blogspot.sk",
+"blogspot.sn",
+"blogspot.td",
+"blogspot.tw",
+"blogspot.ug",
+"blogspot.vn",
+"cloudfunctions.net",
+"cloud.goog",
+"codespot.com",
+"googleapis.com",
+"googlecode.com",
+"pagespeedmobilizer.com",
+"publishproxy.com",
+"withgoogle.com",
+"withyoutube.com",
+"awsmppl.com",
+"fin.ci",
+"free.hr",
+"caa.li",
+"ua.rs",
+"conf.se",
+"hs.zone",
+"hs.run",
+"hashbang.sh",
+"hasura.app",
+"hasura-app.io",
+"hepforge.org",
+"herokuapp.com",
+"herokussl.com",
+"myravendb.com",
+"ravendb.community",
+"ravendb.me",
+"development.run",
+"ravendb.run",
+"bpl.biz",
+"orx.biz",
+"ng.city",
+"biz.gl",
+"ng.ink",
+"col.ng",
+"firm.ng",
+"gen.ng",
+"ltd.ng",
+"ngo.ng",
+"ng.school",
+"sch.so",
+"häkkinen.fi",
+"*.moonscale.io",
+"moonscale.net",
+"iki.fi",
+"dyn-berlin.de",
+"in-berlin.de",
+"in-brb.de",
+"in-butter.de",
+"in-dsl.de",
+"in-dsl.net",
+"in-dsl.org",
+"in-vpn.de",
+"in-vpn.net",
+"in-vpn.org",
+"biz.at",
+"info.at",
+"info.cx",
+"ac.leg.br",
+"al.leg.br",
+"am.leg.br",
+"ap.leg.br",
+"ba.leg.br",
+"ce.leg.br",
+"df.leg.br",
+"es.leg.br",
+"go.leg.br",
+"ma.leg.br",
+"mg.leg.br",
+"ms.leg.br",
+"mt.leg.br",
+"pa.leg.br",
+"pb.leg.br",
+"pe.leg.br",
+"pi.leg.br",
+"pr.leg.br",
+"rj.leg.br",
+"rn.leg.br",
+"ro.leg.br",
+"rr.leg.br",
+"rs.leg.br",
+"sc.leg.br",
+"se.leg.br",
+"sp.leg.br",
+"to.leg.br",
+"pixolino.com",
+"ipifony.net",
+"mein-iserv.de",
+"test-iserv.de",
+"iserv.dev",
+"iobb.net",
+"myjino.ru",
+"*.hosting.myjino.ru",
+"*.landing.myjino.ru",
+"*.spectrum.myjino.ru",
+"*.vps.myjino.ru",
+"*.triton.zone",
+"*.cns.joyent.com",
+"js.org",
+"kaas.gg",
+"khplay.nl",
+"keymachine.de",
+"kinghost.net",
+"uni5.net",
+"knightpoint.systems",
+"oya.to",
+"co.krd",
+"edu.krd",
+"git-repos.de",
+"lcube-server.de",
+"svn-repos.de",
+"leadpages.co",
+"lpages.co",
+"lpusercontent.com",
+"lelux.site",
+"co.business",
+"co.education",
+"co.events",
+"co.financial",
+"co.network",
+"co.place",
+"co.technology",
+"app.lmpm.com",
+"linkitools.space",
+"linkyard.cloud",
+"linkyard-cloud.ch",
+"members.linode.com",
+"nodebalancer.linode.com",
+"we.bs",
+"loginline.app",
+"loginline.dev",
+"loginline.io",
+"loginline.services",
+"loginline.site",
+"krasnik.pl",
+"leczna.pl",
+"lubartow.pl",
+"lublin.pl",
+"poniatowa.pl",
+"swidnik.pl",
+"uklugs.org",
+"glug.org.uk",
+"lug.org.uk",
+"lugs.org.uk",
+"barsy.bg",
+"barsy.co.uk",
+"barsyonline.co.uk",
+"barsycenter.com",
+"barsyonline.com",
+"barsy.club",
+"barsy.de",
+"barsy.eu",
+"barsy.in",
+"barsy.info",
+"barsy.io",
+"barsy.me",
+"barsy.menu",
+"barsy.mobi",
+"barsy.net",
+"barsy.online",
+"barsy.org",
+"barsy.pro",
+"barsy.pub",
+"barsy.shop",
+"barsy.site",
+"barsy.support",
+"barsy.uk",
+"*.magentosite.cloud",
+"mayfirst.info",
+"mayfirst.org",
+"hb.cldmail.ru",
+"miniserver.com",
+"memset.net",
+"cloud.metacentrum.cz",
+"custom.metacentrum.cz",
+"flt.cloud.muni.cz",
+"usr.cloud.muni.cz",
+"meteorapp.com",
+"eu.meteorapp.com",
+"co.pl",
+"azurecontainer.io",
+"azurewebsites.net",
+"azure-mobile.net",
+"cloudapp.net",
+"mozilla-iot.org",
+"bmoattachments.org",
+"net.ru",
+"org.ru",
+"pp.ru",
+"ui.nabu.casa",
+"pony.club",
+"of.fashion",
+"on.fashion",
+"of.football",
+"in.london",
+"of.london",
+"for.men",
+"and.mom",
+"for.mom",
+"for.one",
+"for.sale",
+"of.work",
+"to.work",
+"nctu.me",
+"bitballoon.com",
+"netlify.com",
+"4u.com",
+"ngrok.io",
+"nh-serv.co.uk",
+"nfshost.com",
+"dnsking.ch",
+"mypi.co",
+"n4t.co",
+"001www.com",
+"ddnslive.com",
+"myiphost.com",
+"forumz.info",
+"16-b.it",
+"32-b.it",
+"64-b.it",
+"soundcast.me",
+"tcp4.me",
+"dnsup.net",
+"hicam.net",
+"now-dns.net",
+"ownip.net",
+"vpndns.net",
+"dynserv.org",
+"now-dns.org",
+"x443.pw",
+"now-dns.top",
+"ntdll.top",
+"freeddns.us",
+"crafting.xyz",
+"zapto.xyz",
+"nsupdate.info",
+"nerdpol.ovh",
+"blogsyte.com",
+"brasilia.me",
+"cable-modem.org",
+"ciscofreak.com",
+"collegefan.org",
+"couchpotatofries.org",
+"damnserver.com",
+"ddns.me",
+"ditchyourip.com",
+"dnsfor.me",
+"dnsiskinky.com",
+"dvrcam.info",
+"dynns.com",
+"eating-organic.net",
+"fantasyleague.cc",
+"geekgalaxy.com",
+"golffan.us",
+"health-carereform.com",
+"homesecuritymac.com",
+"homesecuritypc.com",
+"hopto.me",
+"ilovecollege.info",
+"loginto.me",
+"mlbfan.org",
+"mmafan.biz",
+"myactivedirectory.com",
+"mydissent.net",
+"myeffect.net",
+"mymediapc.net",
+"mypsx.net",
+"mysecuritycamera.com",
+"mysecuritycamera.net",
+"mysecuritycamera.org",
+"net-freaks.com",
+"nflfan.org",
+"nhlfan.net",
+"no-ip.ca",
+"no-ip.co.uk",
+"no-ip.net",
+"noip.us",
+"onthewifi.com",
+"pgafan.net",
+"point2this.com",
+"pointto.us",
+"privatizehealthinsurance.net",
+"quicksytes.com",
+"read-books.org",
+"securitytactics.com",
+"serveexchange.com",
+"servehumour.com",
+"servep2p.com",
+"servesarcasm.com",
+"stufftoread.com",
+"ufcfan.org",
+"unusualperson.com",
+"workisboring.com",
+"3utilities.com",
+"bounceme.net",
+"ddns.net",
+"ddnsking.com",
+"gotdns.ch",
+"hopto.org",
+"myftp.biz",
+"myftp.org",
+"myvnc.com",
+"no-ip.biz",
+"no-ip.info",
+"no-ip.org",
+"noip.me",
+"redirectme.net",
+"servebeer.com",
+"serveblog.net",
+"servecounterstrike.com",
+"serveftp.com",
+"servegame.com",
+"servehalflife.com",
+"servehttp.com",
+"serveirc.com",
+"serveminecraft.net",
+"servemp3.com",
+"servepics.com",
+"servequake.com",
+"sytes.net",
+"webhop.me",
+"zapto.org",
+"stage.nodeart.io",
+"nodum.co",
+"nodum.io",
+"pcloud.host",
+"nyc.mn",
+"nom.ae",
+"nom.af",
+"nom.ai",
+"nom.al",
+"nym.by",
+"nom.bz",
+"nym.bz",
+"nom.cl",
+"nym.ec",
+"nom.gd",
+"nom.ge",
+"nom.gl",
+"nym.gr",
+"nom.gt",
+"nym.gy",
+"nym.hk",
+"nom.hn",
+"nym.ie",
+"nom.im",
+"nom.ke",
+"nym.kz",
+"nym.la",
+"nym.lc",
+"nom.li",
+"nym.li",
+"nym.lt",
+"nym.lu",
+"nom.lv",
+"nym.me",
+"nom.mk",
+"nym.mn",
+"nym.mx",
+"nom.nu",
+"nym.nz",
+"nym.pe",
+"nym.pt",
+"nom.pw",
+"nom.qa",
+"nym.ro",
+"nom.rs",
+"nom.si",
+"nym.sk",
+"nom.st",
+"nym.su",
+"nym.sx",
+"nom.tj",
+"nym.tw",
+"nom.ug",
+"nom.uy",
+"nom.vc",
+"nom.vg",
+"static.observableusercontent.com",
+"cya.gg",
+"cloudycluster.net",
+"nid.io",
+"opencraft.hosting",
+"operaunite.com",
+"skygearapp.com",
+"outsystemscloud.com",
+"ownprovider.com",
+"own.pm",
+"ox.rs",
+"oy.lc",
+"pgfog.com",
+"pagefrontapp.com",
+"art.pl",
+"gliwice.pl",
+"krakow.pl",
+"poznan.pl",
+"wroc.pl",
+"zakopane.pl",
+"pantheonsite.io",
+"gotpantheon.com",
+"mypep.link",
+"perspecta.cloud",
+"on-web.fr",
+"*.platform.sh",
+"*.platformsh.site",
+"dyn53.io",
+"co.bn",
+"xen.prgmr.com",
+"priv.at",
+"prvcy.page",
+"*.dweb.link",
+"protonet.io",
+"chirurgiens-dentistes-en-france.fr",
+"byen.site",
+"pubtls.org",
+"qualifioapp.com",
+"qbuser.com",
+"instantcloud.cn",
+"ras.ru",
+"qa2.com",
+"qcx.io",
+"*.sys.qcx.io",
+"dev-myqnapcloud.com",
+"alpha-myqnapcloud.com",
+"myqnapcloud.com",
+"*.quipelements.com",
+"vapor.cloud",
+"vaporcloud.io",
+"rackmaze.com",
+"rackmaze.net",
+"*.on-k3s.io",
+"*.on-rancher.cloud",
+"*.on-rio.io",
+"readthedocs.io",
+"rhcloud.com",
+"app.render.com",
+"onrender.com",
+"repl.co",
+"repl.run",
+"resindevice.io",
+"devices.resinstaging.io",
+"hzc.io",
+"wellbeingzone.eu",
+"ptplus.fit",
+"wellbeingzone.co.uk",
+"git-pages.rit.edu",
+"sandcats.io",
+"logoip.de",
+"logoip.com",
+"schokokeks.net",
+"gov.scot",
+"scrysec.com",
+"firewall-gateway.com",
+"firewall-gateway.de",
+"my-gateway.de",
+"my-router.de",
+"spdns.de",
+"spdns.eu",
+"firewall-gateway.net",
+"my-firewall.org",
+"myfirewall.org",
+"spdns.org",
+"senseering.net",
+"biz.ua",
+"co.ua",
+"pp.ua",
+"shiftedit.io",
+"myshopblocks.com",
+"shopitsite.com",
+"mo-siemens.io",
+"1kapp.com",
+"appchizi.com",
+"applinzi.com",
+"sinaapp.com",
+"vipsinaapp.com",
+"siteleaf.net",
+"bounty-full.com",
+"alpha.bounty-full.com",
+"beta.bounty-full.com",
+"stackhero-network.com",
+"static.land",
+"dev.static.land",
+"sites.static.land",
+"apps.lair.io",
+"*.stolos.io",
+"spacekit.io",
+"customer.speedpartner.de",
+"api.stdlib.com",
+"storj.farm",
+"utwente.io",
+"soc.srcf.net",
+"user.srcf.net",
+"temp-dns.com",
+"applicationcloud.io",
+"scapp.io",
+"*.s5y.io",
+"*.sensiosite.cloud",
+"syncloud.it",
+"diskstation.me",
+"dscloud.biz",
+"dscloud.me",
+"dscloud.mobi",
+"dsmynas.com",
+"dsmynas.net",
+"dsmynas.org",
+"familyds.com",
+"familyds.net",
+"familyds.org",
+"i234.me",
+"myds.me",
+"synology.me",
+"vpnplus.to",
+"direct.quickconnect.to",
+"taifun-dns.de",
+"gda.pl",
+"gdansk.pl",
+"gdynia.pl",
+"med.pl",
+"sopot.pl",
+"edugit.org",
+"telebit.app",
+"telebit.io",
+"*.telebit.xyz",
+"gwiddle.co.uk",
+"thingdustdata.com",
+"cust.dev.thingdust.io",
+"cust.disrec.thingdust.io",
+"cust.prod.thingdust.io",
+"cust.testing.thingdust.io",
+"arvo.network",
+"azimuth.network",
+"bloxcms.com",
+"townnews-staging.com",
+"12hp.at",
+"2ix.at",
+"4lima.at",
+"lima-city.at",
+"12hp.ch",
+"2ix.ch",
+"4lima.ch",
+"lima-city.ch",
+"trafficplex.cloud",
+"de.cool",
+"12hp.de",
+"2ix.de",
+"4lima.de",
+"lima-city.de",
+"1337.pictures",
+"clan.rip",
+"lima-city.rocks",
+"webspace.rocks",
+"lima.zone",
+"*.transurl.be",
+"*.transurl.eu",
+"*.transurl.nl",
+"tuxfamily.org",
+"dd-dns.de",
+"diskstation.eu",
+"diskstation.org",
+"dray-dns.de",
+"draydns.de",
+"dyn-vpn.de",
+"dynvpn.de",
+"mein-vigor.de",
+"my-vigor.de",
+"my-wan.de",
+"syno-ds.de",
+"synology-diskstation.de",
+"synology-ds.de",
+"uber.space",
+"*.uberspace.de",
+"hk.com",
+"hk.org",
+"ltd.hk",
+"inc.hk",
+"virtualuser.de",
+"virtual-user.de",
+"urown.cloud",
+"dnsupdate.info",
+"lib.de.us",
+"2038.io",
+"router.management",
+"v-info.info",
+"voorloper.cloud",
+"v.ua",
+"wafflecell.com",
+"*.webhare.dev",
+"wedeploy.io",
+"wedeploy.me",
+"wedeploy.sh",
+"remotewd.com",
+"wmflabs.org",
+"myforum.community",
+"community-pro.de",
+"diskussionsbereich.de",
+"community-pro.net",
+"meinforum.net",
+"half.host",
+"xnbay.com",
+"u2.xnbay.com",
+"u2-local.xnbay.com",
+"cistron.nl",
+"demon.nl",
+"xs4all.space",
+"yandexcloud.net",
+"storage.yandexcloud.net",
+"website.yandexcloud.net",
+"official.academy",
+"yolasite.com",
+"ybo.faith",
+"yombo.me",
+"homelink.one",
+"ybo.party",
+"ybo.review",
+"ybo.science",
+"ybo.trade",
+"nohost.me",
+"noho.st",
+"za.net",
+"za.org",
+"now.sh",
+"bss.design",
+"basicserver.io",
+"virtualserver.io",
+"enterprisecloud.nu"
+]
+},{}],2:[function(require,module,exports){
+/*eslint no-var:0, prefer-arrow-callback: 0, object-shorthand: 0 */
+'use strict';
+
+
+var Punycode = require('punycode');
+
+
+var internals = {};
+
+
+//
+// Read rules from file.
+//
+internals.rules = require('./data/rules.json').map(function (rule) {
+
+ return {
+ rule: rule,
+ suffix: rule.replace(/^(\*\.|\!)/, ''),
+ punySuffix: -1,
+ wildcard: rule.charAt(0) === '*',
+ exception: rule.charAt(0) === '!'
+ };
+});
+
+
+//
+// Check is given string ends with `suffix`.
+//
+internals.endsWith = function (str, suffix) {
+
+ return str.indexOf(suffix, str.length - suffix.length) !== -1;
+};
+
+
+//
+// Find rule for a given domain.
+//
+internals.findRule = function (domain) {
+
+ var punyDomain = Punycode.toASCII(domain);
+ return internals.rules.reduce(function (memo, rule) {
+
+ if (rule.punySuffix === -1){
+ rule.punySuffix = Punycode.toASCII(rule.suffix);
+ }
+ if (!internals.endsWith(punyDomain, '.' + rule.punySuffix) && punyDomain !== rule.punySuffix) {
+ return memo;
+ }
+ // This has been commented out as it never seems to run. This is because
+ // sub tlds always appear after their parents and we never find a shorter
+ // match.
+ //if (memo) {
+ // var memoSuffix = Punycode.toASCII(memo.suffix);
+ // if (memoSuffix.length >= punySuffix.length) {
+ // return memo;
+ // }
+ //}
+ return rule;
+ }, null);
+};
+
+
+//
+// Error codes and messages.
+//
+exports.errorCodes = {
+ DOMAIN_TOO_SHORT: 'Domain name too short.',
+ DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.',
+ LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.',
+ LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.',
+ LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.',
+ LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.',
+ LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.'
+};
+
+
+//
+// Validate domain name and throw if not valid.
+//
+// From wikipedia:
+//
+// Hostnames are composed of series of labels concatenated with dots, as are all
+// domain names. Each label must be between 1 and 63 characters long, and the
+// entire hostname (including the delimiting dots) has a maximum of 255 chars.
+//
+// Allowed chars:
+//
+// * `a-z`
+// * `0-9`
+// * `-` but not as a starting or ending character
+// * `.` as a separator for the textual portions of a domain name
+//
+// * http://en.wikipedia.org/wiki/Domain_name
+// * http://en.wikipedia.org/wiki/Hostname
+//
+internals.validate = function (input) {
+
+ // Before we can validate we need to take care of IDNs with unicode chars.
+ var ascii = Punycode.toASCII(input);
+
+ if (ascii.length < 1) {
+ return 'DOMAIN_TOO_SHORT';
+ }
+ if (ascii.length > 255) {
+ return 'DOMAIN_TOO_LONG';
+ }
+
+ // Check each part's length and allowed chars.
+ var labels = ascii.split('.');
+ var label;
+
+ for (var i = 0; i < labels.length; ++i) {
+ label = labels[i];
+ if (!label.length) {
+ return 'LABEL_TOO_SHORT';
+ }
+ if (label.length > 63) {
+ return 'LABEL_TOO_LONG';
+ }
+ if (label.charAt(0) === '-') {
+ return 'LABEL_STARTS_WITH_DASH';
+ }
+ if (label.charAt(label.length - 1) === '-') {
+ return 'LABEL_ENDS_WITH_DASH';
+ }
+ if (!/^[a-z0-9\-]+$/.test(label)) {
+ return 'LABEL_INVALID_CHARS';
+ }
+ }
+};
+
+
+//
+// Public API
+//
+
+
+//
+// Parse domain.
+//
+exports.parse = function (input) {
+
+ if (typeof input !== 'string') {
+ throw new TypeError('Domain name must be a string.');
+ }
+
+ // Force domain to lowercase.
+ var domain = input.slice(0).toLowerCase();
+
+ // Handle FQDN.
+ // TODO: Simply remove trailing dot?
+ if (domain.charAt(domain.length - 1) === '.') {
+ domain = domain.slice(0, domain.length - 1);
+ }
+
+ // Validate and sanitise input.
+ var error = internals.validate(domain);
+ if (error) {
+ return {
+ input: input,
+ error: {
+ message: exports.errorCodes[error],
+ code: error
+ }
+ };
+ }
+
+ var parsed = {
+ input: input,
+ tld: null,
+ sld: null,
+ domain: null,
+ subdomain: null,
+ listed: false
+ };
+
+ var domainParts = domain.split('.');
+
+ // Non-Internet TLD
+ if (domainParts[domainParts.length - 1] === 'local') {
+ return parsed;
+ }
+
+ var handlePunycode = function () {
+
+ if (!/xn--/.test(domain)) {
+ return parsed;
+ }
+ if (parsed.domain) {
+ parsed.domain = Punycode.toASCII(parsed.domain);
+ }
+ if (parsed.subdomain) {
+ parsed.subdomain = Punycode.toASCII(parsed.subdomain);
+ }
+ return parsed;
+ };
+
+ var rule = internals.findRule(domain);
+
+ // Unlisted tld.
+ if (!rule) {
+ if (domainParts.length < 2) {
+ return parsed;
+ }
+ parsed.tld = domainParts.pop();
+ parsed.sld = domainParts.pop();
+ parsed.domain = [parsed.sld, parsed.tld].join('.');
+ if (domainParts.length) {
+ parsed.subdomain = domainParts.pop();
+ }
+ return handlePunycode();
+ }
+
+ // At this point we know the public suffix is listed.
+ parsed.listed = true;
+
+ var tldParts = rule.suffix.split('.');
+ var privateParts = domainParts.slice(0, domainParts.length - tldParts.length);
+
+ if (rule.exception) {
+ privateParts.push(tldParts.shift());
+ }
+
+ parsed.tld = tldParts.join('.');
+
+ if (!privateParts.length) {
+ return handlePunycode();
+ }
+
+ if (rule.wildcard) {
+ tldParts.unshift(privateParts.pop());
+ parsed.tld = tldParts.join('.');
+ }
+
+ if (!privateParts.length) {
+ return handlePunycode();
+ }
+
+ parsed.sld = privateParts.pop();
+ parsed.domain = [parsed.sld, parsed.tld].join('.');
+
+ if (privateParts.length) {
+ parsed.subdomain = privateParts.join('.');
+ }
+
+ return handlePunycode();
+};
+
+
+//
+// Get domain.
+//
+exports.get = function (domain) {
+
+ if (!domain) {
+ return null;
+ }
+ return exports.parse(domain).domain || null;
+};
+
+
+//
+// Check whether domain belongs to a known public suffix.
+//
+exports.isValid = function (domain) {
+
+ var parsed = exports.parse(domain);
+ return Boolean(parsed.domain && parsed.listed);
+};
+
+},{"./data/rules.json":1,"punycode":3}],3:[function(require,module,exports){
+(function (global){
+/*! https://mths.be/punycode v1.4.1 by @mathias */
+;(function(root) {
+
+ /** Detect free variables */
+ var freeExports = typeof exports == 'object' && exports &&
+ !exports.nodeType && exports;
+ var freeModule = typeof module == 'object' && module &&
+ !module.nodeType && module;
+ var freeGlobal = typeof global == 'object' && global;
+ if (
+ freeGlobal.global === freeGlobal ||
+ freeGlobal.window === freeGlobal ||
+ freeGlobal.self === freeGlobal
+ ) {
+ root = freeGlobal;
+ }
+
+ /**
+ * The `punycode` object.
+ * @name punycode
+ * @type Object
+ */
+ var punycode,
+
+ /** Highest positive signed 32-bit float value */
+ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+
+ /** Bootstring parameters */
+ base = 36,
+ tMin = 1,
+ tMax = 26,
+ skew = 38,
+ damp = 700,
+ initialBias = 72,
+ initialN = 128, // 0x80
+ delimiter = '-', // '\x2D'
+
+ /** Regular expressions */
+ regexPunycode = /^xn--/,
+ regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
+ regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+
+ /** Error messages */
+ errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+ },
+
+ /** Convenience shortcuts */
+ baseMinusTMin = base - tMin,
+ floor = Math.floor,
+ stringFromCharCode = String.fromCharCode,
+
+ /** Temporary variable */
+ key;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+ function error(type) {
+ throw new RangeError(errors[type]);
+ }
+
+ /**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+ function map(array, fn) {
+ var length = array.length;
+ var result = [];
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+ }
+
+ /**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+ function mapDomain(string, fn) {
+ var parts = string.split('@');
+ var result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
+ var encoded = map(labels, fn).join('.');
+ return result + encoded;
+ }
+
+ /**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+ function ucs2decode(string) {
+ var output = [],
+ counter = 0,
+ length = string.length,
+ value,
+ extra;
+ while (counter < length) {
+ value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // high surrogate, and there is a next character
+ extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // unmatched surrogate; only append this code unit, in case the next
+ // code unit is the high surrogate of a surrogate pair
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+ }
+
+ /**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+ function ucs2encode(array) {
+ return map(array, function(value) {
+ var output = '';
+ if (value > 0xFFFF) {
+ value -= 0x10000;
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
+ value = 0xDC00 | value & 0x3FF;
+ }
+ output += stringFromCharCode(value);
+ return output;
+ }).join('');
+ }
+
+ /**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+ function basicToDigit(codePoint) {
+ if (codePoint - 48 < 10) {
+ return codePoint - 22;
+ }
+ if (codePoint - 65 < 26) {
+ return codePoint - 65;
+ }
+ if (codePoint - 97 < 26) {
+ return codePoint - 97;
+ }
+ return base;
+ }
+
+ /**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+ function digitToBasic(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+ }
+
+ /**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+ function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+ }
+
+ /**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+ function decode(input) {
+ // Don't use UCS-2
+ var output = [],
+ inputLength = input.length,
+ out,
+ i = 0,
+ n = initialN,
+ bias = initialBias,
+ basic,
+ j,
+ index,
+ oldi,
+ w,
+ k,
+ digit,
+ t,
+ /** Cached calculation results */
+ baseMinusT;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
+
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+ if (digit < t) {
+ break;
+ }
+
+ baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+
+ }
+
+ out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output
+ output.splice(i++, 0, n);
+
+ }
+
+ return ucs2encode(output);
+ }
+
+ /**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+ function encode(input) {
+ var n,
+ delta,
+ handledCPCount,
+ basicLength,
+ bias,
+ j,
+ m,
+ q,
+ k,
+ t,
+ currentValue,
+ output = [],
+ /** `inputLength` will hold the number of code points in `input`. */
+ inputLength,
+ /** Cached calculation results */
+ handledCPCountPlusOne,
+ baseMinusT,
+ qMinusT;
+
+ // Convert the input in UCS-2 to Unicode
+ input = ucs2decode(input);
+
+ // Cache the length
+ inputLength = input.length;
+
+ // Initialize the state
+ n = initialN;
+ delta = 0;
+ bias = initialBias;
+
+ // Handle the basic code points
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ handledCPCount = basicLength = output.length;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string - if it is not empty - with a delimiter
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ for (m = maxInt, j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow
+ handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+
+ if (currentValue == n) {
+ // Represent delta as a generalized variable-length integer
+ for (q = delta, k = base; /* no condition */; k += base) {
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+ if (q < t) {
+ break;
+ }
+ qMinusT = q - t;
+ baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+
+ }
+ return output.join('');
+ }
+
+ /**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+ function toUnicode(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string)
+ ? decode(string.slice(4).toLowerCase())
+ : string;
+ });
+ }
+
+ /**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+ function toASCII(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string)
+ ? 'xn--' + encode(string)
+ : string;
+ });
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Define the public API */
+ punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '1.4.1',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+ };
+
+ /** Expose `punycode` */
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ typeof define == 'function' &&
+ typeof define.amd == 'object' &&
+ define.amd
+ ) {
+ define('punycode', function() {
+ return punycode;
+ });
+ } else if (freeExports && freeModule) {
+ if (module.exports == freeExports) {
+ // in Node.js, io.js, or RingoJS v0.8.0+
+ freeModule.exports = punycode;
+ } else {
+ // in Narwhal or RingoJS v0.7.0-
+ for (key in punycode) {
+ punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
+ }
+ }
+ } else {
+ // in Rhino or a web browser
+ root.punycode = punycode;
+ }
+
+}(this));
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}]},{},[2])(2)
+});
diff --git a/node_modules/psl/dist/psl.min.js b/node_modules/psl/dist/psl.min.js
new file mode 100644
index 0000000..d5c787e
--- /dev/null
+++ b/node_modules/psl/dist/psl.min.js
@@ -0,0 +1 @@
+!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).psl=a()}}(function(){return function s(m,t,u){function r(o,a){if(!t[o]){if(!m[o]){var i="function"==typeof require&&require;if(!a&&i)return i(o,!0);if(p)return p(o,!0);var e=new Error("Cannot find module '"+o+"'");throw e.code="MODULE_NOT_FOUND",e}var n=t[o]={exports:{}};m[o][0].call(n.exports,function(a){return r(m[o][1][a]||a)},n,n.exports,s,m,t,u)}return t[o].exports}for(var p="function"==typeof require&&require,a=0;a<u.length;a++)r(u[a]);return r}({1:[function(a,o,i){o.exports=["ac","com.ac","edu.ac","gov.ac","net.ac","mil.ac","org.ac","ad","nom.ad","ae","co.ae","net.ae","org.ae","sch.ae","ac.ae","gov.ae","mil.ae","aero","accident-investigation.aero","accident-prevention.aero","aerobatic.aero","aeroclub.aero","aerodrome.aero","agents.aero","aircraft.aero","airline.aero","airport.aero","air-surveillance.aero","airtraffic.aero","air-traffic-control.aero","ambulance.aero","amusement.aero","association.aero","author.aero","ballooning.aero","broker.aero","caa.aero","cargo.aero","catering.aero","certification.aero","championship.aero","charter.aero","civilaviation.aero","club.aero","conference.aero","consultant.aero","consulting.aero","control.aero","council.aero","crew.aero","design.aero","dgca.aero","educator.aero","emergency.aero","engine.aero","engineer.aero","entertainment.aero","equipment.aero","exchange.aero","express.aero","federation.aero","flight.aero","freight.aero","fuel.aero","gliding.aero","government.aero","groundhandling.aero","group.aero","hanggliding.aero","homebuilt.aero","insurance.aero","journal.aero","journalist.aero","leasing.aero","logistics.aero","magazine.aero","maintenance.aero","media.aero","microlight.aero","modelling.aero","navigation.aero","parachuting.aero","paragliding.aero","passenger-association.aero","pilot.aero","press.aero","production.aero","recreation.aero","repbody.aero","res.aero","research.aero","rotorcraft.aero","safety.aero","scientist.aero","services.aero","show.aero","skydiving.aero","software.aero","student.aero","trader.aero","trading.aero","trainer.aero","union.aero","workinggroup.aero","works.aero","af","gov.af","com.af","org.af","net.af","edu.af","ag","com.ag","org.ag","net.ag","co.ag","nom.ag","ai","off.ai","com.ai","net.ai","org.ai","al","com.al","edu.al","gov.al","mil.al","net.al","org.al","am","co.am","com.am","commune.am","net.am","org.am","ao","ed.ao","gv.ao","og.ao","co.ao","pb.ao","it.ao","aq","ar","com.ar","edu.ar","gob.ar","gov.ar","int.ar","mil.ar","musica.ar","net.ar","org.ar","tur.ar","arpa","e164.arpa","in-addr.arpa","ip6.arpa","iris.arpa","uri.arpa","urn.arpa","as","gov.as","asia","at","ac.at","co.at","gv.at","or.at","au","com.au","net.au","org.au","edu.au","gov.au","asn.au","id.au","info.au","conf.au","oz.au","act.au","nsw.au","nt.au","qld.au","sa.au","tas.au","vic.au","wa.au","act.edu.au","catholic.edu.au","nsw.edu.au","nt.edu.au","qld.edu.au","sa.edu.au","tas.edu.au","vic.edu.au","wa.edu.au","qld.gov.au","sa.gov.au","tas.gov.au","vic.gov.au","wa.gov.au","education.tas.edu.au","schools.nsw.edu.au","aw","com.aw","ax","az","com.az","net.az","int.az","gov.az","org.az","edu.az","info.az","pp.az","mil.az","name.az","pro.az","biz.az","ba","com.ba","edu.ba","gov.ba","mil.ba","net.ba","org.ba","bb","biz.bb","co.bb","com.bb","edu.bb","gov.bb","info.bb","net.bb","org.bb","store.bb","tv.bb","*.bd","be","ac.be","bf","gov.bf","bg","a.bg","b.bg","c.bg","d.bg","e.bg","f.bg","g.bg","h.bg","i.bg","j.bg","k.bg","l.bg","m.bg","n.bg","o.bg","p.bg","q.bg","r.bg","s.bg","t.bg","u.bg","v.bg","w.bg","x.bg","y.bg","z.bg","0.bg","1.bg","2.bg","3.bg","4.bg","5.bg","6.bg","7.bg","8.bg","9.bg","bh","com.bh","edu.bh","net.bh","org.bh","gov.bh","bi","co.bi","com.bi","edu.bi","or.bi","org.bi","biz","bj","asso.bj","barreau.bj","gouv.bj","bm","com.bm","edu.bm","gov.bm","net.bm","org.bm","bn","com.bn","edu.bn","gov.bn","net.bn","org.bn","bo","com.bo","edu.bo","gob.bo","int.bo","org.bo","net.bo","mil.bo","tv.bo","web.bo","academia.bo","agro.bo","arte.bo","blog.bo","bolivia.bo","ciencia.bo","cooperativa.bo","democracia.bo","deporte.bo","ecologia.bo","economia.bo","empresa.bo","indigena.bo","industria.bo","info.bo","medicina.bo","movimiento.bo","musica.bo","natural.bo","nombre.bo","noticias.bo","patria.bo","politica.bo","profesional.bo","plurinacional.bo","pueblo.bo","revista.bo","salud.bo","tecnologia.bo","tksat.bo","transporte.bo","wiki.bo","br","9guacu.br","abc.br","adm.br","adv.br","agr.br","aju.br","am.br","anani.br","aparecida.br","arq.br","art.br","ato.br","b.br","barueri.br","belem.br","bhz.br","bio.br","blog.br","bmd.br","boavista.br","bsb.br","campinagrande.br","campinas.br","caxias.br","cim.br","cng.br","cnt.br","com.br","contagem.br","coop.br","cri.br","cuiaba.br","curitiba.br","def.br","ecn.br","eco.br","edu.br","emp.br","eng.br","esp.br","etc.br","eti.br","far.br","feira.br","flog.br","floripa.br","fm.br","fnd.br","fortal.br","fot.br","foz.br","fst.br","g12.br","ggf.br","goiania.br","gov.br","ac.gov.br","al.gov.br","am.gov.br","ap.gov.br","ba.gov.br","ce.gov.br","df.gov.br","es.gov.br","go.gov.br","ma.gov.br","mg.gov.br","ms.gov.br","mt.gov.br","pa.gov.br","pb.gov.br","pe.gov.br","pi.gov.br","pr.gov.br","rj.gov.br","rn.gov.br","ro.gov.br","rr.gov.br","rs.gov.br","sc.gov.br","se.gov.br","sp.gov.br","to.gov.br","gru.br","imb.br","ind.br","inf.br","jab.br","jampa.br","jdf.br","joinville.br","jor.br","jus.br","leg.br","lel.br","londrina.br","macapa.br","maceio.br","manaus.br","maringa.br","mat.br","med.br","mil.br","morena.br","mp.br","mus.br","natal.br","net.br","niteroi.br","*.nom.br","not.br","ntr.br","odo.br","ong.br","org.br","osasco.br","palmas.br","poa.br","ppg.br","pro.br","psc.br","psi.br","pvh.br","qsl.br","radio.br","rec.br","recife.br","ribeirao.br","rio.br","riobranco.br","riopreto.br","salvador.br","sampa.br","santamaria.br","santoandre.br","saobernardo.br","saogonca.br","sjc.br","slg.br","slz.br","sorocaba.br","srv.br","taxi.br","tc.br","teo.br","the.br","tmp.br","trd.br","tur.br","tv.br","udi.br","vet.br","vix.br","vlog.br","wiki.br","zlg.br","bs","com.bs","net.bs","org.bs","edu.bs","gov.bs","bt","com.bt","edu.bt","gov.bt","net.bt","org.bt","bv","bw","co.bw","org.bw","by","gov.by","mil.by","com.by","of.by","bz","com.bz","net.bz","org.bz","edu.bz","gov.bz","ca","ab.ca","bc.ca","mb.ca","nb.ca","nf.ca","nl.ca","ns.ca","nt.ca","nu.ca","on.ca","pe.ca","qc.ca","sk.ca","yk.ca","gc.ca","cat","cc","cd","gov.cd","cf","cg","ch","ci","org.ci","or.ci","com.ci","co.ci","edu.ci","ed.ci","ac.ci","net.ci","go.ci","asso.ci","aéroport.ci","int.ci","presse.ci","md.ci","gouv.ci","*.ck","!www.ck","cl","aprendemas.cl","co.cl","gob.cl","gov.cl","mil.cl","cm","co.cm","com.cm","gov.cm","net.cm","cn","ac.cn","com.cn","edu.cn","gov.cn","net.cn","org.cn","mil.cn","公司.cn","网络.cn","網絡.cn","ah.cn","bj.cn","cq.cn","fj.cn","gd.cn","gs.cn","gz.cn","gx.cn","ha.cn","hb.cn","he.cn","hi.cn","hl.cn","hn.cn","jl.cn","js.cn","jx.cn","ln.cn","nm.cn","nx.cn","qh.cn","sc.cn","sd.cn","sh.cn","sn.cn","sx.cn","tj.cn","xj.cn","xz.cn","yn.cn","zj.cn","hk.cn","mo.cn","tw.cn","co","arts.co","com.co","edu.co","firm.co","gov.co","info.co","int.co","mil.co","net.co","nom.co","org.co","rec.co","web.co","com","coop","cr","ac.cr","co.cr","ed.cr","fi.cr","go.cr","or.cr","sa.cr","cu","com.cu","edu.cu","org.cu","net.cu","gov.cu","inf.cu","cv","cw","com.cw","edu.cw","net.cw","org.cw","cx","gov.cx","cy","ac.cy","biz.cy","com.cy","ekloges.cy","gov.cy","ltd.cy","name.cy","net.cy","org.cy","parliament.cy","press.cy","pro.cy","tm.cy","cz","de","dj","dk","dm","com.dm","net.dm","org.dm","edu.dm","gov.dm","do","art.do","com.do","edu.do","gob.do","gov.do","mil.do","net.do","org.do","sld.do","web.do","dz","com.dz","org.dz","net.dz","gov.dz","edu.dz","asso.dz","pol.dz","art.dz","ec","com.ec","info.ec","net.ec","fin.ec","k12.ec","med.ec","pro.ec","org.ec","edu.ec","gov.ec","gob.ec","mil.ec","edu","ee","edu.ee","gov.ee","riik.ee","lib.ee","med.ee","com.ee","pri.ee","aip.ee","org.ee","fie.ee","eg","com.eg","edu.eg","eun.eg","gov.eg","mil.eg","name.eg","net.eg","org.eg","sci.eg","*.er","es","com.es","nom.es","org.es","gob.es","edu.es","et","com.et","gov.et","org.et","edu.et","biz.et","name.et","info.et","net.et","eu","fi","aland.fi","fj","ac.fj","biz.fj","com.fj","gov.fj","info.fj","mil.fj","name.fj","net.fj","org.fj","pro.fj","*.fk","fm","fo","fr","asso.fr","com.fr","gouv.fr","nom.fr","prd.fr","tm.fr","aeroport.fr","avocat.fr","avoues.fr","cci.fr","chambagri.fr","chirurgiens-dentistes.fr","experts-comptables.fr","geometre-expert.fr","greta.fr","huissier-justice.fr","medecin.fr","notaires.fr","pharmacien.fr","port.fr","veterinaire.fr","ga","gb","gd","ge","com.ge","edu.ge","gov.ge","org.ge","mil.ge","net.ge","pvt.ge","gf","gg","co.gg","net.gg","org.gg","gh","com.gh","edu.gh","gov.gh","org.gh","mil.gh","gi","com.gi","ltd.gi","gov.gi","mod.gi","edu.gi","org.gi","gl","co.gl","com.gl","edu.gl","net.gl","org.gl","gm","gn","ac.gn","com.gn","edu.gn","gov.gn","org.gn","net.gn","gov","gp","com.gp","net.gp","mobi.gp","edu.gp","org.gp","asso.gp","gq","gr","com.gr","edu.gr","net.gr","org.gr","gov.gr","gs","gt","com.gt","edu.gt","gob.gt","ind.gt","mil.gt","net.gt","org.gt","gu","com.gu","edu.gu","gov.gu","guam.gu","info.gu","net.gu","org.gu","web.gu","gw","gy","co.gy","com.gy","edu.gy","gov.gy","net.gy","org.gy","hk","com.hk","edu.hk","gov.hk","idv.hk","net.hk","org.hk","公司.hk","教育.hk","敎育.hk","政府.hk","個人.hk","个人.hk","箇人.hk","網络.hk","网络.hk","组織.hk","網絡.hk","网絡.hk","组织.hk","組織.hk","組织.hk","hm","hn","com.hn","edu.hn","org.hn","net.hn","mil.hn","gob.hn","hr","iz.hr","from.hr","name.hr","com.hr","ht","com.ht","shop.ht","firm.ht","info.ht","adult.ht","net.ht","pro.ht","org.ht","med.ht","art.ht","coop.ht","pol.ht","asso.ht","edu.ht","rel.ht","gouv.ht","perso.ht","hu","co.hu","info.hu","org.hu","priv.hu","sport.hu","tm.hu","2000.hu","agrar.hu","bolt.hu","casino.hu","city.hu","erotica.hu","erotika.hu","film.hu","forum.hu","games.hu","hotel.hu","ingatlan.hu","jogasz.hu","konyvelo.hu","lakas.hu","media.hu","news.hu","reklam.hu","sex.hu","shop.hu","suli.hu","szex.hu","tozsde.hu","utazas.hu","video.hu","id","ac.id","biz.id","co.id","desa.id","go.id","mil.id","my.id","net.id","or.id","ponpes.id","sch.id","web.id","ie","gov.ie","il","ac.il","co.il","gov.il","idf.il","k12.il","muni.il","net.il","org.il","im","ac.im","co.im","com.im","ltd.co.im","net.im","org.im","plc.co.im","tt.im","tv.im","in","co.in","firm.in","net.in","org.in","gen.in","ind.in","nic.in","ac.in","edu.in","res.in","gov.in","mil.in","info","int","eu.int","io","com.io","iq","gov.iq","edu.iq","mil.iq","com.iq","org.iq","net.iq","ir","ac.ir","co.ir","gov.ir","id.ir","net.ir","org.ir","sch.ir","ایران.ir","ايران.ir","is","net.is","com.is","edu.is","gov.is","org.is","int.is","it","gov.it","edu.it","abr.it","abruzzo.it","aosta-valley.it","aostavalley.it","bas.it","basilicata.it","cal.it","calabria.it","cam.it","campania.it","emilia-romagna.it","emiliaromagna.it","emr.it","friuli-v-giulia.it","friuli-ve-giulia.it","friuli-vegiulia.it","friuli-venezia-giulia.it","friuli-veneziagiulia.it","friuli-vgiulia.it","friuliv-giulia.it","friulive-giulia.it","friulivegiulia.it","friulivenezia-giulia.it","friuliveneziagiulia.it","friulivgiulia.it","fvg.it","laz.it","lazio.it","lig.it","liguria.it","lom.it","lombardia.it","lombardy.it","lucania.it","mar.it","marche.it","mol.it","molise.it","piedmont.it","piemonte.it","pmn.it","pug.it","puglia.it","sar.it","sardegna.it","sardinia.it","sic.it","sicilia.it","sicily.it","taa.it","tos.it","toscana.it","trentin-sud-tirol.it","trentin-süd-tirol.it","trentin-sudtirol.it","trentin-südtirol.it","trentin-sued-tirol.it","trentin-suedtirol.it","trentino-a-adige.it","trentino-aadige.it","trentino-alto-adige.it","trentino-altoadige.it","trentino-s-tirol.it","trentino-stirol.it","trentino-sud-tirol.it","trentino-süd-tirol.it","trentino-sudtirol.it","trentino-südtirol.it","trentino-sued-tirol.it","trentino-suedtirol.it","trentino.it","trentinoa-adige.it","trentinoaadige.it","trentinoalto-adige.it","trentinoaltoadige.it","trentinos-tirol.it","trentinostirol.it","trentinosud-tirol.it","trentinosüd-tirol.it","trentinosudtirol.it","trentinosüdtirol.it","trentinosued-tirol.it","trentinosuedtirol.it","trentinsud-tirol.it","trentinsüd-tirol.it","trentinsudtirol.it","trentinsüdtirol.it","trentinsued-tirol.it","trentinsuedtirol.it","tuscany.it","umb.it","umbria.it","val-d-aosta.it","val-daosta.it","vald-aosta.it","valdaosta.it","valle-aosta.it","valle-d-aosta.it","valle-daosta.it","valleaosta.it","valled-aosta.it","valledaosta.it","vallee-aoste.it","vallée-aoste.it","vallee-d-aoste.it","vallée-d-aoste.it","valleeaoste.it","valléeaoste.it","valleedaoste.it","valléedaoste.it","vao.it","vda.it","ven.it","veneto.it","ag.it","agrigento.it","al.it","alessandria.it","alto-adige.it","altoadige.it","an.it","ancona.it","andria-barletta-trani.it","andria-trani-barletta.it","andriabarlettatrani.it","andriatranibarletta.it","ao.it","aosta.it","aoste.it","ap.it","aq.it","aquila.it","ar.it","arezzo.it","ascoli-piceno.it","ascolipiceno.it","asti.it","at.it","av.it","avellino.it","ba.it","balsan-sudtirol.it","balsan-südtirol.it","balsan-suedtirol.it","balsan.it","bari.it","barletta-trani-andria.it","barlettatraniandria.it","belluno.it","benevento.it","bergamo.it","bg.it","bi.it","biella.it","bl.it","bn.it","bo.it","bologna.it","bolzano-altoadige.it","bolzano.it","bozen-sudtirol.it","bozen-südtirol.it","bozen-suedtirol.it","bozen.it","br.it","brescia.it","brindisi.it","bs.it","bt.it","bulsan-sudtirol.it","bulsan-südtirol.it","bulsan-suedtirol.it","bulsan.it","bz.it","ca.it","cagliari.it","caltanissetta.it","campidano-medio.it","campidanomedio.it","campobasso.it","carbonia-iglesias.it","carboniaiglesias.it","carrara-massa.it","carraramassa.it","caserta.it","catania.it","catanzaro.it","cb.it","ce.it","cesena-forli.it","cesena-forlì.it","cesenaforli.it","cesenaforlì.it","ch.it","chieti.it","ci.it","cl.it","cn.it","co.it","como.it","cosenza.it","cr.it","cremona.it","crotone.it","cs.it","ct.it","cuneo.it","cz.it","dell-ogliastra.it","dellogliastra.it","en.it","enna.it","fc.it","fe.it","fermo.it","ferrara.it","fg.it","fi.it","firenze.it","florence.it","fm.it","foggia.it","forli-cesena.it","forlì-cesena.it","forlicesena.it","forlìcesena.it","fr.it","frosinone.it","ge.it","genoa.it","genova.it","go.it","gorizia.it","gr.it","grosseto.it","iglesias-carbonia.it","iglesiascarbonia.it","im.it","imperia.it","is.it","isernia.it","kr.it","la-spezia.it","laquila.it","laspezia.it","latina.it","lc.it","le.it","lecce.it","lecco.it","li.it","livorno.it","lo.it","lodi.it","lt.it","lu.it","lucca.it","macerata.it","mantova.it","massa-carrara.it","massacarrara.it","matera.it","mb.it","mc.it","me.it","medio-campidano.it","mediocampidano.it","messina.it","mi.it","milan.it","milano.it","mn.it","mo.it","modena.it","monza-brianza.it","monza-e-della-brianza.it","monza.it","monzabrianza.it","monzaebrianza.it","monzaedellabrianza.it","ms.it","mt.it","na.it","naples.it","napoli.it","no.it","novara.it","nu.it","nuoro.it","og.it","ogliastra.it","olbia-tempio.it","olbiatempio.it","or.it","oristano.it","ot.it","pa.it","padova.it","padua.it","palermo.it","parma.it","pavia.it","pc.it","pd.it","pe.it","perugia.it","pesaro-urbino.it","pesarourbino.it","pescara.it","pg.it","pi.it","piacenza.it","pisa.it","pistoia.it","pn.it","po.it","pordenone.it","potenza.it","pr.it","prato.it","pt.it","pu.it","pv.it","pz.it","ra.it","ragusa.it","ravenna.it","rc.it","re.it","reggio-calabria.it","reggio-emilia.it","reggiocalabria.it","reggioemilia.it","rg.it","ri.it","rieti.it","rimini.it","rm.it","rn.it","ro.it","roma.it","rome.it","rovigo.it","sa.it","salerno.it","sassari.it","savona.it","si.it","siena.it","siracusa.it","so.it","sondrio.it","sp.it","sr.it","ss.it","suedtirol.it","südtirol.it","sv.it","ta.it","taranto.it","te.it","tempio-olbia.it","tempioolbia.it","teramo.it","terni.it","tn.it","to.it","torino.it","tp.it","tr.it","trani-andria-barletta.it","trani-barletta-andria.it","traniandriabarletta.it","tranibarlettaandria.it","trapani.it","trento.it","treviso.it","trieste.it","ts.it","turin.it","tv.it","ud.it","udine.it","urbino-pesaro.it","urbinopesaro.it","va.it","varese.it","vb.it","vc.it","ve.it","venezia.it","venice.it","verbania.it","vercelli.it","verona.it","vi.it","vibo-valentia.it","vibovalentia.it","vicenza.it","viterbo.it","vr.it","vs.it","vt.it","vv.it","je","co.je","net.je","org.je","*.jm","jo","com.jo","org.jo","net.jo","edu.jo","sch.jo","gov.jo","mil.jo","name.jo","jobs","jp","ac.jp","ad.jp","co.jp","ed.jp","go.jp","gr.jp","lg.jp","ne.jp","or.jp","aichi.jp","akita.jp","aomori.jp","chiba.jp","ehime.jp","fukui.jp","fukuoka.jp","fukushima.jp","gifu.jp","gunma.jp","hiroshima.jp","hokkaido.jp","hyogo.jp","ibaraki.jp","ishikawa.jp","iwate.jp","kagawa.jp","kagoshima.jp","kanagawa.jp","kochi.jp","kumamoto.jp","kyoto.jp","mie.jp","miyagi.jp","miyazaki.jp","nagano.jp","nagasaki.jp","nara.jp","niigata.jp","oita.jp","okayama.jp","okinawa.jp","osaka.jp","saga.jp","saitama.jp","shiga.jp","shimane.jp","shizuoka.jp","tochigi.jp","tokushima.jp","tokyo.jp","tottori.jp","toyama.jp","wakayama.jp","yamagata.jp","yamaguchi.jp","yamanashi.jp","栃木.jp","愛知.jp","愛媛.jp","兵庫.jp","熊本.jp","茨城.jp","北海道.jp","千葉.jp","和歌山.jp","長崎.jp","長野.jp","新潟.jp","青森.jp","静岡.jp","東京.jp","石川.jp","埼玉.jp","三重.jp","京都.jp","佐賀.jp","大分.jp","大阪.jp","奈良.jp","宮城.jp","宮崎.jp","富山.jp","山口.jp","山形.jp","山梨.jp","岩手.jp","岐阜.jp","岡山.jp","島根.jp","広島.jp","徳島.jp","沖縄.jp","滋賀.jp","神奈川.jp","福井.jp","福岡.jp","福島.jp","秋田.jp","群馬.jp","香川.jp","高知.jp","鳥取.jp","鹿児島.jp","*.kawasaki.jp","*.kitakyushu.jp","*.kobe.jp","*.nagoya.jp","*.sapporo.jp","*.sendai.jp","*.yokohama.jp","!city.kawasaki.jp","!city.kitakyushu.jp","!city.kobe.jp","!city.nagoya.jp","!city.sapporo.jp","!city.sendai.jp","!city.yokohama.jp","aisai.aichi.jp","ama.aichi.jp","anjo.aichi.jp","asuke.aichi.jp","chiryu.aichi.jp","chita.aichi.jp","fuso.aichi.jp","gamagori.aichi.jp","handa.aichi.jp","hazu.aichi.jp","hekinan.aichi.jp","higashiura.aichi.jp","ichinomiya.aichi.jp","inazawa.aichi.jp","inuyama.aichi.jp","isshiki.aichi.jp","iwakura.aichi.jp","kanie.aichi.jp","kariya.aichi.jp","kasugai.aichi.jp","kira.aichi.jp","kiyosu.aichi.jp","komaki.aichi.jp","konan.aichi.jp","kota.aichi.jp","mihama.aichi.jp","miyoshi.aichi.jp","nishio.aichi.jp","nisshin.aichi.jp","obu.aichi.jp","oguchi.aichi.jp","oharu.aichi.jp","okazaki.aichi.jp","owariasahi.aichi.jp","seto.aichi.jp","shikatsu.aichi.jp","shinshiro.aichi.jp","shitara.aichi.jp","tahara.aichi.jp","takahama.aichi.jp","tobishima.aichi.jp","toei.aichi.jp","togo.aichi.jp","tokai.aichi.jp","tokoname.aichi.jp","toyoake.aichi.jp","toyohashi.aichi.jp","toyokawa.aichi.jp","toyone.aichi.jp","toyota.aichi.jp","tsushima.aichi.jp","yatomi.aichi.jp","akita.akita.jp","daisen.akita.jp","fujisato.akita.jp","gojome.akita.jp","hachirogata.akita.jp","happou.akita.jp","higashinaruse.akita.jp","honjo.akita.jp","honjyo.akita.jp","ikawa.akita.jp","kamikoani.akita.jp","kamioka.akita.jp","katagami.akita.jp","kazuno.akita.jp","kitaakita.akita.jp","kosaka.akita.jp","kyowa.akita.jp","misato.akita.jp","mitane.akita.jp","moriyoshi.akita.jp","nikaho.akita.jp","noshiro.akita.jp","odate.akita.jp","oga.akita.jp","ogata.akita.jp","semboku.akita.jp","yokote.akita.jp","yurihonjo.akita.jp","aomori.aomori.jp","gonohe.aomori.jp","hachinohe.aomori.jp","hashikami.aomori.jp","hiranai.aomori.jp","hirosaki.aomori.jp","itayanagi.aomori.jp","kuroishi.aomori.jp","misawa.aomori.jp","mutsu.aomori.jp","nakadomari.aomori.jp","noheji.aomori.jp","oirase.aomori.jp","owani.aomori.jp","rokunohe.aomori.jp","sannohe.aomori.jp","shichinohe.aomori.jp","shingo.aomori.jp","takko.aomori.jp","towada.aomori.jp","tsugaru.aomori.jp","tsuruta.aomori.jp","abiko.chiba.jp","asahi.chiba.jp","chonan.chiba.jp","chosei.chiba.jp","choshi.chiba.jp","chuo.chiba.jp","funabashi.chiba.jp","futtsu.chiba.jp","hanamigawa.chiba.jp","ichihara.chiba.jp","ichikawa.chiba.jp","ichinomiya.chiba.jp","inzai.chiba.jp","isumi.chiba.jp","kamagaya.chiba.jp","kamogawa.chiba.jp","kashiwa.chiba.jp","katori.chiba.jp","katsuura.chiba.jp","kimitsu.chiba.jp","kisarazu.chiba.jp","kozaki.chiba.jp","kujukuri.chiba.jp","kyonan.chiba.jp","matsudo.chiba.jp","midori.chiba.jp","mihama.chiba.jp","minamiboso.chiba.jp","mobara.chiba.jp","mutsuzawa.chiba.jp","nagara.chiba.jp","nagareyama.chiba.jp","narashino.chiba.jp","narita.chiba.jp","noda.chiba.jp","oamishirasato.chiba.jp","omigawa.chiba.jp","onjuku.chiba.jp","otaki.chiba.jp","sakae.chiba.jp","sakura.chiba.jp","shimofusa.chiba.jp","shirako.chiba.jp","shiroi.chiba.jp","shisui.chiba.jp","sodegaura.chiba.jp","sosa.chiba.jp","tako.chiba.jp","tateyama.chiba.jp","togane.chiba.jp","tohnosho.chiba.jp","tomisato.chiba.jp","urayasu.chiba.jp","yachimata.chiba.jp","yachiyo.chiba.jp","yokaichiba.chiba.jp","yokoshibahikari.chiba.jp","yotsukaido.chiba.jp","ainan.ehime.jp","honai.ehime.jp","ikata.ehime.jp","imabari.ehime.jp","iyo.ehime.jp","kamijima.ehime.jp","kihoku.ehime.jp","kumakogen.ehime.jp","masaki.ehime.jp","matsuno.ehime.jp","matsuyama.ehime.jp","namikata.ehime.jp","niihama.ehime.jp","ozu.ehime.jp","saijo.ehime.jp","seiyo.ehime.jp","shikokuchuo.ehime.jp","tobe.ehime.jp","toon.ehime.jp","uchiko.ehime.jp","uwajima.ehime.jp","yawatahama.ehime.jp","echizen.fukui.jp","eiheiji.fukui.jp","fukui.fukui.jp","ikeda.fukui.jp","katsuyama.fukui.jp","mihama.fukui.jp","minamiechizen.fukui.jp","obama.fukui.jp","ohi.fukui.jp","ono.fukui.jp","sabae.fukui.jp","sakai.fukui.jp","takahama.fukui.jp","tsuruga.fukui.jp","wakasa.fukui.jp","ashiya.fukuoka.jp","buzen.fukuoka.jp","chikugo.fukuoka.jp","chikuho.fukuoka.jp","chikujo.fukuoka.jp","chikushino.fukuoka.jp","chikuzen.fukuoka.jp","chuo.fukuoka.jp","dazaifu.fukuoka.jp","fukuchi.fukuoka.jp","hakata.fukuoka.jp","higashi.fukuoka.jp","hirokawa.fukuoka.jp","hisayama.fukuoka.jp","iizuka.fukuoka.jp","inatsuki.fukuoka.jp","kaho.fukuoka.jp","kasuga.fukuoka.jp","kasuya.fukuoka.jp","kawara.fukuoka.jp","keisen.fukuoka.jp","koga.fukuoka.jp","kurate.fukuoka.jp","kurogi.fukuoka.jp","kurume.fukuoka.jp","minami.fukuoka.jp","miyako.fukuoka.jp","miyama.fukuoka.jp","miyawaka.fukuoka.jp","mizumaki.fukuoka.jp","munakata.fukuoka.jp","nakagawa.fukuoka.jp","nakama.fukuoka.jp","nishi.fukuoka.jp","nogata.fukuoka.jp","ogori.fukuoka.jp","okagaki.fukuoka.jp","okawa.fukuoka.jp","oki.fukuoka.jp","omuta.fukuoka.jp","onga.fukuoka.jp","onojo.fukuoka.jp","oto.fukuoka.jp","saigawa.fukuoka.jp","sasaguri.fukuoka.jp","shingu.fukuoka.jp","shinyoshitomi.fukuoka.jp","shonai.fukuoka.jp","soeda.fukuoka.jp","sue.fukuoka.jp","tachiarai.fukuoka.jp","tagawa.fukuoka.jp","takata.fukuoka.jp","toho.fukuoka.jp","toyotsu.fukuoka.jp","tsuiki.fukuoka.jp","ukiha.fukuoka.jp","umi.fukuoka.jp","usui.fukuoka.jp","yamada.fukuoka.jp","yame.fukuoka.jp","yanagawa.fukuoka.jp","yukuhashi.fukuoka.jp","aizubange.fukushima.jp","aizumisato.fukushima.jp","aizuwakamatsu.fukushima.jp","asakawa.fukushima.jp","bandai.fukushima.jp","date.fukushima.jp","fukushima.fukushima.jp","furudono.fukushima.jp","futaba.fukushima.jp","hanawa.fukushima.jp","higashi.fukushima.jp","hirata.fukushima.jp","hirono.fukushima.jp","iitate.fukushima.jp","inawashiro.fukushima.jp","ishikawa.fukushima.jp","iwaki.fukushima.jp","izumizaki.fukushima.jp","kagamiishi.fukushima.jp","kaneyama.fukushima.jp","kawamata.fukushima.jp","kitakata.fukushima.jp","kitashiobara.fukushima.jp","koori.fukushima.jp","koriyama.fukushima.jp","kunimi.fukushima.jp","miharu.fukushima.jp","mishima.fukushima.jp","namie.fukushima.jp","nango.fukushima.jp","nishiaizu.fukushima.jp","nishigo.fukushima.jp","okuma.fukushima.jp","omotego.fukushima.jp","ono.fukushima.jp","otama.fukushima.jp","samegawa.fukushima.jp","shimogo.fukushima.jp","shirakawa.fukushima.jp","showa.fukushima.jp","soma.fukushima.jp","sukagawa.fukushima.jp","taishin.fukushima.jp","tamakawa.fukushima.jp","tanagura.fukushima.jp","tenei.fukushima.jp","yabuki.fukushima.jp","yamato.fukushima.jp","yamatsuri.fukushima.jp","yanaizu.fukushima.jp","yugawa.fukushima.jp","anpachi.gifu.jp","ena.gifu.jp","gifu.gifu.jp","ginan.gifu.jp","godo.gifu.jp","gujo.gifu.jp","hashima.gifu.jp","hichiso.gifu.jp","hida.gifu.jp","higashishirakawa.gifu.jp","ibigawa.gifu.jp","ikeda.gifu.jp","kakamigahara.gifu.jp","kani.gifu.jp","kasahara.gifu.jp","kasamatsu.gifu.jp","kawaue.gifu.jp","kitagata.gifu.jp","mino.gifu.jp","minokamo.gifu.jp","mitake.gifu.jp","mizunami.gifu.jp","motosu.gifu.jp","nakatsugawa.gifu.jp","ogaki.gifu.jp","sakahogi.gifu.jp","seki.gifu.jp","sekigahara.gifu.jp","shirakawa.gifu.jp","tajimi.gifu.jp","takayama.gifu.jp","tarui.gifu.jp","toki.gifu.jp","tomika.gifu.jp","wanouchi.gifu.jp","yamagata.gifu.jp","yaotsu.gifu.jp","yoro.gifu.jp","annaka.gunma.jp","chiyoda.gunma.jp","fujioka.gunma.jp","higashiagatsuma.gunma.jp","isesaki.gunma.jp","itakura.gunma.jp","kanna.gunma.jp","kanra.gunma.jp","katashina.gunma.jp","kawaba.gunma.jp","kiryu.gunma.jp","kusatsu.gunma.jp","maebashi.gunma.jp","meiwa.gunma.jp","midori.gunma.jp","minakami.gunma.jp","naganohara.gunma.jp","nakanojo.gunma.jp","nanmoku.gunma.jp","numata.gunma.jp","oizumi.gunma.jp","ora.gunma.jp","ota.gunma.jp","shibukawa.gunma.jp","shimonita.gunma.jp","shinto.gunma.jp","showa.gunma.jp","takasaki.gunma.jp","takayama.gunma.jp","tamamura.gunma.jp","tatebayashi.gunma.jp","tomioka.gunma.jp","tsukiyono.gunma.jp","tsumagoi.gunma.jp","ueno.gunma.jp","yoshioka.gunma.jp","asaminami.hiroshima.jp","daiwa.hiroshima.jp","etajima.hiroshima.jp","fuchu.hiroshima.jp","fukuyama.hiroshima.jp","hatsukaichi.hiroshima.jp","higashihiroshima.hiroshima.jp","hongo.hiroshima.jp","jinsekikogen.hiroshima.jp","kaita.hiroshima.jp","kui.hiroshima.jp","kumano.hiroshima.jp","kure.hiroshima.jp","mihara.hiroshima.jp","miyoshi.hiroshima.jp","naka.hiroshima.jp","onomichi.hiroshima.jp","osakikamijima.hiroshima.jp","otake.hiroshima.jp","saka.hiroshima.jp","sera.hiroshima.jp","seranishi.hiroshima.jp","shinichi.hiroshima.jp","shobara.hiroshima.jp","takehara.hiroshima.jp","abashiri.hokkaido.jp","abira.hokkaido.jp","aibetsu.hokkaido.jp","akabira.hokkaido.jp","akkeshi.hokkaido.jp","asahikawa.hokkaido.jp","ashibetsu.hokkaido.jp","ashoro.hokkaido.jp","assabu.hokkaido.jp","atsuma.hokkaido.jp","bibai.hokkaido.jp","biei.hokkaido.jp","bifuka.hokkaido.jp","bihoro.hokkaido.jp","biratori.hokkaido.jp","chippubetsu.hokkaido.jp","chitose.hokkaido.jp","date.hokkaido.jp","ebetsu.hokkaido.jp","embetsu.hokkaido.jp","eniwa.hokkaido.jp","erimo.hokkaido.jp","esan.hokkaido.jp","esashi.hokkaido.jp","fukagawa.hokkaido.jp","fukushima.hokkaido.jp","furano.hokkaido.jp","furubira.hokkaido.jp","haboro.hokkaido.jp","hakodate.hokkaido.jp","hamatonbetsu.hokkaido.jp","hidaka.hokkaido.jp","higashikagura.hokkaido.jp","higashikawa.hokkaido.jp","hiroo.hokkaido.jp","hokuryu.hokkaido.jp","hokuto.hokkaido.jp","honbetsu.hokkaido.jp","horokanai.hokkaido.jp","horonobe.hokkaido.jp","ikeda.hokkaido.jp","imakane.hokkaido.jp","ishikari.hokkaido.jp","iwamizawa.hokkaido.jp","iwanai.hokkaido.jp","kamifurano.hokkaido.jp","kamikawa.hokkaido.jp","kamishihoro.hokkaido.jp","kamisunagawa.hokkaido.jp","kamoenai.hokkaido.jp","kayabe.hokkaido.jp","kembuchi.hokkaido.jp","kikonai.hokkaido.jp","kimobetsu.hokkaido.jp","kitahiroshima.hokkaido.jp","kitami.hokkaido.jp","kiyosato.hokkaido.jp","koshimizu.hokkaido.jp","kunneppu.hokkaido.jp","kuriyama.hokkaido.jp","kuromatsunai.hokkaido.jp","kushiro.hokkaido.jp","kutchan.hokkaido.jp","kyowa.hokkaido.jp","mashike.hokkaido.jp","matsumae.hokkaido.jp","mikasa.hokkaido.jp","minamifurano.hokkaido.jp","mombetsu.hokkaido.jp","moseushi.hokkaido.jp","mukawa.hokkaido.jp","muroran.hokkaido.jp","naie.hokkaido.jp","nakagawa.hokkaido.jp","nakasatsunai.hokkaido.jp","nakatombetsu.hokkaido.jp","nanae.hokkaido.jp","nanporo.hokkaido.jp","nayoro.hokkaido.jp","nemuro.hokkaido.jp","niikappu.hokkaido.jp","niki.hokkaido.jp","nishiokoppe.hokkaido.jp","noboribetsu.hokkaido.jp","numata.hokkaido.jp","obihiro.hokkaido.jp","obira.hokkaido.jp","oketo.hokkaido.jp","okoppe.hokkaido.jp","otaru.hokkaido.jp","otobe.hokkaido.jp","otofuke.hokkaido.jp","otoineppu.hokkaido.jp","oumu.hokkaido.jp","ozora.hokkaido.jp","pippu.hokkaido.jp","rankoshi.hokkaido.jp","rebun.hokkaido.jp","rikubetsu.hokkaido.jp","rishiri.hokkaido.jp","rishirifuji.hokkaido.jp","saroma.hokkaido.jp","sarufutsu.hokkaido.jp","shakotan.hokkaido.jp","shari.hokkaido.jp","shibecha.hokkaido.jp","shibetsu.hokkaido.jp","shikabe.hokkaido.jp","shikaoi.hokkaido.jp","shimamaki.hokkaido.jp","shimizu.hokkaido.jp","shimokawa.hokkaido.jp","shinshinotsu.hokkaido.jp","shintoku.hokkaido.jp","shiranuka.hokkaido.jp","shiraoi.hokkaido.jp","shiriuchi.hokkaido.jp","sobetsu.hokkaido.jp","sunagawa.hokkaido.jp","taiki.hokkaido.jp","takasu.hokkaido.jp","takikawa.hokkaido.jp","takinoue.hokkaido.jp","teshikaga.hokkaido.jp","tobetsu.hokkaido.jp","tohma.hokkaido.jp","tomakomai.hokkaido.jp","tomari.hokkaido.jp","toya.hokkaido.jp","toyako.hokkaido.jp","toyotomi.hokkaido.jp","toyoura.hokkaido.jp","tsubetsu.hokkaido.jp","tsukigata.hokkaido.jp","urakawa.hokkaido.jp","urausu.hokkaido.jp","uryu.hokkaido.jp","utashinai.hokkaido.jp","wakkanai.hokkaido.jp","wassamu.hokkaido.jp","yakumo.hokkaido.jp","yoichi.hokkaido.jp","aioi.hyogo.jp","akashi.hyogo.jp","ako.hyogo.jp","amagasaki.hyogo.jp","aogaki.hyogo.jp","asago.hyogo.jp","ashiya.hyogo.jp","awaji.hyogo.jp","fukusaki.hyogo.jp","goshiki.hyogo.jp","harima.hyogo.jp","himeji.hyogo.jp","ichikawa.hyogo.jp","inagawa.hyogo.jp","itami.hyogo.jp","kakogawa.hyogo.jp","kamigori.hyogo.jp","kamikawa.hyogo.jp","kasai.hyogo.jp","kasuga.hyogo.jp","kawanishi.hyogo.jp","miki.hyogo.jp","minamiawaji.hyogo.jp","nishinomiya.hyogo.jp","nishiwaki.hyogo.jp","ono.hyogo.jp","sanda.hyogo.jp","sannan.hyogo.jp","sasayama.hyogo.jp","sayo.hyogo.jp","shingu.hyogo.jp","shinonsen.hyogo.jp","shiso.hyogo.jp","sumoto.hyogo.jp","taishi.hyogo.jp","taka.hyogo.jp","takarazuka.hyogo.jp","takasago.hyogo.jp","takino.hyogo.jp","tamba.hyogo.jp","tatsuno.hyogo.jp","toyooka.hyogo.jp","yabu.hyogo.jp","yashiro.hyogo.jp","yoka.hyogo.jp","yokawa.hyogo.jp","ami.ibaraki.jp","asahi.ibaraki.jp","bando.ibaraki.jp","chikusei.ibaraki.jp","daigo.ibaraki.jp","fujishiro.ibaraki.jp","hitachi.ibaraki.jp","hitachinaka.ibaraki.jp","hitachiomiya.ibaraki.jp","hitachiota.ibaraki.jp","ibaraki.ibaraki.jp","ina.ibaraki.jp","inashiki.ibaraki.jp","itako.ibaraki.jp","iwama.ibaraki.jp","joso.ibaraki.jp","kamisu.ibaraki.jp","kasama.ibaraki.jp","kashima.ibaraki.jp","kasumigaura.ibaraki.jp","koga.ibaraki.jp","miho.ibaraki.jp","mito.ibaraki.jp","moriya.ibaraki.jp","naka.ibaraki.jp","namegata.ibaraki.jp","oarai.ibaraki.jp","ogawa.ibaraki.jp","omitama.ibaraki.jp","ryugasaki.ibaraki.jp","sakai.ibaraki.jp","sakuragawa.ibaraki.jp","shimodate.ibaraki.jp","shimotsuma.ibaraki.jp","shirosato.ibaraki.jp","sowa.ibaraki.jp","suifu.ibaraki.jp","takahagi.ibaraki.jp","tamatsukuri.ibaraki.jp","tokai.ibaraki.jp","tomobe.ibaraki.jp","tone.ibaraki.jp","toride.ibaraki.jp","tsuchiura.ibaraki.jp","tsukuba.ibaraki.jp","uchihara.ibaraki.jp","ushiku.ibaraki.jp","yachiyo.ibaraki.jp","yamagata.ibaraki.jp","yawara.ibaraki.jp","yuki.ibaraki.jp","anamizu.ishikawa.jp","hakui.ishikawa.jp","hakusan.ishikawa.jp","kaga.ishikawa.jp","kahoku.ishikawa.jp","kanazawa.ishikawa.jp","kawakita.ishikawa.jp","komatsu.ishikawa.jp","nakanoto.ishikawa.jp","nanao.ishikawa.jp","nomi.ishikawa.jp","nonoichi.ishikawa.jp","noto.ishikawa.jp","shika.ishikawa.jp","suzu.ishikawa.jp","tsubata.ishikawa.jp","tsurugi.ishikawa.jp","uchinada.ishikawa.jp","wajima.ishikawa.jp","fudai.iwate.jp","fujisawa.iwate.jp","hanamaki.iwate.jp","hiraizumi.iwate.jp","hirono.iwate.jp","ichinohe.iwate.jp","ichinoseki.iwate.jp","iwaizumi.iwate.jp","iwate.iwate.jp","joboji.iwate.jp","kamaishi.iwate.jp","kanegasaki.iwate.jp","karumai.iwate.jp","kawai.iwate.jp","kitakami.iwate.jp","kuji.iwate.jp","kunohe.iwate.jp","kuzumaki.iwate.jp","miyako.iwate.jp","mizusawa.iwate.jp","morioka.iwate.jp","ninohe.iwate.jp","noda.iwate.jp","ofunato.iwate.jp","oshu.iwate.jp","otsuchi.iwate.jp","rikuzentakata.iwate.jp","shiwa.iwate.jp","shizukuishi.iwate.jp","sumita.iwate.jp","tanohata.iwate.jp","tono.iwate.jp","yahaba.iwate.jp","yamada.iwate.jp","ayagawa.kagawa.jp","higashikagawa.kagawa.jp","kanonji.kagawa.jp","kotohira.kagawa.jp","manno.kagawa.jp","marugame.kagawa.jp","mitoyo.kagawa.jp","naoshima.kagawa.jp","sanuki.kagawa.jp","tadotsu.kagawa.jp","takamatsu.kagawa.jp","tonosho.kagawa.jp","uchinomi.kagawa.jp","utazu.kagawa.jp","zentsuji.kagawa.jp","akune.kagoshima.jp","amami.kagoshima.jp","hioki.kagoshima.jp","isa.kagoshima.jp","isen.kagoshima.jp","izumi.kagoshima.jp","kagoshima.kagoshima.jp","kanoya.kagoshima.jp","kawanabe.kagoshima.jp","kinko.kagoshima.jp","kouyama.kagoshima.jp","makurazaki.kagoshima.jp","matsumoto.kagoshima.jp","minamitane.kagoshima.jp","nakatane.kagoshima.jp","nishinoomote.kagoshima.jp","satsumasendai.kagoshima.jp","soo.kagoshima.jp","tarumizu.kagoshima.jp","yusui.kagoshima.jp","aikawa.kanagawa.jp","atsugi.kanagawa.jp","ayase.kanagawa.jp","chigasaki.kanagawa.jp","ebina.kanagawa.jp","fujisawa.kanagawa.jp","hadano.kanagawa.jp","hakone.kanagawa.jp","hiratsuka.kanagawa.jp","isehara.kanagawa.jp","kaisei.kanagawa.jp","kamakura.kanagawa.jp","kiyokawa.kanagawa.jp","matsuda.kanagawa.jp","minamiashigara.kanagawa.jp","miura.kanagawa.jp","nakai.kanagawa.jp","ninomiya.kanagawa.jp","odawara.kanagawa.jp","oi.kanagawa.jp","oiso.kanagawa.jp","sagamihara.kanagawa.jp","samukawa.kanagawa.jp","tsukui.kanagawa.jp","yamakita.kanagawa.jp","yamato.kanagawa.jp","yokosuka.kanagawa.jp","yugawara.kanagawa.jp","zama.kanagawa.jp","zushi.kanagawa.jp","aki.kochi.jp","geisei.kochi.jp","hidaka.kochi.jp","higashitsuno.kochi.jp","ino.kochi.jp","kagami.kochi.jp","kami.kochi.jp","kitagawa.kochi.jp","kochi.kochi.jp","mihara.kochi.jp","motoyama.kochi.jp","muroto.kochi.jp","nahari.kochi.jp","nakamura.kochi.jp","nankoku.kochi.jp","nishitosa.kochi.jp","niyodogawa.kochi.jp","ochi.kochi.jp","okawa.kochi.jp","otoyo.kochi.jp","otsuki.kochi.jp","sakawa.kochi.jp","sukumo.kochi.jp","susaki.kochi.jp","tosa.kochi.jp","tosashimizu.kochi.jp","toyo.kochi.jp","tsuno.kochi.jp","umaji.kochi.jp","yasuda.kochi.jp","yusuhara.kochi.jp","amakusa.kumamoto.jp","arao.kumamoto.jp","aso.kumamoto.jp","choyo.kumamoto.jp","gyokuto.kumamoto.jp","kamiamakusa.kumamoto.jp","kikuchi.kumamoto.jp","kumamoto.kumamoto.jp","mashiki.kumamoto.jp","mifune.kumamoto.jp","minamata.kumamoto.jp","minamioguni.kumamoto.jp","nagasu.kumamoto.jp","nishihara.kumamoto.jp","oguni.kumamoto.jp","ozu.kumamoto.jp","sumoto.kumamoto.jp","takamori.kumamoto.jp","uki.kumamoto.jp","uto.kumamoto.jp","yamaga.kumamoto.jp","yamato.kumamoto.jp","yatsushiro.kumamoto.jp","ayabe.kyoto.jp","fukuchiyama.kyoto.jp","higashiyama.kyoto.jp","ide.kyoto.jp","ine.kyoto.jp","joyo.kyoto.jp","kameoka.kyoto.jp","kamo.kyoto.jp","kita.kyoto.jp","kizu.kyoto.jp","kumiyama.kyoto.jp","kyotamba.kyoto.jp","kyotanabe.kyoto.jp","kyotango.kyoto.jp","maizuru.kyoto.jp","minami.kyoto.jp","minamiyamashiro.kyoto.jp","miyazu.kyoto.jp","muko.kyoto.jp","nagaokakyo.kyoto.jp","nakagyo.kyoto.jp","nantan.kyoto.jp","oyamazaki.kyoto.jp","sakyo.kyoto.jp","seika.kyoto.jp","tanabe.kyoto.jp","uji.kyoto.jp","ujitawara.kyoto.jp","wazuka.kyoto.jp","yamashina.kyoto.jp","yawata.kyoto.jp","asahi.mie.jp","inabe.mie.jp","ise.mie.jp","kameyama.mie.jp","kawagoe.mie.jp","kiho.mie.jp","kisosaki.mie.jp","kiwa.mie.jp","komono.mie.jp","kumano.mie.jp","kuwana.mie.jp","matsusaka.mie.jp","meiwa.mie.jp","mihama.mie.jp","minamiise.mie.jp","misugi.mie.jp","miyama.mie.jp","nabari.mie.jp","shima.mie.jp","suzuka.mie.jp","tado.mie.jp","taiki.mie.jp","taki.mie.jp","tamaki.mie.jp","toba.mie.jp","tsu.mie.jp","udono.mie.jp","ureshino.mie.jp","watarai.mie.jp","yokkaichi.mie.jp","furukawa.miyagi.jp","higashimatsushima.miyagi.jp","ishinomaki.miyagi.jp","iwanuma.miyagi.jp","kakuda.miyagi.jp","kami.miyagi.jp","kawasaki.miyagi.jp","marumori.miyagi.jp","matsushima.miyagi.jp","minamisanriku.miyagi.jp","misato.miyagi.jp","murata.miyagi.jp","natori.miyagi.jp","ogawara.miyagi.jp","ohira.miyagi.jp","onagawa.miyagi.jp","osaki.miyagi.jp","rifu.miyagi.jp","semine.miyagi.jp","shibata.miyagi.jp","shichikashuku.miyagi.jp","shikama.miyagi.jp","shiogama.miyagi.jp","shiroishi.miyagi.jp","tagajo.miyagi.jp","taiwa.miyagi.jp","tome.miyagi.jp","tomiya.miyagi.jp","wakuya.miyagi.jp","watari.miyagi.jp","yamamoto.miyagi.jp","zao.miyagi.jp","aya.miyazaki.jp","ebino.miyazaki.jp","gokase.miyazaki.jp","hyuga.miyazaki.jp","kadogawa.miyazaki.jp","kawaminami.miyazaki.jp","kijo.miyazaki.jp","kitagawa.miyazaki.jp","kitakata.miyazaki.jp","kitaura.miyazaki.jp","kobayashi.miyazaki.jp","kunitomi.miyazaki.jp","kushima.miyazaki.jp","mimata.miyazaki.jp","miyakonojo.miyazaki.jp","miyazaki.miyazaki.jp","morotsuka.miyazaki.jp","nichinan.miyazaki.jp","nishimera.miyazaki.jp","nobeoka.miyazaki.jp","saito.miyazaki.jp","shiiba.miyazaki.jp","shintomi.miyazaki.jp","takaharu.miyazaki.jp","takanabe.miyazaki.jp","takazaki.miyazaki.jp","tsuno.miyazaki.jp","achi.nagano.jp","agematsu.nagano.jp","anan.nagano.jp","aoki.nagano.jp","asahi.nagano.jp","azumino.nagano.jp","chikuhoku.nagano.jp","chikuma.nagano.jp","chino.nagano.jp","fujimi.nagano.jp","hakuba.nagano.jp","hara.nagano.jp","hiraya.nagano.jp","iida.nagano.jp","iijima.nagano.jp","iiyama.nagano.jp","iizuna.nagano.jp","ikeda.nagano.jp","ikusaka.nagano.jp","ina.nagano.jp","karuizawa.nagano.jp","kawakami.nagano.jp","kiso.nagano.jp","kisofukushima.nagano.jp","kitaaiki.nagano.jp","komagane.nagano.jp","komoro.nagano.jp","matsukawa.nagano.jp","matsumoto.nagano.jp","miasa.nagano.jp","minamiaiki.nagano.jp","minamimaki.nagano.jp","minamiminowa.nagano.jp","minowa.nagano.jp","miyada.nagano.jp","miyota.nagano.jp","mochizuki.nagano.jp","nagano.nagano.jp","nagawa.nagano.jp","nagiso.nagano.jp","nakagawa.nagano.jp","nakano.nagano.jp","nozawaonsen.nagano.jp","obuse.nagano.jp","ogawa.nagano.jp","okaya.nagano.jp","omachi.nagano.jp","omi.nagano.jp","ookuwa.nagano.jp","ooshika.nagano.jp","otaki.nagano.jp","otari.nagano.jp","sakae.nagano.jp","sakaki.nagano.jp","saku.nagano.jp","sakuho.nagano.jp","shimosuwa.nagano.jp","shinanomachi.nagano.jp","shiojiri.nagano.jp","suwa.nagano.jp","suzaka.nagano.jp","takagi.nagano.jp","takamori.nagano.jp","takayama.nagano.jp","tateshina.nagano.jp","tatsuno.nagano.jp","togakushi.nagano.jp","togura.nagano.jp","tomi.nagano.jp","ueda.nagano.jp","wada.nagano.jp","yamagata.nagano.jp","yamanouchi.nagano.jp","yasaka.nagano.jp","yasuoka.nagano.jp","chijiwa.nagasaki.jp","futsu.nagasaki.jp","goto.nagasaki.jp","hasami.nagasaki.jp","hirado.nagasaki.jp","iki.nagasaki.jp","isahaya.nagasaki.jp","kawatana.nagasaki.jp","kuchinotsu.nagasaki.jp","matsuura.nagasaki.jp","nagasaki.nagasaki.jp","obama.nagasaki.jp","omura.nagasaki.jp","oseto.nagasaki.jp","saikai.nagasaki.jp","sasebo.nagasaki.jp","seihi.nagasaki.jp","shimabara.nagasaki.jp","shinkamigoto.nagasaki.jp","togitsu.nagasaki.jp","tsushima.nagasaki.jp","unzen.nagasaki.jp","ando.nara.jp","gose.nara.jp","heguri.nara.jp","higashiyoshino.nara.jp","ikaruga.nara.jp","ikoma.nara.jp","kamikitayama.nara.jp","kanmaki.nara.jp","kashiba.nara.jp","kashihara.nara.jp","katsuragi.nara.jp","kawai.nara.jp","kawakami.nara.jp","kawanishi.nara.jp","koryo.nara.jp","kurotaki.nara.jp","mitsue.nara.jp","miyake.nara.jp","nara.nara.jp","nosegawa.nara.jp","oji.nara.jp","ouda.nara.jp","oyodo.nara.jp","sakurai.nara.jp","sango.nara.jp","shimoichi.nara.jp","shimokitayama.nara.jp","shinjo.nara.jp","soni.nara.jp","takatori.nara.jp","tawaramoto.nara.jp","tenkawa.nara.jp","tenri.nara.jp","uda.nara.jp","yamatokoriyama.nara.jp","yamatotakada.nara.jp","yamazoe.nara.jp","yoshino.nara.jp","aga.niigata.jp","agano.niigata.jp","gosen.niigata.jp","itoigawa.niigata.jp","izumozaki.niigata.jp","joetsu.niigata.jp","kamo.niigata.jp","kariwa.niigata.jp","kashiwazaki.niigata.jp","minamiuonuma.niigata.jp","mitsuke.niigata.jp","muika.niigata.jp","murakami.niigata.jp","myoko.niigata.jp","nagaoka.niigata.jp","niigata.niigata.jp","ojiya.niigata.jp","omi.niigata.jp","sado.niigata.jp","sanjo.niigata.jp","seiro.niigata.jp","seirou.niigata.jp","sekikawa.niigata.jp","shibata.niigata.jp","tagami.niigata.jp","tainai.niigata.jp","tochio.niigata.jp","tokamachi.niigata.jp","tsubame.niigata.jp","tsunan.niigata.jp","uonuma.niigata.jp","yahiko.niigata.jp","yoita.niigata.jp","yuzawa.niigata.jp","beppu.oita.jp","bungoono.oita.jp","bungotakada.oita.jp","hasama.oita.jp","hiji.oita.jp","himeshima.oita.jp","hita.oita.jp","kamitsue.oita.jp","kokonoe.oita.jp","kuju.oita.jp","kunisaki.oita.jp","kusu.oita.jp","oita.oita.jp","saiki.oita.jp","taketa.oita.jp","tsukumi.oita.jp","usa.oita.jp","usuki.oita.jp","yufu.oita.jp","akaiwa.okayama.jp","asakuchi.okayama.jp","bizen.okayama.jp","hayashima.okayama.jp","ibara.okayama.jp","kagamino.okayama.jp","kasaoka.okayama.jp","kibichuo.okayama.jp","kumenan.okayama.jp","kurashiki.okayama.jp","maniwa.okayama.jp","misaki.okayama.jp","nagi.okayama.jp","niimi.okayama.jp","nishiawakura.okayama.jp","okayama.okayama.jp","satosho.okayama.jp","setouchi.okayama.jp","shinjo.okayama.jp","shoo.okayama.jp","soja.okayama.jp","takahashi.okayama.jp","tamano.okayama.jp","tsuyama.okayama.jp","wake.okayama.jp","yakage.okayama.jp","aguni.okinawa.jp","ginowan.okinawa.jp","ginoza.okinawa.jp","gushikami.okinawa.jp","haebaru.okinawa.jp","higashi.okinawa.jp","hirara.okinawa.jp","iheya.okinawa.jp","ishigaki.okinawa.jp","ishikawa.okinawa.jp","itoman.okinawa.jp","izena.okinawa.jp","kadena.okinawa.jp","kin.okinawa.jp","kitadaito.okinawa.jp","kitanakagusuku.okinawa.jp","kumejima.okinawa.jp","kunigami.okinawa.jp","minamidaito.okinawa.jp","motobu.okinawa.jp","nago.okinawa.jp","naha.okinawa.jp","nakagusuku.okinawa.jp","nakijin.okinawa.jp","nanjo.okinawa.jp","nishihara.okinawa.jp","ogimi.okinawa.jp","okinawa.okinawa.jp","onna.okinawa.jp","shimoji.okinawa.jp","taketomi.okinawa.jp","tarama.okinawa.jp","tokashiki.okinawa.jp","tomigusuku.okinawa.jp","tonaki.okinawa.jp","urasoe.okinawa.jp","uruma.okinawa.jp","yaese.okinawa.jp","yomitan.okinawa.jp","yonabaru.okinawa.jp","yonaguni.okinawa.jp","zamami.okinawa.jp","abeno.osaka.jp","chihayaakasaka.osaka.jp","chuo.osaka.jp","daito.osaka.jp","fujiidera.osaka.jp","habikino.osaka.jp","hannan.osaka.jp","higashiosaka.osaka.jp","higashisumiyoshi.osaka.jp","higashiyodogawa.osaka.jp","hirakata.osaka.jp","ibaraki.osaka.jp","ikeda.osaka.jp","izumi.osaka.jp","izumiotsu.osaka.jp","izumisano.osaka.jp","kadoma.osaka.jp","kaizuka.osaka.jp","kanan.osaka.jp","kashiwara.osaka.jp","katano.osaka.jp","kawachinagano.osaka.jp","kishiwada.osaka.jp","kita.osaka.jp","kumatori.osaka.jp","matsubara.osaka.jp","minato.osaka.jp","minoh.osaka.jp","misaki.osaka.jp","moriguchi.osaka.jp","neyagawa.osaka.jp","nishi.osaka.jp","nose.osaka.jp","osakasayama.osaka.jp","sakai.osaka.jp","sayama.osaka.jp","sennan.osaka.jp","settsu.osaka.jp","shijonawate.osaka.jp","shimamoto.osaka.jp","suita.osaka.jp","tadaoka.osaka.jp","taishi.osaka.jp","tajiri.osaka.jp","takaishi.osaka.jp","takatsuki.osaka.jp","tondabayashi.osaka.jp","toyonaka.osaka.jp","toyono.osaka.jp","yao.osaka.jp","ariake.saga.jp","arita.saga.jp","fukudomi.saga.jp","genkai.saga.jp","hamatama.saga.jp","hizen.saga.jp","imari.saga.jp","kamimine.saga.jp","kanzaki.saga.jp","karatsu.saga.jp","kashima.saga.jp","kitagata.saga.jp","kitahata.saga.jp","kiyama.saga.jp","kouhoku.saga.jp","kyuragi.saga.jp","nishiarita.saga.jp","ogi.saga.jp","omachi.saga.jp","ouchi.saga.jp","saga.saga.jp","shiroishi.saga.jp","taku.saga.jp","tara.saga.jp","tosu.saga.jp","yoshinogari.saga.jp","arakawa.saitama.jp","asaka.saitama.jp","chichibu.saitama.jp","fujimi.saitama.jp","fujimino.saitama.jp","fukaya.saitama.jp","hanno.saitama.jp","hanyu.saitama.jp","hasuda.saitama.jp","hatogaya.saitama.jp","hatoyama.saitama.jp","hidaka.saitama.jp","higashichichibu.saitama.jp","higashimatsuyama.saitama.jp","honjo.saitama.jp","ina.saitama.jp","iruma.saitama.jp","iwatsuki.saitama.jp","kamiizumi.saitama.jp","kamikawa.saitama.jp","kamisato.saitama.jp","kasukabe.saitama.jp","kawagoe.saitama.jp","kawaguchi.saitama.jp","kawajima.saitama.jp","kazo.saitama.jp","kitamoto.saitama.jp","koshigaya.saitama.jp","kounosu.saitama.jp","kuki.saitama.jp","kumagaya.saitama.jp","matsubushi.saitama.jp","minano.saitama.jp","misato.saitama.jp","miyashiro.saitama.jp","miyoshi.saitama.jp","moroyama.saitama.jp","nagatoro.saitama.jp","namegawa.saitama.jp","niiza.saitama.jp","ogano.saitama.jp","ogawa.saitama.jp","ogose.saitama.jp","okegawa.saitama.jp","omiya.saitama.jp","otaki.saitama.jp","ranzan.saitama.jp","ryokami.saitama.jp","saitama.saitama.jp","sakado.saitama.jp","satte.saitama.jp","sayama.saitama.jp","shiki.saitama.jp","shiraoka.saitama.jp","soka.saitama.jp","sugito.saitama.jp","toda.saitama.jp","tokigawa.saitama.jp","tokorozawa.saitama.jp","tsurugashima.saitama.jp","urawa.saitama.jp","warabi.saitama.jp","yashio.saitama.jp","yokoze.saitama.jp","yono.saitama.jp","yorii.saitama.jp","yoshida.saitama.jp","yoshikawa.saitama.jp","yoshimi.saitama.jp","aisho.shiga.jp","gamo.shiga.jp","higashiomi.shiga.jp","hikone.shiga.jp","koka.shiga.jp","konan.shiga.jp","kosei.shiga.jp","koto.shiga.jp","kusatsu.shiga.jp","maibara.shiga.jp","moriyama.shiga.jp","nagahama.shiga.jp","nishiazai.shiga.jp","notogawa.shiga.jp","omihachiman.shiga.jp","otsu.shiga.jp","ritto.shiga.jp","ryuoh.shiga.jp","takashima.shiga.jp","takatsuki.shiga.jp","torahime.shiga.jp","toyosato.shiga.jp","yasu.shiga.jp","akagi.shimane.jp","ama.shimane.jp","gotsu.shimane.jp","hamada.shimane.jp","higashiizumo.shimane.jp","hikawa.shimane.jp","hikimi.shimane.jp","izumo.shimane.jp","kakinoki.shimane.jp","masuda.shimane.jp","matsue.shimane.jp","misato.shimane.jp","nishinoshima.shimane.jp","ohda.shimane.jp","okinoshima.shimane.jp","okuizumo.shimane.jp","shimane.shimane.jp","tamayu.shimane.jp","tsuwano.shimane.jp","unnan.shimane.jp","yakumo.shimane.jp","yasugi.shimane.jp","yatsuka.shimane.jp","arai.shizuoka.jp","atami.shizuoka.jp","fuji.shizuoka.jp","fujieda.shizuoka.jp","fujikawa.shizuoka.jp","fujinomiya.shizuoka.jp","fukuroi.shizuoka.jp","gotemba.shizuoka.jp","haibara.shizuoka.jp","hamamatsu.shizuoka.jp","higashiizu.shizuoka.jp","ito.shizuoka.jp","iwata.shizuoka.jp","izu.shizuoka.jp","izunokuni.shizuoka.jp","kakegawa.shizuoka.jp","kannami.shizuoka.jp","kawanehon.shizuoka.jp","kawazu.shizuoka.jp","kikugawa.shizuoka.jp","kosai.shizuoka.jp","makinohara.shizuoka.jp","matsuzaki.shizuoka.jp","minamiizu.shizuoka.jp","mishima.shizuoka.jp","morimachi.shizuoka.jp","nishiizu.shizuoka.jp","numazu.shizuoka.jp","omaezaki.shizuoka.jp","shimada.shizuoka.jp","shimizu.shizuoka.jp","shimoda.shizuoka.jp","shizuoka.shizuoka.jp","susono.shizuoka.jp","yaizu.shizuoka.jp","yoshida.shizuoka.jp","ashikaga.tochigi.jp","bato.tochigi.jp","haga.tochigi.jp","ichikai.tochigi.jp","iwafune.tochigi.jp","kaminokawa.tochigi.jp","kanuma.tochigi.jp","karasuyama.tochigi.jp","kuroiso.tochigi.jp","mashiko.tochigi.jp","mibu.tochigi.jp","moka.tochigi.jp","motegi.tochigi.jp","nasu.tochigi.jp","nasushiobara.tochigi.jp","nikko.tochigi.jp","nishikata.tochigi.jp","nogi.tochigi.jp","ohira.tochigi.jp","ohtawara.tochigi.jp","oyama.tochigi.jp","sakura.tochigi.jp","sano.tochigi.jp","shimotsuke.tochigi.jp","shioya.tochigi.jp","takanezawa.tochigi.jp","tochigi.tochigi.jp","tsuga.tochigi.jp","ujiie.tochigi.jp","utsunomiya.tochigi.jp","yaita.tochigi.jp","aizumi.tokushima.jp","anan.tokushima.jp","ichiba.tokushima.jp","itano.tokushima.jp","kainan.tokushima.jp","komatsushima.tokushima.jp","matsushige.tokushima.jp","mima.tokushima.jp","minami.tokushima.jp","miyoshi.tokushima.jp","mugi.tokushima.jp","nakagawa.tokushima.jp","naruto.tokushima.jp","sanagochi.tokushima.jp","shishikui.tokushima.jp","tokushima.tokushima.jp","wajiki.tokushima.jp","adachi.tokyo.jp","akiruno.tokyo.jp","akishima.tokyo.jp","aogashima.tokyo.jp","arakawa.tokyo.jp","bunkyo.tokyo.jp","chiyoda.tokyo.jp","chofu.tokyo.jp","chuo.tokyo.jp","edogawa.tokyo.jp","fuchu.tokyo.jp","fussa.tokyo.jp","hachijo.tokyo.jp","hachioji.tokyo.jp","hamura.tokyo.jp","higashikurume.tokyo.jp","higashimurayama.tokyo.jp","higashiyamato.tokyo.jp","hino.tokyo.jp","hinode.tokyo.jp","hinohara.tokyo.jp","inagi.tokyo.jp","itabashi.tokyo.jp","katsushika.tokyo.jp","kita.tokyo.jp","kiyose.tokyo.jp","kodaira.tokyo.jp","koganei.tokyo.jp","kokubunji.tokyo.jp","komae.tokyo.jp","koto.tokyo.jp","kouzushima.tokyo.jp","kunitachi.tokyo.jp","machida.tokyo.jp","meguro.tokyo.jp","minato.tokyo.jp","mitaka.tokyo.jp","mizuho.tokyo.jp","musashimurayama.tokyo.jp","musashino.tokyo.jp","nakano.tokyo.jp","nerima.tokyo.jp","ogasawara.tokyo.jp","okutama.tokyo.jp","ome.tokyo.jp","oshima.tokyo.jp","ota.tokyo.jp","setagaya.tokyo.jp","shibuya.tokyo.jp","shinagawa.tokyo.jp","shinjuku.tokyo.jp","suginami.tokyo.jp","sumida.tokyo.jp","tachikawa.tokyo.jp","taito.tokyo.jp","tama.tokyo.jp","toshima.tokyo.jp","chizu.tottori.jp","hino.tottori.jp","kawahara.tottori.jp","koge.tottori.jp","kotoura.tottori.jp","misasa.tottori.jp","nanbu.tottori.jp","nichinan.tottori.jp","sakaiminato.tottori.jp","tottori.tottori.jp","wakasa.tottori.jp","yazu.tottori.jp","yonago.tottori.jp","asahi.toyama.jp","fuchu.toyama.jp","fukumitsu.toyama.jp","funahashi.toyama.jp","himi.toyama.jp","imizu.toyama.jp","inami.toyama.jp","johana.toyama.jp","kamiichi.toyama.jp","kurobe.toyama.jp","nakaniikawa.toyama.jp","namerikawa.toyama.jp","nanto.toyama.jp","nyuzen.toyama.jp","oyabe.toyama.jp","taira.toyama.jp","takaoka.toyama.jp","tateyama.toyama.jp","toga.toyama.jp","tonami.toyama.jp","toyama.toyama.jp","unazuki.toyama.jp","uozu.toyama.jp","yamada.toyama.jp","arida.wakayama.jp","aridagawa.wakayama.jp","gobo.wakayama.jp","hashimoto.wakayama.jp","hidaka.wakayama.jp","hirogawa.wakayama.jp","inami.wakayama.jp","iwade.wakayama.jp","kainan.wakayama.jp","kamitonda.wakayama.jp","katsuragi.wakayama.jp","kimino.wakayama.jp","kinokawa.wakayama.jp","kitayama.wakayama.jp","koya.wakayama.jp","koza.wakayama.jp","kozagawa.wakayama.jp","kudoyama.wakayama.jp","kushimoto.wakayama.jp","mihama.wakayama.jp","misato.wakayama.jp","nachikatsuura.wakayama.jp","shingu.wakayama.jp","shirahama.wakayama.jp","taiji.wakayama.jp","tanabe.wakayama.jp","wakayama.wakayama.jp","yuasa.wakayama.jp","yura.wakayama.jp","asahi.yamagata.jp","funagata.yamagata.jp","higashine.yamagata.jp","iide.yamagata.jp","kahoku.yamagata.jp","kaminoyama.yamagata.jp","kaneyama.yamagata.jp","kawanishi.yamagata.jp","mamurogawa.yamagata.jp","mikawa.yamagata.jp","murayama.yamagata.jp","nagai.yamagata.jp","nakayama.yamagata.jp","nanyo.yamagata.jp","nishikawa.yamagata.jp","obanazawa.yamagata.jp","oe.yamagata.jp","oguni.yamagata.jp","ohkura.yamagata.jp","oishida.yamagata.jp","sagae.yamagata.jp","sakata.yamagata.jp","sakegawa.yamagata.jp","shinjo.yamagata.jp","shirataka.yamagata.jp","shonai.yamagata.jp","takahata.yamagata.jp","tendo.yamagata.jp","tozawa.yamagata.jp","tsuruoka.yamagata.jp","yamagata.yamagata.jp","yamanobe.yamagata.jp","yonezawa.yamagata.jp","yuza.yamagata.jp","abu.yamaguchi.jp","hagi.yamaguchi.jp","hikari.yamaguchi.jp","hofu.yamaguchi.jp","iwakuni.yamaguchi.jp","kudamatsu.yamaguchi.jp","mitou.yamaguchi.jp","nagato.yamaguchi.jp","oshima.yamaguchi.jp","shimonoseki.yamaguchi.jp","shunan.yamaguchi.jp","tabuse.yamaguchi.jp","tokuyama.yamaguchi.jp","toyota.yamaguchi.jp","ube.yamaguchi.jp","yuu.yamaguchi.jp","chuo.yamanashi.jp","doshi.yamanashi.jp","fuefuki.yamanashi.jp","fujikawa.yamanashi.jp","fujikawaguchiko.yamanashi.jp","fujiyoshida.yamanashi.jp","hayakawa.yamanashi.jp","hokuto.yamanashi.jp","ichikawamisato.yamanashi.jp","kai.yamanashi.jp","kofu.yamanashi.jp","koshu.yamanashi.jp","kosuge.yamanashi.jp","minami-alps.yamanashi.jp","minobu.yamanashi.jp","nakamichi.yamanashi.jp","nanbu.yamanashi.jp","narusawa.yamanashi.jp","nirasaki.yamanashi.jp","nishikatsura.yamanashi.jp","oshino.yamanashi.jp","otsuki.yamanashi.jp","showa.yamanashi.jp","tabayama.yamanashi.jp","tsuru.yamanashi.jp","uenohara.yamanashi.jp","yamanakako.yamanashi.jp","yamanashi.yamanashi.jp","ke","ac.ke","co.ke","go.ke","info.ke","me.ke","mobi.ke","ne.ke","or.ke","sc.ke","kg","org.kg","net.kg","com.kg","edu.kg","gov.kg","mil.kg","*.kh","ki","edu.ki","biz.ki","net.ki","org.ki","gov.ki","info.ki","com.ki","km","org.km","nom.km","gov.km","prd.km","tm.km","edu.km","mil.km","ass.km","com.km","coop.km","asso.km","presse.km","medecin.km","notaires.km","pharmaciens.km","veterinaire.km","gouv.km","kn","net.kn","org.kn","edu.kn","gov.kn","kp","com.kp","edu.kp","gov.kp","org.kp","rep.kp","tra.kp","kr","ac.kr","co.kr","es.kr","go.kr","hs.kr","kg.kr","mil.kr","ms.kr","ne.kr","or.kr","pe.kr","re.kr","sc.kr","busan.kr","chungbuk.kr","chungnam.kr","daegu.kr","daejeon.kr","gangwon.kr","gwangju.kr","gyeongbuk.kr","gyeonggi.kr","gyeongnam.kr","incheon.kr","jeju.kr","jeonbuk.kr","jeonnam.kr","seoul.kr","ulsan.kr","kw","com.kw","edu.kw","emb.kw","gov.kw","ind.kw","net.kw","org.kw","ky","edu.ky","gov.ky","com.ky","org.ky","net.ky","kz","org.kz","edu.kz","net.kz","gov.kz","mil.kz","com.kz","la","int.la","net.la","info.la","edu.la","gov.la","per.la","com.la","org.la","lb","com.lb","edu.lb","gov.lb","net.lb","org.lb","lc","com.lc","net.lc","co.lc","org.lc","edu.lc","gov.lc","li","lk","gov.lk","sch.lk","net.lk","int.lk","com.lk","org.lk","edu.lk","ngo.lk","soc.lk","web.lk","ltd.lk","assn.lk","grp.lk","hotel.lk","ac.lk","lr","com.lr","edu.lr","gov.lr","org.lr","net.lr","ls","ac.ls","biz.ls","co.ls","edu.ls","gov.ls","info.ls","net.ls","org.ls","sc.ls","lt","gov.lt","lu","lv","com.lv","edu.lv","gov.lv","org.lv","mil.lv","id.lv","net.lv","asn.lv","conf.lv","ly","com.ly","net.ly","gov.ly","plc.ly","edu.ly","sch.ly","med.ly","org.ly","id.ly","ma","co.ma","net.ma","gov.ma","org.ma","ac.ma","press.ma","mc","tm.mc","asso.mc","md","me","co.me","net.me","org.me","edu.me","ac.me","gov.me","its.me","priv.me","mg","org.mg","nom.mg","gov.mg","prd.mg","tm.mg","edu.mg","mil.mg","com.mg","co.mg","mh","mil","mk","com.mk","org.mk","net.mk","edu.mk","gov.mk","inf.mk","name.mk","ml","com.ml","edu.ml","gouv.ml","gov.ml","net.ml","org.ml","presse.ml","*.mm","mn","gov.mn","edu.mn","org.mn","mo","com.mo","net.mo","org.mo","edu.mo","gov.mo","mobi","mp","mq","mr","gov.mr","ms","com.ms","edu.ms","gov.ms","net.ms","org.ms","mt","com.mt","edu.mt","net.mt","org.mt","mu","com.mu","net.mu","org.mu","gov.mu","ac.mu","co.mu","or.mu","museum","academy.museum","agriculture.museum","air.museum","airguard.museum","alabama.museum","alaska.museum","amber.museum","ambulance.museum","american.museum","americana.museum","americanantiques.museum","americanart.museum","amsterdam.museum","and.museum","annefrank.museum","anthro.museum","anthropology.museum","antiques.museum","aquarium.museum","arboretum.museum","archaeological.museum","archaeology.museum","architecture.museum","art.museum","artanddesign.museum","artcenter.museum","artdeco.museum","arteducation.museum","artgallery.museum","arts.museum","artsandcrafts.museum","asmatart.museum","assassination.museum","assisi.museum","association.museum","astronomy.museum","atlanta.museum","austin.museum","australia.museum","automotive.museum","aviation.museum","axis.museum","badajoz.museum","baghdad.museum","bahn.museum","bale.museum","baltimore.museum","barcelona.museum","baseball.museum","basel.museum","baths.museum","bauern.museum","beauxarts.museum","beeldengeluid.museum","bellevue.museum","bergbau.museum","berkeley.museum","berlin.museum","bern.museum","bible.museum","bilbao.museum","bill.museum","birdart.museum","birthplace.museum","bonn.museum","boston.museum","botanical.museum","botanicalgarden.museum","botanicgarden.museum","botany.museum","brandywinevalley.museum","brasil.museum","bristol.museum","british.museum","britishcolumbia.museum","broadcast.museum","brunel.museum","brussel.museum","brussels.museum","bruxelles.museum","building.museum","burghof.museum","bus.museum","bushey.museum","cadaques.museum","california.museum","cambridge.museum","can.museum","canada.museum","capebreton.museum","carrier.museum","cartoonart.museum","casadelamoneda.museum","castle.museum","castres.museum","celtic.museum","center.museum","chattanooga.museum","cheltenham.museum","chesapeakebay.museum","chicago.museum","children.museum","childrens.museum","childrensgarden.museum","chiropractic.museum","chocolate.museum","christiansburg.museum","cincinnati.museum","cinema.museum","circus.museum","civilisation.museum","civilization.museum","civilwar.museum","clinton.museum","clock.museum","coal.museum","coastaldefence.museum","cody.museum","coldwar.museum","collection.museum","colonialwilliamsburg.museum","coloradoplateau.museum","columbia.museum","columbus.museum","communication.museum","communications.museum","community.museum","computer.museum","computerhistory.museum","comunicações.museum","contemporary.museum","contemporaryart.museum","convent.museum","copenhagen.museum","corporation.museum","correios-e-telecomunicações.museum","corvette.museum","costume.museum","countryestate.museum","county.museum","crafts.museum","cranbrook.museum","creation.museum","cultural.museum","culturalcenter.museum","culture.museum","cyber.museum","cymru.museum","dali.museum","dallas.museum","database.museum","ddr.museum","decorativearts.museum","delaware.museum","delmenhorst.museum","denmark.museum","depot.museum","design.museum","detroit.museum","dinosaur.museum","discovery.museum","dolls.museum","donostia.museum","durham.museum","eastafrica.museum","eastcoast.museum","education.museum","educational.museum","egyptian.museum","eisenbahn.museum","elburg.museum","elvendrell.museum","embroidery.museum","encyclopedic.museum","england.museum","entomology.museum","environment.museum","environmentalconservation.museum","epilepsy.museum","essex.museum","estate.museum","ethnology.museum","exeter.museum","exhibition.museum","family.museum","farm.museum","farmequipment.museum","farmers.museum","farmstead.museum","field.museum","figueres.museum","filatelia.museum","film.museum","fineart.museum","finearts.museum","finland.museum","flanders.museum","florida.museum","force.museum","fortmissoula.museum","fortworth.museum","foundation.museum","francaise.museum","frankfurt.museum","franziskaner.museum","freemasonry.museum","freiburg.museum","fribourg.museum","frog.museum","fundacio.museum","furniture.museum","gallery.museum","garden.museum","gateway.museum","geelvinck.museum","gemological.museum","geology.museum","georgia.museum","giessen.museum","glas.museum","glass.museum","gorge.museum","grandrapids.museum","graz.museum","guernsey.museum","halloffame.museum","hamburg.museum","handson.museum","harvestcelebration.museum","hawaii.museum","health.museum","heimatunduhren.museum","hellas.museum","helsinki.museum","hembygdsforbund.museum","heritage.museum","histoire.museum","historical.museum","historicalsociety.museum","historichouses.museum","historisch.museum","historisches.museum","history.museum","historyofscience.museum","horology.museum","house.museum","humanities.museum","illustration.museum","imageandsound.museum","indian.museum","indiana.museum","indianapolis.museum","indianmarket.museum","intelligence.museum","interactive.museum","iraq.museum","iron.museum","isleofman.museum","jamison.museum","jefferson.museum","jerusalem.museum","jewelry.museum","jewish.museum","jewishart.museum","jfk.museum","journalism.museum","judaica.museum","judygarland.museum","juedisches.museum","juif.museum","karate.museum","karikatur.museum","kids.museum","koebenhavn.museum","koeln.museum","kunst.museum","kunstsammlung.museum","kunstunddesign.museum","labor.museum","labour.museum","lajolla.museum","lancashire.museum","landes.museum","lans.museum","läns.museum","larsson.museum","lewismiller.museum","lincoln.museum","linz.museum","living.museum","livinghistory.museum","localhistory.museum","london.museum","losangeles.museum","louvre.museum","loyalist.museum","lucerne.museum","luxembourg.museum","luzern.museum","mad.museum","madrid.museum","mallorca.museum","manchester.museum","mansion.museum","mansions.museum","manx.museum","marburg.museum","maritime.museum","maritimo.museum","maryland.museum","marylhurst.museum","media.museum","medical.museum","medizinhistorisches.museum","meeres.museum","memorial.museum","mesaverde.museum","michigan.museum","midatlantic.museum","military.museum","mill.museum","miners.museum","mining.museum","minnesota.museum","missile.museum","missoula.museum","modern.museum","moma.museum","money.museum","monmouth.museum","monticello.museum","montreal.museum","moscow.museum","motorcycle.museum","muenchen.museum","muenster.museum","mulhouse.museum","muncie.museum","museet.museum","museumcenter.museum","museumvereniging.museum","music.museum","national.museum","nationalfirearms.museum","nationalheritage.museum","nativeamerican.museum","naturalhistory.museum","naturalhistorymuseum.museum","naturalsciences.museum","nature.museum","naturhistorisches.museum","natuurwetenschappen.museum","naumburg.museum","naval.museum","nebraska.museum","neues.museum","newhampshire.museum","newjersey.museum","newmexico.museum","newport.museum","newspaper.museum","newyork.museum","niepce.museum","norfolk.museum","north.museum","nrw.museum","nyc.museum","nyny.museum","oceanographic.museum","oceanographique.museum","omaha.museum","online.museum","ontario.museum","openair.museum","oregon.museum","oregontrail.museum","otago.museum","oxford.museum","pacific.museum","paderborn.museum","palace.museum","paleo.museum","palmsprings.museum","panama.museum","paris.museum","pasadena.museum","pharmacy.museum","philadelphia.museum","philadelphiaarea.museum","philately.museum","phoenix.museum","photography.museum","pilots.museum","pittsburgh.museum","planetarium.museum","plantation.museum","plants.museum","plaza.museum","portal.museum","portland.museum","portlligat.museum","posts-and-telecommunications.museum","preservation.museum","presidio.museum","press.museum","project.museum","public.museum","pubol.museum","quebec.museum","railroad.museum","railway.museum","research.museum","resistance.museum","riodejaneiro.museum","rochester.museum","rockart.museum","roma.museum","russia.museum","saintlouis.museum","salem.museum","salvadordali.museum","salzburg.museum","sandiego.museum","sanfrancisco.museum","santabarbara.museum","santacruz.museum","santafe.museum","saskatchewan.museum","satx.museum","savannahga.museum","schlesisches.museum","schoenbrunn.museum","schokoladen.museum","school.museum","schweiz.museum","science.museum","scienceandhistory.museum","scienceandindustry.museum","sciencecenter.museum","sciencecenters.museum","science-fiction.museum","sciencehistory.museum","sciences.museum","sciencesnaturelles.museum","scotland.museum","seaport.museum","settlement.museum","settlers.museum","shell.museum","sherbrooke.museum","sibenik.museum","silk.museum","ski.museum","skole.museum","society.museum","sologne.museum","soundandvision.museum","southcarolina.museum","southwest.museum","space.museum","spy.museum","square.museum","stadt.museum","stalbans.museum","starnberg.museum","state.museum","stateofdelaware.museum","station.museum","steam.museum","steiermark.museum","stjohn.museum","stockholm.museum","stpetersburg.museum","stuttgart.museum","suisse.museum","surgeonshall.museum","surrey.museum","svizzera.museum","sweden.museum","sydney.museum","tank.museum","tcm.museum","technology.museum","telekommunikation.museum","television.museum","texas.museum","textile.museum","theater.museum","time.museum","timekeeping.museum","topology.museum","torino.museum","touch.museum","town.museum","transport.museum","tree.museum","trolley.museum","trust.museum","trustee.museum","uhren.museum","ulm.museum","undersea.museum","university.museum","usa.museum","usantiques.museum","usarts.museum","uscountryestate.museum","usculture.museum","usdecorativearts.museum","usgarden.museum","ushistory.museum","ushuaia.museum","uslivinghistory.museum","utah.museum","uvic.museum","valley.museum","vantaa.museum","versailles.museum","viking.museum","village.museum","virginia.museum","virtual.museum","virtuel.museum","vlaanderen.museum","volkenkunde.museum","wales.museum","wallonie.museum","war.museum","washingtondc.museum","watchandclock.museum","watch-and-clock.museum","western.museum","westfalen.museum","whaling.museum","wildlife.museum","williamsburg.museum","windmill.museum","workshop.museum","york.museum","yorkshire.museum","yosemite.museum","youth.museum","zoological.museum","zoology.museum","ירושלים.museum","иком.museum","mv","aero.mv","biz.mv","com.mv","coop.mv","edu.mv","gov.mv","info.mv","int.mv","mil.mv","museum.mv","name.mv","net.mv","org.mv","pro.mv","mw","ac.mw","biz.mw","co.mw","com.mw","coop.mw","edu.mw","gov.mw","int.mw","museum.mw","net.mw","org.mw","mx","com.mx","org.mx","gob.mx","edu.mx","net.mx","my","com.my","net.my","org.my","gov.my","edu.my","mil.my","name.my","mz","ac.mz","adv.mz","co.mz","edu.mz","gov.mz","mil.mz","net.mz","org.mz","na","info.na","pro.na","name.na","school.na","or.na","dr.na","us.na","mx.na","ca.na","in.na","cc.na","tv.na","ws.na","mobi.na","co.na","com.na","org.na","name","nc","asso.nc","nom.nc","ne","net","nf","com.nf","net.nf","per.nf","rec.nf","web.nf","arts.nf","firm.nf","info.nf","other.nf","store.nf","ng","com.ng","edu.ng","gov.ng","i.ng","mil.ng","mobi.ng","name.ng","net.ng","org.ng","sch.ng","ni","ac.ni","biz.ni","co.ni","com.ni","edu.ni","gob.ni","in.ni","info.ni","int.ni","mil.ni","net.ni","nom.ni","org.ni","web.ni","nl","no","fhs.no","vgs.no","fylkesbibl.no","folkebibl.no","museum.no","idrett.no","priv.no","mil.no","stat.no","dep.no","kommune.no","herad.no","aa.no","ah.no","bu.no","fm.no","hl.no","hm.no","jan-mayen.no","mr.no","nl.no","nt.no","of.no","ol.no","oslo.no","rl.no","sf.no","st.no","svalbard.no","tm.no","tr.no","va.no","vf.no","gs.aa.no","gs.ah.no","gs.bu.no","gs.fm.no","gs.hl.no","gs.hm.no","gs.jan-mayen.no","gs.mr.no","gs.nl.no","gs.nt.no","gs.of.no","gs.ol.no","gs.oslo.no","gs.rl.no","gs.sf.no","gs.st.no","gs.svalbard.no","gs.tm.no","gs.tr.no","gs.va.no","gs.vf.no","akrehamn.no","åkrehamn.no","algard.no","ålgård.no","arna.no","brumunddal.no","bryne.no","bronnoysund.no","brønnøysund.no","drobak.no","drøbak.no","egersund.no","fetsund.no","floro.no","florø.no","fredrikstad.no","hokksund.no","honefoss.no","hønefoss.no","jessheim.no","jorpeland.no","jørpeland.no","kirkenes.no","kopervik.no","krokstadelva.no","langevag.no","langevåg.no","leirvik.no","mjondalen.no","mjøndalen.no","mo-i-rana.no","mosjoen.no","mosjøen.no","nesoddtangen.no","orkanger.no","osoyro.no","osøyro.no","raholt.no","råholt.no","sandnessjoen.no","sandnessjøen.no","skedsmokorset.no","slattum.no","spjelkavik.no","stathelle.no","stavern.no","stjordalshalsen.no","stjørdalshalsen.no","tananger.no","tranby.no","vossevangen.no","afjord.no","åfjord.no","agdenes.no","al.no","ål.no","alesund.no","ålesund.no","alstahaug.no","alta.no","áltá.no","alaheadju.no","álaheadju.no","alvdal.no","amli.no","åmli.no","amot.no","åmot.no","andebu.no","andoy.no","andøy.no","andasuolo.no","ardal.no","årdal.no","aremark.no","arendal.no","ås.no","aseral.no","åseral.no","asker.no","askim.no","askvoll.no","askoy.no","askøy.no","asnes.no","åsnes.no","audnedaln.no","aukra.no","aure.no","aurland.no","aurskog-holand.no","aurskog-høland.no","austevoll.no","austrheim.no","averoy.no","averøy.no","balestrand.no","ballangen.no","balat.no","bálát.no","balsfjord.no","bahccavuotna.no","báhccavuotna.no","bamble.no","bardu.no","beardu.no","beiarn.no","bajddar.no","bájddar.no","baidar.no","báidár.no","berg.no","bergen.no","berlevag.no","berlevåg.no","bearalvahki.no","bearalváhki.no","bindal.no","birkenes.no","bjarkoy.no","bjarkøy.no","bjerkreim.no","bjugn.no","bodo.no","bodø.no","badaddja.no","bådåddjå.no","budejju.no","bokn.no","bremanger.no","bronnoy.no","brønnøy.no","bygland.no","bykle.no","barum.no","bærum.no","bo.telemark.no","bø.telemark.no","bo.nordland.no","bø.nordland.no","bievat.no","bievát.no","bomlo.no","bømlo.no","batsfjord.no","båtsfjord.no","bahcavuotna.no","báhcavuotna.no","dovre.no","drammen.no","drangedal.no","dyroy.no","dyrøy.no","donna.no","dønna.no","eid.no","eidfjord.no","eidsberg.no","eidskog.no","eidsvoll.no","eigersund.no","elverum.no","enebakk.no","engerdal.no","etne.no","etnedal.no","evenes.no","evenassi.no","evenášši.no","evje-og-hornnes.no","farsund.no","fauske.no","fuossko.no","fuoisku.no","fedje.no","fet.no","finnoy.no","finnøy.no","fitjar.no","fjaler.no","fjell.no","flakstad.no","flatanger.no","flekkefjord.no","flesberg.no","flora.no","fla.no","flå.no","folldal.no","forsand.no","fosnes.no","frei.no","frogn.no","froland.no","frosta.no","frana.no","fræna.no","froya.no","frøya.no","fusa.no","fyresdal.no","forde.no","førde.no","gamvik.no","gangaviika.no","gáŋgaviika.no","gaular.no","gausdal.no","gildeskal.no","gildeskål.no","giske.no","gjemnes.no","gjerdrum.no","gjerstad.no","gjesdal.no","gjovik.no","gjøvik.no","gloppen.no","gol.no","gran.no","grane.no","granvin.no","gratangen.no","grimstad.no","grong.no","kraanghke.no","kråanghke.no","grue.no","gulen.no","hadsel.no","halden.no","halsa.no","hamar.no","hamaroy.no","habmer.no","hábmer.no","hapmir.no","hápmir.no","hammerfest.no","hammarfeasta.no","hámmárfeasta.no","haram.no","hareid.no","harstad.no","hasvik.no","aknoluokta.no","ákŋoluokta.no","hattfjelldal.no","aarborte.no","haugesund.no","hemne.no","hemnes.no","hemsedal.no","heroy.more-og-romsdal.no","herøy.møre-og-romsdal.no","heroy.nordland.no","herøy.nordland.no","hitra.no","hjartdal.no","hjelmeland.no","hobol.no","hobøl.no","hof.no","hol.no","hole.no","holmestrand.no","holtalen.no","holtålen.no","hornindal.no","horten.no","hurdal.no","hurum.no","hvaler.no","hyllestad.no","hagebostad.no","hægebostad.no","hoyanger.no","høyanger.no","hoylandet.no","høylandet.no","ha.no","hå.no","ibestad.no","inderoy.no","inderøy.no","iveland.no","jevnaker.no","jondal.no","jolster.no","jølster.no","karasjok.no","karasjohka.no","kárášjohka.no","karlsoy.no","galsa.no","gálsá.no","karmoy.no","karmøy.no","kautokeino.no","guovdageaidnu.no","klepp.no","klabu.no","klæbu.no","kongsberg.no","kongsvinger.no","kragero.no","kragerø.no","kristiansand.no","kristiansund.no","krodsherad.no","krødsherad.no","kvalsund.no","rahkkeravju.no","ráhkkerávju.no","kvam.no","kvinesdal.no","kvinnherad.no","kviteseid.no","kvitsoy.no","kvitsøy.no","kvafjord.no","kvæfjord.no","giehtavuoatna.no","kvanangen.no","kvænangen.no","navuotna.no","návuotna.no","kafjord.no","kåfjord.no","gaivuotna.no","gáivuotna.no","larvik.no","lavangen.no","lavagis.no","loabat.no","loabát.no","lebesby.no","davvesiida.no","leikanger.no","leirfjord.no","leka.no","leksvik.no","lenvik.no","leangaviika.no","leaŋgaviika.no","lesja.no","levanger.no","lier.no","lierne.no","lillehammer.no","lillesand.no","lindesnes.no","lindas.no","lindås.no","lom.no","loppa.no","lahppi.no","láhppi.no","lund.no","lunner.no","luroy.no","lurøy.no","luster.no","lyngdal.no","lyngen.no","ivgu.no","lardal.no","lerdal.no","lærdal.no","lodingen.no","lødingen.no","lorenskog.no","lørenskog.no","loten.no","løten.no","malvik.no","masoy.no","måsøy.no","muosat.no","muosát.no","mandal.no","marker.no","marnardal.no","masfjorden.no","meland.no","meldal.no","melhus.no","meloy.no","meløy.no","meraker.no","meråker.no","moareke.no","moåreke.no","midsund.no","midtre-gauldal.no","modalen.no","modum.no","molde.no","moskenes.no","moss.no","mosvik.no","malselv.no","målselv.no","malatvuopmi.no","málatvuopmi.no","namdalseid.no","aejrie.no","namsos.no","namsskogan.no","naamesjevuemie.no","nååmesjevuemie.no","laakesvuemie.no","nannestad.no","narvik.no","narviika.no","naustdal.no","nedre-eiker.no","nes.akershus.no","nes.buskerud.no","nesna.no","nesodden.no","nesseby.no","unjarga.no","unjárga.no","nesset.no","nissedal.no","nittedal.no","nord-aurdal.no","nord-fron.no","nord-odal.no","norddal.no","nordkapp.no","davvenjarga.no","davvenjárga.no","nordre-land.no","nordreisa.no","raisa.no","ráisa.no","nore-og-uvdal.no","notodden.no","naroy.no","nærøy.no","notteroy.no","nøtterøy.no","odda.no","oksnes.no","øksnes.no","oppdal.no","oppegard.no","oppegård.no","orkdal.no","orland.no","ørland.no","orskog.no","ørskog.no","orsta.no","ørsta.no","os.hedmark.no","os.hordaland.no","osen.no","osteroy.no","osterøy.no","ostre-toten.no","østre-toten.no","overhalla.no","ovre-eiker.no","øvre-eiker.no","oyer.no","øyer.no","oygarden.no","øygarden.no","oystre-slidre.no","øystre-slidre.no","porsanger.no","porsangu.no","porsáŋgu.no","porsgrunn.no","radoy.no","radøy.no","rakkestad.no","rana.no","ruovat.no","randaberg.no","rauma.no","rendalen.no","rennebu.no","rennesoy.no","rennesøy.no","rindal.no","ringebu.no","ringerike.no","ringsaker.no","rissa.no","risor.no","risør.no","roan.no","rollag.no","rygge.no","ralingen.no","rælingen.no","rodoy.no","rødøy.no","romskog.no","rømskog.no","roros.no","røros.no","rost.no","røst.no","royken.no","røyken.no","royrvik.no","røyrvik.no","rade.no","råde.no","salangen.no","siellak.no","saltdal.no","salat.no","sálát.no","sálat.no","samnanger.no","sande.more-og-romsdal.no","sande.møre-og-romsdal.no","sande.vestfold.no","sandefjord.no","sandnes.no","sandoy.no","sandøy.no","sarpsborg.no","sauda.no","sauherad.no","sel.no","selbu.no","selje.no","seljord.no","sigdal.no","siljan.no","sirdal.no","skaun.no","skedsmo.no","ski.no","skien.no","skiptvet.no","skjervoy.no","skjervøy.no","skierva.no","skiervá.no","skjak.no","skjåk.no","skodje.no","skanland.no","skånland.no","skanit.no","skánit.no","smola.no","smøla.no","snillfjord.no","snasa.no","snåsa.no","snoasa.no","snaase.no","snåase.no","sogndal.no","sokndal.no","sola.no","solund.no","songdalen.no","sortland.no","spydeberg.no","stange.no","stavanger.no","steigen.no","steinkjer.no","stjordal.no","stjørdal.no","stokke.no","stor-elvdal.no","stord.no","stordal.no","storfjord.no","omasvuotna.no","strand.no","stranda.no","stryn.no","sula.no","suldal.no","sund.no","sunndal.no","surnadal.no","sveio.no","svelvik.no","sykkylven.no","sogne.no","søgne.no","somna.no","sømna.no","sondre-land.no","søndre-land.no","sor-aurdal.no","sør-aurdal.no","sor-fron.no","sør-fron.no","sor-odal.no","sør-odal.no","sor-varanger.no","sør-varanger.no","matta-varjjat.no","mátta-várjjat.no","sorfold.no","sørfold.no","sorreisa.no","sørreisa.no","sorum.no","sørum.no","tana.no","deatnu.no","time.no","tingvoll.no","tinn.no","tjeldsund.no","dielddanuorri.no","tjome.no","tjøme.no","tokke.no","tolga.no","torsken.no","tranoy.no","tranøy.no","tromso.no","tromsø.no","tromsa.no","romsa.no","trondheim.no","troandin.no","trysil.no","trana.no","træna.no","trogstad.no","trøgstad.no","tvedestrand.no","tydal.no","tynset.no","tysfjord.no","divtasvuodna.no","divttasvuotna.no","tysnes.no","tysvar.no","tysvær.no","tonsberg.no","tønsberg.no","ullensaker.no","ullensvang.no","ulvik.no","utsira.no","vadso.no","vadsø.no","cahcesuolo.no","čáhcesuolo.no","vaksdal.no","valle.no","vang.no","vanylven.no","vardo.no","vardø.no","varggat.no","várggát.no","vefsn.no","vaapste.no","vega.no","vegarshei.no","vegårshei.no","vennesla.no","verdal.no","verran.no","vestby.no","vestnes.no","vestre-slidre.no","vestre-toten.no","vestvagoy.no","vestvågøy.no","vevelstad.no","vik.no","vikna.no","vindafjord.no","volda.no","voss.no","varoy.no","værøy.no","vagan.no","vågan.no","voagat.no","vagsoy.no","vågsøy.no","vaga.no","vågå.no","valer.ostfold.no","våler.østfold.no","valer.hedmark.no","våler.hedmark.no","*.np","nr","biz.nr","info.nr","gov.nr","edu.nr","org.nr","net.nr","com.nr","nu","nz","ac.nz","co.nz","cri.nz","geek.nz","gen.nz","govt.nz","health.nz","iwi.nz","kiwi.nz","maori.nz","mil.nz","māori.nz","net.nz","org.nz","parliament.nz","school.nz","om","co.om","com.om","edu.om","gov.om","med.om","museum.om","net.om","org.om","pro.om","onion","org","pa","ac.pa","gob.pa","com.pa","org.pa","sld.pa","edu.pa","net.pa","ing.pa","abo.pa","med.pa","nom.pa","pe","edu.pe","gob.pe","nom.pe","mil.pe","org.pe","com.pe","net.pe","pf","com.pf","org.pf","edu.pf","*.pg","ph","com.ph","net.ph","org.ph","gov.ph","edu.ph","ngo.ph","mil.ph","i.ph","pk","com.pk","net.pk","edu.pk","org.pk","fam.pk","biz.pk","web.pk","gov.pk","gob.pk","gok.pk","gon.pk","gop.pk","gos.pk","info.pk","pl","com.pl","net.pl","org.pl","aid.pl","agro.pl","atm.pl","auto.pl","biz.pl","edu.pl","gmina.pl","gsm.pl","info.pl","mail.pl","miasta.pl","media.pl","mil.pl","nieruchomosci.pl","nom.pl","pc.pl","powiat.pl","priv.pl","realestate.pl","rel.pl","sex.pl","shop.pl","sklep.pl","sos.pl","szkola.pl","targi.pl","tm.pl","tourism.pl","travel.pl","turystyka.pl","gov.pl","ap.gov.pl","ic.gov.pl","is.gov.pl","us.gov.pl","kmpsp.gov.pl","kppsp.gov.pl","kwpsp.gov.pl","psp.gov.pl","wskr.gov.pl","kwp.gov.pl","mw.gov.pl","ug.gov.pl","um.gov.pl","umig.gov.pl","ugim.gov.pl","upow.gov.pl","uw.gov.pl","starostwo.gov.pl","pa.gov.pl","po.gov.pl","psse.gov.pl","pup.gov.pl","rzgw.gov.pl","sa.gov.pl","so.gov.pl","sr.gov.pl","wsa.gov.pl","sko.gov.pl","uzs.gov.pl","wiih.gov.pl","winb.gov.pl","pinb.gov.pl","wios.gov.pl","witd.gov.pl","wzmiuw.gov.pl","piw.gov.pl","wiw.gov.pl","griw.gov.pl","wif.gov.pl","oum.gov.pl","sdn.gov.pl","zp.gov.pl","uppo.gov.pl","mup.gov.pl","wuoz.gov.pl","konsulat.gov.pl","oirm.gov.pl","augustow.pl","babia-gora.pl","bedzin.pl","beskidy.pl","bialowieza.pl","bialystok.pl","bielawa.pl","bieszczady.pl","boleslawiec.pl","bydgoszcz.pl","bytom.pl","cieszyn.pl","czeladz.pl","czest.pl","dlugoleka.pl","elblag.pl","elk.pl","glogow.pl","gniezno.pl","gorlice.pl","grajewo.pl","ilawa.pl","jaworzno.pl","jelenia-gora.pl","jgora.pl","kalisz.pl","kazimierz-dolny.pl","karpacz.pl","kartuzy.pl","kaszuby.pl","katowice.pl","kepno.pl","ketrzyn.pl","klodzko.pl","kobierzyce.pl","kolobrzeg.pl","konin.pl","konskowola.pl","kutno.pl","lapy.pl","lebork.pl","legnica.pl","lezajsk.pl","limanowa.pl","lomza.pl","lowicz.pl","lubin.pl","lukow.pl","malbork.pl","malopolska.pl","mazowsze.pl","mazury.pl","mielec.pl","mielno.pl","mragowo.pl","naklo.pl","nowaruda.pl","nysa.pl","olawa.pl","olecko.pl","olkusz.pl","olsztyn.pl","opoczno.pl","opole.pl","ostroda.pl","ostroleka.pl","ostrowiec.pl","ostrowwlkp.pl","pila.pl","pisz.pl","podhale.pl","podlasie.pl","polkowice.pl","pomorze.pl","pomorskie.pl","prochowice.pl","pruszkow.pl","przeworsk.pl","pulawy.pl","radom.pl","rawa-maz.pl","rybnik.pl","rzeszow.pl","sanok.pl","sejny.pl","slask.pl","slupsk.pl","sosnowiec.pl","stalowa-wola.pl","skoczow.pl","starachowice.pl","stargard.pl","suwalki.pl","swidnica.pl","swiebodzin.pl","swinoujscie.pl","szczecin.pl","szczytno.pl","tarnobrzeg.pl","tgory.pl","turek.pl","tychy.pl","ustka.pl","walbrzych.pl","warmia.pl","warszawa.pl","waw.pl","wegrow.pl","wielun.pl","wlocl.pl","wloclawek.pl","wodzislaw.pl","wolomin.pl","wroclaw.pl","zachpomor.pl","zagan.pl","zarow.pl","zgora.pl","zgorzelec.pl","pm","pn","gov.pn","co.pn","org.pn","edu.pn","net.pn","post","pr","com.pr","net.pr","org.pr","gov.pr","edu.pr","isla.pr","pro.pr","biz.pr","info.pr","name.pr","est.pr","prof.pr","ac.pr","pro","aaa.pro","aca.pro","acct.pro","avocat.pro","bar.pro","cpa.pro","eng.pro","jur.pro","law.pro","med.pro","recht.pro","ps","edu.ps","gov.ps","sec.ps","plo.ps","com.ps","org.ps","net.ps","pt","net.pt","gov.pt","org.pt","edu.pt","int.pt","publ.pt","com.pt","nome.pt","pw","co.pw","ne.pw","or.pw","ed.pw","go.pw","belau.pw","py","com.py","coop.py","edu.py","gov.py","mil.py","net.py","org.py","qa","com.qa","edu.qa","gov.qa","mil.qa","name.qa","net.qa","org.qa","sch.qa","re","asso.re","com.re","nom.re","ro","arts.ro","com.ro","firm.ro","info.ro","nom.ro","nt.ro","org.ro","rec.ro","store.ro","tm.ro","www.ro","rs","ac.rs","co.rs","edu.rs","gov.rs","in.rs","org.rs","ru","rw","ac.rw","co.rw","coop.rw","gov.rw","mil.rw","net.rw","org.rw","sa","com.sa","net.sa","org.sa","gov.sa","med.sa","pub.sa","edu.sa","sch.sa","sb","com.sb","edu.sb","gov.sb","net.sb","org.sb","sc","com.sc","gov.sc","net.sc","org.sc","edu.sc","sd","com.sd","net.sd","org.sd","edu.sd","med.sd","tv.sd","gov.sd","info.sd","se","a.se","ac.se","b.se","bd.se","brand.se","c.se","d.se","e.se","f.se","fh.se","fhsk.se","fhv.se","g.se","h.se","i.se","k.se","komforb.se","kommunalforbund.se","komvux.se","l.se","lanbib.se","m.se","n.se","naturbruksgymn.se","o.se","org.se","p.se","parti.se","pp.se","press.se","r.se","s.se","t.se","tm.se","u.se","w.se","x.se","y.se","z.se","sg","com.sg","net.sg","org.sg","gov.sg","edu.sg","per.sg","sh","com.sh","net.sh","gov.sh","org.sh","mil.sh","si","sj","sk","sl","com.sl","net.sl","edu.sl","gov.sl","org.sl","sm","sn","art.sn","com.sn","edu.sn","gouv.sn","org.sn","perso.sn","univ.sn","so","com.so","edu.so","gov.so","me.so","net.so","org.so","sr","ss","biz.ss","com.ss","edu.ss","gov.ss","net.ss","org.ss","st","co.st","com.st","consulado.st","edu.st","embaixada.st","gov.st","mil.st","net.st","org.st","principe.st","saotome.st","store.st","su","sv","com.sv","edu.sv","gob.sv","org.sv","red.sv","sx","gov.sx","sy","edu.sy","gov.sy","net.sy","mil.sy","com.sy","org.sy","sz","co.sz","ac.sz","org.sz","tc","td","tel","tf","tg","th","ac.th","co.th","go.th","in.th","mi.th","net.th","or.th","tj","ac.tj","biz.tj","co.tj","com.tj","edu.tj","go.tj","gov.tj","int.tj","mil.tj","name.tj","net.tj","nic.tj","org.tj","test.tj","web.tj","tk","tl","gov.tl","tm","com.tm","co.tm","org.tm","net.tm","nom.tm","gov.tm","mil.tm","edu.tm","tn","com.tn","ens.tn","fin.tn","gov.tn","ind.tn","intl.tn","nat.tn","net.tn","org.tn","info.tn","perso.tn","tourism.tn","edunet.tn","rnrt.tn","rns.tn","rnu.tn","mincom.tn","agrinet.tn","defense.tn","turen.tn","to","com.to","gov.to","net.to","org.to","edu.to","mil.to","tr","av.tr","bbs.tr","bel.tr","biz.tr","com.tr","dr.tr","edu.tr","gen.tr","gov.tr","info.tr","mil.tr","k12.tr","kep.tr","name.tr","net.tr","org.tr","pol.tr","tel.tr","tsk.tr","tv.tr","web.tr","nc.tr","gov.nc.tr","tt","co.tt","com.tt","org.tt","net.tt","biz.tt","info.tt","pro.tt","int.tt","coop.tt","jobs.tt","mobi.tt","travel.tt","museum.tt","aero.tt","name.tt","gov.tt","edu.tt","tv","tw","edu.tw","gov.tw","mil.tw","com.tw","net.tw","org.tw","idv.tw","game.tw","ebiz.tw","club.tw","網路.tw","組織.tw","商業.tw","tz","ac.tz","co.tz","go.tz","hotel.tz","info.tz","me.tz","mil.tz","mobi.tz","ne.tz","or.tz","sc.tz","tv.tz","ua","com.ua","edu.ua","gov.ua","in.ua","net.ua","org.ua","cherkassy.ua","cherkasy.ua","chernigov.ua","chernihiv.ua","chernivtsi.ua","chernovtsy.ua","ck.ua","cn.ua","cr.ua","crimea.ua","cv.ua","dn.ua","dnepropetrovsk.ua","dnipropetrovsk.ua","dominic.ua","donetsk.ua","dp.ua","if.ua","ivano-frankivsk.ua","kh.ua","kharkiv.ua","kharkov.ua","kherson.ua","khmelnitskiy.ua","khmelnytskyi.ua","kiev.ua","kirovograd.ua","km.ua","kr.ua","krym.ua","ks.ua","kv.ua","kyiv.ua","lg.ua","lt.ua","lugansk.ua","lutsk.ua","lv.ua","lviv.ua","mk.ua","mykolaiv.ua","nikolaev.ua","od.ua","odesa.ua","odessa.ua","pl.ua","poltava.ua","rivne.ua","rovno.ua","rv.ua","sb.ua","sebastopol.ua","sevastopol.ua","sm.ua","sumy.ua","te.ua","ternopil.ua","uz.ua","uzhgorod.ua","vinnica.ua","vinnytsia.ua","vn.ua","volyn.ua","yalta.ua","zaporizhzhe.ua","zaporizhzhia.ua","zhitomir.ua","zhytomyr.ua","zp.ua","zt.ua","ug","co.ug","or.ug","ac.ug","sc.ug","go.ug","ne.ug","com.ug","org.ug","uk","ac.uk","co.uk","gov.uk","ltd.uk","me.uk","net.uk","nhs.uk","org.uk","plc.uk","police.uk","*.sch.uk","us","dni.us","fed.us","isa.us","kids.us","nsn.us","ak.us","al.us","ar.us","as.us","az.us","ca.us","co.us","ct.us","dc.us","de.us","fl.us","ga.us","gu.us","hi.us","ia.us","id.us","il.us","in.us","ks.us","ky.us","la.us","ma.us","md.us","me.us","mi.us","mn.us","mo.us","ms.us","mt.us","nc.us","nd.us","ne.us","nh.us","nj.us","nm.us","nv.us","ny.us","oh.us","ok.us","or.us","pa.us","pr.us","ri.us","sc.us","sd.us","tn.us","tx.us","ut.us","vi.us","vt.us","va.us","wa.us","wi.us","wv.us","wy.us","k12.ak.us","k12.al.us","k12.ar.us","k12.as.us","k12.az.us","k12.ca.us","k12.co.us","k12.ct.us","k12.dc.us","k12.de.us","k12.fl.us","k12.ga.us","k12.gu.us","k12.ia.us","k12.id.us","k12.il.us","k12.in.us","k12.ks.us","k12.ky.us","k12.la.us","k12.ma.us","k12.md.us","k12.me.us","k12.mi.us","k12.mn.us","k12.mo.us","k12.ms.us","k12.mt.us","k12.nc.us","k12.ne.us","k12.nh.us","k12.nj.us","k12.nm.us","k12.nv.us","k12.ny.us","k12.oh.us","k12.ok.us","k12.or.us","k12.pa.us","k12.pr.us","k12.ri.us","k12.sc.us","k12.tn.us","k12.tx.us","k12.ut.us","k12.vi.us","k12.vt.us","k12.va.us","k12.wa.us","k12.wi.us","k12.wy.us","cc.ak.us","cc.al.us","cc.ar.us","cc.as.us","cc.az.us","cc.ca.us","cc.co.us","cc.ct.us","cc.dc.us","cc.de.us","cc.fl.us","cc.ga.us","cc.gu.us","cc.hi.us","cc.ia.us","cc.id.us","cc.il.us","cc.in.us","cc.ks.us","cc.ky.us","cc.la.us","cc.ma.us","cc.md.us","cc.me.us","cc.mi.us","cc.mn.us","cc.mo.us","cc.ms.us","cc.mt.us","cc.nc.us","cc.nd.us","cc.ne.us","cc.nh.us","cc.nj.us","cc.nm.us","cc.nv.us","cc.ny.us","cc.oh.us","cc.ok.us","cc.or.us","cc.pa.us","cc.pr.us","cc.ri.us","cc.sc.us","cc.sd.us","cc.tn.us","cc.tx.us","cc.ut.us","cc.vi.us","cc.vt.us","cc.va.us","cc.wa.us","cc.wi.us","cc.wv.us","cc.wy.us","lib.ak.us","lib.al.us","lib.ar.us","lib.as.us","lib.az.us","lib.ca.us","lib.co.us","lib.ct.us","lib.dc.us","lib.fl.us","lib.ga.us","lib.gu.us","lib.hi.us","lib.ia.us","lib.id.us","lib.il.us","lib.in.us","lib.ks.us","lib.ky.us","lib.la.us","lib.ma.us","lib.md.us","lib.me.us","lib.mi.us","lib.mn.us","lib.mo.us","lib.ms.us","lib.mt.us","lib.nc.us","lib.nd.us","lib.ne.us","lib.nh.us","lib.nj.us","lib.nm.us","lib.nv.us","lib.ny.us","lib.oh.us","lib.ok.us","lib.or.us","lib.pa.us","lib.pr.us","lib.ri.us","lib.sc.us","lib.sd.us","lib.tn.us","lib.tx.us","lib.ut.us","lib.vi.us","lib.vt.us","lib.va.us","lib.wa.us","lib.wi.us","lib.wy.us","pvt.k12.ma.us","chtr.k12.ma.us","paroch.k12.ma.us","ann-arbor.mi.us","cog.mi.us","dst.mi.us","eaton.mi.us","gen.mi.us","mus.mi.us","tec.mi.us","washtenaw.mi.us","uy","com.uy","edu.uy","gub.uy","mil.uy","net.uy","org.uy","uz","co.uz","com.uz","net.uz","org.uz","va","vc","com.vc","net.vc","org.vc","gov.vc","mil.vc","edu.vc","ve","arts.ve","co.ve","com.ve","e12.ve","edu.ve","firm.ve","gob.ve","gov.ve","info.ve","int.ve","mil.ve","net.ve","org.ve","rec.ve","store.ve","tec.ve","web.ve","vg","vi","co.vi","com.vi","k12.vi","net.vi","org.vi","vn","com.vn","net.vn","org.vn","edu.vn","gov.vn","int.vn","ac.vn","biz.vn","info.vn","name.vn","pro.vn","health.vn","vu","com.vu","edu.vu","net.vu","org.vu","wf","ws","com.ws","net.ws","org.ws","gov.ws","edu.ws","yt","امارات","հայ","বাংলা","бг","бел","中国","中國","الجزائر","مصر","ею","ευ","موريتانيا","გე","ελ","香港","公司.香港","教育.香港","政府.香港","個人.香港","網絡.香港","組織.香港","ಭಾರತ","ଭାରତ","ভাৰত","भारतम्","भारोत","ڀارت","ഭാരതം","भारत","بارت","بھارت","భారత్","ભારત","ਭਾਰਤ","ভারত","இந்தியா","ایران","ايران","عراق","الاردن","한국","қаз","ලංකා","இலங்கை","المغرب","мкд","мон","澳門","澳门","مليسيا","عمان","پاکستان","پاكستان","فلسطين","срб","пр.срб","орг.срб","обр.срб","од.срб","упр.срб","ак.срб","рф","قطر","السعودية","السعودیة","السعودیۃ","السعوديه","سودان","新加坡","சிங்கப்பூர்","سورية","سوريا","ไทย","ศึกษา.ไทย","ธุรกิจ.ไทย","รัฐบาล.ไทย","ทหาร.ไทย","เน็ต.ไทย","องค์กร.ไทย","تونس","台灣","台湾","臺灣","укр","اليمن","xxx","*.ye","ac.za","agric.za","alt.za","co.za","edu.za","gov.za","grondar.za","law.za","mil.za","net.za","ngo.za","nic.za","nis.za","nom.za","org.za","school.za","tm.za","web.za","zm","ac.zm","biz.zm","co.zm","com.zm","edu.zm","gov.zm","info.zm","mil.zm","net.zm","org.zm","sch.zm","zw","ac.zw","co.zw","gov.zw","mil.zw","org.zw","aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","academy","accenture","accountant","accountants","aco","actor","adac","ads","adult","aeg","aetna","afamilycompany","afl","africa","agakhan","agency","aig","aigo","airbus","airforce","airtel","akdn","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","aol","apartments","app","apple","aquarelle","arab","aramco","archi","army","art","arte","asda","associates","athleta","attorney","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aws","axa","azure","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bbc","bbt","bbva","bcg","bcn","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bharti","bible","bid","bike","bing","bingo","bio","black","blackfriday","blockbuster","blog","bloomberg","blue","bms","bmw","bnpparibas","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","bradesco","bridgestone","broadway","broker","brother","brussels","budapest","bugatti","build","builders","business","buy","buzz","bzh","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","caseih","cash","casino","catering","catholic","cba","cbn","cbre","cbs","ceb","center","ceo","cern","cfa","cfd","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","coach","codes","coffee","college","cologne","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","corsica","country","coupon","coupons","courses","cpa","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cuisinella","cymru","cyou","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dnp","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","duck","dunlop","dupont","durban","dvag","dvr","earth","eat","eco","edeka","education","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","ericsson","erni","esq","estate","esurance","etisalat","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","flickr","flights","flir","florist","flowers","fly","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gbiz","gdn","gea","gent","genting","george","ggee","gift","gifts","gives","giving","glade","glass","gle","global","globo","gmail","gmbh","gmo","gmx","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","grainger","graphics","gratis","green","gripe","grocery","group","guardian","gucci","guge","guide","guitars","guru","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hkt","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hsbc","hughes","hyatt","hyundai","ibm","icbc","ice","icu","ieee","ifm","ikano","imamat","imdb","immo","immobilien","inc","industries","infiniti","ing","ink","institute","insurance","insure","intel","international","intuit","investments","ipiranga","irish","ismaili","ist","istanbul","itau","itv","iveco","jaguar","java","jcb","jcp","jeep","jetzt","jewelry","jio","jll","jmp","jnj","joburg","jot","joy","jpmorgan","jprs","juegos","juniper","kaufen","kddi","kerryhotels","kerrylogistics","kerryproperties","kfh","kia","kim","kinder","kindle","kitchen","kiwi","koeln","komatsu","kosher","kpmg","kpn","krd","kred","kuokgroup","kyoto","lacaixa","lamborghini","lamer","lancaster","lancia","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","llc","llp","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","ltd","ltda","lundbeck","lupin","luxe","luxury","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mckinsey","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","metlife","miami","microsoft","mini","mint","mit","mitsubishi","mlb","mls","mma","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","msd","mtn","mtr","mutual","nab","nadex","nagoya","nationwide","natura","navy","nba","nec","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nfl","ngo","nhk","nico","nike","nikon","ninja","nissan","nissay","nokia","northwesternmutual","norton","now","nowruz","nowtv","nra","nrw","ntt","nyc","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","organic","origins","osaka","otsuka","ott","ovh","page","panasonic","paris","pars","partners","parts","party","passagens","pay","pccw","pet","pfizer","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","place","play","playstation","plumbing","plus","pnc","pohl","poker","politie","porn","pramerica","praxi","press","prime","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","pub","pwc","qpon","quebec","quest","qvc","racing","radio","raid","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","rocher","rocks","rodeo","rogers","room","rsvp","rugby","ruhr","run","rwe","ryukyu","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sbi","sbs","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","silk","sina","singles","site","ski","skin","sky","skype","sling","smart","smile","sncf","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","spreadbetting","srl","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","sucks","supplies","supply","support","surf","surgery","suzuki","swatch","swiftcover","swiss","sydney","symantec","systems","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tci","tdk","team","tech","technology","temasek","tennis","teva","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tjmaxx","tjx","tkmaxx","tmall","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tube","tui","tunes","tushu","tvs","ubank","ubs","unicom","university","uno","uol","ups","vacations","vana","vanguard","vegas","ventures","verisign","versicherung","vet","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vodka","volkswagen","volvo","vote","voting","voto","voyage","vuelos","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","慈善","集团","在线","大众汽车","点看","คอม","八卦","موقع","公益","公司","香格里拉","网站","移动","我爱你","москва","католик","онлайн","сайт","联通","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","アマゾン","삼성","商标","商店","商城","дети","ポイント","新闻","工行","家電","كوم","中文网","中信","娱乐","谷歌","電訊盈科","购物","クラウド","通販","网店","संगठन","餐厅","网络","ком","亚马逊","诺基亚","食品","飞利浦","手表","手机","ارامكو","العليان","اتصالات","بازار","ابوظبي","كاثوليك","همراه","닷컴","政府","شبكة","بيتك","عرب","机构","组织机构","健康","招聘","рус","珠宝","大拿","みんな","グーグル","世界","書籍","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","广东","政务","xyz","yachts","yahoo","yamaxun","yandex","yodobashi","yoga","yokohama","you","youtube","yun","zappos","zara","zero","zip","zone","zuerich","cc.ua","inf.ua","ltd.ua","adobeaemcloud.com","adobeaemcloud.net","*.dev.adobeaemcloud.com","beep.pl","barsy.ca","*.compute.estate","*.alces.network","altervista.org","alwaysdata.net","cloudfront.net","*.compute.amazonaws.com","*.compute-1.amazonaws.com","*.compute.amazonaws.com.cn","us-east-1.amazonaws.com","cn-north-1.eb.amazonaws.com.cn","cn-northwest-1.eb.amazonaws.com.cn","elasticbeanstalk.com","ap-northeast-1.elasticbeanstalk.com","ap-northeast-2.elasticbeanstalk.com","ap-northeast-3.elasticbeanstalk.com","ap-south-1.elasticbeanstalk.com","ap-southeast-1.elasticbeanstalk.com","ap-southeast-2.elasticbeanstalk.com","ca-central-1.elasticbeanstalk.com","eu-central-1.elasticbeanstalk.com","eu-west-1.elasticbeanstalk.com","eu-west-2.elasticbeanstalk.com","eu-west-3.elasticbeanstalk.com","sa-east-1.elasticbeanstalk.com","us-east-1.elasticbeanstalk.com","us-east-2.elasticbeanstalk.com","us-gov-west-1.elasticbeanstalk.com","us-west-1.elasticbeanstalk.com","us-west-2.elasticbeanstalk.com","*.elb.amazonaws.com","*.elb.amazonaws.com.cn","s3.amazonaws.com","s3-ap-northeast-1.amazonaws.com","s3-ap-northeast-2.amazonaws.com","s3-ap-south-1.amazonaws.com","s3-ap-southeast-1.amazonaws.com","s3-ap-southeast-2.amazonaws.com","s3-ca-central-1.amazonaws.com","s3-eu-central-1.amazonaws.com","s3-eu-west-1.amazonaws.com","s3-eu-west-2.amazonaws.com","s3-eu-west-3.amazonaws.com","s3-external-1.amazonaws.com","s3-fips-us-gov-west-1.amazonaws.com","s3-sa-east-1.amazonaws.com","s3-us-gov-west-1.amazonaws.com","s3-us-east-2.amazonaws.com","s3-us-west-1.amazonaws.com","s3-us-west-2.amazonaws.com","s3.ap-northeast-2.amazonaws.com","s3.ap-south-1.amazonaws.com","s3.cn-north-1.amazonaws.com.cn","s3.ca-central-1.amazonaws.com","s3.eu-central-1.amazonaws.com","s3.eu-west-2.amazonaws.com","s3.eu-west-3.amazonaws.com","s3.us-east-2.amazonaws.com","s3.dualstack.ap-northeast-1.amazonaws.com","s3.dualstack.ap-northeast-2.amazonaws.com","s3.dualstack.ap-south-1.amazonaws.com","s3.dualstack.ap-southeast-1.amazonaws.com","s3.dualstack.ap-southeast-2.amazonaws.com","s3.dualstack.ca-central-1.amazonaws.com","s3.dualstack.eu-central-1.amazonaws.com","s3.dualstack.eu-west-1.amazonaws.com","s3.dualstack.eu-west-2.amazonaws.com","s3.dualstack.eu-west-3.amazonaws.com","s3.dualstack.sa-east-1.amazonaws.com","s3.dualstack.us-east-1.amazonaws.com","s3.dualstack.us-east-2.amazonaws.com","s3-website-us-east-1.amazonaws.com","s3-website-us-west-1.amazonaws.com","s3-website-us-west-2.amazonaws.com","s3-website-ap-northeast-1.amazonaws.com","s3-website-ap-southeast-1.amazonaws.com","s3-website-ap-southeast-2.amazonaws.com","s3-website-eu-west-1.amazonaws.com","s3-website-sa-east-1.amazonaws.com","s3-website.ap-northeast-2.amazonaws.com","s3-website.ap-south-1.amazonaws.com","s3-website.ca-central-1.amazonaws.com","s3-website.eu-central-1.amazonaws.com","s3-website.eu-west-2.amazonaws.com","s3-website.eu-west-3.amazonaws.com","s3-website.us-east-2.amazonaws.com","amsw.nl","t3l3p0rt.net","tele.amune.org","apigee.io","on-aptible.com","user.aseinet.ne.jp","gv.vc","d.gv.vc","user.party.eus","pimienta.org","poivron.org","potager.org","sweetpepper.org","myasustor.com","myfritz.net","*.awdev.ca","*.advisor.ws","b-data.io","backplaneapp.io","balena-devices.com","app.banzaicloud.io","betainabox.com","bnr.la","blackbaudcdn.net","boomla.net","boxfuse.io","square7.ch","bplaced.com","bplaced.de","square7.de","bplaced.net","square7.net","browsersafetymark.io","uk0.bigv.io","dh.bytemark.co.uk","vm.bytemark.co.uk","mycd.eu","carrd.co","crd.co","uwu.ai","ae.org","ar.com","br.com","cn.com","com.de","com.se","de.com","eu.com","gb.com","gb.net","hu.com","hu.net","jp.net","jpn.com","kr.com","mex.com","no.com","qc.com","ru.com","sa.com","se.net","uk.com","uk.net","us.com","uy.com","za.bz","za.com","africa.com","gr.com","in.net","us.org","co.com","c.la","certmgr.org","xenapponazure.com","discourse.group","discourse.team","virtueeldomein.nl","cleverapps.io","*.lcl.dev","*.stg.dev","c66.me","cloud66.ws","cloud66.zone","jdevcloud.com","wpdevcloud.com","cloudaccess.host","freesite.host","cloudaccess.net","cloudcontrolled.com","cloudcontrolapp.com","cloudera.site","trycloudflare.com","workers.dev","wnext.app","co.ca","*.otap.co","co.cz","c.cdn77.org","cdn77-ssl.net","r.cdn77.net","rsc.cdn77.org","ssl.origin.cdn77-secure.org","cloudns.asia","cloudns.biz","cloudns.club","cloudns.cc","cloudns.eu","cloudns.in","cloudns.info","cloudns.org","cloudns.pro","cloudns.pw","cloudns.us","cloudeity.net","cnpy.gdn","co.nl","co.no","webhosting.be","hosting-cluster.nl","ac.ru","edu.ru","gov.ru","int.ru","mil.ru","test.ru","dyn.cosidns.de","dynamisches-dns.de","dnsupdater.de","internet-dns.de","l-o-g-i-n.de","dynamic-dns.info","feste-ip.net","knx-server.net","static-access.net","realm.cz","*.cryptonomic.net","cupcake.is","*.customer-oci.com","*.oci.customer-oci.com","*.ocp.customer-oci.com","*.ocs.customer-oci.com","cyon.link","cyon.site","daplie.me","localhost.daplie.me","dattolocal.com","dattorelay.com","dattoweb.com","mydatto.com","dattolocal.net","mydatto.net","biz.dk","co.dk","firm.dk","reg.dk","store.dk","*.dapps.earth","*.bzz.dapps.earth","builtwithdark.com","edgestack.me","debian.net","dedyn.io","dnshome.de","online.th","shop.th","drayddns.com","dreamhosters.com","mydrobo.com","drud.io","drud.us","duckdns.org","dy.fi","tunk.org","dyndns-at-home.com","dyndns-at-work.com","dyndns-blog.com","dyndns-free.com","dyndns-home.com","dyndns-ip.com","dyndns-mail.com","dyndns-office.com","dyndns-pics.com","dyndns-remote.com","dyndns-server.com","dyndns-web.com","dyndns-wiki.com","dyndns-work.com","dyndns.biz","dyndns.info","dyndns.org","dyndns.tv","at-band-camp.net","ath.cx","barrel-of-knowledge.info","barrell-of-knowledge.info","better-than.tv","blogdns.com","blogdns.net","blogdns.org","blogsite.org","boldlygoingnowhere.org","broke-it.net","buyshouses.net","cechire.com","dnsalias.com","dnsalias.net","dnsalias.org","dnsdojo.com","dnsdojo.net","dnsdojo.org","does-it.net","doesntexist.com","doesntexist.org","dontexist.com","dontexist.net","dontexist.org","doomdns.com","doomdns.org","dvrdns.org","dyn-o-saur.com","dynalias.com","dynalias.net","dynalias.org","dynathome.net","dyndns.ws","endofinternet.net","endofinternet.org","endoftheinternet.org","est-a-la-maison.com","est-a-la-masion.com","est-le-patron.com","est-mon-blogueur.com","for-better.biz","for-more.biz","for-our.info","for-some.biz","for-the.biz","forgot.her.name","forgot.his.name","from-ak.com","from-al.com","from-ar.com","from-az.net","from-ca.com","from-co.net","from-ct.com","from-dc.com","from-de.com","from-fl.com","from-ga.com","from-hi.com","from-ia.com","from-id.com","from-il.com","from-in.com","from-ks.com","from-ky.com","from-la.net","from-ma.com","from-md.com","from-me.org","from-mi.com","from-mn.com","from-mo.com","from-ms.com","from-mt.com","from-nc.com","from-nd.com","from-ne.com","from-nh.com","from-nj.com","from-nm.com","from-nv.com","from-ny.net","from-oh.com","from-ok.com","from-or.com","from-pa.com","from-pr.com","from-ri.com","from-sc.com","from-sd.com","from-tn.com","from-tx.com","from-ut.com","from-va.com","from-vt.com","from-wa.com","from-wi.com","from-wv.com","from-wy.com","ftpaccess.cc","fuettertdasnetz.de","game-host.org","game-server.cc","getmyip.com","gets-it.net","go.dyndns.org","gotdns.com","gotdns.org","groks-the.info","groks-this.info","ham-radio-op.net","here-for-more.info","hobby-site.com","hobby-site.org","home.dyndns.org","homedns.org","homeftp.net","homeftp.org","homeip.net","homelinux.com","homelinux.net","homelinux.org","homeunix.com","homeunix.net","homeunix.org","iamallama.com","in-the-band.net","is-a-anarchist.com","is-a-blogger.com","is-a-bookkeeper.com","is-a-bruinsfan.org","is-a-bulls-fan.com","is-a-candidate.org","is-a-caterer.com","is-a-celticsfan.org","is-a-chef.com","is-a-chef.net","is-a-chef.org","is-a-conservative.com","is-a-cpa.com","is-a-cubicle-slave.com","is-a-democrat.com","is-a-designer.com","is-a-doctor.com","is-a-financialadvisor.com","is-a-geek.com","is-a-geek.net","is-a-geek.org","is-a-green.com","is-a-guru.com","is-a-hard-worker.com","is-a-hunter.com","is-a-knight.org","is-a-landscaper.com","is-a-lawyer.com","is-a-liberal.com","is-a-libertarian.com","is-a-linux-user.org","is-a-llama.com","is-a-musician.com","is-a-nascarfan.com","is-a-nurse.com","is-a-painter.com","is-a-patsfan.org","is-a-personaltrainer.com","is-a-photographer.com","is-a-player.com","is-a-republican.com","is-a-rockstar.com","is-a-socialist.com","is-a-soxfan.org","is-a-student.com","is-a-teacher.com","is-a-techie.com","is-a-therapist.com","is-an-accountant.com","is-an-actor.com","is-an-actress.com","is-an-anarchist.com","is-an-artist.com","is-an-engineer.com","is-an-entertainer.com","is-by.us","is-certified.com","is-found.org","is-gone.com","is-into-anime.com","is-into-cars.com","is-into-cartoons.com","is-into-games.com","is-leet.com","is-lost.org","is-not-certified.com","is-saved.org","is-slick.com","is-uberleet.com","is-very-bad.org","is-very-evil.org","is-very-good.org","is-very-nice.org","is-very-sweet.org","is-with-theband.com","isa-geek.com","isa-geek.net","isa-geek.org","isa-hockeynut.com","issmarterthanyou.com","isteingeek.de","istmein.de","kicks-ass.net","kicks-ass.org","knowsitall.info","land-4-sale.us","lebtimnetz.de","leitungsen.de","likes-pie.com","likescandy.com","merseine.nu","mine.nu","misconfused.org","mypets.ws","myphotos.cc","neat-url.com","office-on-the.net","on-the-web.tv","podzone.net","podzone.org","readmyblog.org","saves-the-whales.com","scrapper-site.net","scrapping.cc","selfip.biz","selfip.com","selfip.info","selfip.net","selfip.org","sells-for-less.com","sells-for-u.com","sells-it.net","sellsyourhome.org","servebbs.com","servebbs.net","servebbs.org","serveftp.net","serveftp.org","servegame.org","shacknet.nu","simple-url.com","space-to-rent.com","stuff-4-sale.org","stuff-4-sale.us","teaches-yoga.com","thruhere.net","traeumtgerade.de","webhop.biz","webhop.info","webhop.net","webhop.org","worse-than.tv","writesthisblog.com","ddnss.de","dyn.ddnss.de","dyndns.ddnss.de","dyndns1.de","dyn-ip24.de","home-webserver.de","dyn.home-webserver.de","myhome-server.de","ddnss.org","definima.net","definima.io","bci.dnstrace.pro","ddnsfree.com","ddnsgeek.com","giize.com","gleeze.com","kozow.com","loseyourip.com","ooguy.com","theworkpc.com","casacam.net","dynu.net","accesscam.org","camdvr.org","freeddns.org","mywire.org","webredirect.org","myddns.rocks","blogsite.xyz","dynv6.net","e4.cz","en-root.fr","mytuleap.com","onred.one","staging.onred.one","enonic.io","customer.enonic.io","eu.org","al.eu.org","asso.eu.org","at.eu.org","au.eu.org","be.eu.org","bg.eu.org","ca.eu.org","cd.eu.org","ch.eu.org","cn.eu.org","cy.eu.org","cz.eu.org","de.eu.org","dk.eu.org","edu.eu.org","ee.eu.org","es.eu.org","fi.eu.org","fr.eu.org","gr.eu.org","hr.eu.org","hu.eu.org","ie.eu.org","il.eu.org","in.eu.org","int.eu.org","is.eu.org","it.eu.org","jp.eu.org","kr.eu.org","lt.eu.org","lu.eu.org","lv.eu.org","mc.eu.org","me.eu.org","mk.eu.org","mt.eu.org","my.eu.org","net.eu.org","ng.eu.org","nl.eu.org","no.eu.org","nz.eu.org","paris.eu.org","pl.eu.org","pt.eu.org","q-a.eu.org","ro.eu.org","ru.eu.org","se.eu.org","si.eu.org","sk.eu.org","tr.eu.org","uk.eu.org","us.eu.org","eu-1.evennode.com","eu-2.evennode.com","eu-3.evennode.com","eu-4.evennode.com","us-1.evennode.com","us-2.evennode.com","us-3.evennode.com","us-4.evennode.com","twmail.cc","twmail.net","twmail.org","mymailer.com.tw","url.tw","apps.fbsbx.com","ru.net","adygeya.ru","bashkiria.ru","bir.ru","cbg.ru","com.ru","dagestan.ru","grozny.ru","kalmykia.ru","kustanai.ru","marine.ru","mordovia.ru","msk.ru","mytis.ru","nalchik.ru","nov.ru","pyatigorsk.ru","spb.ru","vladikavkaz.ru","vladimir.ru","abkhazia.su","adygeya.su","aktyubinsk.su","arkhangelsk.su","armenia.su","ashgabad.su","azerbaijan.su","balashov.su","bashkiria.su","bryansk.su","bukhara.su","chimkent.su","dagestan.su","east-kazakhstan.su","exnet.su","georgia.su","grozny.su","ivanovo.su","jambyl.su","kalmykia.su","kaluga.su","karacol.su","karaganda.su","karelia.su","khakassia.su","krasnodar.su","kurgan.su","kustanai.su","lenug.su","mangyshlak.su","mordovia.su","msk.su","murmansk.su","nalchik.su","navoi.su","north-kazakhstan.su","nov.su","obninsk.su","penza.su","pokrovsk.su","sochi.su","spb.su","tashkent.su","termez.su","togliatti.su","troitsk.su","tselinograd.su","tula.su","tuva.su","vladikavkaz.su","vladimir.su","vologda.su","channelsdvr.net","u.channelsdvr.net","fastly-terrarium.com","fastlylb.net","map.fastlylb.net","freetls.fastly.net","map.fastly.net","a.prod.fastly.net","global.prod.fastly.net","a.ssl.fastly.net","b.ssl.fastly.net","global.ssl.fastly.net","fastpanel.direct","fastvps-server.com","fhapp.xyz","fedorainfracloud.org","fedorapeople.org","cloud.fedoraproject.org","app.os.fedoraproject.org","app.os.stg.fedoraproject.org","mydobiss.com","filegear.me","filegear-au.me","filegear-de.me","filegear-gb.me","filegear-ie.me","filegear-jp.me","filegear-sg.me","firebaseapp.com","flynnhub.com","flynnhosting.net","0e.vc","freebox-os.com","freeboxos.com","fbx-os.fr","fbxos.fr","freebox-os.fr","freeboxos.fr","freedesktop.org","*.futurecms.at","*.ex.futurecms.at","*.in.futurecms.at","futurehosting.at","futuremailing.at","*.ex.ortsinfo.at","*.kunden.ortsinfo.at","*.statics.cloud","service.gov.uk","gehirn.ne.jp","usercontent.jp","gentapps.com","lab.ms","github.io","githubusercontent.com","gitlab.io","glitch.me","lolipop.io","cloudapps.digital","london.cloudapps.digital","homeoffice.gov.uk","ro.im","shop.ro","goip.de","run.app","a.run.app","web.app","*.0emm.com","appspot.com","*.r.appspot.com","blogspot.ae","blogspot.al","blogspot.am","blogspot.ba","blogspot.be","blogspot.bg","blogspot.bj","blogspot.ca","blogspot.cf","blogspot.ch","blogspot.cl","blogspot.co.at","blogspot.co.id","blogspot.co.il","blogspot.co.ke","blogspot.co.nz","blogspot.co.uk","blogspot.co.za","blogspot.com","blogspot.com.ar","blogspot.com.au","blogspot.com.br","blogspot.com.by","blogspot.com.co","blogspot.com.cy","blogspot.com.ee","blogspot.com.eg","blogspot.com.es","blogspot.com.mt","blogspot.com.ng","blogspot.com.tr","blogspot.com.uy","blogspot.cv","blogspot.cz","blogspot.de","blogspot.dk","blogspot.fi","blogspot.fr","blogspot.gr","blogspot.hk","blogspot.hr","blogspot.hu","blogspot.ie","blogspot.in","blogspot.is","blogspot.it","blogspot.jp","blogspot.kr","blogspot.li","blogspot.lt","blogspot.lu","blogspot.md","blogspot.mk","blogspot.mr","blogspot.mx","blogspot.my","blogspot.nl","blogspot.no","blogspot.pe","blogspot.pt","blogspot.qa","blogspot.re","blogspot.ro","blogspot.rs","blogspot.ru","blogspot.se","blogspot.sg","blogspot.si","blogspot.sk","blogspot.sn","blogspot.td","blogspot.tw","blogspot.ug","blogspot.vn","cloudfunctions.net","cloud.goog","codespot.com","googleapis.com","googlecode.com","pagespeedmobilizer.com","publishproxy.com","withgoogle.com","withyoutube.com","awsmppl.com","fin.ci","free.hr","caa.li","ua.rs","conf.se","hs.zone","hs.run","hashbang.sh","hasura.app","hasura-app.io","hepforge.org","herokuapp.com","herokussl.com","myravendb.com","ravendb.community","ravendb.me","development.run","ravendb.run","bpl.biz","orx.biz","ng.city","biz.gl","ng.ink","col.ng","firm.ng","gen.ng","ltd.ng","ngo.ng","ng.school","sch.so","häkkinen.fi","*.moonscale.io","moonscale.net","iki.fi","dyn-berlin.de","in-berlin.de","in-brb.de","in-butter.de","in-dsl.de","in-dsl.net","in-dsl.org","in-vpn.de","in-vpn.net","in-vpn.org","biz.at","info.at","info.cx","ac.leg.br","al.leg.br","am.leg.br","ap.leg.br","ba.leg.br","ce.leg.br","df.leg.br","es.leg.br","go.leg.br","ma.leg.br","mg.leg.br","ms.leg.br","mt.leg.br","pa.leg.br","pb.leg.br","pe.leg.br","pi.leg.br","pr.leg.br","rj.leg.br","rn.leg.br","ro.leg.br","rr.leg.br","rs.leg.br","sc.leg.br","se.leg.br","sp.leg.br","to.leg.br","pixolino.com","ipifony.net","mein-iserv.de","test-iserv.de","iserv.dev","iobb.net","myjino.ru","*.hosting.myjino.ru","*.landing.myjino.ru","*.spectrum.myjino.ru","*.vps.myjino.ru","*.triton.zone","*.cns.joyent.com","js.org","kaas.gg","khplay.nl","keymachine.de","kinghost.net","uni5.net","knightpoint.systems","oya.to","co.krd","edu.krd","git-repos.de","lcube-server.de","svn-repos.de","leadpages.co","lpages.co","lpusercontent.com","lelux.site","co.business","co.education","co.events","co.financial","co.network","co.place","co.technology","app.lmpm.com","linkitools.space","linkyard.cloud","linkyard-cloud.ch","members.linode.com","nodebalancer.linode.com","we.bs","loginline.app","loginline.dev","loginline.io","loginline.services","loginline.site","krasnik.pl","leczna.pl","lubartow.pl","lublin.pl","poniatowa.pl","swidnik.pl","uklugs.org","glug.org.uk","lug.org.uk","lugs.org.uk","barsy.bg","barsy.co.uk","barsyonline.co.uk","barsycenter.com","barsyonline.com","barsy.club","barsy.de","barsy.eu","barsy.in","barsy.info","barsy.io","barsy.me","barsy.menu","barsy.mobi","barsy.net","barsy.online","barsy.org","barsy.pro","barsy.pub","barsy.shop","barsy.site","barsy.support","barsy.uk","*.magentosite.cloud","mayfirst.info","mayfirst.org","hb.cldmail.ru","miniserver.com","memset.net","cloud.metacentrum.cz","custom.metacentrum.cz","flt.cloud.muni.cz","usr.cloud.muni.cz","meteorapp.com","eu.meteorapp.com","co.pl","azurecontainer.io","azurewebsites.net","azure-mobile.net","cloudapp.net","mozilla-iot.org","bmoattachments.org","net.ru","org.ru","pp.ru","ui.nabu.casa","pony.club","of.fashion","on.fashion","of.football","in.london","of.london","for.men","and.mom","for.mom","for.one","for.sale","of.work","to.work","nctu.me","bitballoon.com","netlify.com","4u.com","ngrok.io","nh-serv.co.uk","nfshost.com","dnsking.ch","mypi.co","n4t.co","001www.com","ddnslive.com","myiphost.com","forumz.info","16-b.it","32-b.it","64-b.it","soundcast.me","tcp4.me","dnsup.net","hicam.net","now-dns.net","ownip.net","vpndns.net","dynserv.org","now-dns.org","x443.pw","now-dns.top","ntdll.top","freeddns.us","crafting.xyz","zapto.xyz","nsupdate.info","nerdpol.ovh","blogsyte.com","brasilia.me","cable-modem.org","ciscofreak.com","collegefan.org","couchpotatofries.org","damnserver.com","ddns.me","ditchyourip.com","dnsfor.me","dnsiskinky.com","dvrcam.info","dynns.com","eating-organic.net","fantasyleague.cc","geekgalaxy.com","golffan.us","health-carereform.com","homesecuritymac.com","homesecuritypc.com","hopto.me","ilovecollege.info","loginto.me","mlbfan.org","mmafan.biz","myactivedirectory.com","mydissent.net","myeffect.net","mymediapc.net","mypsx.net","mysecuritycamera.com","mysecuritycamera.net","mysecuritycamera.org","net-freaks.com","nflfan.org","nhlfan.net","no-ip.ca","no-ip.co.uk","no-ip.net","noip.us","onthewifi.com","pgafan.net","point2this.com","pointto.us","privatizehealthinsurance.net","quicksytes.com","read-books.org","securitytactics.com","serveexchange.com","servehumour.com","servep2p.com","servesarcasm.com","stufftoread.com","ufcfan.org","unusualperson.com","workisboring.com","3utilities.com","bounceme.net","ddns.net","ddnsking.com","gotdns.ch","hopto.org","myftp.biz","myftp.org","myvnc.com","no-ip.biz","no-ip.info","no-ip.org","noip.me","redirectme.net","servebeer.com","serveblog.net","servecounterstrike.com","serveftp.com","servegame.com","servehalflife.com","servehttp.com","serveirc.com","serveminecraft.net","servemp3.com","servepics.com","servequake.com","sytes.net","webhop.me","zapto.org","stage.nodeart.io","nodum.co","nodum.io","pcloud.host","nyc.mn","nom.ae","nom.af","nom.ai","nom.al","nym.by","nom.bz","nym.bz","nom.cl","nym.ec","nom.gd","nom.ge","nom.gl","nym.gr","nom.gt","nym.gy","nym.hk","nom.hn","nym.ie","nom.im","nom.ke","nym.kz","nym.la","nym.lc","nom.li","nym.li","nym.lt","nym.lu","nom.lv","nym.me","nom.mk","nym.mn","nym.mx","nom.nu","nym.nz","nym.pe","nym.pt","nom.pw","nom.qa","nym.ro","nom.rs","nom.si","nym.sk","nom.st","nym.su","nym.sx","nom.tj","nym.tw","nom.ug","nom.uy","nom.vc","nom.vg","static.observableusercontent.com","cya.gg","cloudycluster.net","nid.io","opencraft.hosting","operaunite.com","skygearapp.com","outsystemscloud.com","ownprovider.com","own.pm","ox.rs","oy.lc","pgfog.com","pagefrontapp.com","art.pl","gliwice.pl","krakow.pl","poznan.pl","wroc.pl","zakopane.pl","pantheonsite.io","gotpantheon.com","mypep.link","perspecta.cloud","on-web.fr","*.platform.sh","*.platformsh.site","dyn53.io","co.bn","xen.prgmr.com","priv.at","prvcy.page","*.dweb.link","protonet.io","chirurgiens-dentistes-en-france.fr","byen.site","pubtls.org","qualifioapp.com","qbuser.com","instantcloud.cn","ras.ru","qa2.com","qcx.io","*.sys.qcx.io","dev-myqnapcloud.com","alpha-myqnapcloud.com","myqnapcloud.com","*.quipelements.com","vapor.cloud","vaporcloud.io","rackmaze.com","rackmaze.net","*.on-k3s.io","*.on-rancher.cloud","*.on-rio.io","readthedocs.io","rhcloud.com","app.render.com","onrender.com","repl.co","repl.run","resindevice.io","devices.resinstaging.io","hzc.io","wellbeingzone.eu","ptplus.fit","wellbeingzone.co.uk","git-pages.rit.edu","sandcats.io","logoip.de","logoip.com","schokokeks.net","gov.scot","scrysec.com","firewall-gateway.com","firewall-gateway.de","my-gateway.de","my-router.de","spdns.de","spdns.eu","firewall-gateway.net","my-firewall.org","myfirewall.org","spdns.org","senseering.net","biz.ua","co.ua","pp.ua","shiftedit.io","myshopblocks.com","shopitsite.com","mo-siemens.io","1kapp.com","appchizi.com","applinzi.com","sinaapp.com","vipsinaapp.com","siteleaf.net","bounty-full.com","alpha.bounty-full.com","beta.bounty-full.com","stackhero-network.com","static.land","dev.static.land","sites.static.land","apps.lair.io","*.stolos.io","spacekit.io","customer.speedpartner.de","api.stdlib.com","storj.farm","utwente.io","soc.srcf.net","user.srcf.net","temp-dns.com","applicationcloud.io","scapp.io","*.s5y.io","*.sensiosite.cloud","syncloud.it","diskstation.me","dscloud.biz","dscloud.me","dscloud.mobi","dsmynas.com","dsmynas.net","dsmynas.org","familyds.com","familyds.net","familyds.org","i234.me","myds.me","synology.me","vpnplus.to","direct.quickconnect.to","taifun-dns.de","gda.pl","gdansk.pl","gdynia.pl","med.pl","sopot.pl","edugit.org","telebit.app","telebit.io","*.telebit.xyz","gwiddle.co.uk","thingdustdata.com","cust.dev.thingdust.io","cust.disrec.thingdust.io","cust.prod.thingdust.io","cust.testing.thingdust.io","arvo.network","azimuth.network","bloxcms.com","townnews-staging.com","12hp.at","2ix.at","4lima.at","lima-city.at","12hp.ch","2ix.ch","4lima.ch","lima-city.ch","trafficplex.cloud","de.cool","12hp.de","2ix.de","4lima.de","lima-city.de","1337.pictures","clan.rip","lima-city.rocks","webspace.rocks","lima.zone","*.transurl.be","*.transurl.eu","*.transurl.nl","tuxfamily.org","dd-dns.de","diskstation.eu","diskstation.org","dray-dns.de","draydns.de","dyn-vpn.de","dynvpn.de","mein-vigor.de","my-vigor.de","my-wan.de","syno-ds.de","synology-diskstation.de","synology-ds.de","uber.space","*.uberspace.de","hk.com","hk.org","ltd.hk","inc.hk","virtualuser.de","virtual-user.de","urown.cloud","dnsupdate.info","lib.de.us","2038.io","router.management","v-info.info","voorloper.cloud","v.ua","wafflecell.com","*.webhare.dev","wedeploy.io","wedeploy.me","wedeploy.sh","remotewd.com","wmflabs.org","myforum.community","community-pro.de","diskussionsbereich.de","community-pro.net","meinforum.net","half.host","xnbay.com","u2.xnbay.com","u2-local.xnbay.com","cistron.nl","demon.nl","xs4all.space","yandexcloud.net","storage.yandexcloud.net","website.yandexcloud.net","official.academy","yolasite.com","ybo.faith","yombo.me","homelink.one","ybo.party","ybo.review","ybo.science","ybo.trade","nohost.me","noho.st","za.net","za.org","now.sh","bss.design","basicserver.io","virtualserver.io","enterprisecloud.nu"]},{}],2:[function(a,o,r){"use strict";var p=a("punycode"),k={};k.rules=a("./data/rules.json").map(function(a){return{rule:a,suffix:a.replace(/^(\*\.|\!)/,""),punySuffix:-1,wildcard:"*"===a.charAt(0),exception:"!"===a.charAt(0)}}),k.endsWith=function(a,o){return-1!==a.indexOf(o,a.length-o.length)},k.findRule=function(a){var i=p.toASCII(a);return k.rules.reduce(function(a,o){return-1===o.punySuffix&&(o.punySuffix=p.toASCII(o.suffix)),k.endsWith(i,"."+o.punySuffix)||i===o.punySuffix?o:a},null)},r.errorCodes={DOMAIN_TOO_SHORT:"Domain name too short.",DOMAIN_TOO_LONG:"Domain name too long. It should be no more than 255 chars.",LABEL_STARTS_WITH_DASH:"Domain name label can not start with a dash.",LABEL_ENDS_WITH_DASH:"Domain name label can not end with a dash.",LABEL_TOO_LONG:"Domain name label should be at most 63 chars long.",LABEL_TOO_SHORT:"Domain name label should be at least 1 character long.",LABEL_INVALID_CHARS:"Domain name label can only contain alphanumeric characters or dashes."},k.validate=function(a){var o=p.toASCII(a);if(o.length<1)return"DOMAIN_TOO_SHORT";if(255<o.length)return"DOMAIN_TOO_LONG";for(var i,e=o.split("."),n=0;n<e.length;++n){if(!(i=e[n]).length)return"LABEL_TOO_SHORT";if(63<i.length)return"LABEL_TOO_LONG";if("-"===i.charAt(0))return"LABEL_STARTS_WITH_DASH";if("-"===i.charAt(i.length-1))return"LABEL_ENDS_WITH_DASH";if(!/^[a-z0-9\-]+$/.test(i))return"LABEL_INVALID_CHARS"}},r.parse=function(a){if("string"!=typeof a)throw new TypeError("Domain name must be a string.");var o=a.slice(0).toLowerCase();"."===o.charAt(o.length-1)&&(o=o.slice(0,o.length-1));var i=k.validate(o);if(i)return{input:a,error:{message:r.errorCodes[i],code:i}};var e={input:a,tld:null,sld:null,domain:null,subdomain:null,listed:!1},n=o.split(".");if("local"===n[n.length-1])return e;function s(){return/xn--/.test(o)&&(e.domain&&(e.domain=p.toASCII(e.domain)),e.subdomain&&(e.subdomain=p.toASCII(e.subdomain))),e}var m=k.findRule(o);if(!m)return n.length<2?e:(e.tld=n.pop(),e.sld=n.pop(),e.domain=[e.sld,e.tld].join("."),n.length&&(e.subdomain=n.pop()),s());e.listed=!0;var t=m.suffix.split("."),u=n.slice(0,n.length-t.length);return m.exception&&u.push(t.shift()),e.tld=t.join("."),u.length?(m.wildcard&&(t.unshift(u.pop()),e.tld=t.join(".")),u.length&&(e.sld=u.pop(),e.domain=[e.sld,e.tld].join("."),u.length&&(e.subdomain=u.join("."))),s()):s()},r.get=function(a){return a&&r.parse(a).domain||null},r.isValid=function(a){var o=r.parse(a);return Boolean(o.domain&&o.listed)}},{"./data/rules.json":1,punycode:3}],3:[function(a,T,D){(function(S){!function(a){var o="object"==typeof D&&D&&!D.nodeType&&D,i="object"==typeof T&&T&&!T.nodeType&&T,e="object"==typeof S&&S;e.global!==e&&e.window!==e&&e.self!==e||(a=e);var n,s,d=2147483647,b=36,y=1,f=26,m=38,t=700,v=72,w=128,z="-",u=/^xn--/,r=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=b-y,x=Math.floor,q=String.fromCharCode;function A(a){throw new RangeError(k[a])}function l(a,o){for(var i=a.length,e=[];i--;)e[i]=o(a[i]);return e}function g(a,o){var i=a.split("@"),e="";return 1<i.length&&(e=i[0]+"@",a=i[1]),e+l((a=a.replace(p,".")).split("."),o).join(".")}function O(a){for(var o,i,e=[],n=0,s=a.length;n<s;)55296<=(o=a.charCodeAt(n++))&&o<=56319&&n<s?56320==(64512&(i=a.charCodeAt(n++)))?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),n--):e.push(o);return e}function _(a){return l(a,function(a){var o="";return 65535<a&&(o+=q((a-=65536)>>>10&1023|55296),a=56320|1023&a),o+=q(a)}).join("")}function L(a,o){return a+22+75*(a<26)-((0!=o)<<5)}function I(a,o,i){var e=0;for(a=i?x(a/t):a>>1,a+=x(a/o);c*f>>1<a;e+=b)a=x(a/c);return x(e+(c+1)*a/(a+m))}function h(a){var o,i,e,n,s,m,t,u,r,p,k,c=[],l=a.length,g=0,h=w,j=v;for((i=a.lastIndexOf(z))<0&&(i=0),e=0;e<i;++e)128<=a.charCodeAt(e)&&A("not-basic"),c.push(a.charCodeAt(e));for(n=0<i?i+1:0;n<l;){for(s=g,m=1,t=b;l<=n&&A("invalid-input"),k=a.charCodeAt(n++),(b<=(u=k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:b)||u>x((d-g)/m))&&A("overflow"),g+=u*m,!(u<(r=t<=j?y:j+f<=t?f:t-j));t+=b)m>x(d/(p=b-r))&&A("overflow"),m*=p;j=I(g-s,o=c.length+1,0==s),x(g/o)>d-h&&A("overflow"),h+=x(g/o),g%=o,c.splice(g++,0,h)}return _(c)}function j(a){var o,i,e,n,s,m,t,u,r,p,k,c,l,g,h,j=[];for(c=(a=O(a)).length,o=w,s=v,m=i=0;m<c;++m)(k=a[m])<128&&j.push(q(k));for(e=n=j.length,n&&j.push(z);e<c;){for(t=d,m=0;m<c;++m)o<=(k=a[m])&&k<t&&(t=k);for(t-o>x((d-i)/(l=e+1))&&A("overflow"),i+=(t-o)*l,o=t,m=0;m<c;++m)if((k=a[m])<o&&++i>d&&A("overflow"),k==o){for(u=i,r=b;!(u<(p=r<=s?y:s+f<=r?f:r-s));r+=b)h=u-p,g=b-p,j.push(q(L(p+h%g,0))),u=x(h/g);j.push(q(L(u,0))),s=I(i,l,e==n),i=0,++e}++i,++o}return j.join("")}if(n={version:"1.4.1",ucs2:{decode:O,encode:_},decode:h,encode:j,toASCII:function(a){return g(a,function(a){return r.test(a)?"xn--"+j(a):a})},toUnicode:function(a){return g(a,function(a){return u.test(a)?h(a.slice(4).toLowerCase()):a})}},0,o&&i)if(T.exports==o)i.exports=n;else for(s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);else a.punycode=n}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2])(2)});
diff --git a/node_modules/psl/index.js b/node_modules/psl/index.js
new file mode 100644
index 0000000..da7bc12
--- /dev/null
+++ b/node_modules/psl/index.js
@@ -0,0 +1,269 @@
+/*eslint no-var:0, prefer-arrow-callback: 0, object-shorthand: 0 */
+'use strict';
+
+
+var Punycode = require('punycode');
+
+
+var internals = {};
+
+
+//
+// Read rules from file.
+//
+internals.rules = require('./data/rules.json').map(function (rule) {
+
+ return {
+ rule: rule,
+ suffix: rule.replace(/^(\*\.|\!)/, ''),
+ punySuffix: -1,
+ wildcard: rule.charAt(0) === '*',
+ exception: rule.charAt(0) === '!'
+ };
+});
+
+
+//
+// Check is given string ends with `suffix`.
+//
+internals.endsWith = function (str, suffix) {
+
+ return str.indexOf(suffix, str.length - suffix.length) !== -1;
+};
+
+
+//
+// Find rule for a given domain.
+//
+internals.findRule = function (domain) {
+
+ var punyDomain = Punycode.toASCII(domain);
+ return internals.rules.reduce(function (memo, rule) {
+
+ if (rule.punySuffix === -1){
+ rule.punySuffix = Punycode.toASCII(rule.suffix);
+ }
+ if (!internals.endsWith(punyDomain, '.' + rule.punySuffix) && punyDomain !== rule.punySuffix) {
+ return memo;
+ }
+ // This has been commented out as it never seems to run. This is because
+ // sub tlds always appear after their parents and we never find a shorter
+ // match.
+ //if (memo) {
+ // var memoSuffix = Punycode.toASCII(memo.suffix);
+ // if (memoSuffix.length >= punySuffix.length) {
+ // return memo;
+ // }
+ //}
+ return rule;
+ }, null);
+};
+
+
+//
+// Error codes and messages.
+//
+exports.errorCodes = {
+ DOMAIN_TOO_SHORT: 'Domain name too short.',
+ DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.',
+ LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.',
+ LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.',
+ LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.',
+ LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.',
+ LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.'
+};
+
+
+//
+// Validate domain name and throw if not valid.
+//
+// From wikipedia:
+//
+// Hostnames are composed of series of labels concatenated with dots, as are all
+// domain names. Each label must be between 1 and 63 characters long, and the
+// entire hostname (including the delimiting dots) has a maximum of 255 chars.
+//
+// Allowed chars:
+//
+// * `a-z`
+// * `0-9`
+// * `-` but not as a starting or ending character
+// * `.` as a separator for the textual portions of a domain name
+//
+// * http://en.wikipedia.org/wiki/Domain_name
+// * http://en.wikipedia.org/wiki/Hostname
+//
+internals.validate = function (input) {
+
+ // Before we can validate we need to take care of IDNs with unicode chars.
+ var ascii = Punycode.toASCII(input);
+
+ if (ascii.length < 1) {
+ return 'DOMAIN_TOO_SHORT';
+ }
+ if (ascii.length > 255) {
+ return 'DOMAIN_TOO_LONG';
+ }
+
+ // Check each part's length and allowed chars.
+ var labels = ascii.split('.');
+ var label;
+
+ for (var i = 0; i < labels.length; ++i) {
+ label = labels[i];
+ if (!label.length) {
+ return 'LABEL_TOO_SHORT';
+ }
+ if (label.length > 63) {
+ return 'LABEL_TOO_LONG';
+ }
+ if (label.charAt(0) === '-') {
+ return 'LABEL_STARTS_WITH_DASH';
+ }
+ if (label.charAt(label.length - 1) === '-') {
+ return 'LABEL_ENDS_WITH_DASH';
+ }
+ if (!/^[a-z0-9\-]+$/.test(label)) {
+ return 'LABEL_INVALID_CHARS';
+ }
+ }
+};
+
+
+//
+// Public API
+//
+
+
+//
+// Parse domain.
+//
+exports.parse = function (input) {
+
+ if (typeof input !== 'string') {
+ throw new TypeError('Domain name must be a string.');
+ }
+
+ // Force domain to lowercase.
+ var domain = input.slice(0).toLowerCase();
+
+ // Handle FQDN.
+ // TODO: Simply remove trailing dot?
+ if (domain.charAt(domain.length - 1) === '.') {
+ domain = domain.slice(0, domain.length - 1);
+ }
+
+ // Validate and sanitise input.
+ var error = internals.validate(domain);
+ if (error) {
+ return {
+ input: input,
+ error: {
+ message: exports.errorCodes[error],
+ code: error
+ }
+ };
+ }
+
+ var parsed = {
+ input: input,
+ tld: null,
+ sld: null,
+ domain: null,
+ subdomain: null,
+ listed: false
+ };
+
+ var domainParts = domain.split('.');
+
+ // Non-Internet TLD
+ if (domainParts[domainParts.length - 1] === 'local') {
+ return parsed;
+ }
+
+ var handlePunycode = function () {
+
+ if (!/xn--/.test(domain)) {
+ return parsed;
+ }
+ if (parsed.domain) {
+ parsed.domain = Punycode.toASCII(parsed.domain);
+ }
+ if (parsed.subdomain) {
+ parsed.subdomain = Punycode.toASCII(parsed.subdomain);
+ }
+ return parsed;
+ };
+
+ var rule = internals.findRule(domain);
+
+ // Unlisted tld.
+ if (!rule) {
+ if (domainParts.length < 2) {
+ return parsed;
+ }
+ parsed.tld = domainParts.pop();
+ parsed.sld = domainParts.pop();
+ parsed.domain = [parsed.sld, parsed.tld].join('.');
+ if (domainParts.length) {
+ parsed.subdomain = domainParts.pop();
+ }
+ return handlePunycode();
+ }
+
+ // At this point we know the public suffix is listed.
+ parsed.listed = true;
+
+ var tldParts = rule.suffix.split('.');
+ var privateParts = domainParts.slice(0, domainParts.length - tldParts.length);
+
+ if (rule.exception) {
+ privateParts.push(tldParts.shift());
+ }
+
+ parsed.tld = tldParts.join('.');
+
+ if (!privateParts.length) {
+ return handlePunycode();
+ }
+
+ if (rule.wildcard) {
+ tldParts.unshift(privateParts.pop());
+ parsed.tld = tldParts.join('.');
+ }
+
+ if (!privateParts.length) {
+ return handlePunycode();
+ }
+
+ parsed.sld = privateParts.pop();
+ parsed.domain = [parsed.sld, parsed.tld].join('.');
+
+ if (privateParts.length) {
+ parsed.subdomain = privateParts.join('.');
+ }
+
+ return handlePunycode();
+};
+
+
+//
+// Get domain.
+//
+exports.get = function (domain) {
+
+ if (!domain) {
+ return null;
+ }
+ return exports.parse(domain).domain || null;
+};
+
+
+//
+// Check whether domain belongs to a known public suffix.
+//
+exports.isValid = function (domain) {
+
+ var parsed = exports.parse(domain);
+ return Boolean(parsed.domain && parsed.listed);
+};
diff --git a/node_modules/psl/package.json b/node_modules/psl/package.json
new file mode 100644
index 0000000..ee2da19
--- /dev/null
+++ b/node_modules/psl/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "psl",
+ "version": "1.8.0",
+ "description": "Domain name parser based on the Public Suffix List",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:lupomontero/psl.git"
+ },
+ "main": "index.js",
+ "scripts": {
+ "pretest": "eslint .",
+ "test": "mocha test && karma start ./karma.conf.js --single-run",
+ "watch": "mocha test --watch",
+ "prebuild": "./scripts/update-rules.js",
+ "build": "browserify ./index.js --standalone=psl > ./dist/psl.js",
+ "postbuild": "cat ./dist/psl.js | uglifyjs -c -m > ./dist/psl.min.js",
+ "commit-and-pr": "commit-and-pr",
+ "changelog": "git log $(git describe --tags --abbrev=0)..HEAD --oneline --format=\"%h %s (%an <%ae>)\""
+ },
+ "keywords": [
+ "publicsuffix",
+ "publicsuffixlist"
+ ],
+ "author": "Lupo Montero <lupomontero@gmail.com> (https://lupomontero.com/)",
+ "license": "MIT",
+ "devDependencies": {
+ "JSONStream": "^1.3.5",
+ "browserify": "^16.5.0",
+ "commit-and-pr": "^1.0.4",
+ "eslint": "^6.8.0",
+ "eslint-config-hapi": "^12.0.0",
+ "eslint-plugin-hapi": "^4.1.0",
+ "karma": "^4.4.1",
+ "karma-browserify": "^7.0.0",
+ "karma-mocha": "^1.3.0",
+ "karma-mocha-reporter": "^2.2.5",
+ "karma-phantomjs-launcher": "^1.0.4",
+ "mocha": "^7.1.1",
+ "phantomjs-prebuilt": "^2.1.16",
+ "request": "^2.88.2",
+ "uglify-js": "^3.8.0",
+ "watchify": "^3.11.1"
+ }
+}
diff --git a/node_modules/pump/.travis.yml b/node_modules/pump/.travis.yml
new file mode 100644
index 0000000..17f9433
--- /dev/null
+++ b/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE
new file mode 100644
index 0000000..757562e
--- /dev/null
+++ b/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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. \ No newline at end of file
diff --git a/node_modules/pump/README.md b/node_modules/pump/README.md
new file mode 100644
index 0000000..4c81471
--- /dev/null
+++ b/node_modules/pump/README.md
@@ -0,0 +1,65 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do:
+
+```
+return pump(s1, s2) // returns s2
+```
+
+If you want to return a stream that combines *both* s1 and s2 to a single stream use
+[pumpify](https://github.com/mafintosh/pumpify) instead.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js
new file mode 100644
index 0000000..c15059f
--- /dev/null
+++ b/node_modules/pump/index.js
@@ -0,0 +1,82 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ return streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json
new file mode 100644
index 0000000..0b838f9
--- /dev/null
+++ b/node_modules/pump/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "pump",
+ "version": "3.0.0",
+ "repository": "git://github.com/mafintosh/pump.git",
+ "license": "MIT",
+ "description": "pipe streams together and close all of them if one of them closes",
+ "browser": {
+ "fs": false
+ },
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "author": "Mathias Buus Madsen <mathiasbuus@gmail.com>",
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "scripts": {
+ "test": "node test-browser.js && node test-node.js"
+ }
+}
diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js
new file mode 100644
index 0000000..9a06c8a
--- /dev/null
+++ b/node_modules/pump/test-browser.js
@@ -0,0 +1,66 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res !== ws) {
+ throw new Error('should return last stream')
+}
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
+}, 5000)
diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js
new file mode 100644
index 0000000..561251a
--- /dev/null
+++ b/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res !== ws) {
+ throw new Error('should return last stream')
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/node_modules/punycode/LICENSE-MIT.txt b/node_modules/punycode/LICENSE-MIT.txt
new file mode 100644
index 0000000..a41e0a7
--- /dev/null
+++ b/node_modules/punycode/LICENSE-MIT.txt
@@ -0,0 +1,20 @@
+Copyright Mathias Bynens <https://mathiasbynens.be/>
+
+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/punycode/README.md b/node_modules/punycode/README.md
new file mode 100644
index 0000000..ee2f9d6
--- /dev/null
+++ b/node_modules/punycode/README.md
@@ -0,0 +1,122 @@
+# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/codecov/c/github/bestiejs/punycode.js.svg)](https://codecov.io/gh/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js)
+
+Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891).
+
+This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:
+
+* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C)
+* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c)
+* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c)
+* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287)
+* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072))
+
+This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated).
+
+The current version supports recent versions of Node.js only. It provides a CommonJS module and an ES6 module. For the old version that offers the same functionality with broader support, including Rhino, Ringo, Narwhal, and web browsers, see [v1.4.1](https://github.com/bestiejs/punycode.js/releases/tag/v1.4.1).
+
+## Installation
+
+Via [npm](https://www.npmjs.com/):
+
+```bash
+npm install punycode --save
+```
+
+In [Node.js](https://nodejs.org/):
+
+```js
+const punycode = require('punycode');
+```
+
+## API
+
+### `punycode.decode(string)`
+
+Converts a Punycode string of ASCII symbols to a string of Unicode symbols.
+
+```js
+// decode domain name parts
+punycode.decode('maana-pta'); // 'mañana'
+punycode.decode('--dqo34k'); // '☃-⌘'
+```
+
+### `punycode.encode(string)`
+
+Converts a string of Unicode symbols to a Punycode string of ASCII symbols.
+
+```js
+// encode domain name parts
+punycode.encode('mañana'); // 'maana-pta'
+punycode.encode('☃-⌘'); // '--dqo34k'
+```
+
+### `punycode.toUnicode(input)`
+
+Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode.
+
+```js
+// decode domain names
+punycode.toUnicode('xn--maana-pta.com');
+// → 'mañana.com'
+punycode.toUnicode('xn----dqo34k.com');
+// → '☃-⌘.com'
+
+// decode email addresses
+punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq');
+// → 'джумла@джpумлатест.bрфa'
+```
+
+### `punycode.toASCII(input)`
+
+Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII.
+
+```js
+// encode domain names
+punycode.toASCII('mañana.com');
+// → 'xn--maana-pta.com'
+punycode.toASCII('☃-⌘.com');
+// → 'xn----dqo34k.com'
+
+// encode email addresses
+punycode.toASCII('джумла@джpумлатест.bрфa');
+// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'
+```
+
+### `punycode.ucs2`
+
+#### `punycode.ucs2.decode(string)`
+
+Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.
+
+```js
+punycode.ucs2.decode('abc');
+// → [0x61, 0x62, 0x63]
+// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE:
+punycode.ucs2.decode('\uD834\uDF06');
+// → [0x1D306]
+```
+
+#### `punycode.ucs2.encode(codePoints)`
+
+Creates a string based on an array of numeric code point values.
+
+```js
+punycode.ucs2.encode([0x61, 0x62, 0x63]);
+// → 'abc'
+punycode.ucs2.encode([0x1D306]);
+// → '\uD834\uDF06'
+```
+
+### `punycode.version`
+
+A string representing the current Punycode.js version number.
+
+## Author
+
+| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
+|---|
+| [Mathias Bynens](https://mathiasbynens.be/) |
+
+## License
+
+Punycode.js is available under the [MIT](https://mths.be/mit) license.
diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json
new file mode 100644
index 0000000..9202ccf
--- /dev/null
+++ b/node_modules/punycode/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "punycode",
+ "version": "2.1.1",
+ "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.",
+ "homepage": "https://mths.be/punycode",
+ "main": "punycode.js",
+ "jsnext:main": "punycode.es6.js",
+ "module": "punycode.es6.js",
+ "engines": {
+ "node": ">=6"
+ },
+ "keywords": [
+ "punycode",
+ "unicode",
+ "idn",
+ "idna",
+ "dns",
+ "url",
+ "domain"
+ ],
+ "license": "MIT",
+ "author": {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ },
+ "contributors": [
+ {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/bestiejs/punycode.js.git"
+ },
+ "bugs": "https://github.com/bestiejs/punycode.js/issues",
+ "files": [
+ "LICENSE-MIT.txt",
+ "punycode.js",
+ "punycode.es6.js"
+ ],
+ "scripts": {
+ "test": "mocha tests",
+ "prepublish": "node scripts/prepublish.js"
+ },
+ "devDependencies": {
+ "codecov": "^1.0.1",
+ "istanbul": "^0.4.1",
+ "mocha": "^2.5.3"
+ },
+ "jspm": {
+ "map": {
+ "./punycode.js": {
+ "node": "@node/punycode"
+ }
+ }
+ }
+}
diff --git a/node_modules/punycode/punycode.es6.js b/node_modules/punycode/punycode.es6.js
new file mode 100644
index 0000000..4610bc9
--- /dev/null
+++ b/node_modules/punycode/punycode.es6.js
@@ -0,0 +1,441 @@
+'use strict';
+
+/** Highest positive signed 32-bit float value */
+const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
+
+/** Bootstring parameters */
+const base = 36;
+const tMin = 1;
+const tMax = 26;
+const skew = 38;
+const damp = 700;
+const initialBias = 72;
+const initialN = 128; // 0x80
+const delimiter = '-'; // '\x2D'
+
+/** Regular expressions */
+const regexPunycode = /^xn--/;
+const regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
+const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
+
+/** Error messages */
+const errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+};
+
+/** Convenience shortcuts */
+const baseMinusTMin = base - tMin;
+const floor = Math.floor;
+const stringFromCharCode = String.fromCharCode;
+
+/*--------------------------------------------------------------------------*/
+
+/**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+function error(type) {
+ throw new RangeError(errors[type]);
+}
+
+/**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+function map(array, fn) {
+ const result = [];
+ let length = array.length;
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+}
+
+/**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+function mapDomain(string, fn) {
+ const parts = string.split('@');
+ let result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ const labels = string.split('.');
+ const encoded = map(labels, fn).join('.');
+ return result + encoded;
+}
+
+/**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+function ucs2decode(string) {
+ const output = [];
+ let counter = 0;
+ const length = string.length;
+ while (counter < length) {
+ const value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // It's a high surrogate, and there is a next character.
+ const extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // It's an unmatched surrogate; only append this code unit, in case the
+ // next code unit is the high surrogate of a surrogate pair.
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+}
+
+/**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+const ucs2encode = array => String.fromCodePoint(...array);
+
+/**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+const basicToDigit = function(codePoint) {
+ if (codePoint - 0x30 < 0x0A) {
+ return codePoint - 0x16;
+ }
+ if (codePoint - 0x41 < 0x1A) {
+ return codePoint - 0x41;
+ }
+ if (codePoint - 0x61 < 0x1A) {
+ return codePoint - 0x61;
+ }
+ return base;
+};
+
+/**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+const digitToBasic = function(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+};
+
+/**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+const adapt = function(delta, numPoints, firstTime) {
+ let k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+};
+
+/**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+const decode = function(input) {
+ // Don't use UCS-2.
+ const output = [];
+ const inputLength = input.length;
+ let i = 0;
+ let n = initialN;
+ let bias = initialBias;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ let basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (let j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ let oldi = i;
+ for (let w = 1, k = base; /* no condition */; k += base) {
+
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ const digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+ if (digit < t) {
+ break;
+ }
+
+ const baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+
+ }
+
+ const out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output.
+ output.splice(i++, 0, n);
+
+ }
+
+ return String.fromCodePoint(...output);
+};
+
+/**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+const encode = function(input) {
+ const output = [];
+
+ // Convert the input in UCS-2 to an array of Unicode code points.
+ input = ucs2decode(input);
+
+ // Cache the length.
+ let inputLength = input.length;
+
+ // Initialize the state.
+ let n = initialN;
+ let delta = 0;
+ let bias = initialBias;
+
+ // Handle the basic code points.
+ for (const currentValue of input) {
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ let basicLength = output.length;
+ let handledCPCount = basicLength;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string with a delimiter unless it's empty.
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ let m = maxInt;
+ for (const currentValue of input) {
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow.
+ const handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (const currentValue of input) {
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+ if (currentValue == n) {
+ // Represent delta as a generalized variable-length integer.
+ let q = delta;
+ for (let k = base; /* no condition */; k += base) {
+ const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+ if (q < t) {
+ break;
+ }
+ const qMinusT = q - t;
+ const baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+
+ }
+ return output.join('');
+};
+
+/**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+const toUnicode = function(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string)
+ ? decode(string.slice(4).toLowerCase())
+ : string;
+ });
+};
+
+/**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+const toASCII = function(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string)
+ ? 'xn--' + encode(string)
+ : string;
+ });
+};
+
+/*--------------------------------------------------------------------------*/
+
+/** Define the public API */
+const punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '2.1.0',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+};
+
+export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };
+export default punycode;
diff --git a/node_modules/punycode/punycode.js b/node_modules/punycode/punycode.js
new file mode 100644
index 0000000..ea61fd0
--- /dev/null
+++ b/node_modules/punycode/punycode.js
@@ -0,0 +1,440 @@
+'use strict';
+
+/** Highest positive signed 32-bit float value */
+const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
+
+/** Bootstring parameters */
+const base = 36;
+const tMin = 1;
+const tMax = 26;
+const skew = 38;
+const damp = 700;
+const initialBias = 72;
+const initialN = 128; // 0x80
+const delimiter = '-'; // '\x2D'
+
+/** Regular expressions */
+const regexPunycode = /^xn--/;
+const regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
+const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
+
+/** Error messages */
+const errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+};
+
+/** Convenience shortcuts */
+const baseMinusTMin = base - tMin;
+const floor = Math.floor;
+const stringFromCharCode = String.fromCharCode;
+
+/*--------------------------------------------------------------------------*/
+
+/**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+function error(type) {
+ throw new RangeError(errors[type]);
+}
+
+/**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+function map(array, fn) {
+ const result = [];
+ let length = array.length;
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+}
+
+/**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+function mapDomain(string, fn) {
+ const parts = string.split('@');
+ let result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ const labels = string.split('.');
+ const encoded = map(labels, fn).join('.');
+ return result + encoded;
+}
+
+/**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+function ucs2decode(string) {
+ const output = [];
+ let counter = 0;
+ const length = string.length;
+ while (counter < length) {
+ const value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // It's a high surrogate, and there is a next character.
+ const extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // It's an unmatched surrogate; only append this code unit, in case the
+ // next code unit is the high surrogate of a surrogate pair.
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+}
+
+/**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+const ucs2encode = array => String.fromCodePoint(...array);
+
+/**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+const basicToDigit = function(codePoint) {
+ if (codePoint - 0x30 < 0x0A) {
+ return codePoint - 0x16;
+ }
+ if (codePoint - 0x41 < 0x1A) {
+ return codePoint - 0x41;
+ }
+ if (codePoint - 0x61 < 0x1A) {
+ return codePoint - 0x61;
+ }
+ return base;
+};
+
+/**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+const digitToBasic = function(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+};
+
+/**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+const adapt = function(delta, numPoints, firstTime) {
+ let k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+};
+
+/**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+const decode = function(input) {
+ // Don't use UCS-2.
+ const output = [];
+ const inputLength = input.length;
+ let i = 0;
+ let n = initialN;
+ let bias = initialBias;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ let basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (let j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ let oldi = i;
+ for (let w = 1, k = base; /* no condition */; k += base) {
+
+ if (index >= inputLength) {
+ error('invalid-input');
+ }
+
+ const digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error('overflow');
+ }
+
+ i += digit * w;
+ const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+
+ if (digit < t) {
+ break;
+ }
+
+ const baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error('overflow');
+ }
+
+ w *= baseMinusT;
+
+ }
+
+ const out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output.
+ output.splice(i++, 0, n);
+
+ }
+
+ return String.fromCodePoint(...output);
+};
+
+/**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+const encode = function(input) {
+ const output = [];
+
+ // Convert the input in UCS-2 to an array of Unicode code points.
+ input = ucs2decode(input);
+
+ // Cache the length.
+ let inputLength = input.length;
+
+ // Initialize the state.
+ let n = initialN;
+ let delta = 0;
+ let bias = initialBias;
+
+ // Handle the basic code points.
+ for (const currentValue of input) {
+ if (currentValue < 0x80) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+
+ let basicLength = output.length;
+ let handledCPCount = basicLength;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string with a delimiter unless it's empty.
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ let m = maxInt;
+ for (const currentValue of input) {
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow.
+ const handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ for (const currentValue of input) {
+ if (currentValue < n && ++delta > maxInt) {
+ error('overflow');
+ }
+ if (currentValue == n) {
+ // Represent delta as a generalized variable-length integer.
+ let q = delta;
+ for (let k = base; /* no condition */; k += base) {
+ const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
+ if (q < t) {
+ break;
+ }
+ const qMinusT = q - t;
+ const baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+
+ ++delta;
+ ++n;
+
+ }
+ return output.join('');
+};
+
+/**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+const toUnicode = function(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string)
+ ? decode(string.slice(4).toLowerCase())
+ : string;
+ });
+};
+
+/**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+const toASCII = function(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string)
+ ? 'xn--' + encode(string)
+ : string;
+ });
+};
+
+/*--------------------------------------------------------------------------*/
+
+/** Define the public API */
+const punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '2.1.0',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+};
+
+module.exports = punycode;
diff --git a/node_modules/qs/.editorconfig b/node_modules/qs/.editorconfig
new file mode 100644
index 0000000..b2654e7
--- /dev/null
+++ b/node_modules/qs/.editorconfig
@@ -0,0 +1,30 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+max_line_length = 140
+
+[test/*]
+max_line_length = off
+
+[*.md]
+max_line_length = off
+
+[*.json]
+max_line_length = off
+
+[Makefile]
+max_line_length = off
+
+[CHANGELOG.md]
+indent_style = space
+indent_size = 2
+
+[LICENSE]
+indent_size = 2
+max_line_length = off
diff --git a/node_modules/qs/.eslintignore b/node_modules/qs/.eslintignore
new file mode 100644
index 0000000..1521c8b
--- /dev/null
+++ b/node_modules/qs/.eslintignore
@@ -0,0 +1 @@
+dist
diff --git a/node_modules/qs/.eslintrc b/node_modules/qs/.eslintrc
new file mode 100644
index 0000000..b7a87b9
--- /dev/null
+++ b/node_modules/qs/.eslintrc
@@ -0,0 +1,19 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "complexity": 0,
+ "consistent-return": 1,
+ "func-name-matching": 0,
+ "id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
+ "indent": [2, 4],
+ "max-params": [2, 12],
+ "max-statements": [2, 45],
+ "no-continue": 1,
+ "no-magic-numbers": 0,
+ "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
+ "operator-linebreak": [2, "before"],
+ }
+}
diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md
new file mode 100644
index 0000000..fe52320
--- /dev/null
+++ b/node_modules/qs/CHANGELOG.md
@@ -0,0 +1,226 @@
+## **6.5.2**
+- [Fix] use `safer-buffer` instead of `Buffer` constructor
+- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230)
+- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify`
+
+## **6.5.1**
+- [Fix] Fix parsing & compacting very deep objects (#224)
+- [Refactor] name utils functions
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
+- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node
+- [Tests] Use precise dist for Node.js 0.6 runtime (#225)
+- [Tests] make 0.6 required, now that it’s passing
+- [Tests] on `node` `v8.2`; fix npm on node 0.6
+
+## **6.5.0**
+- [New] add `utils.assign`
+- [New] pass default encoder/decoder to custom encoder/decoder functions (#206)
+- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213)
+- [Fix] Handle stringifying empty objects with addQueryPrefix (#217)
+- [Fix] do not mutate `options` argument (#207)
+- [Refactor] `parse`: cache index to reuse in else statement (#182)
+- [Docs] add various badges to readme (#208)
+- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape`
+- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4
+- [Tests] add `editorconfig-tools`
+
+## **6.4.0**
+- [New] `qs.stringify`: add `encodeValuesOnly` option
+- [Fix] follow `allowPrototypes` option during merge (#201, #201)
+- [Fix] support keys starting with brackets (#202, #200)
+- [Fix] chmod a-x
+- [Dev Deps] update `eslint`
+- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
+- [eslint] reduce warnings
+
+## **6.3.2**
+- [Fix] follow `allowPrototypes` option during merge (#201, #200)
+- [Dev Deps] update `eslint`
+- [Fix] chmod a-x
+- [Fix] support keys starting with brackets (#202, #200)
+- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
+
+## **6.3.1**
+- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape`
+- [Tests] on all node minors; improve test matrix
+- [Docs] document stringify option `allowDots` (#195)
+- [Docs] add empty object and array values example (#195)
+- [Docs] Fix minor inconsistency/typo (#192)
+- [Docs] document stringify option `sort` (#191)
+- [Refactor] `stringify`: throw faster with an invalid encoder
+- [Refactor] remove unnecessary escapes (#184)
+- Remove contributing.md, since `qs` is no longer part of `hapi` (#183)
+
+## **6.3.0**
+- [New] Add support for RFC 1738 (#174, #173)
+- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159)
+- [Fix] ensure `utils.merge` handles merging two arrays
+- [Refactor] only constructors should be capitalized
+- [Refactor] capitalized var names are for constructors only
+- [Refactor] avoid using a sparse array
+- [Robustness] `formats`: cache `String#replace`
+- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest`
+- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix
+- [Tests] flesh out arrayLimit/arrayFormat tests (#107)
+- [Tests] skip Object.create tests when null objects are not available
+- [Tests] Turn on eslint for test files (#175)
+
+## **6.2.3**
+- [Fix] follow `allowPrototypes` option during merge (#201, #200)
+- [Fix] chmod a-x
+- [Fix] support keys starting with brackets (#202, #200)
+- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
+
+## **6.2.2**
+- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
+
+## **6.2.1**
+- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
+- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
+- [Tests] remove `parallelshell` since it does not reliably report failures
+- [Tests] up to `node` `v6.3`, `v5.12`
+- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv`
+
+## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
+- [New] pass Buffers to the encoder/decoder directly (#161)
+- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
+- [Fix] fix compacting of nested sparse arrays (#150)
+
+## **6.1.2
+- [Fix] follow `allowPrototypes` option during merge (#201, #200)
+- [Fix] chmod a-x
+- [Fix] support keys starting with brackets (#202, #200)
+- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
+
+## **6.1.1**
+- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
+
+## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
+- [New] allowDots option for `stringify` (#151)
+- [Fix] "sort" option should work at a depth of 3 or more (#151)
+- [Fix] Restore `dist` directory; will be removed in v7 (#148)
+
+## **6.0.4**
+- [Fix] follow `allowPrototypes` option during merge (#201, #200)
+- [Fix] chmod a-x
+- [Fix] support keys starting with brackets (#202, #200)
+- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
+
+## **6.0.3**
+- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
+- [Fix] Restore `dist` directory; will be removed in v7 (#148)
+
+## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
+- Revert ES6 requirement and restore support for node down to v0.8.
+
+## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
+- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
+
+## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
+- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
+
+## **5.2.1**
+- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
+
+## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
+- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
+
+## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
+- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
+- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
+
+## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
+- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
+- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
+
+## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
+- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
+
+## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
+- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
+
+## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
+- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
+- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
+- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
+- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
+- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
+- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
+- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
+- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
+- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
+- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
+
+## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
+- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #<Object> is not a function
+
+## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed)
+- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option
+
+## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed)
+- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57
+- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader
+
+## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed)
+- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object
+
+## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed)
+- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
+
+## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed)
+- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46
+
+## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed)
+- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer?
+- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45
+- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39
+
+## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed)
+- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number
+
+## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed)
+- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array
+- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x
+
+## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed)
+- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value
+- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
+- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver?
+
+## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed)
+- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31
+- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects
+
+## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed)
+- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present
+- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays
+- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
+- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters?
+
+## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed)
+- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter
+
+## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed)
+- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit?
+- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit
+- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20
+
+## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed)
+- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values
+
+## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed)
+- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters
+- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block
+
+## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed)
+- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument
+- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
+
+## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed)
+- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted
+- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null
+- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README
+
+## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed)
+- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index
diff --git a/node_modules/qs/LICENSE b/node_modules/qs/LICENSE
new file mode 100644
index 0000000..d456948
--- /dev/null
+++ b/node_modules/qs/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2014 Nathan LaFreniere and other contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
diff --git a/node_modules/qs/README.md b/node_modules/qs/README.md
new file mode 100644
index 0000000..d811966
--- /dev/null
+++ b/node_modules/qs/README.md
@@ -0,0 +1,475 @@
+# qs <sup>[![Version Badge][2]][1]</sup>
+
+[![Build Status][3]][4]
+[![dependency status][5]][6]
+[![dev dependency status][7]][8]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][11]][1]
+
+A querystring parsing and stringifying library with some added security.
+
+Lead Maintainer: [Jordan Harband](https://github.com/ljharb)
+
+The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring).
+
+## Usage
+
+```javascript
+var qs = require('qs');
+var assert = require('assert');
+
+var obj = qs.parse('a=c');
+assert.deepEqual(obj, { a: 'c' });
+
+var str = qs.stringify(obj);
+assert.equal(str, 'a=c');
+```
+
+### Parsing Objects
+
+[](#preventEval)
+```javascript
+qs.parse(string, [options]);
+```
+
+**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`.
+For example, the string `'foo[bar]=baz'` converts to:
+
+```javascript
+assert.deepEqual(qs.parse('foo[bar]=baz'), {
+ foo: {
+ bar: 'baz'
+ }
+});
+```
+
+When using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like:
+
+```javascript
+var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true });
+assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } });
+```
+
+By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.
+
+```javascript
+var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true });
+assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } });
+```
+
+URI encoded strings work too:
+
+```javascript
+assert.deepEqual(qs.parse('a%5Bb%5D=c'), {
+ a: { b: 'c' }
+});
+```
+
+You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`:
+
+```javascript
+assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), {
+ foo: {
+ bar: {
+ baz: 'foobarbaz'
+ }
+ }
+});
+```
+
+By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like
+`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be:
+
+```javascript
+var expected = {
+ a: {
+ b: {
+ c: {
+ d: {
+ e: {
+ f: {
+ '[g][h][i]': 'j'
+ }
+ }
+ }
+ }
+ }
+ }
+};
+var string = 'a[b][c][d][e][f][g][h][i]=j';
+assert.deepEqual(qs.parse(string), expected);
+```
+
+This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`:
+
+```javascript
+var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 });
+assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } });
+```
+
+The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number.
+
+For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option:
+
+```javascript
+var limited = qs.parse('a=b&c=d', { parameterLimit: 1 });
+assert.deepEqual(limited, { a: 'b' });
+```
+
+To bypass the leading question mark, use `ignoreQueryPrefix`:
+
+```javascript
+var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true });
+assert.deepEqual(prefixed, { a: 'b', c: 'd' });
+```
+
+An optional delimiter can also be passed:
+
+```javascript
+var delimited = qs.parse('a=b;c=d', { delimiter: ';' });
+assert.deepEqual(delimited, { a: 'b', c: 'd' });
+```
+
+Delimiters can be a regular expression too:
+
+```javascript
+var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ });
+assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' });
+```
+
+Option `allowDots` can be used to enable dot notation:
+
+```javascript
+var withDots = qs.parse('a.b=c', { allowDots: true });
+assert.deepEqual(withDots, { a: { b: 'c' } });
+```
+
+### Parsing Arrays
+
+**qs** can also parse arrays using a similar `[]` notation:
+
+```javascript
+var withArray = qs.parse('a[]=b&a[]=c');
+assert.deepEqual(withArray, { a: ['b', 'c'] });
+```
+
+You may specify an index as well:
+
+```javascript
+var withIndexes = qs.parse('a[1]=c&a[0]=b');
+assert.deepEqual(withIndexes, { a: ['b', 'c'] });
+```
+
+Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number
+to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving
+their order:
+
+```javascript
+var noSparse = qs.parse('a[1]=b&a[15]=c');
+assert.deepEqual(noSparse, { a: ['b', 'c'] });
+```
+
+Note that an empty string is also a value, and will be preserved:
+
+```javascript
+var withEmptyString = qs.parse('a[]=&a[]=b');
+assert.deepEqual(withEmptyString, { a: ['', 'b'] });
+
+var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');
+assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
+```
+
+**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
+instead be converted to an object with the index as the key:
+
+```javascript
+var withMaxIndex = qs.parse('a[100]=b');
+assert.deepEqual(withMaxIndex, { a: { '100': 'b' } });
+```
+
+This limit can be overridden by passing an `arrayLimit` option:
+
+```javascript
+var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 });
+assert.deepEqual(withArrayLimit, { a: { '1': 'b' } });
+```
+
+To disable array parsing entirely, set `parseArrays` to `false`.
+
+```javascript
+var noParsingArrays = qs.parse('a[]=b', { parseArrays: false });
+assert.deepEqual(noParsingArrays, { a: { '0': 'b' } });
+```
+
+If you mix notations, **qs** will merge the two items into an object:
+
+```javascript
+var mixedNotation = qs.parse('a[0]=b&a[b]=c');
+assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } });
+```
+
+You can also create arrays of objects:
+
+```javascript
+var arraysOfObjects = qs.parse('a[][b]=c');
+assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] });
+```
+
+### Stringifying
+
+[](#preventEval)
+```javascript
+qs.stringify(object, [options]);
+```
+
+When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect:
+
+```javascript
+assert.equal(qs.stringify({ a: 'b' }), 'a=b');
+assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
+```
+
+This encoding can be disabled by setting the `encode` option to `false`:
+
+```javascript
+var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });
+assert.equal(unencoded, 'a[b]=c');
+```
+
+Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`:
+```javascript
+var encodedValues = qs.stringify(
+ { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
+ { encodeValuesOnly: true }
+);
+assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h');
+```
+
+This encoding can also be replaced by a custom encoding method set as `encoder` option:
+
+```javascript
+var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
+ // Passed in values `a`, `b`, `c`
+ return // Return encoded string
+}})
+```
+
+_(Note: the `encoder` option does not apply if `encode` is `false`)_
+
+Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:
+
+```javascript
+var decoded = qs.parse('x=z', { decoder: function (str) {
+ // Passed in values `x`, `z`
+ return // Return decoded string
+}})
+```
+
+Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
+
+When arrays are stringified, by default they are given explicit indices:
+
+```javascript
+qs.stringify({ a: ['b', 'c', 'd'] });
+// 'a[0]=b&a[1]=c&a[2]=d'
+```
+
+You may override this by setting the `indices` option to `false`:
+
+```javascript
+qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
+// 'a=b&a=c&a=d'
+```
+
+You may use the `arrayFormat` option to specify the format of the output array:
+
+```javascript
+qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })
+// 'a[0]=b&a[1]=c'
+qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })
+// 'a[]=b&a[]=c'
+qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })
+// 'a=b&a=c'
+```
+
+When objects are stringified, by default they use bracket notation:
+
+```javascript
+qs.stringify({ a: { b: { c: 'd', e: 'f' } } });
+// 'a[b][c]=d&a[b][e]=f'
+```
+
+You may override this to use dot notation by setting the `allowDots` option to `true`:
+
+```javascript
+qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true });
+// 'a.b.c=d&a.b.e=f'
+```
+
+Empty strings and null values will omit the value, but the equals sign (=) remains in place:
+
+```javascript
+assert.equal(qs.stringify({ a: '' }), 'a=');
+```
+
+Key with no values (such as an empty object or array) will return nothing:
+
+```javascript
+assert.equal(qs.stringify({ a: [] }), '');
+assert.equal(qs.stringify({ a: {} }), '');
+assert.equal(qs.stringify({ a: [{}] }), '');
+assert.equal(qs.stringify({ a: { b: []} }), '');
+assert.equal(qs.stringify({ a: { b: {}} }), '');
+```
+
+Properties that are set to `undefined` will be omitted entirely:
+
+```javascript
+assert.equal(qs.stringify({ a: null, b: undefined }), 'a=');
+```
+
+The query string may optionally be prepended with a question mark:
+
+```javascript
+assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');
+```
+
+The delimiter may be overridden with stringify as well:
+
+```javascript
+assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
+```
+
+If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option:
+
+```javascript
+var date = new Date(7);
+assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A'));
+assert.equal(
+ qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }),
+ 'a=7'
+);
+```
+
+You may use the `sort` option to affect the order of parameter keys:
+
+```javascript
+function alphabeticalSort(a, b) {
+ return a.localeCompare(b);
+}
+assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y');
+```
+
+Finally, you can use the `filter` option to restrict which keys will be included in the stringified output.
+If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you
+pass an array, it will be used to select properties and array indices for stringification:
+
+```javascript
+function filterFunc(prefix, value) {
+ if (prefix == 'b') {
+ // Return an `undefined` value to omit a property.
+ return;
+ }
+ if (prefix == 'e[f]') {
+ return value.getTime();
+ }
+ if (prefix == 'e[g][0]') {
+ return value * 2;
+ }
+ return value;
+}
+qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc });
+// 'a=b&c=d&e[f]=123&e[g][0]=4'
+qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] });
+// 'a=b&e=f'
+qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] });
+// 'a[0]=b&a[2]=d'
+```
+
+### Handling of `null` values
+
+By default, `null` values are treated like empty strings:
+
+```javascript
+var withNull = qs.stringify({ a: null, b: '' });
+assert.equal(withNull, 'a=&b=');
+```
+
+Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings.
+
+```javascript
+var equalsInsensitive = qs.parse('a&b=');
+assert.deepEqual(equalsInsensitive, { a: '', b: '' });
+```
+
+To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null`
+values have no `=` sign:
+
+```javascript
+var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true });
+assert.equal(strictNull, 'a&b=');
+```
+
+To parse values without `=` back to `null` use the `strictNullHandling` flag:
+
+```javascript
+var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true });
+assert.deepEqual(parsedStrictNull, { a: null, b: '' });
+```
+
+To completely skip rendering keys with `null` values, use the `skipNulls` flag:
+
+```javascript
+var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });
+assert.equal(nullsSkipped, 'a=b');
+```
+
+### Dealing with special character sets
+
+By default the encoding and decoding of characters is done in `utf-8`. If you
+wish to encode querystrings to a different character set (i.e.
+[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the
+[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:
+
+```javascript
+var encoder = require('qs-iconv/encoder')('shift_jis');
+var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });
+assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');
+```
+
+This also works for decoding of query strings:
+
+```javascript
+var decoder = require('qs-iconv/decoder')('shift_jis');
+var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
+assert.deepEqual(obj, { a: 'こんにちは!' });
+```
+
+### RFC 3986 and RFC 1738 space encoding
+
+RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible.
+In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'.
+
+```
+assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
+assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c');
+assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c');
+```
+
+[1]: https://npmjs.org/package/qs
+[2]: http://versionbadg.es/ljharb/qs.svg
+[3]: https://api.travis-ci.org/ljharb/qs.svg
+[4]: https://travis-ci.org/ljharb/qs
+[5]: https://david-dm.org/ljharb/qs.svg
+[6]: https://david-dm.org/ljharb/qs
+[7]: https://david-dm.org/ljharb/qs/dev-status.svg
+[8]: https://david-dm.org/ljharb/qs?type=dev
+[9]: https://ci.testling.com/ljharb/qs.png
+[10]: https://ci.testling.com/ljharb/qs
+[11]: https://nodei.co/npm/qs.png?downloads=true&stars=true
+[license-image]: http://img.shields.io/npm/l/qs.svg
+[license-url]: LICENSE
+[downloads-image]: http://img.shields.io/npm/dm/qs.svg
+[downloads-url]: http://npm-stat.com/charts.html?package=qs
diff --git a/node_modules/qs/dist/qs.js b/node_modules/qs/dist/qs.js
new file mode 100644
index 0000000..ecf7ba4
--- /dev/null
+++ b/node_modules/qs/dist/qs.js
@@ -0,0 +1,638 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
+'use strict';
+
+var replace = String.prototype.replace;
+var percentTwenties = /%20/g;
+
+module.exports = {
+ 'default': 'RFC3986',
+ formatters: {
+ RFC1738: function (value) {
+ return replace.call(value, percentTwenties, '+');
+ },
+ RFC3986: function (value) {
+ return value;
+ }
+ },
+ RFC1738: 'RFC1738',
+ RFC3986: 'RFC3986'
+};
+
+},{}],2:[function(require,module,exports){
+'use strict';
+
+var stringify = require('./stringify');
+var parse = require('./parse');
+var formats = require('./formats');
+
+module.exports = {
+ formats: formats,
+ parse: parse,
+ stringify: stringify
+};
+
+},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(require,module,exports){
+'use strict';
+
+var utils = require('./utils');
+
+var has = Object.prototype.hasOwnProperty;
+
+var defaults = {
+ allowDots: false,
+ allowPrototypes: false,
+ arrayLimit: 20,
+ decoder: utils.decode,
+ delimiter: '&',
+ depth: 5,
+ parameterLimit: 1000,
+ plainObjects: false,
+ strictNullHandling: false
+};
+
+var parseValues = function parseQueryStringValues(str, options) {
+ var obj = {};
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
+ var parts = cleanStr.split(options.delimiter, limit);
+
+ for (var i = 0; i < parts.length; ++i) {
+ var part = parts[i];
+
+ var bracketEqualsPos = part.indexOf(']=');
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
+
+ var key, val;
+ if (pos === -1) {
+ key = options.decoder(part, defaults.decoder);
+ val = options.strictNullHandling ? null : '';
+ } else {
+ key = options.decoder(part.slice(0, pos), defaults.decoder);
+ val = options.decoder(part.slice(pos + 1), defaults.decoder);
+ }
+ if (has.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
+ }
+ }
+
+ return obj;
+};
+
+var parseObject = function (chain, val, options) {
+ var leaf = val;
+
+ for (var i = chain.length - 1; i >= 0; --i) {
+ var obj;
+ var root = chain[i];
+
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(leaf);
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index)
+ && root !== cleanRoot
+ && String(index) === cleanRoot
+ && index >= 0
+ && (options.parseArrays && index <= options.arrayLimit)
+ ) {
+ obj = [];
+ obj[index] = leaf;
+ } else {
+ obj[cleanRoot] = leaf;
+ }
+ }
+
+ leaf = obj;
+ }
+
+ return leaf;
+};
+
+var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
+ if (!givenKey) {
+ return;
+ }
+
+ // Transform dot notation to bracket notation
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
+
+ // The regex chunks
+
+ var brackets = /(\[[^[\]]*])/;
+ var child = /(\[[^[\]]*])/g;
+
+ // Get the parent
+
+ var segment = brackets.exec(key);
+ var parent = segment ? key.slice(0, segment.index) : key;
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (parent) {
+ // If we aren't using plain objects, optionally prefix keys
+ // that would overwrite object prototype properties
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+
+ keys.push(parent);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+ i += 1;
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+ keys.push(segment[1]);
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return parseObject(keys, val, options);
+};
+
+module.exports = function (str, opts) {
+ var options = opts ? utils.assign({}, opts) : {};
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
+ options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
+ options.parseArrays = options.parseArrays !== false;
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
+ return options.plainObjects ? Object.create(null) : {};
+ }
+
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
+ var obj = options.plainObjects ? Object.create(null) : {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var newObj = parseKeys(key, tempObj[key], options);
+ obj = utils.merge(obj, newObj, options);
+ }
+
+ return utils.compact(obj);
+};
+
+},{"./utils":5}],4:[function(require,module,exports){
+'use strict';
+
+var utils = require('./utils');
+var formats = require('./formats');
+
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
+ return prefix + '[' + key + ']';
+ },
+ repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
+ return prefix;
+ }
+};
+
+var toISO = Date.prototype.toISOString;
+
+var defaults = {
+ delimiter: '&',
+ encode: true,
+ encoder: utils.encode,
+ encodeValuesOnly: false,
+ serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
+ return toISO.call(date);
+ },
+ skipNulls: false,
+ strictNullHandling: false
+};
+
+var stringify = function stringify( // eslint-disable-line func-name-matching
+ object,
+ prefix,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+) {
+ var obj = object;
+ if (typeof filter === 'function') {
+ obj = filter(prefix, obj);
+ } else if (obj instanceof Date) {
+ obj = serializeDate(obj);
+ } else if (obj === null) {
+ if (strictNullHandling) {
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
+ }
+
+ obj = '';
+ }
+
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
+ if (encoder) {
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
+ }
+ return [formatter(prefix) + '=' + formatter(String(obj))];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys;
+ if (Array.isArray(filter)) {
+ objKeys = filter;
+ } else {
+ var keys = Object.keys(obj);
+ objKeys = sort ? keys.sort(sort) : keys;
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ if (Array.isArray(obj)) {
+ values = values.concat(stringify(
+ obj[key],
+ generateArrayPrefix(prefix, key),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+ ));
+ } else {
+ values = values.concat(stringify(
+ obj[key],
+ prefix + (allowDots ? '.' + key : '[' + key + ']'),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+ ));
+ }
+ }
+
+ return values;
+};
+
+module.exports = function (object, opts) {
+ var obj = object;
+ var options = opts ? utils.assign({}, opts) : {};
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
+ var sort = typeof options.sort === 'function' ? options.sort : null;
+ var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
+ var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
+ if (typeof options.format === 'undefined') {
+ options.format = formats['default'];
+ } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
+ throw new TypeError('Unknown format option provided.');
+ }
+ var formatter = formats.formatters[options.format];
+ var objKeys;
+ var filter;
+
+ if (typeof options.filter === 'function') {
+ filter = options.filter;
+ obj = filter('', obj);
+ } else if (Array.isArray(options.filter)) {
+ filter = options.filter;
+ objKeys = filter;
+ }
+
+ var keys = [];
+
+ if (typeof obj !== 'object' || obj === null) {
+ return '';
+ }
+
+ var arrayFormat;
+ if (options.arrayFormat in arrayPrefixGenerators) {
+ arrayFormat = options.arrayFormat;
+ } else if ('indices' in options) {
+ arrayFormat = options.indices ? 'indices' : 'repeat';
+ } else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
+
+ if (!objKeys) {
+ objKeys = Object.keys(obj);
+ }
+
+ if (sort) {
+ objKeys.sort(sort);
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ keys = keys.concat(stringify(
+ obj[key],
+ key,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encode ? encoder : null,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+ ));
+ }
+
+ var joined = keys.join(delimiter);
+ var prefix = options.addQueryPrefix === true ? '?' : '';
+
+ return joined.length > 0 ? prefix + joined : '';
+};
+
+},{"./formats":1,"./utils":5}],5:[function(require,module,exports){
+'use strict';
+
+var has = Object.prototype.hasOwnProperty;
+
+var hexTable = (function () {
+ var array = [];
+ for (var i = 0; i < 256; ++i) {
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
+ }
+
+ return array;
+}());
+
+var compactQueue = function compactQueue(queue) {
+ var obj;
+
+ while (queue.length) {
+ var item = queue.pop();
+ obj = item.obj[item.prop];
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var j = 0; j < obj.length; ++j) {
+ if (typeof obj[j] !== 'undefined') {
+ compacted.push(obj[j]);
+ }
+ }
+
+ item.obj[item.prop] = compacted;
+ }
+ }
+
+ return obj;
+};
+
+var arrayToObject = function arrayToObject(source, options) {
+ var obj = options && options.plainObjects ? Object.create(null) : {};
+ for (var i = 0; i < source.length; ++i) {
+ if (typeof source[i] !== 'undefined') {
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+var merge = function merge(target, source, options) {
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ } else if (typeof target === 'object') {
+ if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
+ target[source] = true;
+ }
+ } else {
+ return [target, source];
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ return [target].concat(source);
+ }
+
+ var mergeTarget = target;
+ if (Array.isArray(target) && !Array.isArray(source)) {
+ mergeTarget = arrayToObject(target, options);
+ }
+
+ if (Array.isArray(target) && Array.isArray(source)) {
+ source.forEach(function (item, i) {
+ if (has.call(target, i)) {
+ if (target[i] && typeof target[i] === 'object') {
+ target[i] = merge(target[i], item, options);
+ } else {
+ target.push(item);
+ }
+ } else {
+ target[i] = item;
+ }
+ });
+ return target;
+ }
+
+ return Object.keys(source).reduce(function (acc, key) {
+ var value = source[key];
+
+ if (has.call(acc, key)) {
+ acc[key] = merge(acc[key], value, options);
+ } else {
+ acc[key] = value;
+ }
+ return acc;
+ }, mergeTarget);
+};
+
+var assign = function assignSingleSource(target, source) {
+ return Object.keys(source).reduce(function (acc, key) {
+ acc[key] = source[key];
+ return acc;
+ }, target);
+};
+
+var decode = function (str) {
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+var encode = function encode(str) {
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
+ // It has been adapted here for stricter adherence to RFC 3986
+ if (str.length === 0) {
+ return str;
+ }
+
+ var string = typeof str === 'string' ? str : String(str);
+
+ var out = '';
+ for (var i = 0; i < string.length; ++i) {
+ var c = string.charCodeAt(i);
+
+ if (
+ c === 0x2D // -
+ || c === 0x2E // .
+ || c === 0x5F // _
+ || c === 0x7E // ~
+ || (c >= 0x30 && c <= 0x39) // 0-9
+ || (c >= 0x41 && c <= 0x5A) // a-z
+ || (c >= 0x61 && c <= 0x7A) // A-Z
+ ) {
+ out += string.charAt(i);
+ continue;
+ }
+
+ if (c < 0x80) {
+ out = out + hexTable[c];
+ continue;
+ }
+
+ if (c < 0x800) {
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ if (c < 0xD800 || c >= 0xE000) {
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ i += 1;
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
+ out += hexTable[0xF0 | (c >> 18)]
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
+ + hexTable[0x80 | (c & 0x3F)];
+ }
+
+ return out;
+};
+
+var compact = function compact(value) {
+ var queue = [{ obj: { o: value }, prop: 'o' }];
+ var refs = [];
+
+ for (var i = 0; i < queue.length; ++i) {
+ var item = queue[i];
+ var obj = item.obj[item.prop];
+
+ var keys = Object.keys(obj);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ var val = obj[key];
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
+ queue.push({ obj: obj, prop: key });
+ refs.push(val);
+ }
+ }
+ }
+
+ return compactQueue(queue);
+};
+
+var isRegExp = function isRegExp(obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+var isBuffer = function isBuffer(obj) {
+ if (obj === null || typeof obj === 'undefined') {
+ return false;
+ }
+
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
+};
+
+module.exports = {
+ arrayToObject: arrayToObject,
+ assign: assign,
+ compact: compact,
+ decode: decode,
+ encode: encode,
+ isBuffer: isBuffer,
+ isRegExp: isRegExp,
+ merge: merge
+};
+
+},{}]},{},[2])(2)
+});
diff --git a/node_modules/qs/lib/formats.js b/node_modules/qs/lib/formats.js
new file mode 100644
index 0000000..df45997
--- /dev/null
+++ b/node_modules/qs/lib/formats.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var replace = String.prototype.replace;
+var percentTwenties = /%20/g;
+
+module.exports = {
+ 'default': 'RFC3986',
+ formatters: {
+ RFC1738: function (value) {
+ return replace.call(value, percentTwenties, '+');
+ },
+ RFC3986: function (value) {
+ return value;
+ }
+ },
+ RFC1738: 'RFC1738',
+ RFC3986: 'RFC3986'
+};
diff --git a/node_modules/qs/lib/index.js b/node_modules/qs/lib/index.js
new file mode 100644
index 0000000..0d6a97d
--- /dev/null
+++ b/node_modules/qs/lib/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var stringify = require('./stringify');
+var parse = require('./parse');
+var formats = require('./formats');
+
+module.exports = {
+ formats: formats,
+ parse: parse,
+ stringify: stringify
+};
diff --git a/node_modules/qs/lib/parse.js b/node_modules/qs/lib/parse.js
new file mode 100644
index 0000000..8c9872e
--- /dev/null
+++ b/node_modules/qs/lib/parse.js
@@ -0,0 +1,174 @@
+'use strict';
+
+var utils = require('./utils');
+
+var has = Object.prototype.hasOwnProperty;
+
+var defaults = {
+ allowDots: false,
+ allowPrototypes: false,
+ arrayLimit: 20,
+ decoder: utils.decode,
+ delimiter: '&',
+ depth: 5,
+ parameterLimit: 1000,
+ plainObjects: false,
+ strictNullHandling: false
+};
+
+var parseValues = function parseQueryStringValues(str, options) {
+ var obj = {};
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
+ var parts = cleanStr.split(options.delimiter, limit);
+
+ for (var i = 0; i < parts.length; ++i) {
+ var part = parts[i];
+
+ var bracketEqualsPos = part.indexOf(']=');
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
+
+ var key, val;
+ if (pos === -1) {
+ key = options.decoder(part, defaults.decoder);
+ val = options.strictNullHandling ? null : '';
+ } else {
+ key = options.decoder(part.slice(0, pos), defaults.decoder);
+ val = options.decoder(part.slice(pos + 1), defaults.decoder);
+ }
+ if (has.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
+ }
+ }
+
+ return obj;
+};
+
+var parseObject = function (chain, val, options) {
+ var leaf = val;
+
+ for (var i = chain.length - 1; i >= 0; --i) {
+ var obj;
+ var root = chain[i];
+
+ if (root === '[]') {
+ obj = [];
+ obj = obj.concat(leaf);
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (
+ !isNaN(index)
+ && root !== cleanRoot
+ && String(index) === cleanRoot
+ && index >= 0
+ && (options.parseArrays && index <= options.arrayLimit)
+ ) {
+ obj = [];
+ obj[index] = leaf;
+ } else {
+ obj[cleanRoot] = leaf;
+ }
+ }
+
+ leaf = obj;
+ }
+
+ return leaf;
+};
+
+var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
+ if (!givenKey) {
+ return;
+ }
+
+ // Transform dot notation to bracket notation
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
+
+ // The regex chunks
+
+ var brackets = /(\[[^[\]]*])/;
+ var child = /(\[[^[\]]*])/g;
+
+ // Get the parent
+
+ var segment = brackets.exec(key);
+ var parent = segment ? key.slice(0, segment.index) : key;
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (parent) {
+ // If we aren't using plain objects, optionally prefix keys
+ // that would overwrite object prototype properties
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+
+ keys.push(parent);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while ((segment = child.exec(key)) !== null && i < options.depth) {
+ i += 1;
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+ keys.push(segment[1]);
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return parseObject(keys, val, options);
+};
+
+module.exports = function (str, opts) {
+ var options = opts ? utils.assign({}, opts) : {};
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
+ options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
+ options.parseArrays = options.parseArrays !== false;
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
+ return options.plainObjects ? Object.create(null) : {};
+ }
+
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
+ var obj = options.plainObjects ? Object.create(null) : {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var newObj = parseKeys(key, tempObj[key], options);
+ obj = utils.merge(obj, newObj, options);
+ }
+
+ return utils.compact(obj);
+};
diff --git a/node_modules/qs/lib/stringify.js b/node_modules/qs/lib/stringify.js
new file mode 100644
index 0000000..ab915ac
--- /dev/null
+++ b/node_modules/qs/lib/stringify.js
@@ -0,0 +1,210 @@
+'use strict';
+
+var utils = require('./utils');
+var formats = require('./formats');
+
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
+ return prefix + '[' + key + ']';
+ },
+ repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
+ return prefix;
+ }
+};
+
+var toISO = Date.prototype.toISOString;
+
+var defaults = {
+ delimiter: '&',
+ encode: true,
+ encoder: utils.encode,
+ encodeValuesOnly: false,
+ serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
+ return toISO.call(date);
+ },
+ skipNulls: false,
+ strictNullHandling: false
+};
+
+var stringify = function stringify( // eslint-disable-line func-name-matching
+ object,
+ prefix,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+) {
+ var obj = object;
+ if (typeof filter === 'function') {
+ obj = filter(prefix, obj);
+ } else if (obj instanceof Date) {
+ obj = serializeDate(obj);
+ } else if (obj === null) {
+ if (strictNullHandling) {
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
+ }
+
+ obj = '';
+ }
+
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
+ if (encoder) {
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
+ }
+ return [formatter(prefix) + '=' + formatter(String(obj))];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys;
+ if (Array.isArray(filter)) {
+ objKeys = filter;
+ } else {
+ var keys = Object.keys(obj);
+ objKeys = sort ? keys.sort(sort) : keys;
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ if (Array.isArray(obj)) {
+ values = values.concat(stringify(
+ obj[key],
+ generateArrayPrefix(prefix, key),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+ ));
+ } else {
+ values = values.concat(stringify(
+ obj[key],
+ prefix + (allowDots ? '.' + key : '[' + key + ']'),
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+ ));
+ }
+ }
+
+ return values;
+};
+
+module.exports = function (object, opts) {
+ var obj = object;
+ var options = opts ? utils.assign({}, opts) : {};
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
+ var sort = typeof options.sort === 'function' ? options.sort : null;
+ var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
+ var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
+ var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
+ if (typeof options.format === 'undefined') {
+ options.format = formats['default'];
+ } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
+ throw new TypeError('Unknown format option provided.');
+ }
+ var formatter = formats.formatters[options.format];
+ var objKeys;
+ var filter;
+
+ if (typeof options.filter === 'function') {
+ filter = options.filter;
+ obj = filter('', obj);
+ } else if (Array.isArray(options.filter)) {
+ filter = options.filter;
+ objKeys = filter;
+ }
+
+ var keys = [];
+
+ if (typeof obj !== 'object' || obj === null) {
+ return '';
+ }
+
+ var arrayFormat;
+ if (options.arrayFormat in arrayPrefixGenerators) {
+ arrayFormat = options.arrayFormat;
+ } else if ('indices' in options) {
+ arrayFormat = options.indices ? 'indices' : 'repeat';
+ } else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
+
+ if (!objKeys) {
+ objKeys = Object.keys(obj);
+ }
+
+ if (sort) {
+ objKeys.sort(sort);
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (skipNulls && obj[key] === null) {
+ continue;
+ }
+
+ keys = keys.concat(stringify(
+ obj[key],
+ key,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encode ? encoder : null,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ formatter,
+ encodeValuesOnly
+ ));
+ }
+
+ var joined = keys.join(delimiter);
+ var prefix = options.addQueryPrefix === true ? '?' : '';
+
+ return joined.length > 0 ? prefix + joined : '';
+};
diff --git a/node_modules/qs/lib/utils.js b/node_modules/qs/lib/utils.js
new file mode 100644
index 0000000..8775a32
--- /dev/null
+++ b/node_modules/qs/lib/utils.js
@@ -0,0 +1,213 @@
+'use strict';
+
+var has = Object.prototype.hasOwnProperty;
+
+var hexTable = (function () {
+ var array = [];
+ for (var i = 0; i < 256; ++i) {
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
+ }
+
+ return array;
+}());
+
+var compactQueue = function compactQueue(queue) {
+ var obj;
+
+ while (queue.length) {
+ var item = queue.pop();
+ obj = item.obj[item.prop];
+
+ if (Array.isArray(obj)) {
+ var compacted = [];
+
+ for (var j = 0; j < obj.length; ++j) {
+ if (typeof obj[j] !== 'undefined') {
+ compacted.push(obj[j]);
+ }
+ }
+
+ item.obj[item.prop] = compacted;
+ }
+ }
+
+ return obj;
+};
+
+var arrayToObject = function arrayToObject(source, options) {
+ var obj = options && options.plainObjects ? Object.create(null) : {};
+ for (var i = 0; i < source.length; ++i) {
+ if (typeof source[i] !== 'undefined') {
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+var merge = function merge(target, source, options) {
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (Array.isArray(target)) {
+ target.push(source);
+ } else if (typeof target === 'object') {
+ if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
+ target[source] = true;
+ }
+ } else {
+ return [target, source];
+ }
+
+ return target;
+ }
+
+ if (typeof target !== 'object') {
+ return [target].concat(source);
+ }
+
+ var mergeTarget = target;
+ if (Array.isArray(target) && !Array.isArray(source)) {
+ mergeTarget = arrayToObject(target, options);
+ }
+
+ if (Array.isArray(target) && Array.isArray(source)) {
+ source.forEach(function (item, i) {
+ if (has.call(target, i)) {
+ if (target[i] && typeof target[i] === 'object') {
+ target[i] = merge(target[i], item, options);
+ } else {
+ target.push(item);
+ }
+ } else {
+ target[i] = item;
+ }
+ });
+ return target;
+ }
+
+ return Object.keys(source).reduce(function (acc, key) {
+ var value = source[key];
+
+ if (has.call(acc, key)) {
+ acc[key] = merge(acc[key], value, options);
+ } else {
+ acc[key] = value;
+ }
+ return acc;
+ }, mergeTarget);
+};
+
+var assign = function assignSingleSource(target, source) {
+ return Object.keys(source).reduce(function (acc, key) {
+ acc[key] = source[key];
+ return acc;
+ }, target);
+};
+
+var decode = function (str) {
+ try {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ } catch (e) {
+ return str;
+ }
+};
+
+var encode = function encode(str) {
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
+ // It has been adapted here for stricter adherence to RFC 3986
+ if (str.length === 0) {
+ return str;
+ }
+
+ var string = typeof str === 'string' ? str : String(str);
+
+ var out = '';
+ for (var i = 0; i < string.length; ++i) {
+ var c = string.charCodeAt(i);
+
+ if (
+ c === 0x2D // -
+ || c === 0x2E // .
+ || c === 0x5F // _
+ || c === 0x7E // ~
+ || (c >= 0x30 && c <= 0x39) // 0-9
+ || (c >= 0x41 && c <= 0x5A) // a-z
+ || (c >= 0x61 && c <= 0x7A) // A-Z
+ ) {
+ out += string.charAt(i);
+ continue;
+ }
+
+ if (c < 0x80) {
+ out = out + hexTable[c];
+ continue;
+ }
+
+ if (c < 0x800) {
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ if (c < 0xD800 || c >= 0xE000) {
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ i += 1;
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
+ out += hexTable[0xF0 | (c >> 18)]
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
+ + hexTable[0x80 | (c & 0x3F)];
+ }
+
+ return out;
+};
+
+var compact = function compact(value) {
+ var queue = [{ obj: { o: value }, prop: 'o' }];
+ var refs = [];
+
+ for (var i = 0; i < queue.length; ++i) {
+ var item = queue[i];
+ var obj = item.obj[item.prop];
+
+ var keys = Object.keys(obj);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ var val = obj[key];
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
+ queue.push({ obj: obj, prop: key });
+ refs.push(val);
+ }
+ }
+ }
+
+ return compactQueue(queue);
+};
+
+var isRegExp = function isRegExp(obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+var isBuffer = function isBuffer(obj) {
+ if (obj === null || typeof obj === 'undefined') {
+ return false;
+ }
+
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
+};
+
+module.exports = {
+ arrayToObject: arrayToObject,
+ assign: assign,
+ compact: compact,
+ decode: decode,
+ encode: encode,
+ isBuffer: isBuffer,
+ isRegExp: isRegExp,
+ merge: merge
+};
diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json
new file mode 100644
index 0000000..2c65490
--- /dev/null
+++ b/node_modules/qs/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "qs",
+ "description": "A querystring parser that supports nesting and arrays, with a depth limit",
+ "homepage": "https://github.com/ljharb/qs",
+ "version": "6.5.2",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/ljharb/qs.git"
+ },
+ "main": "lib/index.js",
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ }
+ ],
+ "keywords": [
+ "querystring",
+ "qs"
+ ],
+ "engines": {
+ "node": ">=0.6"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "browserify": "^16.2.0",
+ "covert": "^1.1.0",
+ "editorconfig-tools": "^0.1.1",
+ "eslint": "^4.19.1",
+ "evalmd": "^0.0.17",
+ "iconv-lite": "^0.4.21",
+ "mkdirp": "^0.5.1",
+ "qs-iconv": "^1.0.4",
+ "safe-publish-latest": "^1.1.1",
+ "safer-buffer": "^2.1.2",
+ "tape": "^4.9.0"
+ },
+ "scripts": {
+ "prepublish": "safe-publish-latest && npm run dist",
+ "pretest": "npm run --silent readme && npm run --silent lint",
+ "test": "npm run --silent coverage",
+ "tests-only": "node test",
+ "readme": "evalmd README.md",
+ "prelint": "editorconfig-tools check * lib/* test/*",
+ "lint": "eslint lib/*.js test/*.js",
+ "coverage": "covert test",
+ "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"
+ },
+ "license": "BSD-3-Clause"
+}
diff --git a/node_modules/qs/test/.eslintrc b/node_modules/qs/test/.eslintrc
new file mode 100644
index 0000000..20175d6
--- /dev/null
+++ b/node_modules/qs/test/.eslintrc
@@ -0,0 +1,15 @@
+{
+ "rules": {
+ "array-bracket-newline": 0,
+ "array-element-newline": 0,
+ "consistent-return": 2,
+ "max-lines": 0,
+ "max-nested-callbacks": [2, 3],
+ "max-statements": 0,
+ "no-buffer-constructor": 0,
+ "no-extend-native": 0,
+ "no-magic-numbers": 0,
+ "object-curly-newline": 0,
+ "sort-keys": 0
+ }
+}
diff --git a/node_modules/qs/test/index.js b/node_modules/qs/test/index.js
new file mode 100644
index 0000000..5e6bc8f
--- /dev/null
+++ b/node_modules/qs/test/index.js
@@ -0,0 +1,7 @@
+'use strict';
+
+require('./parse');
+
+require('./stringify');
+
+require('./utils');
diff --git a/node_modules/qs/test/parse.js b/node_modules/qs/test/parse.js
new file mode 100644
index 0000000..0f8fe45
--- /dev/null
+++ b/node_modules/qs/test/parse.js
@@ -0,0 +1,574 @@
+'use strict';
+
+var test = require('tape');
+var qs = require('../');
+var utils = require('../lib/utils');
+var iconv = require('iconv-lite');
+var SaferBuffer = require('safer-buffer').Buffer;
+
+test('parse()', function (t) {
+ t.test('parses a simple string', function (st) {
+ st.deepEqual(qs.parse('0=foo'), { 0: 'foo' });
+ st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' });
+ st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } });
+ st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } });
+ st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } });
+ st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null });
+ st.deepEqual(qs.parse('foo'), { foo: '' });
+ st.deepEqual(qs.parse('foo='), { foo: '' });
+ st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' });
+ st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' });
+ st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' });
+ st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' });
+ st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' });
+ st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null });
+ st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' });
+ st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), {
+ cht: 'p3',
+ chd: 't:60,40',
+ chs: '250x100',
+ chl: 'Hello|World'
+ });
+ st.end();
+ });
+
+ t.test('allows enabling dot notation', function (st) {
+ st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' });
+ st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string');
+ t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string');
+ t.deepEqual(
+ qs.parse('a[b][c][d][e][f][g][h]=i'),
+ { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } },
+ 'defaults to a depth of 5'
+ );
+
+ t.test('only parses one level when depth = 1', function (st) {
+ st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } });
+ st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array');
+
+ t.test('parses an explicit array', function (st) {
+ st.deepEqual(qs.parse('a[]=b'), { a: ['b'] });
+ st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] });
+ st.end();
+ });
+
+ t.test('parses a mix of simple and explicit arrays', function (st) {
+ st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] });
+
+ st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] });
+
+ st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] });
+
+ st.end();
+ });
+
+ t.test('parses a nested array', function (st) {
+ st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } });
+ st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } });
+ st.end();
+ });
+
+ t.test('allows to specify array indices', function (st) {
+ st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] });
+ st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] });
+ st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] });
+ st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } });
+ st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] });
+ st.end();
+ });
+
+ t.test('limits specific array indices to arrayLimit', function (st) {
+ st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] });
+ st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } });
+ st.end();
+ });
+
+ t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number');
+
+ t.test('supports encoded = signs', function (st) {
+ st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' });
+ st.end();
+ });
+
+ t.test('is ok with url encoded strings', function (st) {
+ st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } });
+ st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } });
+ st.end();
+ });
+
+ t.test('allows brackets in the value', function (st) {
+ st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' });
+ st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' });
+ st.end();
+ });
+
+ t.test('allows empty values', function (st) {
+ st.deepEqual(qs.parse(''), {});
+ st.deepEqual(qs.parse(null), {});
+ st.deepEqual(qs.parse(undefined), {});
+ st.end();
+ });
+
+ t.test('transforms arrays to objects', function (st) {
+ st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } });
+ st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
+
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } });
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } });
+ st.end();
+ });
+
+ t.test('transforms arrays to objects (dot notation)', function (st) {
+ st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } });
+ st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } });
+ st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] });
+ st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } });
+ st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } });
+ st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } });
+ st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
+ st.end();
+ });
+
+ t.test('correctly prunes undefined values when converting an array to an object', function (st) {
+ st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } });
+ st.end();
+ });
+
+ t.test('supports malformed uri characters', function (st) {
+ st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null });
+ st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' });
+ st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' });
+ st.end();
+ });
+
+ t.test('doesn\'t produce empty keys', function (st) {
+ st.deepEqual(qs.parse('_r=1&'), { _r: '1' });
+ st.end();
+ });
+
+ t.test('cannot access Object prototype', function (st) {
+ qs.parse('constructor[prototype][bad]=bad');
+ qs.parse('bad[constructor][prototype][bad]=bad');
+ st.equal(typeof Object.prototype.bad, 'undefined');
+ st.end();
+ });
+
+ t.test('parses arrays of objects', function (st) {
+ st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
+ st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] });
+ st.end();
+ });
+
+ t.test('allows for empty strings in arrays', function (st) {
+ st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] });
+
+ st.deepEqual(
+ qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }),
+ { a: ['b', null, 'c', ''] },
+ 'with arrayLimit 20 + array indices: null then empty string works'
+ );
+ st.deepEqual(
+ qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }),
+ { a: ['b', null, 'c', ''] },
+ 'with arrayLimit 0 + array brackets: null then empty string works'
+ );
+
+ st.deepEqual(
+ qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }),
+ { a: ['b', '', 'c', null] },
+ 'with arrayLimit 20 + array indices: empty string then null works'
+ );
+ st.deepEqual(
+ qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }),
+ { a: ['b', '', 'c', null] },
+ 'with arrayLimit 0 + array brackets: empty string then null works'
+ );
+
+ st.deepEqual(
+ qs.parse('a[]=&a[]=b&a[]=c'),
+ { a: ['', 'b', 'c'] },
+ 'array brackets: empty strings work'
+ );
+ st.end();
+ });
+
+ t.test('compacts sparse arrays', function (st) {
+ st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] });
+ st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] });
+ st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] });
+ st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] });
+ st.end();
+ });
+
+ t.test('parses semi-parsed strings', function (st) {
+ st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } });
+ st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } });
+ st.end();
+ });
+
+ t.test('parses buffers correctly', function (st) {
+ var b = SaferBuffer.from('test');
+ st.deepEqual(qs.parse({ a: b }), { a: b });
+ st.end();
+ });
+
+ t.test('continues parsing when no parent is found', function (st) {
+ st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' });
+ st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' });
+ st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' });
+ st.end();
+ });
+
+ t.test('does not error when parsing a very long array', function (st) {
+ var str = 'a[]=a';
+ while (Buffer.byteLength(str) < 128 * 1024) {
+ str = str + '&' + str;
+ }
+
+ st.doesNotThrow(function () {
+ qs.parse(str);
+ });
+
+ st.end();
+ });
+
+ t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) {
+ Object.prototype.crash = '';
+ Array.prototype.crash = '';
+ st.doesNotThrow(qs.parse.bind(null, 'a=b'));
+ st.deepEqual(qs.parse('a=b'), { a: 'b' });
+ st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c'));
+ st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] });
+ delete Object.prototype.crash;
+ delete Array.prototype.crash;
+ st.end();
+ });
+
+ t.test('parses a string with an alternative string delimiter', function (st) {
+ st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('parses a string with an alternative RegExp delimiter', function (st) {
+ st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('does not use non-splittable objects as delimiters', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('allows overriding parameter limit', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' });
+ st.end();
+ });
+
+ t.test('allows setting the parameter limit to Infinity', function (st) {
+ st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('allows overriding array limit', function (st) {
+ st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } });
+ st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } });
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } });
+ st.end();
+ });
+
+ t.test('allows disabling array parsing', function (st) {
+ st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { 0: 'b', 1: 'c' } });
+ st.end();
+ });
+
+ t.test('allows for query string prefix', function (st) {
+ st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
+ st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
+ st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' });
+ st.end();
+ });
+
+ t.test('parses an object', function (st) {
+ var input = {
+ 'user[name]': { 'pop[bob]': 3 },
+ 'user[email]': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': 3 },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input);
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('parses an object in dot notation', function (st) {
+ var input = {
+ 'user.name': { 'pop[bob]': 3 },
+ 'user.email.': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': 3 },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input, { allowDots: true });
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('parses an object and not child values', function (st) {
+ var input = {
+ 'user[name]': { 'pop[bob]': { test: 3 } },
+ 'user[email]': null
+ };
+
+ var expected = {
+ user: {
+ name: { 'pop[bob]': { test: 3 } },
+ email: null
+ }
+ };
+
+ var result = qs.parse(input);
+
+ st.deepEqual(result, expected);
+ st.end();
+ });
+
+ t.test('does not blow up when Buffer global is missing', function (st) {
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = qs.parse('a=b&c=d');
+ global.Buffer = tempBuffer;
+ st.deepEqual(result, { a: 'b', c: 'd' });
+ st.end();
+ });
+
+ t.test('does not crash when parsing circular references', function (st) {
+ var a = {};
+ a.b = a;
+
+ var parsed;
+
+ st.doesNotThrow(function () {
+ parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
+ });
+
+ st.equal('foo' in parsed, true, 'parsed has "foo" property');
+ st.equal('bar' in parsed.foo, true);
+ st.equal('baz' in parsed.foo, true);
+ st.equal(parsed.foo.bar, 'baz');
+ st.deepEqual(parsed.foo.baz, a);
+ st.end();
+ });
+
+ t.test('does not crash when parsing deep objects', function (st) {
+ var parsed;
+ var str = 'foo';
+
+ for (var i = 0; i < 5000; i++) {
+ str += '[p]';
+ }
+
+ str += '=bar';
+
+ st.doesNotThrow(function () {
+ parsed = qs.parse(str, { depth: 5000 });
+ });
+
+ st.equal('foo' in parsed, true, 'parsed has "foo" property');
+
+ var depth = 0;
+ var ref = parsed.foo;
+ while ((ref = ref.p)) {
+ depth += 1;
+ }
+
+ st.equal(depth, 5000, 'parsed is 5000 properties deep');
+
+ st.end();
+ });
+
+ t.test('parses null objects correctly', { skip: !Object.create }, function (st) {
+ var a = Object.create(null);
+ a.b = 'c';
+
+ st.deepEqual(qs.parse(a), { b: 'c' });
+ var result = qs.parse({ a: a });
+ st.equal('a' in result, true, 'result has "a" property');
+ st.deepEqual(result.a, a);
+ st.end();
+ });
+
+ t.test('parses dates correctly', function (st) {
+ var now = new Date();
+ st.deepEqual(qs.parse({ a: now }), { a: now });
+ st.end();
+ });
+
+ t.test('parses regular expressions correctly', function (st) {
+ var re = /^test$/;
+ st.deepEqual(qs.parse({ a: re }), { a: re });
+ st.end();
+ });
+
+ t.test('does not allow overwriting prototype properties', function (st) {
+ st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {});
+ st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {});
+
+ st.deepEqual(
+ qs.parse('toString', { allowPrototypes: false }),
+ {},
+ 'bare "toString" results in {}'
+ );
+
+ st.end();
+ });
+
+ t.test('can allow overwriting prototype properties', function (st) {
+ st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } });
+ st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' });
+
+ st.deepEqual(
+ qs.parse('toString', { allowPrototypes: true }),
+ { toString: '' },
+ 'bare "toString" results in { toString: "" }'
+ );
+
+ st.end();
+ });
+
+ t.test('params starting with a closing bracket', function (st) {
+ st.deepEqual(qs.parse(']=toString'), { ']': 'toString' });
+ st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' });
+ st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' });
+ st.end();
+ });
+
+ t.test('params starting with a starting bracket', function (st) {
+ st.deepEqual(qs.parse('[=toString'), { '[': 'toString' });
+ st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' });
+ st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' });
+ st.end();
+ });
+
+ t.test('add keys to objects', function (st) {
+ st.deepEqual(
+ qs.parse('a[b]=c&a=d'),
+ { a: { b: 'c', d: true } },
+ 'can add keys to objects'
+ );
+
+ st.deepEqual(
+ qs.parse('a[b]=c&a=toString'),
+ { a: { b: 'c' } },
+ 'can not overwrite prototype'
+ );
+
+ st.deepEqual(
+ qs.parse('a[b]=c&a=toString', { allowPrototypes: true }),
+ { a: { b: 'c', toString: true } },
+ 'can overwrite prototype with allowPrototypes true'
+ );
+
+ st.deepEqual(
+ qs.parse('a[b]=c&a=toString', { plainObjects: true }),
+ { a: { b: 'c', toString: true } },
+ 'can overwrite prototype with plainObjects true'
+ );
+
+ st.end();
+ });
+
+ t.test('can return null objects', { skip: !Object.create }, function (st) {
+ var expected = Object.create(null);
+ expected.a = Object.create(null);
+ expected.a.b = 'c';
+ expected.a.hasOwnProperty = 'd';
+ st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected);
+ st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null));
+ var expectedArray = Object.create(null);
+ expectedArray.a = Object.create(null);
+ expectedArray.a[0] = 'b';
+ expectedArray.a.c = 'd';
+ st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray);
+ st.end();
+ });
+
+ t.test('can parse with custom encoding', function (st) {
+ st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', {
+ decoder: function (str) {
+ var reg = /%([0-9A-F]{2})/ig;
+ var result = [];
+ var parts = reg.exec(str);
+ while (parts) {
+ result.push(parseInt(parts[1], 16));
+ parts = reg.exec(str);
+ }
+ return iconv.decode(SaferBuffer.from(result), 'shift_jis').toString();
+ }
+ }), { 県: '大阪府' });
+ st.end();
+ });
+
+ t.test('receives the default decoder as a second argument', function (st) {
+ st.plan(1);
+ qs.parse('a', {
+ decoder: function (str, defaultDecoder) {
+ st.equal(defaultDecoder, utils.decode);
+ }
+ });
+ st.end();
+ });
+
+ t.test('throws error with wrong decoder', function (st) {
+ st['throws'](function () {
+ qs.parse({}, { decoder: 'string' });
+ }, new TypeError('Decoder has to be a function.'));
+ st.end();
+ });
+
+ t.test('does not mutate the options argument', function (st) {
+ var options = {};
+ qs.parse('a[b]=true', options);
+ st.deepEqual(options, {});
+ st.end();
+ });
+
+ t.end();
+});
diff --git a/node_modules/qs/test/stringify.js b/node_modules/qs/test/stringify.js
new file mode 100644
index 0000000..165ac62
--- /dev/null
+++ b/node_modules/qs/test/stringify.js
@@ -0,0 +1,597 @@
+'use strict';
+
+var test = require('tape');
+var qs = require('../');
+var utils = require('../lib/utils');
+var iconv = require('iconv-lite');
+var SaferBuffer = require('safer-buffer').Buffer;
+
+test('stringify()', function (t) {
+ t.test('stringifies a querystring object', function (st) {
+ st.equal(qs.stringify({ a: 'b' }), 'a=b');
+ st.equal(qs.stringify({ a: 1 }), 'a=1');
+ st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2');
+ st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z');
+ st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC');
+ st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80');
+ st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90');
+ st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7');
+ st.end();
+ });
+
+ t.test('adds query prefix', function (st) {
+ st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b');
+ st.end();
+ });
+
+ t.test('with query prefix, outputs blank string given an empty object', function (st) {
+ st.equal(qs.stringify({}, { addQueryPrefix: true }), '');
+ st.end();
+ });
+
+ t.test('stringifies a nested object', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
+ st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e');
+ st.end();
+ });
+
+ t.test('stringifies a nested object with dots notation', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c');
+ st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e');
+ st.end();
+ });
+
+ t.test('stringifies an array value', function (st) {
+ st.equal(
+ qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }),
+ 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }),
+ 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: ['b', 'c', 'd'] }),
+ 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d',
+ 'default => indices'
+ );
+ st.end();
+ });
+
+ t.test('omits nulls when asked', function (st) {
+ st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b');
+ st.end();
+ });
+
+ t.test('omits nested nulls when asked', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('omits array indices when asked', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d');
+ st.end();
+ });
+
+ t.test('stringifies a nested array value', function (st) {
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'indices' }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'brackets' }), 'a%5Bb%5D%5B%5D=c&a%5Bb%5D%5B%5D=d');
+ st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ st.end();
+ });
+
+ t.test('stringifies a nested array value with dots notation', function (st) {
+ st.equal(
+ qs.stringify(
+ { a: { b: ['c', 'd'] } },
+ { allowDots: true, encode: false, arrayFormat: 'indices' }
+ ),
+ 'a.b[0]=c&a.b[1]=d',
+ 'indices: stringifies with dots + indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: ['c', 'd'] } },
+ { allowDots: true, encode: false, arrayFormat: 'brackets' }
+ ),
+ 'a.b[]=c&a.b[]=d',
+ 'brackets: stringifies with dots + brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: ['c', 'd'] } },
+ { allowDots: true, encode: false }
+ ),
+ 'a.b[0]=c&a.b[1]=d',
+ 'default: stringifies with dots + indices'
+ );
+ st.end();
+ });
+
+ t.test('stringifies an object inside an array', function (st) {
+ st.equal(
+ qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices' }),
+ 'a%5B0%5D%5Bb%5D=c',
+ 'indices => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets' }),
+ 'a%5B%5D%5Bb%5D=c',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 'c' }] }),
+ 'a%5B0%5D%5Bb%5D=c',
+ 'default => indices'
+ );
+
+ st.equal(
+ qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices' }),
+ 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1',
+ 'indices => indices'
+ );
+
+ st.equal(
+ qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets' }),
+ 'a%5B%5D%5Bb%5D%5Bc%5D%5B%5D=1',
+ 'brackets => brackets'
+ );
+
+ st.equal(
+ qs.stringify({ a: [{ b: { c: [1] } }] }),
+ 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1',
+ 'default => indices'
+ );
+
+ st.end();
+ });
+
+ t.test('stringifies an array with mixed objects and primitives', function (st) {
+ st.equal(
+ qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'indices' }),
+ 'a[0][b]=1&a[1]=2&a[2]=3',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'brackets' }),
+ 'a[][b]=1&a[]=2&a[]=3',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }),
+ 'a[0][b]=1&a[1]=2&a[2]=3',
+ 'default => indices'
+ );
+
+ st.end();
+ });
+
+ t.test('stringifies an object inside an array with dots notation', function (st) {
+ st.equal(
+ qs.stringify(
+ { a: [{ b: 'c' }] },
+ { allowDots: true, encode: false, arrayFormat: 'indices' }
+ ),
+ 'a[0].b=c',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: 'c' }] },
+ { allowDots: true, encode: false, arrayFormat: 'brackets' }
+ ),
+ 'a[].b=c',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: 'c' }] },
+ { allowDots: true, encode: false }
+ ),
+ 'a[0].b=c',
+ 'default => indices'
+ );
+
+ st.equal(
+ qs.stringify(
+ { a: [{ b: { c: [1] } }] },
+ { allowDots: true, encode: false, arrayFormat: 'indices' }
+ ),
+ 'a[0].b.c[0]=1',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: { c: [1] } }] },
+ { allowDots: true, encode: false, arrayFormat: 'brackets' }
+ ),
+ 'a[].b.c[]=1',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: [{ b: { c: [1] } }] },
+ { allowDots: true, encode: false }
+ ),
+ 'a[0].b.c[0]=1',
+ 'default => indices'
+ );
+
+ st.end();
+ });
+
+ t.test('does not omit object keys when indices = false', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when indices=true', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c');
+ st.end();
+ });
+
+ t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c');
+ st.end();
+ });
+
+ t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) {
+ st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c');
+ st.end();
+ });
+
+ t.test('stringifies a complicated object', function (st) {
+ st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e');
+ st.end();
+ });
+
+ t.test('stringifies an empty value', function (st) {
+ st.equal(qs.stringify({ a: '' }), 'a=');
+ st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a');
+
+ st.equal(qs.stringify({ a: '', b: '' }), 'a=&b=');
+ st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b=');
+
+ st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D=');
+ st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D');
+ st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D=');
+
+ st.end();
+ });
+
+ t.test('stringifies a null object', { skip: !Object.create }, function (st) {
+ var obj = Object.create(null);
+ obj.a = 'b';
+ st.equal(qs.stringify(obj), 'a=b');
+ st.end();
+ });
+
+ t.test('returns an empty string for invalid input', function (st) {
+ st.equal(qs.stringify(undefined), '');
+ st.equal(qs.stringify(false), '');
+ st.equal(qs.stringify(null), '');
+ st.equal(qs.stringify(''), '');
+ st.end();
+ });
+
+ t.test('stringifies an object with a null object as a child', { skip: !Object.create }, function (st) {
+ var obj = { a: Object.create(null) };
+
+ obj.a.b = 'c';
+ st.equal(qs.stringify(obj), 'a%5Bb%5D=c');
+ st.end();
+ });
+
+ t.test('drops keys with a value of undefined', function (st) {
+ st.equal(qs.stringify({ a: undefined }), '');
+
+ st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D');
+ st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D=');
+ st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D=');
+ st.end();
+ });
+
+ t.test('url encodes values', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
+ st.end();
+ });
+
+ t.test('stringifies a date', function (st) {
+ var now = new Date();
+ var str = 'a=' + encodeURIComponent(now.toISOString());
+ st.equal(qs.stringify({ a: now }), str);
+ st.end();
+ });
+
+ t.test('stringifies the weird object from qs', function (st) {
+ st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F');
+ st.end();
+ });
+
+ t.test('skips properties that are part of the object prototype', function (st) {
+ Object.prototype.crash = 'test';
+ st.equal(qs.stringify({ a: 'b' }), 'a=b');
+ st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c');
+ delete Object.prototype.crash;
+ st.end();
+ });
+
+ t.test('stringifies boolean values', function (st) {
+ st.equal(qs.stringify({ a: true }), 'a=true');
+ st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true');
+ st.equal(qs.stringify({ b: false }), 'b=false');
+ st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false');
+ st.end();
+ });
+
+ t.test('stringifies buffer values', function (st) {
+ st.equal(qs.stringify({ a: SaferBuffer.from('test') }), 'a=test');
+ st.equal(qs.stringify({ a: { b: SaferBuffer.from('test') } }), 'a%5Bb%5D=test');
+ st.end();
+ });
+
+ t.test('stringifies an object using an alternative delimiter', function (st) {
+ st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d');
+ st.end();
+ });
+
+ t.test('doesn\'t blow up when Buffer global is missing', function (st) {
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = qs.stringify({ a: 'b', c: 'd' });
+ global.Buffer = tempBuffer;
+ st.equal(result, 'a=b&c=d');
+ st.end();
+ });
+
+ t.test('selects properties when filter=array', function (st) {
+ st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b');
+ st.equal(qs.stringify({ a: 1 }, { filter: [] }), '');
+
+ st.equal(
+ qs.stringify(
+ { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
+ { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' }
+ ),
+ 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3',
+ 'indices => indices'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
+ { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' }
+ ),
+ 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3',
+ 'brackets => brackets'
+ );
+ st.equal(
+ qs.stringify(
+ { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' },
+ { filter: ['a', 'b', 0, 2] }
+ ),
+ 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3',
+ 'default => indices'
+ );
+
+ st.end();
+ });
+
+ t.test('supports custom representations when filter=function', function (st) {
+ var calls = 0;
+ var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } };
+ var filterFunc = function (prefix, value) {
+ calls += 1;
+ if (calls === 1) {
+ st.equal(prefix, '', 'prefix is empty');
+ st.equal(value, obj);
+ } else if (prefix === 'c') {
+ return void 0;
+ } else if (value instanceof Date) {
+ st.equal(prefix, 'e[f]');
+ return value.getTime();
+ }
+ return value;
+ };
+
+ st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000');
+ st.equal(calls, 5);
+ st.end();
+ });
+
+ t.test('can disable uri encoding', function (st) {
+ st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b');
+ st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c');
+ st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c');
+ st.end();
+ });
+
+ t.test('can sort the keys', function (st) {
+ var sort = function (a, b) {
+ return a.localeCompare(b);
+ };
+ st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y');
+ st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a');
+ st.end();
+ });
+
+ t.test('can sort the keys at depth 3 or more too', function (st) {
+ var sort = function (a, b) {
+ return a.localeCompare(b);
+ };
+ st.equal(
+ qs.stringify(
+ { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' },
+ { sort: sort, encode: false }
+ ),
+ 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb'
+ );
+ st.equal(
+ qs.stringify(
+ { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' },
+ { sort: null, encode: false }
+ ),
+ 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b'
+ );
+ st.end();
+ });
+
+ t.test('can stringify with custom encoding', function (st) {
+ st.equal(qs.stringify({ 県: '大阪府', '': '' }, {
+ encoder: function (str) {
+ if (str.length === 0) {
+ return '';
+ }
+ var buf = iconv.encode(str, 'shiftjis');
+ var result = [];
+ for (var i = 0; i < buf.length; ++i) {
+ result.push(buf.readUInt8(i).toString(16));
+ }
+ return '%' + result.join('%');
+ }
+ }), '%8c%a7=%91%e5%8d%e3%95%7b&=');
+ st.end();
+ });
+
+ t.test('receives the default encoder as a second argument', function (st) {
+ st.plan(2);
+ qs.stringify({ a: 1 }, {
+ encoder: function (str, defaultEncoder) {
+ st.equal(defaultEncoder, utils.encode);
+ }
+ });
+ st.end();
+ });
+
+ t.test('throws error with wrong encoder', function (st) {
+ st['throws'](function () {
+ qs.stringify({}, { encoder: 'string' });
+ }, new TypeError('Encoder has to be a function.'));
+ st.end();
+ });
+
+ t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) {
+ st.equal(qs.stringify({ a: SaferBuffer.from([1]) }, {
+ encoder: function (buffer) {
+ if (typeof buffer === 'string') {
+ return buffer;
+ }
+ return String.fromCharCode(buffer.readUInt8(0) + 97);
+ }
+ }), 'a=b');
+ st.end();
+ });
+
+ t.test('serializeDate option', function (st) {
+ var date = new Date();
+ st.equal(
+ qs.stringify({ a: date }),
+ 'a=' + date.toISOString().replace(/:/g, '%3A'),
+ 'default is toISOString'
+ );
+
+ var mutatedDate = new Date();
+ mutatedDate.toISOString = function () {
+ throw new SyntaxError();
+ };
+ st['throws'](function () {
+ mutatedDate.toISOString();
+ }, SyntaxError);
+ st.equal(
+ qs.stringify({ a: mutatedDate }),
+ 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'),
+ 'toISOString works even when method is not locally present'
+ );
+
+ var specificDate = new Date(6);
+ st.equal(
+ qs.stringify(
+ { a: specificDate },
+ { serializeDate: function (d) { return d.getTime() * 7; } }
+ ),
+ 'a=42',
+ 'custom serializeDate function called'
+ );
+
+ st.end();
+ });
+
+ t.test('RFC 1738 spaces serialization', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c');
+ st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d');
+ st.end();
+ });
+
+ t.test('RFC 3986 spaces serialization', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c');
+ st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d');
+ st.end();
+ });
+
+ t.test('Backward compatibility to RFC 3986', function (st) {
+ st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
+ st.end();
+ });
+
+ t.test('Edge cases and unknown formats', function (st) {
+ ['UFO1234', false, 1234, null, {}, []].forEach(
+ function (format) {
+ st['throws'](
+ function () {
+ qs.stringify({ a: 'b c' }, { format: format });
+ },
+ new TypeError('Unknown format option provided.')
+ );
+ }
+ );
+ st.end();
+ });
+
+ t.test('encodeValuesOnly', function (st) {
+ st.equal(
+ qs.stringify(
+ { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] },
+ { encodeValuesOnly: true }
+ ),
+ 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h'
+ );
+ st.equal(
+ qs.stringify(
+ { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }
+ ),
+ 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h'
+ );
+ st.end();
+ });
+
+ t.test('encodeValuesOnly - strictNullHandling', function (st) {
+ st.equal(
+ qs.stringify(
+ { a: { b: null } },
+ { encodeValuesOnly: true, strictNullHandling: true }
+ ),
+ 'a[b]'
+ );
+ st.end();
+ });
+
+ t.test('does not mutate the options argument', function (st) {
+ var options = {};
+ qs.stringify({}, options);
+ st.deepEqual(options, {});
+ st.end();
+ });
+
+ t.end();
+});
diff --git a/node_modules/qs/test/utils.js b/node_modules/qs/test/utils.js
new file mode 100644
index 0000000..eff4011
--- /dev/null
+++ b/node_modules/qs/test/utils.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var test = require('tape');
+var utils = require('../lib/utils');
+
+test('merge()', function (t) {
+ t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key');
+
+ var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } });
+ t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array');
+
+ var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } });
+ t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array');
+
+ var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' });
+ t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array');
+
+ var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] });
+ t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] });
+
+ t.end();
+});
+
+test('assign()', function (t) {
+ var target = { a: 1, b: 2 };
+ var source = { b: 3, c: 4 };
+ var result = utils.assign(target, source);
+
+ t.equal(result, target, 'returns the target');
+ t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged');
+ t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched');
+
+ t.end();
+});
diff --git a/node_modules/quick-lru/index.d.ts b/node_modules/quick-lru/index.d.ts
new file mode 100644
index 0000000..fa58889
--- /dev/null
+++ b/node_modules/quick-lru/index.d.ts
@@ -0,0 +1,97 @@
+declare namespace QuickLRU {
+ interface Options<KeyType, ValueType> {
+ /**
+ The maximum number of items before evicting the least recently used items.
+ */
+ readonly maxSize: number;
+
+ /**
+ Called right before an item is evicted from the cache.
+
+ Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
+ */
+ onEviction?: (key: KeyType, value: ValueType) => void;
+ }
+}
+
+declare class QuickLRU<KeyType, ValueType>
+ implements Iterable<[KeyType, ValueType]> {
+ /**
+ The stored item count.
+ */
+ readonly size: number;
+
+ /**
+ Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29).
+
+ The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
+
+ @example
+ ```
+ import QuickLRU = require('quick-lru');
+
+ const lru = new QuickLRU({maxSize: 1000});
+
+ lru.set('🦄', '🌈');
+
+ lru.has('🦄');
+ //=> true
+
+ lru.get('🦄');
+ //=> '🌈'
+ ```
+ */
+ constructor(options: QuickLRU.Options<KeyType, ValueType>);
+
+ [Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
+
+ /**
+ Set an item.
+
+ @returns The list instance.
+ */
+ set(key: KeyType, value: ValueType): this;
+
+ /**
+ Get an item.
+
+ @returns The stored item or `undefined`.
+ */
+ get(key: KeyType): ValueType | undefined;
+
+ /**
+ Check if an item exists.
+ */
+ has(key: KeyType): boolean;
+
+ /**
+ Get an item without marking it as recently used.
+
+ @returns The stored item or `undefined`.
+ */
+ peek(key: KeyType): ValueType | undefined;
+
+ /**
+ Delete an item.
+
+ @returns `true` if the item is removed or `false` if the item doesn't exist.
+ */
+ delete(key: KeyType): boolean;
+
+ /**
+ Delete all items.
+ */
+ clear(): void;
+
+ /**
+ Iterable for all the keys.
+ */
+ keys(): IterableIterator<KeyType>;
+
+ /**
+ Iterable for all the values.
+ */
+ values(): IterableIterator<ValueType>;
+}
+
+export = QuickLRU;
diff --git a/node_modules/quick-lru/index.js b/node_modules/quick-lru/index.js
new file mode 100644
index 0000000..7d7032e
--- /dev/null
+++ b/node_modules/quick-lru/index.js
@@ -0,0 +1,123 @@
+'use strict';
+
+class QuickLRU {
+ constructor(options = {}) {
+ if (!(options.maxSize && options.maxSize > 0)) {
+ throw new TypeError('`maxSize` must be a number greater than 0');
+ }
+
+ this.maxSize = options.maxSize;
+ this.onEviction = options.onEviction;
+ this.cache = new Map();
+ this.oldCache = new Map();
+ this._size = 0;
+ }
+
+ _set(key, value) {
+ this.cache.set(key, value);
+ this._size++;
+
+ if (this._size >= this.maxSize) {
+ this._size = 0;
+
+ if (typeof this.onEviction === 'function') {
+ for (const [key, value] of this.oldCache.entries()) {
+ this.onEviction(key, value);
+ }
+ }
+
+ this.oldCache = this.cache;
+ this.cache = new Map();
+ }
+ }
+
+ get(key) {
+ if (this.cache.has(key)) {
+ return this.cache.get(key);
+ }
+
+ if (this.oldCache.has(key)) {
+ const value = this.oldCache.get(key);
+ this.oldCache.delete(key);
+ this._set(key, value);
+ return value;
+ }
+ }
+
+ set(key, value) {
+ if (this.cache.has(key)) {
+ this.cache.set(key, value);
+ } else {
+ this._set(key, value);
+ }
+
+ return this;
+ }
+
+ has(key) {
+ return this.cache.has(key) || this.oldCache.has(key);
+ }
+
+ peek(key) {
+ if (this.cache.has(key)) {
+ return this.cache.get(key);
+ }
+
+ if (this.oldCache.has(key)) {
+ return this.oldCache.get(key);
+ }
+ }
+
+ delete(key) {
+ const deleted = this.cache.delete(key);
+ if (deleted) {
+ this._size--;
+ }
+
+ return this.oldCache.delete(key) || deleted;
+ }
+
+ clear() {
+ this.cache.clear();
+ this.oldCache.clear();
+ this._size = 0;
+ }
+
+ * keys() {
+ for (const [key] of this) {
+ yield key;
+ }
+ }
+
+ * values() {
+ for (const [, value] of this) {
+ yield value;
+ }
+ }
+
+ * [Symbol.iterator]() {
+ for (const item of this.cache) {
+ yield item;
+ }
+
+ for (const item of this.oldCache) {
+ const [key] = item;
+ if (!this.cache.has(key)) {
+ yield item;
+ }
+ }
+ }
+
+ get size() {
+ let oldCacheSize = 0;
+ for (const key of this.oldCache.keys()) {
+ if (!this.cache.has(key)) {
+ oldCacheSize++;
+ }
+ }
+
+ return Math.min(this._size + oldCacheSize, this.maxSize);
+ }
+}
+
+module.exports = QuickLRU;
diff --git a/node_modules/quick-lru/license b/node_modules/quick-lru/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/quick-lru/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/quick-lru/package.json b/node_modules/quick-lru/package.json
new file mode 100644
index 0000000..ff0dd9a
--- /dev/null
+++ b/node_modules/quick-lru/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "quick-lru",
+ "version": "5.1.1",
+ "description": "Simple “Least Recently Used” (LRU) cache",
+ "license": "MIT",
+ "repository": "sindresorhus/quick-lru",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && nyc ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "lru",
+ "quick",
+ "cache",
+ "caching",
+ "least",
+ "recently",
+ "used",
+ "fast",
+ "map",
+ "hash",
+ "buffer"
+ ],
+ "devDependencies": {
+ "ava": "^2.0.0",
+ "coveralls": "^3.0.3",
+ "nyc": "^15.0.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.26.0"
+ }
+}
diff --git a/node_modules/quick-lru/readme.md b/node_modules/quick-lru/readme.md
new file mode 100644
index 0000000..234294a
--- /dev/null
+++ b/node_modules/quick-lru/readme.md
@@ -0,0 +1,111 @@
+# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master)
+
+> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
+
+Useful when you need to cache something and limit memory usage.
+
+Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`.
+
+## Install
+
+```
+$ npm install quick-lru
+```
+
+## Usage
+
+```js
+const QuickLRU = require('quick-lru');
+
+const lru = new QuickLRU({maxSize: 1000});
+
+lru.set('🦄', '🌈');
+
+lru.has('🦄');
+//=> true
+
+lru.get('🦄');
+//=> '🌈'
+```
+
+## API
+
+### new QuickLRU(options?)
+
+Returns a new instance.
+
+### options
+
+Type: `object`
+
+#### maxSize
+
+*Required*\
+Type: `number`
+
+The maximum number of items before evicting the least recently used items.
+
+#### onEviction
+
+*Optional*\
+Type: `(key, value) => void`
+
+Called right before an item is evicted from the cache.
+
+Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
+
+### Instance
+
+The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
+
+Both `key` and `value` can be of any type.
+
+#### .set(key, value)
+
+Set an item. Returns the instance.
+
+#### .get(key)
+
+Get an item.
+
+#### .has(key)
+
+Check if an item exists.
+
+#### .peek(key)
+
+Get an item without marking it as recently used.
+
+#### .delete(key)
+
+Delete an item.
+
+Returns `true` if the item is removed or `false` if the item doesn't exist.
+
+#### .clear()
+
+Delete all items.
+
+#### .keys()
+
+Iterable for all the keys.
+
+#### .values()
+
+Iterable for all the values.
+
+#### .size
+
+The stored item count.
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-quick-lru?utm_source=npm-quick-lru&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/rc/LICENSE.APACHE2 b/node_modules/rc/LICENSE.APACHE2
new file mode 100644
index 0000000..6366c04
--- /dev/null
+++ b/node_modules/rc/LICENSE.APACHE2
@@ -0,0 +1,15 @@
+Apache License, Version 2.0
+
+Copyright (c) 2011 Dominic Tarr
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/node_modules/rc/LICENSE.BSD b/node_modules/rc/LICENSE.BSD
new file mode 100644
index 0000000..96bb796
--- /dev/null
+++ b/node_modules/rc/LICENSE.BSD
@@ -0,0 +1,26 @@
+Copyright (c) 2013, Dominic Tarr
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those
+of the authors and should not be interpreted as representing official policies,
+either expressed or implied, of the FreeBSD Project.
diff --git a/node_modules/rc/LICENSE.MIT b/node_modules/rc/LICENSE.MIT
new file mode 100644
index 0000000..6eafbd7
--- /dev/null
+++ b/node_modules/rc/LICENSE.MIT
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2011 Dominic Tarr
+
+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/rc/README.md b/node_modules/rc/README.md
new file mode 100644
index 0000000..e6522e2
--- /dev/null
+++ b/node_modules/rc/README.md
@@ -0,0 +1,227 @@
+# rc
+
+The non-configurable configuration loader for lazy people.
+
+## Usage
+
+The only option is to pass rc the name of your app, and your default configuration.
+
+```javascript
+var conf = require('rc')(appname, {
+ //defaults go here.
+ port: 2468,
+
+ //defaults which are objects will be merged, not replaced
+ views: {
+ engine: 'jade'
+ }
+});
+```
+
+`rc` will return your configuration options merged with the defaults you specify.
+If you pass in a predefined defaults object, it will be mutated:
+
+```javascript
+var conf = {};
+require('rc')(appname, conf);
+```
+
+If `rc` finds any config files for your app, the returned config object will have
+a `configs` array containing their paths:
+
+```javascript
+var appCfg = require('rc')(appname, conf);
+appCfg.configs[0] // /etc/appnamerc
+appCfg.configs[1] // /home/dominictarr/.config/appname
+appCfg.config // same as appCfg.configs[appCfg.configs.length - 1]
+```
+
+## Standards
+
+Given your application name (`appname`), rc will look in all the obvious places for configuration.
+
+ * command line arguments, parsed by minimist _(e.g. `--foo baz`, also nested: `--foo.bar=baz`)_
+ * environment variables prefixed with `${appname}_`
+ * or use "\_\_" to indicate nested properties <br/> _(e.g. `appname_foo__bar__baz` => `foo.bar.baz`)_
+ * if you passed an option `--config file` then from that file
+ * a local `.${appname}rc` or the first found looking in `./ ../ ../../ ../../../` etc.
+ * `$HOME/.${appname}rc`
+ * `$HOME/.${appname}/config`
+ * `$HOME/.config/${appname}`
+ * `$HOME/.config/${appname}/config`
+ * `/etc/${appname}rc`
+ * `/etc/${appname}/config`
+ * the defaults object you passed in.
+
+All configuration sources that were found will be flattened into one object,
+so that sources **earlier** in this list override later ones.
+
+
+## Configuration File Formats
+
+Configuration files (e.g. `.appnamerc`) may be in either [json](http://json.org/example) or [ini](http://en.wikipedia.org/wiki/INI_file) format. **No** file extension (`.json` or `.ini`) should be used. The example configurations below are equivalent:
+
+
+#### Formatted as `ini`
+
+```
+; You can include comments in `ini` format if you want.
+
+dependsOn=0.10.0
+
+
+; `rc` has built-in support for ini sections, see?
+
+[commands]
+ www = ./commands/www
+ console = ./commands/repl
+
+
+; You can even do nested sections
+
+[generators.options]
+ engine = ejs
+
+[generators.modules]
+ new = generate-new
+ engine = generate-backend
+
+```
+
+#### Formatted as `json`
+
+```javascript
+{
+ // You can even comment your JSON, if you want
+ "dependsOn": "0.10.0",
+ "commands": {
+ "www": "./commands/www",
+ "console": "./commands/repl"
+ },
+ "generators": {
+ "options": {
+ "engine": "ejs"
+ },
+ "modules": {
+ "new": "generate-new",
+ "backend": "generate-backend"
+ }
+ }
+}
+```
+
+Comments are stripped from JSON config via [strip-json-comments](https://github.com/sindresorhus/strip-json-comments).
+
+> Since ini, and env variables do not have a standard for types, your application needs be prepared for strings.
+
+To ensure that string representations of booleans and numbers are always converted into their proper types (especially useful if you intend to do strict `===` comparisons), consider using a module such as [parse-strings-in-object](https://github.com/anselanza/parse-strings-in-object) to wrap the config object returned from rc.
+
+
+## Simple example demonstrating precedence
+Assume you have an application like this (notice the hard-coded defaults passed to rc):
+```
+const conf = require('rc')('myapp', {
+ port: 12345,
+ mode: 'test'
+});
+
+console.log(JSON.stringify(conf, null, 2));
+```
+You also have a file `config.json`, with these contents:
+```
+{
+ "port": 9000,
+ "foo": "from config json",
+ "something": "else"
+}
+```
+And a file `.myapprc` in the same folder, with these contents:
+```
+{
+ "port": "3001",
+ "foo": "bar"
+}
+```
+Here is the expected output from various commands:
+
+`node .`
+```
+{
+ "port": "3001",
+ "mode": "test",
+ "foo": "bar",
+ "_": [],
+ "configs": [
+ "/Users/stephen/repos/conftest/.myapprc"
+ ],
+ "config": "/Users/stephen/repos/conftest/.myapprc"
+}
+```
+*Default `mode` from hard-coded object is retained, but port is overridden by `.myapprc` file (automatically found based on appname match), and `foo` is added.*
+
+
+`node . --foo baz`
+```
+{
+ "port": "3001",
+ "mode": "test",
+ "foo": "baz",
+ "_": [],
+ "configs": [
+ "/Users/stephen/repos/conftest/.myapprc"
+ ],
+ "config": "/Users/stephen/repos/conftest/.myapprc"
+}
+```
+*Same result as above but `foo` is overridden because command-line arguments take precedence over `.myapprc` file.*
+
+`node . --foo barbar --config config.json`
+```
+{
+ "port": 9000,
+ "mode": "test",
+ "foo": "barbar",
+ "something": "else",
+ "_": [],
+ "config": "config.json",
+ "configs": [
+ "/Users/stephen/repos/conftest/.myapprc",
+ "config.json"
+ ]
+}
+```
+*Now the `port` comes from the `config.json` file specified (overriding the value from `.myapprc`), and `foo` value is overriden by command-line despite also being specified in the `config.json` file.*
+
+
+
+## Advanced Usage
+
+#### Pass in your own `argv`
+
+You may pass in your own `argv` as the third argument to `rc`. This is in case you want to [use your own command-line opts parser](https://github.com/dominictarr/rc/pull/12).
+
+```javascript
+require('rc')(appname, defaults, customArgvParser);
+```
+
+## Pass in your own parser
+
+If you have a special need to use a non-standard parser,
+you can do so by passing in the parser as the 4th argument.
+(leave the 3rd as null to get the default args parser)
+
+```javascript
+require('rc')(appname, defaults, null, parser);
+```
+
+This may also be used to force a more strict format,
+such as strict, valid JSON only.
+
+## Note on Performance
+
+`rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler)
+
+
+## License
+
+Multi-licensed under the two-clause BSD License, MIT License, or Apache License, version 2.0
diff --git a/node_modules/rc/browser.js b/node_modules/rc/browser.js
new file mode 100644
index 0000000..8c230c5
--- /dev/null
+++ b/node_modules/rc/browser.js
@@ -0,0 +1,7 @@
+
+// when this is loaded into the browser,
+// just use the defaults...
+
+module.exports = function (name, defaults) {
+ return defaults
+}
diff --git a/node_modules/rc/cli.js b/node_modules/rc/cli.js
new file mode 100755
index 0000000..ab05b60
--- /dev/null
+++ b/node_modules/rc/cli.js
@@ -0,0 +1,4 @@
+#! /usr/bin/env node
+var rc = require('./index')
+
+console.log(JSON.stringify(rc(process.argv[2]), false, 2))
diff --git a/node_modules/rc/index.js b/node_modules/rc/index.js
new file mode 100755
index 0000000..65eb47a
--- /dev/null
+++ b/node_modules/rc/index.js
@@ -0,0 +1,53 @@
+var cc = require('./lib/utils')
+var join = require('path').join
+var deepExtend = require('deep-extend')
+var etc = '/etc'
+var win = process.platform === "win32"
+var home = win
+ ? process.env.USERPROFILE
+ : process.env.HOME
+
+module.exports = function (name, defaults, argv, parse) {
+ if('string' !== typeof name)
+ throw new Error('rc(name): name *must* be string')
+ if(!argv)
+ argv = require('minimist')(process.argv.slice(2))
+ defaults = (
+ 'string' === typeof defaults
+ ? cc.json(defaults) : defaults
+ ) || {}
+
+ parse = parse || cc.parse
+
+ var env = cc.env(name + '_')
+
+ var configs = [defaults]
+ var configFiles = []
+ function addConfigFile (file) {
+ if (configFiles.indexOf(file) >= 0) return
+ var fileConfig = cc.file(file)
+ if (fileConfig) {
+ configs.push(parse(fileConfig))
+ configFiles.push(file)
+ }
+ }
+
+ // which files do we look at?
+ if (!win)
+ [join(etc, name, 'config'),
+ join(etc, name + 'rc')].forEach(addConfigFile)
+ if (home)
+ [join(home, '.config', name, 'config'),
+ join(home, '.config', name),
+ join(home, '.' + name, 'config'),
+ join(home, '.' + name + 'rc')].forEach(addConfigFile)
+ addConfigFile(cc.find('.'+name+'rc'))
+ if (env.config) addConfigFile(env.config)
+ if (argv.config) addConfigFile(argv.config)
+
+ return deepExtend.apply(null, configs.concat([
+ env,
+ argv,
+ configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined,
+ ]))
+}
diff --git a/node_modules/rc/lib/utils.js b/node_modules/rc/lib/utils.js
new file mode 100644
index 0000000..8b3beff
--- /dev/null
+++ b/node_modules/rc/lib/utils.js
@@ -0,0 +1,104 @@
+'use strict';
+var fs = require('fs')
+var ini = require('ini')
+var path = require('path')
+var stripJsonComments = require('strip-json-comments')
+
+var parse = exports.parse = function (content) {
+
+ //if it ends in .json or starts with { then it must be json.
+ //must be done this way, because ini accepts everything.
+ //can't just try and parse it and let it throw if it's not ini.
+ //everything is ini. even json with a syntax error.
+
+ if(/^\s*{/.test(content))
+ return JSON.parse(stripJsonComments(content))
+ return ini.parse(content)
+
+}
+
+var file = exports.file = function () {
+ var args = [].slice.call(arguments).filter(function (arg) { return arg != null })
+
+ //path.join breaks if it's a not a string, so just skip this.
+ for(var i in args)
+ if('string' !== typeof args[i])
+ return
+
+ var file = path.join.apply(null, args)
+ var content
+ try {
+ return fs.readFileSync(file,'utf-8')
+ } catch (err) {
+ return
+ }
+}
+
+var json = exports.json = function () {
+ var content = file.apply(null, arguments)
+ return content ? parse(content) : null
+}
+
+var env = exports.env = function (prefix, env) {
+ env = env || process.env
+ var obj = {}
+ var l = prefix.length
+ for(var k in env) {
+ if(k.toLowerCase().indexOf(prefix.toLowerCase()) === 0) {
+
+ var keypath = k.substring(l).split('__')
+
+ // Trim empty strings from keypath array
+ var _emptyStringIndex
+ while ((_emptyStringIndex=keypath.indexOf('')) > -1) {
+ keypath.splice(_emptyStringIndex, 1)
+ }
+
+ var cursor = obj
+ keypath.forEach(function _buildSubObj(_subkey,i){
+
+ // (check for _subkey first so we ignore empty strings)
+ // (check for cursor to avoid assignment to primitive objects)
+ if (!_subkey || typeof cursor !== 'object')
+ return
+
+ // If this is the last key, just stuff the value in there
+ // Assigns actual value from env variable to final key
+ // (unless it's just an empty string- in that case use the last valid key)
+ if (i === keypath.length-1)
+ cursor[_subkey] = env[k]
+
+
+ // Build sub-object if nothing already exists at the keypath
+ if (cursor[_subkey] === undefined)
+ cursor[_subkey] = {}
+
+ // Increment cursor used to track the object at the current depth
+ cursor = cursor[_subkey]
+
+ })
+
+ }
+
+ }
+
+ return obj
+}
+
+var find = exports.find = function () {
+ var rel = path.join.apply(null, [].slice.call(arguments))
+
+ function find(start, rel) {
+ var file = path.join(start, rel)
+ try {
+ fs.statSync(file)
+ return file
+ } catch (err) {
+ if(path.dirname(start) !== start) // root
+ return find(path.dirname(start), rel)
+ }
+ }
+ return find(process.cwd(), rel)
+}
+
+
diff --git a/node_modules/rc/package.json b/node_modules/rc/package.json
new file mode 100644
index 0000000..887238f
--- /dev/null
+++ b/node_modules/rc/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "rc",
+ "version": "1.2.8",
+ "description": "hardwired configuration loader",
+ "main": "index.js",
+ "browser": "browser.js",
+ "scripts": {
+ "test": "set -e; node test/test.js; node test/ini.js; node test/nested-env-vars.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dominictarr/rc.git"
+ },
+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
+ "keywords": [
+ "config",
+ "rc",
+ "unix",
+ "defaults"
+ ],
+ "bin": "./cli.js",
+ "author": "Dominic Tarr <dominic.tarr@gmail.com> (dominictarr.com)",
+ "dependencies": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ }
+}
diff --git a/node_modules/rc/test/ini.js b/node_modules/rc/test/ini.js
new file mode 100644
index 0000000..e6857f8
--- /dev/null
+++ b/node_modules/rc/test/ini.js
@@ -0,0 +1,16 @@
+var cc =require('../lib/utils')
+var INI = require('ini')
+var assert = require('assert')
+
+function test(obj) {
+
+ var _json, _ini
+ var json = cc.parse (_json = JSON.stringify(obj))
+ var ini = cc.parse (_ini = INI.stringify(obj))
+ console.log(_ini, _json)
+ assert.deepEqual(json, ini)
+}
+
+
+test({hello: true})
+
diff --git a/node_modules/rc/test/nested-env-vars.js b/node_modules/rc/test/nested-env-vars.js
new file mode 100644
index 0000000..0ecd176
--- /dev/null
+++ b/node_modules/rc/test/nested-env-vars.js
@@ -0,0 +1,50 @@
+
+var seed = Math.random();
+var n = 'rc'+ seed;
+var N = 'RC'+ seed;
+var assert = require('assert')
+
+
+// Basic usage
+process.env[n+'_someOpt__a'] = 42
+process.env[n+'_someOpt__x__'] = 99
+process.env[n+'_someOpt__a__b'] = 186
+process.env[n+'_someOpt__a__b__c'] = 243
+process.env[n+'_someOpt__x__y'] = 1862
+process.env[n+'_someOpt__z'] = 186577
+
+// Should ignore empty strings from orphaned '__'
+process.env[n+'_someOpt__z__x__'] = 18629
+process.env[n+'_someOpt__w__w__'] = 18629
+
+// Leading '__' should ignore everything up to 'z'
+process.env[n+'___z__i__'] = 9999
+
+// should ignore case for config name section.
+process.env[N+'_test_upperCase'] = 187
+
+function testPrefix(prefix) {
+ var config = require('../')(prefix, {
+ option: true
+ })
+
+ console.log('\n\n------ nested-env-vars ------\n',{prefix: prefix}, '\n', config);
+
+ assert.equal(config.option, true)
+ assert.equal(config.someOpt.a, 42)
+ assert.equal(config.someOpt.x, 99)
+ // Should not override `a` once it's been set
+ assert.equal(config.someOpt.a/*.b*/, 42)
+ // Should not override `x` once it's been set
+ assert.equal(config.someOpt.x/*.y*/, 99)
+ assert.equal(config.someOpt.z, 186577)
+ // Should not override `z` once it's been set
+ assert.equal(config.someOpt.z/*.x*/, 186577)
+ assert.equal(config.someOpt.w.w, 18629)
+ assert.equal(config.z.i, 9999)
+
+ assert.equal(config.test_upperCase, 187)
+}
+
+testPrefix(n);
+testPrefix(N);
diff --git a/node_modules/rc/test/test.js b/node_modules/rc/test/test.js
new file mode 100644
index 0000000..4f63351
--- /dev/null
+++ b/node_modules/rc/test/test.js
@@ -0,0 +1,59 @@
+
+var n = 'rc'+Math.random()
+var assert = require('assert')
+
+process.env[n+'_envOption'] = 42
+
+var config = require('../')(n, {
+ option: true
+})
+
+console.log(config)
+
+assert.equal(config.option, true)
+assert.equal(config.envOption, 42)
+
+var customArgv = require('../')(n, {
+ option: true
+}, { // nopt-like argv
+ option: false,
+ envOption: 24,
+ argv: {
+ remain: [],
+ cooked: ['--no-option', '--envOption', '24'],
+ original: ['--no-option', '--envOption=24']
+ }
+})
+
+console.log(customArgv)
+
+assert.equal(customArgv.option, false)
+assert.equal(customArgv.envOption, 24)
+
+var fs = require('fs')
+var path = require('path')
+var jsonrc = path.resolve('.' + n + 'rc');
+
+fs.writeFileSync(jsonrc, [
+ '{',
+ '// json overrides default',
+ '"option": false,',
+ '/* env overrides json */',
+ '"envOption": 24',
+ '}'
+].join('\n'));
+
+var commentedJSON = require('../')(n, {
+ option: true
+})
+
+fs.unlinkSync(jsonrc);
+
+console.log(commentedJSON)
+
+assert.equal(commentedJSON.option, false)
+assert.equal(commentedJSON.envOption, 42)
+
+assert.equal(commentedJSON.config, jsonrc)
+assert.equal(commentedJSON.configs.length, 1)
+assert.equal(commentedJSON.configs[0], jsonrc)
diff --git a/node_modules/rcedit/.circleci/config.yml b/node_modules/rcedit/.circleci/config.yml
new file mode 100644
index 0000000..8c6e6d6
--- /dev/null
+++ b/node_modules/rcedit/.circleci/config.yml
@@ -0,0 +1,127 @@
+step-env: &step-env
+ run:
+ # prevent Wine popup dialogs about installing additional packages
+ name: Setup Environment Variables
+ command: |
+ echo 'export WINEDLLOVERRIDES="mscoree,mshtml="' >> $BASH_ENV
+ echo 'export WINEDEBUG="-all"' >> $BASH_ENV
+
+step-restore-brew-cache: &step-restore-brew-cache
+ restore_cache:
+ name: Restoring Homebrew cache
+ paths:
+ - /usr/local/Homebrew
+ keys:
+ - v1-brew-cache-{{ arch }}
+
+step-save-brew-cache: &step-save-brew-cache
+ save_cache:
+ name: Persisting Homebrew cache
+ paths:
+ - /usr/local/Homebrew
+ key: v1-brew-cache-{{ arch }}
+
+step-restore-cache: &step-restore-cache
+ restore_cache:
+ keys:
+ - v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
+ - v1-dependencies-{{ arch }}
+
+step-save-cache: &step-save-cache
+ save_cache:
+ paths:
+ - node_modules
+ key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
+
+step-install-os-dependencies: &step-install-os-dependencies
+ run:
+ name: Install OS Dependencies
+ command: |
+ case "$(uname)" in
+ Linux)
+ sudo dpkg --add-architecture i386
+ sudo apt-get update
+ sudo apt-get install --no-install-recommends -y wine64 wine32 wine
+ ;;
+ Darwin)
+ brew install --cask xquartz wine-stable
+ ;;
+ esac
+
+steps-linux-win: &steps-linux-win
+ steps:
+ - *step-env
+ - *step-install-os-dependencies
+ - checkout
+ - *step-restore-cache
+ - run: yarn
+ - *step-save-cache
+ - run: yarn test
+
+steps-mac: &steps-mac
+ steps:
+ - *step-env
+ - *step-restore-brew-cache
+ - *step-install-os-dependencies
+ - *step-save-brew-cache
+ - checkout
+ - *step-restore-cache
+ - run: yarn
+ - *step-save-cache
+ - run: yarn test
+
+version: 2.1
+orbs:
+ win: circleci/windows@1.0.0
+jobs:
+ test-linux-10:
+ docker:
+ - image: circleci/node:10
+ <<: *steps-linux-win
+ test-linux-12:
+ docker:
+ - image: circleci/node:12
+ <<: *steps-linux-win
+ test-linux-14:
+ docker:
+ - image: circleci/node:14
+ <<: *steps-linux-win
+ test-mac:
+ macos:
+ xcode: "10.2.0"
+ <<: *steps-mac
+ test-windows:
+ executor:
+ name: win/vs2019
+ shell: bash.exe
+ <<: *steps-linux-win
+
+ release:
+ docker:
+ - image: circleci/node:14.15.1
+ steps:
+ - checkout
+ - *step-restore-cache
+ - run: yarn
+ - run: npx semantic-release
+workflows:
+ version: 2
+ test_and_release:
+ # Run the test jobs first, then the release only when all the test jobs are successful
+ jobs:
+ - test-linux-10
+ - test-linux-12
+ - test-linux-14
+ - test-mac
+ - test-windows
+ - release:
+ requires:
+ - test-linux-10
+ - test-linux-12
+ - test-linux-14
+ - test-mac
+ - test-windows
+ filters:
+ branches:
+ only:
+ - master
diff --git a/node_modules/rcedit/.releaserc.json b/node_modules/rcedit/.releaserc.json
new file mode 100644
index 0000000..6131682
--- /dev/null
+++ b/node_modules/rcedit/.releaserc.json
@@ -0,0 +1,8 @@
+{
+ "plugins": [
+ "@semantic-release/commit-analyzer",
+ "@semantic-release/release-notes-generator",
+ "@continuous-auth/semantic-release-npm",
+ "@semantic-release/github"
+ ]
+}
diff --git a/node_modules/rcedit/CONTRIBUTING.md b/node_modules/rcedit/CONTRIBUTING.md
new file mode 100644
index 0000000..a651d50
--- /dev/null
+++ b/node_modules/rcedit/CONTRIBUTING.md
@@ -0,0 +1,18 @@
+# Contributing to `node-rcedit`
+
+## Code of Conduct
+
+This project is a part of the Electron ecosystem. As such, all contributions to this project follow [Electron's code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md)
+where appropriate.
+
+## Bugs / Feature Requests
+
+Most bugs and feature requests in `node-rcedit` can be attributed to
+[`rcedit`](https://github.com/electron/rcedit) itself. Please look in that project's issue tracker
+first before filing an issue here.
+
+## Releases
+
+`node-rcedit` uses `semantic-release` plus a plugin named "continuous factor authentication" to
+publish new releases to NPM. When a pull request is merged, a new release is queued in CircleCI, and
+a member of the Electron [Docs & Tools Working Group](https://github.com/electron/governance/tree/master/wg-docs-tools) needs to approve it.
diff --git a/node_modules/rcedit/LICENSE b/node_modules/rcedit/LICENSE
new file mode 100644
index 0000000..859df54
--- /dev/null
+++ b/node_modules/rcedit/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 GitHub, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/rcedit/README.md b/node_modules/rcedit/README.md
new file mode 100644
index 0000000..eee2ce7
--- /dev/null
+++ b/node_modules/rcedit/README.md
@@ -0,0 +1,43 @@
+# node-rcedit
+
+[![CircleCI build status](https://circleci.com/gh/electron/node-rcedit/tree/master.svg?style=svg)](https://circleci.com/gh/electron/node-rcedit/tree/master)
+
+Node module to edit resources of Windows executables.
+
+## Requirements
+
+On platforms other than Windows, you will need to have [Wine](https://winehq.org)
+1.6 or later installed and in the system path.
+
+## Usage
+
+```javascript
+const rcedit = require('rcedit')
+```
+
+### `async rcedit(exePath, options)`
+
+`exePath` is the path to the Windows executable to be modified.
+
+`options` is an object that can contain following fields:
+
+* `version-string` - An object containing properties to change the `exePath`'s
+ version string.
+* `file-version` - File's version to change to.
+* `product-version` - Product's version to change to.
+* `icon` - Path to the icon file (`.ico`) to set as the `exePath`'s default icon.
+* `requested-execution-level` - Requested execution level to change to, must be
+ either `asInvoker`, `highestAvailable`, or `requireAdministrator`. See
+ [here](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) for
+ more details.
+* `application-manifest` - String path to a local manifest file to use.
+ See [here](https://msdn.microsoft.com/en-us/library/windows/desktop/aa374191.aspx)
+ for more details.
+
+Returns a `Promise` with no value.
+
+## Building
+
+* Clone the repository
+* Run `npm install`
+* Run `npm test` to run the tests
diff --git a/node_modules/rcedit/SUPPORT.md b/node_modules/rcedit/SUPPORT.md
new file mode 100644
index 0000000..a24ba70
--- /dev/null
+++ b/node_modules/rcedit/SUPPORT.md
@@ -0,0 +1,9 @@
+# Support for `node-rcedit`
+
+## Troubleshooting
+
+This module uses the [`debug`](https://npm.im/debug) module to print out debugging information. To
+use it, consult your operating system's documentation on setting environment variables _([Windows
+notes](https://github.com/visionmedia/debug#windows-command-prompt-notes))_. Set the `DEBUG`
+environment variable to `rcedit`, and it will print out information, including any `STDERR` output
+from `rcedit.exe`/`rcedit-x64.exe`.
diff --git a/node_modules/rcedit/bin/rcedit-x64.exe b/node_modules/rcedit/bin/rcedit-x64.exe
new file mode 100755
index 0000000..1f4e093
--- /dev/null
+++ b/node_modules/rcedit/bin/rcedit-x64.exe
Binary files differ
diff --git a/node_modules/rcedit/bin/rcedit.exe b/node_modules/rcedit/bin/rcedit.exe
new file mode 100755
index 0000000..2f6a148
--- /dev/null
+++ b/node_modules/rcedit/bin/rcedit.exe
Binary files differ
diff --git a/node_modules/rcedit/lib/index.d.ts b/node_modules/rcedit/lib/index.d.ts
new file mode 100644
index 0000000..24c931a
--- /dev/null
+++ b/node_modules/rcedit/lib/index.d.ts
@@ -0,0 +1,68 @@
+/**
+ * Runs the `rcedit` Windows binary (via Wine on macOS/Linux) to modify the metadata of a
+ * Windows executable.
+ *
+ * @param exePath - the path to the Windows executable to be modified
+ * @param options - metadata used to update the Windows executable
+ */
+declare function rcedit (exePath: string, options: rcedit.Options): Promise<void>
+
+/* eslint-disable-next-line no-redeclare */
+declare namespace rcedit {
+ /** See [MSDN](https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevel) for details. */
+ type RequestedExecutionLevel = 'asInvoker' | 'highestAvailable' | 'requireAdministrator'
+ /**
+ * Basic user-supplied metadata embedded in the application. Docstrings are copied from MSDN.
+ *
+ * See [MSDN](https://docs.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block) for details.
+ */
+ interface VersionStringOptions {
+ /** Additional information that should be displayed for diagnostic purposes. */
+ Comments?: string
+ /** Company that produced the executable. */
+ CompanyName?: string
+ /** File description to be presented to users. */
+ FileDescription?: string
+ /** Internal name of the file. Usually, this string should be the original filename, without the extension. */
+ InternalFilename?: string
+ /** Copyright notices that apply, including the full text of all notices, legal symbols, copyright dates, etc. */
+ LegalCopyright?: string
+ /** Trademarks and registered trademarks, including the full text of all notices, legal symbols, trademark numbers, etc. */
+ LegalTrademarks1?: string
+ /** Trademarks and registered trademarks, including the full text of all notices, legal symbols, trademark numbers, etc. */
+ LegalTrademarks2?: string
+ /** Original name of the file, not including a path. */
+ OriginalFilename?: string
+ /** Name of the product with which the file is distributed. */
+ ProductName?: string
+ }
+ /**
+ * EXE metadata that can be changed.
+ */
+ interface Options {
+ /** The metadata within a version-information resource. */
+ 'version-string'?: VersionStringOptions
+ /**
+ * See [MSDN](https://docs.microsoft.com/en-us/windows/win32/msi/version) for the version format.
+ */
+ 'file-version'?: string
+ /**
+ * See [MSDN](https://docs.microsoft.com/en-us/windows/win32/msi/version) for the version format.
+ */
+ 'product-version'?: string
+ /**
+ * Absolute path to the [ICO-formatted icon](https://en.wikipedia.org/wiki/ICO_(file_format))
+ * to set as the application's icon.
+ */
+ icon?: string
+ /** See [MSDN](https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/deployment/trustinfo-element-clickonce-application?view=vs-2015#requestedexecutionlevel) for details. */
+ 'requested-execution-level'?: RequestedExecutionLevel
+ /**
+ * The path to the [application manifest](https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests)
+ * XML that is to be embedded in the EXE.
+ */
+ 'application-manifest'?: string
+ }
+}
+
+export = rcedit
diff --git a/node_modules/rcedit/lib/rcedit.js b/node_modules/rcedit/lib/rcedit.js
new file mode 100644
index 0000000..b6bd5ce
--- /dev/null
+++ b/node_modules/rcedit/lib/rcedit.js
@@ -0,0 +1,43 @@
+const { canRunWindowsExeNatively, is64BitArch, spawnExe } = require('cross-spawn-windows-exe')
+const path = require('path')
+
+const pairSettings = ['version-string']
+const singleSettings = ['file-version', 'product-version', 'icon', 'requested-execution-level']
+const noPrefixSettings = ['application-manifest']
+
+module.exports = async (exe, options) => {
+ const rceditExe = is64BitArch(process.arch) ? 'rcedit-x64.exe' : 'rcedit.exe'
+ const rcedit = path.resolve(__dirname, '..', 'bin', rceditExe)
+ const args = [exe]
+
+ for (const name of pairSettings) {
+ if (options[name]) {
+ for (const [key, value] of Object.entries(options[name])) {
+ args.push(`--set-${name}`, key, value)
+ }
+ }
+ }
+
+ for (const name of singleSettings) {
+ if (options[name]) {
+ args.push(`--set-${name}`, options[name])
+ }
+ }
+
+ for (const name of noPrefixSettings) {
+ if (options[name]) {
+ args.push(`--${name}`, options[name])
+ }
+ }
+
+ const spawnOptions = {
+ env: { ...process.env }
+ }
+
+ if (!canRunWindowsExeNatively()) {
+ // Suppress "fixme:" stderr log messages
+ spawnOptions.env.WINEDEBUG = '-all'
+ }
+
+ await spawnExe(rcedit, args, spawnOptions)
+}
diff --git a/node_modules/rcedit/package.json b/node_modules/rcedit/package.json
new file mode 100644
index 0000000..c64638b
--- /dev/null
+++ b/node_modules/rcedit/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "rcedit",
+ "version": "3.0.1",
+ "description": "Node module to edit resources of exe",
+ "main": "lib/rcedit.js",
+ "types": "lib/index.d.ts",
+ "scripts": {
+ "docs:build": "node script/build-docs.js",
+ "mocha": "mocha test/*.js",
+ "test": "npm run lint && npm run tsd && npm run mocha",
+ "lint": "npm run lint:js && npm run lint:ts",
+ "lint:js": "standard",
+ "lint:ts": "ts-standard",
+ "tsd": "tsd"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/electron/node-rcedit.git"
+ },
+ "bugs": {
+ "url": "https://github.com/electron/node-rcedit/issues"
+ },
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ },
+ "dependencies": {
+ "cross-spawn-windows-exe": "^1.1.0"
+ },
+ "devDependencies": {
+ "@continuous-auth/semantic-release-npm": "^2.0.0",
+ "got": "^11.8.0",
+ "mocha": "^8.2.1",
+ "rcinfo": "^0.1.3",
+ "semantic-release": "^17.3.0",
+ "standard": "^16.0.3",
+ "temp": "^0.9.4",
+ "ts-standard": "^10.0.0",
+ "tsd": "^0.14.0",
+ "typedoc": "^0.20.0-beta.27",
+ "typescript": "^4.1.2"
+ },
+ "tsd": {
+ "directory": "test"
+ }
+}
diff --git a/node_modules/rcedit/tsconfig.eslint.json b/node_modules/rcedit/tsconfig.eslint.json
new file mode 100644
index 0000000..bb36caf
--- /dev/null
+++ b/node_modules/rcedit/tsconfig.eslint.json
@@ -0,0 +1,14 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es2018",
+ "outDir": "dist",
+ "lib": ["es2018"],
+ "sourceMap": true,
+ "rootDir": ".",
+ "strict": true,
+ "esModuleInterop": true,
+ "declaration": true
+ },
+ "include": ["lib/index.d.ts", "test/index.test-d.ts"]
+}
diff --git a/node_modules/read-pkg-up/index.js b/node_modules/read-pkg-up/index.js
new file mode 100644
index 0000000..beb3d48
--- /dev/null
+++ b/node_modules/read-pkg-up/index.js
@@ -0,0 +1,31 @@
+'use strict';
+var findUp = require('find-up');
+var readPkg = require('read-pkg');
+
+module.exports = function (opts) {
+ return findUp('package.json', opts).then(function (fp) {
+ if (!fp) {
+ return {};
+ }
+
+ return readPkg(fp, opts).then(function (pkg) {
+ return {
+ pkg: pkg,
+ path: fp
+ };
+ });
+ });
+};
+
+module.exports.sync = function (opts) {
+ var fp = findUp.sync('package.json', opts);
+
+ if (!fp) {
+ return {};
+ }
+
+ return {
+ pkg: readPkg.sync(fp, opts),
+ path: fp
+ };
+};
diff --git a/node_modules/read-pkg-up/license b/node_modules/read-pkg-up/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/read-pkg-up/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/read-pkg-up/package.json b/node_modules/read-pkg-up/package.json
new file mode 100644
index 0000000..0f7ff70
--- /dev/null
+++ b/node_modules/read-pkg-up/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "read-pkg-up",
+ "version": "1.0.1",
+ "description": "Read the closest package.json file",
+ "license": "MIT",
+ "repository": "sindresorhus/read-pkg-up",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "json",
+ "read",
+ "parse",
+ "file",
+ "fs",
+ "graceful",
+ "load",
+ "pkg",
+ "package",
+ "find",
+ "up",
+ "find-up",
+ "findup",
+ "look-up",
+ "look",
+ "file",
+ "search",
+ "match",
+ "package",
+ "resolve",
+ "parent",
+ "parents",
+ "folder",
+ "directory",
+ "dir",
+ "walk",
+ "walking",
+ "path"
+ ],
+ "dependencies": {
+ "find-up": "^1.0.0",
+ "read-pkg": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/read-pkg-up/readme.md b/node_modules/read-pkg-up/readme.md
new file mode 100644
index 0000000..dbd88f3
--- /dev/null
+++ b/node_modules/read-pkg-up/readme.md
@@ -0,0 +1,79 @@
+# read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up)
+
+> Read the closest package.json file
+
+
+## Why
+
+- [Finds the closest package.json](https://github.com/sindresorhus/find-up)
+- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
+- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
+- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
+- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
+
+
+## Install
+
+```
+$ npm install --save read-pkg-up
+```
+
+
+## Usage
+
+```js
+var readPkgUp = require('read-pkg-up');
+
+readPkgUp().then(function (result) {
+ console.log(result);
+ /*
+ {
+ pkg: {
+ name: 'awesome-package',
+ version: '1.0.0',
+ ...
+ },
+ path: '/Users/sindresorhus/dev/awesome-package'
+ }
+ */
+});
+```
+
+
+## API
+
+### readPkgUp([options])
+
+Returns a promise that resolves to a result object.
+
+### readPkgUp.sync([options])
+
+Returns a result object.
+
+#### options
+
+##### cwd
+
+Type: `string`
+Default: `.`
+
+Directory to start looking for a package.json file.
+
+##### normalize
+
+Type: `boolean`
+Default: `true`
+
+[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
+
+
+## Related
+
+- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file
+- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories
+- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/read-pkg/index.js b/node_modules/read-pkg/index.js
new file mode 100644
index 0000000..c5c3afa
--- /dev/null
+++ b/node_modules/read-pkg/index.js
@@ -0,0 +1,48 @@
+'use strict';
+var path = require('path');
+var loadJsonFile = require('load-json-file');
+var normalizePackageData = require('normalize-package-data');
+var pathType = require('path-type');
+
+module.exports = function (fp, opts) {
+ if (typeof fp !== 'string') {
+ opts = fp;
+ fp = '.';
+ }
+
+ opts = opts || {};
+
+ return pathType.dir(fp)
+ .then(function (isDir) {
+ if (isDir) {
+ fp = path.join(fp, 'package.json');
+ }
+
+ return loadJsonFile(fp);
+ })
+ .then(function (x) {
+ if (opts.normalize !== false) {
+ normalizePackageData(x);
+ }
+
+ return x;
+ });
+};
+
+module.exports.sync = function (fp, opts) {
+ if (typeof fp !== 'string') {
+ opts = fp;
+ fp = '.';
+ }
+
+ opts = opts || {};
+ fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp;
+
+ var x = loadJsonFile.sync(fp);
+
+ if (opts.normalize !== false) {
+ normalizePackageData(x);
+ }
+
+ return x;
+};
diff --git a/node_modules/read-pkg/license b/node_modules/read-pkg/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/read-pkg/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/read-pkg/package.json b/node_modules/read-pkg/package.json
new file mode 100644
index 0000000..594b0c2
--- /dev/null
+++ b/node_modules/read-pkg/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "read-pkg",
+ "version": "1.1.0",
+ "description": "Read a package.json file",
+ "license": "MIT",
+ "repository": "sindresorhus/read-pkg",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "json",
+ "read",
+ "parse",
+ "file",
+ "fs",
+ "graceful",
+ "load",
+ "pkg",
+ "package",
+ "normalize"
+ ],
+ "dependencies": {
+ "load-json-file": "^1.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/read-pkg/readme.md b/node_modules/read-pkg/readme.md
new file mode 100644
index 0000000..9a0d4cc
--- /dev/null
+++ b/node_modules/read-pkg/readme.md
@@ -0,0 +1,79 @@
+# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg)
+
+> Read a package.json file
+
+
+## Why
+
+- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
+- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
+- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
+- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
+
+
+## Install
+
+```
+$ npm install --save read-pkg
+```
+
+
+## Usage
+
+```js
+var readPkg = require('read-pkg');
+
+readPkg().then(function (pkg) {
+ console.log(pkg);
+ //=> {name: 'read-pkg', ...}
+});
+
+readPkg(__dirname).then(function (pkg) {
+ console.log(pkg);
+ //=> {name: 'read-pkg', ...}
+});
+
+readPkg(path.join('unicorn', 'package.json')).then(function (pkg) {
+ console.log(pkg);
+ //=> {name: 'read-pkg', ...}
+});
+```
+
+
+## API
+
+### readPkg([path], [options])
+
+Returns a promise that resolves to the parsed JSON.
+
+### readPkg.sync([path], [options])
+
+Returns the parsed JSON.
+
+#### path
+
+Type: `string`
+Default: `.`
+
+Path to a `package.json` file or its directory.
+
+#### options
+
+##### normalize
+
+Type: `boolean`
+Default: `true`
+
+[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
+
+
+## Related
+
+- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file
+- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file
+- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/readable-stream/.npmignore b/node_modules/readable-stream/.npmignore
new file mode 100644
index 0000000..38344f8
--- /dev/null
+++ b/node_modules/readable-stream/.npmignore
@@ -0,0 +1,5 @@
+build/
+test/
+examples/
+fs.js
+zlib.js \ No newline at end of file
diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000..e3d4e69
--- /dev/null
+++ b/node_modules/readable-stream/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md
new file mode 100644
index 0000000..e46b823
--- /dev/null
+++ b/node_modules/readable-stream/README.md
@@ -0,0 +1,15 @@
+# readable-stream
+
+***Node-core streams for userland***
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+This package is a mirror of the Streams2 and Streams3 implementations in Node-core.
+
+If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core.
+
+**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.
+
+**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"`
+
diff --git a/node_modules/readable-stream/duplex.js b/node_modules/readable-stream/duplex.js
new file mode 100644
index 0000000..ca807af
--- /dev/null
+++ b/node_modules/readable-stream/duplex.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_duplex.js")
diff --git a/node_modules/readable-stream/float.patch b/node_modules/readable-stream/float.patch
new file mode 100644
index 0000000..b984607
--- /dev/null
+++ b/node_modules/readable-stream/float.patch
@@ -0,0 +1,923 @@
+diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js
+index c5a741c..a2e0d8e 100644
+--- a/lib/_stream_duplex.js
++++ b/lib/_stream_duplex.js
+@@ -26,8 +26,8 @@
+
+ module.exports = Duplex;
+ var util = require('util');
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('./_stream_readable');
++var Writable = require('./_stream_writable');
+
+ util.inherits(Duplex, Readable);
+
+diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js
+index a5e9864..330c247 100644
+--- a/lib/_stream_passthrough.js
++++ b/lib/_stream_passthrough.js
+@@ -25,7 +25,7 @@
+
+ module.exports = PassThrough;
+
+-var Transform = require('_stream_transform');
++var Transform = require('./_stream_transform');
+ var util = require('util');
+ util.inherits(PassThrough, Transform);
+
+diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
+index 0c3fe3e..90a8298 100644
+--- a/lib/_stream_readable.js
++++ b/lib/_stream_readable.js
+@@ -23,10 +23,34 @@ module.exports = Readable;
+ Readable.ReadableState = ReadableState;
+
+ var EE = require('events').EventEmitter;
++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
++ return emitter.listeners(type).length;
++};
++
++if (!global.setImmediate) global.setImmediate = function setImmediate(fn) {
++ return setTimeout(fn, 0);
++};
++if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) {
++ return clearTimeout(i);
++};
++
+ var Stream = require('stream');
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ var StringDecoder;
+-var debug = util.debuglog('stream');
++var debug;
++if (util.debuglog)
++ debug = util.debuglog('stream');
++else try {
++ debug = require('debuglog')('stream');
++} catch (er) {
++ debug = function() {};
++}
+
+ util.inherits(Readable, Stream);
+
+@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) {
+
+
+ function onEofChunk(stream, state) {
+- if (state.decoder && !state.ended) {
++ if (state.decoder && !state.ended && state.decoder.end) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js
+index b1f9fcc..b0caf57 100644
+--- a/lib/_stream_transform.js
++++ b/lib/_stream_transform.js
+@@ -64,8 +64,14 @@
+
+ module.exports = Transform;
+
+-var Duplex = require('_stream_duplex');
++var Duplex = require('./_stream_duplex');
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ util.inherits(Transform, Duplex);
+
+
+diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js
+index ba2e920..f49288b 100644
+--- a/lib/_stream_writable.js
++++ b/lib/_stream_writable.js
+@@ -27,6 +27,12 @@ module.exports = Writable;
+ Writable.WritableState = WritableState;
+
+ var util = require('util');
++if (!util.isUndefined) {
++ var utilIs = require('core-util-is');
++ for (var f in utilIs) {
++ util[f] = utilIs[f];
++ }
++}
+ var Stream = require('stream');
+
+ util.inherits(Writable, Stream);
+@@ -119,7 +125,7 @@ function WritableState(options, stream) {
+ function Writable(options) {
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex))
++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex')))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js
+index e3787e4..8cd2127 100644
+--- a/test/simple/test-stream-big-push.js
++++ b/test/simple/test-stream-big-push.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+ var str = 'asdfasdfasdfasdfasdf';
+
+ var r = new stream.Readable({
+diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js
+index bb73777..d40efc7 100644
+--- a/test/simple/test-stream-end-paused.js
++++ b/test/simple/test-stream-end-paused.js
+@@ -25,7 +25,7 @@ var gotEnd = false;
+
+ // Make sure we don't miss the end event for paused 0-length streams
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var stream = new Readable();
+ var calledRead = false;
+ stream._read = function() {
+diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js
+index b46ee90..0be8366 100644
+--- a/test/simple/test-stream-pipe-after-end.js
++++ b/test/simple/test-stream-pipe-after-end.js
+@@ -22,8 +22,8 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var util = require('util');
+
+ util.inherits(TestReadable, Readable);
+diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js
+deleted file mode 100644
+index f689358..0000000
+--- a/test/simple/test-stream-pipe-cleanup.js
++++ /dev/null
+@@ -1,122 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// Permission is hereby granted, free of charge, to any person obtaining a
+-// copy of this software and associated documentation files (the
+-// "Software"), to deal in the Software without restriction, including
+-// without limitation the rights to use, copy, modify, merge, publish,
+-// distribute, sublicense, and/or sell copies of the Software, and to permit
+-// persons to whom the Software is furnished to do so, subject to the
+-// following conditions:
+-//
+-// The above copyright notice and this permission notice shall be included
+-// in all copies or substantial portions of the Software.
+-//
+-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+-
+-// This test asserts that Stream.prototype.pipe does not leave listeners
+-// hanging on the source or dest.
+-
+-var common = require('../common');
+-var stream = require('stream');
+-var assert = require('assert');
+-var util = require('util');
+-
+-function Writable() {
+- this.writable = true;
+- this.endCalls = 0;
+- stream.Stream.call(this);
+-}
+-util.inherits(Writable, stream.Stream);
+-Writable.prototype.end = function() {
+- this.endCalls++;
+-};
+-
+-Writable.prototype.destroy = function() {
+- this.endCalls++;
+-};
+-
+-function Readable() {
+- this.readable = true;
+- stream.Stream.call(this);
+-}
+-util.inherits(Readable, stream.Stream);
+-
+-function Duplex() {
+- this.readable = true;
+- Writable.call(this);
+-}
+-util.inherits(Duplex, Writable);
+-
+-var i = 0;
+-var limit = 100;
+-
+-var w = new Writable();
+-
+-var r;
+-
+-for (i = 0; i < limit; i++) {
+- r = new Readable();
+- r.pipe(w);
+- r.emit('end');
+-}
+-assert.equal(0, r.listeners('end').length);
+-assert.equal(limit, w.endCalls);
+-
+-w.endCalls = 0;
+-
+-for (i = 0; i < limit; i++) {
+- r = new Readable();
+- r.pipe(w);
+- r.emit('close');
+-}
+-assert.equal(0, r.listeners('close').length);
+-assert.equal(limit, w.endCalls);
+-
+-w.endCalls = 0;
+-
+-r = new Readable();
+-
+-for (i = 0; i < limit; i++) {
+- w = new Writable();
+- r.pipe(w);
+- w.emit('close');
+-}
+-assert.equal(0, w.listeners('close').length);
+-
+-r = new Readable();
+-w = new Writable();
+-var d = new Duplex();
+-r.pipe(d); // pipeline A
+-d.pipe(w); // pipeline B
+-assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup
+-assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup
+-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
+-assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 1); // B.cleanup
+-
+-r.emit('end');
+-assert.equal(d.endCalls, 1);
+-assert.equal(w.endCalls, 0);
+-assert.equal(r.listeners('end').length, 0);
+-assert.equal(r.listeners('close').length, 0);
+-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
+-assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 1); // B.cleanup
+-
+-d.emit('end');
+-assert.equal(d.endCalls, 1);
+-assert.equal(w.endCalls, 1);
+-assert.equal(r.listeners('end').length, 0);
+-assert.equal(r.listeners('close').length, 0);
+-assert.equal(d.listeners('end').length, 0);
+-assert.equal(d.listeners('close').length, 0);
+-assert.equal(w.listeners('end').length, 0);
+-assert.equal(w.listeners('close').length, 0);
+diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js
+index c5d724b..c7d6b7d 100644
+--- a/test/simple/test-stream-pipe-error-handling.js
++++ b/test/simple/test-stream-pipe-error-handling.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var Stream = require('stream').Stream;
++var Stream = require('../../').Stream;
+
+ (function testErrorListenerCatches() {
+ var source = new Stream();
+diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js
+index cb9d5fe..56f8d61 100644
+--- a/test/simple/test-stream-pipe-event.js
++++ b/test/simple/test-stream-pipe-event.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common');
+-var stream = require('stream');
++var stream = require('../../');
+ var assert = require('assert');
+ var util = require('util');
+
+diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js
+index f2e6ec2..a5c9bf9 100644
+--- a/test/simple/test-stream-push-order.js
++++ b/test/simple/test-stream-push-order.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var assert = require('assert');
+
+ var s = new Readable({
+diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js
+index 06f43dc..1701a9a 100644
+--- a/test/simple/test-stream-push-strings.js
++++ b/test/simple/test-stream-push-strings.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var util = require('util');
+
+ util.inherits(MyStream, Readable);
+diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js
+index ba6a577..a8e6f7b 100644
+--- a/test/simple/test-stream-readable-event.js
++++ b/test/simple/test-stream-readable-event.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ (function first() {
+ // First test, not reading when the readable is added.
+diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js
+index 2891ad6..11689ba 100644
+--- a/test/simple/test-stream-readable-flow-recursion.js
++++ b/test/simple/test-stream-readable-flow-recursion.js
+@@ -27,7 +27,7 @@ var assert = require('assert');
+ // more data continuously, but without triggering a nextTick
+ // warning or RangeError.
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ // throw an error if we trigger a nextTick warning.
+ process.throwDeprecation = true;
+diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js
+index 0c96476..7827538 100644
+--- a/test/simple/test-stream-unshift-empty-chunk.js
++++ b/test/simple/test-stream-unshift-empty-chunk.js
+@@ -24,7 +24,7 @@ var assert = require('assert');
+
+ // This test verifies that stream.unshift(Buffer(0)) or
+ // stream.unshift('') does not set state.reading=false.
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ var r = new Readable();
+ var nChunks = 10;
+diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js
+index 83fd9fa..17c18aa 100644
+--- a/test/simple/test-stream-unshift-read-race.js
++++ b/test/simple/test-stream-unshift-read-race.js
+@@ -29,7 +29,7 @@ var assert = require('assert');
+ // 3. push() after the EOF signaling null is an error.
+ // 4. _read() is not called after pushing the EOF null chunk.
+
+-var stream = require('stream');
++var stream = require('../../');
+ var hwm = 10;
+ var r = stream.Readable({ highWaterMark: hwm });
+ var chunks = 10;
+@@ -51,7 +51,14 @@ r._read = function(n) {
+
+ function push(fast) {
+ assert(!pushedNull, 'push() after null push');
+- var c = pos >= data.length ? null : data.slice(pos, pos + n);
++ var c;
++ if (pos >= data.length)
++ c = null;
++ else {
++ if (n + pos > data.length)
++ n = data.length - pos;
++ c = data.slice(pos, pos + n);
++ }
+ pushedNull = c === null;
+ if (fast) {
+ pos += n;
+diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js
+index 5b49e6e..b5321f3 100644
+--- a/test/simple/test-stream-writev.js
++++ b/test/simple/test-stream-writev.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var stream = require('stream');
++var stream = require('../../');
+
+ var queue = [];
+ for (var decode = 0; decode < 2; decode++) {
+diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js
+index 3814bf0..248c1be 100644
+--- a/test/simple/test-stream2-basic.js
++++ b/test/simple/test-stream2-basic.js
+@@ -21,7 +21,7 @@
+
+
+ var common = require('../common.js');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js
+index 6cdd4e9..f0fa84b 100644
+--- a/test/simple/test-stream2-compatibility.js
++++ b/test/simple/test-stream2-compatibility.js
+@@ -21,7 +21,7 @@
+
+
+ var common = require('../common.js');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js
+index 39b274f..006a19b 100644
+--- a/test/simple/test-stream2-finish-pipe.js
++++ b/test/simple/test-stream2-finish-pipe.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var stream = require('stream');
++var stream = require('../../');
+ var Buffer = require('buffer').Buffer;
+
+ var r = new stream.Readable();
+diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js
+deleted file mode 100644
+index e162406..0000000
+--- a/test/simple/test-stream2-fs.js
++++ /dev/null
+@@ -1,72 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// Permission is hereby granted, free of charge, to any person obtaining a
+-// copy of this software and associated documentation files (the
+-// "Software"), to deal in the Software without restriction, including
+-// without limitation the rights to use, copy, modify, merge, publish,
+-// distribute, sublicense, and/or sell copies of the Software, and to permit
+-// persons to whom the Software is furnished to do so, subject to the
+-// following conditions:
+-//
+-// The above copyright notice and this permission notice shall be included
+-// in all copies or substantial portions of the Software.
+-//
+-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+-
+-
+-var common = require('../common.js');
+-var R = require('_stream_readable');
+-var assert = require('assert');
+-
+-var fs = require('fs');
+-var FSReadable = fs.ReadStream;
+-
+-var path = require('path');
+-var file = path.resolve(common.fixturesDir, 'x1024.txt');
+-
+-var size = fs.statSync(file).size;
+-
+-var expectLengths = [1024];
+-
+-var util = require('util');
+-var Stream = require('stream');
+-
+-util.inherits(TestWriter, Stream);
+-
+-function TestWriter() {
+- Stream.apply(this);
+- this.buffer = [];
+- this.length = 0;
+-}
+-
+-TestWriter.prototype.write = function(c) {
+- this.buffer.push(c.toString());
+- this.length += c.length;
+- return true;
+-};
+-
+-TestWriter.prototype.end = function(c) {
+- if (c) this.buffer.push(c.toString());
+- this.emit('results', this.buffer);
+-}
+-
+-var r = new FSReadable(file);
+-var w = new TestWriter();
+-
+-w.on('results', function(res) {
+- console.error(res, w.length);
+- assert.equal(w.length, size);
+- var l = 0;
+- assert.deepEqual(res.map(function (c) {
+- return c.length;
+- }), expectLengths);
+- console.log('ok');
+-});
+-
+-r.pipe(w);
+diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js
+deleted file mode 100644
+index 15cffc2..0000000
+--- a/test/simple/test-stream2-httpclient-response-end.js
++++ /dev/null
+@@ -1,52 +0,0 @@
+-// Copyright Joyent, Inc. and other Node contributors.
+-//
+-// Permission is hereby granted, free of charge, to any person obtaining a
+-// copy of this software and associated documentation files (the
+-// "Software"), to deal in the Software without restriction, including
+-// without limitation the rights to use, copy, modify, merge, publish,
+-// distribute, sublicense, and/or sell copies of the Software, and to permit
+-// persons to whom the Software is furnished to do so, subject to the
+-// following conditions:
+-//
+-// The above copyright notice and this permission notice shall be included
+-// in all copies or substantial portions of the Software.
+-//
+-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+-// USE OR OTHER DEALINGS IN THE SOFTWARE.
+-
+-var common = require('../common.js');
+-var assert = require('assert');
+-var http = require('http');
+-var msg = 'Hello';
+-var readable_event = false;
+-var end_event = false;
+-var server = http.createServer(function(req, res) {
+- res.writeHead(200, {'Content-Type': 'text/plain'});
+- res.end(msg);
+-}).listen(common.PORT, function() {
+- http.get({port: common.PORT}, function(res) {
+- var data = '';
+- res.on('readable', function() {
+- console.log('readable event');
+- readable_event = true;
+- data += res.read();
+- });
+- res.on('end', function() {
+- console.log('end event');
+- end_event = true;
+- assert.strictEqual(msg, data);
+- server.close();
+- });
+- });
+-});
+-
+-process.on('exit', function() {
+- assert(readable_event);
+- assert(end_event);
+-});
+-
+diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js
+index 2fbfbca..667985b 100644
+--- a/test/simple/test-stream2-large-read-stall.js
++++ b/test/simple/test-stream2-large-read-stall.js
+@@ -30,7 +30,7 @@ var PUSHSIZE = 20;
+ var PUSHCOUNT = 1000;
+ var HWM = 50;
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var r = new Readable({
+ highWaterMark: HWM
+ });
+@@ -39,23 +39,23 @@ var rs = r._readableState;
+ r._read = push;
+
+ r.on('readable', function() {
+- console.error('>> readable');
++ //console.error('>> readable');
+ do {
+- console.error(' > read(%d)', READSIZE);
++ //console.error(' > read(%d)', READSIZE);
+ var ret = r.read(READSIZE);
+- console.error(' < %j (%d remain)', ret && ret.length, rs.length);
++ //console.error(' < %j (%d remain)', ret && ret.length, rs.length);
+ } while (ret && ret.length === READSIZE);
+
+- console.error('<< after read()',
+- ret && ret.length,
+- rs.needReadable,
+- rs.length);
++ //console.error('<< after read()',
++ // ret && ret.length,
++ // rs.needReadable,
++ // rs.length);
+ });
+
+ var endEmitted = false;
+ r.on('end', function() {
+ endEmitted = true;
+- console.error('end');
++ //console.error('end');
+ });
+
+ var pushes = 0;
+@@ -64,11 +64,11 @@ function push() {
+ return;
+
+ if (pushes++ === PUSHCOUNT) {
+- console.error(' push(EOF)');
++ //console.error(' push(EOF)');
+ return r.push(null);
+ }
+
+- console.error(' push #%d', pushes);
++ //console.error(' push #%d', pushes);
+ if (r.push(new Buffer(PUSHSIZE)))
+ setTimeout(push);
+ }
+diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js
+index 3e6931d..ff47d89 100644
+--- a/test/simple/test-stream2-objects.js
++++ b/test/simple/test-stream2-objects.js
+@@ -21,8 +21,8 @@
+
+
+ var common = require('../common.js');
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var assert = require('assert');
+
+ // tiny node-tap lookalike.
+diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js
+index cf7531c..e3f3e4e 100644
+--- a/test/simple/test-stream2-pipe-error-handling.js
++++ b/test/simple/test-stream2-pipe-error-handling.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+
+ (function testErrorListenerCatches() {
+ var count = 1000;
+diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js
+index 5e8e3cb..53b2616 100755
+--- a/test/simple/test-stream2-pipe-error-once-listener.js
++++ b/test/simple/test-stream2-pipe-error-once-listener.js
+@@ -24,7 +24,7 @@ var common = require('../common.js');
+ var assert = require('assert');
+
+ var util = require('util');
+-var stream = require('stream');
++var stream = require('../../');
+
+
+ var Read = function() {
+diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js
+index b63edc3..eb2b0e9 100644
+--- a/test/simple/test-stream2-push.js
++++ b/test/simple/test-stream2-push.js
+@@ -20,7 +20,7 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var stream = require('stream');
++var stream = require('../../');
+ var Readable = stream.Readable;
+ var Writable = stream.Writable;
+ var assert = require('assert');
+diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js
+index e8a7305..9740a47 100644
+--- a/test/simple/test-stream2-read-sync-stack.js
++++ b/test/simple/test-stream2-read-sync-stack.js
+@@ -21,7 +21,7 @@
+
+ var common = require('../common');
+ var assert = require('assert');
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+ var r = new Readable();
+ var N = 256 * 1024;
+
+diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
+index cd30178..4b1659d 100644
+--- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js
++++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
+@@ -22,10 +22,9 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('stream').Readable;
++var Readable = require('../../').Readable;
+
+ test1();
+-test2();
+
+ function test1() {
+ var r = new Readable();
+@@ -88,31 +87,3 @@ function test1() {
+ console.log('ok');
+ });
+ }
+-
+-function test2() {
+- var r = new Readable({ encoding: 'base64' });
+- var reads = 5;
+- r._read = function(n) {
+- if (!reads--)
+- return r.push(null); // EOF
+- else
+- return r.push(new Buffer('x'));
+- };
+-
+- var results = [];
+- function flow() {
+- var chunk;
+- while (null !== (chunk = r.read()))
+- results.push(chunk + '');
+- }
+- r.on('readable', flow);
+- r.on('end', function() {
+- results.push('EOF');
+- });
+- flow();
+-
+- process.on('exit', function() {
+- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]);
+- console.log('ok');
+- });
+-}
+diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js
+index 7c96ffe..04a96f5 100644
+--- a/test/simple/test-stream2-readable-from-list.js
++++ b/test/simple/test-stream2-readable-from-list.js
+@@ -21,7 +21,7 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var fromList = require('_stream_readable')._fromList;
++var fromList = require('../../lib/_stream_readable')._fromList;
+
+ // tiny node-tap lookalike.
+ var tests = [];
+diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js
+index 675da8e..51fd3d5 100644
+--- a/test/simple/test-stream2-readable-legacy-drain.js
++++ b/test/simple/test-stream2-readable-legacy-drain.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Stream = require('stream');
++var Stream = require('../../');
+ var Readable = Stream.Readable;
+
+ var r = new Readable();
+diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js
+index 7314ae7..c971898 100644
+--- a/test/simple/test-stream2-readable-non-empty-end.js
++++ b/test/simple/test-stream2-readable-non-empty-end.js
+@@ -21,7 +21,7 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var Readable = require('_stream_readable');
++var Readable = require('../../lib/_stream_readable');
+
+ var len = 0;
+ var chunks = new Array(10);
+diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js
+index 2e5cf25..fd8a3dc 100644
+--- a/test/simple/test-stream2-readable-wrap-empty.js
++++ b/test/simple/test-stream2-readable-wrap-empty.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
++var Readable = require('../../lib/_stream_readable');
+ var EE = require('events').EventEmitter;
+
+ var oldStream = new EE();
+diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js
+index 90eea01..6b177f7 100644
+--- a/test/simple/test-stream2-readable-wrap.js
++++ b/test/simple/test-stream2-readable-wrap.js
+@@ -22,8 +22,8 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var Readable = require('_stream_readable');
+-var Writable = require('_stream_writable');
++var Readable = require('../../lib/_stream_readable');
++var Writable = require('../../lib/_stream_writable');
+ var EE = require('events').EventEmitter;
+
+ var testRuns = 0, completedRuns = 0;
+diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js
+index 5d2c32a..685531b 100644
+--- a/test/simple/test-stream2-set-encoding.js
++++ b/test/simple/test-stream2-set-encoding.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var R = require('_stream_readable');
++var R = require('../../lib/_stream_readable');
+ var util = require('util');
+
+ // tiny node-tap lookalike.
+diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js
+index 9c9ddd8..a0cacc6 100644
+--- a/test/simple/test-stream2-transform.js
++++ b/test/simple/test-stream2-transform.js
+@@ -21,8 +21,8 @@
+
+ var assert = require('assert');
+ var common = require('../common.js');
+-var PassThrough = require('_stream_passthrough');
+-var Transform = require('_stream_transform');
++var PassThrough = require('../../').PassThrough;
++var Transform = require('../../').Transform;
+
+ // tiny node-tap lookalike.
+ var tests = [];
+diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js
+index d66dc3c..365b327 100644
+--- a/test/simple/test-stream2-unpipe-drain.js
++++ b/test/simple/test-stream2-unpipe-drain.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+ var crypto = require('crypto');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js
+index 99f8746..17c92ae 100644
+--- a/test/simple/test-stream2-unpipe-leak.js
++++ b/test/simple/test-stream2-unpipe-leak.js
+@@ -22,7 +22,7 @@
+
+ var common = require('../common.js');
+ var assert = require('assert');
+-var stream = require('stream');
++var stream = require('../../');
+
+ var chunk = new Buffer('hallo');
+
+diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js
+index 704100c..209c3a6 100644
+--- a/test/simple/test-stream2-writable.js
++++ b/test/simple/test-stream2-writable.js
+@@ -20,8 +20,8 @@
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ var common = require('../common.js');
+-var W = require('_stream_writable');
+-var D = require('_stream_duplex');
++var W = require('../../').Writable;
++var D = require('../../').Duplex;
+ var assert = require('assert');
+
+ var util = require('util');
+diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js
+index b91bde3..2f72c15 100644
+--- a/test/simple/test-stream3-pause-then-read.js
++++ b/test/simple/test-stream3-pause-then-read.js
+@@ -22,7 +22,7 @@
+ var common = require('../common');
+ var assert = require('assert');
+
+-var stream = require('stream');
++var stream = require('../../');
+ var Readable = stream.Readable;
+ var Writable = stream.Writable;
+
diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000..b513d61
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,89 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+}
+/*</replacement>*/
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+forEach(objectKeys(Writable.prototype), function(method) {
+ if (!Duplex.prototype[method])
+ Duplex.prototype[method] = Writable.prototype[method];
+});
+
+function Duplex(options) {
+ if (!(this instanceof Duplex))
+ return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false)
+ this.readable = false;
+
+ if (options && options.writable === false)
+ this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false)
+ this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended)
+ return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ process.nextTick(this.end.bind(this));
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000..895ca50
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,46 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough))
+ return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function(chunk, encoding, cb) {
+ cb(null, chunk);
+};
diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000..19ab358
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,951 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+var EE = require('events').EventEmitter;
+
+/*<replacement>*/
+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+var Stream = require('stream');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var StringDecoder;
+
+
+/*<replacement>*/
+var debug = require('util');
+if (debug && debug.debuglog) {
+ debug = debug.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+
+util.inherits(Readable, Stream);
+
+function ReadableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.buffer = [];
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ if (!(this instanceof Readable))
+ return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function(chunk, encoding) {
+ var state = this._readableState;
+
+ if (util.isString(chunk) && !state.objectMode) {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = new Buffer(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function(chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (util.isNullOrUndefined(chunk)) {
+ state.reading = false;
+ if (!state.ended)
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var e = new Error('stream.unshift() after end event');
+ stream.emit('error', e);
+ } else {
+ if (state.decoder && !addToFront && !encoding)
+ chunk = state.decoder.write(chunk);
+
+ if (!addToFront)
+ state.reading = false;
+
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront)
+ state.buffer.unshift(chunk);
+ else
+ state.buffer.push(chunk);
+
+ if (state.needReadable)
+ emitReadable(stream);
+ }
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended &&
+ (state.needReadable ||
+ state.length < state.highWaterMark ||
+ state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function(enc) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 128MB
+var MAX_HWM = 0x800000;
+function roundUpToNextPowerOf2(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2
+ n--;
+ for (var p = 1; p < 32; p <<= 1) n |= n >> p;
+ n++;
+ }
+ return n;
+}
+
+function howMuchToRead(n, state) {
+ if (state.length === 0 && state.ended)
+ return 0;
+
+ if (state.objectMode)
+ return n === 0 ? 0 : 1;
+
+ if (isNaN(n) || util.isNull(n)) {
+ // only flow one buffer at a time
+ if (state.flowing && state.buffer.length)
+ return state.buffer[0].length;
+ else
+ return state.length;
+ }
+
+ if (n <= 0)
+ return 0;
+
+ // If we're asking for more than the target buffer level,
+ // then raise the water mark. Bump up to the next highest
+ // power of 2, to prevent increasing it excessively in tiny
+ // amounts.
+ if (n > state.highWaterMark)
+ state.highWaterMark = roundUpToNextPowerOf2(n);
+
+ // don't have that much. return null, unless we've ended.
+ if (n > state.length) {
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ } else
+ return state.length;
+ }
+
+ return n;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function(n) {
+ debug('read', n);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (!util.isNumber(n) || n > 0)
+ state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 &&
+ state.needReadable &&
+ (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended)
+ endReadable(this);
+ else
+ emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0)
+ endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ }
+
+ if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0)
+ state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ }
+
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (doRead && !state.reading)
+ n = howMuchToRead(nOrig, state);
+
+ var ret;
+ if (n > 0)
+ ret = fromList(n, state);
+ else
+ ret = null;
+
+ if (util.isNull(ret)) {
+ state.needReadable = true;
+ n = 0;
+ }
+
+ state.length -= n;
+
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (state.length === 0 && !state.ended)
+ state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended && state.length === 0)
+ endReadable(this);
+
+ if (!util.isNull(ret))
+ this.emit('data', ret);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+
+function onEofChunk(stream, state) {
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync)
+ process.nextTick(function() {
+ emitReadable_(stream);
+ });
+ else
+ emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ process.nextTick(function() {
+ maybeReadMore_(stream, state);
+ });
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended &&
+ state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;
+ else
+ len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function(n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function(dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
+ dest !== process.stdout &&
+ dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted)
+ process.nextTick(endFn);
+ else
+ src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain &&
+ (!dest._writableState || dest._writableState.needDrain))
+ ondrain();
+ }
+
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ if (false === ret) {
+ debug('false write response, pause',
+ src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EE.listenerCount(dest, 'error') === 0)
+ dest.emit('error', er);
+ }
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS.
+ if (!dest._events || !dest._events.error)
+ dest.on('error', onerror);
+ else if (isArray(dest._events.error))
+ dest._events.error.unshift(onerror);
+ else
+ dest._events.error = [onerror, dest._events.error];
+
+
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function() {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain)
+ state.awaitDrain--;
+ if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+
+Readable.prototype.unpipe = function(dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0)
+ return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes)
+ return this;
+
+ if (!dest)
+ dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest)
+ dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++)
+ dests[i].emit('unpipe', this);
+ return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1)
+ return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1)
+ state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function(ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ // If listening to data, and it has not explicitly been paused,
+ // then call resume to start the flow of data on the next tick.
+ if (ev === 'data' && false !== this._readableState.flowing) {
+ this.resume();
+ }
+
+ if (ev === 'readable' && this.readable) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ var self = this;
+ process.nextTick(function() {
+ debug('readable nexttick read 0');
+ self.read(0);
+ });
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function() {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ if (!state.reading) {
+ debug('resume read 0');
+ this.read(0);
+ }
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ process.nextTick(function() {
+ resume_(stream, state);
+ });
+ }
+}
+
+function resume_(stream, state) {
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading)
+ stream.read(0);
+}
+
+Readable.prototype.pause = function() {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ if (state.flowing) {
+ do {
+ var chunk = stream.read();
+ } while (null !== chunk && state.flowing);
+ }
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function(stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function() {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length)
+ self.push(chunk);
+ }
+
+ self.push(null);
+ });
+
+ stream.on('data', function(chunk) {
+ debug('wrapped data');
+ if (state.decoder)
+ chunk = state.decoder.write(chunk);
+ if (!chunk || !state.objectMode && !chunk.length)
+ return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
+ this[i] = function(method) { return function() {
+ return stream[method].apply(stream, arguments);
+ }}(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function(ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function(n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
+};
+
+
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+function fromList(n, state) {
+ var list = state.buffer;
+ var length = state.length;
+ var stringMode = !!state.decoder;
+ var objectMode = !!state.objectMode;
+ var ret;
+
+ // nothing in the list, definitely empty.
+ if (list.length === 0)
+ return null;
+
+ if (length === 0)
+ ret = null;
+ else if (objectMode)
+ ret = list.shift();
+ else if (!n || n >= length) {
+ // read it all, truncate the array.
+ if (stringMode)
+ ret = list.join('');
+ else
+ ret = Buffer.concat(list, length);
+ list.length = 0;
+ } else {
+ // read just some of it.
+ if (n < list[0].length) {
+ // just take a part of the first list item.
+ // slice is the same for buffers and strings.
+ var buf = list[0];
+ ret = buf.slice(0, n);
+ list[0] = buf.slice(n);
+ } else if (n === list[0].length) {
+ // first list is a perfect match
+ ret = list.shift();
+ } else {
+ // complex case.
+ // we have enough to cover it, but it spans past the first buffer.
+ if (stringMode)
+ ret = '';
+ else
+ ret = new Buffer(n);
+
+ var c = 0;
+ for (var i = 0, l = list.length; i < l && c < n; i++) {
+ var buf = list[0];
+ var cpy = Math.min(n - c, buf.length);
+
+ if (stringMode)
+ ret += buf.slice(0, cpy);
+ else
+ buf.copy(ret, c, 0, cpy);
+
+ if (cpy < buf.length)
+ list[0] = buf.slice(cpy);
+ else
+ list.shift();
+
+ c += cpy;
+ }
+ }
+ }
+
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0)
+ throw new Error('endReadable called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ process.nextTick(function() {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+ });
+ }
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf (xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000..905c5e4
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,209 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+
+function TransformState(options, stream) {
+ this.afterTransform = function(er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb)
+ return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (!util.isNullOrUndefined(data))
+ stream.push(data);
+
+ if (cb)
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+
+function Transform(options) {
+ if (!(this instanceof Transform))
+ return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = new TransformState(options, this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ this.once('prefinish', function() {
+ if (util.isFunction(this._flush))
+ this._flush(function(er) {
+ done(stream, er);
+ });
+ else
+ done(stream);
+ });
+}
+
+Transform.prototype.push = function(chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function(chunk, encoding, cb) {
+ throw new Error('not implemented');
+};
+
+Transform.prototype._write = function(chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform ||
+ rs.needReadable ||
+ rs.length < rs.highWaterMark)
+ this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function(n) {
+ var ts = this._transformState;
+
+ if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+
+function done(stream, er) {
+ if (er)
+ return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+
+ if (ws.length)
+ throw new Error('calling transform done when ws.length != 0');
+
+ if (ts.transforming)
+ throw new Error('calling transform done when still transforming');
+
+ return stream.push(null);
+}
diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000..db8539c
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,477 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, cb), and it'll handle all
+// the drain event emission and buffering.
+
+module.exports = Writable;
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Stream = require('stream');
+
+util.inherits(Writable, Stream);
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+}
+
+function WritableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function(er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.buffer = [];
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+}
+
+function Writable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function() {
+ this.emit('error', new Error('Cannot pipe. Not readable.'));
+};
+
+
+function writeAfterEnd(stream, state, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ var er = new TypeError('Invalid non-string/buffer chunk');
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function(chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ else if (!encoding)
+ encoding = state.defaultEncoding;
+
+ if (!util.isFunction(cb))
+ cb = function() {};
+
+ if (state.ended)
+ writeAfterEnd(this, state, cb);
+ else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function() {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function() {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing &&
+ !state.corked &&
+ !state.finished &&
+ !state.bufferProcessing &&
+ state.buffer.length)
+ clearBuffer(this, state);
+ }
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode &&
+ state.decodeStrings !== false &&
+ util.isString(chunk)) {
+ chunk = new Buffer(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret)
+ state.needDrain = true;
+
+ if (state.writing || state.corked)
+ state.buffer.push(new WriteReq(chunk, encoding, cb));
+ else
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev)
+ stream._writev(chunk, state.onwrite);
+ else
+ stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ if (sync)
+ process.nextTick(function() {
+ state.pendingcb--;
+ cb(er);
+ });
+ else {
+ state.pendingcb--;
+ cb(er);
+ }
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er)
+ onwriteError(stream, state, sync, er, cb);
+ else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(stream, state);
+
+ if (!finished &&
+ !state.corked &&
+ !state.bufferProcessing &&
+ state.buffer.length) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ process.nextTick(function() {
+ afterWrite(stream, state, finished, cb);
+ });
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished)
+ onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+
+ if (stream._writev && state.buffer.length > 1) {
+ // Fast case, write everything using _writev()
+ var cbs = [];
+ for (var c = 0; c < state.buffer.length; c++)
+ cbs.push(state.buffer[c].callback);
+
+ // count the one we are adding, as well.
+ // TODO(isaacs) clean this up
+ state.pendingcb++;
+ doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
+ for (var i = 0; i < cbs.length; i++) {
+ state.pendingcb--;
+ cbs[i](err);
+ }
+ });
+
+ // Clear buffer
+ state.buffer = [];
+ } else {
+ // Slow case, write chunks one-by-one
+ for (var c = 0; c < state.buffer.length; c++) {
+ var entry = state.buffer[c];
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ c++;
+ break;
+ }
+ }
+
+ if (c < state.buffer.length)
+ state.buffer = state.buffer.slice(c);
+ else
+ state.buffer.length = 0;
+ }
+
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function(chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function(chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (util.isFunction(chunk)) {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (!util.isNullOrUndefined(chunk))
+ this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished)
+ endWritable(this, state, cb);
+};
+
+
+function needFinish(stream, state) {
+ return (state.ending &&
+ state.length === 0 &&
+ !state.finished &&
+ !state.writing);
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(stream, state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else
+ prefinish(stream, state);
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished)
+ process.nextTick(cb);
+ else
+ stream.once('finish', cb);
+ }
+ state.ended = true;
+}
diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json
new file mode 100644
index 0000000..0bb83ed
--- /dev/null
+++ b/node_modules/readable-stream/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "readable-stream",
+ "version": "1.1.14",
+ "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x",
+ "main": "readable.js",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x",
+ "inherits": "~2.0.1"
+ },
+ "devDependencies": {
+ "tap": "~0.2.6"
+ },
+ "scripts": {
+ "test": "tap test/simple/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/readable-stream"
+ },
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "browser": {
+ "util": false
+ },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "MIT"
+}
diff --git a/node_modules/readable-stream/passthrough.js b/node_modules/readable-stream/passthrough.js
new file mode 100644
index 0000000..27e8d8a
--- /dev/null
+++ b/node_modules/readable-stream/passthrough.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_passthrough.js")
diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000..2a8b5c6
--- /dev/null
+++ b/node_modules/readable-stream/readable.js
@@ -0,0 +1,10 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = require('stream');
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
+if (!process.browser && process.env.READABLE_STREAM === 'disable') {
+ module.exports = require('stream');
+}
diff --git a/node_modules/readable-stream/transform.js b/node_modules/readable-stream/transform.js
new file mode 100644
index 0000000..5d482f0
--- /dev/null
+++ b/node_modules/readable-stream/transform.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_transform.js")
diff --git a/node_modules/readable-stream/writable.js b/node_modules/readable-stream/writable.js
new file mode 100644
index 0000000..e1e9efd
--- /dev/null
+++ b/node_modules/readable-stream/writable.js
@@ -0,0 +1 @@
+module.exports = require("./lib/_stream_writable.js")
diff --git a/node_modules/redent/index.js b/node_modules/redent/index.js
new file mode 100644
index 0000000..2b92020
--- /dev/null
+++ b/node_modules/redent/index.js
@@ -0,0 +1,7 @@
+'use strict';
+var stripIndent = require('strip-indent');
+var indentString = require('indent-string');
+
+module.exports = function (str, count, indent) {
+ return indentString(stripIndent(str), indent || ' ', count || 0);
+};
diff --git a/node_modules/redent/license b/node_modules/redent/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/redent/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/redent/package.json b/node_modules/redent/package.json
new file mode 100644
index 0000000..3a28a27
--- /dev/null
+++ b/node_modules/redent/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "redent",
+ "version": "1.0.0",
+ "description": "Strip redundant indentation and indent the string",
+ "license": "MIT",
+ "repository": "sindresorhus/redent",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "string",
+ "str",
+ "strip",
+ "trim",
+ "indent",
+ "indentation",
+ "add",
+ "reindent",
+ "normalize",
+ "remove",
+ "whitespace",
+ "space"
+ ],
+ "dependencies": {
+ "indent-string": "^2.1.0",
+ "strip-indent": "^1.0.1"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/redent/readme.md b/node_modules/redent/readme.md
new file mode 100644
index 0000000..8e7a807
--- /dev/null
+++ b/node_modules/redent/readme.md
@@ -0,0 +1,48 @@
+# redent [![Build Status](https://travis-ci.org/sindresorhus/redent.svg?branch=master)](https://travis-ci.org/sindresorhus/redent)
+
+> [Strip redundant indentation](https://github.com/sindresorhus/strip-indent) and [indent the string](https://github.com/sindresorhus/indent-string)
+
+
+## Install
+
+```
+$ npm install --save redent
+```
+
+
+## Usage
+
+```js
+const redent = require('redent');
+
+redent('\n foo\n bar\n', 1);
+//=> '\n foo\n bar\n'
+```
+
+
+## API
+
+### redent(input, [count], [indent])
+
+#### input
+
+Type: `string`
+
+#### count
+
+Type: `number`
+Default: `0`
+
+How many times you want `indent` repeated.
+
+#### indent
+
+Type: `string`
+Default: `' '`
+
+The string to use for the indent.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/repeating/index.js b/node_modules/repeating/index.js
new file mode 100644
index 0000000..ccae0d7
--- /dev/null
+++ b/node_modules/repeating/index.js
@@ -0,0 +1,24 @@
+'use strict';
+var isFinite = require('is-finite');
+
+module.exports = function (str, n) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected `input` to be a string');
+ }
+
+ if (n < 0 || !isFinite(n)) {
+ throw new TypeError('Expected `count` to be a positive finite number');
+ }
+
+ var ret = '';
+
+ do {
+ if (n & 1) {
+ ret += str;
+ }
+
+ str += str;
+ } while ((n >>= 1));
+
+ return ret;
+};
diff --git a/node_modules/repeating/license b/node_modules/repeating/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/repeating/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/repeating/package.json b/node_modules/repeating/package.json
new file mode 100644
index 0000000..0247a23
--- /dev/null
+++ b/node_modules/repeating/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "repeating",
+ "version": "2.0.1",
+ "description": "Repeat a string - fast",
+ "license": "MIT",
+ "repository": "sindresorhus/repeating",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "repeat",
+ "string",
+ "repeating",
+ "str",
+ "text",
+ "fill",
+ "pad"
+ ],
+ "dependencies": {
+ "is-finite": "^1.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/repeating/readme.md b/node_modules/repeating/readme.md
new file mode 100644
index 0000000..06f0b69
--- /dev/null
+++ b/node_modules/repeating/readme.md
@@ -0,0 +1,30 @@
+# repeating [![Build Status](https://travis-ci.org/sindresorhus/repeating.svg?branch=master)](https://travis-ci.org/sindresorhus/repeating)
+
+> Repeat a string - fast
+
+
+## Install
+
+```
+$ npm install --save repeating
+```
+
+
+## Usage
+
+```js
+const repeating = require('repeating');
+
+repeating('unicorn ', 100);
+//=> 'unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn '
+```
+
+
+## Related
+
+- [repeating-cli](https://github.com/sindresorhus/repeating-cli) - CLI for this module
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/request/CHANGELOG.md b/node_modules/request/CHANGELOG.md
new file mode 100644
index 0000000..d3ffcd0
--- /dev/null
+++ b/node_modules/request/CHANGELOG.md
@@ -0,0 +1,717 @@
+## Change Log
+
+### v2.88.0 (2018/08/10)
+- [#2996](https://github.com/request/request/pull/2996) fix(uuid): import versioned uuid (@kwonoj)
+- [#2994](https://github.com/request/request/pull/2994) Update to oauth-sign 0.9.0 (@dlecocq)
+- [#2993](https://github.com/request/request/pull/2993) Fix header tests (@simov)
+- [#2904](https://github.com/request/request/pull/2904) #515, #2894 Strip port suffix from Host header if the protocol is known. (#2904) (@paambaati)
+- [#2791](https://github.com/request/request/pull/2791) Improve AWS SigV4 support. (#2791) (@vikhyat)
+- [#2977](https://github.com/request/request/pull/2977) Update test certificates (@simov)
+
+### v2.87.0 (2018/05/21)
+- [#2943](https://github.com/request/request/pull/2943) Replace hawk dependency with a local implemenation (#2943) (@hueniverse)
+
+### v2.86.0 (2018/05/15)
+- [#2885](https://github.com/request/request/pull/2885) Remove redundant code (for Node.js 0.9.4 and below) and dependency (@ChALkeR)
+- [#2942](https://github.com/request/request/pull/2942) Make Test GREEN Again! (@simov)
+- [#2923](https://github.com/request/request/pull/2923) Alterations for failing CI tests (@gareth-robinson)
+
+### v2.85.0 (2018/03/12)
+- [#2880](https://github.com/request/request/pull/2880) Revert "Update hawk to 7.0.7 (#2880)" (@simov)
+
+### v2.84.0 (2018/03/12)
+- [#2793](https://github.com/request/request/pull/2793) Fixed calculation of oauth_body_hash, issue #2792 (@dvishniakov)
+- [#2880](https://github.com/request/request/pull/2880) Update hawk to 7.0.7 (#2880) (@kornel-kedzierski)
+
+### v2.83.0 (2017/09/27)
+- [#2776](https://github.com/request/request/pull/2776) Updating tough-cookie due to security fix. (#2776) (@karlnorling)
+
+### v2.82.0 (2017/09/19)
+- [#2703](https://github.com/request/request/pull/2703) Add Node.js v8 to Travis CI (@ryysud)
+- [#2751](https://github.com/request/request/pull/2751) Update of hawk and qs to latest version (#2751) (@Olivier-Moreau)
+- [#2658](https://github.com/request/request/pull/2658) Fixed some text in README.md (#2658) (@Marketionist)
+- [#2635](https://github.com/request/request/pull/2635) chore(package): update aws-sign2 to version 0.7.0 (#2635) (@greenkeeperio-bot)
+- [#2641](https://github.com/request/request/pull/2641) Update README to simplify & update convenience methods (#2641) (@FredKSchott)
+- [#2541](https://github.com/request/request/pull/2541) Add convenience method for HTTP OPTIONS (#2541) (@jamesseanwright)
+- [#2605](https://github.com/request/request/pull/2605) Add promise support section to README (#2605) (@FredKSchott)
+- [#2579](https://github.com/request/request/pull/2579) refactor(lint): replace eslint with standard (#2579) (@ahmadnassri)
+- [#2598](https://github.com/request/request/pull/2598) Update codecov to version 2.0.2 🚀 (@greenkeeperio-bot)
+- [#2590](https://github.com/request/request/pull/2590) Adds test-timing keepAlive test (@nicjansma)
+- [#2589](https://github.com/request/request/pull/2589) fix tabulation on request example README.MD (@odykyi)
+- [#2594](https://github.com/request/request/pull/2594) chore(dependencies): har-validator to 5.x [removes babel dep] (@ahmadnassri)
+
+### v2.81.0 (2017/03/09)
+- [#2584](https://github.com/request/request/pull/2584) Security issue: Upgrade qs to version 6.4.0 (@sergejmueller)
+- [#2578](https://github.com/request/request/pull/2578) safe-buffer doesn't zero-fill by default, its just a polyfill. (#2578) (@mikeal)
+- [#2566](https://github.com/request/request/pull/2566) Timings: Tracks 'lookup', adds 'wait' time, fixes connection re-use (#2566) (@nicjansma)
+- [#2574](https://github.com/request/request/pull/2574) Migrating to safe-buffer for improved security. (@mikeal)
+- [#2573](https://github.com/request/request/pull/2573) fixes #2572 (@ahmadnassri)
+
+### v2.80.0 (2017/03/04)
+- [#2571](https://github.com/request/request/pull/2571) Correctly format the Host header for IPv6 addresses (@JamesMGreene)
+- [#2558](https://github.com/request/request/pull/2558) Update README.md example snippet (@FredKSchott)
+- [#2221](https://github.com/request/request/pull/2221) Adding a simple Response object reference in argument specification (@calamarico)
+- [#2452](https://github.com/request/request/pull/2452) Adds .timings array with DNC, TCP, request and response times (@nicjansma)
+- [#2553](https://github.com/request/request/pull/2553) add ISSUE_TEMPLATE, move PR template (@FredKSchott)
+- [#2539](https://github.com/request/request/pull/2539) Create PULL_REQUEST_TEMPLATE.md (@FredKSchott)
+- [#2524](https://github.com/request/request/pull/2524) Update caseless to version 0.12.0 🚀 (@greenkeeperio-bot)
+- [#2460](https://github.com/request/request/pull/2460) Fix wrong MIME type in example (@OwnageIsMagic)
+- [#2514](https://github.com/request/request/pull/2514) Change tags to keywords in package.json (@humphd)
+- [#2492](https://github.com/request/request/pull/2492) More lenient gzip decompression (@addaleax)
+
+### v2.79.0 (2016/11/18)
+- [#2368](https://github.com/request/request/pull/2368) Fix typeof check in test-pool.js (@forivall)
+- [#2394](https://github.com/request/request/pull/2394) Use `files` in package.json (@SimenB)
+- [#2463](https://github.com/request/request/pull/2463) AWS support for session tokens for temporary credentials (@simov)
+- [#2467](https://github.com/request/request/pull/2467) Migrate to uuid (@simov, @antialias)
+- [#2459](https://github.com/request/request/pull/2459) Update taper to version 0.5.0 🚀 (@greenkeeperio-bot)
+- [#2448](https://github.com/request/request/pull/2448) Make other connect timeout test more reliable too (@mscdex)
+
+### v2.78.0 (2016/11/03)
+- [#2447](https://github.com/request/request/pull/2447) Always set request timeout on keep-alive connections (@mscdex)
+
+### v2.77.0 (2016/11/03)
+- [#2439](https://github.com/request/request/pull/2439) Fix socket 'connect' listener handling (@mscdex)
+- [#2442](https://github.com/request/request/pull/2442) 👻😱 Node.js 0.10 is unmaintained 😱👻 (@greenkeeperio-bot)
+- [#2435](https://github.com/request/request/pull/2435) Add followOriginalHttpMethod to redirect to original HTTP method (@kirrg001)
+- [#2414](https://github.com/request/request/pull/2414) Improve test-timeout reliability (@mscdex)
+
+### v2.76.0 (2016/10/25)
+- [#2424](https://github.com/request/request/pull/2424) Handle buffers directly instead of using "bl" (@zertosh)
+- [#2415](https://github.com/request/request/pull/2415) Re-enable timeout tests on Travis + other fixes (@mscdex)
+- [#2431](https://github.com/request/request/pull/2431) Improve timeouts accuracy and node v6.8.0+ compatibility (@mscdex, @greenkeeperio-bot)
+- [#2428](https://github.com/request/request/pull/2428) Update qs to version 6.3.0 🚀 (@greenkeeperio-bot)
+- [#2420](https://github.com/request/request/pull/2420) change .on to .once, remove possible memory leaks (@duereg)
+- [#2426](https://github.com/request/request/pull/2426) Remove "isFunction" helper in favor of "typeof" check (@zertosh)
+- [#2425](https://github.com/request/request/pull/2425) Simplify "defer" helper creation (@zertosh)
+- [#2402](https://github.com/request/request/pull/2402) form-data@2.1.1 breaks build 🚨 (@greenkeeperio-bot)
+- [#2393](https://github.com/request/request/pull/2393) Update form-data to version 2.1.0 🚀 (@greenkeeperio-bot)
+
+### v2.75.0 (2016/09/17)
+- [#2381](https://github.com/request/request/pull/2381) Drop support for Node 0.10 (@simov)
+- [#2377](https://github.com/request/request/pull/2377) Update form-data to version 2.0.0 🚀 (@greenkeeperio-bot)
+- [#2353](https://github.com/request/request/pull/2353) Add greenkeeper ignored packages (@simov)
+- [#2351](https://github.com/request/request/pull/2351) Update karma-tap to version 3.0.1 🚀 (@greenkeeperio-bot)
+- [#2348](https://github.com/request/request/pull/2348) form-data@1.0.1 breaks build 🚨 (@greenkeeperio-bot)
+- [#2349](https://github.com/request/request/pull/2349) Check error type instead of string (@scotttrinh)
+
+### v2.74.0 (2016/07/22)
+- [#2295](https://github.com/request/request/pull/2295) Update tough-cookie to 2.3.0 (@stash-sfdc)
+- [#2280](https://github.com/request/request/pull/2280) Update karma-tap to version 2.0.1 🚀 (@greenkeeperio-bot)
+
+### v2.73.0 (2016/07/09)
+- [#2240](https://github.com/request/request/pull/2240) Remove connectionErrorHandler to fix #1903 (@zarenner)
+- [#2251](https://github.com/request/request/pull/2251) tape@4.6.0 breaks build 🚨 (@greenkeeperio-bot)
+- [#2225](https://github.com/request/request/pull/2225) Update docs (@ArtskydJ)
+- [#2203](https://github.com/request/request/pull/2203) Update browserify to version 13.0.1 🚀 (@greenkeeperio-bot)
+- [#2275](https://github.com/request/request/pull/2275) Update karma to version 1.1.1 🚀 (@greenkeeperio-bot)
+- [#2204](https://github.com/request/request/pull/2204) Add codecov.yml and disable PR comments (@simov)
+- [#2212](https://github.com/request/request/pull/2212) Fix link to http.IncomingMessage documentation (@nazieb)
+- [#2208](https://github.com/request/request/pull/2208) Update to form-data RC4 and pass null values to it (@simov)
+- [#2207](https://github.com/request/request/pull/2207) Move aws4 require statement to the top (@simov)
+- [#2199](https://github.com/request/request/pull/2199) Update karma-coverage to version 1.0.0 🚀 (@greenkeeperio-bot)
+- [#2206](https://github.com/request/request/pull/2206) Update qs to version 6.2.0 🚀 (@greenkeeperio-bot)
+- [#2205](https://github.com/request/request/pull/2205) Use server-destory to close hanging sockets in tests (@simov)
+- [#2200](https://github.com/request/request/pull/2200) Update karma-cli to version 1.0.0 🚀 (@greenkeeperio-bot)
+
+### v2.72.0 (2016/04/17)
+- [#2176](https://github.com/request/request/pull/2176) Do not try to pipe Gzip responses with no body (@simov)
+- [#2175](https://github.com/request/request/pull/2175) Add 'delete' alias for the 'del' API method (@simov, @MuhanZou)
+- [#2172](https://github.com/request/request/pull/2172) Add support for deflate content encoding (@czardoz)
+- [#2169](https://github.com/request/request/pull/2169) Add callback option (@simov)
+- [#2165](https://github.com/request/request/pull/2165) Check for self.req existence inside the write method (@simov)
+- [#2167](https://github.com/request/request/pull/2167) Fix TravisCI badge reference master branch (@a0viedo)
+
+### v2.71.0 (2016/04/12)
+- [#2164](https://github.com/request/request/pull/2164) Catch errors from the underlying http module (@simov)
+
+### v2.70.0 (2016/04/05)
+- [#2147](https://github.com/request/request/pull/2147) Update eslint to version 2.5.3 🚀 (@simov, @greenkeeperio-bot)
+- [#2009](https://github.com/request/request/pull/2009) Support JSON stringify replacer argument. (@elyobo)
+- [#2142](https://github.com/request/request/pull/2142) Update eslint to version 2.5.1 🚀 (@greenkeeperio-bot)
+- [#2128](https://github.com/request/request/pull/2128) Update browserify-istanbul to version 2.0.0 🚀 (@greenkeeperio-bot)
+- [#2115](https://github.com/request/request/pull/2115) Update eslint to version 2.3.0 🚀 (@simov, @greenkeeperio-bot)
+- [#2089](https://github.com/request/request/pull/2089) Fix badges (@simov)
+- [#2092](https://github.com/request/request/pull/2092) Update browserify-istanbul to version 1.0.0 🚀 (@greenkeeperio-bot)
+- [#2079](https://github.com/request/request/pull/2079) Accept read stream as body option (@simov)
+- [#2070](https://github.com/request/request/pull/2070) Update bl to version 1.1.2 🚀 (@greenkeeperio-bot)
+- [#2063](https://github.com/request/request/pull/2063) Up bluebird and oauth-sign (@simov)
+- [#2058](https://github.com/request/request/pull/2058) Karma fixes for latest versions (@eiriksm)
+- [#2057](https://github.com/request/request/pull/2057) Update contributing guidelines (@simov)
+- [#2054](https://github.com/request/request/pull/2054) Update qs to version 6.1.0 🚀 (@greenkeeperio-bot)
+
+### v2.69.0 (2016/01/27)
+- [#2041](https://github.com/request/request/pull/2041) restore aws4 as regular dependency (@rmg)
+
+### v2.68.0 (2016/01/27)
+- [#2036](https://github.com/request/request/pull/2036) Add AWS Signature Version 4 (@simov, @mirkods)
+- [#2022](https://github.com/request/request/pull/2022) Convert numeric multipart bodies to string (@simov, @feross)
+- [#2024](https://github.com/request/request/pull/2024) Update har-validator dependency for nsp advisory #76 (@TylerDixon)
+- [#2016](https://github.com/request/request/pull/2016) Update qs to version 6.0.2 🚀 (@greenkeeperio-bot)
+- [#2007](https://github.com/request/request/pull/2007) Use the `extend` module instead of util._extend (@simov)
+- [#2003](https://github.com/request/request/pull/2003) Update browserify to version 13.0.0 🚀 (@greenkeeperio-bot)
+- [#1989](https://github.com/request/request/pull/1989) Update buffer-equal to version 1.0.0 🚀 (@greenkeeperio-bot)
+- [#1956](https://github.com/request/request/pull/1956) Check form-data content-length value before setting up the header (@jongyoonlee)
+- [#1958](https://github.com/request/request/pull/1958) Use IncomingMessage.destroy method (@simov)
+- [#1952](https://github.com/request/request/pull/1952) Adds example for Tor proxy (@prometheansacrifice)
+- [#1943](https://github.com/request/request/pull/1943) Update eslint to version 1.10.3 🚀 (@simov, @greenkeeperio-bot)
+- [#1924](https://github.com/request/request/pull/1924) Update eslint to version 1.10.1 🚀 (@greenkeeperio-bot)
+- [#1915](https://github.com/request/request/pull/1915) Remove content-length and transfer-encoding headers from defaultProxyHeaderWhiteList (@yaxia)
+
+### v2.67.0 (2015/11/19)
+- [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot)
+
+### v2.66.0 (2015/11/18)
+- [#1906](https://github.com/request/request/pull/1906) Update README URLs based on HTTP redirects (@ReadmeCritic)
+- [#1905](https://github.com/request/request/pull/1905) Convert typed arrays into regular buffers (@simov)
+- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot)
+- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms)
+- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot)
+- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @nsklkn, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @KoltesDigital)
+- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov)
+- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot)
+- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot)
+- [#1866](https://github.com/request/request/pull/1866) Add missing quotes on x-token property in README (@miguelmota)
+- [#1874](https://github.com/request/request/pull/1874) Fix typo in README.md (@gswalden)
+- [#1860](https://github.com/request/request/pull/1860) Improve referer header tests and docs (@simov)
+- [#1861](https://github.com/request/request/pull/1861) Remove redundant call to Stream constructor (@watson)
+- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov)
+- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot)
+- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov)
+- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@KoltesDigital)
+- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu)
+- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot)
+- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot)
+
+### v2.65.0 (2015/10/11)
+- [#1833](https://github.com/request/request/pull/1833) Update aws-sign2 to version 0.6.0 🚀 (@greenkeeperio-bot)
+- [#1811](https://github.com/request/request/pull/1811) Enable loose cookie parsing in tough-cookie (@Sebmaster)
+- [#1830](https://github.com/request/request/pull/1830) Bring back tilde ranges for all dependencies (@simov)
+- [#1821](https://github.com/request/request/pull/1821) Implement support for RFC 2617 MD5-sess algorithm. (@BigDSK)
+- [#1828](https://github.com/request/request/pull/1828) Updated qs dependency to 5.2.0 (@acroca)
+- [#1818](https://github.com/request/request/pull/1818) Extract `readResponseBody` method out of `onRequestResponse` (@pvoisin)
+- [#1819](https://github.com/request/request/pull/1819) Run stringify once (@mgenereu)
+- [#1814](https://github.com/request/request/pull/1814) Updated har-validator to version 2.0.2 (@greenkeeperio-bot)
+- [#1807](https://github.com/request/request/pull/1807) Updated tough-cookie to version 2.1.0 (@greenkeeperio-bot)
+- [#1800](https://github.com/request/request/pull/1800) Add caret ranges for devDependencies, except eslint (@simov)
+- [#1799](https://github.com/request/request/pull/1799) Updated karma-browserify to version 4.4.0 (@greenkeeperio-bot)
+- [#1797](https://github.com/request/request/pull/1797) Updated tape to version 4.2.0 (@greenkeeperio-bot)
+- [#1788](https://github.com/request/request/pull/1788) Pinned all dependencies (@greenkeeperio-bot)
+
+### v2.64.0 (2015/09/25)
+- [#1787](https://github.com/request/request/pull/1787) npm ignore examples, release.sh and disabled.appveyor.yml (@thisconnect)
+- [#1775](https://github.com/request/request/pull/1775) Fix typo in README.md (@djchie)
+- [#1776](https://github.com/request/request/pull/1776) Changed word 'conjuction' to read 'conjunction' in README.md (@ryanwholey)
+- [#1785](https://github.com/request/request/pull/1785) Revert: Set default application/json content-type when using json option #1772 (@simov)
+
+### v2.63.0 (2015/09/21)
+- [#1772](https://github.com/request/request/pull/1772) Set default application/json content-type when using json option (@jzaefferer)
+
+### v2.62.0 (2015/09/15)
+- [#1768](https://github.com/request/request/pull/1768) Add node 4.0 to the list of build targets (@simov)
+- [#1767](https://github.com/request/request/pull/1767) Query strings now cooperate with unix sockets (@JoshWillik)
+- [#1750](https://github.com/request/request/pull/1750) Revert doc about installation of tough-cookie added in #884 (@LoicMahieu)
+- [#1746](https://github.com/request/request/pull/1746) Missed comma in Readme (@nsklkn)
+- [#1743](https://github.com/request/request/pull/1743) Fix options not being initialized in defaults method (@simov)
+
+### v2.61.0 (2015/08/19)
+- [#1721](https://github.com/request/request/pull/1721) Minor fix in README.md (@arbaaz)
+- [#1733](https://github.com/request/request/pull/1733) Avoid useless Buffer transformation (@michelsalib)
+- [#1726](https://github.com/request/request/pull/1726) Update README.md (@paulomcnally)
+- [#1715](https://github.com/request/request/pull/1715) Fix forever option in node > 0.10 #1709 (@calibr)
+- [#1716](https://github.com/request/request/pull/1716) Do not create Buffer from Object in setContentLength(iojs v3.0 issue) (@calibr)
+- [#1711](https://github.com/request/request/pull/1711) Add ability to detect connect timeouts (@kevinburke)
+- [#1712](https://github.com/request/request/pull/1712) Set certificate expiration to August 2, 2018 (@kevinburke)
+- [#1700](https://github.com/request/request/pull/1700) debug() when JSON.parse() on a response body fails (@phillipj)
+
+### v2.60.0 (2015/07/21)
+- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews)
+
+### v2.59.0 (2015/07/20)
+- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options.
+ Forever option defaults to using http(s).Agent in node 0.12+ (@simov)
+- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman)
+- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme)
+- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov)
+- [#1651](https://github.com/request/request/pull/1651) Preserve HEAD method when using followAllRedirects (@simov)
+- [#1652](https://github.com/request/request/pull/1652) Update `encoding` option documentation in README.md (@daniel347x)
+- [#1650](https://github.com/request/request/pull/1650) Allow content-type overriding when using the `form` option (@simov)
+- [#1646](https://github.com/request/request/pull/1646) Clarify the nature of setting `ca` in `agentOptions` (@jeffcharles)
+
+### v2.58.0 (2015/06/16)
+- [#1638](https://github.com/request/request/pull/1638) Use the `extend` module to deep extend in the defaults method (@simov)
+- [#1631](https://github.com/request/request/pull/1631) Move tunnel logic into separate module (@simov)
+- [#1634](https://github.com/request/request/pull/1634) Fix OAuth query transport_method (@simov)
+- [#1603](https://github.com/request/request/pull/1603) Add codecov (@simov)
+
+### v2.57.0 (2015/05/31)
+- [#1615](https://github.com/request/request/pull/1615) Replace '.client' with '.socket' as the former was deprecated in 2.2.0. (@ChALkeR)
+
+### v2.56.0 (2015/05/28)
+- [#1610](https://github.com/request/request/pull/1610) Bump module dependencies (@simov)
+- [#1600](https://github.com/request/request/pull/1600) Extract the querystring logic into separate module (@simov)
+- [#1607](https://github.com/request/request/pull/1607) Re-generate certificates (@simov)
+- [#1599](https://github.com/request/request/pull/1599) Move getProxyFromURI logic below the check for Invaild URI (#1595) (@simov)
+- [#1598](https://github.com/request/request/pull/1598) Fix the way http verbs are defined in order to please intellisense IDEs (@simov, @flannelJesus)
+- [#1591](https://github.com/request/request/pull/1591) A few minor fixes: (@simov)
+- [#1584](https://github.com/request/request/pull/1584) Refactor test-default tests (according to comments in #1430) (@simov)
+- [#1585](https://github.com/request/request/pull/1585) Fixing documentation regarding TLS options (#1583) (@mainakae)
+- [#1574](https://github.com/request/request/pull/1574) Refresh the oauth_nonce on redirect (#1573) (@simov)
+- [#1570](https://github.com/request/request/pull/1570) Discovered tests that weren't properly running (@seanstrom)
+- [#1569](https://github.com/request/request/pull/1569) Fix pause before response arrives (@kevinoid)
+- [#1558](https://github.com/request/request/pull/1558) Emit error instead of throw (@simov)
+- [#1568](https://github.com/request/request/pull/1568) Fix stall when piping gzipped response (@kevinoid)
+- [#1560](https://github.com/request/request/pull/1560) Update combined-stream (@apechimp)
+- [#1543](https://github.com/request/request/pull/1543) Initial support for oauth_body_hash on json payloads (@simov, @aesopwolf)
+- [#1541](https://github.com/request/request/pull/1541) Fix coveralls (@simov)
+- [#1540](https://github.com/request/request/pull/1540) Fix recursive defaults for convenience methods (@simov)
+- [#1536](https://github.com/request/request/pull/1536) More eslint style rules (@froatsnook)
+- [#1533](https://github.com/request/request/pull/1533) Adding dependency status bar to README.md (@YasharF)
+- [#1539](https://github.com/request/request/pull/1539) ensure the latest version of har-validator is included (@ahmadnassri)
+- [#1516](https://github.com/request/request/pull/1516) forever+pool test (@devTristan)
+
+### v2.55.0 (2015/04/05)
+- [#1520](https://github.com/request/request/pull/1520) Refactor defaults (@simov)
+- [#1525](https://github.com/request/request/pull/1525) Delete request headers with undefined value. (@froatsnook)
+- [#1521](https://github.com/request/request/pull/1521) Add promise tests (@simov)
+- [#1518](https://github.com/request/request/pull/1518) Fix defaults (@simov)
+- [#1515](https://github.com/request/request/pull/1515) Allow static invoking of convenience methods (@simov)
+- [#1505](https://github.com/request/request/pull/1505) Fix multipart boundary extraction regexp (@simov)
+- [#1510](https://github.com/request/request/pull/1510) Fix basic auth form data (@simov)
+
+### v2.54.0 (2015/03/24)
+- [#1501](https://github.com/request/request/pull/1501) HTTP Archive 1.2 support (@ahmadnassri)
+- [#1486](https://github.com/request/request/pull/1486) Add a test for the forever agent (@akshayp)
+- [#1500](https://github.com/request/request/pull/1500) Adding handling for no auth method and null bearer (@philberg)
+- [#1498](https://github.com/request/request/pull/1498) Add table of contents in readme (@simov)
+- [#1477](https://github.com/request/request/pull/1477) Add support for qs options via qsOptions key (@simov)
+- [#1496](https://github.com/request/request/pull/1496) Parameters encoded to base 64 should be decoded as UTF-8, not ASCII. (@albanm)
+- [#1494](https://github.com/request/request/pull/1494) Update eslint (@froatsnook)
+- [#1474](https://github.com/request/request/pull/1474) Require Colon in Basic Auth (@erykwalder)
+- [#1481](https://github.com/request/request/pull/1481) Fix baseUrl and redirections. (@burningtree)
+- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook)
+- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em)
+- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB)
+- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nickmccurdy, @demohi, @simov, @0x4139)
+- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139)
+- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nickmccurdy, @demohi)
+- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal)
+- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimon)
+- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen)
+- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky)
+- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack)
+- [#1423](https://github.com/request/request/pull/1423) Allow fully qualified multipart content-type header (@simov)
+- [#1430](https://github.com/request/request/pull/1430) Fix recursive requester (@tikotzky)
+- [#1429](https://github.com/request/request/pull/1429) Throw error when making HEAD request with a body (@tikotzky)
+- [#1419](https://github.com/request/request/pull/1419) Add note that the project is broken in 0.12.x (@nylen)
+- [#1413](https://github.com/request/request/pull/1413) Fix basic auth (@simov)
+- [#1397](https://github.com/request/request/pull/1397) Improve pipe-from-file tests (@nylen)
+
+### v2.53.0 (2015/02/02)
+- [#1396](https://github.com/request/request/pull/1396) Do not rfc3986 escape JSON bodies (@nylen, @simov)
+- [#1392](https://github.com/request/request/pull/1392) Improve `timeout` option description (@watson)
+
+### v2.52.0 (2015/02/02)
+- [#1383](https://github.com/request/request/pull/1383) Add missing HTTPS options that were not being passed to tunnel (@brichard19) (@nylen)
+- [#1388](https://github.com/request/request/pull/1388) Upgrade mime-types package version (@roderickhsiao)
+- [#1389](https://github.com/request/request/pull/1389) Revise Setup Tunnel Function (@seanstrom)
+- [#1374](https://github.com/request/request/pull/1374) Allow explicitly disabling tunneling for proxied https destinations (@nylen)
+- [#1376](https://github.com/request/request/pull/1376) Use karma-browserify for tests. Add browser test coverage reporter. (@eiriksm)
+- [#1366](https://github.com/request/request/pull/1366) Refactor OAuth into separate module (@simov)
+- [#1373](https://github.com/request/request/pull/1373) Rewrite tunnel test to be pure Node.js (@nylen)
+- [#1371](https://github.com/request/request/pull/1371) Upgrade test reporter (@nylen)
+- [#1360](https://github.com/request/request/pull/1360) Refactor basic, bearer, digest auth logic into separate class (@simov)
+- [#1354](https://github.com/request/request/pull/1354) Remove circular dependency from debugging code (@nylen)
+- [#1351](https://github.com/request/request/pull/1351) Move digest auth into private prototype method (@simov)
+- [#1352](https://github.com/request/request/pull/1352) Update hawk dependency to ~2.3.0 (@mridgway)
+- [#1353](https://github.com/request/request/pull/1353) Correct travis-ci badge (@dogancelik)
+- [#1349](https://github.com/request/request/pull/1349) Make sure we return on errored browser requests. (@eiriksm)
+- [#1346](https://github.com/request/request/pull/1346) getProxyFromURI Extraction Refactor (@seanstrom)
+- [#1337](https://github.com/request/request/pull/1337) Standardize test ports on 6767 (@nylen)
+- [#1341](https://github.com/request/request/pull/1341) Emit FormData error events as Request error events (@nylen, @rwky)
+- [#1343](https://github.com/request/request/pull/1343) Clean up readme badges, and add Travis and Coveralls badges (@nylen)
+- [#1345](https://github.com/request/request/pull/1345) Update README.md (@Aaron-Hartwig)
+- [#1338](https://github.com/request/request/pull/1338) Always wait for server.close() callback in tests (@nylen)
+- [#1342](https://github.com/request/request/pull/1342) Add mock https server and redo start of browser tests for this purpose. (@eiriksm)
+- [#1339](https://github.com/request/request/pull/1339) Improve auth docs (@nylen)
+- [#1335](https://github.com/request/request/pull/1335) Add support for OAuth plaintext signature method (@simov)
+- [#1332](https://github.com/request/request/pull/1332) Add clean script to remove test-browser.js after the tests run (@seanstrom)
+- [#1327](https://github.com/request/request/pull/1327) Fix errors generating coverage reports. (@nylen)
+- [#1330](https://github.com/request/request/pull/1330) Return empty buffer upon empty response body and encoding is set to null (@seanstrom)
+- [#1326](https://github.com/request/request/pull/1326) Use faster container-based infrastructure on Travis (@nylen)
+- [#1315](https://github.com/request/request/pull/1315) Implement rfc3986 option (@simov, @nylen, @apoco, @DullReferenceException, @mmalecki, @oliamb, @cliffcrosland, @LewisJEllis, @eiriksm, @poislagarde)
+- [#1314](https://github.com/request/request/pull/1314) Detect urlencoded form data header via regex (@simov)
+- [#1317](https://github.com/request/request/pull/1317) Improve OAuth1.0 server side flow example (@simov)
+
+### v2.51.0 (2014/12/10)
+- [#1310](https://github.com/request/request/pull/1310) Revert changes introduced in https://github.com/request/request/pull/1282 (@simov)
+
+### v2.50.0 (2014/12/09)
+- [#1308](https://github.com/request/request/pull/1308) Add browser test to keep track of browserify compability. (@eiriksm)
+- [#1299](https://github.com/request/request/pull/1299) Add optional support for jsonReviver (@poislagarde)
+- [#1277](https://github.com/request/request/pull/1277) Add Coveralls configuration (@simov)
+- [#1307](https://github.com/request/request/pull/1307) Upgrade form-data, add back browserify compability. Fixes #455. (@eiriksm)
+- [#1305](https://github.com/request/request/pull/1305) Fix typo in README.md (@LewisJEllis)
+- [#1288](https://github.com/request/request/pull/1288) Update README.md to explain custom file use case (@cliffcrosland)
+
+### v2.49.0 (2014/11/28)
+- [#1295](https://github.com/request/request/pull/1295) fix(proxy): no-proxy false positive (@oliamb)
+- [#1292](https://github.com/request/request/pull/1292) Upgrade `caseless` to 0.8.1 (@mmalecki)
+- [#1276](https://github.com/request/request/pull/1276) Set transfer encoding for multipart/related to chunked by default (@simov)
+- [#1275](https://github.com/request/request/pull/1275) Fix multipart content-type headers detection (@simov)
+- [#1269](https://github.com/request/request/pull/1269) adds streams example for review (@tbuchok)
+- [#1238](https://github.com/request/request/pull/1238) Add examples README.md (@simov)
+
+### v2.48.0 (2014/11/12)
+- [#1263](https://github.com/request/request/pull/1263) Fixed a syntax error / typo in README.md (@xna2)
+- [#1253](https://github.com/request/request/pull/1253) Add multipart chunked flag (@simov, @nylen)
+- [#1251](https://github.com/request/request/pull/1251) Clarify that defaults() does not modify global defaults (@nylen)
+- [#1250](https://github.com/request/request/pull/1250) Improve documentation for pool and maxSockets options (@nylen)
+- [#1237](https://github.com/request/request/pull/1237) Documenting error handling when using streams (@vmattos)
+- [#1244](https://github.com/request/request/pull/1244) Finalize changelog command (@nylen)
+- [#1241](https://github.com/request/request/pull/1241) Fix typo (@alexanderGugel)
+- [#1223](https://github.com/request/request/pull/1223) Show latest version number instead of "upcoming" in changelog (@nylen)
+- [#1236](https://github.com/request/request/pull/1236) Document how to use custom CA in README (#1229) (@hypesystem)
+- [#1228](https://github.com/request/request/pull/1228) Support for oauth with RSA-SHA1 signing (@nylen)
+- [#1216](https://github.com/request/request/pull/1216) Made json and multipart options coexist (@nylen, @simov)
+- [#1225](https://github.com/request/request/pull/1225) Allow header white/exclusive lists in any case. (@RReverser)
+
+### v2.47.0 (2014/10/26)
+- [#1222](https://github.com/request/request/pull/1222) Move from mikeal/request to request/request (@nylen)
+- [#1220](https://github.com/request/request/pull/1220) update qs dependency to 2.3.1 (@FredKSchott)
+- [#1212](https://github.com/request/request/pull/1212) Improve tests/test-timeout.js (@nylen)
+- [#1219](https://github.com/request/request/pull/1219) remove old globalAgent workaround for node 0.4 (@request)
+- [#1214](https://github.com/request/request/pull/1214) Remove cruft left over from optional dependencies (@nylen)
+- [#1215](https://github.com/request/request/pull/1215) Add proxyHeaderExclusiveList option for proxy-only headers. (@RReverser)
+- [#1211](https://github.com/request/request/pull/1211) Allow 'Host' header instead of 'host' and remember case across redirects (@nylen)
+- [#1208](https://github.com/request/request/pull/1208) Improve release script (@nylen)
+- [#1213](https://github.com/request/request/pull/1213) Support for custom cookie store (@nylen, @mitsuru)
+- [#1197](https://github.com/request/request/pull/1197) Clean up some code around setting the agent (@FredKSchott)
+- [#1209](https://github.com/request/request/pull/1209) Improve multipart form append test (@simov)
+- [#1207](https://github.com/request/request/pull/1207) Update changelog (@nylen)
+- [#1185](https://github.com/request/request/pull/1185) Stream multipart/related bodies (@simov)
+
+### v2.46.0 (2014/10/23)
+- [#1198](https://github.com/request/request/pull/1198) doc for TLS/SSL protocol options (@shawnzhu)
+- [#1200](https://github.com/request/request/pull/1200) Add a Gitter chat badge to README.md (@gitter-badger)
+- [#1196](https://github.com/request/request/pull/1196) Upgrade taper test reporter to v0.3.0 (@nylen)
+- [#1199](https://github.com/request/request/pull/1199) Fix lint error: undeclared var i (@nylen)
+- [#1191](https://github.com/request/request/pull/1191) Move self.proxy decision logic out of init and into a helper (@FredKSchott)
+- [#1190](https://github.com/request/request/pull/1190) Move _buildRequest() logic back into init (@FredKSchott)
+- [#1186](https://github.com/request/request/pull/1186) Support Smarter Unix URL Scheme (@FredKSchott)
+- [#1178](https://github.com/request/request/pull/1178) update form documentation for new usage (@FredKSchott)
+- [#1180](https://github.com/request/request/pull/1180) Enable no-mixed-requires linting rule (@nylen)
+- [#1184](https://github.com/request/request/pull/1184) Don't forward authorization header across redirects to different hosts (@nylen)
+- [#1183](https://github.com/request/request/pull/1183) Correct README about pre and postamble CRLF using multipart and not mult... (@netpoetica)
+- [#1179](https://github.com/request/request/pull/1179) Lint tests directory (@nylen)
+- [#1169](https://github.com/request/request/pull/1169) add metadata for form-data file field (@dotcypress)
+- [#1173](https://github.com/request/request/pull/1173) remove optional dependencies (@seanstrom)
+- [#1165](https://github.com/request/request/pull/1165) Cleanup event listeners and remove function creation from init (@FredKSchott)
+- [#1174](https://github.com/request/request/pull/1174) update the request.cookie docs to have a valid cookie example (@seanstrom)
+- [#1168](https://github.com/request/request/pull/1168) create a detach helper and use detach helper in replace of nextTick (@seanstrom)
+- [#1171](https://github.com/request/request/pull/1171) in post can send form data and use callback (@MiroRadenovic)
+- [#1159](https://github.com/request/request/pull/1159) accept charset for x-www-form-urlencoded content-type (@seanstrom)
+- [#1157](https://github.com/request/request/pull/1157) Update README.md: body with json=true (@Rob--W)
+- [#1164](https://github.com/request/request/pull/1164) Disable tests/test-timeout.js on Travis (@nylen)
+- [#1153](https://github.com/request/request/pull/1153) Document how to run a single test (@nylen)
+- [#1144](https://github.com/request/request/pull/1144) adds documentation for the "response" event within the streaming section (@tbuchok)
+- [#1162](https://github.com/request/request/pull/1162) Update eslintrc file to no longer allow past errors (@FredKSchott)
+- [#1155](https://github.com/request/request/pull/1155) Support/use self everywhere (@seanstrom)
+- [#1161](https://github.com/request/request/pull/1161) fix no-use-before-define lint warnings (@emkay)
+- [#1156](https://github.com/request/request/pull/1156) adding curly brackets to get rid of lint errors (@emkay)
+- [#1151](https://github.com/request/request/pull/1151) Fix localAddress test on OS X (@nylen)
+- [#1145](https://github.com/request/request/pull/1145) documentation: fix outdated reference to setCookieSync old name in README (@FredKSchott)
+- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott)
+- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen)
+- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund)
+- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@cappslock)
+- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey)
+- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott)
+- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom)
+- [#1129](https://github.com/request/request/pull/1129) linting fix: convert double quote strings to use single quotes (@FredKSchott)
+- [#1124](https://github.com/request/request/pull/1124) linting fix: remove unneccesary semi-colons (@FredKSchott)
+
+### v2.45.0 (2014/10/06)
+- [#1128](https://github.com/request/request/pull/1128) Add test for setCookie regression (@nylen)
+- [#1127](https://github.com/request/request/pull/1127) added tests around using objects as values in a query string (@bcoe)
+- [#1103](https://github.com/request/request/pull/1103) Support/refactor request constructor (@nylen, @seanstrom)
+- [#1119](https://github.com/request/request/pull/1119) add basic linting to request library (@FredKSchott)
+- [#1121](https://github.com/request/request/pull/1121) Revert "Explicitly use sync versions of cookie functions" (@nylen)
+- [#1118](https://github.com/request/request/pull/1118) linting fix: Restructure bad empty if statement (@FredKSchott)
+- [#1117](https://github.com/request/request/pull/1117) Fix a bad check for valid URIs (@FredKSchott)
+- [#1113](https://github.com/request/request/pull/1113) linting fix: space out operators (@FredKSchott)
+- [#1116](https://github.com/request/request/pull/1116) Fix typo in `noProxyHost` definition (@FredKSchott)
+- [#1114](https://github.com/request/request/pull/1114) linting fix: Added a `new` operator that was missing when creating and throwing a new error (@FredKSchott)
+- [#1096](https://github.com/request/request/pull/1096) No_proxy support (@samcday)
+- [#1107](https://github.com/request/request/pull/1107) linting-fix: remove unused variables (@FredKSchott)
+- [#1112](https://github.com/request/request/pull/1112) linting fix: Make return values consistent and more straitforward (@FredKSchott)
+- [#1111](https://github.com/request/request/pull/1111) linting fix: authPieces was getting redeclared (@FredKSchott)
+- [#1105](https://github.com/request/request/pull/1105) Use strict mode in request (@FredKSchott)
+- [#1110](https://github.com/request/request/pull/1110) linting fix: replace lazy '==' with more strict '===' (@FredKSchott)
+- [#1109](https://github.com/request/request/pull/1109) linting fix: remove function call from if-else conditional statement (@FredKSchott)
+- [#1102](https://github.com/request/request/pull/1102) Fix to allow setting a `requester` on recursive calls to `request.defaults` (@tikotzky)
+- [#1095](https://github.com/request/request/pull/1095) Tweaking engines in package.json (@pdehaan)
+- [#1082](https://github.com/request/request/pull/1082) Forward the socket event from the httpModule request (@seanstrom)
+- [#972](https://github.com/request/request/pull/972) Clarify gzip handling in the README (@kevinoid)
+- [#1089](https://github.com/request/request/pull/1089) Mention that encoding defaults to utf8, not Buffer (@stuartpb)
+- [#1088](https://github.com/request/request/pull/1088) Fix cookie example in README.md and make it more clear (@pipi32167)
+- [#1027](https://github.com/request/request/pull/1027) Add support for multipart form data in request options. (@crocket)
+- [#1076](https://github.com/request/request/pull/1076) use Request.abort() to abort the request when the request has timed-out (@seanstrom)
+- [#1068](https://github.com/request/request/pull/1068) add optional postamble required by .NET multipart requests (@netpoetica)
+
+### v2.43.0 (2014/09/18)
+- [#1057](https://github.com/request/request/pull/1057) Defaults should not overwrite defined options (@davidwood)
+- [#1046](https://github.com/request/request/pull/1046) Propagate datastream errors, useful in case gzip fails. (@ZJONSSON, @Janpot)
+- [#1063](https://github.com/request/request/pull/1063) copy the input headers object #1060 (@finnp)
+- [#1031](https://github.com/request/request/pull/1031) Explicitly use sync versions of cookie functions (@ZJONSSON)
+- [#1056](https://github.com/request/request/pull/1056) Fix redirects when passing url.parse(x) as URL to convenience method (@nylen)
+
+### v2.42.0 (2014/09/04)
+- [#1053](https://github.com/request/request/pull/1053) Fix #1051 Parse auth properly when using non-tunneling proxy (@isaacs)
+
+### v2.41.0 (2014/09/04)
+- [#1050](https://github.com/request/request/pull/1050) Pass whitelisted headers to tunneling proxy. Organize all tunneling logic. (@isaacs, @Feldhacker)
+- [#1035](https://github.com/request/request/pull/1035) souped up nodei.co badge (@rvagg)
+- [#1048](https://github.com/request/request/pull/1048) Aws is now possible over a proxy (@steven-aerts)
+- [#1039](https://github.com/request/request/pull/1039) extract out helper functions to a helper file (@seanstrom)
+- [#1021](https://github.com/request/request/pull/1021) Support/refactor indexjs (@seanstrom)
+- [#1033](https://github.com/request/request/pull/1033) Improve and document debug options (@nylen)
+- [#1034](https://github.com/request/request/pull/1034) Fix readme headings (@nylen)
+- [#1030](https://github.com/request/request/pull/1030) Allow recursive request.defaults (@tikotzky)
+- [#1029](https://github.com/request/request/pull/1029) Fix a couple of typos (@nylen)
+- [#675](https://github.com/request/request/pull/675) Checking for SSL fault on connection before reading SSL properties (@VRMink)
+- [#989](https://github.com/request/request/pull/989) Added allowRedirect function. Should return true if redirect is allowed or false otherwise (@doronin)
+- [#1025](https://github.com/request/request/pull/1025) [fixes #1023] Set self._ended to true once response has ended (@mridgway)
+- [#1020](https://github.com/request/request/pull/1020) Add back removed debug metadata (@FredKSchott)
+- [#1008](https://github.com/request/request/pull/1008) Moving to module instead of cutomer buffer concatenation. (@mikeal)
+- [#770](https://github.com/request/request/pull/770) Added dependency badge for README file; (@timgluz, @mafintosh, @lalitkapoor, @stash, @bobyrizov)
+- [#1016](https://github.com/request/request/pull/1016) toJSON no longer results in an infinite loop, returns simple objects (@FredKSchott)
+- [#1018](https://github.com/request/request/pull/1018) Remove pre-0.4.4 HTTPS fix (@mmalecki)
+- [#1006](https://github.com/request/request/pull/1006) Migrate to caseless, fixes #1001 (@mikeal)
+- [#995](https://github.com/request/request/pull/995) Fix parsing array of objects (@sjonnet19)
+- [#999](https://github.com/request/request/pull/999) Fix fallback for browserify for optional modules. (@eiriksm)
+- [#996](https://github.com/request/request/pull/996) Wrong oauth signature when multiple same param keys exist [updated] (@bengl)
+
+### v2.40.0 (2014/08/06)
+- [#992](https://github.com/request/request/pull/992) Fix security vulnerability. Update qs (@poeticninja)
+- [#988](https://github.com/request/request/pull/988) “--” -> “—” (@upisfree)
+- [#987](https://github.com/request/request/pull/987) Show optional modules as being loaded by the module that reqeusted them (@iarna)
+
+### v2.39.0 (2014/07/24)
+- [#976](https://github.com/request/request/pull/976) Update README.md (@pvoznenko)
+
+### v2.38.0 (2014/07/22)
+- [#952](https://github.com/request/request/pull/952) Adding support to client certificate with proxy use case (@ofirshaked)
+- [#884](https://github.com/request/request/pull/884) Documented tough-cookie installation. (@wbyoung)
+- [#935](https://github.com/request/request/pull/935) Correct repository url (@fritx)
+- [#963](https://github.com/request/request/pull/963) Update changelog (@nylen)
+- [#960](https://github.com/request/request/pull/960) Support gzip with encoding on node pre-v0.9.4 (@kevinoid)
+- [#953](https://github.com/request/request/pull/953) Add async Content-Length computation when using form-data (@LoicMahieu)
+- [#844](https://github.com/request/request/pull/844) Add support for HTTP[S]_PROXY environment variables. Fixes #595. (@jvmccarthy)
+- [#946](https://github.com/request/request/pull/946) defaults: merge headers (@aj0strow)
+
+### v2.37.0 (2014/07/07)
+- [#957](https://github.com/request/request/pull/957) Silence EventEmitter memory leak warning #311 (@watson)
+- [#955](https://github.com/request/request/pull/955) check for content-length header before setting it in nextTick (@camilleanne)
+- [#951](https://github.com/request/request/pull/951) Add support for gzip content decoding (@kevinoid)
+- [#949](https://github.com/request/request/pull/949) Manually enter querystring in form option (@charlespwd)
+- [#944](https://github.com/request/request/pull/944) Make request work with browserify (@eiriksm)
+- [#943](https://github.com/request/request/pull/943) New mime module (@eiriksm)
+- [#927](https://github.com/request/request/pull/927) Bump version of hawk dep. (@samccone)
+- [#907](https://github.com/request/request/pull/907) append secureOptions to poolKey (@medovob)
+
+### v2.35.0 (2014/05/17)
+- [#901](https://github.com/request/request/pull/901) Fixes #555 (@pigulla)
+- [#897](https://github.com/request/request/pull/897) merge with default options (@vohof)
+- [#891](https://github.com/request/request/pull/891) fixes 857 - options object is mutated by calling request (@lalitkapoor)
+- [#869](https://github.com/request/request/pull/869) Pipefilter test (@tgohn)
+- [#866](https://github.com/request/request/pull/866) Fix typo (@dandv)
+- [#861](https://github.com/request/request/pull/861) Add support for RFC 6750 Bearer Tokens (@phedny)
+- [#809](https://github.com/request/request/pull/809) upgrade tunnel-proxy to 0.4.0 (@ksato9700)
+- [#850](https://github.com/request/request/pull/850) Fix word consistency in readme (@0xNobody)
+- [#810](https://github.com/request/request/pull/810) add some exposition to mpu example in README.md (@mikermcneil)
+- [#840](https://github.com/request/request/pull/840) improve error reporting for invalid protocols (@FND)
+- [#821](https://github.com/request/request/pull/821) added secureOptions back (@nw)
+- [#815](https://github.com/request/request/pull/815) Create changelog based on pull requests (@lalitkapoor)
+
+### v2.34.0 (2014/02/18)
+- [#516](https://github.com/request/request/pull/516) UNIX Socket URL Support (@lyuzashi)
+- [#801](https://github.com/request/request/pull/801) 794 ignore cookie parsing and domain errors (@lalitkapoor)
+- [#802](https://github.com/request/request/pull/802) Added the Apache license to the package.json. (@keskival)
+- [#793](https://github.com/request/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul)
+- [#785](https://github.com/request/request/pull/785) Provide ability to override content-type when `json` option used (@vvo)
+- [#781](https://github.com/request/request/pull/781) simpler isReadStream function (@joaojeronimo)
+
+### v2.32.0 (2014/01/16)
+- [#767](https://github.com/request/request/pull/767) Use tough-cookie CookieJar sync API (@stash)
+- [#764](https://github.com/request/request/pull/764) Case-insensitive authentication scheme (@bobyrizov)
+- [#763](https://github.com/request/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash)
+- [#744](https://github.com/request/request/pull/744) Use Cookie.parse (@lalitkapoor)
+- [#757](https://github.com/request/request/pull/757) require aws-sign2 (@mafintosh)
+
+### v2.31.0 (2014/01/08)
+- [#645](https://github.com/request/request/pull/645) update twitter api url to v1.1 (@mick)
+- [#746](https://github.com/request/request/pull/746) README: Markdown code highlight (@weakish)
+- [#745](https://github.com/request/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay)
+- [#742](https://github.com/request/request/pull/742) Add note about JSON output body type (@iansltx)
+- [#741](https://github.com/request/request/pull/741) README example is using old cookie jar api (@emkay)
+- [#736](https://github.com/request/request/pull/736) Fix callback arguments documentation (@mmalecki)
+- [#732](https://github.com/request/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium)
+- [#730](https://github.com/request/request/pull/730) better HTTP DIGEST support (@dai-shi)
+- [#728](https://github.com/request/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow)
+- [#727](https://github.com/request/request/pull/727) fix requester bug (@jchris)
+- [#724](https://github.com/request/request/pull/724) README.md: add custom HTTP Headers example. (@tcort)
+- [#719](https://github.com/request/request/pull/719) Made a comment gender neutral. (@unsetbit)
+- [#715](https://github.com/request/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub)
+- [#710](https://github.com/request/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak)
+- [#696](https://github.com/request/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin)
+- [#694](https://github.com/request/request/pull/694) Typo in README (@VRMink)
+- [#690](https://github.com/request/request/pull/690) Handle blank password in basic auth. (@diversario)
+- [#682](https://github.com/request/request/pull/682) Optional dependencies (@Turbo87)
+- [#683](https://github.com/request/request/pull/683) Travis CI support (@Turbo87)
+- [#674](https://github.com/request/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren)
+- [#666](https://github.com/request/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong)
+- [#656](https://github.com/request/request/pull/656) Test case for #304. (@diversario)
+- [#662](https://github.com/request/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar)
+- [#659](https://github.com/request/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm)
+- [#630](https://github.com/request/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl)
+- [#619](https://github.com/request/request/pull/619) decouple things a bit (@joaojeronimo)
+- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander)
+- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker)
+- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath)
+- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK)
+- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko)
+- [#589](https://github.com/request/request/pull/589) Prevent setting headers after they are sent (@geek)
+- [#587](https://github.com/request/request/pull/587) Global cookie jar disabled by default (@threepointone)
+- [#544](https://github.com/request/request/pull/544) Update http-signature version. (@davidlehn)
+- [#581](https://github.com/request/request/pull/581) Fix spelling of "ignoring." (@bigeasy)
+- [#568](https://github.com/request/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette)
+- [#564](https://github.com/request/request/pull/564) Fix redirections (@criloz)
+- [#541](https://github.com/request/request/pull/541) The exported request function doesn't have an auth method (@tschaub)
+- [#542](https://github.com/request/request/pull/542) Expose Request class (@regality)
+- [#536](https://github.com/request/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando)
+- [#532](https://github.com/request/request/pull/532) fix typo (@fredericosilva)
+- [#497](https://github.com/request/request/pull/497) Added redirect event (@Cauldrath)
+- [#503](https://github.com/request/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi)
+- [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway)
+- [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka)
+- [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway)
+- [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway)
+- [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun)
+- [#510](https://github.com/request/request/pull/510) Add HTTP Signature support. (@davidlehn)
+- [#502](https://github.com/request/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen)
+- [#508](https://github.com/request/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs)
+- [#512](https://github.com/request/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1)
+- [#513](https://github.com/request/request/pull/513) add 'localAddress' support (@yyfrankyy)
+- [#498](https://github.com/request/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins)
+- [#490](https://github.com/request/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas)
+- [#479](https://github.com/request/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH)
+- [#475](https://github.com/request/request/pull/475) Use `unescape` from `querystring` (@shimaore)
+- [#473](https://github.com/request/request/pull/473) V0.10 compat (@isaacs)
+- [#471](https://github.com/request/request/pull/471) Using querystring library from visionmedia (@kbackowski)
+- [#461](https://github.com/request/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin)
+- [#460](https://github.com/request/request/pull/460) hawk 0.10.0 (@hueniverse)
+- [#462](https://github.com/request/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya)
+- [#456](https://github.com/request/request/pull/456) hawk 0.9.0 (@hueniverse)
+- [#429](https://github.com/request/request/pull/429) Copy options before adding callback. (@nrn, @nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki)
+- [#454](https://github.com/request/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh)
+- [#310](https://github.com/request/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann, @isaacs, @mscdex)
+- [#413](https://github.com/request/request/pull/413) rename googledoodle.png to .jpg (@nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki)
+- [#448](https://github.com/request/request/pull/448) Convenience method for PATCH (@mloar)
+- [#444](https://github.com/request/request/pull/444) protect against double callbacks on error path (@spollack)
+- [#433](https://github.com/request/request/pull/433) Added support for HTTPS cert & key (@mmalecki)
+- [#430](https://github.com/request/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf)
+- [#415](https://github.com/request/request/pull/415) Fixed a typo. (@jerem)
+- [#338](https://github.com/request/request/pull/338) Add more auth options, including digest support (@nylen)
+- [#403](https://github.com/request/request/pull/403) Optimize environment lookup to happen once only (@mmalecki)
+- [#398](https://github.com/request/request/pull/398) Add more reporting to tests (@mmalecki)
+- [#388](https://github.com/request/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23)
+- [#381](https://github.com/request/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro)
+- [#380](https://github.com/request/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-)
+- [#376](https://github.com/request/request/pull/376) Headers lost on redirect (@kapetan)
+- [#375](https://github.com/request/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock)
+- [#374](https://github.com/request/request/pull/374) Correct Host header for proxy tunnel CONNECT (@youurayy)
+- [#370](https://github.com/request/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge)
+- [#369](https://github.com/request/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge)
+- [#344](https://github.com/request/request/pull/344) Make AWS auth signing find headers correctly (@nlf)
+- [#363](https://github.com/request/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall)
+- [#362](https://github.com/request/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall)
+- [#361](https://github.com/request/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins)
+- [#360](https://github.com/request/request/pull/360) Delete self._form along with everything else on redirect (@jgautier)
+- [#355](https://github.com/request/request/pull/355) stop sending erroneous headers on redirected requests (@azylman)
+- [#332](https://github.com/request/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup)
+- [#343](https://github.com/request/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf)
+- [#320](https://github.com/request/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris)
+- [#322](https://github.com/request/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo)
+- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@CartoDB)
+- [#318](https://github.com/request/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs)
+- [#317](https://github.com/request/request/pull/317) Workaround for #313 (@isaacs)
+- [#293](https://github.com/request/request/pull/293) Allow parser errors to bubble up to request (@mscdex)
+- [#290](https://github.com/request/request/pull/290) A test for #289 (@isaacs)
+- [#280](https://github.com/request/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1)
+- [#207](https://github.com/request/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs)
+- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas, @vpulim)
+- [#272](https://github.com/request/request/pull/272) Boundary begins with CRLF? (@elspoono, @timshadel, @naholyr, @nanodocumet, @TehShrike)
+- [#284](https://github.com/request/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry)
+- [#241](https://github.com/request/request/pull/241) Composability updates suggested by issue #239 (@polotek)
+- [#282](https://github.com/request/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock)
+- [#279](https://github.com/request/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin)
+- [#273](https://github.com/request/request/pull/273) Pipe back pressure issue (@mafintosh)
+- [#268](https://github.com/request/request/pull/268) I'm not OCD seriously (@TehShrike)
+- [#263](https://github.com/request/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet)
+- [#265](https://github.com/request/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr)
+- [#262](https://github.com/request/request/pull/262) JSON test should check for equality (@timshadel)
+- [#261](https://github.com/request/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel)
+- [#249](https://github.com/request/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges, @polotek, @zephrax, @jeromegn)
+- [#255](https://github.com/request/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1)
+- [#260](https://github.com/request/request/pull/260) fixed just another leak of 'i' (@sreuter)
+- [#246](https://github.com/request/request/pull/246) Fixing the set-cookie header (@jeromegn)
+- [#243](https://github.com/request/request/pull/243) Dynamic boundary (@zephrax)
+- [#240](https://github.com/request/request/pull/240) don't error when null is passed for options (@polotek)
+- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso, @vpulim)
+- [#224](https://github.com/request/request/pull/224) Multipart content-type change (@janjongboom)
+- [#217](https://github.com/request/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup)
+- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@vpulim)
+- [#199](https://github.com/request/request/pull/199) Tunnel (@isaacs)
+- [#198](https://github.com/request/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs)
+- [#197](https://github.com/request/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs)
+- [#193](https://github.com/request/request/pull/193) Fixes GH-119 (@goatslacker)
+- [#188](https://github.com/request/request/pull/188) Add abort support to the returned request (@itay)
+- [#176](https://github.com/request/request/pull/176) Querystring option (@csainty)
+- [#182](https://github.com/request/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63)
+- [#180](https://github.com/request/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63)
+- [#179](https://github.com/request/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack)
+- [#177](https://github.com/request/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63)
+- [#170](https://github.com/request/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes)
+- [#168](https://github.com/request/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby)
+- [#161](https://github.com/request/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou)
+- [#162](https://github.com/request/request/pull/162) Fix issue #159 (@dpetukhov)
+- [#90](https://github.com/request/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes)
+- [#148](https://github.com/request/request/pull/148) Retry Agent (@thejh)
+- [#146](https://github.com/request/request/pull/146) Multipart should respect content-type if previously set (@apeace)
+- [#144](https://github.com/request/request/pull/144) added "form" option to readme (@petejkim)
+- [#133](https://github.com/request/request/pull/133) Fixed cookies parsing (@afanasy)
+- [#135](https://github.com/request/request/pull/135) host vs hostname (@iangreenleaf)
+- [#132](https://github.com/request/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson)
+- [#112](https://github.com/request/request/pull/112) Support using a custom http-like module (@jhs)
+- [#104](https://github.com/request/request/pull/104) Cookie handling contains bugs (@janjongboom)
+- [#121](https://github.com/request/request/pull/121) Another patch for cookie handling regression (@jhurliman)
+- [#117](https://github.com/request/request/pull/117) Remove the global `i` (@3rd-Eden)
+- [#110](https://github.com/request/request/pull/110) Update to Iris Couch URL (@jhs)
+- [#86](https://github.com/request/request/pull/86) Can't post binary to multipart requests (@kkaefer)
+- [#105](https://github.com/request/request/pull/105) added test for proxy option. (@dominictarr)
+- [#102](https://github.com/request/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex)
+- [#97](https://github.com/request/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs)
+- [#96](https://github.com/request/request/pull/96) Authless parsed url host support (@isaacs)
+- [#81](https://github.com/request/request/pull/81) Enhance redirect handling (@danmactough)
+- [#78](https://github.com/request/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs)
+- [#76](https://github.com/request/request/pull/76) Bug when a request fails and a timeout is set (@Marsup)
+- [#70](https://github.com/request/request/pull/70) add test script to package.json (@isaacs, @aheckmann)
+- [#73](https://github.com/request/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs)
+- [#69](https://github.com/request/request/pull/69) Flatten chunked requests properly (@isaacs)
+- [#67](https://github.com/request/request/pull/67) fixed global variable leaks (@aheckmann)
+- [#66](https://github.com/request/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod)
+- [#53](https://github.com/request/request/pull/53) Parse json: Issue #51 (@benatkin)
+- [#45](https://github.com/request/request/pull/45) Added timeout option (@mbrevoort)
+- [#35](https://github.com/request/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli)
+- [#31](https://github.com/request/request/pull/31) Error on piping a request to a destination (@tobowers) \ No newline at end of file
diff --git a/node_modules/request/LICENSE b/node_modules/request/LICENSE
new file mode 100644
index 0000000..a4a9aee
--- /dev/null
+++ b/node_modules/request/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/request/README.md b/node_modules/request/README.md
new file mode 100644
index 0000000..9da0eb7
--- /dev/null
+++ b/node_modules/request/README.md
@@ -0,0 +1,1133 @@
+# Deprecated!
+
+As of Feb 11th 2020, request is fully deprecated. No new changes are expected land. In fact, none have landed for some time.
+
+For more information about why request is deprecated and possible alternatives refer to
+[this issue](https://github.com/request/request/issues/3142).
+
+# Request - Simplified HTTP client
+
+[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)
+
+[![Build status](https://img.shields.io/travis/request/request/master.svg?style=flat-square)](https://travis-ci.org/request/request)
+[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master)
+[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request)
+[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request)
+[![Known Vulnerabilities](https://snyk.io/test/npm/request/badge.svg?style=flat-square)](https://snyk.io/test/npm/request)
+[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge)
+
+
+## Super simple to use
+
+Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.
+
+```js
+const request = require('request');
+request('http://www.google.com', function (error, response, body) {
+ console.error('error:', error); // Print the error if one occurred
+ console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
+ console.log('body:', body); // Print the HTML for the Google homepage.
+});
+```
+
+
+## Table of contents
+
+- [Streaming](#streaming)
+- [Promises & Async/Await](#promises--asyncawait)
+- [Forms](#forms)
+- [HTTP Authentication](#http-authentication)
+- [Custom HTTP Headers](#custom-http-headers)
+- [OAuth Signing](#oauth-signing)
+- [Proxies](#proxies)
+- [Unix Domain Sockets](#unix-domain-sockets)
+- [TLS/SSL Protocol](#tlsssl-protocol)
+- [Support for HAR 1.2](#support-for-har-12)
+- [**All Available Options**](#requestoptions-callback)
+
+Request also offers [convenience methods](#convenience-methods) like
+`request.defaults` and `request.post`, and there are
+lots of [usage examples](#examples) and several
+[debugging techniques](#debugging).
+
+
+---
+
+
+## Streaming
+
+You can stream any response to a file stream.
+
+```js
+request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
+```
+
+You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).
+
+```js
+fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
+```
+
+Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.
+
+```js
+request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))
+```
+
+Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
+
+```js
+request
+ .get('http://google.com/img.png')
+ .on('response', function(response) {
+ console.log(response.statusCode) // 200
+ console.log(response.headers['content-type']) // 'image/png'
+ })
+ .pipe(request.put('http://mysite.com/img.png'))
+```
+
+To easily handle errors when streaming requests, listen to the `error` event before piping:
+
+```js
+request
+ .get('http://mysite.com/doodle.png')
+ .on('error', function(err) {
+ console.error(err)
+ })
+ .pipe(fs.createWriteStream('doodle.png'))
+```
+
+Now let’s get fancy.
+
+```js
+http.createServer(function (req, resp) {
+ if (req.url === '/doodle.png') {
+ if (req.method === 'PUT') {
+ req.pipe(request.put('http://mysite.com/doodle.png'))
+ } else if (req.method === 'GET' || req.method === 'HEAD') {
+ request.get('http://mysite.com/doodle.png').pipe(resp)
+ }
+ }
+})
+```
+
+You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:
+
+```js
+http.createServer(function (req, resp) {
+ if (req.url === '/doodle.png') {
+ const x = request('http://mysite.com/doodle.png')
+ req.pipe(x)
+ x.pipe(resp)
+ }
+})
+```
+
+And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)
+
+```js
+req.pipe(request('http://mysite.com/doodle.png')).pipe(resp)
+```
+
+Also, none of this new functionality conflicts with requests previous features, it just expands them.
+
+```js
+const r = request.defaults({'proxy':'http://localproxy.com'})
+
+http.createServer(function (req, resp) {
+ if (req.url === '/doodle.png') {
+ r.get('http://google.com/doodle.png').pipe(resp)
+ }
+})
+```
+
+You can still use intermediate proxies, the requests will still follow HTTP forwards, etc.
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## Promises & Async/Await
+
+`request` supports both streaming and callback interfaces natively. If you'd like `request` to return a Promise instead, you can use an alternative interface wrapper for `request`. These wrappers can be useful if you prefer to work with Promises, or if you'd like to use `async`/`await` in ES2017.
+
+Several alternative interfaces are provided by the request team, including:
+- [`request-promise`](https://github.com/request/request-promise) (uses [Bluebird](https://github.com/petkaantonov/bluebird) Promises)
+- [`request-promise-native`](https://github.com/request/request-promise-native) (uses native Promises)
+- [`request-promise-any`](https://github.com/request/request-promise-any) (uses [any-promise](https://www.npmjs.com/package/any-promise) Promises)
+
+Also, [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original), which is available from Node.js v8.0 can be used to convert a regular function that takes a callback to return a promise instead.
+
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## Forms
+
+`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.
+
+
+#### application/x-www-form-urlencoded (URL-Encoded Forms)
+
+URL-encoded forms are simple.
+
+```js
+request.post('http://service.com/upload', {form:{key:'value'}})
+// or
+request.post('http://service.com/upload').form({key:'value'})
+// or
+request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ })
+```
+
+
+#### multipart/form-data (Multipart Form Uploads)
+
+For `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option.
+
+
+```js
+const formData = {
+ // Pass a simple key-value pair
+ my_field: 'my_value',
+ // Pass data via Buffers
+ my_buffer: Buffer.from([1, 2, 3]),
+ // Pass data via Streams
+ my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),
+ // Pass multiple values /w an Array
+ attachments: [
+ fs.createReadStream(__dirname + '/attachment1.jpg'),
+ fs.createReadStream(__dirname + '/attachment2.jpg')
+ ],
+ // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS}
+ // Use case: for some types of streams, you'll need to provide "file"-related information manually.
+ // See the `form-data` README for more information about options: https://github.com/form-data/form-data
+ custom_file: {
+ value: fs.createReadStream('/dev/urandom'),
+ options: {
+ filename: 'topsecret.jpg',
+ contentType: 'image/jpeg'
+ }
+ }
+};
+request.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) {
+ if (err) {
+ return console.error('upload failed:', err);
+ }
+ console.log('Upload successful! Server responded with:', body);
+});
+```
+
+For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)
+
+```js
+// NOTE: Advanced use-case, for normal use see 'formData' usage above
+const r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...})
+const form = r.form();
+form.append('my_field', 'my_value');
+form.append('my_buffer', Buffer.from([1, 2, 3]));
+form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'});
+```
+See the [form-data README](https://github.com/form-data/form-data) for more information & examples.
+
+
+#### multipart/related
+
+Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options.
+
+```js
+ request({
+ method: 'PUT',
+ preambleCRLF: true,
+ postambleCRLF: true,
+ uri: 'http://service.com/upload',
+ multipart: [
+ {
+ 'content-type': 'application/json',
+ body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
+ },
+ { body: 'I am an attachment' },
+ { body: fs.createReadStream('image.png') }
+ ],
+ // alternatively pass an object containing additional options
+ multipart: {
+ chunked: false,
+ data: [
+ {
+ 'content-type': 'application/json',
+ body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
+ },
+ { body: 'I am an attachment' }
+ ]
+ }
+ },
+ function (error, response, body) {
+ if (error) {
+ return console.error('upload failed:', error);
+ }
+ console.log('Upload successful! Server responded with:', body);
+ })
+```
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## HTTP Authentication
+
+```js
+request.get('http://some.server.com/').auth('username', 'password', false);
+// or
+request.get('http://some.server.com/', {
+ 'auth': {
+ 'user': 'username',
+ 'pass': 'password',
+ 'sendImmediately': false
+ }
+});
+// or
+request.get('http://some.server.com/').auth(null, null, true, 'bearerToken');
+// or
+request.get('http://some.server.com/', {
+ 'auth': {
+ 'bearer': 'bearerToken'
+ }
+});
+```
+
+If passed as an option, `auth` should be a hash containing values:
+
+- `user` || `username`
+- `pass` || `password`
+- `sendImmediately` (optional)
+- `bearer` (optional)
+
+The method form takes parameters
+`auth(username, password, sendImmediately, bearer)`.
+
+`sendImmediately` defaults to `true`, which causes a basic or bearer
+authentication header to be sent. If `sendImmediately` is `false`, then
+`request` will retry with a proper authentication header after receiving a
+`401` response from the server (which must contain a `WWW-Authenticate` header
+indicating the required authentication method).
+
+Note that you can also specify basic authentication using the URL itself, as
+detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the
+`user:password` before the host with an `@` sign:
+
+```js
+const username = 'username',
+ password = 'password',
+ url = 'http://' + username + ':' + password + '@some.server.com';
+
+request({url}, function (error, response, body) {
+ // Do more stuff with 'body' here
+});
+```
+
+Digest authentication is supported, but it only works with `sendImmediately`
+set to `false`; otherwise `request` will send basic authentication on the
+initial request, which will probably cause the request to fail.
+
+Bearer authentication is supported, and is activated when the `bearer` value is
+available. The value may be either a `String` or a `Function` returning a
+`String`. Using a function to supply the bearer token is particularly useful if
+used in conjunction with `defaults` to allow a single function to supply the
+last known token at the time of sending a request, or to compute one on the fly.
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## Custom HTTP Headers
+
+HTTP Headers, such as `User-Agent`, can be set in the `options` object.
+In the example below, we call the github API to find out the number
+of stars and forks for the request repository. This requires a
+custom `User-Agent` header as well as https.
+
+```js
+const request = require('request');
+
+const options = {
+ url: 'https://api.github.com/repos/request/request',
+ headers: {
+ 'User-Agent': 'request'
+ }
+};
+
+function callback(error, response, body) {
+ if (!error && response.statusCode == 200) {
+ const info = JSON.parse(body);
+ console.log(info.stargazers_count + " Stars");
+ console.log(info.forks_count + " Forks");
+ }
+}
+
+request(options, callback);
+```
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## OAuth Signing
+
+[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The
+default signing algorithm is
+[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2):
+
+```js
+// OAuth1.0 - 3-legged server side flow (Twitter example)
+// step 1
+const qs = require('querystring')
+ , oauth =
+ { callback: 'http://mysite.com/callback/'
+ , consumer_key: CONSUMER_KEY
+ , consumer_secret: CONSUMER_SECRET
+ }
+ , url = 'https://api.twitter.com/oauth/request_token'
+ ;
+request.post({url:url, oauth:oauth}, function (e, r, body) {
+ // Ideally, you would take the body in the response
+ // and construct a URL that a user clicks on (like a sign in button).
+ // The verifier is only available in the response after a user has
+ // verified with twitter that they are authorizing your app.
+
+ // step 2
+ const req_data = qs.parse(body)
+ const uri = 'https://api.twitter.com/oauth/authenticate'
+ + '?' + qs.stringify({oauth_token: req_data.oauth_token})
+ // redirect the user to the authorize uri
+
+ // step 3
+ // after the user is redirected back to your server
+ const auth_data = qs.parse(body)
+ , oauth =
+ { consumer_key: CONSUMER_KEY
+ , consumer_secret: CONSUMER_SECRET
+ , token: auth_data.oauth_token
+ , token_secret: req_data.oauth_token_secret
+ , verifier: auth_data.oauth_verifier
+ }
+ , url = 'https://api.twitter.com/oauth/access_token'
+ ;
+ request.post({url:url, oauth:oauth}, function (e, r, body) {
+ // ready to make signed requests on behalf of the user
+ const perm_data = qs.parse(body)
+ , oauth =
+ { consumer_key: CONSUMER_KEY
+ , consumer_secret: CONSUMER_SECRET
+ , token: perm_data.oauth_token
+ , token_secret: perm_data.oauth_token_secret
+ }
+ , url = 'https://api.twitter.com/1.1/users/show.json'
+ , qs =
+ { screen_name: perm_data.screen_name
+ , user_id: perm_data.user_id
+ }
+ ;
+ request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) {
+ console.log(user)
+ })
+ })
+})
+```
+
+For [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make
+the following changes to the OAuth options object:
+* Pass `signature_method : 'RSA-SHA1'`
+* Instead of `consumer_secret`, specify a `private_key` string in
+ [PEM format](http://how2ssl.com/articles/working_with_pem_files/)
+
+For [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make
+the following changes to the OAuth options object:
+* Pass `signature_method : 'PLAINTEXT'`
+
+To send OAuth parameters via query params or in a post body as described in The
+[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param)
+section of the oauth1 spec:
+* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth
+ options object.
+* `transport_method` defaults to `'header'`
+
+To use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either
+* Manually generate the body hash and pass it as a string `body_hash: '...'`
+* Automatically generate the body hash by passing `body_hash: true`
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## Proxies
+
+If you specify a `proxy` option, then the request (and any subsequent
+redirects) will be sent via a connection to the proxy server.
+
+If your endpoint is an `https` url, and you are using a proxy, then
+request will send a `CONNECT` request to the proxy server *first*, and
+then use the supplied connection to connect to the endpoint.
+
+That is, first it will make a request like:
+
+```
+HTTP/1.1 CONNECT endpoint-server.com:80
+Host: proxy-server.com
+User-Agent: whatever user agent you specify
+```
+
+and then the proxy server make a TCP connection to `endpoint-server`
+on port `80`, and return a response that looks like:
+
+```
+HTTP/1.1 200 OK
+```
+
+At this point, the connection is left open, and the client is
+communicating directly with the `endpoint-server.com` machine.
+
+See [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel)
+for more information.
+
+By default, when proxying `http` traffic, request will simply make a
+standard proxied `http` request. This is done by making the `url`
+section of the initial line of the request a fully qualified url to
+the endpoint.
+
+For example, it will make a single request that looks like:
+
+```
+HTTP/1.1 GET http://endpoint-server.com/some-url
+Host: proxy-server.com
+Other-Headers: all go here
+
+request body or whatever
+```
+
+Because a pure "http over http" tunnel offers no additional security
+or other features, it is generally simpler to go with a
+straightforward HTTP proxy in this case. However, if you would like
+to force a tunneling proxy, you may set the `tunnel` option to `true`.
+
+You can also make a standard proxied `http` request by explicitly setting
+`tunnel : false`, but **note that this will allow the proxy to see the traffic
+to/from the destination server**.
+
+If you are using a tunneling proxy, you may set the
+`proxyHeaderWhiteList` to share certain headers with the proxy.
+
+You can also set the `proxyHeaderExclusiveList` to share certain
+headers only with the proxy and not with destination host.
+
+By default, this set is:
+
+```
+accept
+accept-charset
+accept-encoding
+accept-language
+accept-ranges
+cache-control
+content-encoding
+content-language
+content-length
+content-location
+content-md5
+content-range
+content-type
+connection
+date
+expect
+max-forwards
+pragma
+proxy-authorization
+referer
+te
+transfer-encoding
+user-agent
+via
+```
+
+Note that, when using a tunneling proxy, the `proxy-authorization`
+header and any headers from custom `proxyHeaderExclusiveList` are
+*never* sent to the endpoint server, but only to the proxy server.
+
+
+### Controlling proxy behaviour using environment variables
+
+The following environment variables are respected by `request`:
+
+ * `HTTP_PROXY` / `http_proxy`
+ * `HTTPS_PROXY` / `https_proxy`
+ * `NO_PROXY` / `no_proxy`
+
+When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request.
+
+`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables.
+
+Here's some examples of valid `no_proxy` values:
+
+ * `google.com` - don't proxy HTTP/HTTPS requests to Google.
+ * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google.
+ * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo!
+ * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether.
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## UNIX Domain Sockets
+
+`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme:
+
+```js
+/* Pattern */ 'http://unix:SOCKET:PATH'
+/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path')
+```
+
+Note: The `SOCKET` path is assumed to be absolute to the root of the host file system.
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## TLS/SSL Protocol
+
+TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be
+set directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent).
+
+```js
+const fs = require('fs')
+ , path = require('path')
+ , certFile = path.resolve(__dirname, 'ssl/client.crt')
+ , keyFile = path.resolve(__dirname, 'ssl/client.key')
+ , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem')
+ , request = require('request');
+
+const options = {
+ url: 'https://api.some-server.com/',
+ cert: fs.readFileSync(certFile),
+ key: fs.readFileSync(keyFile),
+ passphrase: 'password',
+ ca: fs.readFileSync(caFile)
+};
+
+request.get(options);
+```
+
+### Using `options.agentOptions`
+
+In the example below, we call an API that requires client side SSL certificate
+(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol:
+
+```js
+const fs = require('fs')
+ , path = require('path')
+ , certFile = path.resolve(__dirname, 'ssl/client.crt')
+ , keyFile = path.resolve(__dirname, 'ssl/client.key')
+ , request = require('request');
+
+const options = {
+ url: 'https://api.some-server.com/',
+ agentOptions: {
+ cert: fs.readFileSync(certFile),
+ key: fs.readFileSync(keyFile),
+ // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format:
+ // pfx: fs.readFileSync(pfxFilePath),
+ passphrase: 'password',
+ securityOptions: 'SSL_OP_NO_SSLv3'
+ }
+};
+
+request.get(options);
+```
+
+It is able to force using SSLv3 only by specifying `secureProtocol`:
+
+```js
+request.get({
+ url: 'https://api.some-server.com/',
+ agentOptions: {
+ secureProtocol: 'SSLv3_method'
+ }
+});
+```
+
+It is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs).
+This can be useful, for example, when using self-signed certificates.
+To require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`.
+The certificate the domain presents must be signed by the root certificate specified:
+
+```js
+request.get({
+ url: 'https://api.some-server.com/',
+ agentOptions: {
+ ca: fs.readFileSync('ca.cert.pem')
+ }
+});
+```
+
+The `ca` value can be an array of certificates, in the event you have a private or internal corporate public-key infrastructure hierarchy. For example, if you want to connect to https://api.some-server.com which presents a key chain consisting of:
+1. its own public key, which is signed by:
+2. an intermediate "Corp Issuing Server", that is in turn signed by:
+3. a root CA "Corp Root CA";
+
+you can configure your request as follows:
+
+```js
+request.get({
+ url: 'https://api.some-server.com/',
+ agentOptions: {
+ ca: [
+ fs.readFileSync('Corp Issuing Server.pem'),
+ fs.readFileSync('Corp Root CA.pem')
+ ]
+ }
+});
+```
+
+[back to top](#table-of-contents)
+
+
+---
+
+## Support for HAR 1.2
+
+The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`.
+
+A validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching.
+
+```js
+ const request = require('request')
+ request({
+ // will be ignored
+ method: 'GET',
+ uri: 'http://www.google.com',
+
+ // HTTP Archive Request Object
+ har: {
+ url: 'http://www.mockbin.com/har',
+ method: 'POST',
+ headers: [
+ {
+ name: 'content-type',
+ value: 'application/x-www-form-urlencoded'
+ }
+ ],
+ postData: {
+ mimeType: 'application/x-www-form-urlencoded',
+ params: [
+ {
+ name: 'foo',
+ value: 'bar'
+ },
+ {
+ name: 'hello',
+ value: 'world'
+ }
+ ]
+ }
+ }
+ })
+
+ // a POST request will be sent to http://www.mockbin.com
+ // with body an application/x-www-form-urlencoded body:
+ // foo=bar&hello=world
+```
+
+[back to top](#table-of-contents)
+
+
+---
+
+## request(options, callback)
+
+The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.
+
+- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`
+- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string.
+- `method` - http method (default: `"GET"`)
+- `headers` - http headers (default: `{}`)
+
+---
+
+- `qs` - object containing querystring values to be appended to the `uri`
+- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`
+- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat`
+- `useQuerystring` - if true, use `querystring` to stringify and parse
+ querystrings, otherwise use `qs` (default: `false`). Set this option to
+ `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the
+ default `foo[0]=bar&foo[1]=baz`.
+
+---
+
+- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object.
+- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above.
+- `formData` - data to pass for a `multipart/form-data` request. See
+ [Forms](#forms) section above.
+- `multipart` - array of objects which contain their own headers and `body`
+ attributes. Sends a `multipart/related` request. See [Forms](#forms) section
+ above.
+ - Alternatively you can pass in an object `{chunked: false, data: []}` where
+ `chunked` is used to specify whether the request is sent in
+ [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding)
+ In non-chunked requests, data items with body streams are not allowed.
+- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.
+- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.
+- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
+- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.
+- `jsonReplacer` - a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that will be passed to `JSON.stringify()` when stringifying a JSON request body.
+
+---
+
+- `auth` - a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
+- `oauth` - options for OAuth HMAC-SHA1 signing. See documentation above.
+- `hawk` - options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
+- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. If you are using SigV4, you can also include a `service` property that specifies the service name. **Note:** you need to `npm install aws4` first.
+- `httpSignature` - options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
+
+---
+
+- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.
+- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)
+- `followOriginalHttpMethod` - by default we redirect to HTTP method GET. you can enable this property to redirect to the original HTTP method (default: `false`)
+- `maxRedirects` - the maximum number of redirects to follow (default: `10`)
+- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain.
+
+---
+
+- `encoding` - encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.)
+- `gzip` - if `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.
+- `jar` - if `true`, remember cookies for future use (or define your custom cookie jar; see examples section)
+
+---
+
+- `agent` - `http(s).Agent` instance to use
+- `agentClass` - alternatively specify your agent's class name
+- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions).
+- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+
+- `pool` - an object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified.
+ - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).
+ - Note that if you are sending multiple requests in a loop and creating
+ multiple new `pool` objects, `maxSockets` will not work as intended. To
+ work around this, either use [`request.defaults`](#requestdefaultsoptions)
+ with your pool options or create the pool object with the `maxSockets`
+ property outside of the loop.
+- `timeout` - integer containing number of milliseconds, controls two timeouts.
+ - **Read timeout**: Time to wait for a server to send response headers (and start the response body) before aborting the request.
+ - **Connection timeout**: Sets the socket to timeout after `timeout` milliseconds of inactivity. Note that increasing the timeout beyond the OS-wide TCP connection timeout will not have any effect ([the default in Linux can be anywhere from 20-120 seconds][linux-timeout])
+
+[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout
+
+---
+
+- `localAddress` - local interface to bind for network connections.
+- `proxy` - an HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)
+- `strictSSL` - if `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.
+- `tunnel` - controls the behavior of
+ [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling)
+ as follows:
+ - `undefined` (default) - `true` if the destination is `https`, `false` otherwise
+ - `true` - always tunnel to the destination by making a `CONNECT` request to
+ the proxy
+ - `false` - request the destination as a `GET` request.
+- `proxyHeaderWhiteList` - a whitelist of headers to send to a
+ tunneling proxy.
+- `proxyHeaderExclusiveList` - a whitelist of headers to send
+ exclusively to a tunneling proxy and not to destination.
+
+---
+
+- `time` - if `true`, the request-response cycle (including all redirects) is timed at millisecond resolution. When set, the following properties are added to the response object:
+ - `elapsedTime` Duration of the entire request/response in milliseconds (*deprecated*).
+ - `responseStartTime` Timestamp when the response began (in Unix Epoch milliseconds) (*deprecated*).
+ - `timingStart` Timestamp of the start of the request (in Unix Epoch milliseconds).
+ - `timings` Contains event timestamps in millisecond resolution relative to `timingStart`. If there were redirects, the properties reflect the timings of the final request in the redirect chain:
+ - `socket` Relative timestamp when the [`http`](https://nodejs.org/api/http.html#http_event_socket) module's `socket` event fires. This happens when the socket is assigned to the request.
+ - `lookup` Relative timestamp when the [`net`](https://nodejs.org/api/net.html#net_event_lookup) module's `lookup` event fires. This happens when the DNS has been resolved.
+ - `connect`: Relative timestamp when the [`net`](https://nodejs.org/api/net.html#net_event_connect) module's `connect` event fires. This happens when the server acknowledges the TCP connection.
+ - `response`: Relative timestamp when the [`http`](https://nodejs.org/api/http.html#http_event_response) module's `response` event fires. This happens when the first bytes are received from the server.
+ - `end`: Relative timestamp when the last bytes of the response are received.
+ - `timingPhases` Contains the durations of each request phase. If there were redirects, the properties reflect the timings of the final request in the redirect chain:
+ - `wait`: Duration of socket initialization (`timings.socket`)
+ - `dns`: Duration of DNS lookup (`timings.lookup` - `timings.socket`)
+ - `tcp`: Duration of TCP connection (`timings.connect` - `timings.socket`)
+ - `firstByte`: Duration of HTTP server response (`timings.response` - `timings.connect`)
+ - `download`: Duration of HTTP download (`timings.end` - `timings.response`)
+ - `total`: Duration entire HTTP round-trip (`timings.end`)
+
+- `har` - a [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-12) for details)*
+- `callback` - alternatively pass the request's callback in the options object
+
+The callback argument gets 3 arguments:
+
+1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)
+2. An [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object (Response object)
+3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)
+
+[back to top](#table-of-contents)
+
+
+---
+
+## Convenience methods
+
+There are also shorthand methods for different HTTP METHODs and some other conveniences.
+
+
+### request.defaults(options)
+
+This method **returns a wrapper** around the normal request API that defaults
+to whatever options you pass to it.
+
+**Note:** `request.defaults()` **does not** modify the global request API;
+instead, it **returns a wrapper** that has your default settings applied to it.
+
+**Note:** You can call `.defaults()` on the wrapper that is returned from
+`request.defaults` to add/override defaults that were previously defaulted.
+
+For example:
+```js
+//requests using baseRequest() will set the 'x-token' header
+const baseRequest = request.defaults({
+ headers: {'x-token': 'my-token'}
+})
+
+//requests using specialRequest() will include the 'x-token' header set in
+//baseRequest and will also include the 'special' header
+const specialRequest = baseRequest.defaults({
+ headers: {special: 'special value'}
+})
+```
+
+### request.METHOD()
+
+These HTTP method convenience functions act just like `request()` but with a default method already set for you:
+
+- *request.get()*: Defaults to `method: "GET"`.
+- *request.post()*: Defaults to `method: "POST"`.
+- *request.put()*: Defaults to `method: "PUT"`.
+- *request.patch()*: Defaults to `method: "PATCH"`.
+- *request.del() / request.delete()*: Defaults to `method: "DELETE"`.
+- *request.head()*: Defaults to `method: "HEAD"`.
+- *request.options()*: Defaults to `method: "OPTIONS"`.
+
+### request.cookie()
+
+Function that creates a new cookie.
+
+```js
+request.cookie('key1=value1')
+```
+### request.jar()
+
+Function that creates a new cookie jar.
+
+```js
+request.jar()
+```
+
+### response.caseless.get('header-name')
+
+Function that returns the specified response header field using a [case-insensitive match](https://tools.ietf.org/html/rfc7230#section-3.2)
+
+```js
+request('http://www.google.com', function (error, response, body) {
+ // print the Content-Type header even if the server returned it as 'content-type' (lowercase)
+ console.log('Content-Type is:', response.caseless.get('Content-Type'));
+});
+```
+
+[back to top](#table-of-contents)
+
+
+---
+
+
+## Debugging
+
+There are at least three ways to debug the operation of `request`:
+
+1. Launch the node process like `NODE_DEBUG=request node script.js`
+ (`lib,request,otherlib` works too).
+
+2. Set `require('request').debug = true` at any time (this does the same thing
+ as #1).
+
+3. Use the [request-debug module](https://github.com/request/request-debug) to
+ view request and response headers and bodies.
+
+[back to top](#table-of-contents)
+
+
+---
+
+## Timeouts
+
+Most requests to external servers should have a timeout attached, in case the
+server is not responding in a timely manner. Without a timeout, your code may
+have a socket open/consume resources for minutes or more.
+
+There are two main types of timeouts: **connection timeouts** and **read
+timeouts**. A connect timeout occurs if the timeout is hit while your client is
+attempting to establish a connection to a remote machine (corresponding to the
+[connect() call][connect] on the socket). A read timeout occurs any time the
+server is too slow to send back a part of the response.
+
+These two situations have widely different implications for what went wrong
+with the request, so it's useful to be able to distinguish them. You can detect
+timeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you
+can detect whether the timeout was a connection timeout by checking if the
+`err.connect` property is set to `true`.
+
+```js
+request.get('http://10.255.255.1', {timeout: 1500}, function(err) {
+ console.log(err.code === 'ETIMEDOUT');
+ // Set to `true` if the timeout was a connection timeout, `false` or
+ // `undefined` otherwise.
+ console.log(err.connect === true);
+ process.exit(0);
+});
+```
+
+[connect]: http://linux.die.net/man/2/connect
+
+## Examples:
+
+```js
+ const request = require('request')
+ , rand = Math.floor(Math.random()*100000000).toString()
+ ;
+ request(
+ { method: 'PUT'
+ , uri: 'http://mikeal.iriscouch.com/testjs/' + rand
+ , multipart:
+ [ { 'content-type': 'application/json'
+ , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
+ }
+ , { body: 'I am an attachment' }
+ ]
+ }
+ , function (error, response, body) {
+ if(response.statusCode == 201){
+ console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)
+ } else {
+ console.log('error: '+ response.statusCode)
+ console.log(body)
+ }
+ }
+ )
+```
+
+For backwards-compatibility, response compression is not supported by default.
+To accept gzip-compressed responses, set the `gzip` option to `true`. Note
+that the body data passed through `request` is automatically decompressed
+while the response object is unmodified and will contain compressed data if
+the server sent a compressed response.
+
+```js
+ const request = require('request')
+ request(
+ { method: 'GET'
+ , uri: 'http://www.google.com'
+ , gzip: true
+ }
+ , function (error, response, body) {
+ // body is the decompressed response body
+ console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))
+ console.log('the decoded data is: ' + body)
+ }
+ )
+ .on('data', function(data) {
+ // decompressed data as it is received
+ console.log('decoded chunk: ' + data)
+ })
+ .on('response', function(response) {
+ // unmodified http.IncomingMessage object
+ response.on('data', function(data) {
+ // compressed data as it is received
+ console.log('received ' + data.length + ' bytes of compressed data')
+ })
+ })
+```
+
+Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).
+
+```js
+const request = request.defaults({jar: true})
+request('http://www.google.com', function () {
+ request('http://images.google.com')
+})
+```
+
+To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)
+
+```js
+const j = request.jar()
+const request = request.defaults({jar:j})
+request('http://www.google.com', function () {
+ request('http://images.google.com')
+})
+```
+
+OR
+
+```js
+const j = request.jar();
+const cookie = request.cookie('key1=value1');
+const url = 'http://www.google.com';
+j.setCookie(cookie, url);
+request({url: url, jar: j}, function () {
+ request('http://images.google.com')
+})
+```
+
+To use a custom cookie store (such as a
+[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore)
+which supports saving to and restoring from JSON files), pass it as a parameter
+to `request.jar()`:
+
+```js
+const FileCookieStore = require('tough-cookie-filestore');
+// NOTE - currently the 'cookies.json' file must already exist!
+const j = request.jar(new FileCookieStore('cookies.json'));
+request = request.defaults({ jar : j })
+request('http://www.google.com', function() {
+ request('http://images.google.com')
+})
+```
+
+The cookie store must be a
+[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie)
+store and it must support synchronous operations; see the
+[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#api)
+for details.
+
+To inspect your cookie jar after a request:
+
+```js
+const j = request.jar()
+request({url: 'http://www.google.com', jar: j}, function () {
+ const cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..."
+ const cookies = j.getCookies(url);
+ // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...]
+})
+```
+
+[back to top](#table-of-contents)
diff --git a/node_modules/request/index.js b/node_modules/request/index.js
new file mode 100755
index 0000000..d50f991
--- /dev/null
+++ b/node_modules/request/index.js
@@ -0,0 +1,155 @@
+// Copyright 2010-2012 Mikeal Rogers
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+'use strict'
+
+var extend = require('extend')
+var cookies = require('./lib/cookies')
+var helpers = require('./lib/helpers')
+
+var paramsHaveRequestBody = helpers.paramsHaveRequestBody
+
+// organize params for patch, post, put, head, del
+function initParams (uri, options, callback) {
+ if (typeof options === 'function') {
+ callback = options
+ }
+
+ var params = {}
+ if (options !== null && typeof options === 'object') {
+ extend(params, options, {uri: uri})
+ } else if (typeof uri === 'string') {
+ extend(params, {uri: uri})
+ } else {
+ extend(params, uri)
+ }
+
+ params.callback = callback || params.callback
+ return params
+}
+
+function request (uri, options, callback) {
+ if (typeof uri === 'undefined') {
+ throw new Error('undefined is not a valid uri or options object.')
+ }
+
+ var params = initParams(uri, options, callback)
+
+ if (params.method === 'HEAD' && paramsHaveRequestBody(params)) {
+ throw new Error('HTTP HEAD requests MUST NOT include a request body.')
+ }
+
+ return new request.Request(params)
+}
+
+function verbFunc (verb) {
+ var method = verb.toUpperCase()
+ return function (uri, options, callback) {
+ var params = initParams(uri, options, callback)
+ params.method = method
+ return request(params, params.callback)
+ }
+}
+
+// define like this to please codeintel/intellisense IDEs
+request.get = verbFunc('get')
+request.head = verbFunc('head')
+request.options = verbFunc('options')
+request.post = verbFunc('post')
+request.put = verbFunc('put')
+request.patch = verbFunc('patch')
+request.del = verbFunc('delete')
+request['delete'] = verbFunc('delete')
+
+request.jar = function (store) {
+ return cookies.jar(store)
+}
+
+request.cookie = function (str) {
+ return cookies.parse(str)
+}
+
+function wrapRequestMethod (method, options, requester, verb) {
+ return function (uri, opts, callback) {
+ var params = initParams(uri, opts, callback)
+
+ var target = {}
+ extend(true, target, options, params)
+
+ target.pool = params.pool || options.pool
+
+ if (verb) {
+ target.method = verb.toUpperCase()
+ }
+
+ if (typeof requester === 'function') {
+ method = requester
+ }
+
+ return method(target, target.callback)
+ }
+}
+
+request.defaults = function (options, requester) {
+ var self = this
+
+ options = options || {}
+
+ if (typeof options === 'function') {
+ requester = options
+ options = {}
+ }
+
+ var defaults = wrapRequestMethod(self, options, requester)
+
+ var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete']
+ verbs.forEach(function (verb) {
+ defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb)
+ })
+
+ defaults.cookie = wrapRequestMethod(self.cookie, options, requester)
+ defaults.jar = self.jar
+ defaults.defaults = self.defaults
+ return defaults
+}
+
+request.forever = function (agentOptions, optionsArg) {
+ var options = {}
+ if (optionsArg) {
+ extend(options, optionsArg)
+ }
+ if (agentOptions) {
+ options.agentOptions = agentOptions
+ }
+
+ options.forever = true
+ return request.defaults(options)
+}
+
+// Exports
+
+module.exports = request
+request.Request = require('./request')
+request.initParams = initParams
+
+// Backwards compatibility for request.debug
+Object.defineProperty(request, 'debug', {
+ enumerable: true,
+ get: function () {
+ return request.Request.debug
+ },
+ set: function (debug) {
+ request.Request.debug = debug
+ }
+})
diff --git a/node_modules/request/lib/auth.js b/node_modules/request/lib/auth.js
new file mode 100644
index 0000000..02f2038
--- /dev/null
+++ b/node_modules/request/lib/auth.js
@@ -0,0 +1,167 @@
+'use strict'
+
+var caseless = require('caseless')
+var uuid = require('uuid/v4')
+var helpers = require('./helpers')
+
+var md5 = helpers.md5
+var toBase64 = helpers.toBase64
+
+function Auth (request) {
+ // define all public properties here
+ this.request = request
+ this.hasAuth = false
+ this.sentAuth = false
+ this.bearerToken = null
+ this.user = null
+ this.pass = null
+}
+
+Auth.prototype.basic = function (user, pass, sendImmediately) {
+ var self = this
+ if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
+ self.request.emit('error', new Error('auth() received invalid user or password'))
+ }
+ self.user = user
+ self.pass = pass
+ self.hasAuth = true
+ var header = user + ':' + (pass || '')
+ if (sendImmediately || typeof sendImmediately === 'undefined') {
+ var authHeader = 'Basic ' + toBase64(header)
+ self.sentAuth = true
+ return authHeader
+ }
+}
+
+Auth.prototype.bearer = function (bearer, sendImmediately) {
+ var self = this
+ self.bearerToken = bearer
+ self.hasAuth = true
+ if (sendImmediately || typeof sendImmediately === 'undefined') {
+ if (typeof bearer === 'function') {
+ bearer = bearer()
+ }
+ var authHeader = 'Bearer ' + (bearer || '')
+ self.sentAuth = true
+ return authHeader
+ }
+}
+
+Auth.prototype.digest = function (method, path, authHeader) {
+ // TODO: More complete implementation of RFC 2617.
+ // - handle challenge.domain
+ // - support qop="auth-int" only
+ // - handle Authentication-Info (not necessarily?)
+ // - check challenge.stale (not necessarily?)
+ // - increase nc (not necessarily?)
+ // For reference:
+ // http://tools.ietf.org/html/rfc2617#section-3
+ // https://github.com/bagder/curl/blob/master/lib/http_digest.c
+
+ var self = this
+
+ var challenge = {}
+ var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
+ while (true) {
+ var match = re.exec(authHeader)
+ if (!match) {
+ break
+ }
+ challenge[match[1]] = match[2] || match[3]
+ }
+
+ /**
+ * RFC 2617: handle both MD5 and MD5-sess algorithms.
+ *
+ * If the algorithm directive's value is "MD5" or unspecified, then HA1 is
+ * HA1=MD5(username:realm:password)
+ * If the algorithm directive's value is "MD5-sess", then HA1 is
+ * HA1=MD5(MD5(username:realm:password):nonce:cnonce)
+ */
+ var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) {
+ var ha1 = md5(user + ':' + realm + ':' + pass)
+ if (algorithm && algorithm.toLowerCase() === 'md5-sess') {
+ return md5(ha1 + ':' + nonce + ':' + cnonce)
+ } else {
+ return ha1
+ }
+ }
+
+ var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
+ var nc = qop && '00000001'
+ var cnonce = qop && uuid().replace(/-/g, '')
+ var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce)
+ var ha2 = md5(method + ':' + path)
+ var digestResponse = qop
+ ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2)
+ : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
+ var authValues = {
+ username: self.user,
+ realm: challenge.realm,
+ nonce: challenge.nonce,
+ uri: path,
+ qop: qop,
+ response: digestResponse,
+ nc: nc,
+ cnonce: cnonce,
+ algorithm: challenge.algorithm,
+ opaque: challenge.opaque
+ }
+
+ authHeader = []
+ for (var k in authValues) {
+ if (authValues[k]) {
+ if (k === 'qop' || k === 'nc' || k === 'algorithm') {
+ authHeader.push(k + '=' + authValues[k])
+ } else {
+ authHeader.push(k + '="' + authValues[k] + '"')
+ }
+ }
+ }
+ authHeader = 'Digest ' + authHeader.join(', ')
+ self.sentAuth = true
+ return authHeader
+}
+
+Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) {
+ var self = this
+ var request = self.request
+
+ var authHeader
+ if (bearer === undefined && user === undefined) {
+ self.request.emit('error', new Error('no auth mechanism defined'))
+ } else if (bearer !== undefined) {
+ authHeader = self.bearer(bearer, sendImmediately)
+ } else {
+ authHeader = self.basic(user, pass, sendImmediately)
+ }
+ if (authHeader) {
+ request.setHeader('authorization', authHeader)
+ }
+}
+
+Auth.prototype.onResponse = function (response) {
+ var self = this
+ var request = self.request
+
+ if (!self.hasAuth || self.sentAuth) { return null }
+
+ var c = caseless(response.headers)
+
+ var authHeader = c.get('www-authenticate')
+ var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
+ request.debug('reauth', authVerb)
+
+ switch (authVerb) {
+ case 'basic':
+ return self.basic(self.user, self.pass, true)
+
+ case 'bearer':
+ return self.bearer(self.bearerToken, true)
+
+ case 'digest':
+ return self.digest(request.method, request.path, authHeader)
+ }
+}
+
+exports.Auth = Auth
diff --git a/node_modules/request/lib/cookies.js b/node_modules/request/lib/cookies.js
new file mode 100644
index 0000000..bd5d46b
--- /dev/null
+++ b/node_modules/request/lib/cookies.js
@@ -0,0 +1,38 @@
+'use strict'
+
+var tough = require('tough-cookie')
+
+var Cookie = tough.Cookie
+var CookieJar = tough.CookieJar
+
+exports.parse = function (str) {
+ if (str && str.uri) {
+ str = str.uri
+ }
+ if (typeof str !== 'string') {
+ throw new Error('The cookie function only accepts STRING as param')
+ }
+ return Cookie.parse(str, {loose: true})
+}
+
+// Adapt the sometimes-Async api of tough.CookieJar to our requirements
+function RequestJar (store) {
+ var self = this
+ self._jar = new CookieJar(store, {looseMode: true})
+}
+RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) {
+ var self = this
+ return self._jar.setCookieSync(cookieOrStr, uri, options || {})
+}
+RequestJar.prototype.getCookieString = function (uri) {
+ var self = this
+ return self._jar.getCookieStringSync(uri)
+}
+RequestJar.prototype.getCookies = function (uri) {
+ var self = this
+ return self._jar.getCookiesSync(uri)
+}
+
+exports.jar = function (store) {
+ return new RequestJar(store)
+}
diff --git a/node_modules/request/lib/getProxyFromURI.js b/node_modules/request/lib/getProxyFromURI.js
new file mode 100644
index 0000000..0b9b18e
--- /dev/null
+++ b/node_modules/request/lib/getProxyFromURI.js
@@ -0,0 +1,79 @@
+'use strict'
+
+function formatHostname (hostname) {
+ // canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
+ return hostname.replace(/^\.*/, '.').toLowerCase()
+}
+
+function parseNoProxyZone (zone) {
+ zone = zone.trim().toLowerCase()
+
+ var zoneParts = zone.split(':', 2)
+ var zoneHost = formatHostname(zoneParts[0])
+ var zonePort = zoneParts[1]
+ var hasPort = zone.indexOf(':') > -1
+
+ return {hostname: zoneHost, port: zonePort, hasPort: hasPort}
+}
+
+function uriInNoProxy (uri, noProxy) {
+ var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
+ var hostname = formatHostname(uri.hostname)
+ var noProxyList = noProxy.split(',')
+
+ // iterate through the noProxyList until it finds a match.
+ return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) {
+ var isMatchedAt = hostname.indexOf(noProxyZone.hostname)
+ var hostnameMatched = (
+ isMatchedAt > -1 &&
+ (isMatchedAt === hostname.length - noProxyZone.hostname.length)
+ )
+
+ if (noProxyZone.hasPort) {
+ return (port === noProxyZone.port) && hostnameMatched
+ }
+
+ return hostnameMatched
+ })
+}
+
+function getProxyFromURI (uri) {
+ // Decide the proper request proxy to use based on the request URI object and the
+ // environmental variables (NO_PROXY, HTTP_PROXY, etc.)
+ // respect NO_PROXY environment variables (see: https://lynx.invisible-island.net/lynx2.8.7/breakout/lynx_help/keystrokes/environments.html)
+
+ var noProxy = process.env.NO_PROXY || process.env.no_proxy || ''
+
+ // if the noProxy is a wildcard then return null
+
+ if (noProxy === '*') {
+ return null
+ }
+
+ // if the noProxy is not empty and the uri is found return null
+
+ if (noProxy !== '' && uriInNoProxy(uri, noProxy)) {
+ return null
+ }
+
+ // Check for HTTP or HTTPS Proxy in environment Else default to null
+
+ if (uri.protocol === 'http:') {
+ return process.env.HTTP_PROXY ||
+ process.env.http_proxy || null
+ }
+
+ if (uri.protocol === 'https:') {
+ return process.env.HTTPS_PROXY ||
+ process.env.https_proxy ||
+ process.env.HTTP_PROXY ||
+ process.env.http_proxy || null
+ }
+
+ // if none of that works, return null
+ // (What uri protocol are you using then?)
+
+ return null
+}
+
+module.exports = getProxyFromURI
diff --git a/node_modules/request/lib/har.js b/node_modules/request/lib/har.js
new file mode 100644
index 0000000..0dedee4
--- /dev/null
+++ b/node_modules/request/lib/har.js
@@ -0,0 +1,205 @@
+'use strict'
+
+var fs = require('fs')
+var qs = require('querystring')
+var validate = require('har-validator')
+var extend = require('extend')
+
+function Har (request) {
+ this.request = request
+}
+
+Har.prototype.reducer = function (obj, pair) {
+ // new property ?
+ if (obj[pair.name] === undefined) {
+ obj[pair.name] = pair.value
+ return obj
+ }
+
+ // existing? convert to array
+ var arr = [
+ obj[pair.name],
+ pair.value
+ ]
+
+ obj[pair.name] = arr
+
+ return obj
+}
+
+Har.prototype.prep = function (data) {
+ // construct utility properties
+ data.queryObj = {}
+ data.headersObj = {}
+ data.postData.jsonObj = false
+ data.postData.paramsObj = false
+
+ // construct query objects
+ if (data.queryString && data.queryString.length) {
+ data.queryObj = data.queryString.reduce(this.reducer, {})
+ }
+
+ // construct headers objects
+ if (data.headers && data.headers.length) {
+ // loweCase header keys
+ data.headersObj = data.headers.reduceRight(function (headers, header) {
+ headers[header.name] = header.value
+ return headers
+ }, {})
+ }
+
+ // construct Cookie header
+ if (data.cookies && data.cookies.length) {
+ var cookies = data.cookies.map(function (cookie) {
+ return cookie.name + '=' + cookie.value
+ })
+
+ if (cookies.length) {
+ data.headersObj.cookie = cookies.join('; ')
+ }
+ }
+
+ // prep body
+ function some (arr) {
+ return arr.some(function (type) {
+ return data.postData.mimeType.indexOf(type) === 0
+ })
+ }
+
+ if (some([
+ 'multipart/mixed',
+ 'multipart/related',
+ 'multipart/form-data',
+ 'multipart/alternative'])) {
+ // reset values
+ data.postData.mimeType = 'multipart/form-data'
+ } else if (some([
+ 'application/x-www-form-urlencoded'])) {
+ if (!data.postData.params) {
+ data.postData.text = ''
+ } else {
+ data.postData.paramsObj = data.postData.params.reduce(this.reducer, {})
+
+ // always overwrite
+ data.postData.text = qs.stringify(data.postData.paramsObj)
+ }
+ } else if (some([
+ 'text/json',
+ 'text/x-json',
+ 'application/json',
+ 'application/x-json'])) {
+ data.postData.mimeType = 'application/json'
+
+ if (data.postData.text) {
+ try {
+ data.postData.jsonObj = JSON.parse(data.postData.text)
+ } catch (e) {
+ this.request.debug(e)
+
+ // force back to text/plain
+ data.postData.mimeType = 'text/plain'
+ }
+ }
+ }
+
+ return data
+}
+
+Har.prototype.options = function (options) {
+ // skip if no har property defined
+ if (!options.har) {
+ return options
+ }
+
+ var har = {}
+ extend(har, options.har)
+
+ // only process the first entry
+ if (har.log && har.log.entries) {
+ har = har.log.entries[0]
+ }
+
+ // add optional properties to make validation successful
+ har.url = har.url || options.url || options.uri || options.baseUrl || '/'
+ har.httpVersion = har.httpVersion || 'HTTP/1.1'
+ har.queryString = har.queryString || []
+ har.headers = har.headers || []
+ har.cookies = har.cookies || []
+ har.postData = har.postData || {}
+ har.postData.mimeType = har.postData.mimeType || 'application/octet-stream'
+
+ har.bodySize = 0
+ har.headersSize = 0
+ har.postData.size = 0
+
+ if (!validate.request(har)) {
+ return options
+ }
+
+ // clean up and get some utility properties
+ var req = this.prep(har)
+
+ // construct new options
+ if (req.url) {
+ options.url = req.url
+ }
+
+ if (req.method) {
+ options.method = req.method
+ }
+
+ if (Object.keys(req.queryObj).length) {
+ options.qs = req.queryObj
+ }
+
+ if (Object.keys(req.headersObj).length) {
+ options.headers = req.headersObj
+ }
+
+ function test (type) {
+ return req.postData.mimeType.indexOf(type) === 0
+ }
+ if (test('application/x-www-form-urlencoded')) {
+ options.form = req.postData.paramsObj
+ } else if (test('application/json')) {
+ if (req.postData.jsonObj) {
+ options.body = req.postData.jsonObj
+ options.json = true
+ }
+ } else if (test('multipart/form-data')) {
+ options.formData = {}
+
+ req.postData.params.forEach(function (param) {
+ var attachment = {}
+
+ if (!param.fileName && !param.contentType) {
+ options.formData[param.name] = param.value
+ return
+ }
+
+ // attempt to read from disk!
+ if (param.fileName && !param.value) {
+ attachment.value = fs.createReadStream(param.fileName)
+ } else if (param.value) {
+ attachment.value = param.value
+ }
+
+ if (param.fileName) {
+ attachment.options = {
+ filename: param.fileName,
+ contentType: param.contentType ? param.contentType : null
+ }
+ }
+
+ options.formData[param.name] = attachment
+ })
+ } else {
+ if (req.postData.text) {
+ options.body = req.postData.text
+ }
+ }
+
+ return options
+}
+
+exports.Har = Har
diff --git a/node_modules/request/lib/hawk.js b/node_modules/request/lib/hawk.js
new file mode 100644
index 0000000..de48a98
--- /dev/null
+++ b/node_modules/request/lib/hawk.js
@@ -0,0 +1,89 @@
+'use strict'
+
+var crypto = require('crypto')
+
+function randomString (size) {
+ var bits = (size + 1) * 6
+ var buffer = crypto.randomBytes(Math.ceil(bits / 8))
+ var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '')
+ return string.slice(0, size)
+}
+
+function calculatePayloadHash (payload, algorithm, contentType) {
+ var hash = crypto.createHash(algorithm)
+ hash.update('hawk.1.payload\n')
+ hash.update((contentType ? contentType.split(';')[0].trim().toLowerCase() : '') + '\n')
+ hash.update(payload || '')
+ hash.update('\n')
+ return hash.digest('base64')
+}
+
+exports.calculateMac = function (credentials, opts) {
+ var normalized = 'hawk.1.header\n' +
+ opts.ts + '\n' +
+ opts.nonce + '\n' +
+ (opts.method || '').toUpperCase() + '\n' +
+ opts.resource + '\n' +
+ opts.host.toLowerCase() + '\n' +
+ opts.port + '\n' +
+ (opts.hash || '') + '\n'
+
+ if (opts.ext) {
+ normalized = normalized + opts.ext.replace('\\', '\\\\').replace('\n', '\\n')
+ }
+
+ normalized = normalized + '\n'
+
+ if (opts.app) {
+ normalized = normalized + opts.app + '\n' + (opts.dlg || '') + '\n'
+ }
+
+ var hmac = crypto.createHmac(credentials.algorithm, credentials.key).update(normalized)
+ var digest = hmac.digest('base64')
+ return digest
+}
+
+exports.header = function (uri, method, opts) {
+ var timestamp = opts.timestamp || Math.floor((Date.now() + (opts.localtimeOffsetMsec || 0)) / 1000)
+ var credentials = opts.credentials
+ if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
+ return ''
+ }
+
+ if (['sha1', 'sha256'].indexOf(credentials.algorithm) === -1) {
+ return ''
+ }
+
+ var artifacts = {
+ ts: timestamp,
+ nonce: opts.nonce || randomString(6),
+ method: method,
+ resource: uri.pathname + (uri.search || ''),
+ host: uri.hostname,
+ port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
+ hash: opts.hash,
+ ext: opts.ext,
+ app: opts.app,
+ dlg: opts.dlg
+ }
+
+ if (!artifacts.hash && (opts.payload || opts.payload === '')) {
+ artifacts.hash = calculatePayloadHash(opts.payload, credentials.algorithm, opts.contentType)
+ }
+
+ var mac = exports.calculateMac(credentials, artifacts)
+
+ var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''
+ var header = 'Hawk id="' + credentials.id +
+ '", ts="' + artifacts.ts +
+ '", nonce="' + artifacts.nonce +
+ (artifacts.hash ? '", hash="' + artifacts.hash : '') +
+ (hasExt ? '", ext="' + artifacts.ext.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : '') +
+ '", mac="' + mac + '"'
+
+ if (artifacts.app) {
+ header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'
+ }
+
+ return header
+}
diff --git a/node_modules/request/lib/helpers.js b/node_modules/request/lib/helpers.js
new file mode 100644
index 0000000..8b2a7e6
--- /dev/null
+++ b/node_modules/request/lib/helpers.js
@@ -0,0 +1,66 @@
+'use strict'
+
+var jsonSafeStringify = require('json-stringify-safe')
+var crypto = require('crypto')
+var Buffer = require('safe-buffer').Buffer
+
+var defer = typeof setImmediate === 'undefined'
+ ? process.nextTick
+ : setImmediate
+
+function paramsHaveRequestBody (params) {
+ return (
+ params.body ||
+ params.requestBodyStream ||
+ (params.json && typeof params.json !== 'boolean') ||
+ params.multipart
+ )
+}
+
+function safeStringify (obj, replacer) {
+ var ret
+ try {
+ ret = JSON.stringify(obj, replacer)
+ } catch (e) {
+ ret = jsonSafeStringify(obj, replacer)
+ }
+ return ret
+}
+
+function md5 (str) {
+ return crypto.createHash('md5').update(str).digest('hex')
+}
+
+function isReadStream (rs) {
+ return rs.readable && rs.path && rs.mode
+}
+
+function toBase64 (str) {
+ return Buffer.from(str || '', 'utf8').toString('base64')
+}
+
+function copy (obj) {
+ var o = {}
+ Object.keys(obj).forEach(function (i) {
+ o[i] = obj[i]
+ })
+ return o
+}
+
+function version () {
+ var numbers = process.version.replace('v', '').split('.')
+ return {
+ major: parseInt(numbers[0], 10),
+ minor: parseInt(numbers[1], 10),
+ patch: parseInt(numbers[2], 10)
+ }
+}
+
+exports.paramsHaveRequestBody = paramsHaveRequestBody
+exports.safeStringify = safeStringify
+exports.md5 = md5
+exports.isReadStream = isReadStream
+exports.toBase64 = toBase64
+exports.copy = copy
+exports.version = version
+exports.defer = defer
diff --git a/node_modules/request/lib/multipart.js b/node_modules/request/lib/multipart.js
new file mode 100644
index 0000000..6a009bc
--- /dev/null
+++ b/node_modules/request/lib/multipart.js
@@ -0,0 +1,112 @@
+'use strict'
+
+var uuid = require('uuid/v4')
+var CombinedStream = require('combined-stream')
+var isstream = require('isstream')
+var Buffer = require('safe-buffer').Buffer
+
+function Multipart (request) {
+ this.request = request
+ this.boundary = uuid()
+ this.chunked = false
+ this.body = null
+}
+
+Multipart.prototype.isChunked = function (options) {
+ var self = this
+ var chunked = false
+ var parts = options.data || options
+
+ if (!parts.forEach) {
+ self.request.emit('error', new Error('Argument error, options.multipart.'))
+ }
+
+ if (options.chunked !== undefined) {
+ chunked = options.chunked
+ }
+
+ if (self.request.getHeader('transfer-encoding') === 'chunked') {
+ chunked = true
+ }
+
+ if (!chunked) {
+ parts.forEach(function (part) {
+ if (typeof part.body === 'undefined') {
+ self.request.emit('error', new Error('Body attribute missing in multipart.'))
+ }
+ if (isstream(part.body)) {
+ chunked = true
+ }
+ })
+ }
+
+ return chunked
+}
+
+Multipart.prototype.setHeaders = function (chunked) {
+ var self = this
+
+ if (chunked && !self.request.hasHeader('transfer-encoding')) {
+ self.request.setHeader('transfer-encoding', 'chunked')
+ }
+
+ var header = self.request.getHeader('content-type')
+
+ if (!header || header.indexOf('multipart') === -1) {
+ self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary)
+ } else {
+ if (header.indexOf('boundary') !== -1) {
+ self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1')
+ } else {
+ self.request.setHeader('content-type', header + '; boundary=' + self.boundary)
+ }
+ }
+}
+
+Multipart.prototype.build = function (parts, chunked) {
+ var self = this
+ var body = chunked ? new CombinedStream() : []
+
+ function add (part) {
+ if (typeof part === 'number') {
+ part = part.toString()
+ }
+ return chunked ? body.append(part) : body.push(Buffer.from(part))
+ }
+
+ if (self.request.preambleCRLF) {
+ add('\r\n')
+ }
+
+ parts.forEach(function (part) {
+ var preamble = '--' + self.boundary + '\r\n'
+ Object.keys(part).forEach(function (key) {
+ if (key === 'body') { return }
+ preamble += key + ': ' + part[key] + '\r\n'
+ })
+ preamble += '\r\n'
+ add(preamble)
+ add(part.body)
+ add('\r\n')
+ })
+ add('--' + self.boundary + '--')
+
+ if (self.request.postambleCRLF) {
+ add('\r\n')
+ }
+
+ return body
+}
+
+Multipart.prototype.onRequest = function (options) {
+ var self = this
+
+ var chunked = self.isChunked(options)
+ var parts = options.data || options
+
+ self.setHeaders(chunked)
+ self.chunked = chunked
+ self.body = self.build(parts, chunked)
+}
+
+exports.Multipart = Multipart
diff --git a/node_modules/request/lib/oauth.js b/node_modules/request/lib/oauth.js
new file mode 100644
index 0000000..96de72b
--- /dev/null
+++ b/node_modules/request/lib/oauth.js
@@ -0,0 +1,148 @@
+'use strict'
+
+var url = require('url')
+var qs = require('qs')
+var caseless = require('caseless')
+var uuid = require('uuid/v4')
+var oauth = require('oauth-sign')
+var crypto = require('crypto')
+var Buffer = require('safe-buffer').Buffer
+
+function OAuth (request) {
+ this.request = request
+ this.params = null
+}
+
+OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) {
+ var oa = {}
+ for (var i in _oauth) {
+ oa['oauth_' + i] = _oauth[i]
+ }
+ if (!oa.oauth_version) {
+ oa.oauth_version = '1.0'
+ }
+ if (!oa.oauth_timestamp) {
+ oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString()
+ }
+ if (!oa.oauth_nonce) {
+ oa.oauth_nonce = uuid().replace(/-/g, '')
+ }
+ if (!oa.oauth_signature_method) {
+ oa.oauth_signature_method = 'HMAC-SHA1'
+ }
+
+ var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase
+ delete oa.oauth_consumer_secret
+ delete oa.oauth_private_key
+
+ var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase
+ delete oa.oauth_token_secret
+
+ var realm = oa.oauth_realm
+ delete oa.oauth_realm
+ delete oa.oauth_transport_method
+
+ var baseurl = uri.protocol + '//' + uri.host + uri.pathname
+ var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&'))
+
+ oa.oauth_signature = oauth.sign(
+ oa.oauth_signature_method,
+ method,
+ baseurl,
+ params,
+ consumer_secret_or_private_key, // eslint-disable-line camelcase
+ token_secret // eslint-disable-line camelcase
+ )
+
+ if (realm) {
+ oa.realm = realm
+ }
+
+ return oa
+}
+
+OAuth.prototype.buildBodyHash = function (_oauth, body) {
+ if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) {
+ this.request.emit('error', new Error('oauth: ' + _oauth.signature_method +
+ ' signature_method not supported with body_hash signing.'))
+ }
+
+ var shasum = crypto.createHash('sha1')
+ shasum.update(body || '')
+ var sha1 = shasum.digest('hex')
+
+ return Buffer.from(sha1, 'hex').toString('base64')
+}
+
+OAuth.prototype.concatParams = function (oa, sep, wrap) {
+ wrap = wrap || ''
+
+ var params = Object.keys(oa).filter(function (i) {
+ return i !== 'realm' && i !== 'oauth_signature'
+ }).sort()
+
+ if (oa.realm) {
+ params.splice(0, 0, 'realm')
+ }
+ params.push('oauth_signature')
+
+ return params.map(function (i) {
+ return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap
+ }).join(sep)
+}
+
+OAuth.prototype.onRequest = function (_oauth) {
+ var self = this
+ self.params = _oauth
+
+ var uri = self.request.uri || {}
+ var method = self.request.method || ''
+ var headers = caseless(self.request.headers)
+ var body = self.request.body || ''
+ var qsLib = self.request.qsLib || qs
+
+ var form
+ var query
+ var contentType = headers.get('content-type') || ''
+ var formContentType = 'application/x-www-form-urlencoded'
+ var transport = _oauth.transport_method || 'header'
+
+ if (contentType.slice(0, formContentType.length) === formContentType) {
+ contentType = formContentType
+ form = body
+ }
+ if (uri.query) {
+ query = uri.query
+ }
+ if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) {
+ self.request.emit('error', new Error('oauth: transport_method of body requires POST ' +
+ 'and content-type ' + formContentType))
+ }
+
+ if (!form && typeof _oauth.body_hash === 'boolean') {
+ _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString())
+ }
+
+ var oa = self.buildParams(_oauth, uri, method, query, form, qsLib)
+
+ switch (transport) {
+ case 'header':
+ self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"'))
+ break
+
+ case 'query':
+ var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&')
+ self.request.uri = url.parse(href)
+ self.request.path = self.request.uri.path
+ break
+
+ case 'body':
+ self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&')
+ break
+
+ default:
+ self.request.emit('error', new Error('oauth: transport_method invalid'))
+ }
+}
+
+exports.OAuth = OAuth
diff --git a/node_modules/request/lib/querystring.js b/node_modules/request/lib/querystring.js
new file mode 100644
index 0000000..4a32cd1
--- /dev/null
+++ b/node_modules/request/lib/querystring.js
@@ -0,0 +1,50 @@
+'use strict'
+
+var qs = require('qs')
+var querystring = require('querystring')
+
+function Querystring (request) {
+ this.request = request
+ this.lib = null
+ this.useQuerystring = null
+ this.parseOptions = null
+ this.stringifyOptions = null
+}
+
+Querystring.prototype.init = function (options) {
+ if (this.lib) { return }
+
+ this.useQuerystring = options.useQuerystring
+ this.lib = (this.useQuerystring ? querystring : qs)
+
+ this.parseOptions = options.qsParseOptions || {}
+ this.stringifyOptions = options.qsStringifyOptions || {}
+}
+
+Querystring.prototype.stringify = function (obj) {
+ return (this.useQuerystring)
+ ? this.rfc3986(this.lib.stringify(obj,
+ this.stringifyOptions.sep || null,
+ this.stringifyOptions.eq || null,
+ this.stringifyOptions))
+ : this.lib.stringify(obj, this.stringifyOptions)
+}
+
+Querystring.prototype.parse = function (str) {
+ return (this.useQuerystring)
+ ? this.lib.parse(str,
+ this.parseOptions.sep || null,
+ this.parseOptions.eq || null,
+ this.parseOptions)
+ : this.lib.parse(str, this.parseOptions)
+}
+
+Querystring.prototype.rfc3986 = function (str) {
+ return str.replace(/[!'()*]/g, function (c) {
+ return '%' + c.charCodeAt(0).toString(16).toUpperCase()
+ })
+}
+
+Querystring.prototype.unescape = querystring.unescape
+
+exports.Querystring = Querystring
diff --git a/node_modules/request/lib/redirect.js b/node_modules/request/lib/redirect.js
new file mode 100644
index 0000000..b9150e7
--- /dev/null
+++ b/node_modules/request/lib/redirect.js
@@ -0,0 +1,154 @@
+'use strict'
+
+var url = require('url')
+var isUrl = /^https?:/
+
+function Redirect (request) {
+ this.request = request
+ this.followRedirect = true
+ this.followRedirects = true
+ this.followAllRedirects = false
+ this.followOriginalHttpMethod = false
+ this.allowRedirect = function () { return true }
+ this.maxRedirects = 10
+ this.redirects = []
+ this.redirectsFollowed = 0
+ this.removeRefererHeader = false
+}
+
+Redirect.prototype.onRequest = function (options) {
+ var self = this
+
+ if (options.maxRedirects !== undefined) {
+ self.maxRedirects = options.maxRedirects
+ }
+ if (typeof options.followRedirect === 'function') {
+ self.allowRedirect = options.followRedirect
+ }
+ if (options.followRedirect !== undefined) {
+ self.followRedirects = !!options.followRedirect
+ }
+ if (options.followAllRedirects !== undefined) {
+ self.followAllRedirects = options.followAllRedirects
+ }
+ if (self.followRedirects || self.followAllRedirects) {
+ self.redirects = self.redirects || []
+ }
+ if (options.removeRefererHeader !== undefined) {
+ self.removeRefererHeader = options.removeRefererHeader
+ }
+ if (options.followOriginalHttpMethod !== undefined) {
+ self.followOriginalHttpMethod = options.followOriginalHttpMethod
+ }
+}
+
+Redirect.prototype.redirectTo = function (response) {
+ var self = this
+ var request = self.request
+
+ var redirectTo = null
+ if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) {
+ var location = response.caseless.get('location')
+ request.debug('redirect', location)
+
+ if (self.followAllRedirects) {
+ redirectTo = location
+ } else if (self.followRedirects) {
+ switch (request.method) {
+ case 'PATCH':
+ case 'PUT':
+ case 'POST':
+ case 'DELETE':
+ // Do not follow redirects
+ break
+ default:
+ redirectTo = location
+ break
+ }
+ }
+ } else if (response.statusCode === 401) {
+ var authHeader = request._auth.onResponse(response)
+ if (authHeader) {
+ request.setHeader('authorization', authHeader)
+ redirectTo = request.uri
+ }
+ }
+ return redirectTo
+}
+
+Redirect.prototype.onResponse = function (response) {
+ var self = this
+ var request = self.request
+
+ var redirectTo = self.redirectTo(response)
+ if (!redirectTo || !self.allowRedirect.call(request, response)) {
+ return false
+ }
+
+ request.debug('redirect to', redirectTo)
+
+ // ignore any potential response body. it cannot possibly be useful
+ // to us at this point.
+ // response.resume should be defined, but check anyway before calling. Workaround for browserify.
+ if (response.resume) {
+ response.resume()
+ }
+
+ if (self.redirectsFollowed >= self.maxRedirects) {
+ request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href))
+ return false
+ }
+ self.redirectsFollowed += 1
+
+ if (!isUrl.test(redirectTo)) {
+ redirectTo = url.resolve(request.uri.href, redirectTo)
+ }
+
+ var uriPrev = request.uri
+ request.uri = url.parse(redirectTo)
+
+ // handle the case where we change protocol from https to http or vice versa
+ if (request.uri.protocol !== uriPrev.protocol) {
+ delete request.agent
+ }
+
+ self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo })
+
+ if (self.followAllRedirects && request.method !== 'HEAD' &&
+ response.statusCode !== 401 && response.statusCode !== 307) {
+ request.method = self.followOriginalHttpMethod ? request.method : 'GET'
+ }
+ // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215
+ delete request.src
+ delete request.req
+ delete request._started
+ if (response.statusCode !== 401 && response.statusCode !== 307) {
+ // Remove parameters from the previous response, unless this is the second request
+ // for a server that requires digest authentication.
+ delete request.body
+ delete request._form
+ if (request.headers) {
+ request.removeHeader('host')
+ request.removeHeader('content-type')
+ request.removeHeader('content-length')
+ if (request.uri.hostname !== request.originalHost.split(':')[0]) {
+ // Remove authorization if changing hostnames (but not if just
+ // changing ports or protocols). This matches the behavior of curl:
+ // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710
+ request.removeHeader('authorization')
+ }
+ }
+ }
+
+ if (!self.removeRefererHeader) {
+ request.setHeader('referer', uriPrev.href)
+ }
+
+ request.emit('redirect')
+
+ request.init()
+
+ return true
+}
+
+exports.Redirect = Redirect
diff --git a/node_modules/request/lib/tunnel.js b/node_modules/request/lib/tunnel.js
new file mode 100644
index 0000000..4479003
--- /dev/null
+++ b/node_modules/request/lib/tunnel.js
@@ -0,0 +1,175 @@
+'use strict'
+
+var url = require('url')
+var tunnel = require('tunnel-agent')
+
+var defaultProxyHeaderWhiteList = [
+ 'accept',
+ 'accept-charset',
+ 'accept-encoding',
+ 'accept-language',
+ 'accept-ranges',
+ 'cache-control',
+ 'content-encoding',
+ 'content-language',
+ 'content-location',
+ 'content-md5',
+ 'content-range',
+ 'content-type',
+ 'connection',
+ 'date',
+ 'expect',
+ 'max-forwards',
+ 'pragma',
+ 'referer',
+ 'te',
+ 'user-agent',
+ 'via'
+]
+
+var defaultProxyHeaderExclusiveList = [
+ 'proxy-authorization'
+]
+
+function constructProxyHost (uriObject) {
+ var port = uriObject.port
+ var protocol = uriObject.protocol
+ var proxyHost = uriObject.hostname + ':'
+
+ if (port) {
+ proxyHost += port
+ } else if (protocol === 'https:') {
+ proxyHost += '443'
+ } else {
+ proxyHost += '80'
+ }
+
+ return proxyHost
+}
+
+function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) {
+ var whiteList = proxyHeaderWhiteList
+ .reduce(function (set, header) {
+ set[header.toLowerCase()] = true
+ return set
+ }, {})
+
+ return Object.keys(headers)
+ .filter(function (header) {
+ return whiteList[header.toLowerCase()]
+ })
+ .reduce(function (set, header) {
+ set[header] = headers[header]
+ return set
+ }, {})
+}
+
+function constructTunnelOptions (request, proxyHeaders) {
+ var proxy = request.proxy
+
+ var tunnelOptions = {
+ proxy: {
+ host: proxy.hostname,
+ port: +proxy.port,
+ proxyAuth: proxy.auth,
+ headers: proxyHeaders
+ },
+ headers: request.headers,
+ ca: request.ca,
+ cert: request.cert,
+ key: request.key,
+ passphrase: request.passphrase,
+ pfx: request.pfx,
+ ciphers: request.ciphers,
+ rejectUnauthorized: request.rejectUnauthorized,
+ secureOptions: request.secureOptions,
+ secureProtocol: request.secureProtocol
+ }
+
+ return tunnelOptions
+}
+
+function constructTunnelFnName (uri, proxy) {
+ var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http')
+ var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http')
+ return [uriProtocol, proxyProtocol].join('Over')
+}
+
+function getTunnelFn (request) {
+ var uri = request.uri
+ var proxy = request.proxy
+ var tunnelFnName = constructTunnelFnName(uri, proxy)
+ return tunnel[tunnelFnName]
+}
+
+function Tunnel (request) {
+ this.request = request
+ this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList
+ this.proxyHeaderExclusiveList = []
+ if (typeof request.tunnel !== 'undefined') {
+ this.tunnelOverride = request.tunnel
+ }
+}
+
+Tunnel.prototype.isEnabled = function () {
+ var self = this
+ var request = self.request
+ // Tunnel HTTPS by default. Allow the user to override this setting.
+
+ // If self.tunnelOverride is set (the user specified a value), use it.
+ if (typeof self.tunnelOverride !== 'undefined') {
+ return self.tunnelOverride
+ }
+
+ // If the destination is HTTPS, tunnel.
+ if (request.uri.protocol === 'https:') {
+ return true
+ }
+
+ // Otherwise, do not use tunnel.
+ return false
+}
+
+Tunnel.prototype.setup = function (options) {
+ var self = this
+ var request = self.request
+
+ options = options || {}
+
+ if (typeof request.proxy === 'string') {
+ request.proxy = url.parse(request.proxy)
+ }
+
+ if (!request.proxy || !request.tunnel) {
+ return false
+ }
+
+ // Setup Proxy Header Exclusive List and White List
+ if (options.proxyHeaderWhiteList) {
+ self.proxyHeaderWhiteList = options.proxyHeaderWhiteList
+ }
+ if (options.proxyHeaderExclusiveList) {
+ self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList
+ }
+
+ var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList)
+ var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList)
+
+ // Setup Proxy Headers and Proxy Headers Host
+ // Only send the Proxy White Listed Header names
+ var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList)
+ proxyHeaders.host = constructProxyHost(request.uri)
+
+ proxyHeaderExclusiveList.forEach(request.removeHeader, request)
+
+ // Set Agent from Tunnel Data
+ var tunnelFn = getTunnelFn(request)
+ var tunnelOptions = constructTunnelOptions(request, proxyHeaders)
+ request.agent = tunnelFn(tunnelOptions)
+
+ return true
+}
+
+Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList
+Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList
+exports.Tunnel = Tunnel
diff --git a/node_modules/request/package.json b/node_modules/request/package.json
new file mode 100644
index 0000000..cbb2f2e
--- /dev/null
+++ b/node_modules/request/package.json
@@ -0,0 +1,86 @@
+{
+ "name": "request",
+ "description": "Simplified HTTP request client.",
+ "keywords": [
+ "http",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "version": "2.88.2",
+ "author": "Mikeal Rogers <mikeal.rogers@gmail.com>",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/request/request.git"
+ },
+ "bugs": {
+ "url": "http://github.com/request/request/issues"
+ },
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 6"
+ },
+ "main": "index.js",
+ "files": [
+ "lib/",
+ "index.js",
+ "request.js"
+ ],
+ "dependencies": {
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.8.0",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.6",
+ "extend": "~3.0.2",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.3.2",
+ "har-validator": "~5.1.3",
+ "http-signature": "~1.2.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.19",
+ "oauth-sign": "~0.9.0",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.2",
+ "safe-buffer": "^5.1.2",
+ "tough-cookie": "~2.5.0",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.3.2"
+ },
+ "scripts": {
+ "test": "npm run lint && npm run test-ci && npm run test-browser",
+ "test-ci": "taper tests/test-*.js",
+ "test-cov": "nyc --reporter=lcov tape tests/test-*.js",
+ "test-browser": "node tests/browser/start.js",
+ "lint": "standard"
+ },
+ "devDependencies": {
+ "bluebird": "^3.2.1",
+ "browserify": "^13.0.1",
+ "browserify-istanbul": "^2.0.0",
+ "buffer-equal": "^1.0.0",
+ "codecov": "^3.0.4",
+ "coveralls": "^3.0.2",
+ "function-bind": "^1.0.2",
+ "karma": "^3.0.0",
+ "karma-browserify": "^5.0.1",
+ "karma-cli": "^1.0.0",
+ "karma-coverage": "^1.0.0",
+ "karma-phantomjs-launcher": "^1.0.0",
+ "karma-tap": "^3.0.1",
+ "nyc": "^14.1.1",
+ "phantomjs-prebuilt": "^2.1.3",
+ "rimraf": "^2.2.8",
+ "server-destroy": "^1.0.1",
+ "standard": "^9.0.0",
+ "tape": "^4.6.0",
+ "taper": "^0.5.0"
+ },
+ "greenkeeper": {
+ "ignore": [
+ "hawk",
+ "har-validator"
+ ]
+ }
+}
diff --git a/node_modules/request/request.js b/node_modules/request/request.js
new file mode 100644
index 0000000..198b760
--- /dev/null
+++ b/node_modules/request/request.js
@@ -0,0 +1,1553 @@
+'use strict'
+
+var http = require('http')
+var https = require('https')
+var url = require('url')
+var util = require('util')
+var stream = require('stream')
+var zlib = require('zlib')
+var aws2 = require('aws-sign2')
+var aws4 = require('aws4')
+var httpSignature = require('http-signature')
+var mime = require('mime-types')
+var caseless = require('caseless')
+var ForeverAgent = require('forever-agent')
+var FormData = require('form-data')
+var extend = require('extend')
+var isstream = require('isstream')
+var isTypedArray = require('is-typedarray').strict
+var helpers = require('./lib/helpers')
+var cookies = require('./lib/cookies')
+var getProxyFromURI = require('./lib/getProxyFromURI')
+var Querystring = require('./lib/querystring').Querystring
+var Har = require('./lib/har').Har
+var Auth = require('./lib/auth').Auth
+var OAuth = require('./lib/oauth').OAuth
+var hawk = require('./lib/hawk')
+var Multipart = require('./lib/multipart').Multipart
+var Redirect = require('./lib/redirect').Redirect
+var Tunnel = require('./lib/tunnel').Tunnel
+var now = require('performance-now')
+var Buffer = require('safe-buffer').Buffer
+
+var safeStringify = helpers.safeStringify
+var isReadStream = helpers.isReadStream
+var toBase64 = helpers.toBase64
+var defer = helpers.defer
+var copy = helpers.copy
+var version = helpers.version
+var globalCookieJar = cookies.jar()
+
+var globalPool = {}
+
+function filterForNonReserved (reserved, options) {
+ // Filter out properties that are not reserved.
+ // Reserved values are passed in at call site.
+
+ var object = {}
+ for (var i in options) {
+ var notReserved = (reserved.indexOf(i) === -1)
+ if (notReserved) {
+ object[i] = options[i]
+ }
+ }
+ return object
+}
+
+function filterOutReservedFunctions (reserved, options) {
+ // Filter out properties that are functions and are reserved.
+ // Reserved values are passed in at call site.
+
+ var object = {}
+ for (var i in options) {
+ var isReserved = !(reserved.indexOf(i) === -1)
+ var isFunction = (typeof options[i] === 'function')
+ if (!(isReserved && isFunction)) {
+ object[i] = options[i]
+ }
+ }
+ return object
+}
+
+// Return a simpler request object to allow serialization
+function requestToJSON () {
+ var self = this
+ return {
+ uri: self.uri,
+ method: self.method,
+ headers: self.headers
+ }
+}
+
+// Return a simpler response object to allow serialization
+function responseToJSON () {
+ var self = this
+ return {
+ statusCode: self.statusCode,
+ body: self.body,
+ headers: self.headers,
+ request: requestToJSON.call(self.request)
+ }
+}
+
+function Request (options) {
+ // if given the method property in options, set property explicitMethod to true
+
+ // extend the Request instance with any non-reserved properties
+ // remove any reserved functions from the options object
+ // set Request instance to be readable and writable
+ // call init
+
+ var self = this
+
+ // start with HAR, then override with additional options
+ if (options.har) {
+ self._har = new Har(self)
+ options = self._har.options(options)
+ }
+
+ stream.Stream.call(self)
+ var reserved = Object.keys(Request.prototype)
+ var nonReserved = filterForNonReserved(reserved, options)
+
+ extend(self, nonReserved)
+ options = filterOutReservedFunctions(reserved, options)
+
+ self.readable = true
+ self.writable = true
+ if (options.method) {
+ self.explicitMethod = true
+ }
+ self._qs = new Querystring(self)
+ self._auth = new Auth(self)
+ self._oauth = new OAuth(self)
+ self._multipart = new Multipart(self)
+ self._redirect = new Redirect(self)
+ self._tunnel = new Tunnel(self)
+ self.init(options)
+}
+
+util.inherits(Request, stream.Stream)
+
+// Debugging
+Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG)
+function debug () {
+ if (Request.debug) {
+ console.error('REQUEST %s', util.format.apply(util, arguments))
+ }
+}
+Request.prototype.debug = debug
+
+Request.prototype.init = function (options) {
+ // init() contains all the code to setup the request object.
+ // the actual outgoing request is not started until start() is called
+ // this function is called from both the constructor and on redirect.
+ var self = this
+ if (!options) {
+ options = {}
+ }
+ self.headers = self.headers ? copy(self.headers) : {}
+
+ // Delete headers with value undefined since they break
+ // ClientRequest.OutgoingMessage.setHeader in node 0.12
+ for (var headerName in self.headers) {
+ if (typeof self.headers[headerName] === 'undefined') {
+ delete self.headers[headerName]
+ }
+ }
+
+ caseless.httpify(self, self.headers)
+
+ if (!self.method) {
+ self.method = options.method || 'GET'
+ }
+ if (!self.localAddress) {
+ self.localAddress = options.localAddress
+ }
+
+ self._qs.init(options)
+
+ debug(options)
+ if (!self.pool && self.pool !== false) {
+ self.pool = globalPool
+ }
+ self.dests = self.dests || []
+ self.__isRequestRequest = true
+
+ // Protect against double callback
+ if (!self._callback && self.callback) {
+ self._callback = self.callback
+ self.callback = function () {
+ if (self._callbackCalled) {
+ return // Print a warning maybe?
+ }
+ self._callbackCalled = true
+ self._callback.apply(self, arguments)
+ }
+ self.on('error', self.callback.bind())
+ self.on('complete', self.callback.bind(self, null))
+ }
+
+ // People use this property instead all the time, so support it
+ if (!self.uri && self.url) {
+ self.uri = self.url
+ delete self.url
+ }
+
+ // If there's a baseUrl, then use it as the base URL (i.e. uri must be
+ // specified as a relative path and is appended to baseUrl).
+ if (self.baseUrl) {
+ if (typeof self.baseUrl !== 'string') {
+ return self.emit('error', new Error('options.baseUrl must be a string'))
+ }
+
+ if (typeof self.uri !== 'string') {
+ return self.emit('error', new Error('options.uri must be a string when using options.baseUrl'))
+ }
+
+ if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) {
+ return self.emit('error', new Error('options.uri must be a path when using options.baseUrl'))
+ }
+
+ // Handle all cases to make sure that there's only one slash between
+ // baseUrl and uri.
+ var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1
+ var uriStartsWithSlash = self.uri.indexOf('/') === 0
+
+ if (baseUrlEndsWithSlash && uriStartsWithSlash) {
+ self.uri = self.baseUrl + self.uri.slice(1)
+ } else if (baseUrlEndsWithSlash || uriStartsWithSlash) {
+ self.uri = self.baseUrl + self.uri
+ } else if (self.uri === '') {
+ self.uri = self.baseUrl
+ } else {
+ self.uri = self.baseUrl + '/' + self.uri
+ }
+ delete self.baseUrl
+ }
+
+ // A URI is needed by this point, emit error if we haven't been able to get one
+ if (!self.uri) {
+ return self.emit('error', new Error('options.uri is a required argument'))
+ }
+
+ // If a string URI/URL was given, parse it into a URL object
+ if (typeof self.uri === 'string') {
+ self.uri = url.parse(self.uri)
+ }
+
+ // Some URL objects are not from a URL parsed string and need href added
+ if (!self.uri.href) {
+ self.uri.href = url.format(self.uri)
+ }
+
+ // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme
+ if (self.uri.protocol === 'unix:') {
+ return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`'))
+ }
+
+ // Support Unix Sockets
+ if (self.uri.host === 'unix') {
+ self.enableUnixSocket()
+ }
+
+ if (self.strictSSL === false) {
+ self.rejectUnauthorized = false
+ }
+
+ if (!self.uri.pathname) { self.uri.pathname = '/' }
+
+ if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) {
+ // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar
+ // Detect and reject it as soon as possible
+ var faultyUri = url.format(self.uri)
+ var message = 'Invalid URI "' + faultyUri + '"'
+ if (Object.keys(options).length === 0) {
+ // No option ? This can be the sign of a redirect
+ // As this is a case where the user cannot do anything (they didn't call request directly with this URL)
+ // they should be warned that it can be caused by a redirection (can save some hair)
+ message += '. This can be caused by a crappy redirection.'
+ }
+ // This error was fatal
+ self.abort()
+ return self.emit('error', new Error(message))
+ }
+
+ if (!self.hasOwnProperty('proxy')) {
+ self.proxy = getProxyFromURI(self.uri)
+ }
+
+ self.tunnel = self._tunnel.isEnabled()
+ if (self.proxy) {
+ self._tunnel.setup(options)
+ }
+
+ self._redirect.onRequest(options)
+
+ self.setHost = false
+ if (!self.hasHeader('host')) {
+ var hostHeaderName = self.originalHostHeaderName || 'host'
+ self.setHeader(hostHeaderName, self.uri.host)
+ // Drop :port suffix from Host header if known protocol.
+ if (self.uri.port) {
+ if ((self.uri.port === '80' && self.uri.protocol === 'http:') ||
+ (self.uri.port === '443' && self.uri.protocol === 'https:')) {
+ self.setHeader(hostHeaderName, self.uri.hostname)
+ }
+ }
+ self.setHost = true
+ }
+
+ self.jar(self._jar || options.jar)
+
+ if (!self.uri.port) {
+ if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 }
+ }
+
+ if (self.proxy && !self.tunnel) {
+ self.port = self.proxy.port
+ self.host = self.proxy.hostname
+ } else {
+ self.port = self.uri.port
+ self.host = self.uri.hostname
+ }
+
+ if (options.form) {
+ self.form(options.form)
+ }
+
+ if (options.formData) {
+ var formData = options.formData
+ var requestForm = self.form()
+ var appendFormValue = function (key, value) {
+ if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
+ requestForm.append(key, value.value, value.options)
+ } else {
+ requestForm.append(key, value)
+ }
+ }
+ for (var formKey in formData) {
+ if (formData.hasOwnProperty(formKey)) {
+ var formValue = formData[formKey]
+ if (formValue instanceof Array) {
+ for (var j = 0; j < formValue.length; j++) {
+ appendFormValue(formKey, formValue[j])
+ }
+ } else {
+ appendFormValue(formKey, formValue)
+ }
+ }
+ }
+ }
+
+ if (options.qs) {
+ self.qs(options.qs)
+ }
+
+ if (self.uri.path) {
+ self.path = self.uri.path
+ } else {
+ self.path = self.uri.pathname + (self.uri.search || '')
+ }
+
+ if (self.path.length === 0) {
+ self.path = '/'
+ }
+
+ // Auth must happen last in case signing is dependent on other headers
+ if (options.aws) {
+ self.aws(options.aws)
+ }
+
+ if (options.hawk) {
+ self.hawk(options.hawk)
+ }
+
+ if (options.httpSignature) {
+ self.httpSignature(options.httpSignature)
+ }
+
+ if (options.auth) {
+ if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) {
+ options.auth.user = options.auth.username
+ }
+ if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) {
+ options.auth.pass = options.auth.password
+ }
+
+ self.auth(
+ options.auth.user,
+ options.auth.pass,
+ options.auth.sendImmediately,
+ options.auth.bearer
+ )
+ }
+
+ if (self.gzip && !self.hasHeader('accept-encoding')) {
+ self.setHeader('accept-encoding', 'gzip, deflate')
+ }
+
+ if (self.uri.auth && !self.hasHeader('authorization')) {
+ var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) })
+ self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true)
+ }
+
+ if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) {
+ var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) })
+ var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':'))
+ self.setHeader('proxy-authorization', authHeader)
+ }
+
+ if (self.proxy && !self.tunnel) {
+ self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
+ }
+
+ if (options.json) {
+ self.json(options.json)
+ }
+ if (options.multipart) {
+ self.multipart(options.multipart)
+ }
+
+ if (options.time) {
+ self.timing = true
+
+ // NOTE: elapsedTime is deprecated in favor of .timings
+ self.elapsedTime = self.elapsedTime || 0
+ }
+
+ function setContentLength () {
+ if (isTypedArray(self.body)) {
+ self.body = Buffer.from(self.body)
+ }
+
+ if (!self.hasHeader('content-length')) {
+ var length
+ if (typeof self.body === 'string') {
+ length = Buffer.byteLength(self.body)
+ } else if (Array.isArray(self.body)) {
+ length = self.body.reduce(function (a, b) { return a + b.length }, 0)
+ } else {
+ length = self.body.length
+ }
+
+ if (length) {
+ self.setHeader('content-length', length)
+ } else {
+ self.emit('error', new Error('Argument error, options.body.'))
+ }
+ }
+ }
+ if (self.body && !isstream(self.body)) {
+ setContentLength()
+ }
+
+ if (options.oauth) {
+ self.oauth(options.oauth)
+ } else if (self._oauth.params && self.hasHeader('authorization')) {
+ self.oauth(self._oauth.params)
+ }
+
+ var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
+ var defaultModules = {'http:': http, 'https:': https}
+ var httpModules = self.httpModules || {}
+
+ self.httpModule = httpModules[protocol] || defaultModules[protocol]
+
+ if (!self.httpModule) {
+ return self.emit('error', new Error('Invalid protocol: ' + protocol))
+ }
+
+ if (options.ca) {
+ self.ca = options.ca
+ }
+
+ if (!self.agent) {
+ if (options.agentOptions) {
+ self.agentOptions = options.agentOptions
+ }
+
+ if (options.agentClass) {
+ self.agentClass = options.agentClass
+ } else if (options.forever) {
+ var v = version()
+ // use ForeverAgent in node 0.10- only
+ if (v.major === 0 && v.minor <= 10) {
+ self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
+ } else {
+ self.agentClass = self.httpModule.Agent
+ self.agentOptions = self.agentOptions || {}
+ self.agentOptions.keepAlive = true
+ }
+ } else {
+ self.agentClass = self.httpModule.Agent
+ }
+ }
+
+ if (self.pool === false) {
+ self.agent = false
+ } else {
+ self.agent = self.agent || self.getNewAgent()
+ }
+
+ self.on('pipe', function (src) {
+ if (self.ntick && self._started) {
+ self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.'))
+ }
+ self.src = src
+ if (isReadStream(src)) {
+ if (!self.hasHeader('content-type')) {
+ self.setHeader('content-type', mime.lookup(src.path))
+ }
+ } else {
+ if (src.headers) {
+ for (var i in src.headers) {
+ if (!self.hasHeader(i)) {
+ self.setHeader(i, src.headers[i])
+ }
+ }
+ }
+ if (self._json && !self.hasHeader('content-type')) {
+ self.setHeader('content-type', 'application/json')
+ }
+ if (src.method && !self.explicitMethod) {
+ self.method = src.method
+ }
+ }
+
+ // self.on('pipe', function () {
+ // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.')
+ // })
+ })
+
+ defer(function () {
+ if (self._aborted) {
+ return
+ }
+
+ var end = function () {
+ if (self._form) {
+ if (!self._auth.hasAuth) {
+ self._form.pipe(self)
+ } else if (self._auth.hasAuth && self._auth.sentAuth) {
+ self._form.pipe(self)
+ }
+ }
+ if (self._multipart && self._multipart.chunked) {
+ self._multipart.body.pipe(self)
+ }
+ if (self.body) {
+ if (isstream(self.body)) {
+ self.body.pipe(self)
+ } else {
+ setContentLength()
+ if (Array.isArray(self.body)) {
+ self.body.forEach(function (part) {
+ self.write(part)
+ })
+ } else {
+ self.write(self.body)
+ }
+ self.end()
+ }
+ } else if (self.requestBodyStream) {
+ console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.')
+ self.requestBodyStream.pipe(self)
+ } else if (!self.src) {
+ if (self._auth.hasAuth && !self._auth.sentAuth) {
+ self.end()
+ return
+ }
+ if (self.method !== 'GET' && typeof self.method !== 'undefined') {
+ self.setHeader('content-length', 0)
+ }
+ self.end()
+ }
+ }
+
+ if (self._form && !self.hasHeader('content-length')) {
+ // Before ending the request, we had to compute the length of the whole form, asyncly
+ self.setHeader(self._form.getHeaders(), true)
+ self._form.getLength(function (err, length) {
+ if (!err && !isNaN(length)) {
+ self.setHeader('content-length', length)
+ }
+ end()
+ })
+ } else {
+ end()
+ }
+
+ self.ntick = true
+ })
+}
+
+Request.prototype.getNewAgent = function () {
+ var self = this
+ var Agent = self.agentClass
+ var options = {}
+ if (self.agentOptions) {
+ for (var i in self.agentOptions) {
+ options[i] = self.agentOptions[i]
+ }
+ }
+ if (self.ca) {
+ options.ca = self.ca
+ }
+ if (self.ciphers) {
+ options.ciphers = self.ciphers
+ }
+ if (self.secureProtocol) {
+ options.secureProtocol = self.secureProtocol
+ }
+ if (self.secureOptions) {
+ options.secureOptions = self.secureOptions
+ }
+ if (typeof self.rejectUnauthorized !== 'undefined') {
+ options.rejectUnauthorized = self.rejectUnauthorized
+ }
+
+ if (self.cert && self.key) {
+ options.key = self.key
+ options.cert = self.cert
+ }
+
+ if (self.pfx) {
+ options.pfx = self.pfx
+ }
+
+ if (self.passphrase) {
+ options.passphrase = self.passphrase
+ }
+
+ var poolKey = ''
+
+ // different types of agents are in different pools
+ if (Agent !== self.httpModule.Agent) {
+ poolKey += Agent.name
+ }
+
+ // ca option is only relevant if proxy or destination are https
+ var proxy = self.proxy
+ if (typeof proxy === 'string') {
+ proxy = url.parse(proxy)
+ }
+ var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
+
+ if (isHttps) {
+ if (options.ca) {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.ca
+ }
+
+ if (typeof options.rejectUnauthorized !== 'undefined') {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.rejectUnauthorized
+ }
+
+ if (options.cert) {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
+ }
+
+ if (options.pfx) {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.pfx.toString('ascii')
+ }
+
+ if (options.ciphers) {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.ciphers
+ }
+
+ if (options.secureProtocol) {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.secureProtocol
+ }
+
+ if (options.secureOptions) {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.secureOptions
+ }
+ }
+
+ if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) {
+ // not doing anything special. Use the globalAgent
+ return self.httpModule.globalAgent
+ }
+
+ // we're using a stored agent. Make sure it's protocol-specific
+ poolKey = self.uri.protocol + poolKey
+
+ // generate a new agent for this setting if none yet exists
+ if (!self.pool[poolKey]) {
+ self.pool[poolKey] = new Agent(options)
+ // properly set maxSockets on new agents
+ if (self.pool.maxSockets) {
+ self.pool[poolKey].maxSockets = self.pool.maxSockets
+ }
+ }
+
+ return self.pool[poolKey]
+}
+
+Request.prototype.start = function () {
+ // start() is called once we are ready to send the outgoing HTTP request.
+ // this is usually called on the first write(), end() or on nextTick()
+ var self = this
+
+ if (self.timing) {
+ // All timings will be relative to this request's startTime. In order to do this,
+ // we need to capture the wall-clock start time (via Date), immediately followed
+ // by the high-resolution timer (via now()). While these two won't be set
+ // at the _exact_ same time, they should be close enough to be able to calculate
+ // high-resolution, monotonically non-decreasing timestamps relative to startTime.
+ var startTime = new Date().getTime()
+ var startTimeNow = now()
+ }
+
+ if (self._aborted) {
+ return
+ }
+
+ self._started = true
+ self.method = self.method || 'GET'
+ self.href = self.uri.href
+
+ if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) {
+ self.setHeader('content-length', self.src.stat.size)
+ }
+ if (self._aws) {
+ self.aws(self._aws, true)
+ }
+
+ // We have a method named auth, which is completely different from the http.request
+ // auth option. If we don't remove it, we're gonna have a bad time.
+ var reqOptions = copy(self)
+ delete reqOptions.auth
+
+ debug('make request', self.uri.href)
+
+ // node v6.8.0 now supports a `timeout` value in `http.request()`, but we
+ // should delete it for now since we handle timeouts manually for better
+ // consistency with node versions before v6.8.0
+ delete reqOptions.timeout
+
+ try {
+ self.req = self.httpModule.request(reqOptions)
+ } catch (err) {
+ self.emit('error', err)
+ return
+ }
+
+ if (self.timing) {
+ self.startTime = startTime
+ self.startTimeNow = startTimeNow
+
+ // Timing values will all be relative to startTime (by comparing to startTimeNow
+ // so we have an accurate clock)
+ self.timings = {}
+ }
+
+ var timeout
+ if (self.timeout && !self.timeoutTimer) {
+ if (self.timeout < 0) {
+ timeout = 0
+ } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) {
+ timeout = self.timeout
+ }
+ }
+
+ self.req.on('response', self.onRequestResponse.bind(self))
+ self.req.on('error', self.onRequestError.bind(self))
+ self.req.on('drain', function () {
+ self.emit('drain')
+ })
+
+ self.req.on('socket', function (socket) {
+ // `._connecting` was the old property which was made public in node v6.1.0
+ var isConnecting = socket._connecting || socket.connecting
+ if (self.timing) {
+ self.timings.socket = now() - self.startTimeNow
+
+ if (isConnecting) {
+ var onLookupTiming = function () {
+ self.timings.lookup = now() - self.startTimeNow
+ }
+
+ var onConnectTiming = function () {
+ self.timings.connect = now() - self.startTimeNow
+ }
+
+ socket.once('lookup', onLookupTiming)
+ socket.once('connect', onConnectTiming)
+
+ // clean up timing event listeners if needed on error
+ self.req.once('error', function () {
+ socket.removeListener('lookup', onLookupTiming)
+ socket.removeListener('connect', onConnectTiming)
+ })
+ }
+ }
+
+ var setReqTimeout = function () {
+ // This timeout sets the amount of time to wait *between* bytes sent
+ // from the server once connected.
+ //
+ // In particular, it's useful for erroring if the server fails to send
+ // data halfway through streaming a response.
+ self.req.setTimeout(timeout, function () {
+ if (self.req) {
+ self.abort()
+ var e = new Error('ESOCKETTIMEDOUT')
+ e.code = 'ESOCKETTIMEDOUT'
+ e.connect = false
+ self.emit('error', e)
+ }
+ })
+ }
+ if (timeout !== undefined) {
+ // Only start the connection timer if we're actually connecting a new
+ // socket, otherwise if we're already connected (because this is a
+ // keep-alive connection) do not bother. This is important since we won't
+ // get a 'connect' event for an already connected socket.
+ if (isConnecting) {
+ var onReqSockConnect = function () {
+ socket.removeListener('connect', onReqSockConnect)
+ self.clearTimeout()
+ setReqTimeout()
+ }
+
+ socket.on('connect', onReqSockConnect)
+
+ self.req.on('error', function (err) { // eslint-disable-line handle-callback-err
+ socket.removeListener('connect', onReqSockConnect)
+ })
+
+ // Set a timeout in memory - this block will throw if the server takes more
+ // than `timeout` to write the HTTP status and headers (corresponding to
+ // the on('response') event on the client). NB: this measures wall-clock
+ // time, not the time between bytes sent by the server.
+ self.timeoutTimer = setTimeout(function () {
+ socket.removeListener('connect', onReqSockConnect)
+ self.abort()
+ var e = new Error('ETIMEDOUT')
+ e.code = 'ETIMEDOUT'
+ e.connect = true
+ self.emit('error', e)
+ }, timeout)
+ } else {
+ // We're already connected
+ setReqTimeout()
+ }
+ }
+ self.emit('socket', socket)
+ })
+
+ self.emit('request', self.req)
+}
+
+Request.prototype.onRequestError = function (error) {
+ var self = this
+ if (self._aborted) {
+ return
+ }
+ if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' &&
+ self.agent.addRequestNoreuse) {
+ self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
+ self.start()
+ self.req.end()
+ return
+ }
+ self.clearTimeout()
+ self.emit('error', error)
+}
+
+Request.prototype.onRequestResponse = function (response) {
+ var self = this
+
+ if (self.timing) {
+ self.timings.response = now() - self.startTimeNow
+ }
+
+ debug('onRequestResponse', self.uri.href, response.statusCode, response.headers)
+ response.on('end', function () {
+ if (self.timing) {
+ self.timings.end = now() - self.startTimeNow
+ response.timingStart = self.startTime
+
+ // fill in the blanks for any periods that didn't trigger, such as
+ // no lookup or connect due to keep alive
+ if (!self.timings.socket) {
+ self.timings.socket = 0
+ }
+ if (!self.timings.lookup) {
+ self.timings.lookup = self.timings.socket
+ }
+ if (!self.timings.connect) {
+ self.timings.connect = self.timings.lookup
+ }
+ if (!self.timings.response) {
+ self.timings.response = self.timings.connect
+ }
+
+ debug('elapsed time', self.timings.end)
+
+ // elapsedTime includes all redirects
+ self.elapsedTime += Math.round(self.timings.end)
+
+ // NOTE: elapsedTime is deprecated in favor of .timings
+ response.elapsedTime = self.elapsedTime
+
+ // timings is just for the final fetch
+ response.timings = self.timings
+
+ // pre-calculate phase timings as well
+ response.timingPhases = {
+ wait: self.timings.socket,
+ dns: self.timings.lookup - self.timings.socket,
+ tcp: self.timings.connect - self.timings.lookup,
+ firstByte: self.timings.response - self.timings.connect,
+ download: self.timings.end - self.timings.response,
+ total: self.timings.end
+ }
+ }
+ debug('response end', self.uri.href, response.statusCode, response.headers)
+ })
+
+ if (self._aborted) {
+ debug('aborted', self.uri.href)
+ response.resume()
+ return
+ }
+
+ self.response = response
+ response.request = self
+ response.toJSON = responseToJSON
+
+ // XXX This is different on 0.10, because SSL is strict by default
+ if (self.httpModule === https &&
+ self.strictSSL && (!response.hasOwnProperty('socket') ||
+ !response.socket.authorized)) {
+ debug('strict ssl error', self.uri.href)
+ var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL'
+ self.emit('error', new Error('SSL Error: ' + sslErr))
+ return
+ }
+
+ // Save the original host before any redirect (if it changes, we need to
+ // remove any authorization headers). Also remember the case of the header
+ // name because lots of broken servers expect Host instead of host and we
+ // want the caller to be able to specify this.
+ self.originalHost = self.getHeader('host')
+ if (!self.originalHostHeaderName) {
+ self.originalHostHeaderName = self.hasHeader('host')
+ }
+ if (self.setHost) {
+ self.removeHeader('host')
+ }
+ self.clearTimeout()
+
+ var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar
+ var addCookie = function (cookie) {
+ // set the cookie if it's domain in the href's domain.
+ try {
+ targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true})
+ } catch (e) {
+ self.emit('error', e)
+ }
+ }
+
+ response.caseless = caseless(response.headers)
+
+ if (response.caseless.has('set-cookie') && (!self._disableCookies)) {
+ var headerName = response.caseless.has('set-cookie')
+ if (Array.isArray(response.headers[headerName])) {
+ response.headers[headerName].forEach(addCookie)
+ } else {
+ addCookie(response.headers[headerName])
+ }
+ }
+
+ if (self._redirect.onResponse(response)) {
+ return // Ignore the rest of the response
+ } else {
+ // Be a good stream and emit end when the response is finished.
+ // Hack to emit end on close because of a core bug that never fires end
+ response.on('close', function () {
+ if (!self._ended) {
+ self.response.emit('end')
+ }
+ })
+
+ response.once('end', function () {
+ self._ended = true
+ })
+
+ var noBody = function (code) {
+ return (
+ self.method === 'HEAD' ||
+ // Informational
+ (code >= 100 && code < 200) ||
+ // No Content
+ code === 204 ||
+ // Not Modified
+ code === 304
+ )
+ }
+
+ var responseContent
+ if (self.gzip && !noBody(response.statusCode)) {
+ var contentEncoding = response.headers['content-encoding'] || 'identity'
+ contentEncoding = contentEncoding.trim().toLowerCase()
+
+ // Be more lenient with decoding compressed responses, since (very rarely)
+ // servers send slightly invalid gzip responses that are still accepted
+ // by common browsers.
+ // Always using Z_SYNC_FLUSH is what cURL does.
+ var zlibOptions = {
+ flush: zlib.Z_SYNC_FLUSH,
+ finishFlush: zlib.Z_SYNC_FLUSH
+ }
+
+ if (contentEncoding === 'gzip') {
+ responseContent = zlib.createGunzip(zlibOptions)
+ response.pipe(responseContent)
+ } else if (contentEncoding === 'deflate') {
+ responseContent = zlib.createInflate(zlibOptions)
+ response.pipe(responseContent)
+ } else {
+ // Since previous versions didn't check for Content-Encoding header,
+ // ignore any invalid values to preserve backwards-compatibility
+ if (contentEncoding !== 'identity') {
+ debug('ignoring unrecognized Content-Encoding ' + contentEncoding)
+ }
+ responseContent = response
+ }
+ } else {
+ responseContent = response
+ }
+
+ if (self.encoding) {
+ if (self.dests.length !== 0) {
+ console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.')
+ } else {
+ responseContent.setEncoding(self.encoding)
+ }
+ }
+
+ if (self._paused) {
+ responseContent.pause()
+ }
+
+ self.responseContent = responseContent
+
+ self.emit('response', response)
+
+ self.dests.forEach(function (dest) {
+ self.pipeDest(dest)
+ })
+
+ responseContent.on('data', function (chunk) {
+ if (self.timing && !self.responseStarted) {
+ self.responseStartTime = (new Date()).getTime()
+
+ // NOTE: responseStartTime is deprecated in favor of .timings
+ response.responseStartTime = self.responseStartTime
+ }
+ self._destdata = true
+ self.emit('data', chunk)
+ })
+ responseContent.once('end', function (chunk) {
+ self.emit('end', chunk)
+ })
+ responseContent.on('error', function (error) {
+ self.emit('error', error)
+ })
+ responseContent.on('close', function () { self.emit('close') })
+
+ if (self.callback) {
+ self.readResponseBody(response)
+ } else { // if no callback
+ self.on('end', function () {
+ if (self._aborted) {
+ debug('aborted', self.uri.href)
+ return
+ }
+ self.emit('complete', response)
+ })
+ }
+ }
+ debug('finish init function', self.uri.href)
+}
+
+Request.prototype.readResponseBody = function (response) {
+ var self = this
+ debug("reading response's body")
+ var buffers = []
+ var bufferLength = 0
+ var strings = []
+
+ self.on('data', function (chunk) {
+ if (!Buffer.isBuffer(chunk)) {
+ strings.push(chunk)
+ } else if (chunk.length) {
+ bufferLength += chunk.length
+ buffers.push(chunk)
+ }
+ })
+ self.on('end', function () {
+ debug('end event', self.uri.href)
+ if (self._aborted) {
+ debug('aborted', self.uri.href)
+ // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request.
+ // This can lead to leaky behavior if the user retains a reference to the request object.
+ buffers = []
+ bufferLength = 0
+ return
+ }
+
+ if (bufferLength) {
+ debug('has body', self.uri.href, bufferLength)
+ response.body = Buffer.concat(buffers, bufferLength)
+ if (self.encoding !== null) {
+ response.body = response.body.toString(self.encoding)
+ }
+ // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request.
+ // This can lead to leaky behavior if the user retains a reference to the request object.
+ buffers = []
+ bufferLength = 0
+ } else if (strings.length) {
+ // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
+ // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
+ if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') {
+ strings[0] = strings[0].substring(1)
+ }
+ response.body = strings.join('')
+ }
+
+ if (self._json) {
+ try {
+ response.body = JSON.parse(response.body, self._jsonReviver)
+ } catch (e) {
+ debug('invalid JSON received', self.uri.href)
+ }
+ }
+ debug('emitting complete', self.uri.href)
+ if (typeof response.body === 'undefined' && !self._json) {
+ response.body = self.encoding === null ? Buffer.alloc(0) : ''
+ }
+ self.emit('complete', response, response.body)
+ })
+}
+
+Request.prototype.abort = function () {
+ var self = this
+ self._aborted = true
+
+ if (self.req) {
+ self.req.abort()
+ } else if (self.response) {
+ self.response.destroy()
+ }
+
+ self.clearTimeout()
+ self.emit('abort')
+}
+
+Request.prototype.pipeDest = function (dest) {
+ var self = this
+ var response = self.response
+ // Called after the response is received
+ if (dest.headers && !dest.headersSent) {
+ if (response.caseless.has('content-type')) {
+ var ctname = response.caseless.has('content-type')
+ if (dest.setHeader) {
+ dest.setHeader(ctname, response.headers[ctname])
+ } else {
+ dest.headers[ctname] = response.headers[ctname]
+ }
+ }
+
+ if (response.caseless.has('content-length')) {
+ var clname = response.caseless.has('content-length')
+ if (dest.setHeader) {
+ dest.setHeader(clname, response.headers[clname])
+ } else {
+ dest.headers[clname] = response.headers[clname]
+ }
+ }
+ }
+ if (dest.setHeader && !dest.headersSent) {
+ for (var i in response.headers) {
+ // If the response content is being decoded, the Content-Encoding header
+ // of the response doesn't represent the piped content, so don't pass it.
+ if (!self.gzip || i !== 'content-encoding') {
+ dest.setHeader(i, response.headers[i])
+ }
+ }
+ dest.statusCode = response.statusCode
+ }
+ if (self.pipefilter) {
+ self.pipefilter(response, dest)
+ }
+}
+
+Request.prototype.qs = function (q, clobber) {
+ var self = this
+ var base
+ if (!clobber && self.uri.query) {
+ base = self._qs.parse(self.uri.query)
+ } else {
+ base = {}
+ }
+
+ for (var i in q) {
+ base[i] = q[i]
+ }
+
+ var qs = self._qs.stringify(base)
+
+ if (qs === '') {
+ return self
+ }
+
+ self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs)
+ self.url = self.uri
+ self.path = self.uri.path
+
+ if (self.uri.host === 'unix') {
+ self.enableUnixSocket()
+ }
+
+ return self
+}
+Request.prototype.form = function (form) {
+ var self = this
+ if (form) {
+ if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
+ self.setHeader('content-type', 'application/x-www-form-urlencoded')
+ }
+ self.body = (typeof form === 'string')
+ ? self._qs.rfc3986(form.toString('utf8'))
+ : self._qs.stringify(form).toString('utf8')
+ return self
+ }
+ // create form-data object
+ self._form = new FormData()
+ self._form.on('error', function (err) {
+ err.message = 'form-data: ' + err.message
+ self.emit('error', err)
+ self.abort()
+ })
+ return self._form
+}
+Request.prototype.multipart = function (multipart) {
+ var self = this
+
+ self._multipart.onRequest(multipart)
+
+ if (!self._multipart.chunked) {
+ self.body = self._multipart.body
+ }
+
+ return self
+}
+Request.prototype.json = function (val) {
+ var self = this
+
+ if (!self.hasHeader('accept')) {
+ self.setHeader('accept', 'application/json')
+ }
+
+ if (typeof self.jsonReplacer === 'function') {
+ self._jsonReplacer = self.jsonReplacer
+ }
+
+ self._json = true
+ if (typeof val === 'boolean') {
+ if (self.body !== undefined) {
+ if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
+ self.body = safeStringify(self.body, self._jsonReplacer)
+ } else {
+ self.body = self._qs.rfc3986(self.body)
+ }
+ if (!self.hasHeader('content-type')) {
+ self.setHeader('content-type', 'application/json')
+ }
+ }
+ } else {
+ self.body = safeStringify(val, self._jsonReplacer)
+ if (!self.hasHeader('content-type')) {
+ self.setHeader('content-type', 'application/json')
+ }
+ }
+
+ if (typeof self.jsonReviver === 'function') {
+ self._jsonReviver = self.jsonReviver
+ }
+
+ return self
+}
+Request.prototype.getHeader = function (name, headers) {
+ var self = this
+ var result, re, match
+ if (!headers) {
+ headers = self.headers
+ }
+ Object.keys(headers).forEach(function (key) {
+ if (key.length !== name.length) {
+ return
+ }
+ re = new RegExp(name, 'i')
+ match = key.match(re)
+ if (match) {
+ result = headers[key]
+ }
+ })
+ return result
+}
+Request.prototype.enableUnixSocket = function () {
+ // Get the socket & request paths from the URL
+ var unixParts = this.uri.path.split(':')
+ var host = unixParts[0]
+ var path = unixParts[1]
+ // Apply unix properties to request
+ this.socketPath = host
+ this.uri.pathname = path
+ this.uri.path = path
+ this.uri.host = host
+ this.uri.hostname = host
+ this.uri.isUnix = true
+}
+
+Request.prototype.auth = function (user, pass, sendImmediately, bearer) {
+ var self = this
+
+ self._auth.onRequest(user, pass, sendImmediately, bearer)
+
+ return self
+}
+Request.prototype.aws = function (opts, now) {
+ var self = this
+
+ if (!now) {
+ self._aws = opts
+ return self
+ }
+
+ if (opts.sign_version === 4 || opts.sign_version === '4') {
+ // use aws4
+ var options = {
+ host: self.uri.host,
+ path: self.uri.path,
+ method: self.method,
+ headers: self.headers,
+ body: self.body
+ }
+ if (opts.service) {
+ options.service = opts.service
+ }
+ var signRes = aws4.sign(options, {
+ accessKeyId: opts.key,
+ secretAccessKey: opts.secret,
+ sessionToken: opts.session
+ })
+ self.setHeader('authorization', signRes.headers.Authorization)
+ self.setHeader('x-amz-date', signRes.headers['X-Amz-Date'])
+ if (signRes.headers['X-Amz-Security-Token']) {
+ self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token'])
+ }
+ } else {
+ // default: use aws-sign2
+ var date = new Date()
+ self.setHeader('date', date.toUTCString())
+ var auth = {
+ key: opts.key,
+ secret: opts.secret,
+ verb: self.method.toUpperCase(),
+ date: date,
+ contentType: self.getHeader('content-type') || '',
+ md5: self.getHeader('content-md5') || '',
+ amazonHeaders: aws2.canonicalizeHeaders(self.headers)
+ }
+ var path = self.uri.path
+ if (opts.bucket && path) {
+ auth.resource = '/' + opts.bucket + path
+ } else if (opts.bucket && !path) {
+ auth.resource = '/' + opts.bucket
+ } else if (!opts.bucket && path) {
+ auth.resource = path
+ } else if (!opts.bucket && !path) {
+ auth.resource = '/'
+ }
+ auth.resource = aws2.canonicalizeResource(auth.resource)
+ self.setHeader('authorization', aws2.authorization(auth))
+ }
+
+ return self
+}
+Request.prototype.httpSignature = function (opts) {
+ var self = this
+ httpSignature.signRequest({
+ getHeader: function (header) {
+ return self.getHeader(header, self.headers)
+ },
+ setHeader: function (header, value) {
+ self.setHeader(header, value)
+ },
+ method: self.method,
+ path: self.path
+ }, opts)
+ debug('httpSignature authorization', self.getHeader('authorization'))
+
+ return self
+}
+Request.prototype.hawk = function (opts) {
+ var self = this
+ self.setHeader('Authorization', hawk.header(self.uri, self.method, opts))
+}
+Request.prototype.oauth = function (_oauth) {
+ var self = this
+
+ self._oauth.onRequest(_oauth)
+
+ return self
+}
+
+Request.prototype.jar = function (jar) {
+ var self = this
+ var cookies
+
+ if (self._redirect.redirectsFollowed === 0) {
+ self.originalCookieHeader = self.getHeader('cookie')
+ }
+
+ if (!jar) {
+ // disable cookies
+ cookies = false
+ self._disableCookies = true
+ } else {
+ var targetCookieJar = jar.getCookieString ? jar : globalCookieJar
+ var urihref = self.uri.href
+ // fetch cookie in the Specified host
+ if (targetCookieJar) {
+ cookies = targetCookieJar.getCookieString(urihref)
+ }
+ }
+
+ // if need cookie and cookie is not empty
+ if (cookies && cookies.length) {
+ if (self.originalCookieHeader) {
+ // Don't overwrite existing Cookie header
+ self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies)
+ } else {
+ self.setHeader('cookie', cookies)
+ }
+ }
+ self._jar = jar
+ return self
+}
+
+// Stream API
+Request.prototype.pipe = function (dest, opts) {
+ var self = this
+
+ if (self.response) {
+ if (self._destdata) {
+ self.emit('error', new Error('You cannot pipe after data has been emitted from the response.'))
+ } else if (self._ended) {
+ self.emit('error', new Error('You cannot pipe after the response has been ended.'))
+ } else {
+ stream.Stream.prototype.pipe.call(self, dest, opts)
+ self.pipeDest(dest)
+ return dest
+ }
+ } else {
+ self.dests.push(dest)
+ stream.Stream.prototype.pipe.call(self, dest, opts)
+ return dest
+ }
+}
+Request.prototype.write = function () {
+ var self = this
+ if (self._aborted) { return }
+
+ if (!self._started) {
+ self.start()
+ }
+ if (self.req) {
+ return self.req.write.apply(self.req, arguments)
+ }
+}
+Request.prototype.end = function (chunk) {
+ var self = this
+ if (self._aborted) { return }
+
+ if (chunk) {
+ self.write(chunk)
+ }
+ if (!self._started) {
+ self.start()
+ }
+ if (self.req) {
+ self.req.end()
+ }
+}
+Request.prototype.pause = function () {
+ var self = this
+ if (!self.responseContent) {
+ self._paused = true
+ } else {
+ self.responseContent.pause.apply(self.responseContent, arguments)
+ }
+}
+Request.prototype.resume = function () {
+ var self = this
+ if (!self.responseContent) {
+ self._paused = false
+ } else {
+ self.responseContent.resume.apply(self.responseContent, arguments)
+ }
+}
+Request.prototype.destroy = function () {
+ var self = this
+ this.clearTimeout()
+ if (!self._ended) {
+ self.end()
+ } else if (self.response) {
+ self.response.destroy()
+ }
+}
+
+Request.prototype.clearTimeout = function () {
+ if (this.timeoutTimer) {
+ clearTimeout(this.timeoutTimer)
+ this.timeoutTimer = null
+ }
+}
+
+Request.defaultProxyHeaderWhiteList =
+ Tunnel.defaultProxyHeaderWhiteList.slice()
+
+Request.defaultProxyHeaderExclusiveList =
+ Tunnel.defaultProxyHeaderExclusiveList.slice()
+
+// Exports
+
+Request.prototype.toJSON = requestToJSON
+module.exports = Request
diff --git a/node_modules/resolve-alpn/LICENSE b/node_modules/resolve-alpn/LICENSE
new file mode 100644
index 0000000..f4fe9c4
--- /dev/null
+++ b/node_modules/resolve-alpn/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2018 Szymon Marczak
+
+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/resolve-alpn/README.md b/node_modules/resolve-alpn/README.md
new file mode 100644
index 0000000..a49950c
--- /dev/null
+++ b/node_modules/resolve-alpn/README.md
@@ -0,0 +1,60 @@
+# `resolve-alpn`
+
+[![Node CI](https://github.com/szmarczak/resolve-alpn/workflows/Node%20CI/badge.svg)](https://github.com/szmarczak/resolve-alpn/actions)
+[![codecov](https://codecov.io/gh/szmarczak/resolve-alpn/branch/master/graph/badge.svg)](https://codecov.io/gh/szmarczak/resolve-alpn)
+
+## API
+
+### resolveALPN(options, connect = tls.connect)
+
+Returns an object with an `alpnProtocol` property. The `socket` property may be also present.
+
+```js
+const result = await resolveALPN({
+ host: 'nghttp2.org',
+ port: 443,
+ ALPNProtocols: ['h2', 'http/1.1'],
+ servername: 'nghttp2.org'
+});
+
+console.log(result); // {alpnProtocol: 'h2'}
+```
+
+**Note:** While the `servername` option is not required in this case, many other servers do. It's best practice to set it anyway.
+
+**Note:** If the socket times out, the promise will resolve and `result.timeout` will be set to `true`.
+
+#### options
+
+Same as [TLS options](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback).
+
+##### options.resolveSocket
+
+By default, the socket gets destroyed and the promise resolves.<br>
+If you set this to true, it will return the socket in a `socket` property.
+
+```js
+const result = await resolveALPN({
+ host: 'nghttp2.org',
+ port: 443,
+ ALPNProtocols: ['h2', 'http/1.1'],
+ servername: 'nghttp2.org',
+ resolveSocket: true
+});
+
+console.log(result); // {alpnProtocol: 'h2', socket: tls.TLSSocket}
+
+// Remember to destroy the socket if you don't use it!
+result.socket.destroy();
+```
+
+#### connect
+
+Type: `Function<TLSSocket> | AsyncFunction<TLSSocket>`\
+Default: [`tls.connect`](https://nodejs.org/dist/latest-v16.x/docs/api/tls.html#tls_tls_connect_options_callback)
+
+**Note:** No matter which function is used (synchronous or asynchronous), it **must** accept a `callback` function as a second argument. The `callback` function gets executed when the socket has successfully connected.
+
+## License
+
+MIT
diff --git a/node_modules/resolve-alpn/index.js b/node_modules/resolve-alpn/index.js
new file mode 100644
index 0000000..2d6c043
--- /dev/null
+++ b/node_modules/resolve-alpn/index.js
@@ -0,0 +1,43 @@
+'use strict';
+const tls = require('tls');
+
+module.exports = (options = {}, connect = tls.connect) => new Promise((resolve, reject) => {
+ let timeout = false;
+
+ let socket;
+
+ const callback = async () => {
+ await socketPromise;
+
+ socket.off('timeout', onTimeout);
+ socket.off('error', reject);
+
+ if (options.resolveSocket) {
+ resolve({alpnProtocol: socket.alpnProtocol, socket, timeout});
+
+ if (timeout) {
+ await Promise.resolve();
+ socket.emit('timeout');
+ }
+ } else {
+ socket.destroy();
+ resolve({alpnProtocol: socket.alpnProtocol, timeout});
+ }
+ };
+
+ const onTimeout = async () => {
+ timeout = true;
+ callback();
+ };
+
+ const socketPromise = (async () => {
+ try {
+ socket = await connect(options, callback);
+
+ socket.on('error', reject);
+ socket.once('timeout', onTimeout);
+ } catch (error) {
+ reject(error);
+ }
+ })();
+});
diff --git a/node_modules/resolve-alpn/package.json b/node_modules/resolve-alpn/package.json
new file mode 100644
index 0000000..73a7756
--- /dev/null
+++ b/node_modules/resolve-alpn/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "resolve-alpn",
+ "version": "1.2.1",
+ "description": "Detects the ALPN protocol",
+ "main": "index.js",
+ "scripts": {
+ "test": "xo && nyc --reporter=lcovonly --reporter=text --reporter=html ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/szmarczak/resolve-alpn.git"
+ },
+ "keywords": [
+ "alpn",
+ "tls",
+ "socket",
+ "http2"
+ ],
+ "author": "Szymon Marczak",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/szmarczak/resolve-alpn/issues"
+ },
+ "homepage": "https://github.com/szmarczak/resolve-alpn#readme",
+ "devDependencies": {
+ "ava": "^3.15.0",
+ "nyc": "^15.1.0",
+ "pem": "1.14.3",
+ "xo": "^0.38.2"
+ }
+}
diff --git a/node_modules/resolve/.editorconfig b/node_modules/resolve/.editorconfig
new file mode 100644
index 0000000..b96fcfb
--- /dev/null
+++ b/node_modules/resolve/.editorconfig
@@ -0,0 +1,34 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+max_line_length = 200
+
+[*.js]
+block_comment_start = /*
+block_comment = *
+block_comment_end = */
+
+[*.yml]
+indent_size = 1
+
+[package.json]
+indent_style = tab
+
+[CHANGELOG.md]
+indent_style = space
+indent_size = 2
+
+[{*.json,Makefile}]
+max_line_length = off
+
+[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*]
+indent_style = off
+indent_size = off
+max_line_length = off
+insert_final_newline = off
diff --git a/node_modules/resolve/.eslintignore b/node_modules/resolve/.eslintignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/resolve/.eslintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc
new file mode 100644
index 0000000..a22863c
--- /dev/null
+++ b/node_modules/resolve/.eslintrc
@@ -0,0 +1,39 @@
+{
+ "extends": "@ljharb",
+ "root": true,
+ "rules": {
+ "array-bracket-newline": 0,
+ "array-element-newline": 0,
+ "indent": [2, 4],
+ "strict": 0,
+ "complexity": 0,
+ "consistent-return": 0,
+ "curly": 0,
+ "dot-notation": [2, { "allowKeywords": true }],
+ "func-name-matching": 0,
+ "func-style": 0,
+ "global-require": 0,
+ "id-length": [2, { "min": 1, "max": 30 }],
+ "max-lines-per-function": 0,
+ "max-nested-callbacks": 0,
+ "max-params": 0,
+ "max-statements-per-line": [2, { "max": 2 }],
+ "max-statements": 0,
+ "no-magic-numbers": 0,
+ "no-console": 0,
+ "no-shadow": 0,
+ "no-unused-vars": [2, { "vars": "all", "args": "none" }],
+ "no-use-before-define": 0,
+ "object-curly-newline": 0,
+ "operator-linebreak": [2, "before"],
+ "sort-keys": 0,
+ },
+ "overrides": [
+ {
+ "files": "test/resolver/nested_symlinks/mylib/*.js",
+ "rules": {
+ "no-throw-literal": 0,
+ },
+ },
+ ],
+}
diff --git a/node_modules/resolve/.github/workflows/node-4+.yml b/node_modules/resolve/.github/workflows/node-4+.yml
new file mode 100644
index 0000000..ba174e1
--- /dev/null
+++ b/node_modules/resolve/.github/workflows/node-4+.yml
@@ -0,0 +1,54 @@
+name: 'Tests: node.js'
+
+on: [pull_request, push]
+
+jobs:
+ matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ latest: ${{ steps.set-matrix.outputs.requireds }}
+ minors: ${{ steps.set-matrix.outputs.optionals }}
+ steps:
+ - uses: ljharb/actions/node/matrix@main
+ id: set-matrix
+ with:
+ preset: '>=4'
+
+ latest:
+ needs: [matrix]
+ name: 'latest minors'
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run tests-only'
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ minors:
+ needs: [matrix, latest]
+ name: 'non-latest minors'
+ continue-on-error: true
+ if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+
+ node:
+ name: 'node 4+'
+ needs: [latest, minors]
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo tests completed'
diff --git a/node_modules/resolve/.github/workflows/node-iojs.yml b/node_modules/resolve/.github/workflows/node-iojs.yml
new file mode 100644
index 0000000..a813bfd
--- /dev/null
+++ b/node_modules/resolve/.github/workflows/node-iojs.yml
@@ -0,0 +1,55 @@
+name: 'Tests: node.js (io.js)'
+
+on: [pull_request, push]
+
+jobs:
+ matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ latest: ${{ steps.set-matrix.outputs.requireds }}
+ minors: ${{ steps.set-matrix.outputs.optionals }}
+ steps:
+ - uses: ljharb/actions/node/matrix@main
+ id: set-matrix
+ with:
+ preset: 'iojs'
+
+ latest:
+ needs: [matrix]
+ name: 'latest minors'
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run tests-only'
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ minors:
+ needs: [matrix, latest]
+ name: 'non-latest minors'
+ continue-on-error: true
+ if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run tests-only'
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+
+ node:
+ name: 'io.js'
+ needs: [latest, minors]
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo tests completed'
diff --git a/node_modules/resolve/.github/workflows/node-pretest.yml b/node_modules/resolve/.github/workflows/node-pretest.yml
new file mode 100644
index 0000000..9ed7661
--- /dev/null
+++ b/node_modules/resolve/.github/workflows/node-pretest.yml
@@ -0,0 +1,27 @@
+name: 'Tests: pretest/posttest'
+
+on: [pull_request, push]
+
+jobs:
+ pretest:
+ runs-on: ubuntu-latest
+
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run pretest'
+ with:
+ node-version: 'lts/*'
+ command: 'pretest'
+
+ posttest:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ name: 'npm install && npm run posttest'
+ with:
+ node-version: 'lts/*'
+ command: 'posttest'
diff --git a/node_modules/resolve/.github/workflows/node-zero.yml b/node_modules/resolve/.github/workflows/node-zero.yml
new file mode 100644
index 0000000..4b4f7f0
--- /dev/null
+++ b/node_modules/resolve/.github/workflows/node-zero.yml
@@ -0,0 +1,55 @@
+name: 'Tests: node.js (0.x)'
+
+on: [pull_request, push]
+
+jobs:
+ matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ stable: ${{ steps.set-matrix.outputs.requireds }}
+ unstable: ${{ steps.set-matrix.outputs.optionals }}
+ steps:
+ - uses: ljharb/actions/node/matrix@main
+ id: set-matrix
+ with:
+ preset: '0.x'
+
+ stable:
+ needs: [matrix]
+ name: 'stable minors'
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.stable) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
+ unstable:
+ needs: [matrix, stable]
+ name: 'unstable minors'
+ continue-on-error: true
+ if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix: ${{ fromJson(needs.matrix.outputs.unstable) }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/actions/node/run@main
+ with:
+ node-version: ${{ matrix.node-version }}
+ command: 'tests-only'
+ cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
+
+ node:
+ name: 'node 0.x'
+ needs: [stable, unstable]
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo tests completed'
diff --git a/node_modules/resolve/.github/workflows/rebase.yml b/node_modules/resolve/.github/workflows/rebase.yml
new file mode 100644
index 0000000..027aed0
--- /dev/null
+++ b/node_modules/resolve/.github/workflows/rebase.yml
@@ -0,0 +1,15 @@
+name: Automatic Rebase
+
+on: [pull_request_target]
+
+jobs:
+ _:
+ name: "Automatic Rebase"
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ljharb/rebase@master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/node_modules/resolve/.github/workflows/require-allow-edits.yml b/node_modules/resolve/.github/workflows/require-allow-edits.yml
new file mode 100644
index 0000000..aac42d3
--- /dev/null
+++ b/node_modules/resolve/.github/workflows/require-allow-edits.yml
@@ -0,0 +1,14 @@
+name: Require “Allow Edits”
+
+on: [pull_request_target]
+
+jobs:
+ _:
+ name: "Require “Allow Edits”"
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: ljharb/require-allow-edits@main
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/node_modules/resolve/LICENSE b/node_modules/resolve/LICENSE
new file mode 100644
index 0000000..ff4fce2
--- /dev/null
+++ b/node_modules/resolve/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2012 James Halliday
+
+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/resolve/appveyor.yml b/node_modules/resolve/appveyor.yml
new file mode 100644
index 0000000..747fbdb
--- /dev/null
+++ b/node_modules/resolve/appveyor.yml
@@ -0,0 +1,74 @@
+version: 1.0.{build}
+skip_branch_with_pr: true
+build: off
+
+environment:
+ matrix:
+ #- nodejs_version: "15"
+ - nodejs_version: "14"
+ - nodejs_version: "13"
+ - nodejs_version: "12"
+ - nodejs_version: "11"
+ - nodejs_version: "10"
+ - nodejs_version: "9"
+ - nodejs_version: "8"
+ - nodejs_version: "7"
+ - nodejs_version: "6"
+ - nodejs_version: "5"
+ - nodejs_version: "4"
+ - nodejs_version: "3"
+ - nodejs_version: "2"
+ - nodejs_version: "1"
+ - nodejs_version: "0.12"
+ - nodejs_version: "0.10"
+ - nodejs_version: "0.8"
+ - nodejs_version: "0.6"
+matrix:
+ # fast_finish: true
+ allow_failures:
+ - nodejs_version: "5" # due to windows npm bug, registry-side
+ - nodejs_version: "0.8"
+ # platform: x86 # x64 has started failing on the registry side, around early November 2020
+ - nodejs_version: "0.6"
+
+platform:
+ - x86
+ - x64
+
+# Install scripts. (runs after repo cloning)
+install:
+ # Fix symlinks in working copy (see https://github.com/appveyor/ci/issues/650#issuecomment-186592582) / https://github.com/charleskorn/batect/commit/d08986802ec43086902958c4ee7e57ff3e71dbef
+ - git config core.symlinks true
+ - git reset --hard
+ # Get the latest stable version of Node.js or io.js
+ - ps: if ($env:nodejs_version -ne '0.6') { Install-Product node $env:nodejs_version $env:platform }
+ - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform
+ - IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3
+ - IF %nodejs_version% EQU 0.8 npm config set strict-ssl false && npm -g install npm@1.4.28 && npm install -g npm@4.5
+ - IF %nodejs_version% EQU 1 npm -g install npm@2.9
+ - IF %nodejs_version% EQU 2 npm -g install npm@4
+ - IF %nodejs_version% EQU 3 npm -g install npm@4
+ - IF %nodejs_version% EQU 4 npm -g install npm@5.3
+ - IF %nodejs_version% EQU 5 npm -g install npm@5.3
+ - IF %nodejs_version% EQU 6 npm -g install npm@6.9
+ - IF %nodejs_version% EQU 7 npm -g install npm@6
+ - IF %nodejs_version% EQU 8 npm -g install npm@6
+ - IF %nodejs_version% EQU 9 npm -g install npm@6.9
+ - IF %nodejs_version% EQU 10 npm -g install npm@7
+ - IF %nodejs_version% EQU 11 npm -g install npm@7
+ - IF %nodejs_version% EQU 12 npm -g install npm@7
+ - IF %nodejs_version% EQU 13 npm -g install npm@7
+ - IF %nodejs_version% EQU 14 npm -g install npm@7
+ - IF %nodejs_version% EQU 15 npm -g install npm@7
+ - set PATH=%APPDATA%\npm;%PATH%
+ #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm
+ # install modules
+ - npm install
+
+# Post-install test scripts.
+test_script:
+ # Output useful info for debugging.
+ - node --version
+ - npm --version
+ # run tests
+ - npm run tests-only
diff --git a/node_modules/resolve/example/async.js b/node_modules/resolve/example/async.js
new file mode 100644
index 0000000..20e65dc
--- /dev/null
+++ b/node_modules/resolve/example/async.js
@@ -0,0 +1,5 @@
+var resolve = require('../');
+resolve('tap', { basedir: __dirname }, function (err, res) {
+ if (err) console.error(err);
+ else console.log(res);
+});
diff --git a/node_modules/resolve/example/sync.js b/node_modules/resolve/example/sync.js
new file mode 100644
index 0000000..54b2cc1
--- /dev/null
+++ b/node_modules/resolve/example/sync.js
@@ -0,0 +1,3 @@
+var resolve = require('../');
+var res = resolve.sync('tap', { basedir: __dirname });
+console.log(res);
diff --git a/node_modules/resolve/index.js b/node_modules/resolve/index.js
new file mode 100644
index 0000000..125d814
--- /dev/null
+++ b/node_modules/resolve/index.js
@@ -0,0 +1,6 @@
+var async = require('./lib/async');
+async.core = require('./lib/core');
+async.isCore = require('./lib/is-core');
+async.sync = require('./lib/sync');
+
+module.exports = async;
diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js
new file mode 100644
index 0000000..2928507
--- /dev/null
+++ b/node_modules/resolve/lib/async.js
@@ -0,0 +1,299 @@
+var fs = require('fs');
+var path = require('path');
+var caller = require('./caller');
+var nodeModulesPaths = require('./node-modules-paths');
+var normalizeOptions = require('./normalize-options');
+var isCore = require('is-core-module');
+
+var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
+
+var defaultIsFile = function isFile(file, cb) {
+ fs.stat(file, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isFile() || stat.isFIFO());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+};
+
+var defaultIsDir = function isDirectory(dir, cb) {
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+};
+
+var defaultRealpath = function realpath(x, cb) {
+ realpathFS(x, function (realpathErr, realPath) {
+ if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);
+ else cb(null, realpathErr ? x : realPath);
+ });
+};
+
+var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) {
+ if (opts && opts.preserveSymlinks === false) {
+ realpath(x, cb);
+ } else {
+ cb(null, x);
+ }
+};
+
+var getPackageCandidates = function getPackageCandidates(x, start, opts) {
+ var dirs = nodeModulesPaths(start, opts, x);
+ for (var i = 0; i < dirs.length; i++) {
+ dirs[i] = path.join(dirs[i], x);
+ }
+ return dirs;
+};
+
+module.exports = function resolve(x, options, callback) {
+ var cb = callback;
+ var opts = options;
+ if (typeof options === 'function') {
+ cb = opts;
+ opts = {};
+ }
+ if (typeof x !== 'string') {
+ var err = new TypeError('Path must be a string.');
+ return process.nextTick(function () {
+ cb(err);
+ });
+ }
+
+ opts = normalizeOptions(x, opts);
+
+ var isFile = opts.isFile || defaultIsFile;
+ var isDirectory = opts.isDirectory || defaultIsDir;
+ var readFile = opts.readFile || fs.readFile;
+ var realpath = opts.realpath || defaultRealpath;
+ var packageIterator = opts.packageIterator;
+
+ var extensions = opts.extensions || ['.js'];
+ var includeCoreModules = opts.includeCoreModules !== false;
+ var basedir = opts.basedir || path.dirname(caller());
+ var parent = opts.filename || basedir;
+
+ opts.paths = opts.paths || [];
+
+ // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
+ var absoluteStart = path.resolve(basedir);
+
+ maybeRealpath(
+ realpath,
+ absoluteStart,
+ opts,
+ function (err, realStart) {
+ if (err) cb(err);
+ else init(realStart);
+ }
+ );
+
+ var res;
+ function init(basedir) {
+ if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
+ res = path.resolve(basedir, x);
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
+ if ((/\/$/).test(x) && res === basedir) {
+ loadAsDirectory(res, opts.package, onfile);
+ } else loadAsFile(res, opts.package, onfile);
+ } else if (includeCoreModules && isCore(x)) {
+ return cb(null, x);
+ } else loadNodeModules(x, basedir, function (err, n, pkg) {
+ if (err) cb(err);
+ else if (n) {
+ return maybeRealpath(realpath, n, opts, function (err, realN) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, realN, pkg);
+ }
+ });
+ } else {
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ moduleError.code = 'MODULE_NOT_FOUND';
+ cb(moduleError);
+ }
+ });
+ }
+
+ function onfile(err, m, pkg) {
+ if (err) cb(err);
+ else if (m) cb(null, m, pkg);
+ else loadAsDirectory(res, function (err, d, pkg) {
+ if (err) cb(err);
+ else if (d) {
+ maybeRealpath(realpath, d, opts, function (err, realD) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, realD, pkg);
+ }
+ });
+ } else {
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ moduleError.code = 'MODULE_NOT_FOUND';
+ cb(moduleError);
+ }
+ });
+ }
+
+ function loadAsFile(x, thePackage, callback) {
+ var loadAsFilePackage = thePackage;
+ var cb = callback;
+ if (typeof loadAsFilePackage === 'function') {
+ cb = loadAsFilePackage;
+ loadAsFilePackage = undefined;
+ }
+
+ var exts = [''].concat(extensions);
+ load(exts, x, loadAsFilePackage);
+
+ function load(exts, x, loadPackage) {
+ if (exts.length === 0) return cb(null, undefined, loadPackage);
+ var file = x + exts[0];
+
+ var pkg = loadPackage;
+ if (pkg) onpkg(null, pkg);
+ else loadpkg(path.dirname(file), onpkg);
+
+ function onpkg(err, pkg_, dir) {
+ pkg = pkg_;
+ if (err) return cb(err);
+ if (dir && pkg && opts.pathFilter) {
+ var rfile = path.relative(dir, file);
+ var rel = rfile.slice(0, rfile.length - exts[0].length);
+ var r = opts.pathFilter(pkg, x, rel);
+ if (r) return load(
+ [''].concat(extensions.slice()),
+ path.resolve(dir, r),
+ pkg
+ );
+ }
+ isFile(file, onex);
+ }
+ function onex(err, ex) {
+ if (err) return cb(err);
+ if (ex) return cb(null, file, pkg);
+ load(exts.slice(1), x, pkg);
+ }
+ }
+ }
+
+ function loadpkg(dir, cb) {
+ if (dir === '' || dir === '/') return cb(null);
+ if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
+ return cb(null);
+ }
+ if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
+
+ maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {
+ if (unwrapErr) return loadpkg(path.dirname(dir), cb);
+ var pkgfile = path.join(pkgdir, 'package.json');
+ isFile(pkgfile, function (err, ex) {
+ // on err, ex is false
+ if (!ex) return loadpkg(path.dirname(dir), cb);
+
+ readFile(pkgfile, function (err, body) {
+ if (err) cb(err);
+ try { var pkg = JSON.parse(body); } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ pkg = opts.packageFilter(pkg, pkgfile);
+ }
+ cb(null, pkg, dir);
+ });
+ });
+ });
+ }
+
+ function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
+ var cb = callback;
+ var fpkg = loadAsDirectoryPackage;
+ if (typeof fpkg === 'function') {
+ cb = fpkg;
+ fpkg = opts.package;
+ }
+
+ maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) {
+ if (unwrapErr) return cb(unwrapErr);
+ var pkgfile = path.join(pkgdir, 'package.json');
+ isFile(pkgfile, function (err, ex) {
+ if (err) return cb(err);
+ if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);
+
+ readFile(pkgfile, function (err, body) {
+ if (err) return cb(err);
+ try {
+ var pkg = JSON.parse(body);
+ } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ pkg = opts.packageFilter(pkg, pkgfile);
+ }
+
+ if (pkg && pkg.main) {
+ if (typeof pkg.main !== 'string') {
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
+ mainError.code = 'INVALID_PACKAGE_MAIN';
+ return cb(mainError);
+ }
+ if (pkg.main === '.' || pkg.main === './') {
+ pkg.main = 'index';
+ }
+ loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {
+ if (err) return cb(err);
+ if (m) return cb(null, m, pkg);
+ if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);
+
+ var dir = path.resolve(x, pkg.main);
+ loadAsDirectory(dir, pkg, function (err, n, pkg) {
+ if (err) return cb(err);
+ if (n) return cb(null, n, pkg);
+ loadAsFile(path.join(x, 'index'), pkg, cb);
+ });
+ });
+ return;
+ }
+
+ loadAsFile(path.join(x, '/index'), pkg, cb);
+ });
+ });
+ });
+ }
+
+ function processDirs(cb, dirs) {
+ if (dirs.length === 0) return cb(null, undefined);
+ var dir = dirs[0];
+
+ isDirectory(path.dirname(dir), isdir);
+
+ function isdir(err, isdir) {
+ if (err) return cb(err);
+ if (!isdir) return processDirs(cb, dirs.slice(1));
+ loadAsFile(dir, opts.package, onfile);
+ }
+
+ function onfile(err, m, pkg) {
+ if (err) return cb(err);
+ if (m) return cb(null, m, pkg);
+ loadAsDirectory(dir, opts.package, ondir);
+ }
+
+ function ondir(err, n, pkg) {
+ if (err) return cb(err);
+ if (n) return cb(null, n, pkg);
+ processDirs(cb, dirs.slice(1));
+ }
+ }
+ function loadNodeModules(x, start, cb) {
+ var thunk = function () { return getPackageCandidates(x, start, opts); };
+ processDirs(
+ cb,
+ packageIterator ? packageIterator(x, start, thunk, opts) : thunk()
+ );
+ }
+};
diff --git a/node_modules/resolve/lib/caller.js b/node_modules/resolve/lib/caller.js
new file mode 100644
index 0000000..b14a280
--- /dev/null
+++ b/node_modules/resolve/lib/caller.js
@@ -0,0 +1,8 @@
+module.exports = function () {
+ // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
+ var origPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = function (_, stack) { return stack; };
+ var stack = (new Error()).stack;
+ Error.prepareStackTrace = origPrepareStackTrace;
+ return stack[2].getFileName();
+};
diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js
new file mode 100644
index 0000000..c417d23
--- /dev/null
+++ b/node_modules/resolve/lib/core.js
@@ -0,0 +1,53 @@
+var current = (process.versions && process.versions.node && process.versions.node.split('.')) || [];
+
+function specifierIncluded(specifier) {
+ var parts = specifier.split(' ');
+ var op = parts.length > 1 ? parts[0] : '=';
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
+
+ for (var i = 0; i < 3; ++i) {
+ var cur = parseInt(current[i] || 0, 10);
+ var ver = parseInt(versionParts[i] || 0, 10);
+ if (cur === ver) {
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
+ }
+ if (op === '<') {
+ return cur < ver;
+ } else if (op === '>=') {
+ return cur >= ver;
+ } else {
+ return false;
+ }
+ }
+ return op === '>=';
+}
+
+function matchesRange(range) {
+ var specifiers = range.split(/ ?&& ?/);
+ if (specifiers.length === 0) { return false; }
+ for (var i = 0; i < specifiers.length; ++i) {
+ if (!specifierIncluded(specifiers[i])) { return false; }
+ }
+ return true;
+}
+
+function versionIncluded(specifierValue) {
+ if (typeof specifierValue === 'boolean') { return specifierValue; }
+ if (specifierValue && typeof specifierValue === 'object') {
+ for (var i = 0; i < specifierValue.length; ++i) {
+ if (matchesRange(specifierValue[i])) { return true; }
+ }
+ return false;
+ }
+ return matchesRange(specifierValue);
+}
+
+var data = require('./core.json');
+
+var core = {};
+for (var mod in data) { // eslint-disable-line no-restricted-syntax
+ if (Object.prototype.hasOwnProperty.call(data, mod)) {
+ core[mod] = versionIncluded(data[mod]);
+ }
+}
+module.exports = core;
diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json
new file mode 100644
index 0000000..226198f
--- /dev/null
+++ b/node_modules/resolve/lib/core.json
@@ -0,0 +1,80 @@
+{
+ "assert": true,
+ "assert/strict": ">= 15",
+ "async_hooks": ">= 8",
+ "buffer_ieee754": "< 0.9.7",
+ "buffer": true,
+ "child_process": true,
+ "cluster": true,
+ "console": true,
+ "constants": true,
+ "crypto": true,
+ "_debug_agent": ">= 1 && < 8",
+ "_debugger": "< 8",
+ "dgram": true,
+ "diagnostics_channel": ">= 15.1",
+ "dns": true,
+ "dns/promises": ">= 15",
+ "domain": ">= 0.7.12",
+ "events": true,
+ "freelist": "< 6",
+ "fs": true,
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
+ "_http_agent": ">= 0.11.1",
+ "_http_client": ">= 0.11.1",
+ "_http_common": ">= 0.11.1",
+ "_http_incoming": ">= 0.11.1",
+ "_http_outgoing": ">= 0.11.1",
+ "_http_server": ">= 0.11.1",
+ "http": true,
+ "http2": ">= 8.8",
+ "https": true,
+ "inspector": ">= 8.0.0",
+ "_linklist": "< 8",
+ "module": true,
+ "net": true,
+ "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
+ "os": true,
+ "path": true,
+ "perf_hooks": ">= 8.5",
+ "process": ">= 1",
+ "punycode": true,
+ "querystring": true,
+ "readline": true,
+ "repl": true,
+ "smalloc": ">= 0.11.5 && < 3",
+ "_stream_duplex": ">= 0.9.4",
+ "_stream_transform": ">= 0.9.4",
+ "_stream_wrap": ">= 1.4.1",
+ "_stream_passthrough": ">= 0.9.4",
+ "_stream_readable": ">= 0.9.4",
+ "_stream_writable": ">= 0.9.4",
+ "stream": true,
+ "stream/promises": ">= 15",
+ "string_decoder": true,
+ "sys": [">= 0.6 && < 0.7", ">= 0.8"],
+ "timers": true,
+ "timers/promises": ">= 15",
+ "_tls_common": ">= 0.11.13",
+ "_tls_legacy": ">= 0.11.3 && < 10",
+ "_tls_wrap": ">= 0.11.3",
+ "tls": true,
+ "trace_events": ">= 10",
+ "tty": true,
+ "url": true,
+ "util": true,
+ "v8/tools/arguments": ">= 10 && < 12",
+ "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8": ">= 1",
+ "vm": true,
+ "wasi": ">= 13.4 && < 13.5",
+ "worker_threads": ">= 11.7",
+ "zlib": true
+}
diff --git a/node_modules/resolve/lib/is-core.js b/node_modules/resolve/lib/is-core.js
new file mode 100644
index 0000000..537f5c7
--- /dev/null
+++ b/node_modules/resolve/lib/is-core.js
@@ -0,0 +1,5 @@
+var isCoreModule = require('is-core-module');
+
+module.exports = function isCore(x) {
+ return isCoreModule(x);
+};
diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js
new file mode 100644
index 0000000..2b43813
--- /dev/null
+++ b/node_modules/resolve/lib/node-modules-paths.js
@@ -0,0 +1,42 @@
+var path = require('path');
+var parse = path.parse || require('path-parse');
+
+var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
+ var prefix = '/';
+ if ((/^([A-Za-z]:)/).test(absoluteStart)) {
+ prefix = '';
+ } else if ((/^\\\\/).test(absoluteStart)) {
+ prefix = '\\\\';
+ }
+
+ var paths = [absoluteStart];
+ var parsed = parse(absoluteStart);
+ while (parsed.dir !== paths[paths.length - 1]) {
+ paths.push(parsed.dir);
+ parsed = parse(parsed.dir);
+ }
+
+ return paths.reduce(function (dirs, aPath) {
+ return dirs.concat(modules.map(function (moduleDir) {
+ return path.resolve(prefix, aPath, moduleDir);
+ }));
+ }, []);
+};
+
+module.exports = function nodeModulesPaths(start, opts, request) {
+ var modules = opts && opts.moduleDirectory
+ ? [].concat(opts.moduleDirectory)
+ : ['node_modules'];
+
+ if (opts && typeof opts.paths === 'function') {
+ return opts.paths(
+ request,
+ start,
+ function () { return getNodeModulesDirs(start, modules); },
+ opts
+ );
+ }
+
+ var dirs = getNodeModulesDirs(start, modules);
+ return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
+};
diff --git a/node_modules/resolve/lib/normalize-options.js b/node_modules/resolve/lib/normalize-options.js
new file mode 100644
index 0000000..4b56904
--- /dev/null
+++ b/node_modules/resolve/lib/normalize-options.js
@@ -0,0 +1,10 @@
+module.exports = function (x, opts) {
+ /**
+ * This file is purposefully a passthrough. It's expected that third-party
+ * environments will override it at runtime in order to inject special logic
+ * into `resolve` (by manipulating the options). One such example is the PnP
+ * code path in Yarn.
+ */
+
+ return opts || {};
+};
diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js
new file mode 100644
index 0000000..d5308c9
--- /dev/null
+++ b/node_modules/resolve/lib/sync.js
@@ -0,0 +1,192 @@
+var isCore = require('is-core-module');
+var fs = require('fs');
+var path = require('path');
+var caller = require('./caller');
+var nodeModulesPaths = require('./node-modules-paths');
+var normalizeOptions = require('./normalize-options');
+
+var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
+
+var defaultIsFile = function isFile(file) {
+ try {
+ var stat = fs.statSync(file);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isFile() || stat.isFIFO();
+};
+
+var defaultIsDir = function isDirectory(dir) {
+ try {
+ var stat = fs.statSync(dir);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isDirectory();
+};
+
+var defaultRealpathSync = function realpathSync(x) {
+ try {
+ return realpathFS(x);
+ } catch (realpathErr) {
+ if (realpathErr.code !== 'ENOENT') {
+ throw realpathErr;
+ }
+ }
+ return x;
+};
+
+var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) {
+ if (opts && opts.preserveSymlinks === false) {
+ return realpathSync(x);
+ }
+ return x;
+};
+
+var getPackageCandidates = function getPackageCandidates(x, start, opts) {
+ var dirs = nodeModulesPaths(start, opts, x);
+ for (var i = 0; i < dirs.length; i++) {
+ dirs[i] = path.join(dirs[i], x);
+ }
+ return dirs;
+};
+
+module.exports = function resolveSync(x, options) {
+ if (typeof x !== 'string') {
+ throw new TypeError('Path must be a string.');
+ }
+ var opts = normalizeOptions(x, options);
+
+ var isFile = opts.isFile || defaultIsFile;
+ var readFileSync = opts.readFileSync || fs.readFileSync;
+ var isDirectory = opts.isDirectory || defaultIsDir;
+ var realpathSync = opts.realpathSync || defaultRealpathSync;
+ var packageIterator = opts.packageIterator;
+
+ var extensions = opts.extensions || ['.js'];
+ var includeCoreModules = opts.includeCoreModules !== false;
+ var basedir = opts.basedir || path.dirname(caller());
+ var parent = opts.filename || basedir;
+
+ opts.paths = opts.paths || [];
+
+ // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
+ var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
+
+ if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
+ var res = path.resolve(absoluteStart, x);
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
+ var m = loadAsFileSync(res) || loadAsDirectorySync(res);
+ if (m) return maybeRealpathSync(realpathSync, m, opts);
+ } else if (includeCoreModules && isCore(x)) {
+ return x;
+ } else {
+ var n = loadNodeModulesSync(x, absoluteStart);
+ if (n) return maybeRealpathSync(realpathSync, n, opts);
+ }
+
+ var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ err.code = 'MODULE_NOT_FOUND';
+ throw err;
+
+ function loadAsFileSync(x) {
+ var pkg = loadpkg(path.dirname(x));
+
+ if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
+ var rfile = path.relative(pkg.dir, x);
+ var r = opts.pathFilter(pkg.pkg, x, rfile);
+ if (r) {
+ x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
+ }
+ }
+
+ if (isFile(x)) {
+ return x;
+ }
+
+ for (var i = 0; i < extensions.length; i++) {
+ var file = x + extensions[i];
+ if (isFile(file)) {
+ return file;
+ }
+ }
+ }
+
+ function loadpkg(dir) {
+ if (dir === '' || dir === '/') return;
+ if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
+ return;
+ }
+ if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
+
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');
+
+ if (!isFile(pkgfile)) {
+ return loadpkg(path.dirname(dir));
+ }
+
+ var body = readFileSync(pkgfile);
+
+ try {
+ var pkg = JSON.parse(body);
+ } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ // v2 will pass pkgfile
+ pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment
+ }
+
+ return { pkg: pkg, dir: dir };
+ }
+
+ function loadAsDirectorySync(x) {
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');
+ if (isFile(pkgfile)) {
+ try {
+ var body = readFileSync(pkgfile, 'UTF8');
+ var pkg = JSON.parse(body);
+ } catch (e) {}
+
+ if (pkg && opts.packageFilter) {
+ // v2 will pass pkgfile
+ pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment
+ }
+
+ if (pkg && pkg.main) {
+ if (typeof pkg.main !== 'string') {
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
+ mainError.code = 'INVALID_PACKAGE_MAIN';
+ throw mainError;
+ }
+ if (pkg.main === '.' || pkg.main === './') {
+ pkg.main = 'index';
+ }
+ try {
+ var m = loadAsFileSync(path.resolve(x, pkg.main));
+ if (m) return m;
+ var n = loadAsDirectorySync(path.resolve(x, pkg.main));
+ if (n) return n;
+ } catch (e) {}
+ }
+ }
+
+ return loadAsFileSync(path.join(x, '/index'));
+ }
+
+ function loadNodeModulesSync(x, start) {
+ var thunk = function () { return getPackageCandidates(x, start, opts); };
+ var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
+
+ for (var i = 0; i < dirs.length; i++) {
+ var dir = dirs[i];
+ if (isDirectory(path.dirname(dir))) {
+ var m = loadAsFileSync(dir);
+ if (m) return m;
+ var n = loadAsDirectorySync(dir);
+ if (n) return n;
+ }
+ }
+ }
+};
diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json
new file mode 100644
index 0000000..dfcfc49
--- /dev/null
+++ b/node_modules/resolve/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "resolve",
+ "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
+ "version": "1.19.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/browserify/resolve.git"
+ },
+ "main": "index.js",
+ "keywords": [
+ "resolve",
+ "require",
+ "node",
+ "module"
+ ],
+ "scripts": {
+ "prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/",
+ "prelint": "eclint check '**/*'",
+ "lint": "eslint --ext=js,mjs .",
+ "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async",
+ "tests-only": "tape test/*.js",
+ "pretest": "npm run lint",
+ "test": "npm run --silent tests-only",
+ "posttest": "npm run test:multirepo && aud --production",
+ "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^17.2.0",
+ "array.prototype.map": "^1.0.2",
+ "aud": "^1.1.3",
+ "eclint": "^2.8.1",
+ "eslint": "^7.13.0",
+ "object-keys": "^1.1.1",
+ "safe-publish-latest": "^1.1.4",
+ "tap": "0.4.13",
+ "tape": "^5.0.1"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "dependencies": {
+ "is-core-module": "^2.1.0",
+ "path-parse": "^1.0.6"
+ }
+}
diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown
new file mode 100644
index 0000000..f742c38
--- /dev/null
+++ b/node_modules/resolve/readme.markdown
@@ -0,0 +1,250 @@
+# resolve
+
+implements the [node `require.resolve()`
+algorithm](https://nodejs.org/api/modules.html#modules_all_together)
+such that you can `require.resolve()` on behalf of a file asynchronously and
+synchronously
+
+[![build status](https://secure.travis-ci.org/browserify/resolve.png)](http://travis-ci.org/browserify/resolve)
+
+# example
+
+asynchronously resolve:
+
+```js
+var resolve = require('resolve');
+resolve('tap', { basedir: __dirname }, function (err, res) {
+ if (err) console.error(err);
+ else console.log(res);
+});
+```
+
+```
+$ node example/async.js
+/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
+```
+
+synchronously resolve:
+
+```js
+var resolve = require('resolve');
+var res = resolve.sync('tap', { basedir: __dirname });
+console.log(res);
+```
+
+```
+$ node example/sync.js
+/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
+```
+
+# methods
+
+```js
+var resolve = require('resolve');
+```
+
+For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values:
+
+- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module
+- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory
+- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string)
+
+## resolve(id, opts={}, cb)
+
+Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`.
+
+options are:
+
+* opts.basedir - directory to begin resolving from
+
+* opts.package - `package.json` data applicable to the module being loaded
+
+* opts.extensions - array of file extensions to search in order
+
+* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search
+
+* opts.readFile - how to read files asynchronously
+
+* opts.isFile - function to asynchronously test whether a file exists
+
+* opts.isDirectory - function to asynchronously test whether a directory exists
+
+* opts.realpath - function to asynchronously resolve a potential symlink to its real path
+
+* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field
+ * pkg - package data
+ * pkgfile - path to package.json
+ * dir - directory for package.json
+
+* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
+ * pkg - package data
+ * path - the path being resolved
+ * relativePath - the path relative from the package.json location
+ * returns - a relative path that will be joined from the package.json location
+
+* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
+
+ For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
+
+* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
+This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
+**Note:** this property is currently `true` by default but it will be changed to
+`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
+
+default `opts` values:
+
+```js
+{
+ paths: [],
+ basedir: __dirname,
+ extensions: ['.js'],
+ includeCoreModules: true,
+ readFile: fs.readFile,
+ isFile: function isFile(file, cb) {
+ fs.stat(file, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isFile() || stat.isFIFO());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ },
+ isDirectory: function isDirectory(dir, cb) {
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ },
+ realpath: function realpath(file, cb) {
+ var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
+ realpath(file, function (realPathErr, realPath) {
+ if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);
+ else cb(null, realPathErr ? file : realPath);
+ });
+ },
+ moduleDirectory: 'node_modules',
+ preserveSymlinks: true
+}
+```
+
+## resolve.sync(id, opts)
+
+Synchronously resolve the module path string `id`, returning the result and
+throwing an error when `id` can't be resolved.
+
+options are:
+
+* opts.basedir - directory to begin resolving from
+
+* opts.extensions - array of file extensions to search in order
+
+* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search
+
+* opts.readFile - how to read files synchronously
+
+* opts.isFile - function to synchronously test whether a file exists
+
+* opts.isDirectory - function to synchronously test whether a directory exists
+
+* opts.realpathSync - function to synchronously resolve a potential symlink to its real path
+
+* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field
+ * pkg - package data
+ * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2)
+
+* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
+ * pkg - package data
+ * path - the path being resolved
+ * relativePath - the path relative from the package.json location
+ * returns - a relative path that will be joined from the package.json location
+
+* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
+
+ For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
+
+* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
+This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
+**Note:** this property is currently `true` by default but it will be changed to
+`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
+
+default `opts` values:
+
+```js
+{
+ paths: [],
+ basedir: __dirname,
+ extensions: ['.js'],
+ includeCoreModules: true,
+ readFileSync: fs.readFileSync,
+ isFile: function isFile(file) {
+ try {
+ var stat = fs.statSync(file);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isFile() || stat.isFIFO();
+ },
+ isDirectory: function isDirectory(dir) {
+ try {
+ var stat = fs.statSync(dir);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isDirectory();
+ },
+ realpathSync: function realpathSync(file) {
+ try {
+ var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
+ return realpath(file);
+ } catch (realPathErr) {
+ if (realPathErr.code !== 'ENOENT') {
+ throw realPathErr;
+ }
+ }
+ return file;
+ },
+ moduleDirectory: 'node_modules',
+ preserveSymlinks: true
+}
+```
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```sh
+npm install resolve
+```
+
+# license
+
+MIT
diff --git a/node_modules/resolve/test/.eslintrc b/node_modules/resolve/test/.eslintrc
new file mode 100644
index 0000000..ddd262d
--- /dev/null
+++ b/node_modules/resolve/test/.eslintrc
@@ -0,0 +1,5 @@
+{
+ "rules": {
+ "max-lines": 0
+ }
+}
diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js
new file mode 100644
index 0000000..7a3ccb1
--- /dev/null
+++ b/node_modules/resolve/test/core.js
@@ -0,0 +1,81 @@
+var test = require('tape');
+var keys = require('object-keys');
+var resolve = require('../');
+
+test('core modules', function (t) {
+ t.test('isCore()', function (st) {
+ st.ok(resolve.isCore('fs'));
+ st.ok(resolve.isCore('net'));
+ st.ok(resolve.isCore('http'));
+
+ st.ok(!resolve.isCore('seq'));
+ st.ok(!resolve.isCore('../'));
+
+ st.ok(!resolve.isCore('toString'));
+
+ st.end();
+ });
+
+ t.test('core list', function (st) {
+ var cores = keys(resolve.core);
+ st.plan(cores.length);
+
+ for (var i = 0; i < cores.length; ++i) {
+ var mod = cores[i];
+ var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func
+ console.log(mod, resolve.core, resolve.core[mod]);
+ if (resolve.core[mod]) {
+ st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw');
+ } else {
+ st.throws(requireFunc, mod + ' not supported; requiring throws');
+ }
+ }
+
+ st.end();
+ });
+
+ t.test('core via repl module', { skip: !resolve.core.repl }, function (st) {
+ var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle
+ if (!libs) {
+ st.skip('module.builtinModules does not exist');
+ return st.end();
+ }
+ for (var i = 0; i < libs.length; ++i) {
+ var mod = libs[i];
+ st.ok(resolve.core[mod], mod + ' is a core module');
+ st.doesNotThrow(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ 'requiring ' + mod + ' does not throw'
+ );
+ }
+ st.end();
+ });
+
+ t.test('core via builtinModules list', { skip: !resolve.core.module }, function (st) {
+ var libs = require('module').builtinModules;
+ if (!libs) {
+ st.skip('module.builtinModules does not exist');
+ return st.end();
+ }
+ var blacklist = [
+ '_debug_agent',
+ 'v8/tools/tickprocessor-driver',
+ 'v8/tools/SourceMap',
+ 'v8/tools/tickprocessor',
+ 'v8/tools/profile'
+ ];
+ for (var i = 0; i < libs.length; ++i) {
+ var mod = libs[i];
+ if (blacklist.indexOf(mod) === -1) {
+ st.ok(resolve.core[mod], mod + ' is a core module');
+ st.doesNotThrow(
+ function () { require(mod); }, // eslint-disable-line no-loop-func
+ 'requiring ' + mod + ' does not throw'
+ );
+ }
+ }
+ st.end();
+ });
+
+ t.end();
+});
diff --git a/node_modules/resolve/test/dotdot.js b/node_modules/resolve/test/dotdot.js
new file mode 100644
index 0000000..3080665
--- /dev/null
+++ b/node_modules/resolve/test/dotdot.js
@@ -0,0 +1,29 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('dotdot', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, '/dotdot/abc');
+
+ resolve('..', { basedir: dir }, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(__dirname, 'dotdot/index.js'));
+ });
+
+ resolve('.', { basedir: dir }, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ });
+});
+
+test('dotdot sync', function (t) {
+ t.plan(2);
+ var dir = path.join(__dirname, '/dotdot/abc');
+
+ var a = resolve.sync('..', { basedir: dir });
+ t.equal(a, path.join(__dirname, 'dotdot/index.js'));
+
+ var b = resolve.sync('.', { basedir: dir });
+ t.equal(b, path.join(dir, 'index.js'));
+});
diff --git a/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/resolve/test/dotdot/abc/index.js
new file mode 100644
index 0000000..67f2534
--- /dev/null
+++ b/node_modules/resolve/test/dotdot/abc/index.js
@@ -0,0 +1,2 @@
+var x = require('..');
+console.log(x);
diff --git a/node_modules/resolve/test/dotdot/index.js b/node_modules/resolve/test/dotdot/index.js
new file mode 100644
index 0000000..643f9fc
--- /dev/null
+++ b/node_modules/resolve/test/dotdot/index.js
@@ -0,0 +1 @@
+module.exports = 'whatever';
diff --git a/node_modules/resolve/test/faulty_basedir.js b/node_modules/resolve/test/faulty_basedir.js
new file mode 100644
index 0000000..5f2141a
--- /dev/null
+++ b/node_modules/resolve/test/faulty_basedir.js
@@ -0,0 +1,29 @@
+var test = require('tape');
+var path = require('path');
+var resolve = require('../');
+
+test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) {
+ t.plan(1);
+
+ var resolverDir = 'C:\\a\\b\\c\\d';
+
+ resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) {
+ t.equal(!!err, true);
+ });
+});
+
+test('non-existent basedir should not throw when preserveSymlinks is false', function (t) {
+ t.plan(2);
+
+ var opts = {
+ basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'),
+ preserveSymlinks: false
+ };
+
+ var module = './dotdot/abc';
+
+ resolve(module, opts, function (err, res) {
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ t.equal(res, undefined);
+ });
+});
diff --git a/node_modules/resolve/test/filter.js b/node_modules/resolve/test/filter.js
new file mode 100644
index 0000000..8f8cccd
--- /dev/null
+++ b/node_modules/resolve/test/filter.js
@@ -0,0 +1,34 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('filter', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, 'resolver');
+ var packageFilterArgs;
+ resolve('./baz', {
+ basedir: dir,
+ packageFilter: function (pkg, pkgfile) {
+ pkg.main = 'doom'; // eslint-disable-line no-param-reassign
+ packageFilterArgs = [pkg, pkgfile];
+ return pkg;
+ }
+ }, function (err, res, pkg) {
+ if (err) t.fail(err);
+
+ t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works');
+
+ var packageData = packageFilterArgs[0];
+ t.equal(pkg, packageData, 'first packageFilter argument is "pkg"');
+ t.equal(packageData.main, 'doom', 'package "main" was altered');
+
+ var packageFile = packageFilterArgs[1];
+ t.equal(
+ packageFile,
+ path.join(dir, 'baz/package.json'),
+ 'second packageFilter argument is "pkgfile"'
+ );
+
+ t.end();
+ });
+});
diff --git a/node_modules/resolve/test/filter_sync.js b/node_modules/resolve/test/filter_sync.js
new file mode 100644
index 0000000..8a43b98
--- /dev/null
+++ b/node_modules/resolve/test/filter_sync.js
@@ -0,0 +1,33 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('filter', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ var packageFilterArgs;
+ var res = resolve.sync('./baz', {
+ basedir: dir,
+ // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility
+ packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment
+ pkg.main = 'doom'; // eslint-disable-line no-param-reassign
+ packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef
+ return pkg;
+ }
+ });
+
+ t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works');
+
+ var packageData = packageFilterArgs[0];
+ t.equal(packageData.main, 'doom', 'package "main" was altered');
+
+ if (!'is 1.x') { // eslint-disable-line no-constant-condition
+ var packageFile = packageFilterArgs[1];
+ t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct');
+ }
+
+ var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition
+ // eslint-disable-next-line no-constant-condition
+ t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"');
+
+ t.end();
+});
diff --git a/node_modules/resolve/test/mock.js b/node_modules/resolve/test/mock.js
new file mode 100644
index 0000000..b9f17fe
--- /dev/null
+++ b/node_modules/resolve/test/mock.js
@@ -0,0 +1,239 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('mock', function (t) {
+ t.plan(8);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ resolve('../baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('mock from package', function (t) {
+ t.plan(8);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, file));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ 'package': { main: 'bar' },
+ readFile: function (file, cb) {
+ cb(null, files[file]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg && pkg.main, 'bar');
+ });
+
+ resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/baz.js'));
+ t.equal(pkg && pkg.main, 'bar');
+ });
+
+ resolve('baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ resolve('../baz', opts('/foo/bar'), function (err, res) {
+ t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('mock package', function (t) {
+ t.plan(2);
+
+ var files = {};
+ files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
+ main: './baz.js'
+ });
+
+ var dirs = {};
+ dirs[path.resolve('/foo')] = true;
+ dirs[path.resolve('/foo/node_modules')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('bar', opts('/foo'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
+ t.equal(pkg && pkg.main, './baz.js');
+ });
+});
+
+test('mock package from package', function (t) {
+ t.plan(2);
+
+ var files = {};
+ files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
+ main: './baz.js'
+ });
+
+ var dirs = {};
+ dirs[path.resolve('/foo')] = true;
+ dirs[path.resolve('/foo/node_modules')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ 'package': { main: 'bar' },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ cb(null, file);
+ }
+ };
+ }
+
+ resolve('bar', opts('/foo'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/node_modules/bar/baz.js'));
+ t.equal(pkg && pkg.main, './baz.js');
+ });
+});
+
+test('symlinked', function (t) {
+ t.plan(4);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+ dirs[path.resolve('/foo/bar/symlinked')] = true;
+
+ function opts(basedir) {
+ return {
+ preserveSymlinks: false,
+ basedir: path.resolve(basedir),
+ isFile: function (file, cb) {
+ cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file)));
+ },
+ isDirectory: function (dir, cb) {
+ cb(null, !!dirs[path.resolve(dir)]);
+ },
+ readFile: function (file, cb) {
+ cb(null, files[path.resolve(file)]);
+ },
+ realpath: function (file, cb) {
+ var resolved = path.resolve(file);
+
+ if (resolved.indexOf('symlinked') >= 0) {
+ cb(null, resolved);
+ return;
+ }
+
+ var ext = path.extname(resolved);
+
+ if (ext) {
+ var dir = path.dirname(resolved);
+ var base = path.basename(resolved);
+ cb(null, path.join(dir, 'symlinked', base));
+ } else {
+ cb(null, path.join(resolved, 'symlinked'));
+ }
+ }
+ };
+ }
+
+ resolve('./baz', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) {
+ if (err) return t.fail(err);
+ t.equal(res, path.resolve('/foo/bar/symlinked/baz.js'));
+ t.equal(pkg, undefined);
+ });
+});
diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js
new file mode 100644
index 0000000..fcf8114
--- /dev/null
+++ b/node_modules/resolve/test/mock_sync.js
@@ -0,0 +1,141 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('mock', function (t) {
+ t.plan(4);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file) {
+ return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
+ },
+ isDirectory: function (dir) {
+ return !!dirs[path.resolve(dir)];
+ },
+ readFileSync: function (file) {
+ return files[path.resolve(file)];
+ },
+ realpathSync: function (file) {
+ return file;
+ }
+ };
+ }
+
+ t.equal(
+ resolve.sync('./baz', opts('/foo/bar')),
+ path.resolve('/foo/bar/baz.js')
+ );
+
+ t.equal(
+ resolve.sync('./baz.js', opts('/foo/bar')),
+ path.resolve('/foo/bar/baz.js')
+ );
+
+ t.throws(function () {
+ resolve.sync('baz', opts('/foo/bar'));
+ });
+
+ t.throws(function () {
+ resolve.sync('../baz', opts('/foo/bar'));
+ });
+});
+
+test('mock package', function (t) {
+ t.plan(1);
+
+ var files = {};
+ files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
+ main: './baz.js'
+ });
+
+ var dirs = {};
+ dirs[path.resolve('/foo')] = true;
+ dirs[path.resolve('/foo/node_modules')] = true;
+
+ function opts(basedir) {
+ return {
+ basedir: path.resolve(basedir),
+ isFile: function (file) {
+ return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
+ },
+ isDirectory: function (dir) {
+ return !!dirs[path.resolve(dir)];
+ },
+ readFileSync: function (file) {
+ return files[path.resolve(file)];
+ },
+ realpathSync: function (file) {
+ return file;
+ }
+ };
+ }
+
+ t.equal(
+ resolve.sync('bar', opts('/foo')),
+ path.resolve('/foo/node_modules/bar/baz.js')
+ );
+});
+
+test('symlinked', function (t) {
+ t.plan(2);
+
+ var files = {};
+ files[path.resolve('/foo/bar/baz.js')] = 'beep';
+ files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
+
+ var dirs = {};
+ dirs[path.resolve('/foo/bar')] = true;
+ dirs[path.resolve('/foo/bar/symlinked')] = true;
+
+ function opts(basedir) {
+ return {
+ preserveSymlinks: false,
+ basedir: path.resolve(basedir),
+ isFile: function (file) {
+ return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
+ },
+ isDirectory: function (dir) {
+ return !!dirs[path.resolve(dir)];
+ },
+ readFileSync: function (file) {
+ return files[path.resolve(file)];
+ },
+ realpathSync: function (file) {
+ var resolved = path.resolve(file);
+
+ if (resolved.indexOf('symlinked') >= 0) {
+ return resolved;
+ }
+
+ var ext = path.extname(resolved);
+
+ if (ext) {
+ var dir = path.dirname(resolved);
+ var base = path.basename(resolved);
+ return path.join(dir, 'symlinked', base);
+ } else {
+ return path.join(resolved, 'symlinked');
+ }
+ }
+ };
+ }
+
+ t.equal(
+ resolve.sync('./baz', opts('/foo/bar')),
+ path.resolve('/foo/bar/symlinked/baz.js')
+ );
+
+ t.equal(
+ resolve.sync('./baz.js', opts('/foo/bar')),
+ path.resolve('/foo/bar/symlinked/baz.js')
+ );
+});
diff --git a/node_modules/resolve/test/module_dir.js b/node_modules/resolve/test/module_dir.js
new file mode 100644
index 0000000..b50e5bb
--- /dev/null
+++ b/node_modules/resolve/test/module_dir.js
@@ -0,0 +1,56 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('moduleDirectory strings', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, 'module_dir');
+ var xopts = {
+ basedir: dir,
+ moduleDirectory: 'xmodules'
+ };
+ resolve('aaa', xopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/xmodules/aaa/index.js'));
+ });
+
+ var yopts = {
+ basedir: dir,
+ moduleDirectory: 'ymodules'
+ };
+ resolve('aaa', yopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/ymodules/aaa/index.js'));
+ });
+});
+
+test('moduleDirectory array', function (t) {
+ t.plan(6);
+ var dir = path.join(__dirname, 'module_dir');
+ var aopts = {
+ basedir: dir,
+ moduleDirectory: ['xmodules', 'ymodules', 'zmodules']
+ };
+ resolve('aaa', aopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/xmodules/aaa/index.js'));
+ });
+
+ var bopts = {
+ basedir: dir,
+ moduleDirectory: ['zmodules', 'ymodules', 'xmodules']
+ };
+ resolve('aaa', bopts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/ymodules/aaa/index.js'));
+ });
+
+ var copts = {
+ basedir: dir,
+ moduleDirectory: ['xmodules', 'ymodules', 'zmodules']
+ };
+ resolve('bbb', copts, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, '/zmodules/bbb/main.js'));
+ });
+});
diff --git a/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js
new file mode 100644
index 0000000..dd7cf7b
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/xmodules/aaa/index.js
@@ -0,0 +1 @@
+module.exports = function (x) { return x * 100; };
diff --git a/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js
new file mode 100644
index 0000000..ef2d4d4
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/ymodules/aaa/index.js
@@ -0,0 +1 @@
+module.exports = function (x) { return x + 100; };
diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js
new file mode 100644
index 0000000..e8ba629
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/zmodules/bbb/main.js
@@ -0,0 +1 @@
+module.exports = function (n) { return n * 111; };
diff --git a/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json
new file mode 100644
index 0000000..c13b8cf
--- /dev/null
+++ b/node_modules/resolve/test/module_dir/zmodules/bbb/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "main.js"
+}
diff --git a/node_modules/resolve/test/node-modules-paths.js b/node_modules/resolve/test/node-modules-paths.js
new file mode 100644
index 0000000..675441d
--- /dev/null
+++ b/node_modules/resolve/test/node-modules-paths.js
@@ -0,0 +1,143 @@
+var test = require('tape');
+var path = require('path');
+var parse = path.parse || require('path-parse');
+var keys = require('object-keys');
+
+var nodeModulesPaths = require('../lib/node-modules-paths');
+
+var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) {
+ var moduleDirs = [].concat(moduleDirectories || 'node_modules');
+ if (paths) {
+ for (var k = 0; k < paths.length; ++k) {
+ moduleDirs.push(path.basename(paths[k]));
+ }
+ }
+
+ var foundModuleDirs = {};
+ var uniqueDirs = {};
+ var parsedDirs = {};
+ for (var i = 0; i < dirs.length; ++i) {
+ var parsed = parse(dirs[i]);
+ if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; }
+ foundModuleDirs[parsed.base] += 1;
+ parsedDirs[parsed.dir] = true;
+ uniqueDirs[dirs[i]] = true;
+ }
+ t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has');
+ var foundModuleDirNames = keys(foundModuleDirs);
+ t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found');
+ t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique');
+
+ var counts = {};
+ for (var j = 0; j < foundModuleDirNames.length; ++j) {
+ counts[foundModuleDirs[j]] = true;
+ }
+ t.equal(keys(counts).length, 1, 'all found module directories had the same count');
+};
+
+test('node-modules-paths', function (t) {
+ t.test('no options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start);
+
+ verifyDirs(t, start, dirs);
+
+ t.end();
+ });
+
+ t.test('empty options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start, {});
+
+ verifyDirs(t, start, dirs);
+
+ t.end();
+ });
+
+ t.test('with paths=array option', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var paths = ['a', 'b'];
+ var dirs = nodeModulesPaths(start, { paths: paths });
+
+ verifyDirs(t, start, dirs, null, paths);
+
+ t.end();
+ });
+
+ t.test('with paths=function option', function (t) {
+ var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
+ return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request));
+ };
+
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg');
+
+ verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]);
+
+ t.end();
+ });
+
+ t.test('with paths=function skipping node modules resolution', function (t) {
+ var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
+ return [];
+ };
+ var start = path.join(__dirname, 'resolver');
+ var dirs = nodeModulesPaths(start, { paths: paths });
+ t.deepEqual(dirs, [], 'no node_modules was computed');
+ t.end();
+ });
+
+ t.test('with moduleDirectory option', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var moduleDirectory = 'not node modules';
+ var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory });
+
+ verifyDirs(t, start, dirs, moduleDirectory);
+
+ t.end();
+ });
+
+ t.test('with 1 moduleDirectory and paths options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var paths = ['a', 'b'];
+ var moduleDirectory = 'not node modules';
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory });
+
+ verifyDirs(t, start, dirs, moduleDirectory, paths);
+
+ t.end();
+ });
+
+ t.test('with 1+ moduleDirectory and paths options', function (t) {
+ var start = path.join(__dirname, 'resolver');
+ var paths = ['a', 'b'];
+ var moduleDirectories = ['not node modules', 'other modules'];
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
+
+ verifyDirs(t, start, dirs, moduleDirectories, paths);
+
+ t.end();
+ });
+
+ t.test('combine paths correctly on Windows', function (t) {
+ var start = 'C:\\Users\\username\\myProject\\src';
+ var paths = [];
+ var moduleDirectories = ['node_modules', start];
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
+
+ t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
+
+ t.end();
+ });
+
+ t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) {
+ var start = '/Users/username/git/myProject/src';
+ var paths = [];
+ var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src'];
+ var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
+
+ t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
+
+ t.end();
+ });
+});
diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js
new file mode 100644
index 0000000..d06aa4e
--- /dev/null
+++ b/node_modules/resolve/test/node_path.js
@@ -0,0 +1,70 @@
+var fs = require('fs');
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('$NODE_PATH', function (t) {
+ t.plan(8);
+
+ var isDir = function (dir, cb) {
+ if (dir === '/node_path' || dir === 'node_path/x') {
+ return cb(null, true);
+ }
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ };
+
+ resolve('aaa', {
+ paths: [
+ path.join(__dirname, '/node_path/x'),
+ path.join(__dirname, '/node_path/y')
+ ],
+ basedir: __dirname,
+ isDirectory: isDir
+ }, function (err, res) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js'), 'aaa resolves');
+ });
+
+ resolve('bbb', {
+ paths: [
+ path.join(__dirname, '/node_path/x'),
+ path.join(__dirname, '/node_path/y')
+ ],
+ basedir: __dirname,
+ isDirectory: isDir
+ }, function (err, res) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js'), 'bbb resolves');
+ });
+
+ resolve('ccc', {
+ paths: [
+ path.join(__dirname, '/node_path/x'),
+ path.join(__dirname, '/node_path/y')
+ ],
+ basedir: __dirname,
+ isDirectory: isDir
+ }, function (err, res) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js'), 'ccc resolves');
+ });
+
+ // ensure that relative paths still resolve against the regular `node_modules` correctly
+ resolve('tap', {
+ paths: [
+ 'node_path'
+ ],
+ basedir: path.join(__dirname, 'node_path/x'),
+ isDirectory: isDir
+ }, function (err, res) {
+ var root = require('tap/package.json').main;
+ t.error(err);
+ t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves');
+ });
+});
diff --git a/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/resolve/test/node_path/x/aaa/index.js
new file mode 100644
index 0000000..ad70d0b
--- /dev/null
+++ b/node_modules/resolve/test/node_path/x/aaa/index.js
@@ -0,0 +1 @@
+module.exports = 'A';
diff --git a/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/resolve/test/node_path/x/ccc/index.js
new file mode 100644
index 0000000..a64132e
--- /dev/null
+++ b/node_modules/resolve/test/node_path/x/ccc/index.js
@@ -0,0 +1 @@
+module.exports = 'C';
diff --git a/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/resolve/test/node_path/y/bbb/index.js
new file mode 100644
index 0000000..4d0f32e
--- /dev/null
+++ b/node_modules/resolve/test/node_path/y/bbb/index.js
@@ -0,0 +1 @@
+module.exports = 'B';
diff --git a/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/resolve/test/node_path/y/ccc/index.js
new file mode 100644
index 0000000..793315e
--- /dev/null
+++ b/node_modules/resolve/test/node_path/y/ccc/index.js
@@ -0,0 +1 @@
+module.exports = 'CY';
diff --git a/node_modules/resolve/test/nonstring.js b/node_modules/resolve/test/nonstring.js
new file mode 100644
index 0000000..ef63c40
--- /dev/null
+++ b/node_modules/resolve/test/nonstring.js
@@ -0,0 +1,9 @@
+var test = require('tape');
+var resolve = require('../');
+
+test('nonstring', function (t) {
+ t.plan(1);
+ resolve(555, function (err, res, pkg) {
+ t.ok(err);
+ });
+});
diff --git a/node_modules/resolve/test/pathfilter.js b/node_modules/resolve/test/pathfilter.js
new file mode 100644
index 0000000..16519ae
--- /dev/null
+++ b/node_modules/resolve/test/pathfilter.js
@@ -0,0 +1,75 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+var resolverDir = path.join(__dirname, '/pathfilter/deep_ref');
+
+var pathFilterFactory = function (t) {
+ return function (pkg, x, remainder) {
+ t.equal(pkg.version, '1.2.3');
+ t.equal(x, path.join(resolverDir, 'node_modules/deep/ref'));
+ t.equal(remainder, 'ref');
+ return 'alt';
+ };
+};
+
+test('#62: deep module references and the pathFilter', function (t) {
+ t.test('deep/ref.js', function (st) {
+ st.plan(3);
+
+ resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) {
+ if (err) st.fail(err);
+
+ st.equal(pkg.version, '1.2.3');
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js'));
+ });
+
+ var res = resolve.sync('deep/ref', { basedir: resolverDir });
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js'));
+ });
+
+ t.test('deep/deeper/ref', function (st) {
+ st.plan(4);
+
+ resolve(
+ 'deep/deeper/ref',
+ { basedir: resolverDir },
+ function (err, res, pkg) {
+ if (err) t.fail(err);
+ st.notEqual(pkg, undefined);
+ st.equal(pkg.version, '1.2.3');
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js'));
+ }
+ );
+
+ var res = resolve.sync(
+ 'deep/deeper/ref',
+ { basedir: resolverDir }
+ );
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js'));
+ });
+
+ t.test('deep/ref alt', function (st) {
+ st.plan(8);
+
+ var pathFilter = pathFilterFactory(st);
+
+ var res = resolve.sync(
+ 'deep/ref',
+ { basedir: resolverDir, pathFilter: pathFilter }
+ );
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js'));
+
+ resolve(
+ 'deep/ref',
+ { basedir: resolverDir, pathFilter: pathFilter },
+ function (err, res, pkg) {
+ if (err) st.fail(err);
+ st.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js'));
+ st.end();
+ }
+ );
+ });
+
+ t.end();
+});
diff --git a/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/resolve/test/pathfilter/deep_ref/main.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/pathfilter/deep_ref/main.js
diff --git a/node_modules/resolve/test/precedence.js b/node_modules/resolve/test/precedence.js
new file mode 100644
index 0000000..2febb59
--- /dev/null
+++ b/node_modules/resolve/test/precedence.js
@@ -0,0 +1,23 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('precedence', function (t) {
+ t.plan(3);
+ var dir = path.join(__dirname, 'precedence/aaa');
+
+ resolve('./', { basedir: dir }, function (err, res, pkg) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ t.equal(pkg.name, 'resolve');
+ });
+});
+
+test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string
+ t.plan(1);
+ var dir = path.join(__dirname, 'precedence/bbb');
+
+ resolve('./', { basedir: dir }, function (err, res, pkg) {
+ t.ok(err);
+ });
+});
diff --git a/node_modules/resolve/test/precedence/aaa.js b/node_modules/resolve/test/precedence/aaa.js
new file mode 100644
index 0000000..b83a3e7
--- /dev/null
+++ b/node_modules/resolve/test/precedence/aaa.js
@@ -0,0 +1 @@
+module.exports = 'wtf';
diff --git a/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/resolve/test/precedence/aaa/index.js
new file mode 100644
index 0000000..e0f8f6a
--- /dev/null
+++ b/node_modules/resolve/test/precedence/aaa/index.js
@@ -0,0 +1 @@
+module.exports = 'okok';
diff --git a/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/resolve/test/precedence/aaa/main.js
new file mode 100644
index 0000000..93542a9
--- /dev/null
+++ b/node_modules/resolve/test/precedence/aaa/main.js
@@ -0,0 +1 @@
+console.log(require('./'));
diff --git a/node_modules/resolve/test/precedence/bbb.js b/node_modules/resolve/test/precedence/bbb.js
new file mode 100644
index 0000000..2298f47
--- /dev/null
+++ b/node_modules/resolve/test/precedence/bbb.js
@@ -0,0 +1 @@
+module.exports = '>_<';
diff --git a/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/resolve/test/precedence/bbb/main.js
new file mode 100644
index 0000000..716b81d
--- /dev/null
+++ b/node_modules/resolve/test/precedence/bbb/main.js
@@ -0,0 +1 @@
+console.log(require('./')); // should throw
diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js
new file mode 100644
index 0000000..aa36ee1
--- /dev/null
+++ b/node_modules/resolve/test/resolver.js
@@ -0,0 +1,450 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('async foo', function (t) {
+ t.plan(12);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./foo', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg && pkg.name, 'resolve');
+ });
+
+ resolve('./foo.js', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg && pkg.name, 'resolve');
+ });
+
+ resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg && pkg.main, 'resolver');
+ });
+
+ resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ t.equal(pkg.main, 'resolver');
+ });
+
+ resolve('./foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo.js'));
+ });
+
+ resolve('foo', { basedir: dir }, function (err) {
+ t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ // Test that filename is reported as the "from" value when passed.
+ resolve('foo', { basedir: dir, filename: path.join(dir, 'baz.js') }, function (err) {
+ t.equal(err.message, "Cannot find module 'foo' from '" + path.join(dir, 'baz.js') + "'");
+ });
+});
+
+test('bar', function (t) {
+ t.plan(6);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js'));
+ t.equal(pkg.main, 'bar');
+ });
+});
+
+test('baz', function (t) {
+ t.plan(4);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./baz', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'baz/quux.js'));
+ t.equal(pkg.main, 'quux.js');
+ });
+
+ resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'baz/quux.js'));
+ t.equal(pkg.main, 'quux.js');
+ });
+});
+
+test('biz', function (t) {
+ t.plan(24);
+ var dir = path.join(__dirname, 'resolver/biz/node_modules');
+
+ resolve('./grux', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg.main, 'biz');
+ });
+
+ resolve('./garply', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg.main, 'grux');
+ });
+
+ resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'tiv/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg, undefined);
+ });
+
+ resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'grux/index.js'));
+ t.equal(pkg.main, 'tiv');
+ });
+
+ resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+
+ resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'garply/lib/index.js'));
+ t.equal(pkg.main, './lib');
+ });
+});
+
+test('quux', function (t) {
+ t.plan(2);
+ var dir = path.join(__dirname, 'resolver/quux');
+
+ resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'foo/index.js'));
+ t.equal(pkg.main, 'quux');
+ });
+});
+
+test('normalize', function (t) {
+ t.plan(2);
+ var dir = path.join(__dirname, 'resolver/biz/node_modules/grux');
+
+ resolve('../grux', { basedir: dir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ t.equal(pkg, undefined);
+ });
+});
+
+test('cup', function (t) {
+ t.plan(5);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'cup.coffee'));
+ });
+
+ resolve('./cup.coffee', { basedir: dir }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'cup.coffee'));
+ });
+
+ resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) {
+ t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ // Test that filename is reported as the "from" value when passed.
+ resolve('./cup', { basedir: dir, extensions: ['.js'], filename: path.join(dir, 'cupboard.js') }, function (err, res) {
+ t.equal(err.message, "Cannot find module './cup' from '" + path.join(dir, 'cupboard.js') + "'");
+ });
+});
+
+test('mug', function (t) {
+ t.plan(3);
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./mug', { basedir: dir }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'mug.js'));
+ });
+
+ resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, '/mug.coffee'));
+ });
+
+ resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) {
+ t.equal(res, path.join(dir, '/mug.js'));
+ });
+});
+
+test('other path', function (t) {
+ t.plan(6);
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'bar');
+ var otherDir = path.join(resolverDir, 'other_path');
+
+ resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(resolverDir, 'other_path/root.js'));
+ });
+
+ resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js'));
+ });
+
+ resolve('root', { basedir: dir }, function (err, res) {
+ t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+
+ resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) {
+ t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'");
+ t.equal(err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('path iterator', function (t) {
+ t.plan(2);
+
+ var resolverDir = path.join(__dirname, 'resolver');
+
+ var exactIterator = function (x, start, getPackageCandidates, opts) {
+ return [path.join(resolverDir, x)];
+ };
+
+ resolve('baz', { packageIterator: exactIterator }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(resolverDir, 'baz/quux.js'));
+ t.equal(pkg && pkg.name, 'baz');
+ });
+});
+
+test('incorrect main', function (t) {
+ t.plan(1);
+
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'incorrect_main');
+
+ resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'index.js'));
+ });
+});
+
+test('without basedir', function (t) {
+ t.plan(1);
+
+ var dir = path.join(__dirname, 'resolver/without_basedir');
+ var tester = require(path.join(dir, 'main.js'));
+
+ tester(t, function (err, res, pkg) {
+ if (err) {
+ t.fail(err);
+ } else {
+ t.equal(res, path.join(dir, 'node_modules/mymodule.js'));
+ }
+ });
+});
+
+test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) {
+ t.plan(2);
+
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo.js'));
+ });
+
+ resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo/index.js'));
+ });
+});
+
+test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
+ t.plan(2);
+
+ var dir = path.join(__dirname, 'resolver');
+
+ resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo/index.js'));
+ });
+
+ resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'same_names/foo/index.js'));
+ });
+});
+
+test('async: #121 - treating an existing file as a dir when no basedir', function (t) {
+ var testFile = path.basename(__filename);
+
+ t.test('sanity check', function (st) {
+ st.plan(1);
+ resolve('./' + testFile, function (err, res, pkg) {
+ if (err) t.fail(err);
+ st.equal(res, __filename, 'sanity check');
+ });
+ });
+
+ t.test('with a fake directory', function (st) {
+ st.plan(4);
+
+ resolve('./' + testFile + '/blah', function (err, res, pkg) {
+ st.ok(err, 'there is an error');
+ st.notOk(res, 'no result');
+
+ st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
+ st.equal(
+ err && err.message,
+ 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'',
+ 'can not find nonexistent module'
+ );
+ st.end();
+ });
+ });
+
+ t.end();
+});
+
+test('async dot main', function (t) {
+ var start = new Date();
+ t.plan(3);
+ resolve('./resolver/dot_main', function (err, ret) {
+ t.notOk(err);
+ t.equal(ret, path.join(__dirname, 'resolver/dot_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+ });
+});
+
+test('async dot slash main', function (t) {
+ var start = new Date();
+ t.plan(3);
+ resolve('./resolver/dot_slash_main', function (err, ret) {
+ t.notOk(err);
+ t.equal(ret, path.join(__dirname, 'resolver/dot_slash_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+ });
+});
+
+test('not a directory', function (t) {
+ t.plan(6);
+ var path = './foo';
+ resolve(path, { basedir: __filename }, function (err, res, pkg) {
+ t.ok(err, 'a non-directory errors');
+ t.equal(arguments.length, 1);
+ t.equal(res, undefined);
+ t.equal(pkg, undefined);
+
+ t.equal(err && err.message, 'Cannot find module \'' + path + '\' from \'' + __filename + '\'');
+ t.equal(err && err.code, 'MODULE_NOT_FOUND');
+ });
+});
+
+test('non-string "main" field in package.json', function (t) {
+ t.plan(5);
+
+ var dir = path.join(__dirname, 'resolver');
+ resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ t.equal(res, undefined, 'res is undefined');
+ t.equal(pkg, undefined, 'pkg is undefined');
+ });
+});
+
+test('non-string "main" field in package.json', function (t) {
+ t.plan(5);
+
+ var dir = path.join(__dirname, 'resolver');
+ resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ t.equal(res, undefined, 'res is undefined');
+ t.equal(pkg, undefined, 'pkg is undefined');
+ });
+});
+
+test('browser field in package.json', function (t) {
+ t.plan(3);
+
+ var dir = path.join(__dirname, 'resolver');
+ resolve(
+ './browser_field',
+ {
+ basedir: dir,
+ packageFilter: function packageFilter(pkg) {
+ if (pkg.browser) {
+ pkg.main = pkg.browser; // eslint-disable-line no-param-reassign
+ delete pkg.browser; // eslint-disable-line no-param-reassign
+ }
+ return pkg;
+ }
+ },
+ function (err, res, pkg) {
+ if (err) t.fail(err);
+ t.equal(res, path.join(dir, 'browser_field', 'b.js'));
+ t.equal(pkg && pkg.main, 'b');
+ t.equal(pkg && pkg.browser, undefined);
+ }
+ );
+});
diff --git a/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/resolve/test/resolver/baz/doom.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/baz/doom.js
diff --git a/node_modules/resolve/test/resolver/baz/package.json b/node_modules/resolve/test/resolver/baz/package.json
new file mode 100644
index 0000000..2f77720
--- /dev/null
+++ b/node_modules/resolve/test/resolver/baz/package.json
@@ -0,0 +1,4 @@
+{
+ "name": "baz",
+ "main": "quux.js"
+}
diff --git a/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/resolve/test/resolver/baz/quux.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/baz/quux.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/browser_field/a.js b/node_modules/resolve/test/resolver/browser_field/a.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/browser_field/a.js
diff --git a/node_modules/resolve/test/resolver/browser_field/b.js b/node_modules/resolve/test/resolver/browser_field/b.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/browser_field/b.js
diff --git a/node_modules/resolve/test/resolver/browser_field/package.json b/node_modules/resolve/test/resolver/browser_field/package.json
new file mode 100644
index 0000000..bf406f0
--- /dev/null
+++ b/node_modules/resolve/test/resolver/browser_field/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "browser_field",
+ "main": "a",
+ "browser": "b"
+}
diff --git a/node_modules/resolve/test/resolver/cup.coffee b/node_modules/resolve/test/resolver/cup.coffee
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/node_modules/resolve/test/resolver/cup.coffee
@@ -0,0 +1 @@
+
diff --git a/node_modules/resolve/test/resolver/dot_main/index.js b/node_modules/resolve/test/resolver/dot_main/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_main/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/dot_main/package.json b/node_modules/resolve/test/resolver/dot_main/package.json
new file mode 100644
index 0000000..d7f4fc8
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_main/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "."
+}
diff --git a/node_modules/resolve/test/resolver/dot_slash_main/index.js b/node_modules/resolve/test/resolver/dot_slash_main/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_slash_main/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/dot_slash_main/package.json b/node_modules/resolve/test/resolver/dot_slash_main/package.json
new file mode 100644
index 0000000..f51287b
--- /dev/null
+++ b/node_modules/resolve/test/resolver/dot_slash_main/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "./"
+}
diff --git a/node_modules/resolve/test/resolver/foo.js b/node_modules/resolve/test/resolver/foo.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/foo.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/resolve/test/resolver/incorrect_main/index.js
new file mode 100644
index 0000000..bc1fb0a
--- /dev/null
+++ b/node_modules/resolve/test/resolver/incorrect_main/index.js
@@ -0,0 +1,2 @@
+// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/resolve/test/resolver/incorrect_main/package.json
new file mode 100644
index 0000000..b718804
--- /dev/null
+++ b/node_modules/resolve/test/resolver/incorrect_main/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "wrong.js"
+}
diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json
new file mode 100644
index 0000000..0cf8279
--- /dev/null
+++ b/node_modules/resolve/test/resolver/invalid_main/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "invalid main",
+ "main": [
+ "why is this a thing",
+ "srsly omg wtf"
+ ]
+}
diff --git a/node_modules/resolve/test/resolver/mug.coffee b/node_modules/resolve/test/resolver/mug.coffee
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/mug.coffee
diff --git a/node_modules/resolve/test/resolver/mug.js b/node_modules/resolve/test/resolver/mug.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/mug.js
diff --git a/node_modules/resolve/test/resolver/multirepo/lerna.json b/node_modules/resolve/test/resolver/multirepo/lerna.json
new file mode 100644
index 0000000..d6707ca
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/lerna.json
@@ -0,0 +1,6 @@
+{
+ "packages": [
+ "packages/*"
+ ],
+ "version": "0.0.0"
+}
diff --git a/node_modules/resolve/test/resolver/multirepo/package.json b/node_modules/resolve/test/resolver/multirepo/package.json
new file mode 100644
index 0000000..8508f9d
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "monorepo-symlink-test",
+ "private": true,
+ "version": "0.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "postinstall": "lerna bootstrap",
+ "test": "node packages/package-a"
+ },
+ "author": "",
+ "license": "MIT",
+ "dependencies": {
+ "jquery": "^3.3.1",
+ "resolve": "../../../"
+ },
+ "devDependencies": {
+ "lerna": "^3.4.3"
+ }
+}
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js
new file mode 100644
index 0000000..8875a32
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js
@@ -0,0 +1,35 @@
+'use strict';
+
+var assert = require('assert');
+var path = require('path');
+var resolve = require('resolve');
+
+var basedir = __dirname + '/node_modules/@my-scope/package-b';
+
+var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js');
+
+/*
+ * preserveSymlinks === false
+ * will search NPM package from
+ * - packages/package-b/node_modules
+ * - packages/node_modules
+ * - node_modules
+ */
+assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected);
+assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected);
+
+/*
+ * preserveSymlinks === true
+ * will search NPM package from
+ * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules
+ * - packages/package-a/node_modules/@my-scope/packages/node_modules
+ * - packages/package-a/node_modules/@my-scope/node_modules
+ * - packages/package-a/node_modules/node_modules
+ * - packages/package-a/node_modules
+ * - packages/node_modules
+ * - node_modules
+ */
+assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected);
+assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected);
+
+console.log(' * all monorepo paths successfully resolved through symlinks');
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json
new file mode 100644
index 0000000..204de51
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "@my-scope/package-a",
+ "version": "0.0.0",
+ "private": true,
+ "description": "",
+ "license": "MIT",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: run tests from root\" && exit 1"
+ },
+ "dependencies": {
+ "@my-scope/package-b": "^0.0.0"
+ }
+}
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js
diff --git a/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json
new file mode 100644
index 0000000..f57c3b5
--- /dev/null
+++ b/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "@my-scope/package-b",
+ "private": true,
+ "version": "0.0.0",
+ "description": "",
+ "license": "MIT",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: run tests from root\" && exit 1"
+ },
+ "dependencies": {
+ "@my-scope/package-a": "^0.0.0"
+ }
+}
diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js
new file mode 100644
index 0000000..9b4846a
--- /dev/null
+++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js
@@ -0,0 +1,26 @@
+var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
+var b;
+var c;
+
+var test = function test() {
+ console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
+ console.log(b, ': preserveSymlinks true');
+ console.log(c, ': preserveSymlinks false');
+
+ if (a !== b && a !== c) {
+ throw 'async: no match';
+ }
+ console.log('async: success! a matched either b or c\n');
+};
+
+require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) {
+ if (err) { throw err; }
+ b = result.replace(process.cwd(), '$CWD');
+ if (b && c) { test(); }
+});
+require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) {
+ if (err) { throw err; }
+ c = result.replace(process.cwd(), '$CWD');
+ if (b && c) { test(); }
+});
+
diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json
new file mode 100644
index 0000000..acfe9e9
--- /dev/null
+++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "mylib",
+ "version": "0.0.0",
+ "description": "",
+ "private": true,
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "buffer": "*"
+ }
+}
diff --git a/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js
new file mode 100644
index 0000000..3283efc
--- /dev/null
+++ b/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js
@@ -0,0 +1,12 @@
+var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
+var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
+var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
+
+console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
+console.log(b, ': preserveSymlinks true');
+console.log(c, ': preserveSymlinks false');
+
+if (a !== b && a !== c) {
+ throw 'sync: no match';
+}
+console.log('sync: success! a matched either b or c\n');
diff --git a/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/other_path/lib/other-lib.js
diff --git a/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/resolve/test/resolver/other_path/root.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/other_path/root.js
diff --git a/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/resolve/test/resolver/quux/foo/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/quux/foo/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/same_names/foo.js b/node_modules/resolve/test/resolver/same_names/foo.js
new file mode 100644
index 0000000..888cae3
--- /dev/null
+++ b/node_modules/resolve/test/resolver/same_names/foo.js
@@ -0,0 +1 @@
+module.exports = 42;
diff --git a/node_modules/resolve/test/resolver/same_names/foo/index.js b/node_modules/resolve/test/resolver/same_names/foo/index.js
new file mode 100644
index 0000000..bd816ea
--- /dev/null
+++ b/node_modules/resolve/test/resolver/same_names/foo/index.js
@@ -0,0 +1 @@
+module.exports = 1;
diff --git a/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js
diff --git a/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep
diff --git a/node_modules/resolve/test/resolver/symlinked/package/bar.js b/node_modules/resolve/test/resolver/symlinked/package/bar.js
new file mode 100644
index 0000000..cb1c2c0
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/package/bar.js
@@ -0,0 +1 @@
+module.exports = 'bar';
diff --git a/node_modules/resolve/test/resolver/symlinked/package/package.json b/node_modules/resolve/test/resolver/symlinked/package/package.json
new file mode 100644
index 0000000..8e1b585
--- /dev/null
+++ b/node_modules/resolve/test/resolver/symlinked/package/package.json
@@ -0,0 +1,3 @@
+{
+ "main": "bar.js"
+} \ No newline at end of file
diff --git a/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/resolve/test/resolver/without_basedir/main.js
new file mode 100644
index 0000000..5b31975
--- /dev/null
+++ b/node_modules/resolve/test/resolver/without_basedir/main.js
@@ -0,0 +1,5 @@
+var resolve = require('../../../');
+
+module.exports = function (t, cb) {
+ resolve('mymodule', null, cb);
+};
diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js
new file mode 100644
index 0000000..3082c96
--- /dev/null
+++ b/node_modules/resolve/test/resolver_sync.js
@@ -0,0 +1,358 @@
+var path = require('path');
+var test = require('tape');
+var resolve = require('../');
+
+test('foo', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./foo', { basedir: dir }),
+ path.join(dir, 'foo.js')
+ );
+
+ t.equal(
+ resolve.sync('./foo.js', { basedir: dir }),
+ path.join(dir, 'foo.js')
+ );
+
+ t.equal(
+ resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }),
+ path.join(dir, 'foo.js')
+ );
+
+ t.throws(function () {
+ resolve.sync('foo', { basedir: dir });
+ });
+
+ // Test that filename is reported as the "from" value when passed.
+ t.throws(
+ function () {
+ resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') });
+ },
+ {
+ name: 'Error',
+ message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'"
+ }
+ );
+
+ t.end();
+});
+
+test('bar', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('foo', { basedir: path.join(dir, 'bar') }),
+ path.join(dir, 'bar/node_modules/foo/index.js')
+ );
+ t.end();
+});
+
+test('baz', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./baz', { basedir: dir }),
+ path.join(dir, 'baz/quux.js')
+ );
+ t.end();
+});
+
+test('biz', function (t) {
+ var dir = path.join(__dirname, 'resolver/biz/node_modules');
+ t.equal(
+ resolve.sync('./grux', { basedir: dir }),
+ path.join(dir, 'grux/index.js')
+ );
+
+ t.equal(
+ resolve.sync('tiv', { basedir: path.join(dir, 'grux') }),
+ path.join(dir, 'tiv/index.js')
+ );
+
+ t.equal(
+ resolve.sync('grux', { basedir: path.join(dir, 'tiv') }),
+ path.join(dir, 'grux/index.js')
+ );
+ t.end();
+});
+
+test('normalize', function (t) {
+ var dir = path.join(__dirname, 'resolver/biz/node_modules/grux');
+ t.equal(
+ resolve.sync('../grux', { basedir: dir }),
+ path.join(dir, 'index.js')
+ );
+ t.end();
+});
+
+test('cup', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ t.equal(
+ resolve.sync('./cup', {
+ basedir: dir,
+ extensions: ['.js', '.coffee']
+ }),
+ path.join(dir, 'cup.coffee')
+ );
+
+ t.equal(
+ resolve.sync('./cup.coffee', { basedir: dir }),
+ path.join(dir, 'cup.coffee')
+ );
+
+ t.throws(function () {
+ resolve.sync('./cup', {
+ basedir: dir,
+ extensions: ['.js']
+ });
+ });
+
+ t.end();
+});
+
+test('mug', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ t.equal(
+ resolve.sync('./mug', { basedir: dir }),
+ path.join(dir, 'mug.js')
+ );
+
+ t.equal(
+ resolve.sync('./mug', {
+ basedir: dir,
+ extensions: ['.coffee', '.js']
+ }),
+ path.join(dir, 'mug.coffee')
+ );
+
+ t.equal(
+ resolve.sync('./mug', {
+ basedir: dir,
+ extensions: ['.js', '.coffee']
+ }),
+ path.join(dir, 'mug.js')
+ );
+
+ t.end();
+});
+
+test('other path', function (t) {
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'bar');
+ var otherDir = path.join(resolverDir, 'other_path');
+
+ t.equal(
+ resolve.sync('root', {
+ basedir: dir,
+ paths: [otherDir]
+ }),
+ path.join(resolverDir, 'other_path/root.js')
+ );
+
+ t.equal(
+ resolve.sync('lib/other-lib', {
+ basedir: dir,
+ paths: [otherDir]
+ }),
+ path.join(resolverDir, 'other_path/lib/other-lib.js')
+ );
+
+ t.throws(function () {
+ resolve.sync('root', { basedir: dir });
+ });
+
+ t.throws(function () {
+ resolve.sync('zzz', {
+ basedir: dir,
+ paths: [otherDir]
+ });
+ });
+
+ t.end();
+});
+
+test('path iterator', function (t) {
+ var resolverDir = path.join(__dirname, 'resolver');
+
+ var exactIterator = function (x, start, getPackageCandidates, opts) {
+ return [path.join(resolverDir, x)];
+ };
+
+ t.equal(
+ resolve.sync('baz', { packageIterator: exactIterator }),
+ path.join(resolverDir, 'baz/quux.js')
+ );
+
+ t.end();
+});
+
+test('incorrect main', function (t) {
+ var resolverDir = path.join(__dirname, 'resolver');
+ var dir = path.join(resolverDir, 'incorrect_main');
+
+ t.equal(
+ resolve.sync('./incorrect_main', { basedir: resolverDir }),
+ path.join(dir, 'index.js')
+ );
+
+ t.end();
+});
+
+var stubStatSync = function stubStatSync(fn) {
+ var fs = require('fs');
+ var statSync = fs.statSync;
+ try {
+ fs.statSync = function () {
+ throw new EvalError('Unknown Error');
+ };
+ return fn();
+ } finally {
+ fs.statSync = statSync;
+ }
+};
+
+test('#79 - re-throw non ENOENT errors from stat', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ stubStatSync(function () {
+ t.throws(function () {
+ resolve.sync('foo', { basedir: dir });
+ }, /Unknown Error/);
+ });
+
+ t.end();
+});
+
+test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }),
+ path.join(dir, 'same_names/foo.js')
+ );
+ t.equal(
+ resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }),
+ path.join(dir, 'same_names/foo/index.js')
+ );
+ t.end();
+});
+
+test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+
+ t.equal(
+ resolve.sync('./', { basedir: path.join(dir, 'same_names/foo') }),
+ path.join(dir, 'same_names/foo/index.js')
+ );
+ t.equal(
+ resolve.sync('.', { basedir: path.join(dir, 'same_names/foo') }),
+ path.join(dir, 'same_names/foo/index.js')
+ );
+ t.end();
+});
+
+test('sync: #121 - treating an existing file as a dir when no basedir', function (t) {
+ var testFile = path.basename(__filename);
+
+ t.test('sanity check', function (st) {
+ st.equal(
+ resolve.sync('./' + testFile),
+ __filename,
+ 'sanity check'
+ );
+ st.end();
+ });
+
+ t.test('with a fake directory', function (st) {
+ function run() { return resolve.sync('./' + testFile + '/blah'); }
+
+ st.throws(run, 'throws an error');
+
+ try {
+ run();
+ } catch (e) {
+ st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
+ st.equal(
+ e.message,
+ 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'',
+ 'can not find nonexistent module'
+ );
+ }
+
+ st.end();
+ });
+
+ t.end();
+});
+
+test('sync dot main', function (t) {
+ var start = new Date();
+ t.equal(resolve.sync('./resolver/dot_main'), path.join(__dirname, 'resolver/dot_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+});
+
+test('sync dot slash main', function (t) {
+ var start = new Date();
+ t.equal(resolve.sync('./resolver/dot_slash_main'), path.join(__dirname, 'resolver/dot_slash_main/index.js'));
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+});
+
+test('not a directory', function (t) {
+ var path = './foo';
+ try {
+ resolve.sync(path, { basedir: __filename });
+ t.fail();
+ } catch (err) {
+ t.ok(err, 'a non-directory errors');
+ t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'");
+ t.equal(err && err.code, 'MODULE_NOT_FOUND');
+ }
+ t.end();
+});
+
+test('non-string "main" field in package.json', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ try {
+ var result = resolve.sync('./invalid_main', { basedir: dir });
+ t.equal(result, undefined, 'result should not exist');
+ t.fail('should not get here');
+ } catch (err) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ }
+ t.end();
+});
+
+test('non-string "main" field in package.json', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ try {
+ var result = resolve.sync('./invalid_main', { basedir: dir });
+ t.equal(result, undefined, 'result should not exist');
+ t.fail('should not get here');
+ } catch (err) {
+ t.ok(err, 'errors on non-string main');
+ t.equal(err.message, 'package “invalid main” `main` must be a string');
+ t.equal(err.code, 'INVALID_PACKAGE_MAIN');
+ }
+ t.end();
+});
+
+test('browser field in package.json', function (t) {
+ var dir = path.join(__dirname, 'resolver');
+ var res = resolve.sync('./browser_field', {
+ basedir: dir,
+ packageFilter: function packageFilter(pkg) {
+ if (pkg.browser) {
+ pkg.main = pkg.browser; // eslint-disable-line no-param-reassign
+ delete pkg.browser; // eslint-disable-line no-param-reassign
+ }
+ return pkg;
+ }
+ });
+ t.equal(res, path.join(dir, 'browser_field', 'b.js'));
+ t.end();
+});
diff --git a/node_modules/resolve/test/shadowed_core.js b/node_modules/resolve/test/shadowed_core.js
new file mode 100644
index 0000000..3a5f4fc
--- /dev/null
+++ b/node_modules/resolve/test/shadowed_core.js
@@ -0,0 +1,54 @@
+var test = require('tape');
+var resolve = require('../');
+var path = require('path');
+
+test('shadowed core modules still return core module', function (t) {
+ t.plan(2);
+
+ resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
+ t.ifError(err);
+ t.equal(res, 'util');
+ });
+});
+
+test('shadowed core modules still return core module [sync]', function (t) {
+ t.plan(1);
+
+ var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') });
+
+ t.equal(res, 'util');
+});
+
+test('shadowed core modules return shadow when appending `/`', function (t) {
+ t.plan(2);
+
+ resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
+ t.ifError(err);
+ t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
+ });
+});
+
+test('shadowed core modules return shadow when appending `/` [sync]', function (t) {
+ t.plan(1);
+
+ var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') });
+
+ t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
+});
+
+test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) {
+ t.plan(2);
+
+ resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) {
+ t.ifError(err);
+ t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
+ });
+});
+
+test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) {
+ t.plan(1);
+
+ var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false });
+
+ t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
+});
diff --git a/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/resolve/test/shadowed_core/node_modules/util/index.js
diff --git a/node_modules/resolve/test/subdirs.js b/node_modules/resolve/test/subdirs.js
new file mode 100644
index 0000000..b7b8450
--- /dev/null
+++ b/node_modules/resolve/test/subdirs.js
@@ -0,0 +1,13 @@
+var test = require('tape');
+var resolve = require('../');
+var path = require('path');
+
+test('subdirs', function (t) {
+ t.plan(2);
+
+ var dir = path.join(__dirname, '/subdirs');
+ resolve('a/b/c/x.json', { basedir: dir }, function (err, res) {
+ t.ifError(err);
+ t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json'));
+ });
+});
diff --git a/node_modules/resolve/test/symlinks.js b/node_modules/resolve/test/symlinks.js
new file mode 100644
index 0000000..35f881a
--- /dev/null
+++ b/node_modules/resolve/test/symlinks.js
@@ -0,0 +1,176 @@
+var path = require('path');
+var fs = require('fs');
+var test = require('tape');
+var map = require('array.prototype.map');
+var resolve = require('../');
+
+var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink');
+var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package');
+var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a');
+var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a');
+try {
+ fs.unlinkSync(symlinkDir);
+} catch (err) {}
+try {
+ fs.unlinkSync(packageDir);
+} catch (err) {}
+try {
+ fs.unlinkSync(modADir);
+} catch (err) {}
+try {
+ fs.unlinkSync(symlinkModADir);
+} catch (err) {}
+
+try {
+ fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir');
+} catch (err) {
+ // if fails then it is probably on Windows and lets try to create a junction
+ fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction');
+}
+try {
+ fs.symlinkSync('../../package', packageDir, 'dir');
+} catch (err) {
+ // if fails then it is probably on Windows and lets try to create a junction
+ fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction');
+}
+try {
+ fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir');
+} catch (err) {
+ // if fails then it is probably on Windows and lets try to create a junction
+ fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction');
+}
+
+test('symlink', function (t) {
+ t.plan(2);
+
+ resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) {
+ t.error(err);
+ t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js'));
+ });
+});
+
+test('sync symlink when preserveSymlinks = true', function (t) {
+ t.plan(4);
+
+ resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) {
+ t.ok(err, 'there is an error');
+ t.notOk(res, 'no result');
+
+ t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
+ t.equal(
+ err && err.message,
+ 'Cannot find module \'foo\' from \'' + symlinkDir + '\'',
+ 'can not find nonexistent module'
+ );
+ });
+});
+
+test('sync symlink', function (t) {
+ var start = new Date();
+ t.doesNotThrow(function () {
+ t.equal(
+ resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }),
+ path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')
+ );
+ });
+ t.ok(new Date() - start < 50, 'resolve.sync timedout');
+ t.end();
+});
+
+test('sync symlink when preserveSymlinks = true', function (t) {
+ t.throws(function () {
+ resolve.sync('foo', { basedir: symlinkDir });
+ }, /Cannot find module 'foo'/);
+ t.end();
+});
+
+test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
+ var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
+ var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false });
+
+ t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
+ t.end();
+});
+
+test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
+ t.plan(2);
+ var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
+ resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) {
+ t.notOk(err, 'no error');
+ t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
+ });
+});
+
+test('packageFilter', function (t) {
+ function relative(x) {
+ return path.relative(__dirname, x);
+ }
+
+ function testPackageFilter(preserveSymlinks) {
+ return function (st) {
+ st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition
+
+ var destMain = 'symlinks/dest/node_modules/mod-a/index.js';
+ var destPkg = 'symlinks/dest/node_modules/mod-a/package.json';
+ var sourceMain = 'symlinks/source/node_modules/mod-a/index.js';
+ var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json';
+ var destDir = path.join(__dirname, 'symlinks', 'dest');
+
+ /* eslint multiline-comment-style: 0 */
+ /* v2.x will restore these tests
+ var packageFilterPath = [];
+ var actualPath = resolve.sync('mod-a', {
+ basedir: destDir,
+ preserveSymlinks: preserveSymlinks,
+ packageFilter: function (pkg, pkgfile, dir) {
+ packageFilterPath.push(pkgfile);
+ }
+ });
+ st.equal(
+ relative(actualPath),
+ path.normalize(preserveSymlinks ? destMain : sourceMain),
+ 'sync: actual path is correct'
+ );
+ st.deepEqual(
+ map(packageFilterPath, relative),
+ map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize),
+ 'sync: packageFilter pkgfile arg is correct'
+ );
+ */
+
+ var asyncPackageFilterPath = [];
+ resolve(
+ 'mod-a',
+ {
+ basedir: destDir,
+ preserveSymlinks: preserveSymlinks,
+ packageFilter: function (pkg, pkgfile) {
+ asyncPackageFilterPath.push(pkgfile);
+ }
+ },
+ function (err, actualPath) {
+ st.error(err, 'no error');
+ st.equal(
+ relative(actualPath),
+ path.normalize(preserveSymlinks ? destMain : sourceMain),
+ 'async: actual path is correct'
+ );
+ st.deepEqual(
+ map(asyncPackageFilterPath, relative),
+ map(
+ preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg],
+ path.normalize
+ ),
+ 'async: packageFilter pkgfile arg is correct'
+ );
+ }
+ );
+ };
+ }
+
+ t.test('preserveSymlinks: false', testPackageFilter(false));
+
+ t.test('preserveSymlinks: true', testPackageFilter(true));
+
+ t.end();
+});
diff --git a/node_modules/responselike/LICENSE b/node_modules/responselike/LICENSE
new file mode 100644
index 0000000..8829a00
--- /dev/null
+++ b/node_modules/responselike/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2017 Luke Childs
+
+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/responselike/README.md b/node_modules/responselike/README.md
new file mode 100644
index 0000000..6361931
--- /dev/null
+++ b/node_modules/responselike/README.md
@@ -0,0 +1,77 @@
+# responselike
+
+> A response-like object for mocking a Node.js HTTP response stream
+
+[![Build Status](https://travis-ci.org/lukechilds/responselike.svg?branch=master)](https://travis-ci.org/lukechilds/responselike)
+[![Coverage Status](https://coveralls.io/repos/github/lukechilds/responselike/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/responselike?branch=master)
+[![npm](https://img.shields.io/npm/dm/responselike.svg)](https://www.npmjs.com/package/responselike)
+[![npm](https://img.shields.io/npm/v/responselike.svg)](https://www.npmjs.com/package/responselike)
+
+Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage). Useful for formatting cached responses so they can be consumed by code expecting a real response.
+
+## Install
+
+```shell
+npm install --save responselike
+```
+
+Or if you're just using for testing you'll want:
+
+```shell
+npm install --save-dev responselike
+```
+
+## Usage
+
+```js
+const Response = require('responselike');
+
+const response = new Response(200, { foo: 'bar' }, Buffer.from('Hi!'), 'https://example.com');
+
+response.statusCode;
+// 200
+response.headers;
+// { foo: 'bar' }
+response.body;
+// <Buffer 48 69 21>
+response.url;
+// 'https://example.com'
+
+response.pipe(process.stdout);
+// Hi!
+```
+
+
+## API
+
+### new Response(statusCode, headers, body, url)
+
+Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
+
+#### statusCode
+
+Type: `number`
+
+HTTP response status code.
+
+#### headers
+
+Type: `object`
+
+HTTP headers object. Keys will be automatically lowercased.
+
+#### body
+
+Type: `buffer`
+
+A Buffer containing the response body. The Buffer contents will be streamable but is also exposed directly as `response.body`.
+
+#### url
+
+Type: `string`
+
+Request URL string.
+
+## License
+
+MIT © Luke Childs
diff --git a/node_modules/responselike/package.json b/node_modules/responselike/package.json
new file mode 100644
index 0000000..ee885f0
--- /dev/null
+++ b/node_modules/responselike/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "responselike",
+ "version": "2.0.1",
+ "description": "A response-like object for mocking a Node.js HTTP response stream",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "main": "src/index.js",
+ "scripts": {
+ "test": "xo && nyc ava",
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "xo": {
+ "extends": "xo-lukechilds"
+ },
+ "keywords": [
+ "http",
+ "https",
+ "response",
+ "mock",
+ "request",
+ "responselike"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/responselike.git"
+ },
+ "author": "lukechilds",
+ "license": "MIT",
+ "devDependencies": {
+ "ava": "^0.25.0",
+ "coveralls": "^3.0.0",
+ "eslint-config-xo-lukechilds": "^1.0.0",
+ "get-stream": "^3.0.0",
+ "nyc": "^11.8.0",
+ "xo": "^0.19.0"
+ },
+ "dependencies": {
+ "lowercase-keys": "^2.0.0"
+ }
+}
diff --git a/node_modules/responselike/src/index.js b/node_modules/responselike/src/index.js
new file mode 100644
index 0000000..b17b481
--- /dev/null
+++ b/node_modules/responselike/src/index.js
@@ -0,0 +1,34 @@
+'use strict';
+
+const Readable = require('stream').Readable;
+const lowercaseKeys = require('lowercase-keys');
+
+class Response extends Readable {
+ constructor(statusCode, headers, body, url) {
+ if (typeof statusCode !== 'number') {
+ throw new TypeError('Argument `statusCode` should be a number');
+ }
+ if (typeof headers !== 'object') {
+ throw new TypeError('Argument `headers` should be an object');
+ }
+ if (!(body instanceof Buffer)) {
+ throw new TypeError('Argument `body` should be a buffer');
+ }
+ if (typeof url !== 'string') {
+ throw new TypeError('Argument `url` should be a string');
+ }
+
+ super();
+ this.statusCode = statusCode;
+ this.headers = lowercaseKeys(headers);
+ this.body = body;
+ this.url = url;
+ }
+
+ _read() {
+ this.push(this.body);
+ this.push(null);
+ }
+}
+
+module.exports = Response;
diff --git a/node_modules/roarr/LICENSE b/node_modules/roarr/LICENSE
new file mode 100644
index 0000000..5065086
--- /dev/null
+++ b/node_modules/roarr/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2019, Gajus Kuizinas (http://gajus.com/)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/roarr/README.md b/node_modules/roarr/README.md
new file mode 100644
index 0000000..9f1c267
--- /dev/null
+++ b/node_modules/roarr/README.md
@@ -0,0 +1,689 @@
+<a name="roarr"></a>
+# Roarr
+
+[![GitSpo Mentions](https://gitspo.com/badges/mentions/gajus/roarr?style=flat-square)](https://gitspo.com/mentions/gajus/roarr)
+[![Travis build status](http://img.shields.io/travis/gajus/roarr/master.svg?style=flat-square)](https://travis-ci.org/gajus/roarr)
+[![Coveralls](https://img.shields.io/coveralls/gajus/roarr.svg?style=flat-square)](https://coveralls.io/github/gajus/roarr)
+[![NPM version](http://img.shields.io/npm/v/roarr.svg?style=flat-square)](https://www.npmjs.org/package/roarr)
+[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical)
+[![Twitter Follow](https://img.shields.io/twitter/follow/kuizinas.svg?style=social&label=Follow)](https://twitter.com/kuizinas)
+
+JSON logger for Node.js and browser.
+
+* [Roarr](#roarr)
+ * [Motivation](#roarr-motivation)
+ * [Usage](#roarr-usage)
+ * [Producing logs](#roarr-usage-producing-logs)
+ * [Consuming logs](#roarr-usage-consuming-logs)
+ * [Filtering logs](#roarr-usage-filtering-logs)
+ * [Log message format](#roarr-log-message-format)
+ * [API](#roarr-api)
+ * [`adopt`](#roarr-api-adopt)
+ * [`child`](#roarr-api-child)
+ * [`getContext`](#roarr-api-getcontext)
+ * [`trace`](#roarr-api-trace)
+ * [`debug`](#roarr-api-debug)
+ * [`info`](#roarr-api-info)
+ * [`warn`](#roarr-api-warn)
+ * [`error`](#roarr-api-error)
+ * [`fatal`](#roarr-api-fatal)
+ * [Middlewares](#roarr-middlewares)
+ * [CLI program](#roarr-cli-program)
+ * [Transports](#roarr-transports)
+ * [Node.js environment variables](#roarr-node-js-environment-variables)
+ * [Conventions](#roarr-conventions)
+ * [Context property names](#roarr-conventions-context-property-names)
+ * [Using Roarr in an application](#roarr-conventions-using-roarr-in-an-application)
+ * [Recipes](#roarr-recipes)
+ * [Logging errors](#roarr-recipes-logging-errors)
+ * [Using with Elasticsearch](#roarr-recipes-using-with-elasticsearch)
+ * [Using with Scalyr](#roarr-recipes-using-with-scalyr)
+ * [Documenting use of Roarr](#roarr-recipes-documenting-use-of-roarr)
+
+
+<a name="roarr-motivation"></a>
+## Motivation
+
+For a long time I have been a big fan of using [`debug`](https://github.com/visionmedia/debug). `debug` is simple to use, works in Node.js and browser, does not require configuration and it is fast. However, problems arise when you need to parse logs. Anything but one-line text messages cannot be parsed in a safe way.
+
+To log structured data, I have been using [Winston](https://github.com/winstonjs/winston) and [Bunyan](https://github.com/trentm/node-bunyan). These packages are great for application-level logging. I have preferred Bunyan because of the [Bunyan CLI program](https://github.com/trentm/node-bunyan#cli-usage) used to pretty-print logs. However, these packages require program-level configuration – when constructing an instance of a logger, you need to define the transport and the log-level. This makes them unsuitable for use in code designed to be consumed by other applications.
+
+Then there is [pino](https://github.com/pinojs/pino). pino is fast JSON logger, it has CLI program equivalent to Bunyan, it decouples transports, and it has sane default configuration. Unfortunately, you still need to instantiate logger instance at the application-level. This makes it more suitable for application-level logging just like Winston and Bunyan.
+
+I needed a logger that:
+
+* Does not block the event cycle (=fast).
+* Does not require initialisation.
+* Produces structured data.
+* [Decouples transports](#transports).
+* Has a [CLI program](#cli-program).
+* Works in Node.js and browser.
+* Configurable using environment variables.
+
+In other words,
+
+* a logger that I can use in an application code and in dependencies.
+* a logger that allows to correlate logs between the main application code and the dependency code.
+* a logger that works well with transports in external processes.
+
+Roarr is this logger.
+
+<a name="roarr-usage"></a>
+## Usage
+
+<a name="roarr-usage-producing-logs"></a>
+### Producing logs
+
+Roarr logger API for producing logs is the same in Node.js and browser.
+
+1. Import `roarr`
+2. Use any of the [API](#api) methods to log messages.
+
+Example:
+
+```js
+import log from 'roarr';
+
+log('foo');
+
+```
+
+<a name="roarr-usage-consuming-logs"></a>
+### Consuming logs
+
+Roarr logs are consumed differently in Node.js and browser.
+
+<a name="roarr-usage-consuming-logs-node-js"></a>
+#### Node.js
+
+In Node.js, Roarr logging is disabled by default. To enable logging, you must start program with an environment variable `ROARR_LOG` set to `true`, e.g.
+
+```bash
+ROARR_LOG=true node ./index.js
+
+```
+
+All logs will be written to stdout.
+
+<a name="roarr-usage-consuming-logs-browser"></a>
+#### Browser
+
+In a browser, you must implement `ROARR.write` method to read logs, e.g.
+
+```js
+import {
+ ROARR,
+} from 'roarr';
+
+ROARR.write = () => {};
+
+```
+
+The API of the `ROARR.write` is:
+
+```js
+(message: string) => void;
+
+```
+
+Example implementation:
+
+```js
+import {
+ ROARR,
+} from 'roarr';
+
+ROARR.write = (message) => {
+ console.log(JSON.parse(message));
+};
+
+```
+
+or if you are initializing `ROARR.write` _before_ `roarr` is loaded:
+
+```js
+// Ensure that `globalThis.ROARR` is configured.
+const ROARR = globalThis.ROARR = globalThis.ROARR || {};
+
+ROARR.write = (message) => {
+ console.log(JSON.parse(message));
+};
+
+```
+
+If your platform does not support [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis), use [`globalthis` polyfill](https://www.npmjs.com/package/globalthis).
+
+<a name="roarr-usage-filtering-logs"></a>
+### Filtering logs
+
+<a name="roarr-usage-filtering-logs-node-js-1"></a>
+#### Node.js
+
+In Node.js, Roarr prints all or none logs (refer to the [`ROARR_LOG` environment variable](#environment-variables) documentation).
+
+Use [`roarr filter` CLI program](#filter-program) to filter the logs that are written to stdout by the program, e.g.
+
+```bash
+ROARR_LOG=true node ./index.js | roarr filter '{"context.logLevel":{gt:30}}'
+
+```
+
+Alternatively, use a JSON processor such as [jq](https://stedolan.github.io/jq/)
+
+<a name="roarr-usage-filtering-logs-browser-1"></a>
+#### Browser
+
+In a browser, Roarr calls `globalThis.ROARR.write` for every log message. Implement your own custom logic to filter logs, e.g.
+
+```js
+globalThis.ROARR.write = (message) => {
+ const payload = JSON.parse(message);
+
+ if (payload.context.logLevel > 30) {
+ console.log(payload);
+ }
+};
+
+```
+
+<a name="roarr-log-message-format"></a>
+## Log message format
+
+|Property name|Contents|
+|---|---|
+|`context`|Arbitrary, user-provided structured data. See [context property names](#context-property-names).|
+|`message`|User-provided message formatted using [printf](https://en.wikipedia.org/wiki/Printf_format_string).|
+|`sequence`|An incremental ID.|
+|`time`|Unix timestamp in milliseconds.|
+|`version`|Roarr log message format version.|
+
+Example:
+
+```js
+{
+ "context": {
+ "application": "task-runner",
+ "hostname": "curiosity.local",
+ "instanceId": "01BVBK4ZJQ182ZWF6FK4EC8FEY",
+ "taskId": 1
+ },
+ "message": "starting task ID 1",
+ "sequence": 0,
+ "time": 1506776210000,
+ "version": "1.0.0"
+}
+
+```
+
+<a name="roarr-api"></a>
+## API
+
+`roarr` package exports a function with the following API:
+
+```js
+export type LoggerType =
+ (
+ context: MessageContextType,
+ message: string,
+ c?: SprintfArgumentType,
+ d?: SprintfArgumentType,
+ e?: SprintfArgumentType,
+ f?: SprintfArgumentType,
+ g?: SprintfArgumentType,
+ h?: SprintfArgumentType,
+ i?: SprintfArgumentType,
+ k?: SprintfArgumentType
+ ) => void |
+ (
+ message: string,
+ b?: SprintfArgumentType,
+ c?: SprintfArgumentType,
+ d?: SprintfArgumentType,
+ e?: SprintfArgumentType,
+ f?: SprintfArgumentType,
+ g?: SprintfArgumentType,
+ h?: SprintfArgumentType,
+ i?: SprintfArgumentType,
+ k?: SprintfArgumentType
+ ) => void;
+
+```
+
+To put it into words:
+
+* First parameter can be either a string (message) or an object.
+ * If first parameter is an object (context), the second parameter must be a string (message).
+* Arguments after the message parameter are used to enable [printf message formatting](https://en.wikipedia.org/wiki/Printf_format_string).
+ * Printf arguments must be of a primitive type (`string | number | boolean | null`).
+ * There can be up to 9 printf arguments (or 8 if the first parameter is the context object).
+
+Refer to the [Usage documentation](#usage) for common usage examples.
+
+<a name="roarr-api-adopt"></a>
+### <code>adopt</code>
+
+```js
+<T>(routine: () => Promise<T>, context: MessageContextType) => Promise<T>,
+
+```
+
+`adopt` function uses Node.js [`domain`](https://nodejs.org/api/domain.html) to pass-down context properties.
+
+When using `adopt`, context properties will be added to all _all_ Roarr messages within the same asynchronous context, e.g.
+
+```js
+await log.adopt(
+ async () => {
+ log('foo 0');
+
+ await log.adopt(
+ () => {
+ log('foo 1');
+ },
+ {
+ baz: 'baz 1',
+ },
+ );
+ },
+ {
+ bar: 'bar 0',
+ },
+);
+
+// {"context":{"bar":"bar 0"},"message":"foo 0","sequence":0,"time":1531914656076,"version":"1.0.0"}
+// {"context":{"bar":"bar 0","baz":"baz 1"},"message":"foo 1","sequence":1,"time":1531914656077,"version":"1.0.0"}]
+
+```
+
+<a name="roarr-api-adopt-requirements"></a>
+#### Requirements
+
+* `adopt` method only works in Node.js.
+* You must shim Node.js using [`domain-parent`](https://github.com/gajus/domain-parent).
+
+<a name="roarr-api-child"></a>
+### <code>child</code>
+
+```js
+(context: TranslateMessageFunctionType | MessageContextType) => LoggerType,
+
+```
+
+The `child` function has two signatures:
+
+1. Accepts an object.
+2. Accepts a function.
+
+<a name="roarr-api-child-object-parameter"></a>
+#### Object parameter
+
+```js
+(context: MessageContextType) => LoggerType;
+
+```
+
+Creates a child logger appending the provided `context` object to the previous logger context.
+
+Example:
+
+```js
+import log from 'roarr';
+
+const childLog = log.child({
+ foo: 'bar'
+});
+
+log.debug('foo 1');
+childLog.debug('foo 2');
+
+// {"context":{"logLevel":20},"message":"foo 1","sequence":0,"time":1531914529921,"version":"1.0.0"}
+// {"context":{"foo":"bar","logLevel":20},"message":"foo 2","sequence":1,"time":1531914529922,"version":"1.0.0"}
+
+```
+
+Refer to [middlewares](#middlewares) documentation for use case examples.
+
+<a name="roarr-api-child-function-parameter"></a>
+#### Function parameter
+
+```js
+(translateMessage: TranslateMessageFunctionType) => LoggerType;
+
+```
+
+Creates a child logger where every message is intercepted.
+
+Example:
+
+```js
+import log from 'roarr';
+
+const childLog = log.child((message) => {
+ return {
+ ...message,
+ message: message.message.replace('foo', 'bar'),
+ }
+});
+
+log.debug('foo 1');
+childLog.debug('foo 2');
+
+// {"context":{"logLevel":20},"message":"foo 1","sequence":0,"time":1531914656076,"version":"1.0.0"}
+// {"context":{"logLevel":20},"message":"bar 2","sequence":1,"time":1531914656077,"version":"1.0.0"}
+
+```
+
+<a name="roarr-api-getcontext"></a>
+### <code>getContext</code>
+
+Returns the current context.
+
+Example:
+
+```js
+import log from 'roarr';
+
+const childLogger = log.child({
+ foo: 'bar'
+});
+
+childLogger.getContext();
+
+// {foo: 'bar'}
+
+```
+
+<a name="roarr-api-trace"></a>
+### <code>trace</code>
+<a name="roarr-api-debug"></a>
+### <code>debug</code>
+<a name="roarr-api-info"></a>
+### <code>info</code>
+<a name="roarr-api-warn"></a>
+### <code>warn</code>
+<a name="roarr-api-error"></a>
+### <code>error</code>
+<a name="roarr-api-fatal"></a>
+### <code>fatal</code>
+
+Convenience methods for logging a message with `logLevel` context property value set to a numeric value representing the [log level](#log-levels), e.g.
+
+```js
+import log from 'roarr';
+
+log.trace('foo');
+log.debug('foo');
+log.info('foo');
+log.warn('foo');
+log.error('foo');
+log.fatal('foo');
+
+```
+
+Produces output:
+
+```
+{"context":{"logLevel":10},"message":"foo","sequence":0,"time":1506776210000,"version":"1.0.0"}
+{"context":{"logLevel":20},"message":"foo","sequence":1,"time":1506776210000,"version":"1.0.0"}
+{"context":{"logLevel":30},"message":"foo","sequence":2,"time":1506776210000,"version":"1.0.0"}
+{"context":{"logLevel":40},"message":"foo","sequence":3,"time":1506776210000,"version":"1.0.0"}
+{"context":{"logLevel":50},"message":"foo","sequence":4,"time":1506776210000,"version":"1.0.0"}
+{"context":{"logLevel":60},"message":"foo","sequence":5,"time":1506776210000,"version":"1.0.0"}
+
+```
+
+<a name="roarr-middlewares"></a>
+## Middlewares
+
+Roarr logger supports middlewares implemented as [`child`](#child) message translate functions, e.g.
+
+```js
+import log from 'roarr';
+import createSerializeErrorMiddleware from '@roarr/middleware-serialize-error';
+
+const childLog = log.child(createSerializeErrorMiddleware());
+
+const error = new Error('foo');
+
+log.debug({error}, 'bar');
+childLog.debug({error}, 'bar');
+
+// {"context":{"logLevel":20,"error":{}},"message":"bar","sequence":0,"time":1531918373676,"version":"1.0.0"}
+// {"context":{"logLevel":20,"error":{"name":"Error","message":"foo","stack":"[REDACTED]"}},"message":"bar","sequence":1,"time":1531918373678,"version":"1.0.0"}
+
+```
+
+Roarr middlwares enable translation of every bit of information that is used to construct a log message.
+
+The following are the official middlewares:
+
+* [`@roarr/middleware-serialize-error`](https://github.com/gajus/roarr-middleware-serialize-error)
+
+Raise an issue to add your middleware of your own creation.
+
+<a name="roarr-cli-program"></a>
+## CLI program
+
+Roarr CLI program provides ability to filter and pretty-print Roarr logs.
+
+![CLI output demo](./.README/cli-output-demo.png)
+
+CLI program has been moved to a separate package [`@roarr/cli`](https://github.com/gajus/roarr-cli).
+
+```bash
+npm install @roarr/cli -g
+
+```
+
+Explore all CLI commands and options using `roarr --help` or refer to [`@roarr/cli`](https://github.com/gajus/roarr-cli) documentation.
+
+<a name="roarr-transports"></a>
+## Transports
+
+A transport in most logging libraries is something that runs in-process to perform some operation with the finalised log line. For example, a transport might send the log line to a standard syslog server after processing the log line and reformatting it.
+
+Roarr does not support in-process transports.
+
+Roarr does not support in-process transports because Node processes are single threaded processes (ignoring some technical details). Given this restriction, Roarr purposefully offloads handling of the logs to external processes so that the threading capabilities of the OS can be used (or other CPUs).
+
+Depending on your configuration, consider one of the following log transports:
+
+* [Beats](https://www.elastic.co/products/beats) for aggregating at a process level (written in Go).
+* [logagent](https://github.com/sematext/logagent-js) for aggregating at a process level (written in JavaScript).
+* [Fluentd](https://www.fluentd.org/) for aggregating logs at a container orchestration level (e.g. Kubernetes) (written in Ruby).
+
+<a name="roarr-node-js-environment-variables"></a>
+## Node.js environment variables
+
+Use environment variables to control `roarr` behaviour.
+
+|Name|Type|Function|Default|
+|---|---|---|---|
+|`ROARR_LOG`|Boolean|Enables/ disables logging.|`false`|
+|`ROARR_STREAM`|`STDOUT`, `STDERR`|Name of the stream where the logs will be written.|`STDOUT`|
+
+When using `ROARR_STREAM=STDERR`, use [`3>&1 1>&2 2>&3 3>&-`](https://stackoverflow.com/a/2381643/368691) to pipe stderr output.
+
+<a name="roarr-conventions"></a>
+## Conventions
+
+<a name="roarr-conventions-context-property-names"></a>
+### Context property names
+
+Roarr does not have reserved context property names. However, I encourage use of the following conventions:
+
+|Context property name|Use case|
+|---|---|
+|`application`|Name of the application (do not use in code intended for distribution; see `package` property instead).|
+|`logLevel`|A numeric value indicating the [log level](#log-levels). See [API](#api) for the build-in loggers with a pre-set log-level.|
+|`namespace`|Namespace within a package, e.g. function name. Treat the same way that you would construct namespaces when using the [`debug`](https://github.com/visionmedia/debug) package.|
+|`package`|Name of the NPM package.|
+
+The `roarr pretty-print` [CLI program](#cli-program) is using the context property names suggested in the conventions to pretty-print the logs for the developer inspection purposes.
+
+<a name="roarr-conventions-context-property-names-log-levels"></a>
+#### Log levels
+
+The `roarr pretty-print` [CLI program](#cli-program) translates `logLevel` values to the following human-readable names:
+
+|`logLevel`|Human-readable name|
+|---|---|
+|10|TRACE|
+|20|DEBUG|
+|30|INFO|
+|40|WARN|
+|50|ERROR|
+|60|FATAL|
+
+<a name="roarr-conventions-using-roarr-in-an-application"></a>
+### Using Roarr in an application
+
+To avoid code duplication, you can use a singleton pattern to export a logger instance with predefined context properties (e.g. describing the application).
+
+I recommend to create a file `Logger.js` in the project directory. Inside this file create and export a child instance of Roarr with context parameters describing the project and the script instance, e.g.
+
+```js
+/**
+ * @file Example contents of a Logger.js file.
+ */
+
+import log from 'roarr';
+
+const Logger = log.child({
+ // .foo property is going to appear only in the logs that are created using
+ // the current instance of a Roarr logger.
+ foo: 'bar'
+});
+
+export default Logger;
+
+```
+
+Roarr does not have reserved context property names. However, I encourage use of the [conventions](#conventions).
+
+<a name="roarr-recipes"></a>
+## Recipes
+
+<a name="roarr-recipes-logging-errors"></a>
+### Logging errors
+
+This is not specific to Roarr – this suggestion applies to any kind of logging.
+
+If you want to include an instance of [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) in the context, you must serialize the error.
+
+The least-error prone way to do this is to use an existing library, e.g. [`serialize-error`](https://www.npmjs.com/package/serialize-error).
+
+```js
+import log from 'roarr';
+import serializeError from 'serialize-error';
+
+// [..]
+
+send((error, result) => {
+ if (error) {
+ log.error({
+ error: serializeError(error)
+ }, 'message not sent due to a remote error');
+
+ return;
+ }
+
+ // [..]
+});
+
+```
+
+Without using serialisation, your errors will be logged without the error name and stack trace.
+
+<a name="roarr-recipes-using-with-elasticsearch"></a>
+### Using with Elasticsearch
+
+If you are using [Elasticsearch](https://www.elastic.co/products/elasticsearch), you will want to create an [index template](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html).
+
+The following serves as the ground work for the index template. It includes the main Roarr log message properties (context, message, time) and the context properties suggested in the [conventions](#conventions).
+
+```json
+{
+ "mappings": {
+ "log_message": {
+ "_source": {
+ "enabled": true
+ },
+ "dynamic": "strict",
+ "properties": {
+ "context": {
+ "dynamic": true,
+ "properties": {
+ "application": {
+ "type": "keyword"
+ },
+ "hostname": {
+ "type": "keyword"
+ },
+ "instanceId": {
+ "type": "keyword"
+ },
+ "logLevel": {
+ "type": "integer"
+ },
+ "namespace": {
+ "type": "text"
+ },
+ "package": {
+ "type": "text"
+ }
+ }
+ },
+ "message": {
+ "type": "text"
+ },
+ "time": {
+ "format": "epoch_millis",
+ "type": "date"
+ }
+ }
+ }
+ },
+ "template": "logstash-*"
+}
+
+```
+
+<a name="roarr-recipes-using-with-scalyr"></a>
+### Using with Scalyr
+
+If you are using [Scalyr](https://www.scalyr.com/), you will want to create a custom parser `RoarrLogger`:
+
+```js
+{
+ patterns: {
+ tsPattern: "\\w{3},\\s\\d{2}\\s\\w{3}\\s\\d{4}\\s[\\d:]+",
+ tsPattern_8601: "\\d{4}-\\d{2}-\\d{2}T[\\d:.]+Z"
+ }
+ formats: [
+ {format: "${parse=json}$"},
+ {format: ".*\"time\":$timestamp=number$,.*"},
+ {format: "$timestamp=tsPattern$ GMT $detail$"},
+ {format: "$timestamp=tsPattern_8601$ $detail$"}
+ ]
+}
+
+```
+
+and configure the individual programs to use `RoarrLogger`. In case of Kubernetes, this means adding a `log.config.scalyr.com/attributes.parser: RoarrLogger` annotation to the associated deployment, pod or container.
+
+<a name="roarr-recipes-documenting-use-of-roarr"></a>
+### Documenting use of Roarr
+
+If your package is using Roarr, include instructions in `README.md` describing how to enable logging, e.g.
+
+```md
+## Logging
+
+This package is using [`roarr`](https://www.npmjs.com/package/roarr) logger to log the program's state.
+
+Export `ROARR_LOG=true` environment variable to enable log printing to stdout.
+
+Use [`roarr-cli`](https://github.com/gajus/roarr-cli) program to pretty-print the logs.
+
+```
diff --git a/node_modules/roarr/dist/constants.js b/node_modules/roarr/dist/constants.js
new file mode 100644
index 0000000..799cf55
--- /dev/null
+++ b/node_modules/roarr/dist/constants.js
@@ -0,0 +1,16 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.logLevels = void 0;
+const logLevels = {
+ debug: 20,
+ error: 50,
+ fatal: 60,
+ info: 30,
+ trace: 10,
+ warn: 40
+};
+exports.logLevels = logLevels;
+//# sourceMappingURL=constants.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/constants.js.flow b/node_modules/roarr/dist/constants.js.flow
new file mode 100644
index 0000000..59116ad
--- /dev/null
+++ b/node_modules/roarr/dist/constants.js.flow
@@ -0,0 +1,10 @@
+// @flow
+
+export const logLevels = {
+ debug: 20,
+ error: 50,
+ fatal: 60,
+ info: 30,
+ trace: 10,
+ warn: 40,
+};
diff --git a/node_modules/roarr/dist/constants.js.map b/node_modules/roarr/dist/constants.js.map
new file mode 100644
index 0000000..dc45d21
--- /dev/null
+++ b/node_modules/roarr/dist/constants.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/constants.js"],"names":["logLevels","debug","error","fatal","info","trace","warn"],"mappings":";;;;;;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,KAAK,EAAE,EADgB;AAEvBC,EAAAA,KAAK,EAAE,EAFgB;AAGvBC,EAAAA,KAAK,EAAE,EAHgB;AAIvBC,EAAAA,IAAI,EAAE,EAJiB;AAKvBC,EAAAA,KAAK,EAAE,EALgB;AAMvBC,EAAAA,IAAI,EAAE;AANiB,CAAlB","sourcesContent":["// @flow\n\nexport const logLevels = {\n debug: 20,\n error: 50,\n fatal: 60,\n info: 30,\n trace: 10,\n warn: 40,\n};\n"],"file":"constants.js"} \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createLogger.js b/node_modules/roarr/dist/factories/createLogger.js
new file mode 100644
index 0000000..3936101
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createLogger.js
@@ -0,0 +1,192 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _detectNode = _interopRequireDefault(require("detect-node"));
+
+var _globalthis = _interopRequireDefault(require("globalthis"));
+
+var _jsonStringifySafe = _interopRequireDefault(require("json-stringify-safe"));
+
+var _sprintfJs = require("sprintf-js");
+
+var _constants = require("../constants");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+const globalThis = (0, _globalthis.default)();
+let domain;
+
+if (_detectNode.default) {
+ // eslint-disable-next-line global-require
+ domain = require('domain');
+}
+
+const getParentDomainContext = () => {
+ if (!domain) {
+ return {};
+ }
+
+ const parentRoarrContexts = [];
+ let currentDomain = process.domain; // $FlowFixMe
+
+ if (!currentDomain || !currentDomain.parentDomain) {
+ return {};
+ }
+
+ while (currentDomain && currentDomain.parentDomain) {
+ currentDomain = currentDomain.parentDomain;
+
+ if (currentDomain.roarr && currentDomain.roarr.context) {
+ parentRoarrContexts.push(currentDomain.roarr.context);
+ }
+ }
+
+ let domainContext = {};
+
+ for (const parentRoarrContext of parentRoarrContexts) {
+ domainContext = _objectSpread(_objectSpread({}, domainContext), parentRoarrContext);
+ }
+
+ return domainContext;
+};
+
+const getFirstParentDomainContext = () => {
+ if (!domain) {
+ return {};
+ }
+
+ let currentDomain = process.domain; // $FlowFixMe
+
+ if (currentDomain && currentDomain.roarr && currentDomain.roarr.context) {
+ return currentDomain.roarr.context;
+ } // $FlowFixMe
+
+
+ if (!currentDomain || !currentDomain.parentDomain) {
+ return {};
+ }
+
+ while (currentDomain && currentDomain.parentDomain) {
+ currentDomain = currentDomain.parentDomain;
+
+ if (currentDomain.roarr && currentDomain.roarr.context) {
+ return currentDomain.roarr.context;
+ }
+ }
+
+ return {};
+};
+
+const createLogger = (onMessage, parentContext) => {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations
+ const log = (a, b, c, d, e, f, g, h, i, k) => {
+ const time = Date.now();
+ const sequence = globalThis.ROARR.sequence++;
+ let context;
+ let message;
+
+ if (typeof a === 'string') {
+ context = _objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext || {}); // eslint-disable-next-line id-length, object-property-newline
+
+ const args = _extends({}, {
+ a,
+ b,
+ c,
+ d,
+ e,
+ f,
+ g,
+ h,
+ i,
+ k
+ });
+
+ const values = Object.keys(args).map(key => {
+ return args[key];
+ }); // eslint-disable-next-line unicorn/no-reduce
+
+ const hasOnlyOneParameterValued = 1 === values.reduce((accumulator, value) => {
+ // eslint-disable-next-line no-return-assign, no-param-reassign
+ return accumulator += typeof value === 'undefined' ? 0 : 1;
+ }, 0);
+ message = hasOnlyOneParameterValued ? (0, _sprintfJs.sprintf)('%s', a) : (0, _sprintfJs.sprintf)(a, b, c, d, e, f, g, h, i, k);
+ } else {
+ if (typeof b !== 'string') {
+ throw new TypeError('Message must be a string.');
+ }
+
+ context = JSON.parse((0, _jsonStringifySafe.default)(_objectSpread(_objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext || {}), a)));
+ message = (0, _sprintfJs.sprintf)(b, c, d, e, f, g, h, i, k);
+ }
+
+ onMessage({
+ context,
+ message,
+ sequence,
+ time,
+ version: '1.0.0'
+ });
+ };
+
+ log.child = context => {
+ if (typeof context === 'function') {
+ return createLogger(message => {
+ if (typeof context !== 'function') {
+ throw new TypeError('Unexpected state.');
+ }
+
+ onMessage(context(message));
+ }, parentContext);
+ }
+
+ return createLogger(onMessage, _objectSpread(_objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext), context));
+ };
+
+ log.getContext = () => {
+ return _objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext || {});
+ };
+
+ log.adopt = async (routine, context) => {
+ if (!domain) {
+ return routine();
+ }
+
+ const adoptedDomain = domain.create();
+ return adoptedDomain.run(() => {
+ // $FlowFixMe
+ adoptedDomain.roarr = {
+ context: _objectSpread(_objectSpread({}, getParentDomainContext()), context)
+ };
+ return routine();
+ });
+ };
+
+ for (const logLevel of Object.keys(_constants.logLevels)) {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations
+ log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {
+ return log.child({
+ logLevel: _constants.logLevels[logLevel]
+ })(a, b, c, d, e, f, g, h, i, k);
+ };
+ } // @see https://github.com/facebook/flow/issues/6705
+ // $FlowFixMe
+
+
+ return log;
+};
+
+var _default = createLogger;
+exports.default = _default;
+//# sourceMappingURL=createLogger.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createLogger.js.flow b/node_modules/roarr/dist/factories/createLogger.js.flow
new file mode 100644
index 0000000..4cd6c27
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createLogger.js.flow
@@ -0,0 +1,197 @@
+// @flow
+
+import environmentIsNode from 'detect-node';
+import createGlobalThis from 'globalthis';
+import stringify from 'json-stringify-safe';
+import {
+ sprintf,
+} from 'sprintf-js';
+import {
+ logLevels,
+} from '../constants';
+import type {
+ LoggerType,
+ MessageContextType,
+ MessageEventHandlerType,
+ TranslateMessageFunctionType,
+} from '../types';
+
+const globalThis = createGlobalThis();
+
+let domain;
+
+if (environmentIsNode) {
+ // eslint-disable-next-line global-require
+ domain = require('domain');
+}
+
+const getParentDomainContext = () => {
+ if (!domain) {
+ return {};
+ }
+
+ const parentRoarrContexts = [];
+
+ let currentDomain = process.domain;
+
+ // $FlowFixMe
+ if (!currentDomain || !currentDomain.parentDomain) {
+ return {};
+ }
+
+ while (currentDomain && currentDomain.parentDomain) {
+ currentDomain = currentDomain.parentDomain;
+
+ if (currentDomain.roarr && currentDomain.roarr.context) {
+ parentRoarrContexts.push(currentDomain.roarr.context);
+ }
+ }
+
+ let domainContext = {};
+
+ for (const parentRoarrContext of parentRoarrContexts) {
+ domainContext = {
+ ...domainContext,
+ ...parentRoarrContext,
+ };
+ }
+
+ return domainContext;
+};
+
+const getFirstParentDomainContext = () => {
+ if (!domain) {
+ return {};
+ }
+
+ let currentDomain = process.domain;
+
+ // $FlowFixMe
+ if (currentDomain && currentDomain.roarr && currentDomain.roarr.context) {
+ return currentDomain.roarr.context;
+ }
+
+ // $FlowFixMe
+ if (!currentDomain || !currentDomain.parentDomain) {
+ return {};
+ }
+
+ while (currentDomain && currentDomain.parentDomain) {
+ currentDomain = currentDomain.parentDomain;
+
+ if (currentDomain.roarr && currentDomain.roarr.context) {
+ return currentDomain.roarr.context;
+ }
+ }
+
+ return {};
+};
+
+const createLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations
+ const log = (a, b, c, d, e, f, g, h, i, k) => {
+ const time = Date.now();
+ const sequence = globalThis.ROARR.sequence++;
+
+ let context;
+ let message;
+
+ if (typeof a === 'string') {
+ context = {
+ ...getFirstParentDomainContext(),
+ ...parentContext || {},
+ };
+ // eslint-disable-next-line id-length, object-property-newline
+ const {...args} = {a, b, c, d, e, f, g, h, i, k};
+ const values = Object.keys(args).map((key) => {
+ return args[key];
+ });
+ // eslint-disable-next-line unicorn/no-reduce
+ const hasOnlyOneParameterValued = 1 === values.reduce((accumulator, value) => {
+ // eslint-disable-next-line no-return-assign, no-param-reassign
+ return accumulator += typeof value === 'undefined' ? 0 : 1;
+ }, 0);
+ message = hasOnlyOneParameterValued ? sprintf('%s', a) : sprintf(a, b, c, d, e, f, g, h, i, k);
+ } else {
+ if (typeof b !== 'string') {
+ throw new TypeError('Message must be a string.');
+ }
+
+ context = JSON.parse(stringify({
+ ...getFirstParentDomainContext(),
+ ...parentContext || {},
+ ...a,
+ }));
+
+ message = sprintf(b, c, d, e, f, g, h, i, k);
+ }
+
+ onMessage({
+ context,
+ message,
+ sequence,
+ time,
+ version: '1.0.0',
+ });
+ };
+
+ log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => {
+ if (typeof context === 'function') {
+ return createLogger((message) => {
+ if (typeof context !== 'function') {
+ throw new TypeError('Unexpected state.');
+ }
+ onMessage(context(message));
+ }, parentContext);
+ }
+
+ return createLogger(onMessage, {
+ ...getFirstParentDomainContext(),
+ ...parentContext,
+ ...context,
+ });
+ };
+
+ log.getContext = (): MessageContextType => {
+ return {
+ ...getFirstParentDomainContext(),
+ ...parentContext || {},
+ };
+ };
+
+ log.adopt = async (routine, context) => {
+ if (!domain) {
+ return routine();
+ }
+
+ const adoptedDomain = domain.create();
+
+ return adoptedDomain
+ .run(() => {
+ // $FlowFixMe
+ adoptedDomain.roarr = {
+ context: {
+ ...getParentDomainContext(),
+ ...context,
+ },
+ };
+
+ return routine();
+ });
+ };
+
+ for (const logLevel of Object.keys(logLevels)) {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations
+ log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {
+ return log.child({
+ logLevel: logLevels[logLevel],
+ })(a, b, c, d, e, f, g, h, i, k);
+ };
+ }
+
+ // @see https://github.com/facebook/flow/issues/6705
+ // $FlowFixMe
+ return log;
+};
+
+export default createLogger;
diff --git a/node_modules/roarr/dist/factories/createLogger.js.map b/node_modules/roarr/dist/factories/createLogger.js.map
new file mode 100644
index 0000000..4c8854c
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createLogger.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/createLogger.js"],"names":["globalThis","domain","environmentIsNode","require","getParentDomainContext","parentRoarrContexts","currentDomain","process","parentDomain","roarr","context","push","domainContext","parentRoarrContext","getFirstParentDomainContext","createLogger","onMessage","parentContext","log","a","b","c","d","e","f","g","h","i","k","time","Date","now","sequence","ROARR","message","args","values","Object","keys","map","key","hasOnlyOneParameterValued","reduce","accumulator","value","TypeError","JSON","parse","version","child","getContext","adopt","routine","adoptedDomain","create","run","logLevel","logLevels"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;;;AAUA,MAAMA,UAAU,GAAG,0BAAnB;AAEA,IAAIC,MAAJ;;AAEA,IAAIC,mBAAJ,EAAuB;AACrB;AACAD,EAAAA,MAAM,GAAGE,OAAO,CAAC,QAAD,CAAhB;AACD;;AAED,MAAMC,sBAAsB,GAAG,MAAM;AACnC,MAAI,CAACH,MAAL,EAAa;AACX,WAAO,EAAP;AACD;;AAED,QAAMI,mBAAmB,GAAG,EAA5B;AAEA,MAAIC,aAAa,GAAGC,OAAO,CAACN,MAA5B,CAPmC,CASnC;;AACA,MAAI,CAACK,aAAD,IAAkB,CAACA,aAAa,CAACE,YAArC,EAAmD;AACjD,WAAO,EAAP;AACD;;AAED,SAAOF,aAAa,IAAIA,aAAa,CAACE,YAAtC,EAAoD;AAClDF,IAAAA,aAAa,GAAGA,aAAa,CAACE,YAA9B;;AAEA,QAAIF,aAAa,CAACG,KAAd,IAAuBH,aAAa,CAACG,KAAd,CAAoBC,OAA/C,EAAwD;AACtDL,MAAAA,mBAAmB,CAACM,IAApB,CAAyBL,aAAa,CAACG,KAAd,CAAoBC,OAA7C;AACD;AACF;;AAED,MAAIE,aAAa,GAAG,EAApB;;AAEA,OAAK,MAAMC,kBAAX,IAAiCR,mBAAjC,EAAsD;AACpDO,IAAAA,aAAa,mCACRA,aADQ,GAERC,kBAFQ,CAAb;AAID;;AAED,SAAOD,aAAP;AACD,CAhCD;;AAkCA,MAAME,2BAA2B,GAAG,MAAM;AACxC,MAAI,CAACb,MAAL,EAAa;AACX,WAAO,EAAP;AACD;;AAED,MAAIK,aAAa,GAAGC,OAAO,CAACN,MAA5B,CALwC,CAOxC;;AACA,MAAIK,aAAa,IAAIA,aAAa,CAACG,KAA/B,IAAwCH,aAAa,CAACG,KAAd,CAAoBC,OAAhE,EAAyE;AACvE,WAAOJ,aAAa,CAACG,KAAd,CAAoBC,OAA3B;AACD,GAVuC,CAYxC;;;AACA,MAAI,CAACJ,aAAD,IAAkB,CAACA,aAAa,CAACE,YAArC,EAAmD;AACjD,WAAO,EAAP;AACD;;AAED,SAAOF,aAAa,IAAIA,aAAa,CAACE,YAAtC,EAAoD;AAClDF,IAAAA,aAAa,GAAGA,aAAa,CAACE,YAA9B;;AAEA,QAAIF,aAAa,CAACG,KAAd,IAAuBH,aAAa,CAACG,KAAd,CAAoBC,OAA/C,EAAwD;AACtD,aAAOJ,aAAa,CAACG,KAAd,CAAoBC,OAA3B;AACD;AACF;;AAED,SAAO,EAAP;AACD,CA1BD;;AA4BA,MAAMK,YAAY,GAAG,CAACC,SAAD,EAAqCC,aAArC,KAAwF;AAC3G;AACA,QAAMC,GAAG,GAAG,CAACC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BC,CAA5B,KAAkC;AAC5C,UAAMC,IAAI,GAAGC,IAAI,CAACC,GAAL,EAAb;AACA,UAAMC,QAAQ,GAAGhC,UAAU,CAACiC,KAAX,CAAiBD,QAAjB,EAAjB;AAEA,QAAItB,OAAJ;AACA,QAAIwB,OAAJ;;AAEA,QAAI,OAAOf,CAAP,KAAa,QAAjB,EAA2B;AACzBT,MAAAA,OAAO,mCACFI,2BAA2B,EADzB,GAEFG,aAAa,IAAI,EAFf,CAAP,CADyB,CAKzB;;AACA,YAAUkB,IAAV,gBAAkB;AAAChB,QAAAA,CAAD;AAAIC,QAAAA,CAAJ;AAAOC,QAAAA,CAAP;AAAUC,QAAAA,CAAV;AAAaC,QAAAA,CAAb;AAAgBC,QAAAA,CAAhB;AAAmBC,QAAAA,CAAnB;AAAsBC,QAAAA,CAAtB;AAAyBC,QAAAA,CAAzB;AAA4BC,QAAAA;AAA5B,OAAlB;;AACA,YAAMQ,MAAM,GAAGC,MAAM,CAACC,IAAP,CAAYH,IAAZ,EAAkBI,GAAlB,CAAuBC,GAAD,IAAS;AAC5C,eAAOL,IAAI,CAACK,GAAD,CAAX;AACD,OAFc,CAAf,CAPyB,CAUzB;;AACA,YAAMC,yBAAyB,GAAG,MAAML,MAAM,CAACM,MAAP,CAAc,CAACC,WAAD,EAAcC,KAAd,KAAwB;AAC5E;AACA,eAAOD,WAAW,IAAI,OAAOC,KAAP,KAAiB,WAAjB,GAA+B,CAA/B,GAAmC,CAAzD;AACD,OAHuC,EAGrC,CAHqC,CAAxC;AAIAV,MAAAA,OAAO,GAAGO,yBAAyB,GAAG,wBAAQ,IAAR,EAActB,CAAd,CAAH,GAAsB,wBAAQA,CAAR,EAAWC,CAAX,EAAcC,CAAd,EAAiBC,CAAjB,EAAoBC,CAApB,EAAuBC,CAAvB,EAA0BC,CAA1B,EAA6BC,CAA7B,EAAgCC,CAAhC,EAAmCC,CAAnC,CAAzD;AACD,KAhBD,MAgBO;AACL,UAAI,OAAOR,CAAP,KAAa,QAAjB,EAA2B;AACzB,cAAM,IAAIyB,SAAJ,CAAc,2BAAd,CAAN;AACD;;AAEDnC,MAAAA,OAAO,GAAGoC,IAAI,CAACC,KAAL,CAAW,8EAChBjC,2BAA2B,EADX,GAEhBG,aAAa,IAAI,EAFD,GAGhBE,CAHgB,EAAX,CAAV;AAMAe,MAAAA,OAAO,GAAG,wBAAQd,CAAR,EAAWC,CAAX,EAAcC,CAAd,EAAiBC,CAAjB,EAAoBC,CAApB,EAAuBC,CAAvB,EAA0BC,CAA1B,EAA6BC,CAA7B,EAAgCC,CAAhC,CAAV;AACD;;AAEDZ,IAAAA,SAAS,CAAC;AACRN,MAAAA,OADQ;AAERwB,MAAAA,OAFQ;AAGRF,MAAAA,QAHQ;AAIRH,MAAAA,IAJQ;AAKRmB,MAAAA,OAAO,EAAE;AALD,KAAD,CAAT;AAOD,GA5CD;;AA8CA9B,EAAAA,GAAG,CAAC+B,KAAJ,GAAavC,OAAD,IAA4E;AACtF,QAAI,OAAOA,OAAP,KAAmB,UAAvB,EAAmC;AACjC,aAAOK,YAAY,CAAEmB,OAAD,IAAa;AAC/B,YAAI,OAAOxB,OAAP,KAAmB,UAAvB,EAAmC;AACjC,gBAAM,IAAImC,SAAJ,CAAc,mBAAd,CAAN;AACD;;AACD7B,QAAAA,SAAS,CAACN,OAAO,CAACwB,OAAD,CAAR,CAAT;AACD,OALkB,EAKhBjB,aALgB,CAAnB;AAMD;;AAED,WAAOF,YAAY,CAACC,SAAD,gDACdF,2BAA2B,EADb,GAEdG,aAFc,GAGdP,OAHc,EAAnB;AAKD,GAfD;;AAiBAQ,EAAAA,GAAG,CAACgC,UAAJ,GAAiB,MAA0B;AACzC,2CACKpC,2BAA2B,EADhC,GAEKG,aAAa,IAAI,EAFtB;AAID,GALD;;AAOAC,EAAAA,GAAG,CAACiC,KAAJ,GAAY,OAAOC,OAAP,EAAgB1C,OAAhB,KAA4B;AACtC,QAAI,CAACT,MAAL,EAAa;AACX,aAAOmD,OAAO,EAAd;AACD;;AAED,UAAMC,aAAa,GAAGpD,MAAM,CAACqD,MAAP,EAAtB;AAEA,WAAOD,aAAa,CACjBE,GADI,CACA,MAAM;AACT;AACAF,MAAAA,aAAa,CAAC5C,KAAd,GAAsB;AACpBC,QAAAA,OAAO,kCACFN,sBAAsB,EADpB,GAEFM,OAFE;AADa,OAAtB;AAOA,aAAO0C,OAAO,EAAd;AACD,KAXI,CAAP;AAYD,GAnBD;;AAqBA,OAAK,MAAMI,QAAX,IAAuBnB,MAAM,CAACC,IAAP,CAAYmB,oBAAZ,CAAvB,EAA+C;AAC7C;AACAvC,IAAAA,GAAG,CAACsC,QAAD,CAAH,GAAgB,CAACrC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BC,CAA5B,KAAkC;AAChD,aAAOV,GAAG,CAAC+B,KAAJ,CAAU;AACfO,QAAAA,QAAQ,EAAEC,qBAAUD,QAAV;AADK,OAAV,EAEJrC,CAFI,EAEDC,CAFC,EAEEC,CAFF,EAEKC,CAFL,EAEQC,CAFR,EAEWC,CAFX,EAEcC,CAFd,EAEiBC,CAFjB,EAEoBC,CAFpB,EAEuBC,CAFvB,CAAP;AAGD,KAJD;AAKD,GApG0G,CAsG3G;AACA;;;AACA,SAAOV,GAAP;AACD,CAzGD;;eA2GeH,Y","sourcesContent":["// @flow\n\nimport environmentIsNode from 'detect-node';\nimport createGlobalThis from 'globalthis';\nimport stringify from 'json-stringify-safe';\nimport {\n sprintf,\n} from 'sprintf-js';\nimport {\n logLevels,\n} from '../constants';\nimport type {\n LoggerType,\n MessageContextType,\n MessageEventHandlerType,\n TranslateMessageFunctionType,\n} from '../types';\n\nconst globalThis = createGlobalThis();\n\nlet domain;\n\nif (environmentIsNode) {\n // eslint-disable-next-line global-require\n domain = require('domain');\n}\n\nconst getParentDomainContext = () => {\n if (!domain) {\n return {};\n }\n\n const parentRoarrContexts = [];\n\n let currentDomain = process.domain;\n\n // $FlowFixMe\n if (!currentDomain || !currentDomain.parentDomain) {\n return {};\n }\n\n while (currentDomain && currentDomain.parentDomain) {\n currentDomain = currentDomain.parentDomain;\n\n if (currentDomain.roarr && currentDomain.roarr.context) {\n parentRoarrContexts.push(currentDomain.roarr.context);\n }\n }\n\n let domainContext = {};\n\n for (const parentRoarrContext of parentRoarrContexts) {\n domainContext = {\n ...domainContext,\n ...parentRoarrContext,\n };\n }\n\n return domainContext;\n};\n\nconst getFirstParentDomainContext = () => {\n if (!domain) {\n return {};\n }\n\n let currentDomain = process.domain;\n\n // $FlowFixMe\n if (currentDomain && currentDomain.roarr && currentDomain.roarr.context) {\n return currentDomain.roarr.context;\n }\n\n // $FlowFixMe\n if (!currentDomain || !currentDomain.parentDomain) {\n return {};\n }\n\n while (currentDomain && currentDomain.parentDomain) {\n currentDomain = currentDomain.parentDomain;\n\n if (currentDomain.roarr && currentDomain.roarr.context) {\n return currentDomain.roarr.context;\n }\n }\n\n return {};\n};\n\nconst createLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations\n const log = (a, b, c, d, e, f, g, h, i, k) => {\n const time = Date.now();\n const sequence = globalThis.ROARR.sequence++;\n\n let context;\n let message;\n\n if (typeof a === 'string') {\n context = {\n ...getFirstParentDomainContext(),\n ...parentContext || {},\n };\n // eslint-disable-next-line id-length, object-property-newline\n const {...args} = {a, b, c, d, e, f, g, h, i, k};\n const values = Object.keys(args).map((key) => {\n return args[key];\n });\n // eslint-disable-next-line unicorn/no-reduce\n const hasOnlyOneParameterValued = 1 === values.reduce((accumulator, value) => {\n // eslint-disable-next-line no-return-assign, no-param-reassign\n return accumulator += typeof value === 'undefined' ? 0 : 1;\n }, 0);\n message = hasOnlyOneParameterValued ? sprintf('%s', a) : sprintf(a, b, c, d, e, f, g, h, i, k);\n } else {\n if (typeof b !== 'string') {\n throw new TypeError('Message must be a string.');\n }\n\n context = JSON.parse(stringify({\n ...getFirstParentDomainContext(),\n ...parentContext || {},\n ...a,\n }));\n\n message = sprintf(b, c, d, e, f, g, h, i, k);\n }\n\n onMessage({\n context,\n message,\n sequence,\n time,\n version: '1.0.0',\n });\n };\n\n log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => {\n if (typeof context === 'function') {\n return createLogger((message) => {\n if (typeof context !== 'function') {\n throw new TypeError('Unexpected state.');\n }\n onMessage(context(message));\n }, parentContext);\n }\n\n return createLogger(onMessage, {\n ...getFirstParentDomainContext(),\n ...parentContext,\n ...context,\n });\n };\n\n log.getContext = (): MessageContextType => {\n return {\n ...getFirstParentDomainContext(),\n ...parentContext || {},\n };\n };\n\n log.adopt = async (routine, context) => {\n if (!domain) {\n return routine();\n }\n\n const adoptedDomain = domain.create();\n\n return adoptedDomain\n .run(() => {\n // $FlowFixMe\n adoptedDomain.roarr = {\n context: {\n ...getParentDomainContext(),\n ...context,\n },\n };\n\n return routine();\n });\n };\n\n for (const logLevel of Object.keys(logLevels)) {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations\n log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {\n return log.child({\n logLevel: logLevels[logLevel],\n })(a, b, c, d, e, f, g, h, i, k);\n };\n }\n\n // @see https://github.com/facebook/flow/issues/6705\n // $FlowFixMe\n return log;\n};\n\nexport default createLogger;\n"],"file":"createLogger.js"} \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createMockLogger.js b/node_modules/roarr/dist/factories/createMockLogger.js
new file mode 100644
index 0000000..b25a37b
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createMockLogger.js
@@ -0,0 +1,44 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _constants = require("../constants");
+
+const createMockLogger = (onMessage, parentContext) => {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations, no-unused-vars
+ const log = (a, b, c, d, e, f, g, h, i, k) => {//
+ };
+
+ log.adopt = async routine => {
+ return routine();
+ }; // eslint-disable-next-line no-unused-vars
+
+
+ log.child = context => {
+ return createMockLogger(onMessage, parentContext);
+ };
+
+ log.getContext = () => {
+ return {};
+ };
+
+ for (const logLevel of Object.keys(_constants.logLevels)) {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations
+ log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {
+ return log.child({
+ logLevel: _constants.logLevels[logLevel]
+ })(a, b, c, d, e, f, g, h, i, k);
+ };
+ } // @see https://github.com/facebook/flow/issues/6705
+ // $FlowFixMe
+
+
+ return log;
+};
+
+var _default = createMockLogger;
+exports.default = _default;
+//# sourceMappingURL=createMockLogger.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createMockLogger.js.flow b/node_modules/roarr/dist/factories/createMockLogger.js.flow
new file mode 100644
index 0000000..37e0912
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createMockLogger.js.flow
@@ -0,0 +1,46 @@
+// @flow
+
+import {
+ logLevels,
+} from '../constants';
+import type {
+ LoggerType,
+ MessageContextType,
+ MessageEventHandlerType,
+ TranslateMessageFunctionType,
+} from '../types';
+
+const createMockLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations, no-unused-vars
+ const log = (a, b, c, d, e, f, g, h, i, k) => {
+ //
+ };
+
+ log.adopt = async (routine) => {
+ return routine();
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => {
+ return createMockLogger(onMessage, parentContext);
+ };
+
+ log.getContext = (): MessageContextType => {
+ return {};
+ };
+
+ for (const logLevel of Object.keys(logLevels)) {
+ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations
+ log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {
+ return log.child({
+ logLevel: logLevels[logLevel],
+ })(a, b, c, d, e, f, g, h, i, k);
+ };
+ }
+
+ // @see https://github.com/facebook/flow/issues/6705
+ // $FlowFixMe
+ return log;
+};
+
+export default createMockLogger;
diff --git a/node_modules/roarr/dist/factories/createMockLogger.js.map b/node_modules/roarr/dist/factories/createMockLogger.js.map
new file mode 100644
index 0000000..a57fe4f
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createMockLogger.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/createMockLogger.js"],"names":["createMockLogger","onMessage","parentContext","log","a","b","c","d","e","f","g","h","i","k","adopt","routine","child","context","getContext","logLevel","Object","keys","logLevels"],"mappings":";;;;;;;AAEA;;AAUA,MAAMA,gBAAgB,GAAG,CAACC,SAAD,EAAqCC,aAArC,KAAwF;AAC/G;AACA,QAAMC,GAAG,GAAG,CAACC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BC,CAA5B,KAAkC,CAC5C;AACD,GAFD;;AAIAV,EAAAA,GAAG,CAACW,KAAJ,GAAY,MAAOC,OAAP,IAAmB;AAC7B,WAAOA,OAAO,EAAd;AACD,GAFD,CAN+G,CAU/G;;;AACAZ,EAAAA,GAAG,CAACa,KAAJ,GAAaC,OAAD,IAA4E;AACtF,WAAOjB,gBAAgB,CAACC,SAAD,EAAYC,aAAZ,CAAvB;AACD,GAFD;;AAIAC,EAAAA,GAAG,CAACe,UAAJ,GAAiB,MAA0B;AACzC,WAAO,EAAP;AACD,GAFD;;AAIA,OAAK,MAAMC,QAAX,IAAuBC,MAAM,CAACC,IAAP,CAAYC,oBAAZ,CAAvB,EAA+C;AAC7C;AACAnB,IAAAA,GAAG,CAACgB,QAAD,CAAH,GAAgB,CAACf,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BC,CAA5B,KAAkC;AAChD,aAAOV,GAAG,CAACa,KAAJ,CAAU;AACfG,QAAAA,QAAQ,EAAEG,qBAAUH,QAAV;AADK,OAAV,EAEJf,CAFI,EAEDC,CAFC,EAEEC,CAFF,EAEKC,CAFL,EAEQC,CAFR,EAEWC,CAFX,EAEcC,CAFd,EAEiBC,CAFjB,EAEoBC,CAFpB,EAEuBC,CAFvB,CAAP;AAGD,KAJD;AAKD,GA1B8G,CA4B/G;AACA;;;AACA,SAAOV,GAAP;AACD,CA/BD;;eAiCeH,gB","sourcesContent":["// @flow\n\nimport {\n logLevels,\n} from '../constants';\nimport type {\n LoggerType,\n MessageContextType,\n MessageEventHandlerType,\n TranslateMessageFunctionType,\n} from '../types';\n\nconst createMockLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations, no-unused-vars\n const log = (a, b, c, d, e, f, g, h, i, k) => {\n //\n };\n\n log.adopt = async (routine) => {\n return routine();\n };\n\n // eslint-disable-next-line no-unused-vars\n log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => {\n return createMockLogger(onMessage, parentContext);\n };\n\n log.getContext = (): MessageContextType => {\n return {};\n };\n\n for (const logLevel of Object.keys(logLevels)) {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations\n log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {\n return log.child({\n logLevel: logLevels[logLevel],\n })(a, b, c, d, e, f, g, h, i, k);\n };\n }\n\n // @see https://github.com/facebook/flow/issues/6705\n // $FlowFixMe\n return log;\n};\n\nexport default createMockLogger;\n"],"file":"createMockLogger.js"} \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createNodeWriter.js b/node_modules/roarr/dist/factories/createNodeWriter.js
new file mode 100644
index 0000000..731020a
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createNodeWriter.js
@@ -0,0 +1,25 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+const createBlockingWriter = stream => {
+ return {
+ write: message => {
+ stream.write(message + '\n');
+ }
+ };
+};
+
+const createNodeWriter = () => {
+ // eslint-disable-next-line no-process-env
+ const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase();
+ const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr;
+ return createBlockingWriter(stream);
+};
+
+var _default = createNodeWriter;
+exports.default = _default;
+//# sourceMappingURL=createNodeWriter.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createNodeWriter.js.flow b/node_modules/roarr/dist/factories/createNodeWriter.js.flow
new file mode 100644
index 0000000..b03d9c3
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createNodeWriter.js.flow
@@ -0,0 +1,22 @@
+// @flow
+
+import type {
+ WriterType,
+} from '../types';
+
+const createBlockingWriter = (stream: stream$Writable): WriterType => {
+ return {
+ write: (message: string) => {
+ stream.write(message + '\n');
+ },
+ };
+};
+
+export default (): WriterType => {
+ // eslint-disable-next-line no-process-env
+ const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase();
+
+ const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr;
+
+ return createBlockingWriter(stream);
+};
diff --git a/node_modules/roarr/dist/factories/createNodeWriter.js.map b/node_modules/roarr/dist/factories/createNodeWriter.js.map
new file mode 100644
index 0000000..5f54e92
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createNodeWriter.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/createNodeWriter.js"],"names":["createBlockingWriter","stream","write","message","targetStream","process","env","ROARR_STREAM","toUpperCase","stdout","stderr"],"mappings":";;;;;;;AAMA,MAAMA,oBAAoB,GAAIC,MAAD,IAAyC;AACpE,SAAO;AACLC,IAAAA,KAAK,EAAGC,OAAD,IAAqB;AAC1BF,MAAAA,MAAM,CAACC,KAAP,CAAaC,OAAO,GAAG,IAAvB;AACD;AAHI,GAAP;AAKD,CAND;;+BAQiC;AAC/B;AACA,QAAMC,YAAY,GAAG,CAACC,OAAO,CAACC,GAAR,CAAYC,YAAZ,IAA4B,QAA7B,EAAuCC,WAAvC,EAArB;AAEA,QAAMP,MAAM,GAAGG,YAAY,CAACI,WAAb,OAA+B,QAA/B,GAA0CH,OAAO,CAACI,MAAlD,GAA2DJ,OAAO,CAACK,MAAlF;AAEA,SAAOV,oBAAoB,CAACC,MAAD,CAA3B;AACD,C","sourcesContent":["// @flow\n\nimport type {\n WriterType,\n} from '../types';\n\nconst createBlockingWriter = (stream: stream$Writable): WriterType => {\n return {\n write: (message: string) => {\n stream.write(message + '\\n');\n },\n };\n};\n\nexport default (): WriterType => {\n // eslint-disable-next-line no-process-env\n const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase();\n\n const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr;\n\n return createBlockingWriter(stream);\n};\n"],"file":"createNodeWriter.js"} \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js
new file mode 100644
index 0000000..7cc70bd
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js
@@ -0,0 +1,53 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _detectNode = _interopRequireDefault(require("detect-node"));
+
+var _semverCompare = _interopRequireDefault(require("semver-compare"));
+
+var _package = require("../../package.json");
+
+var _createNodeWriter = _interopRequireDefault(require("./createNodeWriter"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+// eslint-disable-next-line flowtype/no-weak-types
+const createRoarrInititialGlobalState = currentState => {
+ const versions = (currentState.versions || []).concat();
+ versions.sort(_semverCompare.default);
+ const currentIsLatestVersion = !versions.length || (0, _semverCompare.default)(_package.version, versions[versions.length - 1]) === 1;
+
+ if (!versions.includes(_package.version)) {
+ versions.push(_package.version);
+ }
+
+ versions.sort(_semverCompare.default);
+
+ let newState = _objectSpread(_objectSpread({
+ sequence: 0
+ }, currentState), {}, {
+ versions
+ });
+
+ if (_detectNode.default) {
+ if (currentIsLatestVersion || !newState.write) {
+ newState = _objectSpread(_objectSpread({}, newState), (0, _createNodeWriter.default)());
+ }
+ }
+
+ return newState;
+};
+
+var _default = createRoarrInititialGlobalState;
+exports.default = _default;
+//# sourceMappingURL=createRoarrInititialGlobalState.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow
new file mode 100644
index 0000000..15a1605
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow
@@ -0,0 +1,43 @@
+// @flow
+
+import environmentIsNode from 'detect-node';
+import cmp from 'semver-compare';
+import {
+ version,
+} from '../../package.json';
+import type {
+ RoarrGlobalStateType,
+} from '../types';
+import createNodeWriter from './createNodeWriter';
+
+// eslint-disable-next-line flowtype/no-weak-types
+export default (currentState: Object): RoarrGlobalStateType => {
+ const versions = (currentState.versions || []).concat();
+
+ versions.sort(cmp);
+
+ const currentIsLatestVersion = !versions.length || cmp(version, versions[versions.length - 1]) === 1;
+
+ if (!versions.includes(version)) {
+ versions.push(version);
+ }
+
+ versions.sort(cmp);
+
+ let newState = {
+ sequence: 0,
+ ...currentState,
+ versions,
+ };
+
+ if (environmentIsNode) {
+ if (currentIsLatestVersion || !newState.write) {
+ newState = {
+ ...newState,
+ ...createNodeWriter(),
+ };
+ }
+ }
+
+ return newState;
+};
diff --git a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map
new file mode 100644
index 0000000..7c221b6
--- /dev/null
+++ b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/createRoarrInititialGlobalState.js"],"names":["currentState","versions","concat","sort","cmp","currentIsLatestVersion","length","version","includes","push","newState","sequence","environmentIsNode","write"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AAMA;;;;;;;;;;AAEA;wCACgBA,Y,IAA+C;AAC7D,QAAMC,QAAQ,GAAG,CAACD,YAAY,CAACC,QAAb,IAAyB,EAA1B,EAA8BC,MAA9B,EAAjB;AAEAD,EAAAA,QAAQ,CAACE,IAAT,CAAcC,sBAAd;AAEA,QAAMC,sBAAsB,GAAG,CAACJ,QAAQ,CAACK,MAAV,IAAoB,4BAAIC,gBAAJ,EAAaN,QAAQ,CAACA,QAAQ,CAACK,MAAT,GAAkB,CAAnB,CAArB,MAAgD,CAAnG;;AAEA,MAAI,CAACL,QAAQ,CAACO,QAAT,CAAkBD,gBAAlB,CAAL,EAAiC;AAC/BN,IAAAA,QAAQ,CAACQ,IAAT,CAAcF,gBAAd;AACD;;AAEDN,EAAAA,QAAQ,CAACE,IAAT,CAAcC,sBAAd;;AAEA,MAAIM,QAAQ;AACVC,IAAAA,QAAQ,EAAE;AADA,KAEPX,YAFO;AAGVC,IAAAA;AAHU,IAAZ;;AAMA,MAAIW,mBAAJ,EAAuB;AACrB,QAAIP,sBAAsB,IAAI,CAACK,QAAQ,CAACG,KAAxC,EAA+C;AAC7CH,MAAAA,QAAQ,mCACHA,QADG,GAEH,gCAFG,CAAR;AAID;AACF;;AAED,SAAOA,QAAP;AACD,C","sourcesContent":["// @flow\n\nimport environmentIsNode from 'detect-node';\nimport cmp from 'semver-compare';\nimport {\n version,\n} from '../../package.json';\nimport type {\n RoarrGlobalStateType,\n} from '../types';\nimport createNodeWriter from './createNodeWriter';\n\n// eslint-disable-next-line flowtype/no-weak-types\nexport default (currentState: Object): RoarrGlobalStateType => {\n const versions = (currentState.versions || []).concat();\n\n versions.sort(cmp);\n\n const currentIsLatestVersion = !versions.length || cmp(version, versions[versions.length - 1]) === 1;\n\n if (!versions.includes(version)) {\n versions.push(version);\n }\n\n versions.sort(cmp);\n\n let newState = {\n sequence: 0,\n ...currentState,\n versions,\n };\n\n if (environmentIsNode) {\n if (currentIsLatestVersion || !newState.write) {\n newState = {\n ...newState,\n ...createNodeWriter(),\n };\n }\n }\n\n return newState;\n};\n"],"file":"createRoarrInititialGlobalState.js"} \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/index.js b/node_modules/roarr/dist/factories/index.js
new file mode 100644
index 0000000..97e8167
--- /dev/null
+++ b/node_modules/roarr/dist/factories/index.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "createLogger", {
+ enumerable: true,
+ get: function () {
+ return _createLogger.default;
+ }
+});
+Object.defineProperty(exports, "createMockLogger", {
+ enumerable: true,
+ get: function () {
+ return _createMockLogger.default;
+ }
+});
+Object.defineProperty(exports, "createRoarrInititialGlobalState", {
+ enumerable: true,
+ get: function () {
+ return _createRoarrInititialGlobalState.default;
+ }
+});
+
+var _createLogger = _interopRequireDefault(require("./createLogger"));
+
+var _createMockLogger = _interopRequireDefault(require("./createMockLogger"));
+
+var _createRoarrInititialGlobalState = _interopRequireDefault(require("./createRoarrInititialGlobalState"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/factories/index.js.flow b/node_modules/roarr/dist/factories/index.js.flow
new file mode 100644
index 0000000..b4881ce
--- /dev/null
+++ b/node_modules/roarr/dist/factories/index.js.flow
@@ -0,0 +1,11 @@
+// @flow
+
+export {
+ default as createLogger,
+} from './createLogger';
+export {
+ default as createMockLogger,
+} from './createMockLogger';
+export {
+ default as createRoarrInititialGlobalState,
+} from './createRoarrInititialGlobalState';
diff --git a/node_modules/roarr/dist/factories/index.js.map b/node_modules/roarr/dist/factories/index.js.map
new file mode 100644
index 0000000..e023a47
--- /dev/null
+++ b/node_modules/roarr/dist/factories/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/factories/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAGA;;AAGA","sourcesContent":["// @flow\n\nexport {\n default as createLogger,\n} from './createLogger';\nexport {\n default as createMockLogger,\n} from './createMockLogger';\nexport {\n default as createRoarrInititialGlobalState,\n} from './createRoarrInititialGlobalState';\n"],"file":"index.js"} \ No newline at end of file
diff --git a/node_modules/roarr/dist/log.js b/node_modules/roarr/dist/log.js
new file mode 100644
index 0000000..23036e3
--- /dev/null
+++ b/node_modules/roarr/dist/log.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = exports.ROARR = void 0;
+
+var _boolean = require("boolean");
+
+var _detectNode = _interopRequireDefault(require("detect-node"));
+
+var _globalthis = _interopRequireDefault(require("globalthis"));
+
+var _factories = require("./factories");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const globalThis = (0, _globalthis.default)();
+const ROARR = globalThis.ROARR = (0, _factories.createRoarrInititialGlobalState)(globalThis.ROARR || {});
+exports.ROARR = ROARR;
+let logFactory = _factories.createLogger;
+
+if (_detectNode.default) {
+ // eslint-disable-next-line no-process-env
+ const enabled = (0, _boolean.boolean)(process.env.ROARR_LOG || '');
+
+ if (!enabled) {
+ logFactory = _factories.createMockLogger;
+ }
+}
+
+var _default = logFactory(message => {
+ if (ROARR.write) {
+ // Stringify message as soon as it is received to prevent
+ // properties of the context from being modified by reference.
+ const body = JSON.stringify(message);
+ ROARR.write(body);
+ }
+});
+
+exports.default = _default;
+//# sourceMappingURL=log.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/log.js.flow b/node_modules/roarr/dist/log.js.flow
new file mode 100644
index 0000000..803ccfc
--- /dev/null
+++ b/node_modules/roarr/dist/log.js.flow
@@ -0,0 +1,47 @@
+// @flow
+
+import {
+ boolean,
+} from 'boolean';
+import environmentIsNode from 'detect-node';
+import createGlobalThis from 'globalthis';
+import {
+ createLogger,
+ createMockLogger,
+ createRoarrInititialGlobalState,
+} from './factories';
+
+const globalThis = createGlobalThis();
+
+const ROARR = globalThis.ROARR = createRoarrInititialGlobalState(globalThis.ROARR || {});
+
+let logFactory = createLogger;
+
+if (environmentIsNode) {
+ // eslint-disable-next-line no-process-env
+ const enabled = boolean(process.env.ROARR_LOG || '');
+
+ if (!enabled) {
+ logFactory = createMockLogger;
+ }
+}
+
+export type {
+ LoggerType,
+ MessageType,
+ TranslateMessageFunctionType,
+} from './types';
+
+export {
+ ROARR,
+};
+
+export default logFactory((message) => {
+ if (ROARR.write) {
+ // Stringify message as soon as it is received to prevent
+ // properties of the context from being modified by reference.
+ const body = JSON.stringify(message);
+
+ ROARR.write(body);
+ }
+});
diff --git a/node_modules/roarr/dist/log.js.map b/node_modules/roarr/dist/log.js.map
new file mode 100644
index 0000000..b72f603
--- /dev/null
+++ b/node_modules/roarr/dist/log.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/log.js"],"names":["globalThis","ROARR","logFactory","createLogger","environmentIsNode","enabled","process","env","ROARR_LOG","createMockLogger","message","write","body","JSON","stringify"],"mappings":";;;;;;;AAEA;;AAGA;;AACA;;AACA;;;;AAMA,MAAMA,UAAU,GAAG,0BAAnB;AAEA,MAAMC,KAAK,GAAGD,UAAU,CAACC,KAAX,GAAmB,gDAAgCD,UAAU,CAACC,KAAX,IAAoB,EAApD,CAAjC;;AAEA,IAAIC,UAAU,GAAGC,uBAAjB;;AAEA,IAAIC,mBAAJ,EAAuB;AACrB;AACA,QAAMC,OAAO,GAAG,sBAAQC,OAAO,CAACC,GAAR,CAAYC,SAAZ,IAAyB,EAAjC,CAAhB;;AAEA,MAAI,CAACH,OAAL,EAAc;AACZH,IAAAA,UAAU,GAAGO,2BAAb;AACD;AACF;;eAYcP,UAAU,CAAEQ,OAAD,IAAa;AACrC,MAAIT,KAAK,CAACU,KAAV,EAAiB;AACf;AACA;AACA,UAAMC,IAAI,GAAGC,IAAI,CAACC,SAAL,CAAeJ,OAAf,CAAb;AAEAT,IAAAA,KAAK,CAACU,KAAN,CAAYC,IAAZ;AACD;AACF,CARwB,C","sourcesContent":["// @flow\n\nimport {\n boolean,\n} from 'boolean';\nimport environmentIsNode from 'detect-node';\nimport createGlobalThis from 'globalthis';\nimport {\n createLogger,\n createMockLogger,\n createRoarrInititialGlobalState,\n} from './factories';\n\nconst globalThis = createGlobalThis();\n\nconst ROARR = globalThis.ROARR = createRoarrInititialGlobalState(globalThis.ROARR || {});\n\nlet logFactory = createLogger;\n\nif (environmentIsNode) {\n // eslint-disable-next-line no-process-env\n const enabled = boolean(process.env.ROARR_LOG || '');\n\n if (!enabled) {\n logFactory = createMockLogger;\n }\n}\n\nexport type {\n LoggerType,\n MessageType,\n TranslateMessageFunctionType,\n} from './types';\n\nexport {\n ROARR,\n};\n\nexport default logFactory((message) => {\n if (ROARR.write) {\n // Stringify message as soon as it is received to prevent\n // properties of the context from being modified by reference.\n const body = JSON.stringify(message);\n\n ROARR.write(body);\n }\n});\n"],"file":"log.js"} \ No newline at end of file
diff --git a/node_modules/roarr/dist/types.js b/node_modules/roarr/dist/types.js
new file mode 100644
index 0000000..2f0e414
--- /dev/null
+++ b/node_modules/roarr/dist/types.js
@@ -0,0 +1,2 @@
+"use strict";
+//# sourceMappingURL=types.js.map \ No newline at end of file
diff --git a/node_modules/roarr/dist/types.js.flow b/node_modules/roarr/dist/types.js.flow
new file mode 100644
index 0000000..18be149
--- /dev/null
+++ b/node_modules/roarr/dist/types.js.flow
@@ -0,0 +1,81 @@
+// @flow
+
+/* eslint-disable import/exports-last, flowtype/require-types-at-top */
+
+export type SerializableValueType = string | number | boolean | null | {+[key: string]: SerializableValueType, ...} | $ReadOnlyArray<SerializableValueType>;
+
+export type SerializableObjectType = {
+ +[key: string]: SerializableValueType,
+ ...
+};
+
+export type WriterType = {|
+ +write: (message: string) => void,
+|};
+
+export type RoarrGlobalStateType = {|
+ sequence: number,
+ versions: $ReadOnlyArray<string>,
+ ...WriterType,
+|};
+
+export type SprintfArgumentType = string | number | boolean | null;
+
+// eslint-disable-next-line flowtype/no-weak-types
+export type MessageContextType = Object;
+
+export type MessageType = {|
+ +context: MessageContextType,
+ +message: string,
+ +sequence: number,
+ +time: number,
+ +version: string,
+|};
+
+export type TranslateMessageFunctionType = (message: MessageType) => MessageType;
+
+declare function Logger (
+ context: MessageContextType,
+ message: string,
+ c?: SprintfArgumentType,
+ d?: SprintfArgumentType,
+ e?: SprintfArgumentType,
+ f?: SprintfArgumentType,
+ g?: SprintfArgumentType,
+ h?: SprintfArgumentType,
+ i?: SprintfArgumentType,
+ k?: SprintfArgumentType
+): void;
+
+// eslint-disable-next-line no-redeclare
+declare function Logger (
+ message: string,
+ b?: SprintfArgumentType,
+ c?: SprintfArgumentType,
+ d?: SprintfArgumentType,
+ e?: SprintfArgumentType,
+ f?: SprintfArgumentType,
+ g?: SprintfArgumentType,
+ h?: SprintfArgumentType,
+ i?: SprintfArgumentType,
+ k?: SprintfArgumentType
+): void;
+
+/**
+ * see https://twitter.com/kuizinas/status/914139352908943360
+ */
+export type LoggerType = {|
+ // eslint-disable-next-line no-undef
+ [[call]]: typeof Logger,
+ +adopt: <T>(routine: () => Promise<T>, context: MessageContextType) => Promise<T>,
+ +child: (context: TranslateMessageFunctionType | MessageContextType) => LoggerType,
+ +debug: typeof Logger,
+ +error: typeof Logger,
+ +fatal: typeof Logger,
+ +getContext: () => MessageContextType,
+ +info: typeof Logger,
+ +trace: typeof Logger,
+ +warn: typeof Logger,
+|};
+
+export type MessageEventHandlerType = (message: MessageType) => void;
diff --git a/node_modules/roarr/dist/types.js.map b/node_modules/roarr/dist/types.js.map
new file mode 100644
index 0000000..036ac15
--- /dev/null
+++ b/node_modules/roarr/dist/types.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.js"} \ No newline at end of file
diff --git a/node_modules/roarr/package.json b/node_modules/roarr/package.json
new file mode 100644
index 0000000..0bfd49e
--- /dev/null
+++ b/node_modules/roarr/package.json
@@ -0,0 +1,93 @@
+{
+ "author": {
+ "email": "gajus@gajus.com",
+ "name": "Gajus Kuizinas",
+ "url": "http://gajus.com"
+ },
+ "ava": {
+ "babel": {
+ "compileAsTests": [
+ "test/helpers/**/*"
+ ]
+ },
+ "files": [
+ "test/roarr/**/*"
+ ],
+ "require": [
+ "@babel/register"
+ ]
+ },
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "detect-node": "^2.0.4",
+ "globalthis": "^1.0.1",
+ "json-stringify-safe": "^5.0.1",
+ "semver-compare": "^1.0.0",
+ "sprintf-js": "^1.1.2"
+ },
+ "description": "JSON logger for Node.js and browser.",
+ "devDependencies": {
+ "@ava/babel": "^1.0.1",
+ "@babel/cli": "^7.11.6",
+ "@babel/core": "^7.11.6",
+ "@babel/node": "^7.10.5",
+ "@babel/plugin-transform-flow-strip-types": "^7.10.4",
+ "@babel/preset-env": "^7.11.5",
+ "@babel/register": "^7.11.5",
+ "ava": "^3.12.1",
+ "babel-plugin-istanbul": "^6.0.0",
+ "babel-plugin-transform-export-default-name": "^2.0.4",
+ "coveralls": "^3.1.0",
+ "domain-parent": "^1.0.0",
+ "eslint": "^7.9.0",
+ "eslint-config-canonical": "^24.1.1",
+ "flow-bin": "^0.133.0",
+ "flow-copy-source": "^2.0.9",
+ "gitdown": "^3.1.3",
+ "husky": "^4.3.0",
+ "nyc": "^15.1.0",
+ "semantic-release": "^17.1.1"
+ },
+ "engines": {
+ "node": ">=8.0"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "npm run lint && npm run test && npm run build",
+ "pre-push": "gitdown ./.README/README.md --output-file ./README.md --check"
+ }
+ },
+ "keywords": [
+ "log",
+ "logger",
+ "json"
+ ],
+ "main": "./dist/log.js",
+ "name": "roarr",
+ "nyc": {
+ "include": [
+ "src/**/*.js"
+ ],
+ "instrument": false,
+ "reporter": [
+ "text-lcov"
+ ],
+ "require": [
+ "@babel/register"
+ ],
+ "sourceMap": false
+ },
+ "license": "BSD-3-Clause",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:gajus/roarr.git"
+ },
+ "scripts": {
+ "build": "rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist",
+ "create-readme": "gitdown ./.README/README.md --output-file ./README.md",
+ "dev": "NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --watch",
+ "lint": "eslint ./src ./test && flow",
+ "test": "NODE_ENV=test ava --serial --verbose"
+ },
+ "version": "2.15.4"
+}
diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE
new file mode 100644
index 0000000..0c068ce
--- /dev/null
+++ b/node_modules/safe-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+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/safe-buffer/README.md b/node_modules/safe-buffer/README.md
new file mode 100644
index 0000000..e9a81af
--- /dev/null
+++ b/node_modules/safe-buffer/README.md
@@ -0,0 +1,584 @@
+# safe-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/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+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.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 a0 0f>
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 70 17>
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+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'`.
+
+```js
+const buf1 = Buffer.from('this is a tést');
+console.log(buf1.toString());
+ // prints: this is a tést
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tést
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ // <Buffer 61 61 61 61 61>
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ // <Buffer 78 e0 82 02 01>
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts
new file mode 100644
index 0000000..e9fed80
--- /dev/null
+++ b/node_modules/safe-buffer/index.d.ts
@@ -0,0 +1,187 @@
+declare module "safe-buffer" {
+ export class Buffer {
+ 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;
+ 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): 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 initalizing
+ */
+ 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;
+ }
+} \ No newline at end of file
diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js
new file mode 100644
index 0000000..f8d3ec9
--- /dev/null
+++ b/node_modules/safe-buffer/index.js
@@ -0,0 +1,65 @@
+/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.prototype = Object.create(Buffer.prototype)
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json
new file mode 100644
index 0000000..f2869e2
--- /dev/null
+++ b/node_modules/safe-buffer/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "safe-buffer",
+ "description": "Safer Node.js Buffer API",
+ "version": "5.2.1",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "https://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^5.0.0"
+ },
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && 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/safer-buffer/LICENSE b/node_modules/safer-buffer/LICENSE
new file mode 100644
index 0000000..4fe9e6f
--- /dev/null
+++ b/node_modules/safer-buffer/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Nikita Skovoroda <chalkerx@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/safer-buffer/Porting-Buffer.md b/node_modules/safer-buffer/Porting-Buffer.md
new file mode 100644
index 0000000..68d86ba
--- /dev/null
+++ b/node_modules/safer-buffer/Porting-Buffer.md
@@ -0,0 +1,268 @@
+# Porting to the Buffer.from/Buffer.alloc API
+
+<a id="overview"></a>
+## Overview
+
+- [Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x.](#variant-1) (*recommended*)
+- [Variant 2: Use a polyfill](#variant-2)
+- [Variant 3: manual detection, with safeguards](#variant-3)
+
+### Finding problematic bits of code using grep
+
+Just run `grep -nrE '[^a-zA-Z](Slow)?Buffer\s*\(' --exclude-dir node_modules`.
+
+It will find all the potentially unsafe places in your own code (with some considerably unlikely
+exceptions).
+
+### Finding problematic bits of code using Node.js 8
+
+If you’re using Node.js ≥ 8.0.0 (which is recommended), Node.js exposes multiple options that help with finding the relevant pieces of code:
+
+- `--trace-warnings` will make Node.js show a stack trace for this warning and other warnings that are printed by Node.js.
+- `--trace-deprecation` does the same thing, but only for deprecation warnings.
+- `--pending-deprecation` will show more types of deprecation warnings. In particular, it will show the `Buffer()` deprecation warning, even on Node.js 8.
+
+You can set these flags using an environment variable:
+
+```console
+$ export NODE_OPTIONS='--trace-warnings --pending-deprecation'
+$ cat example.js
+'use strict';
+const foo = new Buffer('foo');
+$ node example.js
+(node:7147) [DEP0005] DeprecationWarning: The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead.
+ at showFlaggedDeprecation (buffer.js:127:13)
+ at new Buffer (buffer.js:148:3)
+ at Object.<anonymous> (/path/to/example.js:2:13)
+ [... more stack trace lines ...]
+```
+
+### Finding problematic bits of code using linters
+
+Eslint rules [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor)
+or
+[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
+also find calls to deprecated `Buffer()` API. Those rules are included in some pre-sets.
+
+There is a drawback, though, that it doesn't always
+[work correctly](https://github.com/chalker/safer-buffer#why-not-safe-buffer) when `Buffer` is
+overriden e.g. with a polyfill, so recommended is a combination of this and some other method
+described above.
+
+<a id="variant-1"></a>
+## Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x.
+
+This is the recommended solution nowadays that would imply only minimal overhead.
+
+The Node.js 5.x release line has been unsupported since July 2016, and the Node.js 4.x release line reaches its End of Life in April 2018 (→ [Schedule](https://github.com/nodejs/Release#release-schedule)). This means that these versions of Node.js will *not* receive any updates, even in case of security issues, so using these release lines should be avoided, if at all possible.
+
+What you would do in this case is to convert all `new Buffer()` or `Buffer()` calls to use `Buffer.alloc()` or `Buffer.from()`, in the following way:
+
+- For `new Buffer(number)`, replace it with `Buffer.alloc(number)`.
+- For `new Buffer(string)` (or `new Buffer(string, encoding)`), replace it with `Buffer.from(string)` (or `Buffer.from(string, encoding)`).
+- For all other combinations of arguments (these are much rarer), also replace `new Buffer(...arguments)` with `Buffer.from(...arguments)`.
+
+Note that `Buffer.alloc()` is also _faster_ on the current Node.js versions than
+`new Buffer(size).fill(0)`, which is what you would otherwise need to ensure zero-filling.
+
+Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor)
+or
+[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
+is recommended to avoid accidential unsafe Buffer API usage.
+
+There is also a [JSCodeshift codemod](https://github.com/joyeecheung/node-dep-codemod#dep005)
+for automatically migrating Buffer constructors to `Buffer.alloc()` or `Buffer.from()`.
+Note that it currently only works with cases where the arguments are literals or where the
+constructor is invoked with two arguments.
+
+_If you currently support those older Node.js versions and dropping them would be a semver-major change
+for you, or if you support older branches of your packages, consider using [Variant 2](#variant-2)
+or [Variant 3](#variant-3) on older branches, so people using those older branches will also receive
+the fix. That way, you will eradicate potential issues caused by unguarded Buffer API usage and
+your users will not observe a runtime deprecation warning when running your code on Node.js 10._
+
+<a id="variant-2"></a>
+## Variant 2: Use a polyfill
+
+Utilize [safer-buffer](https://www.npmjs.com/package/safer-buffer) as a polyfill to support older
+Node.js versions.
+
+You would take exacly the same steps as in [Variant 1](#variant-1), but with a polyfill
+`const Buffer = require('safer-buffer').Buffer` in all files where you use the new `Buffer` api.
+
+Make sure that you do not use old `new Buffer` API — in any files where the line above is added,
+using old `new Buffer()` API will _throw_. It will be easy to notice that in CI, though.
+
+Alternatively, you could use [buffer-from](https://www.npmjs.com/package/buffer-from) and/or
+[buffer-alloc](https://www.npmjs.com/package/buffer-alloc) [ponyfills](https://ponyfill.com/) —
+those are great, the only downsides being 4 deps in the tree and slightly more code changes to
+migrate off them (as you would be using e.g. `Buffer.from` under a different name). If you need only
+`Buffer.from` polyfilled — `buffer-from` alone which comes with no extra dependencies.
+
+_Alternatively, you could use [safe-buffer](https://www.npmjs.com/package/safe-buffer) — it also
+provides a polyfill, but takes a different approach which has
+[it's drawbacks](https://github.com/chalker/safer-buffer#why-not-safe-buffer). It will allow you
+to also use the older `new Buffer()` API in your code, though — but that's arguably a benefit, as
+it is problematic, can cause issues in your code, and will start emitting runtime deprecation
+warnings starting with Node.js 10._
+
+Note that in either case, it is important that you also remove all calls to the old Buffer
+API manually — just throwing in `safe-buffer` doesn't fix the problem by itself, it just provides
+a polyfill for the new API. I have seen people doing that mistake.
+
+Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor)
+or
+[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
+is recommended.
+
+_Don't forget to drop the polyfill usage once you drop support for Node.js < 4.5.0._
+
+<a id="variant-3"></a>
+## Variant 3 — manual detection, with safeguards
+
+This is useful if you create Buffer instances in only a few places (e.g. one), or you have your own
+wrapper around them.
+
+### Buffer(0)
+
+This special case for creating empty buffers can be safely replaced with `Buffer.concat([])`, which
+returns the same result all the way down to Node.js 0.8.x.
+
+### Buffer(notNumber)
+
+Before:
+
+```js
+var buf = new Buffer(notNumber, encoding);
+```
+
+After:
+
+```js
+var buf;
+if (Buffer.from && Buffer.from !== Uint8Array.from) {
+ buf = Buffer.from(notNumber, encoding);
+} else {
+ if (typeof notNumber === 'number')
+ throw new Error('The "size" argument must be of type number.');
+ buf = new Buffer(notNumber, encoding);
+}
+```
+
+`encoding` is optional.
+
+Note that the `typeof notNumber` before `new Buffer` is required (for cases when `notNumber` argument is not
+hard-coded) and _is not caused by the deprecation of Buffer constructor_ — it's exactly _why_ the
+Buffer constructor is deprecated. Ecosystem packages lacking this type-check caused numereous
+security issues — situations when unsanitized user input could end up in the `Buffer(arg)` create
+problems ranging from DoS to leaking sensitive information to the attacker from the process memory.
+
+When `notNumber` argument is hardcoded (e.g. literal `"abc"` or `[0,1,2]`), the `typeof` check can
+be omitted.
+
+Also note that using TypeScript does not fix this problem for you — when libs written in
+`TypeScript` are used from JS, or when user input ends up there — it behaves exactly as pure JS, as
+all type checks are translation-time only and are not present in the actual JS code which TS
+compiles to.
+
+### Buffer(number)
+
+For Node.js 0.10.x (and below) support:
+
+```js
+var buf;
+if (Buffer.alloc) {
+ buf = Buffer.alloc(number);
+} else {
+ buf = new Buffer(number);
+ buf.fill(0);
+}
+```
+
+Otherwise (Node.js ≥ 0.12.x):
+
+```js
+const buf = Buffer.alloc ? Buffer.alloc(number) : new Buffer(number).fill(0);
+```
+
+## Regarding Buffer.allocUnsafe
+
+Be extra cautious when using `Buffer.allocUnsafe`:
+ * Don't use it if you don't have a good reason to
+ * e.g. you probably won't ever see a performance difference for small buffers, in fact, those
+ might be even faster with `Buffer.alloc()`,
+ * if your code is not in the hot code path — you also probably won't notice a difference,
+ * keep in mind that zero-filling minimizes the potential risks.
+ * If you use it, make sure that you never return the buffer in a partially-filled state,
+ * if you are writing to it sequentially — always truncate it to the actuall written length
+
+Errors in handling buffers allocated with `Buffer.allocUnsafe` could result in various issues,
+ranged from undefined behaviour of your code to sensitive data (user input, passwords, certs)
+leaking to the remote attacker.
+
+_Note that the same applies to `new Buffer` usage without zero-filling, depending on the Node.js
+version (and lacking type checks also adds DoS to the list of potential problems)._
+
+<a id="faq"></a>
+## FAQ
+
+<a id="design-flaws"></a>
+### What is wrong with the `Buffer` constructor?
+
+The `Buffer` constructor could be used to create a buffer in many different ways:
+
+- `new Buffer(42)` creates a `Buffer` of 42 bytes. Before Node.js 8, this buffer contained
+ *arbitrary memory* for performance reasons, which could include anything ranging from
+ program source code to passwords and encryption keys.
+- `new Buffer('abc')` creates a `Buffer` that contains the UTF-8-encoded version of
+ the string `'abc'`. A second argument could specify another encoding: For example,
+ `new Buffer(string, 'base64')` could be used to convert a Base64 string into the original
+ sequence of bytes that it represents.
+- There are several other combinations of arguments.
+
+This meant that, in code like `var buffer = new Buffer(foo);`, *it is not possible to tell
+what exactly the contents of the generated buffer are* without knowing the type of `foo`.
+
+Sometimes, the value of `foo` comes from an external source. For example, this function
+could be exposed as a service on a web server, converting a UTF-8 string into its Base64 form:
+
+```
+function stringToBase64(req, res) {
+ // The request body should have the format of `{ string: 'foobar' }`
+ const rawBytes = new Buffer(req.body.string)
+ const encoded = rawBytes.toString('base64')
+ res.end({ encoded: encoded })
+}
+```
+
+Note that this code does *not* validate the type of `req.body.string`:
+
+- `req.body.string` is expected to be a string. If this is the case, all goes well.
+- `req.body.string` is controlled by the client that sends the request.
+- If `req.body.string` is the *number* `50`, the `rawBytes` would be 50 bytes:
+ - Before Node.js 8, the content would be uninitialized
+ - After Node.js 8, the content would be `50` bytes with the value `0`
+
+Because of the missing type check, an attacker could intentionally send a number
+as part of the request. Using this, they can either:
+
+- Read uninitialized memory. This **will** leak passwords, encryption keys and other
+ kinds of sensitive information. (Information leak)
+- Force the program to allocate a large amount of memory. For example, when specifying
+ `500000000` as the input value, each request will allocate 500MB of memory.
+ This can be used to either exhaust the memory available of a program completely
+ and make it crash, or slow it down significantly. (Denial of Service)
+
+Both of these scenarios are considered serious security issues in a real-world
+web server context.
+
+when using `Buffer.from(req.body.string)` instead, passing a number will always
+throw an exception instead, giving a controlled behaviour that can always be
+handled by the program.
+
+<a id="ecosystem-usage"></a>
+### The `Buffer()` constructor has been deprecated for a while. Is this really an issue?
+
+Surveys of code in the `npm` ecosystem have shown that the `Buffer()` constructor is still
+widely used. This includes new code, and overall usage of such code has actually been
+*increasing*.
diff --git a/node_modules/safer-buffer/Readme.md b/node_modules/safer-buffer/Readme.md
new file mode 100644
index 0000000..14b0822
--- /dev/null
+++ b/node_modules/safer-buffer/Readme.md
@@ -0,0 +1,156 @@
+# safer-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![javascript style guide][standard-image]][standard-url] [![Security Responsible Disclosure][secuirty-image]][secuirty-url]
+
+[travis-image]: https://travis-ci.org/ChALkeR/safer-buffer.svg?branch=master
+[travis-url]: https://travis-ci.org/ChALkeR/safer-buffer
+[npm-image]: https://img.shields.io/npm/v/safer-buffer.svg
+[npm-url]: https://npmjs.org/package/safer-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+[secuirty-image]: https://img.shields.io/badge/Security-Responsible%20Disclosure-green.svg
+[secuirty-url]: https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md
+
+Modern Buffer API polyfill without footguns, working on Node.js from 0.8 to current.
+
+## How to use?
+
+First, port all `Buffer()` and `new Buffer()` calls to `Buffer.alloc()` and `Buffer.from()` API.
+
+Then, to achieve compatibility with outdated Node.js versions (`<4.5.0` and 5.x `<5.9.0`), use
+`const Buffer = require('safer-buffer').Buffer` in all files where you make calls to the new
+Buffer API. _Use `var` instead of `const` if you need that for your Node.js version range support._
+
+Also, see the
+[porting Buffer](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) guide.
+
+## Do I need it?
+
+Hopefully, not — dropping support for outdated Node.js versions should be fine nowdays, and that
+is the recommended path forward. You _do_ need to port to the `Buffer.alloc()` and `Buffer.from()`
+though.
+
+See the [porting guide](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md)
+for a better description.
+
+## Why not [safe-buffer](https://npmjs.com/safe-buffer)?
+
+_In short: while `safe-buffer` serves as a polyfill for the new API, it allows old API usage and
+itself contains footguns._
+
+`safe-buffer` could be used safely to get the new API while still keeping support for older
+Node.js versions (like this module), but while analyzing ecosystem usage of the old Buffer API
+I found out that `safe-buffer` is itself causing problems in some cases.
+
+For example, consider the following snippet:
+
+```console
+$ cat example.unsafe.js
+console.log(Buffer(20))
+$ ./node-v6.13.0-linux-x64/bin/node example.unsafe.js
+<Buffer 0a 00 00 00 00 00 00 00 28 13 de 02 00 00 00 00 05 00 00 00>
+$ standard example.unsafe.js
+standard: Use JavaScript Standard Style (https://standardjs.com)
+ /home/chalker/repo/safer-buffer/example.unsafe.js:2:13: 'Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead.
+```
+
+This is allocates and writes to console an uninitialized chunk of memory.
+[standard](https://www.npmjs.com/package/standard) linter (among others) catch that and warn people
+to avoid using unsafe API.
+
+Let's now throw in `safe-buffer`!
+
+```console
+$ cat example.safe-buffer.js
+const Buffer = require('safe-buffer').Buffer
+console.log(Buffer(20))
+$ standard example.safe-buffer.js
+$ ./node-v6.13.0-linux-x64/bin/node example.safe-buffer.js
+<Buffer 08 00 00 00 00 00 00 00 28 58 01 82 fe 7f 00 00 00 00 00 00>
+```
+
+See the problem? Adding in `safe-buffer` _magically removes the lint warning_, but the behavior
+remains identiсal to what we had before, and when launched on Node.js 6.x LTS — this dumps out
+chunks of uninitialized memory.
+_And this code will still emit runtime warnings on Node.js 10.x and above._
+
+That was done by design. I first considered changing `safe-buffer`, prohibiting old API usage or
+emitting warnings on it, but that significantly diverges from `safe-buffer` design. After some
+discussion, it was decided to move my approach into a separate package, and _this is that separate
+package_.
+
+This footgun is not imaginary — I observed top-downloaded packages doing that kind of thing,
+«fixing» the lint warning by blindly including `safe-buffer` without any actual changes.
+
+Also in some cases, even if the API _was_ migrated to use of safe Buffer API — a random pull request
+can bring unsafe Buffer API usage back to the codebase by adding new calls — and that could go
+unnoticed even if you have a linter prohibiting that (becase of the reason stated above), and even
+pass CI. _I also observed that being done in popular packages._
+
+Some examples:
+ * [webdriverio](https://github.com/webdriverio/webdriverio/commit/05cbd3167c12e4930f09ef7cf93b127ba4effae4#diff-124380949022817b90b622871837d56cR31)
+ (a module with 548 759 downloads/month),
+ * [websocket-stream](https://github.com/maxogden/websocket-stream/commit/c9312bd24d08271687d76da0fe3c83493871cf61)
+ (218 288 d/m, fix in [maxogden/websocket-stream#142](https://github.com/maxogden/websocket-stream/pull/142)),
+ * [node-serialport](https://github.com/node-serialport/node-serialport/commit/e8d9d2b16c664224920ce1c895199b1ce2def48c)
+ (113 138 d/m, fix in [node-serialport/node-serialport#1510](https://github.com/node-serialport/node-serialport/pull/1510)),
+ * [karma](https://github.com/karma-runner/karma/commit/3d94b8cf18c695104ca195334dc75ff054c74eec)
+ (3 973 193 d/m, fix in [karma-runner/karma#2947](https://github.com/karma-runner/karma/pull/2947)),
+ * [spdy-transport](https://github.com/spdy-http2/spdy-transport/commit/5375ac33f4a62a4f65bcfc2827447d42a5dbe8b1)
+ (5 970 727 d/m, fix in [spdy-http2/spdy-transport#53](https://github.com/spdy-http2/spdy-transport/pull/53)).
+ * And there are a lot more over the ecosystem.
+
+I filed a PR at
+[mysticatea/eslint-plugin-node#110](https://github.com/mysticatea/eslint-plugin-node/pull/110) to
+partially fix that (for cases when that lint rule is used), but it is a semver-major change for
+linter rules and presets, so it would take significant time for that to reach actual setups.
+_It also hasn't been released yet (2018-03-20)._
+
+Also, `safer-buffer` discourages the usage of `.allocUnsafe()`, which is often done by a mistake.
+It still supports it with an explicit concern barier, by placing it under
+`require('safer-buffer/dangereous')`.
+
+## But isn't throwing bad?
+
+Not really. It's an error that could be noticed and fixed early, instead of causing havoc later like
+unguarded `new Buffer()` calls that end up receiving user input can do.
+
+This package affects only the files where `var Buffer = require('safer-buffer').Buffer` was done, so
+it is really simple to keep track of things and make sure that you don't mix old API usage with that.
+Also, CI should hint anything that you might have missed.
+
+New commits, if tested, won't land new usage of unsafe Buffer API this way.
+_Node.js 10.x also deals with that by printing a runtime depecation warning._
+
+### Would it affect third-party modules?
+
+No, unless you explicitly do an awful thing like monkey-patching or overriding the built-in `Buffer`.
+Don't do that.
+
+### But I don't want throwing…
+
+That is also fine!
+
+Also, it could be better in some cases when you don't comprehensive enough test coverage.
+
+In that case — just don't override `Buffer` and use
+`var SaferBuffer = require('safer-buffer').Buffer` instead.
+
+That way, everything using `Buffer` natively would still work, but there would be two drawbacks:
+
+* `Buffer.from`/`Buffer.alloc` won't be polyfilled — use `SaferBuffer.from` and
+ `SaferBuffer.alloc` instead.
+* You are still open to accidentally using the insecure deprecated API — use a linter to catch that.
+
+Note that using a linter to catch accidential `Buffer` constructor usage in this case is strongly
+recommended. `Buffer` is not overriden in this usecase, so linters won't get confused.
+
+## «Without footguns»?
+
+Well, it is still possible to do _some_ things with `Buffer` API, e.g. accessing `.buffer` property
+on older versions and duping things from there. You shouldn't do that in your code, probabably.
+
+The intention is to remove the most significant footguns that affect lots of packages in the
+ecosystem, and to do it in the proper way.
+
+Also, this package doesn't protect against security issues affecting some Node.js versions, so for
+usage in your own production code, it is still recommended to update to a Node.js version
+[supported by upstream](https://github.com/nodejs/release#release-schedule).
diff --git a/node_modules/safer-buffer/dangerous.js b/node_modules/safer-buffer/dangerous.js
new file mode 100644
index 0000000..ca41fdc
--- /dev/null
+++ b/node_modules/safer-buffer/dangerous.js
@@ -0,0 +1,58 @@
+/* eslint-disable node/no-deprecated-api */
+
+'use strict'
+
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+var safer = require('./safer.js')
+var Safer = safer.Buffer
+
+var dangerous = {}
+
+var key
+
+for (key in safer) {
+ if (!safer.hasOwnProperty(key)) continue
+ dangerous[key] = safer[key]
+}
+
+var Dangereous = dangerous.Buffer = {}
+
+// Copy Safer API
+for (key in Safer) {
+ if (!Safer.hasOwnProperty(key)) continue
+ Dangereous[key] = Safer[key]
+}
+
+// Copy those missing unsafe methods, if they are present
+for (key in Buffer) {
+ if (!Buffer.hasOwnProperty(key)) continue
+ if (Dangereous.hasOwnProperty(key)) continue
+ Dangereous[key] = Buffer[key]
+}
+
+if (!Dangereous.allocUnsafe) {
+ Dangereous.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
+ }
+ if (size < 0 || size >= 2 * (1 << 30)) {
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
+ }
+ return Buffer(size)
+ }
+}
+
+if (!Dangereous.allocUnsafeSlow) {
+ Dangereous.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
+ }
+ if (size < 0 || size >= 2 * (1 << 30)) {
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
+ }
+ return buffer.SlowBuffer(size)
+ }
+}
+
+module.exports = dangerous
diff --git a/node_modules/safer-buffer/package.json b/node_modules/safer-buffer/package.json
new file mode 100644
index 0000000..d452b04
--- /dev/null
+++ b/node_modules/safer-buffer/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "safer-buffer",
+ "version": "2.1.2",
+ "description": "Modern Buffer API polyfill without footguns",
+ "main": "safer.js",
+ "scripts": {
+ "browserify-test": "browserify --external tape tests.js > browserify-tests.js && tape browserify-tests.js",
+ "test": "standard && tape tests.js"
+ },
+ "author": {
+ "name": "Nikita Skovoroda",
+ "email": "chalkerx@gmail.com",
+ "url": "https://github.com/ChALkeR"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ChALkeR/safer-buffer.git"
+ },
+ "bugs": {
+ "url": "https://github.com/ChALkeR/safer-buffer/issues"
+ },
+ "devDependencies": {
+ "standard": "^11.0.1",
+ "tape": "^4.9.0"
+ },
+ "files": [
+ "Porting-Buffer.md",
+ "Readme.md",
+ "tests.js",
+ "dangerous.js",
+ "safer.js"
+ ]
+}
diff --git a/node_modules/safer-buffer/safer.js b/node_modules/safer-buffer/safer.js
new file mode 100644
index 0000000..37c7e1a
--- /dev/null
+++ b/node_modules/safer-buffer/safer.js
@@ -0,0 +1,77 @@
+/* eslint-disable node/no-deprecated-api */
+
+'use strict'
+
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+var safer = {}
+
+var key
+
+for (key in buffer) {
+ if (!buffer.hasOwnProperty(key)) continue
+ if (key === 'SlowBuffer' || key === 'Buffer') continue
+ safer[key] = buffer[key]
+}
+
+var Safer = safer.Buffer = {}
+for (key in Buffer) {
+ if (!Buffer.hasOwnProperty(key)) continue
+ if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
+ Safer[key] = Buffer[key]
+}
+
+safer.Buffer.prototype = Buffer.prototype
+
+if (!Safer.from || Safer.from === Uint8Array.from) {
+ Safer.from = function (value, encodingOrOffset, length) {
+ if (typeof value === 'number') {
+ throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
+ }
+ if (value && typeof value.length === 'undefined') {
+ throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
+ }
+ return Buffer(value, encodingOrOffset, length)
+ }
+}
+
+if (!Safer.alloc) {
+ Safer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
+ }
+ if (size < 0 || size >= 2 * (1 << 30)) {
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
+ }
+ var buf = Buffer(size)
+ if (!fill || fill.length === 0) {
+ buf.fill(0)
+ } else if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ return buf
+ }
+}
+
+if (!safer.kStringMaxLength) {
+ try {
+ safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
+ } catch (e) {
+ // we can't determine kStringMaxLength in environments where process.binding
+ // is unsupported, so let's not set it
+ }
+}
+
+if (!safer.constants) {
+ safer.constants = {
+ MAX_LENGTH: safer.kMaxLength
+ }
+ if (safer.kStringMaxLength) {
+ safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
+ }
+}
+
+module.exports = safer
diff --git a/node_modules/safer-buffer/tests.js b/node_modules/safer-buffer/tests.js
new file mode 100644
index 0000000..7ed2777
--- /dev/null
+++ b/node_modules/safer-buffer/tests.js
@@ -0,0 +1,406 @@
+/* eslint-disable node/no-deprecated-api */
+
+'use strict'
+
+var test = require('tape')
+
+var buffer = require('buffer')
+
+var index = require('./')
+var safer = require('./safer')
+var dangerous = require('./dangerous')
+
+/* Inheritance tests */
+
+test('Default is Safer', function (t) {
+ t.equal(index, safer)
+ t.notEqual(safer, dangerous)
+ t.notEqual(index, dangerous)
+ t.end()
+})
+
+test('Is not a function', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(typeof impl, 'object')
+ t.equal(typeof impl.Buffer, 'object')
+ });
+ [buffer].forEach(function (impl) {
+ t.equal(typeof impl, 'object')
+ t.equal(typeof impl.Buffer, 'function')
+ })
+ t.end()
+})
+
+test('Constructor throws', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.throws(function () { impl.Buffer() })
+ t.throws(function () { impl.Buffer(0) })
+ t.throws(function () { impl.Buffer('a') })
+ t.throws(function () { impl.Buffer('a', 'utf-8') })
+ t.throws(function () { return new impl.Buffer() })
+ t.throws(function () { return new impl.Buffer(0) })
+ t.throws(function () { return new impl.Buffer('a') })
+ t.throws(function () { return new impl.Buffer('a', 'utf-8') })
+ })
+ t.end()
+})
+
+test('Safe methods exist', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(typeof impl.Buffer.alloc, 'function', 'alloc')
+ t.equal(typeof impl.Buffer.from, 'function', 'from')
+ })
+ t.end()
+})
+
+test('Unsafe methods exist only in Dangerous', function (t) {
+ [index, safer].forEach(function (impl) {
+ t.equal(typeof impl.Buffer.allocUnsafe, 'undefined')
+ t.equal(typeof impl.Buffer.allocUnsafeSlow, 'undefined')
+ });
+ [dangerous].forEach(function (impl) {
+ t.equal(typeof impl.Buffer.allocUnsafe, 'function')
+ t.equal(typeof impl.Buffer.allocUnsafeSlow, 'function')
+ })
+ t.end()
+})
+
+test('Generic methods/properties are defined and equal', function (t) {
+ ['poolSize', 'isBuffer', 'concat', 'byteLength'].forEach(function (method) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl.Buffer[method], buffer.Buffer[method], method)
+ t.notEqual(typeof impl.Buffer[method], 'undefined', method)
+ })
+ })
+ t.end()
+})
+
+test('Built-in buffer static methods/properties are inherited', function (t) {
+ Object.keys(buffer).forEach(function (method) {
+ if (method === 'SlowBuffer' || method === 'Buffer') return;
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl[method], buffer[method], method)
+ t.notEqual(typeof impl[method], 'undefined', method)
+ })
+ })
+ t.end()
+})
+
+test('Built-in Buffer static methods/properties are inherited', function (t) {
+ Object.keys(buffer.Buffer).forEach(function (method) {
+ if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return;
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl.Buffer[method], buffer.Buffer[method], method)
+ t.notEqual(typeof impl.Buffer[method], 'undefined', method)
+ })
+ })
+ t.end()
+})
+
+test('.prototype property of Buffer is inherited', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl.Buffer.prototype, buffer.Buffer.prototype, 'prototype')
+ t.notEqual(typeof impl.Buffer.prototype, 'undefined', 'prototype')
+ })
+ t.end()
+})
+
+test('All Safer methods are present in Dangerous', function (t) {
+ Object.keys(safer).forEach(function (method) {
+ if (method === 'Buffer') return;
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl[method], safer[method], method)
+ if (method !== 'kStringMaxLength') {
+ t.notEqual(typeof impl[method], 'undefined', method)
+ }
+ })
+ })
+ Object.keys(safer.Buffer).forEach(function (method) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl.Buffer[method], safer.Buffer[method], method)
+ t.notEqual(typeof impl.Buffer[method], 'undefined', method)
+ })
+ })
+ t.end()
+})
+
+test('Safe methods from Dangerous methods are present in Safer', function (t) {
+ Object.keys(dangerous).forEach(function (method) {
+ if (method === 'Buffer') return;
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl[method], dangerous[method], method)
+ if (method !== 'kStringMaxLength') {
+ t.notEqual(typeof impl[method], 'undefined', method)
+ }
+ })
+ })
+ Object.keys(dangerous.Buffer).forEach(function (method) {
+ if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return;
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl.Buffer[method], dangerous.Buffer[method], method)
+ t.notEqual(typeof impl.Buffer[method], 'undefined', method)
+ })
+ })
+ t.end()
+})
+
+/* Behaviour tests */
+
+test('Methods return Buffers', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0)))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 10)))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 'a')))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10)))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10, 'x')))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(9, 'ab')))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('')))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string')))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string', 'utf-8')))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64')))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([0, 42, 3])))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(new Uint8Array([0, 42, 3]))))
+ t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([])))
+ });
+ ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) {
+ t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](0)))
+ t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](10)))
+ })
+ t.end()
+})
+
+test('Constructor is buffer.Buffer', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl.Buffer.alloc(0).constructor, buffer.Buffer)
+ t.equal(impl.Buffer.alloc(0, 10).constructor, buffer.Buffer)
+ t.equal(impl.Buffer.alloc(0, 'a').constructor, buffer.Buffer)
+ t.equal(impl.Buffer.alloc(10).constructor, buffer.Buffer)
+ t.equal(impl.Buffer.alloc(10, 'x').constructor, buffer.Buffer)
+ t.equal(impl.Buffer.alloc(9, 'ab').constructor, buffer.Buffer)
+ t.equal(impl.Buffer.from('').constructor, buffer.Buffer)
+ t.equal(impl.Buffer.from('string').constructor, buffer.Buffer)
+ t.equal(impl.Buffer.from('string', 'utf-8').constructor, buffer.Buffer)
+ t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').constructor, buffer.Buffer)
+ t.equal(impl.Buffer.from([0, 42, 3]).constructor, buffer.Buffer)
+ t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).constructor, buffer.Buffer)
+ t.equal(impl.Buffer.from([]).constructor, buffer.Buffer)
+ });
+ [0, 10, 100].forEach(function (arg) {
+ t.equal(dangerous.Buffer.allocUnsafe(arg).constructor, buffer.Buffer)
+ t.equal(dangerous.Buffer.allocUnsafeSlow(arg).constructor, buffer.SlowBuffer(0).constructor)
+ })
+ t.end()
+})
+
+test('Invalid calls throw', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.throws(function () { impl.Buffer.from(0) })
+ t.throws(function () { impl.Buffer.from(10) })
+ t.throws(function () { impl.Buffer.from(10, 'utf-8') })
+ t.throws(function () { impl.Buffer.from('string', 'invalid encoding') })
+ t.throws(function () { impl.Buffer.from(-10) })
+ t.throws(function () { impl.Buffer.from(1e90) })
+ t.throws(function () { impl.Buffer.from(Infinity) })
+ t.throws(function () { impl.Buffer.from(-Infinity) })
+ t.throws(function () { impl.Buffer.from(NaN) })
+ t.throws(function () { impl.Buffer.from(null) })
+ t.throws(function () { impl.Buffer.from(undefined) })
+ t.throws(function () { impl.Buffer.from() })
+ t.throws(function () { impl.Buffer.from({}) })
+ t.throws(function () { impl.Buffer.alloc('') })
+ t.throws(function () { impl.Buffer.alloc('string') })
+ t.throws(function () { impl.Buffer.alloc('string', 'utf-8') })
+ t.throws(function () { impl.Buffer.alloc('b25ldHdvdGhyZWU=', 'base64') })
+ t.throws(function () { impl.Buffer.alloc(-10) })
+ t.throws(function () { impl.Buffer.alloc(1e90) })
+ t.throws(function () { impl.Buffer.alloc(2 * (1 << 30)) })
+ t.throws(function () { impl.Buffer.alloc(Infinity) })
+ t.throws(function () { impl.Buffer.alloc(-Infinity) })
+ t.throws(function () { impl.Buffer.alloc(null) })
+ t.throws(function () { impl.Buffer.alloc(undefined) })
+ t.throws(function () { impl.Buffer.alloc() })
+ t.throws(function () { impl.Buffer.alloc([]) })
+ t.throws(function () { impl.Buffer.alloc([0, 42, 3]) })
+ t.throws(function () { impl.Buffer.alloc({}) })
+ });
+ ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) {
+ t.throws(function () { dangerous.Buffer[method]('') })
+ t.throws(function () { dangerous.Buffer[method]('string') })
+ t.throws(function () { dangerous.Buffer[method]('string', 'utf-8') })
+ t.throws(function () { dangerous.Buffer[method](2 * (1 << 30)) })
+ t.throws(function () { dangerous.Buffer[method](Infinity) })
+ if (dangerous.Buffer[method] === buffer.Buffer.allocUnsafe) {
+ t.skip('Skipping, older impl of allocUnsafe coerced negative sizes to 0')
+ } else {
+ t.throws(function () { dangerous.Buffer[method](-10) })
+ t.throws(function () { dangerous.Buffer[method](-1e90) })
+ t.throws(function () { dangerous.Buffer[method](-Infinity) })
+ }
+ t.throws(function () { dangerous.Buffer[method](null) })
+ t.throws(function () { dangerous.Buffer[method](undefined) })
+ t.throws(function () { dangerous.Buffer[method]() })
+ t.throws(function () { dangerous.Buffer[method]([]) })
+ t.throws(function () { dangerous.Buffer[method]([0, 42, 3]) })
+ t.throws(function () { dangerous.Buffer[method]({}) })
+ })
+ t.end()
+})
+
+test('Buffers have appropriate lengths', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.equal(impl.Buffer.alloc(0).length, 0)
+ t.equal(impl.Buffer.alloc(10).length, 10)
+ t.equal(impl.Buffer.from('').length, 0)
+ t.equal(impl.Buffer.from('string').length, 6)
+ t.equal(impl.Buffer.from('string', 'utf-8').length, 6)
+ t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').length, 11)
+ t.equal(impl.Buffer.from([0, 42, 3]).length, 3)
+ t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).length, 3)
+ t.equal(impl.Buffer.from([]).length, 0)
+ });
+ ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) {
+ t.equal(dangerous.Buffer[method](0).length, 0)
+ t.equal(dangerous.Buffer[method](10).length, 10)
+ })
+ t.end()
+})
+
+test('Buffers have appropriate lengths (2)', function (t) {
+ t.equal(index.Buffer.alloc, safer.Buffer.alloc)
+ t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
+ var ok = true;
+ [ safer.Buffer.alloc,
+ dangerous.Buffer.allocUnsafe,
+ dangerous.Buffer.allocUnsafeSlow
+ ].forEach(function (method) {
+ for (var i = 0; i < 1e2; i++) {
+ var length = Math.round(Math.random() * 1e5)
+ var buf = method(length)
+ if (!buffer.Buffer.isBuffer(buf)) ok = false
+ if (buf.length !== length) ok = false
+ }
+ })
+ t.ok(ok)
+ t.end()
+})
+
+test('.alloc(size) is zero-filled and has correct length', function (t) {
+ t.equal(index.Buffer.alloc, safer.Buffer.alloc)
+ t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
+ var ok = true
+ for (var i = 0; i < 1e2; i++) {
+ var length = Math.round(Math.random() * 2e6)
+ var buf = index.Buffer.alloc(length)
+ if (!buffer.Buffer.isBuffer(buf)) ok = false
+ if (buf.length !== length) ok = false
+ var j
+ for (j = 0; j < length; j++) {
+ if (buf[j] !== 0) ok = false
+ }
+ buf.fill(1)
+ for (j = 0; j < length; j++) {
+ if (buf[j] !== 1) ok = false
+ }
+ }
+ t.ok(ok)
+ t.end()
+})
+
+test('.allocUnsafe / .allocUnsafeSlow are fillable and have correct lengths', function (t) {
+ ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) {
+ var ok = true
+ for (var i = 0; i < 1e2; i++) {
+ var length = Math.round(Math.random() * 2e6)
+ var buf = dangerous.Buffer[method](length)
+ if (!buffer.Buffer.isBuffer(buf)) ok = false
+ if (buf.length !== length) ok = false
+ buf.fill(0, 0, length)
+ var j
+ for (j = 0; j < length; j++) {
+ if (buf[j] !== 0) ok = false
+ }
+ buf.fill(1, 0, length)
+ for (j = 0; j < length; j++) {
+ if (buf[j] !== 1) ok = false
+ }
+ }
+ t.ok(ok, method)
+ })
+ t.end()
+})
+
+test('.alloc(size, fill) is `fill`-filled', function (t) {
+ t.equal(index.Buffer.alloc, safer.Buffer.alloc)
+ t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
+ var ok = true
+ for (var i = 0; i < 1e2; i++) {
+ var length = Math.round(Math.random() * 2e6)
+ var fill = Math.round(Math.random() * 255)
+ var buf = index.Buffer.alloc(length, fill)
+ if (!buffer.Buffer.isBuffer(buf)) ok = false
+ if (buf.length !== length) ok = false
+ for (var j = 0; j < length; j++) {
+ if (buf[j] !== fill) ok = false
+ }
+ }
+ t.ok(ok)
+ t.end()
+})
+
+test('.alloc(size, fill) is `fill`-filled', function (t) {
+ t.equal(index.Buffer.alloc, safer.Buffer.alloc)
+ t.equal(index.Buffer.alloc, dangerous.Buffer.alloc)
+ var ok = true
+ for (var i = 0; i < 1e2; i++) {
+ var length = Math.round(Math.random() * 2e6)
+ var fill = Math.round(Math.random() * 255)
+ var buf = index.Buffer.alloc(length, fill)
+ if (!buffer.Buffer.isBuffer(buf)) ok = false
+ if (buf.length !== length) ok = false
+ for (var j = 0; j < length; j++) {
+ if (buf[j] !== fill) ok = false
+ }
+ }
+ t.ok(ok)
+ t.deepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 97))
+ t.notDeepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 98))
+
+ var tmp = new buffer.Buffer(2)
+ tmp.fill('ok')
+ if (tmp[1] === tmp[0]) {
+ // Outdated Node.js
+ t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('ooooo'))
+ } else {
+ t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('okoko'))
+ }
+ t.notDeepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('kokok'))
+
+ t.end()
+})
+
+test('safer.Buffer.from returns results same as Buffer constructor', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.deepEqual(impl.Buffer.from(''), new buffer.Buffer(''))
+ t.deepEqual(impl.Buffer.from('string'), new buffer.Buffer('string'))
+ t.deepEqual(impl.Buffer.from('string', 'utf-8'), new buffer.Buffer('string', 'utf-8'))
+ t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), new buffer.Buffer('b25ldHdvdGhyZWU=', 'base64'))
+ t.deepEqual(impl.Buffer.from([0, 42, 3]), new buffer.Buffer([0, 42, 3]))
+ t.deepEqual(impl.Buffer.from(new Uint8Array([0, 42, 3])), new buffer.Buffer(new Uint8Array([0, 42, 3])))
+ t.deepEqual(impl.Buffer.from([]), new buffer.Buffer([]))
+ })
+ t.end()
+})
+
+test('safer.Buffer.from returns consistent results', function (t) {
+ [index, safer, dangerous].forEach(function (impl) {
+ t.deepEqual(impl.Buffer.from(''), impl.Buffer.alloc(0))
+ t.deepEqual(impl.Buffer.from([]), impl.Buffer.alloc(0))
+ t.deepEqual(impl.Buffer.from(new Uint8Array([])), impl.Buffer.alloc(0))
+ t.deepEqual(impl.Buffer.from('string', 'utf-8'), impl.Buffer.from('string'))
+ t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from([115, 116, 114, 105, 110, 103]))
+ t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from(impl.Buffer.from('string')))
+ t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), impl.Buffer.from('onetwothree'))
+ t.notDeepEqual(impl.Buffer.from('b25ldHdvdGhyZWU='), impl.Buffer.from('onetwothree'))
+ })
+ t.end()
+})
diff --git a/node_modules/semver-compare/.travis.yml b/node_modules/semver-compare/.travis.yml
new file mode 100644
index 0000000..8d4715c
--- /dev/null
+++ b/node_modules/semver-compare/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+before_install:
+ - npm install -g npm
diff --git a/node_modules/semver-compare/LICENSE b/node_modules/semver-compare/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/node_modules/semver-compare/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+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/semver-compare/example/cmp.js b/node_modules/semver-compare/example/cmp.js
new file mode 100644
index 0000000..458eae1
--- /dev/null
+++ b/node_modules/semver-compare/example/cmp.js
@@ -0,0 +1,13 @@
+var cmp = require('../');
+var versions = [
+ '1.2.3',
+ '4.11.6',
+ '4.2.0',
+ '1.5.19',
+ '1.5.5',
+ '4.1.3',
+ '2.3.1',
+ '10.5.5',
+ '11.3.0'
+];
+console.log(versions.sort(cmp).join('\n'));
diff --git a/node_modules/semver-compare/example/lex.js b/node_modules/semver-compare/example/lex.js
new file mode 100644
index 0000000..c04d9f6
--- /dev/null
+++ b/node_modules/semver-compare/example/lex.js
@@ -0,0 +1,12 @@
+var versions = [
+ '1.2.3',
+ '4.11.6',
+ '4.2.0',
+ '1.5.19',
+ '1.5.5',
+ '4.1.3',
+ '2.3.1',
+ '10.5.5',
+ '11.3.0'
+];
+console.log(versions.sort().join('\n'));
diff --git a/node_modules/semver-compare/index.js b/node_modules/semver-compare/index.js
new file mode 100644
index 0000000..cec978d
--- /dev/null
+++ b/node_modules/semver-compare/index.js
@@ -0,0 +1,13 @@
+module.exports = function cmp (a, b) {
+ var pa = a.split('.');
+ var pb = b.split('.');
+ for (var i = 0; i < 3; i++) {
+ var na = Number(pa[i]);
+ var nb = Number(pb[i]);
+ if (na > nb) return 1;
+ if (nb > na) return -1;
+ if (!isNaN(na) && isNaN(nb)) return 1;
+ if (isNaN(na) && !isNaN(nb)) return -1;
+ }
+ return 0;
+};
diff --git a/node_modules/semver-compare/package.json b/node_modules/semver-compare/package.json
new file mode 100644
index 0000000..0b111ff
--- /dev/null
+++ b/node_modules/semver-compare/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "semver-compare",
+ "version": "1.0.0",
+ "description": "compare two semver version strings, returning -1, 0, or 1",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "^3.0.0"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/semver-compare.git"
+ },
+ "homepage": "https://github.com/substack/semver-compare",
+ "keywords": [
+ "semver",
+ "compare",
+ "cmp",
+ "comparison",
+ "sort"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/semver-compare/readme.markdown b/node_modules/semver-compare/readme.markdown
new file mode 100644
index 0000000..927a369
--- /dev/null
+++ b/node_modules/semver-compare/readme.markdown
@@ -0,0 +1,77 @@
+# semver-compare
+
+compare two semver version strings, returning -1, 0, or 1
+
+The return value can be fed straight into `[].sort`.
+
+[![build status](https://secure.travis-ci.org/substack/semver-compare.png)](http://travis-ci.org/substack/semver-compare)
+
+# example
+
+``` js
+var cmp = require('semver-compare');
+var versions = [
+ '1.2.3',
+ '4.11.6',
+ '4.2.0',
+ '1.5.19',
+ '1.5.5',
+ '4.1.3',
+ '2.3.1',
+ '10.5.5',
+ '11.3.0'
+];
+console.log(versions.sort(cmp).join('\n'));
+```
+
+prints:
+
+```
+1.2.3
+1.5.5
+1.5.19
+2.3.1
+4.1.3
+4.2.0
+4.11.6
+10.5.5
+11.3.0
+```
+
+whereas the default lexicographic sort (`versions.sort()`) would be:
+
+```
+1.2.3
+1.5.19
+1.5.5
+10.5.5
+11.3.0
+2.3.1
+4.1.3
+4.11.6
+4.2.0
+```
+
+# methods
+
+```
+var cmp = require('semver-compare')
+```
+
+## cmp(a, b)
+
+If the semver string `a` is greater than `b`, return `1`.
+If the semver string `b` is greater than `a`, return `-1`.
+If `a` equals `b`, return 0;
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install semver-compare
+```
+
+# license
+
+MIT
diff --git a/node_modules/semver-compare/test/cmp.js b/node_modules/semver-compare/test/cmp.js
new file mode 100644
index 0000000..a706234
--- /dev/null
+++ b/node_modules/semver-compare/test/cmp.js
@@ -0,0 +1,29 @@
+var cmp = require('../');
+var test = require('tape');
+
+var versions = [
+ '1.2.3',
+ '4.11.6',
+ '4.2.0',
+ '1.5.19',
+ '1.5.5',
+ '4.1.3',
+ '2.3.1',
+ '10.5.5',
+ '11.3.0'
+];
+
+test('cmp', function (t) {
+ t.plan(1);
+ t.deepEqual(versions.sort(cmp), [
+ '1.2.3',
+ '1.5.5',
+ '1.5.19',
+ '2.3.1',
+ '4.1.3',
+ '4.2.0',
+ '4.11.6',
+ '10.5.5',
+ '11.3.0'
+ ]);
+});
diff --git a/node_modules/semver/CHANGELOG.md b/node_modules/semver/CHANGELOG.md
new file mode 100644
index 0000000..66304fd
--- /dev/null
+++ b/node_modules/semver/CHANGELOG.md
@@ -0,0 +1,39 @@
+# changes log
+
+## 5.7
+
+* Add `minVersion` method
+
+## 5.6
+
+* Move boolean `loose` param to an options object, with
+ backwards-compatibility protection.
+* Add ability to opt out of special prerelease version handling with
+ the `includePrerelease` option flag.
+
+## 5.5
+
+* Add version coercion capabilities
+
+## 5.4
+
+* Add intersection checking
+
+## 5.3
+
+* Add `minSatisfying` method
+
+## 5.2
+
+* Add `prerelease(v)` that returns prerelease components
+
+## 5.1
+
+* Add Backus-Naur for ranges
+* Remove excessively cute inspection methods
+
+## 5.0
+
+* Remove AMD/Browserified build artifacts
+* Fix ltr and gtr when using the `*` range
+* Fix for range `*` with a prerelease identifier
diff --git a/node_modules/semver/LICENSE b/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md
new file mode 100644
index 0000000..f8dfa5a
--- /dev/null
+++ b/node_modules/semver/README.md
@@ -0,0 +1,412 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install --save semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero digit in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
diff --git a/node_modules/semver/bin/semver b/node_modules/semver/bin/semver
new file mode 100755
index 0000000..801e77f
--- /dev/null
+++ b/node_modules/semver/bin/semver
@@ -0,0 +1,160 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+
+var versions = []
+
+var range = []
+
+var inc = null
+
+var version = require('../package.json').version
+
+var loose = false
+
+var includePrerelease = false
+
+var coerce = false
+
+var identifier
+
+var semver = require('../semver')
+
+var reverse = false
+
+var options = {}
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(a.slice(indexOfEqualSign + 1))
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ var options = { loose: loose, includePrerelease: includePrerelease }
+
+ versions = versions.map(function (v) {
+ return coerce ? (semver.coerce(v) || { version: v }).version : v
+ }).filter(function (v) {
+ return semver.valid(v)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length)) { return failInc() }
+
+ for (var i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? 'rcompare' : 'compare'
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, options)
+ }).map(function (v) {
+ return semver.clean(v, options)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, options, identifier) : v
+ }).forEach(function (v, i, _) { console.log(v) })
+}
+
+function help () {
+ console.log(['SemVer ' + version,
+ '',
+ 'A JavaScript implementation of the https://semver.org/ specification',
+ 'Copyright Isaac Z. Schlueter',
+ '',
+ 'Usage: semver [options] <version> [<version> [...]]',
+ 'Prints valid versions sorted by SemVer precedence',
+ '',
+ 'Options:',
+ '-r --range <range>',
+ ' Print versions that match the specified range.',
+ '',
+ '-i --increment [<level>]',
+ ' Increment a version by the specified level. Level can',
+ ' be one of: major, minor, patch, premajor, preminor,',
+ " prepatch, or prerelease. Default level is 'patch'.",
+ ' Only one version may be specified.',
+ '',
+ '--preid <identifier>',
+ ' Identifier to be used to prefix premajor, preminor,',
+ ' prepatch or prerelease version increments.',
+ '',
+ '-l --loose',
+ ' Interpret versions and ranges loosely',
+ '',
+ '-p --include-prerelease',
+ ' Always include prerelease versions in range matching',
+ '',
+ '-c --coerce',
+ ' Coerce a string into SemVer if possible',
+ ' (does not imply --loose)',
+ '',
+ 'Program exits successfully if any valid version satisfies',
+ 'all supplied ranges, and prints all satisfying versions.',
+ '',
+ 'If no satisfying versions are found, then exits failure.',
+ '',
+ 'Versions are printed in ascending order, so supplying',
+ 'multiple versions to the utility will just sort them.'
+ ].join('\n'))
+}
diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json
new file mode 100644
index 0000000..69d2db1
--- /dev/null
+++ b/node_modules/semver/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "semver",
+ "version": "5.7.1",
+ "description": "The semantic version parser used by npm.",
+ "main": "semver.js",
+ "scripts": {
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
+ },
+ "devDependencies": {
+ "tap": "^13.0.0-rc.18"
+ },
+ "license": "ISC",
+ "repository": "https://github.com/npm/node-semver",
+ "bin": {
+ "semver": "./bin/semver"
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ],
+ "tap": {
+ "check-coverage": true
+ }
+}
diff --git a/node_modules/semver/range.bnf b/node_modules/semver/range.bnf
new file mode 100644
index 0000000..d4c6ae0
--- /dev/null
+++ b/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js
new file mode 100644
index 0000000..d315d5d
--- /dev/null
+++ b/node_modules/semver/semver.js
@@ -0,0 +1,1483 @@
+exports = module.exports = SemVer
+
+var debug
+/* istanbul ignore next */
+if (typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
+ debug = function () {
+ var args = Array.prototype.slice.call(arguments, 0)
+ args.unshift('SEMVER')
+ console.log.apply(console, args)
+ }
+} else {
+ debug = function () {}
+}
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0'
+
+var MAX_LENGTH = 256
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+ /* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+var MAX_SAFE_COMPONENT_LENGTH = 16
+
+// The actual regexps go on exports.re
+var re = exports.re = []
+var src = exports.src = []
+var R = 0
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
+var NUMERICIDENTIFIERLOOSE = R++
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')'
+
+var MAINVERSIONLOOSE = R++
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')'
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')'
+
+var PRERELEASEIDENTIFIERLOOSE = R++
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')'
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
+
+var PRERELEASELOOSE = R++
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?'
+
+src[FULL] = '^' + FULLPLAIN + '$'
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?'
+
+var LOOSE = R++
+src[LOOSE] = '^' + LOOSEPLAIN + '$'
+
+var GTLT = R++
+src[GTLT] = '((?:<|>)?=?)'
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
+var XRANGEIDENTIFIER = R++
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
+
+var XRANGEPLAIN = R++
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?'
+
+var XRANGEPLAINLOOSE = R++
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?'
+
+var XRANGE = R++
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
+var XRANGELOOSE = R++
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+var COERCE = R++
+src[COERCE] = '(?:^|[^\\d])' +
+ '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:$|[^\\d])'
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++
+src[LONETILDE] = '(?:~>?)'
+
+var TILDETRIM = R++
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
+var tildeTrimReplace = '$1~'
+
+var TILDE = R++
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
+var TILDELOOSE = R++
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++
+src[LONECARET] = '(?:\\^)'
+
+var CARETTRIM = R++
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
+var caretTrimReplace = '$1^'
+
+var CARET = R++
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
+var CARETLOOSE = R++
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
+var COMPARATOR = R++
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
+var comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$'
+
+var HYPHENRANGELOOSE = R++
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$'
+
+// Star ranges basically just allow anything at all.
+var STAR = R++
+src[STAR] = '(<|>)?=?\\s*\\*'
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i])
+ if (!re[i]) {
+ re[i] = new RegExp(src[i])
+ }
+}
+
+exports.parse = parse
+function parse (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ if (version.length > MAX_LENGTH) {
+ return null
+ }
+
+ var r = options.loose ? re[LOOSE] : re[FULL]
+ if (!r.test(version)) {
+ return null
+ }
+
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ return null
+ }
+}
+
+exports.valid = valid
+function valid (version, options) {
+ var v = parse(version, options)
+ return v ? v.version : null
+}
+
+exports.clean = clean
+function clean (version, options) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+
+exports.SemVer = SemVer
+
+function SemVer (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+ if (version instanceof SemVer) {
+ if (version.loose === options.loose) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+ }
+
+ if (!(this instanceof SemVer)) {
+ return new SemVer(version, options)
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+
+ var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
+
+ if (!m) {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map(function (id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+}
+
+SemVer.prototype.format = function () {
+ this.version = this.major + '.' + this.minor + '.' + this.patch
+ if (this.prerelease.length) {
+ this.version += '-' + this.prerelease.join('.')
+ }
+ return this.version
+}
+
+SemVer.prototype.toString = function () {
+ return this.version
+}
+
+SemVer.prototype.compare = function (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+}
+
+SemVer.prototype.compareMain = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+}
+
+SemVer.prototype.comparePre = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ var i = 0
+ do {
+ var a = this.prerelease[i]
+ var b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+}
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function (release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier)
+ this.inc('pre', identifier)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier)
+ }
+ this.inc('pre', identifier)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0]
+ } else {
+ var i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ this.prerelease.push(0)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0]
+ }
+ } else {
+ this.prerelease = [identifier, 0]
+ }
+ }
+ break
+
+ default:
+ throw new Error('invalid increment argument: ' + release)
+ }
+ this.format()
+ this.raw = this.version
+ return this
+}
+
+exports.inc = inc
+function inc (version, release, loose, identifier) {
+ if (typeof (loose) === 'string') {
+ identifier = loose
+ loose = undefined
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version
+ } catch (er) {
+ return null
+ }
+}
+
+exports.diff = diff
+function diff (version1, version2) {
+ if (eq(version1, version2)) {
+ return null
+ } else {
+ var v1 = parse(version1)
+ var v2 = parse(version2)
+ var prefix = ''
+ if (v1.prerelease.length || v2.prerelease.length) {
+ prefix = 'pre'
+ var defaultResult = 'prerelease'
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return prefix + key
+ }
+ }
+ }
+ return defaultResult // may be undefined
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers
+
+var numeric = /^[0-9]+$/
+function compareIdentifiers (a, b) {
+ var anum = numeric.test(a)
+ var bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers
+function rcompareIdentifiers (a, b) {
+ return compareIdentifiers(b, a)
+}
+
+exports.major = major
+function major (a, loose) {
+ return new SemVer(a, loose).major
+}
+
+exports.minor = minor
+function minor (a, loose) {
+ return new SemVer(a, loose).minor
+}
+
+exports.patch = patch
+function patch (a, loose) {
+ return new SemVer(a, loose).patch
+}
+
+exports.compare = compare
+function compare (a, b, loose) {
+ return new SemVer(a, loose).compare(new SemVer(b, loose))
+}
+
+exports.compareLoose = compareLoose
+function compareLoose (a, b) {
+ return compare(a, b, true)
+}
+
+exports.rcompare = rcompare
+function rcompare (a, b, loose) {
+ return compare(b, a, loose)
+}
+
+exports.sort = sort
+function sort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compare(a, b, loose)
+ })
+}
+
+exports.rsort = rsort
+function rsort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.rcompare(a, b, loose)
+ })
+}
+
+exports.gt = gt
+function gt (a, b, loose) {
+ return compare(a, b, loose) > 0
+}
+
+exports.lt = lt
+function lt (a, b, loose) {
+ return compare(a, b, loose) < 0
+}
+
+exports.eq = eq
+function eq (a, b, loose) {
+ return compare(a, b, loose) === 0
+}
+
+exports.neq = neq
+function neq (a, b, loose) {
+ return compare(a, b, loose) !== 0
+}
+
+exports.gte = gte
+function gte (a, b, loose) {
+ return compare(a, b, loose) >= 0
+}
+
+exports.lte = lte
+function lte (a, b, loose) {
+ return compare(a, b, loose) <= 0
+}
+
+exports.cmp = cmp
+function cmp (a, op, b, loose) {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError('Invalid operator: ' + op)
+ }
+}
+
+exports.Comparator = Comparator
+function Comparator (comp, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ if (!(this instanceof Comparator)) {
+ return new Comparator(comp, options)
+ }
+
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+}
+
+var ANY = {}
+Comparator.prototype.parse = function (comp) {
+ var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
+ var m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError('Invalid comparator: ' + comp)
+ }
+
+ this.operator = m[1]
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+}
+
+Comparator.prototype.toString = function () {
+ return this.value
+}
+
+Comparator.prototype.test = function (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ version = new SemVer(version, this.options)
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+}
+
+Comparator.prototype.intersects = function (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ var rangeTmp
+
+ if (this.operator === '') {
+ rangeTmp = new Range(comp.value, options)
+ return satisfies(this.value, rangeTmp, options)
+ } else if (comp.operator === '') {
+ rangeTmp = new Range(this.value, options)
+ return satisfies(comp.semver, rangeTmp, options)
+ }
+
+ var sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>')
+ var sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ var sameSemVer = this.semver.version === comp.semver.version
+ var differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=')
+ var oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, options) &&
+ ((this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<'))
+ var oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, options) &&
+ ((this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>'))
+
+ return sameDirectionIncreasing || sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
+}
+
+exports.Range = Range
+function Range (range, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (range instanceof Range) {
+ if (range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ return new Range(range.value, options)
+ }
+
+ if (!(this instanceof Range)) {
+ return new Range(range, options)
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First, split based on boolean or ||
+ this.raw = range
+ this.set = range.split(/\s*\|\|\s*/).map(function (range) {
+ return this.parseRange(range.trim())
+ }, this).filter(function (c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length
+ })
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range)
+ }
+
+ this.format()
+}
+
+Range.prototype.format = function () {
+ this.range = this.set.map(function (comps) {
+ return comps.join(' ').trim()
+ }).join('||').trim()
+ return this.range
+}
+
+Range.prototype.toString = function () {
+ return this.range
+}
+
+Range.prototype.parseRange = function (range) {
+ var loose = this.options.loose
+ range = range.trim()
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace)
+ debug('hyphen replace', range)
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range, re[COMPARATORTRIM])
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace)
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ')
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
+ var set = range.split(' ').map(function (comp) {
+ return parseComparator(comp, this.options)
+ }, this).join(' ').split(/\s+/)
+ if (this.options.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function (comp) {
+ return !!comp.match(compRe)
+ })
+ }
+ set = set.map(function (comp) {
+ return new Comparator(comp, this.options)
+ }, this)
+
+ return set
+}
+
+Range.prototype.intersects = function (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some(function (thisComparators) {
+ return thisComparators.every(function (thisComparator) {
+ return range.set.some(function (rangeComparators) {
+ return rangeComparators.every(function (rangeComparator) {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ })
+ })
+}
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators
+function toComparators (range, options) {
+ return new Range(range, options).set.map(function (comp) {
+ return comp.map(function (c) {
+ return c.value
+ }).join(' ').trim().split(' ')
+ })
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator (comp, options) {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+function isX (id) {
+ return !id || id.toLowerCase() === 'x' || id === '*'
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceTilde(comp, options)
+ }).join(' ')
+}
+
+function replaceTilde (comp, options) {
+ var r = options.loose ? re[TILDELOOSE] : re[TILDE]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceCaret(comp, options)
+ }).join(' ')
+}
+
+function replaceCaret (comp, options) {
+ debug('caret', comp, options)
+ var r = options.loose ? re[CARETLOOSE] : re[CARET]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+function replaceXRanges (comp, options) {
+ debug('replaceXRanges', comp, options)
+ return comp.split(/\s+/).map(function (comp) {
+ return replaceXRange(comp, options)
+ }).join(' ')
+}
+
+function replaceXRange (comp, options) {
+ comp = comp.trim()
+ var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
+ return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ var xM = isX(M)
+ var xm = xM || isX(m)
+ var xp = xm || isX(p)
+ var anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars (comp, options) {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '')
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = '>=' + fM + '.0.0'
+ } else if (isX(fp)) {
+ from = '>=' + fM + '.' + fm + '.0'
+ } else {
+ from = '>=' + from
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = '<' + (+tM + 1) + '.0.0'
+ } else if (isX(tp)) {
+ to = '<' + tM + '.' + (+tm + 1) + '.0'
+ } else if (tpr) {
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
+ } else {
+ to = '<=' + to
+ }
+
+ return (from + ' ' + to).trim()
+}
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ version = new SemVer(version, this.options)
+ }
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+}
+
+function testSet (set, version, options) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
+
+exports.satisfies = satisfies
+function satisfies (version, range, options) {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+
+exports.maxSatisfying = maxSatisfying
+function maxSatisfying (versions, range, options) {
+ var max = null
+ var maxSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+
+exports.minSatisfying = minSatisfying
+function minSatisfying (versions, range, options) {
+ var min = null
+ var minSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+
+exports.minVersion = minVersion
+function minVersion (range, loose) {
+ range = new Range(range, loose)
+
+ var minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ comparators.forEach(function (comparator) {
+ // Clone to avoid manipulating the comparator's semver object.
+ var compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!minver || gt(minver, compver)) {
+ minver = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error('Unexpected operation: ' + comparator.operator)
+ }
+ })
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+
+exports.validRange = validRange
+function validRange (range, options) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr
+function ltr (version, range, options) {
+ return outside(version, range, '<', options)
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr
+function gtr (version, range, options) {
+ return outside(version, range, '>', options)
+}
+
+exports.outside = outside
+function outside (version, range, hilo, options) {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ var gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ var high = null
+ var low = null
+
+ comparators.forEach(function (comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+exports.prerelease = prerelease
+function prerelease (version, options) {
+ var parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+
+exports.intersects = intersects
+function intersects (r1, r2, options) {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2)
+}
+
+exports.coerce = coerce
+function coerce (version) {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ var match = version.match(re[COERCE])
+
+ if (match == null) {
+ return null
+ }
+
+ return parse(match[1] +
+ '.' + (match[2] || '0') +
+ '.' + (match[3] || '0'))
+}
diff --git a/node_modules/serialize-error/index.d.ts b/node_modules/serialize-error/index.d.ts
new file mode 100644
index 0000000..714dc9f
--- /dev/null
+++ b/node_modules/serialize-error/index.d.ts
@@ -0,0 +1,58 @@
+import {Primitive, JsonObject} from 'type-fest';
+
+export type ErrorObject = {
+ name?: string;
+ stack?: string;
+ message?: string;
+ code?: string;
+} & JsonObject;
+
+/**
+Serialize an `Error` object into a plain object.
+
+Non-error values are passed through.
+Custom properties are preserved.
+Circular references are handled.
+
+@example
+```
+import {serializeError} from 'serialize-error';
+
+const error = new Error('🦄');
+
+console.log(error);
+//=> [Error: 🦄]
+
+console.log(serializeError(error));
+//=> {name: 'Error', message: '🦄', stack: 'Error: 🦄\n at Object.<anonymous> …'}
+```
+*/
+export function serializeError<ErrorType>(error: ErrorType): ErrorType extends Primitive
+ ? ErrorType
+ : ErrorObject;
+
+/**
+Deserialize a plain object or any value into an `Error` object.
+
+`Error` objects are passed through.
+Non-error values are wrapped in a `NonError` error.
+Custom properties are preserved.
+Non-enumerable properties are kept non-enumerable (name, message, stack).
+Enumerable properties are kept enumerable (all properties besides the non-enumerable ones).
+Circular references are handled.
+
+@example
+```
+import {deserializeError} from 'serialize-error';
+
+const error = deserializeError({
+ message: 'aaa',
+ stack: 'at <anonymous>:1:13'
+});
+
+console.log(error);
+// Error: aaa
+// at <anonymous>:1:13
+```
+*/
+export function deserializeError(errorObject: ErrorObject | unknown): Error;
diff --git a/node_modules/serialize-error/index.js b/node_modules/serialize-error/index.js
new file mode 100644
index 0000000..508c6a2
--- /dev/null
+++ b/node_modules/serialize-error/index.js
@@ -0,0 +1,101 @@
+'use strict';
+
+class NonError extends Error {
+ constructor(message) {
+ super(NonError._prepareSuperMessage(message));
+ Object.defineProperty(this, 'name', {
+ value: 'NonError',
+ configurable: true,
+ writable: true
+ });
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, NonError);
+ }
+ }
+
+ static _prepareSuperMessage(message) {
+ try {
+ return JSON.stringify(message);
+ } catch (_) {
+ return String(message);
+ }
+ }
+}
+
+const commonProperties = [
+ {property: 'name', enumerable: false},
+ {property: 'message', enumerable: false},
+ {property: 'stack', enumerable: false},
+ {property: 'code', enumerable: true}
+];
+
+const destroyCircular = ({from, seen, to_, forceEnumerable}) => {
+ const to = to_ || (Array.isArray(from) ? [] : {});
+
+ seen.push(from);
+
+ for (const [key, value] of Object.entries(from)) {
+ if (typeof value === 'function') {
+ continue;
+ }
+
+ if (!value || typeof value !== 'object') {
+ to[key] = value;
+ continue;
+ }
+
+ if (!seen.includes(from[key])) {
+ to[key] = destroyCircular({from: from[key], seen: seen.slice(), forceEnumerable});
+ continue;
+ }
+
+ to[key] = '[Circular]';
+ }
+
+ for (const {property, enumerable} of commonProperties) {
+ if (typeof from[property] === 'string') {
+ Object.defineProperty(to, property, {
+ value: from[property],
+ enumerable: forceEnumerable ? true : enumerable,
+ configurable: true,
+ writable: true
+ });
+ }
+ }
+
+ return to;
+};
+
+const serializeError = value => {
+ if (typeof value === 'object' && value !== null) {
+ return destroyCircular({from: value, seen: [], forceEnumerable: true});
+ }
+
+ // People sometimes throw things besides Error objects…
+ if (typeof value === 'function') {
+ // `JSON.stringify()` discards functions. We do too, unless a function is thrown directly.
+ return `[Function: ${(value.name || 'anonymous')}]`;
+ }
+
+ return value;
+};
+
+const deserializeError = value => {
+ if (value instanceof Error) {
+ return value;
+ }
+
+ if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
+ const newError = new Error();
+ destroyCircular({from: value, seen: [], to_: newError});
+ return newError;
+ }
+
+ return new NonError(value);
+};
+
+module.exports = {
+ serializeError,
+ deserializeError
+};
diff --git a/node_modules/serialize-error/license b/node_modules/serialize-error/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/serialize-error/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/serialize-error/package.json b/node_modules/serialize-error/package.json
new file mode 100644
index 0000000..8caa8eb
--- /dev/null
+++ b/node_modules/serialize-error/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "serialize-error",
+ "version": "7.0.1",
+ "description": "Serialize/deserialize an error into a plain object",
+ "license": "MIT",
+ "repository": "sindresorhus/serialize-error",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "error",
+ "serialize",
+ "stringify",
+ "object",
+ "convert",
+ "process",
+ "send",
+ "deserialize"
+ ],
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.30.0"
+ }
+}
diff --git a/node_modules/serialize-error/readme.md b/node_modules/serialize-error/readme.md
new file mode 100644
index 0000000..d27f004
--- /dev/null
+++ b/node_modules/serialize-error/readme.md
@@ -0,0 +1,55 @@
+# serialize-error [![Build Status](https://travis-ci.org/sindresorhus/serialize-error.svg?branch=master)](https://travis-ci.org/sindresorhus/serialize-error)
+
+> Serialize/deserialize an error into a plain object
+
+Useful if you for example need to `JSON.stringify()` or `process.send()` the error.
+
+## Install
+
+```
+$ npm install serialize-error
+```
+
+## Usage
+
+```js
+const {serializeError, deserializeError} = require('serialize-error');
+
+const error = new Error('🦄');
+
+console.log(error);
+//=> [Error: 🦄]
+
+const serialized = serializeError(error)
+
+console.log(serialized);
+//=> {name: 'Error', message: '🦄', stack: 'Error: 🦄\n at Object.<anonymous> …'}
+
+const deserialized = deserializeError(serialized);
+//=> [Error: 🦄]
+```
+
+## API
+
+### serializeError(value)
+
+Type: `Error | unknown`
+
+Serialize an `Error` object into a plain object.
+
+Non-error values are passed through.
+Custom properties are preserved.
+Non-enumerable properties are kept non-enumerable (name, message, stack).
+Enumerable properties are kept enumerable (all properties besides the non-enumerable ones).
+Circular references are handled.
+
+### deserializeError(value)
+
+Type: `{[key: string]: unknown} | unknown`
+
+Deserialize a plain object or any value into an `Error` object.
+
+`Error` objects are passed through.
+Non-error values are wrapped in a `NonError` error.
+Custom properties are preserved.
+Circular references are handled.
diff --git a/node_modules/shebang-command/index.js b/node_modules/shebang-command/index.js
new file mode 100644
index 0000000..f35db30
--- /dev/null
+++ b/node_modules/shebang-command/index.js
@@ -0,0 +1,19 @@
+'use strict';
+const shebangRegex = require('shebang-regex');
+
+module.exports = (string = '') => {
+ const match = string.match(shebangRegex);
+
+ if (!match) {
+ return null;
+ }
+
+ const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
+ const binary = path.split('/').pop();
+
+ if (binary === 'env') {
+ return argument;
+ }
+
+ return argument ? `${binary} ${argument}` : binary;
+};
diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license
new file mode 100644
index 0000000..db6bc32
--- /dev/null
+++ b/node_modules/shebang-command/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
+
+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/shebang-command/package.json b/node_modules/shebang-command/package.json
new file mode 100644
index 0000000..18e3c04
--- /dev/null
+++ b/node_modules/shebang-command/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "shebang-command",
+ "version": "2.0.0",
+ "description": "Get the command from a shebang",
+ "license": "MIT",
+ "repository": "kevva/shebang-command",
+ "author": {
+ "name": "Kevin Mårtensson",
+ "email": "kevinmartensson@gmail.com",
+ "url": "github.com/kevva"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "cmd",
+ "command",
+ "parse",
+ "shebang"
+ ],
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "^2.3.0",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md
new file mode 100644
index 0000000..84feb44
--- /dev/null
+++ b/node_modules/shebang-command/readme.md
@@ -0,0 +1,34 @@
+# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command)
+
+> Get the command from a shebang
+
+
+## Install
+
+```
+$ npm install shebang-command
+```
+
+
+## Usage
+
+```js
+const shebangCommand = require('shebang-command');
+
+shebangCommand('#!/usr/bin/env node');
+//=> 'node'
+
+shebangCommand('#!/bin/bash');
+//=> 'bash'
+```
+
+
+## API
+
+### shebangCommand(string)
+
+#### string
+
+Type: `string`
+
+String containing a shebang.
diff --git a/node_modules/shebang-regex/index.d.ts b/node_modules/shebang-regex/index.d.ts
new file mode 100644
index 0000000..61d034b
--- /dev/null
+++ b/node_modules/shebang-regex/index.d.ts
@@ -0,0 +1,22 @@
+/**
+Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line.
+
+@example
+```
+import shebangRegex = require('shebang-regex');
+
+const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
+
+shebangRegex.test(string);
+//=> true
+
+shebangRegex.exec(string)[0];
+//=> '#!/usr/bin/env node'
+
+shebangRegex.exec(string)[1];
+//=> '/usr/bin/env node'
+```
+*/
+declare const shebangRegex: RegExp;
+
+export = shebangRegex;
diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js
new file mode 100644
index 0000000..63fc4a0
--- /dev/null
+++ b/node_modules/shebang-regex/index.js
@@ -0,0 +1,2 @@
+'use strict';
+module.exports = /^#!(.*)/;
diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/shebang-regex/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/shebang-regex/package.json b/node_modules/shebang-regex/package.json
new file mode 100644
index 0000000..00ab30f
--- /dev/null
+++ b/node_modules/shebang-regex/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "shebang-regex",
+ "version": "3.0.0",
+ "description": "Regular expression for matching a shebang line",
+ "license": "MIT",
+ "repository": "sindresorhus/shebang-regex",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "keywords": [
+ "regex",
+ "regexp",
+ "shebang",
+ "match",
+ "test",
+ "line"
+ ],
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ }
+}
diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md
new file mode 100644
index 0000000..5ecf863
--- /dev/null
+++ b/node_modules/shebang-regex/readme.md
@@ -0,0 +1,33 @@
+# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex)
+
+> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line
+
+
+## Install
+
+```
+$ npm install shebang-regex
+```
+
+
+## Usage
+
+```js
+const shebangRegex = require('shebang-regex');
+
+const string = '#!/usr/bin/env node\nconsole.log("unicorns");';
+
+shebangRegex.test(string);
+//=> true
+
+shebangRegex.exec(string)[0];
+//=> '#!/usr/bin/env node'
+
+shebangRegex.exec(string)[1];
+//=> '/usr/bin/env node'
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/signal-exit/CHANGELOG.md b/node_modules/signal-exit/CHANGELOG.md
new file mode 100644
index 0000000..ed104f4
--- /dev/null
+++ b/node_modules/signal-exit/CHANGELOG.md
@@ -0,0 +1,35 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+### [3.0.3](https://github.com/tapjs/signal-exit/compare/v3.0.2...v3.0.3) (2020-03-26)
+
+
+### Bug Fixes
+
+* patch `SIGHUP` to `SIGINT` when on Windows ([cfd1046](https://github.com/tapjs/signal-exit/commit/cfd1046079af4f0e44f93c69c237a09de8c23ef2))
+* **ci:** use Travis for Windows builds ([007add7](https://github.com/tapjs/signal-exit/commit/007add793d2b5ae3c382512103adbf321768a0b8))
+
+<a name="3.0.1"></a>
+## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08)
+
+
+### Bug Fixes
+
+* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb))
+
+
+
+<a name="3.0.0"></a>
+# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13)
+
+
+### Bug Fixes
+
+* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8))
+* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c))
+
+
+### BREAKING CHANGES
+
+* signal-exit no longer wires into SIGPROF
diff --git a/node_modules/signal-exit/LICENSE.txt b/node_modules/signal-exit/LICENSE.txt
new file mode 100644
index 0000000..eead04a
--- /dev/null
+++ b/node_modules/signal-exit/LICENSE.txt
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) 2015, Contributors
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/signal-exit/README.md b/node_modules/signal-exit/README.md
new file mode 100644
index 0000000..9f8eb59
--- /dev/null
+++ b/node_modules/signal-exit/README.md
@@ -0,0 +1,39 @@
+# signal-exit
+
+[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit)
+[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master)
+[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit)
+[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
+
+When you want to fire an event no matter how a process exits:
+
+* reaching the end of execution.
+* explicitly having `process.exit(code)` called.
+* having `process.kill(pid, sig)` called.
+* receiving a fatal signal from outside the process
+
+Use `signal-exit`.
+
+```js
+var onExit = require('signal-exit')
+
+onExit(function (code, signal) {
+ console.log('process exited!')
+})
+```
+
+## API
+
+`var remove = onExit(function (code, signal) {}, options)`
+
+The return value of the function is a function that will remove the
+handler.
+
+Note that the function *only* fires for signals if the signal would
+cause the proces to exit. That is, there are no other listeners, and
+it is a fatal signal.
+
+## Options
+
+* `alwaysLast`: Run this handler after any other signal or exit
+ handlers. This causes `process.emit` to be monkeypatched.
diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js
new file mode 100644
index 0000000..6b6c43a
--- /dev/null
+++ b/node_modules/signal-exit/index.js
@@ -0,0 +1,163 @@
+// Note: since nyc uses this module to output coverage, any lines
+// that are in the direct sync flow of nyc's outputCoverage are
+// ignored, since we can never get coverage for them.
+var assert = require('assert')
+var signals = require('./signals.js')
+var isWin = /^win/i.test(process.platform)
+
+var EE = require('events')
+/* istanbul ignore if */
+if (typeof EE !== 'function') {
+ EE = EE.EventEmitter
+}
+
+var emitter
+if (process.__signal_exit_emitter__) {
+ emitter = process.__signal_exit_emitter__
+} else {
+ emitter = process.__signal_exit_emitter__ = new EE()
+ emitter.count = 0
+ emitter.emitted = {}
+}
+
+// Because this emitter is a global, we have to check to see if a
+// previous version of this library failed to enable infinite listeners.
+// I know what you're about to say. But literally everything about
+// signal-exit is a compromise with evil. Get used to it.
+if (!emitter.infinite) {
+ emitter.setMaxListeners(Infinity)
+ emitter.infinite = true
+}
+
+module.exports = function (cb, opts) {
+ assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
+
+ if (loaded === false) {
+ load()
+ }
+
+ var ev = 'exit'
+ if (opts && opts.alwaysLast) {
+ ev = 'afterexit'
+ }
+
+ var remove = function () {
+ emitter.removeListener(ev, cb)
+ if (emitter.listeners('exit').length === 0 &&
+ emitter.listeners('afterexit').length === 0) {
+ unload()
+ }
+ }
+ emitter.on(ev, cb)
+
+ return remove
+}
+
+module.exports.unload = unload
+function unload () {
+ if (!loaded) {
+ return
+ }
+ loaded = false
+
+ signals.forEach(function (sig) {
+ try {
+ process.removeListener(sig, sigListeners[sig])
+ } catch (er) {}
+ })
+ process.emit = originalProcessEmit
+ process.reallyExit = originalProcessReallyExit
+ emitter.count -= 1
+}
+
+function emit (event, code, signal) {
+ if (emitter.emitted[event]) {
+ return
+ }
+ emitter.emitted[event] = true
+ emitter.emit(event, code, signal)
+}
+
+// { <signal>: <listener fn>, ... }
+var sigListeners = {}
+signals.forEach(function (sig) {
+ sigListeners[sig] = function listener () {
+ // If there are no other listeners, an exit is coming!
+ // Simplest way: remove us and then re-send the signal.
+ // We know that this will kill the process, so we can
+ // safely emit now.
+ var listeners = process.listeners(sig)
+ if (listeners.length === emitter.count) {
+ unload()
+ emit('exit', null, sig)
+ /* istanbul ignore next */
+ emit('afterexit', null, sig)
+ /* istanbul ignore next */
+ if (isWin && sig === 'SIGHUP') {
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
+ // so use a supported signal instead
+ sig = 'SIGINT'
+ }
+ process.kill(process.pid, sig)
+ }
+ }
+})
+
+module.exports.signals = function () {
+ return signals
+}
+
+module.exports.load = load
+
+var loaded = false
+
+function load () {
+ if (loaded) {
+ return
+ }
+ loaded = true
+
+ // This is the number of onSignalExit's that are in play.
+ // It's important so that we can count the correct number of
+ // listeners on signals, and don't wait for the other one to
+ // handle it instead of us.
+ emitter.count += 1
+
+ signals = signals.filter(function (sig) {
+ try {
+ process.on(sig, sigListeners[sig])
+ return true
+ } catch (er) {
+ return false
+ }
+ })
+
+ process.emit = processEmit
+ process.reallyExit = processReallyExit
+}
+
+var originalProcessReallyExit = process.reallyExit
+function processReallyExit (code) {
+ process.exitCode = code || 0
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ /* istanbul ignore next */
+ originalProcessReallyExit.call(process, process.exitCode)
+}
+
+var originalProcessEmit = process.emit
+function processEmit (ev, arg) {
+ if (ev === 'exit') {
+ if (arg !== undefined) {
+ process.exitCode = arg
+ }
+ var ret = originalProcessEmit.apply(this, arguments)
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ return ret
+ } else {
+ return originalProcessEmit.apply(this, arguments)
+ }
+}
diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json
new file mode 100644
index 0000000..59b0ac1
--- /dev/null
+++ b/node_modules/signal-exit/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "signal-exit",
+ "version": "3.0.3",
+ "description": "when you want to fire an event no matter how a process exits.",
+ "main": "index.js",
+ "scripts": {
+ "pretest": "standard",
+ "test": "tap --timeout=240 ./test/*.js --cov",
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
+ "release": "standard-version"
+ },
+ "files": [
+ "index.js",
+ "signals.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/tapjs/signal-exit.git"
+ },
+ "keywords": [
+ "signal",
+ "exit"
+ ],
+ "author": "Ben Coe <ben@npmjs.com>",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/tapjs/signal-exit/issues"
+ },
+ "homepage": "https://github.com/tapjs/signal-exit",
+ "devDependencies": {
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.10",
+ "nyc": "^8.1.0",
+ "standard": "^8.1.0",
+ "standard-version": "^2.3.0",
+ "tap": "^8.0.1"
+ }
+}
diff --git a/node_modules/signal-exit/signals.js b/node_modules/signal-exit/signals.js
new file mode 100644
index 0000000..3bd67a8
--- /dev/null
+++ b/node_modules/signal-exit/signals.js
@@ -0,0 +1,53 @@
+// This is not the set of all possible signals.
+//
+// It IS, however, the set of all signals that trigger
+// an exit on either Linux or BSD systems. Linux is a
+// superset of the signal names supported on BSD, and
+// the unknown signals just fail to register, so we can
+// catch that easily enough.
+//
+// Don't bother with SIGKILL. It's uncatchable, which
+// means that we can't fire any callbacks anyway.
+//
+// If a user does happen to register a handler on a non-
+// fatal signal like SIGWINCH or something, and then
+// exit, it'll end up firing `process.emit('exit')`, so
+// the handler will be fired anyway.
+//
+// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
+// artificially, inherently leave the process in a
+// state from which it is not safe to try and enter JS
+// listeners.
+module.exports = [
+ 'SIGABRT',
+ 'SIGALRM',
+ 'SIGHUP',
+ 'SIGINT',
+ 'SIGTERM'
+]
+
+if (process.platform !== 'win32') {
+ module.exports.push(
+ 'SIGVTALRM',
+ 'SIGXCPU',
+ 'SIGXFSZ',
+ 'SIGUSR2',
+ 'SIGTRAP',
+ 'SIGSYS',
+ 'SIGQUIT',
+ 'SIGIOT'
+ // should detect profiler and enable/disable accordingly.
+ // see #21
+ // 'SIGPROF'
+ )
+}
+
+if (process.platform === 'linux') {
+ module.exports.push(
+ 'SIGIO',
+ 'SIGPOLL',
+ 'SIGPWR',
+ 'SIGSTKFLT',
+ 'SIGUNUSED'
+ )
+}
diff --git a/node_modules/single-line-log/.npmignore b/node_modules/single-line-log/.npmignore
new file mode 100644
index 0000000..b512c09
--- /dev/null
+++ b/node_modules/single-line-log/.npmignore
@@ -0,0 +1 @@
+node_modules \ No newline at end of file
diff --git a/node_modules/single-line-log/LICENSE b/node_modules/single-line-log/LICENSE
new file mode 100644
index 0000000..57dffb7
--- /dev/null
+++ b/node_modules/single-line-log/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Tobias Baunbæk <freeall@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/single-line-log/README.md b/node_modules/single-line-log/README.md
new file mode 100644
index 0000000..f142e30
--- /dev/null
+++ b/node_modules/single-line-log/README.md
@@ -0,0 +1,56 @@
+# single-line-log
+
+Node.js module that keeps writing to the same line in the console (or a stream). Very useful when you write progress bars, or a status message during longer operations. Supports multilines.
+
+
+## Installation
+
+ npm install single-line-log
+
+
+## Usage
+
+``` js
+var log = require('single-line-log').stdout;
+// or pass any stream:
+// var log = require('single-line-log')(process.stdout);
+
+var read = 0;
+var size = fs.statSync('super-large-file').size;
+
+var rs = fs.createReadStream('super-large-file');
+rs.on('data', function(data) {
+ read += data.length;
+ var percentage = Math.floor(100*read/size);
+
+ // Keep writing to the same two lines in the console
+ log('Writing to super large file\n[' + percentage + '%]', read, 'bytes read');
+});
+```
+
+## .clear()
+
+Clears the log (i.e., writes a newline).
+
+``` js
+var log = require('single-line-log').stdout;
+
+log('Line 1');
+log.clear();
+log('Line 2');
+```
+
+
+## .stdout
+
+Outputs to `process.stdout`.
+
+
+## .stderr
+
+Outputs to `process.stderr`.
+
+
+## License
+
+MIT \ No newline at end of file
diff --git a/node_modules/single-line-log/index.js b/node_modules/single-line-log/index.js
new file mode 100644
index 0000000..c1201be
--- /dev/null
+++ b/node_modules/single-line-log/index.js
@@ -0,0 +1,51 @@
+var MOVE_LEFT = new Buffer('1b5b3130303044', 'hex').toString();
+var MOVE_UP = new Buffer('1b5b3141', 'hex').toString();
+var CLEAR_LINE = new Buffer('1b5b304b', 'hex').toString();
+var stringWidth = require('string-width');
+
+module.exports = function(stream) {
+ var write = stream.write;
+ var str;
+
+ stream.write = function(data) {
+ if (str && data !== str) str = null;
+ return write.apply(this, arguments);
+ };
+
+ if (stream === process.stderr || stream === process.stdout) {
+ process.on('exit', function() {
+ if (str !== null) stream.write('');
+ });
+ }
+
+ var prevLineCount = 0;
+ var log = function() {
+ str = '';
+ var nextStr = Array.prototype.join.call(arguments, ' ');
+
+ // Clear screen
+ for (var i=0; i<prevLineCount; i++) {
+ str += MOVE_LEFT + CLEAR_LINE + (i < prevLineCount-1 ? MOVE_UP : '');
+ }
+
+ // Actual log output
+ str += nextStr;
+ stream.write(str);
+
+ // How many lines to remove on next clear screen
+ var prevLines = nextStr.split('\n');
+ prevLineCount = 0;
+ for (var i=0; i < prevLines.length; i++) {
+ prevLineCount += Math.ceil(stringWidth(prevLines[i]) / stream.columns) || 1;
+ }
+ };
+
+ log.clear = function() {
+ stream.write('');
+ };
+
+ return log;
+};
+
+module.exports.stdout = module.exports(process.stdout);
+module.exports.stderr = module.exports(process.stderr);
diff --git a/node_modules/single-line-log/package.json b/node_modules/single-line-log/package.json
new file mode 100644
index 0000000..077faab
--- /dev/null
+++ b/node_modules/single-line-log/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "single-line-log",
+ "description": "Keep writing to the same line in the terminal. Very useful when you write progress bars, or a status message during longer operations",
+ "keywords": [
+ "single",
+ "line",
+ "log",
+ "output",
+ "overwrite",
+ "collapse",
+ "stdout",
+ "terminal",
+ "tty",
+ "cli",
+ "shell"
+ ],
+ "version": "1.1.2",
+ "repository": "git://github.com/freeall/single-line-log.git",
+ "license": "MIT",
+ "author": "Tobias Baunbæk <freeall@gmail.com>",
+ "dependencies": {
+ "string-width": "^1.0.1"
+ },
+ "scripts": {
+ "test": "node test.js"
+ }
+}
diff --git a/node_modules/single-line-log/test.js b/node_modules/single-line-log/test.js
new file mode 100644
index 0000000..c8a2e79
--- /dev/null
+++ b/node_modules/single-line-log/test.js
@@ -0,0 +1,21 @@
+var log = require('./index').stdout;
+
+var i = 0;
+setInterval(function() {
+ i++;
+
+ var s = 'line 1 - ' + Math.random();
+
+ if (i < 10) s += ' - ' + Math.random();
+
+ if (i < 40) s += '\nline 2 - ' + Math.random();
+ if (i < 30) s += '\nline 3 - ' + Math.random();
+ if (i < 20) s += '\nline 4 - ' + Math.random();
+
+ log(s);
+
+ if (i === 50) {
+ log.clear();
+ process.exit(0);
+ }
+}, 200);
diff --git a/node_modules/spdx-correct/LICENSE b/node_modules/spdx-correct/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/node_modules/spdx-correct/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/spdx-correct/README.md b/node_modules/spdx-correct/README.md
new file mode 100644
index 0000000..ab388cf
--- /dev/null
+++ b/node_modules/spdx-correct/README.md
@@ -0,0 +1,14 @@
+```javascript
+var correct = require('spdx-correct')
+var assert = require('assert')
+
+assert.equal(correct('mit'), 'MIT')
+
+assert.equal(correct('Apache 2'), 'Apache-2.0')
+
+assert(correct('No idea what license') === null)
+
+// disable upgrade option
+assert(correct('GPL-3.0'), 'GPL-3.0-or-later')
+assert(correct('GPL-3.0', { upgrade: false }), 'GPL-3.0')
+```
diff --git a/node_modules/spdx-correct/index.js b/node_modules/spdx-correct/index.js
new file mode 100644
index 0000000..c51a79f
--- /dev/null
+++ b/node_modules/spdx-correct/index.js
@@ -0,0 +1,364 @@
+/*
+Copyright spdx-correct.js contributors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+var parse = require('spdx-expression-parse')
+var spdxLicenseIds = require('spdx-license-ids')
+
+function valid (string) {
+ try {
+ parse(string)
+ return true
+ } catch (error) {
+ return false
+ }
+}
+
+// Common transpositions of license identifier acronyms
+var transpositions = [
+ ['APGL', 'AGPL'],
+ ['Gpl', 'GPL'],
+ ['GLP', 'GPL'],
+ ['APL', 'Apache'],
+ ['ISD', 'ISC'],
+ ['GLP', 'GPL'],
+ ['IST', 'ISC'],
+ ['Claude', 'Clause'],
+ [' or later', '+'],
+ [' International', ''],
+ ['GNU', 'GPL'],
+ ['GUN', 'GPL'],
+ ['+', ''],
+ ['GNU GPL', 'GPL'],
+ ['GNU/GPL', 'GPL'],
+ ['GNU GLP', 'GPL'],
+ ['GNU General Public License', 'GPL'],
+ ['Gnu public license', 'GPL'],
+ ['GNU Public License', 'GPL'],
+ ['GNU GENERAL PUBLIC LICENSE', 'GPL'],
+ ['MTI', 'MIT'],
+ ['Mozilla Public License', 'MPL'],
+ ['Universal Permissive License', 'UPL'],
+ ['WTH', 'WTF'],
+ ['-License', '']
+]
+
+var TRANSPOSED = 0
+var CORRECT = 1
+
+// Simple corrections to nearly valid identifiers.
+var transforms = [
+ // e.g. 'mit'
+ function (argument) {
+ return argument.toUpperCase()
+ },
+ // e.g. 'MIT '
+ function (argument) {
+ return argument.trim()
+ },
+ // e.g. 'M.I.T.'
+ function (argument) {
+ return argument.replace(/\./g, '')
+ },
+ // e.g. 'Apache- 2.0'
+ function (argument) {
+ return argument.replace(/\s+/g, '')
+ },
+ // e.g. 'CC BY 4.0''
+ function (argument) {
+ return argument.replace(/\s+/g, '-')
+ },
+ // e.g. 'LGPLv2.1'
+ function (argument) {
+ return argument.replace('v', '-')
+ },
+ // e.g. 'Apache 2.0'
+ function (argument) {
+ return argument.replace(/,?\s*(\d)/, '-$1')
+ },
+ // e.g. 'GPL 2'
+ function (argument) {
+ return argument.replace(/,?\s*(\d)/, '-$1.0')
+ },
+ // e.g. 'Apache Version 2.0'
+ function (argument) {
+ return argument
+ .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2')
+ },
+ // e.g. 'Apache Version 2'
+ function (argument) {
+ return argument
+ .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0')
+ },
+ // e.g. 'ZLIB'
+ function (argument) {
+ return argument[0].toUpperCase() + argument.slice(1)
+ },
+ // e.g. 'MPL/2.0'
+ function (argument) {
+ return argument.replace('/', '-')
+ },
+ // e.g. 'Apache 2'
+ function (argument) {
+ return argument
+ .replace(/\s*V\s*(\d)/, '-$1')
+ .replace(/(\d)$/, '$1.0')
+ },
+ // e.g. 'GPL-2.0', 'GPL-3.0'
+ function (argument) {
+ if (argument.indexOf('3.0') !== -1) {
+ return argument + '-or-later'
+ } else {
+ return argument + '-only'
+ }
+ },
+ // e.g. 'GPL-2.0-'
+ function (argument) {
+ return argument + 'only'
+ },
+ // e.g. 'GPL2'
+ function (argument) {
+ return argument.replace(/(\d)$/, '-$1.0')
+ },
+ // e.g. 'BSD 3'
+ function (argument) {
+ return argument.replace(/(-| )?(\d)$/, '-$2-Clause')
+ },
+ // e.g. 'BSD clause 3'
+ function (argument) {
+ return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause')
+ },
+ // e.g. 'New BSD license'
+ function (argument) {
+ return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, 'BSD-3-Clause')
+ },
+ // e.g. 'Simplified BSD license'
+ function (argument) {
+ return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, 'BSD-2-Clause')
+ },
+ // e.g. 'Free BSD license'
+ function (argument) {
+ return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, 'BSD-2-Clause-$1BSD')
+ },
+ // e.g. 'Clear BSD license'
+ function (argument) {
+ return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, 'BSD-3-Clause-Clear')
+ },
+ // e.g. 'Old BSD License'
+ function (argument) {
+ return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, 'BSD-4-Clause')
+ },
+ // e.g. 'BY-NC-4.0'
+ function (argument) {
+ return 'CC-' + argument
+ },
+ // e.g. 'BY-NC'
+ function (argument) {
+ return 'CC-' + argument + '-4.0'
+ },
+ // e.g. 'Attribution-NonCommercial'
+ function (argument) {
+ return argument
+ .replace('Attribution', 'BY')
+ .replace('NonCommercial', 'NC')
+ .replace('NoDerivatives', 'ND')
+ .replace(/ (\d)/, '-$1')
+ .replace(/ ?International/, '')
+ },
+ // e.g. 'Attribution-NonCommercial'
+ function (argument) {
+ return 'CC-' +
+ argument
+ .replace('Attribution', 'BY')
+ .replace('NonCommercial', 'NC')
+ .replace('NoDerivatives', 'ND')
+ .replace(/ (\d)/, '-$1')
+ .replace(/ ?International/, '') +
+ '-4.0'
+ }
+]
+
+var licensesWithVersions = spdxLicenseIds
+ .map(function (id) {
+ var match = /^(.*)-\d+\.\d+$/.exec(id)
+ return match
+ ? [match[0], match[1]]
+ : [id, null]
+ })
+ .reduce(function (objectMap, item) {
+ var key = item[1]
+ objectMap[key] = objectMap[key] || []
+ objectMap[key].push(item[0])
+ return objectMap
+ }, {})
+
+var licensesWithOneVersion = Object.keys(licensesWithVersions)
+ .map(function makeEntries (key) {
+ return [key, licensesWithVersions[key]]
+ })
+ .filter(function identifySoleVersions (item) {
+ return (
+ // Licenses has just one valid version suffix.
+ item[1].length === 1 &&
+ item[0] !== null &&
+ // APL will be considered Apache, rather than APL-1.0
+ item[0] !== 'APL'
+ )
+ })
+ .map(function createLastResorts (item) {
+ return [item[0], item[1][0]]
+ })
+
+licensesWithVersions = undefined
+
+// If all else fails, guess that strings containing certain substrings
+// meant to identify certain licenses.
+var lastResorts = [
+ ['UNLI', 'Unlicense'],
+ ['WTF', 'WTFPL'],
+ ['2 CLAUSE', 'BSD-2-Clause'],
+ ['2-CLAUSE', 'BSD-2-Clause'],
+ ['3 CLAUSE', 'BSD-3-Clause'],
+ ['3-CLAUSE', 'BSD-3-Clause'],
+ ['AFFERO', 'AGPL-3.0-or-later'],
+ ['AGPL', 'AGPL-3.0-or-later'],
+ ['APACHE', 'Apache-2.0'],
+ ['ARTISTIC', 'Artistic-2.0'],
+ ['Affero', 'AGPL-3.0-or-later'],
+ ['BEER', 'Beerware'],
+ ['BOOST', 'BSL-1.0'],
+ ['BSD', 'BSD-2-Clause'],
+ ['CDDL', 'CDDL-1.1'],
+ ['ECLIPSE', 'EPL-1.0'],
+ ['FUCK', 'WTFPL'],
+ ['GNU', 'GPL-3.0-or-later'],
+ ['LGPL', 'LGPL-3.0-or-later'],
+ ['GPLV1', 'GPL-1.0-only'],
+ ['GPL-1', 'GPL-1.0-only'],
+ ['GPLV2', 'GPL-2.0-only'],
+ ['GPL-2', 'GPL-2.0-only'],
+ ['GPL', 'GPL-3.0-or-later'],
+ ['MIT +NO-FALSE-ATTRIBS', 'MITNFA'],
+ ['MIT', 'MIT'],
+ ['MPL', 'MPL-2.0'],
+ ['X11', 'X11'],
+ ['ZLIB', 'Zlib']
+].concat(licensesWithOneVersion)
+
+var SUBSTRING = 0
+var IDENTIFIER = 1
+
+var validTransformation = function (identifier) {
+ for (var i = 0; i < transforms.length; i++) {
+ var transformed = transforms[i](identifier).trim()
+ if (transformed !== identifier && valid(transformed)) {
+ return transformed
+ }
+ }
+ return null
+}
+
+var validLastResort = function (identifier) {
+ var upperCased = identifier.toUpperCase()
+ for (var i = 0; i < lastResorts.length; i++) {
+ var lastResort = lastResorts[i]
+ if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) {
+ return lastResort[IDENTIFIER]
+ }
+ }
+ return null
+}
+
+var anyCorrection = function (identifier, check) {
+ for (var i = 0; i < transpositions.length; i++) {
+ var transposition = transpositions[i]
+ var transposed = transposition[TRANSPOSED]
+ if (identifier.indexOf(transposed) > -1) {
+ var corrected = identifier.replace(
+ transposed,
+ transposition[CORRECT]
+ )
+ var checked = check(corrected)
+ if (checked !== null) {
+ return checked
+ }
+ }
+ }
+ return null
+}
+
+module.exports = function (identifier, options) {
+ options = options || {}
+ var upgrade = options.upgrade === undefined ? true : !!options.upgrade
+ function postprocess (value) {
+ return upgrade ? upgradeGPLs(value) : value
+ }
+ var validArugment = (
+ typeof identifier === 'string' &&
+ identifier.trim().length !== 0
+ )
+ if (!validArugment) {
+ throw Error('Invalid argument. Expected non-empty string.')
+ }
+ identifier = identifier.trim()
+ if (valid(identifier)) {
+ return postprocess(identifier)
+ }
+ var noPlus = identifier.replace(/\+$/, '').trim()
+ if (valid(noPlus)) {
+ return postprocess(noPlus)
+ }
+ var transformed = validTransformation(identifier)
+ if (transformed !== null) {
+ return postprocess(transformed)
+ }
+ transformed = anyCorrection(identifier, function (argument) {
+ if (valid(argument)) {
+ return argument
+ }
+ return validTransformation(argument)
+ })
+ if (transformed !== null) {
+ return postprocess(transformed)
+ }
+ transformed = validLastResort(identifier)
+ if (transformed !== null) {
+ return postprocess(transformed)
+ }
+ transformed = anyCorrection(identifier, validLastResort)
+ if (transformed !== null) {
+ return postprocess(transformed)
+ }
+ return null
+}
+
+function upgradeGPLs (value) {
+ if ([
+ 'GPL-1.0', 'LGPL-1.0', 'AGPL-1.0',
+ 'GPL-2.0', 'LGPL-2.0', 'AGPL-2.0',
+ 'LGPL-2.1'
+ ].indexOf(value) !== -1) {
+ return value + '-only'
+ } else if ([
+ 'GPL-1.0+', 'GPL-2.0+', 'GPL-3.0+',
+ 'LGPL-2.0+', 'LGPL-2.1+', 'LGPL-3.0+',
+ 'AGPL-1.0+', 'AGPL-3.0+'
+ ].indexOf(value) !== -1) {
+ return value.replace(/\+$/, '-or-later')
+ } else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) {
+ return value + '-or-later'
+ } else {
+ return value
+ }
+}
diff --git a/node_modules/spdx-correct/package.json b/node_modules/spdx-correct/package.json
new file mode 100644
index 0000000..35c68bd
--- /dev/null
+++ b/node_modules/spdx-correct/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "spdx-correct",
+ "description": "correct invalid SPDX expressions",
+ "version": "3.1.1",
+ "author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)",
+ "contributors": [
+ "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)",
+ "Christian Zommerfelds <aero_super@yahoo.com>",
+ "Tal Einat <taleinat@gmail.com>",
+ "Dan Butvinik <butvinik@outlook.com>"
+ ],
+ "dependencies": {
+ "spdx-expression-parse": "^3.0.0",
+ "spdx-license-ids": "^3.0.0"
+ },
+ "devDependencies": {
+ "defence-cli": "^2.0.1",
+ "replace-require-self": "^1.0.0",
+ "standard": "^11.0.0",
+ "standard-markdown": "^4.0.2",
+ "tape": "^4.9.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "SPDX",
+ "law",
+ "legal",
+ "license",
+ "metadata"
+ ],
+ "license": "Apache-2.0",
+ "repository": "jslicense/spdx-correct.js",
+ "scripts": {
+ "lint": "standard && standard-markdown README.md",
+ "test": "defence README.md | replace-require-self | node && node test.js"
+ }
+}
diff --git a/node_modules/spdx-exceptions/README.md b/node_modules/spdx-exceptions/README.md
new file mode 100644
index 0000000..6c927ec
--- /dev/null
+++ b/node_modules/spdx-exceptions/README.md
@@ -0,0 +1,36 @@
+The package exports an array of strings. Each string is an identifier
+for a license exception under the [Software Package Data Exchange
+(SPDX)][SPDX] software license metadata standard.
+
+[SPDX]: https://spdx.org
+
+## Copyright and Licensing
+
+### SPDX
+
+"SPDX" is a federally registered United States trademark of The Linux
+Foundation Corporation.
+
+From version 2.0 of the [SPDX] specification:
+
+> Copyright © 2010-2015 Linux Foundation and its Contributors. Licensed
+> under the Creative Commons Attribution License 3.0 Unported. All other
+> rights are expressly reserved.
+
+The Linux Foundation and the SPDX working groups are good people. Only
+they decide what "SPDX" means, as a standard and otherwise. I respect
+their work and their rights. You should, too.
+
+### This Package
+
+> I created this package by copying exception identifiers out of the
+> SPDX specification. That work was mechanical, routine, and required no
+> creativity whatsoever. - Kyle Mitchell, package author
+
+United States users concerned about intellectual property may wish to
+discuss the following Supreme Court decisions with their attorneys:
+
+- _Baker v. Selden_, 101 U.S. 99 (1879)
+
+- _Feist Publications, Inc., v. Rural Telephone Service Co._,
+ 499 U.S. 340 (1991)
diff --git a/node_modules/spdx-exceptions/index.json b/node_modules/spdx-exceptions/index.json
new file mode 100644
index 0000000..f88f088
--- /dev/null
+++ b/node_modules/spdx-exceptions/index.json
@@ -0,0 +1,40 @@
+[
+ "389-exception",
+ "Autoconf-exception-2.0",
+ "Autoconf-exception-3.0",
+ "Bison-exception-2.2",
+ "Bootloader-exception",
+ "Classpath-exception-2.0",
+ "CLISP-exception-2.0",
+ "DigiRule-FOSS-exception",
+ "eCos-exception-2.0",
+ "Fawkes-Runtime-exception",
+ "FLTK-exception",
+ "Font-exception-2.0",
+ "freertos-exception-2.0",
+ "GCC-exception-2.0",
+ "GCC-exception-3.1",
+ "gnu-javamail-exception",
+ "GPL-3.0-linking-exception",
+ "GPL-3.0-linking-source-exception",
+ "GPL-CC-1.0",
+ "i2p-gpl-java-exception",
+ "Libtool-exception",
+ "Linux-syscall-note",
+ "LLVM-exception",
+ "LZMA-exception",
+ "mif-exception",
+ "Nokia-Qt-exception-1.1",
+ "OCaml-LGPL-linking-exception",
+ "OCCT-exception-1.0",
+ "OpenJDK-assembly-exception-1.0",
+ "openvpn-openssl-exception",
+ "PS-or-PDF-font-exception-20170817",
+ "Qt-GPL-exception-1.0",
+ "Qt-LGPL-exception-1.1",
+ "Qwt-exception-1.0",
+ "Swift-exception",
+ "u-boot-exception-2.0",
+ "Universal-FOSS-exception-1.0",
+ "WxWindows-exception-3.1"
+]
diff --git a/node_modules/spdx-exceptions/package.json b/node_modules/spdx-exceptions/package.json
new file mode 100644
index 0000000..2bafc6a
--- /dev/null
+++ b/node_modules/spdx-exceptions/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "spdx-exceptions",
+ "description": "list of SPDX standard license exceptions",
+ "version": "2.3.0",
+ "author": "The Linux Foundation",
+ "contributors": [
+ "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com/)"
+ ],
+ "license": "CC-BY-3.0",
+ "repository": "kemitchell/spdx-exceptions.json",
+ "files": [
+ "index.json"
+ ],
+ "scripts": {
+ "build": "node build.js"
+ }
+}
diff --git a/node_modules/spdx-expression-parse/AUTHORS b/node_modules/spdx-expression-parse/AUTHORS
new file mode 100644
index 0000000..257a76b
--- /dev/null
+++ b/node_modules/spdx-expression-parse/AUTHORS
@@ -0,0 +1,4 @@
+C. Scott Ananian <cscott@cscott.net> (http://cscott.net)
+Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)
+Shinnosuke Watanabe <snnskwtnb@gmail.com>
+Antoine Motet <antoine.motet@gmail.com>
diff --git a/node_modules/spdx-expression-parse/LICENSE b/node_modules/spdx-expression-parse/LICENSE
new file mode 100644
index 0000000..831618e
--- /dev/null
+++ b/node_modules/spdx-expression-parse/LICENSE
@@ -0,0 +1,22 @@
+The MIT License
+
+Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/spdx-expression-parse/README.md b/node_modules/spdx-expression-parse/README.md
new file mode 100644
index 0000000..9406462
--- /dev/null
+++ b/node_modules/spdx-expression-parse/README.md
@@ -0,0 +1,91 @@
+This package parses [SPDX license expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60) strings describing license terms, like [package.json license strings](https://docs.npmjs.com/files/package.json#license), into consistently structured ECMAScript objects. The npm command-line interface depends on this package, as do many automatic license-audit tools.
+
+In a nutshell:
+
+```javascript
+var parse = require('spdx-expression-parse')
+var assert = require('assert')
+
+assert.deepEqual(
+ // Licensed under the terms of the Two-Clause BSD License.
+ parse('BSD-2-Clause'),
+ {license: 'BSD-2-Clause'}
+)
+
+assert.throws(function () {
+ // An invalid SPDX license expression.
+ // Should be `Apache-2.0`.
+ parse('Apache 2')
+})
+
+assert.deepEqual(
+ // Dual licensed under either:
+ // - LGPL 2.1
+ // - a combination of Three-Clause BSD and MIT
+ parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'),
+ {
+ left: {license: 'LGPL-2.1'},
+ conjunction: 'or',
+ right: {
+ left: {license: 'BSD-3-Clause'},
+ conjunction: 'and',
+ right: {license: 'MIT'}
+ }
+ }
+)
+```
+
+The syntax comes from the [Software Package Data eXchange (SPDX)](https://spdx.org/), a standard from the [Linux Foundation](https://www.linuxfoundation.org) for shareable data about software package license terms. SPDX aims to make sharing and auditing license data easy, especially for users of open-source software.
+
+The bulk of the SPDX standard describes syntax and semantics of XML metadata files. This package implements two lightweight, plain-text components of that larger standard:
+
+1. The [license list](https://spdx.org/licenses), a mapping from specific string identifiers, like `Apache-2.0`, to standard form license texts and bolt-on license exceptions. The [spdx-license-ids](https://www.npmjs.com/package/spdx-license-ids) and [spdx-exceptions](https://www.npmjs.com/package/spdx-exceptions) packages implement the license list. `spdx-expression-parse` depends on and `require()`s them.
+
+ Any license identifier from the license list is a valid license expression:
+
+ ```javascript
+ var identifiers = []
+ .concat(require('spdx-license-ids'))
+ .concat(require('spdx-license-ids/deprecated'))
+
+ identifiers.forEach(function (id) {
+ assert.deepEqual(parse(id), {license: id})
+ })
+ ```
+
+ So is any license identifier `WITH` a standardized license exception:
+
+ ```javascript
+ identifiers.forEach(function (id) {
+ require('spdx-exceptions').forEach(function (e) {
+ assert.deepEqual(
+ parse(id + ' WITH ' + e),
+ {license: id, exception: e}
+ )
+ })
+ })
+ ```
+
+2. The license expression language, for describing simple and complex license terms, like `MIT` for MIT-licensed and `(GPL-2.0 OR Apache-2.0)` for dual-licensing under GPL 2.0 and Apache 2.0. `spdx-expression-parse` itself implements license expression language, exporting a parser.
+
+ ```javascript
+ assert.deepEqual(
+ // Licensed under a combination of:
+ // - the MIT License AND
+ // - a combination of:
+ // - LGPL 2.1 (or a later version) AND
+ // - Three-Clause BSD
+ parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'),
+ {
+ left: {license: 'MIT'},
+ conjunction: 'and',
+ right: {
+ left: {license: 'LGPL-2.1', plus: true},
+ conjunction: 'and',
+ right: {license: 'BSD-3-Clause'}
+ }
+ }
+ )
+ ```
+
+The Linux Foundation and its contributors license the SPDX standard under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0")](http://spdx.org/licenses/CC-BY-3.0). "SPDX" is a United States federally registered trademark of the Linux Foundation. The authors of this package license their work under the terms of the MIT License.
diff --git a/node_modules/spdx-expression-parse/index.js b/node_modules/spdx-expression-parse/index.js
new file mode 100644
index 0000000..52fab56
--- /dev/null
+++ b/node_modules/spdx-expression-parse/index.js
@@ -0,0 +1,8 @@
+'use strict'
+
+var scan = require('./scan')
+var parse = require('./parse')
+
+module.exports = function (source) {
+ return parse(scan(source))
+}
diff --git a/node_modules/spdx-expression-parse/package.json b/node_modules/spdx-expression-parse/package.json
new file mode 100644
index 0000000..c9edc9f
--- /dev/null
+++ b/node_modules/spdx-expression-parse/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "spdx-expression-parse",
+ "description": "parse SPDX license expressions",
+ "version": "3.0.1",
+ "author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)",
+ "files": [
+ "AUTHORS",
+ "index.js",
+ "parse.js",
+ "scan.js"
+ ],
+ "dependencies": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ },
+ "devDependencies": {
+ "defence-cli": "^3.0.1",
+ "replace-require-self": "^1.0.0",
+ "standard": "^14.1.0"
+ },
+ "keywords": [
+ "SPDX",
+ "law",
+ "legal",
+ "license",
+ "metadata",
+ "package",
+ "package.json",
+ "standards"
+ ],
+ "license": "MIT",
+ "repository": "jslicense/spdx-expression-parse.js",
+ "scripts": {
+ "lint": "standard",
+ "test:readme": "defence -i javascript README.md | replace-require-self | node",
+ "test:suite": "node test.js",
+ "test": "npm run test:suite && npm run test:readme"
+ }
+}
diff --git a/node_modules/spdx-expression-parse/parse.js b/node_modules/spdx-expression-parse/parse.js
new file mode 100644
index 0000000..5a00b45
--- /dev/null
+++ b/node_modules/spdx-expression-parse/parse.js
@@ -0,0 +1,138 @@
+'use strict'
+
+// The ABNF grammar in the spec is totally ambiguous.
+//
+// This parser follows the operator precedence defined in the
+// `Order of Precedence and Parentheses` section.
+
+module.exports = function (tokens) {
+ var index = 0
+
+ function hasMore () {
+ return index < tokens.length
+ }
+
+ function token () {
+ return hasMore() ? tokens[index] : null
+ }
+
+ function next () {
+ if (!hasMore()) {
+ throw new Error()
+ }
+ index++
+ }
+
+ function parseOperator (operator) {
+ var t = token()
+ if (t && t.type === 'OPERATOR' && operator === t.string) {
+ next()
+ return t.string
+ }
+ }
+
+ function parseWith () {
+ if (parseOperator('WITH')) {
+ var t = token()
+ if (t && t.type === 'EXCEPTION') {
+ next()
+ return t.string
+ }
+ throw new Error('Expected exception after `WITH`')
+ }
+ }
+
+ function parseLicenseRef () {
+ // TODO: Actually, everything is concatenated into one string
+ // for backward-compatibility but it could be better to return
+ // a nice structure.
+ var begin = index
+ var string = ''
+ var t = token()
+ if (t.type === 'DOCUMENTREF') {
+ next()
+ string += 'DocumentRef-' + t.string + ':'
+ if (!parseOperator(':')) {
+ throw new Error('Expected `:` after `DocumentRef-...`')
+ }
+ }
+ t = token()
+ if (t.type === 'LICENSEREF') {
+ next()
+ string += 'LicenseRef-' + t.string
+ return { license: string }
+ }
+ index = begin
+ }
+
+ function parseLicense () {
+ var t = token()
+ if (t && t.type === 'LICENSE') {
+ next()
+ var node = { license: t.string }
+ if (parseOperator('+')) {
+ node.plus = true
+ }
+ var exception = parseWith()
+ if (exception) {
+ node.exception = exception
+ }
+ return node
+ }
+ }
+
+ function parseParenthesizedExpression () {
+ var left = parseOperator('(')
+ if (!left) {
+ return
+ }
+
+ var expr = parseExpression()
+
+ if (!parseOperator(')')) {
+ throw new Error('Expected `)`')
+ }
+
+ return expr
+ }
+
+ function parseAtom () {
+ return (
+ parseParenthesizedExpression() ||
+ parseLicenseRef() ||
+ parseLicense()
+ )
+ }
+
+ function makeBinaryOpParser (operator, nextParser) {
+ return function parseBinaryOp () {
+ var left = nextParser()
+ if (!left) {
+ return
+ }
+
+ if (!parseOperator(operator)) {
+ return left
+ }
+
+ var right = parseBinaryOp()
+ if (!right) {
+ throw new Error('Expected expression')
+ }
+ return {
+ left: left,
+ conjunction: operator.toLowerCase(),
+ right: right
+ }
+ }
+ }
+
+ var parseAnd = makeBinaryOpParser('AND', parseAtom)
+ var parseExpression = makeBinaryOpParser('OR', parseAnd)
+
+ var node = parseExpression()
+ if (!node || hasMore()) {
+ throw new Error('Syntax error')
+ }
+ return node
+}
diff --git a/node_modules/spdx-expression-parse/scan.js b/node_modules/spdx-expression-parse/scan.js
new file mode 100644
index 0000000..b74fce2
--- /dev/null
+++ b/node_modules/spdx-expression-parse/scan.js
@@ -0,0 +1,131 @@
+'use strict'
+
+var licenses = []
+ .concat(require('spdx-license-ids'))
+ .concat(require('spdx-license-ids/deprecated'))
+var exceptions = require('spdx-exceptions')
+
+module.exports = function (source) {
+ var index = 0
+
+ function hasMore () {
+ return index < source.length
+ }
+
+ // `value` can be a regexp or a string.
+ // If it is recognized, the matching source string is returned and
+ // the index is incremented. Otherwise `undefined` is returned.
+ function read (value) {
+ if (value instanceof RegExp) {
+ var chars = source.slice(index)
+ var match = chars.match(value)
+ if (match) {
+ index += match[0].length
+ return match[0]
+ }
+ } else {
+ if (source.indexOf(value, index) === index) {
+ index += value.length
+ return value
+ }
+ }
+ }
+
+ function skipWhitespace () {
+ read(/[ ]*/)
+ }
+
+ function operator () {
+ var string
+ var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+']
+ for (var i = 0; i < possibilities.length; i++) {
+ string = read(possibilities[i])
+ if (string) {
+ break
+ }
+ }
+
+ if (string === '+' && index > 1 && source[index - 2] === ' ') {
+ throw new Error('Space before `+`')
+ }
+
+ return string && {
+ type: 'OPERATOR',
+ string: string
+ }
+ }
+
+ function idstring () {
+ return read(/[A-Za-z0-9-.]+/)
+ }
+
+ function expectIdstring () {
+ var string = idstring()
+ if (!string) {
+ throw new Error('Expected idstring at offset ' + index)
+ }
+ return string
+ }
+
+ function documentRef () {
+ if (read('DocumentRef-')) {
+ var string = expectIdstring()
+ return { type: 'DOCUMENTREF', string: string }
+ }
+ }
+
+ function licenseRef () {
+ if (read('LicenseRef-')) {
+ var string = expectIdstring()
+ return { type: 'LICENSEREF', string: string }
+ }
+ }
+
+ function identifier () {
+ var begin = index
+ var string = idstring()
+
+ if (licenses.indexOf(string) !== -1) {
+ return {
+ type: 'LICENSE',
+ string: string
+ }
+ } else if (exceptions.indexOf(string) !== -1) {
+ return {
+ type: 'EXCEPTION',
+ string: string
+ }
+ }
+
+ index = begin
+ }
+
+ // Tries to read the next token. Returns `undefined` if no token is
+ // recognized.
+ function parseToken () {
+ // Ordering matters
+ return (
+ operator() ||
+ documentRef() ||
+ licenseRef() ||
+ identifier()
+ )
+ }
+
+ var tokens = []
+ while (hasMore()) {
+ skipWhitespace()
+ if (!hasMore()) {
+ break
+ }
+
+ var token = parseToken()
+ if (!token) {
+ throw new Error('Unexpected `' + source[index] +
+ '` at offset ' + index)
+ }
+
+ tokens.push(token)
+ }
+ return tokens
+}
diff --git a/node_modules/spdx-license-ids/README.md b/node_modules/spdx-license-ids/README.md
new file mode 100644
index 0000000..699514d
--- /dev/null
+++ b/node_modules/spdx-license-ids/README.md
@@ -0,0 +1,52 @@
+# spdx-license-ids
+
+[![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.com/package/spdx-license-ids)
+[![Github Actions](https://action-badges.now.sh/shinnn/spdx-license-ids)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/spdx-license-ids)
+
+A list of [SPDX license](https://spdx.org/licenses/) identifiers
+
+## Installation
+
+[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/):
+
+```
+npm install spdx-license-ids
+```
+
+## [Node.js](https://nodejs.org/) API
+
+### require('spdx-license-ids')
+
+Type: `string[]`
+
+All license IDs except for the currently deprecated ones.
+
+```javascript
+const ids = require('spdx-license-ids');
+//=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...]
+
+ids.includes('BSD-3-Clause'); //=> true
+ids.includes('CC-BY-1.0'); //=> true
+
+ids.includes('GPL-3.0'); //=> false
+```
+
+### require('spdx-license-ids/deprecated')
+
+Type: `string[]`
+
+Deprecated license IDs.
+
+```javascript
+const deprecatedIds = require('spdx-license-ids/deprecated');
+//=> ['AGPL-1.0', 'AGPL-3.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', 'GPL-2.0', ...]
+
+deprecatedIds.includes('BSD-3-Clause'); //=> false
+deprecatedIds.includes('CC-BY-1.0'); //=> false
+
+deprecatedIds.includes('GPL-3.0'); //=> true
+```
+
+## License
+
+[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed)
diff --git a/node_modules/spdx-license-ids/deprecated.json b/node_modules/spdx-license-ids/deprecated.json
new file mode 100644
index 0000000..c7de098
--- /dev/null
+++ b/node_modules/spdx-license-ids/deprecated.json
@@ -0,0 +1,26 @@
+[
+ "AGPL-1.0",
+ "AGPL-3.0",
+ "BSD-2-Clause-FreeBSD",
+ "BSD-2-Clause-NetBSD",
+ "GFDL-1.1",
+ "GFDL-1.2",
+ "GFDL-1.3",
+ "GPL-1.0",
+ "GPL-2.0",
+ "GPL-2.0-with-GCC-exception",
+ "GPL-2.0-with-autoconf-exception",
+ "GPL-2.0-with-bison-exception",
+ "GPL-2.0-with-classpath-exception",
+ "GPL-2.0-with-font-exception",
+ "GPL-3.0",
+ "GPL-3.0-with-GCC-exception",
+ "GPL-3.0-with-autoconf-exception",
+ "LGPL-2.0",
+ "LGPL-2.1",
+ "LGPL-3.0",
+ "Nunit",
+ "StandardML-NJ",
+ "eCos-2.0",
+ "wxWindows"
+]
diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json
new file mode 100644
index 0000000..864d241
--- /dev/null
+++ b/node_modules/spdx-license-ids/index.json
@@ -0,0 +1,420 @@
+[
+ "0BSD",
+ "AAL",
+ "ADSL",
+ "AFL-1.1",
+ "AFL-1.2",
+ "AFL-2.0",
+ "AFL-2.1",
+ "AFL-3.0",
+ "AGPL-1.0-only",
+ "AGPL-1.0-or-later",
+ "AGPL-3.0-only",
+ "AGPL-3.0-or-later",
+ "AMDPLPA",
+ "AML",
+ "AMPAS",
+ "ANTLR-PD",
+ "ANTLR-PD-fallback",
+ "APAFML",
+ "APL-1.0",
+ "APSL-1.0",
+ "APSL-1.1",
+ "APSL-1.2",
+ "APSL-2.0",
+ "Abstyles",
+ "Adobe-2006",
+ "Adobe-Glyph",
+ "Afmparse",
+ "Aladdin",
+ "Apache-1.0",
+ "Apache-1.1",
+ "Apache-2.0",
+ "Artistic-1.0",
+ "Artistic-1.0-Perl",
+ "Artistic-1.0-cl8",
+ "Artistic-2.0",
+ "BSD-1-Clause",
+ "BSD-2-Clause",
+ "BSD-2-Clause-Patent",
+ "BSD-2-Clause-Views",
+ "BSD-3-Clause",
+ "BSD-3-Clause-Attribution",
+ "BSD-3-Clause-Clear",
+ "BSD-3-Clause-LBNL",
+ "BSD-3-Clause-No-Nuclear-License",
+ "BSD-3-Clause-No-Nuclear-License-2014",
+ "BSD-3-Clause-No-Nuclear-Warranty",
+ "BSD-3-Clause-Open-MPI",
+ "BSD-4-Clause",
+ "BSD-4-Clause-UC",
+ "BSD-Protection",
+ "BSD-Source-Code",
+ "BSL-1.0",
+ "BUSL-1.1",
+ "Bahyph",
+ "Barr",
+ "Beerware",
+ "BitTorrent-1.0",
+ "BitTorrent-1.1",
+ "BlueOak-1.0.0",
+ "Borceux",
+ "CAL-1.0",
+ "CAL-1.0-Combined-Work-Exception",
+ "CATOSL-1.1",
+ "CC-BY-1.0",
+ "CC-BY-2.0",
+ "CC-BY-2.5",
+ "CC-BY-3.0",
+ "CC-BY-3.0-AT",
+ "CC-BY-3.0-US",
+ "CC-BY-4.0",
+ "CC-BY-NC-1.0",
+ "CC-BY-NC-2.0",
+ "CC-BY-NC-2.5",
+ "CC-BY-NC-3.0",
+ "CC-BY-NC-4.0",
+ "CC-BY-NC-ND-1.0",
+ "CC-BY-NC-ND-2.0",
+ "CC-BY-NC-ND-2.5",
+ "CC-BY-NC-ND-3.0",
+ "CC-BY-NC-ND-3.0-IGO",
+ "CC-BY-NC-ND-4.0",
+ "CC-BY-NC-SA-1.0",
+ "CC-BY-NC-SA-2.0",
+ "CC-BY-NC-SA-2.5",
+ "CC-BY-NC-SA-3.0",
+ "CC-BY-NC-SA-4.0",
+ "CC-BY-ND-1.0",
+ "CC-BY-ND-2.0",
+ "CC-BY-ND-2.5",
+ "CC-BY-ND-3.0",
+ "CC-BY-ND-4.0",
+ "CC-BY-SA-1.0",
+ "CC-BY-SA-2.0",
+ "CC-BY-SA-2.0-UK",
+ "CC-BY-SA-2.5",
+ "CC-BY-SA-3.0",
+ "CC-BY-SA-3.0-AT",
+ "CC-BY-SA-4.0",
+ "CC-PDDC",
+ "CC0-1.0",
+ "CDDL-1.0",
+ "CDDL-1.1",
+ "CDLA-Permissive-1.0",
+ "CDLA-Sharing-1.0",
+ "CECILL-1.0",
+ "CECILL-1.1",
+ "CECILL-2.0",
+ "CECILL-2.1",
+ "CECILL-B",
+ "CECILL-C",
+ "CERN-OHL-1.1",
+ "CERN-OHL-1.2",
+ "CERN-OHL-P-2.0",
+ "CERN-OHL-S-2.0",
+ "CERN-OHL-W-2.0",
+ "CNRI-Jython",
+ "CNRI-Python",
+ "CNRI-Python-GPL-Compatible",
+ "CPAL-1.0",
+ "CPL-1.0",
+ "CPOL-1.02",
+ "CUA-OPL-1.0",
+ "Caldera",
+ "ClArtistic",
+ "Condor-1.1",
+ "Crossword",
+ "CrystalStacker",
+ "Cube",
+ "D-FSL-1.0",
+ "DOC",
+ "DSDP",
+ "Dotseqn",
+ "ECL-1.0",
+ "ECL-2.0",
+ "EFL-1.0",
+ "EFL-2.0",
+ "EPICS",
+ "EPL-1.0",
+ "EPL-2.0",
+ "EUDatagrid",
+ "EUPL-1.0",
+ "EUPL-1.1",
+ "EUPL-1.2",
+ "Entessa",
+ "ErlPL-1.1",
+ "Eurosym",
+ "FSFAP",
+ "FSFUL",
+ "FSFULLR",
+ "FTL",
+ "Fair",
+ "Frameworx-1.0",
+ "FreeImage",
+ "GFDL-1.1-invariants-only",
+ "GFDL-1.1-invariants-or-later",
+ "GFDL-1.1-no-invariants-only",
+ "GFDL-1.1-no-invariants-or-later",
+ "GFDL-1.1-only",
+ "GFDL-1.1-or-later",
+ "GFDL-1.2-invariants-only",
+ "GFDL-1.2-invariants-or-later",
+ "GFDL-1.2-no-invariants-only",
+ "GFDL-1.2-no-invariants-or-later",
+ "GFDL-1.2-only",
+ "GFDL-1.2-or-later",
+ "GFDL-1.3-invariants-only",
+ "GFDL-1.3-invariants-or-later",
+ "GFDL-1.3-no-invariants-only",
+ "GFDL-1.3-no-invariants-or-later",
+ "GFDL-1.3-only",
+ "GFDL-1.3-or-later",
+ "GL2PS",
+ "GLWTPL",
+ "GPL-1.0-only",
+ "GPL-1.0-or-later",
+ "GPL-2.0-only",
+ "GPL-2.0-or-later",
+ "GPL-3.0-only",
+ "GPL-3.0-or-later",
+ "Giftware",
+ "Glide",
+ "Glulxe",
+ "HPND",
+ "HPND-sell-variant",
+ "HTMLTIDY",
+ "HaskellReport",
+ "Hippocratic-2.1",
+ "IBM-pibs",
+ "ICU",
+ "IJG",
+ "IPA",
+ "IPL-1.0",
+ "ISC",
+ "ImageMagick",
+ "Imlib2",
+ "Info-ZIP",
+ "Intel",
+ "Intel-ACPI",
+ "Interbase-1.0",
+ "JPNIC",
+ "JSON",
+ "JasPer-2.0",
+ "LAL-1.2",
+ "LAL-1.3",
+ "LGPL-2.0-only",
+ "LGPL-2.0-or-later",
+ "LGPL-2.1-only",
+ "LGPL-2.1-or-later",
+ "LGPL-3.0-only",
+ "LGPL-3.0-or-later",
+ "LGPLLR",
+ "LPL-1.0",
+ "LPL-1.02",
+ "LPPL-1.0",
+ "LPPL-1.1",
+ "LPPL-1.2",
+ "LPPL-1.3a",
+ "LPPL-1.3c",
+ "Latex2e",
+ "Leptonica",
+ "LiLiQ-P-1.1",
+ "LiLiQ-R-1.1",
+ "LiLiQ-Rplus-1.1",
+ "Libpng",
+ "Linux-OpenIB",
+ "MIT",
+ "MIT-0",
+ "MIT-CMU",
+ "MIT-advertising",
+ "MIT-enna",
+ "MIT-feh",
+ "MIT-open-group",
+ "MITNFA",
+ "MPL-1.0",
+ "MPL-1.1",
+ "MPL-2.0",
+ "MPL-2.0-no-copyleft-exception",
+ "MS-PL",
+ "MS-RL",
+ "MTLL",
+ "MakeIndex",
+ "MirOS",
+ "Motosoto",
+ "MulanPSL-1.0",
+ "MulanPSL-2.0",
+ "Multics",
+ "Mup",
+ "NASA-1.3",
+ "NBPL-1.0",
+ "NCGL-UK-2.0",
+ "NCSA",
+ "NGPL",
+ "NIST-PD",
+ "NIST-PD-fallback",
+ "NLOD-1.0",
+ "NLPL",
+ "NOSL",
+ "NPL-1.0",
+ "NPL-1.1",
+ "NPOSL-3.0",
+ "NRL",
+ "NTP",
+ "NTP-0",
+ "Naumen",
+ "Net-SNMP",
+ "NetCDF",
+ "Newsletr",
+ "Nokia",
+ "Noweb",
+ "O-UDA-1.0",
+ "OCCT-PL",
+ "OCLC-2.0",
+ "ODC-By-1.0",
+ "ODbL-1.0",
+ "OFL-1.0",
+ "OFL-1.0-RFN",
+ "OFL-1.0-no-RFN",
+ "OFL-1.1",
+ "OFL-1.1-RFN",
+ "OFL-1.1-no-RFN",
+ "OGC-1.0",
+ "OGL-Canada-2.0",
+ "OGL-UK-1.0",
+ "OGL-UK-2.0",
+ "OGL-UK-3.0",
+ "OGTSL",
+ "OLDAP-1.1",
+ "OLDAP-1.2",
+ "OLDAP-1.3",
+ "OLDAP-1.4",
+ "OLDAP-2.0",
+ "OLDAP-2.0.1",
+ "OLDAP-2.1",
+ "OLDAP-2.2",
+ "OLDAP-2.2.1",
+ "OLDAP-2.2.2",
+ "OLDAP-2.3",
+ "OLDAP-2.4",
+ "OLDAP-2.5",
+ "OLDAP-2.6",
+ "OLDAP-2.7",
+ "OLDAP-2.8",
+ "OML",
+ "OPL-1.0",
+ "OSET-PL-2.1",
+ "OSL-1.0",
+ "OSL-1.1",
+ "OSL-2.0",
+ "OSL-2.1",
+ "OSL-3.0",
+ "OpenSSL",
+ "PDDL-1.0",
+ "PHP-3.0",
+ "PHP-3.01",
+ "PSF-2.0",
+ "Parity-6.0.0",
+ "Parity-7.0.0",
+ "Plexus",
+ "PolyForm-Noncommercial-1.0.0",
+ "PolyForm-Small-Business-1.0.0",
+ "PostgreSQL",
+ "Python-2.0",
+ "QPL-1.0",
+ "Qhull",
+ "RHeCos-1.1",
+ "RPL-1.1",
+ "RPL-1.5",
+ "RPSL-1.0",
+ "RSA-MD",
+ "RSCPL",
+ "Rdisc",
+ "Ruby",
+ "SAX-PD",
+ "SCEA",
+ "SGI-B-1.0",
+ "SGI-B-1.1",
+ "SGI-B-2.0",
+ "SHL-0.5",
+ "SHL-0.51",
+ "SISSL",
+ "SISSL-1.2",
+ "SMLNJ",
+ "SMPPL",
+ "SNIA",
+ "SPL-1.0",
+ "SSH-OpenSSH",
+ "SSH-short",
+ "SSPL-1.0",
+ "SWL",
+ "Saxpath",
+ "Sendmail",
+ "Sendmail-8.23",
+ "SimPL-2.0",
+ "Sleepycat",
+ "Spencer-86",
+ "Spencer-94",
+ "Spencer-99",
+ "SugarCRM-1.1.3",
+ "TAPR-OHL-1.0",
+ "TCL",
+ "TCP-wrappers",
+ "TMate",
+ "TORQUE-1.1",
+ "TOSL",
+ "TU-Berlin-1.0",
+ "TU-Berlin-2.0",
+ "UCL-1.0",
+ "UPL-1.0",
+ "Unicode-DFS-2015",
+ "Unicode-DFS-2016",
+ "Unicode-TOU",
+ "Unlicense",
+ "VOSTROM",
+ "VSL-1.0",
+ "Vim",
+ "W3C",
+ "W3C-19980720",
+ "W3C-20150513",
+ "WTFPL",
+ "Watcom-1.0",
+ "Wsuipa",
+ "X11",
+ "XFree86-1.1",
+ "XSkat",
+ "Xerox",
+ "Xnet",
+ "YPL-1.0",
+ "YPL-1.1",
+ "ZPL-1.1",
+ "ZPL-2.0",
+ "ZPL-2.1",
+ "Zed",
+ "Zend-2.0",
+ "Zimbra-1.3",
+ "Zimbra-1.4",
+ "Zlib",
+ "blessing",
+ "bzip2-1.0.5",
+ "bzip2-1.0.6",
+ "copyleft-next-0.3.0",
+ "copyleft-next-0.3.1",
+ "curl",
+ "diffmark",
+ "dvipdfm",
+ "eGenix",
+ "etalab-2.0",
+ "gSOAP-1.3b",
+ "gnuplot",
+ "iMatix",
+ "libpng-2.0",
+ "libselinux-1.0",
+ "libtiff",
+ "mpich2",
+ "psfrag",
+ "psutils",
+ "xinetd",
+ "xpp",
+ "zlib-acknowledgement"
+]
diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json
new file mode 100644
index 0000000..eea6312
--- /dev/null
+++ b/node_modules/spdx-license-ids/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "spdx-license-ids",
+ "version": "3.0.7",
+ "description": "A list of SPDX license identifiers",
+ "repository": "jslicense/spdx-license-ids",
+ "author": "Shinnosuke Watanabe (https://github.com/shinnn)",
+ "license": "CC0-1.0",
+ "scripts": {
+ "build": "node build.js",
+ "pretest": "eslint .",
+ "latest": "node latest.js",
+ "test": "node test.js"
+ },
+ "files": [
+ "deprecated.json",
+ "index.json"
+ ],
+ "keywords": [
+ "spdx",
+ "license",
+ "licenses",
+ "id",
+ "identifier",
+ "identifiers",
+ "json",
+ "array",
+ "oss"
+ ],
+ "devDependencies": {
+ "@shinnn/eslint-config": "^6.8.7",
+ "chalk": "^2.4.1",
+ "eslint": "^5.10.0",
+ "get-spdx-license-ids": "^2.1.0",
+ "rmfr": "^2.0.0",
+ "tape": "^4.9.1"
+ },
+ "eslintConfig": {
+ "extends": "@shinnn"
+ }
+}
diff --git a/node_modules/speedometer/LICENSE b/node_modules/speedometer/LICENSE
new file mode 100644
index 0000000..4b30ed5
--- /dev/null
+++ b/node_modules/speedometer/LICENSE
@@ -0,0 +1,20 @@
+Copyright 2013 Mathias Buus
+
+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/speedometer/README.md b/node_modules/speedometer/README.md
new file mode 100644
index 0000000..f4e5711
--- /dev/null
+++ b/node_modules/speedometer/README.md
@@ -0,0 +1,38 @@
+# speedometer
+
+Speed measurement in Javascript
+
+```
+npm install speedometer
+```
+
+## Usage
+
+``` js
+var speedometer = require('speedometer')
+var fs = require('fs')
+
+// Let's measure how fast we can read from /dev/urandom
+var speed = speedometer()
+var stream = fs.createReadStream('/dev/urandom')
+
+stream.on('data', function(data) {
+ // Simply call speed with the amount of bytes transferred
+ var bytesPerSecond = speed(data.length)
+
+ console.log(bytesPerSecond+' bytes/second')
+})
+```
+
+You can always get the current speed by calling `speed()`.
+
+Per default `speedometer` uses a 5 second buffer.
+To change this simply pass another value to the constructor
+
+``` js
+var speed = speedometer(20) // uses a 20s buffer instead
+```
+
+## License
+
+MIT
diff --git a/node_modules/speedometer/index.js b/node_modules/speedometer/index.js
new file mode 100644
index 0000000..5570fe0
--- /dev/null
+++ b/node_modules/speedometer/index.js
@@ -0,0 +1,35 @@
+var tick = 1
+var maxTick = 65535
+var resolution = 4
+var inc = function() {
+ tick = (tick + 1) & maxTick
+}
+
+var timer = setInterval(inc, (1000 / resolution) | 0)
+if (timer.unref) timer.unref()
+
+module.exports = function(seconds) {
+ var size = resolution * (seconds || 5)
+ var buffer = [0]
+ var pointer = 1
+ var last = (tick-1) & maxTick
+
+ return function(delta) {
+ var dist = (tick - last) & maxTick
+ if (dist > size) dist = size
+ last = tick
+
+ while (dist--) {
+ if (pointer === size) pointer = 0
+ buffer[pointer] = buffer[pointer === 0 ? size-1 : pointer-1]
+ pointer++
+ }
+
+ if (delta) buffer[pointer-1] += delta
+
+ var top = buffer[pointer-1]
+ var btm = buffer.length < size ? 0 : buffer[pointer === size ? 0 : pointer]
+
+ return buffer.length < resolution ? top : (top - btm) * resolution / buffer.length
+ }
+} \ No newline at end of file
diff --git a/node_modules/speedometer/package.json b/node_modules/speedometer/package.json
new file mode 100644
index 0000000..d52fc66
--- /dev/null
+++ b/node_modules/speedometer/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "speedometer",
+ "version": "0.1.4",
+ "repository": "git://github.com/mafintosh/speedometer",
+ "description": "simple speed measurement in javascript",
+ "keywords": [
+ "speed",
+ "bytes",
+ "per",
+ "second",
+ "transfer"
+ ],
+ "author": "Mathias Buus Madsen <mathiasbuus@gmail.com>"
+}
diff --git a/node_modules/sprintf-js/CHANGELOG.md b/node_modules/sprintf-js/CHANGELOG.md
new file mode 100644
index 0000000..88c33f7
--- /dev/null
+++ b/node_modules/sprintf-js/CHANGELOG.md
@@ -0,0 +1,17 @@
+## 1.1.2 (NOT YET RELEASED)
+
+* Update Travis config to test on all LTE Node versions (i.e. 6+)
+* Reorganize README; add instructions re polyfills
+* Refactor the code
+* Upgrade dependencies
+* Fix minifying issue with missing semicolons
+* Configure .npmignore to reduce package size
+
+
+## 1.1.1 (2017-05-29)
+
+* This CHANGELOG
+* Various optimizations for modern browsers
+* Fix %g, %o, %x and %X specifiers
+* Use ESLint instead of JSHint
+* Add CONTRIBUTORS file
diff --git a/node_modules/sprintf-js/CONTRIBUTORS.md b/node_modules/sprintf-js/CONTRIBUTORS.md
new file mode 100644
index 0000000..8172f03
--- /dev/null
+++ b/node_modules/sprintf-js/CONTRIBUTORS.md
@@ -0,0 +1,25 @@
+Alexander Rose [@arose](https://github.com/arose)
+Alexandru Mărășteanu [@alexei](https://github.com/alexei)
+Andras [@andrasq](https://github.com/andrasq)
+Benoit Giannangeli [@giann](https://github.com/giann)
+Branden Visser [@mrvisser](https://github.com/mrvisser)
+David Baird
+daurnimator [@daurnimator](https://github.com/daurnimator)
+Doug Beck [@beck](https://github.com/beck)
+Dzmitry Litskalau [@litmit](https://github.com/litmit)
+Fred Ludlow [@fredludlow](https://github.com/fredludlow)
+Hans Pufal
+Henry [@alograg](https://github.com/alograg)
+Johnny Shields [@johnnyshields](https://github.com/johnnyshields)
+Kamal Abdali
+Matt Simerson [@msimerson](https://github.com/msimerson)
+Maxime Robert [@marob](https://github.com/marob)
+MeriemKhelifi [@MeriemKhelifi](https://github.com/MeriemKhelifi)
+Michael Schramm [@wodka](https://github.com/wodka)
+Nazar Mokrynskyi [@nazar-pc](https://github.com/nazar-pc)
+Oliver Salzburg [@oliversalzburg](https://github.com/oliversalzburg)
+Pablo [@ppollono](https://github.com/ppollono)
+Rabehaja Stevens [@RABEHAJA-STEVENS](https://github.com/RABEHAJA-STEVENS)
+Raphael Pigulla [@pigulla](https://github.com/pigulla)
+rebeccapeltz [@rebeccapeltz](https://github.com/rebeccapeltz)
+Stefan Tingström [@stingstrom](https://github.com/stingstrom)
diff --git a/node_modules/sprintf-js/LICENSE b/node_modules/sprintf-js/LICENSE
new file mode 100644
index 0000000..83f832a
--- /dev/null
+++ b/node_modules/sprintf-js/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+* Neither the name of this software nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/sprintf-js/README.md b/node_modules/sprintf-js/README.md
new file mode 100644
index 0000000..cad1e63
--- /dev/null
+++ b/node_modules/sprintf-js/README.md
@@ -0,0 +1,143 @@
+# sprintf-js
+
+[![Build Status][travisci-image]][travisci-url] [![NPM Version][npm-image]][npm-url] [![Dependency Status][dependencies-image]][dependencies-url] [![devDependency Status][dev-dependencies-image]][dev-dependencies-url]
+
+[travisci-image]: https://travis-ci.org/alexei/sprintf.js.svg?branch=master
+[travisci-url]: https://travis-ci.org/alexei/sprintf.js
+
+[npm-image]: https://badge.fury.io/js/sprintf-js.svg
+[npm-url]: https://badge.fury.io/js/sprintf-js
+
+[dependencies-image]: https://david-dm.org/alexei/sprintf.js.svg
+[dependencies-url]: https://david-dm.org/alexei/sprintf.js
+
+[dev-dependencies-image]: https://david-dm.org/alexei/sprintf.js/dev-status.svg
+[dev-dependencies-url]: https://david-dm.org/alexei/sprintf.js#info=devDependencies
+
+**sprintf-js** is a complete open source JavaScript `sprintf` implementation for the **browser** and **Node.js**.
+
+**Note: as of v1.1.1 you might need some polyfills for older environments. See [Support](#support) section below.**
+
+## Usage
+
+ var sprintf = require('sprintf-js').sprintf,
+ vsprintf = require('sprintf-js').vsprintf
+
+ sprintf('%2$s %3$s a %1$s', 'cracker', 'Polly', 'wants')
+ vsprintf('The first 4 letters of the english alphabet are: %s, %s, %s and %s', ['a', 'b', 'c', 'd'])
+
+## Installation
+
+### NPM
+
+ npm install sprintf-js
+
+### Bower
+
+ bower install sprintf
+
+## API
+
+### `sprintf`
+
+Returns a formatted string:
+
+ string sprintf(string format, mixed arg1?, mixed arg2?, ...)
+
+### `vsprintf`
+
+Same as `sprintf` except it takes an array of arguments, rather than a variable number of arguments:
+
+ string vsprintf(string format, array arguments?)
+
+## Format specification
+
+The placeholders in the format string are marked by `%` and are followed by one or more of these elements, in this order:
+
+* An optional number followed by a `$` sign that selects which argument index to use for the value. If not specified, arguments will be placed in the same order as the placeholders in the input string.
+* An optional `+` sign that forces to preceed the result with a plus or minus sign on numeric values. By default, only the `-` sign is used on negative numbers.
+* An optional padding specifier that says what character to use for padding (if specified). Possible values are `0` or any other character precedeed by a `'` (single quote). The default is to pad with *spaces*.
+* An optional `-` sign, that causes `sprintf` to left-align the result of this placeholder. The default is to right-align the result.
+* An optional number, that says how many characters the result should have. If the value to be returned is shorter than this number, the result will be padded. When used with the `j` (JSON) type specifier, the padding length specifies the tab size used for indentation.
+* An optional precision modifier, consisting of a `.` (dot) followed by a number, that says how many digits should be displayed for floating point numbers. When used with the `g` type specifier, it specifies the number of significant digits. When used on a string, it causes the result to be truncated.
+* A type specifier that can be any of:
+ * `%` — yields a literal `%` character
+ * `b` — yields an integer as a binary number
+ * `c` — yields an integer as the character with that ASCII value
+ * `d` or `i` — yields an integer as a signed decimal number
+ * `e` — yields a float using scientific notation
+ * `u` — yields an integer as an unsigned decimal number
+ * `f` — yields a float as is; see notes on precision above
+ * `g` — yields a float as is; see notes on precision above
+ * `o` — yields an integer as an octal number
+ * `s` — yields a string as is
+ * `t` — yields `true` or `false`
+ * `T` — yields the type of the argument<sup><a href="#fn-1" name="fn-ref-1">1</a></sup>
+ * `v` — yields the primitive value of the specified argument
+ * `x` — yields an integer as a hexadecimal number (lower-case)
+ * `X` — yields an integer as a hexadecimal number (upper-case)
+ * `j` — yields a JavaScript object or array as a JSON encoded string
+
+## Features
+
+### Argument swapping
+
+You can also swap the arguments. That is, the order of the placeholders doesn't have to match the order of the arguments. You can do that by simply indicating in the format string which arguments the placeholders refer to:
+
+ sprintf('%2$s %3$s a %1$s', 'cracker', 'Polly', 'wants')
+
+And, of course, you can repeat the placeholders without having to increase the number of arguments.
+
+### Named arguments
+
+Format strings may contain replacement fields rather than positional placeholders. Instead of referring to a certain argument, you can now refer to a certain key within an object. Replacement fields are surrounded by rounded parentheses - `(` and `)` - and begin with a keyword that refers to a key:
+
+ var user = {
+ name: 'Dolly',
+ }
+ sprintf('Hello %(name)s', user) // Hello Dolly
+
+Keywords in replacement fields can be optionally followed by any number of keywords or indexes:
+
+ var users = [
+ {name: 'Dolly'},
+ {name: 'Molly'},
+ {name: 'Polly'},
+ ]
+ sprintf('Hello %(users[0].name)s, %(users[1].name)s and %(users[2].name)s', {users: users}) // Hello Dolly, Molly and Polly
+
+Note: mixing positional and named placeholders is not (yet) supported
+
+### Computed values
+
+You can pass in a function as a dynamic value and it will be invoked (with no arguments) in order to compute the value on the fly.
+
+ sprintf('Current date and time: %s', function() { return new Date().toString() })
+
+### AngularJS
+
+You can use `sprintf` and `vsprintf` (also aliased as `fmt` and `vfmt` respectively) in your AngularJS projects. See `demo/`.
+
+## Support
+
+### Node.js
+
+`sprintf-js` runs in all active Node versions (4.x+).
+
+### Browser
+
+`sprintf-js` should work in all modern browsers. As of v1.1.1, you might need polyfills for the following:
+
+ - `String.prototype.repeat()` (any IE)
+ - `Array.isArray()` (IE < 9)
+ - `Object.create()` (IE < 9)
+
+YMMV
+
+## License
+
+**sprintf-js** is licensed under the terms of the 3-clause BSD license.
+
+## Notes
+
+<small><sup><a href="#fn-ref-1" name="fn-1">1</a></sup> `sprintf` doesn't use the `typeof` operator. As such, the value `null` is a `null`, an array is an `array` (not an `object`), a date value is a `date` etc.</small>
diff --git a/node_modules/sprintf-js/dist/.gitattributes b/node_modules/sprintf-js/dist/.gitattributes
new file mode 100644
index 0000000..d35bca0
--- /dev/null
+++ b/node_modules/sprintf-js/dist/.gitattributes
@@ -0,0 +1,4 @@
+#ignore all generated files from diff
+#also skip line ending check
+*.js -diff -text
+*.map -diff -text
diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.js b/node_modules/sprintf-js/dist/angular-sprintf.min.js
new file mode 100644
index 0000000..dedec81
--- /dev/null
+++ b/node_modules/sprintf-js/dist/angular-sprintf.min.js
@@ -0,0 +1,3 @@
+/*! sprintf-js v1.1.2 | Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro> | BSD-3-Clause */
+!function(){"use strict";angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(t){return t("sprintf")}]).filter("vsprintf",function(){return function(t,n){return vsprintf(t,n)}}).filter("vfmt",["$filter",function(t){return t("vsprintf")}])}();
+//# sourceMappingURL=angular-sprintf.min.js.map
diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.js.map b/node_modules/sprintf-js/dist/angular-sprintf.min.js.map
new file mode 100644
index 0000000..d30f1a3
--- /dev/null
+++ b/node_modules/sprintf-js/dist/angular-sprintf.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";CAEC,WACG,aAEAA,QACIC,OAAO,UAAW,IAClBC,OAAO,UAAW,WACd,OAAO,WACH,OAAOC,QAAQC,MAAM,KAAMC,cAGnCH,OAAO,MAAO,CAAC,UAAW,SAASI,GAC/B,OAAOA,EAAQ,cAEnBJ,OAAO,WAAY,WACf,OAAO,SAASK,EAAQC,GACpB,OAAOC,SAASF,EAAQC,MAGhCN,OAAO,OAAQ,CAAC,UAAW,SAASI,GAChC,OAAOA,EAAQ,eAnB1B","file":"angular-sprintf.min.js","sourcesContent":["/* global angular, sprintf, vsprintf */\n\n!function() {\n 'use strict'\n\n angular.\n module('sprintf', []).\n filter('sprintf', function() {\n return function() {\n return sprintf.apply(null, arguments)\n }\n }).\n filter('fmt', ['$filter', function($filter) {\n return $filter('sprintf')\n }]).\n filter('vsprintf', function() {\n return function(format, argv) {\n return vsprintf(format, argv)\n }\n }).\n filter('vfmt', ['$filter', function($filter) {\n return $filter('vsprintf')\n }])\n}(); // eslint-disable-line\n"]} \ No newline at end of file
diff --git a/node_modules/sprintf-js/dist/sprintf.min.js b/node_modules/sprintf-js/dist/sprintf.min.js
new file mode 100644
index 0000000..a3196b8
--- /dev/null
+++ b/node_modules/sprintf-js/dist/sprintf.min.js
@@ -0,0 +1,3 @@
+/*! sprintf-js v1.1.2 | Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro> | BSD-3-Clause */
+!function(){"use strict";var g={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function y(e){return function(e,t){var r,n,i,s,a,o,p,c,l,u=1,f=e.length,d="";for(n=0;n<f;n++)if("string"==typeof e[n])d+=e[n];else if("object"==typeof e[n]){if((s=e[n]).keys)for(r=t[u],i=0;i<s.keys.length;i++){if(null==r)throw new Error(y('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[i],s.keys[i-1]));r=r[s.keys[i]]}else r=s.param_no?t[s.param_no]:t[u++];if(g.not_type.test(s.type)&&g.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),g.numeric_arg.test(s.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(y("[sprintf] expecting number but found %T",r));switch(g.number.test(s.type)&&(c=0<=r),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}g.json.test(s.type)?d+=r:(!g.number.test(s.type)||c&&!s.sign?l="":(l=c?"+":"-",r=r.toString().replace(g.sign,"")),o=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+r).length,a=s.width&&0<p?o.repeat(p):"",d+=s.align?l+r+a:"0"===o?l+a+r:a+l+r)}return d}(function(e){if(p[e])return p[e];var t,r=e,n=[],i=0;for(;r;){if(null!==(t=g.text.exec(r)))n.push(t[0]);else if(null!==(t=g.modulo.exec(r)))n.push("%");else{if(null===(t=g.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var s=[],a=t[2],o=[];if(null===(o=g.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(o[1]);""!==(a=a.substring(o[0].length));)if(null!==(o=g.key_access.exec(a)))s.push(o[1]);else{if(null===(o=g.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(o[1])}t[2]=s}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return p[e]=n}(e),arguments)}function e(e,t){return y.apply(null,[e].concat(t||[]))}var p=Object.create(null);"undefined"!=typeof exports&&(exports.sprintf=y,exports.vsprintf=e),"undefined"!=typeof window&&(window.sprintf=y,window.vsprintf=e,"function"==typeof define&&define.amd&&define(function(){return{sprintf:y,vsprintf:e}}))}();
+//# sourceMappingURL=sprintf.min.js.map
diff --git a/node_modules/sprintf-js/dist/sprintf.min.js.map b/node_modules/sprintf-js/dist/sprintf.min.js.map
new file mode 100644
index 0000000..cb39322
--- /dev/null
+++ b/node_modules/sprintf-js/dist/sprintf.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["sprintf.js"],"names":["re","not_string","not_bool","not_type","not_primitive","number","numeric_arg","json","not_json","text","modulo","placeholder","key","key_access","index_access","sign","sprintf","parse_tree","argv","arg","i","k","ph","pad","pad_character","pad_length","is_positive","cursor","tree_length","length","output","keys","undefined","Error","param_no","test","type","Function","isNaN","TypeError","parseInt","toString","String","fromCharCode","JSON","stringify","width","precision","parseFloat","toExponential","toFixed","Number","toPrecision","substring","Object","prototype","call","slice","toLowerCase","valueOf","toUpperCase","replace","pad_char","charAt","repeat","align","sprintf_format","fmt","sprintf_cache","match","_fmt","arg_names","exec","push","SyntaxError","field_list","replacement_field","field_match","sprintf_parse","arguments","vsprintf","apply","concat","create","exports","window","define"],"mappings":";CAEC,WACG,aAEA,IAAIA,EAAK,CACLC,WAAY,OACZC,SAAU,OACVC,SAAU,OACVC,cAAe,OACfC,OAAQ,UACRC,YAAa,eACbC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,2FACbC,IAAK,sBACLC,WAAY,wBACZC,aAAc,aACdC,KAAM,SAGV,SAASC,EAAQJ,GAEb,OAOJ,SAAwBK,EAAYC,GAChC,IAAiDC,EAAkBC,EAAGC,EAAGC,EAAIC,EAAKC,EAAeC,EAAYC,EAAaX,EAAtHY,EAAS,EAAGC,EAAcX,EAAWY,OAAaC,EAAS,GAC/D,IAAKV,EAAI,EAAGA,EAAIQ,EAAaR,IACzB,GAA6B,iBAAlBH,EAAWG,GAClBU,GAAUb,EAAWG,QAEpB,GAA6B,iBAAlBH,EAAWG,GAAiB,CAExC,IADAE,EAAKL,EAAWG,IACTW,KAEH,IADAZ,EAAMD,EAAKS,GACNN,EAAI,EAAGA,EAAIC,EAAGS,KAAKF,OAAQR,IAAK,CACjC,GAAWW,MAAPb,EACA,MAAM,IAAIc,MAAMjB,EAAQ,gEAAiEM,EAAGS,KAAKV,GAAIC,EAAGS,KAAKV,EAAE,KAEnHF,EAAMA,EAAIG,EAAGS,KAAKV,SAItBF,EADKG,EAAGY,SACFhB,EAAKI,EAAGY,UAGRhB,EAAKS,KAOf,GAJI3B,EAAGG,SAASgC,KAAKb,EAAGc,OAASpC,EAAGI,cAAc+B,KAAKb,EAAGc,OAASjB,aAAekB,WAC9ElB,EAAMA,KAGNnB,EAAGM,YAAY6B,KAAKb,EAAGc,OAAyB,iBAARjB,GAAoBmB,MAAMnB,GAClE,MAAM,IAAIoB,UAAUvB,EAAQ,0CAA2CG,IAO3E,OAJInB,EAAGK,OAAO8B,KAAKb,EAAGc,QAClBV,EAAqB,GAAPP,GAGVG,EAAGc,MACP,IAAK,IACDjB,EAAMqB,SAASrB,EAAK,IAAIsB,SAAS,GACjC,MACJ,IAAK,IACDtB,EAAMuB,OAAOC,aAAaH,SAASrB,EAAK,KACxC,MACJ,IAAK,IACL,IAAK,IACDA,EAAMqB,SAASrB,EAAK,IACpB,MACJ,IAAK,IACDA,EAAMyB,KAAKC,UAAU1B,EAAK,KAAMG,EAAGwB,MAAQN,SAASlB,EAAGwB,OAAS,GAChE,MACJ,IAAK,IACD3B,EAAMG,EAAGyB,UAAYC,WAAW7B,GAAK8B,cAAc3B,EAAGyB,WAAaC,WAAW7B,GAAK8B,gBACnF,MACJ,IAAK,IACD9B,EAAMG,EAAGyB,UAAYC,WAAW7B,GAAK+B,QAAQ5B,EAAGyB,WAAaC,WAAW7B,GACxE,MACJ,IAAK,IACDA,EAAMG,EAAGyB,UAAYL,OAAOS,OAAOhC,EAAIiC,YAAY9B,EAAGyB,aAAeC,WAAW7B,GAChF,MACJ,IAAK,IACDA,GAAOqB,SAASrB,EAAK,MAAQ,GAAGsB,SAAS,GACzC,MACJ,IAAK,IACDtB,EAAMuB,OAAOvB,GACbA,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,EAAMuB,SAASvB,GACfA,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,EAAMmC,OAAOC,UAAUd,SAASe,KAAKrC,GAAKsC,MAAM,GAAI,GAAGC,cACvDvC,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,EAAMqB,SAASrB,EAAK,MAAQ,EAC5B,MACJ,IAAK,IACDA,EAAMA,EAAIwC,UACVxC,EAAOG,EAAGyB,UAAY5B,EAAIkC,UAAU,EAAG/B,EAAGyB,WAAa5B,EACvD,MACJ,IAAK,IACDA,GAAOqB,SAASrB,EAAK,MAAQ,GAAGsB,SAAS,IACzC,MACJ,IAAK,IACDtB,GAAOqB,SAASrB,EAAK,MAAQ,GAAGsB,SAAS,IAAImB,cAGjD5D,EAAGO,KAAK4B,KAAKb,EAAGc,MAChBN,GAAUX,IAGNnB,EAAGK,OAAO8B,KAAKb,EAAGc,OAAWV,IAAeJ,EAAGP,KAK/CA,EAAO,IAJPA,EAAOW,EAAc,IAAM,IAC3BP,EAAMA,EAAIsB,WAAWoB,QAAQ7D,EAAGe,KAAM,KAK1CS,EAAgBF,EAAGwC,SAA2B,MAAhBxC,EAAGwC,SAAmB,IAAMxC,EAAGwC,SAASC,OAAO,GAAK,IAClFtC,EAAaH,EAAGwB,OAAS/B,EAAOI,GAAKU,OACrCN,EAAMD,EAAGwB,OAAsB,EAAbrB,EAAiBD,EAAcwC,OAAOvC,GAAoB,GAC5EK,GAAUR,EAAG2C,MAAQlD,EAAOI,EAAMI,EAAyB,MAAlBC,EAAwBT,EAAOQ,EAAMJ,EAAMI,EAAMR,EAAOI,GAI7G,OAAOW,EAjHAoC,CAsHX,SAAuBC,GACnB,GAAIC,EAAcD,GACd,OAAOC,EAAcD,GAGzB,IAAgBE,EAAZC,EAAOH,EAAYlD,EAAa,GAAIsD,EAAY,EACpD,KAAOD,GAAM,CACT,GAAqC,QAAhCD,EAAQrE,EAAGS,KAAK+D,KAAKF,IACtBrD,EAAWwD,KAAKJ,EAAM,SAErB,GAAuC,QAAlCA,EAAQrE,EAAGU,OAAO8D,KAAKF,IAC7BrD,EAAWwD,KAAK,SAEf,CAAA,GAA4C,QAAvCJ,EAAQrE,EAAGW,YAAY6D,KAAKF,IA6ClC,MAAM,IAAII,YAAY,oCA5CtB,GAAIL,EAAM,GAAI,CACVE,GAAa,EACb,IAAII,EAAa,GAAIC,EAAoBP,EAAM,GAAIQ,EAAc,GACjE,GAAuD,QAAlDA,EAAc7E,EAAGY,IAAI4D,KAAKI,IAe3B,MAAM,IAAIF,YAAY,gDAbtB,IADAC,EAAWF,KAAKI,EAAY,IACwD,MAA5ED,EAAoBA,EAAkBvB,UAAUwB,EAAY,GAAGhD,UACnE,GAA8D,QAAzDgD,EAAc7E,EAAGa,WAAW2D,KAAKI,IAClCD,EAAWF,KAAKI,EAAY,QAE3B,CAAA,GAAgE,QAA3DA,EAAc7E,EAAGc,aAAa0D,KAAKI,IAIzC,MAAM,IAAIF,YAAY,gDAHtBC,EAAWF,KAAKI,EAAY,IAUxCR,EAAM,GAAKM,OAGXJ,GAAa,EAEjB,GAAkB,IAAdA,EACA,MAAM,IAAItC,MAAM,6EAGpBhB,EAAWwD,KACP,CACI9D,YAAa0D,EAAM,GACnBnC,SAAamC,EAAM,GACnBtC,KAAasC,EAAM,GACnBtD,KAAasD,EAAM,GACnBP,SAAaO,EAAM,GACnBJ,MAAaI,EAAM,GACnBvB,MAAauB,EAAM,GACnBtB,UAAasB,EAAM,GACnBjC,KAAaiC,EAAM,KAO/BC,EAAOA,EAAKjB,UAAUgB,EAAM,GAAGxC,QAEnC,OAAOuC,EAAcD,GAAOlD,EApLN6D,CAAclE,GAAMmE,WAG9C,SAASC,EAASb,EAAKjD,GACnB,OAAOF,EAAQiE,MAAM,KAAM,CAACd,GAAKe,OAAOhE,GAAQ,KAgHpD,IAAIkD,EAAgBd,OAAO6B,OAAO,MAuEX,oBAAZC,UACPA,QAAiB,QAAIpE,EACrBoE,QAAkB,SAAIJ,GAEJ,oBAAXK,SACPA,OAAgB,QAAIrE,EACpBqE,OAAiB,SAAIL,EAEC,mBAAXM,QAAyBA,OAAY,KAC5CA,OAAO,WACH,MAAO,CACHtE,QAAWA,EACXgE,SAAYA,MA9N/B","file":"sprintf.min.js","sourcesContent":["/* global window, exports, define */\n\n!function() {\n 'use strict'\n\n var re = {\n not_string: /[^s]/,\n not_bool: /[^t]/,\n not_type: /[^T]/,\n not_primitive: /[^v]/,\n number: /[diefg]/,\n numeric_arg: /[bcdiefguxX]/,\n json: /[j]/,\n not_json: /[^j]/,\n text: /^[^\\x25]+/,\n modulo: /^\\x25{2}/,\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n key: /^([a-z_][a-z_\\d]*)/i,\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n index_access: /^\\[(\\d+)\\]/,\n sign: /^[+-]/\n }\n\n function sprintf(key) {\n // `arguments` is not an array, but should be fine for this call\n return sprintf_format(sprintf_parse(key), arguments)\n }\n\n function vsprintf(fmt, argv) {\n return sprintf.apply(null, [fmt].concat(argv || []))\n }\n\n function sprintf_format(parse_tree, argv) {\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign\n for (i = 0; i < tree_length; i++) {\n if (typeof parse_tree[i] === 'string') {\n output += parse_tree[i]\n }\n else if (typeof parse_tree[i] === 'object') {\n ph = parse_tree[i] // convenience purposes only\n if (ph.keys) { // keyword argument\n arg = argv[cursor]\n for (k = 0; k < ph.keys.length; k++) {\n if (arg == undefined) {\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k], ph.keys[k-1]))\n }\n arg = arg[ph.keys[k]]\n }\n }\n else if (ph.param_no) { // positional argument (explicit)\n arg = argv[ph.param_no]\n }\n else { // positional argument (implicit)\n arg = argv[cursor++]\n }\n\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\n arg = arg()\n }\n\n if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {\n throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n }\n\n if (re.number.test(ph.type)) {\n is_positive = arg >= 0\n }\n\n switch (ph.type) {\n case 'b':\n arg = parseInt(arg, 10).toString(2)\n break\n case 'c':\n arg = String.fromCharCode(parseInt(arg, 10))\n break\n case 'd':\n case 'i':\n arg = parseInt(arg, 10)\n break\n case 'j':\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\n break\n case 'e':\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\n break\n case 'f':\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\n break\n case 'g':\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\n break\n case 'o':\n arg = (parseInt(arg, 10) >>> 0).toString(8)\n break\n case 's':\n arg = String(arg)\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 't':\n arg = String(!!arg)\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'T':\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'u':\n arg = parseInt(arg, 10) >>> 0\n break\n case 'v':\n arg = arg.valueOf()\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'x':\n arg = (parseInt(arg, 10) >>> 0).toString(16)\n break\n case 'X':\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n break\n }\n if (re.json.test(ph.type)) {\n output += arg\n }\n else {\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\n sign = is_positive ? '+' : '-'\n arg = arg.toString().replace(re.sign, '')\n }\n else {\n sign = ''\n }\n pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\n pad_length = ph.width - (sign + arg).length\n pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n }\n }\n }\n return output\n }\n\n var sprintf_cache = Object.create(null)\n\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt]\n }\n\n var _fmt = fmt, match, parse_tree = [], arg_names = 0\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0])\n }\n else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push('%')\n }\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1\n var field_list = [], replacement_field = match[2], field_match = []\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n }\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n match[2] = field_list\n }\n else {\n arg_names |= 2\n }\n if (arg_names === 3) {\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n }\n\n parse_tree.push(\n {\n placeholder: match[0],\n param_no: match[1],\n keys: match[2],\n sign: match[3],\n pad_char: match[4],\n align: match[5],\n width: match[6],\n precision: match[7],\n type: match[8]\n }\n )\n }\n else {\n throw new SyntaxError('[sprintf] unexpected placeholder')\n }\n _fmt = _fmt.substring(match[0].length)\n }\n return sprintf_cache[fmt] = parse_tree\n }\n\n /**\n * export to either browser or node.js\n */\n /* eslint-disable quote-props */\n if (typeof exports !== 'undefined') {\n exports['sprintf'] = sprintf\n exports['vsprintf'] = vsprintf\n }\n if (typeof window !== 'undefined') {\n window['sprintf'] = sprintf\n window['vsprintf'] = vsprintf\n\n if (typeof define === 'function' && define['amd']) {\n define(function() {\n return {\n 'sprintf': sprintf,\n 'vsprintf': vsprintf\n }\n })\n }\n }\n /* eslint-enable quote-props */\n}(); // eslint-disable-line\n"]} \ No newline at end of file
diff --git a/node_modules/sprintf-js/package.json b/node_modules/sprintf-js/package.json
new file mode 100644
index 0000000..2043fa3
--- /dev/null
+++ b/node_modules/sprintf-js/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "sprintf-js",
+ "version": "1.1.2",
+ "description": "JavaScript sprintf implementation",
+ "author": "Alexandru Mărășteanu <hello@alexei.ro>",
+ "main": "src/sprintf.js",
+ "scripts": {
+ "test": "mocha test/*.js",
+ "pretest": "npm run lint",
+ "lint": "eslint .",
+ "lint:fix": "eslint --fix ."
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/alexei/sprintf.js.git"
+ },
+ "license": "BSD-3-Clause",
+ "readmeFilename": "README.md",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "eslint": "^5.10.0",
+ "gulp": "^3.9.1",
+ "gulp-benchmark": "^1.1.1",
+ "gulp-eslint": "^5.0.0",
+ "gulp-header": "^2.0.5",
+ "gulp-mocha": "^6.0.0",
+ "gulp-rename": "^1.4.0",
+ "gulp-sourcemaps": "^2.6.4",
+ "gulp-uglify": "^3.0.1",
+ "mocha": "^5.2.0"
+ }
+}
diff --git a/node_modules/sprintf-js/src/angular-sprintf.js b/node_modules/sprintf-js/src/angular-sprintf.js
new file mode 100644
index 0000000..dbfdd65
--- /dev/null
+++ b/node_modules/sprintf-js/src/angular-sprintf.js
@@ -0,0 +1,24 @@
+/* global angular, sprintf, vsprintf */
+
+!function() {
+ 'use strict'
+
+ angular.
+ module('sprintf', []).
+ filter('sprintf', function() {
+ return function() {
+ return sprintf.apply(null, arguments)
+ }
+ }).
+ filter('fmt', ['$filter', function($filter) {
+ return $filter('sprintf')
+ }]).
+ filter('vsprintf', function() {
+ return function(format, argv) {
+ return vsprintf(format, argv)
+ }
+ }).
+ filter('vfmt', ['$filter', function($filter) {
+ return $filter('vsprintf')
+ }])
+}(); // eslint-disable-line
diff --git a/node_modules/sprintf-js/src/sprintf.js b/node_modules/sprintf-js/src/sprintf.js
new file mode 100644
index 0000000..65d6324
--- /dev/null
+++ b/node_modules/sprintf-js/src/sprintf.js
@@ -0,0 +1,231 @@
+/* global window, exports, define */
+
+!function() {
+ 'use strict'
+
+ var re = {
+ not_string: /[^s]/,
+ not_bool: /[^t]/,
+ not_type: /[^T]/,
+ not_primitive: /[^v]/,
+ number: /[diefg]/,
+ numeric_arg: /[bcdiefguxX]/,
+ json: /[j]/,
+ not_json: /[^j]/,
+ text: /^[^\x25]+/,
+ modulo: /^\x25{2}/,
+ placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
+ key: /^([a-z_][a-z_\d]*)/i,
+ key_access: /^\.([a-z_][a-z_\d]*)/i,
+ index_access: /^\[(\d+)\]/,
+ sign: /^[+-]/
+ }
+
+ function sprintf(key) {
+ // `arguments` is not an array, but should be fine for this call
+ return sprintf_format(sprintf_parse(key), arguments)
+ }
+
+ function vsprintf(fmt, argv) {
+ return sprintf.apply(null, [fmt].concat(argv || []))
+ }
+
+ function sprintf_format(parse_tree, argv) {
+ var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign
+ for (i = 0; i < tree_length; i++) {
+ if (typeof parse_tree[i] === 'string') {
+ output += parse_tree[i]
+ }
+ else if (typeof parse_tree[i] === 'object') {
+ ph = parse_tree[i] // convenience purposes only
+ if (ph.keys) { // keyword argument
+ arg = argv[cursor]
+ for (k = 0; k < ph.keys.length; k++) {
+ if (arg == undefined) {
+ throw new Error(sprintf('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k-1]))
+ }
+ arg = arg[ph.keys[k]]
+ }
+ }
+ else if (ph.param_no) { // positional argument (explicit)
+ arg = argv[ph.param_no]
+ }
+ else { // positional argument (implicit)
+ arg = argv[cursor++]
+ }
+
+ if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
+ arg = arg()
+ }
+
+ if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {
+ throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
+ }
+
+ if (re.number.test(ph.type)) {
+ is_positive = arg >= 0
+ }
+
+ switch (ph.type) {
+ case 'b':
+ arg = parseInt(arg, 10).toString(2)
+ break
+ case 'c':
+ arg = String.fromCharCode(parseInt(arg, 10))
+ break
+ case 'd':
+ case 'i':
+ arg = parseInt(arg, 10)
+ break
+ case 'j':
+ arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)
+ break
+ case 'e':
+ arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()
+ break
+ case 'f':
+ arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)
+ break
+ case 'g':
+ arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)
+ break
+ case 'o':
+ arg = (parseInt(arg, 10) >>> 0).toString(8)
+ break
+ case 's':
+ arg = String(arg)
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
+ break
+ case 't':
+ arg = String(!!arg)
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
+ break
+ case 'T':
+ arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
+ break
+ case 'u':
+ arg = parseInt(arg, 10) >>> 0
+ break
+ case 'v':
+ arg = arg.valueOf()
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
+ break
+ case 'x':
+ arg = (parseInt(arg, 10) >>> 0).toString(16)
+ break
+ case 'X':
+ arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()
+ break
+ }
+ if (re.json.test(ph.type)) {
+ output += arg
+ }
+ else {
+ if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
+ sign = is_positive ? '+' : '-'
+ arg = arg.toString().replace(re.sign, '')
+ }
+ else {
+ sign = ''
+ }
+ pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '
+ pad_length = ph.width - (sign + arg).length
+ pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
+ output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
+ }
+ }
+ }
+ return output
+ }
+
+ var sprintf_cache = Object.create(null)
+
+ function sprintf_parse(fmt) {
+ if (sprintf_cache[fmt]) {
+ return sprintf_cache[fmt]
+ }
+
+ var _fmt = fmt, match, parse_tree = [], arg_names = 0
+ while (_fmt) {
+ if ((match = re.text.exec(_fmt)) !== null) {
+ parse_tree.push(match[0])
+ }
+ else if ((match = re.modulo.exec(_fmt)) !== null) {
+ parse_tree.push('%')
+ }
+ else if ((match = re.placeholder.exec(_fmt)) !== null) {
+ if (match[2]) {
+ arg_names |= 1
+ var field_list = [], replacement_field = match[2], field_match = []
+ if ((field_match = re.key.exec(replacement_field)) !== null) {
+ field_list.push(field_match[1])
+ while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
+ if ((field_match = re.key_access.exec(replacement_field)) !== null) {
+ field_list.push(field_match[1])
+ }
+ else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
+ field_list.push(field_match[1])
+ }
+ else {
+ throw new SyntaxError('[sprintf] failed to parse named argument key')
+ }
+ }
+ }
+ else {
+ throw new SyntaxError('[sprintf] failed to parse named argument key')
+ }
+ match[2] = field_list
+ }
+ else {
+ arg_names |= 2
+ }
+ if (arg_names === 3) {
+ throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')
+ }
+
+ parse_tree.push(
+ {
+ placeholder: match[0],
+ param_no: match[1],
+ keys: match[2],
+ sign: match[3],
+ pad_char: match[4],
+ align: match[5],
+ width: match[6],
+ precision: match[7],
+ type: match[8]
+ }
+ )
+ }
+ else {
+ throw new SyntaxError('[sprintf] unexpected placeholder')
+ }
+ _fmt = _fmt.substring(match[0].length)
+ }
+ return sprintf_cache[fmt] = parse_tree
+ }
+
+ /**
+ * export to either browser or node.js
+ */
+ /* eslint-disable quote-props */
+ if (typeof exports !== 'undefined') {
+ exports['sprintf'] = sprintf
+ exports['vsprintf'] = vsprintf
+ }
+ if (typeof window !== 'undefined') {
+ window['sprintf'] = sprintf
+ window['vsprintf'] = vsprintf
+
+ if (typeof define === 'function' && define['amd']) {
+ define(function() {
+ return {
+ 'sprintf': sprintf,
+ 'vsprintf': vsprintf
+ }
+ })
+ }
+ }
+ /* eslint-enable quote-props */
+}(); // eslint-disable-line
diff --git a/node_modules/sshpk/.npmignore b/node_modules/sshpk/.npmignore
new file mode 100644
index 0000000..8000b59
--- /dev/null
+++ b/node_modules/sshpk/.npmignore
@@ -0,0 +1,9 @@
+.gitmodules
+deps
+docs
+Makefile
+node_modules
+test
+tools
+coverage
+man/src
diff --git a/node_modules/sshpk/.travis.yml b/node_modules/sshpk/.travis.yml
new file mode 100644
index 0000000..c3394c2
--- /dev/null
+++ b/node_modules/sshpk/.travis.yml
@@ -0,0 +1,11 @@
+language: node_js
+node_js:
+ - "5.10"
+ - "4.4"
+ - "4.1"
+ - "0.12"
+ - "0.10"
+before_install:
+ - "make check"
+after_success:
+ - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio'
diff --git a/node_modules/sshpk/LICENSE b/node_modules/sshpk/LICENSE
new file mode 100644
index 0000000..f6d947d
--- /dev/null
+++ b/node_modules/sshpk/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/node_modules/sshpk/README.md b/node_modules/sshpk/README.md
new file mode 100644
index 0000000..5740f74
--- /dev/null
+++ b/node_modules/sshpk/README.md
@@ -0,0 +1,804 @@
+sshpk
+=========
+
+Parse, convert, fingerprint and use SSH keys (both public and private) in pure
+node -- no `ssh-keygen` or other external dependencies.
+
+Supports RSA, DSA, ECDSA (nistp-\*) and ED25519 key types, in PEM (PKCS#1,
+PKCS#8) and OpenSSH formats.
+
+This library has been extracted from
+[`node-http-signature`](https://github.com/joyent/node-http-signature)
+(work by [Mark Cavage](https://github.com/mcavage) and
+[Dave Eddy](https://github.com/bahamas10)) and
+[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint)
+(work by Dave Eddy), with additions (including ECDSA support) by
+[Alex Wilson](https://github.com/arekinath).
+
+Install
+-------
+
+```
+npm install sshpk
+```
+
+Examples
+--------
+
+```js
+var sshpk = require('sshpk');
+
+var fs = require('fs');
+
+/* Read in an OpenSSH-format public key */
+var keyPub = fs.readFileSync('id_rsa.pub');
+var key = sshpk.parseKey(keyPub, 'ssh');
+
+/* Get metadata about the key */
+console.log('type => %s', key.type);
+console.log('size => %d bits', key.size);
+console.log('comment => %s', key.comment);
+
+/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */
+console.log('fingerprint => %s', key.fingerprint().toString());
+console.log('old-style fingerprint => %s', key.fingerprint('md5').toString());
+```
+
+Example output:
+
+```
+type => rsa
+size => 2048 bits
+comment => foo@foo.com
+fingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w
+old-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd
+```
+
+More examples: converting between formats:
+
+```js
+/* Read in a PEM public key */
+var keyPem = fs.readFileSync('id_rsa.pem');
+var key = sshpk.parseKey(keyPem, 'pem');
+
+/* Convert to PEM PKCS#8 public key format */
+var pemBuf = key.toBuffer('pkcs8');
+
+/* Convert to SSH public key format (and return as a string) */
+var sshKey = key.toString('ssh');
+```
+
+Signing and verifying:
+
+```js
+/* Read in an OpenSSH/PEM *private* key */
+var keyPriv = fs.readFileSync('id_ecdsa');
+var key = sshpk.parsePrivateKey(keyPriv, 'pem');
+
+var data = 'some data';
+
+/* Sign some data with the key */
+var s = key.createSign('sha1');
+s.update(data);
+var signature = s.sign();
+
+/* Now load the public key (could also use just key.toPublic()) */
+var keyPub = fs.readFileSync('id_ecdsa.pub');
+key = sshpk.parseKey(keyPub, 'ssh');
+
+/* Make a crypto.Verifier with this key */
+var v = key.createVerify('sha1');
+v.update(data);
+var valid = v.verify(signature);
+/* => true! */
+```
+
+Matching fingerprints with keys:
+
+```js
+var fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w');
+
+var keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...];
+
+keys.forEach(function (key) {
+ if (fp.matches(key))
+ console.log('found it!');
+});
+```
+
+Usage
+-----
+
+## Public keys
+
+### `parseKey(data[, format = 'auto'[, options]])`
+
+Parses a key from a given data format and returns a new `Key` object.
+
+Parameters
+
+- `data` -- Either a Buffer or String, containing the key
+- `format` -- String name of format to use, valid options are:
+ - `auto`: choose automatically from all below
+ - `pem`: supports both PKCS#1 and PKCS#8
+ - `ssh`: standard OpenSSH format,
+ - `pkcs1`, `pkcs8`: variants of `pem`
+ - `rfc4253`: raw OpenSSH wire format
+ - `openssh`: new post-OpenSSH 6.5 internal format, produced by
+ `ssh-keygen -o`
+ - `dnssec`: `.key` file format output by `dnssec-keygen` etc
+ - `putty`: the PuTTY `.ppk` file format (supports truncated variant without
+ all the lines from `Private-Lines:` onwards)
+- `options` -- Optional Object, extra options, with keys:
+ - `filename` -- Optional String, name for the key being parsed
+ (eg. the filename that was opened). Used to generate
+ Error messages
+ - `passphrase` -- Optional String, encryption passphrase used to decrypt an
+ encrypted PEM file
+
+### `Key.isKey(obj)`
+
+Returns `true` if the given object is a valid `Key` object created by a version
+of `sshpk` compatible with this one.
+
+Parameters
+
+- `obj` -- Object to identify
+
+### `Key#type`
+
+String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.
+
+### `Key#size`
+
+Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus;
+for ECDSA this is the bit size of the curve in use.
+
+### `Key#comment`
+
+Optional string, a key comment used by some formats (eg the `ssh` format).
+
+### `Key#curve`
+
+Only present if `this.type === 'ecdsa'`, string containing the name of the
+named curve used with this key. Possible values include `nistp256`, `nistp384`
+and `nistp521`.
+
+### `Key#toBuffer([format = 'ssh'])`
+
+Convert the key into a given data format and return the serialized key as
+a Buffer.
+
+Parameters
+
+- `format` -- String name of format to use, for valid options see `parseKey()`
+
+### `Key#toString([format = 'ssh])`
+
+Same as `this.toBuffer(format).toString()`.
+
+### `Key#fingerprint([algorithm = 'sha256'[, hashType = 'ssh']])`
+
+Creates a new `Fingerprint` object representing this Key's fingerprint.
+
+Parameters
+
+- `algorithm` -- String name of hash algorithm to use, valid options are `md5`,
+ `sha1`, `sha256`, `sha384`, `sha512`
+- `hashType` -- String name of fingerprint hash type to use, valid options are
+ `ssh` (the type of fingerprint used by OpenSSH, e.g. in
+ `ssh-keygen`), `spki` (used by HPKP, some OpenSSL applications)
+
+### `Key#createVerify([hashAlgorithm])`
+
+Creates a `crypto.Verifier` specialized to use this Key (and the correct public
+key algorithm to match it). The returned Verifier has the same API as a regular
+one, except that the `verify()` function takes only the target signature as an
+argument.
+
+Parameters
+
+- `hashAlgorithm` -- optional String name of hash algorithm to use, any
+ supported by OpenSSL are valid, usually including
+ `sha1`, `sha256`.
+
+`v.verify(signature[, format])` Parameters
+
+- `signature` -- either a Signature object, or a Buffer or String
+- `format` -- optional String, name of format to interpret given String with.
+ Not valid if `signature` is a Signature or Buffer.
+
+### `Key#createDiffieHellman()`
+### `Key#createDH()`
+
+Creates a Diffie-Hellman key exchange object initialized with this key and all
+necessary parameters. This has the same API as a `crypto.DiffieHellman`
+instance, except that functions take `Key` and `PrivateKey` objects as
+arguments, and return them where indicated for.
+
+This is only valid for keys belonging to a cryptosystem that supports DHE
+or a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt
+to call this function on other keys will yield an `Error`.
+
+## Private keys
+
+### `parsePrivateKey(data[, format = 'auto'[, options]])`
+
+Parses a private key from a given data format and returns a new
+`PrivateKey` object.
+
+Parameters
+
+- `data` -- Either a Buffer or String, containing the key
+- `format` -- String name of format to use, valid options are:
+ - `auto`: choose automatically from all below
+ - `pem`: supports both PKCS#1 and PKCS#8
+ - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by
+ `ssh-keygen -o`
+ - `pkcs1`, `pkcs8`: variants of `pem`
+ - `rfc4253`: raw OpenSSH wire format
+ - `dnssec`: `.private` format output by `dnssec-keygen` etc.
+- `options` -- Optional Object, extra options, with keys:
+ - `filename` -- Optional String, name for the key being parsed
+ (eg. the filename that was opened). Used to generate
+ Error messages
+ - `passphrase` -- Optional String, encryption passphrase used to decrypt an
+ encrypted PEM file
+
+### `generatePrivateKey(type[, options])`
+
+Generates a new private key of a certain key type, from random data.
+
+Parameters
+
+- `type` -- String, type of key to generate. Currently supported are `'ecdsa'`
+ and `'ed25519'`
+- `options` -- optional Object, with keys:
+ - `curve` -- optional String, for `'ecdsa'` keys, specifies the curve to use.
+ If ECDSA is specified and this option is not given, defaults to
+ using `'nistp256'`.
+
+### `PrivateKey.isPrivateKey(obj)`
+
+Returns `true` if the given object is a valid `PrivateKey` object created by a
+version of `sshpk` compatible with this one.
+
+Parameters
+
+- `obj` -- Object to identify
+
+### `PrivateKey#type`
+
+String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.
+
+### `PrivateKey#size`
+
+Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus;
+for ECDSA this is the bit size of the curve in use.
+
+### `PrivateKey#curve`
+
+Only present if `this.type === 'ecdsa'`, string containing the name of the
+named curve used with this key. Possible values include `nistp256`, `nistp384`
+and `nistp521`.
+
+### `PrivateKey#toBuffer([format = 'pkcs1'])`
+
+Convert the key into a given data format and return the serialized key as
+a Buffer.
+
+Parameters
+
+- `format` -- String name of format to use, valid options are listed under
+ `parsePrivateKey`. Note that ED25519 keys default to `openssh`
+ format instead (as they have no `pkcs1` representation).
+
+### `PrivateKey#toString([format = 'pkcs1'])`
+
+Same as `this.toBuffer(format).toString()`.
+
+### `PrivateKey#toPublic()`
+
+Extract just the public part of this private key, and return it as a `Key`
+object.
+
+### `PrivateKey#fingerprint([algorithm = 'sha256'])`
+
+Same as `this.toPublic().fingerprint()`.
+
+### `PrivateKey#createVerify([hashAlgorithm])`
+
+Same as `this.toPublic().createVerify()`.
+
+### `PrivateKey#createSign([hashAlgorithm])`
+
+Creates a `crypto.Sign` specialized to use this PrivateKey (and the correct
+key algorithm to match it). The returned Signer has the same API as a regular
+one, except that the `sign()` function takes no arguments, and returns a
+`Signature` object.
+
+Parameters
+
+- `hashAlgorithm` -- optional String name of hash algorithm to use, any
+ supported by OpenSSL are valid, usually including
+ `sha1`, `sha256`.
+
+`v.sign()` Parameters
+
+- none
+
+### `PrivateKey#derive(newType)`
+
+Derives a related key of type `newType` from this key. Currently this is
+only supported to change between `ed25519` and `curve25519` keys which are
+stored with the same private key (but usually distinct public keys in order
+to avoid degenerate keys that lead to a weak Diffie-Hellman exchange).
+
+Parameters
+
+- `newType` -- String, type of key to derive, either `ed25519` or `curve25519`
+
+## Fingerprints
+
+### `parseFingerprint(fingerprint[, options])`
+
+Pre-parses a fingerprint, creating a `Fingerprint` object that can be used to
+quickly locate a key by using the `Fingerprint#matches` function.
+
+Parameters
+
+- `fingerprint` -- String, the fingerprint value, in any supported format
+- `options` -- Optional Object, with properties:
+ - `algorithms` -- Array of strings, names of hash algorithms to limit
+ support to. If `fingerprint` uses a hash algorithm not on
+ this list, throws `InvalidAlgorithmError`.
+ - `hashType` -- String, the type of hash the fingerprint uses, either `ssh`
+ or `spki` (normally auto-detected based on the format, but
+ can be overridden)
+ - `type` -- String, the entity this fingerprint identifies, either `key` or
+ `certificate`
+
+### `Fingerprint.isFingerprint(obj)`
+
+Returns `true` if the given object is a valid `Fingerprint` object created by a
+version of `sshpk` compatible with this one.
+
+Parameters
+
+- `obj` -- Object to identify
+
+### `Fingerprint#toString([format])`
+
+Returns a fingerprint as a string, in the given format.
+
+Parameters
+
+- `format` -- Optional String, format to use, valid options are `hex` and
+ `base64`. If this `Fingerprint` uses the `md5` algorithm, the
+ default format is `hex`. Otherwise, the default is `base64`.
+
+### `Fingerprint#matches(keyOrCertificate)`
+
+Verifies whether or not this `Fingerprint` matches a given `Key` or
+`Certificate`. This function uses double-hashing to avoid leaking timing
+information. Returns a boolean.
+
+Note that a `Key`-type Fingerprint will always return `false` if asked to match
+a `Certificate` and vice versa.
+
+Parameters
+
+- `keyOrCertificate` -- a `Key` object or `Certificate` object, the entity to
+ match this fingerprint against
+
+## Signatures
+
+### `parseSignature(signature, algorithm, format)`
+
+Parses a signature in a given format, creating a `Signature` object. Useful
+for converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and
+also returned as output from `PrivateKey#createSign().sign()`.
+
+A Signature object can also be passed to a verifier produced by
+`Key#createVerify()` and it will automatically be converted internally into the
+correct format for verification.
+
+Parameters
+
+- `signature` -- a Buffer (binary) or String (base64), data of the actual
+ signature in the given format
+- `algorithm` -- a String, name of the algorithm to be used, possible values
+ are `rsa`, `dsa`, `ecdsa`
+- `format` -- a String, either `asn1` or `ssh`
+
+### `Signature.isSignature(obj)`
+
+Returns `true` if the given object is a valid `Signature` object created by a
+version of `sshpk` compatible with this one.
+
+Parameters
+
+- `obj` -- Object to identify
+
+### `Signature#toBuffer([format = 'asn1'])`
+
+Converts a Signature to the given format and returns it as a Buffer.
+
+Parameters
+
+- `format` -- a String, either `asn1` or `ssh`
+
+### `Signature#toString([format = 'asn1'])`
+
+Same as `this.toBuffer(format).toString('base64')`.
+
+## Certificates
+
+`sshpk` includes basic support for parsing certificates in X.509 (PEM) format
+and the OpenSSH certificate format. This feature is intended to be used mainly
+to access basic metadata about certificates, extract public keys from them, and
+also to generate simple self-signed certificates from an existing key.
+
+Notably, there is no implementation of CA chain-of-trust verification, and only
+very minimal support for key usage restrictions. Please do the security world
+a favour, and DO NOT use this code for certificate verification in the
+traditional X.509 CA chain style.
+
+### `parseCertificate(data, format)`
+
+Parameters
+
+ - `data` -- a Buffer or String
+ - `format` -- a String, format to use, one of `'openssh'`, `'pem'` (X.509 in a
+ PEM wrapper), or `'x509'` (raw DER encoded)
+
+### `createSelfSignedCertificate(subject, privateKey[, options])`
+
+Parameters
+
+ - `subject` -- an Identity, the subject of the certificate
+ - `privateKey` -- a PrivateKey, the key of the subject: will be used both to be
+ placed in the certificate and also to sign it (since this is
+ a self-signed certificate)
+ - `options` -- optional Object, with keys:
+ - `lifetime` -- optional Number, lifetime of the certificate from now in
+ seconds
+ - `validFrom`, `validUntil` -- optional Dates, beginning and end of
+ certificate validity period. If given
+ `lifetime` will be ignored
+ - `serial` -- optional Buffer, the serial number of the certificate
+ - `purposes` -- optional Array of String, X.509 key usage restrictions
+
+### `createCertificate(subject, key, issuer, issuerKey[, options])`
+
+Parameters
+
+ - `subject` -- an Identity, the subject of the certificate
+ - `key` -- a Key, the public key of the subject
+ - `issuer` -- an Identity, the issuer of the certificate who will sign it
+ - `issuerKey` -- a PrivateKey, the issuer's private key for signing
+ - `options` -- optional Object, with keys:
+ - `lifetime` -- optional Number, lifetime of the certificate from now in
+ seconds
+ - `validFrom`, `validUntil` -- optional Dates, beginning and end of
+ certificate validity period. If given
+ `lifetime` will be ignored
+ - `serial` -- optional Buffer, the serial number of the certificate
+ - `purposes` -- optional Array of String, X.509 key usage restrictions
+
+### `Certificate#subjects`
+
+Array of `Identity` instances describing the subject of this certificate.
+
+### `Certificate#issuer`
+
+The `Identity` of the Certificate's issuer (signer).
+
+### `Certificate#subjectKey`
+
+The public key of the subject of the certificate, as a `Key` instance.
+
+### `Certificate#issuerKey`
+
+The public key of the signing issuer of this certificate, as a `Key` instance.
+May be `undefined` if the issuer's key is unknown (e.g. on an X509 certificate).
+
+### `Certificate#serial`
+
+The serial number of the certificate. As this is normally a 64-bit or wider
+integer, it is returned as a Buffer.
+
+### `Certificate#purposes`
+
+Array of Strings indicating the X.509 key usage purposes that this certificate
+is valid for. The possible strings at the moment are:
+
+ * `'signature'` -- key can be used for digital signatures
+ * `'identity'` -- key can be used to attest about the identity of the signer
+ (X.509 calls this `nonRepudiation`)
+ * `'codeSigning'` -- key can be used to sign executable code
+ * `'keyEncryption'` -- key can be used to encrypt other keys
+ * `'encryption'` -- key can be used to encrypt data (only applies for RSA)
+ * `'keyAgreement'` -- key can be used for key exchange protocols such as
+ Diffie-Hellman
+ * `'ca'` -- key can be used to sign other certificates (is a Certificate
+ Authority)
+ * `'crl'` -- key can be used to sign Certificate Revocation Lists (CRLs)
+
+### `Certificate#getExtension(nameOrOid)`
+
+Retrieves information about a certificate extension, if present, or returns
+`undefined` if not. The string argument `nameOrOid` should be either the OID
+(for X509 extensions) or the name (for OpenSSH extensions) of the extension
+to retrieve.
+
+The object returned will have the following properties:
+
+ * `format` -- String, set to either `'x509'` or `'openssh'`
+ * `name` or `oid` -- String, only one set based on value of `format`
+ * `data` -- Buffer, the raw data inside the extension
+
+### `Certificate#getExtensions()`
+
+Returns an Array of all present certificate extensions, in the same manner and
+format as `getExtension()`.
+
+### `Certificate#isExpired([when])`
+
+Tests whether the Certificate is currently expired (i.e. the `validFrom` and
+`validUntil` dates specify a range of time that does not include the current
+time).
+
+Parameters
+
+ - `when` -- optional Date, if specified, tests whether the Certificate was or
+ will be expired at the specified time instead of now
+
+Returns a Boolean.
+
+### `Certificate#isSignedByKey(key)`
+
+Tests whether the Certificate was validly signed by the given (public) Key.
+
+Parameters
+
+ - `key` -- a Key instance
+
+Returns a Boolean.
+
+### `Certificate#isSignedBy(certificate)`
+
+Tests whether this Certificate was validly signed by the subject of the given
+certificate. Also tests that the issuer Identity of this Certificate and the
+subject Identity of the other Certificate are equivalent.
+
+Parameters
+
+ - `certificate` -- another Certificate instance
+
+Returns a Boolean.
+
+### `Certificate#fingerprint([hashAlgo])`
+
+Returns the X509-style fingerprint of the entire certificate (as a Fingerprint
+instance). This matches what a web-browser or similar would display as the
+certificate fingerprint and should not be confused with the fingerprint of the
+subject's public key.
+
+Parameters
+
+ - `hashAlgo` -- an optional String, any hash function name
+
+### `Certificate#toBuffer([format])`
+
+Serializes the Certificate to a Buffer and returns it.
+
+Parameters
+
+ - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or
+ `'x509'`. Defaults to `'x509'`.
+
+Returns a Buffer.
+
+### `Certificate#toString([format])`
+
+ - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or
+ `'x509'`. Defaults to `'pem'`.
+
+Returns a String.
+
+## Certificate identities
+
+### `identityForHost(hostname)`
+
+Constructs a host-type Identity for a given hostname.
+
+Parameters
+
+ - `hostname` -- the fully qualified DNS name of the host
+
+Returns an Identity instance.
+
+### `identityForUser(uid)`
+
+Constructs a user-type Identity for a given UID.
+
+Parameters
+
+ - `uid` -- a String, user identifier (login name)
+
+Returns an Identity instance.
+
+### `identityForEmail(email)`
+
+Constructs an email-type Identity for a given email address.
+
+Parameters
+
+ - `email` -- a String, email address
+
+Returns an Identity instance.
+
+### `identityFromDN(dn)`
+
+Parses an LDAP-style DN string (e.g. `'CN=foo, C=US'`) and turns it into an
+Identity instance.
+
+Parameters
+
+ - `dn` -- a String
+
+Returns an Identity instance.
+
+### `identityFromArray(arr)`
+
+Constructs an Identity from an array of DN components (see `Identity#toArray()`
+for the format).
+
+Parameters
+
+ - `arr` -- an Array of Objects, DN components with `name` and `value`
+
+Returns an Identity instance.
+
+
+Supported attributes in DNs:
+
+| Attribute name | OID |
+| -------------- | --- |
+| `cn` | `2.5.4.3` |
+| `o` | `2.5.4.10` |
+| `ou` | `2.5.4.11` |
+| `l` | `2.5.4.7` |
+| `s` | `2.5.4.8` |
+| `c` | `2.5.4.6` |
+| `sn` | `2.5.4.4` |
+| `postalCode` | `2.5.4.17` |
+| `serialNumber` | `2.5.4.5` |
+| `street` | `2.5.4.9` |
+| `x500UniqueIdentifier` | `2.5.4.45` |
+| `role` | `2.5.4.72` |
+| `telephoneNumber` | `2.5.4.20` |
+| `description` | `2.5.4.13` |
+| `dc` | `0.9.2342.19200300.100.1.25` |
+| `uid` | `0.9.2342.19200300.100.1.1` |
+| `mail` | `0.9.2342.19200300.100.1.3` |
+| `title` | `2.5.4.12` |
+| `gn` | `2.5.4.42` |
+| `initials` | `2.5.4.43` |
+| `pseudonym` | `2.5.4.65` |
+
+### `Identity#toString()`
+
+Returns the identity as an LDAP-style DN string.
+e.g. `'CN=foo, O=bar corp, C=us'`
+
+### `Identity#type`
+
+The type of identity. One of `'host'`, `'user'`, `'email'` or `'unknown'`
+
+### `Identity#hostname`
+### `Identity#uid`
+### `Identity#email`
+
+Set when `type` is `'host'`, `'user'`, or `'email'`, respectively. Strings.
+
+### `Identity#cn`
+
+The value of the first `CN=` in the DN, if any. It's probably better to use
+the `#get()` method instead of this property.
+
+### `Identity#get(name[, asArray])`
+
+Returns the value of a named attribute in the Identity DN. If there is no
+attribute of the given name, returns `undefined`. If multiple components
+of the DN contain an attribute of this name, an exception is thrown unless
+the `asArray` argument is given as `true` -- then they will be returned as
+an Array in the same order they appear in the DN.
+
+Parameters
+
+ - `name` -- a String
+ - `asArray` -- an optional Boolean
+
+### `Identity#toArray()`
+
+Returns the Identity as an Array of DN component objects. This looks like:
+
+```js
+[ {
+ "name": "cn",
+ "value": "Joe Bloggs"
+},
+{
+ "name": "o",
+ "value": "Organisation Ltd"
+} ]
+```
+
+Each object has a `name` and a `value` property. The returned objects may be
+safely modified.
+
+Errors
+------
+
+### `InvalidAlgorithmError`
+
+The specified algorithm is not valid, either because it is not supported, or
+because it was not included on a list of allowed algorithms.
+
+Thrown by `Fingerprint.parse`, `Key#fingerprint`.
+
+Properties
+
+- `algorithm` -- the algorithm that could not be validated
+
+### `FingerprintFormatError`
+
+The fingerprint string given could not be parsed as a supported fingerprint
+format, or the specified fingerprint format is invalid.
+
+Thrown by `Fingerprint.parse`, `Fingerprint#toString`.
+
+Properties
+
+- `fingerprint` -- if caused by a fingerprint, the string value given
+- `format` -- if caused by an invalid format specification, the string value given
+
+### `KeyParseError`
+
+The key data given could not be parsed as a valid key.
+
+Properties
+
+- `keyName` -- `filename` that was given to `parseKey`
+- `format` -- the `format` that was trying to parse the key (see `parseKey`)
+- `innerErr` -- the inner Error thrown by the format parser
+
+### `KeyEncryptedError`
+
+The key is encrypted with a symmetric key (ie, it is password protected). The
+parsing operation would succeed if it was given the `passphrase` option.
+
+Properties
+
+- `keyName` -- `filename` that was given to `parseKey`
+- `format` -- the `format` that was trying to parse the key (currently can only
+ be `"pem"`)
+
+### `CertificateParseError`
+
+The certificate data given could not be parsed as a valid certificate.
+
+Properties
+
+- `certName` -- `filename` that was given to `parseCertificate`
+- `format` -- the `format` that was trying to parse the key
+ (see `parseCertificate`)
+- `innerErr` -- the inner Error thrown by the format parser
+
+Friends of sshpk
+----------------
+
+ * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library
+ for speaking the `ssh-agent` protocol from node.js, which uses `sshpk`
diff --git a/node_modules/sshpk/bin/sshpk-conv b/node_modules/sshpk/bin/sshpk-conv
new file mode 100755
index 0000000..e839ede
--- /dev/null
+++ b/node_modules/sshpk/bin/sshpk-conv
@@ -0,0 +1,243 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2018 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+var tty = require('tty');
+var readline = require('readline');
+var getPassword = require('getpass').getPass;
+
+var options = [
+ {
+ names: ['outformat', 't'],
+ type: 'string',
+ help: 'Output format'
+ },
+ {
+ names: ['informat', 'T'],
+ type: 'string',
+ help: 'Input format'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input file name (default stdin)'
+ },
+ {
+ names: ['out', 'o'],
+ type: 'string',
+ help: 'Output file name (default stdout)'
+ },
+ {
+ names: ['private', 'p'],
+ type: 'bool',
+ help: 'Produce a private key as output'
+ },
+ {
+ names: ['derive', 'd'],
+ type: 'string',
+ help: 'Output a new key derived from this one, with given algo'
+ },
+ {
+ names: ['identify', 'i'],
+ type: 'bool',
+ help: 'Print key metadata instead of converting'
+ },
+ {
+ names: ['fingerprint', 'F'],
+ type: 'bool',
+ help: 'Output key fingerprint'
+ },
+ {
+ names: ['hash', 'H'],
+ type: 'string',
+ help: 'Hash function to use for key fingeprint with -F'
+ },
+ {
+ names: ['spki', 's'],
+ type: 'bool',
+ help: 'With -F, generates an SPKI fingerprint instead of SSH'
+ },
+ {
+ names: ['comment', 'c'],
+ type: 'string',
+ help: 'Set key comment, if output format supports'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-conv: error: %s', e.message);
+ process.exit(1);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-conv: converts between SSH key formats\n');
+ console.error(help);
+ console.error('\navailable key formats:');
+ console.error(' - pem, pkcs1 eg id_rsa');
+ console.error(' - ssh eg id_rsa.pub');
+ console.error(' - pkcs8 format you want for openssl');
+ console.error(' - openssh like output of ssh-keygen -o');
+ console.error(' - rfc4253 raw OpenSSH wire format');
+ console.error(' - dnssec dnssec-keygen format');
+ console.error(' - putty PuTTY ppk format');
+ console.error('\navailable fingerprint formats:');
+ console.error(' - hex colon-separated hex for SSH');
+ console.error(' straight hex for SPKI');
+ console.error(' - base64 SHA256:* format from OpenSSH');
+ process.exit(1);
+ }
+
+ /*
+ * Key derivation can only be done on private keys, so use of the -d
+ * option necessarily implies -p.
+ */
+ if (opts.derive)
+ opts.private = true;
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ ifError(e, 'error opening input file');
+ }
+
+ var outFile = process.stdout;
+
+ try {
+ if (opts.out && !opts.identify) {
+ fs.accessSync(path.dirname(opts.out), fs.W_OK);
+ outFile = fs.createWriteStream(opts.out);
+ }
+ } catch (e) {
+ ifError(e, 'error opening output file');
+ }
+
+ var bufs = [];
+ inFile.on('readable', function () {
+ var data;
+ while ((data = inFile.read()))
+ bufs.push(data);
+ });
+ var parseOpts = {};
+ parseOpts.filename = inFileName;
+ inFile.on('end', function processKey() {
+ var buf = Buffer.concat(bufs);
+ var fmt = 'auto';
+ if (opts.informat)
+ fmt = opts.informat;
+ var f = sshpk.parseKey;
+ if (opts.private)
+ f = sshpk.parsePrivateKey;
+ try {
+ var key = f(buf, fmt, parseOpts);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError') {
+ getPassword(function (err, pw) {
+ if (err)
+ ifError(err);
+ parseOpts.passphrase = pw;
+ processKey();
+ });
+ return;
+ }
+ ifError(e);
+ }
+
+ if (opts.derive)
+ key = key.derive(opts.derive);
+
+ if (opts.comment)
+ key.comment = opts.comment;
+
+ if (opts.identify) {
+ var kind = 'public';
+ if (sshpk.PrivateKey.isPrivateKey(key))
+ kind = 'private';
+ console.log('%s: a %d bit %s %s key', inFileName,
+ key.size, key.type.toUpperCase(), kind);
+ if (key.type === 'ecdsa')
+ console.log('ECDSA curve: %s', key.curve);
+ if (key.comment)
+ console.log('Comment: %s', key.comment);
+ console.log('SHA256 fingerprint: ' +
+ key.fingerprint('sha256').toString());
+ console.log('MD5 fingerprint: ' +
+ key.fingerprint('md5').toString());
+ console.log('SPKI-SHA256 fingerprint: ' +
+ key.fingerprint('sha256', 'spki').toString());
+ process.exit(0);
+ return;
+ }
+
+ if (opts.fingerprint) {
+ var hash = opts.hash;
+ var type = opts.spki ? 'spki' : 'ssh';
+ var format = opts.outformat;
+ var fp = key.fingerprint(hash, type).toString(format);
+ outFile.write(fp);
+ outFile.write('\n');
+ outFile.once('drain', function () {
+ process.exit(0);
+ });
+ return;
+ }
+
+ fmt = undefined;
+ if (opts.outformat)
+ fmt = opts.outformat;
+ outFile.write(key.toBuffer(fmt));
+ if (fmt === 'ssh' ||
+ (!opts.private && fmt === undefined))
+ outFile.write('\n');
+ outFile.once('drain', function () {
+ process.exit(0);
+ });
+ });
+}
+
+function ifError(e, txt) {
+ if (txt)
+ txt = txt + ': ';
+ else
+ txt = '';
+ console.error('sshpk-conv: ' + txt + e.name + ': ' + e.message);
+ if (process.env['DEBUG'] || process.env['V']) {
+ console.error(e.stack);
+ if (e.innerErr)
+ console.error(e.innerErr.stack);
+ }
+ process.exit(1);
+}
diff --git a/node_modules/sshpk/bin/sshpk-sign b/node_modules/sshpk/bin/sshpk-sign
new file mode 100755
index 0000000..673fc98
--- /dev/null
+++ b/node_modules/sshpk/bin/sshpk-sign
@@ -0,0 +1,191 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+var getPassword = require('getpass').getPass;
+
+var options = [
+ {
+ names: ['hash', 'H'],
+ type: 'string',
+ help: 'Hash algorithm (sha1, sha256, sha384, sha512)'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'bool',
+ help: 'Display verbose info about key and hash used'
+ },
+ {
+ names: ['identity', 'i'],
+ type: 'string',
+ help: 'Path to key to use'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input filename'
+ },
+ {
+ names: ['out', 'o'],
+ type: 'string',
+ help: 'Output filename'
+ },
+ {
+ names: ['format', 't'],
+ type: 'string',
+ help: 'Signature format (asn1, ssh, raw)'
+ },
+ {
+ names: ['binary', 'b'],
+ type: 'bool',
+ help: 'Output raw binary instead of base64'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+var parseOpts = {};
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-sign: error: %s', e.message);
+ process.exit(1);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-sign: sign data using an SSH key\n');
+ console.error(help);
+ process.exit(1);
+ }
+
+ if (!opts.identity) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-sign: the -i or --identity option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(1);
+ }
+
+ var keyData = fs.readFileSync(opts.identity);
+ parseOpts.filename = opts.identity;
+
+ run();
+}
+
+function run() {
+ var key;
+ try {
+ key = sshpk.parsePrivateKey(keyData, 'auto', parseOpts);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError') {
+ getPassword(function (err, pw) {
+ parseOpts.passphrase = pw;
+ run();
+ });
+ return;
+ }
+ console.error('sshpk-sign: error loading private key "' +
+ opts.identity + '": ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var hash = opts.hash || key.defaultHashAlgorithm();
+
+ var signer;
+ try {
+ signer = key.createSign(hash);
+ } catch (e) {
+ console.error('sshpk-sign: error creating signer: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ if (opts.verbose) {
+ console.error('sshpk-sign: using %s-%s with a %d bit key',
+ key.type, hash, key.size);
+ }
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ console.error('sshpk-sign: error opening input file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var outFile = process.stdout;
+
+ try {
+ if (opts.out && !opts.identify) {
+ fs.accessSync(path.dirname(opts.out), fs.W_OK);
+ outFile = fs.createWriteStream(opts.out);
+ }
+ } catch (e) {
+ console.error('sshpk-sign: error opening output file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ inFile.pipe(signer);
+ inFile.on('end', function () {
+ var sig;
+ try {
+ sig = signer.sign();
+ } catch (e) {
+ console.error('sshpk-sign: error signing data: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ var fmt = opts.format || 'asn1';
+ var output;
+ try {
+ output = sig.toBuffer(fmt);
+ if (!opts.binary)
+ output = output.toString('base64');
+ } catch (e) {
+ console.error('sshpk-sign: error converting signature' +
+ ' to ' + fmt + ' format: ' + e.name + ': ' +
+ e.message);
+ process.exit(1);
+ }
+
+ outFile.write(output);
+ if (!opts.binary)
+ outFile.write('\n');
+ outFile.once('drain', function () {
+ process.exit(0);
+ });
+ });
+}
diff --git a/node_modules/sshpk/bin/sshpk-verify b/node_modules/sshpk/bin/sshpk-verify
new file mode 100755
index 0000000..fc71a82
--- /dev/null
+++ b/node_modules/sshpk/bin/sshpk-verify
@@ -0,0 +1,167 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+// vim: set filetype=javascript :
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+var dashdash = require('dashdash');
+var sshpk = require('../lib/index');
+var fs = require('fs');
+var path = require('path');
+var Buffer = require('safer-buffer').Buffer;
+
+var options = [
+ {
+ names: ['hash', 'H'],
+ type: 'string',
+ help: 'Hash algorithm (sha1, sha256, sha384, sha512)'
+ },
+ {
+ names: ['verbose', 'v'],
+ type: 'bool',
+ help: 'Display verbose info about key and hash used'
+ },
+ {
+ names: ['identity', 'i'],
+ type: 'string',
+ help: 'Path to (public) key to use'
+ },
+ {
+ names: ['file', 'f'],
+ type: 'string',
+ help: 'Input filename'
+ },
+ {
+ names: ['format', 't'],
+ type: 'string',
+ help: 'Signature format (asn1, ssh, raw)'
+ },
+ {
+ names: ['signature', 's'],
+ type: 'string',
+ help: 'base64-encoded signature data'
+ },
+ {
+ names: ['help', 'h'],
+ type: 'bool',
+ help: 'Shows this help text'
+ }
+];
+
+if (require.main === module) {
+ var parser = dashdash.createParser({
+ options: options
+ });
+
+ try {
+ var opts = parser.parse(process.argv);
+ } catch (e) {
+ console.error('sshpk-verify: error: %s', e.message);
+ process.exit(3);
+ }
+
+ if (opts.help || opts._args.length > 1) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: sign data using an SSH key\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ if (!opts.identity) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: the -i or --identity option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ if (!opts.signature) {
+ var help = parser.help({}).trimRight();
+ console.error('sshpk-verify: the -s or --signature option ' +
+ 'is required\n');
+ console.error(help);
+ process.exit(3);
+ }
+
+ var keyData = fs.readFileSync(opts.identity);
+
+ var key;
+ try {
+ key = sshpk.parseKey(keyData);
+ } catch (e) {
+ console.error('sshpk-verify: error loading key "' +
+ opts.identity + '": ' + e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ var fmt = opts.format || 'asn1';
+ var sigData = Buffer.from(opts.signature, 'base64');
+
+ var sig;
+ try {
+ sig = sshpk.parseSignature(sigData, key.type, fmt);
+ } catch (e) {
+ console.error('sshpk-verify: error parsing signature: ' +
+ e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ var hash = opts.hash || key.defaultHashAlgorithm();
+
+ var verifier;
+ try {
+ verifier = key.createVerify(hash);
+ } catch (e) {
+ console.error('sshpk-verify: error creating verifier: ' +
+ e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ if (opts.verbose) {
+ console.error('sshpk-verify: using %s-%s with a %d bit key',
+ key.type, hash, key.size);
+ }
+
+ var inFile = process.stdin;
+ var inFileName = 'stdin';
+
+ var inFilePath;
+ if (opts.file) {
+ inFilePath = opts.file;
+ } else if (opts._args.length === 1) {
+ inFilePath = opts._args[0];
+ }
+
+ if (inFilePath)
+ inFileName = path.basename(inFilePath);
+
+ try {
+ if (inFilePath) {
+ fs.accessSync(inFilePath, fs.R_OK);
+ inFile = fs.createReadStream(inFilePath);
+ }
+ } catch (e) {
+ console.error('sshpk-verify: error opening input file' +
+ ': ' + e.name + ': ' + e.message);
+ process.exit(2);
+ }
+
+ inFile.pipe(verifier);
+ inFile.on('end', function () {
+ var ret;
+ try {
+ ret = verifier.verify(sig);
+ } catch (e) {
+ console.error('sshpk-verify: error verifying data: ' +
+ e.name + ': ' + e.message);
+ process.exit(1);
+ }
+
+ if (ret) {
+ console.error('OK');
+ process.exit(0);
+ }
+
+ console.error('NOT OK');
+ process.exit(1);
+ });
+}
diff --git a/node_modules/sshpk/lib/algs.js b/node_modules/sshpk/lib/algs.js
new file mode 100644
index 0000000..3b01e7d
--- /dev/null
+++ b/node_modules/sshpk/lib/algs.js
@@ -0,0 +1,168 @@
+// Copyright 2015 Joyent, Inc.
+
+var Buffer = require('safer-buffer').Buffer;
+
+var algInfo = {
+ 'dsa': {
+ parts: ['p', 'q', 'g', 'y'],
+ sizePart: 'p'
+ },
+ 'rsa': {
+ parts: ['e', 'n'],
+ sizePart: 'n'
+ },
+ 'ecdsa': {
+ parts: ['curve', 'Q'],
+ sizePart: 'Q'
+ },
+ 'ed25519': {
+ parts: ['A'],
+ sizePart: 'A'
+ }
+};
+algInfo['curve25519'] = algInfo['ed25519'];
+
+var algPrivInfo = {
+ 'dsa': {
+ parts: ['p', 'q', 'g', 'y', 'x']
+ },
+ 'rsa': {
+ parts: ['n', 'e', 'd', 'iqmp', 'p', 'q']
+ },
+ 'ecdsa': {
+ parts: ['curve', 'Q', 'd']
+ },
+ 'ed25519': {
+ parts: ['A', 'k']
+ }
+};
+algPrivInfo['curve25519'] = algPrivInfo['ed25519'];
+
+var hashAlgs = {
+ 'md5': true,
+ 'sha1': true,
+ 'sha256': true,
+ 'sha384': true,
+ 'sha512': true
+};
+
+/*
+ * Taken from
+ * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf
+ */
+var curves = {
+ 'nistp256': {
+ size: 256,
+ pkcs8oid: '1.2.840.10045.3.1.7',
+ p: Buffer.from(('00' +
+ 'ffffffff 00000001 00000000 00000000' +
+ '00000000 ffffffff ffffffff ffffffff').
+ replace(/ /g, ''), 'hex'),
+ a: Buffer.from(('00' +
+ 'FFFFFFFF 00000001 00000000 00000000' +
+ '00000000 FFFFFFFF FFFFFFFF FFFFFFFC').
+ replace(/ /g, ''), 'hex'),
+ b: Buffer.from((
+ '5ac635d8 aa3a93e7 b3ebbd55 769886bc' +
+ '651d06b0 cc53b0f6 3bce3c3e 27d2604b').
+ replace(/ /g, ''), 'hex'),
+ s: Buffer.from(('00' +
+ 'c49d3608 86e70493 6a6678e1 139d26b7' +
+ '819f7e90').
+ replace(/ /g, ''), 'hex'),
+ n: Buffer.from(('00' +
+ 'ffffffff 00000000 ffffffff ffffffff' +
+ 'bce6faad a7179e84 f3b9cac2 fc632551').
+ replace(/ /g, ''), 'hex'),
+ G: Buffer.from(('04' +
+ '6b17d1f2 e12c4247 f8bce6e5 63a440f2' +
+ '77037d81 2deb33a0 f4a13945 d898c296' +
+ '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' +
+ '2bce3357 6b315ece cbb64068 37bf51f5').
+ replace(/ /g, ''), 'hex')
+ },
+ 'nistp384': {
+ size: 384,
+ pkcs8oid: '1.3.132.0.34',
+ p: Buffer.from(('00' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff fffffffe' +
+ 'ffffffff 00000000 00000000 ffffffff').
+ replace(/ /g, ''), 'hex'),
+ a: Buffer.from(('00' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' +
+ 'FFFFFFFF 00000000 00000000 FFFFFFFC').
+ replace(/ /g, ''), 'hex'),
+ b: Buffer.from((
+ 'b3312fa7 e23ee7e4 988e056b e3f82d19' +
+ '181d9c6e fe814112 0314088f 5013875a' +
+ 'c656398d 8a2ed19d 2a85c8ed d3ec2aef').
+ replace(/ /g, ''), 'hex'),
+ s: Buffer.from(('00' +
+ 'a335926a a319a27a 1d00896a 6773a482' +
+ '7acdac73').
+ replace(/ /g, ''), 'hex'),
+ n: Buffer.from(('00' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff c7634d81 f4372ddf' +
+ '581a0db2 48b0a77a ecec196a ccc52973').
+ replace(/ /g, ''), 'hex'),
+ G: Buffer.from(('04' +
+ 'aa87ca22 be8b0537 8eb1c71e f320ad74' +
+ '6e1d3b62 8ba79b98 59f741e0 82542a38' +
+ '5502f25d bf55296c 3a545e38 72760ab7' +
+ '3617de4a 96262c6f 5d9e98bf 9292dc29' +
+ 'f8f41dbd 289a147c e9da3113 b5f0b8c0' +
+ '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f').
+ replace(/ /g, ''), 'hex')
+ },
+ 'nistp521': {
+ size: 521,
+ pkcs8oid: '1.3.132.0.35',
+ p: Buffer.from((
+ '01ffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffff').replace(/ /g, ''), 'hex'),
+ a: Buffer.from(('01FF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
+ 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC').
+ replace(/ /g, ''), 'hex'),
+ b: Buffer.from(('51' +
+ '953eb961 8e1c9a1f 929a21a0 b68540ee' +
+ 'a2da725b 99b315f3 b8b48991 8ef109e1' +
+ '56193951 ec7e937b 1652c0bd 3bb1bf07' +
+ '3573df88 3d2c34f1 ef451fd4 6b503f00').
+ replace(/ /g, ''), 'hex'),
+ s: Buffer.from(('00' +
+ 'd09e8800 291cb853 96cc6717 393284aa' +
+ 'a0da64ba').replace(/ /g, ''), 'hex'),
+ n: Buffer.from(('01ff' +
+ 'ffffffff ffffffff ffffffff ffffffff' +
+ 'ffffffff ffffffff ffffffff fffffffa' +
+ '51868783 bf2f966b 7fcc0148 f709a5d0' +
+ '3bb5c9b8 899c47ae bb6fb71e 91386409').
+ replace(/ /g, ''), 'hex'),
+ G: Buffer.from(('04' +
+ '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' +
+ '9c648139 053fb521 f828af60 6b4d3dba' +
+ 'a14b5e77 efe75928 fe1dc127 a2ffa8de' +
+ '3348b3c1 856a429b f97e7e31 c2e5bd66' +
+ '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' +
+ '98f54449 579b4468 17afbd17 273e662c' +
+ '97ee7299 5ef42640 c550b901 3fad0761' +
+ '353c7086 a272c240 88be9476 9fd16650').
+ replace(/ /g, ''), 'hex')
+ }
+};
+
+module.exports = {
+ info: algInfo,
+ privInfo: algPrivInfo,
+ hashAlgs: hashAlgs,
+ curves: curves
+};
diff --git a/node_modules/sshpk/lib/certificate.js b/node_modules/sshpk/lib/certificate.js
new file mode 100644
index 0000000..6932357
--- /dev/null
+++ b/node_modules/sshpk/lib/certificate.js
@@ -0,0 +1,410 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = Certificate;
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var errs = require('./errors');
+var util = require('util');
+var utils = require('./utils');
+var Key = require('./key');
+var PrivateKey = require('./private-key');
+var Identity = require('./identity');
+
+var formats = {};
+formats['openssh'] = require('./formats/openssh-cert');
+formats['x509'] = require('./formats/x509');
+formats['pem'] = require('./formats/x509-pem');
+
+var CertificateParseError = errs.CertificateParseError;
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+
+function Certificate(opts) {
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.subjects, 'options.subjects');
+ utils.assertCompatible(opts.subjects[0], Identity, [1, 0],
+ 'options.subjects');
+ utils.assertCompatible(opts.subjectKey, Key, [1, 0],
+ 'options.subjectKey');
+ utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer');
+ if (opts.issuerKey !== undefined) {
+ utils.assertCompatible(opts.issuerKey, Key, [1, 0],
+ 'options.issuerKey');
+ }
+ assert.object(opts.signatures, 'options.signatures');
+ assert.buffer(opts.serial, 'options.serial');
+ assert.date(opts.validFrom, 'options.validFrom');
+ assert.date(opts.validUntil, 'optons.validUntil');
+
+ assert.optionalArrayOfString(opts.purposes, 'options.purposes');
+
+ this._hashCache = {};
+
+ this.subjects = opts.subjects;
+ this.issuer = opts.issuer;
+ this.subjectKey = opts.subjectKey;
+ this.issuerKey = opts.issuerKey;
+ this.signatures = opts.signatures;
+ this.serial = opts.serial;
+ this.validFrom = opts.validFrom;
+ this.validUntil = opts.validUntil;
+ this.purposes = opts.purposes;
+}
+
+Certificate.formats = formats;
+
+Certificate.prototype.toBuffer = function (format, options) {
+ if (format === undefined)
+ format = 'x509';
+ assert.string(format, 'format');
+ assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
+
+ return (formats[format].write(this, options));
+};
+
+Certificate.prototype.toString = function (format, options) {
+ if (format === undefined)
+ format = 'pem';
+ return (this.toBuffer(format, options).toString());
+};
+
+Certificate.prototype.fingerprint = function (algo) {
+ if (algo === undefined)
+ algo = 'sha256';
+ assert.string(algo, 'algorithm');
+ var opts = {
+ type: 'certificate',
+ hash: this.hash(algo),
+ algorithm: algo
+ };
+ return (new Fingerprint(opts));
+};
+
+Certificate.prototype.hash = function (algo) {
+ assert.string(algo, 'algorithm');
+ algo = algo.toLowerCase();
+ if (algs.hashAlgs[algo] === undefined)
+ throw (new InvalidAlgorithmError(algo));
+
+ if (this._hashCache[algo])
+ return (this._hashCache[algo]);
+
+ var hash = crypto.createHash(algo).
+ update(this.toBuffer('x509')).digest();
+ this._hashCache[algo] = hash;
+ return (hash);
+};
+
+Certificate.prototype.isExpired = function (when) {
+ if (when === undefined)
+ when = new Date();
+ return (!((when.getTime() >= this.validFrom.getTime()) &&
+ (when.getTime() < this.validUntil.getTime())));
+};
+
+Certificate.prototype.isSignedBy = function (issuerCert) {
+ utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer');
+
+ if (!this.issuer.equals(issuerCert.subjects[0]))
+ return (false);
+ if (this.issuer.purposes && this.issuer.purposes.length > 0 &&
+ this.issuer.purposes.indexOf('ca') === -1) {
+ return (false);
+ }
+
+ return (this.isSignedByKey(issuerCert.subjectKey));
+};
+
+Certificate.prototype.getExtension = function (keyOrOid) {
+ assert.string(keyOrOid, 'keyOrOid');
+ var ext = this.getExtensions().filter(function (maybeExt) {
+ if (maybeExt.format === 'x509')
+ return (maybeExt.oid === keyOrOid);
+ if (maybeExt.format === 'openssh')
+ return (maybeExt.name === keyOrOid);
+ return (false);
+ })[0];
+ return (ext);
+};
+
+Certificate.prototype.getExtensions = function () {
+ var exts = [];
+ var x509 = this.signatures.x509;
+ if (x509 && x509.extras && x509.extras.exts) {
+ x509.extras.exts.forEach(function (ext) {
+ ext.format = 'x509';
+ exts.push(ext);
+ });
+ }
+ var openssh = this.signatures.openssh;
+ if (openssh && openssh.exts) {
+ openssh.exts.forEach(function (ext) {
+ ext.format = 'openssh';
+ exts.push(ext);
+ });
+ }
+ return (exts);
+};
+
+Certificate.prototype.isSignedByKey = function (issuerKey) {
+ utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey');
+
+ if (this.issuerKey !== undefined) {
+ return (this.issuerKey.
+ fingerprint('sha512').matches(issuerKey));
+ }
+
+ var fmt = Object.keys(this.signatures)[0];
+ var valid = formats[fmt].verify(this, issuerKey);
+ if (valid)
+ this.issuerKey = issuerKey;
+ return (valid);
+};
+
+Certificate.prototype.signWith = function (key) {
+ utils.assertCompatible(key, PrivateKey, [1, 2], 'key');
+ var fmts = Object.keys(formats);
+ var didOne = false;
+ for (var i = 0; i < fmts.length; ++i) {
+ if (fmts[i] !== 'pem') {
+ var ret = formats[fmts[i]].sign(this, key);
+ if (ret === true)
+ didOne = true;
+ }
+ }
+ if (!didOne) {
+ throw (new Error('Failed to sign the certificate for any ' +
+ 'available certificate formats'));
+ }
+};
+
+Certificate.createSelfSigned = function (subjectOrSubjects, key, options) {
+ var subjects;
+ if (Array.isArray(subjectOrSubjects))
+ subjects = subjectOrSubjects;
+ else
+ subjects = [subjectOrSubjects];
+
+ assert.arrayOfObject(subjects);
+ subjects.forEach(function (subject) {
+ utils.assertCompatible(subject, Identity, [1, 0], 'subject');
+ });
+
+ utils.assertCompatible(key, PrivateKey, [1, 2], 'private key');
+
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalObject(options.validFrom, 'options.validFrom');
+ assert.optionalObject(options.validUntil, 'options.validUntil');
+ var validFrom = options.validFrom;
+ var validUntil = options.validUntil;
+ if (validFrom === undefined)
+ validFrom = new Date();
+ if (validUntil === undefined) {
+ assert.optionalNumber(options.lifetime, 'options.lifetime');
+ var lifetime = options.lifetime;
+ if (lifetime === undefined)
+ lifetime = 10*365*24*3600;
+ validUntil = new Date();
+ validUntil.setTime(validUntil.getTime() + lifetime*1000);
+ }
+ assert.optionalBuffer(options.serial, 'options.serial');
+ var serial = options.serial;
+ if (serial === undefined)
+ serial = Buffer.from('0000000000000001', 'hex');
+
+ var purposes = options.purposes;
+ if (purposes === undefined)
+ purposes = [];
+
+ if (purposes.indexOf('signature') === -1)
+ purposes.push('signature');
+
+ /* Self-signed certs are always CAs. */
+ if (purposes.indexOf('ca') === -1)
+ purposes.push('ca');
+ if (purposes.indexOf('crl') === -1)
+ purposes.push('crl');
+
+ /*
+ * If we weren't explicitly given any other purposes, do the sensible
+ * thing and add some basic ones depending on the subject type.
+ */
+ if (purposes.length <= 3) {
+ var hostSubjects = subjects.filter(function (subject) {
+ return (subject.type === 'host');
+ });
+ var userSubjects = subjects.filter(function (subject) {
+ return (subject.type === 'user');
+ });
+ if (hostSubjects.length > 0) {
+ if (purposes.indexOf('serverAuth') === -1)
+ purposes.push('serverAuth');
+ }
+ if (userSubjects.length > 0) {
+ if (purposes.indexOf('clientAuth') === -1)
+ purposes.push('clientAuth');
+ }
+ if (userSubjects.length > 0 || hostSubjects.length > 0) {
+ if (purposes.indexOf('keyAgreement') === -1)
+ purposes.push('keyAgreement');
+ if (key.type === 'rsa' &&
+ purposes.indexOf('encryption') === -1)
+ purposes.push('encryption');
+ }
+ }
+
+ var cert = new Certificate({
+ subjects: subjects,
+ issuer: subjects[0],
+ subjectKey: key.toPublic(),
+ issuerKey: key.toPublic(),
+ signatures: {},
+ serial: serial,
+ validFrom: validFrom,
+ validUntil: validUntil,
+ purposes: purposes
+ });
+ cert.signWith(key);
+
+ return (cert);
+};
+
+Certificate.create =
+ function (subjectOrSubjects, key, issuer, issuerKey, options) {
+ var subjects;
+ if (Array.isArray(subjectOrSubjects))
+ subjects = subjectOrSubjects;
+ else
+ subjects = [subjectOrSubjects];
+
+ assert.arrayOfObject(subjects);
+ subjects.forEach(function (subject) {
+ utils.assertCompatible(subject, Identity, [1, 0], 'subject');
+ });
+
+ utils.assertCompatible(key, Key, [1, 0], 'key');
+ if (PrivateKey.isPrivateKey(key))
+ key = key.toPublic();
+ utils.assertCompatible(issuer, Identity, [1, 0], 'issuer');
+ utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key');
+
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalObject(options.validFrom, 'options.validFrom');
+ assert.optionalObject(options.validUntil, 'options.validUntil');
+ var validFrom = options.validFrom;
+ var validUntil = options.validUntil;
+ if (validFrom === undefined)
+ validFrom = new Date();
+ if (validUntil === undefined) {
+ assert.optionalNumber(options.lifetime, 'options.lifetime');
+ var lifetime = options.lifetime;
+ if (lifetime === undefined)
+ lifetime = 10*365*24*3600;
+ validUntil = new Date();
+ validUntil.setTime(validUntil.getTime() + lifetime*1000);
+ }
+ assert.optionalBuffer(options.serial, 'options.serial');
+ var serial = options.serial;
+ if (serial === undefined)
+ serial = Buffer.from('0000000000000001', 'hex');
+
+ var purposes = options.purposes;
+ if (purposes === undefined)
+ purposes = [];
+
+ if (purposes.indexOf('signature') === -1)
+ purposes.push('signature');
+
+ if (options.ca === true) {
+ if (purposes.indexOf('ca') === -1)
+ purposes.push('ca');
+ if (purposes.indexOf('crl') === -1)
+ purposes.push('crl');
+ }
+
+ var hostSubjects = subjects.filter(function (subject) {
+ return (subject.type === 'host');
+ });
+ var userSubjects = subjects.filter(function (subject) {
+ return (subject.type === 'user');
+ });
+ if (hostSubjects.length > 0) {
+ if (purposes.indexOf('serverAuth') === -1)
+ purposes.push('serverAuth');
+ }
+ if (userSubjects.length > 0) {
+ if (purposes.indexOf('clientAuth') === -1)
+ purposes.push('clientAuth');
+ }
+ if (userSubjects.length > 0 || hostSubjects.length > 0) {
+ if (purposes.indexOf('keyAgreement') === -1)
+ purposes.push('keyAgreement');
+ if (key.type === 'rsa' &&
+ purposes.indexOf('encryption') === -1)
+ purposes.push('encryption');
+ }
+
+ var cert = new Certificate({
+ subjects: subjects,
+ issuer: issuer,
+ subjectKey: key,
+ issuerKey: issuerKey.toPublic(),
+ signatures: {},
+ serial: serial,
+ validFrom: validFrom,
+ validUntil: validUntil,
+ purposes: purposes
+ });
+ cert.signWith(issuerKey);
+
+ return (cert);
+};
+
+Certificate.parse = function (data, format, options) {
+ if (typeof (data) !== 'string')
+ assert.buffer(data, 'data');
+ if (format === undefined)
+ format = 'auto';
+ assert.string(format, 'format');
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
+
+ assert.object(formats[format], 'formats[format]');
+
+ try {
+ var k = formats[format].read(data, options);
+ return (k);
+ } catch (e) {
+ throw (new CertificateParseError(options.filename, format, e));
+ }
+};
+
+Certificate.isCertificate = function (obj, ver) {
+ return (utils.isCompatible(obj, Certificate, ver));
+};
+
+/*
+ * API versions for Certificate:
+ * [1,0] -- initial ver
+ * [1,1] -- openssh format now unpacks extensions
+ */
+Certificate.prototype._sshpkApiVersion = [1, 1];
+
+Certificate._oldVersionDetect = function (obj) {
+ return ([1, 0]);
+};
diff --git a/node_modules/sshpk/lib/dhe.js b/node_modules/sshpk/lib/dhe.js
new file mode 100644
index 0000000..a3c8032
--- /dev/null
+++ b/node_modules/sshpk/lib/dhe.js
@@ -0,0 +1,397 @@
+// Copyright 2017 Joyent, Inc.
+
+module.exports = {
+ DiffieHellman: DiffieHellman,
+ generateECDSA: generateECDSA,
+ generateED25519: generateED25519
+};
+
+var assert = require('assert-plus');
+var crypto = require('crypto');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('./algs');
+var utils = require('./utils');
+var nacl = require('tweetnacl');
+
+var Key = require('./key');
+var PrivateKey = require('./private-key');
+
+var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined);
+
+var ecdh = require('ecc-jsbn');
+var ec = require('ecc-jsbn/lib/ec');
+var jsbn = require('jsbn').BigInteger;
+
+function DiffieHellman(key) {
+ utils.assertCompatible(key, Key, [1, 4], 'key');
+ this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]);
+ this._algo = key.type;
+ this._curve = key.curve;
+ this._key = key;
+ if (key.type === 'dsa') {
+ if (!CRYPTO_HAVE_ECDH) {
+ throw (new Error('Due to bugs in the node 0.10 ' +
+ 'crypto API, node 0.12.x or later is required ' +
+ 'to use DH'));
+ }
+ this._dh = crypto.createDiffieHellman(
+ key.part.p.data, undefined,
+ key.part.g.data, undefined);
+ this._p = key.part.p;
+ this._g = key.part.g;
+ if (this._isPriv)
+ this._dh.setPrivateKey(key.part.x.data);
+ this._dh.setPublicKey(key.part.y.data);
+
+ } else if (key.type === 'ecdsa') {
+ if (!CRYPTO_HAVE_ECDH) {
+ this._ecParams = new X9ECParameters(this._curve);
+
+ if (this._isPriv) {
+ this._priv = new ECPrivate(
+ this._ecParams, key.part.d.data);
+ }
+ return;
+ }
+
+ var curve = {
+ 'nistp256': 'prime256v1',
+ 'nistp384': 'secp384r1',
+ 'nistp521': 'secp521r1'
+ }[key.curve];
+ this._dh = crypto.createECDH(curve);
+ if (typeof (this._dh) !== 'object' ||
+ typeof (this._dh.setPrivateKey) !== 'function') {
+ CRYPTO_HAVE_ECDH = false;
+ DiffieHellman.call(this, key);
+ return;
+ }
+ if (this._isPriv)
+ this._dh.setPrivateKey(key.part.d.data);
+ this._dh.setPublicKey(key.part.Q.data);
+
+ } else if (key.type === 'curve25519') {
+ if (this._isPriv) {
+ utils.assertCompatible(key, PrivateKey, [1, 5], 'key');
+ this._priv = key.part.k.data;
+ }
+
+ } else {
+ throw (new Error('DH not supported for ' + key.type + ' keys'));
+ }
+}
+
+DiffieHellman.prototype.getPublicKey = function () {
+ if (this._isPriv)
+ return (this._key.toPublic());
+ return (this._key);
+};
+
+DiffieHellman.prototype.getPrivateKey = function () {
+ if (this._isPriv)
+ return (this._key);
+ else
+ return (undefined);
+};
+DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey;
+
+DiffieHellman.prototype._keyCheck = function (pk, isPub) {
+ assert.object(pk, 'key');
+ if (!isPub)
+ utils.assertCompatible(pk, PrivateKey, [1, 3], 'key');
+ utils.assertCompatible(pk, Key, [1, 4], 'key');
+
+ if (pk.type !== this._algo) {
+ throw (new Error('A ' + pk.type + ' key cannot be used in ' +
+ this._algo + ' Diffie-Hellman'));
+ }
+
+ if (pk.curve !== this._curve) {
+ throw (new Error('A key from the ' + pk.curve + ' curve ' +
+ 'cannot be used with a ' + this._curve +
+ ' Diffie-Hellman'));
+ }
+
+ if (pk.type === 'dsa') {
+ assert.deepEqual(pk.part.p, this._p,
+ 'DSA key prime does not match');
+ assert.deepEqual(pk.part.g, this._g,
+ 'DSA key generator does not match');
+ }
+};
+
+DiffieHellman.prototype.setKey = function (pk) {
+ this._keyCheck(pk);
+
+ if (pk.type === 'dsa') {
+ this._dh.setPrivateKey(pk.part.x.data);
+ this._dh.setPublicKey(pk.part.y.data);
+
+ } else if (pk.type === 'ecdsa') {
+ if (CRYPTO_HAVE_ECDH) {
+ this._dh.setPrivateKey(pk.part.d.data);
+ this._dh.setPublicKey(pk.part.Q.data);
+ } else {
+ this._priv = new ECPrivate(
+ this._ecParams, pk.part.d.data);
+ }
+
+ } else if (pk.type === 'curve25519') {
+ var k = pk.part.k;
+ if (!pk.part.k)
+ k = pk.part.r;
+ this._priv = k.data;
+ if (this._priv[0] === 0x00)
+ this._priv = this._priv.slice(1);
+ this._priv = this._priv.slice(0, 32);
+ }
+ this._key = pk;
+ this._isPriv = true;
+};
+DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey;
+
+DiffieHellman.prototype.computeSecret = function (otherpk) {
+ this._keyCheck(otherpk, true);
+ if (!this._isPriv)
+ throw (new Error('DH exchange has not been initialized with ' +
+ 'a private key yet'));
+
+ var pub;
+ if (this._algo === 'dsa') {
+ return (this._dh.computeSecret(
+ otherpk.part.y.data));
+
+ } else if (this._algo === 'ecdsa') {
+ if (CRYPTO_HAVE_ECDH) {
+ return (this._dh.computeSecret(
+ otherpk.part.Q.data));
+ } else {
+ pub = new ECPublic(
+ this._ecParams, otherpk.part.Q.data);
+ return (this._priv.deriveSharedSecret(pub));
+ }
+
+ } else if (this._algo === 'curve25519') {
+ pub = otherpk.part.A.data;
+ while (pub[0] === 0x00 && pub.length > 32)
+ pub = pub.slice(1);
+ var priv = this._priv;
+ assert.strictEqual(pub.length, 32);
+ assert.strictEqual(priv.length, 32);
+
+ var secret = nacl.box.before(new Uint8Array(pub),
+ new Uint8Array(priv));
+
+ return (Buffer.from(secret));
+ }
+
+ throw (new Error('Invalid algorithm: ' + this._algo));
+};
+
+DiffieHellman.prototype.generateKey = function () {
+ var parts = [];
+ var priv, pub;
+ if (this._algo === 'dsa') {
+ this._dh.generateKeys();
+
+ parts.push({name: 'p', data: this._p.data});
+ parts.push({name: 'q', data: this._key.part.q.data});
+ parts.push({name: 'g', data: this._g.data});
+ parts.push({name: 'y', data: this._dh.getPublicKey()});
+ parts.push({name: 'x', data: this._dh.getPrivateKey()});
+ this._key = new PrivateKey({
+ type: 'dsa',
+ parts: parts
+ });
+ this._isPriv = true;
+ return (this._key);
+
+ } else if (this._algo === 'ecdsa') {
+ if (CRYPTO_HAVE_ECDH) {
+ this._dh.generateKeys();
+
+ parts.push({name: 'curve',
+ data: Buffer.from(this._curve)});
+ parts.push({name: 'Q', data: this._dh.getPublicKey()});
+ parts.push({name: 'd', data: this._dh.getPrivateKey()});
+ this._key = new PrivateKey({
+ type: 'ecdsa',
+ curve: this._curve,
+ parts: parts
+ });
+ this._isPriv = true;
+ return (this._key);
+
+ } else {
+ var n = this._ecParams.getN();
+ var r = new jsbn(crypto.randomBytes(n.bitLength()));
+ var n1 = n.subtract(jsbn.ONE);
+ priv = r.mod(n1).add(jsbn.ONE);
+ pub = this._ecParams.getG().multiply(priv);
+
+ priv = Buffer.from(priv.toByteArray());
+ pub = Buffer.from(this._ecParams.getCurve().
+ encodePointHex(pub), 'hex');
+
+ this._priv = new ECPrivate(this._ecParams, priv);
+
+ parts.push({name: 'curve',
+ data: Buffer.from(this._curve)});
+ parts.push({name: 'Q', data: pub});
+ parts.push({name: 'd', data: priv});
+
+ this._key = new PrivateKey({
+ type: 'ecdsa',
+ curve: this._curve,
+ parts: parts
+ });
+ this._isPriv = true;
+ return (this._key);
+ }
+
+ } else if (this._algo === 'curve25519') {
+ var pair = nacl.box.keyPair();
+ priv = Buffer.from(pair.secretKey);
+ pub = Buffer.from(pair.publicKey);
+ priv = Buffer.concat([priv, pub]);
+ assert.strictEqual(priv.length, 64);
+ assert.strictEqual(pub.length, 32);
+
+ parts.push({name: 'A', data: pub});
+ parts.push({name: 'k', data: priv});
+ this._key = new PrivateKey({
+ type: 'curve25519',
+ parts: parts
+ });
+ this._isPriv = true;
+ return (this._key);
+ }
+
+ throw (new Error('Invalid algorithm: ' + this._algo));
+};
+DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey;
+
+/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */
+
+function X9ECParameters(name) {
+ var params = algs.curves[name];
+ assert.object(params);
+
+ var p = new jsbn(params.p);
+ var a = new jsbn(params.a);
+ var b = new jsbn(params.b);
+ var n = new jsbn(params.n);
+ var h = jsbn.ONE;
+ var curve = new ec.ECCurveFp(p, a, b);
+ var G = curve.decodePointHex(params.G.toString('hex'));
+
+ this.curve = curve;
+ this.g = G;
+ this.n = n;
+ this.h = h;
+}
+X9ECParameters.prototype.getCurve = function () { return (this.curve); };
+X9ECParameters.prototype.getG = function () { return (this.g); };
+X9ECParameters.prototype.getN = function () { return (this.n); };
+X9ECParameters.prototype.getH = function () { return (this.h); };
+
+function ECPublic(params, buffer) {
+ this._params = params;
+ if (buffer[0] === 0x00)
+ buffer = buffer.slice(1);
+ this._pub = params.getCurve().decodePointHex(buffer.toString('hex'));
+}
+
+function ECPrivate(params, buffer) {
+ this._params = params;
+ this._priv = new jsbn(utils.mpNormalize(buffer));
+}
+ECPrivate.prototype.deriveSharedSecret = function (pubKey) {
+ assert.ok(pubKey instanceof ECPublic);
+ var S = pubKey._pub.multiply(this._priv);
+ return (Buffer.from(S.getX().toBigInteger().toByteArray()));
+};
+
+function generateED25519() {
+ var pair = nacl.sign.keyPair();
+ var priv = Buffer.from(pair.secretKey);
+ var pub = Buffer.from(pair.publicKey);
+ assert.strictEqual(priv.length, 64);
+ assert.strictEqual(pub.length, 32);
+
+ var parts = [];
+ parts.push({name: 'A', data: pub});
+ parts.push({name: 'k', data: priv.slice(0, 32)});
+ var key = new PrivateKey({
+ type: 'ed25519',
+ parts: parts
+ });
+ return (key);
+}
+
+/* Generates a new ECDSA private key on a given curve. */
+function generateECDSA(curve) {
+ var parts = [];
+ var key;
+
+ if (CRYPTO_HAVE_ECDH) {
+ /*
+ * Node crypto doesn't expose key generation directly, but the
+ * ECDH instances can generate keys. It turns out this just
+ * calls into the OpenSSL generic key generator, and we can
+ * read its output happily without doing an actual DH. So we
+ * use that here.
+ */
+ var osCurve = {
+ 'nistp256': 'prime256v1',
+ 'nistp384': 'secp384r1',
+ 'nistp521': 'secp521r1'
+ }[curve];
+
+ var dh = crypto.createECDH(osCurve);
+ dh.generateKeys();
+
+ parts.push({name: 'curve',
+ data: Buffer.from(curve)});
+ parts.push({name: 'Q', data: dh.getPublicKey()});
+ parts.push({name: 'd', data: dh.getPrivateKey()});
+
+ key = new PrivateKey({
+ type: 'ecdsa',
+ curve: curve,
+ parts: parts
+ });
+ return (key);
+ } else {
+
+ var ecParams = new X9ECParameters(curve);
+
+ /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */
+ var n = ecParams.getN();
+ /*
+ * The crypto.randomBytes() function can only give us whole
+ * bytes, so taking a nod from X9.62, we round up.
+ */
+ var cByteLen = Math.ceil((n.bitLength() + 64) / 8);
+ var c = new jsbn(crypto.randomBytes(cByteLen));
+
+ var n1 = n.subtract(jsbn.ONE);
+ var priv = c.mod(n1).add(jsbn.ONE);
+ var pub = ecParams.getG().multiply(priv);
+
+ priv = Buffer.from(priv.toByteArray());
+ pub = Buffer.from(ecParams.getCurve().
+ encodePointHex(pub), 'hex');
+
+ parts.push({name: 'curve', data: Buffer.from(curve)});
+ parts.push({name: 'Q', data: pub});
+ parts.push({name: 'd', data: priv});
+
+ key = new PrivateKey({
+ type: 'ecdsa',
+ curve: curve,
+ parts: parts
+ });
+ return (key);
+ }
+}
diff --git a/node_modules/sshpk/lib/ed-compat.js b/node_modules/sshpk/lib/ed-compat.js
new file mode 100644
index 0000000..70732e1
--- /dev/null
+++ b/node_modules/sshpk/lib/ed-compat.js
@@ -0,0 +1,92 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = {
+ Verifier: Verifier,
+ Signer: Signer
+};
+
+var nacl = require('tweetnacl');
+var stream = require('stream');
+var util = require('util');
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var Signature = require('./signature');
+
+function Verifier(key, hashAlgo) {
+ if (hashAlgo.toLowerCase() !== 'sha512')
+ throw (new Error('ED25519 only supports the use of ' +
+ 'SHA-512 hashes'));
+
+ this.key = key;
+ this.chunks = [];
+
+ stream.Writable.call(this, {});
+}
+util.inherits(Verifier, stream.Writable);
+
+Verifier.prototype._write = function (chunk, enc, cb) {
+ this.chunks.push(chunk);
+ cb();
+};
+
+Verifier.prototype.update = function (chunk) {
+ if (typeof (chunk) === 'string')
+ chunk = Buffer.from(chunk, 'binary');
+ this.chunks.push(chunk);
+};
+
+Verifier.prototype.verify = function (signature, fmt) {
+ var sig;
+ if (Signature.isSignature(signature, [2, 0])) {
+ if (signature.type !== 'ed25519')
+ return (false);
+ sig = signature.toBuffer('raw');
+
+ } else if (typeof (signature) === 'string') {
+ sig = Buffer.from(signature, 'base64');
+
+ } else if (Signature.isSignature(signature, [1, 0])) {
+ throw (new Error('signature was created by too old ' +
+ 'a version of sshpk and cannot be verified'));
+ }
+
+ assert.buffer(sig);
+ return (nacl.sign.detached.verify(
+ new Uint8Array(Buffer.concat(this.chunks)),
+ new Uint8Array(sig),
+ new Uint8Array(this.key.part.A.data)));
+};
+
+function Signer(key, hashAlgo) {
+ if (hashAlgo.toLowerCase() !== 'sha512')
+ throw (new Error('ED25519 only supports the use of ' +
+ 'SHA-512 hashes'));
+
+ this.key = key;
+ this.chunks = [];
+
+ stream.Writable.call(this, {});
+}
+util.inherits(Signer, stream.Writable);
+
+Signer.prototype._write = function (chunk, enc, cb) {
+ this.chunks.push(chunk);
+ cb();
+};
+
+Signer.prototype.update = function (chunk) {
+ if (typeof (chunk) === 'string')
+ chunk = Buffer.from(chunk, 'binary');
+ this.chunks.push(chunk);
+};
+
+Signer.prototype.sign = function () {
+ var sig = nacl.sign.detached(
+ new Uint8Array(Buffer.concat(this.chunks)),
+ new Uint8Array(Buffer.concat([
+ this.key.part.k.data, this.key.part.A.data])));
+ var sigBuf = Buffer.from(sig);
+ var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw');
+ sigObj.hashAlgorithm = 'sha512';
+ return (sigObj);
+};
diff --git a/node_modules/sshpk/lib/errors.js b/node_modules/sshpk/lib/errors.js
new file mode 100644
index 0000000..1cc09ec
--- /dev/null
+++ b/node_modules/sshpk/lib/errors.js
@@ -0,0 +1,84 @@
+// Copyright 2015 Joyent, Inc.
+
+var assert = require('assert-plus');
+var util = require('util');
+
+function FingerprintFormatError(fp, format) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, FingerprintFormatError);
+ this.name = 'FingerprintFormatError';
+ this.fingerprint = fp;
+ this.format = format;
+ this.message = 'Fingerprint format is not supported, or is invalid: ';
+ if (fp !== undefined)
+ this.message += ' fingerprint = ' + fp;
+ if (format !== undefined)
+ this.message += ' format = ' + format;
+}
+util.inherits(FingerprintFormatError, Error);
+
+function InvalidAlgorithmError(alg) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, InvalidAlgorithmError);
+ this.name = 'InvalidAlgorithmError';
+ this.algorithm = alg;
+ this.message = 'Algorithm "' + alg + '" is not supported';
+}
+util.inherits(InvalidAlgorithmError, Error);
+
+function KeyParseError(name, format, innerErr) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, KeyParseError);
+ this.name = 'KeyParseError';
+ this.format = format;
+ this.keyName = name;
+ this.innerErr = innerErr;
+ this.message = 'Failed to parse ' + name + ' as a valid ' + format +
+ ' format key: ' + innerErr.message;
+}
+util.inherits(KeyParseError, Error);
+
+function SignatureParseError(type, format, innerErr) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, SignatureParseError);
+ this.name = 'SignatureParseError';
+ this.type = type;
+ this.format = format;
+ this.innerErr = innerErr;
+ this.message = 'Failed to parse the given data as a ' + type +
+ ' signature in ' + format + ' format: ' + innerErr.message;
+}
+util.inherits(SignatureParseError, Error);
+
+function CertificateParseError(name, format, innerErr) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, CertificateParseError);
+ this.name = 'CertificateParseError';
+ this.format = format;
+ this.certName = name;
+ this.innerErr = innerErr;
+ this.message = 'Failed to parse ' + name + ' as a valid ' + format +
+ ' format certificate: ' + innerErr.message;
+}
+util.inherits(CertificateParseError, Error);
+
+function KeyEncryptedError(name, format) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, KeyEncryptedError);
+ this.name = 'KeyEncryptedError';
+ this.format = format;
+ this.keyName = name;
+ this.message = 'The ' + format + ' format key ' + name + ' is ' +
+ 'encrypted (password-protected), and no passphrase was ' +
+ 'provided in `options`';
+}
+util.inherits(KeyEncryptedError, Error);
+
+module.exports = {
+ FingerprintFormatError: FingerprintFormatError,
+ InvalidAlgorithmError: InvalidAlgorithmError,
+ KeyParseError: KeyParseError,
+ SignatureParseError: SignatureParseError,
+ KeyEncryptedError: KeyEncryptedError,
+ CertificateParseError: CertificateParseError
+};
diff --git a/node_modules/sshpk/lib/fingerprint.js b/node_modules/sshpk/lib/fingerprint.js
new file mode 100644
index 0000000..0004b37
--- /dev/null
+++ b/node_modules/sshpk/lib/fingerprint.js
@@ -0,0 +1,220 @@
+// Copyright 2018 Joyent, Inc.
+
+module.exports = Fingerprint;
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('./algs');
+var crypto = require('crypto');
+var errs = require('./errors');
+var Key = require('./key');
+var PrivateKey = require('./private-key');
+var Certificate = require('./certificate');
+var utils = require('./utils');
+
+var FingerprintFormatError = errs.FingerprintFormatError;
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+
+function Fingerprint(opts) {
+ assert.object(opts, 'options');
+ assert.string(opts.type, 'options.type');
+ assert.buffer(opts.hash, 'options.hash');
+ assert.string(opts.algorithm, 'options.algorithm');
+
+ this.algorithm = opts.algorithm.toLowerCase();
+ if (algs.hashAlgs[this.algorithm] !== true)
+ throw (new InvalidAlgorithmError(this.algorithm));
+
+ this.hash = opts.hash;
+ this.type = opts.type;
+ this.hashType = opts.hashType;
+}
+
+Fingerprint.prototype.toString = function (format) {
+ if (format === undefined) {
+ if (this.algorithm === 'md5' || this.hashType === 'spki')
+ format = 'hex';
+ else
+ format = 'base64';
+ }
+ assert.string(format);
+
+ switch (format) {
+ case 'hex':
+ if (this.hashType === 'spki')
+ return (this.hash.toString('hex'));
+ return (addColons(this.hash.toString('hex')));
+ case 'base64':
+ if (this.hashType === 'spki')
+ return (this.hash.toString('base64'));
+ return (sshBase64Format(this.algorithm,
+ this.hash.toString('base64')));
+ default:
+ throw (new FingerprintFormatError(undefined, format));
+ }
+};
+
+Fingerprint.prototype.matches = function (other) {
+ assert.object(other, 'key or certificate');
+ if (this.type === 'key' && this.hashType !== 'ssh') {
+ utils.assertCompatible(other, Key, [1, 7], 'key with spki');
+ if (PrivateKey.isPrivateKey(other)) {
+ utils.assertCompatible(other, PrivateKey, [1, 6],
+ 'privatekey with spki support');
+ }
+ } else if (this.type === 'key') {
+ utils.assertCompatible(other, Key, [1, 0], 'key');
+ } else {
+ utils.assertCompatible(other, Certificate, [1, 0],
+ 'certificate');
+ }
+
+ var theirHash = other.hash(this.algorithm, this.hashType);
+ var theirHash2 = crypto.createHash(this.algorithm).
+ update(theirHash).digest('base64');
+
+ if (this.hash2 === undefined)
+ this.hash2 = crypto.createHash(this.algorithm).
+ update(this.hash).digest('base64');
+
+ return (this.hash2 === theirHash2);
+};
+
+/*JSSTYLED*/
+var base64RE = /^[A-Za-z0-9+\/=]+$/;
+/*JSSTYLED*/
+var hexRE = /^[a-fA-F0-9]+$/;
+
+Fingerprint.parse = function (fp, options) {
+ assert.string(fp, 'fingerprint');
+
+ var alg, hash, enAlgs;
+ if (Array.isArray(options)) {
+ enAlgs = options;
+ options = {};
+ }
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ if (options.enAlgs !== undefined)
+ enAlgs = options.enAlgs;
+ if (options.algorithms !== undefined)
+ enAlgs = options.algorithms;
+ assert.optionalArrayOfString(enAlgs, 'algorithms');
+
+ var hashType = 'ssh';
+ if (options.hashType !== undefined)
+ hashType = options.hashType;
+ assert.string(hashType, 'options.hashType');
+
+ var parts = fp.split(':');
+ if (parts.length == 2) {
+ alg = parts[0].toLowerCase();
+ if (!base64RE.test(parts[1]))
+ throw (new FingerprintFormatError(fp));
+ try {
+ hash = Buffer.from(parts[1], 'base64');
+ } catch (e) {
+ throw (new FingerprintFormatError(fp));
+ }
+ } else if (parts.length > 2) {
+ alg = 'md5';
+ if (parts[0].toLowerCase() === 'md5')
+ parts = parts.slice(1);
+ parts = parts.map(function (p) {
+ while (p.length < 2)
+ p = '0' + p;
+ if (p.length > 2)
+ throw (new FingerprintFormatError(fp));
+ return (p);
+ });
+ parts = parts.join('');
+ if (!hexRE.test(parts) || parts.length % 2 !== 0)
+ throw (new FingerprintFormatError(fp));
+ try {
+ hash = Buffer.from(parts, 'hex');
+ } catch (e) {
+ throw (new FingerprintFormatError(fp));
+ }
+ } else {
+ if (hexRE.test(fp)) {
+ hash = Buffer.from(fp, 'hex');
+ } else if (base64RE.test(fp)) {
+ hash = Buffer.from(fp, 'base64');
+ } else {
+ throw (new FingerprintFormatError(fp));
+ }
+
+ switch (hash.length) {
+ case 32:
+ alg = 'sha256';
+ break;
+ case 16:
+ alg = 'md5';
+ break;
+ case 20:
+ alg = 'sha1';
+ break;
+ case 64:
+ alg = 'sha512';
+ break;
+ default:
+ throw (new FingerprintFormatError(fp));
+ }
+
+ /* Plain hex/base64: guess it's probably SPKI unless told. */
+ if (options.hashType === undefined)
+ hashType = 'spki';
+ }
+
+ if (alg === undefined)
+ throw (new FingerprintFormatError(fp));
+
+ if (algs.hashAlgs[alg] === undefined)
+ throw (new InvalidAlgorithmError(alg));
+
+ if (enAlgs !== undefined) {
+ enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); });
+ if (enAlgs.indexOf(alg) === -1)
+ throw (new InvalidAlgorithmError(alg));
+ }
+
+ return (new Fingerprint({
+ algorithm: alg,
+ hash: hash,
+ type: options.type || 'key',
+ hashType: hashType
+ }));
+};
+
+function addColons(s) {
+ /*JSSTYLED*/
+ return (s.replace(/(.{2})(?=.)/g, '$1:'));
+}
+
+function base64Strip(s) {
+ /*JSSTYLED*/
+ return (s.replace(/=*$/, ''));
+}
+
+function sshBase64Format(alg, h) {
+ return (alg.toUpperCase() + ':' + base64Strip(h));
+}
+
+Fingerprint.isFingerprint = function (obj, ver) {
+ return (utils.isCompatible(obj, Fingerprint, ver));
+};
+
+/*
+ * API versions for Fingerprint:
+ * [1,0] -- initial ver
+ * [1,1] -- first tagged ver
+ * [1,2] -- hashType and spki support
+ */
+Fingerprint.prototype._sshpkApiVersion = [1, 2];
+
+Fingerprint._oldVersionDetect = function (obj) {
+ assert.func(obj.toString);
+ assert.func(obj.matches);
+ return ([1, 0]);
+};
diff --git a/node_modules/sshpk/lib/formats/auto.js b/node_modules/sshpk/lib/formats/auto.js
new file mode 100644
index 0000000..f32cd96
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/auto.js
@@ -0,0 +1,124 @@
+// Copyright 2018 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ write: write
+};
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+
+var pem = require('./pem');
+var ssh = require('./ssh');
+var rfc4253 = require('./rfc4253');
+var dnssec = require('./dnssec');
+var putty = require('./putty');
+
+var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1';
+
+function read(buf, options) {
+ if (typeof (buf) === 'string') {
+ if (buf.trim().match(/^[-]+[ ]*BEGIN/))
+ return (pem.read(buf, options));
+ if (buf.match(/^\s*ssh-[a-z]/))
+ return (ssh.read(buf, options));
+ if (buf.match(/^\s*ecdsa-/))
+ return (ssh.read(buf, options));
+ if (buf.match(/^putty-user-key-file-2:/i))
+ return (putty.read(buf, options));
+ if (findDNSSECHeader(buf))
+ return (dnssec.read(buf, options));
+ buf = Buffer.from(buf, 'binary');
+ } else {
+ assert.buffer(buf);
+ if (findPEMHeader(buf))
+ return (pem.read(buf, options));
+ if (findSSHHeader(buf))
+ return (ssh.read(buf, options));
+ if (findPuTTYHeader(buf))
+ return (putty.read(buf, options));
+ if (findDNSSECHeader(buf))
+ return (dnssec.read(buf, options));
+ }
+ if (buf.readUInt32BE(0) < buf.length)
+ return (rfc4253.read(buf, options));
+ throw (new Error('Failed to auto-detect format of key'));
+}
+
+function findPuTTYHeader(buf) {
+ var offset = 0;
+ while (offset < buf.length &&
+ (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9))
+ ++offset;
+ if (offset + 22 <= buf.length &&
+ buf.slice(offset, offset + 22).toString('ascii').toLowerCase() ===
+ 'putty-user-key-file-2:')
+ return (true);
+ return (false);
+}
+
+function findSSHHeader(buf) {
+ var offset = 0;
+ while (offset < buf.length &&
+ (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9))
+ ++offset;
+ if (offset + 4 <= buf.length &&
+ buf.slice(offset, offset + 4).toString('ascii') === 'ssh-')
+ return (true);
+ if (offset + 6 <= buf.length &&
+ buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-')
+ return (true);
+ return (false);
+}
+
+function findPEMHeader(buf) {
+ var offset = 0;
+ while (offset < buf.length &&
+ (buf[offset] === 32 || buf[offset] === 10))
+ ++offset;
+ if (buf[offset] !== 45)
+ return (false);
+ while (offset < buf.length &&
+ (buf[offset] === 45))
+ ++offset;
+ while (offset < buf.length &&
+ (buf[offset] === 32))
+ ++offset;
+ if (offset + 5 > buf.length ||
+ buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN')
+ return (false);
+ return (true);
+}
+
+function findDNSSECHeader(buf) {
+ // private case first
+ if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length)
+ return (false);
+ var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length);
+ if (headerCheck.toString('ascii') === DNSSEC_PRIVKEY_HEADER_PREFIX)
+ return (true);
+
+ // public-key RFC3110 ?
+ // 'domain.com. IN KEY ...' or 'domain.com. IN DNSKEY ...'
+ // skip any comment-lines
+ if (typeof (buf) !== 'string') {
+ buf = buf.toString('ascii');
+ }
+ var lines = buf.split('\n');
+ var line = 0;
+ /* JSSTYLED */
+ while (lines[line].match(/^\;/))
+ line++;
+ if (lines[line].toString('ascii').match(/\. IN KEY /))
+ return (true);
+ if (lines[line].toString('ascii').match(/\. IN DNSKEY /))
+ return (true);
+ return (false);
+}
+
+function write(key, options) {
+ throw (new Error('"auto" format cannot be used for writing'));
+}
diff --git a/node_modules/sshpk/lib/formats/dnssec.js b/node_modules/sshpk/lib/formats/dnssec.js
new file mode 100644
index 0000000..a74ea9c
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/dnssec.js
@@ -0,0 +1,287 @@
+// Copyright 2017 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ write: write
+};
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var utils = require('../utils');
+var SSHBuffer = require('../ssh-buffer');
+var Dhe = require('../dhe');
+
+var supportedAlgos = {
+ 'rsa-sha1' : 5,
+ 'rsa-sha256' : 8,
+ 'rsa-sha512' : 10,
+ 'ecdsa-p256-sha256' : 13,
+ 'ecdsa-p384-sha384' : 14
+ /*
+ * ed25519 is hypothetically supported with id 15
+ * but the common tools available don't appear to be
+ * capable of generating/using ed25519 keys
+ */
+};
+
+var supportedAlgosById = {};
+Object.keys(supportedAlgos).forEach(function (k) {
+ supportedAlgosById[supportedAlgos[k]] = k.toUpperCase();
+});
+
+function read(buf, options) {
+ if (typeof (buf) !== 'string') {
+ assert.buffer(buf, 'buf');
+ buf = buf.toString('ascii');
+ }
+ var lines = buf.split('\n');
+ if (lines[0].match(/^Private-key-format\: v1/)) {
+ var algElems = lines[1].split(' ');
+ var algoNum = parseInt(algElems[1], 10);
+ var algoName = algElems[2];
+ if (!supportedAlgosById[algoNum])
+ throw (new Error('Unsupported algorithm: ' + algoName));
+ return (readDNSSECPrivateKey(algoNum, lines.slice(2)));
+ }
+
+ // skip any comment-lines
+ var line = 0;
+ /* JSSTYLED */
+ while (lines[line].match(/^\;/))
+ line++;
+ // we should now have *one single* line left with our KEY on it.
+ if ((lines[line].match(/\. IN KEY /) ||
+ lines[line].match(/\. IN DNSKEY /)) && lines[line+1].length === 0) {
+ return (readRFC3110(lines[line]));
+ }
+ throw (new Error('Cannot parse dnssec key'));
+}
+
+function readRFC3110(keyString) {
+ var elems = keyString.split(' ');
+ //unused var flags = parseInt(elems[3], 10);
+ //unused var protocol = parseInt(elems[4], 10);
+ var algorithm = parseInt(elems[5], 10);
+ if (!supportedAlgosById[algorithm])
+ throw (new Error('Unsupported algorithm: ' + algorithm));
+ var base64key = elems.slice(6, elems.length).join();
+ var keyBuffer = Buffer.from(base64key, 'base64');
+ if (supportedAlgosById[algorithm].match(/^RSA-/)) {
+ // join the rest of the body into a single base64-blob
+ var publicExponentLen = keyBuffer.readUInt8(0);
+ if (publicExponentLen != 3 && publicExponentLen != 1)
+ throw (new Error('Cannot parse dnssec key: ' +
+ 'unsupported exponent length'));
+
+ var publicExponent = keyBuffer.slice(1, publicExponentLen+1);
+ publicExponent = utils.mpNormalize(publicExponent);
+ var modulus = keyBuffer.slice(1+publicExponentLen);
+ modulus = utils.mpNormalize(modulus);
+ // now, make the key
+ var rsaKey = {
+ type: 'rsa',
+ parts: []
+ };
+ rsaKey.parts.push({ name: 'e', data: publicExponent});
+ rsaKey.parts.push({ name: 'n', data: modulus});
+ return (new Key(rsaKey));
+ }
+ if (supportedAlgosById[algorithm] === 'ECDSA-P384-SHA384' ||
+ supportedAlgosById[algorithm] === 'ECDSA-P256-SHA256') {
+ var curve = 'nistp384';
+ var size = 384;
+ if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) {
+ curve = 'nistp256';
+ size = 256;
+ }
+
+ var ecdsaKey = {
+ type: 'ecdsa',
+ curve: curve,
+ size: size,
+ parts: [
+ {name: 'curve', data: Buffer.from(curve) },
+ {name: 'Q', data: utils.ecNormalize(keyBuffer) }
+ ]
+ };
+ return (new Key(ecdsaKey));
+ }
+ throw (new Error('Unsupported algorithm: ' +
+ supportedAlgosById[algorithm]));
+}
+
+function elementToBuf(e) {
+ return (Buffer.from(e.split(' ')[1], 'base64'));
+}
+
+function readDNSSECRSAPrivateKey(elements) {
+ var rsaParams = {};
+ elements.forEach(function (element) {
+ if (element.split(' ')[0] === 'Modulus:')
+ rsaParams['n'] = elementToBuf(element);
+ else if (element.split(' ')[0] === 'PublicExponent:')
+ rsaParams['e'] = elementToBuf(element);
+ else if (element.split(' ')[0] === 'PrivateExponent:')
+ rsaParams['d'] = elementToBuf(element);
+ else if (element.split(' ')[0] === 'Prime1:')
+ rsaParams['p'] = elementToBuf(element);
+ else if (element.split(' ')[0] === 'Prime2:')
+ rsaParams['q'] = elementToBuf(element);
+ else if (element.split(' ')[0] === 'Exponent1:')
+ rsaParams['dmodp'] = elementToBuf(element);
+ else if (element.split(' ')[0] === 'Exponent2:')
+ rsaParams['dmodq'] = elementToBuf(element);
+ else if (element.split(' ')[0] === 'Coefficient:')
+ rsaParams['iqmp'] = elementToBuf(element);
+ });
+ // now, make the key
+ var key = {
+ type: 'rsa',
+ parts: [
+ { name: 'e', data: utils.mpNormalize(rsaParams['e'])},
+ { name: 'n', data: utils.mpNormalize(rsaParams['n'])},
+ { name: 'd', data: utils.mpNormalize(rsaParams['d'])},
+ { name: 'p', data: utils.mpNormalize(rsaParams['p'])},
+ { name: 'q', data: utils.mpNormalize(rsaParams['q'])},
+ { name: 'dmodp',
+ data: utils.mpNormalize(rsaParams['dmodp'])},
+ { name: 'dmodq',
+ data: utils.mpNormalize(rsaParams['dmodq'])},
+ { name: 'iqmp',
+ data: utils.mpNormalize(rsaParams['iqmp'])}
+ ]
+ };
+ return (new PrivateKey(key));
+}
+
+function readDNSSECPrivateKey(alg, elements) {
+ if (supportedAlgosById[alg].match(/^RSA-/)) {
+ return (readDNSSECRSAPrivateKey(elements));
+ }
+ if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' ||
+ supportedAlgosById[alg] === 'ECDSA-P256-SHA256') {
+ var d = Buffer.from(elements[0].split(' ')[1], 'base64');
+ var curve = 'nistp384';
+ var size = 384;
+ if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') {
+ curve = 'nistp256';
+ size = 256;
+ }
+ // DNSSEC generates the public-key on the fly (go calculate it)
+ var publicKey = utils.publicFromPrivateECDSA(curve, d);
+ var Q = publicKey.part['Q'].data;
+ var ecdsaKey = {
+ type: 'ecdsa',
+ curve: curve,
+ size: size,
+ parts: [
+ {name: 'curve', data: Buffer.from(curve) },
+ {name: 'd', data: d },
+ {name: 'Q', data: Q }
+ ]
+ };
+ return (new PrivateKey(ecdsaKey));
+ }
+ throw (new Error('Unsupported algorithm: ' + supportedAlgosById[alg]));
+}
+
+function dnssecTimestamp(date) {
+ var year = date.getFullYear() + ''; //stringify
+ var month = (date.getMonth() + 1);
+ var timestampStr = year + month + date.getUTCDate();
+ timestampStr += '' + date.getUTCHours() + date.getUTCMinutes();
+ timestampStr += date.getUTCSeconds();
+ return (timestampStr);
+}
+
+function rsaAlgFromOptions(opts) {
+ if (!opts || !opts.hashAlgo || opts.hashAlgo === 'sha1')
+ return ('5 (RSASHA1)');
+ else if (opts.hashAlgo === 'sha256')
+ return ('8 (RSASHA256)');
+ else if (opts.hashAlgo === 'sha512')
+ return ('10 (RSASHA512)');
+ else
+ throw (new Error('Unknown or unsupported hash: ' +
+ opts.hashAlgo));
+}
+
+function writeRSA(key, options) {
+ // if we're missing parts, add them.
+ if (!key.part.dmodp || !key.part.dmodq) {
+ utils.addRSAMissing(key);
+ }
+
+ var out = '';
+ out += 'Private-key-format: v1.3\n';
+ out += 'Algorithm: ' + rsaAlgFromOptions(options) + '\n';
+ var n = utils.mpDenormalize(key.part['n'].data);
+ out += 'Modulus: ' + n.toString('base64') + '\n';
+ var e = utils.mpDenormalize(key.part['e'].data);
+ out += 'PublicExponent: ' + e.toString('base64') + '\n';
+ var d = utils.mpDenormalize(key.part['d'].data);
+ out += 'PrivateExponent: ' + d.toString('base64') + '\n';
+ var p = utils.mpDenormalize(key.part['p'].data);
+ out += 'Prime1: ' + p.toString('base64') + '\n';
+ var q = utils.mpDenormalize(key.part['q'].data);
+ out += 'Prime2: ' + q.toString('base64') + '\n';
+ var dmodp = utils.mpDenormalize(key.part['dmodp'].data);
+ out += 'Exponent1: ' + dmodp.toString('base64') + '\n';
+ var dmodq = utils.mpDenormalize(key.part['dmodq'].data);
+ out += 'Exponent2: ' + dmodq.toString('base64') + '\n';
+ var iqmp = utils.mpDenormalize(key.part['iqmp'].data);
+ out += 'Coefficient: ' + iqmp.toString('base64') + '\n';
+ // Assume that we're valid as-of now
+ var timestamp = new Date();
+ out += 'Created: ' + dnssecTimestamp(timestamp) + '\n';
+ out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n';
+ out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n';
+ return (Buffer.from(out, 'ascii'));
+}
+
+function writeECDSA(key, options) {
+ var out = '';
+ out += 'Private-key-format: v1.3\n';
+
+ if (key.curve === 'nistp256') {
+ out += 'Algorithm: 13 (ECDSAP256SHA256)\n';
+ } else if (key.curve === 'nistp384') {
+ out += 'Algorithm: 14 (ECDSAP384SHA384)\n';
+ } else {
+ throw (new Error('Unsupported curve'));
+ }
+ var base64Key = key.part['d'].data.toString('base64');
+ out += 'PrivateKey: ' + base64Key + '\n';
+
+ // Assume that we're valid as-of now
+ var timestamp = new Date();
+ out += 'Created: ' + dnssecTimestamp(timestamp) + '\n';
+ out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n';
+ out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n';
+
+ return (Buffer.from(out, 'ascii'));
+}
+
+function write(key, options) {
+ if (PrivateKey.isPrivateKey(key)) {
+ if (key.type === 'rsa') {
+ return (writeRSA(key, options));
+ } else if (key.type === 'ecdsa') {
+ return (writeECDSA(key, options));
+ } else {
+ throw (new Error('Unsupported algorithm: ' + key.type));
+ }
+ } else if (Key.isKey(key)) {
+ /*
+ * RFC3110 requires a keyname, and a keytype, which we
+ * don't really have a mechanism for specifying such
+ * additional metadata.
+ */
+ throw (new Error('Format "dnssec" only supports ' +
+ 'writing private keys'));
+ } else {
+ throw (new Error('key is not a Key or PrivateKey'));
+ }
+}
diff --git a/node_modules/sshpk/lib/formats/openssh-cert.js b/node_modules/sshpk/lib/formats/openssh-cert.js
new file mode 100644
index 0000000..766f3d3
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/openssh-cert.js
@@ -0,0 +1,352 @@
+// Copyright 2017 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ verify: verify,
+ sign: sign,
+ signAsync: signAsync,
+ write: write,
+
+ /* Internal private API */
+ fromBuffer: fromBuffer,
+ toBuffer: toBuffer
+};
+
+var assert = require('assert-plus');
+var SSHBuffer = require('../ssh-buffer');
+var crypto = require('crypto');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var Identity = require('../identity');
+var rfc4253 = require('./rfc4253');
+var Signature = require('../signature');
+var utils = require('../utils');
+var Certificate = require('../certificate');
+
+function verify(cert, key) {
+ /*
+ * We always give an issuerKey, so if our verify() is being called then
+ * there was no signature. Return false.
+ */
+ return (false);
+}
+
+var TYPES = {
+ 'user': 1,
+ 'host': 2
+};
+Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; });
+
+var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/;
+
+function read(buf, options) {
+ if (Buffer.isBuffer(buf))
+ buf = buf.toString('ascii');
+ var parts = buf.trim().split(/[ \t\n]+/g);
+ if (parts.length < 2 || parts.length > 3)
+ throw (new Error('Not a valid SSH certificate line'));
+
+ var algo = parts[0];
+ var data = parts[1];
+
+ data = Buffer.from(data, 'base64');
+ return (fromBuffer(data, algo));
+}
+
+function fromBuffer(data, algo, partial) {
+ var sshbuf = new SSHBuffer({ buffer: data });
+ var innerAlgo = sshbuf.readString();
+ if (algo !== undefined && innerAlgo !== algo)
+ throw (new Error('SSH certificate algorithm mismatch'));
+ if (algo === undefined)
+ algo = innerAlgo;
+
+ var cert = {};
+ cert.signatures = {};
+ cert.signatures.openssh = {};
+
+ cert.signatures.openssh.nonce = sshbuf.readBuffer();
+
+ var key = {};
+ var parts = (key.parts = []);
+ key.type = getAlg(algo);
+
+ var partCount = algs.info[key.type].parts.length;
+ while (parts.length < partCount)
+ parts.push(sshbuf.readPart());
+ assert.ok(parts.length >= 1, 'key must have at least one part');
+
+ var algInfo = algs.info[key.type];
+ if (key.type === 'ecdsa') {
+ var res = ECDSA_ALGO.exec(algo);
+ assert.ok(res !== null);
+ assert.strictEqual(res[1], parts[0].data.toString());
+ }
+
+ for (var i = 0; i < algInfo.parts.length; ++i) {
+ parts[i].name = algInfo.parts[i];
+ if (parts[i].name !== 'curve' &&
+ algInfo.normalize !== false) {
+ var p = parts[i];
+ p.data = utils.mpNormalize(p.data);
+ }
+ }
+
+ cert.subjectKey = new Key(key);
+
+ cert.serial = sshbuf.readInt64();
+
+ var type = TYPES[sshbuf.readInt()];
+ assert.string(type, 'valid cert type');
+
+ cert.signatures.openssh.keyId = sshbuf.readString();
+
+ var principals = [];
+ var pbuf = sshbuf.readBuffer();
+ var psshbuf = new SSHBuffer({ buffer: pbuf });
+ while (!psshbuf.atEnd())
+ principals.push(psshbuf.readString());
+ if (principals.length === 0)
+ principals = ['*'];
+
+ cert.subjects = principals.map(function (pr) {
+ if (type === 'user')
+ return (Identity.forUser(pr));
+ else if (type === 'host')
+ return (Identity.forHost(pr));
+ throw (new Error('Unknown identity type ' + type));
+ });
+
+ cert.validFrom = int64ToDate(sshbuf.readInt64());
+ cert.validUntil = int64ToDate(sshbuf.readInt64());
+
+ var exts = [];
+ var extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() });
+ var ext;
+ while (!extbuf.atEnd()) {
+ ext = { critical: true };
+ ext.name = extbuf.readString();
+ ext.data = extbuf.readBuffer();
+ exts.push(ext);
+ }
+ extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() });
+ while (!extbuf.atEnd()) {
+ ext = { critical: false };
+ ext.name = extbuf.readString();
+ ext.data = extbuf.readBuffer();
+ exts.push(ext);
+ }
+ cert.signatures.openssh.exts = exts;
+
+ /* reserved */
+ sshbuf.readBuffer();
+
+ var signingKeyBuf = sshbuf.readBuffer();
+ cert.issuerKey = rfc4253.read(signingKeyBuf);
+
+ /*
+ * OpenSSH certs don't give the identity of the issuer, just their
+ * public key. So, we use an Identity that matches anything. The
+ * isSignedBy() function will later tell you if the key matches.
+ */
+ cert.issuer = Identity.forHost('**');
+
+ var sigBuf = sshbuf.readBuffer();
+ cert.signatures.openssh.signature =
+ Signature.parse(sigBuf, cert.issuerKey.type, 'ssh');
+
+ if (partial !== undefined) {
+ partial.remainder = sshbuf.remainder();
+ partial.consumed = sshbuf._offset;
+ }
+
+ return (new Certificate(cert));
+}
+
+function int64ToDate(buf) {
+ var i = buf.readUInt32BE(0) * 4294967296;
+ i += buf.readUInt32BE(4);
+ var d = new Date();
+ d.setTime(i * 1000);
+ d.sourceInt64 = buf;
+ return (d);
+}
+
+function dateToInt64(date) {
+ if (date.sourceInt64 !== undefined)
+ return (date.sourceInt64);
+ var i = Math.round(date.getTime() / 1000);
+ var upper = Math.floor(i / 4294967296);
+ var lower = Math.floor(i % 4294967296);
+ var buf = Buffer.alloc(8);
+ buf.writeUInt32BE(upper, 0);
+ buf.writeUInt32BE(lower, 4);
+ return (buf);
+}
+
+function sign(cert, key) {
+ if (cert.signatures.openssh === undefined)
+ cert.signatures.openssh = {};
+ try {
+ var blob = toBuffer(cert, true);
+ } catch (e) {
+ delete (cert.signatures.openssh);
+ return (false);
+ }
+ var sig = cert.signatures.openssh;
+ var hashAlgo = undefined;
+ if (key.type === 'rsa' || key.type === 'dsa')
+ hashAlgo = 'sha1';
+ var signer = key.createSign(hashAlgo);
+ signer.write(blob);
+ sig.signature = signer.sign();
+ return (true);
+}
+
+function signAsync(cert, signer, done) {
+ if (cert.signatures.openssh === undefined)
+ cert.signatures.openssh = {};
+ try {
+ var blob = toBuffer(cert, true);
+ } catch (e) {
+ delete (cert.signatures.openssh);
+ done(e);
+ return;
+ }
+ var sig = cert.signatures.openssh;
+
+ signer(blob, function (err, signature) {
+ if (err) {
+ done(err);
+ return;
+ }
+ try {
+ /*
+ * This will throw if the signature isn't of a
+ * type/algo that can be used for SSH.
+ */
+ signature.toBuffer('ssh');
+ } catch (e) {
+ done(e);
+ return;
+ }
+ sig.signature = signature;
+ done();
+ });
+}
+
+function write(cert, options) {
+ if (options === undefined)
+ options = {};
+
+ var blob = toBuffer(cert);
+ var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64');
+ if (options.comment)
+ out = out + ' ' + options.comment;
+ return (out);
+}
+
+
+function toBuffer(cert, noSig) {
+ assert.object(cert.signatures.openssh, 'signature for openssh format');
+ var sig = cert.signatures.openssh;
+
+ if (sig.nonce === undefined)
+ sig.nonce = crypto.randomBytes(16);
+ var buf = new SSHBuffer({});
+ buf.writeString(getCertType(cert.subjectKey));
+ buf.writeBuffer(sig.nonce);
+
+ var key = cert.subjectKey;
+ var algInfo = algs.info[key.type];
+ algInfo.parts.forEach(function (part) {
+ buf.writePart(key.part[part]);
+ });
+
+ buf.writeInt64(cert.serial);
+
+ var type = cert.subjects[0].type;
+ assert.notStrictEqual(type, 'unknown');
+ cert.subjects.forEach(function (id) {
+ assert.strictEqual(id.type, type);
+ });
+ type = TYPES[type];
+ buf.writeInt(type);
+
+ if (sig.keyId === undefined) {
+ sig.keyId = cert.subjects[0].type + '_' +
+ (cert.subjects[0].uid || cert.subjects[0].hostname);
+ }
+ buf.writeString(sig.keyId);
+
+ var sub = new SSHBuffer({});
+ cert.subjects.forEach(function (id) {
+ if (type === TYPES.host)
+ sub.writeString(id.hostname);
+ else if (type === TYPES.user)
+ sub.writeString(id.uid);
+ });
+ buf.writeBuffer(sub.toBuffer());
+
+ buf.writeInt64(dateToInt64(cert.validFrom));
+ buf.writeInt64(dateToInt64(cert.validUntil));
+
+ var exts = sig.exts;
+ if (exts === undefined)
+ exts = [];
+
+ var extbuf = new SSHBuffer({});
+ exts.forEach(function (ext) {
+ if (ext.critical !== true)
+ return;
+ extbuf.writeString(ext.name);
+ extbuf.writeBuffer(ext.data);
+ });
+ buf.writeBuffer(extbuf.toBuffer());
+
+ extbuf = new SSHBuffer({});
+ exts.forEach(function (ext) {
+ if (ext.critical === true)
+ return;
+ extbuf.writeString(ext.name);
+ extbuf.writeBuffer(ext.data);
+ });
+ buf.writeBuffer(extbuf.toBuffer());
+
+ /* reserved */
+ buf.writeBuffer(Buffer.alloc(0));
+
+ sub = rfc4253.write(cert.issuerKey);
+ buf.writeBuffer(sub);
+
+ if (!noSig)
+ buf.writeBuffer(sig.signature.toBuffer('ssh'));
+
+ return (buf.toBuffer());
+}
+
+function getAlg(certType) {
+ if (certType === 'ssh-rsa-cert-v01@openssh.com')
+ return ('rsa');
+ if (certType === 'ssh-dss-cert-v01@openssh.com')
+ return ('dsa');
+ if (certType.match(ECDSA_ALGO))
+ return ('ecdsa');
+ if (certType === 'ssh-ed25519-cert-v01@openssh.com')
+ return ('ed25519');
+ throw (new Error('Unsupported cert type ' + certType));
+}
+
+function getCertType(key) {
+ if (key.type === 'rsa')
+ return ('ssh-rsa-cert-v01@openssh.com');
+ if (key.type === 'dsa')
+ return ('ssh-dss-cert-v01@openssh.com');
+ if (key.type === 'ecdsa')
+ return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com');
+ if (key.type === 'ed25519')
+ return ('ssh-ed25519-cert-v01@openssh.com');
+ throw (new Error('Unsupported key type ' + key.type));
+}
diff --git a/node_modules/sshpk/lib/formats/pem.js b/node_modules/sshpk/lib/formats/pem.js
new file mode 100644
index 0000000..bbe78fc
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/pem.js
@@ -0,0 +1,290 @@
+// Copyright 2018 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var crypto = require('crypto');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+
+var pkcs1 = require('./pkcs1');
+var pkcs8 = require('./pkcs8');
+var sshpriv = require('./ssh-private');
+var rfc4253 = require('./rfc4253');
+
+var errors = require('../errors');
+
+var OID_PBES2 = '1.2.840.113549.1.5.13';
+var OID_PBKDF2 = '1.2.840.113549.1.5.12';
+
+var OID_TO_CIPHER = {
+ '1.2.840.113549.3.7': '3des-cbc',
+ '2.16.840.1.101.3.4.1.2': 'aes128-cbc',
+ '2.16.840.1.101.3.4.1.42': 'aes256-cbc'
+};
+var CIPHER_TO_OID = {};
+Object.keys(OID_TO_CIPHER).forEach(function (k) {
+ CIPHER_TO_OID[OID_TO_CIPHER[k]] = k;
+});
+
+var OID_TO_HASH = {
+ '1.2.840.113549.2.7': 'sha1',
+ '1.2.840.113549.2.9': 'sha256',
+ '1.2.840.113549.2.11': 'sha512'
+};
+var HASH_TO_OID = {};
+Object.keys(OID_TO_HASH).forEach(function (k) {
+ HASH_TO_OID[OID_TO_HASH[k]] = k;
+});
+
+/*
+ * For reading we support both PKCS#1 and PKCS#8. If we find a private key,
+ * we just take the public component of it and use that.
+ */
+function read(buf, options, forceType) {
+ var input = buf;
+ if (typeof (buf) !== 'string') {
+ assert.buffer(buf, 'buf');
+ buf = buf.toString('ascii');
+ }
+
+ var lines = buf.trim().split(/[\r\n]+/g);
+
+ var m;
+ var si = -1;
+ while (!m && si < lines.length) {
+ m = lines[++si].match(/*JSSTYLED*/
+ /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/);
+ }
+ assert.ok(m, 'invalid PEM header');
+
+ var m2;
+ var ei = lines.length;
+ while (!m2 && ei > 0) {
+ m2 = lines[--ei].match(/*JSSTYLED*/
+ /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/);
+ }
+ assert.ok(m2, 'invalid PEM footer');
+
+ /* Begin and end banners must match key type */
+ assert.equal(m[2], m2[2]);
+ var type = m[2].toLowerCase();
+
+ var alg;
+ if (m[1]) {
+ /* They also must match algorithms, if given */
+ assert.equal(m[1], m2[1], 'PEM header and footer mismatch');
+ alg = m[1].trim();
+ }
+
+ lines = lines.slice(si, ei + 1);
+
+ var headers = {};
+ while (true) {
+ lines = lines.slice(1);
+ m = lines[0].match(/*JSSTYLED*/
+ /^([A-Za-z0-9-]+): (.+)$/);
+ if (!m)
+ break;
+ headers[m[1].toLowerCase()] = m[2];
+ }
+
+ /* Chop off the first and last lines */
+ lines = lines.slice(0, -1).join('');
+ buf = Buffer.from(lines, 'base64');
+
+ var cipher, key, iv;
+ if (headers['proc-type']) {
+ var parts = headers['proc-type'].split(',');
+ if (parts[0] === '4' && parts[1] === 'ENCRYPTED') {
+ if (typeof (options.passphrase) === 'string') {
+ options.passphrase = Buffer.from(
+ options.passphrase, 'utf-8');
+ }
+ if (!Buffer.isBuffer(options.passphrase)) {
+ throw (new errors.KeyEncryptedError(
+ options.filename, 'PEM'));
+ } else {
+ parts = headers['dek-info'].split(',');
+ assert.ok(parts.length === 2);
+ cipher = parts[0].toLowerCase();
+ iv = Buffer.from(parts[1], 'hex');
+ key = utils.opensslKeyDeriv(cipher, iv,
+ options.passphrase, 1).key;
+ }
+ }
+ }
+
+ if (alg && alg.toLowerCase() === 'encrypted') {
+ var eder = new asn1.BerReader(buf);
+ var pbesEnd;
+ eder.readSequence();
+
+ eder.readSequence();
+ pbesEnd = eder.offset + eder.length;
+
+ var method = eder.readOID();
+ if (method !== OID_PBES2) {
+ throw (new Error('Unsupported PEM/PKCS8 encryption ' +
+ 'scheme: ' + method));
+ }
+
+ eder.readSequence(); /* PBES2-params */
+
+ eder.readSequence(); /* keyDerivationFunc */
+ var kdfEnd = eder.offset + eder.length;
+ var kdfOid = eder.readOID();
+ if (kdfOid !== OID_PBKDF2)
+ throw (new Error('Unsupported PBES2 KDF: ' + kdfOid));
+ eder.readSequence();
+ var salt = eder.readString(asn1.Ber.OctetString, true);
+ var iterations = eder.readInt();
+ var hashAlg = 'sha1';
+ if (eder.offset < kdfEnd) {
+ eder.readSequence();
+ var hashAlgOid = eder.readOID();
+ hashAlg = OID_TO_HASH[hashAlgOid];
+ if (hashAlg === undefined) {
+ throw (new Error('Unsupported PBKDF2 hash: ' +
+ hashAlgOid));
+ }
+ }
+ eder._offset = kdfEnd;
+
+ eder.readSequence(); /* encryptionScheme */
+ var cipherOid = eder.readOID();
+ cipher = OID_TO_CIPHER[cipherOid];
+ if (cipher === undefined) {
+ throw (new Error('Unsupported PBES2 cipher: ' +
+ cipherOid));
+ }
+ iv = eder.readString(asn1.Ber.OctetString, true);
+
+ eder._offset = pbesEnd;
+ buf = eder.readString(asn1.Ber.OctetString, true);
+
+ if (typeof (options.passphrase) === 'string') {
+ options.passphrase = Buffer.from(
+ options.passphrase, 'utf-8');
+ }
+ if (!Buffer.isBuffer(options.passphrase)) {
+ throw (new errors.KeyEncryptedError(
+ options.filename, 'PEM'));
+ }
+
+ var cinfo = utils.opensshCipherInfo(cipher);
+
+ cipher = cinfo.opensslName;
+ key = utils.pbkdf2(hashAlg, salt, iterations, cinfo.keySize,
+ options.passphrase);
+ alg = undefined;
+ }
+
+ if (cipher && key && iv) {
+ var cipherStream = crypto.createDecipheriv(cipher, key, iv);
+ var chunk, chunks = [];
+ cipherStream.once('error', function (e) {
+ if (e.toString().indexOf('bad decrypt') !== -1) {
+ throw (new Error('Incorrect passphrase ' +
+ 'supplied, could not decrypt key'));
+ }
+ throw (e);
+ });
+ cipherStream.write(buf);
+ cipherStream.end();
+ while ((chunk = cipherStream.read()) !== null)
+ chunks.push(chunk);
+ buf = Buffer.concat(chunks);
+ }
+
+ /* The new OpenSSH internal format abuses PEM headers */
+ if (alg && alg.toLowerCase() === 'openssh')
+ return (sshpriv.readSSHPrivate(type, buf, options));
+ if (alg && alg.toLowerCase() === 'ssh2')
+ return (rfc4253.readType(type, buf, options));
+
+ var der = new asn1.BerReader(buf);
+ der.originalInput = input;
+
+ /*
+ * All of the PEM file types start with a sequence tag, so chop it
+ * off here
+ */
+ der.readSequence();
+
+ /* PKCS#1 type keys name an algorithm in the banner explicitly */
+ if (alg) {
+ if (forceType)
+ assert.strictEqual(forceType, 'pkcs1');
+ return (pkcs1.readPkcs1(alg, type, der));
+ } else {
+ if (forceType)
+ assert.strictEqual(forceType, 'pkcs8');
+ return (pkcs8.readPkcs8(alg, type, der));
+ }
+}
+
+function write(key, options, type) {
+ assert.object(key);
+
+ var alg = {
+ 'ecdsa': 'EC',
+ 'rsa': 'RSA',
+ 'dsa': 'DSA',
+ 'ed25519': 'EdDSA'
+ }[key.type];
+ var header;
+
+ var der = new asn1.BerWriter();
+
+ if (PrivateKey.isPrivateKey(key)) {
+ if (type && type === 'pkcs8') {
+ header = 'PRIVATE KEY';
+ pkcs8.writePkcs8(der, key);
+ } else {
+ if (type)
+ assert.strictEqual(type, 'pkcs1');
+ header = alg + ' PRIVATE KEY';
+ pkcs1.writePkcs1(der, key);
+ }
+
+ } else if (Key.isKey(key)) {
+ if (type && type === 'pkcs1') {
+ header = alg + ' PUBLIC KEY';
+ pkcs1.writePkcs1(der, key);
+ } else {
+ if (type)
+ assert.strictEqual(type, 'pkcs8');
+ header = 'PUBLIC KEY';
+ pkcs8.writePkcs8(der, key);
+ }
+
+ } else {
+ throw (new Error('key is not a Key or PrivateKey'));
+ }
+
+ var tmp = der.buffer.toString('base64');
+ var len = tmp.length + (tmp.length / 64) +
+ 18 + 16 + header.length*2 + 10;
+ var buf = Buffer.alloc(len);
+ var o = 0;
+ o += buf.write('-----BEGIN ' + header + '-----\n', o);
+ for (var i = 0; i < tmp.length; ) {
+ var limit = i + 64;
+ if (limit > tmp.length)
+ limit = tmp.length;
+ o += buf.write(tmp.slice(i, limit), o);
+ buf[o++] = 10;
+ i = limit;
+ }
+ o += buf.write('-----END ' + header + '-----\n', o);
+
+ return (buf.slice(0, o));
+}
diff --git a/node_modules/sshpk/lib/formats/pkcs1.js b/node_modules/sshpk/lib/formats/pkcs1.js
new file mode 100644
index 0000000..bc48550
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/pkcs1.js
@@ -0,0 +1,373 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ readPkcs1: readPkcs1,
+ write: write,
+ writePkcs1: writePkcs1
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var utils = require('../utils');
+
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+
+var pkcs8 = require('./pkcs8');
+var readECDSACurve = pkcs8.readECDSACurve;
+
+function read(buf, options) {
+ return (pem.read(buf, options, 'pkcs1'));
+}
+
+function write(key, options) {
+ return (pem.write(key, options, 'pkcs1'));
+}
+
+/* Helper to read in a single mpint */
+function readMPInt(der, nm) {
+ assert.strictEqual(der.peek(), asn1.Ber.Integer,
+ nm + ' is not an Integer');
+ return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
+}
+
+function readPkcs1(alg, type, der) {
+ switch (alg) {
+ case 'RSA':
+ if (type === 'public')
+ return (readPkcs1RSAPublic(der));
+ else if (type === 'private')
+ return (readPkcs1RSAPrivate(der));
+ throw (new Error('Unknown key type: ' + type));
+ case 'DSA':
+ if (type === 'public')
+ return (readPkcs1DSAPublic(der));
+ else if (type === 'private')
+ return (readPkcs1DSAPrivate(der));
+ throw (new Error('Unknown key type: ' + type));
+ case 'EC':
+ case 'ECDSA':
+ if (type === 'private')
+ return (readPkcs1ECDSAPrivate(der));
+ else if (type === 'public')
+ return (readPkcs1ECDSAPublic(der));
+ throw (new Error('Unknown key type: ' + type));
+ case 'EDDSA':
+ case 'EdDSA':
+ if (type === 'private')
+ return (readPkcs1EdDSAPrivate(der));
+ throw (new Error(type + ' keys not supported with EdDSA'));
+ default:
+ throw (new Error('Unknown key algo: ' + alg));
+ }
+}
+
+function readPkcs1RSAPublic(der) {
+ // modulus and exponent
+ var n = readMPInt(der, 'modulus');
+ var e = readMPInt(der, 'exponent');
+
+ // now, make the key
+ var key = {
+ type: 'rsa',
+ parts: [
+ { name: 'e', data: e },
+ { name: 'n', data: n }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs1RSAPrivate(der) {
+ var version = readMPInt(der, 'version');
+ assert.strictEqual(version[0], 0);
+
+ // modulus then public exponent
+ var n = readMPInt(der, 'modulus');
+ var e = readMPInt(der, 'public exponent');
+ var d = readMPInt(der, 'private exponent');
+ var p = readMPInt(der, 'prime1');
+ var q = readMPInt(der, 'prime2');
+ var dmodp = readMPInt(der, 'exponent1');
+ var dmodq = readMPInt(der, 'exponent2');
+ var iqmp = readMPInt(der, 'iqmp');
+
+ // now, make the key
+ var key = {
+ type: 'rsa',
+ parts: [
+ { name: 'n', data: n },
+ { name: 'e', data: e },
+ { name: 'd', data: d },
+ { name: 'iqmp', data: iqmp },
+ { name: 'p', data: p },
+ { name: 'q', data: q },
+ { name: 'dmodp', data: dmodp },
+ { name: 'dmodq', data: dmodq }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function readPkcs1DSAPrivate(der) {
+ var version = readMPInt(der, 'version');
+ assert.strictEqual(version.readUInt8(0), 0);
+
+ var p = readMPInt(der, 'p');
+ var q = readMPInt(der, 'q');
+ var g = readMPInt(der, 'g');
+ var y = readMPInt(der, 'y');
+ var x = readMPInt(der, 'x');
+
+ // now, make the key
+ var key = {
+ type: 'dsa',
+ parts: [
+ { name: 'p', data: p },
+ { name: 'q', data: q },
+ { name: 'g', data: g },
+ { name: 'y', data: y },
+ { name: 'x', data: x }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function readPkcs1EdDSAPrivate(der) {
+ var version = readMPInt(der, 'version');
+ assert.strictEqual(version.readUInt8(0), 1);
+
+ // private key
+ var k = der.readString(asn1.Ber.OctetString, true);
+
+ der.readSequence(0xa0);
+ var oid = der.readOID();
+ assert.strictEqual(oid, '1.3.101.112', 'the ed25519 curve identifier');
+
+ der.readSequence(0xa1);
+ var A = utils.readBitString(der);
+
+ var key = {
+ type: 'ed25519',
+ parts: [
+ { name: 'A', data: utils.zeroPadToLength(A, 32) },
+ { name: 'k', data: k }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function readPkcs1DSAPublic(der) {
+ var y = readMPInt(der, 'y');
+ var p = readMPInt(der, 'p');
+ var q = readMPInt(der, 'q');
+ var g = readMPInt(der, 'g');
+
+ var key = {
+ type: 'dsa',
+ parts: [
+ { name: 'y', data: y },
+ { name: 'p', data: p },
+ { name: 'q', data: q },
+ { name: 'g', data: g }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs1ECDSAPublic(der) {
+ der.readSequence();
+
+ var oid = der.readOID();
+ assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey');
+
+ var curveOid = der.readOID();
+
+ var curve;
+ var curves = Object.keys(algs.curves);
+ for (var j = 0; j < curves.length; ++j) {
+ var c = curves[j];
+ var cd = algs.curves[c];
+ if (cd.pkcs8oid === curveOid) {
+ curve = c;
+ break;
+ }
+ }
+ assert.string(curve, 'a known ECDSA named curve');
+
+ var Q = der.readString(asn1.Ber.BitString, true);
+ Q = utils.ecNormalize(Q);
+
+ var key = {
+ type: 'ecdsa',
+ parts: [
+ { name: 'curve', data: Buffer.from(curve) },
+ { name: 'Q', data: Q }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs1ECDSAPrivate(der) {
+ var version = readMPInt(der, 'version');
+ assert.strictEqual(version.readUInt8(0), 1);
+
+ // private key
+ var d = der.readString(asn1.Ber.OctetString, true);
+
+ der.readSequence(0xa0);
+ var curve = readECDSACurve(der);
+ assert.string(curve, 'a known elliptic curve');
+
+ der.readSequence(0xa1);
+ var Q = der.readString(asn1.Ber.BitString, true);
+ Q = utils.ecNormalize(Q);
+
+ var key = {
+ type: 'ecdsa',
+ parts: [
+ { name: 'curve', data: Buffer.from(curve) },
+ { name: 'Q', data: Q },
+ { name: 'd', data: d }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function writePkcs1(der, key) {
+ der.startSequence();
+
+ switch (key.type) {
+ case 'rsa':
+ if (PrivateKey.isPrivateKey(key))
+ writePkcs1RSAPrivate(der, key);
+ else
+ writePkcs1RSAPublic(der, key);
+ break;
+ case 'dsa':
+ if (PrivateKey.isPrivateKey(key))
+ writePkcs1DSAPrivate(der, key);
+ else
+ writePkcs1DSAPublic(der, key);
+ break;
+ case 'ecdsa':
+ if (PrivateKey.isPrivateKey(key))
+ writePkcs1ECDSAPrivate(der, key);
+ else
+ writePkcs1ECDSAPublic(der, key);
+ break;
+ case 'ed25519':
+ if (PrivateKey.isPrivateKey(key))
+ writePkcs1EdDSAPrivate(der, key);
+ else
+ writePkcs1EdDSAPublic(der, key);
+ break;
+ default:
+ throw (new Error('Unknown key algo: ' + key.type));
+ }
+
+ der.endSequence();
+}
+
+function writePkcs1RSAPublic(der, key) {
+ der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
+}
+
+function writePkcs1RSAPrivate(der, key) {
+ var ver = Buffer.from([0]);
+ der.writeBuffer(ver, asn1.Ber.Integer);
+
+ der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.d.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
+ if (!key.part.dmodp || !key.part.dmodq)
+ utils.addRSAMissing(key);
+ der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer);
+}
+
+function writePkcs1DSAPrivate(der, key) {
+ var ver = Buffer.from([0]);
+ der.writeBuffer(ver, asn1.Ber.Integer);
+
+ der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.y.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.x.data, asn1.Ber.Integer);
+}
+
+function writePkcs1DSAPublic(der, key) {
+ der.writeBuffer(key.part.y.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
+}
+
+function writePkcs1ECDSAPublic(der, key) {
+ der.startSequence();
+
+ der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */
+ var curve = key.part.curve.data.toString();
+ var curveOid = algs.curves[curve].pkcs8oid;
+ assert.string(curveOid, 'a known ECDSA named curve');
+ der.writeOID(curveOid);
+
+ der.endSequence();
+
+ var Q = utils.ecNormalize(key.part.Q.data, true);
+ der.writeBuffer(Q, asn1.Ber.BitString);
+}
+
+function writePkcs1ECDSAPrivate(der, key) {
+ var ver = Buffer.from([1]);
+ der.writeBuffer(ver, asn1.Ber.Integer);
+
+ der.writeBuffer(key.part.d.data, asn1.Ber.OctetString);
+
+ der.startSequence(0xa0);
+ var curve = key.part.curve.data.toString();
+ var curveOid = algs.curves[curve].pkcs8oid;
+ assert.string(curveOid, 'a known ECDSA named curve');
+ der.writeOID(curveOid);
+ der.endSequence();
+
+ der.startSequence(0xa1);
+ var Q = utils.ecNormalize(key.part.Q.data, true);
+ der.writeBuffer(Q, asn1.Ber.BitString);
+ der.endSequence();
+}
+
+function writePkcs1EdDSAPrivate(der, key) {
+ var ver = Buffer.from([1]);
+ der.writeBuffer(ver, asn1.Ber.Integer);
+
+ der.writeBuffer(key.part.k.data, asn1.Ber.OctetString);
+
+ der.startSequence(0xa0);
+ der.writeOID('1.3.101.112');
+ der.endSequence();
+
+ der.startSequence(0xa1);
+ utils.writeBitString(der, key.part.A.data);
+ der.endSequence();
+}
+
+function writePkcs1EdDSAPublic(der, key) {
+ throw (new Error('Public keys are not supported for EdDSA PKCS#1'));
+}
diff --git a/node_modules/sshpk/lib/formats/pkcs8.js b/node_modules/sshpk/lib/formats/pkcs8.js
new file mode 100644
index 0000000..2ca3ca7
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/pkcs8.js
@@ -0,0 +1,631 @@
+// Copyright 2018 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ readPkcs8: readPkcs8,
+ write: write,
+ writePkcs8: writePkcs8,
+ pkcs8ToBuffer: pkcs8ToBuffer,
+
+ readECDSACurve: readECDSACurve,
+ writeECDSACurve: writeECDSACurve
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+
+function read(buf, options) {
+ return (pem.read(buf, options, 'pkcs8'));
+}
+
+function write(key, options) {
+ return (pem.write(key, options, 'pkcs8'));
+}
+
+/* Helper to read in a single mpint */
+function readMPInt(der, nm) {
+ assert.strictEqual(der.peek(), asn1.Ber.Integer,
+ nm + ' is not an Integer');
+ return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
+}
+
+function readPkcs8(alg, type, der) {
+ /* Private keys in pkcs#8 format have a weird extra int */
+ if (der.peek() === asn1.Ber.Integer) {
+ assert.strictEqual(type, 'private',
+ 'unexpected Integer at start of public key');
+ der.readString(asn1.Ber.Integer, true);
+ }
+
+ der.readSequence();
+ var next = der.offset + der.length;
+
+ var oid = der.readOID();
+ switch (oid) {
+ case '1.2.840.113549.1.1.1':
+ der._offset = next;
+ if (type === 'public')
+ return (readPkcs8RSAPublic(der));
+ else
+ return (readPkcs8RSAPrivate(der));
+ case '1.2.840.10040.4.1':
+ if (type === 'public')
+ return (readPkcs8DSAPublic(der));
+ else
+ return (readPkcs8DSAPrivate(der));
+ case '1.2.840.10045.2.1':
+ if (type === 'public')
+ return (readPkcs8ECDSAPublic(der));
+ else
+ return (readPkcs8ECDSAPrivate(der));
+ case '1.3.101.112':
+ if (type === 'public') {
+ return (readPkcs8EdDSAPublic(der));
+ } else {
+ return (readPkcs8EdDSAPrivate(der));
+ }
+ case '1.3.101.110':
+ if (type === 'public') {
+ return (readPkcs8X25519Public(der));
+ } else {
+ return (readPkcs8X25519Private(der));
+ }
+ default:
+ throw (new Error('Unknown key type OID ' + oid));
+ }
+}
+
+function readPkcs8RSAPublic(der) {
+ // bit string sequence
+ der.readSequence(asn1.Ber.BitString);
+ der.readByte();
+ der.readSequence();
+
+ // modulus
+ var n = readMPInt(der, 'modulus');
+ var e = readMPInt(der, 'exponent');
+
+ // now, make the key
+ var key = {
+ type: 'rsa',
+ source: der.originalInput,
+ parts: [
+ { name: 'e', data: e },
+ { name: 'n', data: n }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs8RSAPrivate(der) {
+ der.readSequence(asn1.Ber.OctetString);
+ der.readSequence();
+
+ var ver = readMPInt(der, 'version');
+ assert.equal(ver[0], 0x0, 'unknown RSA private key version');
+
+ // modulus then public exponent
+ var n = readMPInt(der, 'modulus');
+ var e = readMPInt(der, 'public exponent');
+ var d = readMPInt(der, 'private exponent');
+ var p = readMPInt(der, 'prime1');
+ var q = readMPInt(der, 'prime2');
+ var dmodp = readMPInt(der, 'exponent1');
+ var dmodq = readMPInt(der, 'exponent2');
+ var iqmp = readMPInt(der, 'iqmp');
+
+ // now, make the key
+ var key = {
+ type: 'rsa',
+ parts: [
+ { name: 'n', data: n },
+ { name: 'e', data: e },
+ { name: 'd', data: d },
+ { name: 'iqmp', data: iqmp },
+ { name: 'p', data: p },
+ { name: 'q', data: q },
+ { name: 'dmodp', data: dmodp },
+ { name: 'dmodq', data: dmodq }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function readPkcs8DSAPublic(der) {
+ der.readSequence();
+
+ var p = readMPInt(der, 'p');
+ var q = readMPInt(der, 'q');
+ var g = readMPInt(der, 'g');
+
+ // bit string sequence
+ der.readSequence(asn1.Ber.BitString);
+ der.readByte();
+
+ var y = readMPInt(der, 'y');
+
+ // now, make the key
+ var key = {
+ type: 'dsa',
+ parts: [
+ { name: 'p', data: p },
+ { name: 'q', data: q },
+ { name: 'g', data: g },
+ { name: 'y', data: y }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs8DSAPrivate(der) {
+ der.readSequence();
+
+ var p = readMPInt(der, 'p');
+ var q = readMPInt(der, 'q');
+ var g = readMPInt(der, 'g');
+
+ der.readSequence(asn1.Ber.OctetString);
+ var x = readMPInt(der, 'x');
+
+ /* The pkcs#8 format does not include the public key */
+ var y = utils.calculateDSAPublic(g, p, x);
+
+ var key = {
+ type: 'dsa',
+ parts: [
+ { name: 'p', data: p },
+ { name: 'q', data: q },
+ { name: 'g', data: g },
+ { name: 'y', data: y },
+ { name: 'x', data: x }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function readECDSACurve(der) {
+ var curveName, curveNames;
+ var j, c, cd;
+
+ if (der.peek() === asn1.Ber.OID) {
+ var oid = der.readOID();
+
+ curveNames = Object.keys(algs.curves);
+ for (j = 0; j < curveNames.length; ++j) {
+ c = curveNames[j];
+ cd = algs.curves[c];
+ if (cd.pkcs8oid === oid) {
+ curveName = c;
+ break;
+ }
+ }
+
+ } else {
+ // ECParameters sequence
+ der.readSequence();
+ var version = der.readString(asn1.Ber.Integer, true);
+ assert.strictEqual(version[0], 1, 'ECDSA key not version 1');
+
+ var curve = {};
+
+ // FieldID sequence
+ der.readSequence();
+ var fieldTypeOid = der.readOID();
+ assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1',
+ 'ECDSA key is not from a prime-field');
+ var p = curve.p = utils.mpNormalize(
+ der.readString(asn1.Ber.Integer, true));
+ /*
+ * p always starts with a 1 bit, so count the zeros to get its
+ * real size.
+ */
+ curve.size = p.length * 8 - utils.countZeros(p);
+
+ // Curve sequence
+ der.readSequence();
+ curve.a = utils.mpNormalize(
+ der.readString(asn1.Ber.OctetString, true));
+ curve.b = utils.mpNormalize(
+ der.readString(asn1.Ber.OctetString, true));
+ if (der.peek() === asn1.Ber.BitString)
+ curve.s = der.readString(asn1.Ber.BitString, true);
+
+ // Combined Gx and Gy
+ curve.G = der.readString(asn1.Ber.OctetString, true);
+ assert.strictEqual(curve.G[0], 0x4,
+ 'uncompressed G is required');
+
+ curve.n = utils.mpNormalize(
+ der.readString(asn1.Ber.Integer, true));
+ curve.h = utils.mpNormalize(
+ der.readString(asn1.Ber.Integer, true));
+ assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' +
+ 'required');
+
+ curveNames = Object.keys(algs.curves);
+ var ks = Object.keys(curve);
+ for (j = 0; j < curveNames.length; ++j) {
+ c = curveNames[j];
+ cd = algs.curves[c];
+ var equal = true;
+ for (var i = 0; i < ks.length; ++i) {
+ var k = ks[i];
+ if (cd[k] === undefined)
+ continue;
+ if (typeof (cd[k]) === 'object' &&
+ cd[k].equals !== undefined) {
+ if (!cd[k].equals(curve[k])) {
+ equal = false;
+ break;
+ }
+ } else if (Buffer.isBuffer(cd[k])) {
+ if (cd[k].toString('binary')
+ !== curve[k].toString('binary')) {
+ equal = false;
+ break;
+ }
+ } else {
+ if (cd[k] !== curve[k]) {
+ equal = false;
+ break;
+ }
+ }
+ }
+ if (equal) {
+ curveName = c;
+ break;
+ }
+ }
+ }
+ return (curveName);
+}
+
+function readPkcs8ECDSAPrivate(der) {
+ var curveName = readECDSACurve(der);
+ assert.string(curveName, 'a known elliptic curve');
+
+ der.readSequence(asn1.Ber.OctetString);
+ der.readSequence();
+
+ var version = readMPInt(der, 'version');
+ assert.equal(version[0], 1, 'unknown version of ECDSA key');
+
+ var d = der.readString(asn1.Ber.OctetString, true);
+ var Q;
+
+ if (der.peek() == 0xa0) {
+ der.readSequence(0xa0);
+ der._offset += der.length;
+ }
+ if (der.peek() == 0xa1) {
+ der.readSequence(0xa1);
+ Q = der.readString(asn1.Ber.BitString, true);
+ Q = utils.ecNormalize(Q);
+ }
+
+ if (Q === undefined) {
+ var pub = utils.publicFromPrivateECDSA(curveName, d);
+ Q = pub.part.Q.data;
+ }
+
+ var key = {
+ type: 'ecdsa',
+ parts: [
+ { name: 'curve', data: Buffer.from(curveName) },
+ { name: 'Q', data: Q },
+ { name: 'd', data: d }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function readPkcs8ECDSAPublic(der) {
+ var curveName = readECDSACurve(der);
+ assert.string(curveName, 'a known elliptic curve');
+
+ var Q = der.readString(asn1.Ber.BitString, true);
+ Q = utils.ecNormalize(Q);
+
+ var key = {
+ type: 'ecdsa',
+ parts: [
+ { name: 'curve', data: Buffer.from(curveName) },
+ { name: 'Q', data: Q }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs8EdDSAPublic(der) {
+ if (der.peek() === 0x00)
+ der.readByte();
+
+ var A = utils.readBitString(der);
+
+ var key = {
+ type: 'ed25519',
+ parts: [
+ { name: 'A', data: utils.zeroPadToLength(A, 32) }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs8X25519Public(der) {
+ var A = utils.readBitString(der);
+
+ var key = {
+ type: 'curve25519',
+ parts: [
+ { name: 'A', data: utils.zeroPadToLength(A, 32) }
+ ]
+ };
+
+ return (new Key(key));
+}
+
+function readPkcs8EdDSAPrivate(der) {
+ if (der.peek() === 0x00)
+ der.readByte();
+
+ der.readSequence(asn1.Ber.OctetString);
+ var k = der.readString(asn1.Ber.OctetString, true);
+ k = utils.zeroPadToLength(k, 32);
+
+ var A;
+ if (der.peek() === asn1.Ber.BitString) {
+ A = utils.readBitString(der);
+ A = utils.zeroPadToLength(A, 32);
+ } else {
+ A = utils.calculateED25519Public(k);
+ }
+
+ var key = {
+ type: 'ed25519',
+ parts: [
+ { name: 'A', data: utils.zeroPadToLength(A, 32) },
+ { name: 'k', data: utils.zeroPadToLength(k, 32) }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function readPkcs8X25519Private(der) {
+ if (der.peek() === 0x00)
+ der.readByte();
+
+ der.readSequence(asn1.Ber.OctetString);
+ var k = der.readString(asn1.Ber.OctetString, true);
+ k = utils.zeroPadToLength(k, 32);
+
+ var A = utils.calculateX25519Public(k);
+
+ var key = {
+ type: 'curve25519',
+ parts: [
+ { name: 'A', data: utils.zeroPadToLength(A, 32) },
+ { name: 'k', data: utils.zeroPadToLength(k, 32) }
+ ]
+ };
+
+ return (new PrivateKey(key));
+}
+
+function pkcs8ToBuffer(key) {
+ var der = new asn1.BerWriter();
+ writePkcs8(der, key);
+ return (der.buffer);
+}
+
+function writePkcs8(der, key) {
+ der.startSequence();
+
+ if (PrivateKey.isPrivateKey(key)) {
+ var sillyInt = Buffer.from([0]);
+ der.writeBuffer(sillyInt, asn1.Ber.Integer);
+ }
+
+ der.startSequence();
+ switch (key.type) {
+ case 'rsa':
+ der.writeOID('1.2.840.113549.1.1.1');
+ if (PrivateKey.isPrivateKey(key))
+ writePkcs8RSAPrivate(key, der);
+ else
+ writePkcs8RSAPublic(key, der);
+ break;
+ case 'dsa':
+ der.writeOID('1.2.840.10040.4.1');
+ if (PrivateKey.isPrivateKey(key))
+ writePkcs8DSAPrivate(key, der);
+ else
+ writePkcs8DSAPublic(key, der);
+ break;
+ case 'ecdsa':
+ der.writeOID('1.2.840.10045.2.1');
+ if (PrivateKey.isPrivateKey(key))
+ writePkcs8ECDSAPrivate(key, der);
+ else
+ writePkcs8ECDSAPublic(key, der);
+ break;
+ case 'ed25519':
+ der.writeOID('1.3.101.112');
+ if (PrivateKey.isPrivateKey(key))
+ throw (new Error('Ed25519 private keys in pkcs8 ' +
+ 'format are not supported'));
+ writePkcs8EdDSAPublic(key, der);
+ break;
+ default:
+ throw (new Error('Unsupported key type: ' + key.type));
+ }
+
+ der.endSequence();
+}
+
+function writePkcs8RSAPrivate(key, der) {
+ der.writeNull();
+ der.endSequence();
+
+ der.startSequence(asn1.Ber.OctetString);
+ der.startSequence();
+
+ var version = Buffer.from([0]);
+ der.writeBuffer(version, asn1.Ber.Integer);
+
+ der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.d.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
+ if (!key.part.dmodp || !key.part.dmodq)
+ utils.addRSAMissing(key);
+ der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer);
+
+ der.endSequence();
+ der.endSequence();
+}
+
+function writePkcs8RSAPublic(key, der) {
+ der.writeNull();
+ der.endSequence();
+
+ der.startSequence(asn1.Ber.BitString);
+ der.writeByte(0x00);
+
+ der.startSequence();
+ der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
+ der.endSequence();
+
+ der.endSequence();
+}
+
+function writePkcs8DSAPrivate(key, der) {
+ der.startSequence();
+ der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
+ der.endSequence();
+
+ der.endSequence();
+
+ der.startSequence(asn1.Ber.OctetString);
+ der.writeBuffer(key.part.x.data, asn1.Ber.Integer);
+ der.endSequence();
+}
+
+function writePkcs8DSAPublic(key, der) {
+ der.startSequence();
+ der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
+ der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
+ der.endSequence();
+ der.endSequence();
+
+ der.startSequence(asn1.Ber.BitString);
+ der.writeByte(0x00);
+ der.writeBuffer(key.part.y.data, asn1.Ber.Integer);
+ der.endSequence();
+}
+
+function writeECDSACurve(key, der) {
+ var curve = algs.curves[key.curve];
+ if (curve.pkcs8oid) {
+ /* This one has a name in pkcs#8, so just write the oid */
+ der.writeOID(curve.pkcs8oid);
+
+ } else {
+ // ECParameters sequence
+ der.startSequence();
+
+ var version = Buffer.from([1]);
+ der.writeBuffer(version, asn1.Ber.Integer);
+
+ // FieldID sequence
+ der.startSequence();
+ der.writeOID('1.2.840.10045.1.1'); // prime-field
+ der.writeBuffer(curve.p, asn1.Ber.Integer);
+ der.endSequence();
+
+ // Curve sequence
+ der.startSequence();
+ var a = curve.p;
+ if (a[0] === 0x0)
+ a = a.slice(1);
+ der.writeBuffer(a, asn1.Ber.OctetString);
+ der.writeBuffer(curve.b, asn1.Ber.OctetString);
+ der.writeBuffer(curve.s, asn1.Ber.BitString);
+ der.endSequence();
+
+ der.writeBuffer(curve.G, asn1.Ber.OctetString);
+ der.writeBuffer(curve.n, asn1.Ber.Integer);
+ var h = curve.h;
+ if (!h) {
+ h = Buffer.from([1]);
+ }
+ der.writeBuffer(h, asn1.Ber.Integer);
+
+ // ECParameters
+ der.endSequence();
+ }
+}
+
+function writePkcs8ECDSAPublic(key, der) {
+ writeECDSACurve(key, der);
+ der.endSequence();
+
+ var Q = utils.ecNormalize(key.part.Q.data, true);
+ der.writeBuffer(Q, asn1.Ber.BitString);
+}
+
+function writePkcs8ECDSAPrivate(key, der) {
+ writeECDSACurve(key, der);
+ der.endSequence();
+
+ der.startSequence(asn1.Ber.OctetString);
+ der.startSequence();
+
+ var version = Buffer.from([1]);
+ der.writeBuffer(version, asn1.Ber.Integer);
+
+ der.writeBuffer(key.part.d.data, asn1.Ber.OctetString);
+
+ der.startSequence(0xa1);
+ var Q = utils.ecNormalize(key.part.Q.data, true);
+ der.writeBuffer(Q, asn1.Ber.BitString);
+ der.endSequence();
+
+ der.endSequence();
+ der.endSequence();
+}
+
+function writePkcs8EdDSAPublic(key, der) {
+ der.endSequence();
+
+ utils.writeBitString(der, key.part.A.data);
+}
+
+function writePkcs8EdDSAPrivate(key, der) {
+ der.endSequence();
+
+ var k = utils.mpNormalize(key.part.k.data, true);
+ der.startSequence(asn1.Ber.OctetString);
+ der.writeBuffer(k, asn1.Ber.OctetString);
+ der.endSequence();
+}
diff --git a/node_modules/sshpk/lib/formats/putty.js b/node_modules/sshpk/lib/formats/putty.js
new file mode 100644
index 0000000..344419f
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/putty.js
@@ -0,0 +1,99 @@
+// Copyright 2018 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ write: write
+};
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var rfc4253 = require('./rfc4253');
+var Key = require('../key');
+
+var errors = require('../errors');
+
+function read(buf, options) {
+ var lines = buf.toString('ascii').split(/[\r\n]+/);
+ var found = false;
+ var parts;
+ var si = 0;
+ while (si < lines.length) {
+ parts = splitHeader(lines[si++]);
+ if (parts &&
+ parts[0].toLowerCase() === 'putty-user-key-file-2') {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ throw (new Error('No PuTTY format first line found'));
+ }
+ var alg = parts[1];
+
+ parts = splitHeader(lines[si++]);
+ assert.equal(parts[0].toLowerCase(), 'encryption');
+
+ parts = splitHeader(lines[si++]);
+ assert.equal(parts[0].toLowerCase(), 'comment');
+ var comment = parts[1];
+
+ parts = splitHeader(lines[si++]);
+ assert.equal(parts[0].toLowerCase(), 'public-lines');
+ var publicLines = parseInt(parts[1], 10);
+ if (!isFinite(publicLines) || publicLines < 0 ||
+ publicLines > lines.length) {
+ throw (new Error('Invalid public-lines count'));
+ }
+
+ var publicBuf = Buffer.from(
+ lines.slice(si, si + publicLines).join(''), 'base64');
+ var keyType = rfc4253.algToKeyType(alg);
+ var key = rfc4253.read(publicBuf);
+ if (key.type !== keyType) {
+ throw (new Error('Outer key algorithm mismatch'));
+ }
+ key.comment = comment;
+ return (key);
+}
+
+function splitHeader(line) {
+ var idx = line.indexOf(':');
+ if (idx === -1)
+ return (null);
+ var header = line.slice(0, idx);
+ ++idx;
+ while (line[idx] === ' ')
+ ++idx;
+ var rest = line.slice(idx);
+ return ([header, rest]);
+}
+
+function write(key, options) {
+ assert.object(key);
+ if (!Key.isKey(key))
+ throw (new Error('Must be a public key'));
+
+ var alg = rfc4253.keyTypeToAlg(key);
+ var buf = rfc4253.write(key);
+ var comment = key.comment || '';
+
+ var b64 = buf.toString('base64');
+ var lines = wrap(b64, 64);
+
+ lines.unshift('Public-Lines: ' + lines.length);
+ lines.unshift('Comment: ' + comment);
+ lines.unshift('Encryption: none');
+ lines.unshift('PuTTY-User-Key-File-2: ' + alg);
+
+ return (Buffer.from(lines.join('\n') + '\n'));
+}
+
+function wrap(txt, len) {
+ var lines = [];
+ var pos = 0;
+ while (pos < txt.length) {
+ lines.push(txt.slice(pos, pos + 64));
+ pos += 64;
+ }
+ return (lines);
+}
diff --git a/node_modules/sshpk/lib/formats/rfc4253.js b/node_modules/sshpk/lib/formats/rfc4253.js
new file mode 100644
index 0000000..52fddcb
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/rfc4253.js
@@ -0,0 +1,166 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = {
+ read: read.bind(undefined, false, undefined),
+ readType: read.bind(undefined, false),
+ write: write,
+ /* semi-private api, used by sshpk-agent */
+ readPartial: read.bind(undefined, true),
+
+ /* shared with ssh format */
+ readInternal: read,
+ keyTypeToAlg: keyTypeToAlg,
+ algToKeyType: algToKeyType
+};
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var SSHBuffer = require('../ssh-buffer');
+
+function algToKeyType(alg) {
+ assert.string(alg);
+ if (alg === 'ssh-dss')
+ return ('dsa');
+ else if (alg === 'ssh-rsa')
+ return ('rsa');
+ else if (alg === 'ssh-ed25519')
+ return ('ed25519');
+ else if (alg === 'ssh-curve25519')
+ return ('curve25519');
+ else if (alg.match(/^ecdsa-sha2-/))
+ return ('ecdsa');
+ else
+ throw (new Error('Unknown algorithm ' + alg));
+}
+
+function keyTypeToAlg(key) {
+ assert.object(key);
+ if (key.type === 'dsa')
+ return ('ssh-dss');
+ else if (key.type === 'rsa')
+ return ('ssh-rsa');
+ else if (key.type === 'ed25519')
+ return ('ssh-ed25519');
+ else if (key.type === 'curve25519')
+ return ('ssh-curve25519');
+ else if (key.type === 'ecdsa')
+ return ('ecdsa-sha2-' + key.part.curve.data.toString());
+ else
+ throw (new Error('Unknown key type ' + key.type));
+}
+
+function read(partial, type, buf, options) {
+ if (typeof (buf) === 'string')
+ buf = Buffer.from(buf);
+ assert.buffer(buf, 'buf');
+
+ var key = {};
+
+ var parts = key.parts = [];
+ var sshbuf = new SSHBuffer({buffer: buf});
+
+ var alg = sshbuf.readString();
+ assert.ok(!sshbuf.atEnd(), 'key must have at least one part');
+
+ key.type = algToKeyType(alg);
+
+ var partCount = algs.info[key.type].parts.length;
+ if (type && type === 'private')
+ partCount = algs.privInfo[key.type].parts.length;
+
+ while (!sshbuf.atEnd() && parts.length < partCount)
+ parts.push(sshbuf.readPart());
+ while (!partial && !sshbuf.atEnd())
+ parts.push(sshbuf.readPart());
+
+ assert.ok(parts.length >= 1,
+ 'key must have at least one part');
+ assert.ok(partial || sshbuf.atEnd(),
+ 'leftover bytes at end of key');
+
+ var Constructor = Key;
+ var algInfo = algs.info[key.type];
+ if (type === 'private' || algInfo.parts.length !== parts.length) {
+ algInfo = algs.privInfo[key.type];
+ Constructor = PrivateKey;
+ }
+ assert.strictEqual(algInfo.parts.length, parts.length);
+
+ if (key.type === 'ecdsa') {
+ var res = /^ecdsa-sha2-(.+)$/.exec(alg);
+ assert.ok(res !== null);
+ assert.strictEqual(res[1], parts[0].data.toString());
+ }
+
+ var normalized = true;
+ for (var i = 0; i < algInfo.parts.length; ++i) {
+ var p = parts[i];
+ p.name = algInfo.parts[i];
+ /*
+ * OpenSSH stores ed25519 "private" keys as seed + public key
+ * concat'd together (k followed by A). We want to keep them
+ * separate for other formats that don't do this.
+ */
+ if (key.type === 'ed25519' && p.name === 'k')
+ p.data = p.data.slice(0, 32);
+
+ if (p.name !== 'curve' && algInfo.normalize !== false) {
+ var nd;
+ if (key.type === 'ed25519') {
+ nd = utils.zeroPadToLength(p.data, 32);
+ } else {
+ nd = utils.mpNormalize(p.data);
+ }
+ if (nd.toString('binary') !==
+ p.data.toString('binary')) {
+ p.data = nd;
+ normalized = false;
+ }
+ }
+ }
+
+ if (normalized)
+ key._rfc4253Cache = sshbuf.toBuffer();
+
+ if (partial && typeof (partial) === 'object') {
+ partial.remainder = sshbuf.remainder();
+ partial.consumed = sshbuf._offset;
+ }
+
+ return (new Constructor(key));
+}
+
+function write(key, options) {
+ assert.object(key);
+
+ var alg = keyTypeToAlg(key);
+ var i;
+
+ var algInfo = algs.info[key.type];
+ if (PrivateKey.isPrivateKey(key))
+ algInfo = algs.privInfo[key.type];
+ var parts = algInfo.parts;
+
+ var buf = new SSHBuffer({});
+
+ buf.writeString(alg);
+
+ for (i = 0; i < parts.length; ++i) {
+ var data = key.part[parts[i]].data;
+ if (algInfo.normalize !== false) {
+ if (key.type === 'ed25519')
+ data = utils.zeroPadToLength(data, 32);
+ else
+ data = utils.mpNormalize(data);
+ }
+ if (key.type === 'ed25519' && parts[i] === 'k')
+ data = Buffer.concat([data, key.part.A.data]);
+ buf.writeBuffer(data);
+ }
+
+ return (buf.toBuffer());
+}
diff --git a/node_modules/sshpk/lib/formats/ssh-private.js b/node_modules/sshpk/lib/formats/ssh-private.js
new file mode 100644
index 0000000..5e7eed8
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/ssh-private.js
@@ -0,0 +1,262 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ readSSHPrivate: readSSHPrivate,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var utils = require('../utils');
+var crypto = require('crypto');
+
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+var rfc4253 = require('./rfc4253');
+var SSHBuffer = require('../ssh-buffer');
+var errors = require('../errors');
+
+var bcrypt;
+
+function read(buf, options) {
+ return (pem.read(buf, options));
+}
+
+var MAGIC = 'openssh-key-v1';
+
+function readSSHPrivate(type, buf, options) {
+ buf = new SSHBuffer({buffer: buf});
+
+ var magic = buf.readCString();
+ assert.strictEqual(magic, MAGIC, 'bad magic string');
+
+ var cipher = buf.readString();
+ var kdf = buf.readString();
+ var kdfOpts = buf.readBuffer();
+
+ var nkeys = buf.readInt();
+ if (nkeys !== 1) {
+ throw (new Error('OpenSSH-format key file contains ' +
+ 'multiple keys: this is unsupported.'));
+ }
+
+ var pubKey = buf.readBuffer();
+
+ if (type === 'public') {
+ assert.ok(buf.atEnd(), 'excess bytes left after key');
+ return (rfc4253.read(pubKey));
+ }
+
+ var privKeyBlob = buf.readBuffer();
+ assert.ok(buf.atEnd(), 'excess bytes left after key');
+
+ var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts });
+ switch (kdf) {
+ case 'none':
+ if (cipher !== 'none') {
+ throw (new Error('OpenSSH-format key uses KDF "none" ' +
+ 'but specifies a cipher other than "none"'));
+ }
+ break;
+ case 'bcrypt':
+ var salt = kdfOptsBuf.readBuffer();
+ var rounds = kdfOptsBuf.readInt();
+ var cinf = utils.opensshCipherInfo(cipher);
+ if (bcrypt === undefined) {
+ bcrypt = require('bcrypt-pbkdf');
+ }
+
+ if (typeof (options.passphrase) === 'string') {
+ options.passphrase = Buffer.from(options.passphrase,
+ 'utf-8');
+ }
+ if (!Buffer.isBuffer(options.passphrase)) {
+ throw (new errors.KeyEncryptedError(
+ options.filename, 'OpenSSH'));
+ }
+
+ var pass = new Uint8Array(options.passphrase);
+ var salti = new Uint8Array(salt);
+ /* Use the pbkdf to derive both the key and the IV. */
+ var out = new Uint8Array(cinf.keySize + cinf.blockSize);
+ var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length,
+ out, out.length, rounds);
+ if (res !== 0) {
+ throw (new Error('bcrypt_pbkdf function returned ' +
+ 'failure, parameters invalid'));
+ }
+ out = Buffer.from(out);
+ var ckey = out.slice(0, cinf.keySize);
+ var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
+ var cipherStream = crypto.createDecipheriv(cinf.opensslName,
+ ckey, iv);
+ cipherStream.setAutoPadding(false);
+ var chunk, chunks = [];
+ cipherStream.once('error', function (e) {
+ if (e.toString().indexOf('bad decrypt') !== -1) {
+ throw (new Error('Incorrect passphrase ' +
+ 'supplied, could not decrypt key'));
+ }
+ throw (e);
+ });
+ cipherStream.write(privKeyBlob);
+ cipherStream.end();
+ while ((chunk = cipherStream.read()) !== null)
+ chunks.push(chunk);
+ privKeyBlob = Buffer.concat(chunks);
+ break;
+ default:
+ throw (new Error(
+ 'OpenSSH-format key uses unknown KDF "' + kdf + '"'));
+ }
+
+ buf = new SSHBuffer({buffer: privKeyBlob});
+
+ var checkInt1 = buf.readInt();
+ var checkInt2 = buf.readInt();
+ if (checkInt1 !== checkInt2) {
+ throw (new Error('Incorrect passphrase supplied, could not ' +
+ 'decrypt key'));
+ }
+
+ var ret = {};
+ var key = rfc4253.readInternal(ret, 'private', buf.remainder());
+
+ buf.skip(ret.consumed);
+
+ var comment = buf.readString();
+ key.comment = comment;
+
+ return (key);
+}
+
+function write(key, options) {
+ var pubKey;
+ if (PrivateKey.isPrivateKey(key))
+ pubKey = key.toPublic();
+ else
+ pubKey = key;
+
+ var cipher = 'none';
+ var kdf = 'none';
+ var kdfopts = Buffer.alloc(0);
+ var cinf = { blockSize: 8 };
+ var passphrase;
+ if (options !== undefined) {
+ passphrase = options.passphrase;
+ if (typeof (passphrase) === 'string')
+ passphrase = Buffer.from(passphrase, 'utf-8');
+ if (passphrase !== undefined) {
+ assert.buffer(passphrase, 'options.passphrase');
+ assert.optionalString(options.cipher, 'options.cipher');
+ cipher = options.cipher;
+ if (cipher === undefined)
+ cipher = 'aes128-ctr';
+ cinf = utils.opensshCipherInfo(cipher);
+ kdf = 'bcrypt';
+ }
+ }
+
+ var privBuf;
+ if (PrivateKey.isPrivateKey(key)) {
+ privBuf = new SSHBuffer({});
+ var checkInt = crypto.randomBytes(4).readUInt32BE(0);
+ privBuf.writeInt(checkInt);
+ privBuf.writeInt(checkInt);
+ privBuf.write(key.toBuffer('rfc4253'));
+ privBuf.writeString(key.comment || '');
+
+ var n = 1;
+ while (privBuf._offset % cinf.blockSize !== 0)
+ privBuf.writeChar(n++);
+ privBuf = privBuf.toBuffer();
+ }
+
+ switch (kdf) {
+ case 'none':
+ break;
+ case 'bcrypt':
+ var salt = crypto.randomBytes(16);
+ var rounds = 16;
+ var kdfssh = new SSHBuffer({});
+ kdfssh.writeBuffer(salt);
+ kdfssh.writeInt(rounds);
+ kdfopts = kdfssh.toBuffer();
+
+ if (bcrypt === undefined) {
+ bcrypt = require('bcrypt-pbkdf');
+ }
+ var pass = new Uint8Array(passphrase);
+ var salti = new Uint8Array(salt);
+ /* Use the pbkdf to derive both the key and the IV. */
+ var out = new Uint8Array(cinf.keySize + cinf.blockSize);
+ var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length,
+ out, out.length, rounds);
+ if (res !== 0) {
+ throw (new Error('bcrypt_pbkdf function returned ' +
+ 'failure, parameters invalid'));
+ }
+ out = Buffer.from(out);
+ var ckey = out.slice(0, cinf.keySize);
+ var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
+
+ var cipherStream = crypto.createCipheriv(cinf.opensslName,
+ ckey, iv);
+ cipherStream.setAutoPadding(false);
+ var chunk, chunks = [];
+ cipherStream.once('error', function (e) {
+ throw (e);
+ });
+ cipherStream.write(privBuf);
+ cipherStream.end();
+ while ((chunk = cipherStream.read()) !== null)
+ chunks.push(chunk);
+ privBuf = Buffer.concat(chunks);
+ break;
+ default:
+ throw (new Error('Unsupported kdf ' + kdf));
+ }
+
+ var buf = new SSHBuffer({});
+
+ buf.writeCString(MAGIC);
+ buf.writeString(cipher); /* cipher */
+ buf.writeString(kdf); /* kdf */
+ buf.writeBuffer(kdfopts); /* kdfoptions */
+
+ buf.writeInt(1); /* nkeys */
+ buf.writeBuffer(pubKey.toBuffer('rfc4253'));
+
+ if (privBuf)
+ buf.writeBuffer(privBuf);
+
+ buf = buf.toBuffer();
+
+ var header;
+ if (PrivateKey.isPrivateKey(key))
+ header = 'OPENSSH PRIVATE KEY';
+ else
+ header = 'OPENSSH PUBLIC KEY';
+
+ var tmp = buf.toString('base64');
+ var len = tmp.length + (tmp.length / 70) +
+ 18 + 16 + header.length*2 + 10;
+ buf = Buffer.alloc(len);
+ var o = 0;
+ o += buf.write('-----BEGIN ' + header + '-----\n', o);
+ for (var i = 0; i < tmp.length; ) {
+ var limit = i + 70;
+ if (limit > tmp.length)
+ limit = tmp.length;
+ o += buf.write(tmp.slice(i, limit), o);
+ buf[o++] = 10;
+ i = limit;
+ }
+ o += buf.write('-----END ' + header + '-----\n', o);
+
+ return (buf.slice(0, o));
+}
diff --git a/node_modules/sshpk/lib/formats/ssh.js b/node_modules/sshpk/lib/formats/ssh.js
new file mode 100644
index 0000000..c8e9c93
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/ssh.js
@@ -0,0 +1,115 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ write: write
+};
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var rfc4253 = require('./rfc4253');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+
+var sshpriv = require('./ssh-private');
+
+/*JSSTYLED*/
+var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/;
+/*JSSTYLED*/
+var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/;
+
+function read(buf, options) {
+ if (typeof (buf) !== 'string') {
+ assert.buffer(buf, 'buf');
+ buf = buf.toString('ascii');
+ }
+
+ var trimmed = buf.trim().replace(/[\\\r]/g, '');
+ var m = trimmed.match(SSHKEY_RE);
+ if (!m)
+ m = trimmed.match(SSHKEY_RE2);
+ assert.ok(m, 'key must match regex');
+
+ var type = rfc4253.algToKeyType(m[1]);
+ var kbuf = Buffer.from(m[2], 'base64');
+
+ /*
+ * This is a bit tricky. If we managed to parse the key and locate the
+ * key comment with the regex, then do a non-partial read and assert
+ * that we have consumed all bytes. If we couldn't locate the key
+ * comment, though, there may be whitespace shenanigans going on that
+ * have conjoined the comment to the rest of the key. We do a partial
+ * read in this case to try to make the best out of a sorry situation.
+ */
+ var key;
+ var ret = {};
+ if (m[4]) {
+ try {
+ key = rfc4253.read(kbuf);
+
+ } catch (e) {
+ m = trimmed.match(SSHKEY_RE2);
+ assert.ok(m, 'key must match regex');
+ kbuf = Buffer.from(m[2], 'base64');
+ key = rfc4253.readInternal(ret, 'public', kbuf);
+ }
+ } else {
+ key = rfc4253.readInternal(ret, 'public', kbuf);
+ }
+
+ assert.strictEqual(type, key.type);
+
+ if (m[4] && m[4].length > 0) {
+ key.comment = m[4];
+
+ } else if (ret.consumed) {
+ /*
+ * Now the magic: trying to recover the key comment when it's
+ * gotten conjoined to the key or otherwise shenanigan'd.
+ *
+ * Work out how much base64 we used, then drop all non-base64
+ * chars from the beginning up to this point in the the string.
+ * Then offset in this and try to make up for missing = chars.
+ */
+ var data = m[2] + (m[3] ? m[3] : '');
+ var realOffset = Math.ceil(ret.consumed / 3) * 4;
+ data = data.slice(0, realOffset - 2). /*JSSTYLED*/
+ replace(/[^a-zA-Z0-9+\/=]/g, '') +
+ data.slice(realOffset - 2);
+
+ var padding = ret.consumed % 3;
+ if (padding > 0 &&
+ data.slice(realOffset - 1, realOffset) !== '=')
+ realOffset--;
+ while (data.slice(realOffset, realOffset + 1) === '=')
+ realOffset++;
+
+ /* Finally, grab what we think is the comment & clean it up. */
+ var trailer = data.slice(realOffset);
+ trailer = trailer.replace(/[\r\n]/g, ' ').
+ replace(/^\s+/, '');
+ if (trailer.match(/^[a-zA-Z0-9]/))
+ key.comment = trailer;
+ }
+
+ return (key);
+}
+
+function write(key, options) {
+ assert.object(key);
+ if (!Key.isKey(key))
+ throw (new Error('Must be a public key'));
+
+ var parts = [];
+ var alg = rfc4253.keyTypeToAlg(key);
+ parts.push(alg);
+
+ var buf = rfc4253.write(key);
+ parts.push(buf.toString('base64'));
+
+ if (key.comment)
+ parts.push(key.comment);
+
+ return (Buffer.from(parts.join(' ')));
+}
diff --git a/node_modules/sshpk/lib/formats/x509-pem.js b/node_modules/sshpk/lib/formats/x509-pem.js
new file mode 100644
index 0000000..3155ef0
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/x509-pem.js
@@ -0,0 +1,88 @@
+// Copyright 2016 Joyent, Inc.
+
+var x509 = require('./x509');
+
+module.exports = {
+ read: read,
+ verify: x509.verify,
+ sign: x509.sign,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+var Identity = require('../identity');
+var Signature = require('../signature');
+var Certificate = require('../certificate');
+
+function read(buf, options) {
+ if (typeof (buf) !== 'string') {
+ assert.buffer(buf, 'buf');
+ buf = buf.toString('ascii');
+ }
+
+ var lines = buf.trim().split(/[\r\n]+/g);
+
+ var m;
+ var si = -1;
+ while (!m && si < lines.length) {
+ m = lines[++si].match(/*JSSTYLED*/
+ /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);
+ }
+ assert.ok(m, 'invalid PEM header');
+
+ var m2;
+ var ei = lines.length;
+ while (!m2 && ei > 0) {
+ m2 = lines[--ei].match(/*JSSTYLED*/
+ /[-]+[ ]*END CERTIFICATE[ ]*[-]+/);
+ }
+ assert.ok(m2, 'invalid PEM footer');
+
+ lines = lines.slice(si, ei + 1);
+
+ var headers = {};
+ while (true) {
+ lines = lines.slice(1);
+ m = lines[0].match(/*JSSTYLED*/
+ /^([A-Za-z0-9-]+): (.+)$/);
+ if (!m)
+ break;
+ headers[m[1].toLowerCase()] = m[2];
+ }
+
+ /* Chop off the first and last lines */
+ lines = lines.slice(0, -1).join('');
+ buf = Buffer.from(lines, 'base64');
+
+ return (x509.read(buf, options));
+}
+
+function write(cert, options) {
+ var dbuf = x509.write(cert, options);
+
+ var header = 'CERTIFICATE';
+ var tmp = dbuf.toString('base64');
+ var len = tmp.length + (tmp.length / 64) +
+ 18 + 16 + header.length*2 + 10;
+ var buf = Buffer.alloc(len);
+ var o = 0;
+ o += buf.write('-----BEGIN ' + header + '-----\n', o);
+ for (var i = 0; i < tmp.length; ) {
+ var limit = i + 64;
+ if (limit > tmp.length)
+ limit = tmp.length;
+ o += buf.write(tmp.slice(i, limit), o);
+ buf[o++] = 10;
+ i = limit;
+ }
+ o += buf.write('-----END ' + header + '-----\n', o);
+
+ return (buf.slice(0, o));
+}
diff --git a/node_modules/sshpk/lib/formats/x509.js b/node_modules/sshpk/lib/formats/x509.js
new file mode 100644
index 0000000..0144c44
--- /dev/null
+++ b/node_modules/sshpk/lib/formats/x509.js
@@ -0,0 +1,752 @@
+// Copyright 2017 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ verify: verify,
+ sign: sign,
+ signAsync: signAsync,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+var Identity = require('../identity');
+var Signature = require('../signature');
+var Certificate = require('../certificate');
+var pkcs8 = require('./pkcs8');
+
+/*
+ * This file is based on RFC5280 (X.509).
+ */
+
+/* Helper to read in a single mpint */
+function readMPInt(der, nm) {
+ assert.strictEqual(der.peek(), asn1.Ber.Integer,
+ nm + ' is not an Integer');
+ return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
+}
+
+function verify(cert, key) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ var algParts = sig.algo.split('-');
+ if (algParts[0] !== key.type)
+ return (false);
+
+ var blob = sig.cache;
+ if (blob === undefined) {
+ var der = new asn1.BerWriter();
+ writeTBSCert(cert, der);
+ blob = der.buffer;
+ }
+
+ var verifier = key.createVerify(algParts[1]);
+ verifier.write(blob);
+ return (verifier.verify(sig.signature));
+}
+
+function Local(i) {
+ return (asn1.Ber.Context | asn1.Ber.Constructor | i);
+}
+
+function Context(i) {
+ return (asn1.Ber.Context | i);
+}
+
+var SIGN_ALGS = {
+ 'rsa-md5': '1.2.840.113549.1.1.4',
+ 'rsa-sha1': '1.2.840.113549.1.1.5',
+ 'rsa-sha256': '1.2.840.113549.1.1.11',
+ 'rsa-sha384': '1.2.840.113549.1.1.12',
+ 'rsa-sha512': '1.2.840.113549.1.1.13',
+ 'dsa-sha1': '1.2.840.10040.4.3',
+ 'dsa-sha256': '2.16.840.1.101.3.4.3.2',
+ 'ecdsa-sha1': '1.2.840.10045.4.1',
+ 'ecdsa-sha256': '1.2.840.10045.4.3.2',
+ 'ecdsa-sha384': '1.2.840.10045.4.3.3',
+ 'ecdsa-sha512': '1.2.840.10045.4.3.4',
+ 'ed25519-sha512': '1.3.101.112'
+};
+Object.keys(SIGN_ALGS).forEach(function (k) {
+ SIGN_ALGS[SIGN_ALGS[k]] = k;
+});
+SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5';
+SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1';
+
+var EXTS = {
+ 'issuerKeyId': '2.5.29.35',
+ 'altName': '2.5.29.17',
+ 'basicConstraints': '2.5.29.19',
+ 'keyUsage': '2.5.29.15',
+ 'extKeyUsage': '2.5.29.37'
+};
+
+function read(buf, options) {
+ if (typeof (buf) === 'string') {
+ buf = Buffer.from(buf, 'binary');
+ }
+ assert.buffer(buf, 'buf');
+
+ var der = new asn1.BerReader(buf);
+
+ der.readSequence();
+ if (Math.abs(der.length - der.remain) > 1) {
+ throw (new Error('DER sequence does not contain whole byte ' +
+ 'stream'));
+ }
+
+ var tbsStart = der.offset;
+ der.readSequence();
+ var sigOffset = der.offset + der.length;
+ var tbsEnd = sigOffset;
+
+ if (der.peek() === Local(0)) {
+ der.readSequence(Local(0));
+ var version = der.readInt();
+ assert.ok(version <= 3,
+ 'only x.509 versions up to v3 supported');
+ }
+
+ var cert = {};
+ cert.signatures = {};
+ var sig = (cert.signatures.x509 = {});
+ sig.extras = {};
+
+ cert.serial = readMPInt(der, 'serial');
+
+ der.readSequence();
+ var after = der.offset + der.length;
+ var certAlgOid = der.readOID();
+ var certAlg = SIGN_ALGS[certAlgOid];
+ if (certAlg === undefined)
+ throw (new Error('unknown signature algorithm ' + certAlgOid));
+
+ der._offset = after;
+ cert.issuer = Identity.parseAsn1(der);
+
+ der.readSequence();
+ cert.validFrom = readDate(der);
+ cert.validUntil = readDate(der);
+
+ cert.subjects = [Identity.parseAsn1(der)];
+
+ der.readSequence();
+ after = der.offset + der.length;
+ cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der);
+ der._offset = after;
+
+ /* issuerUniqueID */
+ if (der.peek() === Local(1)) {
+ der.readSequence(Local(1));
+ sig.extras.issuerUniqueID =
+ buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+ }
+
+ /* subjectUniqueID */
+ if (der.peek() === Local(2)) {
+ der.readSequence(Local(2));
+ sig.extras.subjectUniqueID =
+ buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+ }
+
+ /* extensions */
+ if (der.peek() === Local(3)) {
+ der.readSequence(Local(3));
+ var extEnd = der.offset + der.length;
+ der.readSequence();
+
+ while (der.offset < extEnd)
+ readExtension(cert, buf, der);
+
+ assert.strictEqual(der.offset, extEnd);
+ }
+
+ assert.strictEqual(der.offset, sigOffset);
+
+ der.readSequence();
+ after = der.offset + der.length;
+ var sigAlgOid = der.readOID();
+ var sigAlg = SIGN_ALGS[sigAlgOid];
+ if (sigAlg === undefined)
+ throw (new Error('unknown signature algorithm ' + sigAlgOid));
+ der._offset = after;
+
+ var sigData = der.readString(asn1.Ber.BitString, true);
+ if (sigData[0] === 0)
+ sigData = sigData.slice(1);
+ var algParts = sigAlg.split('-');
+
+ sig.signature = Signature.parse(sigData, algParts[0], 'asn1');
+ sig.signature.hashAlgorithm = algParts[1];
+ sig.algo = sigAlg;
+ sig.cache = buf.slice(tbsStart, tbsEnd);
+
+ return (new Certificate(cert));
+}
+
+function readDate(der) {
+ if (der.peek() === asn1.Ber.UTCTime) {
+ return (utcTimeToDate(der.readString(asn1.Ber.UTCTime)));
+ } else if (der.peek() === asn1.Ber.GeneralizedTime) {
+ return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime)));
+ } else {
+ throw (new Error('Unsupported date format'));
+ }
+}
+
+function writeDate(der, date) {
+ if (date.getUTCFullYear() >= 2050 || date.getUTCFullYear() < 1950) {
+ der.writeString(dateToGTime(date), asn1.Ber.GeneralizedTime);
+ } else {
+ der.writeString(dateToUTCTime(date), asn1.Ber.UTCTime);
+ }
+}
+
+/* RFC5280, section 4.2.1.6 (GeneralName type) */
+var ALTNAME = {
+ OtherName: Local(0),
+ RFC822Name: Context(1),
+ DNSName: Context(2),
+ X400Address: Local(3),
+ DirectoryName: Local(4),
+ EDIPartyName: Local(5),
+ URI: Context(6),
+ IPAddress: Context(7),
+ OID: Context(8)
+};
+
+/* RFC5280, section 4.2.1.12 (KeyPurposeId) */
+var EXTPURPOSE = {
+ 'serverAuth': '1.3.6.1.5.5.7.3.1',
+ 'clientAuth': '1.3.6.1.5.5.7.3.2',
+ 'codeSigning': '1.3.6.1.5.5.7.3.3',
+
+ /* See https://github.com/joyent/oid-docs/blob/master/root.md */
+ 'joyentDocker': '1.3.6.1.4.1.38678.1.4.1',
+ 'joyentCmon': '1.3.6.1.4.1.38678.1.4.2'
+};
+var EXTPURPOSE_REV = {};
+Object.keys(EXTPURPOSE).forEach(function (k) {
+ EXTPURPOSE_REV[EXTPURPOSE[k]] = k;
+});
+
+var KEYUSEBITS = [
+ 'signature', 'identity', 'keyEncryption',
+ 'encryption', 'keyAgreement', 'ca', 'crl'
+];
+
+function readExtension(cert, buf, der) {
+ der.readSequence();
+ var after = der.offset + der.length;
+ var extId = der.readOID();
+ var id;
+ var sig = cert.signatures.x509;
+ if (!sig.extras.exts)
+ sig.extras.exts = [];
+
+ var critical;
+ if (der.peek() === asn1.Ber.Boolean)
+ critical = der.readBoolean();
+
+ switch (extId) {
+ case (EXTS.basicConstraints):
+ der.readSequence(asn1.Ber.OctetString);
+ der.readSequence();
+ var bcEnd = der.offset + der.length;
+ var ca = false;
+ if (der.peek() === asn1.Ber.Boolean)
+ ca = der.readBoolean();
+ if (cert.purposes === undefined)
+ cert.purposes = [];
+ if (ca === true)
+ cert.purposes.push('ca');
+ var bc = { oid: extId, critical: critical };
+ if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer)
+ bc.pathLen = der.readInt();
+ sig.extras.exts.push(bc);
+ break;
+ case (EXTS.extKeyUsage):
+ der.readSequence(asn1.Ber.OctetString);
+ der.readSequence();
+ if (cert.purposes === undefined)
+ cert.purposes = [];
+ var ekEnd = der.offset + der.length;
+ while (der.offset < ekEnd) {
+ var oid = der.readOID();
+ cert.purposes.push(EXTPURPOSE_REV[oid] || oid);
+ }
+ /*
+ * This is a bit of a hack: in the case where we have a cert
+ * that's only allowed to do serverAuth or clientAuth (and not
+ * the other), we want to make sure all our Subjects are of
+ * the right type. But we already parsed our Subjects and
+ * decided if they were hosts or users earlier (since it appears
+ * first in the cert).
+ *
+ * So we go through and mutate them into the right kind here if
+ * it doesn't match. This might not be hugely beneficial, as it
+ * seems that single-purpose certs are not often seen in the
+ * wild.
+ */
+ if (cert.purposes.indexOf('serverAuth') !== -1 &&
+ cert.purposes.indexOf('clientAuth') === -1) {
+ cert.subjects.forEach(function (ide) {
+ if (ide.type !== 'host') {
+ ide.type = 'host';
+ ide.hostname = ide.uid ||
+ ide.email ||
+ ide.components[0].value;
+ }
+ });
+ } else if (cert.purposes.indexOf('clientAuth') !== -1 &&
+ cert.purposes.indexOf('serverAuth') === -1) {
+ cert.subjects.forEach(function (ide) {
+ if (ide.type !== 'user') {
+ ide.type = 'user';
+ ide.uid = ide.hostname ||
+ ide.email ||
+ ide.components[0].value;
+ }
+ });
+ }
+ sig.extras.exts.push({ oid: extId, critical: critical });
+ break;
+ case (EXTS.keyUsage):
+ der.readSequence(asn1.Ber.OctetString);
+ var bits = der.readString(asn1.Ber.BitString, true);
+ var setBits = readBitField(bits, KEYUSEBITS);
+ setBits.forEach(function (bit) {
+ if (cert.purposes === undefined)
+ cert.purposes = [];
+ if (cert.purposes.indexOf(bit) === -1)
+ cert.purposes.push(bit);
+ });
+ sig.extras.exts.push({ oid: extId, critical: critical,
+ bits: bits });
+ break;
+ case (EXTS.altName):
+ der.readSequence(asn1.Ber.OctetString);
+ der.readSequence();
+ var aeEnd = der.offset + der.length;
+ while (der.offset < aeEnd) {
+ switch (der.peek()) {
+ case ALTNAME.OtherName:
+ case ALTNAME.EDIPartyName:
+ der.readSequence();
+ der._offset += der.length;
+ break;
+ case ALTNAME.OID:
+ der.readOID(ALTNAME.OID);
+ break;
+ case ALTNAME.RFC822Name:
+ /* RFC822 specifies email addresses */
+ var email = der.readString(ALTNAME.RFC822Name);
+ id = Identity.forEmail(email);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ case ALTNAME.DirectoryName:
+ der.readSequence(ALTNAME.DirectoryName);
+ id = Identity.parseAsn1(der);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ case ALTNAME.DNSName:
+ var host = der.readString(
+ ALTNAME.DNSName);
+ id = Identity.forHost(host);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ default:
+ der.readString(der.peek());
+ break;
+ }
+ }
+ sig.extras.exts.push({ oid: extId, critical: critical });
+ break;
+ default:
+ sig.extras.exts.push({
+ oid: extId,
+ critical: critical,
+ data: der.readString(asn1.Ber.OctetString, true)
+ });
+ break;
+ }
+
+ der._offset = after;
+}
+
+var UTCTIME_RE =
+ /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
+function utcTimeToDate(t) {
+ var m = t.match(UTCTIME_RE);
+ assert.ok(m, 'timestamps must be in UTC');
+ var d = new Date();
+
+ var thisYear = d.getUTCFullYear();
+ var century = Math.floor(thisYear / 100) * 100;
+
+ var year = parseInt(m[1], 10);
+ if (thisYear % 100 < 50 && year >= 60)
+ year += (century - 1);
+ else
+ year += century;
+ d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10));
+ d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
+ if (m[6] && m[6].length > 0)
+ d.setUTCSeconds(parseInt(m[6], 10));
+ return (d);
+}
+
+var GTIME_RE =
+ /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
+function gTimeToDate(t) {
+ var m = t.match(GTIME_RE);
+ assert.ok(m);
+ var d = new Date();
+
+ d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1,
+ parseInt(m[3], 10));
+ d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
+ if (m[6] && m[6].length > 0)
+ d.setUTCSeconds(parseInt(m[6], 10));
+ return (d);
+}
+
+function zeroPad(n, m) {
+ if (m === undefined)
+ m = 2;
+ var s = '' + n;
+ while (s.length < m)
+ s = '0' + s;
+ return (s);
+}
+
+function dateToUTCTime(d) {
+ var s = '';
+ s += zeroPad(d.getUTCFullYear() % 100);
+ s += zeroPad(d.getUTCMonth() + 1);
+ s += zeroPad(d.getUTCDate());
+ s += zeroPad(d.getUTCHours());
+ s += zeroPad(d.getUTCMinutes());
+ s += zeroPad(d.getUTCSeconds());
+ s += 'Z';
+ return (s);
+}
+
+function dateToGTime(d) {
+ var s = '';
+ s += zeroPad(d.getUTCFullYear(), 4);
+ s += zeroPad(d.getUTCMonth() + 1);
+ s += zeroPad(d.getUTCDate());
+ s += zeroPad(d.getUTCHours());
+ s += zeroPad(d.getUTCMinutes());
+ s += zeroPad(d.getUTCSeconds());
+ s += 'Z';
+ return (s);
+}
+
+function sign(cert, key) {
+ if (cert.signatures.x509 === undefined)
+ cert.signatures.x509 = {};
+ var sig = cert.signatures.x509;
+
+ sig.algo = key.type + '-' + key.defaultHashAlgorithm();
+ if (SIGN_ALGS[sig.algo] === undefined)
+ return (false);
+
+ var der = new asn1.BerWriter();
+ writeTBSCert(cert, der);
+ var blob = der.buffer;
+ sig.cache = blob;
+
+ var signer = key.createSign();
+ signer.write(blob);
+ cert.signatures.x509.signature = signer.sign();
+
+ return (true);
+}
+
+function signAsync(cert, signer, done) {
+ if (cert.signatures.x509 === undefined)
+ cert.signatures.x509 = {};
+ var sig = cert.signatures.x509;
+
+ var der = new asn1.BerWriter();
+ writeTBSCert(cert, der);
+ var blob = der.buffer;
+ sig.cache = blob;
+
+ signer(blob, function (err, signature) {
+ if (err) {
+ done(err);
+ return;
+ }
+ sig.algo = signature.type + '-' + signature.hashAlgorithm;
+ if (SIGN_ALGS[sig.algo] === undefined) {
+ done(new Error('Invalid signing algorithm "' +
+ sig.algo + '"'));
+ return;
+ }
+ sig.signature = signature;
+ done();
+ });
+}
+
+function write(cert, options) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ var der = new asn1.BerWriter();
+ der.startSequence();
+ if (sig.cache) {
+ der._ensure(sig.cache.length);
+ sig.cache.copy(der._buf, der._offset);
+ der._offset += sig.cache.length;
+ } else {
+ writeTBSCert(cert, der);
+ }
+
+ der.startSequence();
+ der.writeOID(SIGN_ALGS[sig.algo]);
+ if (sig.algo.match(/^rsa-/))
+ der.writeNull();
+ der.endSequence();
+
+ var sigData = sig.signature.toBuffer('asn1');
+ var data = Buffer.alloc(sigData.length + 1);
+ data[0] = 0;
+ sigData.copy(data, 1);
+ der.writeBuffer(data, asn1.Ber.BitString);
+ der.endSequence();
+
+ return (der.buffer);
+}
+
+function writeTBSCert(cert, der) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ der.startSequence();
+
+ der.startSequence(Local(0));
+ der.writeInt(2);
+ der.endSequence();
+
+ der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer);
+
+ der.startSequence();
+ der.writeOID(SIGN_ALGS[sig.algo]);
+ if (sig.algo.match(/^rsa-/))
+ der.writeNull();
+ der.endSequence();
+
+ cert.issuer.toAsn1(der);
+
+ der.startSequence();
+ writeDate(der, cert.validFrom);
+ writeDate(der, cert.validUntil);
+ der.endSequence();
+
+ var subject = cert.subjects[0];
+ var altNames = cert.subjects.slice(1);
+ subject.toAsn1(der);
+
+ pkcs8.writePkcs8(der, cert.subjectKey);
+
+ if (sig.extras && sig.extras.issuerUniqueID) {
+ der.writeBuffer(sig.extras.issuerUniqueID, Local(1));
+ }
+
+ if (sig.extras && sig.extras.subjectUniqueID) {
+ der.writeBuffer(sig.extras.subjectUniqueID, Local(2));
+ }
+
+ if (altNames.length > 0 || subject.type === 'host' ||
+ (cert.purposes !== undefined && cert.purposes.length > 0) ||
+ (sig.extras && sig.extras.exts)) {
+ der.startSequence(Local(3));
+ der.startSequence();
+
+ var exts = [];
+ if (cert.purposes !== undefined && cert.purposes.length > 0) {
+ exts.push({
+ oid: EXTS.basicConstraints,
+ critical: true
+ });
+ exts.push({
+ oid: EXTS.keyUsage,
+ critical: true
+ });
+ exts.push({
+ oid: EXTS.extKeyUsage,
+ critical: true
+ });
+ }
+ exts.push({ oid: EXTS.altName });
+ if (sig.extras && sig.extras.exts)
+ exts = sig.extras.exts;
+
+ for (var i = 0; i < exts.length; ++i) {
+ der.startSequence();
+ der.writeOID(exts[i].oid);
+
+ if (exts[i].critical !== undefined)
+ der.writeBoolean(exts[i].critical);
+
+ if (exts[i].oid === EXTS.altName) {
+ der.startSequence(asn1.Ber.OctetString);
+ der.startSequence();
+ if (subject.type === 'host') {
+ der.writeString(subject.hostname,
+ Context(2));
+ }
+ for (var j = 0; j < altNames.length; ++j) {
+ if (altNames[j].type === 'host') {
+ der.writeString(
+ altNames[j].hostname,
+ ALTNAME.DNSName);
+ } else if (altNames[j].type ===
+ 'email') {
+ der.writeString(
+ altNames[j].email,
+ ALTNAME.RFC822Name);
+ } else {
+ /*
+ * Encode anything else as a
+ * DN style name for now.
+ */
+ der.startSequence(
+ ALTNAME.DirectoryName);
+ altNames[j].toAsn1(der);
+ der.endSequence();
+ }
+ }
+ der.endSequence();
+ der.endSequence();
+ } else if (exts[i].oid === EXTS.basicConstraints) {
+ der.startSequence(asn1.Ber.OctetString);
+ der.startSequence();
+ var ca = (cert.purposes.indexOf('ca') !== -1);
+ var pathLen = exts[i].pathLen;
+ der.writeBoolean(ca);
+ if (pathLen !== undefined)
+ der.writeInt(pathLen);
+ der.endSequence();
+ der.endSequence();
+ } else if (exts[i].oid === EXTS.extKeyUsage) {
+ der.startSequence(asn1.Ber.OctetString);
+ der.startSequence();
+ cert.purposes.forEach(function (purpose) {
+ if (purpose === 'ca')
+ return;
+ if (KEYUSEBITS.indexOf(purpose) !== -1)
+ return;
+ var oid = purpose;
+ if (EXTPURPOSE[purpose] !== undefined)
+ oid = EXTPURPOSE[purpose];
+ der.writeOID(oid);
+ });
+ der.endSequence();
+ der.endSequence();
+ } else if (exts[i].oid === EXTS.keyUsage) {
+ der.startSequence(asn1.Ber.OctetString);
+ /*
+ * If we parsed this certificate from a byte
+ * stream (i.e. we didn't generate it in sshpk)
+ * then we'll have a ".bits" property on the
+ * ext with the original raw byte contents.
+ *
+ * If we have this, use it here instead of
+ * regenerating it. This guarantees we output
+ * the same data we parsed, so signatures still
+ * validate.
+ */
+ if (exts[i].bits !== undefined) {
+ der.writeBuffer(exts[i].bits,
+ asn1.Ber.BitString);
+ } else {
+ var bits = writeBitField(cert.purposes,
+ KEYUSEBITS);
+ der.writeBuffer(bits,
+ asn1.Ber.BitString);
+ }
+ der.endSequence();
+ } else {
+ der.writeBuffer(exts[i].data,
+ asn1.Ber.OctetString);
+ }
+
+ der.endSequence();
+ }
+
+ der.endSequence();
+ der.endSequence();
+ }
+
+ der.endSequence();
+}
+
+/*
+ * Reads an ASN.1 BER bitfield out of the Buffer produced by doing
+ * `BerReader#readString(asn1.Ber.BitString)`. That function gives us the raw
+ * contents of the BitString tag, which is a count of unused bits followed by
+ * the bits as a right-padded byte string.
+ *
+ * `bits` is the Buffer, `bitIndex` should contain an array of string names
+ * for the bits in the string, ordered starting with bit #0 in the ASN.1 spec.
+ *
+ * Returns an array of Strings, the names of the bits that were set to 1.
+ */
+function readBitField(bits, bitIndex) {
+ var bitLen = 8 * (bits.length - 1) - bits[0];
+ var setBits = {};
+ for (var i = 0; i < bitLen; ++i) {
+ var byteN = 1 + Math.floor(i / 8);
+ var bit = 7 - (i % 8);
+ var mask = 1 << bit;
+ var bitVal = ((bits[byteN] & mask) !== 0);
+ var name = bitIndex[i];
+ if (bitVal && typeof (name) === 'string') {
+ setBits[name] = true;
+ }
+ }
+ return (Object.keys(setBits));
+}
+
+/*
+ * `setBits` is an array of strings, containing the names for each bit that
+ * sould be set to 1. `bitIndex` is same as in `readBitField()`.
+ *
+ * Returns a Buffer, ready to be written out with `BerWriter#writeString()`.
+ */
+function writeBitField(setBits, bitIndex) {
+ var bitLen = bitIndex.length;
+ var blen = Math.ceil(bitLen / 8);
+ var unused = blen * 8 - bitLen;
+ var bits = Buffer.alloc(1 + blen); // zero-filled
+ bits[0] = unused;
+ for (var i = 0; i < bitLen; ++i) {
+ var byteN = 1 + Math.floor(i / 8);
+ var bit = 7 - (i % 8);
+ var mask = 1 << bit;
+ var name = bitIndex[i];
+ if (name === undefined)
+ continue;
+ var bitVal = (setBits.indexOf(name) !== -1);
+ if (bitVal) {
+ bits[byteN] |= mask;
+ }
+ }
+ return (bits);
+}
diff --git a/node_modules/sshpk/lib/identity.js b/node_modules/sshpk/lib/identity.js
new file mode 100644
index 0000000..7d75b66
--- /dev/null
+++ b/node_modules/sshpk/lib/identity.js
@@ -0,0 +1,373 @@
+// Copyright 2017 Joyent, Inc.
+
+module.exports = Identity;
+
+var assert = require('assert-plus');
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var errs = require('./errors');
+var util = require('util');
+var utils = require('./utils');
+var asn1 = require('asn1');
+var Buffer = require('safer-buffer').Buffer;
+
+/*JSSTYLED*/
+var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i;
+
+var oids = {};
+oids.cn = '2.5.4.3';
+oids.o = '2.5.4.10';
+oids.ou = '2.5.4.11';
+oids.l = '2.5.4.7';
+oids.s = '2.5.4.8';
+oids.c = '2.5.4.6';
+oids.sn = '2.5.4.4';
+oids.postalCode = '2.5.4.17';
+oids.serialNumber = '2.5.4.5';
+oids.street = '2.5.4.9';
+oids.x500UniqueIdentifier = '2.5.4.45';
+oids.role = '2.5.4.72';
+oids.telephoneNumber = '2.5.4.20';
+oids.description = '2.5.4.13';
+oids.dc = '0.9.2342.19200300.100.1.25';
+oids.uid = '0.9.2342.19200300.100.1.1';
+oids.mail = '0.9.2342.19200300.100.1.3';
+oids.title = '2.5.4.12';
+oids.gn = '2.5.4.42';
+oids.initials = '2.5.4.43';
+oids.pseudonym = '2.5.4.65';
+oids.emailAddress = '1.2.840.113549.1.9.1';
+
+var unoids = {};
+Object.keys(oids).forEach(function (k) {
+ unoids[oids[k]] = k;
+});
+
+function Identity(opts) {
+ var self = this;
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.components, 'options.components');
+ this.components = opts.components;
+ this.componentLookup = {};
+ this.components.forEach(function (c) {
+ if (c.name && !c.oid)
+ c.oid = oids[c.name];
+ if (c.oid && !c.name)
+ c.name = unoids[c.oid];
+ if (self.componentLookup[c.name] === undefined)
+ self.componentLookup[c.name] = [];
+ self.componentLookup[c.name].push(c);
+ });
+ if (this.componentLookup.cn && this.componentLookup.cn.length > 0) {
+ this.cn = this.componentLookup.cn[0].value;
+ }
+ assert.optionalString(opts.type, 'options.type');
+ if (opts.type === undefined) {
+ if (this.components.length === 1 &&
+ this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1 &&
+ this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.cn[0].value;
+
+ } else if (this.componentLookup.dc &&
+ this.components.length === this.componentLookup.dc.length) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.dc.map(
+ function (c) {
+ return (c.value);
+ }).join('.');
+
+ } else if (this.componentLookup.uid &&
+ this.components.length ===
+ this.componentLookup.uid.length) {
+ this.type = 'user';
+ this.uid = this.componentLookup.uid[0].value;
+
+ } else if (this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1 &&
+ this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.cn[0].value;
+
+ } else if (this.componentLookup.uid &&
+ this.componentLookup.uid.length === 1) {
+ this.type = 'user';
+ this.uid = this.componentLookup.uid[0].value;
+
+ } else if (this.componentLookup.mail &&
+ this.componentLookup.mail.length === 1) {
+ this.type = 'email';
+ this.email = this.componentLookup.mail[0].value;
+
+ } else if (this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1) {
+ this.type = 'user';
+ this.uid = this.componentLookup.cn[0].value;
+
+ } else {
+ this.type = 'unknown';
+ }
+ } else {
+ this.type = opts.type;
+ if (this.type === 'host')
+ this.hostname = opts.hostname;
+ else if (this.type === 'user')
+ this.uid = opts.uid;
+ else if (this.type === 'email')
+ this.email = opts.email;
+ else
+ throw (new Error('Unknown type ' + this.type));
+ }
+}
+
+Identity.prototype.toString = function () {
+ return (this.components.map(function (c) {
+ var n = c.name.toUpperCase();
+ /*JSSTYLED*/
+ n = n.replace(/=/g, '\\=');
+ var v = c.value;
+ /*JSSTYLED*/
+ v = v.replace(/,/g, '\\,');
+ return (n + '=' + v);
+ }).join(', '));
+};
+
+Identity.prototype.get = function (name, asArray) {
+ assert.string(name, 'name');
+ var arr = this.componentLookup[name];
+ if (arr === undefined || arr.length === 0)
+ return (undefined);
+ if (!asArray && arr.length > 1)
+ throw (new Error('Multiple values for attribute ' + name));
+ if (!asArray)
+ return (arr[0].value);
+ return (arr.map(function (c) {
+ return (c.value);
+ }));
+};
+
+Identity.prototype.toArray = function (idx) {
+ return (this.components.map(function (c) {
+ return ({
+ name: c.name,
+ value: c.value
+ });
+ }));
+};
+
+/*
+ * These are from X.680 -- PrintableString allowed chars are in section 37.4
+ * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to
+ * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006
+ * (the basic ASCII character set).
+ */
+/* JSSTYLED */
+var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/;
+/* JSSTYLED */
+var NOT_IA5 = /[^\x00-\x7f]/;
+
+Identity.prototype.toAsn1 = function (der, tag) {
+ der.startSequence(tag);
+ this.components.forEach(function (c) {
+ der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set);
+ der.startSequence();
+ der.writeOID(c.oid);
+ /*
+ * If we fit in a PrintableString, use that. Otherwise use an
+ * IA5String or UTF8String.
+ *
+ * If this identity was parsed from a DN, use the ASN.1 types
+ * from the original representation (otherwise this might not
+ * be a full match for the original in some validators).
+ */
+ if (c.asn1type === asn1.Ber.Utf8String ||
+ c.value.match(NOT_IA5)) {
+ var v = Buffer.from(c.value, 'utf8');
+ der.writeBuffer(v, asn1.Ber.Utf8String);
+
+ } else if (c.asn1type === asn1.Ber.IA5String ||
+ c.value.match(NOT_PRINTABLE)) {
+ der.writeString(c.value, asn1.Ber.IA5String);
+
+ } else {
+ var type = asn1.Ber.PrintableString;
+ if (c.asn1type !== undefined)
+ type = c.asn1type;
+ der.writeString(c.value, type);
+ }
+ der.endSequence();
+ der.endSequence();
+ });
+ der.endSequence();
+};
+
+function globMatch(a, b) {
+ if (a === '**' || b === '**')
+ return (true);
+ var aParts = a.split('.');
+ var bParts = b.split('.');
+ if (aParts.length !== bParts.length)
+ return (false);
+ for (var i = 0; i < aParts.length; ++i) {
+ if (aParts[i] === '*' || bParts[i] === '*')
+ continue;
+ if (aParts[i] !== bParts[i])
+ return (false);
+ }
+ return (true);
+}
+
+Identity.prototype.equals = function (other) {
+ if (!Identity.isIdentity(other, [1, 0]))
+ return (false);
+ if (other.components.length !== this.components.length)
+ return (false);
+ for (var i = 0; i < this.components.length; ++i) {
+ if (this.components[i].oid !== other.components[i].oid)
+ return (false);
+ if (!globMatch(this.components[i].value,
+ other.components[i].value)) {
+ return (false);
+ }
+ }
+ return (true);
+};
+
+Identity.forHost = function (hostname) {
+ assert.string(hostname, 'hostname');
+ return (new Identity({
+ type: 'host',
+ hostname: hostname,
+ components: [ { name: 'cn', value: hostname } ]
+ }));
+};
+
+Identity.forUser = function (uid) {
+ assert.string(uid, 'uid');
+ return (new Identity({
+ type: 'user',
+ uid: uid,
+ components: [ { name: 'uid', value: uid } ]
+ }));
+};
+
+Identity.forEmail = function (email) {
+ assert.string(email, 'email');
+ return (new Identity({
+ type: 'email',
+ email: email,
+ components: [ { name: 'mail', value: email } ]
+ }));
+};
+
+Identity.parseDN = function (dn) {
+ assert.string(dn, 'dn');
+ var parts = [''];
+ var idx = 0;
+ var rem = dn;
+ while (rem.length > 0) {
+ var m;
+ /*JSSTYLED*/
+ if ((m = /^,/.exec(rem)) !== null) {
+ parts[++idx] = '';
+ rem = rem.slice(m[0].length);
+ /*JSSTYLED*/
+ } else if ((m = /^\\,/.exec(rem)) !== null) {
+ parts[idx] += ',';
+ rem = rem.slice(m[0].length);
+ /*JSSTYLED*/
+ } else if ((m = /^\\./.exec(rem)) !== null) {
+ parts[idx] += m[0];
+ rem = rem.slice(m[0].length);
+ /*JSSTYLED*/
+ } else if ((m = /^[^\\,]+/.exec(rem)) !== null) {
+ parts[idx] += m[0];
+ rem = rem.slice(m[0].length);
+ } else {
+ throw (new Error('Failed to parse DN'));
+ }
+ }
+ var cmps = parts.map(function (c) {
+ c = c.trim();
+ var eqPos = c.indexOf('=');
+ while (eqPos > 0 && c.charAt(eqPos - 1) === '\\')
+ eqPos = c.indexOf('=', eqPos + 1);
+ if (eqPos === -1) {
+ throw (new Error('Failed to parse DN'));
+ }
+ /*JSSTYLED*/
+ var name = c.slice(0, eqPos).toLowerCase().replace(/\\=/g, '=');
+ var value = c.slice(eqPos + 1);
+ return ({ name: name, value: value });
+ });
+ return (new Identity({ components: cmps }));
+};
+
+Identity.fromArray = function (components) {
+ assert.arrayOfObject(components, 'components');
+ components.forEach(function (cmp) {
+ assert.object(cmp, 'component');
+ assert.string(cmp.name, 'component.name');
+ if (!Buffer.isBuffer(cmp.value) &&
+ !(typeof (cmp.value) === 'string')) {
+ throw (new Error('Invalid component value'));
+ }
+ });
+ return (new Identity({ components: components }));
+};
+
+Identity.parseAsn1 = function (der, top) {
+ var components = [];
+ der.readSequence(top);
+ var end = der.offset + der.length;
+ while (der.offset < end) {
+ der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set);
+ var after = der.offset + der.length;
+ der.readSequence();
+ var oid = der.readOID();
+ var type = der.peek();
+ var value;
+ switch (type) {
+ case asn1.Ber.PrintableString:
+ case asn1.Ber.IA5String:
+ case asn1.Ber.OctetString:
+ case asn1.Ber.T61String:
+ value = der.readString(type);
+ break;
+ case asn1.Ber.Utf8String:
+ value = der.readString(type, true);
+ value = value.toString('utf8');
+ break;
+ case asn1.Ber.CharacterString:
+ case asn1.Ber.BMPString:
+ value = der.readString(type, true);
+ value = value.toString('utf16le');
+ break;
+ default:
+ throw (new Error('Unknown asn1 type ' + type));
+ }
+ components.push({ oid: oid, asn1type: type, value: value });
+ der._offset = after;
+ }
+ der._offset = end;
+ return (new Identity({
+ components: components
+ }));
+};
+
+Identity.isIdentity = function (obj, ver) {
+ return (utils.isCompatible(obj, Identity, ver));
+};
+
+/*
+ * API versions for Identity:
+ * [1,0] -- initial ver
+ */
+Identity.prototype._sshpkApiVersion = [1, 0];
+
+Identity._oldVersionDetect = function (obj) {
+ return ([1, 0]);
+};
diff --git a/node_modules/sshpk/lib/index.js b/node_modules/sshpk/lib/index.js
new file mode 100644
index 0000000..f76db79
--- /dev/null
+++ b/node_modules/sshpk/lib/index.js
@@ -0,0 +1,40 @@
+// Copyright 2015 Joyent, Inc.
+
+var Key = require('./key');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var PrivateKey = require('./private-key');
+var Certificate = require('./certificate');
+var Identity = require('./identity');
+var errs = require('./errors');
+
+module.exports = {
+ /* top-level classes */
+ Key: Key,
+ parseKey: Key.parse,
+ Fingerprint: Fingerprint,
+ parseFingerprint: Fingerprint.parse,
+ Signature: Signature,
+ parseSignature: Signature.parse,
+ PrivateKey: PrivateKey,
+ parsePrivateKey: PrivateKey.parse,
+ generatePrivateKey: PrivateKey.generate,
+ Certificate: Certificate,
+ parseCertificate: Certificate.parse,
+ createSelfSignedCertificate: Certificate.createSelfSigned,
+ createCertificate: Certificate.create,
+ Identity: Identity,
+ identityFromDN: Identity.parseDN,
+ identityForHost: Identity.forHost,
+ identityForUser: Identity.forUser,
+ identityForEmail: Identity.forEmail,
+ identityFromArray: Identity.fromArray,
+
+ /* errors */
+ FingerprintFormatError: errs.FingerprintFormatError,
+ InvalidAlgorithmError: errs.InvalidAlgorithmError,
+ KeyParseError: errs.KeyParseError,
+ SignatureParseError: errs.SignatureParseError,
+ KeyEncryptedError: errs.KeyEncryptedError,
+ CertificateParseError: errs.CertificateParseError
+};
diff --git a/node_modules/sshpk/lib/key.js b/node_modules/sshpk/lib/key.js
new file mode 100644
index 0000000..706f834
--- /dev/null
+++ b/node_modules/sshpk/lib/key.js
@@ -0,0 +1,294 @@
+// Copyright 2018 Joyent, Inc.
+
+module.exports = Key;
+
+var assert = require('assert-plus');
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var DiffieHellman = require('./dhe').DiffieHellman;
+var errs = require('./errors');
+var utils = require('./utils');
+var PrivateKey = require('./private-key');
+var edCompat;
+
+try {
+ edCompat = require('./ed-compat');
+} catch (e) {
+ /* Just continue through, and bail out if we try to use it. */
+}
+
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+var KeyParseError = errs.KeyParseError;
+
+var formats = {};
+formats['auto'] = require('./formats/auto');
+formats['pem'] = require('./formats/pem');
+formats['pkcs1'] = require('./formats/pkcs1');
+formats['pkcs8'] = require('./formats/pkcs8');
+formats['rfc4253'] = require('./formats/rfc4253');
+formats['ssh'] = require('./formats/ssh');
+formats['ssh-private'] = require('./formats/ssh-private');
+formats['openssh'] = formats['ssh-private'];
+formats['dnssec'] = require('./formats/dnssec');
+formats['putty'] = require('./formats/putty');
+formats['ppk'] = formats['putty'];
+
+function Key(opts) {
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.parts, 'options.parts');
+ assert.string(opts.type, 'options.type');
+ assert.optionalString(opts.comment, 'options.comment');
+
+ var algInfo = algs.info[opts.type];
+ if (typeof (algInfo) !== 'object')
+ throw (new InvalidAlgorithmError(opts.type));
+
+ var partLookup = {};
+ for (var i = 0; i < opts.parts.length; ++i) {
+ var part = opts.parts[i];
+ partLookup[part.name] = part;
+ }
+
+ this.type = opts.type;
+ this.parts = opts.parts;
+ this.part = partLookup;
+ this.comment = undefined;
+ this.source = opts.source;
+
+ /* for speeding up hashing/fingerprint operations */
+ this._rfc4253Cache = opts._rfc4253Cache;
+ this._hashCache = {};
+
+ var sz;
+ this.curve = undefined;
+ if (this.type === 'ecdsa') {
+ var curve = this.part.curve.data.toString();
+ this.curve = curve;
+ sz = algs.curves[curve].size;
+ } else if (this.type === 'ed25519' || this.type === 'curve25519') {
+ sz = 256;
+ this.curve = 'curve25519';
+ } else {
+ var szPart = this.part[algInfo.sizePart];
+ sz = szPart.data.length;
+ sz = sz * 8 - utils.countZeros(szPart.data);
+ }
+ this.size = sz;
+}
+
+Key.formats = formats;
+
+Key.prototype.toBuffer = function (format, options) {
+ if (format === undefined)
+ format = 'ssh';
+ assert.string(format, 'format');
+ assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
+
+ if (format === 'rfc4253') {
+ if (this._rfc4253Cache === undefined)
+ this._rfc4253Cache = formats['rfc4253'].write(this);
+ return (this._rfc4253Cache);
+ }
+
+ return (formats[format].write(this, options));
+};
+
+Key.prototype.toString = function (format, options) {
+ return (this.toBuffer(format, options).toString());
+};
+
+Key.prototype.hash = function (algo, type) {
+ assert.string(algo, 'algorithm');
+ assert.optionalString(type, 'type');
+ if (type === undefined)
+ type = 'ssh';
+ algo = algo.toLowerCase();
+ if (algs.hashAlgs[algo] === undefined)
+ throw (new InvalidAlgorithmError(algo));
+
+ var cacheKey = algo + '||' + type;
+ if (this._hashCache[cacheKey])
+ return (this._hashCache[cacheKey]);
+
+ var buf;
+ if (type === 'ssh') {
+ buf = this.toBuffer('rfc4253');
+ } else if (type === 'spki') {
+ buf = formats.pkcs8.pkcs8ToBuffer(this);
+ } else {
+ throw (new Error('Hash type ' + type + ' not supported'));
+ }
+ var hash = crypto.createHash(algo).update(buf).digest();
+ this._hashCache[cacheKey] = hash;
+ return (hash);
+};
+
+Key.prototype.fingerprint = function (algo, type) {
+ if (algo === undefined)
+ algo = 'sha256';
+ if (type === undefined)
+ type = 'ssh';
+ assert.string(algo, 'algorithm');
+ assert.string(type, 'type');
+ var opts = {
+ type: 'key',
+ hash: this.hash(algo, type),
+ algorithm: algo,
+ hashType: type
+ };
+ return (new Fingerprint(opts));
+};
+
+Key.prototype.defaultHashAlgorithm = function () {
+ var hashAlgo = 'sha1';
+ if (this.type === 'rsa')
+ hashAlgo = 'sha256';
+ if (this.type === 'dsa' && this.size > 1024)
+ hashAlgo = 'sha256';
+ if (this.type === 'ed25519')
+ hashAlgo = 'sha512';
+ if (this.type === 'ecdsa') {
+ if (this.size <= 256)
+ hashAlgo = 'sha256';
+ else if (this.size <= 384)
+ hashAlgo = 'sha384';
+ else
+ hashAlgo = 'sha512';
+ }
+ return (hashAlgo);
+};
+
+Key.prototype.createVerify = function (hashAlgo) {
+ if (hashAlgo === undefined)
+ hashAlgo = this.defaultHashAlgorithm();
+ assert.string(hashAlgo, 'hash algorithm');
+
+ /* ED25519 is not supported by OpenSSL, use a javascript impl. */
+ if (this.type === 'ed25519' && edCompat !== undefined)
+ return (new edCompat.Verifier(this, hashAlgo));
+ if (this.type === 'curve25519')
+ throw (new Error('Curve25519 keys are not suitable for ' +
+ 'signing or verification'));
+
+ var v, nm, err;
+ try {
+ nm = hashAlgo.toUpperCase();
+ v = crypto.createVerify(nm);
+ } catch (e) {
+ err = e;
+ }
+ if (v === undefined || (err instanceof Error &&
+ err.message.match(/Unknown message digest/))) {
+ nm = 'RSA-';
+ nm += hashAlgo.toUpperCase();
+ v = crypto.createVerify(nm);
+ }
+ assert.ok(v, 'failed to create verifier');
+ var oldVerify = v.verify.bind(v);
+ var key = this.toBuffer('pkcs8');
+ var curve = this.curve;
+ var self = this;
+ v.verify = function (signature, fmt) {
+ if (Signature.isSignature(signature, [2, 0])) {
+ if (signature.type !== self.type)
+ return (false);
+ if (signature.hashAlgorithm &&
+ signature.hashAlgorithm !== hashAlgo)
+ return (false);
+ if (signature.curve && self.type === 'ecdsa' &&
+ signature.curve !== curve)
+ return (false);
+ return (oldVerify(key, signature.toBuffer('asn1')));
+
+ } else if (typeof (signature) === 'string' ||
+ Buffer.isBuffer(signature)) {
+ return (oldVerify(key, signature, fmt));
+
+ /*
+ * Avoid doing this on valid arguments, walking the prototype
+ * chain can be quite slow.
+ */
+ } else if (Signature.isSignature(signature, [1, 0])) {
+ throw (new Error('signature was created by too old ' +
+ 'a version of sshpk and cannot be verified'));
+
+ } else {
+ throw (new TypeError('signature must be a string, ' +
+ 'Buffer, or Signature object'));
+ }
+ };
+ return (v);
+};
+
+Key.prototype.createDiffieHellman = function () {
+ if (this.type === 'rsa')
+ throw (new Error('RSA keys do not support Diffie-Hellman'));
+
+ return (new DiffieHellman(this));
+};
+Key.prototype.createDH = Key.prototype.createDiffieHellman;
+
+Key.parse = function (data, format, options) {
+ if (typeof (data) !== 'string')
+ assert.buffer(data, 'data');
+ if (format === undefined)
+ format = 'auto';
+ assert.string(format, 'format');
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
+
+ assert.object(formats[format], 'formats[format]');
+
+ try {
+ var k = formats[format].read(data, options);
+ if (k instanceof PrivateKey)
+ k = k.toPublic();
+ if (!k.comment)
+ k.comment = options.filename;
+ return (k);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError')
+ throw (e);
+ throw (new KeyParseError(options.filename, format, e));
+ }
+};
+
+Key.isKey = function (obj, ver) {
+ return (utils.isCompatible(obj, Key, ver));
+};
+
+/*
+ * API versions for Key:
+ * [1,0] -- initial ver, may take Signature for createVerify or may not
+ * [1,1] -- added pkcs1, pkcs8 formats
+ * [1,2] -- added auto, ssh-private, openssh formats
+ * [1,3] -- added defaultHashAlgorithm
+ * [1,4] -- added ed support, createDH
+ * [1,5] -- first explicitly tagged version
+ * [1,6] -- changed ed25519 part names
+ * [1,7] -- spki hash types
+ */
+Key.prototype._sshpkApiVersion = [1, 7];
+
+Key._oldVersionDetect = function (obj) {
+ assert.func(obj.toBuffer);
+ assert.func(obj.fingerprint);
+ if (obj.createDH)
+ return ([1, 4]);
+ if (obj.defaultHashAlgorithm)
+ return ([1, 3]);
+ if (obj.formats['auto'])
+ return ([1, 2]);
+ if (obj.formats['pkcs1'])
+ return ([1, 1]);
+ return ([1, 0]);
+};
diff --git a/node_modules/sshpk/lib/private-key.js b/node_modules/sshpk/lib/private-key.js
new file mode 100644
index 0000000..5600838
--- /dev/null
+++ b/node_modules/sshpk/lib/private-key.js
@@ -0,0 +1,246 @@
+// Copyright 2017 Joyent, Inc.
+
+module.exports = PrivateKey;
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var errs = require('./errors');
+var util = require('util');
+var utils = require('./utils');
+var dhe = require('./dhe');
+var generateECDSA = dhe.generateECDSA;
+var generateED25519 = dhe.generateED25519;
+var edCompat = require('./ed-compat');
+var nacl = require('tweetnacl');
+
+var Key = require('./key');
+
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+var KeyParseError = errs.KeyParseError;
+var KeyEncryptedError = errs.KeyEncryptedError;
+
+var formats = {};
+formats['auto'] = require('./formats/auto');
+formats['pem'] = require('./formats/pem');
+formats['pkcs1'] = require('./formats/pkcs1');
+formats['pkcs8'] = require('./formats/pkcs8');
+formats['rfc4253'] = require('./formats/rfc4253');
+formats['ssh-private'] = require('./formats/ssh-private');
+formats['openssh'] = formats['ssh-private'];
+formats['ssh'] = formats['ssh-private'];
+formats['dnssec'] = require('./formats/dnssec');
+
+function PrivateKey(opts) {
+ assert.object(opts, 'options');
+ Key.call(this, opts);
+
+ this._pubCache = undefined;
+}
+util.inherits(PrivateKey, Key);
+
+PrivateKey.formats = formats;
+
+PrivateKey.prototype.toBuffer = function (format, options) {
+ if (format === undefined)
+ format = 'pkcs1';
+ assert.string(format, 'format');
+ assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
+
+ return (formats[format].write(this, options));
+};
+
+PrivateKey.prototype.hash = function (algo, type) {
+ return (this.toPublic().hash(algo, type));
+};
+
+PrivateKey.prototype.fingerprint = function (algo, type) {
+ return (this.toPublic().fingerprint(algo, type));
+};
+
+PrivateKey.prototype.toPublic = function () {
+ if (this._pubCache)
+ return (this._pubCache);
+
+ var algInfo = algs.info[this.type];
+ var pubParts = [];
+ for (var i = 0; i < algInfo.parts.length; ++i) {
+ var p = algInfo.parts[i];
+ pubParts.push(this.part[p]);
+ }
+
+ this._pubCache = new Key({
+ type: this.type,
+ source: this,
+ parts: pubParts
+ });
+ if (this.comment)
+ this._pubCache.comment = this.comment;
+ return (this._pubCache);
+};
+
+PrivateKey.prototype.derive = function (newType) {
+ assert.string(newType, 'type');
+ var priv, pub, pair;
+
+ if (this.type === 'ed25519' && newType === 'curve25519') {
+ priv = this.part.k.data;
+ if (priv[0] === 0x00)
+ priv = priv.slice(1);
+
+ pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv));
+ pub = Buffer.from(pair.publicKey);
+
+ return (new PrivateKey({
+ type: 'curve25519',
+ parts: [
+ { name: 'A', data: utils.mpNormalize(pub) },
+ { name: 'k', data: utils.mpNormalize(priv) }
+ ]
+ }));
+ } else if (this.type === 'curve25519' && newType === 'ed25519') {
+ priv = this.part.k.data;
+ if (priv[0] === 0x00)
+ priv = priv.slice(1);
+
+ pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv));
+ pub = Buffer.from(pair.publicKey);
+
+ return (new PrivateKey({
+ type: 'ed25519',
+ parts: [
+ { name: 'A', data: utils.mpNormalize(pub) },
+ { name: 'k', data: utils.mpNormalize(priv) }
+ ]
+ }));
+ }
+ throw (new Error('Key derivation not supported from ' + this.type +
+ ' to ' + newType));
+};
+
+PrivateKey.prototype.createVerify = function (hashAlgo) {
+ return (this.toPublic().createVerify(hashAlgo));
+};
+
+PrivateKey.prototype.createSign = function (hashAlgo) {
+ if (hashAlgo === undefined)
+ hashAlgo = this.defaultHashAlgorithm();
+ assert.string(hashAlgo, 'hash algorithm');
+
+ /* ED25519 is not supported by OpenSSL, use a javascript impl. */
+ if (this.type === 'ed25519' && edCompat !== undefined)
+ return (new edCompat.Signer(this, hashAlgo));
+ if (this.type === 'curve25519')
+ throw (new Error('Curve25519 keys are not suitable for ' +
+ 'signing or verification'));
+
+ var v, nm, err;
+ try {
+ nm = hashAlgo.toUpperCase();
+ v = crypto.createSign(nm);
+ } catch (e) {
+ err = e;
+ }
+ if (v === undefined || (err instanceof Error &&
+ err.message.match(/Unknown message digest/))) {
+ nm = 'RSA-';
+ nm += hashAlgo.toUpperCase();
+ v = crypto.createSign(nm);
+ }
+ assert.ok(v, 'failed to create verifier');
+ var oldSign = v.sign.bind(v);
+ var key = this.toBuffer('pkcs1');
+ var type = this.type;
+ var curve = this.curve;
+ v.sign = function () {
+ var sig = oldSign(key);
+ if (typeof (sig) === 'string')
+ sig = Buffer.from(sig, 'binary');
+ sig = Signature.parse(sig, type, 'asn1');
+ sig.hashAlgorithm = hashAlgo;
+ sig.curve = curve;
+ return (sig);
+ };
+ return (v);
+};
+
+PrivateKey.parse = function (data, format, options) {
+ if (typeof (data) !== 'string')
+ assert.buffer(data, 'data');
+ if (format === undefined)
+ format = 'auto';
+ assert.string(format, 'format');
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
+
+ assert.object(formats[format], 'formats[format]');
+
+ try {
+ var k = formats[format].read(data, options);
+ assert.ok(k instanceof PrivateKey, 'key is not a private key');
+ if (!k.comment)
+ k.comment = options.filename;
+ return (k);
+ } catch (e) {
+ if (e.name === 'KeyEncryptedError')
+ throw (e);
+ throw (new KeyParseError(options.filename, format, e));
+ }
+};
+
+PrivateKey.isPrivateKey = function (obj, ver) {
+ return (utils.isCompatible(obj, PrivateKey, ver));
+};
+
+PrivateKey.generate = function (type, options) {
+ if (options === undefined)
+ options = {};
+ assert.object(options, 'options');
+
+ switch (type) {
+ case 'ecdsa':
+ if (options.curve === undefined)
+ options.curve = 'nistp256';
+ assert.string(options.curve, 'options.curve');
+ return (generateECDSA(options.curve));
+ case 'ed25519':
+ return (generateED25519());
+ default:
+ throw (new Error('Key generation not supported with key ' +
+ 'type "' + type + '"'));
+ }
+};
+
+/*
+ * API versions for PrivateKey:
+ * [1,0] -- initial ver
+ * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats
+ * [1,2] -- added defaultHashAlgorithm
+ * [1,3] -- added derive, ed, createDH
+ * [1,4] -- first tagged version
+ * [1,5] -- changed ed25519 part names and format
+ * [1,6] -- type arguments for hash() and fingerprint()
+ */
+PrivateKey.prototype._sshpkApiVersion = [1, 6];
+
+PrivateKey._oldVersionDetect = function (obj) {
+ assert.func(obj.toPublic);
+ assert.func(obj.createSign);
+ if (obj.derive)
+ return ([1, 3]);
+ if (obj.defaultHashAlgorithm)
+ return ([1, 2]);
+ if (obj.formats['auto'])
+ return ([1, 1]);
+ return ([1, 0]);
+};
diff --git a/node_modules/sshpk/lib/signature.js b/node_modules/sshpk/lib/signature.js
new file mode 100644
index 0000000..aa8fdbb
--- /dev/null
+++ b/node_modules/sshpk/lib/signature.js
@@ -0,0 +1,314 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = Signature;
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var algs = require('./algs');
+var crypto = require('crypto');
+var errs = require('./errors');
+var utils = require('./utils');
+var asn1 = require('asn1');
+var SSHBuffer = require('./ssh-buffer');
+
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+var SignatureParseError = errs.SignatureParseError;
+
+function Signature(opts) {
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.parts, 'options.parts');
+ assert.string(opts.type, 'options.type');
+
+ var partLookup = {};
+ for (var i = 0; i < opts.parts.length; ++i) {
+ var part = opts.parts[i];
+ partLookup[part.name] = part;
+ }
+
+ this.type = opts.type;
+ this.hashAlgorithm = opts.hashAlgo;
+ this.curve = opts.curve;
+ this.parts = opts.parts;
+ this.part = partLookup;
+}
+
+Signature.prototype.toBuffer = function (format) {
+ if (format === undefined)
+ format = 'asn1';
+ assert.string(format, 'format');
+
+ var buf;
+ var stype = 'ssh-' + this.type;
+
+ switch (this.type) {
+ case 'rsa':
+ switch (this.hashAlgorithm) {
+ case 'sha256':
+ stype = 'rsa-sha2-256';
+ break;
+ case 'sha512':
+ stype = 'rsa-sha2-512';
+ break;
+ case 'sha1':
+ case undefined:
+ break;
+ default:
+ throw (new Error('SSH signature ' +
+ 'format does not support hash ' +
+ 'algorithm ' + this.hashAlgorithm));
+ }
+ if (format === 'ssh') {
+ buf = new SSHBuffer({});
+ buf.writeString(stype);
+ buf.writePart(this.part.sig);
+ return (buf.toBuffer());
+ } else {
+ return (this.part.sig.data);
+ }
+ break;
+
+ case 'ed25519':
+ if (format === 'ssh') {
+ buf = new SSHBuffer({});
+ buf.writeString(stype);
+ buf.writePart(this.part.sig);
+ return (buf.toBuffer());
+ } else {
+ return (this.part.sig.data);
+ }
+ break;
+
+ case 'dsa':
+ case 'ecdsa':
+ var r, s;
+ if (format === 'asn1') {
+ var der = new asn1.BerWriter();
+ der.startSequence();
+ r = utils.mpNormalize(this.part.r.data);
+ s = utils.mpNormalize(this.part.s.data);
+ der.writeBuffer(r, asn1.Ber.Integer);
+ der.writeBuffer(s, asn1.Ber.Integer);
+ der.endSequence();
+ return (der.buffer);
+ } else if (format === 'ssh' && this.type === 'dsa') {
+ buf = new SSHBuffer({});
+ buf.writeString('ssh-dss');
+ r = this.part.r.data;
+ if (r.length > 20 && r[0] === 0x00)
+ r = r.slice(1);
+ s = this.part.s.data;
+ if (s.length > 20 && s[0] === 0x00)
+ s = s.slice(1);
+ if ((this.hashAlgorithm &&
+ this.hashAlgorithm !== 'sha1') ||
+ r.length + s.length !== 40) {
+ throw (new Error('OpenSSH only supports ' +
+ 'DSA signatures with SHA1 hash'));
+ }
+ buf.writeBuffer(Buffer.concat([r, s]));
+ return (buf.toBuffer());
+ } else if (format === 'ssh' && this.type === 'ecdsa') {
+ var inner = new SSHBuffer({});
+ r = this.part.r.data;
+ inner.writeBuffer(r);
+ inner.writePart(this.part.s);
+
+ buf = new SSHBuffer({});
+ /* XXX: find a more proper way to do this? */
+ var curve;
+ if (r[0] === 0x00)
+ r = r.slice(1);
+ var sz = r.length * 8;
+ if (sz === 256)
+ curve = 'nistp256';
+ else if (sz === 384)
+ curve = 'nistp384';
+ else if (sz === 528)
+ curve = 'nistp521';
+ buf.writeString('ecdsa-sha2-' + curve);
+ buf.writeBuffer(inner.toBuffer());
+ return (buf.toBuffer());
+ }
+ throw (new Error('Invalid signature format'));
+ default:
+ throw (new Error('Invalid signature data'));
+ }
+};
+
+Signature.prototype.toString = function (format) {
+ assert.optionalString(format, 'format');
+ return (this.toBuffer(format).toString('base64'));
+};
+
+Signature.parse = function (data, type, format) {
+ if (typeof (data) === 'string')
+ data = Buffer.from(data, 'base64');
+ assert.buffer(data, 'data');
+ assert.string(format, 'format');
+ assert.string(type, 'type');
+
+ var opts = {};
+ opts.type = type.toLowerCase();
+ opts.parts = [];
+
+ try {
+ assert.ok(data.length > 0, 'signature must not be empty');
+ switch (opts.type) {
+ case 'rsa':
+ return (parseOneNum(data, type, format, opts));
+ case 'ed25519':
+ return (parseOneNum(data, type, format, opts));
+
+ case 'dsa':
+ case 'ecdsa':
+ if (format === 'asn1')
+ return (parseDSAasn1(data, type, format, opts));
+ else if (opts.type === 'dsa')
+ return (parseDSA(data, type, format, opts));
+ else
+ return (parseECDSA(data, type, format, opts));
+
+ default:
+ throw (new InvalidAlgorithmError(type));
+ }
+
+ } catch (e) {
+ if (e instanceof InvalidAlgorithmError)
+ throw (e);
+ throw (new SignatureParseError(type, format, e));
+ }
+};
+
+function parseOneNum(data, type, format, opts) {
+ if (format === 'ssh') {
+ try {
+ var buf = new SSHBuffer({buffer: data});
+ var head = buf.readString();
+ } catch (e) {
+ /* fall through */
+ }
+ if (buf !== undefined) {
+ var msg = 'SSH signature does not match expected ' +
+ 'type (expected ' + type + ', got ' + head + ')';
+ switch (head) {
+ case 'ssh-rsa':
+ assert.strictEqual(type, 'rsa', msg);
+ opts.hashAlgo = 'sha1';
+ break;
+ case 'rsa-sha2-256':
+ assert.strictEqual(type, 'rsa', msg);
+ opts.hashAlgo = 'sha256';
+ break;
+ case 'rsa-sha2-512':
+ assert.strictEqual(type, 'rsa', msg);
+ opts.hashAlgo = 'sha512';
+ break;
+ case 'ssh-ed25519':
+ assert.strictEqual(type, 'ed25519', msg);
+ opts.hashAlgo = 'sha512';
+ break;
+ default:
+ throw (new Error('Unknown SSH signature ' +
+ 'type: ' + head));
+ }
+ var sig = buf.readPart();
+ assert.ok(buf.atEnd(), 'extra trailing bytes');
+ sig.name = 'sig';
+ opts.parts.push(sig);
+ return (new Signature(opts));
+ }
+ }
+ opts.parts.push({name: 'sig', data: data});
+ return (new Signature(opts));
+}
+
+function parseDSAasn1(data, type, format, opts) {
+ var der = new asn1.BerReader(data);
+ der.readSequence();
+ var r = der.readString(asn1.Ber.Integer, true);
+ var s = der.readString(asn1.Ber.Integer, true);
+
+ opts.parts.push({name: 'r', data: utils.mpNormalize(r)});
+ opts.parts.push({name: 's', data: utils.mpNormalize(s)});
+
+ return (new Signature(opts));
+}
+
+function parseDSA(data, type, format, opts) {
+ if (data.length != 40) {
+ var buf = new SSHBuffer({buffer: data});
+ var d = buf.readBuffer();
+ if (d.toString('ascii') === 'ssh-dss')
+ d = buf.readBuffer();
+ assert.ok(buf.atEnd(), 'extra trailing bytes');
+ assert.strictEqual(d.length, 40, 'invalid inner length');
+ data = d;
+ }
+ opts.parts.push({name: 'r', data: data.slice(0, 20)});
+ opts.parts.push({name: 's', data: data.slice(20, 40)});
+ return (new Signature(opts));
+}
+
+function parseECDSA(data, type, format, opts) {
+ var buf = new SSHBuffer({buffer: data});
+
+ var r, s;
+ var inner = buf.readBuffer();
+ var stype = inner.toString('ascii');
+ if (stype.slice(0, 6) === 'ecdsa-') {
+ var parts = stype.split('-');
+ assert.strictEqual(parts[0], 'ecdsa');
+ assert.strictEqual(parts[1], 'sha2');
+ opts.curve = parts[2];
+ switch (opts.curve) {
+ case 'nistp256':
+ opts.hashAlgo = 'sha256';
+ break;
+ case 'nistp384':
+ opts.hashAlgo = 'sha384';
+ break;
+ case 'nistp521':
+ opts.hashAlgo = 'sha512';
+ break;
+ default:
+ throw (new Error('Unsupported ECDSA curve: ' +
+ opts.curve));
+ }
+ inner = buf.readBuffer();
+ assert.ok(buf.atEnd(), 'extra trailing bytes on outer');
+ buf = new SSHBuffer({buffer: inner});
+ r = buf.readPart();
+ } else {
+ r = {data: inner};
+ }
+
+ s = buf.readPart();
+ assert.ok(buf.atEnd(), 'extra trailing bytes');
+
+ r.name = 'r';
+ s.name = 's';
+
+ opts.parts.push(r);
+ opts.parts.push(s);
+ return (new Signature(opts));
+}
+
+Signature.isSignature = function (obj, ver) {
+ return (utils.isCompatible(obj, Signature, ver));
+};
+
+/*
+ * API versions for Signature:
+ * [1,0] -- initial ver
+ * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent
+ * hashAlgorithm property
+ * [2,1] -- first tagged version
+ */
+Signature.prototype._sshpkApiVersion = [2, 1];
+
+Signature._oldVersionDetect = function (obj) {
+ assert.func(obj.toBuffer);
+ if (obj.hasOwnProperty('hashAlgorithm'))
+ return ([2, 0]);
+ return ([1, 0]);
+};
diff --git a/node_modules/sshpk/lib/ssh-buffer.js b/node_modules/sshpk/lib/ssh-buffer.js
new file mode 100644
index 0000000..1dd286c
--- /dev/null
+++ b/node_modules/sshpk/lib/ssh-buffer.js
@@ -0,0 +1,149 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = SSHBuffer;
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+
+function SSHBuffer(opts) {
+ assert.object(opts, 'options');
+ if (opts.buffer !== undefined)
+ assert.buffer(opts.buffer, 'options.buffer');
+
+ this._size = opts.buffer ? opts.buffer.length : 1024;
+ this._buffer = opts.buffer || Buffer.alloc(this._size);
+ this._offset = 0;
+}
+
+SSHBuffer.prototype.toBuffer = function () {
+ return (this._buffer.slice(0, this._offset));
+};
+
+SSHBuffer.prototype.atEnd = function () {
+ return (this._offset >= this._buffer.length);
+};
+
+SSHBuffer.prototype.remainder = function () {
+ return (this._buffer.slice(this._offset));
+};
+
+SSHBuffer.prototype.skip = function (n) {
+ this._offset += n;
+};
+
+SSHBuffer.prototype.expand = function () {
+ this._size *= 2;
+ var buf = Buffer.alloc(this._size);
+ this._buffer.copy(buf, 0);
+ this._buffer = buf;
+};
+
+SSHBuffer.prototype.readPart = function () {
+ return ({data: this.readBuffer()});
+};
+
+SSHBuffer.prototype.readBuffer = function () {
+ var len = this._buffer.readUInt32BE(this._offset);
+ this._offset += 4;
+ assert.ok(this._offset + len <= this._buffer.length,
+ 'length out of bounds at +0x' + this._offset.toString(16) +
+ ' (data truncated?)');
+ var buf = this._buffer.slice(this._offset, this._offset + len);
+ this._offset += len;
+ return (buf);
+};
+
+SSHBuffer.prototype.readString = function () {
+ return (this.readBuffer().toString());
+};
+
+SSHBuffer.prototype.readCString = function () {
+ var offset = this._offset;
+ while (offset < this._buffer.length &&
+ this._buffer[offset] !== 0x00)
+ offset++;
+ assert.ok(offset < this._buffer.length, 'c string does not terminate');
+ var str = this._buffer.slice(this._offset, offset).toString();
+ this._offset = offset + 1;
+ return (str);
+};
+
+SSHBuffer.prototype.readInt = function () {
+ var v = this._buffer.readUInt32BE(this._offset);
+ this._offset += 4;
+ return (v);
+};
+
+SSHBuffer.prototype.readInt64 = function () {
+ assert.ok(this._offset + 8 < this._buffer.length,
+ 'buffer not long enough to read Int64');
+ var v = this._buffer.slice(this._offset, this._offset + 8);
+ this._offset += 8;
+ return (v);
+};
+
+SSHBuffer.prototype.readChar = function () {
+ var v = this._buffer[this._offset++];
+ return (v);
+};
+
+SSHBuffer.prototype.writeBuffer = function (buf) {
+ while (this._offset + 4 + buf.length > this._size)
+ this.expand();
+ this._buffer.writeUInt32BE(buf.length, this._offset);
+ this._offset += 4;
+ buf.copy(this._buffer, this._offset);
+ this._offset += buf.length;
+};
+
+SSHBuffer.prototype.writeString = function (str) {
+ this.writeBuffer(Buffer.from(str, 'utf8'));
+};
+
+SSHBuffer.prototype.writeCString = function (str) {
+ while (this._offset + 1 + str.length > this._size)
+ this.expand();
+ this._buffer.write(str, this._offset);
+ this._offset += str.length;
+ this._buffer[this._offset++] = 0;
+};
+
+SSHBuffer.prototype.writeInt = function (v) {
+ while (this._offset + 4 > this._size)
+ this.expand();
+ this._buffer.writeUInt32BE(v, this._offset);
+ this._offset += 4;
+};
+
+SSHBuffer.prototype.writeInt64 = function (v) {
+ assert.buffer(v, 'value');
+ if (v.length > 8) {
+ var lead = v.slice(0, v.length - 8);
+ for (var i = 0; i < lead.length; ++i) {
+ assert.strictEqual(lead[i], 0,
+ 'must fit in 64 bits of precision');
+ }
+ v = v.slice(v.length - 8, v.length);
+ }
+ while (this._offset + 8 > this._size)
+ this.expand();
+ v.copy(this._buffer, this._offset);
+ this._offset += 8;
+};
+
+SSHBuffer.prototype.writeChar = function (v) {
+ while (this._offset + 1 > this._size)
+ this.expand();
+ this._buffer[this._offset++] = v;
+};
+
+SSHBuffer.prototype.writePart = function (p) {
+ this.writeBuffer(p.data);
+};
+
+SSHBuffer.prototype.write = function (buf) {
+ while (this._offset + buf.length > this._size)
+ this.expand();
+ buf.copy(this._buffer, this._offset);
+ this._offset += buf.length;
+};
diff --git a/node_modules/sshpk/lib/utils.js b/node_modules/sshpk/lib/utils.js
new file mode 100644
index 0000000..6b83a32
--- /dev/null
+++ b/node_modules/sshpk/lib/utils.js
@@ -0,0 +1,404 @@
+// Copyright 2015 Joyent, Inc.
+
+module.exports = {
+ bufferSplit: bufferSplit,
+ addRSAMissing: addRSAMissing,
+ calculateDSAPublic: calculateDSAPublic,
+ calculateED25519Public: calculateED25519Public,
+ calculateX25519Public: calculateX25519Public,
+ mpNormalize: mpNormalize,
+ mpDenormalize: mpDenormalize,
+ ecNormalize: ecNormalize,
+ countZeros: countZeros,
+ assertCompatible: assertCompatible,
+ isCompatible: isCompatible,
+ opensslKeyDeriv: opensslKeyDeriv,
+ opensshCipherInfo: opensshCipherInfo,
+ publicFromPrivateECDSA: publicFromPrivateECDSA,
+ zeroPadToLength: zeroPadToLength,
+ writeBitString: writeBitString,
+ readBitString: readBitString,
+ pbkdf2: pbkdf2
+};
+
+var assert = require('assert-plus');
+var Buffer = require('safer-buffer').Buffer;
+var PrivateKey = require('./private-key');
+var Key = require('./key');
+var crypto = require('crypto');
+var algs = require('./algs');
+var asn1 = require('asn1');
+
+var ec = require('ecc-jsbn/lib/ec');
+var jsbn = require('jsbn').BigInteger;
+var nacl = require('tweetnacl');
+
+var MAX_CLASS_DEPTH = 3;
+
+function isCompatible(obj, klass, needVer) {
+ if (obj === null || typeof (obj) !== 'object')
+ return (false);
+ if (needVer === undefined)
+ needVer = klass.prototype._sshpkApiVersion;
+ if (obj instanceof klass &&
+ klass.prototype._sshpkApiVersion[0] == needVer[0])
+ return (true);
+ var proto = Object.getPrototypeOf(obj);
+ var depth = 0;
+ while (proto.constructor.name !== klass.name) {
+ proto = Object.getPrototypeOf(proto);
+ if (!proto || ++depth > MAX_CLASS_DEPTH)
+ return (false);
+ }
+ if (proto.constructor.name !== klass.name)
+ return (false);
+ var ver = proto._sshpkApiVersion;
+ if (ver === undefined)
+ ver = klass._oldVersionDetect(obj);
+ if (ver[0] != needVer[0] || ver[1] < needVer[1])
+ return (false);
+ return (true);
+}
+
+function assertCompatible(obj, klass, needVer, name) {
+ if (name === undefined)
+ name = 'object';
+ assert.ok(obj, name + ' must not be null');
+ assert.object(obj, name + ' must be an object');
+ if (needVer === undefined)
+ needVer = klass.prototype._sshpkApiVersion;
+ if (obj instanceof klass &&
+ klass.prototype._sshpkApiVersion[0] == needVer[0])
+ return;
+ var proto = Object.getPrototypeOf(obj);
+ var depth = 0;
+ while (proto.constructor.name !== klass.name) {
+ proto = Object.getPrototypeOf(proto);
+ assert.ok(proto && ++depth <= MAX_CLASS_DEPTH,
+ name + ' must be a ' + klass.name + ' instance');
+ }
+ assert.strictEqual(proto.constructor.name, klass.name,
+ name + ' must be a ' + klass.name + ' instance');
+ var ver = proto._sshpkApiVersion;
+ if (ver === undefined)
+ ver = klass._oldVersionDetect(obj);
+ assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1],
+ name + ' must be compatible with ' + klass.name + ' klass ' +
+ 'version ' + needVer[0] + '.' + needVer[1]);
+}
+
+var CIPHER_LEN = {
+ 'des-ede3-cbc': { key: 24, iv: 8 },
+ 'aes-128-cbc': { key: 16, iv: 16 },
+ 'aes-256-cbc': { key: 32, iv: 16 }
+};
+var PKCS5_SALT_LEN = 8;
+
+function opensslKeyDeriv(cipher, salt, passphrase, count) {
+ assert.buffer(salt, 'salt');
+ assert.buffer(passphrase, 'passphrase');
+ assert.number(count, 'iteration count');
+
+ var clen = CIPHER_LEN[cipher];
+ assert.object(clen, 'supported cipher');
+
+ salt = salt.slice(0, PKCS5_SALT_LEN);
+
+ var D, D_prev, bufs;
+ var material = Buffer.alloc(0);
+ while (material.length < clen.key + clen.iv) {
+ bufs = [];
+ if (D_prev)
+ bufs.push(D_prev);
+ bufs.push(passphrase);
+ bufs.push(salt);
+ D = Buffer.concat(bufs);
+ for (var j = 0; j < count; ++j)
+ D = crypto.createHash('md5').update(D).digest();
+ material = Buffer.concat([material, D]);
+ D_prev = D;
+ }
+
+ return ({
+ key: material.slice(0, clen.key),
+ iv: material.slice(clen.key, clen.key + clen.iv)
+ });
+}
+
+/* See: RFC2898 */
+function pbkdf2(hashAlg, salt, iterations, size, passphrase) {
+ var hkey = Buffer.alloc(salt.length + 4);
+ salt.copy(hkey);
+
+ var gen = 0, ts = [];
+ var i = 1;
+ while (gen < size) {
+ var t = T(i++);
+ gen += t.length;
+ ts.push(t);
+ }
+ return (Buffer.concat(ts).slice(0, size));
+
+ function T(I) {
+ hkey.writeUInt32BE(I, hkey.length - 4);
+
+ var hmac = crypto.createHmac(hashAlg, passphrase);
+ hmac.update(hkey);
+
+ var Ti = hmac.digest();
+ var Uc = Ti;
+ var c = 1;
+ while (c++ < iterations) {
+ hmac = crypto.createHmac(hashAlg, passphrase);
+ hmac.update(Uc);
+ Uc = hmac.digest();
+ for (var x = 0; x < Ti.length; ++x)
+ Ti[x] ^= Uc[x];
+ }
+ return (Ti);
+ }
+}
+
+/* Count leading zero bits on a buffer */
+function countZeros(buf) {
+ var o = 0, obit = 8;
+ while (o < buf.length) {
+ var mask = (1 << obit);
+ if ((buf[o] & mask) === mask)
+ break;
+ obit--;
+ if (obit < 0) {
+ o++;
+ obit = 8;
+ }
+ }
+ return (o*8 + (8 - obit) - 1);
+}
+
+function bufferSplit(buf, chr) {
+ assert.buffer(buf);
+ assert.string(chr);
+
+ var parts = [];
+ var lastPart = 0;
+ var matches = 0;
+ for (var i = 0; i < buf.length; ++i) {
+ if (buf[i] === chr.charCodeAt(matches))
+ ++matches;
+ else if (buf[i] === chr.charCodeAt(0))
+ matches = 1;
+ else
+ matches = 0;
+
+ if (matches >= chr.length) {
+ var newPart = i + 1;
+ parts.push(buf.slice(lastPart, newPart - matches));
+ lastPart = newPart;
+ matches = 0;
+ }
+ }
+ if (lastPart <= buf.length)
+ parts.push(buf.slice(lastPart, buf.length));
+
+ return (parts);
+}
+
+function ecNormalize(buf, addZero) {
+ assert.buffer(buf);
+ if (buf[0] === 0x00 && buf[1] === 0x04) {
+ if (addZero)
+ return (buf);
+ return (buf.slice(1));
+ } else if (buf[0] === 0x04) {
+ if (!addZero)
+ return (buf);
+ } else {
+ while (buf[0] === 0x00)
+ buf = buf.slice(1);
+ if (buf[0] === 0x02 || buf[0] === 0x03)
+ throw (new Error('Compressed elliptic curve points ' +
+ 'are not supported'));
+ if (buf[0] !== 0x04)
+ throw (new Error('Not a valid elliptic curve point'));
+ if (!addZero)
+ return (buf);
+ }
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x0;
+ buf.copy(b, 1);
+ return (b);
+}
+
+function readBitString(der, tag) {
+ if (tag === undefined)
+ tag = asn1.Ber.BitString;
+ var buf = der.readString(tag, true);
+ assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' +
+ 'not supported (0x' + buf[0].toString(16) + ')');
+ return (buf.slice(1));
+}
+
+function writeBitString(der, buf, tag) {
+ if (tag === undefined)
+ tag = asn1.Ber.BitString;
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x00;
+ buf.copy(b, 1);
+ der.writeBuffer(b, tag);
+}
+
+function mpNormalize(buf) {
+ assert.buffer(buf);
+ while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00)
+ buf = buf.slice(1);
+ if ((buf[0] & 0x80) === 0x80) {
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x00;
+ buf.copy(b, 1);
+ buf = b;
+ }
+ return (buf);
+}
+
+function mpDenormalize(buf) {
+ assert.buffer(buf);
+ while (buf.length > 1 && buf[0] === 0x00)
+ buf = buf.slice(1);
+ return (buf);
+}
+
+function zeroPadToLength(buf, len) {
+ assert.buffer(buf);
+ assert.number(len);
+ while (buf.length > len) {
+ assert.equal(buf[0], 0x00);
+ buf = buf.slice(1);
+ }
+ while (buf.length < len) {
+ var b = Buffer.alloc(buf.length + 1);
+ b[0] = 0x00;
+ buf.copy(b, 1);
+ buf = b;
+ }
+ return (buf);
+}
+
+function bigintToMpBuf(bigint) {
+ var buf = Buffer.from(bigint.toByteArray());
+ buf = mpNormalize(buf);
+ return (buf);
+}
+
+function calculateDSAPublic(g, p, x) {
+ assert.buffer(g);
+ assert.buffer(p);
+ assert.buffer(x);
+ g = new jsbn(g);
+ p = new jsbn(p);
+ x = new jsbn(x);
+ var y = g.modPow(x, p);
+ var ybuf = bigintToMpBuf(y);
+ return (ybuf);
+}
+
+function calculateED25519Public(k) {
+ assert.buffer(k);
+
+ var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k));
+ return (Buffer.from(kp.publicKey));
+}
+
+function calculateX25519Public(k) {
+ assert.buffer(k);
+
+ var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k));
+ return (Buffer.from(kp.publicKey));
+}
+
+function addRSAMissing(key) {
+ assert.object(key);
+ assertCompatible(key, PrivateKey, [1, 1]);
+
+ var d = new jsbn(key.part.d.data);
+ var buf;
+
+ if (!key.part.dmodp) {
+ var p = new jsbn(key.part.p.data);
+ var dmodp = d.mod(p.subtract(1));
+
+ buf = bigintToMpBuf(dmodp);
+ key.part.dmodp = {name: 'dmodp', data: buf};
+ key.parts.push(key.part.dmodp);
+ }
+ if (!key.part.dmodq) {
+ var q = new jsbn(key.part.q.data);
+ var dmodq = d.mod(q.subtract(1));
+
+ buf = bigintToMpBuf(dmodq);
+ key.part.dmodq = {name: 'dmodq', data: buf};
+ key.parts.push(key.part.dmodq);
+ }
+}
+
+function publicFromPrivateECDSA(curveName, priv) {
+ assert.string(curveName, 'curveName');
+ assert.buffer(priv);
+ var params = algs.curves[curveName];
+ var p = new jsbn(params.p);
+ var a = new jsbn(params.a);
+ var b = new jsbn(params.b);
+ var curve = new ec.ECCurveFp(p, a, b);
+ var G = curve.decodePointHex(params.G.toString('hex'));
+
+ var d = new jsbn(mpNormalize(priv));
+ var pub = G.multiply(d);
+ pub = Buffer.from(curve.encodePointHex(pub), 'hex');
+
+ var parts = [];
+ parts.push({name: 'curve', data: Buffer.from(curveName)});
+ parts.push({name: 'Q', data: pub});
+
+ var key = new Key({type: 'ecdsa', curve: curve, parts: parts});
+ return (key);
+}
+
+function opensshCipherInfo(cipher) {
+ var inf = {};
+ switch (cipher) {
+ case '3des-cbc':
+ inf.keySize = 24;
+ inf.blockSize = 8;
+ inf.opensslName = 'des-ede3-cbc';
+ break;
+ case 'blowfish-cbc':
+ inf.keySize = 16;
+ inf.blockSize = 8;
+ inf.opensslName = 'bf-cbc';
+ break;
+ case 'aes128-cbc':
+ case 'aes128-ctr':
+ case 'aes128-gcm@openssh.com':
+ inf.keySize = 16;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-128-' + cipher.slice(7, 10);
+ break;
+ case 'aes192-cbc':
+ case 'aes192-ctr':
+ case 'aes192-gcm@openssh.com':
+ inf.keySize = 24;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-192-' + cipher.slice(7, 10);
+ break;
+ case 'aes256-cbc':
+ case 'aes256-ctr':
+ case 'aes256-gcm@openssh.com':
+ inf.keySize = 32;
+ inf.blockSize = 16;
+ inf.opensslName = 'aes-256-' + cipher.slice(7, 10);
+ break;
+ default:
+ throw (new Error(
+ 'Unsupported openssl cipher "' + cipher + '"'));
+ }
+ return (inf);
+}
diff --git a/node_modules/sshpk/man/man1/sshpk-conv.1 b/node_modules/sshpk/man/man1/sshpk-conv.1
new file mode 100644
index 0000000..0887dce
--- /dev/null
+++ b/node_modules/sshpk/man/man1/sshpk-conv.1
@@ -0,0 +1,135 @@
+.TH sshpk\-conv 1 "Jan 2016" sshpk "sshpk Commands"
+.SH NAME
+.PP
+sshpk\-conv \- convert between key formats
+.SH SYNOPSYS
+.PP
+\fB\fCsshpk\-conv\fR \-t FORMAT [FILENAME] [OPTIONS...]
+.PP
+\fB\fCsshpk\-conv\fR \-i [FILENAME] [OPTIONS...]
+.SH DESCRIPTION
+.PP
+Reads in a public or private key and converts it between different formats,
+particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7
+formats.
+.PP
+In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to
+stderr information about its nature, size and fingerprint.
+.SH EXAMPLES
+.PP
+Assume the following SSH\-format public key in \fB\fCid_ecdsa.pub\fR:
+.PP
+.RS
+.nf
+ecdsa\-sha2\-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host
+.fi
+.RE
+.PP
+Identify it with \fB\fC\-i\fR:
+.PP
+.RS
+.nf
+$ sshpk\-conv \-i id_ecdsa.pub
+id_ecdsa: a 256 bit ECDSA public key
+ECDSA curve: nistp256
+Comment: user@host
+Fingerprint:
+ SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k
+ 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51
+.fi
+.RE
+.PP
+Convert it to \fB\fCpkcs8\fR format, for use with e.g. OpenSSL:
+.PP
+.RS
+.nf
+$ sshpk\-conv \-t pkcs8 id_ecdsa
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR
+zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg==
+\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+.fi
+.RE
+.PP
+Retrieve the public half of a private key:
+.PP
+.RS
+.nf
+$ openssl genrsa 2048 | sshpk\-conv \-t ssh \-c foo@bar
+ssh\-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar
+.fi
+.RE
+.PP
+Convert a private key to PKCS#1 (OpenSSL) format from a new\-style OpenSSH key
+format (the \fB\fCssh\-keygen \-o\fR format):
+.PP
+.RS
+.nf
+$ ssh\-keygen \-o \-f foobar
+\&...
+$ sshpk\-conv \-p \-t pkcs1 foobar
+\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\-
+MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL....
+\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\-
+.fi
+.RE
+.SH OPTIONS
+.TP
+\fB\fC\-i, \-\-identify\fR
+Instead of converting the key, output identifying information about it to
+stderr, including its type, size and fingerprints.
+.TP
+\fB\fC\-p, \-\-private\fR
+Treat the key as a private key instead of a public key (the default). If you
+supply \fB\fCsshpk\-conv\fR with a private key and do not give this option, it will
+extract only the public half of the key from it and work with that.
+.TP
+\fB\fC\-f PATH, \-\-file=PATH\fR
+Input file to take the key from instead of stdin. If a filename is supplied
+as a positional argument, it is equivalent to using this option.
+.TP
+\fB\fC\-o PATH, \-\-out=PATH\fR
+Output file name to use instead of stdout.
+.PP
+\fB\fC\-T FORMAT, \-\-informat=FORMAT\fR
+.TP
+\fB\fC\-t FORMAT, \-\-outformat=FORMAT\fR
+Selects the input and output formats to be used (see FORMATS, below).
+.TP
+\fB\fC\-c TEXT, \-\-comment=TEXT\fR
+Sets the key comment for the output file, if supported.
+.SH FORMATS
+.PP
+Currently supported formats:
+.TP
+\fB\fCpem, pkcs1\fR
+The standard PEM format used by older OpenSSH and most TLS libraries such as
+OpenSSL. The classic \fB\fCid_rsa\fR file is usually in this format. It is an ASN.1
+encoded structure, base64\-encoded and placed between PEM headers.
+.TP
+\fB\fCssh\fR
+The SSH public key text format (the format of an \fB\fCid_rsa.pub\fR file). A single
+line, containing 3 space separated parts: the key type, key body and optional
+key comment.
+.TP
+\fB\fCpkcs8\fR
+A newer PEM format, usually used only for public keys by TLS libraries such
+as OpenSSL. The ASN.1 structure is more generic than that of \fB\fCpkcs1\fR\&.
+.TP
+\fB\fCopenssh\fR
+The new \fB\fCssh\-keygen \-o\fR format from OpenSSH. This can be mistaken for a PEM
+encoding but is actually an OpenSSH internal format.
+.TP
+\fB\fCrfc4253\fR
+The internal binary format of keys when sent over the wire in the SSH
+protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol.
+.SH SEE ALSO
+.PP
+.BR ssh-keygen (1),
+.BR openssl (1)
+.SH BUGS
+.PP
+Encrypted (password\-protected) keys are not supported.
+.PP
+Report bugs at Github
+\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
diff --git a/node_modules/sshpk/man/man1/sshpk-sign.1 b/node_modules/sshpk/man/man1/sshpk-sign.1
new file mode 100644
index 0000000..749916b
--- /dev/null
+++ b/node_modules/sshpk/man/man1/sshpk-sign.1
@@ -0,0 +1,81 @@
+.TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands"
+.SH NAME
+.PP
+sshpk\-sign \- sign data using an SSH key
+.SH SYNOPSYS
+.PP
+\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...]
+.SH DESCRIPTION
+.PP
+Takes in arbitrary bytes, and signs them using an SSH private key. The key can
+be of any type or format supported by the \fB\fCsshpk\fR library, including the
+standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8.
+.PP
+The signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fR
+option is given.
+.SH EXAMPLES
+.PP
+Signing with default settings:
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa
+MEUCIAMdLS/vXrrtWFepwe...
+.fi
+.RE
+.PP
+Signing in SSH (RFC 4253) format (rather than the default ASN.1):
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t ssh
+AAAAFGVjZHNhLXNoYTIt...
+.fi
+.RE
+.PP
+Saving the binary signature to a file:
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\
+ \-o signature.bin \-b
+$ cat signature.bin | base64
+MEUCIAMdLS/vXrrtWFepwe...
+.fi
+.RE
+.SH OPTIONS
+.TP
+\fB\fC\-v, \-\-verbose\fR
+Print extra information about the key and signature to stderr when signing.
+.TP
+\fB\fC\-b, \-\-binary\fR
+Don't base64\-encode the signature before outputting it.
+.TP
+\fB\fC\-i KEY, \-\-identity=KEY\fR
+Select the key to be used for signing. \fB\fCKEY\fR must be a relative or absolute
+filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR library
+is supported, including OpenSSH formats and standard PEM PKCS.
+.TP
+\fB\fC\-f PATH, \-\-file=PATH\fR
+Input file to sign instead of stdin.
+.TP
+\fB\fC\-o PATH, \-\-out=PATH\fR
+Output file to save signature in instead of stdout.
+.TP
+\fB\fC\-H HASH, \-\-hash=HASH\fR
+Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR,
+\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash
+algorithms may be used (e.g. ED25519 keys can only use SHA\-512).
+.TP
+\fB\fC\-t FORMAT, \-\-format=FORMAT\fR
+Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for
+ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format
+used with TLS and typically the standard in most non\-SSH libraries (e.g.
+OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent.
+.SH SEE ALSO
+.PP
+.BR sshpk-verify (1)
+.SH BUGS
+.PP
+Report bugs at Github
+\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
diff --git a/node_modules/sshpk/man/man1/sshpk-verify.1 b/node_modules/sshpk/man/man1/sshpk-verify.1
new file mode 100644
index 0000000..f79169d
--- /dev/null
+++ b/node_modules/sshpk/man/man1/sshpk-verify.1
@@ -0,0 +1,68 @@
+.TH sshpk\-verify 1 "Jan 2016" sshpk "sshpk Commands"
+.SH NAME
+.PP
+sshpk\-verify \- verify a signature on data using an SSH key
+.SH SYNOPSYS
+.PP
+\fB\fCsshpk\-verify\fR \-i KEYPATH \-s SIGNATURE [OPTION...]
+.SH DESCRIPTION
+.PP
+Takes in arbitrary bytes and a Base64\-encoded signature, and verifies that the
+signature was produced by the private half of the given SSH public key.
+.SH EXAMPLES
+.PP
+.RS
+.nf
+$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s MEUCIQCYp...
+OK
+$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s GARBAGE...
+NOT OK
+.fi
+.RE
+.SH EXIT STATUS
+.TP
+\fB\fC0\fR
+Signature validates and matches the key.
+.TP
+\fB\fC1\fR
+Signature is parseable and the correct length but does not match the key or
+otherwise is invalid.
+.TP
+\fB\fC2\fR
+The signature or key could not be parsed.
+.TP
+\fB\fC3\fR
+Invalid commandline options were supplied.
+.SH OPTIONS
+.TP
+\fB\fC\-v, \-\-verbose\fR
+Print extra information about the key and signature to stderr when verifying.
+.TP
+\fB\fC\-i KEY, \-\-identity=KEY\fR
+Select the key to be used for verification. \fB\fCKEY\fR must be a relative or
+absolute filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR
+library is supported, including OpenSSH formats and standard PEM PKCS.
+.TP
+\fB\fC\-s BASE64, \-\-signature=BASE64\fR
+Supplies the base64\-encoded signature to be verified.
+.TP
+\fB\fC\-f PATH, \-\-file=PATH\fR
+Input file to verify instead of stdin.
+.TP
+\fB\fC\-H HASH, \-\-hash=HASH\fR
+Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR,
+\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash
+algorithms may be used (e.g. ED25519 keys can only use SHA\-512).
+.TP
+\fB\fC\-t FORMAT, \-\-format=FORMAT\fR
+Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for
+ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format
+used with TLS and typically the standard in most non\-SSH libraries (e.g.
+OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent.
+.SH SEE ALSO
+.PP
+.BR sshpk-sign (1)
+.SH BUGS
+.PP
+Report bugs at Github
+\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
diff --git a/node_modules/sshpk/package.json b/node_modules/sshpk/package.json
new file mode 100644
index 0000000..cc78787
--- /dev/null
+++ b/node_modules/sshpk/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "sshpk",
+ "version": "1.16.1",
+ "description": "A library for finding and using SSH public keys",
+ "main": "lib/index.js",
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/joyent/node-sshpk.git"
+ },
+ "author": "Joyent, Inc",
+ "contributors": [
+ {
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
+ },
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "Alex Wilson",
+ "email": "alex@cooperi.net"
+ }
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/arekinath/node-sshpk/issues"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "directories": {
+ "bin": "./bin",
+ "lib": "./lib",
+ "man": "./man/man1"
+ },
+ "homepage": "https://github.com/arekinath/node-sshpk#readme",
+ "dependencies": {
+ "asn1": "~0.2.3",
+ "assert-plus": "^1.0.0",
+ "dashdash": "^1.12.0",
+ "getpass": "^0.1.1",
+ "safer-buffer": "^2.0.2",
+ "jsbn": "~0.1.0",
+ "tweetnacl": "~0.14.0",
+ "ecc-jsbn": "~0.1.1",
+ "bcrypt-pbkdf": "^1.0.0"
+ },
+ "optionalDependencies": {
+ },
+ "devDependencies": {
+ "tape": "^3.5.0",
+ "benchmark": "^1.0.0",
+ "sinon": "^1.17.2",
+ "temp": "^0.8.2"
+ }
+}
diff --git a/node_modules/string-width/index.js b/node_modules/string-width/index.js
new file mode 100644
index 0000000..b9bec62
--- /dev/null
+++ b/node_modules/string-width/index.js
@@ -0,0 +1,37 @@
+'use strict';
+var stripAnsi = require('strip-ansi');
+var codePointAt = require('code-point-at');
+var isFullwidthCodePoint = require('is-fullwidth-code-point');
+
+// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345
+module.exports = function (str) {
+ if (typeof str !== 'string' || str.length === 0) {
+ return 0;
+ }
+
+ var width = 0;
+
+ str = stripAnsi(str);
+
+ for (var i = 0; i < str.length; i++) {
+ var code = codePointAt(str, i);
+
+ // ignore control characters
+ if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) {
+ continue;
+ }
+
+ // surrogates
+ if (code >= 0x10000) {
+ i++;
+ }
+
+ if (isFullwidthCodePoint(code)) {
+ width += 2;
+ } else {
+ width++;
+ }
+ }
+
+ return width;
+};
diff --git a/node_modules/string-width/license b/node_modules/string-width/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/string-width/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/string-width/package.json b/node_modules/string-width/package.json
new file mode 100644
index 0000000..5ba4361
--- /dev/null
+++ b/node_modules/string-width/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "string-width",
+ "version": "1.0.2",
+ "description": "Get the visual width of a string - the number of columns required to display it",
+ "license": "MIT",
+ "repository": "sindresorhus/string-width",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "string",
+ "str",
+ "character",
+ "char",
+ "unicode",
+ "width",
+ "visual",
+ "column",
+ "columns",
+ "fullwidth",
+ "full-width",
+ "full",
+ "ansi",
+ "escape",
+ "codes",
+ "cli",
+ "command-line",
+ "terminal",
+ "console",
+ "cjk",
+ "chinese",
+ "japanese",
+ "korean",
+ "fixed-width"
+ ],
+ "dependencies": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/string-width/readme.md b/node_modules/string-width/readme.md
new file mode 100644
index 0000000..1ab42c9
--- /dev/null
+++ b/node_modules/string-width/readme.md
@@ -0,0 +1,42 @@
+# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width)
+
+> Get the visual width of a string - the number of columns required to display it
+
+Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
+
+Useful to be able to measure the actual width of command-line output.
+
+
+## Install
+
+```
+$ npm install --save string-width
+```
+
+
+## Usage
+
+```js
+const stringWidth = require('string-width');
+
+stringWidth('古');
+//=> 2
+
+stringWidth('\u001b[1m古\u001b[22m');
+//=> 2
+
+stringWidth('a');
+//=> 1
+```
+
+
+## Related
+
+- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
+- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
+- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/string_decoder/.npmignore b/node_modules/string_decoder/.npmignore
new file mode 100644
index 0000000..206320c
--- /dev/null
+++ b/node_modules/string_decoder/.npmignore
@@ -0,0 +1,2 @@
+build
+test
diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000..6de584a
--- /dev/null
+++ b/node_modules/string_decoder/LICENSE
@@ -0,0 +1,20 @@
+Copyright Joyent, Inc. and other Node contributors.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to permit
+persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/string_decoder/README.md b/node_modules/string_decoder/README.md
new file mode 100644
index 0000000..4d2aa00
--- /dev/null
+++ b/node_modules/string_decoder/README.md
@@ -0,0 +1,7 @@
+**string_decoder.js** (`require('string_decoder')`) from Node.js core
+
+Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details.
+
+Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**
+
+The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file
diff --git a/node_modules/string_decoder/index.js b/node_modules/string_decoder/index.js
new file mode 100644
index 0000000..b00e54f
--- /dev/null
+++ b/node_modules/string_decoder/index.js
@@ -0,0 +1,221 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var Buffer = require('buffer').Buffer;
+
+var isBufferEncoding = Buffer.isEncoding
+ || function(encoding) {
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
+ default: return false;
+ }
+ }
+
+
+function assertEncoding(encoding) {
+ if (encoding && !isBufferEncoding(encoding)) {
+ throw new Error('Unknown encoding: ' + encoding);
+ }
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters. CESU-8 is handled as part of the UTF-8 encoding.
+//
+// @TODO Handling all encodings inside a single object makes it very difficult
+// to reason about this code, so it should be split up in the future.
+// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
+// points as used by CESU-8.
+var StringDecoder = exports.StringDecoder = function(encoding) {
+ this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
+ assertEncoding(encoding);
+ switch (this.encoding) {
+ case 'utf8':
+ // CESU-8 represents each of Surrogate Pair by 3-bytes
+ this.surrogateSize = 3;
+ break;
+ case 'ucs2':
+ case 'utf16le':
+ // UTF-16 represents each of Surrogate Pair by 2-bytes
+ this.surrogateSize = 2;
+ this.detectIncompleteChar = utf16DetectIncompleteChar;
+ break;
+ case 'base64':
+ // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
+ this.surrogateSize = 3;
+ this.detectIncompleteChar = base64DetectIncompleteChar;
+ break;
+ default:
+ this.write = passThroughWrite;
+ return;
+ }
+
+ // Enough space to store all bytes of a single character. UTF-8 needs 4
+ // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
+ this.charBuffer = new Buffer(6);
+ // Number of bytes received for the current incomplete multi-byte character.
+ this.charReceived = 0;
+ // Number of bytes expected for the current incomplete multi-byte character.
+ this.charLength = 0;
+};
+
+
+// write decodes the given buffer and returns it as JS string that is
+// guaranteed to not contain any partial multi-byte characters. Any partial
+// character found at the end of the buffer is buffered up, and will be
+// returned when calling write again with the remaining bytes.
+//
+// Note: Converting a Buffer containing an orphan surrogate to a String
+// currently works, but converting a String to a Buffer (via `new Buffer`, or
+// Buffer#write) will replace incomplete surrogates with the unicode
+// replacement character. See https://codereview.chromium.org/121173009/ .
+StringDecoder.prototype.write = function(buffer) {
+ var charStr = '';
+ // if our last write ended with an incomplete multibyte character
+ while (this.charLength) {
+ // determine how many remaining bytes this buffer has to offer for this char
+ var available = (buffer.length >= this.charLength - this.charReceived) ?
+ this.charLength - this.charReceived :
+ buffer.length;
+
+ // add the new bytes to the char buffer
+ buffer.copy(this.charBuffer, this.charReceived, 0, available);
+ this.charReceived += available;
+
+ if (this.charReceived < this.charLength) {
+ // still not enough chars in this buffer? wait for more ...
+ return '';
+ }
+
+ // remove bytes belonging to the current character from the buffer
+ buffer = buffer.slice(available, buffer.length);
+
+ // get the character that was split
+ charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
+
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ var charCode = charStr.charCodeAt(charStr.length - 1);
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ this.charLength += this.surrogateSize;
+ charStr = '';
+ continue;
+ }
+ this.charReceived = this.charLength = 0;
+
+ // if there are no more bytes in this buffer, just emit our char
+ if (buffer.length === 0) {
+ return charStr;
+ }
+ break;
+ }
+
+ // determine and set charLength / charReceived
+ this.detectIncompleteChar(buffer);
+
+ var end = buffer.length;
+ if (this.charLength) {
+ // buffer the incomplete character bytes we got
+ buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
+ end -= this.charReceived;
+ }
+
+ charStr += buffer.toString(this.encoding, 0, end);
+
+ var end = charStr.length - 1;
+ var charCode = charStr.charCodeAt(end);
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ var size = this.surrogateSize;
+ this.charLength += size;
+ this.charReceived += size;
+ this.charBuffer.copy(this.charBuffer, size, 0, size);
+ buffer.copy(this.charBuffer, 0, 0, size);
+ return charStr.substring(0, end);
+ }
+
+ // or just emit the charStr
+ return charStr;
+};
+
+// detectIncompleteChar determines if there is an incomplete UTF-8 character at
+// the end of the given buffer. If so, it sets this.charLength to the byte
+// length that character, and sets this.charReceived to the number of bytes
+// that are available for this character.
+StringDecoder.prototype.detectIncompleteChar = function(buffer) {
+ // determine how many bytes we have to check at the end of this buffer
+ var i = (buffer.length >= 3) ? 3 : buffer.length;
+
+ // Figure out if one of the last i bytes of our buffer announces an
+ // incomplete char.
+ for (; i > 0; i--) {
+ var c = buffer[buffer.length - i];
+
+ // See http://en.wikipedia.org/wiki/UTF-8#Description
+
+ // 110XXXXX
+ if (i == 1 && c >> 5 == 0x06) {
+ this.charLength = 2;
+ break;
+ }
+
+ // 1110XXXX
+ if (i <= 2 && c >> 4 == 0x0E) {
+ this.charLength = 3;
+ break;
+ }
+
+ // 11110XXX
+ if (i <= 3 && c >> 3 == 0x1E) {
+ this.charLength = 4;
+ break;
+ }
+ }
+ this.charReceived = i;
+};
+
+StringDecoder.prototype.end = function(buffer) {
+ var res = '';
+ if (buffer && buffer.length)
+ res = this.write(buffer);
+
+ if (this.charReceived) {
+ var cr = this.charReceived;
+ var buf = this.charBuffer;
+ var enc = this.encoding;
+ res += buf.slice(0, cr).toString(enc);
+ }
+
+ return res;
+};
+
+function passThroughWrite(buffer) {
+ return buffer.toString(this.encoding);
+}
+
+function utf16DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 2;
+ this.charLength = this.charReceived ? 2 : 0;
+}
+
+function base64DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 3;
+ this.charLength = this.charReceived ? 3 : 0;
+}
diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json
new file mode 100644
index 0000000..f2dd499
--- /dev/null
+++ b/node_modules/string_decoder/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "string_decoder",
+ "version": "0.10.31",
+ "description": "The string_decoder module from Node core",
+ "main": "index.js",
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.4.8"
+ },
+ "scripts": {
+ "test": "tap test/simple/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/rvagg/string_decoder.git"
+ },
+ "homepage": "https://github.com/rvagg/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT"
+}
diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000..099480f
--- /dev/null
+++ b/node_modules/strip-ansi/index.js
@@ -0,0 +1,6 @@
+'use strict';
+var ansiRegex = require('ansi-regex')();
+
+module.exports = function (str) {
+ return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
+};
diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/strip-ansi/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json
new file mode 100644
index 0000000..301685b
--- /dev/null
+++ b/node_modules/strip-ansi/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "strip-ansi",
+ "version": "3.0.1",
+ "description": "Strip ANSI escape codes",
+ "license": "MIT",
+ "repository": "chalk/strip-ansi",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "maintainers": [
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
+ "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)",
+ "JD Ballard <i.am.qix@gmail.com> (github.com/qix-)"
+ ],
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md
new file mode 100644
index 0000000..cb7d9ff
--- /dev/null
+++ b/node_modules/strip-ansi/readme.md
@@ -0,0 +1,33 @@
+# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
+
+> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install --save strip-ansi
+```
+
+
+## Usage
+
+```js
+var stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001b[4mcake\u001b[0m');
+//=> 'cake'
+```
+
+
+## Related
+
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/strip-bom/index.js b/node_modules/strip-bom/index.js
new file mode 100644
index 0000000..5695c5c
--- /dev/null
+++ b/node_modules/strip-bom/index.js
@@ -0,0 +1,17 @@
+'use strict';
+var isUtf8 = require('is-utf8');
+
+module.exports = function (x) {
+ // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
+ // conversion translates it to FEFF (UTF-16 BOM)
+ if (typeof x === 'string' && x.charCodeAt(0) === 0xFEFF) {
+ return x.slice(1);
+ }
+
+ if (Buffer.isBuffer(x) && isUtf8(x) &&
+ x[0] === 0xEF && x[1] === 0xBB && x[2] === 0xBF) {
+ return x.slice(3);
+ }
+
+ return x;
+};
diff --git a/node_modules/strip-bom/license b/node_modules/strip-bom/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/strip-bom/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/strip-bom/package.json b/node_modules/strip-bom/package.json
new file mode 100644
index 0000000..8fe93ea
--- /dev/null
+++ b/node_modules/strip-bom/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "strip-bom",
+ "version": "2.0.0",
+ "description": "Strip UTF-8 byte order mark (BOM) from a string/buffer",
+ "license": "MIT",
+ "repository": "sindresorhus/strip-bom",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "bom",
+ "strip",
+ "byte",
+ "mark",
+ "unicode",
+ "utf8",
+ "utf-8",
+ "remove",
+ "delete",
+ "trim",
+ "text",
+ "buffer",
+ "string"
+ ],
+ "dependencies": {
+ "is-utf8": "^0.2.0"
+ },
+ "devDependencies": {
+ "mocha": "*"
+ }
+}
diff --git a/node_modules/strip-bom/readme.md b/node_modules/strip-bom/readme.md
new file mode 100644
index 0000000..8ecf258
--- /dev/null
+++ b/node_modules/strip-bom/readme.md
@@ -0,0 +1,39 @@
+# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom)
+
+> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer
+
+From Wikipedia:
+
+> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.
+
+
+## Install
+
+```
+$ npm install --save strip-bom
+```
+
+
+## Usage
+
+```js
+var fs = require('fs');
+var stripBom = require('strip-bom');
+
+stripBom('\uFEFFunicorn');
+//=> 'unicorn'
+
+stripBom(fs.readFileSync('unicorn.txt'));
+//=> 'unicorn'
+```
+
+
+## Related
+
+- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module
+- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/strip-indent/cli.js b/node_modules/strip-indent/cli.js
new file mode 100755
index 0000000..bcd5f8d
--- /dev/null
+++ b/node_modules/strip-indent/cli.js
@@ -0,0 +1,49 @@
+#!/usr/bin/env node
+'use strict';
+var fs = require('fs');
+var stdin = require('get-stdin');
+var pkg = require('./package.json');
+var stripIndent = require('./');
+var argv = process.argv.slice(2);
+var input = argv[0];
+
+function help() {
+ console.log([
+ '',
+ ' ' + pkg.description,
+ '',
+ ' Usage',
+ ' strip-indent <file>',
+ ' echo <string> | strip-indent',
+ '',
+ ' Example',
+ ' echo \'\\tunicorn\\n\\t\\tcake\' | strip-indent',
+ ' unicorn',
+ ' \tcake'
+ ].join('\n'));
+}
+
+function init(data) {
+ console.log(stripIndent(data));
+}
+
+if (argv.indexOf('--help') !== -1) {
+ help();
+ return;
+}
+
+if (argv.indexOf('--version') !== -1) {
+ console.log(pkg.version);
+ return;
+}
+
+if (process.stdin.isTTY) {
+ if (!input) {
+ help();
+ return;
+ }
+
+ init(fs.readFileSync(input, 'utf8'));
+} else {
+ stdin(init);
+}
diff --git a/node_modules/strip-indent/index.js b/node_modules/strip-indent/index.js
new file mode 100644
index 0000000..8f8f4f4
--- /dev/null
+++ b/node_modules/strip-indent/index.js
@@ -0,0 +1,16 @@
+'use strict';
+module.exports = function (str) {
+ var match = str.match(/^[ \t]*(?=\S)/gm);
+
+ if (!match) {
+ return str;
+ }
+
+ var indent = Math.min.apply(Math, match.map(function (el) {
+ return el.length;
+ }));
+
+ var re = new RegExp('^[ \\t]{' + indent + '}', 'gm');
+
+ return indent > 0 ? str.replace(re, '') : str;
+};
diff --git a/node_modules/strip-indent/license b/node_modules/strip-indent/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/strip-indent/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/strip-indent/package.json b/node_modules/strip-indent/package.json
new file mode 100644
index 0000000..941ad7d
--- /dev/null
+++ b/node_modules/strip-indent/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "strip-indent",
+ "version": "1.0.1",
+ "description": "Strip leading whitespace from every line in a string",
+ "license": "MIT",
+ "repository": "sindresorhus/strip-indent",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bin": {
+ "strip-indent": "cli.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js",
+ "cli.js"
+ ],
+ "keywords": [
+ "cli",
+ "bin",
+ "browser",
+ "strip",
+ "normalize",
+ "remove",
+ "indent",
+ "indentation",
+ "whitespace",
+ "space",
+ "tab",
+ "string",
+ "str"
+ ],
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "dependencies": {
+ "get-stdin": "^4.0.1"
+ }
+}
diff --git a/node_modules/strip-indent/readme.md b/node_modules/strip-indent/readme.md
new file mode 100644
index 0000000..d622f03
--- /dev/null
+++ b/node_modules/strip-indent/readme.md
@@ -0,0 +1,61 @@
+# strip-indent [![Build Status](https://travis-ci.org/sindresorhus/strip-indent.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-indent)
+
+> Strip leading whitespace from every line in a string
+
+The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.
+
+Useful for removing redundant indentation.
+
+
+## Install
+
+```sh
+$ npm install --save strip-indent
+```
+
+
+## Usage
+
+```js
+var str = '\tunicorn\n\t\tcake';
+/*
+ unicorn
+ cake
+*/
+
+stripIndent('\tunicorn\n\t\tcake');
+/*
+unicorn
+ cake
+*/
+```
+
+
+## CLI
+
+```sh
+$ npm install --global strip-indent
+```
+
+```sh
+$ strip-indent --help
+
+ Usage
+ strip-indent <file>
+ echo <string> | strip-indent
+
+ Example
+ echo '\tunicorn\n\t\tcake' | strip-indent
+ unicorn
+ cake
+```
+
+
+## Related
+
+- [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/strip-json-comments/index.js b/node_modules/strip-json-comments/index.js
new file mode 100644
index 0000000..4e6576e
--- /dev/null
+++ b/node_modules/strip-json-comments/index.js
@@ -0,0 +1,70 @@
+'use strict';
+var singleComment = 1;
+var multiComment = 2;
+
+function stripWithoutWhitespace() {
+ return '';
+}
+
+function stripWithWhitespace(str, start, end) {
+ return str.slice(start, end).replace(/\S/g, ' ');
+}
+
+module.exports = function (str, opts) {
+ opts = opts || {};
+
+ var currentChar;
+ var nextChar;
+ var insideString = false;
+ var insideComment = false;
+ var offset = 0;
+ var ret = '';
+ var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace;
+
+ for (var i = 0; i < str.length; i++) {
+ currentChar = str[i];
+ nextChar = str[i + 1];
+
+ if (!insideComment && currentChar === '"') {
+ var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\';
+ if (!escaped) {
+ insideString = !insideString;
+ }
+ }
+
+ if (insideString) {
+ continue;
+ }
+
+ if (!insideComment && currentChar + nextChar === '//') {
+ ret += str.slice(offset, i);
+ offset = i;
+ insideComment = singleComment;
+ i++;
+ } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') {
+ i++;
+ insideComment = false;
+ ret += strip(str, offset, i);
+ offset = i;
+ continue;
+ } else if (insideComment === singleComment && currentChar === '\n') {
+ insideComment = false;
+ ret += strip(str, offset, i);
+ offset = i;
+ } else if (!insideComment && currentChar + nextChar === '/*') {
+ ret += str.slice(offset, i);
+ offset = i;
+ insideComment = multiComment;
+ i++;
+ continue;
+ } else if (insideComment === multiComment && currentChar + nextChar === '*/') {
+ i++;
+ insideComment = false;
+ ret += strip(str, offset, i + 1);
+ offset = i + 1;
+ continue;
+ }
+ }
+
+ return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset));
+};
diff --git a/node_modules/strip-json-comments/license b/node_modules/strip-json-comments/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/strip-json-comments/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/strip-json-comments/package.json b/node_modules/strip-json-comments/package.json
new file mode 100644
index 0000000..288ecc7
--- /dev/null
+++ b/node_modules/strip-json-comments/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "strip-json-comments",
+ "version": "2.0.1",
+ "description": "Strip comments from JSON. Lets you use comments in your JSON files!",
+ "license": "MIT",
+ "repository": "sindresorhus/strip-json-comments",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "json",
+ "strip",
+ "remove",
+ "delete",
+ "trim",
+ "comments",
+ "multiline",
+ "parse",
+ "config",
+ "configuration",
+ "conf",
+ "settings",
+ "util",
+ "env",
+ "environment"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/strip-json-comments/readme.md b/node_modules/strip-json-comments/readme.md
new file mode 100644
index 0000000..0ee58df
--- /dev/null
+++ b/node_modules/strip-json-comments/readme.md
@@ -0,0 +1,64 @@
+# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments)
+
+> Strip comments from JSON. Lets you use comments in your JSON files!
+
+This is now possible:
+
+```js
+{
+ // rainbows
+ "unicorn": /* ❤ */ "cake"
+}
+```
+
+It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source.
+
+Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin.
+
+
+## Install
+
+```
+$ npm install --save strip-json-comments
+```
+
+
+## Usage
+
+```js
+const json = '{/*rainbows*/"unicorn":"cake"}';
+
+JSON.parse(stripJsonComments(json));
+//=> {unicorn: 'cake'}
+```
+
+
+## API
+
+### stripJsonComments(input, [options])
+
+#### input
+
+Type: `string`
+
+Accepts a string with JSON and returns a string without comments.
+
+#### options
+
+##### whitespace
+
+Type: `boolean`
+Default: `true`
+
+Replace comments with whitespace instead of stripping them entirely.
+
+
+## Related
+
+- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module
+- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/strip-outer/index.js b/node_modules/strip-outer/index.js
new file mode 100644
index 0000000..497186a
--- /dev/null
+++ b/node_modules/strip-outer/index.js
@@ -0,0 +1,11 @@
+'use strict';
+var escapeStringRegexp = require('escape-string-regexp');
+
+module.exports = function (str, sub) {
+ if (typeof str !== 'string' || typeof sub !== 'string') {
+ throw new TypeError();
+ }
+
+ sub = escapeStringRegexp(sub);
+ return str.replace(new RegExp('^' + sub + '|' + sub + '$', 'g'), '');
+};
diff --git a/node_modules/strip-outer/license b/node_modules/strip-outer/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/strip-outer/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/strip-outer/node_modules/escape-string-regexp/index.js b/node_modules/strip-outer/node_modules/escape-string-regexp/index.js
new file mode 100644
index 0000000..7834bf9
--- /dev/null
+++ b/node_modules/strip-outer/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(matchOperatorsRe, '\\$&');
+};
diff --git a/node_modules/strip-outer/node_modules/escape-string-regexp/license b/node_modules/strip-outer/node_modules/escape-string-regexp/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/strip-outer/node_modules/escape-string-regexp/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/strip-outer/node_modules/escape-string-regexp/package.json b/node_modules/strip-outer/node_modules/escape-string-regexp/package.json
new file mode 100644
index 0000000..f307df3
--- /dev/null
+++ b/node_modules/strip-outer/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "escape-string-regexp",
+ "version": "1.0.5",
+ "description": "Escape RegExp special characters",
+ "license": "MIT",
+ "repository": "sindresorhus/escape-string-regexp",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "maintainers": [
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
+ "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
+ ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "escape",
+ "regex",
+ "regexp",
+ "re",
+ "regular",
+ "expression",
+ "string",
+ "str",
+ "special",
+ "characters"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/strip-outer/node_modules/escape-string-regexp/readme.md b/node_modules/strip-outer/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 0000000..87ac82d
--- /dev/null
+++ b/node_modules/strip-outer/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,27 @@
+# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+
+## Install
+
+```
+$ npm install --save escape-string-regexp
+```
+
+
+## Usage
+
+```js
+const escapeStringRegexp = require('escape-string-regexp');
+
+const escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> 'how much \$ for a unicorn\?'
+
+new RegExp(escapedString);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/strip-outer/package.json b/node_modules/strip-outer/package.json
new file mode 100644
index 0000000..f98d046
--- /dev/null
+++ b/node_modules/strip-outer/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "strip-outer",
+ "version": "1.0.1",
+ "description": "Strip a substring from the start/end of a string",
+ "license": "MIT",
+ "repository": "sindresorhus/strip-outer",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "outer",
+ "str",
+ "string",
+ "substring",
+ "start",
+ "end",
+ "wrap",
+ "leading",
+ "trailing",
+ "regex",
+ "regexp"
+ ],
+ "dependencies": {
+ "escape-string-regexp": "^1.0.2"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/strip-outer/readme.md b/node_modules/strip-outer/readme.md
new file mode 100644
index 0000000..4f4bee2
--- /dev/null
+++ b/node_modules/strip-outer/readme.md
@@ -0,0 +1,28 @@
+# strip-outer [![Build Status](https://travis-ci.org/sindresorhus/strip-outer.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-outer)
+
+> Strip a substring from the start/end of a string
+
+
+## Install
+
+```
+$ npm install --save strip-outer
+```
+
+
+## Usage
+
+```js
+const stripOuter = require('strip-outer');
+
+stripOuter('foobarfoo', 'foo');
+//=> 'bar'
+
+stripOuter('unicorncake', 'unicorn');
+//=> 'cake'
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/sumchecker/LICENSE b/node_modules/sumchecker/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/node_modules/sumchecker/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/sumchecker/NEWS.md b/node_modules/sumchecker/NEWS.md
new file mode 100644
index 0000000..c4e89e8
--- /dev/null
+++ b/node_modules/sumchecker/NEWS.md
@@ -0,0 +1,59 @@
+# Changes by Version
+
+## Unreleased
+
+## [2.0.2] - 2017-03-11
+
+### Added
+
+* Node 8 support (#6)
+
+## [2.0.1] - 2017-01-26
+
+### Fixed
+
+* Include `index.js` in the NPM package again
+
+## [2.0.0] - 2017-01-26
+
+### Removed
+
+* Support for Node 0.10 and 0.12 (#4)
+
+## [1.3.1] - 2017-03-11
+
+### Added
+
+* Node 8 support (#6)
+
+## [1.3.0] - 2016-12-05
+
+### Added
+
+* Human-readable messages for Errors (#2)
+
+## [1.2.0] - 2016-09-15
+
+### Added
+
+* Support for Node 0.10 and 0.12 via Babel (#1)
+
+## [1.1.0] - 2016-09-06
+
+### Added
+
+* Optional `defaultTextEncoding` parameter in the `ChecksumValidator` constructor
+* Access to the underlying `ChecksumValidator` class
+
+## [1.0.0] - 2016-09-05
+
+Initial release.
+
+[2.0.2]: https://github.com/malept/sumchecker/compare/v2.0.1...v2.0.2
+[2.0.1]: https://github.com/malept/sumchecker/compare/v2.0.0...v2.0.1
+[2.0.0]: https://github.com/malept/sumchecker/compare/v1.3.0...v2.0.0
+[1.3.1]: https://github.com/malept/sumchecker/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/malept/sumchecker/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/malept/sumchecker/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/malept/sumchecker/compare/v1.0.0...v1.1.0
+[1.0.0]: https://github.com/malept/sumchecker/releases/tag/v1.0.0
diff --git a/node_modules/sumchecker/README.md b/node_modules/sumchecker/README.md
new file mode 100644
index 0000000..8c927b7
--- /dev/null
+++ b/node_modules/sumchecker/README.md
@@ -0,0 +1,80 @@
+# Sumchecker
+
+[![Travis CI](https://travis-ci.org/malept/sumchecker.svg?branch=master)](https://travis-ci.org/malept/sumchecker)
+[![AppVeyor CI](https://ci.appveyor.com/api/projects/status/wm4n2r11nlff8ify?svg=true)](https://ci.appveyor.com/project/malept/sumchecker)
+[![Code Climate](https://codeclimate.com/github/malept/sumchecker/badges/gpa.svg)](https://codeclimate.com/github/malept/sumchecker)
+[![Test Coverage](https://codeclimate.com/github/malept/sumchecker/badges/coverage.svg)](https://codeclimate.com/github/malept/sumchecker/coverage)
+
+Sumchecker is a pure Node.js solution to validating files specified in a checksum file, which are
+usually generated by programs such as [`sha256sum`](https://en.wikipedia.org/wiki/Sha256sum).
+
+## Usage
+
+```javascript
+sumchecker(algorithm, checksumFilename, baseDir, filesToCheck)
+ .then(() => {
+ console.log('All files validate!');
+ }, (error) => {
+ console.error('An error occurred', error);
+ });
+```
+
+Returns a [`Promise`](https://www.promisejs.org/). The promise is resolved when all files specified
+in [`filesToCheck`](#filesToCheck) are validated. The promise is rejected otherwise.
+
+### Parameters
+
+#### `algorithm`
+
+`String` - The hash algorithm used in [`checksumFilename`](#checksumFilename). Corresponds to the
+algorithms allowed by [`crypto.createHash()`].
+
+#### `checksumFilename`
+
+`String` - The path to the checksum file.
+
+#### `baseDir`
+
+`String` - The base directory for the files specified in [`filesToCheck`](#filesToCheck).
+
+#### `filesToCheck`
+
+`Array` or `String` - one or more paths of the files that will be validated, relative to
+[`baseDir`](#baseDir).
+
+### Errors
+
+These are `sumchecker`-specific error classes that are passed to the promise's reject callback.
+
+#### `sumchecker.ChecksumMismatchError`
+
+When at least one of the files does not match its expected checksum.
+
+Properties:
+
+* `filename` (`String`) - a path to a file that did not match
+
+#### `sumchecker.ChecksumParseError`
+
+When the checksum file cannot be parsed (as in, it does not match the checksum file format).
+
+Properties:
+
+* `lineNumber` (`Number`) - the line number that could not be parsed
+* `line` (`String`) - the raw line data that could not be parsed, sans newline
+
+#### `sumchecker.NoChecksumFoundError`
+
+When at least one of the files specified to check is not listed in the checksum file.
+
+Properties:
+
+* `filename` (`String`)- a filename from [`filesToCheck`](#filesToCheck)
+
+## Legal
+
+This library is copyrighted under the terms of the [Apache 2.0 License].
+
+[`crypto.createHash()`]: https://nodejs.org/dist/latest-v4.x/docs/api/crypto.html#crypto_crypto_createhash_algorithm
+[`Promise.all`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all
+[Apache 2.0 License]: http://www.apache.org/licenses/LICENSE-2.0
diff --git a/node_modules/sumchecker/build.js b/node_modules/sumchecker/build.js
new file mode 100644
index 0000000..e851e83
--- /dev/null
+++ b/node_modules/sumchecker/build.js
@@ -0,0 +1,232 @@
+/*
+Copyright 2016 Mark Lee
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+'use strict';
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var debug = require('debug')('sumchecker');
+var crypto = require('crypto');
+var fs = require('fs');
+var path = require('path');
+var Promise = global.Promise || require('es6-promise').Promise;
+
+var CHECKSUM_LINE = /^([\da-fA-F]+) ([ *])(.+)$/;
+
+var ErrorWithFilename = function (_Error) {
+ _inherits(ErrorWithFilename, _Error);
+
+ function ErrorWithFilename(filename) {
+ _classCallCheck(this, ErrorWithFilename);
+
+ var _this = _possibleConstructorReturn(this, (ErrorWithFilename.__proto__ || Object.getPrototypeOf(ErrorWithFilename)).call(this));
+
+ _this.filename = filename;
+ return _this;
+ }
+
+ return ErrorWithFilename;
+}(Error);
+
+var ChecksumMismatchError = function (_ErrorWithFilename) {
+ _inherits(ChecksumMismatchError, _ErrorWithFilename);
+
+ function ChecksumMismatchError(filename) {
+ _classCallCheck(this, ChecksumMismatchError);
+
+ var _this2 = _possibleConstructorReturn(this, (ChecksumMismatchError.__proto__ || Object.getPrototypeOf(ChecksumMismatchError)).call(this, filename));
+
+ _this2.message = 'Generated checksum for "' + filename + '" did not match expected checksum.';
+ return _this2;
+ }
+
+ return ChecksumMismatchError;
+}(ErrorWithFilename);
+
+var ChecksumParseError = function (_Error2) {
+ _inherits(ChecksumParseError, _Error2);
+
+ function ChecksumParseError(lineNumber, line) {
+ _classCallCheck(this, ChecksumParseError);
+
+ var _this3 = _possibleConstructorReturn(this, (ChecksumParseError.__proto__ || Object.getPrototypeOf(ChecksumParseError)).call(this));
+
+ _this3.lineNumber = lineNumber;
+ _this3.line = line;
+ _this3.message = 'Could not parse checksum file at line ' + lineNumber + ': ' + line;
+ return _this3;
+ }
+
+ return ChecksumParseError;
+}(Error);
+
+var NoChecksumFoundError = function (_ErrorWithFilename2) {
+ _inherits(NoChecksumFoundError, _ErrorWithFilename2);
+
+ function NoChecksumFoundError(filename) {
+ _classCallCheck(this, NoChecksumFoundError);
+
+ var _this4 = _possibleConstructorReturn(this, (NoChecksumFoundError.__proto__ || Object.getPrototypeOf(NoChecksumFoundError)).call(this, filename));
+
+ _this4.message = 'No checksum found in checksum file for "' + filename + '".';
+ return _this4;
+ }
+
+ return NoChecksumFoundError;
+}(ErrorWithFilename);
+
+var ChecksumValidator = function () {
+ function ChecksumValidator(algorithm, checksumFilename, options) {
+ _classCallCheck(this, ChecksumValidator);
+
+ this.algorithm = algorithm;
+ this.checksumFilename = checksumFilename;
+ this.checksums = null;
+
+ if (options && options.defaultTextEncoding) {
+ this.defaultTextEncoding = options.defaultTextEncoding;
+ } else {
+ this.defaultTextEncoding = 'utf8';
+ }
+ }
+
+ _createClass(ChecksumValidator, [{
+ key: 'encoding',
+ value: function encoding(binary) {
+ return binary ? 'binary' : this.defaultTextEncoding;
+ }
+ }, {
+ key: 'parseChecksumFile',
+ value: function parseChecksumFile(data) {
+ var that = this;
+ return new Promise(function (resolve, reject) {
+ debug('Parsing checksum file');
+ that.checksums = {};
+ var lineNumber = 0;
+ data.trim().split(/[\r\n]+/).forEach(function (line) {
+ lineNumber += 1;
+ var result = CHECKSUM_LINE.exec(line);
+ if (result === null) {
+ debug('Could not parse line number ' + lineNumber);
+ reject(new ChecksumParseError(lineNumber, line));
+ } else {
+ // destructuring isn't available until Node 6
+ var filename = result[3];
+ var isBinary = result[2] === '*';
+ var checksum = result[1];
+
+ that.checksums[filename] = [checksum, isBinary];
+ }
+ });
+ debug('Parsed checksums:', that.checksums);
+ resolve();
+ });
+ }
+ }, {
+ key: 'readFile',
+ value: function readFile(filename, binary) {
+ var _this5 = this;
+
+ debug('Reading "' + filename + ' (binary mode: ' + binary + ')"');
+ return new Promise(function (resolve, reject) {
+ fs.readFile(filename, _this5.encoding(binary), function (err, data) {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(data);
+ }
+ });
+ });
+ }
+ }, {
+ key: 'validate',
+ value: function validate(baseDir, filesToCheck) {
+ var _this6 = this;
+
+ if (typeof filesToCheck === 'string') {
+ filesToCheck = [filesToCheck];
+ }
+
+ return this.readFile(this.checksumFilename, false).then(this.parseChecksumFile.bind(this)).then(function () {
+ return _this6.validateFiles(baseDir, filesToCheck);
+ });
+ }
+ }, {
+ key: 'validateFile',
+ value: function validateFile(baseDir, filename) {
+ var _this7 = this;
+
+ return new Promise(function (resolve, reject) {
+ debug('validateFile: ' + filename);
+
+ var metadata = _this7.checksums[filename];
+ if (!metadata) {
+ return reject(new NoChecksumFoundError(filename));
+ }
+
+ // destructuring isn't available until Node 6
+ var checksum = metadata[0];
+ var binary = metadata[1];
+
+ var fullPath = path.resolve(baseDir, filename);
+ debug('Reading file with "' + _this7.encoding(binary) + '" encoding');
+ var stream = fs.createReadStream(fullPath, { encoding: _this7.encoding(binary) });
+ var hasher = crypto.createHash(_this7.algorithm, { defaultEncoding: 'binary' });
+ hasher.on('readable', function () {
+ var data = hasher.read();
+ if (data) {
+ var calculated = data.toString('hex');
+
+ debug('Expected checksum: ' + checksum + '; Actual: ' + calculated);
+ if (calculated === checksum) {
+ resolve();
+ } else {
+ reject(new ChecksumMismatchError(filename));
+ }
+ }
+ });
+ stream.pipe(hasher);
+ });
+ }
+ }, {
+ key: 'validateFiles',
+ value: function validateFiles(baseDir, filesToCheck) {
+ var that = this;
+ return Promise.all(filesToCheck.map(function (filename) {
+ return that.validateFile(baseDir, filename);
+ }));
+ }
+ }]);
+
+ return ChecksumValidator;
+}();
+
+var sumchecker = function sumchecker(algorithm, checksumFilename, baseDir, filesToCheck) {
+ return new ChecksumValidator(algorithm, checksumFilename).validate(baseDir, filesToCheck);
+};
+
+sumchecker.ChecksumMismatchError = ChecksumMismatchError;
+sumchecker.ChecksumParseError = ChecksumParseError;
+sumchecker.ChecksumValidator = ChecksumValidator;
+sumchecker.NoChecksumFoundError = NoChecksumFoundError;
+
+module.exports = sumchecker;
diff --git a/node_modules/sumchecker/index.js b/node_modules/sumchecker/index.js
new file mode 100644
index 0000000..30f92f7
--- /dev/null
+++ b/node_modules/sumchecker/index.js
@@ -0,0 +1,176 @@
+/*
+Copyright 2016 Mark Lee
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+'use strict'
+
+const debug = require('debug')('sumchecker')
+const crypto = require('crypto')
+const fs = require('fs')
+const path = require('path')
+const Promise = global.Promise || require('es6-promise').Promise
+
+const CHECKSUM_LINE = /^([\da-fA-F]+) ([ *])(.+)$/
+
+class ErrorWithFilename extends Error {
+ constructor (filename) {
+ super()
+ this.filename = filename
+ }
+}
+
+class ChecksumMismatchError extends ErrorWithFilename {
+ constructor (filename) {
+ super(filename)
+ this.message = `Generated checksum for "${filename}" did not match expected checksum.`
+ }
+}
+
+class ChecksumParseError extends Error {
+ constructor (lineNumber, line) {
+ super()
+ this.lineNumber = lineNumber
+ this.line = line
+ this.message = `Could not parse checksum file at line ${lineNumber}: ${line}`
+ }
+}
+
+class NoChecksumFoundError extends ErrorWithFilename {
+ constructor (filename) {
+ super(filename)
+ this.message = `No checksum found in checksum file for "${filename}".`
+ }
+}
+
+class ChecksumValidator {
+ constructor (algorithm, checksumFilename, options) {
+ this.algorithm = algorithm
+ this.checksumFilename = checksumFilename
+ this.checksums = null
+
+ if (options && options.defaultTextEncoding) {
+ this.defaultTextEncoding = options.defaultTextEncoding
+ } else {
+ this.defaultTextEncoding = 'utf8'
+ }
+ }
+
+ encoding (binary) {
+ return binary ? 'binary' : this.defaultTextEncoding
+ }
+
+ parseChecksumFile (data) {
+ let that = this
+ return new Promise((resolve, reject) => {
+ debug('Parsing checksum file')
+ that.checksums = {}
+ let lineNumber = 0
+ data.trim().split(/[\r\n]+/).forEach(line => {
+ lineNumber += 1
+ let result = CHECKSUM_LINE.exec(line)
+ if (result === null) {
+ debug(`Could not parse line number ${lineNumber}`)
+ reject(new ChecksumParseError(lineNumber, line))
+ } else {
+ // destructuring isn't available until Node 6
+ let filename = result[3]
+ let isBinary = result[2] === '*'
+ let checksum = result[1]
+
+ that.checksums[filename] = [checksum, isBinary]
+ }
+ })
+ debug('Parsed checksums:', that.checksums)
+ resolve()
+ })
+ }
+
+ readFile (filename, binary) {
+ debug(`Reading "${filename} (binary mode: ${binary})"`)
+ return new Promise((resolve, reject) => {
+ fs.readFile(filename, this.encoding(binary), (err, data) => {
+ if (err) {
+ reject(err)
+ } else {
+ resolve(data)
+ }
+ })
+ })
+ }
+
+ validate (baseDir, filesToCheck) {
+ if (typeof filesToCheck === 'string') {
+ filesToCheck = [filesToCheck]
+ }
+
+ return this.readFile(this.checksumFilename, false)
+ .then(this.parseChecksumFile.bind(this))
+ .then(() => {
+ return this.validateFiles(baseDir, filesToCheck)
+ })
+ }
+
+ validateFile (baseDir, filename) {
+ return new Promise((resolve, reject) => {
+ debug(`validateFile: ${filename}`)
+
+ let metadata = this.checksums[filename]
+ if (!metadata) {
+ return reject(new NoChecksumFoundError(filename))
+ }
+
+ // destructuring isn't available until Node 6
+ let checksum = metadata[0]
+ let binary = metadata[1]
+
+ let fullPath = path.resolve(baseDir, filename)
+ debug(`Reading file with "${this.encoding(binary)}" encoding`)
+ let stream = fs.createReadStream(fullPath, {encoding: this.encoding(binary)})
+ let hasher = crypto.createHash(this.algorithm, {defaultEncoding: 'binary'})
+ hasher.on('readable', () => {
+ let data = hasher.read()
+ if (data) {
+ let calculated = data.toString('hex')
+
+ debug(`Expected checksum: ${checksum}; Actual: ${calculated}`)
+ if (calculated === checksum) {
+ resolve()
+ } else {
+ reject(new ChecksumMismatchError(filename))
+ }
+ }
+ })
+ stream.pipe(hasher)
+ })
+ }
+
+ validateFiles (baseDir, filesToCheck) {
+ let that = this
+ return Promise.all(filesToCheck.map((filename) => {
+ return that.validateFile(baseDir, filename)
+ }))
+ }
+}
+
+let sumchecker = function sumchecker (algorithm, checksumFilename, baseDir, filesToCheck) {
+ return new ChecksumValidator(algorithm, checksumFilename).validate(baseDir, filesToCheck)
+}
+
+sumchecker.ChecksumMismatchError = ChecksumMismatchError
+sumchecker.ChecksumParseError = ChecksumParseError
+sumchecker.ChecksumValidator = ChecksumValidator
+sumchecker.NoChecksumFoundError = NoChecksumFoundError
+
+module.exports = sumchecker
diff --git a/node_modules/sumchecker/node_modules/debug/.coveralls.yml b/node_modules/sumchecker/node_modules/debug/.coveralls.yml
new file mode 100644
index 0000000..20a7068
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/.coveralls.yml
@@ -0,0 +1 @@
+repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/node_modules/sumchecker/node_modules/debug/.eslintrc b/node_modules/sumchecker/node_modules/debug/.eslintrc
new file mode 100644
index 0000000..8a37ae2
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/.eslintrc
@@ -0,0 +1,11 @@
+{
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "rules": {
+ "no-console": 0,
+ "no-empty": [1, { "allowEmptyCatch": true }]
+ },
+ "extends": "eslint:recommended"
+}
diff --git a/node_modules/sumchecker/node_modules/debug/.npmignore b/node_modules/sumchecker/node_modules/debug/.npmignore
new file mode 100644
index 0000000..5f60eec
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/.npmignore
@@ -0,0 +1,9 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
+coverage
+bower.json
diff --git a/node_modules/sumchecker/node_modules/debug/.travis.yml b/node_modules/sumchecker/node_modules/debug/.travis.yml
new file mode 100644
index 0000000..6c6090c
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/.travis.yml
@@ -0,0 +1,14 @@
+
+language: node_js
+node_js:
+ - "6"
+ - "5"
+ - "4"
+
+install:
+ - make node_modules
+
+script:
+ - make lint
+ - make test
+ - make coveralls
diff --git a/node_modules/sumchecker/node_modules/debug/CHANGELOG.md b/node_modules/sumchecker/node_modules/debug/CHANGELOG.md
new file mode 100644
index 0000000..eadaa18
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,362 @@
+
+2.6.9 / 2017-09-22
+==================
+
+ * remove ReDoS regexp in %o formatter (#504)
+
+2.6.8 / 2017-05-18
+==================
+
+ * Fix: Check for undefined on browser globals (#462, @marbemac)
+
+2.6.7 / 2017-05-16
+==================
+
+ * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
+ * Fix: Inline extend function in node implementation (#452, @dougwilson)
+ * Docs: Fix typo (#455, @msasad)
+
+2.6.5 / 2017-04-27
+==================
+
+ * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
+ * Misc: clean up browser reference checks (#447, @thebigredgeek)
+ * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
+
+
+2.6.4 / 2017-04-20
+==================
+
+ * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
+ * Misc: update "ms" to v0.7.3 (@tootallnate)
+
+2.6.3 / 2017-03-13
+==================
+
+ * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
+ * Docs: Changelog fix (@thebigredgeek)
+
+2.6.2 / 2017-03-10
+==================
+
+ * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
+ * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
+ * Docs: Add Slackin invite badge (@tootallnate)
+
+2.6.1 / 2017-02-10
+==================
+
+ * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
+ * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
+ * Fix: IE8 "Expected identifier" error (#414, @vgoma)
+ * Fix: Namespaces would not disable once enabled (#409, @musikov)
+
+2.6.0 / 2016-12-28
+==================
+
+ * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
+ * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
+ * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
+
+2.5.2 / 2016-12-25
+==================
+
+ * Fix: reference error on window within webworkers (#393, @KlausTrainer)
+ * Docs: fixed README typo (#391, @lurch)
+ * Docs: added notice about v3 api discussion (@thebigredgeek)
+
+2.5.1 / 2016-12-20
+==================
+
+ * Fix: babel-core compatibility
+
+2.5.0 / 2016-12-20
+==================
+
+ * Fix: wrong reference in bower file (@thebigredgeek)
+ * Fix: webworker compatibility (@thebigredgeek)
+ * Fix: output formatting issue (#388, @kribblo)
+ * Fix: babel-loader compatibility (#383, @escwald)
+ * Misc: removed built asset from repo and publications (@thebigredgeek)
+ * Misc: moved source files to /src (#378, @yamikuronue)
+ * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
+ * Test: coveralls integration (#378, @yamikuronue)
+ * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
+
+2.4.5 / 2016-12-17
+==================
+
+ * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
+ * Fix: custom log function (#379, @hsiliev)
+ * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
+ * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
+ * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
+
+2.4.4 / 2016-12-14
+==================
+
+ * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
+
+2.4.3 / 2016-12-14
+==================
+
+ * Fix: navigation.userAgent error for react native (#364, @escwald)
+
+2.4.2 / 2016-12-14
+==================
+
+ * Fix: browser colors (#367, @tootallnate)
+ * Misc: travis ci integration (@thebigredgeek)
+ * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
+
+2.4.1 / 2016-12-13
+==================
+
+ * Fix: typo that broke the package (#356)
+
+2.4.0 / 2016-12-13
+==================
+
+ * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
+ * Fix: revert "handle regex special characters" (@tootallnate)
+ * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
+ * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
+ * Improvement: allow colors in workers (#335, @botverse)
+ * Improvement: use same color for same namespace. (#338, @lchenay)
+
+2.3.3 / 2016-11-09
+==================
+
+ * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
+ * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
+ * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
+
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/sumchecker/node_modules/debug/LICENSE b/node_modules/sumchecker/node_modules/debug/LICENSE
new file mode 100644
index 0000000..658c933
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/sumchecker/node_modules/debug/Makefile b/node_modules/sumchecker/node_modules/debug/Makefile
new file mode 100644
index 0000000..584da8b
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/Makefile
@@ -0,0 +1,50 @@
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# Path
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+.FORCE:
+
+install: node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+lint: .FORCE
+ eslint browser.js debug.js index.js node.js
+
+test-node: .FORCE
+ istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+
+test-browser: .FORCE
+ mkdir -p dist
+
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > dist/debug.js
+
+ karma start --single-run
+ rimraf dist
+
+test: .FORCE
+ concurrently \
+ "make test-node" \
+ "make test-browser"
+
+coveralls:
+ cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+
+.PHONY: all install clean distclean
diff --git a/node_modules/sumchecker/node_modules/debug/README.md b/node_modules/sumchecker/node_modules/debug/README.md
new file mode 100644
index 0000000..f67be6b
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/README.md
@@ -0,0 +1,312 @@
+# debug
+[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
+[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+
+
+
+A tiny node.js debugging utility modelled after node core's debugging technique.
+
+**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+
+ ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+ Note that PowerShell uses different syntax to set environment variables.
+
+ ```cmd
+ $env:DEBUG = "*,-not_this"
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Environment Variables
+
+ When running through Node.js, you can set a few environment variables that will
+ change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+ __Note:__ The environment variables beginning with `DEBUG_` end up being
+ converted into an Options object that gets used with `%o`/`%O` formatters.
+ See the Node.js documentation for
+ [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+ for the complete list.
+
+## Formatters
+
+
+ Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+### Custom formatters
+
+ You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+## Browser support
+ You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+ or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+ if you don't want to build it yourself.
+
+ Debug's enable state is currently persisted by `localStorage`.
+ Consider the situation shown below where you have `worker:a` and `worker:b`,
+ and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
+<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+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/sumchecker/node_modules/debug/component.json b/node_modules/sumchecker/node_modules/debug/component.json
new file mode 100644
index 0000000..9de2641
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.6.9",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "src/browser.js",
+ "scripts": [
+ "src/browser.js",
+ "src/debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/node_modules/sumchecker/node_modules/debug/karma.conf.js b/node_modules/sumchecker/node_modules/debug/karma.conf.js
new file mode 100644
index 0000000..103a82d
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/karma.conf.js
@@ -0,0 +1,70 @@
+// Karma configuration
+// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
+
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'dist/debug.js',
+ 'test/*spec.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ 'src/node.js'
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ },
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['progress'],
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: true,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['PhantomJS'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: false,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}
diff --git a/node_modules/sumchecker/node_modules/debug/node.js b/node_modules/sumchecker/node_modules/debug/node.js
new file mode 100644
index 0000000..7fc36fe
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/node.js
@@ -0,0 +1 @@
+module.exports = require('./src/node');
diff --git a/node_modules/sumchecker/node_modules/debug/package.json b/node_modules/sumchecker/node_modules/debug/package.json
new file mode 100644
index 0000000..dc787ba
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "debug",
+ "version": "2.6.9",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "chai": "^3.5.0",
+ "concurrently": "^3.1.0",
+ "coveralls": "^2.11.15",
+ "eslint": "^3.12.1",
+ "istanbul": "^0.4.5",
+ "karma": "^1.3.0",
+ "karma-chai": "^0.1.0",
+ "karma-mocha": "^1.3.0",
+ "karma-phantomjs-launcher": "^1.0.2",
+ "karma-sinon": "^1.0.5",
+ "mocha": "^3.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "rimraf": "^2.5.4",
+ "sinon": "^1.17.6",
+ "sinon-chai": "^2.8.0"
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ }
+}
diff --git a/node_modules/sumchecker/node_modules/debug/src/browser.js b/node_modules/sumchecker/node_modules/debug/src/browser.js
new file mode 100644
index 0000000..7106924
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/src/browser.js
@@ -0,0 +1,185 @@
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ return true;
+ }
+
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (err) {
+ return '[UnexpectedJSONParseError]: ' + err.message;
+ }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return;
+
+ var c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit')
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/node_modules/sumchecker/node_modules/debug/src/debug.js b/node_modules/sumchecker/node_modules/debug/src/debug.js
new file mode 100644
index 0000000..6a5e3fc
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/src/debug.js
@@ -0,0 +1,202 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+ var hash = 0, i;
+
+ for (i in namespace) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+ function debug() {
+ // disabled?
+ if (!debug.enabled) return;
+
+ var self = debug;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // turn the `arguments` into a proper Array
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting (colors, etc.)
+ exports.formatArgs.call(self, args);
+
+ var logFn = debug.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.enabled = exports.enabled(namespace);
+ debug.useColors = exports.useColors();
+ debug.color = selectColor(namespace);
+
+ // env-specific initialization logic for debug instances
+ if ('function' === typeof exports.init) {
+ exports.init(debug);
+ }
+
+ return debug;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ exports.names = [];
+ exports.skips = [];
+
+ var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/node_modules/sumchecker/node_modules/debug/src/index.js b/node_modules/sumchecker/node_modules/debug/src/index.js
new file mode 100644
index 0000000..e12cf4d
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process !== 'undefined' && process.type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/node_modules/sumchecker/node_modules/debug/src/inspector-log.js b/node_modules/sumchecker/node_modules/debug/src/inspector-log.js
new file mode 100644
index 0000000..60ea6c0
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/src/inspector-log.js
@@ -0,0 +1,15 @@
+module.exports = inspectorLog;
+
+// black hole
+const nullStream = new (require('stream').Writable)();
+nullStream._write = () => {};
+
+/**
+ * Outputs a `console.log()` to the Node.js Inspector console *only*.
+ */
+function inspectorLog() {
+ const stdout = console._stdout;
+ console._stdout = nullStream;
+ console.log.apply(console, arguments);
+ console._stdout = stdout;
+}
diff --git a/node_modules/sumchecker/node_modules/debug/src/node.js b/node_modules/sumchecker/node_modules/debug/src/node.js
new file mode 100644
index 0000000..b15109c
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/debug/src/node.js
@@ -0,0 +1,248 @@
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+ return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+ // camel-case
+ var prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+ // coerce string value into JS value
+ var val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+ else if (val === 'null') val = null;
+ else val = Number(val);
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+
+if (1 !== fd && 2 !== fd) {
+ util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
+}
+
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts
+ ? Boolean(exports.inspectOpts.colors)
+ : tty.isatty(fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n').map(function(str) {
+ return str.trim()
+ }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ var name = this.namespace;
+ var useColors = this.useColors;
+
+ if (useColors) {
+ var c = this.color;
+ var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ */
+
+function log() {
+ return stream.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+ debug.inspectOpts = {};
+
+ var keys = Object.keys(exports.inspectOpts);
+ for (var i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/node_modules/sumchecker/node_modules/ms/index.js b/node_modules/sumchecker/node_modules/ms/index.js
new file mode 100644
index 0000000..6a522b1
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/ms/index.js
@@ -0,0 +1,152 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) {
+ return;
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name;
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git a/node_modules/sumchecker/node_modules/ms/license.md b/node_modules/sumchecker/node_modules/ms/license.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/sumchecker/node_modules/ms/package.json b/node_modules/sumchecker/node_modules/ms/package.json
new file mode 100644
index 0000000..6a31c81
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.0.0",
+ "description": "Tiny milisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "3.19.0",
+ "expect.js": "0.3.1",
+ "husky": "0.13.3",
+ "lint-staged": "3.4.1",
+ "mocha": "3.4.1"
+ }
+}
diff --git a/node_modules/sumchecker/node_modules/ms/readme.md b/node_modules/sumchecker/node_modules/ms/readme.md
new file mode 100644
index 0000000..84a9974
--- /dev/null
+++ b/node_modules/sumchecker/node_modules/ms/readme.md
@@ -0,0 +1,51 @@
+# ms
+
+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
+[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+```
+
+### Convert from milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time format written-out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+
+## Caught a bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/node_modules/sumchecker/package.json b/node_modules/sumchecker/package.json
new file mode 100644
index 0000000..989dcbb
--- /dev/null
+++ b/node_modules/sumchecker/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "sumchecker",
+ "version": "2.0.2",
+ "author": "Mark Lee",
+ "license": "Apache-2.0",
+ "description": "Checksum validator",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/malept/sumchecker.git"
+ },
+ "keywords": [
+ "checksum",
+ "hash"
+ ],
+ "bugs": {
+ "url": "https://github.com/malept/sumchecker/issues"
+ },
+ "homepage": "https://github.com/malept/sumchecker#readme",
+ "engines": {
+ "node": ">= 4.0"
+ },
+ "devDependencies": {
+ "codeclimate-test-reporter": "^0.4.0",
+ "eslint": "^3.3.1",
+ "eslint-config-standard": "^6.0.0-beta.3",
+ "eslint-plugin-promise": "^3.3.0",
+ "eslint-plugin-standard": "^2.0.0",
+ "intern": "^3.3.1",
+ "nyc": "^8.1.0"
+ },
+ "dependencies": {
+ "debug": "^2.2.0"
+ },
+ "scripts": {
+ "ci": "eslint . && intern-client config=tests/intern suites=tests/index reporters=Lcov reporters=Console && codeclimate-test-reporter < lcov.info",
+ "test": "eslint . && intern-client config=tests/intern suites=tests/index reporters=Pretty"
+ },
+ "eslintConfig": {
+ "env": {
+ "amd": true
+ },
+ "extends": "standard",
+ "parserOptions": {
+ "sourceType": "script"
+ },
+ "rules": {
+ "strict": [
+ "error"
+ ]
+ }
+ }
+}
diff --git a/node_modules/throttleit/.npmignore b/node_modules/throttleit/.npmignore
new file mode 100644
index 0000000..48a2e24
--- /dev/null
+++ b/node_modules/throttleit/.npmignore
@@ -0,0 +1,2 @@
+components
+build
diff --git a/node_modules/throttleit/History.md b/node_modules/throttleit/History.md
new file mode 100644
index 0000000..fdf168e
--- /dev/null
+++ b/node_modules/throttleit/History.md
@@ -0,0 +1,11 @@
+
+0.0.2 / 2013-03-26
+==================
+
+ - Cache the return value
+ - Don't use `setTimeout()`
+
+0.0.1 / 2013-03-26
+==================
+
+ - Initial release
diff --git a/node_modules/throttleit/Makefile b/node_modules/throttleit/Makefile
new file mode 100644
index 0000000..0f14dac
--- /dev/null
+++ b/node_modules/throttleit/Makefile
@@ -0,0 +1,11 @@
+
+build: components index.js
+ @component build --dev
+
+components: component.json
+ @component install --dev
+
+clean:
+ rm -fr build components template.js
+
+.PHONY: clean
diff --git a/node_modules/throttleit/Readme.md b/node_modules/throttleit/Readme.md
new file mode 100644
index 0000000..3d8bd83
--- /dev/null
+++ b/node_modules/throttleit/Readme.md
@@ -0,0 +1,16 @@
+
+# throttle
+
+ Throttle a function
+
+## Installation
+
+ $ component install component/throttle
+
+## API
+
+
+
+## License
+
+ MIT
diff --git a/node_modules/throttleit/component.json b/node_modules/throttleit/component.json
new file mode 100644
index 0000000..7cf81a0
--- /dev/null
+++ b/node_modules/throttleit/component.json
@@ -0,0 +1,13 @@
+{
+ "name": "throttle",
+ "repo": "component/throttle",
+ "description": "Throttle a function",
+ "version": "0.0.2",
+ "keywords": [],
+ "dependencies": {},
+ "development": {},
+ "license": "MIT",
+ "scripts": [
+ "index.js"
+ ]
+}
diff --git a/node_modules/throttleit/example.js b/node_modules/throttleit/example.js
new file mode 100644
index 0000000..a7f0f62
--- /dev/null
+++ b/node_modules/throttleit/example.js
@@ -0,0 +1,14 @@
+
+var throttle = require('./');
+
+function onprogress(n) {
+ console.log('progress %s%', n);
+}
+
+onprogress = throttle(onprogress, 500);
+
+var n = 0;
+setInterval(function(){
+ if (n >= 100) return;
+ onprogress(n++);
+}, 50);
diff --git a/node_modules/throttleit/index.js b/node_modules/throttleit/index.js
new file mode 100644
index 0000000..d9efe3c
--- /dev/null
+++ b/node_modules/throttleit/index.js
@@ -0,0 +1,30 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = throttle;
+
+/**
+ * Returns a new function that, when invoked, invokes `func` at most one time per
+ * `wait` milliseconds.
+ *
+ * @param {Function} func The `Function` instance to wrap.
+ * @param {Number} wait The minimum number of milliseconds that must elapse in between `func` invokations.
+ * @return {Function} A new function that wraps the `func` function passed in.
+ * @api public
+ */
+
+function throttle (func, wait) {
+ var rtn; // return value
+ var last = 0; // last invokation timestamp
+ return function throttled () {
+ var now = new Date().getTime();
+ var delta = now - last;
+ if (delta >= wait) {
+ rtn = func.apply(this, arguments);
+ last = now;
+ }
+ return rtn;
+ };
+}
diff --git a/node_modules/throttleit/package.json b/node_modules/throttleit/package.json
new file mode 100644
index 0000000..709467b
--- /dev/null
+++ b/node_modules/throttleit/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "throttleit",
+ "description": "Throttle a function",
+ "version": "0.0.2",
+ "keywords": [],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/component/throttle.git"
+ },
+ "dependencies": {},
+ "development": {},
+ "license": "MIT",
+ "component": {
+ "scripts": {
+ "throttle/index.js": "index.js"
+ }
+ }
+}
diff --git a/node_modules/through2/.jshintrc b/node_modules/through2/.jshintrc
new file mode 100644
index 0000000..c8ef3ca
--- /dev/null
+++ b/node_modules/through2/.jshintrc
@@ -0,0 +1,59 @@
+{
+ "predef": [ ]
+ , "bitwise": false
+ , "camelcase": false
+ , "curly": false
+ , "eqeqeq": false
+ , "forin": false
+ , "immed": false
+ , "latedef": false
+ , "noarg": true
+ , "noempty": true
+ , "nonew": true
+ , "plusplus": false
+ , "quotmark": true
+ , "regexp": false
+ , "undef": true
+ , "unused": true
+ , "strict": false
+ , "trailing": true
+ , "maxlen": 120
+ , "asi": true
+ , "boss": true
+ , "debug": true
+ , "eqnull": true
+ , "esnext": true
+ , "evil": true
+ , "expr": true
+ , "funcscope": false
+ , "globalstrict": false
+ , "iterator": false
+ , "lastsemic": true
+ , "laxbreak": true
+ , "laxcomma": true
+ , "loopfunc": true
+ , "multistr": false
+ , "onecase": false
+ , "proto": false
+ , "regexdash": false
+ , "scripturl": true
+ , "smarttabs": false
+ , "shadow": false
+ , "sub": true
+ , "supernew": false
+ , "validthis": true
+ , "browser": true
+ , "couch": false
+ , "devel": false
+ , "dojo": false
+ , "mootools": false
+ , "node": true
+ , "nonstandard": true
+ , "prototypejs": false
+ , "rhino": false
+ , "worker": true
+ , "wsh": false
+ , "nomen": false
+ , "onevar": false
+ , "passfail": false
+} \ No newline at end of file
diff --git a/node_modules/through2/.npmignore b/node_modules/through2/.npmignore
new file mode 100644
index 0000000..b512c09
--- /dev/null
+++ b/node_modules/through2/.npmignore
@@ -0,0 +1 @@
+node_modules \ No newline at end of file
diff --git a/node_modules/through2/.travis.yml b/node_modules/through2/.travis.yml
new file mode 100644
index 0000000..cece8c6
--- /dev/null
+++ b/node_modules/through2/.travis.yml
@@ -0,0 +1,12 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
+branches:
+ only:
+ - master
+notifications:
+ email:
+ - rod@vagg.org
+script: npm test \ No newline at end of file
diff --git a/node_modules/through2/LICENSE b/node_modules/through2/LICENSE
new file mode 100644
index 0000000..f6a0029
--- /dev/null
+++ b/node_modules/through2/LICENSE
@@ -0,0 +1,39 @@
+Copyright 2013, Rod Vagg (the "Original Author")
+All rights reserved.
+
+MIT +no-false-attribs License
+
+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.
+
+Distributions of all or part of the Software intended to be used
+by the recipients as they would use the unmodified Software,
+containing modifications that substantially alter, remove, or
+disable functionality of the Software, outside of the documented
+configuration mechanisms provided by the Software, shall be
+modified such that the Original Author's bug reporting email
+addresses and urls are either replaced with the contact information
+of the parties responsible for the changes, or removed entirely.
+
+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.
+
+
+Except where noted, this license applies to any and all software
+programs and associated documentation files created by the
+Original Author, when distributed with the Software. \ No newline at end of file
diff --git a/node_modules/through2/README.md b/node_modules/through2/README.md
new file mode 100644
index 0000000..b85a790
--- /dev/null
+++ b/node_modules/through2/README.md
@@ -0,0 +1,107 @@
+# through2
+
+[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)
+
+[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/)
+
+[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)
+[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)
+
+**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
+
+Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
+
+```js
+fs.createReadStream('ex.txt')
+ .pipe(through2(function (chunk, enc, callback) {
+ for (var i = 0; i < chunk.length; i++)
+ if (chunk[i] == 97)
+ chunk[i] = 122 // swap 'a' for 'z'
+ this.push(chunk)
+ callback()
+ }))
+ .pipe(fs.createWriteStream('out.txt'))
+```
+
+Or object streams:
+
+```js
+var all = []
+fs.createReadStream('data.csv')
+ .pipe(csv2())
+ .pipe(through2({ objectMode: true }, function (chunk, enc, callback) {
+ var data = {
+ name : chunk[0]
+ , address : chunk[3]
+ , phone : chunk[10]
+ }
+ this.push(data)
+ callback()
+ }))
+ .on('data', function (data) {
+ all.push(data)
+ })
+ .on('end', function () {
+ doSomethingSpecial(all)
+ })
+```
+
+## API
+
+<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
+
+Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
+
+### options
+
+The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams.
+
+The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {
+ this.push(new Buffer('wut?'))
+ cb()
+ })
+ .pipe(fs.createWriteStream('/tmp/wut.txt'))
+```
+
+### transformFunction
+
+The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
+
+To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
+
+If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.
+
+### flushFunction
+
+The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
+
+<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
+
+Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
+
+```js
+var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
+ if (record.temp != null && record.unit = "F") {
+ record.temp = ( ( record.temp - 32 ) * 5 ) / 9
+ record.unit = "C"
+ }
+ this.push(record)
+ callback()
+})
+
+// Create instances of FToC like so:
+var converter = new FToC()
+// Or:
+var converter = FToC()
+// Or specify/override options when you instantiate, if you prefer:
+var converter = FToC({objectMode: true})
+
+```
+
+## License
+
+**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. \ No newline at end of file
diff --git a/node_modules/through2/package.json b/node_modules/through2/package.json
new file mode 100644
index 0000000..b117137
--- /dev/null
+++ b/node_modules/through2/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "through2",
+ "version": "0.2.3",
+ "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
+ "main": "through2.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rvagg/through2.git"
+ },
+ "keywords": [
+ "stream",
+ "streams2",
+ "through",
+ "transform"
+ ],
+ "author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": "~1.1.9",
+ "xtend": "~2.1.1"
+ },
+ "devDependencies": {
+ "tape": "~1.1.1",
+ "bl": "~0.4.1",
+ "stream-spigot": "~2.1.2"
+ }
+}
diff --git a/node_modules/through2/test.js b/node_modules/through2/test.js
new file mode 100644
index 0000000..b2120de
--- /dev/null
+++ b/node_modules/through2/test.js
@@ -0,0 +1,314 @@
+const test = require('tape')
+ , through2 = require('./')
+ , crypto = require('crypto')
+ , bl = require('bl')
+ , spigot = require('stream-spigot')
+
+test('plain through', function (t) {
+ var th2 = through2(function (chunk, enc, callback) {
+ if (!this._i)
+ this._i = 97 // 'a'
+ else
+ this._i++
+ var b = new Buffer(chunk.length)
+ for (var i = 0; i < chunk.length; i++)
+ b[i] = this._i
+ this.push(b)
+ callback()
+ })
+
+ th2.pipe(bl(function (err, b) {
+ var s = b.toString('ascii')
+ t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string')
+ t.end()
+ }))
+
+ th2.write(crypto.randomBytes(10))
+ th2.write(crypto.randomBytes(5))
+ th2.write(crypto.randomBytes(10))
+ th2.end()
+})
+
+test('pipeable through', function (t) {
+ var th2 = through2(function (chunk, enc, callback) {
+ if (!this._i)
+ this._i = 97 // 'a'
+ else
+ this._i++
+ var b = new Buffer(chunk.length)
+ for (var i = 0; i < chunk.length; i++)
+ b[i] = this._i
+ this.push(b)
+ callback()
+ })
+
+ th2.pipe(bl(function (err, b) {
+ var s = b.toString('ascii')
+ // bl() acts like a proper streams2 stream and passes as much as it's
+ // asked for, so we really only get one write with such a small amount
+ // of data
+ t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string')
+ t.end()
+ }))
+
+ var bufs = bl()
+ bufs.append(crypto.randomBytes(10))
+ bufs.append(crypto.randomBytes(5))
+ bufs.append(crypto.randomBytes(10))
+ bufs.pipe(th2)
+})
+
+test('object through', function (t) {
+ t.plan(3)
+
+ var th2 = through2({ objectMode: true}, function (chunk, enc, callback) {
+ this.push({ out: chunk.in + 1 })
+ callback()
+ })
+
+ var e = 0
+ th2.on('data', function (o) {
+ t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object')
+ e++
+ })
+
+ th2.write({ in: 101 })
+ th2.write({ in: 202 })
+ th2.write({ in: -100 })
+ th2.end()
+})
+
+test('flushing through', function (t) {
+ var th2 = through2(function (chunk, enc, callback) {
+ if (!this._i)
+ this._i = 97 // 'a'
+ else
+ this._i++
+ var b = new Buffer(chunk.length)
+ for (var i = 0; i < chunk.length; i++)
+ b[i] = this._i
+ this.push(b)
+ callback()
+ }, function (callback) {
+ this.push(new Buffer([ 101, 110, 100 ]))
+ callback()
+ })
+
+ th2.pipe(bl(function (err, b) {
+ var s = b.toString('ascii')
+ t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string')
+ t.end()
+ }))
+
+ th2.write(crypto.randomBytes(10))
+ th2.write(crypto.randomBytes(5))
+ th2.write(crypto.randomBytes(10))
+ th2.end()
+})
+
+test('plain through ctor', function (t) {
+ var Th2 = through2.ctor(function (chunk, enc, callback) {
+ if (!this._i)
+ this._i = 97 // 'a'
+ else
+ this._i++
+ var b = new Buffer(chunk.length)
+ for (var i = 0; i < chunk.length; i++)
+ b[i] = this._i
+ this.push(b)
+ callback()
+ })
+
+ var th2 = new Th2()
+
+ th2.pipe(bl(function (err, b) {
+ var s = b.toString('ascii')
+ t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string')
+ t.end()
+ }))
+
+ th2.write(crypto.randomBytes(10))
+ th2.write(crypto.randomBytes(5))
+ th2.write(crypto.randomBytes(10))
+ th2.end()
+})
+
+test('reuse through ctor', function (t) {
+ t.plan(4)
+
+ var Th2 = through2.ctor(function (chunk, enc, callback) {
+ if (!this._i) {
+ t.ok(1, 'did not contain previous instance data (this._i)')
+ this._i = 97 // 'a'
+ } else
+ this._i++
+ var b = new Buffer(chunk.length)
+ for (var i = 0; i < chunk.length; i++)
+ b[i] = this._i
+ this.push(b)
+ callback()
+ })
+
+ var th2 = Th2()
+
+ th2.pipe(bl(function (err, b) {
+ var s = b.toString('ascii')
+ t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string')
+
+ var newInstance = Th2()
+ newInstance.pipe(bl(function (err, b) {
+ var s = b.toString('ascii')
+ t.equal('aaaaaaabbbbccccccc', s, 'got transformed string')
+ }))
+
+ newInstance.write(crypto.randomBytes(7))
+ newInstance.write(crypto.randomBytes(4))
+ newInstance.write(crypto.randomBytes(7))
+ newInstance.end()
+ }))
+
+ th2.write(crypto.randomBytes(10))
+ th2.write(crypto.randomBytes(5))
+ th2.write(crypto.randomBytes(10))
+ th2.end()
+})
+
+test('object through ctor', function (t) {
+ t.plan(3)
+
+ var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) {
+ this.push({ out: chunk.in + 1 })
+ callback()
+ })
+
+ var th2 = new Th2()
+
+ var e = 0
+ th2.on('data', function (o) {
+ t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object')
+ e++
+ })
+
+ th2.write({ in: 101 })
+ th2.write({ in: 202 })
+ th2.write({ in: -100 })
+ th2.end()
+})
+
+test('pipeable object through ctor', function (t) {
+ t.plan(4)
+
+ var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) {
+ if (record.temp != null && record.unit == 'F') {
+ record.temp = ( ( record.temp - 32 ) * 5 ) / 9
+ record.unit = 'C'
+ }
+ this.push(record)
+ callback()
+ })
+
+ var th2 = Th2()
+
+ var expect = [-19, -40, 100, 22]
+ th2.on('data', function (o) {
+ t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object')
+ })
+
+ spigot({objectMode: true}, [
+ {temp: -2.2, unit: 'F'},
+ {temp: -40, unit: 'F'},
+ {temp: 212, unit: 'F'},
+ {temp: 22, unit: 'C'}
+ ]).pipe(th2)
+})
+
+test('object through ctor override', function (t) {
+ t.plan(3)
+
+ var Th2 = through2.ctor(function (chunk, enc, callback) {
+ this.push({ out: chunk.in + 1 })
+ callback()
+ })
+
+ var th2 = Th2({objectMode: true})
+
+ var e = 0
+ th2.on('data', function (o) {
+ t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object')
+ e++
+ })
+
+ th2.write({ in: 101 })
+ th2.write({ in: 202 })
+ th2.write({ in: -100 })
+ th2.end()
+})
+
+test('object settings available in transform', function (t) {
+ t.plan(6)
+
+ var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) {
+ t.ok(this.options.peek, "reading options from inside _transform")
+ this.push({ out: chunk.in + 1 })
+ callback()
+ })
+
+ var th2 = Th2()
+
+ var e = 0
+ th2.on('data', function (o) {
+ t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object')
+ e++
+ })
+
+ th2.write({ in: 101 })
+ th2.write({ in: 202 })
+ th2.write({ in: -100 })
+ th2.end()
+})
+
+test('object settings available in transform override', function (t) {
+ t.plan(6)
+
+ var Th2 = through2.ctor(function (chunk, enc, callback) {
+ t.ok(this.options.peek, "reading options from inside _transform")
+ this.push({ out: chunk.in + 1 })
+ callback()
+ })
+
+ var th2 = Th2({objectMode: true, peek: true})
+
+ var e = 0
+ th2.on('data', function (o) {
+ t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object')
+ e++
+ })
+
+ th2.write({ in: 101 })
+ th2.write({ in: 202 })
+ th2.write({ in: -100 })
+ th2.end()
+})
+
+test('object override extends options', function (t) {
+ t.plan(6)
+
+ var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) {
+ t.ok(this.options.peek, "reading options from inside _transform")
+ this.push({ out: chunk.in + 1 })
+ callback()
+ })
+
+ var th2 = Th2({peek: true})
+
+ var e = 0
+ th2.on('data', function (o) {
+ t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object')
+ e++
+ })
+
+ th2.write({ in: 101 })
+ th2.write({ in: 202 })
+ th2.write({ in: -100 })
+ th2.end()
+}) \ No newline at end of file
diff --git a/node_modules/through2/through2.js b/node_modules/through2/through2.js
new file mode 100644
index 0000000..0a88c82
--- /dev/null
+++ b/node_modules/through2/through2.js
@@ -0,0 +1,42 @@
+const Transform = require('stream').Transform || require('readable-stream/transform')
+ , inherits = require('util').inherits
+ , xtend = require('xtend')
+
+function noop (chunk, enc, callback) {
+ callback(null, chunk)
+}
+
+function ctor (options, transform, flush) {
+ if (typeof options == 'function') {
+ flush = transform
+ transform = options
+ options = {}
+ }
+
+ if (typeof transform != 'function')
+ transform = noop
+
+ function Through2 (override) {
+ if (!(this instanceof Through2))
+ return new Through2(override)
+
+ this.options = xtend(options, override)
+ Transform.call(this, this.options)
+ }
+
+ inherits(Through2, Transform)
+
+ Through2.prototype._transform = transform
+
+ if (typeof flush == 'function')
+ Through2.prototype._flush = flush
+
+ return Through2
+}
+
+function make (options, transform, flush) {
+ return ctor(options, transform, flush)()
+}
+
+module.exports = make
+module.exports.ctor = ctor \ No newline at end of file
diff --git a/node_modules/tough-cookie/LICENSE b/node_modules/tough-cookie/LICENSE
new file mode 100644
index 0000000..22204e8
--- /dev/null
+++ b/node_modules/tough-cookie/LICENSE
@@ -0,0 +1,12 @@
+Copyright (c) 2015, Salesforce.com, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/tough-cookie/README.md b/node_modules/tough-cookie/README.md
new file mode 100644
index 0000000..656a255
--- /dev/null
+++ b/node_modules/tough-cookie/README.md
@@ -0,0 +1,527 @@
+[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js
+
+[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/)
+
+[![Build Status](https://travis-ci.org/salesforce/tough-cookie.png?branch=master)](https://travis-ci.org/salesforce/tough-cookie)
+
+# Synopsis
+
+``` javascript
+var tough = require('tough-cookie');
+var Cookie = tough.Cookie;
+var cookie = Cookie.parse(header);
+cookie.value = 'somethingdifferent';
+header = cookie.toString();
+
+var cookiejar = new tough.CookieJar();
+cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);
+// ...
+cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {
+ res.headers['cookie'] = cookies.join('; ');
+});
+```
+
+# Installation
+
+It's _so_ easy!
+
+`npm install tough-cookie`
+
+Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.
+
+## Version Support
+
+Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module.
+
+# API
+
+## tough
+
+Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound".
+
+**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary.
+
+### `parseDate(string)`
+
+Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`.
+
+### `formatDate(date)`
+
+Format a Date into a RFC1123 string (the RFC6265-recommended format).
+
+### `canonicalDomain(str)`
+
+Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).
+
+### `domainMatch(str,domStr[,canonicalize=true])`
+
+Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match".
+
+The `canonicalize` parameter will run the other two parameters through `canonicalDomain` or not.
+
+### `defaultPath(path)`
+
+Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC.
+
+The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.
+
+### `pathMatch(reqPath,cookiePath)`
+
+Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean.
+
+This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.
+
+### `parse(cookieString[, options])`
+
+alias for `Cookie.parse(cookieString[, options])`
+
+### `fromJSON(string)`
+
+alias for `Cookie.fromJSON(string)`
+
+### `getPublicSuffix(hostname)`
+
+Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.
+
+For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.
+
+For further information, see http://publicsuffix.org/. This module derives its list from that site. This call is currently a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [get() method](https://www.npmjs.com/package/psl#pslgetdomain).
+
+### `cookieCompare(a,b)`
+
+For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence:
+
+* Longest `.path`
+* oldest `.creation` (which has a 1ms precision, same as `Date`)
+* lowest `.creationIndex` (to get beyond the 1ms precision)
+
+``` javascript
+var cookies = [ /* unsorted array of Cookie objects */ ];
+cookies = cookies.sort(cookieCompare);
+```
+
+**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`.
+
+### `permuteDomain(domain)`
+
+Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.
+
+### `permutePath(path)`
+
+Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.
+
+
+## Cookie
+
+Exported via `tough.Cookie`.
+
+### `Cookie.parse(cookieString[, options])`
+
+Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed.
+
+The options parameter is not required and currently has only one property:
+
+ * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant.
+
+If options is not an object, it is ignored, which means you can use `Array#map` with it.
+
+Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:
+
+``` javascript
+if (res.headers['set-cookie'] instanceof Array)
+ cookies = res.headers['set-cookie'].map(Cookie.parse);
+else
+ cookies = [Cookie.parse(res.headers['set-cookie'])];
+```
+
+_Note:_ in version 2.3.3, tough-cookie limited the number of spaces before the `=` to 256 characters. This limitation has since been removed.
+See [Issue 92](https://github.com/salesforce/tough-cookie/issues/92)
+
+### Properties
+
+Cookie object properties:
+
+ * _key_ - string - the name or key of the cookie (default "")
+ * _value_ - string - the value of the cookie (default "")
+ * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()`
+ * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`
+ * _domain_ - string - the `Domain=` attribute of the cookie
+ * _path_ - string - the `Path=` of the cookie
+ * _secure_ - boolean - the `Secure` cookie flag
+ * _httpOnly_ - boolean - the `HttpOnly` cookie flag
+ * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)
+ * _creation_ - `Date` - when this cookie was constructed
+ * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation)
+
+After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:
+
+ * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)
+ * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.
+ * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar
+ * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.
+
+### `Cookie([{properties}])`
+
+Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties.
+
+### `.toString()`
+
+encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.
+
+### `.cookieString()`
+
+encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').
+
+### `.setExpires(String)`
+
+sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set.
+
+### `.setMaxAge(number)`
+
+sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly.
+
+### `.expiryTime([now=Date.now()])`
+
+### `.expiryDate([now=Date.now()])`
+
+expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.
+
+Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute.
+
+If Expires (`.expires`) is set, that's returned.
+
+Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).
+
+### `.TTL([now=Date.now()])`
+
+compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.
+
+The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.
+
+### `.canonicalizedDomain()`
+
+### `.cdomain()`
+
+return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.
+
+### `.toJSON()`
+
+For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized.
+
+Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`).
+
+**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
+
+### `Cookie.fromJSON(strOrObj)`
+
+Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first.
+
+Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer.
+
+Returns `null` upon JSON parsing error.
+
+### `.clone()`
+
+Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`.
+
+### `.validate()`
+
+Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.
+
+validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:
+
+``` javascript
+if (cookie.validate() === true) {
+ // it's tasty
+} else {
+ // yuck!
+}
+```
+
+
+## CookieJar
+
+Exported via `tough.CookieJar`.
+
+### `CookieJar([store],[options])`
+
+Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.
+
+The `options` object can be omitted and can have the following properties:
+
+ * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk"
+ * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name.
+ This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers.
+
+Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.
+
+### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))`
+
+Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties.
+
+The `options` object can be omitted and can have the following properties:
+
+ * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.
+ * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.
+ * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
+ * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option.
+
+As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).
+
+### `.setCookieSync(cookieOrString, currentUrl, [{options}])`
+
+Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
+
+### `.getCookies(currentUrl, [{options},] cb(err,cookies))`
+
+Retrieve the list of cookies that can be sent in a Cookie header for the current url.
+
+If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.
+
+The `options` object can be omitted and can have the following properties:
+
+ * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.
+ * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.
+ * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
+ * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).
+ * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it).
+
+The `.lastAccessed` property of the returned cookies will have been updated.
+
+### `.getCookiesSync(currentUrl, [{options}])`
+
+Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
+
+### `.getCookieString(...)`
+
+Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.
+
+### `.getCookieStringSync(...)`
+
+Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
+
+### `.getSetCookieStrings(...)`
+
+Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`.
+
+### `.getSetCookieStringsSync(...)`
+
+Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
+
+### `.serialize(cb(err,serializedObject))`
+
+Serialize the Jar if the underlying store supports `.getAllCookies`.
+
+**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
+
+See [Serialization Format].
+
+### `.serializeSync()`
+
+Sync version of .serialize
+
+### `.toJSON()`
+
+Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`.
+
+### `CookieJar.deserialize(serialized, [store], cb(err,object))`
+
+A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization.
+
+The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created.
+
+As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback.
+
+### `CookieJar.deserializeSync(serialized, [store])`
+
+Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work.
+
+### `CookieJar.fromJSON(string)`
+
+Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`.
+
+### `.clone([store,]cb(err,newJar))`
+
+Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa.
+
+The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`.
+
+### `.cloneSync([store])`
+
+Synchronous version of `.clone`, returning a new `CookieJar` instance.
+
+The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used.
+
+The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls.
+
+### `.removeAllCookies(cb(err))`
+
+Removes all cookies from the jar.
+
+This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned.
+
+### `.removeAllCookiesSync()`
+
+Sync version of `.removeAllCookies()`
+
+## Store
+
+Base class for CookieJar stores. Available as `tough.Store`.
+
+## Store API
+
+The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.
+
+Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`.
+
+Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style
+
+All `domain` parameters will have been normalized before calling.
+
+The Cookie store must have all of the following methods.
+
+### `store.findCookie(domain, path, key, cb(err,cookie))`
+
+Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.
+
+Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).
+
+### `store.findCookies(domain, path, cb(err,cookies))`
+
+Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.
+
+If no cookies are found, the callback MUST be passed an empty array.
+
+The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.
+
+As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).
+
+### `store.putCookie(cookie, cb(err))`
+
+Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.
+
+The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.
+
+Pass an error if the cookie cannot be stored.
+
+### `store.updateCookie(oldCookie, newCookie, cb(err))`
+
+Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.
+
+The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement).
+
+Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.
+
+The `newCookie` and `oldCookie` objects MUST NOT be modified.
+
+Pass an error if the newCookie cannot be stored.
+
+### `store.removeCookie(domain, path, key, cb(err))`
+
+Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).
+
+The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.
+
+### `store.removeCookies(domain, path, cb(err))`
+
+Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed.
+
+Pass an error ONLY if removing any existing cookies failed.
+
+### `store.removeAllCookies(cb(err))`
+
+_Optional_. Removes all cookies from the store.
+
+Pass an error if one or more cookies can't be removed.
+
+**Note**: New method as of `tough-cookie` version 2.5, so not all Stores will implement this, plus some stores may choose not to implement this.
+
+### `store.getAllCookies(cb(err, cookies))`
+
+_Optional_. Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure.
+
+Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail.
+
+Pass an error if retrieval fails.
+
+**Note**: not all Stores can implement this due to technical limitations, so it is optional.
+
+## MemoryCookieStore
+
+Inherits from `Store`.
+
+A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. Supports serialization, `getAllCookies`, and `removeAllCookies`.
+
+## Community Cookie Stores
+
+These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look:
+
+- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases
+- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk
+- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis
+- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk
+- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage
+
+
+# Serialization Format
+
+**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`.
+
+```js
+ {
+ // The version of tough-cookie that serialized this jar.
+ version: 'tough-cookie@1.x.y',
+
+ // add the store type, to make humans happy:
+ storeType: 'MemoryCookieStore',
+
+ // CookieJar configuration:
+ rejectPublicSuffixes: true,
+ // ... future items go here
+
+ // Gets filled from jar.store.getAllCookies():
+ cookies: [
+ {
+ key: 'string',
+ value: 'string',
+ // ...
+ /* other Cookie.serializableProperties go here */
+ }
+ ]
+ }
+```
+
+# Copyright and License
+
+BSD-3-Clause:
+
+```text
+ Copyright (c) 2015, Salesforce.com, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of Salesforce.com nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+```
diff --git a/node_modules/tough-cookie/lib/cookie.js b/node_modules/tough-cookie/lib/cookie.js
new file mode 100644
index 0000000..32dc0f8
--- /dev/null
+++ b/node_modules/tough-cookie/lib/cookie.js
@@ -0,0 +1,1482 @@
+/*!
+ * Copyright (c) 2015, Salesforce.com, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+'use strict';
+var net = require('net');
+var urlParse = require('url').parse;
+var util = require('util');
+var pubsuffix = require('./pubsuffix-psl');
+var Store = require('./store').Store;
+var MemoryCookieStore = require('./memstore').MemoryCookieStore;
+var pathMatch = require('./pathMatch').pathMatch;
+var VERSION = require('./version');
+
+var punycode;
+try {
+ punycode = require('punycode');
+} catch(e) {
+ console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization");
+}
+
+// From RFC6265 S4.1.1
+// note that it excludes \x3B ";"
+var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/;
+
+var CONTROL_CHARS = /[\x00-\x1F]/;
+
+// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in
+// the "relaxed" mode, see:
+// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60
+var TERMINATORS = ['\n', '\r', '\0'];
+
+// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"'
+// Note ';' is \x3B
+var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/;
+
+// date-time parsing constants (RFC6265 S5.1.1)
+
+var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/;
+
+var MONTH_TO_NUM = {
+ jan:0, feb:1, mar:2, apr:3, may:4, jun:5,
+ jul:6, aug:7, sep:8, oct:9, nov:10, dec:11
+};
+var NUM_TO_MONTH = [
+ 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'
+];
+var NUM_TO_DAY = [
+ 'Sun','Mon','Tue','Wed','Thu','Fri','Sat'
+];
+
+var MAX_TIME = 2147483647000; // 31-bit max
+var MIN_TIME = 0; // 31-bit min
+
+/*
+ * Parses a Natural number (i.e., non-negative integer) with either the
+ * <min>*<max>DIGIT ( non-digit *OCTET )
+ * or
+ * <min>*<max>DIGIT
+ * grammar (RFC6265 S5.1.1).
+ *
+ * The "trailingOK" boolean controls if the grammar accepts a
+ * "( non-digit *OCTET )" trailer.
+ */
+function parseDigits(token, minDigits, maxDigits, trailingOK) {
+ var count = 0;
+ while (count < token.length) {
+ var c = token.charCodeAt(count);
+ // "non-digit = %x00-2F / %x3A-FF"
+ if (c <= 0x2F || c >= 0x3A) {
+ break;
+ }
+ count++;
+ }
+
+ // constrain to a minimum and maximum number of digits.
+ if (count < minDigits || count > maxDigits) {
+ return null;
+ }
+
+ if (!trailingOK && count != token.length) {
+ return null;
+ }
+
+ return parseInt(token.substr(0,count), 10);
+}
+
+function parseTime(token) {
+ var parts = token.split(':');
+ var result = [0,0,0];
+
+ /* RF6256 S5.1.1:
+ * time = hms-time ( non-digit *OCTET )
+ * hms-time = time-field ":" time-field ":" time-field
+ * time-field = 1*2DIGIT
+ */
+
+ if (parts.length !== 3) {
+ return null;
+ }
+
+ for (var i = 0; i < 3; i++) {
+ // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be
+ // followed by "( non-digit *OCTET )" so therefore the last time-field can
+ // have a trailer
+ var trailingOK = (i == 2);
+ var num = parseDigits(parts[i], 1, 2, trailingOK);
+ if (num === null) {
+ return null;
+ }
+ result[i] = num;
+ }
+
+ return result;
+}
+
+function parseMonth(token) {
+ token = String(token).substr(0,3).toLowerCase();
+ var num = MONTH_TO_NUM[token];
+ return num >= 0 ? num : null;
+}
+
+/*
+ * RFC6265 S5.1.1 date parser (see RFC for full grammar)
+ */
+function parseDate(str) {
+ if (!str) {
+ return;
+ }
+
+ /* RFC6265 S5.1.1:
+ * 2. Process each date-token sequentially in the order the date-tokens
+ * appear in the cookie-date
+ */
+ var tokens = str.split(DATE_DELIM);
+ if (!tokens) {
+ return;
+ }
+
+ var hour = null;
+ var minute = null;
+ var second = null;
+ var dayOfMonth = null;
+ var month = null;
+ var year = null;
+
+ for (var i=0; i<tokens.length; i++) {
+ var token = tokens[i].trim();
+ if (!token.length) {
+ continue;
+ }
+
+ var result;
+
+ /* 2.1. If the found-time flag is not set and the token matches the time
+ * production, set the found-time flag and set the hour- value,
+ * minute-value, and second-value to the numbers denoted by the digits in
+ * the date-token, respectively. Skip the remaining sub-steps and continue
+ * to the next date-token.
+ */
+ if (second === null) {
+ result = parseTime(token);
+ if (result) {
+ hour = result[0];
+ minute = result[1];
+ second = result[2];
+ continue;
+ }
+ }
+
+ /* 2.2. If the found-day-of-month flag is not set and the date-token matches
+ * the day-of-month production, set the found-day-of- month flag and set
+ * the day-of-month-value to the number denoted by the date-token. Skip
+ * the remaining sub-steps and continue to the next date-token.
+ */
+ if (dayOfMonth === null) {
+ // "day-of-month = 1*2DIGIT ( non-digit *OCTET )"
+ result = parseDigits(token, 1, 2, true);
+ if (result !== null) {
+ dayOfMonth = result;
+ continue;
+ }
+ }
+
+ /* 2.3. If the found-month flag is not set and the date-token matches the
+ * month production, set the found-month flag and set the month-value to
+ * the month denoted by the date-token. Skip the remaining sub-steps and
+ * continue to the next date-token.
+ */
+ if (month === null) {
+ result = parseMonth(token);
+ if (result !== null) {
+ month = result;
+ continue;
+ }
+ }
+
+ /* 2.4. If the found-year flag is not set and the date-token matches the
+ * year production, set the found-year flag and set the year-value to the
+ * number denoted by the date-token. Skip the remaining sub-steps and
+ * continue to the next date-token.
+ */
+ if (year === null) {
+ // "year = 2*4DIGIT ( non-digit *OCTET )"
+ result = parseDigits(token, 2, 4, true);
+ if (result !== null) {
+ year = result;
+ /* From S5.1.1:
+ * 3. If the year-value is greater than or equal to 70 and less
+ * than or equal to 99, increment the year-value by 1900.
+ * 4. If the year-value is greater than or equal to 0 and less
+ * than or equal to 69, increment the year-value by 2000.
+ */
+ if (year >= 70 && year <= 99) {
+ year += 1900;
+ } else if (year >= 0 && year <= 69) {
+ year += 2000;
+ }
+ }
+ }
+ }
+
+ /* RFC 6265 S5.1.1
+ * "5. Abort these steps and fail to parse the cookie-date if:
+ * * at least one of the found-day-of-month, found-month, found-
+ * year, or found-time flags is not set,
+ * * the day-of-month-value is less than 1 or greater than 31,
+ * * the year-value is less than 1601,
+ * * the hour-value is greater than 23,
+ * * the minute-value is greater than 59, or
+ * * the second-value is greater than 59.
+ * (Note that leap seconds cannot be represented in this syntax.)"
+ *
+ * So, in order as above:
+ */
+ if (
+ dayOfMonth === null || month === null || year === null || second === null ||
+ dayOfMonth < 1 || dayOfMonth > 31 ||
+ year < 1601 ||
+ hour > 23 ||
+ minute > 59 ||
+ second > 59
+ ) {
+ return;
+ }
+
+ return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second));
+}
+
+function formatDate(date) {
+ var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d;
+ var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h;
+ var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m;
+ var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s;
+ return NUM_TO_DAY[date.getUTCDay()] + ', ' +
+ d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+
+ h+':'+m+':'+s+' GMT';
+}
+
+// S5.1.2 Canonicalized Host Names
+function canonicalDomain(str) {
+ if (str == null) {
+ return null;
+ }
+ str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading .
+
+ // convert to IDN if any non-ASCII characters
+ if (punycode && /[^\u0001-\u007f]/.test(str)) {
+ str = punycode.toASCII(str);
+ }
+
+ return str.toLowerCase();
+}
+
+// S5.1.3 Domain Matching
+function domainMatch(str, domStr, canonicalize) {
+ if (str == null || domStr == null) {
+ return null;
+ }
+ if (canonicalize !== false) {
+ str = canonicalDomain(str);
+ domStr = canonicalDomain(domStr);
+ }
+
+ /*
+ * "The domain string and the string are identical. (Note that both the
+ * domain string and the string will have been canonicalized to lower case at
+ * this point)"
+ */
+ if (str == domStr) {
+ return true;
+ }
+
+ /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */
+
+ /* "* The string is a host name (i.e., not an IP address)." */
+ if (net.isIP(str)) {
+ return false;
+ }
+
+ /* "* The domain string is a suffix of the string" */
+ var idx = str.indexOf(domStr);
+ if (idx <= 0) {
+ return false; // it's a non-match (-1) or prefix (0)
+ }
+
+ // e.g "a.b.c".indexOf("b.c") === 2
+ // 5 === 3+2
+ if (str.length !== domStr.length + idx) { // it's not a suffix
+ return false;
+ }
+
+ /* "* The last character of the string that is not included in the domain
+ * string is a %x2E (".") character." */
+ if (str.substr(idx-1,1) !== '.') {
+ return false;
+ }
+
+ return true;
+}
+
+
+// RFC6265 S5.1.4 Paths and Path-Match
+
+/*
+ * "The user agent MUST use an algorithm equivalent to the following algorithm
+ * to compute the default-path of a cookie:"
+ *
+ * Assumption: the path (and not query part or absolute uri) is passed in.
+ */
+function defaultPath(path) {
+ // "2. If the uri-path is empty or if the first character of the uri-path is not
+ // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps.
+ if (!path || path.substr(0,1) !== "/") {
+ return "/";
+ }
+
+ // "3. If the uri-path contains no more than one %x2F ("/") character, output
+ // %x2F ("/") and skip the remaining step."
+ if (path === "/") {
+ return path;
+ }
+
+ var rightSlash = path.lastIndexOf("/");
+ if (rightSlash === 0) {
+ return "/";
+ }
+
+ // "4. Output the characters of the uri-path from the first character up to,
+ // but not including, the right-most %x2F ("/")."
+ return path.slice(0, rightSlash);
+}
+
+function trimTerminator(str) {
+ for (var t = 0; t < TERMINATORS.length; t++) {
+ var terminatorIdx = str.indexOf(TERMINATORS[t]);
+ if (terminatorIdx !== -1) {
+ str = str.substr(0,terminatorIdx);
+ }
+ }
+
+ return str;
+}
+
+function parseCookiePair(cookiePair, looseMode) {
+ cookiePair = trimTerminator(cookiePair);
+
+ var firstEq = cookiePair.indexOf('=');
+ if (looseMode) {
+ if (firstEq === 0) { // '=' is immediately at start
+ cookiePair = cookiePair.substr(1);
+ firstEq = cookiePair.indexOf('='); // might still need to split on '='
+ }
+ } else { // non-loose mode
+ if (firstEq <= 0) { // no '=' or is at start
+ return; // needs to have non-empty "cookie-name"
+ }
+ }
+
+ var cookieName, cookieValue;
+ if (firstEq <= 0) {
+ cookieName = "";
+ cookieValue = cookiePair.trim();
+ } else {
+ cookieName = cookiePair.substr(0, firstEq).trim();
+ cookieValue = cookiePair.substr(firstEq+1).trim();
+ }
+
+ if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) {
+ return;
+ }
+
+ var c = new Cookie();
+ c.key = cookieName;
+ c.value = cookieValue;
+ return c;
+}
+
+function parse(str, options) {
+ if (!options || typeof options !== 'object') {
+ options = {};
+ }
+ str = str.trim();
+
+ // We use a regex to parse the "name-value-pair" part of S5.2
+ var firstSemi = str.indexOf(';'); // S5.2 step 1
+ var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi);
+ var c = parseCookiePair(cookiePair, !!options.loose);
+ if (!c) {
+ return;
+ }
+
+ if (firstSemi === -1) {
+ return c;
+ }
+
+ // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string
+ // (including the %x3B (";") in question)." plus later on in the same section
+ // "discard the first ";" and trim".
+ var unparsed = str.slice(firstSemi + 1).trim();
+
+ // "If the unparsed-attributes string is empty, skip the rest of these
+ // steps."
+ if (unparsed.length === 0) {
+ return c;
+ }
+
+ /*
+ * S5.2 says that when looping over the items "[p]rocess the attribute-name
+ * and attribute-value according to the requirements in the following
+ * subsections" for every item. Plus, for many of the individual attributes
+ * in S5.3 it says to use the "attribute-value of the last attribute in the
+ * cookie-attribute-list". Therefore, in this implementation, we overwrite
+ * the previous value.
+ */
+ var cookie_avs = unparsed.split(';');
+ while (cookie_avs.length) {
+ var av = cookie_avs.shift().trim();
+ if (av.length === 0) { // happens if ";;" appears
+ continue;
+ }
+ var av_sep = av.indexOf('=');
+ var av_key, av_value;
+
+ if (av_sep === -1) {
+ av_key = av;
+ av_value = null;
+ } else {
+ av_key = av.substr(0,av_sep);
+ av_value = av.substr(av_sep+1);
+ }
+
+ av_key = av_key.trim().toLowerCase();
+
+ if (av_value) {
+ av_value = av_value.trim();
+ }
+
+ switch(av_key) {
+ case 'expires': // S5.2.1
+ if (av_value) {
+ var exp = parseDate(av_value);
+ // "If the attribute-value failed to parse as a cookie date, ignore the
+ // cookie-av."
+ if (exp) {
+ // over and underflow not realistically a concern: V8's getTime() seems to
+ // store something larger than a 32-bit time_t (even with 32-bit node)
+ c.expires = exp;
+ }
+ }
+ break;
+
+ case 'max-age': // S5.2.2
+ if (av_value) {
+ // "If the first character of the attribute-value is not a DIGIT or a "-"
+ // character ...[or]... If the remainder of attribute-value contains a
+ // non-DIGIT character, ignore the cookie-av."
+ if (/^-?[0-9]+$/.test(av_value)) {
+ var delta = parseInt(av_value, 10);
+ // "If delta-seconds is less than or equal to zero (0), let expiry-time
+ // be the earliest representable date and time."
+ c.setMaxAge(delta);
+ }
+ }
+ break;
+
+ case 'domain': // S5.2.3
+ // "If the attribute-value is empty, the behavior is undefined. However,
+ // the user agent SHOULD ignore the cookie-av entirely."
+ if (av_value) {
+ // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E
+ // (".") character."
+ var domain = av_value.trim().replace(/^\./, '');
+ if (domain) {
+ // "Convert the cookie-domain to lower case."
+ c.domain = domain.toLowerCase();
+ }
+ }
+ break;
+
+ case 'path': // S5.2.4
+ /*
+ * "If the attribute-value is empty or if the first character of the
+ * attribute-value is not %x2F ("/"):
+ * Let cookie-path be the default-path.
+ * Otherwise:
+ * Let cookie-path be the attribute-value."
+ *
+ * We'll represent the default-path as null since it depends on the
+ * context of the parsing.
+ */
+ c.path = av_value && av_value[0] === "/" ? av_value : null;
+ break;
+
+ case 'secure': // S5.2.5
+ /*
+ * "If the attribute-name case-insensitively matches the string "Secure",
+ * the user agent MUST append an attribute to the cookie-attribute-list
+ * with an attribute-name of Secure and an empty attribute-value."
+ */
+ c.secure = true;
+ break;
+
+ case 'httponly': // S5.2.6 -- effectively the same as 'secure'
+ c.httpOnly = true;
+ break;
+
+ default:
+ c.extensions = c.extensions || [];
+ c.extensions.push(av);
+ break;
+ }
+ }
+
+ return c;
+}
+
+// avoid the V8 deoptimization monster!
+function jsonParse(str) {
+ var obj;
+ try {
+ obj = JSON.parse(str);
+ } catch (e) {
+ return e;
+ }
+ return obj;
+}
+
+function fromJSON(str) {
+ if (!str) {
+ return null;
+ }
+
+ var obj;
+ if (typeof str === 'string') {
+ obj = jsonParse(str);
+ if (obj instanceof Error) {
+ return null;
+ }
+ } else {
+ // assume it's an Object
+ obj = str;
+ }
+
+ var c = new Cookie();
+ for (var i=0; i<Cookie.serializableProperties.length; i++) {
+ var prop = Cookie.serializableProperties[i];
+ if (obj[prop] === undefined ||
+ obj[prop] === Cookie.prototype[prop])
+ {
+ continue; // leave as prototype default
+ }
+
+ if (prop === 'expires' ||
+ prop === 'creation' ||
+ prop === 'lastAccessed')
+ {
+ if (obj[prop] === null) {
+ c[prop] = null;
+ } else {
+ c[prop] = obj[prop] == "Infinity" ?
+ "Infinity" : new Date(obj[prop]);
+ }
+ } else {
+ c[prop] = obj[prop];
+ }
+ }
+
+ return c;
+}
+
+/* Section 5.4 part 2:
+ * "* Cookies with longer paths are listed before cookies with
+ * shorter paths.
+ *
+ * * Among cookies that have equal-length path fields, cookies with
+ * earlier creation-times are listed before cookies with later
+ * creation-times."
+ */
+
+function cookieCompare(a,b) {
+ var cmp = 0;
+
+ // descending for length: b CMP a
+ var aPathLen = a.path ? a.path.length : 0;
+ var bPathLen = b.path ? b.path.length : 0;
+ cmp = bPathLen - aPathLen;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ // ascending for time: a CMP b
+ var aTime = a.creation ? a.creation.getTime() : MAX_TIME;
+ var bTime = b.creation ? b.creation.getTime() : MAX_TIME;
+ cmp = aTime - bTime;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ // break ties for the same millisecond (precision of JavaScript's clock)
+ cmp = a.creationIndex - b.creationIndex;
+
+ return cmp;
+}
+
+// Gives the permutation of all possible pathMatch()es of a given path. The
+// array is in longest-to-shortest order. Handy for indexing.
+function permutePath(path) {
+ if (path === '/') {
+ return ['/'];
+ }
+ if (path.lastIndexOf('/') === path.length-1) {
+ path = path.substr(0,path.length-1);
+ }
+ var permutations = [path];
+ while (path.length > 1) {
+ var lindex = path.lastIndexOf('/');
+ if (lindex === 0) {
+ break;
+ }
+ path = path.substr(0,lindex);
+ permutations.push(path);
+ }
+ permutations.push('/');
+ return permutations;
+}
+
+function getCookieContext(url) {
+ if (url instanceof Object) {
+ return url;
+ }
+ // NOTE: decodeURI will throw on malformed URIs (see GH-32).
+ // Therefore, we will just skip decoding for such URIs.
+ try {
+ url = decodeURI(url);
+ }
+ catch(err) {
+ // Silently swallow error
+ }
+
+ return urlParse(url);
+}
+
+function Cookie(options) {
+ options = options || {};
+
+ Object.keys(options).forEach(function(prop) {
+ if (Cookie.prototype.hasOwnProperty(prop) &&
+ Cookie.prototype[prop] !== options[prop] &&
+ prop.substr(0,1) !== '_')
+ {
+ this[prop] = options[prop];
+ }
+ }, this);
+
+ this.creation = this.creation || new Date();
+
+ // used to break creation ties in cookieCompare():
+ Object.defineProperty(this, 'creationIndex', {
+ configurable: false,
+ enumerable: false, // important for assert.deepEqual checks
+ writable: true,
+ value: ++Cookie.cookiesCreated
+ });
+}
+
+Cookie.cookiesCreated = 0; // incremented each time a cookie is created
+
+Cookie.parse = parse;
+Cookie.fromJSON = fromJSON;
+
+Cookie.prototype.key = "";
+Cookie.prototype.value = "";
+
+// the order in which the RFC has them:
+Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity
+Cookie.prototype.maxAge = null; // takes precedence over expires for TTL
+Cookie.prototype.domain = null;
+Cookie.prototype.path = null;
+Cookie.prototype.secure = false;
+Cookie.prototype.httpOnly = false;
+Cookie.prototype.extensions = null;
+
+// set by the CookieJar:
+Cookie.prototype.hostOnly = null; // boolean when set
+Cookie.prototype.pathIsDefault = null; // boolean when set
+Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse
+Cookie.prototype.lastAccessed = null; // Date when set
+Object.defineProperty(Cookie.prototype, 'creationIndex', {
+ configurable: true,
+ enumerable: false,
+ writable: true,
+ value: 0
+});
+
+Cookie.serializableProperties = Object.keys(Cookie.prototype)
+ .filter(function(prop) {
+ return !(
+ Cookie.prototype[prop] instanceof Function ||
+ prop === 'creationIndex' ||
+ prop.substr(0,1) === '_'
+ );
+ });
+
+Cookie.prototype.inspect = function inspect() {
+ var now = Date.now();
+ return 'Cookie="'+this.toString() +
+ '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') +
+ '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') +
+ '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') +
+ '"';
+};
+
+// Use the new custom inspection symbol to add the custom inspect function if
+// available.
+if (util.inspect.custom) {
+ Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect;
+}
+
+Cookie.prototype.toJSON = function() {
+ var obj = {};
+
+ var props = Cookie.serializableProperties;
+ for (var i=0; i<props.length; i++) {
+ var prop = props[i];
+ if (this[prop] === Cookie.prototype[prop]) {
+ continue; // leave as prototype default
+ }
+
+ if (prop === 'expires' ||
+ prop === 'creation' ||
+ prop === 'lastAccessed')
+ {
+ if (this[prop] === null) {
+ obj[prop] = null;
+ } else {
+ obj[prop] = this[prop] == "Infinity" ? // intentionally not ===
+ "Infinity" : this[prop].toISOString();
+ }
+ } else if (prop === 'maxAge') {
+ if (this[prop] !== null) {
+ // again, intentionally not ===
+ obj[prop] = (this[prop] == Infinity || this[prop] == -Infinity) ?
+ this[prop].toString() : this[prop];
+ }
+ } else {
+ if (this[prop] !== Cookie.prototype[prop]) {
+ obj[prop] = this[prop];
+ }
+ }
+ }
+
+ return obj;
+};
+
+Cookie.prototype.clone = function() {
+ return fromJSON(this.toJSON());
+};
+
+Cookie.prototype.validate = function validate() {
+ if (!COOKIE_OCTETS.test(this.value)) {
+ return false;
+ }
+ if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires)) {
+ return false;
+ }
+ if (this.maxAge != null && this.maxAge <= 0) {
+ return false; // "Max-Age=" non-zero-digit *DIGIT
+ }
+ if (this.path != null && !PATH_VALUE.test(this.path)) {
+ return false;
+ }
+
+ var cdomain = this.cdomain();
+ if (cdomain) {
+ if (cdomain.match(/\.$/)) {
+ return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this
+ }
+ var suffix = pubsuffix.getPublicSuffix(cdomain);
+ if (suffix == null) { // it's a public suffix
+ return false;
+ }
+ }
+ return true;
+};
+
+Cookie.prototype.setExpires = function setExpires(exp) {
+ if (exp instanceof Date) {
+ this.expires = exp;
+ } else {
+ this.expires = parseDate(exp) || "Infinity";
+ }
+};
+
+Cookie.prototype.setMaxAge = function setMaxAge(age) {
+ if (age === Infinity || age === -Infinity) {
+ this.maxAge = age.toString(); // so JSON.stringify() works
+ } else {
+ this.maxAge = age;
+ }
+};
+
+// gives Cookie header format
+Cookie.prototype.cookieString = function cookieString() {
+ var val = this.value;
+ if (val == null) {
+ val = '';
+ }
+ if (this.key === '') {
+ return val;
+ }
+ return this.key+'='+val;
+};
+
+// gives Set-Cookie header format
+Cookie.prototype.toString = function toString() {
+ var str = this.cookieString();
+
+ if (this.expires != Infinity) {
+ if (this.expires instanceof Date) {
+ str += '; Expires='+formatDate(this.expires);
+ } else {
+ str += '; Expires='+this.expires;
+ }
+ }
+
+ if (this.maxAge != null && this.maxAge != Infinity) {
+ str += '; Max-Age='+this.maxAge;
+ }
+
+ if (this.domain && !this.hostOnly) {
+ str += '; Domain='+this.domain;
+ }
+ if (this.path) {
+ str += '; Path='+this.path;
+ }
+
+ if (this.secure) {
+ str += '; Secure';
+ }
+ if (this.httpOnly) {
+ str += '; HttpOnly';
+ }
+ if (this.extensions) {
+ this.extensions.forEach(function(ext) {
+ str += '; '+ext;
+ });
+ }
+
+ return str;
+};
+
+// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
+// elsewhere)
+// S5.3 says to give the "latest representable date" for which we use Infinity
+// For "expired" we use 0
+Cookie.prototype.TTL = function TTL(now) {
+ /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires
+ * attribute, the Max-Age attribute has precedence and controls the
+ * expiration date of the cookie.
+ * (Concurs with S5.3 step 3)
+ */
+ if (this.maxAge != null) {
+ return this.maxAge<=0 ? 0 : this.maxAge*1000;
+ }
+
+ var expires = this.expires;
+ if (expires != Infinity) {
+ if (!(expires instanceof Date)) {
+ expires = parseDate(expires) || Infinity;
+ }
+
+ if (expires == Infinity) {
+ return Infinity;
+ }
+
+ return expires.getTime() - (now || Date.now());
+ }
+
+ return Infinity;
+};
+
+// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
+// elsewhere)
+Cookie.prototype.expiryTime = function expiryTime(now) {
+ if (this.maxAge != null) {
+ var relativeTo = now || this.creation || new Date();
+ var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000;
+ return relativeTo.getTime() + age;
+ }
+
+ if (this.expires == Infinity) {
+ return Infinity;
+ }
+ return this.expires.getTime();
+};
+
+// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
+// elsewhere), except it returns a Date
+Cookie.prototype.expiryDate = function expiryDate(now) {
+ var millisec = this.expiryTime(now);
+ if (millisec == Infinity) {
+ return new Date(MAX_TIME);
+ } else if (millisec == -Infinity) {
+ return new Date(MIN_TIME);
+ } else {
+ return new Date(millisec);
+ }
+};
+
+// This replaces the "persistent-flag" parts of S5.3 step 3
+Cookie.prototype.isPersistent = function isPersistent() {
+ return (this.maxAge != null || this.expires != Infinity);
+};
+
+// Mostly S5.1.2 and S5.2.3:
+Cookie.prototype.cdomain =
+Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() {
+ if (this.domain == null) {
+ return null;
+ }
+ return canonicalDomain(this.domain);
+};
+
+function CookieJar(store, options) {
+ if (typeof options === "boolean") {
+ options = {rejectPublicSuffixes: options};
+ } else if (options == null) {
+ options = {};
+ }
+ if (options.rejectPublicSuffixes != null) {
+ this.rejectPublicSuffixes = options.rejectPublicSuffixes;
+ }
+ if (options.looseMode != null) {
+ this.enableLooseMode = options.looseMode;
+ }
+
+ if (!store) {
+ store = new MemoryCookieStore();
+ }
+ this.store = store;
+}
+CookieJar.prototype.store = null;
+CookieJar.prototype.rejectPublicSuffixes = true;
+CookieJar.prototype.enableLooseMode = false;
+var CAN_BE_SYNC = [];
+
+CAN_BE_SYNC.push('setCookie');
+CookieJar.prototype.setCookie = function(cookie, url, options, cb) {
+ var err;
+ var context = getCookieContext(url);
+ if (options instanceof Function) {
+ cb = options;
+ options = {};
+ }
+
+ var host = canonicalDomain(context.hostname);
+ var loose = this.enableLooseMode;
+ if (options.loose != null) {
+ loose = options.loose;
+ }
+
+ // S5.3 step 1
+ if (!(cookie instanceof Cookie)) {
+ cookie = Cookie.parse(cookie, { loose: loose });
+ }
+ if (!cookie) {
+ err = new Error("Cookie failed to parse");
+ return cb(options.ignoreError ? null : err);
+ }
+
+ // S5.3 step 2
+ var now = options.now || new Date(); // will assign later to save effort in the face of errors
+
+ // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie()
+
+ // S5.3 step 4: NOOP; domain is null by default
+
+ // S5.3 step 5: public suffixes
+ if (this.rejectPublicSuffixes && cookie.domain) {
+ var suffix = pubsuffix.getPublicSuffix(cookie.cdomain());
+ if (suffix == null) { // e.g. "com"
+ err = new Error("Cookie has domain set to a public suffix");
+ return cb(options.ignoreError ? null : err);
+ }
+ }
+
+ // S5.3 step 6:
+ if (cookie.domain) {
+ if (!domainMatch(host, cookie.cdomain(), false)) {
+ err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host);
+ return cb(options.ignoreError ? null : err);
+ }
+
+ if (cookie.hostOnly == null) { // don't reset if already set
+ cookie.hostOnly = false;
+ }
+
+ } else {
+ cookie.hostOnly = true;
+ cookie.domain = host;
+ }
+
+ //S5.2.4 If the attribute-value is empty or if the first character of the
+ //attribute-value is not %x2F ("/"):
+ //Let cookie-path be the default-path.
+ if (!cookie.path || cookie.path[0] !== '/') {
+ cookie.path = defaultPath(context.pathname);
+ cookie.pathIsDefault = true;
+ }
+
+ // S5.3 step 8: NOOP; secure attribute
+ // S5.3 step 9: NOOP; httpOnly attribute
+
+ // S5.3 step 10
+ if (options.http === false && cookie.httpOnly) {
+ err = new Error("Cookie is HttpOnly and this isn't an HTTP API");
+ return cb(options.ignoreError ? null : err);
+ }
+
+ var store = this.store;
+
+ if (!store.updateCookie) {
+ store.updateCookie = function(oldCookie, newCookie, cb) {
+ this.putCookie(newCookie, cb);
+ };
+ }
+
+ function withCookie(err, oldCookie) {
+ if (err) {
+ return cb(err);
+ }
+
+ var next = function(err) {
+ if (err) {
+ return cb(err);
+ } else {
+ cb(null, cookie);
+ }
+ };
+
+ if (oldCookie) {
+ // S5.3 step 11 - "If the cookie store contains a cookie with the same name,
+ // domain, and path as the newly created cookie:"
+ if (options.http === false && oldCookie.httpOnly) { // step 11.2
+ err = new Error("old Cookie is HttpOnly and this isn't an HTTP API");
+ return cb(options.ignoreError ? null : err);
+ }
+ cookie.creation = oldCookie.creation; // step 11.3
+ cookie.creationIndex = oldCookie.creationIndex; // preserve tie-breaker
+ cookie.lastAccessed = now;
+ // Step 11.4 (delete cookie) is implied by just setting the new one:
+ store.updateCookie(oldCookie, cookie, next); // step 12
+
+ } else {
+ cookie.creation = cookie.lastAccessed = now;
+ store.putCookie(cookie, next); // step 12
+ }
+ }
+
+ store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie);
+};
+
+// RFC6365 S5.4
+CAN_BE_SYNC.push('getCookies');
+CookieJar.prototype.getCookies = function(url, options, cb) {
+ var context = getCookieContext(url);
+ if (options instanceof Function) {
+ cb = options;
+ options = {};
+ }
+
+ var host = canonicalDomain(context.hostname);
+ var path = context.pathname || '/';
+
+ var secure = options.secure;
+ if (secure == null && context.protocol &&
+ (context.protocol == 'https:' || context.protocol == 'wss:'))
+ {
+ secure = true;
+ }
+
+ var http = options.http;
+ if (http == null) {
+ http = true;
+ }
+
+ var now = options.now || Date.now();
+ var expireCheck = options.expire !== false;
+ var allPaths = !!options.allPaths;
+ var store = this.store;
+
+ function matchingCookie(c) {
+ // "Either:
+ // The cookie's host-only-flag is true and the canonicalized
+ // request-host is identical to the cookie's domain.
+ // Or:
+ // The cookie's host-only-flag is false and the canonicalized
+ // request-host domain-matches the cookie's domain."
+ if (c.hostOnly) {
+ if (c.domain != host) {
+ return false;
+ }
+ } else {
+ if (!domainMatch(host, c.domain, false)) {
+ return false;
+ }
+ }
+
+ // "The request-uri's path path-matches the cookie's path."
+ if (!allPaths && !pathMatch(path, c.path)) {
+ return false;
+ }
+
+ // "If the cookie's secure-only-flag is true, then the request-uri's
+ // scheme must denote a "secure" protocol"
+ if (c.secure && !secure) {
+ return false;
+ }
+
+ // "If the cookie's http-only-flag is true, then exclude the cookie if the
+ // cookie-string is being generated for a "non-HTTP" API"
+ if (c.httpOnly && !http) {
+ return false;
+ }
+
+ // deferred from S5.3
+ // non-RFC: allow retention of expired cookies by choice
+ if (expireCheck && c.expiryTime() <= now) {
+ store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored
+ return false;
+ }
+
+ return true;
+ }
+
+ store.findCookies(host, allPaths ? null : path, function(err,cookies) {
+ if (err) {
+ return cb(err);
+ }
+
+ cookies = cookies.filter(matchingCookie);
+
+ // sorting of S5.4 part 2
+ if (options.sort !== false) {
+ cookies = cookies.sort(cookieCompare);
+ }
+
+ // S5.4 part 3
+ var now = new Date();
+ cookies.forEach(function(c) {
+ c.lastAccessed = now;
+ });
+ // TODO persist lastAccessed
+
+ cb(null,cookies);
+ });
+};
+
+CAN_BE_SYNC.push('getCookieString');
+CookieJar.prototype.getCookieString = function(/*..., cb*/) {
+ var args = Array.prototype.slice.call(arguments,0);
+ var cb = args.pop();
+ var next = function(err,cookies) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, cookies
+ .sort(cookieCompare)
+ .map(function(c){
+ return c.cookieString();
+ })
+ .join('; '));
+ }
+ };
+ args.push(next);
+ this.getCookies.apply(this,args);
+};
+
+CAN_BE_SYNC.push('getSetCookieStrings');
+CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) {
+ var args = Array.prototype.slice.call(arguments,0);
+ var cb = args.pop();
+ var next = function(err,cookies) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, cookies.map(function(c){
+ return c.toString();
+ }));
+ }
+ };
+ args.push(next);
+ this.getCookies.apply(this,args);
+};
+
+CAN_BE_SYNC.push('serialize');
+CookieJar.prototype.serialize = function(cb) {
+ var type = this.store.constructor.name;
+ if (type === 'Object') {
+ type = null;
+ }
+
+ // update README.md "Serialization Format" if you change this, please!
+ var serialized = {
+ // The version of tough-cookie that serialized this jar. Generally a good
+ // practice since future versions can make data import decisions based on
+ // known past behavior. When/if this matters, use `semver`.
+ version: 'tough-cookie@'+VERSION,
+
+ // add the store type, to make humans happy:
+ storeType: type,
+
+ // CookieJar configuration:
+ rejectPublicSuffixes: !!this.rejectPublicSuffixes,
+
+ // this gets filled from getAllCookies:
+ cookies: []
+ };
+
+ if (!(this.store.getAllCookies &&
+ typeof this.store.getAllCookies === 'function'))
+ {
+ return cb(new Error('store does not support getAllCookies and cannot be serialized'));
+ }
+
+ this.store.getAllCookies(function(err,cookies) {
+ if (err) {
+ return cb(err);
+ }
+
+ serialized.cookies = cookies.map(function(cookie) {
+ // convert to serialized 'raw' cookies
+ cookie = (cookie instanceof Cookie) ? cookie.toJSON() : cookie;
+
+ // Remove the index so new ones get assigned during deserialization
+ delete cookie.creationIndex;
+
+ return cookie;
+ });
+
+ return cb(null, serialized);
+ });
+};
+
+// well-known name that JSON.stringify calls
+CookieJar.prototype.toJSON = function() {
+ return this.serializeSync();
+};
+
+// use the class method CookieJar.deserialize instead of calling this directly
+CAN_BE_SYNC.push('_importCookies');
+CookieJar.prototype._importCookies = function(serialized, cb) {
+ var jar = this;
+ var cookies = serialized.cookies;
+ if (!cookies || !Array.isArray(cookies)) {
+ return cb(new Error('serialized jar has no cookies array'));
+ }
+ cookies = cookies.slice(); // do not modify the original
+
+ function putNext(err) {
+ if (err) {
+ return cb(err);
+ }
+
+ if (!cookies.length) {
+ return cb(err, jar);
+ }
+
+ var cookie;
+ try {
+ cookie = fromJSON(cookies.shift());
+ } catch (e) {
+ return cb(e);
+ }
+
+ if (cookie === null) {
+ return putNext(null); // skip this cookie
+ }
+
+ jar.store.putCookie(cookie, putNext);
+ }
+
+ putNext();
+};
+
+CookieJar.deserialize = function(strOrObj, store, cb) {
+ if (arguments.length !== 3) {
+ // store is optional
+ cb = store;
+ store = null;
+ }
+
+ var serialized;
+ if (typeof strOrObj === 'string') {
+ serialized = jsonParse(strOrObj);
+ if (serialized instanceof Error) {
+ return cb(serialized);
+ }
+ } else {
+ serialized = strOrObj;
+ }
+
+ var jar = new CookieJar(store, serialized.rejectPublicSuffixes);
+ jar._importCookies(serialized, function(err) {
+ if (err) {
+ return cb(err);
+ }
+ cb(null, jar);
+ });
+};
+
+CookieJar.deserializeSync = function(strOrObj, store) {
+ var serialized = typeof strOrObj === 'string' ?
+ JSON.parse(strOrObj) : strOrObj;
+ var jar = new CookieJar(store, serialized.rejectPublicSuffixes);
+
+ // catch this mistake early:
+ if (!jar.store.synchronous) {
+ throw new Error('CookieJar store is not synchronous; use async API instead.');
+ }
+
+ jar._importCookiesSync(serialized);
+ return jar;
+};
+CookieJar.fromJSON = CookieJar.deserializeSync;
+
+CookieJar.prototype.clone = function(newStore, cb) {
+ if (arguments.length === 1) {
+ cb = newStore;
+ newStore = null;
+ }
+
+ this.serialize(function(err,serialized) {
+ if (err) {
+ return cb(err);
+ }
+ CookieJar.deserialize(serialized, newStore, cb);
+ });
+};
+
+CAN_BE_SYNC.push('removeAllCookies');
+CookieJar.prototype.removeAllCookies = function(cb) {
+ var store = this.store;
+
+ // Check that the store implements its own removeAllCookies(). The default
+ // implementation in Store will immediately call the callback with a "not
+ // implemented" Error.
+ if (store.removeAllCookies instanceof Function &&
+ store.removeAllCookies !== Store.prototype.removeAllCookies)
+ {
+ return store.removeAllCookies(cb);
+ }
+
+ store.getAllCookies(function(err, cookies) {
+ if (err) {
+ return cb(err);
+ }
+
+ if (cookies.length === 0) {
+ return cb(null);
+ }
+
+ var completedCount = 0;
+ var removeErrors = [];
+
+ function removeCookieCb(removeErr) {
+ if (removeErr) {
+ removeErrors.push(removeErr);
+ }
+
+ completedCount++;
+
+ if (completedCount === cookies.length) {
+ return cb(removeErrors.length ? removeErrors[0] : null);
+ }
+ }
+
+ cookies.forEach(function(cookie) {
+ store.removeCookie(cookie.domain, cookie.path, cookie.key, removeCookieCb);
+ });
+ });
+};
+
+CookieJar.prototype._cloneSync = syncWrap('clone');
+CookieJar.prototype.cloneSync = function(newStore) {
+ if (!newStore.synchronous) {
+ throw new Error('CookieJar clone destination store is not synchronous; use async API instead.');
+ }
+ return this._cloneSync(newStore);
+};
+
+// Use a closure to provide a true imperative API for synchronous stores.
+function syncWrap(method) {
+ return function() {
+ if (!this.store.synchronous) {
+ throw new Error('CookieJar store is not synchronous; use async API instead.');
+ }
+
+ var args = Array.prototype.slice.call(arguments);
+ var syncErr, syncResult;
+ args.push(function syncCb(err, result) {
+ syncErr = err;
+ syncResult = result;
+ });
+ this[method].apply(this, args);
+
+ if (syncErr) {
+ throw syncErr;
+ }
+ return syncResult;
+ };
+}
+
+// wrap all declared CAN_BE_SYNC methods in the sync wrapper
+CAN_BE_SYNC.forEach(function(method) {
+ CookieJar.prototype[method+'Sync'] = syncWrap(method);
+});
+
+exports.version = VERSION;
+exports.CookieJar = CookieJar;
+exports.Cookie = Cookie;
+exports.Store = Store;
+exports.MemoryCookieStore = MemoryCookieStore;
+exports.parseDate = parseDate;
+exports.formatDate = formatDate;
+exports.parse = parse;
+exports.fromJSON = fromJSON;
+exports.domainMatch = domainMatch;
+exports.defaultPath = defaultPath;
+exports.pathMatch = pathMatch;
+exports.getPublicSuffix = pubsuffix.getPublicSuffix;
+exports.cookieCompare = cookieCompare;
+exports.permuteDomain = require('./permuteDomain').permuteDomain;
+exports.permutePath = permutePath;
+exports.canonicalDomain = canonicalDomain;
diff --git a/node_modules/tough-cookie/lib/memstore.js b/node_modules/tough-cookie/lib/memstore.js
new file mode 100644
index 0000000..d2b915c
--- /dev/null
+++ b/node_modules/tough-cookie/lib/memstore.js
@@ -0,0 +1,181 @@
+/*!
+ * Copyright (c) 2015, Salesforce.com, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+'use strict';
+var Store = require('./store').Store;
+var permuteDomain = require('./permuteDomain').permuteDomain;
+var pathMatch = require('./pathMatch').pathMatch;
+var util = require('util');
+
+function MemoryCookieStore() {
+ Store.call(this);
+ this.idx = {};
+}
+util.inherits(MemoryCookieStore, Store);
+exports.MemoryCookieStore = MemoryCookieStore;
+MemoryCookieStore.prototype.idx = null;
+
+// Since it's just a struct in RAM, this Store is synchronous
+MemoryCookieStore.prototype.synchronous = true;
+
+// force a default depth:
+MemoryCookieStore.prototype.inspect = function() {
+ return "{ idx: "+util.inspect(this.idx, false, 2)+' }';
+};
+
+// Use the new custom inspection symbol to add the custom inspect function if
+// available.
+if (util.inspect.custom) {
+ MemoryCookieStore.prototype[util.inspect.custom] = MemoryCookieStore.prototype.inspect;
+}
+
+MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) {
+ if (!this.idx[domain]) {
+ return cb(null,undefined);
+ }
+ if (!this.idx[domain][path]) {
+ return cb(null,undefined);
+ }
+ return cb(null,this.idx[domain][path][key]||null);
+};
+
+MemoryCookieStore.prototype.findCookies = function(domain, path, cb) {
+ var results = [];
+ if (!domain) {
+ return cb(null,[]);
+ }
+
+ var pathMatcher;
+ if (!path) {
+ // null means "all paths"
+ pathMatcher = function matchAll(domainIndex) {
+ for (var curPath in domainIndex) {
+ var pathIndex = domainIndex[curPath];
+ for (var key in pathIndex) {
+ results.push(pathIndex[key]);
+ }
+ }
+ };
+
+ } else {
+ pathMatcher = function matchRFC(domainIndex) {
+ //NOTE: we should use path-match algorithm from S5.1.4 here
+ //(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299)
+ Object.keys(domainIndex).forEach(function (cookiePath) {
+ if (pathMatch(path, cookiePath)) {
+ var pathIndex = domainIndex[cookiePath];
+
+ for (var key in pathIndex) {
+ results.push(pathIndex[key]);
+ }
+ }
+ });
+ };
+ }
+
+ var domains = permuteDomain(domain) || [domain];
+ var idx = this.idx;
+ domains.forEach(function(curDomain) {
+ var domainIndex = idx[curDomain];
+ if (!domainIndex) {
+ return;
+ }
+ pathMatcher(domainIndex);
+ });
+
+ cb(null,results);
+};
+
+MemoryCookieStore.prototype.putCookie = function(cookie, cb) {
+ if (!this.idx[cookie.domain]) {
+ this.idx[cookie.domain] = {};
+ }
+ if (!this.idx[cookie.domain][cookie.path]) {
+ this.idx[cookie.domain][cookie.path] = {};
+ }
+ this.idx[cookie.domain][cookie.path][cookie.key] = cookie;
+ cb(null);
+};
+
+MemoryCookieStore.prototype.updateCookie = function(oldCookie, newCookie, cb) {
+ // updateCookie() may avoid updating cookies that are identical. For example,
+ // lastAccessed may not be important to some stores and an equality
+ // comparison could exclude that field.
+ this.putCookie(newCookie,cb);
+};
+
+MemoryCookieStore.prototype.removeCookie = function(domain, path, key, cb) {
+ if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) {
+ delete this.idx[domain][path][key];
+ }
+ cb(null);
+};
+
+MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) {
+ if (this.idx[domain]) {
+ if (path) {
+ delete this.idx[domain][path];
+ } else {
+ delete this.idx[domain];
+ }
+ }
+ return cb(null);
+};
+
+MemoryCookieStore.prototype.removeAllCookies = function(cb) {
+ this.idx = {};
+ return cb(null);
+}
+
+MemoryCookieStore.prototype.getAllCookies = function(cb) {
+ var cookies = [];
+ var idx = this.idx;
+
+ var domains = Object.keys(idx);
+ domains.forEach(function(domain) {
+ var paths = Object.keys(idx[domain]);
+ paths.forEach(function(path) {
+ var keys = Object.keys(idx[domain][path]);
+ keys.forEach(function(key) {
+ if (key !== null) {
+ cookies.push(idx[domain][path][key]);
+ }
+ });
+ });
+ });
+
+ // Sort by creationIndex so deserializing retains the creation order.
+ // When implementing your own store, this SHOULD retain the order too
+ cookies.sort(function(a,b) {
+ return (a.creationIndex||0) - (b.creationIndex||0);
+ });
+
+ cb(null, cookies);
+};
diff --git a/node_modules/tough-cookie/lib/pathMatch.js b/node_modules/tough-cookie/lib/pathMatch.js
new file mode 100644
index 0000000..7c7a79f
--- /dev/null
+++ b/node_modules/tough-cookie/lib/pathMatch.js
@@ -0,0 +1,61 @@
+/*!
+ * Copyright (c) 2015, Salesforce.com, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+"use strict";
+/*
+ * "A request-path path-matches a given cookie-path if at least one of the
+ * following conditions holds:"
+ */
+function pathMatch (reqPath, cookiePath) {
+ // "o The cookie-path and the request-path are identical."
+ if (cookiePath === reqPath) {
+ return true;
+ }
+
+ var idx = reqPath.indexOf(cookiePath);
+ if (idx === 0) {
+ // "o The cookie-path is a prefix of the request-path, and the last
+ // character of the cookie-path is %x2F ("/")."
+ if (cookiePath.substr(-1) === "/") {
+ return true;
+ }
+
+ // " o The cookie-path is a prefix of the request-path, and the first
+ // character of the request-path that is not included in the cookie- path
+ // is a %x2F ("/") character."
+ if (reqPath.substr(cookiePath.length, 1) === "/") {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+exports.pathMatch = pathMatch;
diff --git a/node_modules/tough-cookie/lib/permuteDomain.js b/node_modules/tough-cookie/lib/permuteDomain.js
new file mode 100644
index 0000000..91bf446
--- /dev/null
+++ b/node_modules/tough-cookie/lib/permuteDomain.js
@@ -0,0 +1,56 @@
+/*!
+ * Copyright (c) 2015, Salesforce.com, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+"use strict";
+var pubsuffix = require('./pubsuffix-psl');
+
+// Gives the permutation of all possible domainMatch()es of a given domain. The
+// array is in shortest-to-longest order. Handy for indexing.
+function permuteDomain (domain) {
+ var pubSuf = pubsuffix.getPublicSuffix(domain);
+ if (!pubSuf) {
+ return null;
+ }
+ if (pubSuf == domain) {
+ return [domain];
+ }
+
+ var prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com"
+ var parts = prefix.split('.').reverse();
+ var cur = pubSuf;
+ var permutations = [cur];
+ while (parts.length) {
+ cur = parts.shift() + '.' + cur;
+ permutations.push(cur);
+ }
+ return permutations;
+}
+
+exports.permuteDomain = permuteDomain;
diff --git a/node_modules/tough-cookie/lib/pubsuffix-psl.js b/node_modules/tough-cookie/lib/pubsuffix-psl.js
new file mode 100644
index 0000000..c88329f
--- /dev/null
+++ b/node_modules/tough-cookie/lib/pubsuffix-psl.js
@@ -0,0 +1,38 @@
+/*!
+ * Copyright (c) 2018, Salesforce.com, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+'use strict';
+var psl = require('psl');
+
+function getPublicSuffix(domain) {
+ return psl.get(domain);
+}
+
+exports.getPublicSuffix = getPublicSuffix;
diff --git a/node_modules/tough-cookie/lib/store.js b/node_modules/tough-cookie/lib/store.js
new file mode 100644
index 0000000..859208f
--- /dev/null
+++ b/node_modules/tough-cookie/lib/store.js
@@ -0,0 +1,75 @@
+/*!
+ * Copyright (c) 2015, Salesforce.com, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+'use strict';
+/*jshint unused:false */
+
+function Store() {
+}
+exports.Store = Store;
+
+// Stores may be synchronous, but are still required to use a
+// Continuation-Passing Style API. The CookieJar itself will expose a "*Sync"
+// API that converts from synchronous-callbacks to imperative style.
+Store.prototype.synchronous = false;
+
+Store.prototype.findCookie = function(domain, path, key, cb) {
+ throw new Error('findCookie is not implemented');
+};
+
+Store.prototype.findCookies = function(domain, path, cb) {
+ throw new Error('findCookies is not implemented');
+};
+
+Store.prototype.putCookie = function(cookie, cb) {
+ throw new Error('putCookie is not implemented');
+};
+
+Store.prototype.updateCookie = function(oldCookie, newCookie, cb) {
+ // recommended default implementation:
+ // return this.putCookie(newCookie, cb);
+ throw new Error('updateCookie is not implemented');
+};
+
+Store.prototype.removeCookie = function(domain, path, key, cb) {
+ throw new Error('removeCookie is not implemented');
+};
+
+Store.prototype.removeCookies = function(domain, path, cb) {
+ throw new Error('removeCookies is not implemented');
+};
+
+Store.prototype.removeAllCookies = function(cb) {
+ throw new Error('removeAllCookies is not implemented');
+}
+
+Store.prototype.getAllCookies = function(cb) {
+ throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)');
+};
diff --git a/node_modules/tough-cookie/lib/version.js b/node_modules/tough-cookie/lib/version.js
new file mode 100644
index 0000000..b34c6ae
--- /dev/null
+++ b/node_modules/tough-cookie/lib/version.js
@@ -0,0 +1,2 @@
+// generated by genversion
+module.exports = '2.5.0'
diff --git a/node_modules/tough-cookie/package.json b/node_modules/tough-cookie/package.json
new file mode 100644
index 0000000..8af9909
--- /dev/null
+++ b/node_modules/tough-cookie/package.json
@@ -0,0 +1,78 @@
+{
+ "author": {
+ "name": "Jeremy Stashewsky",
+ "email": "jstash@gmail.com",
+ "website": "https://github.com/stash"
+ },
+ "contributors": [
+ {
+ "name": "Alexander Savin",
+ "website": "https://github.com/apsavin"
+ },
+ {
+ "name": "Ian Livingstone",
+ "website": "https://github.com/ianlivingstone"
+ },
+ {
+ "name": "Ivan Nikulin",
+ "website": "https://github.com/inikulin"
+ },
+ {
+ "name": "Lalit Kapoor",
+ "website": "https://github.com/lalitkapoor"
+ },
+ {
+ "name": "Sam Thompson",
+ "website": "https://github.com/sambthompson"
+ },
+ {
+ "name": "Sebastian Mayr",
+ "website": "https://github.com/Sebmaster"
+ }
+ ],
+ "license": "BSD-3-Clause",
+ "name": "tough-cookie",
+ "description": "RFC6265 Cookies and Cookie Jar for node.js",
+ "keywords": [
+ "HTTP",
+ "cookie",
+ "cookies",
+ "set-cookie",
+ "cookiejar",
+ "jar",
+ "RFC6265",
+ "RFC2965"
+ ],
+ "version": "2.5.0",
+ "homepage": "https://github.com/salesforce/tough-cookie",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/salesforce/tough-cookie.git"
+ },
+ "bugs": {
+ "url": "https://github.com/salesforce/tough-cookie/issues"
+ },
+ "main": "./lib/cookie",
+ "files": [
+ "lib"
+ ],
+ "scripts": {
+ "version": "genversion lib/version.js && git add lib/version.js",
+ "test": "vows test/*_test.js",
+ "cover": "nyc --reporter=lcov --reporter=html vows test/*_test.js"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "devDependencies": {
+ "async": "^1.4.2",
+ "genversion": "^2.1.0",
+ "nyc": "^11.6.0",
+ "string.prototype.repeat": "^0.2.0",
+ "vows": "^0.8.2"
+ },
+ "dependencies": {
+ "psl": "^1.1.28",
+ "punycode": "^2.1.1"
+ }
+}
diff --git a/node_modules/trim-newlines/index.js b/node_modules/trim-newlines/index.js
new file mode 100644
index 0000000..da31efd
--- /dev/null
+++ b/node_modules/trim-newlines/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+var fn = module.exports = function (x) {
+ return fn.end(fn.start(x));
+};
+
+fn.start = function (x) {
+ return x.replace(/^[\r\n]+/, '');
+};
+
+fn.end = function (x) {
+ return x.replace(/[\r\n]+$/, '');
+};
diff --git a/node_modules/trim-newlines/license b/node_modules/trim-newlines/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/trim-newlines/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/trim-newlines/package.json b/node_modules/trim-newlines/package.json
new file mode 100644
index 0000000..c0bca90
--- /dev/null
+++ b/node_modules/trim-newlines/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "trim-newlines",
+ "version": "1.0.0",
+ "description": "Trim newlines from the start and/or end of a string",
+ "license": "MIT",
+ "repository": "sindresorhus/trim-newlines",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "trim",
+ "newline",
+ "newlines",
+ "linebreak",
+ "lf",
+ "crlf",
+ "left",
+ "right",
+ "start",
+ "end",
+ "string",
+ "str",
+ "remove",
+ "delete",
+ "strip"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/trim-newlines/readme.md b/node_modules/trim-newlines/readme.md
new file mode 100644
index 0000000..fedb3ca
--- /dev/null
+++ b/node_modules/trim-newlines/readme.md
@@ -0,0 +1,46 @@
+# trim-newlines [![Build Status](https://travis-ci.org/sindresorhus/trim-newlines.svg?branch=master)](https://travis-ci.org/sindresorhus/trim-newlines)
+
+> Trim [newlines](https://en.wikipedia.org/wiki/Newline) from the start and/or end of a string
+
+
+## Install
+
+```
+$ npm install --save trim-newlines
+```
+
+
+## Usage
+
+```js
+var trimNewlines = require('trim-newlines');
+
+trimNewlines('\nunicorn\r\n');
+//=> 'unicorn'
+```
+
+
+## API
+
+### trimNewlines(input)
+
+Trim from the start and end of a string.
+
+### trimNewlines.start(input)
+
+Trim from the start of a string.
+
+### trimNewlines.end(input)
+
+Trim from the end of a string.
+
+
+## Related
+
+- [trim-left](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left
+- [trim-right](https://github.com/sindresorhus/trim-right) - Similar to `String#trim()` but removes only whitespace on the right.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/trim-repeated/index.js b/node_modules/trim-repeated/index.js
new file mode 100644
index 0000000..cb67a69
--- /dev/null
+++ b/node_modules/trim-repeated/index.js
@@ -0,0 +1,10 @@
+'use strict';
+var escapeStringRegexp = require('escape-string-regexp');
+
+module.exports = function (str, target) {
+ if (typeof str !== 'string' || typeof target !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(new RegExp('(?:' + escapeStringRegexp(target) + '){2,}', 'g'), target);
+};
diff --git a/node_modules/trim-repeated/license b/node_modules/trim-repeated/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/trim-repeated/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/trim-repeated/node_modules/escape-string-regexp/index.js b/node_modules/trim-repeated/node_modules/escape-string-regexp/index.js
new file mode 100644
index 0000000..7834bf9
--- /dev/null
+++ b/node_modules/trim-repeated/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(matchOperatorsRe, '\\$&');
+};
diff --git a/node_modules/trim-repeated/node_modules/escape-string-regexp/license b/node_modules/trim-repeated/node_modules/escape-string-regexp/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/trim-repeated/node_modules/escape-string-regexp/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/trim-repeated/node_modules/escape-string-regexp/package.json b/node_modules/trim-repeated/node_modules/escape-string-regexp/package.json
new file mode 100644
index 0000000..f307df3
--- /dev/null
+++ b/node_modules/trim-repeated/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "escape-string-regexp",
+ "version": "1.0.5",
+ "description": "Escape RegExp special characters",
+ "license": "MIT",
+ "repository": "sindresorhus/escape-string-regexp",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "maintainers": [
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
+ "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
+ ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "escape",
+ "regex",
+ "regexp",
+ "re",
+ "regular",
+ "expression",
+ "string",
+ "str",
+ "special",
+ "characters"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/trim-repeated/node_modules/escape-string-regexp/readme.md b/node_modules/trim-repeated/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 0000000..87ac82d
--- /dev/null
+++ b/node_modules/trim-repeated/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,27 @@
+# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+
+## Install
+
+```
+$ npm install --save escape-string-regexp
+```
+
+
+## Usage
+
+```js
+const escapeStringRegexp = require('escape-string-regexp');
+
+const escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> 'how much \$ for a unicorn\?'
+
+new RegExp(escapedString);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/trim-repeated/package.json b/node_modules/trim-repeated/package.json
new file mode 100644
index 0000000..0526c06
--- /dev/null
+++ b/node_modules/trim-repeated/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "trim-repeated",
+ "version": "1.0.0",
+ "description": "Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz",
+ "license": "MIT",
+ "repository": "sindresorhus/trim-repeated",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "condense",
+ "collapse",
+ "compact",
+ "consecutive",
+ "repeated",
+ "string",
+ "str",
+ "trim",
+ "remove",
+ "strip",
+ "character",
+ "char"
+ ],
+ "dependencies": {
+ "escape-string-regexp": "^1.0.2"
+ },
+ "devDependencies": {
+ "ava": "0.0.4"
+ }
+}
diff --git a/node_modules/trim-repeated/readme.md b/node_modules/trim-repeated/readme.md
new file mode 100644
index 0000000..7f5a7a7
--- /dev/null
+++ b/node_modules/trim-repeated/readme.md
@@ -0,0 +1,47 @@
+# trim-repeated [![Build Status](https://travis-ci.org/sindresorhus/trim-repeated.svg?branch=master)](https://travis-ci.org/sindresorhus/trim-repeated)
+
+> Trim a consecutively repeated substring: `foo--bar---baz` → `foo-bar-baz`
+
+
+## Install
+
+```
+$ npm install --save trim-repeated
+```
+
+
+## Usage
+
+```js
+var trimRepeated = require('trim-repeated');
+
+trimRepeated('foo--bar---baz', '-');
+//=> 'foo-bar-baz'
+
+trimRepeated('foo@#@#baz', '@#');
+//=> 'foo@#baz'
+```
+
+### trimRepeated(input, target)
+
+#### input
+
+*Required*
+Type: `string`
+
+#### target
+
+*Required*
+Type: `string`
+
+Substring to trim.
+
+
+## Related
+
+- [`condense-whitespace`](https://github.com/sindresorhus/condense-whitespace) - Remove leading, trailing and repeated whitespace from a string
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/tunnel-agent/LICENSE b/node_modules/tunnel-agent/LICENSE
new file mode 100644
index 0000000..a4a9aee
--- /dev/null
+++ b/node_modules/tunnel-agent/LICENSE
@@ -0,0 +1,55 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/node_modules/tunnel-agent/README.md b/node_modules/tunnel-agent/README.md
new file mode 100644
index 0000000..bb533d5
--- /dev/null
+++ b/node_modules/tunnel-agent/README.md
@@ -0,0 +1,4 @@
+tunnel-agent
+============
+
+HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.
diff --git a/node_modules/tunnel-agent/index.js b/node_modules/tunnel-agent/index.js
new file mode 100644
index 0000000..3ee9abc
--- /dev/null
+++ b/node_modules/tunnel-agent/index.js
@@ -0,0 +1,244 @@
+'use strict'
+
+var net = require('net')
+ , tls = require('tls')
+ , http = require('http')
+ , https = require('https')
+ , events = require('events')
+ , assert = require('assert')
+ , util = require('util')
+ , Buffer = require('safe-buffer').Buffer
+ ;
+
+exports.httpOverHttp = httpOverHttp
+exports.httpsOverHttp = httpsOverHttp
+exports.httpOverHttps = httpOverHttps
+exports.httpsOverHttps = httpsOverHttps
+
+
+function httpOverHttp(options) {
+ var agent = new TunnelingAgent(options)
+ agent.request = http.request
+ return agent
+}
+
+function httpsOverHttp(options) {
+ var agent = new TunnelingAgent(options)
+ agent.request = http.request
+ agent.createSocket = createSecureSocket
+ agent.defaultPort = 443
+ return agent
+}
+
+function httpOverHttps(options) {
+ var agent = new TunnelingAgent(options)
+ agent.request = https.request
+ return agent
+}
+
+function httpsOverHttps(options) {
+ var agent = new TunnelingAgent(options)
+ agent.request = https.request
+ agent.createSocket = createSecureSocket
+ agent.defaultPort = 443
+ return agent
+}
+
+
+function TunnelingAgent(options) {
+ var self = this
+ self.options = options || {}
+ self.proxyOptions = self.options.proxy || {}
+ self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets
+ self.requests = []
+ self.sockets = []
+
+ self.on('free', function onFree(socket, host, port) {
+ for (var i = 0, len = self.requests.length; i < len; ++i) {
+ var pending = self.requests[i]
+ if (pending.host === host && pending.port === port) {
+ // Detect the request to connect same origin server,
+ // reuse the connection.
+ self.requests.splice(i, 1)
+ pending.request.onSocket(socket)
+ return
+ }
+ }
+ socket.destroy()
+ self.removeSocket(socket)
+ })
+}
+util.inherits(TunnelingAgent, events.EventEmitter)
+
+TunnelingAgent.prototype.addRequest = function addRequest(req, options) {
+ var self = this
+
+ // Legacy API: addRequest(req, host, port, path)
+ if (typeof options === 'string') {
+ options = {
+ host: options,
+ port: arguments[2],
+ path: arguments[3]
+ };
+ }
+
+ if (self.sockets.length >= this.maxSockets) {
+ // We are over limit so we'll add it to the queue.
+ self.requests.push({host: options.host, port: options.port, request: req})
+ return
+ }
+
+ // If we are under maxSockets create a new one.
+ self.createConnection({host: options.host, port: options.port, request: req})
+}
+
+TunnelingAgent.prototype.createConnection = function createConnection(pending) {
+ var self = this
+
+ self.createSocket(pending, function(socket) {
+ socket.on('free', onFree)
+ socket.on('close', onCloseOrRemove)
+ socket.on('agentRemove', onCloseOrRemove)
+ pending.request.onSocket(socket)
+
+ function onFree() {
+ self.emit('free', socket, pending.host, pending.port)
+ }
+
+ function onCloseOrRemove(err) {
+ self.removeSocket(socket)
+ socket.removeListener('free', onFree)
+ socket.removeListener('close', onCloseOrRemove)
+ socket.removeListener('agentRemove', onCloseOrRemove)
+ }
+ })
+}
+
+TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
+ var self = this
+ var placeholder = {}
+ self.sockets.push(placeholder)
+
+ var connectOptions = mergeOptions({}, self.proxyOptions,
+ { method: 'CONNECT'
+ , path: options.host + ':' + options.port
+ , agent: false
+ }
+ )
+ if (connectOptions.proxyAuth) {
+ connectOptions.headers = connectOptions.headers || {}
+ connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
+ Buffer.from(connectOptions.proxyAuth).toString('base64')
+ }
+
+ debug('making CONNECT request')
+ var connectReq = self.request(connectOptions)
+ connectReq.useChunkedEncodingByDefault = false // for v0.6
+ connectReq.once('response', onResponse) // for v0.6
+ connectReq.once('upgrade', onUpgrade) // for v0.6
+ connectReq.once('connect', onConnect) // for v0.7 or later
+ connectReq.once('error', onError)
+ connectReq.end()
+
+ function onResponse(res) {
+ // Very hacky. This is necessary to avoid http-parser leaks.
+ res.upgrade = true
+ }
+
+ function onUpgrade(res, socket, head) {
+ // Hacky.
+ process.nextTick(function() {
+ onConnect(res, socket, head)
+ })
+ }
+
+ function onConnect(res, socket, head) {
+ connectReq.removeAllListeners()
+ socket.removeAllListeners()
+
+ if (res.statusCode === 200) {
+ assert.equal(head.length, 0)
+ debug('tunneling connection has established')
+ self.sockets[self.sockets.indexOf(placeholder)] = socket
+ cb(socket)
+ } else {
+ debug('tunneling socket could not be established, statusCode=%d', res.statusCode)
+ var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode)
+ error.code = 'ECONNRESET'
+ options.request.emit('error', error)
+ self.removeSocket(placeholder)
+ }
+ }
+
+ function onError(cause) {
+ connectReq.removeAllListeners()
+
+ debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack)
+ var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message)
+ error.code = 'ECONNRESET'
+ options.request.emit('error', error)
+ self.removeSocket(placeholder)
+ }
+}
+
+TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
+ var pos = this.sockets.indexOf(socket)
+ if (pos === -1) return
+
+ this.sockets.splice(pos, 1)
+
+ var pending = this.requests.shift()
+ if (pending) {
+ // If we have pending requests and a socket gets closed a new one
+ // needs to be created to take over in the pool for the one that closed.
+ this.createConnection(pending)
+ }
+}
+
+function createSecureSocket(options, cb) {
+ var self = this
+ TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
+ // 0 is dummy port for v0.6
+ var secureSocket = tls.connect(0, mergeOptions({}, self.options,
+ { servername: options.host
+ , socket: socket
+ }
+ ))
+ self.sockets[self.sockets.indexOf(socket)] = secureSocket
+ cb(secureSocket)
+ })
+}
+
+
+function mergeOptions(target) {
+ for (var i = 1, len = arguments.length; i < len; ++i) {
+ var overrides = arguments[i]
+ if (typeof overrides === 'object') {
+ var keys = Object.keys(overrides)
+ for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
+ var k = keys[j]
+ if (overrides[k] !== undefined) {
+ target[k] = overrides[k]
+ }
+ }
+ }
+ }
+ return target
+}
+
+
+var debug
+if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
+ debug = function() {
+ var args = Array.prototype.slice.call(arguments)
+ if (typeof args[0] === 'string') {
+ args[0] = 'TUNNEL: ' + args[0]
+ } else {
+ args.unshift('TUNNEL:')
+ }
+ console.error.apply(console, args)
+ }
+} else {
+ debug = function() {}
+}
+exports.debug = debug // for test
diff --git a/node_modules/tunnel-agent/package.json b/node_modules/tunnel-agent/package.json
new file mode 100644
index 0000000..a271fda
--- /dev/null
+++ b/node_modules/tunnel-agent/package.json
@@ -0,0 +1,22 @@
+{
+ "author": "Mikeal Rogers <mikeal.rogers@gmail.com> (http://www.futurealoof.com)",
+ "name": "tunnel-agent",
+ "license": "Apache-2.0",
+ "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.",
+ "version": "0.6.0",
+ "repository": {
+ "url": "https://github.com/mikeal/tunnel-agent"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js"
+ ],
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ }
+}
diff --git a/node_modules/tunnel/.idea/encodings.xml b/node_modules/tunnel/.idea/encodings.xml
new file mode 100644
index 0000000..97626ba
--- /dev/null
+++ b/node_modules/tunnel/.idea/encodings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding">
+ <file url="PROJECT" charset="UTF-8" />
+ </component>
+</project> \ No newline at end of file
diff --git a/node_modules/tunnel/.idea/modules.xml b/node_modules/tunnel/.idea/modules.xml
new file mode 100644
index 0000000..27bf888
--- /dev/null
+++ b/node_modules/tunnel/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/node-tunnel.iml" filepath="$PROJECT_DIR$/.idea/node-tunnel.iml" />
+ </modules>
+ </component>
+</project> \ No newline at end of file
diff --git a/node_modules/tunnel/.idea/node-tunnel.iml b/node_modules/tunnel/.idea/node-tunnel.iml
new file mode 100644
index 0000000..24643cc
--- /dev/null
+++ b/node_modules/tunnel/.idea/node-tunnel.iml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$">
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module> \ No newline at end of file
diff --git a/node_modules/tunnel/.idea/vcs.xml b/node_modules/tunnel/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/node_modules/tunnel/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project> \ No newline at end of file
diff --git a/node_modules/tunnel/.idea/workspace.xml b/node_modules/tunnel/.idea/workspace.xml
new file mode 100644
index 0000000..1a318c8
--- /dev/null
+++ b/node_modules/tunnel/.idea/workspace.xml
@@ -0,0 +1,797 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ChangeListManager">
+ <list default="true" id="3caed8aa-31ae-4b3d-ad18-6f9796663516" name="Default" comment="">
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.travis.yml" afterPath="$PROJECT_DIR$/.travis.yml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGELOG.md" afterPath="$PROJECT_DIR$/CHANGELOG.md" />
+ </list>
+ <ignored path="$PROJECT_DIR$/.tmp/" />
+ <ignored path="$PROJECT_DIR$/temp/" />
+ <ignored path="$PROJECT_DIR$/tmp/" />
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+ <option name="TRACKING_ENABLED" value="true" />
+ <option name="SHOW_DIALOG" value="false" />
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+ <option name="LAST_RESOLUTION" value="IGNORE" />
+ </component>
+ <component name="FileEditorManager">
+ <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+ <file leaf-file-name="package.json" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/package.json">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="34">
+ <caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/README.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="2312">
+ <caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
+ <folding>
+ <marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
+ <marker date="1497272379133" expanded="true" signature="601:644" ph="{&quot;host&quot;: 'localhost'...}" />
+ <marker date="1497272379133" expanded="true" signature="674:737" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="884:1330" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="964:1328" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1290:1324" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="1357:1419" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="1514:2209" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1842:2207" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2168:2202" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="2237:2300" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="2395:3180" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="2475:3178" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2802:2836" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="3207:3269" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="3366:4398" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="3694:4396" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="4021:4055" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="4426:4489" ph="{&quot;host&quot;: 'example.com'...}" />
+ </folding>
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name=".travis.yml" pinned="false" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/.travis.yml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="102">
+ <caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="tunnel.js" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/lib/tunnel.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="697">
+ <caret line="41" column="19" lean-forward="false" selection-start-line="41" selection-start-column="19" selection-end-line="41" selection-end-column="19" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="http-over-http-error.js" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="935">
+ <caret line="55" column="26" lean-forward="true" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="http-over-http-error2.js" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/http-over-http-error2.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1207">
+ <caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="https-over-http.js" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/https-over-http.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1479">
+ <caret line="87" column="0" lean-forward="false" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="https-over-https.js" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/https-over-https.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="http-over-http.js" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/http-over-http.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1088">
+ <caret line="64" column="26" lean-forward="true" selection-start-line="64" selection-start-column="26" selection-end-line="64" selection-end-column="26" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/CHANGELOG.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="102">
+ <caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
+ <folding />
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FileTemplateManagerImpl">
+ <option name="RECENT_TEMPLATES">
+ <list>
+ <option value="JavaScript File" />
+ </list>
+ </option>
+ </component>
+ <component name="FindInProjectRecents">
+ <findStrings>
+ <find>max</find>
+ <find>onconne</find>
+ </findStrings>
+ </component>
+ <component name="Git.Settings">
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+ </component>
+ <component name="IdeDocumentHistory">
+ <option name="CHANGED_PATHS">
+ <list>
+ <option value="$PROJECT_DIR$/test/http-over-http-error.js" />
+ <option value="$PROJECT_DIR$/README.md" />
+ <option value="$PROJECT_DIR$/package.json" />
+ <option value="$PROJECT_DIR$/test/http-over-http-error2.js" />
+ <option value="$PROJECT_DIR$/test/https-over-http-localaddress.js" />
+ <option value="$PROJECT_DIR$/test/https-over-http.js" />
+ <option value="$PROJECT_DIR$/lib/tunnel.js" />
+ <option value="$PROJECT_DIR$/CHANGELOG.md" />
+ <option value="$PROJECT_DIR$/.travis.yml" />
+ </list>
+ </option>
+ </component>
+ <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
+ <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER">
+ <package-json value="$PROJECT_DIR$/package.json" />
+ </component>
+ <component name="JsFlowSettings">
+ <service-enabled>false</service-enabled>
+ <exe-path />
+ <annotation-enable>false</annotation-enable>
+ <other-services-enabled>false</other-services-enabled>
+ <auto-save>true</auto-save>
+ </component>
+ <component name="JsGulpfileManager">
+ <detection-done>true</detection-done>
+ <sorting>DEFINITION_ORDER</sorting>
+ </component>
+ <component name="NodeModulesDirectoryManager">
+ <handled-path value="$PROJECT_DIR$/node_modules" />
+ </component>
+ <component name="ProjectFrameBounds">
+ <option name="x" value="785" />
+ <option name="y" value="40" />
+ <option name="width" value="1788" />
+ <option name="height" value="1407" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="" version="1">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <autoscrollToSource />
+ <autoscrollFromSource ProjectPane="true" />
+ <sortByType />
+ <manualOrder />
+ <foldersAlwaysOnTop value="true" />
+ </navigator>
+ <panes>
+ <pane id="Scope" />
+ <pane id="Scratches" />
+ <pane id="ProjectPane">
+ <subPane>
+ <expand>
+ <path>
+ <item name="node-tunnel" type="b2602c69:ProjectViewProjectNode" />
+ <item name="node-tunnel" type="462c0819:PsiDirectoryNode" />
+ </path>
+ <path>
+ <item name="node-tunnel" type="b2602c69:ProjectViewProjectNode" />
+ <item name="node-tunnel" type="462c0819:PsiDirectoryNode" />
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
+ </path>
+ <path>
+ <item name="node-tunnel" type="b2602c69:ProjectViewProjectNode" />
+ <item name="node-tunnel" type="462c0819:PsiDirectoryNode" />
+ <item name="test" type="462c0819:PsiDirectoryNode" />
+ </path>
+ </expand>
+ <select />
+ </subPane>
+ </pane>
+ </panes>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="WebServerToolWindowFactoryState" value="false" />
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+ <property name="HbShouldOpenHtmlAsHb" value="" />
+ <property name="nodejs_interpreter_path" value="$PROJECT_DIR$/../../nvmw/v6.10.3/node" />
+ </component>
+ <component name="RecentsManager">
+ <key name="CopyFile.RECENT_KEYS">
+ <recent name="C:\Users\koichik\git\koichik\node-tunnel\test" />
+ </key>
+ </component>
+ <component name="RunDashboard">
+ <option name="ruleStates">
+ <list>
+ <RuleState>
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+ </RuleState>
+ <RuleState>
+ <option name="name" value="StatusDashboardGroupingRule" />
+ </RuleState>
+ </list>
+ </option>
+ </component>
+ <component name="RunManager">
+ <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
+ <node-interpreter>project</node-interpreter>
+ <node-options />
+ <gulpfile />
+ <tasks />
+ <arguments />
+ <envs />
+ </configuration>
+ <configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application">
+ <method />
+ </configuration>
+ <configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test">
+ <method />
+ </configuration>
+ <configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
+ <node-interpreter value="project" />
+ <working-dir value="" />
+ <envs />
+ <scope-kind value="ALL" />
+ <method />
+ </configuration>
+ <configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma">
+ <config-file value="" />
+ <node-interpreter value="project" />
+ <envs />
+ <method />
+ </configuration>
+ <configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
+ <config-file value="" />
+ <node-interpreter value="project" />
+ <envs />
+ <method />
+ </configuration>
+ <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
+ <method />
+ </configuration>
+ <configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
+ <method />
+ </configuration>
+ <configuration default="true" type="cucumber.js" factoryName="Cucumber.js">
+ <option name="cucumberJsArguments" value="" />
+ <option name="executablePath" />
+ <option name="filePath" />
+ <method />
+ </configuration>
+ <configuration default="true" type="js.build_tools.npm" factoryName="npm">
+ <command value="run" />
+ <scripts />
+ <node-interpreter value="project" />
+ <envs />
+ <method />
+ </configuration>
+ <configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
+ <node-interpreter>project</node-interpreter>
+ <node-options />
+ <working-directory />
+ <pass-parent-env>true</pass-parent-env>
+ <envs />
+ <ui />
+ <extra-mocha-options />
+ <test-kind>DIRECTORY</test-kind>
+ <test-directory />
+ <recursive>false</recursive>
+ <method />
+ </configuration>
+ </component>
+ <component name="ShelveChangesManager" show_recycled="false">
+ <option name="remove_strategy" value="false" />
+ </component>
+ <component name="SvnConfiguration">
+ <configuration />
+ </component>
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <changelist id="3caed8aa-31ae-4b3d-ad18-6f9796663516" name="Default" comment="" />
+ <created>1497256565348</created>
+ <option name="number" value="Default" />
+ <option name="presentableId" value="Default" />
+ <updated>1497256565348</updated>
+ <workItem from="1497256566573" duration="8794000" />
+ <workItem from="1497272051717" duration="2328000" />
+ <workItem from="1536577850117" duration="8708000" />
+ <workItem from="1536636907096" duration="739000" />
+ </task>
+ <servers />
+ </component>
+ <component name="TimeTrackingManager">
+ <option name="totallyTimeSpent" value="20569000" />
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="785" y="40" width="1788" height="1407" extended-state="0" />
+ <editor active="true" />
+ <layout>
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+ <window_info id="SvgViewer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32967034" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ </layout>
+ </component>
+ <component name="TypeScriptGeneratedFilesManager">
+ <option name="version" value="1" />
+ </component>
+ <component name="VcsContentAnnotationSettings">
+ <option name="myLimit" value="2678400000" />
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager />
+ <watches-manager />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/package.json">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="34">
+ <caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/README.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="2312">
+ <caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
+ <folding>
+ <marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
+ <marker date="1497272379133" expanded="true" signature="601:644" ph="{&quot;host&quot;: 'localhost'...}" />
+ <marker date="1497272379133" expanded="true" signature="674:737" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="884:1330" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="964:1328" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1290:1324" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="1357:1419" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="1514:2209" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1842:2207" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2168:2202" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="2237:2300" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="2395:3180" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="2475:3178" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2802:2836" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="3207:3269" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="3366:4398" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="3694:4396" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="4021:4055" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="4426:4489" ph="{&quot;host&quot;: 'example.com'...}" />
+ </folding>
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/.travis.yml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="102">
+ <caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="935">
+ <caret line="55" column="26" lean-forward="true" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http-error2.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1207">
+ <caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/https-over-http.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1479">
+ <caret line="87" column="0" lean-forward="false" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/https-over-https.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1088">
+ <caret line="64" column="26" lean-forward="true" selection-start-line="64" selection-start-column="26" selection-end-line="64" selection-end-column="26" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/tunnel.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="697">
+ <caret line="41" column="19" lean-forward="false" selection-start-line="41" selection-start-column="19" selection-end-line="41" selection-end-column="19" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/package.json">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="34">
+ <caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/README.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="2312">
+ <caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
+ <folding>
+ <marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
+ <marker date="1497272379133" expanded="true" signature="601:644" ph="{&quot;host&quot;: 'localhost'...}" />
+ <marker date="1497272379133" expanded="true" signature="674:737" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="884:1330" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="964:1328" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1290:1324" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="1357:1419" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="1514:2209" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1842:2207" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2168:2202" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="2237:2300" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="2395:3180" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="2475:3178" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2802:2836" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="3207:3269" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="3366:4398" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="3694:4396" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="4021:4055" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="4426:4489" ph="{&quot;host&quot;: 'example.com'...}" />
+ </folding>
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/tunnel.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="2550">
+ <caret line="150" column="0" lean-forward="false" selection-start-line="150" selection-start-column="0" selection-end-line="150" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/CHANGELOG.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="51">
+ <caret line="3" column="21" lean-forward="false" selection-start-line="3" selection-start-column="21" selection-end-line="3" selection-end-column="21" />
+ <folding />
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/.travis.yml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="119">
+ <caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/package.json">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/README.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ <folding>
+ <marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
+ <marker date="1497272379133" expanded="true" signature="601:644" ph="{&quot;host&quot;: 'localhost'...}" />
+ <marker date="1497272379133" expanded="true" signature="674:737" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="884:1330" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="964:1328" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1290:1324" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="1357:1419" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="1514:2209" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1842:2207" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2168:2202" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="2237:2300" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="2395:3180" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="2475:3178" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2802:2836" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="3207:3269" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="3366:4398" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="3694:4396" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="4021:4055" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="4426:4489" ph="{&quot;host&quot;: 'example.com'...}" />
+ </folding>
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/.travis.yml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/tunnel.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="2550">
+ <caret line="150" column="0" lean-forward="false" selection-start-line="150" selection-start-column="0" selection-end-line="150" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/https-over-https.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/https-over-https-error.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="136">
+ <caret line="8" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1309">
+ <caret line="77" column="0" lean-forward="false" selection-start-line="77" selection-start-column="0" selection-end-line="77" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-https.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-https.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/https-over-https-error.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/README.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="2312">
+ <caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
+ <folding>
+ <marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
+ <marker date="1497272379133" expanded="true" signature="601:644" ph="{&quot;host&quot;: 'localhost'...}" />
+ <marker date="1497272379133" expanded="true" signature="674:737" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="884:1330" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="964:1328" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1290:1324" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="1357:1419" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="1514:2209" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="1842:2207" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2168:2202" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="2237:2300" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="2395:3180" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="2475:3178" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="2802:2836" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="3207:3269" ph="{&quot;host&quot;: 'example.com'...}" />
+ <marker date="1497272379133" expanded="true" signature="3366:4398" ph="{&quot;maxSockets&quot;: poolSize...}" />
+ <marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="3694:4396" ph="{&quot;host&quot;: proxyHost...}" />
+ <marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
+ <marker date="1497272379133" expanded="true" signature="4021:4055" ph="{&quot;User-Agent&quot;: 'Node'...}" />
+ <marker date="1497272379133" expanded="true" signature="4426:4489" ph="{&quot;host&quot;: 'example.com'...}" />
+ </folding>
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/package.json">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="34">
+ <caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="935">
+ <caret line="55" column="26" lean-forward="true" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http-error2.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1207">
+ <caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/https-over-http-localaddress.js" />
+ <entry file="file://$PROJECT_DIR$/test/https-over-https.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="0">
+ <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/http-over-http.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1088">
+ <caret line="64" column="26" lean-forward="true" selection-start-line="64" selection-start-column="26" selection-end-line="64" selection-end-column="26" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/https-over-http.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="1479">
+ <caret line="87" column="0" lean-forward="false" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/tunnel.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="697">
+ <caret line="41" column="19" lean-forward="false" selection-start-line="41" selection-start-column="19" selection-end-line="41" selection-end-column="19" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/CHANGELOG.md">
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
+ <state split_layout="SPLIT">
+ <first_editor relative-caret-position="102">
+ <caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
+ <folding />
+ </first_editor>
+ <second_editor />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/.travis.yml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="102">
+ <caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project> \ No newline at end of file
diff --git a/node_modules/tunnel/.travis.yml b/node_modules/tunnel/.travis.yml
new file mode 100644
index 0000000..cb6e182
--- /dev/null
+++ b/node_modules/tunnel/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "4"
+ - "6"
+ - "8"
+ - "10"
diff --git a/node_modules/tunnel/CHANGELOG.md b/node_modules/tunnel/CHANGELOG.md
new file mode 100644
index 0000000..baf6b18
--- /dev/null
+++ b/node_modules/tunnel/CHANGELOG.md
@@ -0,0 +1,22 @@
+# Changelog
+
+ - 0.0.6 (2018/09/11)
+ - Fix `localAddress` not working (#25)
+ - Fix `Host:` header for CONNECT method by @tmurakam (#29, #30)
+ - Fix default port for https (#32)
+ - Fix error handling when the proxy send illegal response body (#33)
+
+ - 0.0.5 (2017/06/12)
+ - Fix socket leak.
+
+ - 0.0.4 (2016/01/23)
+ - supported Node v0.12 or later.
+
+ - 0.0.3 (2014/01/20)
+ - fixed package.json
+
+ - 0.0.1 (2012/02/18)
+ - supported Node v0.6.x (0.6.11 or later).
+
+ - 0.0.0 (2012/02/11)
+ - first release.
diff --git a/node_modules/tunnel/LICENSE b/node_modules/tunnel/LICENSE
new file mode 100644
index 0000000..8b8a895
--- /dev/null
+++ b/node_modules/tunnel/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2012 Koichi Kobayashi
+
+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/tunnel/README.md b/node_modules/tunnel/README.md
new file mode 100644
index 0000000..f54bca5
--- /dev/null
+++ b/node_modules/tunnel/README.md
@@ -0,0 +1,185 @@
+# node-tunnel - HTTP/HTTPS Agents for tunneling proxies
+
+[![Build Status](https://img.shields.io/travis/koichik/node-tunnel.svg?style=flat)](https://travis-ci.org/koichik/node-tunnel)
+[![Dependency Status](http://img.shields.io/david/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=dependencies)
+[![DevDependency Status](http://img.shields.io/david/dev/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=devDependencies)
+
+## Example
+
+```javascript
+var tunnel = require('tunnel');
+
+var tunnelingAgent = tunnel.httpsOverHttp({
+ proxy: {
+ host: 'localhost',
+ port: 3128
+ }
+});
+
+var req = https.request({
+ host: 'example.com',
+ port: 443,
+ agent: tunnelingAgent
+});
+```
+
+## Installation
+
+ $ npm install tunnel
+
+## Usages
+
+### HTTP over HTTP tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpOverHttp({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 80
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ }
+ }
+});
+
+var req = http.request({
+ host: 'example.com',
+ port: 80,
+ agent: tunnelingAgent
+});
+```
+
+### HTTPS over HTTP tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpsOverHttp({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ // CA for origin server if necessary
+ ca: [ fs.readFileSync('origin-server-ca.pem')],
+
+ // Client certification for origin server if necessary
+ key: fs.readFileSync('origin-server-key.pem'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 80
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ },
+ }
+});
+
+var req = https.request({
+ host: 'example.com',
+ port: 443,
+ agent: tunnelingAgent
+});
+```
+
+### HTTP over HTTPS tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpOverHttps({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 443
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ },
+
+ // CA for proxy server if necessary
+ ca: [ fs.readFileSync('origin-server-ca.pem')],
+
+ // Server name for verification if necessary
+ servername: 'example.com',
+
+ // Client certification for proxy server if necessary
+ key: fs.readFileSync('origin-server-key.pem'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+ }
+});
+
+var req = http.request({
+ host: 'example.com',
+ port: 80,
+ agent: tunnelingAgent
+});
+```
+
+### HTTPS over HTTPS tunneling
+
+```javascript
+var tunnelingAgent = tunnel.httpsOverHttps({
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
+
+ // CA for origin server if necessary
+ ca: [ fs.readFileSync('origin-server-ca.pem')],
+
+ // Client certification for origin server if necessary
+ key: fs.readFileSync('origin-server-key.pem'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+
+ proxy: { // Proxy settings
+ host: proxyHost, // Defaults to 'localhost'
+ port: proxyPort, // Defaults to 443
+ localAddress: localAddress, // Local interface if necessary
+
+ // Basic authorization for proxy server if necessary
+ proxyAuth: 'user:password',
+
+ // Header fields for proxy server if necessary
+ headers: {
+ 'User-Agent': 'Node'
+ }
+
+ // CA for proxy server if necessary
+ ca: [ fs.readFileSync('origin-server-ca.pem')],
+
+ // Server name for verification if necessary
+ servername: 'example.com',
+
+ // Client certification for proxy server if necessary
+ key: fs.readFileSync('origin-server-key.pem'),
+ cert: fs.readFileSync('origin-server-cert.pem'),
+ }
+});
+
+var req = https.request({
+ host: 'example.com',
+ port: 443,
+ agent: tunnelingAgent
+});
+```
+
+## CONTRIBUTORS
+* [Aleksis Brezas (abresas)](https://github.com/abresas)
+* [Jackson Tian (JacksonTian)](https://github.com/JacksonTian)
+* [Dmitry Sorin (1999)](https://github.com/1999)
+
+## License
+
+Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license.
diff --git a/node_modules/tunnel/index.js b/node_modules/tunnel/index.js
new file mode 100644
index 0000000..2947757
--- /dev/null
+++ b/node_modules/tunnel/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/tunnel');
diff --git a/node_modules/tunnel/lib/tunnel.js b/node_modules/tunnel/lib/tunnel.js
new file mode 100644
index 0000000..10cc382
--- /dev/null
+++ b/node_modules/tunnel/lib/tunnel.js
@@ -0,0 +1,264 @@
+'use strict';
+
+var net = require('net');
+var tls = require('tls');
+var http = require('http');
+var https = require('https');
+var events = require('events');
+var assert = require('assert');
+var util = require('util');
+
+
+exports.httpOverHttp = httpOverHttp;
+exports.httpsOverHttp = httpsOverHttp;
+exports.httpOverHttps = httpOverHttps;
+exports.httpsOverHttps = httpsOverHttps;
+
+
+function httpOverHttp(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = http.request;
+ return agent;
+}
+
+function httpsOverHttp(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = http.request;
+ agent.createSocket = createSecureSocket;
+ agent.defaultPort = 443;
+ return agent;
+}
+
+function httpOverHttps(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = https.request;
+ return agent;
+}
+
+function httpsOverHttps(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = https.request;
+ agent.createSocket = createSecureSocket;
+ agent.defaultPort = 443;
+ return agent;
+}
+
+
+function TunnelingAgent(options) {
+ var self = this;
+ self.options = options || {};
+ self.proxyOptions = self.options.proxy || {};
+ self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;
+ self.requests = [];
+ self.sockets = [];
+
+ self.on('free', function onFree(socket, host, port, localAddress) {
+ var options = toOptions(host, port, localAddress);
+ for (var i = 0, len = self.requests.length; i < len; ++i) {
+ var pending = self.requests[i];
+ if (pending.host === options.host && pending.port === options.port) {
+ // Detect the request to connect same origin server,
+ // reuse the connection.
+ self.requests.splice(i, 1);
+ pending.request.onSocket(socket);
+ return;
+ }
+ }
+ socket.destroy();
+ self.removeSocket(socket);
+ });
+}
+util.inherits(TunnelingAgent, events.EventEmitter);
+
+TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
+ var self = this;
+ var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));
+
+ if (self.sockets.length >= this.maxSockets) {
+ // We are over limit so we'll add it to the queue.
+ self.requests.push(options);
+ return;
+ }
+
+ // If we are under maxSockets create a new one.
+ self.createSocket(options, function(socket) {
+ socket.on('free', onFree);
+ socket.on('close', onCloseOrRemove);
+ socket.on('agentRemove', onCloseOrRemove);
+ req.onSocket(socket);
+
+ function onFree() {
+ self.emit('free', socket, options);
+ }
+
+ function onCloseOrRemove(err) {
+ self.removeSocket(socket);
+ socket.removeListener('free', onFree);
+ socket.removeListener('close', onCloseOrRemove);
+ socket.removeListener('agentRemove', onCloseOrRemove);
+ }
+ });
+};
+
+TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
+ var self = this;
+ var placeholder = {};
+ self.sockets.push(placeholder);
+
+ var connectOptions = mergeOptions({}, self.proxyOptions, {
+ method: 'CONNECT',
+ path: options.host + ':' + options.port,
+ agent: false,
+ headers: {
+ host: options.host + ':' + options.port
+ }
+ });
+ if (options.localAddress) {
+ connectOptions.localAddress = options.localAddress;
+ }
+ if (connectOptions.proxyAuth) {
+ connectOptions.headers = connectOptions.headers || {};
+ connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
+ new Buffer(connectOptions.proxyAuth).toString('base64');
+ }
+
+ debug('making CONNECT request');
+ var connectReq = self.request(connectOptions);
+ connectReq.useChunkedEncodingByDefault = false; // for v0.6
+ connectReq.once('response', onResponse); // for v0.6
+ connectReq.once('upgrade', onUpgrade); // for v0.6
+ connectReq.once('connect', onConnect); // for v0.7 or later
+ connectReq.once('error', onError);
+ connectReq.end();
+
+ function onResponse(res) {
+ // Very hacky. This is necessary to avoid http-parser leaks.
+ res.upgrade = true;
+ }
+
+ function onUpgrade(res, socket, head) {
+ // Hacky.
+ process.nextTick(function() {
+ onConnect(res, socket, head);
+ });
+ }
+
+ function onConnect(res, socket, head) {
+ connectReq.removeAllListeners();
+ socket.removeAllListeners();
+
+ if (res.statusCode !== 200) {
+ debug('tunneling socket could not be established, statusCode=%d',
+ res.statusCode);
+ socket.destroy();
+ var error = new Error('tunneling socket could not be established, ' +
+ 'statusCode=' + res.statusCode);
+ error.code = 'ECONNRESET';
+ options.request.emit('error', error);
+ self.removeSocket(placeholder);
+ return;
+ }
+ if (head.length > 0) {
+ debug('got illegal response body from proxy');
+ socket.destroy();
+ var error = new Error('got illegal response body from proxy');
+ error.code = 'ECONNRESET';
+ options.request.emit('error', error);
+ self.removeSocket(placeholder);
+ return;
+ }
+ debug('tunneling connection has established');
+ self.sockets[self.sockets.indexOf(placeholder)] = socket;
+ return cb(socket);
+ }
+
+ function onError(cause) {
+ connectReq.removeAllListeners();
+
+ debug('tunneling socket could not be established, cause=%s\n',
+ cause.message, cause.stack);
+ var error = new Error('tunneling socket could not be established, ' +
+ 'cause=' + cause.message);
+ error.code = 'ECONNRESET';
+ options.request.emit('error', error);
+ self.removeSocket(placeholder);
+ }
+};
+
+TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
+ var pos = this.sockets.indexOf(socket)
+ if (pos === -1) {
+ return;
+ }
+ this.sockets.splice(pos, 1);
+
+ var pending = this.requests.shift();
+ if (pending) {
+ // If we have pending requests and a socket gets closed a new one
+ // needs to be created to take over in the pool for the one that closed.
+ this.createSocket(pending, function(socket) {
+ pending.request.onSocket(socket);
+ });
+ }
+};
+
+function createSecureSocket(options, cb) {
+ var self = this;
+ TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
+ var hostHeader = options.request.getHeader('host');
+ var tlsOptions = mergeOptions({}, self.options, {
+ socket: socket,
+ servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host
+ });
+
+ // 0 is dummy port for v0.6
+ var secureSocket = tls.connect(0, tlsOptions);
+ self.sockets[self.sockets.indexOf(socket)] = secureSocket;
+ cb(secureSocket);
+ });
+}
+
+
+function toOptions(host, port, localAddress) {
+ if (typeof host === 'string') { // since v0.10
+ return {
+ host: host,
+ port: port,
+ localAddress: localAddress
+ };
+ }
+ return host; // for v0.11 or later
+}
+
+function mergeOptions(target) {
+ for (var i = 1, len = arguments.length; i < len; ++i) {
+ var overrides = arguments[i];
+ if (typeof overrides === 'object') {
+ var keys = Object.keys(overrides);
+ for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
+ var k = keys[j];
+ if (overrides[k] !== undefined) {
+ target[k] = overrides[k];
+ }
+ }
+ }
+ }
+ return target;
+}
+
+
+var debug;
+if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
+ debug = function() {
+ var args = Array.prototype.slice.call(arguments);
+ if (typeof args[0] === 'string') {
+ args[0] = 'TUNNEL: ' + args[0];
+ } else {
+ args.unshift('TUNNEL:');
+ }
+ console.error.apply(console, args);
+ }
+} else {
+ debug = function() {};
+}
+exports.debug = debug; // for test
diff --git a/node_modules/tunnel/package.json b/node_modules/tunnel/package.json
new file mode 100644
index 0000000..bcd7b95
--- /dev/null
+++ b/node_modules/tunnel/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "tunnel",
+ "version": "0.0.6",
+ "description": "Node HTTP/HTTPS Agents for tunneling proxies",
+ "keywords": [
+ "http",
+ "https",
+ "agent",
+ "proxy",
+ "tunnel"
+ ],
+ "homepage": "https://github.com/koichik/node-tunnel/",
+ "bugs": "https://github.com/koichik/node-tunnel/issues",
+ "license": "MIT",
+ "author": "Koichi Kobayashi <koichik@improvement.jp>",
+ "main": "./index.js",
+ "directories": {
+ "lib": "./lib"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/koichik/node-tunnel.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "devDependencies": {
+ "mocha": "^5.2.0",
+ "should": "^13.2.3"
+ },
+ "engines": {
+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
+ }
+}
diff --git a/node_modules/tweetnacl/.npmignore b/node_modules/tweetnacl/.npmignore
new file mode 100644
index 0000000..7d98dcb
--- /dev/null
+++ b/node_modules/tweetnacl/.npmignore
@@ -0,0 +1,4 @@
+.eslintrc
+.travis.yml
+bower.json
+test
diff --git a/node_modules/tweetnacl/AUTHORS.md b/node_modules/tweetnacl/AUTHORS.md
new file mode 100644
index 0000000..6d74d40
--- /dev/null
+++ b/node_modules/tweetnacl/AUTHORS.md
@@ -0,0 +1,28 @@
+List of TweetNaCl.js authors
+============================
+
+ Alphabetical order by first name.
+ Format: Name (GitHub username or URL)
+
+* AndSDev (@AndSDev)
+* Devi Mandiri (@devi)
+* Dmitry Chestnykh (@dchest)
+
+List of authors of third-party public domain code from which TweetNaCl.js code was derived
+==========================================================================================
+
+[TweetNaCl](http://tweetnacl.cr.yp.to/)
+--------------------------------------
+
+* Bernard van Gastel
+* Daniel J. Bernstein <http://cr.yp.to/djb.html>
+* Peter Schwabe <http://www.cryptojedi.org/users/peter/>
+* Sjaak Smetsers <http://www.cs.ru.nl/~sjakie/>
+* Tanja Lange <http://hyperelliptic.org/tanja>
+* Wesley Janssen
+
+
+[Poly1305-donna](https://github.com/floodyberry/poly1305-donna)
+--------------------------------------------------------------
+
+* Andrew Moon (@floodyberry)
diff --git a/node_modules/tweetnacl/CHANGELOG.md b/node_modules/tweetnacl/CHANGELOG.md
new file mode 100644
index 0000000..92a4fdc
--- /dev/null
+++ b/node_modules/tweetnacl/CHANGELOG.md
@@ -0,0 +1,221 @@
+TweetNaCl.js Changelog
+======================
+
+
+v0.14.5
+-------
+
+* Fixed incomplete return types in TypeScript typings.
+* Replaced COPYING.txt with LICENSE file, which now has public domain dedication
+ text from The Unlicense. License fields in package.json and bower.json have
+ been set to "Unlicense". The project was and will be in the public domain --
+ this change just makes it easier for automated tools to know about this fact by
+ using the widely recognized and SPDX-compatible template for public domain
+ dedication.
+
+
+v0.14.4
+-------
+
+* Added TypeScript type definitions (contributed by @AndSDev).
+* Improved benchmarking code.
+
+
+v0.14.3
+-------
+
+Fixed a bug in the fast version of Poly1305 and brought it back.
+
+Thanks to @floodyberry for promptly responding and fixing the original C code:
+
+> "The issue was not properly detecting if st->h was >= 2^130 - 5, coupled with
+> [testing mistake] not catching the failure. The chance of the bug affecting
+> anything in the real world is essentially zero luckily, but it's good to have
+> it fixed."
+
+https://github.com/floodyberry/poly1305-donna/issues/2#issuecomment-202698577
+
+
+v0.14.2
+-------
+
+Switched Poly1305 fast version back to original (slow) version due to a bug.
+
+
+v0.14.1
+-------
+
+No code changes, just tweaked packaging and added COPYING.txt.
+
+
+v0.14.0
+-------
+
+* **Breaking change!** All functions from `nacl.util` have been removed. These
+ functions are no longer available:
+
+ nacl.util.decodeUTF8
+ nacl.util.encodeUTF8
+ nacl.util.decodeBase64
+ nacl.util.encodeBase64
+
+ If want to continue using them, you can include
+ <https://github.com/dchest/tweetnacl-util-js> package:
+
+ <script src="nacl.min.js"></script>
+ <script src="nacl-util.min.js"></script>
+
+ or
+
+ var nacl = require('tweetnacl');
+ nacl.util = require('tweetnacl-util');
+
+ However it is recommended to use better packages that have wider
+ compatibility and better performance. Functions from `nacl.util` were never
+ intended to be robust solution for string conversion and were included for
+ convenience: cryptography library is not the right place for them.
+
+ Currently calling these functions will throw error pointing to
+ `tweetnacl-util-js` (in the next version this error message will be removed).
+
+* Improved detection of available random number generators, making it possible
+ to use `nacl.randomBytes` and related functions in Web Workers without
+ changes.
+
+* Changes to testing (see README).
+
+
+v0.13.3
+-------
+
+No code changes.
+
+* Reverted license field in package.json to "Public domain".
+
+* Fixed typo in README.
+
+
+v0.13.2
+-------
+
+* Fixed undefined variable bug in fast version of Poly1305. No worries, this
+ bug was *never* triggered.
+
+* Specified CC0 public domain dedication.
+
+* Updated development dependencies.
+
+
+v0.13.1
+-------
+
+* Exclude `crypto` and `buffer` modules from browserify builds.
+
+
+v0.13.0
+-------
+
+* Made `nacl-fast` the default version in NPM package. Now
+ `require("tweetnacl")` will use fast version; to get the original version,
+ use `require("tweetnacl/nacl.js")`.
+
+* Cleanup temporary array after generating random bytes.
+
+
+v0.12.2
+-------
+
+* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`,
+ `nacl.sign` and related functions up to 3x faster in `nacl-fast` version.
+
+
+v0.12.1
+-------
+
+* Significantly improved performance of Salsa20 (~1.5x faster) and
+ Poly1305 (~3.5x faster) in `nacl-fast` version.
+
+
+v0.12.0
+-------
+
+* Instead of using the given secret key directly, TweetNaCl.js now copies it to
+ a new array in `nacl.box.keyPair.fromSecretKey` and
+ `nacl.sign.keyPair.fromSecretKey`.
+
+
+v0.11.2
+-------
+
+* Added new constant: `nacl.sign.seedLength`.
+
+
+v0.11.1
+-------
+
+* Even faster hash for both short and long inputs (in `nacl-fast`).
+
+
+v0.11.0
+-------
+
+* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs
+ deterministically from a 32-byte seed. (It behaves like
+ [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html)
+ `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.)
+
+* Fast version now has an improved hash implementation that is 2x-5x faster.
+
+* Fixed benchmarks, which may have produced incorrect measurements.
+
+
+v0.10.1
+-------
+
+* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`.
+
+
+v0.10.0
+-------
+
+* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal
+ with signed messages, and new `nacl.sign.detached` and
+ `nacl.sign.detached.verify` are available.
+
+ Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a
+ message and "detached" signature. This was unlike NaCl's API, which dealt with
+ signed messages (concatenation of signature and message).
+
+ The new API is:
+
+ nacl.sign(message, secretKey) -> signedMessage
+ nacl.sign.open(signedMessage, publicKey) -> message | null
+
+ Since detached signatures are common, two new API functions were introduced:
+
+ nacl.sign.detached(message, secretKey) -> signature
+ nacl.sign.detached.verify(message, signature, publicKey) -> true | false
+
+ (Note that it's `verify`, not `open`, and it returns a boolean value, unlike
+ `open`, which returns an "unsigned" message.)
+
+* NPM package now comes without `test` directory to keep it small.
+
+
+v0.9.2
+------
+
+* Improved documentation.
+* Fast version: increased theoretical message size limit from 2^32-1 to 2^52
+ bytes in Poly1305 (and thus, secretbox and box). However this has no impact
+ in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit
+ indexes, and most implementations won't allocate more than a gigabyte or so.
+ (Obviously, there are no tests for the correctness of implementation.) Also,
+ it's not recommended to use messages that large without splitting them into
+ smaller packets anyway.
+
+
+v0.9.1
+------
+
+* Initial release
diff --git a/node_modules/tweetnacl/LICENSE b/node_modules/tweetnacl/LICENSE
new file mode 100644
index 0000000..cf1ab25
--- /dev/null
+++ b/node_modules/tweetnacl/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org>
diff --git a/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md b/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..a8eb4a9
--- /dev/null
+++ b/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,20 @@
+# Important!
+
+If your contribution is not trivial (not a typo fix, etc.), we can only accept
+it if you dedicate your copyright for the contribution to the public domain.
+Make sure you understand what it means (see http://unlicense.org/)! If you
+agree, please add yourself to AUTHORS.md file, and include the following text
+to your pull request description or a comment in it:
+
+------------------------------------------------------------------------------
+
+ I dedicate any and all copyright interest in this software to the
+ public domain. I make this dedication for the benefit of the public at
+ large and to the detriment of my heirs and successors. I intend this
+ dedication to be an overt act of relinquishment in perpetuity of all
+ present and future rights to this software under copyright law.
+
+ Anyone is free to copy, modify, publish, use, compile, sell, or
+ distribute this software, either in source code form or as a compiled
+ binary, for any purpose, commercial or non-commercial, and by any
+ means.
diff --git a/node_modules/tweetnacl/README.md b/node_modules/tweetnacl/README.md
new file mode 100644
index 0000000..ffb6871
--- /dev/null
+++ b/node_modules/tweetnacl/README.md
@@ -0,0 +1,459 @@
+TweetNaCl.js
+============
+
+Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/)
+to JavaScript for modern browsers and Node.js. Public domain.
+
+[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master)
+](https://travis-ci.org/dchest/tweetnacl-js)
+
+Demo: <https://tweetnacl.js.org>
+
+**:warning: The library is stable and API is frozen, however it has not been
+independently reviewed. If you can help reviewing it, please [contact
+me](mailto:dmitry@codingrobots.com).**
+
+Documentation
+=============
+
+* [Overview](#overview)
+* [Installation](#installation)
+* [Usage](#usage)
+ * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box)
+ * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox)
+ * [Scalar multiplication](#scalar-multiplication)
+ * [Signatures](#signatures)
+ * [Hashing](#hashing)
+ * [Random bytes generation](#random-bytes-generation)
+ * [Constant-time comparison](#constant-time-comparison)
+* [System requirements](#system-requirements)
+* [Development and testing](#development-and-testing)
+* [Benchmarks](#benchmarks)
+* [Contributors](#contributors)
+* [Who uses it](#who-uses-it)
+
+
+Overview
+--------
+
+The primary goal of this project is to produce a translation of TweetNaCl to
+JavaScript which is as close as possible to the original C implementation, plus
+a thin layer of idiomatic high-level API on top of it.
+
+There are two versions, you can use either of them:
+
+* `nacl.js` is the port of TweetNaCl with minimum differences from the
+ original + high-level API.
+
+* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with
+ faster versions.
+
+
+Installation
+------------
+
+You can install TweetNaCl.js via a package manager:
+
+[Bower](http://bower.io):
+
+ $ bower install tweetnacl
+
+[NPM](https://www.npmjs.org/):
+
+ $ npm install tweetnacl
+
+or [download source code](https://github.com/dchest/tweetnacl-js/releases).
+
+
+Usage
+-----
+
+All API functions accept and return bytes as `Uint8Array`s. If you need to
+encode or decode strings, use functions from
+<https://github.com/dchest/tweetnacl-util-js> or one of the more robust codec
+packages.
+
+In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you
+can freely pass them to TweetNaCl.js functions as arguments. The returned
+objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to
+convert them manually; make sure to convert using copying: `new Buffer(array)`,
+instead of sharing: `new Buffer(array.buffer)`, because some functions return
+subarrays of their buffers.
+
+
+### Public-key authenticated encryption (box)
+
+Implements *curve25519-xsalsa20-poly1305*.
+
+#### nacl.box.keyPair()
+
+Generates a new random key pair for box and returns it as an object with
+`publicKey` and `secretKey` members:
+
+ {
+ publicKey: ..., // Uint8Array with 32-byte public key
+ secretKey: ... // Uint8Array with 32-byte secret key
+ }
+
+
+#### nacl.box.keyPair.fromSecretKey(secretKey)
+
+Returns a key pair for box with public key corresponding to the given secret
+key.
+
+#### nacl.box(message, nonce, theirPublicKey, mySecretKey)
+
+Encrypt and authenticates message using peer's public key, our secret key, and
+the given nonce, which must be unique for each distinct message for a key pair.
+
+Returns an encrypted and authenticated message, which is
+`nacl.box.overheadLength` longer than the original message.
+
+#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey)
+
+Authenticates and decrypts the given box with peer's public key, our secret
+key, and the given nonce.
+
+Returns the original message, or `false` if authentication fails.
+
+#### nacl.box.before(theirPublicKey, mySecretKey)
+
+Returns a precomputed shared key which can be used in `nacl.box.after` and
+`nacl.box.open.after`.
+
+#### nacl.box.after(message, nonce, sharedKey)
+
+Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`.
+
+#### nacl.box.open.after(box, nonce, sharedKey)
+
+Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`.
+
+#### nacl.box.publicKeyLength = 32
+
+Length of public key in bytes.
+
+#### nacl.box.secretKeyLength = 32
+
+Length of secret key in bytes.
+
+#### nacl.box.sharedKeyLength = 32
+
+Length of precomputed shared key in bytes.
+
+#### nacl.box.nonceLength = 24
+
+Length of nonce in bytes.
+
+#### nacl.box.overheadLength = 16
+
+Length of overhead added to box compared to original message.
+
+
+### Secret-key authenticated encryption (secretbox)
+
+Implements *xsalsa20-poly1305*.
+
+#### nacl.secretbox(message, nonce, key)
+
+Encrypt and authenticates message using the key and the nonce. The nonce must
+be unique for each distinct message for this key.
+
+Returns an encrypted and authenticated message, which is
+`nacl.secretbox.overheadLength` longer than the original message.
+
+#### nacl.secretbox.open(box, nonce, key)
+
+Authenticates and decrypts the given secret box using the key and the nonce.
+
+Returns the original message, or `false` if authentication fails.
+
+#### nacl.secretbox.keyLength = 32
+
+Length of key in bytes.
+
+#### nacl.secretbox.nonceLength = 24
+
+Length of nonce in bytes.
+
+#### nacl.secretbox.overheadLength = 16
+
+Length of overhead added to secret box compared to original message.
+
+
+### Scalar multiplication
+
+Implements *curve25519*.
+
+#### nacl.scalarMult(n, p)
+
+Multiplies an integer `n` by a group element `p` and returns the resulting
+group element.
+
+#### nacl.scalarMult.base(n)
+
+Multiplies an integer `n` by a standard group element and returns the resulting
+group element.
+
+#### nacl.scalarMult.scalarLength = 32
+
+Length of scalar in bytes.
+
+#### nacl.scalarMult.groupElementLength = 32
+
+Length of group element in bytes.
+
+
+### Signatures
+
+Implements [ed25519](http://ed25519.cr.yp.to).
+
+#### nacl.sign.keyPair()
+
+Generates new random key pair for signing and returns it as an object with
+`publicKey` and `secretKey` members:
+
+ {
+ publicKey: ..., // Uint8Array with 32-byte public key
+ secretKey: ... // Uint8Array with 64-byte secret key
+ }
+
+#### nacl.sign.keyPair.fromSecretKey(secretKey)
+
+Returns a signing key pair with public key corresponding to the given
+64-byte secret key. The secret key must have been generated by
+`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`.
+
+#### nacl.sign.keyPair.fromSeed(seed)
+
+Returns a new signing key pair generated deterministically from a 32-byte seed.
+The seed must contain enough entropy to be secure. This method is not
+recommended for general use: instead, use `nacl.sign.keyPair` to generate a new
+key pair from a random seed.
+
+#### nacl.sign(message, secretKey)
+
+Signs the message using the secret key and returns a signed message.
+
+#### nacl.sign.open(signedMessage, publicKey)
+
+Verifies the signed message and returns the message without signature.
+
+Returns `null` if verification failed.
+
+#### nacl.sign.detached(message, secretKey)
+
+Signs the message using the secret key and returns a signature.
+
+#### nacl.sign.detached.verify(message, signature, publicKey)
+
+Verifies the signature for the message and returns `true` if verification
+succeeded or `false` if it failed.
+
+#### nacl.sign.publicKeyLength = 32
+
+Length of signing public key in bytes.
+
+#### nacl.sign.secretKeyLength = 64
+
+Length of signing secret key in bytes.
+
+#### nacl.sign.seedLength = 32
+
+Length of seed for `nacl.sign.keyPair.fromSeed` in bytes.
+
+#### nacl.sign.signatureLength = 64
+
+Length of signature in bytes.
+
+
+### Hashing
+
+Implements *SHA-512*.
+
+#### nacl.hash(message)
+
+Returns SHA-512 hash of the message.
+
+#### nacl.hash.hashLength = 64
+
+Length of hash in bytes.
+
+
+### Random bytes generation
+
+#### nacl.randomBytes(length)
+
+Returns a `Uint8Array` of the given length containing random bytes of
+cryptographic quality.
+
+**Implementation note**
+
+TweetNaCl.js uses the following methods to generate random bytes,
+depending on the platform it runs on:
+
+* `window.crypto.getRandomValues` (WebCrypto standard)
+* `window.msCrypto.getRandomValues` (Internet Explorer 11)
+* `crypto.randomBytes` (Node.js)
+
+If the platform doesn't provide a suitable PRNG, the following functions,
+which require random numbers, will throw exception:
+
+* `nacl.randomBytes`
+* `nacl.box.keyPair`
+* `nacl.sign.keyPair`
+
+Other functions are deterministic and will continue working.
+
+If a platform you are targeting doesn't implement secure random number
+generator, but you somehow have a cryptographically-strong source of entropy
+(not `Math.random`!), and you know what you are doing, you can plug it into
+TweetNaCl.js like this:
+
+ nacl.setPRNG(function(x, n) {
+ // ... copy n random bytes into x ...
+ });
+
+Note that `nacl.setPRNG` *completely replaces* internal random byte generator
+with the one provided.
+
+
+### Constant-time comparison
+
+#### nacl.verify(x, y)
+
+Compares `x` and `y` in constant time and returns `true` if their lengths are
+non-zero and equal, and their contents are equal.
+
+Returns `false` if either of the arguments has zero length, or arguments have
+different lengths, or their contents differ.
+
+
+System requirements
+-------------------
+
+TweetNaCl.js supports modern browsers that have a cryptographically secure
+pseudorandom number generator and typed arrays, including the latest versions
+of:
+
+* Chrome
+* Firefox
+* Safari (Mac, iOS)
+* Internet Explorer 11
+
+Other systems:
+
+* Node.js
+
+
+Development and testing
+------------------------
+
+Install NPM modules needed for development:
+
+ $ npm install
+
+To build minified versions:
+
+ $ npm run build
+
+Tests use minified version, so make sure to rebuild it every time you change
+`nacl.js` or `nacl-fast.js`.
+
+### Testing
+
+To run tests in Node.js:
+
+ $ npm run test-node
+
+By default all tests described here work on `nacl.min.js`. To test other
+versions, set environment variable `NACL_SRC` to the file name you want to test.
+For example, the following command will test fast minified version:
+
+ $ NACL_SRC=nacl-fast.min.js npm run test-node
+
+To run full suite of tests in Node.js, including comparing outputs of
+JavaScript port to outputs of the original C version:
+
+ $ npm run test-node-all
+
+To prepare tests for browsers:
+
+ $ npm run build-test-browser
+
+and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to
+run them.
+
+To run headless browser tests with `tape-run` (powered by Electron):
+
+ $ npm run test-browser
+
+(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.)
+
+To run tests in both Node and Electron:
+
+ $ npm test
+
+### Benchmarking
+
+To run benchmarks in Node.js:
+
+ $ npm run bench
+ $ NACL_SRC=nacl-fast.min.js npm run bench
+
+To run benchmarks in a browser, open `test/benchmark/bench.html` (or
+`test/benchmark/bench-fast.html`).
+
+
+Benchmarks
+----------
+
+For reference, here are benchmarks from MacBook Pro (Retina, 13-inch, Mid 2014)
+laptop with 2.6 GHz Intel Core i5 CPU (Intel) in Chrome 53/OS X and Xiaomi Redmi
+Note 3 smartphone with 1.8 GHz Qualcomm Snapdragon 650 64-bit CPU (ARM) in
+Chrome 52/Android:
+
+| | nacl.js Intel | nacl-fast.js Intel | nacl.js ARM | nacl-fast.js ARM |
+| ------------- |:-------------:|:-------------------:|:-------------:|:-----------------:|
+| salsa20 | 1.3 MB/s | 128 MB/s | 0.4 MB/s | 43 MB/s |
+| poly1305 | 13 MB/s | 171 MB/s | 4 MB/s | 52 MB/s |
+| hash | 4 MB/s | 34 MB/s | 0.9 MB/s | 12 MB/s |
+| secretbox 1K | 1113 op/s | 57583 op/s | 334 op/s | 14227 op/s |
+| box 1K | 145 op/s | 718 op/s | 37 op/s | 368 op/s |
+| scalarMult | 171 op/s | 733 op/s | 56 op/s | 380 op/s |
+| sign | 77 op/s | 200 op/s | 20 op/s | 61 op/s |
+| sign.open | 39 op/s | 102 op/s | 11 op/s | 31 op/s |
+
+(You can run benchmarks on your devices by clicking on the links at the bottom
+of the [home page](https://tweetnacl.js.org)).
+
+In short, with *nacl-fast.js* and 1024-byte messages you can expect to encrypt and
+authenticate more than 57000 messages per second on a typical laptop or more than
+14000 messages per second on a $170 smartphone, sign about 200 and verify 100
+messages per second on a laptop or 60 and 30 messages per second on a smartphone,
+per CPU core (with Web Workers you can do these operations in parallel),
+which is good enough for most applications.
+
+
+Contributors
+------------
+
+See AUTHORS.md file.
+
+
+Third-party libraries based on TweetNaCl.js
+-------------------------------------------
+
+* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation
+* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption
+* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html)
+* [chloride](https://github.com/dominictarr/chloride) - unified API for various NaCl modules
+
+
+Who uses it
+-----------
+
+Some notable users of TweetNaCl.js:
+
+* [miniLock](http://minilock.io/)
+* [Stellar](https://www.stellar.org/)
diff --git a/node_modules/tweetnacl/nacl-fast.js b/node_modules/tweetnacl/nacl-fast.js
new file mode 100644
index 0000000..5e4562f
--- /dev/null
+++ b/node_modules/tweetnacl/nacl-fast.js
@@ -0,0 +1,2388 @@
+(function(nacl) {
+'use strict';
+
+// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri.
+// Public domain.
+//
+// Implementation derived from TweetNaCl version 20140427.
+// See for details: http://tweetnacl.cr.yp.to/
+
+var gf = function(init) {
+ var i, r = new Float64Array(16);
+ if (init) for (i = 0; i < init.length; i++) r[i] = init[i];
+ return r;
+};
+
+// Pluggable, initialized in high-level API below.
+var randombytes = function(/* x, n */) { throw new Error('no PRNG'); };
+
+var _0 = new Uint8Array(16);
+var _9 = new Uint8Array(32); _9[0] = 9;
+
+var gf0 = gf(),
+ gf1 = gf([1]),
+ _121665 = gf([0xdb41, 1]),
+ D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]),
+ D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]),
+ X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]),
+ Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]),
+ I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]);
+
+function ts64(x, i, h, l) {
+ x[i] = (h >> 24) & 0xff;
+ x[i+1] = (h >> 16) & 0xff;
+ x[i+2] = (h >> 8) & 0xff;
+ x[i+3] = h & 0xff;
+ x[i+4] = (l >> 24) & 0xff;
+ x[i+5] = (l >> 16) & 0xff;
+ x[i+6] = (l >> 8) & 0xff;
+ x[i+7] = l & 0xff;
+}
+
+function vn(x, xi, y, yi, n) {
+ var i,d = 0;
+ for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i];
+ return (1 & ((d - 1) >>> 8)) - 1;
+}
+
+function crypto_verify_16(x, xi, y, yi) {
+ return vn(x,xi,y,yi,16);
+}
+
+function crypto_verify_32(x, xi, y, yi) {
+ return vn(x,xi,y,yi,32);
+}
+
+function core_salsa20(o, p, k, c) {
+ var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,
+ j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,
+ j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,
+ j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,
+ j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,
+ j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,
+ j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,
+ j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,
+ j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,
+ j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,
+ j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,
+ j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,
+ j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,
+ j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,
+ j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,
+ j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;
+
+ var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,
+ x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,
+ x15 = j15, u;
+
+ for (var i = 0; i < 20; i += 2) {
+ u = x0 + x12 | 0;
+ x4 ^= u<<7 | u>>>(32-7);
+ u = x4 + x0 | 0;
+ x8 ^= u<<9 | u>>>(32-9);
+ u = x8 + x4 | 0;
+ x12 ^= u<<13 | u>>>(32-13);
+ u = x12 + x8 | 0;
+ x0 ^= u<<18 | u>>>(32-18);
+
+ u = x5 + x1 | 0;
+ x9 ^= u<<7 | u>>>(32-7);
+ u = x9 + x5 | 0;
+ x13 ^= u<<9 | u>>>(32-9);
+ u = x13 + x9 | 0;
+ x1 ^= u<<13 | u>>>(32-13);
+ u = x1 + x13 | 0;
+ x5 ^= u<<18 | u>>>(32-18);
+
+ u = x10 + x6 | 0;
+ x14 ^= u<<7 | u>>>(32-7);
+ u = x14 + x10 | 0;
+ x2 ^= u<<9 | u>>>(32-9);
+ u = x2 + x14 | 0;
+ x6 ^= u<<13 | u>>>(32-13);
+ u = x6 + x2 | 0;
+ x10 ^= u<<18 | u>>>(32-18);
+
+ u = x15 + x11 | 0;
+ x3 ^= u<<7 | u>>>(32-7);
+ u = x3 + x15 | 0;
+ x7 ^= u<<9 | u>>>(32-9);
+ u = x7 + x3 | 0;
+ x11 ^= u<<13 | u>>>(32-13);
+ u = x11 + x7 | 0;
+ x15 ^= u<<18 | u>>>(32-18);
+
+ u = x0 + x3 | 0;
+ x1 ^= u<<7 | u>>>(32-7);
+ u = x1 + x0 | 0;
+ x2 ^= u<<9 | u>>>(32-9);
+ u = x2 + x1 | 0;
+ x3 ^= u<<13 | u>>>(32-13);
+ u = x3 + x2 | 0;
+ x0 ^= u<<18 | u>>>(32-18);
+
+ u = x5 + x4 | 0;
+ x6 ^= u<<7 | u>>>(32-7);
+ u = x6 + x5 | 0;
+ x7 ^= u<<9 | u>>>(32-9);
+ u = x7 + x6 | 0;
+ x4 ^= u<<13 | u>>>(32-13);
+ u = x4 + x7 | 0;
+ x5 ^= u<<18 | u>>>(32-18);
+
+ u = x10 + x9 | 0;
+ x11 ^= u<<7 | u>>>(32-7);
+ u = x11 + x10 | 0;
+ x8 ^= u<<9 | u>>>(32-9);
+ u = x8 + x11 | 0;
+ x9 ^= u<<13 | u>>>(32-13);
+ u = x9 + x8 | 0;
+ x10 ^= u<<18 | u>>>(32-18);
+
+ u = x15 + x14 | 0;
+ x12 ^= u<<7 | u>>>(32-7);
+ u = x12 + x15 | 0;
+ x13 ^= u<<9 | u>>>(32-9);
+ u = x13 + x12 | 0;
+ x14 ^= u<<13 | u>>>(32-13);
+ u = x14 + x13 | 0;
+ x15 ^= u<<18 | u>>>(32-18);
+ }
+ x0 = x0 + j0 | 0;
+ x1 = x1 + j1 | 0;
+ x2 = x2 + j2 | 0;
+ x3 = x3 + j3 | 0;
+ x4 = x4 + j4 | 0;
+ x5 = x5 + j5 | 0;
+ x6 = x6 + j6 | 0;
+ x7 = x7 + j7 | 0;
+ x8 = x8 + j8 | 0;
+ x9 = x9 + j9 | 0;
+ x10 = x10 + j10 | 0;
+ x11 = x11 + j11 | 0;
+ x12 = x12 + j12 | 0;
+ x13 = x13 + j13 | 0;
+ x14 = x14 + j14 | 0;
+ x15 = x15 + j15 | 0;
+
+ o[ 0] = x0 >>> 0 & 0xff;
+ o[ 1] = x0 >>> 8 & 0xff;
+ o[ 2] = x0 >>> 16 & 0xff;
+ o[ 3] = x0 >>> 24 & 0xff;
+
+ o[ 4] = x1 >>> 0 & 0xff;
+ o[ 5] = x1 >>> 8 & 0xff;
+ o[ 6] = x1 >>> 16 & 0xff;
+ o[ 7] = x1 >>> 24 & 0xff;
+
+ o[ 8] = x2 >>> 0 & 0xff;
+ o[ 9] = x2 >>> 8 & 0xff;
+ o[10] = x2 >>> 16 & 0xff;
+ o[11] = x2 >>> 24 & 0xff;
+
+ o[12] = x3 >>> 0 & 0xff;
+ o[13] = x3 >>> 8 & 0xff;
+ o[14] = x3 >>> 16 & 0xff;
+ o[15] = x3 >>> 24 & 0xff;
+
+ o[16] = x4 >>> 0 & 0xff;
+ o[17] = x4 >>> 8 & 0xff;
+ o[18] = x4 >>> 16 & 0xff;
+ o[19] = x4 >>> 24 & 0xff;
+
+ o[20] = x5 >>> 0 & 0xff;
+ o[21] = x5 >>> 8 & 0xff;
+ o[22] = x5 >>> 16 & 0xff;
+ o[23] = x5 >>> 24 & 0xff;
+
+ o[24] = x6 >>> 0 & 0xff;
+ o[25] = x6 >>> 8 & 0xff;
+ o[26] = x6 >>> 16 & 0xff;
+ o[27] = x6 >>> 24 & 0xff;
+
+ o[28] = x7 >>> 0 & 0xff;
+ o[29] = x7 >>> 8 & 0xff;
+ o[30] = x7 >>> 16 & 0xff;
+ o[31] = x7 >>> 24 & 0xff;
+
+ o[32] = x8 >>> 0 & 0xff;
+ o[33] = x8 >>> 8 & 0xff;
+ o[34] = x8 >>> 16 & 0xff;
+ o[35] = x8 >>> 24 & 0xff;
+
+ o[36] = x9 >>> 0 & 0xff;
+ o[37] = x9 >>> 8 & 0xff;
+ o[38] = x9 >>> 16 & 0xff;
+ o[39] = x9 >>> 24 & 0xff;
+
+ o[40] = x10 >>> 0 & 0xff;
+ o[41] = x10 >>> 8 & 0xff;
+ o[42] = x10 >>> 16 & 0xff;
+ o[43] = x10 >>> 24 & 0xff;
+
+ o[44] = x11 >>> 0 & 0xff;
+ o[45] = x11 >>> 8 & 0xff;
+ o[46] = x11 >>> 16 & 0xff;
+ o[47] = x11 >>> 24 & 0xff;
+
+ o[48] = x12 >>> 0 & 0xff;
+ o[49] = x12 >>> 8 & 0xff;
+ o[50] = x12 >>> 16 & 0xff;
+ o[51] = x12 >>> 24 & 0xff;
+
+ o[52] = x13 >>> 0 & 0xff;
+ o[53] = x13 >>> 8 & 0xff;
+ o[54] = x13 >>> 16 & 0xff;
+ o[55] = x13 >>> 24 & 0xff;
+
+ o[56] = x14 >>> 0 & 0xff;
+ o[57] = x14 >>> 8 & 0xff;
+ o[58] = x14 >>> 16 & 0xff;
+ o[59] = x14 >>> 24 & 0xff;
+
+ o[60] = x15 >>> 0 & 0xff;
+ o[61] = x15 >>> 8 & 0xff;
+ o[62] = x15 >>> 16 & 0xff;
+ o[63] = x15 >>> 24 & 0xff;
+}
+
+function core_hsalsa20(o,p,k,c) {
+ var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,
+ j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,
+ j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,
+ j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,
+ j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,
+ j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,
+ j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,
+ j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,
+ j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,
+ j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,
+ j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,
+ j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,
+ j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,
+ j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,
+ j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,
+ j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;
+
+ var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,
+ x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,
+ x15 = j15, u;
+
+ for (var i = 0; i < 20; i += 2) {
+ u = x0 + x12 | 0;
+ x4 ^= u<<7 | u>>>(32-7);
+ u = x4 + x0 | 0;
+ x8 ^= u<<9 | u>>>(32-9);
+ u = x8 + x4 | 0;
+ x12 ^= u<<13 | u>>>(32-13);
+ u = x12 + x8 | 0;
+ x0 ^= u<<18 | u>>>(32-18);
+
+ u = x5 + x1 | 0;
+ x9 ^= u<<7 | u>>>(32-7);
+ u = x9 + x5 | 0;
+ x13 ^= u<<9 | u>>>(32-9);
+ u = x13 + x9 | 0;
+ x1 ^= u<<13 | u>>>(32-13);
+ u = x1 + x13 | 0;
+ x5 ^= u<<18 | u>>>(32-18);
+
+ u = x10 + x6 | 0;
+ x14 ^= u<<7 | u>>>(32-7);
+ u = x14 + x10 | 0;
+ x2 ^= u<<9 | u>>>(32-9);
+ u = x2 + x14 | 0;
+ x6 ^= u<<13 | u>>>(32-13);
+ u = x6 + x2 | 0;
+ x10 ^= u<<18 | u>>>(32-18);
+
+ u = x15 + x11 | 0;
+ x3 ^= u<<7 | u>>>(32-7);
+ u = x3 + x15 | 0;
+ x7 ^= u<<9 | u>>>(32-9);
+ u = x7 + x3 | 0;
+ x11 ^= u<<13 | u>>>(32-13);
+ u = x11 + x7 | 0;
+ x15 ^= u<<18 | u>>>(32-18);
+
+ u = x0 + x3 | 0;
+ x1 ^= u<<7 | u>>>(32-7);
+ u = x1 + x0 | 0;
+ x2 ^= u<<9 | u>>>(32-9);
+ u = x2 + x1 | 0;
+ x3 ^= u<<13 | u>>>(32-13);
+ u = x3 + x2 | 0;
+ x0 ^= u<<18 | u>>>(32-18);
+
+ u = x5 + x4 | 0;
+ x6 ^= u<<7 | u>>>(32-7);
+ u = x6 + x5 | 0;
+ x7 ^= u<<9 | u>>>(32-9);
+ u = x7 + x6 | 0;
+ x4 ^= u<<13 | u>>>(32-13);
+ u = x4 + x7 | 0;
+ x5 ^= u<<18 | u>>>(32-18);
+
+ u = x10 + x9 | 0;
+ x11 ^= u<<7 | u>>>(32-7);
+ u = x11 + x10 | 0;
+ x8 ^= u<<9 | u>>>(32-9);
+ u = x8 + x11 | 0;
+ x9 ^= u<<13 | u>>>(32-13);
+ u = x9 + x8 | 0;
+ x10 ^= u<<18 | u>>>(32-18);
+
+ u = x15 + x14 | 0;
+ x12 ^= u<<7 | u>>>(32-7);
+ u = x12 + x15 | 0;
+ x13 ^= u<<9 | u>>>(32-9);
+ u = x13 + x12 | 0;
+ x14 ^= u<<13 | u>>>(32-13);
+ u = x14 + x13 | 0;
+ x15 ^= u<<18 | u>>>(32-18);
+ }
+
+ o[ 0] = x0 >>> 0 & 0xff;
+ o[ 1] = x0 >>> 8 & 0xff;
+ o[ 2] = x0 >>> 16 & 0xff;
+ o[ 3] = x0 >>> 24 & 0xff;
+
+ o[ 4] = x5 >>> 0 & 0xff;
+ o[ 5] = x5 >>> 8 & 0xff;
+ o[ 6] = x5 >>> 16 & 0xff;
+ o[ 7] = x5 >>> 24 & 0xff;
+
+ o[ 8] = x10 >>> 0 & 0xff;
+ o[ 9] = x10 >>> 8 & 0xff;
+ o[10] = x10 >>> 16 & 0xff;
+ o[11] = x10 >>> 24 & 0xff;
+
+ o[12] = x15 >>> 0 & 0xff;
+ o[13] = x15 >>> 8 & 0xff;
+ o[14] = x15 >>> 16 & 0xff;
+ o[15] = x15 >>> 24 & 0xff;
+
+ o[16] = x6 >>> 0 & 0xff;
+ o[17] = x6 >>> 8 & 0xff;
+ o[18] = x6 >>> 16 & 0xff;
+ o[19] = x6 >>> 24 & 0xff;
+
+ o[20] = x7 >>> 0 & 0xff;
+ o[21] = x7 >>> 8 & 0xff;
+ o[22] = x7 >>> 16 & 0xff;
+ o[23] = x7 >>> 24 & 0xff;
+
+ o[24] = x8 >>> 0 & 0xff;
+ o[25] = x8 >>> 8 & 0xff;
+ o[26] = x8 >>> 16 & 0xff;
+ o[27] = x8 >>> 24 & 0xff;
+
+ o[28] = x9 >>> 0 & 0xff;
+ o[29] = x9 >>> 8 & 0xff;
+ o[30] = x9 >>> 16 & 0xff;
+ o[31] = x9 >>> 24 & 0xff;
+}
+
+function crypto_core_salsa20(out,inp,k,c) {
+ core_salsa20(out,inp,k,c);
+}
+
+function crypto_core_hsalsa20(out,inp,k,c) {
+ core_hsalsa20(out,inp,k,c);
+}
+
+var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
+ // "expand 32-byte k"
+
+function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) {
+ var z = new Uint8Array(16), x = new Uint8Array(64);
+ var u, i;
+ for (i = 0; i < 16; i++) z[i] = 0;
+ for (i = 0; i < 8; i++) z[i] = n[i];
+ while (b >= 64) {
+ crypto_core_salsa20(x,z,k,sigma);
+ for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i];
+ u = 1;
+ for (i = 8; i < 16; i++) {
+ u = u + (z[i] & 0xff) | 0;
+ z[i] = u & 0xff;
+ u >>>= 8;
+ }
+ b -= 64;
+ cpos += 64;
+ mpos += 64;
+ }
+ if (b > 0) {
+ crypto_core_salsa20(x,z,k,sigma);
+ for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i];
+ }
+ return 0;
+}
+
+function crypto_stream_salsa20(c,cpos,b,n,k) {
+ var z = new Uint8Array(16), x = new Uint8Array(64);
+ var u, i;
+ for (i = 0; i < 16; i++) z[i] = 0;
+ for (i = 0; i < 8; i++) z[i] = n[i];
+ while (b >= 64) {
+ crypto_core_salsa20(x,z,k,sigma);
+ for (i = 0; i < 64; i++) c[cpos+i] = x[i];
+ u = 1;
+ for (i = 8; i < 16; i++) {
+ u = u + (z[i] & 0xff) | 0;
+ z[i] = u & 0xff;
+ u >>>= 8;
+ }
+ b -= 64;
+ cpos += 64;
+ }
+ if (b > 0) {
+ crypto_core_salsa20(x,z,k,sigma);
+ for (i = 0; i < b; i++) c[cpos+i] = x[i];
+ }
+ return 0;
+}
+
+function crypto_stream(c,cpos,d,n,k) {
+ var s = new Uint8Array(32);
+ crypto_core_hsalsa20(s,n,k,sigma);
+ var sn = new Uint8Array(8);
+ for (var i = 0; i < 8; i++) sn[i] = n[i+16];
+ return crypto_stream_salsa20(c,cpos,d,sn,s);
+}
+
+function crypto_stream_xor(c,cpos,m,mpos,d,n,k) {
+ var s = new Uint8Array(32);
+ crypto_core_hsalsa20(s,n,k,sigma);
+ var sn = new Uint8Array(8);
+ for (var i = 0; i < 8; i++) sn[i] = n[i+16];
+ return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s);
+}
+
+/*
+* Port of Andrew Moon's Poly1305-donna-16. Public domain.
+* https://github.com/floodyberry/poly1305-donna
+*/
+
+var poly1305 = function(key) {
+ this.buffer = new Uint8Array(16);
+ this.r = new Uint16Array(10);
+ this.h = new Uint16Array(10);
+ this.pad = new Uint16Array(8);
+ this.leftover = 0;
+ this.fin = 0;
+
+ var t0, t1, t2, t3, t4, t5, t6, t7;
+
+ t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff;
+ t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;
+ t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;
+ t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;
+ t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;
+ this.r[5] = ((t4 >>> 1)) & 0x1ffe;
+ t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;
+ t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;
+ t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;
+ this.r[9] = ((t7 >>> 5)) & 0x007f;
+
+ this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8;
+ this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8;
+ this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8;
+ this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8;
+ this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8;
+ this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8;
+ this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8;
+ this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8;
+};
+
+poly1305.prototype.blocks = function(m, mpos, bytes) {
+ var hibit = this.fin ? 0 : (1 << 11);
+ var t0, t1, t2, t3, t4, t5, t6, t7, c;
+ var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9;
+
+ var h0 = this.h[0],
+ h1 = this.h[1],
+ h2 = this.h[2],
+ h3 = this.h[3],
+ h4 = this.h[4],
+ h5 = this.h[5],
+ h6 = this.h[6],
+ h7 = this.h[7],
+ h8 = this.h[8],
+ h9 = this.h[9];
+
+ var r0 = this.r[0],
+ r1 = this.r[1],
+ r2 = this.r[2],
+ r3 = this.r[3],
+ r4 = this.r[4],
+ r5 = this.r[5],
+ r6 = this.r[6],
+ r7 = this.r[7],
+ r8 = this.r[8],
+ r9 = this.r[9];
+
+ while (bytes >= 16) {
+ t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff;
+ t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff;
+ t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff;
+ t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff;
+ t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff;
+ h5 += ((t4 >>> 1)) & 0x1fff;
+ t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff;
+ t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff;
+ t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff;
+ h9 += ((t7 >>> 5)) | hibit;
+
+ c = 0;
+
+ d0 = c;
+ d0 += h0 * r0;
+ d0 += h1 * (5 * r9);
+ d0 += h2 * (5 * r8);
+ d0 += h3 * (5 * r7);
+ d0 += h4 * (5 * r6);
+ c = (d0 >>> 13); d0 &= 0x1fff;
+ d0 += h5 * (5 * r5);
+ d0 += h6 * (5 * r4);
+ d0 += h7 * (5 * r3);
+ d0 += h8 * (5 * r2);
+ d0 += h9 * (5 * r1);
+ c += (d0 >>> 13); d0 &= 0x1fff;
+
+ d1 = c;
+ d1 += h0 * r1;
+ d1 += h1 * r0;
+ d1 += h2 * (5 * r9);
+ d1 += h3 * (5 * r8);
+ d1 += h4 * (5 * r7);
+ c = (d1 >>> 13); d1 &= 0x1fff;
+ d1 += h5 * (5 * r6);
+ d1 += h6 * (5 * r5);
+ d1 += h7 * (5 * r4);
+ d1 += h8 * (5 * r3);
+ d1 += h9 * (5 * r2);
+ c += (d1 >>> 13); d1 &= 0x1fff;
+
+ d2 = c;
+ d2 += h0 * r2;
+ d2 += h1 * r1;
+ d2 += h2 * r0;
+ d2 += h3 * (5 * r9);
+ d2 += h4 * (5 * r8);
+ c = (d2 >>> 13); d2 &= 0x1fff;
+ d2 += h5 * (5 * r7);
+ d2 += h6 * (5 * r6);
+ d2 += h7 * (5 * r5);
+ d2 += h8 * (5 * r4);
+ d2 += h9 * (5 * r3);
+ c += (d2 >>> 13); d2 &= 0x1fff;
+
+ d3 = c;
+ d3 += h0 * r3;
+ d3 += h1 * r2;
+ d3 += h2 * r1;
+ d3 += h3 * r0;
+ d3 += h4 * (5 * r9);
+ c = (d3 >>> 13); d3 &= 0x1fff;
+ d3 += h5 * (5 * r8);
+ d3 += h6 * (5 * r7);
+ d3 += h7 * (5 * r6);
+ d3 += h8 * (5 * r5);
+ d3 += h9 * (5 * r4);
+ c += (d3 >>> 13); d3 &= 0x1fff;
+
+ d4 = c;
+ d4 += h0 * r4;
+ d4 += h1 * r3;
+ d4 += h2 * r2;
+ d4 += h3 * r1;
+ d4 += h4 * r0;
+ c = (d4 >>> 13); d4 &= 0x1fff;
+ d4 += h5 * (5 * r9);
+ d4 += h6 * (5 * r8);
+ d4 += h7 * (5 * r7);
+ d4 += h8 * (5 * r6);
+ d4 += h9 * (5 * r5);
+ c += (d4 >>> 13); d4 &= 0x1fff;
+
+ d5 = c;
+ d5 += h0 * r5;
+ d5 += h1 * r4;
+ d5 += h2 * r3;
+ d5 += h3 * r2;
+ d5 += h4 * r1;
+ c = (d5 >>> 13); d5 &= 0x1fff;
+ d5 += h5 * r0;
+ d5 += h6 * (5 * r9);
+ d5 += h7 * (5 * r8);
+ d5 += h8 * (5 * r7);
+ d5 += h9 * (5 * r6);
+ c += (d5 >>> 13); d5 &= 0x1fff;
+
+ d6 = c;
+ d6 += h0 * r6;
+ d6 += h1 * r5;
+ d6 += h2 * r4;
+ d6 += h3 * r3;
+ d6 += h4 * r2;
+ c = (d6 >>> 13); d6 &= 0x1fff;
+ d6 += h5 * r1;
+ d6 += h6 * r0;
+ d6 += h7 * (5 * r9);
+ d6 += h8 * (5 * r8);
+ d6 += h9 * (5 * r7);
+ c += (d6 >>> 13); d6 &= 0x1fff;
+
+ d7 = c;
+ d7 += h0 * r7;
+ d7 += h1 * r6;
+ d7 += h2 * r5;
+ d7 += h3 * r4;
+ d7 += h4 * r3;
+ c = (d7 >>> 13); d7 &= 0x1fff;
+ d7 += h5 * r2;
+ d7 += h6 * r1;
+ d7 += h7 * r0;
+ d7 += h8 * (5 * r9);
+ d7 += h9 * (5 * r8);
+ c += (d7 >>> 13); d7 &= 0x1fff;
+
+ d8 = c;
+ d8 += h0 * r8;
+ d8 += h1 * r7;
+ d8 += h2 * r6;
+ d8 += h3 * r5;
+ d8 += h4 * r4;
+ c = (d8 >>> 13); d8 &= 0x1fff;
+ d8 += h5 * r3;
+ d8 += h6 * r2;
+ d8 += h7 * r1;
+ d8 += h8 * r0;
+ d8 += h9 * (5 * r9);
+ c += (d8 >>> 13); d8 &= 0x1fff;
+
+ d9 = c;
+ d9 += h0 * r9;
+ d9 += h1 * r8;
+ d9 += h2 * r7;
+ d9 += h3 * r6;
+ d9 += h4 * r5;
+ c = (d9 >>> 13); d9 &= 0x1fff;
+ d9 += h5 * r4;
+ d9 += h6 * r3;
+ d9 += h7 * r2;
+ d9 += h8 * r1;
+ d9 += h9 * r0;
+ c += (d9 >>> 13); d9 &= 0x1fff;
+
+ c = (((c << 2) + c)) | 0;
+ c = (c + d0) | 0;
+ d0 = c & 0x1fff;
+ c = (c >>> 13);
+ d1 += c;
+
+ h0 = d0;
+ h1 = d1;
+ h2 = d2;
+ h3 = d3;
+ h4 = d4;
+ h5 = d5;
+ h6 = d6;
+ h7 = d7;
+ h8 = d8;
+ h9 = d9;
+
+ mpos += 16;
+ bytes -= 16;
+ }
+ this.h[0] = h0;
+ this.h[1] = h1;
+ this.h[2] = h2;
+ this.h[3] = h3;
+ this.h[4] = h4;
+ this.h[5] = h5;
+ this.h[6] = h6;
+ this.h[7] = h7;
+ this.h[8] = h8;
+ this.h[9] = h9;
+};
+
+poly1305.prototype.finish = function(mac, macpos) {
+ var g = new Uint16Array(10);
+ var c, mask, f, i;
+
+ if (this.leftover) {
+ i = this.leftover;
+ this.buffer[i++] = 1;
+ for (; i < 16; i++) this.buffer[i] = 0;
+ this.fin = 1;
+ this.blocks(this.buffer, 0, 16);
+ }
+
+ c = this.h[1] >>> 13;
+ this.h[1] &= 0x1fff;
+ for (i = 2; i < 10; i++) {
+ this.h[i] += c;
+ c = this.h[i] >>> 13;
+ this.h[i] &= 0x1fff;
+ }
+ this.h[0] += (c * 5);
+ c = this.h[0] >>> 13;
+ this.h[0] &= 0x1fff;
+ this.h[1] += c;
+ c = this.h[1] >>> 13;
+ this.h[1] &= 0x1fff;
+ this.h[2] += c;
+
+ g[0] = this.h[0] + 5;
+ c = g[0] >>> 13;
+ g[0] &= 0x1fff;
+ for (i = 1; i < 10; i++) {
+ g[i] = this.h[i] + c;
+ c = g[i] >>> 13;
+ g[i] &= 0x1fff;
+ }
+ g[9] -= (1 << 13);
+
+ mask = (c ^ 1) - 1;
+ for (i = 0; i < 10; i++) g[i] &= mask;
+ mask = ~mask;
+ for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i];
+
+ this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff;
+ this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff;
+ this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff;
+ this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff;
+ this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff;
+ this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff;
+ this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff;
+ this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff;
+
+ f = this.h[0] + this.pad[0];
+ this.h[0] = f & 0xffff;
+ for (i = 1; i < 8; i++) {
+ f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0;
+ this.h[i] = f & 0xffff;
+ }
+
+ mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff;
+ mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff;
+ mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff;
+ mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff;
+ mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff;
+ mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff;
+ mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff;
+ mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff;
+ mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff;
+ mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff;
+ mac[macpos+10] = (this.h[5] >>> 0) & 0xff;
+ mac[macpos+11] = (this.h[5] >>> 8) & 0xff;
+ mac[macpos+12] = (this.h[6] >>> 0) & 0xff;
+ mac[macpos+13] = (this.h[6] >>> 8) & 0xff;
+ mac[macpos+14] = (this.h[7] >>> 0) & 0xff;
+ mac[macpos+15] = (this.h[7] >>> 8) & 0xff;
+};
+
+poly1305.prototype.update = function(m, mpos, bytes) {
+ var i, want;
+
+ if (this.leftover) {
+ want = (16 - this.leftover);
+ if (want > bytes)
+ want = bytes;
+ for (i = 0; i < want; i++)
+ this.buffer[this.leftover + i] = m[mpos+i];
+ bytes -= want;
+ mpos += want;
+ this.leftover += want;
+ if (this.leftover < 16)
+ return;
+ this.blocks(this.buffer, 0, 16);
+ this.leftover = 0;
+ }
+
+ if (bytes >= 16) {
+ want = bytes - (bytes % 16);
+ this.blocks(m, mpos, want);
+ mpos += want;
+ bytes -= want;
+ }
+
+ if (bytes) {
+ for (i = 0; i < bytes; i++)
+ this.buffer[this.leftover + i] = m[mpos+i];
+ this.leftover += bytes;
+ }
+};
+
+function crypto_onetimeauth(out, outpos, m, mpos, n, k) {
+ var s = new poly1305(k);
+ s.update(m, mpos, n);
+ s.finish(out, outpos);
+ return 0;
+}
+
+function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) {
+ var x = new Uint8Array(16);
+ crypto_onetimeauth(x,0,m,mpos,n,k);
+ return crypto_verify_16(h,hpos,x,0);
+}
+
+function crypto_secretbox(c,m,d,n,k) {
+ var i;
+ if (d < 32) return -1;
+ crypto_stream_xor(c,0,m,0,d,n,k);
+ crypto_onetimeauth(c, 16, c, 32, d - 32, c);
+ for (i = 0; i < 16; i++) c[i] = 0;
+ return 0;
+}
+
+function crypto_secretbox_open(m,c,d,n,k) {
+ var i;
+ var x = new Uint8Array(32);
+ if (d < 32) return -1;
+ crypto_stream(x,0,32,n,k);
+ if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1;
+ crypto_stream_xor(m,0,c,0,d,n,k);
+ for (i = 0; i < 32; i++) m[i] = 0;
+ return 0;
+}
+
+function set25519(r, a) {
+ var i;
+ for (i = 0; i < 16; i++) r[i] = a[i]|0;
+}
+
+function car25519(o) {
+ var i, v, c = 1;
+ for (i = 0; i < 16; i++) {
+ v = o[i] + c + 65535;
+ c = Math.floor(v / 65536);
+ o[i] = v - c * 65536;
+ }
+ o[0] += c-1 + 37 * (c-1);
+}
+
+function sel25519(p, q, b) {
+ var t, c = ~(b-1);
+ for (var i = 0; i < 16; i++) {
+ t = c & (p[i] ^ q[i]);
+ p[i] ^= t;
+ q[i] ^= t;
+ }
+}
+
+function pack25519(o, n) {
+ var i, j, b;
+ var m = gf(), t = gf();
+ for (i = 0; i < 16; i++) t[i] = n[i];
+ car25519(t);
+ car25519(t);
+ car25519(t);
+ for (j = 0; j < 2; j++) {
+ m[0] = t[0] - 0xffed;
+ for (i = 1; i < 15; i++) {
+ m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1);
+ m[i-1] &= 0xffff;
+ }
+ m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1);
+ b = (m[15]>>16) & 1;
+ m[14] &= 0xffff;
+ sel25519(t, m, 1-b);
+ }
+ for (i = 0; i < 16; i++) {
+ o[2*i] = t[i] & 0xff;
+ o[2*i+1] = t[i]>>8;
+ }
+}
+
+function neq25519(a, b) {
+ var c = new Uint8Array(32), d = new Uint8Array(32);
+ pack25519(c, a);
+ pack25519(d, b);
+ return crypto_verify_32(c, 0, d, 0);
+}
+
+function par25519(a) {
+ var d = new Uint8Array(32);
+ pack25519(d, a);
+ return d[0] & 1;
+}
+
+function unpack25519(o, n) {
+ var i;
+ for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8);
+ o[15] &= 0x7fff;
+}
+
+function A(o, a, b) {
+ for (var i = 0; i < 16; i++) o[i] = a[i] + b[i];
+}
+
+function Z(o, a, b) {
+ for (var i = 0; i < 16; i++) o[i] = a[i] - b[i];
+}
+
+function M(o, a, b) {
+ var v, c,
+ t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0,
+ t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0,
+ t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0,
+ t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0,
+ b0 = b[0],
+ b1 = b[1],
+ b2 = b[2],
+ b3 = b[3],
+ b4 = b[4],
+ b5 = b[5],
+ b6 = b[6],
+ b7 = b[7],
+ b8 = b[8],
+ b9 = b[9],
+ b10 = b[10],
+ b11 = b[11],
+ b12 = b[12],
+ b13 = b[13],
+ b14 = b[14],
+ b15 = b[15];
+
+ v = a[0];
+ t0 += v * b0;
+ t1 += v * b1;
+ t2 += v * b2;
+ t3 += v * b3;
+ t4 += v * b4;
+ t5 += v * b5;
+ t6 += v * b6;
+ t7 += v * b7;
+ t8 += v * b8;
+ t9 += v * b9;
+ t10 += v * b10;
+ t11 += v * b11;
+ t12 += v * b12;
+ t13 += v * b13;
+ t14 += v * b14;
+ t15 += v * b15;
+ v = a[1];
+ t1 += v * b0;
+ t2 += v * b1;
+ t3 += v * b2;
+ t4 += v * b3;
+ t5 += v * b4;
+ t6 += v * b5;
+ t7 += v * b6;
+ t8 += v * b7;
+ t9 += v * b8;
+ t10 += v * b9;
+ t11 += v * b10;
+ t12 += v * b11;
+ t13 += v * b12;
+ t14 += v * b13;
+ t15 += v * b14;
+ t16 += v * b15;
+ v = a[2];
+ t2 += v * b0;
+ t3 += v * b1;
+ t4 += v * b2;
+ t5 += v * b3;
+ t6 += v * b4;
+ t7 += v * b5;
+ t8 += v * b6;
+ t9 += v * b7;
+ t10 += v * b8;
+ t11 += v * b9;
+ t12 += v * b10;
+ t13 += v * b11;
+ t14 += v * b12;
+ t15 += v * b13;
+ t16 += v * b14;
+ t17 += v * b15;
+ v = a[3];
+ t3 += v * b0;
+ t4 += v * b1;
+ t5 += v * b2;
+ t6 += v * b3;
+ t7 += v * b4;
+ t8 += v * b5;
+ t9 += v * b6;
+ t10 += v * b7;
+ t11 += v * b8;
+ t12 += v * b9;
+ t13 += v * b10;
+ t14 += v * b11;
+ t15 += v * b12;
+ t16 += v * b13;
+ t17 += v * b14;
+ t18 += v * b15;
+ v = a[4];
+ t4 += v * b0;
+ t5 += v * b1;
+ t6 += v * b2;
+ t7 += v * b3;
+ t8 += v * b4;
+ t9 += v * b5;
+ t10 += v * b6;
+ t11 += v * b7;
+ t12 += v * b8;
+ t13 += v * b9;
+ t14 += v * b10;
+ t15 += v * b11;
+ t16 += v * b12;
+ t17 += v * b13;
+ t18 += v * b14;
+ t19 += v * b15;
+ v = a[5];
+ t5 += v * b0;
+ t6 += v * b1;
+ t7 += v * b2;
+ t8 += v * b3;
+ t9 += v * b4;
+ t10 += v * b5;
+ t11 += v * b6;
+ t12 += v * b7;
+ t13 += v * b8;
+ t14 += v * b9;
+ t15 += v * b10;
+ t16 += v * b11;
+ t17 += v * b12;
+ t18 += v * b13;
+ t19 += v * b14;
+ t20 += v * b15;
+ v = a[6];
+ t6 += v * b0;
+ t7 += v * b1;
+ t8 += v * b2;
+ t9 += v * b3;
+ t10 += v * b4;
+ t11 += v * b5;
+ t12 += v * b6;
+ t13 += v * b7;
+ t14 += v * b8;
+ t15 += v * b9;
+ t16 += v * b10;
+ t17 += v * b11;
+ t18 += v * b12;
+ t19 += v * b13;
+ t20 += v * b14;
+ t21 += v * b15;
+ v = a[7];
+ t7 += v * b0;
+ t8 += v * b1;
+ t9 += v * b2;
+ t10 += v * b3;
+ t11 += v * b4;
+ t12 += v * b5;
+ t13 += v * b6;
+ t14 += v * b7;
+ t15 += v * b8;
+ t16 += v * b9;
+ t17 += v * b10;
+ t18 += v * b11;
+ t19 += v * b12;
+ t20 += v * b13;
+ t21 += v * b14;
+ t22 += v * b15;
+ v = a[8];
+ t8 += v * b0;
+ t9 += v * b1;
+ t10 += v * b2;
+ t11 += v * b3;
+ t12 += v * b4;
+ t13 += v * b5;
+ t14 += v * b6;
+ t15 += v * b7;
+ t16 += v * b8;
+ t17 += v * b9;
+ t18 += v * b10;
+ t19 += v * b11;
+ t20 += v * b12;
+ t21 += v * b13;
+ t22 += v * b14;
+ t23 += v * b15;
+ v = a[9];
+ t9 += v * b0;
+ t10 += v * b1;
+ t11 += v * b2;
+ t12 += v * b3;
+ t13 += v * b4;
+ t14 += v * b5;
+ t15 += v * b6;
+ t16 += v * b7;
+ t17 += v * b8;
+ t18 += v * b9;
+ t19 += v * b10;
+ t20 += v * b11;
+ t21 += v * b12;
+ t22 += v * b13;
+ t23 += v * b14;
+ t24 += v * b15;
+ v = a[10];
+ t10 += v * b0;
+ t11 += v * b1;
+ t12 += v * b2;
+ t13 += v * b3;
+ t14 += v * b4;
+ t15 += v * b5;
+ t16 += v * b6;
+ t17 += v * b7;
+ t18 += v * b8;
+ t19 += v * b9;
+ t20 += v * b10;
+ t21 += v * b11;
+ t22 += v * b12;
+ t23 += v * b13;
+ t24 += v * b14;
+ t25 += v * b15;
+ v = a[11];
+ t11 += v * b0;
+ t12 += v * b1;
+ t13 += v * b2;
+ t14 += v * b3;
+ t15 += v * b4;
+ t16 += v * b5;
+ t17 += v * b6;
+ t18 += v * b7;
+ t19 += v * b8;
+ t20 += v * b9;
+ t21 += v * b10;
+ t22 += v * b11;
+ t23 += v * b12;
+ t24 += v * b13;
+ t25 += v * b14;
+ t26 += v * b15;
+ v = a[12];
+ t12 += v * b0;
+ t13 += v * b1;
+ t14 += v * b2;
+ t15 += v * b3;
+ t16 += v * b4;
+ t17 += v * b5;
+ t18 += v * b6;
+ t19 += v * b7;
+ t20 += v * b8;
+ t21 += v * b9;
+ t22 += v * b10;
+ t23 += v * b11;
+ t24 += v * b12;
+ t25 += v * b13;
+ t26 += v * b14;
+ t27 += v * b15;
+ v = a[13];
+ t13 += v * b0;
+ t14 += v * b1;
+ t15 += v * b2;
+ t16 += v * b3;
+ t17 += v * b4;
+ t18 += v * b5;
+ t19 += v * b6;
+ t20 += v * b7;
+ t21 += v * b8;
+ t22 += v * b9;
+ t23 += v * b10;
+ t24 += v * b11;
+ t25 += v * b12;
+ t26 += v * b13;
+ t27 += v * b14;
+ t28 += v * b15;
+ v = a[14];
+ t14 += v * b0;
+ t15 += v * b1;
+ t16 += v * b2;
+ t17 += v * b3;
+ t18 += v * b4;
+ t19 += v * b5;
+ t20 += v * b6;
+ t21 += v * b7;
+ t22 += v * b8;
+ t23 += v * b9;
+ t24 += v * b10;
+ t25 += v * b11;
+ t26 += v * b12;
+ t27 += v * b13;
+ t28 += v * b14;
+ t29 += v * b15;
+ v = a[15];
+ t15 += v * b0;
+ t16 += v * b1;
+ t17 += v * b2;
+ t18 += v * b3;
+ t19 += v * b4;
+ t20 += v * b5;
+ t21 += v * b6;
+ t22 += v * b7;
+ t23 += v * b8;
+ t24 += v * b9;
+ t25 += v * b10;
+ t26 += v * b11;
+ t27 += v * b12;
+ t28 += v * b13;
+ t29 += v * b14;
+ t30 += v * b15;
+
+ t0 += 38 * t16;
+ t1 += 38 * t17;
+ t2 += 38 * t18;
+ t3 += 38 * t19;
+ t4 += 38 * t20;
+ t5 += 38 * t21;
+ t6 += 38 * t22;
+ t7 += 38 * t23;
+ t8 += 38 * t24;
+ t9 += 38 * t25;
+ t10 += 38 * t26;
+ t11 += 38 * t27;
+ t12 += 38 * t28;
+ t13 += 38 * t29;
+ t14 += 38 * t30;
+ // t15 left as is
+
+ // first car
+ c = 1;
+ v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;
+ v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;
+ v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;
+ v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;
+ v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;
+ v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;
+ v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;
+ v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;
+ v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;
+ v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;
+ v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;
+ v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;
+ v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;
+ v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;
+ v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;
+ v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;
+ t0 += c-1 + 37 * (c-1);
+
+ // second car
+ c = 1;
+ v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;
+ v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;
+ v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;
+ v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;
+ v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;
+ v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;
+ v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;
+ v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;
+ v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;
+ v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;
+ v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;
+ v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;
+ v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;
+ v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;
+ v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;
+ v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;
+ t0 += c-1 + 37 * (c-1);
+
+ o[ 0] = t0;
+ o[ 1] = t1;
+ o[ 2] = t2;
+ o[ 3] = t3;
+ o[ 4] = t4;
+ o[ 5] = t5;
+ o[ 6] = t6;
+ o[ 7] = t7;
+ o[ 8] = t8;
+ o[ 9] = t9;
+ o[10] = t10;
+ o[11] = t11;
+ o[12] = t12;
+ o[13] = t13;
+ o[14] = t14;
+ o[15] = t15;
+}
+
+function S(o, a) {
+ M(o, a, a);
+}
+
+function inv25519(o, i) {
+ var c = gf();
+ var a;
+ for (a = 0; a < 16; a++) c[a] = i[a];
+ for (a = 253; a >= 0; a--) {
+ S(c, c);
+ if(a !== 2 && a !== 4) M(c, c, i);
+ }
+ for (a = 0; a < 16; a++) o[a] = c[a];
+}
+
+function pow2523(o, i) {
+ var c = gf();
+ var a;
+ for (a = 0; a < 16; a++) c[a] = i[a];
+ for (a = 250; a >= 0; a--) {
+ S(c, c);
+ if(a !== 1) M(c, c, i);
+ }
+ for (a = 0; a < 16; a++) o[a] = c[a];
+}
+
+function crypto_scalarmult(q, n, p) {
+ var z = new Uint8Array(32);
+ var x = new Float64Array(80), r, i;
+ var a = gf(), b = gf(), c = gf(),
+ d = gf(), e = gf(), f = gf();
+ for (i = 0; i < 31; i++) z[i] = n[i];
+ z[31]=(n[31]&127)|64;
+ z[0]&=248;
+ unpack25519(x,p);
+ for (i = 0; i < 16; i++) {
+ b[i]=x[i];
+ d[i]=a[i]=c[i]=0;
+ }
+ a[0]=d[0]=1;
+ for (i=254; i>=0; --i) {
+ r=(z[i>>>3]>>>(i&7))&1;
+ sel25519(a,b,r);
+ sel25519(c,d,r);
+ A(e,a,c);
+ Z(a,a,c);
+ A(c,b,d);
+ Z(b,b,d);
+ S(d,e);
+ S(f,a);
+ M(a,c,a);
+ M(c,b,e);
+ A(e,a,c);
+ Z(a,a,c);
+ S(b,a);
+ Z(c,d,f);
+ M(a,c,_121665);
+ A(a,a,d);
+ M(c,c,a);
+ M(a,d,f);
+ M(d,b,x);
+ S(b,e);
+ sel25519(a,b,r);
+ sel25519(c,d,r);
+ }
+ for (i = 0; i < 16; i++) {
+ x[i+16]=a[i];
+ x[i+32]=c[i];
+ x[i+48]=b[i];
+ x[i+64]=d[i];
+ }
+ var x32 = x.subarray(32);
+ var x16 = x.subarray(16);
+ inv25519(x32,x32);
+ M(x16,x16,x32);
+ pack25519(q,x16);
+ return 0;
+}
+
+function crypto_scalarmult_base(q, n) {
+ return crypto_scalarmult(q, n, _9);
+}
+
+function crypto_box_keypair(y, x) {
+ randombytes(x, 32);
+ return crypto_scalarmult_base(y, x);
+}
+
+function crypto_box_beforenm(k, y, x) {
+ var s = new Uint8Array(32);
+ crypto_scalarmult(s, x, y);
+ return crypto_core_hsalsa20(k, _0, s, sigma);
+}
+
+var crypto_box_afternm = crypto_secretbox;
+var crypto_box_open_afternm = crypto_secretbox_open;
+
+function crypto_box(c, m, d, n, y, x) {
+ var k = new Uint8Array(32);
+ crypto_box_beforenm(k, y, x);
+ return crypto_box_afternm(c, m, d, n, k);
+}
+
+function crypto_box_open(m, c, d, n, y, x) {
+ var k = new Uint8Array(32);
+ crypto_box_beforenm(k, y, x);
+ return crypto_box_open_afternm(m, c, d, n, k);
+}
+
+var K = [
+ 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
+ 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
+ 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
+ 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
+ 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
+ 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
+ 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
+ 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
+ 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
+ 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
+ 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
+ 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
+ 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
+ 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
+ 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
+ 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
+ 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
+ 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
+ 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
+ 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
+ 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
+ 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
+ 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
+ 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
+ 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
+ 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
+ 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
+ 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
+ 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
+ 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
+ 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
+ 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
+ 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
+ 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
+ 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
+ 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
+ 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
+ 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
+ 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
+ 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
+];
+
+function crypto_hashblocks_hl(hh, hl, m, n) {
+ var wh = new Int32Array(16), wl = new Int32Array(16),
+ bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7,
+ bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7,
+ th, tl, i, j, h, l, a, b, c, d;
+
+ var ah0 = hh[0],
+ ah1 = hh[1],
+ ah2 = hh[2],
+ ah3 = hh[3],
+ ah4 = hh[4],
+ ah5 = hh[5],
+ ah6 = hh[6],
+ ah7 = hh[7],
+
+ al0 = hl[0],
+ al1 = hl[1],
+ al2 = hl[2],
+ al3 = hl[3],
+ al4 = hl[4],
+ al5 = hl[5],
+ al6 = hl[6],
+ al7 = hl[7];
+
+ var pos = 0;
+ while (n >= 128) {
+ for (i = 0; i < 16; i++) {
+ j = 8 * i + pos;
+ wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3];
+ wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7];
+ }
+ for (i = 0; i < 80; i++) {
+ bh0 = ah0;
+ bh1 = ah1;
+ bh2 = ah2;
+ bh3 = ah3;
+ bh4 = ah4;
+ bh5 = ah5;
+ bh6 = ah6;
+ bh7 = ah7;
+
+ bl0 = al0;
+ bl1 = al1;
+ bl2 = al2;
+ bl3 = al3;
+ bl4 = al4;
+ bl5 = al5;
+ bl6 = al6;
+ bl7 = al7;
+
+ // add
+ h = ah7;
+ l = al7;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ // Sigma1
+ h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32))));
+ l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32))));
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ // Ch
+ h = (ah4 & ah5) ^ (~ah4 & ah6);
+ l = (al4 & al5) ^ (~al4 & al6);
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ // K
+ h = K[i*2];
+ l = K[i*2+1];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ // w
+ h = wh[i%16];
+ l = wl[i%16];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ th = c & 0xffff | d << 16;
+ tl = a & 0xffff | b << 16;
+
+ // add
+ h = th;
+ l = tl;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ // Sigma0
+ h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32))));
+ l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32))));
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ // Maj
+ h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);
+ l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ bh7 = (c & 0xffff) | (d << 16);
+ bl7 = (a & 0xffff) | (b << 16);
+
+ // add
+ h = bh3;
+ l = bl3;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = th;
+ l = tl;
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ bh3 = (c & 0xffff) | (d << 16);
+ bl3 = (a & 0xffff) | (b << 16);
+
+ ah1 = bh0;
+ ah2 = bh1;
+ ah3 = bh2;
+ ah4 = bh3;
+ ah5 = bh4;
+ ah6 = bh5;
+ ah7 = bh6;
+ ah0 = bh7;
+
+ al1 = bl0;
+ al2 = bl1;
+ al3 = bl2;
+ al4 = bl3;
+ al5 = bl4;
+ al6 = bl5;
+ al7 = bl6;
+ al0 = bl7;
+
+ if (i%16 === 15) {
+ for (j = 0; j < 16; j++) {
+ // add
+ h = wh[j];
+ l = wl[j];
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = wh[(j+9)%16];
+ l = wl[(j+9)%16];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ // sigma0
+ th = wh[(j+1)%16];
+ tl = wl[(j+1)%16];
+ h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7);
+ l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7)));
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ // sigma1
+ th = wh[(j+14)%16];
+ tl = wl[(j+14)%16];
+ h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6);
+ l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6)));
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ wh[j] = (c & 0xffff) | (d << 16);
+ wl[j] = (a & 0xffff) | (b << 16);
+ }
+ }
+ }
+
+ // add
+ h = ah0;
+ l = al0;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[0];
+ l = hl[0];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[0] = ah0 = (c & 0xffff) | (d << 16);
+ hl[0] = al0 = (a & 0xffff) | (b << 16);
+
+ h = ah1;
+ l = al1;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[1];
+ l = hl[1];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[1] = ah1 = (c & 0xffff) | (d << 16);
+ hl[1] = al1 = (a & 0xffff) | (b << 16);
+
+ h = ah2;
+ l = al2;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[2];
+ l = hl[2];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[2] = ah2 = (c & 0xffff) | (d << 16);
+ hl[2] = al2 = (a & 0xffff) | (b << 16);
+
+ h = ah3;
+ l = al3;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[3];
+ l = hl[3];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[3] = ah3 = (c & 0xffff) | (d << 16);
+ hl[3] = al3 = (a & 0xffff) | (b << 16);
+
+ h = ah4;
+ l = al4;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[4];
+ l = hl[4];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[4] = ah4 = (c & 0xffff) | (d << 16);
+ hl[4] = al4 = (a & 0xffff) | (b << 16);
+
+ h = ah5;
+ l = al5;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[5];
+ l = hl[5];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[5] = ah5 = (c & 0xffff) | (d << 16);
+ hl[5] = al5 = (a & 0xffff) | (b << 16);
+
+ h = ah6;
+ l = al6;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[6];
+ l = hl[6];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[6] = ah6 = (c & 0xffff) | (d << 16);
+ hl[6] = al6 = (a & 0xffff) | (b << 16);
+
+ h = ah7;
+ l = al7;
+
+ a = l & 0xffff; b = l >>> 16;
+ c = h & 0xffff; d = h >>> 16;
+
+ h = hh[7];
+ l = hl[7];
+
+ a += l & 0xffff; b += l >>> 16;
+ c += h & 0xffff; d += h >>> 16;
+
+ b += a >>> 16;
+ c += b >>> 16;
+ d += c >>> 16;
+
+ hh[7] = ah7 = (c & 0xffff) | (d << 16);
+ hl[7] = al7 = (a & 0xffff) | (b << 16);
+
+ pos += 128;
+ n -= 128;
+ }
+
+ return n;
+}
+
+function crypto_hash(out, m, n) {
+ var hh = new Int32Array(8),
+ hl = new Int32Array(8),
+ x = new Uint8Array(256),
+ i, b = n;
+
+ hh[0] = 0x6a09e667;
+ hh[1] = 0xbb67ae85;
+ hh[2] = 0x3c6ef372;
+ hh[3] = 0xa54ff53a;
+ hh[4] = 0x510e527f;
+ hh[5] = 0x9b05688c;
+ hh[6] = 0x1f83d9ab;
+ hh[7] = 0x5be0cd19;
+
+ hl[0] = 0xf3bcc908;
+ hl[1] = 0x84caa73b;
+ hl[2] = 0xfe94f82b;
+ hl[3] = 0x5f1d36f1;
+ hl[4] = 0xade682d1;
+ hl[5] = 0x2b3e6c1f;
+ hl[6] = 0xfb41bd6b;
+ hl[7] = 0x137e2179;
+
+ crypto_hashblocks_hl(hh, hl, m, n);
+ n %= 128;
+
+ for (i = 0; i < n; i++) x[i] = m[b-n+i];
+ x[n] = 128;
+
+ n = 256-128*(n<112?1:0);
+ x[n-9] = 0;
+ ts64(x, n-8, (b / 0x20000000) | 0, b << 3);
+ crypto_hashblocks_hl(hh, hl, x, n);
+
+ for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]);
+
+ return 0;
+}
+
+function add(p, q) {
+ var a = gf(), b = gf(), c = gf(),
+ d = gf(), e = gf(), f = gf(),
+ g = gf(), h = gf(), t = gf();
+
+ Z(a, p[1], p[0]);
+ Z(t, q[1], q[0]);
+ M(a, a, t);
+ A(b, p[0], p[1]);
+ A(t, q[0], q[1]);
+ M(b, b, t);
+ M(c, p[3], q[3]);
+ M(c, c, D2);
+ M(d, p[2], q[2]);
+ A(d, d, d);
+ Z(e, b, a);
+ Z(f, d, c);
+ A(g, d, c);
+ A(h, b, a);
+
+ M(p[0], e, f);
+ M(p[1], h, g);
+ M(p[2], g, f);
+ M(p[3], e, h);
+}
+
+function cswap(p, q, b) {
+ var i;
+ for (i = 0; i < 4; i++) {
+ sel25519(p[i], q[i], b);
+ }
+}
+
+function pack(r, p) {
+ var tx = gf(), ty = gf(), zi = gf();
+ inv25519(zi, p[2]);
+ M(tx, p[0], zi);
+ M(ty, p[1], zi);
+ pack25519(r, ty);
+ r[31] ^= par25519(tx) << 7;
+}
+
+function scalarmult(p, q, s) {
+ var b, i;
+ set25519(p[0], gf0);
+ set25519(p[1], gf1);
+ set25519(p[2], gf1);
+ set25519(p[3], gf0);
+ for (i = 255; i >= 0; --i) {
+ b = (s[(i/8)|0] >> (i&7)) & 1;
+ cswap(p, q, b);
+ add(q, p);
+ add(p, p);
+ cswap(p, q, b);
+ }
+}
+
+function scalarbase(p, s) {
+ var q = [gf(), gf(), gf(), gf()];
+ set25519(q[0], X);
+ set25519(q[1], Y);
+ set25519(q[2], gf1);
+ M(q[3], X, Y);
+ scalarmult(p, q, s);
+}
+
+function crypto_sign_keypair(pk, sk, seeded) {
+ var d = new Uint8Array(64);
+ var p = [gf(), gf(), gf(), gf()];
+ var i;
+
+ if (!seeded) randombytes(sk, 32);
+ crypto_hash(d, sk, 32);
+ d[0] &= 248;
+ d[31] &= 127;
+ d[31] |= 64;
+
+ scalarbase(p, d);
+ pack(pk, p);
+
+ for (i = 0; i < 32; i++) sk[i+32] = pk[i];
+ return 0;
+}
+
+var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]);
+
+function modL(r, x) {
+ var carry, i, j, k;
+ for (i = 63; i >= 32; --i) {
+ carry = 0;
+ for (j = i - 32, k = i - 12; j < k; ++j) {
+ x[j] += carry - 16 * x[i] * L[j - (i - 32)];
+ carry = (x[j] + 128) >> 8;
+ x[j] -= carry * 256;
+ }
+ x[j] += carry;
+ x[i] = 0;
+ }
+ carry = 0;
+ for (j = 0; j < 32; j++) {
+ x[j] += carry - (x[31] >> 4) * L[j];
+ carry = x[j] >> 8;
+ x[j] &= 255;
+ }
+ for (j = 0; j < 32; j++) x[j] -= carry * L[j];
+ for (i = 0; i < 32; i++) {
+ x[i+1] += x[i] >> 8;
+ r[i] = x[i] & 255;
+ }
+}
+
+function reduce(r) {
+ var x = new Float64Array(64), i;
+ for (i = 0; i < 64; i++) x[i] = r[i];
+ for (i = 0; i < 64; i++) r[i] = 0;
+ modL(r, x);
+}
+
+// Note: difference from C - smlen returned, not passed as argument.
+function crypto_sign(sm, m, n, sk) {
+ var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64);
+ var i, j, x = new Float64Array(64);
+ var p = [gf(), gf(), gf(), gf()];
+
+ crypto_hash(d, sk, 32);
+ d[0] &= 248;
+ d[31] &= 127;
+ d[31] |= 64;
+
+ var smlen = n + 64;
+ for (i = 0; i < n; i++) sm[64 + i] = m[i];
+ for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i];
+
+ crypto_hash(r, sm.subarray(32), n+32);
+ reduce(r);
+ scalarbase(p, r);
+ pack(sm, p);
+
+ for (i = 32; i < 64; i++) sm[i] = sk[i];
+ crypto_hash(h, sm, n + 64);
+ reduce(h);
+
+ for (i = 0; i < 64; i++) x[i] = 0;
+ for (i = 0; i < 32; i++) x[i] = r[i];
+ for (i = 0; i < 32; i++) {
+ for (j = 0; j < 32; j++) {
+ x[i+j] += h[i] * d[j];
+ }
+ }
+
+ modL(sm.subarray(32), x);
+ return smlen;
+}
+
+function unpackneg(r, p) {
+ var t = gf(), chk = gf(), num = gf(),
+ den = gf(), den2 = gf(), den4 = gf(),
+ den6 = gf();
+
+ set25519(r[2], gf1);
+ unpack25519(r[1], p);
+ S(num, r[1]);
+ M(den, num, D);
+ Z(num, num, r[2]);
+ A(den, r[2], den);
+
+ S(den2, den);
+ S(den4, den2);
+ M(den6, den4, den2);
+ M(t, den6, num);
+ M(t, t, den);
+
+ pow2523(t, t);
+ M(t, t, num);
+ M(t, t, den);
+ M(t, t, den);
+ M(r[0], t, den);
+
+ S(chk, r[0]);
+ M(chk, chk, den);
+ if (neq25519(chk, num)) M(r[0], r[0], I);
+
+ S(chk, r[0]);
+ M(chk, chk, den);
+ if (neq25519(chk, num)) return -1;
+
+ if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]);
+
+ M(r[3], r[0], r[1]);
+ return 0;
+}
+
+function crypto_sign_open(m, sm, n, pk) {
+ var i, mlen;
+ var t = new Uint8Array(32), h = new Uint8Array(64);
+ var p = [gf(), gf(), gf(), gf()],
+ q = [gf(), gf(), gf(), gf()];
+
+ mlen = -1;
+ if (n < 64) return -1;
+
+ if (unpackneg(q, pk)) return -1;
+
+ for (i = 0; i < n; i++) m[i] = sm[i];
+ for (i = 0; i < 32; i++) m[i+32] = pk[i];
+ crypto_hash(h, m, n);
+ reduce(h);
+ scalarmult(p, q, h);
+
+ scalarbase(q, sm.subarray(32));
+ add(p, q);
+ pack(t, p);
+
+ n -= 64;
+ if (crypto_verify_32(sm, 0, t, 0)) {
+ for (i = 0; i < n; i++) m[i] = 0;
+ return -1;
+ }
+
+ for (i = 0; i < n; i++) m[i] = sm[i + 64];
+ mlen = n;
+ return mlen;
+}
+
+var crypto_secretbox_KEYBYTES = 32,
+ crypto_secretbox_NONCEBYTES = 24,
+ crypto_secretbox_ZEROBYTES = 32,
+ crypto_secretbox_BOXZEROBYTES = 16,
+ crypto_scalarmult_BYTES = 32,
+ crypto_scalarmult_SCALARBYTES = 32,
+ crypto_box_PUBLICKEYBYTES = 32,
+ crypto_box_SECRETKEYBYTES = 32,
+ crypto_box_BEFORENMBYTES = 32,
+ crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES,
+ crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES,
+ crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES,
+ crypto_sign_BYTES = 64,
+ crypto_sign_PUBLICKEYBYTES = 32,
+ crypto_sign_SECRETKEYBYTES = 64,
+ crypto_sign_SEEDBYTES = 32,
+ crypto_hash_BYTES = 64;
+
+nacl.lowlevel = {
+ crypto_core_hsalsa20: crypto_core_hsalsa20,
+ crypto_stream_xor: crypto_stream_xor,
+ crypto_stream: crypto_stream,
+ crypto_stream_salsa20_xor: crypto_stream_salsa20_xor,
+ crypto_stream_salsa20: crypto_stream_salsa20,
+ crypto_onetimeauth: crypto_onetimeauth,
+ crypto_onetimeauth_verify: crypto_onetimeauth_verify,
+ crypto_verify_16: crypto_verify_16,
+ crypto_verify_32: crypto_verify_32,
+ crypto_secretbox: crypto_secretbox,
+ crypto_secretbox_open: crypto_secretbox_open,
+ crypto_scalarmult: crypto_scalarmult,
+ crypto_scalarmult_base: crypto_scalarmult_base,
+ crypto_box_beforenm: crypto_box_beforenm,
+ crypto_box_afternm: crypto_box_afternm,
+ crypto_box: crypto_box,
+ crypto_box_open: crypto_box_open,
+ crypto_box_keypair: crypto_box_keypair,
+ crypto_hash: crypto_hash,
+ crypto_sign: crypto_sign,
+ crypto_sign_keypair: crypto_sign_keypair,
+ crypto_sign_open: crypto_sign_open,
+
+ crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES,
+ crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES,
+ crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES,
+ crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES,
+ crypto_scalarmult_BYTES: crypto_scalarmult_BYTES,
+ crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES,
+ crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES,
+ crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES,
+ crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES,
+ crypto_box_NONCEBYTES: crypto_box_NONCEBYTES,
+ crypto_box_ZEROBYTES: crypto_box_ZEROBYTES,
+ crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES,
+ crypto_sign_BYTES: crypto_sign_BYTES,
+ crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES,
+ crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES,
+ crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES,
+ crypto_hash_BYTES: crypto_hash_BYTES
+};
+
+/* High-level API */
+
+function checkLengths(k, n) {
+ if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size');
+ if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size');
+}
+
+function checkBoxLengths(pk, sk) {
+ if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size');
+ if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size');
+}
+
+function checkArrayTypes() {
+ var t, i;
+ for (i = 0; i < arguments.length; i++) {
+ if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]')
+ throw new TypeError('unexpected type ' + t + ', use Uint8Array');
+ }
+}
+
+function cleanup(arr) {
+ for (var i = 0; i < arr.length; i++) arr[i] = 0;
+}
+
+// TODO: Completely remove this in v0.15.
+if (!nacl.util) {
+ nacl.util = {};
+ nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
+ throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
+ };
+}
+
+nacl.randomBytes = function(n) {
+ var b = new Uint8Array(n);
+ randombytes(b, n);
+ return b;
+};
+
+nacl.secretbox = function(msg, nonce, key) {
+ checkArrayTypes(msg, nonce, key);
+ checkLengths(key, nonce);
+ var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length);
+ var c = new Uint8Array(m.length);
+ for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i];
+ crypto_secretbox(c, m, m.length, nonce, key);
+ return c.subarray(crypto_secretbox_BOXZEROBYTES);
+};
+
+nacl.secretbox.open = function(box, nonce, key) {
+ checkArrayTypes(box, nonce, key);
+ checkLengths(key, nonce);
+ var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length);
+ var m = new Uint8Array(c.length);
+ for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i];
+ if (c.length < 32) return false;
+ if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false;
+ return m.subarray(crypto_secretbox_ZEROBYTES);
+};
+
+nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES;
+nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES;
+nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES;
+
+nacl.scalarMult = function(n, p) {
+ checkArrayTypes(n, p);
+ if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
+ if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size');
+ var q = new Uint8Array(crypto_scalarmult_BYTES);
+ crypto_scalarmult(q, n, p);
+ return q;
+};
+
+nacl.scalarMult.base = function(n) {
+ checkArrayTypes(n);
+ if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
+ var q = new Uint8Array(crypto_scalarmult_BYTES);
+ crypto_scalarmult_base(q, n);
+ return q;
+};
+
+nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES;
+nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES;
+
+nacl.box = function(msg, nonce, publicKey, secretKey) {
+ var k = nacl.box.before(publicKey, secretKey);
+ return nacl.secretbox(msg, nonce, k);
+};
+
+nacl.box.before = function(publicKey, secretKey) {
+ checkArrayTypes(publicKey, secretKey);
+ checkBoxLengths(publicKey, secretKey);
+ var k = new Uint8Array(crypto_box_BEFORENMBYTES);
+ crypto_box_beforenm(k, publicKey, secretKey);
+ return k;
+};
+
+nacl.box.after = nacl.secretbox;
+
+nacl.box.open = function(msg, nonce, publicKey, secretKey) {
+ var k = nacl.box.before(publicKey, secretKey);
+ return nacl.secretbox.open(msg, nonce, k);
+};
+
+nacl.box.open.after = nacl.secretbox.open;
+
+nacl.box.keyPair = function() {
+ var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
+ var sk = new Uint8Array(crypto_box_SECRETKEYBYTES);
+ crypto_box_keypair(pk, sk);
+ return {publicKey: pk, secretKey: sk};
+};
+
+nacl.box.keyPair.fromSecretKey = function(secretKey) {
+ checkArrayTypes(secretKey);
+ if (secretKey.length !== crypto_box_SECRETKEYBYTES)
+ throw new Error('bad secret key size');
+ var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
+ crypto_scalarmult_base(pk, secretKey);
+ return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
+};
+
+nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES;
+nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES;
+nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES;
+nacl.box.nonceLength = crypto_box_NONCEBYTES;
+nacl.box.overheadLength = nacl.secretbox.overheadLength;
+
+nacl.sign = function(msg, secretKey) {
+ checkArrayTypes(msg, secretKey);
+ if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
+ throw new Error('bad secret key size');
+ var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length);
+ crypto_sign(signedMsg, msg, msg.length, secretKey);
+ return signedMsg;
+};
+
+nacl.sign.open = function(signedMsg, publicKey) {
+ if (arguments.length !== 2)
+ throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?');
+ checkArrayTypes(signedMsg, publicKey);
+ if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
+ throw new Error('bad public key size');
+ var tmp = new Uint8Array(signedMsg.length);
+ var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey);
+ if (mlen < 0) return null;
+ var m = new Uint8Array(mlen);
+ for (var i = 0; i < m.length; i++) m[i] = tmp[i];
+ return m;
+};
+
+nacl.sign.detached = function(msg, secretKey) {
+ var signedMsg = nacl.sign(msg, secretKey);
+ var sig = new Uint8Array(crypto_sign_BYTES);
+ for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i];
+ return sig;
+};
+
+nacl.sign.detached.verify = function(msg, sig, publicKey) {
+ checkArrayTypes(msg, sig, publicKey);
+ if (sig.length !== crypto_sign_BYTES)
+ throw new Error('bad signature size');
+ if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
+ throw new Error('bad public key size');
+ var sm = new Uint8Array(crypto_sign_BYTES + msg.length);
+ var m = new Uint8Array(crypto_sign_BYTES + msg.length);
+ var i;
+ for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i];
+ for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i];
+ return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0);
+};
+
+nacl.sign.keyPair = function() {
+ var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
+ var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
+ crypto_sign_keypair(pk, sk);
+ return {publicKey: pk, secretKey: sk};
+};
+
+nacl.sign.keyPair.fromSecretKey = function(secretKey) {
+ checkArrayTypes(secretKey);
+ if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
+ throw new Error('bad secret key size');
+ var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
+ for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i];
+ return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
+};
+
+nacl.sign.keyPair.fromSeed = function(seed) {
+ checkArrayTypes(seed);
+ if (seed.length !== crypto_sign_SEEDBYTES)
+ throw new Error('bad seed size');
+ var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
+ var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
+ for (var i = 0; i < 32; i++) sk[i] = seed[i];
+ crypto_sign_keypair(pk, sk, true);
+ return {publicKey: pk, secretKey: sk};
+};
+
+nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES;
+nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES;
+nacl.sign.seedLength = crypto_sign_SEEDBYTES;
+nacl.sign.signatureLength = crypto_sign_BYTES;
+
+nacl.hash = function(msg) {
+ checkArrayTypes(msg);
+ var h = new Uint8Array(crypto_hash_BYTES);
+ crypto_hash(h, msg, msg.length);
+ return h;
+};
+
+nacl.hash.hashLength = crypto_hash_BYTES;
+
+nacl.verify = function(x, y) {
+ checkArrayTypes(x, y);
+ // Zero length arguments are considered not equal.
+ if (x.length === 0 || y.length === 0) return false;
+ if (x.length !== y.length) return false;
+ return (vn(x, 0, y, 0, x.length) === 0) ? true : false;
+};
+
+nacl.setPRNG = function(fn) {
+ randombytes = fn;
+};
+
+(function() {
+ // Initialize PRNG if environment provides CSPRNG.
+ // If not, methods calling randombytes will throw.
+ var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
+ if (crypto && crypto.getRandomValues) {
+ // Browsers.
+ var QUOTA = 65536;
+ nacl.setPRNG(function(x, n) {
+ var i, v = new Uint8Array(n);
+ for (i = 0; i < n; i += QUOTA) {
+ crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
+ }
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
+ } else if (typeof require !== 'undefined') {
+ // Node.js.
+ crypto = require('crypto');
+ if (crypto && crypto.randomBytes) {
+ nacl.setPRNG(function(x, n) {
+ var i, v = crypto.randomBytes(n);
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
+ }
+ }
+})();
+
+})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
diff --git a/node_modules/tweetnacl/nacl-fast.min.js b/node_modules/tweetnacl/nacl-fast.min.js
new file mode 100644
index 0000000..8bc47da
--- /dev/null
+++ b/node_modules/tweetnacl/nacl-fast.min.js
@@ -0,0 +1,2 @@
+!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;i<o;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+c|0,B=B+u|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=P>>>0&255,r[13]=P>>>8&255,r[14]=P>>>16&255,r[15]=P>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,c=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=i[s];for(;o>=64;){for(a(u,c,h,ur),s=0;s<64;s++)r[t+s]=n[e+s]^u[s];for(f=1,s=8;s<16;s++)f=f+(255&c[s])|0,c[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(u,c,h,ur),s=0;s<o;s++)r[t+s]=n[e+s]^u[s];return 0}function c(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;h<16;h++)f[h]=0;for(h=0;h<8;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,ur),h=0;h<64;h++)r[t+h]=s[h];for(i=1,h=8;h<16;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,ur),h=0;h<n;h++)r[t+h]=s[h];return 0}function u(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,ur);for(var h=new Uint8Array(8),a=0;a<8;a++)h[a]=e[a+16];return c(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,ur);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return s(r,t,n,e,o,c,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(n<32)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;i<16;i++)r[i]=0;return 0}function v(r,t,n,e,o){var i,h=new Uint8Array(32);if(n<32)return-1;if(u(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;i<32;i++)r[i]=0;return 0}function b(r,t){var n;for(n=0;n<16;n++)r[n]=0|t[n]}function g(r){var t,n,e=1;for(t=0;t<16;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function _(r,t,n){for(var e,o=~(n-1),i=0;i<16;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;n<16;n++)h[n]=t[n];for(g(h),g(h),g(h),e=0;e<2;e++){for(i[0]=h[0]-65517,n=1;n<15;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;n<16;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,c=0,u=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z=0,R=0,P=n[0],O=n[1],N=n[2],C=n[3],F=n[4],I=n[5],G=n[6],Z=n[7],j=n[8],q=n[9],V=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*P,h+=e*O,a+=e*N,f+=e*C,s+=e*F,c+=e*I,u+=e*G,y+=e*Z,l+=e*j,w+=e*q,p+=e*V,v+=e*X,b+=e*D,g+=e*H,_+=e*J,A+=e*Q,e=t[1],h+=e*P,a+=e*O,f+=e*N,s+=e*C,c+=e*F,u+=e*I,y+=e*G,l+=e*Z,w+=e*j,p+=e*q,v+=e*V,b+=e*X,g+=e*D,_+=e*H,A+=e*J,d+=e*Q,e=t[2],a+=e*P,f+=e*O,s+=e*N,c+=e*C,u+=e*F,y+=e*I,l+=e*G,w+=e*Z,p+=e*j,v+=e*q,b+=e*V,g+=e*X,_+=e*D,A+=e*H,d+=e*J,U+=e*Q,e=t[3],f+=e*P,s+=e*O,c+=e*N,u+=e*C,y+=e*F,l+=e*I,w+=e*G,p+=e*Z,v+=e*j,b+=e*q,g+=e*V,_+=e*X,A+=e*D,d+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*P,c+=e*O,u+=e*N,y+=e*C,l+=e*F,w+=e*I,p+=e*G,v+=e*Z,b+=e*j,g+=e*q,_+=e*V,A+=e*X,d+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],c+=e*P,u+=e*O,y+=e*N,l+=e*C,w+=e*F,p+=e*I,v+=e*G,b+=e*Z,g+=e*j,_+=e*q,A+=e*V,d+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],u+=e*P,y+=e*O,l+=e*N,w+=e*C,p+=e*F,v+=e*I,b+=e*G,g+=e*Z,_+=e*j,A+=e*q,d+=e*V,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*P,l+=e*O,w+=e*N,p+=e*C,v+=e*F,b+=e*I,g+=e*G,_+=e*Z,A+=e*j,d+=e*q,U+=e*V,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*P,w+=e*O,p+=e*N,v+=e*C,b+=e*F,g+=e*I,_+=e*G,A+=e*Z,d+=e*j,U+=e*q,E+=e*V,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*P,p+=e*O,v+=e*N,b+=e*C,g+=e*F,_+=e*I,A+=e*G,d+=e*Z,U+=e*j,E+=e*q,x+=e*V,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*P,v+=e*O,b+=e*N,g+=e*C,_+=e*F,A+=e*I,d+=e*G,U+=e*Z,E+=e*j,x+=e*q,M+=e*V,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],v+=e*P,b+=e*O,g+=e*N,_+=e*C,A+=e*F,d+=e*I,U+=e*G,E+=e*Z,x+=e*j,M+=e*q,m+=e*V,B+=e*X;S+=e*D;K+=e*H,T+=e*J,Y+=e*Q,e=t[12],b+=e*P,g+=e*O,_+=e*N,A+=e*C,d+=e*F,U+=e*I,E+=e*G,x+=e*Z,M+=e*j,m+=e*q,B+=e*V,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],g+=e*P,_+=e*O,A+=e*N,d+=e*C,U+=e*F,E+=e*I,x+=e*G,M+=e*Z,m+=e*j,B+=e*q,S+=e*V,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],_+=e*P,A+=e*O,d+=e*N,U+=e*C,E+=e*F,x+=e*I,M+=e*G,m+=e*Z,B+=e*j,S+=e*q,K+=e*V,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,z+=e*Q,e=t[15],A+=e*P,d+=e*O,U+=e*N,E+=e*C,x+=e*F,M+=e*I,m+=e*G,B+=e*Z,S+=e*j,K+=e*q,T+=e*V,Y+=e*X,k+=e*D,L+=e*H,z+=e*J,R+=e*Q,i+=38*d,h+=38*U,a+=38*E,f+=38*x,s+=38*M,c+=38*m,u+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=c,r[6]=u,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g;r[14]=_;r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),c=$(),u=$(),y=$();for(o=0;o<31;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;o<16;o++)f[o]=h[o],c[o]=a[o]=s[o]=0;for(a[0]=c[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,c,e),x(u,a,s),M(a,a,s),x(s,f,c),M(f,f,c),B(c,u),B(y,a),m(a,s,a),m(s,f,u),x(u,a,s),M(a,a,s),B(f,a),M(s,c,y),m(a,s,ir),x(a,a,c),m(s,s,a),m(a,c,y),m(c,f,h),B(f,u),_(a,f,e),_(s,c,e);for(o=0;o<16;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=c[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,ur)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;U<16;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;U<80;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,c=N,u=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,u=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=c,k=u,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;E<16;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;o<e;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(e<112?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),P(i,h,a,e),o=0;o<8;o++)t(r,8*o,i[o],h[o]);return 0}function N(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),c=$();M(n,r[1],r[0]),M(c,t[1],t[0]),m(n,n,c),x(e,r[0],r[1]),x(c,t[0],t[1]),m(e,e,c),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function C(r,t,n){var e;for(e=0;e<4;e++)_(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(b(r[0],er),b(r[1],or),b(r[2],or),b(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;e<32;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o<i;++o)t[o]+=n-16*t[e]*vr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*vr[o];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=r[t];for(t=0;t<64;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),c=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var u=n+64;for(o=0;o<n;o++)r[64+o]=t[o];for(o=0;o<32;o++)r[32+o]=h[32+o];for(O(f,r.subarray(32),n+32),q(f),G(c,f),F(r,c),o=32;o<64;o++)r[o]=e[o];for(O(a,r,n+64),q(a),o=0;o<64;o++)s[o]=0;for(o=0;o<32;o++)s[o]=f[o];for(o=0;o<32;o++)for(i=0;i<32;i++)s[o+i]+=a[o]*h[i];return j(r.subarray(32),s),u}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return b(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),d(e,o)&&m(r[0],r[0],cr),B(e,r[0]),m(e,e,i),d(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],c=[$(),$(),$(),$()];if(h=-1,n<64)return-1;if(X(c,e))return-1;for(i=0;i<n;i++)r[i]=t[i];for(i=0;i<32;i++)r[i+32]=e[i];if(O(f,r,n),q(f),I(s,c,f),G(c,t.subarray(32)),N(s,c),F(a,s),n-=64,o(t,0,a,0)){for(i=0;i<n;i++)r[i]=0;return-1}for(i=0;i<n;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==br)throw new Error("bad key size");if(t.length!==gr)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function W(r){for(var t=0;t<r.length;t++)r[t]=0}var $=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},rr=function(){throw new Error("no PRNG")},tr=new Uint8Array(16),nr=new Uint8Array(32);nr[0]=9;var er=$(),or=$([1]),ir=$([56129,1]),hr=$([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),ar=$([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),fr=$([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),sr=$([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),cr=$([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),ur=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),yr=function(r){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t,n,e,o,i,h,a,f;t=255&r[0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),c=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|c<<8),k+=c>>>5|U,u=0,y=u,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),u=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),u+=y>>>13,y&=8191,l=u,l+=E*z,l+=x*L,l+=M*(5*G),l+=m*(5*I),l+=B*(5*F),u=l>>>13,l&=8191,l+=S*(5*C),l+=K*(5*N),l+=T*(5*O),l+=Y*(5*P),l+=k*(5*R),u+=l>>>13,l&=8191,w=u,w+=E*R,w+=x*z,w+=M*L,w+=m*(5*G),w+=B*(5*I),u=w>>>13,w&=8191,w+=S*(5*F),w+=K*(5*C),w+=T*(5*N),w+=Y*(5*O),w+=k*(5*P),u+=w>>>13,w&=8191,p=u,p+=E*P,p+=x*R,p+=M*z,p+=m*L,p+=B*(5*G),u=p>>>13,p&=8191,p+=S*(5*I),p+=K*(5*F),p+=T*(5*C),p+=Y*(5*N),p+=k*(5*O),u+=p>>>13,p&=8191,v=u,v+=E*O,v+=x*P,v+=M*R,v+=m*z,v+=B*L,u=v>>>13,v&=8191,v+=S*(5*G),v+=K*(5*I),v+=T*(5*F),v+=Y*(5*C),v+=k*(5*N),u+=v>>>13,v&=8191,b=u,b+=E*N,b+=x*O,b+=M*P,b+=m*R,b+=B*z,u=b>>>13,b&=8191,b+=S*L,b+=K*(5*G),b+=T*(5*I),b+=Y*(5*F),b+=k*(5*C),u+=b>>>13,b&=8191,g=u,g+=E*C,g+=x*N,g+=M*O,g+=m*P,g+=B*R,u=g>>>13,g&=8191,g+=S*z,g+=K*L,g+=T*(5*G),g+=Y*(5*I),g+=k*(5*F),u+=g>>>13,g&=8191,_=u,_+=E*F,_+=x*C,_+=M*N,_+=m*O,_+=B*P,u=_>>>13,_&=8191,_+=S*R,_+=K*z,_+=T*L,_+=Y*(5*G),_+=k*(5*I),u+=_>>>13,_&=8191,A=u,A+=E*I,A+=x*F,A+=M*C,A+=m*N,A+=B*O,u=A>>>13,A&=8191,A+=S*P,A+=K*R,A+=T*z,A+=Y*L,A+=k*(5*G),u+=A>>>13,A&=8191,d=u,d+=E*G,d+=x*I,d+=M*F,d+=m*C,d+=B*N,u=d>>>13,d&=8191,d+=S*O,d+=K*P,d+=T*R,d+=Y*z,d+=k*L,u+=d>>>13,d&=8191,u=(u<<2)+u|0,u=u+y|0,y=8191&u,u>>>=13,l+=u,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;e<o;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;e<n;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=v,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],vr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),br=32,gr=24,_r=32,Ar=16,dr=32,Ur=32,Er=32,xr=32,Mr=32,mr=gr,Br=_r,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:u,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:c,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:v,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:z,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:O,crypto_sign:V,crypto_sign_keypair:Z,crypto_sign_open:D,crypto_secretbox_KEYBYTES:br,crypto_secretbox_NONCEBYTES:gr,crypto_secretbox_ZEROBYTES:_r,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:dr,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var t=new Uint8Array(r);return rr(t,r),t},r.secretbox=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(_r+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+_r]=r[i];return p(o,e,e.length,t,n),o.subarray(Ar)},r.secretbox.open=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(Ar+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+Ar]=r[i];return!(e.length<32)&&(0===v(o,e,e.length,t,n)&&o.subarray(_r))},r.secretbox.keyLength=br,r.secretbox.nonceLength=gr,r.secretbox.overheadLength=Ar,r.scalarMult=function(r,t){if(Q(r,t),r.length!==Ur)throw new Error("bad n size");if(t.length!==dr)throw new Error("bad p size");var n=new Uint8Array(dr);return T(n,r,t),n},r.scalarMult.base=function(r){if(Q(r),r.length!==Ur)throw new Error("bad n size");var t=new Uint8Array(dr);return Y(t,r),t},r.scalarMult.scalarLength=Ur,r.scalarMult.groupElementLength=dr,r.box=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox(t,n,i)},r.box.before=function(r,t){Q(r,t),J(r,t);var n=new Uint8Array(Mr);return L(n,r,t),n},r.box.after=r.secretbox,r.box.open=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox.open(t,n,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Er),t=new Uint8Array(xr);return k(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==xr)throw new Error("bad secret key size");var t=new Uint8Array(Er);return Y(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Er,r.box.secretKeyLength=xr,r.box.sharedKeyLength=Mr,r.box.nonceLength=mr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(Q(r,t),t.length!==Yr)throw new Error("bad secret key size");var n=new Uint8Array(Kr+r.length);return V(n,r,r.length,t),n},r.sign.open=function(r,t){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Q(r,t),t.length!==Tr)throw new Error("bad public key size");var n=new Uint8Array(r.length),e=D(n,r,r.length,t);if(e<0)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},r.sign.detached=function(t,n){for(var e=r.sign(t,n),o=new Uint8Array(Kr),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached.verify=function(r,t,n){if(Q(r,t,n),t.length!==Kr)throw new Error("bad signature size");if(n.length!==Tr)throw new Error("bad public key size");var e,o=new Uint8Array(Kr+r.length),i=new Uint8Array(Kr+r.length);for(e=0;e<Kr;e++)o[e]=t[e];for(e=0;e<r.length;e++)o[e+Kr]=r[e];return D(i,o,o.length,n)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(Q(r),r.length!==kr)throw new Error("bad seed size");for(var t=new Uint8Array(Tr),n=new Uint8Array(Yr),e=0;e<32;e++)n[e]=r[e];return Z(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return O(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),
+0!==r.length&&0!==t.length&&(r.length===t.length&&0===n(r,0,t,0,r.length))},r.setPRNG=function(r){rr=r},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){var n=65536;r.setPRNG(function(r,e){var o,i=new Uint8Array(e);for(o=0;o<e;o+=n)t.getRandomValues(i.subarray(o,o+Math.min(e-o,n)));for(o=0;o<e;o++)r[o]=i[o];W(i)})}else"undefined"!=typeof require&&(t=require("crypto"),t&&t.randomBytes&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;e<n;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file
diff --git a/node_modules/tweetnacl/nacl.d.ts b/node_modules/tweetnacl/nacl.d.ts
new file mode 100644
index 0000000..964e7dc
--- /dev/null
+++ b/node_modules/tweetnacl/nacl.d.ts
@@ -0,0 +1,98 @@
+// Type definitions for TweetNaCl.js
+
+export as namespace nacl;
+
+declare var nacl: nacl;
+export = nacl;
+
+declare namespace nacl {
+ export interface BoxKeyPair {
+ publicKey: Uint8Array;
+ secretKey: Uint8Array;
+ }
+
+ export interface SignKeyPair {
+ publicKey: Uint8Array;
+ secretKey: Uint8Array;
+ }
+
+ export interface secretbox {
+ (msg: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;
+ open(box: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array | false;
+ readonly keyLength: number;
+ readonly nonceLength: number;
+ readonly overheadLength: number;
+ }
+
+ export interface scalarMult {
+ (n: Uint8Array, p: Uint8Array): Uint8Array;
+ base(n: Uint8Array): Uint8Array;
+ readonly scalarLength: number;
+ readonly groupElementLength: number;
+ }
+
+ namespace box {
+ export interface open {
+ (msg: Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, secretKey: Uint8Array): Uint8Array | false;
+ after(box: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array | false;
+ }
+
+ export interface keyPair {
+ (): BoxKeyPair;
+ fromSecretKey(secretKey: Uint8Array): BoxKeyPair;
+ }
+ }
+
+ export interface box {
+ (msg: Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, secretKey: Uint8Array): Uint8Array;
+ before(publicKey: Uint8Array, secretKey: Uint8Array): Uint8Array;
+ after(msg: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;
+ open: box.open;
+ keyPair: box.keyPair;
+ readonly publicKeyLength: number;
+ readonly secretKeyLength: number;
+ readonly sharedKeyLength: number;
+ readonly nonceLength: number;
+ readonly overheadLength: number;
+ }
+
+ namespace sign {
+ export interface detached {
+ (msg: Uint8Array, secretKey: Uint8Array): Uint8Array;
+ verify(msg: Uint8Array, sig: Uint8Array, publicKey: Uint8Array): boolean;
+ }
+
+ export interface keyPair {
+ (): SignKeyPair;
+ fromSecretKey(secretKey: Uint8Array): SignKeyPair;
+ fromSeed(secretKey: Uint8Array): SignKeyPair;
+ }
+ }
+
+ export interface sign {
+ (msg: Uint8Array, secretKey: Uint8Array): Uint8Array;
+ open(signedMsg: Uint8Array, publicKey: Uint8Array): Uint8Array | null;
+ detached: sign.detached;
+ keyPair: sign.keyPair;
+ readonly publicKeyLength: number;
+ readonly secretKeyLength: number;
+ readonly seedLength: number;
+ readonly signatureLength: number;
+ }
+
+ export interface hash {
+ (msg: Uint8Array): Uint8Array;
+ readonly hashLength: number;
+ }
+}
+
+declare interface nacl {
+ randomBytes(n: number): Uint8Array;
+ secretbox: nacl.secretbox;
+ scalarMult: nacl.scalarMult;
+ box: nacl.box;
+ sign: nacl.sign;
+ hash: nacl.hash;
+ verify(x: Uint8Array, y: Uint8Array): boolean;
+ setPRNG(fn: (x: Uint8Array, n: number) => void): void;
+}
diff --git a/node_modules/tweetnacl/nacl.js b/node_modules/tweetnacl/nacl.js
new file mode 100644
index 0000000..f72dd78
--- /dev/null
+++ b/node_modules/tweetnacl/nacl.js
@@ -0,0 +1,1175 @@
+(function(nacl) {
+'use strict';
+
+// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri.
+// Public domain.
+//
+// Implementation derived from TweetNaCl version 20140427.
+// See for details: http://tweetnacl.cr.yp.to/
+
+var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; };
+var gf = function(init) {
+ var i, r = new Float64Array(16);
+ if (init) for (i = 0; i < init.length; i++) r[i] = init[i];
+ return r;
+};
+
+// Pluggable, initialized in high-level API below.
+var randombytes = function(/* x, n */) { throw new Error('no PRNG'); };
+
+var _0 = new Uint8Array(16);
+var _9 = new Uint8Array(32); _9[0] = 9;
+
+var gf0 = gf(),
+ gf1 = gf([1]),
+ _121665 = gf([0xdb41, 1]),
+ D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]),
+ D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]),
+ X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]),
+ Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]),
+ I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]);
+
+function L32(x, c) { return (x << c) | (x >>> (32 - c)); }
+
+function ld32(x, i) {
+ var u = x[i+3] & 0xff;
+ u = (u<<8)|(x[i+2] & 0xff);
+ u = (u<<8)|(x[i+1] & 0xff);
+ return (u<<8)|(x[i+0] & 0xff);
+}
+
+function dl64(x, i) {
+ var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3];
+ var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7];
+ return new u64(h, l);
+}
+
+function st32(x, j, u) {
+ var i;
+ for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; }
+}
+
+function ts64(x, i, u) {
+ x[i] = (u.hi >> 24) & 0xff;
+ x[i+1] = (u.hi >> 16) & 0xff;
+ x[i+2] = (u.hi >> 8) & 0xff;
+ x[i+3] = u.hi & 0xff;
+ x[i+4] = (u.lo >> 24) & 0xff;
+ x[i+5] = (u.lo >> 16) & 0xff;
+ x[i+6] = (u.lo >> 8) & 0xff;
+ x[i+7] = u.lo & 0xff;
+}
+
+function vn(x, xi, y, yi, n) {
+ var i,d = 0;
+ for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i];
+ return (1 & ((d - 1) >>> 8)) - 1;
+}
+
+function crypto_verify_16(x, xi, y, yi) {
+ return vn(x,xi,y,yi,16);
+}
+
+function crypto_verify_32(x, xi, y, yi) {
+ return vn(x,xi,y,yi,32);
+}
+
+function core(out,inp,k,c,h) {
+ var w = new Uint32Array(16), x = new Uint32Array(16),
+ y = new Uint32Array(16), t = new Uint32Array(4);
+ var i, j, m;
+
+ for (i = 0; i < 4; i++) {
+ x[5*i] = ld32(c, 4*i);
+ x[1+i] = ld32(k, 4*i);
+ x[6+i] = ld32(inp, 4*i);
+ x[11+i] = ld32(k, 16+4*i);
+ }
+
+ for (i = 0; i < 16; i++) y[i] = x[i];
+
+ for (i = 0; i < 20; i++) {
+ for (j = 0; j < 4; j++) {
+ for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16];
+ t[1] ^= L32((t[0]+t[3])|0, 7);
+ t[2] ^= L32((t[1]+t[0])|0, 9);
+ t[3] ^= L32((t[2]+t[1])|0,13);
+ t[0] ^= L32((t[3]+t[2])|0,18);
+ for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m];
+ }
+ for (m = 0; m < 16; m++) x[m] = w[m];
+ }
+
+ if (h) {
+ for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0;
+ for (i = 0; i < 4; i++) {
+ x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0;
+ x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0;
+ }
+ for (i = 0; i < 4; i++) {
+ st32(out,4*i,x[5*i]);
+ st32(out,16+4*i,x[6+i]);
+ }
+ } else {
+ for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0);
+ }
+}
+
+function crypto_core_salsa20(out,inp,k,c) {
+ core(out,inp,k,c,false);
+ return 0;
+}
+
+function crypto_core_hsalsa20(out,inp,k,c) {
+ core(out,inp,k,c,true);
+ return 0;
+}
+
+var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
+ // "expand 32-byte k"
+
+function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) {
+ var z = new Uint8Array(16), x = new Uint8Array(64);
+ var u, i;
+ if (!b) return 0;
+ for (i = 0; i < 16; i++) z[i] = 0;
+ for (i = 0; i < 8; i++) z[i] = n[i];
+ while (b >= 64) {
+ crypto_core_salsa20(x,z,k,sigma);
+ for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i];
+ u = 1;
+ for (i = 8; i < 16; i++) {
+ u = u + (z[i] & 0xff) | 0;
+ z[i] = u & 0xff;
+ u >>>= 8;
+ }
+ b -= 64;
+ cpos += 64;
+ if (m) mpos += 64;
+ }
+ if (b > 0) {
+ crypto_core_salsa20(x,z,k,sigma);
+ for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i];
+ }
+ return 0;
+}
+
+function crypto_stream_salsa20(c,cpos,d,n,k) {
+ return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k);
+}
+
+function crypto_stream(c,cpos,d,n,k) {
+ var s = new Uint8Array(32);
+ crypto_core_hsalsa20(s,n,k,sigma);
+ return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s);
+}
+
+function crypto_stream_xor(c,cpos,m,mpos,d,n,k) {
+ var s = new Uint8Array(32);
+ crypto_core_hsalsa20(s,n,k,sigma);
+ return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s);
+}
+
+function add1305(h, c) {
+ var j, u = 0;
+ for (j = 0; j < 17; j++) {
+ u = (u + ((h[j] + c[j]) | 0)) | 0;
+ h[j] = u & 255;
+ u >>>= 8;
+ }
+}
+
+var minusp = new Uint32Array([
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252
+]);
+
+function crypto_onetimeauth(out, outpos, m, mpos, n, k) {
+ var s, i, j, u;
+ var x = new Uint32Array(17), r = new Uint32Array(17),
+ h = new Uint32Array(17), c = new Uint32Array(17),
+ g = new Uint32Array(17);
+ for (j = 0; j < 17; j++) r[j]=h[j]=0;
+ for (j = 0; j < 16; j++) r[j]=k[j];
+ r[3]&=15;
+ r[4]&=252;
+ r[7]&=15;
+ r[8]&=252;
+ r[11]&=15;
+ r[12]&=252;
+ r[15]&=15;
+
+ while (n > 0) {
+ for (j = 0; j < 17; j++) c[j] = 0;
+ for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j];
+ c[j] = 1;
+ mpos += j; n -= j;
+ add1305(h,c);
+ for (i = 0; i < 17; i++) {
+ x[i] = 0;
+ for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0;
+ }
+ for (i = 0; i < 17; i++) h[i] = x[i];
+ u = 0;
+ for (j = 0; j < 16; j++) {
+ u = (u + h[j]) | 0;
+ h[j] = u & 255;
+ u >>>= 8;
+ }
+ u = (u + h[16]) | 0; h[16] = u & 3;
+ u = (5 * (u >>> 2)) | 0;
+ for (j = 0; j < 16; j++) {
+ u = (u + h[j]) | 0;
+ h[j] = u & 255;
+ u >>>= 8;
+ }
+ u = (u + h[16]) | 0; h[16] = u;
+ }
+
+ for (j = 0; j < 17; j++) g[j] = h[j];
+ add1305(h,minusp);
+ s = (-(h[16] >>> 7) | 0);
+ for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]);
+
+ for (j = 0; j < 16; j++) c[j] = k[j + 16];
+ c[16] = 0;
+ add1305(h,c);
+ for (j = 0; j < 16; j++) out[outpos+j] = h[j];
+ return 0;
+}
+
+function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) {
+ var x = new Uint8Array(16);
+ crypto_onetimeauth(x,0,m,mpos,n,k);
+ return crypto_verify_16(h,hpos,x,0);
+}
+
+function crypto_secretbox(c,m,d,n,k) {
+ var i;
+ if (d < 32) return -1;
+ crypto_stream_xor(c,0,m,0,d,n,k);
+ crypto_onetimeauth(c, 16, c, 32, d - 32, c);
+ for (i = 0; i < 16; i++) c[i] = 0;
+ return 0;
+}
+
+function crypto_secretbox_open(m,c,d,n,k) {
+ var i;
+ var x = new Uint8Array(32);
+ if (d < 32) return -1;
+ crypto_stream(x,0,32,n,k);
+ if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1;
+ crypto_stream_xor(m,0,c,0,d,n,k);
+ for (i = 0; i < 32; i++) m[i] = 0;
+ return 0;
+}
+
+function set25519(r, a) {
+ var i;
+ for (i = 0; i < 16; i++) r[i] = a[i]|0;
+}
+
+function car25519(o) {
+ var c;
+ var i;
+ for (i = 0; i < 16; i++) {
+ o[i] += 65536;
+ c = Math.floor(o[i] / 65536);
+ o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0);
+ o[i] -= (c * 65536);
+ }
+}
+
+function sel25519(p, q, b) {
+ var t, c = ~(b-1);
+ for (var i = 0; i < 16; i++) {
+ t = c & (p[i] ^ q[i]);
+ p[i] ^= t;
+ q[i] ^= t;
+ }
+}
+
+function pack25519(o, n) {
+ var i, j, b;
+ var m = gf(), t = gf();
+ for (i = 0; i < 16; i++) t[i] = n[i];
+ car25519(t);
+ car25519(t);
+ car25519(t);
+ for (j = 0; j < 2; j++) {
+ m[0] = t[0] - 0xffed;
+ for (i = 1; i < 15; i++) {
+ m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1);
+ m[i-1] &= 0xffff;
+ }
+ m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1);
+ b = (m[15]>>16) & 1;
+ m[14] &= 0xffff;
+ sel25519(t, m, 1-b);
+ }
+ for (i = 0; i < 16; i++) {
+ o[2*i] = t[i] & 0xff;
+ o[2*i+1] = t[i]>>8;
+ }
+}
+
+function neq25519(a, b) {
+ var c = new Uint8Array(32), d = new Uint8Array(32);
+ pack25519(c, a);
+ pack25519(d, b);
+ return crypto_verify_32(c, 0, d, 0);
+}
+
+function par25519(a) {
+ var d = new Uint8Array(32);
+ pack25519(d, a);
+ return d[0] & 1;
+}
+
+function unpack25519(o, n) {
+ var i;
+ for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8);
+ o[15] &= 0x7fff;
+}
+
+function A(o, a, b) {
+ var i;
+ for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0;
+}
+
+function Z(o, a, b) {
+ var i;
+ for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0;
+}
+
+function M(o, a, b) {
+ var i, j, t = new Float64Array(31);
+ for (i = 0; i < 31; i++) t[i] = 0;
+ for (i = 0; i < 16; i++) {
+ for (j = 0; j < 16; j++) {
+ t[i+j] += a[i] * b[j];
+ }
+ }
+ for (i = 0; i < 15; i++) {
+ t[i] += 38 * t[i+16];
+ }
+ for (i = 0; i < 16; i++) o[i] = t[i];
+ car25519(o);
+ car25519(o);
+}
+
+function S(o, a) {
+ M(o, a, a);
+}
+
+function inv25519(o, i) {
+ var c = gf();
+ var a;
+ for (a = 0; a < 16; a++) c[a] = i[a];
+ for (a = 253; a >= 0; a--) {
+ S(c, c);
+ if(a !== 2 && a !== 4) M(c, c, i);
+ }
+ for (a = 0; a < 16; a++) o[a] = c[a];
+}
+
+function pow2523(o, i) {
+ var c = gf();
+ var a;
+ for (a = 0; a < 16; a++) c[a] = i[a];
+ for (a = 250; a >= 0; a--) {
+ S(c, c);
+ if(a !== 1) M(c, c, i);
+ }
+ for (a = 0; a < 16; a++) o[a] = c[a];
+}
+
+function crypto_scalarmult(q, n, p) {
+ var z = new Uint8Array(32);
+ var x = new Float64Array(80), r, i;
+ var a = gf(), b = gf(), c = gf(),
+ d = gf(), e = gf(), f = gf();
+ for (i = 0; i < 31; i++) z[i] = n[i];
+ z[31]=(n[31]&127)|64;
+ z[0]&=248;
+ unpack25519(x,p);
+ for (i = 0; i < 16; i++) {
+ b[i]=x[i];
+ d[i]=a[i]=c[i]=0;
+ }
+ a[0]=d[0]=1;
+ for (i=254; i>=0; --i) {
+ r=(z[i>>>3]>>>(i&7))&1;
+ sel25519(a,b,r);
+ sel25519(c,d,r);
+ A(e,a,c);
+ Z(a,a,c);
+ A(c,b,d);
+ Z(b,b,d);
+ S(d,e);
+ S(f,a);
+ M(a,c,a);
+ M(c,b,e);
+ A(e,a,c);
+ Z(a,a,c);
+ S(b,a);
+ Z(c,d,f);
+ M(a,c,_121665);
+ A(a,a,d);
+ M(c,c,a);
+ M(a,d,f);
+ M(d,b,x);
+ S(b,e);
+ sel25519(a,b,r);
+ sel25519(c,d,r);
+ }
+ for (i = 0; i < 16; i++) {
+ x[i+16]=a[i];
+ x[i+32]=c[i];
+ x[i+48]=b[i];
+ x[i+64]=d[i];
+ }
+ var x32 = x.subarray(32);
+ var x16 = x.subarray(16);
+ inv25519(x32,x32);
+ M(x16,x16,x32);
+ pack25519(q,x16);
+ return 0;
+}
+
+function crypto_scalarmult_base(q, n) {
+ return crypto_scalarmult(q, n, _9);
+}
+
+function crypto_box_keypair(y, x) {
+ randombytes(x, 32);
+ return crypto_scalarmult_base(y, x);
+}
+
+function crypto_box_beforenm(k, y, x) {
+ var s = new Uint8Array(32);
+ crypto_scalarmult(s, x, y);
+ return crypto_core_hsalsa20(k, _0, s, sigma);
+}
+
+var crypto_box_afternm = crypto_secretbox;
+var crypto_box_open_afternm = crypto_secretbox_open;
+
+function crypto_box(c, m, d, n, y, x) {
+ var k = new Uint8Array(32);
+ crypto_box_beforenm(k, y, x);
+ return crypto_box_afternm(c, m, d, n, k);
+}
+
+function crypto_box_open(m, c, d, n, y, x) {
+ var k = new Uint8Array(32);
+ crypto_box_beforenm(k, y, x);
+ return crypto_box_open_afternm(m, c, d, n, k);
+}
+
+function add64() {
+ var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i;
+ for (i = 0; i < arguments.length; i++) {
+ l = arguments[i].lo;
+ h = arguments[i].hi;
+ a += (l & m16); b += (l >>> 16);
+ c += (h & m16); d += (h >>> 16);
+ }
+
+ b += (a >>> 16);
+ c += (b >>> 16);
+ d += (c >>> 16);
+
+ return new u64((c & m16) | (d << 16), (a & m16) | (b << 16));
+}
+
+function shr64(x, c) {
+ return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c)));
+}
+
+function xor64() {
+ var l = 0, h = 0, i;
+ for (i = 0; i < arguments.length; i++) {
+ l ^= arguments[i].lo;
+ h ^= arguments[i].hi;
+ }
+ return new u64(h, l);
+}
+
+function R(x, c) {
+ var h, l, c1 = 32 - c;
+ if (c < 32) {
+ h = (x.hi >>> c) | (x.lo << c1);
+ l = (x.lo >>> c) | (x.hi << c1);
+ } else if (c < 64) {
+ h = (x.lo >>> c) | (x.hi << c1);
+ l = (x.hi >>> c) | (x.lo << c1);
+ }
+ return new u64(h, l);
+}
+
+function Ch(x, y, z) {
+ var h = (x.hi & y.hi) ^ (~x.hi & z.hi),
+ l = (x.lo & y.lo) ^ (~x.lo & z.lo);
+ return new u64(h, l);
+}
+
+function Maj(x, y, z) {
+ var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi),
+ l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo);
+ return new u64(h, l);
+}
+
+function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); }
+function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); }
+function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); }
+function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); }
+
+var K = [
+ new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd),
+ new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc),
+ new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019),
+ new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118),
+ new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe),
+ new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2),
+ new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1),
+ new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694),
+ new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3),
+ new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65),
+ new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483),
+ new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5),
+ new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210),
+ new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4),
+ new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725),
+ new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70),
+ new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926),
+ new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df),
+ new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8),
+ new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b),
+ new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001),
+ new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30),
+ new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910),
+ new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8),
+ new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53),
+ new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8),
+ new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb),
+ new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3),
+ new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60),
+ new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec),
+ new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9),
+ new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b),
+ new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207),
+ new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178),
+ new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6),
+ new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b),
+ new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493),
+ new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c),
+ new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a),
+ new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817)
+];
+
+function crypto_hashblocks(x, m, n) {
+ var z = [], b = [], a = [], w = [], t, i, j;
+
+ for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i);
+
+ var pos = 0;
+ while (n >= 128) {
+ for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos);
+ for (i = 0; i < 80; i++) {
+ for (j = 0; j < 8; j++) b[j] = a[j];
+ t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]);
+ b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2]));
+ b[3] = add64(b[3], t);
+ for (j = 0; j < 8; j++) a[(j+1)%8] = b[j];
+ if (i%16 === 15) {
+ for (j = 0; j < 16; j++) {
+ w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16]));
+ }
+ }
+ }
+
+ for (i = 0; i < 8; i++) {
+ a[i] = add64(a[i], z[i]);
+ z[i] = a[i];
+ }
+
+ pos += 128;
+ n -= 128;
+ }
+
+ for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]);
+ return n;
+}
+
+var iv = new Uint8Array([
+ 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08,
+ 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b,
+ 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b,
+ 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1,
+ 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1,
+ 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f,
+ 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b,
+ 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79
+]);
+
+function crypto_hash(out, m, n) {
+ var h = new Uint8Array(64), x = new Uint8Array(256);
+ var i, b = n;
+
+ for (i = 0; i < 64; i++) h[i] = iv[i];
+
+ crypto_hashblocks(h, m, n);
+ n %= 128;
+
+ for (i = 0; i < 256; i++) x[i] = 0;
+ for (i = 0; i < n; i++) x[i] = m[b-n+i];
+ x[n] = 128;
+
+ n = 256-128*(n<112?1:0);
+ x[n-9] = 0;
+ ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3));
+ crypto_hashblocks(h, x, n);
+
+ for (i = 0; i < 64; i++) out[i] = h[i];
+
+ return 0;
+}
+
+function add(p, q) {
+ var a = gf(), b = gf(), c = gf(),
+ d = gf(), e = gf(), f = gf(),
+ g = gf(), h = gf(), t = gf();
+
+ Z(a, p[1], p[0]);
+ Z(t, q[1], q[0]);
+ M(a, a, t);
+ A(b, p[0], p[1]);
+ A(t, q[0], q[1]);
+ M(b, b, t);
+ M(c, p[3], q[3]);
+ M(c, c, D2);
+ M(d, p[2], q[2]);
+ A(d, d, d);
+ Z(e, b, a);
+ Z(f, d, c);
+ A(g, d, c);
+ A(h, b, a);
+
+ M(p[0], e, f);
+ M(p[1], h, g);
+ M(p[2], g, f);
+ M(p[3], e, h);
+}
+
+function cswap(p, q, b) {
+ var i;
+ for (i = 0; i < 4; i++) {
+ sel25519(p[i], q[i], b);
+ }
+}
+
+function pack(r, p) {
+ var tx = gf(), ty = gf(), zi = gf();
+ inv25519(zi, p[2]);
+ M(tx, p[0], zi);
+ M(ty, p[1], zi);
+ pack25519(r, ty);
+ r[31] ^= par25519(tx) << 7;
+}
+
+function scalarmult(p, q, s) {
+ var b, i;
+ set25519(p[0], gf0);
+ set25519(p[1], gf1);
+ set25519(p[2], gf1);
+ set25519(p[3], gf0);
+ for (i = 255; i >= 0; --i) {
+ b = (s[(i/8)|0] >> (i&7)) & 1;
+ cswap(p, q, b);
+ add(q, p);
+ add(p, p);
+ cswap(p, q, b);
+ }
+}
+
+function scalarbase(p, s) {
+ var q = [gf(), gf(), gf(), gf()];
+ set25519(q[0], X);
+ set25519(q[1], Y);
+ set25519(q[2], gf1);
+ M(q[3], X, Y);
+ scalarmult(p, q, s);
+}
+
+function crypto_sign_keypair(pk, sk, seeded) {
+ var d = new Uint8Array(64);
+ var p = [gf(), gf(), gf(), gf()];
+ var i;
+
+ if (!seeded) randombytes(sk, 32);
+ crypto_hash(d, sk, 32);
+ d[0] &= 248;
+ d[31] &= 127;
+ d[31] |= 64;
+
+ scalarbase(p, d);
+ pack(pk, p);
+
+ for (i = 0; i < 32; i++) sk[i+32] = pk[i];
+ return 0;
+}
+
+var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]);
+
+function modL(r, x) {
+ var carry, i, j, k;
+ for (i = 63; i >= 32; --i) {
+ carry = 0;
+ for (j = i - 32, k = i - 12; j < k; ++j) {
+ x[j] += carry - 16 * x[i] * L[j - (i - 32)];
+ carry = (x[j] + 128) >> 8;
+ x[j] -= carry * 256;
+ }
+ x[j] += carry;
+ x[i] = 0;
+ }
+ carry = 0;
+ for (j = 0; j < 32; j++) {
+ x[j] += carry - (x[31] >> 4) * L[j];
+ carry = x[j] >> 8;
+ x[j] &= 255;
+ }
+ for (j = 0; j < 32; j++) x[j] -= carry * L[j];
+ for (i = 0; i < 32; i++) {
+ x[i+1] += x[i] >> 8;
+ r[i] = x[i] & 255;
+ }
+}
+
+function reduce(r) {
+ var x = new Float64Array(64), i;
+ for (i = 0; i < 64; i++) x[i] = r[i];
+ for (i = 0; i < 64; i++) r[i] = 0;
+ modL(r, x);
+}
+
+// Note: difference from C - smlen returned, not passed as argument.
+function crypto_sign(sm, m, n, sk) {
+ var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64);
+ var i, j, x = new Float64Array(64);
+ var p = [gf(), gf(), gf(), gf()];
+
+ crypto_hash(d, sk, 32);
+ d[0] &= 248;
+ d[31] &= 127;
+ d[31] |= 64;
+
+ var smlen = n + 64;
+ for (i = 0; i < n; i++) sm[64 + i] = m[i];
+ for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i];
+
+ crypto_hash(r, sm.subarray(32), n+32);
+ reduce(r);
+ scalarbase(p, r);
+ pack(sm, p);
+
+ for (i = 32; i < 64; i++) sm[i] = sk[i];
+ crypto_hash(h, sm, n + 64);
+ reduce(h);
+
+ for (i = 0; i < 64; i++) x[i] = 0;
+ for (i = 0; i < 32; i++) x[i] = r[i];
+ for (i = 0; i < 32; i++) {
+ for (j = 0; j < 32; j++) {
+ x[i+j] += h[i] * d[j];
+ }
+ }
+
+ modL(sm.subarray(32), x);
+ return smlen;
+}
+
+function unpackneg(r, p) {
+ var t = gf(), chk = gf(), num = gf(),
+ den = gf(), den2 = gf(), den4 = gf(),
+ den6 = gf();
+
+ set25519(r[2], gf1);
+ unpack25519(r[1], p);
+ S(num, r[1]);
+ M(den, num, D);
+ Z(num, num, r[2]);
+ A(den, r[2], den);
+
+ S(den2, den);
+ S(den4, den2);
+ M(den6, den4, den2);
+ M(t, den6, num);
+ M(t, t, den);
+
+ pow2523(t, t);
+ M(t, t, num);
+ M(t, t, den);
+ M(t, t, den);
+ M(r[0], t, den);
+
+ S(chk, r[0]);
+ M(chk, chk, den);
+ if (neq25519(chk, num)) M(r[0], r[0], I);
+
+ S(chk, r[0]);
+ M(chk, chk, den);
+ if (neq25519(chk, num)) return -1;
+
+ if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]);
+
+ M(r[3], r[0], r[1]);
+ return 0;
+}
+
+function crypto_sign_open(m, sm, n, pk) {
+ var i, mlen;
+ var t = new Uint8Array(32), h = new Uint8Array(64);
+ var p = [gf(), gf(), gf(), gf()],
+ q = [gf(), gf(), gf(), gf()];
+
+ mlen = -1;
+ if (n < 64) return -1;
+
+ if (unpackneg(q, pk)) return -1;
+
+ for (i = 0; i < n; i++) m[i] = sm[i];
+ for (i = 0; i < 32; i++) m[i+32] = pk[i];
+ crypto_hash(h, m, n);
+ reduce(h);
+ scalarmult(p, q, h);
+
+ scalarbase(q, sm.subarray(32));
+ add(p, q);
+ pack(t, p);
+
+ n -= 64;
+ if (crypto_verify_32(sm, 0, t, 0)) {
+ for (i = 0; i < n; i++) m[i] = 0;
+ return -1;
+ }
+
+ for (i = 0; i < n; i++) m[i] = sm[i + 64];
+ mlen = n;
+ return mlen;
+}
+
+var crypto_secretbox_KEYBYTES = 32,
+ crypto_secretbox_NONCEBYTES = 24,
+ crypto_secretbox_ZEROBYTES = 32,
+ crypto_secretbox_BOXZEROBYTES = 16,
+ crypto_scalarmult_BYTES = 32,
+ crypto_scalarmult_SCALARBYTES = 32,
+ crypto_box_PUBLICKEYBYTES = 32,
+ crypto_box_SECRETKEYBYTES = 32,
+ crypto_box_BEFORENMBYTES = 32,
+ crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES,
+ crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES,
+ crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES,
+ crypto_sign_BYTES = 64,
+ crypto_sign_PUBLICKEYBYTES = 32,
+ crypto_sign_SECRETKEYBYTES = 64,
+ crypto_sign_SEEDBYTES = 32,
+ crypto_hash_BYTES = 64;
+
+nacl.lowlevel = {
+ crypto_core_hsalsa20: crypto_core_hsalsa20,
+ crypto_stream_xor: crypto_stream_xor,
+ crypto_stream: crypto_stream,
+ crypto_stream_salsa20_xor: crypto_stream_salsa20_xor,
+ crypto_stream_salsa20: crypto_stream_salsa20,
+ crypto_onetimeauth: crypto_onetimeauth,
+ crypto_onetimeauth_verify: crypto_onetimeauth_verify,
+ crypto_verify_16: crypto_verify_16,
+ crypto_verify_32: crypto_verify_32,
+ crypto_secretbox: crypto_secretbox,
+ crypto_secretbox_open: crypto_secretbox_open,
+ crypto_scalarmult: crypto_scalarmult,
+ crypto_scalarmult_base: crypto_scalarmult_base,
+ crypto_box_beforenm: crypto_box_beforenm,
+ crypto_box_afternm: crypto_box_afternm,
+ crypto_box: crypto_box,
+ crypto_box_open: crypto_box_open,
+ crypto_box_keypair: crypto_box_keypair,
+ crypto_hash: crypto_hash,
+ crypto_sign: crypto_sign,
+ crypto_sign_keypair: crypto_sign_keypair,
+ crypto_sign_open: crypto_sign_open,
+
+ crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES,
+ crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES,
+ crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES,
+ crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES,
+ crypto_scalarmult_BYTES: crypto_scalarmult_BYTES,
+ crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES,
+ crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES,
+ crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES,
+ crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES,
+ crypto_box_NONCEBYTES: crypto_box_NONCEBYTES,
+ crypto_box_ZEROBYTES: crypto_box_ZEROBYTES,
+ crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES,
+ crypto_sign_BYTES: crypto_sign_BYTES,
+ crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES,
+ crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES,
+ crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES,
+ crypto_hash_BYTES: crypto_hash_BYTES
+};
+
+/* High-level API */
+
+function checkLengths(k, n) {
+ if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size');
+ if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size');
+}
+
+function checkBoxLengths(pk, sk) {
+ if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size');
+ if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size');
+}
+
+function checkArrayTypes() {
+ var t, i;
+ for (i = 0; i < arguments.length; i++) {
+ if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]')
+ throw new TypeError('unexpected type ' + t + ', use Uint8Array');
+ }
+}
+
+function cleanup(arr) {
+ for (var i = 0; i < arr.length; i++) arr[i] = 0;
+}
+
+// TODO: Completely remove this in v0.15.
+if (!nacl.util) {
+ nacl.util = {};
+ nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
+ throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
+ };
+}
+
+nacl.randomBytes = function(n) {
+ var b = new Uint8Array(n);
+ randombytes(b, n);
+ return b;
+};
+
+nacl.secretbox = function(msg, nonce, key) {
+ checkArrayTypes(msg, nonce, key);
+ checkLengths(key, nonce);
+ var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length);
+ var c = new Uint8Array(m.length);
+ for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i];
+ crypto_secretbox(c, m, m.length, nonce, key);
+ return c.subarray(crypto_secretbox_BOXZEROBYTES);
+};
+
+nacl.secretbox.open = function(box, nonce, key) {
+ checkArrayTypes(box, nonce, key);
+ checkLengths(key, nonce);
+ var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length);
+ var m = new Uint8Array(c.length);
+ for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i];
+ if (c.length < 32) return false;
+ if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false;
+ return m.subarray(crypto_secretbox_ZEROBYTES);
+};
+
+nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES;
+nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES;
+nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES;
+
+nacl.scalarMult = function(n, p) {
+ checkArrayTypes(n, p);
+ if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
+ if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size');
+ var q = new Uint8Array(crypto_scalarmult_BYTES);
+ crypto_scalarmult(q, n, p);
+ return q;
+};
+
+nacl.scalarMult.base = function(n) {
+ checkArrayTypes(n);
+ if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
+ var q = new Uint8Array(crypto_scalarmult_BYTES);
+ crypto_scalarmult_base(q, n);
+ return q;
+};
+
+nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES;
+nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES;
+
+nacl.box = function(msg, nonce, publicKey, secretKey) {
+ var k = nacl.box.before(publicKey, secretKey);
+ return nacl.secretbox(msg, nonce, k);
+};
+
+nacl.box.before = function(publicKey, secretKey) {
+ checkArrayTypes(publicKey, secretKey);
+ checkBoxLengths(publicKey, secretKey);
+ var k = new Uint8Array(crypto_box_BEFORENMBYTES);
+ crypto_box_beforenm(k, publicKey, secretKey);
+ return k;
+};
+
+nacl.box.after = nacl.secretbox;
+
+nacl.box.open = function(msg, nonce, publicKey, secretKey) {
+ var k = nacl.box.before(publicKey, secretKey);
+ return nacl.secretbox.open(msg, nonce, k);
+};
+
+nacl.box.open.after = nacl.secretbox.open;
+
+nacl.box.keyPair = function() {
+ var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
+ var sk = new Uint8Array(crypto_box_SECRETKEYBYTES);
+ crypto_box_keypair(pk, sk);
+ return {publicKey: pk, secretKey: sk};
+};
+
+nacl.box.keyPair.fromSecretKey = function(secretKey) {
+ checkArrayTypes(secretKey);
+ if (secretKey.length !== crypto_box_SECRETKEYBYTES)
+ throw new Error('bad secret key size');
+ var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
+ crypto_scalarmult_base(pk, secretKey);
+ return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
+};
+
+nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES;
+nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES;
+nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES;
+nacl.box.nonceLength = crypto_box_NONCEBYTES;
+nacl.box.overheadLength = nacl.secretbox.overheadLength;
+
+nacl.sign = function(msg, secretKey) {
+ checkArrayTypes(msg, secretKey);
+ if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
+ throw new Error('bad secret key size');
+ var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length);
+ crypto_sign(signedMsg, msg, msg.length, secretKey);
+ return signedMsg;
+};
+
+nacl.sign.open = function(signedMsg, publicKey) {
+ if (arguments.length !== 2)
+ throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?');
+ checkArrayTypes(signedMsg, publicKey);
+ if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
+ throw new Error('bad public key size');
+ var tmp = new Uint8Array(signedMsg.length);
+ var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey);
+ if (mlen < 0) return null;
+ var m = new Uint8Array(mlen);
+ for (var i = 0; i < m.length; i++) m[i] = tmp[i];
+ return m;
+};
+
+nacl.sign.detached = function(msg, secretKey) {
+ var signedMsg = nacl.sign(msg, secretKey);
+ var sig = new Uint8Array(crypto_sign_BYTES);
+ for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i];
+ return sig;
+};
+
+nacl.sign.detached.verify = function(msg, sig, publicKey) {
+ checkArrayTypes(msg, sig, publicKey);
+ if (sig.length !== crypto_sign_BYTES)
+ throw new Error('bad signature size');
+ if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
+ throw new Error('bad public key size');
+ var sm = new Uint8Array(crypto_sign_BYTES + msg.length);
+ var m = new Uint8Array(crypto_sign_BYTES + msg.length);
+ var i;
+ for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i];
+ for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i];
+ return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0);
+};
+
+nacl.sign.keyPair = function() {
+ var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
+ var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
+ crypto_sign_keypair(pk, sk);
+ return {publicKey: pk, secretKey: sk};
+};
+
+nacl.sign.keyPair.fromSecretKey = function(secretKey) {
+ checkArrayTypes(secretKey);
+ if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
+ throw new Error('bad secret key size');
+ var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
+ for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i];
+ return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
+};
+
+nacl.sign.keyPair.fromSeed = function(seed) {
+ checkArrayTypes(seed);
+ if (seed.length !== crypto_sign_SEEDBYTES)
+ throw new Error('bad seed size');
+ var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
+ var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
+ for (var i = 0; i < 32; i++) sk[i] = seed[i];
+ crypto_sign_keypair(pk, sk, true);
+ return {publicKey: pk, secretKey: sk};
+};
+
+nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES;
+nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES;
+nacl.sign.seedLength = crypto_sign_SEEDBYTES;
+nacl.sign.signatureLength = crypto_sign_BYTES;
+
+nacl.hash = function(msg) {
+ checkArrayTypes(msg);
+ var h = new Uint8Array(crypto_hash_BYTES);
+ crypto_hash(h, msg, msg.length);
+ return h;
+};
+
+nacl.hash.hashLength = crypto_hash_BYTES;
+
+nacl.verify = function(x, y) {
+ checkArrayTypes(x, y);
+ // Zero length arguments are considered not equal.
+ if (x.length === 0 || y.length === 0) return false;
+ if (x.length !== y.length) return false;
+ return (vn(x, 0, y, 0, x.length) === 0) ? true : false;
+};
+
+nacl.setPRNG = function(fn) {
+ randombytes = fn;
+};
+
+(function() {
+ // Initialize PRNG if environment provides CSPRNG.
+ // If not, methods calling randombytes will throw.
+ var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
+ if (crypto && crypto.getRandomValues) {
+ // Browsers.
+ var QUOTA = 65536;
+ nacl.setPRNG(function(x, n) {
+ var i, v = new Uint8Array(n);
+ for (i = 0; i < n; i += QUOTA) {
+ crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
+ }
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
+ } else if (typeof require !== 'undefined') {
+ // Node.js.
+ crypto = require('crypto');
+ if (crypto && crypto.randomBytes) {
+ nacl.setPRNG(function(x, n) {
+ var i, v = crypto.randomBytes(n);
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
+ }
+ }
+})();
+
+})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
diff --git a/node_modules/tweetnacl/nacl.min.js b/node_modules/tweetnacl/nacl.min.js
new file mode 100644
index 0000000..4484974
--- /dev/null
+++ b/node_modules/tweetnacl/nacl.min.js
@@ -0,0 +1 @@
+!function(r){"use strict";function n(r,n){return r<<n|r>>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new sr(e,t)}function o(r,n,e){var t;for(t=0;t<4;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;i<o;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),l=new Uint32Array(16),s=new Uint32Array(16),h=new Uint32Array(4);for(u=0;u<4;u++)l[5*u]=e(a,4*u),l[1+u]=e(i,4*u),l[6+u]=e(t,4*u),l[11+u]=e(i,16+4*u);for(u=0;u<16;u++)s[u]=l[u];for(u=0;u<20;u++){for(c=0;c<4;c++){for(w=0;w<4;w++)h[w]=l[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;w<4;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;w<16;w++)l[w]=y[w]}if(f){for(u=0;u<16;u++)l[u]=l[u]+s[u]|0;for(u=0;u<4;u++)l[5*u]=l[5*u]-e(a,4*u)|0,l[6+u]=l[6+u]-e(t,4*u)|0;for(u=0;u<4;u++)o(r,4*u,l[5*u]),o(r,16+4*u,l[6+u])}else for(u=0;u<16;u++)o(r,4*u,l[u]+s[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function l(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;u<64;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;u<16;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;u<o;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function s(r,n,e,t,o){return l(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),s(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),l(r,n,e,t,o,i.subarray(16),f)}function v(r,n){var e,t=0;for(e=0;e<17;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),l=new Uint32Array(17),s=new Uint32Array(17),h=new Uint32Array(17);for(u=0;u<17;u++)y[u]=l[u]=0;for(u=0;u<16;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)s[u]=0;for(u=0;u<16&&u<o;++u)s[u]=e[t+u];for(s[u]=1,t+=u,o-=u,v(l,s),f=0;f<17;f++)for(w[f]=0,u=0;u<17;u++)w[f]=w[f]+l[u]*(u<=f?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;f<17;f++)l[f]=w[f];for(c=0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;for(c=c+l[16]|0,l[16]=3&c,c=5*(c>>>2)|0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;c=c+l[16]|0,l[16]=c}for(u=0;u<17;u++)h[u]=l[u];for(v(l,Sr),a=0|-(l[16]>>>7),u=0;u<17;u++)l[u]^=a&(h[u]^l[u]);for(u=0;u<16;u++)s[u]=i[u+16];for(s[16]=0,v(l,s),u=0;u<16;u++)r[n+u]=l[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(e<32)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;i<16;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(e<32)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;i<32;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;e<16;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;e<16;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(e<15?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;i<16;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;e<16;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;t<2;t++){for(i[0]=a[0]-65517,e=1;e<15;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;e<16;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;t<31;t++)i[t]=0;for(t=0;t<16;t++)for(o=0;o<16;o++)i[t+o]+=n[t]*e[o];for(t=0;t<15;t++)i[t]+=38*i[t+16];for(t=0;t<16;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),l=hr();for(o=0;o<31;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;o<16;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(l,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,l),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,l),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;o<16;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var s=a.subarray(32),h=a.subarray(16);return k(s,s),Y(h,h,s),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e<arguments.length;e++)r=arguments[e].lo,n=arguments[e].hi,t+=r&f,o+=r>>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new sr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new sr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r<arguments.length;r++)n^=arguments[r].lo,e^=arguments[r].hi;return new sr(e,n)}function j(r,n){var e,t,o=32-n;return n<32?(e=r.hi>>>n|r.lo<<o,t=r.lo>>>n|r.hi<<o):n<64&&(e=r.lo>>>n|r.hi<<o,t=r.hi>>>n|r.lo<<o),new sr(e,t)}function q(r,n,e){var t=r.hi&n.hi^~r.hi&e.hi,o=r.lo&n.lo^~r.lo&e.lo;return new sr(t,o)}function I(r,n,e){var t=r.hi&n.hi^r.hi&e.hi^n.hi&e.hi,o=r.lo&n.lo^r.lo&e.lo^n.lo&e.lo;return new sr(t,o)}function V(r){return Z(j(r,28),j(r,34),j(r,39))}function X(r){return Z(j(r,14),j(r,18),j(r,41))}function D(r){return Z(j(r,1),j(r,8),G(r,7))}function H(r){return Z(j(r,19),j(r,61),G(r,6))}function J(r,n,e){var o,a,f,u=[],c=[],w=[],y=[];for(a=0;a<8;a++)u[a]=w[a]=t(r,8*a);for(var l=0;e>=128;){for(a=0;a<16;a++)y[a]=t(n,8*a+l);for(a=0;a<80;a++){for(f=0;f<8;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;f<8;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;f<16;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;a<8;a++)w[a]=M(w[a],u[a]),u[a]=w[a];l+=128,e-=128}for(a=0;a<8;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;t<64;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;t<256;t++)a[t]=0;for(t=0;t<e;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(e<112?1:0),a[e-9]=0,i(a,e-8,new sr(f/536870912|0,f<<3)),J(o,a,e),t=0;t<64;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,Er),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;t<4;t++)d(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();k(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(U(r[0],pr),U(r[1],_r),U(r[2],_r),U(r[3],pr),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;t<32;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;o<i;++o)n[o]+=e-16*n[t]*kr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;o<32;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;o<32;o++)n[o]-=e*kr[o];for(t=0;t<32;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;n<64;n++)e[n]=r[n];for(n=0;n<64;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;o<e;o++)r[64+o]=n[o];for(o=0;o<32;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;o<64;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;o<64;o++)c[o]=0;for(o=0;o<32;o++)c[o]=u[o];for(o=0;o<32;o++)for(i=0;i<32;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return U(r[2],_r),S(r[1],n),L(o,r[1]),Y(i,o,Ur),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),z(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,e<64)return-1;if(fr(w,t))return-1;for(o=0;o<e;o++)r[o]=n[o];for(o=0;o<32;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;o<e;o++)r[o]=0;return-1}for(o=0;o<e;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==zr)throw new Error("bad key size");if(n.length!==Rr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Cr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;n<arguments.length;n++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[n])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function lr(r){for(var n=0;n<r.length;n++)r[n]=0}var sr=function(r,n){this.hi=0|r,this.lo=0|n},hr=function(r){var n,e=new Float64Array(16);if(r)for(n=0;n<r.length;n++)e[n]=r[n];return e},gr=function(){throw new Error("no PRNG")},vr=new Uint8Array(16),br=new Uint8Array(32);br[0]=9;var pr=hr(),_r=hr([1]),Ar=hr([56129,1]),Ur=hr([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Er=hr([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),dr=hr([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),xr=hr([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),mr=hr([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),Br=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),Sr=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]),Kr=_,Tr=A,Yr=[new sr(1116352408,3609767458),new sr(1899447441,602891725),new sr(3049323471,3964484399),new sr(3921009573,2173295548),new sr(961987163,4081628472),new sr(1508970993,3053834265),new sr(2453635748,2937671579),new sr(2870763221,3664609560),new sr(3624381080,2734883394),new sr(310598401,1164996542),new sr(607225278,1323610764),new sr(1426881987,3590304994),new sr(1925078388,4068182383),new sr(2162078206,991336113),new sr(2614888103,633803317),new sr(3248222580,3479774868),new sr(3835390401,2666613458),new sr(4022224774,944711139),new sr(264347078,2341262773),new sr(604807628,2007800933),new sr(770255983,1495990901),new sr(1249150122,1856431235),new sr(1555081692,3175218132),new sr(1996064986,2198950837),new sr(2554220882,3999719339),new sr(2821834349,766784016),new sr(2952996808,2566594879),new sr(3210313671,3203337956),new sr(3336571891,1034457026),new sr(3584528711,2466948901),new sr(113926993,3758326383),new sr(338241895,168717936),new sr(666307205,1188179964),new sr(773529912,1546045734),new sr(1294757372,1522805485),new sr(1396182291,2643833823),new sr(1695183700,2343527390),new sr(1986661051,1014477480),new sr(2177026350,1206759142),new sr(2456956037,344077627),new sr(2730485921,1290863460),new sr(2820302411,3158454273),new sr(3259730800,3505952657),new sr(3345764771,106217008),new sr(3516065817,3606008344),new sr(3600352804,1432725776),new sr(4094571909,1467031594),new sr(275423344,851169720),new sr(430227734,3100823752),new sr(506948616,1363258195),new sr(659060556,3750685593),new sr(883997877,3785050280),new sr(958139571,3318307427),new sr(1322822218,3812723403),new sr(1537002063,2003034995),new sr(1747873779,3602036899),new sr(1955562222,1575990012),new sr(2024104815,1125592928),new sr(2227730452,2716904306),new sr(2361852424,442776044),new sr(2428436474,593698344),new sr(2756734187,3733110249),new sr(3204031479,2999351573),new sr(3329325298,3815920427),new sr(3391569614,3928383900),new sr(3515267271,566280711),new sr(3940187606,3454069534),new sr(4118630271,4000239992),new sr(116418474,1914138554),new sr(174292421,2731055270),new sr(289380356,3203993006),new sr(460393269,320620315),new sr(685471733,587496836),new sr(852142971,1086792851),new sr(1017036298,365543100),new sr(1126000580,2618297676),new sr(1288033470,3409855158),new sr(1501505948,4234509866),new sr(1607167915,987167468),new sr(1816402316,1246189591)],Lr=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]),kr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),zr=32,Rr=24,Pr=32,Or=16,Fr=32,Nr=32,Cr=32,Mr=32,Gr=32,Zr=Rr,jr=Pr,qr=Or,Ir=64,Vr=32,Xr=64,Dr=32,Hr=64;r.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:g,crypto_stream:h,crypto_stream_salsa20_xor:l,crypto_stream_salsa20:s,crypto_onetimeauth:b,crypto_onetimeauth_verify:p,crypto_verify_16:f,crypto_verify_32:u,crypto_secretbox:_,crypto_secretbox_open:A,crypto_scalarmult:R,crypto_scalarmult_base:P,crypto_box_beforenm:F,crypto_box_afternm:Kr,crypto_box:N,crypto_box_open:C,crypto_box_keypair:O,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:tr,crypto_sign_open:ur,crypto_secretbox_KEYBYTES:zr,crypto_secretbox_NONCEBYTES:Rr,crypto_secretbox_ZEROBYTES:Pr,crypto_secretbox_BOXZEROBYTES:Or,crypto_scalarmult_BYTES:Fr,crypto_scalarmult_SCALARBYTES:Nr,crypto_box_PUBLICKEYBYTES:Cr,crypto_box_SECRETKEYBYTES:Mr,crypto_box_BEFORENMBYTES:Gr,crypto_box_NONCEBYTES:Zr,crypto_box_ZEROBYTES:jr,crypto_box_BOXZEROBYTES:qr,crypto_sign_BYTES:Ir,crypto_sign_PUBLICKEYBYTES:Vr,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:Dr,crypto_hash_BYTES:Hr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var n=new Uint8Array(r);return gr(n,r),n},r.secretbox=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Pr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Pr]=r[i];return _(o,t,t.length,n,e),o.subarray(Or)},r.secretbox.open=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Or+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Or]=r[i];return!(t.length<32)&&(0===A(o,t,t.length,n,e)&&o.subarray(Pr))},r.secretbox.keyLength=zr,r.secretbox.nonceLength=Rr,r.secretbox.overheadLength=Or,r.scalarMult=function(r,n){if(yr(r,n),r.length!==Nr)throw new Error("bad n size");if(n.length!==Fr)throw new Error("bad p size");var e=new Uint8Array(Fr);return R(e,r,n),e},r.scalarMult.base=function(r){if(yr(r),r.length!==Nr)throw new Error("bad n size");var n=new Uint8Array(Fr);return P(n,r),n},r.scalarMult.scalarLength=Nr,r.scalarMult.groupElementLength=Fr,r.box=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox(n,e,i)},r.box.before=function(r,n){yr(r,n),wr(r,n);var e=new Uint8Array(Gr);return F(e,r,n),e},r.box.after=r.secretbox,r.box.open=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox.open(n,e,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Cr),n=new Uint8Array(Mr);return O(r,n),{publicKey:r,secretKey:n}},r.box.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Mr)throw new Error("bad secret key size");var n=new Uint8Array(Cr);return P(n,r),{publicKey:n,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Cr,r.box.secretKeyLength=Mr,r.box.sharedKeyLength=Gr,r.box.nonceLength=Zr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,n){if(yr(r,n),n.length!==Xr)throw new Error("bad secret key size");var e=new Uint8Array(Ir+r.length);return ar(e,r,r.length,n),e},r.sign.open=function(r,n){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(yr(r,n),n.length!==Vr)throw new Error("bad public key size");var e=new Uint8Array(r.length),t=ur(e,r,r.length,n);if(t<0)return null;for(var o=new Uint8Array(t),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached=function(n,e){for(var t=r.sign(n,e),o=new Uint8Array(Ir),i=0;i<o.length;i++)o[i]=t[i];return o},r.sign.detached.verify=function(r,n,e){if(yr(r,n,e),n.length!==Ir)throw new Error("bad signature size");if(e.length!==Vr)throw new Error("bad public key size");var t,o=new Uint8Array(Ir+r.length),i=new Uint8Array(Ir+r.length);for(t=0;t<Ir;t++)o[t]=n[t];for(t=0;t<r.length;t++)o[t+Ir]=r[t];return ur(i,o,o.length,e)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e<n.length;e++)n[e]=r[32+e];return{publicKey:n,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(yr(r),r.length!==Dr)throw new Error("bad seed size");for(var n=new Uint8Array(Vr),e=new Uint8Array(Xr),t=0;t<32;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=Vr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Ir,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0!==r.length&&0!==n.length&&(r.length===n.length&&0===a(r,0,n,0,r.length))},r.setPRNG=function(r){gr=r},function(){var n="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(n&&n.getRandomValues){var e=65536;r.setPRNG(function(r,t){var o,i=new Uint8Array(t);for(o=0;o<t;o+=e)n.getRandomValues(i.subarray(o,o+Math.min(t-o,e)));for(o=0;o<t;o++)r[o]=i[o];lr(i)})}else"undefined"!=typeof require&&(n=require("crypto"),n&&n.randomBytes&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;t<e;t++)r[t]=o[t];lr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file
diff --git a/node_modules/tweetnacl/package.json b/node_modules/tweetnacl/package.json
new file mode 100644
index 0000000..702e85b
--- /dev/null
+++ b/node_modules/tweetnacl/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "tweetnacl",
+ "version": "0.14.5",
+ "description": "Port of TweetNaCl cryptographic library to JavaScript",
+ "main": "nacl-fast.js",
+ "types": "nacl.d.ts",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js",
+ "test-node": "tape test/*.js | faucet",
+ "test-node-all": "make -C test/c && tape test/*.js test/c/*.js | faucet",
+ "test-browser": "NACL_SRC=${NACL_SRC:='nacl.min.js'} && npm run build-test-browser && cat $NACL_SRC test/browser/_bundle.js | tape-run | faucet",
+ "build-test-browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null",
+ "test": "npm run test-node-all && npm run test-browser",
+ "bench": "node test/benchmark/bench.js",
+ "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/dchest/tweetnacl-js.git"
+ },
+ "keywords": [
+ "crypto",
+ "cryptography",
+ "curve25519",
+ "ed25519",
+ "encrypt",
+ "hash",
+ "key",
+ "nacl",
+ "poly1305",
+ "public",
+ "salsa20",
+ "signatures"
+ ],
+ "author": "TweetNaCl-js contributors",
+ "license": "Unlicense",
+ "bugs": {
+ "url": "https://github.com/dchest/tweetnacl-js/issues"
+ },
+ "homepage": "https://tweetnacl.js.org",
+ "devDependencies": {
+ "browserify": "^13.0.0",
+ "eslint": "^2.2.0",
+ "faucet": "^0.0.1",
+ "tap-browser-color": "^0.1.2",
+ "tape": "^4.4.0",
+ "tape-run": "^2.1.3",
+ "tweetnacl-util": "^0.13.3",
+ "uglify-js": "^2.6.1"
+ },
+ "browser": {
+ "buffer": false,
+ "crypto": false
+ }
+}
diff --git a/node_modules/type-fest/index.d.ts b/node_modules/type-fest/index.d.ts
new file mode 100644
index 0000000..014a504
--- /dev/null
+++ b/node_modules/type-fest/index.d.ts
@@ -0,0 +1,29 @@
+// Basic
+export * from './source/basic';
+
+// Utilities
+export {Except} from './source/except';
+export {Mutable} from './source/mutable';
+export {Merge} from './source/merge';
+export {MergeExclusive} from './source/merge-exclusive';
+export {RequireAtLeastOne} from './source/require-at-least-one';
+export {RequireExactlyOne} from './source/require-exactly-one';
+export {PartialDeep} from './source/partial-deep';
+export {ReadonlyDeep} from './source/readonly-deep';
+export {LiteralUnion} from './source/literal-union';
+export {Promisable} from './source/promisable';
+export {Opaque} from './source/opaque';
+export {SetOptional} from './source/set-optional';
+export {SetRequired} from './source/set-required';
+export {ValueOf} from './source/value-of';
+export {PromiseValue} from './source/promise-value';
+export {AsyncReturnType} from './source/async-return-type';
+export {ConditionalExcept} from './source/conditional-except';
+export {ConditionalKeys} from './source/conditional-keys';
+export {ConditionalPick} from './source/conditional-pick';
+export {UnionToIntersection} from './source/union-to-intersection';
+export {Stringified} from './source/stringified';
+
+// Miscellaneous
+export {PackageJson} from './source/package-json';
+export {TsConfigJson} from './source/tsconfig-json';
diff --git a/node_modules/type-fest/license b/node_modules/type-fest/license
new file mode 100644
index 0000000..3e4c85a
--- /dev/null
+++ b/node_modules/type-fest/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https:/sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/type-fest/package.json b/node_modules/type-fest/package.json
new file mode 100644
index 0000000..2d347a2
--- /dev/null
+++ b/node_modules/type-fest/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "type-fest",
+ "version": "0.13.1",
+ "description": "A collection of essential TypeScript types",
+ "license": "(MIT OR CC0-1.0)",
+ "repository": "sindresorhus/type-fest",
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "scripts": {
+ "test": "xo && tsd"
+ },
+ "files": [
+ "index.d.ts",
+ "source"
+ ],
+ "keywords": [
+ "typescript",
+ "ts",
+ "types",
+ "utility",
+ "util",
+ "utilities",
+ "omit",
+ "merge",
+ "json"
+ ],
+ "devDependencies": {
+ "tsd": "^0.11.0",
+ "xo": "^0.28.2"
+ },
+ "types": "index.d.ts",
+ "xo": {
+ "rules": {
+ "@typescript-eslint/indent": "off",
+ "func-call-spacing": "off"
+ }
+ }
+}
diff --git a/node_modules/type-fest/readme.md b/node_modules/type-fest/readme.md
new file mode 100644
index 0000000..a7e684d
--- /dev/null
+++ b/node_modules/type-fest/readme.md
@@ -0,0 +1,642 @@
+<div align="center">
+ <br>
+ <br>
+ <img src="media/logo.svg" alt="type-fest" height="300">
+ <br>
+ <br>
+ <b>A collection of essential TypeScript types</b>
+ <br>
+ <hr>
+</div>
+<br>
+<br>
+
+[![Build Status](https://travis-ci.com/sindresorhus/type-fest.svg?branch=master)](https://travis-ci.com/sindresorhus/type-fest)
+[![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4)
+<!-- Commented out until they actually show anything
+[![npm dependents](https://badgen.net/npm/dependents/type-fest)](https://www.npmjs.com/package/type-fest?activeTab=dependents) [![npm downloads](https://badgen.net/npm/dt/type-fest)](https://www.npmjs.com/package/type-fest)
+-->
+
+Many of the types here should have been built-in. You can help by suggesting some of them to the [TypeScript project](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
+
+Either add this package as a dependency or copy-paste the needed types. No credit required. 👌
+
+PR welcome for additional commonly needed types and docs improvements. Read the [contributing guidelines](.github/contributing.md) first.
+
+## Install
+
+```
+$ npm install type-fest
+```
+
+*Requires TypeScript >=3.2*
+
+## Usage
+
+```ts
+import {Except} from 'type-fest';
+
+type Foo = {
+ unicorn: string;
+ rainbow: boolean;
+};
+
+type FooWithoutRainbow = Except<Foo, 'rainbow'>;
+//=> {unicorn: string}
+```
+
+## API
+
+Click the type names for complete docs.
+
+### Basic
+
+- [`Primitive`](source/basic.d.ts) - Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
+- [`Class`](source/basic.d.ts) - Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
+- [`TypedArray`](source/basic.d.ts) - Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
+- [`JsonObject`](source/basic.d.ts) - Matches a JSON object.
+- [`JsonArray`](source/basic.d.ts) - Matches a JSON array.
+- [`JsonValue`](source/basic.d.ts) - Matches any valid JSON value.
+- [`ObservableLike`](source/basic.d.ts) - Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
+
+### Utilities
+
+- [`Except`](source/except.d.ts) - Create a type from an object type without certain keys. This is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type).
+- [`Mutable`](source/mutable.d.ts) - Convert an object with `readonly` keys into a mutable object. The inverse of `Readonly<T>`.
+- [`Merge`](source/merge.d.ts) - Merge two types into a new type. Keys of the second type overrides keys of the first type.
+- [`MergeExclusive`](source/merge-exclusive.d.ts) - Create a type that has mutually exclusive keys.
+- [`RequireAtLeastOne`](source/require-at-least-one.d.ts) - Create a type that requires at least one of the given keys.
+- [`RequireExactlyOne`](source/require-exactly-one.d.ts) - Create a type that requires exactly a single key of the given keys and disallows more.
+- [`PartialDeep`](source/partial-deep.d.ts) - Create a deeply optional version of another type. Use [`Partial<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1401-L1406) if you only need one level deep.
+- [`ReadonlyDeep`](source/readonly-deep.d.ts) - Create a deeply immutable version of an `object`/`Map`/`Set`/`Array` type. Use [`Readonly<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1415-L1420) if you only need one level deep.
+- [`LiteralUnion`](source/literal-union.d.ts) - Create a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union. Workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729).
+- [`Promisable`](source/promisable.d.ts) - Create a type that represents either the value or the value wrapped in `PromiseLike`.
+- [`Opaque`](source/opaque.d.ts) - Create an [opaque type](https://codemix.com/opaque-types-in-javascript/).
+- [`SetOptional`](source/set-optional.d.ts) - Create a type that makes the given keys optional.
+- [`SetRequired`](source/set-required.d.ts) - Create a type that makes the given keys required.
+- [`ValueOf`](source/value-of.d.ts) - Create a union of the given object's values, and optionally specify which keys to get the values from.
+- [`PromiseValue`](source/promise-value.d.ts) - Returns the type that is wrapped inside a `Promise`.
+- [`AsyncReturnType`](source/async-return-type.d.ts) - Unwrap the return type of a function that returns a `Promise`.
+- [`ConditionalKeys`](source/conditional-keys.d.ts) - Extract keys from a shape where values extend the given `Condition` type.
+- [`ConditionalPick`](source/conditional-pick.d.ts) - Like `Pick` except it selects properties from a shape where the values extend the given `Condition` type.
+- [`ConditionalExcept`](source/conditional-except.d.ts) - Like `Omit` except it removes properties from a shape where the values extend the given `Condition` type.
+- [`UnionToIntersection`](source/union-to-intersection.d.ts) - Convert a union type to an intersection type.
+- [`Stringified`](source/stringified.d.ts) - Create a type with the keys of the given type changed to `string` type.
+
+### Miscellaneous
+
+- [`PackageJson`](source/package-json.d.ts) - Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file).
+- [`TsConfigJson`](source/tsconfig-json.d.ts) - Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 3.7).
+
+## Declined types
+
+*If we decline a type addition, we will make sure to document the better solution here.*
+
+- [`Diff` and `Spread`](https://github.com/sindresorhus/type-fest/pull/7) - The PR author didn't provide any real-world use-cases and the PR went stale. If you think this type is useful, provide some real-world use-cases and we might reconsider.
+- [`Dictionary`](https://github.com/sindresorhus/type-fest/issues/33) - You only save a few characters (`Dictionary<number>` vs `Record<string, number>`) from [`Record`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1429-L1434), which is more flexible and well-known. Also, you shouldn't use an object as a dictionary. We have `Map` in JavaScript now.
+- [`SubType`](https://github.com/sindresorhus/type-fest/issues/22) - The type is powerful, but lacks good use-cases and is prone to misuse.
+- [`ExtractProperties` and `ExtractMethods`](https://github.com/sindresorhus/type-fest/pull/4) - The types violate the single responsibility principle. Instead, refine your types into more granular type hierarchies.
+
+## Tips
+
+### Built-in types
+
+There are many advanced types most users don't know about.
+
+- [`Partial<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1401-L1406) - Make all properties in `T` optional.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgHIHsAmEDC6QzADmyA3gLABQyycADnanALYQBcyAzmFKEQNxUaddFDAcQAV2YAjaIMoBfKlQQAbOJ05osEAIIMAQpOBrsUMkOR1eANziRkCfISKSoD4Pg4ZseAsTIALyW1DS0DEysHADkvvoMMQA0VsKi4sgAzAAMuVaKClY2wPaOknSYDrguADwA0sgQAB6QIJjaANYQAJ7oMDp+LsQAfAAUXd0cdUnI9mo+uv6uANp1ALoAlKHhyGAAFsCcAHTOAW4eYF4gyxNrwbNwago0ypRWp66jH8QcAApwYmAjxq8SWIy2FDCNDA3ToKFBQyIdR69wmfQG1TOhShyBgomQX3w3GQE2Q6IA8jIAFYQBBgI4TTiEs5bTQYsFInrLTbbHZOIlgZDlSqQABqj0kKBC3yINx6a2xfOQwH6o2FVXFaklwSCIUkbQghBAEEwENSfNOlykEGefNe5uhB2O6sgS3GPRmLogmslG1tLxUOKgEDA7hAuydtteryAA)
+
+ ```ts
+ interface NodeConfig {
+ appName: string;
+ port: number;
+ }
+
+ class NodeAppBuilder {
+ private configuration: NodeConfig = {
+ appName: 'NodeApp',
+ port: 3000
+ };
+
+ private updateConfig<Key extends keyof NodeConfig>(key: Key, value: NodeConfig[Key]) {
+ this.configuration[key] = value;
+ }
+
+ config(config: Partial<NodeConfig>) {
+ type NodeConfigKey = keyof NodeConfig;
+
+ for (const key of Object.keys(config) as NodeConfigKey[]) {
+ const updateValue = config[key];
+
+ if (updateValue === undefined) {
+ continue;
+ }
+
+ this.updateConfig(key, updateValue);
+ }
+
+ return this;
+ }
+ }
+
+ // `Partial<NodeConfig>`` allows us to provide only a part of the
+ // NodeConfig interface.
+ new NodeAppBuilder().config({appName: 'ToDoApp'});
+ ```
+ </details>
+
+- [`Required<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1408-L1413) - Make all properties in `T` required.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/AQ4SwOwFwUwJwGYEMDGNgGED21VQGJZwC2wA3gFCjXAzFJgA2A-AFzADOUckA5gNxUaIYjA4ckvGG07c+g6gF8KQkAgCuEFFDA5O6gEbEwUbLm2ESwABQIixACJIoSdgCUYAR3Vg4MACYAPGYuFvYAfACU5Ko0APRxwADKMBD+wFAAFuh2Vv7OSBlYGdmc8ABu8LHKsRyGxqY4oQT21pTCIHQMjOwA5DAAHgACxAAOjDAAdChYxL0ANLHUouKSMH0AEmAAhJhY6ozpAJ77GTCMjMCiV0ToSAb7UJPPC9WRgrEJwAAqR6MwSRQPFGUFocDgRHYxnEfGAowh-zgUCOwF6KwkUl6tXqJhCeEsxDaS1AXSYfUGI3GUxmc0WSneQA)
+
+ ```ts
+ interface ContactForm {
+ email?: string;
+ message?: string;
+ }
+
+ function submitContactForm(formData: Required<ContactForm>) {
+ // Send the form data to the server.
+ }
+
+ submitContactForm({
+ email: 'ex@mple.com',
+ message: 'Hi! Could you tell me more about…',
+ });
+
+ // TypeScript error: missing property 'message'
+ submitContactForm({
+ email: 'ex@mple.com',
+ });
+ ```
+ </details>
+
+- [`Readonly<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1415-L1420) - Make all properties in `T` readonly.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/AQ4UwOwVwW2AZA9gc3mAbmANsA3gKFCOAHkAzMgGkOJABEwAjKZa2kAUQCcvEu32AMQCGAF2FYBIAL4BufDRABLCKLBcywgMZgEKZOoDCiCGSXI8i4hGEwwALmABnUVxXJ57YFgzZHSVF8sT1BpBSItLGEnJz1kAy5LLy0TM2RHACUwYQATEywATwAeAITjU3MAPnkrCJMXLigtUT4AClxgGztKbyDgaX99I1TzAEokr1BRAAslJwA6FIqLAF48TtswHp9MHDla9hJGACswZvmyLjAwAC8wVpm5xZHkUZDaMKIwqyWXYCW0oN4sNlsA1h0ug5gAByACyBQAggAHJHQ7ZBIFoXbzBjMCz7OoQP5YIaJNYQMAAdziCVaALGNSIAHomcAACoFJFgADKWjcSNEwG4vC4ji0wggEEQguiTnMEGALWAV1yAFp8gVgEjeFyuKICvMrCTgVxnst5jtsGC4ljsPNhXxGaAWcAAOq6YRXYDCRg+RWIcA5JSC+kWdCepQ+v3RYCU3RInzRMCGwlpC19NYBW1Ye08R1AA)
+
+ ```ts
+ enum LogLevel {
+ Off,
+ Debug,
+ Error,
+ Fatal
+ };
+
+ interface LoggerConfig {
+ name: string;
+ level: LogLevel;
+ }
+
+ class Logger {
+ config: Readonly<LoggerConfig>;
+
+ constructor({name, level}: LoggerConfig) {
+ this.config = {name, level};
+ Object.freeze(this.config);
+ }
+ }
+
+ const config: LoggerConfig = {
+ name: 'MyApp',
+ level: LogLevel.Debug
+ };
+
+ const logger = new Logger(config);
+
+ // TypeScript Error: cannot assign to read-only property.
+ logger.config.level = LogLevel.Error;
+
+ // We are able to edit config variable as we please.
+ config.level = LogLevel.Error;
+ ```
+ </details>
+
+- [`Pick<T, K>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1422-L1427) - From `T`, pick a set of properties whose keys are in the union `K`.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/AQ4SwOwFwUwJwGYEMDGNgEE5TCgNugN4BQoZwOUBAXMAM5RyQDmA3KeSFABYCuAtgCMISMHloMmENh04oA9tBjQJjFuzIBfYrOAB6PcADCcGElh1gEGAHcKATwAO6ebyjB5CTNlwFwSxFR0BX5HeToYABNgBDh5fm8cfBg6AHIKG3ldA2BHOOcfFNpUygJ0pAhokr4hETFUgDpswywkggAFUwA3MFtgAF5gQgowKhhVKTYKGuFRcXo1aVZgbTIoJ3RW3xhOmB6+wfbcAGsAHi3kgBpgEtGy4AAfG54BWfqAPnZm4AAlZUj4MAkMA8GAGB4vEgfMlLLw6CwPBA8PYRmMgZVgAC6CgmI4cIommQELwICh8RBgKZKvALh1ur0bHQABR5PYMui0Wk7em2ADaAF0AJS0AASABUALIAGQAogR+Mp3CROCAFBBwVC2ikBpj5CgBIqGjizLA5TAFdAmalImAuqlBRoVQh5HBgEy1eDWfs7J5cjzGYKhroVfpDEhHM4MV6GRR5NN0JrtnRg6BVirTFBeHAKYmYY6QNpdB73LmCJZBlSAXAubtvczeSmQMNSuMbmKNgBlHFgPEUNwusBIPAAQlS1xetTmxT0SDoESgdD0C4aACtHMwxytLrohawgA)
+
+ ```ts
+ interface Article {
+ title: string;
+ thumbnail: string;
+ content: string;
+ }
+
+ // Creates new type out of the `Article` interface composed
+ // from the Articles' two properties: `title` and `thumbnail`.
+ // `ArticlePreview = {title: string; thumbnail: string}`
+ type ArticlePreview = Pick<Article, 'title' | 'thumbnail'>;
+
+ // Render a list of articles using only title and description.
+ function renderArticlePreviews(previews: ArticlePreview[]): HTMLElement {
+ const articles = document.createElement('div');
+
+ for (const preview of previews) {
+ // Append preview to the articles.
+ }
+
+ return articles;
+ }
+
+ const articles = renderArticlePreviews([
+ {
+ title: 'TypeScript tutorial!',
+ thumbnail: '/assets/ts.jpg'
+ }
+ ]);
+ ```
+ </details>
+
+- [`Record<K, T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1429-L1434) - Construct a type with a set of properties `K` of type `T`.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/AQ4ejYAUHsGcCWAXBMB2dgwGbAKYC2ADgDYwCeeemCaWArgE7ADGMxAhmuQHQBQoYEnJE8wALKEARnkaxEKdMAC8wAOS0kstGuAAfdQBM8ANzxlRjXQbVaWACwC0JPB0NqA3HwGgIwAJJoWozYHCxixnAsjAhStADmwESMMJYo1Fi4HMCIaPEu+MRklHj8gpqyoeHAAKJFFFTAAN4+giDYCIxwSAByHAR4AFw5SDF5Xm2gJBzdfQPD3WPxE5PAlBxdAPLYNQAelgh4aOHDaPQEMowrIAC+3oJ+AMKMrlrAXFhSAFZ4LEhC9g4-0BmA4JBISXgiCkBQABpILrJ5MhUGhYcATGD6Bk4Hh-jNgABrPDkOBlXyQAAq9ngYmJpOAAHcEOCRjAXqwYODfoo6DhakUSph+Uh7GI4P0xER4Cj0OSQGwMP8tP1hgAlX7swwAHgRl2RvIANALSA08ABtAC6AD4VM1Wm0Kow0MMrYaHYJjGYLLJXZb3at1HYnC43Go-QHQDcvA6-JsmEJXARgCDgMYWAhjIYhDAU+YiMAAFIwex0ZmilMITCGF79TLAGRsAgJYAAZRwSEZGzEABFTOZUrJ5Yn+jwnWgeER6HB7AAKJrADpdXqS4ZqYultTG6azVfqHswPBbtauLY7fayQ7HIbAAAMwBuAEoYw9IBq2Ixs9h2eFMOQYPQObALQKJgggABeYhghCIpikkKRpOQRIknAsZUiIeCttECBEP8NSMCkjDDAARMGziuIYxHwYOjDCMBmDNnAuTxA6irdCOBB1Lh5Dqpqn66tISIykawBnOCtqqC0gbjqc9DgpGkxegOliyfJDrRkAA)
+
+ ```ts
+ // Positions of employees in our company.
+ type MemberPosition = 'intern' | 'developer' | 'tech-lead';
+
+ // Interface describing properties of a single employee.
+ interface Employee {
+ firstName: string;
+ lastName: string;
+ yearsOfExperience: number;
+ }
+
+ // Create an object that has all possible `MemberPosition` values set as keys.
+ // Those keys will store a collection of Employees of the same position.
+ const team: Record<MemberPosition, Employee[]> = {
+ intern: [],
+ developer: [],
+ 'tech-lead': [],
+ };
+
+ // Our team has decided to help John with his dream of becoming Software Developer.
+ team.intern.push({
+ firstName: 'John',
+ lastName: 'Doe',
+ yearsOfExperience: 0
+ });
+
+ // `Record` forces you to initialize all of the property keys.
+ // TypeScript Error: "tech-lead" property is missing
+ const teamEmpty: Record<MemberPosition, null> = {
+ intern: null,
+ developer: null,
+ };
+ ```
+ </details>
+
+- [`Exclude<T, U>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1436-L1439) - Exclude from `T` those types that are assignable to `U`.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/JYOwLgpgTgZghgYwgAgMrQG7QMIHsQzADmyA3gFDLIAOuUYAXMiAK4A2byAPsgM5hRQJHqwC2AI2gBucgF9y5MAE9qKAEoQAjiwj8AEnBAATNtGQBeZAAooWphu26wAGmS3e93bRC8IASgsAPmRDJRlyAHoI5ABRAA8ENhYjFFYOZGVVZBgoXFFkAAM0zh5+QRBhZhYJaAKAOkjogEkQZAQ4X2QAdwALCFbaemRgXmQtFjhOMFwq9K6ULuB0lk6U+HYwZAxJnQaYFhAEMGB8ZCIIMAAFOjAANR2IK0HGWISklIAedCgsKDwCYgAbQA5M9gQBdVzFQJ+JhiSRQMiUYYwayZCC4VHPCzmSzAspCYEBWxgFhQAZwKC+FpgJ43VwARgADH4ZFQSWSBjcZPJyPtDsdTvxKWBvr8rD1DCZoJ5HPopaYoK4EPhCEQmGKcKriLCtrhgEYkVQVT5Nr4fmZLLZtMBbFZgT0wGBqES6ghbHBIJqoBKFdBWQpjfh+DQbhY2tqiHVsbjLMVkAB+ZAAZiZaeQTHOVxu9ySjxNaujNwDVHNvzqbBGkBAdPoAfkQA)
+
+ ```ts
+ interface ServerConfig {
+ port: null | string | number;
+ }
+
+ type RequestHandler = (request: Request, response: Response) => void;
+
+ // Exclude `null` type from `null | string | number`.
+ // In case the port is equal to `null`, we will use default value.
+ function getPortValue(port: Exclude<ServerConfig['port'], null>): number {
+ if (typeof port === 'string') {
+ return parseInt(port, 10);
+ }
+
+ return port;
+ }
+
+ function startServer(handler: RequestHandler, config: ServerConfig): void {
+ const server = require('http').createServer(handler);
+
+ const port = config.port === null ? 3000 : getPortValue(config.port);
+ server.listen(port);
+ }
+ ```
+ </details>
+
+- [`Extract<T, U>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1441-L1444) - Extract from `T` those types that are assignable to `U`.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXzSwEdkQBJYACgEoAueVZAWwCMQYBuAKDDwGcM8MgBF4AXngBlAJ6scESgHIRi6ty5ZUGdoihgEABXZ888AN5d48ANoiAuvUat23K6ihMQ9ATE0BzV3goPy8GZjZOLgBfLi4Aejj4AEEICBwAdz54MAALKFQQ+BxEeAAHY1NgKAwoIKy0grr4DByEUpgccpgMaXgAaxBerCzi+B9-ZulygDouFHRsU1z8kKMYE1RhaqgAHkt4AHkWACt4EAAPbVRgLLWNgBp9gGlBs8uQa6yAUUuYPQwdgNpKM7nh7mMML4CgA+R5WABqUAgpDeVxuhxO1he0jsXGh8EoOBO9COx3BQPo2PBADckaR6IjkSA6PBqTgsMBzPsicdrEC7OJWXSQNwYvFEgAVTS9JLXODpeDpKBZFg4GCoWa8VACIJykAKiQWKy2YQOAioYikCg0OEMDyhRSy4DyxS24KhAAMjyi6gS8AAwjh5OD0iBFHAkJoEOksC1mnkMJq8gUQKDNttKPlnfrwYp3J5XfBHXqoKpfYkAOI4ansTxaeDADmoRSCCBYAbxhC6TDx6rwYHIRX5bScjA4bLJwoDmDwDkfbA9JMrVMVdM1TN69LgkTgwgkchUahqIA)
+
+ ```ts
+ declare function uniqueId(): number;
+
+ const ID = Symbol('ID');
+
+ interface Person {
+ [ID]: number;
+ name: string;
+ age: number;
+ }
+
+ // Allows changing the person data as long as the property key is of string type.
+ function changePersonData<
+ Obj extends Person,
+ Key extends Extract<keyof Person, string>,
+ Value extends Obj[Key]
+ > (obj: Obj, key: Key, value: Value): void {
+ obj[key] = value;
+ }
+
+ // Tiny Andrew was born.
+ const andrew = {
+ [ID]: uniqueId(),
+ name: 'Andrew',
+ age: 0,
+ };
+
+ // Cool, we're fine with that.
+ changePersonData(andrew, 'name', 'Pony');
+
+ // Goverment didn't like the fact that you wanted to change your identity.
+ changePersonData(andrew, ID, uniqueId());
+ ```
+ </details>
+
+- [`NonNullable<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1446-L1449) - Exclude `null` and `undefined` from `T`.
+ <details>
+ <summary>
+ Example
+ </summary>
+ Works with <code>strictNullChecks</code> set to <code>true</code>. (Read more <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html">here</a>)
+
+ [Playground](https://typescript-play.js.org/?target=6#code/C4TwDgpgBACg9gJ2AOQK4FsBGEFQLxQDOwCAlgHYDmUAPlORtrnQwDasDcAUFwPQBU-WAEMkUOADMowqAGNWwwoSgATCBIqlgpOOSjAAFsOBRSy1IQgr9cKJlSlW1mZYQA3HFH68u8xcoBlHA8EACEHJ08Aby4oKDBUTFZSWXjEFEYcAEIALihkXTR2YSSIAB54JDQsHAA+blj4xOTUsHSACkMzPKD3HHDHNQQAGjSkPMqMmoQASh7g-oihqBi4uNIpdraxPAI2VhmVxrX9AzMAOm2ppnwoAA4ABifuE4BfKAhWSyOTuK7CS7pao3AhXF5rV48E4ICDAVAIPT-cGQyG+XTEIgLMJLTx7CAAdygvRCA0iCHaMwarhJOIQjUBSHaACJHk8mYdeLwxtdcVAAOSsh58+lXdr7Dlcq7A3n3J4PEUdADMcspUE53OluAIUGVTx46oAKuAIAFZGQwCYAKIIBCILjUxaDHAMnla+iodjcIA)
+
+ ```ts
+ type PortNumber = string | number | null;
+
+ /** Part of a class definition that is used to build a server */
+ class ServerBuilder {
+ portNumber!: NonNullable<PortNumber>;
+
+ port(this: ServerBuilder, port: PortNumber): ServerBuilder {
+ if (port == null) {
+ this.portNumber = 8000;
+ } else {
+ this.portNumber = port;
+ }
+
+ return this;
+ }
+ }
+
+ const serverBuilder = new ServerBuilder();
+
+ serverBuilder
+ .port('8000') // portNumber = '8000'
+ .port(null) // portNumber = 8000
+ .port(3000); // portNumber = 3000
+
+ // TypeScript error
+ serverBuilder.portNumber = null;
+ ```
+ </details>
+
+- [`Parameters<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1451-L1454) - Obtain the parameters of a function type in a tuple.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/GYVwdgxgLglg9mABAZwBYmMANgUwBQxgAOIUAXIgIZgCeA2gLoCUFAbnDACaIDeAUIkQB6IYgCypSlBxUATrMo1ECsJzgBbLEoipqAc0J7EMKMgDkiHLnU4wp46pwAPHMgB0fAL58+oSLARECEosLAA5ABUYG2QAHgAxJGdpVWREPDdMylk9ZApqemZEAF4APipacrw-CApEgBogkKwAYThwckQwEHUAIxxZJl4BYVEImiIZKF0oZRwiWVdbeygJmThgOYgcGFYcbhqApCJsyhtpWXcR1cnEePBoeDAABVPzgbTixFeFd8uEsClADcIxGiygIFkSEOT3SmTc2VydQeRx+ZxwF2QQ34gkEwDgsnSuFmMBKiAADEDjIhYk1Qm0OlSYABqZnYka4xA1DJZHJYkGc7yCbyeRA+CAIZCzNAYbA4CIAdxg2zJwVCkWirjwMswuEaACYmCCgA)
+
+ ```ts
+ function shuffle(input: any[]): void {
+ // Mutate array randomly changing its' elements indexes.
+ }
+
+ function callNTimes<Fn extends (...args: any[]) => any> (func: Fn, callCount: number) {
+ // Type that represents the type of the received function parameters.
+ type FunctionParameters = Parameters<Fn>;
+
+ return function (...args: FunctionParameters) {
+ for (let i = 0; i < callCount; i++) {
+ func(...args);
+ }
+ }
+ }
+
+ const shuffleTwice = callNTimes(shuffle, 2);
+ ```
+ </details>
+
+- [`ConstructorParameters<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1456-L1459) - Obtain the parameters of a constructor function type in a tuple.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/MYGwhgzhAECCBOAXAlqApgWQPYBM0mgG8AoaaFRENALmgkXmQDsBzAblOmCycTV4D8teo1YdO3JiICuwRFngAKClWENmLAJRFOZRAAtkEAHQq00ALzlklNBzIBfYk+KhIMAJJTEYJsDQAwmDA+mgAPAAq0GgAHnxMODCKTGgA7tCKxllg8CwQtL4AngDaALraFgB80EWa1SRkAA6MAG5gfNAB4FABPDJyCrQR9tDNyG0dwMGhtBhgjWEiGgA00F70vv4RhY3hEZXVVinpc42KmuJkkv3y8Bly8EPaDWTkhiZd7r3e8LK3llwGCMXGQWGhEOsfH5zJlsrl8p0+gw-goAAo5MAAW3BaHgEEilU0tEhmzQ212BJ0ry4SOg+kg+gBBiMximIGA0nAfAQLGk2N4EAAEgzYcYcnkLsRdDTvNEYkYUKwSdCme9WdM0MYwYhFPSIPpJdTkAAzDKxBUaZX+aAAQgsVmkCTQxuYaBw2ng4Ok8CYcotSu8pMur09iG9vuObxZnx6SN+AyUWTF8MN0CcZE4Ywm5jZHK5aB5fP4iCFIqT4oRRTKRLo6lYVNeAHpG50wOzOe1zHr9NLQ+HoABybsD4HOKXXRA1JCoKhBELmI5pNaB6Fz0KKBAodDYPAgSUTmqYsAALx4m5nC6nW9nGq14KtaEUA9gR9PvuNCjQ9BgACNvcwNBtAcLiAA)
+
+ ```ts
+ class ArticleModel {
+ title: string;
+ content?: string;
+
+ constructor(title: string) {
+ this.title = title;
+ }
+ }
+
+ class InstanceCache<T extends (new (...args: any[]) => any)> {
+ private ClassConstructor: T;
+ private cache: Map<string, InstanceType<T>> = new Map();
+
+ constructor (ctr: T) {
+ this.ClassConstructor = ctr;
+ }
+
+ getInstance (...args: ConstructorParameters<T>): InstanceType<T> {
+ const hash = this.calculateArgumentsHash(...args);
+
+ const existingInstance = this.cache.get(hash);
+ if (existingInstance !== undefined) {
+ return existingInstance;
+ }
+
+ return new this.ClassConstructor(...args);
+ }
+
+ private calculateArgumentsHash(...args: any[]): string {
+ // Calculate hash.
+ return 'hash';
+ }
+ }
+
+ const articleCache = new InstanceCache(ArticleModel);
+ const amazonArticle = articleCache.getInstance('Amazon forests burining!');
+ ```
+ </details>
+
+- [`ReturnType<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1461-L1464) – Obtain the return type of a function type.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/MYGwhgzhAECSAmICmBlJAnAbgS2E6A3gFDTTwD2AcuQC4AW2AdgOYAUAlAFzSbnbyEAvkWFFQkGJSQB3GMVI1sNZNwg10TZgG4S0YOUY0kh1es07d+xmvQBXYDXLpWi5UlMaWAGj0GjJ6BtNdkJdBQYIADpXZGgAXmgYpB1ScOwoq38aeN9DYxoU6GFRKzVoJjUwRjwAYXJbPPRuAFkwAAcAHgAxBodsAx9GWwBbACMMAD4cxhloVraOCyYjdAAzMDxoOut1e0d0UNIZ6WhWSPOwdGYIbiqATwBtAF0uaHudUQB6ACpv6ABpJBINqJdAbADW0Do5BOw3u5R2VTwMHIq2gAANtjZ0bkbHsnFCwJh8ONjHp0EgwEZ4JFoN9PkRVr1FAZoMwkDRYIjqkgOrosepoEgAB7+eAwAV2BxOLy6ACCVxgIrFEoMeOl6AACpcwMMORgIB1JRMiBNWKVdhruJKfOdIpdrtwFddXlzKjyACp3Nq842HaDIbL6BrZBIVGhIpB1EMYSLsmjmtWW-YhAA+qegAAYLKQLQj3ZsEsdccmnGcLor2Dn8xGedHGpEIBzEzspfsfMHDNAANTQACMVaIljV5GQkRA5DYmIpVKQAgAJARO9le33BDXIyi0YuLW2nJFGLqkOvxFB0YPdBSaLZ0IwNzyPkO8-xkGgsLh8Al427a3hWAhXwwHA8EHT5PmgAB1bAQBAANJ24adKWpft72RaBUTgRBUCAj89HAM8xCTaBjggABRQx0DuHJv25P9dCkWRZVIAAiBjoFImpmjlFBgA0NpsjadByDacgIDAEAIAAQmYpjoGYgAZSBsmGPw6DtZiiFA8CoJguDmAQmoZ2QvtUKQLdoAYmBTwgdEiCAA)
+
+ ```ts
+ /** Provides every element of the iterable `iter` into the `callback` function and stores the results in an array. */
+ function mapIter<
+ Elem,
+ Func extends (elem: Elem) => any,
+ Ret extends ReturnType<Func>
+ >(iter: Iterable<Elem>, callback: Func): Ret[] {
+ const mapped: Ret[] = [];
+
+ for (const elem of iter) {
+ mapped.push(callback(elem));
+ }
+
+ return mapped;
+ }
+
+ const setObject: Set<string> = new Set();
+ const mapObject: Map<number, string> = new Map();
+
+ mapIter(setObject, (value: string) => value.indexOf('Foo')); // number[]
+
+ mapIter(mapObject, ([key, value]: [number, string]) => {
+ return key % 2 === 0 ? value : 'Odd';
+ }); // string[]
+ ```
+ </details>
+
+- [`InstanceType<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1466-L1469) – Obtain the instance type of a constructor function type.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/MYGwhgzhAECSAmICmBlJAnAbgS2E6A3gFDTTwD2AcuQC4AW2AdgOYAUAlAFzSbnbyEAvkWFFQkGJSQB3GMVI1sNZNwg10TZgG4S0YOUY0kh1es07d+xmvQBXYDXLpWi5UlMaWAGj0GjJ6BtNdkJdBQYIADpXZGgAXmgYpB1ScOwoq38aeN9DYxoU6GFRKzVoJjUwRjwAYXJbPPRuAFkwAAcAHgAxBodsAx9GWwBbACMMAD4cxhloVraOCyYjdAAzMDxoOut1e0d0UNIZ6WhWSPOwdGYIbiqATwBtAF0uaHudUQB6ACpv6ABpJBINqJdAbADW0Do5BOw3u5R2VTwMHIq2gAANtjZ0bkbHsnFCwJh8ONjHp0EgwEZ4JFoN9PkRVr1FAZoMwkDRYIjqkgOrosepoEgAB7+eAwAV2BxOLy6ACCVxgIrFEoMeOl6AACpcwMMORgIB1JRMiBNWKVdhruJKfOdIpdrtwFddXlzKjyACp3Nq842HaDIbL6BrZBIVGhIpB1EMYSLsmjmtWW-YhAA+qegAAYLKQLQj3ZsEsdccmnGcLor2Dn8xGedHGpEIBzEzspfsfMHDNAANTQACMVaIljV5GQkRA5DYmIpVKQAgAJARO9le33BDXIyi0YuLW2nJFGLqkOvxFB0YPdBSaLZ0IwNzyPkO8-xkGgsLh8Al427a3hWAhXwwHA8EHT5PmgAB1bAQBAANJ24adKWpft72RaBUTgRBUCAj89HAM8xCTaBjggABRQx0DuHJv25P9dCkWRZVIAAiBjoFImpmjlFBgA0NpsjadByDacgIDAEAIAAQmYpjoGYgAZSBsmGPw6DtZiiFA8CoJguDmAQmoZ2QvtUKQLdoAYmBTwgdEiCAA)
+
+ ```ts
+ class IdleService {
+ doNothing (): void {}
+ }
+
+ class News {
+ title: string;
+ content: string;
+
+ constructor(title: string, content: string) {
+ this.title = title;
+ this.content = content;
+ }
+ }
+
+ const instanceCounter: Map<Function, number> = new Map();
+
+ interface Constructor {
+ new(...args: any[]): any;
+ }
+
+ // Keep track how many instances of `Constr` constructor have been created.
+ function getInstance<
+ Constr extends Constructor,
+ Args extends ConstructorParameters<Constr>
+ >(constructor: Constr, ...args: Args): InstanceType<Constr> {
+ let count = instanceCounter.get(constructor) || 0;
+
+ const instance = new constructor(...args);
+
+ instanceCounter.set(constructor, count + 1);
+
+ console.log(`Created ${count + 1} instances of ${Constr.name} class`);
+
+ return instance;
+ }
+
+
+ const idleService = getInstance(IdleService);
+ // Will log: `Created 1 instances of IdleService class`
+ const newsEntry = getInstance(News, 'New ECMAScript proposals!', 'Last month...');
+ // Will log: `Created 1 instances of News class`
+ ```
+ </details>
+
+- [`Omit<T, K>`](https://github.com/microsoft/TypeScript/blob/71af02f7459dc812e85ac31365bfe23daf14b4e4/src/lib/es5.d.ts#L1446) – Constructs a type by picking all properties from T and then removing K.
+ <details>
+ <summary>
+ Example
+ </summary>
+
+ [Playground](https://typescript-play.js.org/?target=6#code/JYOwLgpgTgZghgYwgAgIImAWzgG2QbwChlks4BzCAVShwC5kBnMKUcgbmKYAcIFgIjBs1YgOXMpSFMWbANoBdTiW5woFddwAW0kfKWEAvoUIB6U8gDCUCHEiNkICAHdkYAJ69kz4GC3JcPG4oAHteKDABBxCYNAxsPFBIWEQUCAAPJG4wZABySUFcgJAAEzMLXNV1ck0dIuCw6EjBADpy5AB1FAQ4EGQAV0YUP2AHDy8wEOQbUugmBLwtEIA3OcmQnEjuZBgQqE7gAGtgZAhwKHdkHFGwNvGUdDIcAGUliIBJEF3kAF5kAHlML4ADyPBIAGjyBUYRQAPnkqho4NoYQA+TiEGD9EAISIhPozErQMG4AASK2gn2+AApek9pCSXm8wFSQooAJQMUkAFQAsgAZACiOAgmDOOSIJAQ+OYyGl4DgoDmf2QJRCCH6YvALQQNjsEGFovF1NyJWAy1y7OUyHMyE+yRAuFImG4Iq1YDswHxbRINjA-SgfXlHqVUE4xiAA)
+
+ ```ts
+ interface Animal {
+ imageUrl: string;
+ species: string;
+ images: string[];
+ paragraphs: string[];
+ }
+
+ // Creates new type with all properties of the `Animal` interface
+ // except 'images' and 'paragraphs' properties. We can use this
+ // type to render small hover tooltip for a wiki entry list.
+ type AnimalShortInfo = Omit<Animal, 'images' | 'paragraphs'>;
+
+ function renderAnimalHoverInfo (animals: AnimalShortInfo[]): HTMLElement {
+ const container = document.createElement('div');
+ // Internal implementation.
+ return container;
+ }
+ ```
+ </details>
+
+You can find some examples in the [TypeScript docs](https://www.typescriptlang.org/docs/handbook/advanced-types.html#predefined-conditional-types).
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Jarek Radosz](https://github.com/CvX)
+- [Dimitri Benin](https://github.com/BendingBender)
+
+## License
+
+(MIT OR CC0-1.0)
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-type-fest?utm_source=npm-type-fest&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/type-fest/source/async-return-type.d.ts b/node_modules/type-fest/source/async-return-type.d.ts
new file mode 100644
index 0000000..79ec1e9
--- /dev/null
+++ b/node_modules/type-fest/source/async-return-type.d.ts
@@ -0,0 +1,23 @@
+import {PromiseValue} from './promise-value';
+
+type AsyncFunction = (...args: any[]) => Promise<unknown>;
+
+/**
+Unwrap the return type of a function that returns a `Promise`.
+
+There has been [discussion](https://github.com/microsoft/TypeScript/pull/35998) about implementing this type in TypeScript.
+
+@example
+```ts
+import {AsyncReturnType} from 'type-fest';
+import {asyncFunction} from 'api';
+
+// This type resolves to the unwrapped return type of `asyncFunction`.
+type Value = AsyncReturnType<typeof asyncFunction>;
+
+async function doSomething(value: Value) {}
+
+asyncFunction().then(value => doSomething(value));
+```
+*/
+export type AsyncReturnType<Target extends AsyncFunction> = PromiseValue<ReturnType<Target>>;
diff --git a/node_modules/type-fest/source/basic.d.ts b/node_modules/type-fest/source/basic.d.ts
new file mode 100644
index 0000000..d380c8b
--- /dev/null
+++ b/node_modules/type-fest/source/basic.d.ts
@@ -0,0 +1,67 @@
+/// <reference lib="esnext"/>
+
+// TODO: This can just be `export type Primitive = not object` when the `not` keyword is out.
+/**
+Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
+*/
+export type Primitive =
+ | null
+ | undefined
+ | string
+ | number
+ | boolean
+ | symbol
+ | bigint;
+
+// TODO: Remove the `= unknown` sometime in the future when most users are on TS 3.5 as it's now the default
+/**
+Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
+*/
+export type Class<T = unknown, Arguments extends any[] = any[]> = new(...arguments_: Arguments) => T;
+
+/**
+Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
+*/
+export type TypedArray =
+ | Int8Array
+ | Uint8Array
+ | Uint8ClampedArray
+ | Int16Array
+ | Uint16Array
+ | Int32Array
+ | Uint32Array
+ | Float32Array
+ | Float64Array
+ | BigInt64Array
+ | BigUint64Array;
+
+/**
+Matches a JSON object.
+
+This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
+*/
+export type JsonObject = {[Key in string]?: JsonValue};
+
+/**
+Matches a JSON array.
+*/
+export interface JsonArray extends Array<JsonValue> {}
+
+/**
+Matches any valid JSON value.
+*/
+export type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
+
+declare global {
+ interface SymbolConstructor {
+ readonly observable: symbol;
+ }
+}
+
+/**
+Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
+*/
+export interface ObservableLike {
+ subscribe(observer: (value: unknown) => void): void;
+ [Symbol.observable](): ObservableLike;
+}
diff --git a/node_modules/type-fest/source/conditional-except.d.ts b/node_modules/type-fest/source/conditional-except.d.ts
new file mode 100644
index 0000000..ac506cc
--- /dev/null
+++ b/node_modules/type-fest/source/conditional-except.d.ts
@@ -0,0 +1,43 @@
+import {Except} from './except';
+import {ConditionalKeys} from './conditional-keys';
+
+/**
+Exclude keys from a shape that matches the given `Condition`.
+
+This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
+
+@example
+```
+import {Primitive, ConditionalExcept} from 'type-fest';
+
+class Awesome {
+ name: string;
+ successes: number;
+ failures: bigint;
+
+ run() {}
+}
+
+type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
+//=> {run: () => void}
+```
+
+@example
+```
+import {ConditionalExcept} from 'type-fest';
+
+interface Example {
+ a: string;
+ b: string | number;
+ c: () => void;
+ d: {};
+}
+
+type NonStringKeysOnly = ConditionalExcept<Example, string>;
+//=> {b: string | number; c: () => void; d: {}}
+```
+*/
+export type ConditionalExcept<Base, Condition> = Except<
+ Base,
+ ConditionalKeys<Base, Condition>
+>;
diff --git a/node_modules/type-fest/source/conditional-keys.d.ts b/node_modules/type-fest/source/conditional-keys.d.ts
new file mode 100644
index 0000000..eb074dc
--- /dev/null
+++ b/node_modules/type-fest/source/conditional-keys.d.ts
@@ -0,0 +1,43 @@
+/**
+Extract the keys from a type where the value type of the key extends the given `Condition`.
+
+Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
+
+@example
+```
+import {ConditionalKeys} from 'type-fest';
+
+interface Example {
+ a: string;
+ b: string | number;
+ c?: string;
+ d: {};
+}
+
+type StringKeysOnly = ConditionalKeys<Example, string>;
+//=> 'a'
+```
+
+To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
+
+@example
+```
+type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
+//=> 'a' | 'c'
+```
+*/
+export type ConditionalKeys<Base, Condition> = NonNullable<
+ // Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
+ {
+ // Map through all the keys of the given base type.
+ [Key in keyof Base]:
+ // Pick only keys with types extending the given `Condition` type.
+ Base[Key] extends Condition
+ // Retain this key since the condition passes.
+ ? Key
+ // Discard this key since the condition fails.
+ : never;
+
+ // Convert the produced object into a union type of the keys which passed the conditional test.
+ }[keyof Base]
+>;
diff --git a/node_modules/type-fest/source/conditional-pick.d.ts b/node_modules/type-fest/source/conditional-pick.d.ts
new file mode 100644
index 0000000..cecc3df
--- /dev/null
+++ b/node_modules/type-fest/source/conditional-pick.d.ts
@@ -0,0 +1,42 @@
+import {ConditionalKeys} from './conditional-keys';
+
+/**
+Pick keys from the shape that matches the given `Condition`.
+
+This is useful when you want to create a new type from a specific subset of an existing type. For example, you might want to pick all the primitive properties from a class and form a new automatically derived type.
+
+@example
+```
+import {Primitive, ConditionalPick} from 'type-fest';
+
+class Awesome {
+ name: string;
+ successes: number;
+ failures: bigint;
+
+ run() {}
+}
+
+type PickPrimitivesFromAwesome = ConditionalPick<Awesome, Primitive>;
+//=> {name: string; successes: number; failures: bigint}
+```
+
+@example
+```
+import {ConditionalPick} from 'type-fest';
+
+interface Example {
+ a: string;
+ b: string | number;
+ c: () => void;
+ d: {};
+}
+
+type StringKeysOnly = ConditionalPick<Example, string>;
+//=> {a: string}
+```
+*/
+export type ConditionalPick<Base, Condition> = Pick<
+ Base,
+ ConditionalKeys<Base, Condition>
+>;
diff --git a/node_modules/type-fest/source/except.d.ts b/node_modules/type-fest/source/except.d.ts
new file mode 100644
index 0000000..7dedbaa
--- /dev/null
+++ b/node_modules/type-fest/source/except.d.ts
@@ -0,0 +1,22 @@
+/**
+Create a type from an object type without certain keys.
+
+This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
+
+Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/30825) if you want to have the stricter version as a built-in in TypeScript.
+
+@example
+```
+import {Except} from 'type-fest';
+
+type Foo = {
+ a: number;
+ b: string;
+ c: boolean;
+};
+
+type FooWithoutA = Except<Foo, 'a' | 'c'>;
+//=> {b: string};
+```
+*/
+export type Except<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;
diff --git a/node_modules/type-fest/source/literal-union.d.ts b/node_modules/type-fest/source/literal-union.d.ts
new file mode 100644
index 0000000..52e8de6
--- /dev/null
+++ b/node_modules/type-fest/source/literal-union.d.ts
@@ -0,0 +1,33 @@
+import {Primitive} from './basic';
+
+/**
+Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
+
+Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
+
+This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
+
+@example
+```
+import {LiteralUnion} from 'type-fest';
+
+// Before
+
+type Pet = 'dog' | 'cat' | string;
+
+const pet: Pet = '';
+// Start typing in your TypeScript-enabled IDE.
+// You **will not** get auto-completion for `dog` and `cat` literals.
+
+// After
+
+type Pet2 = LiteralUnion<'dog' | 'cat', string>;
+
+const pet: Pet2 = '';
+// You **will** get auto-completion for `dog` and `cat` literals.
+```
+ */
+export type LiteralUnion<
+ LiteralType extends BaseType,
+ BaseType extends Primitive
+> = LiteralType | (BaseType & {_?: never});
diff --git a/node_modules/type-fest/source/merge-exclusive.d.ts b/node_modules/type-fest/source/merge-exclusive.d.ts
new file mode 100644
index 0000000..059bd2c
--- /dev/null
+++ b/node_modules/type-fest/source/merge-exclusive.d.ts
@@ -0,0 +1,39 @@
+// Helper type. Not useful on its own.
+type Without<FirstType, SecondType> = {[KeyType in Exclude<keyof FirstType, keyof SecondType>]?: never};
+
+/**
+Create a type that has mutually exclusive keys.
+
+This type was inspired by [this comment](https://github.com/Microsoft/TypeScript/issues/14094#issuecomment-373782604).
+
+This type works with a helper type, called `Without`. `Without<FirstType, SecondType>` produces a type that has only keys from `FirstType` which are not present on `SecondType` and sets the value type for these keys to `never`. This helper type is then used in `MergeExclusive` to remove keys from either `FirstType` or `SecondType`.
+
+@example
+```
+import {MergeExclusive} from 'type-fest';
+
+interface ExclusiveVariation1 {
+ exclusive1: boolean;
+}
+
+interface ExclusiveVariation2 {
+ exclusive2: string;
+}
+
+type ExclusiveOptions = MergeExclusive<ExclusiveVariation1, ExclusiveVariation2>;
+
+let exclusiveOptions: ExclusiveOptions;
+
+exclusiveOptions = {exclusive1: true};
+//=> Works
+exclusiveOptions = {exclusive2: 'hi'};
+//=> Works
+exclusiveOptions = {exclusive1: true, exclusive2: 'hi'};
+//=> Error
+```
+*/
+export type MergeExclusive<FirstType, SecondType> =
+ (FirstType | SecondType) extends object ?
+ (Without<FirstType, SecondType> & SecondType) | (Without<SecondType, FirstType> & FirstType) :
+ FirstType | SecondType;
+
diff --git a/node_modules/type-fest/source/merge.d.ts b/node_modules/type-fest/source/merge.d.ts
new file mode 100644
index 0000000..4b3920b
--- /dev/null
+++ b/node_modules/type-fest/source/merge.d.ts
@@ -0,0 +1,22 @@
+import {Except} from './except';
+
+/**
+Merge two types into a new type. Keys of the second type overrides keys of the first type.
+
+@example
+```
+import {Merge} from 'type-fest';
+
+type Foo = {
+ a: number;
+ b: string;
+};
+
+type Bar = {
+ b: number;
+};
+
+const ab: Merge<Foo, Bar> = {a: 1, b: 2};
+```
+*/
+export type Merge<FirstType, SecondType> = Except<FirstType, Extract<keyof FirstType, keyof SecondType>> & SecondType;
diff --git a/node_modules/type-fest/source/mutable.d.ts b/node_modules/type-fest/source/mutable.d.ts
new file mode 100644
index 0000000..03d0dda
--- /dev/null
+++ b/node_modules/type-fest/source/mutable.d.ts
@@ -0,0 +1,22 @@
+/**
+Convert an object with `readonly` keys into a mutable object. Inverse of `Readonly<T>`.
+
+This can be used to [store and mutate options within a class](https://github.com/sindresorhus/pageres/blob/4a5d05fca19a5fbd2f53842cbf3eb7b1b63bddd2/source/index.ts#L72), [edit `readonly` objects within tests](https://stackoverflow.com/questions/50703834), and [construct a `readonly` object within a function](https://github.com/Microsoft/TypeScript/issues/24509).
+
+@example
+```
+import {Mutable} from 'type-fest';
+
+type Foo = {
+ readonly a: number;
+ readonly b: string;
+};
+
+const mutableFoo: Mutable<Foo> = {a: 1, b: '2'};
+mutableFoo.a = 3;
+```
+*/
+export type Mutable<ObjectType> = {
+ // For each `Key` in the keys of `ObjectType`, make a mapped type by removing the `readonly` modifier from the key.
+ -readonly [KeyType in keyof ObjectType]: ObjectType[KeyType];
+};
diff --git a/node_modules/type-fest/source/opaque.d.ts b/node_modules/type-fest/source/opaque.d.ts
new file mode 100644
index 0000000..20ab964
--- /dev/null
+++ b/node_modules/type-fest/source/opaque.d.ts
@@ -0,0 +1,65 @@
+/**
+Create an opaque type, which hides its internal details from the public, and can only be created by being used explicitly.
+
+The generic type parameter can be anything. It doesn't have to be an object.
+
+[Read more about opaque types.](https://codemix.com/opaque-types-in-javascript/)
+
+There have been several discussions about adding this feature to TypeScript via the `opaque type` operator, similar to how Flow does it. Unfortunately, nothing has (yet) moved forward:
+ - [Microsoft/TypeScript#15408](https://github.com/Microsoft/TypeScript/issues/15408)
+ - [Microsoft/TypeScript#15807](https://github.com/Microsoft/TypeScript/issues/15807)
+
+@example
+```
+import {Opaque} from 'type-fest';
+
+type AccountNumber = Opaque<number, 'AccountNumber'>;
+type AccountBalance = Opaque<number, 'AccountBalance'>;
+
+// The Token parameter allows the compiler to differentiate between types, whereas "unknown" will not. For example, consider the following structures:
+type ThingOne = Opaque<string>;
+type ThingTwo = Opaque<string>;
+
+// To the compiler, these types are allowed to be cast to each other as they have the same underlying type. They are both `string & { __opaque__: unknown }`.
+// To avoid this behaviour, you would instead pass the "Token" parameter, like so.
+type NewThingOne = Opaque<string, 'ThingOne'>;
+type NewThingTwo = Opaque<string, 'ThingTwo'>;
+
+// Now they're completely separate types, so the following will fail to compile.
+function createNewThingOne (): NewThingOne {
+ // As you can see, casting from a string is still allowed. However, you may not cast NewThingOne to NewThingTwo, and vice versa.
+ return 'new thing one' as NewThingOne;
+}
+
+// This will fail to compile, as they are fundamentally different types.
+const thingTwo = createNewThingOne() as NewThingTwo;
+
+// Here's another example of opaque typing.
+function createAccountNumber(): AccountNumber {
+ return 2 as AccountNumber;
+}
+
+function getMoneyForAccount(accountNumber: AccountNumber): AccountBalance {
+ return 4 as AccountBalance;
+}
+
+// This will compile successfully.
+getMoneyForAccount(createAccountNumber());
+
+// But this won't, because it has to be explicitly passed as an `AccountNumber` type.
+getMoneyForAccount(2);
+
+// You can use opaque values like they aren't opaque too.
+const accountNumber = createAccountNumber();
+
+// This will not compile successfully.
+const newAccountNumber = accountNumber + 2;
+
+// As a side note, you can (and should) use recursive types for your opaque types to make them stronger and hopefully easier to type.
+type Person = {
+ id: Opaque<number, Person>;
+ name: string;
+};
+```
+*/
+export type Opaque<Type, Token = unknown> = Type & {readonly __opaque__: Token};
diff --git a/node_modules/type-fest/source/package-json.d.ts b/node_modules/type-fest/source/package-json.d.ts
new file mode 100644
index 0000000..9699b48
--- /dev/null
+++ b/node_modules/type-fest/source/package-json.d.ts
@@ -0,0 +1,585 @@
+import {LiteralUnion} from '..';
+
+declare namespace PackageJson {
+ /**
+ A person who has been involved in creating or maintaining the package.
+ */
+ export type Person =
+ | string
+ | {
+ name: string;
+ url?: string;
+ email?: string;
+ };
+
+ export type BugsLocation =
+ | string
+ | {
+ /**
+ The URL to the package's issue tracker.
+ */
+ url?: string;
+
+ /**
+ The email address to which issues should be reported.
+ */
+ email?: string;
+ };
+
+ export interface DirectoryLocations {
+ [directoryType: string]: unknown;
+
+ /**
+ Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder.
+ */
+ bin?: string;
+
+ /**
+ Location for Markdown files.
+ */
+ doc?: string;
+
+ /**
+ Location for example scripts.
+ */
+ example?: string;
+
+ /**
+ Location for the bulk of the library.
+ */
+ lib?: string;
+
+ /**
+ Location for man pages. Sugar to generate a `man` array by walking the folder.
+ */
+ man?: string;
+
+ /**
+ Location for test files.
+ */
+ test?: string;
+ }
+
+ export type Scripts = {
+ /**
+ Run **before** the package is published (Also run on local `npm install` without any arguments).
+ */
+ prepublish?: string;
+
+ /**
+ Run both **before** the package is packed and published, and on local `npm install` without any arguments. This is run **after** `prepublish`, but **before** `prepublishOnly`.
+ */
+ prepare?: string;
+
+ /**
+ Run **before** the package is prepared and packed, **only** on `npm publish`.
+ */
+ prepublishOnly?: string;
+
+ /**
+ Run **before** a tarball is packed (on `npm pack`, `npm publish`, and when installing git dependencies).
+ */
+ prepack?: string;
+
+ /**
+ Run **after** the tarball has been generated and moved to its final destination.
+ */
+ postpack?: string;
+
+ /**
+ Run **after** the package is published.
+ */
+ publish?: string;
+
+ /**
+ Run **after** the package is published.
+ */
+ postpublish?: string;
+
+ /**
+ Run **before** the package is installed.
+ */
+ preinstall?: string;
+
+ /**
+ Run **after** the package is installed.
+ */
+ install?: string;
+
+ /**
+ Run **after** the package is installed and after `install`.
+ */
+ postinstall?: string;
+
+ /**
+ Run **before** the package is uninstalled and before `uninstall`.
+ */
+ preuninstall?: string;
+
+ /**
+ Run **before** the package is uninstalled.
+ */
+ uninstall?: string;
+
+ /**
+ Run **after** the package is uninstalled.
+ */
+ postuninstall?: string;
+
+ /**
+ Run **before** bump the package version and before `version`.
+ */
+ preversion?: string;
+
+ /**
+ Run **before** bump the package version.
+ */
+ version?: string;
+
+ /**
+ Run **after** bump the package version.
+ */
+ postversion?: string;
+
+ /**
+ Run with the `npm test` command, before `test`.
+ */
+ pretest?: string;
+
+ /**
+ Run with the `npm test` command.
+ */
+ test?: string;
+
+ /**
+ Run with the `npm test` command, after `test`.
+ */
+ posttest?: string;
+
+ /**
+ Run with the `npm stop` command, before `stop`.
+ */
+ prestop?: string;
+
+ /**
+ Run with the `npm stop` command.
+ */
+ stop?: string;
+
+ /**
+ Run with the `npm stop` command, after `stop`.
+ */
+ poststop?: string;
+
+ /**
+ Run with the `npm start` command, before `start`.
+ */
+ prestart?: string;
+
+ /**
+ Run with the `npm start` command.
+ */
+ start?: string;
+
+ /**
+ Run with the `npm start` command, after `start`.
+ */
+ poststart?: string;
+
+ /**
+ Run with the `npm restart` command, before `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
+ */
+ prerestart?: string;
+
+ /**
+ Run with the `npm restart` command. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
+ */
+ restart?: string;
+
+ /**
+ Run with the `npm restart` command, after `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
+ */
+ postrestart?: string;
+ } & {
+ [scriptName: string]: string;
+ };
+
+ /**
+ Dependencies of the package. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or Git URL.
+ */
+ export interface Dependency {
+ [packageName: string]: string;
+ }
+
+ export interface NonStandardEntryPoints {
+ /**
+ An ECMAScript module ID that is the primary entry point to the program.
+ */
+ module?: string;
+
+ /**
+ A module ID with untranspiled code that is the primary entry point to the program.
+ */
+ esnext?:
+ | string
+ | {
+ [moduleName: string]: string | undefined;
+ main?: string;
+ browser?: string;
+ };
+
+ /**
+ A hint to JavaScript bundlers or component tools when packaging modules for client side use.
+ */
+ browser?:
+ | string
+ | {
+ [moduleName: string]: string | false;
+ };
+
+ /**
+ Denote which files in your project are "pure" and therefore safe for Webpack to prune if unused.
+
+ [Read more.](https://webpack.js.org/guides/tree-shaking/)
+ */
+ sideEffects?: boolean | string[];
+ }
+
+ export interface TypeScriptConfiguration {
+ /**
+ Location of the bundled TypeScript declaration file.
+ */
+ types?: string;
+
+ /**
+ Location of the bundled TypeScript declaration file. Alias of `types`.
+ */
+ typings?: string;
+ }
+
+ /**
+ An alternative configuration for Yarn workspaces.
+ */
+ export interface WorkspaceConfig {
+ /**
+ An array of workspace pattern strings which contain the workspace packages.
+ */
+ packages?: WorkspacePattern[];
+
+ /**
+ Designed to solve the problem of packages which break when their `node_modules` are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via `node_modules`, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.
+
+ [Read more](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/)
+ */
+ nohoist?: WorkspacePattern[];
+ }
+
+ /**
+ A workspace pattern points to a directory or group of directories which contain packages that should be included in the workspace installation process.
+
+ The patterns are handled with [minimatch](https://github.com/isaacs/minimatch).
+
+ @example
+ `docs` → Include the docs directory and install its dependencies.
+ `packages/*` → Include all nested directories within the packages directory, like `packages/cli` and `packages/core`.
+ */
+ type WorkspacePattern = string;
+
+ export interface YarnConfiguration {
+ /**
+ Used to configure [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
+
+ Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run `yarn install` once to install all of them in a single pass.
+
+ Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
+ */
+ workspaces?: WorkspacePattern[] | WorkspaceConfig;
+
+ /**
+ If your package only allows one version of a given dependency, and you’d like to enforce the same behavior as `yarn install --flat` on the command-line, set this to `true`.
+
+ Note that if your `package.json` contains `"flat": true` and other packages depend on yours (e.g. you are building a library rather than an app), those other packages will also need `"flat": true` in their `package.json` or be installed with `yarn install --flat` on the command-line.
+ */
+ flat?: boolean;
+
+ /**
+ Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the `yarn.lock` file.
+ */
+ resolutions?: Dependency;
+ }
+
+ export interface JSPMConfiguration {
+ /**
+ JSPM configuration.
+ */
+ jspm?: PackageJson;
+ }
+}
+
+/**
+Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Also includes types for fields used by other popular projects, like TypeScript and Yarn.
+*/
+export type PackageJson = {
+ /**
+ The name of the package.
+ */
+ name?: string;
+
+ /**
+ Package version, parseable by [`node-semver`](https://github.com/npm/node-semver).
+ */
+ version?: string;
+
+ /**
+ Package description, listed in `npm search`.
+ */
+ description?: string;
+
+ /**
+ Keywords associated with package, listed in `npm search`.
+ */
+ keywords?: string[];
+
+ /**
+ The URL to the package's homepage.
+ */
+ homepage?: LiteralUnion<'.', string>;
+
+ /**
+ The URL to the package's issue tracker and/or the email address to which issues should be reported.
+ */
+ bugs?: PackageJson.BugsLocation;
+
+ /**
+ The license for the package.
+ */
+ license?: string;
+
+ /**
+ The licenses for the package.
+ */
+ licenses?: Array<{
+ type?: string;
+ url?: string;
+ }>;
+
+ author?: PackageJson.Person;
+
+ /**
+ A list of people who contributed to the package.
+ */
+ contributors?: PackageJson.Person[];
+
+ /**
+ A list of people who maintain the package.
+ */
+ maintainers?: PackageJson.Person[];
+
+ /**
+ The files included in the package.
+ */
+ files?: string[];
+
+ /**
+ The module ID that is the primary entry point to the program.
+ */
+ main?: string;
+
+ /**
+ The executable files that should be installed into the `PATH`.
+ */
+ bin?:
+ | string
+ | {
+ [binary: string]: string;
+ };
+
+ /**
+ Filenames to put in place for the `man` program to find.
+ */
+ man?: string | string[];
+
+ /**
+ Indicates the structure of the package.
+ */
+ directories?: PackageJson.DirectoryLocations;
+
+ /**
+ Location for the code repository.
+ */
+ repository?:
+ | string
+ | {
+ type: string;
+ url: string;
+
+ /**
+ Relative path to package.json if it is placed in non-root directory (for example if it is part of a monorepo).
+
+ [Read more.](https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md)
+ */
+ directory?: string;
+ };
+
+ /**
+ Script commands that are run at various times in the lifecycle of the package. The key is the lifecycle event, and the value is the command to run at that point.
+ */
+ scripts?: PackageJson.Scripts;
+
+ /**
+ Is used to set configuration parameters used in package scripts that persist across upgrades.
+ */
+ config?: {
+ [configKey: string]: unknown;
+ };
+
+ /**
+ The dependencies of the package.
+ */
+ dependencies?: PackageJson.Dependency;
+
+ /**
+ Additional tooling dependencies that are not required for the package to work. Usually test, build, or documentation tooling.
+ */
+ devDependencies?: PackageJson.Dependency;
+
+ /**
+ Dependencies that are skipped if they fail to install.
+ */
+ optionalDependencies?: PackageJson.Dependency;
+
+ /**
+ Dependencies that will usually be required by the package user directly or via another dependency.
+ */
+ peerDependencies?: PackageJson.Dependency;
+
+ /**
+ Indicate peer dependencies that are optional.
+ */
+ peerDependenciesMeta?: {
+ [packageName: string]: {
+ optional: true;
+ };
+ };
+
+ /**
+ Package names that are bundled when the package is published.
+ */
+ bundledDependencies?: string[];
+
+ /**
+ Alias of `bundledDependencies`.
+ */
+ bundleDependencies?: string[];
+
+ /**
+ Engines that this package runs on.
+ */
+ engines?: {
+ [EngineName in 'npm' | 'node' | string]: string;
+ };
+
+ /**
+ @deprecated
+ */
+ engineStrict?: boolean;
+
+ /**
+ Operating systems the module runs on.
+ */
+ os?: Array<LiteralUnion<
+ | 'aix'
+ | 'darwin'
+ | 'freebsd'
+ | 'linux'
+ | 'openbsd'
+ | 'sunos'
+ | 'win32'
+ | '!aix'
+ | '!darwin'
+ | '!freebsd'
+ | '!linux'
+ | '!openbsd'
+ | '!sunos'
+ | '!win32',
+ string
+ >>;
+
+ /**
+ CPU architectures the module runs on.
+ */
+ cpu?: Array<LiteralUnion<
+ | 'arm'
+ | 'arm64'
+ | 'ia32'
+ | 'mips'
+ | 'mipsel'
+ | 'ppc'
+ | 'ppc64'
+ | 's390'
+ | 's390x'
+ | 'x32'
+ | 'x64'
+ | '!arm'
+ | '!arm64'
+ | '!ia32'
+ | '!mips'
+ | '!mipsel'
+ | '!ppc'
+ | '!ppc64'
+ | '!s390'
+ | '!s390x'
+ | '!x32'
+ | '!x64',
+ string
+ >>;
+
+ /**
+ If set to `true`, a warning will be shown if package is installed locally. Useful if the package is primarily a command-line application that should be installed globally.
+
+ @deprecated
+ */
+ preferGlobal?: boolean;
+
+ /**
+ If set to `true`, then npm will refuse to publish it.
+ */
+ private?: boolean;
+
+ /**
+ A set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default.
+ */
+ publishConfig?: {
+ [config: string]: unknown;
+ };
+
+ /**
+ Describes and notifies consumers of a package's monetary support information.
+
+ [Read more.](https://github.com/npm/rfcs/blob/latest/accepted/0017-add-funding-support.md)
+ */
+ funding?: string | {
+ /**
+ The type of funding.
+ */
+ type?: LiteralUnion<
+ | 'github'
+ | 'opencollective'
+ | 'patreon'
+ | 'individual'
+ | 'foundation'
+ | 'corporation',
+ string
+ >;
+ /**
+ The URL to the funding page.
+ */
+ url: string;
+ };
+} &
+PackageJson.NonStandardEntryPoints &
+PackageJson.TypeScriptConfiguration &
+PackageJson.YarnConfiguration &
+PackageJson.JSPMConfiguration & {
+ [key: string]: unknown;
+};
diff --git a/node_modules/type-fest/source/partial-deep.d.ts b/node_modules/type-fest/source/partial-deep.d.ts
new file mode 100644
index 0000000..b962b84
--- /dev/null
+++ b/node_modules/type-fest/source/partial-deep.d.ts
@@ -0,0 +1,72 @@
+import {Primitive} from './basic';
+
+/**
+Create a type from another type with all keys and nested keys set to optional.
+
+Use-cases:
+- Merging a default settings/config object with another object, the second object would be a deep partial of the default object.
+- Mocking and testing complex entities, where populating an entire object with its keys would be redundant in terms of the mock or test.
+
+@example
+```
+import {PartialDeep} from 'type-fest';
+
+const settings: Settings = {
+ textEditor: {
+ fontSize: 14;
+ fontColor: '#000000';
+ fontWeight: 400;
+ }
+ autocomplete: false;
+ autosave: true;
+};
+
+const applySavedSettings = (savedSettings: PartialDeep<Settings>) => {
+ return {...settings, ...savedSettings};
+}
+
+settings = applySavedSettings({textEditor: {fontWeight: 500}});
+```
+*/
+export type PartialDeep<T> = T extends Primitive
+ ? Partial<T>
+ : T extends Map<infer KeyType, infer ValueType>
+ ? PartialMapDeep<KeyType, ValueType>
+ : T extends Set<infer ItemType>
+ ? PartialSetDeep<ItemType>
+ : T extends ReadonlyMap<infer KeyType, infer ValueType>
+ ? PartialReadonlyMapDeep<KeyType, ValueType>
+ : T extends ReadonlySet<infer ItemType>
+ ? PartialReadonlySetDeep<ItemType>
+ : T extends ((...arguments: any[]) => unknown)
+ ? T | undefined
+ : T extends object
+ ? PartialObjectDeep<T>
+ : unknown;
+
+/**
+Same as `PartialDeep`, but accepts only `Map`s and as inputs. Internal helper for `PartialDeep`.
+*/
+interface PartialMapDeep<KeyType, ValueType> extends Map<PartialDeep<KeyType>, PartialDeep<ValueType>> {}
+
+/**
+Same as `PartialDeep`, but accepts only `Set`s as inputs. Internal helper for `PartialDeep`.
+*/
+interface PartialSetDeep<T> extends Set<PartialDeep<T>> {}
+
+/**
+Same as `PartialDeep`, but accepts only `ReadonlyMap`s as inputs. Internal helper for `PartialDeep`.
+*/
+interface PartialReadonlyMapDeep<KeyType, ValueType> extends ReadonlyMap<PartialDeep<KeyType>, PartialDeep<ValueType>> {}
+
+/**
+Same as `PartialDeep`, but accepts only `ReadonlySet`s as inputs. Internal helper for `PartialDeep`.
+*/
+interface PartialReadonlySetDeep<T> extends ReadonlySet<PartialDeep<T>> {}
+
+/**
+Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
+*/
+type PartialObjectDeep<ObjectType extends object> = {
+ [KeyType in keyof ObjectType]?: PartialDeep<ObjectType[KeyType]>
+};
diff --git a/node_modules/type-fest/source/promisable.d.ts b/node_modules/type-fest/source/promisable.d.ts
new file mode 100644
index 0000000..71242a5
--- /dev/null
+++ b/node_modules/type-fest/source/promisable.d.ts
@@ -0,0 +1,23 @@
+/**
+Create a type that represents either the value or the value wrapped in `PromiseLike`.
+
+Use-cases:
+- A function accepts a callback that may either return a value synchronously or may return a promised value.
+- This type could be the return type of `Promise#then()`, `Promise#catch()`, and `Promise#finally()` callbacks.
+
+Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/31394) if you want to have this type as a built-in in TypeScript.
+
+@example
+```
+import {Promisable} from 'type-fest';
+
+async function logger(getLogEntry: () => Promisable<string>): Promise<void> {
+ const entry = await getLogEntry();
+ console.log(entry);
+}
+
+logger(() => 'foo');
+logger(() => Promise.resolve('bar'));
+```
+*/
+export type Promisable<T> = T | PromiseLike<T>;
diff --git a/node_modules/type-fest/source/promise-value.d.ts b/node_modules/type-fest/source/promise-value.d.ts
new file mode 100644
index 0000000..7686dd1
--- /dev/null
+++ b/node_modules/type-fest/source/promise-value.d.ts
@@ -0,0 +1,20 @@
+/**
+Returns the type that is wrapped inside a `Promise` type.
+If the type is not a `Promise`, the type itself is returned.
+
+@example
+```
+import {PromiseValue} from 'type-fest';
+
+type AsyncData = Promise<string>;
+let asyncData: PromiseValue<AsyncData> = Promise.resolve('ABC');
+
+type Data = PromiseValue<AsyncData>;
+let data: Data = await asyncData;
+
+// Here's an example that shows how this type reacts to non-Promise types.
+type SyncData = PromiseValue<string>;
+let syncData: SyncData = getSyncData();
+```
+*/
+export type PromiseValue<PromiseType, Otherwise = PromiseType> = PromiseType extends Promise<infer Value> ? Value : Otherwise;
diff --git a/node_modules/type-fest/source/readonly-deep.d.ts b/node_modules/type-fest/source/readonly-deep.d.ts
new file mode 100644
index 0000000..b8c04de
--- /dev/null
+++ b/node_modules/type-fest/source/readonly-deep.d.ts
@@ -0,0 +1,59 @@
+import {Primitive} from './basic';
+
+/**
+Convert `object`s, `Map`s, `Set`s, and `Array`s and all of their keys/elements into immutable structures recursively.
+
+This is useful when a deeply nested structure needs to be exposed as completely immutable, for example, an imported JSON module or when receiving an API response that is passed around.
+
+Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/13923) if you want to have this type as a built-in in TypeScript.
+
+@example
+```
+// data.json
+{
+ "foo": ["bar"]
+}
+
+// main.ts
+import {ReadonlyDeep} from 'type-fest';
+import dataJson = require('./data.json');
+
+const data: ReadonlyDeep<typeof dataJson> = dataJson;
+
+export default data;
+
+// test.ts
+import data from './main';
+
+data.foo.push('bar');
+//=> error TS2339: Property 'push' does not exist on type 'readonly string[]'
+```
+*/
+export type ReadonlyDeep<T> = T extends Primitive | ((...arguments: any[]) => unknown)
+ ? T
+ : T extends ReadonlyMap<infer KeyType, infer ValueType>
+ ? ReadonlyMapDeep<KeyType, ValueType>
+ : T extends ReadonlySet<infer ItemType>
+ ? ReadonlySetDeep<ItemType>
+ : T extends object
+ ? ReadonlyObjectDeep<T>
+ : unknown;
+
+/**
+Same as `ReadonlyDeep`, but accepts only `ReadonlyMap`s as inputs. Internal helper for `ReadonlyDeep`.
+*/
+interface ReadonlyMapDeep<KeyType, ValueType>
+ extends ReadonlyMap<ReadonlyDeep<KeyType>, ReadonlyDeep<ValueType>> {}
+
+/**
+Same as `ReadonlyDeep`, but accepts only `ReadonlySet`s as inputs. Internal helper for `ReadonlyDeep`.
+*/
+interface ReadonlySetDeep<ItemType>
+ extends ReadonlySet<ReadonlyDeep<ItemType>> {}
+
+/**
+Same as `ReadonlyDeep`, but accepts only `object`s as inputs. Internal helper for `ReadonlyDeep`.
+*/
+type ReadonlyObjectDeep<ObjectType extends object> = {
+ readonly [KeyType in keyof ObjectType]: ReadonlyDeep<ObjectType[KeyType]>
+};
diff --git a/node_modules/type-fest/source/require-at-least-one.d.ts b/node_modules/type-fest/source/require-at-least-one.d.ts
new file mode 100644
index 0000000..337379f
--- /dev/null
+++ b/node_modules/type-fest/source/require-at-least-one.d.ts
@@ -0,0 +1,32 @@
+import {Except} from './except';
+
+/**
+Create a type that requires at least one of the given keys. The remaining keys are kept as is.
+
+@example
+```
+import {RequireAtLeastOne} from 'type-fest';
+
+type Responder = {
+ text?: () => string;
+ json?: () => string;
+
+ secure?: boolean;
+};
+
+const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
+ json: () => '{"message": "ok"}',
+ secure: true
+};
+```
+*/
+export type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> =
+ {
+ // For each Key in KeysType make a mapped type
+ [Key in KeysType]: (
+ // …by picking that Key's type and making it required
+ Required<Pick<ObjectType, Key>>
+ )
+ }[KeysType]
+ // …then, make intersection types by adding the remaining keys to each mapped type.
+ & Except<ObjectType, KeysType>;
diff --git a/node_modules/type-fest/source/require-exactly-one.d.ts b/node_modules/type-fest/source/require-exactly-one.d.ts
new file mode 100644
index 0000000..c3e7e7e
--- /dev/null
+++ b/node_modules/type-fest/source/require-exactly-one.d.ts
@@ -0,0 +1,35 @@
+// TODO: Remove this when we target TypeScript >=3.5.
+type _Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
+
+/**
+Create a type that requires exactly one of the given keys and disallows more. The remaining keys are kept as is.
+
+Use-cases:
+- Creating interfaces for components that only need one of the keys to display properly.
+- Declaring generic keys in a single place for a single use-case that gets narrowed down via `RequireExactlyOne`.
+
+The caveat with `RequireExactlyOne` is that TypeScript doesn't always know at compile time every key that will exist at runtime. Therefore `RequireExactlyOne` can't do anything to prevent extra keys it doesn't know about.
+
+@example
+```
+import {RequireExactlyOne} from 'type-fest';
+
+type Responder = {
+ text: () => string;
+ json: () => string;
+ secure: boolean;
+};
+
+const responder: RequireExactlyOne<Responder, 'text' | 'json'> = {
+ // Adding a `text` key here would cause a compile error.
+
+ json: () => '{"message": "ok"}',
+ secure: true
+};
+```
+*/
+export type RequireExactlyOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> =
+ {[Key in KeysType]: (
+ Required<Pick<ObjectType, Key>> &
+ Partial<Record<Exclude<KeysType, Key>, never>>
+ )}[KeysType] & _Omit<ObjectType, KeysType>;
diff --git a/node_modules/type-fest/source/set-optional.d.ts b/node_modules/type-fest/source/set-optional.d.ts
new file mode 100644
index 0000000..3539899
--- /dev/null
+++ b/node_modules/type-fest/source/set-optional.d.ts
@@ -0,0 +1,34 @@
+import {Except} from './except';
+
+/**
+Create a type that makes the given keys optional. The remaining keys are kept as is. The sister of the `SetRequired` type.
+
+Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional.
+
+@example
+```
+import {SetOptional} from 'type-fest';
+
+type Foo = {
+ a: number;
+ b?: string;
+ c: boolean;
+}
+
+type SomeOptional = SetOptional<Foo, 'b' | 'c'>;
+// type SomeOptional = {
+// a: number;
+// b?: string; // Was already optional and still is.
+// c?: boolean; // Is now optional.
+// }
+```
+*/
+export type SetOptional<BaseType, Keys extends keyof BaseType = keyof BaseType> =
+ // Pick just the keys that are not optional from the base type.
+ Except<BaseType, Keys> &
+ // Pick the keys that should be optional from the base type and make them optional.
+ Partial<Pick<BaseType, Keys>> extends
+ // If `InferredType` extends the previous, then for each key, use the inferred type key.
+ infer InferredType
+ ? {[KeyType in keyof InferredType]: InferredType[KeyType]}
+ : never;
diff --git a/node_modules/type-fest/source/set-required.d.ts b/node_modules/type-fest/source/set-required.d.ts
new file mode 100644
index 0000000..0a72330
--- /dev/null
+++ b/node_modules/type-fest/source/set-required.d.ts
@@ -0,0 +1,34 @@
+import {Except} from './except';
+
+/**
+Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type.
+
+Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
+
+@example
+```
+import {SetRequired} from 'type-fest';
+
+type Foo = {
+ a?: number;
+ b: string;
+ c?: boolean;
+}
+
+type SomeRequired = SetRequired<Foo, 'b' | 'c'>;
+// type SomeRequired = {
+// a?: number;
+// b: string; // Was already required and still is.
+// c: boolean; // Is now required.
+// }
+```
+*/
+export type SetRequired<BaseType, Keys extends keyof BaseType = keyof BaseType> =
+ // Pick just the keys that are not required from the base type.
+ Except<BaseType, Keys> &
+ // Pick the keys that should be required from the base type and make them required.
+ Required<Pick<BaseType, Keys>> extends
+ // If `InferredType` extends the previous, then for each key, use the inferred type key.
+ infer InferredType
+ ? {[KeyType in keyof InferredType]: InferredType[KeyType]}
+ : never;
diff --git a/node_modules/type-fest/source/stringified.d.ts b/node_modules/type-fest/source/stringified.d.ts
new file mode 100644
index 0000000..9688b67
--- /dev/null
+++ b/node_modules/type-fest/source/stringified.d.ts
@@ -0,0 +1,21 @@
+/**
+Create a type with the keys of the given type changed to `string` type.
+
+Use-case: Changing interface values to strings in order to use them in a form model.
+
+@example
+```
+import {Stringified} from 'type-fest';
+
+type Car {
+ model: string;
+ speed: number;
+}
+
+const carForm: Stringified<Car> = {
+ model: 'Foo',
+ speed: '101'
+};
+```
+*/
+export type Stringified<ObjectType> = {[KeyType in keyof ObjectType]: string};
diff --git a/node_modules/type-fest/source/tsconfig-json.d.ts b/node_modules/type-fest/source/tsconfig-json.d.ts
new file mode 100644
index 0000000..c51a821
--- /dev/null
+++ b/node_modules/type-fest/source/tsconfig-json.d.ts
@@ -0,0 +1,872 @@
+declare namespace TsConfigJson {
+ namespace CompilerOptions {
+ export type JSX =
+ | 'preserve'
+ | 'react'
+ | 'react-native';
+
+ export type Module =
+ | 'CommonJS'
+ | 'AMD'
+ | 'System'
+ | 'UMD'
+ | 'ES6'
+ | 'ES2015'
+ | 'ESNext'
+ | 'None'
+ // Lowercase alternatives
+ | 'commonjs'
+ | 'amd'
+ | 'system'
+ | 'umd'
+ | 'es6'
+ | 'es2015'
+ | 'esnext'
+ | 'none';
+
+ export type NewLine =
+ | 'CRLF'
+ | 'LF'
+ // Lowercase alternatives
+ | 'crlf'
+ | 'lf';
+
+ export type Target =
+ | 'ES3'
+ | 'ES5'
+ | 'ES6'
+ | 'ES2015'
+ | 'ES2016'
+ | 'ES2017'
+ | 'ES2018'
+ | 'ES2019'
+ | 'ES2020'
+ | 'ESNext'
+ // Lowercase alternatives
+ | 'es3'
+ | 'es5'
+ | 'es6'
+ | 'es2015'
+ | 'es2016'
+ | 'es2017'
+ | 'es2018'
+ | 'es2019'
+ | 'es2020'
+ | 'esnext';
+
+ export type Lib =
+ | 'ES5'
+ | 'ES6'
+ | 'ES7'
+ | 'ES2015'
+ | 'ES2015.Collection'
+ | 'ES2015.Core'
+ | 'ES2015.Generator'
+ | 'ES2015.Iterable'
+ | 'ES2015.Promise'
+ | 'ES2015.Proxy'
+ | 'ES2015.Reflect'
+ | 'ES2015.Symbol.WellKnown'
+ | 'ES2015.Symbol'
+ | 'ES2016'
+ | 'ES2016.Array.Include'
+ | 'ES2017'
+ | 'ES2017.Intl'
+ | 'ES2017.Object'
+ | 'ES2017.SharedMemory'
+ | 'ES2017.String'
+ | 'ES2017.TypedArrays'
+ | 'ES2018'
+ | 'ES2018.AsyncIterable'
+ | 'ES2018.Intl'
+ | 'ES2018.Promise'
+ | 'ES2018.Regexp'
+ | 'ES2019'
+ | 'ES2019.Array'
+ | 'ES2019.Object'
+ | 'ES2019.String'
+ | 'ES2019.Symbol'
+ | 'ES2020'
+ | 'ES2020.String'
+ | 'ES2020.Symbol.WellKnown'
+ | 'ESNext'
+ | 'ESNext.Array'
+ | 'ESNext.AsyncIterable'
+ | 'ESNext.BigInt'
+ | 'ESNext.Intl'
+ | 'ESNext.Symbol'
+ | 'DOM'
+ | 'DOM.Iterable'
+ | 'ScriptHost'
+ | 'WebWorker'
+ | 'WebWorker.ImportScripts'
+ // Lowercase alternatives
+ | 'es5'
+ | 'es6'
+ | 'es7'
+ | 'es2015'
+ | 'es2015.collection'
+ | 'es2015.core'
+ | 'es2015.generator'
+ | 'es2015.iterable'
+ | 'es2015.promise'
+ | 'es2015.proxy'
+ | 'es2015.reflect'
+ | 'es2015.symbol.wellknown'
+ | 'es2015.symbol'
+ | 'es2016'
+ | 'es2016.array.include'
+ | 'es2017'
+ | 'es2017.intl'
+ | 'es2017.object'
+ | 'es2017.sharedmemory'
+ | 'es2017.string'
+ | 'es2017.typedarrays'
+ | 'es2018'
+ | 'es2018.asynciterable'
+ | 'es2018.intl'
+ | 'es2018.promise'
+ | 'es2018.regexp'
+ | 'es2019'
+ | 'es2019.array'
+ | 'es2019.object'
+ | 'es2019.string'
+ | 'es2019.symbol'
+ | 'es2020'
+ | 'es2020.string'
+ | 'es2020.symbol.wellknown'
+ | 'esnext'
+ | 'esnext.array'
+ | 'esnext.asynciterable'
+ | 'esnext.bigint'
+ | 'esnext.intl'
+ | 'esnext.symbol'
+ | 'dom'
+ | 'dom.iterable'
+ | 'scripthost'
+ | 'webworker'
+ | 'webworker.importscripts';
+
+ export interface Plugin {
+ [key: string]: unknown;
+ /**
+ Plugin name.
+ */
+ name?: string;
+ }
+ }
+
+ export interface CompilerOptions {
+ /**
+ The character set of the input files.
+
+ @default 'utf8'
+ */
+ charset?: string;
+
+ /**
+ Enables building for project references.
+
+ @default true
+ */
+ composite?: boolean;
+
+ /**
+ Generates corresponding d.ts files.
+
+ @default false
+ */
+ declaration?: boolean;
+
+ /**
+ Specify output directory for generated declaration files.
+
+ Requires TypeScript version 2.0 or later.
+ */
+ declarationDir?: string;
+
+ /**
+ Show diagnostic information.
+
+ @default false
+ */
+ diagnostics?: boolean;
+
+ /**
+ Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
+
+ @default false
+ */
+ emitBOM?: boolean;
+
+ /**
+ Only emit `.d.ts` declaration files.
+
+ @default false
+ */
+ emitDeclarationOnly?: boolean;
+
+ /**
+ Enable incremental compilation.
+
+ @default `composite`
+ */
+ incremental?: boolean;
+
+ /**
+ Specify file to store incremental compilation information.
+
+ @default '.tsbuildinfo'
+ */
+ tsBuildInfoFile?: string;
+
+ /**
+ Emit a single file with source maps instead of having a separate file.
+
+ @default false
+ */
+ inlineSourceMap?: boolean;
+
+ /**
+ Emit the source alongside the sourcemaps within a single file.
+
+ Requires `--inlineSourceMap` to be set.
+
+ @default false
+ */
+ inlineSources?: boolean;
+
+ /**
+ Specify JSX code generation: `'preserve'`, `'react'`, or `'react-native'`.
+
+ @default 'preserve'
+ */
+ jsx?: CompilerOptions.JSX;
+
+ /**
+ Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit.
+
+ @default 'React'
+ */
+ reactNamespace?: string;
+
+ /**
+ Print names of files part of the compilation.
+
+ @default false
+ */
+ listFiles?: boolean;
+
+ /**
+ Specifies the location where debugger should locate map files instead of generated locations.
+ */
+ mapRoot?: string;
+
+ /**
+ Specify module code generation: 'None', 'CommonJS', 'AMD', 'System', 'UMD', 'ES6', 'ES2015' or 'ESNext'. Only 'AMD' and 'System' can be used in conjunction with `--outFile`. 'ES6' and 'ES2015' values may be used when targeting 'ES5' or lower.
+
+ @default ['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6'
+ */
+ module?: CompilerOptions.Module;
+
+ /**
+ Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).
+
+ Default: Platform specific
+ */
+ newLine?: CompilerOptions.NewLine;
+
+ /**
+ Do not emit output.
+
+ @default false
+ */
+ noEmit?: boolean;
+
+ /**
+ Do not generate custom helper functions like `__extends` in compiled output.
+
+ @default false
+ */
+ noEmitHelpers?: boolean;
+
+ /**
+ Do not emit outputs if any type checking errors were reported.
+
+ @default false
+ */
+ noEmitOnError?: boolean;
+
+ /**
+ Warn on expressions and declarations with an implied 'any' type.
+
+ @default false
+ */
+ noImplicitAny?: boolean;
+
+ /**
+ Raise error on 'this' expressions with an implied any type.
+
+ @default false
+ */
+ noImplicitThis?: boolean;
+
+ /**
+ Report errors on unused locals.
+
+ Requires TypeScript version 2.0 or later.
+
+ @default false
+ */
+ noUnusedLocals?: boolean;
+
+ /**
+ Report errors on unused parameters.
+
+ Requires TypeScript version 2.0 or later.
+
+ @default false
+ */
+ noUnusedParameters?: boolean;
+
+ /**
+ Do not include the default library file (lib.d.ts).
+
+ @default false
+ */
+ noLib?: boolean;
+
+ /**
+ Do not add triple-slash references or module import targets to the list of compiled files.
+
+ @default false
+ */
+ noResolve?: boolean;
+
+ /**
+ Disable strict checking of generic signatures in function types.
+
+ @default false
+ */
+ noStrictGenericChecks?: boolean;
+
+ /**
+ @deprecated use `skipLibCheck` instead.
+ */
+ skipDefaultLibCheck?: boolean;
+
+ /**
+ Skip type checking of declaration files.
+
+ Requires TypeScript version 2.0 or later.
+
+ @default false
+ */
+ skipLibCheck?: boolean;
+
+ /**
+ Concatenate and emit output to single file.
+ */
+ outFile?: string;
+
+ /**
+ Redirect output structure to the directory.
+ */
+ outDir?: string;
+
+ /**
+ Do not erase const enum declarations in generated code.
+
+ @default false
+ */
+ preserveConstEnums?: boolean;
+
+ /**
+ Do not resolve symlinks to their real path; treat a symlinked file like a real one.
+
+ @default false
+ */
+ preserveSymlinks?: boolean;
+
+ /**
+ Keep outdated console output in watch mode instead of clearing the screen.
+
+ @default false
+ */
+ preserveWatchOutput?: boolean;
+
+ /**
+ Stylize errors and messages using color and context (experimental).
+
+ @default true // Unless piping to another program or redirecting output to a file.
+ */
+ pretty?: boolean;
+
+ /**
+ Do not emit comments to output.
+
+ @default false
+ */
+ removeComments?: boolean;
+
+ /**
+ Specifies the root directory of input files.
+
+ Use to control the output directory structure with `--outDir`.
+ */
+ rootDir?: string;
+
+ /**
+ Unconditionally emit imports for unresolved files.
+
+ @default false
+ */
+ isolatedModules?: boolean;
+
+ /**
+ Generates corresponding '.map' file.
+
+ @default false
+ */
+ sourceMap?: boolean;
+
+ /**
+ Specifies the location where debugger should locate TypeScript files instead of source locations.
+ */
+ sourceRoot?: string;
+
+ /**
+ Suppress excess property checks for object literals.
+
+ @default false
+ */
+ suppressExcessPropertyErrors?: boolean;
+
+ /**
+ Suppress noImplicitAny errors for indexing objects lacking index signatures.
+
+ @default false
+ */
+ suppressImplicitAnyIndexErrors?: boolean;
+
+ /**
+ Do not emit declarations for code that has an `@internal` annotation.
+ */
+ stripInternal?: boolean;
+
+ /**
+ Specify ECMAScript target version.
+
+ @default 'es3'
+ */
+ target?: CompilerOptions.Target;
+
+ /**
+ Watch input files.
+
+ @default false
+ */
+ watch?: boolean;
+
+ /**
+ Enables experimental support for ES7 decorators.
+
+ @default false
+ */
+ experimentalDecorators?: boolean;
+
+ /**
+ Emit design-type metadata for decorated declarations in source.
+
+ @default false
+ */
+ emitDecoratorMetadata?: boolean;
+
+ /**
+ Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6).
+
+ @default ['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node'
+ */
+ moduleResolution?: 'classic' | 'node';
+
+ /**
+ Do not report errors on unused labels.
+
+ @default false
+ */
+ allowUnusedLabels?: boolean;
+
+ /**
+ Report error when not all code paths in function return a value.
+
+ @default false
+ */
+ noImplicitReturns?: boolean;
+
+ /**
+ Report errors for fallthrough cases in switch statement.
+
+ @default false
+ */
+ noFallthroughCasesInSwitch?: boolean;
+
+ /**
+ Do not report errors on unreachable code.
+
+ @default false
+ */
+ allowUnreachableCode?: boolean;
+
+ /**
+ Disallow inconsistently-cased references to the same file.
+
+ @default false
+ */
+ forceConsistentCasingInFileNames?: boolean;
+
+ /**
+ Base directory to resolve non-relative module names.
+ */
+ baseUrl?: string;
+
+ /**
+ Specify path mapping to be computed relative to baseUrl option.
+ */
+ paths?: {
+ [key: string]: string[];
+ };
+
+ /**
+ List of TypeScript language server plugins to load.
+
+ Requires TypeScript version 2.3 or later.
+ */
+ plugins?: CompilerOptions.Plugin[];
+
+ /**
+ Specify list of root directories to be used when resolving modules.
+ */
+ rootDirs?: string[];
+
+ /**
+ Specify list of directories for type definition files to be included.
+
+ Requires TypeScript version 2.0 or later.
+ */
+ typeRoots?: string[];
+
+ /**
+ Type declaration files to be included in compilation.
+
+ Requires TypeScript version 2.0 or later.
+ */
+ types?: string[];
+
+ /**
+ Enable tracing of the name resolution process.
+
+ @default false
+ */
+ traceResolution?: boolean;
+
+ /**
+ Allow javascript files to be compiled.
+
+ @default false
+ */
+ allowJs?: boolean;
+
+ /**
+ Do not truncate error messages.
+
+ @default false
+ */
+ noErrorTruncation?: boolean;
+
+ /**
+ Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
+
+ @default module === 'system' || esModuleInterop
+ */
+ allowSyntheticDefaultImports?: boolean;
+
+ /**
+ Do not emit `'use strict'` directives in module output.
+
+ @default false
+ */
+ noImplicitUseStrict?: boolean;
+
+ /**
+ Enable to list all emitted files.
+
+ Requires TypeScript version 2.0 or later.
+
+ @default false
+ */
+ listEmittedFiles?: boolean;
+
+ /**
+ Disable size limit for JavaScript project.
+
+ Requires TypeScript version 2.0 or later.
+
+ @default false
+ */
+ disableSizeLimit?: boolean;
+
+ /**
+ List of library files to be included in the compilation.
+
+ Requires TypeScript version 2.0 or later.
+ */
+ lib?: CompilerOptions.Lib[];
+
+ /**
+ Enable strict null checks.
+
+ Requires TypeScript version 2.0 or later.
+
+ @default false
+ */
+ strictNullChecks?: boolean;
+
+ /**
+ The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
+
+ @default 0
+ */
+ maxNodeModuleJsDepth?: number;
+
+ /**
+ Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
+
+ Requires TypeScript version 2.1 or later.
+
+ @default false
+ */
+ importHelpers?: boolean;
+
+ /**
+ Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
+
+ Requires TypeScript version 2.1 or later.
+
+ @default 'React.createElement'
+ */
+ jsxFactory?: string;
+
+ /**
+ Parse in strict mode and emit `'use strict'` for each source file.
+
+ Requires TypeScript version 2.1 or later.
+
+ @default false
+ */
+ alwaysStrict?: boolean;
+
+ /**
+ Enable all strict type checking options.
+
+ Requires TypeScript version 2.3 or later.
+
+ @default false
+ */
+ strict?: boolean;
+
+ /**
+ Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
+
+ @default false
+ */
+ strictBindCallApply?: boolean;
+
+ /**
+ Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
+
+ Requires TypeScript version 2.3 or later.
+
+ @default false
+ */
+ downlevelIteration?: boolean;
+
+ /**
+ Report errors in `.js` files.
+
+ Requires TypeScript version 2.3 or later.
+
+ @default false
+ */
+ checkJs?: boolean;
+
+ /**
+ Disable bivariant parameter checking for function types.
+
+ Requires TypeScript version 2.6 or later.
+
+ @default false
+ */
+ strictFunctionTypes?: boolean;
+
+ /**
+ Ensure non-undefined class properties are initialized in the constructor.
+
+ Requires TypeScript version 2.7 or later.
+
+ @default false
+ */
+ strictPropertyInitialization?: boolean;
+
+ /**
+ Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
+
+ Requires TypeScript version 2.7 or later.
+
+ @default false
+ */
+ esModuleInterop?: boolean;
+
+ /**
+ Allow accessing UMD globals from modules.
+
+ @default false
+ */
+ allowUmdGlobalAccess?: boolean;
+
+ /**
+ Resolve `keyof` to string valued property names only (no numbers or symbols).
+
+ Requires TypeScript version 2.9 or later.
+
+ @default false
+ */
+ keyofStringsOnly?: boolean;
+
+ /**
+ Emit ECMAScript standard class fields.
+
+ Requires TypeScript version 3.7 or later.
+
+ @default false
+ */
+ useDefineForClassFields?: boolean;
+
+ /**
+ Generates a sourcemap for each corresponding `.d.ts` file.
+
+ Requires TypeScript version 2.9 or later.
+
+ @default false
+ */
+ declarationMap?: boolean;
+
+ /**
+ Include modules imported with `.json` extension.
+
+ Requires TypeScript version 2.9 or later.
+
+ @default false
+ */
+ resolveJsonModule?: boolean;
+ }
+
+ /**
+ Auto type (.d.ts) acquisition options for this project.
+
+ Requires TypeScript version 2.1 or later.
+ */
+ export interface TypeAcquisition {
+ /**
+ Enable auto type acquisition.
+ */
+ enable?: boolean;
+
+ /**
+ Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
+ */
+ include?: string[];
+
+ /**
+ Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
+ */
+ exclude?: string[];
+ }
+
+ export interface References {
+ /**
+ A normalized path on disk.
+ */
+ path: string;
+
+ /**
+ The path as the user originally wrote it.
+ */
+ originalPath?: string;
+
+ /**
+ True if the output of this reference should be prepended to the output of this project.
+
+ Only valid for `--outFile` compilations.
+ */
+ prepend?: boolean;
+
+ /**
+ True if it is intended that this reference form a circularity.
+ */
+ circular?: boolean;
+ }
+}
+
+export interface TsConfigJson {
+ /**
+ Instructs the TypeScript compiler how to compile `.ts` files.
+ */
+ compilerOptions?: TsConfigJson.CompilerOptions;
+
+ /**
+ Auto type (.d.ts) acquisition options for this project.
+
+ Requires TypeScript version 2.1 or later.
+ */
+ typeAcquisition?: TsConfigJson.TypeAcquisition;
+
+ /**
+ Enable Compile-on-Save for this project.
+ */
+ compileOnSave?: boolean;
+
+ /**
+ Path to base configuration file to inherit from.
+
+ Requires TypeScript version 2.1 or later.
+ */
+ extends?: string;
+
+ /**
+ If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`. When a `files` property is specified, only those files and those specified by `include` are included.
+ */
+ files?: string[];
+
+ /**
+ Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
+
+ Glob patterns require TypeScript version 2.0 or later.
+ */
+ exclude?: string[];
+
+ /**
+ Specifies a list of glob patterns that match files to be included in compilation.
+
+ If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`.
+
+ Requires TypeScript version 2.0 or later.
+ */
+ include?: string[];
+
+ /**
+ Referenced projects.
+
+ Requires TypeScript version 3.0 or later.
+ */
+ references?: TsConfigJson.References[];
+}
diff --git a/node_modules/type-fest/source/union-to-intersection.d.ts b/node_modules/type-fest/source/union-to-intersection.d.ts
new file mode 100644
index 0000000..61d9841
--- /dev/null
+++ b/node_modules/type-fest/source/union-to-intersection.d.ts
@@ -0,0 +1,58 @@
+/**
+Convert a union type to an intersection type using [distributive conditional types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
+
+Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
+
+@example
+```
+import {UnionToIntersection} from 'type-fest';
+
+type Union = {the(): void} | {great(arg: string): void} | {escape: boolean};
+
+type Intersection = UnionToIntersection<Union>;
+//=> {the(): void; great(arg: string): void; escape: boolean};
+```
+
+A more applicable example which could make its way into your library code follows.
+
+@example
+```
+import {UnionToIntersection} from 'type-fest';
+
+class CommandOne {
+ commands: {
+ a1: () => undefined,
+ b1: () => undefined,
+ }
+}
+
+class CommandTwo {
+ commands: {
+ a2: (argA: string) => undefined,
+ b2: (argB: string) => undefined,
+ }
+}
+
+const union = [new CommandOne(), new CommandTwo()].map(instance => instance.commands);
+type Union = typeof union;
+//=> {a1(): void; b1(): void} | {a2(argA: string): void; b2(argB: string): void}
+
+type Intersection = UnionToIntersection<Union>;
+//=> {a1(): void; b1(): void; a2(argA: string): void; b2(argB: string): void}
+```
+*/
+export type UnionToIntersection<Union> = (
+ // `extends any` is always going to be the case and is used to convert the
+ // `Union` into a [distributive conditional
+ // type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
+ Union extends unknown
+ // The union type is used as the only argument to a function since the union
+ // of function arguments is an intersection.
+ ? (distributedUnion: Union) => void
+ // This won't happen.
+ : never
+ // Infer the `Intersection` type since TypeScript represents the positional
+ // arguments of unions of functions as an intersection of the union.
+ ) extends ((mergedIntersection: infer Intersection) => void)
+ ? Intersection
+ : never;
diff --git a/node_modules/type-fest/source/value-of.d.ts b/node_modules/type-fest/source/value-of.d.ts
new file mode 100644
index 0000000..1279373
--- /dev/null
+++ b/node_modules/type-fest/source/value-of.d.ts
@@ -0,0 +1,40 @@
+/**
+Create a union of the given object's values, and optionally specify which keys to get the values from.
+
+Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/31438) if you want to have this type as a built-in in TypeScript.
+
+@example
+```
+// data.json
+{
+ 'foo': 1,
+ 'bar': 2,
+ 'biz': 3
+}
+
+// main.ts
+import {ValueOf} from 'type-fest';
+import data = require('./data.json');
+
+export function getData(name: string): ValueOf<typeof data> {
+ return data[name];
+}
+
+export function onlyBar(name: string): ValueOf<typeof data, 'bar'> {
+ return data[name];
+}
+
+// file.ts
+import {getData, onlyBar} from './main';
+
+getData('foo');
+//=> 1
+
+onlyBar('foo');
+//=> TypeError ...
+
+onlyBar('bar');
+//=> 2
+```
+*/
+export type ValueOf<ObjectType, ValueType extends keyof ObjectType = keyof ObjectType> = ObjectType[ValueType];
diff --git a/node_modules/typedarray/.travis.yml b/node_modules/typedarray/.travis.yml
new file mode 100644
index 0000000..cc4dba2
--- /dev/null
+++ b/node_modules/typedarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/node_modules/typedarray/LICENSE b/node_modules/typedarray/LICENSE
new file mode 100644
index 0000000..11adfae
--- /dev/null
+++ b/node_modules/typedarray/LICENSE
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2010, Linden Research, Inc.
+ Copyright (c) 2012, Joshua Bell
+
+ 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.
+ $/LicenseInfo$
+ */
+
+// Original can be found at:
+// https://bitbucket.org/lindenlab/llsd
+// Modifications by Joshua Bell inexorabletash@gmail.com
+// https://github.com/inexorabletash/polyfill
+
+// ES3/ES5 implementation of the Krhonos Typed Array Specification
+// Ref: http://www.khronos.org/registry/typedarray/specs/latest/
+// Date: 2011-02-01
+//
+// Variations:
+// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
diff --git a/node_modules/typedarray/example/tarray.js b/node_modules/typedarray/example/tarray.js
new file mode 100644
index 0000000..8423d7c
--- /dev/null
+++ b/node_modules/typedarray/example/tarray.js
@@ -0,0 +1,4 @@
+var Uint8Array = require('../').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
diff --git a/node_modules/typedarray/index.js b/node_modules/typedarray/index.js
new file mode 100644
index 0000000..5e54084
--- /dev/null
+++ b/node_modules/typedarray/index.js
@@ -0,0 +1,630 @@
+var undefined = (void 0); // Paranoia
+
+// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to
+// create, and consume so much memory, that the browser appears frozen.
+var MAX_ARRAY_LENGTH = 1e5;
+
+// Approximations of internal ECMAScript conversion functions
+var ECMAScript = (function() {
+ // Stash a copy in case other scripts modify these
+ var opts = Object.prototype.toString,
+ ophop = Object.prototype.hasOwnProperty;
+
+ return {
+ // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues:
+ Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); },
+ HasProperty: function(o, p) { return p in o; },
+ HasOwnProperty: function(o, p) { return ophop.call(o, p); },
+ IsCallable: function(o) { return typeof o === 'function'; },
+ ToInt32: function(v) { return v >> 0; },
+ ToUint32: function(v) { return v >>> 0; }
+ };
+}());
+
+// Snapshot intrinsics
+var LN2 = Math.LN2,
+ abs = Math.abs,
+ floor = Math.floor,
+ log = Math.log,
+ min = Math.min,
+ pow = Math.pow,
+ round = Math.round;
+
+// ES5: lock down object properties
+function configureProperties(obj) {
+ if (getOwnPropNames && defineProp) {
+ var props = getOwnPropNames(obj), i;
+ for (i = 0; i < props.length; i += 1) {
+ defineProp(obj, props[i], {
+ value: obj[props[i]],
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ }
+ }
+}
+
+// emulate ES5 getter/setter API using legacy APIs
+// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
+// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but
+// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless)
+var defineProp
+if (Object.defineProperty && (function() {
+ try {
+ Object.defineProperty({}, 'x', {});
+ return true;
+ } catch (e) {
+ return false;
+ }
+ })()) {
+ defineProp = Object.defineProperty;
+} else {
+ defineProp = function(o, p, desc) {
+ if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object");
+ if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); }
+ if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); }
+ if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; }
+ return o;
+ };
+}
+
+var getOwnPropNames = Object.getOwnPropertyNames || function (o) {
+ if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object");
+ var props = [], p;
+ for (p in o) {
+ if (ECMAScript.HasOwnProperty(o, p)) {
+ props.push(p);
+ }
+ }
+ return props;
+};
+
+// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
+// for index in 0 ... obj.length
+function makeArrayAccessors(obj) {
+ if (!defineProp) { return; }
+
+ if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill");
+
+ function makeArrayAccessor(index) {
+ defineProp(obj, index, {
+ 'get': function() { return obj._getter(index); },
+ 'set': function(v) { obj._setter(index, v); },
+ enumerable: true,
+ configurable: false
+ });
+ }
+
+ var i;
+ for (i = 0; i < obj.length; i += 1) {
+ makeArrayAccessor(i);
+ }
+}
+
+// Internal conversion functions:
+// pack<Type>() - take a number (interpreted as Type), output a byte array
+// unpack<Type>() - take a byte array, output a Type-like number
+
+function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
+function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
+
+function packI8(n) { return [n & 0xff]; }
+function unpackI8(bytes) { return as_signed(bytes[0], 8); }
+
+function packU8(n) { return [n & 0xff]; }
+function unpackU8(bytes) { return as_unsigned(bytes[0], 8); }
+
+function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; }
+
+function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
+
+function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
+
+function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packIEEE754(v, ebits, fbits) {
+
+ var bias = (1 << (ebits - 1)) - 1,
+ s, e, f, ln,
+ i, bits, str, bytes;
+
+ function roundToEven(n) {
+ var w = floor(n), f = n - w;
+ if (f < 0.5)
+ return w;
+ if (f > 0.5)
+ return w + 1;
+ return w % 2 ? w + 1 : w;
+ }
+
+ // Compute sign, exponent, fraction
+ if (v !== v) {
+ // NaN
+ // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
+ e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0;
+ } else if (v === Infinity || v === -Infinity) {
+ e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0;
+ } else if (v === 0) {
+ e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
+ } else {
+ s = v < 0;
+ v = abs(v);
+
+ if (v >= pow(2, 1 - bias)) {
+ e = min(floor(log(v) / LN2), 1023);
+ f = roundToEven(v / pow(2, e) * pow(2, fbits));
+ if (f / pow(2, fbits) >= 2) {
+ e = e + 1;
+ f = 1;
+ }
+ if (e > bias) {
+ // Overflow
+ e = (1 << ebits) - 1;
+ f = 0;
+ } else {
+ // Normalized
+ e = e + bias;
+ f = f - pow(2, fbits);
+ }
+ } else {
+ // Denormalized
+ e = 0;
+ f = roundToEven(v / pow(2, 1 - bias - fbits));
+ }
+ }
+
+ // Pack sign, exponent, fraction
+ bits = [];
+ for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); }
+ for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); }
+ bits.push(s ? 1 : 0);
+ bits.reverse();
+ str = bits.join('');
+
+ // Bits to bytes
+ bytes = [];
+ while (str.length) {
+ bytes.push(parseInt(str.substring(0, 8), 2));
+ str = str.substring(8);
+ }
+ return bytes;
+}
+
+function unpackIEEE754(bytes, ebits, fbits) {
+
+ // Bytes to bits
+ var bits = [], i, j, b, str,
+ bias, s, e, f;
+
+ for (i = bytes.length; i; i -= 1) {
+ b = bytes[i - 1];
+ for (j = 8; j; j -= 1) {
+ bits.push(b % 2 ? 1 : 0); b = b >> 1;
+ }
+ }
+ bits.reverse();
+ str = bits.join('');
+
+ // Unpack sign, exponent, fraction
+ bias = (1 << (ebits - 1)) - 1;
+ s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
+ e = parseInt(str.substring(1, 1 + ebits), 2);
+ f = parseInt(str.substring(1 + ebits), 2);
+
+ // Produce number
+ if (e === (1 << ebits) - 1) {
+ return f !== 0 ? NaN : s * Infinity;
+ } else if (e > 0) {
+ // Normalized
+ return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
+ } else if (f !== 0) {
+ // Denormalized
+ return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
+ } else {
+ return s < 0 ? -0 : 0;
+ }
+}
+
+function unpackF64(b) { return unpackIEEE754(b, 11, 52); }
+function packF64(v) { return packIEEE754(v, 11, 52); }
+function unpackF32(b) { return unpackIEEE754(b, 8, 23); }
+function packF32(v) { return packIEEE754(v, 8, 23); }
+
+
+//
+// 3 The ArrayBuffer Type
+//
+
+(function() {
+
+ /** @constructor */
+ var ArrayBuffer = function ArrayBuffer(length) {
+ length = ECMAScript.ToInt32(length);
+ if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer');
+
+ this.byteLength = length;
+ this._bytes = [];
+ this._bytes.length = length;
+
+ var i;
+ for (i = 0; i < this.byteLength; i += 1) {
+ this._bytes[i] = 0;
+ }
+
+ configureProperties(this);
+ };
+
+ exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
+
+ //
+ // 4 The ArrayBufferView Type
+ //
+
+ // NOTE: this constructor is not exported
+ /** @constructor */
+ var ArrayBufferView = function ArrayBufferView() {
+ //this.buffer = null;
+ //this.byteOffset = 0;
+ //this.byteLength = 0;
+ };
+
+ //
+ // 5 The Typed Array View Types
+ //
+
+ function makeConstructor(bytesPerElement, pack, unpack) {
+ // Each TypedArray type requires a distinct constructor instance with
+ // identical logic, which this produces.
+
+ var ctor;
+ ctor = function(buffer, byteOffset, length) {
+ var array, sequence, i, s;
+
+ if (!arguments.length || typeof arguments[0] === 'number') {
+ // Constructor(unsigned long length)
+ this.length = ECMAScript.ToInt32(arguments[0]);
+ if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer');
+
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+ } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
+ // Constructor(TypedArray array)
+ array = arguments[0];
+
+ this.length = array.length;
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ this._setter(i, array._getter(i));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(sequence<type> array)
+ sequence = arguments[0];
+
+ this.length = ECMAScript.ToUint32(sequence.length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ s = sequence[i];
+ this._setter(i, Number(s));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset, optional unsigned long length)
+ this.buffer = buffer;
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (this.byteOffset % this.BYTES_PER_ELEMENT) {
+ // The given byteOffset must be a multiple of the element
+ // size of the specific type, otherwise an exception is raised.
+ throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+
+ if (this.byteLength % this.BYTES_PER_ELEMENT) {
+ throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");
+ }
+ this.length = this.byteLength / this.BYTES_PER_ELEMENT;
+ } else {
+ this.length = ECMAScript.ToUint32(length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+
+ this.constructor = ctor;
+
+ configureProperties(this);
+ makeArrayAccessors(this);
+ };
+
+ ctor.prototype = new ArrayBufferView();
+ ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
+ ctor.prototype._pack = pack;
+ ctor.prototype._unpack = unpack;
+ ctor.BYTES_PER_ELEMENT = bytesPerElement;
+
+ // getter type (unsigned long index);
+ ctor.prototype._getter = function(index) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = [], i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ bytes.push(this.buffer._bytes[o]);
+ }
+ return this._unpack(bytes);
+ };
+
+ // NONSTANDARD: convenience alias for getter: type get(unsigned long index);
+ ctor.prototype.get = ctor.prototype._getter;
+
+ // setter void (unsigned long index, type value);
+ ctor.prototype._setter = function(index, value) {
+ if (arguments.length < 2) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = this._pack(value), i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ this.buffer._bytes[o] = bytes[i];
+ }
+ };
+
+ // void set(TypedArray array, optional unsigned long offset);
+ // void set(sequence<type> array, optional unsigned long offset);
+ ctor.prototype.set = function(index, value) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+ var array, sequence, offset, len,
+ i, s, d,
+ byteOffset, byteLength, tmp;
+
+ if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
+ // void set(TypedArray array, optional unsigned long offset);
+ array = arguments[0];
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + array.length > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
+ byteLength = array.length * this.BYTES_PER_ELEMENT;
+
+ if (array.buffer === this.buffer) {
+ tmp = [];
+ for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
+ tmp[i] = array.buffer._bytes[s];
+ }
+ for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
+ this.buffer._bytes[d] = tmp[i];
+ }
+ } else {
+ for (i = 0, s = array.byteOffset, d = byteOffset;
+ i < byteLength; i += 1, s += 1, d += 1) {
+ this.buffer._bytes[d] = array.buffer._bytes[s];
+ }
+ }
+ } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
+ // void set(sequence<type> array, optional unsigned long offset);
+ sequence = arguments[0];
+ len = ECMAScript.ToUint32(sequence.length);
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + len > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ for (i = 0; i < len; i += 1) {
+ s = sequence[i];
+ this._setter(offset + i, Number(s));
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+ };
+
+ // TypedArray subarray(long begin, optional long end);
+ ctor.prototype.subarray = function(start, end) {
+ function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
+
+ start = ECMAScript.ToInt32(start);
+ end = ECMAScript.ToInt32(end);
+
+ if (arguments.length < 1) { start = 0; }
+ if (arguments.length < 2) { end = this.length; }
+
+ if (start < 0) { start = this.length + start; }
+ if (end < 0) { end = this.length + end; }
+
+ start = clamp(start, 0, this.length);
+ end = clamp(end, 0, this.length);
+
+ var len = end - start;
+ if (len < 0) {
+ len = 0;
+ }
+
+ return new this.constructor(
+ this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
+ };
+
+ return ctor;
+ }
+
+ var Int8Array = makeConstructor(1, packI8, unpackI8);
+ var Uint8Array = makeConstructor(1, packU8, unpackU8);
+ var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8);
+ var Int16Array = makeConstructor(2, packI16, unpackI16);
+ var Uint16Array = makeConstructor(2, packU16, unpackU16);
+ var Int32Array = makeConstructor(4, packI32, unpackI32);
+ var Uint32Array = makeConstructor(4, packU32, unpackU32);
+ var Float32Array = makeConstructor(4, packF32, unpackF32);
+ var Float64Array = makeConstructor(8, packF64, unpackF64);
+
+ exports.Int8Array = exports.Int8Array || Int8Array;
+ exports.Uint8Array = exports.Uint8Array || Uint8Array;
+ exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray;
+ exports.Int16Array = exports.Int16Array || Int16Array;
+ exports.Uint16Array = exports.Uint16Array || Uint16Array;
+ exports.Int32Array = exports.Int32Array || Int32Array;
+ exports.Uint32Array = exports.Uint32Array || Uint32Array;
+ exports.Float32Array = exports.Float32Array || Float32Array;
+ exports.Float64Array = exports.Float64Array || Float64Array;
+}());
+
+//
+// 6 The DataView View Type
+//
+
+(function() {
+ function r(array, index) {
+ return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
+ }
+
+ var IS_BIG_ENDIAN = (function() {
+ var u16array = new(exports.Uint16Array)([0x1234]),
+ u8array = new(exports.Uint8Array)(u16array.buffer);
+ return r(u8array, 0) === 0x12;
+ }());
+
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset,
+ // optional unsigned long byteLength)
+ /** @constructor */
+ var DataView = function DataView(buffer, byteOffset, byteLength) {
+ if (arguments.length === 0) {
+ buffer = new exports.ArrayBuffer(0);
+ } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
+ throw new TypeError("TypeError");
+ }
+
+ this.buffer = buffer || new exports.ArrayBuffer(0);
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+ } else {
+ this.byteLength = ECMAScript.ToUint32(byteLength);
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+
+ configureProperties(this);
+ };
+
+ function makeGetter(arrayType) {
+ return function(byteOffset, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+ byteOffset += this.byteOffset;
+
+ var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
+ bytes = [], i;
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(uint8Array, i));
+ }
+
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
+ };
+ }
+
+ DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
+ DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
+ DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
+ DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
+ DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
+ DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
+ DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
+ DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
+
+ function makeSetter(arrayType) {
+ return function(byteOffset, value, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+
+ // Get bytes
+ var typeArray = new arrayType([value]),
+ byteArray = new exports.Uint8Array(typeArray.buffer),
+ bytes = [], i, byteView;
+
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(byteArray, i));
+ }
+
+ // Flip if necessary
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ // Write them
+ byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
+ byteView.set(bytes);
+ };
+ }
+
+ DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
+ DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
+ DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
+ DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
+ DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
+ DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
+ DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
+ DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
+
+ exports.DataView = exports.DataView || DataView;
+
+}());
diff --git a/node_modules/typedarray/package.json b/node_modules/typedarray/package.json
new file mode 100644
index 0000000..a7854a0
--- /dev/null
+++ b/node_modules/typedarray/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "typedarray",
+ "version": "0.0.6",
+ "description": "TypedArray polyfill for old browsers",
+ "main": "index.js",
+ "devDependencies": {
+ "tape": "~2.3.2"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/typedarray.git"
+ },
+ "homepage": "https://github.com/substack/typedarray",
+ "keywords": [
+ "ArrayBuffer",
+ "DataView",
+ "Float32Array",
+ "Float64Array",
+ "Int8Array",
+ "Int16Array",
+ "Int32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Uint16Array",
+ "Uint32Array",
+ "typed",
+ "array",
+ "polyfill"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/typedarray/readme.markdown b/node_modules/typedarray/readme.markdown
new file mode 100644
index 0000000..d18f6f7
--- /dev/null
+++ b/node_modules/typedarray/readme.markdown
@@ -0,0 +1,61 @@
+# typedarray
+
+TypedArray polyfill ripped from [this
+module](https://raw.github.com/inexorabletash/polyfill).
+
+[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)
+
+[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)
+
+# example
+
+``` js
+var Uint8Array = require('typedarray').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
+```
+
+output:
+
+```
+55
+```
+
+# methods
+
+``` js
+var TA = require('typedarray')
+```
+
+The `TA` object has the following constructors:
+
+* TA.ArrayBuffer
+* TA.DataView
+* TA.Float32Array
+* TA.Float64Array
+* TA.Int8Array
+* TA.Int16Array
+* TA.Int32Array
+* TA.Uint8Array
+* TA.Uint8ClampedArray
+* TA.Uint16Array
+* TA.Uint32Array
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install typedarray
+```
+
+To use this module in the browser, compile with
+[browserify](http://browserify.org)
+or download a UMD build from browserify CDN:
+
+http://wzrd.in/standalone/typedarray@latest
+
+# license
+
+MIT
diff --git a/node_modules/typedarray/test/server/undef_globals.js b/node_modules/typedarray/test/server/undef_globals.js
new file mode 100644
index 0000000..425950f
--- /dev/null
+++ b/node_modules/typedarray/test/server/undef_globals.js
@@ -0,0 +1,19 @@
+var test = require('tape');
+var vm = require('vm');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8');
+
+test('u8a without globals', function (t) {
+ var c = {
+ module: { exports: {} },
+ };
+ c.exports = c.module.exports;
+ vm.runInNewContext(src, c);
+ var TA = c.module.exports;
+ var ua = new(TA.Uint8Array)(5);
+
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/node_modules/typedarray/test/tarray.js b/node_modules/typedarray/test/tarray.js
new file mode 100644
index 0000000..df596a3
--- /dev/null
+++ b/node_modules/typedarray/test/tarray.js
@@ -0,0 +1,10 @@
+var TA = require('../');
+var test = require('tape');
+
+test('tiny u8a test', function (t) {
+ var ua = new(TA.Uint8Array)(5);
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/node_modules/universalify/LICENSE b/node_modules/universalify/LICENSE
new file mode 100644
index 0000000..514e84e
--- /dev/null
+++ b/node_modules/universalify/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2017, Ryan Zimmerman <opensrc@ryanzim.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the 'Software'), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/universalify/README.md b/node_modules/universalify/README.md
new file mode 100644
index 0000000..487067b
--- /dev/null
+++ b/node_modules/universalify/README.md
@@ -0,0 +1,76 @@
+# universalify
+
+[![Travis branch](https://img.shields.io/travis/RyanZim/universalify/master.svg)](https://travis-ci.org/RyanZim/universalify)
+![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg)
+![npm](https://img.shields.io/npm/dm/universalify.svg)
+![npm](https://img.shields.io/npm/l/universalify.svg)
+
+Make a callback- or promise-based function support both promises and callbacks.
+
+Uses the native promise implementation.
+
+## Installation
+
+```bash
+npm install universalify
+```
+
+## API
+
+### `universalify.fromCallback(fn)`
+
+Takes a callback-based function to universalify, and returns the universalified function.
+
+Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with more than three arguments, and does not ensure that the callback is only called once.
+
+```js
+function callbackFn (n, cb) {
+ setTimeout(() => cb(null, n), 15)
+}
+
+const fn = universalify.fromCallback(callbackFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+### `universalify.fromPromise(fn)`
+
+Takes a promise-based function to universalify, and returns the universalified function.
+
+Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned.
+
+```js
+function promiseFn (n) {
+ return new Promise(resolve => {
+ setTimeout(() => resolve(n), 15)
+ })
+}
+
+const fn = universalify.fromPromise(promiseFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+## License
+
+MIT
diff --git a/node_modules/universalify/index.js b/node_modules/universalify/index.js
new file mode 100644
index 0000000..0c9ba39
--- /dev/null
+++ b/node_modules/universalify/index.js
@@ -0,0 +1,25 @@
+'use strict'
+
+exports.fromCallback = function (fn) {
+ return Object.defineProperty(function () {
+ if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)
+ else {
+ return new Promise((resolve, reject) => {
+ arguments[arguments.length] = (err, res) => {
+ if (err) return reject(err)
+ resolve(res)
+ }
+ arguments.length++
+ fn.apply(this, arguments)
+ })
+ }
+ }, 'name', { value: fn.name })
+}
+
+exports.fromPromise = function (fn) {
+ return Object.defineProperty(function () {
+ const cb = arguments[arguments.length - 1]
+ if (typeof cb !== 'function') return fn.apply(this, arguments)
+ else fn.apply(this, arguments).then(r => cb(null, r), cb)
+ }, 'name', { value: fn.name })
+}
diff --git a/node_modules/universalify/package.json b/node_modules/universalify/package.json
new file mode 100644
index 0000000..321b192
--- /dev/null
+++ b/node_modules/universalify/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "universalify",
+ "version": "0.1.2",
+ "description": "Make a callback- or promise-based function support both promises and callbacks.",
+ "keywords": [
+ "callback",
+ "native",
+ "promise"
+ ],
+ "homepage": "https://github.com/RyanZim/universalify#readme",
+ "bugs": "https://github.com/RyanZim/universalify/issues",
+ "license": "MIT",
+ "author": "Ryan Zimmerman <opensrc@ryanzim.com>",
+ "files": [
+ "index.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/RyanZim/universalify.git"
+ },
+ "scripts": {
+ "test": "standard && nyc tape test/*.js | colortape"
+ },
+ "devDependencies": {
+ "colortape": "^0.1.2",
+ "coveralls": "^3.0.1",
+ "nyc": "^10.2.0",
+ "standard": "^10.0.1",
+ "tape": "^4.6.3"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+}
diff --git a/node_modules/uri-js/LICENSE b/node_modules/uri-js/LICENSE
new file mode 100755
index 0000000..9338bde
--- /dev/null
+++ b/node_modules/uri-js/LICENSE
@@ -0,0 +1,11 @@
+Copyright 2011 Gary Court. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court.
diff --git a/node_modules/uri-js/README.md b/node_modules/uri-js/README.md
new file mode 100755
index 0000000..43e648b
--- /dev/null
+++ b/node_modules/uri-js/README.md
@@ -0,0 +1,203 @@
+# URI.js
+
+URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc).
+It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications.
+
+URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated).
+
+## API
+
+### Parsing
+
+ URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body");
+ //returns:
+ //{
+ // scheme : "uri",
+ // userinfo : "user:pass",
+ // host : "example.com",
+ // port : 123,
+ // path : "/one/two.three",
+ // query : "q1=a1&q2=a2",
+ // fragment : "body"
+ //}
+
+### Serializing
+
+ URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer"
+
+### Resolving
+
+ URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g"
+
+### Normalizing
+
+ URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html"
+
+### Comparison
+
+ URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true
+
+### IP Support
+
+ //IPv4 normalization
+ URI.normalize("//192.068.001.000") === "//192.68.1.0"
+
+ //IPv6 normalization
+ URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]"
+
+ //IPv6 zone identifier support
+ URI.parse("//[2001:db8::7%25en1]");
+ //returns:
+ //{
+ // host : "2001:db8::7%en1"
+ //}
+
+### IRI Support
+
+ //convert IRI to URI
+ URI.serialize(URI.parse("http://examplé.org/rosé")) === "http://xn--exampl-gva.org/ros%C3%A9"
+ //convert URI to IRI
+ URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplé.org/rosé"
+
+### Options
+
+All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:
+
+* `scheme` (string)
+
+ Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
+
+* `reference` (string)
+
+ If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme.
+
+* `tolerant` (boolean, false)
+
+ If set to `true`, the parser will relax URI resolving rules.
+
+* `absolutePath` (boolean, false)
+
+ If set to `true`, the serializer will not resolve a relative `path` component.
+
+* `iri` (boolean, false)
+
+ If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
+
+* `unicodeSupport` (boolean, false)
+
+ If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
+
+* `domainHost` (boolean, false)
+
+ If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).
+
+## Scheme Extendable
+
+URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes:
+
+* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\]
+* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\]
+* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
+* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
+* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\]
+* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\]
+* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\]
+
+### HTTP/HTTPS Support
+
+ URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true
+ URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true
+
+### WS/WSS Support
+
+ URI.parse("wss://example.com/foo?bar=baz");
+ //returns:
+ //{
+ // scheme : "wss",
+ // host: "example.com",
+ // resourceName: "/foo?bar=baz",
+ // secure: true,
+ //}
+
+ URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true
+
+### Mailto Support
+
+ URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!");
+ //returns:
+ //{
+ // scheme : "mailto",
+ // to : ["alpha@example.com", "bravo@example.com"],
+ // subject : "SUBSCRIBE",
+ // body : "Sign me up!"
+ //}
+
+ URI.serialize({
+ scheme : "mailto",
+ to : ["alpha@example.com"],
+ subject : "REMOVE",
+ body : "Please remove me",
+ headers : {
+ cc : "charlie@example.com"
+ }
+ }) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me"
+
+### URN Support
+
+ URI.parse("urn:example:foo");
+ //returns:
+ //{
+ // scheme : "urn",
+ // nid : "example",
+ // nss : "foo",
+ //}
+
+#### URN UUID Support
+
+ URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6");
+ //returns:
+ //{
+ // scheme : "urn",
+ // nid : "uuid",
+ // uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
+ //}
+
+## Usage
+
+To load in a browser, use the following tag:
+
+ <script type="text/javascript" src="uri-js/dist/es5/uri.all.min.js"></script>
+
+To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line:
+
+ npm install uri-js
+ # OR
+ yarn add uri-js
+
+Then, in your code, load it using:
+
+ const URI = require("uri-js");
+
+If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using:
+
+ import * as URI from "uri-js";
+
+Or you can load just what you need using named exports:
+
+ import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js";
+
+## Breaking changes
+
+### Breaking changes from 3.x
+
+URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler.
+
+The UUID of a URN can now be found in the `uuid` property.
+
+### Breaking changes from 2.x
+
+URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful.
+
+### Breaking changes from 1.x
+
+The `errors` array on parsed components is now an `error` string.
diff --git a/node_modules/uri-js/dist/es5/uri.all.d.ts b/node_modules/uri-js/dist/es5/uri.all.d.ts
new file mode 100755
index 0000000..da51e23
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.d.ts
@@ -0,0 +1,59 @@
+export interface URIComponents {
+ scheme?: string;
+ userinfo?: string;
+ host?: string;
+ port?: number | string;
+ path?: string;
+ query?: string;
+ fragment?: string;
+ reference?: string;
+ error?: string;
+}
+export interface URIOptions {
+ scheme?: string;
+ reference?: string;
+ tolerant?: boolean;
+ absolutePath?: boolean;
+ iri?: boolean;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+}
+export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
+ scheme: string;
+ parse(components: ParentComponents, options: Options): Components;
+ serialize(components: Components, options: Options): ParentComponents;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+ absolutePath?: boolean;
+}
+export interface URIRegExps {
+ NOT_SCHEME: RegExp;
+ NOT_USERINFO: RegExp;
+ NOT_HOST: RegExp;
+ NOT_PATH: RegExp;
+ NOT_PATH_NOSCHEME: RegExp;
+ NOT_QUERY: RegExp;
+ NOT_FRAGMENT: RegExp;
+ ESCAPE: RegExp;
+ UNRESERVED: RegExp;
+ OTHER_CHARS: RegExp;
+ PCT_ENCODED: RegExp;
+ IPV4ADDRESS: RegExp;
+ IPV6ADDRESS: RegExp;
+}
+export declare const SCHEMES: {
+ [scheme: string]: URISchemeHandler;
+};
+export declare function pctEncChar(chr: string): string;
+export declare function pctDecChars(str: string): string;
+export declare function parse(uriString: string, options?: URIOptions): URIComponents;
+export declare function removeDotSegments(input: string): string;
+export declare function serialize(components: URIComponents, options?: URIOptions): string;
+export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
+export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
+export declare function normalize(uri: string, options?: URIOptions): string;
+export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
+export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
+export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
+export declare function escapeComponent(str: string, options?: URIOptions): string;
+export declare function unescapeComponent(str: string, options?: URIOptions): string;
diff --git a/node_modules/uri-js/dist/es5/uri.all.js b/node_modules/uri-js/dist/es5/uri.all.js
new file mode 100755
index 0000000..0706116
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.js
@@ -0,0 +1,1443 @@
+/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (factory((global.URI = global.URI || {})));
+}(this, (function (exports) { 'use strict';
+
+function merge() {
+ for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
+ sets[_key] = arguments[_key];
+ }
+
+ if (sets.length > 1) {
+ sets[0] = sets[0].slice(0, -1);
+ var xl = sets.length - 1;
+ for (var x = 1; x < xl; ++x) {
+ sets[x] = sets[x].slice(1, -1);
+ }
+ sets[xl] = sets[xl].slice(1);
+ return sets.join('');
+ } else {
+ return sets[0];
+ }
+}
+function subexp(str) {
+ return "(?:" + str + ")";
+}
+function typeOf(o) {
+ return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
+}
+function toUpperCase(str) {
+ return str.toUpperCase();
+}
+function toArray(obj) {
+ return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
+}
+function assign(target, source) {
+ var obj = target;
+ if (source) {
+ for (var key in source) {
+ obj[key] = source[key];
+ }
+ }
+ return obj;
+}
+
+function buildExps(isIRI) {
+ var ALPHA$$ = "[A-Za-z]",
+ CR$ = "[\\x0D]",
+ DIGIT$$ = "[0-9]",
+ DQUOTE$$ = "[\\x22]",
+ HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"),
+ //case-insensitive
+ LF$$ = "[\\x0A]",
+ SP$$ = "[\\x20]",
+ PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)),
+ //expanded
+ GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]",
+ SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",
+ RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),
+ UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]",
+ //subset, excludes bidi control characters
+ IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
+ //subset
+ UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
+ SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
+ USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
+ DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$),
+ DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
+ //relaxed parsing rules
+ IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
+ H16$ = subexp(HEXDIG$$ + "{1,4}"),
+ LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$),
+ IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$),
+ // 6( h16 ":" ) ls32
+ IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$),
+ // "::" 5( h16 ":" ) ls32
+ IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$),
+ //[ h16 ] "::" 4( h16 ":" ) ls32
+ IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$),
+ //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+ IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$),
+ //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+ IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$),
+ //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
+ IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$),
+ //[ *4( h16 ":" ) h16 ] "::" ls32
+ IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$),
+ //[ *5( h16 ":" ) h16 ] "::" h16
+ IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
+ //[ *6( h16 ":" ) h16 ] "::"
+ IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
+ ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
+ //RFC 6874
+ IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$),
+ //RFC 6874
+ IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$),
+ //RFC 6874, with relaxed parsing rules
+ IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
+ IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"),
+ //RFC 6874
+ REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
+ HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$),
+ PORT$ = subexp(DIGIT$$ + "*"),
+ AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"),
+ PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
+ SEGMENT$ = subexp(PCHAR$ + "*"),
+ SEGMENT_NZ$ = subexp(PCHAR$ + "+"),
+ SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
+ PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"),
+ PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"),
+ //simplified
+ PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$),
+ //simplified
+ PATH_EMPTY$ = "(?!" + PCHAR$ + ")",
+ PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"),
+ FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"),
+ HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
+ URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$),
+ RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
+ URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$),
+ ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"),
+ GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$",
+ SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
+ AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
+ return {
+ NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
+ NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
+ NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
+ ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ UNRESERVED: new RegExp(UNRESERVED$$, "g"),
+ OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
+ PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
+ IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
+ IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
+ };
+}
+var URI_PROTOCOL = buildExps(false);
+
+var IRI_PROTOCOL = buildExps(true);
+
+var slicedToArray = function () {
+ function sliceIterator(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"]) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+ }
+
+ return function (arr, i) {
+ if (Array.isArray(arr)) {
+ return arr;
+ } else if (Symbol.iterator in Object(arr)) {
+ return sliceIterator(arr, i);
+ } else {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+ }
+ };
+}();
+
+
+
+
+
+
+
+
+
+
+
+
+
+var toConsumableArray = function (arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
+
+ return arr2;
+ } else {
+ return Array.from(arr);
+ }
+};
+
+/** Highest positive signed 32-bit float value */
+
+var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
+
+/** Bootstring parameters */
+var base = 36;
+var tMin = 1;
+var tMax = 26;
+var skew = 38;
+var damp = 700;
+var initialBias = 72;
+var initialN = 128; // 0x80
+var delimiter = '-'; // '\x2D'
+
+/** Regular expressions */
+var regexPunycode = /^xn--/;
+var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
+var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
+
+/** Error messages */
+var errors = {
+ 'overflow': 'Overflow: input needs wider integers to process',
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
+ 'invalid-input': 'Invalid input'
+};
+
+/** Convenience shortcuts */
+var baseMinusTMin = base - tMin;
+var floor = Math.floor;
+var stringFromCharCode = String.fromCharCode;
+
+/*--------------------------------------------------------------------------*/
+
+/**
+ * A generic error utility function.
+ * @private
+ * @param {String} type The error type.
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
+ */
+function error$1(type) {
+ throw new RangeError(errors[type]);
+}
+
+/**
+ * A generic `Array#map` utility function.
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} callback The function that gets called for every array
+ * item.
+ * @returns {Array} A new array of values returned by the callback function.
+ */
+function map(array, fn) {
+ var result = [];
+ var length = array.length;
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+}
+
+/**
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
+ * addresses.
+ * @private
+ * @param {String} domain The domain name or email address.
+ * @param {Function} callback The function that gets called for every
+ * character.
+ * @returns {Array} A new string of characters returned by the callback
+ * function.
+ */
+function mapDomain(string, fn) {
+ var parts = string.split('@');
+ var result = '';
+ if (parts.length > 1) {
+ // In email addresses, only the domain name should be punycoded. Leave
+ // the local part (i.e. everything up to `@`) intact.
+ result = parts[0] + '@';
+ string = parts[1];
+ }
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
+ string = string.replace(regexSeparators, '\x2E');
+ var labels = string.split('.');
+ var encoded = map(labels, fn).join('.');
+ return result + encoded;
+}
+
+/**
+ * Creates an array containing the numeric code points of each Unicode
+ * character in the string. While JavaScript uses UCS-2 internally,
+ * this function will convert a pair of surrogate halves (each of which
+ * UCS-2 exposes as separate characters) into a single code point,
+ * matching UTF-16.
+ * @see `punycode.ucs2.encode`
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode.ucs2
+ * @name decode
+ * @param {String} string The Unicode input string (UCS-2).
+ * @returns {Array} The new array of code points.
+ */
+function ucs2decode(string) {
+ var output = [];
+ var counter = 0;
+ var length = string.length;
+ while (counter < length) {
+ var value = string.charCodeAt(counter++);
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
+ // It's a high surrogate, and there is a next character.
+ var extra = string.charCodeAt(counter++);
+ if ((extra & 0xFC00) == 0xDC00) {
+ // Low surrogate.
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
+ } else {
+ // It's an unmatched surrogate; only append this code unit, in case the
+ // next code unit is the high surrogate of a surrogate pair.
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+}
+
+/**
+ * Creates a string based on an array of numeric code points.
+ * @see `punycode.ucs2.decode`
+ * @memberOf punycode.ucs2
+ * @name encode
+ * @param {Array} codePoints The array of numeric code points.
+ * @returns {String} The new Unicode string (UCS-2).
+ */
+var ucs2encode = function ucs2encode(array) {
+ return String.fromCodePoint.apply(String, toConsumableArray(array));
+};
+
+/**
+ * Converts a basic code point into a digit/integer.
+ * @see `digitToBasic()`
+ * @private
+ * @param {Number} codePoint The basic numeric code point value.
+ * @returns {Number} The numeric value of a basic code point (for use in
+ * representing integers) in the range `0` to `base - 1`, or `base` if
+ * the code point does not represent a value.
+ */
+var basicToDigit = function basicToDigit(codePoint) {
+ if (codePoint - 0x30 < 0x0A) {
+ return codePoint - 0x16;
+ }
+ if (codePoint - 0x41 < 0x1A) {
+ return codePoint - 0x41;
+ }
+ if (codePoint - 0x61 < 0x1A) {
+ return codePoint - 0x61;
+ }
+ return base;
+};
+
+/**
+ * Converts a digit/integer into a basic code point.
+ * @see `basicToDigit()`
+ * @private
+ * @param {Number} digit The numeric value of a basic code point.
+ * @returns {Number} The basic code point whose value (when used for
+ * representing integers) is `digit`, which needs to be in the range
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
+ * used; else, the lowercase form is used. The behavior is undefined
+ * if `flag` is non-zero and `digit` has no uppercase form.
+ */
+var digitToBasic = function digitToBasic(digit, flag) {
+ // 0..25 map to ASCII a..z or A..Z
+ // 26..35 map to ASCII 0..9
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+};
+
+/**
+ * Bias adaptation function as per section 3.4 of RFC 3492.
+ * https://tools.ietf.org/html/rfc3492#section-3.4
+ * @private
+ */
+var adapt = function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+};
+
+/**
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
+ * symbols.
+ * @memberOf punycode
+ * @param {String} input The Punycode string of ASCII-only symbols.
+ * @returns {String} The resulting string of Unicode symbols.
+ */
+var decode = function decode(input) {
+ // Don't use UCS-2.
+ var output = [];
+ var inputLength = input.length;
+ var i = 0;
+ var n = initialN;
+ var bias = initialBias;
+
+ // Handle the basic code points: let `basic` be the number of input code
+ // points before the last delimiter, or `0` if there is none, then copy
+ // the first basic code points to the output.
+
+ var basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+
+ for (var j = 0; j < basic; ++j) {
+ // if it's not a basic code point
+ if (input.charCodeAt(j) >= 0x80) {
+ error$1('not-basic');
+ }
+ output.push(input.charCodeAt(j));
+ }
+
+ // Main decoding loop: start just after the last delimiter if any basic code
+ // points were copied; start at the beginning otherwise.
+
+ for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{
+
+ // `index` is the index of the next character to be consumed.
+ // Decode a generalized variable-length integer into `delta`,
+ // which gets added to `i`. The overflow checking is easier
+ // if we increase `i` as we go, then subtract off its starting
+ // value at the end to obtain `delta`.
+ var oldi = i;
+ for (var w = 1, k = base;; /* no condition */k += base) {
+
+ if (index >= inputLength) {
+ error$1('invalid-input');
+ }
+
+ var digit = basicToDigit(input.charCodeAt(index++));
+
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error$1('overflow');
+ }
+
+ i += digit * w;
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+
+ if (digit < t) {
+ break;
+ }
+
+ var baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error$1('overflow');
+ }
+
+ w *= baseMinusT;
+ }
+
+ var out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+
+ // `i` was supposed to wrap around from `out` to `0`,
+ // incrementing `n` each time, so we'll fix that now:
+ if (floor(i / out) > maxInt - n) {
+ error$1('overflow');
+ }
+
+ n += floor(i / out);
+ i %= out;
+
+ // Insert `n` at position `i` of the output.
+ output.splice(i++, 0, n);
+ }
+
+ return String.fromCodePoint.apply(String, output);
+};
+
+/**
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
+ * Punycode string of ASCII-only symbols.
+ * @memberOf punycode
+ * @param {String} input The string of Unicode symbols.
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
+ */
+var encode = function encode(input) {
+ var output = [];
+
+ // Convert the input in UCS-2 to an array of Unicode code points.
+ input = ucs2decode(input);
+
+ // Cache the length.
+ var inputLength = input.length;
+
+ // Initialize the state.
+ var n = initialN;
+ var delta = 0;
+ var bias = initialBias;
+
+ // Handle the basic code points.
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var _currentValue2 = _step.value;
+
+ if (_currentValue2 < 0x80) {
+ output.push(stringFromCharCode(_currentValue2));
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ var basicLength = output.length;
+ var handledCPCount = basicLength;
+
+ // `handledCPCount` is the number of code points that have been handled;
+ // `basicLength` is the number of basic code points.
+
+ // Finish the basic string with a delimiter unless it's empty.
+ if (basicLength) {
+ output.push(delimiter);
+ }
+
+ // Main encoding loop:
+ while (handledCPCount < inputLength) {
+
+ // All non-basic code points < n have been handled already. Find the next
+ // larger one:
+ var m = maxInt;
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+
+ try {
+ for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var currentValue = _step2.value;
+
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
+ // but guard against overflow.
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
+ }
+ }
+
+ var handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error$1('overflow');
+ }
+
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+
+ var _iteratorNormalCompletion3 = true;
+ var _didIteratorError3 = false;
+ var _iteratorError3 = undefined;
+
+ try {
+ for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
+ var _currentValue = _step3.value;
+
+ if (_currentValue < n && ++delta > maxInt) {
+ error$1('overflow');
+ }
+ if (_currentValue == n) {
+ // Represent delta as a generalized variable-length integer.
+ var q = delta;
+ for (var k = base;; /* no condition */k += base) {
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+ if (q < t) {
+ break;
+ }
+ var qMinusT = q - t;
+ var baseMinusT = base - t;
+ output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
+ q = floor(qMinusT / baseMinusT);
+ }
+
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+ } catch (err) {
+ _didIteratorError3 = true;
+ _iteratorError3 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
+ _iterator3.return();
+ }
+ } finally {
+ if (_didIteratorError3) {
+ throw _iteratorError3;
+ }
+ }
+ }
+
+ ++delta;
+ ++n;
+ }
+ return output.join('');
+};
+
+/**
+ * Converts a Punycode string representing a domain name or an email address
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
+ * it doesn't matter if you call it on a string that has already been
+ * converted to Unicode.
+ * @memberOf punycode
+ * @param {String} input The Punycoded domain name or email address to
+ * convert to Unicode.
+ * @returns {String} The Unicode representation of the given Punycode
+ * string.
+ */
+var toUnicode = function toUnicode(input) {
+ return mapDomain(input, function (string) {
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
+ });
+};
+
+/**
+ * Converts a Unicode string representing a domain name or an email address to
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
+ * i.e. it doesn't matter if you call it with a domain that's already in
+ * ASCII.
+ * @memberOf punycode
+ * @param {String} input The domain name or email address to convert, as a
+ * Unicode string.
+ * @returns {String} The Punycode representation of the given domain name or
+ * email address.
+ */
+var toASCII = function toASCII(input) {
+ return mapDomain(input, function (string) {
+ return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
+ });
+};
+
+/*--------------------------------------------------------------------------*/
+
+/** Define the public API */
+var punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ 'version': '2.1.0',
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
+ * @memberOf punycode
+ * @type Object
+ */
+ 'ucs2': {
+ 'decode': ucs2decode,
+ 'encode': ucs2encode
+ },
+ 'decode': decode,
+ 'encode': encode,
+ 'toASCII': toASCII,
+ 'toUnicode': toUnicode
+};
+
+/**
+ * URI.js
+ *
+ * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
+ * @see http://github.com/garycourt/uri-js
+ */
+/**
+ * Copyright 2011 Gary Court. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of Gary Court.
+ */
+var SCHEMES = {};
+function pctEncChar(chr) {
+ var c = chr.charCodeAt(0);
+ var e = void 0;
+ if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
+ return e;
+}
+function pctDecChars(str) {
+ var newStr = "";
+ var i = 0;
+ var il = str.length;
+ while (i < il) {
+ var c = parseInt(str.substr(i + 1, 2), 16);
+ if (c < 128) {
+ newStr += String.fromCharCode(c);
+ i += 3;
+ } else if (c >= 194 && c < 224) {
+ if (il - i >= 6) {
+ var c2 = parseInt(str.substr(i + 4, 2), 16);
+ newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
+ } else {
+ newStr += str.substr(i, 6);
+ }
+ i += 6;
+ } else if (c >= 224) {
+ if (il - i >= 9) {
+ var _c = parseInt(str.substr(i + 4, 2), 16);
+ var c3 = parseInt(str.substr(i + 7, 2), 16);
+ newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
+ } else {
+ newStr += str.substr(i, 9);
+ }
+ i += 9;
+ } else {
+ newStr += str.substr(i, 3);
+ i += 3;
+ }
+ }
+ return newStr;
+}
+function _normalizeComponentEncoding(components, protocol) {
+ function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(protocol.UNRESERVED) ? str : decStr;
+ }
+ if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
+ if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ return components;
+}
+
+function _stripLeadingZeros(str) {
+ return str.replace(/^0*(.*)/, "$1") || "0";
+}
+function _normalizeIPv4(host, protocol) {
+ var matches = host.match(protocol.IPV4ADDRESS) || [];
+
+ var _matches = slicedToArray(matches, 2),
+ address = _matches[1];
+
+ if (address) {
+ return address.split(".").map(_stripLeadingZeros).join(".");
+ } else {
+ return host;
+ }
+}
+function _normalizeIPv6(host, protocol) {
+ var matches = host.match(protocol.IPV6ADDRESS) || [];
+
+ var _matches2 = slicedToArray(matches, 3),
+ address = _matches2[1],
+ zone = _matches2[2];
+
+ if (address) {
+ var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),
+ _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
+ last = _address$toLowerCase$2[0],
+ first = _address$toLowerCase$2[1];
+
+ var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
+ var lastFields = last.split(":").map(_stripLeadingZeros);
+ var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
+ var fieldCount = isLastFieldIPv4Address ? 7 : 8;
+ var lastFieldsStart = lastFields.length - fieldCount;
+ var fields = Array(fieldCount);
+ for (var x = 0; x < fieldCount; ++x) {
+ fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
+ }
+ if (isLastFieldIPv4Address) {
+ fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
+ }
+ var allZeroFields = fields.reduce(function (acc, field, index) {
+ if (!field || field === "0") {
+ var lastLongest = acc[acc.length - 1];
+ if (lastLongest && lastLongest.index + lastLongest.length === index) {
+ lastLongest.length++;
+ } else {
+ acc.push({ index: index, length: 1 });
+ }
+ }
+ return acc;
+ }, []);
+ var longestZeroFields = allZeroFields.sort(function (a, b) {
+ return b.length - a.length;
+ })[0];
+ var newHost = void 0;
+ if (longestZeroFields && longestZeroFields.length > 1) {
+ var newFirst = fields.slice(0, longestZeroFields.index);
+ var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
+ newHost = newFirst.join(":") + "::" + newLast.join(":");
+ } else {
+ newHost = fields.join(":");
+ }
+ if (zone) {
+ newHost += "%" + zone;
+ }
+ return newHost;
+ } else {
+ return host;
+ }
+}
+var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
+var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
+function parse(uriString) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var components = {};
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
+ var matches = uriString.match(URI_PARSE);
+ if (matches) {
+ if (NO_MATCH_IS_UNDEFINED) {
+ //store each component
+ components.scheme = matches[1];
+ components.userinfo = matches[3];
+ components.host = matches[4];
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = matches[7];
+ components.fragment = matches[8];
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = matches[5];
+ }
+ } else {
+ //IE FIX for improper RegExp matching
+ //store each component
+ components.scheme = matches[1] || undefined;
+ components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
+ components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
+ components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
+ }
+ }
+ if (components.host) {
+ //normalize IP hosts
+ components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
+ }
+ //determine reference type
+ if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
+ components.reference = "same-document";
+ } else if (components.scheme === undefined) {
+ components.reference = "relative";
+ } else if (components.fragment === undefined) {
+ components.reference = "absolute";
+ } else {
+ components.reference = "uri";
+ }
+ //check for reference errors
+ if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
+ components.error = components.error || "URI is not a " + options.reference + " reference.";
+ }
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //check if scheme can't handle IRIs
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
+ //if host component is a domain name
+ if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ }
+ //convert IRI -> URI
+ _normalizeComponentEncoding(components, URI_PROTOCOL);
+ } else {
+ //normalize encodings
+ _normalizeComponentEncoding(components, protocol);
+ }
+ //perform scheme specific parsing
+ if (schemeHandler && schemeHandler.parse) {
+ schemeHandler.parse(components, options);
+ }
+ } else {
+ components.error = components.error || "URI can not be parsed.";
+ }
+ return components;
+}
+
+function _recomposeAuthority(components, options) {
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ if (components.userinfo !== undefined) {
+ uriTokens.push(components.userinfo);
+ uriTokens.push("@");
+ }
+ if (components.host !== undefined) {
+ //normalize IP hosts, add brackets and escape zone separator for IPv6
+ uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {
+ return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
+ }));
+ }
+ if (typeof components.port === "number" || typeof components.port === "string") {
+ uriTokens.push(":");
+ uriTokens.push(String(components.port));
+ }
+ return uriTokens.length ? uriTokens.join("") : undefined;
+}
+
+var RDS1 = /^\.\.?\//;
+var RDS2 = /^\/\.(\/|$)/;
+var RDS3 = /^\/\.\.(\/|$)/;
+var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
+function removeDotSegments(input) {
+ var output = [];
+ while (input.length) {
+ if (input.match(RDS1)) {
+ input = input.replace(RDS1, "");
+ } else if (input.match(RDS2)) {
+ input = input.replace(RDS2, "/");
+ } else if (input.match(RDS3)) {
+ input = input.replace(RDS3, "/");
+ output.pop();
+ } else if (input === "." || input === "..") {
+ input = "";
+ } else {
+ var im = input.match(RDS5);
+ if (im) {
+ var s = im[0];
+ input = input.slice(s.length);
+ output.push(s);
+ } else {
+ throw new Error("Unexpected dot segment condition");
+ }
+ }
+ }
+ return output.join("");
+}
+
+function serialize(components) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
+ var uriTokens = [];
+ //find scheme handler
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //perform scheme specific serialization
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
+ if (components.host) {
+ //if host component is an IPv6 address
+ if (protocol.IPV6ADDRESS.test(components.host)) {}
+ //TODO: normalize IPv6 address as per RFC 5952
+
+ //if host component is a domain name
+ else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
+ //convert IDN via punycode
+ try {
+ components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
+ } catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ }
+ }
+ //normalize encoding
+ _normalizeComponentEncoding(components, protocol);
+ if (options.reference !== "suffix" && components.scheme) {
+ uriTokens.push(components.scheme);
+ uriTokens.push(":");
+ }
+ var authority = _recomposeAuthority(components, options);
+ if (authority !== undefined) {
+ if (options.reference !== "suffix") {
+ uriTokens.push("//");
+ }
+ uriTokens.push(authority);
+ if (components.path && components.path.charAt(0) !== "/") {
+ uriTokens.push("/");
+ }
+ }
+ if (components.path !== undefined) {
+ var s = components.path;
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
+ s = removeDotSegments(s);
+ }
+ if (authority === undefined) {
+ s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
+ }
+ uriTokens.push(s);
+ }
+ if (components.query !== undefined) {
+ uriTokens.push("?");
+ uriTokens.push(components.query);
+ }
+ if (components.fragment !== undefined) {
+ uriTokens.push("#");
+ uriTokens.push(components.fragment);
+ }
+ return uriTokens.join(""); //merge tokens into a string
+}
+
+function resolveComponents(base, relative) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var skipNormalization = arguments[3];
+
+ var target = {};
+ if (!skipNormalization) {
+ base = parse(serialize(base, options), options); //normalize base components
+ relative = parse(serialize(relative, options), options); //normalize relative components
+ }
+ options = options || {};
+ if (!options.tolerant && relative.scheme) {
+ target.scheme = relative.scheme;
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ } else {
+ if (!relative.path) {
+ target.path = base.path;
+ if (relative.query !== undefined) {
+ target.query = relative.query;
+ } else {
+ target.query = base.query;
+ }
+ } else {
+ if (relative.path.charAt(0) === "/") {
+ target.path = removeDotSegments(relative.path);
+ } else {
+ if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
+ target.path = "/" + relative.path;
+ } else if (!base.path) {
+ target.path = relative.path;
+ } else {
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
+ }
+ target.path = removeDotSegments(target.path);
+ }
+ target.query = relative.query;
+ }
+ //target.authority = base.authority;
+ target.userinfo = base.userinfo;
+ target.host = base.host;
+ target.port = base.port;
+ }
+ target.scheme = base.scheme;
+ }
+ target.fragment = relative.fragment;
+ return target;
+}
+
+function resolve(baseURI, relativeURI, options) {
+ var schemelessOptions = assign({ scheme: 'null' }, options);
+ return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
+}
+
+function normalize(uri, options) {
+ if (typeof uri === "string") {
+ uri = serialize(parse(uri, options), options);
+ } else if (typeOf(uri) === "object") {
+ uri = parse(serialize(uri, options), options);
+ }
+ return uri;
+}
+
+function equal(uriA, uriB, options) {
+ if (typeof uriA === "string") {
+ uriA = serialize(parse(uriA, options), options);
+ } else if (typeOf(uriA) === "object") {
+ uriA = serialize(uriA, options);
+ }
+ if (typeof uriB === "string") {
+ uriB = serialize(parse(uriB, options), options);
+ } else if (typeOf(uriB) === "object") {
+ uriB = serialize(uriB, options);
+ }
+ return uriA === uriB;
+}
+
+function escapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
+}
+
+function unescapeComponent(str, options) {
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
+}
+
+var handler = {
+ scheme: "http",
+ domainHost: true,
+ parse: function parse(components, options) {
+ //report missing host
+ if (!components.host) {
+ components.error = components.error || "HTTP URIs must have a host.";
+ }
+ return components;
+ },
+ serialize: function serialize(components, options) {
+ var secure = String(components.scheme).toLowerCase() === "https";
+ //normalize the default port
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
+ components.port = undefined;
+ }
+ //normalize the empty path
+ if (!components.path) {
+ components.path = "/";
+ }
+ //NOTE: We do not parse query strings for HTTP URIs
+ //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
+ //and not the HTTP spec.
+ return components;
+ }
+};
+
+var handler$1 = {
+ scheme: "https",
+ domainHost: handler.domainHost,
+ parse: handler.parse,
+ serialize: handler.serialize
+};
+
+function isSecure(wsComponents) {
+ return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
+}
+//RFC 6455
+var handler$2 = {
+ scheme: "ws",
+ domainHost: true,
+ parse: function parse(components, options) {
+ var wsComponents = components;
+ //indicate if the secure flag is set
+ wsComponents.secure = isSecure(wsComponents);
+ //construct resouce name
+ wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');
+ wsComponents.path = undefined;
+ wsComponents.query = undefined;
+ return wsComponents;
+ },
+ serialize: function serialize(wsComponents, options) {
+ //normalize the default port
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
+ wsComponents.port = undefined;
+ }
+ //ensure scheme matches secure flag
+ if (typeof wsComponents.secure === 'boolean') {
+ wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws';
+ wsComponents.secure = undefined;
+ }
+ //reconstruct path from resource name
+ if (wsComponents.resourceName) {
+ var _wsComponents$resourc = wsComponents.resourceName.split('?'),
+ _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),
+ path = _wsComponents$resourc2[0],
+ query = _wsComponents$resourc2[1];
+
+ wsComponents.path = path && path !== '/' ? path : undefined;
+ wsComponents.query = query;
+ wsComponents.resourceName = undefined;
+ }
+ //forbid fragment component
+ wsComponents.fragment = undefined;
+ return wsComponents;
+ }
+};
+
+var handler$3 = {
+ scheme: "wss",
+ domainHost: handler$2.domainHost,
+ parse: handler$2.parse,
+ serialize: handler$2.serialize
+};
+
+var O = {};
+var isIRI = true;
+//RFC 3986
+var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
+var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
+var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
+//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
+//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
+//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
+//const VCHAR$$ = "[\\x21-\\x7E]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
+//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
+//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
+//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
+var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
+var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
+var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
+var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
+var UNRESERVED = new RegExp(UNRESERVED$$, "g");
+var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
+var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
+var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
+var NOT_HFVALUE = NOT_HFNAME;
+function decodeUnreserved(str) {
+ var decStr = pctDecChars(str);
+ return !decStr.match(UNRESERVED) ? str : decStr;
+}
+var handler$4 = {
+ scheme: "mailto",
+ parse: function parse$$1(components, options) {
+ var mailtoComponents = components;
+ var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
+ mailtoComponents.path = undefined;
+ if (mailtoComponents.query) {
+ var unknownHeaders = false;
+ var headers = {};
+ var hfields = mailtoComponents.query.split("&");
+ for (var x = 0, xl = hfields.length; x < xl; ++x) {
+ var hfield = hfields[x].split("=");
+ switch (hfield[0]) {
+ case "to":
+ var toAddrs = hfield[1].split(",");
+ for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
+ to.push(toAddrs[_x]);
+ }
+ break;
+ case "subject":
+ mailtoComponents.subject = unescapeComponent(hfield[1], options);
+ break;
+ case "body":
+ mailtoComponents.body = unescapeComponent(hfield[1], options);
+ break;
+ default:
+ unknownHeaders = true;
+ headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
+ break;
+ }
+ }
+ if (unknownHeaders) mailtoComponents.headers = headers;
+ }
+ mailtoComponents.query = undefined;
+ for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
+ var addr = to[_x2].split("@");
+ addr[0] = unescapeComponent(addr[0]);
+ if (!options.unicodeSupport) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
+ } catch (e) {
+ mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ } else {
+ addr[1] = unescapeComponent(addr[1], options).toLowerCase();
+ }
+ to[_x2] = addr.join("@");
+ }
+ return mailtoComponents;
+ },
+ serialize: function serialize$$1(mailtoComponents, options) {
+ var components = mailtoComponents;
+ var to = toArray(mailtoComponents.to);
+ if (to) {
+ for (var x = 0, xl = to.length; x < xl; ++x) {
+ var toAddr = String(to[x]);
+ var atIdx = toAddr.lastIndexOf("@");
+ var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
+ var domain = toAddr.slice(atIdx + 1);
+ //convert IDN via punycode
+ try {
+ domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
+ } catch (e) {
+ components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ to[x] = localPart + "@" + domain;
+ }
+ components.path = to.join(",");
+ }
+ var headers = mailtoComponents.headers = mailtoComponents.headers || {};
+ if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
+ if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
+ var fields = [];
+ for (var name in headers) {
+ if (headers[name] !== O[name]) {
+ fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
+ }
+ }
+ if (fields.length) {
+ components.query = fields.join("&");
+ }
+ return components;
+ }
+};
+
+var URN_PARSE = /^([^\:]+)\:(.*)/;
+//RFC 2141
+var handler$5 = {
+ scheme: "urn",
+ parse: function parse$$1(components, options) {
+ var matches = components.path && components.path.match(URN_PARSE);
+ var urnComponents = components;
+ if (matches) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = matches[1].toLowerCase();
+ var nss = matches[2];
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ urnComponents.nid = nid;
+ urnComponents.nss = nss;
+ urnComponents.path = undefined;
+ if (schemeHandler) {
+ urnComponents = schemeHandler.parse(urnComponents, options);
+ }
+ } else {
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
+ }
+ return urnComponents;
+ },
+ serialize: function serialize$$1(urnComponents, options) {
+ var scheme = options.scheme || urnComponents.scheme || "urn";
+ var nid = urnComponents.nid;
+ var urnScheme = scheme + ":" + (options.nid || nid);
+ var schemeHandler = SCHEMES[urnScheme];
+ if (schemeHandler) {
+ urnComponents = schemeHandler.serialize(urnComponents, options);
+ }
+ var uriComponents = urnComponents;
+ var nss = urnComponents.nss;
+ uriComponents.path = (nid || options.nid) + ":" + nss;
+ return uriComponents;
+ }
+};
+
+var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
+//RFC 4122
+var handler$6 = {
+ scheme: "urn:uuid",
+ parse: function parse(urnComponents, options) {
+ var uuidComponents = urnComponents;
+ uuidComponents.uuid = uuidComponents.nss;
+ uuidComponents.nss = undefined;
+ if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
+ }
+ return uuidComponents;
+ },
+ serialize: function serialize(uuidComponents, options) {
+ var urnComponents = uuidComponents;
+ //normalize UUID
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
+ return urnComponents;
+ }
+};
+
+SCHEMES[handler.scheme] = handler;
+SCHEMES[handler$1.scheme] = handler$1;
+SCHEMES[handler$2.scheme] = handler$2;
+SCHEMES[handler$3.scheme] = handler$3;
+SCHEMES[handler$4.scheme] = handler$4;
+SCHEMES[handler$5.scheme] = handler$5;
+SCHEMES[handler$6.scheme] = handler$6;
+
+exports.SCHEMES = SCHEMES;
+exports.pctEncChar = pctEncChar;
+exports.pctDecChars = pctDecChars;
+exports.parse = parse;
+exports.removeDotSegments = removeDotSegments;
+exports.serialize = serialize;
+exports.resolveComponents = resolveComponents;
+exports.resolve = resolve;
+exports.normalize = normalize;
+exports.equal = equal;
+exports.escapeComponent = escapeComponent;
+exports.unescapeComponent = unescapeComponent;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+//# sourceMappingURL=uri.all.js.map
diff --git a/node_modules/uri-js/dist/es5/uri.all.js.map b/node_modules/uri-js/dist/es5/uri.all.js.map
new file mode 100755
index 0000000..5b30c4e
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/wss.ts","../../src/schemes/ws.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler<UUIDComponents, URIOptions, URNComponents> = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler<URNComponents,URNOptions> = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array<string>,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler<MailtoComponents> = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array<string>(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce<Array<{index:number,length:number}>>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = (<RegExpMatchArray>(\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array<string> = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array<string> = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array<string> = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(<URIComponents>uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(<URIComponents>uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(<URIComponents>uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array<string>):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array<any> {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","wss","ws","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","wsComponents","fragment","resourceName","secure","port","isSecure","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","H16$","LS32$","DEC_OCTET_RELAXED$","DEC_OCTET$","UCSCHAR$$","GEN_DELIMS$$","SP$$","DQUOTE$$","CR$","obj","key","source","setInterval","call","prototype","o","Object","shift","sets"],"mappings":";;;;;;;AYAA,SAAA8E,KAAA,GAAA;sCAAyBsP,IAAzB;YAAA;;;QACKA,KAAKnS,MAAL,GAAc,CAAlB,EAAqB;aACf,CAAL,IAAUmS,KAAK,CAAL,EAAQzQ,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,CAAV;YACMK,KAAKoQ,KAAKnS,MAAL,GAAc,CAAzB;aACK,IAAIgB,IAAI,CAAb,EAAgBA,IAAIe,EAApB,EAAwB,EAAEf,CAA1B,EAA6B;iBACvBA,CAAL,IAAUmR,KAAKnR,CAAL,EAAQU,KAAR,CAAc,CAAd,EAAiB,CAAC,CAAlB,CAAV;;aAEIK,EAAL,IAAWoQ,KAAKpQ,EAAL,EAASL,KAAT,CAAe,CAAf,CAAX;eACOyQ,KAAKpS,IAAL,CAAU,EAAV,CAAP;KAPD,MAQO;eACCoS,KAAK,CAAL,CAAP;;;AAIF,AAAA,SAAA/O,MAAA,CAAuBV,GAAvB,EAAA;WACQ,QAAQA,GAAR,GAAc,GAArB;;AAGD,AAAA,SAAA4B,MAAA,CAAuB0N,CAAvB,EAAA;WACQA,MAAM/S,SAAN,GAAkB,WAAlB,GAAiC+S,MAAM,IAAN,GAAa,MAAb,GAAsBC,OAAOF,SAAP,CAAiBhO,QAAjB,CAA0B+N,IAA1B,CAA+BE,CAA/B,EAAkC7P,KAAlC,CAAwC,GAAxC,EAA6CkE,GAA7C,GAAmDlE,KAAnD,CAAyD,GAAzD,EAA8D+P,KAA9D,GAAsEvT,WAAtE,EAA9D;;AAGD,AAAA,SAAA2B,WAAA,CAA4BoC,GAA5B,EAAA;WACQA,IAAIpC,WAAJ,EAAP;;AAGD,AAAA,SAAA0B,OAAA,CAAwB0P,GAAxB,EAAA;WACQA,QAAQzS,SAAR,IAAqByS,QAAQ,IAA7B,GAAqCA,eAAenJ,KAAf,GAAuBmJ,GAAvB,GAA8B,OAAOA,IAAI1R,MAAX,KAAsB,QAAtB,IAAkC0R,IAAIvP,KAAtC,IAA+CuP,IAAIG,WAAnD,IAAkEH,IAAII,IAAtE,GAA6E,CAACJ,GAAD,CAA7E,GAAqFnJ,MAAMwJ,SAAN,CAAgBrQ,KAAhB,CAAsBoQ,IAAtB,CAA2BJ,GAA3B,CAAxJ,GAA4L,EAAnM;;AAID,AAAA,SAAA5M,MAAA,CAAuBE,MAAvB,EAAuC4M,MAAvC,EAAA;QACOF,MAAM1M,MAAZ;QACI4M,MAAJ,EAAY;aACN,IAAMD,GAAX,IAAkBC,MAAlB,EAA0B;gBACrBD,GAAJ,IAAWC,OAAOD,GAAP,CAAX;;;WAGKD,GAAP;;;ADnCD,SAAA3D,SAAA,CAA0BzK,KAA1B,EAAA;QAEEgL,UAAU,UADX;QAECmD,MAAM,SAFP;QAGClD,UAAU,OAHX;QAICiD,WAAW,SAJZ;QAKCnO,WAAWR,MAAM0L,OAAN,EAAe,UAAf,CALZ;;WAMQ,SANR;QAOCgD,OAAO,SAPR;QAQCrO,eAAeE,OAAOA,OAAO,YAAYC,QAAZ,GAAuB,GAAvB,GAA6BA,QAA7B,GAAwCA,QAAxC,GAAmD,GAAnD,GAAyDA,QAAzD,GAAoEA,QAA3E,IAAuF,GAAvF,GAA6FD,OAAO,gBAAgBC,QAAhB,GAA2B,GAA3B,GAAiCA,QAAjC,GAA4CA,QAAnD,CAA7F,GAA4J,GAA5J,GAAkKD,OAAO,MAAMC,QAAN,GAAiBA,QAAxB,CAAzK,CARhB;;mBASgB,yBAThB;QAUC+K,eAAe,qCAVhB;QAWCD,aAAatL,MAAMyO,YAAN,EAAoBlD,YAApB,CAXd;QAYCiD,YAAY/N,QAAQ,6EAAR,GAAwF,IAZrG;;iBAacA,QAAQ,mBAAR,GAA8B,IAb5C;;mBAcgBT,MAAMyL,OAAN,EAAeC,OAAf,EAAwB,gBAAxB,EAA0C8C,SAA1C,CAdhB;QAeCtC,UAAU3L,OAAOkL,UAAUzL,MAAMyL,OAAN,EAAeC,OAAf,EAAwB,aAAxB,CAAV,GAAmD,GAA1D,CAfX;QAgBCE,YAAYrL,OAAOA,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,OAAlC,CAA5B,IAA0E,GAAjF,CAhBb;QAiBCgD,aAAahO,OAAOA,OAAO,SAAP,IAAoB,GAApB,GAA0BA,OAAO,WAAWmL,OAAlB,CAA1B,GAAuD,GAAvD,GAA6DnL,OAAO,MAAMmL,OAAN,GAAgBA,OAAvB,CAA7D,GAA+F,GAA/F,GAAqGnL,OAAO,UAAUmL,OAAjB,CAArG,GAAiI,GAAjI,GAAuIA,OAA9I,CAjBd;QAkBC4C,qBAAqB/N,OAAOA,OAAO,SAAP,IAAoB,GAApB,GAA0BA,OAAO,WAAWmL,OAAlB,CAA1B,GAAuD,GAAvD,GAA6DnL,OAAO,MAAMmL,OAAN,GAAgBA,OAAvB,CAA7D,GAA+F,GAA/F,GAAqGnL,OAAO,YAAYmL,OAAnB,CAArG,GAAmI,OAAnI,GAA6IA,OAApJ,CAlBtB;;mBAmBgBnL,OAAO+N,qBAAqB,KAArB,GAA6BA,kBAA7B,GAAkD,KAAlD,GAA0DA,kBAA1D,GAA+E,KAA/E,GAAuFA,kBAA9F,CAnBhB;QAoBCF,OAAO7N,OAAOC,WAAW,OAAlB,CApBR;QAqBC6N,QAAQ9N,OAAOA,OAAO6N,OAAO,KAAP,GAAeA,IAAtB,IAA8B,GAA9B,GAAoC/C,YAA3C,CArBT;QAsBCsC,gBAAgBpN,OAAmEA,OAAO6N,OAAO,KAAd,IAAuB,KAAvB,GAA+BC,KAAlG,CAtBjB;;oBAuBiB9N,OAAwD,WAAWA,OAAO6N,OAAO,KAAd,CAAX,GAAkC,KAAlC,GAA0CC,KAAlG,CAvBjB;;oBAwBiB9N,OAAOA,OAAwC6N,IAAxC,IAAgD,SAAhD,GAA4D7N,OAAO6N,OAAO,KAAd,CAA5D,GAAmF,KAAnF,GAA2FC,KAAlG,CAxBjB;;oBAyBiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA4D7N,OAAO6N,OAAO,KAAd,CAA5D,GAAmF,KAAnF,GAA2FC,KAAlG,CAzBjB;;oBA0BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA4D7N,OAAO6N,OAAO,KAAd,CAA5D,GAAmF,KAAnF,GAA2FC,KAAlG,CA1BjB;;oBA2BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAAmEA,IAAnE,GAA0E,KAA1E,GAA2FC,KAAlG,CA3BjB;;oBA4BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA2FC,KAAlG,CA5BjB;;oBA6BiB9N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAhD,GAA2FA,IAAlG,CA7BjB;;oBA8BiB7N,OAAOA,OAAOA,OAAO6N,OAAO,KAAd,IAAuB,OAAvB,GAAiCA,IAAxC,IAAgD,SAAvD,CA9BjB;;mBA+BgB7N,OAAO,CAACoN,aAAD,EAAgBC,aAAhB,EAA+BC,aAA/B,EAA8CC,aAA9C,EAA6DC,aAA7D,EAA4EC,aAA5E,EAA2FC,aAA3F,EAA0GC,aAA1G,EAAyHC,aAAzH,EAAwIjR,IAAxI,CAA6I,GAA7I,CAAP,CA/BhB;QAgCCkO,UAAU7K,OAAOA,OAAON,eAAe,GAAf,GAAqBI,YAA5B,IAA4C,GAAnD,CAhCX;;iBAiCcE,OAAO4K,eAAe,OAAf,GAAyBC,OAAhC,CAjCd;;yBAkCsB7K,OAAO4K,eAAe5K,OAAO,iBAAiBC,QAAjB,GAA4B,MAAnC,CAAf,GAA4D4K,OAAnE,CAlCtB;;iBAmCc7K,OAAO,SAASC,QAAT,GAAoB,MAApB,GAA6BR,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,OAAlC,CAA7B,GAA0E,GAAjF,CAnCd;QAoCCgC,cAAchN,OAAO,QAAQA,OAAOkN,qBAAqB,GAArB,GAA2BtC,YAA3B,GAA0C,GAA1C,GAAgDuC,UAAvD,CAAR,GAA6E,KAApF,CApCf;;gBAqCanN,OAAOA,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,CAA5B,IAAiE,GAAxE,CArCb;QAsCCM,QAAQtL,OAAOgN,cAAc,GAAd,GAAoBlC,YAApB,GAAmC,KAAnC,GAA2CmC,SAA3C,GAAuD,GAAvD,GAA6D,GAA7D,GAAmEA,SAA1E,CAtCT;QAuCC1B,QAAQvL,OAAOmL,UAAU,GAAjB,CAvCT;QAwCCuB,aAAa1M,OAAOA,OAAOqL,YAAY,GAAnB,IAA0B,GAA1B,GAAgCC,KAAhC,GAAwCtL,OAAO,QAAQuL,KAAf,CAAxC,GAAgE,GAAvE,CAxCd;QAyCCoB,SAAS3M,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,UAAlC,CAA5B,CAzCV;QA0CC+B,WAAW/M,OAAO2M,SAAS,GAAhB,CA1CZ;QA2CCE,cAAc7M,OAAO2M,SAAS,GAAhB,CA3Cf;QA4CCG,iBAAiB9M,OAAOA,OAAOF,eAAe,GAAf,GAAqBL,MAAMC,YAAN,EAAoBsL,YAApB,EAAkC,OAAlC,CAA5B,IAA0E,GAAjF,CA5ClB;QA6CCY,gBAAgB5L,OAAOA,OAAO,QAAQ+M,QAAf,IAA2B,GAAlC,CA7CjB;QA8CClB,iBAAiB7L,OAAO,QAAQA,OAAO6M,cAAcjB,aAArB,CAAR,GAA8C,GAArD,CA9ClB;;qBA+CkB5L,OAAO8M,iBAAiBlB,aAAxB,CA/ClB;;qBAgDkB5L,OAAO6M,cAAcjB,aAArB,CAhDlB;;kBAiDe,QAAQe,MAAR,GAAiB,GAjDhC;QAkDCC,QAAQ5M,OAAO4L,gBAAgB,GAAhB,GAAsBC,cAAtB,GAAuC,GAAvC,GAA6CK,cAA7C,GAA8D,GAA9D,GAAoEJ,cAApE,GAAqF,GAArF,GAA2FC,WAAlG,CAlDT;QAmDCC,SAAShM,OAAOA,OAAO2M,SAAS,GAAT,GAAelN,MAAM,UAAN,EAAkBwL,UAAlB,CAAtB,IAAuD,GAA9D,CAnDV;QAoDCQ,YAAYzL,OAAOA,OAAO2M,SAAS,WAAhB,IAA+B,GAAtC,CApDb;QAqDCN,aAAarM,OAAOA,OAAO,WAAW0M,UAAX,GAAwBd,aAA/B,IAAgD,GAAhD,GAAsDC,cAAtD,GAAuE,GAAvE,GAA6EC,cAA7E,GAA8F,GAA9F,GAAoGC,WAA3G,CArDd;QAsDCQ,OAAOvM,OAAO2L,UAAU,KAAV,GAAkBU,UAAlB,GAA+BrM,OAAO,QAAQgM,MAAf,CAA/B,GAAwD,GAAxD,GAA8DhM,OAAO,QAAQyL,SAAf,CAA9D,GAA0F,GAAjG,CAtDR;QAuDCgB,iBAAiBzM,OAAOA,OAAO,WAAW0M,UAAX,GAAwBd,aAA/B,IAAgD,GAAhD,GAAsDC,cAAtD,GAAuE,GAAvE,GAA6EK,cAA7E,GAA8F,GAA9F,GAAoGH,WAA3G,CAvDlB;QAwDCS,YAAYxM,OAAOyM,iBAAiBzM,OAAO,QAAQgM,MAAf,CAAjB,GAA0C,GAA1C,GAAgDhM,OAAO,QAAQyL,SAAf,CAAhD,GAA4E,GAAnF,CAxDb;QAyDCa,iBAAiBtM,OAAOuM,OAAO,GAAP,GAAaC,SAApB,CAzDlB;QA0DCJ,gBAAgBpM,OAAO2L,UAAU,KAAV,GAAkBU,UAAlB,GAA+BrM,OAAO,QAAQgM,MAAf,CAA/B,GAAwD,GAA/D,CA1DjB;QA4DCG,eAAe,OAAOR,OAAP,GAAiB,MAAjB,GAA0B3L,OAAOA,OAAO,YAAYA,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAZ,GAA6C,IAA7C,GAAoDC,KAApD,GAA4D,GAA5D,GAAkEtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAAlE,GAAiG,IAAxG,IAAgH,IAAhH,GAAuHK,aAAvH,GAAuI,GAAvI,GAA6IC,cAA7I,GAA8J,GAA9J,GAAoKC,cAApK,GAAqL,GAArL,GAA2LC,WAA3L,GAAyM,GAAhN,CAA1B,GAAiP/L,OAAO,SAASgM,MAAT,GAAkB,GAAzB,CAAjP,GAAiR,GAAjR,GAAuRhM,OAAO,SAASyL,SAAT,GAAqB,GAA5B,CAAvR,GAA0T,IA5D1U;QA6DCQ,gBAAgB,WAAWjM,OAAOA,OAAO,YAAYA,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAZ,GAA6C,IAA7C,GAAoDC,KAApD,GAA4D,GAA5D,GAAkEtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAAlE,GAAiG,IAAxG,IAAgH,IAAhH,GAAuHK,aAAvH,GAAuI,GAAvI,GAA6IC,cAA7I,GAA8J,GAA9J,GAAoKK,cAApK,GAAqL,GAArL,GAA2LH,WAA3L,GAAyM,GAAhN,CAAX,GAAkO/L,OAAO,SAASgM,MAAT,GAAkB,GAAzB,CAAlO,GAAkQ,GAAlQ,GAAwQhM,OAAO,SAASyL,SAAT,GAAqB,GAA5B,CAAxQ,GAA2S,IA7D5T;QA8DCC,gBAAgB,OAAOC,OAAP,GAAiB,MAAjB,GAA0B3L,OAAOA,OAAO,YAAYA,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAZ,GAA6C,IAA7C,GAAoDC,KAApD,GAA4D,GAA5D,GAAkEtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAAlE,GAAiG,IAAxG,IAAgH,IAAhH,GAAuHK,aAAvH,GAAuI,GAAvI,GAA6IC,cAA7I,GAA8J,GAA9J,GAAoKC,cAApK,GAAqL,GAArL,GAA2LC,WAA3L,GAAyM,GAAhN,CAA1B,GAAiP/L,OAAO,SAASgM,MAAT,GAAkB,GAAzB,CAAjP,GAAiR,IA9DlS;QA+DCR,eAAe,MAAMxL,OAAO,SAASyL,SAAT,GAAqB,GAA5B,CAAN,GAAyC,IA/DzD;QAgECL,iBAAiB,MAAMpL,OAAO,MAAMqL,SAAN,GAAkB,IAAzB,CAAN,GAAuC,IAAvC,GAA8CC,KAA9C,GAAsD,GAAtD,GAA4DtL,OAAO,SAASuL,KAAT,GAAiB,GAAxB,CAA5D,GAA2F,IAhE7G;WAmEO;oBACO,IAAI/L,MAAJ,CAAWC,MAAM,KAAN,EAAayL,OAAb,EAAsBC,OAAtB,EAA+B,aAA/B,CAAX,EAA0D,GAA1D,CADP;sBAES,IAAI3L,MAAJ,CAAWC,MAAM,WAAN,EAAmBC,YAAnB,EAAiCsL,YAAjC,CAAX,EAA2D,GAA3D,CAFT;kBAGK,IAAIxL,MAAJ,CAAWC,MAAM,iBAAN,EAAyBC,YAAzB,EAAuCsL,YAAvC,CAAX,EAAiE,GAAjE,CAHL;kBAIK,IAAIxL,MAAJ,CAAWC,MAAM,iBAAN,EAAyBC,YAAzB,EAAuCsL,YAAvC,CAAX,EAAiE,GAAjE,CAJL;2BAKc,IAAIxL,MAAJ,CAAWC,MAAM,cAAN,EAAsBC,YAAtB,EAAoCsL,YAApC,CAAX,EAA8D,GAA9D,CALd;mBAMM,IAAIxL,MAAJ,CAAWC,MAAM,QAAN,EAAgBC,YAAhB,EAA8BsL,YAA9B,EAA4C,gBAA5C,EAA8DC,UAA9D,CAAX,EAAsF,GAAtF,CANN;sBAOS,IAAIzL,MAAJ,CAAWC,MAAM,QAAN,EAAgBC,YAAhB,EAA8BsL,YAA9B,EAA4C,gBAA5C,CAAX,EAA0E,GAA1E,CAPT;gBAQG,IAAIxL,MAAJ,CAAWC,MAAM,KAAN,EAAaC,YAAb,EAA2BsL,YAA3B,CAAX,EAAqD,GAArD,CARH;oBASO,IAAIxL,MAAJ,CAAWE,YAAX,EAAyB,GAAzB,CATP;qBAUQ,IAAIF,MAAJ,CAAWC,MAAM,QAAN,EAAgBC,YAAhB,EAA8BqL,UAA9B,CAAX,EAAsD,GAAtD,CAVR;qBAWQ,IAAIvL,MAAJ,CAAWM,YAAX,EAAyB,GAAzB,CAXR;qBAYQ,IAAIN,MAAJ,CAAW,OAAOsL,YAAP,GAAsB,IAAjC,CAZR;qBAaQ,IAAItL,MAAJ,CAAW,WAAWoL,YAAX,GAA0B,GAA1B,GAAgC5K,OAAOA,OAAO,iBAAiBC,QAAjB,GAA4B,MAAnC,IAA6C,GAA7C,GAAmD4K,OAAnD,GAA6D,GAApE,CAAhC,GAA2G,QAAtH,CAbR;KAAP;;AAiBD,mBAAeF,UAAU,KAAV,CAAf;;ADrFA,mBAAeA,UAAU,IAAV,CAAf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ADDA;;AACA,IAAMpC,SAAS,UAAf;;;AAGA,IAAMzG,OAAO,EAAb;AACA,IAAMsG,OAAO,CAAb;AACA,IAAMC,OAAO,EAAb;AACA,IAAMkB,OAAO,EAAb;AACA,IAAMG,OAAO,GAAb;AACA,IAAMf,cAAc,EAApB;AACA,IAAMC,WAAW,GAAjB;AACA,IAAMF,YAAY,GAAlB;;;AAGA,IAAMtB,gBAAgB,OAAtB;AACA,IAAMH,gBAAgB,YAAtB;AACA,IAAMoD,kBAAkB,2BAAxB;;;AAGA,IAAMG,SAAS;aACF,iDADE;cAED,gDAFC;kBAGG;CAHlB;;;AAOA,IAAMlB,gBAAgBxH,OAAOsG,IAA7B;AACA,IAAMN,QAAQ4C,KAAK5C,KAAnB;AACA,IAAMH,qBAAqBjJ,OAAO4H,YAAlC;;;;;;;;;;AAUA,SAAS7K,OAAT,CAAegP,IAAf,EAAqB;OACd,IAAIF,UAAJ,CAAeC,OAAOC,IAAP,CAAf,CAAN;;;;;;;;;;;AAWD,SAASnF,GAAT,CAAauE,KAAb,EAAoBO,EAApB,EAAwB;KACjBH,SAAS,EAAf;KACIrN,SAASiN,MAAMjN,MAAnB;QACOA,QAAP,EAAiB;SACTA,MAAP,IAAiBwN,GAAGP,MAAMjN,MAAN,CAAH,CAAjB;;QAEMqN,MAAP;;;;;;;;;;;;;AAaD,SAAS9C,SAAT,CAAmBD,MAAnB,EAA2BkD,EAA3B,EAA+B;KACxBE,QAAQpD,OAAOnI,KAAP,CAAa,GAAb,CAAd;KACIkL,SAAS,EAAb;KACIK,MAAM1N,MAAN,GAAe,CAAnB,EAAsB;;;WAGZ0N,MAAM,CAAN,IAAW,GAApB;WACSA,MAAM,CAAN,CAAT;;;UAGQpD,OAAOnK,OAAP,CAAesN,eAAf,EAAgC,MAAhC,CAAT;KACMF,SAASjD,OAAOnI,KAAP,CAAa,GAAb,CAAf;KACMmL,UAAU5E,IAAI6E,MAAJ,EAAYC,EAAZ,EAAgBzN,IAAhB,CAAqB,GAArB,CAAhB;QACOsN,SAASC,OAAhB;;;;;;;;;;;;;;;;AAgBD,SAASlD,UAAT,CAAoBE,MAApB,EAA4B;KACrBtE,SAAS,EAAf;KACIoH,UAAU,CAAd;KACMpN,SAASsK,OAAOtK,MAAtB;QACOoN,UAAUpN,MAAjB,EAAyB;MAClBkN,QAAQ5C,OAAON,UAAP,CAAkBoD,SAAlB,CAAd;MACIF,SAAS,MAAT,IAAmBA,SAAS,MAA5B,IAAsCE,UAAUpN,MAApD,EAA4D;;OAErDmN,QAAQ7C,OAAON,UAAP,CAAkBoD,SAAlB,CAAd;OACI,CAACD,QAAQ,MAAT,KAAoB,MAAxB,EAAgC;;WACxBlN,IAAP,CAAY,CAAC,CAACiN,QAAQ,KAAT,KAAmB,EAApB,KAA2BC,QAAQ,KAAnC,IAA4C,OAAxD;IADD,MAEO;;;WAGClN,IAAP,CAAYiN,KAAZ;;;GARF,MAWO;UACCjN,IAAP,CAAYiN,KAAZ;;;QAGKlH,MAAP;;;;;;;;;;;AAWD,IAAMmE,aAAa,SAAbA,UAAa;QAASrI,OAAOmK,aAAP,iCAAwBgB,KAAxB,EAAT;CAAnB;;;;;;;;;;;AAWA,IAAMV,eAAe,SAAfA,YAAe,CAASS,SAAT,EAAoB;KACpCA,YAAY,IAAZ,GAAmB,IAAvB,EAA6B;SACrBA,YAAY,IAAnB;;KAEGA,YAAY,IAAZ,GAAmB,IAAvB,EAA6B;SACrBA,YAAY,IAAnB;;KAEGA,YAAY,IAAZ,GAAmB,IAAvB,EAA6B;SACrBA,YAAY,IAAnB;;QAEM9H,IAAP;CAVD;;;;;;;;;;;;;AAwBA,IAAM8F,eAAe,SAAfA,YAAe,CAASsB,KAAT,EAAgBS,IAAhB,EAAsB;;;QAGnCT,QAAQ,EAAR,GAAa,MAAMA,QAAQ,EAAd,CAAb,IAAkC,CAACS,QAAQ,CAAT,KAAe,CAAjD,CAAP;CAHD;;;;;;;AAWA,IAAMnC,QAAQ,SAARA,KAAQ,CAASF,KAAT,EAAgBkC,SAAhB,EAA2BC,SAA3B,EAAsC;KAC/CvB,IAAI,CAAR;SACQuB,YAAY3B,MAAMR,QAAQoC,IAAd,CAAZ,GAAkCpC,SAAS,CAAnD;UACSQ,MAAMR,QAAQkC,SAAd,CAAT;+BAC8BlC,QAAQgC,gBAAgBjB,IAAhB,IAAwB,CAA9D,EAAiEH,KAAKpG,IAAtE,EAA4E;UACnEgG,MAAMR,QAAQgC,aAAd,CAAR;;QAEMxB,MAAMI,IAAI,CAACoB,gBAAgB,CAAjB,IAAsBhC,KAAtB,IAA+BA,QAAQiC,IAAvC,CAAV,CAAP;CAPD;;;;;;;;;AAiBA,IAAMzC,SAAS,SAATA,MAAS,CAAShE,KAAT,EAAgB;;KAExBF,SAAS,EAAf;KACM6F,cAAc3F,MAAMlG,MAA1B;KACIyJ,IAAI,CAAR;KACIgB,IAAIuB,QAAR;KACIT,OAAOQ,WAAX;;;;;;KAMIS,QAAQtG,MAAMrE,WAAN,CAAkBiK,SAAlB,CAAZ;KACIU,QAAQ,CAAZ,EAAe;UACN,CAAR;;;MAGI,IAAIC,IAAI,CAAb,EAAgBA,IAAID,KAApB,EAA2B,EAAEC,CAA7B,EAAgC;;MAE3BvG,MAAM8D,UAAN,CAAiByC,CAAjB,KAAuB,IAA3B,EAAiC;WAC1B,WAAN;;SAEMxM,IAAP,CAAYiG,MAAM8D,UAAN,CAAiByC,CAAjB,CAAZ;;;;;;MAMI,IAAIhF,QAAQ+E,QAAQ,CAAR,GAAYA,QAAQ,CAApB,GAAwB,CAAzC,EAA4C/E,QAAQoE,WAApD,4BAA4F;;;;;;;MAOvFO,OAAO3C,CAAX;OACK,IAAI4C,IAAI,CAAR,EAAWf,IAAIpG,IAApB,qBAA8CoG,KAAKpG,IAAnD,EAAyD;;OAEpDuC,SAASoE,WAAb,EAA0B;YACnB,eAAN;;;OAGKS,QAAQC,aAAarG,MAAM8D,UAAN,CAAiBvC,OAAjB,CAAb,CAAd;;OAEI6E,SAASpH,IAAT,IAAiBoH,QAAQpB,MAAM,CAACS,SAASlC,CAAV,IAAe4C,CAArB,CAA7B,EAAsD;YAC/C,UAAN;;;QAGIC,QAAQD,CAAb;OACMhB,IAAIC,KAAKC,IAAL,GAAYC,IAAZ,GAAoBF,KAAKC,OAAOE,IAAZ,GAAmBA,IAAnB,GAA0BH,IAAIC,IAA5D;;OAEIe,QAAQjB,CAAZ,EAAe;;;;OAITD,aAAalG,OAAOmG,CAA1B;OACIgB,IAAInB,MAAMS,SAASP,UAAf,CAAR,EAAoC;YAC7B,UAAN;;;QAGIA,UAAL;;;MAIKe,MAAMnG,OAAOhG,MAAP,GAAgB,CAA5B;SACO4K,MAAMnB,IAAI2C,IAAV,EAAgBD,GAAhB,EAAqBC,QAAQ,CAA7B,CAAP;;;;MAIIlB,MAAMzB,IAAI0C,GAAV,IAAiBR,SAASlB,CAA9B,EAAiC;WAC1B,UAAN;;;OAGIS,MAAMzB,IAAI0C,GAAV,CAAL;OACKA,GAAL;;;SAGOD,MAAP,CAAczC,GAAd,EAAmB,CAAnB,EAAsBgB,CAAtB;;;QAIM3I,OAAOmK,aAAP,eAAwBjG,MAAxB,CAAP;CAjFD;;;;;;;;;AA2FA,IAAMiE,SAAS,SAATA,MAAS,CAAS/D,KAAT,EAAgB;KACxBF,SAAS,EAAf;;;SAGQoE,WAAWlE,KAAX,CAAR;;;KAGI2F,cAAc3F,MAAMlG,MAAxB;;;KAGIyK,IAAIuB,QAAR;KACItB,QAAQ,CAAZ;KACIa,OAAOQ,WAAX;;;;;;;;uBAG2B7F,KAA3B,8HAAkC;OAAvBwF,cAAuB;;OAC7BA,iBAAe,IAAnB,EAAyB;WACjBzL,IAAP,CAAY8K,mBAAmBW,cAAnB,CAAZ;;;;;;;;;;;;;;;;;;KAIEZ,cAAc9E,OAAOhG,MAAzB;KACI2K,iBAAiBG,WAArB;;;;;;KAMIA,WAAJ,EAAiB;SACT7K,IAAP,CAAY6L,SAAZ;;;;QAIMnB,iBAAiBkB,WAAxB,EAAqC;;;;MAIhCD,IAAID,MAAR;;;;;;yBAC2BzF,KAA3B,mIAAkC;QAAvBwF,YAAuB;;QAC7BA,gBAAgBjB,CAAhB,IAAqBiB,eAAeE,CAAxC,EAA2C;SACtCF,YAAJ;;;;;;;;;;;;;;;;;;;;;MAMIb,wBAAwBF,iBAAiB,CAA/C;MACIiB,IAAInB,CAAJ,GAAQS,MAAM,CAACS,SAASjB,KAAV,IAAmBG,qBAAzB,CAAZ,EAA6D;WACtD,UAAN;;;WAGQ,CAACe,IAAInB,CAAL,IAAUI,qBAAnB;MACIe,CAAJ;;;;;;;yBAE2B1F,KAA3B,mIAAkC;QAAvBwF,aAAuB;;QAC7BA,gBAAejB,CAAf,IAAoB,EAAEC,KAAF,GAAUiB,MAAlC,EAA0C;aACnC,UAAN;;QAEGD,iBAAgBjB,CAApB,EAAuB;;SAElBQ,IAAIP,KAAR;UACK,IAAIY,IAAIpG,IAAb,qBAAuCoG,KAAKpG,IAA5C,EAAkD;UAC3CmG,IAAIC,KAAKC,IAAL,GAAYC,IAAZ,GAAoBF,KAAKC,OAAOE,IAAZ,GAAmBA,IAAnB,GAA0BH,IAAIC,IAA5D;UACIN,IAAII,CAAR,EAAW;;;UAGLF,UAAUF,IAAII,CAApB;UACMD,aAAalG,OAAOmG,CAA1B;aACOpL,IAAP,CACC8K,mBAAmBC,aAAaK,IAAIF,UAAUC,UAA3B,EAAuC,CAAvC,CAAnB,CADD;UAGIF,MAAMC,UAAUC,UAAhB,CAAJ;;;YAGMnL,IAAP,CAAY8K,mBAAmBC,aAAaC,CAAb,EAAgB,CAAhB,CAAnB,CAAZ;YACOL,MAAMF,KAAN,EAAaG,qBAAb,EAAoCF,kBAAkBG,WAAtD,CAAP;aACQ,CAAR;OACEH,cAAF;;;;;;;;;;;;;;;;;;IAIAD,KAAF;IACED,CAAF;;QAGMzE,OAAOjG,IAAP,CAAY,EAAZ,CAAP;CArFD;;;;;;;;;;;;;AAmGA,IAAMyB,YAAY,SAAZA,SAAY,CAAS0E,KAAT,EAAgB;QAC1BqE,UAAUrE,KAAV,EAAiB,UAASoE,MAAT,EAAiB;SACjCE,cAAczE,IAAd,CAAmBuE,MAAnB,IACJJ,OAAOI,OAAO5I,KAAP,CAAa,CAAb,EAAgB/C,WAAhB,EAAP,CADI,GAEJ2L,MAFH;EADM,CAAP;CADD;;;;;;;;;;;;;AAmBA,IAAMhJ,UAAU,SAAVA,OAAU,CAAS4E,KAAT,EAAgB;QACxBqE,UAAUrE,KAAV,EAAiB,UAASoE,MAAT,EAAiB;SACjCD,cAActE,IAAd,CAAmBuE,MAAnB,IACJ,SAASL,OAAOK,MAAP,CADL,GAEJA,MAFH;EADM,CAAP;CADD;;;;;AAWA,IAAMjJ,WAAW;;;;;;YAML,OANK;;;;;;;;SAcR;YACG+I,UADH;YAEGD;EAhBK;WAkBND,MAlBM;WAmBND,MAnBM;YAoBL3I,OApBK;cAqBHE;CArBd,CAwBA;;ADvbA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,AACA,AACA,AACA,AAiDA,AAAO,IAAMzD,UAA6C,EAAnD;AAEP,AAAA,SAAAyC,UAAA,CAA2BuJ,GAA3B,EAAA;QACOJ,IAAII,IAAIC,UAAJ,CAAe,CAAf,CAAV;QACI5I,UAAJ;QAEIuI,IAAI,EAAR,EAAYvI,IAAI,OAAOuI,EAAE5F,QAAF,CAAW,EAAX,EAAezD,WAAf,EAAX,CAAZ,KACK,IAAIqJ,IAAI,GAAR,EAAavI,IAAI,MAAMuI,EAAE5F,QAAF,CAAW,EAAX,EAAezD,WAAf,EAAV,CAAb,KACA,IAAIqJ,IAAI,IAAR,EAAcvI,IAAI,MAAM,CAAEuI,KAAK,CAAN,GAAW,GAAZ,EAAiB5F,QAAjB,CAA0B,EAA1B,EAA8BzD,WAA9B,EAAN,GAAoD,GAApD,GAA0D,CAAEqJ,IAAI,EAAL,GAAW,GAAZ,EAAiB5F,QAAjB,CAA0B,EAA1B,EAA8BzD,WAA9B,EAA9D,CAAd,KACAc,IAAI,MAAM,CAAEuI,KAAK,EAAN,GAAY,GAAb,EAAkB5F,QAAlB,CAA2B,EAA3B,EAA+BzD,WAA/B,EAAN,GAAqD,GAArD,GAA2D,CAAGqJ,KAAK,CAAN,GAAW,EAAZ,GAAkB,GAAnB,EAAwB5F,QAAxB,CAAiC,EAAjC,EAAqCzD,WAArC,EAA3D,GAAgH,GAAhH,GAAsH,CAAEqJ,IAAI,EAAL,GAAW,GAAZ,EAAiB5F,QAAjB,CAA0B,EAA1B,EAA8BzD,WAA9B,EAA1H;WAEEc,CAAP;;AAGD,AAAA,SAAAuB,WAAA,CAA4BD,GAA5B,EAAA;QACK6G,SAAS,EAAb;QACIE,IAAI,CAAR;QACMK,KAAKpH,IAAI1C,MAAf;WAEOyJ,IAAIK,EAAX,EAAe;YACRH,IAAI1C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAV;YAEIE,IAAI,GAAR,EAAa;sBACF7H,OAAO4H,YAAP,CAAoBC,CAApB,CAAV;iBACK,CAAL;SAFD,MAIK,IAAIA,KAAK,GAAL,IAAYA,IAAI,GAApB,EAAyB;gBACxBG,KAAKL,CAAN,IAAY,CAAhB,EAAmB;oBACZG,KAAK3C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAX;0BACU3H,OAAO4H,YAAP,CAAqB,CAACC,IAAI,EAAL,KAAY,CAAb,GAAmBC,KAAK,EAA5C,CAAV;aAFD,MAGO;0BACIlH,IAAI8G,MAAJ,CAAWC,CAAX,EAAc,CAAd,CAAV;;iBAEI,CAAL;SAPI,MASA,IAAIE,KAAK,GAAT,EAAc;gBACbG,KAAKL,CAAN,IAAY,CAAhB,EAAmB;oBACZG,KAAK3C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAX;oBACMI,KAAK5C,SAASvE,IAAI8G,MAAJ,CAAWC,IAAI,CAAf,EAAkB,CAAlB,CAAT,EAA+B,EAA/B,CAAX;0BACU3H,OAAO4H,YAAP,CAAqB,CAACC,IAAI,EAAL,KAAY,EAAb,GAAoB,CAACC,KAAK,EAAN,KAAa,CAAjC,GAAuCC,KAAK,EAAhE,CAAV;aAHD,MAIO;0BACInH,IAAI8G,MAAJ,CAAWC,CAAX,EAAc,CAAd,CAAV;;iBAEI,CAAL;SARI,MAUA;sBACM/G,IAAI8G,MAAJ,CAAWC,CAAX,EAAc,CAAd,CAAV;iBACK,CAAL;;;WAIKF,MAAP;;AAGD,SAAAD,2BAAA,CAAqC3J,UAArC,EAA+DkG,QAA/D,EAAA;aACAxF,gBAAC,CAA0BqC,GAA1B,EAAD;YACQF,SAASG,YAAYD,GAAZ,CAAf;eACQ,CAACF,OAAOzD,KAAP,CAAa8G,SAASpD,UAAtB,CAAD,GAAqCC,GAArC,GAA2CF,MAAnD;;QAGG7C,WAAW1B,MAAf,EAAuB0B,WAAW1B,MAAX,GAAoB6D,OAAOnC,WAAW1B,MAAlB,EAA0BkC,OAA1B,CAAkC0F,SAASzF,WAA3C,EAAwDC,gBAAxD,EAA0E1B,WAA1E,GAAwFwB,OAAxF,CAAgG0F,SAASwD,UAAzG,EAAqH,EAArH,CAApB;QACnB1J,WAAWwF,QAAX,KAAwBlG,SAA5B,EAAuCU,WAAWwF,QAAX,GAAsBrD,OAAOnC,WAAWwF,QAAlB,EAA4BhF,OAA5B,CAAoC0F,SAASzF,WAA7C,EAA0DC,gBAA1D,EAA4EF,OAA5E,CAAoF0F,SAASuD,YAA7F,EAA2G5I,UAA3G,EAAuHL,OAAvH,CAA+H0F,SAASzF,WAAxI,EAAqJE,WAArJ,CAAtB;QACnCX,WAAWmE,IAAX,KAAoB7E,SAAxB,EAAmCU,WAAWmE,IAAX,GAAkBhC,OAAOnC,WAAWmE,IAAlB,EAAwB3D,OAAxB,CAAgC0F,SAASzF,WAAzC,EAAsDC,gBAAtD,EAAwE1B,WAAxE,GAAsFwB,OAAtF,CAA8F0F,SAASsD,QAAvG,EAAiH3I,UAAjH,EAA6HL,OAA7H,CAAqI0F,SAASzF,WAA9I,EAA2JE,WAA3J,CAAlB;QAC/BX,WAAWP,IAAX,KAAoBH,SAAxB,EAAmCU,WAAWP,IAAX,GAAkB0C,OAAOnC,WAAWP,IAAlB,EAAwBe,OAAxB,CAAgC0F,SAASzF,WAAzC,EAAsDC,gBAAtD,EAAwEF,OAAxE,CAAiFR,WAAW1B,MAAX,GAAoB4H,SAASoD,QAA7B,GAAwCpD,SAASqD,iBAAlI,EAAsJ1I,UAAtJ,EAAkKL,OAAlK,CAA0K0F,SAASzF,WAAnL,EAAgME,WAAhM,CAAlB;QAC/BX,WAAWE,KAAX,KAAqBZ,SAAzB,EAAoCU,WAAWE,KAAX,GAAmBiC,OAAOnC,WAAWE,KAAlB,EAAyBM,OAAzB,CAAiC0F,SAASzF,WAA1C,EAAuDC,gBAAvD,EAAyEF,OAAzE,CAAiF0F,SAASmD,SAA1F,EAAqGxI,UAArG,EAAiHL,OAAjH,CAAyH0F,SAASzF,WAAlI,EAA+IE,WAA/I,CAAnB;QAChCX,WAAW8D,QAAX,KAAwBxE,SAA5B,EAAuCU,WAAW8D,QAAX,GAAsB3B,OAAOnC,WAAW8D,QAAlB,EAA4BtD,OAA5B,CAAoC0F,SAASzF,WAA7C,EAA0DC,gBAA1D,EAA4EF,OAA5E,CAAoF0F,SAASkD,YAA7F,EAA2GvI,UAA3G,EAAuHL,OAAvH,CAA+H0F,SAASzF,WAAxI,EAAqJE,WAArJ,CAAtB;WAEhCX,UAAP;;AACA;AAED,SAAAgJ,kBAAA,CAA4BjG,GAA5B,EAAA;WACQA,IAAIvC,OAAJ,CAAY,SAAZ,EAAuB,IAAvB,KAAgC,GAAvC;;AAGD,SAAAyG,cAAA,CAAwB9C,IAAxB,EAAqC+B,QAArC,EAAA;QACOnG,UAAUoE,KAAK/E,KAAL,CAAW8G,SAAS2C,WAApB,KAAoC,EAApD;;iCACoB9I,OAFrB;QAEUmJ,OAFV;;QAIKA,OAAJ,EAAa;eACLA,QAAQ1G,KAAR,CAAc,GAAd,EAAmBuG,GAAnB,CAAuBC,kBAAvB,EAA2C5I,IAA3C,CAAgD,GAAhD,CAAP;KADD,MAEO;eACC+D,IAAP;;;AAIF,SAAA6C,cAAA,CAAwB7C,IAAxB,EAAqC+B,QAArC,EAAA;QACOnG,UAAUoE,KAAK/E,KAAL,CAAW8G,SAASC,WAApB,KAAoC,EAApD;;kCAC0BpG,OAF3B;QAEUmJ,OAFV;QAEmBxB,IAFnB;;QAIKwB,OAAJ,EAAa;oCACUA,QAAQlK,WAAR,GAAsBwD,KAAtB,CAA4B,IAA5B,EAAkC2G,OAAlC,EADV;;YACLL,IADK;YACCG,KADD;;YAENR,cAAcQ,QAAQA,MAAMzG,KAAN,CAAY,GAAZ,EAAiBuG,GAAjB,CAAqBC,kBAArB,CAAR,GAAmD,EAAvE;YACMN,aAAaI,KAAKtG,KAAL,CAAW,GAAX,EAAgBuG,GAAhB,CAAoBC,kBAApB,CAAnB;YACMR,yBAAyBtC,SAAS2C,WAAT,CAAqBzC,IAArB,CAA0BsC,WAAWA,WAAWrI,MAAX,GAAoB,CAA/B,CAA1B,CAA/B;YACMkI,aAAaC,yBAAyB,CAAzB,GAA6B,CAAhD;YACMG,kBAAkBD,WAAWrI,MAAX,GAAoBkI,UAA5C;YACMpI,SAASyI,MAAcL,UAAd,CAAf;aAEK,IAAIlH,IAAI,CAAb,EAAgBA,IAAIkH,UAApB,EAAgC,EAAElH,CAAlC,EAAqC;mBAC7BA,CAAP,IAAYoH,YAAYpH,CAAZ,KAAkBqH,WAAWC,kBAAkBtH,CAA7B,CAAlB,IAAqD,EAAjE;;YAGGmH,sBAAJ,EAA4B;mBACpBD,aAAa,CAApB,IAAyBtB,eAAe9G,OAAOoI,aAAa,CAApB,CAAf,EAAuCrC,QAAvC,CAAzB;;YAGK+B,gBAAgB9H,OAAOmI,MAAP,CAAmD,UAACH,GAAD,EAAME,KAAN,EAAaP,KAAb,EAA3E;gBACO,CAACO,KAAD,IAAUA,UAAU,GAAxB,EAA6B;oBACtBD,cAAcD,IAAIA,IAAI9H,MAAJ,GAAa,CAAjB,CAApB;oBACI+H,eAAeA,YAAYN,KAAZ,GAAoBM,YAAY/H,MAAhC,KAA2CyH,KAA9D,EAAqE;gCACxDzH,MAAZ;iBADD,MAEO;wBACFC,IAAJ,CAAS,EAAEwH,YAAF,EAASzH,QAAS,CAAlB,EAAT;;;mBAGK8H,GAAP;SATqB,EAUnB,EAVmB,CAAtB;YAYMN,oBAAoBI,cAAcC,IAAd,CAAmB,UAACF,CAAD,EAAID,CAAJ;mBAAUA,EAAE1H,MAAF,GAAW2H,EAAE3H,MAAvB;SAAnB,EAAkD,CAAlD,CAA1B;YAEIoH,gBAAJ;YACII,qBAAqBA,kBAAkBxH,MAAlB,GAA2B,CAApD,EAAuD;gBAChDsH,WAAWxH,OAAO4B,KAAP,CAAa,CAAb,EAAgB8F,kBAAkBC,KAAlC,CAAjB;gBACMF,UAAUzH,OAAO4B,KAAP,CAAa8F,kBAAkBC,KAAlB,GAA0BD,kBAAkBxH,MAAzD,CAAhB;sBACUsH,SAASvH,IAAT,CAAc,GAAd,IAAqB,IAArB,GAA4BwH,QAAQxH,IAAR,CAAa,GAAb,CAAtC;SAHD,MAIO;sBACID,OAAOC,IAAP,CAAY,GAAZ,CAAV;;YAGGsH,IAAJ,EAAU;uBACE,MAAMA,IAAjB;;eAGMD,OAAP;KA5CD,MA6CO;eACCtD,IAAP;;;AAIF,IAAMqD,YAAY,iIAAlB;AACA,IAAMD,wBAA4C,EAAD,CAAKnI,KAAL,CAAW,OAAX,EAAqB,CAArB,MAA4BE,SAA7E;AAEA,AAAA,SAAAQ,KAAA,CAAsBqH,SAAtB,EAAA;QAAwClI,OAAxC,uEAA6D,EAA7D;;QACOe,aAA2B,EAAjC;QACMkG,WAAYjH,QAAQuC,GAAR,KAAgB,KAAhB,GAAwB8C,YAAxB,GAAuCD,YAAzD;QAEIpF,QAAQ+G,SAAR,KAAsB,QAA1B,EAAoCmB,YAAY,CAAClI,QAAQX,MAAR,GAAiBW,QAAQX,MAAR,GAAiB,GAAlC,GAAwC,EAAzC,IAA+C,IAA/C,GAAsD6I,SAAlE;QAE9BpH,UAAUoH,UAAU/H,KAAV,CAAgBoI,SAAhB,CAAhB;QAEIzH,OAAJ,EAAa;YACRwH,qBAAJ,EAA2B;;uBAEfjJ,MAAX,GAAoByB,QAAQ,CAAR,CAApB;uBACWyF,QAAX,GAAsBzF,QAAQ,CAAR,CAAtB;uBACWoE,IAAX,GAAkBpE,QAAQ,CAAR,CAAlB;uBACWkE,IAAX,GAAkBqD,SAASvH,QAAQ,CAAR,CAAT,EAAqB,EAArB,CAAlB;uBACWN,IAAX,GAAkBM,QAAQ,CAAR,KAAc,EAAhC;uBACWG,KAAX,GAAmBH,QAAQ,CAAR,CAAnB;uBACW+D,QAAX,GAAsB/D,QAAQ,CAAR,CAAtB;;gBAGIqH,MAAMpH,WAAWiE,IAAjB,CAAJ,EAA4B;2BAChBA,IAAX,GAAkBlE,QAAQ,CAAR,CAAlB;;SAZF,MAcO;;;uBAEKzB,MAAX,GAAoByB,QAAQ,CAAR,KAAcT,SAAlC;uBACWkG,QAAX,GAAuB2B,UAAUE,OAAV,CAAkB,GAAlB,MAA2B,CAAC,CAA5B,GAAgCtH,QAAQ,CAAR,CAAhC,GAA6CT,SAApE;uBACW6E,IAAX,GAAmBgD,UAAUE,OAAV,CAAkB,IAAlB,MAA4B,CAAC,CAA7B,GAAiCtH,QAAQ,CAAR,CAAjC,GAA8CT,SAAjE;uBACW2E,IAAX,GAAkBqD,SAASvH,QAAQ,CAAR,CAAT,EAAqB,EAArB,CAAlB;uBACWN,IAAX,GAAkBM,QAAQ,CAAR,KAAc,EAAhC;uBACWG,KAAX,GAAoBiH,UAAUE,OAAV,CAAkB,GAAlB,MAA2B,CAAC,CAA5B,GAAgCtH,QAAQ,CAAR,CAAhC,GAA6CT,SAAjE;uBACWwE,QAAX,GAAuBqD,UAAUE,OAAV,CAAkB,GAAlB,MAA2B,CAAC,CAA5B,GAAgCtH,QAAQ,CAAR,CAAhC,GAA6CT,SAApE;;gBAGI8H,MAAMpH,WAAWiE,IAAjB,CAAJ,EAA4B;2BAChBA,IAAX,GAAmBkD,UAAU/H,KAAV,CAAgB,+BAAhB,IAAmDW,QAAQ,CAAR,CAAnD,GAAgET,SAAnF;;;YAIEU,WAAWmE,IAAf,EAAqB;;uBAETA,IAAX,GAAkB6C,eAAeC,eAAejH,WAAWmE,IAA1B,EAAgC+B,QAAhC,CAAf,EAA0DA,QAA1D,CAAlB;;;YAIGlG,WAAW1B,MAAX,KAAsBgB,SAAtB,IAAmCU,WAAWwF,QAAX,KAAwBlG,SAA3D,IAAwEU,WAAWmE,IAAX,KAAoB7E,SAA5F,IAAyGU,WAAWiE,IAAX,KAAoB3E,SAA7H,IAA0I,CAACU,WAAWP,IAAtJ,IAA8JO,WAAWE,KAAX,KAAqBZ,SAAvL,EAAkM;uBACtL0G,SAAX,GAAuB,eAAvB;SADD,MAEO,IAAIhG,WAAW1B,MAAX,KAAsBgB,SAA1B,EAAqC;uBAChC0G,SAAX,GAAuB,UAAvB;SADM,MAEA,IAAIhG,WAAW8D,QAAX,KAAwBxE,SAA5B,EAAuC;uBAClC0G,SAAX,GAAuB,UAAvB;SADM,MAEA;uBACKA,SAAX,GAAuB,KAAvB;;;YAIG/G,QAAQ+G,SAAR,IAAqB/G,QAAQ+G,SAAR,KAAsB,QAA3C,IAAuD/G,QAAQ+G,SAAR,KAAsBhG,WAAWgG,SAA5F,EAAuG;uBAC3F9G,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,kBAAkBD,QAAQ+G,SAA1B,GAAsC,aAA7E;;;YAIKrG,gBAAgBvB,QAAQ,CAACa,QAAQX,MAAR,IAAkB0B,WAAW1B,MAA7B,IAAuC,EAAxC,EAA4CU,WAA5C,EAAR,CAAtB;;YAGI,CAACC,QAAQsD,cAAT,KAA4B,CAAC5C,aAAD,IAAkB,CAACA,cAAc4C,cAA7D,CAAJ,EAAkF;;gBAE7EvC,WAAWmE,IAAX,KAAoBlF,QAAQ2E,UAAR,IAAuBjE,iBAAiBA,cAAciE,UAA1E,CAAJ,EAA4F;;oBAEvF;+BACQO,IAAX,GAAkBzC,SAASC,OAAT,CAAiB3B,WAAWmE,IAAX,CAAgB3D,OAAhB,CAAwB0F,SAASzF,WAAjC,EAA8CuC,WAA9C,EAA2DhE,WAA3D,EAAjB,CAAlB;iBADD,CAEE,OAAOyC,CAAP,EAAU;+BACAvC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,oEAAoEuC,CAA3G;;;;wCAI0BzB,UAA5B,EAAwCqE,YAAxC;SAXD,MAYO;;wCAEsBrE,UAA5B,EAAwCkG,QAAxC;;;YAIGvG,iBAAiBA,cAAcG,KAAnC,EAA0C;0BAC3BA,KAAd,CAAoBE,UAApB,EAAgCf,OAAhC;;KA3EF,MA6EO;mBACKC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,wBAAvC;;WAGMc,UAAP;;AACA;AAED,SAAAiG,mBAAA,CAA6BjG,UAA7B,EAAuDf,OAAvD,EAAA;QACOiH,WAAYjH,QAAQuC,GAAR,KAAgB,KAAhB,GAAwB8C,YAAxB,GAAuCD,YAAzD;QACMuB,YAA0B,EAAhC;QAEI5F,WAAWwF,QAAX,KAAwBlG,SAA5B,EAAuC;kBAC5BgB,IAAV,CAAeN,WAAWwF,QAA1B;kBACUlF,IAAV,CAAe,GAAf;;QAGGN,WAAWmE,IAAX,KAAoB7E,SAAxB,EAAmC;;kBAExBgB,IAAV,CAAe0G,eAAeC,eAAe9E,OAAOnC,WAAWmE,IAAlB,CAAf,EAAwC+B,QAAxC,CAAf,EAAkEA,QAAlE,EAA4E1F,OAA5E,CAAoF0F,SAASC,WAA7F,EAA0G,UAACe,CAAD,EAAIJ,EAAJ,EAAQC,EAAR;mBAAe,MAAMD,EAAN,IAAYC,KAAK,QAAQA,EAAb,GAAkB,EAA9B,IAAoC,GAAnD;SAA1G,CAAf;;QAGG,OAAO/G,WAAWiE,IAAlB,KAA2B,QAA3B,IAAuC,OAAOjE,WAAWiE,IAAlB,KAA2B,QAAtE,EAAgF;kBACrE3D,IAAV,CAAe,GAAf;kBACUA,IAAV,CAAe6B,OAAOnC,WAAWiE,IAAlB,CAAf;;WAGM2B,UAAUvF,MAAV,GAAmBuF,UAAUxF,IAAV,CAAe,EAAf,CAAnB,GAAwCd,SAA/C;;AACA;AAED,IAAMuH,OAAO,UAAb;AACA,IAAMD,OAAO,aAAb;AACA,IAAMD,OAAO,eAAb;AACA,AACA,IAAMF,OAAO,wBAAb;AAEA,AAAA,SAAAhB,iBAAA,CAAkCc,KAAlC,EAAA;QACOF,SAAuB,EAA7B;WAEOE,MAAMlG,MAAb,EAAqB;YAChBkG,MAAMnH,KAAN,CAAYyH,IAAZ,CAAJ,EAAuB;oBACdN,MAAM/F,OAAN,CAAcqG,IAAd,EAAoB,EAApB,CAAR;SADD,MAEO,IAAIN,MAAMnH,KAAN,CAAYwH,IAAZ,CAAJ,EAAuB;oBACrBL,MAAM/F,OAAN,CAAcoG,IAAd,EAAoB,GAApB,CAAR;SADM,MAEA,IAAIL,MAAMnH,KAAN,CAAYuH,IAAZ,CAAJ,EAAuB;oBACrBJ,MAAM/F,OAAN,CAAcmG,IAAd,EAAoB,GAApB,CAAR;mBACOD,GAAP;SAFM,MAGA,IAAIH,UAAU,GAAV,IAAiBA,UAAU,IAA/B,EAAqC;oBACnC,EAAR;SADM,MAEA;gBACAC,KAAKD,MAAMnH,KAAN,CAAYqH,IAAZ,CAAX;gBACID,EAAJ,EAAQ;oBACDX,IAAIW,GAAG,CAAH,CAAV;wBACQD,MAAMxE,KAAN,CAAY8D,EAAExF,MAAd,CAAR;uBACOC,IAAP,CAAYuF,CAAZ;aAHD,MAIO;sBACA,IAAIS,KAAJ,CAAU,kCAAV,CAAN;;;;WAKID,OAAOjG,IAAP,CAAY,EAAZ,CAAP;;AACA;AAED,AAAA,SAAAR,SAAA,CAA0BI,UAA1B,EAAA;QAAoDf,OAApD,uEAAyE,EAAzE;;QACOiH,WAAYjH,QAAQuC,GAAR,GAAc8C,YAAd,GAA6BD,YAA/C;QACMuB,YAA0B,EAAhC;;QAGMjG,gBAAgBvB,QAAQ,CAACa,QAAQX,MAAR,IAAkB0B,WAAW1B,MAA7B,IAAuC,EAAxC,EAA4CU,WAA5C,EAAR,CAAtB;;QAGIW,iBAAiBA,cAAcC,SAAnC,EAA8CD,cAAcC,SAAd,CAAwBI,UAAxB,EAAoCf,OAApC;QAE1Ce,WAAWmE,IAAf,EAAqB;;YAEhB+B,SAASC,WAAT,CAAqBC,IAArB,CAA0BpG,WAAWmE,IAArC,CAAJ,EAAgD;;;;aAK3C,IAAIlF,QAAQ2E,UAAR,IAAuBjE,iBAAiBA,cAAciE,UAA1D,EAAuE;;oBAEvE;+BACQO,IAAX,GAAmB,CAAClF,QAAQuC,GAAT,GAAeE,SAASC,OAAT,CAAiB3B,WAAWmE,IAAX,CAAgB3D,OAAhB,CAAwB0F,SAASzF,WAAjC,EAA8CuC,WAA9C,EAA2DhE,WAA3D,EAAjB,CAAf,GAA4G0C,SAASG,SAAT,CAAmB7B,WAAWmE,IAA9B,CAA/H;iBADD,CAEE,OAAO1C,CAAP,EAAU;+BACAvC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,iDAAiD,CAACD,QAAQuC,GAAT,GAAe,OAAf,GAAyB,SAA1E,IAAuF,iBAAvF,GAA2GC,CAAlJ;;;;;gCAMyBzB,UAA5B,EAAwCkG,QAAxC;QAEIjH,QAAQ+G,SAAR,KAAsB,QAAtB,IAAkChG,WAAW1B,MAAjD,EAAyD;kBAC9CgC,IAAV,CAAeN,WAAW1B,MAA1B;kBACUgC,IAAV,CAAe,GAAf;;QAGKwF,YAAYG,oBAAoBjG,UAApB,EAAgCf,OAAhC,CAAlB;QACI6G,cAAcxG,SAAlB,EAA6B;YACxBL,QAAQ+G,SAAR,KAAsB,QAA1B,EAAoC;sBACzB1F,IAAV,CAAe,IAAf;;kBAGSA,IAAV,CAAewF,SAAf;YAEI9F,WAAWP,IAAX,IAAmBO,WAAWP,IAAX,CAAgBiG,MAAhB,CAAuB,CAAvB,MAA8B,GAArD,EAA0D;sBAC/CpF,IAAV,CAAe,GAAf;;;QAIEN,WAAWP,IAAX,KAAoBH,SAAxB,EAAmC;YAC9BuG,IAAI7F,WAAWP,IAAnB;YAEI,CAACR,QAAQ8G,YAAT,KAA0B,CAACpG,aAAD,IAAkB,CAACA,cAAcoG,YAA3D,CAAJ,EAA8E;gBACzEN,kBAAkBI,CAAlB,CAAJ;;YAGGC,cAAcxG,SAAlB,EAA6B;gBACxBuG,EAAErF,OAAF,CAAU,OAAV,EAAmB,MAAnB,CAAJ,CAD4B;;kBAInBF,IAAV,CAAeuF,CAAf;;QAGG7F,WAAWE,KAAX,KAAqBZ,SAAzB,EAAoC;kBACzBgB,IAAV,CAAe,GAAf;kBACUA,IAAV,CAAeN,WAAWE,KAA1B;;QAGGF,WAAW8D,QAAX,KAAwBxE,SAA5B,EAAuC;kBAC5BgB,IAAV,CAAe,GAAf;kBACUA,IAAV,CAAeN,WAAW8D,QAA1B;;WAGM8B,UAAUxF,IAAV,CAAe,EAAf,CAAP,CAxED;;AAyEC;AAED,AAAA,SAAA2E,iBAAA,CAAkCQ,IAAlC,EAAsDD,QAAtD,EAAA;QAA8ErG,OAA9E,uEAAmG,EAAnG;QAAuG0G,iBAAvG;;QACON,SAAuB,EAA7B;QAEI,CAACM,iBAAL,EAAwB;eAChB7F,MAAMF,UAAU2F,IAAV,EAAgBtG,OAAhB,CAAN,EAAgCA,OAAhC,CAAP,CADuB;mBAEZa,MAAMF,UAAU0F,QAAV,EAAoBrG,OAApB,CAAN,EAAoCA,OAApC,CAAX,CAFuB;;cAIdA,WAAW,EAArB;QAEI,CAACA,QAAQE,QAAT,IAAqBmG,SAAShH,MAAlC,EAA0C;eAClCA,MAAP,GAAgBgH,SAAShH,MAAzB;;eAEOkH,QAAP,GAAkBF,SAASE,QAA3B;eACOrB,IAAP,GAAcmB,SAASnB,IAAvB;eACOF,IAAP,GAAcqB,SAASrB,IAAvB;eACOxE,IAAP,GAAcgG,kBAAkBH,SAAS7F,IAAT,IAAiB,EAAnC,CAAd;eACOS,KAAP,GAAeoF,SAASpF,KAAxB;KAPD,MAQO;YACFoF,SAASE,QAAT,KAAsBlG,SAAtB,IAAmCgG,SAASnB,IAAT,KAAkB7E,SAArD,IAAkEgG,SAASrB,IAAT,KAAkB3E,SAAxF,EAAmG;;mBAE3FkG,QAAP,GAAkBF,SAASE,QAA3B;mBACOrB,IAAP,GAAcmB,SAASnB,IAAvB;mBACOF,IAAP,GAAcqB,SAASrB,IAAvB;mBACOxE,IAAP,GAAcgG,kBAAkBH,SAAS7F,IAAT,IAAiB,EAAnC,CAAd;mBACOS,KAAP,GAAeoF,SAASpF,KAAxB;SAND,MAOO;gBACF,CAACoF,SAAS7F,IAAd,EAAoB;uBACZA,IAAP,GAAc8F,KAAK9F,IAAnB;oBACI6F,SAASpF,KAAT,KAAmBZ,SAAvB,EAAkC;2BAC1BY,KAAP,GAAeoF,SAASpF,KAAxB;iBADD,MAEO;2BACCA,KAAP,GAAeqF,KAAKrF,KAApB;;aALF,MAOO;oBACFoF,SAAS7F,IAAT,CAAciG,MAAd,CAAqB,CAArB,MAA4B,GAAhC,EAAqC;2BAC7BjG,IAAP,GAAcgG,kBAAkBH,SAAS7F,IAA3B,CAAd;iBADD,MAEO;wBACF,CAAC8F,KAAKC,QAAL,KAAkBlG,SAAlB,IAA+BiG,KAAKpB,IAAL,KAAc7E,SAA7C,IAA0DiG,KAAKtB,IAAL,KAAc3E,SAAzE,KAAuF,CAACiG,KAAK9F,IAAjG,EAAuG;+BAC/FA,IAAP,GAAc,MAAM6F,SAAS7F,IAA7B;qBADD,MAEO,IAAI,CAAC8F,KAAK9F,IAAV,EAAgB;+BACfA,IAAP,GAAc6F,SAAS7F,IAAvB;qBADM,MAEA;+BACCA,IAAP,GAAc8F,KAAK9F,IAAL,CAAUsC,KAAV,CAAgB,CAAhB,EAAmBwD,KAAK9F,IAAL,CAAUyC,WAAV,CAAsB,GAAtB,IAA6B,CAAhD,IAAqDoD,SAAS7F,IAA5E;;2BAEMA,IAAP,GAAcgG,kBAAkBJ,OAAO5F,IAAzB,CAAd;;uBAEMS,KAAP,GAAeoF,SAASpF,KAAxB;;;mBAGMsF,QAAP,GAAkBD,KAAKC,QAAvB;mBACOrB,IAAP,GAAcoB,KAAKpB,IAAnB;mBACOF,IAAP,GAAcsB,KAAKtB,IAAnB;;eAEM3F,MAAP,GAAgBiH,KAAKjH,MAArB;;WAGMwF,QAAP,GAAkBwB,SAASxB,QAA3B;WAEOuB,MAAP;;AACA;AAED,AAAA,SAAAD,OAAA,CAAwBJ,OAAxB,EAAwCE,WAAxC,EAA4DjG,OAA5D,EAAA;QACOgG,oBAAoBE,OAAO,EAAE7G,QAAS,MAAX,EAAP,EAA4BW,OAA5B,CAA1B;WACOW,UAAUmF,kBAAkBjF,MAAMkF,OAAN,EAAeC,iBAAf,CAAlB,EAAqDnF,MAAMoF,WAAN,EAAmBD,iBAAnB,CAArD,EAA4FA,iBAA5F,EAA+G,IAA/G,CAAV,EAAgIA,iBAAhI,CAAP;;AACA;AAID,AAAA,SAAAH,SAAA,CAA0BD,GAA1B,EAAmC5F,OAAnC,EAAA;QACK,OAAO4F,GAAP,KAAe,QAAnB,EAA6B;cACtBjF,UAAUE,MAAM+E,GAAN,EAAW5F,OAAX,CAAV,EAA+BA,OAA/B,CAAN;KADD,MAEO,IAAI0F,OAAOE,GAAP,MAAgB,QAApB,EAA8B;cAC9B/E,MAAMF,UAAyBiF,GAAzB,EAA8B5F,OAA9B,CAAN,EAA8CA,OAA9C,CAAN;;WAGM4F,GAAP;;AACA;AAID,AAAA,SAAAD,KAAA,CAAsBH,IAAtB,EAAgCC,IAAhC,EAA0CzF,OAA1C,EAAA;QACK,OAAOwF,IAAP,KAAgB,QAApB,EAA8B;eACtB7E,UAAUE,MAAM2E,IAAN,EAAYxF,OAAZ,CAAV,EAAgCA,OAAhC,CAAP;KADD,MAEO,IAAI0F,OAAOF,IAAP,MAAiB,QAArB,EAA+B;eAC9B7E,UAAyB6E,IAAzB,EAA+BxF,OAA/B,CAAP;;QAGG,OAAOyF,IAAP,KAAgB,QAApB,EAA8B;eACtB9E,UAAUE,MAAM4E,IAAN,EAAYzF,OAAZ,CAAV,EAAgCA,OAAhC,CAAP;KADD,MAEO,IAAI0F,OAAOD,IAAP,MAAiB,QAArB,EAA+B;eAC9B9E,UAAyB8E,IAAzB,EAA+BzF,OAA/B,CAAP;;WAGMwF,SAASC,IAAhB;;AACA;AAED,AAAA,SAAAF,eAAA,CAAgCzB,GAAhC,EAA4C9D,OAA5C,EAAA;WACQ8D,OAAOA,IAAIqB,QAAJ,GAAe5D,OAAf,CAAwB,CAACvB,OAAD,IAAY,CAACA,QAAQuC,GAArB,GAA2B6C,aAAaE,MAAxC,GAAiDD,aAAaC,MAAtF,EAA+F1D,UAA/F,CAAd;;AACA;AAED,AAAA,SAAAe,iBAAA,CAAkCmB,GAAlC,EAA8C9D,OAA9C,EAAA;WACQ8D,OAAOA,IAAIqB,QAAJ,GAAe5D,OAAf,CAAwB,CAACvB,OAAD,IAAY,CAACA,QAAQuC,GAArB,GAA2B6C,aAAa5D,WAAxC,GAAsD6D,aAAa7D,WAA3F,EAAyGuC,WAAzG,CAAd;CACA;;ADziBD,IAAMzD,UAA2B;YACvB,MADuB;gBAGnB,IAHmB;WAKxB,eAAUS,UAAV,EAAoCf,OAApC,EAAT;;YAEM,CAACe,WAAWmE,IAAhB,EAAsB;uBACVjF,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,6BAAvC;;eAGMc,UAAP;KAX+B;eAcpB,mBAAUA,UAAV,EAAoCf,OAApC,EAAb;YACQ+E,SAAS7B,OAAOnC,WAAW1B,MAAlB,EAA0BU,WAA1B,OAA4C,OAA3D;;YAGIgB,WAAWiE,IAAX,MAAqBD,SAAS,GAAT,GAAe,EAApC,KAA2ChE,WAAWiE,IAAX,KAAoB,EAAnE,EAAuE;uBAC3DA,IAAX,GAAkB3E,SAAlB;;;YAIG,CAACU,WAAWP,IAAhB,EAAsB;uBACVA,IAAX,GAAkB,GAAlB;;;;;eAOMO,UAAP;;CA/BF,CAmCA;;ADlCA,IAAMT,YAA2B;YACvB,OADuB;gBAEnBX,QAAKgF,UAFc;WAGxBhF,QAAKkB,KAHmB;eAIpBlB,QAAKgB;CAJlB,CAOA;;ADHA,SAAAsE,QAAA,CAAkBL,YAAlB,EAAA;WACQ,OAAOA,aAAaG,MAApB,KAA+B,SAA/B,GAA2CH,aAAaG,MAAxD,GAAiE7B,OAAO0B,aAAavF,MAApB,EAA4BU,WAA5B,OAA8C,KAAtH;;;AAID,IAAMO,YAA2B;YACvB,IADuB;gBAGnB,IAHmB;WAKxB,eAAUS,UAAV,EAAoCf,OAApC,EAAT;YACQ4E,eAAe7D,UAArB;;qBAGagE,MAAb,GAAsBE,SAASL,YAAT,CAAtB;;qBAGaE,YAAb,GAA4B,CAACF,aAAapE,IAAb,IAAqB,GAAtB,KAA8BoE,aAAa3D,KAAb,GAAqB,MAAM2D,aAAa3D,KAAxC,GAAgD,EAA9E,CAA5B;qBACaT,IAAb,GAAoBH,SAApB;qBACaY,KAAb,GAAqBZ,SAArB;eAEOuE,YAAP;KAhB+B;eAmBpB,mBAAUA,YAAV,EAAqC5E,OAArC,EAAb;;YAEM4E,aAAaI,IAAb,MAAuBC,SAASL,YAAT,IAAyB,GAAzB,GAA+B,EAAtD,KAA6DA,aAAaI,IAAb,KAAsB,EAAvF,EAA2F;yBAC7EA,IAAb,GAAoB3E,SAApB;;;YAIG,OAAOuE,aAAaG,MAApB,KAA+B,SAAnC,EAA8C;yBAChC1F,MAAb,GAAuBuF,aAAaG,MAAb,GAAsB,KAAtB,GAA8B,IAArD;yBACaA,MAAb,GAAsB1E,SAAtB;;;YAIGuE,aAAaE,YAAjB,EAA+B;wCACRF,aAAaE,YAAb,CAA0BvB,KAA1B,CAAgC,GAAhC,CADQ;;gBACvB/C,IADuB;gBACjBS,KADiB;;yBAEjBT,IAAb,GAAqBA,QAAQA,SAAS,GAAjB,GAAuBA,IAAvB,GAA8BH,SAAnD;yBACaY,KAAb,GAAqBA,KAArB;yBACa6D,YAAb,GAA4BzE,SAA5B;;;qBAIYwE,QAAb,GAAwBxE,SAAxB;eAEOuE,YAAP;;CA1CF,CA8CA;;ADvDA,IAAMtE,YAA2B;YACvB,KADuB;gBAEnBb,UAAGkF,UAFgB;WAGxBlF,UAAGoB,KAHqB;eAIpBpB,UAAGkB;CAJhB,CAOA;;ADMA,IAAMoB,IAAkB,EAAxB;AACA,IAAM2C,QAAQ,IAAd;;AAGA,IAAMR,eAAe,4BAA4BQ,QAAQ,2EAAR,GAAsF,EAAlH,IAAwH,GAA7I;AACA,IAAMD,WAAW,aAAjB;AACA,IAAMH,eAAeE,OAAOA,OAAO,YAAYC,QAAZ,GAAuB,GAAvB,GAA6BA,QAA7B,GAAwCA,QAAxC,GAAmD,GAAnD,GAAyDA,QAAzD,GAAoEA,QAA3E,IAAuF,GAAvF,GAA6FD,OAAO,gBAAgBC,QAAhB,GAA2B,GAA3B,GAAiCA,QAAjC,GAA4CA,QAAnD,CAA7F,GAA4J,GAA5J,GAAkKD,OAAO,MAAMC,QAAN,GAAiBA,QAAxB,CAAzK,CAArB;;;;;;;;;;;;AAaA,IAAML,UAAU,uDAAhB;AACA,IAAMG,UAAU,4DAAhB;AACA,IAAMF,UAAUJ,MAAMM,OAAN,EAAe,YAAf,CAAhB;AACA,AACA,AACA,AACA,AAEA,AAEA,IAAMJ,gBAAgB,qCAAtB;AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AAEA,IAAMN,aAAa,IAAIG,MAAJ,CAAWE,YAAX,EAAyB,GAAzB,CAAnB;AACA,IAAM1C,cAAc,IAAIwC,MAAJ,CAAWM,YAAX,EAAyB,GAAzB,CAApB;AACA,IAAMtB,iBAAiB,IAAIgB,MAAJ,CAAWC,MAAM,KAAN,EAAaG,OAAb,EAAsB,OAAtB,EAA+B,OAA/B,EAAwCC,OAAxC,CAAX,EAA6D,GAA7D,CAAvB;AACA,AACA,IAAM1C,aAAa,IAAIqC,MAAJ,CAAWC,MAAM,KAAN,EAAaC,YAAb,EAA2BC,aAA3B,CAAX,EAAsD,GAAtD,CAAnB;AACA,IAAMrC,cAAcH,UAApB;AACA,AACA,AAEA,SAAAF,gBAAA,CAA0BqC,GAA1B,EAAA;QACOF,SAASG,YAAYD,GAAZ,CAAf;WACQ,CAACF,OAAOzD,KAAP,CAAa0D,UAAb,CAAD,GAA4BC,GAA5B,GAAkCF,MAA1C;;AAGD,IAAMtD,YAA8C;YAC1C,QAD0C;WAG3C,kBAAUS,UAAV,EAAoCf,OAApC,EAAT;YACQgC,mBAAmBjB,UAAzB;YACMoB,KAAKH,iBAAiBG,EAAjB,GAAuBH,iBAAiBxB,IAAjB,GAAwBwB,iBAAiBxB,IAAjB,CAAsB+C,KAAtB,CAA4B,GAA5B,CAAxB,GAA2D,EAA7F;yBACiB/C,IAAjB,GAAwBH,SAAxB;YAEI2B,iBAAiBf,KAArB,EAA4B;gBACvBuC,iBAAiB,KAArB;gBACM3B,UAAwB,EAA9B;gBACM8B,UAAU3B,iBAAiBf,KAAjB,CAAuBsC,KAAvB,CAA6B,GAA7B,CAAhB;iBAEK,IAAInB,IAAI,CAAR,EAAWe,KAAKQ,QAAQvC,MAA7B,EAAqCgB,IAAIe,EAAzC,EAA6C,EAAEf,CAA/C,EAAkD;oBAC3CqB,SAASE,QAAQvB,CAAR,EAAWmB,KAAX,CAAiB,GAAjB,CAAf;wBAEQE,OAAO,CAAP,CAAR;yBACM,IAAL;4BACOC,UAAUD,OAAO,CAAP,EAAUF,KAAV,CAAgB,GAAhB,CAAhB;6BACK,IAAInB,KAAI,CAAR,EAAWe,MAAKO,QAAQtC,MAA7B,EAAqCgB,KAAIe,GAAzC,EAA6C,EAAEf,EAA/C,EAAkD;+BAC9Cf,IAAH,CAAQqC,QAAQtB,EAAR,CAAR;;;yBAGG,SAAL;yCACkBF,OAAjB,GAA2BS,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAA3B;;yBAEI,MAAL;yCACkBiC,IAAjB,GAAwBU,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAAxB;;;yCAGiB,IAAjB;gCACQ2C,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAAR,IAAiD2C,kBAAkBc,OAAO,CAAP,CAAlB,EAA6BzD,OAA7B,CAAjD;;;;gBAKCwD,cAAJ,EAAoBxB,iBAAiBH,OAAjB,GAA2BA,OAA3B;;yBAGJZ,KAAjB,GAAyBZ,SAAzB;aAEK,IAAI+B,MAAI,CAAR,EAAWe,OAAKhB,GAAGf,MAAxB,EAAgCgB,MAAIe,IAApC,EAAwC,EAAEf,GAA1C,EAA6C;gBACtCiB,OAAOlB,GAAGC,GAAH,EAAMmB,KAAN,CAAY,GAAZ,CAAb;iBAEK,CAAL,IAAUZ,kBAAkBU,KAAK,CAAL,CAAlB,CAAV;gBAEI,CAACrD,QAAQsD,cAAb,EAA6B;;oBAExB;yBACE,CAAL,IAAUb,SAASC,OAAT,CAAiBC,kBAAkBU,KAAK,CAAL,CAAlB,EAA2BrD,OAA3B,EAAoCD,WAApC,EAAjB,CAAV;iBADD,CAEE,OAAOyC,CAAP,EAAU;qCACMvC,KAAjB,GAAyB+B,iBAAiB/B,KAAjB,IAA0B,6EAA6EuC,CAAhI;;aALF,MAOO;qBACD,CAAL,IAAUG,kBAAkBU,KAAK,CAAL,CAAlB,EAA2BrD,OAA3B,EAAoCD,WAApC,EAAV;;eAGEqC,GAAH,IAAQiB,KAAKlC,IAAL,CAAU,GAAV,CAAR;;eAGMa,gBAAP;KA5DkD;eA+DvC,sBAAUA,gBAAV,EAA6ChC,OAA7C,EAAb;YACQe,aAAaiB,gBAAnB;YACMG,KAAKiB,QAAQpB,iBAAiBG,EAAzB,CAAX;YACIA,EAAJ,EAAQ;iBACF,IAAIC,IAAI,CAAR,EAAWe,KAAKhB,GAAGf,MAAxB,EAAgCgB,IAAIe,EAApC,EAAwC,EAAEf,CAA1C,EAA6C;oBACtCS,SAASK,OAAOf,GAAGC,CAAH,CAAP,CAAf;oBACMW,QAAQF,OAAOI,WAAP,CAAmB,GAAnB,CAAd;oBACMZ,YAAaQ,OAAOC,KAAP,CAAa,CAAb,EAAgBC,KAAhB,CAAD,CAAyBxB,OAAzB,CAAiCC,WAAjC,EAA8CC,gBAA9C,EAAgEF,OAAhE,CAAwEC,WAAxE,EAAqFE,WAArF,EAAkGH,OAAlG,CAA0GyB,cAA1G,EAA0HpB,UAA1H,CAAlB;oBACIU,SAASO,OAAOC,KAAP,CAAaC,QAAQ,CAArB,CAAb;;oBAGI;6BACO,CAAC/C,QAAQuC,GAAT,GAAeE,SAASC,OAAT,CAAiBC,kBAAkBL,MAAlB,EAA0BtC,OAA1B,EAAmCD,WAAnC,EAAjB,CAAf,GAAoF0C,SAASG,SAAT,CAAmBN,MAAnB,CAA9F;iBADD,CAEE,OAAOE,CAAP,EAAU;+BACAvC,KAAX,GAAmBc,WAAWd,KAAX,IAAoB,0DAA0D,CAACD,QAAQuC,GAAT,GAAe,OAAf,GAAyB,SAAnF,IAAgG,iBAAhG,GAAoHC,CAA3J;;mBAGEJ,CAAH,IAAQC,YAAY,GAAZ,GAAkBC,MAA1B;;uBAGU9B,IAAX,GAAkB2B,GAAGhB,IAAH,CAAQ,GAAR,CAAlB;;YAGKU,UAAUG,iBAAiBH,OAAjB,GAA2BG,iBAAiBH,OAAjB,IAA4B,EAAvE;YAEIG,iBAAiBE,OAArB,EAA8BL,QAAQ,SAAR,IAAqBG,iBAAiBE,OAAtC;YAC1BF,iBAAiBC,IAArB,EAA2BJ,QAAQ,MAAR,IAAkBG,iBAAiBC,IAAnC;YAErBf,SAAS,EAAf;aACK,IAAMI,IAAX,IAAmBO,OAAnB,EAA4B;gBACvBA,QAAQP,IAAR,MAAkBS,EAAET,IAAF,CAAtB,EAA+B;uBACvBD,IAAP,CACCC,KAAKC,OAAL,CAAaC,WAAb,EAA0BC,gBAA1B,EAA4CF,OAA5C,CAAoDC,WAApD,EAAiEE,WAAjE,EAA8EH,OAA9E,CAAsFI,UAAtF,EAAkGC,UAAlG,IACA,GADA,GAEAC,QAAQP,IAAR,EAAcC,OAAd,CAAsBC,WAAtB,EAAmCC,gBAAnC,EAAqDF,OAArD,CAA6DC,WAA7D,EAA0EE,WAA1E,EAAuFH,OAAvF,CAA+FO,WAA/F,EAA4GF,UAA5G,CAHD;;;YAOEV,OAAOE,MAAX,EAAmB;uBACPH,KAAX,GAAmBC,OAAOC,IAAP,CAAY,GAAZ,CAAnB;;eAGMJ,UAAP;;CAzGF,CA6GA;;ADnKA,IAAMC,YAAY,iBAAlB;AACA,AAEA;AACA,IAAMV,YAAqD;YACjD,KADiD;WAGlD,kBAAUS,UAAV,EAAoCf,OAApC,EAAT;YACQc,UAAUC,WAAWP,IAAX,IAAmBO,WAAWP,IAAX,CAAgBL,KAAhB,CAAsBa,SAAtB,CAAnC;YACIpB,gBAAgBmB,UAApB;YAEID,OAAJ,EAAa;gBACNzB,SAASW,QAAQX,MAAR,IAAkBO,cAAcP,MAAhC,IAA0C,KAAzD;gBACMoB,MAAMK,QAAQ,CAAR,EAAWf,WAAX,EAAZ;gBACMF,MAAMiB,QAAQ,CAAR,CAAZ;gBACMF,YAAevB,MAAf,UAAyBW,QAAQS,GAAR,IAAeA,GAAxC,CAAN;gBACMC,gBAAgBvB,QAAQyB,SAAR,CAAtB;0BAEcH,GAAd,GAAoBA,GAApB;0BACcZ,GAAd,GAAoBA,GAApB;0BACcW,IAAd,GAAqBH,SAArB;gBAEIK,aAAJ,EAAmB;gCACFA,cAAcG,KAAd,CAAoBjB,aAApB,EAAmCI,OAAnC,CAAhB;;SAZF,MAcO;0BACQC,KAAd,GAAsBL,cAAcK,KAAd,IAAuB,wBAA7C;;eAGML,aAAP;KAzByD;eA4B9C,sBAAUA,aAAV,EAAuCI,OAAvC,EAAb;YACQX,SAASW,QAAQX,MAAR,IAAkBO,cAAcP,MAAhC,IAA0C,KAAzD;YACMoB,MAAMb,cAAca,GAA1B;YACMG,YAAevB,MAAf,UAAyBW,QAAQS,GAAR,IAAeA,GAAxC,CAAN;YACMC,gBAAgBvB,QAAQyB,SAAR,CAAtB;YAEIF,aAAJ,EAAmB;4BACFA,cAAcC,SAAd,CAAwBf,aAAxB,EAAuCI,OAAvC,CAAhB;;YAGKO,gBAAgBX,aAAtB;YACMC,MAAMD,cAAcC,GAA1B;sBACcW,IAAd,IAAwBC,OAAOT,QAAQS,GAAvC,UAA8CZ,GAA9C;eAEOU,aAAP;;CA1CF,CA8CA;;AD5DA,IAAMH,OAAO,0DAAb;AACA,AAEA;AACA,IAAME,YAAsE;YAClE,UADkE;WAGnE,eAAUV,aAAV,EAAuCI,OAAvC,EAAT;YACQF,iBAAiBF,aAAvB;uBACeR,IAAf,GAAsBU,eAAeD,GAArC;uBACeA,GAAf,GAAqBQ,SAArB;YAEI,CAACL,QAAQE,QAAT,KAAsB,CAACJ,eAAeV,IAAhB,IAAwB,CAACU,eAAeV,IAAf,CAAoBe,KAApB,CAA0BC,IAA1B,CAA/C,CAAJ,EAAqF;2BACrEH,KAAf,GAAuBH,eAAeG,KAAf,IAAwB,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeV,IAAf,IAAuB,EAAxB,EAA4BW,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAT,QAAQQ,QAAKN,MAAb,IAAuBM,OAAvB;AAEA,AACAR,QAAQO,UAAML,MAAd,IAAwBK,SAAxB;AAEA,AACAP,QAAQM,UAAGJ,MAAX,IAAqBI,SAArB;AAEA,AACAN,QAAQK,UAAIH,MAAZ,IAAsBG,SAAtB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/es5/uri.all.min.d.ts b/node_modules/uri-js/dist/es5/uri.all.min.d.ts
new file mode 100755
index 0000000..da51e23
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.min.d.ts
@@ -0,0 +1,59 @@
+export interface URIComponents {
+ scheme?: string;
+ userinfo?: string;
+ host?: string;
+ port?: number | string;
+ path?: string;
+ query?: string;
+ fragment?: string;
+ reference?: string;
+ error?: string;
+}
+export interface URIOptions {
+ scheme?: string;
+ reference?: string;
+ tolerant?: boolean;
+ absolutePath?: boolean;
+ iri?: boolean;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+}
+export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
+ scheme: string;
+ parse(components: ParentComponents, options: Options): Components;
+ serialize(components: Components, options: Options): ParentComponents;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+ absolutePath?: boolean;
+}
+export interface URIRegExps {
+ NOT_SCHEME: RegExp;
+ NOT_USERINFO: RegExp;
+ NOT_HOST: RegExp;
+ NOT_PATH: RegExp;
+ NOT_PATH_NOSCHEME: RegExp;
+ NOT_QUERY: RegExp;
+ NOT_FRAGMENT: RegExp;
+ ESCAPE: RegExp;
+ UNRESERVED: RegExp;
+ OTHER_CHARS: RegExp;
+ PCT_ENCODED: RegExp;
+ IPV4ADDRESS: RegExp;
+ IPV6ADDRESS: RegExp;
+}
+export declare const SCHEMES: {
+ [scheme: string]: URISchemeHandler;
+};
+export declare function pctEncChar(chr: string): string;
+export declare function pctDecChars(str: string): string;
+export declare function parse(uriString: string, options?: URIOptions): URIComponents;
+export declare function removeDotSegments(input: string): string;
+export declare function serialize(components: URIComponents, options?: URIOptions): string;
+export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
+export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
+export declare function normalize(uri: string, options?: URIOptions): string;
+export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
+export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
+export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
+export declare function escapeComponent(str: string, options?: URIOptions): string;
+export declare function unescapeComponent(str: string, options?: URIOptions): string;
diff --git a/node_modules/uri-js/dist/es5/uri.all.min.js b/node_modules/uri-js/dist/es5/uri.all.min.js
new file mode 100755
index 0000000..fcd8458
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.min.js
@@ -0,0 +1,3 @@
+/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
+!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length>1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o<t;++o)r[o]=r[o].slice(1,-1);return r[t]=r[t].slice(1),r.join("")}return r[0]}function n(e){return"(?:"+e+")"}function t(e){return e===undefined?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return e!==undefined&&null!==e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var n=e;if(r)for(var t in r)n[t]=r[t];return n}function u(e){var t=r("[0-9]","[A-Fa-f]"),o=n(n("%[EFef]"+t+"%"+t+t+"%"+t+t)+"|"+n("%[89A-Fa-f]"+t+"%"+t+t)+"|"+n("%"+t+t)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",a),u=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",s=e?"[\\uE000-\\uF8FF]":"[]",f=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",u),c=n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("0?[1-9][0-9]")+"|0?0?[0-9]"),p=n(c+"\\."+c+"\\."+c+"\\."+c),h=n(t+"{1,4}"),d=n(n(h+"\\:"+h)+"|"+p),l=n(n(h+"\\:")+"{6}"+d),m=n("\\:\\:"+n(h+"\\:")+"{5}"+d),g=n(n(h)+"?\\:\\:"+n(h+"\\:")+"{4}"+d),v=n(n(n(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+n(h+"\\:")+"{3}"+d),E=n(n(n(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+n(h+"\\:")+"{2}"+d),C=n(n(n(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),y=n(n(n(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),S=n(n(n(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),A=n(n(n(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),D=n([l,m,g,v,E,C,y,S,A].join("|")),w=n(n(f+"|"+o)+"+");return{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",f,a),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",f,a),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",f,a),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",f,a),"g"),NOT_QUERY:new RegExp(r("[^\\%]",f,a,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",f,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",f,a),"g"),UNRESERVED:new RegExp(f,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",f,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+p+")$"),IPV6ADDRESS:new RegExp("^\\[?("+D+")"+n(n("\\%25|\\%(?!"+t+"{2})")+"("+w+")")+"?\\]?$")}}function s(e){throw new RangeError(H[e])}function f(e,r){for(var n=[],t=e.length;t--;)n[t]=r(e[t]);return n}function c(e,r){var n=e.split("@"),t="";return n.length>1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n<t;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<t){var a=e.charCodeAt(n++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),n--)}else r.push(o)}return r}function h(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n<t;){var o=parseInt(e.substr(n+1,2),16);if(o<128)r+=String.fromCharCode(o),n+=3;else if(o>=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function m(e){return e.replace(/^0*(.*)/,"$1")||"0"}function g(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=T(n,2),o=t[1];return o?o.split(".").map(m).join("."):e}function v(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=T(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=T(i,2),s=u[0],f=u[1],c=f?f.split(":").map(m):[],p=s.split(":").map(m),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,v=Array(d),E=0;E<d;++E)v[E]=c[E]||p[l+E]||"";h&&(v[d-1]=g(v[d-1],r));var C=v.reduce(function(e,r,n){if(!r||"0"===r){var t=e[e.length-1];t&&t.index+t.length===n?t.length++:e.push({index:n,length:1})}return e},[]),y=C.sort(function(e,r){return r.length-e.length})[0],S=void 0;if(y&&y.length>1){var A=v.slice(0,y.index),D=v.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=v.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?R:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(K);if(o){W?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=v(g(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=J[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=B.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?R:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(v(g(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(ee))e=e.replace(ee,"/");else if(e.match(re))e=e.replace(re,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(ne);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?R:F,t=[],o=J[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?R.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?R.PCT_ENCODED:F.PCT_ENCODED,d)}function N(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function I(e){var r=d(e);return r.match(he)?r:e}var F=u(!1),R=u(!0),T=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r<e.length;r++)n[r]=e[r];return n}return Array.from(e)},P=2147483647,q=/^xn--/,U=/[^\0-\x7E]/,j=/[\x2E\u3002\uFF0E\uFF61]/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,L=String.fromCharCode,$=function(e){return String.fromCodePoint.apply(String,_(e))},M=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},V=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},k=function(e,r,n){var t=0;for(e=n?z(e/700):e>>1,e+=z(e/r);e>455;t+=36)e=z(e/35);return z(t+36*e/(e+38))},Z=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u<i;++u)e.charCodeAt(u)>=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f<n;){for(var c=t,p=1,h=36;;h+=36){f>=n&&s("invalid-input");var d=M(e.charCodeAt(f++));(d>=36||d>z((P-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(d<l)break;var m=36-l;p>z(P/m)&&s("overflow"),p*=m}var g=r.length+1;a=k(t-c,g,0==c),z(t/g)>P-o&&s("overflow"),o+=z(t/g),t%=g,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},G=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(L(d))}}catch(U){u=!0,f=U}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,m=l;for(l&&r.push("-");m<n;){var g=P,v=!0,E=!1,C=undefined;try{for(var y,S=e[Symbol.iterator]();!(v=(y=S.next()).done);v=!0){var A=y.value;A>=t&&A<g&&(g=A)}}catch(U){E=!0,C=U}finally{try{!v&&S["return"]&&S["return"]()}finally{if(E)throw C}}var D=m+1;g-t>z((P-o)/D)&&s("overflow"),o+=(g-t)*D,t=g;var w=!0,b=!1,x=undefined;try{for(var O,N=e[Symbol.iterator]();!(w=(O=N.next()).done);w=!0){var I=O.value;if(I<t&&++o>P&&s("overflow"),I==t){for(var F=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(F<T)break;var _=F-T,q=36-T;r.push(L(V(T+_%q,0))),F=z(_/q)}r.push(L(V(F,0))),a=k(o,D,m==l),o=0,++m}}}catch(U){b=!0,x=U}finally{try{!w&&N["return"]&&N["return"]()}finally{if(b)throw x}}++o,++t}return r.join("")},Q=function(e){return c(e,function(e){return q.test(e)?Z(e.slice(4).toLowerCase()):e})},Y=function(e){return c(e,function(e){return U.test(e)?"xn--"+G(e):e})},B={version:"2.1.0",ucs2:{decode:p,encode:$},decode:Z,encode:G,toASCII:Y,toUnicode:Q},J={},K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,W="".match(/(){0}/)[1]===undefined,X=/^\.\.?\//,ee=/^\/\.(\/|$)/,re=/^\/\.\.(\/|$)/,ne=/^\/?(?:.|\n)*?(?=\/|$)/,te={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=undefined),e.path||(e.path="/"),e}},oe={scheme:"https",domainHost:te.domainHost,parse:te.parse,serialize:te.serialize},ae={scheme:"ws",domainHost:!0,parse:function(e,r){var n=e;return n.secure=N(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=undefined,n.query=undefined,n},serialize:function(e,r){if(e.port!==(N(e)?443:80)&&""!==e.port||(e.port=undefined),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=undefined),e.resourceName){var n=e.resourceName.split("?"),t=T(n,2),o=t[0],a=t[1];e.path=o&&"/"!==o?o:undefined,e.query=a,e.resourceName=undefined}return e.fragment=undefined,e}},ie={scheme:"wss",domainHost:ae.domainHost,parse:ae.parse,serialize:ae.serialize},ue={},se="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",fe="[0-9A-Fa-f]",ce=n(n("%[EFef][0-9A-Fa-f]%"+fe+fe+"%"+fe+fe)+"|"+n("%[89A-Fa-f][0-9A-Fa-f]%"+fe+fe)+"|"+n("%"+fe+fe)),pe=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),he=new RegExp(se,"g"),de=new RegExp(ce,"g"),le=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pe),"g"),me=new RegExp(r("[^]",se,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ge=me,ve={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u<s;++u){var f=i[u].split("=");switch(f[0]){case"to":for(var c=f[1].split(","),p=0,h=c.length;p<h;++p)t.push(c[p]);break;case"subject":n.subject=O(f[1],r);break;case"body":n.body=O(f[1],r);break;default:o=!0,a[O(f[0],r)]=O(f[1],r)}}o&&(n.headers=a)}n.query=undefined;for(var d=0,l=t.length;d<l;++d){var m=t[d].split("@");if(m[0]=O(m[0]),r.unicodeSupport)m[1]=O(m[1],r).toLowerCase();else try{m[1]=B.toASCII(O(m[1],r).toLowerCase())}catch(g){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+g}t[d]=m.join("@")}return n},serialize:function(e,r){var n=e,t=a(e.to);if(t){for(var i=0,u=t.length;i<u;++i){var s=String(t[i]),f=s.lastIndexOf("@"),c=s.slice(0,f).replace(de,I).replace(de,o).replace(le,h),p=s.slice(f+1);try{p=r.iri?B.toUnicode(p):B.toASCII(O(p,r).toLowerCase())}catch(g){n.error=n.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+g}t[i]=c+"@"+p}n.path=t.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var l=[];for(var m in d)d[m]!==ue[m]&&l.push(m.replace(de,I).replace(de,o).replace(me,h)+"="+d[m].replace(de,I).replace(de,o).replace(ge,h));return l.length&&(n.query=l.join("&")),n}},Ee=/^([^\:]+)\:(.*)/,Ce={scheme:"urn",parse:function(e,r){var n=e.path&&e.path.match(Ee),t=e;if(n){var o=r.scheme||t.scheme||"urn",a=n[1].toLowerCase(),i=n[2],u=o+":"+(r.nid||a),s=J[u];t.nid=a,t.nss=i,t.path=undefined,s&&(t=s.parse(t,r))}else t.error=t.error||"URN can not be parsed.";return t},serialize:function(e,r){var n=r.scheme||e.scheme||"urn",t=e.nid,o=n+":"+(r.nid||t),a=J[o];a&&(e=a.serialize(e,r));var i=e,u=e.nss;return i.path=(t||r.nid)+":"+u,i}},ye=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Se={scheme:"urn:uuid",parse:function(e,r){var n=e;return n.uuid=n.nss,n.nss=undefined,r.tolerant||n.uuid&&n.uuid.match(ye)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,r){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};J[te.scheme]=te,J[oe.scheme]=oe,J[ae.scheme]=ae,J[ie.scheme]=ie,J[ve.scheme]=ve,J[Ce.scheme]=Ce,J[Se.scheme]=Se,e.SCHEMES=J,e.pctEncChar=h,e.pctDecChars=d,e.parse=E,e.removeDotSegments=y,e.serialize=S,e.resolveComponents=A,e.resolve=D,e.normalize=w,e.equal=b,e.escapeComponent=x,e.unescapeComponent=O,Object.defineProperty(e,"__esModule",{value:!0})});
+//# sourceMappingURL=uri.all.min.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/es5/uri.all.min.js.map b/node_modules/uri-js/dist/es5/uri.all.min.js.map
new file mode 100755
index 0000000..99427a6
--- /dev/null
+++ b/node_modules/uri-js/dist/es5/uri.all.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/util.ts","../../src/regexps-uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/uri.ts","../../src/schemes/ws.ts","../../src/schemes/mailto.ts","../../src/regexps-iri.ts","../../src/schemes/http.ts","../../src/schemes/https.ts","../../src/schemes/wss.ts","../../src/schemes/urn.ts","../../src/schemes/urn-uuid.ts","../../src/index.ts"],"names":["merge","sets","Array","_len","_key","arguments","length","slice","xl","x","join","subexp","str","typeOf","o","undefined","Object","prototype","toString","call","split","pop","shift","toLowerCase","toUpperCase","toArray","obj","setInterval","assign","target","source","key","buildExps","isIRI","HEXDIG$$","PCT_ENCODED$","SUB_DELIMS$$","RESERVED$$","UCSCHAR$$","DEC_OCTET_RELAXED$","H16$","LS32$","IPV4ADDRESS$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","ZONEID$","UNRESERVED$$","RegExp","IPRIVATE$$","IPV6ADDRESS$","error","type","RangeError","errors","map","array","fn","result","mapDomain","string","parts","replace","regexSeparators","ucs2decode","output","counter","value","charCodeAt","extra","push","pctEncChar","chr","c","pctDecChars","newStr","i","il","parseInt","substr","String","fromCharCode","c2","c3","_normalizeComponentEncoding","components","protocol","decodeUnreserved","decStr","match","UNRESERVED","scheme","PCT_ENCODED","NOT_SCHEME","userinfo","NOT_USERINFO","host","NOT_HOST","path","NOT_PATH","NOT_PATH_NOSCHEME","query","NOT_QUERY","fragment","NOT_FRAGMENT","_stripLeadingZeros","_normalizeIPv4","matches","IPV4ADDRESS","address","_matches","_normalizeIPv6","IPV6ADDRESS","_matches2","zone","reverse","last","_address$toLowerCase$2","first","firstFields","lastFields","isLastFieldIPv4Address","test","fieldCount","lastFieldsStart","fields","allZeroFields","reduce","acc","field","index","lastLongest","longestZeroFields","sort","a","b","newHost","newFirst","newLast","parse","uriString","options","iri","IRI_PROTOCOL","URI_PROTOCOL","reference","URI_PARSE","NO_MATCH_IS_UNDEFINED","port","isNaN","indexOf","schemeHandler","SCHEMES","unicodeSupport","domainHost","punycode","toASCII","e","_recomposeAuthority","uriTokens","_","$1","$2","removeDotSegments","input","RDS1","RDS2","RDS3","im","RDS5","Error","s","serialize","toUnicode","authority","charAt","absolutePath","resolveComponents","base","relative","skipNormalization","tolerant","lastIndexOf","resolve","baseURI","relativeURI","schemelessOptions","normalize","uri","equal","uriA","uriB","escapeComponent","ESCAPE","unescapeComponent","isSecure","wsComponents","secure","maxInt","regexPunycode","regexNonASCII","floor","Math","stringFromCharCode","ucs2encode","fromCodePoint","apply","toConsumableArray","basicToDigit","codePoint","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","decode","inputLength","n","bias","basic","j","oldi","w","t","baseMinusT","out","splice","encode","_step","Symbol","iterator","_iteratorNormalCompletion","_iterator","next","done","currentValue","basicLength","handledCPCount","m","_step2","_iteratorNormalCompletion2","_iterator2","handledCPCountPlusOne","_step3","_iteratorNormalCompletion3","_iterator3","q","qMinusT","handler","http","resourceName","_wsComponents$resourc2","ws","O","VCHAR$$","NOT_LOCAL_PART","NOT_HFNAME","NOT_HFVALUE","mailtoComponents","to","unknownHeaders","headers","hfields","hfield","toAddrs","subject","body","addr","toAddr","atIdx","localPart","domain","name","URN_PARSE","urnComponents","nid","nss","urnScheme","uriComponents","UUID","uuidComponents","uuid","https","wss","mailto","urn"],"mappings":";4LAAA,SAAAA,gCAAyBC,EAAzBC,MAAAC,GAAAC,EAAA,EAAAA,EAAAD,EAAAC,MAAAA,GAAAC,UAAAD,MACKH,EAAKK,OAAS,EAAG,GACf,GAAKL,EAAK,GAAGM,MAAM,GAAI,OAEvB,GADCC,GAAKP,EAAKK,OAAS,EAChBG,EAAI,EAAGA,EAAID,IAAMC,IACpBA,GAAKR,EAAKQ,GAAGF,MAAM,GAAI,YAExBC,GAAMP,EAAKO,GAAID,MAAM,GACnBN,EAAKS,KAAK,UAEVT,GAAK,GAId,QAAAU,GAAuBC,SACf,MAAQA,EAAM,IAGtB,QAAAC,GAAuBC,SACfA,KAAMC,UAAY,YAAqB,OAAND,EAAa,OAASE,OAAOC,UAAUC,SAASC,KAAKL,GAAGM,MAAM,KAAKC,MAAMD,MAAM,KAAKE,QAAQC,cAGrI,QAAAC,GAA4BZ,SACpBA,GAAIY,cAGZ,QAAAC,GAAwBC,SAChBA,KAAQX,WAAqB,OAARW,EAAgBA,YAAexB,OAAQwB,EAA6B,gBAAfA,GAAIpB,QAAuBoB,EAAIN,OAASM,EAAIC,aAAeD,EAAIP,MAAQO,GAAOxB,MAAMe,UAAUV,MAAMY,KAAKO,MAI3L,QAAAE,GAAuBC,EAAgBC,MAChCJ,GAAMG,KACRC,MACE,GAAMC,KAAOD,KACbC,GAAOD,EAAOC,SAGbL,GCnCR,QAAAM,GAA0BC,MAMxBC,GAAWlC,EAFD,QAEgB,YAG1BmC,EAAexB,EAAOA,EAAO,UAAYuB,EAAW,IAAMA,EAAWA,EAAW,IAAMA,EAAWA,GAAY,IAAMvB,EAAO,cAAgBuB,EAAW,IAAMA,EAAWA,GAAY,IAAMvB,EAAO,IAAMuB,EAAWA,IAEhNE,EAAe,sCACfC,EAAarC,EAFE,0BAEkBoC,GACjCE,EAAYL,EAAQ,8EAAgF,OACvFA,EAAQ,oBAAsB,OAC5BjC,EAbL,WAEA,QAW6B,iBAAkBsC,GAIzDC,EAAqB5B,EAAOA,EAAO,WAAa,IAAMA,EAAO,eAAsB,IAAMA,EAAO,eAA2B,IAAMA,EAAO,gBAAuB,gBAChJA,EAAO4B,EAAqB,MAAQA,EAAqB,MAAQA,EAAqB,MAAQA,GAC7GC,EAAO7B,EAAOuB,EAAW,SACzBO,EAAQ9B,EAAOA,EAAO6B,EAAO,MAAQA,GAAQ,IAAME,GACnDC,EAAgBhC,EAAmEA,EAAO6B,EAAO,OAAS,MAAQC,KAClG9B,EAAwD,SAAWA,EAAO6B,EAAO,OAAS,MAAQC,KAClG9B,EAAOA,EAAwC6B,GAAQ,UAAY7B,EAAO6B,EAAO,OAAS,MAAQC,KAClG9B,EAAOA,EAAOA,EAAO6B,EAAO,OAAS,QAAUA,GAAQ,UAAY7B,EAAO6B,EAAO,OAAS,MAAQC,KAClG9B,EAAOA,EAAOA,EAAO6B,EAAO,OAAS,QAAUA,GAAQ,UAAY7B,EAAO6B,EAAO,OAAS,MAAQC,KAClG9B,EAAOA,EAAOA,EAAO6B,EAAO,OAAS,QAAUA,GAAQ,UAAmBA,EAAO,MAAiBC,KAClG9B,EAAOA,EAAOA,EAAO6B,EAAO,OAAS,QAAUA,GAAQ,UAA2CC,KAClG9B,EAAOA,EAAOA,EAAO6B,EAAO,OAAS,QAAUA,GAAQ,UAA2CA,KAClG7B,EAAOA,EAAOA,EAAO6B,EAAO,OAAS,QAAUA,GAAQ,aACxD7B,GAAQgC,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,EAAeC,GAAezC,KAAK,MACnK0C,EAAUzC,EAAOA,EAAO0C,EAAe,IAAMlB,GAAgB,uBAoChD,GAAImB,QAAOtD,EAAM,MAnEpB,WAEA,QAiE6C,eAAgB,kBACxD,GAAIsD,QAAOtD,EAAM,YAAaqD,EAAcjB,GAAe,cAC/D,GAAIkB,QAAOtD,EAAM,kBAAmBqD,EAAcjB,GAAe,cACjE,GAAIkB,QAAOtD,EAAM,kBAAmBqD,EAAcjB,GAAe,uBACxD,GAAIkB,QAAOtD,EAAM,eAAgBqD,EAAcjB,GAAe,eACtE,GAAIkB,QAAOtD,EAAM,SAAUqD,EAAcjB,EAAc,iBAAkBmB,GAAa,kBACnF,GAAID,QAAOtD,EAAM,SAAUqD,EAAcjB,EAAc,kBAAmB,YAChF,GAAIkB,QAAOtD,EAAM,MAAOqD,EAAcjB,GAAe,gBACjD,GAAIkB,QAAOD,EAAc,iBACxB,GAAIC,QAAOtD,EAAM,SAAUqD,EAAchB,GAAa,iBACtD,GAAIiB,QAAOnB,EAAc,iBACzB,GAAImB,QAAO,KAAOZ,EAAe,kBACjC,GAAIY,QAAO,SAAWE,EAAe,IAAM7C,EAAOA,EAAO,eAAiBuB,EAAW,QAAU,IAAMkB,EAAU,KAAO,WC5CtI,QAASK,GAAMC,QACR,IAAIC,YAAWC,EAAOF,IAW7B,QAASG,GAAIC,EAAOC,UACbC,MACF1D,EAASwD,EAAMxD,OACZA,OACCA,GAAUyD,EAAGD,EAAMxD,UAEpB0D,GAaR,QAASC,GAAUC,EAAQH,MACpBI,GAAQD,EAAO9C,MAAM,KACvB4C,EAAS,SACTG,GAAM7D,OAAS,MAGT6D,EAAM,GAAK,MACXA,EAAM,MAGPD,EAAOE,QAAQC,EAAiB,KAGlCL,EADSH,EADDK,EAAO9C,MAAM,KACA2C,GAAIrD,KAAK,KAiBtC,QAAS4D,GAAWJ,UACbK,MACFC,EAAU,EACRlE,EAAS4D,EAAO5D,OACfkE,EAAUlE,GAAQ,IAClBmE,GAAQP,EAAOQ,WAAWF,QAC5BC,GAAS,OAAUA,GAAS,OAAUD,EAAUlE,EAAQ,IAErDqE,GAAQT,EAAOQ,WAAWF,IACR,SAAX,MAARG,KACGC,OAAe,KAARH,IAAkB,KAAe,KAARE,GAAiB,UAIjDC,KAAKH,eAING,KAAKH,SAGPF,GC/BR,QAAAM,GAA2BC,MACpBC,GAAID,EAAIJ,WAAW,SAGrBK,GAAI,GAAQ,KAAOA,EAAE7D,SAAS,IAAIM,cAC7BuD,EAAI,IAAS,IAAMA,EAAE7D,SAAS,IAAIM,cAClCuD,EAAI,KAAU,KAAQA,GAAK,EAAK,KAAK7D,SAAS,IAAIM,cAAgB,KAAY,GAAJuD,EAAU,KAAK7D,SAAS,IAAIM,cACtG,KAAQuD,GAAK,GAAM,KAAK7D,SAAS,IAAIM,cAAgB,KAASuD,GAAK,EAAK,GAAM,KAAK7D,SAAS,IAAIM,cAAgB,KAAY,GAAJuD,EAAU,KAAK7D,SAAS,IAAIM,cAK9J,QAAAwD,GAA4BpE,UACvBqE,GAAS,GACTC,EAAI,EACFC,EAAKvE,EAAIN,OAER4E,EAAIC,GAAI,IACRJ,GAAIK,SAASxE,EAAIyE,OAAOH,EAAI,EAAG,GAAI,OAErCH,EAAI,OACGO,OAAOC,aAAaR,MACzB,MAED,IAAIA,GAAK,KAAOA,EAAI,IAAK,IACxBI,EAAKD,GAAM,EAAG,IACZM,GAAKJ,SAASxE,EAAIyE,OAAOH,EAAI,EAAG,GAAI,OAChCI,OAAOC,cAAmB,GAAJR,IAAW,EAAW,GAALS,WAEvC5E,EAAIyE,OAAOH,EAAG,MAEpB,MAED,IAAIH,GAAK,IAAK,IACbI,EAAKD,GAAM,EAAG,IACZM,GAAKJ,SAASxE,EAAIyE,OAAOH,EAAI,EAAG,GAAI,IACpCO,EAAKL,SAASxE,EAAIyE,OAAOH,EAAI,EAAG,GAAI,OAChCI,OAAOC,cAAmB,GAAJR,IAAW,IAAa,GAALS,IAAY,EAAW,GAALC,WAE3D7E,EAAIyE,OAAOH,EAAG,MAEpB,UAGKtE,EAAIyE,OAAOH,EAAG,MACnB,QAIAD,GAGR,QAAAS,GAAqCC,EAA0BC,WAC/DC,GAA2BjF,MACnBkF,GAASd,EAAYpE,SAClBkF,GAAOC,MAAMH,EAASI,YAAoBF,EAANlF,QAG1C+E,GAAWM,SAAQN,EAAWM,OAASX,OAAOK,EAAWM,QAAQ7B,QAAQwB,EAASM,YAAaL,GAAkBtE,cAAc6C,QAAQwB,EAASO,WAAY,KAC5JR,EAAWS,WAAarF,YAAW4E,EAAWS,SAAWd,OAAOK,EAAWS,UAAUhC,QAAQwB,EAASM,YAAaL,GAAkBzB,QAAQwB,EAASS,aAAcxB,GAAYT,QAAQwB,EAASM,YAAa1E,IAC9MmE,EAAWW,OAASvF,YAAW4E,EAAWW,KAAOhB,OAAOK,EAAWW,MAAMlC,QAAQwB,EAASM,YAAaL,GAAkBtE,cAAc6C,QAAQwB,EAASW,SAAU1B,GAAYT,QAAQwB,EAASM,YAAa1E,IAC5MmE,EAAWa,OAASzF,YAAW4E,EAAWa,KAAOlB,OAAOK,EAAWa,MAAMpC,QAAQwB,EAASM,YAAaL,GAAkBzB,QAASuB,EAAWM,OAASL,EAASa,SAAWb,EAASc,kBAAoB7B,GAAYT,QAAQwB,EAASM,YAAa1E,IACjPmE,EAAWgB,QAAU5F,YAAW4E,EAAWgB,MAAQrB,OAAOK,EAAWgB,OAAOvC,QAAQwB,EAASM,YAAaL,GAAkBzB,QAAQwB,EAASgB,UAAW/B,GAAYT,QAAQwB,EAASM,YAAa1E,IAClMmE,EAAWkB,WAAa9F,YAAW4E,EAAWkB,SAAWvB,OAAOK,EAAWkB,UAAUzC,QAAQwB,EAASM,YAAaL,GAAkBzB,QAAQwB,EAASkB,aAAcjC,GAAYT,QAAQwB,EAASM,YAAa1E,IAE3MmE,EAGR,QAAAoB,GAA4BnG,SACpBA,GAAIwD,QAAQ,UAAW,OAAS,IAGxC,QAAA4C,GAAwBV,EAAaV,MAC9BqB,GAAUX,EAAKP,MAAMH,EAASsB,qBAChBD,EAFrB,GAEUE,EAFVC,EAAA,SAIKD,GACIA,EAAQ/F,MAAM,KAAKyC,IAAIkD,GAAoBrG,KAAK,KAEhD4F,EAIT,QAAAe,GAAwBf,EAAaV,MAC9BqB,GAAUX,EAAKP,MAAMH,EAAS0B,qBACVL,EAF3B,GAEUE,EAFVI,EAAA,GAEmBC,EAFnBD,EAAA,MAIKJ,EAAS,KASP,MARiBA,EAAQ5F,cAAcH,MAAM,MAAMqG,mBAAjDC,EADKC,EAAA,GACCC,EADDD,EAAA,GAENE,EAAcD,EAAQA,EAAMxG,MAAM,KAAKyC,IAAIkD,MAC3Ce,EAAaJ,EAAKtG,MAAM,KAAKyC,IAAIkD,GACjCgB,EAAyBnC,EAASsB,YAAYc,KAAKF,EAAWA,EAAWxH,OAAS,IAClF2H,EAAaF,EAAyB,EAAI,EAC1CG,EAAkBJ,EAAWxH,OAAS2H,EACtCE,EAASjI,MAAc+H,GAEpBxH,EAAI,EAAGA,EAAIwH,IAAcxH,IAC1BA,GAAKoH,EAAYpH,IAAMqH,EAAWI,EAAkBzH,IAAM,EAG9DsH,OACIE,EAAa,GAAKjB,EAAemB,EAAOF,EAAa,GAAIrC,OAG3DwC,GAAgBD,EAAOE,OAA4C,SAACC,EAAKC,EAAOC,OAChFD,GAAmB,MAAVA,EAAe,IACtBE,GAAcH,EAAIA,EAAIhI,OAAS,EACjCmI,IAAeA,EAAYD,MAAQC,EAAYnI,SAAWkI,IACjDlI,WAERsE,MAAO4D,MAAAA,EAAOlI,OAAS,UAGtBgI,QAGFI,EAAoBN,EAAcO,KAAK,SAACC,EAAGC,SAAMA,GAAEvI,OAASsI,EAAEtI,SAAQ,GAExEwI,MAAAA,MACAJ,GAAqBA,EAAkBpI,OAAS,EAAG,IAChDyI,GAAWZ,EAAO5H,MAAM,EAAGmI,EAAkBF,OAC7CQ,EAAUb,EAAO5H,MAAMmI,EAAkBF,MAAQE,EAAkBpI,UAC/DyI,EAASrI,KAAK,KAAO,KAAOsI,EAAQtI,KAAK,YAEzCyH,EAAOzH,KAAK,WAGnB8G,QACQ,IAAMA,GAGXsB,QAEAxC,GAOT,QAAA2C,GAAsBC,MAAkBC,GAAxC9I,UAAAC,OAAA,GAAAD,UAAA,KAAAU,UAAAV,UAAA,MACOsF,KACAC,GAA4B,IAAhBuD,EAAQC,IAAgBC,EAAeC,CAE/B,YAAtBH,EAAQI,YAAwBL,GAAaC,EAAQlD,OAASkD,EAAQlD,OAAS,IAAM,IAAM,KAAOiD,MAEhGjC,GAAUiC,EAAUnD,MAAMyD,MAE5BvC,EAAS,CACRwC,KAEQxD,OAASgB,EAAQ,KACjBb,SAAWa,EAAQ,KACnBX,KAAOW,EAAQ,KACfyC,KAAOtE,SAAS6B,EAAQ,GAAI,MAC5BT,KAAOS,EAAQ,IAAM,KACrBN,MAAQM,EAAQ,KAChBJ,SAAWI,EAAQ,GAG1B0C,MAAMhE,EAAW+D,UACTA,KAAOzC,EAAQ,QAIhBhB,OAASgB,EAAQ,IAAMlG,YACvBqF,UAAwC,IAA5B8C,EAAUU,QAAQ,KAAc3C,EAAQ,GAAKlG,YACzDuF,MAAqC,IAA7B4C,EAAUU,QAAQ,MAAe3C,EAAQ,GAAKlG,YACtD2I,KAAOtE,SAAS6B,EAAQ,GAAI,MAC5BT,KAAOS,EAAQ,IAAM,KACrBN,OAAqC,IAA5BuC,EAAUU,QAAQ,KAAc3C,EAAQ,GAAKlG,YACtD8F,UAAwC,IAA5BqC,EAAUU,QAAQ,KAAc3C,EAAQ,GAAKlG,UAGhE4I,MAAMhE,EAAW+D,UACTA,KAAQR,EAAUnD,MAAM,iCAAmCkB,EAAQ,GAAKlG,YAIjF4E,EAAWW,SAEHA,KAAOe,EAAeL,EAAerB,EAAWW,KAAMV,GAAWA,IAIzED,EAAWM,SAAWlF,WAAa4E,EAAWS,WAAarF,WAAa4E,EAAWW,OAASvF,WAAa4E,EAAW+D,OAAS3I,WAAc4E,EAAWa,MAAQb,EAAWgB,QAAU5F,UAE5K4E,EAAWM,SAAWlF,YACrBwI,UAAY,WACb5D,EAAWkB,WAAa9F,YACvBwI,UAAY,aAEZA,UAAY,QANZA,UAAY,gBAUpBJ,EAAQI,WAAmC,WAAtBJ,EAAQI,WAA0BJ,EAAQI,YAAc5D,EAAW4D,cAChF9F,MAAQkC,EAAWlC,OAAS,gBAAkB0F,EAAQI,UAAY,kBAIxEM,GAAgBC,GAASX,EAAQlD,QAAUN,EAAWM,QAAU,IAAI1E,kBAGrE4H,EAAQY,gBAAoBF,GAAkBA,EAAcE,iBAcpCpE,EAAYC,OAdyC,IAE7ED,EAAWW,OAAS6C,EAAQa,YAAeH,GAAiBA,EAAcG,kBAGjE1D,KAAO2D,EAASC,QAAQvE,EAAWW,KAAKlC,QAAQwB,EAASM,YAAalB,GAAazD,eAC7F,MAAO4I,KACG1G,MAAQkC,EAAWlC,OAAS,kEAAoE0G,IAIjFxE,EAAY2D,GAOrCO,GAAiBA,EAAcZ,SACpBA,MAAMtD,EAAYwD,UAGtB1F,MAAQkC,EAAWlC,OAAS,+BAGjCkC,GAGR,QAAAyE,GAA6BzE,EAA0BwD,MAChDvD,IAA4B,IAAhBuD,EAAQC,IAAgBC,EAAeC,EACnDe,WAEF1E,GAAWS,WAAarF,cACjB6D,KAAKe,EAAWS,YAChBxB,KAAK,MAGZe,EAAWW,OAASvF,aAEb6D,KAAKyC,EAAeL,EAAe1B,OAAOK,EAAWW,MAAOV,GAAWA,GAAUxB,QAAQwB,EAAS0B,YAAa,SAACgD,EAAGC,EAAIC,SAAO,IAAMD,GAAMC,EAAK,MAAQA,EAAK,IAAM,OAG9I,gBAApB7E,GAAW+D,MAAgD,gBAApB/D,GAAW+D,SAClD9E,KAAK,OACLA,KAAKU,OAAOK,EAAW+D,QAG3BW,EAAU/J,OAAS+J,EAAU3J,KAAK,IAAMK,UAShD,QAAA0J,GAAkCC,UAC3BnG,MAECmG,EAAMpK,WACRoK,EAAM3E,MAAM4E,KACPD,EAAMtG,QAAQuG,EAAM,QACtB,IAAID,EAAM3E,MAAM6E,MACdF,EAAMtG,QAAQwG,GAAM,SACtB,IAAIF,EAAM3E,MAAM8E,MACdH,EAAMtG,QAAQyG,GAAM,OACrBxJ,UACD,IAAc,MAAVqJ,GAA2B,OAAVA,IACnB,OACF,IACAI,GAAKJ,EAAM3E,MAAMgF,QACnBD,OAKG,IAAIE,OAAM,uCAJVC,GAAIH,EAAG,KACLJ,EAAMnK,MAAM0K,EAAE3K,UACfsE,KAAKqG,SAOR1G,GAAO7D,KAAK,IAGpB,QAAAwK,GAA0BvF,MAA0BwD,GAApD9I,UAAAC,OAAA,GAAAD,UAAA,KAAAU,UAAAV,UAAA,MACOuF,EAAYuD,EAAQC,IAAMC,EAAeC,EACzCe,KAGAR,EAAgBC,GAASX,EAAQlD,QAAUN,EAAWM,QAAU,IAAI1E,kBAGtEsI,GAAiBA,EAAcqB,WAAWrB,EAAcqB,UAAUvF,EAAYwD,GAE9ExD,EAAWW,QAEVV,EAAS0B,YAAYU,KAAKrC,EAAWW,WAKpC,IAAI6C,EAAQa,YAAeH,GAAiBA,EAAcG,iBAGlD1D,KAAS6C,EAAQC,IAAmGa,EAASkB,UAAUxF,EAAWW,MAA3H2D,EAASC,QAAQvE,EAAWW,KAAKlC,QAAQwB,EAASM,YAAalB,GAAazD,eAC7G,MAAO4I,KACG1G,MAAQkC,EAAWlC,OAAS,+CAAkD0F,EAAQC,IAAgB,UAAV,SAAuB,kBAAoBe,IAMzHxE,EAAYC,GAEd,WAAtBuD,EAAQI,WAA0B5D,EAAWM,WACtCrB,KAAKe,EAAWM,UAChBrB,KAAK,SAGVwG,GAAYhB,EAAoBzE,EAAYwD,MAC9CiC,IAAcrK,YACS,WAAtBoI,EAAQI,aACD3E,KAAK,QAGNA,KAAKwG,GAEXzF,EAAWa,MAAsC,MAA9Bb,EAAWa,KAAK6E,OAAO,MACnCzG,KAAK,MAIbe,EAAWa,OAASzF,UAAW,IAC9BkK,GAAItF,EAAWa,IAEd2C,GAAQmC,cAAkBzB,GAAkBA,EAAcyB,iBAC1Db,EAAkBQ,IAGnBG,IAAcrK,cACbkK,EAAE7G,QAAQ,QAAS,WAGdQ,KAAKqG,SAGZtF,GAAWgB,QAAU5F,cACd6D,KAAK,OACLA,KAAKe,EAAWgB,QAGvBhB,EAAWkB,WAAa9F,cACjB6D,KAAK,OACLA,KAAKe,EAAWkB,WAGpBwD,EAAU3J,KAAK,IAGvB,QAAA6K,GAAkCC,EAAoBC,MAAwBtC,GAA9E9I,UAAAC,OAAA,GAAAD,UAAA,KAAAU,UAAAV,UAAA,MAAuGqL,EAAvGrL,UAAA,GACOwB,WAED6J,OACGzC,EAAMiC,EAAUM,EAAMrC,GAAUA,KAC5BF,EAAMiC,EAAUO,EAAUtC,GAAUA,MAEtCA,OAELA,EAAQwC,UAAYF,EAASxF,UAC1BA,OAASwF,EAASxF,SAElBG,SAAWqF,EAASrF,WACpBE,KAAOmF,EAASnF,OAChBoD,KAAO+B,EAAS/B,OAChBlD,KAAOiE,EAAkBgB,EAASjF,MAAQ,MAC1CG,MAAQ8E,EAAS9E,QAEpB8E,EAASrF,WAAarF,WAAa0K,EAASnF,OAASvF,WAAa0K,EAAS/B,OAAS3I,aAEhFqF,SAAWqF,EAASrF,WACpBE,KAAOmF,EAASnF,OAChBoD,KAAO+B,EAAS/B,OAChBlD,KAAOiE,EAAkBgB,EAASjF,MAAQ,MAC1CG,MAAQ8E,EAAS9E,QAEnB8E,EAASjF,MAQmB,MAA5BiF,EAASjF,KAAK6E,OAAO,KACjB7E,KAAOiE,EAAkBgB,EAASjF,OAEpCgF,EAAKpF,WAAarF,WAAayK,EAAKlF,OAASvF,WAAayK,EAAK9B,OAAS3I,WAAeyK,EAAKhF,KAErFgF,EAAKhF,OAGTA,KAAOgF,EAAKhF,KAAKjG,MAAM,EAAGiL,EAAKhF,KAAKoF,YAAY,KAAO,GAAKH,EAASjF,OAFrEA,KAAOiF,EAASjF,OAFhBA,KAAO,IAAMiF,EAASjF,OAMvBA,KAAOiE,EAAkB5I,EAAO2E,SAEjCG,MAAQ8E,EAAS9E,UAnBjBH,KAAOgF,EAAKhF,KACfiF,EAAS9E,QAAU5F,YACf4F,MAAQ8E,EAAS9E,QAEjBA,MAAQ6E,EAAK7E,SAkBfP,SAAWoF,EAAKpF,WAChBE,KAAOkF,EAAKlF,OACZoD,KAAO8B,EAAK9B,QAEbzD,OAASuF,EAAKvF,UAGfY,SAAW4E,EAAS5E,SAEpBhF,EAGR,QAAAgK,GAAwBC,EAAgBC,EAAoB5C,MACrD6C,GAAoBpK,GAASqE,OAAS,QAAUkD,SAC/C+B,GAAUK,EAAkBtC,EAAM6C,EAASE,GAAoB/C,EAAM8C,EAAaC,GAAoBA,GAAmB,GAAOA,GAKxI,QAAAC,GAA0BC,EAAS/C,SACf,gBAAR+C,KACJhB,EAAUjC,EAAMiD,EAAK/C,GAAUA,GACX,WAAhBtI,EAAOqL,OACXjD,EAAMiC,EAAyBgB,EAAK/C,GAAUA,IAG9C+C,EAKR,QAAAC,GAAsBC,EAAUC,EAAUlD,SACrB,gBAATiD,KACHlB,EAAUjC,EAAMmD,EAAMjD,GAAUA,GACZ,WAAjBtI,EAAOuL,OACVlB,EAAyBkB,EAAMjD,IAGnB,gBAATkD,KACHnB,EAAUjC,EAAMoD,EAAMlD,GAAUA,GACZ,WAAjBtI,EAAOwL,OACVnB,EAAyBmB,EAAMlD,IAGhCiD,IAASC,EAGjB,QAAAC,GAAgC1L,EAAYuI,SACpCvI,IAAOA,EAAIM,WAAWkD,QAAU+E,GAAYA,EAAQC,IAA4BC,EAAakD,OAAnCjD,EAAaiD,OAA+B1H,GAG9G,QAAA2H,GAAkC5L,EAAYuI,SACtCvI,IAAOA,EAAIM,WAAWkD,QAAU+E,GAAYA,EAAQC,IAAiCC,EAAanD,YAAxCoD,EAAapD,YAAyClB,GCniBxH,QAAAyH,GAAkBC,SACqB,iBAAxBA,GAAaC,OAAuBD,EAAaC,OAAuD,QAA9CrH,OAAOoH,EAAazG,QAAQ1E,cCwDrG,QAGAsE,GAA0BjF,MACnBkF,GAASd,EAAYpE,SAClBkF,GAAOC,MAAMC,IAAoBF,EAANlF,EJmBrC,GAAA0I,GAAetH,GAAU,GKrFzBqH,EAAerH,GAAU,2iBJAnB4K,EAAS,WAaTC,EAAgB,QAChBC,EAAgB,aAChBzI,EAAkB,4BAGlBT,YACO,8DACC,iEACI,iBAKZmJ,EAAQC,KAAKD,MACbE,EAAqB3H,OAAOC,aAsG5B2H,EAAa,SAAApJ,SAASwB,QAAO6H,cAAPC,MAAA9H,OAAA+H,EAAwBvJ,KAW9CwJ,EAAe,SAASC,SACzBA,GAAY,GAAO,GACfA,EAAY,GAEhBA,EAAY,GAAO,GACfA,EAAY,GAEhBA,EAAY,GAAO,GACfA,EAAY,GAjJR,IAiKPC,EAAe,SAASC,EAAOC,SAG7BD,GAAQ,GAAK,IAAMA,EAAQ,MAAgB,GAARC,IAAc,IAQnDC,EAAQ,SAASC,EAAOC,EAAWC,MACpCC,GAAI,QACAD,EAAYf,EAAMa,EA1Kd,KA0K8BA,GAAS,KAC1Cb,EAAMa,EAAQC,GACOD,EAAQI,IAA2BD,GAhLrD,KAiLHhB,EAAMa,EA3JMpC,UA6JduB,GAAMgB,EAAI,GAAsBH,GAASA,EAhLpC,MA0LPK,EAAS,SAASvD,MAEjBnG,MACA2J,EAAcxD,EAAMpK,OACtB4E,EAAI,EACJiJ,EA5LY,IA6LZC,EA9Le,GAoMfC,EAAQ3D,EAAMkB,YAlMD,IAmMbyC,GAAQ,MACH,OAGJ,GAAIC,GAAI,EAAGA,EAAID,IAASC,EAExB5D,EAAMhG,WAAW4J,IAAM,OACpB,eAEA1J,KAAK8F,EAAMhG,WAAW4J,QAMzB,GAAI9F,GAAQ6F,EAAQ,EAAIA,EAAQ,EAAI,EAAG7F,EAAQ0F,GAAwC,KAQtF,GADDK,GAAOrJ,EACFsJ,EAAI,EAAGT,EAjOL,IAiOmCA,GAjOnC,GAiO8C,CAEpDvF,GAAS0F,KACN,oBAGDT,GAAQH,EAAa5C,EAAMhG,WAAW8D,OAExCiF,GAzOM,IAyOWA,EAAQV,GAAOH,EAAS1H,GAAKsJ,OAC3C,eAGFf,EAAQe,KACPC,GAAIV,GAAKK,EA7OL,EA6OoBL,GAAKK,EA5OzB,GAAA,GA4O8CL,EAAIK,KAExDX,EAAQgB,WAINC,GApPI,GAoPgBD,CACtBD,GAAIzB,EAAMH,EAAS8B,MAChB,eAGFA,KAIAC,GAAMpK,EAAOjE,OAAS,IACrBqN,EAAMzI,EAAIqJ,EAAMI,EAAa,GAARJ,GAIxBxB,EAAM7H,EAAIyJ,GAAO/B,EAASuB,KACvB,eAGFpB,EAAM7H,EAAIyJ,MACVA,IAGEC,OAAO1J,IAAK,EAAGiJ,SAIhB7I,QAAO6H,cAAPC,MAAA9H,OAAwBf,IAU1BsK,EAAS,SAASnE,MACjBnG,QAGED,EAAWoG,MAGfwD,GAAcxD,EAAMpK,OAGpB6N,EA5RY,IA6RZP,EAAQ,EACRQ,EA/Re,oCAkSnBU,KAA2BpE,EAA3BqE,OAAAC,cAAAC,GAAAH,EAAAI,EAAAC,QAAAC,MAAAH,GAAA,EAAkC,IAAvBI,GAAuBP,EAAArK,KAC7B4K,GAAe,OACXzK,KAAKqI,EAAmBoC,2FAI7BC,GAAc/K,EAAOjE,OACrBiP,EAAiBD,MAMjBA,KACI1K,KA9SS,KAkTV2K,EAAiBrB,GAAa,IAIhCsB,GAAI5C,mCACR6C,KAA2B/E,EAA3BqE,OAAAC,cAAAU,GAAAD,EAAAE,EAAAR,QAAAC,MAAAM,GAAA,EAAkC,IAAvBL,GAAuBI,EAAAhL,KAC7B4K,IAAgBlB,GAAKkB,EAAeG,MACnCH,0FAMAO,GAAwBL,EAAiB,CAC3CC,GAAIrB,EAAIpB,GAAOH,EAASgB,GAASgC,MAC9B,gBAGGJ,EAAIrB,GAAKyB,IACfJ,uCAEJK,KAA2BnF,EAA3BqE,OAAAC,cAAAc,GAAAD,EAAAE,EAAAZ,QAAAC,MAAAU,GAAA,EAAkC,IAAvBT,GAAuBQ,EAAApL,SAC7B4K,EAAelB,KAAOP,EAAQhB,KAC3B,YAEHyC,GAAgBlB,EAAG,KAGjB,GADD6B,GAAIpC,EACCG,EArVA,IAqV8BA,GArV9B,GAqVyC,IAC3CU,GAAIV,GAAKK,EArVP,EAqVsBL,GAAKK,EApV3B,GAAA,GAoVgDL,EAAIK,KACxD4B,EAAIvB,WAGFwB,GAAUD,EAAIvB,EACdC,EA3VE,GA2VkBD,IACnB7J,KACNqI,EAAmBO,EAAaiB,EAAIwB,EAAUvB,EAAY,OAEvD3B,EAAMkD,EAAUvB,KAGd9J,KAAKqI,EAAmBO,EAAawC,EAAG,OACxCrC,EAAMC,EAAOgC,EAAuBL,GAAkBD,KACrD,IACNC,yFAIF3B,IACAO,QAGI5J,GAAO7D,KAAK,KAcdyK,EAAY,SAAST,SACnBzG,GAAUyG,EAAO,SAASxG,SACzB2I,GAAc7E,KAAK9D,GACvB+J,EAAO/J,EAAO3D,MAAM,GAAGgB,eACvB2C,KAeCgG,EAAU,SAASQ,SACjBzG,GAAUyG,EAAO,SAASxG,SACzB4I,GAAc9E,KAAK9D,GACvB,OAAS2K,EAAO3K,GAChBA,KAOC+F,WAMM,qBASA3F,SACA4I,UAEDe,SACAY,UACC3E,YACEiB,GC5VDrB,KA2IPN,EAAY,kIACZC,EAA4C,GAAI1D,MAAM,SAAU,KAAOhF,UAoHvE4J,EAAO,WACPC,GAAO,cACPC,GAAO,gBAEPE,GAAO,yBI1VPmF,WACI,mBAEI,QAEL,SAAUvK,EAA0BwD,SAEtCxD,GAAWW,SACJ7C,MAAQkC,EAAWlC,OAAS,+BAGjCkC,aAGI,SAAUA,EAA0BwD,MACzCwD,GAAqD,UAA5CrH,OAAOK,EAAWM,QAAQ1E,oBAGrCoE,GAAW+D,QAAUiD,EAAS,IAAM,KAA2B,KAApBhH,EAAW+D,SAC9CA,KAAO3I,WAId4E,EAAWa,SACJA,KAAO,KAOZb,IC9BHuK,WACI,mBACIC,GAAKnG,iBACVmG,GAAKlH,gBACDkH,GAAKjF,WJKZgF,WACI,iBAEI,QAEL,SAAUvK,EAA0BwD,MACrCuD,GAAe/G,WAGRgH,OAASF,EAASC,KAGlB0D,cAAgB1D,EAAalG,MAAQ,MAAQkG,EAAa/F,MAAQ,IAAM+F,EAAa/F,MAAQ,MAC7FH,KAAOzF,YACP4F,MAAQ5F,UAEd2L,aAGI,SAAUA,EAA2BvD,MAE5CuD,EAAahD,QAAU+C,EAASC,GAAgB,IAAM,KAA6B,KAAtBA,EAAahD,SAChEA,KAAO3I,WAIc,iBAAxB2L,GAAaC,WACV1G,OAAUyG,EAAaC,OAAS,MAAQ,OACxCA,OAAS5L,WAInB2L,EAAa0D,aAAc,OACR1D,EAAa0D,aAAahP,MAAM,cAA/CoF,EADuB6J,EAAA,GACjB1J,EADiB0J,EAAA,KAEjB7J,KAAQA,GAAiB,MAATA,EAAeA,EAAOzF,YACtC4F,MAAQA,IACRyJ,aAAerP,mBAIhB8F,SAAW9F,UAEjB2L,IKnDHwD,WACI,iBACII,GAAGtG,iBACRsG,GAAGrH,gBACCqH,GAAGpF,WJSVqF,MAIAlN,GAAe,mGACfnB,GAAW,cACXC,GAAexB,EAAOA,EAAO,sBAA6BuB,GAAWA,GAAW,IAAMA,GAAWA,IAAY,IAAMvB,EAAO,0BAAiCuB,GAAWA,IAAY,IAAMvB,EAAO,IAAMuB,GAAWA,KAehNsO,GAAUxQ,EADA,6DACe,aAqBzBgG,GAAa,GAAI1C,QAAOD,GAAc,KACtC6C,GAAc,GAAI5C,QAAOnB,GAAc,KACvCsO,GAAiB,GAAInN,QAAOtD,EAAM,MAzBxB,wDAyBwC,QAAS,QAASwQ,IAAU,KAE9EE,GAAa,GAAIpN,QAAOtD,EAAM,MAAOqD,GAjBrB,uCAiBmD,KACnEsN,GAAcD,GASdR,WACI,eAED,SAAUvK,EAA0BwD,MACrCyH,GAAmBjL,EACnBkL,EAAKD,EAAiBC,GAAMD,EAAiBpK,KAAOoK,EAAiBpK,KAAKpF,MAAM,aACrEoF,KAAOzF,UAEpB6P,EAAiBjK,MAAO,KAKtB,GAJDmK,IAAiB,EACfC,KACAC,EAAUJ,EAAiBjK,MAAMvF,MAAM,KAEpCX,EAAI,EAAGD,EAAKwQ,EAAQ1Q,OAAQG,EAAID,IAAMC,EAAG,IAC3CwQ,GAASD,EAAQvQ,GAAGW,MAAM,YAExB6P,EAAO,QACT,SAEC,GADCC,GAAUD,EAAO,GAAG7P,MAAM,KACvBX,EAAI,EAAGD,EAAK0Q,EAAQ5Q,OAAQG,EAAID,IAAMC,IAC3CmE,KAAKsM,EAAQzQ,cAGb,YACa0Q,QAAU3E,EAAkByE,EAAO,GAAI9H,aAEpD,SACaiI,KAAO5E,EAAkByE,EAAO,GAAI9H,oBAGpC,IACTqD,EAAkByE,EAAO,GAAI9H,IAAYqD,EAAkByE,EAAO,GAAI9H,IAK7E2H,IAAgBF,EAAiBG,QAAUA,KAG/BpK,MAAQ5F,cAEpB,GAAIN,GAAI,EAAGD,EAAKqQ,EAAGvQ,OAAQG,EAAID,IAAMC,EAAG,IACtC4Q,GAAOR,EAAGpQ,GAAGW,MAAM,UAEpB,GAAKoL,EAAkB6E,EAAK,IAE5BlI,EAAQY,iBAQP,GAAKyC,EAAkB6E,EAAK,GAAIlI,GAAS5H,yBALxC,GAAK0I,EAASC,QAAQsC,EAAkB6E,EAAK,GAAIlI,GAAS5H,eAC9D,MAAO4I,KACS1G,MAAQmN,EAAiBnN,OAAS,2EAA6E0G,IAM/H1J,GAAK4Q,EAAK3Q,KAAK,WAGZkQ,cAGI,SAAUA,EAAmCzH,MAClDxD,GAAaiL,EACbC,EAAKpP,EAAQmP,EAAiBC,OAChCA,EAAI,KACF,GAAIpQ,GAAI,EAAGD,EAAKqQ,EAAGvQ,OAAQG,EAAID,IAAMC,EAAG,IACtC6Q,GAAShM,OAAOuL,EAAGpQ,IACnB8Q,EAAQD,EAAO1F,YAAY,KAC3B4F,EAAaF,EAAO/Q,MAAM,EAAGgR,GAAQnN,QAAQ8B,GAAaL,GAAkBzB,QAAQ8B,GAAa1E,GAAa4C,QAAQqM,GAAgB5L,GACxI4M,EAASH,EAAO/Q,MAAMgR,EAAQ,SAItBpI,EAAQC,IAA2Ea,EAASkB,UAAUsG,GAAxFxH,EAASC,QAAQsC,EAAkBiF,EAAQtI,GAAS5H,eAC5E,MAAO4I,KACG1G,MAAQkC,EAAWlC,OAAS,wDAA2D0F,EAAQC,IAAgB,UAAV,SAAuB,kBAAoBe,IAGzJ1J,GAAK+Q,EAAY,IAAMC,IAGhBjL,KAAOqK,EAAGnQ,KAAK,QAGrBqQ,GAAUH,EAAiBG,QAAUH,EAAiBG,WAExDH,GAAiBO,UAASJ,EAAA,QAAqBH,EAAiBO,SAChEP,EAAiBQ,OAAML,EAAA,KAAkBH,EAAiBQ,SAExDjJ,UACD,GAAMuJ,KAAQX,GACdA,EAAQW,KAAUnB,GAAEmB,MAChB9M,KACN8M,EAAKtN,QAAQ8B,GAAaL,GAAkBzB,QAAQ8B,GAAa1E,GAAa4C,QAAQsM,GAAY7L,GAClG,IACAkM,EAAQW,GAAMtN,QAAQ8B,GAAaL,GAAkBzB,QAAQ8B,GAAa1E,GAAa4C,QAAQuM,GAAa9L,UAI3GsD,GAAO7H,WACCqG,MAAQwB,EAAOzH,KAAK,MAGzBiF,IK/JHgM,GAAY,kBAIZzB,WACI,YAED,SAAUvK,EAA0BwD,MACrClC,GAAUtB,EAAWa,MAAQb,EAAWa,KAAKT,MAAM4L,IACrDC,EAAgBjM,KAEhBsB,EAAS,IACNhB,GAASkD,EAAQlD,QAAU2L,EAAc3L,QAAU,MACnD4L,EAAM5K,EAAQ,GAAG1F,cACjBuQ,EAAM7K,EAAQ,GACd8K,EAAe9L,EAAf,KAAyBkD,EAAQ0I,KAAOA,GACxChI,EAAgBC,EAAQiI,KAEhBF,IAAMA,IACNC,IAAMA,IACNtL,KAAOzF,UAEjB8I,MACaA,EAAcZ,MAAM2I,EAAezI,WAGtC1F,MAAQmO,EAAcnO,OAAS,+BAGvCmO,cAGI,SAAUA,EAA6BzI,MAC5ClD,GAASkD,EAAQlD,QAAU2L,EAAc3L,QAAU,MACnD4L,EAAMD,EAAcC,IACpBE,EAAe9L,EAAf,KAAyBkD,EAAQ0I,KAAOA,GACxChI,EAAgBC,EAAQiI,EAE1BlI,OACaA,EAAcqB,UAAU0G,EAAezI,OAGlD6I,GAAgBJ,EAChBE,EAAMF,EAAcE,aACZtL,MAAUqL,GAAO1I,EAAQ0I,KAAvC,IAA8CC,EAEvCE,ICxDHC,GAAO,2DAIP/B,WACI,iBAED,SAAU0B,EAA6BzI,MACxC+I,GAAiBN,WACRO,KAAOD,EAAeJ,MACtBA,IAAM/Q,UAEhBoI,EAAQwC,UAAcuG,EAAeC,MAASD,EAAeC,KAAKpM,MAAMkM,QAC7DxO,MAAQyO,EAAezO,OAAS,sBAGzCyO,aAGI,SAAUA,EAA+B/I,MAC9CyI,GAAgBM,WAERJ,KAAOI,EAAeC,MAAQ,IAAI5Q,cACzCqQ,GC5BT9H,GAAQqG,GAAKlK,QAAUkK,GAEvBrG,EACQsI,GAAMnM,QAAUmM,GAExBtI,EACQwG,GAAGrK,QAAUqK,GAErBxG,EACQuI,GAAIpM,QAAUoM,GAEtBvI,EACQwI,GAAOrM,QAAUqM,GAEzBxI,EACQyI,GAAItM,QAAUsM,GAEtBzI,EACQqI,GAAKlM,QAAUkM","file":"dist/es5/uri.all.min.js","sourcesContent":["export function merge(...sets:Array<string>):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array<any> {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array<string>(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce<Array<{index:number,length:number}>>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = (<RegExpMatchArray>(\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array<string> = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array<string> = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array<string> = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(<URIComponents>uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(<URIComponents>uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(<URIComponents>uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array<string>,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler<MailtoComponents> = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler<URNComponents,URNOptions> = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler<UUIDComponents, URIOptions, URNComponents> = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n"]} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/index.d.ts b/node_modules/uri-js/dist/esnext/index.d.ts
new file mode 100755
index 0000000..f6be760
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/index.d.ts
@@ -0,0 +1 @@
+export * from "./uri";
diff --git a/node_modules/uri-js/dist/esnext/index.js b/node_modules/uri-js/dist/esnext/index.js
new file mode 100755
index 0000000..e3531b5
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/index.js
@@ -0,0 +1,17 @@
+import { SCHEMES } from "./uri";
+import http from "./schemes/http";
+SCHEMES[http.scheme] = http;
+import https from "./schemes/https";
+SCHEMES[https.scheme] = https;
+import ws from "./schemes/ws";
+SCHEMES[ws.scheme] = ws;
+import wss from "./schemes/wss";
+SCHEMES[wss.scheme] = wss;
+import mailto from "./schemes/mailto";
+SCHEMES[mailto.scheme] = mailto;
+import urn from "./schemes/urn";
+SCHEMES[urn.scheme] = urn;
+import uuid from "./schemes/urn-uuid";
+SCHEMES[uuid.scheme] = uuid;
+export * from "./uri";
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/index.js.map b/node_modules/uri-js/dist/esnext/index.js.map
new file mode 100755
index 0000000..0971f6e
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAExB,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/regexps-iri.d.ts b/node_modules/uri-js/dist/esnext/regexps-iri.d.ts
new file mode 100755
index 0000000..c91cdac
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/regexps-iri.d.ts
@@ -0,0 +1,3 @@
+import { URIRegExps } from "./uri";
+declare const _default: URIRegExps;
+export default _default;
diff --git a/node_modules/uri-js/dist/esnext/regexps-iri.js b/node_modules/uri-js/dist/esnext/regexps-iri.js
new file mode 100755
index 0000000..34e7de9
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/regexps-iri.js
@@ -0,0 +1,3 @@
+import { buildExps } from "./regexps-uri";
+export default buildExps(true);
+//# sourceMappingURL=regexps-iri.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/regexps-iri.js.map b/node_modules/uri-js/dist/esnext/regexps-iri.js.map
new file mode 100755
index 0000000..2269c58
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/regexps-iri.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"regexps-iri.js","sourceRoot":"","sources":["../../src/regexps-iri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/regexps-uri.d.ts b/node_modules/uri-js/dist/esnext/regexps-uri.d.ts
new file mode 100755
index 0000000..6096bda
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/regexps-uri.d.ts
@@ -0,0 +1,4 @@
+import { URIRegExps } from "./uri";
+export declare function buildExps(isIRI: boolean): URIRegExps;
+declare const _default: URIRegExps;
+export default _default;
diff --git a/node_modules/uri-js/dist/esnext/regexps-uri.js b/node_modules/uri-js/dist/esnext/regexps-uri.js
new file mode 100755
index 0000000..1cc659f
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/regexps-uri.js
@@ -0,0 +1,42 @@
+import { merge, subexp } from "./util";
+export function buildExps(isIRI) {
+ const ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive
+ LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded
+ GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters
+ IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset
+ UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules
+ IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32
+ IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32
+ IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32
+ IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+ IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+ IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
+ IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32
+ IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16
+ IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::"
+ IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874
+ IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874
+ IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules
+ IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874
+ REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified
+ PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified
+ PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified
+ PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
+ return {
+ NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
+ NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
+ NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
+ ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
+ UNRESERVED: new RegExp(UNRESERVED$$, "g"),
+ OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
+ PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
+ IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
+ IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
+ };
+}
+export default buildExps(false);
+//# sourceMappingURL=regexps-uri.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/regexps-uri.js.map b/node_modules/uri-js/dist/esnext/regexps-uri.js.map
new file mode 100755
index 0000000..cb028b8
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/regexps-uri.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"regexps-uri.js","sourceRoot":"","sources":["../../src/regexps-uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,oBAAoB,KAAa;IACtC,MACC,OAAO,GAAG,UAAU,EACpB,GAAG,GAAG,SAAS,EACf,OAAO,GAAG,OAAO,EACjB,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,EAAG,kBAAkB;IAC1D,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,EAAG,UAAU;IACvO,YAAY,GAAG,yBAAyB,EACxC,YAAY,GAAG,qCAAqC,EACpD,UAAU,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,EAC9C,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,6EAA6E,CAAC,CAAC,CAAC,IAAI,EAAG,0CAA0C;IACrJ,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,EAAG,QAAQ;IAC1D,YAAY,GAAG,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,CAAC,EACnE,OAAO,GAAG,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,GAAG,GAAG,CAAC,EACxE,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,EACjG,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,OAAO,CAAC,EACnK,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,OAAO,GAAG,OAAO,CAAC,EAAG,uBAAuB;IAC3M,YAAY,GAAG,MAAM,CAAC,kBAAkB,GAAG,KAAK,GAAG,kBAAkB,GAAG,KAAK,GAAG,kBAAkB,GAAG,KAAK,GAAG,kBAAkB,CAAC,EAChI,IAAI,GAAG,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,EACjC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,YAAY,CAAC,EAChE,aAAa,GAAG,MAAM,CAA6D,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,EAAE,8CAA8C;IACxK,aAAa,GAAG,MAAM,CAAkD,QAAQ,GAAG,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,EAAE,8CAA8C;IACxK,aAAa,GAAG,MAAM,CAAC,MAAM,CAAkC,IAAI,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,EAAE,8CAA8C;IACxK,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,EAAE,8CAA8C;IACxK,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,EAAE,8CAA8C;IACxK,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,GAAU,IAAI,GAAG,KAAK,GAAY,KAAK,CAAC,EAAE,8CAA8C;IACxK,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,GAAkC,KAAK,CAAC,EAAE,8CAA8C;IACxK,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,GAAkC,IAAI,CAAE,EAAE,6CAA6C;IACvK,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,CAAwC,EAAE,4BAA4B;IACtJ,YAAY,GAAG,MAAM,CAAC,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACxK,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,YAAY,CAAC,GAAG,GAAG,CAAC,EAAG,UAAU;IAC9E,UAAU,GAAG,MAAM,CAAC,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC,EAAG,UAAU;IAClE,kBAAkB,GAAG,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,EAAG,sCAAsC;IACzI,UAAU,GAAG,MAAM,CAAC,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,GAAG,GAAG,CAAC,EAClG,WAAW,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,kBAAkB,GAAG,GAAG,GAAG,YAAY,GAAG,GAAG,GAAG,UAAU,CAAC,GAAG,KAAK,CAAC,EAAG,UAAU;IACrH,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,GAAG,GAAG,CAAC,EACxF,KAAK,GAAG,MAAM,CAAC,WAAW,GAAG,GAAG,GAAG,YAAY,GAAG,KAAK,GAAG,SAAS,GAAG,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC,EAC5F,KAAK,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC,EAC7B,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,GAAG,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,EACxF,MAAM,GAAG,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,EACnF,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAC/B,WAAW,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAClC,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,EACtG,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,GAAG,CAAC,EACtD,cAAc,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,GAAG,aAAa,CAAC,GAAG,GAAG,CAAC,EAAG,YAAY;IACzF,cAAc,GAAG,MAAM,CAAC,cAAc,GAAG,aAAa,CAAC,EAAG,YAAY;IACtE,cAAc,GAAG,MAAM,CAAC,WAAW,GAAG,aAAa,CAAC,EAAG,YAAY;IACnE,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,GAAG,EAClC,KAAK,GAAG,MAAM,CAAC,aAAa,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,WAAW,CAAC,EACtH,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,GAAG,GAAG,CAAC,EAC3E,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,GAAG,CAAC,EACtD,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,WAAW,CAAC,EACpI,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,GAAG,CAAC,EAC5G,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,WAAW,CAAC,EACxI,SAAS,GAAG,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,GAAG,CAAC,EACnG,cAAc,GAAG,MAAM,CAAC,IAAI,GAAG,GAAG,GAAG,SAAS,CAAC,EAC/C,aAAa,GAAG,MAAM,CAAC,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,GAAG,CAAC,EAEnF,YAAY,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,aAAa,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,WAAW,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,GAAG,CAAC,GAAG,IAAI,EAC7U,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,aAAa,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,WAAW,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,GAAG,CAAC,GAAG,IAAI,EAC/T,aAAa,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,aAAa,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,WAAW,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,EACrS,YAAY,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,GAAG,CAAC,GAAG,IAAI,EAC5D,cAAc,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,IAAI,CAChH;IAED,OAAO;QACN,UAAU,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC;QAC3E,YAAY,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC;QAC9E,QAAQ,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC;QAChF,QAAQ,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC;QAChF,iBAAiB,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC;QACtF,SAAS,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC;QACtG,YAAY,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAAE,GAAG,CAAC;QAC7F,MAAM,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC;QAClE,UAAU,EAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QAC1C,WAAW,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC;QACxE,WAAW,EAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QAC3C,WAAW,EAAG,IAAI,MAAM,CAAC,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC;QACpD,WAAW,EAAG,IAAI,MAAM,CAAC,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAE,sCAAsC;KACrL,CAAC;AACH,CAAC;AAED,eAAe,SAAS,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/http.d.ts b/node_modules/uri-js/dist/esnext/schemes/http.d.ts
new file mode 100755
index 0000000..fe5b2f3
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/http.d.ts
@@ -0,0 +1,3 @@
+import { URISchemeHandler } from "../uri";
+declare const handler: URISchemeHandler;
+export default handler;
diff --git a/node_modules/uri-js/dist/esnext/schemes/http.js b/node_modules/uri-js/dist/esnext/schemes/http.js
new file mode 100755
index 0000000..6abf0fe
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/http.js
@@ -0,0 +1,28 @@
+const handler = {
+ scheme: "http",
+ domainHost: true,
+ parse: function (components, options) {
+ //report missing host
+ if (!components.host) {
+ components.error = components.error || "HTTP URIs must have a host.";
+ }
+ return components;
+ },
+ serialize: function (components, options) {
+ const secure = String(components.scheme).toLowerCase() === "https";
+ //normalize the default port
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
+ components.port = undefined;
+ }
+ //normalize the empty path
+ if (!components.path) {
+ components.path = "/";
+ }
+ //NOTE: We do not parse query strings for HTTP URIs
+ //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
+ //and not the HTTP spec.
+ return components;
+ }
+};
+export default handler;
+//# sourceMappingURL=http.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/http.js.map b/node_modules/uri-js/dist/esnext/schemes/http.js.map
new file mode 100755
index 0000000..8211897
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/http.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;QAEnE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACtE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/https.d.ts b/node_modules/uri-js/dist/esnext/schemes/https.d.ts
new file mode 100755
index 0000000..fe5b2f3
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/https.d.ts
@@ -0,0 +1,3 @@
+import { URISchemeHandler } from "../uri";
+declare const handler: URISchemeHandler;
+export default handler;
diff --git a/node_modules/uri-js/dist/esnext/schemes/https.js b/node_modules/uri-js/dist/esnext/schemes/https.js
new file mode 100755
index 0000000..ec4b6e7
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/https.js
@@ -0,0 +1,9 @@
+import http from "./http";
+const handler = {
+ scheme: "https",
+ domainHost: http.domainHost,
+ parse: http.parse,
+ serialize: http.serialize
+};
+export default handler;
+//# sourceMappingURL=https.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/https.js.map b/node_modules/uri-js/dist/esnext/schemes/https.js.map
new file mode 100755
index 0000000..385b8ef
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/https.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"https.js","sourceRoot":"","sources":["../../../src/schemes/https.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,OAAO;IAChB,UAAU,EAAG,IAAI,CAAC,UAAU;IAC5B,KAAK,EAAG,IAAI,CAAC,KAAK;IAClB,SAAS,EAAG,IAAI,CAAC,SAAS;CAC1B,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts b/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts
new file mode 100755
index 0000000..e2aefc2
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts
@@ -0,0 +1,12 @@
+import { URISchemeHandler, URIComponents } from "../uri";
+export interface MailtoHeaders {
+ [hfname: string]: string;
+}
+export interface MailtoComponents extends URIComponents {
+ to: Array<string>;
+ headers?: MailtoHeaders;
+ subject?: string;
+ body?: string;
+}
+declare const handler: URISchemeHandler<MailtoComponents>;
+export default handler;
diff --git a/node_modules/uri-js/dist/esnext/schemes/mailto.js b/node_modules/uri-js/dist/esnext/schemes/mailto.js
new file mode 100755
index 0000000..2553713
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/mailto.js
@@ -0,0 +1,148 @@
+import { pctEncChar, pctDecChars, unescapeComponent } from "../uri";
+import punycode from "punycode";
+import { merge, subexp, toUpperCase, toArray } from "../util";
+const O = {};
+const isIRI = true;
+//RFC 3986
+const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
+const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
+const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
+//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
+//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
+//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
+//const VCHAR$$ = "[\\x21-\\x7E]";
+//const WSP$$ = "[\\x20\\x09]";
+//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
+//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
+//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
+//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
+const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
+const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
+const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
+const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*");
+const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$);
+const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$);
+const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"');
+//RFC 6068
+const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126
+const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
+const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$);
+const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]");
+const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$);
+const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$);
+const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*");
+const HFNAME$ = subexp(QCHAR$ + "*");
+const HFVALUE$ = HFNAME$;
+const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$);
+const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*");
+const HFIELDS$ = subexp("\\?" + HFIELDS2$);
+const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$");
+const UNRESERVED = new RegExp(UNRESERVED$$, "g");
+const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
+const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
+const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g");
+const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
+const NOT_HFVALUE = NOT_HFNAME;
+const TO = new RegExp("^" + TO$ + "$");
+const HFIELDS = new RegExp("^" + HFIELDS2$ + "$");
+function decodeUnreserved(str) {
+ const decStr = pctDecChars(str);
+ return (!decStr.match(UNRESERVED) ? str : decStr);
+}
+const handler = {
+ scheme: "mailto",
+ parse: function (components, options) {
+ const mailtoComponents = components;
+ const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
+ mailtoComponents.path = undefined;
+ if (mailtoComponents.query) {
+ let unknownHeaders = false;
+ const headers = {};
+ const hfields = mailtoComponents.query.split("&");
+ for (let x = 0, xl = hfields.length; x < xl; ++x) {
+ const hfield = hfields[x].split("=");
+ switch (hfield[0]) {
+ case "to":
+ const toAddrs = hfield[1].split(",");
+ for (let x = 0, xl = toAddrs.length; x < xl; ++x) {
+ to.push(toAddrs[x]);
+ }
+ break;
+ case "subject":
+ mailtoComponents.subject = unescapeComponent(hfield[1], options);
+ break;
+ case "body":
+ mailtoComponents.body = unescapeComponent(hfield[1], options);
+ break;
+ default:
+ unknownHeaders = true;
+ headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
+ break;
+ }
+ }
+ if (unknownHeaders)
+ mailtoComponents.headers = headers;
+ }
+ mailtoComponents.query = undefined;
+ for (let x = 0, xl = to.length; x < xl; ++x) {
+ const addr = to[x].split("@");
+ addr[0] = unescapeComponent(addr[0]);
+ if (!options.unicodeSupport) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
+ }
+ catch (e) {
+ mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ }
+ else {
+ addr[1] = unescapeComponent(addr[1], options).toLowerCase();
+ }
+ to[x] = addr.join("@");
+ }
+ return mailtoComponents;
+ },
+ serialize: function (mailtoComponents, options) {
+ const components = mailtoComponents;
+ const to = toArray(mailtoComponents.to);
+ if (to) {
+ for (let x = 0, xl = to.length; x < xl; ++x) {
+ const toAddr = String(to[x]);
+ const atIdx = toAddr.lastIndexOf("@");
+ const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
+ let domain = toAddr.slice(atIdx + 1);
+ //convert IDN via punycode
+ try {
+ domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));
+ }
+ catch (e) {
+ components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ to[x] = localPart + "@" + domain;
+ }
+ components.path = to.join(",");
+ }
+ const headers = mailtoComponents.headers = mailtoComponents.headers || {};
+ if (mailtoComponents.subject)
+ headers["subject"] = mailtoComponents.subject;
+ if (mailtoComponents.body)
+ headers["body"] = mailtoComponents.body;
+ const fields = [];
+ for (const name in headers) {
+ if (headers[name] !== O[name]) {
+ fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +
+ "=" +
+ headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
+ }
+ }
+ if (fields.length) {
+ components.query = fields.join("&");
+ }
+ return components;
+ }
+};
+export default handler;
+//# sourceMappingURL=mailto.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/mailto.js.map b/node_modules/uri-js/dist/esnext/schemes/mailto.js.map
new file mode 100755
index 0000000..82dba9a
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/mailto.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"mailto.js","sourceRoot":"","sources":["../../../src/schemes/mailto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAa9D,MAAM,CAAC,GAAiB,EAAE,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,CAAC;AAEnB,UAAU;AACV,MAAM,YAAY,GAAG,wBAAwB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,2EAA2E,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACjJ,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAE,kBAAkB;AACnD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAE,UAAU;AAE7O,qEAAqE;AACrE,yFAAyF;AACzF,+BAA+B;AAC/B,uGAAuG;AACvG,+GAA+G;AAC/G,kCAAkC;AAClC,+BAA+B;AAC/B,wGAAwG;AACxG,8EAA8E;AAC9E,8FAA8F;AAC9F,mGAAmG;AACnG,MAAM,OAAO,GAAG,uDAAuD,CAAC;AACxE,MAAM,OAAO,GAAG,4DAA4D,CAAC;AAC7E,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;AAC7C,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACnF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;AAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,YAAY,CAAC,CAAC;AACvD,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC;AAE/D,UAAU;AACV,MAAM,cAAc,GAAG,0BAA0B,CAAC,CAAE,oBAAoB;AACxE,MAAM,aAAa,GAAG,qCAAqC,CAAC;AAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,YAAY,GAAG,GAAG,GAAG,aAAa,CAAC,CAAC;AAC/E,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,GAAG,GAAG,GAAG,KAAK,GAAG,cAAc,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC;AACpF,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,GAAG,GAAG,GAAG,cAAc,CAAC,CAAC;AAClE,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;AACzD,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,KAAK,GAAG,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC;AAClE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;AACrC,MAAM,QAAQ,GAAG,OAAO,CAAC;AACzB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;AACnD,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClE,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;AAC3C,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,YAAY,GAAG,GAAG,GAAG,GAAG,GAAG,QAAQ,GAAG,IAAI,CAAC,CAAC;AAE1E,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AACjD,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AAClD,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;AACzF,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;AACrG,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC,CAAC;AAC9E,MAAM,WAAW,GAAG,UAAU,CAAC;AAC/B,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AACvC,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,GAAG,CAAC,CAAC;AAElD,0BAA0B,GAAU;IACnC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAChC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,OAAO,GAAuC;IACnD,MAAM,EAAG,QAAQ;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,MAAM,gBAAgB,GAAG,UAA8B,CAAC;QACxD,MAAM,EAAE,GAAG,gBAAgB,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACjG,gBAAgB,CAAC,IAAI,GAAG,SAAS,CAAC;QAElC,IAAI,gBAAgB,CAAC,KAAK,EAAE;YAC3B,IAAI,cAAc,GAAG,KAAK,CAAA;YAC1B,MAAM,OAAO,GAAiB,EAAE,CAAC;YACjC,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAElD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;gBACjD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAErC,QAAQ,MAAM,CAAC,CAAC,CAAC,EAAE;oBAClB,KAAK,IAAI;wBACR,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;4BACjD,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;yBACpB;wBACD,MAAM;oBACP,KAAK,SAAS;wBACb,gBAAgB,CAAC,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;wBACjE,MAAM;oBACP,KAAK,MAAM;wBACV,gBAAgB,CAAC,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;wBAC9D,MAAM;oBACP;wBACC,cAAc,GAAG,IAAI,CAAC;wBACtB,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;wBACvF,MAAM;iBACP;aACD;YAED,IAAI,cAAc;gBAAE,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC;SACvD;QAED,gBAAgB,CAAC,KAAK,GAAG,SAAS,CAAC;QAEnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;YAC5C,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAE9B,IAAI,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAErC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;gBAC5B,kCAAkC;gBAClC,IAAI;oBACH,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;iBAC9E;gBAAC,OAAO,CAAC,EAAE;oBACX,gBAAgB,CAAC,KAAK,GAAG,gBAAgB,CAAC,KAAK,IAAI,0EAA0E,GAAG,CAAC,CAAC;iBAClI;aACD;iBAAM;gBACN,IAAI,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;aAC5D;YAED,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QAED,OAAO,gBAAgB,CAAC;IACzB,CAAC;IAED,SAAS,EAAG,UAAU,gBAAiC,EAAE,OAAkB;QAC1E,MAAM,UAAU,GAAG,gBAAiC,CAAC;QACrD,MAAM,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;QACxC,IAAI,EAAE,EAAE;YACP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;gBAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBACtC,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;gBACxJ,IAAI,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBAErC,0BAA0B;gBAC1B,IAAI;oBACH,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;iBAC1H;gBAAC,OAAO,CAAC,EAAE;oBACX,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,sDAAsD,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,iBAAiB,GAAG,CAAC,CAAC;iBAC7J;gBAED,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,GAAG,GAAG,MAAM,CAAC;aACjC;YAED,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC/B;QAED,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,IAAI,EAAE,CAAC;QAE1E,IAAI,gBAAgB,CAAC,OAAO;YAAE,OAAO,CAAC,SAAS,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC;QAC5E,IAAI,gBAAgB,CAAC,IAAI;YAAE,OAAO,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC;QAEnE,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE;YAC3B,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE;gBAC9B,MAAM,CAAC,IAAI,CACV,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC;oBAC7G,GAAG;oBACH,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CACvH,CAAC;aACF;SACD;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YAClB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts
new file mode 100755
index 0000000..e75f2e7
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts
@@ -0,0 +1,7 @@
+import { URISchemeHandler, URIOptions } from "../uri";
+import { URNComponents } from "./urn";
+export interface UUIDComponents extends URNComponents {
+ uuid?: string;
+}
+declare const handler: URISchemeHandler<UUIDComponents, URIOptions, URNComponents>;
+export default handler;
diff --git a/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js
new file mode 100755
index 0000000..d1fce49
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js
@@ -0,0 +1,23 @@
+const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
+const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/;
+//RFC 4122
+const handler = {
+ scheme: "urn:uuid",
+ parse: function (urnComponents, options) {
+ const uuidComponents = urnComponents;
+ uuidComponents.uuid = uuidComponents.nss;
+ uuidComponents.nss = undefined;
+ if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
+ }
+ return uuidComponents;
+ },
+ serialize: function (uuidComponents, options) {
+ const urnComponents = uuidComponents;
+ //normalize UUID
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
+ return urnComponents;
+ },
+};
+export default handler;
+//# sourceMappingURL=urn-uuid.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map
new file mode 100755
index 0000000..3b7a8b3
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"urn-uuid.js","sourceRoot":"","sources":["../../../src/schemes/urn-uuid.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,0DAA0D,CAAC;AACxE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,UAAU;AACV,MAAM,OAAO,GAA+D;IAC3E,MAAM,EAAG,UAAU;IAEnB,KAAK,EAAG,UAAU,aAA2B,EAAE,OAAkB;QAChE,MAAM,cAAc,GAAG,aAA+B,CAAC;QACvD,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC;QACzC,cAAc,CAAC,GAAG,GAAG,SAAS,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;YACpF,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,IAAI,oBAAoB,CAAC;SACpE;QAED,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,SAAS,EAAG,UAAU,cAA6B,EAAE,OAAkB;QACtE,MAAM,aAAa,GAAG,cAA+B,CAAC;QACtD,gBAAgB;QAChB,aAAa,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/urn.d.ts b/node_modules/uri-js/dist/esnext/schemes/urn.d.ts
new file mode 100755
index 0000000..7e0c2fb
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/urn.d.ts
@@ -0,0 +1,10 @@
+import { URISchemeHandler, URIComponents, URIOptions } from "../uri";
+export interface URNComponents extends URIComponents {
+ nid?: string;
+ nss?: string;
+}
+export interface URNOptions extends URIOptions {
+ nid?: string;
+}
+declare const handler: URISchemeHandler<URNComponents, URNOptions>;
+export default handler;
diff --git a/node_modules/uri-js/dist/esnext/schemes/urn.js b/node_modules/uri-js/dist/esnext/schemes/urn.js
new file mode 100755
index 0000000..5d3f10a
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/urn.js
@@ -0,0 +1,49 @@
+import { SCHEMES } from "../uri";
+const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})";
+const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})";
+const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]";
+const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)";
+const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$");
+const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$");
+const URN_PARSE = /^([^\:]+)\:(.*)/;
+const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g;
+//RFC 2141
+const handler = {
+ scheme: "urn",
+ parse: function (components, options) {
+ const matches = components.path && components.path.match(URN_PARSE);
+ let urnComponents = components;
+ if (matches) {
+ const scheme = options.scheme || urnComponents.scheme || "urn";
+ const nid = matches[1].toLowerCase();
+ const nss = matches[2];
+ const urnScheme = `${scheme}:${options.nid || nid}`;
+ const schemeHandler = SCHEMES[urnScheme];
+ urnComponents.nid = nid;
+ urnComponents.nss = nss;
+ urnComponents.path = undefined;
+ if (schemeHandler) {
+ urnComponents = schemeHandler.parse(urnComponents, options);
+ }
+ }
+ else {
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
+ }
+ return urnComponents;
+ },
+ serialize: function (urnComponents, options) {
+ const scheme = options.scheme || urnComponents.scheme || "urn";
+ const nid = urnComponents.nid;
+ const urnScheme = `${scheme}:${options.nid || nid}`;
+ const schemeHandler = SCHEMES[urnScheme];
+ if (schemeHandler) {
+ urnComponents = schemeHandler.serialize(urnComponents, options);
+ }
+ const uriComponents = urnComponents;
+ const nss = urnComponents.nss;
+ uriComponents.path = `${nid || options.nid}:${nss}`;
+ return uriComponents;
+ },
+};
+export default handler;
+//# sourceMappingURL=urn.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/urn.js.map b/node_modules/uri-js/dist/esnext/schemes/urn.js.map
new file mode 100755
index 0000000..ea43b0b
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/urn.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../../src/schemes/urn.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAC;AAW7C,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD,MAAM,YAAY,GAAG,uBAAuB,CAAC;AAC7C,MAAM,OAAO,GAAG,mEAAmE,CAAC;AACpF,MAAM,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,OAAO,GAAG,KAAK,CAAC;AAC7D,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACjE,MAAM,SAAS,GAAG,iBAAiB,CAAC;AACpC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AAEvE,UAAU;AACV,MAAM,OAAO,GAA8C;IAC1D,MAAM,EAAG,KAAK;IAEd,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,aAAa,GAAG,UAA2B,CAAC;QAEhD,IAAI,OAAO,EAAE;YACZ,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;YAC/D,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;YACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;YAEzC,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;YACxB,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;YACxB,aAAa,CAAC,IAAI,GAAG,SAAS,CAAC;YAE/B,IAAI,aAAa,EAAE;gBAClB,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;aAC7E;SACD;aAAM;YACN,aAAa,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,IAAI,wBAAwB,CAAC;SACtE;QAED,OAAO,aAAa,CAAC;IACtB,CAAC;IAED,SAAS,EAAG,UAAU,aAA2B,EAAE,OAAkB;QACpE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;QAC/D,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAEzC,IAAI,aAAa,EAAE;YAClB,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;SACjF;QAED,MAAM,aAAa,GAAG,aAA8B,CAAC;QACrD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,aAAa,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QAEpD,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/ws.d.ts b/node_modules/uri-js/dist/esnext/schemes/ws.d.ts
new file mode 100755
index 0000000..47f4835
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/ws.d.ts
@@ -0,0 +1,7 @@
+import { URISchemeHandler, URIComponents } from "../uri";
+export interface WSComponents extends URIComponents {
+ resourceName?: string;
+ secure?: boolean;
+}
+declare const handler: URISchemeHandler;
+export default handler;
diff --git a/node_modules/uri-js/dist/esnext/schemes/ws.js b/node_modules/uri-js/dist/esnext/schemes/ws.js
new file mode 100755
index 0000000..9277f03
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/ws.js
@@ -0,0 +1,41 @@
+function isSecure(wsComponents) {
+ return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
+}
+//RFC 6455
+const handler = {
+ scheme: "ws",
+ domainHost: true,
+ parse: function (components, options) {
+ const wsComponents = components;
+ //indicate if the secure flag is set
+ wsComponents.secure = isSecure(wsComponents);
+ //construct resouce name
+ wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');
+ wsComponents.path = undefined;
+ wsComponents.query = undefined;
+ return wsComponents;
+ },
+ serialize: function (wsComponents, options) {
+ //normalize the default port
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
+ wsComponents.port = undefined;
+ }
+ //ensure scheme matches secure flag
+ if (typeof wsComponents.secure === 'boolean') {
+ wsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');
+ wsComponents.secure = undefined;
+ }
+ //reconstruct path from resource name
+ if (wsComponents.resourceName) {
+ const [path, query] = wsComponents.resourceName.split('?');
+ wsComponents.path = (path && path !== '/' ? path : undefined);
+ wsComponents.query = query;
+ wsComponents.resourceName = undefined;
+ }
+ //forbid fragment component
+ wsComponents.fragment = undefined;
+ return wsComponents;
+ }
+};
+export default handler;
+//# sourceMappingURL=ws.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/ws.js.map b/node_modules/uri-js/dist/esnext/schemes/ws.js.map
new file mode 100755
index 0000000..186818c
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/ws.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ws.js","sourceRoot":"","sources":["../../../src/schemes/ws.ts"],"names":[],"mappings":"AAOA,kBAAkB,YAAyB;IAC1C,OAAO,OAAO,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;AAC7H,CAAC;AAED,UAAU;AACV,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,IAAI;IAEb,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,MAAM,YAAY,GAAG,UAA0B,CAAC;QAEhD,oCAAoC;QACpC,YAAY,CAAC,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;QAE7C,wBAAwB;QACxB,YAAY,CAAC,YAAY,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9G,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;QAC9B,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC;QAE/B,OAAO,YAAY,CAAC;IACrB,CAAC;IAED,SAAS,EAAG,UAAU,YAAyB,EAAE,OAAkB;QAClE,4BAA4B;QAC5B,IAAI,YAAY,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC,IAAI,KAAK,EAAE,EAAE;YAC1F,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;SAC9B;QAED,mCAAmC;QACnC,IAAI,OAAO,YAAY,CAAC,MAAM,KAAK,SAAS,EAAE;YAC7C,YAAY,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC3D,YAAY,CAAC,MAAM,GAAG,SAAS,CAAC;SAChC;QAED,qCAAqC;QACrC,IAAI,YAAY,CAAC,YAAY,EAAE;YAC9B,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC3D,YAAY,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC9D,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;YAC3B,YAAY,CAAC,YAAY,GAAG,SAAS,CAAC;SACtC;QAED,2BAA2B;QAC3B,YAAY,CAAC,QAAQ,GAAG,SAAS,CAAC;QAElC,OAAO,YAAY,CAAC;IACrB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/wss.d.ts b/node_modules/uri-js/dist/esnext/schemes/wss.d.ts
new file mode 100755
index 0000000..fe5b2f3
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/wss.d.ts
@@ -0,0 +1,3 @@
+import { URISchemeHandler } from "../uri";
+declare const handler: URISchemeHandler;
+export default handler;
diff --git a/node_modules/uri-js/dist/esnext/schemes/wss.js b/node_modules/uri-js/dist/esnext/schemes/wss.js
new file mode 100755
index 0000000..d1e22cc
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/wss.js
@@ -0,0 +1,9 @@
+import ws from "./ws";
+const handler = {
+ scheme: "wss",
+ domainHost: ws.domainHost,
+ parse: ws.parse,
+ serialize: ws.serialize
+};
+export default handler;
+//# sourceMappingURL=wss.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/schemes/wss.js.map b/node_modules/uri-js/dist/esnext/schemes/wss.js.map
new file mode 100755
index 0000000..e19006d
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/schemes/wss.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"wss.js","sourceRoot":"","sources":["../../../src/schemes/wss.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,KAAK;IACd,UAAU,EAAG,EAAE,CAAC,UAAU;IAC1B,KAAK,EAAG,EAAE,CAAC,KAAK;IAChB,SAAS,EAAG,EAAE,CAAC,SAAS;CACxB,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/uri.d.ts b/node_modules/uri-js/dist/esnext/uri.d.ts
new file mode 100755
index 0000000..da51e23
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/uri.d.ts
@@ -0,0 +1,59 @@
+export interface URIComponents {
+ scheme?: string;
+ userinfo?: string;
+ host?: string;
+ port?: number | string;
+ path?: string;
+ query?: string;
+ fragment?: string;
+ reference?: string;
+ error?: string;
+}
+export interface URIOptions {
+ scheme?: string;
+ reference?: string;
+ tolerant?: boolean;
+ absolutePath?: boolean;
+ iri?: boolean;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+}
+export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
+ scheme: string;
+ parse(components: ParentComponents, options: Options): Components;
+ serialize(components: Components, options: Options): ParentComponents;
+ unicodeSupport?: boolean;
+ domainHost?: boolean;
+ absolutePath?: boolean;
+}
+export interface URIRegExps {
+ NOT_SCHEME: RegExp;
+ NOT_USERINFO: RegExp;
+ NOT_HOST: RegExp;
+ NOT_PATH: RegExp;
+ NOT_PATH_NOSCHEME: RegExp;
+ NOT_QUERY: RegExp;
+ NOT_FRAGMENT: RegExp;
+ ESCAPE: RegExp;
+ UNRESERVED: RegExp;
+ OTHER_CHARS: RegExp;
+ PCT_ENCODED: RegExp;
+ IPV4ADDRESS: RegExp;
+ IPV6ADDRESS: RegExp;
+}
+export declare const SCHEMES: {
+ [scheme: string]: URISchemeHandler;
+};
+export declare function pctEncChar(chr: string): string;
+export declare function pctDecChars(str: string): string;
+export declare function parse(uriString: string, options?: URIOptions): URIComponents;
+export declare function removeDotSegments(input: string): string;
+export declare function serialize(components: URIComponents, options?: URIOptions): string;
+export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
+export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
+export declare function normalize(uri: string, options?: URIOptions): string;
+export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
+export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
+export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
+export declare function escapeComponent(str: string, options?: URIOptions): string;
+export declare function unescapeComponent(str: string, options?: URIOptions): string;
diff --git a/node_modules/uri-js/dist/esnext/uri.js b/node_modules/uri-js/dist/esnext/uri.js
new file mode 100755
index 0000000..659ce26
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/uri.js
@@ -0,0 +1,480 @@
+/**
+ * URI.js
+ *
+ * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
+ * @see http://github.com/garycourt/uri-js
+ */
+/**
+ * Copyright 2011 Gary Court. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of Gary Court.
+ */
+import URI_PROTOCOL from "./regexps-uri";
+import IRI_PROTOCOL from "./regexps-iri";
+import punycode from "punycode";
+import { toUpperCase, typeOf, assign } from "./util";
+export const SCHEMES = {};
+export function pctEncChar(chr) {
+ const c = chr.charCodeAt(0);
+ let e;
+ if (c < 16)
+ e = "%0" + c.toString(16).toUpperCase();
+ else if (c < 128)
+ e = "%" + c.toString(16).toUpperCase();
+ else if (c < 2048)
+ e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase();
+ else
+ e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase();
+ return e;
+}
+export function pctDecChars(str) {
+ let newStr = "";
+ let i = 0;
+ const il = str.length;
+ while (i < il) {
+ const c = parseInt(str.substr(i + 1, 2), 16);
+ if (c < 128) {
+ newStr += String.fromCharCode(c);
+ i += 3;
+ }
+ else if (c >= 194 && c < 224) {
+ if ((il - i) >= 6) {
+ const c2 = parseInt(str.substr(i + 4, 2), 16);
+ newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
+ }
+ else {
+ newStr += str.substr(i, 6);
+ }
+ i += 6;
+ }
+ else if (c >= 224) {
+ if ((il - i) >= 9) {
+ const c2 = parseInt(str.substr(i + 4, 2), 16);
+ const c3 = parseInt(str.substr(i + 7, 2), 16);
+ newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
+ }
+ else {
+ newStr += str.substr(i, 9);
+ }
+ i += 9;
+ }
+ else {
+ newStr += str.substr(i, 3);
+ i += 3;
+ }
+ }
+ return newStr;
+}
+function _normalizeComponentEncoding(components, protocol) {
+ function decodeUnreserved(str) {
+ const decStr = pctDecChars(str);
+ return (!decStr.match(protocol.UNRESERVED) ? str : decStr);
+ }
+ if (components.scheme)
+ components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
+ if (components.userinfo !== undefined)
+ components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.host !== undefined)
+ components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.path !== undefined)
+ components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.query !== undefined)
+ components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ if (components.fragment !== undefined)
+ components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
+ return components;
+}
+;
+function _stripLeadingZeros(str) {
+ return str.replace(/^0*(.*)/, "$1") || "0";
+}
+function _normalizeIPv4(host, protocol) {
+ const matches = host.match(protocol.IPV4ADDRESS) || [];
+ const [, address] = matches;
+ if (address) {
+ return address.split(".").map(_stripLeadingZeros).join(".");
+ }
+ else {
+ return host;
+ }
+}
+function _normalizeIPv6(host, protocol) {
+ const matches = host.match(protocol.IPV6ADDRESS) || [];
+ const [, address, zone] = matches;
+ if (address) {
+ const [last, first] = address.toLowerCase().split('::').reverse();
+ const firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
+ const lastFields = last.split(":").map(_stripLeadingZeros);
+ const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
+ const fieldCount = isLastFieldIPv4Address ? 7 : 8;
+ const lastFieldsStart = lastFields.length - fieldCount;
+ const fields = Array(fieldCount);
+ for (let x = 0; x < fieldCount; ++x) {
+ fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
+ }
+ if (isLastFieldIPv4Address) {
+ fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
+ }
+ const allZeroFields = fields.reduce((acc, field, index) => {
+ if (!field || field === "0") {
+ const lastLongest = acc[acc.length - 1];
+ if (lastLongest && lastLongest.index + lastLongest.length === index) {
+ lastLongest.length++;
+ }
+ else {
+ acc.push({ index, length: 1 });
+ }
+ }
+ return acc;
+ }, []);
+ const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];
+ let newHost;
+ if (longestZeroFields && longestZeroFields.length > 1) {
+ const newFirst = fields.slice(0, longestZeroFields.index);
+ const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
+ newHost = newFirst.join(":") + "::" + newLast.join(":");
+ }
+ else {
+ newHost = fields.join(":");
+ }
+ if (zone) {
+ newHost += "%" + zone;
+ }
+ return newHost;
+ }
+ else {
+ return host;
+ }
+}
+const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
+const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined;
+export function parse(uriString, options = {}) {
+ const components = {};
+ const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);
+ if (options.reference === "suffix")
+ uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
+ const matches = uriString.match(URI_PARSE);
+ if (matches) {
+ if (NO_MATCH_IS_UNDEFINED) {
+ //store each component
+ components.scheme = matches[1];
+ components.userinfo = matches[3];
+ components.host = matches[4];
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = matches[7];
+ components.fragment = matches[8];
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = matches[5];
+ }
+ }
+ else { //IE FIX for improper RegExp matching
+ //store each component
+ components.scheme = matches[1] || undefined;
+ components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined);
+ components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined);
+ components.port = parseInt(matches[5], 10);
+ components.path = matches[6] || "";
+ components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined);
+ components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined);
+ //fix port number
+ if (isNaN(components.port)) {
+ components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined);
+ }
+ }
+ if (components.host) {
+ //normalize IP hosts
+ components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
+ }
+ //determine reference type
+ if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
+ components.reference = "same-document";
+ }
+ else if (components.scheme === undefined) {
+ components.reference = "relative";
+ }
+ else if (components.fragment === undefined) {
+ components.reference = "absolute";
+ }
+ else {
+ components.reference = "uri";
+ }
+ //check for reference errors
+ if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
+ components.error = components.error || "URI is not a " + options.reference + " reference.";
+ }
+ //find scheme handler
+ const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //check if scheme can't handle IRIs
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
+ //if host component is a domain name
+ if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {
+ //convert Unicode IDN -> ASCII IDN
+ try {
+ components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
+ }
+ catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
+ }
+ }
+ //convert IRI -> URI
+ _normalizeComponentEncoding(components, URI_PROTOCOL);
+ }
+ else {
+ //normalize encodings
+ _normalizeComponentEncoding(components, protocol);
+ }
+ //perform scheme specific parsing
+ if (schemeHandler && schemeHandler.parse) {
+ schemeHandler.parse(components, options);
+ }
+ }
+ else {
+ components.error = components.error || "URI can not be parsed.";
+ }
+ return components;
+}
+;
+function _recomposeAuthority(components, options) {
+ const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);
+ const uriTokens = [];
+ if (components.userinfo !== undefined) {
+ uriTokens.push(components.userinfo);
+ uriTokens.push("@");
+ }
+ if (components.host !== undefined) {
+ //normalize IP hosts, add brackets and escape zone separator for IPv6
+ uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]"));
+ }
+ if (typeof components.port === "number" || typeof components.port === "string") {
+ uriTokens.push(":");
+ uriTokens.push(String(components.port));
+ }
+ return uriTokens.length ? uriTokens.join("") : undefined;
+}
+;
+const RDS1 = /^\.\.?\//;
+const RDS2 = /^\/\.(\/|$)/;
+const RDS3 = /^\/\.\.(\/|$)/;
+const RDS4 = /^\.\.?$/;
+const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
+export function removeDotSegments(input) {
+ const output = [];
+ while (input.length) {
+ if (input.match(RDS1)) {
+ input = input.replace(RDS1, "");
+ }
+ else if (input.match(RDS2)) {
+ input = input.replace(RDS2, "/");
+ }
+ else if (input.match(RDS3)) {
+ input = input.replace(RDS3, "/");
+ output.pop();
+ }
+ else if (input === "." || input === "..") {
+ input = "";
+ }
+ else {
+ const im = input.match(RDS5);
+ if (im) {
+ const s = im[0];
+ input = input.slice(s.length);
+ output.push(s);
+ }
+ else {
+ throw new Error("Unexpected dot segment condition");
+ }
+ }
+ }
+ return output.join("");
+}
+;
+export function serialize(components, options = {}) {
+ const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);
+ const uriTokens = [];
+ //find scheme handler
+ const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
+ //perform scheme specific serialization
+ if (schemeHandler && schemeHandler.serialize)
+ schemeHandler.serialize(components, options);
+ if (components.host) {
+ //if host component is an IPv6 address
+ if (protocol.IPV6ADDRESS.test(components.host)) {
+ //TODO: normalize IPv6 address as per RFC 5952
+ }
+ //if host component is a domain name
+ else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {
+ //convert IDN via punycode
+ try {
+ components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));
+ }
+ catch (e) {
+ components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
+ }
+ }
+ }
+ //normalize encoding
+ _normalizeComponentEncoding(components, protocol);
+ if (options.reference !== "suffix" && components.scheme) {
+ uriTokens.push(components.scheme);
+ uriTokens.push(":");
+ }
+ const authority = _recomposeAuthority(components, options);
+ if (authority !== undefined) {
+ if (options.reference !== "suffix") {
+ uriTokens.push("//");
+ }
+ uriTokens.push(authority);
+ if (components.path && components.path.charAt(0) !== "/") {
+ uriTokens.push("/");
+ }
+ }
+ if (components.path !== undefined) {
+ let s = components.path;
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
+ s = removeDotSegments(s);
+ }
+ if (authority === undefined) {
+ s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
+ }
+ uriTokens.push(s);
+ }
+ if (components.query !== undefined) {
+ uriTokens.push("?");
+ uriTokens.push(components.query);
+ }
+ if (components.fragment !== undefined) {
+ uriTokens.push("#");
+ uriTokens.push(components.fragment);
+ }
+ return uriTokens.join(""); //merge tokens into a string
+}
+;
+export function resolveComponents(base, relative, options = {}, skipNormalization) {
+ const target = {};
+ if (!skipNormalization) {
+ base = parse(serialize(base, options), options); //normalize base components
+ relative = parse(serialize(relative, options), options); //normalize relative components
+ }
+ options = options || {};
+ if (!options.tolerant && relative.scheme) {
+ target.scheme = relative.scheme;
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ }
+ else {
+ if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
+ //target.authority = relative.authority;
+ target.userinfo = relative.userinfo;
+ target.host = relative.host;
+ target.port = relative.port;
+ target.path = removeDotSegments(relative.path || "");
+ target.query = relative.query;
+ }
+ else {
+ if (!relative.path) {
+ target.path = base.path;
+ if (relative.query !== undefined) {
+ target.query = relative.query;
+ }
+ else {
+ target.query = base.query;
+ }
+ }
+ else {
+ if (relative.path.charAt(0) === "/") {
+ target.path = removeDotSegments(relative.path);
+ }
+ else {
+ if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
+ target.path = "/" + relative.path;
+ }
+ else if (!base.path) {
+ target.path = relative.path;
+ }
+ else {
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
+ }
+ target.path = removeDotSegments(target.path);
+ }
+ target.query = relative.query;
+ }
+ //target.authority = base.authority;
+ target.userinfo = base.userinfo;
+ target.host = base.host;
+ target.port = base.port;
+ }
+ target.scheme = base.scheme;
+ }
+ target.fragment = relative.fragment;
+ return target;
+}
+;
+export function resolve(baseURI, relativeURI, options) {
+ const schemelessOptions = assign({ scheme: 'null' }, options);
+ return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
+}
+;
+export function normalize(uri, options) {
+ if (typeof uri === "string") {
+ uri = serialize(parse(uri, options), options);
+ }
+ else if (typeOf(uri) === "object") {
+ uri = parse(serialize(uri, options), options);
+ }
+ return uri;
+}
+;
+export function equal(uriA, uriB, options) {
+ if (typeof uriA === "string") {
+ uriA = serialize(parse(uriA, options), options);
+ }
+ else if (typeOf(uriA) === "object") {
+ uriA = serialize(uriA, options);
+ }
+ if (typeof uriB === "string") {
+ uriB = serialize(parse(uriB, options), options);
+ }
+ else if (typeOf(uriB) === "object") {
+ uriB = serialize(uriB, options);
+ }
+ return uriA === uriB;
+}
+;
+export function escapeComponent(str, options) {
+ return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);
+}
+;
+export function unescapeComponent(str, options) {
+ return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);
+}
+;
+//# sourceMappingURL=uri.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/uri.js.map b/node_modules/uri-js/dist/esnext/uri.js.map
new file mode 100755
index 0000000..2e72ab1
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/uri.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAiDrD,MAAM,CAAC,MAAM,OAAO,GAAsC,EAAE,CAAC;AAE7D,MAAM,qBAAqB,GAAU;IACpC,MAAM,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAQ,CAAC;IAEb,IAAI,CAAC,GAAG,EAAE;QAAE,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;SAC/C,IAAI,CAAC,GAAG,GAAG;QAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;SACpD,IAAI,CAAC,GAAG,IAAI;QAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;;QACxH,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAE3K,OAAO,CAAC,CAAC;AACV,CAAC;AAED,MAAM,sBAAsB,GAAU;IACrC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAEtB,OAAO,CAAC,GAAG,EAAE,EAAE;QACd,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAE7C,IAAI,CAAC,GAAG,GAAG,EAAE;YACZ,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACjC,CAAC,IAAI,CAAC,CAAC;SACP;aACI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,GAAG,EAAE;YAC7B,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE;gBAClB,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9C,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;aAC3D;iBAAM;gBACN,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAC3B;YACD,CAAC,IAAI,CAAC,CAAC;SACP;aACI,IAAI,CAAC,IAAI,GAAG,EAAE;YAClB,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE;gBAClB,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9C,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9C,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;aAC/E;iBAAM;gBACN,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAC3B;YACD,CAAC,IAAI,CAAC,CAAC;SACP;aACI;YACJ,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3B,CAAC,IAAI,CAAC,CAAC;SACP;KACD;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,qCAAqC,UAAwB,EAAE,QAAmB;IACjF,0BAA0B,GAAU;QACnC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QAChC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,UAAU,CAAC,MAAM;QAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACpK,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS;QAAE,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC/N,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS;QAAE,UAAU,CAAC,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC7N,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS;QAAE,UAAU,CAAC,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAClQ,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS;QAAE,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACnN,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS;QAAE,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAE/N,OAAO,UAAU,CAAC;AACnB,CAAC;AAAA,CAAC;AAEF,4BAA4B,GAAU;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC;AAC5C,CAAC;AAED,wBAAwB,IAAW,EAAE,QAAmB;IACvD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;IAE5B,IAAI,OAAO,EAAE;QACZ,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC5D;SAAM;QACN,OAAO,IAAI,CAAC;KACZ;AACF,CAAC;AAED,wBAAwB,IAAW,EAAE,QAAmB;IACvD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACvD,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC;IAElC,IAAI,OAAO,EAAE;QACZ,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAClE,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC3D,MAAM,sBAAsB,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5F,MAAM,UAAU,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC;QACvD,MAAM,MAAM,GAAG,KAAK,CAAS,UAAU,CAAC,CAAC;QAEzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,EAAE,CAAC,EAAE;YACpC,MAAM,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,eAAe,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;SACpE;QAED,IAAI,sBAAsB,EAAE;YAC3B,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;SAC1E;QAED,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAsC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YAC9F,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,GAAG,EAAE;gBAC5B,MAAM,WAAW,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACxC,IAAI,WAAW,IAAI,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,MAAM,KAAK,KAAK,EAAE;oBACpE,WAAW,CAAC,MAAM,EAAE,CAAC;iBACrB;qBAAM;oBACN,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAG,CAAC,EAAE,CAAC,CAAC;iBAChC;aACD;YACD,OAAO,GAAG,CAAC;QACZ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/E,IAAI,OAAc,CAAC;QACnB,IAAI,iBAAiB,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YACtD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAE;YAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;YACjF,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACxD;aAAM;YACN,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC3B;QAED,IAAI,IAAI,EAAE;YACT,OAAO,IAAI,GAAG,GAAG,IAAI,CAAC;SACtB;QAED,OAAO,OAAO,CAAC;KACf;SAAM;QACN,OAAO,IAAI,CAAC;KACZ;AACF,CAAC;AAED,MAAM,SAAS,GAAG,iIAAiI,CAAC;AACpJ,MAAM,qBAAqB,GAAsB,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAE,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;AAEvF,MAAM,gBAAgB,SAAgB,EAAE,UAAqB,EAAE;IAC9D,MAAM,UAAU,GAAiB,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IAEvE,IAAI,OAAO,CAAC,SAAS,KAAK,QAAQ;QAAE,SAAS,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAEhH,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAE3C,IAAI,OAAO,EAAE;QACZ,IAAI,qBAAqB,EAAE;YAC1B,sBAAsB;YACtB,UAAU,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC7B,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3C,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACnC,UAAU,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC9B,UAAU,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAEjC,iBAAiB;YACjB,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBAC3B,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;aAC7B;SACD;aAAM,EAAG,qCAAqC;YAC9C,sBAAsB;YACtB,UAAU,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;YAC5C,UAAU,CAAC,QAAQ,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC/E,UAAU,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5E,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3C,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACnC,UAAU,CAAC,KAAK,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5E,UAAU,CAAC,QAAQ,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAE/E,iBAAiB;YACjB,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBAC3B,UAAU,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;aAC9F;SACD;QAED,IAAI,UAAU,CAAC,IAAI,EAAE;YACpB,oBAAoB;YACpB,UAAU,CAAC,IAAI,GAAG,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;SACtF;QAED,0BAA0B;QAC1B,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS,EAAE;YACjM,UAAU,CAAC,SAAS,GAAG,eAAe,CAAC;SACvC;aAAM,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE;YAC3C,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC;SAClC;aAAM,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC7C,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC;SAClC;aAAM;YACN,UAAU,CAAC,SAAS,GAAG,KAAK,CAAC;SAC7B;QAED,4BAA4B;QAC5B,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,KAAK,QAAQ,IAAI,OAAO,CAAC,SAAS,KAAK,UAAU,CAAC,SAAS,EAAE;YACtG,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,eAAe,GAAG,OAAO,CAAC,SAAS,GAAG,aAAa,CAAC;SAC3F;QAED,qBAAqB;QACrB,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAEzF,mCAAmC;QACnC,IAAI,CAAC,OAAO,CAAC,cAAc,IAAI,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;YACjF,oCAAoC;YACpC,IAAI,UAAU,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC,EAAE;gBAC3F,kCAAkC;gBAClC,IAAI;oBACH,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;iBAC7G;gBAAC,OAAO,CAAC,EAAE;oBACX,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,iEAAiE,GAAG,CAAC,CAAC;iBAC7G;aACD;YACD,oBAAoB;YACpB,2BAA2B,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;SACtD;aAAM;YACN,qBAAqB;YACrB,2BAA2B,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SAClD;QAED,iCAAiC;QACjC,IAAI,aAAa,IAAI,aAAa,CAAC,KAAK,EAAE;YACzC,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;SACzC;KACD;SAAM;QACN,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,wBAAwB,CAAC;KAChE;IAED,OAAO,UAAU,CAAC;AACnB,CAAC;AAAA,CAAC;AAEF,6BAA6B,UAAwB,EAAE,OAAkB;IACxE,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACvE,MAAM,SAAS,GAAiB,EAAE,CAAC;IAEnC,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS,EAAE;QACtC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACpC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpB;IAED,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;QAClC,qEAAqE;QACrE,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;KAClL;IAED,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE;QAC/E,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;KACxC;IAED,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAAA,CAAC;AAEF,MAAM,IAAI,GAAG,UAAU,CAAC;AACxB,MAAM,IAAI,GAAG,aAAa,CAAC;AAC3B,MAAM,IAAI,GAAG,eAAe,CAAC;AAC7B,MAAM,IAAI,GAAG,SAAS,CAAC;AACvB,MAAM,IAAI,GAAG,wBAAwB,CAAC;AAEtC,MAAM,4BAA4B,KAAY;IAC7C,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,OAAO,KAAK,CAAC,MAAM,EAAE;QACpB,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACtB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;SAChC;aAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAC7B,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACjC;aAAM,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAC7B,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YACjC,MAAM,CAAC,GAAG,EAAE,CAAC;SACb;aAAM,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,IAAI,EAAE;YAC3C,KAAK,GAAG,EAAE,CAAC;SACX;aAAM;YACN,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,EAAE,EAAE;gBACP,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;gBAChB,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;gBAC9B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACf;iBAAM;gBACN,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;aACpD;SACD;KACD;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC;AAAA,CAAC;AAEF,MAAM,oBAAoB,UAAwB,EAAE,UAAqB,EAAE;IAC1E,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAiB,EAAE,CAAC;IAEnC,qBAAqB;IACrB,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzF,uCAAuC;IACvC,IAAI,aAAa,IAAI,aAAa,CAAC,SAAS;QAAE,aAAa,CAAC,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAE3F,IAAI,UAAU,CAAC,IAAI,EAAE;QACpB,sCAAsC;QACtC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YAC/C,8CAA8C;SAC9C;QAED,oCAAoC;aAC/B,IAAI,OAAO,CAAC,UAAU,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE;YAC3E,0BAA0B;YAC1B,IAAI;gBACH,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;aACpK;YAAC,OAAO,CAAC,EAAE;gBACX,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6CAA6C,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,iBAAiB,GAAG,CAAC,CAAC;aACpJ;SACD;KACD;IAED,oBAAoB;IACpB,2BAA2B,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAElD,IAAI,OAAO,CAAC,SAAS,KAAK,QAAQ,IAAI,UAAU,CAAC,MAAM,EAAE;QACxD,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAClC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpB;IAED,MAAM,SAAS,GAAG,mBAAmB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC3D,IAAI,SAAS,KAAK,SAAS,EAAE;QAC5B,IAAI,OAAO,CAAC,SAAS,KAAK,QAAQ,EAAE;YACnC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACrB;QAED,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAE1B,IAAI,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YACzD,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IAED,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;QAClC,IAAI,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC;QAExB,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE;YAC7E,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;SACzB;QAED,IAAI,SAAS,KAAK,SAAS,EAAE;YAC5B,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAE,yCAAyC;SAC1E;QAED,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAClB;IAED,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS,EAAE;QACnC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;KACjC;IAED,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS,EAAE;QACtC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;KACpC;IAED,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAE,4BAA4B;AACzD,CAAC;AAAA,CAAC;AAEF,MAAM,4BAA4B,IAAkB,EAAE,QAAsB,EAAE,UAAqB,EAAE,EAAE,iBAA0B;IAChI,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,IAAI,CAAC,iBAAiB,EAAE;QACvB,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAE,2BAA2B;QAC7E,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAE,+BAA+B;KACzF;IACD,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;IAExB,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAAE;QACzC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAChC,wCAAwC;QACxC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACpC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC5B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC5B,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACrD,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;KAC9B;SAAM;QACN,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;YAClG,wCAAwC;YACxC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;YACpC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC5B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC5B,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;YACrD,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;SAC9B;aAAM;YACN,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;gBACnB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;gBACxB,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,EAAE;oBACjC,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;iBAC9B;qBAAM;oBACN,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;iBAC1B;aACD;iBAAM;gBACN,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;oBACpC,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;iBAC/C;qBAAM;oBACN,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;wBACtG,MAAM,CAAC,IAAI,GAAG,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;qBAClC;yBAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;wBACtB,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;qBAC5B;yBAAM;wBACN,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;qBACjF;oBACD,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBAC7C;gBACD,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;aAC9B;YACD,oCAAoC;YACpC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;YAChC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACxB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SACxB;QACD,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;KAC5B;IAED,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAEpC,OAAO,MAAM,CAAC;AACf,CAAC;AAAA,CAAC;AAEF,MAAM,kBAAkB,OAAc,EAAE,WAAkB,EAAE,OAAmB;IAC9E,MAAM,iBAAiB,GAAG,MAAM,CAAC,EAAE,MAAM,EAAG,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,OAAO,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,EAAE,KAAK,CAAC,WAAW,EAAE,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAC3J,CAAC;AAAA,CAAC;AAIF,MAAM,oBAAoB,GAAO,EAAE,OAAmB;IACrD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC5B,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KAC9C;SAAM,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;QACpC,GAAG,GAAG,KAAK,CAAC,SAAS,CAAgB,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KAC7D;IAED,OAAO,GAAG,CAAC;AACZ,CAAC;AAAA,CAAC;AAIF,MAAM,gBAAgB,IAAQ,EAAE,IAAQ,EAAE,OAAmB;IAC5D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC7B,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KAChD;SAAM,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE;QACrC,IAAI,GAAG,SAAS,CAAgB,IAAI,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC7B,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KAChD;SAAM,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE;QACrC,IAAI,GAAG,SAAS,CAAgB,IAAI,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,OAAO,IAAI,KAAK,IAAI,CAAC;AACtB,CAAC;AAAA,CAAC;AAEF,MAAM,0BAA0B,GAAU,EAAE,OAAmB;IAC9D,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;AAC1H,CAAC;AAAA,CAAC;AAEF,MAAM,4BAA4B,GAAU,EAAE,OAAmB;IAChE,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AACrI,CAAC;AAAA,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/util.d.ts b/node_modules/uri-js/dist/esnext/util.d.ts
new file mode 100755
index 0000000..7c12857
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/util.d.ts
@@ -0,0 +1,6 @@
+export declare function merge(...sets: Array<string>): string;
+export declare function subexp(str: string): string;
+export declare function typeOf(o: any): string;
+export declare function toUpperCase(str: string): string;
+export declare function toArray(obj: any): Array<any>;
+export declare function assign(target: object, source: any): any;
diff --git a/node_modules/uri-js/dist/esnext/util.js b/node_modules/uri-js/dist/esnext/util.js
new file mode 100755
index 0000000..072711e
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/util.js
@@ -0,0 +1,36 @@
+export function merge(...sets) {
+ if (sets.length > 1) {
+ sets[0] = sets[0].slice(0, -1);
+ const xl = sets.length - 1;
+ for (let x = 1; x < xl; ++x) {
+ sets[x] = sets[x].slice(1, -1);
+ }
+ sets[xl] = sets[xl].slice(1);
+ return sets.join('');
+ }
+ else {
+ return sets[0];
+ }
+}
+export function subexp(str) {
+ return "(?:" + str + ")";
+}
+export function typeOf(o) {
+ return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase());
+}
+export function toUpperCase(str) {
+ return str.toUpperCase();
+}
+export function toArray(obj) {
+ return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];
+}
+export function assign(target, source) {
+ const obj = target;
+ if (source) {
+ for (const key in source) {
+ obj[key] = source[key];
+ }
+ }
+ return obj;
+}
+//# sourceMappingURL=util.js.map \ No newline at end of file
diff --git a/node_modules/uri-js/dist/esnext/util.js.map b/node_modules/uri-js/dist/esnext/util.js.map
new file mode 100755
index 0000000..05d9df0
--- /dev/null
+++ b/node_modules/uri-js/dist/esnext/util.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,IAAkB;IAC1C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;YAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACrB;SAAM;QACN,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;KACf;AACF,CAAC;AAED,MAAM,iBAAiB,GAAU;IAChC,OAAO,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;AAC1B,CAAC;AAED,MAAM,iBAAiB,CAAK;IAC3B,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACpJ,CAAC;AAED,MAAM,sBAAsB,GAAU;IACrC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,kBAAkB,GAAO;IAC9B,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvM,CAAC;AAGD,MAAM,iBAAiB,MAAc,EAAE,MAAW;IACjD,MAAM,GAAG,GAAG,MAAa,CAAC;IAC1B,IAAI,MAAM,EAAE;QACX,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACzB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SACvB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file
diff --git a/node_modules/uri-js/package.json b/node_modules/uri-js/package.json
new file mode 100755
index 0000000..de95d91
--- /dev/null
+++ b/node_modules/uri-js/package.json
@@ -0,0 +1,77 @@
+{
+ "name": "uri-js",
+ "version": "4.4.1",
+ "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.",
+ "main": "dist/es5/uri.all.js",
+ "types": "dist/es5/uri.all.d.ts",
+ "directories": {
+ "test": "tests"
+ },
+ "files": [
+ "dist",
+ "package.json",
+ "yarn.lock",
+ "README.md",
+ "CHANGELOG",
+ "LICENSE"
+ ],
+ "scripts": {
+ "build:esnext": "tsc",
+ "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap",
+ "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js",
+ "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts",
+ "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min",
+ "clean": "rm -rf dist",
+ "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/garycourt/uri-js"
+ },
+ "keywords": [
+ "URI",
+ "IRI",
+ "IDN",
+ "URN",
+ "UUID",
+ "HTTP",
+ "HTTPS",
+ "WS",
+ "WSS",
+ "MAILTO",
+ "RFC3986",
+ "RFC3987",
+ "RFC5891",
+ "RFC2616",
+ "RFC2818",
+ "RFC2141",
+ "RFC4122",
+ "RFC4291",
+ "RFC5952",
+ "RFC6068",
+ "RFC6455",
+ "RFC6874"
+ ],
+ "author": "Gary Court <gary.court@gmail.com>",
+ "license": "BSD-2-Clause",
+ "bugs": {
+ "url": "https://github.com/garycourt/uri-js/issues"
+ },
+ "homepage": "https://github.com/garycourt/uri-js",
+ "devDependencies": {
+ "babel-cli": "^6.26.0",
+ "babel-plugin-external-helpers": "^6.22.0",
+ "babel-preset-latest": "^6.24.1",
+ "mocha": "^8.2.1",
+ "mocha-qunit-ui": "^0.1.3",
+ "rollup": "^0.41.6",
+ "rollup-plugin-babel": "^2.7.1",
+ "rollup-plugin-node-resolve": "^2.0.0",
+ "sorcery": "^0.10.0",
+ "typescript": "^2.8.1",
+ "uglify-js": "^2.8.14"
+ },
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+}
diff --git a/node_modules/uri-js/yarn.lock b/node_modules/uri-js/yarn.lock
new file mode 100755
index 0000000..3c42ded
--- /dev/null
+++ b/node_modules/uri-js/yarn.lock
@@ -0,0 +1,2558 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@ungap/promise-all-settled@1.1.2":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
+ integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==
+
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
+ansi-colors@4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
+ integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+ integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+ansi-regex@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
+ integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+ integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
+
+ansi-styles@^3.2.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
+ansi-styles@^4.1.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
+ dependencies:
+ color-convert "^2.0.1"
+
+anymatch@^1.3.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
+ integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==
+ dependencies:
+ micromatch "^2.1.5"
+ normalize-path "^2.0.0"
+
+anymatch@~3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
+ integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
+ dependencies:
+ normalize-path "^3.0.0"
+ picomatch "^2.0.4"
+
+argparse@^1.0.7:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+ integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
+ dependencies:
+ sprintf-js "~1.0.2"
+
+arr-diff@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
+ integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=
+ dependencies:
+ arr-flatten "^1.0.1"
+
+arr-diff@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+ integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
+
+arr-flatten@^1.0.1, arr-flatten@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+ integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
+
+arr-union@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+ integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
+
+array-unique@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
+ integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=
+
+array-unique@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+ integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
+
+assign-symbols@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+ integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+
+async-each@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf"
+ integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==
+
+atob@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
+ integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+
+babel-cli@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1"
+ integrity sha1-UCq1SHTX24itALiHoGODzgPQAvE=
+ dependencies:
+ babel-core "^6.26.0"
+ babel-polyfill "^6.26.0"
+ babel-register "^6.26.0"
+ babel-runtime "^6.26.0"
+ commander "^2.11.0"
+ convert-source-map "^1.5.0"
+ fs-readdir-recursive "^1.0.0"
+ glob "^7.1.2"
+ lodash "^4.17.4"
+ output-file-sync "^1.1.2"
+ path-is-absolute "^1.0.1"
+ slash "^1.0.0"
+ source-map "^0.5.6"
+ v8flags "^2.1.1"
+ optionalDependencies:
+ chokidar "^1.6.1"
+
+babel-code-frame@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
+ integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=
+ dependencies:
+ chalk "^1.1.3"
+ esutils "^2.0.2"
+ js-tokens "^3.0.2"
+
+babel-core@6:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8"
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-generator "^6.26.0"
+ babel-helpers "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-register "^6.26.0"
+ babel-runtime "^6.26.0"
+ babel-template "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ convert-source-map "^1.5.0"
+ debug "^2.6.8"
+ json5 "^0.5.1"
+ lodash "^4.17.4"
+ minimatch "^3.0.4"
+ path-is-absolute "^1.0.1"
+ private "^0.1.7"
+ slash "^1.0.0"
+ source-map "^0.5.6"
+
+babel-core@^6.26.0:
+ version "6.26.3"
+ resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
+ integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-generator "^6.26.0"
+ babel-helpers "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-register "^6.26.0"
+ babel-runtime "^6.26.0"
+ babel-template "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ convert-source-map "^1.5.1"
+ debug "^2.6.9"
+ json5 "^0.5.1"
+ lodash "^4.17.4"
+ minimatch "^3.0.4"
+ path-is-absolute "^1.0.1"
+ private "^0.1.8"
+ slash "^1.0.0"
+ source-map "^0.5.7"
+
+babel-generator@^6.26.0:
+ version "6.26.1"
+ resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
+ integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==
+ dependencies:
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ detect-indent "^4.0.0"
+ jsesc "^1.3.0"
+ lodash "^4.17.4"
+ source-map "^0.5.7"
+ trim-right "^1.0.1"
+
+babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664"
+ dependencies:
+ babel-helper-explode-assignable-expression "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-call-delegate@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
+ dependencies:
+ babel-helper-hoist-variables "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-define-map@^6.24.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ lodash "^4.17.4"
+
+babel-helper-explode-assignable-expression@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-function-name@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
+ dependencies:
+ babel-helper-get-function-arity "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-get-function-arity@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-hoist-variables@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-optimise-call-expression@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-helper-regex@^6.24.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72"
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ lodash "^4.17.4"
+
+babel-helper-remap-async-to-generator@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helper-replace-supers@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
+ dependencies:
+ babel-helper-optimise-call-expression "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-helpers@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
+ integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-messages@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
+ integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-check-es2015-constants@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-external-helpers@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-syntax-async-functions@^6.8.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
+
+babel-plugin-syntax-exponentiation-operator@^6.8.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
+
+babel-plugin-syntax-trailing-function-commas@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
+
+babel-plugin-transform-async-to-generator@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
+ dependencies:
+ babel-helper-remap-async-to-generator "^6.24.1"
+ babel-plugin-syntax-async-functions "^6.8.0"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-arrow-functions@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoping@^6.24.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-template "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ lodash "^4.17.4"
+
+babel-plugin-transform-es2015-classes@^6.24.1, babel-plugin-transform-es2015-classes@^6.9.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
+ dependencies:
+ babel-helper-define-map "^6.24.1"
+ babel-helper-function-name "^6.24.1"
+ babel-helper-optimise-call-expression "^6.24.1"
+ babel-helper-replace-supers "^6.24.1"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-computed-properties@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-destructuring@^6.22.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-for-of@^6.22.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-function-name@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-literals@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-modules-amd@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
+ dependencies:
+ babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a"
+ dependencies:
+ babel-plugin-transform-strict-mode "^6.24.1"
+ babel-runtime "^6.26.0"
+ babel-template "^6.26.0"
+ babel-types "^6.26.0"
+
+babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
+ dependencies:
+ babel-helper-hoist-variables "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-umd@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
+ dependencies:
+ babel-plugin-transform-es2015-modules-amd "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-object-super@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
+ dependencies:
+ babel-helper-replace-supers "^6.24.1"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-parameters@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
+ dependencies:
+ babel-helper-call-delegate "^6.24.1"
+ babel-helper-get-function-arity "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-spread@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-sticky-regex@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
+ dependencies:
+ babel-helper-regex "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-template-literals@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-typeof-symbol@^6.22.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-unicode-regex@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
+ dependencies:
+ babel-helper-regex "^6.24.1"
+ babel-runtime "^6.22.0"
+ regexpu-core "^2.0.0"
+
+babel-plugin-transform-exponentiation-operator@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e"
+ dependencies:
+ babel-helper-builder-binary-assignment-operator-visitor "^6.24.1"
+ babel-plugin-syntax-exponentiation-operator "^6.8.0"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-regenerator@^6.24.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
+ dependencies:
+ regenerator-transform "^0.10.0"
+
+babel-plugin-transform-strict-mode@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-types "^6.24.1"
+
+babel-polyfill@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
+ integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=
+ dependencies:
+ babel-runtime "^6.26.0"
+ core-js "^2.5.0"
+ regenerator-runtime "^0.10.5"
+
+babel-preset-es2015@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
+ dependencies:
+ babel-plugin-check-es2015-constants "^6.22.0"
+ babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoping "^6.24.1"
+ babel-plugin-transform-es2015-classes "^6.24.1"
+ babel-plugin-transform-es2015-computed-properties "^6.24.1"
+ babel-plugin-transform-es2015-destructuring "^6.22.0"
+ babel-plugin-transform-es2015-duplicate-keys "^6.24.1"
+ babel-plugin-transform-es2015-for-of "^6.22.0"
+ babel-plugin-transform-es2015-function-name "^6.24.1"
+ babel-plugin-transform-es2015-literals "^6.22.0"
+ babel-plugin-transform-es2015-modules-amd "^6.24.1"
+ babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-systemjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-umd "^6.24.1"
+ babel-plugin-transform-es2015-object-super "^6.24.1"
+ babel-plugin-transform-es2015-parameters "^6.24.1"
+ babel-plugin-transform-es2015-shorthand-properties "^6.24.1"
+ babel-plugin-transform-es2015-spread "^6.22.0"
+ babel-plugin-transform-es2015-sticky-regex "^6.24.1"
+ babel-plugin-transform-es2015-template-literals "^6.22.0"
+ babel-plugin-transform-es2015-typeof-symbol "^6.22.0"
+ babel-plugin-transform-es2015-unicode-regex "^6.24.1"
+ babel-plugin-transform-regenerator "^6.24.1"
+
+babel-preset-es2016@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b"
+ dependencies:
+ babel-plugin-transform-exponentiation-operator "^6.24.1"
+
+babel-preset-es2017@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1"
+ dependencies:
+ babel-plugin-syntax-trailing-function-commas "^6.22.0"
+ babel-plugin-transform-async-to-generator "^6.24.1"
+
+babel-preset-latest@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8"
+ dependencies:
+ babel-preset-es2015 "^6.24.1"
+ babel-preset-es2016 "^6.24.1"
+ babel-preset-es2017 "^6.24.1"
+
+babel-register@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
+ integrity sha1-btAhFz4vy0htestFxgCahW9kcHE=
+ dependencies:
+ babel-core "^6.26.0"
+ babel-runtime "^6.26.0"
+ core-js "^2.5.0"
+ home-or-tmp "^2.0.0"
+ lodash "^4.17.4"
+ mkdirp "^0.5.1"
+ source-map-support "^0.4.15"
+
+babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
+ integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4=
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.11.0"
+
+babel-template@^6.24.1, babel-template@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
+ integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ lodash "^4.17.4"
+
+babel-traverse@^6.24.1, babel-traverse@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ debug "^2.6.8"
+ globals "^9.18.0"
+ invariant "^2.2.2"
+ lodash "^4.17.4"
+
+babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
+ dependencies:
+ babel-runtime "^6.26.0"
+ esutils "^2.0.2"
+ lodash "^4.17.4"
+ to-fast-properties "^1.0.3"
+
+babylon@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+ integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+base@^0.11.1:
+ version "0.11.2"
+ resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+ integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
+ dependencies:
+ cache-base "^1.0.1"
+ class-utils "^0.3.5"
+ component-emitter "^1.2.1"
+ define-property "^1.0.0"
+ isobject "^3.0.1"
+ mixin-deep "^1.2.0"
+ pascalcase "^0.1.1"
+
+binary-extensions@^1.0.0:
+ version "1.13.1"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
+ integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==
+
+binary-extensions@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
+ integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==
+
+bindings@^1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
+ integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
+ dependencies:
+ file-uri-to-path "1.0.0"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^1.8.2:
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+ integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=
+ dependencies:
+ expand-range "^1.8.1"
+ preserve "^0.2.0"
+ repeat-element "^1.1.2"
+
+braces@^2.3.1:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+ integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
+ dependencies:
+ arr-flatten "^1.1.0"
+ array-unique "^0.3.2"
+ extend-shallow "^2.0.1"
+ fill-range "^4.0.0"
+ isobject "^3.0.1"
+ repeat-element "^1.1.2"
+ snapdragon "^0.8.1"
+ snapdragon-node "^2.0.1"
+ split-string "^3.0.2"
+ to-regex "^3.0.1"
+
+braces@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+ dependencies:
+ fill-range "^7.0.1"
+
+browser-resolve@^1.11.0:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce"
+ dependencies:
+ resolve "1.1.7"
+
+browser-stdout@1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
+ integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
+
+buffer-crc32@^0.2.5:
+ version "0.2.13"
+ resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
+
+builtin-modules@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+
+cache-base@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+ integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
+ dependencies:
+ collection-visit "^1.0.0"
+ component-emitter "^1.2.1"
+ get-value "^2.0.6"
+ has-value "^1.0.0"
+ isobject "^3.0.1"
+ set-value "^2.0.0"
+ to-object-path "^0.3.0"
+ union-value "^1.0.0"
+ unset-value "^1.0.0"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+camelcase@^5.0.0:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
+ integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
+
+camelcase@^6.0.0:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
+ integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
+
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
+chalk@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+chalk@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
+ integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
+chokidar@3.4.3:
+ version "3.4.3"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b"
+ integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==
+ dependencies:
+ anymatch "~3.1.1"
+ braces "~3.0.2"
+ glob-parent "~5.1.0"
+ is-binary-path "~2.1.0"
+ is-glob "~4.0.1"
+ normalize-path "~3.0.0"
+ readdirp "~3.5.0"
+ optionalDependencies:
+ fsevents "~2.1.2"
+
+chokidar@^1.6.1:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
+ integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=
+ dependencies:
+ anymatch "^1.3.0"
+ async-each "^1.0.0"
+ glob-parent "^2.0.0"
+ inherits "^2.0.1"
+ is-binary-path "^1.0.0"
+ is-glob "^2.0.0"
+ path-is-absolute "^1.0.0"
+ readdirp "^2.0.0"
+ optionalDependencies:
+ fsevents "^1.0.0"
+
+class-utils@^0.3.5:
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+ integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
+ dependencies:
+ arr-union "^3.1.0"
+ define-property "^0.2.5"
+ isobject "^3.0.0"
+ static-extend "^0.1.1"
+
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+cliui@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
+ integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==
+ dependencies:
+ string-width "^3.1.0"
+ strip-ansi "^5.2.0"
+ wrap-ansi "^5.1.0"
+
+collection-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+ integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
+ dependencies:
+ map-visit "^1.0.0"
+ object-visit "^1.0.0"
+
+color-convert@^1.9.0:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
+ dependencies:
+ color-name "1.1.3"
+
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+commander@^2.11.0:
+ version "2.20.3"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
+ integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
+
+component-emitter@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
+ integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+convert-source-map@^1.5.0, convert-source-map@^1.5.1:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
+ integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==
+ dependencies:
+ safe-buffer "~5.1.1"
+
+copy-descriptor@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+ integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
+
+core-js@^2.4.0, core-js@^2.5.0:
+ version "2.6.12"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
+ integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
+
+core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+debug@4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1"
+ integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==
+ dependencies:
+ ms "2.1.2"
+
+debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+decamelize@^1.0.0, decamelize@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+
+decamelize@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837"
+ integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==
+
+decode-uri-component@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+ integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
+
+define-property@^0.2.5:
+ version "0.2.5"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+ integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
+ dependencies:
+ is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+ integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
+ dependencies:
+ is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+ integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
+ dependencies:
+ is-descriptor "^1.0.2"
+ isobject "^3.0.1"
+
+detect-indent@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
+ integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg=
+ dependencies:
+ repeating "^2.0.0"
+
+diff@4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
+ integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
+
+emoji-regex@^7.0.1:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
+ integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
+
+es6-promise@^3.1.2:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
+
+escape-string-regexp@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
+ integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
+
+escape-string-regexp@^1.0.2:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+
+esprima@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
+
+estree-walker@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
+
+esutils@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
+
+expand-brackets@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+ integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=
+ dependencies:
+ is-posix-bracket "^0.1.0"
+
+expand-brackets@^2.1.4:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+ integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
+ dependencies:
+ debug "^2.3.3"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ posix-character-classes "^0.1.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+expand-range@^1.8.1:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+ integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=
+ dependencies:
+ fill-range "^2.1.0"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+ integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
+ dependencies:
+ assign-symbols "^1.0.0"
+ is-extendable "^1.0.1"
+
+extglob@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
+ integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=
+ dependencies:
+ is-extglob "^1.0.0"
+
+extglob@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+ integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
+ dependencies:
+ array-unique "^0.3.2"
+ define-property "^1.0.0"
+ expand-brackets "^2.1.4"
+ extend-shallow "^2.0.1"
+ fragment-cache "^0.2.1"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+file-uri-to-path@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
+ integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
+
+filename-regex@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
+ integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=
+
+fill-range@^2.1.0:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
+ integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==
+ dependencies:
+ is-number "^2.1.0"
+ isobject "^2.0.0"
+ randomatic "^3.0.0"
+ repeat-element "^1.1.2"
+ repeat-string "^1.5.2"
+
+fill-range@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+ integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+ to-regex-range "^2.1.0"
+
+fill-range@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
+ dependencies:
+ to-regex-range "^5.0.1"
+
+find-up@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
+ integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
+ dependencies:
+ locate-path "^6.0.0"
+ path-exists "^4.0.0"
+
+find-up@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
+ integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
+ dependencies:
+ locate-path "^3.0.0"
+
+flat@^5.0.2:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
+ integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==
+
+for-in@^1.0.1, for-in@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+ integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
+
+for-own@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
+ integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=
+ dependencies:
+ for-in "^1.0.1"
+
+fragment-cache@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+ integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
+ dependencies:
+ map-cache "^0.2.2"
+
+fs-readdir-recursive@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27"
+ integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+fsevents@^1.0.0:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38"
+ integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==
+ dependencies:
+ bindings "^1.5.0"
+ nan "^2.12.1"
+
+fsevents@~2.1.2:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
+ integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
+
+get-caller-file@^2.0.1:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
+ integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
+
+get-value@^2.0.3, get-value@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+ integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
+
+glob-base@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+ integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=
+ dependencies:
+ glob-parent "^2.0.0"
+ is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+ integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=
+ dependencies:
+ is-glob "^2.0.0"
+
+glob-parent@~5.1.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
+ integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob@7.1.6, glob@^7.1.2, glob@^7.1.3:
+ version "7.1.6"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^9.18.0:
+ version "9.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+ integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==
+
+graceful-fs@^4.1.11, graceful-fs@^4.1.4:
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
+ integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
+
+graceful-fs@^4.1.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
+
+growl@1.10.5:
+ version "1.10.5"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
+ integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+has-value@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+ integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
+ dependencies:
+ get-value "^2.0.3"
+ has-values "^0.1.4"
+ isobject "^2.0.0"
+
+has-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+ integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
+ dependencies:
+ get-value "^2.0.6"
+ has-values "^1.0.0"
+ isobject "^3.0.0"
+
+has-values@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+ integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
+
+has-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+ integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+he@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
+ integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
+
+home-or-tmp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
+ integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg=
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.1"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@^2.0.1, inherits@~2.0.3:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+invariant@^2.2.2:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
+ dependencies:
+ loose-envify "^1.0.0"
+
+is-accessor-descriptor@^0.1.6:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+ integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+ integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-binary-path@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
+ integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=
+ dependencies:
+ binary-extensions "^1.0.0"
+
+is-binary-path@~2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
+ dependencies:
+ binary-extensions "^2.0.0"
+
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+ integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+
+is-data-descriptor@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+ integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+ integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
+ dependencies:
+ kind-of "^6.0.0"
+
+is-descriptor@^0.1.0:
+ version "0.1.6"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+ integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
+ dependencies:
+ is-accessor-descriptor "^0.1.6"
+ is-data-descriptor "^0.1.4"
+ kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+ integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
+ dependencies:
+ is-accessor-descriptor "^1.0.0"
+ is-data-descriptor "^1.0.0"
+ kind-of "^6.0.2"
+
+is-dotfile@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
+ integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=
+
+is-equal-shallow@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+ integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=
+ dependencies:
+ is-primitive "^2.0.0"
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+ integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
+
+is-extendable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+ integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
+ dependencies:
+ is-plain-object "^2.0.4"
+
+is-extglob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+ integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=
+
+is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
+
+is-finite@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3"
+ integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-glob@^2.0.0, is-glob@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+ integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=
+ dependencies:
+ is-extglob "^1.0.0"
+
+is-glob@^4.0.1, is-glob@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
+ integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-number@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+ integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
+ integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==
+
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
+
+is-plain-obj@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287"
+ integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==
+
+is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+is-posix-bracket@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+ integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=
+
+is-primitive@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+ integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU=
+
+is-windows@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+ integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
+
+isarray@1.0.0, isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+
+isobject@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
+
+"js-tokens@^3.0.0 || ^4.0.0":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+js-tokens@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+ integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
+
+js-yaml@3.14.0:
+ version "3.14.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
+ integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsesc@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+ integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s=
+
+jsesc@~0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+
+json5@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
+ integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+ integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
+ integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
+
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+locate-path@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
+ integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
+ dependencies:
+ p-locate "^3.0.0"
+ path-exists "^3.0.0"
+
+locate-path@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
+ integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
+ dependencies:
+ p-locate "^5.0.0"
+
+lodash@^4.17.4:
+ version "4.17.20"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
+ integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
+
+log-symbols@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920"
+ integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
+ dependencies:
+ chalk "^4.0.0"
+
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+loose-envify@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+ integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
+ dependencies:
+ js-tokens "^3.0.0 || ^4.0.0"
+
+map-cache@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+ integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
+
+map-visit@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+ integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
+ dependencies:
+ object-visit "^1.0.0"
+
+math-random@^1.0.1:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
+ integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==
+
+micromatch@^2.1.5:
+ version "2.3.11"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
+ integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=
+ dependencies:
+ arr-diff "^2.0.0"
+ array-unique "^0.2.1"
+ braces "^1.8.2"
+ expand-brackets "^0.1.4"
+ extglob "^0.3.1"
+ filename-regex "^2.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.1"
+ kind-of "^3.0.2"
+ normalize-path "^2.0.1"
+ object.omit "^2.0.0"
+ parse-glob "^3.0.4"
+ regex-cache "^0.4.2"
+
+micromatch@^3.1.10:
+ version "3.1.10"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+ integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ braces "^2.3.1"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ extglob "^2.0.4"
+ fragment-cache "^0.2.1"
+ kind-of "^6.0.2"
+ nanomatch "^1.2.9"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.2"
+
+minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@^1.2.0, minimist@^1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
+ integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
+
+mixin-deep@^1.2.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
+ integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
+ dependencies:
+ for-in "^1.0.2"
+ is-extendable "^1.0.1"
+
+mkdirp@^0.5.1:
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
+ integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
+ dependencies:
+ minimist "^1.2.5"
+
+mocha-qunit-ui@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/mocha-qunit-ui/-/mocha-qunit-ui-0.1.3.tgz#e3e1ff1dac33222b10cef681efd7f82664141ea9"
+
+mocha@^8.2.1:
+ version "8.2.1"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39"
+ integrity sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==
+ dependencies:
+ "@ungap/promise-all-settled" "1.1.2"
+ ansi-colors "4.1.1"
+ browser-stdout "1.3.1"
+ chokidar "3.4.3"
+ debug "4.2.0"
+ diff "4.0.2"
+ escape-string-regexp "4.0.0"
+ find-up "5.0.0"
+ glob "7.1.6"
+ growl "1.10.5"
+ he "1.2.0"
+ js-yaml "3.14.0"
+ log-symbols "4.0.0"
+ minimatch "3.0.4"
+ ms "2.1.2"
+ nanoid "3.1.12"
+ serialize-javascript "5.0.1"
+ strip-json-comments "3.1.1"
+ supports-color "7.2.0"
+ which "2.0.2"
+ wide-align "1.1.3"
+ workerpool "6.0.2"
+ yargs "13.3.2"
+ yargs-parser "13.1.2"
+ yargs-unparser "2.0.0"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+ms@2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+nan@^2.12.1:
+ version "2.14.2"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
+ integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
+
+nanoid@3.1.12:
+ version "3.1.12"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654"
+ integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==
+
+nanomatch@^1.2.9:
+ version "1.2.13"
+ resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+ integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
+ dependencies:
+ arr-diff "^4.0.0"
+ array-unique "^0.3.2"
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ fragment-cache "^0.2.1"
+ is-windows "^1.0.2"
+ kind-of "^6.0.2"
+ object.pick "^1.3.0"
+ regex-not "^1.0.0"
+ snapdragon "^0.8.1"
+ to-regex "^3.0.1"
+
+normalize-path@^2.0.0, normalize-path@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+ integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
+ dependencies:
+ remove-trailing-separator "^1.0.1"
+
+normalize-path@^3.0.0, normalize-path@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+
+object-assign@^4.1.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
+
+object-copy@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+ integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
+ dependencies:
+ copy-descriptor "^0.1.0"
+ define-property "^0.2.5"
+ kind-of "^3.0.3"
+
+object-visit@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+ integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
+ dependencies:
+ isobject "^3.0.0"
+
+object.omit@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
+ integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=
+ dependencies:
+ for-own "^0.1.4"
+ is-extendable "^0.1.1"
+
+object.pick@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+ integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
+ dependencies:
+ isobject "^3.0.1"
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+os-homedir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+ integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
+
+os-tmpdir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+output-file-sync@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76"
+ integrity sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=
+ dependencies:
+ graceful-fs "^4.1.4"
+ mkdirp "^0.5.1"
+ object-assign "^4.1.0"
+
+p-limit@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
+ integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
+ dependencies:
+ p-try "^2.0.0"
+
+p-limit@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
+ integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
+ dependencies:
+ yocto-queue "^0.1.0"
+
+p-locate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
+ integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
+ dependencies:
+ p-limit "^2.0.0"
+
+p-locate@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
+ integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
+ dependencies:
+ p-limit "^3.0.2"
+
+p-try@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
+ integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
+
+parse-glob@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+ integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw=
+ dependencies:
+ glob-base "^0.3.0"
+ is-dotfile "^1.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.0"
+
+pascalcase@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+ integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
+
+path-exists@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
+ integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
+
+path-exists@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
+
+path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+path-parse@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
+
+picomatch@^2.0.4, picomatch@^2.2.1:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
+ integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
+
+posix-character-classes@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+ integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
+
+preserve@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+ integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
+
+private@^0.1.6, private@^0.1.7, private@^0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
+
+process-nextick-args@~2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
+ integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
+
+punycode@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d"
+
+randomatic@^3.0.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
+ integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==
+ dependencies:
+ is-number "^4.0.0"
+ kind-of "^6.0.0"
+ math-random "^1.0.1"
+
+randombytes@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
+ integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
+ dependencies:
+ safe-buffer "^5.1.0"
+
+readable-stream@^2.0.2:
+ version "2.3.7"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
+ integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
+
+readdirp@^2.0.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
+ integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==
+ dependencies:
+ graceful-fs "^4.1.11"
+ micromatch "^3.1.10"
+ readable-stream "^2.0.2"
+
+readdirp@~3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e"
+ integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==
+ dependencies:
+ picomatch "^2.2.1"
+
+regenerate@^1.2.1:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f"
+
+regenerator-runtime@^0.10.5:
+ version "0.10.5"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"
+ integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=
+
+regenerator-runtime@^0.11.0:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+ integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
+
+regenerator-transform@^0.10.0:
+ version "0.10.1"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
+ dependencies:
+ babel-runtime "^6.18.0"
+ babel-types "^6.19.0"
+ private "^0.1.6"
+
+regex-cache@^0.4.2:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
+ integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==
+ dependencies:
+ is-equal-shallow "^0.1.3"
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+ integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
+ dependencies:
+ extend-shallow "^3.0.2"
+ safe-regex "^1.1.0"
+
+regexpu-core@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
+ dependencies:
+ regenerate "^1.2.1"
+ regjsgen "^0.2.0"
+ regjsparser "^0.1.4"
+
+regjsgen@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
+
+regjsparser@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"
+ dependencies:
+ jsesc "~0.5.0"
+
+remove-trailing-separator@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+ integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
+
+repeat-element@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
+ integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
+
+repeat-string@^1.5.2, repeat-string@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+ integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
+
+repeating@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
+ integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=
+ dependencies:
+ is-finite "^1.0.0"
+
+require-directory@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+ integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
+
+require-main-filename@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
+ integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
+
+resolve-url@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+ integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
+
+resolve@1.1.7:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
+
+resolve@^1.1.6:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c"
+ dependencies:
+ path-parse "^1.0.5"
+
+ret@~0.1.10:
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+ integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
+
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ dependencies:
+ align-text "^0.1.1"
+
+rimraf@^2.5.2:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
+ dependencies:
+ glob "^7.1.3"
+
+rollup-plugin-babel@^2.7.1:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57"
+ dependencies:
+ babel-core "6"
+ babel-plugin-transform-es2015-classes "^6.9.0"
+ object-assign "^4.1.0"
+ rollup-pluginutils "^1.5.0"
+
+rollup-plugin-node-resolve@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz#cbb783b0d15b02794d58915350b2f0d902b8ddc8"
+ dependencies:
+ browser-resolve "^1.11.0"
+ builtin-modules "^1.1.0"
+ resolve "^1.1.6"
+
+rollup-pluginutils@^1.5.0:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
+ dependencies:
+ estree-walker "^0.2.1"
+ minimatch "^3.0.2"
+
+rollup@^0.41.6:
+ version "0.41.6"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.6.tgz#e0d05497877a398c104d816d2733a718a7a94e2a"
+ dependencies:
+ source-map-support "^0.4.0"
+
+safe-buffer@^5.1.0:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+
+safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-regex@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+ integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+ dependencies:
+ ret "~0.1.10"
+
+sander@^0.5.0:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/sander/-/sander-0.5.1.tgz#741e245e231f07cafb6fdf0f133adfa216a502ad"
+ dependencies:
+ es6-promise "^3.1.2"
+ graceful-fs "^4.1.3"
+ mkdirp "^0.5.1"
+ rimraf "^2.5.2"
+
+serialize-javascript@5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4"
+ integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==
+ dependencies:
+ randombytes "^2.1.0"
+
+set-blocking@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+
+set-value@^2.0.0, set-value@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
+ integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
+ dependencies:
+ extend-shallow "^2.0.1"
+ is-extendable "^0.1.1"
+ is-plain-object "^2.0.3"
+ split-string "^3.0.1"
+
+slash@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+ integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=
+
+snapdragon-node@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+ integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
+ dependencies:
+ define-property "^1.0.0"
+ isobject "^3.0.0"
+ snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+ integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
+ dependencies:
+ kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+ integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
+ dependencies:
+ base "^0.11.1"
+ debug "^2.2.0"
+ define-property "^0.2.5"
+ extend-shallow "^2.0.1"
+ map-cache "^0.2.2"
+ source-map "^0.5.6"
+ source-map-resolve "^0.5.0"
+ use "^3.1.0"
+
+sorcery@^0.10.0:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/sorcery/-/sorcery-0.10.0.tgz#8ae90ad7d7cb05fc59f1ab0c637845d5c15a52b7"
+ dependencies:
+ buffer-crc32 "^0.2.5"
+ minimist "^1.2.0"
+ sander "^0.5.0"
+ sourcemap-codec "^1.3.0"
+
+source-map-resolve@^0.5.0:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
+ integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==
+ dependencies:
+ atob "^2.1.2"
+ decode-uri-component "^0.2.0"
+ resolve-url "^0.2.1"
+ source-map-url "^0.4.0"
+ urix "^0.1.0"
+
+source-map-support@^0.4.0, source-map-support@^0.4.15:
+ version "0.4.18"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
+ dependencies:
+ source-map "^0.5.6"
+
+source-map-url@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+ integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
+
+source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+
+sourcemap-codec@^1.3.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2"
+
+split-string@^3.0.1, split-string@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+ integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
+ dependencies:
+ extend-shallow "^3.0.0"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+ integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
+
+static-extend@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+ integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
+ dependencies:
+ define-property "^0.2.5"
+ object-copy "^0.1.0"
+
+"string-width@^1.0.2 || 2":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+string-width@^3.0.0, string-width@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
+ integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
+ dependencies:
+ emoji-regex "^7.0.1"
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^5.1.0"
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+strip-ansi@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
+ integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+ dependencies:
+ ansi-regex "^4.1.0"
+
+strip-json-comments@3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
+ integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
+
+supports-color@7.2.0, supports-color@^7.1.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+ integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
+ dependencies:
+ has-flag "^4.0.0"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+ integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
+
+to-fast-properties@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
+ integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=
+
+to-object-path@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+ integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
+ dependencies:
+ kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+ integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
+ dependencies:
+ is-number "^3.0.0"
+ repeat-string "^1.6.1"
+
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
+ dependencies:
+ is-number "^7.0.0"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+ integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
+ dependencies:
+ define-property "^2.0.2"
+ extend-shallow "^3.0.2"
+ regex-not "^1.0.2"
+ safe-regex "^1.1.0"
+
+trim-right@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
+ integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=
+
+typescript@^2.8.1:
+ version "2.8.1"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624"
+
+uglify-js@^2.8.14:
+ version "2.8.29"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+ dependencies:
+ source-map "~0.5.1"
+ yargs "~3.10.0"
+ optionalDependencies:
+ uglify-to-browserify "~1.0.0"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+
+union-value@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
+ integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
+ dependencies:
+ arr-union "^3.1.0"
+ get-value "^2.0.6"
+ is-extendable "^0.1.1"
+ set-value "^2.0.1"
+
+unset-value@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+ integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
+ dependencies:
+ has-value "^0.3.1"
+ isobject "^3.0.0"
+
+urix@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+ integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
+
+use@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
+ integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
+
+user-home@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
+ integrity sha1-K1viOjK2Onyd640PKNSFcko98ZA=
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
+
+v8flags@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
+ integrity sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=
+ dependencies:
+ user-home "^1.1.1"
+
+which-module@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
+ integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
+
+which@2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
+ dependencies:
+ isexe "^2.0.0"
+
+wide-align@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
+ integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
+ dependencies:
+ string-width "^1.0.2 || 2"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
+workerpool@6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438"
+ integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==
+
+wrap-ansi@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
+ integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==
+ dependencies:
+ ansi-styles "^3.2.0"
+ string-width "^3.0.0"
+ strip-ansi "^5.0.0"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+y18n@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
+ integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
+
+yargs-parser@13.1.2, yargs-parser@^13.1.2:
+ version "13.1.2"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"
+ integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==
+ dependencies:
+ camelcase "^5.0.0"
+ decamelize "^1.2.0"
+
+yargs-unparser@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb"
+ integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==
+ dependencies:
+ camelcase "^6.0.0"
+ decamelize "^4.0.0"
+ flat "^5.0.2"
+ is-plain-obj "^2.1.0"
+
+yargs@13.3.2:
+ version "13.3.2"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
+ integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
+ dependencies:
+ cliui "^5.0.0"
+ find-up "^3.0.0"
+ get-caller-file "^2.0.1"
+ require-directory "^2.1.1"
+ require-main-filename "^2.0.0"
+ set-blocking "^2.0.0"
+ string-width "^3.0.0"
+ which-module "^2.0.0"
+ y18n "^4.0.0"
+ yargs-parser "^13.1.2"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
+yocto-queue@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
+ integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md
new file mode 100644
index 0000000..acc8675
--- /dev/null
+++ b/node_modules/util-deprecate/History.md
@@ -0,0 +1,16 @@
+
+1.0.2 / 2015-10-07
+==================
+
+ * use try/catch when checking `localStorage` (#3, @kumavis)
+
+1.0.1 / 2014-11-25
+==================
+
+ * browser: use `console.warn()` for deprecation calls
+ * browser: more jsdocs
+
+1.0.0 / 2014-04-30
+==================
+
+ * initial commit
diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE
new file mode 100644
index 0000000..6a60e8c
--- /dev/null
+++ b/node_modules/util-deprecate/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/util-deprecate/README.md b/node_modules/util-deprecate/README.md
new file mode 100644
index 0000000..75622fa
--- /dev/null
+++ b/node_modules/util-deprecate/README.md
@@ -0,0 +1,53 @@
+util-deprecate
+==============
+### The Node.js `util.deprecate()` function with browser support
+
+In Node.js, this module simply re-exports the `util.deprecate()` function.
+
+In the web browser (i.e. via browserify), a browser-specific implementation
+of the `util.deprecate()` function is used.
+
+
+## API
+
+A `deprecate()` function is the only thing exposed by this module.
+
+``` javascript
+// setup:
+exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
+
+
+// users see:
+foo();
+// foo() is deprecated, use bar() instead
+foo();
+foo();
+```
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js
new file mode 100644
index 0000000..549ae2f
--- /dev/null
+++ b/node_modules/util-deprecate/browser.js
@@ -0,0 +1,67 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = deprecate;
+
+/**
+ * Mark that a method should not be used.
+ * Returns a modified function which warns once by default.
+ *
+ * If `localStorage.noDeprecation = true` is set, then it is a no-op.
+ *
+ * If `localStorage.throwDeprecation = true` is set, then deprecated functions
+ * will throw an Error when invoked.
+ *
+ * If `localStorage.traceDeprecation = true` is set, then deprecated functions
+ * will invoke `console.trace()` instead of `console.error()`.
+ *
+ * @param {Function} fn - the function to deprecate
+ * @param {String} msg - the string to print to the console when `fn` is invoked
+ * @returns {Function} a new "deprecated" version of `fn`
+ * @api public
+ */
+
+function deprecate (fn, msg) {
+ if (config('noDeprecation')) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (config('throwDeprecation')) {
+ throw new Error(msg);
+ } else if (config('traceDeprecation')) {
+ console.trace(msg);
+ } else {
+ console.warn(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+}
+
+/**
+ * Checks `localStorage` for boolean values for the given `name`.
+ *
+ * @param {String} name
+ * @returns {Boolean}
+ * @api private
+ */
+
+function config (name) {
+ // accessing global.localStorage can trigger a DOMException in sandboxed iframes
+ try {
+ if (!global.localStorage) return false;
+ } catch (_) {
+ return false;
+ }
+ var val = global.localStorage[name];
+ if (null == val) return false;
+ return String(val).toLowerCase() === 'true';
+}
diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js
new file mode 100644
index 0000000..5e6fcff
--- /dev/null
+++ b/node_modules/util-deprecate/node.js
@@ -0,0 +1,6 @@
+
+/**
+ * For Node.js, simply re-export the core `util.deprecate` function.
+ */
+
+module.exports = require('util').deprecate;
diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json
new file mode 100644
index 0000000..2e79f89
--- /dev/null
+++ b/node_modules/util-deprecate/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "util-deprecate",
+ "version": "1.0.2",
+ "description": "The Node.js `util.deprecate()` function with browser support",
+ "main": "node.js",
+ "browser": "browser.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/util-deprecate.git"
+ },
+ "keywords": [
+ "util",
+ "deprecate",
+ "browserify",
+ "browser",
+ "node"
+ ],
+ "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/util-deprecate/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/util-deprecate"
+}
diff --git a/node_modules/uuid/AUTHORS b/node_modules/uuid/AUTHORS
new file mode 100644
index 0000000..5a10523
--- /dev/null
+++ b/node_modules/uuid/AUTHORS
@@ -0,0 +1,5 @@
+Robert Kieffer <robert@broofa.com>
+Christoph Tavan <dev@tavan.de>
+AJ ONeal <coolaj86@gmail.com>
+Vincent Voyer <vincent@zeroload.net>
+Roman Shtylman <shtylman@gmail.com>
diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md
new file mode 100644
index 0000000..f811b8a
--- /dev/null
+++ b/node_modules/uuid/CHANGELOG.md
@@ -0,0 +1,119 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16)
+
+
+### Features
+
+* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
+
+### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19)
+
+<a name="3.3.2"></a>
+## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
+
+
+### Bug Fixes
+
+* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877))
+
+
+
+<a name="3.3.1"></a>
+## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
+
+
+### Bug Fixes
+
+* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2))
+
+
+
+<a name="3.3.0"></a>
+# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
+
+
+### Bug Fixes
+
+* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc))
+* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4))
+* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331))
+* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c))
+
+### Features
+
+* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182))
+
+
+<a name="3.2.1"></a>
+## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
+
+
+### Bug Fixes
+
+* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
+
+
+
+<a name="3.2.0"></a>
+# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
+
+
+### Bug Fixes
+
+* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824))
+* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
+
+
+### Features
+
+* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))
+
+
+# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
+
+### Bug Fixes
+
+* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183)
+* Fix typo (#178)
+* Simple typo fix (#165)
+
+### Features
+* v5 support in CLI (#197)
+* V5 support (#188)
+
+
+# 3.0.1 (2016-11-28)
+
+* split uuid versions into separate files
+
+
+# 3.0.0 (2016-11-17)
+
+* remove .parse and .unparse
+
+
+# 2.0.0
+
+* Removed uuid.BufferClass
+
+
+# 1.4.0
+
+* Improved module context detection
+* Removed public RNG functions
+
+
+# 1.3.2
+
+* Improve tests and handling of v1() options (Issue #24)
+* Expose RNG option to allow for perf testing with different generators
+
+
+# 1.3.0
+
+* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
+* Support for node.js crypto API
+* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md
new file mode 100644
index 0000000..8c84e39
--- /dev/null
+++ b/node_modules/uuid/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2010-2016 Robert Kieffer and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md
new file mode 100644
index 0000000..1752e47
--- /dev/null
+++ b/node_modules/uuid/README.md
@@ -0,0 +1,276 @@
+<!--
+ -- This file is auto-generated from README_js.md. Changes should be made there.
+ -->
+
+# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) #
+
+Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
+
+Features:
+
+* Support for version 1, 3, 4 and 5 UUIDs
+* Cross-platform
+* Uses cryptographically-strong random number APIs (when available)
+* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883))
+
+[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be
+supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.]
+
+## Quickstart - CommonJS (Recommended)
+
+```shell
+npm install uuid
+```
+
+Then generate your uuid version of choice ...
+
+Version 1 (timestamp):
+
+```javascript
+const uuidv1 = require('uuid/v1');
+uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d'
+
+```
+
+Version 3 (namespace):
+
+```javascript
+const uuidv3 = require('uuid/v3');
+
+// ... using predefined DNS namespace (for domain names)
+uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6'
+
+// ... using predefined URL namespace (for, well, URLs)
+uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138'
+
+// ... using a custom namespace
+//
+// Note: Custom namespaces should be a UUID string specific to your application!
+// E.g. the one here was generated using this modules `uuid` CLI.
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686'
+
+```
+
+Version 4 (random):
+
+```javascript
+const uuidv4 = require('uuid/v4');
+uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+
+```
+
+Version 5 (namespace):
+
+```javascript
+const uuidv5 = require('uuid/v5');
+
+// ... using predefined DNS namespace (for domain names)
+uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec'
+
+// ... using predefined URL namespace (for, well, URLs)
+uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1'
+
+// ... using a custom namespace
+//
+// Note: Custom namespaces should be a UUID string specific to your application!
+// E.g. the one here was generated using this modules `uuid` CLI.
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681'
+
+```
+
+## API
+
+### Version 1
+
+```javascript
+const uuidv1 = require('uuid/v1');
+
+// Incantations
+uuidv1();
+uuidv1(options);
+uuidv1(options, buffer, offset);
+```
+
+Generate and return a RFC4122 v1 (timestamp-based) UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+ * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
+ * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
+ * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used.
+ * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
+
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
+
+Example: Generate string UUID with fully-specified options
+
+```javascript
+const v1options = {
+ node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+ clockseq: 0x1234,
+ msecs: new Date('2011-11-01').getTime(),
+ nsecs: 5678
+};
+uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab'
+
+```
+
+Example: In-place generation of two binary IDs
+
+```javascript
+// Generate two ids in an array
+const arr = new Array();
+uuidv1(null, arr, 0); // ⇨
+ // [
+ // 44, 94, 164, 192, 64, 103,
+ // 17, 233, 146, 52, 155, 29,
+ // 235, 77, 59, 125
+ // ]
+uuidv1(null, arr, 16); // ⇨
+ // [
+ // 44, 94, 164, 192, 64, 103, 17, 233,
+ // 146, 52, 155, 29, 235, 77, 59, 125,
+ // 44, 94, 164, 193, 64, 103, 17, 233,
+ // 146, 52, 155, 29, 235, 77, 59, 125
+ // ]
+
+```
+
+### Version 3
+
+```javascript
+const uuidv3 = require('uuid/v3');
+
+// Incantations
+uuidv3(name, namespace);
+uuidv3(name, namespace, buffer);
+uuidv3(name, namespace, buffer, offset);
+```
+
+Generate and return a RFC4122 v3 UUID.
+
+* `name` - (String | Array[]) "name" to create UUID with
+* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example:
+
+```javascript
+uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424'
+
+```
+
+### Version 4
+
+```javascript
+const uuidv4 = require('uuid/v4')
+
+// Incantations
+uuidv4();
+uuidv4(options);
+uuidv4(options, buffer, offset);
+```
+
+Generate and return a RFC4122 v4 UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+ * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
+ * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255)
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example: Generate string UUID with predefined `random` values
+
+```javascript
+const v4options = {
+ random: [
+ 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
+ 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
+ ]
+};
+uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836'
+
+```
+
+Example: Generate two IDs in a single buffer
+
+```javascript
+const buffer = new Array();
+uuidv4(null, buffer, 0); // ⇨
+ // [
+ // 155, 29, 235, 77, 59,
+ // 125, 75, 173, 155, 221,
+ // 43, 13, 123, 61, 203,
+ // 109
+ // ]
+uuidv4(null, buffer, 16); // ⇨
+ // [
+ // 155, 29, 235, 77, 59, 125, 75, 173,
+ // 155, 221, 43, 13, 123, 61, 203, 109,
+ // 27, 157, 107, 205, 187, 253, 75, 45,
+ // 155, 93, 171, 141, 251, 189, 75, 237
+ // ]
+
+```
+
+### Version 5
+
+```javascript
+const uuidv5 = require('uuid/v5');
+
+// Incantations
+uuidv5(name, namespace);
+uuidv5(name, namespace, buffer);
+uuidv5(name, namespace, buffer, offset);
+```
+
+Generate and return a RFC4122 v5 UUID.
+
+* `name` - (String | Array[]) "name" to create UUID with
+* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example:
+
+```javascript
+uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b'
+
+```
+
+## Command Line
+
+UUIDs can be generated from the command line with the `uuid` command.
+
+```shell
+$ uuid
+ddeb27fb-d9a0-4624-be4d-4615062daed4
+
+$ uuid v1
+02d37060-d446-11e7-a9fa-7bdae751ebe1
+```
+
+Type `uuid --help` for usage details
+
+## Testing
+
+```shell
+npm test
+```
+
+----
+Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file
diff --git a/node_modules/uuid/bin/uuid b/node_modules/uuid/bin/uuid
new file mode 100755
index 0000000..502626e
--- /dev/null
+++ b/node_modules/uuid/bin/uuid
@@ -0,0 +1,65 @@
+#!/usr/bin/env node
+var assert = require('assert');
+
+function usage() {
+ console.log('Usage:');
+ console.log(' uuid');
+ console.log(' uuid v1');
+ console.log(' uuid v3 <name> <namespace uuid>');
+ console.log(' uuid v4');
+ console.log(' uuid v5 <name> <namespace uuid>');
+ console.log(' uuid --help');
+ console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
+}
+
+var args = process.argv.slice(2);
+
+if (args.indexOf('--help') >= 0) {
+ usage();
+ process.exit(0);
+}
+var version = args.shift() || 'v4';
+
+switch (version) {
+ case 'v1':
+ var uuidV1 = require('../v1');
+ console.log(uuidV1());
+ break;
+
+ case 'v3':
+ var uuidV3 = require('../v3');
+
+ var name = args.shift();
+ var namespace = args.shift();
+ assert(name != null, 'v3 name not specified');
+ assert(namespace != null, 'v3 namespace not specified');
+
+ if (namespace == 'URL') namespace = uuidV3.URL;
+ if (namespace == 'DNS') namespace = uuidV3.DNS;
+
+ console.log(uuidV3(name, namespace));
+ break;
+
+ case 'v4':
+ var uuidV4 = require('../v4');
+ console.log(uuidV4());
+ break;
+
+ case 'v5':
+ var uuidV5 = require('../v5');
+
+ var name = args.shift();
+ var namespace = args.shift();
+ assert(name != null, 'v5 name not specified');
+ assert(namespace != null, 'v5 namespace not specified');
+
+ if (namespace == 'URL') namespace = uuidV5.URL;
+ if (namespace == 'DNS') namespace = uuidV5.DNS;
+
+ console.log(uuidV5(name, namespace));
+ break;
+
+ default:
+ usage();
+ process.exit(1);
+}
diff --git a/node_modules/uuid/index.js b/node_modules/uuid/index.js
new file mode 100644
index 0000000..e96791a
--- /dev/null
+++ b/node_modules/uuid/index.js
@@ -0,0 +1,8 @@
+var v1 = require('./v1');
+var v4 = require('./v4');
+
+var uuid = v4;
+uuid.v1 = v1;
+uuid.v4 = v4;
+
+module.exports = uuid;
diff --git a/node_modules/uuid/lib/bytesToUuid.js b/node_modules/uuid/lib/bytesToUuid.js
new file mode 100644
index 0000000..24b6041
--- /dev/null
+++ b/node_modules/uuid/lib/bytesToUuid.js
@@ -0,0 +1,26 @@
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+var byteToHex = [];
+for (var i = 0; i < 256; ++i) {
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
+}
+
+function bytesToUuid(buf, offset) {
+ var i = offset || 0;
+ var bth = byteToHex;
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
+ return ([
+ bth[buf[i++]], bth[buf[i++]],
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]], '-',
+ bth[buf[i++]], bth[buf[i++]],
+ bth[buf[i++]], bth[buf[i++]],
+ bth[buf[i++]], bth[buf[i++]]
+ ]).join('');
+}
+
+module.exports = bytesToUuid;
diff --git a/node_modules/uuid/lib/md5-browser.js b/node_modules/uuid/lib/md5-browser.js
new file mode 100644
index 0000000..9b3b6c7
--- /dev/null
+++ b/node_modules/uuid/lib/md5-browser.js
@@ -0,0 +1,216 @@
+/*
+ * Browser-compatible JavaScript MD5
+ *
+ * Modification of JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * https://opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+'use strict';
+
+function md5(bytes) {
+ if (typeof(bytes) == 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+ bytes = new Array(msg.length);
+ for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i);
+ }
+
+ return md5ToHexEncodedArray(
+ wordsToMd5(
+ bytesToWords(bytes)
+ , bytes.length * 8)
+ );
+}
+
+
+/*
+* Convert an array of little-endian words to an array of bytes
+*/
+function md5ToHexEncodedArray(input) {
+ var i;
+ var x;
+ var output = [];
+ var length32 = input.length * 32;
+ var hexTab = '0123456789abcdef';
+ var hex;
+
+ for (i = 0; i < length32; i += 8) {
+ x = (input[i >> 5] >>> (i % 32)) & 0xFF;
+
+ hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16);
+
+ output.push(hex);
+ }
+ return output;
+}
+
+/*
+* Calculate the MD5 of an array of little-endian words, and a bit length.
+*/
+function wordsToMd5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << (len % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var i;
+ var olda;
+ var oldb;
+ var oldc;
+ var oldd;
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+
+ var d = 271733878;
+
+ for (i = 0; i < x.length; i += 16) {
+ olda = a;
+ oldb = b;
+ oldc = c;
+ oldd = d;
+
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+
+ a = safeAdd(a, olda);
+ b = safeAdd(b, oldb);
+ c = safeAdd(c, oldc);
+ d = safeAdd(d, oldd);
+ }
+ return [a, b, c, d];
+}
+
+/*
+* Convert an array bytes to an array of little-endian words
+* Characters >255 have their high-byte silently ignored.
+*/
+function bytesToWords(input) {
+ var i;
+ var output = [];
+ output[(input.length >> 2) - 1] = undefined;
+ for (i = 0; i < output.length; i += 1) {
+ output[i] = 0;
+ }
+ var length8 = input.length * 8;
+ for (i = 0; i < length8; i += 8) {
+ output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32);
+ }
+
+ return output;
+}
+
+/*
+* Add integers, wrapping at 2^32. This uses 16-bit operations internally
+* to work around bugs in some JS interpreters.
+*/
+function safeAdd(x, y) {
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+* Bitwise rotate a 32-bit number to the left.
+*/
+function bitRotateLeft(num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+* These functions implement the four basic operations the algorithm uses.
+*/
+function md5cmn(q, a, b, x, s, t) {
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
+}
+function md5ff(a, b, c, d, x, s, t) {
+ return md5cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5gg(a, b, c, d, x, s, t) {
+ return md5cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5hh(a, b, c, d, x, s, t) {
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5ii(a, b, c, d, x, s, t) {
+ return md5cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+module.exports = md5;
diff --git a/node_modules/uuid/lib/md5.js b/node_modules/uuid/lib/md5.js
new file mode 100644
index 0000000..7044b87
--- /dev/null
+++ b/node_modules/uuid/lib/md5.js
@@ -0,0 +1,25 @@
+'use strict';
+
+var crypto = require('crypto');
+
+function md5(bytes) {
+ if (typeof Buffer.from === 'function') {
+ // Modern Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ } else {
+ // Pre-v4 Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = new Buffer(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = new Buffer(bytes, 'utf8');
+ }
+ }
+
+ return crypto.createHash('md5').update(bytes).digest();
+}
+
+module.exports = md5;
diff --git a/node_modules/uuid/lib/rng-browser.js b/node_modules/uuid/lib/rng-browser.js
new file mode 100644
index 0000000..6361fb8
--- /dev/null
+++ b/node_modules/uuid/lib/rng-browser.js
@@ -0,0 +1,34 @@
+// Unique ID creation requires a high quality random # generator. In the
+// browser this is a little complicated due to unknown quality of Math.random()
+// and inconsistent support for the `crypto` API. We do the best we can via
+// feature-detection
+
+// getRandomValues needs to be invoked in a context where "this" is a Crypto
+// implementation. Also, find the complete implementation of crypto on IE11.
+var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
+ (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
+
+if (getRandomValues) {
+ // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
+ var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
+
+ module.exports = function whatwgRNG() {
+ getRandomValues(rnds8);
+ return rnds8;
+ };
+} else {
+ // Math.random()-based (RNG)
+ //
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
+ // quality.
+ var rnds = new Array(16);
+
+ module.exports = function mathRNG() {
+ for (var i = 0, r; i < 16; i++) {
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
+ rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
+ }
+
+ return rnds;
+ };
+}
diff --git a/node_modules/uuid/lib/rng.js b/node_modules/uuid/lib/rng.js
new file mode 100644
index 0000000..58f0dc9
--- /dev/null
+++ b/node_modules/uuid/lib/rng.js
@@ -0,0 +1,8 @@
+// Unique ID creation requires a high quality random # generator. In node.js
+// this is pretty straight-forward - we use the crypto API.
+
+var crypto = require('crypto');
+
+module.exports = function nodeRNG() {
+ return crypto.randomBytes(16);
+};
diff --git a/node_modules/uuid/lib/sha1-browser.js b/node_modules/uuid/lib/sha1-browser.js
new file mode 100644
index 0000000..5758ed7
--- /dev/null
+++ b/node_modules/uuid/lib/sha1-browser.js
@@ -0,0 +1,89 @@
+// Adapted from Chris Veness' SHA1 code at
+// http://www.movable-type.co.uk/scripts/sha1.html
+'use strict';
+
+function f(s, x, y, z) {
+ switch (s) {
+ case 0: return (x & y) ^ (~x & z);
+ case 1: return x ^ y ^ z;
+ case 2: return (x & y) ^ (x & z) ^ (y & z);
+ case 3: return x ^ y ^ z;
+ }
+}
+
+function ROTL(x, n) {
+ return (x << n) | (x>>> (32 - n));
+}
+
+function sha1(bytes) {
+ var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
+ var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
+
+ if (typeof(bytes) == 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+ bytes = new Array(msg.length);
+ for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i);
+ }
+
+ bytes.push(0x80);
+
+ var l = bytes.length/4 + 2;
+ var N = Math.ceil(l/16);
+ var M = new Array(N);
+
+ for (var i=0; i<N; i++) {
+ M[i] = new Array(16);
+ for (var j=0; j<16; j++) {
+ M[i][j] =
+ bytes[i * 64 + j * 4] << 24 |
+ bytes[i * 64 + j * 4 + 1] << 16 |
+ bytes[i * 64 + j * 4 + 2] << 8 |
+ bytes[i * 64 + j * 4 + 3];
+ }
+ }
+
+ M[N - 1][14] = ((bytes.length - 1) * 8) /
+ Math.pow(2, 32); M[N - 1][14] = Math.floor(M[N - 1][14]);
+ M[N - 1][15] = ((bytes.length - 1) * 8) & 0xffffffff;
+
+ for (var i=0; i<N; i++) {
+ var W = new Array(80);
+
+ for (var t=0; t<16; t++) W[t] = M[i][t];
+ for (var t=16; t<80; t++) {
+ W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
+ }
+
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+
+ for (var t=0; t<80; t++) {
+ var s = Math.floor(t/20);
+ var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
+ e = d;
+ d = c;
+ c = ROTL(b, 30) >>> 0;
+ b = a;
+ a = T;
+ }
+
+ H[0] = (H[0] + a) >>> 0;
+ H[1] = (H[1] + b) >>> 0;
+ H[2] = (H[2] + c) >>> 0;
+ H[3] = (H[3] + d) >>> 0;
+ H[4] = (H[4] + e) >>> 0;
+ }
+
+ return [
+ H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff,
+ H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff,
+ H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff,
+ H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff,
+ H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff
+ ];
+}
+
+module.exports = sha1;
diff --git a/node_modules/uuid/lib/sha1.js b/node_modules/uuid/lib/sha1.js
new file mode 100644
index 0000000..0b54b25
--- /dev/null
+++ b/node_modules/uuid/lib/sha1.js
@@ -0,0 +1,25 @@
+'use strict';
+
+var crypto = require('crypto');
+
+function sha1(bytes) {
+ if (typeof Buffer.from === 'function') {
+ // Modern Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ } else {
+ // Pre-v4 Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = new Buffer(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = new Buffer(bytes, 'utf8');
+ }
+ }
+
+ return crypto.createHash('sha1').update(bytes).digest();
+}
+
+module.exports = sha1;
diff --git a/node_modules/uuid/lib/v35.js b/node_modules/uuid/lib/v35.js
new file mode 100644
index 0000000..8b066cc
--- /dev/null
+++ b/node_modules/uuid/lib/v35.js
@@ -0,0 +1,57 @@
+var bytesToUuid = require('./bytesToUuid');
+
+function uuidToBytes(uuid) {
+ // Note: We assume we're being passed a valid uuid string
+ var bytes = [];
+ uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) {
+ bytes.push(parseInt(hex, 16));
+ });
+
+ return bytes;
+}
+
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+ var bytes = new Array(str.length);
+ for (var i = 0; i < str.length; i++) {
+ bytes[i] = str.charCodeAt(i);
+ }
+ return bytes;
+}
+
+module.exports = function(name, version, hashfunc) {
+ var generateUUID = function(value, namespace, buf, offset) {
+ var off = buf && offset || 0;
+
+ if (typeof(value) == 'string') value = stringToBytes(value);
+ if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace);
+
+ if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');
+ if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values');
+
+ // Per 4.3
+ var bytes = hashfunc(namespace.concat(value));
+ bytes[6] = (bytes[6] & 0x0f) | version;
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
+
+ if (buf) {
+ for (var idx = 0; idx < 16; ++idx) {
+ buf[off+idx] = bytes[idx];
+ }
+ }
+
+ return buf || bytesToUuid(bytes);
+ };
+
+ // Function#name is not settable on some platforms (#270)
+ try {
+ generateUUID.name = name;
+ } catch (err) {
+ }
+
+ // Pre-defined namespaces, per Appendix C
+ generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+ generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+
+ return generateUUID;
+};
diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json
new file mode 100644
index 0000000..efc07b8
--- /dev/null
+++ b/node_modules/uuid/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "uuid",
+ "version": "3.4.0",
+ "description": "RFC4122 (v1, v4, and v5) UUIDs",
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
+ "keywords": [
+ "uuid",
+ "guid",
+ "rfc4122"
+ ],
+ "license": "MIT",
+ "bin": {
+ "uuid": "./bin/uuid"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "~8.2.0",
+ "@commitlint/config-conventional": "~8.2.0",
+ "eslint": "~6.4.0",
+ "husky": "~3.0.5",
+ "mocha": "6.2.0",
+ "runmd": "1.2.1",
+ "standard-version": "7.0.0"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "test": "npm run lint && mocha test/test.js",
+ "md": "runmd --watch --output=README.md README_js.md",
+ "release": "standard-version",
+ "prepare": "runmd --output=README.md README_js.md"
+ },
+ "browser": {
+ "./lib/rng.js": "./lib/rng-browser.js",
+ "./lib/sha1.js": "./lib/sha1-browser.js",
+ "./lib/md5.js": "./lib/md5-browser.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/uuidjs/uuid.git"
+ },
+ "husky": {
+ "hooks": {
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
+ }
+ }
+}
diff --git a/node_modules/uuid/v1.js b/node_modules/uuid/v1.js
new file mode 100644
index 0000000..8c245de
--- /dev/null
+++ b/node_modules/uuid/v1.js
@@ -0,0 +1,109 @@
+var rng = require('./lib/rng');
+var bytesToUuid = require('./lib/bytesToUuid');
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+var _nodeId;
+var _clockseq;
+
+// Previous uuid creation time
+var _lastMSecs = 0;
+var _lastNSecs = 0;
+
+// See https://github.com/uuidjs/uuid for API details
+function v1(options, buf, offset) {
+ var i = buf && offset || 0;
+ var b = buf || [];
+
+ options = options || {};
+ var node = options.node || _nodeId;
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
+
+ // node and clockseq need to be initialized to random values if they're not
+ // specified. We do this lazily to minimize issues related to insufficient
+ // system entropy. See #189
+ if (node == null || clockseq == null) {
+ var seedBytes = rng();
+ if (node == null) {
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+ node = _nodeId = [
+ seedBytes[0] | 0x01,
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
+ ];
+ }
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ }
+ }
+
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
+ }
+
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ for (var n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+
+ return buf ? buf : bytesToUuid(b);
+}
+
+module.exports = v1;
diff --git a/node_modules/uuid/v3.js b/node_modules/uuid/v3.js
new file mode 100644
index 0000000..ee7e14c
--- /dev/null
+++ b/node_modules/uuid/v3.js
@@ -0,0 +1,4 @@
+var v35 = require('./lib/v35.js');
+var md5 = require('./lib/md5');
+
+module.exports = v35('v3', 0x30, md5); \ No newline at end of file
diff --git a/node_modules/uuid/v4.js b/node_modules/uuid/v4.js
new file mode 100644
index 0000000..1f07be1
--- /dev/null
+++ b/node_modules/uuid/v4.js
@@ -0,0 +1,29 @@
+var rng = require('./lib/rng');
+var bytesToUuid = require('./lib/bytesToUuid');
+
+function v4(options, buf, offset) {
+ var i = buf && offset || 0;
+
+ if (typeof(options) == 'string') {
+ buf = options === 'binary' ? new Array(16) : null;
+ options = null;
+ }
+ options = options || {};
+
+ var rnds = options.random || (options.rng || rng)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ for (var ii = 0; ii < 16; ++ii) {
+ buf[i + ii] = rnds[ii];
+ }
+ }
+
+ return buf || bytesToUuid(rnds);
+}
+
+module.exports = v4;
diff --git a/node_modules/uuid/v5.js b/node_modules/uuid/v5.js
new file mode 100644
index 0000000..4945baf
--- /dev/null
+++ b/node_modules/uuid/v5.js
@@ -0,0 +1,3 @@
+var v35 = require('./lib/v35.js');
+var sha1 = require('./lib/sha1');
+module.exports = v35('v5', 0x50, sha1);
diff --git a/node_modules/validate-npm-package-license/LICENSE b/node_modules/validate-npm-package-license/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/node_modules/validate-npm-package-license/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/validate-npm-package-license/README.md b/node_modules/validate-npm-package-license/README.md
new file mode 100644
index 0000000..702bc7b
--- /dev/null
+++ b/node_modules/validate-npm-package-license/README.md
@@ -0,0 +1,113 @@
+validate-npm-package-license
+============================
+
+Give me a string and I'll tell you if it's a valid npm package license string.
+
+```javascript
+var valid = require('validate-npm-package-license');
+```
+
+SPDX license identifiers are valid license strings:
+
+```javascript
+
+var assert = require('assert');
+var validSPDXExpression = {
+ validForNewPackages: true,
+ validForOldPackages: true,
+ spdx: true
+};
+
+assert.deepEqual(valid('MIT'), validSPDXExpression);
+assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression);
+assert.deepEqual(valid('Apache-2.0'), validSPDXExpression);
+assert.deepEqual(valid('ISC'), validSPDXExpression);
+```
+The function will return a warning and suggestion for nearly-correct license identifiers:
+
+```javascript
+assert.deepEqual(
+ valid('Apache 2.0'),
+ {
+ validForOldPackages: false,
+ validForNewPackages: false,
+ warnings: [
+ 'license should be ' +
+ 'a valid SPDX license expression (without "LicenseRef"), ' +
+ '"UNLICENSED", or ' +
+ '"SEE LICENSE IN <filename>"',
+ 'license is similar to the valid expression "Apache-2.0"'
+ ]
+ }
+);
+```
+
+SPDX expressions are valid, too ...
+
+```javascript
+// Simple SPDX license expression for dual licensing
+assert.deepEqual(
+ valid('(GPL-3.0-only OR BSD-2-Clause)'),
+ validSPDXExpression
+);
+```
+
+... except if they contain `LicenseRef`:
+
+```javascript
+var warningAboutLicenseRef = {
+ validForOldPackages: false,
+ validForNewPackages: false,
+ spdx: true,
+ warnings: [
+ 'license should be ' +
+ 'a valid SPDX license expression (without "LicenseRef"), ' +
+ '"UNLICENSED", or ' +
+ '"SEE LICENSE IN <filename>"',
+ ]
+};
+
+assert.deepEqual(
+ valid('LicenseRef-Made-Up'),
+ warningAboutLicenseRef
+);
+
+assert.deepEqual(
+ valid('(MIT OR LicenseRef-Made-Up)'),
+ warningAboutLicenseRef
+);
+```
+
+If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there:
+
+```javascript
+assert.deepEqual(
+ valid('SEE LICENSE IN LICENSE.txt'),
+ {
+ validForNewPackages: true,
+ validForOldPackages: true,
+ inFile: 'LICENSE.txt'
+ }
+);
+
+assert.deepEqual(
+ valid('SEE LICENSE IN license.md'),
+ {
+ validForNewPackages: true,
+ validForOldPackages: true,
+ inFile: 'license.md'
+ }
+);
+```
+
+If there aren't any licensing terms, use `UNLICENSED`:
+
+```javascript
+var unlicensed = {
+ validForNewPackages: true,
+ validForOldPackages: true,
+ unlicensed: true
+};
+assert.deepEqual(valid('UNLICENSED'), unlicensed);
+assert.deepEqual(valid('UNLICENCED'), unlicensed);
+```
diff --git a/node_modules/validate-npm-package-license/index.js b/node_modules/validate-npm-package-license/index.js
new file mode 100644
index 0000000..35eaa73
--- /dev/null
+++ b/node_modules/validate-npm-package-license/index.js
@@ -0,0 +1,86 @@
+var parse = require('spdx-expression-parse');
+var correct = require('spdx-correct');
+
+var genericWarning = (
+ 'license should be ' +
+ 'a valid SPDX license expression (without "LicenseRef"), ' +
+ '"UNLICENSED", or ' +
+ '"SEE LICENSE IN <filename>"'
+);
+
+var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/;
+
+function startsWith(prefix, string) {
+ return string.slice(0, prefix.length) === prefix;
+}
+
+function usesLicenseRef(ast) {
+ if (ast.hasOwnProperty('license')) {
+ var license = ast.license;
+ return (
+ startsWith('LicenseRef', license) ||
+ startsWith('DocumentRef', license)
+ );
+ } else {
+ return (
+ usesLicenseRef(ast.left) ||
+ usesLicenseRef(ast.right)
+ );
+ }
+}
+
+module.exports = function(argument) {
+ var ast;
+
+ try {
+ ast = parse(argument);
+ } catch (e) {
+ var match
+ if (
+ argument === 'UNLICENSED' ||
+ argument === 'UNLICENCED'
+ ) {
+ return {
+ validForOldPackages: true,
+ validForNewPackages: true,
+ unlicensed: true
+ };
+ } else if (match = fileReferenceRE.exec(argument)) {
+ return {
+ validForOldPackages: true,
+ validForNewPackages: true,
+ inFile: match[1]
+ };
+ } else {
+ var result = {
+ validForOldPackages: false,
+ validForNewPackages: false,
+ warnings: [genericWarning]
+ };
+ if (argument.trim().length !== 0) {
+ var corrected = correct(argument);
+ if (corrected) {
+ result.warnings.push(
+ 'license is similar to the valid expression "' + corrected + '"'
+ );
+ }
+ }
+ return result;
+ }
+ }
+
+ if (usesLicenseRef(ast)) {
+ return {
+ validForNewPackages: false,
+ validForOldPackages: false,
+ spdx: true,
+ warnings: [genericWarning]
+ };
+ } else {
+ return {
+ validForNewPackages: true,
+ validForOldPackages: true,
+ spdx: true
+ };
+ }
+};
diff --git a/node_modules/validate-npm-package-license/package.json b/node_modules/validate-npm-package-license/package.json
new file mode 100644
index 0000000..9e92af4
--- /dev/null
+++ b/node_modules/validate-npm-package-license/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "validate-npm-package-license",
+ "description": "Give me a string and I'll tell you if it's a valid npm package license string",
+ "version": "3.0.4",
+ "author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)",
+ "contributors": [
+ "Mark Stacey <markjstacey@gmail.com>"
+ ],
+ "dependencies": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ },
+ "devDependencies": {
+ "defence-cli": "^2.0.1",
+ "replace-require-self": "^1.0.0"
+ },
+ "keywords": [
+ "license",
+ "npm",
+ "package",
+ "validation"
+ ],
+ "license": "Apache-2.0",
+ "repository": "kemitchell/validate-npm-package-license.js",
+ "scripts": {
+ "test": "defence README.md | replace-require-self | node"
+ }
+}
diff --git a/node_modules/verror/.npmignore b/node_modules/verror/.npmignore
new file mode 100644
index 0000000..f14aec8
--- /dev/null
+++ b/node_modules/verror/.npmignore
@@ -0,0 +1,9 @@
+.gitignore
+.gitmodules
+deps
+examples
+experiments
+jsl.node.conf
+Makefile
+Makefile.targ
+test
diff --git a/node_modules/verror/CHANGES.md b/node_modules/verror/CHANGES.md
new file mode 100644
index 0000000..bbb745a
--- /dev/null
+++ b/node_modules/verror/CHANGES.md
@@ -0,0 +1,28 @@
+# Changelog
+
+## Not yet released
+
+None yet.
+
+## v1.10.0
+
+* #49 want convenience functions for MultiErrors
+
+## v1.9.0
+
+* #47 could use VError.hasCauseWithName()
+
+## v1.8.1
+
+* #39 captureStackTrace lost when inheriting from WError
+
+## v1.8.0
+
+* #23 Preserve original stack trace(s)
+
+## v1.7.0
+
+* #10 better support for extra properties on Errors
+* #11 make it easy to find causes of a particular kind
+* #29 No documentation on how to Install this package
+* #36 elide development-only files from npm package
diff --git a/node_modules/verror/CONTRIBUTING.md b/node_modules/verror/CONTRIBUTING.md
new file mode 100644
index 0000000..750cef8
--- /dev/null
+++ b/node_modules/verror/CONTRIBUTING.md
@@ -0,0 +1,19 @@
+# Contributing
+
+This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new
+changes. Anyone can submit changes. To get started, see the [cr.joyent.us user
+guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md).
+This repo does not use GitHub pull requests.
+
+See the [Joyent Engineering
+Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general
+best practices expected in this repository.
+
+Contributions should be "make prepush" clean. The "prepush" target runs the
+"check" target, which requires these separate tools:
+
+* https://github.com/davepacheco/jsstyle
+* https://github.com/davepacheco/javascriptlint
+
+If you're changing something non-trivial or user-facing, you may want to submit
+an issue first.
diff --git a/node_modules/verror/LICENSE b/node_modules/verror/LICENSE
new file mode 100644
index 0000000..82a5cb8
--- /dev/null
+++ b/node_modules/verror/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2016, Joyent, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE
diff --git a/node_modules/verror/README.md b/node_modules/verror/README.md
new file mode 100644
index 0000000..c1f0635
--- /dev/null
+++ b/node_modules/verror/README.md
@@ -0,0 +1,528 @@
+# verror: rich JavaScript errors
+
+This module provides several classes in support of Joyent's [Best Practices for
+Error Handling in Node.js](http://www.joyent.com/developers/node/design/errors).
+If you find any of the behavior here confusing or surprising, check out that
+document first.
+
+The error classes here support:
+
+* printf-style arguments for the message
+* chains of causes
+* properties to provide extra information about the error
+* creating your own subclasses that support all of these
+
+The classes here are:
+
+* **VError**, for chaining errors while preserving each one's error message.
+ This is useful in servers and command-line utilities when you want to
+ propagate an error up a call stack, but allow various levels to add their own
+ context. See examples below.
+* **WError**, for wrapping errors while hiding the lower-level messages from the
+ top-level error. This is useful for API endpoints where you don't want to
+ expose internal error messages, but you still want to preserve the error chain
+ for logging and debugging.
+* **SError**, which is just like VError but interprets printf-style arguments
+ more strictly.
+* **MultiError**, which is just an Error that encapsulates one or more other
+ errors. (This is used for parallel operations that return several errors.)
+
+
+# Quick start
+
+First, install the package:
+
+ npm install verror
+
+If nothing else, you can use VError as a drop-in replacement for the built-in
+JavaScript Error class, with the addition of printf-style messages:
+
+```javascript
+var err = new VError('missing file: "%s"', '/etc/passwd');
+console.log(err.message);
+```
+
+This prints:
+
+ missing file: "/etc/passwd"
+
+You can also pass a `cause` argument, which is any other Error object:
+
+```javascript
+var fs = require('fs');
+var filename = '/nonexistent';
+fs.stat(filename, function (err1) {
+ var err2 = new VError(err1, 'stat "%s"', filename);
+ console.error(err2.message);
+});
+```
+
+This prints out:
+
+ stat "/nonexistent": ENOENT, stat '/nonexistent'
+
+which resembles how Unix programs typically report errors:
+
+ $ sort /nonexistent
+ sort: open failed: /nonexistent: No such file or directory
+
+To match the Unixy feel, when you print out the error, just prepend the
+program's name to the VError's `message`. Or just call
+[node-cmdutil.fail(your_verror)](https://github.com/joyent/node-cmdutil), which
+does this for you.
+
+You can get the next-level Error using `err.cause()`:
+
+```javascript
+console.error(err2.cause().message);
+```
+
+prints:
+
+ ENOENT, stat '/nonexistent'
+
+Of course, you can chain these as many times as you want, and it works with any
+kind of Error:
+
+```javascript
+var err1 = new Error('No such file or directory');
+var err2 = new VError(err1, 'failed to stat "%s"', '/junk');
+var err3 = new VError(err2, 'request failed');
+console.error(err3.message);
+```
+
+This prints:
+
+ request failed: failed to stat "/junk": No such file or directory
+
+The idea is that each layer in the stack annotates the error with a description
+of what it was doing. The end result is a message that explains what happened
+at each level.
+
+You can also decorate Error objects with additional information so that callers
+can not only handle each kind of error differently, but also construct their own
+error messages (e.g., to localize them, format them, group them by type, and so
+on). See the example below.
+
+
+# Deeper dive
+
+The two main goals for VError are:
+
+* **Make it easy to construct clear, complete error messages intended for
+ people.** Clear error messages greatly improve both user experience and
+ debuggability, so we wanted to make it easy to build them. That's why the
+ constructor takes printf-style arguments.
+* **Make it easy to construct objects with programmatically-accessible
+ metadata** (which we call _informational properties_). Instead of just saying
+ "connection refused while connecting to 192.168.1.2:80", you can add
+ properties like `"ip": "192.168.1.2"` and `"tcpPort": 80`. This can be used
+ for feeding into monitoring systems, analyzing large numbers of Errors (as
+ from a log file), or localizing error messages.
+
+To really make this useful, it also needs to be easy to compose Errors:
+higher-level code should be able to augment the Errors reported by lower-level
+code to provide a more complete description of what happened. Instead of saying
+"connection refused", you can say "operation X failed: connection refused".
+That's why VError supports `causes`.
+
+In order for all this to work, programmers need to know that it's generally safe
+to wrap lower-level Errors with higher-level ones. If you have existing code
+that handles Errors produced by a library, you should be able to wrap those
+Errors with a VError to add information without breaking the error handling
+code. There are two obvious ways that this could break such consumers:
+
+* The error's name might change. People typically use `name` to determine what
+ kind of Error they've got. To ensure compatibility, you can create VErrors
+ with custom names, but this approach isn't great because it prevents you from
+ representing complex failures. For this reason, VError provides
+ `findCauseByName`, which essentially asks: does this Error _or any of its
+ causes_ have this specific type? If error handling code uses
+ `findCauseByName`, then subsystems can construct very specific causal chains
+ for debuggability and still let people handle simple cases easily. There's an
+ example below.
+* The error's properties might change. People often hang additional properties
+ off of Error objects. If we wrap an existing Error in a new Error, those
+ properties would be lost unless we copied them. But there are a variety of
+ both standard and non-standard Error properties that should _not_ be copied in
+ this way: most obviously `name`, `message`, and `stack`, but also `fileName`,
+ `lineNumber`, and a few others. Plus, it's useful for some Error subclasses
+ to have their own private properties -- and there'd be no way to know whether
+ these should be copied. For these reasons, VError first-classes these
+ information properties. You have to provide them in the constructor, you can
+ only fetch them with the `info()` function, and VError takes care of making
+ sure properties from causes wind up in the `info()` output.
+
+Let's put this all together with an example from the node-fast RPC library.
+node-fast implements a simple RPC protocol for Node programs. There's a server
+and client interface, and clients make RPC requests to servers. Let's say the
+server fails with an UnauthorizedError with message "user 'bob' is not
+authorized". The client wraps all server errors with a FastServerError. The
+client also wraps all request errors with a FastRequestError that includes the
+name of the RPC call being made. The result of this failed RPC might look like
+this:
+
+ name: FastRequestError
+ message: "request failed: server error: user 'bob' is not authorized"
+ rpcMsgid: <unique identifier for this request>
+ rpcMethod: GetObject
+ cause:
+ name: FastServerError
+ message: "server error: user 'bob' is not authorized"
+ cause:
+ name: UnauthorizedError
+ message: "user 'bob' is not authorized"
+ rpcUser: "bob"
+
+When the caller uses `VError.info()`, the information properties are collapsed
+so that it looks like this:
+
+ message: "request failed: server error: user 'bob' is not authorized"
+ rpcMsgid: <unique identifier for this request>
+ rpcMethod: GetObject
+ rpcUser: "bob"
+
+Taking this apart:
+
+* The error's message is a complete description of the problem. The caller can
+ report this directly to its caller, which can potentially make its way back to
+ an end user (if appropriate). It can also be logged.
+* The caller can tell that the request failed on the server, rather than as a
+ result of a client problem (e.g., failure to serialize the request), a
+ transport problem (e.g., failure to connect to the server), or something else
+ (e.g., a timeout). They do this using `findCauseByName('FastServerError')`
+ rather than checking the `name` field directly.
+* If the caller logs this error, the logs can be analyzed to aggregate
+ errors by cause, by RPC method name, by user, or whatever. Or the
+ error can be correlated with other events for the same rpcMsgid.
+* It wasn't very hard for any part of the code to contribute to this Error.
+ Each part of the stack has just a few lines to provide exactly what it knows,
+ with very little boilerplate.
+
+It's not expected that you'd use these complex forms all the time. Despite
+supporting the complex case above, you can still just do:
+
+ new VError("my service isn't working");
+
+for the simple cases.
+
+
+# Reference: VError, WError, SError
+
+VError, WError, and SError are convenient drop-in replacements for `Error` that
+support printf-style arguments, first-class causes, informational properties,
+and other useful features.
+
+
+## Constructors
+
+The VError constructor has several forms:
+
+```javascript
+/*
+ * This is the most general form. You can specify any supported options
+ * (including "cause" and "info") this way.
+ */
+new VError(options, sprintf_args...)
+
+/*
+ * This is a useful shorthand when the only option you need is "cause".
+ */
+new VError(cause, sprintf_args...)
+
+/*
+ * This is a useful shorthand when you don't need any options at all.
+ */
+new VError(sprintf_args...)
+```
+
+All of these forms construct a new VError that behaves just like the built-in
+JavaScript `Error` class, with some additional methods described below.
+
+In the first form, `options` is a plain object with any of the following
+optional properties:
+
+Option name | Type | Meaning
+---------------- | ---------------- | -------
+`name` | string | Describes what kind of error this is. This is intended for programmatic use to distinguish between different kinds of errors. Note that in modern versions of Node.js, this name is ignored in the `stack` property value, but callers can still use the `name` property to get at it.
+`cause` | any Error object | Indicates that the new error was caused by `cause`. See `cause()` below. If unspecified, the cause will be `null`.
+`strict` | boolean | If true, then `null` and `undefined` values in `sprintf_args` are passed through to `sprintf()`. Otherwise, these are replaced with the strings `'null'`, and '`undefined`', respectively.
+`constructorOpt` | function | If specified, then the stack trace for this error ends at function `constructorOpt`. Functions called by `constructorOpt` will not show up in the stack. This is useful when this class is subclassed.
+`info` | object | Specifies arbitrary informational properties that are available through the `VError.info(err)` static class method. See that method for details.
+
+The second form is equivalent to using the first form with the specified `cause`
+as the error's cause. This form is distinguished from the first form because
+the first argument is an Error.
+
+The third form is equivalent to using the first form with all default option
+values. This form is distinguished from the other forms because the first
+argument is not an object or an Error.
+
+The `WError` constructor is used exactly the same way as the `VError`
+constructor. The `SError` constructor is also used the same way as the
+`VError` constructor except that in all cases, the `strict` property is
+overriden to `true.
+
+
+## Public properties
+
+`VError`, `WError`, and `SError` all provide the same public properties as
+JavaScript's built-in Error objects.
+
+Property name | Type | Meaning
+------------- | ------ | -------
+`name` | string | Programmatically-usable name of the error.
+`message` | string | Human-readable summary of the failure. Programmatically-accessible details are provided through `VError.info(err)` class method.
+`stack` | string | Human-readable stack trace where the Error was constructed.
+
+For all of these classes, the printf-style arguments passed to the constructor
+are processed with `sprintf()` to form a message. For `WError`, this becomes
+the complete `message` property. For `SError` and `VError`, this message is
+prepended to the message of the cause, if any (with a suitable separator), and
+the result becomes the `message` property.
+
+The `stack` property is managed entirely by the underlying JavaScript
+implementation. It's generally implemented using a getter function because
+constructing the human-readable stack trace is somewhat expensive.
+
+## Class methods
+
+The following methods are defined on the `VError` class and as exported
+functions on the `verror` module. They're defined this way rather than using
+methods on VError instances so that they can be used on Errors not created with
+`VError`.
+
+### `VError.cause(err)`
+
+The `cause()` function returns the next Error in the cause chain for `err`, or
+`null` if there is no next error. See the `cause` argument to the constructor.
+Errors can have arbitrarily long cause chains. You can walk the `cause` chain
+by invoking `VError.cause(err)` on each subsequent return value. If `err` is
+not a `VError`, the cause is `null`.
+
+### `VError.info(err)`
+
+Returns an object with all of the extra error information that's been associated
+with this Error and all of its causes. These are the properties passed in using
+the `info` option to the constructor. Properties not specified in the
+constructor for this Error are implicitly inherited from this error's cause.
+
+These properties are intended to provide programmatically-accessible metadata
+about the error. For an error that indicates a failure to resolve a DNS name,
+informational properties might include the DNS name to be resolved, or even the
+list of resolvers used to resolve it. The values of these properties should
+generally be plain objects (i.e., consisting only of null, undefined, numbers,
+booleans, strings, and objects and arrays containing only other plain objects).
+
+### `VError.fullStack(err)`
+
+Returns a string containing the full stack trace, with all nested errors recursively
+reported as `'caused by:' + err.stack`.
+
+### `VError.findCauseByName(err, name)`
+
+The `findCauseByName()` function traverses the cause chain for `err`, looking
+for an error whose `name` property matches the passed in `name` value. If no
+match is found, `null` is returned.
+
+If all you want is to know _whether_ there's a cause (and you don't care what it
+is), you can use `VError.hasCauseWithName(err, name)`.
+
+If a vanilla error or a non-VError error is passed in, then there is no cause
+chain to traverse. In this scenario, the function will check the `name`
+property of only `err`.
+
+### `VError.hasCauseWithName(err, name)`
+
+Returns true if and only if `VError.findCauseByName(err, name)` would return
+a non-null value. This essentially determines whether `err` has any cause in
+its cause chain that has name `name`.
+
+### `VError.errorFromList(errors)`
+
+Given an array of Error objects (possibly empty), return a single error
+representing the whole collection of errors. If the list has:
+
+* 0 elements, returns `null`
+* 1 element, returns the sole error
+* more than 1 element, returns a MultiError referencing the whole list
+
+This is useful for cases where an operation may produce any number of errors,
+and you ultimately want to implement the usual `callback(err)` pattern. You can
+accumulate the errors in an array and then invoke
+`callback(VError.errorFromList(errors))` when the operation is complete.
+
+
+### `VError.errorForEach(err, func)`
+
+Convenience function for iterating an error that may itself be a MultiError.
+
+In all cases, `err` must be an Error. If `err` is a MultiError, then `func` is
+invoked as `func(errorN)` for each of the underlying errors of the MultiError.
+If `err` is any other kind of error, `func` is invoked once as `func(err)`. In
+all cases, `func` is invoked synchronously.
+
+This is useful for cases where an operation may produce any number of warnings
+that may be encapsulated with a MultiError -- but may not be.
+
+This function does not iterate an error's cause chain.
+
+
+## Examples
+
+The "Demo" section above covers several basic cases. Here's a more advanced
+case:
+
+```javascript
+var err1 = new VError('something bad happened');
+/* ... */
+var err2 = new VError({
+ 'name': 'ConnectionError',
+ 'cause': err1,
+ 'info': {
+ 'errno': 'ECONNREFUSED',
+ 'remote_ip': '127.0.0.1',
+ 'port': 215
+ }
+}, 'failed to connect to "%s:%d"', '127.0.0.1', 215);
+
+console.log(err2.message);
+console.log(err2.name);
+console.log(VError.info(err2));
+console.log(err2.stack);
+```
+
+This outputs:
+
+ failed to connect to "127.0.0.1:215": something bad happened
+ ConnectionError
+ { errno: 'ECONNREFUSED', remote_ip: '127.0.0.1', port: 215 }
+ ConnectionError: failed to connect to "127.0.0.1:215": something bad happened
+ at Object.<anonymous> (/home/dap/node-verror/examples/info.js:5:12)
+ at Module._compile (module.js:456:26)
+ at Object.Module._extensions..js (module.js:474:10)
+ at Module.load (module.js:356:32)
+ at Function.Module._load (module.js:312:12)
+ at Function.Module.runMain (module.js:497:10)
+ at startup (node.js:119:16)
+ at node.js:935:3
+
+Information properties are inherited up the cause chain, with values at the top
+of the chain overriding same-named values lower in the chain. To continue that
+example:
+
+```javascript
+var err3 = new VError({
+ 'name': 'RequestError',
+ 'cause': err2,
+ 'info': {
+ 'errno': 'EBADREQUEST'
+ }
+}, 'request failed');
+
+console.log(err3.message);
+console.log(err3.name);
+console.log(VError.info(err3));
+console.log(err3.stack);
+```
+
+This outputs:
+
+ request failed: failed to connect to "127.0.0.1:215": something bad happened
+ RequestError
+ { errno: 'EBADREQUEST', remote_ip: '127.0.0.1', port: 215 }
+ RequestError: request failed: failed to connect to "127.0.0.1:215": something bad happened
+ at Object.<anonymous> (/home/dap/node-verror/examples/info.js:20:12)
+ at Module._compile (module.js:456:26)
+ at Object.Module._extensions..js (module.js:474:10)
+ at Module.load (module.js:356:32)
+ at Function.Module._load (module.js:312:12)
+ at Function.Module.runMain (module.js:497:10)
+ at startup (node.js:119:16)
+ at node.js:935:3
+
+You can also print the complete stack trace of combined `Error`s by using
+`VError.fullStack(err).`
+
+```javascript
+var err1 = new VError('something bad happened');
+/* ... */
+var err2 = new VError(err1, 'something really bad happened here');
+
+console.log(VError.fullStack(err2));
+```
+
+This outputs:
+
+ VError: something really bad happened here: something bad happened
+ at Object.<anonymous> (/home/dap/node-verror/examples/fullStack.js:5:12)
+ at Module._compile (module.js:409:26)
+ at Object.Module._extensions..js (module.js:416:10)
+ at Module.load (module.js:343:32)
+ at Function.Module._load (module.js:300:12)
+ at Function.Module.runMain (module.js:441:10)
+ at startup (node.js:139:18)
+ at node.js:968:3
+ caused by: VError: something bad happened
+ at Object.<anonymous> (/home/dap/node-verror/examples/fullStack.js:3:12)
+ at Module._compile (module.js:409:26)
+ at Object.Module._extensions..js (module.js:416:10)
+ at Module.load (module.js:343:32)
+ at Function.Module._load (module.js:300:12)
+ at Function.Module.runMain (module.js:441:10)
+ at startup (node.js:139:18)
+ at node.js:968:3
+
+`VError.fullStack` is also safe to use on regular `Error`s, so feel free to use
+it whenever you need to extract the stack trace from an `Error`, regardless if
+it's a `VError` or not.
+
+# Reference: MultiError
+
+MultiError is an Error class that represents a group of Errors. This is used
+when you logically need to provide a single Error, but you want to preserve
+information about multiple underying Errors. A common case is when you execute
+several operations in parallel and some of them fail.
+
+MultiErrors are constructed as:
+
+```javascript
+new MultiError(error_list)
+```
+
+`error_list` is an array of at least one `Error` object.
+
+The cause of the MultiError is the first error provided. None of the other
+`VError` options are supported. The `message` for a MultiError consists the
+`message` from the first error, prepended with a message indicating that there
+were other errors.
+
+For example:
+
+```javascript
+err = new MultiError([
+ new Error('failed to resolve DNS name "abc.example.com"'),
+ new Error('failed to resolve DNS name "def.example.com"'),
+]);
+
+console.error(err.message);
+```
+
+outputs:
+
+ first of 2 errors: failed to resolve DNS name "abc.example.com"
+
+See the convenience function `VError.errorFromList`, which is sometimes simpler
+to use than this constructor.
+
+## Public methods
+
+
+### `errors()`
+
+Returns an array of the errors used to construct this MultiError.
+
+
+# Contributing
+
+See separate [contribution guidelines](CONTRIBUTING.md).
diff --git a/node_modules/verror/lib/verror.js b/node_modules/verror/lib/verror.js
new file mode 100644
index 0000000..8663dde
--- /dev/null
+++ b/node_modules/verror/lib/verror.js
@@ -0,0 +1,451 @@
+/*
+ * verror.js: richer JavaScript errors
+ */
+
+var mod_assertplus = require('assert-plus');
+var mod_util = require('util');
+
+var mod_extsprintf = require('extsprintf');
+var mod_isError = require('core-util-is').isError;
+var sprintf = mod_extsprintf.sprintf;
+
+/*
+ * Public interface
+ */
+
+/* So you can 'var VError = require('verror')' */
+module.exports = VError;
+/* For compatibility */
+VError.VError = VError;
+/* Other exported classes */
+VError.SError = SError;
+VError.WError = WError;
+VError.MultiError = MultiError;
+
+/*
+ * Common function used to parse constructor arguments for VError, WError, and
+ * SError. Named arguments to this function:
+ *
+ * strict force strict interpretation of sprintf arguments, even
+ * if the options in "argv" don't say so
+ *
+ * argv error's constructor arguments, which are to be
+ * interpreted as described in README.md. For quick
+ * reference, "argv" has one of the following forms:
+ *
+ * [ sprintf_args... ] (argv[0] is a string)
+ * [ cause, sprintf_args... ] (argv[0] is an Error)
+ * [ options, sprintf_args... ] (argv[0] is an object)
+ *
+ * This function normalizes these forms, producing an object with the following
+ * properties:
+ *
+ * options equivalent to "options" in third form. This will never
+ * be a direct reference to what the caller passed in
+ * (i.e., it may be a shallow copy), so it can be freely
+ * modified.
+ *
+ * shortmessage result of sprintf(sprintf_args), taking options.strict
+ * into account as described in README.md.
+ */
+function parseConstructorArguments(args)
+{
+ var argv, options, sprintf_args, shortmessage, k;
+
+ mod_assertplus.object(args, 'args');
+ mod_assertplus.bool(args.strict, 'args.strict');
+ mod_assertplus.array(args.argv, 'args.argv');
+ argv = args.argv;
+
+ /*
+ * First, figure out which form of invocation we've been given.
+ */
+ if (argv.length === 0) {
+ options = {};
+ sprintf_args = [];
+ } else if (mod_isError(argv[0])) {
+ options = { 'cause': argv[0] };
+ sprintf_args = argv.slice(1);
+ } else if (typeof (argv[0]) === 'object') {
+ options = {};
+ for (k in argv[0]) {
+ options[k] = argv[0][k];
+ }
+ sprintf_args = argv.slice(1);
+ } else {
+ mod_assertplus.string(argv[0],
+ 'first argument to VError, SError, or WError ' +
+ 'constructor must be a string, object, or Error');
+ options = {};
+ sprintf_args = argv;
+ }
+
+ /*
+ * Now construct the error's message.
+ *
+ * extsprintf (which we invoke here with our caller's arguments in order
+ * to construct this Error's message) is strict in its interpretation of
+ * values to be processed by the "%s" specifier. The value passed to
+ * extsprintf must actually be a string or something convertible to a
+ * String using .toString(). Passing other values (notably "null" and
+ * "undefined") is considered a programmer error. The assumption is
+ * that if you actually want to print the string "null" or "undefined",
+ * then that's easy to do that when you're calling extsprintf; on the
+ * other hand, if you did NOT want that (i.e., there's actually a bug
+ * where the program assumes some variable is non-null and tries to
+ * print it, which might happen when constructing a packet or file in
+ * some specific format), then it's better to stop immediately than
+ * produce bogus output.
+ *
+ * However, sometimes the bug is only in the code calling VError, and a
+ * programmer might prefer to have the error message contain "null" or
+ * "undefined" rather than have the bug in the error path crash the
+ * program (making the first bug harder to identify). For that reason,
+ * by default VError converts "null" or "undefined" arguments to their
+ * string representations and passes those to extsprintf. Programmers
+ * desiring the strict behavior can use the SError class or pass the
+ * "strict" option to the VError constructor.
+ */
+ mod_assertplus.object(options);
+ if (!options.strict && !args.strict) {
+ sprintf_args = sprintf_args.map(function (a) {
+ return (a === null ? 'null' :
+ a === undefined ? 'undefined' : a);
+ });
+ }
+
+ if (sprintf_args.length === 0) {
+ shortmessage = '';
+ } else {
+ shortmessage = sprintf.apply(null, sprintf_args);
+ }
+
+ return ({
+ 'options': options,
+ 'shortmessage': shortmessage
+ });
+}
+
+/*
+ * See README.md for reference documentation.
+ */
+function VError()
+{
+ var args, obj, parsed, cause, ctor, message, k;
+
+ args = Array.prototype.slice.call(arguments, 0);
+
+ /*
+ * This is a regrettable pattern, but JavaScript's built-in Error class
+ * is defined to work this way, so we allow the constructor to be called
+ * without "new".
+ */
+ if (!(this instanceof VError)) {
+ obj = Object.create(VError.prototype);
+ VError.apply(obj, arguments);
+ return (obj);
+ }
+
+ /*
+ * For convenience and backwards compatibility, we support several
+ * different calling forms. Normalize them here.
+ */
+ parsed = parseConstructorArguments({
+ 'argv': args,
+ 'strict': false
+ });
+
+ /*
+ * If we've been given a name, apply it now.
+ */
+ if (parsed.options.name) {
+ mod_assertplus.string(parsed.options.name,
+ 'error\'s "name" must be a string');
+ this.name = parsed.options.name;
+ }
+
+ /*
+ * For debugging, we keep track of the original short message (attached
+ * this Error particularly) separately from the complete message (which
+ * includes the messages of our cause chain).
+ */
+ this.jse_shortmsg = parsed.shortmessage;
+ message = parsed.shortmessage;
+
+ /*
+ * If we've been given a cause, record a reference to it and update our
+ * message appropriately.
+ */
+ cause = parsed.options.cause;
+ if (cause) {
+ mod_assertplus.ok(mod_isError(cause), 'cause is not an Error');
+ this.jse_cause = cause;
+
+ if (!parsed.options.skipCauseMessage) {
+ message += ': ' + cause.message;
+ }
+ }
+
+ /*
+ * If we've been given an object with properties, shallow-copy that
+ * here. We don't want to use a deep copy in case there are non-plain
+ * objects here, but we don't want to use the original object in case
+ * the caller modifies it later.
+ */
+ this.jse_info = {};
+ if (parsed.options.info) {
+ for (k in parsed.options.info) {
+ this.jse_info[k] = parsed.options.info[k];
+ }
+ }
+
+ this.message = message;
+ Error.call(this, message);
+
+ if (Error.captureStackTrace) {
+ ctor = parsed.options.constructorOpt || this.constructor;
+ Error.captureStackTrace(this, ctor);
+ }
+
+ return (this);
+}
+
+mod_util.inherits(VError, Error);
+VError.prototype.name = 'VError';
+
+VError.prototype.toString = function ve_toString()
+{
+ var str = (this.hasOwnProperty('name') && this.name ||
+ this.constructor.name || this.constructor.prototype.name);
+ if (this.message)
+ str += ': ' + this.message;
+
+ return (str);
+};
+
+/*
+ * This method is provided for compatibility. New callers should use
+ * VError.cause() instead. That method also uses the saner `null` return value
+ * when there is no cause.
+ */
+VError.prototype.cause = function ve_cause()
+{
+ var cause = VError.cause(this);
+ return (cause === null ? undefined : cause);
+};
+
+/*
+ * Static methods
+ *
+ * These class-level methods are provided so that callers can use them on
+ * instances of Errors that are not VErrors. New interfaces should be provided
+ * only using static methods to eliminate the class of programming mistake where
+ * people fail to check whether the Error object has the corresponding methods.
+ */
+
+VError.cause = function (err)
+{
+ mod_assertplus.ok(mod_isError(err), 'err must be an Error');
+ return (mod_isError(err.jse_cause) ? err.jse_cause : null);
+};
+
+VError.info = function (err)
+{
+ var rv, cause, k;
+
+ mod_assertplus.ok(mod_isError(err), 'err must be an Error');
+ cause = VError.cause(err);
+ if (cause !== null) {
+ rv = VError.info(cause);
+ } else {
+ rv = {};
+ }
+
+ if (typeof (err.jse_info) == 'object' && err.jse_info !== null) {
+ for (k in err.jse_info) {
+ rv[k] = err.jse_info[k];
+ }
+ }
+
+ return (rv);
+};
+
+VError.findCauseByName = function (err, name)
+{
+ var cause;
+
+ mod_assertplus.ok(mod_isError(err), 'err must be an Error');
+ mod_assertplus.string(name, 'name');
+ mod_assertplus.ok(name.length > 0, 'name cannot be empty');
+
+ for (cause = err; cause !== null; cause = VError.cause(cause)) {
+ mod_assertplus.ok(mod_isError(cause));
+ if (cause.name == name) {
+ return (cause);
+ }
+ }
+
+ return (null);
+};
+
+VError.hasCauseWithName = function (err, name)
+{
+ return (VError.findCauseByName(err, name) !== null);
+};
+
+VError.fullStack = function (err)
+{
+ mod_assertplus.ok(mod_isError(err), 'err must be an Error');
+
+ var cause = VError.cause(err);
+
+ if (cause) {
+ return (err.stack + '\ncaused by: ' + VError.fullStack(cause));
+ }
+
+ return (err.stack);
+};
+
+VError.errorFromList = function (errors)
+{
+ mod_assertplus.arrayOfObject(errors, 'errors');
+
+ if (errors.length === 0) {
+ return (null);
+ }
+
+ errors.forEach(function (e) {
+ mod_assertplus.ok(mod_isError(e));
+ });
+
+ if (errors.length == 1) {
+ return (errors[0]);
+ }
+
+ return (new MultiError(errors));
+};
+
+VError.errorForEach = function (err, func)
+{
+ mod_assertplus.ok(mod_isError(err), 'err must be an Error');
+ mod_assertplus.func(func, 'func');
+
+ if (err instanceof MultiError) {
+ err.errors().forEach(function iterError(e) { func(e); });
+ } else {
+ func(err);
+ }
+};
+
+
+/*
+ * SError is like VError, but stricter about types. You cannot pass "null" or
+ * "undefined" as string arguments to the formatter.
+ */
+function SError()
+{
+ var args, obj, parsed, options;
+
+ args = Array.prototype.slice.call(arguments, 0);
+ if (!(this instanceof SError)) {
+ obj = Object.create(SError.prototype);
+ SError.apply(obj, arguments);
+ return (obj);
+ }
+
+ parsed = parseConstructorArguments({
+ 'argv': args,
+ 'strict': true
+ });
+
+ options = parsed.options;
+ VError.call(this, options, '%s', parsed.shortmessage);
+
+ return (this);
+}
+
+/*
+ * We don't bother setting SError.prototype.name because once constructed,
+ * SErrors are just like VErrors.
+ */
+mod_util.inherits(SError, VError);
+
+
+/*
+ * Represents a collection of errors for the purpose of consumers that generally
+ * only deal with one error. Callers can extract the individual errors
+ * contained in this object, but may also just treat it as a normal single
+ * error, in which case a summary message will be printed.
+ */
+function MultiError(errors)
+{
+ mod_assertplus.array(errors, 'list of errors');
+ mod_assertplus.ok(errors.length > 0, 'must be at least one error');
+ this.ase_errors = errors;
+
+ VError.call(this, {
+ 'cause': errors[0]
+ }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's');
+}
+
+mod_util.inherits(MultiError, VError);
+MultiError.prototype.name = 'MultiError';
+
+MultiError.prototype.errors = function me_errors()
+{
+ return (this.ase_errors.slice(0));
+};
+
+
+/*
+ * See README.md for reference details.
+ */
+function WError()
+{
+ var args, obj, parsed, options;
+
+ args = Array.prototype.slice.call(arguments, 0);
+ if (!(this instanceof WError)) {
+ obj = Object.create(WError.prototype);
+ WError.apply(obj, args);
+ return (obj);
+ }
+
+ parsed = parseConstructorArguments({
+ 'argv': args,
+ 'strict': false
+ });
+
+ options = parsed.options;
+ options['skipCauseMessage'] = true;
+ VError.call(this, options, '%s', parsed.shortmessage);
+
+ return (this);
+}
+
+mod_util.inherits(WError, VError);
+WError.prototype.name = 'WError';
+
+WError.prototype.toString = function we_toString()
+{
+ var str = (this.hasOwnProperty('name') && this.name ||
+ this.constructor.name || this.constructor.prototype.name);
+ if (this.message)
+ str += ': ' + this.message;
+ if (this.jse_cause && this.jse_cause.message)
+ str += '; caused by ' + this.jse_cause.toString();
+
+ return (str);
+};
+
+/*
+ * For purely historical reasons, WError's cause() function allows you to set
+ * the cause.
+ */
+WError.prototype.cause = function we_cause(c)
+{
+ if (mod_isError(c))
+ this.jse_cause = c;
+
+ return (this.jse_cause);
+};
diff --git a/node_modules/verror/package.json b/node_modules/verror/package.json
new file mode 100644
index 0000000..79295c5
--- /dev/null
+++ b/node_modules/verror/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "verror",
+ "version": "1.10.0",
+ "description": "richer JavaScript errors",
+ "main": "./lib/verror.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/davepacheco/node-verror.git"
+ },
+ "dependencies": {
+ "assert-plus": "^1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "^1.2.0"
+ },
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "scripts": {
+ "test": "make test"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md
new file mode 100644
index 0000000..7fb1f20
--- /dev/null
+++ b/node_modules/which/CHANGELOG.md
@@ -0,0 +1,166 @@
+# Changes
+
+
+## 2.0.2
+
+* Rename bin to `node-which`
+
+## 2.0.1
+
+* generate changelog and publish on version bump
+* enforce 100% test coverage
+* Promise interface
+
+## 2.0.0
+
+* Parallel tests, modern JavaScript, and drop support for node < 8
+
+## 1.3.1
+
+* update deps
+* update travis
+
+## v1.3.0
+
+* Add nothrow option to which.sync
+* update tap
+
+## v1.2.14
+
+* appveyor: drop node 5 and 0.x
+* travis-ci: add node 6, drop 0.x
+
+## v1.2.13
+
+* test: Pass missing option to pass on windows
+* update tap
+* update isexe to 2.0.0
+* neveragain.tech pledge request
+
+## v1.2.12
+
+* Removed unused require
+
+## v1.2.11
+
+* Prevent changelog script from being included in package
+
+## v1.2.10
+
+* Use env.PATH only, not env.Path
+
+## v1.2.9
+
+* fix for paths starting with ../
+* Remove unused `is-absolute` module
+
+## v1.2.8
+
+* bullet items in changelog that contain (but don't start with) #
+
+## v1.2.7
+
+* strip 'update changelog' changelog entries out of changelog
+
+## v1.2.6
+
+* make the changelog bulleted
+
+## v1.2.5
+
+* make a changelog, and keep it up to date
+* don't include tests in package
+* Properly handle relative-path executables
+* appveyor
+* Attach error code to Not Found error
+* Make tests pass on Windows
+
+## v1.2.4
+
+* Fix typo
+
+## v1.2.3
+
+* update isexe, fix regression in pathExt handling
+
+## v1.2.2
+
+* update deps, use isexe module, test windows
+
+## v1.2.1
+
+* Sometimes windows PATH entries are quoted
+* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode.
+* doc cli
+
+## v1.2.0
+
+* Add support for opt.all and -as cli flags
+* test the bin
+* update travis
+* Allow checking for multiple programs in bin/which
+* tap 2
+
+## v1.1.2
+
+* travis
+* Refactored and fixed undefined error on Windows
+* Support strict mode
+
+## v1.1.1
+
+* test +g exes against secondary groups, if available
+* Use windows exe semantics on cygwin & msys
+* cwd should be first in path on win32, not last
+* Handle lower-case 'env.Path' on Windows
+* Update docs
+* use single-quotes
+
+## v1.1.0
+
+* Add tests, depend on is-absolute
+
+## v1.0.9
+
+* which.js: root is allowed to execute files owned by anyone
+
+## v1.0.8
+
+* don't use graceful-fs
+
+## v1.0.7
+
+* add license to package.json
+
+## v1.0.6
+
+* isc license
+
+## 1.0.5
+
+* Awful typo
+
+## 1.0.4
+
+* Test for path absoluteness properly
+* win: Allow '' as a pathext if cmd has a . in it
+
+## 1.0.3
+
+* Remove references to execPath
+* Make `which.sync()` work on Windows by honoring the PATHEXT variable.
+* Make `isExe()` always return true on Windows.
+* MIT
+
+## 1.0.2
+
+* Only files can be exes
+
+## 1.0.1
+
+* Respect the PATHEXT env for win32 support
+* should 0755 the bin
+* binary
+* guts
+* package
+* 1st
diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/which/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/which/README.md b/node_modules/which/README.md
new file mode 100644
index 0000000..cd83350
--- /dev/null
+++ b/node_modules/which/README.md
@@ -0,0 +1,54 @@
+# which
+
+Like the unix `which` utility.
+
+Finds the first instance of a specified executable in the PATH
+environment variable. Does not cache the results, so `hash -r` is not
+needed when the PATH changes.
+
+## USAGE
+
+```javascript
+var which = require('which')
+
+// async usage
+which('node', function (er, resolvedPath) {
+ // er is returned if no "node" is found on the PATH
+ // if it is found, then the absolute path to the exec is returned
+})
+
+// or promise
+which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... })
+
+// sync usage
+// throws if not found
+var resolved = which.sync('node')
+
+// if nothrow option is used, returns null if not found
+resolved = which.sync('node', {nothrow: true})
+
+// Pass options to override the PATH and PATHEXT environment vars.
+which('node', { path: someOtherPath }, function (er, resolved) {
+ if (er)
+ throw er
+ console.log('found at %j', resolved)
+})
+```
+
+## CLI USAGE
+
+Same as the BSD `which(1)` binary.
+
+```
+usage: which [-as] program ...
+```
+
+## OPTIONS
+
+You may pass an options object as the second argument.
+
+- `path`: Use instead of the `PATH` environment variable.
+- `pathExt`: Use instead of the `PATHEXT` environment variable.
+- `all`: Return all matches, instead of just the first one. Note that
+ this means the function returns an array of strings instead of a
+ single string.
diff --git a/node_modules/which/bin/node-which b/node_modules/which/bin/node-which
new file mode 100755
index 0000000..7cee372
--- /dev/null
+++ b/node_modules/which/bin/node-which
@@ -0,0 +1,52 @@
+#!/usr/bin/env node
+var which = require("../")
+if (process.argv.length < 3)
+ usage()
+
+function usage () {
+ console.error('usage: which [-as] program ...')
+ process.exit(1)
+}
+
+var all = false
+var silent = false
+var dashdash = false
+var args = process.argv.slice(2).filter(function (arg) {
+ if (dashdash || !/^-/.test(arg))
+ return true
+
+ if (arg === '--') {
+ dashdash = true
+ return false
+ }
+
+ var flags = arg.substr(1).split('')
+ for (var f = 0; f < flags.length; f++) {
+ var flag = flags[f]
+ switch (flag) {
+ case 's':
+ silent = true
+ break
+ case 'a':
+ all = true
+ break
+ default:
+ console.error('which: illegal option -- ' + flag)
+ usage()
+ }
+ }
+ return false
+})
+
+process.exit(args.reduce(function (pv, current) {
+ try {
+ var f = which.sync(current, { all: all })
+ if (all)
+ f = f.join('\n')
+ if (!silent)
+ console.log(f)
+ return pv;
+ } catch (e) {
+ return 1;
+ }
+}, 0))
diff --git a/node_modules/which/package.json b/node_modules/which/package.json
new file mode 100644
index 0000000..97ad7fb
--- /dev/null
+++ b/node_modules/which/package.json
@@ -0,0 +1,43 @@
+{
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
+ "name": "which",
+ "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
+ "version": "2.0.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-which.git"
+ },
+ "main": "which.js",
+ "bin": {
+ "node-which": "./bin/node-which"
+ },
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "devDependencies": {
+ "mkdirp": "^0.5.0",
+ "rimraf": "^2.6.2",
+ "tap": "^14.6.9"
+ },
+ "scripts": {
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "prepublish": "npm run changelog",
+ "prechangelog": "bash gen-changelog.sh",
+ "changelog": "git add CHANGELOG.md",
+ "postchangelog": "git commit -m 'update changelog - '${npm_package_version}",
+ "postpublish": "git push origin --follow-tags"
+ },
+ "files": [
+ "which.js",
+ "bin/node-which"
+ ],
+ "tap": {
+ "check-coverage": true
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+}
diff --git a/node_modules/which/which.js b/node_modules/which/which.js
new file mode 100644
index 0000000..82afffd
--- /dev/null
+++ b/node_modules/which/which.js
@@ -0,0 +1,125 @@
+const isWindows = process.platform === 'win32' ||
+ process.env.OSTYPE === 'cygwin' ||
+ process.env.OSTYPE === 'msys'
+
+const path = require('path')
+const COLON = isWindows ? ';' : ':'
+const isexe = require('isexe')
+
+const getNotFoundError = (cmd) =>
+ Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })
+
+const getPathInfo = (cmd, opt) => {
+ const colon = opt.colon || COLON
+
+ // If it has a slash, then we don't bother searching the pathenv.
+ // just check the file itself, and that's it.
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
+ : (
+ [
+ // windows always checks the cwd first
+ ...(isWindows ? [process.cwd()] : []),
+ ...(opt.path || process.env.PATH ||
+ /* istanbul ignore next: very unusual */ '').split(colon),
+ ]
+ )
+ const pathExtExe = isWindows
+ ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
+ : ''
+ const pathExt = isWindows ? pathExtExe.split(colon) : ['']
+
+ if (isWindows) {
+ if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
+ pathExt.unshift('')
+ }
+
+ return {
+ pathEnv,
+ pathExt,
+ pathExtExe,
+ }
+}
+
+const which = (cmd, opt, cb) => {
+ if (typeof opt === 'function') {
+ cb = opt
+ opt = {}
+ }
+ if (!opt)
+ opt = {}
+
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
+ const found = []
+
+ const step = i => new Promise((resolve, reject) => {
+ if (i === pathEnv.length)
+ return opt.all && found.length ? resolve(found)
+ : reject(getNotFoundError(cmd))
+
+ const ppRaw = pathEnv[i]
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
+
+ const pCmd = path.join(pathPart, cmd)
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
+ : pCmd
+
+ resolve(subStep(p, i, 0))
+ })
+
+ const subStep = (p, i, ii) => new Promise((resolve, reject) => {
+ if (ii === pathExt.length)
+ return resolve(step(i + 1))
+ const ext = pathExt[ii]
+ isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
+ if (!er && is) {
+ if (opt.all)
+ found.push(p + ext)
+ else
+ return resolve(p + ext)
+ }
+ return resolve(subStep(p, i, ii + 1))
+ })
+ })
+
+ return cb ? step(0).then(res => cb(null, res), cb) : step(0)
+}
+
+const whichSync = (cmd, opt) => {
+ opt = opt || {}
+
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
+ const found = []
+
+ for (let i = 0; i < pathEnv.length; i ++) {
+ const ppRaw = pathEnv[i]
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
+
+ const pCmd = path.join(pathPart, cmd)
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
+ : pCmd
+
+ for (let j = 0; j < pathExt.length; j ++) {
+ const cur = p + pathExt[j]
+ try {
+ const is = isexe.sync(cur, { pathExt: pathExtExe })
+ if (is) {
+ if (opt.all)
+ found.push(cur)
+ else
+ return cur
+ }
+ } catch (ex) {}
+ }
+ }
+
+ if (opt.all && found.length)
+ return found
+
+ if (opt.nothrow)
+ return null
+
+ throw getNotFoundError(cmd)
+}
+
+module.exports = which
+which.sync = whichSync
diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/wrappy/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md
new file mode 100644
index 0000000..98eab25
--- /dev/null
+++ b/node_modules/wrappy/README.md
@@ -0,0 +1,36 @@
+# wrappy
+
+Callback wrapping utility
+
+## USAGE
+
+```javascript
+var wrappy = require("wrappy")
+
+// var wrapper = wrappy(wrapperFunction)
+
+// make sure a cb is called only once
+// See also: http://npm.im/once for this specific use case
+var once = wrappy(function (cb) {
+ var called = false
+ return function () {
+ if (called) return
+ called = true
+ return cb.apply(this, arguments)
+ }
+})
+
+function printBoo () {
+ console.log('boo')
+}
+// has some rando property
+printBoo.iAmBooPrinter = true
+
+var onlyPrintOnce = once(printBoo)
+
+onlyPrintOnce() // prints 'boo'
+onlyPrintOnce() // does nothing
+
+// random property is retained!
+assert.equal(onlyPrintOnce.iAmBooPrinter, true)
+```
diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json
new file mode 100644
index 0000000..1307520
--- /dev/null
+++ b/node_modules/wrappy/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "wrappy",
+ "version": "1.0.2",
+ "description": "Callback wrapping utility",
+ "main": "wrappy.js",
+ "files": [
+ "wrappy.js"
+ ],
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "^2.3.1"
+ },
+ "scripts": {
+ "test": "tap --coverage test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/wrappy"
+ },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/npm/wrappy/issues"
+ },
+ "homepage": "https://github.com/npm/wrappy"
+}
diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js
new file mode 100644
index 0000000..bb7e7d6
--- /dev/null
+++ b/node_modules/wrappy/wrappy.js
@@ -0,0 +1,33 @@
+// Returns a wrapper function that returns a wrapped callback
+// The wrapper function should do some stuff, and return a
+// presumably different callback function.
+// This makes sure that own properties are retained, so that
+// decorations and such are not lost along the way.
+module.exports = wrappy
+function wrappy (fn, cb) {
+ if (fn && cb) return wrappy(fn)(cb)
+
+ if (typeof fn !== 'function')
+ throw new TypeError('need wrapper function')
+
+ Object.keys(fn).forEach(function (k) {
+ wrapper[k] = fn[k]
+ })
+
+ return wrapper
+
+ function wrapper() {
+ var args = new Array(arguments.length)
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+ var ret = fn.apply(this, args)
+ var cb = args[args.length-1]
+ if (typeof ret === 'function' && ret !== cb) {
+ Object.keys(cb).forEach(function (k) {
+ ret[k] = cb[k]
+ })
+ }
+ return ret
+ }
+}
diff --git a/node_modules/xmlbuilder/.nycrc b/node_modules/xmlbuilder/.nycrc
new file mode 100644
index 0000000..a21df9b
--- /dev/null
+++ b/node_modules/xmlbuilder/.nycrc
@@ -0,0 +1,6 @@
+{
+ "reporter": ["lcov", "text"],
+ "extension": [".coffee"],
+ "sourceMap": false,
+ "instrument": false
+} \ No newline at end of file
diff --git a/node_modules/xmlbuilder/.vscode/launch.json b/node_modules/xmlbuilder/.vscode/launch.json
new file mode 100644
index 0000000..45a0637
--- /dev/null
+++ b/node_modules/xmlbuilder/.vscode/launch.json
@@ -0,0 +1,23 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "Debug Coffee",
+ "skipFiles": [
+ "<node_internals>/**"
+ ],
+ "program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
+ "args": [
+ "\"test/**/*.coffee\""
+ ],
+ "outFiles": [
+ "${workspaceFolder}/**/*.js"
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/node_modules/xmlbuilder/CHANGELOG.md b/node_modules/xmlbuilder/CHANGELOG.md
new file mode 100644
index 0000000..77974ed
--- /dev/null
+++ b/node_modules/xmlbuilder/CHANGELOG.md
@@ -0,0 +1,593 @@
+# Change Log
+
+All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http://semver.org/#semantic-versioning-200).
+
+## [15.1.1] - 2020-04-09
+
+- Fixed a bug where the `noDoubleEncoding` flag kept named entities other than [those specified in the spec](https://www.w3.org/TR/xml/#sec-predefined-ent) (see [#16](https://github.com/oozcitak/xmlbuilder2/issues/16) in `xmlbuilder2`).
+
+## [15.1.0] - 2020-03-20
+
+- Added the `invalidCharReplacement` option to replace invalid characters with a user supplied replacement character. See [#147](https://github.com/oozcitak/xmlbuilder-js/issues/147).
+
+## [15.0.1] - 2020-03-10
+
+- Pretty printing now keeps single CDATA nodes in-line with their parent elements also with the stream writer.
+
+## [15.0.0] - 2020-03-10
+
+- Pretty printing now keeps single CDATA nodes in-line with their parent elements. See [#224](https://github.com/oozcitak/xmlbuilder-js/issues/224).
+
+## [14.0.0] - 2020-02-14
+
+- Removed support for node.js 6.0\. Minimum required version is now 8.0.
+
+## [13.0.2] - 2019-05-22
+
+- Fixed a bug where importing a document into an empty parent document did not set the root node. See [#213](https://github.com/oozcitak/xmlbuilder-js/issues/213).
+
+## [13.0.1] - 2019-05-10
+
+- Corrected typings for doctype and character data nodes. See [#211](https://github.com/oozcitak/xmlbuilder-js/issues/211).
+
+## [13.0.0] - 2019-05-07
+
+- Rewrote all TypeSript typings to be strictly compatible with the API. This is a breaking change for TypeScript users only.
+
+## [12.0.1] - 2019-04-30
+
+- Added option for pretty printing attributes.
+
+## [12.0.0] - 2019-04-03
+
+- Removed support for node.js 4.0 and 5.0\. Minimum required version is now 6.0.
+
+## [11.0.1] - 2019-03-22
+
+- Added TypeScript typings. See [#200](https://github.com/oozcitak/xmlbuilder-js/issues/200).
+
+## [11.0.0] - 2019-02-18
+
+- Calling `end()` with arguments no longer overwrites writer options. See [#120](https://github.com/oozcitak/xmlbuilder-js/issues/120).
+- Added writer state and customizable space and endline functions to help customize writer behavior. Also added `openNode` and `closeNode` functions to writer. See [#193](https://github.com/oozcitak/xmlbuilder-js/issues/193).
+- Fixed a bug where writer functions would not be called for nodes with a single child node in pretty print mode. See [#195](https://github.com/oozcitak/xmlbuilder-js/issues/195).
+- Renamed `elEscape` to `textEscape` in `XMLStringifier`.
+- Fixed a bug where empty arrays would produce child nodes. See [#190](https://github.com/oozcitak/xmlbuilder-js/issues/190).
+- Removed the `skipNullAttributes` option. `null` attributes are now skipped by default. Added the `keepNullAttributes` option in case someone needs the old behavior.
+- Removed the `skipNullNodes` option. `null` nodes are now skipped by default. Added the `keepNullNodes` option in case someone needs the old behavior.
+- `undefined` values are now skipped when converting JS objects.
+- Renamed stringify functions. See [#194](https://github.com/oozcitak/xmlbuilder-js/issues/194):
+
+ - `eleName` -> `name`
+ - `attName` -> `name`
+ - `eleText` -> `text`
+
+- Fixed argument order for `attribute` function in the writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196).
+- Added `openAttribute` and `closeAttribute` functions to writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196).
+- Added node types to node objects. Node types and writer states are exported by the module with the `nodeType` and `writerState` properties.
+- Fixed a bug where array items would not be correctly converted. See [#159](https://github.com/oozcitak/xmlbuilder-js/issues/159).
+- Fixed a bug where mixed-content inside JS objects with `#text` decorator would not be correctly converted. See [#171](https://github.com/oozcitak/xmlbuilder-js/issues/171).
+- Fixed a bug where JS objects would not be expanded in callback mode. See [#173](https://github.com/oozcitak/xmlbuilder-js/issues/173).
+- Fixed a bug where character validation would not obey document's XML version. Added separate validation for XML 1.0 and XML 1.1 documents. See [#169](https://github.com/oozcitak/xmlbuilder-js/issues/169).
+- Fixed a bug where names would not be validated according to the spec. See [#49](https://github.com/oozcitak/xmlbuilder-js/issues/49).
+- Renamed `text` property to `value` in comment and cdata nodes to unify the API.
+- Removed `doctype` function to prevent name clash with DOM implementation. Use the `dtd` function instead.
+- Removed dummy nodes from the XML tree (Those were created while chain-building the tree).
+- Renamed `attributes`property to `attribs` to prevent name clash with DOM property with the same name.
+- Implemented the DOM standard (read-only) to support XPath lookups. XML namespaces are not currently supported. See [#122](https://github.com/oozcitak/xmlbuilder-js/issues/122).
+
+## [10.1.1] - 2018-10-24
+
+- Fixed an edge case where a null node at root level would be printed although `skipNullNodes` was set. See [#187](https://github.com/oozcitak/xmlbuilder-js/issues/187).
+
+## [10.1.0] - 2018-10-10
+
+- Added the `skipNullNodes` option to skip nodes with null values. See [#158](https://github.com/oozcitak/xmlbuilder-js/issues/158).
+
+## [10.0.0] - 2018-04-26
+
+- Added current indentation level as a parameter to the onData function when in callback mode. See [#125](https://github.com/oozcitak/xmlbuilder-js/issues/125).
+- Added name of the current node and parent node to error messages where possible. See [#152](https://github.com/oozcitak/xmlbuilder-js/issues/152). This has the potential to break code depending on the content of error messages.
+- Fixed an issue where objects created with Object.create(null) created an error. See [#176](https://github.com/oozcitak/xmlbuilder-js/issues/176).
+- Added test builds for node.js v8 and v10.
+
+## [9.0.7] - 2018-02-09
+
+- Simplified regex used for validating encoding.
+
+## [9.0.4] - 2017-08-16
+
+- `spacebeforeslash` writer option accepts `true` as well as space char(s).
+
+## [9.0.3] - 2017-08-15
+
+- `spacebeforeslash` writer option can now be used with XML fragments.
+
+## [9.0.2] - 2017-08-15
+
+- Added the `spacebeforeslash` writer option to add a space character before closing tags of empty elements. See [#157](https://github.com/oozcitak/xmlbuilder-js/issues/157).
+
+## [9.0.1] - 2017-06-19
+
+- Fixed character validity checks to work with node.js 4.0 and 5.0\. See [#161](https://github.com/oozcitak/xmlbuilder-js/issues/161).
+
+## [9.0.0] - 2017-05-05
+
+- Removed case conversion options.
+- Removed support for node.js 4.0 and 5.0\. Minimum required version is now 6.0.
+- Fixed valid char filter to use XML 1.1 instead of 1.0\. See [#147](https://github.com/oozcitak/xmlbuilder-js/issues/147).
+- Added options for negative indentation and suppressing pretty printing of text nodes. See [#145](https://github.com/oozcitak/xmlbuilder-js/issues/145).
+
+## [8.2.2] - 2016-04-08
+
+- Falsy values can now be used as a text node in callback mode.
+
+## [8.2.1] - 2016-04-07
+
+- Falsy values can now be used as a text node. See [#117](https://github.com/oozcitak/xmlbuilder-js/issues/117).
+
+## [8.2.0] - 2016-04-01
+
+- Removed lodash dependency to keep the library small and simple. See [#114](https://github.com/oozcitak/xmlbuilder-js/issues/114), [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53), and [#43](https://github.com/oozcitak/xmlbuilder-js/issues/43).
+- Added title case to name conversion options.
+
+## [8.1.0] - 2016-03-29
+
+- Added the callback option to the `begin` export function. When used with a callback function, the XML document will be generated in chunks and each chunk will be passed to the supplied function. In this mode, `begin` uses a different code path and the builder should use much less memory since the entire XML tree is not kept. There are a few drawbacks though. For example, traversing the document tree or adding attributes to a node after it is written is not possible. It is also not possible to remove nodes or attributes.
+
+```javascript
+var result = '';
+
+builder.begin(function(chunk) { result += chunk; })
+ .dec()
+ .ele('root')
+ .ele('xmlbuilder').up()
+ .end();
+```
+
+- Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https://github.com/oozcitak/xmlbuilder-js/issues/111).
+
+## [8.0.0] - 2016-03-25
+
+- Added the `begin` export function. See the wiki for details.
+- Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose.
+- Dropped support for old node.js releases. Minimum required node.js version is now 4.0.
+
+## [7.0.0] - 2016-03-21
+
+- Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element.
+
+ ```javascript
+ root.ele('node').ins('pi');
+ // pre-v7
+ <?pi?><node/>
+ // v7
+ <node><?pi?></node>
+ ```
+
+## [6.0.0] - 2016-03-20
+
+- Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document.
+
+## [5.0.1] - 2016-03-08
+
+- Moved require statements for text case conversion to the top of files to reduce lazy requires.
+
+## [5.0.0] - 2016-03-05
+
+- Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`.
+- Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping). See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54) and [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86).
+- Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed.
+- Added support for [nested CDATA](https://en.wikipedia.org/wiki/CDATA#Nesting). The triad `]]>` in CDATA is now automatically replaced with `]]]]><![CDATA[>`.
+
+## [4.2.1] - 2016-01-15
+
+- Updated lodash dependency to 4.0.0.
+
+## [4.2.0] - 2015-12-16
+
+- Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded.
+
+## [4.1.0] - 2015-11-11
+
+- Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g.
+
+```javascript
+root.ele({ number: [ "one", "two" ]});
+// with separateArrayItems: true
+<number>
+ <one/>
+ <two/>
+</number>
+// with separateArrayItems: false
+<number>one</number>
+<number>two</number>
+```
+
+## [4.0.0] - 2015-11-01
+
+- Removed the `#list` decorator. Array items are now created as child nodes by default.
+- Fixed a bug where the XML encoding string was checked partially.
+
+## [3.1.0] - 2015-09-19
+
+- `#list` decorator ignores empty arrays.
+
+## [3.0.0] - 2015-09-10
+
+- Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86).
+
+## [2.6.5] - 2015-09-09
+
+- Use native `isArray` instead of lodash.
+- Indentation of processing instructions are set to the parent element's.
+
+## [2.6.4] - 2015-05-27
+
+- Updated lodash dependency to 3.5.0.
+
+## [2.6.3] - 2015-05-27
+
+- Bumped version because previous release was not published on npm.
+
+## [2.6.2] - 2015-03-10
+
+- Updated lodash dependency to 3.5.0.
+
+## [2.6.1] - 2015-02-20
+
+- Updated lodash dependency to 3.3.0.
+
+## [2.6.0] - 2015-02-20
+
+- Fixed a bug where the `XMLNode` constructor overwrote the super class parent.
+- Removed document property from cloned nodes.
+- Switched to mocha.js for testing.
+
+## [2.5.2] - 2015-02-16
+
+- Updated lodash dependency to 3.2.0.
+
+## [2.5.1] - 2015-02-09
+
+- Updated lodash dependency to 3.1.0.
+- Support all node >= 0.8.
+
+## [2.5.0] - 2015-00-03
+
+- Updated lodash dependency to 3.0.0.
+
+## [2.4.6] - 2015-01-26
+
+- Show more information from attribute creation with null values.
+- Added iojs as an engine.
+- Self close elements with empty text.
+
+## [2.4.5] - 2014-11-15
+
+- Fixed prepublish script to run on windows.
+- Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value.
+- Moved require statements to the top of files to reduce lazy requires. See [#62](https://github.com/oozcitak/xmlbuilder-js/issues/62).
+
+## [2.4.4] - 2014-09-08
+
+- Added the `offset` option to `toString()` for use in XML fragments.
+
+## [2.4.3] - 2014-08-13
+
+- Corrected license in package description.
+
+## [2.4.2] - 2014-08-13
+
+- Dropped performance test and memwatch dependency.
+
+## [2.4.1] - 2014-08-12
+
+- Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https://github.com/oozcitak/xmlbuilder-js/issues/59).
+
+## [2.4.0] - 2014-08-04
+
+- Correct cases of pubID and sysID.
+- Use single lodash instead of separate npm modules. See [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53).
+- Escape according to Canonical XML 1.0\. See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54).
+
+## [2.3.0] - 2014-07-17
+
+- Convert objects to JS primitives while sanitizing user input.
+- Object builder preserves items with null values. See [#44](https://github.com/oozcitak/xmlbuilder-js/issues/44).
+- Use modularized lodash functions to cut down dependencies.
+- Process empty objects when converting from objects so that we don't throw on empty child objects.
+
+## [2.2.1] - 2014-04-04
+
+- Bumped version because previous release was not published on npm.
+
+## [2.2.0] - 2014-04-04
+
+- Switch to lodash from underscore.
+- Removed legacy `ext` option from `create()`.
+- Drop old node versions: 0.4, 0.5, 0.6\. 0.8 is the minimum requirement from now on.
+
+## [2.1.0] - 2013-12-30
+
+- Removed duplicate null checks from constructors.
+- Fixed node count in performance test.
+- Added option for skipping null attribute values. See [#26](https://github.com/oozcitak/xmlbuilder-js/issues/26).
+- Allow multiple values in `att()` and `ins()`.
+- Added ability to run individual performance tests.
+- Added flag for ignoring decorator strings.
+
+## [2.0.1] - 2013-12-24
+
+- Removed performance tests from npm package.
+
+## [2.0.0] - 2013-12-24
+
+- Combined loops for speed up.
+- Added support for the DTD and XML declaration.
+- `clone` includes attributes.
+- Added performance tests.
+- Evaluate attribute value if function.
+- Evaluate instruction value if function.
+
+## [1.1.2] - 2013-12-11
+
+- Changed processing instruction decorator to `?`.
+
+## [1.1.1] - 2013-12-11
+
+- Added processing instructions to JS object conversion.
+
+## [1.1.0] - 2013-12-10
+
+- Added license to package.
+- `create()` and `element()` accept JS object to fully build the document.
+- Added `nod()` and `n()` aliases for `node()`.
+- Renamed `convertAttChar` decorator to `convertAttKey`.
+- Ignore empty decorator strings when converting JS objects.
+
+## [1.0.2] - 2013-11-27
+
+- Removed temp file which was accidentally included in the package.
+
+## [1.0.1] - 2013-11-27
+
+- Custom stringify functions affect current instance only.
+
+## [1.0.0] - 2013-11-27
+
+- Added processing instructions.
+- Added stringify functions to sanitize and convert input values.
+- Added option for headless XML documents.
+- Added vows tests.
+- Removed Makefile. Using npm publish scripts instead.
+- Removed the `begin()` function. `create()` begins the document by creating the root node.
+
+## [0.4.3] - 2013-11-08
+
+- Added option to include surrogate pairs in XML content. See [#29](https://github.com/oozcitak/xmlbuilder-js/issues/29).
+- Fixed empty value string representation in pretty mode.
+- Added pre and postpublish scripts to package.json.
+- Filtered out prototype properties when appending attributes. See [#31](https://github.com/oozcitak/xmlbuilder-js/issues/31).
+
+## [0.4.2] - 2012-09-14
+
+- Removed README.md from `.npmignore`.
+
+## [0.4.1] - 2012-08-31
+
+- Removed `begin()` calls in favor of `XMLBuilder` constructor.
+- Added the `end()` function. `end()` is a convenience over `doc().toString()`.
+
+## [0.4.0] - 2012-08-31
+
+- Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line.
+- Soft deprecated `begin()`.
+
+## [0.3.11] - 2012-08-13
+
+- Package keywords are fixed to be an array of values.
+
+## [0.3.10] - 2012-08-13
+
+- Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases.
+
+## [0.3.3] - 2012-07-27
+
+- Implemented `importXMLBuilder()`.
+
+## [0.3.2] - 2012-07-20
+
+- Fixed a duplicated escaping problem on `element()`.
+- Fixed a problem with text node creation from empty string.
+- Calling `root()` on the document element returns the root element.
+- `XMLBuilder` no longer extends `XMLFragment`.
+
+## [0.3.1] - 2011-11-28
+
+- Added guards for document element so that nodes cannot be inserted at document level.
+
+## [0.3.0] - 2011-11-28
+
+- Added `doc()` to return the document element.
+
+## [0.2.2] - 2011-11-28
+
+- Prevent code relying on `up()`'s older behavior to break.
+
+## [0.2.1] - 2011-11-28
+
+- Added the `root()` function.
+
+## [0.2.0] - 2011-11-21
+
+- Added Travis-CI integration.
+- Added coffee-script dependency.
+- Added insert, traversal and delete functions.
+
+## [0.1.7] - 2011-10-25
+
+- No changes. Accidental release.
+
+## [0.1.6] - 2011-10-25
+
+- Corrected `package.json` bugs link to `url` from `web`.
+
+## [0.1.5] - 2011-08-08
+
+- Added missing npm package contents.
+
+## [0.1.4] - 2011-07-29
+
+- Text-only nodes are no longer indented.
+- Added documentation for multiple instances.
+
+## [0.1.3] - 2011-07-27
+
+- Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed.
+- Fixed `u()` function so that it now correctly calls `up()`.
+- Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably.
+
+## [0.1.2] - 2011-06-03
+
+- `ele()` accepts element text.
+- `attributes()` now overrides existing attributes if passed the same attribute name.
+
+## [0.1.1] - 2011-05-19
+
+- Added the raw output option.
+- Removed most validity checks.
+
+## [0.1.0] - 2011-04-27
+
+- `text()` and `cdata()` now return parent element.
+- Attribute values are escaped.
+
+## [0.0.7] - 2011-04-23
+
+- Coerced text values to string.
+
+## [0.0.6] - 2011-02-23
+
+- Added support for XML comments.
+- Text nodes are checked against CharData.
+
+## [0.0.5] - 2010-12-31
+
+- Corrected the name of the main npm module in `package.json`.
+
+## [0.0.4] - 2010-12-28
+
+- Added `.npmignore`.
+
+## [0.0.3] - 2010-12-27
+
+- root element is now constructed in `begin()`.
+- moved prolog to `begin()`.
+- Added the ability to have CDATA in element text.
+- Removed unused prolog aliases.
+- Removed `builder()` function from main module.
+- Added the name of the main npm module in `package.json`.
+
+## [0.0.2] - 2010-11-03
+
+- `element()` expands nested arrays.
+- Added pretty printing.
+- Added the `up()`, `build()` and `prolog()` functions.
+- Added readme.
+
+## 0.0.1 - 2010-11-02
+
+- Initial release
+
+[0.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.1...v0.0.2
+[0.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.2...v0.0.3
+[0.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.3...v0.0.4
+[0.0.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.4...v0.0.5
+[0.0.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.5...v0.0.6
+[0.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.6...v0.0.7
+[0.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.7...v0.1.0
+[0.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.0...v0.1.1
+[0.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.1...v0.1.2
+[0.1.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.2...v0.1.3
+[0.1.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.3...v0.1.4
+[0.1.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.4...v0.1.5
+[0.1.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.5...v0.1.6
+[0.1.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.6...v0.1.7
+[0.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.7...v0.2.0
+[0.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.0...v0.2.1
+[0.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.1...v0.2.2
+[0.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.2...v0.3.0
+[0.3.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.0...v0.3.1
+[0.3.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.1...v0.3.2
+[0.3.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.2...v0.3.3
+[0.3.10]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.3...v0.3.10
+[0.3.11]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.10...v0.3.11
+[0.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.11...v0.4.0
+[0.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.0...v0.4.1
+[0.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.1...v0.4.2
+[0.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.2...v0.4.3
+[1.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.3...v1.0.0
+[1.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.0...v1.0.1
+[1.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.1...v1.0.2
+[1.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.2...v1.1.0
+[1.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.0...v1.1.1
+[1.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.1...v1.1.2
+[2.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.2...v2.0.0
+[2.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.0...v2.0.1
+[2.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.1...v2.1.0
+[2.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.1.0...v2.2.0
+[2.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.0...v2.2.1
+[2.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.1...v2.3.0
+[2.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.3.0...v2.4.0
+[2.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.0...v2.4.1
+[2.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.1...v2.4.2
+[2.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.2...v2.4.3
+[2.4.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.3...v2.4.4
+[2.4.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.4...v2.4.5
+[2.4.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.5...v2.4.6
+[2.5.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.6...v2.5.0
+[2.5.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.0...v2.5.1
+[2.5.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.1...v2.5.2
+[2.6.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.2...v2.6.0
+[2.6.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.0...v2.6.1
+[2.6.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.1...v2.6.2
+[2.6.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.2...v2.6.3
+[2.6.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.3...v2.6.4
+[2.6.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.4...v2.6.5
+[3.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.5...v3.0.0
+[3.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.0.0...v3.1.0
+[4.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.1.0...v4.0.0
+[4.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.0.0...v4.1.0
+[4.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.1.0...v4.2.0
+[4.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.0...v4.2.1
+[5.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.1...v5.0.0
+[5.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.0...v5.0.1
+[6.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.1...v6.0.0
+[7.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v6.0.0...v7.0.0
+[8.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v7.0.0...v8.0.0
+[8.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.0.0...v8.1.0
+[8.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.1.0...v8.2.0
+[8.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.0...v8.2.1
+[8.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.1...v8.2.2
+[9.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.2...v9.0.0
+[9.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.0...v9.0.1
+[9.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.1...v9.0.2
+[9.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.2...v9.0.3
+[9.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.3...v9.0.4
+[9.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.4...v9.0.7
+[10.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.7...v10.0.0
+[10.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.0.0...v10.1.0
+[10.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.0...v10.1.1
+[11.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.1...v11.0.0
+[11.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v11.0.0...v11.0.1
+[12.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v11.0.1...v12.0.0
+[12.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v12.0.0...v12.0.1
+[13.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v12.0.1...v13.0.0
+[13.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.0...v13.0.1
+[13.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.1...v13.0.2
+[14.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v13.0.2...v14.0.0
+[15.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v14.0.0...v15.0.0
+[15.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.0.0...v15.0.1
+[15.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.0.1...v15.1.0
+[15.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v15.1.0...v15.1.1
diff --git a/node_modules/xmlbuilder/LICENSE b/node_modules/xmlbuilder/LICENSE
new file mode 100644
index 0000000..9fb9700
--- /dev/null
+++ b/node_modules/xmlbuilder/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Ozgur Ozcitak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/xmlbuilder/README.md b/node_modules/xmlbuilder/README.md
new file mode 100644
index 0000000..d15b627
--- /dev/null
+++ b/node_modules/xmlbuilder/README.md
@@ -0,0 +1,103 @@
+# xmlbuilder-js
+
+An XML builder for [node.js](https://nodejs.org/) similar to
+[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder).
+
+[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)
+[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
+[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
+
+[![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js)
+[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js)
+[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)
+[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js)
+
+### Announcing `xmlbuilder2`:
+
+The new release of `xmlbuilder` is available at [`xmlbuilder2`](https://github.com/oozcitak/xmlbuilder2)! `xmlbuilder2` has been redesigned from the ground up to be fully conforming to the [modern DOM specification](https://dom.spec.whatwg.org). It supports XML namespaces, provides built-in converters for multiple formats, collection functions, and more. Please see [upgrading from xmlbuilder](https://oozcitak.github.io/xmlbuilder2/upgrading-from-xmlbuilder.html) in the wiki.
+
+New development will be focused towards `xmlbuilder2`; `xmlbuilder` will only receive critical bug fixes.
+
+### Installation:
+
+``` sh
+npm install xmlbuilder
+```
+
+### Usage:
+
+``` js
+var builder = require('xmlbuilder');
+
+var xml = builder.create('root')
+ .ele('xmlbuilder')
+ .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
+ .end({ pretty: true});
+
+console.log(xml);
+```
+
+will result in:
+
+``` xml
+<?xml version="1.0"?>
+<root>
+ <xmlbuilder>
+ <repo type="git">git://github.com/oozcitak/xmlbuilder-js.git</repo>
+ </xmlbuilder>
+</root>
+```
+
+It is also possible to convert objects into nodes:
+
+``` js
+var builder = require('xmlbuilder');
+
+var obj = {
+ root: {
+ xmlbuilder: {
+ repo: {
+ '@type': 'git', // attributes start with @
+ '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node
+ }
+ }
+ }
+};
+
+var xml = builder.create(obj).end({ pretty: true});
+console.log(xml);
+```
+
+If you need to do some processing:
+
+``` js
+var builder = require('xmlbuilder');
+
+var root = builder.create('squares');
+root.com('f(x) = x^2');
+for(var i = 1; i <= 5; i++)
+{
+ var item = root.ele('data');
+ item.att('x', i);
+ item.att('y', i * i);
+}
+
+var xml = root.end({ pretty: true});
+console.log(xml);
+```
+
+This will result in:
+
+``` xml
+<?xml version="1.0"?>
+<squares>
+ <!-- f(x) = x^2 -->
+ <data x="1" y="1"/>
+ <data x="2" y="4"/>
+ <data x="3" y="9"/>
+ <data x="4" y="16"/>
+ <data x="5" y="25"/>
+</squares>
+```
+
+See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples.
diff --git a/node_modules/xmlbuilder/lib/Derivation.js b/node_modules/xmlbuilder/lib/Derivation.js
new file mode 100644
index 0000000..ae3d951
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/Derivation.js
@@ -0,0 +1,10 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Restriction: 1,
+ Extension: 2,
+ Union: 4,
+ List: 8
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/DocumentPosition.js b/node_modules/xmlbuilder/lib/DocumentPosition.js
new file mode 100644
index 0000000..55abc5c
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/DocumentPosition.js
@@ -0,0 +1,12 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Disconnected: 1,
+ Preceding: 2,
+ Following: 4,
+ Contains: 8,
+ ContainedBy: 16,
+ ImplementationSpecific: 32
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/NodeType.js b/node_modules/xmlbuilder/lib/NodeType.js
new file mode 100644
index 0000000..40990ca
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/NodeType.js
@@ -0,0 +1,25 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Element: 1,
+ Attribute: 2,
+ Text: 3,
+ CData: 4,
+ EntityReference: 5,
+ EntityDeclaration: 6,
+ ProcessingInstruction: 7,
+ Comment: 8,
+ Document: 9,
+ DocType: 10,
+ DocumentFragment: 11,
+ NotationDeclaration: 12,
+ // Numeric codes up to 200 are reserved to W3C for possible future use.
+ // Following are types internal to this library:
+ Declaration: 201,
+ Raw: 202,
+ AttributeDeclaration: 203,
+ ElementDeclaration: 204,
+ Dummy: 205
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/OperationType.js b/node_modules/xmlbuilder/lib/OperationType.js
new file mode 100644
index 0000000..47b1046
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/OperationType.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ Clones: 1,
+ Imported: 2,
+ Deleted: 3,
+ Renamed: 4,
+ Adopted: 5
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/Utility.js b/node_modules/xmlbuilder/lib/Utility.js
new file mode 100644
index 0000000..c338865
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/Utility.js
@@ -0,0 +1,88 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Copies all enumerable own properties from `sources` to `target`
+ var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ assign = function(target, ...sources) {
+ var i, key, len, source;
+ if (isFunction(Object.assign)) {
+ Object.assign.apply(null, arguments);
+ } else {
+ for (i = 0, len = sources.length; i < len; i++) {
+ source = sources[i];
+ if (source != null) {
+ for (key in source) {
+ if (!hasProp.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+ }
+ }
+ return target;
+ };
+
+ // Determines if `val` is a Function object
+ isFunction = function(val) {
+ return !!val && Object.prototype.toString.call(val) === '[object Function]';
+ };
+
+ // Determines if `val` is an Object
+ isObject = function(val) {
+ var ref;
+ return !!val && ((ref = typeof val) === 'function' || ref === 'object');
+ };
+
+ // Determines if `val` is an Array
+ isArray = function(val) {
+ if (isFunction(Array.isArray)) {
+ return Array.isArray(val);
+ } else {
+ return Object.prototype.toString.call(val) === '[object Array]';
+ }
+ };
+
+ // Determines if `val` is an empty Array or an Object with no own properties
+ isEmpty = function(val) {
+ var key;
+ if (isArray(val)) {
+ return !val.length;
+ } else {
+ for (key in val) {
+ if (!hasProp.call(val, key)) continue;
+ return false;
+ }
+ return true;
+ }
+ };
+
+ // Determines if `val` is a plain Object
+ isPlainObject = function(val) {
+ var ctor, proto;
+ return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
+ };
+
+ // Gets the primitive value of an object
+ getValue = function(obj) {
+ if (isFunction(obj.valueOf)) {
+ return obj.valueOf();
+ } else {
+ return obj;
+ }
+ };
+
+ module.exports.assign = assign;
+
+ module.exports.isFunction = isFunction;
+
+ module.exports.isObject = isObject;
+
+ module.exports.isArray = isArray;
+
+ module.exports.isEmpty = isEmpty;
+
+ module.exports.isPlainObject = isPlainObject;
+
+ module.exports.getValue = getValue;
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/WriterState.js b/node_modules/xmlbuilder/lib/WriterState.js
new file mode 100644
index 0000000..b1cd7a4
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/WriterState.js
@@ -0,0 +1,10 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ module.exports = {
+ None: 0,
+ OpenTag: 1,
+ InsideTag: 2,
+ CloseTag: 3
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLAttribute.js b/node_modules/xmlbuilder/lib/XMLAttribute.js
new file mode 100644
index 0000000..71922b7
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLAttribute.js
@@ -0,0 +1,130 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLNode;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents an attribute
+ module.exports = XMLAttribute = (function() {
+ class XMLAttribute {
+ // Initializes a new instance of `XMLAttribute`
+
+ // `parent` the parent node
+ // `name` attribute target
+ // `value` attribute value
+ constructor(parent, name, value) {
+ this.parent = parent;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.value = this.stringify.attValue(value);
+ this.type = NodeType.Attribute;
+ // DOM level 3
+ this.isId = false;
+ this.schemaTypeInfo = null;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.attribute(this, this.options.writer.filterOptions(options));
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ name = name || this.name;
+ if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else {
+ return "attribute: {" + name + "}, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ isEqualNode(node) {
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.value !== this.value) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLAttribute.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLAttribute.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLAttribute.prototype, 'specified', {
+ get: function() {
+ return true;
+ }
+ });
+
+ return XMLAttribute;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLCData.js b/node_modules/xmlbuilder/lib/XMLCData.js
new file mode 100644
index 0000000..91a4410
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLCData.js
@@ -0,0 +1,41 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCData, XMLCharacterData;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a CDATA node
+ module.exports = XMLCData = class XMLCData extends XMLCharacterData {
+ // Initializes a new instance of `XMLCData`
+
+ // `text` CDATA text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing CDATA text. " + this.debugInfo());
+ }
+ this.name = "#cdata-section";
+ this.type = NodeType.CData;
+ this.value = this.stringify.cdata(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.cdata(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLCharacterData.js b/node_modules/xmlbuilder/lib/XMLCharacterData.js
new file mode 100644
index 0000000..13b9c00
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLCharacterData.js
@@ -0,0 +1,86 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLCharacterData, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a character data node
+ module.exports = XMLCharacterData = (function() {
+ class XMLCharacterData extends XMLNode {
+ // Initializes a new instance of `XMLCharacterData`
+
+ constructor(parent) {
+ super(parent);
+ this.value = '';
+ }
+
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // DOM level 1 functions to be implemented later
+ substringData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendData(arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ insertData(offset, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ deleteData(offset, count) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ replaceData(offset, count, arg) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.data !== this.data) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLCharacterData.prototype, 'data', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ Object.defineProperty(XMLCharacterData.prototype, 'length', {
+ get: function() {
+ return this.value.length;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLCharacterData.prototype, 'textContent', {
+ get: function() {
+ return this.value;
+ },
+ set: function(value) {
+ return this.value = value || '';
+ }
+ });
+
+ return XMLCharacterData;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLComment.js b/node_modules/xmlbuilder/lib/XMLComment.js
new file mode 100644
index 0000000..2254d63
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLComment.js
@@ -0,0 +1,41 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLComment;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a comment node
+ module.exports = XMLComment = class XMLComment extends XMLCharacterData {
+ // Initializes a new instance of `XMLComment`
+
+ // `text` comment text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing comment text. " + this.debugInfo());
+ }
+ this.name = "#comment";
+ this.type = NodeType.Comment;
+ this.value = this.stringify.comment(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.comment(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js b/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js
new file mode 100644
index 0000000..32e896d
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js
@@ -0,0 +1,80 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;
+
+ XMLDOMErrorHandler = require('./XMLDOMErrorHandler');
+
+ XMLDOMStringList = require('./XMLDOMStringList');
+
+ // Implements the DOMConfiguration interface
+ module.exports = XMLDOMConfiguration = (function() {
+ class XMLDOMConfiguration {
+ constructor() {
+ var clonedSelf;
+ this.defaultParams = {
+ "canonical-form": false,
+ "cdata-sections": false,
+ "comments": false,
+ "datatype-normalization": false,
+ "element-content-whitespace": true,
+ "entities": true,
+ "error-handler": new XMLDOMErrorHandler(),
+ "infoset": true,
+ "validate-if-schema": false,
+ "namespaces": true,
+ "namespace-declarations": true,
+ "normalize-characters": false,
+ "schema-location": '',
+ "schema-type": '',
+ "split-cdata-sections": true,
+ "validate": false,
+ "well-formed": true
+ };
+ this.params = clonedSelf = Object.create(this.defaultParams);
+ }
+
+ // Gets the value of a parameter.
+
+ // `name` name of the parameter
+ getParameter(name) {
+ if (this.params.hasOwnProperty(name)) {
+ return this.params[name];
+ } else {
+ return null;
+ }
+ }
+
+ // Checks if setting a parameter to a specific value is supported.
+
+ // `name` name of the parameter
+ // `value` parameter value
+ canSetParameter(name, value) {
+ return true;
+ }
+
+ // Sets the value of a parameter.
+
+ // `name` name of the parameter
+ // `value` new value or null if the user wishes to unset the parameter
+ setParameter(name, value) {
+ if (value != null) {
+ return this.params[name] = value;
+ } else {
+ return delete this.params[name];
+ }
+ }
+
+ };
+
+ // Returns the list of parameter names
+ Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {
+ get: function() {
+ return new XMLDOMStringList(Object.keys(this.defaultParams));
+ }
+ });
+
+ return XMLDOMConfiguration;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js b/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js
new file mode 100644
index 0000000..b546a0c
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js
@@ -0,0 +1,20 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents the error handler for DOM operations
+ var XMLDOMErrorHandler;
+
+ module.exports = XMLDOMErrorHandler = class XMLDOMErrorHandler {
+ // Initializes a new instance of `XMLDOMErrorHandler`
+
+ constructor() {}
+
+ // Called on the error handler when an error occurs.
+
+ // `error` the error message as a string
+ handleError(error) {
+ throw new Error(error);
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDOMImplementation.js b/node_modules/xmlbuilder/lib/XMLDOMImplementation.js
new file mode 100644
index 0000000..4b5be79
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDOMImplementation.js
@@ -0,0 +1,55 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Implements the DOMImplementation interface
+ var XMLDOMImplementation;
+
+ module.exports = XMLDOMImplementation = class XMLDOMImplementation {
+ // Tests if the DOM implementation implements a specific feature.
+
+ // `feature` package name of the feature to test. In Level 1, the
+ // legal values are "HTML" and "XML" (case-insensitive).
+ // `version` version number of the package name to test.
+ // In Level 1, this is the string "1.0". If the version is
+ // not specified, supporting any version of the feature will
+ // cause the method to return true.
+ hasFeature(feature, version) {
+ return true;
+ }
+
+ // Creates a new document type declaration.
+
+ // `qualifiedName` qualified name of the document type to be created
+ // `publicId` public identifier of the external subset
+ // `systemId` system identifier of the external subset
+ createDocumentType(qualifiedName, publicId, systemId) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new document.
+
+ // `namespaceURI` namespace URI of the document element to create
+ // `qualifiedName` the qualified name of the document to be created
+ // `doctype` the type of document to be created or null
+ createDocument(namespaceURI, qualifiedName, doctype) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Creates a new HTML document.
+
+ // `title` document title
+ createHTMLDocument(title) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ // Returns a specialized object which implements the specialized APIs
+ // of the specified feature and version.
+
+ // `feature` name of the feature requested.
+ // `version` version number of the feature to test
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDOMStringList.js b/node_modules/xmlbuilder/lib/XMLDOMStringList.js
new file mode 100644
index 0000000..7e87e8e
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDOMStringList.js
@@ -0,0 +1,44 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of string entries
+ var XMLDOMStringList;
+
+ module.exports = XMLDOMStringList = (function() {
+ class XMLDOMStringList {
+ // Initializes a new instance of `XMLDOMStringList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `arr` the array of string values
+ constructor(arr) {
+ this.arr = arr || [];
+ }
+
+ // Returns the indexth item in the collection.
+
+ // `index` index into the collection
+ item(index) {
+ return this.arr[index] || null;
+ }
+
+ // Test if a string is part of this DOMStringList.
+
+ // `str` the string to look for
+ contains(str) {
+ return this.arr.indexOf(str) !== -1;
+ }
+
+ };
+
+ // Returns the number of strings in the list.
+ Object.defineProperty(XMLDOMStringList.prototype, 'length', {
+ get: function() {
+ return this.arr.length;
+ }
+ });
+
+ return XMLDOMStringList;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/node_modules/xmlbuilder/lib/XMLDTDAttList.js
new file mode 100644
index 0000000..8637ea2
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDTDAttList.js
@@ -0,0 +1,66 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute list
+ module.exports = XMLDTDAttList = class XMLDTDAttList extends XMLNode {
+ // Initializes a new instance of `XMLDTDAttList`
+
+ // `parent` the parent `XMLDocType` element
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED,
+ // #FIXED or #DEFAULT)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ constructor(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ super(parent);
+ if (elementName == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (attributeName == null) {
+ throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName));
+ }
+ if (!attributeType) {
+ throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName));
+ }
+ if (!defaultValueType) {
+ throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName));
+ }
+ if (defaultValueType.indexOf('#') !== 0) {
+ defaultValueType = '#' + defaultValueType;
+ }
+ if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {
+ throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {
+ throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName));
+ }
+ this.elementName = this.stringify.name(elementName);
+ this.type = NodeType.AttributeDeclaration;
+ this.attributeName = this.stringify.name(attributeName);
+ this.attributeType = this.stringify.dtdAttType(attributeType);
+ if (defaultValue) {
+ this.defaultValue = this.stringify.dtdAttDefault(defaultValue);
+ }
+ this.defaultValueType = defaultValueType;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDTDElement.js b/node_modules/xmlbuilder/lib/XMLDTDElement.js
new file mode 100644
index 0000000..a154679
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDTDElement.js
@@ -0,0 +1,44 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDElement, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an attribute
+ module.exports = XMLDTDElement = class XMLDTDElement extends XMLNode {
+ // Initializes a new instance of `XMLDTDElement`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD element name. " + this.debugInfo());
+ }
+ if (!value) {
+ value = '(#PCDATA)';
+ }
+ if (Array.isArray(value)) {
+ value = '(' + value.join(',') + ')';
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.ElementDeclaration;
+ this.value = this.stringify.dtdElementValue(value);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/node_modules/xmlbuilder/lib/XMLDTDEntity.js
new file mode 100644
index 0000000..76bf665
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDTDEntity.js
@@ -0,0 +1,115 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDEntity, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents an entity declaration in the DTD
+ module.exports = XMLDTDEntity = (function() {
+ class XMLDTDEntity extends XMLNode {
+ // Initializes a new instance of `XMLDTDEntity`
+
+ // `parent` the parent `XMLDocType` element
+ // `pe` whether this is a parameter entity or a general entity
+ // defaults to `false` (general entity)
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ constructor(parent, pe, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD entity name. " + this.debugInfo(name));
+ }
+ if (value == null) {
+ throw new Error("Missing DTD entity value. " + this.debugInfo(name));
+ }
+ this.pe = !!pe;
+ this.name = this.stringify.name(name);
+ this.type = NodeType.EntityDeclaration;
+ if (!isObject(value)) {
+ this.value = this.stringify.dtdEntityValue(value);
+ this.internal = true;
+ } else {
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ if (value.pubID && !value.sysID) {
+ throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name));
+ }
+ this.internal = false;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ if (value.nData != null) {
+ this.nData = this.stringify.dtdNData(value.nData);
+ }
+ if (this.pe && this.nData) {
+ throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name));
+ }
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {
+ get: function() {
+ return this.nData || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDTDEntity;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/node_modules/xmlbuilder/lib/XMLDTDNotation.js
new file mode 100644
index 0000000..37a469a
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDTDNotation.js
@@ -0,0 +1,66 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDNotation, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a NOTATION entry in the DTD
+ module.exports = XMLDTDNotation = (function() {
+ class XMLDTDNotation extends XMLNode {
+ // Initializes a new instance of `XMLDTDNotation`
+
+ // `parent` the parent `XMLDocType` element
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ constructor(parent, name, value) {
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing DTD notation name. " + this.debugInfo(name));
+ }
+ if (!value.pubID && !value.sysID) {
+ throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name));
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.NotationDeclaration;
+ if (value.pubID != null) {
+ this.pubID = this.stringify.dtdPubID(value.pubID);
+ }
+ if (value.sysID != null) {
+ this.sysID = this.stringify.dtdSysID(value.sysID);
+ }
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ return XMLDTDNotation;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDeclaration.js b/node_modules/xmlbuilder/lib/XMLDeclaration.js
new file mode 100644
index 0000000..90b8edc
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDeclaration.js
@@ -0,0 +1,51 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDeclaration, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents the XML declaration
+ module.exports = XMLDeclaration = class XMLDeclaration extends XMLNode {
+ // Initializes a new instance of `XMLDeclaration`
+
+ // `parent` the document object
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ constructor(parent, version, encoding, standalone) {
+ super(parent);
+ // arguments may also be passed as an object
+ if (isObject(version)) {
+ ({version, encoding, standalone} = version);
+ }
+ if (!version) {
+ version = '1.0';
+ }
+ this.type = NodeType.Declaration;
+ this.version = this.stringify.xmlVersion(version);
+ if (encoding != null) {
+ this.encoding = this.stringify.xmlEncoding(encoding);
+ }
+ if (standalone != null) {
+ this.standalone = this.stringify.xmlStandalone(standalone);
+ }
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.declaration(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDocType.js b/node_modules/xmlbuilder/lib/XMLDocType.js
new file mode 100644
index 0000000..4af825f
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDocType.js
@@ -0,0 +1,235 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject;
+
+ ({isObject} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents doctype declaration
+ module.exports = XMLDocType = (function() {
+ class XMLDocType extends XMLNode {
+ // Initializes a new instance of `XMLDocType`
+
+ // `parent` the document object
+
+ // `pubID` public identifier of the external subset
+ // `sysID` system identifier of the external subset
+ constructor(parent, pubID, sysID) {
+ var child, i, len, ref;
+ super(parent);
+ this.type = NodeType.DocType;
+ // set DTD name to the name of the root node
+ if (parent.children) {
+ ref = parent.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.Element) {
+ this.name = child.name;
+ break;
+ }
+ }
+ }
+ this.documentObject = parent;
+ // arguments may also be passed as an object
+ if (isObject(pubID)) {
+ ({pubID, sysID} = pubID);
+ }
+ if (sysID == null) {
+ [sysID, pubID] = [pubID, sysID];
+ }
+ if (pubID != null) {
+ this.pubID = this.stringify.dtdPubID(pubID);
+ }
+ if (sysID != null) {
+ this.sysID = this.stringify.dtdSysID(sysID);
+ }
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ element(name, value) {
+ var child;
+ child = new XMLDTDElement(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var child;
+ child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, false, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var child;
+ child = new XMLDTDEntity(this, true, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var child;
+ child = new XMLDTDNotation(this, name, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Converts to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.docType(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ ele(name, value) {
+ return this.element(name, value);
+ }
+
+ att(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ }
+
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ up() {
+ return this.root() || this.documentObject;
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.name !== this.name) {
+ return false;
+ }
+ if (node.publicId !== this.publicId) {
+ return false;
+ }
+ if (node.systemId !== this.systemId) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocType.prototype, 'entities', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if ((child.type === NodeType.EntityDeclaration) && !child.pe) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'notations', {
+ get: function() {
+ var child, i, len, nodes, ref;
+ nodes = {};
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.NotationDeclaration) {
+ nodes[child.name] = child;
+ }
+ }
+ return new XMLNamedNodeMap(nodes);
+ }
+ });
+
+ // DOM level 2
+ Object.defineProperty(XMLDocType.prototype, 'publicId', {
+ get: function() {
+ return this.pubID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'systemId', {
+ get: function() {
+ return this.sysID;
+ }
+ });
+
+ Object.defineProperty(XMLDocType.prototype, 'internalSubset', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLDocType;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDocument.js b/node_modules/xmlbuilder/lib/XMLDocument.js
new file mode 100644
index 0000000..56ec08f
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDocument.js
@@ -0,0 +1,282 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject;
+
+ ({isPlainObject} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDOMConfiguration = require('./XMLDOMConfiguration');
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ // Represents an XML builder
+ module.exports = XMLDocument = (function() {
+ class XMLDocument extends XMLNode {
+ // Initializes a new instance of `XMLDocument`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ constructor(options) {
+ super(null);
+ this.name = "#document";
+ this.type = NodeType.Document;
+ this.documentURI = null;
+ this.domConfig = new XMLDOMConfiguration();
+ options || (options = {});
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.stringify = new XMLStringifier(options);
+ }
+
+ // Ends the document and passes it to the given XML writer
+
+ // `writer` is either an XML writer or a plain object to pass to the
+ // constructor of the default XML writer. The default writer is assigned when
+ // creating the XML document. Following flags are recognized by the
+ // built-in XMLStringWriter:
+ // `writer.pretty` pretty prints the result
+ // `writer.indent` indentation for pretty print
+ // `writer.offset` how many indentations to add to every line for pretty print
+ // `writer.newline` newline sequence for pretty print
+ end(writer) {
+ var writerOptions;
+ writerOptions = {};
+ if (!writer) {
+ writer = this.options.writer;
+ } else if (isPlainObject(writer)) {
+ writerOptions = writer;
+ writer = this.options.writer;
+ }
+ return writer.document(this, writer.filterOptions(writerOptions));
+ }
+
+ // Converts the XML document to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.document(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ createElement(tagName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createDocumentFragment() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTextNode(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createComment(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createCDATASection(data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createProcessingInstruction(target, data) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttribute(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEntityReference(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2 functions to be implemented later
+ importNode(importedNode, deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createElementNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createAttributeNS(namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementById(elementId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ adoptNode(source) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalizeDocument() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ renameNode(node, namespaceURI, qualifiedName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 4 functions to be implemented later
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createEvent(eventInterface) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createRange() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createNodeIterator(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ createTreeWalker(root, whatToShow, filter) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLDocument.prototype, 'implementation', {
+ value: new XMLDOMImplementation()
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'doctype', {
+ get: function() {
+ var child, i, len, ref;
+ ref = this.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ if (child.type === NodeType.DocType) {
+ return child;
+ }
+ }
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'documentElement', {
+ get: function() {
+ return this.rootObject || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {
+ get: function() {
+ return false;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].encoding;
+ } else {
+ return null;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].standalone === 'yes';
+ } else {
+ return false;
+ }
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {
+ get: function() {
+ if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {
+ return this.children[0].version;
+ } else {
+ return "1.0";
+ }
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLDocument.prototype, 'URL', {
+ get: function() {
+ return this.documentURI;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'origin', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'compatMode', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'characterSet', {
+ get: function() {
+ return null;
+ }
+ });
+
+ Object.defineProperty(XMLDocument.prototype, 'contentType', {
+ get: function() {
+ return null;
+ }
+ });
+
+ return XMLDocument;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDocumentCB.js b/node_modules/xmlbuilder/lib/XMLDocumentCB.js
new file mode 100644
index 0000000..c55a4bf
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDocumentCB.js
@@ -0,0 +1,650 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, isPlainObject, getValue} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLElement = require('./XMLElement');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLStringifier = require('./XMLStringifier');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ WriterState = require('./WriterState');
+
+ // Represents an XML builder
+ module.exports = XMLDocumentCB = class XMLDocumentCB {
+ // Initializes a new instance of `XMLDocumentCB`
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its first
+ // argument, and the current indentation level as its second argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ constructor(options, onData, onEnd) {
+ var writerOptions;
+ this.name = "?xml";
+ this.type = NodeType.Document;
+ options || (options = {});
+ writerOptions = {};
+ if (!options.writer) {
+ options.writer = new XMLStringWriter();
+ } else if (isPlainObject(options.writer)) {
+ writerOptions = options.writer;
+ options.writer = new XMLStringWriter();
+ }
+ this.options = options;
+ this.writer = options.writer;
+ this.writerOptions = this.writer.filterOptions(writerOptions);
+ this.stringify = new XMLStringifier(options);
+ this.onDataCallback = onData || function() {};
+ this.onEndCallback = onEnd || function() {};
+ this.currentNode = null;
+ this.currentLevel = -1;
+ this.openTags = {};
+ this.documentStarted = false;
+ this.documentCompleted = false;
+ this.root = null;
+ }
+
+ // Creates a child element node from the given XMLNode
+
+ // `node` the child node
+ createChildNode(node) {
+ var att, attName, attributes, child, i, len, ref, ref1;
+ switch (node.type) {
+ case NodeType.CData:
+ this.cdata(node.value);
+ break;
+ case NodeType.Comment:
+ this.comment(node.value);
+ break;
+ case NodeType.Element:
+ attributes = {};
+ ref = node.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ attributes[attName] = att.value;
+ }
+ this.node(node.name, attributes);
+ break;
+ case NodeType.Dummy:
+ this.dummy();
+ break;
+ case NodeType.Raw:
+ this.raw(node.value);
+ break;
+ case NodeType.Text:
+ this.text(node.value);
+ break;
+ case NodeType.ProcessingInstruction:
+ this.instruction(node.target, node.value);
+ break;
+ default:
+ throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name);
+ }
+ ref1 = node.children;
+ // write child nodes recursively
+ for (i = 0, len = ref1.length; i < len; i++) {
+ child = ref1[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ return this;
+ }
+
+ // Creates a dummy node
+
+ dummy() {
+ // no-op, just return this
+ return this;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ if (name == null) {
+ throw new Error("Missing node name.");
+ }
+ if (this.root && this.currentLevel === -1) {
+ throw new Error("Document can only have one root node. " + this.debugInfo(name));
+ }
+ this.openCurrent();
+ name = getValue(name);
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ this.currentNode = new XMLElement(this, name, attributes);
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ if (text != null) {
+ this.text(text);
+ }
+ return this;
+ }
+
+ // Creates a child element node or an element type declaration when called
+ // inside the DTD
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var child, i, len, oldValidationFlag, ref, root;
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ this.dtdElement(...arguments);
+ } else {
+ if (Array.isArray(name) || isObject(name) || isFunction(name)) {
+ oldValidationFlag = this.options.noValidation;
+ this.options.noValidation = true;
+ root = new XMLDocument(this.options).element('TEMP_ROOT');
+ root.element(name);
+ this.options.noValidation = oldValidationFlag;
+ ref = root.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ this.createChildNode(child);
+ if (child.type === NodeType.Element) {
+ this.up();
+ }
+ }
+ } else {
+ this.node(name, attributes, text);
+ }
+ }
+ return this;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (!this.currentNode || this.currentNode.children) {
+ throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name));
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.currentNode.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLText(this, value);
+ this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLCData(this, value);
+ this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLComment(this, value);
+ this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var node;
+ this.openCurrent();
+ node = new XMLRaw(this, value);
+ this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var i, insTarget, insValue, len, node;
+ this.openCurrent();
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (i = 0, len = target.length; i < len; i++) {
+ insTarget = target[i];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ node = new XMLProcessingInstruction(this, target, value);
+ this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ }
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var node;
+ this.openCurrent();
+ if (this.documentStarted) {
+ throw new Error("declaration() must be the first node.");
+ }
+ node = new XMLDeclaration(this, version, encoding, standalone);
+ this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates the document type declaration
+
+ // `root` the name of the root node
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ doctype(root, pubID, sysID) {
+ this.openCurrent();
+ if (root == null) {
+ throw new Error("Missing root node name.");
+ }
+ if (this.root) {
+ throw new Error("dtd() must come before the root node.");
+ }
+ this.currentNode = new XMLDocType(this, pubID, sysID);
+ this.currentNode.rootNodeName = root;
+ this.currentNode.children = false;
+ this.currentLevel++;
+ this.openTags[this.currentLevel] = this.currentNode;
+ return this;
+ }
+
+ // Creates an element type declaration
+
+ // `name` element name
+ // `value` element content (defaults to #PCDATA)
+ dtdElement(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDElement(this, name, value);
+ this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates an attribute declaration
+
+ // `elementName` the name of the element containing this attribute
+ // `attributeName` attribute name
+ // `attributeType` type of the attribute (defaults to CDATA)
+ // `defaultValueType` default value type (either #REQUIRED, #IMPLIED, #FIXED or
+ // #DEFAULT) (defaults to #IMPLIED)
+ // `defaultValue` default value of the attribute
+ // (only used for #FIXED or #DEFAULT)
+ attList(elementName, attributeName, attributeType, defaultValueType, defaultValue) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);
+ this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a general entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ // `value.nData` notation declaration
+ entity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, false, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a parameter entity declaration
+
+ // `name` the name of the entity
+ // `value` internal entity value or an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ pEntity(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDEntity(this, true, name, value);
+ this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Creates a NOTATION declaration
+
+ // `name` the name of the notation
+ // `value` an object with external entity details
+ // `value.pubID` public identifier
+ // `value.sysID` system identifier
+ notation(name, value) {
+ var node;
+ this.openCurrent();
+ node = new XMLDTDNotation(this, name, value);
+ this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
+ return this;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.currentLevel < 0) {
+ throw new Error("The document node has no parent.");
+ }
+ if (this.currentNode) {
+ if (this.currentNode.children) {
+ this.closeNode(this.currentNode);
+ } else {
+ this.openNode(this.currentNode);
+ }
+ this.currentNode = null;
+ } else {
+ this.closeNode(this.openTags[this.currentLevel]);
+ }
+ delete this.openTags[this.currentLevel];
+ this.currentLevel--;
+ return this;
+ }
+
+ // Ends the document
+ end() {
+ while (this.currentLevel >= 0) {
+ this.up();
+ }
+ return this.onEnd();
+ }
+
+ // Opens the current parent node
+ openCurrent() {
+ if (this.currentNode) {
+ this.currentNode.children = true;
+ return this.openNode(this.currentNode);
+ }
+ }
+
+ // Writes the opening tag of the current node or the entire node if it has
+ // no child nodes
+ openNode(node) {
+ var att, chunk, name, ref;
+ if (!node.isOpen) {
+ if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {
+ this.root = node;
+ }
+ chunk = '';
+ if (node.type === NodeType.Element) {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);
+ }
+ chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ this.writerOptions.state = WriterState.InsideTag; // if node.type is NodeType.DocType
+ } else {
+ this.writerOptions.state = WriterState.OpenTag;
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<!DOCTYPE ' + node.rootNodeName;
+
+ // external identifier
+ if (node.pubID && node.sysID) {
+ chunk += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ chunk += ' SYSTEM "' + node.sysID + '"';
+ }
+
+ // internal subset
+ if (node.children) {
+ chunk += ' [';
+ this.writerOptions.state = WriterState.InsideTag;
+ } else {
+ this.writerOptions.state = WriterState.CloseTag;
+ chunk += '>';
+ }
+ chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.onData(chunk, this.currentLevel);
+ return node.isOpen = true;
+ }
+ }
+
+ // Writes the closing tag of the current node
+ closeNode(node) {
+ var chunk;
+ if (!node.isClosed) {
+ chunk = '';
+ this.writerOptions.state = WriterState.CloseTag;
+ if (node.type === NodeType.Element) {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '</' + node.name + '>' + this.writer.endline(node, this.writerOptions, this.currentLevel); // if node.type is NodeType.DocType
+ } else {
+ chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);
+ }
+ this.writerOptions.state = WriterState.None;
+ this.onData(chunk, this.currentLevel);
+ return node.isClosed = true;
+ }
+ }
+
+ // Called when a new chunk of XML is output
+
+ // `chunk` a string containing the XML chunk
+ // `level` current indentation level
+ onData(chunk, level) {
+ this.documentStarted = true;
+ return this.onDataCallback(chunk, level + 1);
+ }
+
+ // Called when the XML document is completed
+ onEnd() {
+ this.documentCompleted = true;
+ return this.onEndCallback();
+ }
+
+ // Returns debug string
+ debugInfo(name) {
+ if (name == null) {
+ return "";
+ } else {
+ return "node: <" + name + ">";
+ }
+ }
+
+ // Node aliases
+ ele() {
+ return this.element(...arguments);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ dtd(root, pubID, sysID) {
+ return this.doctype(root, pubID, sysID);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ // Attribute aliases
+ att() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ a() {
+ if (this.currentNode && this.currentNode.type === NodeType.DocType) {
+ return this.attList(...arguments);
+ } else {
+ return this.attribute(...arguments);
+ }
+ }
+
+ // DTD aliases
+ // att() and ele() are defined above
+ ent(name, value) {
+ return this.entity(name, value);
+ }
+
+ pent(name, value) {
+ return this.pEntity(name, value);
+ }
+
+ not(name, value) {
+ return this.notation(name, value);
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDocumentFragment.js b/node_modules/xmlbuilder/lib/XMLDocumentFragment.js
new file mode 100644
index 0000000..fbd42ba
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDocumentFragment.js
@@ -0,0 +1,21 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDocumentFragment, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a CDATA node
+ module.exports = XMLDocumentFragment = class XMLDocumentFragment extends XMLNode {
+ // Initializes a new instance of `XMLDocumentFragment`
+
+ constructor() {
+ super(null);
+ this.name = "#document-fragment";
+ this.type = NodeType.DocumentFragment;
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLDummy.js b/node_modules/xmlbuilder/lib/XMLDummy.js
new file mode 100644
index 0000000..06ab8af
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLDummy.js
@@ -0,0 +1,39 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLDummy, XMLNode;
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ // Represents a raw node
+ module.exports = XMLDummy = class XMLDummy extends XMLNode {
+ // Initializes a new instance of `XMLDummy`
+
+ // `XMLDummy` is a special node representing a node with
+ // a null value. Dummy nodes are created while recursively
+ // building the XML tree. Simply skipping null values doesn't
+ // work because that would break the recursive chain.
+ constructor(parent) {
+ super(parent);
+ this.type = NodeType.Dummy;
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return '';
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLElement.js b/node_modules/xmlbuilder/lib/XMLElement.js
new file mode 100644
index 0000000..3e9da57
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLElement.js
@@ -0,0 +1,334 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject,
+ hasProp = {}.hasOwnProperty;
+
+ ({isObject, isFunction, getValue} = require('./Utility'));
+
+ XMLNode = require('./XMLNode');
+
+ NodeType = require('./NodeType');
+
+ XMLAttribute = require('./XMLAttribute');
+
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+
+ // Represents an element of the XML document
+ module.exports = XMLElement = (function() {
+ class XMLElement extends XMLNode {
+ // Initializes a new instance of `XMLElement`
+
+ // `parent` the parent node
+ // `name` element name
+ // `attributes` an object containing name/value pairs of attributes
+ constructor(parent, name, attributes) {
+ var child, j, len, ref;
+ super(parent);
+ if (name == null) {
+ throw new Error("Missing element name. " + this.debugInfo());
+ }
+ this.name = this.stringify.name(name);
+ this.type = NodeType.Element;
+ this.attribs = {};
+ this.schemaTypeInfo = null;
+ if (attributes != null) {
+ this.attribute(attributes);
+ }
+ // set properties if this is the root node
+ if (parent.type === NodeType.Document) {
+ this.isRoot = true;
+ this.documentObject = parent;
+ parent.rootObject = this;
+ // set dtd name
+ if (parent.children) {
+ ref = parent.children;
+ for (j = 0, len = ref.length; j < len; j++) {
+ child = ref[j];
+ if (child.type === NodeType.DocType) {
+ child.name = this.name;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ var att, attName, clonedSelf, ref;
+ clonedSelf = Object.create(this);
+ // remove document element
+ if (clonedSelf.isRoot) {
+ clonedSelf.documentObject = null;
+ }
+ // clone attributes
+ clonedSelf.attribs = {};
+ ref = this.attribs;
+ for (attName in ref) {
+ if (!hasProp.call(ref, attName)) continue;
+ att = ref[attName];
+ clonedSelf.attribs[attName] = att.clone();
+ }
+ // clone child nodes
+ clonedSelf.children = [];
+ this.children.forEach(function(child) {
+ var clonedChild;
+ clonedChild = child.clone();
+ clonedChild.parent = clonedSelf;
+ return clonedSelf.children.push(clonedChild);
+ });
+ return clonedSelf;
+ }
+
+ // Adds or modifies an attribute
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ var attName, attValue;
+ if (name != null) {
+ name = getValue(name);
+ }
+ if (isObject(name)) { // expand if object
+ for (attName in name) {
+ if (!hasProp.call(name, attName)) continue;
+ attValue = name[attName];
+ this.attribute(attName, attValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ if (this.options.keepNullAttributes && (value == null)) {
+ this.attribs[name] = new XMLAttribute(this, name, "");
+ } else if (value != null) {
+ this.attribs[name] = new XMLAttribute(this, name, value);
+ }
+ }
+ return this;
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ var attName, j, len;
+ // Also defined in DOM level 1
+ // removeAttribute(name) removes an attribute by name.
+ if (name == null) {
+ throw new Error("Missing attribute name. " + this.debugInfo());
+ }
+ name = getValue(name);
+ if (Array.isArray(name)) { // expand if array
+ for (j = 0, len = name.length; j < len; j++) {
+ attName = name[j];
+ delete this.attribs[attName];
+ }
+ } else {
+ delete this.attribs[name];
+ }
+ return this;
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ // `options.allowEmpty` do not self close empty element tags
+ toString(options) {
+ return this.options.writer.element(this, this.options.writer.filterOptions(options));
+ }
+
+ // Aliases
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // DOM Level 1
+ getAttribute(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].value;
+ } else {
+ return null;
+ }
+ }
+
+ setAttribute(name, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNode(name) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name];
+ } else {
+ return null;
+ }
+ }
+
+ setAttributeNode(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNode(oldAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagName(name) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 2
+ getAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNS(namespaceURI, qualifiedName, value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getAttributeNodeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setAttributeNodeNS(newAttr) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasAttribute(name) {
+ return this.attribs.hasOwnProperty(name);
+ }
+
+ hasAttributeNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 3
+ setIdAttribute(name, isId) {
+ if (this.attribs.hasOwnProperty(name)) {
+ return this.attribs[name].isId;
+ } else {
+ return isId;
+ }
+ }
+
+ setIdAttributeNS(namespaceURI, localName, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setIdAttributeNode(idAttr, isId) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM Level 4
+ getElementsByTagName(tagname) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByTagNameNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getElementsByClassName(classNames) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref;
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.namespaceURI !== this.namespaceURI) {
+ return false;
+ }
+ if (node.prefix !== this.prefix) {
+ return false;
+ }
+ if (node.localName !== this.localName) {
+ return false;
+ }
+ if (node.attribs.length !== this.attribs.length) {
+ return false;
+ }
+ for (i = j = 0, ref = this.attribs.length - 1; (0 <= ref ? j <= ref : j >= ref); i = 0 <= ref ? ++j : --j) {
+ if (!this.attribs[i].isEqualNode(node.attribs[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLElement.prototype, 'tagName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ // DOM level 4
+ Object.defineProperty(XMLElement.prototype, 'namespaceURI', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'prefix', {
+ get: function() {
+ return '';
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'localName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'id', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'className', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'classList', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLElement.prototype, 'attributes', {
+ get: function() {
+ if (!this.attributeMap || !this.attributeMap.nodes) {
+ this.attributeMap = new XMLNamedNodeMap(this.attribs);
+ }
+ return this.attributeMap;
+ }
+ });
+
+ return XMLElement;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js b/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js
new file mode 100644
index 0000000..8c91969
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js
@@ -0,0 +1,77 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a map of nodes accessed by a string key
+ var XMLNamedNodeMap;
+
+ module.exports = XMLNamedNodeMap = (function() {
+ class XMLNamedNodeMap {
+ // Initializes a new instance of `XMLNamedNodeMap`
+ // This is just a wrapper around an ordinary
+ // JS object.
+
+ // `nodes` the object containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given object. The calling function should check
+ // whether the wrapped object is null and supply a new object
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ getNamedItem(name) {
+ return this.nodes[name];
+ }
+
+ setNamedItem(node) {
+ var oldNode;
+ oldNode = this.nodes[node.nodeName];
+ this.nodes[node.nodeName] = node;
+ return oldNode || null;
+ }
+
+ removeNamedItem(name) {
+ var oldNode;
+ oldNode = this.nodes[name];
+ delete this.nodes[name];
+ return oldNode || null;
+ }
+
+ item(index) {
+ return this.nodes[Object.keys(this.nodes)[index]] || null;
+ }
+
+ // DOM level 2 functions to be implemented later
+ getNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ setNamedItemNS(node) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ removeNamedItemNS(namespaceURI, localName) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+
+ // DOM level 1
+ Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {
+ get: function() {
+ return Object.keys(this.nodes).length || 0;
+ }
+ });
+
+ return XMLNamedNodeMap;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLNode.js b/node_modules/xmlbuilder/lib/XMLNode.js
new file mode 100644
index 0000000..0ade97b
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLNode.js
@@ -0,0 +1,999 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject,
+ hasProp = {}.hasOwnProperty,
+ splice = [].splice;
+
+ ({isObject, isFunction, isEmpty, getValue} = require('./Utility'));
+
+ XMLElement = null;
+
+ XMLCData = null;
+
+ XMLComment = null;
+
+ XMLDeclaration = null;
+
+ XMLDocType = null;
+
+ XMLRaw = null;
+
+ XMLText = null;
+
+ XMLProcessingInstruction = null;
+
+ XMLDummy = null;
+
+ NodeType = null;
+
+ XMLNodeList = null;
+
+ XMLNamedNodeMap = null;
+
+ DocumentPosition = null;
+
+ // Represents a generic XMl element
+ module.exports = XMLNode = (function() {
+ class XMLNode {
+ // Initializes a new instance of `XMLNode`
+
+ // `parent` the parent node
+ constructor(parent1) {
+ this.parent = parent1;
+ if (this.parent) {
+ this.options = this.parent.options;
+ this.stringify = this.parent.stringify;
+ }
+ this.value = null;
+ this.children = [];
+ this.baseURI = null;
+ // first execution, load dependencies that are otherwise
+ // circular (so we can't load them at the top)
+ if (!XMLElement) {
+ XMLElement = require('./XMLElement');
+ XMLCData = require('./XMLCData');
+ XMLComment = require('./XMLComment');
+ XMLDeclaration = require('./XMLDeclaration');
+ XMLDocType = require('./XMLDocType');
+ XMLRaw = require('./XMLRaw');
+ XMLText = require('./XMLText');
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+ XMLDummy = require('./XMLDummy');
+ NodeType = require('./NodeType');
+ XMLNodeList = require('./XMLNodeList');
+ XMLNamedNodeMap = require('./XMLNamedNodeMap');
+ DocumentPosition = require('./DocumentPosition');
+ }
+ }
+
+
+ // Sets the parent node of this node and its children recursively
+
+ // `parent` the parent node
+ setParent(parent) {
+ var child, j, len, ref1, results;
+ this.parent = parent;
+ if (parent) {
+ this.options = parent.options;
+ this.stringify = parent.stringify;
+ }
+ ref1 = this.children;
+ results = [];
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ results.push(child.setParent(this));
+ }
+ return results;
+ }
+
+ // Creates a child element node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ element(name, attributes, text) {
+ var childNode, item, j, k, key, lastChild, len, len1, val;
+ lastChild = null;
+ if (attributes === null && (text == null)) {
+ [attributes, text] = [{}, null];
+ }
+ if (attributes == null) {
+ attributes = {};
+ }
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ if (name != null) {
+ name = getValue(name);
+ }
+ // expand if array
+ if (Array.isArray(name)) {
+ for (j = 0, len = name.length; j < len; j++) {
+ item = name[j];
+ lastChild = this.element(item);
+ }
+ // evaluate if function
+ } else if (isFunction(name)) {
+ lastChild = this.element(name.apply());
+ // expand if object
+ } else if (isObject(name)) {
+ for (key in name) {
+ if (!hasProp.call(name, key)) continue;
+ val = name[key];
+ if (isFunction(val)) {
+ // evaluate if function
+ val = val.apply();
+ }
+ // assign attributes
+ if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
+ lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
+ // skip empty arrays
+ } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
+ lastChild = this.dummy();
+ // empty objects produce one node
+ } else if (isObject(val) && isEmpty(val)) {
+ lastChild = this.element(key);
+ // skip null and undefined nodes
+ } else if (!this.options.keepNullNodes && (val == null)) {
+ lastChild = this.dummy();
+
+ // expand list by creating child nodes
+ } else if (!this.options.separateArrayItems && Array.isArray(val)) {
+ for (k = 0, len1 = val.length; k < len1; k++) {
+ item = val[k];
+ childNode = {};
+ childNode[key] = item;
+ lastChild = this.element(childNode);
+ }
+
+ // expand child nodes under parent
+ } else if (isObject(val)) {
+ // if the key is #text expand child nodes under this node to support mixed content
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.element(val);
+ } else {
+ lastChild = this.element(key);
+ lastChild.element(val);
+ }
+ } else {
+
+ // text node
+ lastChild = this.element(key, val);
+ }
+ }
+ // skip null nodes
+ } else if (!this.options.keepNullNodes && text === null) {
+ lastChild = this.dummy();
+ } else {
+ // text node
+ if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
+ lastChild = this.text(text);
+ // cdata node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
+ lastChild = this.cdata(text);
+ // comment node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
+ lastChild = this.comment(text);
+ // raw text node
+ } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
+ lastChild = this.raw(text);
+ // processing instruction
+ } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
+ lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
+ } else {
+ // element node
+ lastChild = this.node(name, attributes, text);
+ }
+ }
+ if (lastChild == null) {
+ throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
+ }
+ return lastChild;
+ }
+
+ // Creates a child element node before the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertBefore(name, attributes, text) {
+ var child, i, newChild, refChild, removed;
+ // DOM level 1
+ // insertBefore(newChild, refChild) inserts the child node newChild before refChild
+ if (name != null ? name.type : void 0) {
+ newChild = name;
+ refChild = attributes;
+ newChild.setParent(this);
+ if (refChild) {
+ // temporarily remove children starting *with* refChild
+ i = children.indexOf(refChild);
+ removed = children.splice(i);
+
+ // add the new child
+ children.push(newChild);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(children, removed);
+ } else {
+ children.push(newChild);
+ }
+ return newChild;
+ } else {
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+ }
+
+ // Creates a child element node after the current node
+
+ // `name` node name or an object describing the XML tree
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ insertAfter(name, attributes, text) {
+ var child, i, removed;
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
+ }
+
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+
+ // add the new child
+ child = this.parent.element(name, attributes, text);
+
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return child;
+ }
+
+ // Deletes a child element node
+
+ remove() {
+ var i, ref1;
+ if (this.isRoot) {
+ throw new Error("Cannot remove the root element. " + this.debugInfo());
+ }
+ i = this.parent.children.indexOf(this);
+ splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1;
+ return this.parent;
+ }
+
+ // Creates a node
+
+ // `name` name of the node
+ // `attributes` an object containing name/value pairs of attributes
+ // `text` element text
+ node(name, attributes, text) {
+ var child;
+ if (name != null) {
+ name = getValue(name);
+ }
+ attributes || (attributes = {});
+ attributes = getValue(attributes);
+ // swap argument order: text <-> attributes
+ if (!isObject(attributes)) {
+ [text, attributes] = [attributes, text];
+ }
+ child = new XMLElement(this, name, attributes);
+ if (text != null) {
+ child.text(text);
+ }
+ this.children.push(child);
+ return child;
+ }
+
+ // Creates a text node
+
+ // `value` element text
+ text(value) {
+ var child;
+ if (isObject(value)) {
+ this.element(value);
+ }
+ child = new XMLText(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a CDATA node
+
+ // `value` element text without CDATA delimiters
+ cdata(value) {
+ var child;
+ child = new XMLCData(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node
+
+ // `value` comment text
+ comment(value) {
+ var child;
+ child = new XMLComment(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Creates a comment node before the current node
+
+ // `value` comment text
+ commentBefore(value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a comment node after the current node
+
+ // `value` comment text
+ commentAfter(value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.comment(value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Adds unescaped raw text
+
+ // `value` text
+ raw(value) {
+ var child;
+ child = new XMLRaw(this, value);
+ this.children.push(child);
+ return this;
+ }
+
+ // Adds a dummy node
+ dummy() {
+ var child;
+ child = new XMLDummy(this);
+ // Normally when a new node is created it is added to the child node collection.
+ // However, dummy nodes are never added to the XML tree. They are created while
+ // converting JS objects to XML nodes in order not to break the recursive function
+ // chain. They can be thought of as invisible nodes. They can be traversed through
+ // by using prev(), next(), up(), etc. functions but they do not exists in the tree.
+
+ // @children.push child
+ return child;
+ }
+
+ // Adds a processing instruction
+
+ // `target` instruction target
+ // `value` instruction value
+ instruction(target, value) {
+ var insTarget, insValue, instruction, j, len;
+ if (target != null) {
+ target = getValue(target);
+ }
+ if (value != null) {
+ value = getValue(value);
+ }
+ if (Array.isArray(target)) { // expand if array
+ for (j = 0, len = target.length; j < len; j++) {
+ insTarget = target[j];
+ this.instruction(insTarget);
+ }
+ } else if (isObject(target)) { // expand if object
+ for (insTarget in target) {
+ if (!hasProp.call(target, insTarget)) continue;
+ insValue = target[insTarget];
+ this.instruction(insTarget, insValue);
+ }
+ } else {
+ if (isFunction(value)) {
+ value = value.apply();
+ }
+ instruction = new XMLProcessingInstruction(this, target, value);
+ this.children.push(instruction);
+ }
+ return this;
+ }
+
+ // Creates a processing instruction node before the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionBefore(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *with* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates a processing instruction node after the current node
+
+ // `target` instruction target
+ // `value` instruction value
+ instructionAfter(target, value) {
+ var child, i, removed;
+ // temporarily remove children starting *after* this
+ i = this.parent.children.indexOf(this);
+ removed = this.parent.children.splice(i + 1);
+ // add the new child
+ child = this.parent.instruction(target, value);
+ // add back removed children after new child
+ Array.prototype.push.apply(this.parent.children, removed);
+ return this;
+ }
+
+ // Creates the xml declaration
+
+ // `version` A version number string, e.g. 1.0
+ // `encoding` Encoding declaration, e.g. UTF-8
+ // `standalone` standalone document declaration: true or false
+ declaration(version, encoding, standalone) {
+ var doc, xmldec;
+ doc = this.document();
+ xmldec = new XMLDeclaration(doc, version, encoding, standalone);
+ // Replace XML declaration if exists, otherwise insert at top
+ if (doc.children.length === 0) {
+ doc.children.unshift(xmldec);
+ } else if (doc.children[0].type === NodeType.Declaration) {
+ doc.children[0] = xmldec;
+ } else {
+ doc.children.unshift(xmldec);
+ }
+ return doc.root() || doc;
+ }
+
+ // Creates the document type declaration
+
+ // `pubID` the public identifier of the external subset
+ // `sysID` the system identifier of the external subset
+ dtd(pubID, sysID) {
+ var child, doc, doctype, i, j, k, len, len1, ref1, ref2;
+ doc = this.document();
+ doctype = new XMLDocType(doc, pubID, sysID);
+ ref1 = doc.children;
+ // Replace DTD if exists
+ for (i = j = 0, len = ref1.length; j < len; i = ++j) {
+ child = ref1[i];
+ if (child.type === NodeType.DocType) {
+ doc.children[i] = doctype;
+ return doctype;
+ }
+ }
+ ref2 = doc.children;
+ // insert before root node if the root node exists
+ for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) {
+ child = ref2[i];
+ if (child.isRoot) {
+ doc.children.splice(i, 0, doctype);
+ return doctype;
+ }
+ }
+ // otherwise append to end
+ doc.children.push(doctype);
+ return doctype;
+ }
+
+ // Gets the parent node
+ up() {
+ if (this.isRoot) {
+ throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
+ }
+ return this.parent;
+ }
+
+ // Gets the root node
+ root() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node.rootObject;
+ } else if (node.isRoot) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Gets the node representing the XML document
+ document() {
+ var node;
+ node = this;
+ while (node) {
+ if (node.type === NodeType.Document) {
+ return node;
+ } else {
+ node = node.parent;
+ }
+ }
+ }
+
+ // Ends the document and converts string
+ end(options) {
+ return this.document().end(options);
+ }
+
+ // Gets the previous node
+ prev() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i < 1) {
+ throw new Error("Already at the first node. " + this.debugInfo());
+ }
+ return this.parent.children[i - 1];
+ }
+
+ // Gets the next node
+ next() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ if (i === -1 || i === this.parent.children.length - 1) {
+ throw new Error("Already at the last node. " + this.debugInfo());
+ }
+ return this.parent.children[i + 1];
+ }
+
+ // Imports cloned root from another XML document
+
+ // `doc` the XML document to insert nodes from
+ importDocument(doc) {
+ var child, clonedRoot, j, len, ref1;
+ clonedRoot = doc.root().clone();
+ clonedRoot.parent = this;
+ clonedRoot.isRoot = false;
+ this.children.push(clonedRoot);
+ // set properties if imported element becomes the root node
+ if (this.type === NodeType.Document) {
+ clonedRoot.isRoot = true;
+ clonedRoot.documentObject = this;
+ this.rootObject = clonedRoot;
+ // set dtd name
+ if (this.children) {
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.type === NodeType.DocType) {
+ child.name = clonedRoot.name;
+ break;
+ }
+ }
+ }
+ }
+ return this;
+ }
+
+
+ // Returns debug string for this node
+ debugInfo(name) {
+ var ref1, ref2;
+ name = name || this.name;
+ if ((name == null) && !((ref1 = this.parent) != null ? ref1.name : void 0)) {
+ return "";
+ } else if (name == null) {
+ return "parent: <" + this.parent.name + ">";
+ } else if (!((ref2 = this.parent) != null ? ref2.name : void 0)) {
+ return "node: <" + name + ">";
+ } else {
+ return "node: <" + name + ">, parent: <" + this.parent.name + ">";
+ }
+ }
+
+ // Aliases
+ ele(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ nod(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ txt(value) {
+ return this.text(value);
+ }
+
+ dat(value) {
+ return this.cdata(value);
+ }
+
+ com(value) {
+ return this.comment(value);
+ }
+
+ ins(target, value) {
+ return this.instruction(target, value);
+ }
+
+ doc() {
+ return this.document();
+ }
+
+ dec(version, encoding, standalone) {
+ return this.declaration(version, encoding, standalone);
+ }
+
+ e(name, attributes, text) {
+ return this.element(name, attributes, text);
+ }
+
+ n(name, attributes, text) {
+ return this.node(name, attributes, text);
+ }
+
+ t(value) {
+ return this.text(value);
+ }
+
+ d(value) {
+ return this.cdata(value);
+ }
+
+ c(value) {
+ return this.comment(value);
+ }
+
+ r(value) {
+ return this.raw(value);
+ }
+
+ i(target, value) {
+ return this.instruction(target, value);
+ }
+
+ u() {
+ return this.up();
+ }
+
+ // can be deprecated in a future release
+ importXMLBuilder(doc) {
+ return this.importDocument(doc);
+ }
+
+ // Adds or modifies an attribute.
+
+ // `name` attribute name
+ // `value` attribute value
+ attribute(name, value) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ att(name, value) {
+ return this.attribute(name, value);
+ }
+
+ a(name, value) {
+ return this.attribute(name, value);
+ }
+
+ // Removes an attribute
+
+ // `name` attribute name
+ removeAttribute(name) {
+ throw new Error("attribute() applies to element nodes only.");
+ }
+
+ // DOM level 1 functions to be implemented later
+ replaceChild(newChild, oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ removeChild(oldChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ appendChild(newChild) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ hasChildNodes() {
+ return this.children.length !== 0;
+ }
+
+ cloneNode(deep) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ normalize() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 2
+ isSupported(feature, version) {
+ return true;
+ }
+
+ hasAttributes() {
+ return this.attribs.length !== 0;
+ }
+
+ // DOM level 3 functions to be implemented later
+ compareDocumentPosition(other) {
+ var ref, res;
+ ref = this;
+ if (ref === other) {
+ return 0;
+ } else if (this.document() !== other.document()) {
+ res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
+ if (Math.random() < 0.5) {
+ res |= DocumentPosition.Preceding;
+ } else {
+ res |= DocumentPosition.Following;
+ }
+ return res;
+ } else if (ref.isAncestor(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Preceding;
+ } else if (ref.isDescendant(other)) {
+ return DocumentPosition.Contains | DocumentPosition.Following;
+ } else if (ref.isPreceding(other)) {
+ return DocumentPosition.Preceding;
+ } else {
+ return DocumentPosition.Following;
+ }
+ }
+
+ isSameNode(other) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupPrefix(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isDefaultNamespace(namespaceURI) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ lookupNamespaceURI(prefix) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ isEqualNode(node) {
+ var i, j, ref1;
+ if (node.nodeType !== this.nodeType) {
+ return false;
+ }
+ if (node.children.length !== this.children.length) {
+ return false;
+ }
+ for (i = j = 0, ref1 = this.children.length - 1; (0 <= ref1 ? j <= ref1 : j >= ref1); i = 0 <= ref1 ? ++j : --j) {
+ if (!this.children[i].isEqualNode(node.children[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ getFeature(feature, version) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ setUserData(key, data, handler) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ getUserData(key) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // Returns true if other is an inclusive descendant of node,
+ // and false otherwise.
+ contains(other) {
+ if (!other) {
+ return false;
+ }
+ return other === this || this.isDescendant(other);
+ }
+
+ // An object A is called a descendant of an object B, if either A is
+ // a child of B or A is a child of an object C that is a descendant of B.
+ isDescendant(node) {
+ var child, isDescendantChild, j, len, ref1;
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (node === child) {
+ return true;
+ }
+ isDescendantChild = child.isDescendant(node);
+ if (isDescendantChild) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // An object A is called an ancestor of an object B if and only if
+ // B is a descendant of A.
+ isAncestor(node) {
+ return node.isDescendant(this);
+ }
+
+ // An object A is preceding an object B if A and B are in the
+ // same tree and A comes before B in tree order.
+ isPreceding(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos < thisPos;
+ }
+ }
+
+ // An object A is folllowing an object B if A and B are in the
+ // same tree and A comes after B in tree order.
+ isFollowing(node) {
+ var nodePos, thisPos;
+ nodePos = this.treePosition(node);
+ thisPos = this.treePosition(this);
+ if (nodePos === -1 || thisPos === -1) {
+ return false;
+ } else {
+ return nodePos > thisPos;
+ }
+ }
+
+ // Returns the preorder position of the given node in the tree, or -1
+ // if the node is not in the tree.
+ treePosition(node) {
+ var found, pos;
+ pos = 0;
+ found = false;
+ this.foreachTreeNode(this.document(), function(childNode) {
+ pos++;
+ if (!found && childNode === node) {
+ return found = true;
+ }
+ });
+ if (found) {
+ return pos;
+ } else {
+ return -1;
+ }
+ }
+
+
+ // Depth-first preorder traversal through the XML tree
+ foreachTreeNode(node, func) {
+ var child, j, len, ref1, res;
+ node || (node = this.document());
+ ref1 = node.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (res = func(child)) {
+ return res;
+ } else {
+ res = this.foreachTreeNode(child, func);
+ if (res) {
+ return res;
+ }
+ }
+ }
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNode.prototype, 'nodeName', {
+ get: function() {
+ return this.name;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeType', {
+ get: function() {
+ return this.type;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nodeValue', {
+ get: function() {
+ return this.value;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'parentNode', {
+ get: function() {
+ return this.parent;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'childNodes', {
+ get: function() {
+ if (!this.childNodeList || !this.childNodeList.nodes) {
+ this.childNodeList = new XMLNodeList(this.children);
+ }
+ return this.childNodeList;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'firstChild', {
+ get: function() {
+ return this.children[0] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'lastChild', {
+ get: function() {
+ return this.children[this.children.length - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'previousSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i - 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'nextSibling', {
+ get: function() {
+ var i;
+ i = this.parent.children.indexOf(this);
+ return this.parent.children[i + 1] || null;
+ }
+ });
+
+ Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
+ get: function() {
+ return this.document() || null;
+ }
+ });
+
+ // DOM level 3
+ Object.defineProperty(XMLNode.prototype, 'textContent', {
+ get: function() {
+ var child, j, len, ref1, str;
+ if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
+ str = '';
+ ref1 = this.children;
+ for (j = 0, len = ref1.length; j < len; j++) {
+ child = ref1[j];
+ if (child.textContent) {
+ str += child.textContent;
+ }
+ }
+ return str;
+ } else {
+ return null;
+ }
+ },
+ set: function(value) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ return XMLNode;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLNodeFilter.js b/node_modules/xmlbuilder/lib/XMLNodeFilter.js
new file mode 100644
index 0000000..3f33f45
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLNodeFilter.js
@@ -0,0 +1,51 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a node filter
+ var XMLNodeFilter;
+
+ module.exports = XMLNodeFilter = (function() {
+ class XMLNodeFilter {
+ // DOM level 4 functions to be implemented later
+ acceptNode(node) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+ XMLNodeFilter.prototype.FilterAccept = 1;
+
+ XMLNodeFilter.prototype.FilterReject = 2;
+
+ XMLNodeFilter.prototype.FilterSkip = 3;
+
+ XMLNodeFilter.prototype.ShowAll = 0xffffffff;
+
+ XMLNodeFilter.prototype.ShowElement = 0x1;
+
+ XMLNodeFilter.prototype.ShowAttribute = 0x2;
+
+ XMLNodeFilter.prototype.ShowText = 0x4;
+
+ XMLNodeFilter.prototype.ShowCDataSection = 0x8;
+
+ XMLNodeFilter.prototype.ShowEntityReference = 0x10;
+
+ XMLNodeFilter.prototype.ShowEntity = 0x20;
+
+ XMLNodeFilter.prototype.ShowProcessingInstruction = 0x40;
+
+ XMLNodeFilter.prototype.ShowComment = 0x80;
+
+ XMLNodeFilter.prototype.ShowDocument = 0x100;
+
+ XMLNodeFilter.prototype.ShowDocumentType = 0x200;
+
+ XMLNodeFilter.prototype.ShowDocumentFragment = 0x400;
+
+ XMLNodeFilter.prototype.ShowNotation = 0x800;
+
+ return XMLNodeFilter;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLNodeList.js b/node_modules/xmlbuilder/lib/XMLNodeList.js
new file mode 100644
index 0000000..8570096
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLNodeList.js
@@ -0,0 +1,45 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Represents a list of nodes
+ var XMLNodeList;
+
+ module.exports = XMLNodeList = (function() {
+ class XMLNodeList {
+ // Initializes a new instance of `XMLNodeList`
+ // This is just a wrapper around an ordinary
+ // JS array.
+
+ // `nodes` the array containing nodes.
+ constructor(nodes) {
+ this.nodes = nodes;
+ }
+
+ // Creates and returns a deep clone of `this`
+
+ clone() {
+ // this class should not be cloned since it wraps
+ // around a given array. The calling function should check
+ // whether the wrapped array is null and supply a new array
+ // (from the clone).
+ return this.nodes = null;
+ }
+
+ // DOM Level 1
+ item(index) {
+ return this.nodes[index] || null;
+ }
+
+ };
+
+ // DOM level 1
+ Object.defineProperty(XMLNodeList.prototype, 'length', {
+ get: function() {
+ return this.nodes.length || 0;
+ }
+ });
+
+ return XMLNodeList;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
new file mode 100644
index 0000000..88b8fcd
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js
@@ -0,0 +1,56 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLProcessingInstruction;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a processing instruction
+ module.exports = XMLProcessingInstruction = class XMLProcessingInstruction extends XMLCharacterData {
+ // Initializes a new instance of `XMLProcessingInstruction`
+
+ // `parent` the parent node
+ // `target` instruction target
+ // `value` instruction value
+ constructor(parent, target, value) {
+ super(parent);
+ if (target == null) {
+ throw new Error("Missing instruction target. " + this.debugInfo());
+ }
+ this.type = NodeType.ProcessingInstruction;
+ this.target = this.stringify.insTarget(target);
+ this.name = this.target;
+ if (value) {
+ this.value = this.stringify.insValue(value);
+ }
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));
+ }
+
+ isEqualNode(node) {
+ if (!super.isEqualNode(node)) {
+ return false;
+ }
+ if (node.target !== this.target) {
+ return false;
+ }
+ return true;
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLRaw.js b/node_modules/xmlbuilder/lib/XMLRaw.js
new file mode 100644
index 0000000..4addc8b
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLRaw.js
@@ -0,0 +1,40 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLNode, XMLRaw;
+
+ NodeType = require('./NodeType');
+
+ XMLNode = require('./XMLNode');
+
+ // Represents a raw node
+ module.exports = XMLRaw = class XMLRaw extends XMLNode {
+ // Initializes a new instance of `XMLRaw`
+
+ // `text` raw text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing raw text. " + this.debugInfo());
+ }
+ this.type = NodeType.Raw;
+ this.value = this.stringify.raw(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.raw(this, this.options.writer.filterOptions(options));
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLStreamWriter.js b/node_modules/xmlbuilder/lib/XMLStreamWriter.js
new file mode 100644
index 0000000..c0422a2
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLStreamWriter.js
@@ -0,0 +1,209 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,
+ hasProp = {}.hasOwnProperty;
+
+ NodeType = require('./NodeType');
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ WriterState = require('./WriterState');
+
+ // Prints XML nodes to a stream
+ module.exports = XMLStreamWriter = class XMLStreamWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStreamWriter`
+
+ // `stream` output stream
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(stream, options) {
+ super(options);
+ this.stream = stream;
+ }
+
+ endline(node, options, level) {
+ if (node.isLastRootNode && options.state === WriterState.CloseTag) {
+ return '';
+ } else {
+ return super.endline(node, options, level);
+ }
+ }
+
+ document(doc, options) {
+ var child, i, j, k, len1, len2, ref, ref1, results;
+ ref = doc.children;
+ // set a flag so that we don't insert a newline after the last root level node
+ for (i = j = 0, len1 = ref.length; j < len1; i = ++j) {
+ child = ref[i];
+ child.isLastRootNode = i === doc.children.length - 1;
+ }
+ options = this.filterOptions(options);
+ ref1 = doc.children;
+ results = [];
+ for (k = 0, len2 = ref1.length; k < len2; k++) {
+ child = ref1[k];
+ results.push(this.writeChildNode(child, options, 0));
+ }
+ return results;
+ }
+
+ cdata(node, options, level) {
+ return this.stream.write(super.cdata(node, options, level));
+ }
+
+ comment(node, options, level) {
+ return this.stream.write(super.comment(node, options, level));
+ }
+
+ declaration(node, options, level) {
+ return this.stream.write(super.declaration(node, options, level));
+ }
+
+ docType(node, options, level) {
+ var child, j, len1, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ this.stream.write(this.indent(node, options, level));
+ this.stream.write('<!DOCTYPE ' + node.root().name);
+ // external identifier
+ if (node.pubID && node.sysID) {
+ this.stream.write(' PUBLIC "' + node.pubID + '" "' + node.sysID + '"');
+ } else if (node.sysID) {
+ this.stream.write(' SYSTEM "' + node.sysID + '"');
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ this.stream.write(' [');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (j = 0, len1 = ref.length; j < len1; j++) {
+ child = ref[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ this.stream.write(']');
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '>');
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, j, len, len1, name, prettySuppressed, r, ratt, ref, ref1, ref2, rline;
+ level || (level = 0);
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ this.stream.write(r);
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ this.stream.write('>');
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ options.state = WriterState.CloseTag;
+ this.stream.write(options.spaceBeforeSlash + '/>');
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ this.stream.write('>');
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ this.stream.write('</' + node.name + '>');
+ } else {
+ this.stream.write('>' + this.endline(node, options, level));
+ options.state = WriterState.InsideTag;
+ ref2 = node.children;
+ // inner tags
+ for (j = 0, len1 = ref2.length; j < len1; j++) {
+ child = ref2[j];
+ this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ this.stream.write(this.indent(node, options, level) + '</' + node.name + '>');
+ }
+ this.stream.write(this.endline(node, options, level));
+ options.state = WriterState.None;
+ return this.closeNode(node, options, level);
+ }
+
+ processingInstruction(node, options, level) {
+ return this.stream.write(super.processingInstruction(node, options, level));
+ }
+
+ raw(node, options, level) {
+ return this.stream.write(super.raw(node, options, level));
+ }
+
+ text(node, options, level) {
+ return this.stream.write(super.text(node, options, level));
+ }
+
+ dtdAttList(node, options, level) {
+ return this.stream.write(super.dtdAttList(node, options, level));
+ }
+
+ dtdElement(node, options, level) {
+ return this.stream.write(super.dtdElement(node, options, level));
+ }
+
+ dtdEntity(node, options, level) {
+ return this.stream.write(super.dtdEntity(node, options, level));
+ }
+
+ dtdNotation(node, options, level) {
+ return this.stream.write(super.dtdNotation(node, options, level));
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLStringWriter.js b/node_modules/xmlbuilder/lib/XMLStringWriter.js
new file mode 100644
index 0000000..969caf5
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLStringWriter.js
@@ -0,0 +1,40 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var XMLStringWriter, XMLWriterBase;
+
+ XMLWriterBase = require('./XMLWriterBase');
+
+ // Prints XML nodes as plain text
+ module.exports = XMLStringWriter = class XMLStringWriter extends XMLWriterBase {
+ // Initializes a new instance of `XMLStringWriter`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ super(options);
+ }
+
+ document(doc, options) {
+ var child, i, len, r, ref;
+ options = this.filterOptions(options);
+ r = '';
+ ref = doc.children;
+ for (i = 0, len = ref.length; i < len; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, 0);
+ }
+ // remove trailing newline
+ if (options.pretty && r.slice(-options.newline.length) === options.newline) {
+ r = r.slice(0, -options.newline.length);
+ }
+ return r;
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLStringifier.js b/node_modules/xmlbuilder/lib/XMLStringifier.js
new file mode 100644
index 0000000..1a7cbb0
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLStringifier.js
@@ -0,0 +1,291 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ // Converts values to strings
+ var XMLStringifier,
+ hasProp = {}.hasOwnProperty;
+
+ module.exports = XMLStringifier = (function() {
+ class XMLStringifier {
+ // Initializes a new instance of `XMLStringifier`
+
+ // `options.version` The version number string of the XML spec to validate against, e.g. 1.0
+ // `options.noDoubleEncoding` whether existing html entities are encoded: true or false
+ // `options.stringify` a set of functions to use for converting values to strings
+ // `options.noValidation` whether values will be validated and escaped or returned as is
+ // `options.invalidCharReplacement` a character to replace invalid characters and disable character validation
+ constructor(options) {
+ var key, ref, value;
+ // Checks whether the given string contains legal characters
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalChar = this.assertLegalChar.bind(this);
+ // Checks whether the given string contains legal characters for a name
+ // Fails with an exception on error
+
+ // `str` the string to check
+ this.assertLegalName = this.assertLegalName.bind(this);
+ options || (options = {});
+ this.options = options;
+ if (!this.options.version) {
+ this.options.version = '1.0';
+ }
+ ref = options.stringify || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this[key] = value;
+ }
+ }
+
+ // Defaults
+ name(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalName('' + val || '');
+ }
+
+ text(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.textEscape('' + val || ''));
+ }
+
+ cdata(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ val = val.replace(']]>', ']]]]><![CDATA[>');
+ return this.assertLegalChar(val);
+ }
+
+ comment(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/--/)) {
+ throw new Error("Comment text cannot contain double-hypen: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ raw(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return '' + val || '';
+ }
+
+ attValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar(this.attEscape(val = '' + val || ''));
+ }
+
+ insTarget(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ insValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (val.match(/\?>/)) {
+ throw new Error("Invalid processing instruction value: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlVersion(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/1\.[0-9]+/)) {
+ throw new Error("Invalid version number: " + val);
+ }
+ return val;
+ }
+
+ xmlEncoding(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ val = '' + val || '';
+ if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {
+ throw new Error("Invalid encoding: " + val);
+ }
+ return this.assertLegalChar(val);
+ }
+
+ xmlStandalone(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ if (val) {
+ return "yes";
+ } else {
+ return "no";
+ }
+ }
+
+ dtdPubID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdSysID(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdElementValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttType(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdAttDefault(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdEntityValue(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ dtdNData(val) {
+ if (this.options.noValidation) {
+ return val;
+ }
+ return this.assertLegalChar('' + val || '');
+ }
+
+ assertLegalChar(str) {
+ var regex, res;
+ if (this.options.noValidation) {
+ return str;
+ }
+ if (this.options.version === '1.0') {
+ // Valid characters from https://www.w3.org/TR/xml/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_10_InvalidChars = regenerate()
+ // .addRange(0x0000, 0x0008)
+ // .add(0x000B, 0x000C)
+ // .addRange(0x000E, 0x001F)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ } else if (this.options.version === '1.1') {
+ // Valid characters from https://www.w3.org/TR/xml11/#charsets
+ // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ // [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ // This ES5 compatible Regexp has been generated using the "regenerate" NPM module:
+ // let xml_11_InvalidChars = regenerate()
+ // .add(0x0000)
+ // .addRange(0xD800, 0xDFFF)
+ // .addRange(0xFFFE, 0xFFFF)
+ regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g;
+ if (this.options.invalidCharReplacement !== void 0) {
+ str = str.replace(regex, this.options.invalidCharReplacement);
+ } else if (res = str.match(regex)) {
+ throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
+ }
+ }
+ return str;
+ }
+
+ assertLegalName(str) {
+ var regex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ str = this.assertLegalChar(str);
+ regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/;
+ if (!str.match(regex)) {
+ throw new Error(`Invalid character in name: ${str}`);
+ }
+ return str;
+ }
+
+ // Escapes special characters in text
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ textEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\r/g, '&#xD;');
+ }
+
+ // Escapes special characters in attribute values
+
+ // See http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
+
+ // `str` the string to escape
+ attEscape(str) {
+ var ampregex;
+ if (this.options.noValidation) {
+ return str;
+ }
+ ampregex = this.options.noDoubleEncoding ? /(?!&(lt|gt|amp|apos|quot);)&/g : /&/g;
+ return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/\t/g, '&#x9;').replace(/\n/g, '&#xA;').replace(/\r/g, '&#xD;');
+ }
+
+ };
+
+ // strings to match while converting from JS objects
+ XMLStringifier.prototype.convertAttKey = '@';
+
+ XMLStringifier.prototype.convertPIKey = '?';
+
+ XMLStringifier.prototype.convertTextKey = '#text';
+
+ XMLStringifier.prototype.convertCDataKey = '#cdata';
+
+ XMLStringifier.prototype.convertCommentKey = '#comment';
+
+ XMLStringifier.prototype.convertRawKey = '#raw';
+
+ return XMLStringifier;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLText.js b/node_modules/xmlbuilder/lib/XMLText.js
new file mode 100644
index 0000000..24f9d4b
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLText.js
@@ -0,0 +1,82 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, XMLCharacterData, XMLText;
+
+ NodeType = require('./NodeType');
+
+ XMLCharacterData = require('./XMLCharacterData');
+
+ // Represents a text node
+ module.exports = XMLText = (function() {
+ class XMLText extends XMLCharacterData {
+ // Initializes a new instance of `XMLText`
+
+ // `text` element text
+ constructor(parent, text) {
+ super(parent);
+ if (text == null) {
+ throw new Error("Missing element text. " + this.debugInfo());
+ }
+ this.name = "#text";
+ this.type = NodeType.Text;
+ this.value = this.stringify.text(text);
+ }
+
+ // Creates and returns a deep clone of `this`
+ clone() {
+ return Object.create(this);
+ }
+
+ // Converts the XML fragment to string
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation for pretty print
+ // `options.offset` how many indentations to add to every line for pretty print
+ // `options.newline` newline sequence for pretty print
+ toString(options) {
+ return this.options.writer.text(this, this.options.writer.filterOptions(options));
+ }
+
+ // DOM level 1 functions to be implemented later
+ splitText(offset) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ // DOM level 3 functions to be implemented later
+ replaceWholeText(content) {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+
+ };
+
+ // DOM level 3
+ Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {
+ get: function() {
+ throw new Error("This DOM method is not implemented." + this.debugInfo());
+ }
+ });
+
+ Object.defineProperty(XMLText.prototype, 'wholeText', {
+ get: function() {
+ var next, prev, str;
+ str = '';
+ prev = this.previousSibling;
+ while (prev) {
+ str = prev.data + str;
+ prev = prev.previousSibling;
+ }
+ str += this.data;
+ next = this.nextSibling;
+ while (next) {
+ str = str + next.data;
+ next = next.nextSibling;
+ }
+ return str;
+ }
+ });
+
+ return XMLText;
+
+ }).call(this);
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLTypeInfo.js b/node_modules/xmlbuilder/lib/XMLTypeInfo.js
new file mode 100644
index 0000000..1de000a
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLTypeInfo.js
@@ -0,0 +1,23 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var Derivation, XMLTypeInfo;
+
+ Derivation = require('./Derivation');
+
+ // Represents a type referenced from element or attribute nodes.
+ module.exports = XMLTypeInfo = class XMLTypeInfo {
+ // Initializes a new instance of `XMLTypeInfo`
+
+ constructor(typeName, typeNamespace) {
+ this.typeName = typeName;
+ this.typeNamespace = typeNamespace;
+ }
+
+ // DOM level 3 functions to be implemented later
+ isDerivedFrom(typeNamespaceArg, typeNameArg, derivationMethod) {
+ throw new Error("This DOM method is not implemented.");
+ }
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLUserDataHandler.js b/node_modules/xmlbuilder/lib/XMLUserDataHandler.js
new file mode 100644
index 0000000..97ade4f
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLUserDataHandler.js
@@ -0,0 +1,27 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var OperationType, XMLUserDataHandler;
+
+ OperationType = require('./OperationType');
+
+ // Represents a handler that gets called when its associated
+ // node object is being cloned, imported, or renamed.
+ module.exports = XMLUserDataHandler = class XMLUserDataHandler {
+ // Initializes a new instance of `XMLUserDataHandler`
+
+ constructor() {}
+
+ // Called whenever the node for which this handler is
+ // registered is imported or cloned.
+
+ // `operation` type of operation that is being performed on the node
+ // `key` the key for which this handler is being called
+ // `data` the data for which this handler is being called
+ // `src` the node being cloned, adopted, imported, or renamed
+ // This is null when the node is being deleted.
+ // `dst` the node newly created if any, or null
+ handle(operation, key, data, src, dst) {}
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/XMLWriterBase.js b/node_modules/xmlbuilder/lib/XMLWriterBase.js
new file mode 100644
index 0000000..42c0195
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/XMLWriterBase.js
@@ -0,0 +1,485 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
+ hasProp = {}.hasOwnProperty;
+
+ ({assign} = require('./Utility'));
+
+ NodeType = require('./NodeType');
+
+ XMLDeclaration = require('./XMLDeclaration');
+
+ XMLDocType = require('./XMLDocType');
+
+ XMLCData = require('./XMLCData');
+
+ XMLComment = require('./XMLComment');
+
+ XMLElement = require('./XMLElement');
+
+ XMLRaw = require('./XMLRaw');
+
+ XMLText = require('./XMLText');
+
+ XMLProcessingInstruction = require('./XMLProcessingInstruction');
+
+ XMLDummy = require('./XMLDummy');
+
+ XMLDTDAttList = require('./XMLDTDAttList');
+
+ XMLDTDElement = require('./XMLDTDElement');
+
+ XMLDTDEntity = require('./XMLDTDEntity');
+
+ XMLDTDNotation = require('./XMLDTDNotation');
+
+ WriterState = require('./WriterState');
+
+ // Base class for XML writers
+ module.exports = XMLWriterBase = class XMLWriterBase {
+ // Initializes a new instance of `XMLWriterBase`
+
+ // `options.pretty` pretty prints the result
+ // `options.indent` indentation string
+ // `options.newline` newline sequence
+ // `options.offset` a fixed number of indentations to add to every line
+ // `options.width` maximum column width
+ // `options.allowEmpty` do not self close empty element tags
+ // 'options.dontPrettyTextNodes' if any text is present in node, don't indent or LF
+ // `options.spaceBeforeSlash` add a space before the closing slash of empty elements
+ constructor(options) {
+ var key, ref, value;
+ options || (options = {});
+ this.options = options;
+ ref = options.writer || {};
+ for (key in ref) {
+ if (!hasProp.call(ref, key)) continue;
+ value = ref[key];
+ this["_" + key] = this[key];
+ this[key] = value;
+ }
+ }
+
+ // Filters writer options and provides defaults
+
+ // `options` writer options
+ filterOptions(options) {
+ var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
+ options || (options = {});
+ options = assign({}, this.options, options);
+ filteredOptions = {
+ writer: this
+ };
+ filteredOptions.pretty = options.pretty || false;
+ filteredOptions.allowEmpty = options.allowEmpty || false;
+ filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';
+ filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\n';
+ filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;
+ filteredOptions.width = (ref3 = options.width) != null ? ref3 : 0;
+ filteredOptions.dontPrettyTextNodes = (ref4 = (ref5 = options.dontPrettyTextNodes) != null ? ref5 : options.dontprettytextnodes) != null ? ref4 : 0;
+ filteredOptions.spaceBeforeSlash = (ref6 = (ref7 = options.spaceBeforeSlash) != null ? ref7 : options.spacebeforeslash) != null ? ref6 : '';
+ if (filteredOptions.spaceBeforeSlash === true) {
+ filteredOptions.spaceBeforeSlash = ' ';
+ }
+ filteredOptions.suppressPrettyCount = 0;
+ filteredOptions.user = {};
+ filteredOptions.state = WriterState.None;
+ return filteredOptions;
+ }
+
+ // Returns the indentation string for the current level
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ indent(node, options, level) {
+ var indentLevel;
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else if (options.pretty) {
+ indentLevel = (level || 0) + options.offset + 1;
+ if (indentLevel > 0) {
+ return new Array(indentLevel).join(options.indent);
+ }
+ }
+ return '';
+ }
+
+ // Returns the newline string
+
+ // `node` current node
+ // `options` writer options
+ // `level` current indentation level
+ endline(node, options, level) {
+ if (!options.pretty || options.suppressPrettyCount) {
+ return '';
+ } else {
+ return options.newline;
+ }
+ }
+
+ attribute(att, options, level) {
+ var r;
+ this.openAttribute(att, options, level);
+ if (options.pretty && options.width > 0) {
+ r = att.name + '="' + att.value + '"';
+ } else {
+ r = ' ' + att.name + '="' + att.value + '"';
+ }
+ this.closeAttribute(att, options, level);
+ return r;
+ }
+
+ cdata(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<![CDATA[';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ']]>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ comment(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!-- ';
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += ' -->' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ declaration(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?xml';
+ options.state = WriterState.InsideTag;
+ r += ' version="' + node.version + '"';
+ if (node.encoding != null) {
+ r += ' encoding="' + node.encoding + '"';
+ }
+ if (node.standalone != null) {
+ r += ' standalone="' + node.standalone + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ docType(node, options, level) {
+ var child, i, len1, r, ref;
+ level || (level = 0);
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ r += '<!DOCTYPE ' + node.root().name;
+ // external identifier
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ // internal subset
+ if (node.children.length > 0) {
+ r += ' [';
+ r += this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref = node.children;
+ for (i = 0, len1 = ref.length; i < len1; i++) {
+ child = ref[i];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ options.state = WriterState.CloseTag;
+ r += ']';
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ element(node, options, level) {
+ var att, attLen, child, childNodeCount, firstChildNode, i, j, len, len1, len2, name, prettySuppressed, r, ratt, ref, ref1, ref2, ref3, rline;
+ level || (level = 0);
+ prettySuppressed = false;
+ // open tag
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<' + node.name;
+ // attributes
+ if (options.pretty && options.width > 0) {
+ len = r.length;
+ ref = node.attribs;
+ for (name in ref) {
+ if (!hasProp.call(ref, name)) continue;
+ att = ref[name];
+ ratt = this.attribute(att, options, level);
+ attLen = ratt.length;
+ if (len + attLen > options.width) {
+ rline = this.indent(node, options, level + 1) + ratt;
+ r += this.endline(node, options, level) + rline;
+ len = rline.length;
+ } else {
+ rline = ' ' + ratt;
+ r += rline;
+ len += rline.length;
+ }
+ }
+ } else {
+ ref1 = node.attribs;
+ for (name in ref1) {
+ if (!hasProp.call(ref1, name)) continue;
+ att = ref1[name];
+ r += this.attribute(att, options, level);
+ }
+ }
+ childNodeCount = node.children.length;
+ firstChildNode = childNodeCount === 0 ? null : node.children[0];
+ if (childNodeCount === 0 || node.children.every(function(e) {
+ return (e.type === NodeType.Text || e.type === NodeType.Raw || e.type === NodeType.CData) && e.value === '';
+ })) {
+ // empty element
+ if (options.allowEmpty) {
+ r += '>';
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);
+ }
+ } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw || firstChildNode.type === NodeType.CData) && (firstChildNode.value != null)) {
+ // do not indent text-only nodes
+ r += '>';
+ options.state = WriterState.InsideTag;
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ r += this.writeChildNode(firstChildNode, options, level + 1);
+ options.suppressPrettyCount--;
+ prettySuppressed = false;
+ options.state = WriterState.CloseTag;
+ r += '</' + node.name + '>' + this.endline(node, options, level);
+ } else {
+ // if ANY are a text node, then suppress pretty now
+ if (options.dontPrettyTextNodes) {
+ ref2 = node.children;
+ for (i = 0, len1 = ref2.length; i < len1; i++) {
+ child = ref2[i];
+ if ((child.type === NodeType.Text || child.type === NodeType.Raw || child.type === NodeType.CData) && (child.value != null)) {
+ options.suppressPrettyCount++;
+ prettySuppressed = true;
+ break;
+ }
+ }
+ }
+ // close the opening tag, after dealing with newline
+ r += '>' + this.endline(node, options, level);
+ options.state = WriterState.InsideTag;
+ ref3 = node.children;
+ // inner tags
+ for (j = 0, len2 = ref3.length; j < len2; j++) {
+ child = ref3[j];
+ r += this.writeChildNode(child, options, level + 1);
+ }
+ // close tag
+ options.state = WriterState.CloseTag;
+ r += this.indent(node, options, level) + '</' + node.name + '>';
+ if (prettySuppressed) {
+ options.suppressPrettyCount--;
+ }
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ }
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ writeChildNode(node, options, level) {
+ switch (node.type) {
+ case NodeType.CData:
+ return this.cdata(node, options, level);
+ case NodeType.Comment:
+ return this.comment(node, options, level);
+ case NodeType.Element:
+ return this.element(node, options, level);
+ case NodeType.Raw:
+ return this.raw(node, options, level);
+ case NodeType.Text:
+ return this.text(node, options, level);
+ case NodeType.ProcessingInstruction:
+ return this.processingInstruction(node, options, level);
+ case NodeType.Dummy:
+ return '';
+ case NodeType.Declaration:
+ return this.declaration(node, options, level);
+ case NodeType.DocType:
+ return this.docType(node, options, level);
+ case NodeType.AttributeDeclaration:
+ return this.dtdAttList(node, options, level);
+ case NodeType.ElementDeclaration:
+ return this.dtdElement(node, options, level);
+ case NodeType.EntityDeclaration:
+ return this.dtdEntity(node, options, level);
+ case NodeType.NotationDeclaration:
+ return this.dtdNotation(node, options, level);
+ default:
+ throw new Error("Unknown XML node type: " + node.constructor.name);
+ }
+ }
+
+ processingInstruction(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<?';
+ options.state = WriterState.InsideTag;
+ r += node.target;
+ if (node.value) {
+ r += ' ' + node.value;
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '?>';
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ raw(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ text(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level);
+ options.state = WriterState.InsideTag;
+ r += node.value;
+ options.state = WriterState.CloseTag;
+ r += this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdAttList(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ATTLIST';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.elementName + ' ' + node.attributeName + ' ' + node.attributeType;
+ if (node.defaultValueType !== '#DEFAULT') {
+ r += ' ' + node.defaultValueType;
+ }
+ if (node.defaultValue) {
+ r += ' "' + node.defaultValue + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdElement(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ELEMENT';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name + ' ' + node.value;
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdEntity(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!ENTITY';
+ options.state = WriterState.InsideTag;
+ if (node.pe) {
+ r += ' %';
+ }
+ r += ' ' + node.name;
+ if (node.value) {
+ r += ' "' + node.value + '"';
+ } else {
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ if (node.nData) {
+ r += ' NDATA ' + node.nData;
+ }
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ dtdNotation(node, options, level) {
+ var r;
+ this.openNode(node, options, level);
+ options.state = WriterState.OpenTag;
+ r = this.indent(node, options, level) + '<!NOTATION';
+ options.state = WriterState.InsideTag;
+ r += ' ' + node.name;
+ if (node.pubID && node.sysID) {
+ r += ' PUBLIC "' + node.pubID + '" "' + node.sysID + '"';
+ } else if (node.pubID) {
+ r += ' PUBLIC "' + node.pubID + '"';
+ } else if (node.sysID) {
+ r += ' SYSTEM "' + node.sysID + '"';
+ }
+ options.state = WriterState.CloseTag;
+ r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);
+ options.state = WriterState.None;
+ this.closeNode(node, options, level);
+ return r;
+ }
+
+ openNode(node, options, level) {}
+
+ closeNode(node, options, level) {}
+
+ openAttribute(att, options, level) {}
+
+ closeAttribute(att, options, level) {}
+
+ };
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/lib/index.js b/node_modules/xmlbuilder/lib/index.js
new file mode 100644
index 0000000..c9ff150
--- /dev/null
+++ b/node_modules/xmlbuilder/lib/index.js
@@ -0,0 +1,120 @@
+// Generated by CoffeeScript 2.4.1
+(function() {
+ var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction;
+
+ ({assign, isFunction} = require('./Utility'));
+
+ XMLDOMImplementation = require('./XMLDOMImplementation');
+
+ XMLDocument = require('./XMLDocument');
+
+ XMLDocumentCB = require('./XMLDocumentCB');
+
+ XMLStringWriter = require('./XMLStringWriter');
+
+ XMLStreamWriter = require('./XMLStreamWriter');
+
+ NodeType = require('./NodeType');
+
+ WriterState = require('./WriterState');
+
+ // Creates a new document and returns the root node for
+ // chain-building the document tree
+
+ // `name` name of the root element
+
+ // `xmldec.version` A version number string, e.g. 1.0
+ // `xmldec.encoding` Encoding declaration, e.g. UTF-8
+ // `xmldec.standalone` standalone document declaration: true or false
+
+ // `doctype.pubID` public identifier of the external subset
+ // `doctype.sysID` system identifier of the external subset
+
+ // `options.headless` whether XML declaration and doctype will be included:
+ // true or false
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+ module.exports.create = function(name, xmldec, doctype, options) {
+ var doc, root;
+ if (name == null) {
+ throw new Error("Root element needs a name.");
+ }
+ options = assign({}, xmldec, doctype, options);
+ // create the document node
+ doc = new XMLDocument(options);
+ // add the root node
+ root = doc.element(name);
+ // prolog
+ if (!options.headless) {
+ doc.declaration(options);
+ if ((options.pubID != null) || (options.sysID != null)) {
+ doc.dtd(options);
+ }
+ }
+ return root;
+ };
+
+ // Creates a new document and returns the document node for
+ // chain-building the document tree
+
+ // `options.keepNullNodes` whether nodes with null values will be kept
+ // or ignored: true or false
+ // `options.keepNullAttributes` whether attributes with null values will be
+ // kept or ignored: true or false
+ // `options.ignoreDecorators` whether decorator strings will be ignored when
+ // converting JS objects: true or false
+ // `options.separateArrayItems` whether array items are created as separate
+ // nodes when passed as an object value: true or false
+ // `options.noDoubleEncoding` whether existing html entities are encoded:
+ // true or false
+ // `options.stringify` a set of functions to use for converting values to
+ // strings
+ // `options.writer` the default XML writer to use for converting nodes to
+ // string. If the default writer is not set, the built-in XMLStringWriter
+ // will be used instead.
+
+ // `onData` the function to be called when a new chunk of XML is output. The
+ // string containing the XML chunk is passed to `onData` as its single
+ // argument.
+ // `onEnd` the function to be called when the XML document is completed with
+ // `end`. `onEnd` does not receive any arguments.
+ module.exports.begin = function(options, onData, onEnd) {
+ if (isFunction(options)) {
+ [onData, onEnd] = [options, onData];
+ options = {};
+ }
+ if (onData) {
+ return new XMLDocumentCB(options, onData, onEnd);
+ } else {
+ return new XMLDocument(options);
+ }
+ };
+
+ module.exports.stringWriter = function(options) {
+ return new XMLStringWriter(options);
+ };
+
+ module.exports.streamWriter = function(stream, options) {
+ return new XMLStreamWriter(stream, options);
+ };
+
+ module.exports.implementation = new XMLDOMImplementation();
+
+ module.exports.nodeType = NodeType;
+
+ module.exports.writerState = WriterState;
+
+}).call(this);
diff --git a/node_modules/xmlbuilder/package.json b/node_modules/xmlbuilder/package.json
new file mode 100644
index 0000000..8a06b18
--- /dev/null
+++ b/node_modules/xmlbuilder/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "xmlbuilder",
+ "version": "15.1.1",
+ "keywords": [
+ "xml",
+ "xmlbuilder"
+ ],
+ "homepage": "http://github.com/oozcitak/xmlbuilder-js",
+ "description": "An XML builder for node.js",
+ "author": "Ozgur Ozcitak <oozcitak@gmail.com>",
+ "contributors": [],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/oozcitak/xmlbuilder-js.git"
+ },
+ "bugs": {
+ "url": "http://github.com/oozcitak/xmlbuilder-js/issues"
+ },
+ "main": "./lib/index",
+ "typings": "./typings/index.d.ts",
+ "engines": {
+ "node": ">=8.0"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "coffee-coverage": "*",
+ "coffeescript": "2.4.1",
+ "coveralls": "*",
+ "istanbul": "*",
+ "mocha": "*",
+ "nyc": "*",
+ "xpath": "*",
+ "git-state": "*"
+ },
+ "mocha": {
+ "require": [
+ "coffeescript/register",
+ "coffee-coverage/register-istanbul",
+ "test/common.coffee"
+ ],
+ "recursive": true,
+ "ui": "tdd",
+ "reporter": "dot"
+ },
+ "scripts": {
+ "prepublishOnly": "coffee -co lib src",
+ "test": "nyc mocha \"test/**/*.coffee\"",
+ "perf": "coffee ./perf/index.coffee"
+ }
+}
diff --git a/node_modules/xmlbuilder/perf/basic/escaping.coffee b/node_modules/xmlbuilder/perf/basic/escaping.coffee
new file mode 100644
index 0000000..126825d
--- /dev/null
+++ b/node_modules/xmlbuilder/perf/basic/escaping.coffee
@@ -0,0 +1,244 @@
+XMLStringifier = require('../../src/XMLStringifier')
+stringify = new XMLStringifier()
+
+perf 'Text escaping', 100000, (run) ->
+ text = '&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r&<>\r'
+ run () -> stringify.textEscape(text)
+
+perf 'Text escaping (no replacement)', 100000, (run) ->
+ text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut.'
+ run () -> stringify.textEscape(text)
+
+perf 'Attribute value escaping', 100000, (run) ->
+ att = '&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r&<"\t\n\r'
+ run () -> stringify.attEscape(att)
+
+perf 'Attribute value escaping (no replacement)', 100000, (run) ->
+ att = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut.'
+ run () -> stringify.attEscape(att)
+
+perf 'Text escaping (long text)', 100000, (run) ->
+ text = """
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut. Suspendisse efficitur vestibulum purus ut luctus. Maecenas mollis purus sit amet enim sollicitudin dapibus. Aenean eget enim maximus, semper lacus eget, posuere sapien. Maecenas iaculis ipsum in facilisis commodo. Integer tincidunt, mi ut interdum euismod, massa ligula tincidunt sem, in dapibus ipsum risus quis mauris. Nullam maximus mi quis mollis rhoncus. Donec sollicitudin, neque fringilla feugiat vulputate, risus elit luctus nisi, in varius magna enim sed lorem. Phasellus elementum lacus in nisi pharetra, nec semper arcu sodales. Suspendisse ac condimentum magna, vel pretium massa. Duis vehicula neque sapien, id cursus nulla vestibulum at. Sed vehicula consequat eros, in hendrerit risus dictum quis. Nunc nec sodales leo. Suspendisse ut lorem in ipsum bibendum imperdiet sit amet a orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+
+Mauris elementum luctus nisi eget suscipit. Donec vel molestie est. Nam molestie libero ac magna varius mollis. Donec sem massa, luctus et metus sed, pellentesque porttitor lectus. Donec volutpat erat id efficitur tempus. Pellentesque mattis molestie erat nec cursus. Donec est arcu, hendrerit sit amet accumsan non, tincidunt dignissim massa. Suspendisse eget varius diam, faucibus porta odio. Vivamus auctor lectus orci, eget luctus dolor aliquet semper. Nam pulvinar tempus arcu, a semper lorem tincidunt quis. Nam dolor velit, dapibus sed augue ac, condimentum placerat ipsum. Suspendisse dapibus, sapien non ultricies convallis, sapien dolor viverra nibh, non hendrerit leo ipsum quis mi. Cras aliquet nec velit at scelerisque. Sed id commodo nunc, at dignissim nisi.
+
+In eget pretium nulla, vitae laoreet mauris. Mauris ac dui at purus dapibus iaculis et a neque. Pellentesque ut sapien nibh. Duis nulla erat, gravida eget dolor et, euismod blandit enim. Integer maximus facilisis purus, non posuere nulla commodo ut. Integer non facilisis mauris. Phasellus libero sapien, sollicitudin in massa vel, porttitor rhoncus lectus. Fusce interdum felis vel metus consequat, sed tempor urna imperdiet. Pellentesque sit amet ultricies nibh. In viverra tellus in sodales pellentesque. Nullam nisl leo, hendrerit vitae ipsum eget, ullamcorper dictum orci. Maecenas ac metus id lacus pellentesque vestibulum ac eget lacus. Nam congue eros sed dapibus auctor. Cras a purus ut urna viverra consequat. Fusce quis arcu condimentum, vestibulum eros eu, fermentum eros.
+
+In ut mauris at augue consectetur hendrerit at eget lorem. Fusce a lacus eget mi commodo molestie eu eu ante. Pellentesque congue feugiat varius. Suspendisse lacinia, mauris ac rutrum molestie, nulla ex aliquet urna, at vestibulum nunc turpis id justo. Suspendisse est leo, euismod consequat mollis id, varius eget velit. Suspendisse quis euismod orci. Vestibulum quis blandit risus. Donec eget sagittis mauris. Curabitur eu ligula nec ante suscipit congue. Fusce efficitur scelerisque varius. Integer pulvinar eros a volutpat bibendum. Vivamus vitae est id velit pharetra venenatis. In quis interdum mi.
+
+Pellentesque faucibus ultricies diam, id laoreet sem dignissim et. Ut elementum urna eget leo vestibulum, quis varius enim porttitor. Fusce vitae laoreet velit. Quisque at tempor quam, non mollis augue. Pellentesque pharetra consectetur erat id porttitor. Fusce feugiat erat purus. Morbi nec ultrices leo. Integer purus nunc, posuere ut nisi at, tempor ultricies tellus. Nullam eu accumsan magna. Cras vestibulum ipsum vitae dui commodo laoreet. Suspendisse non elementum metus, et ultricies dui.
+
+Mauris id lorem id mauris dictum iaculis. Phasellus molestie purus sit amet diam sollicitudin scelerisque. Suspendisse potenti. Vestibulum pharetra eu odio id ornare. Etiam fringilla, massa a finibus auctor, est leo posuere ante, vitae malesuada enim nisi condimentum nunc. Quisque blandit finibus molestie. Donec sed iaculis sapien. Vivamus suscipit nibh ut elit venenatis, lacinia eleifend nisi pulvinar. Nunc faucibus magna nec felis viverra dignissim. Sed maximus sem erat, vel accumsan erat dignissim ac. Pellentesque rutrum elit lectus, vel efficitur nisi tristique at. Vivamus non volutpat turpis, non fringilla nisl. Duis tincidunt faucibus massa a interdum. Ut ac nulla id nulla ornare dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus.
+
+In pretium neque vel mauris imperdiet, nec porta nunc tristique. Nullam id volutpat tortor. Nunc augue orci, vehicula in consectetur in, euismod sit amet lectus. Duis vehicula sagittis tortor, ut cursus ipsum finibus in. Sed vel dui eros. Fusce vehicula justo et lobortis suscipit. Nulla varius, arcu sit amet pulvinar consectetur, urna dolor suscipit nisi, feugiat interdum augue sem a justo. Proin vitae felis mattis, tempus justo ornare, pharetra sem. Nam dictum lorem et nisl lobortis mattis. Curabitur nibh nulla, pulvinar nec justo a, consectetur consectetur erat. Phasellus semper nisl est, et molestie nisl consectetur a. Maecenas ut placerat elit. Ut mattis tincidunt ex, semper hendrerit neque ultrices nec. Curabitur leo massa, dictum at libero eget, molestie luctus risus. In aliquet a erat sed accumsan. Vestibulum venenatis ante ligula, sit amet vestibulum est mollis vitae.
+
+Donec interdum augue eget feugiat venenatis. Mauris interdum tristique urna eu cursus. Donec sit amet diam volutpat massa posuere lacinia a quis lorem. Vivamus et condimentum eros. Sed eleifend dolor eros, laoreet lobortis risus elementum ac. Donec eget semper mauris. Etiam gravida arcu tortor, id egestas sapien vestibulum et. Curabitur tristique urna at nibh bibendum, et blandit turpis feugiat. Cras dignissim lectus rhoncus elit consectetur vestibulum. Ut finibus nisl in sapien mollis, eu faucibus nisi blandit. Ut velit felis, luctus condimentum quam vel, accumsan blandit sem.
+
+Nullam eros risus, ultrices vitae ipsum eget, cursus mollis turpis. Aenean sagittis nibh sit amet viverra lobortis. Quisque ut neque enim. In velit tortor, vulputate sit amet tristique eu, tempor eu tortor. Integer molestie ante vitae odio ultricies imperdiet. Nulla ut finibus lectus. Etiam ac metus malesuada, gravida neque sit amet, consequat nulla. Pellentesque eu arcu ut odio egestas vehicula sed a augue. Nulla egestas condimentum condimentum. Mauris ultrices viverra odio at egestas. Proin sem purus, sodales a tincidunt id, bibendum ut lacus. Aliquam eget laoreet lectus, eu varius sem. Mauris mattis vehicula sem, id egestas dui consectetur nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
+
+Etiam quis dolor ac ante luctus volutpat. Donec aliquam gravida auctor. Nulla suscipit arcu ut molestie sodales. Nunc convallis enim accumsan, porttitor augue sit amet, gravida orci. Donec mollis urna ligula, a sodales quam vulputate non. Pellentesque in suscipit orci. Fusce scelerisque metus sit amet nisl hendrerit, et viverra purus luctus. Phasellus ac imperdiet lacus, sit amet convallis nisl. Mauris vel massa pellentesque, mattis augue sit amet, posuere lectus. Proin ac sagittis ipsum. Nam ligula purus, consequat sed odio at, suscipit pulvinar augue. Donec hendrerit tempus felis accumsan lobortis.
+
+Donec id neque cursus, accumsan dui sed, dapibus lectus. In tempus felis odio. Vivamus dignissim commodo ante, nec egestas urna sagittis ut. Integer maximus malesuada pharetra. Praesent dui mauris, malesuada ac tempus eget, cursus lobortis arcu. Sed nec consectetur purus. Maecenas eget pellentesque nisl.
+
+Vestibulum a neque turpis. Aenean porta fermentum maximus. In at leo dignissim, laoreet metus at, condimentum augue. Pellentesque vitae enim efficitur, tristique ex vitae, commodo mi. Donec vehicula euismod sapien, at pulvinar tellus molestie a. Etiam ut leo consectetur, condimentum sapien scelerisque, tempor metus. Maecenas nisi risus, varius eget viverra rhoncus, mattis vel massa.
+
+Proin tempor lacinia augue et varius. Mauris a velit metus. Quisque a lorem est. Sed ex sapien, rutrum sit amet vestibulum non, efficitur ut ante. Sed quis arcu mollis, tempor est non, ultricies metus. Sed at rutrum risus. Proin efficitur, tellus vitae consequat condimentum, metus purus facilisis libero, sit amet venenatis sapien elit eu libero. Praesent eget elit nec nisl egestas maximus ac ut odio. Pellentesque a ligula arcu. Nunc nibh arcu, efficitur ut feugiat sed, aliquam sit amet ipsum. Phasellus pharetra ut est sit amet dignissim. In consequat ultricies pretium. Proin euismod, ex id condimentum tempus, nulla tortor faucibus dolor, et efficitur velit arcu sit amet sem. Fusce finibus congue volutpat. Morbi ornare lectus ornare ex sodales, ut rhoncus neque consectetur. Aliquam lobortis scelerisque arcu sit amet elementum.
+
+Nullam quis diam in mi varius fringilla. Phasellus nibh quam, vehicula et pellentesque a, pellentesque eu tellus. Nam ac auctor erat. Quisque laoreet, libero non ullamcorper vestibulum, risus nisl consectetur diam, quis porta erat sapien vitae dui. Aenean efficitur, libero a tincidunt commodo, sapien purus blandit sem, vel auctor ante augue ac metus. Pellentesque eu mi urna. Sed condimentum, lacus sit amet varius feugiat, neque ex rhoncus enim, in fermentum turpis metus a libero. Praesent risus purus, malesuada nec accumsan in, tempor ac tellus. Etiam posuere lacinia feugiat. Praesent sagittis, nulla sed scelerisque lacinia, ipsum mi laoreet elit, ut lacinia quam dui semper nibh.
+
+In eget purus placerat, euismod justo at, feugiat eros. Aliquam eget tristique erat. Praesent vehicula neque vitae ex pretium, at sagittis erat tincidunt. Duis nec facilisis lorem. Sed pharetra ut tellus a feugiat. Suspendisse luctus placerat laoreet. Pellentesque eu tempus quam. Quisque eu magna a velit ultricies ullamcorper ac in erat. Mauris ex purus, pellentesque eget congue nec, bibendum at arcu. Nam eros ipsum, pellentesque a massa eget, porta efficitur mi.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor ex a posuere ornare. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque faucibus convallis lectus, et ullamcorper nisl pharetra ac. Vivamus eu tortor at dui tempor vulputate. Suspendisse at magna quis ipsum fringilla sodales in vel tellus. Phasellus tellus dolor, sollicitudin ac odio vitae, pellentesque ullamcorper justo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque volutpat convallis sem. Ut varius, sapien vitae tincidunt malesuada, orci ante tempus nisl, eget iaculis turpis mauris ac orci.
+
+Aliquam pretium hendrerit ligula, ut euismod est imperdiet id. Fusce leo massa, blandit sit amet sagittis ut, elementum quis odio. Sed sit amet urna a sem elementum tincidunt id eu libero. In convallis nisi et tellus mollis mollis. Nullam id pretium lorem. Phasellus vel sodales arcu. Integer nec erat vitae justo accumsan porttitor accumsan a eros. Nunc mattis sagittis velit, ut tempor neque maximus in. Nulla vulputate purus non metus venenatis ultrices a non tellus. Praesent sodales nisi quis efficitur imperdiet. Donec a quam id risus interdum sollicitudin eget et orci. Donec hendrerit vel sem in condimentum.
+
+Praesent vel ultricies lorem. Vestibulum tempus malesuada elit a gravida. Proin cursus nisl urna, et finibus nisl porttitor sed. Donec tristique leo vel sem pharetra maximus. Praesent eleifend felis eu imperdiet semper. Etiam pretium mauris diam. Nam quam nisl, laoreet eget scelerisque accumsan, luctus quis dui. Integer at ornare odio.
+
+Sed id tellus velit. Pellentesque vitae condimentum justo. Vestibulum fringilla mauris nec laoreet tincidunt. Maecenas arcu ligula, euismod ut convallis ac, tincidunt id nibh. Aliquam eu sollicitudin velit. Nulla nec sapien leo. Nullam venenatis vel justo vestibulum accumsan. Pellentesque sapien magna, dignissim eget lorem in, condimentum efficitur nisi. Sed quis turpis pellentesque metus aliquam sollicitudin eget vel orci. Sed ac orci nec libero posuere aliquam at quis velit. Quisque at pellentesque quam. Quisque venenatis felis est, eu scelerisque dui elementum non.
+
+Duis venenatis eleifend commodo. In hac habitasse platea dictumst. Proin elementum, mi sed suscipit blandit, purus quam lacinia lectus, ut venenatis felis elit at nulla. Aenean dignissim lacus ac lectus lacinia convallis. Donec fringilla leo purus. Suspendisse potenti. Curabitur aliquam sodales dui ut imperdiet.
+
+Nam in ex id augue facilisis ornare non nec lorem. Nam dolor ex, facilisis nec dignissim vel, mollis eget ex. Aliquam consectetur turpis eget quam pellentesque, at pretium dolor volutpat. Cras sed velit quis dolor scelerisque rhoncus sit amet vel lectus. Sed lacinia arcu convallis mattis aliquet. Proin faucibus vulputate varius. Nullam vel dictum libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla facilisi. Aliquam mauris ex, faucibus nec tempor quis, placerat maximus augue. Suspendisse commodo pretium sem quis laoreet. Vivamus porta, urna eu tincidunt semper, purus sem tempor sem, ut condimentum diam nibh vel mi. Donec sit amet tellus sit amet mauris vestibulum feugiat. Aliquam in orci quis est feugiat porttitor. Aliquam nec metus ac urna viverra tincidunt.
+
+Nunc ac orci cursus, faucibus justo nec, lobortis tortor. Nulla tincidunt scelerisque risus, at blandit arcu elementum sed. Maecenas non justo dapibus, tincidunt nibh in, porta neque. Sed non mi id leo vestibulum iaculis. Nam ultricies odio eget arcu vehicula tempus. Suspendisse maximus consectetur arcu, id dapibus lacus mollis et. Fusce nec vulputate nulla. Nam dictum eget sapien id interdum. Duis mi sem, gravida nec dolor vel, elementum facilisis tellus. Integer vel accumsan diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in commodo ex. Praesent commodo porttitor ipsum. Vestibulum volutpat diam at tellus feugiat, id sodales magna bibendum. Mauris odio eros, rutrum at scelerisque eget, porta sed turpis. Suspendisse porta dictum cursus.
+
+Mauris accumsan finibus mi sit amet auctor. Aliquam erat volutpat. Vestibulum at euismod sapien, euismod tincidunt lectus. Mauris aliquet sapien at erat vestibulum, a vestibulum dui bibendum. Etiam vel vulputate justo. Nam vitae ultrices nisl, eu dapibus ex. Quisque volutpat nibh vitae semper tristique. Mauris in nibh lectus. Maecenas elit leo, ultricies quis bibendum sed, rhoncus et neque. Sed elementum nec dui id lobortis. Vestibulum sollicitudin arcu nulla, sit amet lobortis urna ultrices a. Cras fermentum dolor id faucibus pretium. Pellentesque congue quam metus, quis consequat leo sollicitudin vitae.
+
+Integer congue, neque a scelerisque varius, purus nibh fringilla nunc, sit amet pretium felis sapien vel orci. Donec mattis ac orci in viverra. Suspendisse a justo sollicitudin lacus efficitur ullamcorper. Mauris faucibus nisl quis dolor volutpat aliquam. Aenean venenatis, odio et rhoncus lobortis, risus ligula finibus massa, non dignissim augue nisl vel arcu. Nullam fringilla odio at libero scelerisque, vitae placerat nisi fringilla. Etiam quis urna turpis. Quisque quis leo ante. Duis nec elit massa. Sed porttitor, nulla id efficitur blandit, purus ligula vulputate lectus, quis molestie metus orci ac tellus. Donec sapien massa, suscipit eu tristique ac, posuere sed lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Duis bibendum erat eget felis tempor, eget imperdiet nibh vestibulum. In hac habitasse platea dictumst. Quisque vehicula pulvinar turpis, ac dictum risus auctor varius.
+
+Praesent ac ex vestibulum, dapibus lacus in, malesuada diam. Sed in turpis in justo venenatis pharetra. Fusce sed lobortis nisl. Phasellus faucibus magna ante, malesuada placerat justo faucibus tempus. Phasellus hendrerit fermentum felis. Proin malesuada, urna vel tincidunt pharetra, eros ante bibendum sem, nec viverra nunc arcu at mauris. Sed et lorem pharetra, feugiat tortor vitae, rutrum lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mauris leo, condimentum at risus eget, aliquam consequat mauris. Mauris id auctor purus.
+
+Aenean augue mauris, cursus quis elit eget, molestie pharetra sem. Mauris congue felis ut nibh facilisis, ut pharetra arcu pharetra. Curabitur semper mattis orci eu dictum. Phasellus hendrerit scelerisque dignissim. Sed aliquet nunc scelerisque, facilisis nulla at, posuere lorem. Maecenas blandit, lectus nec varius bibendum, nibh risus posuere turpis, id pretium justo elit vitae ligula. Sed risus ante, congue quis libero consequat, laoreet convallis diam.
+
+Aenean sagittis ex vel semper ullamcorper. Donec mattis, ipsum tincidunt aliquet vehicula, elit tellus porta mi, a convallis quam orci ac lectus. Proin aliquam nulla in erat mattis placerat. Aliquam ligula sem, egestas ac turpis vitae, facilisis iaculis mauris. Donec ac egestas urna, ac iaculis orci. Integer urna magna, eleifend sed nunc vitae, commodo lobortis massa. Aenean ultrices pulvinar dui, non blandit lorem pretium quis. Praesent in molestie purus, vestibulum interdum quam. Pellentesque auctor erat non mauris fringilla eleifend.
+
+Etiam blandit vel leo nec pulvinar. Phasellus elementum facilisis mi et egestas. Praesent finibus, elit vel venenatis sodales, turpis nibh tincidunt turpis, eu venenatis urna tortor at massa. Proin iaculis ipsum ut elit maximus tincidunt. Suspendisse justo turpis, sollicitudin ut eros quis, dictum placerat nibh. Sed mattis ornare pulvinar. Cras lacus purus, interdum vitae commodo sollicitudin, suscipit eu quam. Mauris luctus laoreet metus at posuere. Etiam faucibus diam quis purus vulputate, nec blandit lorem bibendum.
+
+Aliquam nisl neque, vulputate eu arcu id, elementum dictum sapien. Aliquam aliquam, mauris eget vestibulum accumsan, metus tellus vulputate urna, nec volutpat felis turpis ac nulla. Morbi pretium magna bibendum eros ultricies lobortis. Vestibulum euismod vitae nibh in posuere. Vivamus in iaculis mi. Pellentesque iaculis ex nec tellus pulvinar interdum. Integer a tincidunt risus, eu faucibus mi. Vivamus posuere sapien eu orci scelerisque rutrum at eu leo. Nullam consectetur est eu justo congue commodo. Vestibulum ac finibus velit. Donec faucibus nulla at risus rhoncus, a vulputate magna pulvinar. Aliquam condimentum rhoncus lacus sed hendrerit.
+
+Morbi non hendrerit nisl, eu fringilla erat. Praesent ac dolor sit amet libero tempus porttitor. Cras vel sem elementum, venenatis ipsum vel, molestie tellus. Aliquam erat volutpat. Maecenas malesuada urna nec diam sodales pharetra. Aliquam non lobortis metus. Donec eleifend mollis eros in condimentum. Suspendisse sagittis consequat justo, vitae tincidunt orci luctus vel. Ut lobortis tincidunt libero. Sed dignissim lorem sit amet nibh aliquam, pharetra pulvinar justo consequat. Suspendisse sed dictum massa. Ut fermentum, dolor a fringilla bibendum, lorem ligula scelerisque turpis, in porta justo neque non lectus. Suspendisse pellentesque risus sit amet ligula pretium condimentum. Fusce odio tortor, pulvinar in dapibus nec, pharetra eget nisi. Suspendisse luctus eros eget mauris pretium blandit.
+
+Nam vel fermentum nulla. Sed tincidunt tellus id mattis dapibus. Quisque ac congue libero, nec elementum nulla. Phasellus quam eros, congue eu lacinia a, interdum et eros. Aenean suscipit risus interdum mauris porttitor, vehicula auctor tellus molestie. Donec efficitur nisi eget ex interdum sollicitudin. Nunc ultricies maximus quam, at pulvinar eros volutpat quis. Nam venenatis mauris enim, sed malesuada tortor eleifend sit amet. Cras imperdiet convallis viverra. Proin purus nulla, bibendum in aliquam quis, sollicitudin a risus. Proin vehicula tincidunt tortor quis lacinia. Praesent tristique odio sed orci consequat, ut pulvinar mauris semper. Mauris felis mi, ultricies a dolor id, viverra laoreet orci. Nam ex mi, semper nec imperdiet sed, posuere et eros.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec scelerisque ipsum sed libero tempor, in vulputate ante sodales. Sed vehicula nulla non ante blandit, quis porttitor diam auctor. Nulla sodales risus ut dui vulputate, nec elementum sem volutpat. Quisque id blandit quam. Proin interdum quis lacus ac suscipit. Etiam a scelerisque sapien. Praesent cursus, mi eget dapibus hendrerit, nibh eros elementum lacus, sit amet congue dui nunc at dui. Phasellus tristique nulla ut tincidunt faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse efficitur congue purus, a viverra sapien tristique vel.
+
+Vestibulum elementum pellentesque turpis. Phasellus id quam sit amet ex sodales malesuada. Morbi iaculis quis nibh vitae finibus. Nullam vitae luctus nisl, ac varius leo. Fusce sed quam eu enim volutpat blandit. Etiam ornare aliquam mi, eget porttitor magna euismod non. Curabitur porta vel metus ut mollis.
+
+Aenean sit amet sagittis lacus. Quisque in dui commodo, rutrum massa tincidunt, hendrerit mauris. Maecenas sit amet nisl facilisis, interdum eros rhoncus, malesuada nisl. Aliquam condimentum erat dui, eget dignissim magna volutpat vitae. Mauris porttitor, risus ut auctor porttitor, sem nisl interdum nisi, ac tempus est enim in tortor. Sed rhoncus magna ac feugiat pharetra. Nulla scelerisque quis neque ut porttitor. Ut lacinia in ipsum sit amet lobortis. Aliquam eu justo vel leo facilisis tristique. Pellentesque cursus, lacus a rhoncus auctor, erat velit vehicula diam, et fermentum erat mauris fermentum turpis. Donec quam sapien, laoreet sodales sagittis ac, sodales vitae lectus. Donec vitae lorem rutrum, lobortis libero maximus, condimentum sapien. Pellentesque mi lorem, rhoncus vel lacinia a, venenatis et velit.
+
+Curabitur malesuada ante vel maximus luctus. Etiam dui lectus, condimentum eget lobortis eget, eleifend pellentesque ligula. Nam eu pharetra urna, sit amet facilisis turpis. Mauris tincidunt vestibulum turpis nec suscipit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque egestas commodo finibus. Donec pellentesque nec libero et imperdiet. Cras cursus purus ut libero pretium vulputate. Mauris non arcu purus. Donec sollicitudin dignissim massa ac tincidunt. Donec non consectetur turpis, et venenatis dui.
+
+Nam mattis urna dolor, a varius sem tempor a. Vivamus porttitor dignissim metus vel ultrices. Integer ac justo vel nisl consequat efficitur. Maecenas sit amet hendrerit elit. Suspendisse lobortis semper mauris id convallis. Duis nibh dui, lacinia a turpis sed, interdum aliquam ex. Praesent tempor rhoncus nibh vel dictum. Quisque feugiat mi sit amet nunc fermentum pellentesque. Ut porta lacinia erat eu pulvinar. Nulla vestibulum fermentum felis, eu ultricies lectus. Ut eget lobortis sapien. Aenean consectetur in nisl interdum mattis. Sed a ipsum pharetra, congue augue a, accumsan ex. Quisque luctus sapien non tincidunt vulputate.
+
+Aenean auctor consectetur urna et rhoncus. Vivamus mattis tortor at massa porta, in auctor quam porttitor. Nulla facilisi. Sed auctor ipsum tortor, quis hendrerit risus convallis eget. Vivamus a mollis nulla, at fringilla risus. In a cursus dui, nec vehicula elit. Donec in sodales ante, quis gravida est. Sed interdum mi non ornare lacinia. Cras placerat cursus dolor nec euismod. Nulla vel velit quis nibh aliquam eleifend. Cras mattis vitae erat nec gravida. Vestibulum luctus sagittis nibh, a pretium neque dictum eget. Quisque vitae consequat dui. Donec libero eros, pharetra sit amet sapien id, euismod gravida mi.
+
+Duis tristique nisi id urna feugiat, sed aliquet nulla imperdiet. Ut quis felis finibus, lobortis nunc eu, sodales risus. Fusce at euismod risus. Nunc pulvinar libero volutpat, mattis eros facilisis, mollis nibh. Maecenas augue nunc, mollis sit amet volutpat et, interdum eu augue. Etiam porttitor tortor sem, vitae hendrerit nulla lobortis ut. In non sollicitudin eros. Cras bibendum lorem id odio sollicitudin euismod. Aliquam ullamcorper purus at turpis accumsan blandit. Donec at interdum arcu. Nam fermentum est lectus, vel tincidunt purus sollicitudin a. Aliquam vel orci massa.
+
+Fusce fringilla et justo et interdum. Fusce molestie, tellus vitae elementum lobortis, enim augue condimentum nulla, a semper enim quam in dui. Vestibulum a pharetra felis. Proin eu sollicitudin leo. In vestibulum rhoncus augue, non ultrices turpis. Donec maximus neque semper tellus condimentum, in aliquam dui posuere. Sed ultrices nisl purus, quis sollicitudin eros laoreet quis. Praesent nunc nisl, varius at suscipit sed, tristique at neque.
+
+Quisque aliquam tincidunt augue vitae rhoncus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin eu luctus erat. Nullam auctor, purus a eleifend efficitur, metus ligula accumsan quam, quis bibendum enim lacus quis neque. Maecenas lacinia ipsum molestie felis accumsan, in dignissim purus aliquet. Nunc turpis massa, ultricies in lacinia ut, luctus ut felis. Morbi magna nisi, sodales in arcu sit amet, efficitur mattis velit. Ut scelerisque enim nibh, vel pretium urna varius vel. Cras vitae accumsan nunc, ut iaculis tortor. Nam vitae laoreet orci, sit amet rutrum mi. Nunc blandit purus eu hendrerit tempor. Vestibulum tincidunt pharetra purus ut sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed laoreet urna, sit amet commodo erat. Fusce euismod justo erat, et placerat odio accumsan finibus. Proin pellentesque ligula ut nibh condimentum, sed ornare justo faucibus. Fusce consectetur sapien nec dui varius, vel pharetra felis molestie. Duis accumsan odio metus, ut varius orci finibus nec. Sed non ipsum vitae est aliquet mollis. Pellentesque facilisis feugiat suscipit.
+
+Mauris ut enim sit amet metus bibendum finibus. Suspendisse iaculis, tellus maximus placerat elementum, libero turpis fermentum dolor, ut lacinia sapien ipsum a nulla. Etiam sollicitudin dictum dolor, ac congue sem pulvinar nec. Ut egestas urna non neque volutpat egestas. Integer porta vel orci volutpat tincidunt. In egestas fringilla ipsum ac pharetra. Fusce justo dui, dignissim sed leo at, tincidunt finibus magna. Pellentesque vel nunc risus. Praesent lacinia blandit convallis. Cras eget magna metus. Maecenas fringilla dolor eu quam dictum consequat. Donec pellentesque eleifend velit, a commodo dui faucibus eu. Phasellus pretium nulla ipsum, et interdum magna interdum et. Mauris a sem ullamcorper, consectetur quam accumsan, porttitor eros.
+
+Praesent facilisis, ipsum ac tincidunt auctor, tellus ipsum convallis magna, vel maximus sem lorem et tortor. Sed elit diam, faucibus sed turpis eget, commodo facilisis nunc. Vestibulum vitae arcu tristique, varius libero molestie, sollicitudin mi. In tincidunt nisl in eros imperdiet faucibus. Cras ex ipsum, vehicula eget neque eget, viverra pellentesque erat. Suspendisse vitae tristique dolor. Nulla ornare imperdiet metus id mollis. Fusce ligula ex, aliquam sed purus quis, venenatis volutpat lectus. Sed iaculis ante sit amet massa consequat interdum. Ut feugiat risus sit amet commodo euismod. Sed tristique quam sit amet lacinia cursus. Donec faucibus, erat a dapibus rhoncus, orci est interdum ex, sit amet semper massa quam et lectus.
+
+Suspendisse mollis turpis aliquam felis efficitur, eu ultrices tellus suscipit. Aenean at congue erat, vel ultricies eros. Quisque hendrerit arcu ut est aliquet, et vehicula lectus ullamcorper. Pellentesque posuere neque nec auctor scelerisque. Phasellus rhoncus odio ac nisl ornare condimentum. Nam nec arcu porttitor tellus faucibus malesuada id a est. Vivamus id facilisis ante. Proin quis risus ipsum. In sed nibh at nisl tempus interdum. Ut sit amet malesuada nisl, id pharetra metus. Nulla lorem velit, euismod nec dictum at, porttitor ac erat. Aliquam est leo, elementum nec ultricies nec, interdum sed libero. Quisque mattis placerat scelerisque. Praesent vulputate sit amet felis non tristique.
+
+Phasellus odio ex, ultricies et tincidunt sit amet, auctor id felis. Fusce facilisis nibh risus, eget placerat nunc pellentesque vel. Morbi cursus metus eu arcu viverra rutrum. Nulla eget dolor blandit, pulvinar sem aliquet, hendrerit purus. Fusce sodales venenatis posuere. Cras egestas placerat odio non scelerisque. Praesent tincidunt maximus semper. Vivamus eget libero massa. Cras auctor orci sed nibh sagittis ultrices. Curabitur leo lacus, suscipit ac pharetra vel, euismod eu turpis. Aenean quis justo efficitur, mattis nisl sed, mollis lacus. Integer feugiat non metus vitae faucibus. Morbi sem massa, pretium id risus a, congue volutpat mi. Vivamus lacinia enim lorem, id malesuada ante vehicula non. Praesent ac urna quis justo malesuada euismod.
+
+Integer sed ligula id purus dictum tempus eu non ex. Phasellus tincidunt lectus in imperdiet porttitor. Integer ligula dolor, porttitor et congue vitae, elementum eget sem. Proin a libero in enim efficitur mollis. Proin molestie metus dolor, in fermentum massa condimentum at. Cras eget auctor odio, a luctus sapien. Nulla in hendrerit leo, sed venenatis augue. Proin mollis vestibulum magna. Nulla dapibus lacus nec condimentum maximus. Phasellus id efficitur enim. Vivamus molestie mauris at condimentum elementum. Maecenas ultrices mauris quis tincidunt viverra. Ut eget ultricies ligula. Nulla id fermentum nisl, in ultrices velit.
+
+Nunc blandit tellus sed est auctor condimentum. Integer fringilla aliquam libero, id sagittis ipsum lacinia sit amet. Donec sit amet nunc felis. Vestibulum at commodo arcu, a malesuada est. Aenean ultrices, mauris in pellentesque posuere, mi orci fermentum justo, vitae rutrum neque erat a nisi. In sed urna quis sem egestas faucibus ut quis ipsum. Quisque porta lectus sit amet urna ultricies iaculis.
+
+Praesent ultrices odio nisl, eu consequat dolor sollicitudin nec. Suspendisse dignissim lobortis nulla nec molestie. Duis in diam sed est dignissim faucibus vitae in metus. Phasellus lacinia urna eros, vitae vulputate sem fermentum eget. Suspendisse et efficitur dolor. Mauris faucibus sodales felis eu luctus. Cras non mattis lacus. Proin in lobortis sapien. Nulla at augue sed est congue sollicitudin.
+
+Nunc nisi lorem, dapibus id tincidunt quis, sollicitudin sit amet justo. In mollis orci pretium aliquam fermentum. Fusce sodales mi eget tellus posuere ullamcorper. Sed varius sagittis elit, in feugiat odio maximus sed. Cras eleifend massa sit amet mi suscipit, vel laoreet leo pretium. Quisque neque erat, mollis eget elementum non, blandit in lectus. Sed dignissim felis ac felis convallis elementum molestie id lectus. Nullam fermentum lorem mi, in placerat quam mollis vitae. Pellentesque ultrices, nibh at sagittis molestie, augue mauris bibendum dui, ut ultricies lorem magna eu massa. Quisque quis purus eu nisi rhoncus tempor. Donec eget fringilla massa. Vivamus sed varius elit. Aenean egestas tellus eget magna dapibus hendrerit. Nunc vel leo eu purus tempus mollis.
+
+Praesent sagittis eget lectus non vestibulum. Fusce id elit nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec id malesuada justo, non ornare felis. Nulla ultricies lorem ex, et accumsan ex volutpat sodales. Pellentesque venenatis neque in hendrerit blandit. Donec dapibus est fermentum lacus fringilla, ut volutpat tellus consectetur. Maecenas id semper tortor. In pellentesque aliquet elit, non vulputate augue mollis fermentum. Nullam posuere eget elit a placerat. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Phasellus vestibulum tristique quam a faucibus. Proin sit amet sem et leo posuere efficitur vitae et ante. Nullam congue nisl augue, in ultricies orci tempor quis. Aliquam erat volutpat. In luctus, sapien at venenatis fermentum, lorem urna ultrices elit, ac volutpat metus purus eu turpis. Phasellus semper cursus mi, vitae tempor est accumsan at. Integer accumsan nec augue vitae viverra. Sed tempus cursus enim non dapibus. In commodo neque in ultricies semper. Proin auctor lacinia eros, ut tempor lectus pulvinar quis. Ut fermentum vulputate pellentesque. Duis tempor ante quis metus consectetur maximus. Curabitur a tincidunt enim.
+
+Vestibulum dictum, urna a fringilla imperdiet, tortor arcu mattis odio, et efficitur dui neque ac mauris. Vestibulum auctor risus lacus. Integer elementum erat nisl, id vehicula enim mattis in. Vestibulum consequat neque ante, in sodales magna pulvinar in. Vivamus interdum eros non magna aliquam tristique. Ut aliquam congue ante in gravida. Sed eu turpis sollicitudin, suscipit ligula id, commodo tellus. Aliquam eu sapien vitae augue gravida egestas nec sit amet turpis. Curabitur vulputate vulputate dui, et facilisis lectus tincidunt nec. Integer tristique vitae quam condimentum maximus. Ut ultricies convallis nisl eu elementum.
+
+Curabitur non nisi lectus. Aliquam finibus lorem id dui molestie, sed ullamcorper quam lobortis. Maecenas in gravida urna. Pellentesque consequat risus vel nibh tempus facilisis. Etiam auctor lacinia lacus vitae vulputate. Etiam bibendum arcu at ipsum elementum, id sodales nunc convallis. Phasellus elementum mi non sapien blandit suscipit. Integer accumsan et justo nec mattis. Vestibulum quis erat viverra, condimentum enim eget, auctor tortor. Nunc ac mauris sit amet urna pellentesque malesuada. Fusce urna justo, finibus eget blandit eget, volutpat eu nisi. In nisi nunc, sodales sit amet tempor eu, feugiat feugiat tellus. Nulla felis purus, gravida eu iaculis in, interdum id purus. In hac habitasse platea dictumst. Aenean consequat, quam tincidunt sodales lacinia, ex dui faucibus massa, ut porta dolor justo et mi.
+
+Donec a massa porta, vehicula diam et, pulvinar tortor. Duis tincidunt, nibh ut pharetra hendrerit, est orci egestas urna, et sollicitudin massa lacus aliquam ex. Curabitur in quam sed elit scelerisque pretium nec rhoncus nulla. In a ligula.
+ """
+
+ run () -> stringify.textEscape(text)
+
+perf 'Attribute value escaping (long value)', 100000, (run) ->
+ text = """
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus dui metus, quis mattis nibh sollicitudin ut. Suspendisse efficitur vestibulum purus ut luctus. Maecenas mollis purus sit amet enim sollicitudin dapibus. Aenean eget enim maximus, semper lacus eget, posuere sapien. Maecenas iaculis ipsum in facilisis commodo. Integer tincidunt, mi ut interdum euismod, massa ligula tincidunt sem, in dapibus ipsum risus quis mauris. Nullam maximus mi quis mollis rhoncus. Donec sollicitudin, neque fringilla feugiat vulputate, risus elit luctus nisi, in varius magna enim sed lorem. Phasellus elementum lacus in nisi pharetra, nec semper arcu sodales. Suspendisse ac condimentum magna, vel pretium massa. Duis vehicula neque sapien, id cursus nulla vestibulum at. Sed vehicula consequat eros, in hendrerit risus dictum quis. Nunc nec sodales leo. Suspendisse ut lorem in ipsum bibendum imperdiet sit amet a orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+
+Mauris elementum luctus nisi eget suscipit. Donec vel molestie est. Nam molestie libero ac magna varius mollis. Donec sem massa, luctus et metus sed, pellentesque porttitor lectus. Donec volutpat erat id efficitur tempus. Pellentesque mattis molestie erat nec cursus. Donec est arcu, hendrerit sit amet accumsan non, tincidunt dignissim massa. Suspendisse eget varius diam, faucibus porta odio. Vivamus auctor lectus orci, eget luctus dolor aliquet semper. Nam pulvinar tempus arcu, a semper lorem tincidunt quis. Nam dolor velit, dapibus sed augue ac, condimentum placerat ipsum. Suspendisse dapibus, sapien non ultricies convallis, sapien dolor viverra nibh, non hendrerit leo ipsum quis mi. Cras aliquet nec velit at scelerisque. Sed id commodo nunc, at dignissim nisi.
+
+In eget pretium nulla, vitae laoreet mauris. Mauris ac dui at purus dapibus iaculis et a neque. Pellentesque ut sapien nibh. Duis nulla erat, gravida eget dolor et, euismod blandit enim. Integer maximus facilisis purus, non posuere nulla commodo ut. Integer non facilisis mauris. Phasellus libero sapien, sollicitudin in massa vel, porttitor rhoncus lectus. Fusce interdum felis vel metus consequat, sed tempor urna imperdiet. Pellentesque sit amet ultricies nibh. In viverra tellus in sodales pellentesque. Nullam nisl leo, hendrerit vitae ipsum eget, ullamcorper dictum orci. Maecenas ac metus id lacus pellentesque vestibulum ac eget lacus. Nam congue eros sed dapibus auctor. Cras a purus ut urna viverra consequat. Fusce quis arcu condimentum, vestibulum eros eu, fermentum eros.
+
+In ut mauris at augue consectetur hendrerit at eget lorem. Fusce a lacus eget mi commodo molestie eu eu ante. Pellentesque congue feugiat varius. Suspendisse lacinia, mauris ac rutrum molestie, nulla ex aliquet urna, at vestibulum nunc turpis id justo. Suspendisse est leo, euismod consequat mollis id, varius eget velit. Suspendisse quis euismod orci. Vestibulum quis blandit risus. Donec eget sagittis mauris. Curabitur eu ligula nec ante suscipit congue. Fusce efficitur scelerisque varius. Integer pulvinar eros a volutpat bibendum. Vivamus vitae est id velit pharetra venenatis. In quis interdum mi.
+
+Pellentesque faucibus ultricies diam, id laoreet sem dignissim et. Ut elementum urna eget leo vestibulum, quis varius enim porttitor. Fusce vitae laoreet velit. Quisque at tempor quam, non mollis augue. Pellentesque pharetra consectetur erat id porttitor. Fusce feugiat erat purus. Morbi nec ultrices leo. Integer purus nunc, posuere ut nisi at, tempor ultricies tellus. Nullam eu accumsan magna. Cras vestibulum ipsum vitae dui commodo laoreet. Suspendisse non elementum metus, et ultricies dui.
+
+Mauris id lorem id mauris dictum iaculis. Phasellus molestie purus sit amet diam sollicitudin scelerisque. Suspendisse potenti. Vestibulum pharetra eu odio id ornare. Etiam fringilla, massa a finibus auctor, est leo posuere ante, vitae malesuada enim nisi condimentum nunc. Quisque blandit finibus molestie. Donec sed iaculis sapien. Vivamus suscipit nibh ut elit venenatis, lacinia eleifend nisi pulvinar. Nunc faucibus magna nec felis viverra dignissim. Sed maximus sem erat, vel accumsan erat dignissim ac. Pellentesque rutrum elit lectus, vel efficitur nisi tristique at. Vivamus non volutpat turpis, non fringilla nisl. Duis tincidunt faucibus massa a interdum. Ut ac nulla id nulla ornare dapibus. Interdum et malesuada fames ac ante ipsum primis in faucibus.
+
+In pretium neque vel mauris imperdiet, nec porta nunc tristique. Nullam id volutpat tortor. Nunc augue orci, vehicula in consectetur in, euismod sit amet lectus. Duis vehicula sagittis tortor, ut cursus ipsum finibus in. Sed vel dui eros. Fusce vehicula justo et lobortis suscipit. Nulla varius, arcu sit amet pulvinar consectetur, urna dolor suscipit nisi, feugiat interdum augue sem a justo. Proin vitae felis mattis, tempus justo ornare, pharetra sem. Nam dictum lorem et nisl lobortis mattis. Curabitur nibh nulla, pulvinar nec justo a, consectetur consectetur erat. Phasellus semper nisl est, et molestie nisl consectetur a. Maecenas ut placerat elit. Ut mattis tincidunt ex, semper hendrerit neque ultrices nec. Curabitur leo massa, dictum at libero eget, molestie luctus risus. In aliquet a erat sed accumsan. Vestibulum venenatis ante ligula, sit amet vestibulum est mollis vitae.
+
+Donec interdum augue eget feugiat venenatis. Mauris interdum tristique urna eu cursus. Donec sit amet diam volutpat massa posuere lacinia a quis lorem. Vivamus et condimentum eros. Sed eleifend dolor eros, laoreet lobortis risus elementum ac. Donec eget semper mauris. Etiam gravida arcu tortor, id egestas sapien vestibulum et. Curabitur tristique urna at nibh bibendum, et blandit turpis feugiat. Cras dignissim lectus rhoncus elit consectetur vestibulum. Ut finibus nisl in sapien mollis, eu faucibus nisi blandit. Ut velit felis, luctus condimentum quam vel, accumsan blandit sem.
+
+Nullam eros risus, ultrices vitae ipsum eget, cursus mollis turpis. Aenean sagittis nibh sit amet viverra lobortis. Quisque ut neque enim. In velit tortor, vulputate sit amet tristique eu, tempor eu tortor. Integer molestie ante vitae odio ultricies imperdiet. Nulla ut finibus lectus. Etiam ac metus malesuada, gravida neque sit amet, consequat nulla. Pellentesque eu arcu ut odio egestas vehicula sed a augue. Nulla egestas condimentum condimentum. Mauris ultrices viverra odio at egestas. Proin sem purus, sodales a tincidunt id, bibendum ut lacus. Aliquam eget laoreet lectus, eu varius sem. Mauris mattis vehicula sem, id egestas dui consectetur nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
+
+Etiam quis dolor ac ante luctus volutpat. Donec aliquam gravida auctor. Nulla suscipit arcu ut molestie sodales. Nunc convallis enim accumsan, porttitor augue sit amet, gravida orci. Donec mollis urna ligula, a sodales quam vulputate non. Pellentesque in suscipit orci. Fusce scelerisque metus sit amet nisl hendrerit, et viverra purus luctus. Phasellus ac imperdiet lacus, sit amet convallis nisl. Mauris vel massa pellentesque, mattis augue sit amet, posuere lectus. Proin ac sagittis ipsum. Nam ligula purus, consequat sed odio at, suscipit pulvinar augue. Donec hendrerit tempus felis accumsan lobortis.
+
+Donec id neque cursus, accumsan dui sed, dapibus lectus. In tempus felis odio. Vivamus dignissim commodo ante, nec egestas urna sagittis ut. Integer maximus malesuada pharetra. Praesent dui mauris, malesuada ac tempus eget, cursus lobortis arcu. Sed nec consectetur purus. Maecenas eget pellentesque nisl.
+
+Vestibulum a neque turpis. Aenean porta fermentum maximus. In at leo dignissim, laoreet metus at, condimentum augue. Pellentesque vitae enim efficitur, tristique ex vitae, commodo mi. Donec vehicula euismod sapien, at pulvinar tellus molestie a. Etiam ut leo consectetur, condimentum sapien scelerisque, tempor metus. Maecenas nisi risus, varius eget viverra rhoncus, mattis vel massa.
+
+Proin tempor lacinia augue et varius. Mauris a velit metus. Quisque a lorem est. Sed ex sapien, rutrum sit amet vestibulum non, efficitur ut ante. Sed quis arcu mollis, tempor est non, ultricies metus. Sed at rutrum risus. Proin efficitur, tellus vitae consequat condimentum, metus purus facilisis libero, sit amet venenatis sapien elit eu libero. Praesent eget elit nec nisl egestas maximus ac ut odio. Pellentesque a ligula arcu. Nunc nibh arcu, efficitur ut feugiat sed, aliquam sit amet ipsum. Phasellus pharetra ut est sit amet dignissim. In consequat ultricies pretium. Proin euismod, ex id condimentum tempus, nulla tortor faucibus dolor, et efficitur velit arcu sit amet sem. Fusce finibus congue volutpat. Morbi ornare lectus ornare ex sodales, ut rhoncus neque consectetur. Aliquam lobortis scelerisque arcu sit amet elementum.
+
+Nullam quis diam in mi varius fringilla. Phasellus nibh quam, vehicula et pellentesque a, pellentesque eu tellus. Nam ac auctor erat. Quisque laoreet, libero non ullamcorper vestibulum, risus nisl consectetur diam, quis porta erat sapien vitae dui. Aenean efficitur, libero a tincidunt commodo, sapien purus blandit sem, vel auctor ante augue ac metus. Pellentesque eu mi urna. Sed condimentum, lacus sit amet varius feugiat, neque ex rhoncus enim, in fermentum turpis metus a libero. Praesent risus purus, malesuada nec accumsan in, tempor ac tellus. Etiam posuere lacinia feugiat. Praesent sagittis, nulla sed scelerisque lacinia, ipsum mi laoreet elit, ut lacinia quam dui semper nibh.
+
+In eget purus placerat, euismod justo at, feugiat eros. Aliquam eget tristique erat. Praesent vehicula neque vitae ex pretium, at sagittis erat tincidunt. Duis nec facilisis lorem. Sed pharetra ut tellus a feugiat. Suspendisse luctus placerat laoreet. Pellentesque eu tempus quam. Quisque eu magna a velit ultricies ullamcorper ac in erat. Mauris ex purus, pellentesque eget congue nec, bibendum at arcu. Nam eros ipsum, pellentesque a massa eget, porta efficitur mi.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor ex a posuere ornare. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque faucibus convallis lectus, et ullamcorper nisl pharetra ac. Vivamus eu tortor at dui tempor vulputate. Suspendisse at magna quis ipsum fringilla sodales in vel tellus. Phasellus tellus dolor, sollicitudin ac odio vitae, pellentesque ullamcorper justo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque volutpat convallis sem. Ut varius, sapien vitae tincidunt malesuada, orci ante tempus nisl, eget iaculis turpis mauris ac orci.
+
+Aliquam pretium hendrerit ligula, ut euismod est imperdiet id. Fusce leo massa, blandit sit amet sagittis ut, elementum quis odio. Sed sit amet urna a sem elementum tincidunt id eu libero. In convallis nisi et tellus mollis mollis. Nullam id pretium lorem. Phasellus vel sodales arcu. Integer nec erat vitae justo accumsan porttitor accumsan a eros. Nunc mattis sagittis velit, ut tempor neque maximus in. Nulla vulputate purus non metus venenatis ultrices a non tellus. Praesent sodales nisi quis efficitur imperdiet. Donec a quam id risus interdum sollicitudin eget et orci. Donec hendrerit vel sem in condimentum.
+
+Praesent vel ultricies lorem. Vestibulum tempus malesuada elit a gravida. Proin cursus nisl urna, et finibus nisl porttitor sed. Donec tristique leo vel sem pharetra maximus. Praesent eleifend felis eu imperdiet semper. Etiam pretium mauris diam. Nam quam nisl, laoreet eget scelerisque accumsan, luctus quis dui. Integer at ornare odio.
+
+Sed id tellus velit. Pellentesque vitae condimentum justo. Vestibulum fringilla mauris nec laoreet tincidunt. Maecenas arcu ligula, euismod ut convallis ac, tincidunt id nibh. Aliquam eu sollicitudin velit. Nulla nec sapien leo. Nullam venenatis vel justo vestibulum accumsan. Pellentesque sapien magna, dignissim eget lorem in, condimentum efficitur nisi. Sed quis turpis pellentesque metus aliquam sollicitudin eget vel orci. Sed ac orci nec libero posuere aliquam at quis velit. Quisque at pellentesque quam. Quisque venenatis felis est, eu scelerisque dui elementum non.
+
+Duis venenatis eleifend commodo. In hac habitasse platea dictumst. Proin elementum, mi sed suscipit blandit, purus quam lacinia lectus, ut venenatis felis elit at nulla. Aenean dignissim lacus ac lectus lacinia convallis. Donec fringilla leo purus. Suspendisse potenti. Curabitur aliquam sodales dui ut imperdiet.
+
+Nam in ex id augue facilisis ornare non nec lorem. Nam dolor ex, facilisis nec dignissim vel, mollis eget ex. Aliquam consectetur turpis eget quam pellentesque, at pretium dolor volutpat. Cras sed velit quis dolor scelerisque rhoncus sit amet vel lectus. Sed lacinia arcu convallis mattis aliquet. Proin faucibus vulputate varius. Nullam vel dictum libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla facilisi. Aliquam mauris ex, faucibus nec tempor quis, placerat maximus augue. Suspendisse commodo pretium sem quis laoreet. Vivamus porta, urna eu tincidunt semper, purus sem tempor sem, ut condimentum diam nibh vel mi. Donec sit amet tellus sit amet mauris vestibulum feugiat. Aliquam in orci quis est feugiat porttitor. Aliquam nec metus ac urna viverra tincidunt.
+
+Nunc ac orci cursus, faucibus justo nec, lobortis tortor. Nulla tincidunt scelerisque risus, at blandit arcu elementum sed. Maecenas non justo dapibus, tincidunt nibh in, porta neque. Sed non mi id leo vestibulum iaculis. Nam ultricies odio eget arcu vehicula tempus. Suspendisse maximus consectetur arcu, id dapibus lacus mollis et. Fusce nec vulputate nulla. Nam dictum eget sapien id interdum. Duis mi sem, gravida nec dolor vel, elementum facilisis tellus. Integer vel accumsan diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in commodo ex. Praesent commodo porttitor ipsum. Vestibulum volutpat diam at tellus feugiat, id sodales magna bibendum. Mauris odio eros, rutrum at scelerisque eget, porta sed turpis. Suspendisse porta dictum cursus.
+
+Mauris accumsan finibus mi sit amet auctor. Aliquam erat volutpat. Vestibulum at euismod sapien, euismod tincidunt lectus. Mauris aliquet sapien at erat vestibulum, a vestibulum dui bibendum. Etiam vel vulputate justo. Nam vitae ultrices nisl, eu dapibus ex. Quisque volutpat nibh vitae semper tristique. Mauris in nibh lectus. Maecenas elit leo, ultricies quis bibendum sed, rhoncus et neque. Sed elementum nec dui id lobortis. Vestibulum sollicitudin arcu nulla, sit amet lobortis urna ultrices a. Cras fermentum dolor id faucibus pretium. Pellentesque congue quam metus, quis consequat leo sollicitudin vitae.
+
+Integer congue, neque a scelerisque varius, purus nibh fringilla nunc, sit amet pretium felis sapien vel orci. Donec mattis ac orci in viverra. Suspendisse a justo sollicitudin lacus efficitur ullamcorper. Mauris faucibus nisl quis dolor volutpat aliquam. Aenean venenatis, odio et rhoncus lobortis, risus ligula finibus massa, non dignissim augue nisl vel arcu. Nullam fringilla odio at libero scelerisque, vitae placerat nisi fringilla. Etiam quis urna turpis. Quisque quis leo ante. Duis nec elit massa. Sed porttitor, nulla id efficitur blandit, purus ligula vulputate lectus, quis molestie metus orci ac tellus. Donec sapien massa, suscipit eu tristique ac, posuere sed lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam erat volutpat. Duis bibendum erat eget felis tempor, eget imperdiet nibh vestibulum. In hac habitasse platea dictumst. Quisque vehicula pulvinar turpis, ac dictum risus auctor varius.
+
+Praesent ac ex vestibulum, dapibus lacus in, malesuada diam. Sed in turpis in justo venenatis pharetra. Fusce sed lobortis nisl. Phasellus faucibus magna ante, malesuada placerat justo faucibus tempus. Phasellus hendrerit fermentum felis. Proin malesuada, urna vel tincidunt pharetra, eros ante bibendum sem, nec viverra nunc arcu at mauris. Sed et lorem pharetra, feugiat tortor vitae, rutrum lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mauris leo, condimentum at risus eget, aliquam consequat mauris. Mauris id auctor purus.
+
+Aenean augue mauris, cursus quis elit eget, molestie pharetra sem. Mauris congue felis ut nibh facilisis, ut pharetra arcu pharetra. Curabitur semper mattis orci eu dictum. Phasellus hendrerit scelerisque dignissim. Sed aliquet nunc scelerisque, facilisis nulla at, posuere lorem. Maecenas blandit, lectus nec varius bibendum, nibh risus posuere turpis, id pretium justo elit vitae ligula. Sed risus ante, congue quis libero consequat, laoreet convallis diam.
+
+Aenean sagittis ex vel semper ullamcorper. Donec mattis, ipsum tincidunt aliquet vehicula, elit tellus porta mi, a convallis quam orci ac lectus. Proin aliquam nulla in erat mattis placerat. Aliquam ligula sem, egestas ac turpis vitae, facilisis iaculis mauris. Donec ac egestas urna, ac iaculis orci. Integer urna magna, eleifend sed nunc vitae, commodo lobortis massa. Aenean ultrices pulvinar dui, non blandit lorem pretium quis. Praesent in molestie purus, vestibulum interdum quam. Pellentesque auctor erat non mauris fringilla eleifend.
+
+Etiam blandit vel leo nec pulvinar. Phasellus elementum facilisis mi et egestas. Praesent finibus, elit vel venenatis sodales, turpis nibh tincidunt turpis, eu venenatis urna tortor at massa. Proin iaculis ipsum ut elit maximus tincidunt. Suspendisse justo turpis, sollicitudin ut eros quis, dictum placerat nibh. Sed mattis ornare pulvinar. Cras lacus purus, interdum vitae commodo sollicitudin, suscipit eu quam. Mauris luctus laoreet metus at posuere. Etiam faucibus diam quis purus vulputate, nec blandit lorem bibendum.
+
+Aliquam nisl neque, vulputate eu arcu id, elementum dictum sapien. Aliquam aliquam, mauris eget vestibulum accumsan, metus tellus vulputate urna, nec volutpat felis turpis ac nulla. Morbi pretium magna bibendum eros ultricies lobortis. Vestibulum euismod vitae nibh in posuere. Vivamus in iaculis mi. Pellentesque iaculis ex nec tellus pulvinar interdum. Integer a tincidunt risus, eu faucibus mi. Vivamus posuere sapien eu orci scelerisque rutrum at eu leo. Nullam consectetur est eu justo congue commodo. Vestibulum ac finibus velit. Donec faucibus nulla at risus rhoncus, a vulputate magna pulvinar. Aliquam condimentum rhoncus lacus sed hendrerit.
+
+Morbi non hendrerit nisl, eu fringilla erat. Praesent ac dolor sit amet libero tempus porttitor. Cras vel sem elementum, venenatis ipsum vel, molestie tellus. Aliquam erat volutpat. Maecenas malesuada urna nec diam sodales pharetra. Aliquam non lobortis metus. Donec eleifend mollis eros in condimentum. Suspendisse sagittis consequat justo, vitae tincidunt orci luctus vel. Ut lobortis tincidunt libero. Sed dignissim lorem sit amet nibh aliquam, pharetra pulvinar justo consequat. Suspendisse sed dictum massa. Ut fermentum, dolor a fringilla bibendum, lorem ligula scelerisque turpis, in porta justo neque non lectus. Suspendisse pellentesque risus sit amet ligula pretium condimentum. Fusce odio tortor, pulvinar in dapibus nec, pharetra eget nisi. Suspendisse luctus eros eget mauris pretium blandit.
+
+Nam vel fermentum nulla. Sed tincidunt tellus id mattis dapibus. Quisque ac congue libero, nec elementum nulla. Phasellus quam eros, congue eu lacinia a, interdum et eros. Aenean suscipit risus interdum mauris porttitor, vehicula auctor tellus molestie. Donec efficitur nisi eget ex interdum sollicitudin. Nunc ultricies maximus quam, at pulvinar eros volutpat quis. Nam venenatis mauris enim, sed malesuada tortor eleifend sit amet. Cras imperdiet convallis viverra. Proin purus nulla, bibendum in aliquam quis, sollicitudin a risus. Proin vehicula tincidunt tortor quis lacinia. Praesent tristique odio sed orci consequat, ut pulvinar mauris semper. Mauris felis mi, ultricies a dolor id, viverra laoreet orci. Nam ex mi, semper nec imperdiet sed, posuere et eros.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec scelerisque ipsum sed libero tempor, in vulputate ante sodales. Sed vehicula nulla non ante blandit, quis porttitor diam auctor. Nulla sodales risus ut dui vulputate, nec elementum sem volutpat. Quisque id blandit quam. Proin interdum quis lacus ac suscipit. Etiam a scelerisque sapien. Praesent cursus, mi eget dapibus hendrerit, nibh eros elementum lacus, sit amet congue dui nunc at dui. Phasellus tristique nulla ut tincidunt faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse efficitur congue purus, a viverra sapien tristique vel.
+
+Vestibulum elementum pellentesque turpis. Phasellus id quam sit amet ex sodales malesuada. Morbi iaculis quis nibh vitae finibus. Nullam vitae luctus nisl, ac varius leo. Fusce sed quam eu enim volutpat blandit. Etiam ornare aliquam mi, eget porttitor magna euismod non. Curabitur porta vel metus ut mollis.
+
+Aenean sit amet sagittis lacus. Quisque in dui commodo, rutrum massa tincidunt, hendrerit mauris. Maecenas sit amet nisl facilisis, interdum eros rhoncus, malesuada nisl. Aliquam condimentum erat dui, eget dignissim magna volutpat vitae. Mauris porttitor, risus ut auctor porttitor, sem nisl interdum nisi, ac tempus est enim in tortor. Sed rhoncus magna ac feugiat pharetra. Nulla scelerisque quis neque ut porttitor. Ut lacinia in ipsum sit amet lobortis. Aliquam eu justo vel leo facilisis tristique. Pellentesque cursus, lacus a rhoncus auctor, erat velit vehicula diam, et fermentum erat mauris fermentum turpis. Donec quam sapien, laoreet sodales sagittis ac, sodales vitae lectus. Donec vitae lorem rutrum, lobortis libero maximus, condimentum sapien. Pellentesque mi lorem, rhoncus vel lacinia a, venenatis et velit.
+
+Curabitur malesuada ante vel maximus luctus. Etiam dui lectus, condimentum eget lobortis eget, eleifend pellentesque ligula. Nam eu pharetra urna, sit amet facilisis turpis. Mauris tincidunt vestibulum turpis nec suscipit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque egestas commodo finibus. Donec pellentesque nec libero et imperdiet. Cras cursus purus ut libero pretium vulputate. Mauris non arcu purus. Donec sollicitudin dignissim massa ac tincidunt. Donec non consectetur turpis, et venenatis dui.
+
+Nam mattis urna dolor, a varius sem tempor a. Vivamus porttitor dignissim metus vel ultrices. Integer ac justo vel nisl consequat efficitur. Maecenas sit amet hendrerit elit. Suspendisse lobortis semper mauris id convallis. Duis nibh dui, lacinia a turpis sed, interdum aliquam ex. Praesent tempor rhoncus nibh vel dictum. Quisque feugiat mi sit amet nunc fermentum pellentesque. Ut porta lacinia erat eu pulvinar. Nulla vestibulum fermentum felis, eu ultricies lectus. Ut eget lobortis sapien. Aenean consectetur in nisl interdum mattis. Sed a ipsum pharetra, congue augue a, accumsan ex. Quisque luctus sapien non tincidunt vulputate.
+
+Aenean auctor consectetur urna et rhoncus. Vivamus mattis tortor at massa porta, in auctor quam porttitor. Nulla facilisi. Sed auctor ipsum tortor, quis hendrerit risus convallis eget. Vivamus a mollis nulla, at fringilla risus. In a cursus dui, nec vehicula elit. Donec in sodales ante, quis gravida est. Sed interdum mi non ornare lacinia. Cras placerat cursus dolor nec euismod. Nulla vel velit quis nibh aliquam eleifend. Cras mattis vitae erat nec gravida. Vestibulum luctus sagittis nibh, a pretium neque dictum eget. Quisque vitae consequat dui. Donec libero eros, pharetra sit amet sapien id, euismod gravida mi.
+
+Duis tristique nisi id urna feugiat, sed aliquet nulla imperdiet. Ut quis felis finibus, lobortis nunc eu, sodales risus. Fusce at euismod risus. Nunc pulvinar libero volutpat, mattis eros facilisis, mollis nibh. Maecenas augue nunc, mollis sit amet volutpat et, interdum eu augue. Etiam porttitor tortor sem, vitae hendrerit nulla lobortis ut. In non sollicitudin eros. Cras bibendum lorem id odio sollicitudin euismod. Aliquam ullamcorper purus at turpis accumsan blandit. Donec at interdum arcu. Nam fermentum est lectus, vel tincidunt purus sollicitudin a. Aliquam vel orci massa.
+
+Fusce fringilla et justo et interdum. Fusce molestie, tellus vitae elementum lobortis, enim augue condimentum nulla, a semper enim quam in dui. Vestibulum a pharetra felis. Proin eu sollicitudin leo. In vestibulum rhoncus augue, non ultrices turpis. Donec maximus neque semper tellus condimentum, in aliquam dui posuere. Sed ultrices nisl purus, quis sollicitudin eros laoreet quis. Praesent nunc nisl, varius at suscipit sed, tristique at neque.
+
+Quisque aliquam tincidunt augue vitae rhoncus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin eu luctus erat. Nullam auctor, purus a eleifend efficitur, metus ligula accumsan quam, quis bibendum enim lacus quis neque. Maecenas lacinia ipsum molestie felis accumsan, in dignissim purus aliquet. Nunc turpis massa, ultricies in lacinia ut, luctus ut felis. Morbi magna nisi, sodales in arcu sit amet, efficitur mattis velit. Ut scelerisque enim nibh, vel pretium urna varius vel. Cras vitae accumsan nunc, ut iaculis tortor. Nam vitae laoreet orci, sit amet rutrum mi. Nunc blandit purus eu hendrerit tempor. Vestibulum tincidunt pharetra purus ut sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sed laoreet urna, sit amet commodo erat. Fusce euismod justo erat, et placerat odio accumsan finibus. Proin pellentesque ligula ut nibh condimentum, sed ornare justo faucibus. Fusce consectetur sapien nec dui varius, vel pharetra felis molestie. Duis accumsan odio metus, ut varius orci finibus nec. Sed non ipsum vitae est aliquet mollis. Pellentesque facilisis feugiat suscipit.
+
+Mauris ut enim sit amet metus bibendum finibus. Suspendisse iaculis, tellus maximus placerat elementum, libero turpis fermentum dolor, ut lacinia sapien ipsum a nulla. Etiam sollicitudin dictum dolor, ac congue sem pulvinar nec. Ut egestas urna non neque volutpat egestas. Integer porta vel orci volutpat tincidunt. In egestas fringilla ipsum ac pharetra. Fusce justo dui, dignissim sed leo at, tincidunt finibus magna. Pellentesque vel nunc risus. Praesent lacinia blandit convallis. Cras eget magna metus. Maecenas fringilla dolor eu quam dictum consequat. Donec pellentesque eleifend velit, a commodo dui faucibus eu. Phasellus pretium nulla ipsum, et interdum magna interdum et. Mauris a sem ullamcorper, consectetur quam accumsan, porttitor eros.
+
+Praesent facilisis, ipsum ac tincidunt auctor, tellus ipsum convallis magna, vel maximus sem lorem et tortor. Sed elit diam, faucibus sed turpis eget, commodo facilisis nunc. Vestibulum vitae arcu tristique, varius libero molestie, sollicitudin mi. In tincidunt nisl in eros imperdiet faucibus. Cras ex ipsum, vehicula eget neque eget, viverra pellentesque erat. Suspendisse vitae tristique dolor. Nulla ornare imperdiet metus id mollis. Fusce ligula ex, aliquam sed purus quis, venenatis volutpat lectus. Sed iaculis ante sit amet massa consequat interdum. Ut feugiat risus sit amet commodo euismod. Sed tristique quam sit amet lacinia cursus. Donec faucibus, erat a dapibus rhoncus, orci est interdum ex, sit amet semper massa quam et lectus.
+
+Suspendisse mollis turpis aliquam felis efficitur, eu ultrices tellus suscipit. Aenean at congue erat, vel ultricies eros. Quisque hendrerit arcu ut est aliquet, et vehicula lectus ullamcorper. Pellentesque posuere neque nec auctor scelerisque. Phasellus rhoncus odio ac nisl ornare condimentum. Nam nec arcu porttitor tellus faucibus malesuada id a est. Vivamus id facilisis ante. Proin quis risus ipsum. In sed nibh at nisl tempus interdum. Ut sit amet malesuada nisl, id pharetra metus. Nulla lorem velit, euismod nec dictum at, porttitor ac erat. Aliquam est leo, elementum nec ultricies nec, interdum sed libero. Quisque mattis placerat scelerisque. Praesent vulputate sit amet felis non tristique.
+
+Phasellus odio ex, ultricies et tincidunt sit amet, auctor id felis. Fusce facilisis nibh risus, eget placerat nunc pellentesque vel. Morbi cursus metus eu arcu viverra rutrum. Nulla eget dolor blandit, pulvinar sem aliquet, hendrerit purus. Fusce sodales venenatis posuere. Cras egestas placerat odio non scelerisque. Praesent tincidunt maximus semper. Vivamus eget libero massa. Cras auctor orci sed nibh sagittis ultrices. Curabitur leo lacus, suscipit ac pharetra vel, euismod eu turpis. Aenean quis justo efficitur, mattis nisl sed, mollis lacus. Integer feugiat non metus vitae faucibus. Morbi sem massa, pretium id risus a, congue volutpat mi. Vivamus lacinia enim lorem, id malesuada ante vehicula non. Praesent ac urna quis justo malesuada euismod.
+
+Integer sed ligula id purus dictum tempus eu non ex. Phasellus tincidunt lectus in imperdiet porttitor. Integer ligula dolor, porttitor et congue vitae, elementum eget sem. Proin a libero in enim efficitur mollis. Proin molestie metus dolor, in fermentum massa condimentum at. Cras eget auctor odio, a luctus sapien. Nulla in hendrerit leo, sed venenatis augue. Proin mollis vestibulum magna. Nulla dapibus lacus nec condimentum maximus. Phasellus id efficitur enim. Vivamus molestie mauris at condimentum elementum. Maecenas ultrices mauris quis tincidunt viverra. Ut eget ultricies ligula. Nulla id fermentum nisl, in ultrices velit.
+
+Nunc blandit tellus sed est auctor condimentum. Integer fringilla aliquam libero, id sagittis ipsum lacinia sit amet. Donec sit amet nunc felis. Vestibulum at commodo arcu, a malesuada est. Aenean ultrices, mauris in pellentesque posuere, mi orci fermentum justo, vitae rutrum neque erat a nisi. In sed urna quis sem egestas faucibus ut quis ipsum. Quisque porta lectus sit amet urna ultricies iaculis.
+
+Praesent ultrices odio nisl, eu consequat dolor sollicitudin nec. Suspendisse dignissim lobortis nulla nec molestie. Duis in diam sed est dignissim faucibus vitae in metus. Phasellus lacinia urna eros, vitae vulputate sem fermentum eget. Suspendisse et efficitur dolor. Mauris faucibus sodales felis eu luctus. Cras non mattis lacus. Proin in lobortis sapien. Nulla at augue sed est congue sollicitudin.
+
+Nunc nisi lorem, dapibus id tincidunt quis, sollicitudin sit amet justo. In mollis orci pretium aliquam fermentum. Fusce sodales mi eget tellus posuere ullamcorper. Sed varius sagittis elit, in feugiat odio maximus sed. Cras eleifend massa sit amet mi suscipit, vel laoreet leo pretium. Quisque neque erat, mollis eget elementum non, blandit in lectus. Sed dignissim felis ac felis convallis elementum molestie id lectus. Nullam fermentum lorem mi, in placerat quam mollis vitae. Pellentesque ultrices, nibh at sagittis molestie, augue mauris bibendum dui, ut ultricies lorem magna eu massa. Quisque quis purus eu nisi rhoncus tempor. Donec eget fringilla massa. Vivamus sed varius elit. Aenean egestas tellus eget magna dapibus hendrerit. Nunc vel leo eu purus tempus mollis.
+
+Praesent sagittis eget lectus non vestibulum. Fusce id elit nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec id malesuada justo, non ornare felis. Nulla ultricies lorem ex, et accumsan ex volutpat sodales. Pellentesque venenatis neque in hendrerit blandit. Donec dapibus est fermentum lacus fringilla, ut volutpat tellus consectetur. Maecenas id semper tortor. In pellentesque aliquet elit, non vulputate augue mollis fermentum. Nullam posuere eget elit a placerat. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+Phasellus vestibulum tristique quam a faucibus. Proin sit amet sem et leo posuere efficitur vitae et ante. Nullam congue nisl augue, in ultricies orci tempor quis. Aliquam erat volutpat. In luctus, sapien at venenatis fermentum, lorem urna ultrices elit, ac volutpat metus purus eu turpis. Phasellus semper cursus mi, vitae tempor est accumsan at. Integer accumsan nec augue vitae viverra. Sed tempus cursus enim non dapibus. In commodo neque in ultricies semper. Proin auctor lacinia eros, ut tempor lectus pulvinar quis. Ut fermentum vulputate pellentesque. Duis tempor ante quis metus consectetur maximus. Curabitur a tincidunt enim.
+
+Vestibulum dictum, urna a fringilla imperdiet, tortor arcu mattis odio, et efficitur dui neque ac mauris. Vestibulum auctor risus lacus. Integer elementum erat nisl, id vehicula enim mattis in. Vestibulum consequat neque ante, in sodales magna pulvinar in. Vivamus interdum eros non magna aliquam tristique. Ut aliquam congue ante in gravida. Sed eu turpis sollicitudin, suscipit ligula id, commodo tellus. Aliquam eu sapien vitae augue gravida egestas nec sit amet turpis. Curabitur vulputate vulputate dui, et facilisis lectus tincidunt nec. Integer tristique vitae quam condimentum maximus. Ut ultricies convallis nisl eu elementum.
+
+Curabitur non nisi lectus. Aliquam finibus lorem id dui molestie, sed ullamcorper quam lobortis. Maecenas in gravida urna. Pellentesque consequat risus vel nibh tempus facilisis. Etiam auctor lacinia lacus vitae vulputate. Etiam bibendum arcu at ipsum elementum, id sodales nunc convallis. Phasellus elementum mi non sapien blandit suscipit. Integer accumsan et justo nec mattis. Vestibulum quis erat viverra, condimentum enim eget, auctor tortor. Nunc ac mauris sit amet urna pellentesque malesuada. Fusce urna justo, finibus eget blandit eget, volutpat eu nisi. In nisi nunc, sodales sit amet tempor eu, feugiat feugiat tellus. Nulla felis purus, gravida eu iaculis in, interdum id purus. In hac habitasse platea dictumst. Aenean consequat, quam tincidunt sodales lacinia, ex dui faucibus massa, ut porta dolor justo et mi.
+
+Donec a massa porta, vehicula diam et, pulvinar tortor. Duis tincidunt, nibh ut pharetra hendrerit, est orci egestas urna, et sollicitudin massa lacus aliquam ex. Curabitur in quam sed elit scelerisque pretium nec rhoncus nulla. In a ligula.
+ """
+
+ run () -> stringify.attEscape(text)
diff --git a/node_modules/xmlbuilder/perf/basic/object.coffee b/node_modules/xmlbuilder/perf/basic/object.coffee
new file mode 100644
index 0000000..ac7df51
--- /dev/null
+++ b/node_modules/xmlbuilder/perf/basic/object.coffee
@@ -0,0 +1,21 @@
+perf 'Create simple object', 100000, (run) ->
+ obj =
+ ele: "simple element"
+ person:
+ name: "John"
+ '@age': 35
+ '?pi': 'mypi'
+ '#comment': 'Good guy'
+ '#cdata': 'well formed!'
+ unescaped:
+ '#raw': '&<>&'
+ address:
+ city: "Istanbul"
+ street: "End of long and winding road"
+ contact:
+ phone: [ "555-1234", "555-1235" ]
+ id: () -> return 42
+ details:
+ '#text': 'classified'
+
+ run () -> xml(obj)
diff --git a/node_modules/xmlbuilder/perf/index.coffee b/node_modules/xmlbuilder/perf/index.coffee
new file mode 100644
index 0000000..3bd0f93
--- /dev/null
+++ b/node_modules/xmlbuilder/perf/index.coffee
@@ -0,0 +1,161 @@
+builder = require('../src/index')
+git = require('git-state')
+fs = require('fs')
+path = require('path')
+{ performance, PerformanceObserver } = require('perf_hooks')
+
+global.xml = builder.create
+global.doc = builder.begin
+
+global.perf = (description, count, func) ->
+
+ totalTime = 0
+
+ callback = (userFunction) ->
+ startTime = performance.now()
+ for i in [1..count]
+ userFunction()
+ endTime = performance.now()
+ totalTime += endTime - startTime
+ func(callback)
+
+ averageTime = totalTime / count
+
+ version = require('../package.json').version
+ working = gitWorking(gitDir)
+ if working then version = version + "*"
+ if not perfObj[version] then perfObj[version] = { }
+
+ perfObj[version][description] = averageTime.toFixed(4)
+
+readPerf = (filename) ->
+ if not fs.existsSync(filename) then fs.closeSync(fs.openSync(filename, 'w'))
+ str = fs.readFileSync(filename, 'utf8')
+ if str then JSON.parse(str) else { }
+
+runPerf = (dirPath) ->
+ for file from walkDir(dirPath)
+ filename = path.basename(file)
+ if filename is "index.coffee" or filename is "perf.list" then continue
+ require(file)
+
+walkDir = (dirPath) ->
+ for file in fs.readdirSync(dirPath)
+ filePath = path.join(dirPath, file)
+ stat = fs.statSync(filePath)
+ if stat.isFile() then yield filePath else if stat.isDirectory() then yield from walkDir(filePath)
+ return undefined
+
+gitWorking = (dirPath) ->
+ return git.isGitSync(dirPath) and git.dirtySync(dirPath)
+
+printPerf = (perfObj) ->
+ sorted = sortByVersion(perfObj)
+
+ for sortedItems in sorted
+ version = sortedItems.version
+ items = sortedItems.item
+ sortedItem = sortByDesc(items)
+
+ if parseVersion(version)[3]
+ console.log "\x1b[4mv%s (Working Tree):\x1b[0m", version
+ else
+ console.log "\x1b[4mv%s:\x1b[0m", version
+
+ longestDescription = 0
+ for item in sortedItem
+ descriptionLength = item.description.length
+ if descriptionLength > longestDescription
+ longestDescription = descriptionLength
+
+ for item in sortedItem
+ description = item.description
+ averageTime = item.averageTime
+ prevItem = findPrevPerf(sorted, version, description)
+ if prevItem
+ if averageTime < prevItem.item[description]
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m\x1b[32m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, -\x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (-100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0)
+ else if averageTime > prevItem.item[description]
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m\x1b[31m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, +\x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0)
+ else
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m%s\x1b[0m ms (v%s was \x1b[1m%s\x1b[0m ms, \x1b[1m%s\x1b[0m%)", padRight(description, longestDescription), averageTime, prevItem.version, prevItem.item[description], (100*(averageTime - prevItem.item[description]) / prevItem.item[description]).toFixed(0)
+ else
+ console.log " - \x1b[36m%s\x1b[0m \x1b[1m%s\x1b[0m ms (no previous result)", padRight(description, longestDescription), averageTime
+
+padRight = (str, len) ->
+ str + " ".repeat(len - str.length)
+
+writePerf = (filename, perfObj) ->
+ writePerfObj = { }
+ for version, items of perfObj
+ if not parseVersion(version)[3]
+ writePerfObj[version] = items
+ fs.writeFileSync(filename, JSON.stringify(writePerfObj, null, 2) , 'utf-8')
+
+findPrevPerf = (sorted, version, description) ->
+ prev = undefined
+ for item in sorted
+ if compareVersion(item.version, version) is -1
+ if item.item[description]
+ prev = item
+ return prev
+
+sortByVersion = (perfObj) ->
+ sorted = []
+ for version, items of perfObj
+ sorted.push
+ version: version
+ item: items
+ sorted.sort (item1, item2) ->
+ compareVersion(item1.version, item2.version)
+
+sortByDesc = (item) ->
+ sorted = []
+ for description, averageTime of item
+ sorted.push
+ description: description
+ averageTime: averageTime
+ sorted.sort (item1, item2) ->
+ if item1.description < item2.description then -1 else 1
+
+parseVersion = (version) ->
+ isDirty = version[version.length - 1] is "*"
+ if isDirty then version = version.substr(0, version.length - 1)
+ v = version.split('.')
+ v.push(isDirty)
+ return v
+
+compareVersion = (v1, v2) ->
+ v1 = parseVersion(v1)
+ v2 = parseVersion(v2)
+
+ if v1[0] < v2[0]
+ -1
+ else if v1[0] > v2[0]
+ 1
+ else # v1[0] = v2[0]
+ if v1[1] < v2[1]
+ -1
+ else if v1[1] > v2[1]
+ 1
+ else # v1[1] = v2[1]
+ if v1[2] < v2[2]
+ -1
+ else if v1[2] > v2[2]
+ 1
+ else # v1[2] = v2[2]
+ if v1[3] and not v2[3]
+ 1
+ else if v2[3] and not v1[3]
+ -1
+ else
+ 0
+
+
+perfDir = __dirname
+gitDir = path.resolve(__dirname, '..')
+perfFile = path.join(perfDir, './perf.list')
+perfObj = readPerf(perfFile)
+runPerf(perfDir)
+printPerf(perfObj)
+writePerf(perfFile, perfObj)
diff --git a/node_modules/xmlbuilder/perf/perf.list b/node_modules/xmlbuilder/perf/perf.list
new file mode 100644
index 0000000..711b077
--- /dev/null
+++ b/node_modules/xmlbuilder/perf/perf.list
@@ -0,0 +1,11 @@
+{
+ "13.0.2": {
+ "Attribute value escaping": "0.0058",
+ "Attribute value escaping (long value)": "0.0159",
+ "Attribute value escaping (no replacement)": "0.0002",
+ "Create simple object": "0.0218",
+ "Text escaping": "0.0061",
+ "Text escaping (long text)": "0.0046",
+ "Text escaping (no replacement)": "0.0002"
+ }
+} \ No newline at end of file
diff --git a/node_modules/xmlbuilder/typings/index.d.ts b/node_modules/xmlbuilder/typings/index.d.ts
new file mode 100644
index 0000000..27bf269
--- /dev/null
+++ b/node_modules/xmlbuilder/typings/index.d.ts
@@ -0,0 +1,1771 @@
+
+import { Writable } from 'stream';
+
+export = xmlbuilder;
+
+/**
+ * Type definitions for [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js)
+ *
+ * Original definitions on [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) by:
+ * - Wallymathieu <https://github.com/wallymathieu>
+ * - GaikwadPratik <https://github.com/GaikwadPratik>
+ */
+declare namespace xmlbuilder {
+ /**
+ * Creates a new XML document and returns the root element node.
+ *
+ * @param nameOrObject - name of the root element or a JS object to be
+ * converted to an XML tree
+ * @param xmldecOrOptions - XML declaration or create options
+ * @param doctypeOrOptions - Doctype declaration or create options
+ * @param options - create options
+ */
+ function create(nameOrObject: string | { [name: string]: Object },
+ xmldecOrOptions?: CreateOptions, doctypeOrOptions?: CreateOptions,
+ options?: CreateOptions): XMLElement;
+
+ /**
+ * Defines the options used while creating an XML document with the `create`
+ * function.
+ */
+ interface CreateOptions {
+ /**
+ * A version number string, e.g. `1.0`
+ */
+ version?: string;
+ /**
+ * Encoding declaration, e.g. `UTF-8`
+ */
+ encoding?: string;
+ /**
+ * Standalone document declaration: `true` or `false`
+ */
+ standalone?: boolean;
+
+ /**
+ * Public identifier of the DTD
+ */
+ pubID?: string;
+ /**
+ * System identifier of the DTD
+ */
+ sysID?: string;
+
+ /**
+ * Whether XML declaration and doctype will be included
+ */
+ headless?: boolean;
+ /**
+ * Whether nodes with `null` values will be kept or ignored
+ */
+ keepNullNodes?: boolean;
+ /**
+ * Whether attributes with `null` values will be kept or ignored
+ */
+ keepNullAttributes?: boolean;
+ /**
+ * Whether decorator strings will be ignored when converting JS
+ * objects
+ */
+ ignoreDecorators?: boolean;
+ /**
+ * Whether array items are created as separate nodes when passed
+ * as an object value
+ */
+ separateArrayItems?: boolean;
+ /**
+ * Whether existing html entities are encoded
+ */
+ noDoubleEncoding?: boolean;
+ /**
+ * Whether values will be validated and escaped or returned as is
+ */
+ noValidation?: boolean;
+ /**
+ * A character to replace invalid characters in all values. This also
+ * disables character validation.
+ */
+ invalidCharReplacement?: string;
+ /**
+ * A set of functions to use for converting values to strings
+ */
+ stringify?: XMLStringifier;
+ /**
+ * The default XML writer to use for converting nodes to string.
+ * If the default writer is not set, the built-in `XMLStringWriter`
+ * will be used instead.
+ */
+ writer?: XMLWriter;
+ }
+
+ /**
+ * Defines the functions used for converting values to strings.
+ */
+ interface XMLStringifier {
+ /**
+ * Converts an element or attribute name to string
+ */
+ name?: (v: any) => string;
+ /**
+ * Converts the contents of a text node to string
+ */
+ text?: (v: any) => string;
+ /**
+ * Converts the contents of a CDATA node to string
+ */
+ cdata?: (v: any) => string;
+ /**
+ * Converts the contents of a comment node to string
+ */
+ comment?: (v: any) => string;
+ /**
+ * Converts the contents of a raw text node to string
+ */
+ raw?: (v: any) => string;
+ /**
+ * Converts attribute value to string
+ */
+ attValue?: (v: any) => string;
+ /**
+ * Converts processing instruction target to string
+ */
+ insTarget?: (v: any) => string;
+ /**
+ * Converts processing instruction value to string
+ */
+ insValue?: (v: any) => string;
+ /**
+ * Converts XML version to string
+ */
+ xmlVersion?: (v: any) => string;
+ /**
+ * Converts XML encoding to string
+ */
+ xmlEncoding?: (v: any) => string;
+ /**
+ * Converts standalone document declaration to string
+ */
+ xmlStandalone?: (v: any) => string;
+ /**
+ * Converts DocType public identifier to string
+ */
+ dtdPubID?: (v: any) => string;
+ /**
+ * Converts DocType system identifier to string
+ */
+ dtdSysID?: (v: any) => string;
+ /**
+ * Converts `!ELEMENT` node content inside Doctype to string
+ */
+ dtdElementValue?: (v: any) => string;
+ /**
+ * Converts `!ATTLIST` node type inside DocType to string
+ */
+ dtdAttType?: (v: any) => string;
+ /**
+ * Converts `!ATTLIST` node default value inside DocType to string
+ */
+ dtdAttDefault?: (v: any) => string;
+ /**
+ * Converts `!ENTITY` node content inside Doctype to string
+ */
+ dtdEntityValue?: (v: any) => string;
+ /**
+ * Converts `!NOTATION` node content inside Doctype to string
+ */
+ dtdNData?: (v: any) => string;
+
+ /**
+ * When prepended to a JS object key, converts the key-value pair
+ * to an attribute.
+ */
+ convertAttKey?: string;
+ /**
+ * When prepended to a JS object key, converts the key-value pair
+ * to a processing instruction node.
+ */
+ convertPIKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a text node.
+ *
+ * _Note:_ Since JS objects cannot contain duplicate keys, multiple text
+ * nodes can be created by adding some unique text after each object
+ * key. For example: `{ '#text1': 'some text', '#text2': 'more text' };`
+ */
+ convertTextKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a CDATA
+ * node.
+ */
+ convertCDataKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a
+ * comment node.
+ */
+ convertCommentKey?: string;
+ /**
+ * When prepended to a JS object key, converts its value to a raw
+ * text node.
+ */
+ convertRawKey?: string;
+
+ /**
+ * Escapes special characters in text.
+ */
+ textEscape?: (v: string) => string;
+
+ /**
+ * Escapes special characters in attribute values.
+ */
+ attEscape?: (v: string) => string;
+ }
+
+ /**
+ * Represents a writer which outputs an XML document.
+ */
+ interface XMLWriter {
+ /**
+ * Writes the indentation string for the given level.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ indent?: (node: XMLNode, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes the newline string.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ endline?: (node: XMLNode, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes an attribute.
+ *
+ * @param att - current attribute
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ attribute?: (att: XMLAttribute, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes a CDATA node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ cdata?: (node: XMLCData, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes a comment node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ comment?: (node: XMLComment, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes the XML declaration (e.g. `<?xml version="1.0"?>`).
+ *
+ * @param node - XML declaration node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ declaration?: (node: XMLDeclaration, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes the DocType node and its children.
+ *
+ * _Note:_ Be careful when overriding this function as this function
+ * is also responsible for writing the internal subset of the DTD.
+ *
+ * @param node - DOCTYPE node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ docType?: (node: XMLDocType, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes an element node.
+ *
+ * _Note:_ Be careful when overriding this function as this function
+ * is also responsible for writing the element attributes and child
+ * nodes.
+ *
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ element?: (node: XMLElement, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes a processing instruction node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ processingInstruction?: (node: XMLProcessingInstruction,
+ options: WriterOptions, level: number) => any
+
+ /**
+ * Writes a raw text node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ raw?: (node: XMLRaw, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes a text node.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ text?: (node: XMLText, options: WriterOptions, level: number) => any
+
+ /**
+ * Writes an attribute node (`!ATTLIST`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdAttList?: (node: XMLDTDAttList, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes an element node (`!ELEMENT`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdElement?: (node: XMLDTDElement, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes an entity node (`!ENTITY`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdEntity?: (node: XMLDTDEntity, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Writes a notation node (`!NOTATION`) inside the DTD.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ dtdNotation?: (node: XMLDTDNotation, options: WriterOptions,
+ level: number) => any
+
+ /**
+ * Called right after starting writing a node. This function does not
+ * produce any output, but can be used to alter the state of the writer.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ openNode?: (node: XMLNode, options: WriterOptions,
+ level: number) => void
+
+ /**
+ * Called right before completing writing a node. This function does not
+ * produce any output, but can be used to alter the state of the writer.
+ *
+ * @param node - current node
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ closeNode?: (node: XMLNode, options: WriterOptions,
+ level: number) => void
+
+ /**
+ * Called right after starting writing an attribute. This function does
+ * not produce any output, but can be used to alter the state of the
+ * writer.
+ *
+ * @param node - current attribute
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ openAttribute?: (att: XMLAttribute, options: WriterOptions,
+ level: number) => void
+
+ /**
+ * Called right before completing writing an attribute. This function
+ * does not produce any output, but can be used to alter the state of
+ * the writer.
+ *
+ * @param node - current attribute
+ * @param options - writer options and state information
+ * @param level - current depth of the XML tree
+ */
+ closeAttribute?: (att: XMLAttribute, options: WriterOptions,
+ level: number) => void
+ }
+
+ /**
+ * Defines the options passed to the XML writer.
+ */
+ interface WriterOptions {
+ /**
+ * Pretty print the XML tree
+ */
+ pretty?: boolean;
+ /**
+ * Indentation string for pretty printing
+ */
+ indent?: string;
+ /**
+ * Newline string for pretty printing
+ */
+ newline?: string;
+ /**
+ * A fixed number of indents to offset strings
+ */
+ offset?: number;
+ /**
+ * Maximum column width
+ */
+ width?: number;
+ /**
+ * Whether to output closing tags for empty element nodes
+ */
+ allowEmpty?: boolean;
+ /**
+ * Whether to pretty print text nodes
+ */
+ dontPrettyTextNodes?: boolean;
+ /**
+ * A string to insert before closing slash character
+ */
+ spaceBeforeSlash?: string | boolean;
+ /**
+ * User state object that is saved between writer functions
+ */
+ user?: any;
+ /**
+ * The current state of the writer
+ */
+ state?: WriterState;
+ /**
+ * Writer function overrides
+ */
+ writer?: XMLWriter;
+ }
+
+ /**
+ * Defines the state of the writer.
+ */
+ enum WriterState {
+ /**
+ * Writer state is unknown
+ */
+ None = 0,
+ /**
+ * Writer is at an opening tag, e.g. `<node>`
+ */
+ OpenTag = 1,
+ /**
+ * Writer is inside an element
+ */
+ InsideTag = 2,
+ /**
+ * Writer is at a closing tag, e.g. `</node>`
+ */
+ CloseTag = 3
+ }
+
+ /**
+ * Creates a new XML document and returns the document node.
+ * This function creates an empty document without the XML prolog or
+ * a root element.
+ *
+ * @param options - create options
+ */
+ function begin(options?: BeginOptions): XMLDocument;
+
+ /**
+ * Defines the options used while creating an XML document with the `begin`
+ * function.
+ */
+ interface BeginOptions {
+ /**
+ * Whether nodes with null values will be kept or ignored
+ */
+ keepNullNodes?: boolean;
+ /**
+ * Whether attributes with null values will be kept or ignored
+ */
+ keepNullAttributes?: boolean;
+ /**
+ * Whether decorator strings will be ignored when converting JS
+ * objects
+ */
+ ignoreDecorators?: boolean;
+ /**
+ * Whether array items are created as separate nodes when passed
+ * as an object value
+ */
+ separateArrayItems?: boolean;
+ /**
+ * Whether existing html entities are encoded
+ */
+ noDoubleEncoding?: boolean;
+ /**
+ * Whether values will be validated and escaped or returned as is
+ */
+ noValidation?: boolean;
+ /**
+ * A character to replace invalid characters in all values. This also
+ * disables character validation.
+ */
+ invalidCharReplacement?: string;
+ /**
+ * A set of functions to use for converting values to strings
+ */
+ stringify?: XMLStringifier;
+ /**
+ * The default XML writer to use for converting nodes to string.
+ * If the default writer is not set, the built-in XMLStringWriter
+ * will be used instead.
+ */
+ writer?: XMLWriter | WriterOptions;
+ }
+
+ /**
+ * A function to be called when a chunk of XML is written.
+ *
+ * @param chunk - a chunk of string that was written
+ * @param level - current depth of the XML tree
+ */
+ type OnDataCallback = (chunk: string, level: number) => void;
+
+ /**
+ * A function to be called when the XML doucment is completed.
+ */
+ type OnEndCallback = () => void;
+
+ /**
+ * Creates a new XML document in callback mode and returns the document
+ * node.
+ *
+ * @param options - create options
+ * @param onData - the function to be called when a new chunk of XML is
+ * output. The string containing the XML chunk is passed to `onData` as
+ * its first argument and the current depth of the tree is passed as its
+ * second argument.
+ * @param onEnd - the function to be called when the XML document is
+ * completed with `end`. `onEnd` does not receive any arguments.
+ */
+ function begin(options?: BeginOptions | OnDataCallback,
+ onData?: OnDataCallback | OnEndCallback,
+ onEnd?: OnEndCallback): XMLDocumentCB;
+
+ /**
+ * Creates and returns a default string writer.
+ *
+ * @param options - writer options
+ */
+ function stringWriter(options?: WriterOptions): XMLWriter
+
+ /**
+ * Creates and returns a default stream writer.
+ *
+ * @param stream - a writeable stream
+ * @param options - writer options
+ */
+ function streamWriter(stream: Writable, options?: WriterOptions): XMLWriter
+
+ /**
+ * Defines the type of a node in the XML document.
+ */
+ enum NodeType {
+ /**
+ * An element node
+ */
+ Element = 1,
+ /**
+ * An attribute node
+ */
+ Attribute = 2,
+ /**
+ * A text node
+ */
+ Text = 3,
+ /**
+ * A CDATA node
+ */
+ CData = 4,
+ /**
+ * An entity reference node inside DocType
+ */
+ EntityReference = 5,
+ /**
+ * An entity declaration node inside DocType
+ */
+ EntityDeclaration = 6,
+ /**
+ * A processing instruction node
+ */
+ ProcessingInstruction = 7,
+ /**
+ * A comment node
+ */
+ Comment = 8,
+ /**
+ * A document node
+ */
+ Document = 9,
+ /**
+ * A Doctype node
+ */
+ DocType = 10,
+ /**
+ * A document fragment node
+ */
+ DocumentFragment = 11,
+ /**
+ * A notation declaration node inside DocType
+ */
+ NotationDeclaration = 12,
+ /**
+ * An XML declaration node
+ */
+ Declaration = 201,
+ /**
+ * A raw text node
+ */
+ Raw = 202,
+ /**
+ * An attribute declaraiton node inside DocType
+ */
+ AttributeDeclaration = 203,
+ /**
+ * An element declaration node inside DocType
+ */
+ ElementDeclaration = 204
+ }
+
+ /**
+ * Defines the type of a node in the XML document.
+ */
+ export import nodeType = NodeType;
+
+ /**
+ * Defines the state of the writer.
+ */
+ export import writerState = WriterState;
+
+ /**
+ * Defines the settings used when converting the XML document to string.
+ */
+ interface XMLToStringOptions {
+ /**
+ * Pretty print the XML tree
+ */
+ pretty?: boolean;
+ /**
+ * Indentation string for pretty printing
+ */
+ indent?: string;
+ /**
+ * Newline string for pretty printing
+ */
+ newline?: string;
+ /**
+ * A fixed number of indents to offset strings
+ */
+ offset?: number;
+ /**
+ * Maximum column width
+ */
+ width?: number;
+ /**
+ * Whether to output closing tags for empty element nodes
+ */
+ allowEmpty?: boolean;
+ /**
+ * Whether to pretty print text nodes
+ */
+ dontPrettyTextNodes?: boolean;
+ /**
+ * A string to insert before closing slash character
+ */
+ spaceBeforeSlash?: string | boolean;
+ /**
+ * The default XML writer to use for converting nodes to string.
+ * If the default writer is not set, the built-in `XMLStringWriter`
+ * will be used instead.
+ */
+ writer?: XMLWriter;
+ }
+
+ /**
+ * Represents the XML document.
+ */
+ class XMLDocument extends XMLNode {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an XML attribute.
+ */
+ class XMLAttribute {
+ /**
+ * Type of the node
+ */
+ type: NodeType;
+ /**
+ * Parent element node
+ */
+ parent: XMLElement;
+ /**
+ * Attribute name
+ */
+ name: string;
+ /**
+ * Attribute value
+ */
+ value: string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLAttribute;
+
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents the base class of XML nodes.
+ */
+ abstract class XMLNode {
+ /**
+ * Type of the node
+ */
+ type: NodeType;
+ /**
+ * Parent element node
+ */
+ parent: XMLElement;
+ /**
+ * Child nodes
+ */
+ children: XMLNode[]
+
+ /**
+ * Creates a new child node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `ele` and `e`
+ *
+ * @param name - node name or a JS object defining the nodes to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the last top level node created
+ */
+ element(name: any, attributes?: Object, text?: any): XMLElement;
+ ele(name: any, attributes?: Object, text?: any): XMLElement;
+ e(name: any, attributes?: Object, text?: any): XMLElement;
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * _Aliases:_ `att`, `a`
+ *
+ * @param name - attribute name
+ * @param value - attribute value
+ *
+ * @returns the parent element node
+ */
+ attribute(name: any, value?: any): XMLElement;
+ att(name: any, value?: any): XMLElement;
+ a(name: any, value?: any): XMLElement;
+
+ /**
+ * Creates a new sibling node and inserts it before this node.
+ *
+ * @param name - node name or a JS object defining the nodes to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the new node
+ */
+ insertBefore(name: any, attributes?: Object, text?: any): XMLElement;
+ /**
+ * Creates a new sibling node and inserts it after this node.
+ *
+ * @param name - node name or a JS object defining the nodes to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the new node
+ */
+ insertAfter(name: any, attributes?: Object, text?: any): XMLElement;
+ /**
+ * Removes this node from the tree.
+ *
+ * @returns the parent node
+ */
+ remove(): XMLElement;
+
+ /**
+ * Creates a new element node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `nod` and `n`
+ *
+ * @param name - element node name
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the node created
+ */
+ node(name: string, attributes?: Object, text?: any): XMLElement;
+ nod(name: string, attributes?: Object, text?: any): XMLElement;
+ n(name: string, attributes?: Object, text?: any): XMLElement;
+
+ /**
+ * Creates a new text node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `txt` and `t`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ text(value: string): XMLElement;
+ txt(value: string): XMLElement;
+ t(value: string): XMLElement;
+
+ /**
+ * Creates a new CDATA node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `dat` and `d`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ cdata(value: string): XMLElement;
+ dat(value: string): XMLElement;
+ d(value: string): XMLElement;
+
+ /**
+ * Creates a new comment node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `com` and `c`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ comment(value: string): XMLElement;
+ com(value: string): XMLElement;
+ c(value: string): XMLElement;
+
+ /**
+ * Creates a comment node before the current node
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ commentBefore(value: string): XMLElement;
+
+ /**
+ * Creates a comment node after the current node
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ commentAfter(value: string): XMLElement;
+
+ /**
+ * Creates a new raw text node and appends it to the list of child
+ * nodes.
+ *
+ * _Alias:_ `r`
+ *
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ raw(value: string): XMLElement;
+ r(value: string): XMLElement;
+
+ /**
+ * Creates a new processing instruction node and appends it to the list
+ * of child nodes.
+ *
+ * _Aliases:_ `ins` and `i`
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ instruction(target: string, value: any): XMLElement;
+ instruction(array: Array<any>): XMLElement;
+ instruction(obj: Object): XMLElement;
+ ins(target: string, value: any): XMLElement;
+ ins(array: Array<any>): XMLElement;
+ ins(obj: Object): XMLElement;
+ i(target: string, value: any): XMLElement;
+ i(array: Array<any>): XMLElement;
+ i(obj: Object): XMLElement;
+
+ /**
+ * Creates a processing instruction node before the current node.
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ instructionBefore(target: string, value: any): XMLElement;
+
+ /**
+ * Creates a processing instruction node after the current node.
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the parent node
+ */
+ instructionAfter(target: string, value: any): XMLElement;
+
+ /**
+ * Creates the XML declaration.
+ *
+ * _Alias:_ `dec`
+ *
+ * @param version - version number string, e.g. `1.0`
+ * @param encoding - encoding declaration, e.g. `UTF-8`
+ * @param standalone - standalone document declaration: `true` or `false`
+ *
+ * @returns the root element node
+ */
+ declaration(version?: string |
+ { version?: string, encoding?: string, standalone?: boolean },
+ encoding?: string, standalone?: boolean): XMLElement;
+ dec(version?: string |
+ { version?: string, encoding?: string, standalone?: boolean },
+ encoding?: string, standalone?: boolean): XMLElement;
+
+ /**
+ * Creates the document type definition.
+ *
+ * _Alias:_ `dtd`
+ *
+ * @param pubID - public identifier of the DTD
+ * @param sysID - system identifier of the DTD
+ *
+ * @returns the DOCTYPE node
+ */
+ doctype(pubID?: string | { pubID?: string, sysID?: string },
+ sysID?: string): XMLDocType;
+ dtd(pubID?: string | { pubID?: string, sysID?: string },
+ sysID?: string): XMLDocType;
+
+ /**
+ * Takes the root node of the given XML document and appends it
+ * to child nodes.
+ *
+ * @param doc - the document whose root node to import
+ *
+ * @returns the current node
+ */
+ importDocument(doc: XMLNode): XMLElement;
+
+ /**
+ * Converts the XML document to string.
+ *
+ * @param options - conversion options
+ */
+ end(options?: XMLWriter | XMLToStringOptions): string;
+
+ /**
+ * Returns the previous sibling node.
+ */
+ prev(): XMLNode;
+ /**
+ * Returns the next sibling node.
+ */
+ next(): XMLNode;
+ /**
+ * Returns the parent node.
+ *
+ * _Alias:_ `u`
+ */
+ up(): XMLElement;
+ u(): XMLElement;
+ /**
+ * Returns the document node.
+ *
+ * _Alias:_ `doc`
+ */
+ document(): XMLDocument;
+ doc(): XMLDocument;
+
+ /**
+ * Returns the root element node.
+ */
+ root(): XMLElement;
+ }
+
+ /**
+ * Represents the base class of character data nodes.
+ */
+ abstract class XMLCharacterData extends XMLNode {
+ /**
+ * Node value
+ */
+ value: string;
+ }
+
+ /**
+ * Represents a CDATA node.
+ */
+ class XMLCData extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLCData;
+ }
+
+ /**
+ * Represents a comment node.
+ */
+ class XMLComment extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLComment;
+ }
+
+ /**
+ * Represents a processing instruction node.
+ */
+ class XMLProcessingInstruction extends XMLCharacterData {
+ /** Instruction target
+ */
+ target: string;
+
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLProcessingInstruction;
+ }
+
+ /**
+ * Represents a raw text node.
+ */
+ class XMLRaw extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLRaw;
+ }
+
+ /**
+ * Represents a text node.
+ */
+ class XMLText extends XMLCharacterData {
+ /**
+ * Converts the node to string
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLText;
+ }
+
+ /**
+ * Represents the XML declaration.
+ */
+ class XMLDeclaration {
+ /**
+ * A version number string, e.g. `1.0`
+ */
+ version: string;
+ /**
+ * Encoding declaration, e.g. `UTF-8`
+ */
+ encoding: string;
+ /**
+ * Standalone document declaration: `true` or `false`
+ */
+ standalone: boolean;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents the document type definition.
+ */
+ class XMLDocType {
+ /**
+ * Type of the node
+ */
+ type: NodeType;
+ /**
+ * Parent element node
+ */
+ parent: XMLElement;
+ /**
+ * Child nodes
+ */
+ children: XMLNode[]
+
+ /**
+ * Public identifier of the DTD
+ */
+ pubID: string;
+ /**
+ * System identifier of the DTD
+ */
+ sysID: string;
+
+ /**
+ * Creates an element type declaration.
+ *
+ * _Alias:_ `ele`
+ *
+ * @param name - element name
+ * @param value - element content (defaults to `#PCDATA`)
+ *
+ * @returns the DOCTYPE node
+ */
+ element(name: string, value?: Object): XMLDocType;
+ ele(name: string, value?: Object): XMLDocType;
+
+ /**
+ * Creates an attribute declaration.
+ *
+ * _Alias:_ `att`
+ *
+ * @param elementName - the name of the element containing this attribute
+ * @param attributeName - attribute name
+ * @param attributeType - type of the attribute
+ * @param defaultValueType - default value type (either `#REQUIRED`,
+ * `#IMPLIED`, `#FIXED` or `#DEFAULT`)
+ * @param defaultValue - default value of the attribute (only used
+ * for `#FIXED` or `#DEFAULT`)
+ *
+ * @returns the DOCTYPE node
+ */
+ attList(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType: string, defaultValue?: any): XMLDocType;
+ att(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType: string, defaultValue?: any): XMLDocType;
+
+ /**
+ * Creates a general entity declaration.
+ *
+ * _Alias:_ `ent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the DOCTYPE node
+ */
+ entity(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocType;
+ ent(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocType;
+
+ /**
+ * Creates a parameter entity declaration.
+ *
+ * _Alias:_ `pent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the DOCTYPE node
+ */
+ pEntity(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocType;
+ pent(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocType;
+
+ /**
+ * Creates a notation declaration.
+ *
+ * _Alias:_ `not`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the DOCTYPE node
+ */
+ notation(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocType;
+ not(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocType;
+
+ /**
+ * Creates a new CDATA node and appends it to the list of child nodes.
+ *
+ * _Alias:_ `dat`
+ *
+ * @param value - node value
+ *
+ * @returns the DOCTYPE node
+ */
+ cdata(value: string): XMLDocType;
+ dat(value: string): XMLDocType;
+
+ /**
+ * Creates a new comment child and appends it to the list of child
+ * nodes.
+ *
+ * _Alias:_ `com`
+ *
+ * @param value - node value
+ *
+ * @returns the DOCTYPE node
+ */
+ comment(value: string): XMLDocType;
+ com(value: string): XMLDocType;
+
+ /**
+ * Creates a new processing instruction node and appends it to the list
+ * of child nodes.
+ *
+ * _Alias:_ `ins`
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the DOCTYPE node
+ */
+ instruction(target: string, value: any): XMLDocType;
+ instruction(array: Array<any>): XMLDocType;
+ instruction(obj: Object): XMLDocType;
+ ins(target: string, value: any): XMLDocType;
+ ins(array: Array<any>): XMLDocType;
+ ins(obj: Object): XMLDocType;
+
+ /**
+ * Returns the root element node.
+ *
+ * _Alias:_ `up`
+ */
+ root(): XMLElement;
+ up(): XMLElement;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+
+ /**
+ * Creates a clone of this node.
+ */
+ clone(): XMLDocType;
+
+ /**
+ * Returns the document node.
+ *
+ * _Alias:_ `doc`
+ */
+ document(): XMLDocument;
+ doc(): XMLDocument;
+
+ /**
+ * Converts the XML document to string.
+ *
+ * @param options - conversion options
+ */
+ end(options?: XMLWriter | XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an attribute list in the DTD.
+ */
+ class XMLDTDAttList {
+ /**
+ * The name of the element containing this attribute
+ */
+ elementName: string;
+ /**
+ * Attribute name
+ */
+ attributeName: string;
+ /**
+ * Type of the attribute
+ */
+ attributeType: string;
+ /**
+ * Default value type (either `#REQUIRED`, `#IMPLIED`, `#FIXED`
+ * or `#DEFAULT`)
+ */
+ defaultValueType: string;
+ /**
+ * Default value of the attribute (only used for `#FIXED` or
+ * `#DEFAULT`)
+ */
+ defaultValue: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an element in the DTD.
+ */
+ class XMLDTDElement {
+ /**
+ * The name of the element
+ */
+ name: string;
+ /**
+ * Element content
+ */
+ value: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an entity in the DTD.
+ */
+ class XMLDTDEntity {
+ /**
+ * Determines whether this is a parameter entity (`true`) or a
+ * general entity (`false`).
+ */
+ pe: boolean;
+ /**
+ * The name of the entity
+ */
+ name: string;
+ /**
+ * Public identifier
+ */
+ pubID: string;
+ /**
+ * System identifier
+ */
+ sysID: string;
+ /**
+ * Notation declaration
+ */
+ nData: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents a notation in the DTD.
+ */
+ class XMLDTDNotation {
+ /**
+ * The name of the notation
+ */
+ name: string;
+ /**
+ * Public identifier
+ */
+ pubID: string;
+ /**
+ * System identifier
+ */
+ sysID: string;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an element node.
+ */
+ class XMLElement extends XMLNode {
+ /**
+ * Element node name
+ */
+ name: string;
+ /**
+ * Element attributes
+ */
+ attribs: { string: XMLAttribute };
+
+ /**
+ * Creates a clone of this node
+ */
+ clone(): XMLElement;
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * _Aliases:_ `att`, `a`
+ *
+ * @param name - attribute name
+ * @param value - attribute value
+ *
+ * @returns the parent element node
+ */
+ attribute(name: any, value?: any): XMLElement;
+ att(name: any, value?: any): XMLElement;
+ a(name: any, value?: any): XMLElement;
+
+ /**
+ * Removes an attribute.
+ *
+ * @param name - attribute name
+ *
+ * @returns the parent element node
+ */
+ removeAttribute(name: string | string[]): XMLElement;
+
+ /**
+ * Converts the node to string.
+ *
+ * @param options - conversion options
+ */
+ toString(options?: XMLToStringOptions): string;
+ }
+
+ /**
+ * Represents an XML document builder used in callback mode with the
+ * `begin` function.
+ */
+ class XMLDocumentCB {
+
+ /**
+ * Creates a new child node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `nod` and `n`
+ *
+ * @param name - element node name
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the document builder object
+ */
+ node(name: string, attributes?: Object, text?: any): XMLDocumentCB;
+ nod(name: string, attributes?: Object, text?: any): XMLDocumentCB;
+ n(name: string, attributes?: Object, text?: any): XMLDocumentCB;
+
+ /**
+ * Creates a child element node.
+ *
+ * _Aliases:_ `ele` and `e`
+ *
+ * @param name - element node name or a JS object defining the nodes
+ * to insert
+ * @param attributes - node attributes
+ * @param text - node text
+ *
+ * @returns the document builder object
+ */
+ element(name: any, attributes?: Object, text?: any): XMLDocumentCB;
+ ele(name: any, attributes?: Object, text?: any): XMLDocumentCB;
+ e(name: any, attributes?: Object, text?: any): XMLDocumentCB;
+
+ /**
+ * Adds or modifies an attribute.
+ *
+ * _Aliases:_ `att` and `a`
+ *
+ * @param name - attribute name
+ * @param value - attribute value
+ *
+ * @returns the document builder object
+ */
+ attribute(name: any, value?: any): XMLDocumentCB;
+ att(name: any, value?: any): XMLDocumentCB;
+ a(name: any, value?: any): XMLDocumentCB;
+
+ /**
+ * Creates a new text node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `txt` and `t`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ text(value: string): XMLDocumentCB;
+ txt(value: string): XMLDocumentCB;
+ t(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new CDATA node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `dat` and `d`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ cdata(value: string): XMLDocumentCB;
+ dat(value: string): XMLDocumentCB;
+ d(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new comment node and appends it to the list of child nodes.
+ *
+ * _Aliases:_ `com` and `c`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ comment(value: string): XMLDocumentCB;
+ com(value: string): XMLDocumentCB;
+ c(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new raw text node and appends it to the list of child
+ * nodes.
+ *
+ * _Alias:_ `r`
+ *
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ raw(value: string): XMLDocumentCB;
+ r(value: string): XMLDocumentCB;
+
+ /**
+ * Creates a new processing instruction node and appends it to the list
+ * of child nodes.
+ *
+ * _Aliases:_ `ins` and `i`
+ *
+ * @param target - node target
+ * @param value - node value
+ *
+ * @returns the document builder object
+ */
+ instruction(target: string, value: any): XMLDocumentCB;
+ instruction(array: Array<any>): XMLDocumentCB;
+ instruction(obj: Object): XMLDocumentCB;
+ ins(target: string, value: any): XMLDocumentCB;
+ ins(array: Array<any>): XMLDocumentCB;
+ ins(obj: Object): XMLDocumentCB;
+ i(target: string, value: any): XMLDocumentCB;
+ i(array: Array<any>): XMLDocumentCB;
+ i(obj: Object): XMLDocumentCB;
+
+ /**
+ * Creates the XML declaration.
+ *
+ * _Alias:_ `dec`
+ *
+ * @param version - version number string, e.g. `1.0`
+ * @param encoding - encoding declaration, e.g. `UTF-8`
+ * @param standalone - standalone document declaration: `true` or `false`
+ *
+ * @returns the document builder object
+ */
+ declaration(version?: string, encoding?: string,
+ standalone?: boolean): XMLDocumentCB;
+ dec(version?: string, encoding?: string,
+ standalone?: boolean): XMLDocumentCB;
+
+ /**
+ * Creates the document type definition.
+ *
+ * _Alias:_ `dtd`
+ *
+ * @param root - the name of the root node
+ * @param pubID - public identifier of the DTD
+ * @param sysID - system identifier of the DTD
+ *
+ * @returns the document builder object
+ */
+ doctype(root: string, pubID?: string, sysID?: string): XMLDocumentCB;
+ dtd(root: string, pubID?: string, sysID?: string): XMLDocumentCB;
+
+ /**
+ * Creates an element type declaration.
+ *
+ * _Aliases:_ `element` and `ele`
+ *
+ * @param name - element name
+ * @param value - element content (defaults to `#PCDATA`)
+ *
+ * @returns the document builder object
+ */
+ dtdElement(name: string, value?: Object): XMLDocumentCB;
+ element(name: string, value?: Object): XMLDocumentCB;
+ ele(name: string, value?: Object): XMLDocumentCB;
+
+ /**
+ * Creates an attribute declaration.
+ *
+ * _Alias:_ `att`
+ *
+ * @param elementName - the name of the element containing this attribute
+ * @param attributeName - attribute name
+ * @param attributeType - type of the attribute (defaults to `CDATA`)
+ * @param defaultValueType - default value type (either `#REQUIRED`,
+ * `#IMPLIED`, `#FIXED` or `#DEFAULT`) (defaults to `#IMPLIED`)
+ * @param defaultValue - default value of the attribute (only used
+ * for `#FIXED` or `#DEFAULT`)
+ *
+ * @returns the document builder object
+ */
+ attList(elementName: string, attributeName: string,
+ attributeType: string, defaultValueType?:
+ string, defaultValue?: any): XMLDocumentCB;
+ att(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType?: string, defaultValue?: any): XMLDocumentCB;
+ a(elementName: string, attributeName: string, attributeType: string,
+ defaultValueType?: string, defaultValue?: any): XMLDocumentCB;
+
+ /**
+ * Creates a general entity declaration.
+ *
+ * _Alias:_ `ent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the document builder object
+ */
+ entity(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocumentCB;
+ ent(name: string, value: string |
+ { pubID?: string, sysID?: string, nData?: string }): XMLDocumentCB;
+
+ /**
+ * Creates a parameter entity declaration.
+ *
+ * _Alias:_ `pent`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the document builder object
+ */
+ pEntity(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocumentCB;
+ pent(name: string, value: string |
+ { pubID?: string, sysID?: string }): XMLDocumentCB;
+
+ /**
+ * Creates a notation declaration.
+ *
+ * _Alias:_ `not`
+ *
+ * @param name - the name of the entity
+ * @param value - entity parameters
+ *
+ * @returns the document builder object
+ */
+ notation(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocumentCB;
+ not(name: string,
+ value: { pubID?: string, sysID?: string }): XMLDocumentCB;
+
+ /**
+ * Ends the document and calls the `onEnd` callback function.
+ */
+ end(): void;
+
+ /**
+ * Moves up to the parent node.
+ *
+ * _Alias:_ `u`
+ *
+ * @returns the document builder object
+ */
+ up(): XMLDocumentCB;
+ u(): XMLDocumentCB;
+ }
+
+}
diff --git a/node_modules/xtend/.npmignore b/node_modules/xtend/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/xtend/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/xtend/LICENCE b/node_modules/xtend/LICENCE
new file mode 100644
index 0000000..a23e08a
--- /dev/null
+++ b/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Raynos.
+
+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. \ No newline at end of file
diff --git a/node_modules/xtend/Makefile b/node_modules/xtend/Makefile
new file mode 100644
index 0000000..d583fcf
--- /dev/null
+++ b/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/node_modules/xtend/README.md b/node_modules/xtend/README.md
new file mode 100644
index 0000000..389adae
--- /dev/null
+++ b/node_modules/xtend/README.md
@@ -0,0 +1,27 @@
+# xtend
+
+[![browser support][3]][4]
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+var combination = extend({
+ a: "a"
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/node_modules/xtend/has-keys.js b/node_modules/xtend/has-keys.js
new file mode 100644
index 0000000..62391e7
--- /dev/null
+++ b/node_modules/xtend/has-keys.js
@@ -0,0 +1,7 @@
+module.exports = hasKeys
+
+function hasKeys(source) {
+ return source !== null &&
+ (typeof source === "object" ||
+ typeof source === "function")
+}
diff --git a/node_modules/xtend/index.js b/node_modules/xtend/index.js
new file mode 100644
index 0000000..20937d1
--- /dev/null
+++ b/node_modules/xtend/index.js
@@ -0,0 +1,25 @@
+var Keys = require("object-keys")
+var hasKeys = require("./has-keys")
+
+module.exports = extend
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ if (!hasKeys(source)) {
+ continue
+ }
+
+ var keys = Keys(source)
+
+ for (var j = 0; j < keys.length; j++) {
+ var name = keys[j]
+ target[name] = source[name]
+ }
+ }
+
+ return target
+}
diff --git a/node_modules/xtend/mutable.js b/node_modules/xtend/mutable.js
new file mode 100644
index 0000000..17454ae
--- /dev/null
+++ b/node_modules/xtend/mutable.js
@@ -0,0 +1,25 @@
+var Keys = require("object-keys")
+var hasKeys = require("./has-keys")
+
+module.exports = extend
+
+function extend(target) {
+ var sources = [].slice.call(arguments, 1)
+
+ for (var i = 0; i < sources.length; i++) {
+ var source = sources[i]
+
+ if (!hasKeys(source)) {
+ continue
+ }
+
+ var keys = Keys(source)
+
+ for (var j = 0; j < keys.length; j++) {
+ var name = keys[j]
+ target[name] = source[name]
+ }
+ }
+
+ return target
+}
diff --git a/node_modules/xtend/package.json b/node_modules/xtend/package.json
new file mode 100644
index 0000000..d93be22
--- /dev/null
+++ b/node_modules/xtend/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "xtend",
+ "version": "2.1.2",
+ "description": "extend like a boss",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "author": "Raynos <raynos2@gmail.com>",
+ "repository": "git://github.com/Raynos/xtend.git",
+ "main": "index",
+ "scripts": {
+ "test": "node test"
+ },
+ "dependencies": {
+ "object-keys": "~0.4.0"
+ },
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/raynos/xtend/raw/master/LICENSE"
+ }
+ ],
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "engines": {
+ "node": ">=0.4"
+ }
+}
diff --git a/node_modules/xtend/test.js b/node_modules/xtend/test.js
new file mode 100644
index 0000000..3369d79
--- /dev/null
+++ b/node_modules/xtend/test.js
@@ -0,0 +1,63 @@
+var test = require("tape")
+var extend = require("./")
+var mutableExtend = require("./mutable")
+
+test("merge", function(assert) {
+ var a = { a: "foo" }
+ var b = { b: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("replace", function(assert) {
+ var a = { a: "foo" }
+ var b = { a: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "bar" })
+ assert.end()
+})
+
+test("undefined", function(assert) {
+ var a = { a: undefined }
+ var b = { b: "foo" }
+
+ assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
+ assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
+ assert.end()
+})
+
+test("handle 0", function(assert) {
+ var a = { a: "default" }
+ var b = { a: 0 }
+
+ assert.deepEqual(extend(a, b), { a: 0 })
+ assert.deepEqual(extend(b, a), { a: "default" })
+ assert.end()
+})
+
+test("is immutable", function (assert) {
+ var record = {}
+
+ extend(record, { foo: "bar" })
+ assert.equal(record.foo, undefined)
+ assert.end()
+})
+
+test("null as argument", function (assert) {
+ var a = { foo: "bar" }
+ var b = null
+ var c = void 0
+
+ assert.deepEqual(extend(b, a, c), { foo: "bar" })
+ assert.end()
+})
+
+test("mutable", function (assert) {
+ var a = { foo: "bar" }
+
+ mutableExtend(a, { bar: "baz" })
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
diff --git a/node_modules/yallist/LICENSE b/node_modules/yallist/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/yallist/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/yallist/README.md b/node_modules/yallist/README.md
new file mode 100644
index 0000000..f586101
--- /dev/null
+++ b/node_modules/yallist/README.md
@@ -0,0 +1,204 @@
+# yallist
+
+Yet Another Linked List
+
+There are many doubly-linked list implementations like it, but this
+one is mine.
+
+For when an array would be too big, and a Map can't be iterated in
+reverse order.
+
+
+[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
+
+## basic usage
+
+```javascript
+var yallist = require('yallist')
+var myList = yallist.create([1, 2, 3])
+myList.push('foo')
+myList.unshift('bar')
+// of course pop() and shift() are there, too
+console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
+myList.forEach(function (k) {
+ // walk the list head to tail
+})
+myList.forEachReverse(function (k, index, list) {
+ // walk the list tail to head
+})
+var myDoubledList = myList.map(function (k) {
+ return k + k
+})
+// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
+// mapReverse is also a thing
+var myDoubledListReverse = myList.mapReverse(function (k) {
+ return k + k
+}) // ['foofoo', 6, 4, 2, 'barbar']
+
+var reduced = myList.reduce(function (set, entry) {
+ set += entry
+ return set
+}, 'start')
+console.log(reduced) // 'startfoo123bar'
+```
+
+## api
+
+The whole API is considered "public".
+
+Functions with the same name as an Array method work more or less the
+same way.
+
+There's reverse versions of most things because that's the point.
+
+### Yallist
+
+Default export, the class that holds and manages a list.
+
+Call it with either a forEach-able (like an array) or a set of
+arguments, to initialize the list.
+
+The Array-ish methods all act like you'd expect. No magic length,
+though, so if you change that it won't automatically prune or add
+empty spots.
+
+### Yallist.create(..)
+
+Alias for Yallist function. Some people like factories.
+
+#### yallist.head
+
+The first node in the list
+
+#### yallist.tail
+
+The last node in the list
+
+#### yallist.length
+
+The number of nodes in the list. (Change this at your peril. It is
+not magic like Array length.)
+
+#### yallist.toArray()
+
+Convert the list to an array.
+
+#### yallist.forEach(fn, [thisp])
+
+Call a function on each item in the list.
+
+#### yallist.forEachReverse(fn, [thisp])
+
+Call a function on each item in the list, in reverse order.
+
+#### yallist.get(n)
+
+Get the data at position `n` in the list. If you use this a lot,
+probably better off just using an Array.
+
+#### yallist.getReverse(n)
+
+Get the data at position `n`, counting from the tail.
+
+#### yallist.map(fn, thisp)
+
+Create a new Yallist with the result of calling the function on each
+item.
+
+#### yallist.mapReverse(fn, thisp)
+
+Same as `map`, but in reverse.
+
+#### yallist.pop()
+
+Get the data from the list tail, and remove the tail from the list.
+
+#### yallist.push(item, ...)
+
+Insert one or more items to the tail of the list.
+
+#### yallist.reduce(fn, initialValue)
+
+Like Array.reduce.
+
+#### yallist.reduceReverse
+
+Like Array.reduce, but in reverse.
+
+#### yallist.reverse
+
+Reverse the list in place.
+
+#### yallist.shift()
+
+Get the data from the list head, and remove the head from the list.
+
+#### yallist.slice([from], [to])
+
+Just like Array.slice, but returns a new Yallist.
+
+#### yallist.sliceReverse([from], [to])
+
+Just like yallist.slice, but the result is returned in reverse.
+
+#### yallist.toArray()
+
+Create an array representation of the list.
+
+#### yallist.toArrayReverse()
+
+Create a reversed array representation of the list.
+
+#### yallist.unshift(item, ...)
+
+Insert one or more items to the head of the list.
+
+#### yallist.unshiftNode(node)
+
+Move a Node object to the front of the list. (That is, pull it out of
+wherever it lives, and make it the new head.)
+
+If the node belongs to a different list, then that list will remove it
+first.
+
+#### yallist.pushNode(node)
+
+Move a Node object to the end of the list. (That is, pull it out of
+wherever it lives, and make it the new tail.)
+
+If the node belongs to a list already, then that list will remove it
+first.
+
+#### yallist.removeNode(node)
+
+Remove a node from the list, preserving referential integrity of head
+and tail and other nodes.
+
+Will throw an error if you try to have a list remove a node that
+doesn't belong to it.
+
+### Yallist.Node
+
+The class that holds the data and is actually the list.
+
+Call with `var n = new Node(value, previousNode, nextNode)`
+
+Note that if you do direct operations on Nodes themselves, it's very
+easy to get into weird states where the list is broken. Be careful :)
+
+#### node.next
+
+The next node in the list.
+
+#### node.prev
+
+The previous node in the list.
+
+#### node.value
+
+The data the node contains.
+
+#### node.list
+
+The list to which this node belongs. (Null if it does not belong to
+any list.)
diff --git a/node_modules/yallist/iterator.js b/node_modules/yallist/iterator.js
new file mode 100644
index 0000000..d41c97a
--- /dev/null
+++ b/node_modules/yallist/iterator.js
@@ -0,0 +1,8 @@
+'use strict'
+module.exports = function (Yallist) {
+ Yallist.prototype[Symbol.iterator] = function* () {
+ for (let walker = this.head; walker; walker = walker.next) {
+ yield walker.value
+ }
+ }
+}
diff --git a/node_modules/yallist/package.json b/node_modules/yallist/package.json
new file mode 100644
index 0000000..8a08386
--- /dev/null
+++ b/node_modules/yallist/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "yallist",
+ "version": "4.0.0",
+ "description": "Yet Another Linked List",
+ "main": "yallist.js",
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "yallist.js",
+ "iterator.js"
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "^12.1.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js --100",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/isaacs/yallist.git"
+ },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "ISC"
+}
diff --git a/node_modules/yallist/yallist.js b/node_modules/yallist/yallist.js
new file mode 100644
index 0000000..4e83ab1
--- /dev/null
+++ b/node_modules/yallist/yallist.js
@@ -0,0 +1,426 @@
+'use strict'
+module.exports = Yallist
+
+Yallist.Node = Node
+Yallist.create = Yallist
+
+function Yallist (list) {
+ var self = this
+ if (!(self instanceof Yallist)) {
+ self = new Yallist()
+ }
+
+ self.tail = null
+ self.head = null
+ self.length = 0
+
+ if (list && typeof list.forEach === 'function') {
+ list.forEach(function (item) {
+ self.push(item)
+ })
+ } else if (arguments.length > 0) {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ self.push(arguments[i])
+ }
+ }
+
+ return self
+}
+
+Yallist.prototype.removeNode = function (node) {
+ if (node.list !== this) {
+ throw new Error('removing node which does not belong to this list')
+ }
+
+ var next = node.next
+ var prev = node.prev
+
+ if (next) {
+ next.prev = prev
+ }
+
+ if (prev) {
+ prev.next = next
+ }
+
+ if (node === this.head) {
+ this.head = next
+ }
+ if (node === this.tail) {
+ this.tail = prev
+ }
+
+ node.list.length--
+ node.next = null
+ node.prev = null
+ node.list = null
+
+ return next
+}
+
+Yallist.prototype.unshiftNode = function (node) {
+ if (node === this.head) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var head = this.head
+ node.list = this
+ node.next = head
+ if (head) {
+ head.prev = node
+ }
+
+ this.head = node
+ if (!this.tail) {
+ this.tail = node
+ }
+ this.length++
+}
+
+Yallist.prototype.pushNode = function (node) {
+ if (node === this.tail) {
+ return
+ }
+
+ if (node.list) {
+ node.list.removeNode(node)
+ }
+
+ var tail = this.tail
+ node.list = this
+ node.prev = tail
+ if (tail) {
+ tail.next = node
+ }
+
+ this.tail = node
+ if (!this.head) {
+ this.head = node
+ }
+ this.length++
+}
+
+Yallist.prototype.push = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ push(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.unshift = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ unshift(this, arguments[i])
+ }
+ return this.length
+}
+
+Yallist.prototype.pop = function () {
+ if (!this.tail) {
+ return undefined
+ }
+
+ var res = this.tail.value
+ this.tail = this.tail.prev
+ if (this.tail) {
+ this.tail.next = null
+ } else {
+ this.head = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.shift = function () {
+ if (!this.head) {
+ return undefined
+ }
+
+ var res = this.head.value
+ this.head = this.head.next
+ if (this.head) {
+ this.head.prev = null
+ } else {
+ this.tail = null
+ }
+ this.length--
+ return res
+}
+
+Yallist.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.head, i = 0; walker !== null; i++) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.next
+ }
+}
+
+Yallist.prototype.forEachReverse = function (fn, thisp) {
+ thisp = thisp || this
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
+ fn.call(thisp, walker.value, i, this)
+ walker = walker.prev
+ }
+}
+
+Yallist.prototype.get = function (n) {
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.next
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.getReverse = function (n) {
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
+ // abort out of the list early if we hit a cycle
+ walker = walker.prev
+ }
+ if (i === n && walker !== null) {
+ return walker.value
+ }
+}
+
+Yallist.prototype.map = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.head; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.next
+ }
+ return res
+}
+
+Yallist.prototype.mapReverse = function (fn, thisp) {
+ thisp = thisp || this
+ var res = new Yallist()
+ for (var walker = this.tail; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this))
+ walker = walker.prev
+ }
+ return res
+}
+
+Yallist.prototype.reduce = function (fn, initial) {
+ var acc
+ var walker = this.head
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.head) {
+ walker = this.head.next
+ acc = this.head.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = 0; walker !== null; i++) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.next
+ }
+
+ return acc
+}
+
+Yallist.prototype.reduceReverse = function (fn, initial) {
+ var acc
+ var walker = this.tail
+ if (arguments.length > 1) {
+ acc = initial
+ } else if (this.tail) {
+ walker = this.tail.prev
+ acc = this.tail.value
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value')
+ }
+
+ for (var i = this.length - 1; walker !== null; i--) {
+ acc = fn(acc, walker.value, i)
+ walker = walker.prev
+ }
+
+ return acc
+}
+
+Yallist.prototype.toArray = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.head; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.next
+ }
+ return arr
+}
+
+Yallist.prototype.toArrayReverse = function () {
+ var arr = new Array(this.length)
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
+ arr[i] = walker.value
+ walker = walker.prev
+ }
+ return arr
+}
+
+Yallist.prototype.slice = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
+ walker = walker.next
+ }
+ for (; walker !== null && i < to; i++, walker = walker.next) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.sliceReverse = function (from, to) {
+ to = to || this.length
+ if (to < 0) {
+ to += this.length
+ }
+ from = from || 0
+ if (from < 0) {
+ from += this.length
+ }
+ var ret = new Yallist()
+ if (to < from || to < 0) {
+ return ret
+ }
+ if (from < 0) {
+ from = 0
+ }
+ if (to > this.length) {
+ to = this.length
+ }
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
+ walker = walker.prev
+ }
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
+ ret.push(walker.value)
+ }
+ return ret
+}
+
+Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
+ if (start > this.length) {
+ start = this.length - 1
+ }
+ if (start < 0) {
+ start = this.length + start;
+ }
+
+ for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
+ walker = walker.next
+ }
+
+ var ret = []
+ for (var i = 0; walker && i < deleteCount; i++) {
+ ret.push(walker.value)
+ walker = this.removeNode(walker)
+ }
+ if (walker === null) {
+ walker = this.tail
+ }
+
+ if (walker !== this.head && walker !== this.tail) {
+ walker = walker.prev
+ }
+
+ for (var i = 0; i < nodes.length; i++) {
+ walker = insert(this, walker, nodes[i])
+ }
+ return ret;
+}
+
+Yallist.prototype.reverse = function () {
+ var head = this.head
+ var tail = this.tail
+ for (var walker = head; walker !== null; walker = walker.prev) {
+ var p = walker.prev
+ walker.prev = walker.next
+ walker.next = p
+ }
+ this.head = tail
+ this.tail = head
+ return this
+}
+
+function insert (self, node, value) {
+ var inserted = node === self.head ?
+ new Node(value, null, node, self) :
+ new Node(value, node, node.next, self)
+
+ if (inserted.next === null) {
+ self.tail = inserted
+ }
+ if (inserted.prev === null) {
+ self.head = inserted
+ }
+
+ self.length++
+
+ return inserted
+}
+
+function push (self, item) {
+ self.tail = new Node(item, self.tail, null, self)
+ if (!self.head) {
+ self.head = self.tail
+ }
+ self.length++
+}
+
+function unshift (self, item) {
+ self.head = new Node(item, null, self.head, self)
+ if (!self.tail) {
+ self.tail = self.head
+ }
+ self.length++
+}
+
+function Node (value, prev, next, list) {
+ if (!(this instanceof Node)) {
+ return new Node(value, prev, next, list)
+ }
+
+ this.list = list
+ this.value = value
+
+ if (prev) {
+ prev.next = this
+ this.prev = prev
+ } else {
+ this.prev = null
+ }
+
+ if (next) {
+ next.prev = this
+ this.next = next
+ } else {
+ this.next = null
+ }
+}
+
+try {
+ // add if support for Symbol.iterator is present
+ require('./iterator.js')(Yallist)
+} catch (er) {}
diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md
new file mode 100644
index 0000000..584eb86
--- /dev/null
+++ b/node_modules/yargs-parser/CHANGELOG.md
@@ -0,0 +1,308 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [21.1.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.1.0...yargs-parser-v21.1.1) (2022-08-04)
+
+
+### Bug Fixes
+
+* **typescript:** ignore .cts files during publish ([#454](https://github.com/yargs/yargs-parser/issues/454)) ([d69f9c3](https://github.com/yargs/yargs-parser/commit/d69f9c3a91c3ad2f9494d0a94e29a8b76c41b81b)), closes [#452](https://github.com/yargs/yargs-parser/issues/452)
+
+## [21.1.0](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.1...yargs-parser-v21.1.0) (2022-08-03)
+
+
+### Features
+
+* allow the browser build to be imported ([#443](https://github.com/yargs/yargs-parser/issues/443)) ([a89259f](https://github.com/yargs/yargs-parser/commit/a89259ff41d6f5312b3ce8a30bef343a993f395a))
+
+
+### Bug Fixes
+
+* **halt-at-non-option:** prevent known args from being parsed when "unknown-options-as-args" is enabled ([#438](https://github.com/yargs/yargs-parser/issues/438)) ([c474bc1](https://github.com/yargs/yargs-parser/commit/c474bc10c3aa0ae864b95e5722730114ef15f573))
+* node version check now uses process.versions.node ([#450](https://github.com/yargs/yargs-parser/issues/450)) ([d07bcdb](https://github.com/yargs/yargs-parser/commit/d07bcdbe43075f7201fbe8a08e491217247fe1f1))
+* parse options ending with 3+ hyphens ([#434](https://github.com/yargs/yargs-parser/issues/434)) ([4f1060b](https://github.com/yargs/yargs-parser/commit/4f1060b50759fadbac3315c5117b0c3d65b0a7d8))
+
+### [21.0.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.0...yargs-parser-v21.0.1) (2022-02-27)
+
+
+### Bug Fixes
+
+* return deno env object ([#432](https://github.com/yargs/yargs-parser/issues/432)) ([b00eb87](https://github.com/yargs/yargs-parser/commit/b00eb87b4860a890dd2dab0d6058241bbfd2b3ec))
+
+## [21.0.0](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.9...yargs-parser-v21.0.0) (2021-11-15)
+
+
+### ⚠ BREAKING CHANGES
+
+* drops support for 10 (#421)
+
+### Bug Fixes
+
+* esm json import ([#416](https://www.github.com/yargs/yargs-parser/issues/416)) ([90f970a](https://www.github.com/yargs/yargs-parser/commit/90f970a6482dd4f5b5eb18d38596dd6f02d73edf))
+* parser should preserve inner quotes ([#407](https://www.github.com/yargs/yargs-parser/issues/407)) ([ae11f49](https://www.github.com/yargs/yargs-parser/commit/ae11f496a8318ea8885aa25015d429b33713c314))
+
+
+### Code Refactoring
+
+* drops support for 10 ([#421](https://www.github.com/yargs/yargs-parser/issues/421)) ([3aaf878](https://www.github.com/yargs/yargs-parser/commit/3aaf8784f5c7f2aec6108c1c6a55537fa7e3b5c1))
+
+### [20.2.9](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.8...yargs-parser-v20.2.9) (2021-06-20)
+
+
+### Bug Fixes
+
+* **build:** fixed automated release pipeline ([1fe9135](https://www.github.com/yargs/yargs-parser/commit/1fe9135884790a083615419b2861683e2597dac3))
+
+### [20.2.8](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.7...yargs-parser-v20.2.8) (2021-06-20)
+
+
+### Bug Fixes
+
+* **locale:** Turkish camelize and decamelize issues with toLocaleLowerCase/toLocaleUpperCase ([2617303](https://www.github.com/yargs/yargs-parser/commit/261730383e02448562f737b94bbd1f164aed5143))
+* **perf:** address slow parse when using unknown-options-as-args ([#394](https://www.github.com/yargs/yargs-parser/issues/394)) ([441f059](https://www.github.com/yargs/yargs-parser/commit/441f059d585d446551068ad213db79ac91daf83a))
+* **string-utils:** detect [0,1] ranged values as numbers ([#388](https://www.github.com/yargs/yargs-parser/issues/388)) ([efcc32c](https://www.github.com/yargs/yargs-parser/commit/efcc32c2d6b09aba31abfa2db9bd947befe5586b))
+
+### [20.2.7](https://www.github.com/yargs/yargs-parser/compare/v20.2.6...v20.2.7) (2021-03-10)
+
+
+### Bug Fixes
+
+* **deno:** force release for Deno ([6687c97](https://www.github.com/yargs/yargs-parser/commit/6687c972d0f3ca7865a97908dde3080b05f8b026))
+
+### [20.2.6](https://www.github.com/yargs/yargs-parser/compare/v20.2.5...v20.2.6) (2021-02-22)
+
+
+### Bug Fixes
+
+* **populate--:** -- should always be array ([#354](https://www.github.com/yargs/yargs-parser/issues/354)) ([585ae8f](https://www.github.com/yargs/yargs-parser/commit/585ae8ffad74cc02974f92d788e750137fd65146))
+
+### [20.2.5](https://www.github.com/yargs/yargs-parser/compare/v20.2.4...v20.2.5) (2021-02-13)
+
+
+### Bug Fixes
+
+* do not lowercase camel cased string ([#348](https://www.github.com/yargs/yargs-parser/issues/348)) ([5f4da1f](https://www.github.com/yargs/yargs-parser/commit/5f4da1f17d9d50542d2aaa206c9806ce3e320335))
+
+### [20.2.4](https://www.github.com/yargs/yargs-parser/compare/v20.2.3...v20.2.4) (2020-11-09)
+
+
+### Bug Fixes
+
+* **deno:** address import issues in Deno ([#339](https://www.github.com/yargs/yargs-parser/issues/339)) ([3b54e5e](https://www.github.com/yargs/yargs-parser/commit/3b54e5eef6e9a7b7c6eec7c12bab3ba3b8ba8306))
+
+### [20.2.3](https://www.github.com/yargs/yargs-parser/compare/v20.2.2...v20.2.3) (2020-10-16)
+
+
+### Bug Fixes
+
+* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#336](https://www.github.com/yargs/yargs-parser/issues/336)) ([3ae7242](https://www.github.com/yargs/yargs-parser/commit/3ae7242040ff876d28dabded60ac226e00150c88))
+
+### [20.2.2](https://www.github.com/yargs/yargs-parser/compare/v20.2.1...v20.2.2) (2020-10-14)
+
+
+### Bug Fixes
+
+* **exports:** node 13.0-13.6 require a string fallback ([#333](https://www.github.com/yargs/yargs-parser/issues/333)) ([291aeda](https://www.github.com/yargs/yargs-parser/commit/291aeda06b685b7a015d83bdf2558e180b37388d))
+
+### [20.2.1](https://www.github.com/yargs/yargs-parser/compare/v20.2.0...v20.2.1) (2020-10-01)
+
+
+### Bug Fixes
+
+* **deno:** update types for deno ^1.4.0 ([#330](https://www.github.com/yargs/yargs-parser/issues/330)) ([0ab92e5](https://www.github.com/yargs/yargs-parser/commit/0ab92e50b090f11196334c048c9c92cecaddaf56))
+
+## [20.2.0](https://www.github.com/yargs/yargs-parser/compare/v20.1.0...v20.2.0) (2020-09-21)
+
+
+### Features
+
+* **string-utils:** export looksLikeNumber helper ([#324](https://www.github.com/yargs/yargs-parser/issues/324)) ([c8580a2](https://www.github.com/yargs/yargs-parser/commit/c8580a2327b55f6342acecb6e72b62963d506750))
+
+
+### Bug Fixes
+
+* **unknown-options-as-args:** convert positionals that look like numbers ([#326](https://www.github.com/yargs/yargs-parser/issues/326)) ([f85ebb4](https://www.github.com/yargs/yargs-parser/commit/f85ebb4face9d4b0f56147659404cbe0002f3dad))
+
+## [20.1.0](https://www.github.com/yargs/yargs-parser/compare/v20.0.0...v20.1.0) (2020-09-20)
+
+
+### Features
+
+* adds parse-positional-numbers configuration ([#321](https://www.github.com/yargs/yargs-parser/issues/321)) ([9cec00a](https://www.github.com/yargs/yargs-parser/commit/9cec00a622251292ffb7dce6f78f5353afaa0d4c))
+
+
+### Bug Fixes
+
+* **build:** update release-please; make labels kick off builds ([#323](https://www.github.com/yargs/yargs-parser/issues/323)) ([09f448b](https://www.github.com/yargs/yargs-parser/commit/09f448b4cd66e25d2872544718df46dab8af062a))
+
+## [20.0.0](https://www.github.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) (2020-09-09)
+
+
+### ⚠ BREAKING CHANGES
+
+* do not ship type definitions (#318)
+
+### Bug Fixes
+
+* only strip camel case if hyphenated ([#316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#315](https://www.github.com/yargs/yargs-parser/issues/315)
+
+
+### Code Refactoring
+
+* do not ship type definitions ([#318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330))
+
+### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27)
+
+
+### Bug Fixes
+
+* **build:** fixing publication ([#310](https://www.github.com/yargs/yargs-parser/issues/310)) ([5d3c6c2](https://www.github.com/yargs/yargs-parser/commit/5d3c6c29a9126248ba601920d9cf87c78e161ff5))
+
+### [19.0.3](https://www.github.com/yargs/yargs-parser/compare/v19.0.2...v19.0.3) (2020-08-27)
+
+
+### Bug Fixes
+
+* **build:** switch to action for publish ([#308](https://www.github.com/yargs/yargs-parser/issues/308)) ([5c2f305](https://www.github.com/yargs/yargs-parser/commit/5c2f30585342bcd8aaf926407c863099d256d174))
+
+### [19.0.2](https://www.github.com/yargs/yargs-parser/compare/v19.0.1...v19.0.2) (2020-08-27)
+
+
+### Bug Fixes
+
+* **types:** envPrefix should be optional ([#305](https://www.github.com/yargs/yargs-parser/issues/305)) ([ae3f180](https://www.github.com/yargs/yargs-parser/commit/ae3f180e14df2de2fd962145f4518f9aa0e76523))
+
+### [19.0.1](https://www.github.com/yargs/yargs-parser/compare/v19.0.0...v19.0.1) (2020-08-09)
+
+
+### Bug Fixes
+
+* **build:** push tag created for deno ([2186a14](https://www.github.com/yargs/yargs-parser/commit/2186a14989749887d56189867602e39e6679f8b0))
+
+## [19.0.0](https://www.github.com/yargs/yargs-parser/compare/v18.1.3...v19.0.0) (2020-08-09)
+
+
+### ⚠ BREAKING CHANGES
+
+* adds support for ESM and Deno (#295)
+* **ts:** projects using `@types/yargs-parser` may see variations in type definitions.
+* drops Node 6. begin following Node.js LTS schedule (#278)
+
+### Features
+
+* adds support for ESM and Deno ([#295](https://www.github.com/yargs/yargs-parser/issues/295)) ([195bc4a](https://www.github.com/yargs/yargs-parser/commit/195bc4a7f20c2a8f8e33fbb6ba96ef6e9a0120a1))
+* expose camelCase and decamelize helpers ([#296](https://www.github.com/yargs/yargs-parser/issues/296)) ([39154ce](https://www.github.com/yargs/yargs-parser/commit/39154ceb5bdcf76b5f59a9219b34cedb79b67f26))
+* **deps:** update to latest camelcase/decamelize ([#281](https://www.github.com/yargs/yargs-parser/issues/281)) ([8931ab0](https://www.github.com/yargs/yargs-parser/commit/8931ab08f686cc55286f33a95a83537da2be5516))
+
+
+### Bug Fixes
+
+* boolean numeric short option ([#294](https://www.github.com/yargs/yargs-parser/issues/294)) ([f600082](https://www.github.com/yargs/yargs-parser/commit/f600082c959e092076caf420bbbc9d7a231e2418))
+* raise permission error for Deno if config load fails ([#298](https://www.github.com/yargs/yargs-parser/issues/298)) ([1174e2b](https://www.github.com/yargs/yargs-parser/commit/1174e2b3f0c845a1cd64e14ffc3703e730567a84))
+* **deps:** update dependency decamelize to v3 ([#274](https://www.github.com/yargs/yargs-parser/issues/274)) ([4d98698](https://www.github.com/yargs/yargs-parser/commit/4d98698bc6767e84ec54a0842908191739be73b7))
+* **types:** switch back to using Partial types ([#293](https://www.github.com/yargs/yargs-parser/issues/293)) ([bdc80ba](https://www.github.com/yargs/yargs-parser/commit/bdc80ba59fa13bc3025ce0a85e8bad9f9da24ea7))
+
+
+### Build System
+
+* drops Node 6. begin following Node.js LTS schedule ([#278](https://www.github.com/yargs/yargs-parser/issues/278)) ([9014ed7](https://www.github.com/yargs/yargs-parser/commit/9014ed722a32768b96b829e65a31705db5c1458a))
+
+
+### Code Refactoring
+
+* **ts:** move index.js to TypeScript ([#292](https://www.github.com/yargs/yargs-parser/issues/292)) ([f78d2b9](https://www.github.com/yargs/yargs-parser/commit/f78d2b97567ac4828624406e420b4047c710b789))
+
+### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16)
+
+
+### Bug Fixes
+
+* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e))
+
+### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26)
+
+
+### Bug Fixes
+
+* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13))
+
+### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16)
+
+
+### Bug Fixes
+
+* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential
+prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2))
+
+## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07)
+
+
+### Features
+
+* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f))
+
+## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02)
+
+
+### ⚠ BREAKING CHANGES
+
+* the narg count is now enforced when parsing arrays.
+
+### Features
+
+* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c))
+
+## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01)
+
+
+### Features
+
+* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb))
+
+### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29)
+
+
+### Bug Fixes
+
+* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba))
+
+## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10)
+
+
+### ⚠ BREAKING CHANGES
+
+* this reverts parsing behavior of booleans to that of yargs@14
+* objects used during parsing are now created with a null
+prototype. There may be some scenarios where this change in behavior
+leaks externally.
+
+### Features
+
+* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5))
+* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732))
+
+
+### Bug Fixes
+
+* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346))
+* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c))
+* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de))
+* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5))
+
+## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01)
+
+
+### ⚠ BREAKING CHANGES
+
+* populate error if incompatible narg/count or array/count options are used (#191)
+
+### Features
+
+* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0))
+* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9))
+
+
+### Reverts
+
+* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf))
diff --git a/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-parser/LICENSE.txt
new file mode 100644
index 0000000..836440b
--- /dev/null
+++ b/node_modules/yargs-parser/LICENSE.txt
@@ -0,0 +1,14 @@
+Copyright (c) 2016, Contributors
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md
new file mode 100644
index 0000000..2614840
--- /dev/null
+++ b/node_modules/yargs-parser/README.md
@@ -0,0 +1,518 @@
+# yargs-parser
+
+![ci](https://github.com/yargs/yargs-parser/workflows/ci/badge.svg)
+[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser)
+[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
+![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/yargs-parser)
+
+The mighty option parser used by [yargs](https://github.com/yargs/yargs).
+
+visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions.
+
+<img width="250" src="https://raw.githubusercontent.com/yargs/yargs-parser/main/yargs-logo.png">
+
+## Example
+
+```sh
+npm i yargs-parser --save
+```
+
+```js
+const argv = require('yargs-parser')(process.argv.slice(2))
+console.log(argv)
+```
+
+```console
+$ node example.js --foo=33 --bar hello
+{ _: [], foo: 33, bar: 'hello' }
+```
+
+_or parse a string!_
+
+```js
+const argv = require('yargs-parser')('--foo=99 --bar=33')
+console.log(argv)
+```
+
+```console
+{ _: [], foo: 99, bar: 33 }
+```
+
+Convert an array of mixed types before passing to `yargs-parser`:
+
+```js
+const parse = require('yargs-parser')
+parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string
+parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings
+```
+
+## Deno Example
+
+As of `v19` `yargs-parser` supports [Deno](https://github.com/denoland/deno):
+
+```typescript
+import parser from "https://deno.land/x/yargs_parser/deno.ts";
+
+const argv = parser('--foo=99 --bar=9987930', {
+ string: ['bar']
+})
+console.log(argv)
+```
+
+## ESM Example
+
+As of `v19` `yargs-parser` supports ESM (_both in Node.js and in the browser_):
+
+**Node.js:**
+
+```js
+import parser from 'yargs-parser'
+
+const argv = parser('--foo=99 --bar=9987930', {
+ string: ['bar']
+})
+console.log(argv)
+```
+
+**Browsers:**
+
+```html
+<!doctype html>
+<body>
+ <script type="module">
+ import parser from "https://unpkg.com/yargs-parser@19.0.0/browser.js";
+
+ const argv = parser('--foo=99 --bar=9987930', {
+ string: ['bar']
+ })
+ console.log(argv)
+ </script>
+</body>
+```
+
+## API
+
+### parser(args, opts={})
+
+Parses command line arguments returning a simple mapping of keys and values.
+
+**expects:**
+
+* `args`: a string or array of strings representing the options to parse.
+* `opts`: provide a set of hints indicating how `args` should be parsed:
+ * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`.
+ * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.<br>
+ Indicate that keys should be parsed as an array and coerced to booleans / numbers:<br>
+ `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`.
+ * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`.
+ * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided
+ (or throws an error). For arrays the function is called only once for the entire array:<br>
+ `{coerce: {foo: function (arg) {return modifiedArg}}}`.
+ * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed).
+ * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:<br>
+ `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`.
+ * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)).
+ * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`.
+ * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`.
+ * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed.
+ * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`.
+ * `opts.normalize`: `path.normalize()` will be applied to values set to this key.
+ * `opts.number`: keys should be treated as numbers.
+ * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`).
+
+**returns:**
+
+* `obj`: an object representing the parsed value of `args`
+ * `key/value`: key value pairs for each argument and their aliases.
+ * `_`: an array representing the positional arguments.
+ * [optional] `--`: an array with arguments after the end-of-options flag `--`.
+
+### require('yargs-parser').detailed(args, opts={})
+
+Parses a command line string, returning detailed information required by the
+yargs engine.
+
+**expects:**
+
+* `args`: a string or array of strings representing options to parse.
+* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`.
+
+**returns:**
+
+* `argv`: an object representing the parsed value of `args`
+ * `key/value`: key value pairs for each argument and their aliases.
+ * `_`: an array representing the positional arguments.
+ * [optional] `--`: an array with arguments after the end-of-options flag `--`.
+* `error`: populated with an error object if an exception occurred during parsing.
+* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`.
+* `newAliases`: any new aliases added via camel-case expansion:
+ * `boolean`: `{ fooBar: true }`
+* `defaulted`: any new argument created by `opts.default`, no aliases included.
+ * `boolean`: `{ foo: true }`
+* `configuration`: given by default settings and `opts.configuration`.
+
+<a name="configuration"></a>
+
+### Configuration
+
+The yargs-parser applies several automated transformations on the keys provided
+in `args`. These features can be turned on and off using the `configuration` field
+of `opts`.
+
+```js
+var parsed = parser(['--no-dice'], {
+ configuration: {
+ 'boolean-negation': false
+ }
+})
+```
+
+### short option groups
+
+* default: `true`.
+* key: `short-option-groups`.
+
+Should a group of short-options be treated as boolean flags?
+
+```console
+$ node example.js -abc
+{ _: [], a: true, b: true, c: true }
+```
+
+_if disabled:_
+
+```console
+$ node example.js -abc
+{ _: [], abc: true }
+```
+
+### camel-case expansion
+
+* default: `true`.
+* key: `camel-case-expansion`.
+
+Should hyphenated arguments be expanded into camel-case aliases?
+
+```console
+$ node example.js --foo-bar
+{ _: [], 'foo-bar': true, fooBar: true }
+```
+
+_if disabled:_
+
+```console
+$ node example.js --foo-bar
+{ _: [], 'foo-bar': true }
+```
+
+### dot-notation
+
+* default: `true`
+* key: `dot-notation`
+
+Should keys that contain `.` be treated as objects?
+
+```console
+$ node example.js --foo.bar
+{ _: [], foo: { bar: true } }
+```
+
+_if disabled:_
+
+```console
+$ node example.js --foo.bar
+{ _: [], "foo.bar": true }
+```
+
+### parse numbers
+
+* default: `true`
+* key: `parse-numbers`
+
+Should keys that look like numbers be treated as such?
+
+```console
+$ node example.js --foo=99.3
+{ _: [], foo: 99.3 }
+```
+
+_if disabled:_
+
+```console
+$ node example.js --foo=99.3
+{ _: [], foo: "99.3" }
+```
+
+### parse positional numbers
+
+* default: `true`
+* key: `parse-positional-numbers`
+
+Should positional keys that look like numbers be treated as such.
+
+```console
+$ node example.js 99.3
+{ _: [99.3] }
+```
+
+_if disabled:_
+
+```console
+$ node example.js 99.3
+{ _: ['99.3'] }
+```
+
+### boolean negation
+
+* default: `true`
+* key: `boolean-negation`
+
+Should variables prefixed with `--no` be treated as negations?
+
+```console
+$ node example.js --no-foo
+{ _: [], foo: false }
+```
+
+_if disabled:_
+
+```console
+$ node example.js --no-foo
+{ _: [], "no-foo": true }
+```
+
+### combine arrays
+
+* default: `false`
+* key: `combine-arrays`
+
+Should arrays be combined when provided by both command line arguments and
+a configuration file.
+
+### duplicate arguments array
+
+* default: `true`
+* key: `duplicate-arguments-array`
+
+Should arguments be coerced into an array when duplicated:
+
+```console
+$ node example.js -x 1 -x 2
+{ _: [], x: [1, 2] }
+```
+
+_if disabled:_
+
+```console
+$ node example.js -x 1 -x 2
+{ _: [], x: 2 }
+```
+
+### flatten duplicate arrays
+
+* default: `true`
+* key: `flatten-duplicate-arrays`
+
+Should array arguments be coerced into a single array when duplicated:
+
+```console
+$ node example.js -x 1 2 -x 3 4
+{ _: [], x: [1, 2, 3, 4] }
+```
+
+_if disabled:_
+
+```console
+$ node example.js -x 1 2 -x 3 4
+{ _: [], x: [[1, 2], [3, 4]] }
+```
+
+### greedy arrays
+
+* default: `true`
+* key: `greedy-arrays`
+
+Should arrays consume more than one positional argument following their flag.
+
+```console
+$ node example --arr 1 2
+{ _: [], arr: [1, 2] }
+```
+
+_if disabled:_
+
+```console
+$ node example --arr 1 2
+{ _: [2], arr: [1] }
+```
+
+**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.**
+
+### nargs eats options
+
+* default: `false`
+* key: `nargs-eats-options`
+
+Should nargs consume dash options as well as positional arguments.
+
+### negation prefix
+
+* default: `no-`
+* key: `negation-prefix`
+
+The prefix to use for negated boolean variables.
+
+```console
+$ node example.js --no-foo
+{ _: [], foo: false }
+```
+
+_if set to `quux`:_
+
+```console
+$ node example.js --quuxfoo
+{ _: [], foo: false }
+```
+
+### populate --
+
+* default: `false`.
+* key: `populate--`
+
+Should unparsed flags be stored in `--` or `_`.
+
+_If disabled:_
+
+```console
+$ node example.js a -b -- x y
+{ _: [ 'a', 'x', 'y' ], b: true }
+```
+
+_If enabled:_
+
+```console
+$ node example.js a -b -- x y
+{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true }
+```
+
+### set placeholder key
+
+* default: `false`.
+* key: `set-placeholder-key`.
+
+Should a placeholder be added for keys not set via the corresponding CLI argument?
+
+_If disabled:_
+
+```console
+$ node example.js -a 1 -c 2
+{ _: [], a: 1, c: 2 }
+```
+
+_If enabled:_
+
+```console
+$ node example.js -a 1 -c 2
+{ _: [], a: 1, b: undefined, c: 2 }
+```
+
+### halt at non-option
+
+* default: `false`.
+* key: `halt-at-non-option`.
+
+Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line.
+
+_If disabled:_
+
+```console
+$ node example.js -a run b -x y
+{ _: [ 'b' ], a: 'run', x: 'y' }
+```
+
+_If enabled:_
+
+```console
+$ node example.js -a run b -x y
+{ _: [ 'b', '-x', 'y' ], a: 'run' }
+```
+
+### strip aliased
+
+* default: `false`
+* key: `strip-aliased`
+
+Should aliases be removed before returning results?
+
+_If disabled:_
+
+```console
+$ node example.js --test-field 1
+{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 }
+```
+
+_If enabled:_
+
+```console
+$ node example.js --test-field 1
+{ _: [], 'test-field': 1, testField: 1 }
+```
+
+### strip dashed
+
+* default: `false`
+* key: `strip-dashed`
+
+Should dashed keys be removed before returning results? This option has no effect if
+`camel-case-expansion` is disabled.
+
+_If disabled:_
+
+```console
+$ node example.js --test-field 1
+{ _: [], 'test-field': 1, testField: 1 }
+```
+
+_If enabled:_
+
+```console
+$ node example.js --test-field 1
+{ _: [], testField: 1 }
+```
+
+### unknown options as args
+
+* default: `false`
+* key: `unknown-options-as-args`
+
+Should unknown options be treated like regular arguments? An unknown option is one that is not
+configured in `opts`.
+
+_If disabled_
+
+```console
+$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
+{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true }
+```
+
+_If enabled_
+
+```console
+$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
+{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' }
+```
+
+## Supported Node.js Versions
+
+Libraries in this ecosystem make a best effort to track
+[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a
+post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
+
+## Special Thanks
+
+The yargs project evolves from optimist and minimist. It owes its
+existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/
+
+## License
+
+ISC
diff --git a/node_modules/yargs-parser/browser.js b/node_modules/yargs-parser/browser.js
new file mode 100644
index 0000000..241202c
--- /dev/null
+++ b/node_modules/yargs-parser/browser.js
@@ -0,0 +1,29 @@
+// Main entrypoint for ESM web browser environments. Avoids using Node.js
+// specific libraries, such as "path".
+//
+// TODO: figure out reasonable web equivalents for "resolve", "normalize", etc.
+import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js'
+import { YargsParser } from './build/lib/yargs-parser.js'
+const parser = new YargsParser({
+ cwd: () => { return '' },
+ format: (str, arg) => { return str.replace('%s', arg) },
+ normalize: (str) => { return str },
+ resolve: (str) => { return str },
+ require: () => {
+ throw Error('loading config from files not currently supported in browser')
+ },
+ env: () => {}
+})
+
+const yargsParser = function Parser (args, opts) {
+ const result = parser.parse(args.slice(), opts)
+ return result.argv
+}
+yargsParser.detailed = function (args, opts) {
+ return parser.parse(args.slice(), opts)
+}
+yargsParser.camelCase = camelCase
+yargsParser.decamelize = decamelize
+yargsParser.looksLikeNumber = looksLikeNumber
+
+export default yargsParser
diff --git a/node_modules/yargs-parser/build/index.cjs b/node_modules/yargs-parser/build/index.cjs
new file mode 100644
index 0000000..cf6f50f
--- /dev/null
+++ b/node_modules/yargs-parser/build/index.cjs
@@ -0,0 +1,1050 @@
+'use strict';
+
+var util = require('util');
+var path = require('path');
+var fs = require('fs');
+
+function camelCase(str) {
+ const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
+ if (!isCamelCase) {
+ str = str.toLowerCase();
+ }
+ if (str.indexOf('-') === -1 && str.indexOf('_') === -1) {
+ return str;
+ }
+ else {
+ let camelcase = '';
+ let nextChrUpper = false;
+ const leadingHyphens = str.match(/^-+/);
+ for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {
+ let chr = str.charAt(i);
+ if (nextChrUpper) {
+ nextChrUpper = false;
+ chr = chr.toUpperCase();
+ }
+ if (i !== 0 && (chr === '-' || chr === '_')) {
+ nextChrUpper = true;
+ }
+ else if (chr !== '-' && chr !== '_') {
+ camelcase += chr;
+ }
+ }
+ return camelcase;
+ }
+}
+function decamelize(str, joinString) {
+ const lowercase = str.toLowerCase();
+ joinString = joinString || '-';
+ let notCamelcase = '';
+ for (let i = 0; i < str.length; i++) {
+ const chrLower = lowercase.charAt(i);
+ const chrString = str.charAt(i);
+ if (chrLower !== chrString && i > 0) {
+ notCamelcase += `${joinString}${lowercase.charAt(i)}`;
+ }
+ else {
+ notCamelcase += chrString;
+ }
+ }
+ return notCamelcase;
+}
+function looksLikeNumber(x) {
+ if (x === null || x === undefined)
+ return false;
+ if (typeof x === 'number')
+ return true;
+ if (/^0x[0-9a-f]+$/i.test(x))
+ return true;
+ if (/^0[^.]/.test(x))
+ return false;
+ return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
+
+function tokenizeArgString(argString) {
+ if (Array.isArray(argString)) {
+ return argString.map(e => typeof e !== 'string' ? e + '' : e);
+ }
+ argString = argString.trim();
+ let i = 0;
+ let prevC = null;
+ let c = null;
+ let opening = null;
+ const args = [];
+ for (let ii = 0; ii < argString.length; ii++) {
+ prevC = c;
+ c = argString.charAt(ii);
+ if (c === ' ' && !opening) {
+ if (!(prevC === ' ')) {
+ i++;
+ }
+ continue;
+ }
+ if (c === opening) {
+ opening = null;
+ }
+ else if ((c === "'" || c === '"') && !opening) {
+ opening = c;
+ }
+ if (!args[i])
+ args[i] = '';
+ args[i] += c;
+ }
+ return args;
+}
+
+var DefaultValuesForTypeKey;
+(function (DefaultValuesForTypeKey) {
+ DefaultValuesForTypeKey["BOOLEAN"] = "boolean";
+ DefaultValuesForTypeKey["STRING"] = "string";
+ DefaultValuesForTypeKey["NUMBER"] = "number";
+ DefaultValuesForTypeKey["ARRAY"] = "array";
+})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
+
+let mixin;
+class YargsParser {
+ constructor(_mixin) {
+ mixin = _mixin;
+ }
+ parse(argsInput, options) {
+ const opts = Object.assign({
+ alias: undefined,
+ array: undefined,
+ boolean: undefined,
+ config: undefined,
+ configObjects: undefined,
+ configuration: undefined,
+ coerce: undefined,
+ count: undefined,
+ default: undefined,
+ envPrefix: undefined,
+ narg: undefined,
+ normalize: undefined,
+ string: undefined,
+ number: undefined,
+ __: undefined,
+ key: undefined
+ }, options);
+ const args = tokenizeArgString(argsInput);
+ const inputIsString = typeof argsInput === 'string';
+ const aliases = combineAliases(Object.assign(Object.create(null), opts.alias));
+ const configuration = Object.assign({
+ 'boolean-negation': true,
+ 'camel-case-expansion': true,
+ 'combine-arrays': false,
+ 'dot-notation': true,
+ 'duplicate-arguments-array': true,
+ 'flatten-duplicate-arrays': true,
+ 'greedy-arrays': true,
+ 'halt-at-non-option': false,
+ 'nargs-eats-options': false,
+ 'negation-prefix': 'no-',
+ 'parse-numbers': true,
+ 'parse-positional-numbers': true,
+ 'populate--': false,
+ 'set-placeholder-key': false,
+ 'short-option-groups': true,
+ 'strip-aliased': false,
+ 'strip-dashed': false,
+ 'unknown-options-as-args': false
+ }, opts.configuration);
+ const defaults = Object.assign(Object.create(null), opts.default);
+ const configObjects = opts.configObjects || [];
+ const envPrefix = opts.envPrefix;
+ const notFlagsOption = configuration['populate--'];
+ const notFlagsArgv = notFlagsOption ? '--' : '_';
+ const newAliases = Object.create(null);
+ const defaulted = Object.create(null);
+ const __ = opts.__ || mixin.format;
+ const flags = {
+ aliases: Object.create(null),
+ arrays: Object.create(null),
+ bools: Object.create(null),
+ strings: Object.create(null),
+ numbers: Object.create(null),
+ counts: Object.create(null),
+ normalize: Object.create(null),
+ configs: Object.create(null),
+ nargs: Object.create(null),
+ coercions: Object.create(null),
+ keys: []
+ };
+ const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
+ const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)');
+ [].concat(opts.array || []).filter(Boolean).forEach(function (opt) {
+ const key = typeof opt === 'object' ? opt.key : opt;
+ const assignment = Object.keys(opt).map(function (key) {
+ const arrayFlagKeys = {
+ boolean: 'bools',
+ string: 'strings',
+ number: 'numbers'
+ };
+ return arrayFlagKeys[key];
+ }).filter(Boolean).pop();
+ if (assignment) {
+ flags[assignment][key] = true;
+ }
+ flags.arrays[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.string || []).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.number || []).filter(Boolean).forEach(function (key) {
+ flags.numbers[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.count || []).filter(Boolean).forEach(function (key) {
+ flags.counts[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) {
+ flags.normalize[key] = true;
+ flags.keys.push(key);
+ });
+ if (typeof opts.narg === 'object') {
+ Object.entries(opts.narg).forEach(([key, value]) => {
+ if (typeof value === 'number') {
+ flags.nargs[key] = value;
+ flags.keys.push(key);
+ }
+ });
+ }
+ if (typeof opts.coerce === 'object') {
+ Object.entries(opts.coerce).forEach(([key, value]) => {
+ if (typeof value === 'function') {
+ flags.coercions[key] = value;
+ flags.keys.push(key);
+ }
+ });
+ }
+ if (typeof opts.config !== 'undefined') {
+ if (Array.isArray(opts.config) || typeof opts.config === 'string') {
+ [].concat(opts.config).filter(Boolean).forEach(function (key) {
+ flags.configs[key] = true;
+ });
+ }
+ else if (typeof opts.config === 'object') {
+ Object.entries(opts.config).forEach(([key, value]) => {
+ if (typeof value === 'boolean' || typeof value === 'function') {
+ flags.configs[key] = value;
+ }
+ });
+ }
+ }
+ extendAliases(opts.key, aliases, opts.default, flags.arrays);
+ Object.keys(defaults).forEach(function (key) {
+ (flags.aliases[key] || []).forEach(function (alias) {
+ defaults[alias] = defaults[key];
+ });
+ });
+ let error = null;
+ checkConfiguration();
+ let notFlags = [];
+ const argv = Object.assign(Object.create(null), { _: [] });
+ const argvReturn = {};
+ for (let i = 0; i < args.length; i++) {
+ const arg = args[i];
+ const truncatedArg = arg.replace(/^-{3,}/, '---');
+ let broken;
+ let key;
+ let letters;
+ let m;
+ let next;
+ let value;
+ if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
+ pushPositional(arg);
+ }
+ else if (truncatedArg.match(/^---+(=|$)/)) {
+ pushPositional(arg);
+ continue;
+ }
+ else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) {
+ m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
+ if (m !== null && Array.isArray(m) && m.length >= 3) {
+ if (checkAllAliases(m[1], flags.arrays)) {
+ i = eatArray(i, m[1], args, m[2]);
+ }
+ else if (checkAllAliases(m[1], flags.nargs) !== false) {
+ i = eatNargs(i, m[1], args, m[2]);
+ }
+ else {
+ setArg(m[1], m[2], true);
+ }
+ }
+ }
+ else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {
+ m = arg.match(negatedBoolean);
+ if (m !== null && Array.isArray(m) && m.length >= 2) {
+ key = m[1];
+ setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
+ }
+ }
+ else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) {
+ m = arg.match(/^--?(.+)/);
+ if (m !== null && Array.isArray(m) && m.length >= 2) {
+ key = m[1];
+ if (checkAllAliases(key, flags.arrays)) {
+ i = eatArray(i, key, args);
+ }
+ else if (checkAllAliases(key, flags.nargs) !== false) {
+ i = eatNargs(i, key, args);
+ }
+ else {
+ next = args[i + 1];
+ if (next !== undefined && (!next.match(/^-/) ||
+ next.match(negative)) &&
+ !checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts)) {
+ setArg(key, next);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next);
+ i++;
+ }
+ else {
+ setArg(key, defaultValue(key));
+ }
+ }
+ }
+ }
+ else if (arg.match(/^-.\..+=/)) {
+ m = arg.match(/^-([^=]+)=([\s\S]*)$/);
+ if (m !== null && Array.isArray(m) && m.length >= 3) {
+ setArg(m[1], m[2]);
+ }
+ }
+ else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
+ next = args[i + 1];
+ m = arg.match(/^-(.\..+)/);
+ if (m !== null && Array.isArray(m) && m.length >= 2) {
+ key = m[1];
+ if (next !== undefined && !next.match(/^-/) &&
+ !checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts)) {
+ setArg(key, next);
+ i++;
+ }
+ else {
+ setArg(key, defaultValue(key));
+ }
+ }
+ }
+ else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
+ letters = arg.slice(1, -1).split('');
+ broken = false;
+ for (let j = 0; j < letters.length; j++) {
+ next = arg.slice(j + 2);
+ if (letters[j + 1] && letters[j + 1] === '=') {
+ value = arg.slice(j + 3);
+ key = letters[j];
+ if (checkAllAliases(key, flags.arrays)) {
+ i = eatArray(i, key, args, value);
+ }
+ else if (checkAllAliases(key, flags.nargs) !== false) {
+ i = eatNargs(i, key, args, value);
+ }
+ else {
+ setArg(key, value);
+ }
+ broken = true;
+ break;
+ }
+ if (next === '-') {
+ setArg(letters[j], next);
+ continue;
+ }
+ if (/[A-Za-z]/.test(letters[j]) &&
+ /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) &&
+ checkAllAliases(next, flags.bools) === false) {
+ setArg(letters[j], next);
+ broken = true;
+ break;
+ }
+ if (letters[j + 1] && letters[j + 1].match(/\W/)) {
+ setArg(letters[j], next);
+ broken = true;
+ break;
+ }
+ else {
+ setArg(letters[j], defaultValue(letters[j]));
+ }
+ }
+ key = arg.slice(-1)[0];
+ if (!broken && key !== '-') {
+ if (checkAllAliases(key, flags.arrays)) {
+ i = eatArray(i, key, args);
+ }
+ else if (checkAllAliases(key, flags.nargs) !== false) {
+ i = eatNargs(i, key, args);
+ }
+ else {
+ next = args[i + 1];
+ if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||
+ next.match(negative)) &&
+ !checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts)) {
+ setArg(key, next);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next);
+ i++;
+ }
+ else {
+ setArg(key, defaultValue(key));
+ }
+ }
+ }
+ }
+ else if (arg.match(/^-[0-9]$/) &&
+ arg.match(negative) &&
+ checkAllAliases(arg.slice(1), flags.bools)) {
+ key = arg.slice(1);
+ setArg(key, defaultValue(key));
+ }
+ else if (arg === '--') {
+ notFlags = args.slice(i + 1);
+ break;
+ }
+ else if (configuration['halt-at-non-option']) {
+ notFlags = args.slice(i);
+ break;
+ }
+ else {
+ pushPositional(arg);
+ }
+ }
+ applyEnvVars(argv, true);
+ applyEnvVars(argv, false);
+ setConfig(argv);
+ setConfigObjects();
+ applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
+ applyCoercions(argv);
+ if (configuration['set-placeholder-key'])
+ setPlaceholderKeys(argv);
+ Object.keys(flags.counts).forEach(function (key) {
+ if (!hasKey(argv, key.split('.')))
+ setArg(key, 0);
+ });
+ if (notFlagsOption && notFlags.length)
+ argv[notFlagsArgv] = [];
+ notFlags.forEach(function (key) {
+ argv[notFlagsArgv].push(key);
+ });
+ if (configuration['camel-case-expansion'] && configuration['strip-dashed']) {
+ Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => {
+ delete argv[key];
+ });
+ }
+ if (configuration['strip-aliased']) {
+ [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => {
+ if (configuration['camel-case-expansion'] && alias.includes('-')) {
+ delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')];
+ }
+ delete argv[alias];
+ });
+ }
+ function pushPositional(arg) {
+ const maybeCoercedNumber = maybeCoerceNumber('_', arg);
+ if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') {
+ argv._.push(maybeCoercedNumber);
+ }
+ }
+ function eatNargs(i, key, args, argAfterEqualSign) {
+ let ii;
+ let toEat = checkAllAliases(key, flags.nargs);
+ toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat;
+ if (toEat === 0) {
+ if (!isUndefined(argAfterEqualSign)) {
+ error = Error(__('Argument unexpected for: %s', key));
+ }
+ setArg(key, defaultValue(key));
+ return i;
+ }
+ let available = isUndefined(argAfterEqualSign) ? 0 : 1;
+ if (configuration['nargs-eats-options']) {
+ if (args.length - (i + 1) + available < toEat) {
+ error = Error(__('Not enough arguments following: %s', key));
+ }
+ available = toEat;
+ }
+ else {
+ for (ii = i + 1; ii < args.length; ii++) {
+ if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii]))
+ available++;
+ else
+ break;
+ }
+ if (available < toEat)
+ error = Error(__('Not enough arguments following: %s', key));
+ }
+ let consumed = Math.min(available, toEat);
+ if (!isUndefined(argAfterEqualSign) && consumed > 0) {
+ setArg(key, argAfterEqualSign);
+ consumed--;
+ }
+ for (ii = i + 1; ii < (consumed + i + 1); ii++) {
+ setArg(key, args[ii]);
+ }
+ return (i + consumed);
+ }
+ function eatArray(i, key, args, argAfterEqualSign) {
+ let argsToSet = [];
+ let next = argAfterEqualSign || args[i + 1];
+ const nargsCount = checkAllAliases(key, flags.nargs);
+ if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) {
+ argsToSet.push(true);
+ }
+ else if (isUndefined(next) ||
+ (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) {
+ if (defaults[key] !== undefined) {
+ const defVal = defaults[key];
+ argsToSet = Array.isArray(defVal) ? defVal : [defVal];
+ }
+ }
+ else {
+ if (!isUndefined(argAfterEqualSign)) {
+ argsToSet.push(processValue(key, argAfterEqualSign, true));
+ }
+ for (let ii = i + 1; ii < args.length; ii++) {
+ if ((!configuration['greedy-arrays'] && argsToSet.length > 0) ||
+ (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount))
+ break;
+ next = args[ii];
+ if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
+ break;
+ i = ii;
+ argsToSet.push(processValue(key, next, inputIsString));
+ }
+ }
+ if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) ||
+ (isNaN(nargsCount) && argsToSet.length === 0))) {
+ error = Error(__('Not enough arguments following: %s', key));
+ }
+ setArg(key, argsToSet);
+ return i;
+ }
+ function setArg(key, val, shouldStripQuotes = inputIsString) {
+ if (/-/.test(key) && configuration['camel-case-expansion']) {
+ const alias = key.split('.').map(function (prop) {
+ return camelCase(prop);
+ }).join('.');
+ addNewAlias(key, alias);
+ }
+ const value = processValue(key, val, shouldStripQuotes);
+ const splitKey = key.split('.');
+ setKey(argv, splitKey, value);
+ if (flags.aliases[key]) {
+ flags.aliases[key].forEach(function (x) {
+ const keyProperties = x.split('.');
+ setKey(argv, keyProperties, value);
+ });
+ }
+ if (splitKey.length > 1 && configuration['dot-notation']) {
+ (flags.aliases[splitKey[0]] || []).forEach(function (x) {
+ let keyProperties = x.split('.');
+ const a = [].concat(splitKey);
+ a.shift();
+ keyProperties = keyProperties.concat(a);
+ if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) {
+ setKey(argv, keyProperties, value);
+ }
+ });
+ }
+ if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
+ const keys = [key].concat(flags.aliases[key] || []);
+ keys.forEach(function (key) {
+ Object.defineProperty(argvReturn, key, {
+ enumerable: true,
+ get() {
+ return val;
+ },
+ set(value) {
+ val = typeof value === 'string' ? mixin.normalize(value) : value;
+ }
+ });
+ });
+ }
+ }
+ function addNewAlias(key, alias) {
+ if (!(flags.aliases[key] && flags.aliases[key].length)) {
+ flags.aliases[key] = [alias];
+ newAliases[alias] = true;
+ }
+ if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
+ addNewAlias(alias, key);
+ }
+ }
+ function processValue(key, val, shouldStripQuotes) {
+ if (shouldStripQuotes) {
+ val = stripQuotes(val);
+ }
+ if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
+ if (typeof val === 'string')
+ val = val === 'true';
+ }
+ let value = Array.isArray(val)
+ ? val.map(function (v) { return maybeCoerceNumber(key, v); })
+ : maybeCoerceNumber(key, val);
+ if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
+ value = increment();
+ }
+ if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
+ if (Array.isArray(val))
+ value = val.map((val) => { return mixin.normalize(val); });
+ else
+ value = mixin.normalize(val);
+ }
+ return value;
+ }
+ function maybeCoerceNumber(key, value) {
+ if (!configuration['parse-positional-numbers'] && key === '_')
+ return value;
+ if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
+ const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`))));
+ if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) {
+ value = Number(value);
+ }
+ }
+ return value;
+ }
+ function setConfig(argv) {
+ const configLookup = Object.create(null);
+ applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
+ Object.keys(flags.configs).forEach(function (configKey) {
+ const configPath = argv[configKey] || configLookup[configKey];
+ if (configPath) {
+ try {
+ let config = null;
+ const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
+ const resolveConfig = flags.configs[configKey];
+ if (typeof resolveConfig === 'function') {
+ try {
+ config = resolveConfig(resolvedConfigPath);
+ }
+ catch (e) {
+ config = e;
+ }
+ if (config instanceof Error) {
+ error = config;
+ return;
+ }
+ }
+ else {
+ config = mixin.require(resolvedConfigPath);
+ }
+ setConfigObject(config);
+ }
+ catch (ex) {
+ if (ex.name === 'PermissionDenied')
+ error = ex;
+ else if (argv[configKey])
+ error = Error(__('Invalid JSON config file: %s', configPath));
+ }
+ }
+ });
+ }
+ function setConfigObject(config, prev) {
+ Object.keys(config).forEach(function (key) {
+ const value = config[key];
+ const fullKey = prev ? prev + '.' + key : key;
+ if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
+ setConfigObject(value, fullKey);
+ }
+ else {
+ if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) {
+ setArg(fullKey, value);
+ }
+ }
+ });
+ }
+ function setConfigObjects() {
+ if (typeof configObjects !== 'undefined') {
+ configObjects.forEach(function (configObject) {
+ setConfigObject(configObject);
+ });
+ }
+ }
+ function applyEnvVars(argv, configOnly) {
+ if (typeof envPrefix === 'undefined')
+ return;
+ const prefix = typeof envPrefix === 'string' ? envPrefix : '';
+ const env = mixin.env();
+ Object.keys(env).forEach(function (envVar) {
+ if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
+ const keys = envVar.split('__').map(function (key, i) {
+ if (i === 0) {
+ key = key.substring(prefix.length);
+ }
+ return camelCase(key);
+ });
+ if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) {
+ setArg(keys.join('.'), env[envVar]);
+ }
+ }
+ });
+ }
+ function applyCoercions(argv) {
+ let coerce;
+ const applied = new Set();
+ Object.keys(argv).forEach(function (key) {
+ if (!applied.has(key)) {
+ coerce = checkAllAliases(key, flags.coercions);
+ if (typeof coerce === 'function') {
+ try {
+ const value = maybeCoerceNumber(key, coerce(argv[key]));
+ ([].concat(flags.aliases[key] || [], key)).forEach(ali => {
+ applied.add(ali);
+ argv[ali] = value;
+ });
+ }
+ catch (err) {
+ error = err;
+ }
+ }
+ }
+ });
+ }
+ function setPlaceholderKeys(argv) {
+ flags.keys.forEach((key) => {
+ if (~key.indexOf('.'))
+ return;
+ if (typeof argv[key] === 'undefined')
+ argv[key] = undefined;
+ });
+ return argv;
+ }
+ function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {
+ Object.keys(defaults).forEach(function (key) {
+ if (!hasKey(obj, key.split('.'))) {
+ setKey(obj, key.split('.'), defaults[key]);
+ if (canLog)
+ defaulted[key] = true;
+ (aliases[key] || []).forEach(function (x) {
+ if (hasKey(obj, x.split('.')))
+ return;
+ setKey(obj, x.split('.'), defaults[key]);
+ });
+ }
+ });
+ }
+ function hasKey(obj, keys) {
+ let o = obj;
+ if (!configuration['dot-notation'])
+ keys = [keys.join('.')];
+ keys.slice(0, -1).forEach(function (key) {
+ o = (o[key] || {});
+ });
+ const key = keys[keys.length - 1];
+ if (typeof o !== 'object')
+ return false;
+ else
+ return key in o;
+ }
+ function setKey(obj, keys, value) {
+ let o = obj;
+ if (!configuration['dot-notation'])
+ keys = [keys.join('.')];
+ keys.slice(0, -1).forEach(function (key) {
+ key = sanitizeKey(key);
+ if (typeof o === 'object' && o[key] === undefined) {
+ o[key] = {};
+ }
+ if (typeof o[key] !== 'object' || Array.isArray(o[key])) {
+ if (Array.isArray(o[key])) {
+ o[key].push({});
+ }
+ else {
+ o[key] = [o[key], {}];
+ }
+ o = o[key][o[key].length - 1];
+ }
+ else {
+ o = o[key];
+ }
+ });
+ const key = sanitizeKey(keys[keys.length - 1]);
+ const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays);
+ const isValueArray = Array.isArray(value);
+ let duplicate = configuration['duplicate-arguments-array'];
+ if (!duplicate && checkAllAliases(key, flags.nargs)) {
+ duplicate = true;
+ if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) {
+ o[key] = undefined;
+ }
+ }
+ if (value === increment()) {
+ o[key] = increment(o[key]);
+ }
+ else if (Array.isArray(o[key])) {
+ if (duplicate && isTypeArray && isValueArray) {
+ o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
+ }
+ else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
+ o[key] = value;
+ }
+ else {
+ o[key] = o[key].concat([value]);
+ }
+ }
+ else if (o[key] === undefined && isTypeArray) {
+ o[key] = isValueArray ? value : [value];
+ }
+ else if (duplicate && !(o[key] === undefined ||
+ checkAllAliases(key, flags.counts) ||
+ checkAllAliases(key, flags.bools))) {
+ o[key] = [o[key], value];
+ }
+ else {
+ o[key] = value;
+ }
+ }
+ function extendAliases(...args) {
+ args.forEach(function (obj) {
+ Object.keys(obj || {}).forEach(function (key) {
+ if (flags.aliases[key])
+ return;
+ flags.aliases[key] = [].concat(aliases[key] || []);
+ flags.aliases[key].concat(key).forEach(function (x) {
+ if (/-/.test(x) && configuration['camel-case-expansion']) {
+ const c = camelCase(x);
+ if (c !== key && flags.aliases[key].indexOf(c) === -1) {
+ flags.aliases[key].push(c);
+ newAliases[c] = true;
+ }
+ }
+ });
+ flags.aliases[key].concat(key).forEach(function (x) {
+ if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {
+ const c = decamelize(x, '-');
+ if (c !== key && flags.aliases[key].indexOf(c) === -1) {
+ flags.aliases[key].push(c);
+ newAliases[c] = true;
+ }
+ }
+ });
+ flags.aliases[key].forEach(function (x) {
+ flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {
+ return x !== y;
+ }));
+ });
+ });
+ });
+ }
+ function checkAllAliases(key, flag) {
+ const toCheck = [].concat(flags.aliases[key] || [], key);
+ const keys = Object.keys(flag);
+ const setAlias = toCheck.find(key => keys.includes(key));
+ return setAlias ? flag[setAlias] : false;
+ }
+ function hasAnyFlag(key) {
+ const flagsKeys = Object.keys(flags);
+ const toCheck = [].concat(flagsKeys.map(k => flags[k]));
+ return toCheck.some(function (flag) {
+ return Array.isArray(flag) ? flag.includes(key) : flag[key];
+ });
+ }
+ function hasFlagsMatching(arg, ...patterns) {
+ const toCheck = [].concat(...patterns);
+ return toCheck.some(function (pattern) {
+ const match = arg.match(pattern);
+ return match && hasAnyFlag(match[1]);
+ });
+ }
+ function hasAllShortFlags(arg) {
+ if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
+ return false;
+ }
+ let hasAllFlags = true;
+ let next;
+ const letters = arg.slice(1).split('');
+ for (let j = 0; j < letters.length; j++) {
+ next = arg.slice(j + 2);
+ if (!hasAnyFlag(letters[j])) {
+ hasAllFlags = false;
+ break;
+ }
+ if ((letters[j + 1] && letters[j + 1] === '=') ||
+ next === '-' ||
+ (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) ||
+ (letters[j + 1] && letters[j + 1].match(/\W/))) {
+ break;
+ }
+ }
+ return hasAllFlags;
+ }
+ function isUnknownOptionAsArg(arg) {
+ return configuration['unknown-options-as-args'] && isUnknownOption(arg);
+ }
+ function isUnknownOption(arg) {
+ arg = arg.replace(/^-{3,}/, '--');
+ if (arg.match(negative)) {
+ return false;
+ }
+ if (hasAllShortFlags(arg)) {
+ return false;
+ }
+ const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
+ const normalFlag = /^-+([^=]+?)$/;
+ const flagEndingInHyphen = /^-+([^=]+?)-$/;
+ const flagEndingInDigits = /^-+([^=]+?\d+)$/;
+ const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
+ return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
+ }
+ function defaultValue(key) {
+ if (!checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts) &&
+ `${key}` in defaults) {
+ return defaults[key];
+ }
+ else {
+ return defaultForType(guessType(key));
+ }
+ }
+ function defaultForType(type) {
+ const def = {
+ [DefaultValuesForTypeKey.BOOLEAN]: true,
+ [DefaultValuesForTypeKey.STRING]: '',
+ [DefaultValuesForTypeKey.NUMBER]: undefined,
+ [DefaultValuesForTypeKey.ARRAY]: []
+ };
+ return def[type];
+ }
+ function guessType(key) {
+ let type = DefaultValuesForTypeKey.BOOLEAN;
+ if (checkAllAliases(key, flags.strings))
+ type = DefaultValuesForTypeKey.STRING;
+ else if (checkAllAliases(key, flags.numbers))
+ type = DefaultValuesForTypeKey.NUMBER;
+ else if (checkAllAliases(key, flags.bools))
+ type = DefaultValuesForTypeKey.BOOLEAN;
+ else if (checkAllAliases(key, flags.arrays))
+ type = DefaultValuesForTypeKey.ARRAY;
+ return type;
+ }
+ function isUndefined(num) {
+ return num === undefined;
+ }
+ function checkConfiguration() {
+ Object.keys(flags.counts).find(key => {
+ if (checkAllAliases(key, flags.arrays)) {
+ error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key));
+ return true;
+ }
+ else if (checkAllAliases(key, flags.nargs)) {
+ error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key));
+ return true;
+ }
+ return false;
+ });
+ }
+ return {
+ aliases: Object.assign({}, flags.aliases),
+ argv: Object.assign(argvReturn, argv),
+ configuration: configuration,
+ defaulted: Object.assign({}, defaulted),
+ error: error,
+ newAliases: Object.assign({}, newAliases)
+ };
+ }
+}
+function combineAliases(aliases) {
+ const aliasArrays = [];
+ const combined = Object.create(null);
+ let change = true;
+ Object.keys(aliases).forEach(function (key) {
+ aliasArrays.push([].concat(aliases[key], key));
+ });
+ while (change) {
+ change = false;
+ for (let i = 0; i < aliasArrays.length; i++) {
+ for (let ii = i + 1; ii < aliasArrays.length; ii++) {
+ const intersect = aliasArrays[i].filter(function (v) {
+ return aliasArrays[ii].indexOf(v) !== -1;
+ });
+ if (intersect.length) {
+ aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
+ aliasArrays.splice(ii, 1);
+ change = true;
+ break;
+ }
+ }
+ }
+ }
+ aliasArrays.forEach(function (aliasArray) {
+ aliasArray = aliasArray.filter(function (v, i, self) {
+ return self.indexOf(v) === i;
+ });
+ const lastAlias = aliasArray.pop();
+ if (lastAlias !== undefined && typeof lastAlias === 'string') {
+ combined[lastAlias] = aliasArray;
+ }
+ });
+ return combined;
+}
+function increment(orig) {
+ return orig !== undefined ? orig + 1 : 1;
+}
+function sanitizeKey(key) {
+ if (key === '__proto__')
+ return '___proto___';
+ return key;
+}
+function stripQuotes(val) {
+ return (typeof val === 'string' &&
+ (val[0] === "'" || val[0] === '"') &&
+ val[val.length - 1] === val[0])
+ ? val.substring(1, val.length - 1)
+ : val;
+}
+
+var _a, _b, _c;
+const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)
+ ? Number(process.env.YARGS_MIN_NODE_VERSION)
+ : 12;
+const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
+if (nodeVersion) {
+ const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
+ if (major < minNodeVersion) {
+ throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
+ }
+}
+const env = process ? process.env : {};
+const parser = new YargsParser({
+ cwd: process.cwd,
+ env: () => {
+ return env;
+ },
+ format: util.format,
+ normalize: path.normalize,
+ resolve: path.resolve,
+ require: (path) => {
+ if (typeof require !== 'undefined') {
+ return require(path);
+ }
+ else if (path.match(/\.json$/)) {
+ return JSON.parse(fs.readFileSync(path, 'utf8'));
+ }
+ else {
+ throw Error('only .json config files are supported in ESM');
+ }
+ }
+});
+const yargsParser = function Parser(args, opts) {
+ const result = parser.parse(args.slice(), opts);
+ return result.argv;
+};
+yargsParser.detailed = function (args, opts) {
+ return parser.parse(args.slice(), opts);
+};
+yargsParser.camelCase = camelCase;
+yargsParser.decamelize = decamelize;
+yargsParser.looksLikeNumber = looksLikeNumber;
+
+module.exports = yargsParser;
diff --git a/node_modules/yargs-parser/build/lib/index.js b/node_modules/yargs-parser/build/lib/index.js
new file mode 100644
index 0000000..43ef485
--- /dev/null
+++ b/node_modules/yargs-parser/build/lib/index.js
@@ -0,0 +1,62 @@
+/**
+ * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
+ * CJS and ESM environments.
+ *
+ * @license
+ * Copyright (c) 2016, Contributors
+ * SPDX-License-Identifier: ISC
+ */
+var _a, _b, _c;
+import { format } from 'util';
+import { normalize, resolve } from 'path';
+import { camelCase, decamelize, looksLikeNumber } from './string-utils.js';
+import { YargsParser } from './yargs-parser.js';
+import { readFileSync } from 'fs';
+// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our
+// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only.
+const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)
+ ? Number(process.env.YARGS_MIN_NODE_VERSION)
+ : 12;
+const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
+if (nodeVersion) {
+ const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
+ if (major < minNodeVersion) {
+ throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
+ }
+}
+// Creates a yargs-parser instance using Node.js standard libraries:
+const env = process ? process.env : {};
+const parser = new YargsParser({
+ cwd: process.cwd,
+ env: () => {
+ return env;
+ },
+ format,
+ normalize,
+ resolve,
+ // TODO: figure out a way to combine ESM and CJS coverage, such that
+ // we can exercise all the lines below:
+ require: (path) => {
+ if (typeof require !== 'undefined') {
+ return require(path);
+ }
+ else if (path.match(/\.json$/)) {
+ // Addresses: https://github.com/yargs/yargs/issues/2040
+ return JSON.parse(readFileSync(path, 'utf8'));
+ }
+ else {
+ throw Error('only .json config files are supported in ESM');
+ }
+ }
+});
+const yargsParser = function Parser(args, opts) {
+ const result = parser.parse(args.slice(), opts);
+ return result.argv;
+};
+yargsParser.detailed = function (args, opts) {
+ return parser.parse(args.slice(), opts);
+};
+yargsParser.camelCase = camelCase;
+yargsParser.decamelize = decamelize;
+yargsParser.looksLikeNumber = looksLikeNumber;
+export default yargsParser;
diff --git a/node_modules/yargs-parser/build/lib/string-utils.js b/node_modules/yargs-parser/build/lib/string-utils.js
new file mode 100644
index 0000000..4e8bd99
--- /dev/null
+++ b/node_modules/yargs-parser/build/lib/string-utils.js
@@ -0,0 +1,65 @@
+/**
+ * @license
+ * Copyright (c) 2016, Contributors
+ * SPDX-License-Identifier: ISC
+ */
+export function camelCase(str) {
+ // Handle the case where an argument is provided as camel case, e.g., fooBar.
+ // by ensuring that the string isn't already mixed case:
+ const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
+ if (!isCamelCase) {
+ str = str.toLowerCase();
+ }
+ if (str.indexOf('-') === -1 && str.indexOf('_') === -1) {
+ return str;
+ }
+ else {
+ let camelcase = '';
+ let nextChrUpper = false;
+ const leadingHyphens = str.match(/^-+/);
+ for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {
+ let chr = str.charAt(i);
+ if (nextChrUpper) {
+ nextChrUpper = false;
+ chr = chr.toUpperCase();
+ }
+ if (i !== 0 && (chr === '-' || chr === '_')) {
+ nextChrUpper = true;
+ }
+ else if (chr !== '-' && chr !== '_') {
+ camelcase += chr;
+ }
+ }
+ return camelcase;
+ }
+}
+export function decamelize(str, joinString) {
+ const lowercase = str.toLowerCase();
+ joinString = joinString || '-';
+ let notCamelcase = '';
+ for (let i = 0; i < str.length; i++) {
+ const chrLower = lowercase.charAt(i);
+ const chrString = str.charAt(i);
+ if (chrLower !== chrString && i > 0) {
+ notCamelcase += `${joinString}${lowercase.charAt(i)}`;
+ }
+ else {
+ notCamelcase += chrString;
+ }
+ }
+ return notCamelcase;
+}
+export function looksLikeNumber(x) {
+ if (x === null || x === undefined)
+ return false;
+ // if loaded from config, may already be a number.
+ if (typeof x === 'number')
+ return true;
+ // hexadecimal.
+ if (/^0x[0-9a-f]+$/i.test(x))
+ return true;
+ // don't treat 0123 as a number; as it drops the leading '0'.
+ if (/^0[^.]/.test(x))
+ return false;
+ return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
diff --git a/node_modules/yargs-parser/build/lib/tokenize-arg-string.js b/node_modules/yargs-parser/build/lib/tokenize-arg-string.js
new file mode 100644
index 0000000..5e732ef
--- /dev/null
+++ b/node_modules/yargs-parser/build/lib/tokenize-arg-string.js
@@ -0,0 +1,40 @@
+/**
+ * @license
+ * Copyright (c) 2016, Contributors
+ * SPDX-License-Identifier: ISC
+ */
+// take an un-split argv string and tokenize it.
+export function tokenizeArgString(argString) {
+ if (Array.isArray(argString)) {
+ return argString.map(e => typeof e !== 'string' ? e + '' : e);
+ }
+ argString = argString.trim();
+ let i = 0;
+ let prevC = null;
+ let c = null;
+ let opening = null;
+ const args = [];
+ for (let ii = 0; ii < argString.length; ii++) {
+ prevC = c;
+ c = argString.charAt(ii);
+ // split on spaces unless we're in quotes.
+ if (c === ' ' && !opening) {
+ if (!(prevC === ' ')) {
+ i++;
+ }
+ continue;
+ }
+ // don't split the string if we're in matching
+ // opening or closing single and double quotes.
+ if (c === opening) {
+ opening = null;
+ }
+ else if ((c === "'" || c === '"') && !opening) {
+ opening = c;
+ }
+ if (!args[i])
+ args[i] = '';
+ args[i] += c;
+ }
+ return args;
+}
diff --git a/node_modules/yargs-parser/build/lib/yargs-parser-types.js b/node_modules/yargs-parser/build/lib/yargs-parser-types.js
new file mode 100644
index 0000000..63b7c31
--- /dev/null
+++ b/node_modules/yargs-parser/build/lib/yargs-parser-types.js
@@ -0,0 +1,12 @@
+/**
+ * @license
+ * Copyright (c) 2016, Contributors
+ * SPDX-License-Identifier: ISC
+ */
+export var DefaultValuesForTypeKey;
+(function (DefaultValuesForTypeKey) {
+ DefaultValuesForTypeKey["BOOLEAN"] = "boolean";
+ DefaultValuesForTypeKey["STRING"] = "string";
+ DefaultValuesForTypeKey["NUMBER"] = "number";
+ DefaultValuesForTypeKey["ARRAY"] = "array";
+})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
diff --git a/node_modules/yargs-parser/build/lib/yargs-parser.js b/node_modules/yargs-parser/build/lib/yargs-parser.js
new file mode 100644
index 0000000..415d4bc
--- /dev/null
+++ b/node_modules/yargs-parser/build/lib/yargs-parser.js
@@ -0,0 +1,1045 @@
+/**
+ * @license
+ * Copyright (c) 2016, Contributors
+ * SPDX-License-Identifier: ISC
+ */
+import { tokenizeArgString } from './tokenize-arg-string.js';
+import { DefaultValuesForTypeKey } from './yargs-parser-types.js';
+import { camelCase, decamelize, looksLikeNumber } from './string-utils.js';
+let mixin;
+export class YargsParser {
+ constructor(_mixin) {
+ mixin = _mixin;
+ }
+ parse(argsInput, options) {
+ const opts = Object.assign({
+ alias: undefined,
+ array: undefined,
+ boolean: undefined,
+ config: undefined,
+ configObjects: undefined,
+ configuration: undefined,
+ coerce: undefined,
+ count: undefined,
+ default: undefined,
+ envPrefix: undefined,
+ narg: undefined,
+ normalize: undefined,
+ string: undefined,
+ number: undefined,
+ __: undefined,
+ key: undefined
+ }, options);
+ // allow a string argument to be passed in rather
+ // than an argv array.
+ const args = tokenizeArgString(argsInput);
+ // tokenizeArgString adds extra quotes to args if argsInput is a string
+ // only strip those extra quotes in processValue if argsInput is a string
+ const inputIsString = typeof argsInput === 'string';
+ // aliases might have transitive relationships, normalize this.
+ const aliases = combineAliases(Object.assign(Object.create(null), opts.alias));
+ const configuration = Object.assign({
+ 'boolean-negation': true,
+ 'camel-case-expansion': true,
+ 'combine-arrays': false,
+ 'dot-notation': true,
+ 'duplicate-arguments-array': true,
+ 'flatten-duplicate-arrays': true,
+ 'greedy-arrays': true,
+ 'halt-at-non-option': false,
+ 'nargs-eats-options': false,
+ 'negation-prefix': 'no-',
+ 'parse-numbers': true,
+ 'parse-positional-numbers': true,
+ 'populate--': false,
+ 'set-placeholder-key': false,
+ 'short-option-groups': true,
+ 'strip-aliased': false,
+ 'strip-dashed': false,
+ 'unknown-options-as-args': false
+ }, opts.configuration);
+ const defaults = Object.assign(Object.create(null), opts.default);
+ const configObjects = opts.configObjects || [];
+ const envPrefix = opts.envPrefix;
+ const notFlagsOption = configuration['populate--'];
+ const notFlagsArgv = notFlagsOption ? '--' : '_';
+ const newAliases = Object.create(null);
+ const defaulted = Object.create(null);
+ // allow a i18n handler to be passed in, default to a fake one (util.format).
+ const __ = opts.__ || mixin.format;
+ const flags = {
+ aliases: Object.create(null),
+ arrays: Object.create(null),
+ bools: Object.create(null),
+ strings: Object.create(null),
+ numbers: Object.create(null),
+ counts: Object.create(null),
+ normalize: Object.create(null),
+ configs: Object.create(null),
+ nargs: Object.create(null),
+ coercions: Object.create(null),
+ keys: []
+ };
+ const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
+ const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)');
+ [].concat(opts.array || []).filter(Boolean).forEach(function (opt) {
+ const key = typeof opt === 'object' ? opt.key : opt;
+ // assign to flags[bools|strings|numbers]
+ const assignment = Object.keys(opt).map(function (key) {
+ const arrayFlagKeys = {
+ boolean: 'bools',
+ string: 'strings',
+ number: 'numbers'
+ };
+ return arrayFlagKeys[key];
+ }).filter(Boolean).pop();
+ // assign key to be coerced
+ if (assignment) {
+ flags[assignment][key] = true;
+ }
+ flags.arrays[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.string || []).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.number || []).filter(Boolean).forEach(function (key) {
+ flags.numbers[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.count || []).filter(Boolean).forEach(function (key) {
+ flags.counts[key] = true;
+ flags.keys.push(key);
+ });
+ [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) {
+ flags.normalize[key] = true;
+ flags.keys.push(key);
+ });
+ if (typeof opts.narg === 'object') {
+ Object.entries(opts.narg).forEach(([key, value]) => {
+ if (typeof value === 'number') {
+ flags.nargs[key] = value;
+ flags.keys.push(key);
+ }
+ });
+ }
+ if (typeof opts.coerce === 'object') {
+ Object.entries(opts.coerce).forEach(([key, value]) => {
+ if (typeof value === 'function') {
+ flags.coercions[key] = value;
+ flags.keys.push(key);
+ }
+ });
+ }
+ if (typeof opts.config !== 'undefined') {
+ if (Array.isArray(opts.config) || typeof opts.config === 'string') {
+ ;
+ [].concat(opts.config).filter(Boolean).forEach(function (key) {
+ flags.configs[key] = true;
+ });
+ }
+ else if (typeof opts.config === 'object') {
+ Object.entries(opts.config).forEach(([key, value]) => {
+ if (typeof value === 'boolean' || typeof value === 'function') {
+ flags.configs[key] = value;
+ }
+ });
+ }
+ }
+ // create a lookup table that takes into account all
+ // combinations of aliases: {f: ['foo'], foo: ['f']}
+ extendAliases(opts.key, aliases, opts.default, flags.arrays);
+ // apply default values to all aliases.
+ Object.keys(defaults).forEach(function (key) {
+ (flags.aliases[key] || []).forEach(function (alias) {
+ defaults[alias] = defaults[key];
+ });
+ });
+ let error = null;
+ checkConfiguration();
+ let notFlags = [];
+ const argv = Object.assign(Object.create(null), { _: [] });
+ // TODO(bcoe): for the first pass at removing object prototype we didn't
+ // remove all prototypes from objects returned by this API, we might want
+ // to gradually move towards doing so.
+ const argvReturn = {};
+ for (let i = 0; i < args.length; i++) {
+ const arg = args[i];
+ const truncatedArg = arg.replace(/^-{3,}/, '---');
+ let broken;
+ let key;
+ let letters;
+ let m;
+ let next;
+ let value;
+ // any unknown option (except for end-of-options, "--")
+ if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
+ pushPositional(arg);
+ // ---, ---=, ----, etc,
+ }
+ else if (truncatedArg.match(/^---+(=|$)/)) {
+ // options without key name are invalid.
+ pushPositional(arg);
+ continue;
+ // -- separated by =
+ }
+ else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) {
+ // Using [\s\S] instead of . because js doesn't support the
+ // 'dotall' regex modifier. See:
+ // http://stackoverflow.com/a/1068308/13216
+ m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
+ // arrays format = '--f=a b c'
+ if (m !== null && Array.isArray(m) && m.length >= 3) {
+ if (checkAllAliases(m[1], flags.arrays)) {
+ i = eatArray(i, m[1], args, m[2]);
+ }
+ else if (checkAllAliases(m[1], flags.nargs) !== false) {
+ // nargs format = '--f=monkey washing cat'
+ i = eatNargs(i, m[1], args, m[2]);
+ }
+ else {
+ setArg(m[1], m[2], true);
+ }
+ }
+ }
+ else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {
+ m = arg.match(negatedBoolean);
+ if (m !== null && Array.isArray(m) && m.length >= 2) {
+ key = m[1];
+ setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
+ }
+ // -- separated by space.
+ }
+ else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) {
+ m = arg.match(/^--?(.+)/);
+ if (m !== null && Array.isArray(m) && m.length >= 2) {
+ key = m[1];
+ if (checkAllAliases(key, flags.arrays)) {
+ // array format = '--foo a b c'
+ i = eatArray(i, key, args);
+ }
+ else if (checkAllAliases(key, flags.nargs) !== false) {
+ // nargs format = '--foo a b c'
+ // should be truthy even if: flags.nargs[key] === 0
+ i = eatNargs(i, key, args);
+ }
+ else {
+ next = args[i + 1];
+ if (next !== undefined && (!next.match(/^-/) ||
+ next.match(negative)) &&
+ !checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts)) {
+ setArg(key, next);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next);
+ i++;
+ }
+ else {
+ setArg(key, defaultValue(key));
+ }
+ }
+ }
+ // dot-notation flag separated by '='.
+ }
+ else if (arg.match(/^-.\..+=/)) {
+ m = arg.match(/^-([^=]+)=([\s\S]*)$/);
+ if (m !== null && Array.isArray(m) && m.length >= 3) {
+ setArg(m[1], m[2]);
+ }
+ // dot-notation flag separated by space.
+ }
+ else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
+ next = args[i + 1];
+ m = arg.match(/^-(.\..+)/);
+ if (m !== null && Array.isArray(m) && m.length >= 2) {
+ key = m[1];
+ if (next !== undefined && !next.match(/^-/) &&
+ !checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts)) {
+ setArg(key, next);
+ i++;
+ }
+ else {
+ setArg(key, defaultValue(key));
+ }
+ }
+ }
+ else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
+ letters = arg.slice(1, -1).split('');
+ broken = false;
+ for (let j = 0; j < letters.length; j++) {
+ next = arg.slice(j + 2);
+ if (letters[j + 1] && letters[j + 1] === '=') {
+ value = arg.slice(j + 3);
+ key = letters[j];
+ if (checkAllAliases(key, flags.arrays)) {
+ // array format = '-f=a b c'
+ i = eatArray(i, key, args, value);
+ }
+ else if (checkAllAliases(key, flags.nargs) !== false) {
+ // nargs format = '-f=monkey washing cat'
+ i = eatNargs(i, key, args, value);
+ }
+ else {
+ setArg(key, value);
+ }
+ broken = true;
+ break;
+ }
+ if (next === '-') {
+ setArg(letters[j], next);
+ continue;
+ }
+ // current letter is an alphabetic character and next value is a number
+ if (/[A-Za-z]/.test(letters[j]) &&
+ /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) &&
+ checkAllAliases(next, flags.bools) === false) {
+ setArg(letters[j], next);
+ broken = true;
+ break;
+ }
+ if (letters[j + 1] && letters[j + 1].match(/\W/)) {
+ setArg(letters[j], next);
+ broken = true;
+ break;
+ }
+ else {
+ setArg(letters[j], defaultValue(letters[j]));
+ }
+ }
+ key = arg.slice(-1)[0];
+ if (!broken && key !== '-') {
+ if (checkAllAliases(key, flags.arrays)) {
+ // array format = '-f a b c'
+ i = eatArray(i, key, args);
+ }
+ else if (checkAllAliases(key, flags.nargs) !== false) {
+ // nargs format = '-f a b c'
+ // should be truthy even if: flags.nargs[key] === 0
+ i = eatNargs(i, key, args);
+ }
+ else {
+ next = args[i + 1];
+ if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||
+ next.match(negative)) &&
+ !checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts)) {
+ setArg(key, next);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next);
+ i++;
+ }
+ else {
+ setArg(key, defaultValue(key));
+ }
+ }
+ }
+ }
+ else if (arg.match(/^-[0-9]$/) &&
+ arg.match(negative) &&
+ checkAllAliases(arg.slice(1), flags.bools)) {
+ // single-digit boolean alias, e.g: xargs -0
+ key = arg.slice(1);
+ setArg(key, defaultValue(key));
+ }
+ else if (arg === '--') {
+ notFlags = args.slice(i + 1);
+ break;
+ }
+ else if (configuration['halt-at-non-option']) {
+ notFlags = args.slice(i);
+ break;
+ }
+ else {
+ pushPositional(arg);
+ }
+ }
+ // order of precedence:
+ // 1. command line arg
+ // 2. value from env var
+ // 3. value from config file
+ // 4. value from config objects
+ // 5. configured default value
+ applyEnvVars(argv, true); // special case: check env vars that point to config file
+ applyEnvVars(argv, false);
+ setConfig(argv);
+ setConfigObjects();
+ applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
+ applyCoercions(argv);
+ if (configuration['set-placeholder-key'])
+ setPlaceholderKeys(argv);
+ // for any counts either not in args or without an explicit default, set to 0
+ Object.keys(flags.counts).forEach(function (key) {
+ if (!hasKey(argv, key.split('.')))
+ setArg(key, 0);
+ });
+ // '--' defaults to undefined.
+ if (notFlagsOption && notFlags.length)
+ argv[notFlagsArgv] = [];
+ notFlags.forEach(function (key) {
+ argv[notFlagsArgv].push(key);
+ });
+ if (configuration['camel-case-expansion'] && configuration['strip-dashed']) {
+ Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => {
+ delete argv[key];
+ });
+ }
+ if (configuration['strip-aliased']) {
+ ;
+ [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => {
+ if (configuration['camel-case-expansion'] && alias.includes('-')) {
+ delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')];
+ }
+ delete argv[alias];
+ });
+ }
+ // Push argument into positional array, applying numeric coercion:
+ function pushPositional(arg) {
+ const maybeCoercedNumber = maybeCoerceNumber('_', arg);
+ if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') {
+ argv._.push(maybeCoercedNumber);
+ }
+ }
+ // how many arguments should we consume, based
+ // on the nargs option?
+ function eatNargs(i, key, args, argAfterEqualSign) {
+ let ii;
+ let toEat = checkAllAliases(key, flags.nargs);
+ // NaN has a special meaning for the array type, indicating that one or
+ // more values are expected.
+ toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat;
+ if (toEat === 0) {
+ if (!isUndefined(argAfterEqualSign)) {
+ error = Error(__('Argument unexpected for: %s', key));
+ }
+ setArg(key, defaultValue(key));
+ return i;
+ }
+ let available = isUndefined(argAfterEqualSign) ? 0 : 1;
+ if (configuration['nargs-eats-options']) {
+ // classic behavior, yargs eats positional and dash arguments.
+ if (args.length - (i + 1) + available < toEat) {
+ error = Error(__('Not enough arguments following: %s', key));
+ }
+ available = toEat;
+ }
+ else {
+ // nargs will not consume flag arguments, e.g., -abc, --foo,
+ // and terminates when one is observed.
+ for (ii = i + 1; ii < args.length; ii++) {
+ if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii]))
+ available++;
+ else
+ break;
+ }
+ if (available < toEat)
+ error = Error(__('Not enough arguments following: %s', key));
+ }
+ let consumed = Math.min(available, toEat);
+ if (!isUndefined(argAfterEqualSign) && consumed > 0) {
+ setArg(key, argAfterEqualSign);
+ consumed--;
+ }
+ for (ii = i + 1; ii < (consumed + i + 1); ii++) {
+ setArg(key, args[ii]);
+ }
+ return (i + consumed);
+ }
+ // if an option is an array, eat all non-hyphenated arguments
+ // following it... YUM!
+ // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"]
+ function eatArray(i, key, args, argAfterEqualSign) {
+ let argsToSet = [];
+ let next = argAfterEqualSign || args[i + 1];
+ // If both array and nargs are configured, enforce the nargs count:
+ const nargsCount = checkAllAliases(key, flags.nargs);
+ if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) {
+ argsToSet.push(true);
+ }
+ else if (isUndefined(next) ||
+ (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) {
+ // for keys without value ==> argsToSet remains an empty []
+ // set user default value, if available
+ if (defaults[key] !== undefined) {
+ const defVal = defaults[key];
+ argsToSet = Array.isArray(defVal) ? defVal : [defVal];
+ }
+ }
+ else {
+ // value in --option=value is eaten as is
+ if (!isUndefined(argAfterEqualSign)) {
+ argsToSet.push(processValue(key, argAfterEqualSign, true));
+ }
+ for (let ii = i + 1; ii < args.length; ii++) {
+ if ((!configuration['greedy-arrays'] && argsToSet.length > 0) ||
+ (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount))
+ break;
+ next = args[ii];
+ if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
+ break;
+ i = ii;
+ argsToSet.push(processValue(key, next, inputIsString));
+ }
+ }
+ // If both array and nargs are configured, create an error if less than
+ // nargs positionals were found. NaN has special meaning, indicating
+ // that at least one value is required (more are okay).
+ if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) ||
+ (isNaN(nargsCount) && argsToSet.length === 0))) {
+ error = Error(__('Not enough arguments following: %s', key));
+ }
+ setArg(key, argsToSet);
+ return i;
+ }
+ function setArg(key, val, shouldStripQuotes = inputIsString) {
+ if (/-/.test(key) && configuration['camel-case-expansion']) {
+ const alias = key.split('.').map(function (prop) {
+ return camelCase(prop);
+ }).join('.');
+ addNewAlias(key, alias);
+ }
+ const value = processValue(key, val, shouldStripQuotes);
+ const splitKey = key.split('.');
+ setKey(argv, splitKey, value);
+ // handle populating aliases of the full key
+ if (flags.aliases[key]) {
+ flags.aliases[key].forEach(function (x) {
+ const keyProperties = x.split('.');
+ setKey(argv, keyProperties, value);
+ });
+ }
+ // handle populating aliases of the first element of the dot-notation key
+ if (splitKey.length > 1 && configuration['dot-notation']) {
+ ;
+ (flags.aliases[splitKey[0]] || []).forEach(function (x) {
+ let keyProperties = x.split('.');
+ // expand alias with nested objects in key
+ const a = [].concat(splitKey);
+ a.shift(); // nuke the old key.
+ keyProperties = keyProperties.concat(a);
+ // populate alias only if is not already an alias of the full key
+ // (already populated above)
+ if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) {
+ setKey(argv, keyProperties, value);
+ }
+ });
+ }
+ // Set normalize getter and setter when key is in 'normalize' but isn't an array
+ if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
+ const keys = [key].concat(flags.aliases[key] || []);
+ keys.forEach(function (key) {
+ Object.defineProperty(argvReturn, key, {
+ enumerable: true,
+ get() {
+ return val;
+ },
+ set(value) {
+ val = typeof value === 'string' ? mixin.normalize(value) : value;
+ }
+ });
+ });
+ }
+ }
+ function addNewAlias(key, alias) {
+ if (!(flags.aliases[key] && flags.aliases[key].length)) {
+ flags.aliases[key] = [alias];
+ newAliases[alias] = true;
+ }
+ if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
+ addNewAlias(alias, key);
+ }
+ }
+ function processValue(key, val, shouldStripQuotes) {
+ // strings may be quoted, clean this up as we assign values.
+ if (shouldStripQuotes) {
+ val = stripQuotes(val);
+ }
+ // handle parsing boolean arguments --foo=true --bar false.
+ if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
+ if (typeof val === 'string')
+ val = val === 'true';
+ }
+ let value = Array.isArray(val)
+ ? val.map(function (v) { return maybeCoerceNumber(key, v); })
+ : maybeCoerceNumber(key, val);
+ // increment a count given as arg (either no value or value parsed as boolean)
+ if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
+ value = increment();
+ }
+ // Set normalized value when key is in 'normalize' and in 'arrays'
+ if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
+ if (Array.isArray(val))
+ value = val.map((val) => { return mixin.normalize(val); });
+ else
+ value = mixin.normalize(val);
+ }
+ return value;
+ }
+ function maybeCoerceNumber(key, value) {
+ if (!configuration['parse-positional-numbers'] && key === '_')
+ return value;
+ if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
+ const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`))));
+ if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) {
+ value = Number(value);
+ }
+ }
+ return value;
+ }
+ // set args from config.json file, this should be
+ // applied last so that defaults can be applied.
+ function setConfig(argv) {
+ const configLookup = Object.create(null);
+ // expand defaults/aliases, in-case any happen to reference
+ // the config.json file.
+ applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
+ Object.keys(flags.configs).forEach(function (configKey) {
+ const configPath = argv[configKey] || configLookup[configKey];
+ if (configPath) {
+ try {
+ let config = null;
+ const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
+ const resolveConfig = flags.configs[configKey];
+ if (typeof resolveConfig === 'function') {
+ try {
+ config = resolveConfig(resolvedConfigPath);
+ }
+ catch (e) {
+ config = e;
+ }
+ if (config instanceof Error) {
+ error = config;
+ return;
+ }
+ }
+ else {
+ config = mixin.require(resolvedConfigPath);
+ }
+ setConfigObject(config);
+ }
+ catch (ex) {
+ // Deno will receive a PermissionDenied error if an attempt is
+ // made to load config without the --allow-read flag:
+ if (ex.name === 'PermissionDenied')
+ error = ex;
+ else if (argv[configKey])
+ error = Error(__('Invalid JSON config file: %s', configPath));
+ }
+ }
+ });
+ }
+ // set args from config object.
+ // it recursively checks nested objects.
+ function setConfigObject(config, prev) {
+ Object.keys(config).forEach(function (key) {
+ const value = config[key];
+ const fullKey = prev ? prev + '.' + key : key;
+ // if the value is an inner object and we have dot-notation
+ // enabled, treat inner objects in config the same as
+ // heavily nested dot notations (foo.bar.apple).
+ if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
+ // if the value is an object but not an array, check nested object
+ setConfigObject(value, fullKey);
+ }
+ else {
+ // setting arguments via CLI takes precedence over
+ // values within the config file.
+ if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) {
+ setArg(fullKey, value);
+ }
+ }
+ });
+ }
+ // set all config objects passed in opts
+ function setConfigObjects() {
+ if (typeof configObjects !== 'undefined') {
+ configObjects.forEach(function (configObject) {
+ setConfigObject(configObject);
+ });
+ }
+ }
+ function applyEnvVars(argv, configOnly) {
+ if (typeof envPrefix === 'undefined')
+ return;
+ const prefix = typeof envPrefix === 'string' ? envPrefix : '';
+ const env = mixin.env();
+ Object.keys(env).forEach(function (envVar) {
+ if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
+ // get array of nested keys and convert them to camel case
+ const keys = envVar.split('__').map(function (key, i) {
+ if (i === 0) {
+ key = key.substring(prefix.length);
+ }
+ return camelCase(key);
+ });
+ if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) {
+ setArg(keys.join('.'), env[envVar]);
+ }
+ }
+ });
+ }
+ function applyCoercions(argv) {
+ let coerce;
+ const applied = new Set();
+ Object.keys(argv).forEach(function (key) {
+ if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases
+ coerce = checkAllAliases(key, flags.coercions);
+ if (typeof coerce === 'function') {
+ try {
+ const value = maybeCoerceNumber(key, coerce(argv[key]));
+ ([].concat(flags.aliases[key] || [], key)).forEach(ali => {
+ applied.add(ali);
+ argv[ali] = value;
+ });
+ }
+ catch (err) {
+ error = err;
+ }
+ }
+ }
+ });
+ }
+ function setPlaceholderKeys(argv) {
+ flags.keys.forEach((key) => {
+ // don't set placeholder keys for dot notation options 'foo.bar'.
+ if (~key.indexOf('.'))
+ return;
+ if (typeof argv[key] === 'undefined')
+ argv[key] = undefined;
+ });
+ return argv;
+ }
+ function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {
+ Object.keys(defaults).forEach(function (key) {
+ if (!hasKey(obj, key.split('.'))) {
+ setKey(obj, key.split('.'), defaults[key]);
+ if (canLog)
+ defaulted[key] = true;
+ (aliases[key] || []).forEach(function (x) {
+ if (hasKey(obj, x.split('.')))
+ return;
+ setKey(obj, x.split('.'), defaults[key]);
+ });
+ }
+ });
+ }
+ function hasKey(obj, keys) {
+ let o = obj;
+ if (!configuration['dot-notation'])
+ keys = [keys.join('.')];
+ keys.slice(0, -1).forEach(function (key) {
+ o = (o[key] || {});
+ });
+ const key = keys[keys.length - 1];
+ if (typeof o !== 'object')
+ return false;
+ else
+ return key in o;
+ }
+ function setKey(obj, keys, value) {
+ let o = obj;
+ if (!configuration['dot-notation'])
+ keys = [keys.join('.')];
+ keys.slice(0, -1).forEach(function (key) {
+ // TODO(bcoe): in the next major version of yargs, switch to
+ // Object.create(null) for dot notation:
+ key = sanitizeKey(key);
+ if (typeof o === 'object' && o[key] === undefined) {
+ o[key] = {};
+ }
+ if (typeof o[key] !== 'object' || Array.isArray(o[key])) {
+ // ensure that o[key] is an array, and that the last item is an empty object.
+ if (Array.isArray(o[key])) {
+ o[key].push({});
+ }
+ else {
+ o[key] = [o[key], {}];
+ }
+ // we want to update the empty object at the end of the o[key] array, so set o to that object
+ o = o[key][o[key].length - 1];
+ }
+ else {
+ o = o[key];
+ }
+ });
+ // TODO(bcoe): in the next major version of yargs, switch to
+ // Object.create(null) for dot notation:
+ const key = sanitizeKey(keys[keys.length - 1]);
+ const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays);
+ const isValueArray = Array.isArray(value);
+ let duplicate = configuration['duplicate-arguments-array'];
+ // nargs has higher priority than duplicate
+ if (!duplicate && checkAllAliases(key, flags.nargs)) {
+ duplicate = true;
+ if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) {
+ o[key] = undefined;
+ }
+ }
+ if (value === increment()) {
+ o[key] = increment(o[key]);
+ }
+ else if (Array.isArray(o[key])) {
+ if (duplicate && isTypeArray && isValueArray) {
+ o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
+ }
+ else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
+ o[key] = value;
+ }
+ else {
+ o[key] = o[key].concat([value]);
+ }
+ }
+ else if (o[key] === undefined && isTypeArray) {
+ o[key] = isValueArray ? value : [value];
+ }
+ else if (duplicate && !(o[key] === undefined ||
+ checkAllAliases(key, flags.counts) ||
+ checkAllAliases(key, flags.bools))) {
+ o[key] = [o[key], value];
+ }
+ else {
+ o[key] = value;
+ }
+ }
+ // extend the aliases list with inferred aliases.
+ function extendAliases(...args) {
+ args.forEach(function (obj) {
+ Object.keys(obj || {}).forEach(function (key) {
+ // short-circuit if we've already added a key
+ // to the aliases array, for example it might
+ // exist in both 'opts.default' and 'opts.key'.
+ if (flags.aliases[key])
+ return;
+ flags.aliases[key] = [].concat(aliases[key] || []);
+ // For "--option-name", also set argv.optionName
+ flags.aliases[key].concat(key).forEach(function (x) {
+ if (/-/.test(x) && configuration['camel-case-expansion']) {
+ const c = camelCase(x);
+ if (c !== key && flags.aliases[key].indexOf(c) === -1) {
+ flags.aliases[key].push(c);
+ newAliases[c] = true;
+ }
+ }
+ });
+ // For "--optionName", also set argv['option-name']
+ flags.aliases[key].concat(key).forEach(function (x) {
+ if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {
+ const c = decamelize(x, '-');
+ if (c !== key && flags.aliases[key].indexOf(c) === -1) {
+ flags.aliases[key].push(c);
+ newAliases[c] = true;
+ }
+ }
+ });
+ flags.aliases[key].forEach(function (x) {
+ flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {
+ return x !== y;
+ }));
+ });
+ });
+ });
+ }
+ function checkAllAliases(key, flag) {
+ const toCheck = [].concat(flags.aliases[key] || [], key);
+ const keys = Object.keys(flag);
+ const setAlias = toCheck.find(key => keys.includes(key));
+ return setAlias ? flag[setAlias] : false;
+ }
+ function hasAnyFlag(key) {
+ const flagsKeys = Object.keys(flags);
+ const toCheck = [].concat(flagsKeys.map(k => flags[k]));
+ return toCheck.some(function (flag) {
+ return Array.isArray(flag) ? flag.includes(key) : flag[key];
+ });
+ }
+ function hasFlagsMatching(arg, ...patterns) {
+ const toCheck = [].concat(...patterns);
+ return toCheck.some(function (pattern) {
+ const match = arg.match(pattern);
+ return match && hasAnyFlag(match[1]);
+ });
+ }
+ // based on a simplified version of the short flag group parsing logic
+ function hasAllShortFlags(arg) {
+ // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group
+ if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
+ return false;
+ }
+ let hasAllFlags = true;
+ let next;
+ const letters = arg.slice(1).split('');
+ for (let j = 0; j < letters.length; j++) {
+ next = arg.slice(j + 2);
+ if (!hasAnyFlag(letters[j])) {
+ hasAllFlags = false;
+ break;
+ }
+ if ((letters[j + 1] && letters[j + 1] === '=') ||
+ next === '-' ||
+ (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) ||
+ (letters[j + 1] && letters[j + 1].match(/\W/))) {
+ break;
+ }
+ }
+ return hasAllFlags;
+ }
+ function isUnknownOptionAsArg(arg) {
+ return configuration['unknown-options-as-args'] && isUnknownOption(arg);
+ }
+ function isUnknownOption(arg) {
+ arg = arg.replace(/^-{3,}/, '--');
+ // ignore negative numbers
+ if (arg.match(negative)) {
+ return false;
+ }
+ // if this is a short option group and all of them are configured, it isn't unknown
+ if (hasAllShortFlags(arg)) {
+ return false;
+ }
+ // e.g. '--count=2'
+ const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
+ // e.g. '-a' or '--arg'
+ const normalFlag = /^-+([^=]+?)$/;
+ // e.g. '-a-'
+ const flagEndingInHyphen = /^-+([^=]+?)-$/;
+ // e.g. '-abc123'
+ const flagEndingInDigits = /^-+([^=]+?\d+)$/;
+ // e.g. '-a/usr/local'
+ const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
+ // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method
+ return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
+ }
+ // make a best effort to pick a default value
+ // for an option based on name and type.
+ function defaultValue(key) {
+ if (!checkAllAliases(key, flags.bools) &&
+ !checkAllAliases(key, flags.counts) &&
+ `${key}` in defaults) {
+ return defaults[key];
+ }
+ else {
+ return defaultForType(guessType(key));
+ }
+ }
+ // return a default value, given the type of a flag.,
+ function defaultForType(type) {
+ const def = {
+ [DefaultValuesForTypeKey.BOOLEAN]: true,
+ [DefaultValuesForTypeKey.STRING]: '',
+ [DefaultValuesForTypeKey.NUMBER]: undefined,
+ [DefaultValuesForTypeKey.ARRAY]: []
+ };
+ return def[type];
+ }
+ // given a flag, enforce a default type.
+ function guessType(key) {
+ let type = DefaultValuesForTypeKey.BOOLEAN;
+ if (checkAllAliases(key, flags.strings))
+ type = DefaultValuesForTypeKey.STRING;
+ else if (checkAllAliases(key, flags.numbers))
+ type = DefaultValuesForTypeKey.NUMBER;
+ else if (checkAllAliases(key, flags.bools))
+ type = DefaultValuesForTypeKey.BOOLEAN;
+ else if (checkAllAliases(key, flags.arrays))
+ type = DefaultValuesForTypeKey.ARRAY;
+ return type;
+ }
+ function isUndefined(num) {
+ return num === undefined;
+ }
+ // check user configuration settings for inconsistencies
+ function checkConfiguration() {
+ // count keys should not be set as array/narg
+ Object.keys(flags.counts).find(key => {
+ if (checkAllAliases(key, flags.arrays)) {
+ error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key));
+ return true;
+ }
+ else if (checkAllAliases(key, flags.nargs)) {
+ error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key));
+ return true;
+ }
+ return false;
+ });
+ }
+ return {
+ aliases: Object.assign({}, flags.aliases),
+ argv: Object.assign(argvReturn, argv),
+ configuration: configuration,
+ defaulted: Object.assign({}, defaulted),
+ error: error,
+ newAliases: Object.assign({}, newAliases)
+ };
+ }
+}
+// if any aliases reference each other, we should
+// merge them together.
+function combineAliases(aliases) {
+ const aliasArrays = [];
+ const combined = Object.create(null);
+ let change = true;
+ // turn alias lookup hash {key: ['alias1', 'alias2']} into
+ // a simple array ['key', 'alias1', 'alias2']
+ Object.keys(aliases).forEach(function (key) {
+ aliasArrays.push([].concat(aliases[key], key));
+ });
+ // combine arrays until zero changes are
+ // made in an iteration.
+ while (change) {
+ change = false;
+ for (let i = 0; i < aliasArrays.length; i++) {
+ for (let ii = i + 1; ii < aliasArrays.length; ii++) {
+ const intersect = aliasArrays[i].filter(function (v) {
+ return aliasArrays[ii].indexOf(v) !== -1;
+ });
+ if (intersect.length) {
+ aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
+ aliasArrays.splice(ii, 1);
+ change = true;
+ break;
+ }
+ }
+ }
+ }
+ // map arrays back to the hash-lookup (de-dupe while
+ // we're at it).
+ aliasArrays.forEach(function (aliasArray) {
+ aliasArray = aliasArray.filter(function (v, i, self) {
+ return self.indexOf(v) === i;
+ });
+ const lastAlias = aliasArray.pop();
+ if (lastAlias !== undefined && typeof lastAlias === 'string') {
+ combined[lastAlias] = aliasArray;
+ }
+ });
+ return combined;
+}
+// this function should only be called when a count is given as an arg
+// it is NOT called to set a default value
+// thus we can start the count at 1 instead of 0
+function increment(orig) {
+ return orig !== undefined ? orig + 1 : 1;
+}
+// TODO(bcoe): in the next major version of yargs, switch to
+// Object.create(null) for dot notation:
+function sanitizeKey(key) {
+ if (key === '__proto__')
+ return '___proto___';
+ return key;
+}
+function stripQuotes(val) {
+ return (typeof val === 'string' &&
+ (val[0] === "'" || val[0] === '"') &&
+ val[val.length - 1] === val[0])
+ ? val.substring(1, val.length - 1)
+ : val;
+}
diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json
new file mode 100644
index 0000000..decd0c3
--- /dev/null
+++ b/node_modules/yargs-parser/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "yargs-parser",
+ "version": "21.1.1",
+ "description": "the mighty option parser used by yargs",
+ "main": "build/index.cjs",
+ "exports": {
+ ".": [
+ {
+ "import": "./build/lib/index.js",
+ "require": "./build/index.cjs"
+ },
+ "./build/index.cjs"
+ ],
+ "./browser": [
+ "./browser.js"
+ ]
+ },
+ "type": "module",
+ "module": "./build/lib/index.js",
+ "scripts": {
+ "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'",
+ "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'",
+ "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
+ "test": "c8 --reporter=text --reporter=html mocha test/*.cjs",
+ "test:esm": "c8 --reporter=text --reporter=html mocha test/*.mjs",
+ "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'",
+ "pretest:typescript": "npm run pretest",
+ "test:typescript": "c8 mocha ./build/test/typescript/*.js",
+ "coverage": "c8 report --check-coverage",
+ "precompile": "rimraf build",
+ "compile": "tsc",
+ "postcompile": "npm run build:cjs",
+ "build:cjs": "rollup -c",
+ "prepare": "npm run compile"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/yargs/yargs-parser.git"
+ },
+ "keywords": [
+ "argument",
+ "parser",
+ "yargs",
+ "command",
+ "cli",
+ "parsing",
+ "option",
+ "args",
+ "argument"
+ ],
+ "author": "Ben Coe <ben@npmjs.com>",
+ "license": "ISC",
+ "devDependencies": {
+ "@types/chai": "^4.2.11",
+ "@types/mocha": "^9.0.0",
+ "@types/node": "^16.11.4",
+ "@typescript-eslint/eslint-plugin": "^3.10.1",
+ "@typescript-eslint/parser": "^3.10.1",
+ "c8": "^7.3.0",
+ "chai": "^4.2.0",
+ "cross-env": "^7.0.2",
+ "eslint": "^7.0.0",
+ "eslint-plugin-import": "^2.20.1",
+ "eslint-plugin-node": "^11.0.0",
+ "gts": "^3.0.0",
+ "mocha": "^10.0.0",
+ "puppeteer": "^16.0.0",
+ "rimraf": "^3.0.2",
+ "rollup": "^2.22.1",
+ "rollup-plugin-cleanup": "^3.1.1",
+ "rollup-plugin-ts": "^3.0.2",
+ "serve": "^14.0.0",
+ "standardx": "^7.0.0",
+ "start-server-and-test": "^1.11.2",
+ "ts-transform-default-export": "^1.0.2",
+ "typescript": "^4.0.0"
+ },
+ "files": [
+ "browser.js",
+ "build",
+ "!*.d.ts",
+ "!*.d.cts"
+ ],
+ "engines": {
+ "node": ">=12"
+ },
+ "standardx": {
+ "ignore": [
+ "build"
+ ]
+ }
+}
diff --git a/node_modules/yauzl/LICENSE b/node_modules/yauzl/LICENSE
new file mode 100644
index 0000000..37538d4
--- /dev/null
+++ b/node_modules/yauzl/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Josh Wolfe
+
+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/yauzl/README.md b/node_modules/yauzl/README.md
new file mode 100644
index 0000000..d4e53f4
--- /dev/null
+++ b/node_modules/yauzl/README.md
@@ -0,0 +1,658 @@
+# yauzl
+
+[![Build Status](https://travis-ci.org/thejoshwolfe/yauzl.svg?branch=master)](https://travis-ci.org/thejoshwolfe/yauzl)
+[![Coverage Status](https://img.shields.io/coveralls/thejoshwolfe/yauzl.svg)](https://coveralls.io/r/thejoshwolfe/yauzl)
+
+yet another unzip library for node. For zipping, see
+[yazl](https://github.com/thejoshwolfe/yazl).
+
+Design principles:
+
+ * Follow the spec.
+ Don't scan for local file headers.
+ Read the central directory for file metadata.
+ (see [No Streaming Unzip API](#no-streaming-unzip-api)).
+ * Don't block the JavaScript thread.
+ Use and provide async APIs.
+ * Keep memory usage under control.
+ Don't attempt to buffer entire files in RAM at once.
+ * Never crash (if used properly).
+ Don't let malformed zip files bring down client applications who are trying to catch errors.
+ * Catch unsafe file names.
+ See `validateFileName()`.
+
+## Usage
+
+```js
+var yauzl = require("yauzl");
+
+yauzl.open("path/to/file.zip", {lazyEntries: true}, function(err, zipfile) {
+ if (err) throw err;
+ zipfile.readEntry();
+ zipfile.on("entry", function(entry) {
+ if (/\/$/.test(entry.fileName)) {
+ // Directory file names end with '/'.
+ // Note that entires for directories themselves are optional.
+ // An entry's fileName implicitly requires its parent directories to exist.
+ zipfile.readEntry();
+ } else {
+ // file entry
+ zipfile.openReadStream(entry, function(err, readStream) {
+ if (err) throw err;
+ readStream.on("end", function() {
+ zipfile.readEntry();
+ });
+ readStream.pipe(somewhere);
+ });
+ }
+ });
+});
+```
+
+See also `examples/` for more usage examples.
+
+## API
+
+The default for every optional `callback` parameter is:
+
+```js
+function defaultCallback(err) {
+ if (err) throw err;
+}
+```
+
+### open(path, [options], [callback])
+
+Calls `fs.open(path, "r")` and reads the `fd` effectively the same as `fromFd()` would.
+
+`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
+
+`autoClose` is effectively equivalent to:
+
+```js
+zipfile.once("end", function() {
+ zipfile.close();
+});
+```
+
+`lazyEntries` indicates that entries should be read only when `readEntry()` is called.
+If `lazyEntries` is `false`, `entry` events will be emitted as fast as possible to allow `pipe()`ing
+file data from all entries in parallel.
+This is not recommended, as it can lead to out of control memory usage for zip files with many entries.
+See [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22).
+If `lazyEntries` is `true`, an `entry` or `end` event will be emitted in response to each call to `readEntry()`.
+This allows processing of one entry at a time, and will keep memory usage under control for zip files with many entries.
+
+`decodeStrings` is the default and causes yauzl to decode strings with `CP437` or `UTF-8` as required by the spec.
+The exact effects of turning this option off are:
+
+* `zipfile.comment`, `entry.fileName`, and `entry.fileComment` will be `Buffer` objects instead of `String`s.
+* Any Info-ZIP Unicode Path Extra Field will be ignored. See `extraFields`.
+* Automatic file name validation will not be performed. See `validateFileName()`.
+
+`validateEntrySizes` is the default and ensures that an entry's reported uncompressed size matches its actual uncompressed size.
+This check happens as early as possible, which is either before emitting each `"entry"` event (for entries with no compression),
+or during the `readStream` piping after calling `openReadStream()`.
+See `openReadStream()` for more information on defending against zip bomb attacks.
+
+When `strictFileNames` is `false` (the default) and `decodeStrings` is `true`,
+all backslash (`\`) characters in each `entry.fileName` are replaced with forward slashes (`/`).
+The spec forbids file names with backslashes,
+but Microsoft's `System.IO.Compression.ZipFile` class in .NET versions 4.5.0 until 4.6.1
+creates non-conformant zipfiles with backslashes in file names.
+`strictFileNames` is `false` by default so that clients can read these
+non-conformant zipfiles without knowing about this Microsoft-specific bug.
+When `strictFileNames` is `true` and `decodeStrings` is `true`,
+entries with backslashes in their file names will result in an error. See `validateFileName()`.
+When `decodeStrings` is `false`, `strictFileNames` has no effect.
+
+The `callback` is given the arguments `(err, zipfile)`.
+An `err` is provided if the End of Central Directory Record cannot be found, or if its metadata appears malformed.
+This kind of error usually indicates that this is not a zip file.
+Otherwise, `zipfile` is an instance of `ZipFile`.
+
+### fromFd(fd, [options], [callback])
+
+Reads from the fd, which is presumed to be an open .zip file.
+Note that random access is required by the zip file specification,
+so the fd cannot be an open socket or any other fd that does not support random access.
+
+`options` may be omitted or `null`. The defaults are `{autoClose: false, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
+
+See `open()` for the meaning of the options and callback.
+
+### fromBuffer(buffer, [options], [callback])
+
+Like `fromFd()`, but reads from a RAM buffer instead of an open file.
+`buffer` is a `Buffer`.
+
+If a `ZipFile` is acquired from this method,
+it will never emit the `close` event,
+and calling `close()` is not necessary.
+
+`options` may be omitted or `null`. The defaults are `{lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
+
+See `open()` for the meaning of the options and callback.
+The `autoClose` option is ignored for this method.
+
+### fromRandomAccessReader(reader, totalSize, [options], [callback])
+
+This method of reading a zip file allows clients to implement their own back-end file system.
+For example, a client might translate read calls into network requests.
+
+The `reader` parameter must be of a type that is a subclass of
+[RandomAccessReader](#class-randomaccessreader) that implements the required methods.
+The `totalSize` is a Number and indicates the total file size of the zip file.
+
+`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
+
+See `open()` for the meaning of the options and callback.
+
+### dosDateTimeToDate(date, time)
+
+Converts MS-DOS `date` and `time` data into a JavaScript `Date` object.
+Each parameter is a `Number` treated as an unsigned 16-bit integer.
+Note that this format does not support timezones,
+so the returned object will use the local timezone.
+
+### validateFileName(fileName)
+
+Returns `null` or a `String` error message depending on the validity of `fileName`.
+If `fileName` starts with `"/"` or `/[A-Za-z]:\//` or if it contains `".."` path segments or `"\\"`,
+this function returns an error message appropriate for use like this:
+
+```js
+var errorMessage = yauzl.validateFileName(fileName);
+if (errorMessage != null) throw new Error(errorMessage);
+```
+
+This function is automatically run for each entry, as long as `decodeStrings` is `true`.
+See `open()`, `strictFileNames`, and `Event: "entry"` for more information.
+
+### Class: ZipFile
+
+The constructor for the class is not part of the public API.
+Use `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` instead.
+
+#### Event: "entry"
+
+Callback gets `(entry)`, which is an `Entry`.
+See `open()` and `readEntry()` for when this event is emitted.
+
+If `decodeStrings` is `true`, entries emitted via this event have already passed file name validation.
+See `validateFileName()` and `open()` for more information.
+
+If `validateEntrySizes` is `true` and this entry's `compressionMethod` is `0` (stored without compression),
+this entry has already passed entry size validation.
+See `open()` for more information.
+
+#### Event: "end"
+
+Emitted after the last `entry` event has been emitted.
+See `open()` and `readEntry()` for more info on when this event is emitted.
+
+#### Event: "close"
+
+Emitted after the fd is actually closed.
+This is after calling `close()` (or after the `end` event when `autoClose` is `true`),
+and after all stream pipelines created from `openReadStream()` have finished reading data from the fd.
+
+If this `ZipFile` was acquired from `fromRandomAccessReader()`,
+the "fd" in the previous paragraph refers to the `RandomAccessReader` implemented by the client.
+
+If this `ZipFile` was acquired from `fromBuffer()`, this event is never emitted.
+
+#### Event: "error"
+
+Emitted in the case of errors with reading the zip file.
+(Note that other errors can be emitted from the streams created from `openReadStream()` as well.)
+After this event has been emitted, no further `entry`, `end`, or `error` events will be emitted,
+but the `close` event may still be emitted.
+
+#### readEntry()
+
+Causes this `ZipFile` to emit an `entry` or `end` event (or an `error` event).
+This method must only be called when this `ZipFile` was created with the `lazyEntries` option set to `true` (see `open()`).
+When this `ZipFile` was created with the `lazyEntries` option set to `true`,
+`entry` and `end` events are only ever emitted in response to this method call.
+
+The event that is emitted in response to this method will not be emitted until after this method has returned,
+so it is safe to call this method before attaching event listeners.
+
+After calling this method, calling this method again before the response event has been emitted will cause undefined behavior.
+Calling this method after the `end` event has been emitted will cause undefined behavior.
+Calling this method after calling `close()` will cause undefined behavior.
+
+#### openReadStream(entry, [options], callback)
+
+`entry` must be an `Entry` object from this `ZipFile`.
+`callback` gets `(err, readStream)`, where `readStream` is a `Readable Stream` that provides the file data for this entry.
+If this zipfile is already closed (see `close()`), the `callback` will receive an `err`.
+
+`options` may be omitted or `null`, and has the following defaults:
+
+```js
+{
+ decompress: entry.isCompressed() ? true : null,
+ decrypt: null,
+ start: 0, // actually the default is null, see below
+ end: entry.compressedSize, // actually the default is null, see below
+}
+```
+
+If the entry is compressed (with a supported compression method),
+and the `decompress` option is `true` (or omitted),
+the read stream provides the decompressed data.
+Omitting the `decompress` option is what most clients should do.
+
+The `decompress` option must be `null` (or omitted) when the entry is not compressed (see `isCompressed()`),
+and either `true` (or omitted) or `false` when the entry is compressed.
+Specifying `decompress: false` for a compressed entry causes the read stream
+to provide the raw compressed file data without going through a zlib inflate transform.
+
+If the entry is encrypted (see `isEncrypted()`), clients may want to avoid calling `openReadStream()` on the entry entirely.
+Alternatively, clients may call `openReadStream()` for encrypted entries and specify `decrypt: false`.
+If the entry is also compressed, clients must *also* specify `decompress: false`.
+Specifying `decrypt: false` for an encrypted entry causes the read stream to provide the raw, still-encrypted file data.
+(This data includes the 12-byte header described in the spec.)
+
+The `decrypt` option must be `null` (or omitted) for non-encrypted entries, and `false` for encrypted entries.
+Omitting the `decrypt` option (or specifying it as `null`) for an encrypted entry
+will result in the `callback` receiving an `err`.
+This default behavior is so that clients not accounting for encrypted files aren't surprised by bogus file data.
+
+The `start` (inclusive) and `end` (exclusive) options are byte offsets into this entry's file data,
+and can be used to obtain part of an entry's file data rather than the whole thing.
+If either of these options are specified and non-`null`,
+then the above options must be used to obain the file's raw data.
+Speficying `{start: 0, end: entry.compressedSize}` will result in the complete file,
+which is effectively the default values for these options,
+but note that unlike omitting the options, when you specify `start` or `end` as any non-`null` value,
+the above requirement is still enforced that you must also pass the appropriate options to get the file's raw data.
+
+It's possible for the `readStream` provided to the `callback` to emit errors for several reasons.
+For example, if zlib cannot decompress the data, the zlib error will be emitted from the `readStream`.
+Two more error cases (when `validateEntrySizes` is `true`) are if the decompressed data has too many
+or too few actual bytes compared to the reported byte count from the entry's `uncompressedSize` field.
+yauzl notices this false information and emits an error from the `readStream`
+after some number of bytes have already been piped through the stream.
+
+This check allows clients to trust the `uncompressedSize` field in `Entry` objects.
+Guarding against [zip bomb](http://en.wikipedia.org/wiki/Zip_bomb) attacks can be accomplished by
+doing some heuristic checks on the size metadata and then watching out for the above errors.
+Such heuristics are outside the scope of this library,
+but enforcing the `uncompressedSize` is implemented here as a security feature.
+
+It is possible to destroy the `readStream` before it has piped all of its data.
+To do this, call `readStream.destroy()`.
+You must `unpipe()` the `readStream` from any destination before calling `readStream.destroy()`.
+If this zipfile was created using `fromRandomAccessReader()`, the `RandomAccessReader` implementation
+must provide readable streams that implement a `.destroy()` method (see `randomAccessReader._readStreamForRange()`)
+in order for calls to `readStream.destroy()` to work in this context.
+
+#### close()
+
+Causes all future calls to `openReadStream()` to fail,
+and closes the fd, if any, after all streams created by `openReadStream()` have emitted their `end` events.
+
+If the `autoClose` option is set to `true` (see `open()`),
+this function will be called automatically effectively in response to this object's `end` event.
+
+If the `lazyEntries` option is set to `false` (see `open()`) and this object's `end` event has not been emitted yet,
+this function causes undefined behavior.
+If the `lazyEntries` option is set to `true`,
+you can call this function instead of calling `readEntry()` to abort reading the entries of a zipfile.
+
+It is safe to call this function multiple times; after the first call, successive calls have no effect.
+This includes situations where the `autoClose` option effectively calls this function for you.
+
+If `close()` is never called, then the zipfile is "kept open".
+For zipfiles created with `fromFd()`, this will leave the `fd` open, which may be desirable.
+For zipfiles created with `open()`, this will leave the underlying `fd` open, thereby "leaking" it, which is probably undesirable.
+For zipfiles created with `fromRandomAccessReader()`, the reader's `close()` method will never be called.
+For zipfiles created with `fromBuffer()`, the `close()` function has no effect whether called or not.
+
+Regardless of how this `ZipFile` was created, there are no resources other than those listed above that require cleanup from this function.
+This means it may be desirable to never call `close()` in some usecases.
+
+#### isOpen
+
+`Boolean`. `true` until `close()` is called; then it's `false`.
+
+#### entryCount
+
+`Number`. Total number of central directory records.
+
+#### comment
+
+`String`. Always decoded with `CP437` per the spec.
+
+If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`.
+
+### Class: Entry
+
+Objects of this class represent Central Directory Records.
+Refer to the zipfile specification for more details about these fields.
+
+These fields are of type `Number`:
+
+ * `versionMadeBy`
+ * `versionNeededToExtract`
+ * `generalPurposeBitFlag`
+ * `compressionMethod`
+ * `lastModFileTime` (MS-DOS format, see `getLastModDateTime`)
+ * `lastModFileDate` (MS-DOS format, see `getLastModDateTime`)
+ * `crc32`
+ * `compressedSize`
+ * `uncompressedSize`
+ * `fileNameLength` (bytes)
+ * `extraFieldLength` (bytes)
+ * `fileCommentLength` (bytes)
+ * `internalFileAttributes`
+ * `externalFileAttributes`
+ * `relativeOffsetOfLocalHeader`
+
+#### fileName
+
+`String`.
+Following the spec, the bytes for the file name are decoded with
+`UTF-8` if `generalPurposeBitFlag & 0x800`, otherwise with `CP437`.
+Alternatively, this field may be populated from the Info-ZIP Unicode Path Extra Field
+(see `extraFields`).
+
+This field is automatically validated by `validateFileName()` before yauzl emits an "entry" event.
+If this field would contain unsafe characters, yauzl emits an error instead of an entry.
+
+If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`.
+Therefore, `generalPurposeBitFlag` and any Info-ZIP Unicode Path Extra Field are ignored.
+Furthermore, no automatic file name validation is performed for this file name.
+
+#### extraFields
+
+`Array` with each entry in the form `{id: id, data: data}`,
+where `id` is a `Number` and `data` is a `Buffer`.
+
+This library looks for and reads the ZIP64 Extended Information Extra Field (0x0001)
+in order to support ZIP64 format zip files.
+
+This library also looks for and reads the Info-ZIP Unicode Path Extra Field (0x7075)
+in order to support some zipfiles that use it instead of General Purpose Bit 11
+to convey `UTF-8` file names.
+When the field is identified and verified to be reliable (see the zipfile spec),
+the the file name in this field is stored in the `fileName` property,
+and the file name in the central directory record for this entry is ignored.
+Note that when `decodeStrings` is false, all Info-ZIP Unicode Path Extra Fields are ignored.
+
+None of the other fields are considered significant by this library.
+Fields that this library reads are left unalterned in the `extraFields` array.
+
+#### fileComment
+
+`String` decoded with the charset indicated by `generalPurposeBitFlag & 0x800` as with the `fileName`.
+(The Info-ZIP Unicode Path Extra Field has no effect on the charset used for this field.)
+
+If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`.
+
+Prior to yauzl version 2.7.0, this field was erroneously documented as `comment` instead of `fileComment`.
+For compatibility with any code that uses the field name `comment`,
+yauzl creates an alias field named `comment` which is identical to `fileComment`.
+
+#### getLastModDate()
+
+Effectively implemented as:
+
+```js
+return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime);
+```
+
+#### isEncrypted()
+
+Returns is this entry encrypted with "Traditional Encryption".
+Effectively implemented as:
+
+```js
+return (this.generalPurposeBitFlag & 0x1) !== 0;
+```
+
+See `openReadStream()` for the implications of this value.
+
+Note that "Strong Encryption" is not supported, and will result in an `"error"` event emitted from the `ZipFile`.
+
+#### isCompressed()
+
+Effectively implemented as:
+
+```js
+return this.compressionMethod === 8;
+```
+
+See `openReadStream()` for the implications of this value.
+
+### Class: RandomAccessReader
+
+This class is meant to be subclassed by clients and instantiated for the `fromRandomAccessReader()` function.
+
+An example implementation can be found in `test/test.js`.
+
+#### randomAccessReader._readStreamForRange(start, end)
+
+Subclasses *must* implement this method.
+
+`start` and `end` are Numbers and indicate byte offsets from the start of the file.
+`end` is exclusive, so `_readStreamForRange(0x1000, 0x2000)` would indicate to read `0x1000` bytes.
+`end - start` will always be at least `1`.
+
+This method should return a readable stream which will be `pipe()`ed into another stream.
+It is expected that the readable stream will provide data in several chunks if necessary.
+If the readable stream provides too many or too few bytes, an error will be emitted.
+(Note that `validateEntrySizes` has no effect on this check,
+because this is a low-level API that should behave correctly regardless of the contents of the file.)
+Any errors emitted on the readable stream will be handled and re-emitted on the client-visible stream
+(returned from `zipfile.openReadStream()`) or provided as the `err` argument to the appropriate callback
+(for example, for `fromRandomAccessReader()`).
+
+The returned stream *must* implement a method `.destroy()`
+if you call `readStream.destroy()` on streams you get from `openReadStream()`.
+If you never call `readStream.destroy()`, then streams returned from this method do not need to implement a method `.destroy()`.
+`.destroy()` should abort any streaming that is in progress and clean up any associated resources.
+`.destroy()` will only be called after the stream has been `unpipe()`d from its destination.
+
+Note that the stream returned from this method might not be the same object that is provided by `openReadStream()`.
+The stream returned from this method might be `pipe()`d through one or more filter streams (for example, a zlib inflate stream).
+
+#### randomAccessReader.read(buffer, offset, length, position, callback)
+
+Subclasses may implement this method.
+The default implementation uses `createReadStream()` to fill the `buffer`.
+
+This method should behave like `fs.read()`.
+
+#### randomAccessReader.close(callback)
+
+Subclasses may implement this method.
+The default implementation is effectively `setImmediate(callback);`.
+
+`callback` takes parameters `(err)`.
+
+This method is called once the all streams returned from `_readStreamForRange()` have ended,
+and no more `_readStreamForRange()` or `read()` requests will be issued to this object.
+
+## How to Avoid Crashing
+
+When a malformed zipfile is encountered, the default behavior is to crash (throw an exception).
+If you want to handle errors more gracefully than this,
+be sure to do the following:
+
+ * Provide `callback` parameters where they are allowed, and check the `err` parameter.
+ * Attach a listener for the `error` event on any `ZipFile` object you get from `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()`.
+ * Attach a listener for the `error` event on any stream you get from `openReadStream()`.
+
+Minor version updates to yauzl will not add any additional requirements to this list.
+
+## Limitations
+
+### No Streaming Unzip API
+
+Due to the design of the .zip file format, it's impossible to interpret a .zip file from start to finish
+(such as from a readable stream) without sacrificing correctness.
+The Central Directory, which is the authority on the contents of the .zip file, is at the end of a .zip file, not the beginning.
+A streaming API would need to either buffer the entire .zip file to get to the Central Directory before interpreting anything
+(defeating the purpose of a streaming interface), or rely on the Local File Headers which are interspersed through the .zip file.
+However, the Local File Headers are explicitly denounced in the spec as being unreliable copies of the Central Directory,
+so trusting them would be a violation of the spec.
+
+Any library that offers a streaming unzip API must make one of the above two compromises,
+which makes the library either dishonest or nonconformant (usually the latter).
+This library insists on correctness and adherence to the spec, and so does not offer a streaming API.
+
+Here is a way to create a spec-conformant .zip file using the `zip` command line program (Info-ZIP)
+available in most unix-like environments, that is (nearly) impossible to parse correctly with a streaming parser:
+
+```
+$ echo -ne '\x50\x4b\x07\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > file.txt
+$ zip -q0 - file.txt | cat > out.zip
+```
+
+This .zip file contains a single file entry that uses General Purpose Bit 3,
+which means the Local File Header doesn't know the size of the file.
+Any streaming parser that encounters this situation will either immediately fail,
+or attempt to search for the Data Descriptor after the file's contents.
+The file's contents is a sequence of 16-bytes crafted to exactly mimic a valid Data Descriptor for an empty file,
+which will fool any parser that gets this far into thinking that the file is empty rather than containing 16-bytes.
+What follows the file's real contents is the file's real Data Descriptor,
+which will likely cause some kind of signature mismatch error for a streaming parser (if one hasn't occurred already).
+
+By using General Purpose Bit 3 (and compression method 0),
+it's possible to create arbitrarily ambiguous .zip files that
+distract parsers with file contents that contain apparently valid .zip file metadata.
+
+### Limitted ZIP64 Support
+
+For ZIP64, only zip files smaller than `8PiB` are supported,
+not the full `16EiB` range that a 64-bit integer should be able to index.
+This is due to the JavaScript Number type being an IEEE 754 double precision float.
+
+The Node.js `fs` module probably has this same limitation.
+
+### ZIP64 Extensible Data Sector Is Ignored
+
+The spec does not allow zip file creators to put arbitrary data here,
+but rather reserves its use for PKWARE and mentions something about Z390.
+This doesn't seem useful to expose in this library, so it is ignored.
+
+### No Multi-Disk Archive Support
+
+This library does not support multi-disk zip files.
+The multi-disk fields in the zipfile spec were intended for a zip file to span multiple floppy disks,
+which probably never happens now.
+If the "number of this disk" field in the End of Central Directory Record is not `0`,
+the `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` `callback` will receive an `err`.
+By extension the following zip file fields are ignored by this library and not provided to clients:
+
+ * Disk where central directory starts
+ * Number of central directory records on this disk
+ * Disk number where file starts
+
+### Limited Encryption Handling
+
+You can detect when a file entry is encrypted with "Traditional Encryption" via `isEncrypted()`,
+but yauzl will not help you decrypt it.
+See `openReadStream()`.
+
+If a zip file contains file entries encrypted with "Strong Encryption", yauzl emits an error.
+
+If the central directory is encrypted or compressed, yauzl emits an error.
+
+### Local File Headers Are Ignored
+
+Many unzip libraries mistakenly read the Local File Header data in zip files.
+This data is officially defined to be redundant with the Central Directory information,
+and is not to be trusted.
+Aside from checking the signature, yauzl ignores the content of the Local File Header.
+
+### No CRC-32 Checking
+
+This library provides the `crc32` field of `Entry` objects read from the Central Directory.
+However, this field is not used for anything in this library.
+
+### versionNeededToExtract Is Ignored
+
+The field `versionNeededToExtract` is ignored,
+because this library doesn't support the complete zip file spec at any version,
+
+### No Support For Obscure Compression Methods
+
+Regarding the `compressionMethod` field of `Entry` objects,
+only method `0` (stored with no compression)
+and method `8` (deflated) are supported.
+Any of the other 15 official methods will cause the `openReadStream()` `callback` to receive an `err`.
+
+### Data Descriptors Are Ignored
+
+There may or may not be Data Descriptor sections in a zip file.
+This library provides no support for finding or interpreting them.
+
+### Archive Extra Data Record Is Ignored
+
+There may or may not be an Archive Extra Data Record section in a zip file.
+This library provides no support for finding or interpreting it.
+
+### No Language Encoding Flag Support
+
+Zip files officially support charset encodings other than CP437 and UTF-8,
+but the zip file spec does not specify how it works.
+This library makes no attempt to interpret the Language Encoding Flag.
+
+## Change History
+
+ * 2.10.0
+ * Added support for non-conformant zipfiles created by Microsoft, and added option `strictFileNames` to disable the workaround. [issue #66](https://github.com/thejoshwolfe/yauzl/issues/66), [issue #88](https://github.com/thejoshwolfe/yauzl/issues/88)
+ * 2.9.2
+ * Removed `tools/hexdump-zip.js` and `tools/hex2bin.js`. Those tools are now located here: [thejoshwolfe/hexdump-zip](https://github.com/thejoshwolfe/hexdump-zip) and [thejoshwolfe/hex2bin](https://github.com/thejoshwolfe/hex2bin)
+ * Worked around performance problem with zlib when using `fromBuffer()` and `readStream.destroy()` for large compressed files. [issue #87](https://github.com/thejoshwolfe/yauzl/issues/87)
+ * 2.9.1
+ * Removed `console.log()` accidentally introduced in 2.9.0. [issue #64](https://github.com/thejoshwolfe/yauzl/issues/64)
+ * 2.9.0
+ * Throw an exception if `readEntry()` is called without `lazyEntries:true`. Previously this caused undefined behavior. [issue #63](https://github.com/thejoshwolfe/yauzl/issues/63)
+ * 2.8.0
+ * Added option `validateEntrySizes`. [issue #53](https://github.com/thejoshwolfe/yauzl/issues/53)
+ * Added `examples/promises.js`
+ * Added ability to read raw file data via `decompress` and `decrypt` options. [issue #11](https://github.com/thejoshwolfe/yauzl/issues/11), [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38), [pull #39](https://github.com/thejoshwolfe/yauzl/pull/39)
+ * Added `start` and `end` options to `openReadStream()`. [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38)
+ * 2.7.0
+ * Added option `decodeStrings`. [issue #42](https://github.com/thejoshwolfe/yauzl/issues/42)
+ * Fixed documentation for `entry.fileComment` and added compatibility alias. [issue #47](https://github.com/thejoshwolfe/yauzl/issues/47)
+ * 2.6.0
+ * Support Info-ZIP Unicode Path Extra Field, used by WinRAR for Chinese file names. [issue #33](https://github.com/thejoshwolfe/yauzl/issues/33)
+ * 2.5.0
+ * Ignore malformed Extra Field that is common in Android .apk files. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31)
+ * 2.4.3
+ * Fix crash when parsing malformed Extra Field buffers. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31)
+ * 2.4.2
+ * Remove .npmignore and .travis.yml from npm package.
+ * 2.4.1
+ * Fix error handling.
+ * 2.4.0
+ * Add ZIP64 support. [issue #6](https://github.com/thejoshwolfe/yauzl/issues/6)
+ * Add `lazyEntries` option. [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22)
+ * Add `readStream.destroy()` method. [issue #26](https://github.com/thejoshwolfe/yauzl/issues/26)
+ * Add `fromRandomAccessReader()`. [issue #14](https://github.com/thejoshwolfe/yauzl/issues/14)
+ * Add `examples/unzip.js`.
+ * 2.3.1
+ * Documentation updates.
+ * 2.3.0
+ * Check that `uncompressedSize` is correct, or else emit an error. [issue #13](https://github.com/thejoshwolfe/yauzl/issues/13)
+ * 2.2.1
+ * Update dependencies.
+ * 2.2.0
+ * Update dependencies.
+ * 2.1.0
+ * Remove dependency on `iconv`.
+ * 2.0.3
+ * Fix crash when trying to read a 0-byte file.
+ * 2.0.2
+ * Fix event behavior after errors.
+ * 2.0.1
+ * Fix bug with using `iconv`.
+ * 2.0.0
+ * Initial release.
diff --git a/node_modules/yauzl/index.js b/node_modules/yauzl/index.js
new file mode 100644
index 0000000..cf5d70d
--- /dev/null
+++ b/node_modules/yauzl/index.js
@@ -0,0 +1,796 @@
+var fs = require("fs");
+var zlib = require("zlib");
+var fd_slicer = require("fd-slicer");
+var crc32 = require("buffer-crc32");
+var util = require("util");
+var EventEmitter = require("events").EventEmitter;
+var Transform = require("stream").Transform;
+var PassThrough = require("stream").PassThrough;
+var Writable = require("stream").Writable;
+
+exports.open = open;
+exports.fromFd = fromFd;
+exports.fromBuffer = fromBuffer;
+exports.fromRandomAccessReader = fromRandomAccessReader;
+exports.dosDateTimeToDate = dosDateTimeToDate;
+exports.validateFileName = validateFileName;
+exports.ZipFile = ZipFile;
+exports.Entry = Entry;
+exports.RandomAccessReader = RandomAccessReader;
+
+function open(path, options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = null;
+ }
+ if (options == null) options = {};
+ if (options.autoClose == null) options.autoClose = true;
+ if (options.lazyEntries == null) options.lazyEntries = false;
+ if (options.decodeStrings == null) options.decodeStrings = true;
+ if (options.validateEntrySizes == null) options.validateEntrySizes = true;
+ if (options.strictFileNames == null) options.strictFileNames = false;
+ if (callback == null) callback = defaultCallback;
+ fs.open(path, "r", function(err, fd) {
+ if (err) return callback(err);
+ fromFd(fd, options, function(err, zipfile) {
+ if (err) fs.close(fd, defaultCallback);
+ callback(err, zipfile);
+ });
+ });
+}
+
+function fromFd(fd, options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = null;
+ }
+ if (options == null) options = {};
+ if (options.autoClose == null) options.autoClose = false;
+ if (options.lazyEntries == null) options.lazyEntries = false;
+ if (options.decodeStrings == null) options.decodeStrings = true;
+ if (options.validateEntrySizes == null) options.validateEntrySizes = true;
+ if (options.strictFileNames == null) options.strictFileNames = false;
+ if (callback == null) callback = defaultCallback;
+ fs.fstat(fd, function(err, stats) {
+ if (err) return callback(err);
+ var reader = fd_slicer.createFromFd(fd, {autoClose: true});
+ fromRandomAccessReader(reader, stats.size, options, callback);
+ });
+}
+
+function fromBuffer(buffer, options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = null;
+ }
+ if (options == null) options = {};
+ options.autoClose = false;
+ if (options.lazyEntries == null) options.lazyEntries = false;
+ if (options.decodeStrings == null) options.decodeStrings = true;
+ if (options.validateEntrySizes == null) options.validateEntrySizes = true;
+ if (options.strictFileNames == null) options.strictFileNames = false;
+ // limit the max chunk size. see https://github.com/thejoshwolfe/yauzl/issues/87
+ var reader = fd_slicer.createFromBuffer(buffer, {maxChunkSize: 0x10000});
+ fromRandomAccessReader(reader, buffer.length, options, callback);
+}
+
+function fromRandomAccessReader(reader, totalSize, options, callback) {
+ if (typeof options === "function") {
+ callback = options;
+ options = null;
+ }
+ if (options == null) options = {};
+ if (options.autoClose == null) options.autoClose = true;
+ if (options.lazyEntries == null) options.lazyEntries = false;
+ if (options.decodeStrings == null) options.decodeStrings = true;
+ var decodeStrings = !!options.decodeStrings;
+ if (options.validateEntrySizes == null) options.validateEntrySizes = true;
+ if (options.strictFileNames == null) options.strictFileNames = false;
+ if (callback == null) callback = defaultCallback;
+ if (typeof totalSize !== "number") throw new Error("expected totalSize parameter to be a number");
+ if (totalSize > Number.MAX_SAFE_INTEGER) {
+ throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");
+ }
+
+ // the matching unref() call is in zipfile.close()
+ reader.ref();
+
+ // eocdr means End of Central Directory Record.
+ // search backwards for the eocdr signature.
+ // the last field of the eocdr is a variable-length comment.
+ // the comment size is encoded in a 2-byte field in the eocdr, which we can't find without trudging backwards through the comment to find it.
+ // as a consequence of this design decision, it's possible to have ambiguous zip file metadata if a coherent eocdr was in the comment.
+ // we search backwards for a eocdr signature, and hope that whoever made the zip file was smart enough to forbid the eocdr signature in the comment.
+ var eocdrWithoutCommentSize = 22;
+ var maxCommentSize = 0xffff; // 2-byte size
+ var bufferSize = Math.min(eocdrWithoutCommentSize + maxCommentSize, totalSize);
+ var buffer = newBuffer(bufferSize);
+ var bufferReadStart = totalSize - buffer.length;
+ readAndAssertNoEof(reader, buffer, 0, bufferSize, bufferReadStart, function(err) {
+ if (err) return callback(err);
+ for (var i = bufferSize - eocdrWithoutCommentSize; i >= 0; i -= 1) {
+ if (buffer.readUInt32LE(i) !== 0x06054b50) continue;
+ // found eocdr
+ var eocdrBuffer = buffer.slice(i);
+
+ // 0 - End of central directory signature = 0x06054b50
+ // 4 - Number of this disk
+ var diskNumber = eocdrBuffer.readUInt16LE(4);
+ if (diskNumber !== 0) {
+ return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber));
+ }
+ // 6 - Disk where central directory starts
+ // 8 - Number of central directory records on this disk
+ // 10 - Total number of central directory records
+ var entryCount = eocdrBuffer.readUInt16LE(10);
+ // 12 - Size of central directory (bytes)
+ // 16 - Offset of start of central directory, relative to start of archive
+ var centralDirectoryOffset = eocdrBuffer.readUInt32LE(16);
+ // 20 - Comment length
+ var commentLength = eocdrBuffer.readUInt16LE(20);
+ var expectedCommentLength = eocdrBuffer.length - eocdrWithoutCommentSize;
+ if (commentLength !== expectedCommentLength) {
+ return callback(new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength));
+ }
+ // 22 - Comment
+ // the encoding is always cp437.
+ var comment = decodeStrings ? decodeBuffer(eocdrBuffer, 22, eocdrBuffer.length, false)
+ : eocdrBuffer.slice(22);
+
+ if (!(entryCount === 0xffff || centralDirectoryOffset === 0xffffffff)) {
+ return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
+ }
+
+ // ZIP64 format
+
+ // ZIP64 Zip64 end of central directory locator
+ var zip64EocdlBuffer = newBuffer(20);
+ var zip64EocdlOffset = bufferReadStart + i - zip64EocdlBuffer.length;
+ readAndAssertNoEof(reader, zip64EocdlBuffer, 0, zip64EocdlBuffer.length, zip64EocdlOffset, function(err) {
+ if (err) return callback(err);
+
+ // 0 - zip64 end of central dir locator signature = 0x07064b50
+ if (zip64EocdlBuffer.readUInt32LE(0) !== 0x07064b50) {
+ return callback(new Error("invalid zip64 end of central directory locator signature"));
+ }
+ // 4 - number of the disk with the start of the zip64 end of central directory
+ // 8 - relative offset of the zip64 end of central directory record
+ var zip64EocdrOffset = readUInt64LE(zip64EocdlBuffer, 8);
+ // 16 - total number of disks
+
+ // ZIP64 end of central directory record
+ var zip64EocdrBuffer = newBuffer(56);
+ readAndAssertNoEof(reader, zip64EocdrBuffer, 0, zip64EocdrBuffer.length, zip64EocdrOffset, function(err) {
+ if (err) return callback(err);
+
+ // 0 - zip64 end of central dir signature 4 bytes (0x06064b50)
+ if (zip64EocdrBuffer.readUInt32LE(0) !== 0x06064b50) {
+ return callback(new Error("invalid zip64 end of central directory record signature"));
+ }
+ // 4 - size of zip64 end of central directory record 8 bytes
+ // 12 - version made by 2 bytes
+ // 14 - version needed to extract 2 bytes
+ // 16 - number of this disk 4 bytes
+ // 20 - number of the disk with the start of the central directory 4 bytes
+ // 24 - total number of entries in the central directory on this disk 8 bytes
+ // 32 - total number of entries in the central directory 8 bytes
+ entryCount = readUInt64LE(zip64EocdrBuffer, 32);
+ // 40 - size of the central directory 8 bytes
+ // 48 - offset of start of central directory with respect to the starting disk number 8 bytes
+ centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48);
+ // 56 - zip64 extensible data sector (variable size)
+ return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
+ });
+ });
+ return;
+ }
+ callback(new Error("end of central directory record signature not found"));
+ });
+}
+
+util.inherits(ZipFile, EventEmitter);
+function ZipFile(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) {
+ var self = this;
+ EventEmitter.call(self);
+ self.reader = reader;
+ // forward close events
+ self.reader.on("error", function(err) {
+ // error closing the fd
+ emitError(self, err);
+ });
+ self.reader.once("close", function() {
+ self.emit("close");
+ });
+ self.readEntryCursor = centralDirectoryOffset;
+ self.fileSize = fileSize;
+ self.entryCount = entryCount;
+ self.comment = comment;
+ self.entriesRead = 0;
+ self.autoClose = !!autoClose;
+ self.lazyEntries = !!lazyEntries;
+ self.decodeStrings = !!decodeStrings;
+ self.validateEntrySizes = !!validateEntrySizes;
+ self.strictFileNames = !!strictFileNames;
+ self.isOpen = true;
+ self.emittedError = false;
+
+ if (!self.lazyEntries) self._readEntry();
+}
+ZipFile.prototype.close = function() {
+ if (!this.isOpen) return;
+ this.isOpen = false;
+ this.reader.unref();
+};
+
+function emitErrorAndAutoClose(self, err) {
+ if (self.autoClose) self.close();
+ emitError(self, err);
+}
+function emitError(self, err) {
+ if (self.emittedError) return;
+ self.emittedError = true;
+ self.emit("error", err);
+}
+
+ZipFile.prototype.readEntry = function() {
+ if (!this.lazyEntries) throw new Error("readEntry() called without lazyEntries:true");
+ this._readEntry();
+};
+ZipFile.prototype._readEntry = function() {
+ var self = this;
+ if (self.entryCount === self.entriesRead) {
+ // done with metadata
+ setImmediate(function() {
+ if (self.autoClose) self.close();
+ if (self.emittedError) return;
+ self.emit("end");
+ });
+ return;
+ }
+ if (self.emittedError) return;
+ var buffer = newBuffer(46);
+ readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err) {
+ if (err) return emitErrorAndAutoClose(self, err);
+ if (self.emittedError) return;
+ var entry = new Entry();
+ // 0 - Central directory file header signature
+ var signature = buffer.readUInt32LE(0);
+ if (signature !== 0x02014b50) return emitErrorAndAutoClose(self, new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
+ // 4 - Version made by
+ entry.versionMadeBy = buffer.readUInt16LE(4);
+ // 6 - Version needed to extract (minimum)
+ entry.versionNeededToExtract = buffer.readUInt16LE(6);
+ // 8 - General purpose bit flag
+ entry.generalPurposeBitFlag = buffer.readUInt16LE(8);
+ // 10 - Compression method
+ entry.compressionMethod = buffer.readUInt16LE(10);
+ // 12 - File last modification time
+ entry.lastModFileTime = buffer.readUInt16LE(12);
+ // 14 - File last modification date
+ entry.lastModFileDate = buffer.readUInt16LE(14);
+ // 16 - CRC-32
+ entry.crc32 = buffer.readUInt32LE(16);
+ // 20 - Compressed size
+ entry.compressedSize = buffer.readUInt32LE(20);
+ // 24 - Uncompressed size
+ entry.uncompressedSize = buffer.readUInt32LE(24);
+ // 28 - File name length (n)
+ entry.fileNameLength = buffer.readUInt16LE(28);
+ // 30 - Extra field length (m)
+ entry.extraFieldLength = buffer.readUInt16LE(30);
+ // 32 - File comment length (k)
+ entry.fileCommentLength = buffer.readUInt16LE(32);
+ // 34 - Disk number where file starts
+ // 36 - Internal file attributes
+ entry.internalFileAttributes = buffer.readUInt16LE(36);
+ // 38 - External file attributes
+ entry.externalFileAttributes = buffer.readUInt32LE(38);
+ // 42 - Relative offset of local file header
+ entry.relativeOffsetOfLocalHeader = buffer.readUInt32LE(42);
+
+ if (entry.generalPurposeBitFlag & 0x40) return emitErrorAndAutoClose(self, new Error("strong encryption is not supported"));
+
+ self.readEntryCursor += 46;
+
+ buffer = newBuffer(entry.fileNameLength + entry.extraFieldLength + entry.fileCommentLength);
+ readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err) {
+ if (err) return emitErrorAndAutoClose(self, err);
+ if (self.emittedError) return;
+ // 46 - File name
+ var isUtf8 = (entry.generalPurposeBitFlag & 0x800) !== 0;
+ entry.fileName = self.decodeStrings ? decodeBuffer(buffer, 0, entry.fileNameLength, isUtf8)
+ : buffer.slice(0, entry.fileNameLength);
+
+ // 46+n - Extra field
+ var fileCommentStart = entry.fileNameLength + entry.extraFieldLength;
+ var extraFieldBuffer = buffer.slice(entry.fileNameLength, fileCommentStart);
+ entry.extraFields = [];
+ var i = 0;
+ while (i < extraFieldBuffer.length - 3) {
+ var headerId = extraFieldBuffer.readUInt16LE(i + 0);
+ var dataSize = extraFieldBuffer.readUInt16LE(i + 2);
+ var dataStart = i + 4;
+ var dataEnd = dataStart + dataSize;
+ if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self, new Error("extra field length exceeds extra field buffer size"));
+ var dataBuffer = newBuffer(dataSize);
+ extraFieldBuffer.copy(dataBuffer, 0, dataStart, dataEnd);
+ entry.extraFields.push({
+ id: headerId,
+ data: dataBuffer,
+ });
+ i = dataEnd;
+ }
+
+ // 46+n+m - File comment
+ entry.fileComment = self.decodeStrings ? decodeBuffer(buffer, fileCommentStart, fileCommentStart + entry.fileCommentLength, isUtf8)
+ : buffer.slice(fileCommentStart, fileCommentStart + entry.fileCommentLength);
+ // compatibility hack for https://github.com/thejoshwolfe/yauzl/issues/47
+ entry.comment = entry.fileComment;
+
+ self.readEntryCursor += buffer.length;
+ self.entriesRead += 1;
+
+ if (entry.uncompressedSize === 0xffffffff ||
+ entry.compressedSize === 0xffffffff ||
+ entry.relativeOffsetOfLocalHeader === 0xffffffff) {
+ // ZIP64 format
+ // find the Zip64 Extended Information Extra Field
+ var zip64EiefBuffer = null;
+ for (var i = 0; i < entry.extraFields.length; i++) {
+ var extraField = entry.extraFields[i];
+ if (extraField.id === 0x0001) {
+ zip64EiefBuffer = extraField.data;
+ break;
+ }
+ }
+ if (zip64EiefBuffer == null) {
+ return emitErrorAndAutoClose(self, new Error("expected zip64 extended information extra field"));
+ }
+ var index = 0;
+ // 0 - Original Size 8 bytes
+ if (entry.uncompressedSize === 0xffffffff) {
+ if (index + 8 > zip64EiefBuffer.length) {
+ return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include uncompressed size"));
+ }
+ entry.uncompressedSize = readUInt64LE(zip64EiefBuffer, index);
+ index += 8;
+ }
+ // 8 - Compressed Size 8 bytes
+ if (entry.compressedSize === 0xffffffff) {
+ if (index + 8 > zip64EiefBuffer.length) {
+ return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include compressed size"));
+ }
+ entry.compressedSize = readUInt64LE(zip64EiefBuffer, index);
+ index += 8;
+ }
+ // 16 - Relative Header Offset 8 bytes
+ if (entry.relativeOffsetOfLocalHeader === 0xffffffff) {
+ if (index + 8 > zip64EiefBuffer.length) {
+ return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include relative header offset"));
+ }
+ entry.relativeOffsetOfLocalHeader = readUInt64LE(zip64EiefBuffer, index);
+ index += 8;
+ }
+ // 24 - Disk Start Number 4 bytes
+ }
+
+ // check for Info-ZIP Unicode Path Extra Field (0x7075)
+ // see https://github.com/thejoshwolfe/yauzl/issues/33
+ if (self.decodeStrings) {
+ for (var i = 0; i < entry.extraFields.length; i++) {
+ var extraField = entry.extraFields[i];
+ if (extraField.id === 0x7075) {
+ if (extraField.data.length < 6) {
+ // too short to be meaningful
+ continue;
+ }
+ // Version 1 byte version of this extra field, currently 1
+ if (extraField.data.readUInt8(0) !== 1) {
+ // > Changes may not be backward compatible so this extra
+ // > field should not be used if the version is not recognized.
+ continue;
+ }
+ // NameCRC32 4 bytes File Name Field CRC32 Checksum
+ var oldNameCrc32 = extraField.data.readUInt32LE(1);
+ if (crc32.unsigned(buffer.slice(0, entry.fileNameLength)) !== oldNameCrc32) {
+ // > If the CRC check fails, this UTF-8 Path Extra Field should be
+ // > ignored and the File Name field in the header should be used instead.
+ continue;
+ }
+ // UnicodeName Variable UTF-8 version of the entry File Name
+ entry.fileName = decodeBuffer(extraField.data, 5, extraField.data.length, true);
+ break;
+ }
+ }
+ }
+
+ // validate file size
+ if (self.validateEntrySizes && entry.compressionMethod === 0) {
+ var expectedCompressedSize = entry.uncompressedSize;
+ if (entry.isEncrypted()) {
+ // traditional encryption prefixes the file data with a header
+ expectedCompressedSize += 12;
+ }
+ if (entry.compressedSize !== expectedCompressedSize) {
+ var msg = "compressed/uncompressed size mismatch for stored file: " + entry.compressedSize + " != " + entry.uncompressedSize;
+ return emitErrorAndAutoClose(self, new Error(msg));
+ }
+ }
+
+ if (self.decodeStrings) {
+ if (!self.strictFileNames) {
+ // allow backslash
+ entry.fileName = entry.fileName.replace(/\\/g, "/");
+ }
+ var errorMessage = validateFileName(entry.fileName, self.validateFileNameOptions);
+ if (errorMessage != null) return emitErrorAndAutoClose(self, new Error(errorMessage));
+ }
+ self.emit("entry", entry);
+
+ if (!self.lazyEntries) self._readEntry();
+ });
+ });
+};
+
+ZipFile.prototype.openReadStream = function(entry, options, callback) {
+ var self = this;
+ // parameter validation
+ var relativeStart = 0;
+ var relativeEnd = entry.compressedSize;
+ if (callback == null) {
+ callback = options;
+ options = {};
+ } else {
+ // validate options that the caller has no excuse to get wrong
+ if (options.decrypt != null) {
+ if (!entry.isEncrypted()) {
+ throw new Error("options.decrypt can only be specified for encrypted entries");
+ }
+ if (options.decrypt !== false) throw new Error("invalid options.decrypt value: " + options.decrypt);
+ if (entry.isCompressed()) {
+ if (options.decompress !== false) throw new Error("entry is encrypted and compressed, and options.decompress !== false");
+ }
+ }
+ if (options.decompress != null) {
+ if (!entry.isCompressed()) {
+ throw new Error("options.decompress can only be specified for compressed entries");
+ }
+ if (!(options.decompress === false || options.decompress === true)) {
+ throw new Error("invalid options.decompress value: " + options.decompress);
+ }
+ }
+ if (options.start != null || options.end != null) {
+ if (entry.isCompressed() && options.decompress !== false) {
+ throw new Error("start/end range not allowed for compressed entry without options.decompress === false");
+ }
+ if (entry.isEncrypted() && options.decrypt !== false) {
+ throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false");
+ }
+ }
+ if (options.start != null) {
+ relativeStart = options.start;
+ if (relativeStart < 0) throw new Error("options.start < 0");
+ if (relativeStart > entry.compressedSize) throw new Error("options.start > entry.compressedSize");
+ }
+ if (options.end != null) {
+ relativeEnd = options.end;
+ if (relativeEnd < 0) throw new Error("options.end < 0");
+ if (relativeEnd > entry.compressedSize) throw new Error("options.end > entry.compressedSize");
+ if (relativeEnd < relativeStart) throw new Error("options.end < options.start");
+ }
+ }
+ // any further errors can either be caused by the zipfile,
+ // or were introduced in a minor version of yauzl,
+ // so should be passed to the client rather than thrown.
+ if (!self.isOpen) return callback(new Error("closed"));
+ if (entry.isEncrypted()) {
+ if (options.decrypt !== false) return callback(new Error("entry is encrypted, and options.decrypt !== false"));
+ }
+ // make sure we don't lose the fd before we open the actual read stream
+ self.reader.ref();
+ var buffer = newBuffer(30);
+ readAndAssertNoEof(self.reader, buffer, 0, buffer.length, entry.relativeOffsetOfLocalHeader, function(err) {
+ try {
+ if (err) return callback(err);
+ // 0 - Local file header signature = 0x04034b50
+ var signature = buffer.readUInt32LE(0);
+ if (signature !== 0x04034b50) {
+ return callback(new Error("invalid local file header signature: 0x" + signature.toString(16)));
+ }
+ // all this should be redundant
+ // 4 - Version needed to extract (minimum)
+ // 6 - General purpose bit flag
+ // 8 - Compression method
+ // 10 - File last modification time
+ // 12 - File last modification date
+ // 14 - CRC-32
+ // 18 - Compressed size
+ // 22 - Uncompressed size
+ // 26 - File name length (n)
+ var fileNameLength = buffer.readUInt16LE(26);
+ // 28 - Extra field length (m)
+ var extraFieldLength = buffer.readUInt16LE(28);
+ // 30 - File name
+ // 30+n - Extra field
+ var localFileHeaderEnd = entry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength;
+ var decompress;
+ if (entry.compressionMethod === 0) {
+ // 0 - The file is stored (no compression)
+ decompress = false;
+ } else if (entry.compressionMethod === 8) {
+ // 8 - The file is Deflated
+ decompress = options.decompress != null ? options.decompress : true;
+ } else {
+ return callback(new Error("unsupported compression method: " + entry.compressionMethod));
+ }
+ var fileDataStart = localFileHeaderEnd;
+ var fileDataEnd = fileDataStart + entry.compressedSize;
+ if (entry.compressedSize !== 0) {
+ // bounds check now, because the read streams will probably not complain loud enough.
+ // since we're dealing with an unsigned offset plus an unsigned size,
+ // we only have 1 thing to check for.
+ if (fileDataEnd > self.fileSize) {
+ return callback(new Error("file data overflows file bounds: " +
+ fileDataStart + " + " + entry.compressedSize + " > " + self.fileSize));
+ }
+ }
+ var readStream = self.reader.createReadStream({
+ start: fileDataStart + relativeStart,
+ end: fileDataStart + relativeEnd,
+ });
+ var endpointStream = readStream;
+ if (decompress) {
+ var destroyed = false;
+ var inflateFilter = zlib.createInflateRaw();
+ readStream.on("error", function(err) {
+ // setImmediate here because errors can be emitted during the first call to pipe()
+ setImmediate(function() {
+ if (!destroyed) inflateFilter.emit("error", err);
+ });
+ });
+ readStream.pipe(inflateFilter);
+
+ if (self.validateEntrySizes) {
+ endpointStream = new AssertByteCountStream(entry.uncompressedSize);
+ inflateFilter.on("error", function(err) {
+ // forward zlib errors to the client-visible stream
+ setImmediate(function() {
+ if (!destroyed) endpointStream.emit("error", err);
+ });
+ });
+ inflateFilter.pipe(endpointStream);
+ } else {
+ // the zlib filter is the client-visible stream
+ endpointStream = inflateFilter;
+ }
+ // this is part of yauzl's API, so implement this function on the client-visible stream
+ endpointStream.destroy = function() {
+ destroyed = true;
+ if (inflateFilter !== endpointStream) inflateFilter.unpipe(endpointStream);
+ readStream.unpipe(inflateFilter);
+ // TODO: the inflateFilter may cause a memory leak. see Issue #27.
+ readStream.destroy();
+ };
+ }
+ callback(null, endpointStream);
+ } finally {
+ self.reader.unref();
+ }
+ });
+};
+
+function Entry() {
+}
+Entry.prototype.getLastModDate = function() {
+ return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime);
+};
+Entry.prototype.isEncrypted = function() {
+ return (this.generalPurposeBitFlag & 0x1) !== 0;
+};
+Entry.prototype.isCompressed = function() {
+ return this.compressionMethod === 8;
+};
+
+function dosDateTimeToDate(date, time) {
+ var day = date & 0x1f; // 1-31
+ var month = (date >> 5 & 0xf) - 1; // 1-12, 0-11
+ var year = (date >> 9 & 0x7f) + 1980; // 0-128, 1980-2108
+
+ var millisecond = 0;
+ var second = (time & 0x1f) * 2; // 0-29, 0-58 (even numbers)
+ var minute = time >> 5 & 0x3f; // 0-59
+ var hour = time >> 11 & 0x1f; // 0-23
+
+ return new Date(year, month, day, hour, minute, second, millisecond);
+}
+
+function validateFileName(fileName) {
+ if (fileName.indexOf("\\") !== -1) {
+ return "invalid characters in fileName: " + fileName;
+ }
+ if (/^[a-zA-Z]:/.test(fileName) || /^\//.test(fileName)) {
+ return "absolute path: " + fileName;
+ }
+ if (fileName.split("/").indexOf("..") !== -1) {
+ return "invalid relative path: " + fileName;
+ }
+ // all good
+ return null;
+}
+
+function readAndAssertNoEof(reader, buffer, offset, length, position, callback) {
+ if (length === 0) {
+ // fs.read will throw an out-of-bounds error if you try to read 0 bytes from a 0 byte file
+ return setImmediate(function() { callback(null, newBuffer(0)); });
+ }
+ reader.read(buffer, offset, length, position, function(err, bytesRead) {
+ if (err) return callback(err);
+ if (bytesRead < length) {
+ return callback(new Error("unexpected EOF"));
+ }
+ callback();
+ });
+}
+
+util.inherits(AssertByteCountStream, Transform);
+function AssertByteCountStream(byteCount) {
+ Transform.call(this);
+ this.actualByteCount = 0;
+ this.expectedByteCount = byteCount;
+}
+AssertByteCountStream.prototype._transform = function(chunk, encoding, cb) {
+ this.actualByteCount += chunk.length;
+ if (this.actualByteCount > this.expectedByteCount) {
+ var msg = "too many bytes in the stream. expected " + this.expectedByteCount + ". got at least " + this.actualByteCount;
+ return cb(new Error(msg));
+ }
+ cb(null, chunk);
+};
+AssertByteCountStream.prototype._flush = function(cb) {
+ if (this.actualByteCount < this.expectedByteCount) {
+ var msg = "not enough bytes in the stream. expected " + this.expectedByteCount + ". got only " + this.actualByteCount;
+ return cb(new Error(msg));
+ }
+ cb();
+};
+
+util.inherits(RandomAccessReader, EventEmitter);
+function RandomAccessReader() {
+ EventEmitter.call(this);
+ this.refCount = 0;
+}
+RandomAccessReader.prototype.ref = function() {
+ this.refCount += 1;
+};
+RandomAccessReader.prototype.unref = function() {
+ var self = this;
+ self.refCount -= 1;
+
+ if (self.refCount > 0) return;
+ if (self.refCount < 0) throw new Error("invalid unref");
+
+ self.close(onCloseDone);
+
+ function onCloseDone(err) {
+ if (err) return self.emit('error', err);
+ self.emit('close');
+ }
+};
+RandomAccessReader.prototype.createReadStream = function(options) {
+ var start = options.start;
+ var end = options.end;
+ if (start === end) {
+ var emptyStream = new PassThrough();
+ setImmediate(function() {
+ emptyStream.end();
+ });
+ return emptyStream;
+ }
+ var stream = this._readStreamForRange(start, end);
+
+ var destroyed = false;
+ var refUnrefFilter = new RefUnrefFilter(this);
+ stream.on("error", function(err) {
+ setImmediate(function() {
+ if (!destroyed) refUnrefFilter.emit("error", err);
+ });
+ });
+ refUnrefFilter.destroy = function() {
+ stream.unpipe(refUnrefFilter);
+ refUnrefFilter.unref();
+ stream.destroy();
+ };
+
+ var byteCounter = new AssertByteCountStream(end - start);
+ refUnrefFilter.on("error", function(err) {
+ setImmediate(function() {
+ if (!destroyed) byteCounter.emit("error", err);
+ });
+ });
+ byteCounter.destroy = function() {
+ destroyed = true;
+ refUnrefFilter.unpipe(byteCounter);
+ refUnrefFilter.destroy();
+ };
+
+ return stream.pipe(refUnrefFilter).pipe(byteCounter);
+};
+RandomAccessReader.prototype._readStreamForRange = function(start, end) {
+ throw new Error("not implemented");
+};
+RandomAccessReader.prototype.read = function(buffer, offset, length, position, callback) {
+ var readStream = this.createReadStream({start: position, end: position + length});
+ var writeStream = new Writable();
+ var written = 0;
+ writeStream._write = function(chunk, encoding, cb) {
+ chunk.copy(buffer, offset + written, 0, chunk.length);
+ written += chunk.length;
+ cb();
+ };
+ writeStream.on("finish", callback);
+ readStream.on("error", function(error) {
+ callback(error);
+ });
+ readStream.pipe(writeStream);
+};
+RandomAccessReader.prototype.close = function(callback) {
+ setImmediate(callback);
+};
+
+util.inherits(RefUnrefFilter, PassThrough);
+function RefUnrefFilter(context) {
+ PassThrough.call(this);
+ this.context = context;
+ this.context.ref();
+ this.unreffedYet = false;
+}
+RefUnrefFilter.prototype._flush = function(cb) {
+ this.unref();
+ cb();
+};
+RefUnrefFilter.prototype.unref = function(cb) {
+ if (this.unreffedYet) return;
+ this.unreffedYet = true;
+ this.context.unref();
+};
+
+var cp437 = '\u0000☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ';
+function decodeBuffer(buffer, start, end, isUtf8) {
+ if (isUtf8) {
+ return buffer.toString("utf8", start, end);
+ } else {
+ var result = "";
+ for (var i = start; i < end; i++) {
+ result += cp437[buffer[i]];
+ }
+ return result;
+ }
+}
+
+function readUInt64LE(buffer, offset) {
+ // there is no native function for this, because we can't actually store 64-bit integers precisely.
+ // after 53 bits, JavaScript's Number type (IEEE 754 double) can't store individual integers anymore.
+ // but since 53 bits is a whole lot more than 32 bits, we do our best anyway.
+ var lower32 = buffer.readUInt32LE(offset);
+ var upper32 = buffer.readUInt32LE(offset + 4);
+ // we can't use bitshifting here, because JavaScript bitshifting only works on 32-bit integers.
+ return upper32 * 0x100000000 + lower32;
+ // as long as we're bounds checking the result of this function against the total file size,
+ // we'll catch any overflow errors, because we already made sure the total file size was within reason.
+}
+
+// Node 10 deprecated new Buffer().
+var newBuffer;
+if (typeof Buffer.allocUnsafe === "function") {
+ newBuffer = function(len) {
+ return Buffer.allocUnsafe(len);
+ };
+} else {
+ newBuffer = function(len) {
+ return new Buffer(len);
+ };
+}
+
+function defaultCallback(err) {
+ if (err) throw err;
+}
diff --git a/node_modules/yauzl/package.json b/node_modules/yauzl/package.json
new file mode 100644
index 0000000..4f1144a
--- /dev/null
+++ b/node_modules/yauzl/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "yauzl",
+ "version": "2.10.0",
+ "description": "yet another unzip library for node",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test/test.js",
+ "test-cov": "istanbul cover test/test.js",
+ "test-travis": "istanbul cover --report lcovonly test/test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/thejoshwolfe/yauzl.git"
+ },
+ "keywords": [
+ "unzip",
+ "zip",
+ "stream",
+ "archive",
+ "file"
+ ],
+ "author": "Josh Wolfe <thejoshwolfe@gmail.com>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/thejoshwolfe/yauzl/issues"
+ },
+ "homepage": "https://github.com/thejoshwolfe/yauzl",
+ "dependencies": {
+ "fd-slicer": "~1.1.0",
+ "buffer-crc32": "~0.2.3"
+ },
+ "devDependencies": {
+ "bl": "~1.0.0",
+ "istanbul": "~0.3.4",
+ "pend": "~1.2.0"
+ },
+ "files": [
+ "index.js"
+ ]
+}